diff --git a/SuperMap iEarth/.npmrc b/SuperMap iEarth/.npmrc new file mode 100644 index 00000000..a0fad3d6 --- /dev/null +++ b/SuperMap iEarth/.npmrc @@ -0,0 +1 @@ +@ispeco:registry=http://npm.ispeco.com/npm \ No newline at end of file diff --git a/SuperMap iEarth/index.html b/SuperMap iEarth/index.html index f4ccb1a6..d7d887a4 100644 --- a/SuperMap iEarth/index.html +++ b/SuperMap iEarth/index.html @@ -5,28 +5,36 @@ - - - + iEarth + + + + - + - iEarth - + + + + + + + + + + + + + + + +
- \ No newline at end of file diff --git a/SuperMap iEarth/package-lock.json b/SuperMap iEarth/package-lock.json new file mode 100644 index 00000000..67344055 --- /dev/null +++ b/SuperMap iEarth/package-lock.json @@ -0,0 +1,7201 @@ +{ + "name": "vite-project", + "version": "0.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "vite-project", + "version": "0.0.0", + "dependencies": { + "@ispeco/authentication-sdk": "^2.0.34", + "axios": "^0.27.2", + "color": "^4.2.3", + "crypto-js": "^4.1.1", + "echarts": "^5.4.2", + "fast-glob": "^3.2.12", + "html2canvas": "^1.4.1", + "pinia": "^2.0.22", + "pinia-plugin-persist": "^1.0.0", + "proj4": "^2.9.0", + "screenfull": "^6.0.1", + "vue": "^3.2.37", + "vue-i18n": "9.1.9", + "vue-json-pretty": "^2.2.3", + "vue-router": "^4.1.5", + "vuedraggable": "4.1.0" + }, + "devDependencies": { + "@vicons/ionicons5": "~0.11.0", + "@vitejs/plugin-vue": "^3.1.0", + "lib-flexible": "^0.3.2", + "lodash": "~4.17.21", + "naive-ui": "^2.33.5", + "sass": "^1.49.11", + "sass-loader": "^12.6.0", + "typescript": "^4.8.3", + "vite": "^3.1.0", + "vite-plugin-svg-icons": "^2.0.1", + "vue-tsc": "^0.40.4" + } + }, + "node_modules/@babel/parser": { + "version": "7.19.0", + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@css-render/plugin-bem": { + "version": "0.15.11", + "dev": true, + "license": "MIT", + "peerDependencies": { + "css-render": "~0.15.11" + } + }, + "node_modules/@css-render/vue3-ssr": { + "version": "0.15.11", + "dev": true, + "license": "MIT", + "peerDependencies": { + "vue": "^3.0.11" + } + }, + "node_modules/@emotion/hash": { + "version": "0.8.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@intlify/core-base": { + "version": "9.1.9", + "license": "MIT", + "dependencies": { + "@intlify/devtools-if": "9.1.9", + "@intlify/message-compiler": "9.1.9", + "@intlify/message-resolver": "9.1.9", + "@intlify/runtime": "9.1.9", + "@intlify/shared": "9.1.9", + "@intlify/vue-devtools": "9.1.9" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@intlify/devtools-if": { + "version": "9.1.9", + "license": "MIT", + "dependencies": { + "@intlify/shared": "9.1.9" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@intlify/message-compiler": { + "version": "9.1.9", + "license": "MIT", + "dependencies": { + "@intlify/message-resolver": "9.1.9", + "@intlify/shared": "9.1.9", + "source-map": "0.6.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@intlify/message-resolver": { + "version": "9.1.9", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@intlify/runtime": { + "version": "9.1.9", + "license": "MIT", + "dependencies": { + "@intlify/message-compiler": "9.1.9", + "@intlify/message-resolver": "9.1.9", + "@intlify/shared": "9.1.9" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@intlify/shared": { + "version": "9.1.9", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@intlify/vue-devtools": { + "version": "9.1.9", + "license": "MIT", + "dependencies": { + "@intlify/message-resolver": "9.1.9", + "@intlify/runtime": "9.1.9", + "@intlify/shared": "9.1.9" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@ispeco/authentication-sdk": { + "version": "2.0.34", + "resolved": "http://npm.ispeco.com/repository/npm_supermap/@ispeco/authentication-sdk/-/authentication-sdk-2.0.34.tgz", + "integrity": "sha512-WYynqIqDVeHIWE+/bl0k7YOBePJsArw8IhTaDlErbcF0awyo/Ja1ciuxntYKTY9e0CA3yX7loGBC+iwQ8t8WWQ==", + "license": "ISC", + "dependencies": { + "core-js": "^3.8.1", + "keycloak-js": "^10.0.2" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.17", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@juggle/resize-observer": { + "version": "3.4.0", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@trysound/sax": { + "version": "0.2.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@types/eslint": { + "version": "8.21.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.4", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "0.0.51", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/lodash": { + "version": "4.14.187", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/lodash-es": { + "version": "4.17.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/lodash": "*" + } + }, + "node_modules/@types/node": { + "version": "17.0.45", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/svgo": { + "version": "2.6.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@vicons/ionicons5": { + "version": "0.11.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@vitejs/plugin-vue": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^3.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@volar/code-gen": { + "version": "0.40.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/source-map": "0.40.13" + } + }, + "node_modules/@volar/source-map": { + "version": "0.40.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.2.38" + } + }, + "node_modules/@volar/source-map/node_modules/@vue/reactivity": { + "version": "3.2.38", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/shared": "3.2.38" + } + }, + "node_modules/@volar/source-map/node_modules/@vue/shared": { + "version": "3.2.38", + "dev": true, + "license": "MIT" + }, + "node_modules/@volar/typescript-faster": { + "version": "0.40.13", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.3.7" + } + }, + "node_modules/@volar/vue-language-core": { + "version": "0.40.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/code-gen": "0.40.13", + "@volar/source-map": "0.40.13", + "@vue/compiler-core": "^3.2.38", + "@vue/compiler-dom": "^3.2.38", + "@vue/compiler-sfc": "^3.2.38", + "@vue/reactivity": "^3.2.38", + "@vue/shared": "^3.2.38" + } + }, + "node_modules/@volar/vue-typescript": { + "version": "0.40.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/code-gen": "0.40.13", + "@volar/typescript-faster": "0.40.13", + "@volar/vue-language-core": "0.40.13" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.2.39", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.16.4", + "@vue/shared": "3.2.39", + "estree-walker": "^2.0.2", + "source-map": "^0.6.1" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.2.39", + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.2.39", + "@vue/shared": "3.2.39" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.2.39", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.16.4", + "@vue/compiler-core": "3.2.39", + "@vue/compiler-dom": "3.2.39", + "@vue/compiler-ssr": "3.2.39", + "@vue/reactivity-transform": "3.2.39", + "@vue/shared": "3.2.39", + "estree-walker": "^2.0.2", + "magic-string": "^0.25.7", + "postcss": "^8.1.10", + "source-map": "^0.6.1" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.2.39", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.2.39", + "@vue/shared": "3.2.39" + } + }, + "node_modules/@vue/devtools-api": { + "version": "6.2.1", + "license": "MIT" + }, + "node_modules/@vue/reactivity": { + "version": "3.2.39", + "license": "MIT", + "dependencies": { + "@vue/shared": "3.2.39" + } + }, + "node_modules/@vue/reactivity-transform": { + "version": "3.2.39", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.16.4", + "@vue/compiler-core": "3.2.39", + "@vue/shared": "3.2.39", + "estree-walker": "^2.0.2", + "magic-string": "^0.25.7" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.2.39", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.2.39", + "@vue/shared": "3.2.39" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.2.39", + "license": "MIT", + "dependencies": { + "@vue/runtime-core": "3.2.39", + "@vue/shared": "3.2.39", + "csstype": "^2.6.8" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.2.39", + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.2.39", + "@vue/shared": "3.2.39" + }, + "peerDependencies": { + "vue": "3.2.39" + } + }, + "node_modules/@vue/shared": { + "version": "3.2.39", + "license": "MIT" + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.1", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "dev": true, + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "dev": true, + "license": "Apache-2.0", + "peer": true + }, + "node_modules/acorn": { + "version": "8.8.2", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-assertions": { + "version": "1.8.0", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async-validator": { + "version": "4.2.5", + "dev": true, + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "license": "MIT" + }, + "node_modules/atob": { + "version": "2.1.2", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/axios": { + "version": "0.27.2", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "node_modules/base": { + "version": "0.11.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base64-arraybuffer": { + "version": "1.0.2", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + }, + "node_modules/big.js": { + "version": "5.2.2", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/bluebird": { + "version": "3.7.2", + "dev": true, + "license": "MIT" + }, + "node_modules/boolbase": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/braces": { + "version": "3.0.2", + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.5", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/cache-base": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001450", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ], + "license": "CC-BY-4.0", + "peer": true + }, + "node_modules/chalk": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/clone": { + "version": "2.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color": { + "version": "4.2.3", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "license": "MIT" + }, + "node_modules/color-string": { + "version": "1.9.1", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "dev": true, + "license": "MIT" + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-js": { + "version": "3.35.1", + "resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.35.1.tgz", + "integrity": "sha512-IgdsbxNyMskrTFxa9lWHyMwAJU5gXOPP+1yO+K59d50VLVAIDAbs7gIv705KzALModfK3ZrSZTPNpC0PQgIZuw==", + "hasInstallScript": true + }, + "node_modules/cors": { + "version": "2.8.5", + "dev": true, + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/crypto-js": { + "version": "4.1.1", + "license": "MIT" + }, + "node_modules/css-line-break": { + "version": "2.1.0", + "license": "MIT", + "dependencies": { + "utrie": "^1.0.2" + } + }, + "node_modules/css-render": { + "version": "0.15.11", + "dev": true, + "license": "MIT", + "dependencies": { + "@emotion/hash": "~0.8.0", + "@types/node": "~17.0.5", + "csstype": "~3.0.5" + } + }, + "node_modules/css-render/node_modules/csstype": { + "version": "3.0.11", + "dev": true, + "license": "MIT" + }, + "node_modules/css-select": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-select/node_modules/dom-serializer": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/css-select/node_modules/domelementtype": { + "version": "2.3.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/css-select/node_modules/domhandler": { + "version": "4.3.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/css-select/node_modules/domutils": { + "version": "2.8.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/css-select/node_modules/entities": { + "version": "2.2.0", + "dev": true, + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/css-tree": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/csso": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "css-tree": "^1.1.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/csstype": { + "version": "2.6.21", + "license": "MIT" + }, + "node_modules/date-fns": { + "version": "2.29.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, + "node_modules/date-fns-tz": { + "version": "1.3.7", + "dev": true, + "license": "MIT", + "peerDependencies": { + "date-fns": ">=2.0.0" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/define-property": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dom-serializer": { + "version": "0.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "node_modules/dom-serializer/node_modules/domelementtype": { + "version": "2.3.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "dev": true, + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "1.3.1", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "2.4.2", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/domutils": { + "version": "1.7.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/echarts": { + "version": "5.4.3", + "license": "Apache-2.0", + "dependencies": { + "tslib": "2.3.0", + "zrender": "5.4.4" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.287", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.12.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "1.1.2", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/es-module-lexer": { + "version": "0.9.3", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/esbuild": { + "version": "0.15.7", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/linux-loong64": "0.15.7", + "esbuild-android-64": "0.15.7", + "esbuild-android-arm64": "0.15.7", + "esbuild-darwin-64": "0.15.7", + "esbuild-darwin-arm64": "0.15.7", + "esbuild-freebsd-64": "0.15.7", + "esbuild-freebsd-arm64": "0.15.7", + "esbuild-linux-32": "0.15.7", + "esbuild-linux-64": "0.15.7", + "esbuild-linux-arm": "0.15.7", + "esbuild-linux-arm64": "0.15.7", + "esbuild-linux-mips64le": "0.15.7", + "esbuild-linux-ppc64le": "0.15.7", + "esbuild-linux-riscv64": "0.15.7", + "esbuild-linux-s390x": "0.15.7", + "esbuild-netbsd-64": "0.15.7", + "esbuild-openbsd-64": "0.15.7", + "esbuild-sunos-64": "0.15.7", + "esbuild-windows-32": "0.15.7", + "esbuild-windows-64": "0.15.7", + "esbuild-windows-arm64": "0.15.7" + } + }, + "node_modules/esbuild-windows-64": { + "version": "0.15.7", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/evtd": { + "version": "0.2.4", + "dev": true, + "license": "MIT" + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/micromatch": { + "version": "4.0.5", + "license": "MIT", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fastq": { + "version": "1.15.0", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/get-value": { + "version": "2.0.6", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "dev": true, + "license": "BSD-2-Clause", + "peer": true + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "dev": true, + "license": "ISC" + }, + "node_modules/has": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/he": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/highlight.js": { + "version": "11.6.0", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/html2canvas": { + "version": "1.4.1", + "license": "MIT", + "dependencies": { + "css-line-break": "^2.1.0", + "text-segmentation": "^1.0.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/htmlparser2": { + "version": "3.10.1", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "node_modules/image-size": { + "version": "0.5.5", + "dev": true, + "license": "MIT", + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/immutable": { + "version": "4.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC" + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "6.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "license": "MIT" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "dev": true, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.10.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "6.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor/node_modules/kind-of": { + "version": "6.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/isobject": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/js-base64": { + "version": "2.6.4", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/js-sha256": { + "version": "0.9.0", + "resolved": "https://registry.npmmirror.com/js-sha256/-/js-sha256-0.9.0.tgz", + "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json5": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/keycloak-js": { + "version": "10.0.2", + "resolved": "https://registry.npmmirror.com/keycloak-js/-/keycloak-js-10.0.2.tgz", + "integrity": "sha512-7nkg4Ob1khHGcNbuK36AMndKUEuIQFpNlWU9ygWs7nSBPCI9VZ8dJjjXfKJHm0ewgcqLFGPIJ6bxxRlfcQ6sLg==", + "dependencies": { + "base64-js": "1.3.1", + "js-sha256": "0.9.0" + } + }, + "node_modules/kind-of": { + "version": "5.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/klona": { + "version": "2.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/lib-flexible": { + "version": "0.3.2", + "dev": true, + "license": "ISC" + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/loader-utils": { + "version": "1.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash-es": { + "version": "4.17.21", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/magic-string": { + "version": "0.25.9", + "license": "MIT", + "dependencies": { + "sourcemap-codec": "^1.4.8" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-visit": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mdn-data": { + "version": "2.0.14", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/merge-options": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-obj": "^1.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/mgrs": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/micromatch": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.2.2", + "define-property": "^1.0.0", + "extend-shallow": "^2.0.1", + "extglob": "^2.0.2", + "fragment-cache": "^0.2.1", + "kind-of": "^5.0.2", + "nanomatch": "^1.2.1", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/braces": { + "version": "2.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/fill-range": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/is-number": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/micromatch/node_modules/to-regex-range": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/naive-ui": { + "version": "2.33.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@css-render/plugin-bem": "^0.15.10", + "@css-render/vue3-ssr": "^0.15.10", + "@types/lodash": "^4.14.181", + "@types/lodash-es": "^4.17.6", + "async-validator": "^4.0.7", + "css-render": "^0.15.10", + "date-fns": "^2.28.0", + "date-fns-tz": "^1.3.3", + "evtd": "^0.2.4", + "highlight.js": "^11.5.0", + "lodash": "^4.17.21", + "lodash-es": "^4.17.21", + "seemly": "^0.3.6", + "treemate": "^0.3.11", + "vdirs": "^0.1.8", + "vooks": "^0.2.12", + "vueuc": "^0.4.47" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.4", + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/define-property": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/extend-shallow": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/is-extendable": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.10", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "dev": true, + "license": "MIT" + }, + "node_modules/pathe": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.0.0", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pinia": { + "version": "2.0.22", + "license": "MIT", + "dependencies": { + "@vue/devtools-api": "^6.2.1", + "vue-demi": "*" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "@vue/composition-api": "^1.4.0", + "typescript": ">=4.4.4", + "vue": "^2.6.14 || ^3.2.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/pinia-plugin-persist": { + "version": "1.0.0", + "dependencies": { + "vue-demi": "^0.12.1" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0", + "pinia": "^2.0.0", + "vue": "^2.0.0 || >=3.0.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/pinia-plugin-persist/node_modules/vue-demi": { + "version": "0.12.5", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/pinia/node_modules/vue-demi": { + "version": "0.13.11", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss": { + "version": "8.4.16", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-prefix-selector": { + "version": "1.16.0", + "dev": true, + "license": "MIT", + "peerDependencies": { + "postcss": ">4 <9" + } + }, + "node_modules/posthtml": { + "version": "0.9.2", + "dev": true, + "license": "MIT", + "dependencies": { + "posthtml-parser": "^0.2.0", + "posthtml-render": "^1.0.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/posthtml-parser": { + "version": "0.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "htmlparser2": "^3.8.3", + "isobject": "^2.1.0" + } + }, + "node_modules/posthtml-parser/node_modules/isobject": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/posthtml-rename-id": { + "version": "1.0.12", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "1.0.5" + } + }, + "node_modules/posthtml-render": { + "version": "1.4.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/posthtml-svg-mode": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "merge-options": "1.0.1", + "posthtml": "^0.9.2", + "posthtml-parser": "^0.2.1", + "posthtml-render": "^1.0.6" + } + }, + "node_modules/proj4": { + "version": "2.9.0", + "license": "MIT", + "dependencies": { + "mgrs": "1.0.0", + "wkt-parser": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/query-string": { + "version": "4.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/extend-shallow": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/is-extendable": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "dev": true, + "license": "MIT" + }, + "node_modules/ret": { + "version": "0.1.15", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "2.78.1", + "dev": true, + "license": "MIT", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/sass": { + "version": "1.56.1", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/sass-loader": { + "version": "12.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "klona": "^2.0.4", + "neo-async": "^2.6.2" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "fibers": ">= 3.1.0", + "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", + "sass": "^1.3.0", + "sass-embedded": "*", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "fibers": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + } + } + }, + "node_modules/schema-utils": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/screenfull": { + "version": "6.0.2", + "license": "MIT", + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/seemly": { + "version": "0.3.6", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.3.7", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.1", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-value": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "dev": true, + "license": "MIT", + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/snapdragon/node_modules/source-map": { + "version": "0.5.7", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sortablejs": { + "version": "1.14.0", + "resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz", + "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==" + }, + "node_modules/source-map": { + "version": "0.6.1", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "dev": true, + "license": "MIT", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "dev": true, + "license": "MIT" + }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "license": "MIT" + }, + "node_modules/split-string": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/extend-shallow": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-extendable": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stable": { + "version": "0.1.8", + "dev": true, + "license": "MIT" + }, + "node_modules/static-extend": { + "version": "0.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strict-uri-encode": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svg-baker": { + "version": "1.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "bluebird": "^3.5.0", + "clone": "^2.1.1", + "he": "^1.1.1", + "image-size": "^0.5.1", + "loader-utils": "^1.1.0", + "merge-options": "1.0.1", + "micromatch": "3.1.0", + "postcss": "^5.2.17", + "postcss-prefix-selector": "^1.6.0", + "posthtml-rename-id": "^1.0", + "posthtml-svg-mode": "^1.0.3", + "query-string": "^4.3.2", + "traverse": "^0.6.6" + } + }, + "node_modules/svg-baker/node_modules/has-flag": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/svg-baker/node_modules/postcss": { + "version": "5.2.18", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^1.1.3", + "js-base64": "^2.1.9", + "source-map": "^0.5.6", + "supports-color": "^3.2.3" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/svg-baker/node_modules/source-map": { + "version": "0.5.7", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/svg-baker/node_modules/supports-color": { + "version": "3.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^1.0.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/svgo": { + "version": "2.8.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.3", + "csso": "^4.2.0", + "picocolors": "^1.0.0", + "stable": "^0.1.8" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/svgo/node_modules/commander": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/terser": { + "version": "5.16.3", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.6", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.14", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.14.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/text-segmentation": { + "version": "1.0.3", + "license": "MIT", + "dependencies": { + "utrie": "^1.0.2" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/to-regex/node_modules/define-property": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/extend-shallow": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-extendable": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/traverse": { + "version": "0.6.7", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/treemate": { + "version": "0.3.11", + "dev": true, + "license": "MIT" + }, + "node_modules/tslib": { + "version": "2.3.0", + "license": "0BSD" + }, + "node_modules/typescript": { + "version": "4.8.3", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/universalify": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.10", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/use": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/utrie": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "base64-arraybuffer": "^1.0.2" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vdirs": { + "version": "0.1.8", + "dev": true, + "license": "MIT", + "dependencies": { + "evtd": "^0.2.2" + }, + "peerDependencies": { + "vue": "^3.0.11" + } + }, + "node_modules/vite": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.15.6", + "postcss": "^8.4.16", + "resolve": "^1.22.1", + "rollup": "~2.78.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "less": "*", + "sass": "*", + "stylus": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-plugin-svg-icons": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/svgo": "^2.6.1", + "cors": "^2.8.5", + "debug": "^4.3.3", + "etag": "^1.8.1", + "fs-extra": "^10.0.0", + "pathe": "^0.2.0", + "svg-baker": "1.7.0", + "svgo": "^2.8.0" + }, + "peerDependencies": { + "vite": ">=2.0.0" + } + }, + "node_modules/vooks": { + "version": "0.2.12", + "dev": true, + "license": "MIT", + "dependencies": { + "evtd": "^0.2.2" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, + "node_modules/vue": { + "version": "3.2.39", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.2.39", + "@vue/compiler-sfc": "3.2.39", + "@vue/runtime-dom": "3.2.39", + "@vue/server-renderer": "3.2.39", + "@vue/shared": "3.2.39" + } + }, + "node_modules/vue-i18n": { + "version": "9.1.9", + "license": "MIT", + "dependencies": { + "@intlify/core-base": "9.1.9", + "@intlify/shared": "9.1.9", + "@intlify/vue-devtools": "9.1.9", + "@vue/devtools-api": "^6.0.0-beta.7" + }, + "engines": { + "node": ">= 10" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, + "node_modules/vue-json-pretty": { + "version": "2.2.3", + "license": "MIT", + "engines": { + "node": ">= 10.0.0", + "npm": ">= 5.0.0" + }, + "peerDependencies": { + "vue": ">=3.0.0" + } + }, + "node_modules/vue-router": { + "version": "4.1.5", + "license": "MIT", + "dependencies": { + "@vue/devtools-api": "^6.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, + "node_modules/vue-tsc": { + "version": "0.40.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/vue-language-core": "0.40.13", + "@volar/vue-typescript": "0.40.13" + }, + "bin": { + "vue-tsc": "bin/vue-tsc.js" + }, + "peerDependencies": { + "typescript": "*" + } + }, + "node_modules/vuedraggable": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz", + "integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==", + "dependencies": { + "sortablejs": "1.14.0" + }, + "peerDependencies": { + "vue": "^3.0.1" + } + }, + "node_modules/vueuc": { + "version": "0.4.49", + "dev": true, + "license": "MIT", + "dependencies": { + "@css-render/vue3-ssr": "^0.15.10", + "@juggle/resize-observer": "^3.3.1", + "css-render": "^0.15.10", + "evtd": "^0.2.4", + "seemly": "^0.3.6", + "vdirs": "^0.1.4", + "vooks": "^0.2.4" + }, + "peerDependencies": { + "vue": "^3.0.11" + } + }, + "node_modules/watchpack": { + "version": "2.4.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack": { + "version": "5.75.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wkt-parser": { + "version": "1.3.3", + "license": "MIT" + }, + "node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/zrender": { + "version": "5.4.4", + "license": "BSD-3-Clause", + "dependencies": { + "tslib": "2.3.0" + } + } + }, + "dependencies": { + "@babel/parser": { + "version": "7.19.0" + }, + "@css-render/plugin-bem": { + "version": "0.15.11", + "dev": true, + "requires": {} + }, + "@css-render/vue3-ssr": { + "version": "0.15.11", + "dev": true, + "requires": {} + }, + "@emotion/hash": { + "version": "0.8.0", + "dev": true + }, + "@intlify/core-base": { + "version": "9.1.9", + "requires": { + "@intlify/devtools-if": "9.1.9", + "@intlify/message-compiler": "9.1.9", + "@intlify/message-resolver": "9.1.9", + "@intlify/runtime": "9.1.9", + "@intlify/shared": "9.1.9", + "@intlify/vue-devtools": "9.1.9" + } + }, + "@intlify/devtools-if": { + "version": "9.1.9", + "requires": { + "@intlify/shared": "9.1.9" + } + }, + "@intlify/message-compiler": { + "version": "9.1.9", + "requires": { + "@intlify/message-resolver": "9.1.9", + "@intlify/shared": "9.1.9", + "source-map": "0.6.1" + } + }, + "@intlify/message-resolver": { + "version": "9.1.9" + }, + "@intlify/runtime": { + "version": "9.1.9", + "requires": { + "@intlify/message-compiler": "9.1.9", + "@intlify/message-resolver": "9.1.9", + "@intlify/shared": "9.1.9" + } + }, + "@intlify/shared": { + "version": "9.1.9" + }, + "@intlify/vue-devtools": { + "version": "9.1.9", + "requires": { + "@intlify/message-resolver": "9.1.9", + "@intlify/runtime": "9.1.9", + "@intlify/shared": "9.1.9" + } + }, + "@ispeco/authentication-sdk": { + "version": "2.0.34", + "resolved": "http://npm.ispeco.com/repository/npm_supermap/@ispeco/authentication-sdk/-/authentication-sdk-2.0.34.tgz", + "integrity": "sha512-WYynqIqDVeHIWE+/bl0k7YOBePJsArw8IhTaDlErbcF0awyo/Ja1ciuxntYKTY9e0CA3yX7loGBC+iwQ8t8WWQ==", + "requires": { + "core-js": "^3.8.1", + "keycloak-js": "^10.0.2" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "dev": true, + "peer": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "dev": true, + "peer": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "dev": true, + "peer": true + }, + "@jridgewell/source-map": { + "version": "0.3.2", + "dev": true, + "peer": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "dev": true, + "peer": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.17", + "dev": true, + "peer": true, + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "@juggle/resize-observer": { + "version": "3.4.0", + "dev": true + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5" + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@trysound/sax": { + "version": "0.2.0", + "dev": true + }, + "@types/eslint": { + "version": "8.21.0", + "dev": true, + "peer": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.4", + "dev": true, + "peer": true, + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "@types/estree": { + "version": "0.0.51", + "dev": true, + "peer": true + }, + "@types/json-schema": { + "version": "7.0.11", + "dev": true, + "peer": true + }, + "@types/lodash": { + "version": "4.14.187", + "dev": true + }, + "@types/lodash-es": { + "version": "4.17.6", + "dev": true, + "requires": { + "@types/lodash": "*" + } + }, + "@types/node": { + "version": "17.0.45", + "dev": true + }, + "@types/svgo": { + "version": "2.6.4", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@vicons/ionicons5": { + "version": "0.11.0", + "dev": true + }, + "@vitejs/plugin-vue": { + "version": "3.1.0", + "dev": true, + "requires": {} + }, + "@volar/code-gen": { + "version": "0.40.13", + "dev": true, + "requires": { + "@volar/source-map": "0.40.13" + } + }, + "@volar/source-map": { + "version": "0.40.13", + "dev": true, + "requires": { + "@vue/reactivity": "3.2.38" + }, + "dependencies": { + "@vue/reactivity": { + "version": "3.2.38", + "dev": true, + "requires": { + "@vue/shared": "3.2.38" + } + }, + "@vue/shared": { + "version": "3.2.38", + "dev": true + } + } + }, + "@volar/typescript-faster": { + "version": "0.40.13", + "dev": true, + "requires": { + "semver": "^7.3.7" + } + }, + "@volar/vue-language-core": { + "version": "0.40.13", + "dev": true, + "requires": { + "@volar/code-gen": "0.40.13", + "@volar/source-map": "0.40.13", + "@vue/compiler-core": "^3.2.38", + "@vue/compiler-dom": "^3.2.38", + "@vue/compiler-sfc": "^3.2.38", + "@vue/reactivity": "^3.2.38", + "@vue/shared": "^3.2.38" + } + }, + "@volar/vue-typescript": { + "version": "0.40.13", + "dev": true, + "requires": { + "@volar/code-gen": "0.40.13", + "@volar/typescript-faster": "0.40.13", + "@volar/vue-language-core": "0.40.13" + } + }, + "@vue/compiler-core": { + "version": "3.2.39", + "requires": { + "@babel/parser": "^7.16.4", + "@vue/shared": "3.2.39", + "estree-walker": "^2.0.2", + "source-map": "^0.6.1" + } + }, + "@vue/compiler-dom": { + "version": "3.2.39", + "requires": { + "@vue/compiler-core": "3.2.39", + "@vue/shared": "3.2.39" + } + }, + "@vue/compiler-sfc": { + "version": "3.2.39", + "requires": { + "@babel/parser": "^7.16.4", + "@vue/compiler-core": "3.2.39", + "@vue/compiler-dom": "3.2.39", + "@vue/compiler-ssr": "3.2.39", + "@vue/reactivity-transform": "3.2.39", + "@vue/shared": "3.2.39", + "estree-walker": "^2.0.2", + "magic-string": "^0.25.7", + "postcss": "^8.1.10", + "source-map": "^0.6.1" + } + }, + "@vue/compiler-ssr": { + "version": "3.2.39", + "requires": { + "@vue/compiler-dom": "3.2.39", + "@vue/shared": "3.2.39" + } + }, + "@vue/devtools-api": { + "version": "6.2.1" + }, + "@vue/reactivity": { + "version": "3.2.39", + "requires": { + "@vue/shared": "3.2.39" + } + }, + "@vue/reactivity-transform": { + "version": "3.2.39", + "requires": { + "@babel/parser": "^7.16.4", + "@vue/compiler-core": "3.2.39", + "@vue/shared": "3.2.39", + "estree-walker": "^2.0.2", + "magic-string": "^0.25.7" + } + }, + "@vue/runtime-core": { + "version": "3.2.39", + "requires": { + "@vue/reactivity": "3.2.39", + "@vue/shared": "3.2.39" + } + }, + "@vue/runtime-dom": { + "version": "3.2.39", + "requires": { + "@vue/runtime-core": "3.2.39", + "@vue/shared": "3.2.39", + "csstype": "^2.6.8" + } + }, + "@vue/server-renderer": { + "version": "3.2.39", + "requires": { + "@vue/compiler-ssr": "3.2.39", + "@vue/shared": "3.2.39" + } + }, + "@vue/shared": { + "version": "3.2.39" + }, + "@webassemblyjs/ast": { + "version": "1.11.1", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "dev": true, + "peer": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "dev": true, + "peer": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "dev": true, + "peer": true + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "dev": true, + "peer": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.1", + "dev": true, + "peer": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.1", + "dev": true, + "peer": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.1", + "dev": true, + "peer": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.11.1", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "dev": true, + "peer": true + }, + "@xtuc/long": { + "version": "4.2.2", + "dev": true, + "peer": true + }, + "acorn": { + "version": "8.8.2", + "dev": true, + "peer": true + }, + "acorn-import-assertions": { + "version": "1.8.0", + "dev": true, + "peer": true, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "dev": true, + "peer": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "dev": true, + "peer": true, + "requires": {} + }, + "ansi-regex": { + "version": "2.1.1", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "dev": true + }, + "anymatch": { + "version": "3.1.2", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "arr-diff": { + "version": "4.0.0", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "dev": true + }, + "async-validator": { + "version": "4.2.5", + "dev": true + }, + "asynckit": { + "version": "0.4.0" + }, + "atob": { + "version": "2.1.2", + "dev": true + }, + "axios": { + "version": "0.27.2", + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "base": { + "version": "0.11.2", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + } + }, + "base64-arraybuffer": { + "version": "1.0.2" + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + }, + "big.js": { + "version": "5.2.2", + "dev": true + }, + "binary-extensions": { + "version": "2.2.0", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "dev": true + }, + "boolbase": { + "version": "1.0.0", + "dev": true + }, + "braces": { + "version": "3.0.2", + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.21.5", + "dev": true, + "peer": true, + "requires": { + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" + } + }, + "buffer-from": { + "version": "1.1.2", + "dev": true, + "peer": true + }, + "cache-base": { + "version": "1.0.1", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "caniuse-lite": { + "version": "1.0.30001450", + "dev": true, + "peer": true + }, + "chalk": { + "version": "1.1.3", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "dev": true + } + } + }, + "chokidar": { + "version": "3.5.3", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "chrome-trace-event": { + "version": "1.0.3", + "dev": true, + "peer": true + }, + "class-utils": { + "version": "0.3.6", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + } + } + }, + "clone": { + "version": "2.1.2", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "4.2.3", + "requires": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + } + }, + "color-convert": { + "version": "2.0.1", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4" + }, + "color-string": { + "version": "1.9.1", + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "combined-stream": { + "version": "1.0.8", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "dev": true, + "peer": true + }, + "component-emitter": { + "version": "1.3.0", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "dev": true + }, + "core-js": { + "version": "3.35.1", + "resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.35.1.tgz", + "integrity": "sha512-IgdsbxNyMskrTFxa9lWHyMwAJU5gXOPP+1yO+K59d50VLVAIDAbs7gIv705KzALModfK3ZrSZTPNpC0PQgIZuw==" + }, + "cors": { + "version": "2.8.5", + "dev": true, + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "crypto-js": { + "version": "4.1.1" + }, + "css-line-break": { + "version": "2.1.0", + "requires": { + "utrie": "^1.0.2" + } + }, + "css-render": { + "version": "0.15.11", + "dev": true, + "requires": { + "@emotion/hash": "~0.8.0", + "@types/node": "~17.0.5", + "csstype": "~3.0.5" + }, + "dependencies": { + "csstype": { + "version": "3.0.11", + "dev": true + } + } + }, + "css-select": { + "version": "4.3.0", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "dependencies": { + "dom-serializer": { + "version": "1.4.1", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.3.0", + "dev": true + }, + "domhandler": { + "version": "4.3.1", + "dev": true, + "requires": { + "domelementtype": "^2.2.0" + } + }, + "domutils": { + "version": "2.8.0", + "dev": true, + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + } + }, + "entities": { + "version": "2.2.0", + "dev": true + } + } + }, + "css-tree": { + "version": "1.1.3", + "dev": true, + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, + "css-what": { + "version": "6.1.0", + "dev": true + }, + "csso": { + "version": "4.2.0", + "dev": true, + "requires": { + "css-tree": "^1.1.2" + } + }, + "csstype": { + "version": "2.6.21" + }, + "date-fns": { + "version": "2.29.3", + "dev": true + }, + "date-fns-tz": { + "version": "1.3.7", + "dev": true, + "requires": {} + }, + "debug": { + "version": "4.3.4", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "decode-uri-component": { + "version": "0.2.2", + "dev": true + }, + "define-property": { + "version": "1.0.0", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0" + }, + "dom-serializer": { + "version": "0.2.2", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.3.0", + "dev": true + }, + "entities": { + "version": "2.2.0", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.1", + "dev": true + }, + "domhandler": { + "version": "2.4.2", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.7.0", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "echarts": { + "version": "5.4.3", + "requires": { + "tslib": "2.3.0", + "zrender": "5.4.4" + } + }, + "electron-to-chromium": { + "version": "1.4.287", + "dev": true, + "peer": true + }, + "emojis-list": { + "version": "3.0.0", + "dev": true + }, + "enhanced-resolve": { + "version": "5.12.0", + "dev": true, + "peer": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "entities": { + "version": "1.1.2", + "dev": true + }, + "es-module-lexer": { + "version": "0.9.3", + "dev": true, + "peer": true + }, + "esbuild": { + "version": "0.15.7", + "dev": true, + "requires": { + "@esbuild/linux-loong64": "0.15.7", + "esbuild-android-64": "0.15.7", + "esbuild-android-arm64": "0.15.7", + "esbuild-darwin-64": "0.15.7", + "esbuild-darwin-arm64": "0.15.7", + "esbuild-freebsd-64": "0.15.7", + "esbuild-freebsd-arm64": "0.15.7", + "esbuild-linux-32": "0.15.7", + "esbuild-linux-64": "0.15.7", + "esbuild-linux-arm": "0.15.7", + "esbuild-linux-arm64": "0.15.7", + "esbuild-linux-mips64le": "0.15.7", + "esbuild-linux-ppc64le": "0.15.7", + "esbuild-linux-riscv64": "0.15.7", + "esbuild-linux-s390x": "0.15.7", + "esbuild-netbsd-64": "0.15.7", + "esbuild-openbsd-64": "0.15.7", + "esbuild-sunos-64": "0.15.7", + "esbuild-windows-32": "0.15.7", + "esbuild-windows-64": "0.15.7", + "esbuild-windows-arm64": "0.15.7" + } + }, + "esbuild-windows-64": { + "version": "0.15.7", + "dev": true, + "optional": true + }, + "escalade": { + "version": "3.1.1", + "dev": true, + "peer": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "dev": true + }, + "eslint-scope": { + "version": "5.1.1", + "dev": true, + "peer": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "esrecurse": { + "version": "4.3.0", + "dev": true, + "peer": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "dev": true, + "peer": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "dev": true, + "peer": true + }, + "estree-walker": { + "version": "2.0.2" + }, + "etag": { + "version": "1.8.1", + "dev": true + }, + "events": { + "version": "3.3.0", + "dev": true, + "peer": true + }, + "evtd": { + "version": "0.2.4", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "ms": { + "version": "2.0.0", + "dev": true + } + } + }, + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "extglob": { + "version": "2.0.4", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "peer": true + }, + "fast-glob": { + "version": "3.2.12", + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "micromatch": { + "version": "4.0.5", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "peer": true + }, + "fastq": { + "version": "1.15.0", + "requires": { + "reusify": "^1.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "follow-redirects": { + "version": "1.15.2" + }, + "for-in": { + "version": "1.0.2", + "dev": true + }, + "form-data": { + "version": "4.0.0", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-extra": { + "version": "10.1.0", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "function-bind": { + "version": "1.1.1", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "dev": true + }, + "glob-parent": { + "version": "5.1.2", + "requires": { + "is-glob": "^4.0.1" + } + }, + "glob-to-regexp": { + "version": "0.4.1", + "dev": true, + "peer": true + }, + "graceful-fs": { + "version": "4.2.10", + "dev": true + }, + "has": { + "version": "1.0.3", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "dev": true, + "peer": true + }, + "has-value": { + "version": "1.0.0", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "he": { + "version": "1.2.0", + "dev": true + }, + "highlight.js": { + "version": "11.6.0", + "dev": true + }, + "html2canvas": { + "version": "1.4.1", + "requires": { + "css-line-break": "^2.1.0", + "text-segmentation": "^1.0.3" + } + }, + "htmlparser2": { + "version": "3.10.1", + "dev": true, + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "image-size": { + "version": "0.5.5", + "dev": true + }, + "immutable": { + "version": "4.1.0", + "dev": true + }, + "inherits": { + "version": "2.0.4", + "dev": true + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "dev": true + } + } + }, + "is-arrayish": { + "version": "0.3.2" + }, + "is-binary-path": { + "version": "2.1.0", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "dev": true + }, + "is-core-module": { + "version": "2.10.0", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "dev": true + } + } + }, + "is-descriptor": { + "version": "1.0.2", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "dev": true + }, + "is-extglob": { + "version": "2.1.1" + }, + "is-glob": { + "version": "4.0.3", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0" + }, + "is-plain-obj": { + "version": "1.1.0", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-windows": { + "version": "1.0.2", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "dev": true + }, + "jest-worker": { + "version": "27.5.1", + "dev": true, + "peer": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "js-base64": { + "version": "2.6.4", + "dev": true + }, + "js-sha256": { + "version": "0.9.0", + "resolved": "https://registry.npmmirror.com/js-sha256/-/js-sha256-0.9.0.tgz", + "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "dev": true, + "peer": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "dev": true, + "peer": true + }, + "json5": { + "version": "1.0.2", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "jsonfile": { + "version": "6.1.0", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "keycloak-js": { + "version": "10.0.2", + "resolved": "https://registry.npmmirror.com/keycloak-js/-/keycloak-js-10.0.2.tgz", + "integrity": "sha512-7nkg4Ob1khHGcNbuK36AMndKUEuIQFpNlWU9ygWs7nSBPCI9VZ8dJjjXfKJHm0ewgcqLFGPIJ6bxxRlfcQ6sLg==", + "requires": { + "base64-js": "1.3.1", + "js-sha256": "0.9.0" + } + }, + "kind-of": { + "version": "5.1.0", + "dev": true + }, + "klona": { + "version": "2.0.5", + "dev": true + }, + "lib-flexible": { + "version": "0.3.2", + "dev": true + }, + "loader-runner": { + "version": "4.3.0", + "dev": true, + "peer": true + }, + "loader-utils": { + "version": "1.4.2", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + }, + "lodash": { + "version": "4.17.21", + "dev": true + }, + "lodash-es": { + "version": "4.17.21", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "magic-string": { + "version": "0.25.9", + "requires": { + "sourcemap-codec": "^1.4.8" + } + }, + "map-cache": { + "version": "0.2.2", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "mdn-data": { + "version": "2.0.14", + "dev": true + }, + "merge-options": { + "version": "1.0.1", + "dev": true, + "requires": { + "is-plain-obj": "^1.1" + } + }, + "merge-stream": { + "version": "2.0.0", + "dev": true, + "peer": true + }, + "merge2": { + "version": "1.4.1" + }, + "mgrs": { + "version": "1.0.0" + }, + "micromatch": { + "version": "3.1.0", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.2.2", + "define-property": "^1.0.0", + "extend-shallow": "^2.0.1", + "extglob": "^2.0.2", + "fragment-cache": "^0.2.1", + "kind-of": "^5.0.2", + "nanomatch": "^1.2.1", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "braces": { + "version": "2.3.2", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + } + }, + "fill-range": { + "version": "4.0.0", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + } + }, + "is-number": { + "version": "3.0.0", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex-range": { + "version": "2.1.1", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + } + } + }, + "mime-db": { + "version": "1.52.0" + }, + "mime-types": { + "version": "2.1.35", + "requires": { + "mime-db": "1.52.0" + } + }, + "minimist": { + "version": "1.2.8", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "ms": { + "version": "2.1.2", + "dev": true + }, + "naive-ui": { + "version": "2.33.5", + "dev": true, + "requires": { + "@css-render/plugin-bem": "^0.15.10", + "@css-render/vue3-ssr": "^0.15.10", + "@types/lodash": "^4.14.181", + "@types/lodash-es": "^4.17.6", + "async-validator": "^4.0.7", + "css-render": "^0.15.10", + "date-fns": "^2.28.0", + "date-fns-tz": "^1.3.3", + "evtd": "^0.2.4", + "highlight.js": "^11.5.0", + "lodash": "^4.17.21", + "lodash-es": "^4.17.21", + "seemly": "^0.3.6", + "treemate": "^0.3.11", + "vdirs": "^0.1.8", + "vooks": "^0.2.12", + "vueuc": "^0.4.47" + } + }, + "nanoid": { + "version": "3.3.4" + }, + "nanomatch": { + "version": "1.2.13", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "2.0.2", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + } + }, + "extend-shallow": { + "version": "3.0.2", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + }, + "kind-of": { + "version": "6.0.3", + "dev": true + } + } + }, + "neo-async": { + "version": "2.6.2", + "dev": true + }, + "node-releases": { + "version": "2.0.10", + "dev": true, + "peer": true + }, + "normalize-path": { + "version": "3.0.0", + "dev": true + }, + "nth-check": { + "version": "2.1.1", + "dev": true, + "requires": { + "boolbase": "^1.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "dev": true + } + } + }, + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "pascalcase": { + "version": "0.1.1", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "dev": true + }, + "pathe": { + "version": "0.2.0", + "dev": true + }, + "picocolors": { + "version": "1.0.0" + }, + "picomatch": { + "version": "2.3.1" + }, + "pinia": { + "version": "2.0.22", + "requires": { + "@vue/devtools-api": "^6.2.1", + "vue-demi": "*" + }, + "dependencies": { + "vue-demi": { + "version": "0.13.11", + "requires": {} + } + } + }, + "pinia-plugin-persist": { + "version": "1.0.0", + "requires": { + "vue-demi": "^0.12.1" + }, + "dependencies": { + "vue-demi": { + "version": "0.12.5", + "requires": {} + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "dev": true + }, + "postcss": { + "version": "8.4.16", + "requires": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "postcss-prefix-selector": { + "version": "1.16.0", + "dev": true, + "requires": {} + }, + "posthtml": { + "version": "0.9.2", + "dev": true, + "requires": { + "posthtml-parser": "^0.2.0", + "posthtml-render": "^1.0.5" + } + }, + "posthtml-parser": { + "version": "0.2.1", + "dev": true, + "requires": { + "htmlparser2": "^3.8.3", + "isobject": "^2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "posthtml-rename-id": { + "version": "1.0.12", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "posthtml-render": { + "version": "1.4.0", + "dev": true + }, + "posthtml-svg-mode": { + "version": "1.0.3", + "dev": true, + "requires": { + "merge-options": "1.0.1", + "posthtml": "^0.9.2", + "posthtml-parser": "^0.2.1", + "posthtml-render": "^1.0.6" + } + }, + "proj4": { + "version": "2.9.0", + "requires": { + "mgrs": "1.0.0", + "wkt-parser": "^1.3.1" + } + }, + "punycode": { + "version": "2.3.0", + "dev": true, + "peer": true + }, + "query-string": { + "version": "4.3.4", + "dev": true, + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "queue-microtask": { + "version": "1.2.3" + }, + "randombytes": { + "version": "2.1.0", + "dev": true, + "peer": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "readable-stream": { + "version": "3.6.2", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.6.0", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "regex-not": { + "version": "1.0.2", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "repeat-element": { + "version": "1.1.4", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "dev": true + }, + "resolve": { + "version": "1.22.1", + "dev": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "dev": true + }, + "ret": { + "version": "0.1.15", + "dev": true + }, + "reusify": { + "version": "1.0.4" + }, + "rollup": { + "version": "2.78.1", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, + "run-parallel": { + "version": "1.2.0", + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "safe-buffer": { + "version": "5.2.1", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "sass": { + "version": "1.56.1", + "dev": true, + "requires": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + } + }, + "sass-loader": { + "version": "12.6.0", + "dev": true, + "requires": { + "klona": "^2.0.4", + "neo-async": "^2.6.2" + } + }, + "schema-utils": { + "version": "3.1.1", + "dev": true, + "peer": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "screenfull": { + "version": "6.0.2" + }, + "seemly": { + "version": "0.3.6", + "dev": true + }, + "semver": { + "version": "7.3.7", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "serialize-javascript": { + "version": "6.0.1", + "dev": true, + "peer": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "set-value": { + "version": "2.0.1", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + } + }, + "simple-swizzle": { + "version": "0.2.2", + "requires": { + "is-arrayish": "^0.3.1" + } + }, + "snapdragon": { + "version": "0.8.2", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "ms": { + "version": "2.0.0", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + } + }, + "snapdragon-util": { + "version": "3.0.1", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "sortablejs": { + "version": "1.14.0", + "resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz", + "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==" + }, + "source-map": { + "version": "0.6.1" + }, + "source-map-js": { + "version": "1.0.2" + }, + "source-map-resolve": { + "version": "0.5.3", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.21", + "dev": true, + "peer": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "source-map-url": { + "version": "0.4.1", + "dev": true + }, + "sourcemap-codec": { + "version": "1.4.8" + }, + "split-string": { + "version": "3.1.0", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "stable": { + "version": "0.1.8", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + } + } + }, + "strict-uri-encode": { + "version": "1.1.0", + "dev": true + }, + "string_decoder": { + "version": "1.3.0", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "8.1.1", + "dev": true, + "peer": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "dev": true + }, + "svg-baker": { + "version": "1.7.0", + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "clone": "^2.1.1", + "he": "^1.1.1", + "image-size": "^0.5.1", + "loader-utils": "^1.1.0", + "merge-options": "1.0.1", + "micromatch": "3.1.0", + "postcss": "^5.2.17", + "postcss-prefix-selector": "^1.6.0", + "posthtml-rename-id": "^1.0", + "posthtml-svg-mode": "^1.0.3", + "query-string": "^4.3.2", + "traverse": "^0.6.6" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "js-base64": "^2.1.9", + "source-map": "^0.5.6", + "supports-color": "^3.2.3" + } + }, + "source-map": { + "version": "0.5.7", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "svgo": { + "version": "2.8.0", + "dev": true, + "requires": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.3", + "csso": "^4.2.0", + "picocolors": "^1.0.0", + "stable": "^0.1.8" + }, + "dependencies": { + "commander": { + "version": "7.2.0", + "dev": true + } + } + }, + "tapable": { + "version": "2.2.1", + "dev": true, + "peer": true + }, + "terser": { + "version": "5.16.3", + "dev": true, + "peer": true, + "requires": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + } + }, + "terser-webpack-plugin": { + "version": "5.3.6", + "dev": true, + "peer": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.14", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.14.1" + } + }, + "text-segmentation": { + "version": "1.0.3", + "requires": { + "utrie": "^1.0.2" + } + }, + "to-object-path": { + "version": "0.3.0", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "define-property": { + "version": "2.0.2", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + } + }, + "extend-shallow": { + "version": "3.0.2", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "to-regex-range": { + "version": "5.0.1", + "requires": { + "is-number": "^7.0.0" + } + }, + "traverse": { + "version": "0.6.7", + "dev": true + }, + "treemate": { + "version": "0.3.11", + "dev": true + }, + "tslib": { + "version": "2.3.0" + }, + "typescript": { + "version": "4.8.3", + "devOptional": true + }, + "union-value": { + "version": "1.0.1", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "universalify": { + "version": "2.0.0", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "dev": true + } + } + }, + "update-browserslist-db": { + "version": "1.0.10", + "dev": true, + "peer": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "uri-js": { + "version": "4.4.1", + "dev": true, + "peer": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "dev": true + }, + "use": { + "version": "3.1.1", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "dev": true + }, + "utrie": { + "version": "1.0.2", + "requires": { + "base64-arraybuffer": "^1.0.2" + } + }, + "vary": { + "version": "1.1.2", + "dev": true + }, + "vdirs": { + "version": "0.1.8", + "dev": true, + "requires": { + "evtd": "^0.2.2" + } + }, + "vite": { + "version": "3.1.0", + "dev": true, + "requires": { + "esbuild": "^0.15.6", + "fsevents": "~2.3.2", + "postcss": "^8.4.16", + "resolve": "^1.22.1", + "rollup": "~2.78.0" + } + }, + "vite-plugin-svg-icons": { + "version": "2.0.1", + "dev": true, + "requires": { + "@types/svgo": "^2.6.1", + "cors": "^2.8.5", + "debug": "^4.3.3", + "etag": "^1.8.1", + "fs-extra": "^10.0.0", + "pathe": "^0.2.0", + "svg-baker": "1.7.0", + "svgo": "^2.8.0" + } + }, + "vooks": { + "version": "0.2.12", + "dev": true, + "requires": { + "evtd": "^0.2.2" + } + }, + "vue": { + "version": "3.2.39", + "requires": { + "@vue/compiler-dom": "3.2.39", + "@vue/compiler-sfc": "3.2.39", + "@vue/runtime-dom": "3.2.39", + "@vue/server-renderer": "3.2.39", + "@vue/shared": "3.2.39" + } + }, + "vue-i18n": { + "version": "9.1.9", + "requires": { + "@intlify/core-base": "9.1.9", + "@intlify/shared": "9.1.9", + "@intlify/vue-devtools": "9.1.9", + "@vue/devtools-api": "^6.0.0-beta.7" + } + }, + "vue-json-pretty": { + "version": "2.2.3", + "requires": {} + }, + "vue-router": { + "version": "4.1.5", + "requires": { + "@vue/devtools-api": "^6.1.4" + } + }, + "vue-tsc": { + "version": "0.40.13", + "dev": true, + "requires": { + "@volar/vue-language-core": "0.40.13", + "@volar/vue-typescript": "0.40.13" + } + }, + "vuedraggable": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz", + "integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==", + "requires": { + "sortablejs": "1.14.0" + } + }, + "vueuc": { + "version": "0.4.49", + "dev": true, + "requires": { + "@css-render/vue3-ssr": "^0.15.10", + "@juggle/resize-observer": "^3.3.1", + "css-render": "^0.15.10", + "evtd": "^0.2.4", + "seemly": "^0.3.6", + "vdirs": "^0.1.4", + "vooks": "^0.2.4" + } + }, + "watchpack": { + "version": "2.4.0", + "dev": true, + "peer": true, + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, + "webpack": { + "version": "5.75.0", + "dev": true, + "peer": true, + "requires": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + } + }, + "webpack-sources": { + "version": "3.2.3", + "dev": true, + "peer": true + }, + "wkt-parser": { + "version": "1.3.3" + }, + "yallist": { + "version": "4.0.0", + "dev": true + }, + "zrender": { + "version": "5.4.4", + "requires": { + "tslib": "2.3.0" + } + } + } +} diff --git a/SuperMap iEarth/package.json b/SuperMap iEarth/package.json index 16c361c1..32cc3225 100644 --- a/SuperMap iEarth/package.json +++ b/SuperMap iEarth/package.json @@ -8,20 +8,22 @@ "preview": "vite preview" }, "dependencies": { - "@ispeco/authentication-sdk": "^1.0.28", + "@ispeco/authentication-sdk": "^2.0.34", "axios": "^0.27.2", "color": "^4.2.3", "crypto-js": "^4.1.1", + "echarts": "^5.4.2", "fast-glob": "^3.2.12", "html2canvas": "^1.4.1", "pinia": "^2.0.22", "pinia-plugin-persist": "^1.0.0", + "proj4": "^2.9.0", "screenfull": "^6.0.1", "vue": "^3.2.37", "vue-i18n": "9.1.9", "vue-json-pretty": "^2.2.3", "vue-router": "^4.1.5", - "echarts": "^5.4.2" + "vuedraggable": "4.1.0" }, "devDependencies": { "@vicons/ionicons5": "~0.11.0", diff --git a/SuperMap iEarth/public/Resource/pbr/MaterialJson/MI_Pebble01_BaseTexMap.png b/SuperMap iEarth/public/Resource/pbr/MaterialJson/MI_Pebble01_BaseTexMap.png new file mode 100644 index 00000000..5e29d5f1 Binary files /dev/null and b/SuperMap iEarth/public/Resource/pbr/MaterialJson/MI_Pebble01_BaseTexMap.png differ diff --git a/SuperMap iEarth/public/Resource/pbr/MaterialJson/MI_Pebble01_MetallicRoughMap.png b/SuperMap iEarth/public/Resource/pbr/MaterialJson/MI_Pebble01_MetallicRoughMap.png new file mode 100644 index 00000000..c9983e80 Binary files /dev/null and b/SuperMap iEarth/public/Resource/pbr/MaterialJson/MI_Pebble01_MetallicRoughMap.png differ diff --git a/SuperMap iEarth/public/Resource/pbr/MaterialJson/MI_Pebble01_NormalMap.png b/SuperMap iEarth/public/Resource/pbr/MaterialJson/MI_Pebble01_NormalMap.png new file mode 100644 index 00000000..80d4d80f Binary files /dev/null and b/SuperMap iEarth/public/Resource/pbr/MaterialJson/MI_Pebble01_NormalMap.png differ diff --git a/SuperMap iEarth/public/Resource/pbr/MaterialJson/M_Brick_Clay_Old_.json b/SuperMap iEarth/public/Resource/pbr/MaterialJson/M_Brick_Clay_Old_.json new file mode 100644 index 00000000..0d28f464 --- /dev/null +++ b/SuperMap iEarth/public/Resource/pbr/MaterialJson/M_Brick_Clay_Old_.json @@ -0,0 +1,135 @@ +{ + "material": { + "id": "DA82AFCB-129A-4E66-995A-9F519894F58D", + "cullMode": "none", + "alphaMode": "opaque", + "alphaCutoff": 0.009999999776482582, + "vertexShaderName": "", + "fragmentShaderName": "", + "pbrMetallicRoughness": { + "emissiveFactor": { "x": 0.0, "y": 0.0, "z": 0.0 }, + "emissiveTextureIndex": -1, + "emissiveTextureCoordIndex": -1, + "emissiveTextureMotion": { + "OffsetSpeedU": 0.0, + "OffsetSpeedV": 0.0, + "OffsetPeriod": 0.0, + "TilingSpeedU": 1.0, + "TilingSpeedV": 1.0, + "TilingPeriod": 0.0 + }, + "normalTextureIndex": -1, + "normalTextureCoordIndex": 0, + "normalTextureScale": 0.1, + "occlusionTextureIndex": -1, + "occlusionTextureCoordIndex": -1, + "occlusionTextureStrength": 1.0, + "baseColor": { "x": 1.0, "y": 1.0, "z": 1.0, "w": 1.0 }, + "baseColorTextureIndex": -1, + "baseColorTextureCoordIndex": 0, + "baseColorTextureMotion": { + "OffsetSpeedU": 0.0, + "OffsetSpeedV": 0.0, + "OffsetPeriod": 0.0, + "TilingSpeedU": 1.0, + "TilingSpeedV": 1.0, + "TilingPeriod": 0.0 + }, + "metallicRoughnessTextureIndex": 1, + "metallicRoughnessTextureCoordIndex": 0, + "metallicFactor": 0.1, + "roughnessFactor": 1.0, + "snowEffect": { + "snowMaskTextureIndex": 4, + "snowNormalTextureIndex": 5, + "snow_coverage": 0.32 + } + }, + "textureunitstates": [ + { + "textureunitstate": { + "id": "M_Brick_Clay_Old_BaseTexMap", + "url": "M_Brick_Clay_Old_BaseTexMap.png", + "addressmode": { "u": 0, "v": 0, "w": 0 }, + "filteringoption": 0, + "filtermin": 2, + "filtermax": 2, + "texmodmatrix": [ + 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + } + }, + { + "textureunitstate": { + "id": "M_Brick_Clay_Old_MetallicRoughMap", + "url": "M_Brick_Clay_Old_MetallicRoughMap.png", + "addressmode": { "u": 0, "v": 0, "w": 0 }, + "filteringoption": 0, + "filtermin": 2, + "filtermax": 2, + "texmodmatrix": [ + 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + } + }, + { + "textureunitstate": { + "id": "M_Brick_Clay_Old_NormalMap", + "url": "M_Brick_Clay_Old_NormalMap.png", + "addressmode": { "u": 0, "v": 0, "w": 0 }, + "filteringoption": 0, + "filtermin": 2, + "filtermax": 2, + "texmodmatrix": [ + 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + } + }, + { + "textureunitstate": { + "id": "M_Brick_Clay_Old_Ripple", + "url": "Ripple_Sheet.png", + "addressmode": { "u": 0, "v": 0, "w": 0 }, + "filteringoption": 0, + "filtermin": 2, + "filtermax": 2, + "texmodmatrix": [ + 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + } + }, + { + "textureunitstate": { + "id": "Snow_masks", + "url": "Snow_masks.png", + "addressmode": { "u": 0, "v": 0, "w": 0 }, + "filteringoption": 0, + "filtermin": 2, + "filtermax": 2, + "texmodmatrix": [ + 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + } + }, + { + "textureunitstate": { + "id": "Snow_normal", + "url": "Snow_normal.png", + "addressmode": { "u": 0, "v": 0, "w": 0 }, + "filteringoption": 0, + "filtermin": 2, + "filtermax": 2, + "texmodmatrix": [ + 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + } + } + ] + } +} diff --git a/SuperMap iEarth/public/Resource/pbr/MaterialJson/M_Brick_Clay_Old_BaseTexMap.png b/SuperMap iEarth/public/Resource/pbr/MaterialJson/M_Brick_Clay_Old_BaseTexMap.png new file mode 100644 index 00000000..afac5121 Binary files /dev/null and b/SuperMap iEarth/public/Resource/pbr/MaterialJson/M_Brick_Clay_Old_BaseTexMap.png differ diff --git a/SuperMap iEarth/public/Resource/pbr/MaterialJson/M_Brick_Clay_Old_MetallicRoughMap.png b/SuperMap iEarth/public/Resource/pbr/MaterialJson/M_Brick_Clay_Old_MetallicRoughMap.png new file mode 100644 index 00000000..7151119d Binary files /dev/null and b/SuperMap iEarth/public/Resource/pbr/MaterialJson/M_Brick_Clay_Old_MetallicRoughMap.png differ diff --git a/SuperMap iEarth/public/Resource/pbr/MaterialJson/M_Brick_Clay_Old_NormalMap.png b/SuperMap iEarth/public/Resource/pbr/MaterialJson/M_Brick_Clay_Old_NormalMap.png new file mode 100644 index 00000000..68a6468b Binary files /dev/null and b/SuperMap iEarth/public/Resource/pbr/MaterialJson/M_Brick_Clay_Old_NormalMap.png differ diff --git a/SuperMap iEarth/public/Resource/pbr/MaterialJson/Ripple_Sheet.png b/SuperMap iEarth/public/Resource/pbr/MaterialJson/Ripple_Sheet.png new file mode 100644 index 00000000..596df7c1 Binary files /dev/null and b/SuperMap iEarth/public/Resource/pbr/MaterialJson/Ripple_Sheet.png differ diff --git a/SuperMap iEarth/public/Resource/pbr/MaterialJson/Snow_masks.png b/SuperMap iEarth/public/Resource/pbr/MaterialJson/Snow_masks.png new file mode 100644 index 00000000..47645e74 Binary files /dev/null and b/SuperMap iEarth/public/Resource/pbr/MaterialJson/Snow_masks.png differ diff --git a/SuperMap iEarth/public/Resource/pbr/MaterialJson/Snow_normal.png b/SuperMap iEarth/public/Resource/pbr/MaterialJson/Snow_normal.png new file mode 100644 index 00000000..31746c60 Binary files /dev/null and b/SuperMap iEarth/public/Resource/pbr/MaterialJson/Snow_normal.png differ diff --git a/SuperMap iEarth/public/Resource/pbr/MaterialJson/rain_.json b/SuperMap iEarth/public/Resource/pbr/MaterialJson/rain_.json new file mode 100644 index 00000000..27b6c2b5 --- /dev/null +++ b/SuperMap iEarth/public/Resource/pbr/MaterialJson/rain_.json @@ -0,0 +1,141 @@ +{ + "material": { + "id": "DA82AFCB-129A-4E66-995A-9F519894F58D", + "cullMode": "none", + "alphaMode": "opaque", + "alphaCutoff": 0.009999999776482582, + "vertexShaderName": "", + "fragmentShaderName": "", + "pbrMetallicRoughness": { + "emissiveFactor": { "x": 0.0, "y": 0.0, "z": 0.0 }, + "emissiveTextureIndex": -1, + "emissiveTextureCoordIndex": -1, + "emissiveTextureMotion": { + "OffsetSpeedU": 0.0, + "OffsetSpeedV": 0.0, + "OffsetPeriod": 0.0, + "TilingSpeedU": 1.0, + "TilingSpeedV": 1.0, + "TilingPeriod": 0.0 + }, + "normalTextureIndex": -1, + "normalTextureCoordIndex": 0, + "normalTextureScale": 0.1, + "occlusionTextureIndex": -1, + "occlusionTextureCoordIndex": -1, + "occlusionTextureStrength": 1.0, + "baseColor": { "x": 1.0, "y": 1.0, "z": 1.0, "w": 1.0 }, + "baseColorTextureIndex": -1, + "baseColorTextureCoordIndex": 0, + "baseColorTextureMotion": { + "OffsetSpeedU": 0.0, + "OffsetSpeedV": 0.0, + "OffsetPeriod": 0.0, + "TilingSpeedU": 1.0, + "TilingSpeedV": 1.0, + "TilingPeriod": 0.0 + }, + "metallicRoughnessTextureIndex": -1, + "metallicRoughnessTextureCoordIndex": 0, + "metallicFactor": 0.1, + "roughnessFactor": 1.0, + "rainEffect": { + "rippleTextureIndex": 3, + "rippleTextureCoordIndex": 0, + "rippleTextureScale": 1.0, + "animationSpeed": 0.01, + "wetnessFactor": 0.72, + "ripple_scale": 7.0, + "wind_intensity": 0, + "rain": 200, + "cameraDepth": 0.8 + } + }, + "textureunitstates": [ + { + "textureunitstate": { + "id": "M_Brick_Clay_Old_BaseTexMap", + "url": "M_Brick_Clay_Old_BaseTexMap.png", + "addressmode": { "u": 0, "v": 0, "w": 0 }, + "filteringoption": 0, + "filtermin": 2, + "filtermax": 2, + "texmodmatrix": [ + 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + } + }, + { + "textureunitstate": { + "id": "M_Brick_Clay_Old_MetallicRoughMap", + "url": "M_Brick_Clay_Old_MetallicRoughMap.png", + "addressmode": { "u": 0, "v": 0, "w": 0 }, + "filteringoption": 0, + "filtermin": 2, + "filtermax": 2, + "texmodmatrix": [ + 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + } + }, + { + "textureunitstate": { + "id": "M_Brick_Clay_Old_NormalMap", + "url": "M_Brick_Clay_Old_NormalMap.png", + "addressmode": { "u": 0, "v": 0, "w": 0 }, + "filteringoption": 0, + "filtermin": 2, + "filtermax": 2, + "texmodmatrix": [ + 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + } + }, + { + "textureunitstate": { + "id": "M_Brick_Clay_Old_Ripple", + "url": "Ripple_Sheet.png", + "addressmode": { "u": 0, "v": 0, "w": 0 }, + "filteringoption": 0, + "filtermin": 2, + "filtermax": 2, + "texmodmatrix": [ + 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + } + }, + { + "textureunitstate": { + "id": "Snow_masks", + "url": "Snow_masks.png", + "addressmode": { "u": 0, "v": 0, "w": 0 }, + "filteringoption": 0, + "filtermin": 2, + "filtermax": 2, + "texmodmatrix": [ + 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + } + }, + { + "textureunitstate": { + "id": "Snow_normal", + "url": "Snow_normal.png", + "addressmode": { "u": 0, "v": 0, "w": 0 }, + "filteringoption": 0, + "filtermin": 2, + "filtermax": 2, + "texmodmatrix": [ + 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + } + } + ] + } +} diff --git a/SuperMap iEarth/public/SuperMap3D/SuperMap3D-es6.js b/SuperMap iEarth/public/SuperMap3D/SuperMap3D-es6.js index 371333d4..2f900b91 100644 --- a/SuperMap iEarth/public/SuperMap3D/SuperMap3D-es6.js +++ b/SuperMap iEarth/public/SuperMap3D/SuperMap3D-es6.js @@ -1 +1 @@ -var factory;function e$2b(e){return null!=e}function t$16(e){var t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}factory=function(){var e,t;e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(void 0,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();var n=1,r=function(e,t){var i=t.pixelRatio,n=t.version,r=t.stretchX,o=t.stretchY,a=t.content;this.paddedRect=e,this.pixelRatio=i,this.stretchX=r,this.stretchY=o,this.content=a,this.version=n},o={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};o.tl.get=function(){return[this.paddedRect.x+n,this.paddedRect.y+n]},o.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-n,this.paddedRect.y+this.paddedRect.h-n]},o.tlbr.get=function(){return this.tl.concat(this.br)},o.displaySize.get=function(){return[(this.paddedRect.w-2*n)/this.pixelRatio,(this.paddedRect.h-2*n)/this.pixelRatio]},Object.defineProperties(r.prototype,o);var a,s=(a=!0,function(e,t){var i=a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return a=!1,i}),l=s(void 0,(function(){return l.toString().search("(((.+)+)+)+$").toString().constructor(l).search("(((.+)+)+)+$")}));l();var u=function(e,t){c(this,e,4,t)};function c(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function h(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=c({},{width:n,height:r},i);d(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function d(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)return console.log("out of range source coordinates for image copy"),t;if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)return console.log("out of range destination coordinates for image copy"),t;for(var a=e.data,s=t.data,l=0;l=0;d--){var f=a[d];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var p=a.pop();d255?255:e}function C(e){return e<0?0:e>1?1:e}function S(e){return"%"===e[e.length-1]?T(parseFloat(e)/100*255):T(parseInt(e))}function w(e){return"%"===e[e.length-1]?C(parseFloat(e)/100):C(parseFloat(e))}function E(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function P(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in b)return b[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===i.length){var o=i.substr(0,n),a=i.substr(n+1,r-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=w(a.pop());case"rgb":return 3!==a.length?null:[S(a[0]),S(a[1]),S(a[2]),s];case"hsla":if(4!==a.length)return null;s=w(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=w(a[1]),c=w(a[2]),h=c<=.5?c*(u+1):c+u-c*u,d=2*c-h;return[T(255*E(d,h,l+1/3)),T(255*E(d,h,l)),T(255*E(d,h,l-1/3)),s];default:return null}}return null}const A=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),L=A(void 0,(function(){return L.toString().search("(((.+)+)+)+$").toString().constructor(L).search("(((.+)+)+)+$")}));L();class M{constructor(e,t,i,n=1){this.r=e,this.g=t,this.b=i,this.a=n}static parse(e){if(!e)return;if(e instanceof M)return e;if("string"!=typeof e)return;const t=P(e);return t?new M(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,i,n]=this.toArray();return"rgba("+Math.round(e)+","+Math.round(t)+","+Math.round(i)+","+n+")"}toArray(){const{r:e,g:t,b:i,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*i/n,n]}}M.black=new M(0,0,0,1),M.white=new M(1,1,1,1),M.transparent=new M(0,0,0,0),M.red=new M(1,0,0,1);var R={kind:"null"},I={kind:"number"},O={kind:"string"},D={kind:"boolean"},B={kind:"color"},N={kind:"object"},F={kind:"value"},U={kind:"formatted"},z={kind:"resolvedImage"};function G(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));return r(),{kind:"array",itemType:e,N:t}}function V(e){if("array"===e.kind){var t=V(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var k=[R,I,O,D,B,U,N,G(F),z];function W(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!W(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var i=0,n=k;i=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,i,n]:[e,t,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."},$e.isValue=function(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof M)return!0;if(e instanceof Y)return!0;if(e instanceof ie)return!0;if(e instanceof ae)return!0;if(Array.isArray(e)){for(var t=0,i=e;t2){var s=e[1];if("string"!=typeof s||!(s in Me)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=Me[s],n++}else o=Ae;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}i=Le(o,a)}else i=Me[r];for(var l=[];n1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var Ie,Oe=(Ie=!0,function(e,t){var i=Ie?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ie=!1,i}),De=Oe(void 0,(function(){return De.toString().search("(((.+)+)+)+$").toString().constructor(De).search("(((.+)+)+)+$")}));De();var Be={kind:"number"},Ne={kind:"value"};function Fe(e,t){return{kind:"array",itemType:e,N:t}}var Ue=function(e,t,i){this.type=e,this.index=t,this.input=i};Ue.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,Be),n=t.parse(e[2],2,Fe(t.expectedType||Ne));if(!i||!n)return null;var r=n.type;return new Ue(r.itemType,i,n)},Ue.prototype.evaluate=function(e){var t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new RuntimeError("Array index out of bounds: "+t+" < 0.");if(t>=i.length)throw new RuntimeError("Array index out of bounds: "+t+" > "+(i.length-1)+".");if(t!==Math.floor(t))throw new RuntimeError("Array index must be an integer, but found "+t+" instead.");return i[t]},Ue.prototype.eachChild=function(e){e(this.index),e(this.input)},Ue.prototype.possibleOutputs=function(){return[void 0]},Ue.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ze,Ge=(ze=!0,function(e,t){var i=ze?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ze=!1,i}),Ve=Ge(void 0,(function(){return Ve.toString().search("(((.+)+)+)+$").toString().constructor(Ve).search("(((.+)+)+)+$")}));Ve();var ke={kind:"boolean"},We=function(e,t,i){this.type=e,this.branches=t,this.otherwise=i};We.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var i;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(var n=[],r=1;r4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":validateRGBA(t[0],t[1],t[2],t[3])))return new M(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new RuntimeError(i||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;si}function $t(e,t,i){return t<=i}function bt(e,t,i){return t>=i}function Tt(e,t,i,n){return 0===n.compare(t,i)}function Ct(e,t,i,n){return!Tt(0,t,i,n)}function St(e,t,i,n){return n.compare(t,i)<0}function wt(e,t,i,n){return n.compare(t,i)>0}function Et(e,t,i,n){return n.compare(t,i)<=0}function Pt(e,t,i,n){return n.compare(t,i)>=0}function At(e,t,i){var n,r=(n=!0,function(e,t){var i=n?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}),o="=="!==e&&"!="!==e;return function(){var n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function a(e,t,i){this.type=ft,this.lhs=e,this.rhs=t,this.collator=i,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return n(),a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var i=e[0],n=t.parse(e[1],1,pt);if(!n)return null;if(!mt(i,n.type))return t.concat(1).error('"'+i+"\" comparisons are not supported for type '"+toString(n.type)+"'.");var r=t.parse(e[2],2,pt);if(!r)return null;if(!mt(i,r.type))return t.concat(2).error('"'+i+"\" comparisons are not supported for type '"+toString(r.type)+"'.");if(n.type.kind!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot compare types '"+toString(n.type)+"' and '"+toString(r.type)+"'.");o&&("value"===n.type.kind&&"value"!==r.type.kind?n=new Re(r.type,[n]):"value"!==n.type.kind&&"value"===r.type.kind&&(r=new Re(n.type,[r])));var s=null;if(4===e.length){if("string"!==n.type.kind&&"string"!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,_t)))return null}return new a(n,r,s)},a.prototype.evaluate=function(n){var r=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(o&&this.hasUntypedArgument){var s=$e.typeOf(r),l=$e.typeOf(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new RuntimeError('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!o&&this.hasUntypedArgument){var u=$e.typeOf(r),c=$e.typeOf(a);if("string"!==u.kind||"string"!==c.kind)return t(n,r,a)}return this.collator?i(n,r,a,this.collator.evaluate(n)):t(n,r,a)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.possibleOutputs=function(){return[!0,!1]},a.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},a}()}var Lt={};Lt.Equals=At("==",gt,Tt),Lt.NotEquals=At("!=",xt,Ct),Lt.LessThan=At("<",vt,St),Lt.GreaterThan=At(">",yt,wt),Lt.LessThanOrEqual=At("<=",$t,Et),Lt.GreaterThanOrEqual=At(">=",bt,Pt);var Mt,Rt=(Mt=!0,function(e,t){var i=Mt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Mt=!1,i}),It=Rt(void 0,(function(){return It.toString().search("(((.+)+)+)+$").toString().constructor(It).search("(((.+)+)+)+$")}));It();var Ot={kind:"number"},Dt={kind:"string"},Bt={kind:"color"},Nt={kind:"value"},Ft={kind:"formatted"},Ut={kind:"resolvedImage"};function zt(e,t){return{kind:"array",itemType:e,N:t}}var Gt=function(e){this.type=Ft,this.sections=e};Gt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[1];if(!Array.isArray(i)&&"object"==typeof i)return t.error("First argument must be an image or text section.");for(var n=[],r=!1,o=1;o<=e.length-1;++o){var a=e[o];if(r&&"object"==typeof a&&!Array.isArray(a)){r=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,Ot)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,zt(Dt))))return null;var u=null;if(a["text-color"]&&!(u=t.parse(a["text-color"],1,Bt)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var h=t.parse(e[o],1,Nt);if(!h)return null;var d=h.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new Gt(n)},Gt.prototype.evaluate=function(e){return new ie(this.sections.map((function(t){var i=t.content.evaluate(e);return $e.typeOf(i)===Ut?new J("",i,null,null,null):new J($e.toString$1(i),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},Gt.prototype.eachChild=function(e){for(var t=0,i=this.sections;t-1&&(i=!0),new ae({name:t,available:i})},jt.prototype.eachChild=function(e){e(this.input)},jt.prototype.possibleOutputs=function(){return[void 0]},jt.prototype.serialize=function(){return["image",this.input.serialize()]};var Yt,Xt=(Yt=!0,function(e,t){var i=Yt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Yt=!1,i}),Kt=Xt(void 0,(function(){return Kt.toString().search("(((.+)+)+)+$").toString().constructor(Kt).search("(((.+)+)+)+$")}));Kt();var Qt=function(e,t,i,n,r){this.type=e,this.operator=t,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=r;o1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(r=t.parse(r,2,Zt)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=Jt:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var _=t.parse(d,p,u);if(!_)return null;u=u||_.type,l.push([h,_])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new Qt(u,i,n,r,l):t.error("Type "+toString(u)+" is not interpolatable.")},Qt.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;if(n>=t[r-1])return i[r-1].evaluate(e);var o=findStopLessThanOrEqualTo(t,n),a=t[o],s=t[o+1],l=Qt.interpolationFactor(this.interpolation,n,a,s),u=i[o].evaluate(e),c=i[o+1].evaluate(e);return"interpolate"===this.operator?interpolate[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?hcl.reverse(hcl.interpolate(hcl.forward(u),hcl.forward(c),l)):lab.reverse(lab.interpolate(lab.forward(u),lab.forward(c),l))},Qt.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t=0},ui.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},ui.prototype.possibleOutputs=function(){return[!0,!1]},ui.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var ci,hi=(ci=!0,function(e,t){var i=ci?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ci=!1,i}),di=hi(void 0,(function(){return di.toString().search("(((.+)+)+)+$").toString().constructor(di).search("(((.+)+)+)+$")}));di();var fi=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};fi.prototype.evaluate=function(e){return this.result.evaluate(e)},fi.prototype.eachChild=function(e){for(var t=0,i=this.bindings;tNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,$e.typeOf(d)))return null}else i=$e.typeOf(d);if(void 0!==r[String(d)])return u.error("Branch labels must be unique.");r[String(d)]=o.length}var f=t.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var p=t.parse(e[1],1,wi);if(!p)return null;var _=t.parse(e[e.length-1],e.length-1,n);return _?"value"!==p.type.kind&&t.concat(1).checkSubtype(i,p.type)?null:new Ei(i,n,p,r,o,_):null},Ei.prototype.evaluate=function(e){var t=this.input.evaluate(e);return($e.typeOf(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},Ei.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},Ei.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},Ei.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],i=[],n={},r=0,o=Object.keys(this.cases).sort();rt))throw new RuntimeError("Input is not a number.");a=s-1}return 0}Bi();var Fi,Ui=(Fi=!0,function(e,t){var i=Fi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Fi=!1,i}),zi=Ui(void 0,(function(){return zi.toString().search("(((.+)+)+)+$").toString().constructor(zi).search("(((.+)+)+)+$")}));zi();var Gi={kind:"number"},Vi=function(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,r=i;n=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,r);if(!c)return null;r=r||c.type,n.push([a,c])}return new Vi(r,i,n)},Vi.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;return n>=t[r-1]?i[r-1].evaluate(e):i[Ni(t,n)].evaluate(e)},Vi.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var ki,Wi=(ki=!0,function(e,t){var i=ki?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ki=!1,i}),Hi=Wi(void 0,(function(){return Hi.toString().search("(((.+)+)+)+$").toString().constructor(Hi).search("(((.+)+)+)+$")}));Hi();var qi=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};qi.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var i=e[1];return t.scope.has(i)?new qi(i,t.scope.get(i)):t.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},qi.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},qi.prototype.eachChild=function(){},qi.prototype.possibleOutputs=function(){return[void 0]},qi.prototype.serialize=function(){return["var",this.name]};var ji,Yi=(ji=!0,function(e,t){var i=ji?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ji=!1,i}),Xi=Yi(void 0,(function(){return Xi.toString().search("(((.+)+)+)+$").toString().constructor(Xi).search("(((.+)+)+)+$")}));Xi();var Ki,Qi={"==":Lt.Equals,"!=":Lt.NotEquals,">":Lt.GreaterThan,"<":Lt.LessThan,">=":Lt.GreaterThanOrEqual,"<=":Lt.LessThanOrEqual,array:Re,at:Ue,boolean:Re,case:We,coalesce:Xe,collator:dt,format:Gt,image:jt,in:ui,interpolate:Qt,"interpolate-hcl":Qt,"interpolate-lab":Qt,length:xi,let:fi,literal:bi,match:Ei,number:Re,"number-format":Ii,object:Re,step:Vi,string:Re,"to-boolean":ot,"to-color":ot,"to-number":ot,"to-string":ot,var:qi},Zi=(Ki=!0,function(e,t){var i=Ki?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ki=!1,i}),Ji=Zi(void 0,(function(){return Ji.toString().search("(((.+)+)+)+$").toString().constructor(Ji).search("(((.+)+)+)+$")}));function en(){}Ji();var tn={};for(var nn in en.register=function(e,t,i){void 0===i&&(i={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),tn[e]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}},en.register("Object",Object),en.register("Color",M),en.register("Error",Error),en.register("ResolvedImage",ae),en.register("ImageAtlas",x),en.register("ImagePosition",r),en.register("RGBAImage",u),en.register("Formatted",ie),en.register("FormattedSection",J),Qi)Qi[nn]._classRegistryKey||en.register("Expression_"+nn,Qi[nn]);function rn(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}en.serialize=function(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(rn(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var i=e;return t&&t.push(i.buffer),i}if(e instanceof ImageData)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var n=[],r=0,o=e;r=0)){var h=e[c];"function"!=typeof h&&(u[c]=tn[l].shallow.indexOf(c)>=0?h:en.serialize(h,t))}e instanceof Error&&(u.message=e.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof e)},en.deserialize=function(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||rn(e)||ArrayBuffer.isView(e)||e instanceof ImageData)return e;if(Array.isArray(e))return e.map(en.deserialize);if("object"==typeof e){var t=e.$name||"Object",i=tn[t].klass;if(!i)throw new Error("can't deserialize unregistered class "+t);if(i.deserialize)return i.deserialize(e);for(var n=Object.create(i.prototype),r=0,o=Object.keys(e);r=0?s:en.deserialize(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)};var on,an=(on=!0,function(e,t){var i=on?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return on=!1,i}),sn=an(void 0,(function(){return sn.toString().search("(((.+)+)+)+$").toString().constructor(sn).search("(((.+)+)+)+$")}));function ln(e){this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}sn(),ln.prototype.trigger=function(){!this._triggered&&(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))};const un=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),cn=un(void 0,(function(){return cn.toString().search("(((.+)+)+)+$").toString().constructor(cn).search("(((.+)+)+)+$")}));function hn(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function dn(e,t,i){this.target=e,this.parent=t,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},hn(["receive","process"],this),this.invoker=new ln(this.process),this.target.addEventListener("message",this.receive,!1)}cn(),dn.prototype.send=function(e,t,i,n){const r=++dn.taskId;i&&(this.callbacks[r]=i);const o=[];return this.target.postMessage({id:r,type:e,hasCallback:!!i,targetMapId:n,sourceMapId:this.mapId,data:en.serialize(t,o)},o),{cancel:()=>{i&&delete this.callbacks[r],this.target.postMessage({id:r,type:"",targetMapId:n,sourceMapId:this.mapId})}}},dn.prototype.receive=function(e){const t=e.data,i=t.id;if(i&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[i];const e=this.cancelCallbacks[i];delete this.cancelCallbacks[i],e&&e()}else this.tasks[i]=t,this.taskQueue.push(i),this.invoker.trigger()},dn.prototype.process=function(){if(!this.taskQueue.length)return;const e=this.taskQueue.shift(),t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t)if(""===t.type){const i=this.callbacks[e];delete this.callbacks[e],i&&(t.error?i(en.deserialize(t.error)):i(null,en.deserialize(t.data)))}else{let i=!1;const n=t.hasCallback?(t,n)=>{i=!0,delete this.cancelCallbacks[e];const r=[];this.target.postMessage({id:e,type:"",sourceMapId:this.mapId,error:t?en.serialize(t):null,data:en.serialize(n,r)},r)}:e=>{i=!0};let r=null;const o=en.deserialize(t.data);if(this.parent[t.type])r=this.parent[t.type](t.sourceMapId,o,n);else if(this.parent.getWorkerSource){const e=t.type.split(".");r=this.parent.getWorkerSource(t.sourceMapId,e[0],o.source)[e[1]](o,n)}else n(new Error("Could not find function "+t.type));!i&&r&&r.cancel&&(this.cancelCallbacks[e]=r.cancel)}},dn.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},dn.taskId=0;var fn,pn=(fn=!0,function(e,t){var i=fn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return fn=!1,i}),_n=pn(void 0,(function(){return _n.toString().search("(((.+)+)+)+$").toString().constructor(_n).search("(((.+)+)+)+$")}));_n();var mn=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var i=0,n=t;i=0)return!1;var i=!0;return e.eachChild((function(e){i&&!wn.isGlobalPropertyConstant(e,t)&&(i=!1)})),i};var En,Pn=(En=!0,function(e,t){var i=En?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return En=!1,i}),An=Pn(void 0,(function(){return An.toString().search("(((.+)+)+)+$").toString().constructor(An).search("(((.+)+)+)+$")}));An();var Ln=function(e,t,i,n,r){void 0===t&&(t=[]),void 0===n&&(n=new mn),void 0===r&&(r=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=r,this.expectedType=i};function Mn(e,t){const i=t[e];return void 0===i?null:i}Ln.prototype.parse=function(e,t,i,n,r){return void 0===r&&(r={}),t?this.concat(t,i,n)._parse(e,r):this._parse(e,r)},Ln.prototype._parse=function(e,t){function i(e,t,i){return"assert"===i?new Re(t,[e]):"coerce"===i?new ot(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var o=r.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=i(o,a,t.typeAnnotation||"coerce");else o=i(o,a,t.typeAnnotation||"assert")}return!(o instanceof bi)&&o.type.kind,o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},Ln.prototype.concat=function(e,t,i){var n="number"==typeof e?this.path.concat(e):this.path,r=i?this.scope.concat(i):this.scope;return new Ln(this.registry,n,t||null,r,this.errors)},Ln.prototype.error=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new xn(n,e))},Ln.prototype.checkSubtype=function(e,t){var i=W(e,t);return i&&this.error(i),i};var Rn=function(e,t,i,n){this.name=e,this.type=t,this._evaluate=i,this.args=n};function In(e){return Array.isArray(e)?"("+e.map(toString).join(", ")+")":"("+toString(e.type)+"...)"}Rn.prototype.evaluate=function(e,t){return this._evaluate(e,this.args,t)},Rn.prototype.eachChild=function(e){this.args.forEach(e)},Rn.prototype.possibleOutputs=function(){return[void 0]},Rn.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},Rn.parse=function(e,t){var i,n=e[0],r=Rn.definitions[n];if(!r)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=a.filter((function(t){var i=t[0];return!Array.isArray(i)||i.length===e.length-1})),l=null,u=0,c=s;u-1))}],"filter-type-==":[Bn,[Dn],function(e,t){var i=t[0];return e.geometryType()===i.value}],"filter-<":[Bn,[Dn,Un],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n":[Bn,[Dn,Un],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>r}],"filter-id->":[Bn,[Un],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[Bn,[Dn,Un],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<=r}],"filter-id-<=":[Bn,[Un],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[Bn,[Dn,Un],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>=r}],"filter-id->=":[Bn,[Un],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[Bn,[Un],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[Bn,[],function(e){return null!==e.id()}],"filter-type-in":[Bn,[Vn(Dn)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[Bn,[Vn(Un)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[Bn,[Dn,Vn(Un)],function(e,t){var i=t[0];return t[1].value.indexOf(e.properties()[i.value])>=0}],"filter-in-large":[Bn,[Dn,Vn(Un)],function(e,t){var i=t[0],n=t[1];return binarySearch(e.properties()[i.value],n.value,0,n.value.length-1)}],all:{type:Bn,overloads:[[[Bn,Bn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)&&n.evaluate(e)}],[kn(Bn),function(e,t){for(var i=0,n=t;i-1}function ir(e){return!!e.expression&&e.expression.interpolated}Jn();var nr,rr=(nr=!0,function(e,t){var i=nr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return nr=!1,i}),or=rr(void 0,(function(){return or.toString().search("(((.+)+)+)+$").toString().constructor(or).search("(((.+)+)+)+$")}));function ar(){}function sr(e){return{result:"success",value:e}}function lr(e){return{result:"error",value:e}}or(),ar.isExpression=function(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in Qi};var ur={kind:"number"},cr={kind:"string"},hr={kind:"boolean"},dr={kind:"color"},fr={kind:"value"},pr={kind:"formatted"},_r={kind:"resolvedImage"};function mr(e,t){return{kind:"array",itemType:e,N:t}}function gr(e){var t=null;if(e instanceof fi)t=gr(e.result);else if(e instanceof Xe){for(var i of e.args)if(t=gr(i))break}else(e instanceof Vi||e instanceof Qt)&&e.input instanceof Ln.CompoundExpression&&"zoom"===e.input.name&&(t=e);return t instanceof xn||e.eachChild((e=>{var i=gr(e);i instanceof xn?t=i:!t&&i?t=new xn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new xn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function xr(e){var t={color:dr,string:cr,number:ur,enum:cr,boolean:hr,formatted:pr,resolvedImage:_r};return"array"===e.type?mr(t[e.value]||fr,e.length):t[e.type]}function vr(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function yr(e){return e}function $r(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n=e.stops[r-1][0])return e.stops[r-1][1];var o=Ni(e.stops.map((e=>e[0])),i),a=Lr(i,n,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],u=interpolate[t.type]||yr;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=colorSpaces[e.colorSpace];u=(e,t)=>c.reverse(c.interpolate(c.forward(e),c.forward(t),a))}return"function"==typeof s.evaluate?{evaluate(...e){var t=s.evaluate.apply(void 0,e),i=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==i)return u(t,i,a)}}:u(s,l,a)}function Tr(e,t,i){return"color"===t.type?i=M.parse(i):"formatted"===t.type?i=Formatted.fromString(i.toString()):"resolvedImage"===t.type?i=ResolvedImage.fromString(i.toString()):Rr(i)!==t.type&&("enum"!==t.type||!t.values[i])&&(i=void 0),Ar(i,e.default,t.default)}function Cr(e,t){var i=new Ln(Qi,[],t?xr(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?sr(new Yn(n,t)):lr(i.errors)}function Sr(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!wn.isStateConstant(t.expression)}function wr(e,t,i,n){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent="camera"!==e&&!wn.isStateConstant(t.expression),this.interpolationType=n}function Er(e,t){if("error"===(e=Cr(e,t)).result)return e;var i=e.value.expression,n=wn.isFeatureConstant(i);if(!n&&!er(t))return lr([new xn("","data expressions not supported")]);var r=wn.isGlobalPropertyConstant(i,["zoom"]);if(!r&&!tr(t))return lr([new xn("","zoom expressions not supported")]);var o=gr(i);if(!o&&!r)return lr([new xn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof xn)return lr([o]);if(o instanceof Qt&&!ir(t))return lr([new xn("",'"interpolate" expressions cannot be used with this property')]);if(!o)return sr(new Sr(n?"constant":"source",e.value));var a=o instanceof Qt?o.interpolation:void 0;return sr(new wr(n?"camera":"composite",e.value,o.labels,a))}function Pr(e,t){var i,n,r,o="color"===t.type,a=e.stops&&"object"==typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,u=e.type||(ir(t)?"exponential":"interval");if(o&&((e=$r({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],M.parse(e[1])]}))),e.default?e.default=M.parse(e.default):e.default=M.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!colorSpaces[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)i=br;else if("interval"===u)i=evaluateIntervalFunction;else if("categorical"===u){i=evaluateCategoricalFunction,n=Object.create(null);for(var c=0,h=e.stops;c=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&Array.isArray(e[2]);case"!in":case"!has":case"none":case"crossFields":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":case"like":case"!like":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,i=e.slice(1);tt?1:0}function Ur(e){if(!e)return!0;var t=e[0];return e.length<=1?"any"!==t:"=="===t?zr(e[1],e[2],"=="):"!="===t?Wr(zr(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?zr(e[1],e[2],t):"any"===t?Gr(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(Ur)):"crossFields"===t?["crossFields"].concat(e.slice(1).map(Ur)):"none"===t?["all"].concat(e.slice(1).map(Ur).map(Wr)):"in"===t?Vr(e[1],e.slice(2)):"!in"===t?Wr(Vr(e[1],e.slice(2))):"has"===t?kr(e[1]):"!has"===t?Wr(kr(e[1])):"like"===t?zr(e[1],e[2],"like"):"!like"!==t||Wr(zr(e[1],e[2],"like"))}function zr(e,t,i){switch(e){case"$type":return["filter-type-"+i,t];case"$id":return["filter-id-"+i,t];default:return["filter-"+i,e,t]}}function Gr(e){return["any"].concat(e.map(Ur))}function Vr(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(Fr)]]:["filter-in-small",e,["literal",t]]}}function kr(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Wr(e){return["!",e]}Br.createFilter=function(e){if(null==e)return function(){return!0};!Br.isExpressionFilter(e)&&(e=Ur(e));var t=ar.createExpression(e,Nr);if("error"===t.result)throw new Error(t.value.map((function(e){return e.key+": "+e.message})).join(", "));return function(e,i){return t.value.evaluate(e,i)}};var Hr,qr=(Hr=!0,function(e,t){var i=Hr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Hr=!1,i}),jr=qr(void 0,(function(){return jr.toString().search("(((.+)+)+)+$").toString().constructor(jr).search("(((.+)+)+)+$")}));jr();const Yr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Xr(e){var t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var i="[",n=0,r=e;ni?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=t):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*t}},en.register("EvaluationParameters",go);var xo,vo=(xo=!0,function(e,t){var i=xo?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return xo=!1,i}),yo=vo(void 0,(function(){return yo.toString().search("(((.+)+)+)+$").toString().constructor(yo).search("(((.+)+)+)+$")}));yo();var $o=8192;function bo(e,t,i){return Math.min(i,Math.max(t,e))}function To(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),{min:-1*Math.pow(2,e-1),max:Math.pow(2,e-1)-1}}var Co=To(15);function So(e){for(var t=$o/e.extent,i=e.loadGeometry(),n=0;nCo.max||a.yCo.max)&&(a.x=bo(a.x,Co.min,Co.max),a.y=bo(a.y,Co.min,Co.max))}return i}var wo,Eo=(wo=!0,function(e,t){var i=wo?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wo=!1,i}),Po=Eo(void 0,(function(){return Po.toString().search("(((.+)+)+)+$").toString().constructor(Po).search("(((.+)+)+)+$")}));Po();var Ao=function(e){void 0===e&&(e=[]),this.segments=e};Ao.prototype.prepareSegment=function(e,t,i,n){var r=this.segments[this.segments.length-1];return(!r||r.vertexLength+e>Ao.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==n)&&(r={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},void 0!==n&&(r.sortKey=n),this.segments.push(r)),r},Ao.prototype.get=function(){return this.segments},Ao.prototype.destroy=function(){for(var e=0,t=this.segments;ethis.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*Oo),Io),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&(0==t.length&&console.log("oldUint8Array.length == 0"),this.uint8.set(t))}},Do.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Bo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=i,e},t}(Do);Bo.prototype.bytesPerElement=4,en.register("StructArrayLayout2i4",Bo);var No=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=i,this.int16[o+2]=n,this.int16[o+3]=r,e},t}(Do);No.prototype.bytesPerElement=8,en.register("StructArrayLayout4i8",No);var Fo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(Do);Fo.prototype.bytesPerElement=12,en.register("StructArrayLayout2i4i12",Fo);var Uo=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},r.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},r.prototype.emplace=function(e,t,i,n,r,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.uint8[l+4]=n,this.uint8[l+5]=r,this.uint8[l+6]=o,this.uint8[l+7]=a,e},r}(Do);Uo.prototype.bytesPerElement=8,en.register("StructArrayLayout2i4ub8",Uo);var zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=i,this.uint16[u+2]=n,this.uint16[u+3]=r,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,e},t}(Do);zo.prototype.bytesPerElement=16,en.register("StructArrayLayout8ui16",zo);var Go=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.int16[f+0]=t,this.int16[f+1]=i,this.int16[f+2]=n,this.int16[f+3]=r,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=d,e},t}(Do);Go.prototype.bytesPerElement=24,en.register("StructArrayLayout4i4ui4i24",Go);var Vo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.float32[r+0]=t,this.float32[r+1]=i,this.float32[r+2]=n,e},t}(Do);Vo.prototype.bytesPerElement=12,en.register("StructArrayLayout3f12",Vo);var ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint32[i+0]=t,e},t}(Do);ko.prototype.bytesPerElement=4,en.register("StructArrayLayout1ul4",ko);var Wo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c){var h=this.length;return this.resize(h+1),this.emplace(h,e,t,i,n,r,o,a,s,l,u,c)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=12*e,f=6*e;return this.int16[d+0]=t,this.int16[d+1]=i,this.int16[d+2]=n,this.int16[d+3]=r,this.int16[d+4]=o,this.int16[d+5]=a,this.uint32[f+3]=s,this.uint16[d+8]=l,this.uint16[d+9]=u,this.int16[d+10]=c,this.int16[d+11]=h,e},t}(Do);Wo.prototype.bytesPerElement=24,en.register("StructArrayLayout6i1ul2ui2i24",Wo);var Ho=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(Do);Ho.prototype.bytesPerElement=12,en.register("StructArrayLayout2i2i2i12",Ho);var qo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=i,this.float32[a+1]=n,this.float32[a+2]=r,e},t}(Do);qo.prototype.bytesPerElement=12,en.register("StructArrayLayout2ub2f12",qo);var jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var g=this.length;return this.resize(g+1),this.emplace(g,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g){var x=24*e,v=12*e,y=48*e;return this.int16[x+0]=t,this.int16[x+1]=i,this.uint16[x+2]=n,this.uint16[x+3]=r,this.uint32[v+2]=o,this.uint32[v+3]=a,this.uint32[v+4]=s,this.uint16[x+10]=l,this.uint16[x+11]=u,this.uint16[x+12]=c,this.float32[v+7]=h,this.float32[v+8]=d,this.uint8[y+36]=f,this.uint8[y+37]=p,this.uint8[y+38]=_,this.uint32[v+10]=m,this.int16[x+22]=g,e},t}(Do);jo.prototype.bytesPerElement=48,en.register("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",jo);var Yo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S){var w=this.length;return this.resize(w+1),this.emplace(w,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S,w){var E=30*e,P=15*e;return this.int16[E+0]=t,this.int16[E+1]=i,this.int16[E+2]=n,this.int16[E+3]=r,this.int16[E+4]=o,this.int16[E+5]=a,this.int16[E+6]=s,this.int16[E+7]=l,this.uint16[E+8]=u,this.uint16[E+9]=c,this.uint16[E+10]=h,this.uint16[E+11]=d,this.uint16[E+12]=f,this.uint16[E+13]=p,this.uint16[E+14]=_,this.uint16[E+15]=m,this.uint16[E+16]=g,this.uint16[E+17]=x,this.uint16[E+18]=v,this.uint16[E+19]=y,this.uint16[E+20]=$,this.uint16[E+21]=b,this.uint32[P+11]=T,this.float32[P+12]=C,this.float32[P+13]=S,this.float32[P+14]=w,e},t}(Do);Yo.prototype.bytesPerElement=60,en.register("StructArrayLayout8i14ui1ul3f60",Yo);var Xo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.float32[i+0]=t,e},t}(Do);Xo.prototype.bytesPerElement=4,en.register("StructArrayLayout1f4",Xo);var Ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.int16[r+0]=t,this.int16[r+1]=i,this.int16[r+2]=n,e},t}(Do);Ko.prototype.bytesPerElement=6,en.register("StructArrayLayout3i6",Ko);var Qo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=2*e,o=4*e;return this.uint32[r+0]=t,this.uint16[o+2]=i,this.uint16[o+3]=n,e},t}(Do);Qo.prototype.bytesPerElement=8,en.register("StructArrayLayout1ul2ui8",Qo);var Zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.uint16[r+0]=t,this.uint16[r+1]=i,this.uint16[r+2]=n,e},t}(Do);Zo.prototype.bytesPerElement=6,en.register("StructArrayLayout3ui6",Zo);var Jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=i,e},t}(Do);Jo.prototype.bytesPerElement=4,en.register("StructArrayLayout2ui4",Jo);var ea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint16[i+0]=t,e},t}(Do);ea.prototype.bytesPerElement=2,en.register("StructArrayLayout1ui2",ea);var ta=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=i,e},t}(Do);ta.prototype.bytesPerElement=8,en.register("StructArrayLayout2f8",ta);var ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=i,this.float32[o+2]=n,this.float32[o+3]=r,e},t}(Do);ia.prototype.bytesPerElement=16,en.register("StructArrayLayout4f16",ia);var na=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.float32[s+0]=t,this.float32[s+1]=i,this.float32[s+2]=n,this.float32[s+3]=r,this.float32[s+4]=o,this.float32[s+5]=a,e},t}(Do);na.prototype.bytesPerElement=24,en.register("StructArrayLayout6f24",na);var ra=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.float32[u+0]=t,this.float32[u+1]=i,this.float32[u+2]=n,this.float32[u+3]=r,this.float32[u+4]=o,this.float32[u+5]=a,this.float32[u+6]=s,this.float32[u+7]=l,e},t}(Do);ra.prototype.bytesPerElement=32,en.register("StructArrayLayout8f32",ra);var oa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.float32[f+0]=t,this.float32[f+1]=i,this.float32[f+2]=n,this.float32[f+3]=r,this.float32[f+4]=o,this.float32[f+5]=a,this.float32[f+6]=s,this.float32[f+7]=l,this.float32[f+8]=u,this.float32[f+9]=c,this.float32[f+10]=h,this.float32[f+11]=d,e},t}(Do);oa.prototype.bytesPerElement=48,en.register("StructArrayLayout12f48",oa);var aa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return i.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.x1.get=function(){return this._structArray.int16[this._pos2+2]},i.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},i.y1.get=function(){return this._structArray.int16[this._pos2+3]},i.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},i.x2.get=function(){return this._structArray.int16[this._pos2+4]},i.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},i.y2.get=function(){return this._structArray.int16[this._pos2+5]},i.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.radius.get=function(){return this._structArray.int16[this._pos2+10]},i.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},i.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},i.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},i.anchorPoint.get=function(){return new pointGeometry(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,i),t}(Ro);aa.prototype.size=24;var sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new aa(this,e)},t}(Wo);en.register("CollisionBoxArray",sa);var la=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},i.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},i.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},i.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},i.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},i.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},i.segment.get=function(){return this._structArray.uint16[this._pos2+10]},i.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},i.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},i.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},i.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},i.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},i.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},i.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},i.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},i.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},i.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},i.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},i.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},i.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},i.associatedIconIndex.set=function(e){this._structArray.int16[this._pos2+22]=e},Object.defineProperties(t.prototype,i),t}(Ro);la.prototype.size=48;var ua=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new la(this,e)},t}(jo);en.register("PlacedSymbolArray",ua);var ca=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},i.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},i.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},i.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},i.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},i.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},i.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},i.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},i.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},i.placedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+6]=e},i.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},i.verticalPlacedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+7]=e},i.key.get=function(){return this._structArray.uint16[this._pos2+8]},i.key.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},i.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},i.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},i.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},i.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},i.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},i.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+14]=e},i.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},i.verticalIconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+15]=e},i.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},i.verticalIconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+16]=e},i.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},i.featureIndex.set=function(e){this._structArray.uint16[this._pos2+17]=e},i.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},i.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+18]=e},i.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},i.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+19]=e},i.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},i.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+20]=e},i.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},i.numVerticalIconVertices.set=function(e){this._structArray.uint16[this._pos2+21]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+11]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+11]=e},i.textBoxScale.get=function(){return this._structArray.float32[this._pos4+12]},i.textBoxScale.set=function(e){this._structArray.float32[this._pos4+12]=e},i.textOffset0.get=function(){return this._structArray.float32[this._pos4+13]},i.textOffset0.set=function(e){this._structArray.float32[this._pos4+13]=e},i.textOffset1.get=function(){return this._structArray.float32[this._pos4+14]},i.textOffset1.set=function(e){this._structArray.float32[this._pos4+14]=e},Object.defineProperties(t.prototype,i),t}(Ro);ca.prototype.size=60;var ha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ca(this,e)},t}(Yo);en.register("SymbolInstanceArray",ha);var da=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={offsetX:{configurable:!0}};return i.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},i.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,i),t}(Ro);da.prototype.size=4;var fa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new da(this,e)},t}(Xo);en.register("GlyphOffsetArray",fa);var pa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return i.x.get=function(){return this._structArray.int16[this._pos2+0]},i.x.set=function(e){this._structArray.int16[this._pos2+0]=e},i.y.get=function(){return this._structArray.int16[this._pos2+1]},i.y.set=function(e){this._structArray.int16[this._pos2+1]=e},i.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},i.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,i),t}(Ro);pa.prototype.size=6;var _a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new pa(this,e)},t}(Ko);en.register("SymbolLineVertexArray",_a);var ma=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,i),t}(Ro);ma.prototype.size=8;var ga=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ma(this,e)},t}(Qo);en.register("FeatureIndexArray",ga);var xa,va=(xa=!0,function(e,t){var i=xa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return xa=!1,i}),ya=va(void 0,(function(){return ya.toString().search("(((.+)+)+)+$").toString().constructor(ya).search("(((.+)+)+)+$")}));ya();var $a=function(e,t,i){this.property=e,this.value=t,this.parameters=i};$a.prototype.isConstant=function(){return"constant"===this.value.kind},$a.prototype.constantOr=function(e){return"constant"===this.value.kind?this.value.value:e},$a.prototype.evaluate=function(e,t,i){return this.property.evaluate(this.value,this.parameters,e,t,i)};var ba={},Ta=function(e,t){this.gl=e.gl,this.location=t};ba.Uniform1i=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},t}(Ta),ba.Uniform1f=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(Ta),ba.Uniform2f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(Ta),ba.Uniform3f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(Ta),ba.Uniform4f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},t}(Ta),ba.UniformColor=function(e){function t(t,i){e.call(this,t,i),this.current=M.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(Ta);var Ca=new Float32Array(16);function Sa(e,t){return e??t}function wa(e){return null!=e}function Ea(e){var t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}ba.UniformMatrix4f=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,t,i),this.current=Ca}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.set=function(e){this.gl.uniformMatrix4fv(this.location,!1,e)},r}(Ta),Sa.EMPTY_OBJECT=Object.freeze({}),wa(Object.create)&&(Ea.prototype=Object.create(Error.prototype),Ea.prototype.constructor=Ea),Ea.prototype.toString=function(){var e=this.name+": "+this.message;return wa(this.stack)&&(e+="\n"+this.stack.toString()),e},Ea.throwInstantiationError=function(){throw new Ea("This function defines an interface and should not be called directly.")};const Pa={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047};var Aa=Object.freeze(Pa),La={BYTE:Aa.BYTE,UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,SHORT:Aa.SHORT,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,INT:Aa.INT,UNSIGNED_INT:Aa.UNSIGNED_INT,FLOAT:Aa.FLOAT,DOUBLE:Aa.DOUBLE,getSizeInBytes:function(e){if(!wa(e))throw new Ea("value is required.");switch(e){case La.BYTE:return Int8Array.BYTES_PER_ELEMENT;case La.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case La.SHORT:return Int16Array.BYTES_PER_ELEMENT;case La.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case La.INT:return Int32Array.BYTES_PER_ELEMENT;case La.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case La.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case La.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new Ea("componentDatatype is not a valid value.")}},fromTypedArray:function(e){return e instanceof Int8Array?La.BYTE:e instanceof Uint8Array?La.UNSIGNED_BYTE:e instanceof Int16Array?La.SHORT:e instanceof Uint16Array?La.UNSIGNED_SHORT:e instanceof Int32Array?La.INT:e instanceof Uint32Array?La.UNSIGNED_INT:e instanceof Float32Array?La.FLOAT:e instanceof Float64Array?La.DOUBLE:void 0},validate:function(e){return wa(e)&&(e===La.BYTE||e===La.UNSIGNED_BYTE||e===La.SHORT||e===La.UNSIGNED_SHORT||e===La.INT||e===La.UNSIGNED_INT||e===La.FLOAT||e===La.DOUBLE)},createTypedArray:function(e,t){if(!wa(e))throw new Ea("componentDatatype is required.");if(!wa(t))throw new Ea("valuesOrLength is required.");switch(e){case La.BYTE:return new Int8Array(t);case La.UNSIGNED_BYTE:return new Uint8Array(t);case La.SHORT:return new Int16Array(t);case La.UNSIGNED_SHORT:return new Uint16Array(t);case La.INT:return new Int32Array(t);case La.UNSIGNED_INT:return new Uint32Array(t);case La.FLOAT:return new Float32Array(t);case La.DOUBLE:return new Float64Array(t);default:throw new Ea("componentDatatype is not a valid value.")}},createArrayBufferView:function(e,t,i,n){if(!wa(e))throw new Ea("componentDatatype is required.");if(!wa(t))throw new Ea("buffer is required.");switch(i=Sa(i,0),n=Sa(n,(t.byteLength-i)/La.getSizeInBytes(e)),e){case La.BYTE:return new Int8Array(t,i,n);case La.UNSIGNED_BYTE:return new Uint8Array(t,i,n);case La.SHORT:return new Int16Array(t,i,n);case La.UNSIGNED_SHORT:return new Uint16Array(t,i,n);case La.INT:return new Int32Array(t,i,n);case La.UNSIGNED_INT:return new Uint32Array(t,i,n);case La.FLOAT:return new Float32Array(t,i,n);case La.DOUBLE:return new Float64Array(t,i,n);default:throw new Ea("componentDatatype is not a valid value.")}},fromName:function(e){switch(e){case"BYTE":return La.BYTE;case"UNSIGNED_BYTE":return La.UNSIGNED_BYTE;case"SHORT":return La.SHORT;case"UNSIGNED_SHORT":return La.UNSIGNED_SHORT;case"INT":return La.INT;case"UNSIGNED_INT":return La.UNSIGNED_INT;case"FLOAT":return La.FLOAT;case"DOUBLE":return La.DOUBLE;default:throw new Ea("name is not a valid value.")}}},Ma=Object.freeze(La),Ra=function(e){null==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};Ra.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti>>30,this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0},Ra.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i>>1^t[1&e];for(;i>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},Ra.prototype.random=function(){return this.genrand_int32()*(1/4294967296)};var Ia={};function Oa(e){return e+" is required, actual value was undefined"}function Da(e,t,i){return"Expected "+i+" to be typeof "+t+", actual typeof was "+e}Ia.typeOf={},Ia.defined=function(e,t){if(!wa(t))throw new Ea(Oa(e))},Ia.typeOf.func=function(e,t){if("function"!=typeof t)throw new Ea(Da(typeof t,"function",e))},Ia.typeOf.string=function(e,t){if("string"!=typeof t)throw new Ea(Da(typeof t,"string",e))},Ia.typeOf.number=function(e,t){if("number"!=typeof t)throw new Ea(Da(typeof t,"number",e))},Ia.typeOf.number.lessThan=function(e,t,i){if(Ia.typeOf.number(e,t),t>=i)throw new Ea("Expected "+e+" to be less than "+i+", actual value was "+t)},Ia.typeOf.number.lessThanOrEquals=function(e,t,i){if(Ia.typeOf.number(e,t),t>i)throw new Ea("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},Ia.typeOf.number.greaterThan=function(e,t,i){if(Ia.typeOf.number(e,t),t<=i)throw new Ea("Expected "+e+" to be greater than "+i+", actual value was "+t)},Ia.typeOf.number.greaterThanOrEquals=function(e,t,i){if(Ia.typeOf.number(e,t),t0?1:-1})),Ba.signNotZero=function(e){return e<0?-1:1},Ba.toSNorm=function(e,t){return t=Sa(t,255),Math.round((.5*Ba.clamp(e,-1,1)+.5)*t)},Ba.fromSNorm=function(e,t){return t=Sa(t,255),Ba.clamp(e,0,t)/t*2-1},Ba.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:Ba.clamp((e-t)/i,0,1)},Ba.sinh=Sa(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),Ba.cosh=Sa(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),Ba.lerp=function(e,t,i){return(1-i)*e+i*t},Ba.PI=Math.PI,Ba.ONE_OVER_PI=1/Math.PI,Ba.PI_OVER_TWO=Math.PI/2,Ba.PI_OVER_THREE=Math.PI/3,Ba.PI_OVER_FOUR=Math.PI/4,Ba.PI_OVER_SIX=Math.PI/6,Ba.THREE_PI_OVER_TWO=3*Math.PI/2,Ba.TWO_PI=2*Math.PI,Ba.ONE_OVER_TWO_PI=1/(2*Math.PI),Ba.RADIANS_PER_DEGREE=Math.PI/180,Ba.DEGREES_PER_RADIAN=180/Math.PI,Ba.RADIANS_PER_ARCSECOND=Ba.RADIANS_PER_DEGREE/3600,Ba.toRadians=function(e){if(!wa(e))throw new Ea("degrees is required.");return e*Ba.RADIANS_PER_DEGREE},Ba.toDegrees=function(e){if(!wa(e))throw new Ea("radians is required.");return e*Ba.DEGREES_PER_RADIAN},Ba.convertLongitudeRange=function(e){if(!wa(e))throw new Ea("angle is required.");var t=Ba.TWO_PI,i=e-Math.floor(e/t)*t;return i<-Math.PI?i+t:i>=Math.PI?i-t:i},Ba.clampToLatitudeRange=function(e){if(!wa(e))throw new Ea("angle is required.");return Ba.clamp(e,-1*Ba.PI_OVER_TWO,Ba.PI_OVER_TWO)},Ba.negativePiToPi=function(e){if(!wa(e))throw new Ea("angle is required.");return Ba.zeroToTwoPi(e+Ba.PI)-Ba.PI},Ba.zeroToTwoPi=function(e){if(!wa(e))throw new Ea("angle is required.");var t=Ba.mod(e,Ba.TWO_PI);return Math.abs(t)Ba.EPSILON14?Ba.TWO_PI:t},Ba.mod=function(e,t){if(!wa(e))throw new Ea("m is required.");if(!wa(t))throw new Ea("n is required.");return(e%t+t)%t},Ba.equalsEpsilon=function(e,t,i,n){if(!wa(e))throw new Ea("left is required.");if(!wa(t))throw new Ea("right is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");n=Sa(n,i);var r=Math.abs(e-t);return r<=n||r<=i*Math.max(Math.abs(e),Math.abs(t))},Ba.lessThan=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t<-i},Ba.lessThanOrEquals=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-ti},Ba.greaterThanOrEquals=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t>-i};var Na=[1];Ba.factorial=function(e){if("number"!=typeof e||e<0)throw new Ea("A number greater than or equal to 0 is required.");var t=Na.length;if(e>=t)for(var i=Na[t-1],n=t;n<=e;n++){var r=i*n;Na.push(r),i=r}return Na[e]},Ba.incrementWrap=function(e,t,i){if(i=Sa(i,0),!wa(e))throw new Ea("n is required.");if(t<=i)throw new Ea("maximumValue must be greater than minimumValue.");return++e>t&&(e=i),e},Ba.isPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new Ea("A number greater than or equal to 0 is required.");return 0!==e&&0==(e&e-1)},Ba.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new Ea("A number greater than or equal to 0 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},Ba.clamp=function(e,t,i){if(!wa(e))throw new Ea("value is required");if(!wa(t))throw new Ea("min is required.");if(!wa(i))throw new Ea("max is required.");return ei?i:e};var Fa=new Ra;Ba.setRandomNumberSeed=function(e){if(!wa(e))throw new Ea("seed is required.");Fa=new Ra(e)},Ba.nextRandomNumber=function(){return Fa.random()},Ba.randomBetween=function(e,t){return Ba.nextRandomNumber()*(t-e)+e},Ba.acosClamped=function(e){if(!wa(e))throw new Ea("value is required.");return Math.acos(Ba.clamp(e,-1,1))},Ba.asinClamped=function(e){if(!wa(e))throw new Ea("value is required.");return Math.asin(Ba.clamp(e,-1,1))},Ba.chordLength=function(e,t){if(!wa(e))throw new Ea("angle is required.");if(!wa(t))throw new Ea("radius is required.");return 2*t*Math.sin(.5*e)},Ba.logBase=function(e,t){if(!wa(e))throw new Ea("number is required.");if(!wa(t))throw new Ea("base is required.");return Math.log(e)/Math.log(t)},Ba.cbrt=Sa(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t})),Ba.log2=Sa(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),Ba.fog=function(e,t){var i=e*t;return 1-Math.exp(-i*i)},Ba.fastApproximateAtan=function(e){return Ia.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},Ba.fastApproximateAtan2=function(e,t){Ia.typeOf.number("x",e),Ia.typeOf.number("y",t);var i,n,r=Math.abs(e);i=Math.abs(t),n=Math.max(r,i);var o=(i=Math.min(r,i))/n;if(isNaN(o))throw new Ea("either x or y must be nonzero");return r=Ba.fastApproximateAtan(o),r=Math.abs(t)>Math.abs(e)?Ba.PI_OVER_TWO-r:r,r=e<0?Ba.PI-r:r,r=t<0?-r:r};var Ua={UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,UNSIGNED_INT:Aa.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case Ua.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Ua.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Ua.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new Ea("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return Ua.UNSIGNED_SHORT;case 4:return Ua.UNSIGNED_INT;case 1:return Ua.UNSIGNED_BYTE;default:throw new Ea("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return wa(e)&&(e===Ua.UNSIGNED_BYTE||e===Ua.UNSIGNED_SHORT||e===Ua.UNSIGNED_INT)},createTypedArray:function(e,t){if(!wa(e))throw new Ea("numberOfVertices is required.");return e>=Ba.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,i,n){if(!wa(e))throw new Ea("numberOfVertices is required.");if(!wa(t))throw new Ea("sourceArray is required.");if(!wa(i))throw new Ea("byteOffset is required.");return e>=Ba.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,i,n):new Uint16Array(t,i,n)}},za=Object.freeze(Ua),Ga={STREAM_DRAW:Aa.STREAM_DRAW,STATIC_DRAW:Aa.STATIC_DRAW,DYNAMIC_DRAW:Aa.DYNAMIC_DRAW,validate:function(e){return e===Ga.STREAM_DRAW||e===Ga.STATIC_DRAW||e===Ga.DYNAMIC_DRAW}};function Va(){return!0}function ka(e,t){function i(){throw new Ea(t)}for(var n in t=Sa(t,"This object was destroyed, i.e., destroy() was called."),e)"function"==typeof e[n]&&(e[n]=i);e.isDestroyed=Va}function Wa(e){if(e=Sa(e,Sa.EMPTY_OBJECT),Ia.defined("options.context",e.context),!wa(e.typedArray)&&!wa(e.sizeInBytes))throw new Ea("Either options.sizeInBytes or options.typedArray is required.");if(wa(e.typedArray)&&wa(e.sizeInBytes))throw new Ea("Cannot pass in both options.sizeInBytes and options.typedArray.");if(wa(e.typedArray)&&(Ia.typeOf.object("options.typedArray",e.typedArray),Ia.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!Ga.validate(e.usage))throw new Ea("usage is invalid.");var t=e.context._gl,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=wa(n);a&&(r=n.byteLength),Ia.typeOf.number.greaterThan("sizeInBytes",r,0);var s=t.createBuffer();t.bindBuffer(i,s),t.bufferData(i,a?n:r,o),t.bindBuffer(i,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this._buffer=s,this.context=e.context,e.context.memorySize+=r}Object.defineProperties(Wa.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),Wa.prototype._getBuffer=function(){return this._buffer},Wa.prototype.copyFromArrayView=function(e,t){t=Sa(t,0),Ia.defined("arrayView",e),Ia.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);var i=this._gl,n=this._bufferTarget;i.bindBuffer(n,this._buffer),i.bufferSubData(n,t,e),i.bindBuffer(n,null)},Wa.prototype.copyFromBuffer=function(e,t,i,n){if(!this._webgl2)throw new Ea("A WebGL 2 context is required.");if(!wa(e))throw new Ea("readBuffer must be defined.");if(!wa(n)||n<=0)throw new Ea("sizeInBytes must be defined and be greater than zero.");if(!wa(t)||t<0||t+n>e._sizeInBytes)throw new Ea("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!wa(i)||i<0||i+n>this._sizeInBytes)throw new Ea("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(i>=t&&ii&&ta)throw new Ea("destinationOffset must be greater than zero and less than the arrayView length.");if(i+r>a)throw new Ea("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new Ea("sourceOffset must be greater than zero and less than the buffers size.");if(t+r*o>this._sizeInBytes)throw new Ea("sourceOffset + length must be less than the buffers size.");var s=this._gl,l=Aa.COPY_READ_BUFFER;s.bindBuffer(l,this._buffer),s.getBufferSubData(l,t,e,i,n),s.bindBuffer(l,null)},Wa.prototype.isDestroyed=function(){return!1},Wa.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),this.context.memorySize-=this.sizeInBytes,ka(this)};var Ha,qa=(Ha=!0,function(e,t){var i=Ha?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ha=!1,i}),ja=qa(void 0,(function(){return ja.toString().search("(((.+)+)+)+$").toString().constructor(ja).search("(((.+)+)+)+$")}));function Ya(){}ja(),Ya.ALPHA_DISABLE=0,Ya.ALPHA_ADD=1,Ya.ALPHA_COMBINE=2,Ya.ALPHA_SUBTRACT=3,Ya.ALPHA_MULTIPLY=4,Ya.ALPHA_MAXIMIZED=5,Ya.ALPHA_ONEONE=6,Ya.ALPHA_PREMULTIPLIED=7,Ya.ALPHA_PREMULTIPLIED_PORTERDUFF=8,Ya.ALPHA_INTERPOLATE=9,Ya.ALPHA_SCREENMODE=10,Ya.ALPHA_ONEONE_ONEONE=11,Ya.ALPHA_ALPHATOCOLOR=12,Ya.ALPHA_REVERSEONEMINUS=13,Ya.ALPHA_SRC_DSTONEMINUSSRCALPHA=14,Ya.ALPHA_ONEONE_ONEZERO=15,Ya.ALPHA_EXCLUSION=16,Ya.ALPHA_LAYER_ACCUMULATE=17,Ya.ALPHA_EQUATION_ADD=0,Ya.ALPHA_EQUATION_SUBSTRACT=1,Ya.ALPHA_EQUATION_REVERSE_SUBTRACT=2,Ya.ALPHA_EQUATION_MAX=3,Ya.ALPHA_EQUATION_MIN=4,Ya.ALPHA_EQUATION_DARKEN=5,Ya.DELAYLOADSTATE_NONE=0,Ya.DELAYLOADSTATE_LOADED=1,Ya.DELAYLOADSTATE_LOADING=2,Ya.DELAYLOADSTATE_NOTLOADED=4,Ya.NEVER=512,Ya.ALWAYS=519,Ya.LESS=513,Ya.EQUAL=514,Ya.LEQUAL=515,Ya.GREATER=516,Ya.GEQUAL=518,Ya.NOTEQUAL=517,Ya.KEEP=7680,Ya.ZERO=0,Ya.REPLACE=7681,Ya.INCR=7682,Ya.DECR=7683,Ya.INVERT=5386,Ya.INCR_WRAP=34055,Ya.DECR_WRAP=34056,Ya.FRONT=0,Ya.BACK=1,Ya.TEXTURE_CLAMP_ADDRESSMODE=0,Ya.TEXTURE_WRAP_ADDRESSMODE=1,Ya.TEXTURE_MIRROR_ADDRESSMODE=2,Ya.TEXTURE_CREATIONFLAG_STORAGE=1,Ya.TEXTUREFORMAT_ALPHA=0,Ya.TEXTUREFORMAT_LUMINANCE=1,Ya.TEXTUREFORMAT_LUMINANCE_ALPHA=2,Ya.TEXTUREFORMAT_RGB=4,Ya.TEXTUREFORMAT_RGBA=5,Ya.TEXTUREFORMAT_RED=6,Ya.TEXTUREFORMAT_R=6,Ya.TEXTUREFORMAT_RG=7,Ya.TEXTUREFORMAT_RED_INTEGER=8,Ya.TEXTUREFORMAT_R_INTEGER=8,Ya.TEXTUREFORMAT_RG_INTEGER=9,Ya.TEXTUREFORMAT_RGB_INTEGER=10,Ya.TEXTUREFORMAT_RGBA_INTEGER=11,Ya.TEXTUREFORMAT_BGRA=12,Ya.TEXTUREFORMAT_DEPTH24_STENCIL8=13,Ya.TEXTUREFORMAT_DEPTH32_FLOAT=14,Ya.TEXTUREFORMAT_DEPTH16=15,Ya.TEXTUREFORMAT_DEPTH24=16,Ya.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8=17,Ya.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8=18,Ya.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM=36492,Ya.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM=36493,Ya.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT=36495,Ya.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT=36494,Ya.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5=33779,Ya.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919,Ya.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3=33778,Ya.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918,Ya.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1=33777,Ya.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1=33776,Ya.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917,Ya.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT=35916,Ya.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4=37808,Ya.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840,Ya.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL=36196,Ya.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2=37492,Ya.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2=37493,Ya.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494,Ya.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495,Ya.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC=37496,Ya.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497,Ya.TEXTURETYPE_UNSIGNED_BYTE=0,Ya.TEXTURETYPE_UNSIGNED_INT=0,Ya.TEXTURETYPE_FLOAT=1,Ya.TEXTURETYPE_HALF_FLOAT=2,Ya.TEXTURETYPE_BYTE=3,Ya.TEXTURETYPE_SHORT=4,Ya.TEXTURETYPE_UNSIGNED_SHORT=5,Ya.TEXTURETYPE_INT=6,Ya.TEXTURETYPE_UNSIGNED_INTEGER=7,Ya.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,Ya.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,Ya.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,Ya.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,Ya.TEXTURETYPE_UNSIGNED_INT_24_8=12,Ya.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,Ya.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,Ya.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,Ya.TEXTURETYPE_UNDEFINED=16,Ya.TEXTURE_NEAREST_SAMPLINGMODE=1,Ya.TEXTURE_NEAREST_NEAREST=1,Ya.TEXTURE_BILINEAR_SAMPLINGMODE=2,Ya.TEXTURE_LINEAR_LINEAR=2,Ya.TEXTURE_TRILINEAR_SAMPLINGMODE=3,Ya.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,Ya.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,Ya.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,Ya.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,Ya.TEXTURE_NEAREST_LINEAR=7,Ya.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,Ya.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,Ya.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,Ya.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,Ya.TEXTURE_LINEAR_NEAREST=12,Ya.TEXTURE_EXPLICIT_MODE=0,Ya.TEXTURE_SPHERICAL_MODE=1,Ya.TEXTURE_PLANAR_MODE=2,Ya.TEXTURE_CUBIC_MODE=3,Ya.TEXTURE_PROJECTION_MODE=4,Ya.TEXTURE_SKYBOX_MODE=5,Ya.TEXTURE_INVCUBIC_MODE=6,Ya.TEXTURE_EQUIRECTANGULAR_MODE=7,Ya.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,Ya.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,Ya.TEXTURE_FILTERING_QUALITY_OFFLINE=4096,Ya.TEXTURE_FILTERING_QUALITY_HIGH=64,Ya.TEXTURE_FILTERING_QUALITY_MEDIUM=16,Ya.TEXTURE_FILTERING_QUALITY_LOW=8,Ya.SCALEMODE_FLOOR=1,Ya.SCALEMODE_NEAREST=2,Ya.SCALEMODE_CEILING=3,Ya.MATERIAL_TextureDirtyFlag=1,Ya.MATERIAL_LightDirtyFlag=2,Ya.MATERIAL_FresnelDirtyFlag=4,Ya.MATERIAL_AttributesDirtyFlag=8,Ya.MATERIAL_MiscDirtyFlag=16,Ya.MATERIAL_PrePassDirtyFlag=32,Ya.MATERIAL_AllDirtyFlag=63,Ya.MATERIAL_TriangleFillMode=0,Ya.MATERIAL_WireFrameFillMode=1,Ya.MATERIAL_PointFillMode=2,Ya.MATERIAL_PointListDrawMode=3,Ya.MATERIAL_LineListDrawMode=4,Ya.MATERIAL_LineLoopDrawMode=5,Ya.MATERIAL_LineStripDrawMode=6,Ya.MATERIAL_TriangleStripDrawMode=7,Ya.MATERIAL_TriangleFanDrawMode=8,Ya.MATERIAL_ClockWiseSideOrientation=0,Ya.MATERIAL_CounterClockWiseSideOrientation=1,Ya.ACTION_NothingTrigger=0,Ya.ACTION_OnPickTrigger=1,Ya.ACTION_OnLeftPickTrigger=2,Ya.ACTION_OnRightPickTrigger=3,Ya.ACTION_OnCenterPickTrigger=4,Ya.ACTION_OnPickDownTrigger=5,Ya.ACTION_OnDoublePickTrigger=6,Ya.ACTION_OnPickUpTrigger=7,Ya.ACTION_OnPickOutTrigger=16,Ya.ACTION_OnLongPressTrigger=8,Ya.ACTION_OnPointerOverTrigger=9,Ya.ACTION_OnPointerOutTrigger=10,Ya.ACTION_OnEveryFrameTrigger=11,Ya.ACTION_OnIntersectionEnterTrigger=12,Ya.ACTION_OnIntersectionExitTrigger=13,Ya.ACTION_OnKeyDownTrigger=14,Ya.ACTION_OnKeyUpTrigger=15,Ya.PARTICLES_BILLBOARDMODE_Y=2,Ya.PARTICLES_BILLBOARDMODE_ALL=7,Ya.PARTICLES_BILLBOARDMODE_STRETCHED=8,Ya.MESHES_CULLINGSTRATEGY_STANDARD=0,Ya.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,Ya.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=2,Ya.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=3,Ya.SCENELOADER_NO_LOGGING=0,Ya.SCENELOADER_MINIMAL_LOGGING=1,Ya.SCENELOADER_SUMMARY_LOGGING=2,Ya.SCENELOADER_DETAILED_LOGGING=3,Ya.PREPASS_IRRADIANCE_TEXTURE_TYPE=0,Ya.PREPASS_POSITION_TEXTURE_TYPE=1,Ya.PREPASS_VELOCITY_TEXTURE_TYPE=2,Ya.PREPASS_REFLECTIVITY_TEXTURE_TYPE=3,Ya.PREPASS_COLOR_TEXTURE_TYPE=4,Ya.PREPASS_DEPTH_TEXTURE_TYPE=5,Ya.PREPASS_NORMAL_TEXTURE_TYPE=6,Ya.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE=7,Ya.BUFFER_CREATIONFLAG_READ=1,Ya.BUFFER_CREATIONFLAG_WRITE=2,Ya.BUFFER_CREATIONFLAG_READWRITE=3,Ya.BUFFER_CREATIONFLAG_UNIFORM=4,Ya.BUFFER_CREATIONFLAG_VERTEX=8,Ya.BUFFER_CREATIONFLAG_INDEX=16,Ya.BUFFER_CREATIONFLAG_STORAGE=32,Ya.RENDERPASS_MAIN=0,Ya.INPUT_ALT_KEY=18,Ya.INPUT_CTRL_KEY=17,Ya.INPUT_META_KEY1=91,Ya.INPUT_META_KEY2=92,Ya.INPUT_META_KEY3=93,Ya.INPUT_SHIFT_KEY=16,Ya.SNAPSHOTRENDERING_STANDARD=0,Ya.SNAPSHOTRENDERING_FAST=1,Ya.PERSPECTIVE_CAMERA=0,Ya.ORTHOGRAPHIC_CAMERA=1,Ya.FOVMODE_VERTICAL_FIXED=0,Ya.FOVMODE_HORIZONTAL_FIXED=1,Ya.RIG_MODE_NONE=0,Ya.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,Ya.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,Ya.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,Ya.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,Ya.RIG_MODE_STEREOSCOPIC_INTERLACED=14,Ya.RIG_MODE_VR=20,Ya.RIG_MODE_WEBVR=21,Ya.RIG_MODE_CUSTOM=22,Ya.MAX_SUPPORTED_UV_SETS=6,Ya.GL_ALPHA_EQUATION_ADD=32774,Ya.GL_ALPHA_EQUATION_MIN=32775,Ya.GL_ALPHA_EQUATION_MAX=32776,Ya.GL_ALPHA_EQUATION_SUBTRACT=32778,Ya.GL_ALPHA_EQUATION_REVERSE_SUBTRACT=32779,Ya.GL_ALPHA_FUNCTION_SRC=768,Ya.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR=769,Ya.GL_ALPHA_FUNCTION_SRC_ALPHA=770,Ya.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA=771,Ya.GL_ALPHA_FUNCTION_DST_ALPHA=772,Ya.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA=773,Ya.GL_ALPHA_FUNCTION_DST_COLOR=774,Ya.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR=775,Ya.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED=776,Ya.GL_ALPHA_FUNCTION_CONSTANT_COLOR=32769,Ya.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR=32770,Ya.GL_ALPHA_FUNCTION_CONSTANT_ALPHA=32771,Ya.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA=32772,Ya.SnippetUrl="";var Xa,Ka=(Xa=!0,function(e,t){var i=Xa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Xa=!1,i}),Qa=Ka(void 0,(function(){return Qa.toString().search("(((.+)+)+)+$").toString().constructor(Qa).search("(((.+)+)+)+$")}));function Za(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=Za._Counter++}Qa(),Object.defineProperty(Za.prototype,"underlyingResource",{get:function(){return null},enumerable:!1,configurable:!0}),Za._Counter=0;var Ja,es=(Ja=!0,function(e,t){var i=Ja?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ja=!1,i}),ts=es(void 0,(function(){return ts.toString().search("(((.+)+)+)+$").toString().constructor(ts).search("(((.+)+)+)+$")}));function is(e,t,i,n,r,o,a,s){void 0===n&&(n=0),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),this._isAlreadyOwned=!1,e.getScene?this._engine=e.getScene().getEngine():this._engine=e,this._updatable=i,this._instanced=o,this._divisor=s||1,t instanceof Za?(this._data=null,this._buffer=t):(this._data=t,this._buffer=null),this.byteStride=a?n:n*Float32Array.BYTES_PER_ELEMENT,!r&&this.create()}function ns(e,t,i,n,r,o,a,s,l,u,c,h,d,f){if(void 0===c&&(c=!1),void 0===h&&(h=!1),void 0===d&&(d=1),void 0===f&&(f=!1),t instanceof is?(this._buffer=t,this._ownsBuffer=f):(this._buffer=new is(e,t,n,o,r,a,h),this._ownsBuffer=!0),this.uniqueId=ns._Counter++,this._kind=i,null==u){var p=this.getData();this.type=ns.FLOAT,p instanceof Int8Array?this.type=ns.BYTE:p instanceof Uint8Array?this.type=ns.UNSIGNED_BYTE:p instanceof Int16Array?this.type=ns.SHORT:p instanceof Uint16Array?this.type=ns.UNSIGNED_SHORT:p instanceof Int32Array?this.type=ns.INT:p instanceof Uint32Array&&(this.type=ns.UNSIGNED_INT)}else this.type=u;var _=ns.GetTypeByteLength(this.type);h?(this._size=l||(o?o/_:ns.DeduceStride(i)),this.byteStride=o||this._buffer.byteStride||this._size*_,this.byteOffset=s||0):(this._size=l||o||ns.DeduceStride(i),this.byteStride=o?o*_:this._buffer.byteStride||this._size*_,this.byteOffset=(s||0)*_),this.normalized=c,this._instanced=void 0!==a&&a,this._instanceDivisor=a?d:0,this._computeHashCode()}ts(),is.prototype.createVertexBuffer=function(e,t,i,n,r,o,a){void 0===o&&(o=!1);var s=o?t:t*Float32Array.BYTES_PER_ELEMENT,l=n?o?n:n*Float32Array.BYTES_PER_ELEMENT:this.byteStride;return new ns(this._engine,this,e,this._updatable,!0,l,void 0===r?this._instanced:r,s,i,void 0,void 0,!0,this._divisor||a)},is.prototype.isUpdatable=function(){return this._updatable},is.prototype.getData=function(){return this._data},is.prototype.getBuffer=function(){return this._buffer},is.prototype.getStrideSize=function(){return this.byteStride/Float32Array.BYTES_PER_ELEMENT},is.prototype.create=function(e){void 0===e&&(e=null),!e&&this._buffer||(e=e||this._data)&&(this._buffer?this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e),this._data=e):this._updatable?(this._buffer=this._engine.createDynamicVertexBuffer(e),this._data=e):this._buffer=this._engine.createVertexBuffer(e))},is.prototype._rebuild=function(){this._buffer=null,this.create(this._data)},is.prototype.update=function(e){this.create(e)},is.prototype.updateDirectly=function(e,t,i,n){void 0===n&&(n=!1),this._buffer&&this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e,n?t:t*Float32Array.BYTES_PER_ELEMENT,i?i*this.byteStride:void 0),this._data=0===t&&void 0===i?e:null)},is.prototype._increaseReferences=function(){this._buffer&&(this._isAlreadyOwned?this._buffer.references++:this._isAlreadyOwned=!0)},is.prototype.dispose=function(){this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null,this._data=null)},Object.defineProperty(ns.prototype,"instanceDivisor",{get:function(){return this._instanceDivisor},set:function(e){this._instanceDivisor=e,this._instanced=0!=e,this._computeHashCode()},enumerable:!1,configurable:!0}),ns.prototype._computeHashCode=function(){this.hashCode=(this.type-5120<<0)+((this.normalized?1:0)<<3)+(this._size<<4)+((this._instanced?1:0)<<6)+(this.byteStride<<12)},ns.prototype._rebuild=function(){this._buffer&&this._buffer._rebuild()},ns.prototype.getKind=function(){return this._kind},ns.prototype.isUpdatable=function(){return this._buffer.isUpdatable()},ns.prototype.getData=function(){return this._buffer.getData()},ns.prototype.getFloatData=function(e,t){var i=this.getData();if(!i)return null;var n=this.getSize()*ns.GetTypeByteLength(this.type),r=e*this.getSize();if(this.type!==ns.FLOAT||this.byteStride!==n){var o=new Float32Array(r);return this.forEach(r,(function(e,t){return o[t]=e})),o}if(!(i instanceof Array||i instanceof Float32Array)||0!==this.byteOffset||i.length!==r){if(i instanceof Array){var a=this.byteOffset/4;return i.slice(a,a+r)}if(i instanceof ArrayBuffer)return new Float32Array(i,this.byteOffset,r);if(a=i.byteOffset+this.byteOffset,t){var s=new Float32Array(r),l=new Float32Array(i.buffer,a,r);return s.set(l),s}var u=a%4;return u&&(a=Math.max(0,a-u)),new Float32Array(i.buffer,a,r)}return t?i.slice():i},ns.prototype.getBuffer=function(){return this._buffer.getBuffer()},ns.prototype.getStrideSize=function(){return this.byteStride/ns.GetTypeByteLength(this.type)},ns.prototype.getOffset=function(){return this.byteOffset/ns.GetTypeByteLength(this.type)},ns.prototype.getSize=function(e){return void 0===e&&(e=!1),e?this._size*ns.GetTypeByteLength(this.type):this._size},ns.prototype.getIsInstanced=function(){return this._instanced},ns.prototype.getInstanceDivisor=function(){return this._instanceDivisor},ns.prototype.create=function(e){this._buffer.create(e)},ns.prototype.update=function(e){this._buffer.update(e)},ns.prototype.updateDirectly=function(e,t,i){void 0===i&&(i=!1),this._buffer.updateDirectly(e,t,void 0,i)},ns.prototype.dispose=function(){this._ownsBuffer&&this._buffer.dispose()},ns.prototype.forEach=function(e,t){ns.ForEach(this._buffer.getData(),this.byteOffset,this.byteStride,this._size,this.type,e,this.normalized,t)},ns.DeduceStride=function(e){switch(e){case ns.UVKind:case ns.UV2Kind:case ns.UV3Kind:case ns.UV4Kind:case ns.UV5Kind:case ns.UV6Kind:return 2;case ns.NormalKind:case ns.PositionKind:return 3;case ns.ColorKind:case ns.MatricesIndicesKind:case ns.MatricesIndicesExtraKind:case ns.MatricesWeightsKind:case ns.MatricesWeightsExtraKind:case ns.TangentKind:return 4;default:throw new Error("Invalid kind '"+e+"'")}},ns.GetTypeByteLength=function(e){switch(e){case ns.BYTE:case ns.UNSIGNED_BYTE:return 1;case ns.SHORT:case ns.UNSIGNED_SHORT:return 2;case ns.INT:case ns.UNSIGNED_INT:case ns.FLOAT:return 4;default:throw new Error("Invalid type '".concat(e,"'"))}},ns.ForEach=function(e,t,i,n,r,o,a,s){if(e instanceof Array)for(var l=t/4,u=i/4,c=0;cBa.EPSILON12);return wa(r)?(r.x=o*b,r.y=a*T,r.z=s*C,r):new ms(o*b,a*T,s*C)}function Ps(e,t,i){this.longitude=Sa(e,0),this.latitude=Sa(t,0),this.height=Sa(i,0)}Ps.fromRadians=function(e,t,i,n){return Ia.typeOf.number("longitude",e),Ia.typeOf.number("latitude",t),i=Sa(i,0),wa(n)?(n.longitude=e,n.latitude=t,n.height=i,n):new Ps(e,t,i)},Ps.fromDegrees=function(e,t,i,n){return Ia.typeOf.number("longitude",e),Ia.typeOf.number("latitude",t),e=Ba.toRadians(e),t=Ba.toRadians(t),Ps.fromRadians(e,t,i,n)};var As=new ms,Ls=new ms,Ms=new ms,Rs=new ms(1/6378137,1/6378137,1/6356752.314245179),Is=new ms(1/40680631590769,1/40680631590769,1/40408299984661.445),Os=Ba.EPSILON1;function Ds(e,t,i,n){t=Sa(t,0),i=Sa(i,0),n=Sa(n,0),Ia.typeOf.number.greaterThanOrEquals("x",t,0),Ia.typeOf.number.greaterThanOrEquals("y",i,0),Ia.typeOf.number.greaterThanOrEquals("z",n,0),e._radii=new ms(t,i,n),e._radiiSquared=new ms(t*t,i*i,n*n),e._radiiToTheFourth=new ms(t*t*t*t,i*i*i*i,n*n*n*n),e._oneOverRadii=new ms(0===t?0:1/t,0===i?0:1/i,0===n?0:1/n),e._oneOverRadiiSquared=new ms(0===t?0:1/(t*t),0===i?0:1/(i*i),0===n?0:1/(n*n)),e._minimumRadius=Math.min(t,i,n),e._maximumRadius=Math.max(t,i,n),e._centerToleranceSquared=Ba.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function Bs(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,Ds(this,e,t,i)}Ps.fromCartesian=function(e,t,i){var n=wa(t)?t.oneOverRadii:Rs,r=wa(t)?t.oneOverRadiiSquared:Is,o=Es(e,n,r,wa(t)?t._centerToleranceSquared:Os,Ls);if(wa(o)){var a=ms.multiplyComponents(o,r,As);a=ms.normalize(a,a);var s=ms.subtract(e,o,Ms),l=Math.atan2(a.y,a.x),u=Math.asin(a.z),c=Ba.sign(ms.dot(s,e))*ms.magnitude(s);return wa(i)?(i.longitude=l,i.latitude=u,i.height=c,i):new Ps(l,u,c)}},Ps.toCartesian=function(e,t,i){return Ia.defined("cartographic",e),ms.fromRadians(e.longitude,e.latitude,e.height,t,i)},Ps.sphericalDistance=function(e,t,i,n){if(Ia.defined("longitudeA",e),Ia.defined("longitudeB",i),Ia.defined("latitudeA",t),Ia.defined("latitudeB",n),e===i&&t===n)return 0;var r=Ba.toRadians(t),o=Ba.toRadians(n),a=Ba.toRadians(e),s=Ba.toRadians(i),l=a*a+r*r,u=s*s+o*o,c=(l+u-((a-s)*(a-s)+(r-o)*(r-o)))/(2*Math.sqrt(l)*Math.sqrt(u));return c=Ba.clamp(c,-1,1),6378137*Math.acos(c)},Ps.clone=function(e,t){if(wa(e))return wa(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new Ps(e.longitude,e.latitude,e.height)},Ps.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},Ps.equalsEpsilon=function(e,t,i){return Ia.typeOf.number("epsilon",i),e===t||wa(e)&&wa(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},Ps.ZERO=Object.freeze(new Ps(0,0,0)),Ps.prototype.clone=function(e){return Ps.clone(this,e)},Ps.prototype.equals=function(e){return Ps.equals(this,e)},Ps.prototype.equalsEpsilon=function(e,t){return Ps.equalsEpsilon(this,e,t)},Ps.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},Object.defineProperties(Bs.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),Bs.clone=function(e,t){if(wa(e)){var i=e._radii;return wa(t)?(ms.clone(i,t._radii),ms.clone(e._radiiSquared,t._radiiSquared),ms.clone(e._radiiToTheFourth,t._radiiToTheFourth),ms.clone(e._oneOverRadii,t._oneOverRadii),ms.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new Bs(i.x,i.y,i.z)}},Bs.fromCartesian3=function(e,t){return wa(t)||(t=new Bs),wa(e)&&Ds(t,e.x,e.y,e.z),t},Bs.WGS84=Object.freeze(new Bs(6378137,6378137,6356752.314245179)),Bs.XIAN80=Object.freeze(new Bs(6378140,6378140,6356755.29)),Bs.CGCS2000=Object.freeze(new Bs(6378137,6378137,6356752.31)),Bs.UNIT_SPHERE=Object.freeze(new Bs(1,1,1)),Bs.MOON=Object.freeze(new Bs(Ba.LUNAR_RADIUS,Ba.LUNAR_RADIUS,Ba.LUNAR_RADIUS)),Bs.prototype.clone=function(e){return Bs.clone(this,e)},Bs.packedLength=ms.packedLength,Bs.pack=function(e,t,i){return Ia.typeOf.object("value",e),Ia.defined("array",t),i=Sa(i,0),ms.pack(e._radii,t,i),t},Bs.unpack=function(e,t,i){Ia.defined("array",e),t=Sa(t,0);var n=ms.unpack(e,t);return Bs.fromCartesian3(n,i)},Bs.prototype.geocentricSurfaceNormal=ms.normalize,Bs.prototype.geodeticSurfaceNormalCartographic=function(e,t){Ia.typeOf.object("cartographic",e);var i=e.longitude,n=e.latitude,r=Math.cos(n),o=r*Math.cos(i),a=r*Math.sin(i),s=Math.sin(n);return wa(t)||(t=new ms),t.x=o,t.y=a,t.z=s,ms.normalize(t,t)},Bs.prototype.geodeticSurfaceNormal=function(e,t){return wa(t)||(t=new ms),t=ms.multiplyComponents(e,this._oneOverRadiiSquared,t),ms.normalize(t,t)};var Ns=new ms,Fs=new ms;Bs.prototype.cartographicToCartesian=function(e,t){var i=Ns,n=Fs;this.geodeticSurfaceNormalCartographic(e,i),ms.multiplyComponents(this._radiiSquared,i,n);var r=Math.sqrt(ms.dot(i,n));return ms.divideByScalar(n,r,n),ms.multiplyByScalar(i,e.height,i),wa(t)||(t=new ms),ms.add(n,i,t)},Bs.prototype.cartographicArrayToCartesianArray=function(e,t){Ia.defined("cartographics",e);var i=e.length;wa(t)?t.length=i:t=new Array(i);for(var n=0;n=this._radii.z-t))return i},Object.defineProperties(Vs.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),Vs.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=e.latitude*i,o=e.height;return wa(t)?(t.x=n,t.y=r,t.z=o,t):new ms(n,r,o)},Vs.prototype.unproject=function(e,t){if(!wa(e))throw new Ea("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=e.y*i,o=e.z;return wa(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new Ps(n,r,o)};var ks={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Ws=Object.freeze(ks);function Hs(e,t,i,n){this.west=Sa(e,0),this.south=Sa(t,0),this.east=Sa(i,0),this.north=Sa(n,0)}Object.defineProperties(Hs.prototype,{width:{get:function(){return Hs.computeWidth(this)}},height:{get:function(){return Hs.computeHeight(this)}}}),Hs.packedLength=4,Hs.pack=function(e,t,i){return Ia.typeOf.object("value",e),Ia.defined("array",t),i=Sa(i,0),t[i++]=e.west,t[i++]=e.south,t[i++]=e.east,t[i]=e.north,t},Hs.unpack=function(e,t,i){return Ia.defined("array",e),t=Sa(t,0),wa(i)||(i=new Hs),i.west=e[t++],i.south=e[t++],i.east=e[t++],i.north=e[t],i},Hs.computeWidth=function(e){Ia.typeOf.object("rectangle",e);var t=e.east,i=e.west;return t=0?c.longitude:c.longitude+Ba.TWO_PI;r=Math.min(r,h),o=Math.max(o,h)}return n-i>o-r&&(i=r,(n=o)>Ba.PI&&(n-=Ba.TWO_PI),i>Ba.PI&&(i-=Ba.TWO_PI)),wa(t)?(t.west=i,t.south=a,t.east=n,t.north=s,t):new Hs(i,a,n,s)},Hs.fromCartesianArray=function(e,t,i){Ia.defined("cartesians",e),t=Sa(t,Bs.WGS84);for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0,c=e.length;u=0?h.longitude:h.longitude+Ba.TWO_PI;o=Math.min(o,d),a=Math.max(a,d)}return r-n>a-o&&(n=o,(r=a)>Ba.PI&&(r-=Ba.TWO_PI),n>Ba.PI&&(n-=Ba.TWO_PI)),wa(i)?(i.west=n,i.south=s,i.east=r,i.north=l,i):new Hs(n,s,r,l)},Hs.clone=function(e,t){if(wa(e))return wa(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new Hs(e.west,e.south,e.east,e.north)},Hs.equalsEpsilon=function(e,t,i){return Ia.typeOf.number("absoluteEpsilon",i),e===t||wa(e)&&wa(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},Hs.prototype.clone=function(e){return Hs.clone(this,e)},Hs.prototype.equals=function(e){return Hs.equals(this,e)},Hs.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},Hs.prototype.equalsEpsilon=function(e,t){return Ia.typeOf.number("epsilon",t),Hs.equalsEpsilon(this,e,t)},Hs.validate=function(e){Ia.typeOf.object("rectangle",e);var t=e.north;Ia.typeOf.number.greaterThanOrEquals("north",t,-Ba.PI_OVER_TWO),Ia.typeOf.number.lessThanOrEquals("north",t,Ba.PI_OVER_TWO);var i=e.south;Ia.typeOf.number.greaterThanOrEquals("south",i,-Ba.PI_OVER_TWO),Ia.typeOf.number.lessThanOrEquals("south",i,Ba.PI_OVER_TWO);var n=e.west;Ia.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),Ia.typeOf.number.lessThanOrEquals("west",n,Math.PI);var r=e.east;Ia.typeOf.number.greaterThanOrEquals("east",r,-Math.PI),Ia.typeOf.number.lessThanOrEquals("east",r,Math.PI)},Hs.southwest=function(e,t){return Ia.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new Ps(e.west,e.south)},Hs.northwest=function(e,t){return Ia.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new Ps(e.west,e.north)},Hs.northeast=function(e,t){return Ia.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new Ps(e.east,e.north)},Hs.southeast=function(e,t){return Ia.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new Ps(e.east,e.south)},Hs.center=function(e,t){Ia.typeOf.object("rectangle",e);var i=e.east,n=e.west;i0?n+=Ba.TWO_PI:o0&&(o+=Ba.TWO_PI),n=c))return wa(i)?(i.west=s,i.south=u,i.east=l,i.north=c,i):new Hs(s,u,l,c)}},Hs.simpleIntersection=function(e,t,i){Ia.typeOf.object("rectangle",e),Ia.typeOf.object("otherRectangle",t);var n=Math.max(e.west,t.west),r=Math.max(e.south,t.south),o=Math.min(e.east,t.east),a=Math.min(e.north,t.north);if(!(r>=a||n>=o))return wa(i)?(i.west=n,i.south=r,i.east=o,i.north=a,i):new Hs(n,r,o,a)},Hs.union=function(e,t,i){Ia.typeOf.object("rectangle",e),Ia.typeOf.object("otherRectangle",t),wa(i)||(i=new Hs);var n=e.east,r=e.west,o=t.east,a=t.west;n0?n+=Ba.TWO_PI:o0&&(o+=Ba.TWO_PI),nr||Ba.equalsEpsilon(i,r,Ba.EPSILON14))&&(i=e.south&&n<=e.north};var qs=new Ps;Hs.subsample=function(e,t,i,n){Ia.typeOf.object("rectangle",e),t=Sa(t,Bs.WGS84),i=Sa(i,0),wa(n)||(n=[]);var r=0,o=e.north,a=e.south,s=e.east,l=e.west,u=qs;u.height=i,u.longitude=l,u.latitude=o,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=a,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=o<0?o:a>0?a:0;for(var c=1;c<8;++c)u.longitude=-Math.PI+c*Ba.PI_OVER_TWO,Hs.contains(e,u)&&(n[r]=t.cartographicToCartesian(u,n[r]),r++);return 0===u.latitude&&(u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++),n.length=r,n};var js=new Ps;function Ys(e,t,i,n){this.x=Sa(e,0),this.y=Sa(t,0),this.width=Sa(i,0),this.height=Sa(n,0)}Hs.prototype.contains=function(e){return Hs.contains(this,Hs.southwest(e,js))&&Hs.contains(this,Hs.northwest(e,js))&&Hs.contains(this,Hs.southeast(e,js))&&Hs.contains(this,Hs.northeast(e,js))},Hs.MAX_VALUE=Object.freeze(new Hs(-Math.PI,-Ba.PI_OVER_TWO,Math.PI,Ba.PI_OVER_TWO)),Ys.packedLength=4,Ys.pack=function(e,t,i){return Ia.typeOf.object("value",e),Ia.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.width,t[i]=e.height,t},Ys.unpack=function(e,t,i){return Ia.defined("array",e),t=Sa(t,0),wa(i)||(i=new Ys),i.x=e[t++],i.y=e[t++],i.width=e[t++],i.height=e[t],i},Ys.fromPoints=function(e,t){if(wa(t)||(t=new Ys),!wa(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,n=e[0].x,r=e[0].y,o=e[0].x,a=e[0].y,s=1;si.width?i.width=n:n<0&&(i.width-=n,i.x=t.x),r>i.height?i.height=r:r<0&&(i.height-=r,i.y=t.y),i},Ys.intersect=function(e,t){Ia.typeOf.object("left",e),Ia.typeOf.object("right",t);var i=e.x,n=e.y,r=t.x,o=t.y;return i>r+t.width||i+e.widtho+t.height?Ws.OUTSIDE:Ws.INTERSECTING},Ys.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},Ys.prototype.clone=function(e){return Ys.clone(this,e)},Ys.prototype.intersect=function(e){return Ys.intersect(this,e)},Ys.prototype.equals=function(e){return Ys.equals(this,e)};var Zs,Js,el,tl,il,nl,rl,ol,al,sl,ll,ul,cl,hl,dl,fl,pl,_l,ml,gl,xl,vl,yl,$l,bl={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},Tl={};function Cl(e,t,i,n){return Sl(e).then(t,i,n)}function Sl(e){var t,i;return e instanceof El?t=e:Ml(e)?(i=Ll(),e.then((function(e){i.resolve(e)}),(function(e){i.reject(e)}),(function(e){i.progress(e)})),t=i.promise):t=Pl(e),t}function wl(e){return Cl(e,Al)}function El(e){this.then=e}function Pl(e){var t=new El((function(t){try{return Sl(t?t(e):e)}catch(e){return Al(e)}}));return t}function Al(e){var t=new El((function(t,i){try{return i?Sl(i(e)):Al(e)}catch(e){return Al(e)}}));return t}function Ll(){var e,t,i,n,r,o;return e=new El(a),t=[],i=[],n=function(e,n,r){var o,a;return o=Ll(),a="function"==typeof r?function(e){try{o.progress(r(e))}catch(e){o.progress(e)}}:function(e){o.progress(e)},t.push((function(t){t.then(e,n).then(o.resolve,o.reject,a)})),i.push(a),o.promise},r=function(e){return zl(i,e),e},o=function(e){return e=Sl(e),n=e.then,o=Sl,r=Vl,zl(t,e),i=t=tl,e},{then:a,resolve:s,reject:l,progress:u,promise:e,resolver:{resolve:s,reject:l,progress:u}};function a(e,t,i){return n(e,t,i)}function s(e){return o(e)}function l(e){return o(Al(e))}function u(e){return r(e)}}function Ml(e){return e&&"function"==typeof e.then}function Rl(e,t,i,n,r){return Gl(2,arguments),Cl(e,(function(e){var o,a,s,l,u,c,h,d,f,p;if(f=e.length>>>0,o=Math.max(0,Math.min(t,f)),s=[],a=f-o+1,l=[],u=Ll(),o)for(d=u.progress,h=function(e){l.push(e),--a||(c=h=Vl,u.reject(l))},c=function(e){s.push(e),--o||(c=h=Vl,u.resolve(s))},p=0;p>>0,h=e.length>>>0,r=[],o=[],u=(a=Ll()).progress,l=function(e){o.push(e),--h||(s=l=Vl,a.resolve(r))},s=function(e,t){r[t]=e,--h||(s=l=Vl,a.resolve(r))},d=0;d>>0,i=[],s=Ll(),r)for(o=function(e,n){Cl(e,t).then((function(e){i[n]=e,--r||s.resolve(i)}),s.reject)},a=0;a2;return Cl(e,(function(e){return e=n?i:e,t.resolve(e),e}),(function(e){return t.reject(e),Al(e)}),t.progress)}function zl(e,t){for(var i,n=0;i=e[n++];)i(t)}function Gl(e,t){for(var i,n=t.length;n>e;)if(null!=(i=t[--n])&&"function"!=typeof i)throw new Error("arg "+n+" must be a function")}function Vl(){}function kl(e){return e}function Wl(e){for(var t=e.split("."),i=0,n=t.length;i0&&e.height>0,$l.resolve(yl)},e.onerror=function(){yl=!1,$l.resolve(yl)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",$l.promise}function uu(){return wa($l)||lu(),yl}Object.defineProperties(Tl,{element:{get:function(){if(Tl.supportsFullscreen())return document[bl.fullscreenElement]}},changeEventName:{get:function(){if(Tl.supportsFullscreen())return bl.fullscreenchange}},errorEventName:{get:function(){if(Tl.supportsFullscreen())return bl.fullscreenerror}},enabled:{get:function(){if(Tl.supportsFullscreen())return document[bl.fullscreenEnabled]}},fullscreen:{get:function(){if(Tl.supportsFullscreen())return null!==Tl.element}}}),Tl.supportsFullscreen=function(){if(wa(Zs))return Zs;Zs=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return bl.requestFullscreen="requestFullscreen",bl.exitFullscreen="exitFullscreen",bl.fullscreenEnabled="fullscreenEnabled",bl.fullscreenElement="fullscreenElement",bl.fullscreenchange="fullscreenchange",bl.fullscreenerror="fullscreenerror",Zs=!0;for(var t,i=["webkit","moz","o","ms","khtml"],n=0,r=i.length;n>>0,(i=arguments).length<=1)for(;;){if(o in t){n=t[o++];break}if(++o>=r)throw new TypeError}else n=i[1];for(;o1&&(i-=1),6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function gu(e,t,i,n){this.red=Sa(e,1),this.green=Sa(t,1),this.blue=Sa(i,1),this.alpha=Sa(n,1)}pu.supportsFullscreen=function(){return Tl.supportsFullscreen()},pu.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},pu.supportsWebWorkers=function(){return typeof Worker<"u"},pu.supportsWebAssembly=function(){return typeof WebAssembly<"u"&&!pu.isEdge()},pu.supportsOffscreenCanvas=function(){return typeof OffscreenCanvas<"u"&&!pu.isEdge()},gu.fromCartesian4=function(e,t){return Ia.typeOf.object("cartesian",e),wa(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new gu(e.x,e.y,e.z,e.w)},gu.fromBytes=function(e,t,i,n,r){return e=gu.byteToFloat(Sa(e,255)),t=gu.byteToFloat(Sa(t,255)),i=gu.byteToFloat(Sa(i,255)),n=gu.byteToFloat(Sa(n,255)),wa(r)?(r.red=e,r.green=t,r.blue=i,r.alpha=n,r):new gu(e,t,i,n)},gu.fromAlpha=function(e,t,i){return Ia.typeOf.object("color",e),Ia.typeOf.number("alpha",t),wa(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=t,i):new gu(e.red,e.green,e.blue,t)},pu.supportsTypedArrays()&&(hu=new ArrayBuffer(4),du=new Uint32Array(hu),fu=new Uint8Array(hu)),gu.fromRgba=function(e,t){return du[0]=e,gu.fromBytes(fu[0],fu[1],fu[2],fu[3],t)},gu.byteToRgba=function(e,t,i,n){return fu[0]=e,fu[1]=t,fu[2]=i,fu[3]=n,du[0]},gu.fromHsl=function(e,t,i,n,r){e=Sa(e,0)%1,t=Sa(t,0),i=Sa(i,0),n=Sa(n,1);var o=i,a=i,s=i;if(0!==t){var l,u=2*i-(l=i<.5?i*(1+t):i+t-i*t);o=mu(u,l,e+1/3),a=mu(u,l,e),s=mu(u,l,e-1/3)}return wa(r)?(r.red=o,r.green=a,r.blue=s,r.alpha=n,r):new gu(o,a,s,n)},gu.fromRandom=function(e,t){var i=(e=Sa(e,Sa.EMPTY_OBJECT)).red;if(!wa(i)){var n=Sa(e.minimumRed,0),r=Sa(e.maximumRed,1);Ia.typeOf.number.lessThanOrEquals("minimumRed",n,r),i=n+Ba.nextRandomNumber()*(r-n)}var o=e.green;if(!wa(o)){var a=Sa(e.minimumGreen,0),s=Sa(e.maximumGreen,1);Ia.typeOf.number.lessThanOrEquals("minimumGreen",a,s),o=a+Ba.nextRandomNumber()*(s-a)}var l=e.blue;if(!wa(l)){var u=Sa(e.minimumBlue,0),c=Sa(e.maximumBlue,1);Ia.typeOf.number.lessThanOrEquals("minimumBlue",u,c),l=u+Ba.nextRandomNumber()*(c-u)}var h=e.alpha;if(!wa(h)){var d=Sa(e.minimumAlpha,0),f=Sa(e.maximumAlpha,1);Ia.typeOf.number.lessThanOrEquals("minumumAlpha",d,f),h=d+Ba.nextRandomNumber()*(f-d)}return wa(t)?(t.red=i,t.green=o,t.blue=l,t.alpha=h,t):new gu(i,o,l,h)};var xu=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,vu=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,yu=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,$u=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;gu.fromCssColorString=function(e,t){Ia.typeOf.string("color",e),wa(t)||(t=new gu);var i=gu[e.toUpperCase()];if(wa(i))return gu.clone(i,t),t;var n=xu.exec(e);return null!==n?(t.red=parseInt(n[1],16)/15,t.green=parseInt(n[2],16)/15,t.blue=parseInt(n[3],16)/15,t.alpha=1,t):null!==(n=vu.exec(e))?(t.red=parseInt(n[1],16)/255,t.green=parseInt(n[2],16)/255,t.blue=parseInt(n[3],16)/255,t.alpha=1,t):null!==(n=yu.exec(e))?(t.red=parseFloat(n[1])/("%"===n[1].substr(-1)?100:255),t.green=parseFloat(n[2])/("%"===n[2].substr(-1)?100:255),t.blue=parseFloat(n[3])/("%"===n[3].substr(-1)?100:255),t.alpha=parseFloat(Sa(n[4],"1.0")),t):null!==(n=$u.exec(e))?gu.fromHsl(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(Sa(n[4],"1.0")),t):t=void 0},gu.packedLength=4,gu.pack=function(e,t,i){return Ia.typeOf.object("value",e),Ia.defined("array",t),i=Sa(i,0),t[i++]=e.red,t[i++]=e.green,t[i++]=e.blue,t[i]=e.alpha,t},gu.unpack=function(e,t,i){return Ia.defined("array",e),t=Sa(t,0),wa(i)||(i=new gu),i.red=e[t++],i.green=e[t++],i.blue=e[t++],i.alpha=e[t],i},gu.byteToFloat=function(e){return e/255},gu.floatToByte=function(e){return 1===e?255:256*e|0},gu.clone=function(e,t){if(wa(e))return wa(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new gu(e.red,e.green,e.blue,e.alpha)},gu.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},gu.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},gu.prototype.clone=function(e){return gu.clone(this,e)},gu.prototype.equals=function(e){return gu.equals(this,e)},gu.prototype.equalsEpsilon=function(e,t){return this===e||wa(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},gu.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},gu.prototype.toCssColorString=function(){var e=gu.floatToByte(this.red),t=gu.floatToByte(this.green),i=gu.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},gu.prototype.toBytes=function(e){var t=gu.floatToByte(this.red),i=gu.floatToByte(this.green),n=gu.floatToByte(this.blue),r=gu.floatToByte(this.alpha);return wa(e)?(e[0]=t,e[1]=i,e[2]=n,e[3]=r,e):[t,i,n,r]},gu.prototype.toRgba=function(){return fu[0]=gu.floatToByte(this.red),fu[1]=gu.floatToByte(this.green),fu[2]=gu.floatToByte(this.blue),fu[3]=gu.floatToByte(this.alpha),du[0]},gu.prototype.brighten=function(e,t){return Ia.typeOf.number("magnitude",e),Ia.typeOf.number.greaterThanOrEquals("magnitude",e,0),Ia.typeOf.object("result",t),e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},gu.prototype.darken=function(e,t){return Ia.typeOf.number("magnitude",e),Ia.typeOf.number.greaterThanOrEquals("magnitude",e,0),Ia.typeOf.object("result",t),e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},gu.prototype.withAlpha=function(e,t){return gu.fromAlpha(this,e,t)},gu.add=function(e,t,i){return Ia.typeOf.object("left",e),Ia.typeOf.object("right",t),Ia.typeOf.object("result",i),i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},gu.subtract=function(e,t,i){return Ia.typeOf.object("left",e),Ia.typeOf.object("right",t),Ia.typeOf.object("result",i),i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},gu.multiply=function(e,t,i){return Ia.typeOf.object("left",e),Ia.typeOf.object("right",t),Ia.typeOf.object("result",i),i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},gu.divide=function(e,t,i){return Ia.typeOf.object("left",e),Ia.typeOf.object("right",t),Ia.typeOf.object("result",i),i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},gu.mod=function(e,t,i){return Ia.typeOf.object("left",e),Ia.typeOf.object("right",t),Ia.typeOf.object("result",i),i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},gu.lerp=function(e,t,i,n){return Ia.typeOf.object("start",e),Ia.typeOf.object("end",t),Ia.typeOf.number("t",i),Ia.typeOf.object("result",n),n.red=Ba.lerp(e.red,t.red,i),n.green=Ba.lerp(e.green,t.green,i),n.blue=Ba.lerp(e.blue,t.blue,i),n.alpha=Ba.lerp(e.alpha,t.alpha,i),n},gu.multiplyByScalar=function(e,t,i){return Ia.typeOf.object("color",e),Ia.typeOf.number("scalar",t),Ia.typeOf.object("result",i),i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},gu.divideByScalar=function(e,t,i){return Ia.typeOf.object("color",e),Ia.typeOf.number("scalar",t),Ia.typeOf.object("result",i),i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},gu.ALICEBLUE=Object.freeze(gu.fromCssColorString("#F0F8FF")),gu.ANTIQUEWHITE=Object.freeze(gu.fromCssColorString("#FAEBD7")),gu.AQUA=Object.freeze(gu.fromCssColorString("#00FFFF")),gu.AQUAMARINE=Object.freeze(gu.fromCssColorString("#7FFFD4")),gu.AZURE=Object.freeze(gu.fromCssColorString("#F0FFFF")),gu.BEIGE=Object.freeze(gu.fromCssColorString("#F5F5DC")),gu.BISQUE=Object.freeze(gu.fromCssColorString("#FFE4C4")),gu.BLACK=Object.freeze(gu.fromCssColorString("#000000")),gu.BLANCHEDALMOND=Object.freeze(gu.fromCssColorString("#FFEBCD")),gu.BLUE=Object.freeze(gu.fromCssColorString("#0000FF")),gu.BLUEVIOLET=Object.freeze(gu.fromCssColorString("#8A2BE2")),gu.BROWN=Object.freeze(gu.fromCssColorString("#A52A2A")),gu.BURLYWOOD=Object.freeze(gu.fromCssColorString("#DEB887")),gu.CADETBLUE=Object.freeze(gu.fromCssColorString("#5F9EA0")),gu.CHARTREUSE=Object.freeze(gu.fromCssColorString("#7FFF00")),gu.CHOCOLATE=Object.freeze(gu.fromCssColorString("#D2691E")),gu.CORAL=Object.freeze(gu.fromCssColorString("#FF7F50")),gu.CORNFLOWERBLUE=Object.freeze(gu.fromCssColorString("#6495ED")),gu.CORNSILK=Object.freeze(gu.fromCssColorString("#FFF8DC")),gu.CRIMSON=Object.freeze(gu.fromCssColorString("#DC143C")),gu.CYAN=Object.freeze(gu.fromCssColorString("#00FFFF")),gu.DARKBLUE=Object.freeze(gu.fromCssColorString("#00008B")),gu.DARKCYAN=Object.freeze(gu.fromCssColorString("#008B8B")),gu.DARKGOLDENROD=Object.freeze(gu.fromCssColorString("#B8860B")),gu.DARKGRAY=Object.freeze(gu.fromCssColorString("#A9A9A9")),gu.DARKGREEN=Object.freeze(gu.fromCssColorString("#006400")),gu.DARKGREY=gu.DARKGRAY,gu.DARKKHAKI=Object.freeze(gu.fromCssColorString("#BDB76B")),gu.DARKMAGENTA=Object.freeze(gu.fromCssColorString("#8B008B")),gu.DARKOLIVEGREEN=Object.freeze(gu.fromCssColorString("#556B2F")),gu.DARKORANGE=Object.freeze(gu.fromCssColorString("#FF8C00")),gu.DARKORCHID=Object.freeze(gu.fromCssColorString("#9932CC")),gu.DARKRED=Object.freeze(gu.fromCssColorString("#8B0000")),gu.DARKSALMON=Object.freeze(gu.fromCssColorString("#E9967A")),gu.DARKSEAGREEN=Object.freeze(gu.fromCssColorString("#8FBC8F")),gu.DARKSLATEBLUE=Object.freeze(gu.fromCssColorString("#483D8B")),gu.DARKSLATEGRAY=Object.freeze(gu.fromCssColorString("#2F4F4F")),gu.DARKSLATEGREY=gu.DARKSLATEGRAY,gu.DARKTURQUOISE=Object.freeze(gu.fromCssColorString("#00CED1")),gu.DARKVIOLET=Object.freeze(gu.fromCssColorString("#9400D3")),gu.DEEPPINK=Object.freeze(gu.fromCssColorString("#FF1493")),gu.DEEPSKYBLUE=Object.freeze(gu.fromCssColorString("#00BFFF")),gu.DIMGRAY=Object.freeze(gu.fromCssColorString("#696969")),gu.DIMGREY=gu.DIMGRAY,gu.DODGERBLUE=Object.freeze(gu.fromCssColorString("#1E90FF")),gu.FIREBRICK=Object.freeze(gu.fromCssColorString("#B22222")),gu.FLORALWHITE=Object.freeze(gu.fromCssColorString("#FFFAF0")),gu.FORESTGREEN=Object.freeze(gu.fromCssColorString("#228B22")),gu.FUCHSIA=Object.freeze(gu.fromCssColorString("#FF00FF")),gu.GAINSBORO=Object.freeze(gu.fromCssColorString("#DCDCDC")),gu.GHOSTWHITE=Object.freeze(gu.fromCssColorString("#F8F8FF")),gu.GOLD=Object.freeze(gu.fromCssColorString("#FFD700")),gu.GOLDENROD=Object.freeze(gu.fromCssColorString("#DAA520")),gu.GRAY=Object.freeze(gu.fromCssColorString("#808080")),gu.GREEN=Object.freeze(gu.fromCssColorString("#008000")),gu.GREENYELLOW=Object.freeze(gu.fromCssColorString("#ADFF2F")),gu.GREY=gu.GRAY,gu.HONEYDEW=Object.freeze(gu.fromCssColorString("#F0FFF0")),gu.HOTPINK=Object.freeze(gu.fromCssColorString("#FF69B4")),gu.INDIANRED=Object.freeze(gu.fromCssColorString("#CD5C5C")),gu.INDIGO=Object.freeze(gu.fromCssColorString("#4B0082")),gu.IVORY=Object.freeze(gu.fromCssColorString("#FFFFF0")),gu.KHAKI=Object.freeze(gu.fromCssColorString("#F0E68C")),gu.LAVENDER=Object.freeze(gu.fromCssColorString("#E6E6FA")),gu.LAVENDAR_BLUSH=Object.freeze(gu.fromCssColorString("#FFF0F5")),gu.LAWNGREEN=Object.freeze(gu.fromCssColorString("#7CFC00")),gu.LEMONCHIFFON=Object.freeze(gu.fromCssColorString("#FFFACD")),gu.LIGHTBLUE=Object.freeze(gu.fromCssColorString("#ADD8E6")),gu.LIGHTCORAL=Object.freeze(gu.fromCssColorString("#F08080")),gu.LIGHTCYAN=Object.freeze(gu.fromCssColorString("#E0FFFF")),gu.LIGHTGOLDENRODYELLOW=Object.freeze(gu.fromCssColorString("#FAFAD2")),gu.LIGHTGRAY=Object.freeze(gu.fromCssColorString("#D3D3D3")),gu.LIGHTGREEN=Object.freeze(gu.fromCssColorString("#90EE90")),gu.LIGHTGREY=gu.LIGHTGRAY,gu.LIGHTPINK=Object.freeze(gu.fromCssColorString("#FFB6C1")),gu.LIGHTSEAGREEN=Object.freeze(gu.fromCssColorString("#20B2AA")),gu.LIGHTSKYBLUE=Object.freeze(gu.fromCssColorString("#87CEFA")),gu.LIGHTSLATEGRAY=Object.freeze(gu.fromCssColorString("#778899")),gu.LIGHTSLATEGREY=gu.LIGHTSLATEGRAY,gu.LIGHTSTEELBLUE=Object.freeze(gu.fromCssColorString("#B0C4DE")),gu.LIGHTYELLOW=Object.freeze(gu.fromCssColorString("#FFFFE0")),gu.LIME=Object.freeze(gu.fromCssColorString("#00FF00")),gu.LIMEGREEN=Object.freeze(gu.fromCssColorString("#32CD32")),gu.LINEN=Object.freeze(gu.fromCssColorString("#FAF0E6")),gu.MAGENTA=Object.freeze(gu.fromCssColorString("#FF00FF")),gu.MAROON=Object.freeze(gu.fromCssColorString("#800000")),gu.MEDIUMAQUAMARINE=Object.freeze(gu.fromCssColorString("#66CDAA")),gu.MEDIUMBLUE=Object.freeze(gu.fromCssColorString("#0000CD")),gu.MEDIUMORCHID=Object.freeze(gu.fromCssColorString("#BA55D3")),gu.MEDIUMPURPLE=Object.freeze(gu.fromCssColorString("#9370DB")),gu.MEDIUMSEAGREEN=Object.freeze(gu.fromCssColorString("#3CB371")),gu.MEDIUMSLATEBLUE=Object.freeze(gu.fromCssColorString("#7B68EE")),gu.MEDIUMSPRINGGREEN=Object.freeze(gu.fromCssColorString("#00FA9A")),gu.MEDIUMTURQUOISE=Object.freeze(gu.fromCssColorString("#48D1CC")),gu.MEDIUMVIOLETRED=Object.freeze(gu.fromCssColorString("#C71585")),gu.MIDNIGHTBLUE=Object.freeze(gu.fromCssColorString("#191970")),gu.MINTCREAM=Object.freeze(gu.fromCssColorString("#F5FFFA")),gu.MISTYROSE=Object.freeze(gu.fromCssColorString("#FFE4E1")),gu.MOCCASIN=Object.freeze(gu.fromCssColorString("#FFE4B5")),gu.NAVAJOWHITE=Object.freeze(gu.fromCssColorString("#FFDEAD")),gu.NAVY=Object.freeze(gu.fromCssColorString("#000080")),gu.OLDLACE=Object.freeze(gu.fromCssColorString("#FDF5E6")),gu.OLIVE=Object.freeze(gu.fromCssColorString("#808000")),gu.OLIVEDRAB=Object.freeze(gu.fromCssColorString("#6B8E23")),gu.ORANGE=Object.freeze(gu.fromCssColorString("#FFA500")),gu.ORANGERED=Object.freeze(gu.fromCssColorString("#FF4500")),gu.ORCHID=Object.freeze(gu.fromCssColorString("#DA70D6")),gu.PALEGOLDENROD=Object.freeze(gu.fromCssColorString("#EEE8AA")),gu.PALEGREEN=Object.freeze(gu.fromCssColorString("#98FB98")),gu.PALETURQUOISE=Object.freeze(gu.fromCssColorString("#AFEEEE")),gu.PALEVIOLETRED=Object.freeze(gu.fromCssColorString("#DB7093")),gu.PAPAYAWHIP=Object.freeze(gu.fromCssColorString("#FFEFD5")),gu.PEACHPUFF=Object.freeze(gu.fromCssColorString("#FFDAB9")),gu.PERU=Object.freeze(gu.fromCssColorString("#CD853F")),gu.PINK=Object.freeze(gu.fromCssColorString("#FFC0CB")),gu.PLUM=Object.freeze(gu.fromCssColorString("#DDA0DD")),gu.POWDERBLUE=Object.freeze(gu.fromCssColorString("#B0E0E6")),gu.PURPLE=Object.freeze(gu.fromCssColorString("#800080")),gu.RED=Object.freeze(gu.fromCssColorString("#FF0000")),gu.ROSYBROWN=Object.freeze(gu.fromCssColorString("#BC8F8F")),gu.ROYALBLUE=Object.freeze(gu.fromCssColorString("#4169E1")),gu.SADDLEBROWN=Object.freeze(gu.fromCssColorString("#8B4513")),gu.SALMON=Object.freeze(gu.fromCssColorString("#FA8072")),gu.SANDYBROWN=Object.freeze(gu.fromCssColorString("#F4A460")),gu.SEAGREEN=Object.freeze(gu.fromCssColorString("#2E8B57")),gu.SEASHELL=Object.freeze(gu.fromCssColorString("#FFF5EE")),gu.SIENNA=Object.freeze(gu.fromCssColorString("#A0522D")),gu.SILVER=Object.freeze(gu.fromCssColorString("#C0C0C0")),gu.SKYBLUE=Object.freeze(gu.fromCssColorString("#87CEEB")),gu.SLATEBLUE=Object.freeze(gu.fromCssColorString("#6A5ACD")),gu.SLATEGRAY=Object.freeze(gu.fromCssColorString("#708090")),gu.SLATEGREY=gu.SLATEGRAY,gu.SNOW=Object.freeze(gu.fromCssColorString("#FFFAFA")),gu.SPRINGGREEN=Object.freeze(gu.fromCssColorString("#00FF7F")),gu.STEELBLUE=Object.freeze(gu.fromCssColorString("#4682B4")),gu.TAN=Object.freeze(gu.fromCssColorString("#D2B48C")),gu.TEAL=Object.freeze(gu.fromCssColorString("#008080")),gu.THISTLE=Object.freeze(gu.fromCssColorString("#D8BFD8")),gu.TOMATO=Object.freeze(gu.fromCssColorString("#FF6347")),gu.TURQUOISE=Object.freeze(gu.fromCssColorString("#40E0D0")),gu.VIOLET=Object.freeze(gu.fromCssColorString("#EE82EE")),gu.WHEAT=Object.freeze(gu.fromCssColorString("#F5DEB3")),gu.WHITE=Object.freeze(gu.fromCssColorString("#FFFFFF")),gu.WHITESMOKE=Object.freeze(gu.fromCssColorString("#F5F5F5")),gu.YELLOW=Object.freeze(gu.fromCssColorString("#FFFF00")),gu.YELLOWGREEN=Object.freeze(gu.fromCssColorString("#9ACD32")),gu.TRANSPARENT=Object.freeze(new gu(0,0,0,0));var bu={CLOCKWISE:Aa.CW,COUNTER_CLOCKWISE:Aa.CCW,NONE:Aa.NONE,validate:function(e){return e===bu.CLOCKWISE||e===bu.COUNTER_CLOCKWISE}},Tu=Object.freeze(bu),Cu={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:10,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1,_uniformBufferOffsetAlignment:256,_maxUniformBufferBinding:36,_maxArrayTextureLayers:256};function Su(e){if("object"!=typeof e||null===e)return e;for(var t,i=Object.keys(e),n=0;nCu.maximumAliasedLineWidth)throw new Ea("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!Tu.validate(this.frontFace))throw new Ea("Invalid renderState.frontFace.");if(!Xu(this.cull.face))throw new Ea("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new Ea("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new Ea("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new Ea("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new Ea("renderState.depthRange.far must be less than or equal to one.");if(!Ku(this.depthTest.func))throw new Ea("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new Ea("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!ju(this.blending.equationRgb))throw new Ea("Invalid renderState.blending.equationRgb.");if(!ju(this.blending.equationAlpha))throw new Ea("Invalid renderState.blending.equationAlpha.");if(!Yu(this.blending.functionSourceRgb))throw new Ea("Invalid renderState.blending.functionSourceRgb.");if(!Yu(this.blending.functionSourceAlpha))throw new Ea("Invalid renderState.blending.functionSourceAlpha.");if(!Yu(this.blending.functionDestinationRgb))throw new Ea("Invalid renderState.blending.functionDestinationRgb.");if(!Yu(this.blending.functionDestinationAlpha))throw new Ea("Invalid renderState.blending.functionDestinationAlpha.");if(!Qu(this.stencilTest.frontFunction))throw new Ea("Invalid renderState.stencilTest.frontFunction.");if(!Qu(this.stencilTest.backFunction))throw new Ea("Invalid renderState.stencilTest.backFunction.");if(!Zu(this.stencilTest.frontOperation.fail))throw new Ea("Invalid renderState.stencilTest.frontOperation.fail.");if(!Zu(this.stencilTest.frontOperation.zFail))throw new Ea("Invalid renderState.stencilTest.frontOperation.zFail.");if(!Zu(this.stencilTest.frontOperation.zPass))throw new Ea("Invalid renderState.stencilTest.frontOperation.zPass.");if(!Zu(this.stencilTest.backOperation.fail))throw new Ea("Invalid renderState.stencilTest.backOperation.fail.");if(!Zu(this.stencilTest.backOperation.zFail))throw new Ea("Invalid renderState.stencilTest.backOperation.zFail.");if(!Zu(this.stencilTest.backOperation.zPass))throw new Ea("Invalid renderState.stencilTest.backOperation.zPass.");if(wa(this.viewport)){if(this.viewport.width<0)throw new Ea("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new Ea("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>Cu.maximumViewportWidth)throw new Ea("renderState.viewport.width must be less than or equal to the maximum viewport width ("+Cu.maximumViewportWidth.toString()+"). Check maximumViewportWidth.");if(this.viewport.height>Cu.maximumViewportHeight)throw new Ea("renderState.viewport.height must be less than or equal to the maximum viewport height ("+Cu.maximumViewportHeight.toString()+"). Check maximumViewportHeight.")}this.id=0,this._applyFunctions=[]}Wu.applyViewport=function(e,t,i,n,r){var o=Sa(t.viewport,i.viewport);wa(o)||((o=qu).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=o,e.viewport(o.x,o.y,o.width,o.height)};var ec=0,tc={};function ic(e,t,i){(e?Vu:Wu).applyFrontFace(t,i)}function nc(e,t,i){(e?Vu:Wu).applyCull(t,i)}function rc(e,t,i){(e?Vu:Wu).applyLineWidth(t,i)}function oc(e,t,i){(e?Vu:Wu).applyPolygonOffset(t,i)}function ac(e,t,i){(e?Vu:Wu).applyDepthRange(t,i)}function sc(e,t,i){(e?Vu:Wu).applyDepthTest(t,i)}function lc(e,t,i){(e?Vu:Wu).applyColorMask(t,i)}function uc(e,t,i){(e?Vu:Wu).applyDepthMask(t,i)}function cc(e,t,i){(e?Vu:Wu).applyStencilMask(t,i)}function hc(e,t,i){(e?Vu:Wu).applyStencilTest(t,i)}function dc(e,t,i){(e?Vu:Wu).applySampleCoverage(t,i)}function fc(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(ic),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&i.push(nc),e.lineWidth!==t.lineWidth&&i.push(rc),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&i.push(oc),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&i.push(ac),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&i.push(sc),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&i.push(lc),e.depthMask!==t.depthMask&&i.push(uc),e.stencilMask!==t.stencilMask&&i.push(cc),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&i.push(hc),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&i.push(dc),i}Ju.fromCache=function(e){var t=JSON.stringify(e),i=tc[t];if(wa(i))return++i.referenceCount,i.state;var n=new Ju(e),r=JSON.stringify(n);return wa(i=tc[r])||(n.id=ec++,i={referenceCount:0,state:n=Su(n)},tc[r]=i),++i.referenceCount,tc[t]={referenceCount:1,state:i.state},i.state},Ju.removeFromCache=function(e){var t=new Ju(e),i=JSON.stringify(t),n=tc[i],r=JSON.stringify(e),o=tc[r];wa(o)&&(--o.referenceCount,0===o.referenceCount&&(delete tc[r],wa(n)&&--n.referenceCount)),wa(n)&&0===n.referenceCount&&delete tc[i]},Ju.getCache=function(){return tc},Ju.clearCache=function(){tc={}},Ju.apply=function(e,t,i){const n=wa(e.name)?Vu:Wu;n.applyFrontFace(e,t),n.applyCull(e,t),n.applyLineWidth(e,t),n.applyPolygonOffset(e,t),n.applyDepthRange(e,t),n.applyDepthTest(e,t),n.applyColorMask(e,t),n.applyDepthMask(e,t),n.applyStencilMask(e,t),n.applyStencilTest(e,t),n.applySampleCoverage(e,t),n.applyScissorTest(e,t,i),n.applyBlending(e,t,i),n.applyViewport(e,t,i)},Ju.partialApply=function(e,t,i,n,r,o,a,s,l,u,c){const h=wa(e.name),d=h?Vu:Wu;if(t!==i){var f=i._applyFunctions[t.id];wa(f)||(f=fc(t,i),i._applyFunctions[t.id]=f);for(var p=f.length,_=0;_=n)){for(var r=e[i+n>>1],o=i-1,a=n+1;;){do{o++}while(e[o]r);if(o>=a)break;Ac(e,o,a),Ac(t,3*o,3*a),Ac(t,3*o+1,3*a+1),Ac(t,3*o+2,3*a+2)}Pc(e,t,i,a),Pc(e,t,a+1,n)}}function Ac(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Lc(e,t,i,n){this.x=Sa(e,0),this.y=Sa(t,0),this.z=Sa(i,0),this.w=Sa(n,0)}Ec.prototype.add=function(e,t,i,n){this.ids.push(e),this.positions.push(t,i,n)},Ec.prototype.getPositions=function(e){for(var t=0,i=this.ids.length-1;t>1;this.ids[n]>=e?i=n:t=n+1}for(var r=[];this.ids[t]===e;){var o=this.positions[3*t],a=this.positions[3*t+1],s=this.positions[3*t+2];r.push({index:o,start:a,end:s}),t++}return r},Ec.serialize=function(e,t){var i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Pc(i,n,0,i.length-1),t&&t.push(i.buffer,n.buffer),{ids:i,positions:n}},Ec.deserialize=function(e){var t=new Ec;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},en.register("FeaturePositionMap",Ec),Lc.fromElements=function(e,t,i,n,r){return wa(r)?(r.x=e,r.y=t,r.z=i,r.w=n,r):new Lc(e,t,i,n)},Lc.fromColor=function(e,t){return Ia.typeOf.object("color",e),wa(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new Lc(e.red,e.green,e.blue,e.alpha)},Lc.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Lc(e.x,e.y,e.z,e.w)},Lc.packedLength=4,Lc.pack=function(e,t,i){return Ia.typeOf.object("value",e),Ia.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},Lc.unpack=function(e,t,i){return Ia.defined("array",e),t=Sa(t,0),wa(i)||(i=new Lc),i.x=e[t++],i.y=e[t++],i.z=e[t++],i.w=e[t],i},Lc.packArray=function(e,t){Ia.defined("array",e);var i=e.length,n=4*i;if(wa(t)){if(!Array.isArray(t)&&t.length!==n)throw new Ea("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r=Gc)return n<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var r=n*e.x*Fc;return r+=n*e.y*Uc,(r+=n*e.z*zc)*Math.pow(10,i)},Lc.prototype.toArray=function(e,t){Lc.pack(this,e,t)};var Vc,kc=(Vc=!0,function(e,t){var i=Vc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Vc=!1,i}),Wc=kc(void 0,(function(){return Wc.toString().search("(((.+)+)+)+$").toString().constructor(Wc).search("(((.+)+)+)+$")}));function Hc(e,t,i){return Math.min(i,Math.max(t,e))}function qc(e,t){return 256*(e=Hc(Math.floor(e),0,255))+(t=Hc(Math.floor(t),0,255))}function jc(e){return[qc(255*e.r,255*e.g),qc(255*e.b,255*e.a)]}Wc();var Yc=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0};Yc.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},Yc.prototype.setConstantPatternPositions=function(){},Yc.prototype.populatePaintArray=function(){},Yc.prototype.updatePaintArray=function(){},Yc.prototype.upload=function(){},Yc.prototype.destroy=function(){},Yc.prototype.setUniforms=function(e,t,i,n){t.set(n.constantOr(this.value))},Yc.prototype.getBinding=function(e,t){return"color"===this.type?new ba.UniformColor(e,t):new ba.Uniform1f(e,t)},Yc.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){var e=n.get(i).constantOr(r.value);return"color"===r.type&&(e.red=e.r,e.green=e.g,e.blue=e.b,e.alpha=e.a),e}},Yc.serialize=function(e){var t=e.value,i=e.names,n=e.type;return{value:en.serialize(t),names:i,type:n}},Yc.deserialize=function(e){var t=e.value,i=e.names,n=e.type;return new Yc(en.deserialize(t),i,n)};var Xc=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};Xc.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},Xc.prototype.populatePaintArray=function(){},Xc.prototype.updatePaintArray=function(){},Xc.prototype.upload=function(){},Xc.prototype.destroy=function(){},Xc.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},Xc.prototype.setUniforms=function(e,t,i,n,r){var o=this.patternPositions;"u_pattern_to"===r&&o.patternTo&&t.set(Lc(o.patternTo[0],o.patternTo[1],o.patternTo[2],o.patternTo[3])),"u_pattern_from"===r&&o.patternFrom&&t.set(Lc(o.patternFrom[0],o.patternFrom[1],o.patternFrom[2],o.patternFrom[3]))},Xc.prototype.getBinding=function(e,t){return new ba.Uniform4f(e,t)},Xc.prototype.setUniformMap=function(e,t,i,n){var r=this.patternPositions;e[t]=function(){return"u_pattern_to"===t&&r.patternTo?new Lc(r.patternTo[0],r.patternTo[1],r.patternTo[2],r.patternTo[3]):"u_pattern_from"===t&&r.patternFrom?new Lc(r.patternFrom[0],r.patternFrom[1],r.patternFrom[2],r.patternFrom[3]):void console.log("CrossFadedConstantBinder is not support")}};var Kc=function(e,t,i,n){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?2:1,offset:0}})),this.paintVertexArray=new n};Kc.prototype.defines=function(){return[]},Kc.prototype.setConstantPatternPositions=function(){},Kc.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new go(0),t,{},[],n);if("color"===this.type)for(var s=jc(a),l=o;l-1&&(i[l]=function(){return 0});return i}destroy(){for(const e in this.binders)this.binders[e].destroy()}}class eh{constructor(e,t,i,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=Jc.createDynamic(r,i,n),this.programConfigurations[r.id].layoutAttributes=e;this.needsUpload=!1,this._featureMap=new Ec,this._bufferOffset=0}populatePaintArrays(e,t,i,n,r){for(const o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(e,t,i,n,r);void 0!==t.id&&this._featureMap.add(+t.id,i,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,i,n){for(const r of i)this.needsUpload=this.programConfigurations[r.id].updatePaintArrays(e,this._featureMap,t,r,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function th(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"text-show-background":["show-background"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function ih(e){return{"line-pattern":{source:ra,composite:ra},"fill-pattern":{source:ra,composite:ra},"fill-extrusion-pattern":{source:ra,composite:ra}}[e]}function nh(e,t,i){var n={color:{source:ta,composite:ia},number:{source:Xo,composite:ta}},r=ih(e);return r&&r[i]||n[t][i]}en.register("ConstantBinder",Yc),en.register("CrossFadedConstantBinder",Xc),en.register("SourceExpressionBinder",Kc),en.register("CrossFadedCompositeBinder",Zc),en.register("CompositeExpressionBinder",Qc),en.register("ProgramConfiguration",Jc,{omit:["_buffers"]}),en.register("ProgramConfigurationSet",eh);var rh,oh=(rh=!0,function(e,t){var i=rh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return rh=!1,i}),ah=oh(void 0,(function(){return ah.toString().search("(((.+)+)+)+$").toString().constructor(ah).search("(((.+)+)+)+$")}));ah();var sh=ao([{name:"a_pos",components:2,type:"Int16"}],4),lh=sh.members,uh=ao([{name:"a_pos",components:2,type:"Float32"}],4),ch=uh.members;function hh(e,t,i,n,r){e.emplaceBack(2*t+(n+1)/2,2*i+(r+1)/2)}var dh=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this._sourceLayerIds={};var t=this;this.layerIds=this.layers.map((function(e,i){return t._sourceLayerIds[e.sourceLayer]=i,e.sourceLayer})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Bo,this.indexArray=new Zo,this.segments=new Ao,this.programConfigurations=new eh(members,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};dh.prototype.populate=function(e,t){var i=this.layers[0],n=[],r=null;"circle"===i.type&&(r=i.layout.get("circle-sort-key"));for(var o=0,a=e;o0&&(this.layoutCesiumVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Tc.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},dh.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},dh.prototype.clear=function(){wa(this.layoutVertexArray)&&(this.layoutVertexArray=null),wa(this.indexArray)&&(this.indexArray=null)},dh.prototype.addFeature=function(e,t,i){for(var n=0,r=t;n=$o||u<0||u>=$o)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),h=c.vertexLength;hh(this.layoutVertexArray,l,u,-1,-1),hh(this.layoutVertexArray,l,u,1,-1),hh(this.layoutVertexArray,l,u,1,1),hh(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,{})},en.register("CircleBucket",dh,{omit:["layers"]});var fh,ph=(fh=!0,function(e,t){var i=fh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return fh=!1,i}),_h=ph(void 0,(function(){return _h.toString().search("(((.+)+)+)+$").toString().constructor(_h).search("(((.+)+)+)+$")}));_h();var mh=function(e){this.specification=e};mh.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},mh.prototype.interpolate=function(e,t,i){var n=interpolate[this.specification.type];return n?n(e,t,i):e},en.register("DataConstantProperty",mh);var gh,xh=(gh=!0,function(e,t){var i=gh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return gh=!1,i}),vh=xh(void 0,(function(){return vh.toString().search("(((.+)+)+)+$").toString().constructor(vh).search("(((.+)+)+)+$")}));vh();var yh=function(e,t){this.specification=e,this.overrides=t};yh.prototype.possiblyEvaluate=function(e,t,i){return"constant"===e.expression.kind||"camera"===e.expression.kind?new $a(this,{kind:"constant",value:e.expression.evaluate(t,null,{},i)},t):new $a(this,e.expression,t)},yh.prototype.interpolate=function(e,t,i){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new $a(this,{kind:"constant",value:void 0},e.parameters);var n=interpolate[this.specification.type];return n?new $a(this,{kind:"constant",value:n(e.value.value,t.value.value,i)},e.parameters):e},yh.prototype.evaluate=function(e,t,i,n,r){return"constant"===e.kind?e.value:e.evaluate(t,i,n,r)},en.register("DataDrivenProperty",yh);var $h,bh=($h=!0,function(e,t){var i=$h?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return $h=!1,i}),Th=bh(void 0,(function(){return Th.toString().search("(((.+)+)+)+$").toString().constructor(Th).search("(((.+)+)+)+$")}));Th();var Ch=function(e,t){this.property=e,this.value=t,this.expression=ar.normalizePropertyExpression(void 0===t?e.specification.default:t,e.specification)};Ch.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Ch.prototype.possiblyEvaluate=function(e,t){return this.property.possiblyEvaluate(this,e,t)};var Sh,wh=(Sh=!0,function(e,t){var i=Sh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Sh=!1,i}),Eh=wh(void 0,(function(){return Eh.toString().search("(((.+)+)+)+$").toString().constructor(Eh).search("(((.+)+)+)+$")}));function Ph(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,i=t*e;return 4*(e<.5?i:3*(e-t)+i-.75)}Eh();var Ah=function(e,t,i,n,r){this.property=e,this.value=t,this.begin=r+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=i)};Ah.prototype.possiblyEvaluate=function(e,t){var i=e.now||0,n=this.value.possiblyEvaluate(e,t),r=this.prior;if(r){if(i>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(i0;)t[i]=arguments[i+1];for(var n=0,r=t;n=0)return!0;return!1}Mh(),Rh();const Uh={};function zh(e){Uh[e]||("undefined"!=typeof console&&console.warn(e),Uh[e]=!0)}function Gh(e,t,i){return(i.y-e.y)*(t.x-e.x)>(t.y-e.y)*(i.x-e.x)}function Vh(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function kh(e){const t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,i,n,r)=>{const o=n||r;return t[i]=!o||o.toLowerCase(),""})),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}var Wh,Hh=(Wh=!0,function(e,t){var i=Wh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Wh=!1,i}),qh=Hh(void 0,(function(){return qh.toString().search("(((.+)+)+)+$").toString().constructor(qh).search("(((.+)+)+)+$")}));qh();var jh=function(e){this.property=e,this.value=new Ch(e,void 0)};jh.prototype.transitioned=function(e,t){return new Ah(this.property,this.value,t,Ih({},e.transition,this.transition),e.now)},jh.prototype.untransitioned=function(){return new Ah(this.property,this.value,null,{},0)};var Yh,Xh=(Yh=!0,function(e,t){var i=Yh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Yh=!1,i}),Kh=Xh(void 0,(function(){return Kh.toString().search("(((.+)+)+)+$").toString().constructor(Kh).search("(((.+)+)+)+$")}));Kh();var Qh,Zh=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var i=e[t];i.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new Ch(i,void 0),r=this.defaultTransitionablePropertyValues[t]=new jh(i);this.defaultTransitioningPropertyValues[t]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}},Jh=(Qh=!0,function(e,t){var i=Qh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Qh=!1,i}),ed=Jh(void 0,(function(){return ed.toString().search("(((.+)+)+)+$").toString().constructor(ed).search("(((.+)+)+)+$")}));function td(){}ed(),td.getMaximumPaintValue=function(e,t,i){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:i.programConfigurations.get(t.id).binders[e].maxValue},td.translateDistance=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},td.translate=function(e,t,i,n,r){if(!t||!t[0]&&!t[1])return e;var o=to.convert(t)._mult(r);"viewport"===i&&o._rotate(-n);for(var a=[],s=0;s=this.maxzoom)||"none"===this.visibility},bd.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},bd.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},bd.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,t)},bd.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),Bh(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},bd.prototype._validate=function(e,t,i,n,r){return!0},bd.prototype.is3D=function(){return!1},bd.prototype.isTileClipped=function(){return!1},bd.prototype.hasOffscreenPass=function(){return!1},bd.prototype.resize=function(){},bd.prototype.isStateDependent=function(){return!0};var Td,Cd=(Td=!0,function(e,t){var i=Td?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Td=!1,i}),Sd=Cd(void 0,(function(){return Sd.toString().search("(((.+)+)+)+$").toString().constructor(Sd).search("(((.+)+)+)+$")}));Sd();var wd,Ed=8,Pd={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},Ad={"*":{type:"source"}},Ld=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Md={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},Rd={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},Id={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},Od={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},Dd={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Bd={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Nd={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Fd=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Ud={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},zd={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Gd={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Vd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},kd={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Wd={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Hd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},qd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},jd={type:"array",value:"*"},Yd={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},Xd={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Kd={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Qd={type:"array",value:"*",minimum:1},Zd={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},Jd={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},ef=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],tf={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},nf={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},rf={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},of={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},af={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-show-background":{type:"boolean",default:!1,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},sf={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},lf={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},uf={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},cf={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},hf={$version:Ed,$root:Pd,sources:Ad,source:Ld,source_vector:Md,source_raster:Rd,source_raster_dem:Id,source_geojson:Od,source_video:Dd,source_image:Bd,layer:Nd,layout:Fd,layout_background:Ud,layout_fill:zd,layout_circle:Gd,layout_heatmap:Vd,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:kd,layout_symbol:Wd,layout_raster:Hd,layout_hillshade:qd,filter:jd,filter_operator:Yd,geometry_type:Xd,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:Kd,expression:Qd,expression_name:Zd,light:Jd,paint:ef,paint_fill:tf,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:nf,paint_circle:rf,paint_heatmap:of,paint_symbol:af,paint_raster:sf,paint_hillshade:lf,paint_background:uf,transition:cf,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},df=(wd=!0,function(e,t){var i=wd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wd=!1,i}),ff=df(void 0,(function(){return ff.toString().search("(((.+)+)+)+$").toString().constructor(ff).search("(((.+)+)+)+$")}));function pf(){}function _f(e,t,i){if(e.length>1){if(mf(e,t))return!0;for(var n=0;nt.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(o=!o);return o}function yf(e,t){for(var i=!1,n=0,r=e.length-1;nt.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}ff(),pf.polygonIntersectsPolygon=function(e,t){for(var i=0;i=3)for(var o=0;o1?e.distSqr(i):e.distSqr(i.sub(t)._mult(r)._add(t))};var $f=new Zh({"circle-sort-key":new yh(hf.layout_circle["circle-sort-key"])}),bf=new Zh({"circle-radius":new yh(hf.paint_circle["circle-radius"]),"circle-color":new yh(hf.paint_circle["circle-color"]),"circle-blur":new yh(hf.paint_circle["circle-blur"]),"circle-opacity":new yh(hf.paint_circle["circle-opacity"]),"circle-translate":new mh(hf.paint_circle["circle-translate"]),"circle-translate-anchor":new mh(hf.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new mh(hf.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new mh(hf.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new yh(hf.paint_circle["circle-stroke-width"]),"circle-stroke-color":new yh(hf.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new yh(hf.paint_circle["circle-stroke-opacity"])}),Tf={paint:bf,layout:$f},Cf=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Tf)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.createBucket=function(e){return new dh(e)},r.prototype.queryRadius=function(e){var t=e;return td.getMaximumPaintValue("circle-radius",this,t)+td.getMaximumPaintValue("circle-stroke-width",this,t)+td.translateDistance(this.paint.get("circle-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a,s,l){s=Ef();for(var u=td.translate(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),0,a),c=this.paint.get("circle-radius")?.evaluate(t,i),h=this.paint.get("circle-stroke-width")?.evaluate(t,i),d=c+h,f="map"===this.paint.get("circle-pitch-alignment"),p=f?u:wf(u,s),_=f?d*a:d,m=0,g=n;mi;){if(n-i>600){var o=n-i+1,a=t-i+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);Lf(e,t,Math.max(i,Math.floor(t-a*l/o+u)),Math.min(n,Math.floor(t+(o-a)*l/o+u)),r)}var c=e[t],h=i,d=n;for(Mf(e,i,t),r(e[n],c)>0&&Mf(e,i,n);h0;)d--}0===r(e[i],c)?Mf(e,i,d):Mf(e,++d,n),d<=t&&(i=d+1),t<=d&&(n=d-1)}}function Mf(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Rf(e,t){return et?1:0}var If,Of=(If=!0,function(e,t){var i=If?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return If=!1,i}),Df=Of(void 0,(function(){return Df.toString().search("(((.+)+)+)+$").toString().constructor(Df).search("(((.+)+)+)+$")}));function Bf(e){for(var t=0,i=0,n=e.length,r=n-1,o=void 0,a=void 0;i1)for(var l=0;l80*i){n=o=e[0],r=a=e[1];for(var p=i;po&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-r))?1/u:0}return Vf(d,f,i,n,r,u),f}function zf(e,t,i,n,r){var o,a;if(r===mp(e,t,i,n)>0)for(o=t;o=t;o-=n)a=fp(o,e[o],e[o+1],a);return a&&op(a,a.next)&&(pp(a),a=a.next),a}function Gf(e,t){if(!e)return e;t||(t=e);var i,n=e;do{if(i=!1,n.steiner||!op(n,n.next)&&0!==rp(n.prev,n,n.next))n=n.next;else{if(pp(n),(n=t=n.prev)===n.next)break;i=!0}}while(i||n!==t);return t}function Vf(e,t,i,n,r,o,a){if(e){!a&&o&&Zf(e,n,r,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?Wf(e,n,r,o):kf(e))t.push(s.i/i),t.push(e.i/i),t.push(l.i/i),pp(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?Vf(e=Hf(Gf(e),t,i),t,i,n,r,o,2):2===a&&qf(e,t,i,n,r,o):Vf(Gf(e),t,i,n,r,o,1);break}}}function kf(e){var t=e.prev,i=e,n=e.next;if(rp(t,i,n)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(ip(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&rp(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Wf(e,t,i,n){var r=e.prev,o=e,a=e.next;if(rp(r,o,a)>=0)return!1;for(var s=r.xo.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=ep(s,l,t,i,n),d=ep(u,c,t,i,n),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&rp(f.prev,f,f.next)>=0||(f=f.prevZ,p!==e.prev&&p!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&rp(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&rp(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&rp(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Hf(e,t,i){var n=e;do{var r=n.prev,o=n.next.next;!op(r,o)&&ap(r,n,n.next,o)&&cp(r,o)&&cp(o,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(o.i/i),pp(n),pp(n.next),n=e=o),n=n.next}while(n!==e);return Gf(n)}function qf(e,t,i,n,r,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&np(a,s)){var l=dp(a,s);return a=Gf(a,a.next),l=Gf(l,l.next),Vf(a,t,i,n,r,o),void Vf(l,t,i,n,r,o)}s=s.next}a=a.next}while(a!==e)}function jf(e,t,i,n){var r,o,a,s=[];for(r=0,o=t.length;r=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if(a=s,s===r){if(o===n.y)return n;if(o===n.next.y)return n.next}i=n.x=n.x&&n.x>=c&&r!==n.x&&ip(oi.x||n.x===i.x&&Qf(i,n)))&&(i=n,d=l)),n=n.next}while(n!==u);return i}function Qf(e,t){return rp(e.prev,e,t.prev)<0&&rp(t.next,e,e.next)<0}function Zf(e,t,i,n){var r=e;do{null===r.z&&(r.z=ep(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,Jf(r)}function Jf(e){var t,i,n,r,o,a,s,l,u=1;do{for(i=e,e=null,o=null,a=0;i;){for(a++,n=i,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=n}o.nextZ=null,u*=2}while(a>1);return e}function ep(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function tp(e){var t=e,i=e;do{(t.x=0&&(e-a)*(n-s)-(i-a)*(t-s)>=0&&(i-a)*(o-s)-(r-a)*(n-s)>=0}function np(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!up(e,t)&&(cp(e,t)&&cp(t,e)&&hp(e,t)&&(rp(e.prev,e,t.prev)||rp(e,t.prev,t))||op(e,t)&&rp(e.prev,e,e.next)>0&&rp(t.prev,t,t.next)>0)}function rp(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function op(e,t){return e.x===t.x&&e.y===t.y}function ap(e,t,i,n){var r=lp(rp(e,t,i)),o=lp(rp(e,t,n)),a=lp(rp(i,n,e)),s=lp(rp(i,n,t));return!!(r!==o&&a!==s||0===r&&sp(e,i,t)||0===o&&sp(e,n,t)||0===a&&sp(i,e,n)||0===s&&sp(i,t,n))}function sp(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function lp(e){return e>0?1:e<0?-1:0}function up(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&ap(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function cp(e,t){return rp(e.prev,e,e.next)<0?rp(e,t,e.next)>=0&&rp(e,e.prev,t)>=0:rp(e,t,e.prev)<0||rp(e,e.next,t)<0}function hp(e,t){var i=e,n=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}function dp(e,t){var i=new _p(e.i,e.x,e.y),n=new _p(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function fp(e,t,i,n){var r=new _p(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function pp(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _p(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function mp(e,t,i,n){for(var r=0,o=t,a=i-n;o0&&(n+=e[r-1].length,i.holes.push(n))}return i};var gp,xp=(gp=!0,function(e,t){var i=gp?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return gp=!1,i}),vp=xp(void 0,(function(){return vp.toString().search("(((.+)+)+)+$").toString().constructor(vp).search("(((.+)+)+)+$")}));function yp(e,t,i,n,r){for(var o=r.patternDependencies,a=0,s=t;a>0];case"i16":return jp[e>>1];case"i32":case"i64":return Yp[e>>2];case"float":return Kp[e>>2];case"double":return Qp[e>>3];default:de("invalid type for getValue: "+t)}return null},n=function(e,t){e||de("Assertion failed: "+t)},r=function(e){var t=wp["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=k_(i),c(e,t,i)}return t},array:function(e){var t=k_(e.length);return h(e,t),t}},u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p=r);)++o;if(o-i>16&&e.subarray&&kp)return kp.decode(e.subarray(i,o));for(var a="";i>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(qp,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s=55296&&l<=57343&&(l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s)),l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,qp,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),Hp.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e==e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return wp.extraStackTrace&&(e+="\n"+wp.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){wp.HEAP8=Hp=new Int8Array(Wp),wp.HEAP16=jp=new Int16Array(Wp),wp.HEAP32=Yp=new Int32Array(Wp),wp.HEAPU8=qp=new Uint8Array(Wp),wp.HEAPU16=new Uint16Array(Wp),wp.HEAPU32=Xp=new Uint32Array(Wp),wp.HEAPF32=Kp=new Float32Array(Wp),wp.HEAPF64=Qp=new Float64Array(Wp)},g=function(){n(0==(3&e_)),Xp[(e_>>2)-1]=34821223,Xp[(e_>>2)-2]=2310721022},x=function(){(34821223!=Xp[(e_>>2)-1]||2310721022!=Xp[(e_>>2)-2])&&de("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+Xp[(e_>>2)-2].toString(16)+" "+Xp[(e_>>2)-1].toString(16)),1668509029!==Yp[0]&&de("Runtime error: The application has corrupted its heap memory area (address zero)!")},v=function(e){de("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(e_-H_()+e)+" bytes available!")},y=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?wp.dynCall_v(i):wp.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},$=function(){if(wp.preRun)for("function"==typeof wp.preRun&&(wp.preRun=[wp.preRun]);wp.preRun.length;)S(wp.preRun.shift());y(o_)},b=function(){x(),!u_&&(u_=!0,y(a_))},T=function(){x(),y(s_)},C=function(){if(x(),wp.postRun)for("function"==typeof wp.postRun&&(wp.postRun=[wp.postRun]);wp.postRun.length;)w(wp.postRun.shift());y(l_)},S=function(e){o_.unshift(e)},w=function(e){l_.unshift(e)},E=function(e){h_++,wp.monitorRunDependencies&&wp.monitorRunDependencies(h_),e&&(n(!p_[e]),p_[e]=1,null===d_&&typeof setInterval<"u"&&(d_=setInterval((function(){if(Vp)return clearInterval(d_),void(d_=null)}),1e4)))},P=function(e){if(h_--,wp.monitorRunDependencies&&wp.monitorRunDependencies(h_),e&&(n(p_[e]),delete p_[e]),0==h_&&(null!==d_&&(clearInterval(d_),d_=null),f_)){var t=f_;f_=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(g_):0===e.indexOf(g_)},L=function(){try{if(wp.wasmBinary)return new Uint8Array(wp.wasmBinary);if(wp.readBinary)return wp.readBinary(m_);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}},M=function(){return wp.wasmBinary||!Pp&&!Ap||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(m_,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+m_+"'";return e.arrayBuffer()})).catch((function(){return L()}))},R=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Np};function i(e,t){var i=e.exports;wp.asm=i,P("wasm-instantiate")}E("wasm-instantiate");var r=wp;function o(e){n(wp===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(wp.instantiateWasm)try{return wp.instantiateWasm(t,i)}catch{return!1}return function(){if(wp.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(m_)||"function"!=typeof fetch)return a(o);fetch(m_,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},I=function(e){return V_(e)},O=function(e){e&&y_[e].refcount++},D=function(e){if(!e||y_[e])return e;for(var t in y_)for(var i=+t,n=y_[i].adjusted,r=n.length,o=0;o"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},V=function(){var e=wp._fflush;e&&e(0);var t=b_.buffers;t[1].length&&b_.printChar(1,10),t[2].length&&b_.printChar(2,10)},k=function(e,t){b_.varargs=t;try{for(var i=b_.get(),n=b_.get(),r=b_.get(),o=0,a=0;a>2],l=Yp[n+(8*a+4)>>2],u=0;u"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},W=function(e,t){b_.varargs=t;try{return 0}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},H=function(e,t){b_.varargs=t;try{return b_.getStreamFromFD(),de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},q=function(){},j=function(){wp.abort()},Y=function(){return Hp.length},X=function(e,t,i){qp.set(qp.subarray(t,t+i),e)},K=function(e){if(!wp.___errno_location)return e;Yp[wp.___errno_location()>>2]=e},Q=function(e){de("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+Hp.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},Z=function(e){e=_(e,65536);var t=Wp.byteLength;try{return-1!==Gp.grow((e-t)/65536)&&(Wp=Gp.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},J=function(e){var i=Y();n(e>i);var r=65536,o=2147418112;if(e>o)return!1;for(var a=Math.max(i,16777216);a0||(g(),$(),h_>0)||wp.calledRun||(wp.setStatus?(wp.setStatus("Running..."),setTimeout((function(){setTimeout((function(){wp.setStatus("")}),1),t()}),1)):t(),x())},de=function(e){wp.onAbort&&wp.onAbort(e),Vp=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw q_&&q_.forEach((function(i){t=i(t,e)})),t};var Sp,wp=typeof wp<"u"?wp:{},Ep={};for(Sp in wp)wp.hasOwnProperty(Sp)&&(Ep[Sp]=wp[Sp]);wp.arguments=[],wp.thisProgram="./this.program",wp.quit=function(e,t){throw t},wp.preRun=[],wp.postRun=[];var Pp=!1,Ap=!1,Lp=!1,Mp=!1;if(Pp="object"==typeof window,Ap="function"==typeof importScripts,Lp="object"==typeof process&&"function"==typeof require&&!Pp&&!Ap,Mp=!Pp&&!Lp&&!Ap,wp.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var Rp,Ip,Op="";if(Lp)Op=__dirname+"/",wp.read=function(e,t){var i;return Rp||(Rp=require("fs")),Ip||(Ip=require("path")),e=Ip.normalize(e),i=Rp.readFileSync(e),t?i:i.toString()},wp.readBinary=function(e){var t=wp.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(wp.thisProgram=process.argv[1].replace(/\\/g,"/")),wp.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=wp),process.on("uncaughtException",(function(e){if(!(e instanceof ce))throw e})),process.on("unhandledRejection",de),wp.quit=function(e){process.exit(e)},wp.inspect=function(){return"[Emscripten Module object]"};else if(Mp)typeof read<"u"&&(wp.read=function(e){return read(e)}),wp.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?wp.arguments=scriptArgs:typeof arguments<"u"&&(wp.arguments=arguments),"function"==typeof quit&&(wp.quit=function(e){quit(e)});else{if(!Pp&&!Ap)throw new Error("environment detection error");Ap?Op=self.location.href:document.currentScript&&(Op=document.currentScript.src),Op=0!==Op.indexOf("blob:")?Op.substr(0,Op.lastIndexOf("/")+1):"",wp.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},Ap&&(wp.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),wp.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},wp.setWindowTitle=function(e){document.title=e}}var Dp=wp.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),Bp=wp.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||Dp);for(Sp in Ep)Ep.hasOwnProperty(Sp)&&(wp[Sp]=Ep[Sp]);Ep=void 0,n(typeof wp.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof wp.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof wp.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof wp.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),H_=W_=k_=function(){de("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Np={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var Fp=0,Up=function(e){Fp=e},zp=function(){return Fp};"object"!=typeof WebAssembly&&de("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Gp,Vp=!1,kp=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Wp,Hp,qp,jp,Yp,Xp,Kp,Qp,Zp=65536,Jp=5872,e_=5248752,t_=5248752,i_=5840;n(Jp%16==0,"stack must start aligned"),n(t_%16==0,"heap must start aligned");var n_=5242880;wp.TOTAL_STACK&&n(n_===wp.TOTAL_STACK,"the stack size can no longer be determined at runtime");var r_=wp.TOTAL_MEMORY||16777216;if(r_>2]=t_,Yp[0]=1668509029,jp[1]=25459,115!==qp[2]||99!==qp[3])throw"Runtime error: expected the system to be little-endian!";var o_=[],a_=[],s_=[],l_=[],u_=!1,c_=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var h_=0,d_=null,f_=null,p_={};wp.preloadedImages={},wp.preloadedAudios={};var __={error:function(){de("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){__.error()},createDataFile:function(){__.error()},createPreloadedFile:function(){__.error()},createLazyFile:function(){__.error()},open:function(){__.error()},mkdev:function(){__.error()},registerDevice:function(){__.error()},analyzePath:function(){__.error()},loadFilesFromDB:function(){__.error()},ErrnoError:function(){__.error()}};wp.FS_createDataFile=__.createDataFile,wp.FS_createPreloadedFile=__.createPreloadedFile;var m_,g_="data:application/octet-stream;base64,",x_=typeof window>"u"?self:window;m_=x_.location.href.endsWith(".openrealspace")?"../../static/Build/SuperMap3D/ThirdParty/earcut.wasm":"ThirdParty/earcut.wasm",A(m_)||(m_=e(m_)),wp.asm=function(e,t,i){t.memory=Gp,t.table=new WebAssembly.Table({initial:260,maximum:260,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=R(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var v_=5856;n(v_%8==0);var y_={},$_=[],b_={buffers:[null,[],[]],printChar:function(e,t){var i=b_.buffers[e];n(i),0===t||10===t?((1===e?Dp:Bp)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return b_.varargs+=4,Yp[b_.varargs-4>>2]},getStr:function(){return l(b_.get())},get64:function(){var e=b_.get(),t=b_.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===b_.get())}},T_={},C_={abort:de,setTempRet0:Up,getTempRet0:zp,abortStackOverflow:v,nullFunc_ii:ee,nullFunc_iidiiii:te,nullFunc_iiii:ie,nullFunc_jiji:ne,nullFunc_v:re,nullFunc_vi:oe,nullFunc_vii:ae,nullFunc_viiii:se,nullFunc_viiiii:le,nullFunc_viiiiii:ue,___cxa_allocate_exception:I,___cxa_begin_catch:B,___cxa_throw:N,___cxa_uncaught_exception:F,___exception_addRef:O,___exception_deAdjust:D,___gxx_personality_v0:U,___lock:z,___setErrNo:K,___syscall140:G,___syscall146:k,___syscall54:W,___syscall6:H,___unlock:q,_abort:j,_emscripten_get_heap_size:Y,_emscripten_memcpy_big:X,_emscripten_resize_heap:J,abortOnCannotGrowMemory:Q,emscripten_realloc_buffer:Z,flush_NO_FILESYSTEM:V,tempDoublePtr:v_,DYNAMICTOP_PTR:i_},S_=wp.asm(T_,C_,Wp),w_=S_.__ZSt18uncaught_exceptionv;S_.__ZSt18uncaught_exceptionv=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),w_.apply(null,arguments)};var E_=S_.___cxa_can_catch;S_.___cxa_can_catch=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),E_.apply(null,arguments)};var P_=S_.___cxa_is_pointer_type;S_.___cxa_is_pointer_type=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),P_.apply(null,arguments)};var A_=S_.___errno_location;S_.___errno_location=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),A_.apply(null,arguments)};var L_=S_._earcut;S_._earcut=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),L_.apply(null,arguments)};var M_=S_._fflush;S_._fflush=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),M_.apply(null,arguments)};var R_=S_._free;S_._free=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),R_.apply(null,arguments)};var I_=S_._llvm_maxnum_f64;S_._llvm_maxnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),I_.apply(null,arguments)};var O_=S_._llvm_minnum_f64;S_._llvm_minnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),O_.apply(null,arguments)};var D_=S_._malloc;S_._malloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),D_.apply(null,arguments)};var B_=S_._sbrk;S_._sbrk=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),B_.apply(null,arguments)};var N_=S_.establishStackSpace;S_.establishStackSpace=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),N_.apply(null,arguments)};var F_=S_.stackAlloc;S_.stackAlloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),F_.apply(null,arguments)};var U_=S_.stackRestore;S_.stackRestore=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),U_.apply(null,arguments)};var z_=S_.stackSave;S_.stackSave=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),z_.apply(null,arguments)},wp.asm=S_;var G_=wp.__ZSt18uncaught_exceptionv=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.__ZSt18uncaught_exceptionv.apply(null,arguments)};wp.___cxa_can_catch=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.___cxa_can_catch.apply(null,arguments)},wp.___cxa_is_pointer_type=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.___cxa_is_pointer_type.apply(null,arguments)},wp.___errno_location=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.___errno_location.apply(null,arguments)},wp._earcut=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._earcut.apply(null,arguments)},wp._emscripten_replace_memory=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._emscripten_replace_memory.apply(null,arguments)},wp._fflush=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._fflush.apply(null,arguments)},wp._free=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._free.apply(null,arguments)},wp._llvm_maxnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._llvm_maxnum_f64.apply(null,arguments)},wp._llvm_minnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._llvm_minnum_f64.apply(null,arguments)};var V_=wp._malloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._malloc.apply(null,arguments)};wp._memcpy=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._memcpy.apply(null,arguments)},wp._memset=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._memset.apply(null,arguments)},wp._sbrk=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._sbrk.apply(null,arguments)},wp.establishStackSpace=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.establishStackSpace.apply(null,arguments)};var k_=wp.stackAlloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.stackAlloc.apply(null,arguments)},W_=wp.stackRestore=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.stackRestore.apply(null,arguments)},H_=wp.stackSave=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.stackSave.apply(null,arguments)};wp.dynCall_ii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_ii.apply(null,arguments)},wp.dynCall_iidiiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_iidiiii.apply(null,arguments)},wp.dynCall_iiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_iiii.apply(null,arguments)},wp.dynCall_jiji=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_jiji.apply(null,arguments)},wp.dynCall_v=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_v.apply(null,arguments)},wp.dynCall_vi=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_vi.apply(null,arguments)},wp.dynCall_vii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_vii.apply(null,arguments)},wp.dynCall_viiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_viiii.apply(null,arguments)},wp.dynCall_viiiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_viiiii.apply(null,arguments)},wp.dynCall_viiiiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_viiiiii.apply(null,arguments)},wp.asm=S_,wp.intArrayFromString||(wp.intArrayFromString=function(){de("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.intArrayToString||(wp.intArrayToString=function(){de("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.ccall=o,wp.cwrap=a,wp.setValue||(wp.setValue=function(){de("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getValue=i,wp.allocate||(wp.allocate=function(){de("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getMemory||(wp.getMemory=function(){de("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.AsciiToString||(wp.AsciiToString=function(){de("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToAscii||(wp.stringToAscii=function(){de("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF8ArrayToString||(wp.UTF8ArrayToString=function(){de("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF8ToString||(wp.UTF8ToString=function(){de("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF8Array||(wp.stringToUTF8Array=function(){de("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF8||(wp.stringToUTF8=function(){de("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.lengthBytesUTF8||(wp.lengthBytesUTF8=function(){de("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF16ToString||(wp.UTF16ToString=function(){de("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF16||(wp.stringToUTF16=function(){de("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.lengthBytesUTF16||(wp.lengthBytesUTF16=function(){de("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF32ToString||(wp.UTF32ToString=function(){de("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF32||(wp.stringToUTF32=function(){de("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.lengthBytesUTF32||(wp.lengthBytesUTF32=function(){de("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.allocateUTF8||(wp.allocateUTF8=function(){de("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackTrace||(wp.stackTrace=function(){de("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnPreRun||(wp.addOnPreRun=function(){de("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnInit||(wp.addOnInit=function(){de("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnPreMain||(wp.addOnPreMain=function(){de("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnExit||(wp.addOnExit=function(){de("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnPostRun||(wp.addOnPostRun=function(){de("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.writeStringToMemory||(wp.writeStringToMemory=function(){de("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.writeArrayToMemory||(wp.writeArrayToMemory=function(){de("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.writeAsciiToMemory||(wp.writeAsciiToMemory=function(){de("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addRunDependency||(wp.addRunDependency=function(){de("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.removeRunDependency||(wp.removeRunDependency=function(){de("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.ENV||(wp.ENV=function(){de("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.FS||(wp.FS=function(){de("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.FS_createFolder||(wp.FS_createFolder=function(){de("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createPath||(wp.FS_createPath=function(){de("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createDataFile||(wp.FS_createDataFile=function(){de("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createPreloadedFile||(wp.FS_createPreloadedFile=function(){de("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createLazyFile||(wp.FS_createLazyFile=function(){de("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createLink||(wp.FS_createLink=function(){de("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createDevice||(wp.FS_createDevice=function(){de("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_unlink||(wp.FS_unlink=function(){de("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.GL||(wp.GL=function(){de("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.dynamicAlloc||(wp.dynamicAlloc=function(){de("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.warnOnce||(wp.warnOnce=function(){de("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.loadDynamicLibrary||(wp.loadDynamicLibrary=function(){de("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.loadWebAssemblyModule||(wp.loadWebAssemblyModule=function(){de("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getLEB||(wp.getLEB=function(){de("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getFunctionTables||(wp.getFunctionTables=function(){de("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.alignFunctionTables||(wp.alignFunctionTables=function(){de("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.registerFunctions||(wp.registerFunctions=function(){de("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addFunction||(wp.addFunction=function(){de("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.removeFunction||(wp.removeFunction=function(){de("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getFuncWrapper||(wp.getFuncWrapper=function(){de("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.prettyPrint||(wp.prettyPrint=function(){de("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.makeBigInt||(wp.makeBigInt=function(){de("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.dynCall||(wp.dynCall=function(){de("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getCompilerSetting||(wp.getCompilerSetting=function(){de("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackSave||(wp.stackSave=function(){de("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackRestore||(wp.stackRestore=function(){de("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackAlloc||(wp.stackAlloc=function(){de("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.establishStackSpace||(wp.establishStackSpace=function(){de("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.print||(wp.print=function(){de("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.printErr||(wp.printErr=function(){de("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getTempRet0||(wp.getTempRet0=function(){de("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.setTempRet0||(wp.setTempRet0=function(){de("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.Pointer_stringify||(wp.Pointer_stringify=function(){de("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.ALLOC_NORMAL||Object.defineProperty(wp,"ALLOC_NORMAL",{get:function(){de("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wp.ALLOC_STACK||Object.defineProperty(wp,"ALLOC_STACK",{get:function(){de("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wp.ALLOC_DYNAMIC||Object.defineProperty(wp,"ALLOC_DYNAMIC",{get:function(){de("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wp.ALLOC_NONE||Object.defineProperty(wp,"ALLOC_NONE",{get:function(){de("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),ce.prototype=new Error,ce.prototype.constructor=ce,f_=function e(){wp.calledRun||he(),wp.calledRun||(f_=e)},wp.run=he;var q_=[];if(wp.abort=de,wp.preInit)for("function"==typeof wp.preInit&&(wp.preInit=[wp.preInit]);wp.preInit.length>0;)wp.preInit.pop()();wp.noExitRuntime=!0,he()}else wp=null;var j_,Y_=wp,X_=(j_=!0,function(e,t){var i=j_?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return j_=!1,i}),K_=X_(void 0,(function(){return K_.toString().search("(((.+)+)+)+$").toString().constructor(K_).search("(((.+)+)+)+$")}));K_();var Q_=!1;if(wa(Y_)){Y_.onRuntimeInitialized=function(){Q_=!0};var Z_=Y_.cwrap("earcut","number",["number","number","number","number","number","number"])}var J_=ao([{name:"a_pos",components:2,type:"Int16"}],4),em=J_.members,tm=500,im=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Bo,this.indexArray=new Zo,this.indexArray2=new Jo,this.programConfigurations=new eh(em,e.layers,e.zoom),this.segments=new Ao,this.segments2=new Ao,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};im.prototype.populate=function(e,t){this.hasPattern=Cp("fill",this.layers,t);for(var i=[],n=0,r=e;n0&&(this.layoutCesiumVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Tc.toIndexBuffer(e,this.indexArray),this.cesiumIndexBuffer2=Tc.toIndexBuffer(e,this.indexArray2))}this.programConfigurations.upload(e),this.uploaded=!0},im.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer?.destroy(),this.cesiumIndexBuffer2?.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},im.prototype.clear=function(){wa(this.layoutVertexArray)&&(this.layoutVertexArray=null),wa(this.indexArray)&&(this.indexArray=null),wa(this.indexArray2)&&(this.indexArray2=null)},im.prototype.addFeature=function(e,t,i,n,r){for(var o=0,a=Nf(t,tm);on.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},r.prototype.interpolate=function(e){return e},r}(yh);en.register("DataDrivenProperty",yh);var rm,om=new Zh({"fill-sort-key":new yh(hf.layout_fill["fill-sort-key"])}),am=new Zh({"fill-antialias":new mh(hf.paint_fill["fill-antialias"]),"fill-opacity":new yh(hf.paint_fill["fill-opacity"]),"fill-color":new yh(hf.paint_fill["fill-color"]),"fill-outline-color":new yh(hf.paint_fill["fill-outline-color"]),"fill-translate":new mh(hf.paint_fill["fill-translate"]),"fill-translate-anchor":new mh(hf.paint_fill["fill-translate-anchor"]),"fill-pattern":new nm(hf.paint_fill["fill-pattern"])}),sm={paint:am,layout:om},lm=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,sm)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},r.prototype.createBucket=function(e){return new im(e)},r.prototype.queryRadius=function(){return td.translateDistance(this.paint.get("fill-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){var s=td.translate(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),0,a);return pf.polygonIntersectsMultiPolygon(s,n)},r.prototype.isTileClipped=function(){return!0},r}(bd),um=(rm=!0,function(e,t){var i=rm?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return rm=!1,i}),cm=um(void 0,(function(){return cm.toString().search("(((.+)+)+)+$").toString().constructor(cm).search("(((.+)+)+)+$")}));cm();var hm=["Unknown","Point","LineString","Polygon"],dm=ao([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),fm=dm.members,pm=63,_m=Math.cos(Math.PI/180*37.5),mm=15,gm=20,xm=15,vm=.5,ym=Math.pow(2,xm-1)/vm,$m=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Uo,this.indexArray=new Zo,this.programConfigurations=new eh(fm,e.layers,e.zoom),this.segments=new Ao,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};$m.prototype.populate=function(e,t){this.hasPattern=!1;for(var i=this.layers[0].layout.get("line-sort-key"),n=[],r=0,o=e;r0&&(this.layoutCesiumVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Tc.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},$m.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy()),this.programConfigurations.destroy(),this.segments.destroy())},$m.prototype.clear=function(){wa(this.layoutVertexArray)&&(this.layoutVertexArray=null),wa(this.indexArray)&&(this.indexArray=null)},$m.prototype.addFeature=function(e,t,i,n){for(var r=this.layers[0].layout,o=r.get("line-join").evaluate(e,{}),a=r.get("line-cap"),s=r.get("line-miter-limit"),l=r.get("line-round-limit"),u=0,c=t;u=2&&e[c-1].equals(e[c-2]);)c--;for(var h=0;h0;if(S&&v>h){var E=d.dist(_);if(E>2*f){var P=d.sub(d.sub(_)._mult(f/E)._round());this.updateDistance(_,P),this.addCurrentVertex(P,g,0,0,p),_=P}}var A=_&&m,L=A?i:u?"butt":n;if(A&&"round"===L&&(Tr&&(L="bevel"),"bevel"===L&&(T>2&&(L="flipbevel"),T100)y=x.mult(-1);else{var M=T*g.add(x).mag()/g.sub(x).mag();y._perp()._mult(M*(w?-1:1))}this.addCurrentVertex(d,y,0,0,p),this.addCurrentVertex(d,y.mult(-1),0,0,p)}else if("bevel"===L||"fakeround"===L){var R=-Math.sqrt(T*T-1),I=w?R:0,O=w?0:R;if(_&&this.addCurrentVertex(d,g,I,O,p),"fakeround"===L)for(var D=Math.round(180*C/Math.PI/gm),B=1;B2*f){var V=d.add(m.sub(d)._mult(f/G)._round());this.updateDistance(d,V),this.addCurrentVertex(V,x,0,0,p),d=V}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,a,s)}},$m.prototype.addCurrentVertex=function(e,t,i,n,r,o){void 0===o&&(o=!1);var a=t.x+t.y*i,s=t.y-t.x*i,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,a,s,o,!1,i,r),this.addHalfVertex(e,l,u,o,!0,-n,r),this.distance>ym/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,i,n,r,o))},$m.prototype.addHalfVertex=function(e,t,i,n,r,o,a){var s=e.x,l=e.y,u=this.scaledDistance*vm;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(r?1:0),Math.round(pm*t)+128,Math.round(pm*i)+128,1+(0===o?0:o<0?-1:1)|(63&u)<<2,u>>6);var c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),a.primitiveLength++),r?this.e2=c:this.e1=c},$m.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(ym-1):this.distance},en.register("LineBucket",$m,{omit:["layers","patternFeatures"]});var bm,Tm=(bm=!0,function(e,t){var i=bm?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return bm=!1,i}),Cm=Tm(void 0,(function(){return Cm.toString().search("(((.+)+)+)+$").toString().constructor(Cm).search("(((.+)+)+)+$")}));Cm();var Sm=function(e){this.specification=e};Sm.prototype.possiblyEvaluate=function(e,t,i){if(void 0!==e.value){if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new go(Math.floor(t.zoom-1),t)),e.expression.evaluate(new go(Math.floor(t.zoom),t)),e.expression.evaluate(new go(Math.floor(t.zoom+1),t)),t)}},Sm.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},Sm.prototype.interpolate=function(e){return e},en.register("CrossFadedProperty",Sm);var wm,Em=(wm=!0,function(e,t){var i=wm?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wm=!1,i}),Pm=Em(void 0,(function(){return Pm.toString().search("(((.+)+)+)+$").toString().constructor(Pm).search("(((.+)+)+)+$")}));Pm();var Am=function(e){this.specification=e};Am.prototype.possiblyEvaluate=function(e,t,i){return!!e.expression.evaluate(t,null,{},i)},Am.prototype.interpolate=function(){return!1},en.register("ColorRampProperty",Am);var Lm=new Zh({"line-cap":new mh(hf.layout_line["line-cap"]),"line-join":new yh(hf.layout_line["line-join"]),"line-miter-limit":new mh(hf.layout_line["line-miter-limit"]),"line-round-limit":new mh(hf.layout_line["line-round-limit"]),"line-sort-key":new yh(hf.layout_line["line-sort-key"])}),Mm=new Zh({"line-opacity":new yh(hf.paint_line["line-opacity"]),"line-color":new yh(hf.paint_line["line-color"]),"line-translate":new mh(hf.paint_line["line-translate"]),"line-translate-anchor":new mh(hf.paint_line["line-translate-anchor"]),"line-width":new yh(hf.paint_line["line-width"]),"line-gap-width":new yh(hf.paint_line["line-gap-width"]),"line-offset":new yh(hf.paint_line["line-offset"]),"line-blur":new yh(hf.paint_line["line-blur"]),"line-dasharray":new Sm(hf.paint_line["line-dasharray"]),"line-pattern":new nm(hf.paint_line["line-pattern"]),"line-gradient":new Am(hf.paint_line["line-gradient"])}),Rm={paint:Mm,layout:Lm},Im=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,i){return i=new go(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),e.prototype.possiblyEvaluate.call(this,t,i)},t.prototype.evaluate=function(t,i,n,r){return i=extend({},i,{zoom:Math.floor(i.zoom)}),e.prototype.evaluate.call(this,t,i,n,r)},t}(yh),Om=new Im(Rm.paint.properties["line-width"].specification);Om.useIntegerZoom=!0;var Dm=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Rm)}function o(e,t){return t>0?t+2*e:e}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},r.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=renderColorRamp(e,"lineProgress"),this.gradientTexture=null},r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i),this.paint._values["line-floorwidth"]=Om.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},r.prototype.createBucket=function(e){return new $m(e)},r.prototype.queryRadius=function(e){var t=e,i=o(td.getMaximumPaintValue("line-width",this,t),td.getMaximumPaintValue("line-gap-width",this,t)),n=td.getMaximumPaintValue("line-offset",this,t);return i/2+Math.abs(n)+td.translateDistance(this.paint.get("line-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,a,s){var l=td.translate(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),0,s),u=o(this.paint.get("line-width")?.evaluate(t,i),this.paint.get("line-gap-width")?.evaluate(t,i)),c=s/2*(u=Math.max(u,5)),h=this.paint.get("line-offset")?.evaluate(t,i);return h&&(n=function(e,t){for(var i=[],n=new to(0,0),r=0;r=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};const jm=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Ym=jm(void 0,(function(){return Ym.toString().search("(((.+)+)+)+$").toString().constructor(Ym).search("(((.+)+)+)+$")}));function Xm(e){for(const t of e)if(Jm(t.charCodeAt(0)))return!0;return!1}function Km(e){for(const t of e)if(!Qm(t.charCodeAt(0)))return!1;return!0}function Qm(e){return!(qm.Arabic(e)||qm["Arabic Supplement"](e)||qm["Arabic Extended-A"](e)||qm["Arabic Presentation Forms-A"](e)||qm["Arabic Presentation Forms-B"](e))}function Zm(e){return!(e<11904||!(qm["Bopomofo Extended"](e)||qm.Bopomofo(e)||qm["CJK Compatibility Forms"](e)||qm["CJK Compatibility Ideographs"](e)||qm["CJK Compatibility"](e)||qm["CJK Radicals Supplement"](e)||qm["CJK Strokes"](e)||qm["CJK Symbols and Punctuation"](e)||qm["CJK Unified Ideographs Extension A"](e)||qm["CJK Unified Ideographs"](e)||qm["Enclosed CJK Letters and Months"](e)||qm["Halfwidth and Fullwidth Forms"](e)||qm.Hiragana(e)||qm["Ideographic Description Characters"](e)||qm["Kangxi Radicals"](e)||qm["Katakana Phonetic Extensions"](e)||qm.Katakana(e)||qm["Vertical Forms"](e)||qm["Yi Radicals"](e)||qm["Yi Syllables"](e)))}function Jm(e){return!(746!==e&&747!==e&&(e<4352||!(qm["Bopomofo Extended"](e)||qm.Bopomofo(e)||qm["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||qm["CJK Compatibility Ideographs"](e)||qm["CJK Compatibility"](e)||qm["CJK Radicals Supplement"](e)||qm["CJK Strokes"](e)||!(!qm["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||qm["CJK Unified Ideographs Extension A"](e)||qm["CJK Unified Ideographs"](e)||qm["Enclosed CJK Letters and Months"](e)||qm["Hangul Compatibility Jamo"](e)||qm["Hangul Jamo Extended-A"](e)||qm["Hangul Jamo Extended-B"](e)||qm["Hangul Jamo"](e)||qm["Hangul Syllables"](e)||qm.Hiragana(e)||qm["Ideographic Description Characters"](e)||qm.Kanbun(e)||qm["Kangxi Radicals"](e)||qm["Katakana Phonetic Extensions"](e)||qm.Katakana(e)&&12540!==e||!(!qm["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!qm["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||qm["Unified Canadian Aboriginal Syllabics"](e)||qm["Unified Canadian Aboriginal Syllabics Extended"](e)||qm["Vertical Forms"](e)||qm["Yijing Hexagram Symbols"](e)||qm["Yi Syllables"](e)||qm["Yi Radicals"](e))))}function eg(e){return!!(qm["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||qm["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||qm["Letterlike Symbols"](e)||qm["Number Forms"](e)||qm["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||qm["Control Pictures"](e)&&9251!==e||qm["Optical Character Recognition"](e)||qm["Enclosed Alphanumerics"](e)||qm["Geometric Shapes"](e)||qm["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||qm["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||qm["CJK Symbols and Punctuation"](e)||qm.Katakana(e)||qm["Private Use Area"](e)||qm["CJK Compatibility Forms"](e)||qm["Small Form Variants"](e)||qm["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}function tg(e){return!(Jm(e)||eg(e))}function ig(e){return qm.Arabic(e)||qm["Arabic Supplement"](e)||qm["Arabic Extended-A"](e)||qm["Arabic Presentation Forms-A"](e)||qm["Arabic Presentation Forms-B"](e)}function ng(e){return e>=1424&&e<=2303||qm["Arabic Presentation Forms-A"](e)||qm["Arabic Presentation Forms-B"](e)}function rg(e){for(const t of e)if(ng(t.charCodeAt(0)))return!0;return!1}Ym();const og=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),ag=og(void 0,(function(){return ag.toString().search("(((.+)+)+)+$").toString().constructor(ag).search("(((.+)+)+)+$")}));ag();const sg={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function lg(e){let t="";for(let i=0;in.headers.set(t,e)));const r=kh(t.headers.get("Cache-Control")||"");r["no-store"]||(r["max-age"]&&n.headers.set("Expires",new Date(i+1e3*r["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-i{const i=new window.Response(t,n);window.caches.open(Cg).then((t=>t.put(Ag(e.url),i)))})))}function Ag(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Lg(e,t){if(!window.caches)return t(null);const i=Ag(e.url);window.caches.open(Cg).catch(t).then((e=>{e.match(i).catch(t).then((n=>{const r=Mg(n);e.delete(i),r&&e.put(i,n.clone()),t(null,n,r)}))}))}function Mg(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")),i=kh(e.headers.get("Cache-Control")||"");return t>Date.now()&&!i["no-cache"]}function Rg(e){window.caches&&window.caches.open(Cg).then((t=>{t.keys().then((i=>{for(let n=0;nself.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href,Fg=e=>/^file:/.test(e)||/^file:/.test(Ng())&&!/^\w+:/.test(e);function Ug(e,t){const i=Vh()?self:window,n=new i.AbortController,r=new i.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:Ng(),signal:n.signal});let o=!1,a=!1;const s=$g(r.url);"json"===e.type&&r.headers.set("Accept","application/json");const l=(n,o,l)=>{if(a)return;if(n&&"SecurityError"!==n.message&&zh(n),o&&l)return u(o);const c=Date.now();i.fetch(r).then((i=>{if(i.ok){const e=s?i.clone():null;return u(i,e,c)}return t(new Bg(i.statusText,i.status,e.url))})).catch((e=>{20!==e.code&&t(new Error(e.message))}))},u=(i,n,s)=>{("arrayBuffer"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text()).then((e=>{a||(n&&s&&Pg(r,n,s),o=!0,t(null,e,i.headers.get("Cache-Control"),i.headers.get("Expires")))})).catch((e=>t(new Error(e.message))))};return s?Lg(r,l):l(null,null),{cancel:()=>{a=!0,o||n.abort()}}}function zg(e,t){const i=new((Vh()?self:window).XMLHttpRequest);i.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(i.responseType="arraybuffer");for(const t in e.headers)i.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=()=>{t(new Error(i.statusText))},i.onload=()=>{if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){let n=i.response;if("json"===e.type)try{n=JSON.parse(i.response)}catch(e){return t(e)}t(null,n,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else t(new Bg(i.statusText,i.status,e.url))},i.send(e.body),{cancel:()=>i.abort()}}const Gg=function(e,t){const i=Vh()?self:window;if(!Fg(e.url)){if(i.fetch&&i.Request&&i.AbortController&&i.Request.prototype.hasOwnProperty("signal"))return Ug(e,t);if(Vh()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}return zg(e,t)},Vg=function(e,t){return Gg(Ih(e,{type:"arrayBuffer"}),t)},kg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Wg=kg(void 0,(function(){return Wg.toString().search("(((.+)+)+)+$").toString().constructor(Wg).search("(((.+)+)+)+$")}));Wg();const Hg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),qg=Hg(void 0,(function(){return qg.toString().search("(((.+)+)+)+$").toString().constructor(qg).search("(((.+)+)+)+$")}));qg();const jg={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"};let Yg=jg.unavailable,Xg=null;const Kg={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Yg===jg.loaded||null!=Kg.applyArabicShaping,isLoading:()=>Yg===jg.loading,setState(e){Yg=e.pluginStatus,Xg=e.pluginURL},isParsed:()=>null!=Kg.applyArabicShaping,getPluginURL:()=>Xg};var Qg,Zg=(Qg=!0,function(e,t){var i=Qg?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Qg=!1,i}),Jg=Zg(void 0,(function(){return Jg.toString().search("(((.+)+)+)+$").toString().constructor(Jg).search("(((.+)+)+)+$")}));Jg();var ex,tx=24,ix=(ex=!0,function(e,t){var i=ex?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ex=!1,i}),nx=ix(void 0,(function(){return nx.toString().search("(((.+)+)+)+$").toString().constructor(nx).search("(((.+)+)+)+$")}));nx();var rx=function(e,t){ox(this,e,1,t)};function ox(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function ax(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=ox({},{width:n,height:r},i);sx(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function sx(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},ux=function(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_},cx={read:lx,write:ux};function hx(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}hx.Varint=0,hx.Fixed64=1,hx.Bytes=2,hx.Fixed32=5;var dx=4294967296,fx=1/dx;function px(e,t,i){var n,r,o=i.buf;if(n=(112&(r=o[i.pos++]))>>4,r<128||(n|=(127&(r=o[i.pos++]))<<3,r<128)||(n|=(127&(r=o[i.pos++]))<<10,r<128)||(n|=(127&(r=o[i.pos++]))<<17,r<128)||(n|=(127&(r=o[i.pos++]))<<24,r<128)||(n|=(1&(r=o[i.pos++]))<<31,r<128))return mx(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function _x(e){return e.type===hx.Bytes?e.readVarint()+e.pos:e.pos+1}function mx(e,t,i){return i?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function gx(e,t){var i,n;if(e>=0?(i=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(i=~(-e%4294967296))?i=i+1|0:(i=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),xx(i,0,t),vx(n,t)}function xx(e,t,i){i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}function vx(e,t){var i=(7&e)<<4;t.buf[t.pos++]|=i|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function yx(e,t,i){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=e;r--)i.buf[r+n]=i.buf[r]}function $x(e,t){for(var i=0;i>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function Rx(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function Ix(e,t,i){for(var n="",r=t;r239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[r+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(o=e[r+1],a=e[r+2],128==(192&o)&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(o=e[r+1],a=e[r+2],s=e[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=c}return n}function Ox(e,t,i){for(var n,r,o=0;o55295&&n<57344){if(!r){n>56319||o+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):r=n;continue}if(n<56320){e[i++]=239,e[i++]=191,e[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(e[i++]=239,e[i++]=191,e[i++]=189,r=null);n<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:(n<65536?e[i++]=n>>12|224:(e[i++]=n>>18|240,e[i++]=n>>12&63|128),e[i++]=n>>6&63|128),e[i++]=63&n|128)}return i}hx.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos>3,o=this.pos;this.type=7&n,e(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Lx(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Rx(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Lx(this.buf,this.pos)+Lx(this.buf,this.pos+4)*dx;return this.pos+=8,e},readSFixed64:function(){var e=Lx(this.buf,this.pos)+Rx(this.buf,this.pos+4)*dx;return this.pos+=8,e},readFloat:function(){var e=cx.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=cx.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,n=this.buf;return t=127&(i=n[this.pos++]),i<128||(t|=(127&(i=n[this.pos++]))<<7,i<128)||(t|=(127&(i=n[this.pos++]))<<14,i<128)||(t|=(127&(i=n[this.pos++]))<<21,i<128)?t:px(t|=(15&(i=n[this.pos]))<<28,e,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=Ix(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var i=_x(this);for(e=e||[];this.pos127;);else if(t===hx.Bytes)this.pos=this.readVarint()+this.pos;else if(t===hx.Fixed32)this.pos+=4;else{if(t!==hx.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?gx(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=Ox(this.buf,e,this.pos);var i=this.pos-t;i>=128&&yx(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),cx.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),cx.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i=128&&yx(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,i){this.writeTag(e,hx.Bytes),this.writeRawMessage(t,i)},writePackedVarint:function(e,t){this.writeMessage(e,$x,t)},writePackedSVarint:function(e,t){this.writeMessage(e,bx,t)},writePackedBoolean:function(e,t){this.writeMessage(e,Sx,t)},writePackedFloat:function(e,t){this.writeMessage(e,Tx,t)},writePackedDouble:function(e,t){this.writeMessage(e,Cx,t)},writePackedFixed32:function(e,t){this.writeMessage(e,wx,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,Ex,t)},writePackedFixed64:function(e,t){this.writeMessage(e,Px,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,Ax,t)},writeBytesField:function(e,t){this.writeTag(e,hx.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,hx.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,hx.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,hx.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,hx.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,hx.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,hx.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,hx.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,hx.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,hx.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};const Dx=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Bx=Dx(void 0,(function(){return Bx.toString().search("(((.+)+)+)+$").toString().constructor(Bx).search("(((.+)+)+)+$")}));Bx();const Nx=3,Fx=Nx,Ux=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),zx=Ux(void 0,(function(){return zx.toString().search("(((.+)+)+)+$").toString().constructor(zx).search("(((.+)+)+)+$")}));zx();var Gx=1;const Vx={horizontal:1,vertical:2,horizontalOnly:3},kx=-17;function Wx(e){for(const t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}const Hx=57344,qx=63743;class jx{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(e,t){const i=new jx;return i.scale=e||1,i.fontStack=t,i}static forImage(e){const t=new jx;return t.imageName=e,t}}class Yx{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(e,t){const i=new Yx;for(let n=0;n=0&&i>=e&&Qx[this.text.charCodeAt(i)];i--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){const i=new Yx;return i.text=this.text.substring(e,t),i.sectionIndex=this.sectionIndex.slice(e,t),i.sections=this.sections,i}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((e,t)=>Math.max(e,this.sections[t].scale)),0)}addTextSection(e,t){this.text+=e.text,this.sections.push(jx.forText(e.scale,e.fontStack||t));const i=this.sections.length-1;for(let t=0;t=qx?null:++this.imageSectionID:(this.imageSectionID=Hx,this.imageSectionID)}}function Xx(e,t){const i=[],n=e.text;let r=0;for(const n of t)i.push(e.substring(r,n)),r=n;return r=0;let c=0;for(let i=0;i0&&o>y&&(y=o)}else{const e=i[p.fontStack],n=e&&e[m];if(n&&n.rect)$=n.rect,x=n.metrics;else{const e=t[p.fontStack],i=e&&e[m];if(!i)continue;x=i.metrics}g=(r-p.scale)*tx}C?(e.verticalizable=!0,v.push({glyph:m,imageName:b,x:d,y:f+g,vertical:C,scale:p.scale,fontStack:p.fontStack,sectionIndex:_,metrics:x,rect:$}),d+=T*p.scale+u):(v.push({glyph:m,imageName:b,x:d,y:f+g,vertical:C,scale:p.scale,fontStack:p.fontStack,sectionIndex:_,metrics:x,rect:$}),d+=x.advance*p.scale+u)}if(0!==v.length){const e=d-u;p=Math.max(e,p),lv(v,0,v.length-1,m,y)}d=0;const $=o*r+y;x.lineOffset=Math.max(y,s),f+=$,_=Math.max($,_),++g}const x=f-kx,{horizontalAlign:v,verticalAlign:y}=av(a);uv(e.positionedLines,m,v,y,p,_,o,x,r.length),e.top+=-y*x,e.bottom=e.top+x,e.left+=-v*p,e.right=e.left+p}function lv(e,t,i,n,r){if(!n&&!r)return;const o=e[i],a=o.metrics.advance*o.scale,s=(e[i].x+a)*n;for(let n=t;n<=i;n++)e[n].x-=s,e[n].y+=r}function uv(e,t,i,n,r,o,a,s,l){const u=(t-i)*r;let c=0;c=o!==a?-s*n-kx:(-n*l+.5)*a;for(const t of e)for(const e of t.positionedGlyphs)e.x+=u,e.y+=c}function cv(e,t,i){const{horizontalAlign:n,verticalAlign:r}=av(i),o=t[0],a=t[1],s=o-e.displaySize[0]*n,l=s+e.displaySize[0],u=a-e.displaySize[1]*r;return{image:e,top:u,bottom:u+e.displaySize[1],left:s,right:l}}function hv(e,t,i,n,r,o){const a=e.image;let s;if(a.content){const e=a.content,t=a.pixelRatio||1;s=[e[0]/t,e[1]/t,a.displaySize[0]-e[2]/t,a.displaySize[1]-e[3]/t]}const l=t.left*o,u=t.right*o;let c,h,d,f;"width"===i||"both"===i?(f=r[0]+l-n[3],h=r[0]+u+n[1]):(f=r[0]+(l+u-a.displaySize[0])/2,h=f+a.displaySize[0]);const p=t.top*o,_=t.bottom*o;return"height"===i||"both"===i?(c=r[1]+p-n[0],d=r[1]+_+n[2]):(c=r[1]+(p+_-a.displaySize[1])/2,d=c+a.displaySize[1]),{image:a,top:c,right:h,bottom:d,left:f,collisionPadding:s}}var dv,fv=(dv=!0,function(e,t){var i=dv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return dv=!1,i}),pv=fv(void 0,(function(){return pv.toString().search("(((.+)+)+)+$").toString().constructor(pv).search("(((.+)+)+)+$")}));pv();const _v=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),mv=_v(void 0,(function(){return mv.toString().search("(((.+)+)+)+$").toString().constructor(mv).search("(((.+)+)+)+$")}));mv();const gv=128;function xv(e,t){const{expression:i}=t;if("constant"===i.kind)return{kind:"constant",layoutSize:i.evaluate(new go(e+1))};if("source"===i.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:n}=i;let r=0;for(;r-i/2;){if(--a<0)return!1;s-=e[a].dist(o),o=e[a]}s+=e[a].dist(e[a+1]),a++;for(var l=[],u=0;sn;)u-=l.shift().angleDelta;if(u>r)return!1;a++,s+=h.dist(d)}return!0}bv();var Cv,Sv=(Cv=!0,function(e,t){var i=Cv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Cv=!1,i}),wv=Sv(void 0,(function(){return wv.toString().search("(((.+)+)+)+$").toString().constructor(wv).search("(((.+)+)+)+$")}));function Ev(e,t,i){return e*(1-i)+t*i}wv();var Pv=function(){};function Av(e){for(var t=0,i=0;i=0&&y=0&&$=0&&d+u<=c){var b=new vv(y,$,x,p);b._round(),(!n||Tv(e,b,o,n,r))&&f.push(b)}}h+=g}return!s&&!f.length&&!a&&(f=Rv(e,h/2,i,n,r,o,a,!0,l)),f}Pv.getCenterAnchor=function(e,t,i,n,r,o){for(var a=Lv(i,r,o),s=Mv(i,n)*o,l=0,u=Av(e)/2,c=0;cu){var p=(u-l)/f,_=Ev(h.x,d.x,p),m=Ev(h.y,d.y,p),g=new vv(_,m,d.angleTo(h),c);return g._round(),!a||Tv(e,g,s,a,t)?g:void 0}l+=f}},Pv.getAnchors=function(e,t,i,n,r,o,a,s,l){var u=Lv(n,o,a),c=Mv(n,r),h=c*a,d=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-h=n&&h.x>=n||(c.x>=n?c=new to(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round():h.x>=n&&(h=new to(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round()),c.y>=r&&h.y>=r||(c.y>=r?c=new to(c.x+(h.x-c.x)*((r-c.y)/(h.y-c.y)),r)._round():h.y>=r&&(h=new to(c.x+(h.x-c.x)*((r-c.y)/(h.y-c.y)),r)._round()),(!l||!c.equals(l[l.length-1]))&&(l=[c],o.push(l)),l.push(h)))))}return o}Dv();var Nv,Fv=(Nv=!0,function(e,t){var i=Nv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Nv=!1,i}),Uv=Fv(void 0,(function(){return Uv.toString().search("(((.+)+)+)+$").toString().constructor(Uv).search("(((.+)+)+)+$")}));Uv();var zv=1,Gv=-17,Vv=3,kv=function(){},Wv=zv;function Hv(e,t,i){for(var n=0,r=0,o=e;r0&&(g=Math.max(10*s,g),this._addLineCollisionCircles(e,t,i,i.segment,x,g,n,r,o,c))}else{if(h){var v=new to(p,d),y=new to(_,d),$=new to(p,f),b=new to(_,f),T=h*Math.PI/180;v._rotate(T),y._rotate(T),$._rotate(T),b._rotate(T),p=Math.min(v.x,y.x,$.x,b.x),_=Math.max(v.x,y.x,$.x,b.x),d=Math.min(v.y,y.y,$.y,b.y),f=Math.max(v.y,y.y,$.y,b.y)}e.emplaceBack(i.x,i.y,p,d,_,f,n,r,o,0,0)}this.boxEndIndex=e.length};Zv.prototype._addLineCollisionCircles=function(e,t,i,n,r,o,a,s,l,u){var c=o/2,h=Math.floor(r/c)||1,d=1+.4*Math.log(u)/Math.LN2,f=Math.floor(h*d/2),p=-o/2,_=i,m=n+1,g=p,x=-r/2,v=x-r/4;do{if(--m<0){if(g>x)return;m=0;break}g-=t[m].dist(_),_=t[m]}while(g>v);for(var y=t[m].dist(t[m+1]),$=-f;$r&&(T+=b-r),!(T=t.length)return;y=t[m].dist(t[m+1])}var C=T-g,S=t[m],w=t[m+1].sub(S)._unit()._mult(C)._add(S)._round(),E=Math.abs(T-p)o)&&(o=u.x),(!l||u.y>a)&&(a=u.y)}var c=o-n,h=a-r,d=Math.min(c,h),f=d/2,p=new TinyQueue([],ny);if(0===d)return new to(n,r);for(var _=n;_g.d||!g.d)&&(g=v,i&&console.log("found best %d after %d probes",Math.round(1e4*v.d)/1e4,x)),v.max-g.d<=t||(f=v.h/2,p.push(new ry(v.p.x-f,v.p.y-f,f,e)),p.push(new ry(v.p.x+f,v.p.y-f,f,e)),p.push(new ry(v.p.x-f,v.p.y+f,f,e)),p.push(new ry(v.p.x+f,v.p.y+f,f,e)),x+=4)}return i&&(console.log("num probes: "+x),console.log("best distance: "+g.d)),g.p}function ny(e,t){return t.max-e.max}function ry(e,t,i,n){this.p=new to(e,t),this.h=i,this.d=oy(this.p,n),this.max=this.d+this.h*Math.SQRT2}function oy(e,t){for(var i=!1,n=1/0,r=0;re.y!=c.y>e.y&&e.x<(c.x-u.x)*(e.y-u.y)/(c.y-u.y)+u.x&&(i=!i),n=Math.min(n,pf.distToSegmentSquared(e,u,c))}return(i?1:-1)*Math.sqrt(n)}function ay(e){for(var t=0,i=0,n=0,r=e[0],o=0,a=r.length,s=a-1;o>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,i){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:r^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return r^=e.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}uy();const hy=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),dy=hy(void 0,(function(){return dy.toString().search("(((.+)+)+)+$").toString().constructor(dy).search("(((.+)+)+)+$")}));dy();const fy=7,py=Number.POSITIVE_INFINITY;function _y(e,t){return t[1]!==py?function(e,t,i){let n=0,r=0;switch(t=Math.abs(t),i=Math.abs(i),e){case"top-right":case"top-left":case"top":r=i-fy;break;case"bottom-right":case"bottom-left":case"bottom":r=-i+fy}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,r]}(e,t[0],t[1]):function(e,t){let i=0,n=0;t<0&&(t=0);const r=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":n=r-fy;break;case"bottom-right":case"bottom-left":n=-r+fy;break;case"bottom":n=-t+fy;break;case"top":n=t-fy}switch(e){case"top-right":case"bottom-right":i=-r;break;case"top-left":case"bottom-left":i=r;break;case"left":i=t;break;case"right":i=-t}return[i,n]}(e,t[0])}function my(e,t,i,n,r,o){e.createArrays();const a=512*e.overscaling;e.tilePixelRatio=$o/a,e.compareText={},e.iconsNeedLinear=!1;const s=e.layers[0].layout,l=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){const{minZoom:t,maxZoom:i}=e.textSizeData;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new go(t)),l["text-size"].possiblyEvaluate(new go(i))]}if("composite"===e.iconSizeData.kind){const{minZoom:t,maxZoom:i}=e.iconSizeData;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new go(t)),l["icon-size"].possiblyEvaluate(new go(i))]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new go(e.zoom+1)),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new go(e.zoom+1)),u.textMaxSize=l["text-size"].possiblyEvaluate(new go(18));const c=s.get("text-line-height")*tx,h="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),d=s.get("text-keep-upright"),f=s.get("text-size");for(const o of e.features){const a=s.get("text-font").evaluate(o,{}).join(","),l=f.evaluate(o,{}),p=u.layoutTextSize.evaluate(o,{}),_=u.layoutIconSize.evaluate(o,{}),m={horizontal:{},vertical:void 0},g=o.text;let x=[0,0];if(g){const n=g.toString(),u=s.get("text-letter-spacing").evaluate(o,{})*tx,f=Km(n)?u:0,_=s.get("text-anchor").evaluate(o,{}),v=s.get("text-variable-anchor");if(!v){const e=s.get("text-radial-offset").evaluate(o,{});x=e?_y(_,[e*tx,py]):s.get("text-offset").evaluate(o,{}).map((e=>e*tx))}let y=h?"center":s.get("text-justify").evaluate(o,{});const $=s.get("symbol-placement"),b="point"===$?s.get("text-max-width").evaluate(o,{})*tx:0,T=()=>{e.allowVerticalPlacement&&Xm(n)&&(m.vertical=Kx(g,t,i,r,a,b,c,_,"left",f,x,Vx.vertical,!0,$,p,l))};if(!h&&v){const e="auto"===y?v.map((e=>gy(e))):[y];let n=!1;for(let o=0;o{s.x<0||s.x>=$o||s.y<0||s.y>=$o||Ty(e,s,a,i,n,r,E,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,_,v,b,l,g,y,T,d,t,o,u)};if("line"===C)for(const r of Bv(t.geometry,0,0,$o,$o)){const t=Pv.getAnchors(r,x,$,i.vertical||f,n,24,m,e.overscaling,$o);for(const i of t){const t=f;(!t||!Cy(e,t.text,S,i))&&P(r,i)}}else if("line-center"===C){for(const e of t.geometry)if(e.length>1){const t=Pv.getCenterAnchor(e,$,i.vertical||f,n,24,m);t&&P(e,t)}}else if("Polygon"===t.type)for(const e of Nf(t.geometry,0)){const t=iy(e,16);P(e[0],new vv(t.x,t.y,0))}else if("LineString"===t.type)for(const e of t.geometry)P(e,new vv(e[0].x,e[0].y,0));else if("Point"===t.type)for(const e of t.geometry)for(const t of e)P([t],new vv(t.x,t.y,0))}const vy=255,yy=vy*gv;function $y(e,t,i,n,r,o,a,s,l,u,c,h,d,f){const p=kv.getGlyphQuads(t,i,s,r,o,a,n,e.allowVerticalPlacement),_=e.textSizeData;let m=null;"source"===_.kind?(m=[gv*r.layout.get("text-size").evaluate(a,{})],m[0]>yy&&zh(e.layerIds[0]+': Value for "text-size" is >= '+vy+'. Reduce your "text-size".')):"composite"===_.kind&&(m=[gv*f.compositeTextSizes[0].evaluate(a,{}),gv*f.compositeTextSizes[1].evaluate(a,{})],(m[0]>yy||m[1]>yy)&&zh(e.layerIds[0]+': Value for "text-size" is >= '+vy+'. Reduce your "text-size".')),e.addSymbols(e.text,p,m,s,o,a,u,t,l.lineStartIndex,l.lineLength,d);for(const t of c)h[t]=e.text.placedSymbolArray.length-1;return 4*p.length}function by(e){for(const t in e)return e[t];return null}function Ty(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b){const T=e.addToLineVertexArray(t,i);let C,S,w,E,P=0,A=0,L=0,M=0,R=-1,I=-1;const O={};let D=cy(""),B=0,N=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?[B,N]=s.layout.get("text-offset").evaluate(y,{}).map((e=>e*tx)):(B=s.layout.get("text-radial-offset").evaluate(y,{})*tx,N=py),e.allowVerticalPlacement&&n.vertical){const r=s.layout.get("text-rotate").evaluate(y,{})+90,o=n.vertical;w=new Zv(l,i,t,u,c,h,o,d,f,p,e.overscaling,r),a&&(E=new Zv(l,i,t,u,c,h,a,m,g,p,e.overscaling,r))}if(r){const n=s.layout.get("icon-rotate").evaluate(y,{}),o="none"!==s.layout.get("icon-text-fit"),d=kv.getIconQuads(r,n,b,o),f=a?kv.getIconQuads(a,n,b,o):void 0;S=new Zv(l,i,t,u,c,h,r,m,g,!1,e.overscaling,n),P=4*d.length;const p=e.iconSizeData;let _=null;"source"===p.kind?(_=[gv*s.layout.get("icon-size").evaluate(y,{})],_[0]>yy&&zh(e.layerIds[0]+': Value for "icon-size" is >= '+vy+'. Reduce your "icon-size".')):"composite"===p.kind&&(_=[gv*$.compositeIconSizes[0].evaluate(y,{}),gv*$.compositeIconSizes[1].evaluate(y,{})],(_[0]>yy||_[1]>yy)&&zh(e.layerIds[0]+': Value for "icon-size" is >= '+vy+'. Reduce your "icon-size".')),e.addSymbols(e.icon,d,_,v,x,y,!1,t,T.lineStartIndex,T.lineLength,-1),R=e.icon.placedSymbolArray.length-1,f&&(A=4*f.length,e.addSymbols(e.icon,f,_,v,x,y,Vx.vertical,t,T.lineStartIndex,T.lineLength,-1),I=e.icon.placedSymbolArray.length-1)}for(const r in n.horizontal){const a=n.horizontal[r];if(!C){D=cy(a.text);const n=s.layout.get("text-rotate").evaluate(y,{});C=new Zv(l,i,t,u,c,h,a,d,f,p,e.overscaling,n)}const m=1===a.positionedLines.length;if(L+=$y(e,t,a,o,s,p,y,_,T,n.vertical?Vx.horizontal:Vx.horizontalOnly,m?Object.keys(n.horizontal):[r],O,R,$),m)break}n.vertical&&(M+=$y(e,t,n.vertical,o,s,p,y,_,T,Vx.vertical,["vertical"],O,I,$));const F=C?C.boxStartIndex:e.collisionBoxArray.length,U=C?C.boxEndIndex:e.collisionBoxArray.length,z=w?w.boxStartIndex:e.collisionBoxArray.length,G=w?w.boxEndIndex:e.collisionBoxArray.length,V=S?S.boxStartIndex:e.collisionBoxArray.length,k=S?S.boxEndIndex:e.collisionBoxArray.length,W=E?E.boxStartIndex:e.collisionBoxArray.length,H=E?E.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=zy.MAX_GLYPHS&&zh("Too many glyphs being rendered in a tile."),e.symbolInstances.emplaceBack(t.x,t.y,O.right>=0?O.right:-1,O.center>=0?O.center:-1,O.left>=0?O.left:-1,O.vertical||-1,R,I,D,F,U,z,G,V,k,W,H,u,L,M,P,A,0,d,B,N)}function Cy(e,t,i,n){const r=e.compareText;if(t in r){const e=r[t];for(let t=e.length-1;t>=0;t--)if(n.dist(e[t])0&&(this.layoutVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,Fm.members)),this.indexArray.length>0&&(this.indexBuffer=Tc.toIndexBuffer(e,this.indexArray,t)),this.dynamicLayoutVertexArray.length>0&&(this.dynamicLayoutVertexBuffer=Tc.toVertexBuffer(e,this.dynamicLayoutVertexArray,Um.members,!0)),this.opacityVertexArray.length>0&&(this.opacityVertexBuffer=Tc.toVertexBuffer(e,this.opacityVertexArray,Oy,!0),this.opacityVertexBuffer.itemSize=1)),(i||n)&&this.programConfigurations.upload(e)},Fy.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.dynamicLayoutVertexBuffer&&(this.dynamicLayoutVertexBuffer.destroy(),this.dynamicLayoutVertexBuffer=null),this.opacityVertexBuffer&&(this.opacityVertexBuffer.destroy(),this.opacityVertexBuffer=null),this.programConfigurations.destroy(),this.segments.destroy()},Fy.prototype.clear=function(){},en.register("SymbolBuffers",Fy);var Uy=function(e,t,i){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new i,this.segments=new Ao,this.collisionVertexArray=new qo};Uy.prototype.upload=function(e){this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,this.layoutAttributes)),this.indexArray.length>0&&(this.indexBuffer=Tc.toIndexBuffer(e,this.indexArray)),this.collisionVertexArray.length>0&&(this.collisionVertexBuffer=Tc.toVertexBuffer(e,this.collisionVertexArray,zm.members,!0))},Uy.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.collisionVertexBuffer&&(this.collisionVertexBuffer.destroy(),this.collisionVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.segments.destroy()},en.register("CollisionBuffers",Uy);var zy=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasPaintOverrides=!1,this.hasRTLText=!1;var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=xv(this.zoom,t["text-size"]),this.iconSizeData=xv(this.zoom,t["icon-size"]);var i=this.layers[0].layout,n=i.get("symbol-sort-key"),r=i.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==r&&void 0!==n.constantOr(1);var o="viewport-y"===r||"auto"===r&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map((function(e){return Vx[e]}))),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id})),this.sourceID=e.sourceID,this.overscaling=1};zy.prototype.createArrays=function(){const e=this.layers[0].layout;this.hasPaintOverrides=Zy.hasPaintOverrides(e);var t=Fm.members;this.text=new Fy(new eh(t,this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new Fy(new eh(t,this.layers,this.zoom,(e=>/^icon/.test(e)))),this.textCollisionBox=new Uy(Ho,Gm.members,Jo),this.iconCollisionBox=new Uy(Ho,Gm.members,Jo),this.textCollisionCircle=new Uy(Ho,Vm.members,Zo),this.iconCollisionCircle=new Uy(Ho,Vm.members,Zo),this.glyphOffsetArray=new fa,this.lineVertexArray=new _a,this.symbolInstances=new ha},zy.prototype.calculateGlyphDependencies=function(e,t,i,n,r){for(let o=0;o0)&&("constant"!==r.value.kind||r.value.value.length>0),l=("constant"!==a.value.kind||!!a.value.value)&&Object.keys(a.parameters).length>0,u=n.get("symbol-sort-key");if(this.features=[],s||l){for(var c=t.iconDependencies,h=t.glyphDependencies,d=t.availableImages,f=new go(this.zoom),p=0,_=e;p<_.length;p+=1){var m=_[p],g=m.feature,x=m.index,v=m.sourceLayerIndex;if(i._featureFilter(f,g)){var y=void 0;if(s){var $=i.getValueAndResolveTokens("text-field",g,d),b=ie.factory($);Ny(b)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===getRTLTextPluginStatus()||this.hasRTLText&&plugin.isParsed())&&(y=Ay(b,i,g))}var T=void 0;if(l){var C=i.getValueAndResolveTokens("icon-image",g,d);T=C instanceof ae?C:ae.fromString(C)}if(y||T){var S=this.sortFeaturesByKey?u.evaluate(g,{}):void 0,w={text:y,icon:T,index:x,sourceLayerIndex:v,geometry:So(g),properties:g.properties,type:Iy[g.type],sortKey:S};if(void 0!==g.id&&(w.id=g.id),this.features.push(w),T&&(c[T.name]=!0),y){var E=r.evaluate(g,{}).join(","),P="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(Vx.vertical)>=0;for(var A=0,L=y.sections;A=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:r},s>0&&(r+=t[s-1].dist(t[s]));for(var l=0;l0;this.addCollisionDebugVertices(a,s,l,u,c?n?this.textCollisionCircle:this.iconCollisionCircle:n?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,i,c)}},zy.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e0},zy.prototype.hasIconData=function(){return this.icon.segments.get().length>0},zy.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},zy.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},zy.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},zy.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},zy.prototype.addIndicesForPlacedSymbol=function(e,t){for(var i=e.placedSymbolArray.get(t),n=i.vertexStartIndex+4*i.numGlyphs,r=i.vertexStartIndex;r1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var i=0,n=this.symbolInstanceIndexes;i=0&&n.indexOf(e)===i&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},en.register("SymbolBucket",zy,{omit:["layers","collisionBoxArray","compareText"]}),zy.MAX_GLYPHS=65535,zy.addDynamicAttributes=By;var Gy,Vy=(Gy=!0,function(e,t){var i=Gy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Gy=!1,i}),ky=Vy(void 0,(function(){return ky.toString().search("(((.+)+)+)+$").toString().constructor(ky).search("(((.+)+)+)+$")}));function Wy(e,t){return t.replace(/{([^{}]+)}/g,((t,i)=>i in e?String(e[i]):""))}ky();var Hy,qy={kind:"color"},jy={kind:"formatted"},Yy=new Zh({"symbol-placement":new mh(hf.layout_symbol["symbol-placement"]),"symbol-spacing":new mh(hf.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new mh(hf.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new yh(hf.layout_symbol["symbol-sort-key"]),"symbol-z-order":new mh(hf.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new mh(hf.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new mh(hf.layout_symbol["icon-ignore-placement"]),"icon-optional":new mh(hf.layout_symbol["icon-optional"]),"icon-rotation-alignment":new mh(hf.layout_symbol["icon-rotation-alignment"]),"icon-size":new yh(hf.layout_symbol["icon-size"]),"icon-text-fit":new mh(hf.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new mh(hf.layout_symbol["icon-text-fit-padding"]),"icon-image":new yh(hf.layout_symbol["icon-image"]),"icon-rotate":new yh(hf.layout_symbol["icon-rotate"]),"icon-padding":new mh(hf.layout_symbol["icon-padding"]),"icon-keep-upright":new mh(hf.layout_symbol["icon-keep-upright"]),"icon-offset":new yh(hf.layout_symbol["icon-offset"]),"icon-anchor":new yh(hf.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new mh(hf.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new mh(hf.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new mh(hf.layout_symbol["text-rotation-alignment"]),"text-field":new yh(hf.layout_symbol["text-field"]),"text-font":new yh(hf.layout_symbol["text-font"]),"text-size":new yh(hf.layout_symbol["text-size"]),"text-max-width":new yh(hf.layout_symbol["text-max-width"]),"text-line-height":new mh(hf.layout_symbol["text-line-height"]),"text-letter-spacing":new yh(hf.layout_symbol["text-letter-spacing"]),"text-justify":new yh(hf.layout_symbol["text-justify"]),"text-radial-offset":new yh(hf.layout_symbol["text-radial-offset"]),"text-variable-anchor":new mh(hf.layout_symbol["text-variable-anchor"]),"text-anchor":new yh(hf.layout_symbol["text-anchor"]),"text-max-angle":new mh(hf.layout_symbol["text-max-angle"]),"text-writing-mode":new mh(hf.layout_symbol["text-writing-mode"]),"text-rotate":new yh(hf.layout_symbol["text-rotate"]),"text-padding":new mh(hf.layout_symbol["text-padding"]),"text-keep-upright":new mh(hf.layout_symbol["text-keep-upright"]),"text-transform":new yh(hf.layout_symbol["text-transform"]),"text-offset":new yh(hf.layout_symbol["text-offset"]),"text-allow-overlap":new mh(hf.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new mh(hf.layout_symbol["text-ignore-placement"]),"text-optional":new mh(hf.layout_symbol["text-optional"])}),Xy=new Zh({"icon-opacity":new yh(hf.paint_symbol["icon-opacity"]),"icon-color":new yh(hf.paint_symbol["icon-color"]),"icon-halo-color":new yh(hf.paint_symbol["icon-halo-color"]),"icon-halo-width":new yh(hf.paint_symbol["icon-halo-width"]),"icon-halo-blur":new yh(hf.paint_symbol["icon-halo-blur"]),"icon-translate":new mh(hf.paint_symbol["icon-translate"]),"icon-translate-anchor":new mh(hf.paint_symbol["icon-translate-anchor"]),"text-opacity":new yh(hf.paint_symbol["text-opacity"]),"text-color":new yh(hf.paint_symbol["text-color"],{runtimeType:qy,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new yh(hf.paint_symbol["text-halo-color"]),"text-halo-width":new yh(hf.paint_symbol["text-halo-width"]),"text-halo-blur":new yh(hf.paint_symbol["text-halo-blur"]),"text-show-background":new yh(hf.paint_symbol["text-show-background"]),"text-translate":new mh(hf.paint_symbol["text-translate"]),"text-translate-anchor":new mh(hf.paint_symbol["text-translate-anchor"])}),Ky={paint:Xy,layout:Yy},Qy=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Ky)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){if(e.prototype.recalculate.call(this,t,i),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var r=[],o=0,a=n;o>3}r--,1===n||2===n?(o+=e.readSVarint(),a+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new to(o,a))):7===n?t&&t.push(t[0].clone()):console.log("VectorTileFeature loadGeometry unknown command "+n)}return t&&s.push(t),s},h$.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,n=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos>3}if(n--,1===i||2===i)(r+=e.readSVarint())s&&(s=r),(o+=e.readSVarint())u&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},h$.prototype.toGeoJSON=function(e,t,i){var n,r,o=this.extent*Math.pow(2,i),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=h$.types[this.type];function c(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}x$(),v$.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new h$(this._pbf,t,this.extent,this._keys,this._values)};var b$,T$=(b$=!0,function(e,t){var i=b$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return b$=!1,i}),C$=T$(void 0,(function(){return C$.toString().search("(((.+)+)+)+$").toString().constructor(C$).search("(((.+)+)+)+$")}));function S$(e,t){this.layers=e.readFields(w$,{},t)}function w$(e,t,i){if(3===e){var n=new v$(i,i.readVarint()+i.pos);n.length&&(t[n.name]=n)}}C$();var E$,P$=(E$=!0,function(e,t){var i=E$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return E$=!1,i}),A$=P$(void 0,(function(){return A$.toString().search("(((.+)+)+)+$").toString().constructor(A$).search("(((.+)+)+)+$")}));function L$(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t=c[f+0]&&n>=c[f+1])?(a[d]=!0,o.push(u[d])):a[d]=!1}}},D$.prototype._forEachCell=function(e,t,i,n,r,o,a,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(i),h=this._convertToCellCoord(n),d=l;d<=c;d++)for(var f=u;f<=h;f++){var p=this.d*f+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(f),this._convertFromCellCoord(d+1),this._convertFromCellCoord(f+1)))&&r.call(this,e,t,i,n,p,o,a,s))return}},D$.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},D$.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},D$.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=O$+this.cells.length+1+1,i=0,n=0;n=0&&h[3]>=0&&l.insert(s,h[0]-a,h[1]-a,h[2]+a,h[3]+a)}},U$.prototype.loadVTLayers=function(){return!this.vtLayers&&(this.vtLayers=new S$(new hx(this.rawTileData)).layers,this.sourceLayerCoder=new L$(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},U$.prototype.query=function(e,t,i){var n=this;this.loadVTLayers();var r=e.params||{},o=V$(this.z,e.tileSize,r),a=Br.createFilter(r.filter),s=e.queryGeometry,l=5,u=z$(s),c=[];wa(r.selectTolerance)&&(l+=o*r.selectTolerance),(c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l)).sort(G$);for(var h,d={},f=function(i){var l=c[i];if(l!==h){h=l;var u=n.featureIndexArray.get(l),f=null;n.loadMatchingFeature(d,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,a,r.layers,t,(function(t,i){return!f&&(f=So(t)),i.queryIntersectsFeature(s,t,{},f,n.z,e.transform,o,e.pixelPosMatrix,e.adjustScale)}))}},p=0;p=T.maxzoom||"none"===T.visibility)){Z$(b,0,n);var C=T.id,S=u[C]=T.createBucket({index:a.bucketLayerIDs.length,layers:b,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_,webgpu:e.webgpu});wa(e.indexData)&&wa(e.indexData[T.id])&&(c.indexData=e.indexData[T.id]),S.populate(m,c),a.bucketLayerIDs.push(b.map((function(e){return e.id})))}}}}}let E,P,A,L;const M=Dh(c.glyphDependencies,(e=>Object.keys(e).map(Number)));Object.keys(M).length?r.send("getGlyphs",{uid:0,stacks:M},((e,t)=>{!E&&(E=e,P=t,w.call(this))})):P={};const R=Object.keys(c.iconDependencies);R.length?r.send("getImages",{icons:R,source:this.source,tileID:this.tileID,type:"icons"},((e,t)=>{!E&&(E=e,A=t,w.call(this))})):A={};const I=Object.keys(c.patternDependencies);function w(){if(E)return o(E);if(P&&A&&L){const n=new j$(P),r=new x(A,L);for(var t in u){var i=u[t];i instanceof zy?(i.layers[0].layout,my(i,P,n.positions,A,r.iconPositions,this.showCollisionBoxes)):i.hasPattern&&(i instanceof $m||i instanceof im)&&i.addFeatures(c,r.patternPositions)}s.buckets=u,s.imageAtlas=r,s.glyphAtlasImage=n.image,s.featureIndex=a,s.pickId=e.pickId,this.status="done",o(null,s)}}I.length?r.send("getImages",{icons:I,source:this.source,tileID:this.tileID,type:"patterns"},((e,t)=>{!E&&(E=e,L=t,w.call(this))})):L={},w.call(this)}catch(O){console.log(O)}};const J$=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),eb=J$(void 0,(function(){return eb.toString().search("(((.+)+)+)+$").toString().constructor(eb).search("(((.+)+)+)+$")}));function tb(e,t){const i=Vg(e.request,((e,i,n,r)=>{e?t(e):i&&t(null,{vectorTile:new S$(new hx(i)),rawData:i,cacheControl:n,expires:r})}));return()=>{i.cancel(),t()}}eb();class ib{constructor(e,t,i,n){this.actor=e,this.layerIndex=t,this.availableImages=i,this.loadVectorData=n||tb,this.loading={},this.loaded={}}loadTile(e,t){const i=e.uid;this.loading||(this.loading={});const n=this.loading[i]=new Q$(e);n.abort=this.loadVectorData(e,((r,o)=>{if(delete this.loading[i],r||!o)return n.status="done",this.loaded[i]=n,t(r);const a=o.rawData,s={};o.expires&&(s.expires=o.expires),o.cacheControl&&(s.cacheControl=o.cacheControl);const l={};n.vectorTile=o.vectorTile,n.parse(e,o.vectorTile,this.layerIndex,this.availableImages,this.actor,((e,i)=>{if(e||!i)return t(e);t(null,Ih({rawTileData:a.slice(0)},i,s,l))})),this.loaded=this.loaded||{},this.loaded[i]=n}))}reloadTile(e,t){const i=this.loaded,n=e.uid,r=this;if(i&&i[n]){const o=i[n];o.showCollisionBoxes=e.showCollisionBoxes;const a=(i,n)=>{const a=o.reloadCallback;a&&(delete o.reloadCallback,o.parse(e,o.vectorTile,r.layerIndex,this.availableImages,r.actor,a)),t(i,n)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(e,o.vectorTile,this.layerIndex,this.availableImages,this.actor,a):a())}}abortTile(e,t){const i=this.loading,n=e.uid;i&&i[n]&&i[n].abort&&(i[n].abort(),delete i[n]),t()}removeTile(e,t){const i=this.loaded,n=e.uid;i&&i[n]&&delete i[n],t()}}const nb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),rb=nb(void 0,(function(){return rb.toString().search("(((.+)+)+)+$").toString().constructor(rb).search("(((.+)+)+)+$")}));rb();class ob{constructor(e){this.self=e,this.actor=new dn(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:ib},this.workerSources={},this.demWorkerSources={}}setReferrer(e,t){this.referrer=t}setImages(e,t,i){this.availableImages[e]=t,i()}setLayers(e,t,i){this.getLayerIndex(e).replace(t),i()}updateLayers(e,t,i){this.getLayerIndex(e).update(t.layers,t.removedIds),i()}loadTile(e,t,i){this.getWorkerSource(e,t.type,t.source).loadTile(t,i)}reloadTile(e,t,i){this.getWorkerSource(e,t.type,t.source).reloadTile(t,i)}abortTile(e,t,i){this.getWorkerSource(e,t.type,t.source).abortTile(t,i)}removeTile(e,t,i){this.getWorkerSource(e,t.type,t.source).removeTile(t,i)}removeSource(e,t,i){if(!this.workerSources[e]||!this.workerSources[e][t.type]||!this.workerSources[e][t.type][t.source])return;const n=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==n.removeSource?n.removeSource(t,i):i()}loadWorkerSource(e,t,i){try{this.self.importScripts(t.url),i()}catch(e){i(e.toString())}}getAvailableImages(e){let t=this.availableImages[e];return!t&&(t=[]),t}getLayerIndex(e){let t=this.layerIndexes[e];return!t&&(t=this.layerIndexes[e]=new a$),t}getWorkerSource(e,t,i){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][i]){const n={send:(t,i,n)=>{this.actor.send(t,i,n,e)}};this.workerSources[e][t][i]=new this.workerSourceTypes[t](n,this.getLayerIndex(e),this.getAvailableImages(e))}return this.workerSources[e][t][i]}enforceCacheSizeLimit(e,t){Rg(t)}}"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new ob(self))},t="("+e+")()",window.mvtWorkerUrl=window.URL.createObjectURL(new Blob([t],{type:"text/javascript"}))},"function"==typeof define&&define.amd?define(factory):factory(),e$2b(Object.create)&&(t$16.prototype=Object.create(Error.prototype),t$16.prototype.constructor=t$16),t$16.prototype.toString=function(){var e=this.name+": "+this.message;return e$2b(this.stack)&&(e+="\n"+this.stack.toString()),e},t$16.throwInstantiationError=function(){throw new t$16("This function defines an interface and should not be called directly.")};var o$1q={};function p$1f(e){return e+" is required, actual value was undefined"}function t$15(e,t,i){return"Expected "+i+" to be typeof "+t+", actual typeof was "+e}function u$_(e,t){return e??t}o$1q.typeOf={},o$1q.defined=function(e,t){if(!e$2b(t))throw new t$16(p$1f(e))},o$1q.typeOf.func=function(e,t){if("function"!=typeof t)throw new t$16(t$15(typeof t,"function",e))},o$1q.typeOf.string=function(e,t){if("string"!=typeof t)throw new t$16(t$15(typeof t,"string",e))},o$1q.typeOf.number=function(e,t){if("number"!=typeof t)throw new t$16(t$15(typeof t,"number",e))},o$1q.typeOf.number.lessThan=function(e,t,i){if(o$1q.typeOf.number(e,t),t>=i)throw new t$16("Expected "+e+" to be less than "+i+", actual value was "+t)},o$1q.typeOf.number.lessThanOrEquals=function(e,t,i){if(o$1q.typeOf.number(e,t),t>i)throw new t$16("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},o$1q.typeOf.number.greaterThan=function(e,t,i){if(o$1q.typeOf.number(e,t),t<=i)throw new t$16("Expected "+e+" to be greater than "+i+", actual value was "+t)},o$1q.typeOf.number.greaterThanOrEquals=function(e,t,i){if(o$1q.typeOf.number(e,t),t>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0}},s$11.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i>>1^t[1&e];for(;i>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},s$11.prototype.random=function(){return this.genrand_int32()*(1/4294967296)};var e$2a={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536};e$2a.sign=u$_(Math.sign,(function(e){return 0===(e=+e)||e!=e?e:e>0?1:-1})),e$2a.signNotZero=function(e){return e<0?-1:1},e$2a.toSNorm=function(e,t){return t=u$_(t,255),Math.round((.5*e$2a.clamp(e,-1,1)+.5)*t)},e$2a.fromSNorm=function(e,t){return t=u$_(t,255),e$2a.clamp(e,0,t)/t*2-1},e$2a.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:e$2a.clamp((e-t)/i,0,1)},e$2a.sinh=u$_(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),e$2a.cosh=u$_(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),e$2a.lerp=function(e,t,i){return(1-i)*e+i*t},e$2a.PI=Math.PI,e$2a.ONE_OVER_PI=1/Math.PI,e$2a.PI_OVER_TWO=Math.PI/2,e$2a.PI_OVER_THREE=Math.PI/3,e$2a.PI_OVER_FOUR=Math.PI/4,e$2a.PI_OVER_SIX=Math.PI/6,e$2a.THREE_PI_OVER_TWO=3*Math.PI/2,e$2a.TWO_PI=2*Math.PI,e$2a.ONE_OVER_TWO_PI=1/(2*Math.PI),e$2a.RADIANS_PER_DEGREE=Math.PI/180,e$2a.DEGREES_PER_RADIAN=180/Math.PI,e$2a.RADIANS_PER_ARCSECOND=e$2a.RADIANS_PER_DEGREE/3600,e$2a.toRadians=function(e){if(!e$2b(e))throw new t$16("degrees is required.");return e*e$2a.RADIANS_PER_DEGREE},e$2a.toDegrees=function(e){if(!e$2b(e))throw new t$16("radians is required.");return e*e$2a.DEGREES_PER_RADIAN},e$2a.convertLongitudeRange=function(e){if(!e$2b(e))throw new t$16("angle is required.");var t=e$2a.TWO_PI,i=e-Math.floor(e/t)*t;return i<-Math.PI?i+t:i>=Math.PI?i-t:i},e$2a.clampToLatitudeRange=function(e){if(!e$2b(e))throw new t$16("angle is required.");return e$2a.clamp(e,-1*e$2a.PI_OVER_TWO,e$2a.PI_OVER_TWO)},e$2a.negativePiToPi=function(e){if(!e$2b(e))throw new t$16("angle is required.");return e$2a.zeroToTwoPi(e+e$2a.PI)-e$2a.PI},e$2a.zeroToTwoPi=function(e){if(!e$2b(e))throw new t$16("angle is required.");var t=e$2a.mod(e,e$2a.TWO_PI);return Math.abs(t)e$2a.EPSILON14?e$2a.TWO_PI:t},e$2a.mod=function(e,t){if(!e$2b(e))throw new t$16("m is required.");if(!e$2b(t))throw new t$16("n is required.");return(e%t+t)%t},e$2a.equalsEpsilon=function(e,t,i,n){if(!e$2b(e))throw new t$16("left is required.");if(!e$2b(t))throw new t$16("right is required.");if(!e$2b(i))throw new t$16("relativeEpsilon is required.");n=u$_(n,i);var r=Math.abs(e-t);return r<=n||r<=i*Math.max(Math.abs(e),Math.abs(t))},e$2a.lessThan=function(e,t,i){if(!e$2b(e))throw new t$16("first is required.");if(!e$2b(t))throw new t$16("second is required.");if(!e$2b(i))throw new t$16("relativeEpsilon is required.");return e-t<-i},e$2a.lessThanOrEquals=function(e,t,i){if(!e$2b(e))throw new t$16("first is required.");if(!e$2b(t))throw new t$16("second is required.");if(!e$2b(i))throw new t$16("relativeEpsilon is required.");return e-ti},e$2a.greaterThanOrEquals=function(e,t,i){if(!e$2b(e))throw new t$16("first is required.");if(!e$2b(t))throw new t$16("second is required.");if(!e$2b(i))throw new t$16("relativeEpsilon is required.");return e-t>-i};var h$1a=[1];e$2a.factorial=function(e){if("number"!=typeof e||e<0)throw new t$16("A number greater than or equal to 0 is required.");var t=h$1a.length;if(e>=t)for(var i=h$1a[t-1],n=t;n<=e;n++){var r=i*n;h$1a.push(r),i=r}return h$1a[e]},e$2a.incrementWrap=function(e,t,i){if(i=u$_(i,0),!e$2b(e))throw new t$16("n is required.");if(t<=i)throw new t$16("maximumValue must be greater than minimumValue.");return++e>t&&(e=i),e},e$2a.isPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new t$16("A number greater than or equal to 0 is required.");return 0!==e&&0==(e&e-1)},e$2a.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new t$16("A number greater than or equal to 0 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},e$2a.clamp=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("min is required.");if(!e$2b(i))throw new t$16("max is required.");return ei?i:e};var I$1z=new s$11;function o$1p(e,t,i){this.x=u$_(e,0),this.y=u$_(t,0),this.z=u$_(i,0)}e$2a.setRandomNumberSeed=function(e){if(!e$2b(e))throw new t$16("seed is required.");I$1z=new s$11(e)},e$2a.nextRandomNumber=function(){return I$1z.random()},e$2a.randomBetween=function(e,t){return e$2a.nextRandomNumber()*(t-e)+e},e$2a.acosClamped=function(e){if(!e$2b(e))throw new t$16("value is required.");return Math.acos(e$2a.clamp(e,-1,1))},e$2a.asinClamped=function(e){if(!e$2b(e))throw new t$16("value is required.");return Math.asin(e$2a.clamp(e,-1,1))},e$2a.chordLength=function(e,t){if(!e$2b(e))throw new t$16("angle is required.");if(!e$2b(t))throw new t$16("radius is required.");return 2*t*Math.sin(.5*e)},e$2a.logBase=function(e,t){if(!e$2b(e))throw new t$16("number is required.");if(!e$2b(t))throw new t$16("base is required.");return Math.log(e)/Math.log(t)},e$2a.cbrt=u$_(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t})),e$2a.log2=u$_(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),e$2a.fog=function(e,t){var i=e*t;return 1-Math.exp(-i*i)},e$2a.fastApproximateAtan=function(e){return o$1q.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},e$2a.fastApproximateAtan2=function(e,t){o$1q.typeOf.number("x",e),o$1q.typeOf.number("y",t);var i,n,r=Math.abs(e);i=Math.abs(t),n=Math.max(r,i);var o=(i=Math.min(r,i))/n;if(isNaN(o))throw new t$16("either x or y must be nonzero");return r=e$2a.fastApproximateAtan(o),r=Math.abs(t)>Math.abs(e)?e$2a.PI_OVER_TWO-r:r,r=e<0?e$2a.PI-r:r,r=t<0?-r:r},o$1p.fromSpherical=function(e,t){o$1q.typeOf.object("spherical",e),e$2b(t)||(t=new o$1p);var i=e.clock,n=e.cone,r=u$_(e.magnitude,1),o=r*Math.sin(n);return t.x=o*Math.cos(i),t.y=o*Math.sin(i),t.z=r*Math.cos(n),t},o$1p.fromElements=function(e,t,i,n){return e$2b(n)?(n.x=e,n.y=t,n.z=i,n):new o$1p(e,t,i)},o$1p.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new o$1p(e.x,e.y,e.z)},o$1p.fromCartesian4=o$1p.clone,o$1p.packedLength=3,o$1p.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.x,t[i++]=e.y,t[i]=e.z,t},o$1p.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new o$1p),i.x=e[t++],i.y=e[t++],i.z=e[t],i},o$1p.packArray=function(e,t){o$1q.defined("array",e);var i=e.length,n=3*i;if(e$2b(t)){if(!Array.isArray(t)&&t.length!==n)throw new t$16("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r=O$Y)return n<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var r=n*e.x*_$18;return r+=n*e.y*M$1e,(r+=n*e.z*d$1t)*Math.pow(10,i)},e$29.prototype.toArray=function(e,t){e$29.pack(this,e,t)};var F$1m=new o$1p,L$1j=new o$1p;function P$1e(e,t,i,n,r){if(!e$2b(e))throw new t$16("cartesian is required.");if(!e$2b(t))throw new t$16("oneOverRadii is required.");if(!e$2b(i))throw new t$16("oneOverRadiiSquared is required.");if(!e$2b(n))throw new t$16("centerToleranceSquared is required.");var o=e.x,a=e.y,s=e.z,l=t.x,u=t.y,c=t.z,h=o*o*l*l,d=a*a*u*u,f=s*s*c*c,p=h+d+f,_=Math.sqrt(1/p),m=o$1p.multiplyByScalar(e,_,F$1m);if(pe$2a.EPSILON12);return e$2b(r)?(r.x=o*b,r.y=a*T,r.z=s*C,r):new o$1p(o*b,a*T,s*C)}function a$18(e,t,i){this.longitude=u$_(e,0),this.latitude=u$_(t,0),this.height=u$_(i,0)}a$18.fromRadians=function(e,t,i,n){return o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),i=u$_(i,0),e$2b(n)?(n.longitude=e,n.latitude=t,n.height=i,n):new a$18(e,t,i)},a$18.fromDegrees=function(e,t,i,n){return o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),e=e$2a.toRadians(e),t=e$2a.toRadians(t),a$18.fromRadians(e,t,i,n)};var g$1k=new o$1p,l$1i=new o$1p,w$18=new o$1p,b$1l=new o$1p(1/6378137,1/6378137,1/6356752.314245179),y$15=new o$1p(1/40680631590769,1/40680631590769,1/40408299984661.445),C$1h=e$2a.EPSILON1;function p$1e(e,t,i,n,r,o,a,s,l){this[0]=u$_(e,0),this[1]=u$_(n,0),this[2]=u$_(a,0),this[3]=u$_(t,0),this[4]=u$_(r,0),this[5]=u$_(s,0),this[6]=u$_(i,0),this[7]=u$_(o,0),this[8]=u$_(l,0),this.isMatrix3=!0}a$18.fromCartesian=function(e,t,i){var n=e$2b(t)?t.oneOverRadii:b$1l,r=e$2b(t)?t.oneOverRadiiSquared:y$15,o=P$1e(e,n,r,e$2b(t)?t._centerToleranceSquared:C$1h,l$1i);if(e$2b(o)){var a=o$1p.multiplyComponents(o,r,g$1k);a=o$1p.normalize(a,a);var s=o$1p.subtract(e,o,w$18),l=Math.atan2(a.y,a.x),u=Math.asin(a.z),c=e$2a.sign(o$1p.dot(s,e))*o$1p.magnitude(s);return e$2b(i)?(i.longitude=l,i.latitude=u,i.height=c,i):new a$18(l,u,c)}},a$18.toCartesian=function(e,t,i){return o$1q.defined("cartographic",e),o$1p.fromRadians(e.longitude,e.latitude,e.height,t,i)},a$18.sphericalDistance=function(e,t,i,n){if(o$1q.defined("longitudeA",e),o$1q.defined("longitudeB",i),o$1q.defined("latitudeA",t),o$1q.defined("latitudeB",n),e===i&&t===n)return 0;var r=e$2a.toRadians(t),o=e$2a.toRadians(n),a=e$2a.toRadians(e),s=e$2a.toRadians(i),l=a*a+r*r,u=s*s+o*o,c=(l+u-((a-s)*(a-s)+(r-o)*(r-o)))/(2*Math.sqrt(l)*Math.sqrt(u));return c=e$2a.clamp(c,-1,1),6378137*Math.acos(c)},a$18.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new a$18(e.longitude,e.latitude,e.height)},a$18.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},a$18.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},a$18.ZERO=Object.freeze(new a$18(0,0,0)),a$18.prototype.clone=function(e){return a$18.clone(this,e)},a$18.prototype.equals=function(e){return a$18.equals(this,e)},a$18.prototype.equalsEpsilon=function(e,t){return a$18.equalsEpsilon(this,e,t)},a$18.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},p$1e.packedLength=9,p$1e.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t},p$1e.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new p$1e),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i},p$1e.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new p$1e(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},p$1e.fromArray=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new p$1e),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i[4]=e[t+4],i[5]=e[t+5],i[6]=e[t+6],i[7]=e[t+7],i[8]=e[t+8],i},p$1e.fromColumnMajorArray=function(e,t){return o$1q.defined("values",e),p$1e.clone(e,t)},p$1e.fromRowMajorArray=function(e,t){return o$1q.defined("values",e),e$2b(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new p$1e(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},p$1e.fromQuaternion=function(e,t){o$1q.typeOf.object("quaternion",e);var i=e.x*e.x,n=e.x*e.y,r=e.x*e.z,o=e.x*e.w,a=e.y*e.y,s=e.y*e.z,l=e.y*e.w,u=e.z*e.z,c=e.z*e.w,h=e.w*e.w,d=i-a-u+h,f=2*(n-c),p=2*(r+l),_=2*(n+c),m=-i+a-u+h,g=2*(s-o),x=2*(r-l),v=2*(s+o),y=-i-a+u+h;return e$2b(t)?(t[0]=d,t[1]=_,t[2]=x,t[3]=f,t[4]=m,t[5]=v,t[6]=p,t[7]=g,t[8]=y,t):new p$1e(d,f,p,_,m,g,x,v,y)},p$1e.fromHeadingPitchRoll=function(e,t){o$1q.typeOf.object("headingPitchRoll",e);var i=Math.cos(-e.pitch),n=Math.cos(-e.heading),r=Math.cos(e.roll),o=Math.sin(-e.pitch),a=Math.sin(-e.heading),s=Math.sin(e.roll),l=i*n,u=-r*a+s*o*n,c=s*a+r*o*n,h=i*a,d=r*n+s*o*a,f=-s*n+r*o*a,p=-o,_=s*i,m=r*i;return e$2b(t)?(t[0]=l,t[1]=h,t[2]=p,t[3]=u,t[4]=d,t[5]=_,t[6]=c,t[7]=f,t[8]=m,t):new p$1e(l,u,c,h,d,f,p,_,m)},p$1e.fromScale=function(e,t){return o$1q.typeOf.object("scale",e),e$2b(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new p$1e(e.x,0,0,0,e.y,0,0,0,e.z)},p$1e.fromUniformScale=function(e,t){return o$1q.typeOf.number("scale",e),e$2b(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new p$1e(e,0,0,0,e,0,0,0,e)},p$1e.fromCrossProduct=function(e,t){return o$1q.typeOf.object("vector",e),e$2b(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new p$1e(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},p$1e.fromRotationX=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2b(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=i,t[5]=n,t[6]=0,t[7]=-n,t[8]=i,t):new p$1e(1,0,0,0,i,-n,0,n,i)},p$1e.fromRotationY=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2b(t)?(t[0]=i,t[1]=0,t[2]=-n,t[3]=0,t[4]=1,t[5]=0,t[6]=n,t[7]=0,t[8]=i,t):new p$1e(i,0,n,0,1,0,-n,0,i)},p$1e.fromRotationZ=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2b(t)?(t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new p$1e(i,-n,0,n,i,0,0,0,1)},p$1e.toArray=function(e,t){return o$1q.typeOf.object("matrix",e),e$2b(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},p$1e.getElementIndex=function(e,t){return o$1q.typeOf.number.greaterThanOrEquals("row",t,0),o$1q.typeOf.number.lessThanOrEquals("row",t,2),o$1q.typeOf.number.greaterThanOrEquals("column",e,0),o$1q.typeOf.number.lessThanOrEquals("column",e,2),3*e+t},p$1e.getColumn=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("result",i);var n=3*t,r=e[n],o=e[n+1],a=e[n+2];return i.x=r,i.y=o,i.z=a,i},p$1e.setColumn=function(e,t,i,n){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n);var r=3*t;return(n=p$1e.clone(e,n))[r]=i.x,n[r+1]=i.y,n[r+2]=i.z,n},p$1e.getRow=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("result",i);var n=e[t],r=e[t+3],o=e[t+6];return i.x=n,i.y=r,i.z=o,i},p$1e.setRow=function(e,t,i,n){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n),(n=p$1e.clone(e,n))[t]=i.x,n[t+3]=i.y,n[t+6]=i.z,n};var W$1d=new o$1p;p$1e.getScale=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=o$1p.magnitude(o$1p.fromElements(e[0],e[1],e[2],W$1d)),t.y=o$1p.magnitude(o$1p.fromElements(e[3],e[4],e[5],W$1d)),t.z=o$1p.magnitude(o$1p.fromElements(e[6],e[7],e[8],W$1d)),t};var A$1m=new o$1p;p$1e.getMaximumScale=function(e){return p$1e.getScale(e,A$1m),o$1p.maximumComponent(A$1m)},p$1e.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],r=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],o=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],a=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],s=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],l=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],u=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],c=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],h=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return i[0]=n,i[1]=r,i[2]=o,i[3]=a,i[4]=s,i[5]=l,i[6]=u,i[7]=c,i[8]=h,i},p$1e.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i},p$1e.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i},p$1e.multiplyByVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[3]*r+e[6]*o,s=e[1]*n+e[4]*r+e[7]*o,l=e[2]*n+e[5]*r+e[8]*o;return i.x=a,i.y=s,i.z=l,i},p$1e.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i},p$1e.multiplyByScale=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.x,i[3]=e[3]*t.y,i[4]=e[4]*t.y,i[5]=e[5]*t.y,i[6]=e[6]*t.z,i[7]=e[7]*t.z,i[8]=e[8]*t.z,i},p$1e.negate=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},p$1e.transpose=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[3],r=e[6],o=e[1],a=e[4],s=e[7],l=e[2],u=e[5],c=e[8];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=s,t[6]=l,t[7]=u,t[8]=c,t};var F$1l=new o$1p(1,1,1);function X$18(e){for(var t=0,i=0;i<9;++i){var n=e[i];t+=n*n}return Math.sqrt(t)}p$1e.getRotation=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=o$1p.divideComponents(F$1l,p$1e.getScale(e,A$1m),A$1m);return t=p$1e.multiplyByScale(e,i,t)};var D$17=[1,0,0],k$1c=[2,2,1];function H$1d(e){for(var t=0,i=0;i<3;++i){var n=e[p$1e.getElementIndex(k$1c[i],D$17[i])];t+=2*n*n}return Math.sqrt(t)}function Q$1a(e,t){for(var i=e$2a.EPSILON15,n=0,r=1,o=0;o<3;++o){var a=Math.abs(e[p$1e.getElementIndex(k$1c[o],D$17[o])]);a>n&&(r=o,n=a)}var s=1,l=0,u=D$17[r],c=k$1c[r];if(Math.abs(e[p$1e.getElementIndex(c,u)])>i){var h,d=(e[p$1e.getElementIndex(c,c)]-e[p$1e.getElementIndex(u,u)])/2/e[p$1e.getElementIndex(c,u)];l=(h=d<0?-1/(-d+Math.sqrt(1+d*d)):1/(d+Math.sqrt(1+d*d)))*(s=1/Math.sqrt(1+h*h))}return(t=p$1e.clone(p$1e.IDENTITY,t))[p$1e.getElementIndex(u,u)]=t[p$1e.getElementIndex(c,c)]=s,t[p$1e.getElementIndex(c,u)]=l,t[p$1e.getElementIndex(u,c)]=-l,t}var U$1g=new p$1e,V$18=new p$1e;function t$14(e){var t;this.name="RuntimeError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}function p$1d(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){this[0]=u$_(e,0),this[1]=u$_(r,0),this[2]=u$_(l,0),this[3]=u$_(d,0),this[4]=u$_(t,0),this[5]=u$_(o,0),this[6]=u$_(u,0),this[7]=u$_(f,0),this[8]=u$_(i,0),this[9]=u$_(a,0),this[10]=u$_(c,0),this[11]=u$_(p,0),this[12]=u$_(n,0),this[13]=u$_(s,0),this[14]=u$_(h,0),this[15]=u$_(_,0),this.isMatrix4=!0}p$1e.computeEigenDecomposition=function(e,t){o$1q.typeOf.object("matrix",e);var i=e$2a.EPSILON20,n=0,r=0;e$2b(t)||(t={});for(var o=t.unitary=p$1e.clone(p$1e.IDENTITY,t.unitary),a=t.diagonal=p$1e.clone(e,t.diagonal),s=i*X$18(a);r<10&&H$1d(a)>s;)Q$1a(a,U$1g),p$1e.transpose(U$1g,V$18),p$1e.multiply(a,U$1g,a),p$1e.multiply(V$18,a,a),p$1e.multiply(o,U$1g,o),++n>2&&(++r,n=0);return t},p$1e.abs=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},p$1e.determinant=function(e){o$1q.typeOf.object("matrix",e);var t=e[0],i=e[3],n=e[6],r=e[1],o=e[4],a=e[7],s=e[2],l=e[5],u=e[8];return t*(o*u-l*a)+r*(l*n-i*u)+s*(i*a-o*n)},p$1e.inverse=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=p$1e.determinant(e);if(Math.abs(h)<=e$2a.EPSILON15)throw new t$16("matrix is not invertible");t[0]=a*c-u*s,t[1]=u*r-n*c,t[2]=n*s-a*r,t[3]=l*s-o*c,t[4]=i*c-l*r,t[5]=o*r-i*s,t[6]=o*u-l*a,t[7]=l*n-i*u,t[8]=i*a-o*n;var d=1/h;return p$1e.multiplyByScalar(t,d,t)},p$1e.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},p$1e.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i},p$1e.IDENTITY=Object.freeze(new p$1e(1,0,0,0,1,0,0,0,1)),p$1e.ZERO=Object.freeze(new p$1e(0,0,0,0,0,0,0,0,0)),p$1e.COLUMN0ROW0=0,p$1e.COLUMN0ROW1=1,p$1e.COLUMN0ROW2=2,p$1e.COLUMN1ROW0=3,p$1e.COLUMN1ROW1=4,p$1e.COLUMN1ROW2=5,p$1e.COLUMN2ROW0=6,p$1e.COLUMN2ROW1=7,p$1e.COLUMN2ROW2=8,Object.defineProperties(p$1e.prototype,{length:{get:function(){return p$1e.packedLength}}}),p$1e.prototype.clone=function(e){return p$1e.clone(this,e)},p$1e.prototype.equals=function(e){return p$1e.equals(this,e)},p$1e.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]},p$1e.prototype.equalsEpsilon=function(e,t){return p$1e.equalsEpsilon(this,e,t)},p$1e.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},p$1e.prototype.toArray=function(e,t){p$1e.pack(this,e,t)},e$2b(Object.create)&&(t$14.prototype=Object.create(Error.prototype),t$14.prototype.constructor=t$14),t$14.prototype.toString=function(){var e=this.name+": "+this.message;return e$2b(this.stack)&&(e+="\n"+this.stack.toString()),e},p$1d.packedLength=16,p$1d.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t[i++]=e[9],t[i++]=e[10],t[i++]=e[11],t[i++]=e[12],t[i++]=e[13],t[i++]=e[14],t[i]=e[15],t},p$1d.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new p$1d),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i[9]=e[t++],i[10]=e[t++],i[11]=e[t++],i[12]=e[t++],i[13]=e[t++],i[14]=e[t++],i[15]=e[t],i},p$1d.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new p$1d(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])},p$1d.fromArray=p$1d.unpack,p$1d.fromColumnMajorArray=function(e,t){return o$1q.defined("values",e),p$1d.clone(e,t)},p$1d.fromRowMajorArray=function(e,t){return o$1q.defined("values",e),e$2b(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new p$1d(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},p$1d.fromRotationTranslation=function(e,t,i){return o$1q.typeOf.object("rotation",e),t=u$_(t,o$1p.ZERO),e$2b(i)?(i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=0,i[4]=e[3],i[5]=e[4],i[6]=e[5],i[7]=0,i[8]=e[6],i[9]=e[7],i[10]=e[8],i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,i):new p$1d(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)},p$1d.fromTranslationQuaternionRotationScale=function(e,t,i,n){o$1q.typeOf.object("translation",e),o$1q.typeOf.object("rotation",t),o$1q.typeOf.object("scale",i),e$2b(n)||(n=new p$1d);var r=i.x,o=i.y,a=i.z,s=t.x*t.x,l=t.x*t.y,u=t.x*t.z,c=t.x*t.w,h=t.y*t.y,d=t.y*t.z,f=t.y*t.w,p=t.z*t.z,_=t.z*t.w,m=t.w*t.w,g=s-h-p+m,x=2*(l-_),v=2*(u+f),y=2*(l+_),$=-s+h-p+m,b=2*(d-c),T=2*(u-f),C=2*(d+c),S=-s-h+p+m;return n[0]=g*r,n[1]=y*r,n[2]=T*r,n[3]=0,n[4]=x*o,n[5]=$*o,n[6]=C*o,n[7]=0,n[8]=v*a,n[9]=b*a,n[10]=S*a,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n},p$1d.fromTranslationRotationScale=function(e,t){return o$1q.typeOf.object("translationRotationScale",e),p$1d.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},p$1d.fromTranslation=function(e,t){return o$1q.typeOf.object("translation",e),p$1d.fromRotationTranslation(p$1e.IDENTITY,e,t)},p$1d.fromScale=function(e,t){return o$1q.typeOf.object("scale",e),e$2b(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new p$1d(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},p$1d.fromUniformScale=function(e,t){return o$1q.typeOf.number("scale",e),e$2b(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new p$1d(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};var $$1b=new o$1p,I$1y=new o$1p,i$1e=new o$1p;p$1d.fromCamera=function(e,t){o$1q.typeOf.object("camera",e);var i=e.position,n=e.direction,r=e.up;o$1q.typeOf.object("camera.position",i),o$1q.typeOf.object("camera.direction",n),o$1q.typeOf.object("camera.up",r),o$1p.normalize(n,$$1b),o$1p.normalize(o$1p.cross($$1b,r,I$1y),I$1y),o$1p.normalize(o$1p.cross(I$1y,$$1b,i$1e),i$1e);var o=I$1y.x,a=I$1y.y,s=I$1y.z,l=$$1b.x,u=$$1b.y,c=$$1b.z,h=i$1e.x,d=i$1e.y,f=i$1e.z,p=i.x,_=i.y,m=i.z,g=o*-p+a*-_+s*-m,x=h*-p+d*-_+f*-m,v=l*p+u*_+c*m;return e$2b(t)?(t[0]=o,t[1]=h,t[2]=-l,t[3]=0,t[4]=a,t[5]=d,t[6]=-u,t[7]=0,t[8]=s,t[9]=f,t[10]=-c,t[11]=0,t[12]=g,t[13]=x,t[14]=v,t[15]=1,t):new p$1d(o,a,s,g,h,d,f,x,-l,-u,-c,v,0,0,0,1)},p$1d.computePerspectiveFieldOfView=function(e,t,i,n,r){o$1q.typeOf.number.greaterThan("fovY",e,0),o$1q.typeOf.number.lessThan("fovY",e,Math.PI),o$1q.typeOf.number.greaterThan("near",i,0),o$1q.typeOf.number.greaterThan("far",n,0),o$1q.typeOf.object("result",r);var o=1/Math.tan(.5*e),a=o/t,s=(n+i)/(i-n),l=2*n*i/(i-n);return r[0]=a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=o,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=s,r[11]=-1,r[12]=0,r[13]=0,r[14]=l,r[15]=0,r},p$1d.computeOrthographicOffCenter=function(e,t,i,n,r,o,a){o$1q.typeOf.number("left",e),o$1q.typeOf.number("right",t),o$1q.typeOf.number("bottom",i),o$1q.typeOf.number("top",n),o$1q.typeOf.number("near",r),o$1q.typeOf.number("far",o),o$1q.typeOf.object("result",a);var s=1/(t-e),l=1/(n-i),u=1/(o-r),c=-(t+e)*s,h=-(n+i)*l,d=-(o+r)*u;return s*=2,l*=2,u*=-2,a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=u,a[11]=0,a[12]=c,a[13]=h,a[14]=d,a[15]=1,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,a,a),a},p$1d.computePerspectiveOffCenter=function(e,t,i,n,r,o,a){o$1q.typeOf.number("left",e),o$1q.typeOf.number("right",t),o$1q.typeOf.number("bottom",i),o$1q.typeOf.number("top",n),o$1q.typeOf.number("near",r),o$1q.typeOf.number("far",o),o$1q.typeOf.object("result",a);var s=2*r/(t-e),l=2*r/(n-i),u=(t+e)/(t-e),c=(n+i)/(n-i),h=-(o+r)/(o-r),d=-2*o*r/(o-r);return a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=u,a[9]=c,a[10]=h,a[11]=-1,a[12]=0,a[13]=0,a[14]=d,a[15]=0,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,a,a),a},p$1d.computeInfinitePerspectiveOffCenter=function(e,t,i,n,r,o){o$1q.typeOf.number("left",e),o$1q.typeOf.number("right",t),o$1q.typeOf.number("bottom",i),o$1q.typeOf.number("top",n),o$1q.typeOf.number("near",r),o$1q.typeOf.object("result",o);var a=2*r/(t-e),s=2*r/(n-i),l=(t+e)/(t-e),u=(n+i)/(n-i),c=-2*r;return o[0]=a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=l,o[9]=u,o[10]=-1,o[11]=-1,o[12]=0,o[13]=0,o[14]=c,o[15]=0,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,o,o),o},p$1d.computeViewportTransformation=function(e,t,i,n){o$1q.typeOf.object("result",n),e=u$_(e,u$_.EMPTY_OBJECT);var r=u$_(e.x,0),o=u$_(e.y,0),a=u$_(e.width,0),s=u$_(e.height,0);t=u$_(t,0);var l=.5*a,u=.5*s,c=.5*((i=u$_(i,1))-t),h=l,d=u,f=c,p=r+l,_=o+u,m=t+c;return n[0]=h,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=d,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=f,n[11]=0,n[12]=p,n[13]=_,n[14]=m,n[15]=1,n},p$1d.computeView=function(e,t,i,n,r){return o$1q.typeOf.object("position",e),o$1q.typeOf.object("direction",t),o$1q.typeOf.object("up",i),o$1q.typeOf.object("right",n),o$1q.typeOf.object("result",r),r[0]=n.x,r[1]=i.x,r[2]=-t.x,r[3]=0,r[4]=n.y,r[5]=i.y,r[6]=-t.y,r[7]=0,r[8]=n.z,r[9]=i.z,r[10]=-t.z,r[11]=0,r[12]=-o$1p.dot(n,e),r[13]=-o$1p.dot(i,e),r[14]=o$1p.dot(t,e),r[15]=1,r},p$1d.toArray=function(e,t){return o$1q.typeOf.object("matrix",e),e$2b(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},p$1d.getElementIndex=function(e,t){return o$1q.typeOf.number.greaterThanOrEquals("row",t,0),o$1q.typeOf.number.lessThanOrEquals("row",t,3),o$1q.typeOf.number.greaterThanOrEquals("column",e,0),o$1q.typeOf.number.lessThanOrEquals("column",e,3),4*e+t},p$1d.getColumn=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("result",i);var n=4*t,r=e[n],o=e[n+1],a=e[n+2],s=e[n+3];return i.x=r,i.y=o,i.z=a,i.w=s,i},p$1d.setColumn=function(e,t,i,n){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n);var r=4*t;return(n=p$1d.clone(e,n))[r]=i.x,n[r+1]=i.y,n[r+2]=i.z,n[r+3]=i.w,n},p$1d.setTranslation=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("translation",t),o$1q.typeOf.object("result",i),i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=e[15],i};var p0=new o$1p;p$1d.setScale=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i);var n=p$1d.getScale(e,p0),r=o$1p.divideComponents(t,n,p0);return p$1d.multiplyByScale(e,r,i)},p$1d.getRow=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("result",i);var n=e[t],r=e[t+4],o=e[t+8],a=e[t+12];return i.x=n,i.y=r,i.z=o,i.w=a,i},p$1d.setRow=function(e,t,i,n){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n),(n=p$1d.clone(e,n))[t]=i.x,n[t+4]=i.y,n[t+8]=i.z,n[t+12]=i.w,n};var O0=new o$1p;p$1d.getScale=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=o$1p.magnitude(o$1p.fromElements(e[0],e[1],e[2],O0)),t.y=o$1p.magnitude(o$1p.fromElements(e[4],e[5],e[6],O0)),t.z=o$1p.magnitude(o$1p.fromElements(e[8],e[9],e[10],O0)),t};var f0$1=new o$1p;p$1d.getMaximumScale=function(e){return p$1d.getScale(e,f0$1),o$1p.maximumComponent(f0$1)},p$1d.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=e[10],p=e[11],_=e[12],m=e[13],g=e[14],x=e[15],v=t[0],y=t[1],$=t[2],b=t[3],T=t[4],C=t[5],S=t[6],w=t[7],E=t[8],P=t[9],A=t[10],L=t[11],M=t[12],R=t[13],I=t[14],O=t[15],D=n*v+s*y+h*$+_*b,B=r*v+l*y+d*$+m*b,N=o*v+u*y+f*$+g*b,F=a*v+c*y+p*$+x*b,U=n*T+s*C+h*S+_*w,z=r*T+l*C+d*S+m*w,G=o*T+u*C+f*S+g*w,V=a*T+c*C+p*S+x*w,k=n*E+s*P+h*A+_*L,W=r*E+l*P+d*A+m*L,H=o*E+u*P+f*A+g*L,q=a*E+c*P+p*A+x*L,j=n*M+s*R+h*I+_*O,Y=r*M+l*R+d*I+m*O,X=o*M+u*R+f*I+g*O,K=a*M+c*R+p*I+x*O;return i[0]=D,i[1]=B,i[2]=N,i[3]=F,i[4]=U,i[5]=z,i[6]=G,i[7]=V,i[8]=k,i[9]=W,i[10]=H,i[11]=q,i[12]=j,i[13]=Y,i[14]=X,i[15]=K,i},p$1d.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i[9]=e[9]+t[9],i[10]=e[10]+t[10],i[11]=e[11]+t[11],i[12]=e[12]+t[12],i[13]=e[13]+t[13],i[14]=e[14]+t[14],i[15]=e[15]+t[15],i},p$1d.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i[9]=e[9]-t[9],i[10]=e[10]-t[10],i[11]=e[11]-t[11],i[12]=e[12]-t[12],i[13]=e[13]-t[13],i[14]=e[14]-t[14],i[15]=e[15]-t[15],i},p$1d.multiplyTransformation=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],c=e[9],h=e[10],d=e[12],f=e[13],p=e[14],_=t[0],m=t[1],g=t[2],x=t[4],v=t[5],y=t[6],$=t[8],b=t[9],T=t[10],C=t[12],S=t[13],w=t[14],E=n*_+a*m+u*g,P=r*_+s*m+c*g,A=o*_+l*m+h*g,L=n*x+a*v+u*y,M=r*x+s*v+c*y,R=o*x+l*v+h*y,I=n*$+a*b+u*T,O=r*$+s*b+c*T,D=o*$+l*b+h*T,B=n*C+a*S+u*w+d,N=r*C+s*S+c*w+f,F=o*C+l*S+h*w+p;return i[0]=E,i[1]=P,i[2]=A,i[3]=0,i[4]=L,i[5]=M,i[6]=R,i[7]=0,i[8]=I,i[9]=O,i[10]=D,i[11]=0,i[12]=B,i[13]=N,i[14]=F,i[15]=1,i},p$1d.multiplyByMatrix3=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("rotation",t),o$1q.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],c=e[9],h=e[10],d=t[0],f=t[1],p=t[2],_=t[3],m=t[4],g=t[5],x=t[6],v=t[7],y=t[8],$=n*d+a*f+u*p,b=r*d+s*f+c*p,T=o*d+l*f+h*p,C=n*_+a*m+u*g,S=r*_+s*m+c*g,w=o*_+l*m+h*g,E=n*x+a*v+u*y,P=r*x+s*v+c*y,A=o*x+l*v+h*y;return i[0]=$,i[1]=b,i[2]=T,i[3]=0,i[4]=C,i[5]=S,i[6]=w,i[7]=0,i[8]=E,i[9]=P,i[10]=A,i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},p$1d.multiplyByTranslation=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("translation",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=n*e[0]+r*e[4]+o*e[8]+e[12],s=n*e[1]+r*e[5]+o*e[9]+e[13],l=n*e[2]+r*e[6]+o*e[10]+e[14];return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=a,i[13]=s,i[14]=l,i[15]=e[15],i};var r$1e=new o$1p;p$1d.multiplyByUniformScale=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scale",t),o$1q.typeOf.object("result",i),r$1e.x=t,r$1e.y=t,r$1e.z=t,p$1d.multiplyByScale(e,r$1e,i)},p$1d.multiplyByScale=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z;return 1===n&&1===r&&1===o?p$1d.clone(e,i):(i[0]=n*e[0],i[1]=n*e[1],i[2]=n*e[2],i[3]=0,i[4]=r*e[4],i[5]=r*e[5],i[6]=r*e[6],i[7]=0,i[8]=o*e[8],i[9]=o*e[9],i[10]=o*e[10],i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=1,i)},p$1d.multiplyByVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=t.w,s=e[0]*n+e[4]*r+e[8]*o+e[12]*a,l=e[1]*n+e[5]*r+e[9]*o+e[13]*a,u=e[2]*n+e[6]*r+e[10]*o+e[14]*a,c=e[3]*n+e[7]*r+e[11]*o+e[15]*a;return i.x=s,i.y=l,i.z=u,i.w=c,i},p$1d.multiplyByPointAsVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[4]*r+e[8]*o,s=e[1]*n+e[5]*r+e[9]*o,l=e[2]*n+e[6]*r+e[10]*o;return i.x=a,i.y=s,i.z=l,i},p$1d.multiplyByPoint=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[4]*r+e[8]*o+e[12],s=e[1]*n+e[5]*r+e[9]*o+e[13],l=e[2]*n+e[6]*r+e[10]*o+e[14];return i.x=a,i.y=s,i.z=l,i},p$1d.multiplyByDirection=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z;return i.x=n*e[0]+r*e[4]+o*e[8],i.y=n*e[1]+r*e[5]+o*e[9],i.z=n*e[2]+r*e[6]+o*e[10],i},p$1d.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i[9]=e[9]*t,i[10]=e[10]*t,i[11]=e[11]*t,i[12]=e[12]*t,i[13]=e[13]*t,i[14]=e[14]*t,i[15]=e[15]*t,i},p$1d.multiplyByPlane=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("plane",t),o$1q.typeOf.object("result",i);var n=new p$1d,r=new p$1d;p$1d.inverse(e,n),p$1d.transpose(n,r);var o=new e$29(t.normal.x,t.normal.y,t.normal.z,t.distance);p$1d.multiplyByVector(r,o,o),i.normal.x=o.x,i.normal.y=o.y,i.normal.z=o.z;var a=o$1p.magnitude(i.normal);return o$1p.normalize(i.normal,i.normal),i.distance=o.w/a,i},p$1d.negate=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},p$1d.transpose=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[1],n=e[2],r=e[3],o=e[6],a=e[7],s=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=i,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[10]=e[10],t[11]=e[14],t[12]=r,t[13]=a,t[14]=s,t[15]=e[15],t},p$1d.abs=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},p$1d.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},p$1d.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i&&Math.abs(e[9]-t[9])<=i&&Math.abs(e[10]-t[10])<=i&&Math.abs(e[11]-t[11])<=i&&Math.abs(e[12]-t[12])<=i&&Math.abs(e[13]-t[13])<=i&&Math.abs(e[14]-t[14])<=i&&Math.abs(e[15]-t[15])<=i},p$1d.getTranslation=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=e[12],t.y=e[13],t.z=e[14],t},p$1d.getMatrix3=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},p$1d.getRotation=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var z0=new p$1e,h0$2=new p$1e,C0=new e$29,T0=new e$29(0,0,0,1);p$1d.inverse=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[4],r=e[8],o=e[12],a=e[1],s=e[5],l=e[9],u=e[13],c=e[2],h=e[6],d=e[10],f=e[14],p=e[3],_=e[7],m=e[11],g=e[15],x=d*g,v=f*m,y=h*g,$=f*_,b=h*m,T=d*_,C=c*g,S=f*p,w=c*m,E=d*p,P=c*_,A=h*p,L=x*s+$*l+b*u-(v*s+y*l+T*u),M=v*a+C*l+E*u-(x*a+S*l+w*u),R=y*a+S*s+P*u-($*a+C*s+A*u),I=T*a+w*s+A*l-(b*a+E*s+P*l),O=v*n+y*r+T*o-(x*n+$*r+b*o),D=x*i+S*r+w*o-(v*i+C*r+E*o),B=$*i+C*n+A*o-(y*i+S*n+P*o),N=b*i+E*n+P*r-(T*i+w*n+A*r),F=(x=r*u)*_+($=o*s)*m+(b=n*l)*g-((v=o*l)*_+(y=n*u)*m+(T=r*s)*g),U=v*p+(C=i*u)*m+(E=r*a)*g-(x*p+(S=o*a)*m+(w=i*l)*g),z=y*p+S*_+(P=i*s)*g-($*p+C*_+(A=n*a)*g),G=T*p+w*_+A*m-(b*p+E*_+P*m),V=y*d+T*f+v*h-(b*f+x*h+$*d),k=w*f+x*c+S*d-(C*d+E*f+v*c),W=C*h+A*f+$*c-(P*f+y*c+S*h),H=P*d+b*c+E*h-(w*h+A*d+T*c),q=i*L+n*M+r*R+o*I;if(Math.abs(q)>>0,o=u$_(i,0),a=o<0?Math.max(r+o,0):Math.min(o,r),s=u$_(n,r),l=s<0?Math.max(r+s,0):Math.min(s,r);a=this._radii.z-t))return i},Object.defineProperties(n$1b.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),n$1b.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=e.latitude*i,o=e.height;return e$2b(t)?(t.x=n,t.y=r,t.z=o,t):new o$1p(n,r,o)},n$1b.prototype.unproject=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=e.y*i,o=e.z;return e$2b(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new a$18(n,r,o)};var e$27={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Ae$u=Object.freeze(e$27);function h$18(e,t,i,n){this.west=u$_(e,0),this.south=u$_(t,0),this.east=u$_(i,0),this.north=u$_(n,0)}Object.defineProperties(h$18.prototype,{width:{get:function(){return h$18.computeWidth(this)}},height:{get:function(){return h$18.computeHeight(this)}}}),h$18.packedLength=4,h$18.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.west,t[i++]=e.south,t[i++]=e.east,t[i]=e.north,t},h$18.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new h$18),i.west=e[t++],i.south=e[t++],i.east=e[t++],i.north=e[t],i},h$18.computeWidth=function(e){o$1q.typeOf.object("rectangle",e);var t=e.east,i=e.west;return t=0?c.longitude:c.longitude+e$2a.TWO_PI;r=Math.min(r,h),o=Math.max(o,h)}return n-i>o-r&&(i=r,(n=o)>e$2a.PI&&(n-=e$2a.TWO_PI),i>e$2a.PI&&(i-=e$2a.TWO_PI)),e$2b(t)?(t.west=i,t.south=a,t.east=n,t.north=s,t):new h$18(i,a,n,s)},h$18.fromCartesianArray=function(e,t,i){o$1q.defined("cartesians",e),t=u$_(t,t$13.WGS84);for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0,c=e.length;u=0?h.longitude:h.longitude+e$2a.TWO_PI;o=Math.min(o,d),a=Math.max(a,d)}return r-n>a-o&&(n=o,(r=a)>e$2a.PI&&(r-=e$2a.TWO_PI),n>e$2a.PI&&(n-=e$2a.TWO_PI)),e$2b(i)?(i.west=n,i.south=s,i.east=r,i.north=l,i):new h$18(n,s,r,l)},h$18.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new h$18(e.west,e.south,e.east,e.north)},h$18.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("absoluteEpsilon",i),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},h$18.prototype.clone=function(e){return h$18.clone(this,e)},h$18.prototype.equals=function(e){return h$18.equals(this,e)},h$18.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},h$18.prototype.equalsEpsilon=function(e,t){return o$1q.typeOf.number("epsilon",t),h$18.equalsEpsilon(this,e,t)},h$18.validate=function(e){o$1q.typeOf.object("rectangle",e);var t=e.north;o$1q.typeOf.number.greaterThanOrEquals("north",t,-e$2a.PI_OVER_TWO),o$1q.typeOf.number.lessThanOrEquals("north",t,e$2a.PI_OVER_TWO);var i=e.south;o$1q.typeOf.number.greaterThanOrEquals("south",i,-e$2a.PI_OVER_TWO),o$1q.typeOf.number.lessThanOrEquals("south",i,e$2a.PI_OVER_TWO);var n=e.west;o$1q.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),o$1q.typeOf.number.lessThanOrEquals("west",n,Math.PI);var r=e.east;o$1q.typeOf.number.greaterThanOrEquals("east",r,-Math.PI),o$1q.typeOf.number.lessThanOrEquals("east",r,Math.PI)},h$18.southwest=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2b(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new a$18(e.west,e.south)},h$18.northwest=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2b(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new a$18(e.west,e.north)},h$18.northeast=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2b(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new a$18(e.east,e.north)},h$18.southeast=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2b(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new a$18(e.east,e.south)},h$18.center=function(e,t){o$1q.typeOf.object("rectangle",e);var i=e.east,n=e.west;i0?n+=e$2a.TWO_PI:o0&&(o+=e$2a.TWO_PI),n=c))return e$2b(i)?(i.west=s,i.south=u,i.east=l,i.north=c,i):new h$18(s,u,l,c)}},h$18.simpleIntersection=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("otherRectangle",t);var n=Math.max(e.west,t.west),r=Math.max(e.south,t.south),o=Math.min(e.east,t.east),a=Math.min(e.north,t.north);if(!(r>=a||n>=o))return e$2b(i)?(i.west=n,i.south=r,i.east=o,i.north=a,i):new h$18(n,r,o,a)},h$18.union=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("otherRectangle",t),e$2b(i)||(i=new h$18);var n=e.east,r=e.west,o=t.east,a=t.west;n0?n+=e$2a.TWO_PI:o0&&(o+=e$2a.TWO_PI),nr||e$2a.equalsEpsilon(i,r,e$2a.EPSILON14))&&(i=e.south&&n<=e.north};var T$1e=new a$18;h$18.subsample=function(e,t,i,n){o$1q.typeOf.object("rectangle",e),t=u$_(t,t$13.WGS84),i=u$_(i,0),e$2b(n)||(n=[]);var r=0,o=e.north,a=e.south,s=e.east,l=e.west,u=T$1e;u.height=i,u.longitude=l,u.latitude=o,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=a,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=o<0?o:a>0?a:0;for(var c=1;c<8;++c)u.longitude=-Math.PI+c*e$2a.PI_OVER_TWO,h$18.contains(e,u)&&(n[r]=t.cartographicToCartesian(u,n[r]),r++);return 0===u.latitude&&(u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++),n.length=r,n};var p$1c=new a$18;function f$18(e,t,i,n){this.x=u$_(e,0),this.y=u$_(t,0),this.width=u$_(i,0),this.height=u$_(n,0)}h$18.prototype.contains=function(e){return h$18.contains(this,h$18.southwest(e,p$1c))&&h$18.contains(this,h$18.northwest(e,p$1c))&&h$18.contains(this,h$18.southeast(e,p$1c))&&h$18.contains(this,h$18.northeast(e,p$1c))},h$18.MAX_VALUE=Object.freeze(new h$18(-Math.PI,-e$2a.PI_OVER_TWO,Math.PI,e$2a.PI_OVER_TWO)),f$18.packedLength=4,f$18.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.width,t[i]=e.height,t},f$18.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new f$18),i.x=e[t++],i.y=e[t++],i.width=e[t++],i.height=e[t],i},f$18.fromPoints=function(e,t){if(e$2b(t)||(t=new f$18),!e$2b(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,n=e[0].x,r=e[0].y,o=e[0].x,a=e[0].y,s=1;si.width?i.width=n:n<0&&(i.width-=n,i.x=t.x),r>i.height?i.height=r:r<0&&(i.height-=r,i.y=t.y),i},f$18.intersect=function(e,t){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t);var i=e.x,n=e.y,r=t.x,o=t.y;return i>r+t.width||i+e.widtho+t.height?Ae$u.OUTSIDE:Ae$u.INTERSECTING},f$18.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},f$18.prototype.clone=function(e){return f$18.clone(this,e)},f$18.prototype.intersect=function(e){return f$18.intersect(this,e)},f$18.prototype.equals=function(e){return f$18.equals(this,e)};var T$1d=new o$1p,F$1k=new o$1p,I$1x=new o$1p,J$13=new o$1p,K$13=new o$1p,Q$19=new o$1p,$$1a=new o$1p,M$1d=new o$1p,L$1i=new o$1p,H$1c=new o$1p,s$10=new o$1p,aa$7=new o$1p,da$4=4/3*e$2a.PI;i$1c.fromPoints=function(e,t){if(e$2b(t)||(t=new i$1c),!e$2b(e)||0===e.length)return t.center=o$1p.clone(o$1p.ZERO,t.center),t.radius=0,t;var i,n=o$1p.clone(e[0],$$1a),r=o$1p.clone(n,T$1d),o=o$1p.clone(n,F$1k),a=o$1p.clone(n,I$1x),s=o$1p.clone(n,J$13),l=o$1p.clone(n,K$13),u=o$1p.clone(n,Q$19),c=e.length;for(i=1;is.x&&o$1p.clone(n,s),dl.y&&o$1p.clone(n,l),fu.z&&o$1p.clone(n,u)}var p=o$1p.magnitudeSquared(o$1p.subtract(s,r,M$1d)),_=o$1p.magnitudeSquared(o$1p.subtract(l,o,M$1d)),m=o$1p.magnitudeSquared(o$1p.subtract(u,a,M$1d)),g=r,x=s,v=p;_>v&&(v=_,g=o,x=l),m>v&&(v=m,g=a,x=u);var y=L$1i;y.x=.5*(g.x+x.x),y.y=.5*(g.y+x.y),y.z=.5*(g.z+x.z);var $=o$1p.magnitudeSquared(o$1p.subtract(x,y,M$1d)),b=Math.sqrt($),T=H$1c;T.x=r.x,T.y=o.y,T.z=a.z;var C=s$10;C.x=s.x,C.y=l.y,C.z=u.z;var S=o$1p.midpoint(T,C,aa$7),w=0;for(i=0;iw&&(w=E);var P=o$1p.magnitudeSquared(o$1p.subtract(n,y,M$1d));if(P>$){var A=Math.sqrt(P);$=(b=.5*(b+A))*b;var L=A-b;y.x=(b*y.x+L*n.x)/A,y.y=(b*y.y+L*n.y)/A,y.z=(b*y.z+L*n.z)/A}}return bu.x&&o$1p.clone(r,u),pc.y&&o$1p.clone(r,c),_h.z&&o$1p.clone(r,h)}var m=o$1p.magnitudeSquared(o$1p.subtract(u,a,M$1d)),g=o$1p.magnitudeSquared(o$1p.subtract(c,s,M$1d)),x=o$1p.magnitudeSquared(o$1p.subtract(h,l,M$1d)),v=a,y=u,$=m;g>$&&($=g,v=s,y=c),x>$&&($=x,v=l,y=h);var b=L$1i;b.x=.5*(v.x+y.x),b.y=.5*(v.y+y.y),b.z=.5*(v.z+y.z);var T=o$1p.magnitudeSquared(o$1p.subtract(y,b,M$1d)),C=Math.sqrt(T),S=H$1c;S.x=a.x,S.y=s.y,S.z=l.z;var w=s$10;w.x=u.x,w.y=c.y,w.z=h.z;var E=o$1p.midpoint(S,w,aa$7),P=0;for(o=0;oP&&(P=A);var L=o$1p.magnitudeSquared(o$1p.subtract(r,b,M$1d));if(L>T){var M=Math.sqrt(L);T=(C=.5*(C+M))*C;var R=M-C;b.x=(C*b.x+R*r.x)/M,b.y=(C*b.y+R*r.y)/M,b.z=(C*b.z+R*r.z)/M}}return Cl.x&&o$1p.clone(n,l),fu.y&&o$1p.clone(n,u),pc.z&&o$1p.clone(n,c)}var _=o$1p.magnitudeSquared(o$1p.subtract(l,o,M$1d)),m=o$1p.magnitudeSquared(o$1p.subtract(u,a,M$1d)),g=o$1p.magnitudeSquared(o$1p.subtract(c,s,M$1d)),x=o,v=l,y=_;m>y&&(y=m,x=a,v=u),g>y&&(y=g,x=s,v=c);var $=L$1i;$.x=.5*(x.x+v.x),$.y=.5*(x.y+v.y),$.z=.5*(x.z+v.z);var b=o$1p.magnitudeSquared(o$1p.subtract(v,$,M$1d)),T=Math.sqrt(b),C=H$1c;C.x=o.x,C.y=a.y,C.z=s.z;var S=s$10;S.x=l.x,S.y=u.y,S.z=c.z;var w=o$1p.midpoint(C,S,aa$7),E=0;for(r=0;rE&&(E=P);var A=o$1p.magnitudeSquared(o$1p.subtract(n,$,M$1d));if(A>b){var L=Math.sqrt(A);b=(T=.5*(T+L))*T;var M=L-T;$.x=(T*$.x+M*n.x)/L,$.y=(T*$.y+M*n.y)/L,$.z=(T*$.z+M*n.z)/L}}return T=l+a)return e.clone(i),i;if(a>=l+r)return t.clone(i),i;var u=.5*(r+l+a),c=o$1p.multiplyByScalar(s,(-r+u)/l,Oa$6);return o$1p.add(c,n,c),o$1p.clone(c,i.center),i.radius=u,i};var ba$5=new o$1p;i$1c.expand=function(e,t,i){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("point",t),i=i$1c.clone(e,i);var n=o$1p.magnitude(o$1p.subtract(t,i.center,ba$5));return n>i.radius&&(i.radius=n),i},i$1c.intersectPlane=function(e,t){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("plane",t);var i=e.center,n=e.radius,r=t.normal,o=o$1p.dot(r,i)+t.distance;return o<-n?Ae$u.OUTSIDE:oe$2a.EPSILON12);var L=c*(t*t-i*i)/(i*i),M=L*(256+L*(L*(74-47*L)-128))/1024,R=h*h,I=i*(1+L*(4096+L*(L*(320-175*L)-768))/16384)*(s-M*u*(h+M*(l*(2*R-1)-M*h*(4*u*u-3)*(4*R-3)/6)/4)),O=Math.atan2(x*E,$-T*w),D=Math.atan2(m*E,$*w-T);e._distance=I,e._startHeading=O,e._endHeading=D,e._uSquared=L}var j$1h=new o$1p,L$1h=new o$1p;function F$1j(e,t,i,n){var r=o$1p.normalize(n.cartographicToCartesian(t,L$1h),j$1h),o=o$1p.normalize(n.cartographicToCartesian(i,L$1h),L$1h);o$1q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(o$1p.angleBetween(r,o))-Math.PI),.0125),$$19(e,n.maximumRadius,n.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude),e._start=a$18.clone(t,e._start),e._end=a$18.clone(i,e._end),e._start.height=0,e._end.height=0,Y$_(e)}function E$1s(e,t,i){var n=u$_(i,t$13.WGS84);this._ellipsoid=n,this._start=new a$18,this._end=new a$18,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,e$2b(e)&&e$2b(t)&&F$1j(this,e,t,n)}function e$26(e,t,i){this.minimum=o$1p.clone(u$_(e,o$1p.ZERO)),this.maximum=o$1p.clone(u$_(t,o$1p.ZERO)),i=e$2b(i)?o$1p.clone(i):o$1p.midpoint(this.minimum,this.maximum,new o$1p),this.center=i}Object.defineProperties(E$1s.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return o$1q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return o$1q.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return o$1q.defined("distance",this._distance),this._endHeading}}}),E$1s.prototype.setEndPoints=function(e,t){o$1q.defined("start",e),o$1q.defined("end",t),F$1j(this,e,t,this._ellipsoid)},E$1s.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},E$1s.prototype.interpolateUsingSurfaceDistance=function(e,t){o$1q.defined("distance",this._distance);var i=this._constants,n=i.distanceRatio+e/i.b,r=Math.cos(2*n),o=Math.cos(4*n),a=Math.cos(6*n),s=Math.sin(2*n),l=Math.sin(4*n),u=Math.sin(6*n),c=Math.sin(8*n),h=n*n,d=n*h,f=i.u8Over256,p=i.u2Over4,_=i.u6Over64,m=i.u4Over16,g=2*d*f*r/3+n*(1-p+7*m/4-15*_/4+579*f/64-(m-15*_/4+187*f/16)*r-(5*_/4-115*f/16)*o-29*f*a/16)+(p/2-m+71*_/32-85*f/16)*s+(5*m/16-5*_/4+383*f/96)*l-h*((_-11*f/2)*s+5*f*l/2)+(29*_/96-29*f/16)*u+539*f*c/1536,x=Math.asin(Math.sin(g)*i.cosineAlpha),v=Math.atan(i.a/i.b*Math.tan(x));g-=i.sigma;var y=Math.cos(2*i.sigma+g),$=Math.sin(g),b=Math.cos(g),T=i.cosineU*b,C=i.sineU*$,S=Math.atan2($*i.sineHeading,T-C*i.cosineHeading)-B$15(i.f,i.sineAlpha,i.cosineSquaredAlpha,g,$,b,y);return e$2b(t)?(t.longitude=this._start.longitude+S,t.latitude=v,t.height=0,t):new a$18(this._start.longitude+S,v,0)},e$26.fromPoints=function(e,t){if(e$2b(t)||(t=new e$26),!e$2b(e)||0===e.length)return t.minimum=o$1p.clone(o$1p.ZERO,t.minimum),t.maximum=o$1p.clone(o$1p.ZERO,t.maximum),t.center=o$1p.clone(o$1p.ZERO,t.center),t;for(var i=e[0].x,n=e[0].y,r=e[0].z,o=e[0].x,a=e[0].y,s=e[0].z,l=e.length,u=1;u0?Ae$u.INSIDE:o+r<0?Ae$u.OUTSIDE:Ae$u.INTERSECTING},e$26.prototype.clone=function(e){return e$26.clone(this,e)},e$26.prototype.intersectPlane=function(e){return e$26.intersectPlane(this,e)},e$26.prototype.equals=function(e){return e$26.equals(this,e)};var m$1d={};function p$1b(e,t,i){var n=e+t;return e$2a.sign(e)!==e$2a.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))o&&o/r0?[l/e,i/l]:[i/l,l/e]};var j$1g={};function k$1b(e,t,i,n){var r,o,a=e,s=t/3,l=i/3,u=n,c=a*l,h=s*u,d=s*s,f=l*l,p=a*l-d,_=a*u-s*l,m=s*u-f,g=4*p*m-_*_;if(g<0){var x,v,y;d*h>=c*f?(x=a,v=p,y=-2*s*p+a*_):(x=u,v=m,y=-u*_+2*l*m);var $=-(y<0?-1:1)*Math.abs(x)*Math.sqrt(-g),b=(o=-y+$)/2,T=b<0?-Math.pow(-b,1/3):Math.pow(b,1/3),C=o===$?-T:-v/T;return r=v<=0?T+C:-y/(T*T+C*C+v),d*h>=c*f?[(r-s)/a]:[-u/(r+l)]}var S=p,w=-2*s*p+a*_,E=m,P=-u*_+2*l*m,A=Math.sqrt(g),L=Math.sqrt(3)/2,M=Math.abs(Math.atan2(a*A,-w)/3);r=2*Math.sqrt(-S);var R=Math.cos(M);o=r*R;var I=r*(-R/2-L*Math.sin(M)),O=o+I>2*s?o-s:I-s,D=a,B=O/D;M=Math.abs(Math.atan2(u*A,-P)/3);var N=-u,F=(o=(r=2*Math.sqrt(-E))*(R=Math.cos(M)))+(I=r*(-R/2-L*Math.sin(M)))<2*l?o+l:I+l,U=N/F,z=-O*F-D*N,G=(l*z-s*(O*N))/(-s*z+l*(D*F));return B<=G?B<=U?G<=U?[B,G,U]:[B,U,G]:[U,B,G]:B<=U?[G,B,U]:G<=U?[G,U,B]:[U,G,B]}j$1g.computeDiscriminant=function(e,t,i,n){if("number"!=typeof e)throw new t$16("a is a required number.");if("number"!=typeof t)throw new t$16("b is a required number.");if("number"!=typeof i)throw new t$16("c is a required number.");if("number"!=typeof n)throw new t$16("d is a required number.");var r=t*t,o=i*i;return 18*e*t*i*n+r*o-27*(e*e)*(n*n)-4*(e*o*i+r*t*n)},j$1g.computeRealRoots=function(e,t,i,n){if("number"!=typeof e)throw new t$16("a is a required number.");if("number"!=typeof t)throw new t$16("b is a required number.");if("number"!=typeof i)throw new t$16("c is a required number.");if("number"!=typeof n)throw new t$16("d is a required number.");var r,o;if(0===e)return m$1d.computeRealRoots(t,i,n);if(0===t){if(0===i){if(0===n)return[0,0,0];var a=(o=-n/e)<0?-Math.pow(-o,1/3):Math.pow(o,1/3);return[a,a,a]}return 0===n?0===(r=m$1d.computeRealRoots(e,0,i)).Length?[0]:[r[0],0,r[1]]:k$1b(e,0,i,n)}return 0===i?0===n?(o=-t/e)<0?[o,0,0]:[0,0,o]:k$1b(e,t,0,n):0===n?0===(r=m$1d.computeRealRoots(e,t,i)).length?[0]:r[1]<=0?[r[0],r[1],0]:r[0]>=0?[0,r[0],r[1]]:[r[0],0,r[1]]:k$1b(e,t,i,n)};var F$1i={};function P$1d(e,t,i,n){var r=e*e,o=t-3*r/8,a=i-t*e/2+r*e/8,s=n-i*e/4+t*r/16-3*r*r/256,l=j$1g.computeRealRoots(1,2*o,o*o-4*s,-a*a);if(l.length>0){var u=-e/4,c=l[l.length-1];if(Math.abs(c)=0&&p>=0){var _=Math.sqrt(f),m=Math.sqrt(p);return[u-m,u-_,u+_,u+m]}if(f>=0&&p<0)return[u-(d=Math.sqrt(f)),u+d];if(f<0&&p>=0)return[u-(d=Math.sqrt(p)),u+d]}return[]}if(c>0){var g=Math.sqrt(c),x=(o+c-a/g)/2,v=(o+c+a/g)/2,y=m$1d.computeRealRoots(1,g,x),$=m$1d.computeRealRoots(1,-g,v);return 0!==y.length?(y[0]+=u,y[1]+=u,0!==$.length?($[0]+=u,$[1]+=u,y[1]<=$[0]?[y[0],y[1],$[0],$[1]]:$[1]<=y[0]?[$[0],$[1],y[0],y[1]]:y[0]>=$[0]&&y[1]<=$[1]?[$[0],y[0],y[1],$[1]]:$[0]>=y[0]&&$[1]<=y[1]?[y[0],$[0],$[1],y[1]]:y[0]>$[0]&&y[0]<$[1]?[$[0],y[0],$[1],y[1]]:[y[0],$[0],y[1],$[1]]):y):0!==$.length?($[0]+=u,$[1]+=u,$):[]}}return[]}function y$13(e,t,i,n){var r=e*e,o=-2*t,a=i*e+t*t-4*n,s=r*n-i*t*e+i*i,l=j$1g.computeRealRoots(1,o,a,s);if(l.length>0){var u,c,h,d,f,p,_=l[0],m=t-_,g=m*m,x=e/2,v=m/2,y=g-4*n,$=g+4*Math.abs(n),b=r-4*_,T=r+4*Math.abs(_);if(_<0||y*T=E[0]&&w[1]<=E[1]?[E[0],w[0],w[1],E[1]]:E[0]>=w[0]&&E[1]<=w[1]?[w[0],E[0],E[1],w[1]]:w[0]>E[0]&&w[0]_)||(a=o$1p.cross(o,d,H$1b),(l=o$1p.dot(h,a))<0||s+l>_))return;u=o$1p.dot(f,a)/_}else{if(Math.abs(_)1||(a=o$1p.cross(o,d,H$1b),(l=o$1p.dot(h,a)*m)<0||s+l>1))return;u=o$1p.dot(f,a)*m}return u},g$1h.rayTriangle=function(e,t,i,n,r,o){var a=g$1h.rayTriangleParametric(e,t,i,n,r);if(e$2b(a)&&!(a<0))return e$2b(o)||(o=new o$1p),o$1p.multiplyByScalar(e.direction,a,o),o$1p.add(e.origin,o,o)};var fr$5=new f$17;function vr$8(e,t,i,n){var r=t*t-4*e*i;if(!(r<0)){if(r>0){var o=1/(2*e),a=Math.sqrt(r),s=(-t+a)*o,l=(-t-a)*o;return so$1p.distance(e,t)))return e$2b(a)||(a=new o$1p),o$1p.multiplyByScalar(s.direction,l,a),o$1p.add(s.origin,a,a)};var cr$6={root0:0,root1:0};function J$12(e,t,i){e$2b(i)||(i=new o$1n);var n=e.origin,r=e.direction,o=t.center,a=t.radius*t.radius,s=o$1p.subtract(n,o,Y$Z),l=vr$8(o$1p.dot(r,r),2*o$1p.dot(r,s),o$1p.magnitudeSquared(s)-a,cr$6);if(e$2b(l))return i.start=l.root0,i.stop=l.root1,i}g$1h.raySphere=function(e,t,i){if(!e$2b(e))throw new t$16("ray is required.");if(!e$2b(t))throw new t$16("sphere is required.");if(e$2b(i=J$12(e,t,i))&&!(i.stop<0))return i.start=Math.max(i.start,0),i};var ur$9=new f$17;g$1h.lineSegmentSphere=function(e,t,i,n){if(!e$2b(e))throw new t$16("p0 is required.");if(!e$2b(t))throw new t$16("p1 is required.");if(!e$2b(i))throw new t$16("sphere is required.");var r=ur$9;o$1p.clone(e,r.origin);var o=o$1p.subtract(t,e,r.direction),a=o$1p.magnitude(o);if(o$1p.normalize(o,o),!(!e$2b(n=J$12(r,i,n))||n.stop<0||n.start>a))return n.start=Math.max(n.start,0),n.stop=Math.min(n.stop,a),n};var sr$8=new o$1p,hr$5=new o$1p;function E$1r(e,t,i){var n=e+t;return e$2a.sign(e)!==e$2a.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))0?f.push(new o$1p(n,r*P,r*-M)):0!==M?(f.push(new o$1p(n,r*P,r*-M)),f.push(new o$1p(n,r*P,r*M)),++E):f.push(new o$1p(n,r*P,r*M))}return f}g$1h.rayEllipsoid=function(e,t){if(!e$2b(e))throw new t$16("ray is required.");if(!e$2b(t))throw new t$16("ellipsoid is required.");var i,n,r,o,a,s=t.oneOverRadii,l=o$1p.multiplyComponents(s,e.origin,sr$8),u=o$1p.multiplyComponents(s,e.direction,hr$5),c=o$1p.magnitudeSquared(l),h=o$1p.dot(l,u);if(c>1){if(h>=0)return;var d=h*h;if(i=c-1,d<(r=(n=o$1p.magnitudeSquared(u))*i))return;if(d>r){o=h*h-r;var f=(a=-h+Math.sqrt(o))/n,p=i/a;return f=0)return i}var o=e$2b(this.rayEllipsoid(e,t)),a=t.transformPositionToScaledSpace(n,Z$1a),s=o$1p.normalize(a,a),l=o$1p.mostOrthogonalAxis(a,V$17),u=o$1p.normalize(o$1p.cross(l,s,K$12),K$12),c=o$1p.normalize(o$1p.cross(s,u,X$17),X$17),h=gr$7;h[0]=s.x,h[1]=s.y,h[2]=s.z,h[3]=u.x,h[4]=u.y,h[5]=u.z,h[6]=c.x,h[7]=c.y,h[8]=c.z;var d=p$1e.transpose(h,Sr$5),f=p$1e.fromScale(t.radii,lr$9),p=p$1e.fromScale(t.oneOverRadii,qr$3),_=yr$6;_[0]=0,_[1]=-n.z,_[2]=n.y,_[3]=n.z,_[4]=0,_[5]=-n.x,_[6]=-n.y,_[7]=n.x,_[8]=0;var m,g,x=p$1e.multiply(p$1e.multiply(d,p,$$18),_,$$18),v=p$1e.multiply(p$1e.multiply(x,f,k$1a),h,k$1a),y=p$1e.multiplyByVector(x,i,wr$4),$=mr$7(v,o$1p.negate(y,Z$1a),0,0,1),b=$.length;if(b>0){for(var T=o$1p.clone(o$1p.ZERO,Or$4),C=Number.NEGATIVE_INFINITY,S=0;SC&&(C=E,T=o$1p.clone(m,T))}var P=t.cartesianToCartographic(T,Mr$5);return C=e$2a.clamp(C,0,1),g=o$1p.magnitude(o$1p.subtract(T,i,V$17))*Math.sqrt(1-C*C),g=o?-g:g,P.height=g,t.cartographicToCartesian(P,new o$1p)}};var Pr$4=new o$1p;function o$1m(e,t){if(o$1q.typeOf.object("normal",e),!e$2a.equalsEpsilon(o$1p.magnitude(e),1,e$2a.EPSILON6))throw new t$16("normal must be normalized.");o$1q.typeOf.number("distance",t),this.normal=o$1p.clone(e),this.distance=t}g$1h.lineSegmentPlane=function(e,t,i,n){if(!e$2b(e))throw new t$16("endPoint0 is required.");if(!e$2b(t))throw new t$16("endPoint1 is required.");if(!e$2b(i))throw new t$16("plane is required.");e$2b(n)||(n=new o$1p);var r=o$1p.subtract(t,e,Pr$4),o=i.normal,a=o$1p.dot(o,r);if(!(Math.abs(a)1))return o$1p.multiplyByScalar(r,l,n),o$1p.add(e,n,n),n}},g$1h.trianglePlaneIntersection=function(e,t,i,n){if(!(e$2b(e)&&e$2b(t)&&e$2b(i)&&e$2b(n)))throw new t$16("p0, p1, p2, and plane are required.");var r,o,a=n.normal,s=n.distance,l=o$1p.dot(a,e)+s<0,u=o$1p.dot(a,t)+s<0,c=o$1p.dot(a,i)+s<0,h=0;if(h+=l?1:0,h+=u?1:0,(1===(h+=c?1:0)||2===h)&&(r=new o$1p,o=new o$1p),1===h){if(l)return g$1h.lineSegmentPlane(e,t,n,r),g$1h.lineSegmentPlane(e,i,n,o),{positions:[e,t,i,r,o],indices:[0,3,4,1,2,4,1,4,3]};if(u)return g$1h.lineSegmentPlane(t,i,n,r),g$1h.lineSegmentPlane(t,e,n,o),{positions:[e,t,i,r,o],indices:[1,3,4,2,0,4,2,4,3]};if(c)return g$1h.lineSegmentPlane(i,e,n,r),g$1h.lineSegmentPlane(i,t,n,o),{positions:[e,t,i,r,o],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===h){if(!l)return g$1h.lineSegmentPlane(t,e,n,r),g$1h.lineSegmentPlane(i,e,n,o),{positions:[e,t,i,r,o],indices:[1,2,4,1,4,3,0,3,4]};if(!u)return g$1h.lineSegmentPlane(i,t,n,r),g$1h.lineSegmentPlane(e,t,n,o),{positions:[e,t,i,r,o],indices:[2,0,4,2,4,3,1,3,4]};if(!c)return g$1h.lineSegmentPlane(e,i,n,r),g$1h.lineSegmentPlane(t,i,n,o),{positions:[e,t,i,r,o],indices:[0,1,4,0,4,3,2,3,4]}}},o$1m.fromPointNormal=function(e,t,i){if(o$1q.typeOf.object("point",e),o$1q.typeOf.object("normal",t),!e$2a.equalsEpsilon(o$1p.magnitude(t),1,e$2a.EPSILON6))throw new t$16("normal must be normalized.");var n=-o$1p.dot(t,e);return e$2b(i)?(o$1p.clone(t,i.normal),i.distance=n,i):new o$1m(t,n)};var m$1c=new o$1p;o$1m.fromCartesian4=function(e,t){o$1q.typeOf.object("coefficients",e);var i=o$1p.fromCartesian4(e,m$1c),n=e.w;if(!e$2a.equalsEpsilon(o$1p.magnitude(i),1,e$2a.EPSILON6))throw new t$16("normal must be normalized.");return e$2b(t)?(o$1p.clone(i,t.normal),t.distance=n,t):new o$1m(i,n)},o$1m.getPointDistance=function(e,t){return o$1q.typeOf.object("plane",e),o$1q.typeOf.object("point",t),o$1p.dot(e.normal,t)+e.distance};var O$V=new o$1p;o$1m.projectPointOntoPlane=function(e,t,i){o$1q.typeOf.object("plane",e),o$1q.typeOf.object("point",t),e$2b(i)||(i=new o$1p);var n=o$1m.getPointDistance(e,t),r=o$1p.multiplyByScalar(e.normal,n,O$V);return o$1p.subtract(t,r,i)};var l$1h=new o$1p,H$1a,M$1c,S$11;function o$1l(e,t,i,n){return y$12(e).then(t,i,n)}function y$12(e){var t,i;return e instanceof _$16?t=e:T$1c(e)?(i=k$19(),e.then((function(e){i.resolve(e)}),(function(e){i.reject(e)}),(function(e){i.progress(e)})),t=i.promise):t=G$1m(e),t}function D$16(e){return o$1l(e,b$1j)}function _$16(e){this.then=e}function G$1m(e){var t=new _$16((function(t){try{return y$12(t?t(e):e)}catch(e){return b$1j(e)}}));return t}function b$1j(e){var t=new _$16((function(t,i){try{return i?y$12(i(e)):b$1j(e)}catch(e){return b$1j(e)}}));return t}function k$19(){var e,t,i,n,r,o;return e=new _$16(a),t=[],i=[],n=function(e,n,r){var o,a;return o=k$19(),a="function"==typeof r?function(e){try{o.progress(r(e))}catch(e){o.progress(e)}}:function(e){o.progress(e)},t.push((function(t){t.then(e,n).then(o.resolve,o.reject,a)})),i.push(a),o.promise},r=function(e){return Q$18(i,e),e},o=function(e){return e=y$12(e),n=e.then,o=y$12,r=P$1c,Q$18(t,e),i=t=S$11,e},{then:a,resolve:s,reject:l,progress:u,promise:e,resolver:{resolve:s,reject:l,progress:u}};function a(e,t,i){return n(e,t,i)}function s(e){return o(e)}function l(e){return o(b$1j(e))}function u(e){return r(e)}}function T$1c(e){return e&&"function"==typeof e.then}function A$1l(e,t,i,n,r){return E$1q(2,arguments),o$1l(e,(function(e){var o,a,s,l,u,c,h,d,f,p;if(f=e.length>>>0,o=Math.max(0,Math.min(t,f)),s=[],a=f-o+1,l=[],u=k$19(),o)for(d=u.progress,h=function(e){l.push(e),--a||(c=h=P$1c,u.reject(l))},c=function(e){s.push(e),--o||(c=h=P$1c,u.resolve(s))},p=0;p>>0,h=e.length>>>0,r=[],o=[],u=(a=k$19()).progress,l=function(e){o.push(e),--h||(s=l=P$1c,a.resolve(r))},s=function(e,t){r[t]=e,--h||(s=l=P$1c,a.resolve(r))},d=0;d>>0,i=[],s=k$19(),r)for(o=function(e,n){o$1l(e,t).then((function(e){i[n]=e,--r||s.resolve(i)}),s.reject)},a=0;a2;return o$1l(e,(function(e){return e=n?i:e,t.resolve(e),e}),(function(e){return t.reject(e),b$1j(e)}),t.progress)}function Q$18(e,t){for(var i,n=0;i=e[n++];)i(t)}function E$1q(e,t){for(var i,n=t.length;n>e;)if(null!=(i=t[--n])&&"function"!=typeof i)throw new Error("arg "+n+" must be a function")}function P$1c(){}function q$1g(e){return e}function a$17(e,t,i){o$1q.defined("array",e),o$1q.defined("itemToFind",t),o$1q.defined("comparator",i);for(var n,r,o=0,a=e.length-1;o<=a;)if((r=i(e[n=~~((o+a)/2)],t))<0)o=n+1;else{if(!(r>0))return n;a=n-1}return~(a+1)}function n$1a(e,t,i,n,r){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=i,this.yPoleOffset=n,this.ut1MinusUtc=r}function $$17(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,t=arguments,i=0,n=t[i++],r=function(e,t,i,n){i||(i=" ");var r=e.length>=t?"":Array(1+t-e.length>>>0).join(i);return n?e+r:r+e},o=function(e,t,i,n,o,a){var s=n-e.length;return s>0&&(e=i||!o?r(e,n,a,i):e.slice(0,t.length)+r("",s,"0",!0)+e.slice(t.length)),e},a=function(e,t,i,n,a,s,l){var u=e>>>0;return e=(i=i&&u&&{2:"0b",8:"0",16:"0x"}[t]||"")+r(u.toString(t),s||0,"0",!1),o(e,i,n,a,l)},s=function(e,t,i,n,r,a){return null!=n&&(e=e.slice(0,n)),o(e,"",t,i,r,a)},l=function(e,n,l,u,c,h,d){var f,p,_,m,g;if("%%"==e)return"%";for(var x=!1,v="",y=!1,$=!1,b=" ",T=l.length,C=0;l&&C-1?6:"d"==d?0:void 0,g=n?t[n.slice(0,-1)]:t[i++],d){case"s":return s(String(g),x,u,h,y,b);case"c":return s(String.fromCharCode(+g),x,u,h,y);case"b":return a(g,2,$,x,u,h,y);case"o":return a(g,8,$,x,u,h,y);case"x":return a(g,16,$,x,u,h,y);case"X":return a(g,16,$,x,u,h,y).toUpperCase();case"u":return a(g,10,$,x,u,h,y);case"i":case"d":return f=+g||0,g=(p=(f=Math.round(f-f%1))<0?"-":v)+r(String(Math.abs(f)),h,"0",!1),o(g,p,x,u,y);case"e":case"E":case"f":case"F":case"g":case"G":return p=(f=+g)<0?"-":v,_=["toExponential","toFixed","toPrecision"]["efg".indexOf(d.toLowerCase())],m=["toString","toUpperCase"]["eEfFgG".indexOf(d)%2],g=p+Math.abs(f)[_](h),o(g,p,x,u,y)[m]();default:return e}};return n.replace(e,l)}function d$1r(e,t,i,n,r,o,a,s){this.year=e,this.month=t,this.day=i,this.hour=n,this.minute=r,this.second=o,this.millisecond=a,this.isLeapSecond=s}function i$1b(e){if(null===e||isNaN(e))throw new t$16("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0}function a$16(e,t){this.julianDate=e,this.offset=t}o$1m.transform=function(e,t,i){return o$1q.typeOf.object("plane",e),o$1q.typeOf.object("transform",t),p$1d.multiplyByPointAsVector(t,e.normal,m$1c),o$1p.normalize(m$1c,m$1c),o$1p.multiplyByScalar(e.normal,-e.distance,l$1h),p$1d.multiplyByPoint(t,l$1h,l$1h),o$1m.fromPointNormal(l$1h,m$1c,i)},o$1m.clone=function(e,t){return o$1q.typeOf.object("plane",e),e$2b(t)?(o$1p.clone(e.normal,t.normal),t.distance=e.distance,t):new o$1m(e.normal,e.distance)},o$1m.equals=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.distance===t.distance&&o$1p.equals(e.normal,t.normal)},o$1m.ORIGIN_XY_PLANE=Object.freeze(new o$1m(o$1p.UNIT_Z,0)),o$1m.ORIGIN_YZ_PLANE=Object.freeze(new o$1m(o$1p.UNIT_X,0)),o$1m.ORIGIN_ZX_PLANE=Object.freeze(new o$1m(o$1p.UNIT_Y,0)),o$1l.defer=k$19,o$1l.resolve=y$12,o$1l.reject=D$16,o$1l.join=K$11,o$1l.all=L$1g,o$1l.map=x$1l,o$1l.reduce=N$_,o$1l.any=J$11,o$1l.some=A$1l,o$1l.allSettled=I$1w,o$1l.chain=U$1f,o$1l.isPromise=T$1c,_$16.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(S$11,e)},yield:function(e){return this.then((function(){return e}))},spread:function(e){return this.then((function(t){return L$1g(t,(function(t){return e.apply(S$11,t)}))}))}},M$1c=[].slice,H$1a=[].reduce||function(e){var t,i,n,r,o;if(o=0,r=(t=Object(this)).length>>>0,(i=arguments).length<=1)for(;;){if(o in t){n=t[o++];break}if(++o>=r)throw new TypeError}else n=i[1];for(;o=t.length&&(i=t.length-1);var n=t[i].offset;i>0&&(a$15.secondsDifference(t[i].julianDate,e)>n&&(n=t[--i].offset));a$15.addSeconds(e,n,e)}function F$1g(e,t){O$U.julianDate=e;var i=a$15.leapSeconds,n=a$17(i,O$U,H$18);if(n<0&&(n=~n),0===n)return a$15.addSeconds(e,-i[0].offset,t);if(n>=i.length)return a$15.addSeconds(e,-i[n-1].offset,t);var r=a$15.secondsDifference(i[n].julianDate,e);return 0===r?a$15.addSeconds(e,-i[n].offset,t):r<=1?void 0:a$15.addSeconds(e,-i[--n].offset,t)}function I$1v(e,t,i){var n=t/h$17.SECONDS_PER_DAY|0;return e+=n,(t-=h$17.SECONDS_PER_DAY*n)<0&&(e--,t+=h$17.SECONDS_PER_DAY),i.dayNumber=e,i.secondsOfDay=t,i}function x$1k(e,t,i,n,r,o,a){var s=(t-14)/12|0,l=e+4800+s,u=(1461*l/4|0)+(367*(t-2-12*s)/12|0)-(3*((l+100)/100|0)/4|0)+i-32075;(n-=12)<0&&(n+=24);var c=o+(n*h$17.SECONDS_PER_HOUR+r*h$17.SECONDS_PER_MINUTE+a*h$17.SECONDS_PER_MILLISECOND);return c>=43200&&(u-=1),[u,c]}var V$16=/^(\d{4})$/,B$14=/^(\d{4})-(\d{2})$/,K$10=/^(\d{4})-?(\d{3})$/,Q$17=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,X$16=/^(\d{4})-?(\d{2})-?(\d{2})$/,G$1l=/([Z+\-])?(\d{2})?:?(\d{2})?$/,j$1e=/^(\d{2})(\.\d+)?/.source+G$1l.source,ee$B=/^(\d{2}):?(\d{2})(\.\d+)?/.source+G$1l.source,ne$L=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+G$1l.source,y$11="Invalid ISO 8601 date.";function a$15(e,t,i){this.dayNumber=void 0,this.secondsOfDay=void 0,e=u$_(e,0),t=u$_(t,0),i=u$_(i,H$19.UTC);var n=0|e;I$1v(n,t+=(e-n)*h$17.SECONDS_PER_DAY,this),i===H$19.UTC&&q$1f(this)}a$15.fromGregorianDate=function(e,t){if(!(e instanceof d$1r))throw new t$16("date must be a valid GregorianDate.");var i=x$1k(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return e$2b(t)?(I$1v(i[0],i[1],t),q$1f(t),t):new a$15(i[0],i[1],H$19.UTC)},a$15.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new t$16("date must be a valid JavaScript Date.");var i=x$1k(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return e$2b(t)?(I$1v(i[0],i[1],t),q$1f(t),t):new a$15(i[0],i[1],H$19.UTC)},a$15.fromIso8601=function(e,t){if("string"!=typeof e)throw new t$16(y$11);var i,n,r,o,a,s=(e=e.replace(",",".")).split("T"),l=1,u=1,c=0,h=0,d=0,f=0,p=s[0],_=s[1];if(!e$2b(p))throw new t$16(y$11);if(null!==(s=p.match(X$16))){if((o=p.split("-").length-1)>0&&2!==o)throw new t$16(y$11);i=+s[1],l=+s[2],u=+s[3]}else if(null!==(s=p.match(B$14)))i=+s[1],l=+s[2];else if(null!==(s=p.match(V$16)))i=+s[1];else{var m;if(null!==(s=p.match(K$10))){if(i=+s[1],m=+s[2],r=i$1b(i),m<1||r&&m>366||!r&&m>365)throw new t$16(y$11)}else{if(null===(s=p.match(Q$17)))throw new t$16(y$11);i=+s[1];var g=+s[2],x=+s[3]||0;if((o=p.split("-").length-1)>0&&(!e$2b(s[3])&&1!==o||e$2b(s[3])&&2!==o))throw new t$16(y$11);m=7*g+x-new Date(Date.UTC(i,0,4)).getUTCDay()-3}(n=new Date(Date.UTC(i,0,1))).setUTCDate(m),l=n.getUTCMonth()+1,u=n.getUTCDate()}if(r=i$1b(i),l<1||l>12||u<1||(2!==l||!r)&&u>U$1e[l-1]||r&&2===l&&u>b$1i)throw new t$16(y$11);if(e$2b(_)){if(null!==(s=_.match(ne$L))){if((o=_.split(":").length-1)>0&&2!==o&&3!==o)throw new t$16(y$11);c=+s[1],h=+s[2],d=+s[3],f=1e3*+(s[4]||0),a=5}else if(null!==(s=_.match(ee$B))){if((o=_.split(":").length-1)>2)throw new t$16(y$11);c=+s[1],h=+s[2],d=60*+(s[3]||0),a=4}else{if(null===(s=_.match(j$1e)))throw new t$16(y$11);c=+s[1],h=60*+(s[2]||0),a=3}if(h>=60||d>=61||c>24||24===c&&(h>0||d>0||f>0))throw new t$16(y$11);var v=s[a],y=+s[a+1],$=+(s[a+2]||0);switch(v){case"+":c-=y,h-=$;break;case"-":c+=y,h+=$;break;case"Z":break;default:h+=new Date(Date.UTC(i,l-1,u,c,h)).getTimezoneOffset()}}var b=60===d;for(b&&d--;h>=60;)h-=60,c++;for(;c>=24;)c-=24,u++;for(n=r&&2===l?b$1i:U$1e[l-1];u>n;)u-=n,++l>12&&(l-=12,i++),n=r&&2===l?b$1i:U$1e[l-1];for(;h<0;)h+=60,c--;for(;c<0;)c+=24,u--;for(;u<1;)--l<1&&(l+=12,i--),u+=n=r&&2===l?b$1i:U$1e[l-1];var T=x$1k(i,l,u,c,h,d,f);return e$2b(t)?(I$1v(T[0],T[1],t),q$1f(t)):t=new a$15(T[0],T[1],H$19.UTC),b&&a$15.addSeconds(t,1,t),t},a$15.now=function(e){return a$15.fromDate(new Date,e)};var g$1g=new a$15(0,0,H$19.TAI);function h$16(e){if(e instanceof h$16)this.scheme=e.scheme,this.authority=e.authority,this.path=e.path,this.query=e.query,this.fragment=e.fragment;else if(e){var t=o$1k.exec(e);this.scheme=t[1],this.authority=t[2],this.path=t[3],this.query=t[4],this.fragment=t[5]}}a$15.toGregorianDate=function(e,t){if(!e$2b(e))throw new t$16("julianDate is required.");var i=!1,n=F$1g(e,g$1g);e$2b(n)||(a$15.addSeconds(e,-1,g$1g),n=F$1g(g$1g,g$1g),i=!0);var r=n.dayNumber,o=n.secondsOfDay;o>=43200&&(r+=1);var a=r+68569|0,s=4*a/146097|0,l=4e3*((a=a-((146097*s+3)/4|0)|0)+1)/1461001|0,u=80*(a=a-(1461*l/4|0)+31|0)/2447|0,c=a-(2447*u/80|0)|0,h=u+2-12*(a=u/11|0)|0,d=100*(s-49)+l+a|0,f=o/h$17.SECONDS_PER_HOUR|0,p=o-f*h$17.SECONDS_PER_HOUR,_=p/h$17.SECONDS_PER_MINUTE|0,m=0|(p-=_*h$17.SECONDS_PER_MINUTE),g=(p-m)/h$17.SECONDS_PER_MILLISECOND;return(f+=12)>23&&(f-=24),i&&(m+=1),e$2b(t)?(t.year=d,t.month=h,t.day=c,t.hour=f,t.minute=_,t.second=m,t.millisecond=g,t.isLeapSecond=i,t):new d$1r(d,h,c,f,_,m,g,i)},a$15.toDate=function(e){if(!e$2b(e))throw new t$16("julianDate is required.");var t=a$15.toGregorianDate(e,Z$19),i=t.second;return t.isLeapSecond&&(i-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,i,t.millisecond))},a$15.toIso8601=function(e,t){if(!e$2b(e))throw new t$16("julianDate is required.");var i=a$15.toGregorianDate(e,Z$19),n=i.year,r=i.month,o=i.day,a=i.hour,s=i.minute,l=i.second,u=i.millisecond;return 1e4===n&&1===r&&1===o&&0===a&&0===s&&0===l&&0===u&&(n=9999,r=12,o=31,a=24),e$2b(t)||0===u?e$2b(t)&&0!==t?$$17("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",n,r,o,a,s,l,(.01*u).toFixed(t).replace(".","").slice(0,t)):$$17("%04d-%02d-%02dT%02d:%02d:%02dZ",n,r,o,a,s,l):$$17("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",n,r,o,a,s,l,(.01*u).toString().replace(".",""))},a$15.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new a$15(e.dayNumber,e.secondsOfDay,H$19.TAI)},a$15.compare=function(e,t){if(!e$2b(e))throw new t$16("left is required.");if(!e$2b(t))throw new t$16("right is required.");var i=e.dayNumber-t.dayNumber;return 0!==i?i:e.secondsOfDay-t.secondsOfDay},a$15.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},a$15.equalsEpsilon=function(e,t,i){if(!e$2b(i))throw new t$16("epsilon is required.");return e===t||e$2b(e)&&e$2b(t)&&Math.abs(a$15.secondsDifference(e,t))<=i},a$15.totalDays=function(e){if(!e$2b(e))throw new t$16("julianDate is required.");return e.dayNumber+e.secondsOfDay/h$17.SECONDS_PER_DAY},a$15.secondsDifference=function(e,t){if(!e$2b(e))throw new t$16("left is required.");if(!e$2b(t))throw new t$16("right is required.");return(e.dayNumber-t.dayNumber)*h$17.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},a$15.daysDifference=function(e,t){if(!e$2b(e))throw new t$16("left is required.");if(!e$2b(t))throw new t$16("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/h$17.SECONDS_PER_DAY},a$15.computeTaiMinusUtc=function(e){O$U.julianDate=e;var t=a$15.leapSeconds,i=a$17(t,O$U,H$18);return i<0&&(i=~i,--i<0&&(i=0)),t[i].offset},a$15.addSeconds=function(e,t,i){if(!e$2b(e))throw new t$16("julianDate is required.");if(!e$2b(t))throw new t$16("seconds is required.");if(!e$2b(i))throw new t$16("result is required.");return I$1v(e.dayNumber,e.secondsOfDay+t,i)},a$15.addMinutes=function(e,t,i){if(!e$2b(e))throw new t$16("julianDate is required.");if(!e$2b(t))throw new t$16("minutes is required.");if(!e$2b(i))throw new t$16("result is required.");var n=e.secondsOfDay+t*h$17.SECONDS_PER_MINUTE;return I$1v(e.dayNumber,n,i)},a$15.addHours=function(e,t,i){if(!e$2b(e))throw new t$16("julianDate is required.");if(!e$2b(t))throw new t$16("hours is required.");if(!e$2b(i))throw new t$16("result is required.");var n=e.secondsOfDay+t*h$17.SECONDS_PER_HOUR;return I$1v(e.dayNumber,n,i)},a$15.addDays=function(e,t,i){if(!e$2b(e))throw new t$16("julianDate is required.");if(!e$2b(t))throw new t$16("days is required.");if(!e$2b(i))throw new t$16("result is required.");return I$1v(e.dayNumber+t,e.secondsOfDay,i)},a$15.lessThan=function(e,t){return a$15.compare(e,t)<0},a$15.lessThanOrEquals=function(e,t){return a$15.compare(e,t)<=0},a$15.greaterThan=function(e,t){return a$15.compare(e,t)>0},a$15.greaterThanOrEquals=function(e,t){return a$15.compare(e,t)>=0},a$15.prototype.clone=function(e){return a$15.clone(this,e)},a$15.prototype.equals=function(e){return a$15.equals(this,e)},a$15.prototype.equalsEpsilon=function(e,t){return a$15.equalsEpsilon(this,e,t)},a$15.prototype.toString=function(){return a$15.toIso8601(this)},a$15.leapSeconds=[new a$16(new a$15(2441317,43210,H$19.TAI),10),new a$16(new a$15(2441499,43211,H$19.TAI),11),new a$16(new a$15(2441683,43212,H$19.TAI),12),new a$16(new a$15(2442048,43213,H$19.TAI),13),new a$16(new a$15(2442413,43214,H$19.TAI),14),new a$16(new a$15(2442778,43215,H$19.TAI),15),new a$16(new a$15(2443144,43216,H$19.TAI),16),new a$16(new a$15(2443509,43217,H$19.TAI),17),new a$16(new a$15(2443874,43218,H$19.TAI),18),new a$16(new a$15(2444239,43219,H$19.TAI),19),new a$16(new a$15(2444786,43220,H$19.TAI),20),new a$16(new a$15(2445151,43221,H$19.TAI),21),new a$16(new a$15(2445516,43222,H$19.TAI),22),new a$16(new a$15(2446247,43223,H$19.TAI),23),new a$16(new a$15(2447161,43224,H$19.TAI),24),new a$16(new a$15(2447892,43225,H$19.TAI),25),new a$16(new a$15(2448257,43226,H$19.TAI),26),new a$16(new a$15(2448804,43227,H$19.TAI),27),new a$16(new a$15(2449169,43228,H$19.TAI),28),new a$16(new a$15(2449534,43229,H$19.TAI),29),new a$16(new a$15(2450083,43230,H$19.TAI),30),new a$16(new a$15(2450630,43231,H$19.TAI),31),new a$16(new a$15(2451179,43232,H$19.TAI),32),new a$16(new a$15(2453736,43233,H$19.TAI),33),new a$16(new a$15(2454832,43234,H$19.TAI),34),new a$16(new a$15(2456109,43235,H$19.TAI),35),new a$16(new a$15(2457204,43236,H$19.TAI),36),new a$16(new a$15(2457754,43237,H$19.TAI),37)],h$16.prototype.scheme=null,h$16.prototype.authority=null,h$16.prototype.path="",h$16.prototype.query=null,h$16.prototype.fragment=null;var o$1k=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");h$16.prototype.getScheme=function(){return this.scheme},h$16.prototype.getAuthority=function(){return this.authority},h$16.prototype.getPath=function(){return this.path},h$16.prototype.getQuery=function(){return this.query},h$16.prototype.getFragment=function(){return this.fragment},h$16.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},h$16.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query},h$16.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment},h$16.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(n$19,u$Y).replace(s$$,a$14)),this.path&&(this.path=this.path.replace(s$$,a$14)),this.query&&(this.query=this.query.replace(s$$,a$14)),this.fragment&&(this.fragment=this.fragment.replace(s$$,a$14))};var s$$=/%[0-9a-z]{2}/gi,p$1a=/[a-zA-Z0-9\-\._~]/,n$19=/(.*@)?([^@:]*)(:.*)?/;function a$14(e){var t=unescape(e);return p$1a.test(t)?t:e.toUpperCase()}function u$Y(e,t,i,n){return(t||"")+i.toLowerCase()+(n||"")}function n$18(e){return(0===e.length||"/"!==e[e.length-1])&&(e+="/"),e}function l$1g(e,t){if(null===e||"object"!=typeof e)return e;t=u$_(t,!1);var i=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t&&(r=l$1g(r,t)),i[n]=r}return i}function p$19(e,t,i){i=u$_(i,!1);var n,r,o,a={},s=e$2b(e),l=e$2b(t);if(s)for(n in e)e.hasOwnProperty(n)&&(r=e[n],l&&i&&"object"==typeof r&&t.hasOwnProperty(n)?(o=t[n],a[n]="object"==typeof o?p$19(r,o,i):r):a[n]=r);if(l)for(n in t)t.hasOwnProperty(n)&&!a.hasOwnProperty(n)&&(o=t[n],a[n]=o);return a}function o$1j(e,t){var i;return typeof document<"u"&&(i=document),o$1j._implementation(e,t,i)}function i$1a(e,t){if(!e$2b(e))throw new t$16("uri is required.");var i="",n=e.lastIndexOf("/");return-1!==n&&(i=e.substring(0,n+1)),t&&(e$2b((e=new h$16(e)).query)&&(i+="?"+e.query),e$2b(e.fragment)&&(i+="#"+e.fragment)),i}function a$13(e){if(!e$2b(e))throw new t$16("uri is required.");var t=new h$16(e);t.normalize();var i=t.path,n=i.lastIndexOf("/");return-1!==n&&(i=i.substr(n+1)),n=i.lastIndexOf("."),i=-1===n?"":i.substr(n+1)}h$16.prototype.resolve=function(e){var t=new h$16;return this.scheme?(t.scheme=this.scheme,t.authority=this.authority,t.path=this.path,t.query=this.query):(t.scheme=e.scheme,this.authority?(t.authority=this.authority,t.path=this.path,t.query=this.query):(t.authority=e.authority,""==this.path?(t.path=e.path,t.query=this.query||e.query):("/"==this.path.charAt(0)?(t.path=this.path,t.removeDotSegments()):(e.authority&&""==e.path?t.path="/"+this.path:t.path=e.path.substring(0,e.path.lastIndexOf("/")+1)+this.path,t.removeDotSegments()),t.query=this.query))),t.fragment=this.fragment,t},h$16.prototype.removeDotSegments=function(){var e,t=this.path.split("/"),i=[],n=""==t[0];n&&t.shift();for(""==t[0]&&t.shift();t.length;)".."==(e=t.shift())?i.pop():"."!=e&&i.push(e);("."==e||".."==e)&&i.push(""),n&&i.unshift(""),this.path=i.join("/")},h$16.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e},o$1j._implementation=function(e,t,i){if(!e$2b(e))throw new t$16("relative uri is required.");if(!e$2b(t)){if(typeof i>"u")return e;t=u$_(i.baseURI,i.location.href)}var n=new h$16(t);return new h$16(e).resolve(n).toString()};var e$24=/^blob:/i,o$1i;function i$19(e){return o$1q.typeOf.string("uri",e),e$24.test(e)}function i$18(e){e$2b(o$1i)||(o$1i=document.createElement("a")),o$1i.href=window.location.href;var t=o$1i.host,i=o$1i.protocol;return o$1i.href=e,o$1i.href=o$1i.href,i!==o$1i.protocol||t!==o$1i.host}var a$12=/^data:/i;function e$23(e){return o$1q.typeOf.string("uri",e),a$12.test(e)}function a$11(e){var t=o$1l.defer(),i=document.createElement("script");i.async=!0,i.src=e;var n=document.getElementsByTagName("head")[0];return i.onload=function(){i.onload=void 0,n.removeChild(i),t.resolve()},i.onerror=function(e){t.reject(e)},n.appendChild(i),t.promise}function m$1b(e,t){if(!e$2b(e))throw new t$16("obj is required.");var i="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=encodeURIComponent(n)+"=";if(Array.isArray(r))for(var a=0,s=r.length;a2){var a=i[n].indexOf("=");o=[i[n].substring(0,a),i[n].substring(a+1,i[n].length)]}var s=decodeURIComponent(o[0]),l=o[1];l=e$2b(l)?decodeURIComponent(l):"";var u=t[s];"string"==typeof u?t[s]=[u,l]:Array.isArray(u)?u.push(l):t[s]=l}return t}var e$22={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},W$1c=Object.freeze(e$22),e$21={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3,PACK:4,BLOCK:5,BLOCKPACK:6},V$15=Object.freeze(e$21),e$20;function r$1b(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.throttleByServer,!1),i=u$_(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=u$_(e.priority,0),this.throttle=i,this.throttleByServer=t,this.type=u$_(e.type,V$15.OTHER),this.serverKey=void 0,this.state=W$1c.UNISSUED,this.deferred=void 0,this.cancelled=!1}function n$17(e){var t={};if(!e)return t;for(var i=e.split("\r\n"),n=0;n0){var a=r.substring(0,o),s=r.substring(o+2);t[a]=s}}return t}function s$_(e,t,i){this.statusCode=e,this.response=t,this.responseHeaders=i,"string"==typeof this.responseHeaders&&(this.responseHeaders=n$17(this.responseHeaders))}function o$1h(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function v$Z(e,t){return t-e}function o$1g(e){o$1q.typeOf.object("options",e),o$1q.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function m$19(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}r$1b.prototype.cancel=function(){this.cancelled=!0},r$1b.prototype.clone=function(e){return e$2b(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new r$1b(this)},s$_.prototype.toString=function(){var e="Request has failed.";return e$2b(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e},Object.defineProperties(o$1h.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),o$1h.prototype.addEventListener=function(e,t){o$1q.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);var i=this;return function(){i.removeEventListener(e,t)}},o$1h.prototype.removeEventListener=function(e,t){o$1q.typeOf.func("listener",e);for(var i=this._listeners,n=this._scopes,r=-1,o=0;o0){for(o.sort(v$Z),e=0;ee&&e>0&&(this._length=e,this._array.length=e)}},comparator:{get:function(){return this._comparator}}}),o$1g.prototype.reserve=function(e){e=u$_(e,this._length),this._array.length=e},o$1g.prototype.heapify=function(e){e=u$_(e,0);for(var t=this._length,i=this._comparator,n=this._array,r=-1,o=!0;o;){var a=2*(e+1),s=a-1;r=s=0;--t)this.heapify(t)},o$1g.prototype.insert=function(e){o$1q.defined("element",e);var t,i=this._array,n=this._comparator,r=this._maximumLength,o=this._length++;for(or&&(t=i[r],i.pop(),this._length=r),t},o$1g.prototype.pop=function(e){if(e=u$_(e,0),0!==this._length){o$1q.typeOf.number.lessThan("index",e,this._length);var t=this._array,i=t[e];return m$19(t,e,--this._length),t[this._length]=void 0,this.heapify(e),i}},e$20=typeof performance<"u"&&"function"==typeof performance.now&&isFinite(performance.now())?function(){return performance.now()}:function(){return Date.now()};var Et$a=e$20;function S$10(e,t){return e.priority-t.priority}var i$17={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0,totalRequestTime:0},b$1h=20,o$1f=new o$1g({comparator:S$10});o$1f.maximumLength=b$1h,o$1f.reserve(b$1h);var c$18=[],v$Y={},I$1u=typeof document<"u"?new h$16(document.location.href):new h$16,k$18=new o$1h;function r$1a(){}function K$$(e){e$2b(e.priorityFunction)&&(e.priority=e.priorityFunction())}function C$1g(e){var t=u$_(r$1a.requestsByServer[e],r$1a.maximumRequestsPerServer);return v$Y[e]0||e.type!==V$15.OTHER)&&(i$17.totalRequestTime+=e.endTime-e.startTime),e.type===V$15.BLOCK||e.type===V$15.BLOCKPACK)){var i=L$1f(e);e$2b(r$1a.blockDefer[i])&&(r$1a.blockDefer[i]=void 0,delete r$1a.blockDefer[i])}}}function z$13(e){return function(t){e.state!==W$1c.CANCELLED&&(++i$17.numberOfFailedRequests,--i$17.numberOfActiveRequests,--v$Y[e.serverKey],k$18.raiseEvent(t),e.state=W$1c.FAILED,e.deferred.reject(t))}}function A$1k(e,t){var i=x$1j(e);return e.state=W$1c.ACTIVE,c$18.push(e),++i$17.numberOfActiveRequests,++i$17.numberOfActiveRequestsEver,++v$Y[e.serverKey],e.startTime=Et$a(),e.requestFunction(t).then(M$1b(e)).otherwise(z$13(e)),i}function p$18(e){var t=e.state===W$1c.ACTIVE;e.state=W$1c.CANCELLED,++i$17.numberOfCancelledRequests,e.deferred.reject(),t&&(--i$17.numberOfActiveRequests,--v$Y[e.serverKey],++i$17.numberOfCancelledActiveRequests),e$2b(e.cancelFunction)&&e.cancelFunction()}function G$1k(){for(var e in r$1a.packRequestHeap)if(r$1a.packRequestHeap.hasOwnProperty(e)){for(var t=r$1a.packRequestHeap[e],i=t.internalArray,n=t.length,r=0;r0;){var i=t.pop();i.cancelled?p$18(i):N$Z(i)}V$14()}function W$1b(e){var t=q$1e(e),i=r$1a.packRequestHeap[t];return e$2b(i)||((i=r$1a.packRequestHeap[t]=new o$1g({comparator:S$10})).maximumLength=r$1a.perPacketCount,i.reserve(b$1h)),i}function X$15(){!r$1a.debugShowStatistics||(0===i$17.numberOfActiveRequests&&i$17.lastNumberOfActiveRequests>0&&(i$17.numberOfAttemptedRequests>0&&(console.log("Number of attempted requests: "+i$17.numberOfAttemptedRequests),i$17.numberOfAttemptedRequests=0),i$17.numberOfCancelledRequests>0&&(console.log("Number of cancelled requests: "+i$17.numberOfCancelledRequests),i$17.numberOfCancelledRequests=0),i$17.numberOfCancelledActiveRequests>0&&(console.log("Number of cancelled active requests: "+i$17.numberOfCancelledActiveRequests),i$17.numberOfCancelledActiveRequests=0),i$17.numberOfFailedRequests>0&&(console.log("Number of failed requests: "+i$17.numberOfFailedRequests),i$17.numberOfFailedRequests=0)),i$17.lastNumberOfActiveRequests=i$17.numberOfActiveRequests)}r$1a.TIMEOUT=5e3,r$1a.CANCLE_COUNT=3,r$1a.statisticRequestTime=-1,r$1a.maximumRequests=50,r$1a.maximumRequestsPerServer=6,r$1a.perPacketCount=20,r$1a.requestsByServer={},r$1a.throttleRequests=!0,r$1a.debugShowStatistics=!1,r$1a.requestCompletedEvent=k$18,Object.defineProperties(r$1a,{activeRequestLength:{get:function(){return c$18.length}},statistics:{get:function(){return i$17}},priorityHeapLength:{get:function(){return b$1h},set:function(e){if(ee;){p$18(o$1f.pop())}b$1h=e,o$1f.maximumLength=e,o$1f.reserve(e)}}}),r$1a.packRequestGroup={},r$1a.packRequestPromise={},r$1a.packRequestQuadKey={},r$1a.quadKeyIndex={},r$1a.packRequestHeap={},r$1a.blockDefer={},r$1a.blockRequest={},r$1a.update=function(){var e,t,i=0,n=c$18.length;for(e=0;e0&&(c$18[e-i]=t):++i;c$18.length-=i;var r=o$1f.internalArray,o=o$1f.length;for(e=0;e0;)(t=o$1f.pop()).cancelled?p$18(t):!t.throttleByServer||C$1g(t.serverKey)?(A$1k(t),++s):p$18(t);X$15()},r$1a.getServerKey=function(e){o$1q.typeOf.string("url",e);var t=new h$16(e).resolve(I$1u);t.normalize();var i=t.authority;return/:/.test(i)||(i=i+":"+("https"===t.scheme?"443":"80")),e$2b(v$Y[i])||(v$Y[i]=0),i},r$1a.request=function(e){if(o$1q.typeOf.object("request",e),o$1q.typeOf.string("request.url",e.url),o$1q.typeOf.func("request.requestFunction",e.requestFunction),e$23(e.url)||i$19(e.url))return k$18.raiseEvent(),e.state=W$1c.RECEIVED,e.requestFunction();if(++i$17.numberOfAttemptedRequests,e$2b(e.serverKey)||(e.serverKey=r$1a.getServerKey(e.url)),e.type===V$15.BLOCK)return T$1b(e);if(!e.throttleByServer||C$1g(e.serverKey)){if(!r$1a.throttleRequests||!e.throttle)return A$1k(e);if(!(c$18.length>=r$1a.maximumRequests)){var t;if(K$$(e),e.type===V$15.PACK||e.type===V$15.BLOCKPACK){var i=W$1b(e),n=!0;if(e.type===V$15.BLOCKPACK)for(var r=0;r0;){p$18(o$1f.pop())}for(var e=c$18.length,t=0;t0}}}),t$11.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;var i=new h$16(this._url);e&&re$I(i,this);var n=i.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),r=this._templateValues;return n=n.replace(/{(.*?)}/g,(function(e,t){var i=r[t];return e$2b(i)?encodeURIComponent(i):e})),t&&e$2b(this.proxy)&&(n=this.proxy.getURL(n)),n},t$11.prototype.setQueryParameters=function(e,t){this._queryParameters=t?O$T(this._queryParameters,e,!1):O$T(e,this._queryParameters,!1)},t$11.prototype.appendQueryParameters=function(e){this._queryParameters=O$T(e,this._queryParameters,!0)},t$11.prototype.setTemplateValues=function(e,t){this._templateValues=t?p$19(this._templateValues,e):p$19(e,this._templateValues)},t$11.prototype.getDerivedResource=function(e){var t=this.clone();if(t._retryCount=0,e$2b(e.url)){var i=new h$16(e.url);x$1i(i,t,!0,u$_(e.preserveQueryParameters,!1)),i.fragment=void 0,t._url=i.resolve(new h$16(o$1j(this._url))).toString()}return e$2b(e.queryParameters)&&(t._queryParameters=p$19(e.queryParameters,t._queryParameters)),e$2b(e.templateValues)&&(t._templateValues=p$19(e.templateValues,t.templateValues)),e$2b(e.headers)&&(t.headers=p$19(e.headers,t.headers)),e$2b(e.proxy)&&(t.proxy=e.proxy),e$2b(e.request)&&(t.request=e.request),e$2b(e.retryCallback)&&(t.retryCallback=e.retryCallback),e$2b(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},t$11.prototype.retryOnError=function(e){var t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return o$1l(!1);var i=this;return o$1l(t(this,e)).then((function(e){return++i._retryCount,e}))},t$11.prototype.clone=function(e){return e$2b(e)||(e=new t$11({url:this._url})),e._url=this._url,e._queryParameters=l$1g(this._queryParameters),e._templateValues=l$1g(this._templateValues),e.headers=l$1g(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},t$11.prototype.getBaseUri=function(e){return i$1a(this.getUrlComponent(e),e)},t$11.prototype.appendForwardSlash=function(){this._url=n$18(this._url)},t$11.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},t$11.fetchArrayBuffer=function(e){return new t$11(e).fetchArrayBuffer()},t$11.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},t$11.fetchBlob=function(e){return new t$11(e).fetchBlob()},t$11.prototype.fetchImage=function(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.preferImageBitmap,!1),i=u$_(e.preferBlob,!1),n=u$_(e.flipY,!1);if(C$1f(this.request),!k$17||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!i)return j$1c({resource:this,flipY:n,preferImageBitmap:t});var r,o,a,s=this.fetchBlob();return e$2b(s)?t$11.supportsImageBitmapOptions().then((function(e){return r=e&&t,s})).then((function(e){if(e$2b(e)){if(a=e,r)return t$11.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});var t=window.URL.createObjectURL(e);return j$1c({resource:o=new t$11({url:t}),flipY:n,preferImageBitmap:!1})}})).then((function(e){if(e$2b(e))return e.blob=a,r||window.URL.revokeObjectURL(o.url),e})).otherwise((function(e){return e$2b(o)&&window.URL.revokeObjectURL(o.url),e.blob=a,o$1l.reject(e)})):void 0},t$11.fetchImage=function(e){return new t$11(e).fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},t$11.prototype.fetchText=function(){return this.fetch({responseType:"text"})},t$11.fetchText=function(e){return new t$11(e).fetchText()},t$11.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(e$2b(e))return e.then((function(e){if(e$2b(e))return JSON.parse(e)}))},t$11.fetchJson=function(e){return new t$11(e).fetchJson()},t$11.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},t$11.fetchXML=function(e){return new t$11(e).fetchXML()},t$11.prototype.fetchJsonp=function(e){var t;e=u$_(e,"callback"),C$1f(this.request);do{t="loadJsonp"+Math.random().toString().substring(2,8)}while(e$2b(window[t]));return L$1e(this,e,t)},t$11.fetchJsonp=function(e){return new t$11(e).fetchJsonp(e.callbackParameterName)},t$11.prototype._makeRequest=function(e){var t=this;C$1f(t.request);var i=t.request;i.url=t.url,i.requestFunction=function(n){var r=e.responseType,o=p$19(e.headers,t.headers),a=e.overrideMimeType,s=e.method,l=e.data,u=o$1l.defer(),c=e$2b(n)?n:t.url,h=t$11._Implementations.loadWithXhr(c,r,s,l,o,u,a);return e$2b(h)&&e$2b(h.abort)&&(i.cancelFunction=function(){h.abort()}),u.promise};var n=r$1a.request(i);if(e$2b(n))return n.then((function(e){return e})).otherwise((function(n){return i.state!==W$1c.FAILED?o$1l.reject(n):t.retryOnError(n).then((function(r){return r?(i.state=W$1c.UNISSUED,i.deferred=void 0,t.fetch(e)):o$1l.reject(n)}))}))};var te$D=/^data:(.*?)(;base64)?,(.*)$/;function E$1o(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function Y$Y(e,t){for(var i=E$1o(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o=300)o.reject(new s$_(e.statusCode,e,e.headers));else{var i=[];e.on("data",(function(e){i.push(e)})),e.on("end",(function(){var n=Buffer.concat(i);"gzip"===e.headers["content-encoding"]?u.gunzip(n,(function(e,i){e?o.reject(new t$14("Error decompressing response.")):o.resolve(F$1f(i,t))})):o.resolve(F$1f(n,t))}))}})).on("error",(function(e){o.reject(new s$_)})).end()}t$11.prototype.fetch=function(e){return(e=v$X(e,{})).method="GET",this._makeRequest(e)},t$11.fetch=function(e){return new t$11(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$11.prototype.delete=function(e){return(e=v$X(e,{})).method="DELETE",this._makeRequest(e)},t$11.delete=function(e){return new t$11(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},t$11.prototype.head=function(e){return(e=v$X(e,{})).method="HEAD",this._makeRequest(e)},t$11.head=function(e){return new t$11(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$11.prototype.options=function(e){return(e=v$X(e,{})).method="OPTIONS",this._makeRequest(e)},t$11.options=function(e){return new t$11(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$11.prototype.post=function(e,t){return o$1q.defined("data",e),(t=v$X(t,{})).method="POST",t.data=e,this._makeRequest(t)},t$11.post=function(e){return new t$11(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$11.prototype.put=function(e,t){return o$1q.defined("data",e),(t=v$X(t,{})).method="PUT",t.data=e,this._makeRequest(t)},t$11.put=function(e){return new t$11(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$11.prototype.patch=function(e,t){return o$1q.defined("data",e),(t=v$X(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},t$11.patch=function(e){return new t$11(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$11._Implementations={},t$11._Implementations.createImage=function(e,t,i,n,r){var o=e.url;t$11.supportsImageBitmapOptions().then((function(a){if(a&&r){var s=o$1l.defer(),l=t$11._Implementations.loadWithXhr(o,"blob","GET",void 0,void 0,s,void 0,void 0,void 0);return e$2b(l)&&e$2b(l.abort)&&(e.cancelFunction=function(){l.abort()}),s.promise.then((function(e){if(e$2b(e))return t$11.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});i.reject(new t$14("Successfully retrieved "+o+" but it contained no content."))})).then(i.resolve)}ae$A(o,t,i)})).otherwise(i.reject)},t$11.createImageBitmapFromBlob=function(e,t){return o$1q.defined("options",t),o$1q.typeOf.bool("options.flipY",t.flipY),o$1q.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none"})};var ue$F=typeof XMLHttpRequest>"u";function x$1h(e){if(e=u$_(e,u$_.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=u$_(e.addNewLeapSeconds,!0),e$2b(e.data))U$1c(this,e.data);else if(e$2b(e.url)){var t=t$11.createIfNeeded(e.url),i=this;this._downloadPromise=o$1l(t.fetchJson(),(function(e){U$1c(i,e)}),(function(){i._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))}else U$1c(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function F$1e(e,t){return a$15.compare(e.julianDate,t)}function U$1c(e,t){if(e$2b(t.columnNames))if(e$2b(t.samples)){var i=t.columnNames.indexOf("modifiedJulianDateUtc"),n=t.columnNames.indexOf("xPoleWanderRadians"),r=t.columnNames.indexOf("yPoleWanderRadians"),o=t.columnNames.indexOf("ut1MinusUtcSeconds"),a=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),s=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(i<0||n<0||r<0||o<0||a<0||s<0||l<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var u=e._samples=t.samples,c=e._dates=[];e._dateColumn=i,e._xPoleWanderRadiansColumn=n,e._yPoleWanderRadiansColumn=r,e._ut1MinusUtcSecondsColumn=o,e._xCelestialPoleOffsetRadiansColumn=a,e._yCelestialPoleOffsetRadiansColumn=s,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var h,d=e._addNewLeapSeconds,f=0,p=u.length;ft.length-1)return a.xPoleWander=0,a.yPoleWander=0,a.xPoleOffset=0,a.yPoleOffset=0,a.ut1MinusUtc=0,a;var l=t[r],u=t[o];if(l.equals(u)||n.equals(l))return T$1a(e,i,r,s,a),a;if(n.equals(u))return T$1a(e,i,o,s,a),a;var c=a$15.secondsDifference(n,l)/a$15.secondsDifference(u,l),h=r*s,d=o*s,f=i[h+e._ut1MinusUtcSecondsColumn],p=i[d+e._ut1MinusUtcSecondsColumn],_=p-f;if(_>.5||_<-.5){var m=i[h+e._taiMinusUtcSecondsColumn],g=i[d+e._taiMinusUtcSecondsColumn];m!==g&&(u.equals(n)?f=p:p-=g-m)}return a.xPoleWander=O$S(c,i[h+e._xPoleWanderRadiansColumn],i[d+e._xPoleWanderRadiansColumn]),a.yPoleWander=O$S(c,i[h+e._yPoleWanderRadiansColumn],i[d+e._yPoleWanderRadiansColumn]),a.xPoleOffset=O$S(c,i[h+e._xCelestialPoleOffsetRadiansColumn],i[d+e._xCelestialPoleOffsetRadiansColumn]),a.yPoleOffset=O$S(c,i[h+e._yCelestialPoleOffsetRadiansColumn],i[d+e._yCelestialPoleOffsetRadiansColumn]),a.ut1MinusUtc=O$S(c,f,p),a}function i$15(e,t,i){this.heading=u$_(e,0),this.pitch=u$_(t,0),this.roll=u$_(i,0)}t$11._Implementations.loadWithXhr=function(e,t,i,n,r,o,a){var s=te$D.exec(e);if(null===s){if(!ue$F){var l=new XMLHttpRequest;if(u$X.contains(e)&&(l.withCredentials=!0),e=e.replace(/{/g,"%7B").replace(/}/g,"%7D"),l.open(i,e,!0),e$2b(a)&&e$2b(l.overrideMimeType)&&l.overrideMimeType(a),e$2b(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);e$2b(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")||typeof window<"u"&&"file://"===window.location.origin),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,n=l.responseType;if("HEAD"===i||"OPTIONS"===i){var r=l.getAllResponseHeaders().trim().split(/[\r\n]+/),a={};return r.forEach((function(e){var t=e.split(": "),i=t.shift();a[i]=t.join(": ")})),void o.resolve(a)}if(204===l.status)o.resolve();else if(!e$2b(e)||e$2b(t)&&n!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===n||"document"===n)&&e$2b(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==n&&"text"!==n||!e$2b(l.responseText)?o.reject(new t$14("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new s$_(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new s$_)},l.send(n),l}ie$H(e,t,i,n,r,o)}else o.resolve(ne$K(s,t))},t$11._Implementations.loadAndExecuteScript=function(e,t,i){return a$11(e).otherwise(i.reject)},t$11._DefaultImplementations={},t$11._DefaultImplementations.createImage=t$11._Implementations.createImage,t$11._DefaultImplementations.loadWithXhr=t$11._Implementations.loadWithXhr,t$11._DefaultImplementations.loadAndExecuteScript=t$11._Implementations.loadAndExecuteScript,t$11.DEFAULT=Object.freeze(new t$11({url:typeof document>"u"?"":document.location.href.split("?")[0]})),x$1h.NONE=Object.freeze({getPromiseToLoad:function(){return o$1l()},compute:function(e,t){return e$2b(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new n$1a(0,0,0,0,0),t}}),x$1h.prototype.getPromiseToLoad=function(){return o$1l(this._downloadPromise)},x$1h.prototype.compute=function(e,t){if(e$2b(this._samples)){if(e$2b(t)||(t=new n$1a(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;var i=this._dates,n=this._lastIndex,r=0,o=0;if(e$2b(n)){var a=i[n],s=i[n+1],l=a$15.lessThanOrEquals(a,e),u=!e$2b(s),c=u||a$15.greaterThanOrEquals(s,e);if(l&&c)return r=n,!u&&s.equals(e)&&++r,o=r+1,I$1t(this,i,this._samples,e,r,o,t),t}var h=a$17(i,e,a$15.compare,this._dateColumn);return h>=0?(h"u"?e:(e$2b(u$W)||(u$W=document.createElement("a")),u$W.href=e,u$W.href=u$W.href,u$W.href)}function s$Z(){if(e$2b(i$14))return i$14;var e;if(e=typeof CESIUM_BASE_URL<"u"?CESIUM_BASE_URL:"object"==typeof define&&e$2b(define.amd)&&!define.amd.toUrlUndefined&&e$2b(require.toUrl)?o$1j("..",n$15("Core/buildModuleUrl.js")):g$1f(),!e$2b(e))throw new t$16("Unable to determine SuperMap3D base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return(i$14=new t$11({url:f$16(e)})).appendForwardSlash(),i$14}function v$W(e){return f$16(require.toUrl("../"+e))}function c$17(e){return s$Z().getDerivedResource({url:e}).url}function n$15(e){return e$2b(o$1e)||(o$1e="object"==typeof define&&e$2b(define.amd)&&!define.amd.toUrlUndefined&&e$2b(require.toUrl)?v$W:c$17),o$1e(e)}function a$10(e,t,i){this.x=e,this.y=t,this.s=i}function D$15(e){e=u$_(e,u$_.EMPTY_OBJECT),this._xysFileUrlTemplate=t$11.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=u$_(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=u$_(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new a$15(this._sampleZeroJulianEphemerisDate,0,H$19.TAI),this._stepSizeDays=u$_(e.stepSizeDays,1),this._samplesPerXysFile=u$_(e.samplesPerXysFile,1e3),this._totalSamples=u$_(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,i=this._denominators=new Array(t+1),n=this._xTable=new Array(t+1),r=Math.pow(this._stepSizeDays,t),o=0;o<=t;++o){i[o]=r,n[o]=o*this._stepSizeDays;for(var a=0;a<=t;++a)a!==o&&(i[o]*=o-a);i[o]=1/i[o]}this._work=new Array(t+1),this._coef=new Array(t+1)}n$15._cesiumScriptRegex=d$1q,n$15._buildModuleUrlFromBaseUrl=c$17,n$15._clearBaseResource=function(){i$14=void 0},n$15.setBaseUrl=function(e){i$14=t$11.DEFAULT.getDerivedResource({url:e})},n$15.getCesiumBaseUrl=s$Z;var E$1n=new a$15(0,0,H$19.TAI);function w$16(e,t,i){var n=E$1n;return n.dayNumber=t,n.secondsOfDay=i,a$15.daysDifference(n,e._sampleZeroDateTT)}function T$19(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];var i=o$1l.defer();e._chunkDownloadsInProgress[t]=i;var n=e._xysFileUrlTemplate;return o$1l((e$2b(n)?n.getDerivedResource({templateValues:{0:t}}):new t$11({url:n$15("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")})).fetchJson(),(function(n){e._chunkDownloadsInProgress[t]=!1;for(var r=e._samples,o=n.samples,a=t*e._samplesPerXysFile*3,s=0,l=o.length;s=this._totalSamples&&(s=this._totalSamples-1);for(var l=a/this._samplesPerXysFile|0,u=s/this._samplesPerXysFile|0,c=[],h=l;h<=u;++h)c.push(T$19(this,h));return o$1l.all(c)},D$15.prototype.computeXysRadians=function(e,t,i){var n=w$16(this,e,t);if(!(n<0)){var r=n/this._stepSizeDays|0;if(!(r>=this._totalSamples)){var o=this._interpolationOrder,a=r-(o/2|0);a<0&&(a=0);var s=a+o;s>=this._totalSamples&&((a=(s=this._totalSamples-1)-o)<0&&(a=0));var l=!1,u=this._samples;if(e$2b(u[3*a])||(T$19(this,a/this._samplesPerXysFile|0),l=!0),e$2b(u[3*s])||(T$19(this,s/this._samplesPerXysFile|0),l=!0),!l){e$2b(i)?(i.x=0,i.y=0,i.s=0):i=new a$10(0,0,0);var c,h,d=n-a*this._stepSizeDays,f=this._work,p=this._denominators,_=this._coef,m=this._xTable;for(c=0;c<=o;++c)f[c]=d-m[c];for(c=0;c<=o;++c){for(_[c]=1,h=0;h<=o;++h)h!==c&&(_[c]*=f[h]);_[c]*=p[c];var g=3*(a+c);i.x+=_[c]*u[g++],i.y+=_[c]*u[g++],i.s+=_[c]*u[g]}return i}}}};var r$19,n$14={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},l$1f={},r$18,l$1e,E$1m,c$16,W$1a,d$1p,h$15,f$15,w$15,v$V,k$16,A$1j,S$$,R$13,V$13,I$1s,N$Y,g$1e,a$$,i$13;function o$1d(e){for(var t=e.split("."),i=0,n=t.length;i0&&e.height>0,i$13.resolve(a$$)},e.onerror=function(){a$$=!1,i$13.resolve(a$$)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",i$13.promise}function $$16(){return e$2b(i$13)||B$13(),a$$}Object.defineProperties(l$1f,{element:{get:function(){if(l$1f.supportsFullscreen())return document[n$14.fullscreenElement]}},changeEventName:{get:function(){if(l$1f.supportsFullscreen())return n$14.fullscreenchange}},errorEventName:{get:function(){if(l$1f.supportsFullscreen())return n$14.fullscreenerror}},enabled:{get:function(){if(l$1f.supportsFullscreen())return document[n$14.fullscreenEnabled]}},fullscreen:{get:function(){if(l$1f.supportsFullscreen())return null!==l$1f.element}}}),l$1f.supportsFullscreen=function(){if(e$2b(r$19))return r$19;r$19=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return n$14.requestFullscreen="requestFullscreen",n$14.exitFullscreen="exitFullscreen",n$14.fullscreenEnabled="fullscreenEnabled",n$14.fullscreenElement="fullscreenElement",n$14.fullscreenchange="fullscreenchange",n$14.fullscreenerror="fullscreenerror",r$19=!0;for(var t,i=["webkit","moz","o","ms","khtml"],n=0,r=i.length;n0)a=.5*(i=Math.sqrt(c+1)),i=.5/i,n=(e[p$1e.COLUMN1ROW2]-e[p$1e.COLUMN2ROW1])*i,r=(e[p$1e.COLUMN2ROW0]-e[p$1e.COLUMN0ROW2])*i,o=(e[p$1e.COLUMN0ROW1]-e[p$1e.COLUMN1ROW0])*i;else{var h=G$1i,d=0;l>s&&(d=1),u>s&&u>l&&(d=2);var f=h[d],p=h[f];i=Math.sqrt(e[p$1e.getElementIndex(d,d)]-e[p$1e.getElementIndex(f,f)]-e[p$1e.getElementIndex(p,p)]+1);var _=J$$;_[d]=.5*i,i=.5/i,a=(e[p$1e.getElementIndex(p,f)]-e[p$1e.getElementIndex(f,p)])*i,_[f]=(e[p$1e.getElementIndex(f,d)]+e[p$1e.getElementIndex(d,f)])*i,_[p]=(e[p$1e.getElementIndex(p,d)]+e[p$1e.getElementIndex(d,p)])*i,n=-_[0],r=-_[1],o=-_[2]}return e$2b(t)?(t.x=n,t.y=r,t.z=o,t.w=a,t):new n$13(n,r,o,a)};var Y$W=new n$13,Z$17=new n$13,I$1r=new n$13,k$15=new n$13;n$13.fromHeadingPitchRoll=function(e,t){return o$1q.typeOf.object("headingPitchRoll",e),k$15=n$13.fromAxisAngle(o$1p.UNIT_X,e.roll,Y$W),I$1r=n$13.fromAxisAngle(o$1p.UNIT_Y,-e.pitch,t),t=n$13.multiply(I$1r,k$15,I$1r),Z$17=n$13.fromAxisAngle(o$1p.UNIT_Z,-e.heading,Y$W),n$13.multiply(Z$17,t,t)};var g$1d=new o$1p,U$1a=new o$1p,i$12=new n$13,H$15=new n$13,C$1d=new n$13;n$13.packedLength=4,n$13.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},n$13.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new n$13),i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3],i},n$13.packedInterpolationLength=3,n$13.convertPackedArrayForInterpolation=function(e,t,i,n){n$13.unpack(e,4*i,C$1d),n$13.conjugate(C$1d,C$1d);for(var r=0,o=i-t+1;r=0?r=1:(r=-1,o=-o);for(var a=o-1,s=1-i,l=i*i,u=s*s,c=7;c>=0;--c)x$1f[c]=(B$12[c]*l-L$1c[c])*a,S$_[c]=(B$12[c]*u-L$1c[c])*a;var h=r*i*(1+x$1f[0]*(1+x$1f[1]*(1+x$1f[2]*(1+x$1f[3]*(1+x$1f[4]*(1+x$1f[5]*(1+x$1f[6]*(1+x$1f[7])))))))),d=s*(1+S$_[0]*(1+S$_[1]*(1+S$_[2]*(1+S$_[3]*(1+S$_[4]*(1+S$_[5]*(1+S$_[6]*(1+S$_[7])))))))),f=n$13.multiplyByScalar(e,d,s$X);return n$13.multiplyByScalar(t,h,n),n$13.add(f,n,n)},n$13.fastSquad=function(e,t,i,n,r,o){o$1q.typeOf.object("q0",e),o$1q.typeOf.object("q1",t),o$1q.typeOf.object("s0",i),o$1q.typeOf.object("s1",n),o$1q.typeOf.number("t",r),o$1q.typeOf.object("result",o);var a=n$13.fastSlerp(e,t,r,N$X),s=n$13.fastSlerp(i,n,r,l$1d);return n$13.fastSlerp(a,s,2*r*(1-r),o)},n$13.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},n$13.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e.x-t.x)<=i&&Math.abs(e.y-t.y)<=i&&Math.abs(e.z-t.z)<=i&&Math.abs(e.w-t.w)<=i},n$13.ZERO=Object.freeze(new n$13(0,0,0,0)),n$13.IDENTITY=Object.freeze(new n$13(0,0,0,1)),n$13.prototype.clone=function(e){return n$13.clone(this,e)},n$13.prototype.equals=function(e){return n$13.equals(this,e)},n$13.prototype.equalsEpsilon=function(e,t){return n$13.equalsEpsilon(this,e,t)},n$13.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var m$17={},B$11={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},O$R={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Y$V={},y$10={east:new o$1p,north:new o$1p,up:new o$1p,west:new o$1p,south:new o$1p,down:new o$1p},x$1e=new o$1p,P$19=new o$1p,E$1k=new o$1p;m$17.localFrameToFixedFrameGenerator=function(e,t){if(!B$11.hasOwnProperty(e)||!B$11[e].hasOwnProperty(t))throw new t$16("firstAxis and secondAxis must be east, north, up, west, south or down.");var i,n=B$11[e][t],r=e+t;return e$2b(Y$V[r])?i=Y$V[r]:(i=function(i,r,o){if(!e$2b(i))throw new t$16("origin is required.");if(e$2b(o)||(o=new p$1d),o$1p.equalsEpsilon(i,o$1p.ZERO,e$2a.EPSILON14))o$1p.unpack(O$R[e],0,x$1e),o$1p.unpack(O$R[t],0,P$19),o$1p.unpack(O$R[n],0,E$1k);else if(e$2a.equalsEpsilon(i.x,0,e$2a.EPSILON14)&&e$2a.equalsEpsilon(i.y,0,e$2a.EPSILON14)){var a=e$2a.sign(i.z);o$1p.unpack(O$R[e],0,x$1e),"east"!==e&&"west"!==e&&o$1p.multiplyByScalar(x$1e,a,x$1e),o$1p.unpack(O$R[t],0,P$19),"east"!==t&&"west"!==t&&o$1p.multiplyByScalar(P$19,a,P$19),o$1p.unpack(O$R[n],0,E$1k),"east"!==n&&"west"!==n&&o$1p.multiplyByScalar(E$1k,a,E$1k)}else{(r=u$_(r,t$13.WGS84)).geodeticSurfaceNormal(i,y$10.up);var s=y$10.up,l=y$10.east;l.x=-i.y,l.y=i.x,l.z=0,o$1p.normalize(l,y$10.east),o$1p.cross(s,l,y$10.north),o$1p.multiplyByScalar(y$10.up,-1,y$10.down),o$1p.multiplyByScalar(y$10.east,-1,y$10.west),o$1p.multiplyByScalar(y$10.north,-1,y$10.south),x$1e=y$10[e],P$19=y$10[t],E$1k=y$10[n]}return o[0]=x$1e.x,o[1]=x$1e.y,o[2]=x$1e.z,o[3]=0,o[4]=P$19.x,o[5]=P$19.y,o[6]=P$19.z,o[7]=0,o[8]=E$1k.x,o[9]=E$1k.y,o[10]=E$1k.z,o[11]=0,o[12]=i.x,o[13]=i.y,o[14]=i.z,o[15]=1,o},Y$V[r]=i),i},m$17.eastNorthUpToFixedFrame=m$17.localFrameToFixedFrameGenerator("east","north"),m$17.northEastDownToFixedFrame=m$17.localFrameToFixedFrameGenerator("north","east"),m$17.northUpEastToFixedFrame=m$17.localFrameToFixedFrameGenerator("north","up"),m$17.northWestUpToFixedFrame=m$17.localFrameToFixedFrameGenerator("north","west");var fa$4=new n$13,da$3=new o$1p(1,1,1),ua$5=new p$1d;m$17.headingPitchRollToFixedFrame=function(e,t,i,n,r){o$1q.typeOf.object("HeadingPitchRoll",t),n=u$_(n,m$17.eastNorthUpToFixedFrame);var o=n$13.fromHeadingPitchRoll(t,fa$4),a=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,o,da$3,ua$5);return r=n(e,i,r),p$1d.multiply(r,a,r)};var ya$3=new p$1d,la$6=new p$1e;m$17.headingPitchRollQuaternion=function(e,t,i,n,r){o$1q.typeOf.object("HeadingPitchRoll",t);var o=m$17.headingPitchRollToFixedFrame(e,t,i,n,ya$3),a=p$1d.getMatrix3(o,la$6);return n$13.fromRotationMatrix(a,r)};var Ta$7=new o$1p(1,1,1),xa$5=new o$1p,aa$6=new p$1d,Pa$5=new p$1d,Ea$6=new p$1e,Sa$5=new n$13;m$17.fixedFrameToHeadingPitchRoll=function(e,t,i,n){o$1q.defined("transform",e),t=u$_(t,t$13.WGS84),i=u$_(i,m$17.eastNorthUpToFixedFrame),e$2b(n)||(n=new i$15);var r=p$1d.getTranslation(e,xa$5);if(o$1p.equals(r,o$1p.ZERO))return n.heading=0,n.pitch=0,n.roll=0,n;var o=p$1d.inverseTransformation(i(r,t,aa$6),aa$6),a=p$1d.setScale(e,Ta$7,Pa$5);a=p$1d.setTranslation(a,o$1p.ZERO,a),o=p$1d.multiply(o,a,o);var s=n$13.fromRotationMatrix(p$1d.getMatrix3(o,Ea$6),Sa$5);return s=n$13.normalize(s,s),i$15.fromQuaternion(s,n)};var Fa$6=24110.54841,Ca$3=8640184.812866,Ma$5=.093104,Oa$5=-62e-7,Na$5=11772758384668e-32,Ra$6=72921158553e-15,Da$7=e$2a.TWO_PI/86400,q$1c=new a$15;m$17.computeTemeToPseudoFixedMatrix=function(e,t){if(!e$2b(e))throw new t$16("date is required.");var i,n=(q$1c=a$15.addSeconds(e,-a$15.computeTaiMinusUtc(e),q$1c)).dayNumber,r=q$1c.secondsOfDay,o=n-2451545;i=r>=43200?(o+.5)/h$17.DAYS_PER_JULIAN_CENTURY:(o-.5)/h$17.DAYS_PER_JULIAN_CENTURY;var a=(Fa$6+i*(Ca$3+i*(Ma$5+i*Oa$5)))*Da$7%e$2a.TWO_PI+(Ra$6+Na$5*(n-2451545.5))*((r+.5*h$17.SECONDS_PER_DAY)%h$17.SECONDS_PER_DAY),s=Math.cos(a),l=Math.sin(a);return e$2b(t)?(t[0]=s,t[1]=-l,t[2]=0,t[3]=l,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new p$1e(s,l,0,-l,s,0,0,0,1)},m$17.iau2006XysData=new D$15,m$17.earthOrientationParameters=x$1h.NONE;var H$14=32.184,ga$5=2451545;m$17.preloadIcrfFixed=function(e){var t=e.start.dayNumber,i=e.start.secondsOfDay+H$14,n=e.stop.dayNumber,r=e.stop.secondsOfDay+H$14,o=m$17.iau2006XysData.preload(t,i,n,r),a=m$17.earthOrientationParameters.getPromiseToLoad();return o$1l.all([o,a])},m$17.computeIcrfToFixedMatrix=function(e,t){if(!e$2b(e))throw new t$16("date is required.");e$2b(t)||(t=new p$1e);var i=m$17.computeFixedToIcrfMatrix(e,t);if(e$2b(i))return p$1e.transpose(i,t)};var Ua$6=new a$10(0,0,0),_a$5=new n$1a(0,0,0,0,0,0),Q$14=new p$1e,Z$16=new p$1e;m$17.computeFixedToIcrfMatrix=function(e,t){if(!e$2b(e))throw new t$16("date is required.");e$2b(t)||(t=new p$1e);var i=m$17.earthOrientationParameters.compute(e,_a$5);if(e$2b(i)){var n=e.dayNumber,r=e.secondsOfDay+H$14,o=m$17.iau2006XysData.computeXysRadians(n,r,Ua$6);if(e$2b(o)){var a=o.x+i.xPoleOffset,s=o.y+i.yPoleOffset,l=1/(1+Math.sqrt(1-a*a-s*s)),u=Q$14;u[0]=1-l*a*a,u[3]=-l*a*s,u[6]=a,u[1]=-l*a*s,u[4]=1-l*s*s,u[7]=s,u[2]=-a,u[5]=-s,u[8]=1-l*(a*a+s*s);var c=p$1e.fromRotationZ(-o.s,Z$16),h=p$1e.multiply(u,c,Q$14),d=e.dayNumber-2451545,f=(e.secondsOfDay-a$15.computeTaiMinusUtc(e)+i.ut1MinusUtc)/h$17.SECONDS_PER_DAY,p=.779057273264+f+.00273781191135448*(d+f);p=p%1*e$2a.TWO_PI;var _=p$1e.fromRotationZ(p,Z$16),m=p$1e.multiply(h,_,Q$14),g=Math.cos(i.xPoleWander),x=Math.cos(i.yPoleWander),v=Math.sin(i.xPoleWander),y=Math.sin(i.yPoleWander),$=n-ga$5+r/h$17.SECONDS_PER_DAY,b=-47e-6*($/=36525)*e$2a.RADIANS_PER_DEGREE/3600,T=Math.cos(b),C=Math.sin(b),S=Z$16;return S[0]=g*T,S[1]=g*C,S[2]=v,S[3]=-x*C+y*v*T,S[4]=x*T+y*v*C,S[5]=-y*g,S[6]=-y*C-x*v*T,S[7]=y*T-x*v*C,S[8]=x*g,p$1e.multiply(m,S,t)}}};var Ia$6=new e$29;m$17.pointToWindowCoordinates=function(e,t,i,n){return(n=m$17.pointToGLWindowCoordinates(e,t,i,n)).y=2*t[5]-n.y,n},m$17.pointToGLWindowCoordinates=function(e,t,i,n){if(!e$2b(e))throw new t$16("modelViewProjectionMatrix is required.");if(!e$2b(t))throw new t$16("viewportTransformation is required.");if(!e$2b(i))throw new t$16("point is required.");e$2b(n)||(n=new o$1o);var r=Ia$6;return p$1d.multiplyByVector(e,e$29.fromElements(i.x,i.y,i.z,1,r),r),e$29.multiplyByScalar(r,1/r.w,r),p$1d.multiplyByVector(t,r,r),o$1o.fromCartesian4(r,n)};var za$5=new o$1p,qa$6=new o$1p,Wa$4=new o$1p;m$17.rotationMatrixFromPositionVelocity=function(e,t,i,n){if(!e$2b(e))throw new t$16("position is required.");if(!e$2b(t))throw new t$16("velocity is required.");var r=u$_(i,t$13.WGS84).geodeticSurfaceNormal(e,za$5),o=o$1p.cross(t,r,qa$6);o$1p.equalsEpsilon(o,o$1p.ZERO,e$2a.EPSILON6)&&(o=o$1p.clone(o$1p.UNIT_X,o));var a=o$1p.cross(o,t,Wa$4);return o$1p.normalize(a,a),o$1p.cross(t,a,o),o$1p.negate(o,o),o$1p.normalize(o,o),e$2b(n)||(n=new p$1e),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=o.x,n[4]=o.y,n[5]=o.z,n[6]=a.x,n[7]=a.y,n[8]=a.z,n};var ra$7=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),oa$5=new a$18,ta$5=new o$1p,ba$4=new o$1p,Ga$6=new p$1e,k$14=new p$1d,ea$7=new p$1d;m$17.basisTo2D=function(e,t,i){if(!e$2b(e))throw new t$16("projection is required.");if(!e$2b(t))throw new t$16("matrix is required.");if(!e$2b(i))throw new t$16("result is required.");var n=p$1d.getTranslation(t,ba$4),r=e.ellipsoid,o=r.cartesianToCartographic(n,oa$5),a=e.project(o,ta$5);o$1p.fromElements(a.z,a.x,a.y,a);var s=m$17.eastNorthUpToFixedFrame(n,r,k$14),l=p$1d.inverseTransformation(s,ea$7),u=p$1d.getMatrix3(t,Ga$6),c=p$1d.multiplyByMatrix3(l,u,i);return p$1d.multiply(ra$7,c,i),p$1d.setTranslation(i,a,i),i},m$17.wgs84To2DModelMatrix=function(e,t,i){if(!e$2b(e))throw new t$16("projection is required.");if(!e$2b(t))throw new t$16("center is required.");if(!e$2b(i))throw new t$16("result is required.");var n=e.ellipsoid,r=m$17.eastNorthUpToFixedFrame(t,n,k$14),o=p$1d.inverseTransformation(r,ea$7),a=n.cartesianToCartographic(t,oa$5),s=e.project(a,ta$5);o$1p.fromElements(s.z,s.x,s.y,s);var l=p$1d.fromTranslation(s,k$14);return p$1d.multiply(ra$7,o,i),p$1d.multiply(l,i,i),i},m$17.buildUp=function(e,t){var i=t.clone(),n=e.clone();n=o$1p.normalize(n,n),Math.abs(o$1p.dot(n,i))>=1&&(n=Math.abs(o$1p.dot(i,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,n):o$1p.clone(o$1p.UNIT_Z,n));var r=new o$1p;return o$1p.cross(n,i,r),r=o$1p.normalize(r,r),o$1p.cross(i,r,n),n=o$1p.normalize(n,n)},m$17.getHeading=function(e,t){var i;return i=e$2a.equalsEpsilon(Math.abs(e.z),1,e$2a.EPSILON3)?Math.atan2(t.y,t.x)-e$2a.PI_OVER_TWO:Math.atan2(e.y,e.x)-e$2a.PI_OVER_TWO,e$2a.TWO_PI-e$2a.zeroToTwoPi(i)},m$17.convertToColumbusCartesian=function(e){var t=new n$1b,i=t.ellipsoid,n=new o$1p,r=new a$18;return i.cartesianToCartographic(e,r),t.project(r,n),o$1p.fromElements(n.z,n.x,n.y)},m$17.convertTo3DCartesian=function(e){var t=new n$1b,i=t.ellipsoid,n=new o$1p,r=new a$18;return n=o$1p.fromElements(e.y,e.z,e.x),t.unproject(n,r),i.cartographicToCartesian(r,n)};var l$1c=new e$29;function f$14(e,t){if(o$1q.defined("origin",e),!e$2b(e=(t=u$_(t,t$13.WGS84)).scaleToGeodeticSurface(e)))throw new t$16("origin must not be at the center of the ellipsoid.");var i=m$17.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=o$1p.fromCartesian4(p$1d.getColumn(i,0,l$1c)),this._yAxis=o$1p.fromCartesian4(p$1d.getColumn(i,1,l$1c));var n=o$1p.fromCartesian4(p$1d.getColumn(i,2,l$1c));this._plane=o$1m.fromPointNormal(e,n)}Object.defineProperties(f$14.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var w$14=new e$26;f$14.fromPoints=function(e,t){return o$1q.defined("cartesians",e),new f$14(e$26.fromPoints(e,w$14).center,t)};var x$1d=new f$17,m$16=new o$1p;f$14.prototype.projectPointOntoPlane=function(e,t){o$1q.defined("cartesian",e);var i=x$1d;i.origin=e,o$1p.normalize(e,i.direction);var n=g$1h.rayPlane(i,this._plane,m$16);if(e$2b(n)||(o$1p.negate(i.direction,i.direction),n=g$1h.rayPlane(i,this._plane,m$16)),e$2b(n)){var r=o$1p.subtract(n,this._origin,n),o=o$1p.dot(this._xAxis,r),a=o$1p.dot(this._yAxis,r);return e$2b(t)?(t.x=o,t.y=a,t):new o$1o(o,a)}},f$14.prototype.projectPointsOntoPlane=function(e,t){o$1q.defined("cartesians",e),e$2b(t)||(t=[]);for(var i=0,n=e.length,r=0;r4)throw new t$16("options.componentsPerAttribute must be between 1 and 4.");if(!e$2b(e.values))throw new t$16("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=u$_(e.normalize,!1),this.values=e.values}function d$1o(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).geometry))throw new t$16("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=u$_(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}I$1p._textureCoordinateRotationPoints=function(e,t,i,n){var r,o=h$18.center(n,R$12),a=a$18.toCartesian(o,i,W$17),s=m$17.eastNorthUpToFixedFrame(a,i,P$18),l=p$1d.inverse(s,P$18),u=q$1b,c=Z$15;c[0].longitude=n.west,c[0].latitude=n.south,c[1].longitude=n.west,c[1].latitude=n.north,c[2].longitude=n.east,c[2].latitude=n.south;var h=D$13;for(r=0;r<3;r++)a$18.toCartesian(c[r],i,h),h=p$1d.multiplyByPointAsVector(l,h,h),u[r].x=h.x,u[r].y=h.y;var d=n$13.fromAxisAngle(o$1p.UNIT_Z,-t,K$Y),f=p$1e.fromQuaternion(d,$$14),p=e.length,_=Number.POSITIVE_INFINITY,m=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(r=0;re$2a.EPSILON6)throw new t$16("vector must be normalized.");if(i.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),i.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){var r=i.x,o=i.y;i.x=(1-Math.abs(o))*e$2a.signNotZero(r),i.y=(1-Math.abs(r))*e$2a.signNotZero(o)}return i.x=e$2a.toSNorm(i.x,t),i.y=e$2a.toSNorm(i.y,t),i},octEncode:function(e,t){return t$10.octEncodeInRange(e,255,t)}},y$$=new o$1o,w$12=new Uint8Array(1);function h$14(e){return w$12[0]=e,w$12[0]}t$10.octEncodeToCartesian4=function(e,t){return t$10.octEncodeInRange(e,65535,y$$),t.x=h$14(y$$.x*F$1b),t.y=h$14(y$$.x),t.z=h$14(y$$.y*F$1b),t.w=h$14(y$$.y),t},t$10.octDecodeInRange=function(e,t,i,n){if(o$1q.defined("result",n),e<0||e>i||t<0||t>i)throw new t$16("x and y must be unsigned normalized integers between 0 and "+i);if(n.x=e$2a.fromSNorm(e,i),n.y=e$2a.fromSNorm(t,i),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){var r=n.x;n.x=(1-Math.abs(n.y))*e$2a.signNotZero(r),n.y=(1-Math.abs(r))*e$2a.signNotZero(n.y)}return o$1p.normalize(n,n)},t$10.octDecode=function(e,t,i){return t$10.octDecodeInRange(e,t,255,i)},t$10.octDecodeFromCartesian4=function(e,t){o$1q.typeOf.object("encoded",e),o$1q.typeOf.object("result",t);var i=e.x,n=e.y,r=e.z,o=e.w;if(i<0||i>255||n<0||n>255||r<0||r>255||o<0||o>255)throw new t$16("x, y, z, and w must be unsigned normalized integers between 0 and 255");var a=i*M$1a+n,s=r*M$1a+o;return t$10.octDecodeInRange(a,s,65535,t)},t$10.octPackFloat=function(e){return o$1q.defined("encoded",e),256*e.x+e.y};var b$1f=new o$1o;function g$1c(e){return e>>1^-(1&e)}t$10.octEncodeFloat=function(e){return t$10.octEncode(e,b$1f),t$10.octPackFloat(b$1f)},t$10.octDecodeFloat=function(e,t){o$1q.defined("value",e);var i=e/256,n=Math.floor(i),r=256*(i-n);return t$10.octDecode(n,r,t)},t$10.octPack=function(e,t,i,n){o$1q.defined("v1",e),o$1q.defined("v2",t),o$1q.defined("v3",i),o$1q.defined("result",n);var r=t$10.octEncodeFloat(e),o=t$10.octEncodeFloat(t),a=t$10.octEncode(i,b$1f);return n.x=65536*a.x+r,n.y=65536*a.y+o,n},t$10.octUnpack=function(e,t,i,n){o$1q.defined("packed",e),o$1q.defined("v1",t),o$1q.defined("v2",i),o$1q.defined("v3",n);var r=e.x/65536,o=Math.floor(r),a=65536*(r-o);r=e.y/65536;var s=Math.floor(r),l=65536*(r-s);t$10.octDecodeFloat(a,t),t$10.octDecodeFloat(l,i),t$10.octDecode(o,s,n)},t$10.compressTextureCoordinates=function(e){return o$1q.defined("textureCoordinates",e),4096*(4095*e.x|0)+(4095*e.y|0)},t$10.decompressTextureCoordinates=function(e,t){o$1q.defined("compressed",e),o$1q.defined("result",t);var i=e/4096,n=Math.floor(i);return t.x=n/4095,t.y=(e-4096*n)/4095,t},t$10.zigZagDeltaDecode=function(e,t,i){o$1q.defined("uBuffer",e),o$1q.defined("vBuffer",t),o$1q.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),e$2b(i)&&o$1q.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,i.length);for(var n=e.length,r=0,o=0,a=0,s=0;s=0?(i=65536*Math.floor(e/65536),t.high=i,t.low=e-i):(i=65536*Math.floor(-e/65536),t.high=-i,t.low=e+i),t};var n$12={high:0,low:0};i$11.fromCartesian=function(e,t){o$1q.typeOf.object("cartesian",e),e$2b(t)||(t=new i$11);var i=t.high,n=t.low;return i$11.encode(e.x,n$12),i.x=n$12.high,n.x=n$12.low,i$11.encode(e.y,n$12),i.y=n$12.high,n.y=n$12.low,i$11.encode(e.z,n$12),i.z=n$12.high,n.z=n$12.low,t};var t$$=new i$11;i$11.writeElements=function(e,t,i){o$1q.defined("cartesianArray",t),o$1q.typeOf.number("index",i),o$1q.typeOf.number.greaterThanOrEquals("index",i,0),i$11.fromCartesian(e,t$$);var n=t$$.high,r=t$$.low;t[i]=n.x,t[i+1]=n.y,t[i+2]=n.z,t[i+3]=r.x,t[i+4]=r.y,t[i+5]=r.z};var r$17={UNSIGNED_BYTE:de$x.UNSIGNED_BYTE,UNSIGNED_SHORT:de$x.UNSIGNED_SHORT,UNSIGNED_INT:de$x.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case r$17.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r$17.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r$17.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t$16("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return r$17.UNSIGNED_SHORT;case 4:return r$17.UNSIGNED_INT;case 1:return r$17.UNSIGNED_BYTE;default:throw new t$16("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return e$2b(e)&&(e===r$17.UNSIGNED_BYTE||e===r$17.UNSIGNED_SHORT||e===r$17.UNSIGNED_INT)},createTypedArray:function(e,t){if(!e$2b(e))throw new t$16("numberOfVertices is required.");return e>=e$2a.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,i,n){if(!e$2b(e))throw new t$16("numberOfVertices is required.");if(!e$2b(t))throw new t$16("sourceArray is required.");if(!e$2b(i))throw new t$16("byteOffset is required.");return e>=e$2a.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,i,n):new Uint16Array(t,i,n)}},ce$x=Object.freeze(r$17),D$12={calculateACMR:function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).indices,i=e.maximumIndex,n=u$_(e.cacheSize,24);if(!e$2b(t))throw new t$16("indices is required.");var r=t.length;if(r<3||r%3!=0)throw new t$16("indices length must be a multiple of three.");if(i<=0)throw new t$16("maximumIndex must be greater than zero.");if(n<3)throw new t$16("cacheSize must be greater than two.");if(!e$2b(i)){i=0;for(var o=0,a=t[o];oi&&(i=a),a=t[++o]}for(var s=[],l=0;ln&&(s[t[c]]=u,++u);return(u-n+1)/(r/3)}};D$12.tipsify=function(e){var t,i=(e=u$_(e,u$_.EMPTY_OBJECT)).indices,n=e.maximumIndex,r=u$_(e.cacheSize,24);function o(e,i,n,r,o,a,s){for(var l,u=-1,c=-1,h=0;hc||-1===c)&&(c=l,u=d)),++h}return-1===u?function(e,i,n,r){for(;i.length>=1;){var o=i[i.length-1];if(i.splice(i.length-1,1),e[o].numLiveTriangles>0)return o}for(;t0)return++t-1;++t}return-1}(r,a,0,s):u}if(!e$2b(i))throw new t$16("indices is required.");var a=i.length;if(a<3||a%3!=0)throw new t$16("indices length must be a multiple of three.");if(n<=0)throw new t$16("maximumIndex must be greater than zero.");if(r<3)throw new t$16("cacheSize must be greater than two.");var s=0,l=0,u=i[l],c=a;if(e$2b(n))s=n+1;else{for(;ls&&(s=u),u=i[++l];if(-1===s)return 0;++s}var h,d=[];for(h=0;hr&&(m.timeStamp=_,++_),++l}p=o(0,r,y,d,_,$,s)}return T};var k$13={};function gr$6(e,t,i,n,r){e[t++]=i,e[t++]=n,e[t++]=n,e[t++]=r,e[t++]=r,e[t]=i}function ma$5(e){for(var t=e.length,i=t/3*6,n=ce$x.createTypedArray(t,i),r=0,o=0;o=3){var i=6*(t-2),n=ce$x.createTypedArray(t,i);gr$6(n,0,e[0],e[1],e[2]);for(var r=6,o=3;o0){for(var t=e.length-1,i=6*(t-1),n=ce$x.createTypedArray(t,i),r=e[0],o=0,a=1;ar&&(r=i[o]);e.indices=D$12.tipsify({indices:i,maximumIndex:r,cacheSize:t})}return e},k$13.fitToUnsignedShortIndices=function(e){if(!e$2b(e))throw new t$16("geometry is required.");if(e$2b(e.indices)&&e.primitiveType!==W$18.TRIANGLES&&e.primitiveType!==W$18.LINES&&e.primitiveType!==W$18.POINTS)throw new t$16("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");var t=[],i=I$1p.computeNumberOfVertices(e);if(e$2b(e.indices)&&i>=e$2a.SIXTY_FOUR_KILOBYTES){var n,r=[],o=[],a=0,s=Yr$2(e.attributes),l=e.indices,u=l.length;e.primitiveType===W$18.TRIANGLES?n=3:e.primitiveType===W$18.LINES?n=2:e.primitiveType===W$18.POINTS&&(n=1);for(var c=0;c=e$2a.SIXTY_FOUR_KILOBYTES&&(t.push(new I$1p({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),r=[],o=[],a=0,s=Yr$2(e.attributes))}0!==o.length&&t.push(new I$1p({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var Hr$2=new o$1p,da$2=new a$18;k$13.projectTo2D=function(e,t,i,n,r){if(!e$2b(e))throw new t$16("geometry is required.");if(!e$2b(t))throw new t$16("attributeName is required.");if(!e$2b(i))throw new t$16("attributeName3D is required.");if(!e$2b(n))throw new t$16("attributeName2D is required.");if(!e$2b(e.attributes[t]))throw new t$16("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==S$12.DOUBLE)throw new t$16("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var o=e.attributes[t],a=(r=e$2b(r)?r:new n$1b).ellipsoid,s=o.values,l=new Float64Array(s.length),u=0,c=0;cC&&(C=S)}return new I$1p({attributes:p,indices:f,primitiveType:u,boundingSphere:e$2b(T)?new i$1c(T,C):void 0})}k$13.combineInstances=function(e){if(!e$2b(e)||e.length<1)throw new t$16("instances is required and must have length greater than zero.");for(var t=[],i=[],n=e.length,r=0;r0&&a.push(Gr$4(t,"geometry")),i.length>0&&(a.push(Gr$4(i,"westHemisphereGeometry")),a.push(Gr$4(i,"eastHemisphereGeometry"))),a};var U$19=new o$1p,mr$6=new o$1p,or$a=new o$1p,sr$7=new o$1p;k$13.computeNormal=function(e){if(!e$2b(e))throw new t$16("geometry is required.");if(!e$2b(e.attributes.position)||!e$2b(e.attributes.position.values))throw new t$16("geometry.attributes.position.values is required.");if(!e$2b(e.indices))throw new t$16("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!=0)throw new t$16("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==W$18.TRIANGLES)throw new t$16("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var t,i=e.indices,n=e.attributes,r=n.position.values,o=n.position.values.length/3,a=i.length,s=new Array(o),l=new Array(a/3),u=new Array(a);for(t=0;t0){for(c=0;c3&&(i[3]=0,i[4]=2,i[5]=3);for(var n=6,r=3;rr?n>o?e$2a.sign(e.y):e$2a.sign(i.y):r>o?e$2a.sign(t.y):e$2a.sign(i.y))<0;ar$9(e,a),ar$9(t,a),ar$9(i,a)}k$13.compressVertices=function(e){if(!e$2b(e))throw new t$16("geometry is required.");var t,i,n=e.attributes.extrudeDirection;if(e$2b(n)){var r=n.values;i=r.length/3;var o=new Float32Array(2*i),a=0;for(t=0;t=0||t.x>=0||i.x>=0)){Da$6(e,t,i);var n=e.y<0,r=t.y<0,o=i.y<0,a=0;a+=n?1:0,a+=r?1:0,a+=o?1:0;var s=Rr$4.indices;1===a?(s[1]=3,s[2]=4,s[5]=6,s[7]=6,s[8]=5,n?(Z$14(e,t,er$c,vr$7),Z$14(e,i,nr$c,tr$b),s[0]=0,s[3]=1,s[4]=2,s[6]=1):r?(Z$14(t,i,er$c,vr$7),Z$14(t,e,nr$c,tr$b),s[0]=1,s[3]=2,s[4]=0,s[6]=2):o&&(Z$14(i,e,er$c,vr$7),Z$14(i,t,nr$c,tr$b),s[0]=2,s[3]=0,s[4]=1,s[6]=0)):2===a&&(s[2]=4,s[4]=4,s[5]=3,s[7]=5,s[8]=6,n?r?o||(Z$14(i,e,er$c,vr$7),Z$14(i,t,nr$c,tr$b),s[0]=0,s[1]=1,s[3]=0,s[6]=2):(Z$14(t,i,er$c,vr$7),Z$14(t,e,nr$c,tr$b),s[0]=2,s[1]=0,s[3]=2,s[6]=1):(Z$14(e,t,er$c,vr$7),Z$14(e,i,nr$c,tr$b),s[0]=1,s[1]=2,s[3]=1,s[6]=0));var l=Rr$4.positions;return l[0]=e,l[1]=t,l[2]=i,l.length=3,(1===a||2===a)&&(l[3]=er$c,l[4]=nr$c,l[5]=vr$7,l[6]=tr$b,l.length=7),Rr$4}}function Qr$2(e,t){var i=e.attributes;if(0!==i.position.values.length){for(var n in i)if(i.hasOwnProperty(n)&&e$2b(i[n])&&e$2b(i[n].values)){var r=i[n];r.values=S$12.createTypedArray(r.componentDatatype,r.values)}var o=I$1p.computeNumberOfVertices(e);return e.indices=ce$x.createTypedArray(o,e.indices),t&&(e.boundingSphere=i$1c.fromVertices(i.position.values)),e}}function ur$8(e){var t=e.attributes,i={};for(var n in t)if(t.hasOwnProperty(n)&&e$2b(t[n])&&e$2b(t[n].values)){var r=t[n];i[n]=new o$1c({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]})}return new I$1p({attributes:i,indices:[],primitiveType:e.primitiveType})}function Br$3(e,t,i){var n=e$2b(e.geometry.boundingSphere);t=Qr$2(t,n),e$2b(i=Qr$2(i,n))&&!e$2b(t)?e.geometry=i:!e$2b(i)&&e$2b(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=i,e.geometry=void 0)}function Fr$3(e,t){var i=new e,n=new e,r=new e;return function(o,a,s,l,u,c,h,d){var f=e.fromArray(u,o*t,i),p=e.fromArray(u,a*t,n),_=e.fromArray(u,s*t,r);e.multiplyByScalar(f,l.x,f),e.multiplyByScalar(p,l.y,p),e.multiplyByScalar(_,l.z,_);var m=e.add(f,p,f);e.add(m,_,m),d&&e.normalize(m,m),e.pack(m,c,h*t)}}var Va$4=Fr$3(e$29,4),Ar$4=Fr$3(o$1p,3),$r$3=Fr$3(o$1o,2),qa$5=function(e,t,i,n,r,o,a){var s=r[e]*n.x,l=r[t]*n.y,u=r[i]*n.z;o[a]=s+l+u>e$2a.EPSILON6?1:0},yr$5=new o$1p,kr$4=new o$1p,Ir$6=new o$1p,Ga$5=new o$1p;function Pr$3(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){if(e$2b(o)||e$2b(a)||e$2b(s)||e$2b(l)||e$2b(u)||0!==f){var m=S$Z(n,o$1p.fromArray(r,3*e,yr$5),o$1p.fromArray(r,3*t,kr$4),o$1p.fromArray(r,3*i,Ir$6),Ga$5);if(e$2b(o)&&Ar$4(e,t,i,m,o,h.normal.values,_,!0),e$2b(u)){var g,x=o$1p.fromArray(u,3*e,yr$5),v=o$1p.fromArray(u,3*t,kr$4),y=o$1p.fromArray(u,3*i,Ir$6);o$1p.multiplyByScalar(x,m.x,x),o$1p.multiplyByScalar(v,m.y,v),o$1p.multiplyByScalar(y,m.z,y),o$1p.equals(x,o$1p.ZERO)&&o$1p.equals(v,o$1p.ZERO)&&o$1p.equals(y,o$1p.ZERO)?((g=yr$5).x=0,g.y=0,g.z=0):(g=o$1p.add(x,v,x),o$1p.add(g,y,g),o$1p.normalize(g,g)),o$1p.pack(g,h.extrudeDirection.values,3*_)}if(e$2b(c)&&qa$5(e,t,i,m,c,h.applyOffset.values,_),e$2b(a)&&Ar$4(e,t,i,m,a,h.tangent.values,_,!0),e$2b(s)&&Ar$4(e,t,i,m,s,h.bitangent.values,_,!0),e$2b(l)&&$r$3(e,t,i,m,l,h.st.values,_),f>0)for(var $=0;$3)for(var L=A.positions,M=A.indices,R=M.length,I=0;I0)){var l=o$1p.unpack(n,a,va$3);(s.y<0&&l.y>0||s.y>0&&l.y<0)&&(a-3>0?(n[a]=i[a-3],n[a+1]=i[a-2],n[a+2]=i[a-1]):o$1p.pack(s,n,a));var u=o$1p.unpack(r,a,Cr$4);(s.y<0&&u.y>0||s.y>0&&u.y<0)&&(a+30||i$1c.intersectPlane(i,o$1m.ORIGIN_ZX_PLANE)!==Ae$u.INTERSECTING))return e;if(t.geometryType!==Me$p.NONE)switch(t.geometryType){case Me$p.POLYLINES:Za$6(e);break;case Me$p.TRIANGLES:jr$4(e);break;case Me$p.LINES:aa$5(e)}else Na$4(t),t.primitiveType===W$18.TRIANGLES?jr$4(e):t.primitiveType===W$18.LINES&&aa$5(e);return e};var C$1b=e$2a.EPSILON10;function D$11(e,t,i,n){if(o$1q.defined("equalsEpsilon",t),e$2b(e)){n=u$_(n,C$1b),i=u$_(i,!1);var r,o,a,s=e.length;if(s<2)return e;for(r=1;r1&&t(l[0],l[l.length-1],n)&&l.shift(),l}}function T$18(e,t,i){if(0===e)return t*i;var n=e*e,r=n*n,o=r*n,a=o*n,s=a*n,l=s*n,u=i;return t*((1-n/4-3*r/64-5*o/256-175*a/16384-441*s/65536-4851*l/1048576)*u-(3*n/8+3*r/32+45*o/1024+105*a/4096+2205*s/131072+6237*l/524288)*Math.sin(2*u)+(15*r/256+45*o/1024+525*a/16384+1575*s/65536+155925*l/8388608)*Math.sin(4*u)-(35*o/3072+175*a/12288+3675*s/262144+13475*l/1048576)*Math.sin(6*u)+(315*a/131072+2205*s/524288+43659*l/8388608)*Math.sin(8*u)-(693*s/1310720+6237*l/5242880)*Math.sin(10*u)+1001*l/8388608*Math.sin(12*u))}function z$10(e,t,i){var n=e/i;if(0===t)return n;var r=n*n,o=r*n,a=o*n,s=t*t,l=s*s,u=l*s,c=u*s,h=c*s,d=h*s,f=Math.sin(2*n),p=Math.cos(2*n),_=Math.sin(4*n),m=Math.cos(4*n),g=Math.sin(6*n),x=Math.cos(6*n),v=Math.sin(8*n),y=Math.cos(8*n),$=Math.sin(10*n);return n+n*s/4+7*n*l/64+15*n*u/256+579*n*c/16384+1515*n*h/65536+16837*n*d/1048576+(3*n*l/16+45*n*u/256-n*(32*r-561)*c/4096-n*(232*r-1677)*h/16384+n*(399985-90560*r+512*a)*d/5242880)*p+(21*n*u/256+483*n*c/4096-n*(224*r-1969)*h/16384-n*(33152*r-112599)*d/1048576)*m+(151*n*c/4096+4681*n*h/65536+1479*n*d/16384-453*o*d/32768)*x+(1097*n*h/65536+42783*n*d/1048576)*y+8011*n*d/1048576*Math.cos(10*n)+(3*s/8+3*l/16+213*u/2048-3*r*u/64+255*c/4096-33*r*c/512+20861*h/524288-33*r*h/512+a*h/1024+28273*d/1048576-471*r*d/8192+9*a*d/4096)*f+(21*l/256+21*u/256+533*c/8192-21*r*c/512+197*h/4096-315*r*h/4096+584039*d/16777216-12517*r*d/131072+7*a*d/2048)*_+(151*u/6144+151*c/4096+5019*h/131072-453*r*h/16384+26965*d/786432-8607*r*d/131072)*g+(1097*c/131072+1097*h/65536+225797*d/10485760-1097*r*d/65536)*v+(8011*h/2621440+8011*d/1048576)*$+293393*d/251658240*Math.sin(12*n)}function p$16(e,t){if(0===e)return Math.log(Math.tan(.5*(e$2a.PI_OVER_TWO+t)));var i=e*Math.sin(t);return Math.log(Math.tan(.5*(e$2a.PI_OVER_TWO+t)))-e/2*Math.log((1+i)/(1-i))}function G$1h(e,t,i,n,r){var o=p$16(e._ellipticity,i),a=p$16(e._ellipticity,r);return Math.atan2(e$2a.negativePiToPi(n-t),a-o)}function k$12(e,t,i,n,r,o,a){var s=e._heading,l=o-n,u=0;if(e$2a.equalsEpsilon(Math.abs(s),e$2a.PI_OVER_TWO,e$2a.EPSILON8))if(t===i)u=t*Math.cos(r)*e$2a.negativePiToPi(l);else{var c=Math.sin(r);u=t*Math.cos(r)*e$2a.negativePiToPi(l)/Math.sqrt(1-e._ellipticitySquared*c*c)}else{var h=T$18(e._ellipticity,t,r);u=(T$18(e._ellipticity,t,a)-h)/Math.cos(s)}return Math.abs(u)}var A$1i=new o$1p,q$1a=new o$1p;function D$10(e,t,i,n){var r=o$1p.normalize(n.cartographicToCartesian(t,q$1a),A$1i),o=o$1p.normalize(n.cartographicToCartesian(i,q$1a),q$1a);o$1q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(o$1p.angleBetween(r,o))-Math.PI),.0125);var a=n.maximumRadius,s=n.minimumRadius,l=a*a,u=s*s;e._ellipticitySquared=(l-u)/l,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=a$18.clone(t,e._start),e._start.height=0,e._end=a$18.clone(i,e._end),e._end.height=0,e._heading=G$1h(e,t.longitude,t.latitude,i.longitude,i.latitude),e._distance=k$12(e,n.maximumRadius,n.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude)}function W$15(e,t,i,n,r,o){var a,s,l,u=r*r;if(Math.abs(e$2a.PI_OVER_TWO-Math.abs(t))>e$2a.EPSILON8){s=z$10(T$18(r,n,e.latitude)+i*Math.cos(t),r,n);var c=p$16(r,e.latitude),h=p$16(r,s);l=Math.tan(t)*(h-c),a=e$2a.negativePiToPi(e.longitude+l)}else{var d;if(s=e.latitude,0===r)d=n*Math.cos(e.latitude);else{var f=Math.sin(e.latitude);d=n*Math.cos(e.latitude)/Math.sqrt(1-u*f*f)}l=i/d,a=t>0?e$2a.negativePiToPi(e.longitude+l):e$2a.negativePiToPi(e.longitude-l)}return e$2b(o)?(o.longitude=a,o.latitude=s,o.height=0,o):new a$18(a,s,0)}function P$16(e,t,i){var n=u$_(i,t$13.WGS84);this._ellipsoid=n,this._start=new a$18,this._end=new a$18,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,e$2b(e)&&e$2b(t)&&D$10(this,e,t,n)}function a$_(e){e=u$_(e,u$_.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}function z$$(e,t,i){i=i||2;var n,r,o,a,s,l,u,c=t&&t.length,h=c?t[0]*i:e.length,d=P$15(e,0,h,i,!0),f=[];if(!d||d.next===d.prev)return f;if(c&&(d=K$X(e,t,d,i)),e.length>80*i){n=o=e[0],r=a=e[1];for(var p=i;po&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-r))?1/u:0}return g$1b(d,f,i,n,r,u),f}function P$15(e,t,i,n,r){var o,a;if(r===E$1j(e,t,i,n)>0)for(o=t;o=t;o-=n)a=D$$(o,e[o],e[o+1],a);return a&&L$1a(a,a.next)&&(M$19(a),a=a.next),a}function Z$13(e,t){if(!e)return e;t||(t=e);var i,n=e;do{if(i=!1,n.steiner||!L$1a(n,n.next)&&0!==h$13(n.prev,n,n.next))n=n.next;else{if(M$19(n),(n=t=n.prev)===n.next)break;i=!0}}while(i||n!==t);return t}function g$1b(e,t,i,n,r,o,a){if(e){!a&&o&&_$11(e,n,r,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?V$11(e,n,r,o):O$P(e))t.push(s.i/i),t.push(e.i/i),t.push(l.i/i),M$19(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?g$1b(e=G$1g(Z$13(e),t,i),t,i,n,r,o,2):2===a&&J$_(e,t,i,n,r,o):g$1b(Z$13(e),t,i,n,r,o,1);break}}}function O$P(e){var t=e.prev,i=e,n=e.next;if(h$13(t,i,n)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(w$11(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&h$13(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function V$11(e,t,i,n){var r=e.prev,o=e,a=e.next;if(h$13(r,o,a)>=0)return!1;for(var s=r.xo.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=T$17(s,l,t,i,n),d=T$17(u,c,t,i,n),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&w$11(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&h$13(f.prev,f,f.next)>=0||(f=f.prevZ,p!==e.prev&&p!==e.next&&w$11(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&h$13(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&w$11(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&h$13(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&w$11(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&h$13(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function G$1g(e,t,i){var n=e;do{var r=n.prev,o=n.next.next;!L$1a(r,o)&&C$1a(r,n,n.next,o)&&F$1a(r,o)&&F$1a(o,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(o.i/i),M$19(n),M$19(n.next),n=e=o),n=n.next}while(n!==e);return Z$13(n)}function J$_(e,t,i,n,r,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Y$U(a,s)){var l=B$10(a,s);return a=Z$13(a,a.next),l=Z$13(l,l.next),g$1b(a,t,i,n,r,o),void g$1b(l,t,i,n,r,o)}s=s.next}a=a.next}while(a!==e)}function K$X(e,t,i,n){var r,o,a,s=[];for(r=0,o=t.length;r=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if(a=s,s===r){if(o===n.y)return n;if(o===n.next.y)return n.next}i=n.x=n.x&&n.x>=c&&r!==n.x&&w$11(oi.x||n.x===i.x&&W$14(i,n)))&&(i=n,d=l)),n=n.next}while(n!==u);return i}function W$14(e,t){return h$13(e.prev,e,t.prev)<0&&h$13(t.next,e,e.next)<0}function _$11(e,t,i,n){var r=e;do{null===r.z&&(r.z=T$17(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,$$13(r)}function $$13(e){var t,i,n,r,o,a,s,l,u=1;do{for(i=e,e=null,o=null,a=0;i;){for(a++,n=i,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=n}o.nextZ=null,u*=2}while(a>1);return e}function T$17(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function X$11(e){var t=e,i=e;do{(t.x=0&&(e-a)*(n-s)-(i-a)*(t-s)>=0&&(i-a)*(o-s)-(r-a)*(n-s)>=0}function Y$U(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!I$1o(e,t)&&(F$1a(e,t)&&F$1a(t,e)&&S$Y(e,t)&&(h$13(e.prev,e,t.prev)||h$13(e,t.prev,t))||L$1a(e,t)&&h$13(e.prev,e,e.next)>0&&h$13(t.prev,t,t.next)>0)}function h$13(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function L$1a(e,t){return e.x===t.x&&e.y===t.y}function C$1a(e,t,i,n){var r=H$13(h$13(e,t,i)),o=H$13(h$13(e,t,n)),a=H$13(h$13(i,n,e)),s=H$13(h$13(i,n,t));return!!(r!==o&&a!==s||0===r&&k$11(e,i,t)||0===o&&k$11(e,n,t)||0===a&&k$11(i,e,n)||0===s&&k$11(i,t,n))}function k$11(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function H$13(e){return e>0?1:e<0?-1:0}function I$1o(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&C$1a(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function F$1a(e,t){return h$13(e.prev,e,e.next)<0?h$13(e,t,e.next)>=0&&h$13(e,e.prev,t)>=0:h$13(e,t,e.prev)<0||h$13(e,e.next,t)<0}function S$Y(e,t){var i=e,n=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}function B$10(e,t){var i=new A$1h(e.i,e.x,e.y),n=new A$1h(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function D$$(e,t,i,n){var r=new A$1h(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function M$19(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function A$1h(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E$1j(e,t,i,n){for(var r=0,o=t,a=i-n;o0&&(n+=e[r-1].length,i.holes.push(n))}return i};var e$1Y={CLOCKWISE:de$x.CW,COUNTER_CLOCKWISE:de$x.CCW,NONE:de$x.NONE,validate:function(e){return e===e$1Y.CLOCKWISE||e===e$1Y.COUNTER_CLOCKWISE}},W$13=Object.freeze(e$1Y),nr$b=new o$1p,ur$7=new o$1p,A$1g={computeArea2D:function(e){o$1q.defined("positions",e),o$1q.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);for(var t=e.length,i=0,n=t-1,r=0;r0?W$13.COUNTER_CLOCKWISE:W$13.CLOCKWISE},triangulate:function(e,t){return o$1q.defined("positions",e),z$$(o$1o.packArray(e),t,2)}},X$10=new o$1p,Y$T=new o$1p,Z$12=new o$1p,$$12=new o$1p,H$12=new o$1p,rr$b=new o$1p,g$1a=new o$1p;A$1g.computeSubdivision=function(e,t,i,n,r){r=u$_(r,!1),n=u$_(n,e$2a.RADIANS_PER_DEGREE),o$1q.typeOf.object("ellipsoid",e),o$1q.defined("positions",t),o$1q.defined("indices",i),o$1q.typeOf.number.greaterThanOrEquals("indices.length",i.length,3),o$1q.typeOf.number.equals("indices.length % 3","0",i.length%3,0),o$1q.typeOf.number.greaterThan("granularity",n,0);var o,a=i.slice(0),s=t.length,l=new Array(3*s),u=0;for(o=0;o0;){var m,g,x=a.pop(),v=a.pop(),y=a.pop(),$=o$1p.fromArray(l,3*y,X$10),b=o$1p.fromArray(l,3*v,Y$T),T=o$1p.fromArray(l,3*x,Z$12),C=r?$:o$1p.multiplyByScalar(o$1p.normalize($,$$12),f,$$12),S=r?b:o$1p.multiplyByScalar(o$1p.normalize(b,H$12),f,H$12),w=r?T:o$1p.multiplyByScalar(o$1p.normalize(T,rr$b),f,rr$b),E=o$1p.magnitudeSquared(o$1p.subtract(C,S,g$1a)),P=o$1p.magnitudeSquared(o$1p.subtract(S,w,g$1a)),A=o$1p.magnitudeSquared(o$1p.subtract(w,C,g$1a)),L=Math.max(E,P,A);L>_?E===L?(e$2b(o=d[m=Math.min(y,v)+" "+Math.max(y,v)])||(g=o$1p.add($,b,g$1a),o$1p.multiplyByScalar(g,.5,g),l.push(g.x,g.y,g.z),o=l.length/3-1,d[m]=o),a.push(y,o,x),a.push(o,v,x)):P===L?(e$2b(o=d[m=Math.min(v,x)+" "+Math.max(v,x)])||(g=o$1p.add(b,T,g$1a),o$1p.multiplyByScalar(g,.5,g),l.push(g.x,g.y,g.z),o=l.length/3-1,d[m]=o),a.push(v,o,y),a.push(o,x,y)):A===L&&(e$2b(o=d[m=Math.min(x,y)+" "+Math.max(x,y)])||(g=o$1p.add(T,$,g$1a),o$1p.multiplyByScalar(g,.5,g),l.push(g.x,g.y,g.z),o=l.length/3-1,d[m]=o),a.push(x,o,v),a.push(o,y,v)):(h.push(y),h.push(v),h.push(x))}return new I$1p({attributes:{position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:l})},indices:h,primitiveType:W$18.TRIANGLES})};var or$9=new a$18,hr$4=new a$18,vr$6=new a$18,F$19=new a$18;function r$16(){this._array=[],this._offset=0,this._length=0}A$1g.computeRhumbLineSubdivision=function(e,t,i,n){n=u$_(n,e$2a.RADIANS_PER_DEGREE),o$1q.typeOf.object("ellipsoid",e),o$1q.defined("positions",t),o$1q.defined("indices",i),o$1q.typeOf.number.greaterThanOrEquals("indices.length",i.length,3),o$1q.typeOf.number.equals("indices.length % 3","0",i.length%3,0),o$1q.typeOf.number.greaterThan("granularity",n,0);var r,o=i.slice(0),a=t.length,s=new Array(3*a),l=0;for(r=0;r0;){var g=o.pop(),x=o.pop(),v=o.pop(),y=o$1p.fromArray(s,3*v,X$10),$=o$1p.fromArray(s,3*x,Y$T),b=o$1p.fromArray(s,3*g,Z$12),T=e.cartesianToCartographic(y,or$9),C=e.cartesianToCartographic($,hr$4),S=e.cartesianToCartographic(b,vr$6);p.setEndPoints(T,C);var w=p.surfaceDistance;_.setEndPoints(C,S);var E=_.surfaceDistance;m.setEndPoints(S,T);var P,A,L,M,R=m.surfaceDistance,I=Math.max(w,E,R);I>f?w===I?(e$2b(r=h[P=Math.min(v,x)+" "+Math.max(v,x)])||(A=p.interpolateUsingFraction(.5,F$19),L=.5*(T.height+C.height),M=o$1p.fromRadians(A.longitude,A.latitude,L,e,g$1a),s.push(M.x,M.y,M.z),r=s.length/3-1,h[P]=r),o.push(v,r,g),o.push(r,x,g)):E===I?(e$2b(r=h[P=Math.min(x,g)+" "+Math.max(x,g)])||(A=_.interpolateUsingFraction(.5,F$19),L=.5*(C.height+S.height),M=o$1p.fromRadians(A.longitude,A.latitude,L,e,g$1a),s.push(M.x,M.y,M.z),r=s.length/3-1,h[P]=r),o.push(x,r,v),o.push(r,g,v)):R===I&&(e$2b(r=h[P=Math.min(g,v)+" "+Math.max(g,v)])||(A=m.interpolateUsingFraction(.5,F$19),L=.5*(S.height+T.height),M=o$1p.fromRadians(A.longitude,A.latitude,L,e,g$1a),s.push(M.x,M.y,M.z),r=s.length/3-1,h[P]=r),o.push(g,r,x),o.push(r,v,x)):(c.push(v),c.push(x),c.push(g))}return new I$1p({attributes:{position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:s})},indices:c,primitiveType:W$18.TRIANGLES})},A$1g.scaleToGeodeticHeight=function(e,t,i,n){i=u$_(i,t$13.WGS84);var r=nr$b,o=ur$7;if(t=u$_(t,0),n=u$_(n,!0),e$2b(e))for(var a=e.length,s=0;s10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,i}},r$16.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},r$16.prototype.contains=function(e){return-1!==this._array.indexOf(e)},r$16.prototype.clear=function(){this._array.length=this._offset=this._length=0},r$16.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var y$_={computeHierarchyPackedLength:function(e){for(var t=0,i=[e];i.length>0;){var n=i.pop();if(e$2b(n)){t+=2;var r=n.positions,o=n.holes;if(e$2b(r)&&(t+=r.length*o$1p.packedLength),e$2b(o))for(var a=o.length,s=0;s0;){var r=n.pop();if(e$2b(r)){var o=r.positions,a=r.holes;if(t[i++]=e$2b(o)?o.length:0,t[i++]=e$2b(a)?a.length:0,e$2b(o))for(var s=o.length,l=0;l0?new Array(n):void 0,a=0;aZ$11.west-Z$11.east&&(r.east=Z$11.east,r.west=Z$11.west),r}var Je$9=new a$18;function be$u(e,t,i,n){for(var r=e.surfaceDistance,o=Math.ceil(r*t),a=o>0?r/(o-1):Number.POSITIVE_INFINITY,s=0,l=0;l0?Math.min(c,n.west):n.west,n.east=c<0?Math.max(c,n.east):n.east}}var Ne$j=[];function Xe$c(e,t,i,n,r,o,a,s,l,u){var c,h={walls:[]};if(o||a){var d,f,p=y$_.createGeometryFromPositions(e,t,i,r,s,l),_=p.attributes.position.values,m=p.indices;if(o&&a){var g=_.concat(_);d=g.length/3,(f=ce$x.createTypedArray(d,2*m.length)).set(m);var x=m.length,v=d/2;for(c=0;ce$2a.TWO_PI)throw new t$16("Rectangle width must be between 0 and 2*pi");if(e.height<0||e.height>e$2a.PI)throw new t$16("Rectangle height must be between 0 and pi");if(e$2b(n)&&!e$2a.equalsEpsilon(n.radii.x,n.radii.y,e$2a.EPSILON15))throw new t$16("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");var o,a,s,l,u,c,h;if(t=u$_(t,0),i=u$_(i,0),n=u$_(n,t$13.WGS84),e.width<=e$2a.PI){var d=h$18.center(e,fa$3),f=new f$14(n.cartographicToCartesian(d,Ia$4),n);h=f.plane;var p=d.longitude,_=e.south<0&&e.north>0?0:d.latitude,m=a$18.fromRadians(p,e.north,i,Sa$3),g=a$18.fromRadians(e.west,e.north,i,qa$4),x=a$18.fromRadians(e.west,_,i,ka$3),v=a$18.fromRadians(e.west,e.south,i,Ua$4),y=a$18.fromRadians(p,e.south,i,Da$5),$=n.cartographicToCartesian(m,Va$3),b=n.cartographicToCartesian(g,ma$4),T=n.cartographicToCartesian(x,Xa$4),C=n.cartographicToCartesian(v,wa$2),S=n.cartographicToCartesian(y,ja$3),w=f.projectPointToNearestOnPlane($,Wa$3),E=f.projectPointToNearestOnPlane(b,_a$3),P=f.projectPointToNearestOnPlane(T,Za$5),A=f.projectPointToNearestOnPlane(C,Ya$5),L=f.projectPointToNearestOnPlane(S,Fa$4);return a=-(o=Math.min(E.x,P.x,A.x)),l=Math.max(E.y,w.y),s=Math.min(A.y,L.y),g.height=v.height=t,b=n.cartographicToCartesian(g,ma$4),C=n.cartographicToCartesian(v,wa$2),u=Math.min(o$1m.getPointDistance(h,b),o$1m.getPointDistance(h,C)),c=i,ua$4(f.origin,f.xAxis,f.yAxis,f.zAxis,o,a,s,l,u,c,r)}var M=e.south>0,R=e.north<0,I=M?e.south:R?e.north:0,O=h$18.center(e,fa$3).longitude,D=o$1p.fromRadians(O,I,i,n,Ga$4);D.z=0;var B=Math.abs(D.x)=l?Ae$u.INSIDE:Ae$u.INTERSECTING};var ra$5=new o$1p,ta$3=new o$1p,ea$5=new o$1p,er$a=new o$1p,nr$9=new o$1p;y$Z.distanceSquaredTo=function(e,t){if(!e$2b(e))throw new t$16("box is required.");if(!e$2b(t))throw new t$16("cartesian is required.");var i=o$1p.subtract(t,e.center,va$2),n=e.halfAxes,r=p$1e.getColumn(n,0,ra$5),o=p$1e.getColumn(n,1,ta$3),a=p$1e.getColumn(n,2,ea$5),s=o$1p.magnitude(r),l=o$1p.magnitude(o),u=o$1p.magnitude(a);o$1p.normalize(r,r),o$1p.normalize(o,o),o$1p.normalize(a,a);var c=er$a;c.x=o$1p.dot(i,r),c.y=o$1p.dot(i,o),c.z=o$1p.dot(i,a);var h,d=0;return c.x<-s?d+=(h=c.x+s)*h:c.x>s&&(d+=(h=c.x-s)*h),c.y<-l?d+=(h=c.y+l)*h:c.y>l&&(d+=(h=c.y-l)*h),c.z<-u?d+=(h=c.z+u)*h:c.z>u&&(d+=(h=c.z-u)*h),d};var la$5=new o$1p,or$7=new o$1p;y$Z.computePlaneDistances=function(e,t,i,n){if(!e$2b(e))throw new t$16("box is required.");if(!e$2b(t))throw new t$16("position is required.");if(!e$2b(i))throw new t$16("direction is required.");e$2b(n)||(n=new o$1n);var r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=e.center,s=e.halfAxes,l=p$1e.getColumn(s,0,ra$5),u=p$1e.getColumn(s,1,ta$3),c=p$1e.getColumn(s,2,ea$5),h=o$1p.add(l,u,la$5);o$1p.add(h,c,h),o$1p.add(h,a,h);var d=o$1p.subtract(h,t,or$7),f=o$1p.dot(i,d);return r=Math.min(f,r),o=Math.max(f,o),o$1p.add(a,l,h),o$1p.add(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.add(a,l,h),o$1p.subtract(h,u,h),o$1p.add(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.add(a,l,h),o$1p.subtract(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.add(h,u,h),o$1p.add(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.add(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.subtract(h,u,h),o$1p.add(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.subtract(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),n.start=r,n.stop=o,n};var sr$6=new i$1c;y$Z.isOccluded=function(e,t){if(!e$2b(e))throw new t$16("box is required.");if(!e$2b(t))throw new t$16("occluder is required.");var i=i$1c.fromOrientedBoundingBox(e,sr$6);return!t.isBoundingSphereVisible(i)},y$Z.prototype.intersectPlane=function(e){return y$Z.intersectPlane(this,e)},y$Z.prototype.distanceSquaredTo=function(e){return y$Z.distanceSquaredTo(this,e)},y$Z.prototype.computePlaneDistances=function(e,t,i){return y$Z.computePlaneDistances(this,e,t,i)},y$Z.prototype.isOccluded=function(e){return y$Z.isOccluded(this,e)},y$Z.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&o$1p.equals(e.center,t.center)&&p$1e.equals(e.halfAxes,t.halfAxes)},y$Z.prototype.clone=function(e){return y$Z.clone(this,e)},y$Z.prototype.equals=function(e){return y$Z.equals(this,e)};var pa$2=new e$29;y$Z.prototype._updateBBox=function(){if(1==this.areaDirty){var e=p$1e.getColumn(this.halfAxes,0,ra$5),t=o$1p.clone(o$1p.negate(e,k$10)),i=p$1e.getColumn(this.halfAxes,1,ta$3),n=o$1p.clone(o$1p.negate(i,k$10)),r=p$1e.getColumn(this.halfAxes,2,ea$5),o=o$1p.clone(o$1p.negate(r,k$10));this.bbox=[],o$1p.add(this.center,i,k$10),o$1p.add(k$10,o,E$1h),o$1p.add(E$1h,t,p$15),this.bbox[0]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1h,e,p$15),this.bbox[1]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(k$10,r,E$1h),o$1p.add(E$1h,e,p$15),this.bbox[2]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1h,t,p$15),this.bbox[3]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(this.center,n,k$10),o$1p.add(k$10,o,E$1h),o$1p.add(E$1h,t,p$15),this.bbox[4]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1h,e,p$15),this.bbox[5]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(k$10,r,E$1h),o$1p.add(E$1h,e,p$15),this.bbox[6]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1h,t,p$15),this.bbox[7]=new o$1p(p$15.x,p$15.y,p$15.z);var a=o$1p.magnitude(e),s=o$1p.magnitude(i),l=o$1p.magnitude(r),u=new o$1p(-a,-s,-l),c=new o$1p(a,s,l);if(a*s*l==0)return void(this.areaDirty=-1);o$1p.normalize(e,e),o$1p.normalize(i,i),o$1p.normalize(r,r),this.u=o$1p.clone(e),this.v=o$1p.clone(i),this.w=o$1p.clone(r),this.posMin=u,this.posMaX=c,this.areaDirty=0}};var j$1a=[];j$1a.push(new o$1o),j$1a.push(new o$1o),j$1a.push(new o$1o),j$1a.push(new o$1o),j$1a.push(new o$1o),j$1a.push(new o$1o);var cr$4=new a$18,J$Z=new o$1p;y$Z.prototype.calculateBoxArea=function(e,t,i,n,r,o,a,s){this._updateBBox();var l=e,u=o$1p.subtract(l,this.center,nr$9);if(-1==this.areaDirty){var c=r/n*($=-1!=o?o:.5*o$1p.distance(this.posMaX,this.posMin))/i;return e$2a.PI*c*c}var h=o$1p.fromElements(o$1p.dot(u,this.u),o$1p.dot(u,this.v),o$1p.dot(u,this.w),la$5),d=(h.xthis.posMaX.x?1:0)<<1)+((h.zthis.posMaX.z?1:0)<<3)+((h.y>this.posMaX.y?1:0)<<4)+((h.y42)return console.log("area calculation is wrong"),-100;var f=v$U[d];if(0==f.num){c=r/n*($=-1!=o?o:.5*o$1p.distance(this.posMaX,this.posMin))/i;return e$2a.PI*c*c}if(0==f.num)return console.log("area calculation is wrong"),-100;for(var p,_=[],m=a,g=0;g
";_0x41154e._AddLogEntry(n),_0x41154e._GenerateLimitMessage(e,0)}},_0x41154e._WarnDisabled=function(e,t){},_0x41154e._WarnEnabled=function(e,t){if(void 0===t||_0x41154e._CheckLimit(e,t)){var i=_0x41154e._FormatMessage(e);console.warn("BJS - "+i);var n="
"+e+"

";_0x41154e._AddLogEntry(n),_0x41154e._GenerateLimitMessage(e,1)}},_0x41154e._ErrorDisabled=function(e,t){},_0x41154e._ErrorEnabled=function(e,t){if(void 0===t||_0x41154e._CheckLimit(e,t)){var i=_0x41154e._FormatMessage(e);_0x41154e.errorsCount++,console.error("BJS - "+i);var n="
"+i+"

";_0x41154e._AddLogEntry(n),_0x41154e._GenerateLimitMessage(e,2)}},Object.defineProperty(_0x41154e,"LogCache",{get:function(){return _0x41154e._LogCache},enumerable:!1,configurable:!0}),_0x41154e.ClearLogCache=function(){_0x41154e._LogCache="",_0x41154e._LogLimitOutputs={},_0x41154e.errorsCount=0},Object.defineProperty(_0x41154e,"LogLevels",{set:function(e){(e&_0x41154e.MessageLogLevel)===_0x41154e.MessageLogLevel?_0x41154e.Log=_0x41154e._LogEnabled:_0x41154e.Log=_0x41154e._LogDisabled,(e&_0x41154e.WarningLogLevel)===_0x41154e.WarningLogLevel?_0x41154e.Warn=_0x41154e._WarnEnabled:_0x41154e.Warn=_0x41154e._WarnDisabled,(e&_0x41154e.ErrorLogLevel)===_0x41154e.ErrorLogLevel?_0x41154e.Error=_0x41154e._ErrorEnabled:_0x41154e.Error=_0x41154e._ErrorDisabled},enumerable:!1,configurable:!0}),_0x41154e.NoneLogLevel=0,_0x41154e.MessageLogLevel=1,_0x41154e.WarningLogLevel=2,_0x41154e.ErrorLogLevel=4,_0x41154e.AllLogLevel=7,_0x41154e.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",_0x41154e._LogCache="",_0x41154e._LogLimitOutputs={},_0x41154e.errorsCount=0,_0x41154e.Log=_0x41154e._LogEnabled,_0x41154e.Warn=_0x41154e._WarnEnabled,_0x41154e.Error=_0x41154e._ErrorEnabled;var _0x147389=(_0x383ba9=!0,function(e,t){var i=_0x383ba9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x383ba9=!1,i}),_0x27cb1d=_0x147389(void 0,(function(){return _0x27cb1d.toString().search("(((.+)+)+)+$").toString().constructor(_0x27cb1d).search("(((.+)+)+)+$")})),_0x383ba9;function _0x4d7f4f(){}_0x27cb1d(),Object.defineProperty(_0x4d7f4f,"BaseUrl",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.BaseUrl},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.BaseUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d7f4f,"DefaultRetryStrategy",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.DefaultRetryStrategy},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.DefaultRetryStrategy=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d7f4f,"CorsBehavior",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.CorsBehavior},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.CorsBehavior=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d7f4f,"UseFallbackTexture",{get:function(){return _Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.UseFallbackTexture},set:function(e){_Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.UseFallbackTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d7f4f,"RegisteredExternalClasses",{get:function(){return _instantiationTools__WEBPACK_IMPORTED_MODULE_11__.InstantiationTools.RegisteredExternalClasses},set:function(e){_instantiationTools__WEBPACK_IMPORTED_MODULE_11__.InstantiationTools.RegisteredExternalClasses=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d7f4f,"fallbackTexture",{get:function(){return _Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.FallbackTexture},set:function(e){_Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.FallbackTexture=e},enumerable:!1,configurable:!0}),_0x4d7f4f.FetchToRef=function(e,t,i,n,r,o){var a=4*((Math.abs(e)*i%i|0)+(Math.abs(t)*n%n|0)*i);o.r=r[a]/255,o.g=r[a+1]/255,o.b=r[a+2]/255,o.a=r[a+3]/255},_0x4d7f4f.Mix=function(e,t,i){return e*(1-i)+t*i},_0x4d7f4f.Instantiate=function(e){return _instantiationTools__WEBPACK_IMPORTED_MODULE_11__.InstantiationTools.Instantiate(e)},_0x4d7f4f.SetImmediate=function(e){_timingTools__WEBPACK_IMPORTED_MODULE_10__.TimingTools.SetImmediate(e)},_0x4d7f4f.IsExponentOfTwo=function(e){var t=1;do{t*=2}while(t1?1:Math.round(255*d)}i=c}var f=u.createImageData(e,t);f.data.set(i),u.putImageData(f,0,0);var p=_0x4d7f4f._ScreenshotCanvas;if(a){var _=document.createElement("canvas");_.width=e,_.height=t;var m=_.getContext("2d");if(!m)return;m.translate(0,t),m.scale(1,-1),m.drawImage(_0x4d7f4f._ScreenshotCanvas,0,0),p=_}s?_0x4d7f4f.ToBlob(p,(function(e){var t=new FileReader;t.onload=function(e){var t=e.target.result;n&&n(t)},t.readAsArrayBuffer(e)}),r,l):_0x4d7f4f.EncodeScreenshotCanvasData(n,r,o,p,l)}},_0x4d7f4f.DumpDataAsync=function(e,t,i,n,r,o,a,s){return void 0===n&&(n="image/png"),void 0===o&&(o=!1),void 0===a&&(a=!1),new Promise((function(l){_0x4d7f4f.DumpData(e,t,i,(function(e){return l(e)}),n,r,o,a,s)}))},_0x4d7f4f.ToBlob=function(e,t,i,n){void 0===i&&(i="image/png"),!e.toBlob&&(e.toBlob=function(e,t,i){var n=this;setTimeout((function(){for(var r=atob(n.toDataURL(t,i).split(",")[1]),o=r.length,a=new Uint8Array(o),s=0;s0){if(t instanceof Array)throw"addUniform should not be use with Array in UBO: "+e;if(this._fillAlignment(4),this._uniformArraySizes[e]={strideSize:t,arraySize:i},16==t)t*=i;else t=t*i+(4-t)*i;n=[];for(var r=0;r1&&this._buffers[this._bufferIndex][1]){if(this._buffersEqual(this._bufferData,this._buffers[this._bufferIndex][1]))return this._needSync=!1,void(this._createBufferOnWrite=this._trackUbosInFrame);this._copyBuffer(this._bufferData,this._buffers[this._bufferIndex][1])}this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._engine._features._collectUbosUpdatedInFrame&&(!_0x2e52cb._UpdatedUbosInFrame[this._name]&&(_0x2e52cb._UpdatedUbosInFrame[this._name]=0),_0x2e52cb._UpdatedUbosInFrame[this._name]++),this._needSync=!1,this._createBufferOnWrite=this._trackUbosInFrame}else this._createBufferOnWrite=this._trackUbosInFrame;else this.create()},_0x2e52cb.prototype._createNewBuffer=function(){this._bufferIndex+10?(this._needSync=0!==this._bufferIndex,this._bufferIndex=0,this._buffer=this._buffers[this._bufferIndex][0]):this._bufferIndex=-1)},_0x2e52cb.prototype.updateUniform=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0===n){if(this._buffer)return void _0x41154e.Error("Cannot add an uniform after UBO has been created.");this.addUniform(e,i),n=this._uniformLocations[e]}if(!this._buffer&&this.create(),this._dynamic)for(o=0;oi.x?i.x:n)i.y?i.y:r)t.x?e.x:t.x,e.y>t.y?e.y:t.y)},Vector2.Transform=function(e,t){var i=Vector2.Zero();return Vector2.TransformToRef(e,t,i),i},Vector2.TransformToRef=function(e,t,i){var n=t.m,r=e.x*n[0]+e.y*n[4]+n[12],o=e.x*n[1]+e.y*n[5]+n[13];i.x=r,i.y=o},Vector2.PointInTriangle=function(e,t,i,n){var r=.5*(-i.y*n.x+t.y*(-i.x+n.x)+t.x*(i.y-n.y)+i.x*n.y),o=r<0?-1:1,a=(t.y*n.x-t.x*n.y+(n.y-t.y)*e.x+(t.x-n.x)*e.y)*o,s=(t.x*i.y-t.y*i.x+(t.y-i.y)*e.x+(i.x-t.x)*e.y)*o;return a>0&&s>0&&a+s<2*r*o},Vector2.Distance=function(e,t){return Math.sqrt(Vector2.DistanceSquared(e,t))},Vector2.DistanceSquared=function(e,t){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},Vector2.Center=function(e,t){return Vector2.CenterToRef(e,t,Vector2.Zero())},Vector2.CenterToRef=function(e,t,i){return i.copyFromFloats((e.x+t.x)/2,(e.y+t.y)/2)},Vector2.DistanceOfPointFromSegment=function(e,t,i){var n=Vector2.DistanceSquared(t,i);if(0===n)return Vector2.Distance(e,t);var r=i.subtract(t),o=Math.max(0,Math.min(1,Vector2.Dot(e.subtract(t),r)/n)),a=t.add(r.multiplyByFloats(o,o));return Vector2.Distance(e,a)},Object.defineProperty(Vector3.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3.prototype,"z",{get:function(){return this._z},set:function(e){this._z=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Vector3.prototype.toString=function(){return"{X: ".concat(this._x," Y: ").concat(this._y," Z: ").concat(this._z,"}")},Vector3.prototype.getClassName=function(){return"Vector3"},Vector3.prototype.getHashCode=function(){var e=_0x2cfc16(this._x);return e=397*(e=397*e^_0x2cfc16(this._y))^_0x2cfc16(this._z)},Vector3.prototype.asArray=function(){var e=[];return this.toArray(e,0),e},Vector3.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,this},Vector3.prototype.fromArray=function(e,t){return void 0===t&&(t=0),Vector3.FromArrayToRef(e,t,this),this},Vector3.prototype.toQuaternion=function(){return Quaternion.RotationYawPitchRoll(this._y,this._x,this._z)},Vector3.prototype.addInPlace=function(e){return this.addInPlaceFromFloats(e._x,e._y,e._z)},Vector3.prototype.addInPlaceFromFloats=function(e,t,i){return this.x+=e,this.y+=t,this.z+=i,this},Vector3.prototype.add=function(e){return new Vector3(this._x+e._x,this._y+e._y,this._z+e._z)},Vector3.prototype.addToRef=function(e,t){return t.copyFromFloats(this._x+e._x,this._y+e._y,this._z+e._z)},Vector3.prototype.subtractInPlace=function(e){return this.x-=e._x,this.y-=e._y,this.z-=e._z,this},Vector3.prototype.subtract=function(e){return new Vector3(this._x-e._x,this._y-e._y,this._z-e._z)},Vector3.prototype.subtractToRef=function(e,t){return this.subtractFromFloatsToRef(e._x,e._y,e._z,t)},Vector3.prototype.subtractFromFloats=function(e,t,i){return new Vector3(this._x-e,this._y-t,this._z-i)},Vector3.prototype.subtractFromFloatsToRef=function(e,t,i,n){return n.copyFromFloats(this._x-e,this._y-t,this._z-i)},Vector3.prototype.negate=function(){return new Vector3(-this._x,-this._y,-this._z)},Vector3.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},Vector3.prototype.negateToRef=function(e){return e.copyFromFloats(-1*this._x,-1*this._y,-1*this._z)},Vector3.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this},Vector3.prototype.scale=function(e){return new Vector3(this._x*e,this._y*e,this._z*e)},Vector3.prototype.scaleToRef=function(e,t){return t.copyFromFloats(this._x*e,this._y*e,this._z*e)},Vector3.prototype.applyRotationQuaternionToRef=function(e,t){var i=e.w*this.x+e.y*this.z-e.z*this.y,n=e.w*this.y+e.z*this.x-e.x*this.z,r=e.w*this.z+e.x*this.y-e.y*this.x,o=-e.x*this.x-e.y*this.y-e.z*this.z;return t.x=i*e.w+o*-e.x+n*-e.z-r*-e.y,t.y=n*e.w+o*-e.y+r*-e.x-i*-e.z,t.z=r*e.w+o*-e.z+i*-e.y-n*-e.x,t},Vector3.prototype.applyRotationQuaternionInPlace=function(e){return this.applyRotationQuaternionToRef(e,this)},Vector3.prototype.applyRotationQuaternion=function(e){return this.applyRotationQuaternionToRef(e,Vector3.Zero())},Vector3.prototype.scaleAndAddToRef=function(e,t){return t.addInPlaceFromFloats(this._x*e,this._y*e,this._z*e)},Vector3.prototype.projectOnPlane=function(e,t){var i=Vector3.Zero();return this.projectOnPlaneToRef(e,t,i),i},Vector3.prototype.projectOnPlaneToRef=function(e,t,i){var n=e.normal,r=e.d,o=MathTmp.Vector3[0];this.subtractToRef(t,o),o.normalize();var a=Vector3.Dot(o,n),s=-(Vector3.Dot(t,n)+r)/a,l=o.scaleInPlace(s);t.addToRef(l,i)},Vector3.prototype.equals=function(e){return e&&this._x===e._x&&this._y===e._y&&this._z===e._z},Vector3.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._x,e._x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._y,e._y,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._z,e._z,t)},Vector3.prototype.equalsToFloats=function(e,t,i){return this._x===e&&this._y===t&&this._z===i},Vector3.prototype.multiplyInPlace=function(e){return this.x*=e._x,this.y*=e._y,this.z*=e._z,this},Vector3.prototype.multiply=function(e){return this.multiplyByFloats(e._x,e._y,e._z)},Vector3.prototype.multiplyToRef=function(e,t){return t.copyFromFloats(this._x*e._x,this._y*e._y,this._z*e._z)},Vector3.prototype.multiplyByFloats=function(e,t,i){return new Vector3(this._x*e,this._y*t,this._z*i)},Vector3.prototype.divide=function(e){return new Vector3(this._x/e._x,this._y/e._y,this._z/e._z)},Vector3.prototype.divideToRef=function(e,t){return t.copyFromFloats(this._x/e._x,this._y/e._y,this._z/e._z)},Vector3.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},Vector3.prototype.minimizeInPlace=function(e){return this.minimizeInPlaceFromFloats(e._x,e._y,e._z)},Vector3.prototype.maximizeInPlace=function(e){return this.maximizeInPlaceFromFloats(e._x,e._y,e._z)},Vector3.prototype.minimizeInPlaceFromFloats=function(e,t,i){return ethis._x&&(this.x=e),t>this._y&&(this.y=t),i>this._z&&(this.z=i),this},Vector3.prototype.isNonUniformWithinEpsilon=function(e){var t=Math.abs(this._x),i=Math.abs(this._y);if(!_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(t,i,e))return!0;var n=Math.abs(this._z);return!_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(t,n,e)||!_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(i,n,e)},Object.defineProperty(Vector3.prototype,"isNonUniform",{get:function(){var e=Math.abs(this._x);return e!==Math.abs(this._y)||e!==Math.abs(this._z)},enumerable:!1,configurable:!0}),Vector3.prototype.floor=function(){return new Vector3(Math.floor(this._x),Math.floor(this._y),Math.floor(this._z))},Vector3.prototype.fract=function(){return new Vector3(this._x-Math.floor(this._x),this._y-Math.floor(this._y),this._z-Math.floor(this._z))},Vector3.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)},Vector3.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z},Object.defineProperty(Vector3.prototype,"hasAZeroComponent",{get:function(){return this._x*this._y*this._z==0},enumerable:!1,configurable:!0}),Vector3.prototype.normalize=function(){return this.normalizeFromLength(this.length())},Vector3.prototype.reorderInPlace=function(e){var t=this;return"xyz"===(e=e.toLowerCase())||(MathTmp.Vector3[0].copyFrom(this),["x","y","z"].forEach((function(i,n){t[i]=MathTmp.Vector3[0][e[n]]}))),this},Vector3.prototype.rotateByQuaternionToRef=function(e,t){return e.toRotationMatrix(MathTmp.Matrix[0]),Vector3.TransformCoordinatesToRef(this,MathTmp.Matrix[0],t),t},Vector3.prototype.rotateByQuaternionAroundPointToRef=function(e,t,i){return this.subtractToRef(t,MathTmp.Vector3[0]),MathTmp.Vector3[0].rotateByQuaternionToRef(e,MathTmp.Vector3[0]),t.addToRef(MathTmp.Vector3[0],i),i},Vector3.prototype.cross=function(e){return Vector3.Cross(this,e)},Vector3.prototype.normalizeFromLength=function(e){return 0===e||1===e?this:this.scaleInPlace(1/e)},Vector3.prototype.normalizeToNew=function(){var e=new Vector3(0,0,0);return this.normalizeToRef(e),e},Vector3.prototype.normalizeToRef=function(e){var t=this.length();return 0===t||1===t?e.copyFromFloats(this._x,this._y,this._z):this.scaleToRef(1/t,e)},Vector3.prototype.clone=function(){return new Vector3(this._x,this._y,this._z)},Vector3.prototype.copyFrom=function(e){return this.copyFromFloats(e._x,e._y,e._z)},Vector3.prototype.copyFromFloats=function(e,t,i){return this.x=e,this.y=t,this.z=i,this},Vector3.prototype.set=function(e,t,i){return this.copyFromFloats(e,t,i)},Vector3.prototype.setAll=function(e){return this.x=this.y=this.z=e,this},Vector3.GetClipFactor=function(e,t,i,n){var r=Vector3.Dot(e,i)-n;return r/(r-(Vector3.Dot(t,i)-n))},Vector3.GetAngleBetweenVectors=function(e,t,i){var n=e.normalizeToRef(MathTmp.Vector3[1]),r=t.normalizeToRef(MathTmp.Vector3[2]),o=Vector3.Dot(n,r);o=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(o,-1,1);var a=Math.acos(o),s=MathTmp.Vector3[3];return Vector3.CrossToRef(n,r,s),Vector3.Dot(s,i)>0?isNaN(a)?0:a:isNaN(a)?-Math.PI:-Math.acos(o)},Vector3.GetAngleBetweenVectorsOnPlane=function(e,t,i){MathTmp.Vector3[0].copyFrom(e);var n=MathTmp.Vector3[0];MathTmp.Vector3[1].copyFrom(t);var r=MathTmp.Vector3[1];MathTmp.Vector3[2].copyFrom(i);var o=MathTmp.Vector3[2],a=MathTmp.Vector3[3],s=MathTmp.Vector3[4];n.normalize(),r.normalize(),o.normalize(),Vector3.CrossToRef(o,n,a),Vector3.CrossToRef(a,o,s);var l=Math.atan2(Vector3.Dot(r,a),Vector3.Dot(r,s));return _math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.NormalizeRadians(l)},Vector3.SlerpToRef=function(e,t,i,n){i=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(i,0,1);var r=MathTmp.Vector3[0],o=MathTmp.Vector3[1];r.copyFrom(e);var a=r.length();r.normalizeFromLength(a),o.copyFrom(t);var s=o.length();o.normalizeFromLength(s);var l,u,c=Vector3.Dot(r,o);if(c<1-_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon){var h=Math.acos(c),d=1/Math.sin(h);l=Math.sin((1-i)*h)*d,u=Math.sin(i*h)*d}else l=1-i,u=i;r.scaleInPlace(l),o.scaleInPlace(u),n.copyFrom(r).addInPlace(o),n.scaleInPlace(_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Lerp(a,s,i))},Vector3.SmoothToRef=function(e,t,i,n,r){Vector3.SlerpToRef(e,t,0===n?1:i/n,r)},Vector3.FromArray=function(e,t){return void 0===t&&(t=0),new Vector3(e[t],e[t+1],e[t+2])},Vector3.FromFloatArray=function(e,t){return Vector3.FromArray(e,t)},Vector3.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2]},Vector3.FromFloatArrayToRef=function(e,t,i){return Vector3.FromArrayToRef(e,t,i)},Vector3.FromFloatsToRef=function(e,t,i,n){n.copyFromFloats(e,t,i)},Vector3.Zero=function(){return new Vector3(0,0,0)},Vector3.One=function(){return new Vector3(1,1,1)},Vector3.Up=function(){return new Vector3(0,1,0)},Object.defineProperty(Vector3,"UpReadOnly",{get:function(){return Vector3._UpReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"RightReadOnly",{get:function(){return Vector3._RightReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"LeftReadOnly",{get:function(){return Vector3._LeftReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"LeftHandedForwardReadOnly",{get:function(){return Vector3._LeftHandedForwardReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"RightHandedForwardReadOnly",{get:function(){return Vector3._RightHandedForwardReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"ZeroReadOnly",{get:function(){return Vector3._ZeroReadOnly},enumerable:!1,configurable:!0}),Vector3.Down=function(){return new Vector3(0,-1,0)},Vector3.Forward=function(e){return void 0===e&&(e=!1),new Vector3(0,0,e?-1:1)},Vector3.Backward=function(e){return void 0===e&&(e=!1),new Vector3(0,0,e?1:-1)},Vector3.Right=function(){return new Vector3(1,0,0)},Vector3.Left=function(){return new Vector3(-1,0,0)},Vector3.TransformCoordinates=function(e,t){var i=Vector3.Zero();return Vector3.TransformCoordinatesToRef(e,t,i),i},Vector3.TransformCoordinatesToRef=function(e,t,i){Vector3.TransformCoordinatesFromFloatsToRef(e._x,e._y,e._z,t,i)},Vector3.TransformCoordinatesFromFloatsToRef=function(e,t,i,n,r){var o=n.m,a=e*o[0]+t*o[4]+i*o[8]+o[12],s=e*o[1]+t*o[5]+i*o[9]+o[13],l=e*o[2]+t*o[6]+i*o[10]+o[14],u=1/(e*o[3]+t*o[7]+i*o[11]+o[15]);r.x=a*u,r.y=s*u,r.z=l*u},Vector3.TransformNormal=function(e,t){var i=Vector3.Zero();return Vector3.TransformNormalToRef(e,t,i),i},Vector3.TransformNormalToRef=function(e,t,i){this.TransformNormalFromFloatsToRef(e._x,e._y,e._z,t,i)},Vector3.TransformNormalFromFloatsToRef=function(e,t,i,n,r){var o=n.m;r.x=e*o[0]+t*o[4]+i*o[8],r.y=e*o[1]+t*o[5]+i*o[9],r.z=e*o[2]+t*o[6]+i*o[10]},Vector3.CatmullRom=function(e,t,i,n,r){var o=r*r,a=r*o;return new Vector3(.5*(2*t._x+(-e._x+i._x)*r+(2*e._x-5*t._x+4*i._x-n._x)*o+(-e._x+3*t._x-3*i._x+n._x)*a),.5*(2*t._y+(-e._y+i._y)*r+(2*e._y-5*t._y+4*i._y-n._y)*o+(-e._y+3*t._y-3*i._y+n._y)*a),.5*(2*t._z+(-e._z+i._z)*r+(2*e._z-5*t._z+4*i._z-n._z)*o+(-e._z+3*t._z-3*i._z+n._z)*a))},Vector3.Clamp=function(e,t,i){var n=new Vector3;return Vector3.ClampToRef(e,t,i,n),n},Vector3.ClampToRef=function(e,t,i,n){var r=e._x;r=(r=r>i._x?i._x:r)i._y?i._y:o)i._z?i._z:a)0&&C<0?(P.copyFrom(o),S=t,w=i):C>0&&E<0?(P.copyFrom(s),S=i,w=n):(P.copyFrom(a).scaleInPlace(-1),S=n,w=t);var A=MathTmp.Vector3[9],L=MathTmp.Vector3[4];if(S.subtractToRef(g,$),w.subtractToRef(g,A),Vector3.CrossToRef($,A,L),!(Vector3.Dot(L,l)<0))return r.copyFrom(g),Math.abs(p*_);var M=MathTmp.Vector3[5];Vector3.CrossToRef(P,L,M),M.normalize();var R=MathTmp.Vector3[9];R.copyFrom(S).subtractInPlace(g);var I=R.length();if(I<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(S),Vector3.Distance(e,S);R.normalizeFromLength(I);var O=Vector3.Dot(M,R),D=MathTmp.Vector3[7];D.copyFrom(g).addInPlace(M.scaleInPlace(I*O)),$.copyFrom(D).subtractInPlace(S),p=P.length(),P.normalizeFromLength(p);var B=Vector3.Dot($,P)/Math.max(p,_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon);return B=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(B,0,1),D.copyFrom(S).addInPlace(P.scaleInPlace(B*p)),r.copyFrom(D),Vector3.Distance(e,D)},Vector3.Center=function(e,t){return Vector3.CenterToRef(e,t,Vector3.Zero())},Vector3.CenterToRef=function(e,t,i){return i.copyFromFloats((e._x+t._x)/2,(e._y+t._y)/2,(e._z+t._z)/2)},Vector3.RotationFromAxis=function(e,t,i){var n=Vector3.Zero();return Vector3.RotationFromAxisToRef(e,t,i,n),n},Vector3.RotationFromAxisToRef=function(e,t,i,n){var r=MathTmp.Quaternion[0];Quaternion.RotationQuaternionFromAxisToRef(e,t,i,r),r.toEulerAnglesToRef(n)},Vector3._UpReadOnly=Vector3.Up(),Vector3._LeftHandedForwardReadOnly=Vector3.Forward(!1),Vector3._RightHandedForwardReadOnly=Vector3.Forward(!0),Vector3._RightReadOnly=Vector3.Right(),Vector3._LeftReadOnly=Vector3.Left(),Vector3._ZeroReadOnly=Vector3.Zero(),Vector4.prototype.toString=function(){return"{X: ".concat(this.x," Y: ").concat(this.y," Z: ").concat(this.z," W: ").concat(this.w,"}")},Vector4.prototype.getClassName=function(){return"Vector4"},Vector4.prototype.getHashCode=function(){var e=_0x2cfc16(this.x);return e=397*(e=397*(e=397*e^_0x2cfc16(this.y))^_0x2cfc16(this.z))^_0x2cfc16(this.w)},Vector4.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},Vector4.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,this},Vector4.prototype.fromArray=function(e,t){return void 0===t&&(t=0),Vector4.FromArrayToRef(e,t,this),this},Vector4.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this},Vector4.prototype.add=function(e){return new Vector4(this.x+e.x,this.y+e.y,this.z+e.z,this.w+e.w)},Vector4.prototype.addToRef=function(e,t){return t.x=this.x+e.x,t.y=this.y+e.y,t.z=this.z+e.z,t.w=this.w+e.w,this},Vector4.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this},Vector4.prototype.subtract=function(e){return new Vector4(this.x-e.x,this.y-e.y,this.z-e.z,this.w-e.w)},Vector4.prototype.subtractToRef=function(e,t){return t.x=this.x-e.x,t.y=this.y-e.y,t.z=this.z-e.z,t.w=this.w-e.w,this},Vector4.prototype.subtractFromFloats=function(e,t,i,n){return new Vector4(this.x-e,this.y-t,this.z-i,this.w-n)},Vector4.prototype.subtractFromFloatsToRef=function(e,t,i,n,r){return r.x=this.x-e,r.y=this.y-t,r.z=this.z-i,r.w=this.w-n,this},Vector4.prototype.negate=function(){return new Vector4(-this.x,-this.y,-this.z,-this.w)},Vector4.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.w*=-1,this},Vector4.prototype.negateToRef=function(e){return e.copyFromFloats(-1*this.x,-1*this.y,-1*this.z,-1*this.w)},Vector4.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},Vector4.prototype.scale=function(e){return new Vector4(this.x*e,this.y*e,this.z*e,this.w*e)},Vector4.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,t.z=this.z*e,t.w=this.w*e,this},Vector4.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,t.z+=this.z*e,t.w+=this.w*e,this},Vector4.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y&&this.z===e.z&&this.w===e.w},Vector4.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.x,e.x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.y,e.y,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.z,e.z,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.w,e.w,t)},Vector4.prototype.equalsToFloats=function(e,t,i,n){return this.x===e&&this.y===t&&this.z===i&&this.w===n},Vector4.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this},Vector4.prototype.multiply=function(e){return new Vector4(this.x*e.x,this.y*e.y,this.z*e.z,this.w*e.w)},Vector4.prototype.multiplyToRef=function(e,t){return t.x=this.x*e.x,t.y=this.y*e.y,t.z=this.z*e.z,t.w=this.w*e.w,this},Vector4.prototype.multiplyByFloats=function(e,t,i,n){return new Vector4(this.x*e,this.y*t,this.z*i,this.w*n)},Vector4.prototype.divide=function(e){return new Vector4(this.x/e.x,this.y/e.y,this.z/e.z,this.w/e.w)},Vector4.prototype.divideToRef=function(e,t){return t.x=this.x/e.x,t.y=this.y/e.y,t.z=this.z/e.z,t.w=this.w/e.w,this},Vector4.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},Vector4.prototype.minimizeInPlace=function(e){return e.xthis.x&&(this.x=e.x),e.y>this.y&&(this.y=e.y),e.z>this.z&&(this.z=e.z),e.w>this.w&&(this.w=e.w),this},Vector4.prototype.floor=function(){return new Vector4(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z),Math.floor(this.w))},Vector4.prototype.fract=function(){return new Vector4(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z),this.w-Math.floor(this.w))},Vector4.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},Vector4.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},Vector4.prototype.normalize=function(){var e=this.length();return 0===e?this:this.scaleInPlace(1/e)},Vector4.prototype.toVector3=function(){return new Vector3(this.x,this.y,this.z)},Vector4.prototype.clone=function(){return new Vector4(this.x,this.y,this.z,this.w)},Vector4.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},Vector4.prototype.copyFromFloats=function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},Vector4.prototype.set=function(e,t,i,n){return this.copyFromFloats(e,t,i,n)},Vector4.prototype.setAll=function(e){return this.x=this.y=this.z=this.w=e,this},Vector4.FromArray=function(e,t){return!t&&(t=0),new Vector4(e[t],e[t+1],e[t+2],e[t+3])},Vector4.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3]},Vector4.FromFloatArrayToRef=function(e,t,i){Vector4.FromArrayToRef(e,t,i)},Vector4.FromFloatsToRef=function(e,t,i,n,r){r.x=e,r.y=t,r.z=i,r.w=n},Vector4.Zero=function(){return new Vector4(0,0,0,0)},Vector4.One=function(){return new Vector4(1,1,1,1)},Vector4.Normalize=function(e){var t=Vector4.Zero();return Vector4.NormalizeToRef(e,t),t},Vector4.NormalizeToRef=function(e,t){t.copyFrom(e),t.normalize()},Vector4.Minimize=function(e,t){var i=e.clone();return i.minimizeInPlace(t),i},Vector4.Maximize=function(e,t){var i=e.clone();return i.maximizeInPlace(t),i},Vector4.Distance=function(e,t){return Math.sqrt(Vector4.DistanceSquared(e,t))},Vector4.DistanceSquared=function(e,t){var i=e.x-t.x,n=e.y-t.y,r=e.z-t.z,o=e.w-t.w;return i*i+n*n+r*r+o*o},Vector4.Center=function(e,t){return Vector4.CenterToRef(e,t,Vector4.Zero())},Vector4.CenterToRef=function(e,t,i){return i.copyFromFloats((e.x+t.x)/2,(e.y+t.y)/2,(e.z+t.z)/2,(e.w+t.w)/2)},Vector4.TransformCoordinates=function(e,t){var i=Vector4.Zero();return Vector4.TransformCoordinatesToRef(e,t,i),i},Vector4.TransformCoordinatesToRef=function(e,t,i){Vector4.TransformCoordinatesFromFloatsToRef(e._x,e._y,e._z,t,i)},Vector4.TransformCoordinatesFromFloatsToRef=function(e,t,i,n,r){var o=n.m,a=e*o[0]+t*o[4]+i*o[8]+o[12],s=e*o[1]+t*o[5]+i*o[9]+o[13],l=e*o[2]+t*o[6]+i*o[10]+o[14],u=e*o[3]+t*o[7]+i*o[11]+o[15];r.x=a,r.y=s,r.z=l,r.w=u},Vector4.TransformNormal=function(e,t){var i=Vector4.Zero();return Vector4.TransformNormalToRef(e,t,i),i},Vector4.TransformNormalToRef=function(e,t,i){var n=t.m,r=e.x*n[0]+e.y*n[4]+e.z*n[8],o=e.x*n[1]+e.y*n[5]+e.z*n[9],a=e.x*n[2]+e.y*n[6]+e.z*n[10];i.x=r,i.y=o,i.z=a,i.w=e.w},Vector4.TransformNormalFromFloatsToRef=function(e,t,i,n,r,o){var a=r.m;o.x=e*a[0]+t*a[4]+i*a[8],o.y=e*a[1]+t*a[5]+i*a[9],o.z=e*a[2]+t*a[6]+i*a[10],o.w=n},Vector4.FromVector3=function(e,t){return void 0===t&&(t=0),new Vector4(e._x,e._y,e._z,t)},Object.defineProperty(Quaternion.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Quaternion.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Quaternion.prototype,"z",{get:function(){return this._z},set:function(e){this._z=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Quaternion.prototype,"w",{get:function(){return this._w},set:function(e){this._w=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Quaternion.prototype.toString=function(){return"{X: ".concat(this._x," Y: ").concat(this._y," Z: ").concat(this._z," W: ").concat(this._w,"}")},Quaternion.prototype.getClassName=function(){return"Quaternion"},Quaternion.prototype.getHashCode=function(){var e=_0x2cfc16(this._x);return e=397*(e=397*(e=397*e^_0x2cfc16(this._y))^_0x2cfc16(this._z))^_0x2cfc16(this._w)},Quaternion.prototype.asArray=function(){return[this._x,this._y,this._z,this._w]},Quaternion.prototype.equals=function(e){return e&&this._x===e._x&&this._y===e._y&&this._z===e._z&&this._w===e._w},Quaternion.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._x,e._x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._y,e._y,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._z,e._z,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._w,e._w,t)},Quaternion.prototype.clone=function(){return new Quaternion(this._x,this._y,this._z,this._w)},Quaternion.prototype.copyFrom=function(e){return this.x=e._x,this.y=e._y,this.z=e._z,this.w=e._w,this},Quaternion.prototype.copyFromFloats=function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},Quaternion.prototype.set=function(e,t,i,n){return this.copyFromFloats(e,t,i,n)},Quaternion.prototype.add=function(e){return new Quaternion(this._x+e._x,this._y+e._y,this._z+e._z,this._w+e._w)},Quaternion.prototype.addInPlace=function(e){return this._x+=e._x,this._y+=e._y,this._z+=e._z,this._w+=e._w,this},Quaternion.prototype.subtract=function(e){return new Quaternion(this._x-e._x,this._y-e._y,this._z-e._z,this._w-e._w)},Quaternion.prototype.subtractInPlace=function(e){return this._x-=e._x,this._y-=e._y,this._z-=e._z,this._w-=e._w,this},Quaternion.prototype.scale=function(e){return new Quaternion(this._x*e,this._y*e,this._z*e,this._w*e)},Quaternion.prototype.scaleToRef=function(e,t){return t.x=this._x*e,t.y=this._y*e,t.z=this._z*e,t.w=this._w*e,this},Quaternion.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},Quaternion.prototype.scaleAndAddToRef=function(e,t){return t.x+=this._x*e,t.y+=this._y*e,t.z+=this._z*e,t.w+=this._w*e,this},Quaternion.prototype.multiply=function(e){var t=new Quaternion(0,0,0,1);return this.multiplyToRef(e,t),t},Quaternion.prototype.multiplyToRef=function(e,t){var i=this._x*e._w+this._y*e._z-this._z*e._y+this._w*e._x,n=-this._x*e._z+this._y*e._w+this._z*e._x+this._w*e._y,r=this._x*e._y-this._y*e._x+this._z*e._w+this._w*e._z,o=-this._x*e._x-this._y*e._y-this._z*e._z+this._w*e._w;return t.copyFromFloats(i,n,r,o),this},Quaternion.prototype.multiplyInPlace=function(e){return this.multiplyToRef(e,this),this},Quaternion.prototype.conjugateToRef=function(e){return e.copyFromFloats(-this._x,-this._y,-this._z,this._w),this},Quaternion.prototype.conjugateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},Quaternion.prototype.conjugate=function(){return new Quaternion(-this._x,-this._y,-this._z,this._w)},Quaternion.prototype.invert=function(){var e=this.conjugate(),t=this.lengthSquared();return 0==t||1==t||e.scaleInPlace(1/t),e},Quaternion.prototype.invertInPlace=function(){this.conjugateInPlace();var e=this.lengthSquared();return 0==e||1==e||this.scaleInPlace(1/e),this},Quaternion.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},Quaternion.prototype.length=function(){return Math.sqrt(this.lengthSquared())},Quaternion.prototype.normalize=function(){var e=this.length();if(0===e)return this;var t=1/e;return this.scaleInPlace(t),this},Quaternion.prototype.normalizeToNew=function(){var e=this.length();if(0===e)return this.clone();var t=1/e;return this.scale(t)},Quaternion.prototype.toEulerAngles=function(){var e=Vector3.Zero();return this.toEulerAnglesToRef(e),e},Quaternion.prototype.toEulerAnglesToRef=function(e){var t=this._z,i=this._x,n=this._y,r=this._w,o=n*t-i*r,a=.4999999;if(o<-.4999999)e.y=2*Math.atan2(n,r),e.x=Math.PI/2,e.z=0;else if(o>a)e.y=2*Math.atan2(n,r),e.x=-Math.PI/2,e.z=0;else{var s=r*r,l=t*t,u=i*i,c=n*n;e.z=Math.atan2(2*(i*n+t*r),-l-u+c+s),e.x=Math.asin(-2*o),e.y=Math.atan2(2*(t*i+n*r),l-u-c+s)}return this},Quaternion.prototype.toRotationMatrix=function(e){return Matrix.FromQuaternionToRef(this,e),this},Quaternion.prototype.fromRotationMatrix=function(e){return Quaternion.FromRotationMatrixToRef(e,this),this},Quaternion.FromRotationMatrix=function(e){var t=new Quaternion;return Quaternion.FromRotationMatrixToRef(e,t),t},Quaternion.FromRotationMatrixToRef=function(e,t){var i,n=e.m,r=n[0],o=n[4],a=n[8],s=n[1],l=n[5],u=n[9],c=n[2],h=n[6],d=n[10],f=r+l+d;f>0?(i=.5/Math.sqrt(f+1),t.w=.25/i,t.x=(h-u)*i,t.y=(a-c)*i,t.z=(s-o)*i):r>l&&r>d?(i=2*Math.sqrt(1+r-l-d),t.w=(h-u)/i,t.x=.25*i,t.y=(o+s)/i,t.z=(a+c)/i):l>d?(i=2*Math.sqrt(1+l-r-d),t.w=(a-c)/i,t.x=(o+s)/i,t.y=.25*i,t.z=(u+h)/i):(i=2*Math.sqrt(1+d-r-l),t.w=(s-o)/i,t.x=(a+c)/i,t.y=(u+h)/i,t.z=.25*i)},Quaternion.Dot=function(e,t){return e._x*t._x+e._y*t._y+e._z*t._z+e._w*t._w},Quaternion.AreClose=function(e,t){return Quaternion.Dot(e,t)>=0},Quaternion.SmoothToRef=function(e,t,i,n,r){var o=0===n?1:i/n;o=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(o,0,1),Quaternion.SlerpToRef(e,t,o,r)},Quaternion.Zero=function(){return new Quaternion(0,0,0,0)},Quaternion.Inverse=function(e){return new Quaternion(-e._x,-e._y,-e._z,e._w)},Quaternion.InverseToRef=function(e,t){return t.set(-e._x,-e._y,-e._z,e._w),t},Quaternion.Identity=function(){return new Quaternion(0,0,0,1)},Quaternion.IsIdentity=function(e){return e&&0===e._x&&0===e._y&&0===e._z&&1===e._w},Quaternion.RotationAxis=function(e,t){return Quaternion.RotationAxisToRef(e,t,new Quaternion)},Quaternion.RotationAxisToRef=function(e,t,i){var n=Math.sin(t/2);return e.normalize(),i.w=Math.cos(t/2),i.x=e._x*n,i.y=e._y*n,i.z=e._z*n,i},Quaternion.FromArray=function(e,t){return!t&&(t=0),new Quaternion(e[t],e[t+1],e[t+2],e[t+3])},Quaternion.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3]},Quaternion.FromEulerAngles=function(e,t,i){var n=new Quaternion;return Quaternion.RotationYawPitchRollToRef(t,e,i,n),n},Quaternion.FromEulerAnglesToRef=function(e,t,i,n){return Quaternion.RotationYawPitchRollToRef(t,e,i,n),n},Quaternion.FromEulerVector=function(e){var t=new Quaternion;return Quaternion.RotationYawPitchRollToRef(e._y,e._x,e._z,t),t},Quaternion.FromEulerVectorToRef=function(e,t){return Quaternion.RotationYawPitchRollToRef(e._y,e._x,e._z,t),t},Quaternion.FromUnitVectorsToRef=function(e,t,i){var n=Vector3.Dot(e,t)+1;return n<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon?Math.abs(e.x)>Math.abs(e.z)?i.set(-e.y,e.x,0,0):i.set(0,-e.z,e.y,0):(Vector3.CrossToRef(e,t,TmpVectors.Vector3[0]),i.set(TmpVectors.Vector3[0].x,TmpVectors.Vector3[0].y,TmpVectors.Vector3[0].z,n)),i.normalize()},Quaternion.RotationYawPitchRoll=function(e,t,i){var n=new Quaternion;return Quaternion.RotationYawPitchRollToRef(e,t,i,n),n},Quaternion.RotationYawPitchRollToRef=function(e,t,i,n){var r=.5*i,o=.5*t,a=.5*e,s=Math.sin(r),l=Math.cos(r),u=Math.sin(o),c=Math.cos(o),h=Math.sin(a),d=Math.cos(a);n.x=d*u*l+h*c*s,n.y=h*c*l-d*u*s,n.z=d*c*s-h*u*l,n.w=d*c*l+h*u*s},Quaternion.RotationAlphaBetaGamma=function(e,t,i){var n=new Quaternion;return Quaternion.RotationAlphaBetaGammaToRef(e,t,i,n),n},Quaternion.RotationAlphaBetaGammaToRef=function(e,t,i,n){var r=.5*(i+e),o=.5*(i-e),a=.5*t;n.x=Math.cos(o)*Math.sin(a),n.y=Math.sin(o)*Math.sin(a),n.z=Math.sin(r)*Math.cos(a),n.w=Math.cos(r)*Math.cos(a)},Quaternion.RotationQuaternionFromAxis=function(e,t,i){var n=new Quaternion(0,0,0,0);return Quaternion.RotationQuaternionFromAxisToRef(e,t,i,n),n},Quaternion.RotationQuaternionFromAxisToRef=function(e,t,i,n){var r=MathTmp.Matrix[0];Matrix.FromXYZAxesToRef(e.normalize(),t.normalize(),i.normalize(),r),Quaternion.FromRotationMatrixToRef(r,n)},Quaternion.FromLookDirectionLH=function(e,t){var i=new Quaternion;return Quaternion.FromLookDirectionLHToRef(e,t,i),i},Quaternion.FromLookDirectionLHToRef=function(e,t,i){var n=MathTmp.Matrix[0];Matrix.LookDirectionLHToRef(e,t,n),Quaternion.FromRotationMatrixToRef(n,i)},Quaternion.FromLookDirectionRH=function(e,t){var i=new Quaternion;return Quaternion.FromLookDirectionRHToRef(e,t,i),i},Quaternion.FromLookDirectionRHToRef=function(e,t,i){var n=MathTmp.Matrix[0];return Matrix.LookDirectionRHToRef(e,t,n),Quaternion.FromRotationMatrixToRef(n,i)},Quaternion.Slerp=function(e,t,i){var n=Quaternion.Identity();return Quaternion.SlerpToRef(e,t,i,n),n},Quaternion.SlerpToRef=function(e,t,i,n){var r,o,a=e._x*t._x+e._y*t._y+e._z*t._z+e._w*t._w,s=!1;if(a<0&&(s=!0,a=-a),a>.999999)o=1-i,r=s?-i:i;else{var l=Math.acos(a),u=1/Math.sin(l);o=Math.sin((1-i)*l)*u,r=s?-Math.sin(i*l)*u:Math.sin(i*l)*u}n.x=o*e._x+r*t._x,n.y=o*e._y+r*t._y,n.z=o*e._z+r*t._z,n.w=o*e._w+r*t._w},Quaternion.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o,s=2*a-3*o+1,l=-2*a+3*o,u=a-2*o+r,c=a-o;return new Quaternion(e._x*s+i._x*l+t._x*u+n._x*c,e._y*s+i._y*l+t._y*u+n._y*c,e._z*s+i._z*l+t._z*u+n._z*c,e._w*s+i._w*l+t._w*u+n._w*c)},Quaternion.Hermite1stDerivative=function(e,t,i,n,r){var o=Quaternion.Zero();return this.Hermite1stDerivativeToRef(e,t,i,n,r,o),o},Quaternion.Hermite1stDerivativeToRef=function(e,t,i,n,r,o){var a=r*r;o.x=6*(a-r)*e.x+(3*a-4*r+1)*t.x+6*(-a+r)*i.x+(3*a-2*r)*n.x,o.y=6*(a-r)*e.y+(3*a-4*r+1)*t.y+6*(-a+r)*i.y+(3*a-2*r)*n.y,o.z=6*(a-r)*e.z+(3*a-4*r+1)*t.z+6*(-a+r)*i.z+(3*a-2*r)*n.z,o.w=6*(a-r)*e.w+(3*a-4*r+1)*t.w+6*(-a+r)*i.w+(3*a-2*r)*n.w},Object.defineProperty(Matrix,"Use64Bits",{get:function(){return _0x17f3d8.MatrixUse64Bits},enumerable:!1,configurable:!0}),Object.defineProperty(Matrix.prototype,"m",{get:function(){return this._m},enumerable:!1,configurable:!0}),Matrix.prototype.markAsUpdated=function(){this.updateFlag=Matrix._UpdateFlagSeed++,this._isIdentity=!1,this._isIdentity3x2=!1,this._isIdentityDirty=!0,this._isIdentity3x2Dirty=!0},Matrix.prototype._updateIdentityStatus=function(e,t,i,n){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!0),this._isIdentity=e,this._isIdentity3x2=e||i,this._isIdentityDirty=!this._isIdentity&&t,this._isIdentity3x2Dirty=!this._isIdentity3x2&&n},Matrix.prototype.isIdentity=function(){if(this._isIdentityDirty){this._isIdentityDirty=!1;var e=this._m;this._isIdentity=1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]}return this._isIdentity},Matrix.prototype.isIdentityAs3x2=function(){return this._isIdentity3x2Dirty&&(this._isIdentity3x2Dirty=!1,1!==this._m[0]||1!==this._m[5]||1!==this._m[15]||0!==this._m[1]||0!==this._m[2]||0!==this._m[3]||0!==this._m[4]||0!==this._m[6]||0!==this._m[7]||0!==this._m[8]||0!==this._m[9]||0!==this._m[10]||0!==this._m[11]||0!==this._m[12]||0!==this._m[13]||0!==this._m[14]?this._isIdentity3x2=!1:this._isIdentity3x2=!0),this._isIdentity3x2},Matrix.prototype.determinant=function(){if(!0===this._isIdentity)return 1;var e=this._m,t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],f=e[12],p=e[13],_=e[14],m=e[15],g=h*m-_*d,x=c*m-p*d,v=c*_-p*h,y=u*m-f*d,$=u*_-h*f,b=u*p-f*c;return t*+(a*g-s*x+l*v)+i*-(o*g-s*y+l*$)+n*+(o*x-a*y+l*b)+r*-(o*v-a*$+s*b)},Matrix.prototype.toArray=function(){return this._m},Matrix.prototype.asArray=function(){return this._m},Matrix.prototype.invert=function(){return this.invertToRef(this),this},Matrix.prototype.reset=function(){return Matrix.FromValuesToRef(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,this),this._updateIdentityStatus(!1),this},Matrix.prototype.add=function(e){var t=new Matrix;return this.addToRef(e,t),t},Matrix.prototype.addToRef=function(e,t){for(var i=this._m,n=t._m,r=e.m,o=0;o<16;o++)n[o]=i[o]+r[o];return t.markAsUpdated(),this},Matrix.prototype.addToSelf=function(e){for(var t=this._m,i=e.m,n=0;n<16;n++)t[n]+=i[n];return this.markAsUpdated(),this},Matrix.prototype.invertToRef=function(e){if(!0===this._isIdentity)return Matrix.IdentityToRef(e),this;var t=this._m,i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15],x=d*g-m*f,v=h*g-_*f,y=h*m-_*d,$=c*g-p*f,b=c*m-d*p,T=c*_-p*h,C=+(s*x-l*v+u*y),S=-(a*x-l*$+u*b),w=+(a*v-s*$+u*T),E=-(a*y-s*b+l*T),P=i*C+n*S+r*w+o*E;if(0===P)return e.copyFrom(this),this;var A=1/P,L=l*g-m*u,M=s*g-_*u,R=s*m-_*l,I=a*g-p*u,O=a*m-p*l,D=a*_-p*s,B=l*f-d*u,N=s*f-h*u,F=s*d-h*l,U=a*f-c*u,z=a*d-c*l,G=a*h-c*s,V=-(n*x-r*v+o*y),k=+(i*x-r*$+o*b),W=-(i*v-n*$+o*T),H=+(i*y-n*b+r*T),q=+(n*L-r*M+o*R),j=-(i*L-r*I+o*O),Y=+(i*M-n*I+o*D),X=-(i*R-n*O+r*D),K=-(n*B-r*N+o*F),Q=+(i*B-r*U+o*z),Z=-(i*N-n*U+o*G),J=+(i*F-n*z+r*G);return Matrix.FromValuesToRef(C*A,V*A,q*A,K*A,S*A,k*A,j*A,Q*A,w*A,W*A,Y*A,Z*A,E*A,H*A,X*A,J*A,e),this},Matrix.prototype.addAtIndex=function(e,t){return this._m[e]+=t,this.markAsUpdated(),this},Matrix.prototype.multiplyAtIndex=function(e,t){return this._m[e]*=t,this.markAsUpdated(),this},Matrix.prototype.setTranslationFromFloats=function(e,t,i){return this._m[12]=e,this._m[13]=t,this._m[14]=i,this.markAsUpdated(),this},Matrix.prototype.addTranslationFromFloats=function(e,t,i){return this._m[12]+=e,this._m[13]+=t,this._m[14]+=i,this.markAsUpdated(),this},Matrix.prototype.setTranslation=function(e){return this.setTranslationFromFloats(e._x,e._y,e._z)},Matrix.prototype.getTranslation=function(){return new Vector3(this._m[12],this._m[13],this._m[14])},Matrix.prototype.getTranslationToRef=function(e){return e.x=this._m[12],e.y=this._m[13],e.z=this._m[14],this},Matrix.prototype.removeRotationAndScaling=function(){var e=this.m;return Matrix.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,e[12],e[13],e[14],e[15],this),this._updateIdentityStatus(0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]),this},Matrix.prototype.multiply=function(e){var t=new Matrix;return this.multiplyToRef(e,t),t},Matrix.prototype.copyFrom=function(e){e.copyToArray(this._m);var t=e;return this.updateFlag=t.updateFlag,this._updateIdentityStatus(t._isIdentity,t._isIdentityDirty,t._isIdentity3x2,t._isIdentity3x2Dirty),this},Matrix.prototype.copyToArray=function(e,t){void 0===t&&(t=0);var i=this._m;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],this},Matrix.prototype.multiplyToRef=function(e,t){return this._isIdentity?(t.copyFrom(e),this):e._isIdentity?(t.copyFrom(this),this):(this.multiplyToArray(e,t._m,0),t.markAsUpdated(),this)},Matrix.prototype.multiplyToArray=function(e,t,i){var n=this._m,r=e.m,o=n[0],a=n[1],s=n[2],l=n[3],u=n[4],c=n[5],h=n[6],d=n[7],f=n[8],p=n[9],_=n[10],m=n[11],g=n[12],x=n[13],v=n[14],y=n[15],$=r[0],b=r[1],T=r[2],C=r[3],S=r[4],w=r[5],E=r[6],P=r[7],A=r[8],L=r[9],M=r[10],R=r[11],I=r[12],O=r[13],D=r[14],B=r[15];return t[i]=o*$+a*S+s*A+l*I,t[i+1]=o*b+a*w+s*L+l*O,t[i+2]=o*T+a*E+s*M+l*D,t[i+3]=o*C+a*P+s*R+l*B,t[i+4]=u*$+c*S+h*A+d*I,t[i+5]=u*b+c*w+h*L+d*O,t[i+6]=u*T+c*E+h*M+d*D,t[i+7]=u*C+c*P+h*R+d*B,t[i+8]=f*$+p*S+_*A+m*I,t[i+9]=f*b+p*w+_*L+m*O,t[i+10]=f*T+p*E+_*M+m*D,t[i+11]=f*C+p*P+_*R+m*B,t[i+12]=g*$+x*S+v*A+y*I,t[i+13]=g*b+x*w+v*L+y*O,t[i+14]=g*T+x*E+v*M+y*D,t[i+15]=g*C+x*P+v*R+y*B,this},Matrix.prototype.equals=function(e){var t=e;if(!t)return!1;if((this._isIdentity||t._isIdentity)&&!this._isIdentityDirty&&!t._isIdentityDirty)return this._isIdentity&&t._isIdentity;var i=this.m,n=t.m;return i[0]===n[0]&&i[1]===n[1]&&i[2]===n[2]&&i[3]===n[3]&&i[4]===n[4]&&i[5]===n[5]&&i[6]===n[6]&&i[7]===n[7]&&i[8]===n[8]&&i[9]===n[9]&&i[10]===n[10]&&i[11]===n[11]&&i[12]===n[12]&&i[13]===n[13]&&i[14]===n[14]&&i[15]===n[15]},Matrix.prototype.clone=function(){var e=new Matrix;return e.copyFrom(this),e},Matrix.prototype.getClassName=function(){return"Matrix"},Matrix.prototype.getHashCode=function(){for(var e=_0x2cfc16(this._m[0]),t=1;t<16;t++)e=397*e^_0x2cfc16(this._m[t]);return e},Matrix.prototype.decomposeToTransformNode=function(e){return e.rotationQuaternion=e.rotationQuaternion||new Quaternion,this.decompose(e.scaling,e.rotationQuaternion,e.position)},Matrix.prototype.decompose=function(e,t,i,n){if(this._isIdentity)return i&&i.setAll(0),e&&e.setAll(1),t&&t.copyFromFloats(0,0,0,1),!0;var r=this._m;if(i&&i.copyFromFloats(r[12],r[13],r[14]),(e=e||MathTmp.Vector3[0]).x=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]),e.y=Math.sqrt(r[4]*r[4]+r[5]*r[5]+r[6]*r[6]),e.z=Math.sqrt(r[8]*r[8]+r[9]*r[9]+r[10]*r[10]),n){var o=n.scaling.x<0?-1:1,a=n.scaling.y<0?-1:1,s=n.scaling.z<0?-1:1;e.x*=o,e.y*=a,e.z*=s}else this.determinant()<=0&&(e.y*=-1);if(0===e._x||0===e._y||0===e._z)return t&&t.copyFromFloats(0,0,0,1),!1;if(t){var l=1/e._x,u=1/e._y,c=1/e._z;Matrix.FromValuesToRef(r[0]*l,r[1]*l,r[2]*l,0,r[4]*u,r[5]*u,r[6]*u,0,r[8]*c,r[9]*c,r[10]*c,0,0,0,0,1,MathTmp.Matrix[0]),Quaternion.FromRotationMatrixToRef(MathTmp.Matrix[0],t)}return!0},Matrix.prototype.getRow=function(e){if(e<0||e>3)return null;var t=4*e;return new Vector4(this._m[t+0],this._m[t+1],this._m[t+2],this._m[t+3])},Matrix.prototype.setRow=function(e,t){return this.setRowFromFloats(e,t.x,t.y,t.z,t.w)},Matrix.prototype.transpose=function(){return Matrix.Transpose(this)},Matrix.prototype.transposeToRef=function(e){return Matrix.TransposeToRef(this,e),this},Matrix.prototype.setRowFromFloats=function(e,t,i,n,r){if(e<0||e>3)return this;var o=4*e;return this._m[o+0]=t,this._m[o+1]=i,this._m[o+2]=n,this._m[o+3]=r,this.markAsUpdated(),this},Matrix.prototype.scale=function(e){var t=new Matrix;return this.scaleToRef(e,t),t},Matrix.prototype.scaleToRef=function(e,t){for(var i=0;i<16;i++)t._m[i]=this._m[i]*e;return t.markAsUpdated(),this},Matrix.prototype.scaleAndAddToRef=function(e,t){for(var i=0;i<16;i++)t._m[i]+=this._m[i]*e;return t.markAsUpdated(),this},Matrix.prototype.toNormalMatrix=function(e){var t=MathTmp.Matrix[0];this.invertToRef(t),t.transposeToRef(e);var i=e._m;Matrix.FromValuesToRef(i[0],i[1],i[2],0,i[4],i[5],i[6],0,i[8],i[9],i[10],0,0,0,0,1,e)},Matrix.prototype.getRotationMatrix=function(){var e=new Matrix;return this.getRotationMatrixToRef(e),e},Matrix.prototype.getRotationMatrixToRef=function(e){var t=MathTmp.Vector3[0];if(!this.decompose(t))return Matrix.IdentityToRef(e),this;var i=this._m,n=1/t._x,r=1/t._y,o=1/t._z;return Matrix.FromValuesToRef(i[0]*n,i[1]*n,i[2]*n,0,i[4]*r,i[5]*r,i[6]*r,0,i[8]*o,i[9]*o,i[10]*o,0,0,0,0,1,e),this},Matrix.prototype.toggleModelMatrixHandInPlace=function(){var e=this._m;e[2]*=-1,e[6]*=-1,e[8]*=-1,e[9]*=-1,e[14]*=-1,this.markAsUpdated()},Matrix.prototype.toggleProjectionMatrixHandInPlace=function(){var e=this._m;e[8]*=-1,e[9]*=-1,e[10]*=-1,e[11]*=-1,this.markAsUpdated()},Matrix.FromArray=function(e,t){void 0===t&&(t=0);var i=new Matrix;return Matrix.FromArrayToRef(e,t,i),i},Matrix.FromArrayToRef=function(e,t,i){for(var n=0;n<16;n++)i._m[n]=e[n+t];i.markAsUpdated()},Matrix.FromFloat32ArrayToRefScaled=function(e,t,i,n){for(var r=0;r<16;r++)n._m[r]=e[r+t]*i;n.markAsUpdated()},Object.defineProperty(Matrix,"IdentityReadOnly",{get:function(){return Matrix._IdentityReadOnly},enumerable:!1,configurable:!0}),Matrix.FromValuesToRef=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var g=m._m;g[0]=e,g[1]=t,g[2]=i,g[3]=n,g[4]=r,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=u,g[10]=c,g[11]=h,g[12]=d,g[13]=f,g[14]=p,g[15]=_,m.markAsUpdated()},Matrix.FromValues=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=new Matrix,g=m._m;return g[0]=e,g[1]=t,g[2]=i,g[3]=n,g[4]=r,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=u,g[10]=c,g[11]=h,g[12]=d,g[13]=f,g[14]=p,g[15]=_,m.markAsUpdated(),m},Matrix.Compose=function(e,t,i){var n=new Matrix;return Matrix.ComposeToRef(e,t,i,n),n},Matrix.ComposeToRef=function(e,t,i,n){var r=n._m,o=t._x,a=t._y,s=t._z,l=t._w,u=o+o,c=a+a,h=s+s,d=o*u,f=o*c,p=o*h,_=a*c,m=a*h,g=s*h,x=l*u,v=l*c,y=l*h,$=e._x,b=e._y,T=e._z;r[0]=(1-(_+g))*$,r[1]=(f+y)*$,r[2]=(p-v)*$,r[3]=0,r[4]=(f-y)*b,r[5]=(1-(d+g))*b,r[6]=(m+x)*b,r[7]=0,r[8]=(p+v)*T,r[9]=(m-x)*T,r[10]=(1-(d+_))*T,r[11]=0,r[12]=i._x,r[13]=i._y,r[14]=i._z,r[15]=1,n.markAsUpdated()},Matrix.Identity=function(){var e=Matrix.FromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return e._updateIdentityStatus(!0),e},Matrix.IdentityToRef=function(e){Matrix.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,e),e._updateIdentityStatus(!0)},Matrix.Zero=function(){var e=Matrix.FromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return e._updateIdentityStatus(!1),e},Matrix.RotationX=function(e){var t=new Matrix;return Matrix.RotationXToRef(e,t),t},Matrix.Invert=function(e){var t=new Matrix;return e.invertToRef(t),t},Matrix.RotationXToRef=function(e,t){var i=Math.sin(e),n=Math.cos(e);Matrix.FromValuesToRef(1,0,0,0,0,n,i,0,0,-i,n,0,0,0,0,1,t),t._updateIdentityStatus(1===n&&0===i)},Matrix.RotationY=function(e){var t=new Matrix;return Matrix.RotationYToRef(e,t),t},Matrix.RotationYToRef=function(e,t){var i=Math.sin(e),n=Math.cos(e);Matrix.FromValuesToRef(n,0,-i,0,0,1,0,0,i,0,n,0,0,0,0,1,t),t._updateIdentityStatus(1===n&&0===i)},Matrix.RotationZ=function(e){var t=new Matrix;return Matrix.RotationZToRef(e,t),t},Matrix.RotationZToRef=function(e,t){var i=Math.sin(e),n=Math.cos(e);Matrix.FromValuesToRef(n,i,0,0,-i,n,0,0,0,0,1,0,0,0,0,1,t),t._updateIdentityStatus(1===n&&0===i)},Matrix.RotationAxis=function(e,t){var i=new Matrix;return Matrix.RotationAxisToRef(e,t,i),i},Matrix.RotationAxisToRef=function(e,t,i){var n=Math.sin(-t),r=Math.cos(-t),o=1-r;e.normalize();var a=i._m;a[0]=e._x*e._x*o+r,a[1]=e._x*e._y*o-e._z*n,a[2]=e._x*e._z*o+e._y*n,a[3]=0,a[4]=e._y*e._x*o+e._z*n,a[5]=e._y*e._y*o+r,a[6]=e._y*e._z*o-e._x*n,a[7]=0,a[8]=e._z*e._x*o-e._y*n,a[9]=e._z*e._y*o+e._x*n,a[10]=e._z*e._z*o+r,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,i.markAsUpdated()},Matrix.RotationAlignToRef=function(e,t,i){var n=Vector3.Dot(t,e),r=i._m;if(n<-1+_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)r[0]=-1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0;else{var o=Vector3.Cross(t,e),a=1/(1+n);r[0]=o._x*o._x*a+n,r[1]=o._y*o._x*a-o._z,r[2]=o._z*o._x*a+o._y,r[3]=0,r[4]=o._x*o._y*a+o._z,r[5]=o._y*o._y*a+n,r[6]=o._z*o._y*a-o._x,r[7]=0,r[8]=o._x*o._z*a-o._y,r[9]=o._y*o._z*a+o._x,r[10]=o._z*o._z*a+n,r[11]=0}r[12]=0,r[13]=0,r[14]=0,r[15]=1,i.markAsUpdated()},Matrix.RotationYawPitchRoll=function(e,t,i){var n=new Matrix;return Matrix.RotationYawPitchRollToRef(e,t,i,n),n},Matrix.RotationYawPitchRollToRef=function(e,t,i,n){Quaternion.RotationYawPitchRollToRef(e,t,i,MathTmp.Quaternion[0]),MathTmp.Quaternion[0].toRotationMatrix(n)},Matrix.Scaling=function(e,t,i){var n=new Matrix;return Matrix.ScalingToRef(e,t,i,n),n},Matrix.ScalingToRef=function(e,t,i,n){Matrix.FromValuesToRef(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1,n),n._updateIdentityStatus(1===e&&1===t&&1===i)},Matrix.Translation=function(e,t,i){var n=new Matrix;return Matrix.TranslationToRef(e,t,i,n),n},Matrix.TranslationToRef=function(e,t,i,n){Matrix.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,e,t,i,1,n),n._updateIdentityStatus(0===e&&0===t&&0===i)},Matrix.Lerp=function(e,t,i){var n=new Matrix;return Matrix.LerpToRef(e,t,i,n),n},Matrix.LerpToRef=function(e,t,i,n){for(var r=n._m,o=e.m,a=t.m,s=0;s<16;s++)r[s]=o[s]*(1-i)+a[s]*i;n.markAsUpdated()},Matrix.DecomposeLerp=function(e,t,i){var n=new Matrix;return Matrix.DecomposeLerpToRef(e,t,i,n),n},Matrix.DecomposeLerpToRef=function(e,t,i,n){var r=MathTmp.Vector3[0],o=MathTmp.Quaternion[0],a=MathTmp.Vector3[1];e.decompose(r,o,a);var s=MathTmp.Vector3[2],l=MathTmp.Quaternion[1],u=MathTmp.Vector3[3];t.decompose(s,l,u);var c=MathTmp.Vector3[4];Vector3.LerpToRef(r,s,i,c);var h=MathTmp.Quaternion[2];Quaternion.SlerpToRef(o,l,i,h);var d=MathTmp.Vector3[5];Vector3.LerpToRef(a,u,i,d),Matrix.ComposeToRef(c,h,d,n)},Matrix.LookAtLH=function(e,t,i){var n=new Matrix;return Matrix.LookAtLHToRef(e,t,i,n),n},Matrix.LookAtLHToRef=function(e,t,i,n){var r=MathTmp.Vector3[0],o=MathTmp.Vector3[1],a=MathTmp.Vector3[2];t.subtractToRef(e,a),a.normalize(),Vector3.CrossToRef(i,a,r);var s=r.lengthSquared();0===s?r.x=1:r.normalizeFromLength(Math.sqrt(s)),Vector3.CrossToRef(a,r,o),o.normalize();var l=-Vector3.Dot(r,e),u=-Vector3.Dot(o,e),c=-Vector3.Dot(a,e);Matrix.FromValuesToRef(r._x,o._x,a._x,0,r._y,o._y,a._y,0,r._z,o._z,a._z,0,l,u,c,1,n)},Matrix.LookAtRH=function(e,t,i){var n=new Matrix;return Matrix.LookAtRHToRef(e,t,i,n),n},Matrix.LookAtRHToRef=function(e,t,i,n){var r=MathTmp.Vector3[0],o=MathTmp.Vector3[1],a=MathTmp.Vector3[2];e.subtractToRef(t,a),a.normalize(),Vector3.CrossToRef(i,a,r);var s=r.lengthSquared();0===s?r.x=1:r.normalizeFromLength(Math.sqrt(s)),Vector3.CrossToRef(a,r,o),o.normalize();var l=-Vector3.Dot(r,e),u=-Vector3.Dot(o,e),c=-Vector3.Dot(a,e);Matrix.FromValuesToRef(r._x,o._x,a._x,0,r._y,o._y,a._y,0,r._z,o._z,a._z,0,l,u,c,1,n)},Matrix.LookDirectionLH=function(e,t){var i=new Matrix;return Matrix.LookDirectionLHToRef(e,t,i),i},Matrix.LookDirectionLHToRef=function(e,t,i){var n=MathTmp.Vector3[0];n.copyFrom(e),n.scaleInPlace(-1);var r=MathTmp.Vector3[1];Vector3.CrossToRef(t,n,r),Matrix.FromValuesToRef(r._x,r._y,r._z,0,t._x,t._y,t._z,0,n._x,n._y,n._z,0,0,0,0,1,i)},Matrix.LookDirectionRH=function(e,t){var i=new Matrix;return Matrix.LookDirectionRHToRef(e,t,i),i},Matrix.LookDirectionRHToRef=function(e,t,i){var n=MathTmp.Vector3[2];Vector3.CrossToRef(t,e,n),Matrix.FromValuesToRef(n._x,n._y,n._z,0,t._x,t._y,t._z,0,e._x,e._y,e._z,0,0,0,0,1,i)},Matrix.OrthoLH=function(e,t,i,n,r){var o=new Matrix;return Matrix.OrthoLHToRef(e,t,i,n,o,r),o},Matrix.OrthoLHToRef=function(e,t,i,n,r,o){var a=2/e,s=2/t,l=2/(n-i),u=-(n+i)/(n-i);Matrix.FromValuesToRef(a,0,0,0,0,s,0,0,0,0,l,0,0,0,u,1,r),o&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(1===a&&1===s&&1===l&&0===u)},Matrix.OrthoOffCenterLH=function(e,t,i,n,r,o,a){var s=new Matrix;return Matrix.OrthoOffCenterLHToRef(e,t,i,n,r,o,s,a),s},Matrix.OrthoOffCenterLHToRef=function(e,t,i,n,r,o,a,s){var l=2/(t-e),u=2/(n-i),c=2/(o-r),h=-(o+r)/(o-r),d=(e+t)/(e-t),f=(n+i)/(i-n);Matrix.FromValuesToRef(l,0,0,0,0,u,0,0,0,0,c,0,d,f,h,1,a),s&&a.multiplyToRef(mtxConvertNDCToHalfZRange,a),a.markAsUpdated()},Matrix.OrthoOffCenterRH=function(e,t,i,n,r,o,a){var s=new Matrix;return Matrix.OrthoOffCenterRHToRef(e,t,i,n,r,o,s,a),s},Matrix.OrthoOffCenterRHToRef=function(e,t,i,n,r,o,a,s){Matrix.OrthoOffCenterLHToRef(e,t,i,n,r,o,a,s),a._m[10]*=-1},Matrix.PerspectiveLH=function(e,t,i,n,r,o){void 0===o&&(o=0);var a=new Matrix,s=2*i/e,l=2*i/t,u=(n+i)/(n-i),c=-2*n*i/(n-i),h=Math.tan(o);return Matrix.FromValuesToRef(s,0,0,0,0,l,0,h,0,0,u,1,0,0,c,0,a),r&&a.multiplyToRef(mtxConvertNDCToHalfZRange,a),a._updateIdentityStatus(!1),a},Matrix.PerspectiveFovLH=function(e,t,i,n,r,o,a){void 0===o&&(o=0),void 0===a&&(a=!1);var s=new Matrix;return Matrix.PerspectiveFovLHToRef(e,t,i,n,s,!0,r,o,a),s},Matrix.PerspectiveFovLHToRef=function(e,t,i,n,r,o,a,s,l){void 0===o&&(o=!0),void 0===s&&(s=0),void 0===l&&(l=!1);var u=i,c=n,h=1/Math.tan(.5*e),d=o?h/t:h,f=o?h:h*t,p=l&&0===u?-1:0!==c?(c+u)/(c-u):1,_=l&&0===u?2*c:0!==c?-2*c*u/(c-u):-2*u,m=Math.tan(s);Matrix.FromValuesToRef(d,0,0,0,0,f,0,m,0,0,p,1,0,0,_,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovReverseLHToRef=function(e,t,i,n,r,o,a,s){void 0===o&&(o=!0),void 0===s&&(s=0);var l=1/Math.tan(.5*e),u=o?l/t:l,c=o?l:l*t,h=Math.tan(s);Matrix.FromValuesToRef(u,0,0,0,0,c,0,h,0,0,-i,1,0,0,1,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovRH=function(e,t,i,n,r,o,a){void 0===o&&(o=0),void 0===a&&(a=!1);var s=new Matrix;return Matrix.PerspectiveFovRHToRef(e,t,i,n,s,!0,r,o,a),s},Matrix.PerspectiveFovRHToRef=function(e,t,i,n,r,o,a,s,l){void 0===o&&(o=!0),void 0===s&&(s=0),void 0===l&&(l=!1);var u=i,c=n,h=1/Math.tan(.5*e),d=o?h/t:h,f=o?h:h*t,p=l&&0===u?1:0!==c?-(c+u)/(c-u):-1,_=l&&0===u?2*c:0!==c?-2*c*u/(c-u):-2*u,m=Math.tan(s);Matrix.FromValuesToRef(d,0,0,0,0,f,0,m,0,0,p,-1,0,0,_,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovReverseRHToRef=function(e,t,i,n,r,o,a,s){void 0===o&&(o=!0),void 0===s&&(s=0);var l=1/Math.tan(.5*e),u=o?l/t:l,c=o?l:l*t,h=Math.tan(s);Matrix.FromValuesToRef(u,0,0,0,0,c,0,h,0,0,-i,-1,0,0,-1,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovWebVRToRef=function(e,t,i,n,r,o,a){void 0===r&&(r=!1),void 0===a&&(a=0);var s=r?-1:1,l=Math.tan(e.upDegrees*Math.PI/180),u=Math.tan(e.downDegrees*Math.PI/180),c=Math.tan(e.leftDegrees*Math.PI/180),h=Math.tan(e.rightDegrees*Math.PI/180),d=2/(c+h),f=2/(l+u),p=Math.tan(a),_=n._m;_[0]=d,_[1]=_[2]=_[3]=_[4]=0,_[5]=f,_[6]=0,_[7]=p,_[8]=(c-h)*d*.5,_[9]=-(l-u)*f*.5,_[10]=-i/(t-i),_[11]=1*s,_[12]=_[13]=_[15]=0,_[14]=-2*i*t/(i-t),o&&n.multiplyToRef(mtxConvertNDCToHalfZRange,n),n.markAsUpdated()},Matrix.GetFinalMatrix=function(e,t,i,n,r,o){var a=e.width,s=e.height,l=e.x,u=e.y,c=Matrix.FromValues(a/2,0,0,0,0,-s/2,0,0,0,0,o-r,0,l+a/2,s/2+u,r,1),h=MathTmp.Matrix[0];return t.multiplyToRef(i,h),h.multiplyToRef(n,h),h.multiply(c)},Matrix.GetAsMatrix2x2=function(e){var t=e.m,i=[t[0],t[1],t[4],t[5]];return _0x17f3d8.MatrixUse64Bits?i:new Float32Array(i)},Matrix.GetAsMatrix3x3=function(e){var t=e.m,i=[t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]];return _0x17f3d8.MatrixUse64Bits?i:new Float32Array(i)},Matrix.Transpose=function(e){var t=new Matrix;return Matrix.TransposeToRef(e,t),t},Matrix.TransposeToRef=function(e,t){var i=t._m,n=e.m;i[0]=n[0],i[1]=n[4],i[2]=n[8],i[3]=n[12],i[4]=n[1],i[5]=n[5],i[6]=n[9],i[7]=n[13],i[8]=n[2],i[9]=n[6],i[10]=n[10],i[11]=n[14],i[12]=n[3],i[13]=n[7],i[14]=n[11],i[15]=n[15],t.markAsUpdated(),t._updateIdentityStatus(e._isIdentity,e._isIdentityDirty)},Matrix.Reflection=function(e){var t=new Matrix;return Matrix.ReflectionToRef(e,t),t},Matrix.ReflectionToRef=function(e,t){e.normalize();var i=e.normal.x,n=e.normal.y,r=e.normal.z,o=-2*i,a=-2*n,s=-2*r;Matrix.FromValuesToRef(o*i+1,a*i,s*i,0,o*n,a*n+1,s*n,0,o*r,a*r,s*r+1,0,o*e.d,a*e.d,s*e.d,1,t)},Matrix.FromXYZAxesToRef=function(e,t,i,n){Matrix.FromValuesToRef(e._x,e._y,e._z,0,t._x,t._y,t._z,0,i._x,i._y,i._z,0,0,0,0,1,n)},Matrix.FromQuaternionToRef=function(e,t){var i=e._x*e._x,n=e._y*e._y,r=e._z*e._z,o=e._x*e._y,a=e._z*e._w,s=e._z*e._x,l=e._y*e._w,u=e._y*e._z,c=e._x*e._w;t._m[0]=1-2*(n+r),t._m[1]=2*(o+a),t._m[2]=2*(s-l),t._m[3]=0,t._m[4]=2*(o-a),t._m[5]=1-2*(r+i),t._m[6]=2*(u+c),t._m[7]=0,t._m[8]=2*(s+l),t._m[9]=2*(u-c),t._m[10]=1-2*(n+i),t._m[11]=0,t._m[12]=0,t._m[13]=0,t._m[14]=0,t._m[15]=1,t.markAsUpdated()},Matrix._UpdateFlagSeed=0,Matrix._IdentityReadOnly=Matrix.Identity(),MathTmp.Vector3=_0x41a72f.BuildTuple(11,Vector3.Zero),MathTmp.Matrix=_0x41a72f.BuildTuple(2,Matrix.Identity),MathTmp.Quaternion=_0x41a72f.BuildTuple(3,Quaternion.Zero),TmpVectors.Vector2=_0x41a72f.BuildTuple(3,Vector2.Zero),TmpVectors.Vector3=_0x41a72f.BuildTuple(13,Vector3.Zero),TmpVectors.Vector4=_0x41a72f.BuildTuple(3,Vector4.Zero),TmpVectors.Quaternion=_0x41a72f.BuildTuple(2,Quaternion.Zero),TmpVectors.Matrix=_0x41a72f.BuildTuple(8,Matrix.Identity);const mtxConvertNDCToHalfZRange=Matrix.FromValues(1,0,0,0,0,1,0,0,0,0,.5,0,0,0,.5,1);var _0xe00d73=(_0x3670ec=!0,function(e,t){var i=_0x3670ec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3670ec=!1,i}),_0x513fe1=_0xe00d73(void 0,(function(){return _0x513fe1.toString().search("(((.+)+)+)+$").toString().constructor(_0x513fe1).search("(((.+)+)+)+$")})),_0x3670ec;function _0x3e2f69(){this._ubo=void 0,this._name="",this._isValueDirty=!0,this._isTextureDirty=!1,this._uniformMap=void 0}_0x513fe1(),Object.defineProperties(_0x3e2f69.prototype,{GPUbuffer:{get:function(){return this._ubo.getBuffer()}},buffer:{get:function(){return this._ubo}},name:{get:function(){return this._name}},valueDirty:{set:function(e){return this._isValueDirty=e},get:function(){return this._isValueDirty}},textureDirty:{set:function(e){return this._isTextureDirty=e},get:function(){return this._isTextureDirty}},uniformMap:{get:function(){return this._uniformMap}}}),_0x3e2f69.prototype.update=function(e,t){},_0x3e2f69.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x3e2f69.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x3e2f69.writeCartesian2ToUBO=function(e,t,i){t.updateFloat2(e,i.x,i.y)},_0x3e2f69.writeCartesian3ToUBO=function(e,t,i){t.updateFloat3(e,i.x,i.y,i.z)},_0x3e2f69.writeCartesian4ToUBO=function(e,t,i){t.updateFloat4(e,i.x,i.y,i.z,i.w)};var _0x38f719=new Float32Array(16),_0xa3de78=new Matrix,_0x5e6b52=new Float32Array(9);function e$1V(){}function r$15(){(_0x3e2f69.call(this)||this)._name=_0x27131a.MESH}_0x3e2f69.writeMatrix3ToUBO=function(e,t,i){p$1e.toArray(i,_0x5e6b52),t.updateMatrix3x3(e,_0x5e6b52)},_0x3e2f69.writeMatrix4ToUBO=function(e,t,i){p$1d.toArray(i,_0x38f719),Matrix.FromArrayToRef(_0x38f719,0,_0xa3de78),t.updateMatrix(e,_0xa3de78)},_0x3e2f69.writeColorToUBO=function(e,t,i){t.updateFloat4(e,i.red,i.green,i.blue,i.alpha)},_0x3e2f69.setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x3e2f69.setTextureArrayToEffect=function(e,t,i){var n,r=t.length,o=[];for(n=0;n0&&e.setTextureArray(i,o)},_0x3e2f69.prototype.isDestroyed=function(){return!1},_0x3e2f69.prototype.destroy=function(){return this._ubo.dispose(),i$10(this)},e$1V.totalQueryCount=0,e$1V.thisFrameQueryCount=0,e$1V.maxQueryPerFrame=1,e$1V.updateArrayByQueryID=new Uint32Array(8192),e$1V.reset=function(){e$1V.thisFrameQueryCount=0;var e=e$1V.totalQueryCount/5;e$1V.maxQueryPerFrame=Math.ceil(e)},e$1V.createQuery=function(e){e$1V.totalQueryCount++,e$1V.updateArrayByQueryID[e]=0},e$1V.deleteQuery=function(e){e$1V.totalQueryCount--,e$1V.totalQueryCount<0&&(e$1V.totalQueryCount=0)},e$1V.canQueryThisFrame=function(e,t){return!(e$1V.thisFrameQueryCount>=e$1V.maxQueryPerFrame)&&!(t-e$1V.updateArrayByQueryID[e]<=5)},e$1V.updateQuery=function(e,t){e$1V.updateArrayByQueryID[e]=t},_0x3e2f69&&(r$15.__proto__=_0x3e2f69),r$15.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),r$15.prototype.constructor=_0x3e2f69,r$15.prototype._initUBO=function(e){this._ubo=new _0x2e52cb(e.engine,void 0,!1,_0x27131a.MESH,!1,!1),this._ubo.addUniform("uModelMatrix",16),this._ubo.create()},r$15.prototype.update=function(e,t){this._ubo||this._initUBO(e),_0x3e2f69.writeMatrix4ToUBO("uModelMatrix",this._ubo,t),this._ubo.update()},r$15.prototype.isDestroyed=function(){return!1},r$15.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};const D$_=8192;var M$18={OCCLUSION_TYPE_NONE:0,OCCLUSION_TYPE_OPTIMISTIC:1,OCCLUSION_TYPE_STRICT:2};function w$10(){this.occlusionInternalRetryCounter=0,this.isOcclusionQueryInProgress=!1,this.isOccluded=!1,this.occlusionRetryCount=-1,this.occlusionType=M$18.OCCLUSION_TYPE_OPTIMISTIC,this.forceRenderingWhenOccluded=!1}function i$$(e,t,i){this._occlusionDataStorage=new w$10,this._context=e,this._occlusionQuery=null,this._meshDrawCommand=t,this._occlusionMeshDrawCommand=i,this._matModel=new p$1d,this._relativeModelMatrix=new p$1d,this._createFrameId=-1}i$$.prototype.isOccluded=function(){return this._occlusionDataStorage.isOccluded},i$$.prototype.checkOcclusionQuery=function(e,t){var i=t.frameNumber;const n=this._occlusionDataStorage;if(n.occlusionType===M$18.OCCLUSION_TYPE_NONE)return n.isOccluded=!1,!1;this._prepare();var r=this._context.engine;if(this._occlusionDataStorage.isOcclusionQueryInProgress&&this._occlusionQuery){const e=r.isQueryResultAvailable(this._occlusionQuery,this),t=r.getQueryResultFrameID();if(e&&this._createFrameId<=t){const e=r.getQueryResult(this._occlusionQuery);n.isOcclusionQueryInProgress=!1,n.occlusionInternalRetryCounter=0,n.isOccluded=!(e>0)}else{if(!e)return!1;this._createFrameId>t&&(n.isOccluded=!1)}}if(this._occlusionQuery&&!e$1V.canQueryThisFrame(this._occlusionQuery,i))return n.isOccluded;var o=t.camera.position;if(this._meshDrawCommand.orientedBoundingBox){if(y$Z.isPointIn(this._meshDrawCommand.orientedBoundingBox,o))return n.isOccluded=!1,!1}else if(this._meshDrawCommand.boundingVolume.distanceSquaredTo(o)<0)return n.isOccluded=!1,!1;return null===this._occlusionQuery&&(this._occlusionQuery=r.createQuery(),e$1V.createQuery(this._occlusionQuery),this._createFrameId=r.frameId+5),this._occlusionQuery1&&(i-=1),6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function e$1U(e,t,i,n){this.red=u$_(e,1),this.green=u$_(t,1),this.blue=u$_(i,1),this.alpha=u$_(n,1)}i$$.prototype._obbToWorldMatrix=function(e){p$1e.fromArray(e.halfAxes,0,x$1b),this._matModel=p$1d.fromRotationTranslation(x$1b,e.center,this._matModel),p$1d.multiplyByScale(this._matModel,S$X,this._matModel)},i$$.prototype.isDestroyed=function(){return!1},i$$.prototype.destroy=function(){return this._occlusionQuery&&(this._context.engine.deleteQuery(this._occlusionQuery),this._occlusionQuery=null,this._occlusionDataStorage.isOcclusionQueryInProgress=!1,e$1V.deleteQuery(this._occlusionQuery)),this._meshUBO&&this._meshUBO.destroy(),this._occlusionMeshDrawCommand=null,i$10(this)},Object.defineProperties(i$_.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this.dirty=!0)}},occlude:{get:function(){return this._occlude},set:function(e){this._occlude!==e&&(this._occlude=e,this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){if(this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0,e$2b(e)?this._vertexArrayID=e.uniqueID:this._vertexArrayID=-1,!e$2b(this._count))){var t=e.indexBuffer;e$2b(t)&&(this._count=t.numberOfIndices)}}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0,this._fastBundleDirty=!0)}},castShadows:{get:function(){return this._castShadows},set:function(e){this._castShadows!==e&&(this._castShadows=e,this.dirty=!0)}},selectCastShadows:{get:function(){return this._selectCastShadows},set:function(e){this._selectCastShadows!==e&&(this._selectCastShadows=e,this.dirty=!0)}},receiveShadows:{get:function(){return this._receiveShadows},set:function(e){this._receiveShadows!==e&&(this._receiveShadows=e,this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this._combineUniformMapWithUBO(),this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return this._executeInClosestFrustum},set:function(e){this._executeInClosestFrustum!==e&&(this._executeInClosestFrustum=e,this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickOnly:{get:function(){return this._pickOnly},set:function(e){this._pickOnly!==e&&(this._pickOnly=e,this.dirty=!0)}},transformFeedback:{get:function(){return this._transformFeedback},set:function(e){this._transformFeedback=e}},fastBundleDirty:{get:function(){return this._fastBundleDirty}},s3mLayer:{get:function(){return this._s3mlayer},set:function(e){this._s3mlayer=e}},occlusionQueryEnable:{get:function(){return this._occulsionQueryEnable},set:function(e){this._occulsionQueryEnable=e}},useRelativeOrigin:{get:function(){return this._useRelativeOrigin},set:function(e){this._useRelativeOrigin=e}}}),i$_.prototype.addUniformBuffer=function(e){this._uniformBuffers.push(e),e.uniformMap&&(this._uniformMap=p$19(this._uniformMap,e.uniformMap))},i$_.prototype.removeAllUniformBuffer=function(){this._uniformBuffers=[]},i$_.shallowClone=function(e,t){if(e$2b(e))return e$2b(t)||(t=new i$_),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._cull=e._cull,t._occlude=e._occlude,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._uniformBuffers=e._uniformBuffers,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._executeInClosestFrustum=e._executeInClosestFrustum,t._owner=e._owner,t._debugShowBoundingVolume=e._debugShowBoundingVolume,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._castShadows=e._castShadows,t._receiveShadows=e._receiveShadows,t._selectCastShadows=e._selectCastShadows,t._pickId=e._pickId,t._pickOnly=e._pickOnly,t._pointCloudEyeDomeLighting=e._pointCloudEyeDomeLighting,t._transformFeedback=e._transformFeedback,t._relativeOrigin=e._relativeOrigin,t._relativeModelMatrix=e._relativeModelMatrix,t._occlusionMesh=e._occlusionMesh,t._occulsionQueryEnable=e._occulsionQueryEnable,t._useRelativeOrigin=e._useRelativeOrigin,t.dirty=!0,t.lastDirtyTime=0,t._vertexArrayID=e._vertexArrayID,t._activeFrameBufferID=e._activeFrameBufferID,t},i$_.prototype.execute=function(e,t){e.draw(this,t)},i$_.prototype.setActiveFrameBufferID=function(e){this._activeFrameBufferID=e},i$_.prototype.setFastBundle=function(e){this._fastBundle[this._activeFrameBufferID]=e,this._fastBundleDirty=!1},i$_.prototype.removeAllFastBundleAndBindGroups=function(){this.bindGroups=void 0,this._fastBundle={}},i$_.prototype.getActiveBundle=function(){return this._fastBundle[this._activeFrameBufferID]},i$_.prototype.checkOcclusionQuery=function(e,t,i){return!(!e.webgpu||!this._occulsionQueryEnable)&&(this._occlusionMesh||(this._occlusionMesh=new i$$(e,this,new i$_)),this._occlusionMesh.checkOcclusionQuery(t,i))},i$_.prototype.isOccluded=function(){return!(!this._occulsionQueryEnable||!this._occlusionMesh)&&this._occlusionMesh.isOccluded()},i$_.prototype._combineUniformMapWithUBO=function(){for(var e=0;ee$1T.maximumAliasedLineWidth)throw new t$16("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!W$13.validate(this.frontFace))throw new t$16("Invalid renderState.frontFace.");if(!W$11(this.cull.face))throw new t$16("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new t$16("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new t$16("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new t$16("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new t$16("renderState.depthRange.far must be less than or equal to one.");if(!U$17(this.depthTest.func))throw new t$16("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new t$16("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!F$18(this.blending.equationRgb))throw new t$16("Invalid renderState.blending.equationRgb.");if(!F$18(this.blending.equationAlpha))throw new t$16("Invalid renderState.blending.equationAlpha.");if(!E$1d(this.blending.functionSourceRgb))throw new t$16("Invalid renderState.blending.functionSourceRgb.");if(!E$1d(this.blending.functionSourceAlpha))throw new t$16("Invalid renderState.blending.functionSourceAlpha.");if(!E$1d(this.blending.functionDestinationRgb))throw new t$16("Invalid renderState.blending.functionDestinationRgb.");if(!E$1d(this.blending.functionDestinationAlpha))throw new t$16("Invalid renderState.blending.functionDestinationAlpha.");if(!_$Z(this.stencilTest.frontFunction))throw new t$16("Invalid renderState.stencilTest.frontFunction.");if(!_$Z(this.stencilTest.backFunction))throw new t$16("Invalid renderState.stencilTest.backFunction.");if(!m$14(this.stencilTest.frontOperation.fail))throw new t$16("Invalid renderState.stencilTest.frontOperation.fail.");if(!m$14(this.stencilTest.frontOperation.zFail))throw new t$16("Invalid renderState.stencilTest.frontOperation.zFail.");if(!m$14(this.stencilTest.frontOperation.zPass))throw new t$16("Invalid renderState.stencilTest.frontOperation.zPass.");if(!m$14(this.stencilTest.backOperation.fail))throw new t$16("Invalid renderState.stencilTest.backOperation.fail.");if(!m$14(this.stencilTest.backOperation.zFail))throw new t$16("Invalid renderState.stencilTest.backOperation.zFail.");if(!m$14(this.stencilTest.backOperation.zPass))throw new t$16("Invalid renderState.stencilTest.backOperation.zPass.");if(e$2b(this.viewport)){if(this.viewport.width<0)throw new t$16("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new t$16("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>e$1T.maximumViewportWidth)throw new t$16("renderState.viewport.width must be less than or equal to the maximum viewport width ("+e$1T.maximumViewportWidth.toString()+"). Check maximumViewportWidth.");if(this.viewport.height>e$1T.maximumViewportHeight)throw new t$16("renderState.viewport.height must be less than or equal to the maximum viewport height ("+e$1T.maximumViewportHeight.toString()+"). Check maximumViewportHeight.")}this.id=0,this._applyFunctions=[]}t$_.applyViewport=function(e,t,i,n,r){var o=u$_(t.viewport,i.viewport);e$2b(o)||((o=S$V).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=o,e.viewport(o.x,o.y,o.width,o.height)};var q$18=0,g$19={};function B$_(e,t,i){(e?n$10:t$_).applyFrontFace(t,i)}function K$V(e,t,i){(e?n$10:t$_).applyCull(t,i)}function V$$(e,t,i){(e?n$10:t$_).applyLineWidth(t,i)}function H$11(e,t,i){(e?n$10:t$_).applyPolygonOffset(t,i)}function Q$10(e,t,i){(e?n$10:t$_).applyDepthRange(t,i)}function G$1e(e,t,i){(e?n$10:t$_).applyDepthTest(t,i)}function J$Y(e,t,i){(e?n$10:t$_).applyColorMask(t,i)}function Y$S(e,t,i){(e?n$10:t$_).applyDepthMask(t,i)}function Z$10(e,t,i){(e?n$10:t$_).applyStencilMask(t,i)}function X$$(e,t,i){(e?n$10:t$_).applyStencilTest(t,i)}function j$18(e,t,i){(e?n$10:t$_).applySampleCoverage(t,i)}function $$11(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(B$_),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&i.push(K$V),e.lineWidth!==t.lineWidth&&i.push(V$$),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&i.push(H$11),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&i.push(Q$10),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&i.push(G$1e),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&i.push(J$Y),e.depthMask!==t.depthMask&&i.push(Y$S),e.stencilMask!==t.stencilMask&&i.push(Z$10),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&i.push(X$$),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&i.push(j$18),i}d$1m.fromCache=function(e){var t=JSON.stringify(e),i=g$19[t];if(e$2b(i))return++i.referenceCount,i.state;var n=new d$1m(e),r=JSON.stringify(n);return e$2b(i=g$19[r])||(n.id=q$18++,i={referenceCount:0,state:n=c$15(n)},g$19[r]=i),++i.referenceCount,g$19[t]={referenceCount:1,state:i.state},i.state},d$1m.removeFromCache=function(e){var t=new d$1m(e),i=JSON.stringify(t),n=g$19[i],r=JSON.stringify(e),o=g$19[r];e$2b(o)&&(--o.referenceCount,0===o.referenceCount&&(delete g$19[r],e$2b(n)&&--n.referenceCount)),e$2b(n)&&0===n.referenceCount&&delete g$19[i]},d$1m.getCache=function(){return g$19},d$1m.clearCache=function(){g$19={}},d$1m.apply=function(e,t,i){const n=e$2b(e.name)?n$10:t$_;n.applyFrontFace(e,t),n.applyCull(e,t),n.applyLineWidth(e,t),n.applyPolygonOffset(e,t),n.applyDepthRange(e,t),n.applyDepthTest(e,t),n.applyColorMask(e,t),n.applyDepthMask(e,t),n.applyStencilMask(e,t),n.applyStencilTest(e,t),n.applySampleCoverage(e,t),n.applyScissorTest(e,t,i),n.applyBlending(e,t,i),n.applyViewport(e,t,i)},d$1m.partialApply=function(e,t,i,n,r,o,a,s,l,u,c){const h=e$2b(e.name),d=h?n$10:t$_;if(t!==i){var f=i._applyFunctions[t.id];e$2b(f)||(f=$$11(t,i),i._applyFunctions[t.id]=f);for(var p=f.length,_=0;_",i$Z[de$x.FLOAT_VEC3]="vec3",i$Z[de$x.FLOAT_VEC4]="vec4",i$Z[de$x.INT]="i32",i$Z[de$x.INT_VEC2]="vec2",i$Z[de$x.INT_VEC3]="vec3",i$Z[de$x.INT_VEC4]="vec4",i$Z[de$x.BOOL]="bool",i$Z[de$x.BOOL_VEC2]="vec2",i$Z[de$x.BOOL_VEC3]="vec3",i$Z[de$x.BOOL_VEC4]="vec4",i$Z[de$x.FLOAT_MAT2]="mat2x2",i$Z[de$x.FLOAT_MAT3]="mat3x3",i$Z[de$x.FLOAT_MAT4]="mat4x4",i$Z[de$x.SAMPLER_2D]="texture_2d",i$Z[de$x.SAMPLER_CUBE]="texture_cube",n$$.prototype.getWgslDeclaration=function(e){var t="";return this._datatype==de$x.SAMPLER_2D||this._datatype==de$x.SAMPLER_CUBE?(t+="var "+e+" : "+i$Z[this._datatype]+";\n",t+="var "+e+"Sampler : sampler;"):t+="uniform "+e+" : "+i$Z[this._datatype]+";",t};var l$19={czm_viewport:new n$$({size:1,datatype:de$x.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new n$$({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_model:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight2D:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_entireFrustum:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new n$$({size:1,datatype:de$x.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_cameraPositionWC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e._cameraPosition}}),czm_viewerPositionWC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return p$1d.getTranslation(e.inverseView,o$1b)}}),czm_viewerPositionECEF:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return p$1d.getTranslation(e.inverseView,o$1b),o$1p.add(o$1b,e._relativeOrigin,o$1b),o$1b}}),czm_frameNumber:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new n$$({size:1,datatype:de$x.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new n$$({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new n$$({size:1,datatype:de$x.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new n$$({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapSize:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.specularEnvironmentMapsDimensions}}),czm_specularEnvironmentMapsMaximumLOD:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new n$$({size:9,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_resolutionScale:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.resolutionScale}}),czm_fogDensity:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.fogDensity}}),czm_imagerySplitPosition:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.imagerySplitPosition}}),czm_globeSplitPosition:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.globeSplitPosition}}),czm_geometricToleranceOverMeter:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new n$$({size:1,datatype:de$x.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.gamma}}),czm_sunColor:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunColor}}),czm_globeDepthTextureDim:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.globeDepthTextureDim}}),czm_nonSelDepthTexture:new n$$({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.nonSelDepthTexture}}),czm_maskTexture:new n$$({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.maskTexture}}),czm_relativeOrigin:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e._relativeOrigin}}),czm_hdrEnvMap:new n$$({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.hdrEnvMap}}),czm_toneMappingExposure:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.toneMappingExposure}}),czm_encodedOriginCameraPositionMCHigh:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.encodedOriginCameraPositionMCHigh}}),czm_encodedOriginCameraPositionMCLow:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.encodedOriginCameraPositionMCLow}}),czm_eyeHeight:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.eyeHeight}})};function I$1m(e,t,i,n){switch(t.type){case e.FLOAT:return new d$1l(e,t,i,n);case e.FLOAT_VEC2:return new p$14(e,t,i,n);case e.FLOAT_VEC3:return new m$13(e,t,i,n);case e.FLOAT_VEC4:return new y$Y(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_2D_SHADOW:case e.SAMPLER_CUBE:return new f$10(e,t,i,n);case e.SAMPLER_2D_ARRAY:return new v$T(e,t,i,n);case e.INT:case e.BOOL:return new w$$(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new A$1f(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new x$1a(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new T$15(e,t,i,n);case e.FLOAT_MAT2:return new E$1c(e,t,i,n);case e.FLOAT_MAT3:return new U$16(e,t,i,n);case e.FLOAT_MAT4:return new M$17(e,t,i,n);default:throw new t$14("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function d$1l(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function p$14(e,t,i,n){this.name=i,this.value=void 0,this._value=new o$1o,this._gl=e,this._location=n}function m$13(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function y$Y(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function f$10(e,t,i,n){this.name=i,this.value=void 0,this._gl=e,this._location=n,this.textureUnitIndex=void 0}function v$T(e,t,i,n){this.name=i,this.value=void 0,this._gl=e,this._location=n,this.textureUnitIndex=void 0,this.lastBindTextureID=void 0}function w$$(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function A$1f(e,t,i,n){this.name=i,this.value=void 0,this._value=new o$1o,this._gl=e,this._location=n}function x$1a(e,t,i,n){this.name=i,this.value=void 0,this._value=new o$1p,this._gl=e,this._location=n}function T$15(e,t,i,n){this.name=i,this.value=void 0,this._value=new e$29,this._gl=e,this._location=n}d$1l.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))},p$14.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))},m$13.prototype.set=function(){var e=this.value;if(e$2b(e.red))e$1U.equals(e,this._value)||(this._value=e$1U.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue));else{if(!e$2b(e.x))throw new t$16('Invalid vec3 value for uniform "'+this.name+'".');o$1p.equals(e,this._value)||(this._value=o$1p.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z))}},y$Y.prototype.set=function(){var e=this.value;if(e$2b(e.red))e$1U.equals(e,this._value)||(this._value=e$1U.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha));else{if(!e$2b(e.x))throw new t$16('Invalid vec4 value for uniform "'+this.name+'".');e$29.equals(e,this._value)||(this._value=e$29.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w))}},f$10.prototype.set=function(){var e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);var t=this.value;e.bindTexture(t._target,t._texture)},f$10.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},v$T.prototype.set=function(){var e=this.value;if(!e$2b(e.id)||this.lastBindTextureID!==e.id){var t=this._gl;t.activeTexture(t.TEXTURE0+this.textureUnitIndex),t.bindTexture(e._target,e._texture),this.lastBindTextureID=e.id}},v$T.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},w$$.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))},A$1f.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))},x$1a.prototype.set=function(){var e=this.value;o$1p.equals(e,this._value)||(o$1p.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))},T$15.prototype.set=function(){var e=this.value;e$29.equals(e,this._value)||(e$29.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};var L$18=new Float32Array(4);function E$1c(e,t,i,n){this.name=i,this.value=void 0,this._value=new f$13,this._gl=e,this._location=n}E$1c.prototype.set=function(){if(!f$13.equalsArray(this.value,this._value,0)){f$13.clone(this.value,this._value);var e=f$13.toArray(this.value,L$18);this._gl.uniformMatrix2fv(this._location,!1,e)}};var V$_=new Float32Array(9);function U$16(e,t,i,n){this.name=i,this.value=void 0,this._value=new p$1e,this._gl=e,this._location=n}U$16.prototype.set=function(){if(!p$1e.equalsArray(this.value,this._value,0)){p$1e.clone(this.value,this._value);var e=p$1e.toArray(this.value,V$_);this._gl.uniformMatrix3fv(this._location,!1,e)}};var C$19=new Float32Array(16);function M$17(e,t,i,n){this.name=i,this.value=void 0,this._value=new p$1d,this._gl=e,this._location=n}function V$Z(e,t,i,n){switch(t.type){case e.FLOAT:return new A$1e(e,t,i,n);case e.FLOAT_VEC2:return new p$13(e,t,i,n);case e.FLOAT_VEC3:return new w$_(e,t,i,n);case e.FLOAT_VEC4:return new m$12(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new f$$(e,t,i,n);case e.INT:case e.BOOL:return new d$1k(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new F$17(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new T$14(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new U$15(e,t,i,n);case e.FLOAT_MAT2:return new x$19(e,t,i,n);case e.FLOAT_MAT3:return new E$1b(e,t,i,n);case e.FLOAT_MAT4:return new I$1l(e,t,i,n);default:throw new t$14("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function A$1e(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=e,this._location=n[0]}function p$13(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(2*r),this._gl=e,this._location=n[0]}function w$_(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(3*r),this._gl=e,this._location=n[0]}function m$12(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(4*r),this._gl=e,this._location=n[0]}function f$$(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=e,this._locations=n,this.textureUnitIndex=void 0}function d$1k(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r),this._gl=e,this._location=n[0]}function F$17(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(2*r),this._gl=e,this._location=n[0]}function T$14(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(3*r),this._gl=e,this._location=n[0]}function U$15(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(4*r),this._gl=e,this._location=n[0]}function x$19(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(4*r),this._gl=e,this._location=n[0]}function E$1b(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(9*r),this._gl=e,this._location=n[0]}function I$1l(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(16*r),this._gl=e,this._location=n[0]}M$17.prototype.set=function(){if(!p$1d.equalsArray(this.value,this._value,0)){p$1d.clone(this.value,this._value);var e=p$1d.toArray(this.value,C$19);this._gl.uniformMatrix4fv(this._location,!1,e)}},A$1e.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;r0&&console.log(l$18+"Vertex shader compile log: "+s)),f&&(e$2b(s=e.getShaderInfoLog(o))&&s.length>0&&console.log(l$18+"Fragment shader compile log: "+s)),f&&(e$2b(s=e.getProgramInfoLog(a))&&s.length>0&&console.log(l$18+"Shader program link log: "+s)),a}function F$16(e,t,i){for(var n={},r=0;r=0){if(!e$2b(h=i[l.slice(0,_)]))continue;(d=h._locations).length<=1&&(f=h.value,null!==(p=e.getUniformLocation(t,l))&&(d.push(p),f.push(e.getUniform(t,p))))}else{d=[];for(var m=0;m0&&(h=V$Z(e,s,l,d),i[l]=h,n.push(h),h._setSampler&&r.push(h))}}}return{uniformsByName:i,uniforms:n,samplerUniforms:r}}function w$Z(e,t){var i=[],n=[];for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=r,s=e._duplicateUniformNames[a];e$2b(s)&&(o.name=s,a=s);var l=l$19[a];e$2b(l)?i.push({uniform:o,automaticUniform:l}):n.push(o)}return{automaticUniforms:i,manualUniforms:n}}function k$$(e,t,i){e.useProgram(t);for(var n=0,r=i.length,o=0;o":return new _$Y(e,t);case"vec3":case"vec3":return new m$11(e,t);case"vec4":case"vec4":return new p$11(e,t);case"texture2D":return new f$_(e,t);case"texture2DArray":return new d$1j(e,t);case"int":case"bool":case"i32":return new y$X(e,t);case"int2":case"bool2":case"vec2":return new x$18(e,t);case"int3":case"bool3":case"vec3":return new w$Y(e,t);case"int4":case"bool4":case"vec4":return new U$14(e,t);case"mat2":case"mat2x2":return new A$1d(e,t);case"mat3":case"mat3x3":return new I$1k(e,t);case"mat4":case"mat4x4":return new q$17(e,t);default:throw new t$14('Unrecognized for uniform "'+t+'".')}}function c$14(e,t){this.name=t,this.value=void 0,this._value=0,this._effect=e}function _$Y(e,t){this.name=t,this.value=void 0,this._value=new o$1o,this._effect=e}function m$11(e,t){this.name=t,this.value=void 0,this._value=void 0,this._effect=e}function p$11(e,t){this.name=t,this.value=void 0,this._value=void 0,this._effect=e,this._valueType=-1}function f$_(e,t){this.name=t,this.value=void 0,this._effect=e,this.id=void 0}function d$1j(e,t){this.name=t,this.value=void 0,this._effect=e,this.lastBindTextureID=void 0}function y$X(e,t){this.name=t,this.value=void 0,this._value=0,this._effect=e}function x$18(e,t){this.name=t,this.value=void 0,this._value=new o$1o,this._effect=e}function w$Y(e,t){this.name=t,this.value=void 0,this._value=new o$1p,this._effect=e}function U$14(e,t){this.name=t,this.value=void 0,this._value=new e$29,this._effect=e}g$18.prototype._bind=function(){p$12(this),this._gl.useProgram(this._program)},g$18.prototype._setUniforms=function(e,t,i,n){var r,o;if(e$2b(e)){var a=this._manualUniforms;for(r=a.length,o=0;o0||0==e.length||!this._context.webgl2)return;const t=this.program,i=this._context._uniformBufferEngine;var n,r;for(n=0,r=e.length;n":return new m$10(e,t,n);case"vec3":case"vec3":return new g$17(e,t,n);case"vec4":case"vec4":return new w$X(e,t,n);case"texture2D":case"textureCube":return new v$S(e,t,n);case"int":case"bool":case"u32":case"i32":return new d$1i(e,t,n);case"int2":case"bool2":case"vec2":case"vec2":return new b$1e(e,t,n);case"int3":case"bool3":case"vec3":case"vec3":return new I$1j(e,t,n);case"int4":case"bool4":case"vec4":case"vec4":return new x$17(e,t,n);case"mat2":case"mat2x2":return new U$13(e,t,n);case"mat3":case"mat3x3":return new q$16(e,t,n);case"mat4":case"mat4x4":return new k$_(e,t,n);default:throw new t$14('Unrecognized for uniform "'+t+'".')}}function A$1c(e,t,i){this.name=t,this._effect=e}function m$10(e,t,i){this.name=t,this._value=new Float32Array(2*i),this._effect=e}function g$17(e,t,i){this.name=t,this._value=new Float32Array(3*i),this._effect=e}function w$X(e,t,i){this.name=t,this._value=new Float32Array(4*i),this._effect=e}function v$S(e,t,i){this.name=t,this.value=new Array(i),this._effect=e}function d$1i(e,t,i){this.name=t,this._value=new Int32Array(i),this._effect=e}function b$1e(e,t,i){this.name=t,this._value=new Int32Array(2*i),this._effect=e}function I$1j(e,t,i){this.name=t,this._value=new Int32Array(3*i),this._effect=e}function x$17(e,t,i){this.name=t,this._value=new Int32Array(4*i),this._effect=e}function U$13(e,t,i){this.name=t,this._value=new Float32Array(9*i),this._effect=e}function q$16(e,t,i){this.name=t,this._value=new Float32Array(9*i),this._effect=e}function k$_(e,t,i){this.name=t,this._value=new Float32Array(16*i),this._effect=e}q$17.prototype.set=function(){p$1d.equalsArray(this.value,this._value,0)||(p$1d.clone(this.value,this._value),p$1d.toArray(this.value,F$15),Matrix.FromArrayToRef(F$15,0,T$12),this._effect.setMatrix(this.name,T$12))},A$1c.prototype.set=function(){this._effect.setArray(this.name,this.value)},m$10.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o=0;_--)n.splice(g,0,"#endif //"+x[_])}var y="#version 300 es",$=!1;for(r=0;r=0})):i[d]=r.slice())}}return i}function R$_(e,t){m$$(new RegExp("#extension\\s+GL_"+e+"\\s+:\\s+[a-zA-Z0-9]+\\s*$","g"),"",t)}Object.defineProperties(f$Z.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}}}),f$Z.prototype.isDirty=function(e,t){if(!this._init)return!0;var i=-1;if(e$2b(t.drawContext.buffers.LeftOver)&&(i=t.drawContext.buffers.LeftOver.uniqueId,t.effect._pipelineContext.uniformBuffer.getBuffer().uniqueId!=i))return!0;var n,r=e.length,o=[];for(n=0;n abs(x), czm_piOverTwo - t, t);\n t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\n t = czm_branchFreeTernary(y < 0.0, -t, t);\n return t;\n}\n",czm_fog$1="/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)\n{\n float scalar = distanceToCamera * czm_fogDensity;\n float fog = 1.0 - exp(-(scalar * scalar));\n return mix(color, fogColor, fog);\n}\n\n/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n * @param {float} fogModifierConstant A constant to modify the appearance of fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)\n{\n float scalar = distanceToCamera * czm_fogDensity;\n float fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\n return mix(color, fogColor, fog);\n}\n",czm_gammaCorrect$1="/**\n * Converts a color from RGB space to linear space.\n *\n * @name czm_gammaCorrect\n * @glslFunction\n *\n * @param {vec3} color The color in RGB space.\n * @returns {vec3} The color in linear space.\n */\nvec3 czm_gammaCorrect(vec3 color) {\n#ifdef HDR\n color = pow(color, vec3(czm_gamma));\n#endif\n return color;\n}\n\nvec4 czm_gammaCorrect(vec4 color) {\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3(czm_gamma));\n#endif\n return color;\n}\n",czm_geodeticSurfaceNormal$1="/**\n * DOC_TBA\n *\n * @name czm_geodeticSurfaceNormal\n * @glslFunction\n *\n * @param {vec3} positionOnEllipsoid DOC_TBA\n * @param {vec3} ellipsoidCenter DOC_TBA\n * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA\n * \n * @returns {vec3} DOC_TBA.\n */\nvec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)\n{\n return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial$1="/**\n * An czm_material with default values. Every material's czm_getMaterial\n * should use this default material as a base for the material it returns.\n * The default normal value is given by materialInput.normalEC.\n *\n * @name czm_getDefaultMaterial\n * @glslFunction\n *\n * @param {czm_materialInput} input The input used to construct the default material.\n *\n * @returns {czm_material} The default material.\n *\n * @see czm_materialInput\n * @see czm_material\n * @see czm_getMaterial\n */\nczm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\n czm_material material;\n material.diffuse = vec3(0.0);\n material.specular = 0.0;\n material.shininess = 1.0;\n material.normal = materialInput.normalEC;\n material.emission = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n",czm_getEmissiveTextureColor$1="uniform float uMaxCategoryOrHypCeil;\nuniform float uMinCategoryOrHypFloor;\nuniform sampler2D uEmissionTexAtlas;\nuniform vec4 uEmissionTexAtlasTilingAndOffset[EMISSION_TEXTURE_COUNT];\nuniform vec4 uEmissionTexAtlasRects[EMISSION_TEXTURE_COUNT];\nuniform float uLayerCornerLength;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 czm_getEmissiveTextureColor(float w)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n for(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n return texColor;\n}\nvec3 czm_getEmissiveTextureColor(float w, vec2 texCoord)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n for(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n return texColor;\n}",czm_getHorizontalColor$1="uniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 czm_getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}",czm_getHypsometricColor$1="uniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypsometricVisible;\nuniform float uHypOpacity;\nuniform float uHypContourInterval;\nuniform vec4 uHypLineColor;\nuniform float uHypContourFillMode;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypHasAnalysisRegion;\nvarying vec2 vecHypTexCoord;\nuniform float uMixColorType;\nuniform vec4 uNoValueColor;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uVolumeType;\n#endif\n\n#ifdef Volume2\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uFilterMode;\n#endif\n\nfloat computeMixCon(float fValue)\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n\t if(fValue < 0.5)\n {\n distanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n }\n else\n {\n float t = floor(fValue / uHypContourInterval);\n distanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n }\n\t}\n\telse\n\t{\n\t distanceToContour = abs(fValue - uHypMaxVisibleValue);\n\t}\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float fValue)\n{\n\t//float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat threshold = abs(uHypCeil - uHypFloor);\n\tfloat contourRate = (fValue - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tfloat count = floor(finalCoord * 16.0);\n\tfloat y = (count*2.0 + 1.0)/32.0;\n\tfloat x = fract(finalCoord*16.0);\n\tif(y > 1.0)\n\t{\n\t x = 1.0;\n\t}\n\tvec2 contourCoord = vec2(x, y);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n#ifdef Volume2\n\nvec4 czm_getContourMapColor(vec4 oriColor, vec4 volColor)\n{\n if(uFilterMode > 0.5)\n {\n vec4 finalColor = volColor * oriColor;\n\n if(uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n\n\tfloat noValue = volColor.a;\n\tfloat texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\n\n\tfloat fValue;\n\tif(noValue > 0.5)\n\t{\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n vec4 finalColor = mixColor * oriColor;\n#ifdef PT_CLOUD\n\tfinalColor = mixColor;\n#endif\n if(uMixColorType > 0.5)\n {\n finalColor = mixColor;\n }\n return finalColor;\n}\n\n#else\n\nvec4 czm_getContourMapColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n#ifdef Volume\n\tvec3 aRatioT = vecRotioCoord;\n\tif((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n\t{\n\t if(uVolumeType > 0.5)\n\t {\n\t\t\tvec4 volumeColor = czm_getVolumeValue(aRatioT);\n\t\t\tif(uMixColorType > 0.5)\n\t\t\t{\n\t\t\t\tvolumeColor = volumeColor * oriColor;\n\t\t\t}\n\t\t\treturn volumeColor;\n\t }\n\t float noValue;\n\t float texTest = czm_getVolumeValue(aRatioT, noValue);\n\t if(noValue > 0.5)\n\t {\n\t fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n\t }\n\t else\n\t {\n\t fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n\t }\n\t}\n\telse\n\t{\n\t fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n\t}\n#endif\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n vec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n\tfinalColor = mixColor;\n#endif\n#ifdef Volume\n if(uMixColorType > 0.5)\n {\n finalColor = mixColor;\n }\n#endif\n return finalColor;\n}\n\n#endif\n\n#ifdef Volume2\nvec4 czm_getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\n\tif(uHypHasAnalysisRegion > 0.1)\n {\n\t\tvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n\t\tif(hypColor.r < 0.1)\n\t\t{\n\t\t\treturn oriColor;\n\t\t}\n\t}\n return czm_getContourMapColor(oriColor, volColor);\n}\n#else\nvec4 czm_getHypsometricColor(vec4 oriColor, float wValue)\n{\n float fValue = wValue;\n\tif(uHypHasAnalysisRegion > 0.1)\n {\n\t\tvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n\t\tif(hypColor.r < 0.1)\n\t\t{\n\t\t\treturn oriColor;\n\t\t}\n\t}\n return czm_getContourMapColor(oriColor, fValue);\n}\n\nvec4 czm_getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return czm_getContourMapColor(oriColor, wValue);\n}\n\n#endif",czm_getLambertDiffuse$1="/**\n * Calculates the intensity of diffusely reflected light.\n *\n * @name czm_getLambertDiffuse\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n *\n * @returns {float} The intensity of the diffuse reflection.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)\n{\n return max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getSpecular$1="/**\n * Calculates the specular intensity of reflected light.\n *\n * @name czm_getSpecular\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n *\n * @returns {float} The intensity of the specular highlight.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\n vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\n float specular = max(dot(toReflectedLight, toEyeEC), 0.0);\n\n // pow has undefined behavior if both parameters <= 0.\n // Prevent this by making sure shininess is at least czm_epsilon2.\n return pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getTexColorForS3M="void CalculateMipLevel(in vec2 inTexCoord, in float vecTile, in float fMaxMip, inout float mipLevel)\n{\n\tvec2 dx = dFdx(inTexCoord * vecTile);\n\tvec2 dy = dFdy(inTexCoord * vecTile);\n\tfloat dotX = dot(dx, dx);\n\tfloat dotY = dot(dy, dy);\n\tfloat dMax = max(dotX, dotY);\n\tfloat dMin = min(dotX, dotY);\n\tfloat offset = (dMax - dMin) / (dMax + dMin);\n\toffset = clamp(offset, 0.0, 1.0);\n\tfloat d = dMax * (1.0 - offset) + dMin * offset;\n\tmipLevel = 0.5 * log2(d);\n\tmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\n\nvoid CalculateMipLevel(in vec2 inTexCoord, in vec2 vecTile, in float fMaxMip, inout float mipLevel)\n{\n\tvec2 dx = dFdx(inTexCoord * vecTile.x);\n\tvec2 dy = dFdy(inTexCoord * vecTile.y);\n\tfloat dotX = dot(dx, dx);\n\tfloat dotY = dot(dy, dy);\n\tfloat dMax = max(dotX, dotY);\n\tfloat dMin = min(dotX, dotY);\n\tfloat offset = (dMax - dMin) / (dMax + dMin);\n\toffset = clamp(offset, 0.0, 1.0);\n\tfloat d = dMax * (1.0 - offset) + dMin * offset;\n\tmipLevel = 0.5 * log2(d);\n\tmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\n\nvoid CalculateTexCoord(in vec3 inTexCoord, in float scale, in float XTran, in float YTran, in float fTile, in float mipLevel, inout vec2 outTexCoord)\n{\n if(inTexCoord.z < -9000.0)\n {\n outTexCoord = inTexCoord.xy;\n }\n else\n {\n\t vec2 fTexCoord = fract(inTexCoord.xy);\n\t float offset = 1.0 * pow(2.0, mipLevel) / fTile;\n\t fTexCoord = clamp(fTexCoord, offset, 1.0 - offset);\n\t outTexCoord.x = (fTexCoord.x + XTran) * scale;\n\t outTexCoord.y = (fTexCoord.y + YTran) * scale;\n\t}\n}\n\n\nvec4 czm_getTexColorForS3M(sampler2D curTexture, vec3 oriTexCoord, float texTileWidth, float fMaxMipLev, float fTexCoordScale, vec2 vecTexCoordTranslate,float isRGBA, vec4 texUVoffset, out vec2 outTexCoord)\n{\n\tvec4 color = vec4(1.0);\n float mipLevel = 0.0;\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n CalculateMipLevel(oriTexCoord.xy, texTileWidth, fMaxMipLev, mipLevel);\n#endif\n vec2 realTexCoord;\n CalculateTexCoord(oriTexCoord, fTexCoordScale, vecTexCoordTranslate.x, vecTexCoordTranslate.y, texTileWidth, mipLevel, realTexCoord);\n\tif(isRGBA > 0.5)\n\t{\n\t vec2 rgbTexCoord;\n\t\trgbTexCoord.x = (realTexCoord.x + vecTexCoordTranslate.x * fTexCoordScale) * 0.5;\n\t\trgbTexCoord.y = (realTexCoord.y + vecTexCoordTranslate.y * fTexCoordScale) * 0.5;\n\t\trgbTexCoord.xy += texUVoffset.xy;\n color = texture2D(curTexture, rgbTexCoord.xy, -10.0);\n\t\tvec2 vecAlphaTexCoord;\n\t\tvecAlphaTexCoord.x = rgbTexCoord.x;\n\t\tvecAlphaTexCoord.y = rgbTexCoord.y + fTexCoordScale * 0.5;\n\t\tvecAlphaTexCoord.xy += texUVoffset.xy;\n\t color.a = texture2D(curTexture, vecAlphaTexCoord.xy, -10.0).r;\n\t}\n\telse\n\t{\n\t realTexCoord = realTexCoord * texUVoffset.zw + texUVoffset.xy;\n\t if(oriTexCoord.z < -9000.0)\n {\n color = texture2D(curTexture, realTexCoord.xy);\n }\n else\n {\n #ifdef GL_EXT_shader_texture_lod\n color = texture2DLodEXT(curTexture, realTexCoord.xy, mipLevel);\n #else\n #ifdef WEBGL2\n color = textureLod(curTexture, realTexCoord.xy, mipLevel);\n #else\n color = texture2D(curTexture, realTexCoord.xy, mipLevel);\n #endif\n #endif\n }\n #ifdef RGBTOBGR\n color = color.bgra;\n #endif\n\t}\n\toutTexCoord = realTexCoord;\n\treturn color;\n}\n\nvec4 czm_getTexColorForS3M(sampler2D texture, vec2 uv, vec2 texDim, vec2 texTran, vec2 texScale, float maxMipLevel, out vec2 outTexCoord)\n{\n if(maxMipLevel < 0.0)\n {\n return vec4(1.0);\n }\n\tvec4 colorCeil = vec4(1.0);\n float mipLevel = 0.0;\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n CalculateMipLevel(uv, texDim, maxMipLevel, mipLevel);\n#endif\n\tfloat ceilMipLevel = ceil(mipLevel);\n\tvec2 translate = vec2(texTran.x, texTran.y);\n\tfloat temp;\n\tif(ceilMipLevel > 0.0)\n\t{\n\t\ttranslate.x = texTran.x + texScale.x;\n\t\ttemp = pow(2.0, ceilMipLevel - 1.0);\n\t\ttranslate.y = texTran.y + texScale.y * (temp - 1.0) / temp;\n\t}\n float scale = 1.0 / pow(2.0, ceilMipLevel);\n\tvec2 texcoord = fract(uv);\n\tfloat offsetX = pow(2.0, ceilMipLevel) / texDim.x;\n\tfloat offsetY = pow(2.0, ceilMipLevel) / texDim.y;\n\ttexcoord.x = clamp(texcoord.x, 0.0 + offsetX, 1.0 - offsetX);\n\ttexcoord.y = clamp(texcoord.y, 0.0 + offsetY, 1.0 - offsetY);\n\ttexcoord.x = texcoord.x * texScale.x * scale + translate.x;\n\ttexcoord.y = texcoord.y * texScale.y * scale + translate.y;\n\t#ifdef GL_EXT_shader_texture_lod\n colorCeil = texture2DLodEXT(texture, texcoord.xy, 0.0);\n #else\n #ifdef WEBGL2\n colorCeil = textureLod(texture, texcoord.xy, 0.0);\n #else\n colorCeil = texture2D(texture, texcoord.xy, -10.0);\n #endif\n #endif\n\tvec4 colorFloor = vec4(1.0);\n\tfloat floorMipLevel = floor(mipLevel);\n\ttranslate = vec2(texTran.x, texTran.y);\n\tif(floorMipLevel > 0.0)\n\t{\n\t translate.x = texTran.x + texScale.x;\n\t temp = pow(2.0, floorMipLevel - 1.0);\n\t translate.y = texTran.y + texScale.y * (temp - 1.0) / temp;\n\t}\n\tscale = 1.0 / pow(2.0, floorMipLevel);\n\ttexcoord = fract(uv);\n\toffsetX = pow(2.0, floorMipLevel) / texDim.x;\n\toffsetY = pow(2.0, floorMipLevel) / texDim.y;\n\ttexcoord.x = clamp(texcoord.x, 0.0 + offsetX, 1.0 - offsetX);\n\ttexcoord.y = clamp(texcoord.y, 0.0 + offsetY, 1.0 - offsetY);\n\ttexcoord.x = texcoord.x * texScale.x * scale + translate.x;\n\ttexcoord.y = texcoord.y * texScale.y * scale + translate.y;\n\t#ifdef GL_EXT_shader_texture_lod\n colorFloor = texture2DLodEXT(texture, texcoord.xy, 0.0);\n #else\n #ifdef WEBGL2\n colorFloor = textureLod(texture, texcoord.xy, 0.0);\n #else\n colorFloor = texture2D(texture, texcoord.xy, -10.0);\n #endif\n #endif\n\tvec4 color = colorCeil * 0.5 + colorFloor * 0.5;\n\treturn color;\n}",czm_getTextureMatrixFromZValue="const float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT4 = 1.0 / 16.0;\nconst float SHIFT_LEFT4 = 16.0;\n\nvoid czm_getTextureMatrixFromZValue(in float nZ, inout float XTran, inout float YTran, inout float scale, inout float isRGBA)\n{\n if(nZ <= 0.0)\n {\n return;\n }\n float nDel8 = floor(nZ * SHIFT_RIGHT8);\n float nDel16 = floor(nDel8 * SHIFT_RIGHT8);\n float nDel20 = floor(nDel16 * SHIFT_RIGHT4);\n isRGBA = floor(nDel20);\n YTran = nZ - nDel8 * SHIFT_LEFT8;\n XTran = nDel8 - nDel16 * SHIFT_LEFT8;\n float nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\n scale = 1.0 / pow(2.0, nLevel);\n}",czm_getVolumeValue$1="uniform sampler2D uVolumeTexture;\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uTimeRatio;\n#endif\n\n#ifdef Volume\nuniform float width;\nuniform float height;\nuniform float depth;\nuniform float sideBlockCount;\nuniform float blockLength;\nuniform float texLength;\nuniform float uFilterMode;\n#endif\n\nfloat czm_unpackVolume(vec3 packedDepth)\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\n#ifdef Volume\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\n float yOffset = floor((fLevel+0.25/sideBlockCount) / sideBlockCount);\n float xOffset = fLevel - yOffset * sideBlockCount;\n float texCoordV = (texCoord.y * height + yOffset * blockLength) / texLength;\n float texCoordU = (texCoord.x * width + xOffset * blockLength) / texLength;\n return vec2(texCoordU, texCoordV);\n}\n\n#define inline\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\n vec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\n vec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\n float fValue1 = clamp(czm_unpackVolume(volumeValue1.xyz),0.0,1.0);\n float fValue2 = clamp(czm_unpackVolume(volumeValue2.xyz),0.0,1.0);\n if(uFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n noValue = mix(volumeValue1.a, volumeValue2.a, ratio);\n if(volumeValue1.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(volumeValue2.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfloat czm_getVolumeValue(vec3 texCoord, out float noValue)\n{\n float fLevel = (depth - 1.0) * texCoord.z;\n float bottomLevel= floor(fLevel);\n float topLevel = bottomLevel + 1.0;\n float ratio = topLevel - fLevel;\n vec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n vec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n float fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n fResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\n return fResult;\n}\n\nvec4 czm_getVolumeValue(vec3 texCoord)\n{\n\tfloat fLevel = (depth - 1.0) * texCoord.z;\n\tfloat bottomLevel= floor(fLevel);\n\tfloat topLevel = bottomLevel + 1.0;\n\tfloat ratio = topLevel - fLevel;\n\tfloat yOffset1 = floor((topLevel+0.25/sideBlockCount) / sideBlockCount);\n\tfloat xOffset1 = topLevel - yOffset1 * sideBlockCount;\n\tfloat texCoordV1 = (texCoord.y * height + yOffset1 * blockLength)/texLength;\n\tfloat texCoordU1 = (texCoord.x * width + xOffset1 * blockLength)/texLength;\n\tvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\n\tfloat yOffset2 = floor((bottomLevel+0.25/sideBlockCount) / sideBlockCount);\n\tfloat xOffset2 = bottomLevel - yOffset2 * sideBlockCount;\n\tfloat texCoordV2 = (texCoord.y * height + yOffset2 * blockLength)/texLength;\n\tfloat texCoordU2 = (texCoord.x * width + xOffset2 * blockLength)/texLength;\n\tvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\n\n\tif(uFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif",czm_getVolumeValueMultiResolution="uniform sampler2D uVolumeTexture1;\nuniform sampler2D uVolumeTexture2;\nuniform sampler2D uVolumeTexture3;\n\n\nuniform mat4 uMultiResolutionPara1;\n/*\n{uMultiResolutionTranslation1\n0.0, 0.0, 0.0, 0.0,\nwidth1,height1,sideBlockCount1,blockLength1\ntexLength1, 0.0, 0.0, 0.0};\n*/\nuniform mat4 uMultiResolutionPara2;\nuniform mat4 uMultiResolutionPara3;\n\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture1;\nuniform sampler2D uNextVolumeTexture2;\nuniform sampler2D uNextVolumeTexture3;\n#endif\n\n#ifdef Volume\n\nvec2 computeVolumeTextureCoord(vec2 texCoord, float fLevel, float texWidth, float texHeight, float texSideBlockCount, float texBlockLength, float texTotalLength)\n{\n float yOffset = floor((fLevel+0.25/texSideBlockCount) / texSideBlockCount);\n float xOffset = fLevel - yOffset * texSideBlockCount;\n float texCoordV = (texCoord.y * texHeight + yOffset * texBlockLength) / texTotalLength;\n float texCoordU = (texCoord.x * texWidth + xOffset * texBlockLength) / texTotalLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfloat czm_getVolumeValueMultiResolution(vec3 texCoord, out float noValue)\n{\n float fLevel = (depth - 1.0) * texCoord.z;\n float bottomLevel= floor(fLevel);\n float topLevel = bottomLevel + 1.0;\n float ratio = topLevel - fLevel;\n\n\n vec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n vec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n\n float fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n fResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\n\n\n float width = uMultiResolutionPara1[2].x;\n float height = uMultiResolutionPara1[2].y;\n float sideBlockCount = uMultiResolutionPara1[2].z;\n float blockLength = uMultiResolutionPara1[2].w;\n float texLength = uMultiResolutionPara1[3].x;\n vec4 uMultiResolutionTranslation = uMultiResolutionPara1[0];\n\n vec2 texCoord1 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\n vec2 topTexCoord1 = computeVolumeTextureCoord(texCoord1, topLevel, width, height, sideBlockCount, blockLength, texLength);\n vec2 bottomTexCoord1 = computeVolumeTextureCoord(texCoord1, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\n float alpha1 = 5.0 * clamp( max(abs(texCoord1.x - 0.5), abs(texCoord1.y - 0.5)) - 0.3,0.0,0.2);\n\n float fResult1 = computeVolumeValue(uVolumeTexture1, topTexCoord1, bottomTexCoord1, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult1 = computeVolumeValue(uNextVolumeTexture1, topTexCoord1, bottomTexCoord1, ratio, noValue);\n fResult1 = mix(fResult1, fNextResult1, uTimeRatio);\n#endif\n\n\n width = uMultiResolutionPara2[2].x;\n height = uMultiResolutionPara2[2].y;\n sideBlockCount = uMultiResolutionPara2[2].z;\n blockLength = uMultiResolutionPara2[2].w;\n texLength = uMultiResolutionPara2[3].x;\n uMultiResolutionTranslation = uMultiResolutionPara2[0];\n\n vec2 texCoord2 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\n vec2 topTexCoord2 = computeVolumeTextureCoord(texCoord2, topLevel, width, height, sideBlockCount, blockLength, texLength);\n vec2 bottomTexCoord2 = computeVolumeTextureCoord(texCoord2, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\n float alpha2 = 5.0 * clamp( max(abs(texCoord2.x - 0.5), abs(texCoord2.y - 0.5)) - 0.3,0.0,0.2);\n\n float fResult2 = computeVolumeValue(uVolumeTexture2, topTexCoord2, bottomTexCoord2, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult2 = computeVolumeValue(uNextVolumeTexture2, topTexCoord2, bottomTexCoord2, ratio, noValue);\n fResult2 = mix(fResult2, fNextResult2, uTimeRatio);\n#endif\n\n\n width = uMultiResolutionPara3[2].x;\n height = uMultiResolutionPara3[2].y;\n sideBlockCount = uMultiResolutionPara3[2].z;\n blockLength = uMultiResolutionPara3[2].w;\n texLength = uMultiResolutionPara3[3].x;\n uMultiResolutionTranslation = uMultiResolutionPara3[0];\n\n vec2 texCoord3 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\n vec2 topTexCoord3 = computeVolumeTextureCoord(texCoord3, topLevel, width, height, sideBlockCount, blockLength, texLength);\n vec2 bottomTexCoord3 = computeVolumeTextureCoord(texCoord3, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\n float alpha3 = 5.0 * clamp( max(abs(texCoord3.x - 0.5), abs(texCoord3.y - 0.5)) - 0.3,0.0,0.2);\n\n float fResult3 = computeVolumeValue(uVolumeTexture3, topTexCoord3, bottomTexCoord3, ratio, noValue);\n\n#ifdef TIME_ORDER\n float fNextResult3 = computeVolumeValue(uNextVolumeTexture3, topTexCoord3, bottomTexCoord3, ratio, noValue);\n fResult3 = mix(fResult3, fNextResult3, uTimeRatio);\n#endif\n\n\n //return mix(fResult2, mix(fResult1, fResult, alpha1), alpha2);\n return mix(fResult3, mix(fResult2, mix(fResult1, fResult, alpha1), alpha2), alpha3);\n}\n\n#endif",czm_getWaterNoise$1="/**\n * @private\n */\nvec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n\n // time dependent sampling directions\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n\n // rotate sampling direction by specified angle\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (texture2D(normalMap, uv0)) +\n (texture2D(normalMap, uv1)) +\n (texture2D(normalMap, uv2)) +\n (texture2D(normalMap, uv3));\n\n // average and scale to between -1 and 1\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_getWgs84EllipsoidEC$1="/**\n * Returns the WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @name czm_getWgs84EllipsoidEC\n * @glslFunction\n *\n * @returns {czm_ellipsoid} The WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @see Ellipsoid.WGS84\n *\n * @example\n * czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n */\nczm_ellipsoid czm_getWgs84EllipsoidEC()\n{\n vec3 radii = vec3(6378137.0, 6378137.0, 6378137.0);\n vec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n vec3 inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(czm_view[3].xyz, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n",czm_HSBToRGB$1="/**\n * Converts an HSB color (hue, saturation, brightness) to RGB\n * HSB <-> RGB conversion with minimal branching:\n *\n * @name czm_HSBToRGB\n * @glslFunction\n * \n * @param {vec3} hsb The color in HSB.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsb = czm_RGBToHSB(rgb);\n * hsb.z *= 0.1;\n * rgb = czm_HSBToRGB(hsb);\n */\n\nconst vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n\nvec3 czm_HSBToRGB(vec3 hsb)\n{\n vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\n return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);\n}\n",czm_HSLToRGB$1="/**\n * Converts an HSL color (hue, saturation, lightness) to RGB\n * HSL <-> RGB conversion: \n *\n * @name czm_HSLToRGB\n * @glslFunction\n * \n * @param {vec3} rgb The color in HSL.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n\nvec3 hueToRGB(float hue)\n{\n float r = abs(hue * 6.0 - 3.0) - 1.0;\n float g = 2.0 - abs(hue * 6.0 - 2.0);\n float b = 2.0 - abs(hue * 6.0 - 4.0);\n return clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 czm_HSLToRGB(vec3 hsl)\n{\n vec3 rgb = hueToRGB(hsl.x);\n float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\n return (rgb - 0.5) * c + hsl.z;\n}\n",czm_hue$1="/**\n * Adjusts the hue of a color.\n * \n * @name czm_hue\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the hue of the color in radians.\n *\n * @returns {float} The color with the hue adjusted.\n *\n * @example\n * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)\n */\nvec3 czm_hue(vec3 rgb, float adjustment)\n{\n const mat3 toYIQ = mat3(0.299, 0.587, 0.114,\n 0.595716, -0.274453, -0.321263,\n 0.211456, -0.522591, 0.311135);\n const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,\n 1.0, -0.2721, -0.6474,\n 1.0, -1.107, 1.7046);\n \n vec3 yiq = toYIQ * rgb;\n float hue = atan(yiq.z, yiq.y) + adjustment;\n float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\n \n vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\n return toRGB * color;\n}\n",czm_inverseGamma$1="/**\n * Converts a color in linear space to RGB space.\n *\n * @name czm_inverseGamma\n * @glslFunction\n *\n * @param {vec3} color The color in linear space.\n * @returns {vec3} The color in RGB space.\n */\nvec3 czm_inverseGamma(vec3 color) {\n return pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_inverseMatrix$1="mat3 czm_inverseMatrix(mat3 m)\n{\n float Determinant =\n m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\n - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\n + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\n\n mat3 Inverse;\n Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);\n Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);\n Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);\n Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);\n Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);\n Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);\n Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\n Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);\n Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);\n Inverse /= Determinant;\n\n return Inverse;\n}\n\nmat4 czm_inverseMatrix(mat4 m)\n{\n float Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\n float Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\n float Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\n\n float Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\n float Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\n float Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\n\n float Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\n float Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\n float Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\n\n float Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\n float Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\n float Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\n\n float Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\n float Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\n float Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\n\n float Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\n float Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\n float Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\n\n const vec4 SignA = vec4( 1.0, -1.0, 1.0, -1.0);\n const vec4 SignB = vec4(-1.0, 1.0, -1.0, 1.0);\n\n vec4 Fac0 = vec4(Coef00, Coef00, Coef02, Coef03);\n vec4 Fac1 = vec4(Coef04, Coef04, Coef06, Coef07);\n vec4 Fac2 = vec4(Coef08, Coef08, Coef10, Coef11);\n vec4 Fac3 = vec4(Coef12, Coef12, Coef14, Coef15);\n vec4 Fac4 = vec4(Coef16, Coef16, Coef18, Coef19);\n vec4 Fac5 = vec4(Coef20, Coef20, Coef22, Coef23);\n\n vec4 Vec0 = vec4(m[1][0], m[0][0], m[0][0], m[0][0]);\n vec4 Vec1 = vec4(m[1][1], m[0][1], m[0][1], m[0][1]);\n vec4 Vec2 = vec4(m[1][2], m[0][2], m[0][2], m[0][2]);\n vec4 Vec3 = vec4(m[1][3], m[0][3], m[0][3], m[0][3]);\n\n vec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);\n vec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);\n vec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);\n vec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);\n\n mat4 Inverse = mat4(Inv0, Inv1, Inv2, Inv3);\n\n vec4 Row0 = vec4(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);\n\n float Determinant = dot(m[0], Row0);\n\n Inverse /= Determinant;\n\n return Inverse;\n}\n",czm_isEmpty$1="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isEmpty\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} true if the time interval is empty; otherwise, false.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isEmpty(czm_raySegment interval)\n{\n return (interval.stop < 0.0);\n}\n",czm_isFull$1="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isFull\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} true if the time interval is empty; otherwise, false.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isFull(czm_raySegment interval)\n{\n return (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction$1="/**\n * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.\n *\n * @name czm_latitudeToWebMercatorFraction\n * @glslFunction\n *\n * @param {float} latitude The geodetic latitude, in radians.\n * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.\n * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.\n *\n * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern\n * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return\n * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.\n */ \nfloat czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)\n{\n float sinLatitude = sin(latitude);\n float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\n \n return (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_lineDistance$1="/**\n * Computes distance from an point in 2D to a line in 2D.\n *\n * @name czm_lineDistance\n * @glslFunction\n *\n * param {vec2} point1 A point along the line.\n * param {vec2} point2 A point along the line.\n * param {vec2} point A point that may or may not be on the line.\n * returns {float} The distance from the point to the line.\n */\nfloat czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\n return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_luminance$1="/**\n * Computes the luminance of a color. \n *\n * @name czm_luminance\n * @glslFunction\n *\n * @param {vec3} rgb The color.\n * \n * @returns {float} The luminance.\n *\n * @example\n * float light = czm_luminance(vec3(0.0)); // 0.0\n * float dark = czm_luminance(vec3(1.0)); // ~1.0 \n */\nfloat czm_luminance(vec3 rgb)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n return dot(rgb, W);\n}\n",czm_metersPerPixel$1="/**\n * Computes the size of a pixel in meters at a distance from the eye.\n *

\n * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.\n *

\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n * @param {float} pixelRatio The scaling factor from pixel space to coordinate space\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfloat czm_metersPerPixel(vec4 positionEC, float pixelRatio)\n{\n float width = czm_viewport.z;\n float height = czm_viewport.w;\n float pixelWidth;\n float pixelHeight;\n\n float top = czm_frustumPlanes.x;\n float bottom = czm_frustumPlanes.y;\n float left = czm_frustumPlanes.z;\n float right = czm_frustumPlanes.w;\n\n if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n {\n float frustumWidth = right - left;\n float frustumHeight = top - bottom;\n pixelWidth = frustumWidth / width;\n pixelHeight = frustumHeight / height;\n }\n else\n {\n float distanceToPixel = -positionEC.z;\n float inverseNear = 1.0 / czm_currentFrustum.x;\n float tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n }\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}\n\n/**\n * Computes the size of a pixel in meters at a distance from the eye.\n *

\n * Use this version when scaling by pixel ratio.\n *

\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfloat czm_metersPerPixel(vec4 positionEC)\n{\n return czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates$1="/**\n * Transforms a position from model to window coordinates. The transformation\n * from model to clip coordinates is done using {@link czm_modelViewProjection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of near = 0 and far = 1.\n *

\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *

\n * This function should not be confused with {@link czm_viewportOrthographic},\n * which is an orthographic projection matrix that transforms from window \n * coordinates to clip coordinates.\n *\n * @name czm_modelToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in model coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_eyeToWindowCoordinates\n * @see czm_modelViewProjection\n * @see czm_viewportTransformation\n * @see czm_viewportOrthographic\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);\n */\nvec4 czm_modelToWindowCoordinates(vec4 position)\n{\n vec4 q = czm_modelViewProjection * position; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n",czm_multiplyWithColorBalance$1="/**\n * DOC_TBA\n *\n * @name czm_multiplyWithColorBalance\n * @glslFunction\n */\nvec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n \n vec3 target = left * right;\n float leftLuminance = dot(left, W);\n float rightLuminance = dot(right, W);\n float targetLuminance = dot(target, W);\n \n return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar$1="/**\n * Computes a value that scales with distance. The scaling is clamped at the near and\n * far distances, and does not extrapolate. This function works with the\n * {@link NearFarScalar} JavaScript class.\n *\n * @name czm_nearFarScalar\n * @glslFunction\n *\n * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).\n * @param {float} cameraDistSq The square of the current distance from the camera.\n *\n * @returns {float} The value at this distance.\n */\nfloat czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\n float valueAtMin = nearFarScalar.y;\n float valueAtMax = nearFarScalar.w;\n float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\n float farDistanceSq = nearFarScalar.z * nearFarScalar.z;\n\n float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\n\n t = pow(clamp(t, 0.0, 1.0), 0.2);\n\n return mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode$1=" /**\n * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: \n *\n * @name czm_octDecode\n * @param {vec2} encoded The oct-encoded, unit-length vector\n * @param {float} range The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(vec2 encoded, float range)\n {\n if (encoded.x == 0.0 && encoded.y == 0.0) {\n return vec3(0.0, 0.0, 0.0);\n }\n\n encoded = encoded / range * 2.0 - 1.0;\n vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\n if (v.z < 0.0)\n {\n v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);\n }\n\n return normalize(v);\n }\n\n/**\n * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: \n *\n * @name czm_octDecode\n * @param {vec2} encoded The oct-encoded, unit-length vector\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(vec2 encoded)\n {\n return czm_octDecode(encoded, 255.0);\n }\n\n /**\n * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: \n *\n * @name czm_octDecode\n * @param {float} encoded The oct-encoded, unit-length vector\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(float encoded)\n {\n float temp = encoded / 256.0;\n float x = floor(temp);\n float y = (temp - x) * 256.0;\n return czm_octDecode(vec2(x, y));\n }\n\n/**\n * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: \n *\n * @name czm_octDecode\n * @param {vec2} encoded The packed oct-encoded, unit-length vectors.\n * @param {vec3} vector1 One decoded and normalized vector.\n * @param {vec3} vector2 One decoded and normalized vector.\n * @param {vec3} vector3 One decoded and normalized vector.\n */\n void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)\n {\n float temp = encoded.x / 65536.0;\n float x = floor(temp);\n float encodedFloat1 = (temp - x) * 65536.0;\n\n temp = encoded.y / 65536.0;\n float y = floor(temp);\n float encodedFloat2 = (temp - y) * 65536.0;\n\n vector1 = czm_octDecode(encodedFloat1);\n vector2 = czm_octDecode(encodedFloat2);\n vector3 = czm_octDecode(vec2(x, y));\n }\n\n",czm_packDepth$1="/**\n * Packs a depth value into a vec3 that can be represented by unsigned bytes.\n *\n * @name czm_packDepth\n * @glslFunction\n *\n * @param {float} depth The floating-point depth.\n * @returns {vec3} The packed depth.\n */\nvec4 czm_packDepth(float depth)\n{\n // See Aras Pranckevičius' post Encoding Floats to RGBA\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n return enc;\n}\n",czm_packValue$1="/**\n * Packs a float value into a vec3 that can be represented by unsigned bytes.\n *\n * @name czm_packValue\n * @glslFunction\n *\n * @param {float} value The floating-point value.\n * @returns {vec3} The packed value.\n */\nvec4 czm_packValue(float value)\n{\n float SHIFT_LEFT8 = 256.0;\n\tfloat SHIFT_RIGHT8 = 1.0 / 256.0;\n\tvec4 result;\n\tresult.a = 255.0;\n\tfloat fPos = abs(value + 9000.0) * SHIFT_RIGHT8;\n\tresult.b = (fPos - floor(fPos)) * SHIFT_LEFT8;\n\tfPos = floor(fPos) * SHIFT_RIGHT8;\n\tresult.g = (fPos - floor(fPos)) * SHIFT_LEFT8;\n\tresult.r = floor(fPos);\n\tresult /= 255.0;\n\treturn result;\n}\n",czm_phong$1="float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\n return czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\n\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\n return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\n\n/**\n * Computes a color using the Phong lighting model.\n *\n * @name czm_phong\n * @glslFunction\n *\n * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.\n * @param {czm_material} material The fragment's material.\n *\n * @returns {vec4} The computed color.\n *\n * @example\n * vec3 positionToEyeEC = // ...\n * czm_material material = // ...\n * vec3 lightDirectionEC = // ...\n * gl_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);\n *\n * @see czm_getMaterial\n */\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down)\n float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n }\n\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n vec3 ambient = vec3(0.0);\n vec3 color = ambient + material.emission;\n color += material.diffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_planeDistance$1="/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec4 plane, vec3 point) {\n return (dot(plane.xyz, point) + plane.w);\n}\n\n/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js\n * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\n return (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay$1="/**\n * Computes the point along a ray at the given time. time can be positive, negative, or zero.\n *\n * @name czm_pointAlongRay\n * @glslFunction\n *\n * @param {czm_ray} ray The ray to compute the point along.\n * @param {float} time The time along the ray.\n * \n * @returns {vec3} The point along the ray at the given time.\n * \n * @example\n * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction\n * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)\n */\nvec3 czm_pointAlongRay(czm_ray ray, float time)\n{\n return ray.origin + (time * ray.direction);\n}\n",czm_rayEllipsoidIntersectionInterval$1="/**\n * DOC_TBA\n *\n * @name czm_rayEllipsoidIntersectionInterval\n * @glslFunction\n */\nczm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)\n{\n // ray and ellipsoid center in eye coordinates. radii in model coordinates.\n vec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;\n vec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;\n\n q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;\n\n float q2 = dot(q, q);\n float qw = dot(q, w);\n\n if (q2 > 1.0) // Outside ellipsoid.\n {\n if (qw >= 0.0) // Looking outward or tangent (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else // qw < 0.0.\n {\n float qw2 = qw * qw;\n float difference = q2 - 1.0; // Positively valued.\n float w2 = dot(w, w);\n float product = w2 * difference;\n\n if (qw2 < product) // Imaginary roots (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else if (qw2 > product) // Distinct roots (2 intersections).\n {\n float discriminant = qw * qw - product;\n float temp = -qw + sqrt(discriminant); // Avoid cancellation.\n float root0 = temp / w2;\n float root1 = difference / temp;\n if (root0 < root1)\n {\n czm_raySegment i = czm_raySegment(root0, root1);\n return i;\n }\n else\n {\n czm_raySegment i = czm_raySegment(root1, root0);\n return i;\n }\n }\n else // qw2 == product. Repeated roots (2 intersections).\n {\n float root = sqrt(difference / w2);\n czm_raySegment i = czm_raySegment(root, root);\n return i;\n }\n }\n }\n else if (q2 < 1.0) // Inside ellipsoid (2 intersections).\n {\n float difference = q2 - 1.0; // Negatively valued.\n float w2 = dot(w, w);\n float product = w2 * difference; // Negatively valued.\n float discriminant = qw * qw - product;\n float temp = -qw + sqrt(discriminant); // Positively valued.\n czm_raySegment i = czm_raySegment(0.0, temp / w2);\n return i;\n }\n else // q2 == 1.0. On ellipsoid.\n {\n if (qw < 0.0) // Looking inward.\n {\n float w2 = dot(w, w);\n czm_raySegment i = czm_raySegment(0.0, -qw / w2);\n return i;\n }\n else // qw >= 0.0. Looking outward or tangent.\n {\n return czm_emptyRaySegment;\n }\n }\n}\n",czm_raySphereIntersectionInterval="/**\n * Compute the intersection interval of a ray with a sphere.\n *\n * @name czm_raySphereIntersectionInterval\n * @glslFunction\n *\n * @param {czm_ray} ray The ray.\n * @param {vec3} center The center of the sphere.\n * @param {float} radius The radius of the sphere.\n * @return {czm_raySegment} The intersection interval of the ray with the sphere.\n */\nczm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)\n{\n vec3 o = ray.origin;\n vec3 d = ray.direction;\n\n vec3 oc = o - center;\n\n float a = dot(d, d);\n float b = 2.0 * dot(d, oc);\n float c = dot(oc, oc) - (radius * radius);\n\n float det = (b * b) - (4.0 * a * c);\n\n if (det < 0.0) {\n return czm_emptyRaySegment;\n }\n\n float sqrtDet = sqrt(det);\n\n float t0 = (-b - sqrtDet) / (2.0 * a);\n float t1 = (-b + sqrtDet) / (2.0 * a);\n\n czm_raySegment result = czm_raySegment(t0, t1);\n return result;\n}\n",czm_readDepth$1="float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\n return czm_reverseLogDepth(texture2D(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective$1="/**\n * Reads a value previously transformed with {@link czm_writeNonPerspective}\n * by dividing it by `w`, the value used in the perspective divide.\n * This function is intended to be called in a fragment shader to access a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The value should have been\n * previously written in the vertex shader with a call to\n * {@link czm_writeNonPerspective}.\n *\n * @name czm_readNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.\n * @param {float} oneOverW One over the perspective divide value, `w`. Usually this is simply `gl_FragCoord.w`.\n * @returns {float|vec2|vec3|vec4} The usable value.\n */\nfloat czm_readNonPerspective(float value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\n return value * oneOverW;\n}\n",czm_reverseLogDepth$1="float czm_reverseLogDepth(float logZ)\n{\n#ifdef LOG_DEPTH\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n float log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;\n float depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#endif\n return logZ;\n}\n",czm_RGBToHSB$1="/**\n * Converts an RGB color to HSB (hue, saturation, brightness)\n * HSB <-> RGB conversion with minimal branching:\n *\n * @name czm_RGBToHSB\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in HSB.\n *\n * @example\n * vec3 hsb = czm_RGBToHSB(rgb);\n * hsb.z *= 0.1;\n * rgb = czm_HSBToRGB(hsb);\n */\n\nconst vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\nvec3 czm_RGBToHSB(vec3 rgb)\n{\n vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\n vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\n float d = q.x - min(q.w, q.y);\n return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL$1="/**\n * Converts an RGB color to HSL (hue, saturation, lightness)\n * HSL <-> RGB conversion: \n *\n * @name czm_RGBToHSL\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in HSL.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n \nvec3 RGBtoHCV(vec3 rgb)\n{\n // Based on work by Sam Hocevar and Emil Persson\n vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);\n vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);\n float c = q.x - min(q.w, q.y);\n float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\n return vec3(h, c, q.x);\n}\n\nvec3 czm_RGBToHSL(vec3 rgb)\n{\n vec3 hcv = RGBtoHCV(rgb);\n float l = hcv.z - hcv.y * 0.5;\n float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\n return vec3(hcv.x, s, l);\n}\n",czm_RGBToXYZ$1="/**\n * Converts an RGB color to CIE Yxy.\n *

The conversion is described in\n *

\n * \n * @name czm_RGBToXYZ\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in CIE Yxy.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_RGBToXYZ(vec3 rgb)\n{\n const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,\n 0.3576, 0.7152, 0.1192,\n 0.1805, 0.0722, 0.9505);\n vec3 xyz = RGB2XYZ * rgb;\n vec3 Yxy;\n Yxy.r = xyz.g;\n float temp = dot(vec3(1.0), xyz);\n Yxy.gb = xyz.rg / temp;\n return Yxy;\n}\n",czm_RollerShutter$1="void czm_RollerShutter(vec2 coord, vec4 region)\n{\n vec2 f = step(region.xw, coord);\n vec2 s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n",czm_s3mBatchOperation$1="void czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation)\n{\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n vertexColor *= color;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n vertexColor *= selectedColor;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos.xyz += translation;\n }\n float isClip = fract(floor(right_16) * 0.5);\n if(isClip > 0.1)\n {\n vIsFiltByID.x = 1.0;\n }\n}\n\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout float fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n vertexColor *= color;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected = 1.0;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos.xyz += translation;\n }\n float isClip = fract(floor(right_16) * 0.5);\n if(isClip > 0.1)\n {\n vIsFiltByID.x = 1.0;\n }\n}\n\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout float fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n vertexColor.rgb = color.rgb;\n vertexColor.a *= color.a;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected = 1.0;\n #ifdef REPLACE_SELECT_TYPE\n vertexColor = selectedColor;\n #else\n vertexColor *= selectedColor;\n #endif\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos.xyz += translation;\n }\n float isClip = fract(floor(right_16) * 0.5);\n if(isClip > 0.1)\n {\n vIsFiltByID.x = 1.0;\n }\n}\n\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n vertexColor *= color;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n vertexColor *= selectedColor;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n}\n\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout float fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n fSelected = 1.0;\n vertexColor = color;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected = 1.0;\n vertexColor = selectedColor;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n}\n\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout vec2 fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n fSelected.y = 1.0;\n vertexColor.rgb = color.rgb;\n vertexColor.a *= color.a;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected.x = 1.0;\n #ifdef REPLACE_SELECT_TYPE\n vertexColor = selectedColor;\n #else\n vertexColor *= selectedColor;\n #endif\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos.xyz += translation;\n }\n float isClip = fract(floor(right_16) * 0.5);\n if(isClip > 0.1)\n {\n vIsFiltByID.x = 1.0;\n }\n}\n",czm_S3MPBR$1=" uniform float u_metallicFactor;\n uniform float u_roughnessFactor;\n uniform vec4 u_emissiveFactor;\n uniform vec4 u_baseColorFactor;\n uniform float u_alphaCutoff;\n uniform sampler2D u_baseColorTexture;\n uniform sampler2D u_metallicRoughnessTexture;\n uniform sampler2D u_normalTexture;\n uniform sampler2D u_occlusionTexture;\n uniform sampler2D u_emissiveTexture;\n uniform vec4 u_baseColorUVOffsetAndTiling;\n uniform vec4 u_emissiveUVOffsetAndTiling;\n\n uniform float uSunLightON;\n #if DIR_LIGHTS > 0\n uniform vec3 uDirectionalLightDirectionEC[ DIR_LIGHTS ];\n uniform vec3 uDirectionalLightColor[ DIR_LIGHTS ];\n #endif\n #if POINT_LIGHTS > 0\n uniform vec3 uPointLightPositionEC[ POINT_LIGHTS ];\n uniform vec3 uPointLightColor[ POINT_LIGHTS ];\n uniform vec2 uPointLightDistanceAndDecay[ POINT_LIGHTS ];\n #endif\n #if SPOT_LIGHTS > 0\n uniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDirectionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDistanceDecayCos[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightExponent[ SPOT_LIGHTS ];\n #endif\n\n const float M_PI = 3.141592653589793;\n\n vec3 lambertianDiffuse(vec3 diffuseColor)\n {\n return diffuseColor / M_PI;\n }\n\n vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n {\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n }\n\n vec3 fresnelSchlick(float metalness, float VdotH)\n {\n return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n }\n\n vec3 F_Schlick(float ndv, vec3 spec)\n {\n return spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n }\n\n float D_Phong(float g, float ndh)\n {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n }\n\n float smithVisibilityG1(float NdotV, float roughness)\n {\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n }\n\n float smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n {\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n }\n\n float GGX(float roughness, float NdotH)\n {\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n }\n\n void getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm)\n {\n vec3 h = normalize(viewDir + lightDir);\n float NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\n float NdotH = clamp(dot(normal, h), 0.0, 1.0);\n vec3 li = lightColor * NdotL;\n diffuseTerm = li;\n specularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n }\n\n vec3 SRGBtoLINEAR3(vec3 srgbIn)\n {\n return pow(srgbIn, vec3(2.2));\n }\n\n vec4 SRGBtoLINEAR4(vec4 srgbIn)\n {\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n }\n\n vec3 LINEARtoSRGB(vec3 linearIn)\n {\n#ifndef HDR\n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n }\n\n float calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent)\n {\n return pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n }\n\n vec4 czm_S3MPBR(vec3 normalEC, vec3 positionEC, vec2 texCoord, vec4 vertexColor)\n {\n vec3 ng = normalize(normalEC);\n vec3 positionWC = (czm_inverseView * vec4(positionEC, 1.0)).xyz;\n#ifdef HAS_NORMAL_TEXTURE\n vec3 pos_dx = dFdx(positionEC);\n vec3 pos_dy = dFdy(positionEC);\n vec3 tex_dx = dFdx(vec3(texCoord, 0.0));\n vec3 tex_dy = dFdy(vec3(texCoord, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(u_normalTexture, texCoord).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n\n vec3 v = -normalize(positionEC);\n#ifdef DOUBLE_SIDED\n if (dot(n, v) < 0.0) {\n n = -n;\n }\n#endif\n\n // Add base color to fragment shader\n#ifdef HAS_BASECOLOR_TEXTURE\n vec2 baseColorTexCoord = texCoord;\n baseColorTexCoord = baseColorTexCoord * u_baseColorUVOffsetAndTiling.zw + u_baseColorUVOffsetAndTiling.xy;\n vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, baseColorTexCoord));\n baseColorWithAlpha *= u_baseColorFactor;\n#else\n vec4 baseColorWithAlpha = u_baseColorFactor;\n#endif\n baseColorWithAlpha *= vertexColor;\n vec3 baseColor = baseColorWithAlpha.rgb;\n#ifdef HAS_METALLICROUGHNESS_TEXTURE\n vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, texCoord).rgb;\n float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n metalness *= u_metallicFactor;\n roughness *= u_roughnessFactor;\n#else\n float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n#endif\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float NdotV = abs(dot(n, v)) + 0.001;\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n vec3 fresnelTerm = F_Schlick(NdotV, specularColor);\n vec3 color = vec3(0.0);\n // 默认加一个平行光作为太阳光\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(czm_sunDirectionEC, v, n, vec3(0.8), fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm * uSunLightON;\n specularTerm += lightSpecularTerm * uSunLightON;\n#if DIR_LIGHTS > 0 \n for (int i = 0; i < DIR_LIGHTS; i++) { \n getLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n } \n#endif \n#if POINT_LIGHTS > 0 \n for (int i = 0; i < POINT_LIGHTS; i++) {\n vec3 lVector = uPointLightPositionEC[i] - v_positionEC;\n float lightDistance = length(lVector);\n float lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\n if(lightAttenuation < 0.001) {\n continue;\n }\n vec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n }\n#endif \n#if SPOT_LIGHTS > 0 \n for (int i = 0; i < SPOT_LIGHTS; i++) {\n vec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\n float lightDistance = length(lVector);\n float lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCos[i].x, uSpotLightDistanceDecayCos[i].y);\n if(lightAttenuation < 0.001) {\n continue;\n }\n float spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\n if(spotEffect > uSpotLightDistanceDecayCos[i].z) {\n vec3 spotLightColor = uSpotLightColor[i] * lightAttenuation * spotEffect;\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n }\n }\n#endif \n color = baseColor; \n color *= max(diffuseTerm, vec3(0.0)); \n color += max(specularTerm, vec3(0.0)); \n // 计算环境光\n #ifdef USE_IBL_LIGHTING\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n // Figure out if the reflection vector hits the ellipsoid\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, 6378137.0 / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z.\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n\n vec2 iblFactor = vec2(1.0);\n float luminanceAtZenith = 0.5;\n #ifdef USE_SUN_LUMINANCE\n // Angle between sun and zenith\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n // Angle between zenith and current pixel\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n // Angle between sun and current pixel\n float sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\n float gamma = acos(sunNdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = luminanceAtZenith * (numerator / denominator);\n#endif\n\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * iblFactor.y);\n#ifdef USE_SUN_LUMINANCE\n color += IBLColor * luminance;\n#else\n color += IBLColor;\n#endif // end of USE_SUN_LUMINANCE\n#endif // end of USE_IBL_LIGHTING\n\n#ifdef HAS_OCCLUSION_TEXTURE\n color *= texture2D(u_occlusionTexture, texCoord).r;\n#endif\n\n#ifdef HAS_EMISSIVE_TEXTURE\n vec2 emissiveTexCoord = texCoord;\n emissiveTexCoord = emissiveTexCoord * u_emissiveUVOffsetAndTiling.zw + u_emissiveUVOffsetAndTiling.xy;\n vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, emissiveTexCoord).rgb);\n emissive *= u_emissiveFactor.rgb;\n color += emissive;\n#else\n color += u_emissiveFactor.rgb;\n#endif\n color = LINEARtoSRGB(color);\n vec4 resultColor = vec4(color, 1.0);\n#ifdef MASK\n if (baseColorWithAlpha.a < u_alphaCutoff)\n {\n discard;\n }\n resultColor = vec4(color, 1.0);\n#endif\n#ifdef BLEND\n resultColor = vec4(color, baseColorWithAlpha.a);\n#endif\n return resultColor;\n }",czm_sampleAndBlend$1="vec4 czm_sampleAndBlend(\n vec4 currentTextureColor,\n vec4 previousColor,\n vec2 tileTextureCoordinates,\n vec4 textureCoordinateRectangle,\n vec4 transparentBackColor,\n bool imageryClipEnable,\n float textureAlpha,\n float textureBrightness,\n float textureContrast,\n float textureHue,\n float textureSaturation,\n float textureOneOverGamma,\n vec2 split,\n vec4 swipe)\n{\n // This crazy step stuff sets the alpha to 0.0 if this following condition is true:\n // tileTextureCoordinates.s < textureCoordinateRectangle.s ||\n // tileTextureCoordinates.s > textureCoordinateRectangle.p ||\n // tileTextureCoordinates.t < textureCoordinateRectangle.t ||\n // tileTextureCoordinates.t > textureCoordinateRectangle.q\n // In other words, the alpha is zero if the fragment is outside the rectangle\n // covered by this texture. Would an actual 'if' yield better performance?\n vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n\n alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n\n vec3 color = currentTextureColor.rgb;\n float alpha = currentTextureColor.a;\n if(transparentBackColor.a > 0.01)\n {\n float rDiff = abs(transparentBackColor.r - color.r);\n float gDiff = abs(transparentBackColor.g - color.g);\n float bDiff = abs(transparentBackColor.b - color.b);\n if(rDiff < transparentBackColor.a && gDiff < transparentBackColor.a && bDiff < transparentBackColor.a)\n {\n alpha = 0.0;\n }\n }\n\n if(imageryClipEnable)\n {\n #ifdef Apply_ImageryClip\n if(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n {\n alpha = 0.0;\n }\n #else\n alpha = 0.0;\n #endif\n }\n\n\n#if !defined(APPLY_GAMMA)\n vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));\n color = tempColor.rgb;\n alpha = tempColor.a;\n#else\n color = pow(color, vec3(textureOneOverGamma));\n#endif\n\n#ifdef APPLY_SPLIT\n vec2 splitPosition = czm_imagerySplitPosition;\n // Split to the left\n if (split.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\n alpha = 0.0;\n }\n // Split to the right\n else if (split.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\n alpha = 0.0;\n }\n if(split.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\n alpha = 0.0;\n }\n else if(split.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\n alpha = 0.0;\n }\n#if TEXTURE_UNITS < 2\n if(alpha == 0.0)\n {\n discard;\n }\n#endif\n#endif\n\n#ifdef APPLY_SWIPE\n if (gl_FragCoord.x < swipe.x || gl_FragCoord.y > swipe.y) {\n alpha = 0.0;\n }\n else if (gl_FragCoord.x > swipe.z || gl_FragCoord.y < swipe.w) {\n alpha = 0.0;\n }\n#if TEXTURE_UNITS < 2\n if(alpha == 0.0)\n {\n discard;\n }\n#endif\n\n#endif\n\n#ifdef APPLY_BRIGHTNESS\n color = mix(vec3(0.0), color, textureBrightness);\n#endif\n\n#ifdef APPLY_CONTRAST\n color = mix(vec3(0.5), color, textureContrast);\n#endif\n\n#ifdef APPLY_HUE\n color = czm_hue(color, textureHue);\n#endif\n\n#ifdef APPLY_SATURATION\n color = czm_saturation(color, textureSaturation);\n#endif\n\n float sourceAlpha = alpha * textureAlpha;\n float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\n vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\n return vec4(outColor, outAlpha);\n}\n\nvec4 gridTextureSampleAndBlend(\n vec4 previousColor,\n sampler2D textureToSample,\n vec2 tileTextureCoordinates,\n vec4 textureCoordinateRectangle,\n vec4 textureCoordinateTranslationAndScale)\n{\n float textureAlpha = 1.0;\n vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n vec2 translation = textureCoordinateTranslationAndScale.xy;\n vec2 scale = textureCoordinateTranslationAndScale.zw;\n vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n vec4 value = texture2D(textureToSample, textureCoordinates);\n vec3 color = value.rgb;\n float alpha = value.a;\n float sourceAlpha = alpha * textureAlpha;\n float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\n vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\n return vec4(outColor, outAlpha);\n}\n\nvec2 computeTextureCoord(vec2 tileTextureCoordinates, vec4 textureCoordinateTranslationAndScale, vec4 textureSize, bool flipY)\n{\n vec2 translation = textureCoordinateTranslationAndScale.xy;\n vec2 scale = textureCoordinateTranslationAndScale.zw;\n vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n if(flipY)\n {\n textureCoordinates.y = 1.0 - textureCoordinates.y;\n }\n#ifdef WEBGPU\n vec2 texelSize = textureSize.zw;\n textureCoordinates = clamp(textureCoordinates, texelSize, 1.0 - texelSize);\n#endif\n return textureCoordinates;\n}",czm_sampleOctahedralProjection$1="/**\n * Samples the 4 neighboring pixels and return the weighted average.\n *\n * @private\n */\nvec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod)\n{\n direction /= dot(vec3(1.0), abs(direction));\n vec2 rev = abs(direction.zx) - vec2(1.0);\n vec2 neg = vec2(direction.x < 0.0 ? rev.x : -rev.x,\n direction.z < 0.0 ? rev.y : -rev.y);\n vec2 uv = direction.y < 0.0 ? neg : direction.xz;\n vec2 coord = 0.5 * uv + vec2(0.5);\n vec2 pixel = 1.0 / textureSize;\n\n if (lod > 0.0)\n {\n // Each subseqeuent mip level is half the size\n float scale = 1.0 / pow(2.0, lod);\n float offset = ((textureSize.y + 1.0) / textureSize.x);\n\n coord.x *= offset;\n coord *= scale;\n\n coord.x += offset + pixel.x;\n coord.y += (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n }\n else\n {\n coord.x *= (textureSize.y / textureSize.x);\n }\n\n // Do bilinear filtering\n #ifndef OES_texture_float_linear\n vec3 color1 = texture2D(projectedMap, coord + vec2(0.0, pixel.y)).rgb;\n vec3 color2 = texture2D(projectedMap, coord + vec2(pixel.x, 0.0)).rgb;\n vec3 color3 = texture2D(projectedMap, coord + pixel).rgb;\n vec3 color4 = texture2D(projectedMap, coord).rgb;\n\n vec2 texturePosition = coord * textureSize;\n\n float fu = fract(texturePosition.x);\n float fv = fract(texturePosition.y);\n\n vec3 average1 = mix(color4, color2, fu);\n vec3 average2 = mix(color1, color3, fu);\n\n vec3 color = mix(average1, average2, fv);\n #else\n vec3 color = texture2D(projectedMap, coord).rgb;\n #endif\n\n return color;\n}\n\n\n/**\n * Samples from a cube map that has been projected using an octahedral projection from the given direction.\n *\n * @name czm_sampleOctahedralProjection\n * @glslFunction\n *\n * @param {sampler2D} projectedMap The texture with the octahedral projected cube map.\n * @param {vec2} textureSize The width and height dimensions in pixels of the projected map.\n * @param {vec3} direction The normalized direction used to sample the cube map.\n * @param {float} lod The level of detail to sample.\n * @param {float} maxLod The maximum level of detail.\n * @returns {vec3} The color of the cube map at the direction.\n */\nvec3 czm_sampleOctahedralProjection(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod, float maxLod) {\n float currentLod = floor(lod);\n float nextLod = min(currentLod + 1.0, maxLod);\n\n vec3 colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, currentLod);\n vec3 colorNextLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, nextLod);\n\n return mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation$1="/**\n * Adjusts the saturation of a color.\n * \n * @name czm_saturation\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the saturation of the color.\n *\n * @returns {float} The color with the saturation adjusted.\n *\n * @example\n * vec3 greyScale = czm_saturation(color, 0.0);\n * vec3 doubleSaturation = czm_saturation(color, 2.0);\n */\nvec3 czm_saturation(vec3 rgb, float adjustment)\n{\n // Algorithm from Chapter 16 of OpenGL Shading Language\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n vec3 intensity = vec3(dot(rgb, W));\n return mix(intensity, rgb, adjustment);\n}\n",czm_shadowDepthCompare="\nfloat czm_sampleShadowMap(samplerCube shadowMap, vec3 d)\n{\n return czm_unpackDepth(textureCube(shadowMap, d));\n}\n\nfloat czm_sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture2D(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\n\nfloat czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\n return step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n\nfloat czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n",czm_shadowVisibility="\nfloat czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n float strength = step(0.0, nDotL);\n#endif\n visibility *= strength;\n#endif\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\nfloat czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec3 uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\nfloat czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec2 uv = shadowParameters.texCoords;\n\n depth -= depthBias;\n#ifdef USE_SOFT_SHADOWS\n vec2 texelStepSize = shadowParameters.texelStepSize;\n float radius = 1.0;\n float dx0 = -texelStepSize.x * radius;\n float dy0 = -texelStepSize.y * radius;\n float dx1 = texelStepSize.x * radius;\n float dy1 = texelStepSize.y * radius;\n float visibility = (\n czm_shadowDepthCompare(shadowMap, uv, depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\n ) * (1.0 / 9.0);\n#else\n float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n",czm_signNotZero$1="/**\n * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL\n * built-in function sign except that returns 1.0 instead of 0.0 when the input value is 0.0.\n * \n * @name czm_signNotZero\n * @glslFunction\n *\n * @param {} value The value for which to determine the sign.\n * @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative.\n */\nfloat czm_signNotZero(float value)\n{\n return value >= 0.0 ? 1.0 : -1.0;\n}\n\nvec2 czm_signNotZero(vec2 value)\n{\n return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\n\nvec3 czm_signNotZero(vec3 value)\n{\n return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n}\n\nvec4 czm_signNotZero(vec4 value)\n{\n return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n}\n",czm_sketchMode$1="uniform sampler2D uNormalDepthTexture;\nuniform int uFillStyle;\nfloat edgeDetection(float lineWidth)\n{\n vec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\n vec2 off = lineWidth / czm_globeDepthTextureDim.xy;\n vec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\n val_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\n vec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\n val_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\n vec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\n val_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\n vec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\n val_se.xyz = (val_se.xyz * 2.0) - 1.0;\n float discontinuity = 0.0;\n float dot0 = dot(val_nw.xyz, val_se.xyz);\n float dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nvec4 czm_sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\n vec4 outputColor = inputColor;\n float discontinuity = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0, 1.0);\n if(uFillStyle == 1)\n {\n outputColor = lineColor;\n outputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\n outputColor.a *= lineColor.a;\n }\n else\n {\n vec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\n outputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n }\n return outputColor;\n}",czm_sphericalHarmonics$1="/**\n * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.\n *

\n * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].\n *

\n *\n * @name czm_sphericalHarmonics\n * @glslFunction\n *\n * @param {vec3} normal The normalized direction.\n * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.\n * @returns {vec3} The color at the direction.\n *\n */\nvec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])\n{\n const float c1 = 0.429043;\n const float c2 = 0.511664;\n const float c3 = 0.743125;\n const float c4 = 0.886227;\n const float c5 = 0.247708;\n\n vec3 L00 = coefficients[0];\n vec3 L1_1 = coefficients[1];\n vec3 L10 = coefficients[2];\n vec3 L11 = coefficients[3];\n vec3 L2_2 = coefficients[4];\n vec3 L2_1 = coefficients[5];\n vec3 L20 = coefficients[6];\n vec3 L21 = coefficients[7];\n vec3 L22 = coefficients[8];\n\n float x = normal.x;\n float y = normal.y;\n float z = normal.z;\n\n return c1 * L22 * (x * x - y * y) + c3 * L20 * z * z + c4 * L00 - c5 * L20 +\n 2.0 * c1 * (L2_2 * x * y + L21 * x * z + L2_1 * y * z) +\n 2.0 * c2 * (L11 * x + L1_1 * y + L10 * z);\n}\n",czm_tangentToEyeSpaceMatrix$1="/**\n * Creates a matrix that transforms vectors from tangent space to eye space.\n *\n * @name czm_tangentToEyeSpaceMatrix\n * @glslFunction\n *\n * @param {vec3} normalEC The normal vector in eye coordinates.\n * @param {vec3} tangentEC The tangent vector in eye coordinates.\n * @param {vec3} bitangentEC The bitangent vector in eye coordinates.\n *\n * @returns {mat3} The matrix that transforms from tangent space to eye space.\n *\n * @example\n * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);\n * vec3 normal = tangentToEye * texture2D(normalMap, st).xyz;\n */\nmat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\n vec3 normal = normalize(normalEC);\n vec3 tangent = normalize(tangentEC);\n vec3 bitangent = normalize(bitangentEC);\n return mat3(tangent.x , tangent.y , tangent.z,\n bitangent.x, bitangent.y, bitangent.z,\n normal.x , normal.y , normal.z);\n}\n",czm_transformPlane$1="vec4 czm_transformPlane(vec4 clippingPlane, mat4 transform) {\n vec3 transformedDirection = normalize((transform * vec4(clippingPlane.xyz, 0.0)).xyz);\n vec3 transformedPosition = (transform * vec4(clippingPlane.xyz * -clippingPlane.w, 1.0)).xyz;\n vec4 transformedPlane;\n transformedPlane.xyz = transformedDirection;\n transformedPlane.w = -dot(transformedDirection, transformedPosition);\n return transformedPlane;\n}\n",czm_translateRelativeToEye$1="/**\n * Translates a position (or any vec3) that was encoded with {@link EncodedCartesian3},\n * and then provided to the shader as separate high and low bits to\n * be relative to the eye. As shown in the example, the position can then be transformed in eye\n * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},\n * respectively.\n *

\n * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as\n * described in .\n *

\n *\n * @name czm_translateRelativeToEye\n * @glslFunction\n *\n * @param {vec3} high The position's high bits.\n * @param {vec3} low The position's low bits.\n * @returns {vec3} The position translated to be relative to the camera's position.\n *\n * @example\n * attribute vec3 positionHigh;\n * attribute vec3 positionLow;\n *\n * void main()\n * {\n * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n * }\n *\n * @see czm_modelViewRelativeToEye\n * @see czm_modelViewProjectionRelativeToEye\n * @see czm_computePosition\n * @see EncodedCartesian3\n */\nvec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\n vec3 highDifference = high - czm_encodedCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedCameraPositionMCLow;\n\n return vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong$1="/**\n * @private\n */\nvec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down and horizon views)\n float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\n\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n }\n\n diffuse = clamp(diffuse, 0.0, 1.0);\n\n float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_transpose$1="/**\n * Returns the transpose of the matrix. The input matrix can be\n * a mat2, mat3, or mat4.\n *\n * @name czm_transpose\n * @glslFunction\n *\n * @param {} matrix The matrix to transpose.\n *\n * @returns {} The transposed matrix.\n *\n * @example\n * // GLSL declarations\n * mat2 czm_transpose(mat2 matrix);\n * mat3 czm_transpose(mat3 matrix);\n * mat4 czm_transpose(mat4 matrix);\n *\n * // Transpose a 3x3 rotation matrix to find its inverse.\n * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(\n * positionMC, normalEC);\n * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);\n */\nmat2 czm_transpose(mat2 matrix)\n{\n return mat2(\n matrix[0][0], matrix[1][0],\n matrix[0][1], matrix[1][1]);\n}\n\nmat3 czm_transpose(mat3 matrix)\n{\n return mat3(\n matrix[0][0], matrix[1][0], matrix[2][0],\n matrix[0][1], matrix[1][1], matrix[2][1],\n matrix[0][2], matrix[1][2], matrix[2][2]);\n}\n\nmat4 czm_transpose(mat4 matrix)\n{\n return mat4(\n matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\n matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\n matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\n matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackDepth$1="/**\n * Unpacks a vec4 depth value to a float in [0, 1) range.\n *\n * @name czm_unpackDepth\n * @glslFunction\n *\n * @param {vec4} packedDepth The packed depth.\n *\n * @returns {float} The floating-point depth in [0, 1) range.\n */\n float czm_unpackDepth(vec4 packedDepth)\n {\n // See Aras Pranckevičius' post Encoding Floats to RGBA\n return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n }\n",czm_unpackFloat$1="#define SHIFT_RIGHT_8 0.00390625 //1.0 / 256.0\n#define SHIFT_RIGHT_16 0.00001525878 //1.0 / 65536.0\n#define SHIFT_RIGHT_24 5.960464477539063e-8//1.0 / 16777216.0\n\n#define BIAS 38.0\n\n/**\n * Unpacks a vec4 value containing values expressable as uint8 to an arbitrary float.\n *\n * @name czm_unpackFloat\n * @glslFunction\n *\n * @param {vec4} packedFloat The packed float.\n *\n * @returns {float} The floating-point depth in arbitrary range.\n */\n float czm_unpackFloat(vec4 packedFloat)\n{\n packedFloat *= 255.0;\n float temp = packedFloat.w / 2.0;\n float exponent = floor(temp);\n float sign = (temp - exponent) * 2.0;\n exponent = exponent - float(BIAS);\n sign = sign * 2.0 - 1.0;\n sign = -sign;\n float unpacked = sign * packedFloat.x * float(SHIFT_RIGHT_8);\n unpacked += sign * packedFloat.y * float(SHIFT_RIGHT_16);\n unpacked += sign * packedFloat.z * float(SHIFT_RIGHT_24);\n return unpacked * pow(10.0, exponent);\n}\n",czm_unpackValue$1="/**\n * Unpacks a vec4 value to a float.\n *\n * @name czm_unpackValue\n * @glslFunction\n *\n * @param {vec3} packedValue The packed value.\n *\n * @returns {float} The floating-point value.\n */\n float czm_unpackValue(vec4 packedValue)\n {\n float SHIFT_LEFT16 = 65536.0;\n\tfloat SHIFT_LEFT8 = 256.0;\n\tvec4 value = packedValue * 255.0;\n\treturn value.r * SHIFT_LEFT16 + value.g * SHIFT_LEFT8 + value.b - 9000.0;\n }\n",czm_vertexLogDepth$1="#ifdef LOG_DEPTH\n// 1.0 at the near plane, increasing linearly from there.\nvarying float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nvarying vec3 v_logPositionEC;\n#endif\n#endif\n\nvec4 czm_updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n\n#ifdef SHADOW_MAP\n vec3 logPositionEC = (czm_inverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n#endif\n\n // With the very high far/near ratios used with the logarithmic depth\n // buffer, floating point rounding errors can cause linear depth values\n // to end up on the wrong side of the far plane, even for vertices that\n // are really nowhere near it. Since we always write a correct logarithmic\n // depth value in the fragment shader anyway, we just need to make sure\n // such errors don't cause the primitive to be clipped entirely before\n // we even get to the fragment shader.\n coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\n\n return coords;\n}\n\n/**\n * Writes the logarithmic depth to gl_Position using the already computed gl_Position.\n *\n * @name czm_vertexLogDepth\n * @glslFunction\n */\nvoid czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0 - czm_currentFrustum.x + gl_Position.w;\n gl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\n\n/**\n * Writes the logarithmic depth to gl_Position using the provided clip coordinates.\n *

\n * An example use case for this function would be moving the vertex in window coordinates\n * before converting back to clip coordinates. Use the original vertex clip coordinates.\n *

\n * @name czm_vertexLogDepth\n * @glslFunction\n *\n * @param {vec4} clipCoords The vertex in clip coordinates.\n *\n * @example\n * czm_vertexLogDepth(czm_projection * vec4(positionEyeCoordinates, 1.0));\n */\nvoid czm_vertexLogDepth(vec4 clipCoords)\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0 - czm_currentFrustum.x + clipCoords.w;\n czm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates$1="/**\n * Transforms a position from window to eye coordinates.\n * The transform from window to normalized device coordinates is done using components\n * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating\n * the inverse of czm_viewportTransformation. The transformation from\n * normalized device coordinates to clip coordinates is done using fragmentCoordinate.w,\n * which is expected to be the scalar used in the perspective divide. The transformation\n * from clip to eye coordinates is done using {@link czm_inverseProjection}.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec4} fragmentCoordinate The position in window coordinates to transform.\n *\n * @returns {vec4} The transformed position in eye coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @example\n * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);\n */\nvec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)\n{\n // Reconstruct NDC coordinates\n float x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\n float y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\n float z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n vec4 q = vec4(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= fragmentCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s\n {\n q = czm_inverseProjection * q;\n }\n else\n {\n float top = czm_frustumPlanes.x;\n float bottom = czm_frustumPlanes.y;\n float left = czm_frustumPlanes.z;\n float right = czm_frustumPlanes.w;\n\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n\n q.x = (q.x * (right - left) + left + right) * 0.5;\n q.y = (q.y * (top - bottom) + bottom + top) * 0.5;\n q.z = (q.z * (near - far) - near - far) * 0.5;\n q.w = 1.0;\n }\n\n return q;\n}\n\n/**\n * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.\n * This function produces more accurate results for window positions with log depth than\n * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version\n * of czm_windowToEyeCoordinates.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.\n * @param {float} depthOrLogDepth A depth or log depth for the fragment.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @returns {vec4} The transformed position in eye coordinates.\n */\nvec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)\n{\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#ifdef LOG_DEPTH\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n float log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\n float depthFromNear = pow(2.0, log2Depth) - 1.0;\n float depthFromCamera = depthFromNear + near;\n vec4 windowCoord = vec4(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n return eyeCoordinate;\n#else\n vec4 windowCoord = vec4(fragmentCoordinateXY, depthOrLogDepth, 1.0);\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n#endif\n return eyeCoordinate;\n}\n",czm_writeDepthClampedToFarPlane$1="// emulated noperspective\n#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\n/**\n * Clamps a vertex to the far plane by writing the fragments depth.\n *

\n * The shader must enable the GL_EXT_frag_depth extension.\n *

\n *\n * @name czm_writeDepthClampedToFarPlane\n * @glslFunction\n *\n * @example\n * gl_FragColor = color;\n * czm_writeDepthClampedToFarPlane();\n *\n * @see czm_depthClampFarPlane\n */\nvoid czm_writeDepthClampedToFarPlane()\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && !defined(LOG_DEPTH)\n gl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n",czm_writeLogDepth$1="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\nuniform vec2 u_polygonOffset;\n#endif\n\n#endif\n\n/**\n * Writes the fragment depth to the logarithmic depth buffer.\n *

\n * Use this when the vertex shader does not call {@link czm_vertexlogDepth}, for example, when\n * ray-casting geometry using a full screen quad.\n *

\n * @name czm_writeLogDepth\n * @glslFunction\n *\n * @param {float} depth The depth coordinate, where 1.0 is on the near plane and\n * depth increases in eye-space units from there\n *\n * @example\n * czm_writeLogDepth((czm_projection * v_positionEyeCoordinates).w + 1.0);\n */\nvoid czm_writeLogDepth(float depth)\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && defined(LOG_DEPTH)\n // Discard the vertex if it's not between the near and far planes.\n // We allow a bit of epsilon on the near plane comparison because a 1.0\n // from the vertex shader (indicating the vertex should be _on_ the near\n // plane) will not necessarily come here as exactly 1.0.\n if (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {\n discard;\n }\n\n#ifdef POLYGON_OFFSET\n // Polygon offset: m * factor + r * units\n float factor = u_polygonOffset[0];\n float units = u_polygonOffset[1];\n\n // If we can't compute derivatives, just leave out the factor I guess?\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n // m = sqrt(dZdX^2 + dZdY^2);\n float x = dFdx(depth);\n float y = dFdy(depth);\n float m = sqrt(x * x + y * y);\n\n // Apply the factor before computing the log depth.\n depth += m * factor;\n#endif\n\n#endif\n\n gl_FragDepthEXT = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\n // Apply the units after the log depth.\n gl_FragDepthEXT += czm_epsilon7 * units;\n#endif\n\n#endif\n}\n\n/**\n * Writes the fragment depth to the logarithmic depth buffer.\n *

\n * Use this when the vertex shader calls {@link czm_vertexlogDepth}.\n *

\n *\n * @name czm_writeLogDepth\n * @glslFunction\n */\nvoid czm_writeLogDepth() {\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",czm_writeNonPerspective$1="/**\n * Transforms a value for non-perspective interpolation by multiplying\n * it by w, the value used in the perspective divide. This function is\n * intended to be called in a vertex shader to compute the value of a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The fragment shader\n * must call {@link czm_readNonPerspective} to retrieve the final\n * non-perspective value.\n *\n * @name czm_writeNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.\n * @param {float} w The perspective divide value. Usually this is the computed `gl_Position.w`.\n * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a `varying` and read in the\n * fragment shader with {@link czm_readNonPerspective}.\n */\nfloat czm_writeNonPerspective(float value, float w) {\n return value * w;\n}\n\nvec2 czm_writeNonPerspective(vec2 value, float w) {\n return value * w;\n}\n\nvec3 czm_writeNonPerspective(vec3 value, float w) {\n return value * w;\n}\n\nvec4 czm_writeNonPerspective(vec4 value, float w) {\n return value * w;\n}\n",czm_XYZToRGB$1="/**\n * Converts a CIE Yxy color to RGB.\n *

The conversion is described in\n *

\n * \n * @name czm_XYZToRGB\n * @glslFunction\n * \n * @param {vec3} Yxy The color in CIE Yxy.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_XYZToRGB(vec3 Yxy)\n{\n const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n -1.5371, 1.8760, -0.2040,\n -0.4985, 0.0416, 1.0572);\n vec3 xyz;\n xyz.r = Yxy.r * Yxy.g / Yxy.b;\n xyz.g = Yxy.r;\n xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\n \n return XYZ2RGB * xyz;\n}\n",G$1d={czm_degreesPerRadian:czm_degreesPerRadian$1,czm_depthRange:czm_depthRange$1,czm_ellipsoidInverseRadii:czm_ellipsoidInverseRadii$1,czm_ellipsoidRadii:czm_ellipsoidRadii$1,czm_epsilon1:czm_epsilon1$1,czm_epsilon2:czm_epsilon2$1,czm_epsilon3:czm_epsilon3$1,czm_epsilon4:czm_epsilon4$1,czm_epsilon5:czm_epsilon5$1,czm_epsilon6:czm_epsilon6$1,czm_epsilon7:czm_epsilon7$1,czm_infinity:czm_infinity$1,czm_oneOverPi:czm_oneOverPi$1,czm_oneOverTwoPi:czm_oneOverTwoPi$1,czm_passCesium3DTile:czm_passCesium3DTile$1,czm_passCesium3DTileClassification:czm_passCesium3DTileClassification$1,czm_passCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow$1,czm_passClassification:czm_passClassification$1,czm_passCompute:czm_passCompute$1,czm_passEnvironment:czm_passEnvironment$1,czm_passGlobe:czm_passGlobe$1,czm_passGround:czm_passGround$1,czm_passOpaque:czm_passOpaque$1,czm_passOverlay:czm_passOverlay$1,czm_passTerrainClassification:czm_passTerrainClassification$1,czm_passTranslucent:czm_passTranslucent$1,czm_pi:czm_pi$1,czm_piOverFour:czm_piOverFour$1,czm_piOverSix:czm_piOverSix$1,czm_piOverThree:czm_piOverThree$1,czm_piOverTwo:czm_piOverTwo$1,czm_radiansPerDegree:czm_radiansPerDegree$1,czm_sceneMode2D:czm_sceneMode2D$1,czm_sceneMode3D:czm_sceneMode3D$1,czm_sceneModeColumbusView:czm_sceneModeColumbusView$1,czm_sceneModeMorphing:czm_sceneModeMorphing$1,czm_solarRadius:czm_solarRadius$1,czm_threePiOver2:czm_threePiOver2$1,czm_twoPi:czm_twoPi$1,czm_webMercatorMaxLatitude:czm_webMercatorMaxLatitude$1,czm_depthRangeStruct:czm_depthRangeStruct$1,czm_ellipsoid:czm_ellipsoid$1,czm_material:czm_material$1,czm_materialInput:czm_materialInput$1,czm_ray:czm_ray$1,czm_raySegment:czm_raySegment$1,czm_s3mMaterialInput:czm_s3mMaterialInput$1,czm_shadowParameters:czm_shadowParameters$1,czm_acesTonemapping:czm_acesTonemapping$1,czm_adjustColor:czm_adjustColor$1,czm_alphaWeight:czm_alphaWeight$1,czm_antialias:czm_antialias$1,czm_approximateSphericalCoordinates:czm_approximateSphericalCoordinates$1,czm_branchFreeTernary:czm_branchFreeTernary$1,czm_cascadeColor:czm_cascadeColor$1,czm_cascadeDistance:czm_cascadeDistance$1,czm_cascadeMatrix:czm_cascadeMatrix$1,czm_cascadeWeights:czm_cascadeWeights$1,czm_clip:czm_clip$1,czm_columbusViewMorph:czm_columbusViewMorph$1,czm_computeLightColorInFP:czm_computeLightColorInFP,czm_computeLightColorInstanceInFP:czm_computeLightColorInstanceInFP,czm_computeNormal:czm_computeNormal$1,czm_computePosition:czm_computePosition$1,czm_cosineAndSine:czm_cosineAndSine$1,czm_decompressTextureCoordinates:czm_decompressTextureCoordinates$1,czm_depthClampFarPlane:czm_depthClampFarPlane$1,czm_directionLight:czm_directionLight,czm_eastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates$1,czm_ellipsoidContainsPoint:czm_ellipsoidContainsPoint$1,czm_ellipsoidNew:czm_ellipsoidNew$1,czm_ellipsoidWgs84TextureCoordinates:czm_ellipsoidWgs84TextureCoordinates$1,czm_equalsEpsilon:czm_equalsEpsilon$1,czm_executeExcavation:czm_executeExcavation$1,czm_eyeOffset:czm_eyeOffset$1,czm_eyeToWindowCoordinates:czm_eyeToWindowCoordinates$1,czm_fastApproximateAtan:czm_fastApproximateAtan$1,czm_fog:czm_fog$1,czm_gammaCorrect:czm_gammaCorrect$1,czm_geodeticSurfaceNormal:czm_geodeticSurfaceNormal$1,czm_getDefaultMaterial:czm_getDefaultMaterial$1,czm_getEmissiveTextureColor:czm_getEmissiveTextureColor$1,czm_getHorizontalColor:czm_getHorizontalColor$1,czm_getHypsometricColor:czm_getHypsometricColor$1,czm_getLambertDiffuse:czm_getLambertDiffuse$1,czm_getSpecular:czm_getSpecular$1,czm_getTexColorForS3M:czm_getTexColorForS3M,czm_getTextureMatrixFromZValue:czm_getTextureMatrixFromZValue,czm_getVolumeValue:czm_getVolumeValue$1,czm_getVolumeValueMultiResolution:czm_getVolumeValueMultiResolution,czm_getWaterNoise:czm_getWaterNoise$1,czm_getWgs84EllipsoidEC:czm_getWgs84EllipsoidEC$1,czm_HSBToRGB:czm_HSBToRGB$1,czm_HSLToRGB:czm_HSLToRGB$1,czm_hue:czm_hue$1,czm_inverseGamma:czm_inverseGamma$1,czm_inverseMatrix:czm_inverseMatrix$1,czm_isEmpty:czm_isEmpty$1,czm_isFull:czm_isFull$1,czm_latitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction$1,czm_lineDistance:czm_lineDistance$1,czm_luminance:czm_luminance$1,czm_metersPerPixel:czm_metersPerPixel$1,czm_modelToWindowCoordinates:czm_modelToWindowCoordinates$1,czm_multiplyWithColorBalance:czm_multiplyWithColorBalance$1,czm_nearFarScalar:czm_nearFarScalar$1,czm_octDecode:czm_octDecode$1,czm_packDepth:czm_packDepth$1,czm_packValue:czm_packValue$1,czm_phong:czm_phong$1,czm_planeDistance:czm_planeDistance$1,czm_pointAlongRay:czm_pointAlongRay$1,czm_rayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval$1,czm_raySphereIntersectionInterval:czm_raySphereIntersectionInterval,czm_readDepth:czm_readDepth$1,czm_readNonPerspective:czm_readNonPerspective$1,czm_reverseLogDepth:czm_reverseLogDepth$1,czm_RGBToHSB:czm_RGBToHSB$1,czm_RGBToHSL:czm_RGBToHSL$1,czm_RGBToXYZ:czm_RGBToXYZ$1,czm_RollerShutter:czm_RollerShutter$1,czm_s3mBatchOperation:czm_s3mBatchOperation$1,czm_S3MPBR:czm_S3MPBR$1,czm_sampleAndBlend:czm_sampleAndBlend$1,czm_sampleOctahedralProjection:czm_sampleOctahedralProjection$1,czm_saturation:czm_saturation$1,czm_shadowDepthCompare:czm_shadowDepthCompare,czm_shadowVisibility:czm_shadowVisibility,czm_signNotZero:czm_signNotZero$1,czm_sketchMode:czm_sketchMode$1,czm_sphericalHarmonics:czm_sphericalHarmonics$1,czm_tangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix$1,czm_transformPlane:czm_transformPlane$1,czm_translateRelativeToEye:czm_translateRelativeToEye$1,czm_translucentPhong:czm_translucentPhong$1,czm_transpose:czm_transpose$1,czm_unpackDepth:czm_unpackDepth$1,czm_unpackFloat:czm_unpackFloat$1,czm_unpackValue:czm_unpackValue$1,czm_vertexLogDepth:czm_vertexLogDepth$1,czm_windowToEyeCoordinates:czm_windowToEyeCoordinates$1,czm_writeDepthClampedToFarPlane:czm_writeDepthClampedToFarPlane$1,czm_writeLogDepth:czm_writeLogDepth$1,czm_writeNonPerspective:czm_writeNonPerspective$1,czm_XYZToRGB:czm_XYZToRGB$1},czm_degreesPerRadian="/**\n * A built-in GLSL floating-point constant for converting radians to degrees.\n *\n * @alias czm_degreesPerRadian\n * @glslConstant\n *\n * @see CesiumMath.DEGREES_PER_RADIAN\n *\n * @example\n * // GLSL declaration\n * const float czm_degreesPerRadian = ...;\n *\n * // Example\n * float deg = czm_degreesPerRadian * rad;\n */\nconst float czm_degreesPerRadian = 57.29577951308232;\n",czm_depthRange="/**\n * A built-in GLSL vec2 constant for defining the depth range.\n * This is a workaround to a bug where IE11 does not implement gl_DepthRange.\n *\n * @alias czm_depthRange\n * @glslConstant\n *\n * @example\n * // GLSL declaration\n * float depthRangeNear = czm_depthRange.near;\n * float depthRangeFar = czm_depthRange.far;\n *\n */\nconst czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n",czm_ellipsoidInverseRadii="/**\n * The reciprocal of the radius of the WGS84 ellipsoid.\n *\n * @name czm_ellipsoidInverseRadii\n * @glslConstant\n */\nconst czm_ellipsoidInverseRadii = vec3(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.314245);\n",czm_ellipsoidRadii="/**\n * The radius of the WGS84 ellipsoid.\n *\n * @name czm_ellipsoidRadii\n * @glslConstant\n */\nconst czm_ellipsoidRadii = vec3(6378137.0, 6378137.0, 6356752.314245);\n",czm_epsilon1="/**\n * 0.1\n *\n * @name czm_epsilon1\n * @glslConstant\n */\nconst czm_epsilon1 = 0.1;\n",czm_epsilon2="/**\n * 0.01\n *\n * @name czm_epsilon2\n * @glslConstant\n */\nconst czm_epsilon2 = 0.01;\n",czm_epsilon3="/**\n * 0.001\n *\n * @name czm_epsilon3\n * @glslConstant\n */\nconst czm_epsilon3 = 0.001;\n",czm_epsilon4="/**\n * 0.0001\n *\n * @name czm_epsilon4\n * @glslConstant\n */\nconst czm_epsilon4 = 0.0001;\n",czm_epsilon5="/**\n * 0.00001\n *\n * @name czm_epsilon5\n * @glslConstant\n */\nconst czm_epsilon5 = 0.00001;\n",czm_epsilon6="/**\n * 0.000001\n *\n * @name czm_epsilon6\n * @glslConstant\n */\nconst czm_epsilon6 = 0.000001;\n",czm_epsilon7="/**\n * 0.0000001\n *\n * @name czm_epsilon7\n * @glslConstant\n */\nconst czm_epsilon7 = 0.0000001;\n",czm_infinity="/**\n * DOC_TBA\n *\n * @name czm_infinity\n * @glslConstant\n */\nconst float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?\n",czm_oneOverPi="/**\n * A built-in GLSL floating-point constant for 1/pi.\n *\n * @alias czm_oneOverPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverPi = ...;\n *\n * // Example\n * float pi = 1.0 / czm_oneOverPi;\n */\nconst float czm_oneOverPi = 0.3183098861837907;\n",czm_oneOverTwoPi="/**\n * A built-in GLSL floating-point constant for 1/2pi.\n *\n * @alias czm_oneOverTwoPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverTwoPi = ...;\n *\n * // Example\n * float pi = 2.0 * czm_oneOverTwoPi;\n */\nconst float czm_oneOverTwoPi = 0.15915494309189535;\n",czm_passCesium3DTile="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}\n *\n * @name czm_passCesium3DTile\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTile = 4.0;\n",czm_passCesium3DTileClassification="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}\n *\n * @name czm_passCesium3DTileClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassification = 5.0;\n",czm_passCesium3DTileClassificationIgnoreShow="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}\n *\n * @name czm_passCesium3DTileClassificationIgnoreShow\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n",czm_passClassification="/**\n * The automatic GLSL constant for {@link Pass#CLASSIFICATION}\n *\n * @name czm_passClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passClassification = 7.0;\n",czm_passCompute="/**\n * The automatic GLSL constant for {@link Pass#COMPUTE}\n *\n * @name czm_passCompute\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCompute = 1.0;\n",czm_passEnvironment="/**\n * The automatic GLSL constant for {@link Pass#ENVIRONMENT}\n *\n * @name czm_passEnvironment\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passEnvironment = 0.0;\n",czm_passGlobe="/**\n * The automatic GLSL constant for {@link Pass#GLOBE}\n *\n * @name czm_passGlobe\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGlobe = 2.0;\n",czm_passGround="/**\n * The automatic GLSL constant for {@link Pass#GROUND}\n *\n * @name czm_passGround\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGround = 4.0;\n",czm_passOpaque="/**\n * The automatic GLSL constant for {@link Pass#OPAQUE}\n *\n * @name czm_passOpaque\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOpaque = 12.0;\n",czm_passOverlay="/**\n * The automatic GLSL constant for {@link Pass#OVERLAY}\n *\n * @name czm_passOverlay\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOverlay = 20.0;",czm_passTerrainClassification="/**\n * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}\n *\n * @name czm_passTerrainClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTerrainClassification = 3.0;\n",czm_passTranslucent="/**\n * The automatic GLSL constant for {@link Pass#TRANSLUCENT}\n *\n * @name czm_passTranslucent\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTranslucent = 18.0;",czm_pi="/**\n * A built-in GLSL floating-point constant for Math.PI.\n *\n * @alias czm_pi\n * @glslConstant\n *\n * @see CesiumMath.PI\n *\n * @example\n * // GLSL declaration\n * const float czm_pi = ...;\n *\n * // Example\n * float twoPi = 2.0 * czm_pi;\n */\nconst czm_pi = 3.141592653589793;\n",czm_piOverFour="/**\n * A built-in GLSL floating-point constant for pi/4.\n *\n * @alias czm_piOverFour\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_FOUR\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverFour = ...;\n *\n * // Example\n * float pi = 4.0 * czm_piOverFour;\n */\nconst float czm_piOverFour = 0.7853981633974483;\n",czm_piOverSix="/**\n * A built-in GLSL floating-point constant for pi/6.\n *\n * @alias czm_piOverSix\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_SIX\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverSix = ...;\n *\n * // Example\n * float pi = 6.0 * czm_piOverSix;\n */\nconst float czm_piOverSix = 0.5235987755982988;\n",czm_piOverThree="/**\n * A built-in GLSL floating-point constant for pi/3.\n *\n * @alias czm_piOverThree\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_THREE\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverThree = ...;\n *\n * // Example\n * float pi = 3.0 * czm_piOverThree;\n */\nconst float czm_piOverThree = 1.0471975511965976;\n",czm_piOverTwo="/**\n * A built-in GLSL floating-point constant for pi/2.\n *\n * @alias czm_piOverTwo\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverTwo = ...;\n *\n * // Example\n * float pi = 2.0 * czm_piOverTwo;\n */\nconst float czm_piOverTwo = 1.5707963267948966;\n",czm_radiansPerDegree="/**\n * A built-in GLSL floating-point constant for converting degrees to radians.\n *\n * @alias czm_radiansPerDegree\n * @glslConstant\n *\n * @see CesiumMath.RADIANS_PER_DEGREE\n *\n * @example\n * // GLSL declaration\n * const float czm_radiansPerDegree = ...;\n *\n * // Example\n * float rad = czm_radiansPerDegree * deg;\n */\nconst czm_radiansPerDegree = 0.017453292519943295;\n",czm_sceneMode2D="/**\n * The constant identifier for the 2D {@link SceneMode}\n *\n * @name czm_sceneMode2D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode2D = 2.0;\n",czm_sceneMode3D="/**\n * The constant identifier for the 3D {@link SceneMode}\n *\n * @name czm_sceneMode3D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode3D = 3.0;\n",czm_sceneModeColumbusView="/**\n * The constant identifier for the Columbus View {@link SceneMode}\n *\n * @name czm_sceneModeColumbusView\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneModeColumbusView = 1.0;\n",czm_sceneModeMorphing="/**\n * The constant identifier for the Morphing {@link SceneMode}\n *\n * @name czm_sceneModeMorphing\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n */\nconst float czm_sceneModeMorphing = 0.0;\n",czm_solarRadius="/**\n * A built-in GLSL floating-point constant for one solar radius.\n *\n * @alias czm_solarRadius\n * @glslConstant\n *\n * @see CesiumMath.SOLAR_RADIUS\n *\n * @example\n * // GLSL declaration\n * const float czm_solarRadius = ...;\n */\nconst float czm_solarRadius = 695500000.0;\n",czm_threePiOver2="/**\n * A built-in GLSL floating-point constant for 3pi/2.\n *\n * @alias czm_threePiOver2\n * @glslConstant\n *\n * @see CesiumMath.THREE_PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_threePiOver2 = ...;\n *\n * // Example\n * float pi = (2.0 / 3.0) * czm_threePiOver2;\n */\nconst float czm_threePiOver2 = 4.71238898038469;\n",czm_twoPi="/**\n * A built-in GLSL floating-point constant for 2pi.\n *\n * @alias czm_twoPi\n * @glslConstant\n *\n * @see CesiumMath.TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_twoPi = ...;\n *\n * // Example\n * float pi = czm_twoPi / 2.0;\n */\nconst float czm_twoPi = 6.283185307179586;\n",czm_webMercatorMaxLatitude="/**\n * The maximum latitude, in radians, both North and South, supported by a Web Mercator\n * (EPSG:3857) projection. Technically, the Mercator projection is defined\n * for any latitude up to (but not including) 90 degrees, but it makes sense\n * to cut it off sooner because it grows exponentially with increasing latitude.\n * The logic behind this particular cutoff value, which is the one used by\n * Google Maps, Bing Maps, and Esri, is that it makes the projection\n * square. That is, the rectangle is equal in the X and Y directions.\n *\n * The constant value is computed as follows:\n * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))\n *\n * @name czm_webMercatorMaxLatitude\n * @glslConstant\n */\nconst float czm_webMercatorMaxLatitude = 1.4844222297453324;\n",czm_depthRangeStruct="/**\n * @name czm_depthRangeStruct\n * @glslStruct\n */\nstruct czm_depthRangeStruct\n{\n float near;\n float far;\n};\n",czm_ellipsoid="/** DOC_TBA\n *\n * @name czm_ellipsoid\n * @glslStruct\n */\nstruct czm_ellipsoid\n{\n vec3 center;\n vec3 radii;\n vec3 inverseRadii;\n vec3 inverseRadiiSquared;\n};\n",czm_material="/**\n * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.\n *\n * @name czm_material\n * @glslStruct\n *\n * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n * @property {float} specular Intensity of incoming light reflecting in a single direction.\n * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n * @property {float} alpha Opacity of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n */\nstruct czm_material\n{\n diffuse : vec3;\n specular : f32;\n shininess : f32;\n normal : vec3;\n emission : vec3;\n alpha : f32;\n};\n",czm_materialInput="/**\n * Used as input to every material's czm_getMaterial function.\n *\n * @name czm_materialInput\n * @glslStruct\n *\n * @property {float} s 1D texture coordinates.\n * @property {vec2} st 2D texture coordinates.\n * @property {vec3} str 3D texture coordinates.\n * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.\n * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.\n * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.\n * @property {float} height The height of the terrain in meters above or below the WGS84 ellipsoid. Only available for globe materials.\n * @property {float} slope The slope of the terrain normalized from 0 to 1. 0 is completely vertical, 1 is completely flat. Only available for globe materials.\n */\nstruct czm_materialInput\n{\n s : f32;\n st : vec2;\n str : vec3;\n normalEC : vec3;\n tangentToEyeMatrix : mat3x3;\n positionToEyeEC : vec3;\n height : f32;\n slope : f32;\n};\n",czm_ray="/**\n * DOC_TBA\n *\n * @name czm_ray\n * @glslStruct\n */\nstruct czm_ray\n{\n origin : vec3;\n direction : vec3;\n};\n",czm_raySegment="/**\n * DOC_TBA\n *\n * @name czm_raySegment\n * @glslStruct\n */\nstruct czm_raySegment\n{\n start : f32;\n stop : f32;\n};\n\n/**\n * DOC_TBA\n *\n * @name czm_emptyRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\n\n/**\n * DOC_TBA\n *\n * @name czm_fullRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n",czm_s3mMaterialInput="struct czm_s3mMaterialInput\n{\n vec4 ambientColor;\n vec4 diffuseColor;\n vec4 ambientLightColor;\n vec4 sunLightColor;\n mat4 texMatrix;\n float texture0Width;\n float texture1Width;\n vec3 sunDirectionEC;\n float sunLightON;\n};\n",czm_shadowParameters="struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\n texCoords : vec3,\n#else\n texCoords : vec2,\n#endif\n\n depthBias : f32,\n depth : f32,\n nDotL : f32,\n texelStepSize : vec2,\n normalShadingSmooth : f32,\n darkness : f32,\n shadowMapIndex : f32\n};\n",czm_acesTonemapping="// See:\n// https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/\n\nfn czm_acesTonemapping(inColor : vec3) -> vec3 {\n var color = inColor;\n var g = 0.985f;\n var a = 0.065f;\n var b = 0.0001f;\n var c = 0.433f;\n var d = 0.238f;\n color = (color * (color + a) - b) / (color * (g * color + c) + d);\n color = clamp(color, vec3(0.0f, 0.0f, 0.0f), vec3(1.0f, 1.0f, 1.0f));\n return color;\n}\n",czm_adjustColor="uniform float uBrightness;\nuniform float uContrast;\nuniform float uHue;\nuniform float uSaturation;\nuniform float uOneOverGamma;\nvec3 czm_adjustColor(vec3 inputColor)\n{\n vec3 outputColor = inputColor;\n outputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\n outputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\n outputColor.rgb = czm_hue(outputColor.rgb, uHue);\n outputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\n outputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\n outputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\n return outputColor;\n}",czm_alphaWeight="\nfn czm_alphaWeight(a : f32) -> f32\n{\n var z = (gl_FragCoord.z - Scene.uViewportTransformation[3][2]) / Scene.uViewportTransformation[2][2];\n\n // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:\n // http://jcgt.org/published/0002/02/09/\n return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n",czm_antialias="/**\n * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.\n *\n * @name czm_antialias\n * @glslFunction\n *\n * @param {vec4} color1 The color on one side of the edge.\n * @param {vec4} color2 The color on the other side of the edge.\n * @param {vec4} currentcolor The current color, either color1 or color2.\n * @param {float} dist The distance to the edge in texture coordinates.\n * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.\n * @returns {vec4} The anti-aliased color.\n *\n * @example\n * // GLSL declarations\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);\n *\n * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space\n * float dist = abs(textureCoordinates.t - 0.5);\n * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));\n * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);\n */\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\n float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\n float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\n val1 = val1 * (1.0 - val2);\n val1 = val1 * val1 * (3.0 - (2.0 * val1));\n val1 = pow(val1, 0.5); //makes the transition nicer\n \n vec4 midColor = (color1 + color2) * 0.5;\n return mix(midColor, currentColor, val1);\n}\n\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\n return czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n",czm_approximateSphericalCoordinates="/**\n * Approximately computes spherical coordinates given a normal.\n * Uses approximate inverse trigonometry for speed and consistency,\n * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.\n *\n * @name czm_approximateSphericalCoordinates\n * @glslFunction\n *\n * @param {vec3} normal arbitrary-length normal.\n *\n * @returns {vec2} Approximate latitude and longitude spherical coordinates.\n */\nvec2 czm_approximateSphericalCoordinates(vec3 normal) {\n // Project into plane with vertical for latitude\n float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\n float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\n return vec2(latitudeApproximation, longitudeApproximation);\n}\n",czm_branchFreeTernary="/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a float expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {float} a Value to return if the comparison is true.\n * @param {float} b Value to return if the comparison is false.\n *\n * @returns {float} equivalent of comparison ? a : b\n */\nfloat czm_branchFreeTernary(bool comparison, float a, float b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec2 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec2} a Value to return if the comparison is true.\n * @param {vec2} b Value to return if the comparison is false.\n *\n * @returns {vec2} equivalent of comparison ? a : b\n */\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec3 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec4 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n",czm_cascadeColor="\nvec4 czm_cascadeColor(vec4 weights)\n{\n return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\n vec4(0.0, 1.0, 0.0, 1.0) * weights.y +\n vec4(0.0, 0.0, 1.0, 1.0) * weights.z +\n vec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n",czm_cascadeDistance="\nuniform vec4 shadowMap_cascadeDistances;\n\nfloat czm_cascadeDistance(vec4 weights)\n{\n return dot(shadowMap_cascadeDistances, weights);\n}\n",czm_cascadeMatrix="\nuniform mat4 shadowMap_cascadeMatrices[4];\n\nmat4 czm_cascadeMatrix(vec4 weights)\n{\n return shadowMap_cascadeMatrices[0] * weights.x +\n shadowMap_cascadeMatrices[1] * weights.y +\n shadowMap_cascadeMatrices[2] * weights.z +\n shadowMap_cascadeMatrices[3] * weights.w;\n}\n",czm_cascadeWeights="\nuniform shadowMap_cascadeSplits : array, 2>;\n\nfn czm_cascadeWeights(depthEye : f32) -> vec4\n{\n // One component is set to 1.0 and all others set to 0.0.\n var near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\n var far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}\n",czm_clip="\nuniform clip_mode : f32;\nuniform clip_planes : array, 6>;\nuniform clip_line_color : vec4;\nconst clip_lineWidth = 3.0;\n\nfn GetClipDistance(pos : vec3, planeNormal : vec3, disToOrigin : f32) -> f32\n{\n\treturn dot(planeNormal, pos) + disToOrigin;\n}\n\nfn ClipBehindAllPlane(fBorderWidth : f32, clip_vertex : vec4) -> f32\n{\n\tvar distance = 0.0;\n\tvar result = -1.0;\n#ifdef CLIPPLANE\n\tdistance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[0].xyz, uniforms.clip_planes[0].w);\n\tif (distance < 0.0)\n\t{\n\t\treturn 1.0;\n\t}\n\telse if (distance < fBorderWidth)\n\t{\n\t\tresult = 0.0;\n\t}\n#else\n\tvar i : u32;\n\tfor(i = 0; i < 6; i++)\n\t{\n\t\tdistance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[i].xyz, uniforms.clip_planes[i].w);\n\t\tif(distance < 0.0)\n\t\t{\n\t\t\treturn 1.0;\n\t\t}\n\t\telse if(distance < fBorderWidth)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n#endif // CLIPPLANE\n\treturn result;\n}\n\nfn ClipBehindAnyPlane(fBorderWidth : f32, clip_vertex : vec4) -> f32\n{\n\tvar result = 1.0;\n\tvar i : u32;\n\tfor(i = 0; i < 6; i++)\n\t{\n\t\tvar distance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[i].xyz, uniforms.clip_planes[i].w);\n\t\tif((distance + fBorderWidth) < 0.0)\n\t\t{\n\t\t\treturn -1.0;\n\t\t}\n\t\telse if(distance < 0.0)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n\treturn result;\n}\n\nfn ClipAnythingButLine(fBorderWidth : f32, clip_vertex : vec4) -> f32\n{\n\tvar result = -1.0;\n\tvar i : u32;\n\tfor(i = 0; i < 6; i++)\n\t{\n\t\tvar distance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[i].xyz, uniforms.clip_planes[i].w);\n\t\tif(distance < 0.0)\n\t\t{\n\t\t\treturn -1.0;\n\t\t}\n\t\telse if(distance < fBorderWidth)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n\treturn result;\n}\n\nfn czm_clip(clip_vertex : vec4, fIsFiltByID : f32) -> vec4\n{\n if(fIsFiltByID < 0.1)\n {\n return vec4(1.0);\n }\n\tif(uniforms.clip_mode < 0.5)\n\t{\n\t\treturn vec4(1.0);\n\t}\n\n\tvar fBorderWidth = clip_lineWidth;\n\tvar clipResult = 1.0;\n\tif(uniforms.clip_line_color.a < 0.01)\n\t{\n\t\tfBorderWidth = 0.0;\n\t}\n\tif(uniforms.clip_mode < 1.5)\n\t{\n\t\tclipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n\t}\n\telse if(uniforms.clip_mode < 2.5)\n\t{\n\t\tclipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n\t}\n\telse if(uniforms.clip_mode < 3.5)\n\t{\n\t\tclipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n\t}\n\tif(clipResult < -0.5)\n\t{\n\t\tdiscard;\n\t}\n\telse if(clipResult < 0.5)\n\t{\n\t\treturn uniforms.clip_line_color;\n\t}\n\telse\n\t{\n return vec4(1.0);\n\t}\n}\n",czm_columbusViewMorph="\nfn czm_columbusViewMorph(position2D : vec4, position3D : vec4, time : f32) -> vec4\n{\n // Just linear for now.\n var p = mix(position2D.xyz, position3D.xyz, time);\n return vec4(p, 1.0);\n}\n",czm_computeNormal="\nfn czm_computeNormal(oriVertex : vec3) -> vec3 {\n var normal : vec3;\n normal = cross(vec3(dpdx(oriVertex.x), dpdx(oriVertex.y), dpdx(oriVertex.z)), vec3(dpdy(oriVertex.x), dpdy(oriVertex.y), dpdy(oriVertex.z)));\n normal = normalize(normal);\n return normal;\n}",czm_computePosition="/**\n * Returns a position in model coordinates relative to eye taking into\n * account the current scene mode: 3D, 2D, or Columbus view.\n *

\n * This uses standard position attributes, position3DHigh, \n * position3DLow, position2DHigh, and position2DLow, \n * and should be used when writing a vertex shader for an {@link Appearance}.\n *

\n *\n * @name czm_computePosition\n * @glslFunction\n *\n * @returns {vec4} The position relative to eye.\n *\n * @example\n * vec4 p = czm_computePosition();\n * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n *\n * @see czm_translateRelativeToEye\n */\nvec4 czm_computePosition();\n",czm_cosineAndSine="/**\n * @private\n */\nvec2 cordic(float angle)\n{\n// Scale the vector by the appropriate factor for the 24 iterations to follow.\n vec2 vector = vec2(6.0725293500888267e-1, 0.0);\n// Iteration 1\n float sense = (angle < 0.0) ? -1.0 : 1.0;\n // float factor = sense * 1.0; // 2^-0\n mat2 rotation = mat2(1.0, sense, -sense, 1.0);\n vector = rotation * vector;\n angle -= sense * 7.8539816339744828e-1; // atan(2^-0)\n// Iteration 2\n sense = (angle < 0.0) ? -1.0 : 1.0;\n float factor = sense * 5.0e-1; // 2^-1\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.6364760900080609e-1; // atan(2^-1)\n// Iteration 3\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.5e-1; // 2^-2\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4497866312686414e-1; // atan(2^-2)\n// Iteration 4\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.25e-1; // 2^-3\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2435499454676144e-1; // atan(2^-3)\n// Iteration 5\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.25e-2; // 2^-4\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.2418809995957350e-2; // atan(2^-4)\n// Iteration 6\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.125e-2; // 2^-5\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.1239833430268277e-2; // atan(2^-5)\n// Iteration 7\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.5625e-2; // 2^-6\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5623728620476831e-2; // atan(2^-6)\n// Iteration 8\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.8125e-3; // 2^-7\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.8123410601011111e-3; // atan(2^-7)\n// Iteration 9\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.90625e-3; // 2^-8\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.9062301319669718e-3; // atan(2^-8)\n// Iteration 10\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.953125e-3; // 2^-9\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9531225164788188e-3; // atan(2^-9)\n// Iteration 11\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.765625e-4; // 2^-10\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.7656218955931946e-4; // atan(2^-10)\n// Iteration 12\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.8828125e-4; // 2^-11\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.8828121119489829e-4; // atan(2^-11)\n// Iteration 13\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.44140625e-4; // 2^-12\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4414062014936177e-4; // atan(2^-12)\n// Iteration 14\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.220703125e-4; // 2^-13\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2207031189367021e-4; // atan(2^-13)\n// Iteration 15\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.103515625e-5; // 2^-14\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.1035156174208773e-5; // atan(2^-14)\n// Iteration 16\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.0517578125e-5; // 2^-15\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.0517578115526096e-5; // atan(2^-15)\n// Iteration 17\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.52587890625e-5; // 2^-16\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5258789061315762e-5; // atan(2^-16)\n// Iteration 18\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.62939453125e-6; // 2^-17\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.6293945311019700e-6; // atan(2^-17)\n// Iteration 19\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.814697265625e-6; // 2^-18\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.8146972656064961e-6; // atan(2^-18)\n// Iteration 20\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.9073486328125e-6; // 2^-19\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9073486328101870e-6; // atan(2^-19)\n// Iteration 21\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.5367431640625e-7; // 2^-20\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.5367431640596084e-7; // atan(2^-20)\n// Iteration 22\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.76837158203125e-7; // 2^-21\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.7683715820308884e-7; // atan(2^-21)\n// Iteration 23\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.384185791015625e-7; // 2^-22\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.3841857910155797e-7; // atan(2^-22)\n// Iteration 24\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.1920928955078125e-7; // 2^-23\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n// angle -= sense * 1.1920928955078068e-7; // atan(2^-23)\n\n return vector;\n}\n\n/**\n * Computes the cosine and sine of the provided angle using the CORDIC algorithm.\n *\n * @name czm_cosineAndSine\n * @glslFunction\n *\n * @param {float} angle The angle in radians.\n *\n * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).\n *\n * @example\n * vec2 v = czm_cosineAndSine(czm_piOverSix);\n * float cosine = v.x;\n * float sine = v.y;\n */\nvec2 czm_cosineAndSine(float angle)\n{\n if (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n {\n if (angle < 0.0)\n {\n return -cordic(angle + czm_pi);\n }\n else\n {\n return -cordic(angle - czm_pi);\n }\n }\n else\n {\n return cordic(angle);\n }\n}\n",czm_decompressTextureCoordinates="/**\n * Decompresses texture coordinates that were packed into a single float.\n *\n * @name czm_decompressTextureCoordinates\n * @glslFunction\n *\n * @param {float} encoded The compressed texture coordinates.\n * @returns {vec2} The decompressed texture coordinates.\n */\n fn czm_decompressTextureCoordinates(encoded : f32) -> vec2\n {\n var temp = encoded / 4096.0;\n var xZeroTo4095 = floor(temp);\n var stx = xZeroTo4095 / 4095.0;\n var sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\n return vec2(stx, sty);\n }\n",czm_depthClampFarPlane="// emulated noperspective\n#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\n\n/**\n * Clamps a vertex to the far plane.\n *\n * @name czm_depthClampFarPlane\n * @glslFunction\n *\n * @param {vec4} coords The vertex in clip coordinates.\n * @returns {vec4} The vertex clipped to the far plane.\n *\n * @example\n * gl_Position = czm_depthClampFarPlane(czm_modelViewProjection * vec4(position, 1.0));\n *\n * @see czm_writeDepthClampedToFarPlane\n */\nvec4 czm_depthClampFarPlane(vec4 coords)\n{\n#ifndef LOG_DEPTH\n v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\n coords.z = min(coords.z, coords.w);\n#endif\n return coords;\n}\n",czm_eastNorthUpToEyeCoordinates="/**\n * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system \n * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the \n * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.\n *

\n * The ellipsoid is assumed to be centered at the model coordinate's origin.\n *\n * @name czm_eastNorthUpToEyeCoordinates\n * @glslFunction\n *\n * @param {vec3} positionMC The position on the ellipsoid in model coordinates.\n * @param {vec3} normalEC The normalized ellipsoid surface normal, at positionMC, in eye coordinates.\n *\n * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.\n *\n * @example\n * // Transform a vector defined in the east-north-up coordinate \n * // system, (0, 0, 1) which is the surface normal, to eye \n * // coordinates.\n * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);\n */\nmat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\n vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates\n vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordiantes\n vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates\n\n return mat3(\n tangentEC.x, tangentEC.y, tangentEC.z,\n bitangentEC.x, bitangentEC.y, bitangentEC.z,\n normalEC.x, normalEC.y, normalEC.z);\n}\n",czm_ellipsoidContainsPoint="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidContainsPoint\n * @glslFunction\n *\n */\nbool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\n vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\n return (dot(scaled, scaled) <= 1.0);\n}\n",czm_ellipsoidNew="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidNew\n * @glslFunction\n *\n */\nczm_ellipsoid czm_ellipsoidNew(vec3 center, vec3 radii)\n{\n vec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n vec3 inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(center, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n",czm_ellipsoidWgs84TextureCoordinates="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidWgs84TextureCoordinates\n * @glslFunction\n */\nvec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\n return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n",czm_equalsEpsilon="/**\n * Compares left and right componentwise. Returns true\n * if they are within epsilon and false otherwise. The inputs\n * left and right can be floats, vec2s,\n * vec3s, or vec4s.\n *\n * @name czm_equalsEpsilon\n * @glslFunction\n *\n * @param {} left The first vector.\n * @param {} right The second vector.\n * @param {float} epsilon The epsilon to use for equality testing.\n * @returns {bool} true if the components are within epsilon and false otherwise.\n *\n * @example\n * // GLSL declarations\n * bool czm_equalsEpsilon(float left, float right, float epsilon);\n * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);\n * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);\n * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);\n */\nbool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\n\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\n return (abs(left - right) <= epsilon);\n}\n",czm_ExcavationFS="uniform sampler2D uColorTexture;\nuniform sampler2D uRasterTexture;\nvarying float vHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying float regionHeight;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uRasterTexture, vTexCoord0));\n if(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n }\n if (vHeight > terrainHeight || vHeight < regionHeight) { \n discard;\n }\n vec4 baseColorWithAlpha = texture2D(uColorTexture, vTexCoord1);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(vTexCoord1.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(vTexCoord1.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, vTexCoord1.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n if(gl_FrontFacing)\n {\n n = -n;\n }\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}\n",czm_ExcavationVS="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nattribute vec2 aTexCoord1;\nvarying float vHeight;\nvarying float regionHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vHeight = aPosition.w;\n vTexCoord0 = aTexCoord0.xy;\n vTexCoord1 = aTexCoord1;\n regionHeight = aTexCoord0.z;\n gl_Position = pos;\n v_positionMC = vec4(aPosition.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\n}\n",czm_executeExcavation="#ifdef EXCAVATION\nvar uExcavationTexture : texture_2d;\nvar uExcavationTextureSampler : sampler;\n\nvarying vExcavationVertexPos : vec4;\nfn CalculateExcavationPolyTexCoord(vertexPos :vec4, rectPos : vec4) -> vec3\n{\n var vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n var texCoord = vec2(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n var ptInRect : f32 = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n var result = vec3(texCoord.xy, ptInRect);\n return result;\n}\nfn czm_executeExcavation() -> bool\n{\n var vecExcavationTexCoord = CalculateExcavationPolyTexCoord(vExcavationVertexPos, Layer.uExcavationRect);\n var hasExcavation = vecExcavationTexCoord.z;\n var excavationInside : bool = (Layer.uExcavationMode < 0.5);\n var regionColor = textureSample(uExcavationTexture, uExcavationTextureSampler, vecExcavationTexCoord.xy).r;\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n if(excavationInside)\n {\n return regionColor > 0.5;\n }\n else\n {\n return regionColor < 0.5;\n }\n}\n#endif",czm_eyeOffset="/**\n * DOC_TBA\n *\n * @name czm_eyeOffset\n * @glslFunction\n *\n * @param {vec4} positionEC DOC_TBA.\n * @param {vec3} eyeOffset DOC_TBA.\n *\n * @returns {vec4} DOC_TBA.\n */\nvec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\n // This equation is approximate in x and y.\n vec4 p = positionEC;\n vec4 zEyeOffset = normalize(p) * eyeOffset.z;\n p.xy += eyeOffset.xy + zEyeOffset.xy;\n p.z += zEyeOffset.z;\n return p;\n}\n",czm_eyeToWindowCoordinates="/**\n * Transforms a position from eye to window coordinates. The transformation\n * from eye to clip coordinates is done using {@link czm_projection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of near = 0 and far = 1.\n *

\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *\n * @name czm_eyeToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in eye coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_projection\n * @see czm_viewportTransformation\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n */\nfn czm_eyeToWindowCoordinates(positionEC : vec4) -> vec4\n{\n var q = uniforms.czm_projection * positionEC; // clip coordinates\n var qxyz = q.xyz;\n q = vec4(qxyz / q.w, q.w); // normalized device coordinates\n q = vec4((uniforms.czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz, q.w); // window coordinates\n return q;\n}\n",czm_fastApproximateAtan="/**\n * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.\n *\n * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on\n * \"Efficient approximations for the arctangent function,\" Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.\n * Adapted from ShaderFastLibs under MIT License.\n *\n * Chosen for the following characteristics over range [0, 1]:\n * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)\n * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)\n *\n * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);\n * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between 0 and 1 inclusive.\n *\n * @returns {float} Approximation of atan(x)\n */\nfloat czm_fastApproximateAtan(float x) {\n return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\n\n/**\n * Approximation of atan2.\n *\n * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html\n * However, we replaced their atan curve with Michael Drobot's (see above).\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between -1 and 1 inclusive.\n * @param {float} y Value between -1 and 1 inclusive.\n *\n * @returns {float} Approximation of atan2(x, y)\n */\nfloat czm_fastApproximateAtan(float x, float y) {\n // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.\n // So range-reduce using abs and by flipping whether x or y is on top.\n float t = abs(x); // t used as swap and atan result.\n float opposite = abs(y);\n float adjacent = max(t, opposite);\n opposite = min(t, opposite);\n\n t = czm_fastApproximateAtan(opposite / adjacent);\n\n // Undo range reduction\n t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\n t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\n t = czm_branchFreeTernary(y < 0.0, -t, t);\n return t;\n}\n",czm_floodAnalysis="#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nvoid czm_getFloodWaterColor(inout vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n}\n#endif\n}",czm_fog="/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nfn czm_fog(distanceToCamera : f32, color : vec3, fogColor : vec3) -> vec3\n{\n var scalar = distanceToCamera * czm_fogDensity;\n var fog = 1.0 - exp(-(scalar * scalar));\n return mix(color, fogColor, fog);\n}\n\n/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n * @param {float} fogModifierConstant A constant to modify the appearance of fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\n fn czm_fog(distanceToCamera : f32, color : vec3, fogColor : vec3, fogModifierConstant : f32) -> vec3\n{\n var scalar = distanceToCamera * czm_fogDensity;\n var fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\n return mix(color, fogColor, fog);\n}\n",czm_gammaCorrect="/**\n * Converts a color from RGB space to linear space.\n *\n * @name czm_gammaCorrect\n * @glslFunction\n *\n * @param {vec3} color The color in RGB space.\n * @returns {vec3} The color in linear space.\n */\n// vec3 czm_gammaCorrect(vec3 color) {\n// #ifdef HDR\n// color = pow(color, vec3(czm_gamma));\n// #endif\n// return color;\n// }\n\nfn czm_gammaCorrect(color : vec4) -> vec4 {\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3(czm_gamma));\n#endif\n return color;\n}\n",czm_geodeticSurfaceNormal="/**\n * DOC_TBA\n *\n * @name czm_geodeticSurfaceNormal\n * @glslFunction\n *\n * @param {vec3} positionOnEllipsoid DOC_TBA\n * @param {vec3} ellipsoidCenter DOC_TBA\n * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA\n * \n * @returns {vec3} DOC_TBA.\n */\nfn czm_geodeticSurfaceNormal(positionOnEllipsoid : vec3, ellipsoidCenter : vec3, oneOverEllipsoidRadiiSquared : vec3) -> vec3\n{\n return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial="/**\n * An czm_material with default values. Every material's czm_getMaterial\n * should use this default material as a base for the material it returns.\n * The default normal value is given by materialInput.normalEC.\n *\n * @name czm_getDefaultMaterial\n * @glslFunction\n *\n * @param {czm_materialInput} input The input used to construct the default material.\n *\n * @returns {czm_material} The default material.\n *\n * @see czm_materialInput\n * @see czm_material\n * @see czm_getMaterial\n */\nczm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\n czm_material material;\n material.diffuse = vec3(0.0);\n material.specular = 0.0;\n material.shininess = 1.0;\n material.normal = materialInput.normalEC;\n material.emission = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n",czm_getEmissiveTextureColor="uniform float uMaxCategoryOrHypCeil;\nuniform float uMinCategoryOrHypFloor;\nuniform sampler2D uEmissionTexAtlas;\n#if EMISSION_TEXTURE_COUNT > 0\nuniform vec4 uEmissionTexAtlasTilingAndOffset[EMISSION_TEXTURE_COUNT];\nuniform vec4 uEmissionTexAtlasRects[EMISSION_TEXTURE_COUNT];\n#endif\nuniform float uLayerCornerLength;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 czm_getEmissiveTextureColor(float w)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n #if EMISSION_TEXTURE_COUNT > 0\n for(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n #endif\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n return texColor;\n}\nvec3 czm_getEmissiveTextureColor(float w, vec2 texCoord)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n #if EMISSION_TEXTURE_COUNT > 0\n for(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n #endif\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n return texColor;\n}",czm_getFusionModePostiion="\n#ifdef FusionMode\n uniform mat4 uModelView;\n uniform vec2 uPanOffset;\n\n czm_getFusionModePosition(vec4 vertexPos)\n {\n vec4 positionCC = czm_projection * uModelView * vertexPos;\n positionCC.x += (2.0 * uPanOffset.x * positionCC.w);\n positionCC.y += (-2.0 * uPanOffset.y * positionCC.w);\n return positionCC;\n }\n#endif\n",czm_getHorizontalColor="uniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 czm_getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}",czm_getHypsometricColor="uniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypsometricVisible;\nuniform float uHypOpacity;\nuniform float uHypContourInterval;\nuniform vec4 uHypLineColor;\nuniform float uHypContourFillMode;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypHasAnalysisRegion;\nvarying vec2 vecHypTexCoord;\nuniform float uMixColorType;\nuniform vec4 uNoValueColor;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uVolumeType;\n#endif\n\n#ifdef Volume2\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uFilterMode;\n#endif\n\nfloat computeMixCon(float fValue)\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n\t if(fValue < 0.5)\n {\n distanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n }\n else\n {\n float t = floor(fValue / uHypContourInterval);\n distanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n }\n\t}\n\telse\n\t{\n\t distanceToContour = abs(fValue - uHypMaxVisibleValue);\n\t}\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float fValue)\n{\n\t//float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat threshold = abs(uHypCeil - uHypFloor);\n\tfloat contourRate = (fValue - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tfloat count = floor(finalCoord * 16.0);\n\tfloat y = (count*2.0 + 1.0)/32.0;\n\tfloat x = fract(finalCoord*16.0);\n\tif(y > 1.0)\n\t{\n\t x = 1.0;\n\t}\n\tvec2 contourCoord = vec2(x, y);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n#ifdef Volume2\n\nvec4 czm_getContourMapColor(vec4 oriColor, vec4 volColor)\n{\n if(uFilterMode > 0.5)\n {\n vec4 finalColor = volColor * oriColor;\n\n if(uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n\n\tfloat noValue = volColor.a;\n\tfloat texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\n\n\tfloat fValue;\n\tif(noValue > 0.5)\n\t{\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n vec4 finalColor = mixColor * oriColor;\n#ifdef PT_CLOUD\n\tfinalColor = mixColor;\n#endif\n if(uMixColorType > 0.5)\n {\n finalColor = mixColor;\n }\n return finalColor;\n}\n\n#else\n\nvec4 czm_getContourMapColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n#ifdef Volume\n\tvec3 aRatioT = vecRotioCoord;\n\tif((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n\t{\n\t if(uVolumeType > 0.5)\n\t {\n\t\t\tvec4 volumeColor = czm_getVolumeValue(aRatioT);\n\t\t\tif(uMixColorType > 0.5)\n\t\t\t{\n\t\t\t\tvolumeColor = volumeColor * oriColor;\n\t\t\t}\n\t\t\treturn volumeColor;\n\t }\n\t float noValue;\n\t float texTest = czm_getVolumeValue(aRatioT, noValue);\n\t if(noValue > 0.5)\n\t {\n\t fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n\t }\n\t else\n\t {\n\t fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n\t }\n\t}\n\telse\n\t{\n\t fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n\t}\n#endif\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n vec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n\tfinalColor = mixColor;\n#endif\n#ifdef Volume\n if(uMixColorType > 0.5)\n {\n finalColor = mixColor;\n }\n#endif\n return finalColor;\n}\n\n#endif\n\n#ifdef Volume2\nvec4 czm_getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\n\tif(uHypHasAnalysisRegion > 0.1)\n {\n\t\tvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n\t\tif(hypColor.r < 0.1)\n\t\t{\n\t\t\treturn oriColor;\n\t\t}\n\t}\n return czm_getContourMapColor(oriColor, volColor);\n}\n#else\nvec4 czm_getHypsometricColor(vec4 oriColor, float wValue)\n{\n float fValue = wValue;\n\tif(uHypHasAnalysisRegion > 0.1)\n {\n\t\tvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n\t\tif(hypColor.r < 0.1)\n\t\t{\n\t\t\treturn oriColor;\n\t\t}\n\t}\n return czm_getContourMapColor(oriColor, fValue);\n}\n\nvec4 czm_getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return czm_getContourMapColor(oriColor, wValue);\n}\n\n#endif",czm_getLambertDiffuse="/**\n * Calculates the intensity of diffusely reflected light.\n *\n * @name czm_getLambertDiffuse\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n *\n * @returns {float} The intensity of the diffuse reflection.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfn czm_getLambertDiffuse(lightDirectionEC : vec3, normalEC : vec3) -> f32\n{\n return max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getPBRParamFromTexture="\n#ifdef USE_BatchPBR\n var uPBRTexture : texture_2d;\n var uPBRTextureSampler : sampler;\n varying vMetallicRoughness : vec2;\n varying vEmissiveFactor : vec4;\n varying vAlphaCutoffAndModeAndDoubleSide : vec3;\n fn czm_getPBRParamFromTexture(uv : vec2)\n {\n var x = (uv.x * 2.0f + 0.5f)/ Material.uPBRTexWH.x;\n var y = (uv.x * 2.0f + 1.5f)/ Material.uPBRTexWH.x;\n var pbrParam = textureSampleLevel(uPBRTexture, uPBRTextureSampler, vec2(x, 0.5f), 0.0f);\n vMetallicRoughness = pbrParam.rg;\n vAlphaCutoffAndModeAndDoubleSide.x = pbrParam.b;\n var temp = pbrParam.a / 65536.0f;\n vAlphaCutoffAndModeAndDoubleSide.y = floor(temp);\n vAlphaCutoffAndModeAndDoubleSide.z = (temp- vAlphaCutoffAndModeAndDoubleSide.y) * 65536.0f;\n vEmissiveFactor = textureSampleLevel(uPBRTexture, uPBRTextureSampler, vec2(y, 0.5f), 0.0f);\n }\n#endif\n",czm_getSpecular="/**\n * Calculates the specular intensity of reflected light.\n *\n * @name czm_getSpecular\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n *\n * @returns {float} The intensity of the specular highlight.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\n vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\n float specular = max(dot(toReflectedLight, toEyeEC), 0.0);\n\n // pow has undefined behavior if both parameters <= 0.\n // Prevent this by making sure shininess is at least czm_epsilon2.\n return pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getVolumeValue="\nuniform sampler2D uVolumeTexture;\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uVolumeTimeRatio;\n#endif\n\n#ifdef Volume\nuniform float uVolumeWidth;\nuniform float uVolumeHeight;\nuniform float uVolumeDepth;\nuniform float uVolumeSideBlockCount;\nuniform float uVolumeBlockLength;\nuniform float uVolumeTexLength;\nuniform float uVolumeFilterMode;\n#endif\n\nfloat czm_unpackVolume(vec3 packedDepth)\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\n#ifdef Volume\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\n float yOffset = floor((fLevel+0.25/uVolumeSideBlockCount) / uVolumeSideBlockCount);\n float xOffset = fLevel - yOffset * uVolumeSideBlockCount;\n float texCoordV = (texCoord.y * uVolumeHeight + yOffset * uVolumeBlockLength) / uVolumeTexLength;\n float texCoordU = (texCoord.x * uVolumeWidth + xOffset * uVolumeBlockLength) / uVolumeTexLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\n vec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\n vec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\n float fValue1 = clamp(czm_unpackVolume(volumeValue1.xyz),0.0,1.0);\n float fValue2 = clamp(czm_unpackVolume(volumeValue2.xyz),0.0,1.0);\n if(uVolumeFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n noValue = mix(volumeValue1.a, volumeValue2.a, ratio);\n if(volumeValue1.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(volumeValue2.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfloat czm_getVolumeValue(vec3 texCoord, out float noValue)\n{\n float fLevel = (uVolumeDepth - 1.0) * texCoord.z;\n float bottomLevel= floor(fLevel);\n float topLevel = bottomLevel + 1.0;\n float ratio = topLevel - fLevel;\n vec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n vec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n float fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n fResult = mix(fResult, fNextResult, uVolumeTimeRatio);\n#endif\n return fResult;\n}\n\nvec4 czm_getVolumeValue(vec3 texCoord)\n{\n\tfloat fLevel = (uVolumeDepth - 1.0) * texCoord.z;\n\tfloat bottomLevel= floor(fLevel);\n\tfloat topLevel = bottomLevel + 1.0;\n\tfloat ratio = topLevel - fLevel;\n\tfloat yOffset1 = floor((topLevel+0.25/uVolumeSideBlockCount) / uVolumeSideBlockCount);\n\tfloat xOffset1 = topLevel - yOffset1 * uVolumeSideBlockCount;\n\tfloat texCoordV1 = (texCoord.y * uVolumeHeight + yOffset1 * uVolumeBlockLength)/uVolumeTexLength;\n\tfloat texCoordU1 = (texCoord.x * uVolumeWidth + xOffset1 * uVolumeBlockLength)/uVolumeTexLength;\n\tvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\n\tfloat yOffset2 = floor((bottomLevel+0.25/uVolumeSideBlockCount) / uVolumeSideBlockCount);\n\tfloat xOffset2 = bottomLevel - yOffset2 * uVolumeSideBlockCount;\n\tfloat texCoordV2 = (texCoord.y * uVolumeHeight + yOffset2 * uVolumeBlockLength)/uVolumeTexLength;\n\tfloat texCoordU2 = (texCoord.x * uVolumeWidth + xOffset2 * uVolumeBlockLength)/uVolumeTexLength;\n\tvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\n\n\tif(uVolumeFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif\n",czm_getWaterNoise="/**\n * @private\n */\nvec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n\n // time dependent sampling directions\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n\n // rotate sampling direction by specified angle\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (texture2D(normalMap, uv0)) +\n (texture2D(normalMap, uv1)) +\n (texture2D(normalMap, uv2)) +\n (texture2D(normalMap, uv3));\n\n // average and scale to between -1 and 1\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_getWgs84EllipsoidEC="/**\n * Returns the WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @name czm_getWgs84EllipsoidEC\n * @glslFunction\n *\n * @returns {czm_ellipsoid} The WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @see Ellipsoid.WGS84\n *\n * @example\n * czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n */\nfn czm_getWgs84EllipsoidEC() -> czm_ellipsoid\n{\n var radii = vec3(6378137.0, 6378137.0, 6378137.0);\n var inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n var inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(czm_view[3].xyz, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n",czm_HSBToRGB="\nfn czm_HSBToRGB(hsb : vec3) -> vec3\n{\n var K_HSB2RGB = vec4(1.0, 0.66667, 0.33333, 3.0);\n var p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\n return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, vec3(0.0), vec3(1.0)), hsb.y);\n}\n",czm_HSLToRGB="/**\n * Converts an HSL color (hue, saturation, lightness) to RGB\n * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}\n *\n * @name czm_HSLToRGB\n * @glslFunction\n * \n * @param {vec3} rgb The color in HSL.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n\nvec3 hueToRGB(float hue)\n{\n float r = abs(hue * 6.0 - 3.0) - 1.0;\n float g = 2.0 - abs(hue * 6.0 - 2.0);\n float b = 2.0 - abs(hue * 6.0 - 4.0);\n return clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 czm_HSLToRGB(vec3 hsl)\n{\n vec3 rgb = hueToRGB(hsl.x);\n float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\n return (rgb - 0.5) * c + hsl.z;\n}\n",czm_hue="/**\n * Adjusts the hue of a color.\n * \n * @name czm_hue\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the hue of the color in radians.\n *\n * @returns {float} The color with the hue adjusted.\n *\n * @example\n * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)\n */\nfn czm_hue(rgb : vec3, adjustment : f32) -> vec3\n{\n var toYIQ = mat3x3(0.299, 0.587, 0.114,\n 0.595716, -0.274453, -0.321263,\n 0.211456, -0.522591, 0.311135);\n var toRGB = mat3x3(1.0, 0.9563, 0.6210,\n 1.0, -0.2721, -0.6474,\n 1.0, -1.107, 1.7046);\n \n var yiq = toYIQ * rgb;\n var hue = atan2(yiq.z, yiq.y) + adjustment;\n var chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\n \n var color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\n return toRGB * color;\n}\n",czm_inverseGamma="/**\n * Converts a color in linear space to RGB space.\n *\n * @name czm_inverseGamma\n * @glslFunction\n *\n * @param {vec3} color The color in linear space.\n * @returns {vec3} The color in RGB space.\n */\nvec3 czm_inverseGamma(vec3 color) {\n return pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_inverseMatrix="mat3 czm_inverseMatrix(mat3 m)\n{\n float Determinant =\n m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\n - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\n + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\n\n mat3 Inverse;\n Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);\n Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);\n Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);\n Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);\n Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);\n Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);\n Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\n Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);\n Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);\n Inverse /= Determinant;\n\n return Inverse;\n}\n\nmat4 czm_inverseMatrix(mat4 m)\n{\n float Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\n float Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\n float Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\n\n float Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\n float Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\n float Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\n\n float Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\n float Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\n float Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\n\n float Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\n float Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\n float Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\n\n float Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\n float Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\n float Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\n\n float Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\n float Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\n float Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\n\n const vec4 SignA = vec4( 1.0, -1.0, 1.0, -1.0);\n const vec4 SignB = vec4(-1.0, 1.0, -1.0, 1.0);\n\n vec4 Fac0 = vec4(Coef00, Coef00, Coef02, Coef03);\n vec4 Fac1 = vec4(Coef04, Coef04, Coef06, Coef07);\n vec4 Fac2 = vec4(Coef08, Coef08, Coef10, Coef11);\n vec4 Fac3 = vec4(Coef12, Coef12, Coef14, Coef15);\n vec4 Fac4 = vec4(Coef16, Coef16, Coef18, Coef19);\n vec4 Fac5 = vec4(Coef20, Coef20, Coef22, Coef23);\n\n vec4 Vec0 = vec4(m[1][0], m[0][0], m[0][0], m[0][0]);\n vec4 Vec1 = vec4(m[1][1], m[0][1], m[0][1], m[0][1]);\n vec4 Vec2 = vec4(m[1][2], m[0][2], m[0][2], m[0][2]);\n vec4 Vec3 = vec4(m[1][3], m[0][3], m[0][3], m[0][3]);\n\n vec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);\n vec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);\n vec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);\n vec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);\n\n mat4 Inverse = mat4(Inv0, Inv1, Inv2, Inv3);\n\n vec4 Row0 = vec4(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);\n\n float Determinant = dot(m[0], Row0);\n\n Inverse /= Determinant;\n\n return Inverse;\n}\n",czm_isEmpty="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isEmpty\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} true if the time interval is empty; otherwise, false.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isEmpty(czm_raySegment interval)\n{\n return (interval.stop < 0.0);\n}\n",czm_isFull="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isFull\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} true if the time interval is empty; otherwise, false.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isFull(czm_raySegment interval)\n{\n return (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction="/**\n * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.\n *\n * @name czm_latitudeToWebMercatorFraction\n * @glslFunction\n *\n * @param {float} latitude The geodetic latitude, in radians.\n * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.\n * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.\n *\n * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern\n * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return\n * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.\n */ \nfn czm_latitudeToWebMercatorFraction(latitude : f32, southMercatorY : f32, oneOverMercatorHeight : f32) -> f32\n{\n var sinLatitude = sin(latitude);\n var mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\n \n return (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_LineCallOutVp="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute float aColor;\nuniform float uLineWidth;\nvarying float vColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nvoid main()\n{\n bool bUsePre = aTexCoord0.x < 0.1;\n float offset = bUsePre ? -uLineWidth : uLineWidth;\n vec4 viewPos1 = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tviewPos1.x = viewPos1.x + offset * computerOnePixelLength();\n\tgl_Position = czm_projection * viewPos1;\n\tvColor = aColor;\n}\n\n\n\n",czm_lineDistance="/**\n * Computes distance from an point in 2D to a line in 2D.\n *\n * @name czm_lineDistance\n * @glslFunction\n *\n * param {vec2} point1 A point along the line.\n * param {vec2} point2 A point along the line.\n * param {vec2} point A point that may or may not be on the line.\n * returns {float} The distance from the point to the line.\n */\nfloat czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\n return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_luminance="/**\n * Computes the luminance of a color. \n *\n * @name czm_luminance\n * @glslFunction\n *\n * @param {vec3} rgb The color.\n * \n * @returns {float} The luminance.\n *\n * @example\n * float light = czm_luminance(vec3(0.0)); // 0.0\n * float dark = czm_luminance(vec3(1.0)); // ~1.0 \n */\nfloat czm_luminance(vec3 rgb)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n return dot(rgb, W);\n}\n",czm_metersPerPixel="/**\n * Computes the size of a pixel in meters at a distance from the eye.\n *

\n * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.\n *

\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n * @param {float} pixelRatio The scaling factor from pixel space to coordinate space\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfn czm_metersPerPixel(positionEC : vec4, pixelRatio : f32) -> f32\n{\n var width = czm_viewport.z;\n var height = czm_viewport.w;\n var pixelWidth;\n var pixelHeight;\n\n var top = czm_frustumPlanes.x;\n var bottom = czm_frustumPlanes.y;\n var left = czm_frustumPlanes.z;\n var right = czm_frustumPlanes.w;\n\n if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n {\n var frustumWidth = right - left;\n var frustumHeight = top - bottom;\n pixelWidth = frustumWidth / width;\n pixelHeight = frustumHeight / height;\n }\n else\n {\n var distanceToPixel = -positionEC.z;\n var inverseNear = 1.0 / czm_currentFrustum.x;\n var tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n }\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}\n\n/**\n * Computes the size of a pixel in meters at a distance from the eye.\n *

\n * Use this version when scaling by pixel ratio.\n *

\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfn czm_metersPerPixel(positionEC : vec4) -> f32\n{\n return czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates="/**\n * Transforms a position from model to window coordinates. The transformation\n * from model to clip coordinates is done using {@link czm_modelViewProjection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of near = 0 and far = 1.\n *

\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *

\n * This function should not be confused with {@link czm_viewportOrthographic},\n * which is an orthographic projection matrix that transforms from window \n * coordinates to clip coordinates.\n *\n * @name czm_modelToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in model coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_eyeToWindowCoordinates\n * @see czm_modelViewProjection\n * @see czm_viewportTransformation\n * @see czm_viewportOrthographic\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);\n */\nfn czm_modelToWindowCoordinates(vec4 position) -> vec4\n{\n var q = uniforms.czm_modelViewProjection * position; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (uniforms.czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n",czm_multiplyWithColorBalance="/**\n * DOC_TBA\n *\n * @name czm_multiplyWithColorBalance\n * @glslFunction\n */\nvec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n \n vec3 target = left * right;\n float leftLuminance = dot(left, W);\n float rightLuminance = dot(right, W);\n float targetLuminance = dot(target, W);\n \n return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar="/**\n * Computes a value that scales with distance. The scaling is clamped at the near and\n * far distances, and does not extrapolate. This function works with the\n * {@link NearFarScalar} JavaScript class.\n *\n * @name czm_nearFarScalar\n * @glslFunction\n *\n * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).\n * @param {float} cameraDistSq The square of the current distance from the camera.\n *\n * @returns {float} The value at this distance.\n */\nfloat czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\n float valueAtMin = nearFarScalar.y;\n float valueAtMax = nearFarScalar.w;\n float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\n float farDistanceSq = nearFarScalar.z * nearFarScalar.z;\n\n float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\n\n t = pow(clamp(t, 0.0, 1.0), 0.2);\n\n return mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode="\n\nfn signNotZero_v2(value : vec2) -> vec2\n{\n return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\n\nfn czm_octDecode(inEncoded : vec2, range : f32) -> vec3\n{\n if (inEncoded.x == 0.0 && inEncoded.y == 0.0) {\n return vec3(0.0, 0.0, 0.0);\n }\n var encoded = inEncoded / range * 2.0 - 1.0;\n var v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\n if (v.z < 0.0)\n {\n var temp = (vec2(1.0) - abs(v.yx)) * signNotZero_v2(v.xy);\n v.x = temp.x;\n v.y = temp.y;\n }\n\n return normalize(v);\n}\n// wgsl不支持重载\n// fn czm_octDecode(encoded : f32) -> vec3\n// {\n// var temp = encoded / 256.0;\n// var x = floor(temp);\n// var y = (temp - x) * 256.0;\n// return czm_octDecode(vec2(x, y));\n// }\n\n// fn czm_octDecode(encoded : vec2, vector1 : ptr>, vector2 : ptr>, vector3 : ptr>)\n// {\n// var temp = encoded.x / 65536.0;\n// var x = floor(temp);\n// var encodedFloat1 = (temp - x) * 65536.0;\n\n// temp = encoded.y / 65536.0;\n// var y = floor(temp);\n// var encodedFloat2 = (temp - y) * 65536.0;\n\n// vector1 = czm_octDecode(encodedFloat1);\n// vector2 = czm_octDecode(encodedFloat2);\n// vector3 = czm_octDecode(vec2(x, y));\n// }\n",czm_packDepth="\nfn czm_packDepth(depth : f32) -> vec4\n{\n var enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n return enc;\n}\n",czm_packValue="/**\n * Packs a float value into a vec3 that can be represented by unsigned bytes.\n *\n * @name czm_packValue\n * @glslFunction\n *\n * @param {float} value The floating-point value.\n * @returns {vec3} The packed value.\n */\nvec4 czm_packValue(float value)\n{\n float SHIFT_LEFT8 = 256.0;\n\tfloat SHIFT_RIGHT8 = 1.0 / 256.0;\n\tvec4 result;\n\tresult.a = 255.0;\n\tfloat fPos = abs(value + 9000.0) * SHIFT_RIGHT8;\n\tresult.b = (fPos - floor(fPos)) * SHIFT_LEFT8;\n\tfPos = floor(fPos) * SHIFT_RIGHT8;\n\tresult.g = (fPos - floor(fPos)) * SHIFT_LEFT8;\n\tresult.r = floor(fPos);\n\tresult /= 255.0;\n\treturn result;\n}\n",czm_phong="float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\n return czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\n\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\n return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\n\n/**\n * Computes a color using the Phong lighting model.\n *\n * @name czm_phong\n * @glslFunction\n *\n * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.\n * @param {czm_material} material The fragment's material.\n *\n * @returns {vec4} The computed color.\n *\n * @example\n * vec3 positionToEyeEC = // ...\n * czm_material material = // ...\n * vec3 lightDirectionEC = // ...\n * gl_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);\n *\n * @see czm_getMaterial\n */\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down)\n float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n }\n\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n vec3 ambient = vec3(0.0);\n vec3 color = ambient + material.emission;\n color += material.diffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_planeDistance="/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec4 plane, vec3 point) {\n return (dot(plane.xyz, point) + plane.w);\n}\n\n/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js\n * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\n return (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay="/**\n * Computes the point along a ray at the given time. time can be positive, negative, or zero.\n *\n * @name czm_pointAlongRay\n * @glslFunction\n *\n * @param {czm_ray} ray The ray to compute the point along.\n * @param {float} time The time along the ray.\n * \n * @returns {vec3} The point along the ray at the given time.\n * \n * @example\n * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction\n * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)\n */\nfn czm_pointAlongRay(ray : czm_ray, time : f32) -> vec3\n{\n return ray.origin + (time * ray.direction);\n}\n",czm_rainMaterial="#ifdef HAS_WETNESS\nuniform float uWetnessFactor;\n#endif\n#ifdef HAS_RAIN\nuniform float uAnimationSpeed;\nuniform sampler2D uRippleTexture;\nuniform float uRippleScale;\nuniform float uWindIntensity;\nuniform float uRain;\nuniform float uCameraDepth;\nvoid getTimeInfo(float animationSpeed, out vec2 timeVec)\n{\n float time = czm_frameNumber * animationSpeed;\n time = floor(30.0 * time);\n float time_diff = floor(time*0.25);\n time = mod(time, 4.0);\n time_diff = mod(time_diff, 4.0);\n timeVec = vec2(time, time_diff);\n}\nvoid getPosInfo(vec4 posMC, out vec2 posMC_frac1, out vec2 posMC_frac2)\n{\n float ripple_scale = 1.0 / uRippleScale;\n vec2 posXY = posMC.xy * ripple_scale;\n posMC_frac1 = fract(posXY);\n vec2 posStep = vec2(0.5);\n posMC_frac2 = fract(posXY + posStep);\n}\nfloat getAlpha(vec2 posMC_frac1)\n{\n vec2 dist = (posMC_frac1 - vec2(0.5)) * 2.0;\n dist = vec2(abs(dist.x), abs(dist.y));\n vec2 result = pow(dist, vec2(5.0));\n return result.x + result.y;\n}\nvec4 getRippleValue(vec2 timeVec, vec2 posMC_frac1, vec2 posMC_frac2, float alpha)\n{\n vec2 rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n vec2 rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n vec4 rippleValue_1 = texture2D(uRippleTexture, rippleUV_1.xy);\n vec4 rippleValue_2 = texture2D(uRippleTexture, rippleUV_2.xy);\n return mix(rippleValue_1, rippleValue_2, alpha);\n}\nvec3 getRippleNormal(vec4 rippleValue, float wind_intensity, float rain, float depthFade)\n{\n vec2 rippleValueXY = rippleValue.xy;\n vec2 rippleValueZW = rippleValue.zw;\n const vec2 _value = vec2(0.5);\n vec2 part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n vec2 part_2 = (rippleValueXY - _value) * 0.6;\n vec2 mergedValue = mix(part_1, part_2, rain) * depthFade;\n return vec3(mergedValue, 1.0);\n}\nfloat getNormalAlpha(vec3 normalWS, float wetness)\n{\n float valueZ = normalWS.z - 0.5;\n float wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n return pow(wet_correction, 15.0);\n}\nvec3 rippleNormalCorrection(vec3 rippleNormal, float normalAlpha)\n{\n const vec3 blueNormal = vec3(0.0, 0.0, 1.0);\n return mix(blueNormal, rippleNormal, normalAlpha);\n}\nvec3 rippleGenerator(float animationSpeed, vec3 normalWS, float wetness)\n{\n vec2 timeVec = vec2(1.0);\n getTimeInfo(animationSpeed, timeVec);\n vec2 posMC_frac1 = vec2(1.0);\n vec2 posMC_frac2 = vec2(1.0);\n getPosInfo(vPositionMC, posMC_frac1, posMC_frac2);\n float alpha = getAlpha(posMC_frac1);\n vec4 rippleValue = getRippleValue(timeVec, posMC_frac1, posMC_frac2, alpha);\n vec3 rippleNormal = getRippleNormal(rippleValue, uWindIntensity, uRain, uCameraDepth);\n float normalAlpha = getNormalAlpha(normalWS, wetness);\n return normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\nvoid czm_getRainMaterialParam(inout vec3 normalEC, inout vec3 baseColor, inout float roughness){\n vec3 normalWS_wetness = vec3(0.0, 0.0, 1.0);\n#ifdef HAS_WETNESS\n mat3 fixedToENU_wetness = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n normalWS_wetness = normalize(fixedToENU_wetness * normalEC);\n#endif\n normalEC = rippleGenerator(uAnimationSpeed, normalWS_wetness, uWetnessFactor);\n#ifdef HAS_WETNESS\n float fWetness = clamp(uWetnessFactor,0.0,1.0);\n float fWetness_correction = pow(4.0 * fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction, clamp(fWetness,0.0,0.9),1.0);\n float fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n baseColor = mix(baseColor,baseColor * 0.7, fWerness_normalized);\n roughness = mix(roughness, 0.05, fWerness_normalized);\n#endif\n}\n#endif\n",czm_rasterCull="\n#ifdef RASTER_CULL\nvarying vec2 vRasterTexCoord;\nuniform float uDepth;\nuniform sampler2D uRasterTexture;\n\nvoid czm_rasterCull()\n{\n float colorByDepth = texture2D(uRasterTexture, vRasterTexCoord.xy).g;\n\tif((colorByDepth * 255.0 - uDepth) > 0.5)\n\t{\n \t\tdiscard;\n\t}\n}\n#endif\n",czm_rayEllipsoidIntersectionInterval="/**\n * DOC_TBA\n *\n * @name czm_rayEllipsoidIntersectionInterval\n * @glslFunction\n */\nfn czm_rayEllipsoidIntersectionInterval(ray : czm_ray, ellipsoid_center : vec3, ellipsoid_inverseRadii : vec3) -> czm_raySegment\n{\n // ray and ellipsoid center in eye coordinates. radii in model coordinates.\n var q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;\n var w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;\n\n q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;\n\n var q2 = dot(q, q);\n var qw = dot(q, w);\n\n if (q2 > 1.0) // Outside ellipsoid.\n {\n if (qw >= 0.0) // Looking outward or tangent (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else // qw < 0.0.\n {\n var qw2 = qw * qw;\n var difference = q2 - 1.0; // Positively valued.\n var w2 = dot(w, w);\n var product = w2 * difference;\n\n if (qw2 < product) // Imaginary roots (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else if (qw2 > product) // Distinct roots (2 intersections).\n {\n var discriminant = qw * qw - product;\n var temp = -qw + sqrt(discriminant); // Avoid cancellation.\n var root0 = temp / w2;\n var root1 = difference / temp;\n if (root0 < root1)\n {\n czm_raySegment i = czm_raySegment(root0, root1);\n return i;\n }\n else\n {\n czm_raySegment i = czm_raySegment(root1, root0);\n return i;\n }\n }\n else // qw2 == product. Repeated roots (2 intersections).\n {\n var root = sqrt(difference / w2);\n czm_raySegment i = czm_raySegment(root, root);\n return i;\n }\n }\n }\n else if (q2 < 1.0) // Inside ellipsoid (2 intersections).\n {\n var difference = q2 - 1.0; // Negatively valued.\n var w2 = dot(w, w);\n var product = w2 * difference; // Negatively valued.\n var discriminant = qw * qw - product;\n var temp = -qw + sqrt(discriminant); // Positively valued.\n czm_raySegment i = czm_raySegment(0.0, temp / w2);\n return i;\n }\n else // q2 == 1.0. On ellipsoid.\n {\n if (qw < 0.0) // Looking inward.\n {\n var w2 = dot(w, w);\n czm_raySegment i = czm_raySegment(0.0, -qw / w2);\n return i;\n }\n else // qw >= 0.0. Looking outward or tangent.\n {\n return czm_emptyRaySegment;\n }\n }\n}\n",czm_readDepth="float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\n return czm_reverseLogDepth(texture2D(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective="/**\n * Reads a value previously transformed with {@link czm_writeNonPerspective}\n * by dividing it by `w`, the value used in the perspective divide.\n * This function is intended to be called in a fragment shader to access a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The value should have been\n * previously written in the vertex shader with a call to\n * {@link czm_writeNonPerspective}.\n *\n * @name czm_readNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.\n * @param {float} oneOverW One over the perspective divide value, `w`. Usually this is simply `gl_FragCoord.w`.\n * @returns {float|vec2|vec3|vec4} The usable value.\n */\nfloat czm_readNonPerspective(float value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\n return value * oneOverW;\n}\n",czm_reverseLogDepth="fn czm_reverseLogDepth(logZ : f32) -> f32\n{\n#ifdef LOG_DEPTH\n var near = uniforms.czm_currentFrustum.x;\n var far = uniforms.czm_currentFrustum.y;\n var log2Depth = logZ * uniforms.czm_log2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#else\n return logZ;\n#endif\n}\n",czm_RGBToHSB="\nfn czm_RGBToHSB(rgb : vec3) -> vec3\n{\n var K_RGB2HSB = vec4(0.0, -0.33333, 0.66667, -1.0);\n var p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\n var q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\n var d = q.x - min(q.w, q.y);\n return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL="\nfn RGBtoHCV(rgb : vec3) -> vec3\n{\n // Based on work by Sam Hocevar and Emil Persson\n var p : vec4;\n if(rgb.g < rgb.b){\n p = vec4(rgb.bg, -1.0, 2.0 / 3.0);\n }\n else{\n p = vec4(rgb.gb, 0.0, -1.0 / 3.0);\n }\n var q : vec4;\n if(rgb.r < p.x){\n p = vec4(p.xyw, rgb.r);\n }\n else{\n p = vec4(rgb.r, p.yzx);\n }\n var c = q.x - min(q.w, q.y);\n var h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\n return vec3(h, c, q.x);\n}\n\nfn czm_RGBToHSL(rgb : vec3) -> vec3\n{\n var hcv = RGBtoHCV(rgb);\n var l = hcv.z - hcv.y * 0.5;\n var s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\n return vec3(hcv.x, s, l);\n}\n",czm_RGBToXYZ="\nfn czm_RGBToXYZ(rgb : vec3) -> vec3\n{\n const RGB2XYZ = mat3x3(0.4124, 0.2126, 0.0193,\n 0.3576, 0.7152, 0.1192,\n 0.1805, 0.0722, 0.9505);\n var xyz = RGB2XYZ * rgb;\n var Yxy;\n Yxy.r = xyz.g;\n var temp = dot(vec3(1.0), xyz);\n Yxy.gb = xyz.rg / temp;\n return Yxy;\n}\n",czm_RollerShutter="void czm_RollerShutter(vec2 coord, vec4 region)\n{\n vec2 f = step(region.xw, coord);\n vec2 s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n",czm_s3mBatchOperation="\nfn czm_s3mBatchOperation(inOperationType : vec4, color : vec4, selectedColor : vec4, translation : vec3,\n vertexColor : ptr>, vertexPos : ptr>, vIsFiltByID : ptr>, fSelected : ptr)\n{\n var operationType = inOperationType;\n operationType.x += 0.001f;\n var right_2 = operationType.x * 0.5f;\n var right_4 = right_2 * 0.5f;\n var right_8 = right_4 * 0.5f;\n var right_16 = right_8 * 0.5f;\n var isSetColor = fract(right_2);\n if(isSetColor > 0.1f)\n {\n var mixA = (*vertexColor).a * color.a;\n (*vertexColor) = vec4(color.rgb, mixA);\n }\n var isPicked = fract(floor(right_2)* 0.5f);\n if(isPicked > 0.1f)\n {\n (*fSelected) = 1.0f;\n #ifdef REPLACE_SELECT_TYPE\n (*vertexColor) = selectedColor;\n #else\n (*vertexColor) *= selectedColor;\n #endif\n }\n var isHide = fract(floor(right_4)* 0.5f);\n if(isHide > 0.1f)\n {\n (*vertexColor).a = 0.0f;\n }\n var isOffset = fract(floor(right_8)* 0.5f);\n if(isOffset > 0.1f)\n {\n (*vertexPos).x += translation.x;\n (*vertexPos).y += translation.y;\n (*vertexPos).z += translation.z;\n }\n var isClip = fract(floor(right_16) * 0.5f);\n if(isClip > 0.1f)\n {\n (*vIsFiltByID).x = 1.0f;\n }\n}\n",czm_s3mBatchOperationForSilhouette="\nfn czm_s3mBatchOperationForSilhouette(inOperationType : vec4, color : vec4, vertexColor : ptr>, vertexPos : ptr>, vIsFiltByID : ptr>, translation : vec3, fSelected : ptr)\n{\n var operationType = inOperationType;\n operationType.x += 0.001;\n var right_2 = operationType.x * 0.5f;\n var right_4 = right_2 * 0.5f;\n var right_8 = right_4 * 0.5f;\n var right_16 = right_8 * 0.5f;\n var isSetColor = fract(right_2);\n if(isSetColor > 0.1f)\n {\n (*vertexColor) *= color;\n }\n var isPicked = fract(floor(right_2)* 0.5f);\n if(isPicked > 0.1f)\n {\n (*fSelected) = 1.0f;\n }\n var isHide = fract(floor(right_4)* 0.5f);\n if(isHide > 0.1f)\n {\n (*vertexColor).a = 0.0f;\n }\n var isOffset = fract(floor(right_8)* 0.5f);\n if(isOffset > 0.1f)\n {\n (*vertexPos).x += translation.x;\n (*vertexPos).y += translation.y;\n (*vertexPos).z += translation.z;\n }\n var isClip = fract(floor(right_16) * 0.5f);\n if(isClip > 0.1f)\n {\n (*vIsFiltByID).x = 1.0f;\n }\n}\n",czm_s3mComputeVaryings="\n#ifdef IMAGERY\n attribute img : vec2;\n varying imgCoord : vec2;\n#endif\n\n#ifdef RASTER_CULL\nvarying vRasterTexCoord : vec2;\nuniform uRasterRactc : vec4;\n#endif\n\n#ifdef Volume\n attribute aRatio : vec3;\n varying vecRotioCoord : vec3;\n#endif\n\n#ifdef QUAD_OUTLINE\n varying vDistanceFromEye : f32;\n#endif\n\n#ifdef HYPSOMETRIC\n varying vecHypTexCoord : vec2;\n#endif\n\n#ifdef EXCAVATION\n varying vExcavationVertexPos : vec4;\n#endif\n\n#ifdef SQRESULT\n uniform uSQViewProj : mat4x4;\n varying vSQ_clip_pos : vec4;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n uniform uFloodMatrixInvert : mat4x4;\n varying vFloodPos : vec4;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n varying vLayerTexCoord : vec2;\n varying vModIndexAndTexIndex : vec2;\n#endif\n\n\nfn czm_s3mComputeVaryings(vertexPos : vec4)\n{\n#ifdef RASTER_CULL\n var rasterPos : vec2 = (Mesh.uGeoMatrix * aPosition).xy;\n vRasterTexCoord.x = (rasterPos.x - uRasterRact.x)/(uRasterRact.z - uRasterRact.x);\n vRasterTexCoord.y = (rasterPos.y - uRasterRact.y)/(uRasterRact.w - uRasterRact.y);\n#endif\n\n#ifdef Volume\n vecRotioCoord = aRatio;\n#endif\n\n#ifdef EXCAVATION\n vExcavationVertexPos = Mesh.uGeoMatrix * vertexPos;\n#endif\n\n#ifdef HYPSOMETRIC\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var ptInRect = 1.0;\n vecHypTexCoord = calculatePolyTexCoord(Mesh.uGeoMatrix * vec4(vertexPos.xyz, 1.0), Layer.uHypRect, &ptInRect);\n }\n#endif\n\n#ifdef SQRESULT\n vSQ_clip_pos = uniforms.uSQViewProj * vec4(vertexPos.xyz, 1.0);\n#endif\n\n#ifdef IMAGERY\n imgCoord = img;\n#endif\n\n#ifdef QUAD_OUTLINE\n vDistanceFromEye = gl_Position.z;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n const right_8 : f32 = 65280.0;\n const right_16 : f32 = 16711680.0;\n var pickId = vSecondColor.r * 255.0 + vSecondColor.g * right_8 + vSecondColor.b * right_16;\n vModIndexAndTexIndex.x = (pickId - 10.0 * floor(pickId / 10.0)) * 0.1;\n vModIndexAndTexIndex.y = pickId - Layer.uEmissionTexAtlasCount * floor(pickId / Layer.uEmissionTexAtlasCount);\n var realVertexPos = Mesh.uGeoMatrix * vertexPos;\n vLayerTexCoord = (realVertexPos.xy - Layer.uLayerBounds.xy) / Layer.uLayerBounds.zw;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n vFloodPos = uniforms.uFloodMatrixInvert * vec4(vertexPos.xyz, 1.0);\n#endif\n}\n",czm_s3mImageryColor="\n#ifdef IMAGERY\nvarying vec2 imgCoord;\nuniform sampler2D uImgTexture;\nuniform float uImgTextureAlpha;\nuniform vec2 uImgTextureBound;\n\n//#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\nuniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n//#endif\n\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\n\n\nvoid czm_getImageryColor(inout vec4 color)\n{\n\tvec2 texcood = vec2(imgCoord.x / uImgTextureBound.x, imgCoord.y / uImgTextureBound.y);\n#ifdef MULTIBATCH\n\tcolor = computeDayColor(vec4(1.0,1.0,1.0,0.0), clamp(vec3(texcood,0.0), 0.0, 1.0));\n#else\n\tcolor = computeDayColor(color, clamp(vec3(texcood,0.0), 0.0, 1.0));\n#endif\n}\n#endif\n",czm_s3mOverlay="\n#ifdef OVERLAY\n uniform sampler2D uOverlayTexture;\n varying vec2 vecOverlayTexCoord;\n varying float hasOverlay;\n\tvoid czm_getOverlayColor(inout vec4 color)\n\t{\n\t\tif(hasOverlay > 0.5)\n\t\t{\n\t\t\tvec4 overlayColor = texture2D(uOverlayTexture, vecOverlayTexCoord.xy);\n\t\t\tif(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n\t\t\t{\n\t\t\t\tvec4 mixColor = mix(color, overlayColor, overlayColor.a);\n\t\t\t\tcolor = vec4(mixColor.r, mixColor.g, mixColor.b, color.a);\n\t\t\t}\n\t\t}\n\t}\n#endif\n",czm_S3MPBR=" uniform float u_metallicFactor;\n uniform float u_roughnessFactor;\n uniform vec4 u_emissiveFactor;\n uniform vec4 u_baseColorFactor;\n uniform float u_alphaCutoff;\n uniform sampler2D u_baseColorTexture;\n uniform sampler2D u_metallicRoughnessTexture;\n uniform sampler2D u_normalTexture;\n uniform sampler2D u_occlusionTexture;\n uniform sampler2D u_emissiveTexture;\n uniform vec4 u_baseColorUVOffsetAndTiling;\n uniform vec4 u_emissiveUVOffsetAndTiling;\n\n uniform float uSunLightON;\n #if DIR_LIGHTS > 0\n uniform vec3 uDirectionalLightDirectionEC[ DIR_LIGHTS ];\n uniform vec3 uDirectionalLightColor[ DIR_LIGHTS ];\n #endif\n #if POINT_LIGHTS > 0\n uniform vec3 uPointLightPositionEC[ POINT_LIGHTS ];\n uniform vec3 uPointLightColor[ POINT_LIGHTS ];\n uniform vec2 uPointLightDistanceAndDecay[ POINT_LIGHTS ];\n #endif\n #if SPOT_LIGHTS > 0\n uniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDirectionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDistanceDecayCos[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightExponent[ SPOT_LIGHTS ];\n #endif\n\n const float M_PI = 3.141592653589793;\n\n vec3 lambertianDiffuse(vec3 diffuseColor)\n {\n return diffuseColor / M_PI;\n }\n\n vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n {\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n }\n\n vec3 fresnelSchlick(float metalness, float VdotH)\n {\n return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n }\n\n vec3 F_Schlick(float ndv, vec3 spec)\n {\n return spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n }\n\n float D_Phong(float g, float ndh)\n {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n }\n\n float smithVisibilityG1(float NdotV, float roughness)\n {\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n }\n\n float smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n {\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n }\n\n float GGX(float roughness, float NdotH)\n {\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n }\n\n void getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm)\n {\n vec3 h = normalize(viewDir + lightDir);\n float NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\n float NdotH = clamp(dot(normal, h), 0.0, 1.0);\n vec3 li = lightColor * NdotL;\n diffuseTerm = li;\n specularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n }\n\n vec3 SRGBtoLINEAR3(vec3 srgbIn)\n {\n return pow(srgbIn, vec3(2.2));\n }\n\n vec4 SRGBtoLINEAR4(vec4 srgbIn)\n {\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n }\n\n vec3 LINEARtoSRGB(vec3 linearIn)\n {\n#ifndef HDR\n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n }\n\n float calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent)\n {\n return pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n }\n\n vec4 czm_S3MPBR(vec3 normalEC, vec3 positionEC, vec2 texCoord, vec4 vertexColor)\n {\n vec3 ng = normalize(normalEC);\n vec3 positionWC = (czm_inverseView * vec4(positionEC, 1.0)).xyz;\n#ifdef HAS_NORMAL_TEXTURE\n vec3 pos_dx = dFdx(positionEC);\n vec3 pos_dy = dFdy(positionEC);\n vec3 tex_dx = dFdx(vec3(texCoord, 0.0));\n vec3 tex_dy = dFdy(vec3(texCoord, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(u_normalTexture, texCoord).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n\n vec3 v = -normalize(positionEC);\n#ifdef DOUBLE_SIDED\n if (dot(n, v) < 0.0) {\n n = -n;\n }\n#endif\n\n // Add base color to fragment shader\n#ifdef HAS_BASECOLOR_TEXTURE\n vec2 baseColorTexCoord = texCoord;\n baseColorTexCoord = baseColorTexCoord * u_baseColorUVOffsetAndTiling.zw + u_baseColorUVOffsetAndTiling.xy;\n vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, baseColorTexCoord));\n baseColorWithAlpha *= u_baseColorFactor;\n#else\n vec4 baseColorWithAlpha = u_baseColorFactor;\n#endif\n baseColorWithAlpha *= vertexColor;\n vec3 baseColor = baseColorWithAlpha.rgb;\n#ifdef HAS_METALLICROUGHNESS_TEXTURE\n vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, texCoord).rgb;\n float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n metalness *= u_metallicFactor;\n roughness *= u_roughnessFactor;\n#else\n float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n#endif\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float NdotV = abs(dot(n, v)) + 0.001;\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n vec3 fresnelTerm = F_Schlick(NdotV, specularColor);\n vec3 color = vec3(0.0);\n // 默认加一个平行光作为太阳光\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(czm_sunDirectionEC, v, n, vec3(0.8), fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm * uSunLightON;\n specularTerm += lightSpecularTerm * uSunLightON;\n#if DIR_LIGHTS > 0 \n for (int i = 0; i < DIR_LIGHTS; i++) { \n getLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n } \n#endif \n#if POINT_LIGHTS > 0 \n for (int i = 0; i < POINT_LIGHTS; i++) {\n vec3 lVector = uPointLightPositionEC[i] - v_positionEC;\n float lightDistance = length(lVector);\n float lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\n if(lightAttenuation < 0.001) {\n continue;\n }\n vec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n }\n#endif \n#if SPOT_LIGHTS > 0 \n for (int i = 0; i < SPOT_LIGHTS; i++) {\n vec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\n float lightDistance = length(lVector);\n float lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCos[i].x, uSpotLightDistanceDecayCos[i].y);\n if(lightAttenuation < 0.001) {\n continue;\n }\n float spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\n if(spotEffect > uSpotLightDistanceDecayCos[i].z) {\n vec3 spotLightColor = uSpotLightColor[i] * lightAttenuation * spotEffect;\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n }\n }\n#endif \n color = baseColor; \n color *= max(diffuseTerm, vec3(0.0)); \n color += max(specularTerm, vec3(0.0)); \n // 计算环境光\n #ifdef USE_IBL_LIGHTING\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n // Figure out if the reflection vector hits the ellipsoid\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, 6378137.0 / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z.\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n\n vec2 iblFactor = vec2(1.0);\n float luminanceAtZenith = 0.5;\n // Luminance model from page 40 of http://silviojemma.com/public/papers/lighting/spherical-harmonic-lighting.pdf\n #ifdef USE_SUN_LUMINANCE\n // Angle between sun and zenith\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n // Angle between zenith and current pixel\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n // Angle between sun and current pixel\n float sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\n float gamma = acos(sunNdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = luminanceAtZenith * (numerator / denominator);\n#endif\n\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * iblFactor.y);\n#ifdef USE_SUN_LUMINANCE\n color += IBLColor * luminance;\n#else\n color += IBLColor;\n#endif // end of USE_SUN_LUMINANCE\n#endif // end of USE_IBL_LIGHTING\n\n#ifdef HAS_OCCLUSION_TEXTURE\n color *= texture2D(u_occlusionTexture, texCoord).r;\n#endif\n\n#ifdef HAS_EMISSIVE_TEXTURE\n vec2 emissiveTexCoord = texCoord;\n emissiveTexCoord = emissiveTexCoord * u_emissiveUVOffsetAndTiling.zw + u_emissiveUVOffsetAndTiling.xy;\n vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, emissiveTexCoord).rgb);\n emissive *= u_emissiveFactor.rgb;\n color += emissive;\n#else\n color += u_emissiveFactor.rgb;\n#endif\n color = LINEARtoSRGB(color);\n vec4 resultColor = vec4(color, 1.0);\n#ifdef MASK\n if (baseColorWithAlpha.a < u_alphaCutoff)\n {\n discard;\n }\n resultColor = vec4(color, 1.0);\n#endif\n#ifdef BLEND\n resultColor = vec4(color, baseColorWithAlpha.a);\n#endif\n return resultColor;\n }",czm_s3mVisibleDistance="#ifdef VISIBLEDISTANCEMAX\nuniform float uVisibleDistanceMax;\nvoid czm_s3mGetAlphaByDistance(vec3 positionEC, inout vec4 color)\n{\n if(length(positionEC) > uVisibleDistanceMax)\n {\n float minAlphl = min(1.0, (length(positionEC) - uVisibleDistanceMax) / 2000.0);\n color.a = 1.0 - minAlphl;\n }\n}\n#endif",czm_sampleOctahedralProjection="\nvar uSpecularEnvironmentMaps : texture_2d;\nvar uSpecularEnvironmentMapsSampler : sampler;\n\n/**\n * Samples the 4 neighboring pixels and return the weighted average.\n *\n * @private\n */\nfn czm_sampleOctahedralProjectionWithFiltering(textureSize : vec2, inDirection : vec3, lod : f32) -> vec3 {\n var direction = inDirection / dot(vec3(1.0), abs(inDirection));\n var rev = abs(direction.zx) - vec2(1.0);\n var negX : f32;\n var negY : f32;\n if(direction.x < 0.0){\n negX = rev.x;\n }\n else\n {\n negX = -rev.x;\n }\n if(direction.z < 0.0) {\n negY = rev.y;\n }\n else {\n negY = -rev.y;\n }\n var neg = vec2(negX, negY);\n\n var uv : vec2;\n if(direction.y < 0.0){\n uv = neg;\n }\n else {\n uv = direction.xz;\n }\n\n var coord = 0.5 * uv + vec2(0.5);\n var pixel = 1.0 / textureSize;\n\n if (lod > 0.0)\n {\n // Each subseqeuent mip level is half the size\n var scale = 1.0 / pow(2.0, lod);\n var offset = ((textureSize.y + 1.0) / textureSize.x);\n\n coord.x = coord.x * offset;\n coord = coord * scale;\n\n coord.x = coord.x + offset + pixel.x;\n coord.y = coord.y + (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n }\n else\n {\n coord.x = coord.x * (textureSize.y / textureSize.x);\n }\n\n // Do bilinear filtering\n //#ifndef OES_texture_float_linear\n // var color1 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord + vec2(0.0, pixel.y)).rgb;\n // var color2 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord + vec2(pixel.x, 0.0)).rgb;\n // var color3 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord + pixel).rgb;\n // var color4 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord).rgb;\n\n // var texturePosition = coord * textureSize;\n\n // var fu = fract(texturePosition.x);\n // var fv = fract(texturePosition.y);\n\n // var average1 = mix(color4, color2, fu);\n // var average2 = mix(color1, color3, fu);\n\n // var color = mix(average1, average2, fv);\n // #else\n var color = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord).rgb;\n // #endif\n\n return color;\n}\n\n\n/**\n * Samples from a cube map that has been projected using an octahedral projection from the given direction.\n *\n * @name czm_sampleOctahedralProjection\n * @glslFunction\n *\n * @param {vec2} textureSize The width and height dimensions in pixels of the projected map.\n * @param {vec3} direction The normalized direction used to sample the cube map.\n * @param {float} lod The level of detail to sample.\n * @param {float} maxLod The maximum level of detail.\n * @returns {vec3} The color of the cube map at the direction.\n */\nfn czm_sampleOctahedralProjection(textureSize : vec2, direction : vec3, lod : f32, maxLod : f32) -> vec3{\n var currentLod = floor(lod);\n var nextLod = min(currentLod + 1.0, maxLod);\n\n var colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(textureSize, direction, currentLod);\n var colorNextLod = czm_sampleOctahedralProjectionWithFiltering(textureSize, direction, nextLod);\n\n return mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation="/**\n * Adjusts the saturation of a color.\n * \n * @name czm_saturation\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the saturation of the color.\n *\n * @returns {float} The color with the saturation adjusted.\n *\n * @example\n * vec3 greyScale = czm_saturation(color, 0.0);\n * vec3 doubleSaturation = czm_saturation(color, 2.0);\n */\nfn czm_saturation(rgb : vec3, adjustment : f32) -> vec3\n{\n // Algorithm from Chapter 16 of OpenGL Shading Language\n var W = vec3(0.2125, 0.7154, 0.0721);\n var intensity = vec3(dot(rgb, W));\n return mix(intensity, rgb, adjustment);\n}\n",czm_setAlphaByWWalue="\n#ifdef W_VISIBLE\n uniform sampler2D uCategorieTexture;\n uniform float uMaxCategory;\n uniform float uMinCategory;\n uniform float uCategoryWidht;\n\n czm_setAlphaByWValue(in float w, inout vec4 color)\n {\n vec2 categoryTexCoord = vec2(abs(w - uMinCategory) / uCategoryWidht + 0.5 /uCategoryWidht , 0.5);\n float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n color.a *= 1.0 - category;\n }\n#endif\n",czm_signNotZero="\nfn czm_signNotZero(value : f32) ->f32\n{\n if(value >= 0.0){\n return 1.0; \n }\n else\n {\n return -1.0;\n }\n}\n// wgsl不支持重载\n// fn czm_signNotZero_v2(value : vec2) -> vec2\n// {\n// return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n// }\n\n// fn czm_signNotZero_v3(value : vec3) -> vec3\n// {\n// return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n// }\n\n// fn czm_signNotZero_v4(value : vec4) -> vec4\n// {\n// return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n// }\n",czm_sketchMode="uniform sampler2D uNormalDepthTexture;\nuniform int uFillStyle;\nfloat edgeDetection(float lineWidth)\n{\n vec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\n vec2 off = lineWidth / czm_globeDepthTextureDim.xy;\n vec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\n val_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\n vec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\n val_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\n vec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\n val_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\n vec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\n val_se.xyz = (val_se.xyz * 2.0) - 1.0;\n float discontinuity = 0.0;\n float dot0 = dot(val_nw.xyz, val_se.xyz);\n float dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nvec4 czm_sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\n vec4 outputColor = inputColor;\n float discontinuity = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0, 1.0);\n if(uFillStyle == 1)\n {\n outputColor = lineColor;\n outputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\n outputColor.a *= lineColor.a;\n }\n else\n {\n vec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\n outputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n }\n return outputColor;\n}",czm_spatialQueryClip="#ifdef SQCLIP\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \nfloat computeDepth()\n{\n#ifdef LOG_DEPTH\n return log2(v_depthFromNearPlusOne) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\n return gl_FragCoord.z;\n#endif\n}\nbool isPointInSpatialQueryObject(vec2 texCoord)\n{\n bool bIn = false;\n vec4 colorInClipTexture = texture2D(uFrontColorTexture,texCoord.xy);\n if(colorInClipTexture.r > 0.99 && colorInClipTexture.g < 0.01 && colorInClipTexture.b < 0.01)\n {\n float depthNear = czm_unpackDepth(texture2D(uFrontDepthTexture, texCoord.xy)) - 0.00001;\n float depthFar = czm_unpackDepth(texture2D(uBackDepthTexture, texCoord.xy)) + 0.00001;\n float currentDepth = computeDepth();\n if(currentDepth > depthNear && currentDepth < depthFar){\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\nvoid czm_spatialQueryClip(){\n\tvec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\n if(!isPointInSpatialQueryObject(texCoord)) \n { \n discard; \n } \n}\n#endif\n}",czm_sphericalHarmonics="/**\n * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.\n *

\n * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].\n *

\n *\n * @name czm_sphericalHarmonics\n * @glslFunction\n *\n * @param {vec3} normal The normalized direction.\n * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.\n * @returns {vec3} The color at the direction.\n *\n * @see https://graphics.stanford.edu/papers/envmap/envmap.pdf\n */\nfn czm_sphericalHarmonics(normal : vec3, coefficients : array, 9>) -> vec3\n{\n const c1 = 0.429043;\n const c2 = 0.511664;\n const c3 = 0.743125;\n const c4 = 0.886227;\n const c5 = 0.247708;\n\n var L00 = coefficients[0];\n var L1_1 = coefficients[1];\n var L10 = coefficients[2];\n var L11 = coefficients[3];\n var L2_2 = coefficients[4];\n var L2_1 = coefficients[5];\n var L20 = coefficients[6];\n var L21 = coefficients[7];\n var L22 = coefficients[8];\n\n var x = normal.x;\n var y = normal.y;\n var z = normal.z;\n\n return c1 * L22 * (x * x - y * y) + c3 * L20 * z * z + c4 * L00 - c5 * L20 +\n 2.0 * c1 * (L2_2 * x * y + L21 * x * z + L2_1 * y * z) +\n 2.0 * c2 * (L11 * x + L1_1 * y + L10 * z);\n}\n",czm_splitClip="#ifdef APPLY_SPLIT\nuniform float uSplitDirection;\nuniform float uSplitPosition;\nvoid czm_splitClip(){\n if (uSplitDirection > 1.5)\n {\n if(gl_FragCoord.x > uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection > 0.5)\n {\n if(gl_FragCoord.x < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -1.5)\n {\n if(gl_FragCoord.y < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -0.5)\n {\n if(gl_FragCoord.y > uSplitPosition)\n {\n discard;\n }\n }\n}\n#endif\n}",czm_sRGBToLinear="vec3 czm_sRGBToLinear(vec3 srgbIn)\n{\nreturn pow(srgbIn, vec3(2.2));\n}\nvec4 czm_sRGBToLinear(vec4 srgbIn)\n{\nsrgbIn = srgbIn ;\nvec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\nreturn vec4(linearOut, srgbIn.a);\n}\n",czm_tangentToEyeSpaceMatrix="/**\n * Creates a matrix that transforms vectors from tangent space to eye space.\n *\n * @name czm_tangentToEyeSpaceMatrix\n * @glslFunction\n *\n * @param {vec3} normalEC The normal vector in eye coordinates.\n * @param {vec3} tangentEC The tangent vector in eye coordinates.\n * @param {vec3} bitangentEC The bitangent vector in eye coordinates.\n *\n * @returns {mat3} The matrix that transforms from tangent space to eye space.\n *\n * @example\n * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);\n * vec3 normal = tangentToEye * texture2D(normalMap, st).xyz;\n */\nmat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\n vec3 normal = normalize(normalEC);\n vec3 tangent = normalize(tangentEC);\n vec3 bitangent = normalize(bitangentEC);\n return mat3(tangent.x , tangent.y , tangent.z,\n bitangent.x, bitangent.y, bitangent.z,\n normal.x , normal.y , normal.z);\n}\n",czm_transformPlane="vec4 czm_transformPlane(vec4 clippingPlane, mat4 transform) {\n vec3 transformedDirection = normalize((transform * vec4(clippingPlane.xyz, 0.0)).xyz);\n vec3 transformedPosition = (transform * vec4(clippingPlane.xyz * -clippingPlane.w, 1.0)).xyz;\n vec4 transformedPlane;\n transformedPlane.xyz = transformedDirection;\n transformedPlane.w = -dot(transformedDirection, transformedPosition);\n return transformedPlane;\n}\n",czm_translateRelativeToEye="/**\n * Translates a position (or any vec3) that was encoded with {@link EncodedCartesian3},\n * and then provided to the shader as separate high and low bits to\n * be relative to the eye. As shown in the example, the position can then be transformed in eye\n * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},\n * respectively.\n *

\n * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as\n * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.\n *

\n *\n * @name czm_translateRelativeToEye\n * @glslFunction\n *\n * @param {vec3} high The position's high bits.\n * @param {vec3} low The position's low bits.\n * @returns {vec3} The position translated to be relative to the camera's position.\n *\n * @example\n * attribute vec3 positionHigh;\n * attribute vec3 positionLow;\n *\n * void main()\n * {\n * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n * }\n *\n * @see czm_modelViewRelativeToEye\n * @see czm_modelViewProjectionRelativeToEye\n * @see czm_computePosition\n * @see EncodedCartesian3\n */\nvec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\n vec3 highDifference = high - czm_encodedCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedCameraPositionMCLow;\n\n return vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong="/**\n * @private\n */\nvec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down and horizon views)\n float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\n\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n }\n\n diffuse = clamp(diffuse, 0.0, 1.0);\n\n float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_transparentColorClip="#ifdef TRANSPARENT_BACK_COLOR\nuniform vec4 uTransparentBackColor;\nuniform float uTransparentBackColorTolerance;\n\nczm_transparentColorClip(vec4 color)\n{\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - color.r);\n float gDiff = abs(uTransparentBackColor.g - color.g);\n float bDiff = abs(uTransparentBackColor.b - color.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n}\n#endif\n",czm_transpose="/**\n * Returns the transpose of the matrix. The input matrix can be\n * a mat2, mat3, or mat4.\n *\n * @name czm_transpose\n * @glslFunction\n *\n * @param {} matrix The matrix to transpose.\n *\n * @returns {} The transposed matrix.\n *\n * @example\n * // GLSL declarations\n * mat2 czm_transpose(mat2 matrix);\n * mat3 czm_transpose(mat3 matrix);\n * mat4 czm_transpose(mat4 matrix);\n *\n * // Transpose a 3x3 rotation matrix to find its inverse.\n * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(\n * positionMC, normalEC);\n * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);\n */\nmat2 czm_transpose(mat2 matrix)\n{\n return mat2(\n matrix[0][0], matrix[1][0],\n matrix[0][1], matrix[1][1]);\n}\n\nmat3 czm_transpose(mat3 matrix)\n{\n return mat3(\n matrix[0][0], matrix[1][0], matrix[2][0],\n matrix[0][1], matrix[1][1], matrix[2][1],\n matrix[0][2], matrix[1][2], matrix[2][2]);\n}\n\nmat4 czm_transpose(mat4 matrix)\n{\n return mat4(\n matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\n matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\n matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\n matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackDepth="\n fn czm_unpackDepth(packedDepth : vec4) -> f32\n {\n return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n }\n",czm_unpackFloat="\n// #define SHIFT_RIGHT_8 0.00390625 //1.0 / 256.0\n// #define SHIFT_RIGHT_16 0.00001525878 //1.0 / 65536.0\n// #define SHIFT_RIGHT_24 5.960464477539063e-8//1.0 / 16777216.0\n// #define BIAS 38.0\n\nfn czm_unpackFloat(packedFloat : vec4) -> f32\n{\n packedFloat *= 255.0f;\n var temp = packedFloat.w / 2.0f;\n var exponent = floor(temp);\n var sign = (temp - exponent) * 2.0f;\n exponent = exponent - float(38.0f);\n sign = sign * 2.0f - 1.0f;\n sign = -sign;\n var unpacked = sign * packedFloat.x * 0.00390625f;\n unpacked += sign * packedFloat.y * 0.00001525878f;\n unpacked += sign * packedFloat.z * 5.960464477539063e-8f;\n return unpacked * pow(10.0f, exponent);\n}\n",czm_unpackValue="\n fn czm_unpackValue(packedValue : vec4) -> f32\n {\n const SHIFT_LEFT16 = 65536.0;\n\tconst SHIFT_LEFT8 = 256.0;\n\tvar value = packedValue * 255.0;\n\treturn value.r * SHIFT_LEFT16 + value.g * SHIFT_LEFT8 + value.b - 9000.0;\n }\n",czm_vertexLogDepth="\n#ifdef LOG_DEPTH\n varying v_depthFromNearPlusOne : f32;\n #ifdef SHADOW_MAP\n varying v_logPositionEC : vec3;\n #endif\n#endif\n\nfn czm_updatePositionDepth(inCoords : vec4) -> vec4 {\n var coords = inCoords;\n#ifdef LOG_DEPTH\n #ifdef SHADOW_MAP\n var logPositionEC = (Scene.uInverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n #endif\n coords.z = clamp(coords.z / coords.w, -1.0f, 1.0f) * coords.w;\n#endif\n return coords;\n}\n\nfn czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0f - Scene.uCurrentFrustum.x + gl_Position.w;\n gl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\n\nfn czm_vertexLogDepth_v4f(clipCoords : vec4)\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0f - Scene.uCurrentFrustum.x + clipCoords.w;\n czm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates="/**\n * Transforms a position from window to eye coordinates.\n * The transform from window to normalized device coordinates is done using components\n * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating\n * the inverse of czm_viewportTransformation. The transformation from\n * normalized device coordinates to clip coordinates is done using fragmentCoordinate.w,\n * which is expected to be the scalar used in the perspective divide. The transformation\n * from clip to eye coordinates is done using {@link czm_inverseProjection}.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec4} fragmentCoordinate The position in window coordinates to transform.\n *\n * @returns {vec4} The transformed position in eye coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @example\n * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);\n */\nfn czm_windowToEyeCoordinates(fragmentCoordinate : vec4) -> vec4\n{\n // Reconstruct NDC coordinates\n var x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\n var y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\n var z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n var q = vec4(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= fragmentCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s\n {\n q = czm_inverseProjection * q;\n }\n else\n {\n var top = czm_frustumPlanes.x;\n var bottom = czm_frustumPlanes.y;\n var left = czm_frustumPlanes.z;\n var right = czm_frustumPlanes.w;\n\n var near = czm_currentFrustum.x;\n var far = czm_currentFrustum.y;\n\n q.x = (q.x * (right - left) + left + right) * 0.5;\n q.y = (q.y * (top - bottom) + bottom + top) * 0.5;\n q.z = (q.z * (near - far) - near - far) * 0.5;\n q.w = 1.0;\n }\n\n return q;\n}\n\n/**\n * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.\n * This function produces more accurate results for window positions with log depth than\n * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version\n * of czm_windowToEyeCoordinates.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.\n * @param {float} depthOrLogDepth A depth or log depth for the fragment.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @returns {vec4} The transformed position in eye coordinates.\n */\nfn czm_windowToEyeCoordinates(fragmentCoordinateXY : vec2, depthOrLogDepth : f32) -> vec4\n{\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#ifdef LOG_DEPTH\n var near = czm_currentFrustum.x;\n var far = czm_currentFrustum.y;\n var log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n var depthFromCamera = depthFromNear + near;\n var windowCoord = vec4(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n var eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n return eyeCoordinate;\n#else\n var windowCoord = vec4(fragmentCoordinateXY, depthOrLogDepth, 1.0);\n var eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n#endif\n return eyeCoordinate;\n}\n",czm_writeDepthClampedToFarPlane="// emulated noperspective\n#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\n/**\n * Clamps a vertex to the far plane by writing the fragments depth.\n *

\n * The shader must enable the GL_EXT_frag_depth extension.\n *

\n *\n * @name czm_writeDepthClampedToFarPlane\n * @glslFunction\n *\n * @example\n * gl_FragColor = color;\n * czm_writeDepthClampedToFarPlane();\n *\n * @see czm_depthClampFarPlane\n */\nvoid czm_writeDepthClampedToFarPlane()\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && !defined(LOG_DEPTH)\n gl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n",czm_writeLogDepth="#ifdef LOG_DEPTH\nvarying v_depthFromNearPlusOne : f32;\n\n#ifdef POLYGON_OFFSET\nuniform u_polygonOffset : vec2;\n#endif\n\n#endif\n\nfn czm_writeLogDepth(inDepth : f32)\n{\n var depth = inDepth;\n#ifdef LOG_DEPTH\n if (depth <= 0.9999999 || depth > Scene.uFarDepthFromNearPlusOne) {\n discard;\n }\n\n#ifdef POLYGON_OFFSET\n var factor = u_polygonOffset.x;\n var units = u_polygonOffset.y;\n var x = dpdx(depth);\n var y = dpdy(depth);\n var m = sqrt(x * x + y * y);\n depth += m * factor;\n\n#endif // POLYGON_OFFSET\n\n gl_FragDepth = log2(depth) * Scene.uOneOverLog2FarDepthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\n gl_FragDepth += 0.00000001 * units;\n#endif // POLYGON_OFFSET\n\n#endif // LOG_DEPTH\n}\n",czm_writeNonPerspective="/**\n * Transforms a value for non-perspective interpolation by multiplying\n * it by w, the value used in the perspective divide. This function is\n * intended to be called in a vertex shader to compute the value of a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The fragment shader\n * must call {@link czm_readNonPerspective} to retrieve the final\n * non-perspective value.\n *\n * @name czm_writeNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.\n * @param {float} w The perspective divide value. Usually this is the computed `gl_Position.w`.\n * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a `varying` and read in the\n * fragment shader with {@link czm_readNonPerspective}.\n */\nfloat czm_writeNonPerspective(float value, float w) {\n return value * w;\n}\n\nvec2 czm_writeNonPerspective(vec2 value, float w) {\n return value * w;\n}\n\nvec3 czm_writeNonPerspective(vec3 value, float w) {\n return value * w;\n}\n\nvec4 czm_writeNonPerspective(vec4 value, float w) {\n return value * w;\n}\n",czm_XYZToRGB="/**\n * Converts a CIE Yxy color to RGB.\n *

The conversion is described in\n * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n *

\n * \n * @name czm_XYZToRGB\n * @glslFunction\n * \n * @param {vec3} Yxy The color in CIE Yxy.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_XYZToRGB(vec3 Yxy)\n{\n const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n -1.5371, 1.8760, -0.2040,\n -0.4985, 0.0416, 1.0572);\n vec3 xyz;\n xyz.r = Yxy.r * Yxy.g / Yxy.b;\n xyz.g = Yxy.r;\n xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\n \n return XYZ2RGB * xyz;\n}\n",czm_getNormalMatrix="\nfn czm_getNormalMatrix(viewMatrix : mat4x4, modelMatrix : mat4x4) -> mat3x3 {\n var modelView = viewMatrix * modelMatrix;\n let modelViewRow0 : vec4 = modelView[0u];\n let modelViewRow1 : vec4 = modelView[1u]; \n let modelViewRow2 : vec4 = modelView[2u]; \n var normalMatrix = mat3x3(\n vec3(modelViewRow0.x, modelViewRow0.y, modelViewRow0.z), \n vec3(modelViewRow1.x, modelViewRow1.y, modelViewRow1.z), \n vec3(modelViewRow2.x, modelViewRow2.y, modelViewRow2.z));\n return normalMatrix;\n}",czm_sampleAndBlend="fn czm_sampleAndBlend(\ncurrentTextureColor : vec4,\npreviousColor : vec4,\ntileTextureCoordinates : vec2,\ntextureCoordinateRectangle : vec4,\ntransparentBackColor : vec4,\nimageryClipEnable : bool,\ntextureAlphaIn : f32,\ntextureBrightness : f32,\ntextureContrast : f32,\ntextureHue : f32,\ntextureSaturation : f32,\ntextureOneOverGamma : f32,\nsplit : vec2,\nswipe : vec4)\n-> vec4 {\nvar alphaMultiplier : vec2 = step(textureCoordinateRectangle.xy, tileTextureCoordinates);\nvar textureAlpha : f32 = textureAlphaIn * alphaMultiplier.x * alphaMultiplier.y;\nalphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.zw - tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nvar color : vec3 = currentTextureColor.rgb;\nvar alpha : f32 = currentTextureColor.a;\nif(transparentBackColor.a > 0.01)\n{\nvar rDiff = abs(transparentBackColor.r - color.r);\nvar gDiff = abs(transparentBackColor.g - color.g);\nvar bDiff = abs(transparentBackColor.b - color.b);\nif(rDiff < transparentBackColor.a && gDiff < transparentBackColor.a && bDiff < transparentBackColor.a)\n{\nalpha = 0.0;\n}\n}\nif(imageryClipEnable)\n{\n#ifdef Apply_ImageryClip\nif(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n{\nalpha = 0.0;\n}\n#else\nalpha = 0.0;\n#endif\n}\n#if !defined(APPLY_GAMMA)\nvar tempColor : vec4 = czm_gammaCorrect(vec4(color, alpha));\ncolor = tempColor.rgb;\nalpha = tempColor.a;\n#else\ncolor = pow(color, vec3(textureOneOverGamma));\n#endif\n#ifdef APPLY_SPLIT\nvar splitPosition : vec2= czm_imagerySplitPosition;\nif (split.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\nalpha = 0.0;\n}\nelse if (split.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\nalpha = 0.0;\n}\nif(split.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\nalpha = 0.0;\n}\nelse if(split.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_SWIPE\nif (gl_FragCoord.x < swipe.x || gl_FragCoord.y > swipe.y) {\nalpha = 0.0;\n}\nelse if (gl_FragCoord.x > swipe.z || gl_FragCoord.y < swipe.w) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_BRIGHTNESS\ncolor = mix(vec3(0.0), color, textureBrightness);\n#endif\n#ifdef APPLY_CONTRAST\ncolor = mix(vec3(0.5), color, textureContrast);\n#endif\n#ifdef APPLY_HUE\ncolor = czm_hue(color, textureHue);\n#endif\n#ifdef APPLY_SATURATION\ncolor = czm_saturation(color, textureSaturation);\n#endif\nvar sourceAlpha : f32 = alpha * textureAlpha;\nvar outAlpha : f32 = mix(previousColor.a, 1.0, sourceAlpha);\nvar outColor : vec3 = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4(outColor, outAlpha);\n}\n// fn gridTextureSampleAndBlend(\n// vec4 previousColor,\n// sampler2D textureToSample,\n// vec2 tileTextureCoordinates,\n// vec4 textureCoordinateRectangle,\n// vec4 textureCoordinateTranslationAndScale)\n// -> vec4 {\n// float textureAlpha = 1.0;\n// vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\n// textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n// alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\n// textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n// vec2 translation = textureCoordinateTranslationAndScale.xy;\n// vec2 scale = textureCoordinateTranslationAndScale.zw;\n// vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n// vec4 value = texture2D(textureToSample, textureCoordinates);\n// vec3 color = value.rgb;\n// float alpha = value.a;\n// float sourceAlpha = alpha * textureAlpha;\n// float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\n// vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\n// return vec4(outColor, outAlpha);\n// }\nfn computeTextureCoord(tileTextureCoordinates : vec2, textureCoordinateTranslationAndScale : vec4, textureSize : vec4, flipY : bool) ->vec2\n{\nvar translation : vec2 = textureCoordinateTranslationAndScale.xy;\nvar scale : vec2 = textureCoordinateTranslationAndScale.zw;\nvar textureCoordinates : vec2 = tileTextureCoordinates * scale + translation;\nif(flipY)\n{\ntextureCoordinates.y = 1.0 - textureCoordinates.y;\n}\n#ifdef WEBGPU\nvar texelSize : vec2 = textureSize.zw;\ntextureCoordinates = clamp(textureCoordinates, texelSize, 1.0 - texelSize);\n#endif\nreturn textureCoordinates;\n}\n",E$19={czm_degreesPerRadian:czm_degreesPerRadian,czm_depthRange:czm_depthRange,czm_ellipsoidInverseRadii:czm_ellipsoidInverseRadii,czm_ellipsoidRadii:czm_ellipsoidRadii,czm_epsilon1:czm_epsilon1,czm_epsilon2:czm_epsilon2,czm_epsilon3:czm_epsilon3,czm_epsilon4:czm_epsilon4,czm_epsilon5:czm_epsilon5,czm_epsilon6:czm_epsilon6,czm_epsilon7:czm_epsilon7,czm_infinity:czm_infinity,czm_oneOverPi:czm_oneOverPi,czm_oneOverTwoPi:czm_oneOverTwoPi,czm_passCesium3DTile:czm_passCesium3DTile,czm_passCesium3DTileClassification:czm_passCesium3DTileClassification,czm_passCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow,czm_passClassification:czm_passClassification,czm_passCompute:czm_passCompute,czm_passEnvironment:czm_passEnvironment,czm_passGlobe:czm_passGlobe,czm_passGround:czm_passGround,czm_passOpaque:czm_passOpaque,czm_passOverlay:czm_passOverlay,czm_passTerrainClassification:czm_passTerrainClassification,czm_passTranslucent:czm_passTranslucent,czm_pi:czm_pi,czm_piOverFour:czm_piOverFour,czm_piOverSix:czm_piOverSix,czm_piOverThree:czm_piOverThree,czm_piOverTwo:czm_piOverTwo,czm_radiansPerDegree:czm_radiansPerDegree,czm_sceneMode2D:czm_sceneMode2D,czm_sceneMode3D:czm_sceneMode3D,czm_sceneModeColumbusView:czm_sceneModeColumbusView,czm_sceneModeMorphing:czm_sceneModeMorphing,czm_solarRadius:czm_solarRadius,czm_threePiOver2:czm_threePiOver2,czm_twoPi:czm_twoPi,czm_webMercatorMaxLatitude:czm_webMercatorMaxLatitude,czm_depthRangeStruct:czm_depthRangeStruct,czm_ellipsoid:czm_ellipsoid,czm_material:czm_material,czm_materialInput:czm_materialInput,czm_ray:czm_ray,czm_raySegment:czm_raySegment,czm_s3mMaterialInput:czm_s3mMaterialInput,czm_shadowParameters:czm_shadowParameters,czm_acesTonemapping:czm_acesTonemapping,czm_adjustColor:czm_adjustColor,czm_alphaWeight:czm_alphaWeight,czm_antialias:czm_antialias,czm_approximateSphericalCoordinates:czm_approximateSphericalCoordinates,czm_branchFreeTernary:czm_branchFreeTernary,czm_cascadeColor:czm_cascadeColor,czm_cascadeDistance:czm_cascadeDistance,czm_cascadeMatrix:czm_cascadeMatrix,czm_cascadeWeights:czm_cascadeWeights,czm_clip:czm_clip,czm_columbusViewMorph:czm_columbusViewMorph,czm_computeNormal:czm_computeNormal,czm_computePosition:czm_computePosition,czm_cosineAndSine:czm_cosineAndSine,czm_decompressTextureCoordinates:czm_decompressTextureCoordinates,czm_depthClampFarPlane:czm_depthClampFarPlane,czm_eastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates,czm_ellipsoidContainsPoint:czm_ellipsoidContainsPoint,czm_ellipsoidNew:czm_ellipsoidNew,czm_ellipsoidWgs84TextureCoordinates:czm_ellipsoidWgs84TextureCoordinates,czm_equalsEpsilon:czm_equalsEpsilon,czm_ExcavationFS:czm_ExcavationFS,czm_ExcavationVS:czm_ExcavationVS,czm_executeExcavation:czm_executeExcavation,czm_eyeOffset:czm_eyeOffset,czm_eyeToWindowCoordinates:czm_eyeToWindowCoordinates,czm_fastApproximateAtan:czm_fastApproximateAtan,czm_floodAnalysis:czm_floodAnalysis,czm_fog:czm_fog,czm_gammaCorrect:czm_gammaCorrect,czm_geodeticSurfaceNormal:czm_geodeticSurfaceNormal,czm_getDefaultMaterial:czm_getDefaultMaterial,czm_getEmissiveTextureColor:czm_getEmissiveTextureColor,czm_getFusionModePostiion:czm_getFusionModePostiion,czm_getHorizontalColor:czm_getHorizontalColor,czm_getHypsometricColor:czm_getHypsometricColor,czm_getLambertDiffuse:czm_getLambertDiffuse,czm_getPBRParamFromTexture:czm_getPBRParamFromTexture,czm_getSpecular:czm_getSpecular,czm_getVolumeValue:czm_getVolumeValue,czm_getWaterNoise:czm_getWaterNoise,czm_getWgs84EllipsoidEC:czm_getWgs84EllipsoidEC,czm_HSBToRGB:czm_HSBToRGB,czm_HSLToRGB:czm_HSLToRGB,czm_hue:czm_hue,czm_inverseGamma:czm_inverseGamma,czm_inverseMatrix:czm_inverseMatrix,czm_isEmpty:czm_isEmpty,czm_isFull:czm_isFull,czm_latitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction,czm_LineCallOutVp:czm_LineCallOutVp,czm_lineDistance:czm_lineDistance,czm_luminance:czm_luminance,czm_metersPerPixel:czm_metersPerPixel,czm_modelToWindowCoordinates:czm_modelToWindowCoordinates,czm_multiplyWithColorBalance:czm_multiplyWithColorBalance,czm_nearFarScalar:czm_nearFarScalar,czm_octDecode:czm_octDecode,czm_packDepth:czm_packDepth,czm_packValue:czm_packValue,czm_phong:czm_phong,czm_planeDistance:czm_planeDistance,czm_pointAlongRay:czm_pointAlongRay,czm_rainMaterial:czm_rainMaterial,czm_rasterCull:czm_rasterCull,czm_rayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval,czm_readDepth:czm_readDepth,czm_readNonPerspective:czm_readNonPerspective,czm_reverseLogDepth:czm_reverseLogDepth,czm_RGBToHSB:czm_RGBToHSB,czm_RGBToHSL:czm_RGBToHSL,czm_RGBToXYZ:czm_RGBToXYZ,czm_RollerShutter:czm_RollerShutter,czm_s3mBatchOperation:czm_s3mBatchOperation,czm_s3mBatchOperationForSilhouette:czm_s3mBatchOperationForSilhouette,czm_s3mComputeVaryings:czm_s3mComputeVaryings,czm_s3mImageryColor:czm_s3mImageryColor,czm_s3mOverlay:czm_s3mOverlay,czm_S3MPBR:czm_S3MPBR,czm_s3mVisibleDistance:czm_s3mVisibleDistance,czm_sampleOctahedralProjection:czm_sampleOctahedralProjection,czm_saturation:czm_saturation,czm_setAlphaByWWalue:czm_setAlphaByWWalue,czm_signNotZero:czm_signNotZero,czm_sketchMode:czm_sketchMode,czm_spatialQueryClip:czm_spatialQueryClip,czm_sphericalHarmonics:czm_sphericalHarmonics,czm_splitClip:czm_splitClip,czm_sRGBToLinear:czm_sRGBToLinear,czm_tangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix,czm_transformPlane:czm_transformPlane,czm_translateRelativeToEye:czm_translateRelativeToEye,czm_translucentPhong:czm_translucentPhong,czm_transparentColorClip:czm_transparentColorClip,czm_transpose:czm_transpose,czm_unpackDepth:czm_unpackDepth,czm_unpackFloat:czm_unpackFloat,czm_unpackValue:czm_unpackValue,czm_vertexLogDepth:czm_vertexLogDepth,czm_windowToEyeCoordinates:czm_windowToEyeCoordinates,czm_writeDepthClampedToFarPlane:czm_writeDepthClampedToFarPlane,czm_writeLogDepth:czm_writeLogDepth,czm_writeNonPerspective:czm_writeNonPerspective,czm_XYZToRGB:czm_XYZToRGB,czm_getNormalMatrix:czm_getNormalMatrix,czm_sampleAndBlend:czm_sampleAndBlend},o$1a="\n#ifdef HAS_RAIN\nuniform sampler2D uRippleTexture;\n \nvoid getTimeInfo(float animationSpeed, out vec2 timeVec)\n{\n\tfloat time = czm_frameNumber * animationSpeed;\n\ttime = floor(30.0 * time);\n\tfloat time_diff = floor(time*0.25);\n\ttime = mod(time, 4.0);\n\ttime_diff = mod(time_diff, 4.0);\n\ttimeVec = vec2(time, time_diff);\n}\n\nvoid getPosInfo(vec4 posMC, out vec2 posMC_frac1, out vec2 posMC_frac2)\n{\n\tfloat ripple_scale = 1.0 / uRippleScale;\n\tvec2 posXY = posMC.xy * ripple_scale;\n\tposMC_frac1 = fract(posXY);\n\tvec2 posStep = vec2(0.5);\n\tposMC_frac2 = fract(posXY + posStep);\n}\n\nfloat getAlpha(vec2 posMC_frac1)\n{\n\tvec2 dist = (posMC_frac1 - vec2(0.5)) * 2.0;\n\tdist = vec2(abs(dist.x), abs(dist.y));\n\tvec2 result = pow(dist, vec2(5.0));\n\treturn result.x + result.y;\n}\n\nvec4 getRippleValue(sampler2D uRippleTexture, vec2 timeVec, vec2 posMC_frac1, vec2 posMC_frac2, float alpha)\n{\n\tvec2 rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n\tvec2 rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n\tvec4 rippleValue_1 = texture2D(uRippleTexture, rippleUV_1.xy);\n\tvec4 rippleValue_2 = texture2D(uRippleTexture, rippleUV_2.xy);\n\treturn mix(rippleValue_1, rippleValue_2, alpha);\n}\n\nvec3 getRippleNormal(vec4 rippleValue, float wind_intensity, float rain, float depthFade)\n{\n\tvec2 rippleValueXY = rippleValue.xy;\n\tvec2 rippleValueZW = rippleValue.zw;\n\tconst vec2 _value = vec2(0.5);\n\tvec2 part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n\tvec2 part_2 = (rippleValueXY - _value) * 0.6;\n\tvec2 mergedValue = mix(part_1, part_2, rain) * depthFade;\n\treturn vec3(mergedValue, 1.0);\n}\n\nfloat getNormalAlpha(vec3 normalWS,float wetness)\n{\n\tfloat valueZ = normalWS.z - 0.5;\n\tfloat wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n\treturn pow(wet_correction, 15.0);\n}\n\nvec3 rippleNormalCorrection(vec3 rippleNormal,float normalAlpha)\n{\n\tconst vec3 blueNormal = vec3(0.0, 0.0, 1.0);\n\treturn mix(blueNormal, rippleNormal, normalAlpha);\n}\n\nvec3 rippleGenerator(sampler2D uRippleTexture, float animationSpeed,vec3 normalWS,float wetness)\n{\n\tvec2 timeVec = vec2(1.0);\n\tgetTimeInfo(animationSpeed, timeVec);\n\tvec2 posMC_frac1 = vec2(1.0);\n\tvec2 posMC_frac2 = vec2(1.0);\n\tgetPosInfo(vPositionMC, posMC_frac1, posMC_frac2);\n\tfloat alpha = getAlpha(posMC_frac1);\n\tvec4 rippleValue = getRippleValue(uRippleTexture, timeVec, posMC_frac1, posMC_frac2, alpha);\n\tvec3 rippleNormal = getRippleNormal(rippleValue, uWindIntensity, uRain, uCameraDepth);\n\tfloat normalAlpha = getNormalAlpha(normalWS, wetness);\n\treturn normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\n#endif\n",r$14="\n#ifdef HAS_SNOW\nuniform sampler2D uSnowMaskTexture;\nuniform sampler2D uSnowNormalTexture;\n\nvec3 getSnowMaskValue(sampler2D uSnowMaskTexture, vec2 snowUV)\n{\n\treturn texture2D(uSnowMaskTexture, snowUV).rgb;\n}\n\nfloat getSnowCoverage(float snow_coverage, float max_snow_coverage, vec3 normalWS, float z_mask)\n{\n\tfloat normal_z = normalWS.z;\n\tnormal_z += 1.1 + z_mask;\n\tnormal_z = clamp(normal_z * 0.5, 0.0, 1.0);\n\tfloat final_snow_coverage = clamp(snow_coverage, 0.0, max_snow_coverage);\n\tfinal_snow_coverage = clamp(final_snow_coverage*normal_z, 0.0, 1.0);\n\treturn final_snow_coverage;\n}\n\nfloat getSnowCoverageWithMaskTexture(float finalSnowCoverage, float heightValue, float snow_scatter_value, float snow_scatter_alpha, float tighten_value)\n{\n\tfloat scatter_value = mix(heightValue, snow_scatter_value, snow_scatter_alpha);\n\treturn clamp((tighten_value + 1.0) * finalSnowCoverage - tighten_value * scatter_value, 0.0, 1.0);\n}\n\nfloat getSnowAlpha(vec3 normalWS, float snow_coverage, float z_mask)\n{\n\treturn clamp((normalWS.z + z_mask) * 5.0, 0.0, 1.0) * snow_coverage;\n}\n\nvec3 getFinalBaseColor(vec3 baseColor, vec3 snow_baseColor, float snowAlpha)\n{\n\treturn mix(baseColor, snow_baseColor, snowAlpha);\n}\n\nfloat getFinalRoughness(float roughness, float snow_roughness, float snowAlpha)\n{\n\treturn mix(roughness, snow_roughness, snowAlpha);\n}\n\nvec3 getFinalNormal(vec3 normalWS, vec3 snowNormal, float blendNormalValue, float snow_coverage)\n{\n\tvec3 snowNormal_part2 = vec3(snowNormal.xy - vec2(0.5), 1.0);\n\tfloat normal_alpha = (1.0 - blendNormalValue)* snow_coverage;\n\treturn mix(normalWS, snowNormal_part2, normal_alpha);\n}\n\nvoid snowGenerator(sampler2D uSnowMaskTexture, sampler2D uSnowNormalTexture, vec2 snowUV, float snow_coverage, inout vec3 normalWS, inout vec3 baseColor, inout float roughness)\n{\n\tvec3 snowMaskValue = texture2D(uSnowMaskTexture, snowUV).rgb;\n\tconst float max_snow_coverage = 1.0;\n\tconst float z_mask = 0.0;\n\tfloat snowCoverage = getSnowCoverage(snow_coverage, max_snow_coverage, normalWS, z_mask);\n\tconst float heightValue = 0.5;\n\tfloat snow_scatter_value = snowMaskValue.g;\n\tconst float snow_scatter_alpha = 0.5;\n\tconst float tighten_value = 4.0;\n snowCoverage = getSnowCoverageWithMaskTexture(snowCoverage, heightValue, snow_scatter_value, snow_scatter_alpha, tighten_value);\n\tfloat snow_alpha = getSnowAlpha(normalWS, snowCoverage, z_mask);\n\tbaseColor = getFinalBaseColor(baseColor, vec3(snowMaskValue.r), snow_alpha);\n\troughness = getFinalRoughness(roughness, snowMaskValue.b, snow_alpha);\n\tvec3 snowNormalValue = texture2D(uSnowNormalTexture, snowUV).rgb;\n\tconst float blendNormalValue = 0.3;\n\tnormalWS = getFinalNormal(normalWS, snowNormalValue, blendNormalValue, snowCoverage);\n}\n\n#endif\n",e$1R="\n#ifdef HAS_HEMISPHERE_LIGHTS\n\nstruct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n};\n\nvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n float dotNL = dot( geometry.normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n}\n\n#endif\n",m$_="\n#ifdef HAS_POINT_LIGHTS\nstruct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n};\n\nvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = pointLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n directLight.color = pointLight.color;\n directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n directLight.visible = ( directLight.color != vec3( 0.0 ) );\n}\n\n#endif\n",t$Z="\n#ifdef HAS_SPOT_LIGHTS\n\nstruct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n};\n\nvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = spotLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n float angleCos = dot( directLight.direction, spotLight.direction );\n if ( angleCos > spotLight.coneCos ) {\n float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n directLight.color = spotLight.color;\n directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n directLight.visible = true;\n } else {\n directLight.color = vec3( 0.0 );\n directLight.visible = false;\n }\n}\n\n#endif\n",i$Y="\n#ifdef HAS_DIR_LIGHTS\n \n#endif\n",p$10="\n\n#ifdef HAS_DIR_LIGHTS\nfor (int i = 0; i < uDirLightCount; i++) {\n directLight.color = uDirectionalLightColor[i];\n directLight.direction = uDirectionalLightDirectionEC[i];\n directLight.visible = true;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n\n#ifdef HAS_POINT_LIGHTS\nPointLight pointLight;\nfor (int i = 0; i < uPointLightCount; i++) {\n pointLight.position = uPointLightPositionEC[i];\n pointLight.color = uPointLightColor[i];\n pointLight.distance = uPointLightDistanceAndDecay[i].x;\n pointLight.decay = uPointLightDistanceAndDecay[i].y;\n getPointDirectLightIrradiance( pointLight, geometry, directLight );\n if(!directLight.visible) continue;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n\n#ifdef HAS_SPOT_LIGHTS\nSpotLight spotLight;\nfor (int i = 0; i < uSpotLightCount; i++) {\n spotLight.position = uSpotLightPositionEC[i];\n spotLight.color = uSpotLightColorAndExponent[i].rgb;\n spotLight.direction = uSpotLightDirectionEC[i];\n spotLight.coneCos = uSpotLightDistanceDecayCosPenumbra[i].z;\n spotLight.penumbraCos = uSpotLightDistanceDecayCosPenumbra[i].w;\n getSpotDirectLightIrradiance( spotLight, geometry, directLight );\n if(!directLight.visible) continue;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n",l$17="\n#ifdef BRDF\n#define RECIPROCAL_PI 0.31830988618\n#define M_PI 3.141592653589793\n#define EPSILON 1e-6\nfloat pow2( const in float x ) { return x * x; }\n\n#ifdef HAS_BASE_TEXTURE\n uniform sampler2D uBaseTexture;\n#endif\n\n#ifdef HAS_NORMAL_TEXTURE\n uniform sampler2D uNormalTexture;\n#endif\n\n#ifdef HAS_EMISSIVE_TEXTURE\n uniform sampler2D uEmissionTexture;\n#endif\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n uniform sampler2D uMetallicRoughnessTexture;\n#endif\n\n#ifdef HAS_OCCLUSION_TEXTURE\n uniform sampler2D uOcclusionTexture;\n#endif\n\n#ifdef USE_BatchPBR\n varying vec2 vMetallicRoughness;\n varying vec4 vEmissiveFactor;\n varying vec3 vAlphaCutoffAndModeAndDoubleSide;\n#endif\n\n#include \n#include \n#include \n#include \n#include \n\nvec3 sRGBToLinear(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\nvec4 sRGBToLinear(vec4 srgbIn)\n{\n srgbIn = srgbIn ;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\nvec3 LinearTosRGB(vec3 linearIn) \n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else \n return linearIn;\n#endif \n}\n\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor * RECIPROCAL_PI;\n}\n\nvec3 applyTonemapping(vec3 linearIn) \n{\n vec3 color = linearIn * uToneMappingExposure;\n return czm_acesTonemapping(color);\n}\n\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\n\nfloat GeometrySchlickGGX(float roughness, float NoV)\n{\n float k = pow(roughness + 1.0, 2.0) / 8.0;\n return NoV / (NoV * (1.0 - k) + k);\n}\n\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n float alpha = roughness * roughness;\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = clamp( dot( normal, lightDir ), 0.001, 1.0 );\n float dotNV = abs( dot( normal, viewDir ) ) + 0.001;\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotLH = saturate( dot( lightDir, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n float D = D_GGX( alpha, dotNH );\n return F * ( G * D ) / (4.0 * dotNL * dotNV);\n}\n\nvoid directPhysical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n reflectedLight.directDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n}\n\n#ifdef HAS_NORMAL_TEXTURE\nvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv, vec3 mapN) {\n float fNormalLength = length(mapN);\n vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n if(fNormalLength < 0.5) {\n return surf_norm;\n }\n mapN = mapN * 2.0 - 1.0;\n float scale = sign( st1.t * st0.s - st0.t * st1.s );\n vec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n vec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n vec3 N = normalize( surf_norm );\n mat3 tsn = mat3( S, T, N );\n mapN.xy *= uNormalTextureScale;\n mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n return normalize( tsn * mapN );\n}\n#endif\n\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n\n#ifdef HAS_RAIN\nvoid adjustByWetness(inout vec3 baseColor, inout float roughness, vec3 normalWS_wetness) {\n float fWetness = clamp(uWetnessFactor,0.0,1.0);\n float fWetness_correction = pow(4.0*fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction,clamp(fWetness,0.0,0.9),1.0);\n float fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n baseColor = mix(baseColor,baseColor*0.7,fWerness_normalized);\n roughness = mix(roughness,0.05,fWerness_normalized);\n}\n#endif\n\nfloat getRoughness(vec2 oriTexCoord){\n float roughness = uMetallicRoughnessIntensityScale.y;\n#ifdef PBR_THEME\n int pbrIndex = int(vPBRIndex);\n if(vPBRIndex < 0.0)\n {\n return 1.0;\n }\n mat4 pbrPar = mat4(0.0);\n for(int i = 0;i < NUM_PBR_MATERIALS;i++)\n {\n if(i == pbrIndex)\n {\n pbrPar = uPBRMaterials[i];\n break;\n }\n }\n roughness = clamp(pbrPar[0][0], 0.04, 1.0);\n#endif\n#ifdef USE_BatchPBR\n roughness = vMetallicRoughness.y;\n#endif\n roughness = clamp(roughness, 0.0, 1.0);\n \n#ifdef HAS_MetallicRoughness_TEXTURE\n vec3 metallicRoughness = texture2D(uMetallicRoughnessTexture, oriTexCoord).rgb;\n roughness = clamp(roughness * metallicRoughness.g, 0.04, 1.0);\n#ifdef HAS_RAIN\n adjustByWetness(vec3(1.0), roughness, vec3(0.0));\n#endif\n#endif\n return roughness;\n}\n\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\nvec3 getTexcoordAndMipmapLevel(vec2 uv, vec4 texMatrix, float texCoordZ) {\n vec2 translate = texMatrix.xy;\n float textureWidth = texMatrix.z * uPbrParTextureWidth;\n float scale = texMatrix.z;\n float maxMipmapLevel = texMatrix.w;\n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, vec2(textureWidth), maxMipmapLevel, mipLevel);\n #endif\n vec2 texCoord;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n float offset = pow(2.0, mipLevel) / textureWidth;\n texCoord = clamp(texCoord, offset, 1.0 - offset);\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n return vec3(texCoord.xy, mipLevel);\n}\n#endif\n\nvec4 brdf(in vec4 baseColorWithAlpha, vec2 texCoord, vec2 oriTexCoord, vec3 posEC, vec3 posMC, vec3 vertexNormalEC, mat4 modelMatrix) {\n vec2 uv = oriTexCoord;\n float mipmapLevel = 0.0;\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\n vec3 uvAndMiplevel = getTexcoordAndMipmapLevel(oriTexCoord, vTexMatrix, vTexCoordZ.x);\n uv = uvAndMiplevel.xy;\n mipmapLevel = uvAndMiplevel.z;\n#endif\n#ifndef USE_BatchPBR\n baseColorWithAlpha = baseColorWithAlpha * uBaseColorFactor;\n#endif\n#ifdef BaseColorReplace\n baseColorWithAlpha = uBaseColorFactor;\n#endif\n float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n mat3 normalMatrix = getNormalMatrix(uView, modelMatrix);\n vec3 ng = normalize(vertexNormalEC);\n #ifndef HAS_NORMAL\n ng = normalize(normalMatrix * czm_computeNormal(posMC.xyz));\n #endif\n ng = ng * faceDirection;\n#ifdef HAS_BASE_TEXTURE\n #ifdef USE_BatchPBR\n baseColorWithAlpha *= sRGBToLinear(texture2DLodEXT(uBaseTexture, uv * uTexUVOffset.zw + uTexUVOffset.xy, mipmapLevel));\n #else\n baseColorWithAlpha = sRGBToLinear(texture2D(uBaseTexture, oriTexCoord * uTexUVOffset.zw + uTexUVOffset.xy)) * uBaseColorFactor;\n #endif\n#endif\n#ifdef HAS_NORMAL_TEXTURE\n #ifdef USE_BatchPBR\n vec3 mapN = texture2DLodEXT( uNormalTexture, uv, mipmapLevel).xyz;\n #else\n vec3 mapN = texture2D( uNormalTexture, uv).xyz;\n #endif\n // 切线空间计算纹理坐标需采用原始纹理坐标,边界未做偏移\n vec3 n = ng;\n vec3 oriNg = perturbNormal2Arb(posEC, ng, oriTexCoord, mapN);\n if(!(oriTexCoord.x == 0.0 && oriTexCoord.y == 0.0)){\n n = oriNg;\n }\n#else\n vec3 n = ng;\n#endif\n#ifdef HAS_RAIN\n mat3 fixedToENU_wetness = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n vec3 normalWS_wetness = normalize(fixedToENU_wetness * n);\n n = rippleGenerator(uRippleTexture,uAnimationSpeed,normalWS_wetness,uWetnessFactor);\n#endif\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = uMetallicRoughnessIntensityScale.y;\n float metalness = uMetallicRoughnessIntensityScale.x;\n vec4 emissiveFactor = uEmissiveFactor;\n#ifdef PBR_THEME\n int pbrIndex = int(vPBRIndex);\n if(vPBRIndex < 0.0)\n {\n return baseColorWithAlpha;\n }\n mat4 pbrPar = mat4(0.0);\n for(int i = 0;i < NUM_PBR_MATERIALS;i++)\n {\n if(i == pbrIndex)\n {\n pbrPar = uPBRMaterials[i];\n break;\n }\n }\n roughness = clamp(pbrPar[0][0], 0.04, 1.0);\n metalness = clamp(pbrPar[0][1], 0.0, 1.0);\n baseColor = (baseColorWithAlpha / uBaseColorFactor * vec4(pbrPar[0][2], pbrPar[0][3], pbrPar[1][0], pbrPar[1][1])).rgb;\n#endif\n#ifdef USE_BatchPBR\n metalness = vMetallicRoughness.x;\n roughness = vMetallicRoughness.y;\n emissiveFactor = vEmissiveFactor;\n#endif\n metalness = clamp(metalness, 0.0, 1.0);\n roughness = clamp(roughness, 0.04, 1.0);\n \n#ifdef HAS_MetallicRoughness_TEXTURE\n #ifdef USE_BatchPBR\n vec3 metallicRoughness = texture2DLodEXT(uMetallicRoughnessTexture, uv, mipmapLevel).rgb;\n #else\n vec3 metallicRoughness = texture2D(uMetallicRoughnessTexture, oriTexCoord).rgb;\n #endif\n metalness = clamp(metalness * metallicRoughness.r, 0.0, 1.0);\n roughness = clamp(roughness * metallicRoughness.g, 0.04, 1.0);\n#ifdef HAS_RAIN\n adjustByWetness(baseColor, roughness, normalWS_wetness);\n#endif\n#ifdef HAS_SNOW\n mat3 fixedToENU_snow = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n vec3 normalWS_snow = normalize(fixedToENU_snow * n);\n snowGenerator(uSnowMaskTexture,uSnowNormalTexture, oriTexCoord,uSnowCoverageFactor,normalWS_snow,baseColor,roughness);\n#endif\n#endif\n\n vec3 lightColorHdr = vec3(2.0) * uSunLightColor.rgb * uSunLightON;\n vec3 l = normalize(uSunDirectionEC);\n vec3 v = -normalize(posEC);\n vec3 h = normalize(v + l);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n \n float alpha = roughness * roughness;\n float dotNL = clamp( dot( n, l ), 0.001, 1.0 );\n float dotNV = abs( dot( n, v ) ) + 0.001;\n float dotNH = saturate( dot( n, h ) );\n float dotLH = saturate( dot( l, h ) );\n float dotVH = saturate( dot( v, h ) );\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n float f90 = clamp(reflectance * 25.0, 0.0, 1.0);\n vec3 F = F_Schlick( specularColor, f90, dotVH );\n float G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n float D = D_GGX( alpha, dotNH );\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * dotNL * dotNV);\n\n PhysicalMaterial material;\n material.diffuseColor = diffuseColor;\n material.roughness = max( roughness, 0.0525 );\n material.roughness = min( material.roughness, 1.0 );\n material.specularColor = specularColor;\n material.specularF90 = 1.0;\n \n GeometricContext geometry;\n geometry.position = posEC;\n geometry.normal = n;\n geometry.viewDir = v;\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += dotNL * lightColorHdr * diffuseContribution;\n reflectedLight.directSpecular += dotNL * lightColorHdr * specularContribution;\n \n IncidentLight directLight; \n #include \n \n getEnvironmentColor(geometry, material, reflectedLight);\n\n#ifdef HAS_OCCLUSION_TEXTURE\n #ifdef USE_BatchPBR\n float ambientOcclusion = texture2DLodEXT(uOcclusionTexture, uv, mipmapLevel).r;\n #else\n float ambientOcclusion = texture2D(uOcclusionTexture, oriTexCoord.xy).r;\n #endif\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n#ifdef IBL\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n#endif\n#endif\n\n float shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), n, -posEC.z);\n#endif\n\nvec3 color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n\n#ifdef HAS_EMISSIVE_TEXTURE\n vec2 emissiveTexCoord = uv * uEmissiveUVOffsetAndTiling.zw + uEmissiveUVOffsetAndTiling.xy;\n #ifdef USE_BatchPBR\n vec3 emissive = texture2DLodEXT(uEmissionTexture, emissiveTexCoord, mipmapLevel).rgb;\n #else\n vec3 emissive = texture2D(uEmissionTexture, emissiveTexCoord).rgb;\n #endif\n emissive *= emissiveFactor.rgb;\n color += emissive;\n#else\n color += emissiveFactor.rgb;\n#endif\n\n color = applyTonemapping(color);\n color = LinearTosRGB(color);\n#ifdef MASK\n if (baseColorWithAlpha.a < uAlphaCutoff)\n {\n discard;\n }\n return vec4(color.rgb, 1.0);\n#endif\n return vec4(color.rgb, baseColorWithAlpha.a);\n}\n#endif\n",f$Y="\n#ifdef SERVEREXCAVATION\nuniform sampler2D uServerExcavationTexture;\nvarying vec4 vServerExcavationVertexPos;\nvec2 CalculateServerExcavationPolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect)\n{\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\nbool executeServerExcavation()\n{\n float hasExcavation = 1.0;\n vec2 vecExcavationTexCoord = CalculateServerExcavationPolyTexCoord(vServerExcavationVertexPos, uServerExcavationRect, hasExcavation);\n bool excavationInside = (uServerExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n if(excavationInside)\n {\n return texture2D(uServerExcavationTexture, vecExcavationTexCoord.xy).r > 0.5;\n }\n else\n {\n return texture2D(uServerExcavationTexture, vecExcavationTexCoord.xy).r < 0.5;\n }\n}\n#endif",c$13="\n\t#define CUBEUV_MAX_MIP 8.0\n\t#define CUBEUV_TEXEL_WIDTH 0.0013020833333333333\n\t#define CUBEUV_TEXEL_HEIGHT 0.0009765625\n #define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\n\t// These shader functions convert between the UV coordinates of a single face of\n\t// a cubemap, the 0-5 integer index of a cube face, and the direction vector for\n\t// sampling a textureCube (not generally normalized ).\n\n\tfloat getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\n\t// RH coordinate system; PMREM face-indexing convention\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t}\n\n\t// These defines must match with PMREMGenerator\n\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\n\tfloat roughnessToMip( float roughness ) {\n\n\t\tfloat mip = 0.0;\n\n\t\tif ( roughness >= cubeUV_r1 ) {\n\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\n\t\t} else {\n\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25\n\t\t}\n\n\t\treturn mip;\n\n\t}\n\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\n\t\tfloat mipF = fract( mip );\n\n\t\tfloat mipInt = floor( mip );\n\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\n\t\tif ( mipF == 0.0 ) {\n\n\t\t\treturn vec4( color0, 1.0 );\n\n\t\t} else {\n\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\n\t\t}\n\n\t}\n",a$X="\n#ifdef USE_CUBE_MAP_SHADOW\n uniform samplerCube shadowMap_textureCube;\n#else\n uniform sampler2D shadowMap_texture;\n #ifdef USE_PCSS\n uniform highp sampler2DShadow u_shadowDepth;\n #endif\n#endif\n\n#include \n\n\nvec4 cascadeWeights(float depthEye)\n{\n // One component is set to 1.0 and all others set to 0.0.\n vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\n vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}\n\n// Offset the shadow position in the direction of the normal for perpendicular and back faces\nvoid applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL)\n{\n#ifdef APPLY_NORMAL_OFFSET\n float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;\n float normalOffsetScale = 1.0 - nDotL;\n vec3 offset = normalOffset * normalOffsetScale * normalEC;\n positionEC.xyz += offset;\n#endif // APPLY_NORMAL_OFFSET\n}\n\nfloat getShadowVisibility(vec4 positionEC, vec3 normalEC, float depth){\n czm_shadowParameters shadowParameters;\n shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\n shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\n shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\n shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\n shadowParameters.uvRange = vec4(0.0, 1.0, 0.0, 1.0);\n\n float visibility = 1.0;\n\n #ifdef IS_TERRAIN\n // Scale depth bias based on view distance to reduce z-fighting in distant terrain\n shadowParameters.depthBias *= max(depth * 0.01, 1.0);\n #endif // IS_TERRAIN\n\n shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);\n \n #ifdef USE_CUBE_MAP_SHADOW // POINT_LIGHT\n vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz;\n float distance = length(directionEC);\n directionEC = normalize(directionEC);\n float radius = shadowMap_lightPositionEC.w;\n // Stop early if the fragment is beyond the point light radius\n if (distance > radius)\n {\n return visibility;\n }\n vec3 directionWC = czm_inverseViewRotation * directionEC;\n \n shadowParameters.depth = distance / radius;\n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n \n shadowParameters.texCoords = directionWC;\n visibility = shadowVisibility(shadowMap_textureCube, shadowParameters);\n #endif // USE_CUBE_MAP_SHADOW\n \n #ifdef SPOT_LIGHT_SHADOW\n vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);\n float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n applyNormalOffset(positionEC, normalEC, nDotL);\n vec4 shadowPosition = shadowMap_matrix * positionEC;\n // Spot light uses a perspective projection, so perform the perspective divide\n shadowPosition /= shadowPosition.w;\n \n // Stop early if the fragment is not in the shadow bounds\n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n {\n return visibility;\n }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n \n visibility = shadowVisibility(shadowMap_texture, shadowParameters);\n #endif // SPOT_LIGHT_SHADOW\n \n #ifdef HAS_CASCADES\n float maxDepth = shadowMap_cascadeSplits[1].w;\n // Stop early if the eye depth exceeds the last cascade\n if (depth > maxDepth)\n {\n return visibility;\n }\n \n // Get the cascade based on the eye-space depth\n vec4 weights = cascadeWeights(depth);\n \n // Apply normal offset\n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(positionEC, normalEC, nDotL);\n \n // Transform position into the cascade\n //vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;\n\n mat4 cascadeMatrix;\n mat4 nextCascadeMatrix;\n bool csmBlend = false;\n float diffRatio = 0.0;\n float shadowMapIndex = 0.0;\n if(weights.x > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[0];\n nextCascadeMatrix = shadowMap_cascadeMatrices[1];\n csmBlend = weights.y > 0.0;\n diffRatio = (depth - shadowMap_cascadeSplits[0].y) / (shadowMap_cascadeSplits[1].x - shadowMap_cascadeSplits[0].y);\n shadowMapIndex = 0.0;\n }\n else if(weights.y > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[1];\n nextCascadeMatrix = shadowMap_cascadeMatrices[2];\n csmBlend = weights.z > 0.0;\n diffRatio = (depth - shadowMap_cascadeSplits[0].z) / (shadowMap_cascadeSplits[1].y - shadowMap_cascadeSplits[0].z);\n shadowMapIndex = 1.0;\n }\n else if(weights.z > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[2];\n nextCascadeMatrix = shadowMap_cascadeMatrices[3];\n csmBlend = weights.w > 0.0;\n diffRatio = (depth - shadowMap_cascadeSplits[0].w) / (shadowMap_cascadeSplits[1].z - shadowMap_cascadeSplits[0].w);\n shadowMapIndex = 2.0;\n }\n else if(weights.w > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[3];\n shadowMapIndex = 3.0;\n }\n vec4 shadowPosition = cascadeMatrix * positionEC;\n \n // Get visibility\n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n shadowParameters.shadowMapIndex = shadowMapIndex;\n visibility = shadowVisibility(shadowMap_texture, shadowParameters);\n\n if(csmBlend){\n vec4 nextShadowPosition = nextCascadeMatrix * positionEC;\n shadowParameters.texCoords = nextShadowPosition.xy;\n shadowParameters.depth = nextShadowPosition.z;\n shadowParameters.shadowMapIndex = shadowMapIndex + 1.0;\n float nextVisibility = shadowVisibility(shadowMap_texture, shadowParameters);\n visibility = mix(visibility, nextVisibility, diffRatio);\n // Draw cascade blend colors for debugging\n //gl_FragColor *= vec4(diffRatio, 0.0, 0.0, 1.0);\n }\n \n // Fade out shadows that are far away\n float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;\n float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);\n visibility = mix(visibility, 1.0, fade);\n \n visibility = clamp(visibility, 0.0, 1.0);\n //// Draw cascade colors for debugging\n //gl_FragColor *= czm_cascadeColor(weights);\n #endif // HAS_CASCADES\n \n #ifdef NO_CASCADES\n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(positionEC, normalEC, nDotL);\n vec4 shadowPosition = shadowMap_matrix * positionEC;\n \n // Stop early if the fragment is not in the shadow bounds\n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n {\n return visibility;\n }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n visibility = shadowVisibility(shadowMap_texture, shadowParameters);\n #endif // NO_CASCADES\n\n return visibility;\n}\n",n$_="\n#ifdef USE_PCSS\nconst vec3 PoissonSamplers32[64] = vec3[64](\n vec3(0.06407013, 0.05409927, 0.),\n vec3(0.7366577, 0.5789394, 0.),\n vec3(-0.6270542, -0.5320278, 0.),\n vec3(-0.4096107, 0.8411095, 0.),\n vec3(0.6849564, -0.4990818, 0.),\n vec3(-0.874181, -0.04579735, 0.),\n vec3(0.9989998, 0.0009880066, 0.),\n vec3(-0.004920578, -0.9151649, 0.),\n vec3(0.1805763, 0.9747483, 0.),\n vec3(-0.2138451, 0.2635818, 0.),\n vec3(0.109845, 0.3884785, 0.),\n vec3(0.06876755, -0.3581074, 0.),\n vec3(0.374073, -0.7661266, 0.),\n vec3(0.3079132, -0.1216763, 0.),\n vec3(-0.3794335, -0.8271583, 0.),\n vec3(-0.203878, -0.07715034, 0.),\n vec3(0.5912697, 0.1469799, 0.),\n vec3(-0.88069, 0.3031784, 0.),\n vec3(0.5040108, 0.8283722, 0.),\n vec3(-0.5844124, 0.5494877, 0.),\n vec3(0.6017799, -0.1726654, 0.),\n vec3(-0.5554981, 0.1559997, 0.),\n vec3(-0.3016369, -0.3900928, 0.),\n vec3(-0.5550632, -0.1723762, 0.),\n vec3(0.925029, 0.2995041, 0.),\n vec3(-0.2473137, 0.5538505, 0.),\n vec3(0.9183037, -0.2862392, 0.),\n vec3(0.2469421, 0.6718712, 0.),\n vec3(0.3916397, -0.4328209, 0.),\n vec3(-0.03576927, -0.6220032, 0.),\n vec3(-0.04661255, 0.7995201, 0.),\n vec3(0.4402924, 0.3640312, 0.),\n\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.)\n);\n\nconst vec3 PoissonSamplers64[64] = vec3[64](\n vec3(-0.613392, 0.617481, 0.),\n vec3(0.170019, -0.040254, 0.),\n vec3(-0.299417, 0.791925, 0.),\n vec3(0.645680, 0.493210, 0.),\n vec3(-0.651784, 0.717887, 0.),\n vec3(0.421003, 0.027070, 0.),\n vec3(-0.817194, -0.271096, 0.),\n vec3(-0.705374, -0.668203, 0.),\n vec3(0.977050, -0.108615, 0.),\n vec3(0.063326, 0.142369, 0.),\n vec3(0.203528, 0.214331, 0.),\n vec3(-0.667531, 0.326090, 0.),\n vec3(-0.098422, -0.295755, 0.),\n vec3(-0.885922, 0.215369, 0.),\n vec3(0.566637, 0.605213, 0.),\n vec3(0.039766, -0.396100, 0.),\n vec3(0.751946, 0.453352, 0.),\n vec3(0.078707, -0.715323, 0.),\n vec3(-0.075838, -0.529344, 0.),\n vec3(0.724479, -0.580798, 0.),\n vec3(0.222999, -0.215125, 0.),\n vec3(-0.467574, -0.405438, 0.),\n vec3(-0.248268, -0.814753, 0.),\n vec3(0.354411, -0.887570, 0.),\n vec3(0.175817, 0.382366, 0.),\n vec3(0.487472, -0.063082, 0.),\n vec3(-0.084078, 0.898312, 0.),\n vec3(0.488876, -0.783441, 0.),\n vec3(0.470016, 0.217933, 0.),\n vec3(-0.696890, -0.549791, 0.),\n vec3(-0.149693, 0.605762, 0.),\n vec3(0.034211, 0.979980, 0.),\n vec3(0.503098, -0.308878, 0.),\n vec3(-0.016205, -0.872921, 0.),\n vec3(0.385784, -0.393902, 0.),\n vec3(-0.146886, -0.859249, 0.),\n vec3(0.643361, 0.164098, 0.),\n vec3(0.634388, -0.049471, 0.),\n vec3(-0.688894, 0.007843, 0.),\n vec3(0.464034, -0.188818, 0.),\n vec3(-0.440840, 0.137486, 0.),\n vec3(0.364483, 0.511704, 0.),\n vec3(0.034028, 0.325968, 0.),\n vec3(0.099094, -0.308023, 0.),\n vec3(0.693960, -0.366253, 0.),\n vec3(0.678884, -0.204688, 0.),\n vec3(0.001801, 0.780328, 0.),\n vec3(0.145177, -0.898984, 0.),\n vec3(0.062655, -0.611866, 0.),\n vec3(0.315226, -0.604297, 0.),\n vec3(-0.780145, 0.486251, 0.),\n vec3(-0.371868, 0.882138, 0.),\n vec3(0.200476, 0.494430, 0.),\n vec3(-0.494552, -0.711051, 0.),\n vec3(0.612476, 0.705252, 0.),\n vec3(-0.578845, -0.768792, 0.),\n vec3(-0.772454, -0.090976, 0.),\n vec3(0.504440, 0.372295, 0.),\n vec3(0.155736, 0.065157, 0.),\n vec3(0.391522, 0.849605, 0.),\n vec3(-0.620106, -0.328104, 0.),\n vec3(0.789239, -0.419965, 0.),\n vec3(-0.545396, 0.538133, 0.),\n vec3(-0.178564, -0.596057, 0.)\n);\n#endif // USE_PCSS\n\n\nfloat getRand(vec2 seed) {\n return fract(sin(dot(seed.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n#define inline\nfloat cubeSampleShadowMap(samplerCube shadowMap, vec3 d)\n{\n return czm_unpackDepth(textureCube(shadowMap, d));\n}\n\n#define inline\nfloat sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture2D(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\n\n#define inline\nfloat cubeShadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\n return step(depth, cubeSampleShadowMap(shadowMap, uv));\n}\n\n#define inline\nfloat shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, sampleShadowMap(shadowMap, uv));\n}\n\nfloat private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n float strength = step(0.0, nDotL);\n#endif\n visibility *= strength;\n#endif\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\n#define inline\nfloat shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec3 uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n float visibility = cubeShadowDepthCompare(shadowMap, uvw, depth);\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\n\n#ifdef USE_PCSS\n #define inline\n float computeShadowWithPCSS(czm_shadowParameters shadowParameters, sampler2D depthSampler, int searchTapCount, int pcfTapCount, vec3[64] poissonSamplers)\n {\n float depthMetric = shadowParameters.depth;\n\n if (depthMetric > 1.0 || depthMetric < 0.0) {\n return 1.0;\n }\n\n vec4 uvRange = shadowParameters.uvRange;\n float depthBias = shadowParameters.depthBias;\n #ifdef WEBGPU\n depthBias *= 2.0;\n #endif\n vec3 clipPos = vec3(shadowParameters.texCoords.xy, shadowParameters.depth - depthBias);\n vec3 uvDepth = clipPos;\n\n float shadowMapSize = 1.0 / shadowParameters.texelStepSize.x;\n float shadowMapSizeInverse = shadowParameters.texelStepSize.x;\n float contactHardeningLightSizeUVRatio = shadowMap_penumbraRatio;\n float shadowMapIndex = shadowParameters.shadowMapIndex;\n // hack : 让不同cascade的阴影看起来没有明显分隔\n float scale = pow(2.0, shadowMapIndex);\n contactHardeningLightSizeUVRatio /= scale;\n float lightSizeUV = shadowMapSize * contactHardeningLightSizeUVRatio;\n float darkness = shadowParameters.darkness;\n\n float blockerDepth = 0.0;\n float sumBlockerDepth = 0.0;\n float numBlocker = 0.0;\n\n for (int i = 0; i < searchTapCount; i ++) {\n blockerDepth = czm_unpackDepth(textureLod(depthSampler, uvDepth.xy + (lightSizeUV * shadowMapSizeInverse * PoissonSamplers32[i].xy), 0.0));\n if (blockerDepth < uvDepth.z) {\n sumBlockerDepth += blockerDepth;\n numBlocker++;\n }\n }\n\n if (numBlocker < 1.0) {\n return 1.0;\n }\n else\n {\n float avgBlockerDepth = sumBlockerDepth / numBlocker;\n\n // Offset preventing aliasing on contact.\n float AAOffset = shadowMapSizeInverse * 10.;\n // Do not dividing by z despite being physically incorrect looks better due to the limited kernel size.\n // float penumbraRatio = (depthMetric - avgBlockerDepth) / avgBlockerDepth;\n float penumbraRatio = ((depthMetric - avgBlockerDepth) + AAOffset);\n float filterRadius = penumbraRatio * lightSizeUV * shadowMapSizeInverse;\n\n float random = getRand(shadowParameters.texCoords.xy);\n float rotationAngle = random * 3.1415926;\n vec2 rotationVector = vec2(cos(rotationAngle), sin(rotationAngle));\n\n float shadow = 0.;\n for (int i = 0; i < pcfTapCount; i++) {\n vec3 offset = poissonSamplers[i];\n // Rotated offset.\n offset = vec3(offset.x * rotationVector.x - offset.y * rotationVector.y, offset.y * rotationVector.x + offset.x * rotationVector.y, 0.);\n vec3 realUV = uvDepth + offset * filterRadius;\n #ifdef WEBGPU\n realUV.z = (realUV.z - 0.5) * 2.0;\n #endif\n shadow += textureLod(u_shadowDepth, realUV, 0.0);\n }\n shadow /= float(pcfTapCount);\n\n // Blocker distance falloff\n shadow = mix(shadow, 1.0, depthMetric - avgBlockerDepth);\n\n // Apply darkness\n shadow = mix(darkness, 1.0, shadow);\n\n return shadow;\n }\n }\n\n #define inline\n float computeShadowWithPCSS16(czm_shadowParameters shadowParameters, sampler2D depthSampler)\n {\n return computeShadowWithPCSS(shadowParameters, depthSampler, 16, 16, PoissonSamplers32);\n }\n\n #define inline\n float computeShadowWithPCSS32(czm_shadowParameters shadowParameters, sampler2D depthSampler)\n {\n return computeShadowWithPCSS(shadowParameters, depthSampler, 16, 32, PoissonSamplers32);\n }\n\n #define inline\n float computeShadowWithPCSS64(czm_shadowParameters shadowParameters, sampler2D depthSampler)\n {\n return computeShadowWithPCSS(shadowParameters, depthSampler, 32, 64, PoissonSamplers64);\n }\n\n#else\n #define inline\n float computeShadowWithPoissonSampling(czm_shadowParameters shadowParameters, sampler2D shadowMap)\n {\n float shadowPixelDepth = shadowParameters.depth;\n float depthBias = shadowParameters.depthBias;\n shadowPixelDepth -= depthBias;\n float darkness = shadowParameters.darkness;\n vec2 uv = shadowParameters.texCoords;\n vec4 uvRange = shadowParameters.uvRange;\n vec2 texelStepSize = shadowParameters.texelStepSize;\n\n float visibility = 1.0;\n vec2 poissonDisk[4];\n poissonDisk[0] = vec2(-0.94201624, -0.39906216);\n poissonDisk[1] = vec2(0.94558609, -0.76890725);\n poissonDisk[2] = vec2(-0.094184101, -0.92938870);\n poissonDisk[3] = vec2(0.34495938, 0.29387760);\n\n // Poisson Sampling\n if (sampleShadowMap(shadowMap, uv + poissonDisk[0] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n if (sampleShadowMap(shadowMap, uv + poissonDisk[1] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n if (sampleShadowMap(shadowMap, uv + poissonDisk[2] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n if (sampleShadowMap(shadowMap, uv + poissonDisk[3] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n\n return visibility;\n }\n#endif // USE_PCSS\n\n#define inline\nfloat shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\n#ifdef USE_SOFT_SHADOWS\n #ifdef USE_PCSS\n #ifdef LOW_QUALITY_SHADOW\n float visibility = computeShadowWithPCSS16(shadowParameters, shadowMap);\n #elif defined(MEDIUM_QUALITY_SHADOW)\n float visibility = computeShadowWithPCSS32(shadowParameters, shadowMap);\n #else\n float visibility = computeShadowWithPCSS64(shadowParameters, shadowMap);\n #endif\n #else\n float visibility = computeShadowWithPoissonSampling(shadowParameters, shadowMap);\n #endif\n#else\n float depth = shadowParameters.depth;\n float depthBias = shadowParameters.depthBias;\n depth -= depthBias;\n vec2 uv = shadowParameters.texCoords;\n float visibility = shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n",D$Z="\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n\nuniform sampler2D u_waterMask;\nuniform vec4 u_waterMaskTranslationAndScale;\nuniform float u_zoomedOutOceanSpecularIntensity;\n\nfloat waveFade(float edge0, float edge1, float x)\n{\n float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n return pow(1.0 - y, 5.0);\n}\n\nfloat linearFade(float edge0, float edge1, float x)\n{\n return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n}\n\n// Based on water rendering by Jonas Wagner:\n\n// low altitude wave settings\nconst float oceanFrequencyLowAltitude = 825000.0;\nconst float oceanAnimationSpeedLowAltitude = 0.004;\nconst float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;\nconst float oceanSpecularIntensity = 0.5;\n\n// high altitude wave settings\nconst float oceanFrequencyHighAltitude = 125000.0;\nconst float oceanAnimationSpeedHighAltitude = 0.008;\nconst float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;\n\nvec4 getWaterNoise(vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (textureLod(u_oceanNormalMap, uv0, 0.0)) +\n (textureLod(u_oceanNormalMap, uv1, 0.0)) +\n (textureLod(u_oceanNormalMap, uv2, 0.0)) +\n (textureLod(u_oceanNormalMap, uv3, 0.0));\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)\n{\n vec3 positionToEyeEC = -positionEyeCoordinates;\n float positionToEyeECLength = length(positionToEyeEC);\n\n // The double normalize below works around a bug in Firefox on Android devices.\n vec3 normalizedpositionToEyeEC = normalize(normalize(positionToEyeEC));\n\n // Fade out the waves as the camera moves far from the surface.\n float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);\n\n#ifdef SHOW_OCEAN_WAVES\n // high altitude waves\n float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;\n vec4 noise = getWaterNoise(textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);\n vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);\n\n // low altitude waves\n time = czm_frameNumber * oceanAnimationSpeedLowAltitude;\n noise = getWaterNoise(textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);\n vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);\n\n // blend the 2 wave layers based on distance to surface\n float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);\n float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);\n vec3 normalTangentSpace =\n (highAltitudeFade * normalTangentSpaceHighAltitude) +\n (lowAltitudeFade * normalTangentSpaceLowAltitude);\n normalTangentSpace = normalize(normalTangentSpace);\n\n // fade out the normal perturbation as we move farther from the water surface\n normalTangentSpace.xy *= waveIntensity;\n normalTangentSpace = normalize(normalTangentSpace);\n#else\n vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);\n#endif\n\n vec3 normalEC = enuToEye * normalTangentSpace;\n\n const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);\n\n // Use diffuse light to highlight the waves\n float diffuseIntensity = czm_getLambertDiffuse(czm_sunDirectionEC, normalEC) * maskValue;\n vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);\n\n#ifdef SHOW_OCEAN_WAVES\n // Where diffuse light is low or non-existent, use wave highlights based solely on\n // the wave bumpiness and no particular light direction.\n float tsPerturbationRatio = normalTangentSpace.z;\n vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);\n#else\n vec3 nonDiffuseHighlight = vec3(0.0);\n#endif\n\n // Add specular highlights in 3D, and in all modes when zoomed in.\n float specularIntensity = czm_getSpecular(czm_sunDirectionEC, normalizedpositionToEyeEC, normalEC, 10.0) + 0.25 * czm_getSpecular(czm_moonDirectionEC, normalizedpositionToEyeEC, normalEC, 10.0);\n float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);\n float specular = specularIntensity * surfaceReflectance;\n\n#ifdef HDR\n specular *= 1.4;\n\n float e = 0.2;\n float d = 3.3;\n float c = 1.7;\n\n vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));\n#else\n vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;\n#endif\n\n return vec4(color, imageryColor.a);\n}\n\nvec4 getOceanColor(vec4 inColor, vec3 positionEC, vec3 positionMC, vec3 normalEC, vec3 normalMC, float fade)\n{\n vec4 color = inColor;\n vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;\n vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;\n vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;\n waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;\n\n float mask = texture2D(u_waterMask, waterMaskTextureCoordinates).r;\n\n if (mask > 0.0)\n {\n mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n\n vec2 ellipsoidTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC);\n vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC.zyx);\n\n vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));\n\n color = computeWaterColor(positionEC, textureCoordinates, enuToEye, color, mask, fade);\n }\n return color;\n}\n\n#endif\n",h$12="\n#ifdef HYPSOMETRIC_ANALYSIS\nuniform sampler2D uHypsometricTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\n\nfloat computeMixCon()\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n float t = floor(v_height2 / uHypContourInterval);\n distanceToContour = abs(v_height2 - t * uHypContourInterval - 0.1) ;\n }\n else\n {\n distanceToContour = abs(v_height2 - uHypMaxVisibleValue);\n }\n float dxc = abs(dFdx(v_height2));\n float dyc = abs(dFdy(v_height2));\n float dF = max(dxc, dyc);\n return (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor()\n{\n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n float contourRate = (v_height2 - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n vec2 contourCoord = vec2(0.0, finalCoord);\n return textureLod(uHypsometricTexture, contourCoord, 0.0).rgba;\n}\n\nvec4 getHypsometricAnalysisColor(vec4 inColor, vec2 textureCoordinates)\n{\n vec4 finalColor = inColor;\n float mixCon = computeMixCon();\n if(uHypHasColorTable > 0.1)\n {\n bool hasHyp = true;\n #ifdef HYPSOMETRIC_REGION\n if(uHypHasAnalysisRegion > 0.1){\n hasHyp = texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w > 0.5;\n }\n #endif\n if(hasHyp)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(v_height2 > uHypMaxVisibleValue + 4.0 || v_height2 < uHypMinVisibleValue - 4.0)\n {\n finalOpacity = 0.5;\n }\n else\n {\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = mixCon;\n contourMapColor = mix(computeContourMapColor(), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = mixCon;\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n #else\n if(uHypContourFillMode > 0.9)\n #endif\n {\n contourMapColor = computeContourMapColor();\n }\n else\n {\n finalOpacity = 0.0;\n }\n finalColor = mix(finalColor, contourMapColor, finalOpacity);\n }\n }\n }\n return finalColor;\n}\n\n#endif\n\n#ifdef SLOPE_ANALYSIS\nuniform sampler2D uSlopeColorTexture;\nuniform sampler2D uSlopeArrowsTexture;\nuniform float uSlopeHasColorTable;\nuniform float uSlopeFillMode;\nuniform float uSlopeOpacity;\nuniform float uSlopeFloor;\nuniform float uSlopeCeil;\nuniform float uSlopeMinVisibleValue;\nuniform float uSlopeMaxVisibleValue;\nuniform float uHasSlopeRegion;\nuniform vec4 uSlopeRect;\nconst float PI = 3.1415926535897932384626;\nvarying vec2 texCoordRotate;\n\n\nvec4 ComputeSlopeArrowColor(in float slopeAngle, in vec3 realNormal)\n{\n vec2 limitTexCoord = fract(texCoordRotate);\n vec2 slopeDirection = realNormal.xy;\n vec4 arrowsTexColor = vec4(0.0);\n float arrowAlpha = 0.0;\n float distance = length(slopeDirection);\n float acosSlopeDirection = acos(slopeDirection.x/distance);\n float slopeArrowsAngle = acosSlopeDirection;//坡向的旋转角\n if(slopeDirection.y<0.0)//第二、三象限\n {\n slopeArrowsAngle = 2.0 * PI - acosSlopeDirection;\n }\n //绕Z轴旋转的旋转矩阵\n vec2 n = vec2(cos(slopeArrowsAngle),-sin(slopeArrowsAngle));\n vec2 t = vec2(sin(slopeArrowsAngle),cos(slopeArrowsAngle));\n mat2 slopeRotateZMatrix = mat2(n,t);\n //1、把旋转点移到(0.5,0.5)\n vec2 transCoord = limitTexCoord - vec2(0.5,0.5);\n //2、以原点为中心点旋转纹理坐标\n transCoord = slopeRotateZMatrix * transCoord;\n //3、把旋转点(0.5,0.5)移到原点处\n transCoord += vec2(0.5,0.5);\n transCoord = smoothstep(0.0,1.0, transCoord);\n arrowsTexColor = textureLod(uSlopeArrowsTexture, transCoord, 0.0);\n if (slopeAngle <= PI/180.0) // 当地形的坡度值小于E-6度时,不显示表示方向的箭头。\n {\n return vec4(0.0);\n }\n arrowAlpha = arrowsTexColor.a;\n // 解决坡向边界有黑线的问题\n float xNum = floor(transCoord.x * 64.0);\n float yNum = floor(transCoord.y * 64.0);\n if ((xNum <= 2.0 || xNum >= 61.0|| yNum <= 2.0||yNum >= 61.0) && arrowAlpha < 1.0)\n {\n arrowAlpha = 0.0;\n }\n arrowsTexColor = vec4(arrowsTexColor.rgb, arrowAlpha);\n return arrowsTexColor;\n}\n\nvec4 getSlopeAnalysisColor(vec4 inColor, vec2 textureCoordinates, vec3 realNormal){\n vec4 finalColor = inColor;\n bool hasSlopeRegion = true;\n #ifdef SlopeRegion\n if(uHasSlopeRegion > 0.1){\n hasSlopeRegion = texture2D(uModifyRasterTexture, textureCoordinates.xy).w > 0.5;\n }\n #endif\n if(hasSlopeRegion)\n {\n float finalOpacity = uSlopeOpacity;\n float slopeRate = abs(normalize(realNormal).z);\n float slopeAngle = acos(slopeRate);\n if (slopeAngle < uSlopeMinVisibleValue || slopeAngle > uSlopeMaxVisibleValue)\n {\n finalOpacity = 0.0;\n }\n float threshold = clamp(abs(uSlopeCeil-uSlopeFloor),0.0000001,PI/2.0);\n float rate = (slopeAngle-uSlopeFloor)/threshold;\n float finalRate = clamp(rate,0.0,1.0);\n float count = floor(finalRate * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalRate*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 slopeCoord = vec2(x, y);\n vec4 slopeFillColor = textureLod(uSlopeColorTexture, slopeCoord, 0.0);\n vec4 slopeMapColor = vec4(0.0);\n if(uSlopeFillMode > 2.9)//填充和坡向\n {\n vec4 arrowsTexColor = ComputeSlopeArrowColor(slopeAngle, realNormal);\n slopeMapColor = mix(slopeFillColor, arrowsTexColor, arrowsTexColor.a);\n }\n else if(uSlopeFillMode > 1.9)//坡向\n {\n vec4 arrowsTexColor = ComputeSlopeArrowColor(slopeAngle, realNormal);\n slopeMapColor = arrowsTexColor;\n finalOpacity *= arrowsTexColor.a;\n }\n else if(uSlopeFillMode > 0.9)//填充\n {\n slopeMapColor = slopeFillColor;\n }\n else\n {\n finalOpacity = 0.0;\n }\n finalColor = mix(finalColor, slopeMapColor, finalOpacity);\n }\n \n return finalColor;\n}\n\n#endif\n\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodTexture;\nuniform vec4 uFloodRect;\nvarying vec3 vProjectionCoord;\n\nvec4 getFloodAnalysisColor(vec4 inColor, vec2 textureCoordinates){\n vec4 finalColor = inColor;\n float bIsFloodColor = 1.0;\n vec2 polyTexCoord = textureCoordinates.xy;\n polyTexCoord.x = polyTexCoord.x * (uTileBounds.z - uTileBounds.x) + uTileBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uTileBounds.w - uTileBounds.y) + uTileBounds.y;\n vec4 floodColor = vec4(0.0);\n if(polyTexCoord.x>uFloodRect.x && polyTexCoord.x uFloodRect.y&& polyTexCoord.y < uFloodRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uFloodRect.x, uFloodRect.w);\n polyTexCoord.x = polyTexCoord.x / (uFloodRect.z - uFloodRect.x);\n polyTexCoord.y = 1.0-polyTexCoord.y / (uFloodRect.y - uFloodRect.w);\n }\n floodColor = texture2D(uFloodTexture, polyTexCoord);\n if(floodColor.r > 0.5)\n {\n finalColor = vec4(40.0/255.0,150.0/255.0,200.0/255.0,u_GlobeAlpha);\n }\n return finalColor;\n}\n#endif\n\n\n",g$15="\n#ifdef NORMAL\nvec4 renderNormal(vec3 posMC)\n{\n vec3 normalMC = normalize(czm_computeNormal(posMC));\n normalMC = normalMC * 0.5 + vec3(0.5);\n #include \n return vec4(normalMC, 1.0);\n}\n#endif\n",s$V="\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn ;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\n",u$T="\nUBO_DECL_BEGIN(Mesh)\n UBO_PARAM mat4 uModelMatrix;\n UBO_PARAM mat4 uGeoMatrix;\n UBO_PARAM vec4 batchTextureStep;\n UBO_PARAM vec2 batchTextureDimensions;\n UBO_PARAM vec2 decode_texCoord0_min;\n UBO_PARAM vec2 decode_texCoord1_min;\n UBO_PARAM vec3 decode_texCoord0_vNormConstant;\n UBO_PARAM vec3 decode_texCoord1_vNormConstant;\n UBO_PARAM vec4 decode_position_min;\n UBO_PARAM float decode_position_normConstant;\n UBO_PARAM float normal_rangeConstant;\n UBO_PARAM mat4 uInverseGeoMatrix;\n UBO_PARAM mat4 uSkeletonMatrix;\n UBO_PARAM float uSkeletonCount;\n UBO_PARAM vec2 uImgTextureBound;\n UBO_PARAM float uImgTextureAlpha;\n UBO_PARAM float fMultiTemporalFactor;\n UBO_PARAM vec3 uSouthWest;\n UBO_PARAM vec3 uNorthDir;\n UBO_PARAM vec3 uEastDir;\n UBO_PARAM vec2 textureRepeat;\nUBO_DECL_END\n",d$1h="\nUBO_DECL_BEGIN(Layer)\n UBO_PARAM vec4 uSelColor;\n UBO_PARAM vec4 uTranslationAndBottom;\n UBO_PARAM vec4 uFillForeColor;\n UBO_PARAM vec4 uPolygonOffset;\n UBO_PARAM float uPointSize;\n UBO_PARAM vec2 uMinMaxTransparent;\n UBO_PARAM float uTransparentFilter;\n UBO_PARAM vec4 uHypLineColor;\n UBO_PARAM vec4 uNoValueColor;\n UBO_PARAM vec4 uHypRect;\n UBO_PARAM float uHypHasAnalysisRegion;\n UBO_PARAM float uMixColorType;\n UBO_PARAM float uHypOpacity;\n UBO_PARAM float uHypContourInterval;\n UBO_PARAM float uHypContourFillMode;\n UBO_PARAM float uHypFloor;\n UBO_PARAM float uHypCeil;\n UBO_PARAM float uDataFloor;\n UBO_PARAM float uDataCeil;\n UBO_PARAM float uHypMaxVisibleValue;\n UBO_PARAM float uHypMinVisibleValue;\n UBO_PARAM float uHypsometricVisible;\n UBO_PARAM vec4 uRect;\n UBO_PARAM float uCameraHeight;\n UBO_PARAM vec4 uExcavationRect;\n UBO_PARAM vec4 uServerExcavationRect;\n UBO_PARAM float uExcavationMode;\n UBO_PARAM float uServerExcavationMode;\n UBO_PARAM vec4 uSwipeRegion;\n UBO_PARAM float uBrightness;\n UBO_PARAM float uContrast;\n UBO_PARAM float uHue;\n UBO_PARAM float uSaturation;\n UBO_PARAM float uOneOverGamma;\n UBO_PARAM vec4 uClipPlanes[6];\n UBO_PARAM vec4 uClipLineColor;\n UBO_PARAM float uClipMode;\n UBO_PARAM float uMaxCategory;\n UBO_PARAM float uMinCategory;\n UBO_PARAM float uCategoryWidht;\n UBO_PARAM float uCategoryHeight;\n UBO_PARAM vec4 uLineColor;\n UBO_PARAM float uLineWidth;\n UBO_PARAM float uFillStyle;\n UBO_PARAM vec4 uTransparentBackColor;\n UBO_PARAM float uTransparentBackColorTolerance;\n UBO_PARAM float uVisibleDistanceMax;\n UBO_PARAM vec4 uHorizontalColor;\n UBO_PARAM float uHorizontalLine;\n UBO_PARAM float uDistanceFalloffFactor;\n UBO_PARAM vec2 uStrokesTextureScale;\n UBO_PARAM float uStrokesLog2Resolution;\n UBO_PARAM vec4 uMinMaxTerrainHeightAndPickInfo;\n UBO_PARAM vec4 uOverlayRect;\n UBO_PARAM vec4 uEmissionTexAtlasTilingAndOffset[10];\n UBO_PARAM vec4 uEmissionTexAtlasRects[10];\n UBO_PARAM vec4 uEmissionColor;\n UBO_PARAM vec4 uLayerBounds;\n UBO_PARAM float uLayerCornerLength;\n UBO_PARAM float uMaxCategoryOrHypCeil;\n UBO_PARAM float uMinCategoryOrHypFloor;\n UBO_PARAM float uEmissionTexAtlasCount;\n UBO_PARAM float uSnowCoverageFactor;\n UBO_PARAM float uAnimationSpeed;\n UBO_PARAM float uRippleScale;\n UBO_PARAM float uWindIntensity;\n UBO_PARAM float uRain;\n UBO_PARAM float uCameraDepth;\n UBO_PARAM float uWetnessFactor;\n UBO_PARAM float uSelectColorType;\nUBO_DECL_END\n",b$1d="\nUBO_DECL_BEGIN(Material)\n UBO_PARAM mat4 uTexMatrix;\n UBO_PARAM vec4 uDiffuseColor;\n UBO_PARAM vec4 uAmbientColor;\n UBO_PARAM vec4 uSpecularColor;\n UBO_PARAM vec4 uTexUVOffset;\n UBO_PARAM vec4 uTextureDim;\n UBO_PARAM vec2 uTextureWidths;\n UBO_PARAM vec4 batchTextureStep_baseTex;\n UBO_PARAM vec2 batchTextureDimensions_baseTex;\n UBO_PARAM vec4 batchTextureStep_bakeTex;\n UBO_PARAM vec2 batchTextureDimensions_bakeTex;\n \n UBO_PARAM vec4 uBaseColorFactor;\n UBO_PARAM vec4 uEmissiveFactor;\n UBO_PARAM vec4 uEmissiveUVOffsetAndTiling;\n UBO_PARAM vec3 uMetallicRoughnessIntensityScale;\n UBO_PARAM vec2 uPBRTexWH;\n UBO_PARAM float uNormalTextureScale;\n UBO_PARAM float uAlphaMode;\n UBO_PARAM float uAlphaCutoff;\n UBO_PARAM float uPbrParTextureWidth;\n \n // uIndexOfRefraction;\n // uTransmissionFactor;\n // uThickness;\n // uSnowCoverageFactor;\n // uIntensityScale;\n // uAnimationSpeed;\n // uWetnessFactor;\n // uRippleScale;\n // uWindIntensity;\n // uRain;\n // uCameraDepth;\n // uTintColor;\n // uDiffusionDistance;\n // uClearcoatFactor;\n // uClearcoatRoughnessFactor;\n // uAnisotropy; \nUBO_DECL_END\n",x$16="\nUBO_DECL_BEGIN(Scene)\n UBO_PARAM mat4 uView;\n UBO_PARAM mat4 uProjection;\n UBO_PARAM mat4 uViewProjection;\n UBO_PARAM mat4 uInverseView;\n UBO_PARAM mat4 uInverseProjection;\n UBO_PARAM mat4 uInverseViewProjection;\n UBO_PARAM mat4 uViewportTransformation;\n UBO_PARAM mat3 uViewRotation;\n UBO_PARAM mat3 uInverseViewRotation;\n UBO_PARAM mat3 uTemeToPseudoFixed;\n UBO_PARAM vec4 uViewport;\n UBO_PARAM vec4 uFrustumPlanes;\n UBO_PARAM vec3 uRelativeOrigin;\n UBO_PARAM vec2 uCurrentFrustum;\n UBO_PARAM float uFarDepthFromNearPlusOne;\n UBO_PARAM float uLog2FarDepthFromNearPlusOne;\n UBO_PARAM float uOneOverLog2FarDepthFromNearPlusOne;\n UBO_PARAM float uFrameNumber;\n UBO_PARAM float uPixelRatio;\n UBO_PARAM float uResolutionScale;\n UBO_PARAM float uGamma;\n UBO_PARAM float uToneMappingExposure;\n UBO_PARAM float uEnvMapIntensity;\n UBO_PARAM vec2 uSpecularEnvironmentMapSize;\n UBO_PARAM float uSpecularEnvironmentMapsMaximumLOD;\n UBO_PARAM vec3 uSphericalHarmonicCoefficients[9];\nUBO_DECL_END\n",L$16="\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = gl_FragCoord.z;\n#endif\n\n#ifdef WEBGL2\n gl_FragDepthEXT = gl_FragCoord.z;\n#endif\n",S$T="\n#ifdef NORMAL_AND_DEPTH\nvarying vec4 oriVertex;\nvarying vec3 perVertexNormals;\nvarying float depthInCamera;\nvec4 renderNormalAndDepth(vec3 posMC)\n{\n vec3 normal = normalize(perVertexNormals);\n float dLength = length(perVertexNormals);\n if(dLength <= 0.9)\n {\n normal = vec3(mat3(czm_modelView)*czm_computeNormal(posMC.xyz));\n }\n normal = (normal + 1.0) * 0.5;\n #include \n return vec4(normal, 1.0);\n}\n#endif\n",U$12="\n#ifdef PREPASS\nvoid renderPrePass(float roughness)\n{\n vec3 normalEC = normalize(mat3(czm_view * uModelMatrix) * czm_computeNormal(vPositionMC.xyz));\n // 相机坐标系坐标\n gl_FragData[0] = vec4(v_positionEC, 1.0);\n // 相机坐标系法线\n gl_FragData[1] = vec4(normalEC, 1.0);\n // 反射率\n float reflectivity = 1.0 - roughness;\n gl_FragData[2] = vec4(reflectivity, reflectivity, reflectivity, 1.0);\n}\n#endif\n",V$W="\nvoid calculateMipLevel(in vec2 inTexCoord, in vec2 vecTile, in float fMaxMip, inout float mipLevel)\n{\n\tvec2 dx = dFdx(inTexCoord * vecTile.x);\n\tvec2 dy = dFdy(inTexCoord * vecTile.y);\n\tfloat dotX = dot(dx, dx);\n\tfloat dotY = dot(dy, dy);\n\tfloat dMax = max(dotX, dotY);\n\tfloat dMin = min(dotX, dotY);\n\tfloat offset = (dMax - dMin) / (dMax + dMin);\n\toffset = clamp(offset, 0.0, 1.0);\n\tfloat d = dMax * (1.0 - offset) + dMin * offset;\n\tmipLevel = 0.5 * log2(d);\n\tmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\n",y$W="\n#ifdef Has_Texture\n uniform sampler2D uTexture;\n#ifdef MULTI_TEX\n uniform sampler2D uSecTexture;\n#endif\n#ifndef NO_TEXCOORD\n struct TextureParam {\n vec2 uv;\n vec2 dim;\n vec2 translate;\n vec2 scale;\n vec4 uvOffset;\n float maxMipmapLevel;\n float texCoordZ;\n float isRGBA;\n };\n \n vec4 sampleLod(vec2 uv, float mipLevel, bool bUseFirstTexture) {\n vec4 color = vec4(1.0);\n \n if(bUseFirstTexture)\n {\n #ifdef GL_EXT_shader_texture_lod\n color = texture2DLodEXT(uTexture, uv, mipLevel);\n #else\n #ifdef WEBGL2\n color = textureLod(uTexture, uv, mipLevel);\n #else\n color = texture2D(uTexture, uv, mipLevel);\n #endif\n #endif\n }\n else\n {\n #ifdef MULTI_TEX\n #ifdef GL_EXT_shader_texture_lod\n color = texture2DLodEXT(uSecTexture, uv, mipLevel);\n #else\n #ifdef WEBGL2\n color = textureLod(uSecTexture, uv, mipLevel);\n #else\n color = texture2D(uSecTexture, uv, mipLevel);\n #endif\n #endif\n #endif\n }\n \n return SRGBtoLINEAR4(color);\n }\n \n#ifdef TextureBatch\n\n vec4 getBatchTextureColor(TextureParam textureParam, bool bUseFirstTexture)\n {\n vec2 uv = textureParam.uv;\n vec2 dim = textureParam.dim;\n vec2 translate = textureParam.translate;\n vec2 scale = textureParam.scale;\n vec4 uvOffset = textureParam.uvOffset;\n float maxMipmapLevel = textureParam.maxMipmapLevel;\n if(maxMipmapLevel < 0.0)\n {\n return vec4(1.0);\n }\n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, dim, maxMipmapLevel, mipLevel);\n #endif\n vec2 texCoord = getBatchUV(uv, translate, scale, dim, ceil(mipLevel));\n vec4 colorCeil = sampleLod(texCoord, 0.0, bUseFirstTexture);\n texCoord = getBatchUV(uv, translate, scale, dim, floor(mipLevel));\n vec4 colorFloor = sampleLod(texCoord, 0.0, bUseFirstTexture);\n return colorCeil * 0.5 + colorFloor * 0.5;\n }\n\n#else\n\n vec4 getTextureColor(TextureParam textureParam, vec2 outTexCoord, bool bUseFirstTexture)\n {\n vec2 uv = textureParam.uv;\n vec2 dim = textureParam.dim;\n vec2 translate = textureParam.translate;\n vec2 scale = textureParam.scale;\n vec4 uvOffset = textureParam.uvOffset;\n float maxMipmapLevel = textureParam.maxMipmapLevel;\n float texCoordZ = textureParam.texCoordZ;\n \n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, dim, maxMipmapLevel, mipLevel);\n #endif\n outTexCoord = getUV(uv, translate, uvOffset, scale.x, dim.x, mipLevel, texCoordZ);\n vec4 color = sampleLod(outTexCoord, mipLevel, bUseFirstTexture);\n #ifdef RGBTOBGR\n color = color.bgra;\n #endif\n return color;\n }\n\n#endif\n#endif\n\n vec4 getTextureColorForS3M(out vec4 outTexCoord)\n {\n #ifdef INVALID_OBLIQUE\n return vec4(0.5,0.5,0.5,1.0);\n #endif\n #ifdef NO_TEXCOORD\n return SRGBtoLINEAR4(texture2D(uTexture, vec2(0.5)));\n #endif\n #ifndef NO_TEXCOORD\n TextureParam textureParam;\n textureParam.uv = vTexCoord.xy;\n vec4 firstColor, secColor;\n #ifdef TextureBatch\n textureParam.dim = vTexSize.xy;\n textureParam.translate = vTexTran.xy;\n textureParam.scale = vTexScale.xy;\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.x;\n firstColor = getBatchTextureColor(textureParam, true);\n #else\n if(vTexMatrix.z < 0.0){\n return vec4(1.0);\n }\n float texWidth = vTexMatrix.z * uTextureWidths.x;\n textureParam.dim = vec2(texWidth, texWidth);\n textureParam.translate = vTexMatrix.xy;\n textureParam.scale = vec2(vTexMatrix.z, vTexMatrix.z);\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vTexMatrix.w;\n textureParam.isRGBA = vIsRGBA.x;\n textureParam.texCoordZ = vTexCoordZ.x;\n firstColor = getTextureColor(textureParam, outTexCoord.xy, true);\n #endif\n \n #ifdef MULTI_TEX\n textureParam.uv = vTexCoord.zw;\n #ifdef TextureBatch\n textureParam.dim = vTexSize.zw;\n textureParam.translate = vTexTran.zw;\n textureParam.scale = vTexScale.zw;\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.y;\n secColor = getBatchTextureColor(textureParam, false);\n #else\n texWidth = vTexMatrix2.z * uTextureWidths.y;\n textureParam.dim = vec2(texWidth, texWidth);\n textureParam.translate = vTexMatrix2.xy;\n textureParam.scale = vec2(vTexMatrix2.z, vTexMatrix2.z);\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vTexMatrix2.w;\n textureParam.isRGBA = vIsRGBA.y;\n textureParam.texCoordZ = vTexCoordZ.y;\n secColor = getTextureColor(textureParam, outTexCoord.zw, false);\n #endif\n return firstColor * secColor;\n #endif\n \n return firstColor;\n #endif\n }\n#endif\n",M$16="\n#include \n#include \n#include \n#include \n#ifdef FINAL_RESOLUTION_CLIP\nvarying vec3 vertexClip;\nuniform vec3 uMaxClip;\nuniform vec3 uMinClip;\n#endif\nvoid preClip()\n{\n if(vColor.a == 0.0)\n {\n discard;\n }\n#ifdef FINAL_RESOLUTION_CLIP\n\tif(vertexClip.x > uMaxClip.x || vertexClip.y > uMaxClip.y || vertexClip.z > uMaxClip.z \n\t|| vertexClip.x < uMinClip.x || vertexClip.y < uMinClip.y || vertexClip.z < uMinClip.z) \n { \n discard; \n } \n#endif\n#ifdef SQCLIP\n czm_spatialQueryClip();\n#endif\n#ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(executeExcavation())\n {\n discard;\n }\n#endif\n#ifdef SERVEREXCAVATION\n if(executeServerExcavation())\n {\n discard;\n }\n#endif\n}\n",v$R="\n#ifdef VISIBLEDISTANCEMAX\nvoid getAlphaByDistance(vec3 positionEC, inout vec4 color) {\n if(length(positionEC) > uVisibleDistanceMax)\n {\n float minAlpha = min(1.0, (length(positionEC) - uVisibleDistanceMax) / 2000.0);\n color.a = 1.0 - minAlpha;\n }\n}\n#endif\n\n#ifdef OVERLAY\nuniform sampler2D uOverlayTexture;\nvoid getOverlayColor(inout vec4 color)\n{\n float ptInRect = 1.0;\n vec4 vertexPos = uGeoMatrix * vec4(vPositionMC.xyz, 1.0);\n vec2 uv = calculatePolyTexCoord(vertexPos, uOverlayRect, ptInRect);\n if(ptInRect > 0.5)\n {\n vec4 overlayColor = texture2D(uOverlayTexture, uv.xy);\n if(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n {\n vec4 mixColor = mix(color, overlayColor, overlayColor.a);\n color = vec4(mixColor.r, mixColor.g, mixColor.b, color.a);\n }\n }\n}\n#endif\n\n#ifdef HORIZONTAL_LINE\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}\n#endif\n\n#ifdef IMAGERY\nvarying vec2 imgCoord;\nuniform sampler2D uImgTexture;\n\n//#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform vec4 u_dayTextureSize[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\nuniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n//#endif\n\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\n\nvoid getImageryColor(inout vec4 color)\n{\n\tvec2 texcood = vec2(imgCoord.x / uImgTextureBound.x, imgCoord.y / uImgTextureBound.y);\n#ifdef MULTIBATCH\n\tcolor = computeDayColor(vec4(1.0,1.0,1.0,0.0), clamp(vec3(texcood,0.0), 0.0, 1.0));\n#else\n\tcolor = computeDayColor(color, clamp(vec3(texcood,0.0), 0.0, 1.0));\n#endif\n}\n#endif\n\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nvoid getFloodWaterColor(inout vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n}\n#endif\n\n#ifdef TRANSPARENT_BACK_COLOR\nvoid transparentColorClip(vec4 color)\n{\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - color.r);\n float gDiff = abs(uTransparentBackColor.g - color.g);\n float bDiff = abs(uTransparentBackColor.b - color.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n}\n#endif\n",C$16="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n#endif\n#ifdef TexCoord2\n attribute vec4 aTexCoord1;\n#endif\n\n#ifdef VertexColor\n attribute vec4 aColor;\n#endif\n\n#ifdef USE_VertexWeight\n attribute float aVertexWeight;\n #ifdef MultiTemporalWeight\n attribute float aVertexWeight_1;\n #endif\n#endif\n\n#ifdef Volume\n attribute vec3 aRatio;\n#endif\n\n#ifdef InstanceRenderBIM\n attribute vec4 uv2;\n attribute vec4 uv3;\n attribute vec4 uv4;\n attribute vec4 secondary_colour;\n attribute vec4 uv6;\n#endif\n\n#ifdef InstanceRenderPipeline\n attribute vec4 uv1;\n attribute vec4 uv2;\n attribute vec4 uv3;\n attribute vec4 uv4;\n attribute vec4 uv5;\n attribute vec4 uv6;\n attribute vec4 uv7;\n attribute vec4 secondary_colour;\n attribute vec4 uv9;\n#endif\n\n#ifdef BatchTable\n#ifdef Instance\n #ifdef InstanceModel\n attribute float batchId;\n #endif\n attribute float instanceId;\n#else\n attribute float batchId;\n#endif\n#endif\n\nstruct VertexFactoryIntermediates{\n vec4 position;\n vec4 vertexColor;\n vec4 secondColor;\n vec3 normal;\n vec3 normalInstance;\n vec4 uv0;\n vec4 uv1;\n float batchTableID;\n vec2 pbrTextureUV;\n};\n\nvec4 GetLocalPosition(){\n vec4 vertexPos = aPosition;\n#ifdef COMPRESS_VERTEX\n vertexPos = decode_position_min + vec4(aPosition.xyz, 1.0) * decode_position_normConstant;\n#endif\n return vertexPos;\n}\nvec4 GetUV0(){\n vec4 result = vec4(0.0);\n#ifdef TexCoord\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n vec2 texCoord0;\n texCoord0.x = aTexCoord0.x * decode_texCoord0_vNormConstant.x;\n texCoord0.y = aTexCoord0.y * decode_texCoord0_vNormConstant.y;\n result.xy = decode_texCoord0_min + texCoord0.xy;\n #else\n result.xy = decode_texCoord0_min.xy + aTexCoord0.xy * decode_texCoord0_normConstant;\n #endif // MeshOPT_Compress\n #else\n result = aTexCoord0;\n #endif // COMPRESS_TEXCOORD\n \n #ifdef InstanceRenderPipeline\n vec4 tex4Vec;\n if(aTexCoord0.y > 0.5) {\n tex4Vec = vec4(uv7.y, aTexCoord0.x, 0.0, 1.0);\n }\n else {\n tex4Vec = vec4(uv7.x, aTexCoord0.x, 0.0, 1.0);\n }\n \n result.xy = tex4Vec.xy;\n #endif\n#endif // TexCoord\n\n return uTexMatrix * result;\n}\nvec4 GetUV1(){\n vec4 result = vec4(0.0);\n#ifdef TexCoord2\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n vec2 texCoord1;\n texCoord1.x = aTexCoord1.x * decode_texCoord1_vNormConstant.x;\n texCoord1.y = aTexCoord1.y * decode_texCoord1_vNormConstant.y;\n result.xy = decode_texCoord1_min + texCoord1.xy;\n #else\n result.xy = decode_texCoord1_min.xy + aTexCoord1.xy * decode_texCoord1_normConstant;\n #endif // MeshOPT_Compress\n #else\n result = aTexCoord1;\n #endif // COMPRESS_TEXCOORD\n#endif // TexCoord2\n return result;\n}\nvec3 GetNormal(){\n#ifdef HAS_NORMAL\n vec3 realNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n #ifdef MeshOPT_Compress\n realNormal.x = aNormal.x / 127.0;\n realNormal.y = aNormal.y / 127.0;\n realNormal.z = 1.0 - abs(realNormal.x) - abs(realNormal.y);\n realNormal = normalize(realNormal);\n #else\n realNormal = czm_octDecode(aNormal.xy, normal_rangeConstant).zxy;\n #endif // MeshOPT_Compress\n #endif // COMPRESS_NORMAL \n \n #ifdef InstanceRenderPipeline\n #ifdef TexCoord\n realNormal.x = realNormal.x * uv7.z;\n #endif \n #endif\n return realNormal;\n#else\n return vec3(0.0, 0.0, 0.0);\n#endif // HAS_NORMAL \n}\nVertexFactoryIntermediates getVertexFactoryIntermediates(){\n VertexFactoryIntermediates intermediates;\n vec4 vertexPos = GetLocalPosition();\n \n#ifdef UseInstanceSkeletonMatrix\n vertexPos = uSkeletonMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n\n#ifdef InstanceRenderBIM\n mat4 worldMatrix;\n worldMatrix[0] = uv2;\n worldMatrix[1] = uv3;\n worldMatrix[2] = uv4;\n worldMatrix[3] = vec4( 0, 0, 0, 1 );\n vertexPos = vec4(vertexPos.xyz, 1.0) * worldMatrix;\n#endif\n\n#ifdef InstanceRenderPipeline\n mat4 worldMatrix;\n mat4 worldMatrix0;\n mat4 worldMatrix1;\n vec4 worldPos0;\n vec4 worldPos1;\n worldMatrix0[0] = uv1;\n worldMatrix0[1] = uv2;\n worldMatrix0[2] = uv3;\n worldMatrix0[3] = vec4( 0, 0, 0, 1 );\n worldMatrix1[0] = uv4;\n worldMatrix1[1] = uv5;\n worldMatrix1[2] = uv6;\n worldMatrix1[3] = vec4( 0, 0, 0, 1 );\n vec4 realVertex = vec4(vertexPos.xyz, 1.0);\n realVertex.x = realVertex.x * uv7.z;\n worldPos0 = realVertex * worldMatrix0;\n worldPos1 = realVertex * worldMatrix1;\n #ifdef TexCoord\n if(aTexCoord0.y > 0.5) {\n vertexPos = worldPos1;\n worldMatrix = worldMatrix1;\n }\n else {\n vertexPos = worldPos0;\n worldMatrix = worldMatrix0;\n }\n #endif\n#endif\n\n\n\n intermediates.position = vertexPos;\n intermediates.normal = GetNormal();\n#ifdef Instance\n intermediates.normalInstance = intermediates.normal * mat3(worldMatrix);\n#endif\n intermediates.uv0 = GetUV0();\n intermediates.uv1 = GetUV1();\n intermediates.vertexColor = vec4(1.0);\n#ifdef VertexColor\n intermediates.vertexColor = aColor;\n#endif\n\n#ifdef Instance\n intermediates.vertexColor *= secondary_colour;\n#endif\n\n#ifdef BatchTable\n #ifdef Instance\n float index = instanceId;\n #else\n float index = batchId;\n #endif\n \n #ifdef InstanceModel\n index = instanceId * uSkeletonCount + batchId;\n #endif\n intermediates.batchTableID = index;\n#endif\n\n#ifdef USE_BatchPBR\n intermediates.pbrTextureUV = aTexCoord1.xy;\n#endif\n\n return intermediates;\n}\n",E$18="\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef USE_TextureCoordMatrix\n attribute vec2 aTextureCoordMatrix;\n#endif\n\n#ifdef TextureBatch\n#ifdef MULTI_TEX\n attribute vec2 aTextureBatchId;\n float getTextureBatchId0(vec2 att)\n {\n return att.x;\n }\n float getTextureBatchId1(vec2 att) \n {\n return att.y;\n }\n#else\n attribute float aTextureBatchId;\n float getTextureBatchId0(float att)\n {\n return att;\n }\n#endif\n// MULTI_TEX \n varying vec4 vTexTran;\n varying vec4 vTexScale;\n varying vec4 vTexSize;\n varying vec2 vMaxMipLevel;\n void getTextureParameter(in vec4 xywh, in vec2 textureDim, inout vec2 translate, inout vec2 scale, inout vec2 texSize, inout float maxMipLevel)\n {\n float width = xywh.z;\n float height = xywh.w;\n width *= 2.0 / 3.0;\n maxMipLevel = log2(min(width, height));\n scale.x = width / textureDim.x;\n scale.y = height / textureDim.y;\n translate.x = xywh.x;\n translate.y = xywh.y;\n translate /= textureDim;\n texSize.x = width;\n texSize.y = height;\n }\n \n void getUVMatrixForBatch(vec4 xywh, vec4 xywh2) {\n if(getTextureBatchId0(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.x = -1.0;\n }\n else\n {\n getTextureParameter(xywh, uTextureDim.xy, vTexTran.xy, vTexScale.xy, vTexSize.xy, vMaxMipLevel.x);\n }\n #ifdef MULTI_TEX\n if(getTextureBatchId1(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.y = -1.0;\n }\n else\n {\n getTextureParameter(xywh2, uTextureDim.zw, vTexTran.zw, vTexScale.zw, vTexSize.zw, vMaxMipLevel.y);\n }\n #endif // MULTI_TEX \n }\n#else\n #ifdef TexCoord\n varying vec2 vTexCoordZ;\n #endif\n \n varying vec4 vTexMatrix;\n varying vec2 vIsRGBA;\t\n #ifdef TexCoord2\n varying vec4 vTexMatrix2;\n #endif // TexCoord2\n \n const float SHIFT_LEFT8 = 256.0;\n const float SHIFT_RIGHT8 = 1.0 / 256.0;\n const float SHIFT_RIGHT4 = 1.0 / 16.0;\n const float SHIFT_LEFT4 = 16.0;\n \n void computeUVMatrixFromZValue(in float nZ, inout float XTran, inout float YTran, inout float scale, inout float isRGBA)\n {\n if(nZ <= 0.0)\n {\n return;\n }\n float nDel8 = floor(nZ * SHIFT_RIGHT8);\n float nDel16 = floor(nDel8 * SHIFT_RIGHT8);\n float nDel20 = floor(nDel16 * SHIFT_RIGHT4);\n isRGBA = floor(nDel20);\n YTran = nZ - nDel8 * SHIFT_LEFT8;\n XTran = nDel8 - nDel16 * SHIFT_LEFT8;\n float nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\n scale = 1.0 / pow(2.0, nLevel);\n }\n \n void getUVMatrix(vec4 uv0, vec4 uv1) {\n vTexCoordZ.x = uv0.z;\n \n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.x = aTextureCoordMatrix.x;\n #endif // USE_TextureCoordMatrix\n \n vTexMatrix = vec4(0.0,0.0,1.0,0.0);\n vIsRGBA.x = 0.0;\n if(vTexCoordZ.x < -90000.0) {\n vTexMatrix.z = -1.0;\n }\n \n #ifndef Instance\n computeUVMatrixFromZValue(floor(vTexCoordZ.x), vTexMatrix.x, vTexMatrix.y, vTexMatrix.z, vIsRGBA.x);\n #ifdef TexCoord2\n vTexMatrix2 = vec4(0.0,0.0,1.0,0.0);\n vIsRGBA.y = 0.0;\n vTexCoordZ.y = uv1.z;\n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.y = aTextureCoordMatrix.y;\n #endif // USE_TextureCoordMatrix \n computeUVMatrixFromZValue(floor(vTexCoordZ.y), vTexMatrix2.x, vTexMatrix2.y, vTexMatrix2.z, vIsRGBA.y);\n #endif // TexCoord2\n #endif // Instance\n vTexMatrix.w = log2(uTextureWidths.x * vTexMatrix.z);\n #ifdef TexCoord2\n vTexMatrix2.w = log2(uTextureWidths.y * vTexMatrix.z);\n #endif // TexCoord2\n }\n \n#endif\n\n#endif // COMPUTE_TEXCOORD\n",P$12="\n#ifdef FALTTEN\n uniform sampler2D uFlattenTexture;\n\n vec4 getVertexByFlatten(vec4 posInLayerCoord, float layerBottom)\n {\n vec4 vecPos = uGeoMatrix * vec4(posInLayerCoord.xyz, 1.0);\n vec2 vecRatio = vec2(uRect.z - uRect.x, uRect.w - uRect.y);\n vec2 vecTexCoord = vec2(vecPos.x - uRect.x, vecPos.y - uRect.y);\n vecTexCoord.x = vecTexCoord.x / vecRatio.x;\n vecTexCoord.y = vecTexCoord.y / vecRatio.y;\n if(vecTexCoord.x > 1.0 || vecTexCoord.x < 0.0 || vecTexCoord.y > 1.0 || vecTexCoord.y < 0.0)\n {\n return posInLayerCoord;\n }\n vec4 value = texture2D(uFlattenTexture, vecTexCoord.xy);\n #ifdef UseFloatTexture\n float fHeight = value.r;\n #else\n float fHeight = czm_unpackValue(value);\n #endif\n if(vecPos.z > fHeight && value.a > 0.5)\n {\n float fDepthOffset = clamp((uCameraHeight - fHeight - layerBottom) * 0.0001 * (vecPos.z + layerBottom - fHeight), 0.001, 3.0);\n vecPos.z = fHeight + fDepthOffset;\n vecPos.w = vecPos.z;\n }\n return uInverseGeoMatrix * vec4(vecPos.xyz, 1.0);\n }\n#endif\n",w$W="\n#ifdef FusionMode\n uniform mat4 uModelView;\n uniform vec2 uPanOffset;\n\n vec4 getFusionModePosition(vec4 vertexPos)\n {\n vec4 positionCC = czm_projection * uModelView * vertexPos;\n positionCC.x += (2.0 * uPanOffset.x * positionCC.w);\n positionCC.y += (-2.0 * uPanOffset.y * positionCC.w);\n return positionCC;\n }\n#endif\n",F$13="\n#ifdef W_VISIBLE\n uniform sampler2D uCategorieTexture;\n\n void setAlphaByWValue(in float w, inout vec4 color)\n {\n float category_u = abs(w - uMinCategory);\n float category_y = ceil(category_u / uCategoryWidht) / uCategoryHeight - 0.5 / uCategoryHeight;\n float category_x = mod(category_u, uCategoryWidht) / uCategoryWidht + 0.5 / uCategoryWidht ;\n vec2 categoryTexCoord = vec2(category_x , category_y);\n float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n color.a *= 1.0 - category;\n }\n#endif\n",A$1b="\n#ifdef USE_BatchPBR\n uniform sampler2D uPBRTexture;\n varying vec2 vMetallicRoughness;\n varying vec4 vEmissiveFactor;\n varying vec3 vAlphaCutoffAndModeAndDoubleSide;\n void getPBRParamFromTexture(vec2 uv1)\n {\n float x = (uv1.x * 2.0 + 0.5)/ uPBRTexWH.x;\n float y = (uv1.x * 2.0 + 1.5)/ uPBRTexWH.x;\n vec4 pbrParam = texture2D(uPBRTexture, vec2(x, 0.5));\n vMetallicRoughness.xy = pbrParam.rg;\n vAlphaCutoffAndModeAndDoubleSide.x = pbrParam.b;\n float temp = pbrParam.a / 65536.0;\n vAlphaCutoffAndModeAndDoubleSide.y = floor(temp);\n vAlphaCutoffAndModeAndDoubleSide.z = (temp- vAlphaCutoffAndModeAndDoubleSide.y) * 65536.0;\n vEmissiveFactor = texture2D(uPBRTexture, vec2(y, 0.5));\n }\n#endif\n",B$Z="\n#ifdef IMAGERY\n attribute vec2 img;\n varying vec2 imgCoord;\n#endif\n\n#ifdef Volume\n varying vec3 vecRotioCoord;\n#endif\n\n#ifdef QUAD_OUTLINE\n varying float vDistanceFromEye;\n#endif\n\n#ifdef HYPSOMETRIC\n varying vec2 vecHypTexCoord;\n#endif\n\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\n\n#ifdef SERVEREXCAVATION\n varying vec4 vServerExcavationVertexPos;\n#endif\n\n#ifdef SQRESULT\n uniform mat4 uSQViewProj;\n varying vec4 vSQ_clip_pos;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n uniform mat4 uFloodMatrixInvert;\n varying vec4 vFloodPos;\n#endif\n\n#ifdef FINAL_RESOLUTION_CLIP\n varying vec3 vertexClip;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n varying vec2 vLayerTexCoord;\n varying vec2 vModIndexAndTexIndex;\n#endif\n\nvoid s3mComputeVaryings(vec4 vertexPos)\n{\n#ifdef Volume\n vecRotioCoord = aRatio;\n#endif\n\n#ifdef FINAL_RESOLUTION_CLIP\n vertexClip = (uGeoMatrix * vec4(vertexPos.xyz, 1.0)).xyz;\n#endif\n\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n\n#ifdef SERVEREXCAVATION\n vServerExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n\n#ifdef HYPSOMETRIC\n if(uHypHasAnalysisRegion > 0.1)\n {\n float ptInRect = 1.0;\n vecHypTexCoord = calculatePolyTexCoord(uGeoMatrix * vec4(vertexPos.xyz, 1.0), uHypRect, ptInRect);\n }\n#endif\n\n#ifdef SQRESULT\n vSQ_clip_pos = uSQViewProj * vec4(vertexPos.xyz, 1.0);\n#endif\n\n#ifdef IMAGERY\n imgCoord = img;\n#endif\n\n#ifdef QUAD_OUTLINE\n vDistanceFromEye = gl_Position.z;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n const float right_8 = 65280.0;\n const float right_16 = 16711680.0;\n float pickId = vSecondColor.r * 255.0 + vSecondColor.g * right_8 + vSecondColor.b * right_16;\n vModIndexAndTexIndex.x = mod(pickId, 10.0) * 0.1;\n vModIndexAndTexIndex.y = mod(pickId, uEmissionTexAtlasCount);\n vec4 realVertexPos = uGeoMatrix * vertexPos;\n vLayerTexCoord = (realVertexPos.xy - uLayerBounds.xy) / uLayerBounds.zw;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n vFloodPos = uFloodMatrixInvert * vec4(vertexPos.xyz, 1.0);\n#endif\n}\n",R$Z="\nfloat computeWValue(inout vec4 vertexPos){\n float realWValue = vertexPos.w;\n#ifdef HypColorByZValue\n realWValue = vertexPos.z;\n#endif\n#ifdef TEXTURE_COORD_ONE_IS_W\n realWValue = aTexCoord0.x;\n#endif\n#ifdef USE_VertexWeight\n realWValue = aVertexWeight;\n #ifdef MultiTemporalWeight\n realWValue = mix(aVertexWeight, aVertexWeight_1, fMultiTemporalFactor);\n #ifdef ChangeZValue\n\t\tvertexPos.z += realWValue;\n\t\t#endif\n\t#endif\n#endif\n#ifdef COMPUTE_W_VALUE\n wValue = realWValue + uTranslationAndBottom.w;\n#endif\n return realWValue;\n}\n",T$11="\n#ifdef HYPSOMETRIC\n#include \n\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nvarying vec2 vecHypTexCoord;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\n#endif\n\nfloat computeMixCon(float fValue)\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n if(fValue < 0.5)\n {\n distanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n }\n else\n {\n float t = floor(fValue / uHypContourInterval);\n distanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n }\n }\n else\n {\n distanceToContour = abs(fValue - uHypMaxVisibleValue);\n }\n float dxc = abs(dFdx(fValue));\n float dyc = abs(dFdy(fValue));\n float dF = max(dxc, dyc);\n return (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float fValue)\n{\n float threshold = abs(uHypCeil - uHypFloor);\n float contourRate = (fValue - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n float count = floor(finalCoord * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 contourCoord = vec2(x, y);\n return texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvec4 getContourMapColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n#ifdef Volume\n vec3 aRatioT = vecRotioCoord;\n if((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n {\n if(uVolumeType > 0.5)\n {\n vec4 volumeColor = getVolumeValue(aRatioT);\n if(uMixColorType > 0.5)\n {\n volumeColor = volumeColor * oriColor;\n }\n return volumeColor;\n }\n float noValue;\n float texTest = getVolumeValue(aRatioT, noValue);\n if(noValue > 0.5)\n {\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n#endif\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n finalColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n#endif\n return finalColor;\n}\n\n#ifdef Volume2\nfloat getContourValue(vec4 volColor) {\n float noValue = volColor.a;\n float texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\n\n float fValue;\n if(noValue > 0.5)\n {\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n \n return fValue;\n}\n\nvec4 getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n \n if(uFilterMode > 0.5) {\n vec4 finalColor = volColor * oriColor;\n\n if(uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n \n float fValue = getContourValue(volColor);\n return getContourMapColor(oriColor, fValue);\n}\n\n#else\n\nvec4 getHypsometricColor(vec4 oriColor, float wValue)\n{\n float fValue = wValue;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return getContourMapColor(oriColor, fValue);\n}\n\nvec4 getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return getContourMapColor(oriColor, wValue);\n}\n#endif\n\n#endif\n",N$W="\nvec2 calculatePolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect){\n vec4 realVertexPos = vertexPos;\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(realVertexPos.x - rectPos.x, realVertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\n",I$1i="\n#ifdef EXCAVATION\nuniform sampler2D uExcavationTexture;\nvarying vec4 vExcavationVertexPos;\nbool executeExcavation()\n{\n float hasExcavation = 1.0;\n vec2 vecExcavationTexCoord = calculatePolyTexCoord(vExcavationVertexPos, uExcavationRect, hasExcavation);\n bool excavationInside = (uExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n \n if(excavationInside)\n {\n return textureLod(uExcavationTexture, vecExcavationTexCoord.xy, 0.0).r > 0.5;\n }\n \n return textureLod(uExcavationTexture, vecExcavationTexCoord.xy, 0.0).r < 0.5;\n}\n#endif\n",W$10="\n#ifdef APPLY_SWIPE\nvoid rollerShutter(vec2 coord, vec4 region)\n{\n vec2 f = step(region.xw, coord);\n vec2 s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n#endif\n",k$Z="\n#ifdef EMISSION_TEXTURE_ATLAS\nuniform sampler2D uEmissionTexAtlas;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 getEmissiveTextureAtlasColor(float w)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n for(int i = 0; i < int(uEmissionTexAtlasCount); i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n vec3 normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n float isNotTopFace = 1.0 - step(0.95, normalMC.z);\n float dayTime = 1.0 - czm_RGBToHSL(uAmbientLightColor.rgb).z;\n vec3 emissionTexColor = uEmissionColor.rgb * texColor * dayTime * isNotTopFace;\n return emissionTexColor;\n}\n\nvec3 getEmissiveTextureAtlasColor(float w, vec2 texCoord)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n for(int i = 0; i < int(uEmissionTexAtlasCount); i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n vec3 normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n float isNotTopFace = 1.0 - step(0.95, normalMC.z);\n float dayTime = 1.0 - czm_RGBToHSL(uAmbientLightColor.rgb).z;\n vec3 emissionTexColor = uEmissionColor.rgb * texColor * dayTime * isNotTopFace;\n return emissionTexColor;\n}\n#endif\n",O$N="\n#ifdef ADJUST_COLOR\nvec3 adjustColor(vec3 inputColor)\n{\n vec3 outputColor = inputColor;\n outputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\n outputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\n outputColor.rgb = czm_hue(outputColor.rgb, uHue);\n outputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\n outputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\n outputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\n return outputColor;\n}\n#endif\n",_$X="\n#ifdef CLIP\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nconst float clip_lineWidth = 3.0;\n\nfloat GetClipDistance(vec3 pos, vec3 planeNormal, float disToOrigin)\n{\n return dot(planeNormal, pos) + disToOrigin;\n}\n\nfloat ClipBehindAllPlane(float fBorderWidth, vec4 clip_vertex)\n{\n float distance = 0.0;\n float result = -1.0;\n #ifdef CLIPPLANE\n distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[0].xyz, uClipPlanes[0].w);\n if (distance < 0.0)\n {\n return 1.0;\n }\n else if (distance < fBorderWidth)\n {\n result = 0.0;\n }\n #else\n for(int i = 0; i < 6; i++)\n {\n distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[i].xyz, uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return 1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n #endif\n return result;\n}\n\nfloat ClipBehindAnyPlane(float fBorderWidth, vec4 clip_vertex)\n{\n float result = 1.0;\n for(int i = 0; i < 6; i++)\n {\n float distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[i].xyz, uClipPlanes[i].w);\n if((distance + fBorderWidth) < 0.0)\n {\n return -1.0;\n }\n else if(distance < 0.0)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nfloat ClipAnythingButLine(float fBorderWidth, vec4 clip_vertex)\n{\n float result = -1.0;\n for(int i = 0; i < 6; i++)\n {\n float distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[i].xyz, uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return -1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nvec4 clip(vec4 clip_vertex, float fIsFiltByID)\n{\n if(fIsFiltByID < 0.1)\n {\n return vec4(1.0);\n }\n if(uClipMode < 0.5)\n {\n return vec4(1.0);\n }\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2) \n float dxc = abs(dFdx(clip_vertex.x));\n float dyc = abs(dFdy(clip_vertex.y));\n float fBorderWidth = max(dxc, dyc) * clip_lineWidth;\n #else\n float fBorderWidth = clip_lineWidth;\n #endif\n float clipResult = 1.0;\n if(uClipLineColor.a < 0.01)\n {\n fBorderWidth = 0.0;\n }\n if(uClipMode < 1.5)\n {\n clipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n }\n else if(uClipMode < 2.5)\n {\n clipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n }\n else if(uClipMode < 3.5)\n {\n clipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n }\n if(clipResult < -0.5)\n {\n discard;\n }\n else if(clipResult < 0.5)\n {\n return uClipLineColor;\n }\n else\n {\n return vec4(1.0);\n }\n}\n#endif\n",j$16="\n#ifdef Volume\nuniform sampler2D uVolumeTexture;\n\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uTimeRatio;\n#endif\n\nfloat unpackVolume(vec3 packedDepth)\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\n float yOffset = floor((fLevel+0.25/uVolSideBlockCount) / uVolSideBlockCount);\n float xOffset = fLevel - yOffset * uVolSideBlockCount;\n float texCoordV = (texCoord.y * uVolHeight + yOffset * uVolBlockLength) / uVolTexLength;\n float texCoordU = (texCoord.x * uVolWidth + xOffset * uVolBlockLength) / uVolTexLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\n vec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\n vec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\n float fValue1 = clamp(unpackVolume(volumeValue1.xyz),0.0,1.0);\n float fValue2 = clamp(unpackVolume(volumeValue2.xyz),0.0,1.0);\n if(uVolFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n noValue = mix(volumeValue1.a, volumeValue2.a, ratio);\n if(volumeValue1.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(volumeValue2.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfloat getVolumeValue(vec3 texCoord, out float noValue)\n{\n float fLevel = (uVolDepth - 1.0) * texCoord.z;\n float bottomLevel= floor(fLevel);\n float topLevel = bottomLevel + 1.0;\n float ratio = topLevel - fLevel;\n vec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n vec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n float fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n fResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\n return fResult;\n}\n\nvec4 getVolumeValue(vec3 texCoord)\n{\n\tfloat fLevel = (uVolDepth - 1.0) * texCoord.z;\n\tfloat bottomLevel= floor(fLevel);\n\tfloat topLevel = bottomLevel + 1.0;\n\tfloat ratio = topLevel - fLevel;\n\tfloat yOffset1 = floor((topLevel+0.25/uVolSideBlockCount) / uVolSideBlockCount);\n\tfloat xOffset1 = topLevel - yOffset1 * uVolSideBlockCount;\n\tfloat texCoordV1 = (texCoord.y * uVolHeight + yOffset1 * uVolBlockLength)/uVolTexLength;\n\tfloat texCoordU1 = (texCoord.x * uVolWidth + xOffset1 * uVolBlockLength)/uVolTexLength;\n\tvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\n\tfloat yOffset2 = floor((bottomLevel+0.25/uVolSideBlockCount) / uVolSideBlockCount);\n\tfloat xOffset2 = bottomLevel - yOffset2 * uVolSideBlockCount;\n\tfloat texCoordV2 = (texCoord.y * uVolHeight + yOffset2 * uVolBlockLength)/uVolTexLength;\n\tfloat texCoordU2 = (texCoord.x * uVolWidth + xOffset2 * uVolBlockLength)/uVolTexLength;\n\tvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\n\n\tif(uVolFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif\n",G$1c="\nUBO_DECL_BEGIN(WaterLayer)\n UBO_PARAM vec4 uWaterColor;\n UBO_PARAM vec4 uSunColor;\n UBO_PARAM vec2 uBumpSpeed;\n UBO_PARAM float uTimeVal;\n UBO_PARAM float uWaterBrightness;\n UBO_PARAM float uUseRefectMap;\n UBO_PARAM float uNoiseScale;\n UBO_PARAM float uMinVisibleValue;\n UBO_PARAM float uMaxVisibleValue;\n UBO_PARAM float uReflectMapLod;\nUBO_DECL_END\n",H$10="\n UBO_DECL_BEGIN(Polyline)\n vec4 uColor;\n vec4 uOutlineColor;\n vec4 uGapColor;\n float uEffectLineWidth;\n float uType;\n float uOutlineWidth;\n float uDashLength;\n float uDashPattern;\n float uGlowPower;\n float uIsArrow;\n UBO_DECL_END\n",q$15="\n UBO_DECL_BEGIN(RegionEffect)\n vec4 uForeColor;\n vec4 uBackColor;\n float uRotationAngle;\n float uType;\n float uLineWidthX;\n float uLineWidthY;\n float uRepeatX;\n float uRepeatY;\n float uOffsetX;\n float uOffsetY;\n UBO_DECL_END\n",z$X="\nmat3 getNormalMatrix(mat4 viewMatrix, mat4 modelMatrix) {\n mat4 modelView = viewMatrix * modelMatrix;\n vec4 modelViewRow0 = modelView[0];\n vec4 modelViewRow1 = modelView[1]; \n vec4 modelViewRow2 = modelView[2]; \n mat3 normalMatrix = mat3(\n vec3(modelViewRow0.x, modelViewRow0.y, modelViewRow0.z), \n vec3(modelViewRow1.x, modelViewRow1.y, modelViewRow1.z), \n vec3(modelViewRow2.x, modelViewRow2.y, modelViewRow2.z));\n return normalMatrix;\n}",J$X="\nUBO_DECL_BEGIN(Shadow)\n UBO_PARAM mat4 shadowMap_matrix;\n UBO_PARAM vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;\n UBO_PARAM vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;\n UBO_PARAM mat4 shadowMap_cascadeMatrices[4];\n UBO_PARAM vec4 shadowMap_cascadeSplits[2];\n UBO_PARAM vec4 shadowMap_lightPositionEC;\n UBO_PARAM vec3 shadowMap_lightDirectionEC;\n UBO_PARAM float shadowMap_penumbraRatio;\nUBO_DECL_END\n",K$U="\n#define MAX_POINT_LIGHT_COUNT 16\n#define MAX_SPOT_LIGHT_COUNT 16\n#define MAX_DIRECTION_LIGHT_COUNT 4\nUBO_DECL_BEGIN(Light)\n UBO_PARAM vec3 uPointLightPositionEC[MAX_POINT_LIGHT_COUNT];\n UBO_PARAM vec3 uPointLightColor[MAX_POINT_LIGHT_COUNT];\n UBO_PARAM vec4 uPointLightDistanceAndDecay[MAX_POINT_LIGHT_COUNT];\n UBO_PARAM vec4 uSpotLightColorAndExponent[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec3 uSpotLightPositionEC[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec3 uSpotLightDirectionEC[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec4 uSpotLightDistanceDecayCosPenumbra[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec3 uDirectionalLightDirectionEC[MAX_DIRECTION_LIGHT_COUNT];\n UBO_PARAM vec3 uDirectionalLightDirection[MAX_DIRECTION_LIGHT_COUNT];\n UBO_PARAM vec3 uDirectionalLightColor[MAX_DIRECTION_LIGHT_COUNT];\n UBO_PARAM vec4 uAmbientLightColor;\n UBO_PARAM vec4 uSunLightColor;\n UBO_PARAM vec3 uSunDirectionEC;\n UBO_PARAM vec3 uSkyColor;\n UBO_PARAM vec3 uGroundColor;\n UBO_PARAM float uSunLightON;\n UBO_PARAM int uPointLightCount;\n UBO_PARAM int uSpotLightCount;\n UBO_PARAM int uDirLightCount;\nUBO_DECL_END\n",Q$$="\nuniform sampler2D uNormalDepthTexture;\nfloat edgeDetection(float lineWidth)\n{\n vec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\n vec2 off = lineWidth / czm_globeDepthTextureDim.xy;\n vec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\n val_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\n vec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\n val_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\n vec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\n val_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\n vec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\n val_se.xyz = (val_se.xyz * 2.0) - 1.0;\n float discontinuity = 0.0;\n float dot0 = dot(val_nw.xyz, val_se.xyz);\n float dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nvec4 sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\n vec4 outputColor = inputColor;\n float discontinuity = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0, 1.0);\n if(uFillStyle == 1.)\n {\n outputColor = lineColor;\n outputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\n outputColor.a *= lineColor.a;\n }\n else\n {\n vec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\n outputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n }\n return outputColor;\n}\n",X$_="\nUBO_DECL_BEGIN(S3MVolume)\n UBO_PARAM float uVolSideBlockCount;\n UBO_PARAM float uVolBlockLength;\n UBO_PARAM float uVolTexLength;\n UBO_PARAM float uVolWidth;\n UBO_PARAM float uVolHeight;\n UBO_PARAM float uVolDepth;\n UBO_PARAM float uVolFilterMode;\n UBO_PARAM float uVolumeType;\nUBO_DECL_END\n",Y$R="\nstruct IncidentLight {\n vec3 direction;\n vec3 color;\n bool visible;\n};\n\nstruct GeometricContext {\n vec3 position;\n vec3 normal;\n vec3 viewDir;\n};\n\nstruct PhysicalMaterial {\n vec3\tdiffuseColor;\n float\troughness;\n vec3\tspecularColor;\n float specularF90;\n};\n\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n\n#define saturate(a) clamp( a, 0.0, 1.0 )\n\n#include \n#include \n\n//参考UE4.24实现计算精确光源的衰减\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n if ( decayExponent > 0.0 ) {\n return pow( clamp( 1.0 - lightDistance / cutoffDistance, 0.0, 1.0 ), decayExponent );\n }\n return 1.0;\n}\n",Z$$="\n\n#include \n#include \nvec3 inverseTransformDirection( in vec3 dir ) {\n mat3 fixedToENU = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n const mat3 yUpToZUp = mat3(1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n return normalize( yUpToZUp * fixedToENU * dir );\n}\n\n// void indirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n// reflectedLight.indirectDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n// }\n\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\n\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n vec3 Fr = specularColor;\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\n vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\n\nvoid indirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance;\n computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n vec3 totalScattering = singleScattering + multiScattering;\n vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n reflectedLight.indirectSpecular += radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#ifdef IBL\nvec3 getIBLIrradiance( const in vec3 normal ) {\n vec3 worldNormal = inverseTransformDirection( normal );\n vec4 envMapColor = textureCubeUV( czm_hdrEnvMap, worldNormal, 1.0 );\n return envMapColor.rgb;\n}\n\nvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n vec3 reflectVec = reflect( - viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n reflectVec = inverseTransformDirection( reflectVec );\n vec4 envMapColor = textureCubeUV( czm_hdrEnvMap, reflectVec, roughness );\n return envMapColor.rgb;\n}\n#endif\n\nvoid getEnvironmentColor(GeometricContext geometry, PhysicalMaterial material, inout ReflectedLight reflectedLight)\n{\n float roughness = material.roughness;\n vec3 posEC = geometry.position;\n vec3 n = geometry.normal;\n vec3 v = geometry.viewDir;\n\n vec3 irradiance = vec3(0.0);\n vec3 radiance = vec3(0.0);\n\n#ifdef BRDF\n#ifdef IBL\n\n#ifdef KtxEnvMap\n mat3 fixedToENU = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n vec3 cubeDir = normalize( yUpToZUp * fixedToENU * reflect(-v, n) );\n vec3 worldNormal = normalize( yUpToZUp * fixedToENU * n );\n irradiance = czm_sphericalHarmonics(worldNormal, uSphericalHarmonicCoefficients);\n radiance = czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, uSpecularEnvironmentMapSize, cubeDir, roughness * uSpecularEnvironmentMapsMaximumLOD, uSpecularEnvironmentMapsMaximumLOD);\n#else\n irradiance += getIBLIrradiance( geometry.normal );\n radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n#endif\n \n#else\n vec3 positionWC = vec3(uInverseView * vec4(posEC, 1.0)) + uRelativeOrigin;\n vec3 r = normalize(uInverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(uTemeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(uInverseViewRotation * uSunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(uInverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float sunNdotL = clamp(dot(n, uSunDirectionEC), 0.001, 1.0);\n float gamma = acos(sunNdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n luminance = luminance * uSunLightON + (1.0 - uSunLightON);\n irradiance = diffuseIrradiance * luminance;\n radiance = specularIrradiance * luminance;\n#endif\n irradiance *= uEnvMapIntensity;\n radiance *= uEnvMapIntensity;\n#else\n irradiance = uAmbientLightColor.rgb * 0.6;\n#endif\n\n#ifdef HAS_HEMISPHERE_LIGHTS\n HemisphereLight hemiLight;\n hemiLight.skyColor = uSkyColor;\n hemiLight.groundColor = uGroundColor;\n hemiLight.direction = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\n irradiance += getHemisphereLightIrradiance( hemiLight, geometry );\n#endif\n\n indirectSpecular_Physical(radiance, irradiance, geometry, material, reflectedLight);\n\n}\n\n",$$10="\n#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nvarying vec3 v_logPositionEC;\n#endif\n#endif\n\nvec4 updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n\n#ifdef SHADOW_MAP\n vec3 logPositionEC = (uInverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n#endif\n coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\n\n return coords;\n}\n\nvoid vertexLogDepth() {\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0 - uCurrentFrustum.x + gl_Position.w;\n gl_Position = updatePositionDepth(gl_Position);\n#endif\n}\n",oo="\n#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#endif\n\nvoid writeLogDepth(float depth)\n{\n#ifdef LOG_DEPTH\n#if defined(GL_EXT_frag_depth) || defined(WEBGL2)\n if (depth <= 0.9999999 || depth > uFarDepthFromNearPlusOne) {\n discard;\n }\n#ifdef POLYGON_OFFSET\n float factor = uPolygonOffset.z;\n float units = uPolygonOffset.w;\n\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n float x = dFdx(depth);\n float y = dFdy(depth);\n float m = sqrt(x * x + y * y);\n depth += m * factor;\n#endif\n\n#endif\n\n gl_FragDepthEXT = log2(depth) * uOneOverLog2FarDepthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\n gl_FragDepthEXT += czm_epsilon7 * units;\n#endif\n\n#endif\n#endif\n}\n\n",ro$1="\n#ifndef BRDF\nconst float shininess2 = 30.0;\nconst vec3 specular = vec3(0.066666);\n\nfloat getRoughness(vec2 oriTexCoord){\n return 1.0;\n}\n\nvec4 blinnPhong(in vec4 baseColorWithAlpha, vec2 texCoord, vec2 oriTexCoord, vec3 posEC, vec3 posMC, vec3 vertexNormalEC, mat4 modelMatrix)\n{\n float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n mat3 normalMatrix = getNormalMatrix(uView, modelMatrix);\n vec3 normalEC = normalize(vertexNormalEC);\n #ifndef HAS_NORMAL\n normalEC = normalize(normalMatrix * czm_computeNormal(posMC.xyz));\n #endif\n normalEC = normalEC * faceDirection;\n\n vec3 totalDiffuseLight = vec3(0.0);\n vec3 totalSpecularLight = vec3(0.0);\n float sunLightDiffuseWeight = max( dot( normalEC, uSunDirectionEC ), 0.0 );\n totalDiffuseLight = uSunLightColor.rgb * sunLightDiffuseWeight * uSunLightON;\n vec3 positionToEyeECDir = -normalize(posEC);\n\n #ifdef HAS_DIR_LIGHTS\n for ( int i = 0; i < uDirLightCount; i ++ )\n {\n vec3 dirVectorEC = normalize((uView * vec4(uDirectionalLightDirection[ i ], 0.0)).xyz);\n float dotProduct = dot( normalEC, dirVectorEC );\n float dirDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += uDirectionalLightColor[ i ] * dirDiffuseWeight;\n }\n #endif\n\n #ifdef HAS_POINT_LIGHTS\n for ( int i = 0; i < uPointLightCount; i ++ )\n {\n vec3 lVector = uPointLightPositionEC[i] - posEC;\n float lengthToLight = length( lVector );\n float cutoffDis = uPointLightDistanceAndDecay[i].x;\n if(lengthToLight > cutoffDis)\n {\n continue;\n }\n float attenuation = punctualLightIntensityToIrradianceFactor( lengthToLight, cutoffDis, uPointLightDistanceAndDecay[i].y);\n lVector = normalize( lVector );\n float dotProduct = dot( normalEC, lVector );\n float pointLightDiffuse = max( dotProduct, 0.0 );\n totalDiffuseLight += uPointLightColor[i] * pointLightDiffuse * attenuation;\n vec3 pointHalfVector = normalize( lVector + positionToEyeECDir );\n float pointDotNormalHalf = max( dot( normalEC, pointHalfVector ), 0.0 );\n float pointSpecularWeight = max( pow( pointDotNormalHalf, shininess2 ), 0.0 );\n float specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, pointHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * uPointLightColor[ i ] * pointSpecularWeight * pointLightDiffuse * attenuation * specularNormalization;\n }\n #endif\n\n #ifdef HAS_SPOT_LIGHTS\n vec3 positionWC = (czm_model * vec4(posMC, 1.0)).xyz;\n for ( int i = 0; i < uSpotLightCount; i ++ )\n {\n vec3 lVector = uSpotLightPositionEC[i] - posEC;\n float attenuation = punctualLightIntensityToIrradianceFactor( length( lVector ), uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\n lVector = normalize( lVector );\n float spotEffect = dot( lVector, uSpotLightDirectionEC[ i ] );\n if ( spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z ) {\n spotEffect = max( pow( max( spotEffect, 0.0 ), uSpotLightColorAndExponent[ i ].w ), 0.0 );\n float dotProduct = dot( normalEC, lVector );\n float spotDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += uSpotLightColorAndExponent[ i ].rgb * spotDiffuseWeight * attenuation * spotEffect;\n vec3 spotHalfVector = normalize( lVector + positionToEyeECDir );\n float spotDotNormalHalf = max( dot( normalEC, spotHalfVector ), 0.0 );\n float spotSpecularWeight = max( pow( spotDotNormalHalf, shininess2 ), 0.0 );\n float specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * uSpotLightColorAndExponent[ i ].rgb * spotSpecularWeight * spotDiffuseWeight * attenuation * specularNormalization * spotEffect;\n }\n }\n #endif\n\n vec3 diffuseColor = uDiffuseColor.rgb * baseColorWithAlpha.rgb;\n\n PhysicalMaterial material;\n material.diffuseColor = diffuseColor;\n material.roughness = 1.0;\n float metalness = 0.0;\n vec3 f0 = vec3(0.04);\n material.specularColor = mix(f0, baseColorWithAlpha.rgb, metalness);;\n material.specularF90 = 1.0;\n \n GeometricContext geometry;\n geometry.position = posEC;\n geometry.normal = normalEC;\n geometry.viewDir = positionToEyeECDir;\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += totalDiffuseLight * diffuseColor;\n reflectedLight.directSpecular += totalSpecularLight * uSpecularColor.rgb;\n \n getEnvironmentColor(geometry, material, reflectedLight);\n\n float shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), normalEC, -posEC.z);\n#endif\n\n vec3 color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n return vec4(LINEARtoSRGB(color.rgb), baseColorWithAlpha.a);\n}\n#endif\n",eo="\n#ifdef TexCoord\n varying vec4 vTexCoord;\n varying vec2 vTexCoordZ;\n#endif\n\n#ifdef MULTI_TEX\n varying vec4 vTexMatrix2;\n#endif\n\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef TextureBatch\n varying vec4 vTexTran;\n varying vec4 vTexScale;\n varying vec4 vTexSize;\n varying vec2 vMaxMipLevel;\n#else\n varying vec4 vTexMatrix;\n varying vec2 vIsRGBA;\n#endif\n\n#include \n\n#ifdef TextureBatch\n\nvec2 getBatchUV(vec2 uv, vec2 translate, vec2 scale, vec2 dim, float mipLevel)\n{\n float temp;\n vec2 texTranslate = vec2(translate.x, translate.y);\t\n\tif(mipLevel > 0.0)\n\t{\n\t\ttexTranslate.x = translate.x + scale.x;\n\t\ttemp = pow(2.0, mipLevel - 1.0);\n\t\ttexTranslate.y = translate.y + scale.y * (temp - 1.0) / temp;\n\t}\n float texScale = 1.0 / pow(2.0, mipLevel);\n\tvec2 outUV = fract(uv);\n\tfloat offsetX = pow(2.0, mipLevel) / dim.x;\n\tfloat offsetY = pow(2.0, mipLevel) / dim.y;\n\toutUV.x = clamp(outUV.x, 0.0 + offsetX, 1.0 - offsetX);\n\toutUV.y = clamp(outUV.y, 0.0 + offsetY, 1.0 - offsetY);\n\toutUV.x = outUV.x * texScale * scale.x + texTranslate.x;\n\toutUV.y = outUV.y * texScale * scale.y + texTranslate.y;\n\treturn outUV;\n}\n\n#else\n\nvec2 getUV(vec2 uv, vec2 translate, vec4 uvOffset, float scale, float width, float mipLevel, float texCoordZ) \n{\n vec2 texCoord;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n float offset = pow(2.0, mipLevel) / width;\n texCoord = clamp(texCoord, offset, 1.0 - offset);\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n texCoord = texCoord * uvOffset.zw + uvOffset.xy;\n return texCoord;\n}\n\n#endif\n\n#endif\n";const mo$1={rainDecl:o$1a,snowDecl:r$14,hemisphereLightDecl:e$1R,pointLightDecl:m$_,spotLightDecl:t$Z,directionLightDecl:i$Y,lightSourceImpl:p$10,brdf:l$17,executeServerExcavationDecl:f$Y,cubeUV_reflection:c$13,shadowReceive:a$X,shadowVisibility:n$_,globeOcean:D$Z,globeAnalysis:h$12,SRGBtoLINEAR:s$V,SceneUboDecl:x$16,LayerUboDecl:d$1h,MaterialUboDecl:b$1d,MeshUboDecl:u$T,writeFragDepth:L$16,renderNormal:g$15,renderNormalAndDepth:S$T,renderPrePass:U$12,calculateMipLevel:V$W,getTextureColorDecl:y$W,preClipFS:M$16,S3MOperationFSDecl:v$R,S3MVertexFactory:C$16,getUVMatrixDecl:E$18,getVertexByFlatten:P$12,getFusionModePosition:w$W,setAlphaByWValue:F$13,getPBRParamFromTexture:A$1b,s3mComputeVaryings:B$Z,computeWValue:R$Z,HypSometric:T$11,calculatePolyTexCoord:N$W,executeExcavation:I$1i,splitClip:W$10,getEmissiveTextureAtlasColor:k$Z,adjustColor:O$N,clip:_$X,getVolumeValue:j$16,WaterLayerUboDecl:G$1c,RegionEffectUboDecl:q$15,PolylineEffectUboDecl:H$10,getNormalMatrix:z$X,ShadowUboDecl:J$X,LightUboDecl:K$U,sketchMode:Q$$,S3MVolumeUboDecl:X$_,vertexLogDepthDecl:$$10,writeLogDepthDecl:oo,getEnvironmentColor:Z$$,shaderModelBase:Y$R,blinnPhong:ro$1,calcTexCoordDecl:eo};var preClipFS="\n#include \n#include \n#include \nfn preClip()\n{\n#ifdef RASTER_CULL\n czm_rasterCull();\n#endif\n#ifdef SQCLIP\n czm_spatialQueryClip();\n#endif\n#ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, Layer.uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(executeExcavation())\n {\n discard;\n }\n#endif\n}\n",writeFragDepth="\ngl_FragDepth = gl_FragCoord.z;\n",renderNormal="\n#ifdef NORMAL\nfn renderNormal(posMC : vec3) -> vec4\n{\n var normalMC : vec3 = normalize(czm_computeNormal(posMC));\n normalMC = normalMC * 0.5 + vec3(0.5);\n #include \n return vec4(normalMC, 1.0);\n}\n#endif\n",renderNormalAndDepth="\n#ifdef NORMAL_AND_DEPTH\nvarying oriVertex : vec4;\nvarying perVertexNormals : vec3;\nfn renderNormalAndDepth(posMC : vec3) -> vec4\n{\n var normal = normalize(perVertexNormals);\n var modelView = Scene.uView * Mesh.uModelMatrix;\n var modelViewMat = mat3x3(modelView[0][0], modelView[1][0], modelView[2][0], modelView[0][1], modelView[1][1], modelView[2][1], modelView[0][2], modelView[1][2], modelView[2][2]);\n var shaderNormal = vec3(modelViewMat * czm_computeNormal(posMC.xyz));\n var dLength = length(perVertexNormals);\n if(dLength <= 0.9)\n {\n normal = shaderNormal;\n }\n normal = (normal + 1.0) * 0.5;\n #include \n return vec4(normal, 1.0);\n}\n#endif\n",renderPrePass="\nvar normalEC = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(vPositionMC.xyz));\n// 相机坐标系坐标\ngl_FragData0 = vec4(v_positionEC, 1.0);\n// 相机坐标系法线\ngl_FragData1 = vec4(normalEC, 1.0);\n// 反射率\ngl_FragData2 = vec4(0.5, 0.5, 0.5, 1.0);\n",calculateMipLevel="\nfn calculateMipLevel(inTexCoord : vec2, vecTile : vec2, fMaxMip : f32, outMipLevel : ptr) {\n\tvar dx = dpdx((inTexCoord * vecTile.x));\n\tvar dy = dpdy((inTexCoord * vecTile.y));\n\tvar dotX = dot(dx, dx);\n\tvar dotY = dot(dy, dy);\n\tvar dMax = max(dotX, dotY);\n\tvar dMin = min(dotX, dotY);\n\tvar offset = ((dMax - dMin) / (dMax + dMin));\n\toffset = clamp(offset, 0.0f, 1.0f);\n\tvar d = ((dMax * (1.0f - offset)) + (dMin * offset));\n\tvar mipLevel = (0.5f * log2(d));\n\tmipLevel = clamp(mipLevel, 0.0f, (fMaxMip - 1.620000005f));\n\t(*outMipLevel) = mipLevel;\n\treturn;\n }\n \n",getTextureColorDecl="\n#ifdef Has_Texture\n var uTexture : texture_2d;\n var uTextureSampler : sampler;\n\n#ifdef MULTI_TEX\n var uSecTexture : texture_2d;\n var uSecTextureSampler : sampler;\n#endif\n#ifndef NO_TEXCOORD\nstruct TextureParam {\n uv : vec2,\n dim : vec2,\n translate : vec2,\n scale : vec2,\n uvOffset : vec4,\n maxMipmapLevel : f32,\n texCoordZ : f32,\n isRGBA : f32,\n}\nfn sampleLod(uv : vec2, mipLevel : f32, bUseFirstTexture : bool) -> vec4 {\n var color = vec4(1.0f, 1.0f, 1.0f, 1.0f);\n if (bUseFirstTexture) {\n color = textureSampleLevel(uTexture, uTextureSampler, uv, mipLevel);\n }\n else\n {\n#ifdef MULTI_TEX\n color = textureSampleLevel(uSecTexture, uSecTextureSampler, uv, mipLevel);\n#endif\n }\n color = sRGBToLinear(color);\n return color;\n}\n\n #ifdef TextureBatch\n fn getBatchTextureColor(textureParam : TextureParam, bUseFirstTexture : bool) -> vec4\n {\n var uv = textureParam.uv;\n var dim = textureParam.dim;\n var translate = textureParam.translate;\n var scale = textureParam.scale;\n var uvOffset = textureParam.uvOffset;\n var maxMipmapLevel = textureParam.maxMipmapLevel;\n var mipLevel = 0.0;\n calculateMipLevel(uv, dim, maxMipmapLevel, &mipLevel);\n if(maxMipmapLevel < 0.0)\n {\n return vec4(1.0);\n }\n var texCoord = getBatchUV(uv, translate, scale, dim, ceil(mipLevel));\n var colorCeil = sampleLod(texCoord, 0.0, bUseFirstTexture);\n texCoord = getBatchUV(uv, translate, scale, dim, floor(mipLevel));\n var colorFloor = sampleLod(texCoord, 0.0, bUseFirstTexture);\n return colorCeil * 0.5 + colorFloor * 0.5;\n }\n #else\n fn getTextureColor(textureParam : TextureParam, outTexCoord : ptr>, bUseFirstTexture : bool) -> vec4 {\n var dim = textureParam.dim;\n var maxMipmapLevel = textureParam.maxMipmapLevel;\n var mipLevel = 0.0f;\n calculateMipLevel(textureParam.uv, dim, maxMipmapLevel, &(mipLevel));\n *(outTexCoord) = getUV(textureParam.uv, textureParam.translate, textureParam.uvOffset, textureParam.scale.x, dim.x, mipLevel, textureParam.texCoordZ);\n var color = sampleLod(*(outTexCoord), mipLevel, bUseFirstTexture);\n return color;\n }\n #endif\n // end TextureBatch\n\n#endif\n\nfn SRGBtoLINEAR4(srgbIn : vec4) -> vec4\n{\n var linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\nfn getTextureColorForS3M(outTexCoord : ptr>, firstColor : ptr>, secColor : ptr>) -> vec4 {\n #ifdef INVALID_OBLIQUE\n return vec4(0.5, 0.5, 0.5, 1.0);\n #endif\n #ifdef NO_TEXCOORD\n return SRGBtoLINEAR4(textureSample(uTexture, uTextureSampler, vec2(0.5)));\n #endif\n #ifndef NO_TEXCOORD\n var textureParam : TextureParam;\n textureParam.uv = vec2(vTexCoord.x, vTexCoord.y);\n #ifdef TextureBatch\n textureParam.dim = vTexSize.xy;\n textureParam.translate = vTexTran.xy;\n textureParam.scale = vTexScale.xy;\n textureParam.uvOffset = Material.uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.x;\n *(firstColor) = getBatchTextureColor(textureParam, true);\n #else\n var texWidth : f32;\n texWidth = (vTexMatrix.z * Material.uTextureWidths.x); \n textureParam.dim = vec2(texWidth, texWidth); \n textureParam.translate = vec2(vTexMatrix.x, vTexMatrix.y); \n textureParam.scale = vec2(vTexMatrix.z, vTexMatrix.z); \n textureParam.uvOffset = Material.uTexUVOffset; \n textureParam.maxMipmapLevel = vTexMatrix.w; \n textureParam.texCoordZ = vTexCoordZ.x;\n var param_42 = vec2((*(outTexCoord)).x, (*(outTexCoord)).y); \n *(firstColor) = getTextureColor(textureParam, &(param_42), true);\n (*outTexCoord).x = param_42.x;\n (*outTexCoord).y = param_42.y;\n #endif\n\n #ifdef MULTI_TEX\n textureParam.uv = vTexCoord.zw;\n #ifdef TextureBatch\n textureParam.dim = vTexSize.zw;\n textureParam.translate = vTexTran.zw;\n textureParam.scale = vTexScale.zw;\n textureParam.uvOffset = Material.uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.y;\n *(secColor) = getBatchTextureColor(textureParam, false);\n #else\n texWidth = vTexMatrix2.z * Material.uTextureWidths.y;\n textureParam.dim = vec2(texWidth, texWidth);\n textureParam.translate = vTexMatrix2.xy;\n textureParam.scale = vec2(vTexMatrix2.z, vTexMatrix2.z);\n textureParam.uvOffset = Material.uTexUVOffset;\n textureParam.maxMipmapLevel = vTexMatrix2.w;\n textureParam.texCoordZ = vTexCoordZ.y;\n param_42 = vec2((*(outTexCoord)).z, (*(outTexCoord)).w); \n *(secColor) = getTextureColor(textureParam, &(param_42), false);\n #endif\n return *(firstColor) * (*(secColor));\n #else\n return *(firstColor);\n #endif\n #endif\n}\n#endif\n",rainDecl="\n#ifdef HAS_RAIN\nvar uRippleTexture : texture_2d;\nvar uRippleTextureSampler : sampler;\n \nfn getTimeInfo(animationSpeed : f32, timeVec : ptr>)\n{\n\tvar time = Scene.uFrameNumber * animationSpeed;\n\ttime = floor(30.0 * time);\n\tvar time_diff = floor(time*0.25);\n\t//time = mod(time, 4.0);\n\ttime = (time - (4.0 * floor(time / 4.0)));\n\t//time_diff = mod(time_diff, 4.0);\n\ttime_diff = (time_diff - (4.0 * floor(time_diff / 4.0)));\n\t(*timeVec) = vec2(time, time_diff);\n}\n\nfn getPosInfo(posMC : vec4, posMC_frac1 : ptr>, posMC_frac2 : ptr>)\n{\n\tvar ripple_scale = 1.0 / Layer.uRippleScale;\n\tvar posXY = posMC.xy * ripple_scale;\n\t(*posMC_frac1) = fract(posXY);\n\tvar posStep = vec2(0.5);\n\t(*posMC_frac2) = fract(posXY + posStep);\n}\n\nfn getAlpha(posMC_frac1 : vec2) -> f32\n{\n\tvar dist = (posMC_frac1 - vec2(0.5)) * 2.0;\n\tdist = vec2(abs(dist.x), abs(dist.y));\n\tvar result = pow(dist, vec2(5.0));\n\treturn result.x + result.y;\n}\n\nfn getRippleValue(timeVec : vec2, posMC_frac1 : vec2, posMC_frac2 : vec2, alpha : f32) -> vec4\n{\n\tvar rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n\tvar rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n\tvar rippleValue_1 = textureSample(uRippleTexture, uRippleTextureSampler, rippleUV_1.xy);\n\tvar rippleValue_2 = textureSample(uRippleTexture, uRippleTextureSampler, rippleUV_2.xy);\n\treturn mix(rippleValue_1, rippleValue_2, alpha);\n}\n\nfn getRippleNormal(rippleValue : vec4, wind_intensity : f32, rain : f32, depthFade : f32) -> vec3\n{\n\tvar rippleValueXY = rippleValue.xy;\n\tvar rippleValueZW = rippleValue.zw;\n\tvar _value = vec2(0.5);\n\tvar part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n\tvar part_2 = (rippleValueXY - _value) * 0.6;\n\tvar mergedValue = mix(part_1, part_2, rain) * depthFade;\n\treturn vec3(mergedValue, 1.0);\n}\n\nfn getNormalAlpha(normalWS : vec3, wetness : f32) -> f32\n{\n\tvar valueZ = normalWS.z - 0.5;\n\tvar wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n\treturn pow(wet_correction, 15.0);\n}\n\nfn rippleNormalCorrection(rippleNormal : vec3, normalAlpha : f32) -> vec3\n{\n\tvar blueNormal = vec3(0.0, 0.0, 1.0);\n\treturn mix(blueNormal, rippleNormal, normalAlpha);\n}\n\nfn rippleGenerator(animationSpeed : f32,normalWS : vec3, wetness : f32) -> vec3\n{\n\tvar timeVec = vec2(1.0);\n\tgetTimeInfo(animationSpeed, &timeVec);\n\tvar posMC_frac1 = vec2(1.0);\n\tvar posMC_frac2 = vec2(1.0);\n\tgetPosInfo(vPositionMC, &posMC_frac1, &posMC_frac2);\n\tvar alpha = getAlpha(posMC_frac1);\n\tvar rippleValue = getRippleValue(timeVec, posMC_frac1, posMC_frac2, alpha);\n\tvar rippleNormal = getRippleNormal(rippleValue, Layer.uWindIntensity, Layer.uRain, Layer.uCameraDepth);\n\tvar normalAlpha = getNormalAlpha(normalWS, wetness);\n\treturn normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\n#endif\n",snowDecl="\n#ifdef HAS_SNOW\n\nvar uSnowMaskTexture : texture_2d;\nvar uSnowMaskTextureSampler : sampler;\n\nvar uSnowNormalTexture : texture_2d;\nvar uSnowNormalTextureSampler : sampler;\n\n// fn getSnowMaskValue(sampler2D uSnowMaskTexture, vec2 snowUV) -> vec3\n// {\n// \treturn textureSample(uSnowMaskTexture, uSnowMaskTextureSampler, snowUV).rgb;\n// }\n\nfn getSnowCoverage(snow_coverage : f32, max_snow_coverage : f32, normalWS : vec3, z_mask : f32) -> f32\n{\n\tvar normal_z = normalWS.z;\n\tnormal_z += 1.1 + z_mask;\n\tnormal_z = clamp(normal_z * 0.5, 0.0, 1.0);\n\tvar final_snow_coverage = clamp(snow_coverage, 0.0, max_snow_coverage);\n\tfinal_snow_coverage = clamp(final_snow_coverage*normal_z, 0.0, 1.0);\n\treturn final_snow_coverage;\n}\n\nfn getSnowCoverageWithMaskTexture(finalSnowCoverage : f32, heightValue : f32, snow_scatter_value : f32, snow_scatter_alpha : f32, tighten_value : f32) -> f32\n{\n\tvar scatter_value = mix(heightValue, snow_scatter_value, snow_scatter_alpha);\n\treturn clamp((tighten_value + 1.0) * finalSnowCoverage - tighten_value * scatter_value, 0.0, 1.0);\n}\n\nfn getSnowAlpha(normalWS : vec3, snow_coverage : f32, z_mask : f32) -> f32\n{\n\treturn clamp((normalWS.z + z_mask) * 5.0, 0.0, 1.0) * snow_coverage;\n}\n\nfn getFinalBaseColor(baseColor : vec3, snow_baseColor : vec3, snowAlpha : f32) -> vec3\n{\n\treturn mix(baseColor, snow_baseColor, snowAlpha);\n}\n\nfn getFinalRoughness(roughness : f32, snow_roughness : f32, snowAlpha : f32) -> f32\n{\n\treturn mix(roughness, snow_roughness, snowAlpha);\n}\n\nfn getFinalNormal(normalWS : vec3, snowNormal : vec3, blendNormalValue : f32, snow_coverage : f32) -> vec3\n{\n\tvar snowNormal_part2 = vec3(snowNormal.xy - vec2(0.5), 1.0);\n\tvar normal_alpha = (1.0 - blendNormalValue)* snow_coverage;\n\treturn mix(normalWS, snowNormal_part2, normal_alpha);\n}\n\nfn snowGenerator(snowUV : vec2, snow_coverage : f32, normalWS : ptr>, baseColor : ptr>, roughness : ptr)\n{\n\tvar snowMaskValue = textureSample(uSnowMaskTexture, uSnowMaskTextureSampler, snowUV).rgb;\n\tvar max_snow_coverage = 1.0;\n\tvar z_mask = 0.0;\n\tvar snowCoverage = getSnowCoverage(snow_coverage, max_snow_coverage, (*normalWS), z_mask);\n\tvar heightValue = 0.5;\n\tvar snow_scatter_value = snowMaskValue.g;\n\tvar snow_scatter_alpha = 0.5;\n\tvar tighten_value = 4.0;\n snowCoverage = getSnowCoverageWithMaskTexture(snowCoverage, heightValue, snow_scatter_value, snow_scatter_alpha, tighten_value);\n\tvar snow_alpha = getSnowAlpha((*normalWS), snowCoverage, z_mask);\n\t(*baseColor) = getFinalBaseColor((*baseColor), vec3(snowMaskValue.r), snow_alpha);\n\t(*roughness) = getFinalRoughness((*roughness), snowMaskValue.b, snow_alpha);\n\tvar snowNormalValue = textureSample(uSnowNormalTexture, uSnowNormalTextureSampler, snowUV).rgb;\n\tvar blendNormalValue = 0.3;\n\t(*normalWS) = getFinalNormal((*normalWS), snowNormalValue, blendNormalValue, snowCoverage);\n}\n\n#endif\n",directionLightDecl="\n#ifdef HAS_DIR_LIGHTS\n#endif\n",hemisphereLightDecl="\n#ifdef HAS_HEMISPHERE_LIGHTS\n\nuniform uSkyColor : array, HEMISPHERE_LIGHTS>;\nuniform uGroundColor : array, HEMISPHERE_LIGHTS>;\nuniform uHemisphereLightDirectionEC : array, HEMISPHERE_LIGHTS>;\n \nstruct HemisphereLight {\n direction : vec3;\n skyColor : vec3;\n groundColor : vec3;\n};\n\nfn getHemisphereLightIrradiance(hemiLight : HemisphereLight, geometry : GeometricContext) -> vec3{\n var dotNL = dot( geometry.normal, hemiLight.direction );\n var hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n var irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n}\n\n#endif\n",pointLightDecl="\n#ifdef HAS_POINT_LIGHTS\nstruct PointLight {\n position : vec3,\n color : vec3,\n distance : f32,\n decay : f32\n};\n\nfn getPointDirectLightIrradiance(pointLight : PointLight, geometry : GeometricContext, directLight : ptr) {\n var lVector = pointLight.position - geometry.position;\n (*(directLight)).direction = normalize( lVector );\n var lightDistance = length( lVector );\n (*(directLight)).color = pointLight.color;\n (*(directLight)).color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n var color = (*directLight).color;\n if(lightDistance < pointLight.distance){\n (*(directLight)).visible = true;\n }\n else{\n (*(directLight)).visible = false;\n }\n}\n\n#endif\n",spotLightDecl="\n#ifdef HAS_SPOT_LIGHTS\nstruct SpotLight {\n position : vec3;\n direction : vec3;\n color : vec3;\n distance : f32;\n decay : f32;\n coneCos : f32;\n penumbraCos : f32;\n};\n\nfn getSpotDirectLightIrradiance( spotLight : SpotLight, geometry : GeometricContext, directLight : ptr) {\n var lVector = spotLight.position - geometry.position;\n (*(directLight)).direction = normalize( lVector );\n var lightDistance = length( lVector );\n var angleCos = dot( directLight.direction, spotLight.direction );\n if ( angleCos > spotLight.coneCos ) {\n var spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n (*(directLight)).color = spotLight.color;\n (*(directLight)).color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n (*(directLight)).visible = true;\n } else {\n (*(directLight)).color = vec3( 0.0 );\n (*(directLight)).visible = false;\n }\n}\n\n#endif\n",lightSourceImpl="\n\nvar i= 0;\n#ifdef HAS_DIR_LIGHTS\nfor (i = 0; i < Light.uDirLightCount; i++) {\n directLight.color = Light.uDirectionalLightColor[i];\n directLight.direction = Light.uDirectionalLightDirectionEC[i];\n directLight.visible = true;\n directPhysical( directLight, geometry, material, &reflectedLight );\n}\n#endif\n\n#ifdef HAS_POINT_LIGHTS\nvar pointLight : PointLight;\nfor (i = 0; i < Light.uPointLightCount; i++) {\n pointLight.position = Light.uPointLightPositionEC[i];\n pointLight.color = Light.uPointLightColor[i];\n pointLight.distance = Light.uPointLightDistanceAndDecay[i].x;\n pointLight.decay = Light.uPointLightDistanceAndDecay[i].y;\n getPointDirectLightIrradiance( pointLight, geometry, &directLight );\n if(!directLight.visible) {\n continue;\n }\n directPhysical( directLight, geometry, material, &reflectedLight );\n}\n#endif\n\n#ifdef HAS_SPOT_LIGHTS\nvar spotLight : SpotLight;\nfor (i = 0; i < Light.uSpotLightCount; i++) {\n spotLight.position = Light.uSpotLightPositionEC[i];\n spotLight.color = Light.uSpotLightColorAndExponent[i].rgb;\n spotLight.direction = Light.uSpotLightDirectionEC[i];\n spotLight.coneCos = Light.uSpotLightDistanceDecayCosPenumbra[i].z;\n spotLight.penumbraCos = Light.uSpotLightDistanceDecayCosPenumbra[i].w;\n getSpotDirectLightIrradiance( spotLight, geometry, &directLight );\n if(!directLight.visible) {\n continue;\n }\n directPhysical( directLight, geometry, material, &reflectedLight );\n}\n#endif\n",brdf="\n const RECIPROCAL_PI = 0.31830988618;\n const M_PI = 3.141592653589793;\n const EPSILON = 1e-6;\n\n fn pow2( x : f32 ) -> f32 { return x * x; }\n\n#ifdef HAS_BASE_TEXTURE\n var uBaseTexture : texture_2d;\n var uBaseTextureSampler : sampler;\n#endif\n\n#ifdef HAS_NORMAL_TEXTURE\n var uNormalTexture : texture_2d;\n var uNormalTextureSampler : sampler;\n#endif // HAS_NORMAL_TEXTURE\n\n#ifdef HAS_EMISSIVE_TEXTURE\n var uEmissionTexture : texture_2d;\n var uEmissionTextureSampler : sampler;\n#endif\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n var uMetallicRoughnessTexture : texture_2d;\n var uMetallicRoughnessTextureSampler : sampler;\n#endif // HAS_MetallicRoughness_TEXTURE\n\n#ifdef HAS_OCCLUSION_TEXTURE\n var uOcclusionTexture : texture_2d;\n var uOcclusionTextureSampler : sampler;\n#endif\n\n#ifdef HAS_WETNESS\n uniform float uWetnessFactor;\n#endif\n\n#include \n#include \n#include \n#include \n#include \n\nfn lambertianDiffuse(diffuseColor : vec3) -> vec3\n{\n return diffuseColor * RECIPROCAL_PI;\n}\n\nfn applyTonemapping(inLinearIn : vec3) -> vec3 \n{\n var linearIn = inLinearIn;\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\n\nfn F_Schlick(f0 : vec3, f90 : f32, dotVH : f32) -> vec3\n {\n var fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\n\n\nfn GeometrySchlickGGX(roughness : f32, NoV : f32)->f32\n{\n var k = pow(roughness + 1.0, 2.0) / 8.0;\n return NoV / (NoV * (1.0 - k) + k);\n}\n\nfn D_GGX( alpha : f32, dotNH : f32 ) ->f32\n{\n var a2 = pow2( alpha );\n var denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n\nfn BRDF_GGX(lightDir : vec3, viewDir : vec3, normal : vec3, f0 : vec3, f90 : f32, roughness : f32 ) -> vec3\n{\n var alpha = roughness * roughness;\n var halfDir = normalize( lightDir + viewDir );\n var dotNL = clamp( dot( normal, lightDir ), 0.001, 1.0 );\n var dotNV = abs( dot( normal, viewDir ) ) + 0.001;\n var dotNH = saturate( dot( normal, halfDir ) );\n var dotLH = saturate( dot( lightDir, halfDir ) );\n var dotVH = saturate( dot( viewDir, halfDir ) );\n var F = F_Schlick( f0, f90, dotVH );\n var G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n var D = D_GGX( alpha, dotNH );\n return F * ( G * D ) / (4.0 * dotNL * dotNV);\n}\n\nfn directPhysical(directLight : IncidentLight, geometry : GeometricContext, material : PhysicalMaterial, reflectedLight : ptr )\n {\n var dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n var irradiance = dotNL * directLight.color;\n (*(reflectedLight)).directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n (*(reflectedLight)).directDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n}\n\n#ifdef HAS_NORMAL_TEXTURE\nfn perturbNormal2Arb( eye_pos : vec3, surf_norm : vec3, uv : vec2, mapN : vec3) -> vec3\n{\n var fNormalLength = length(mapN);\n var q0 = vec3( dpdx( eye_pos.x ), dpdx( eye_pos.y ), dpdx( eye_pos.z ) );\n var q1 = vec3( dpdy( eye_pos.x ), dpdy( eye_pos.y ), dpdy( eye_pos.z ) );\n var st0 = dpdx( uv.xy );\n var st1 = dpdy( uv.xy );\n if(fNormalLength < 0.5) {\n return surf_norm;\n }\n var scale = sign( st1.y * st0.x - st0.y * st1.x );\n var S = normalize( ( q0 * st1.y - q1 * st0.y ) * scale );\n var T = normalize( ( - q0 * st1.x + q1 * st0.x ) * scale );\n var N = normalize( surf_norm );\n var tsn = mat3x3( S, T, N );\n\n var tempN = mapN * 2.0 - 1.0;\n var flip = f32( gl_FrontFacing ) * 2.0 - 1.0;\n var normMapN = vec3(tempN.x * flip, tempN.y * flip, tempN.z);\n return normalize( tsn * normMapN );\n}\n#endif\n\nfn computeSpecularOcclusion(dotNV : f32, ambientOcclusion : f32, roughness : f32) -> f32\n{\n return saturate(pow(dotNV + ambientOcclusion, exp2(-16.0 * roughness - 1.0 )) - 1.0 + ambientOcclusion);\n}\n\n#ifdef HAS_RAIN\nfn adjustByWetness(baseColor : ptr>, roughness : ptr, normalWS_wetness : vec3) {\n var fWetness = clamp(Layer.uWetnessFactor,0.0,1.0);\n var fWetness_correction = pow(4.0*fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction,clamp(fWetness,0.0,0.9),1.0);\n var fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n (*baseColor) = mix((*baseColor),(*baseColor)*0.7,fWerness_normalized);\n (*roughness) = mix((*roughness),0.05,fWerness_normalized);\n}\n#endif\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n#ifdef USE_BatchPBR\n varying vMetallicRoughness : vec2;\n varying vEmissiveFactor : vec4;\n varying vAlphaCutoffAndModeAndDoubleSide : vec3;\n#endif\n\n#ifdef PBR_THEME\n uniform uPBRMaterials : mat4x4[NUM_PBR_MATERIALS];\n varying vPBRIndex : f32;\n#endif\n\nfn getRoughness(oriTexCoord : vec2) -> f32{\n var roughness = Material.uMetallicRoughnessIntensityScale.y;\n#ifdef USE_BatchPBR\n roughness = vMetallicRoughness.y;\n#endif // USE_BatchPBR\n roughness = clamp(roughness, 0.0, 1.0);\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n var metallicRoughness = textureSample(uMetallicRoughnessTexture, uMetallicRoughnessTextureSampler, oriTexCoord.xy).rgb;\n roughness = clamp(roughness * metallicRoughness.g, 0.04f, 1.0f);\n #ifdef HAS_RAIN\n adjustByWetness(vec3(1.0), roughness, vec3(0.0));\n #endif\n#endif // HAS_MetallicRoughness_TEXTURE\n return roughness;\n}\n\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\nfn getTexcoordAndMipmapLevel(uv : vec2, texMatrix : vec4, texCoordZ : f32) -> vec3 {\n var translate = texMatrix.xy;\n var textureWidth = texMatrix.z * Material.uPbrParTextureWidth;\n var scale = texMatrix.z;\n var maxMipmapLevel = texMatrix.w;\n var mipLevel = 0.0;\n calculateMipLevel(uv, vec2(textureWidth), maxMipmapLevel, &mipLevel);\n var texCoord : vec2;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n var offset = pow(2.0, mipLevel) / textureWidth;\n texCoord = clamp(texCoord, vec2(offset), vec2(1.0 - offset));\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n return vec3(texCoord.xy, mipLevel);\n}\n#endif\n\nfn brdf(inBaseColorWithAlpha : vec4, texCoord : vec2, oriTexCoord : vec2, posEC : vec3, posMC : vec4, vertexNormalEC : vec3) ->vec4 {\n var uv = oriTexCoord;\n var mipmapLevel = 0.0;\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\n var uvAndMiplevel = getTexcoordAndMipmapLevel(oriTexCoord, vTexMatrix, vTexCoordZ.x);\n uv = uvAndMiplevel.xy;\n mipmapLevel = uvAndMiplevel.z;\n #endif\n\n var baseColorWithAlpha = inBaseColorWithAlpha;\n#ifndef USE_BatchPBR\n baseColorWithAlpha = baseColorWithAlpha * Material.uBaseColorFactor;\n#endif\n\n var faceDirection : f32;\n if(gl_FrontFacing){\n faceDirection = 1.0;\n } \n else {\n faceDirection = -1.0;\n }\n\n var ng : vec3 = normalize(vertexNormalEC);\n #ifndef HAS_NORMAL\n ng = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(posMC.xyz));\n #endif\n \n ng = ng * faceDirection;\n#ifdef HAS_BASE_TEXTURE\n #ifdef USE_BatchPBR\n baseColorWithAlpha *= sRGBToLinear(textureSampleLevel(uBaseTexture, uBaseTextureSampler, uv.xy, mipmapLevel));\n #else\n baseColorWithAlpha = textureSample(uBaseTexture, uBaseTextureSampler, oriTexCoord.xy);\n baseColorWithAlpha = sRGBToLinear(baseColorWithAlpha) * Material.uBaseColorFactor;\n #endif\n#endif\n#ifdef HAS_NORMAL_TEXTURE\n #ifdef USE_BatchPBR\n var mapN = textureSampleLevel(uNormalTexture, uNormalTextureSampler, uv.xy, mipmapLevel).xyz;\n #else\n var mapN = textureSample(uNormalTexture, uNormalTextureSampler, uv).xyz;\n #endif\n var n = ng;\n var oriNg = perturbNormal2Arb(posEC, ng, oriTexCoord, mapN);\n if(!(oriTexCoord.x == 0.0 && oriTexCoord.y == 0.0)){\n var n = oriNg;\n }\n#else\n var n = ng;\n#endif\n\n#ifdef HAS_WETNESS\n var fixedToENU_wetness = mat3x3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n var normalWS_wetness = normalize(fixedToENU_wetness * n);\n#endif\n#ifdef HAS_RAIN\n var modelView = Scene.uView * Mesh.uModelMatrix;\n var fixedToENU_wetness = mat3x3(modelView[0][0], modelView[1][0], modelView[2][0], modelView[0][1], modelView[1][1], modelView[2][1], modelView[0][2], modelView[1][2], modelView[2][2]);\n var normalWS_wetness = normalize(fixedToENU_wetness * n);\n n = rippleGenerator(Layer.uAnimationSpeed,normalWS_wetness,Layer.uWetnessFactor);\n#endif\n\n var baseColor = baseColorWithAlpha.rgb;\n var roughness = Material.uMetallicRoughnessIntensityScale.y;\n var metalness = Material.uMetallicRoughnessIntensityScale.x;\n var emissiveFactor = Material.uEmissiveFactor;\n\n // TODO\n// #ifdef PBR_THEME\n// var pbrIndex = int(vPBRIndex);\n// if(vPBRIndex < 0.0f)\n// {\n// return baseColorWithAlpha;\n// }\n// var pbrPar = mat4x4(0.0f);\n// for(var i = 0;i < NUM_PBR_MATERIALS;i++)\n// {\n// if(i == pbrIndex)\n// {\n// pbrPar = uPBRMaterials[i];\n// break;\n// }\n// }\n// roughness = clamp(pbrPar[0][0], 0.04f, 1.0f);\n// metalness = clamp(pbrPar[0][1], 0.0f, 1.0f);\n// baseColor = (baseColorWithAlpha / Material.uBaseColorFactor * vec4(pbrPar[0][2], pbrPar[0][3], pbrPar[1][0], pbrPar[1][1])).rgb;\n// #endif // PBR_THEME\n\n#ifdef USE_BatchPBR\n metalness = vMetallicRoughness.x;\n roughness = vMetallicRoughness.y;\n emissiveFactor = vEmissiveFactor;\n#endif // USE_BatchPBR\n metalness = clamp(metalness, 0.0, 1.0);\n roughness = clamp(roughness, 0.04, 1.0);\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n#ifdef USE_BatchPBR\n var metallicRoughness = textureSampleLevel(uMetallicRoughnessTexture, uMetallicRoughnessTextureSampler, uv, mipmapLevel).rgb;\n#else\n var metallicRoughness = textureSample(uMetallicRoughnessTexture, uMetallicRoughnessTextureSampler, oriTexCoord.xy).rgb;\n#endif\n metalness = clamp(metallicRoughness.r, 0.0f, 1.0f);\n roughness = clamp(metallicRoughness.g, 0.04f, 1.0f);\n #ifdef HAS_RAIN\n adjustByWetness(&baseColor, &roughness, normalWS_wetness);\n #endif\n #ifdef HAS_SNOW\n var modelView = Scene.uView * Mesh.uModelMatrix;\n var fixedToENU_snow = mat3x3(modelView[0][0], modelView[1][0], modelView[2][0], modelView[0][1], modelView[1][1], modelView[2][1], modelView[0][2], modelView[1][2], modelView[2][2]);\n var normalWS_snow = normalize(fixedToENU_snow * n);\n snowGenerator(oriTexCoord,Layer.uSnowCoverageFactor,&normalWS_snow,&baseColor,&roughness);\n #endif\n#endif // HAS_MetallicRoughness_TEXTURE\n\n var lightColorHdr = vec3(2.0) * Light.uSunLightColor.rgb * Light.uSunLightON;\n var l = normalize(Light.uSunDirectionEC);\n var v = -normalize(posEC);\n var h = normalize(v + l);\n var f0 = vec3(0.04);\n var diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n var specularColor = mix(f0, baseColor, metalness);\n\n var alpha = roughness * roughness;\n var dotNL = clamp( dot( n, l ), 0.001, 1.0 );\n var dotNV = abs( dot( n, v ) ) + 0.001;\n var dotNH = saturate( dot( n, h ) );\n var dotLH = saturate( dot( l, h ) );\n var dotVH = saturate( dot( v, h ) );\n var reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n var f90 = clamp(reflectance * 25.0, 0.0, 1.0);\n var F = F_Schlick( specularColor, f90, dotVH );\n var G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n var D = D_GGX( alpha, dotNH );\n var diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n var specularContribution = F * G * D / (4.0 * dotNL * dotNV);\n\n var geometryNormal = ng;\n var material : PhysicalMaterial;\n material.diffuseColor = diffuseColor;\n material.roughness = max( roughness, 0.0525 );\n material.roughness = min( material.roughness, 1.0 );\n material.specularColor = specularColor;\n material.specularF90 = 1.0;\n\n var geometry : GeometricContext;\n geometry.position = posEC;\n geometry.normal = n;\n geometry.viewDir = v;\n var reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += dotNL * lightColorHdr * diffuseContribution;\n reflectedLight.directSpecular += dotNL * lightColorHdr * specularContribution;\n\n var directLight : IncidentLight; \n #include \n\n getEnvironmentColor(geometry, material, &reflectedLight);\n\n#ifdef HAS_OCCLUSION_TEXTURE\n #ifdef USE_BatchPBR\n var ambientOcclusion = textureSampleLevel(uOcclusionTexture, uOcclusionTextureSampler, uv, mipmapLevel).r;\n #else\n var ambientOcclusion = textureSample(uOcclusionTexture, uOcclusionTextureSampler, oriTexCoord.xy).r;\n #endif\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n#ifdef IBL\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n#endif\n#endif // HAS_OCCLUSION_TEXTURE\n\n var shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), n, -posEC.z);\n#endif\n\n var color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n\n#ifdef HAS_EMISSIVE_TEXTURE\n var emissiveTexCoord = uv * Material.uEmissiveUVOffsetAndTiling.zw + Material.uEmissiveUVOffsetAndTiling.xy;\n var emissive = sRGBToLinear_vf3(textureSample(uEmissionTexture, uEmissionTextureSampler, emissiveTexCoord).rgb);\n emissive *= emissiveFactor.rgb;\n color += emissive;\n#else\n color += emissiveFactor.rgb;\n#endif // HAS_EMISSIVE_TEXTURE\n\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n\n #ifdef MASK\n if (baseColorWithAlpha.a < Material.uAlphaCutoff)\n {\n discard;\n }\n#endif\n return vec4(color.rgb, baseColorWithAlpha.a);\n}",S3MVertexFactory="\n\n#ifdef COMPRESS_VERTEX\n #ifdef DRACO_Compress\n attribute aPosition : vec4;\n #else\n attribute aPosition : vec4;\n #endif\n#else\n attribute aPosition : vec4;\n#endif\n\n#ifdef HAS_NORMAL\n #ifdef COMPRESS_NORMAL \n #ifdef MeshOPT_Compress\n attribute aNormal : vec2;\n #else\n attribute aNormal : vec3;\n #endif\n #else\n attribute aNormal : vec3;\n #endif\n#endif\n\n#ifdef TexCoord\n #ifdef UINT_TEXCOORD0\n attribute aTexCoord0 : vec2;\n #else\n attribute aTexCoord0 : vec4;\n #endif\n#endif\n\n#ifdef TexCoord2\n #ifdef USE_BatchPBR\n attribute aTexCoord1 : vec2;\n #else\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n attribute aTexCoord1 : vec2;\n #else\n attribute aTexCoord1 : vec2;\n #endif\n #else\n attribute aTexCoord1 : vec4;\n #endif //COMPRESS_TEXCOORD\n #endif //USE_BatchPBR\n#endif\n\n#ifdef VertexColor\n attribute aColor : vec4;\n#endif\n\n#ifdef InstanceRenderBIM\n attribute uv2 : vec4;\n attribute uv3 : vec4;\n attribute uv4 : vec4;\n attribute secondary_colour : vec4;\n //attribute uv6 : vec4;\n#endif\n\n#ifdef InstanceRenderPipeline\n attribute uv1 : vec4;\n attribute uv2 : vec4;\n attribute uv3 : vec4;\n attribute uv4 : vec4;\n attribute uv5 : vec4;\n attribute uv6 : vec4;\n attribute uv7 : vec4;\n // 新版本的管线\n #ifdef InstanceS3MB\n attribute secondary_colour : vec4;\n attribute uv9 : vec4;\n #else\n attribute secondary_colour : vec4;\n attribute uv9 : vec4;\n #endif\n#endif\n\n#ifdef BatchTable\n #ifdef Instance\n #ifdef InstanceModel\n attribute batchId : f32;\n #endif\n attribute instanceId : f32;\n #else\n attribute batchId : f32;\n #endif\n#endif // BatchTable\n\n#ifdef UseInstanceSkeletonMatrix\n //uniform uSkeletonMatrix : mat4x4;\n#endif\n\nstruct VertexFactoryIntermediates {\n position : vec4,\n vertexColor : vec4,\n secondColor : vec4,\n normal : vec3,\n normalInstance : vec3,\n uv0 : vec4,\n uv1 : vec4,\n batchTableID : f32,\n pbrTextureUV : vec2,\n }\n\nfn GetLocalPosition() -> vec4{\n#ifdef COMPRESS_VERTEX\n var iAPosition = vec4(aPosition);\n var vertexPos : vec4;\n vertexPos = Mesh.decode_position_min + vec4(iAPosition.xyz, 1.0f) * Mesh.decode_position_normConstant;\n#else\n var vertexPos = aPosition;\n#endif\n return vertexPos;\n}\n\nfn GetUV0() ->vec4 {\n var result = vec4(0.0f);\n#ifdef TexCoord\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n var texCoord0 : vec2;\n texCoord0.x = f32(aTexCoord0.x) * f32(Mesh.decode_texCoord0_vNormConstant.x);\n texCoord0.y = f32(aTexCoord0.y) * f32(Mesh.decode_texCoord0_vNormConstant.y);\n result = vec4(vec2(Mesh.decode_texCoord0_min) + texCoord0.xy, 0.0f, 0.0f);\n #else\n result.xy = vec2(Mesh.decode_texCoord0_min.xy) + vec2(aTexCoord0.xy) * Mesh.decode_texCoord0_normConstant;\n #endif\n #else // COMPRESS_TEXCOORD\n result = aTexCoord0;\n #endif // COMPRESS_TEXCOORD\n \n #ifdef InstanceRenderPipeline\n var tex4Vec:vec4;\n if(aTexCoord0.y > 0.5) {\n tex4Vec = vec4(uv7.y, aTexCoord0.x, 0.0, 1.0);\n }\n else {\n tex4Vec = vec4(uv7.x, aTexCoord0.x, 0.0, 1.0);\n }\n result.x = tex4Vec.x;\n result.y = tex4Vec.y;\n #endif\n#endif // TexCoord\n\n return Material.uTexMatrix * result;\n}\nfn GetUV1() ->vec4{\n var result = vec4(0.0f);\n#ifdef TexCoord2\n #ifdef USE_BatchPBR\n result.x = aTexCoord1.x;\n result.y = aTexCoord1.y;\n #else\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n var texCoord1 :vec2;\n texCoord1.x = f32(aTexCoord1.x) * Mesh.decode_texCoord1_vNormConstant.x;\n texCoord1.y = f32(aTexCoord1.y) * Mesh.decode_texCoord1_vNormConstant.y;\n result = vec4(Mesh.decode_texCoord1_min + texCoord1.xy, 0.0f, 0.0f);\n #else\n result.x = Mesh.decode_texCoord1_min.x + aTexCoord1.x * Mesh.decode_texCoord1_normConstant.x;\n result.y = Mesh.decode_texCoord1_min.y + aTexCoord1.y * Mesh.decode_texCoord1_normConstant.y;\n #endif // MeshOPT_Compress\n #else\n result = aTexCoord1;\n #endif // COMPRESS_TEXCOORD\n #endif\n#endif // TexCoord2\n return result;\n}\nfn GetNormal() ->vec3 {\n#ifdef HAS_NORMAL\n var realNormal : vec3;\n #ifdef COMPRESS_NORMAL\n var fANormal = vec2(aNormal.xy);\n #ifdef MeshOPT_Compress\n realNormal.x = fANormal.x / 127.0f;\n realNormal.y = fANormal.y / 127.0f;\n realNormal.z = 1.0f - abs(realNormal.x) - abs(realNormal.y);\n realNormal = normalize(realNormal);\n #else\n realNormal = czm_octDecode(fANormal.xy, Mesh.normal_rangeConstant).zxy;\n #endif // MeshOPT_Compress\n #else\n realNormal = aNormal;\n #endif // COMPRESS_NORMAL \n \n #ifdef InstanceRenderPipeline\n realNormal.x = realNormal.x * uv7.z;\n #endif\n return realNormal;\n#else\n return vec3(0.0f, 0.0f, 0.0f);\n#endif // HAS_NORMAL \n}\n\nfn GetVertexFactoryIntermediates() -> VertexFactoryIntermediates {\n var intermediates : VertexFactoryIntermediates;\n var vertexPos = GetLocalPosition();\n\n#ifdef UseInstanceSkeletonMatrix\n vertexPos = Mesh.uSkeletonMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n \n#ifdef InstanceRenderBIM\n var worldMatrix:mat4x4;\n worldMatrix[0] = uv2;\n worldMatrix[1] = uv3;\n worldMatrix[2] = uv4;\n worldMatrix[3] = vec4( 0, 0, 0, 1 );\n vertexPos = vec4(vertexPos.xyz, 1.0) * worldMatrix;\n#endif\n\n#ifdef InstanceRenderPipeline\n var worldMatrix:mat4x4;\n var worldMatrix0:mat4x4;\n var worldMatrix1:mat4x4;\n var worldPos0:vec4;\n var worldPos1:vec4;\n worldMatrix0[0] = uv1;\n worldMatrix0[1] = uv2;\n worldMatrix0[2] = uv3;\n worldMatrix0[3] = vec4( 0, 0, 0, 1 );\n worldMatrix1[0] = uv4;\n worldMatrix1[1] = uv5;\n worldMatrix1[2] = uv6;\n worldMatrix1[3] = vec4( 0, 0, 0, 1 );\n var realVertex = vec4(vertexPos.xyz, 1.0);\n realVertex.x = realVertex.x * uv7.z;\n worldPos0 = realVertex * worldMatrix0;\n worldPos1 = realVertex * worldMatrix1;\n #ifdef TexCoord\n if(aTexCoord0.y > 0.5) {\n vertexPos = worldPos1;\n worldMatrix = worldMatrix1;\n }\n else {\n vertexPos = worldPos0;\n worldMatrix = worldMatrix0;\n }\n #endif\n#endif\n\n intermediates.position = vertexPos;\n intermediates.normal = GetNormal();\n#ifdef Instance\n intermediates.normalInstance = intermediates.normal * mat3x3(worldMatrix[0].xyz,worldMatrix[1].xyz,worldMatrix[2].xyz);\n#endif\n intermediates.uv0 = GetUV0();\n intermediates.uv1 = GetUV1();\n \n#ifdef VertexColor\n var fColor = vec4(aColor);\n intermediates.vertexColor = vec4(fColor.r / 255.0f, fColor.g / 255.0f, fColor.b / 255.0f, fColor.a / 255.0f);\n#else\n intermediates.vertexColor = vec4(1.0);\n#endif\n\n#ifdef Instance\n #ifdef InstanceRenderPipeline\n #ifdef InstanceS3MB\n var fSecondary = vec4(secondary_colour);\n intermediates.vertexColor *= vec4(fSecondary.r / 255.0f, fSecondary.g / 255.0f, fSecondary.b / 255.0f, fSecondary.a / 255.0f);\n #else\n intermediates.vertexColor *= vec4(secondary_colour);\n #endif\n #else\n intermediates.vertexColor *= vec4(secondary_colour);\n #endif\n#endif\n\n#ifdef BatchTable\n #ifdef Instance\n var index = instanceId;\n #else\n var index = batchId;\n #endif\n \n #ifdef InstanceModel\n index = instanceId * Mesh.uSkeletonCount + batchId;\n #endif\n intermediates.batchTableID = index;\n#endif\n\n#ifdef USE_BatchPBR\n intermediates.pbrTextureUV.x = f32(aTexCoord1.x);\n intermediates.pbrTextureUV.y = f32(aTexCoord1.y);\n#endif\n return intermediates;\n}\n",getUVMatrixDecl="\n#ifdef TexCoord\n varying vTexCoordZ : vec2;\n#endif\n\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef USE_TextureCoordMatrix\n attribute aTextureCoordMatrix : vec2;\n#endif\n\n#ifdef TextureBatch\n #ifdef MULTI_TEX\n attribute aTextureBatchId : vec2;\n\n fn getTextureBatchId0(att : vec2) -> f32\n {\n return att.x;\n }\n fn getTextureBatchId1(att : vec2) ->f32 \n {\n return att.y;\n }\n #else\n attribute aTextureBatchId : f32;\n\n fn getTextureBatchId0(att : f32) -> f32\n {\n return att;\n }\n #endif // MULTI_TEX \n varying vTexTran : vec4;\n varying vTexScale : vec4;\n varying vTexSize : vec4;\n varying vMaxMipLevel : vec2;\n fn getTextureParameter(xywh : vec4, textureDim : vec2, translate : ptr>, scale : ptr>, texSize : ptr>, \n maxMipLevel : ptr)\n {\n var width = xywh.z;\n var height = xywh.w;\n width *= 2.0 / 3.0;\n (*maxMipLevel) = log2(min(width, height));\n var tempScale : vec2;\n tempScale.x = width / textureDim.x;\n tempScale.y = height / textureDim.y;\n (*scale) = tempScale;\n var tempTranslate : vec2;\n tempTranslate.x = xywh.x;\n tempTranslate.y = xywh.y;\n tempTranslate /= textureDim;\n (*translate) = tempTranslate;\n var tempTexSize : vec2;\n tempTexSize.x = width;\n tempTexSize.y = height;\n (*texSize) = tempTexSize;\n }\n \n fn getUVMatrixForBatch(xywh : vec4, xywh2 : vec4) {\n if(getTextureBatchId0(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.x = -1.0;\n }\n else\n {\n var outTexTran = vec2(vTexTran.xy);\n var outTexScale = vec2(vTexScale.xy);\n var outTexSize = vec2(vTexSize.xy);\n var outMaxMipLevel = vMaxMipLevel.x;\n getTextureParameter(xywh, Material.uTextureDim.xy, &outTexTran, &outTexScale, &outTexSize, &outMaxMipLevel);\n vTexTran = vec4(outTexTran.x, outTexTran.y, vTexTran.z, vTexTran.w);\n vTexScale = vec4(outTexScale.x, outTexScale.y, vTexScale.z, vTexScale.w);\n vTexSize = vec4(outTexSize.x, outTexSize.y, vTexSize.z, vTexSize.w);\n vMaxMipLevel.x = outMaxMipLevel;\n\n }\n #ifdef MULTI_TEX\n if(getTextureBatchId0(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.y = -1.0;\n }\n else\n {\n var outTexTran = vec2(vTexTran.zw);\n var outTexScale = vec2(vTexScale.zw);\n var outTexSize = vec2(vTexSize.zw);\n var outMaxMipLevel = vMaxMipLevel.y;\n getTextureParameter(xywh2, Material.uTextureDim.zw, &outTexTran, &outTexScale, &outTexSize, &outMaxMipLevel);\n vTexTran = vec4(vTexTran.x, vTexTran.y, outTexTran.x, outTexTran.y);\n vTexScale = vec4(vTexScale.x, vTexScale.y, outTexScale.x, outTexScale.y);\n vTexSize = vec4(vTexSize.x, vTexSize.y, outTexSize.x, outTexSize.y);\n vMaxMipLevel.y = outMaxMipLevel;\n }\n #endif // MULTI_TEX \n }\n#else\n varying vTexMatrix : vec4;\n\n #ifdef TexCoord2\n varying vTexMatrix2 : vec4;\n #endif // TexCoord2\n \nconst SHIFT_LEFT8 = 256.0;\nconst SHIFT_RIGHT8 = 1.0 / 256.0;\nconst SHIFT_RIGHT4 = 1.0 / 16.0;\nconst SHIFT_LEFT4 = 16.0;\n\nfn computeUVMatrixFromZValue(nZ : f32, XTran : ptr, YTran : ptr, scale : ptr, isRGBA : ptr) {\n var nDel8 : f32;\n var nDel16 : f32;\n var nDel20 : f32;\n var nLevel : f32;\n if (nZ <= 0.0f) {\n return;\n }\n nDel8 = floor(nZ * SHIFT_RIGHT8);\n nDel16 = floor(nDel8 * SHIFT_RIGHT8);\n nDel20 = floor(nDel16 * SHIFT_RIGHT4);\n *(isRGBA) = floor(nDel20);\n *(YTran) = nZ - nDel8 * SHIFT_LEFT8;\n *(XTran) = nDel8 - nDel16 * SHIFT_LEFT8;\n nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\n *(scale) = 1.0f / pow(2.0f, nLevel);\n return;\n}\n\nfn getUVMatrix(uv0 : vec4, uv1 : vec4) { \n var param_1 : f32; \n var param_2 : f32; \n var param_3 : f32; \n var param_4 : f32;\n vTexCoordZ.x = uv0.z;\n\n#ifdef USE_TextureCoordMatrix\n vTexCoordZ.x = aTextureCoordMatrix.x;\n#endif // USE_TextureCoordMatrix\n\n vTexMatrix = vec4(0.0f, 0.0f, 1.0f, 0.0f); \n if ((vTexCoordZ.x < -90000.0f)) \n { \n vTexMatrix.z = -1.0f; \n } \n param_1 = vTexMatrix.x; \n param_2 = vTexMatrix.y; \n param_3 = vTexMatrix.z; \n computeUVMatrixFromZValue(floor(vTexCoordZ.x), ¶m_1, ¶m_2, ¶m_3, ¶m_4); \n vTexMatrix.x = param_1; \n vTexMatrix.y = param_2; \n vTexMatrix.z = param_3;\n#ifdef TexCoord2\n vTexMatrix2 = vec4(0.0,0.0,1.0,0.0);\n vTexCoordZ.y = uv1.z;\n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.y = aTextureCoordMatrix.y;\n #endif // USE_TextureCoordMatrix\n param_1 = vTexMatrix2.x; \n param_2 = vTexMatrix2.y; \n param_3 = vTexMatrix2.z; \n computeUVMatrixFromZValue(floor(vTexCoordZ.y), &(param_1), &(param_2), &(param_3), &(param_4));\n vTexMatrix2.x = param_1; \n vTexMatrix2.y = param_2; \n vTexMatrix2.z = param_3;\n#endif // TexCoord2\n vTexMatrix.w = log2((Material.uTextureWidths.x * vTexMatrix.z));\n#ifdef TexCoord2\n vTexMatrix2.w = log2(Material.uTextureWidths.y * vTexMatrix.z);\n#endif // TexCoord2\n return;\n} \n \n#endif\n\n#endif // COMPUTE_TEXCOORD\n",S3MOperationFSDecl="\n#ifdef VISIBLEDISTANCEMAX\nuniform float uVisibleDistanceMax;\nvoid getAlphaByDistance(vec3 positionEC, inout vec4 color) {\n if(length(positionEC) > uVisibleDistanceMax)\n {\n float minAlpha = min(1.0, (length(positionEC) - uVisibleDistanceMax) / 2000.0);\n color.a = 1.0 - minAlpha;\n }\n}\n#endif\n\n#ifdef OVERLAY\nvar uOverlayTexture : texture_2d;\nvar uOverlayTextureSampler : sampler;\nfn getOverlayColor(color : ptr>)\n{\n var ptInRect = 1.0;\n var vertexPos = Mesh.uGeoMatrix * vec4(vPositionMC.xyz, 1.0);\n var uv = calculatePolyTexCoord(vertexPos, Layer.uOverlayRect, &ptInRect);\n if(ptInRect > 0.5)\n {\n var oldColor = vec4((*color).r, (*color).g, (*color).b, (*color).a);\n var overlayColor = textureSampleLevel(uOverlayTexture, uOverlayTextureSampler, uv.xy, 0.0);\n if(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n {\n var mixColor = mix(oldColor, overlayColor, overlayColor.a);\n (*color) = vec4(mixColor.r, mixColor.g, mixColor.b, oldColor.a);\n }\n }\n \n}\n#endif\n\n#ifdef HORIZONTAL_LINE\nuniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}\n#endif\n\n#ifdef IMAGERY\nvarying imgCoord : vec2;\n//uniform sampler2D uImgTexture;\n//uniform float uImgTextureAlpha;\n//uniform vec2 uImgTextureBound;\n//#if TEXTURE_UNITS > 0\nvar u_dayTextures : array, TEXTURE_UNITS>;\nvar u_dayTexturesSampler : sampler;\nuniform u_dayTextureTranslationAndScale : array, TEXTURE_UNITS>;\nuniform u_dayTextureSize : array, TEXTURE_UNITS>;\nuniform u_dayTextureUseWebMercatorT : array;\nuniform u_dayTextureFlipY : array;\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform u_transparentBackColor : array, TEXTURE_UNITS>;\nuniform u_imageryClipEnable : array;\n\n#ifdef APPLY_ALPHA\nuniform u_dayTextureAlpha : array;\n#endif\n\n#ifdef APPLY_SPLIT\nuniform u_dayTextureSplit : array, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_SWIPE\nuniform u_dayTextureSwipeRegion : array, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform u_GlobeSplitDirection : vec2;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform u_GlobeSwipeRegion : vec4;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform u_dayTextureBrightness : array;\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform u_dayTextureContrast : array;\n#endif\n\n#ifdef APPLY_HUE\nuniform u_dayTextureHue : array;\n#endif\n\n#ifdef APPLY_SATURATION\nuniform u_dayTextureSaturation : array;\n#endif\n\n#ifdef APPLY_GAMMA\nuniform u_dayTextureOneOverGamma : array;\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform u_dayTextureCutoutRectangles : array, TEXTURE_UNITS>;\n#endif\n\nuniform u_dayTextureTexCoordsRectangle : array, TEXTURE_UNITS>;\n//#endif\n\nfn getImageryColor(color : ptr>)\n{\n\tvar texcood = vec2(imgCoord.x / Mesh.uImgTextureBound.x, imgCoord.y / Mesh.uImgTextureBound.y);\n#ifdef MULTIBATCH\n\t(*color) = computeDayColor(vec4(1.0,1.0,1.0,0.0), clamp(vec3(texcood,0.0), vec3(0.0), vec3(1.0)));\n#else\n\t(*color) = computeDayColor((*color), clamp(vec3(texcood, 0.0), vec3(0.0), vec3(1.0)));\n#endif\n}\n#endif\n\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nvoid getFloodWaterColor(inout vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n}\n#endif\n\n#ifdef TRANSPARENT_BACK_COLOR\nuniform vec4 uTransparentBackColor;\nuniform float uTransparentBackColorTolerance;\n\nvoid transparentColorClip(vec4 color)\n{\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - color.r);\n float gDiff = abs(uTransparentBackColor.g - color.g);\n float bDiff = abs(uTransparentBackColor.b - color.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n}\n#endif\n",shadowReceive="\n#ifdef USE_CUBE_MAP_SHADOW\n var shadowMap_textureCube : texture_cube;\n var shadowMap_textureCubeSampler : sampler;\n#else\n var shadowMap_texture : texture_2d;\n var shadowMap_textureSampler : sampler;\n #ifdef USE_PCSS\n var u_shadowDepth : texture_depth_2d;\n var u_shadowDepthSampler : sampler_comparison;\n #endif\n#endif\n\n#ifdef HAS_CASCADES\n\nfn cascadeWeights(depthEye : f32) -> vec4\n{\n // One component is set to 1.0 and all others set to 0.0.\n var near = step(Shadow.shadowMap_cascadeSplits[0], vec4(depthEye));\n var far = step(vec4(depthEye), Shadow.shadowMap_cascadeSplits[1]);\n return near * far;\n}\n\nfn cascadeMatrix(weights : vec4) -> mat4x4\n{\n return Shadow.shadowMap_cascadeMatrices[0] * weights.x +\n Shadow.shadowMap_cascadeMatrices[1] * weights.y +\n Shadow.shadowMap_cascadeMatrices[2] * weights.z +\n Shadow.shadowMap_cascadeMatrices[3] * weights.w;\n}\n#endif\n\n#include \n\n// Offset the shadow position in the direction of the normal for perpendicular and back faces\n\nfn applyNormalOffset(positionEC : ptr>, normalEC : vec3, nDotL : f32)\n{\n#ifdef APPLY_NORMAL_OFFSET\n var normalOffset = Shadow.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;\n var normalOffsetScale = 1.0 - nDotL;\n var offset = normalOffset * normalOffsetScale * normalEC;\n var newPositionEC = (*positionEC).xyz + offset;\n var w = (*positionEC).w;\n (*positionEC) = vec4(newPositionEC, w);\n#endif // APPLY_NORMAL_OFFSET\n}\n\nfn getShadowVisibility(inPositionEC : vec4, normalEC : vec3, depth : f32) -> f32\n{\n var positionEC : vec4 = inPositionEC;\n var shadowParameters : czm_shadowParameters;\n shadowParameters.texelStepSize = Shadow.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\n shadowParameters.depthBias = Shadow.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\n shadowParameters.normalShadingSmooth = Shadow.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\n shadowParameters.darkness = Shadow.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\n\n var visibility = 1.0;\n\n #ifdef IS_TERRAIN\n // Scale depth bias based on view distance to reduce z-fighting in distant terrain\n shadowParameters.depthBias *= max(depth * 0.01, 1.0);\n #endif // IS_TERRAIN\n\n shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);\n \n #ifdef USE_CUBE_MAP_SHADOW // POINT_LIGHT\n var directionEC : vec3 = positionEC.xyz - Shadow.shadowMap_lightPositionEC.xyz;\n var distance = length(directionEC);\n directionEC = normalize(directionEC);\n var radius = Shadow.shadowMap_lightPositionEC.w;\n // Stop early if the fragment is beyond the point light radius\n if (distance > radius)\n {\n return visibility;\n }\n var directionWC : vec3 = czm_inverseViewRotation * directionEC;\n \n shadowParameters.depth = distance / radius;\n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n \n shadowParameters.texCoords = directionWC;\n visibility = shadowVisibility(shadowParameters);\n #endif // USE_CUBE_MAP_SHADOW\n \n #ifdef SPOT_LIGHT_SHADOW\n var directionEC = normalize(positionEC.xyz - Shadow.shadowMap_lightPositionEC.xyz);\n var nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n applyNormalOffset(&positionEC, normalEC, nDotL);\n var shadowPosition = Shadow.shadowMap_matrix * positionEC;\n // Spot light uses a perspective projection, so perform the perspective divide\n shadowPosition /= shadowPosition.w;\n \n // Stop early if the fragment is not in the shadow bounds\n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n {\n return visibility;\n }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n \n visibility = shadowVisibility(shadowParameters);\n #endif // SPOT_LIGHT_SHADOW\n \n #ifdef HAS_CASCADES\n var maxDepth = Shadow.shadowMap_cascadeSplits[1].w;\n // Stop early if the eye depth exceeds the last cascade\n if (depth > maxDepth)\n {\n return visibility;\n }\n \n // Get the cascade based on the eye-space depth\n var weights : vec4 = cascadeWeights(depth);\n \n // Apply normal offset\n var nDotL = clamp(dot(normalEC, Shadow.shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(&positionEC, normalEC, nDotL);\n \n var cascadeMatrix : mat4x4;\n var nextCascadeMatrix : mat4x4;\n var csmBlend = false;\n var diffRatio = 0.0;\n var shadowMapIndex = 0.0;\n if(weights.x > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[0];\n nextCascadeMatrix = Shadow.shadowMap_cascadeMatrices[1];\n csmBlend = weights.y > 0.0;\n diffRatio = (depth - Shadow.shadowMap_cascadeSplits[0].y) / (Shadow.shadowMap_cascadeSplits[1].x - Shadow.shadowMap_cascadeSplits[0].y);\n shadowMapIndex = 0.0;\n }\n else if(weights.y > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[1];\n nextCascadeMatrix = Shadow.shadowMap_cascadeMatrices[2];\n csmBlend = weights.z > 0.0;\n diffRatio = (depth - Shadow.shadowMap_cascadeSplits[0].z) / (Shadow.shadowMap_cascadeSplits[1].y - Shadow.shadowMap_cascadeSplits[0].z);\n shadowMapIndex = 1.0;\n }\n else if(weights.z > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[2];\n nextCascadeMatrix = Shadow.shadowMap_cascadeMatrices[3];\n csmBlend = weights.w > 0.0;\n diffRatio = (depth - Shadow.shadowMap_cascadeSplits[0].w) / (Shadow.shadowMap_cascadeSplits[1].z - Shadow.shadowMap_cascadeSplits[0].w);\n shadowMapIndex = 2.0;\n }\n else if(weights.w > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[3];\n shadowMapIndex = 3.0;\n }\n var shadowPosition = cascadeMatrix * positionEC;\n \n // Get visibility\n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n shadowParameters.shadowMapIndex = shadowMapIndex;\n visibility = shadowVisibility(shadowParameters);\n\n if(csmBlend){\n var nextVisibility = 0.0;\n var nextShadowPosition = nextCascadeMatrix * positionEC;\n shadowParameters.texCoords = nextShadowPosition.xy;\n shadowParameters.depth = nextShadowPosition.z;\n shadowParameters.shadowMapIndex = shadowMapIndex + 1.0;\n nextVisibility = shadowVisibility(shadowParameters);\n visibility = mix(visibility, nextVisibility, diffRatio);\n // Draw cascade blend colors for debugging\n //gl_FragColor *= vec4(diffRatio, 0.0, 0.0, 1.0);\n }\n \n // Fade out shadows that are far away\n var shadowMapMaximumDistance = Shadow.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;\n var fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);\n visibility = mix(visibility, 1.0, fade);\n \n visibility = clamp(visibility, 0.0, 1.0);\n\n //// Draw cascade colors for debugging\n //gl_FragColor *= czm_cascadeColor(weights);\n #endif // HAS_CASCADES\n \n #ifdef NO_CASCADES\n var nDotL = clamp(dot(normalEC, Shadow.shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(&positionEC, normalEC, nDotL);\n var shadowPosition = Shadow.shadowMap_matrix * positionEC;\n \n // Stop early if the fragment is not in the shadow bounds\n // if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n // {\n // return visibility;\n // }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n visibility = shadowVisibility(shadowParameters);\n #endif // NO_CASCADES\n\n return visibility;\n}\n",shadowVisibility="\n#ifdef USE_PCSS\nconst PoissonSamplers32 = array, 64>(\n vec3(0.06407013, 0.05409927, 0.),\n vec3(0.7366577, 0.5789394, 0.),\n vec3(-0.6270542, -0.5320278, 0.),\n vec3(-0.4096107, 0.8411095, 0.),\n vec3(0.6849564, -0.4990818, 0.),\n vec3(-0.874181, -0.04579735, 0.),\n vec3(0.9989998, 0.0009880066, 0.),\n vec3(-0.004920578, -0.9151649, 0.),\n vec3(0.1805763, 0.9747483, 0.),\n vec3(-0.2138451, 0.2635818, 0.),\n vec3(0.109845, 0.3884785, 0.),\n vec3(0.06876755, -0.3581074, 0.),\n vec3(0.374073, -0.7661266, 0.),\n vec3(0.3079132, -0.1216763, 0.),\n vec3(-0.3794335, -0.8271583, 0.),\n vec3(-0.203878, -0.07715034, 0.),\n vec3(0.5912697, 0.1469799, 0.),\n vec3(-0.88069, 0.3031784, 0.),\n vec3(0.5040108, 0.8283722, 0.),\n vec3(-0.5844124, 0.5494877, 0.),\n vec3(0.6017799, -0.1726654, 0.),\n vec3(-0.5554981, 0.1559997, 0.),\n vec3(-0.3016369, -0.3900928, 0.),\n vec3(-0.5550632, -0.1723762, 0.),\n vec3(0.925029, 0.2995041, 0.),\n vec3(-0.2473137, 0.5538505, 0.),\n vec3(0.9183037, -0.2862392, 0.),\n vec3(0.2469421, 0.6718712, 0.),\n vec3(0.3916397, -0.4328209, 0.),\n vec3(-0.03576927, -0.6220032, 0.),\n vec3(-0.04661255, 0.7995201, 0.),\n vec3(0.4402924, 0.3640312, 0.),\n\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.)\n);\n\nconst PoissonSamplers64 =array, 64>(\n vec3(-0.613392, 0.617481, 0.),\n vec3(0.170019, -0.040254, 0.),\n vec3(-0.299417, 0.791925, 0.),\n vec3(0.645680, 0.493210, 0.),\n vec3(-0.651784, 0.717887, 0.),\n vec3(0.421003, 0.027070, 0.),\n vec3(-0.817194, -0.271096, 0.),\n vec3(-0.705374, -0.668203, 0.),\n vec3(0.977050, -0.108615, 0.),\n vec3(0.063326, 0.142369, 0.),\n vec3(0.203528, 0.214331, 0.),\n vec3(-0.667531, 0.326090, 0.),\n vec3(-0.098422, -0.295755, 0.),\n vec3(-0.885922, 0.215369, 0.),\n vec3(0.566637, 0.605213, 0.),\n vec3(0.039766, -0.396100, 0.),\n vec3(0.751946, 0.453352, 0.),\n vec3(0.078707, -0.715323, 0.),\n vec3(-0.075838, -0.529344, 0.),\n vec3(0.724479, -0.580798, 0.),\n vec3(0.222999, -0.215125, 0.),\n vec3(-0.467574, -0.405438, 0.),\n vec3(-0.248268, -0.814753, 0.),\n vec3(0.354411, -0.887570, 0.),\n vec3(0.175817, 0.382366, 0.),\n vec3(0.487472, -0.063082, 0.),\n vec3(-0.084078, 0.898312, 0.),\n vec3(0.488876, -0.783441, 0.),\n vec3(0.470016, 0.217933, 0.),\n vec3(-0.696890, -0.549791, 0.),\n vec3(-0.149693, 0.605762, 0.),\n vec3(0.034211, 0.979980, 0.),\n vec3(0.503098, -0.308878, 0.),\n vec3(-0.016205, -0.872921, 0.),\n vec3(0.385784, -0.393902, 0.),\n vec3(-0.146886, -0.859249, 0.),\n vec3(0.643361, 0.164098, 0.),\n vec3(0.634388, -0.049471, 0.),\n vec3(-0.688894, 0.007843, 0.),\n vec3(0.464034, -0.188818, 0.),\n vec3(-0.440840, 0.137486, 0.),\n vec3(0.364483, 0.511704, 0.),\n vec3(0.034028, 0.325968, 0.),\n vec3(0.099094, -0.308023, 0.),\n vec3(0.693960, -0.366253, 0.),\n vec3(0.678884, -0.204688, 0.),\n vec3(0.001801, 0.780328, 0.),\n vec3(0.145177, -0.898984, 0.),\n vec3(0.062655, -0.611866, 0.),\n vec3(0.315226, -0.604297, 0.),\n vec3(-0.780145, 0.486251, 0.),\n vec3(-0.371868, 0.882138, 0.),\n vec3(0.200476, 0.494430, 0.),\n vec3(-0.494552, -0.711051, 0.),\n vec3(0.612476, 0.705252, 0.),\n vec3(-0.578845, -0.768792, 0.),\n vec3(-0.772454, -0.090976, 0.),\n vec3(0.504440, 0.372295, 0.),\n vec3(0.155736, 0.065157, 0.),\n vec3(0.391522, 0.849605, 0.),\n vec3(-0.620106, -0.328104, 0.),\n vec3(0.789239, -0.419965, 0.),\n vec3(-0.545396, 0.538133, 0.),\n vec3(-0.178564, -0.596057, 0.)\n);\n\nfn getRand(seed : vec2)->f32 {\n return fract(sin(dot(seed.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n#endif // USE_PCSS\n\n#ifdef USE_CUBE_MAP_SHADOW\nfn cubeShadowDepthCompare(uv : vec3, depth : f32) -> f32\n{\n var depthValue = textureSample(shadowMap_textureCube, shadowMap_textureCubeSampler, uv);\n return step(depth, depthValue);\n}\n#else\nfn shadowDepthCompare(uv : vec2, depth : f32) -> f32\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n var depthValue = textureSample(shadowMap_texture, shadowMap_textureSampler, uv).r;\n#else\n var depthValue = czm_unpackDepth(textureSample(shadowMap_texture, shadowMap_textureSampler, uv));\n#endif // USE_SHADOW_DEPTH_TEXTURE\n return step(depth, depthValue);\n}\n#endif // USE_CUBE_MAP_SHADOW\n\nfn sampleShadowMap(uv : vec2) -> f32\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n var depthValue = textureSample(shadowMap_texture, shadowMap_textureSampler, uv).r;\n#else\n var depthValue = czm_unpackDepth(textureSample(shadowMap_texture, shadowMap_textureSampler, uv));\n#endif\n return depthValue;\n}\n\nfn private_shadowVisibility(inVisibility : f32, nDotL : f32, normalShadingSmooth : f32, darkness : f32) -> f32\n{\n var visibility = inVisibility;\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n var strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n var strength = step(0.0, nDotL);\n#endif // USE_NORMAL_SHADING_SMOOTH\n visibility *= strength;\n#endif // USE_NORMAL_SHADING\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\nfn shadowVisibility(shadowParameters : czm_shadowParameters) -> f32\n{\n var depthBias = shadowParameters.depthBias;\n var depth = shadowParameters.depth;\n var nDotL = shadowParameters.nDotL;\n var normalShadingSmooth = shadowParameters.normalShadingSmooth;\n var darkness = shadowParameters.darkness;\n var uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n var visibility = cubeShadowDepthCompare(uvw, depth);\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\n\n#ifdef USE_PCSS\n\n fn computeShadowWithPCSS(shadowParameters : czm_shadowParameters, searchTapCount : u32, pcfTapCount : u32, poissonSamplers : array, 64>)-> f32\n {\n var depthMetric = shadowParameters.depth;\n\n if (depthMetric > 1.0 || depthMetric < 0.0) {\n return 1.0;\n }\n\n var depthBias = shadowParameters.depthBias;\n depthBias *= 2.0;\n var clipPos = vec3(shadowParameters.texCoords.xy, shadowParameters.depth - depthBias);\n var uvDepth = clipPos;\n\n var shadowMapSize = 1.0 / shadowParameters.texelStepSize.x;\n var shadowMapSizeInverse = shadowParameters.texelStepSize.x;\n var contactHardeningLightSizeUVRatio = Shadow.shadowMap_penumbraRatio;\n var shadowMapIndex = shadowParameters.shadowMapIndex;\n // hack : 让不同cascade的阴影看起来没有明显分隔\n var scale = pow(2.0, shadowMapIndex);\n contactHardeningLightSizeUVRatio /= scale;\n\n var lightSizeUV = shadowMapSize * contactHardeningLightSizeUVRatio;\n var darkness = shadowParameters.darkness;\n\n var blockerDepth = 0.0;\n var sumBlockerDepth = 0.0;\n var numBlocker = 0.0;\n\n var i : u32;\n for (i = 0; i < searchTapCount; i++) {\n blockerDepth = czm_unpackDepth(textureSampleLevel(shadowMap_texture, shadowMap_textureSampler, uvDepth.xy + (lightSizeUV * shadowMapSizeInverse * PoissonSamplers32[i].xy), 0.0));\n if (blockerDepth < uvDepth.z) {\n sumBlockerDepth += blockerDepth;\n numBlocker += 1.0;\n }\n }\n\n if (numBlocker < 1.0) {\n return 1.0;\n }\n else\n {\n var avgBlockerDepth = sumBlockerDepth / numBlocker;\n\n // Offset preventing aliasing on contact.\n var AAOffset = shadowMapSizeInverse * 10.;\n // Do not dividing by z despite being physically incorrect looks better due to the limited kernel size.\n // var penumbraRatio = (depthMetric - avgBlockerDepth) / avgBlockerDepth;\n var penumbraRatio = ((depthMetric - avgBlockerDepth) + AAOffset);\n var filterRadius = penumbraRatio * lightSizeUV * shadowMapSizeInverse;\n\n var random = getRand(shadowParameters.texCoords.xy);\n var rotationAngle = random * 3.1415926;\n var rotationVector = vec2(cos(rotationAngle), sin(rotationAngle));\n\n var shadow = 0.0;\n var i : u32;\n for (i = 0; i < pcfTapCount; i++) {\n var offset = poissonSamplers[i];\n // Rotated offset.\n offset = vec3(offset.x * rotationVector.x - offset.y * rotationVector.y, offset.y * rotationVector.x + offset.x * rotationVector.y, 0.0);\n var realUV = uvDepth + offset * filterRadius;\n realUV.z = (realUV.z - 0.5) * 2.0;\n shadow += textureSampleCompareLevel(u_shadowDepth, u_shadowDepthSampler, realUV.xy, realUV.z);\n }\n shadow /= f32(pcfTapCount);\n\n // Blocker distance falloff\n shadow = mix(shadow, 1.0, depthMetric - avgBlockerDepth);\n\n // Apply darkness\n shadow = mix(darkness, 1.0, shadow);\n\n return shadow;\n }\n }\n\n fn computeShadowWithPCSS16(shadowParameters : czm_shadowParameters)->f32\n {\n return computeShadowWithPCSS(shadowParameters, 16, 16, PoissonSamplers32);\n }\n\n fn computeShadowWithPCSS32(shadowParameters : czm_shadowParameters)->f32\n {\n return computeShadowWithPCSS(shadowParameters, 16, 32, PoissonSamplers32);\n }\n\n fn computeShadowWithPCSS64(shadowParameters : czm_shadowParameters)->f32\n {\n return computeShadowWithPCSS(shadowParameters, 32, 64, PoissonSamplers64);\n }\n#else\n fn computeShadowWithPoissonSampling(shadowParameters : czm_shadowParameters) -> f32\n {\n var shadowPixelDepth = shadowParameters.depth;\n var depthBias = shadowParameters.depthBias;\n shadowPixelDepth -= depthBias;\n var darkness = shadowParameters.darkness;\n var uv = shadowParameters.texCoords;\n var texelStepSize = shadowParameters.texelStepSize;\n\n var visibility = 1.0;\n var poissonDisk : array, 4>;\n poissonDisk[0] = vec2(-0.94201624, -0.39906216);\n poissonDisk[1] = vec2(0.94558609, -0.76890725);\n poissonDisk[2] = vec2(-0.094184101, -0.92938870);\n poissonDisk[3] = vec2(0.34495938, 0.29387760);\n\n // Poisson Sampling\n if (sampleShadowMap(uv + poissonDisk[0] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n if (sampleShadowMap(uv + poissonDisk[1] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n if (sampleShadowMap(uv + poissonDisk[2] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n if (sampleShadowMap(uv + poissonDisk[3] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n return visibility;\n }\n#endif\n\nfn shadowVisibility(shadowParameters : czm_shadowParameters) -> f32\n{\n#ifdef USE_SOFT_SHADOWS\n #ifdef USE_PCSS\n #ifdef LOW_QUALITY_SHADOW\n var visibility = computeShadowWithPCSS16(shadowParameters);\n #elif defined(MEDIUM_QUALITY_SHADOW)\n var visibility = computeShadowWithPCSS32(shadowParameters);\n #else\n var visibility = computeShadowWithPCSS64(shadowParameters);\n #endif\n #else\n var visibility = computeShadowWithPoissonSampling(shadowParameters);\n #endif\n#else\n var depth = shadowParameters.depth;\n var depthBias = shadowParameters.depthBias;\n depth -= depthBias;\n var visibility = shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n var nDotL = shadowParameters.nDotL;\n var normalShadingSmooth = shadowParameters.normalShadingSmooth;\n var darkness = shadowParameters.darkness;\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif // USE_CUBE_MAP_SHADOW\n",cubeUV_reflection="\n\n\tvar uSpecularEnvironmentMaps : texture_2d;\n\tvar uSpecularEnvironmentMapsSampler : sampler;\n\n\tconst CUBEUV_MAX_MIP = 8.0;\n const CUBEUV_TEXEL_WIDTH = 0.0013020833333333333;\n const CUBEUV_TEXEL_HEIGHT = 0.0009765625;\n const cubeUV_minMipLevel = 4.0;\n\tconst cubeUV_minTileSize = 16.0;\n\n\t// These shader functions convert between the UV coordinates of a single face of\n\t// a cubemap, the 0-5 integer index of a cube face, and the direction vector for\n\t// sampling a textureCube (not generally normalized ).\n\n\tfn getFace( direction : vec3 ) ->f32\n\t{\n\t\tvar absDirection = abs( direction );\n\t\tvar face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\n\t// RH coordinate system; PMREM face-indexing convention\n\tfn getUV( direction : vec3, face : f32) -> vec2{\n\t\tvar uv : vec2;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\n\t// fn bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) ->vec3\n\t// {\n\t// \tfloat face = getFace( direction );\n\t// \tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t// \tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t// \tfloat faceSize = exp2( mipInt );\n\t// \tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t// \tif ( face > 2.0 ) {\n\t// \t\tuv.y += faceSize;\n\t// \t\tface -= 3.0;\n\t// \t}\n\t// \tuv.x += face * faceSize;\n\t// \tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t// \tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t// \tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t// \tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t// \treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t// }\n\n\t// These defines must match with PMREMGenerator\n\n\tconst cubeUV_r0 = 1.0;\n\tconst cubeUV_v0 = 0.339;\n\tconst cubeUV_m0 = -2.0;\n\tconst cubeUV_r1 = 0.8;\n\tconst cubeUV_v1 = 0.276;\n\tconst cubeUV_m1 = -1.0;\n\tconst cubeUV_r4 = 0.4;\n\tconst cubeUV_v4 = 0.046;\n\tconst cubeUV_m4 = 2.0;\n\tconst cubeUV_r5 = 0.305;\n\tconst cubeUV_v5 = 0.016;\n\tconst cubeUV_m5 = 3.0;\n\tconst cubeUV_r6 = 0.21;\n\tconst cubeUV_v6 = 0.0038;\n\tconst cubeUV_m6 = 4.0;\n\n\tfn roughnessToMip(roughness : f32) ->f32\n\t{\n\t\tvar mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25\n\t\t}\n\t\treturn mip;\n\t}\n\n\t// vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\n\t// \tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\n\t// \tfloat mipF = fract( mip );\n\n\t// \tfloat mipInt = floor( mip );\n\n\t// \tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\n\t// \tif ( mipF == 0.0 ) {\n\n\t// \t\treturn vec4( color0, 1.0 );\n\n\t// \t} else {\n\n\t// \t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\n\t// \t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\n\t// \t}\n\n\t// }\n",LightUBODecl="\n#define MAX_POINT_LIGHT_COUNT 16;\n#define MAX_SPOT_LIGHT_COUNT 16;\n#define MAX_DIRECTION_LIGHT_COUNT 4;\nstruct LightUBO \n{ \n uPointLightPositionEC : array, 16>,\n uPointLightColor : array, 16>,\n uPointLightDistanceAndDecay : array, 16>,\n uSpotLightColorAndExponent : array, 16>,\n uSpotLightPositionEC : array, 16>,\n uSpotLightDirectionEC : array, 16>,\n uSpotLightDistanceDecayCosPenumbra : array, 16>,\n uDirectionalLightDirectionEC : array, 4>,\n uDirectionalLightDirection : array, 4>,\n uDirectionalLightColor : array, 4>,\n uAmbientLightColor : vec4, \n uSunLightColor : vec4,\n uSunDirectionEC : vec3,\n uSkyColor : vec3,\n uGroundColor : vec3,\n uSunLightON : f32,\n uPointLightCount : i32,\n uSpotLightCount : i32,\n uDirLightCount : i32\n};\nvar Light : LightUBO;\n",MaterialUboDecl="\nstruct MaterialUBO {\n uTexMatrix : mat4x4,\n uDiffuseColor : vec4,\n uAmbientColor : vec4,\n uSpecularColor : vec4,\n uTexUVOffset : vec4,\n uTextureDim : vec4,\n uTextureWidths : vec2,\n batchTextureStep_baseTex : vec4,\n batchTextureDimensions_baseTex : vec2,\n batchTextureStep_bakeTex : vec4,\n batchTextureDimensions_bakeTex : vec2,\n uBaseColorFactor : vec4,\n uEmissiveFactor : vec4,\n uEmissiveUVOffsetAndTiling : vec4,\n uMetallicRoughnessIntensityScale : vec3,\n uPBRTexWH : vec2,\n uNormalTextureScale : f32,\n uAlphaMode : f32,\n uAlphaCutoff : f32,\n uPbrParTextureWidth : f32\n};\n\nvar Material : MaterialUBO;",MeshUboDecl="\nstruct MeshUBO {\n uModelMatrix : mat4x4, \n uGeoMatrix : mat4x4, \n batchTextureStep : vec4, \n batchTextureDimensions : vec2,\n decode_texCoord0_min : vec2,\n decode_texCoord1_min : vec2,\n decode_texCoord0_vNormConstant : vec3,\n decode_texCoord1_vNormConstant : vec3,\n decode_position_min : vec4,\n decode_position_normConstant : f32,\n normal_rangeConstant : f32,\n uInverseGeoMatrix : mat4x4, \n uSkeletonMatrix : mat4x4,\n uSkeletonCount : f32,\n uImgTextureBound : vec2,\n uImgTextureAlpha : f32,\n fMultiTemporalFactor : f32,\n uSouthWest : vec3,\n uNorthDir : vec3,\n uEastDir : vec3,\n textureRepeat : vec2\n};\n\nvar Mesh : MeshUBO;",LayerUboDecl="\nstruct LayerUBO { \n uSelColor : vec4, \n uTranslationAndBottom : vec4, \n uFillForeColor : vec4, \n uPolygonOffset : vec4, \n uPointSize : f32,\n uMinMaxTransparent : vec2,\n uTransparentFilter : f32,\n uHypLineColor : vec4,\n uNoValueColor : vec4,\n uHypRect : vec4,\n uHypHasAnalysisRegion : f32,\n uMixColorType : f32,\n uHypOpacity : f32,\n uHypContourInterval : f32,\n uHypContourFillMode : f32,\n uHypFloor : f32,\n uHypCeil : f32,\n uDataFloor : f32,\n uDataCeil : f32,\n uHypMaxVisibleValue : f32,\n uHypMinVisibleValue : f32,\n uHypsometricVisible : f32,\n uRect : vec4,\n uCameraHeight : f32,\n uExcavationRect : vec4,\n uServerExcavationRect : vec4,\n uExcavationMode : f32,\n uServerExcavationMode : f32,\n uSwipeRegion : vec4,\n uBrightness : f32,\n uContrast : f32,\n uHue : f32,\n uSaturation : f32,\n uOneOverGamma : f32,\n uClipPlanes : array, 6>,\n uClipLineColor : vec4,\n uClipMode : f32,\n uMaxCategory : f32,\n uMinCategory : f32,\n uCategoryWidht : f32,\n uCategoryHeight : f32,\n uLineColor : vec4,\n uLineWidth : f32,\n uFillStyle : f32,\n uTransparentBackColor : vec4,\n uTransparentBackColorTolerance : f32,\n uVisibleDistanceMax : f32,\n uHorizontalColor : vec4,\n uHorizontalLine : f32,\n uDistanceFalloffFactor : f32,\n uStrokesTextureScale : vec2,\n uStrokesLog2Resolution : f32,\n uMinMaxTerrainHeightAndPickInfo : vec4,\n uOverlayRect : vec4,\n uEmissionTexAtlasTilingAndOffset : array, 10>,\n uEmissionTexAtlasRects : array, 10>,\n uEmissionColor : vec4,\n uLayerBounds : vec4,\n uLayerCornerLength : f32,\n uMaxCategoryOrHypCeil : f32,\n uMinCategoryOrHypFloor : f32,\n uEmissionTexAtlasCount : f32,\n uSnowCoverageFactor : f32,\n uAnimationSpeed : f32,\n uRippleScale : f32,\n uWindIntensity : f32,\n uRain : f32,\n uCameraDepth : f32,\n uWetnessFactor : f32,\n uSelectColorType: f32\n};\n\nvar Layer : LayerUBO;",k$Y="\nstruct SceneUBO { \n uView : mat4x4, \n uProjection : mat4x4, \n uViewProjection : mat4x4, \n uInverseView : mat4x4, \n uInverseProjection : mat4x4, \n uInverseViewProjection : mat4x4, \n uViewportTransformation : mat4x4,\n uViewRotation : mat3x3, \n uInverseViewRotation : mat3x3, \n uTemeToPseudoFixed : mat3x3, \n uViewport : vec4, \n uFrustumPlanes : vec4, \n uRelativeOrigin : vec3,\n uCurrentFrustum : vec2, \n uFarDepthFromNearPlusOne : f32, \n uLog2FarDepthFromNearPlusOne : f32, \n uOneOverLog2FarDepthFromNearPlusOne : f32, \n uFrameNumber : f32, \n uPixelRatio : f32, \n uResolutionScale : f32, \n uGamma : f32,\n uToneMappingExposure : f32,\n uEnvMapIntensity : f32,\n uSpecularEnvironmentMapSize : vec2,\n uSpecularEnvironmentMapsMaximumLOD : f32,\n uSphericalHarmonicCoefficients : array, 9>\n};\nvar Scene : SceneUBO;",ShadowUboDecl="\nstruct ShadowUBO { \n shadowMap_matix : mat4x4,\n shadowMap_texelSizeDepthBiasAndNormalShadingSmooth : vec4,\n shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness : vec4,\n shadowMap_cascadeMatrices : array, 4>,\n shadowMap_cascadeSplits : array, 2>,\n shadowMap_lightPositionEC : vec4,\n shadowMap_lightDirectionEC : vec3,\n shadowMap_penumbraRatio : f32\n};\nvar Shadow : ShadowUBO;\n",blinnPhong="\nconst shininess2 = 30.0;\nconst specular = vec3(0.066666);\n\nfn getRoughness(oriTexCoord : vec2) -> f32{\n return 1.0;\n}\n\nfn blinnPhong(inBaseColorWithAlpha : vec4, texCoord : vec2, oriTexCoord : vec2, posEC : vec3, posMC : vec4, vertexNormalEC : vec3)->vec4\n{\n var faceDirection : f32;\n if(gl_FrontFacing){\n faceDirection = 1.0;\n } \n else {\n faceDirection = -1.0;\n }\n\n var normalEC = normalize(vertexNormalEC);\n #ifndef HAS_NORMAL\n normalEC = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(posMC.xyz));\n #endif\n normalEC = normalEC * faceDirection;\n\n var totalDiffuseLight = vec3(0.0);\n var totalSpecularLight = vec3(0.0);\n var sunLightDiffuseWeight = max( dot( normalEC, Light.uSunDirectionEC ), 0.0 );\n totalDiffuseLight = Light.uSunLightColor.rgb * sunLightDiffuseWeight * Light.uSunLightON;\n var positionToEyeECDir = -normalize(posEC);\n\n var i : i32;\n #ifdef HAS_DIR_LIGHTS\n for (i = 0; i < Light.uDirLightCount; i ++ )\n {\n var dirVectorEC = normalize((Scene.uView * vec4(Light.uDirectionalLightDirection[i], 0.0)).xyz);\n var dotProduct = dot( normalEC, dirVectorEC );\n var dirDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += Light.uDirectionalLightColor[ i ] * dirDiffuseWeight;\n }\n #endif\n\n #ifdef HAS_POINT_LIGHTS\n for (i = 0; i < Light.uPointLightCount; i ++ )\n {\n var lVector = Light.uPointLightPositionEC[i] - posEC;\n var lengthToLight = length( lVector );\n var cutoffDis = Light.uPointLightDistanceAndDecay[i].x;\n if(lengthToLight > cutoffDis)\n {\n continue;\n }\n var attenuation = punctualLightIntensityToIrradianceFactor( lengthToLight, cutoffDis, Light.uPointLightDistanceAndDecay[i].y);\n lVector = normalize( lVector );\n var dotProduct = dot( normalEC, lVector );\n var pointLightDiffuse = max( dotProduct, 0.0 );\n totalDiffuseLight += Light.uPointLightColor[i] * pointLightDiffuse * attenuation;\n var pointHalfVector = normalize( lVector + positionToEyeECDir );\n var pointDotNormalHalf = max( dot( normalEC, pointHalfVector ), 0.0 );\n var pointSpecularWeight = max( pow( pointDotNormalHalf, shininess2 ), 0.0 );\n var specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n var schlick = specular + vec3(1.0 - specular) * pow(max(1.0 - dot(lVector, pointHalfVector), 0.0), 5.0);\n totalSpecularLight += schlick * Light.uPointLightColor[ i ] * pointSpecularWeight * pointLightDiffuse * attenuation * specularNormalization;\n }\n #endif\n\n #ifdef HAS_SPOT_LIGHTS\n var positionWC = (Mesh.uModelMatrix * posMC).xyz;\n for (i = 0; i < Light.uSpotLightCount; i ++ )\n {\n var lVector = Light.uSpotLightPositionEC[i] - posEC;\n var attenuation = punctualLightIntensityToIrradianceFactor( length( lVector ), Light.uSpotLightDistanceDecayCosPenumbra[i].x, Light.uSpotLightDistanceDecayCosPenumbra[i].y);\n lVector = normalize( lVector );\n var spotEffect = dot( lVector, Light.uSpotLightDirectionEC[ i ] );\n if ( spotEffect > Light.uSpotLightDistanceDecayCosPenumbra[i].z ) {\n spotEffect = max( pow( max( spotEffect, 0.0 ), Light.uSpotLightColorAndExponent[ i ].a ), 0.0 );\n var dotProduct = dot( normalEC, lVector );\n var spotDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += Light.uSpotLightColorAndExponent[ i ].rgb * spotDiffuseWeight * attenuation * spotEffect;\n var spotHalfVector = normalize( lVector + positionToEyeECDir );\n var spotDotNormalHalf = max( dot( normalEC, spotHalfVector ), 0.0 );\n var spotSpecularWeight = max( pow( spotDotNormalHalf, shininess2 ), 0.0 );\n var specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n var schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * Light.uSpotLightColorAndExponent[ i ].rgb * spotSpecularWeight * spotDiffuseWeight * attenuation * specularNormalization * spotEffect;\n }\n }\n #endif\n\n var diffuseColor = Material.uDiffuseColor.rgb * inBaseColorWithAlpha.rgb;\n\n var material : PhysicalMaterial;\n material.diffuseColor = diffuseColor;\n material.roughness = 1.0;\n var metalness = 0.0;\n var f0 = vec3(0.04);\n material.specularColor = mix(f0, inBaseColorWithAlpha.rgb, metalness);;\n material.specularF90 = 1.0;\n \n var geometry : GeometricContext;\n geometry.position = posEC;\n geometry.normal = normalEC;\n geometry.viewDir = positionToEyeECDir;\n var reflectedLight = ReflectedLight(vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0));\n reflectedLight.directDiffuse += totalDiffuseLight * diffuseColor;\n reflectedLight.directSpecular += totalSpecularLight * Material.uSpecularColor.rgb;\n \n getEnvironmentColor(geometry, material, &reflectedLight);\n\n var shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), normalEC, -posEC.z);\n#endif\n\n var color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n return vec4(LINEARtoSRGB(color.rgb), inBaseColorWithAlpha.a);\n}\n",shaderModelBase="\nstruct IncidentLight\n{\n direction : vec3,\n color : vec3,\n visible : bool\n};\n\nstruct GeometricContext {\n position : vec3,\n normal : vec3,\n viewDir : vec3\n};\n\nstruct PhysicalMaterial {\n diffuseColor : vec3,\n roughness : f32,\n specularColor : vec3,\n specularF90 : f32\n};\n\nstruct ReflectedLight {\n directDiffuse : vec3,\n directSpecular : vec3,\n indirectDiffuse : vec3,\n indirectSpecular : vec3\n};\n\n#define saturate(a) clamp( a, 0.0, 1.0 )\n\n#include \n\n//参考UE4.24实现计算精确光源的衰减\nfn punctualLightIntensityToIrradianceFactor(lightDistance : f32, cutoffDistance : f32, decayExponent : f32) ->f32\n{\n if ( decayExponent > 0.0 ) {\n return pow( saturate( 1.0 - lightDistance / cutoffDistance ), decayExponent );\n }\n return 1.0;\n}\n\nfn sRGBToLinear(srgbIn : vec4) -> vec4 {\n var linearOut = pow(vec3(srgbIn.x, srgbIn.y, srgbIn.z), vec3(2.2f, 2.2f, 2.2f));\n return vec4(linearOut.x, linearOut.y, linearOut.z, srgbIn.w);\n}\n\nfn sRGBToLinear_vf3(srgbIn : vec3) -> vec3 {\n return pow(srgbIn, vec3(2.2f, 2.2f, 2.2f));\n}\n\nfn LINEARtoSRGB(linearIn : vec3) -> vec3{\n #ifndef HDR\n return pow(linearIn, vec3(1.0/2.2));\n #else\n return linearIn;\n #endif\n}\n\n",getEnvironmentColor="\n\nvar uBrdfLut : texture_2d;\nvar uBrdfLutSampler : sampler;\n\nvar uEnvironmentMap : texture_cube;\nvar uEnvironmentMapSampler : sampler;\n\n//#include \n#include \n\nfn DFGApprox( normal : vec3, viewDir : vec3, roughness : f32) ->vec2 {\n var dotNV = saturate( dot( normal, viewDir ) );\n const c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n var r = roughness * c0 + c1;\n var a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n var fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\n\nfn computeMultiscattering(normal : vec3, viewDir : vec3, specularColor : vec3, specularF90 : f32, roughness : f32, \n singleScatter : ptr>, multiScatter : ptr>) {\n var fab = DFGApprox( normal, viewDir, roughness );\n var Fr = specularColor;\n var FssEss = Fr * fab.x + specularF90 * fab.y;\n var Ess = fab.x + fab.y;\n var Ems = 1.0 - Ess;\n var Favg = Fr + ( 1.0 - Fr ) * 0.047619;\n var Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n var lastSingle = (*(singleScatter)) + FssEss;\n (*singleScatter) = lastSingle;\n var lastMulti = (*(multiScatter)) + Fms * Ems;\n (*multiScatter) = lastMulti;\n}\n\nfn indirectSpecular_Physical(radiance : vec3, irradiance : vec3, geometry : GeometricContext, material : PhysicalMaterial, reflectedLight : ptr) {\n var singleScattering = vec3(0.0);\n var multiScattering = vec3(0.0);\n var cosineWeightedIrradiance = irradiance;\n computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, &singleScattering, &multiScattering);\n var totalScattering = singleScattering + multiScattering;\n var diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n (*(reflectedLight)).indirectSpecular += radiance * singleScattering;\n (*(reflectedLight)).indirectSpecular += multiScattering * cosineWeightedIrradiance;\n (*(reflectedLight)).indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n\nfn getEnvironmentColor(geometry : GeometricContext, material : PhysicalMaterial, reflectedLight : ptr )\n{\n var roughness = material.roughness;\n var posEC = geometry.position;\n var n = geometry.normal;\n var v = geometry.viewDir;\n\n var irradiance = vec3(0.0);\n var radiance = vec3(0.0);\n \n#ifdef HAS_HEMISPHERE_LIGHTS\n // TODO\n // HemisphereLight hemiLight;\n // hemiLight.skyColor = uSkyColor[0];\n // hemiLight.groundColor = uGroundColor[0];\n // hemiLight.direction = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\n // irradiance += getHemisphereLightIrradiance( hemiLight, geometry );\n#endif\n\n#ifdef BRDF\n#ifdef IBL\n\n#ifdef KtxEnvMap\n var modelView = Scene.uView * Mesh.uModelMatrix;\n let modelViewRow0 : vec4 = modelView[0u];\n let modelViewRow1 : vec4 = modelView[1u]; \n let modelViewRow2 : vec4 = modelView[2u]; \n var fixedToENU = mat3x3(\n vec3(modelViewRow0.x, modelViewRow1.x, modelViewRow2.x), \n vec3(modelViewRow0.y, modelViewRow1.y, modelViewRow2.y), \n vec3(modelViewRow0.z, modelViewRow1.z, modelViewRow2.z)\n );\n const yUpToZUp = mat3x3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n var cubeDir = normalize( yUpToZUp * fixedToENU * reflect(-v, n) );\n var worldNormal = normalize( yUpToZUp * fixedToENU * n );\n irradiance = czm_sphericalHarmonics(worldNormal, Scene.uSphericalHarmonicCoefficients);\n radiance = czm_sampleOctahedralProjection(Scene.uSpecularEnvironmentMapSize, cubeDir, \n roughness * Scene.uSpecularEnvironmentMapsMaximumLOD, Scene.uSpecularEnvironmentMapsMaximumLOD);\n #else\n // irradiance+= getIBLIrradiance( geometry.normal );\n // radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n#endif // KtxEnvMap\n \n#else // IBL\n var positionWC = vec3((Scene.uInverseView * vec4(posEC, 1.0f)).xyz) + Scene.uRelativeOrigin;\n var r = normalize(Scene.uInverseViewRotation * normalize(reflect(v, n)));\n var vertexRadius = length(positionWC);\n var horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n var reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(Scene.uTemeToPseudoFixed * r);\n r.x = -r.x;\n var inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n var sceneSkyBox = textureSample(uEnvironmentMap, uEnvironmentMapSampler, r).rgb * inverseRoughness;\n var atmosphereHeight = 0.05;\n var blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n var blendRegionOffset = roughness * -1.0;\n var farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n var aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n var farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n var smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n var belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n var nadirColor = belowHorizonColor * 0.5;\n var aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n var blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n var zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n var blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n var diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n var diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n var diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n var notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n var specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n var LdotZenith = clamp(dot(normalize(Scene.uInverseViewRotation * Light.uSunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n var S = acos(LdotZenith);\n var NdotZenith = clamp(dot(normalize(Scene.uInverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n var sunNdotL = clamp(dot(n, Light.uSunDirectionEC), 0.001, 1.0);\n var gamma = acos(sunNdotL);\n var numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n var denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n var luminance = 0.2 * (numerator / denominator);\n irradiance = diffuseIrradiance * luminance;\n radiance = specularIrradiance * luminance;\n#endif // IBL\n\n#else\n irradiance = Light.uAmbientLightColor.rgb * 0.6;\n#endif // BRDF\n\n indirectSpecular_Physical(radiance, irradiance, geometry, material, reflectedLight);\n}\n\n",getMetersPerPixel="\n//计算像素大小\nfn getMetersPerPixel(positionEC : vec4, pixelRatio : f32) -> f32\n{\n var width = Scene.uViewport.z;\n var height = Scene.uViewport.w;\n var pixelWidth:f32;\n var pixelHeight:f32;\n\n var top = Scene.uFrustumPlanes.x;\n var bottom = Scene.uFrustumPlanes.y;\n var left = Scene.uFrustumPlanes.z;\n var right = Scene.uFrustumPlanes.w;\n\n // if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n // {\n // var frustumWidth = right - left;\n // var frustumHeight = top - bottom;\n // pixelWidth = frustumWidth / width;\n // pixelHeight = frustumHeight / height;\n // }\n // else\n // {\n var distanceToPixel = -positionEC.z;\n var inverseNear = 1.0 / Scene.uCurrentFrustum.x;\n var tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n //}\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}",clip="\n#ifdef CLIP\n\nconst clip_lineWidth = 3.0;\n\nfn GetClipDistance(pos : vec3, planeNormal : vec3, disToOrigin : f32) -> f32\n{\n\treturn dot(planeNormal, pos) + disToOrigin;\n}\n\nfn ClipBehindAllPlane(fBorderWidth : f32, clip_vertex : vec4) -> f32\n{\n var distance = 0.0;\n var result = -1.0;\n #ifdef CLIPPLANE\n distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[0].xyz, Layer.uClipPlanes[0].w);\n if (distance < 0.0)\n {\n return 1.0;\n }\n else if (distance < fBorderWidth)\n {\n result = 0.0;\n }\n #else\n var i : u32;\n for(i = 0; i < 6; i++)\n {\n distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[i].xyz, Layer.uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return 1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n #endif\n return result;\n}\n\nfn ClipBehindAnyPlane(fBorderWidth : f32, clip_vertex : vec4) -> f32\n{\n var result = 1.0;\n var i : u32;\n for(i = 0; i < 6; i++)\n {\n var distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[i].xyz, Layer.uClipPlanes[i].w);\n if((distance + fBorderWidth) < 0.0)\n {\n return -1.0;\n }\n else if(distance < 0.0)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nfn ClipAnythingButLine(fBorderWidth : f32, clip_vertex : vec4) -> f32\n{\n var result = -1.0;\n var i : u32;\n for(i = 0; i < 6; i++)\n {\n var distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[i].xyz, Layer.uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return -1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nfn clip(clip_vertex : vec4, fIsFiltByID : f32) -> f32\n{\n if(fIsFiltByID < 0.1)\n {\n return 1.0;\n }\n if(Layer.uClipMode < 0.5)\n {\n return 1.0;\n }\n var fBorderWidth = 1.0;\n var clipResult = 1.0;\n if(Layer.uClipLineColor.a < 0.01)\n {\n fBorderWidth = 0.0;\n }\n if(Layer.uClipMode < 1.5)\n {\n clipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n }\n else if(Layer.uClipMode < 2.5)\n {\n clipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n }\n else if(Layer.uClipMode < 3.5)\n {\n clipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n }\n return clipResult;\n}\n#endif\n",calcTexCoordDecl="\n#ifdef TexCoord\n varying vTexCoord : vec4;\n varying vTexCoordZ : vec2;\n#endif\n\n#ifndef TextureBatch\n#ifdef MULTI_TEX\n varying vTexMatrix2 : vec4;\n#endif\n#endif\n\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef TextureBatch\n varying vTexTran : vec4;\n varying vTexScale : vec4;\n varying vTexSize : vec4;\n varying vMaxMipLevel : vec2;\n#else\n varying vTexMatrix : vec4;\n#endif\n\n#include \n\n #ifdef TextureBatch\n fn getBatchUV(uv : vec2, translate : vec2, scale : vec2, dim : vec2, mipLevel : f32) -> vec2\n {\n var temp : f32;\n var texTranslate = vec2(translate.x, translate.y);\t\n if(mipLevel > 0.0)\n {\n texTranslate.x = translate.x + scale.x;\n temp = pow(2.0, mipLevel - 1.0);\n texTranslate.y = translate.y + scale.y * (temp - 1.0) / temp;\n }\n var texScale = 1.0 / pow(2.0, mipLevel);\n var outUV = fract(uv);\n var offsetX = pow(2.0, mipLevel) / dim.x;\n var offsetY = pow(2.0, mipLevel) / dim.y;\n outUV.x = clamp(outUV.x, 0.0 + offsetX, 1.0 - offsetX);\n outUV.y = clamp(outUV.y, 0.0 + offsetY, 1.0 - offsetY);\n outUV.x = outUV.x * texScale * scale.x + texTranslate.x;\n outUV.y = outUV.y * texScale * scale.y + texTranslate.y;\n return outUV;\n }\n #else\n fn getUV(uv : vec2, translate : vec2, uvOffset : vec4, scale : f32, width : f32, mipLevel : f32, texCoordZ : f32) -> vec2 {\n var texCoord : vec2;\n var offset : f32;\n if ((texCoordZ < -9000.0f)) {\n texCoord = vec2(uv.x, uv.y);\n } else {\n texCoord = fract(uv);\n offset = (pow(2.0f, mipLevel) / width);\n texCoord = clamp(texCoord, vec2(offset, offset), vec2(1.0f - offset, 1.0f - offset));\n texCoord.x = ((texCoord.x + translate.x) * scale);\n texCoord.y = ((texCoord.y + translate.y) * scale);\n }\n texCoord = ((texCoord * vec2(uvOffset.z, uvOffset.w)) + vec2(uvOffset.x, uvOffset.y));\n return texCoord;\n }\n #endif\n // end TextureBatch\n\n#endif\n// end COMPUTE_TEXCOORD\n",getEmissiveTextureAtlasColor="\n#ifdef EMISSION_TEXTURE_ATLAS\nvar uEmissionTexAtlas : texture_2d;\nvar uEmissionTexAtlasSampler : sampler;\nvarying vLayerTexCoord : vec2;\nvarying vModIndexAndTexIndex : vec2;\nfn getEmissiveTextureAtlasColor(w : f32) -> vec3\n{\n var texColor = vec3(0.0);\n var emissionTexCoord : vec2;\n var nEmissionTexTexIdx = i32(floor(vModIndexAndTexIndex.y + 0.5));\n var atlasTexCoord : vec2;\n for(var i : i32 = 0; i < i32(Layer.uEmissionTexAtlasCount); i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = length(vLayerTexCoord) * Layer.uLayerCornerLength / Layer.uEmissionTexAtlasTilingAndOffset[i].x - floor(length(vLayerTexCoord) * Layer.uLayerCornerLength / Layer.uEmissionTexAtlasTilingAndOffset[i].x);\n emissionTexCoord.y = (w - Layer.uMinCategoryOrHypFloor) / Layer.uEmissionTexAtlasTilingAndOffset[i].y - floor((w - Layer.uMinCategoryOrHypFloor) / Layer.uEmissionTexAtlasTilingAndOffset[i].y);\n emissionTexCoord.x += Layer.uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + Layer.uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.x = fract(emissionTexCoord.x);\n emissionTexCoord.y = fract(emissionTexCoord.y);\n atlasTexCoord = mix(Layer.uEmissionTexAtlasRects[i].xy, Layer.uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = textureSample(uEmissionTexAtlas, uEmissionTexAtlasSampler, atlasTexCoord).rgb;\n var normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n var isNotTopFace = 1.0 - step(0.95, normalMC.z);\n var dayTime = 1.0 - czm_RGBToHSL(Light.uAmbientLightColor.rgb).z;\n var emissionTexColor = Layer.uEmissionColor.rgb * texColor * dayTime * isNotTopFace;\n return emissionTexColor;\n}\n#endif\n",computeWValue="\nfn computeWValue(vertexPos : ptr>) -> f32{\n var realWValue : f32 = (*vertexPos).w;\n#ifdef HypColorByZValue\n realWValue = (*vertexPos).z;\n#endif\n#ifdef TEXTURE_COORD_ONE_IS_W\n realWValue = aTexCoord0.x;\n#endif\n#ifdef USE_VertexWeight\n realWValue = aVertexWeight;\n #ifdef MultiTemporalWeight\n realWValue = mix(aVertexWeight, aVertexWeight_1, fMultiTemporalFactor);\n #ifdef ChangeZValue\n (*vertexPos).z += realWValue;\n #endif\n #endif\n#endif\n#ifdef COMPUTE_W_VALUE\n wValue = realWValue + Layer.uTranslationAndBottom.w;\n#endif\n return realWValue;\n}\n",setAlphaByWValue="\n#ifdef W_VISIBLE\n var uCategorieTexture : texture_2d;\n var uCategorieTextureSampler : sampler;\n \n fn setAlphaByWValue(w : f32, color : ptr>)\n {\n var category_u = abs(w - Layer.uMinCategory);\n var category_y = ceil(category_u / Layer.uCategoryWidht) / Layer.uCategoryHeight - 0.5 / Layer.uCategoryHeight;\n var category_x = (category_u - Layer.uCategoryWidht * floor(category_u / Layer.uCategoryWidht)) / Layer.uCategoryWidht + 0.5 / Layer.uCategoryWidht;\n var categoryTexCoord = vec2(category_x , category_y);\n var category = textureSampleLevel(uCategorieTexture, uCategorieTextureSampler, categoryTexCoord, 0.0f).a;\n (*color).a *= 1.0 - category;\n }\n#endif\n",adjustColor="\n#ifdef ADJUST_COLOR\nfn adjustColor(inputColor : vec3) ->vec3\n{\n var outputColor : vec3 = inputColor;\n outputColor = mix(vec3(0.0), outputColor.rgb, Layer.uBrightness);\n outputColor = mix(vec3(0.5), outputColor.rgb, Layer.uContrast);\n outputColor = czm_hue(outputColor.rgb, Layer.uHue);\n outputColor = clamp(outputColor.rgb, vec3(0.0), vec3(1.0));\n outputColor = czm_saturation(outputColor.rgb, Layer.uSaturation);\n outputColor = pow(outputColor.rgb, vec3(Layer.uOneOverGamma));\n return outputColor;\n}\n#endif\n",calculatePolyTexCoord="\nfn calculatePolyTexCoord(vertexPos: vec4, rectPos : vec4, ptInRect : ptr) -> vec2\n{\n var realVertexPos = vertexPos;\n var vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n var texCoord = vec2(realVertexPos.x - rectPos.x, realVertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n (*ptInRect) = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\n",getVertexByFlatten="\n#ifdef FALTTEN\n var uFlattenTexture : texture_2d;\n var uFlattenTextureSampler : sampler;\n\n fn getVertexByFlatten(posInLayerCoord : vec4, layerBottom : f32) -> vec4\n {\n var vecPos = Mesh.uGeoMatrix * vec4(posInLayerCoord.xyz, 1.0);\n var vecRatio = vec2(Layer.uRect.z - Layer.uRect.x, Layer.uRect.w - Layer.uRect.y);\n var vecTexCoord = vec2(vecPos.x - Layer.uRect.x, vecPos.y - Layer.uRect.y);\n vecTexCoord.x = vecTexCoord.x / vecRatio.x;\n vecTexCoord.y = vecTexCoord.y / vecRatio.y;\n if(vecTexCoord.x > 1.0 || vecTexCoord.x < 0.0 || vecTexCoord.y > 1.0 || vecTexCoord.y < 0.0)\n {\n return posInLayerCoord;\n }\n var value = textureSampleLevel(uFlattenTexture, uFlattenTextureSampler, vecTexCoord.xy, 0.0);\n #ifdef UseFloatTexture\n var fHeight = value.r;\n #else\n var fHeight = czm_unpackValue(value);\n #endif\n if(vecPos.z > fHeight && value.a > 0.5)\n {\n var fDepthOffset = clamp((Layer.uCameraHeight - fHeight - layerBottom) * 0.0001 * (vecPos.z + layerBottom - fHeight), 0.001, 3.0);\n vecPos.z = fHeight + fDepthOffset;\n vecPos.w = vecPos.z;\n }\n return Mesh.uInverseGeoMatrix * vec4(vecPos.xyz, 1.0);\n }\n#endif\n",HypSometric="\n#ifdef HYPSOMETRIC\n#include \n\nvar uHypsometricTexture : texture_2d;\nvar uHypsometricTextureSampler : sampler;\nvar uHypsometricRenderTexture : texture_2d;\nvar uHypsometricRenderTextureSampler : sampler;\n\nvarying vecHypTexCoord : vec2;\n#ifdef Volume\nvarying vecRotioCoord : vec3;\n#endif\n\nfn computeMixCon(fValue : f32) -> f32\n{\n var distanceToContour : f32;\n if(abs(Layer.uHypMaxVisibleValue - Layer.uHypMinVisibleValue) > 0.1)\n {\n if(fValue < 0.5)\n {\n var t = fValue - 0.0002;\n var m = t - floor(t / Layer.uHypContourInterval) * Layer.uHypContourInterval;\n distanceToContour = m;\n }\n else\n {\n var t = floor(fValue / Layer.uHypContourInterval);\n distanceToContour = abs(fValue - (t * Layer.uHypContourInterval) - 0.1);\n }\n }\n else\n {\n distanceToContour = abs(fValue - Layer.uHypMaxVisibleValue);\n }\n var dxc = abs(dpdx(fValue));\n var dyc = abs(dpdy(fValue));\n var dF = max(dxc, dyc);\n if(distanceToContour < dF){\n return 1.0;\n }\n else{\n return 0.0;\n }\n}\n\nfn computeContourMapColor(fValue : f32) -> vec4\n{\n var threshold = abs(Layer.uHypCeil - Layer.uHypFloor);\n var contourRate = (fValue - Layer.uHypFloor) / threshold;\n var finalCoord = clamp(contourRate, 0.0, 1.0);\n var count = floor(finalCoord * 16.0);\n var y = (count*2.0 + 1.0)/32.0;\n var x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n var contourCoord = vec2(x, y);\n return textureSampleLevel(uHypsometricTexture, uHypsometricTextureSampler, contourCoord, 0.0).rgba;\n}\n\nfn branchFreeTernary(comparison : bool, a : f32, b : f32) ->f32\n{\n var useA = f32(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\nfn getContourMapColor(oriColor : vec4, inValue : f32) -> vec4\n{\n var fValue = inValue;\n var contourMapColor = vec4(0.0);\n var finalOpacity = Layer.uHypOpacity;\n var output = vec4(0.0);\n#ifdef Volume\nvar aRatioT = vecRotioCoord;\n if((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n {\n if(S3MVolume.uVolumeType > 0.5)\n {\n var volumeColor = getVolumeValue(aRatioT);\n if(Layer.uMixColorType > 0.5)\n {\n volumeColor = volumeColor * oriColor;\n }\n output = volumeColor;\n }\n var noValue : f32;\n var texTest = getVolumeValueWithNoValue(aRatioT, &noValue);\n if(noValue > 0.5)\n {\n fValue = Layer.uDataFloor + texTest * (Layer.uDataCeil - Layer.uDataFloor);\n }\n else\n {\n fValue = Layer.uHypMaxVisibleValue + abs(Layer.uHypMaxVisibleValue * 0.1);\n }\n }\n else\n {\n fValue = Layer.uHypMaxVisibleValue + abs(Layer.uHypMaxVisibleValue * 0.1);\n }\n#endif\n var extendHeight = branchFreeTernary(Layer.uHypContourFillMode > 2.9, 0.0, branchFreeTernary(Layer.uHypContourFillMode > 1.9, 5.0, 0.0));\n var mixCon = computeMixCon(fValue);\n if(length(output) > 0.0 )\n {\n return output;\n }\n if(fValue > Layer.uHypMaxVisibleValue + extendHeight || fValue < Layer.uHypMinVisibleValue - extendHeight)\n {\n return Layer.uNoValueColor * oriColor;\n }\n if(Layer.uHypContourFillMode > 2.9)\n {\n var mix_con = mixCon;\n contourMapColor = mix(computeContourMapColor(fValue), Layer.uHypLineColor, mix_con);\n }\n else if(Layer.uHypContourFillMode > 1.9)\n {\n finalOpacity = mixCon;\n contourMapColor = Layer.uHypLineColor;\n }\n else if(Layer.uHypContourFillMode > 0.9)\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n var finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n finalColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n#endif\n return finalColor;\n}\n\n#ifdef Volume2\nfn getContourValue(volColor : vec4) -> f32\n{\n var noValue = volColor.a;\n var texTest = clamp(czm_unpackVolume(volColor.zyx), 0.0, 1.0);\n\n var fValue;\n if(noValue > 0.5)\n {\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = Layer.uHypMaxVisibleValue + abs(Layer.uHypMaxVisibleValue * 0.1);\n }\n \n return fValue;\n}\n\nfn getHypsometricColor(oriColor : vec4, volColor : vec4) -> vec4\n{\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var hypColor = textureSample(uHypsometricRenderTexture, uHypsometricRenderTextureSampler, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n \n if(uFilterMode > 0.5) {\n var finalColor = volColor * oriColor;\n\n if(Layer.uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n \n var fValue = getContourValue(volColor);\n return getContourMapColor(oriColor, fValue);\n}\n\n#else\n\nfn getHypsometricColor(oriColor : vec4, wValue : f32)-> vec4\n{\n var fValue = wValue;\n var output : vec4 = getContourMapColor(oriColor, fValue);\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var hypColor = textureSample(uHypsometricRenderTexture, uHypsometricRenderTextureSampler, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return output;\n}\n\nfn getHypsometricColorByGeoBounds(oriColor : vec4, wValue : f32, hypRect : vec4, vTexCoord : vec2, geoBounds : vec4) -> vec4\n{\n var output : vec4 = getContourMapColor(oriColor, wValue);\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n var hypColor = textureSample(uHypsometricRenderTexture, uHypsometricRenderTextureSampler, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return output;\n}\n#endif\n\n#endif\n",getVolumeValue="\n#ifdef Volume\nvar uVolumeTexture : texture_2d;\nvar uVolumeTextureSampler : sampler;\n\n#ifdef TIME_ORDER\nvar uNextVolumeTexture : texture_2d;\nvar uNextVolumeTextureSampler : sampler;\nuniform uTimeRatio : f32;\n#endif\n\nfn unpackVolume(packedDepth : vec3) -> f32\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\nfn computeVolumeTextureCoord(texCoord : vec3, fLevel : f32) -> vec2\n{\n var yOffset = floor((fLevel+0.25/ S3MVolume.uVolSideBlockCount) / S3MVolume.uVolSideBlockCount);\n var xOffset = fLevel - yOffset * S3MVolume.uVolSideBlockCount;\n var texCoordV = (texCoord.y * S3MVolume.uVolHeight + yOffset * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n var texCoordU = (texCoord.x * S3MVolume.uVolWidth + xOffset * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfn computeVolumeValue(topVolumeValue : vec4, bottomVolumeValue : vec4, inRatio : f32, noValue : ptr) -> f32\n{\n var ratio = inRatio;\n var fValue1 = clamp(unpackVolume(topVolumeValue.xyz),0.0,1.0);\n var fValue2 = clamp(unpackVolume(bottomVolumeValue.xyz),0.0,1.0);\n if(S3MVolume.uVolFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n (*noValue) = mix(topVolumeValue.a, bottomVolumeValue.a, ratio);\n if(topVolumeValue.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(bottomVolumeValue.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfn getVolumeValueWithNoValue(texCoord : vec3, noValue : ptr) -> f32\n{\n var fLevel = (S3MVolume.uVolDepth - 1.0) * texCoord.z;\n var bottomLevel= floor(fLevel);\n var topLevel = bottomLevel + 1.0;\n var ratio = topLevel - fLevel;\n var topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n var bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n\n var topVolumeValue = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, topTexCoord, 0.0);\n var bottomVolumeValue = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, bottomTexCoord, 0.0);\n var fResult = computeVolumeValue(topVolumeValue, bottomVolumeValue, ratio, noValue);\n#ifdef TIME_ORDER\n var topNextVolumeValue = textureSampleLevel(uNextVolumeTexture, uNextVolumeTextureSampler, topTexCoord, 0.0);\n var bottomNextVolumeValue = textureSampleLevel(uNextVolumeTexture, uNextVolumeTextureSampler, bottomTexCoord, 0.0);\n var fNextResult = computeVolumeValue(topNextVolumeValue, bottomNextVolumeValue, ratio, noValue);\n fResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\n return fResult;\n}\n\nfn getVolumeValue(texCoord : vec3) -> vec4\n{\n\tvar fLevel = (S3MVolume.uVolDepth - 1.0) * texCoord.z;\n\tvar bottomLevel= floor(fLevel);\n\tvar topLevel = bottomLevel + 1.0;\n\tvar ratio = topLevel - fLevel;\n\tvar yOffset1 = floor((topLevel+0.25/ S3MVolume.uVolSideBlockCount) / S3MVolume.uVolSideBlockCount);\n\tvar xOffset1 = topLevel - yOffset1 * S3MVolume.uVolSideBlockCount;\n\tvar texCoordV1 = (texCoord.y * S3MVolume.uVolHeight + yOffset1 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar texCoordU1 = (texCoord.x * S3MVolume.uVolWidth + xOffset1 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar volumeColor1 = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, vec2(texCoordU1,texCoordV1), 0.0);\n\tvar yOffset2 = floor((bottomLevel+0.25 / S3MVolume.uVolSideBlockCount) / S3MVolume.uVolSideBlockCount);\n\tvar xOffset2 = bottomLevel - yOffset2 * S3MVolume.uVolSideBlockCount;\n\tvar texCoordV2 = (texCoord.y * S3MVolume.uVolHeight + yOffset2 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar texCoordU2 = (texCoord.x * S3MVolume.uVolWidth + xOffset2 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar volumeColor2 = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, vec2(texCoordU2, texCoordV2), 0.0);\n\n\tif(S3MVolume.uVolFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvar volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif\n",splitClip="\n#ifdef APPLY_SWIPE\nfn rollerShutter(coord : vec2, region : vec4)\n{\n var f = step(region.xw, coord);\n var s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n#endif\n",executeExcavation="\n#ifdef EXCAVATION\nvar uExcavationTexture : texture_2d;\nvar uExcavationTextureSampler : sampler;\nvarying vExcavationVertexPos : vec4;\nfn executeExcavation() -> bool\n{\n var hasExcavation = 1.0;\n var vecExcavationTexCoord = calculatePolyTexCoord(vExcavationVertexPos, Layer.uExcavationRect, &hasExcavation);\n var excavationInside = (Layer.uExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n \n if(excavationInside)\n {\n return textureSampleLevel(uExcavationTexture, uExcavationTextureSampler, vecExcavationTexCoord.xy, 0.0).r > 0.5;\n }\n \n return textureSampleLevel(uExcavationTexture, uExcavationTextureSampler, vecExcavationTexCoord.xy, 0.0).r < 0.5;\n}\n#endif\n",S3MVolumeUboDecl="\nstruct S3MVolumeUBO {\n uVolSideBlockCount : f32,\n uVolBlockLength : f32,\n uVolTexLength : f32,\n uVolWidth : f32,\n uVolHeight : f32,\n uVolDepth : f32,\n uVolFilterMode : f32,\n uVolumeType : f32\n};\nvar S3MVolume : S3MVolumeUBO;\n",sketchMode="\nvar uNormalDepthTexture : texture_2d;\nvar uNormalDepthTextureSampler : sampler;\nfn edgeDetection(lineWidth : f32) -> f32\n{\n var center : vec2 = gl_FragCoord.xy / uniforms.czm_globeDepthTextureDim.xy;\n var off : vec2 = lineWidth / uniforms.czm_globeDepthTextureDim.xy;\n var tex_nw : vec4 = vec4(center.x+off.x, center.y+off.y, 1.0f, 1.0f);\n var val_nw : vec4 = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_nw.xy);\n val_nw.x = ((val_nw.xyz * 2.0f) - 1.0f).x;\n val_nw.y = ((val_nw.xyz * 2.0f) - 1.0f).y;\n val_nw.z = ((val_nw.xyz * 2.0f) - 1.0f).z;\n var tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0f, 1.0f);\n var val_ne : vec4 = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_ne.xy);\n val_ne.x = ((val_ne.xyz * 2.0f) - 1.0f).x;\n val_ne.y = ((val_ne.xyz * 2.0f) - 1.0f).y;\n val_ne.z = ((val_ne.xyz * 2.0f) - 1.0f).z;\n var tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\n var val_sw : vec4 = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_sw.xy);\n val_sw.x = ((val_sw.xyz * 2.0 ) - 1.0).x;\n val_sw.y = ((val_sw.xyz * 2.0 ) - 1.0).y;\n val_sw.z = ((val_sw.xyz * 2.0 ) - 1.0).z;\n var tex_se = vec4(center.x-off.x, center.y-off.y, 1.0f, 1.0f);\n var val_se : vec4 = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_se.xy);\n val_se.x = ((val_se.xyz * 2.0) - 1.0).x;\n val_se.y = ((val_se.xyz * 2.0) - 1.0).y;\n val_se.z = ((val_se.xyz * 2.0) - 1.0).z;\n var discontinuity = 0.0f;\n var dot0 = dot(val_nw.xyz, val_se.xyz);\n var dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nfn sketchMode(inputColor : vec4, lineColor : vec4, lineWidth : f32) -> vec4\n{\n var outputColor = inputColor;\n var discontinuity : f32 = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0f, 1.0f);\n if(Layer.uFillStyle == 1.0f)\n {\n outputColor = lineColor;\n outputColor.a = (1.0f - sign(discontinuity - 0.5f)) * 0.5f;\n outputColor.a *= lineColor.a;\n }\n else\n {\n var mixLineColor : vec3 = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\n var outColor = mix(mixLineColor, inputColor.rgb, discontinuity);\n outputColor.r = outColor.r;\n outputColor.g = outColor.g;\n outputColor.b = outColor.b;\n }\n return outputColor;\n}\n";const ShaderChunk={preClipFS:preClipFS,writeFragDepth:writeFragDepth,renderNormal:renderNormal,renderNormalAndDepth:renderNormalAndDepth,renderPrePass:renderPrePass,calculateMipLevel:calculateMipLevel,getTextureColorDecl:getTextureColorDecl,rainDecl:rainDecl,snowDecl:snowDecl,directionLightDecl:directionLightDecl,hemisphereLightDecl:hemisphereLightDecl,pointLightDecl:pointLightDecl,spotLightDecl:spotLightDecl,lightSourceImpl:lightSourceImpl,brdf:brdf,S3MVertexFactory:S3MVertexFactory,getUVMatrixDecl:getUVMatrixDecl,S3MOperationFSDecl:S3MOperationFSDecl,shadowReceive:shadowReceive,shadowVisibility:shadowVisibility,cubeUV_reflection:cubeUV_reflection,LightUBODecl:LightUBODecl,MaterialUboDecl:MaterialUboDecl,MeshUboDecl:MeshUboDecl,LayerUboDecl:LayerUboDecl,SceneUboDecl:k$Y,ShadowUboDecl:ShadowUboDecl,blinnPhong:blinnPhong,shaderModelBase:shaderModelBase,getEnvironmentColor:getEnvironmentColor,getMetersPerPixel:getMetersPerPixel,clip:clip,calcTexCoordDecl:calcTexCoordDecl,getEmissiveTextureAtlasColor:getEmissiveTextureAtlasColor,computeWValue:computeWValue,setAlphaByWValue:setAlphaByWValue,adjustColor:adjustColor,calculatePolyTexCoord:calculatePolyTexCoord,getVertexByFlatten:getVertexByFlatten,HypSometric:HypSometric,getVolumeValue:getVolumeValue,splitClip:splitClip,executeExcavation:executeExcavation,S3MVolumeUboDecl:S3MVolumeUboDecl,sketchMode:sketchMode};var _0x13322b=(_0x2de151=!0,function(e,t){var i=_0x2de151?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2de151=!1,i}),_0x2c76d7=_0x13322b(void 0,(function(){return _0x2c76d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c76d7).search("(((.+)+)+)+$")})),_0x2de151;function _0x49c0df(){this.children=[]}_0x2c76d7(),_0x49c0df.prototype.isValid=function(e){return!0},_0x49c0df.prototype.process=function(e,t){var i="";if(this.line){var n=this.line,r=t.processor;if(r){if(r.lineProcessor&&(n=r.lineProcessor(n,t.isFragment,t.processingContext)),r.attributeProcessor&&this.line.startsWith("attribute"))n=r.attributeProcessor(this.line,e,t.processingContext);else if(r.varyingProcessor&&this.line.startsWith("varying"))n=r.varyingProcessor(this.line,t.isFragment,e,t.processingContext);else if(r.uniformProcessor&&r.uniformRegexp&&r.uniformRegexp.test(this.line))!t.lookForClosingBracketForUniformBuffer&&(n=r.uniformProcessor(this.line,t.isFragment,e,t.processingContext));else if(r.uniformBufferProcessor&&r.uniformBufferRegexp&&r.uniformBufferRegexp.test(this.line))!t.lookForClosingBracketForUniformBuffer&&(n=r.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0);else if(r.textureProcessor&&r.textureRegexp&&r.textureRegexp.test(this.line))n=r.textureProcessor(this.line,t.isFragment,e,t.processingContext);else if((r.uniformProcessor||r.uniformBufferProcessor)&&this.line.startsWith("uniform")&&!t.lookForClosingBracketForUniformBuffer){/uniform\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/.test(this.line)?r.uniformProcessor&&(n=r.uniformProcessor(this.line,t.isFragment,e,t.processingContext)):r.uniformBufferProcessor&&(n=r.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0)}t.lookForClosingBracketForUniformBuffer&&-1!==this.line.indexOf("}")&&(t.lookForClosingBracketForUniformBuffer=!1,r.endOfUniformBufferProcessor&&(n=r.endOfUniformBufferProcessor(this.line,t.isFragment,t.processingContext)))}i+=n+"\r\n"}return this.children.forEach((function(n){i+=n.process(e,t)})),this.additionalDefineKey&&(e[this.additionalDefineKey]=this.additionalDefineValue||"true"),i};var _0x3ded8d=(_0x236fdd=!0,function(e,t){var i=_0x236fdd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x236fdd=!1,i}),_0x4534e0=_0x3ded8d(void 0,(function(){return _0x4534e0.toString().search("(((.+)+)+)+$").toString().constructor(_0x4534e0).search("(((.+)+)+)+$")})),_0x236fdd;function _0xc6c5af(){}_0x4534e0(),Object.defineProperty(_0xc6c5af.prototype,"currentLine",{get:function(){return this._lines[this.lineIndex]},enumerable:!1,configurable:!0}),Object.defineProperty(_0xc6c5af.prototype,"canRead",{get:function(){return this.lineIndex1){for(n();-1!==i&&_0xe37980._OperatorPriority[o()]>=_0xe37980._OperatorPriority[c];)t.push(a());r(c),s++}else l+=u;s++}for(n();-1!==i;)"("===o()?a():t.push(a());return t},_0xe37980._OperatorPriority={")":0,"(":1,"||":2,"&&":3},_0xe37980._Stack=["","","","","","","","","","","","","","","","","","","",""];var _0x121ab5=(_0x250a14=!0,function(e,t){var i=_0x250a14?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x250a14=!1,i}),_0x3eaf0b=_0x121ab5(void 0,(function(){return _0x3eaf0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3eaf0b).search("(((.+)+)+)+$")})),_0x250a14;function _0x5c6fd7(e,t){void 0===t&&(t=!1);var i=_0xe37980.call(this)||this;return i.define=e,i.not=t,i}_0x3eaf0b(),_0xe37980&&(_0x5c6fd7.__proto__=_0xe37980),_0x5c6fd7.prototype=Object.create(_0xe37980&&_0xe37980.prototype),_0x5c6fd7.prototype.constructor=_0xe37980,_0x5c6fd7.prototype.isTrue=function(e){var t=void 0!==e[this.define];return this.not&&(t=!t),t};var _0x15cb0d=(_0x1dcc9b=!0,function(e,t){var i=_0x1dcc9b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1dcc9b=!1,i}),_0x1c5186=_0x15cb0d(void 0,(function(){return _0x1c5186.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c5186).search("(((.+)+)+)+$")})),_0x1dcc9b;function _0x35cf83(){return null!==_0xe37980&&_0xe37980.apply(this,arguments)||this}_0x1c5186(),_0xe37980&&(_0x35cf83.__proto__=_0xe37980),_0x35cf83.prototype=Object.create(_0xe37980&&_0xe37980.prototype),_0x35cf83.prototype.constructor=_0xe37980,_0x35cf83.prototype.isTrue=function(e){return this.leftOperand.isTrue(e)||this.rightOperand.isTrue(e)};var _0x4bef0e=(_0x425337=!0,function(e,t){var i=_0x425337?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x425337=!1,i}),_0x517661=_0x4bef0e(void 0,(function(){return _0x517661.toString().search("(((.+)+)+)+$").toString().constructor(_0x517661).search("(((.+)+)+)+$")})),_0x425337;function _0x29f42b(){return null!==_0xe37980&&_0xe37980.apply(this,arguments)||this}_0x517661(),_0xe37980&&(_0x29f42b.__proto__=_0xe37980),_0x29f42b.prototype=Object.create(_0xe37980&&_0xe37980.prototype),_0x29f42b.prototype.constructor=_0xe37980,_0x29f42b.prototype.isTrue=function(e){return this.leftOperand.isTrue(e)&&this.rightOperand.isTrue(e)};var _0x96297d=(_0x123a8e=!0,function(e,t){var i=_0x123a8e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x123a8e=!1,i}),_0x36782c=_0x96297d(void 0,(function(){return _0x36782c.toString().search("(((.+)+)+)+$").toString().constructor(_0x36782c).search("(((.+)+)+)+$")})),_0x123a8e;function _0x3051d6(e,t,i){var n=_0xe37980.call(this)||this;return n.define=e,n.operand=t,n.testValue=i,n}_0x36782c(),_0xe37980&&(_0x3051d6.__proto__=_0xe37980),_0x3051d6.prototype=Object.create(_0xe37980&&_0xe37980.prototype),_0x3051d6.prototype.constructor=_0xe37980,_0x3051d6.prototype.isTrue=function(e){var t=e[this.define];void 0===t&&(t=this.define);var i=!1,n=parseInt(t),r=parseInt(this.testValue);switch(this.operand){case">":i=n>r;break;case"<":i=n=":i=n>=r;break;case"==":i=n===r}return i};var _0x339f31=(_0x149488=!0,function(e,t){var i=_0x149488?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x149488=!1,i}),_0x44114c=_0x339f31(void 0,(function(){return _0x44114c.toString().search("(((.+)+)+)+$").toString().constructor(_0x44114c).search("(((.+)+)+)+$")})),_0x149488;_0x44114c();var _0x22c403=/defined\s*?\((.+?)\)/g,_0x3a531d=/defined\s*?\[(.+?)\]/g,_0x23a037=/#include\s?<(.+)>(\((.*)\))*(\[(.*)\])*/g;function _0x5539b8(){}function O$M(e){return(e=e.replace(/\/\/.*/g,"")).replace(/\/\*\*[\s\S]*?\*\//gm,(function(e){for(var t=e.match(/\n/gm).length,i="",n=0;n0;){var n=e.pop();i.push(n),0===n.requiredBy.length&&t.push(n)}for(;t.length>0;){var r=t.shift();e.push(r);for(var o=0;o=0;--a)o=o+n[a].glslSource+"\n";return o.replace(r.glslSource,"")}function W$$(e,t,i){var n,r,o="",a=e.sources;if(e$2b(a))for(n=0,r=a.length;n/gm,(function(t,i){var n=e?ShaderChunk[i]:mo$1[i];if(void 0===n)throw new Error("Can not resolve #include <"+i+">");return U$11(e,n)}))}function I$1h(e,t,i){var n,r,o,a="",s=e.sources;if(e$2b(s))for(n=0,r=s.length;n=","<=","<",">"];r-1));r++);return-1===n?new _0x5c6fd7(e):new _0x3051d6(e.substring(0,n).trim(),i,e.substring(n+i.length).trim())},_0x5539b8._BuildSubExpression=function(e){e=e.replace(_0x22c403,"defined[$1]");for(var t=[],i=0,n=_0xe37980.infixToPostfix(e);i=2){var o=t[t.length-1],a=t[t.length-2];t.length-=2;var s="&&"==r?new _0x29f42b:new _0x35cf83;"string"==typeof o&&(o=o.replace(_0x3a531d,"defined($1)")),"string"==typeof a&&(a=a.replace(_0x3a531d,"defined($1)")),s.leftOperand="string"==typeof a?this._ExtractOperation(a):a,s.rightOperand="string"==typeof o?this._ExtractOperation(o):o,t.push(s)}}var l=t[t.length-1];return"string"==typeof l&&(l=l.replace(_0x3a531d,"defined($1)")),"string"==typeof l?this._ExtractOperation(l):l},_0x5539b8._BuildExpression=function(e,t){var i=new _0x46a337,n=e.substring(0,t),r=e.substring(t);return r=r.substring(0,(r.indexOf("//")+1||r.length+1)-1).trim(),i.testExpression="#ifdef"===n?new _0x5c6fd7(r):"#ifndef"===n?new _0x5c6fd7(r,!0):this._BuildSubExpression(r),i},_0x5539b8._MoveCursorWithinIf=function(e,t,i){for(var n=e.currentLine;this._MoveCursor(e,i);){var r=(n=e.currentLine).substring(0,5).toLowerCase();if("#else"===r){var o=new _0x49c0df;return t.children.push(o),void this._MoveCursor(e,o)}if("#elif"===r){var a=this._BuildExpression(n,5);t.children.push(a),i=a}}},_0x5539b8._MoveCursor=function(e,t){for(;e.canRead;){e.lineIndex++;var i=e.currentLine,n=/(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/.exec(i);if(n&&n.length){switch(n[0]){case"#ifdef":var r=new _0x333a0f;t.children.push(r);var o=this._BuildExpression(i,6);r.children.push(o),this._MoveCursorWithinIf(e,r,o);break;case"#else":case"#elif":return!0;case"#endif":return!1;case"#ifndef":r=new _0x333a0f;t.children.push(r);o=this._BuildExpression(i,7);r.children.push(o),this._MoveCursorWithinIf(e,r,o);break;case"#if":r=new _0x333a0f,o=this._BuildExpression(i,3);t.children.push(r),r.children.push(o),this._MoveCursorWithinIf(e,r,o)}}else{var a=new _0x49c0df;if(a.line=i,t.children.push(a),"#"===i[0]&&"d"===i[1]){var s=i.replace(";","").split(" ");a.additionalDefineKey=s[1],3===s.length&&(a.additionalDefineValue=s[2])}}}return!1},_0x5539b8._EvaluatePreProcessors=function(e,t,i){var n=new _0x49c0df,r=new _0xc6c5af;return r.lineIndex=-1,r.lines=e.split("\n"),this._MoveCursor(r,n),n.process(t,i)},_0x5539b8.removeUnuseCode=function(e,t,i){for(var n={},r=0,o=t.concat(i);r1?a[1]:""}var s=new _0x49c0df,l=new _0xc6c5af;return l.lineIndex=-1,l.lines=e.split("\n"),this._MoveCursor(l,s),s.process(n,{processor:{}})},_0x5539b8._PreparePreProcessors=function(e,t){for(var i,n={},r=0,o=e.defines;r1?a[1]:""}return(null===(i=e.processor)||void 0===i?void 0:i.shaderLanguage)===_0x4cf79a.GLSL&&(n.GL_ES="true"),n.__VERSION__=e.version,n[e.platformName]="true",t._getGlobalDefines(n),n},_0x5539b8._ProcessShaderConversion=function(e,t,i){var n=this._ProcessPrecision(e,t);if(!t.processor)return n;if(t.processor.shaderLanguage===_0x4cf79a.GLSL&&-1!==n.indexOf("#version 3"))return n.replace("#version 300 es","");var r=t.defines,o=this._PreparePreProcessors(t,i);return t.processor.preProcessor&&(n=t.processor.preProcessor(n,r,t.isFragment,t.processingContext)),n=this._EvaluatePreProcessors(n,o,t),t.processor.postProcessor&&(n=t.processor.postProcessor(n,r,t.isFragment,t.processingContext,i)),i._features.needShaderCodeInlining&&(n=i.inlineShaderCode(n)),n},_0x5539b8._ApplyPreProcessing=function(e,t,i){var n,r,o=e,a=t.defines,s=this._PreparePreProcessors(t,i);return(null===(n=t.processor)||void 0===n?void 0:n.preProcessor)&&(o=t.processor.preProcessor(o,a,t.isFragment,t.processingContext)),o=this._EvaluatePreProcessors(o,s,t),(null===(r=t.processor)||void 0===r?void 0:r.postProcessor)&&(o=t.processor.postProcessor(o,a,t.isFragment,t.processingContext,i)),i._features.needShaderCodeInlining&&(o=i.inlineShaderCode(o)),o},_0x5539b8._ProcessIncludes=function(e,t,i){for(var n=this,r=_0x23a037.exec(e),o=new String(e),a=!1,s=function(){var s=r[1];if(-1!==s.indexOf("__decl__")&&(s=s.replace(/__decl__/,""),t.supportsUniformBuffers&&(s=(s=s.replace(/Vertex/,"Ubo")).replace(/Fragment/,"Ubo")),s+="Declaration"),!t.includesShadersStore[s]){var l=t.shadersRepository+"ShadersInclude/"+s+".fx";return _0x5539b8._FileToolsLoadFile(l,(function(e){t.includesShadersStore[s]=e,n._ProcessIncludes(o,t,i)})),{value:void 0}}var u=t.includesShadersStore[s];if(r[2])for(var c=r[3].split(","),h=0;h=0||u.indexOf("#include <")>=0,r=_0x23a037.exec(e)};null!=r;){var l=s();if("object"==typeof l)return l.value}a?this._ProcessIncludes(o.toString(),t,i):i(o)},_0x5539b8._FileToolsLoadFile=function(e,t,i,n,r,o){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_9__._WarnImport)("FileTools")},s$U.prototype.clone=function(){return new s$U({sources:this.sources,defines:this.defines,name:this.name,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns,useWGSL:this.useWGSL})},s$U.replaceMain=function(e,t,i){return(i=u$_(i,!1))?s$U._replaceMainWGSL(e,t):s$U._replaceMainGLSL(e,t)},s$U._replaceMainGLSL=function(e,t){return t="void "+t+"()",e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)},s$U._replaceMainWGSL=function(e,t){return t="fn "+t+"()",e.replace(/(@vertex|@fragment)\s+fn\s+main\s*\(input\s+\:\s+(VertexInputs|FragmentInputs)\s*\)\s*->\s*(FragmentInputs|FragmentOutputs)/g,t)},s$U.prototype.getCacheKey=function(e){const t=this.defines.slice().sort().join(","),i=this.pickColorQualifier||"";this.includeBuiltIns;return`${t}:${i}:${this.sources.join("\n")}`},s$U.prototype._getKeyForShaderProgramName=function(){const e=this.defines.slice().sort().join(","),t=this.pickColorQualifier||"";return`${this.name}:${e}:${t}`},s$U.prototype.createCombinedVertexShader=function(e){return e.webgpu&&this.useWGSL?W$$(this,!1,e):I$1h(this,!1,e)},s$U.prototype.createCombinedFragmentShader=function(e){return e.webgpu&&this.useWGSL?W$$(this,!0,e):I$1h(this,!0,e)},s$U._czmBuiltinsAndUniforms={},G$1d)G$1d.hasOwnProperty(p$$)&&(s$U._czmBuiltinsAndUniforms[p$$]=G$1d[p$$]);for(var v$Q in l$19)if(l$19.hasOwnProperty(v$Q)){var _$W=l$19[v$Q];"function"==typeof _$W.getDeclaration&&(s$U._czmBuiltinsAndUniforms[v$Q]=_$W.getDeclaration(v$Q))}for(var p$$ in s$U._czmBuiltinsAndUniformsWGSL={},E$19)E$19.hasOwnProperty(p$$)&&(s$U._czmBuiltinsAndUniformsWGSL[p$$]=E$19[p$$]);for(var v$Q in l$19)if(l$19.hasOwnProperty(v$Q)){var _$W=l$19[v$Q];"function"==typeof _$W.getDeclaration&&(s$U._czmBuiltinsAndUniformsWGSL[v$Q]=_$W.getWgslDeclaration(v$Q))}s$U.createPickVertexShaderSource=function(e){return s$U.replaceMain(e,"czm_old_main")+"\nattribute vec4 pickColor; \nvarying vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n czm_pickColor = pickColor; \n}"},s$U.createPickFragmentShaderSource=function(e,t){return s$U.replaceMain(e,"czm_old_main")+"\n"+(t+" vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = czm_pickColor; \n}")},s$U.findVarying=function(e,t){for(var i=e.sources,n=t.length,r=0;re._sizeInBytes)throw new t$16("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!e$2b(i)||i<0||i+n>this._sizeInBytes)throw new t$16("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(i>=t&&ii&&ta)throw new t$16("destinationOffset must be greater than zero and less than the arrayView length.");if(i+r>a)throw new t$16("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new t$16("sourceOffset must be greater than zero and less than the buffers size.");if(t+r*o>this._sizeInBytes)throw new t$16("sourceOffset + length must be less than the buffers size.");var s=this._gl,l=de$x.COPY_READ_BUFFER;s.bindBuffer(l,this._buffer),s.getBufferSubData(l,t,e,i,n),s.bindBuffer(l,null)},h$11.prototype.isDestroyed=function(){return!1},h$11.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),this.context.memorySize-=this.sizeInBytes,i$10(this)};var _0x401653=(_0x308a23=!0,function(e,t){var i=_0x308a23?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x308a23=!1,i}),_0x31f498=_0x401653(void 0,(function(){return _0x31f498.toString().search("(((.+)+)+)+$").toString().constructor(_0x31f498).search("(((.+)+)+)+$")})),_0x308a23;function _0x18904c(e,t,i){void 0===i&&(i=_0x354cf8.BUFFER_CREATIONFLAG_READWRITE),this._engine=e,this._engine._storageBuffers.push(this),this._create(t,i)}function r$12(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).context,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=e$2b(n);a?r=n.byteLength:n=new Uint8Array(r);var s=_0x354cf8.BUFFER_CREATIONFLAG_STORAGE;e$2b(o)&&(o==A$19.STREAM_DRAW||o==A$19.STATIC_DRAW?s|=_0x354cf8.BUFFER_CREATIONFLAG_WRITE:o==A$19.DYNAMIC_DRAW&&(s|=_0x354cf8.BUFFER_CREATIONFLAG_READWRITE)),e$2b(i)?i==de$x.ELEMENT_ARRAY_BUFFER?(n instanceof Uint8Array&&(e.indexDatatype==ce$x.UNSIGNED_INT?n=new Uint32Array(n.buffer,n.byteOffset,n.byteLength/4):e.indexDatatype==ce$x.UNSIGNED_SHORT&&(n=new Uint16Array(n.buffer,n.byteOffset,n.byteLength/2))),this._dataBuffer=t.engine.createIndexBuffer(n)):i==de$x.ARRAY_BUFFER?(this._dataBuffer=new Buffer$1(t.engine,n,!0),this._dataBuffer._data=null):console.log("BufferGPU not supported bufferTarget"):(this._dataBuffer=new _0x18904c(t.engine,r,s),a&&this._dataBuffer.update(n,0,r)),this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this.context=e.context,e.context.memorySize+=r}function t$Y(e){if(e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),!e$2b(e.typedArray)&&!e$2b(e.sizeInBytes))throw new t$16("Either options.sizeInBytes or options.typedArray is required.");if(e$2b(e.typedArray)&&e$2b(e.sizeInBytes))throw new t$16("Cannot pass in both options.sizeInBytes and options.typedArray.");e$2b(e.typedArray)&&(o$1q.typeOf.object("options.typedArray",e.typedArray),o$1q.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),e.context.webgpu?this._inner=new r$12(e):this._inner=new h$11(e),this.vertexArrayDestroyable=!0}function w$V(e,t,i,n){var r=e$2b(t.vertexBuffer),o=e$2b(t.value),a=t.value?t.value.length:t.componentsPerAttribute;if(!r&&!o)throw new t$16("attribute must have a vertexBuffer or a value.");if(r&&o)throw new t$16("attribute cannot have both a vertexBuffer and a value. It must have either a vertexBuffer property defining per-vertex data or a value property defining data for all vertices.");if(1!==a&&2!==a&&3!==a&&4!==a)throw new t$16(o?"attribute.value.length must be in the range [1, 4].":"attribute.componentsPerAttribute must be in the range [1, 4].");if(e$2b(t.componentDatatype)&&!S$12.validate(t.componentDatatype))throw new t$16("attribute must have a valid componentDatatype or not specify it.");if(e$2b(t.strideInBytes)&&t.strideInBytes>255)throw new t$16("attribute must have a strideInBytes less than or equal to 255 or not specify it.");if(e$2b(t.instanceDivisor)&&t.instanceDivisor>0&&!n.instancedArrays)throw new t$16("instanced arrays is not supported");if(e$2b(t.instanceDivisor)&&t.instanceDivisor<0)throw new t$16("attribute must have an instanceDivisor greater than or equal to zero");if(e$2b(t.instanceDivisor)&&o)throw new t$16("attribute cannot have have an instanceDivisor if it is not backed by a buffer");if(e$2b(t.instanceDivisor)&&t.instanceDivisor>0&&0===t.index)throw new t$16("attribute zero cannot have an instanceDivisor greater than 0");var s={index:u$_(t.index,i),enabled:u$_(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:o?t.value.slice(0):void 0,componentsPerAttribute:a,componentDatatype:u$_(t.componentDatatype,S$12.FLOAT),normalize:u$_(t.normalize,!1),offsetInBytes:u$_(t.offsetInBytes,0),strideInBytes:u$_(t.strideInBytes,0),instanceDivisor:u$_(t.instanceDivisor,0)};if(r)s.vertexAttrib=function(e){var t=this.index;e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),e.vertexAttribPointer(t,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),e.enableVertexAttribArray(t),this.instanceDivisor>0&&(n.glVertexAttribDivisor(t,this.instanceDivisor),n._vertexAttribDivisors[t]=this.instanceDivisor,n._previousDrawInstanced=!0)},s.disableVertexAttribArray=function(e){e.disableVertexAttribArray(this.index),this.instanceDivisor>0&&n.glVertexAttribDivisor(i,0)};else{switch(s.componentsPerAttribute){case 1:s.vertexAttrib=function(e){e.vertexAttrib1fv(this.index,this.value)};break;case 2:s.vertexAttrib=function(e){e.vertexAttrib2fv(this.index,this.value)};break;case 3:s.vertexAttrib=function(e){e.vertexAttrib3fv(this.index,this.value)};break;case 4:s.vertexAttrib=function(e){e.vertexAttrib4fv(this.index,this.value)}}s.disableVertexAttribArray=function(e){}}e.push(s)}function _$V(e,t,i){for(var n=0;n0&&(l=!0),e$2b(a[t].value)&&(u=!0);var f,p={};for(t=0;t0&&(t.glVertexAttribDivisor(n,0),r[n]=0)}}function I$1f(e,t){for(var i=e._attributes,n=i.length,r=0;r2048)throw new t$16("attribute must have a strideInBytes less than or equal to 2048 or not specify it.");if(e$2b(t.strideInBytes)&&t.strideInBytes%4!=0)throw new t$16("attribute must have a strideInBytes is a multiple of 4.");if(e$2b(t.instanceDivisor)&&t.instanceDivisor<0)throw new t$16("attribute must have an instanceDivisor greater than or equal to zero");if(e$2b(t.instanceDivisor)&&o)throw new t$16("attribute cannot have have an instanceDivisor if it is not backed by a buffer");var s={name:t.name,index:u$_(t.index,i),enabled:u$_(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:o?t.value.slice(0):void 0,componentsPerAttribute:a,componentDatatype:u$_(t.componentDatatype,S$12.FLOAT),normalize:u$_(t.normalize,!1),offsetInBytes:u$_(t.offsetInBytes,0),strideInBytes:u$_(t.strideInBytes,0),instanceDivisor:u$_(t.instanceDivisor,0)};e.push(s)}function m$Y(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),o$1q.defined("options.attributes",e.attributes);var t=e.context,i=e.attributes,n=e.indexBuffer;this._babylonVertexBuffers={};var r,o=[],a=1,s=!1,l=i.length;for(r=0;r0&&(s=!0,h=!0,d=c.instanceDivisor);var f,p,_=e$2b(c.vertexBuffer),m=e$2b(c.value);_&&(p=(f=c.vertexBuffer._inner.dataBuffer).isUpdatable()),m&&(f=c.value,p=!0);const e=u$_(c.componentDatatype,S$12.FLOAT);var g=R$$.toVertexBufferDataType(e),x=new VertexBuffer(t.engine,f,c.name,p,!0,c.strideInBytes,h,c.offsetInBytes,c.componentsPerAttribute,g,!1,!0,d);this._babylonVertexBuffers[c.name]=x}this._numberOfVertices=a,this._hasInstancedAttributes=s,this._hasConstantAttributes=!1,this._context=t,this._attributes=o,this._indexBuffer=n}_0x31f498(),_0x18904c.prototype._create=function(e,t){this._bufferSize=e,this._creationFlags=t,this._buffer=this._engine.createStorageBuffer(e,t)},_0x18904c.prototype._rebuild=function(){this._create(this._bufferSize,this._creationFlags)},_0x18904c.prototype.getBuffer=function(){return this._buffer},_0x18904c.prototype.update=function(e,t,i){this._buffer&&this._engine.updateStorageBuffer(this._buffer,e,t,i)},_0x18904c.prototype.read=function(e,t,i){return this._engine.readFromStorageBuffer(this._buffer,e,t,i)},_0x18904c.prototype.dispose=function(){var e=this._engine._storageBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._engine._releaseBuffer(this._buffer),this._buffer=null},Object.defineProperties(r$12.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}},dataBuffer:{get:function(){return this._dataBuffer}}}),r$12.prototype._getBuffer=function(){return console.log("BufferGPU.prototype._getBuffer"),this._dataBuffer},r$12.prototype.copyFromArrayView=function(e,t){this._dataBuffer.updateDirectly(e,t,null,!0)},r$12.prototype.copyFromBuffer=function(e,t,i,n){console.log("BufferGPU.prototype.copyFromBuffer")},r$12.prototype.getBufferData=function(e,t,i,n){console.log("BufferGPU.prototype.getBufferData")},r$12.prototype.isDestroyed=function(){return!1},r$12.prototype.destroy=function(){return this._bufferTarget!==de$x.ELEMENT_ARRAY_BUFFER?this._dataBuffer.dispose():this.context._engine._releaseBuffer(this._dataBuffer),this.context.memorySize-=this.sizeInBytes,i$10(this)},t$Y.createVertexBuffer=function(e){return o$1q.defined("options.context",e.context),new t$Y({context:e.context,bufferTarget:de$x.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},t$Y.createIndexBuffer=function(e){if(o$1q.defined("options.context",e.context),!ce$x.validate(e.indexDatatype))throw new t$16("Invalid indexDatatype.");if(e.indexDatatype===ce$x.UNSIGNED_INT&&!e.context.elementIndexUint)throw new t$16("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");var t=e.context,i=e.indexDatatype,n=ce$x.getSizeInBytes(i),r=new t$Y({context:t,bufferTarget:de$x.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage,indexDatatype:i}),o=r.sizeInBytes/n;return Object.defineProperties(r,{indexDatatype:{get:function(){return i}},bytesPerIndex:{get:function(){return n}},numberOfIndices:{get:function(){return o}}}),r},Object.defineProperties(t$Y.prototype,{sizeInBytes:{get:function(){return this._inner.sizeInBytes}},usage:{get:function(){return this._inner.usage}}}),t$Y.prototype._getBuffer=function(){return this._inner._getBuffer()},t$Y.prototype.copyFromArrayView=function(e,t){this._inner.copyFromArrayView(e,t)},t$Y.prototype.copyFromBuffer=function(e,t,i,n){this._inner.copyFromBuffer(e,t,i,n)},t$Y.prototype.getBufferData=function(e,t,i,n){this._inner.getBufferData(e,t,i,n)},t$Y.prototype.isDestroyed=function(){return!1},t$Y.prototype.destroy=function(){return this._inner.destroy(),i$10(this)},Object.defineProperties(l$16.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),l$16.prototype.getAttribute=function(e){return o$1q.defined("index",e),this._attributes[e]},l$16.prototype._bind=function(){e$2b(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&V$T(this),this._hasConstantAttributes&&I$1f(this,this._gl)):_$V(this._gl,this._attributes,this._indexBuffer)},l$16.prototype._unBind=function(){if(e$2b(this._vao))this._context.glBindVertexArray(null);else{for(var e=this._attributes,t=this._gl,i=0;i0)for(o=E$16(e[r[0]]),t=1;t0){var c=S$12.getSizeInBytes(e[r[0]].componentDatatype),h=l%c;0!==h&&(l+=c-h);var d=new ArrayBuffer(o*l),f={};for(t=0;t=e$2a.SIXTY_FOUR_KILOBYTES&&r.elementIndexUint?t$Y.createIndexBuffer({context:r,typedArray:new Uint32Array(g),usage:a,indexDatatype:ce$x.UNSIGNED_INT}):t$Y.createIndexBuffer({context:r,typedArray:new Uint16Array(g),usage:a,indexDatatype:ce$x.UNSIGNED_SHORT})),new c$12({context:r,attributes:c,indexBuffer:m})},Object.defineProperties(c$12.prototype,{numberOfAttributes:{get:function(){return this._inner.numberOfAttributes}},numberOfVertices:{get:function(){return this._inner.numberOfVertices}},indexBuffer:{get:function(){return this._inner.indexBuffer}},uniqueID:{get:function(){return this._uniqueID}}}),c$12.prototype.getAttribute=function(e){return o$1q.defined("index",e),this._inner.getAttribute(e)},c$12.prototype._bind=function(){this._inner._bind()},c$12.prototype._unBind=function(){this._inner._unBind()},c$12.prototype.isDestroyed=function(){return!1},c$12.prototype.destroy=function(){return this._inner.destroy(),i$10(this)};var _0x50fdff=(_0x5f3119=!0,function(e,t){var i=_0x5f3119?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f3119=!1,i}),_0x4a6a65=_0x50fdff(void 0,(function(){return _0x4a6a65.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a6a65).search("(((.+)+)+)+$")})),_0x5f3119;_0x4a6a65();var Ht$7="attribute vec4 aPosition;\n\nuniform vec4 uDiffuseColor;\n\nvarying vec4 vColor;\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\n#endif\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n #ifdef USE_RelativeOrigin\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz - czm_relativeOrigin, 1.0);\n#else\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n#endif\n gl_Position = depthClampFarPlane(pos);\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n vColor = uDiffuseColor;\n#ifdef NormalVertex\n normal_vertex = aPosition.xyz;\n#endif\n}",_0xfb9acc=(_0x2bdbea=!0,function(e,t){var i=_0x2bdbea?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2bdbea=!1,i}),_0x166331=_0xfb9acc(void 0,(function(){return _0x166331.toString().search("(((.+)+)+)+$").toString().constructor(_0x166331).search("(((.+)+)+)+$")})),_0x2bdbea;_0x166331();var _0x18d31f="attribute vec4 position;\n\nuniform vec4 uDiffuseColor;\n\nvarying vec4 vColor;\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\n#endif\n\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(position.xyz, 1.0);\n gl_Position = pos;\n clip_vertex = czm_modelView * vec4(position.xyz, 1.0);\n vColor = uDiffuseColor;\n#ifdef NormalVertex\n normal_vertex = position.xyz;\n#endif\n}",_0x3aabc6=(_0x195c5d=!0,function(e,t){var i=_0x195c5d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x195c5d=!1,i}),_0x90ccad=_0x3aabc6(void 0,(function(){return _0x90ccad.toString().search("(((.+)+)+)+$").toString().constructor(_0x90ccad).search("(((.+)+)+)+$")})),_0x195c5d;_0x90ccad();var Yt$8="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\nvarying vec4 vColor;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\nconst vec4 LIGHT_COLOR = vec4(0.8, 0.8, 0.8, 1.0);\n#endif\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n gl_FragColor = vColor;\n#ifdef NormalVertex\n vec3 normal = normalize(czm_computeNormal(normal_vertex));\n vec4 eyePosition = czm_modelView * vec4(normal_vertex.xyz, 1.0);\n vec3 lightDirection = normalize(czm_sunPositionWC - vec3(eyePosition));\n float nDotL = max(dot(lightDirection, normal), 0.0);\n vec4 diffuse = vColor * LIGHT_COLOR * nDotL;\n vec4 ambient = vColor * LIGHT_COLOR;\n gl_FragColor = clamp(diffuse + ambient, vec4(0.0), vec4(1.0));\n#endif\n}",_0x554b9b=(_0xd61f67=!0,function(e,t){var i=_0xd61f67?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd61f67=!1,i}),_0x22de93=_0x554b9b(void 0,(function(){return _0x22de93.toString().search("(((.+)+)+)+$").toString().constructor(_0x22de93).search("(((.+)+)+)+$")})),_0xd61f67;function _0x218aaa(e,t){this._positions=e,this._skyline=t,this._command=void 0,this._initialize=!1,this._matWorldMatrix=p$1d.IDENTITY.clone(),this._vertexArray=void 0,this._normalArray=void 0,this._texcoordArray=void 0}function _0x1d6a58(e,t,i,n,r){var o=o$1p.fromRadians(t.longitude,t.latitude,0),a=o$1p.fromRadians(t.longitude,t.latitude,100);o$1p.subtract(o,e,o),o$1p.subtract(a,e,a);var s=new e$29(o.x,o.y,o.z,1);p$1d.multiplyByVector(i,s,s),e$29.divideByScalar(s,s.w,s),n.push(.5*s.x+.5),n.push(.5*s.y+.5),s=new e$29(a.x,a.y,a.z,1),p$1d.multiplyByVector(i,s,s),e$29.divideByScalar(s,s.w,s),r.push(.5*s.x+.5),r.push(.5*s.y+.5)}_0x22de93(),_0x218aaa.prototype.destroy=function(){e$2b(this._command)&&(this._command.vertexArray=this._command.vertexArray&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&this._command.shaderProgram.destroy(),this._command=void 0),this._vertexArray=void 0,this._normalArray=void 0,this._texcoordArray=void 0},_0x218aaa.prototype.initialize=function(e){if(!this._initialize){e$2b(this._command)&&(this._command.vertexArray=this._command.vertexArray&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&this._command.shaderProgram.destroy(),this._command=void 0),this._typeArray=null,this._initialize=!0;var t=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArray(this._positions)},extrudedHeight:100,granularity:1e-6}),i=z$_.createGeometry(t);p$1d.setTranslation(this._matWorldMatrix,i.boundingSphere.center,this._matWorldMatrix),this._vertexArray=i.attributes.position.values,this._normalArray=i.attributes.normal.values,this._texcoordArray=i.attributes.st.values,this._command=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matWorldMatrix,pass:Le$s.ANALYSIS,boundingVolume:i.boundingSphere,cull:!1});var n={position:0,st:1,normal:2};this._command.vertexArray=c$12.fromGeometry({context:e,geometry:i,attributeLocations:n,bufferUsage:A$19.STATIC_DRAW,interleave:!0});var r=new s$U({sources:[_0x18d31f]}),o=new s$U({sources:[Yt$8]});r.defines.push("NormalVertex"),o.defines.push("NormalVertex"),this._command.shaderProgram=r$13.fromCache({name:"LimitBody",context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n}),this._command.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var a=new e$29(128/255,1,235/255,1);this._command.uniformMap={uDiffuseColor:function(){return a}}}};var _0x28ad31=new o$1p;_0x218aaa.prototype.update=function(e,t,i,n,r){this.initialize(e),e.readPixelsAsync({framebuffer:this._skyline._depthBuffer.framebuffer}).then((o=>{var a=p$1d.IDENTITY.clone();p$1d.inverse(this._matWorldMatrix,a);var s=e$2a.toDegrees(r.longitude),l=e$2a.toDegrees(r.latitude),u=r.height,c=this._vertexArray.length/3,h=this._command.vertexArray.getAttribute(0),d=new Float32Array(8*c),f=new e$29,p=new e$29(1,1/255,1/65025,1/160581375),_=new p$1d;p$1d.inverse(t,_);for(var m=i.x,g=i.y,x=0;x-1;w--){var E=0;if(0===T)E=Math.round($[0]*e.drawingBufferWidth);else{var P=(w/e.drawingBufferHeight-$[1])/T+$[0];E=Math.round(P*e.drawingBufferWidth)}E=e$2a.clamp(E,0,e.drawingBufferWidth-1);var A=e.drawingBufferWidth*w+E,L=e$29.unpack(o,4*A,f);if(e$29.divideByScalar(L,255,L),(S=e$29.dot(L,p))>0){C.x=E/e.drawingBufferWidth*2-1,C.y=w/e.drawingBufferHeight*2-1;break}}if(this._skyline._scene.frameState.useLogDepth&&S>0){var M=S*n;S=g*(1-m/(Math.pow(2,M)-1+m))/(g-m)}e.webgpu||(S=2*S-1),C.z=S,p$1d.multiplyByVector(_,C,C),e$29.divideByScalar(C,C.w,C),o$1p.add(e.relativeOrigin,C,_0x28ad31);var R=a$18.fromCartesian(_0x28ad31);R.longitude=e$2a.toDegrees(R.longitude),R.latitude=e$2a.toDegrees(R.latitude),y.longitude=e$2a.toDegrees(y.longitude),y.latitude=e$2a.toDegrees(y.latitude);var I=a$18.sphericalDistance(s,l,R.longitude,R.latitude),O=a$18.sphericalDistance(s,l,y.longitude,y.latitude)/I*(R.height-u)+u,D=o$1p.fromDegrees(y.longitude,y.latitude,O);v.x=D.x,v.y=D.y,v.z=D.z,v.w=1,p$1d.multiplyByVector(a,v,v),d[8*x]=v.x,d[8*x+1]=v.y,d[8*x+2]=v.z,d[8*x+3]=this._texcoordArray[2*x],d[8*x+4]=this._texcoordArray[2*x+1],d[8*x+5]=this._normalArray[3*x],d[8*x+6]=this._normalArray[3*x+1],d[8*x+7]=this._normalArray[3*x+2]}}h.vertexBuffer.copyFromArrayView(d,0)}))};var _0x3ac6bd=(_0x203ba4=!0,function(e,t){var i=_0x203ba4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x203ba4=!1,i}),_0x4de170=_0x3ac6bd(void 0,(function(){return _0x4de170.toString().search("(((.+)+)+)+$").toString().constructor(_0x4de170).search("(((.+)+)+)+$")})),_0x203ba4;function _0x49e50a(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._viewSheds=[],this._boundingSphere=new i$1c,this._frameState=void 0,this._update=!0,this._id=0,this._name="",this._sceneName="",this._checking=!1,this._visibleViewport=4095}function _0x38f8b4(e,t,i,n){if(t._isUpdateCommand){for(var r=[],o=[],a=0;a0&&(o.push(n[r]._name),a.push(r)),t.push(o),i.push(a)}}function _0x4ae102(e,t){var i=e.radius,n=t.radius,r=e.center,o=t.center;return o$1p.distance(r,o)n)throw new t$16("The number of color attachments exceeds the number supported.");for(a=0;an)throw new t$16("The number of color attachments exceeds the number supported.");for(a=0;a0&&(this._viewSheds[a]._setMultiViewShedNames(s),_0x38f8b4(e,this._viewSheds[a],this._viewSheds,l))}}},t$X.ALL=Object.freeze(new t$X({color:new e$1U(0,0,0,0),depth:1,stencil:0})),t$X.prototype.execute=function(e,t){e.clear(this,t)},t$X.prototype.checkOcclusionQuery=function(e,t,i){return!1},t$X.prototype.isOccluded=function(){return!1},Object.defineProperties(a$W.prototype,{status:{get:function(){this._bind();var e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}}),a$W.prototype._bind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)},a$W.prototype._unBind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)},a$W.prototype._attachTexture=function(e,t){if(1==this.destroyAttachments)throw new t$16("destroyAttachments must be false");var i=this._gl;i.framebufferTexture2D(i.FRAMEBUFFER,e,t._target,t._texture,0)},a$W.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments},a$W.prototype.getColorTexture=function(e){if(!e$2b(e)||e<0||e>=this._colorTextures.length)throw new t$16("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]},a$W.prototype.getColorRenderbuffer=function(e){if(!e$2b(e)||e<0||e>=this._colorRenderbuffers.length)throw new t$16("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]},a$W.prototype.isDestroyed=function(){return!1},a$W.prototype.destroy=function(){if(this.destroyAttachments){for(var e=0,t=this._colorTextures,i=t.length;e0&&(s|=a.COLOR_BUFFER_BIT),(e$2b(i.depthStencilTexture)||e$2b(i.depthTexture))&&(s|=a.DEPTH_BUFFER_BIT|(o?a.STENCIL_BUFFER_BIT:0)),0!=s){a.bindFramebuffer(a.READ_FRAMEBUFFER,t._inner._framebuffer),a.bindFramebuffer(a.DRAW_FRAMEBUFFER,i._inner._framebuffer);var l=i.getColorTexture(0),u=l.width,c=l.height;a.blitFramebuffer(0,0,u,c,0,0,u,c,s,a.NEAREST),a.bindFramebuffer(a.READ_FRAMEBUFFER,null),a.bindFramebuffer(a.DRAW_FRAMEBUFFER,null)}}};var _0x3d8357=(_0x43902f=!0,function(e,t){var i=_0x43902f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43902f=!1,i}),_0xe12e27=_0x3d8357(void 0,(function(){return _0xe12e27.toString().search("(((.+)+)+)+$").toString().constructor(_0xe12e27).search("(((.+)+)+)+$")})),_0x43902f;function EventState(e,t,i,n){void 0===t&&(t=!1),this.initialize(e,t,i,n)}function Observer(e,t,i){void 0===i&&(i=null),this.callback=e,this.mask=t,this.scope=i,this._willBeUnregistered=!1,this.unregisterOnNextCall=!1}function Observable(e){this._observers=new Array,this._eventState=new EventState(0),e&&(this._onObserverAdded=e)}_0xe12e27(),EventState.prototype.initialize=function(e,t,i,n){return void 0===t&&(t=!1),this.mask=e,this.skipNextObservers=t,this.target=i,this.currentTarget=n,this},Observable.FromPromise=function(e,t){var i=new Observable;return e.then((function(e){i.notifyObservers(e)})).catch((function(e){if(!t)throw e;t.notifyObservers(e)})),i},Object.defineProperty(Observable.prototype,"observers",{get:function(){return this._observers},enumerable:!1,configurable:!0}),Observable.prototype.add=function(e,t,i,n,r){if(void 0===t&&(t=-1),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===r&&(r=!1),!e)return null;var o=new Observer(e,t,n);return o.unregisterOnNextCall=r,i?this._observers.unshift(o):this._observers.push(o),this._onObserverAdded&&this._onObserverAdded(o),o},Observable.prototype.addOnce=function(e){return this.add(e,void 0,void 0,void 0,!0)},Observable.prototype.remove=function(e){return!!e&&(-1!==this._observers.indexOf(e)&&(this._deferUnregister(e),!0))},Observable.prototype.removeCallback=function(e,t){for(var i=0;i0},Observable.prototype.clear=function(){this._observers=new Array,this._onObserverAdded=null},Observable.prototype.clone=function(){var e=new Observable;return e._observers=this._observers.slice(0),e},Observable.prototype.hasSpecificMask=function(e){void 0===e&&(e=-1);for(var t=0,i=this._observers;t0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"size",{get:function(){return this.width},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"width",{get:function(){return this._size.width||this._size},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"height",{get:function(){return this._size.height||this._size},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"layers",{get:function(){return this._size.layers||0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"texture",{get:function(){var e,t;return null!==(t=null===(e=this._textures)||void 0===e?void 0:e[0])&&void 0!==t?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"textures",{get:function(){return this._textures},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"samples",{get:function(){var e,t;return null!==(t=null===(e=this.texture)||void 0===e?void 0:e.samples)&&void 0!==t?t:1},enumerable:!1,configurable:!0}),_0x34d578.prototype.setSamples=function(e,t,i){return void 0===t&&(t=!0),void 0===i&&(i=!1),this.samples!==e||i?this._isMulti?this._engine.updateMultipleRenderTargetTextureSampleCount(this,e,t):this._engine.updateRenderTargetTextureSampleCount(this,e):e},_0x34d578.prototype.setTextures=function(e){Array.isArray(e)?this._textures=e:this._textures=e?[e]:null},_0x34d578.prototype.setTexture=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=!0),!this._textures&&(this._textures=[]),this._textures[t]&&i&&this._textures[t].dispose(),this._textures[t]=e},_0x34d578.prototype.createDepthStencilTexture=function(e,t,i,n,r){var o;return void 0===e&&(e=0),void 0===t&&(t=!0),void 0===i&&(i=!1),void 0===n&&(n=1),void 0===r&&(r=_0x354cf8.TEXTUREFORMAT_DEPTH32_FLOAT),null===(o=this._depthStencilTexture)||void 0===o||o.dispose(),this._depthStencilTextureWithStencil=i,this._depthStencilTexture=this._engine.createDepthStencilTexture(this._size,{bilinearFiltering:t,comparisonFunction:e,generateStencil:i,isCube:this._isCube,samples:n,depthTextureFormat:r},this),this._depthStencilTexture},_0x34d578.prototype._shareDepth=function(e){this._depthStencilTexture&&(e._depthStencilTexture&&e._depthStencilTexture.dispose(),e._depthStencilTexture=this._depthStencilTexture,this._depthStencilTexture.incrementReferences())},_0x34d578.prototype._swapAndDie=function(e){this.texture&&this.texture._swapAndDie(e),this._textures=null,this.dispose(!0)},_0x34d578.prototype._cloneRenderTargetWrapper=function(){var e,t,i,n,r,o,a=null;if(this._isMulti){var s=this.textures;if(s&&s.length>0){var l=!1,u=s.length,c=s[s.length-1]._source;(c===InternalTextureSource.Depth||c===InternalTextureSource.DepthStencil)&&(l=!0,u--);for(var h=[],d=[],f=0;f1&&e.setSamples(this.samples),e._swapRenderTargetWrapper(this),e.dispose()}},_0x34d578.prototype.releaseTextures=function(){var e,t;if(this._textures)for(var i=0;null!==(t=i<(null===(e=this._textures)||void 0===e?void 0:e.length))&&void 0!==t&&t;++i)this._textures[i].dispose();this._textures=null},_0x34d578.prototype.dispose=function(e){var t;void 0===e&&(e=!1),!e&&(null===(t=this._depthStencilTexture)||void 0===t||t.dispose(),this._depthStencilTexture=null,this.releaseTextures()),this._engine._releaseRenderTargetWrapper(this)};var v$P=1;function r$11(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).context;o$1q.defined("options.context",t),this.id=v$P++,this._context=t,this._colorTextures=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthStencilTexture=void 0,this.destroyAttachments=u$_(e.destroyAttachments,!0);var i,n,r,o=e.colorTextures,a=!1,s=1,l=1;if(e$2b(e.colorTextures)?(a=o.length>1,s=o[0].width,l=o[0].height):e$2b(e.depthTexture)?(s=e.depthTexture.width,l=e.depthTexture.height):e$2b(e.depthStencilTexture)&&(s=e.depthStencilTexture.width,l=e.depthStencilTexture.height),this._textureSize={width:s,height:l},this._renderTargetWrapper=new _0x34d578(a,!1,this._textureSize,t.engine),e$2b(e.colorTextures)){var u=e.colorTextures;r=this._colorTextures.length=this._activeColorAttachments.length=u.length;var c=[],h=[];for(n=0;n=this._colorTextures.length)throw new t$16("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]},r$11.prototype.getColorRenderbuffer=function(e){if(!e$2b(e)||e<0||e>=this._colorRenderbuffers.length)throw new t$16("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]},r$11.prototype.isDestroyed=function(){return!1},r$11.prototype.destroy=function(){if(this._renderTargetWrapper.dispose(!0),this.destroyAttachments){for(var e=this._colorTextures,t=e.length,i=0;ie$1T.maximumTextureSize)throw new t$16("Width must be less than or equal to the maximum texture size ("+e$1T.maximumTextureSize+"). Check maximumTextureSize.");if(o$1q.typeOf.number.greaterThan("height",n,0),n>e$1T.maximumTextureSize)throw new t$16("Height must be less than or equal to the maximum texture size ("+e$1T.maximumTextureSize+"). Check maximumTextureSize.");if(!V$10.validate(o))throw new t$16("Invalid options.pixelFormat.");if(!l&&!_$$.validate(a))throw new t$16("Invalid options.pixelDatatype.");if(o===V$10.DEPTH_COMPONENT&&a!==_$$.UNSIGNED_SHORT&&a!==_$$.UNSIGNED_INT&&a!==_$$.FLOAT)throw new t$16("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(o===V$10.DEPTH_STENCIL&&a!==_$$.UNSIGNED_INT_24_8)throw new t$16("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(a===_$$.FLOAT&&!t.floatingPointTexture)throw new t$16("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(a===_$$.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$16("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(V$10.isDepthFormat(o)){if(e$2b(r))throw new t$16("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, source cannot be provided.");if(!t.depthTexture)throw new t$16("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.")}if(l){if(!e$2b(r)||!e$2b(r.arrayBufferView))throw new t$16("When options.pixelFormat is compressed, options.source.arrayBufferView must be defined.");if(V$10.isDXTFormat(s)&&!t.s3tc)throw new t$16("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(V$10.isPVRTCFormat(s)&&!t.pvrtc)throw new t$16("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(V$10.isETC1Format(s)&&!t.etc1)throw new t$16("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.");if(V$10.compressedTextureSizeInBytes(s,i,n)!==r.arrayBufferView.byteLength)throw new t$16("The byte length of the array buffer is invalid for the compressed texture with the given width and height.")}var u=e.preMultiplyAlpha||o===V$10.RGB||o===V$10.LUMINANCE,c=u$_(e.flipY,!0);const h=u$_(e.skipColorSpaceConversion,!1);var d=!0,f=t._gl,p=f.TEXTURE_2D,_=f.createTexture();f.activeTexture(f.TEXTURE0),f.bindTexture(p,_);var m,g=4;if(e$2b(r)&&e$2b(r.arrayBufferView)&&!l&&(g=V$10.alignmentInBytes(o,a,i)),f.pixelStorei(f.UNPACK_ALIGNMENT,g),h?f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.NONE):f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.BROWSER_DEFAULT_WEBGL),e$2b(r))if(e$2b(r.arrayBufferView)){f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!1);var x,v,y,$=r.arrayBufferView;if(l){if(f.compressedTexImage2D(p,0,s,i,n,0,$),e$2b(r.mipLevels))for(v=i,y=n,x=0;xi.drawingBufferWidth)throw new t$16("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(o+s>i.drawingBufferHeight)throw new t$16("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new w$U({context:t,width:a,height:s,pixelFormat:n,source:{framebuffer:e$2b(l)?l:t.defaultFramebuffer,xOffset:r,yOffset:o,width:a,height:s}})},Object.defineProperties(w$U.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=e.comparisonFunction,r=t===tt$h.NEAREST_MIPMAP_NEAREST||t===tt$h.NEAREST_MIPMAP_LINEAR||t===tt$h.LINEAR_MIPMAP_NEAREST||t===tt$h.LINEAR_MIPMAP_LINEAR,o=this._context,a=this._pixelDatatype;const s=this._pixelFormat;(a===_$$.FLOAT&&!o.textureFloatLinear||a===_$$.HALF_FLOAT&&!o.textureHalfFloatLinear)&&(t=r?tt$h.NEAREST_MIPMAP_NEAREST:tt$h.NEAREST,i=rt$i.NEAREST),o.webgl2&&V$10.isDepthFormat(s)&&(t=tt$h.NEAREST,i=rt$i.NEAREST);var l=o._gl,u=this._textureTarget;l.activeTexture(l.TEXTURE0),l.bindTexture(u,this._texture),l.texParameteri(u,l.TEXTURE_MIN_FILTER,t),l.texParameteri(u,l.TEXTURE_MAG_FILTER,i),l.texParameteri(u,l.TEXTURE_WRAP_S,e.wrapS),l.texParameteri(u,l.TEXTURE_WRAP_T,e.wrapT),e$2b(this._textureFilterAnisotropic)&&l.texParameteri(u,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),o.webgl2&&n&&(n===de$x.LEQUAL?(l.texParameteri(u,l.TEXTURE_COMPARE_FUNC,de$x.LEQUAL),l.texParameteri(u,l.TEXTURE_COMPARE_MODE,l.NONE)):(l.texParameteri(u,l.TEXTURE_COMPARE_FUNC,n),l.texParameteri(u,l.TEXTURE_COMPARE_MODE,l.COMPARE_REF_TO_TEXTURE))),l.bindTexture(u,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},size:{get:function(){return this._size}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),w$U.prototype.copyFrom=function(e,t,i){if(t=u$_(t,0),i=u$_(i,0),o$1q.defined("source",e),V$10.isDepthFormat(this._pixelFormat))throw new t$16("Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");var n=V$10.isCompressedFormat(this._pixelFormat);o$1q.typeOf.number.greaterThanOrEquals("xOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",i,0),o$1q.typeOf.number.lessThanOrEquals("xOffset + source.width",t+e.width,this._width),o$1q.typeOf.number.lessThanOrEquals("yOffset + source.height",i+e.height,this._height);const r=this._context;var o=r._gl,a=this._textureTarget;o.activeTexture(o.TEXTURE0),o.bindTexture(a,this._texture);var s=e.width,l=e.height,u=e.arrayBufferView,c=this._width,h=this._height,d=this._pixelFormat,f=this._pixelDatatype;const p=this._internalFormat;var _=this._preMultiplyAlpha,m=this._flipY,g=4;e$2b(u)&&(g=V$10.alignmentInBytes(d,f,s)),o.pixelStorei(o.UNPACK_ALIGNMENT,g),o.pixelStorei(o.UNPACK_COLORSPACE_CONVERSION_WEBGL,o.BROWSER_DEFAULT_WEBGL);var x=!1;if(!this._initialized){if(0===t&&0===i&&s===c&&l===h)e$2b(u)?(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),m&&(u=V$10.flipY(u,d,f,c,h)),o.texImage2D(a,0,p,c,h,0,d,_$$.toWebGLConstant(f,r),u)):(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,_),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,m),o.texImage2D(a,0,p,d,_$$.toWebGLConstant(f,r),e)),x=!0;else{o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1);var v=V$10.createTypedArray(d,f,c,h);o.texImage2D(a,0,p,c,h,0,d,_$$.toWebGLConstant(f,r),v)}this._initialized=!0}x||(e$2b(u)?(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),m&&(u=V$10.flipY(u,d,f,s,l)),n?o.compressedTexSubImage2D(a,0,t,i,s,l,d,u):o.texSubImage2D(a,0,t,i,s,l,d,_$$.toWebGLConstant(f,r),u)):(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,_),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,m),n?o.compressedTexSubImage2D(a,0,t,i,s,l,d,u):o.texSubImage2D(a,0,t,i,d,_$$.toWebGLConstant(f,r),e))),o.bindTexture(a,null)},w$U.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){if(e=u$_(e,0),t=u$_(t,0),i=u$_(i,0),n=u$_(n,0),r=u$_(r,this._width),o=u$_(o,this._height),V$10.isDepthFormat(this._pixelFormat))throw new t$16("Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(this._pixelDatatype===_$$.FLOAT)throw new t$16("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===_$$.HALF_FLOAT)throw new t$16("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");if(V$10.isCompressedFormat(this._pixelFormat))throw new t$16("Cannot call copyFrom with a compressed texture pixel format.");o$1q.typeOf.number.greaterThanOrEquals("xOffset",e,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",i,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",n,0),o$1q.typeOf.number.lessThanOrEquals("xOffset + width",e+r,this._width),o$1q.typeOf.number.lessThanOrEquals("yOffset + height",t+o,this._height);var a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.copyTexSubImage2D(s,0,e,t,i,n,r,o),a.bindTexture(s,null),this._initialized=!0},w$U.prototype.copyFromTexture=function(e,t,i,n,r,o,a){var s=this._context,l=new t$W({context:s,colorTextures:[e],destroyAttachments:!1});if(l!==s._currentFramebuffer&&(s._currentFramebuffer=l,e$2b(l))){l._bind();var u=l._getActiveColorAttachments();s.drawBuffers&&s.glDrawBuffers(u)}this.copyFromFramebuffer(t,i,n,r,o,a),l.destroy()},w$U.prototype.generateMipmap=function(e){if(e=u$_(e,I$1e.DONT_CARE),V$10.isDepthFormat(this._pixelFormat))throw new t$16("Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(V$10.isCompressedFormat(this._pixelFormat))throw new t$16("Cannot call generateMipmap with a compressed pixel format.");if(!this._context.webgl2){if(this._width>1&&!e$2a.isPowerOfTwo(this._width))throw new t$16("width must be a power of two to call generateMipmap() in a WebGL1 context.");if(this._height>1&&!e$2a.isPowerOfTwo(this._height))throw new t$16("height must be a power of two to call generateMipmap() in a WebGL1 context.")}if(!I$1e.validate(e))throw new t$16("hint is invalid.");this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},w$U.prototype.isDestroyed=function(){return!1},w$U.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,i$10(this)};var _0x2cc114=(_0x178f30=!0,function(e,t){var i=_0x178f30?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x178f30=!1,i}),_0x54c3c1=_0x2cc114(void 0,(function(){return _0x54c3c1.toString().search("(((.+)+)+)+$").toString().constructor(_0x54c3c1).search("(((.+)+)+)+$")})),_0x178f30;function _0x1248df(e,t){this.width=e,this.height=t}_0x54c3c1(),_0x1248df.prototype.toString=function(){return"{W: ".concat(this.width,", H: ").concat(this.height,"}")},_0x1248df.prototype.getClassName=function(){return"Size"},_0x1248df.prototype.getHashCode=function(){var e=0|this.width;return e=397*e^(0|this.height)},_0x1248df.prototype.copyFrom=function(e){this.width=e.width,this.height=e.height},_0x1248df.prototype.copyFromFloats=function(e,t){return this.width=e,this.height=t,this},_0x1248df.prototype.set=function(e,t){return this.copyFromFloats(e,t)},_0x1248df.prototype.multiplyByFloats=function(e,t){return new _0x1248df(this.width*e,this.height*t)},_0x1248df.prototype.clone=function(){return new _0x1248df(this.width,this.height)},_0x1248df.prototype.equals=function(e){return!!e&&(this.width===e.width&&this.height===e.height)},Object.defineProperty(_0x1248df.prototype,"surface",{get:function(){return this.width*this.height},enumerable:!1,configurable:!0}),_0x1248df.Zero=function(){return new _0x1248df(0,0)},_0x1248df.prototype.add=function(e){return new _0x1248df(this.width+e.width,this.height+e.height)},_0x1248df.prototype.subtract=function(e){return new _0x1248df(this.width-e.width,this.height-e.height)},_0x1248df.Lerp=function(e,t,i){return new _0x1248df(e.width+(t.width-e.width)*i,e.height+(t.height-e.height)*i)};var _0x183b5d=(_0x2322ed=!0,function(e,t){var i=_0x2322ed?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2322ed=!1,i}),_0x5e2cac=_0x183b5d(void 0,(function(){return _0x5e2cac.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e2cac).search("(((.+)+)+)+$")})),_0x2322ed,_0x3e0d86,_0x48aaad,_0x5e0e10,_0x133363,_0x250b7f,_0xfcf739,_0x48c9ac,_0xa750f9,_0x46c7b2,_0x248a31,_0x462d88,_0x51c11d,_0x27e667,_0x45afcf,_0x56c8b3,_0x269346,_0x9a49e3,_0x32cc8d,_0x1c9ed9,_0x5879f1,_0x59ab0b,_0x3e494f,_0x569ef2,_0x3ca748,_0x418ade,_0x388de9,_0x3ff851,_0x1b5402,_0x12ccae,_0x5ba1ae,_0x4bc589,_0x23530a,_0x5d188c,_0x6aa9b0,_0x24d4cd,_0x4d6bed,_0x4f9d7d,_0x369f5f,_0x2ac57c,_0x17f290,_0x18f243,_0x15b35d,_0x3392bb,_0x21a1ec,_0x4dc01d,_0x2f806b,_0x490002,_0x5cec5b,_0x120965,_0xa46af2,_0x23e041,_0x35ac26,_0x1c11b4,_0x33df1a,_0x3f00b2,_0x43d996,_0x43c474,_0x5d1abb,_0x549744,_0x323d93,_0x52c237,_0x3c17d0,_0x5d6cb4,_0x50802f,_0x11c503,_0x1756b5,_0x543ca3,_0x55fb85,_0x20079d,_0x3f5da4,_0x25ee8e;function _0x5cc035(e){this._wrapU=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE,this._wrapV=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE,this.wrapR=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE,this.anisotropicFilteringLevel=4,this.delayLoadState=_0x354cf8.DELAYLOADSTATE_NONE,this._texture=null,this._engine=null,this._cachedSize=_0x1248df.Zero(),this._cachedBaseSize=_0x1248df.Zero(),this._initialSamplingMode=_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE,this._texture=e,this._texture&&(this._engine=this._texture.getEngine())}_0x5e2cac(),Object.defineProperty(_0x5cc035.prototype,"wrapU",{get:function(){return this._wrapU},set:function(e){this._wrapU=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5cc035.prototype,"wrapV",{get:function(){return this._wrapV},set:function(e){this._wrapV=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5cc035.prototype,"coordinatesMode",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5cc035.prototype,"isCube",{get:function(){return!!this._texture&&this._texture.isCube},set:function(e){this._texture&&(this._texture.isCube=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5cc035.prototype,"is3D",{get:function(){return!!this._texture&&this._texture.is3D},set:function(e){this._texture&&(this._texture.is3D=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5cc035.prototype,"is2DArray",{get:function(){return!!this._texture&&this._texture.is2DArray},set:function(e){this._texture&&(this._texture.is2DArray=e)},enumerable:!1,configurable:!0}),_0x5cc035.prototype.getClassName=function(){return"ThinTexture"},_0x5cc035.prototype.isReady=function(){return this.delayLoadState===_0x354cf8.DELAYLOADSTATE_NOTLOADED?(this.delayLoad(),!1):!!this._texture&&this._texture.isReady},_0x5cc035.prototype.delayLoad=function(){},_0x5cc035.prototype.getInternalTexture=function(){return this._texture},_0x5cc035.prototype.getSize=function(){if(this._texture){if(this._texture.width)return this._cachedSize.width=this._texture.width,this._cachedSize.height=this._texture.height,this._cachedSize;if(this._texture._size)return this._cachedSize.width=this._texture._size,this._cachedSize.height=this._texture._size,this._cachedSize}return this._cachedSize},_0x5cc035.prototype.getBaseSize=function(){return this.isReady()&&this._texture?this._texture._size?(this._cachedBaseSize.width=this._texture._size,this._cachedBaseSize.height=this._texture._size,this._cachedBaseSize):(this._cachedBaseSize.width=this._texture.baseWidth,this._cachedBaseSize.height=this._texture.baseHeight,this._cachedBaseSize):(this._cachedBaseSize.width=0,this._cachedBaseSize.height=0,this._cachedBaseSize)},Object.defineProperty(_0x5cc035.prototype,"samplingMode",{get:function(){return this._texture?this._texture.samplingMode:this._initialSamplingMode},enumerable:!1,configurable:!0}),_0x5cc035.prototype.updateSamplingMode=function(e){this._texture&&this._engine&&this._engine.updateTextureSamplingMode(e,this._texture)},_0x5cc035.prototype.releaseInternalTexture=function(){this._texture&&(this._texture.dispose(),this._texture=null)},_0x5cc035.prototype.dispose=function(){this._texture&&(this.releaseInternalTexture(),this._engine=null)},(_0x3e0d86||(_0x3e0d86={})).SRGB="srgb",_0x5e0e10=_0x48aaad||(_0x48aaad={}),_0x5e0e10.LowPower="low-power",_0x5e0e10.HighPerformance="high-performance",_0x250b7f=_0x133363||(_0x133363={}),_0x250b7f.DepthClipControl="depth-clip-control",_0x250b7f.Depth24UnormStencil8="depth24unorm-stencil8",_0x250b7f.Depth32FloatStencil8="depth32float-stencil8",_0x250b7f.TextureCompressionBC="texture-compression-bc",_0x250b7f.TextureCompressionETC2="texture-compression-etc2",_0x250b7f.TextureCompressionASTC="texture-compression-astc",_0x250b7f.TimestampQuery="timestamp-query",_0x250b7f.IndirectFirstInstance="indirect-first-instance",_0x250b7f.ShaderF16="shader-f16",_0x250b7f.BGRA8UnormStorage="bgra8unorm-storage",_0x48c9ac=_0xfcf739||(_0xfcf739={}),_0x48c9ac[_0x48c9ac.MapRead=1]="MapRead",_0x48c9ac[_0x48c9ac.MapWrite=2]="MapWrite",_0x48c9ac[_0x48c9ac.CopySrc=4]="CopySrc",_0x48c9ac[_0x48c9ac.CopyDst=8]="CopyDst",_0x48c9ac[_0x48c9ac.Index=16]="Index",_0x48c9ac[_0x48c9ac.Vertex=32]="Vertex",_0x48c9ac[_0x48c9ac.Uniform=64]="Uniform",_0x48c9ac[_0x48c9ac.Storage=128]="Storage",_0x48c9ac[_0x48c9ac.Indirect=256]="Indirect",_0x48c9ac[_0x48c9ac.QueryResolve=512]="QueryResolve",_0x46c7b2=_0xa750f9||(_0xa750f9={}),_0x46c7b2[_0x46c7b2.Read=1]="Read",_0x46c7b2[_0x46c7b2.Write=2]="Write",_0x462d88=_0x248a31||(_0x248a31={}),_0x462d88.E1d="1d",_0x462d88.E2d="2d",_0x462d88.E3d="3d",_0x27e667=_0x51c11d||(_0x51c11d={}),_0x27e667[_0x27e667.CopySrc=1]="CopySrc",_0x27e667[_0x27e667.CopyDst=2]="CopyDst",_0x27e667[_0x27e667.TextureBinding=4]="TextureBinding",_0x27e667[_0x27e667.StorageBinding=8]="StorageBinding",_0x27e667[_0x27e667.RenderAttachment=16]="RenderAttachment",_0x56c8b3=_0x45afcf||(_0x45afcf={}),_0x56c8b3.E1d="1d",_0x56c8b3.E2d="2d",_0x56c8b3.E2dArray="2d-array",_0x56c8b3.Cube="cube",_0x56c8b3.CubeArray="cube-array",_0x56c8b3.E3d="3d",function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e.All="all",e.StencilOnly="stencil-only",e.DepthOnly="depth-only"}(_0x269346||(_0x269346={})),_0x32cc8d=_0x9a49e3||(_0x9a49e3={}),_0x32cc8d.R8Unorm="r8unorm",_0x32cc8d.R8Snorm="r8snorm",_0x32cc8d.R8Uint="r8uint",_0x32cc8d.R8Sint="r8sint",_0x32cc8d.R16Uint="r16uint",_0x32cc8d.R16Sint="r16sint",_0x32cc8d.R16Float="r16float",_0x32cc8d.RG8Unorm="rg8unorm",_0x32cc8d.RG8Snorm="rg8snorm",_0x32cc8d.RG8Uint="rg8uint",_0x32cc8d.RG8Sint="rg8sint",_0x32cc8d.R32Uint="r32uint",_0x32cc8d.R32Sint="r32sint",_0x32cc8d.R32Float="r32float",_0x32cc8d.RG16Uint="rg16uint",_0x32cc8d.RG16Sint="rg16sint",_0x32cc8d.RG16Float="rg16float",_0x32cc8d.RGBA8Unorm="rgba8unorm",_0x32cc8d.RGBA8UnormSRGB="rgba8unorm-srgb",_0x32cc8d.RGBA8Snorm="rgba8snorm",_0x32cc8d.RGBA8Uint="rgba8uint",_0x32cc8d.RGBA8Sint="rgba8sint",_0x32cc8d.BGRA8Unorm="bgra8unorm",_0x32cc8d.BGRA8UnormSRGB="bgra8unorm-srgb",_0x32cc8d.RGB9E5UFloat="rgb9e5ufloat",_0x32cc8d.RGB10A2Unorm="rgb10a2unorm",_0x32cc8d.RG11B10UFloat="rg11b10ufloat",_0x32cc8d.RG32Uint="rg32uint",_0x32cc8d.RG32Sint="rg32sint",_0x32cc8d.RG32Float="rg32float",_0x32cc8d.RGBA16Uint="rgba16uint",_0x32cc8d.RGBA16Sint="rgba16sint",_0x32cc8d.RGBA16Float="rgba16float",_0x32cc8d.RGBA32Uint="rgba32uint",_0x32cc8d.RGBA32Sint="rgba32sint",_0x32cc8d.RGBA32Float="rgba32float",_0x32cc8d.Stencil8="stencil8",_0x32cc8d.Depth16Unorm="depth16unorm",_0x32cc8d.Depth24Plus="depth24plus",_0x32cc8d.Depth24PlusStencil8="depth24plus-stencil8",_0x32cc8d.Depth32Float="depth32float",_0x32cc8d.BC1RGBAUnorm="bc1-rgba-unorm",_0x32cc8d.BC1RGBAUnormSRGB="bc1-rgba-unorm-srgb",_0x32cc8d.BC2RGBAUnorm="bc2-rgba-unorm",_0x32cc8d.BC2RGBAUnormSRGB="bc2-rgba-unorm-srgb",_0x32cc8d.BC3RGBAUnorm="bc3-rgba-unorm",_0x32cc8d.BC3RGBAUnormSRGB="bc3-rgba-unorm-srgb",_0x32cc8d.BC4RUnorm="bc4-r-unorm",_0x32cc8d.BC4RSnorm="bc4-r-snorm",_0x32cc8d.BC5RGUnorm="bc5-rg-unorm",_0x32cc8d.BC5RGSnorm="bc5-rg-snorm",_0x32cc8d.BC6HRGBUFloat="bc6h-rgb-ufloat",_0x32cc8d.BC6HRGBFloat="bc6h-rgb-float",_0x32cc8d.BC7RGBAUnorm="bc7-rgba-unorm",_0x32cc8d.BC7RGBAUnormSRGB="bc7-rgba-unorm-srgb",_0x32cc8d.ETC2RGB8Unorm="etc2-rgb8unorm",_0x32cc8d.ETC2RGB8UnormSRGB="etc2-rgb8unorm-srgb",_0x32cc8d.ETC2RGB8A1Unorm="etc2-rgb8a1unorm",_0x32cc8d.ETC2RGB8A1UnormSRGB="etc2-rgb8a1unorm-srgb",_0x32cc8d.ETC2RGBA8Unorm="etc2-rgba8unorm",_0x32cc8d.ETC2RGBA8UnormSRGB="etc2-rgba8unorm-srgb",_0x32cc8d.EACR11Unorm="eac-r11unorm",_0x32cc8d.EACR11Snorm="eac-r11snorm",_0x32cc8d.EACRG11Unorm="eac-rg11unorm",_0x32cc8d.EACRG11Snorm="eac-rg11snorm",_0x32cc8d.ASTC4x4Unorm="astc-4x4-unorm",_0x32cc8d.ASTC4x4UnormSRGB="astc-4x4-unorm-srgb",_0x32cc8d.ASTC5x4Unorm="astc-5x4-unorm",_0x32cc8d.ASTC5x4UnormSRGB="astc-5x4-unorm-srgb",_0x32cc8d.ASTC5x5Unorm="astc-5x5-unorm",_0x32cc8d.ASTC5x5UnormSRGB="astc-5x5-unorm-srgb",_0x32cc8d.ASTC6x5Unorm="astc-6x5-unorm",_0x32cc8d.ASTC6x5UnormSRGB="astc-6x5-unorm-srgb",_0x32cc8d.ASTC6x6Unorm="astc-6x6-unorm",_0x32cc8d.ASTC6x6UnormSRGB="astc-6x6-unorm-srgb",_0x32cc8d.ASTC8x5Unorm="astc-8x5-unorm",_0x32cc8d.ASTC8x5UnormSRGB="astc-8x5-unorm-srgb",_0x32cc8d.ASTC8x6Unorm="astc-8x6-unorm",_0x32cc8d.ASTC8x6UnormSRGB="astc-8x6-unorm-srgb",_0x32cc8d.ASTC8x8Unorm="astc-8x8-unorm",_0x32cc8d.ASTC8x8UnormSRGB="astc-8x8-unorm-srgb",_0x32cc8d.ASTC10x5Unorm="astc-10x5-unorm",_0x32cc8d.ASTC10x5UnormSRGB="astc-10x5-unorm-srgb",_0x32cc8d.ASTC10x6Unorm="astc-10x6-unorm",_0x32cc8d.ASTC10x6UnormSRGB="astc-10x6-unorm-srgb",_0x32cc8d.ASTC10x8Unorm="astc-10x8-unorm",_0x32cc8d.ASTC10x8UnormSRGB="astc-10x8-unorm-srgb",_0x32cc8d.ASTC10x10Unorm="astc-10x10-unorm",_0x32cc8d.ASTC10x10UnormSRGB="astc-10x10-unorm-srgb",_0x32cc8d.ASTC12x10Unorm="astc-12x10-unorm",_0x32cc8d.ASTC12x10UnormSRGB="astc-12x10-unorm-srgb",_0x32cc8d.ASTC12x12Unorm="astc-12x12-unorm",_0x32cc8d.ASTC12x12UnormSRGB="astc-12x12-unorm-srgb",_0x32cc8d.Depth24UnormStencil8="depth24unorm-stencil8",_0x32cc8d.Depth32FloatStencil8="depth32float-stencil8",_0x5879f1=_0x1c9ed9||(_0x1c9ed9={}),_0x5879f1.ClampToEdge="clamp-to-edge",_0x5879f1.Repeat="repeat",_0x5879f1.MirrorRepeat="mirror-repeat",_0x3e494f=_0x59ab0b||(_0x59ab0b={}),_0x3e494f.Nearest="nearest",_0x3e494f.Linear="linear",_0x3ca748=_0x569ef2||(_0x569ef2={}),_0x3ca748.Never="never",_0x3ca748.Less="less",_0x3ca748.Equal="equal",_0x3ca748.LessEqual="less-equal",_0x3ca748.Greater="greater",_0x3ca748.NotEqual="not-equal",_0x3ca748.GreaterEqual="greater-equal",_0x3ca748.Always="always",_0x388de9=_0x418ade||(_0x418ade={}),_0x388de9[_0x388de9.Vertex=1]="Vertex",_0x388de9[_0x388de9.Fragment=2]="Fragment",_0x388de9[_0x388de9.Compute=4]="Compute",_0x1b5402=_0x3ff851||(_0x3ff851={}),_0x1b5402.Uniform="uniform",_0x1b5402.Storage="storage",_0x1b5402.ReadOnlyStorage="read-only-storage",_0x5ba1ae=_0x12ccae||(_0x12ccae={}),_0x5ba1ae.Filtering="filtering",_0x5ba1ae.NonFiltering="non-filtering",_0x5ba1ae.Comparison="comparison",_0x23530a=_0x4bc589||(_0x4bc589={}),_0x23530a.Float="float",_0x23530a.UnfilterableFloat="unfilterable-float",_0x23530a.Depth="depth",_0x23530a.Sint="sint",_0x23530a.Uint="uint",(_0x5d188c||(_0x5d188c={})).WriteOnly="write-only",_0x24d4cd=_0x6aa9b0||(_0x6aa9b0={}),_0x24d4cd.Error="error",_0x24d4cd.Warning="warning",_0x24d4cd.Info="info",(_0x4d6bed||(_0x4d6bed={})).Auto="auto",_0x369f5f=_0x4f9d7d||(_0x4f9d7d={}),_0x369f5f.PointList="point-list",_0x369f5f.LineList="line-list",_0x369f5f.LineStrip="line-strip",_0x369f5f.TriangleList="triangle-list",_0x369f5f.TriangleStrip="triangle-strip",_0x17f290=_0x2ac57c||(_0x2ac57c={}),_0x17f290.CCW="ccw",_0x17f290.CW="cw",_0x15b35d=_0x18f243||(_0x18f243={}),_0x15b35d.None="none",_0x15b35d.Front="front",_0x15b35d.Back="back",_0x21a1ec=_0x3392bb||(_0x3392bb={}),_0x21a1ec[_0x21a1ec.Red=1]="Red",_0x21a1ec[_0x21a1ec.Green=2]="Green",_0x21a1ec[_0x21a1ec.Blue=4]="Blue",_0x21a1ec[_0x21a1ec.Alpha=8]="Alpha",_0x21a1ec[_0x21a1ec.All=15]="All",_0x2f806b=_0x4dc01d||(_0x4dc01d={}),_0x2f806b.Zero="zero",_0x2f806b.One="one",_0x2f806b.Src="src",_0x2f806b.OneMinusSrc="one-minus-src",_0x2f806b.SrcAlpha="src-alpha",_0x2f806b.OneMinusSrcAlpha="one-minus-src-alpha",_0x2f806b.Dst="dst",_0x2f806b.OneMinusDst="one-minus-dst",_0x2f806b.DstAlpha="dst-alpha",_0x2f806b.OneMinusDstAlpha="one-minus-dst-alpha",_0x2f806b.SrcAlphaSaturated="src-alpha-saturated",_0x2f806b.Constant="constant",_0x2f806b.OneMinusConstant="one-minus-constant",_0x5cec5b=_0x490002||(_0x490002={}),_0x5cec5b.Add="add",_0x5cec5b.Subtract="subtract",_0x5cec5b.ReverseSubtract="reverse-subtract",_0x5cec5b.Min="min",_0x5cec5b.Max="max",_0xa46af2=_0x120965||(_0x120965={}),_0xa46af2.Keep="keep",_0xa46af2.Zero="zero",_0xa46af2.Replace="replace",_0xa46af2.Invert="invert",_0xa46af2.IncrementClamp="increment-clamp",_0xa46af2.DecrementClamp="decrement-clamp",_0xa46af2.IncrementWrap="increment-wrap",_0xa46af2.DecrementWrap="decrement-wrap",_0x35ac26=_0x23e041||(_0x23e041={}),_0x35ac26.Uint16="uint16",_0x35ac26.Uint32="uint32",_0x33df1a=_0x1c11b4||(_0x1c11b4={}),_0x33df1a.Uint8x2="uint8x2",_0x33df1a.Uint8x4="uint8x4",_0x33df1a.Sint8x2="sint8x2",_0x33df1a.Sint8x4="sint8x4",_0x33df1a.Unorm8x2="unorm8x2",_0x33df1a.Unorm8x4="unorm8x4",_0x33df1a.Snorm8x2="snorm8x2",_0x33df1a.Snorm8x4="snorm8x4",_0x33df1a.Uint16x2="uint16x2",_0x33df1a.Uint16x4="uint16x4",_0x33df1a.Sint16x2="sint16x2",_0x33df1a.Sint16x4="sint16x4",_0x33df1a.Unorm16x2="unorm16x2",_0x33df1a.Unorm16x4="unorm16x4",_0x33df1a.Snorm16x2="snorm16x2",_0x33df1a.Snorm16x4="snorm16x4",_0x33df1a.Float16x2="float16x2",_0x33df1a.Float16x4="float16x4",_0x33df1a.Float32="float32",_0x33df1a.Float32x2="float32x2",_0x33df1a.Float32x3="float32x3",_0x33df1a.Float32x4="float32x4",_0x33df1a.Uint32="uint32",_0x33df1a.Uint32x2="uint32x2",_0x33df1a.Uint32x3="uint32x3",_0x33df1a.Uint32x4="uint32x4",_0x33df1a.Sint32="sint32",_0x33df1a.Sint32x2="sint32x2",_0x33df1a.Sint32x3="sint32x3",_0x33df1a.Sint32x4="sint32x4",_0x43d996=_0x3f00b2||(_0x3f00b2={}),_0x43d996.Vertex="vertex",_0x43d996.Instance="instance",_0x5d1abb=_0x43c474||(_0x43c474={}),_0x5d1abb.Beginning="beginning",_0x5d1abb.End="end",_0x323d93=_0x549744||(_0x549744={}),_0x323d93.Beginning="beginning",_0x323d93.End="end",_0x3c17d0=_0x52c237||(_0x52c237={}),_0x3c17d0.Load="load",_0x3c17d0.Clear="clear",_0x50802f=_0x5d6cb4||(_0x5d6cb4={}),_0x50802f.Store="store",_0x50802f.Discard="discard",_0x1756b5=_0x11c503||(_0x11c503={}),_0x1756b5.Occlusion="occlusion",_0x1756b5.Timestamp="timestamp",_0x55fb85=_0x543ca3||(_0x543ca3={}),_0x55fb85.Opaque="opaque",_0x55fb85.Premultiplied="premultiplied",(_0x20079d||(_0x20079d={})).Destroyed="destroyed",_0x25ee8e=_0x3f5da4||(_0x3f5da4={}),_0x25ee8e.OutOfMemory="out-of-memory",_0x25ee8e.Validation="validation";var _0x572d87={PredefinedColorSpace:_0x3e0d86,PowerPreference:_0x48aaad,FeatureName:_0x133363,BufferUsage:_0xfcf739,MapMode:_0xa750f9,TextureDimension:_0x248a31,TextureUsage:_0x51c11d,TextureViewDimension:_0x45afcf,TextureAspect:_0x269346,TextureFormat:_0x9a49e3,AddressMode:_0x1c9ed9,FilterMode:_0x59ab0b,CompareFunction:_0x569ef2,ShaderStage:_0x418ade,BufferBindingType:_0x3ff851,SamplerBindingType:_0x12ccae,TextureSampleType:_0x4bc589,StorageTextureAccess:_0x5d188c,CompilationMessageType:_0x6aa9b0,AutoLayoutMode:_0x4d6bed,PrimitiveTopology:_0x4f9d7d,FrontFace:_0x2ac57c,CullMode:_0x18f243,ColorWriteFlags:_0x3392bb,BlendFactor:_0x4dc01d,BlendOperation:_0x490002,StencilOperation:_0x120965,IndexFormat:_0x23e041,VertexFormat:_0x1c11b4,InputStepMode:_0x3f00b2,ComputePassTimestampLocation:_0x43c474,RenderPassTimestampLocation:_0x549744,LoadOp:_0x52c237,StoreOp:_0x5d6cb4,QueryType:_0x11c503,CanvasCompositingAlphaMode:_0x543ca3,DeviceLostReason:_0x20079d,ErrorFilter:_0x3f5da4},_0x2d0ee8=(_0x528035=!0,function(e,t){var i=_0x528035?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x528035=!1,i}),_0x39bef5=_0x2d0ee8(void 0,(function(){return _0x39bef5.toString().search("(((.+)+)+)+$").toString().constructor(_0x39bef5).search("(((.+)+)+)+$")})),_0x528035;function _0x121f46(){}_0x39bef5(),_0x121f46.WithinEpsilon=function(e,t,i){return void 0===i&&(i=1401298e-51),Math.abs(e-t)<=i},_0x121f46.ToHex=function(e){var t=e.toString(16);return e<=15?("0"+t).toUpperCase():t.toUpperCase()},_0x121f46.Sign=function(e){return 0===(e=+e)||isNaN(e)?e:e>0?1:-1},_0x121f46.Clamp=function(e,t,i){return void 0===t&&(t=0),void 0===i&&(i=1),Math.min(i,Math.max(t,e))},_0x121f46.Log2=function(e){return Math.log(e)*Math.LOG2E},_0x121f46.ILog2=function(e){if(Math.log2)return Math.floor(Math.log2(e));if(e<0)return NaN;if(0===e)return-1/0;var t=0;if(e<1){for(;e<1;)t++,e*=2;t=-t}else if(e>1)for(;e>1;)t++,e=Math.floor(e/2);return t},_0x121f46.Repeat=function(e,t){return e-Math.floor(e/t)*t},_0x121f46.Normalize=function(e,t,i){return(e-t)/(i-t)},_0x121f46.Denormalize=function(e,t,i){return e*(i-t)+t},_0x121f46.DeltaAngle=function(e,t){var i=_0x121f46.Repeat(t-e,360);return i>180&&(i-=360),i},_0x121f46.PingPong=function(e,t){var i=_0x121f46.Repeat(e,2*t);return t-Math.abs(i-t)},_0x121f46.SmoothStep=function(e,t,i){var n=_0x121f46.Clamp(i);return t*(n=-2*n*n*n+3*n*n)+e*(1-n)},_0x121f46.MoveTowards=function(e,t,i){return Math.abs(t-e)<=i?t:e+_0x121f46.Sign(t-e)*i},_0x121f46.MoveTowardsAngle=function(e,t,i){var n=_0x121f46.DeltaAngle(e,t),r=0;return-i180&&(n-=360),e+n*_0x121f46.Clamp(i)},_0x121f46.InverseLerp=function(e,t,i){return e!=t?_0x121f46.Clamp((i-e)/(t-e)):0},_0x121f46.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o;return e*(2*a-3*o+1)+i*(-2*a+3*o)+t*(a-2*o+r)+n*(a-o)},_0x121f46.Hermite1stDerivative=function(e,t,i,n,r){var o=r*r;return 6*(o-r)*e+(3*o-4*r+1)*t+6*(-o+r)*i+(3*o-2*r)*n},_0x121f46.RandomRange=function(e,t){return e===t?e:Math.random()*(t-e)+e},_0x121f46.RangeToPercent=function(e,t,i){return(e-t)/(i-t)},_0x121f46.PercentToRange=function(e,t,i){return(i-t)*e+t},_0x121f46.NormalizeRadians=function(e){return e-=_0x121f46.TwoPi*Math.floor((e+Math.PI)/_0x121f46.TwoPi)},_0x121f46.HCF=function(e,t){var i=e%t;return 0===i?t:_0x121f46.HCF(t,i)},_0x121f46.TwoPi=2*Math.PI;var _0x2437bf=(_0x19e662=!0,function(e,t){var i=_0x19e662?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19e662=!1,i}),_0x5d9327=_0x2437bf(void 0,(function(){return _0x5d9327.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d9327).search("(((.+)+)+)+$")})),_0x19e662;function _0x1635a9(e){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=_0x1635a9._Counter++;return this._buffer=e,this}_0x5d9327(),Object.defineProperty(_0x1635a9.prototype,"underlyingResource",{get:function(){return this._buffer},enumerable:!1,configurable:!0}),_0x1635a9._Counter=0;var _0x4e84c2=(_0x4fc32f=!0,function(e,t){var i=_0x4fc32f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fc32f=!1,i}),_0x5733b8=_0x4e84c2(void 0,(function(){return _0x5733b8.toString().search("(((.+)+)+)+$").toString().constructor(_0x5733b8).search("(((.+)+)+)+$")})),_0x4fc32f;function RandomGUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}_0x5733b8();var _0x1e96f7=(_0x25c2de=!0,function(e,t){var i=_0x25c2de?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x25c2de=!1,i}),_0x3459c2=_0x1e96f7(void 0,(function(){return _0x3459c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x3459c2).search("(((.+)+)+)+$")})),_0x25c2de;function _0x4741cb(e){var t=_0x5cc035.call(this,null)||this;return t.metadata=null,t.reservedDataStore=null,t._hasAlpha=!1,t._getAlphaFromRGB=!1,t.level=1,t._coordinatesIndex=0,t._coordinatesMode=_0x354cf8.TEXTURE_EXPLICIT_MODE,t.wrapR=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE,t.anisotropicFilteringLevel=_0x4741cb.DEFAULT_ANISOTROPIC_FILTERING_LEVEL,t._isCube=!1,t._gammaSpace=!0,t.invertZ=!1,t.lodLevelInAlpha=!1,t.isRenderTarget=!1,t._prefiltered=!1,t._forceSerialize=!1,t.animations=new Array,t.onDisposeObservable=new Observable,t._onDisposeObserver=null,t._scene=null,t._uid=null,t._parentContainer=null,t._loadingError=!1,e?_0x4741cb._IsScene(e)?t._scene=e:t._engine=e:t._scene=EngineStore.LastCreatedScene,t._scene&&(t.uniqueId=t._scene.getUniqueId(),t._scene.addTexture(t),t._engine=t._scene.getEngine()),t._uid=null,t}_0x3459c2(),_0x5cc035&&(_0x4741cb.__proto__=_0x5cc035),_0x4741cb.prototype=Object.create(_0x5cc035&&_0x5cc035.prototype),_0x4741cb.prototype.constructor=_0x5cc035,Object.defineProperty(_0x4741cb.prototype,"hasAlpha",{get:function(){return this._hasAlpha},set:function(e){var t=this;this._hasAlpha!==e&&(this._hasAlpha=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"getAlphaFromRGB",{get:function(){return this._getAlphaFromRGB},set:function(e){var t=this;this._getAlphaFromRGB!==e&&(this._getAlphaFromRGB=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"coordinatesIndex",{get:function(){return this._coordinatesIndex},set:function(e){var t=this;this._coordinatesIndex!==e&&(this._coordinatesIndex=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"coordinatesMode",{get:function(){return this._coordinatesMode},set:function(e){var t=this;this._coordinatesMode!==e&&(this._coordinatesMode=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"wrapU",{get:function(){return this._wrapU},set:function(e){this._wrapU=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"wrapV",{get:function(){return this._wrapV},set:function(e){this._wrapV=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"isCube",{get:function(){return this._texture?this._texture.isCube:this._isCube},set:function(e){this._texture?this._texture.isCube=e:this._isCube=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"is3D",{get:function(){return!!this._texture&&this._texture.is3D},set:function(e){this._texture&&(this._texture.is3D=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"is2DArray",{get:function(){return!!this._texture&&this._texture.is2DArray},set:function(e){this._texture&&(this._texture.is2DArray=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"gammaSpace",{get:function(){return this._texture?(null===this._texture._gammaSpace&&(this._texture._gammaSpace=this._gammaSpace),this._texture._gammaSpace&&!this._texture._useSRGBBuffer):this._gammaSpace},set:function(e){if(this._texture){if(this._texture._gammaSpace===e)return;this._texture._gammaSpace=e}else{if(this._gammaSpace===e)return;this._gammaSpace=e}this._markAllSubMeshesAsTexturesDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"isRGBD",{get:function(){return null!=this._texture&&this._texture._isRGBD},set:function(e){this._texture&&(this._texture._isRGBD=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"noMipmap",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"lodGenerationOffset",{get:function(){return this._texture?this._texture._lodGenerationOffset:0},set:function(e){this._texture&&(this._texture._lodGenerationOffset=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"lodGenerationScale",{get:function(){return this._texture?this._texture._lodGenerationScale:0},set:function(e){this._texture&&(this._texture._lodGenerationScale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"linearSpecularLOD",{get:function(){return!!this._texture&&this._texture._linearSpecularLOD},set:function(e){this._texture&&(this._texture._linearSpecularLOD=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"irradianceTexture",{get:function(){return this._texture?this._texture._irradianceTexture:null},set:function(e){this._texture&&(this._texture._irradianceTexture=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"uid",{get:function(){return!this._uid&&(this._uid=RandomGUID()),this._uid},enumerable:!1,configurable:!0}),_0x4741cb.prototype.toString=function(){return this.name},_0x4741cb.prototype.getClassName=function(){return"BaseTexture"},Object.defineProperty(_0x4741cb.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"isBlocking",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"loadingError",{get:function(){return this._loadingError},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"errorObject",{get:function(){return this._errorObject},enumerable:!1,configurable:!0}),_0x4741cb.prototype.getScene=function(){return this._scene},_0x4741cb.prototype._getEngine=function(){return this._engine},_0x4741cb.prototype.checkTransformsAreIdentical=function(e){return null!==e},_0x4741cb.prototype.getTextureMatrix=function(){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityReadOnly},_0x4741cb.prototype.getReflectionTextureMatrix=function(){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityReadOnly},_0x4741cb.prototype.isReadyOrNotBlocking=function(){return!this.isBlocking||this.isReady()||this.loadingError},_0x4741cb.prototype.scale=function(e){},Object.defineProperty(_0x4741cb.prototype,"canRescale",{get:function(){return!1},enumerable:!1,configurable:!0}),_0x4741cb.prototype._getFromCache=function(e,t,i,n,r){var o=this._getEngine();if(!o)return null;for(var a=o._getUseSRGBBuffer(!!r,t),s=o.getLoadedTexturesCache(),l=0;l=0&&this._scene.textures.splice(e,1),this._scene.onTextureRemovedObservable.notifyObservers(this),this._scene=null,this._parentContainer){var t=this._parentContainer.textures.indexOf(this);t>-1&&this._parentContainer.textures.splice(t,1),this._parentContainer=null}}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.metadata=null,_super.prototype.dispose.call(this)},_0x4741cb.prototype.serialize=function(){if(!this.name)return null;var e=_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Serialize(this);return _Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.AppendSerializedAnimations(this,e),e},_0x4741cb.WhenAllReady=function(e,t){var i=e.length;if(0!==i)for(var n=0;n0?e.name:i+e.name,e.url&&(e.url.startsWith("data:")||_0x54f9c4.UseSerializedUrlIfAny)&&(f=e.url),s=new _0x54f9c4(f,t,!l,e.invertY,e.samplingMode,r)}return s}),e,t);return o},_0x54f9c4.CreateFromBase64String=function(e,t,i,n,r,o,a,s,l,u){return void 0===o&&(o=_0x54f9c4.TRILINEAR_SAMPLINGMODE),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=_0x354cf8.TEXTUREFORMAT_RGBA),new _0x54f9c4("data:"+t,i,n,r,o,a,s,e,!1,l,void 0,void 0,u)},_0x54f9c4.LoadFromDataString=function(e,t,i,n,r,o,a,s,l,u,c){return void 0===n&&(n=!1),void 0===o&&(o=!0),void 0===a&&(a=_0x54f9c4.TRILINEAR_SAMPLINGMODE),void 0===s&&(s=null),void 0===l&&(l=null),void 0===u&&(u=_0x354cf8.TEXTUREFORMAT_RGBA),"data:"!==e.substr(0,5)&&(e="data:"+e),new _0x54f9c4(e,i,r,o,a,s,l,t,n,u,void 0,void 0,c)},_0x54f9c4.SerializeBuffers=!0,_0x54f9c4.ForceSerializeBuffers=!1,_0x54f9c4.OnTextureLoadErrorObservable=new Observable,_0x54f9c4._CubeTextureParser=function(e,t,i){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_7__._WarnImport)("CubeTexture")},_0x54f9c4._CreateMirror=function(e,t,i,n){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_7__._WarnImport)("MirrorTexture")},_0x54f9c4._CreateRenderTargetTexture=function(e,t,i,n,r){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_7__._WarnImport)("RenderTargetTexture")},_0x54f9c4.NEAREST_SAMPLINGMODE=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,_0x54f9c4.NEAREST_NEAREST_MIPLINEAR=_0x354cf8.TEXTURE_NEAREST_NEAREST_MIPLINEAR,_0x54f9c4.BILINEAR_SAMPLINGMODE=_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE,_0x54f9c4.LINEAR_LINEAR_MIPNEAREST=_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST,_0x54f9c4.TRILINEAR_SAMPLINGMODE=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE,_0x54f9c4.LINEAR_LINEAR_MIPLINEAR=_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR,_0x54f9c4.NEAREST_NEAREST_MIPNEAREST=_0x354cf8.TEXTURE_NEAREST_NEAREST_MIPNEAREST,_0x54f9c4.NEAREST_LINEAR_MIPNEAREST=_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPNEAREST,_0x54f9c4.NEAREST_LINEAR_MIPLINEAR=_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPLINEAR,_0x54f9c4.NEAREST_LINEAR=_0x354cf8.TEXTURE_NEAREST_LINEAR,_0x54f9c4.NEAREST_NEAREST=_0x354cf8.TEXTURE_NEAREST_NEAREST,_0x54f9c4.LINEAR_NEAREST_MIPNEAREST=_0x354cf8.TEXTURE_LINEAR_NEAREST_MIPNEAREST,_0x54f9c4.LINEAR_NEAREST_MIPLINEAR=_0x354cf8.TEXTURE_LINEAR_NEAREST_MIPLINEAR,_0x54f9c4.LINEAR_LINEAR=_0x354cf8.TEXTURE_LINEAR_LINEAR,_0x54f9c4.LINEAR_NEAREST=_0x354cf8.TEXTURE_LINEAR_NEAREST,_0x54f9c4.EXPLICIT_MODE=_0x354cf8.TEXTURE_EXPLICIT_MODE,_0x54f9c4.SPHERICAL_MODE=_0x354cf8.TEXTURE_SPHERICAL_MODE,_0x54f9c4.PLANAR_MODE=_0x354cf8.TEXTURE_PLANAR_MODE,_0x54f9c4.CUBIC_MODE=_0x354cf8.TEXTURE_CUBIC_MODE,_0x54f9c4.PROJECTION_MODE=_0x354cf8.TEXTURE_PROJECTION_MODE,_0x54f9c4.SKYBOX_MODE=_0x354cf8.TEXTURE_SKYBOX_MODE,_0x54f9c4.INVCUBIC_MODE=_0x354cf8.TEXTURE_INVCUBIC_MODE,_0x54f9c4.EQUIRECTANGULAR_MODE=_0x354cf8.TEXTURE_EQUIRECTANGULAR_MODE,_0x54f9c4.FIXED_EQUIRECTANGULAR_MODE=_0x354cf8.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,_0x54f9c4.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=_0x354cf8.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,_0x54f9c4.CLAMP_ADDRESSMODE=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,_0x54f9c4.WRAP_ADDRESSMODE=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE,_0x54f9c4.MIRROR_ADDRESSMODE=_0x354cf8.TEXTURE_MIRROR_ADDRESSMODE;var _0xbcee0d=(_0x33507a=!0,function(e,t){var i=_0x33507a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33507a=!1,i}),_0xab7ab4=_0xbcee0d(void 0,(function(){return _0xab7ab4.toString().search("(((.+)+)+)+$").toString().constructor(_0xab7ab4).search("(((.+)+)+)+$")})),_0x33507a;function _0x56a0bf(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){void 0===r&&(r=!0),void 0===o&&(o=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),void 0===s&&(s=_0x54f9c4.TRILINEAR_SAMPLINGMODE),void 0===l&&(l=!0),void 0===u&&(u=!1),void 0===c&&(c=!1),void 0===h&&(h=_0x354cf8.TEXTUREFORMAT_RGBA),void 0===d&&(d=!1),void 0===_&&(_=!1),void 0===m&&(m=!1);var g,x=this;if((x=_0x54f9c4.call(this,null,i,!n,void 0,s,void 0,void 0,void 0,void 0,h)||this).renderParticles=!0,x.renderSprites=!1,x.ignoreCameraViewport=!1,x.onBeforeBindObservable=new Observable,x.onAfterUnbindObservable=new Observable,x.onBeforeRenderObservable=new Observable,x.onAfterRenderObservable=new Observable,x.onClearObservable=new Observable,x.onResizeObservable=new Observable,x._cleared=!1,x.skipInitialClear=!1,x._currentRefreshId=-1,x._refreshRate=1,x._samples=1,x._canRescale=!0,x._renderTarget=null,x.boundingBoxPosition=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero(),!(i=x.getScene()))return x;var v=x.getScene().getEngine();return x._coordinatesMode=_0x54f9c4.PROJECTION_MODE,x.renderList=new Array,x.name=e,x.isRenderTarget=!0,x._initialSizeParameter=t,x._renderPassIds=[],x._isCubeData=a,x._processSizeParameter(t),x.renderPassId=x._renderPassIds[0],x._resizeObserver=v.onResizeObservable.add((function(){})),x._generateMipMaps=!!n,x._doNotChangeAspectRatio=r,x._renderingManager=new _Rendering_renderingManager__WEBPACK_IMPORTED_MODULE_6__.RenderingManager(i),x._renderingManager._useSceneAutoClearSetup=!0,c||(x._renderTargetOptions={generateMipMaps:n,type:o,format:null!==(g=x._format)&&void 0!==g?g:void 0,samplingMode:x.samplingMode,generateDepthBuffer:l,generateStencilBuffer:u,samples:f,creationFlags:p,noColorTarget:_,useSRGBBuffer:m},x.samplingMode===_0x54f9c4.NEAREST_SAMPLINGMODE&&(x.wrapU=_0x54f9c4.CLAMP_ADDRESSMODE,x.wrapV=_0x54f9c4.CLAMP_ADDRESSMODE),!d&&(a?(x._renderTarget=i.getEngine().createRenderTargetCubeTexture(x.getRenderSize(),x._renderTargetOptions),x.coordinatesMode=_0x54f9c4.INVCUBIC_MODE,x._textureMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Identity()):x._renderTarget=i.getEngine().createRenderTargetTexture(x._size,x._renderTargetOptions),x._texture=x._renderTarget.texture,void 0!==f&&(x.samples=f))),x}_0xab7ab4(),_0x54f9c4&&(_0x56a0bf.__proto__=_0x54f9c4),_0x56a0bf.prototype=Object.create(_0x54f9c4&&_0x54f9c4.prototype),_0x56a0bf.prototype.constructor=_0x54f9c4,Object.defineProperty(_0x56a0bf.prototype,"renderList",{get:function(){return this._renderList},set:function(e){this._renderList=e,this._renderList&&this._hookArray(this._renderList)},enumerable:!1,configurable:!0}),_0x56a0bf.prototype._hookArray=function(e){var t=this,i=e.push;e.push=function(){for(var n,r=[],o=0;o0&&(this._postProcesses[0].autoClear=!1))}},_0x56a0bf.prototype._shouldRender=function(){return-1===this._currentRefreshId||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1)},_0x56a0bf.prototype.getRenderSize=function(){return this.getRenderWidth()},_0x56a0bf.prototype.getRenderWidth=function(){return this._size.width?this._size.width:this._size},_0x56a0bf.prototype.getRenderHeight=function(){return this._size.width?this._size.height:this._size},_0x56a0bf.prototype.getRenderLayers=function(){var e=this._size.layers;return e||0},_0x56a0bf.prototype.disableRescaling=function(){this._canRescale=!1},Object.defineProperty(_0x56a0bf.prototype,"canRescale",{get:function(){return this._canRescale},enumerable:!1,configurable:!0}),_0x56a0bf.prototype.scale=function(e){var t=Math.max(1,this.getRenderSize()*e);this.resize(t)},_0x56a0bf.prototype.getReflectionTextureMatrix=function(){return this.isCube?this._textureMatrix:_super.prototype.getReflectionTextureMatrix.call(this)},_0x56a0bf.prototype.resize=function(e){var t,i=this.isCube;null===(t=this._renderTarget)||void 0===t||t.dispose(),this._renderTarget=null;var n=this.getScene();n&&(this._processSizeParameter(e),this._renderTarget=i?n.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions):n.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this._texture=this._renderTarget.texture,void 0!==this._renderTargetOptions.samples&&(this.samples=this._renderTargetOptions.samples),this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this))},_0x56a0bf.prototype.render=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),this._render(e,t)},_0x56a0bf.prototype.isReadyForRendering=function(){return this._render(!1,!1,!0)},_0x56a0bf.prototype._render=function(e,t,i){var n;void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===i&&(i=!1);var r=this.getScene();if(!r)return i;var o=r.getEngine();if(void 0!==this.useCameraPostProcesses&&(e=this.useCameraPostProcesses),this._waitingRenderList){this.renderList=[];for(var a=0;a1||this.activeCamera&&this.activeCamera!==r.activeCamera)&&r.setTransformMatrix(r.activeCamera.getViewMatrix(),r.activeCamera.getProjectionMatrix(!0)),o.setViewport(r.activeCamera.viewport)),r.resetCachedMaterial(),f},_0x56a0bf.prototype._bestReflectionRenderTargetDimension=function(e,t){var i=e*t,n=_Engines_engine__WEBPACK_IMPORTED_MODULE_10__.Engine.NearestPOT(i+16384/(128+i));return Math.min(_Engines_engine__WEBPACK_IMPORTED_MODULE_10__.Engine.FloorPOT(e),n)},_0x56a0bf.prototype._prepareRenderingManager=function(e,t,i,n){var r=this.getScene();if(r){this._renderingManager.reset();for(var o=r.getRenderId(),a=0;a=0&&this._renderingManager.dispatchParticles(f))}}},_0x56a0bf.prototype._bindFrameBuffer=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0);var i=this.getScene();if(i){var n=i.getEngine();this._renderTarget&&n.bindFramebuffer(this._renderTarget,this.isCube?e:void 0,void 0,void 0,this.ignoreCameraViewport,0,t)}},_0x56a0bf.prototype._unbindFrameBuffer=function(e,t){var i=this;this._renderTarget&&e.unBindFramebuffer(this._renderTarget,this.isCube,(function(){i.onAfterRenderObservable.notifyObservers(t)}))},_0x56a0bf.prototype._prepareFrame=function(e,t,i,n){this._postProcessManager?!this._prePassEnabled&&this._postProcessManager._prepareFrame(this._texture,this._postProcesses):(!n||!e.postProcessManager._prepareFrame(this._texture))&&this._bindFrameBuffer(t,i)},_0x56a0bf.prototype._renderToTarget=function(e,t,i,n,r){var o,a,s,l,u,c;void 0===n&&(n=0),void 0===r&&(r=null);var h=this.getScene();if(h){var d=h.getEngine();if(null===(o=d._debugPushGroup)||void 0===o||o.call(d,"render to face #".concat(e," layer #").concat(n),1),this._prepareFrame(h,e,n,t),this.is2DArray?(d.currentRenderPassId=this._renderPassIds[n],this.onBeforeRenderObservable.notifyObservers(n)):(d.currentRenderPassId=this._renderPassIds[e],this.onBeforeRenderObservable.notifyObservers(e)),d.snapshotRendering&&d.snapshotRenderingMode===_0x354cf8.SNAPSHOTRENDERING_FAST)this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(d):!this.skipInitialClear&&d.clear(this.clearColor||h.clearColor,!0,!0,!0);else{var f=null,p=this.renderList?this.renderList:h.getActiveMeshes().data,_=this.renderList?this.renderList.length:h.getActiveMeshes().length;this.getCustomRenderList&&(f=this.getCustomRenderList(this.is2DArray?n:e,p,_)),f?this._prepareRenderingManager(f,f.length,r,!1):(!this._defaultRenderListPrepared&&(this._prepareRenderingManager(p,_,r,!this.renderList),this._defaultRenderListPrepared=!0),f=p);for(var m=0,g=h._beforeRenderTargetClearStage;m=0&&t.customRenderTargets.splice(i,1);for(var n=0,r=t.cameras;n=0&&o.customRenderTargets.splice(i,1)}null===(e=this._renderTarget)||void 0===e||e.dispose(),this._renderTarget=null,this._texture=null,_super.prototype.dispose.call(this)}},_0x56a0bf.prototype._rebuild=function(){this.refreshRate===_0x56a0bf.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=_0x56a0bf.REFRESHRATE_RENDER_ONCE),this._postProcessManager&&this._postProcessManager._rebuild()},_0x56a0bf.prototype.freeRenderingGroups=function(){this._renderingManager&&this._renderingManager.freeRenderingGroups()},_0x56a0bf.prototype.getViewCount=function(){return 1},_0x56a0bf.REFRESHRATE_RENDER_ONCE=0,_0x56a0bf.REFRESHRATE_RENDER_ONEVERYFRAME=1,_0x56a0bf.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2,_0x54f9c4._CreateRenderTargetTexture=function(e,t,i,n,r){return new _0x56a0bf(e,t,i,n)};var _0x46f48a=(_0x2d566a=!0,function(e,t){var i=_0x2d566a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d566a=!1,i}),_0x38b7f0=_0x46f48a(void 0,(function(){return _0x38b7f0.toString().search("(((.+)+)+)+$").toString().constructor(_0x38b7f0).search("(((.+)+)+)+$")})),_0x2d566a,_0x4d2140,_0x677e6f;function _0x269372(e,t,i,n){void 0===n&&(n=!0);var r=e.getScene(),o=r.getEngine(),a=new _0x56a0bf("resized"+e.name,{width:t,height:i},r,!e.noMipmap,!0,e._texture.type,!1,e.samplingMode,!1);a.wrapU=e.wrapU,a.wrapV=e.wrapV,a.uOffset=e.uOffset,a.vOffset=e.vOffset,a.uScale=e.uScale,a.vScale=e.vScale,a.uAng=e.uAng,a.vAng=e.vAng,a.wAng=e.wAng,a.coordinatesIndex=e.coordinatesIndex,a.level=e.level,a.anisotropicFilteringLevel=e.anisotropicFilteringLevel,a._texture.isReady=!1,e.wrapU=_0x54f9c4.CLAMP_ADDRESSMODE,e.wrapV=_0x54f9c4.CLAMP_ADDRESSMODE;var s=new _PostProcesses_passPostProcess__WEBPACK_IMPORTED_MODULE_2__.PassPostProcess("pass",1,null,n?_0x54f9c4.BILINEAR_SAMPLINGMODE:_0x54f9c4.NEAREST_SAMPLINGMODE,o,!1,_0x354cf8.TEXTURETYPE_UNSIGNED_INT);return s.externalTextureSamplerBinding=!0,s.getEffect().executeWhenCompiled((function(){s.onApply=function(t){t.setTexture("textureSampler",e)};var t=a.renderTarget;t&&(r.postProcessManager.directRender([s],t),o.unBindFramebuffer(t),a.disposeFramebufferObjects(),s.dispose(),a.getInternalTexture().isReady=!0)})),a}function _0x4b8601(e,t,i,n,r,o){var a=t.getEngine();return t.isReady=!1,r=null!=r?r:t.samplingMode,n=null!=n?n:t.type,o=null!=o?o:t.format,-1===n&&(n=_0x354cf8.TEXTURETYPE_UNSIGNED_BYTE),new Promise((function(s){var l=new _PostProcesses_postProcess__WEBPACK_IMPORTED_MODULE_4__.PostProcess("postprocess",e,null,null,1,null,r,a,!1,void 0,n,void 0,null,!1,o);l.externalTextureSamplerBinding=!0;var u=a.createRenderTargetTexture({width:t.width,height:t.height},{generateDepthBuffer:!1,generateMipMaps:!1,generateStencilBuffer:!1,samplingMode:r,type:n,format:o});l.getEffect().executeWhenCompiled((function(){l.onApply=function(e){e._bindTexture("textureSampler",t),e.setFloat2("scale",1,1)},i.postProcessManager.directRender([l],u,!0),a.restoreDefaultFramebuffer(),a._releaseTexture(t),l&&l.dispose(),u._swapAndDie(t),t.type=n,t.format=_0x354cf8.TEXTUREFORMAT_RGBA,t.isReady=!0,s(t)}))}))}function _0x4f80c1(e){!_0x4d2140&&(_0x4d2140=new Float32Array(1),_0x677e6f=new Int32Array(_0x4d2140.buffer)),_0x4d2140[0]=e;var t=_0x677e6f[0],i=t>>16&32768,n=t>>12&2047,r=t>>23&255;return r<103?i:r>142?(i|=31744,i|=(255==r?0:1)&&8388607&t):r<113?i|=((n|=2048)>>114-r)+(n>>113-r&1):(i|=r-112<<10|n>>1,i+=1&n)}function _0x477872(e){var t=(32768&e)>>15,i=(31744&e)>>10,n=1023&e;return 0===i?(t?-1:1)*Math.pow(2,-14)*(n/Math.pow(2,10)):31==i?n?NaN:1/0*(t?-1:1):(t?-1:1)*Math.pow(2,i-15)*(1+n/Math.pow(2,10))}_0x38b7f0();var _0x3956bb={CreateResizedCopy:_0x269372,ApplyPostProcess:_0x4b8601,ToHalfFloat:_0x4f80c1,FromHalfFloat:_0x477872},_0x158594=(_0x8c041=!0,function(e,t){var i=_0x8c041?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8c041=!1,i}),_0x91d1e5=_0x158594(void 0,(function(){return _0x91d1e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x91d1e5).search("(((.+)+)+)+$")})),_0x8c041;function _0x3e00(e){void 0===e&&(e=!0),this._isDepthTestDirty=!1,this._isDepthMaskDirty=!1,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1,e&&this.reset()}_0x91d1e5(),Object.defineProperty(_0x3e00.prototype,"isDirty",{get:function(){return this._isDepthFuncDirty||this._isDepthTestDirty||this._isDepthMaskDirty||this._isCullFaceDirty||this._isCullDirty||this._isZOffsetDirty||this._isFrontFaceDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"zOffset",{get:function(){return this._zOffset},set:function(e){this._zOffset!==e&&(this._zOffset=e,this._isZOffsetDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"zOffsetUnits",{get:function(){return this._zOffsetUnits},set:function(e){this._zOffsetUnits!==e&&(this._zOffsetUnits=e,this._isZOffsetDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"cullFace",{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,this._isCullFaceDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"cull",{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this._isCullDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"depthFunc",{get:function(){return this._depthFunc},set:function(e){this._depthFunc!==e&&(this._depthFunc=e,this._isDepthFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"depthMask",{get:function(){return this._depthMask},set:function(e){this._depthMask!==e&&(this._depthMask=e,this._isDepthMaskDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"depthTest",{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._isDepthTestDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"frontFace",{get:function(){return this._frontFace},set:function(e){this._frontFace!==e&&(this._frontFace=e,this._isFrontFaceDirty=!0)},enumerable:!1,configurable:!0}),_0x3e00.prototype.reset=function(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._zOffsetUnits=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!0,this._isFrontFaceDirty=!1},_0x3e00.prototype.apply=function(e){this.isDirty&&(this._isCullDirty&&(this.cull?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this._isCullDirty=!1),this._isCullFaceDirty&&(e.cullFace(this.cullFace),this._isCullFaceDirty=!1),this._isDepthMaskDirty&&(e.depthMask(this.depthMask),this._isDepthMaskDirty=!1),this._isDepthTestDirty&&(this.depthTest?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this._isDepthTestDirty=!1),this._isDepthFuncDirty&&(e.depthFunc(this.depthFunc),this._isDepthFuncDirty=!1),this._isZOffsetDirty&&(this.zOffset||this.zOffsetUnits?(e.enable(e.POLYGON_OFFSET_FILL),e.polygonOffset(this.zOffset,this.zOffsetUnits)):e.disable(e.POLYGON_OFFSET_FILL),this._isZOffsetDirty=!1),this._isFrontFaceDirty&&(e.frontFace(this.frontFace),this._isFrontFaceDirty=!1))};var _0x33d770=(_0xea0721=!0,function(e,t){var i=_0xea0721?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xea0721=!1,i}),_0x4a338d=_0x33d770(void 0,(function(){return _0x4a338d.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a338d).search("(((.+)+)+)+$")})),_0xea0721;function _0x18bf87(){this._blendFunctionParameters=new Array(4),this._blendEquationParameters=new Array(2),this._blendConstants=new Array(4),this._isBlendConstantsDirty=!1,this._alphaBlend=!1,this._isAlphaBlendDirty=!1,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this.reset()}_0x4a338d(),Object.defineProperty(_0x18bf87.prototype,"isDirty",{get:function(){return this._isAlphaBlendDirty||this._isBlendFunctionParametersDirty||this._isBlendEquationParametersDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_0x18bf87.prototype,"alphaBlend",{get:function(){return this._alphaBlend},set:function(e){this._alphaBlend!==e&&(this._alphaBlend=e,this._isAlphaBlendDirty=!0)},enumerable:!1,configurable:!0}),_0x18bf87.prototype.setAlphaBlendConstants=function(e,t,i,n){this._blendConstants[0]===e&&this._blendConstants[1]===t&&this._blendConstants[2]===i&&this._blendConstants[3]===n||(this._blendConstants[0]=e,this._blendConstants[1]=t,this._blendConstants[2]=i,this._blendConstants[3]=n,this._isBlendConstantsDirty=!0)},_0x18bf87.prototype.setAlphaBlendFunctionParameters=function(e,t,i,n){this._blendFunctionParameters[0]===e&&this._blendFunctionParameters[1]===t&&this._blendFunctionParameters[2]===i&&this._blendFunctionParameters[3]===n||(this._blendFunctionParameters[0]=e,this._blendFunctionParameters[1]=t,this._blendFunctionParameters[2]=i,this._blendFunctionParameters[3]=n,this._isBlendFunctionParametersDirty=!0)},_0x18bf87.prototype.setAlphaEquationParameters=function(e,t){this._blendEquationParameters[0]===e&&this._blendEquationParameters[1]===t||(this._blendEquationParameters[0]=e,this._blendEquationParameters[1]=t,this._isBlendEquationParametersDirty=!0)},_0x18bf87.prototype.reset=function(){this._alphaBlend=!1,this._blendFunctionParameters[0]=null,this._blendFunctionParameters[1]=null,this._blendFunctionParameters[2]=null,this._blendFunctionParameters[3]=null,this._blendEquationParameters[0]=null,this._blendEquationParameters[1]=null,this._blendConstants[0]=null,this._blendConstants[1]=null,this._blendConstants[2]=null,this._blendConstants[3]=null,this._isAlphaBlendDirty=!0,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1},_0x18bf87.prototype.apply=function(e){this.isDirty&&(this._isAlphaBlendDirty&&(this._alphaBlend?e.enable(e.BLEND):e.disable(e.BLEND),this._isAlphaBlendDirty=!1),this._isBlendFunctionParametersDirty&&(e.blendFuncSeparate(this._blendFunctionParameters[0],this._blendFunctionParameters[1],this._blendFunctionParameters[2],this._blendFunctionParameters[3]),this._isBlendFunctionParametersDirty=!1),this._isBlendEquationParametersDirty&&(e.blendEquationSeparate(this._blendEquationParameters[0],this._blendEquationParameters[1]),this._isBlendEquationParametersDirty=!1),this._isBlendConstantsDirty&&(e.blendColor(this._blendConstants[0],this._blendConstants[1],this._blendConstants[2],this._blendConstants[3]),this._isBlendConstantsDirty=!1))};var _0x3e24e6=(_0x3edf35=!0,function(e,t){var i=_0x3edf35?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3edf35=!1,i}),_0x1c8924=_0x3e24e6(void 0,(function(){return _0x1c8924.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c8924).search("(((.+)+)+)+$")})),_0x3edf35;function IsWindowObjectExist(){return"undefined"!=typeof window}function IsDocumentAvailable(){return"undefined"!=typeof document}function GetDOMTextContent(e){for(var t="",i=e.firstChild;i;)3===i.nodeType&&(t+=i.textContent),i=i.nextSibling;return t}_0x1c8924();var _0xa37f10=(_0x484633=!0,function(e,t){var i=_0x484633?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x484633=!1,i}),_0x1ec180=_0xa37f10(void 0,(function(){return _0x1ec180.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ec180).search("(((.+)+)+)+$")})),_0x484633;function _0x2659bc(e){void 0===e&&(e=!0),this._isStencilTestDirty=!1,this._isStencilMaskDirty=!1,this._isStencilFuncDirty=!1,this._isStencilOpDirty=!1,this.useStencilGlobalOnly=!1,e&&this.reset()}_0x1ec180(),Object.defineProperty(_0x2659bc.prototype,"isDirty",{get:function(){return this._isStencilTestDirty||this._isStencilMaskDirty||this._isStencilFuncDirty||this._isStencilOpDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"func",{get:function(){return this._func},set:function(e){this._func!==e&&(this._func=e,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"funcRef",{get:function(){return this._funcRef},set:function(e){this._funcRef!==e&&(this._funcRef=e,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"funcMask",{get:function(){return this._funcMask},set:function(e){this._funcMask!==e&&(this._funcMask=e,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"opStencilFail",{get:function(){return this._opStencilFail},set:function(e){this._opStencilFail!==e&&(this._opStencilFail=e,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"opDepthFail",{get:function(){return this._opDepthFail},set:function(e){this._opDepthFail!==e&&(this._opDepthFail=e,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"opStencilDepthPass",{get:function(){return this._opStencilDepthPass},set:function(e){this._opStencilDepthPass!==e&&(this._opStencilDepthPass=e,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask!==e&&(this._mask=e,this._isStencilMaskDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,this._isStencilTestDirty=!0)},enumerable:!1,configurable:!0}),_0x2659bc.prototype.reset=function(){var e;this.stencilMaterial=void 0,null===(e=this.stencilGlobal)||void 0===e||e.reset(),this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0},_0x2659bc.prototype.apply=function(e){var t;if(e){var i=!this.useStencilGlobalOnly&&!!(null===(t=this.stencilMaterial)||void 0===t?void 0:t.enabled);this.enabled=i?this.stencilMaterial.enabled:this.stencilGlobal.enabled,this.func=i?this.stencilMaterial.func:this.stencilGlobal.func,this.funcRef=i?this.stencilMaterial.funcRef:this.stencilGlobal.funcRef,this.funcMask=i?this.stencilMaterial.funcMask:this.stencilGlobal.funcMask,this.opStencilFail=i?this.stencilMaterial.opStencilFail:this.stencilGlobal.opStencilFail,this.opDepthFail=i?this.stencilMaterial.opDepthFail:this.stencilGlobal.opDepthFail,this.opStencilDepthPass=i?this.stencilMaterial.opStencilDepthPass:this.stencilGlobal.opStencilDepthPass,this.mask=i?this.stencilMaterial.mask:this.stencilGlobal.mask,this.isDirty&&(this._isStencilTestDirty&&(this.enabled?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this._isStencilTestDirty=!1),this._isStencilMaskDirty&&(e.stencilMask(this.mask),this._isStencilMaskDirty=!1),this._isStencilFuncDirty&&(e.stencilFunc(this.func,this.funcRef,this.funcMask),this._isStencilFuncDirty=!1),this._isStencilOpDirty&&(e.stencilOp(this.opStencilFail,this.opDepthFail,this.opStencilDepthPass),this._isStencilOpDirty=!1))}};var _0x4e6693=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));return i(),function(){}}();function _0xb82ccc(e,t,i,n){var r=this;this._name="WebGL",this.forcePOTTextures=!1,this.isFullscreen=!1,this.cullBackFaces=null,this.renderEvenInBackground=!0,this.preventCacheWipeBetweenFrames=!1,this.validateShaderPrograms=!1,this._useReverseDepthBuffer=!1,this.isNDCHalfZRange=!1,this.hasOriginBottomLeft=!0,this.disableUniformBuffers=!1,this.onDisposeObservable=new Observable,this._frameId=0,this._uniformBuffers=new Array,this._storageBuffers=new Array,this._webGLVersion=1,this._windowIsBackground=!1,this._highPrecisionShadersAllowed=!0,this._badOS=!1,this._badDesktopOS=!1,this._renderingQueueLaunched=!1,this._activeRenderLoops=new Array,this.onContextLostObservable=new Observable,this.onContextRestoredObservable=new Observable,this._contextWasLost=!1,this._doNotHandleContextLost=!1,this.disableVertexArrayObjects=!1,this._colorWrite=!0,this._colorWriteChanged=!0,this._depthCullingState=new _0x3e00,this._stencilStateComposer=new _0x2659bc,this._stencilState=new _0x4bbfae,this._alphaState=new _0x18bf87,this._alphaMode=_0x354cf8.ALPHA_ADD,this._alphaEquation=_0x354cf8.ALPHA_DISABLE,this._internalTexturesCache=new Array,this._renderTargetWrapperCache=new Array,this._activeChannel=0,this._currentTextureChannel=-1,this._boundTexturesCache={},this._compiledEffects={},this._vertexAttribArraysEnabled=[],this._uintIndicesCurrentlySet=!1,this._currentBoundBuffer=new Array,this._currentFramebuffer=null,this._dummyFramebuffer=null,this._currentBufferPointers=new Array,this._currentInstanceLocations=new Array,this._currentInstanceBuffers=new Array,this._vaoRecordInProgress=!1,this._mustWipeVertexAttributes=!1,this._nextFreeTextureSlots=new Array,this._maxSimultaneousTextures=0,this._maxMSAASamplesOverride=null,this._activeRequests=new Array,this._adaptToDeviceRatio=!1,this._transformTextureUrl=null,this.hostInformation={isMobile:!1},this.premultipliedAlpha=!0,this.onBeforeTextureInitObservable=new Observable,this._isWebGPU=!1,this._snapshotRenderingMode=_0x354cf8.SNAPSHOTRENDERING_STANDARD,this._viewportCached={x:0,y:0,z:0,w:0},this._unpackFlipYCached=null,this.enableUnpackFlipYCached=!0,this._boundUniforms={};var o=null;if(i=i||{},this._creationOptions=i,this._adaptToDeviceRatio=null!=n&&n,this._stencilStateComposer.stencilGlobal=this._stencilState,_0x17f3d8.SetMatrixPrecision(!!i.useHighPrecisionMatrix),e){if(n=n||i.adaptToDeviceRatio||!1,e.getContext){if(o=e,this._renderingCanvas=o,void 0!==t&&(i.antialias=t),void 0===i.deterministicLockstep&&(i.deterministicLockstep=!1),void 0===i.lockstepMaxSteps&&(i.lockstepMaxSteps=4),void 0===i.timeStep&&(i.timeStep=1/60),void 0===i.preserveDrawingBuffer&&(i.preserveDrawingBuffer=!1),void 0===i.audioEngine&&(i.audioEngine=!0),void 0!==i.audioEngineOptions&&void 0!==i.audioEngineOptions.audioContext&&(this._audioContext=i.audioEngineOptions.audioContext),void 0!==i.audioEngineOptions&&void 0!==i.audioEngineOptions.audioDestination&&(this._audioDestination=i.audioEngineOptions.audioDestination),void 0===i.stencil&&(i.stencil=!0),!1===i.premultipliedAlpha&&(this.premultipliedAlpha=!1),void 0===i.xrCompatible&&(i.xrCompatible=!0),this._doNotHandleContextLost=!!i.doNotHandleContextLost,navigator&&navigator.userAgent){this._checkForMobile=function(){var e=navigator.userAgent;r.hostInformation.isMobile=-1!==e.indexOf("Mobile")||-1!==e.indexOf("Mac")&&IsDocumentAvailable()&&"ontouchend"in document},this._checkForMobile(),IsWindowObjectExist()&&window.addEventListener("resize",this._checkForMobile);for(var a=navigator.userAgent,s=0,l=_0xb82ccc.ExceptionList;s0)if(parseInt(p[p.length-1])>=f)continue}for(var _=0,m=h;_1?new _WebGL_webGL2ShaderProcessors__WEBPACK_IMPORTED_MODULE_13__.WebGL2ShaderProcessor:new _WebGL_webGLShaderProcessors__WEBPACK_IMPORTED_MODULE_12__.WebGLShaderProcessor,this._badOS=/iPad/i.test(navigator.userAgent)||/iPhone/i.test(navigator.userAgent);var $="Babylon.js v".concat(_0xb82ccc.Version);console.log($+" - ".concat(this.description)),this._renderingCanvas&&this._renderingCanvas.setAttribute&&this._renderingCanvas.setAttribute("data-engine",$)}}Object.defineProperty(_0xb82ccc,"NpmPackage",{get:function(){return"babylonjs@5.9.0"},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc,"Version",{get:function(){return"5.9.0"},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"description",{get:function(){var e=this.name+this.webGLVersion;return this._caps.parallelShaderCompile&&(e+=" - Parallel shader compilation"),e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"version",{get:function(){return this._webGLVersion},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc,"ShadersRepository",{get:function(){return _Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ShadersRepository},set:function(e){_Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ShadersRepository=e},enumerable:!1,configurable:!0}),_0xb82ccc.prototype._getShaderProcessor=function(e){return this._shaderProcessor},Object.defineProperty(_0xb82ccc.prototype,"useReverseDepthBuffer",{get:function(){return this._useReverseDepthBuffer},set:function(e){e!==this._useReverseDepthBuffer&&(this._useReverseDepthBuffer=e,this._depthCullingState.depthFunc=e?_0x354cf8.GEQUAL:_0x354cf8.LEQUAL)},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"frameId",{get:function(){return this._frameId},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"supportsUniformBuffers",{get:function(){return this.webGLVersion>1&&!this.disableUniformBuffers},enumerable:!1,configurable:!0}),_0xb82ccc.prototype.getCreationOptions=function(){return this._creationOptions},Object.defineProperty(_0xb82ccc.prototype,"_shouldUseHighPrecisionShader",{get:function(){return!(!this._caps.highPrecisionShaderSupported||!this._highPrecisionShadersAllowed)},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"needPOTTextures",{get:function(){return this._webGLVersion<2||this.forcePOTTextures},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"activeRenderLoops",{get:function(){return this._activeRenderLoops},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"doNotHandleContextLost",{get:function(){return this._doNotHandleContextLost},set:function(e){this._doNotHandleContextLost=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"_supportsHardwareTextureRescaling",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"framebufferDimensionsObject",{set:function(e){this._framebufferDimensionsObject=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"currentViewport",{get:function(){return this._cachedViewport},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"emptyTexture",{get:function(){return!this._emptyTexture&&(this._emptyTexture=this.createRawTexture(new Uint8Array(4),1,1,_0x354cf8.TEXTUREFORMAT_RGBA,!1,!1,_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"emptyTexture3D",{get:function(){return!this._emptyTexture3D&&(this._emptyTexture3D=this.createRawTexture3D(new Uint8Array(4),1,1,1,_0x354cf8.TEXTUREFORMAT_RGBA,!1,!1,_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture3D},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"emptyTexture2DArray",{get:function(){return!this._emptyTexture2DArray&&(this._emptyTexture2DArray=this.createRawTexture2DArray(new Uint8Array(4),1,1,1,_0x354cf8.TEXTUREFORMAT_RGBA,!1,!1,_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture2DArray},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"emptyCubeTexture",{get:function(){if(!this._emptyCubeTexture){var e=new Uint8Array(4),t=[e,e,e,e,e,e];this._emptyCubeTexture=this.createRawCubeTexture(t,1,_0x354cf8.TEXTUREFORMAT_RGBA,_0x354cf8.TEXTURETYPE_UNSIGNED_INT,!1,!1,_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE)}return this._emptyCubeTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"isWebGPU",{get:function(){return this._isWebGPU},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"shaderPlatformName",{get:function(){return this._shaderPlatformName},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"snapshotRendering",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"snapshotRenderingMode",{get:function(){return this._snapshotRenderingMode},set:function(e){this._snapshotRenderingMode=e},enumerable:!1,configurable:!0}),_0xb82ccc.prototype.snapshotRenderingReset=function(){this.snapshotRendering=!1},_0xb82ccc._CreateCanvas=function(e,t){if("undefined"==typeof document)return new OffscreenCanvas(e,t);var i=document.createElement("canvas");return i.width=e,i.height=t,i},_0xb82ccc.prototype.createCanvas=function(e,t){return _0xb82ccc._CreateCanvas(e,t)},_0xb82ccc.prototype.createCanvasImage=function(){return document.createElement("img")},_0xb82ccc.prototype._restoreEngineAfterContextLost=function(e){var t=this;setTimeout((function(){return(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(t,void 0,void 0,(function(){var t,i,n,r,o;return(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this,(function(a){switch(a.label){case 0:return this._dummyFramebuffer=null,t=this._depthCullingState.depthTest,i=this._depthCullingState.depthFunc,n=this._depthCullingState.depthMask,r=this._stencilState.stencilTest,[4,e()];case 1:return a.sent(),this._rebuildEffects(),null===(o=this._rebuildComputeEffects)||void 0===o||o.call(this),this._rebuildInternalTextures(),this._rebuildRenderTargetWrappers(),this._rebuildBuffers(),this.wipeCaches(!0),this._depthCullingState.depthTest=t,this._depthCullingState.depthFunc=i,this._depthCullingState.depthMask=n,this._stencilState.stencilTest=r,_0x41154e.Warn(this.name+" context successfully restored."),this.onContextRestoredObservable.notifyObservers(this),this._contextWasLost=!1,[2]}}))}))}),0)},_0xb82ccc.prototype._sharedInit=function(e,t,i){this._renderingCanvas=e},_0xb82ccc.prototype._getShaderProcessingContext=function(e){return null},_0xb82ccc.prototype._rebuildInternalTextures=function(){for(var e=0,t=this._internalTexturesCache.slice();e1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile")||void 0,standardDerivatives:this._webGLVersion>1||null!==this._gl.getExtension("OES_standard_derivatives"),maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),s3tc_srgb:this._gl.getExtension("WEBGL_compressed_texture_s3tc_srgb")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc_srgb"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||null!==this._gl.getExtension("OES_element_index_uint"),fragmentDepthSupported:this._webGLVersion>1||null!==this._gl.getExtension("EXT_frag_depth"),highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),supportOcclusionQuery:this._webGLVersion>1,canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float")),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1,canUseGLInstanceID:this._webGLVersion>1,canUseGLVertexID:this._webGLVersion>1,supportComputeShaders:!1,supportSRGBBuffers:!1,supportTransformFeedbacks:this._webGLVersion>1,textureMaxLevel:this._webGLVersion>1,texture2DArrayMaxLayerCount:this._webGLVersion>1?256:128},this._glVersion=this._gl.getParameter(this._gl.VERSION);var e=this._gl.getExtension("WEBGL_debug_renderer_info");if(null!=e&&(this._glRenderer=this._gl.getParameter(e.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(e.UNMASKED_VENDOR_WEBGL)),!this._glVendor&&(this._glVendor=this._gl.getParameter(this._gl.VENDOR)||"Unknown vendor"),!this._glRenderer&&(this._glRenderer=this._gl.getParameter(this._gl.RENDERER)||"Unknown renderer"),36193!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=36193),34842!==this._gl.RGBA16F&&(this._gl.RGBA16F=34842),34836!==this._gl.RGBA32F&&(this._gl.RGBA32F=34836),35056!==this._gl.DEPTH24_STENCIL8&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(1===this._webGLVersion&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!(!this._caps.textureFloat||!this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!(!this._caps.textureFloat||!this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._caps.astc&&(this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR),this._caps.bptc&&(this._gl.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=this._caps.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT),this._caps.s3tc_srgb&&(this._gl.COMPRESSED_SRGB_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT),this._caps.etc2&&(this._gl.COMPRESSED_SRGB8_ETC2=this._caps.etc2.COMPRESSED_SRGB8_ETC2,this._gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=this._caps.etc2.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC),this._webGLVersion>1&&5131!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=null!==this._maxMSAASamplesOverride?this._maxMSAASamplesOverride:this._gl.getParameter(this._gl.MAX_SAMPLES);else{var t=this._gl.getExtension("WEBGL_draw_buffers");if(null!==t){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=t.drawBuffersWEBGL.bind(t),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(var i=0;i<16;i++)this._gl["COLOR_ATTACHMENT"+i+"_WEBGL"]=t["COLOR_ATTACHMENT"+i+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{var n=this._gl.getExtension("WEBGL_depth_texture");null!=n&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=n.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{var r=this._gl.getExtension("OES_vertex_array_object");null!=r&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=r.createVertexArrayOES.bind(r),this._gl.bindVertexArray=r.bindVertexArrayOES.bind(r),this._gl.deleteVertexArray=r.deleteVertexArrayOES.bind(r))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{var o=this._gl.getExtension("ANGLE_instanced_arrays");null!=o?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=o.drawArraysInstancedANGLE.bind(o),this._gl.drawElementsInstanced=o.drawElementsInstancedANGLE.bind(o),this._gl.vertexAttribDivisor=o.vertexAttribDivisorANGLE.bind(o)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){var a=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),s=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);a&&s&&(this._caps.highPrecisionShaderSupported=0!==a.precision&&0!==s.precision)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{var l=this._gl.getExtension("EXT_blend_minmax");null!=l&&(this._caps.blendMinMax=!0,this._gl.MAX=l.MAX_EXT,this._gl.MIN=l.MIN_EXT)}if(!this._caps.supportSRGBBuffers){if(this._webGLVersion>1)this._caps.supportSRGBBuffers=!0;else{var u=this._gl.getExtension("EXT_sRGB");null!=u&&(this._caps.supportSRGBBuffers=!0,this._gl.SRGB=u.SRGB_EXT,this._gl.SRGB8=u.SRGB_ALPHA_EXT,this._gl.SRGB8_ALPHA8=u.SRGB_ALPHA_EXT)}this._caps.supportSRGBBuffers=this._caps.supportSRGBBuffers&&!(!this._creationOptions||!this._creationOptions.forceSRGBBufferSupportState)}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(var c=0;c=0&&this._activeRenderLoops.splice(t,1)}else this._activeRenderLoops=[]},_0xb82ccc.prototype._renderLoop=function(){if(!this._contextWasLost){var e=!0;if(!this.renderEvenInBackground&&this._windowIsBackground&&(e=!1),e){this.beginFrame();for(var t=0;t0?this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},_0xb82ccc.prototype.getRenderingCanvas=function(){return this._renderingCanvas},_0xb82ccc.prototype.getAudioContext=function(){return this._audioContext},_0xb82ccc.prototype.getAudioDestination=function(){return this._audioDestination},_0xb82ccc.prototype.getHostWindow=function(){return IsWindowObjectExist()?this._renderingCanvas&&this._renderingCanvas.ownerDocument&&this._renderingCanvas.ownerDocument.defaultView?this._renderingCanvas.ownerDocument.defaultView:window:null},_0xb82ccc.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth},_0xb82ccc.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight},_0xb82ccc.prototype._queueNewFrame=function(e,t){return _0xb82ccc.QueueNewFrame(e,t)},_0xb82ccc.prototype.runRenderLoop=function(e){-1===this._activeRenderLoops.indexOf(e)&&(this._activeRenderLoops.push(e),!this._renderingQueueLaunched&&(this._renderingQueueLaunched=!0,this._boundRenderFunction=this._renderLoop.bind(this),this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow())))},_0xb82ccc.prototype.clear=function(e,t,i,n){void 0===n&&(n=!1);var r=this.stencilStateComposer.useStencilGlobalOnly;this.stencilStateComposer.useStencilGlobalOnly=!0,this.applyStates(),this.stencilStateComposer.useStencilGlobalOnly=r;var o=0;t&&e&&(this._gl.clearColor(e.r,e.g,e.b,void 0!==e.a?e.a:1),o|=this._gl.COLOR_BUFFER_BIT),i&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GEQUAL,this._gl.clearDepth(0)):this._gl.clearDepth(1),o|=this._gl.DEPTH_BUFFER_BIT),n&&(this._gl.clearStencil(0),o|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(o)},_0xb82ccc.prototype._viewport=function(e,t,i,n){(e!==this._viewportCached.x||t!==this._viewportCached.y||i!==this._viewportCached.z||n!==this._viewportCached.w)&&(this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=i,this._viewportCached.w=n,this._gl.viewport(e,t,i,n))},_0xb82ccc.prototype.setViewport=function(e,t,i){var n=t||this.getRenderWidth(),r=i||this.getRenderHeight(),o=e.x||0,a=e.y||0;this._cachedViewport=e,this._viewport(o*n,a*r,n*e.width,r*e.height)},_0xb82ccc.prototype.beginFrame=function(){},_0xb82ccc.prototype.endFrame=function(){this._badOS&&this.flushFramebuffer(),this._frameId++},_0xb82ccc.prototype.resize=function(e){var t,i;if(void 0===e&&(e=!1),this._adaptToDeviceRatio){var n=IsWindowObjectExist()&&window.devicePixelRatio||1,r=this._creationOptions.limitDeviceRatio||n;this._hardwareScalingLevel=this._adaptToDeviceRatio?1/Math.min(r,n):1}IsWindowObjectExist()?(t=this._renderingCanvas?this._renderingCanvas.clientWidth||this._renderingCanvas.width:window.innerWidth,i=this._renderingCanvas?this._renderingCanvas.clientHeight||this._renderingCanvas.height:window.innerHeight):(t=this._renderingCanvas?this._renderingCanvas.width:100,i=this._renderingCanvas?this._renderingCanvas.height:100),this.setSize(t/this._hardwareScalingLevel,i/this._hardwareScalingLevel,e)},_0xb82ccc.prototype.setSize=function(e,t,i){return void 0===i&&(i=!1),!!this._renderingCanvas&&(e|=0,t|=0,!(!i&&this._renderingCanvas.width===e&&this._renderingCanvas.height===t)&&(this._renderingCanvas.width=e,this._renderingCanvas.height=t,!0))},_0xb82ccc.prototype.bindFramebuffer=function(e,t,i,n,r,o,a){var s,l,u,c,h;void 0===t&&(t=0),void 0===o&&(o=0),void 0===a&&(a=0);var d=e;this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._bindUnboundFramebuffer(d._MSAAFramebuffer?d._MSAAFramebuffer:d._framebuffer);var f=this._gl;e.is2DArray?f.framebufferTextureLayer(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,null===(s=e.texture._hardwareTexture)||void 0===s?void 0:s.underlyingResource,o,a):e.isCube&&f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_CUBE_MAP_POSITIVE_X+t,null===(l=e.texture._hardwareTexture)||void 0===l?void 0:l.underlyingResource,o);var p=e._depthStencilTexture;if(p){var _=e._depthStencilTextureWithStencil?f.DEPTH_STENCIL_ATTACHMENT:f.DEPTH_ATTACHMENT;e.is2DArray?f.framebufferTextureLayer(f.FRAMEBUFFER,_,null===(u=p._hardwareTexture)||void 0===u?void 0:u.underlyingResource,o,a):e.isCube?f.framebufferTexture2D(f.FRAMEBUFFER,_,f.TEXTURE_CUBE_MAP_POSITIVE_X+t,null===(c=p._hardwareTexture)||void 0===c?void 0:c.underlyingResource,o):f.framebufferTexture2D(f.FRAMEBUFFER,_,f.TEXTURE_2D,null===(h=p._hardwareTexture)||void 0===h?void 0:h.underlyingResource,o)}this._cachedViewport&&!r?this.setViewport(this._cachedViewport,i,n):(!i&&(i=e.width,o&&(i/=Math.pow(2,o))),!n&&(n=e.height,o&&(n/=Math.pow(2,o))),this._viewport(0,0,i,n)),this.wipeCaches()},_0xb82ccc.prototype.setState=function(e,t,i,n,r,o,a){var s,l;void 0===t&&(t=0),void 0===n&&(n=!1),void 0===a&&(a=0),(this._depthCullingState.cull!==e||i)&&(this._depthCullingState.cull=e);var u=null===(l=null!==(s=this.cullBackFaces)&&void 0!==s?s:r)||void 0===l||l?this._gl.BACK:this._gl.FRONT;(this._depthCullingState.cullFace!==u||i)&&(this._depthCullingState.cullFace=u),this.setZOffset(t),this.setZOffsetUnits(a);var c=n?this._gl.CW:this._gl.CCW;(this._depthCullingState.frontFace!==c||i)&&(this._depthCullingState.frontFace=c),this._stencilStateComposer.stencilMaterial=o},_0xb82ccc.prototype.setZOffset=function(e){this._depthCullingState.zOffset=this.useReverseDepthBuffer?-e:e},_0xb82ccc.prototype.getZOffset=function(){var e=this._depthCullingState.zOffset;return this.useReverseDepthBuffer?-e:e},_0xb82ccc.prototype.setZOffsetUnits=function(e){this._depthCullingState.zOffsetUnits=this.useReverseDepthBuffer?-e:e},_0xb82ccc.prototype.getZOffsetUnits=function(){var e=this._depthCullingState.zOffsetUnits;return this.useReverseDepthBuffer?-e:e},_0xb82ccc.prototype._bindUnboundFramebuffer=function(e){this._currentFramebuffer!==e&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,e),this._currentFramebuffer=e)},_0xb82ccc.prototype._currentFrameBufferIsDefaultFrameBuffer=function(){return null===this._currentFramebuffer},_0xb82ccc.prototype.generateMipmaps=function(e){this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)},_0xb82ccc.prototype.unBindFramebuffer=function(e,t,i){var n;void 0===t&&(t=!1);var r=e;this._currentRenderTarget=null;var o=this._gl;if(r._MSAAFramebuffer){if(e.isMulti)return void this.unBindMultiColorAttachmentFramebuffer(e,t,i);o.bindFramebuffer(o.READ_FRAMEBUFFER,r._MSAAFramebuffer),o.bindFramebuffer(o.DRAW_FRAMEBUFFER,r._framebuffer),o.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,o.COLOR_BUFFER_BIT,o.NEAREST)}(null===(n=e.texture)||void 0===n?void 0:n.generateMipMaps)&&!t&&!e.isCube&&this.generateMipmaps(e.texture),i&&(r._MSAAFramebuffer&&this._bindUnboundFramebuffer(r._framebuffer),i()),this._bindUnboundFramebuffer(null)},_0xb82ccc.prototype.flushFramebuffer=function(){this._gl.flush()},_0xb82ccc.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},_0xb82ccc.prototype._resetVertexBufferBinding=function(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null},_0xb82ccc.prototype.createVertexBuffer=function(e){return this._createVertexBuffer(e,this._gl.STATIC_DRAW)},_0xb82ccc.prototype._createVertexBuffer=function(e,t){var i=this._gl.createBuffer();if(!i)throw new Error("Unable to create vertex buffer");var n=new _Meshes_WebGL_webGLDataBuffer__WEBPACK_IMPORTED_MODULE_14__.WebGLDataBuffer(i);return this.bindArrayBuffer(n),e instanceof Array?this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),t):this._gl.bufferData(this._gl.ARRAY_BUFFER,e,t),this._resetVertexBufferBinding(),n.references=1,n},_0xb82ccc.prototype.createDynamicVertexBuffer=function(e){return this._createVertexBuffer(e,this._gl.DYNAMIC_DRAW)},_0xb82ccc.prototype._resetIndexBufferBinding=function(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null},_0xb82ccc.prototype.createIndexBuffer=function(e,t){var i=this._gl.createBuffer(),n=new _Meshes_WebGL_webGLDataBuffer__WEBPACK_IMPORTED_MODULE_14__.WebGLDataBuffer(i);if(!i)throw new Error("Unable to create index buffer");this.bindIndexBuffer(n);var r=this._normalizeIndexData(e);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,r,t?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),n.references=1,n.is32Bits=4===r.BYTES_PER_ELEMENT,n},_0xb82ccc.prototype._normalizeIndexData=function(e){if(2===e.BYTES_PER_ELEMENT)return e;if(this._caps.uintIndices){if(e instanceof Uint32Array)return e;for(var t=0;t=65535)return new Uint32Array(e);return new Uint16Array(e)}return new Uint16Array(e)},_0xb82ccc.prototype.bindArrayBuffer=function(e){!this._vaoRecordInProgress&&this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ARRAY_BUFFER)},_0xb82ccc.prototype.bindUniformBlock=function(e,t,i){var n=e.program,r=this._gl.getUniformBlockIndex(n,t);this._gl.uniformBlockBinding(n,r,i)},_0xb82ccc.prototype.bindIndexBuffer=function(e){!this._vaoRecordInProgress&&this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ELEMENT_ARRAY_BUFFER)},_0xb82ccc.prototype._bindBuffer=function(e,t){(this._vaoRecordInProgress||this._currentBoundBuffer[t]!==e)&&(this._gl.bindBuffer(t,e?e.underlyingResource:null),this._currentBoundBuffer[t]=e)},_0xb82ccc.prototype.updateArrayBuffer=function(e){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,e)},_0xb82ccc.prototype._vertexAttribPointer=function(e,t,i,n,r,o,a){var s=this._currentBufferPointers[t];if(s){var l=!1;s.active?(s.buffer!==e&&(s.buffer=e,l=!0),s.size!==i&&(s.size=i,l=!0),s.type!==n&&(s.type=n,l=!0),s.normalized!==r&&(s.normalized=r,l=!0),s.stride!==o&&(s.stride=o,l=!0),s.offset!==a&&(s.offset=a,l=!0)):(l=!0,s.active=!0,s.index=t,s.size=i,s.type=n,s.normalized=r,s.stride=o,s.offset=a,s.buffer=e),(l||this._vaoRecordInProgress)&&(this.bindArrayBuffer(e),this._gl.vertexAttribPointer(t,i,n,r,o,a))}},_0xb82ccc.prototype._bindIndexBufferWithCache=function(e){null!=e&&this._cachedIndexBuffer!==e&&(this._cachedIndexBuffer=e,this.bindIndexBuffer(e),this._uintIndicesCurrentlySet=e.is32Bits)},_0xb82ccc.prototype._bindVertexBuffersAttributes=function(e,t,i){var n=t.getAttributesNames();!this._vaoRecordInProgress&&this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var r=0;r=0){var a=n[r],s=null;if(i&&(s=i[a]),!s&&(s=e[a]),!s)continue;this._gl.enableVertexAttribArray(o),!this._vaoRecordInProgress&&(this._vertexAttribArraysEnabled[o]=!0);var l=s.getBuffer();l&&(this._vertexAttribPointer(l,o,s.getSize(),s.type,s.normalized,s.byteStride,s.byteOffset),s.getIsInstanced()&&(this._gl.vertexAttribDivisor(o,s.getInstanceDivisor()),!this._vaoRecordInProgress&&(this._currentInstanceLocations.push(o),this._currentInstanceBuffers.push(l))))}}},_0xb82ccc.prototype.recordVertexArrayObject=function(e,t,i,n){var r=this._gl.createVertexArray();return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(r),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(e,i,n),this.bindIndexBuffer(t),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),r},_0xb82ccc.prototype.bindVertexArrayObject=function(e,t){this._cachedVertexArrayObject!==e&&(this._cachedVertexArrayObject=e,this._gl.bindVertexArray(e),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=null!=t&&t.is32Bits,this._mustWipeVertexAttributes=!0)},_0xb82ccc.prototype.bindBuffersDirectly=function(e,t,i,n,r){if(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==r){this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=r;var o=r.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var a=0,s=0;s=0&&(this._gl.enableVertexAttribArray(l),this._vertexAttribArraysEnabled[l]=!0,this._vertexAttribPointer(e,l,i[s],this._gl.FLOAT,!1,n,a)),a+=4*i[s]}}this._bindIndexBufferWithCache(t)},_0xb82ccc.prototype._unbindVertexArrayObject=function(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))},_0xb82ccc.prototype.bindBuffers=function(e,t,i,n){(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==i)&&(this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=i,this._bindVertexBuffersAttributes(e,i,n)),this._bindIndexBufferWithCache(t)},_0xb82ccc.prototype.unbindInstanceAttributes=function(){for(var e,t=0,i=this._currentInstanceLocations.length;t1?"#version 300 es\n#define WEBGL2 \n":"",s=this._compileShader(t,"vertex",n,a),l=this._compileShader(i,"fragment",n,a);return this._createShaderProgram(e,s,l,r,o)},_0xb82ccc.prototype.inlineShaderCode=function(e){return e},_0xb82ccc.prototype.createPipelineContext=function(e){var t=new _WebGL_webGLPipelineContext__WEBPACK_IMPORTED_MODULE_15__.WebGLPipelineContext;return t.engine=this,this._caps.parallelShaderCompile&&(t.isParallelCompiled=!0),t},_0xb82ccc.prototype.createMaterialContext=function(){},_0xb82ccc.prototype.createDrawContext=function(){},_0xb82ccc.prototype._createShaderProgram=function(e,t,i,n,r){var o=n.createProgram();if(e.program=o,!o)throw new Error("Unable to create program");return n.attachShader(o,t),n.attachShader(o,i),n.linkProgram(o),e.context=n,e.vertexShader=t,e.fragmentShader=i,!e.isParallelCompiled&&this._finalizePipelineContext(e),o},_0xb82ccc.prototype._finalizePipelineContext=function(e){var t=e.context,i=e.vertexShader,n=e.fragmentShader,r=e.program;if(!t.getProgramParameter(r,t.LINK_STATUS)){var o,a;if(!this._gl.getShaderParameter(i,this._gl.COMPILE_STATUS))if(o=this._gl.getShaderInfoLog(i))throw e.vertexCompilationError=o,new Error("VERTEX SHADER "+o);if(!this._gl.getShaderParameter(n,this._gl.COMPILE_STATUS))if(o=this._gl.getShaderInfoLog(n))throw e.fragmentCompilationError=o,new Error("FRAGMENT SHADER "+o);if(a=t.getProgramInfoLog(r))throw e.programLinkError=a,new Error(a)}if(this.validateShaderPrograms&&(t.validateProgram(r),!t.getProgramParameter(r,t.VALIDATE_STATUS)&&(a=t.getProgramInfoLog(r))))throw e.programValidationError=a,new Error(a);t.deleteShader(i),t.deleteShader(n),e.vertexShader=void 0,e.fragmentShader=void 0,e.onCompiled&&(e.onCompiled(),e.onCompiled=void 0)},_0xb82ccc.prototype._preparePipelineContext=function(e,t,i,n,r,o,a,s,l,u){var c=e;c.program=n?this.createRawShaderProgram(c,t,i,void 0,l):this.createShaderProgram(c,t,i,s,void 0,l),c.program.__SPECTOR_rebuildProgram=a},_0xb82ccc.prototype._isRenderingStateCompiled=function(e){var t=e;return!!this._gl.getProgramParameter(t.program,this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)&&(this._finalizePipelineContext(t),!0)},_0xb82ccc.prototype._executeWhenRenderingStateIsCompiled=function(e,t){var i=e;if(i.isParallelCompiled){var n=i.onCompiled;i.onCompiled=n?function(){n(),t()}:t}else t()},_0xb82ccc.prototype.getUniforms=function(e,t){for(var i=new Array,n=e,r=0;r1||this.isWebGPU),r.type!==_0x354cf8.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?r.type===_0x354cf8.TEXTURETYPE_HALF_FLOAT&&!this._caps.textureHalfFloatLinearFiltering&&(r.samplingMode=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE):r.samplingMode=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,r.type===_0x354cf8.TEXTURETYPE_FLOAT&&!this._caps.textureFloat&&(r.type=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,_0x41154e.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));var o=this._gl,a=new InternalTexture(this,n);a._useSRGBBuffer=!!r.useSRGBBuffer;var s=e.width||e,l=e.height||e,u=e.layers||0,c=this._getSamplingParameters(r.samplingMode,!!r.generateMipMaps),h=0!==u?o.TEXTURE_2D_ARRAY:o.TEXTURE_2D,d=this._getRGBABufferInternalSizedFormat(r.type,r.format,r.useSRGBBuffer),f=this._getInternalFormat(r.format),p=this._getWebGLTextureType(r.type);return this._bindTextureDirectly(h,a),0!==u?(a.is2DArray=!0,o.texImage3D(h,0,d,s,l,u,0,f,p,null)):o.texImage2D(h,0,d,s,l,0,f,p,null),o.texParameteri(h,o.TEXTURE_MAG_FILTER,c.mag),o.texParameteri(h,o.TEXTURE_MIN_FILTER,c.min),o.texParameteri(h,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(h,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),r.generateMipMaps&&this._gl.generateMipmap(h),this._bindTextureDirectly(h,null),a.baseWidth=s,a.baseHeight=l,a.width=s,a.height=l,a.depth=u,a.isReady=!0,a.samples=1,a.generateMipMaps=!!r.generateMipMaps,a.samplingMode=r.samplingMode,a.type=r.type,a.format=r.format,this._internalTexturesCache.push(a),a},_0xb82ccc.prototype._getUseSRGBBuffer=function(e,t){return e&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU||t)},_0xb82ccc.prototype._createTextureBase=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=this;void 0===r&&(r=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===u&&(u=null),void 0===c&&(c=null),void 0===h&&(h=null),void 0===d&&(d=null);var g="data:"===(e=e||"").substr(0,5),x="blob:"===e.substr(0,5),v=g&&-1!==e.indexOf(";base64,"),y=c||new InternalTexture(this,InternalTextureSource.Url),$=e;this._transformTextureUrl&&!v&&!c&&!u&&(e=this._transformTextureUrl(e)),$!==e&&(y._originalUrl=$);var b=e.lastIndexOf("."),T=d||(b>-1?e.substring(b).toLowerCase():""),C=null;T.indexOf("?")>-1&&(T=T.split("?")[0]);for(var S=0,w=_0xb82ccc._TextureLoaders;Sd||i.height>d||!_._supportsHardwareTextureRescaling)return _._prepareWorkingCanvas(),!(!_._workingCanvas||!_._workingContext)&&(_._workingCanvas.width=e,_._workingCanvas.height=t,_._workingContext.drawImage(i,0,0,i.width,i.height,0,0,e,t),s.texImage2D(s.TEXTURE_2D,0,c,h,s.UNSIGNED_BYTE,_._workingCanvas),o.width=e,o.height=t,!1);var f=new InternalTexture(_,InternalTextureSource.Temp);return _._bindTextureDirectly(s.TEXTURE_2D,f,!0),s.texImage2D(s.TEXTURE_2D,0,c,h,s.UNSIGNED_BYTE,i),_._rescaleTexture(f,o,n,c,(function(){_._releaseTexture(f),_._bindTextureDirectly(s.TEXTURE_2D,o,!0),a()})),!0}),s,l,u,c,h,d,p)},_0xb82ccc._FileToolsLoadImage=function(e,t,i,n,r,o){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("FileTools")},_0xb82ccc.prototype._rescaleTexture=function(e,t,i,n,r){},_0xb82ccc.prototype.createRawTexture=function(e,t,i,n,r,o,a,s,l,u,c){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0xb82ccc.prototype.createRawCubeTexture=function(e,t,i,n,r,o,a,s){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0xb82ccc.prototype.createRawTexture3D=function(e,t,i,n,r,o,a,s,l,u){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0xb82ccc.prototype.createRawTexture2DArray=function(e,t,i,n,r,o,a,s,l,u){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0xb82ccc.prototype._unpackFlipY=function(e){this._unpackFlipYCached!==e&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,e?1:0),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=e))},_0xb82ccc.prototype._getUnpackAlignement=function(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)},_0xb82ccc.prototype._getTextureTarget=function(e){return e.isCube?this._gl.TEXTURE_CUBE_MAP:e.is3D?this._gl.TEXTURE_3D:e.is2DArray||e.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D},_0xb82ccc.prototype.updateTextureSamplingMode=function(e,t,i){void 0===i&&(i=!1);var n=this._getTextureTarget(t),r=this._getSamplingParameters(e,t.generateMipMaps||i);this._setTextureParameterInteger(n,this._gl.TEXTURE_MAG_FILTER,r.mag,t),this._setTextureParameterInteger(n,this._gl.TEXTURE_MIN_FILTER,r.min),i&&(t.generateMipMaps=!0,this._gl.generateMipmap(n)),this._bindTextureDirectly(n,null),t.samplingMode=e},_0xb82ccc.prototype.updateTextureDimensions=function(e,t,i,n){},_0xb82ccc.prototype.updateTextureWrappingMode=function(e,t,i,n){void 0===i&&(i=null),void 0===n&&(n=null);var r=this._getTextureTarget(e);null!==t&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t),e),e._cachedWrapU=t),null!==i&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(i),e),e._cachedWrapV=i),(e.is2DArray||e.is3D)&&null!==n&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(n),e),e._cachedWrapR=n),this._bindTextureDirectly(r,null)},_0xb82ccc.prototype._setupDepthStencilTexture=function(e,t,i,n,r,o){void 0===o&&(o=1);var a=t.width||t,s=t.height||t,l=t.layers||0;e.baseWidth=a,e.baseHeight=s,e.width=a,e.height=s,e.is2DArray=l>0,e.depth=l,e.isReady=!0,e.samples=o,e.generateMipMaps=!1,e.samplingMode=n?_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE:_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,e.type=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,e._comparisonFunction=r;var u=this._gl,c=this._getTextureTarget(e),h=this._getSamplingParameters(e.samplingMode,!1);u.texParameteri(c,u.TEXTURE_MAG_FILTER,h.mag),u.texParameteri(c,u.TEXTURE_MIN_FILTER,h.min),u.texParameteri(c,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(c,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),0===r?(u.texParameteri(c,u.TEXTURE_COMPARE_FUNC,_0x354cf8.LEQUAL),u.texParameteri(c,u.TEXTURE_COMPARE_MODE,u.NONE)):(u.texParameteri(c,u.TEXTURE_COMPARE_FUNC,r),u.texParameteri(c,u.TEXTURE_COMPARE_MODE,u.COMPARE_REF_TO_TEXTURE))},_0xb82ccc.prototype._uploadCompressedDataToTextureDirectly=function(e,t,i,n,r,o,a){void 0===o&&(o=0),void 0===a&&(a=0);var s=this._gl,l=s.TEXTURE_2D;if(e.isCube&&(l=s.TEXTURE_CUBE_MAP_POSITIVE_X+o),e._useSRGBBuffer)switch(t){case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2:case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL:this._caps.etc2?t=s.COMPRESSED_SRGB8_ETC2:e._useSRGBBuffer=!1;break;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC:this._caps.etc2?t=s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:e._useSRGBBuffer=!1;break;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM:t=s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;break;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4:t=s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;break;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1:this._caps.s3tc_srgb?t=s.COMPRESSED_SRGB_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1:this._caps.s3tc_srgb?t=s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5:this._caps.s3tc_srgb?t=s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:e._useSRGBBuffer=!1;break;default:e._useSRGBBuffer=!1}this._gl.compressedTexImage2D(l,a,t,i,n,0,r)},_0xb82ccc.prototype._uploadDataToTextureDirectly=function(e,t,i,n,r,o){void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=!1);var a=this._gl,s=this._getWebGLTextureType(e.type),l=this._getInternalFormat(e.format),u=void 0===r?this._getRGBABufferInternalSizedFormat(e.type,e.format,e._useSRGBBuffer):this._getInternalFormat(r,e._useSRGBBuffer);this._unpackFlipY(e.invertY);var c=a.TEXTURE_2D;e.isCube&&(c=a.TEXTURE_CUBE_MAP_POSITIVE_X+i);var h=Math.round(Math.log(e.width)*Math.LOG2E),d=Math.round(Math.log(e.height)*Math.LOG2E),f=o?e.width:Math.pow(2,Math.max(h-n,0)),p=o?e.height:Math.pow(2,Math.max(d-n,0));a.texImage2D(c,n,u,f,p,0,l,s,t)},_0xb82ccc.prototype.updateTextureData=function(e,t,i,n,r,o,a,s,l){void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=!1);var u=this._gl,c=this._getWebGLTextureType(e.type),h=this._getInternalFormat(e.format);this._unpackFlipY(e.invertY);var d=u.TEXTURE_2D;e.isCube&&(d=u.TEXTURE_CUBE_MAP_POSITIVE_X+a),this._bindTextureDirectly(d,e,!0),u.texSubImage2D(d,s,i,n,r,o,h,c,t),l&&this._gl.generateMipmap(d),this._bindTextureDirectly(d,null)},_0xb82ccc.prototype._uploadArrayBufferViewToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=this._gl,o=e.isCube?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D;this._bindTextureDirectly(o,e,!0),this._uploadDataToTextureDirectly(e,t,i,n),this._bindTextureDirectly(o,null,!0)},_0xb82ccc.prototype._prepareWebGLTextureContinuation=function(e,t,i,n,r){var o=this._gl;if(o){var a=this._getSamplingParameters(r,!i);o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,a.mag),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,a.min),!i&&!n&&o.generateMipmap(o.TEXTURE_2D),this._bindTextureDirectly(o.TEXTURE_2D,null),t&&t._removePendingData(e),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}},_0xb82ccc.prototype._prepareWebGLTexture=function(e,t,i,n,r,o,a,s,l){var u=this;void 0===l&&(l=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE);var c=this.getCaps().maxTextureSize,h=Math.min(c,this.needPOTTextures?_0xb82ccc.GetExponentOfTwo(n.width,c):n.width),d=Math.min(c,this.needPOTTextures?_0xb82ccc.GetExponentOfTwo(n.height,c):n.height),f=this._gl;f&&(e._hardwareTexture?(this._bindTextureDirectly(f.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===r||!!r),e.baseWidth=n.width,e.baseHeight=n.height,e.width=h,e.height=d,e.isReady=!0,s(h,d,n,t,e,(function(){u._prepareWebGLTextureContinuation(e,i,o,a,l)}))||this._prepareWebGLTextureContinuation(e,i,o,a,l)):i&&i._removePendingData(e))},_0xb82ccc.prototype._setupFramebufferDepthAttachments=function(e,t,i,n,r){void 0===r&&(r=1);var o=this._gl;if(e&&t)return this._createRenderBuffer(i,n,r,o.DEPTH_STENCIL,o.DEPTH24_STENCIL8,o.DEPTH_STENCIL_ATTACHMENT);if(t){var a=o.DEPTH_COMPONENT16;return this._webGLVersion>1&&(a=o.DEPTH_COMPONENT32F),this._createRenderBuffer(i,n,r,a,a,o.DEPTH_ATTACHMENT)}return e?this._createRenderBuffer(i,n,r,o.STENCIL_INDEX8,o.STENCIL_INDEX8,o.STENCIL_ATTACHMENT):null},_0xb82ccc.prototype._createRenderBuffer=function(e,t,i,n,r,o,a){void 0===a&&(a=!0);var s=this._gl,l=s.createRenderbuffer();return s.bindRenderbuffer(s.RENDERBUFFER,l),i>1&&s.renderbufferStorageMultisample?s.renderbufferStorageMultisample(s.RENDERBUFFER,i,r,e,t):s.renderbufferStorage(s.RENDERBUFFER,n,e,t),s.framebufferRenderbuffer(s.FRAMEBUFFER,o,s.RENDERBUFFER,l),a&&s.bindRenderbuffer(s.RENDERBUFFER,null),l},_0xb82ccc.prototype._releaseTexture=function(e){var t;this._deleteTexture(null===(t=e._hardwareTexture)||void 0===t?void 0:t.underlyingResource),this.unbindAllTextures();var i=this._internalTexturesCache.indexOf(e);-1!==i&&this._internalTexturesCache.splice(i,1),e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureLow&&e._lodTextureLow.dispose(),e._irradianceTexture&&e._irradianceTexture.dispose()},_0xb82ccc.prototype._releaseRenderTargetWrapper=function(e){var t=this._renderTargetWrapperCache.indexOf(e);-1!==t&&this._renderTargetWrapperCache.splice(t,1)},_0xb82ccc.prototype._deleteTexture=function(e){e&&this._gl.deleteTexture(e)},_0xb82ccc.prototype._setProgram=function(e){this._currentProgram!==e&&(this._gl.useProgram(e),this._currentProgram=e)},_0xb82ccc.prototype.bindSamplers=function(e){var t=e.getPipelineContext();this._setProgram(t.program);for(var i=e.getSamplers(),n=0;n-1;if(i&&s&&(this._activeChannel=t._associatedChannel),this._boundTexturesCache[this._activeChannel]!==t||n){if(this._activateCurrentTexture(),t&&t.isMultiview)throw console.error(e,t),"_bindTextureDirectly called with a multiview texture!";this._gl.bindTexture(e,null!==(o=null===(r=null==t?void 0:t._hardwareTexture)||void 0===r?void 0:r.underlyingResource)&&void 0!==o?o:null),this._boundTexturesCache[this._activeChannel]=t,t&&(t._associatedChannel=this._activeChannel)}else i&&(a=!0,this._activateCurrentTexture());return s&&!i&&this._bindSamplerUniformToChannel(t._associatedChannel,this._activeChannel),a},_0xb82ccc.prototype._bindTexture=function(e,t,i){if(void 0!==e){t&&(t._associatedChannel=e),this._activeChannel=e;var n=t?this._getTextureTarget(t):this._gl.TEXTURE_2D;this._bindTextureDirectly(n,t)}},_0xb82ccc.prototype.unbindAllTextures=function(){for(var e=0;e1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))},_0xb82ccc.prototype.setTexture=function(e,t,i,n){void 0!==e&&(t&&(this._boundUniforms[e]=t),this._setTexture(e,i))},_0xb82ccc.prototype._bindSamplerUniformToChannel=function(e,t){var i=this._boundUniforms[e];i&&i._currentState!==t&&(this._gl.uniform1i(i,t),i._currentState=t)},_0xb82ccc.prototype._getTextureWrapMode=function(e){switch(e){case _0x354cf8.TEXTURE_WRAP_ADDRESSMODE:return this._gl.REPEAT;case _0x354cf8.TEXTURE_CLAMP_ADDRESSMODE:return this._gl.CLAMP_TO_EDGE;case _0x354cf8.TEXTURE_MIRROR_ADDRESSMODE:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT},_0xb82ccc.prototype._setTexture=function(e,t,i,n,r){if(void 0===i&&(i=!1),void 0===n&&(n=!1),!t)return null!=this._boundTexturesCache[e]&&(this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(t.video)this._activeChannel=e,t.update();else if(t.delayLoadState===_0x354cf8.DELAYLOADSTATE_NOTLOADED)return t.delayLoad(),!1;var o;o=n?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!i&&o&&(o._associatedChannel=e);var a=!0;this._boundTexturesCache[e]===o&&(!i&&this._bindSamplerUniformToChannel(o._associatedChannel,e),a=!1),this._activeChannel=e;var s=this._getTextureTarget(o);if(a&&this._bindTextureDirectly(s,o,i),o&&!o.isMultiview){if(o.isCube&&o._cachedCoordinatesMode!==t.coordinatesMode){o._cachedCoordinatesMode=t.coordinatesMode;var l=t.coordinatesMode!==_0x354cf8.TEXTURE_CUBIC_MODE&&t.coordinatesMode!==_0x354cf8.TEXTURE_SKYBOX_MODE?_0x354cf8.TEXTURE_WRAP_ADDRESSMODE:_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE;t.wrapU=l,t.wrapV=l}o._cachedWrapU!==t.wrapU&&(o._cachedWrapU=t.wrapU,this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t.wrapU),o)),o._cachedWrapV!==t.wrapV&&(o._cachedWrapV=t.wrapV,this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(t.wrapV),o)),o.is3D&&o._cachedWrapR!==t.wrapR&&(o._cachedWrapR=t.wrapR,this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(t.wrapR),o)),this._setAnisotropicLevel(s,o,t.anisotropicFilteringLevel)}return!0},_0xb82ccc.prototype.setTextureArray=function(e,t,i,n){if(void 0!==e&&t){(!this._textureUnits||this._textureUnits.length!==i.length)&&(this._textureUnits=new Int32Array(i.length));for(var r=0;r=this._caps.maxVertexAttribs||!this._vertexAttribArraysEnabled[e]||this.disableAttributeByIndex(e)}},_0xb82ccc.prototype.releaseEffects=function(){for(var e in this._compiledEffects){var t=this._compiledEffects[e].getPipelineContext();this._deletePipelineContext(t)}this._compiledEffects={}},_0xb82ccc.prototype.dispose=function(){var e;this.stopRenderLoop(),this.onBeforeTextureInitObservable&&this.onBeforeTextureInitObservable.clear(),this._emptyTexture&&(this._releaseTexture(this._emptyTexture),this._emptyTexture=null),this._emptyCubeTexture&&(this._releaseTexture(this._emptyCubeTexture),this._emptyCubeTexture=null),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.releaseEffects(),null===(e=this.releaseComputeEffects)||void 0===e||e.call(this),this.unbindAllAttributes(),this._boundUniforms=[],IsWindowObjectExist()&&this._renderingCanvas&&(!this._doNotHandleContextLost&&(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored)),window.removeEventListener("resize",this._checkForMobile)),this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers=[],this._renderingCanvas=null,this._currentProgram=null,this._boundRenderFunction=null,_Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ResetCache();for(var t=0,i=this._activeRequests;t1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(_0x354cf8.TEXTURETYPE_FLOAT)},_0xb82ccc.prototype._canRenderToHalfFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(_0x354cf8.TEXTURETYPE_HALF_FLOAT)},_0xb82ccc.prototype._canRenderToFramebuffer=function(e){for(var t=this._gl;t.getError()!==t.NO_ERROR;);var i=!0,n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(e),1,1,0,t.RGBA,this._getWebGLTextureType(e),null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);var r=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,r),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0);var o=t.checkFramebufferStatus(t.FRAMEBUFFER);if((i=(i=i&&o===t.FRAMEBUFFER_COMPLETE)&&t.getError()===t.NO_ERROR)&&(t.clear(t.COLOR_BUFFER_BIT),i=i&&t.getError()===t.NO_ERROR),i){t.bindFramebuffer(t.FRAMEBUFFER,null);var a=t.RGBA,s=t.UNSIGNED_BYTE,l=new Uint8Array(4);t.readPixels(0,0,1,1,a,s,l),i=i&&t.getError()===t.NO_ERROR}for(t.deleteTexture(n),t.deleteFramebuffer(r),t.bindFramebuffer(t.FRAMEBUFFER,null);!i&&t.getError()!==t.NO_ERROR;);return i},_0xb82ccc.prototype._getWebGLTextureType=function(e){if(1===this._webGLVersion){switch(e){case _0x354cf8.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case _0x354cf8.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT_OES;case _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(e){case _0x354cf8.TEXTURETYPE_BYTE:return this._gl.BYTE;case _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case _0x354cf8.TEXTURETYPE_SHORT:return this._gl.SHORT;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT:return this._gl.UNSIGNED_SHORT;case _0x354cf8.TEXTURETYPE_INT:return this._gl.INT;case _0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER:return this._gl.UNSIGNED_INT;case _0x354cf8.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case _0x354cf8.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_24_8:return this._gl.UNSIGNED_INT_24_8;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case _0x354cf8.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE},_0xb82ccc.prototype._getInternalFormat=function(e,t){void 0===t&&(t=!1);var i=t?this._gl.SRGB8_ALPHA8:this._gl.RGBA;switch(e){case _0x354cf8.TEXTUREFORMAT_ALPHA:i=this._gl.ALPHA;break;case _0x354cf8.TEXTUREFORMAT_LUMINANCE:i=this._gl.LUMINANCE;break;case _0x354cf8.TEXTUREFORMAT_LUMINANCE_ALPHA:i=this._gl.LUMINANCE_ALPHA;break;case _0x354cf8.TEXTUREFORMAT_RED:i=this._gl.RED;break;case _0x354cf8.TEXTUREFORMAT_RG:i=this._gl.RG;break;case _0x354cf8.TEXTUREFORMAT_RGB:i=t?this._gl.SRGB:this._gl.RGB;break;case _0x354cf8.TEXTUREFORMAT_RGBA:i=t?this._gl.SRGB8_ALPHA8:this._gl.RGBA}if(this._webGLVersion>1)switch(e){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:i=this._gl.RED_INTEGER;break;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:i=this._gl.RG_INTEGER;break;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:i=this._gl.RGB_INTEGER;break;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:i=this._gl.RGBA_INTEGER}return i},_0xb82ccc.prototype._getRGBABufferInternalSizedFormat=function(e,t,i){if(void 0===i&&(i=!1),1===this._webGLVersion){if(void 0!==t)switch(t){case _0x354cf8.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case _0x354cf8.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case _0x354cf8.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;case _0x354cf8.TEXTUREFORMAT_RGB:return i?this._gl.SRGB:this._gl.RGB}return this._gl.RGBA}switch(e){case _0x354cf8.TEXTURETYPE_BYTE:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return this._gl.R8_SNORM;case _0x354cf8.TEXTUREFORMAT_RG:return this._gl.RG8_SNORM;case _0x354cf8.TEXTUREFORMAT_RGB:return this._gl.RGB8_SNORM;case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8I;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8I;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8I;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return this._gl.R8;case _0x354cf8.TEXTUREFORMAT_RG:return this._gl.RG8;case _0x354cf8.TEXTUREFORMAT_RGB:return i?this._gl.SRGB8:this._gl.RGB8;case _0x354cf8.TEXTUREFORMAT_RGBA:return i?this._gl.SRGB8_ALPHA8:this._gl.RGBA8;case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8UI;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8UI;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8UI;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8UI;case _0x354cf8.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case _0x354cf8.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case _0x354cf8.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case _0x354cf8.TEXTURETYPE_SHORT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16I;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16I;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16I;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16I}case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16UI;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16UI;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16UI;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16UI}case _0x354cf8.TEXTURETYPE_INT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32I;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32I;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32I;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32I}case _0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32UI;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32UI;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32UI;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32UI}case _0x354cf8.TEXTURETYPE_FLOAT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return this._gl.R32F;case _0x354cf8.TEXTUREFORMAT_RG:return this._gl.RG32F;case _0x354cf8.TEXTUREFORMAT_RGB:return this._gl.RGB32F;case _0x354cf8.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA32F}case _0x354cf8.TEXTURETYPE_HALF_FLOAT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return this._gl.R16F;case _0x354cf8.TEXTUREFORMAT_RG:return this._gl.RG16F;case _0x354cf8.TEXTUREFORMAT_RGB:return this._gl.RGB16F;case _0x354cf8.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA16F}case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.RGB565;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.R11F_G11F_B10F;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.RGB9_E5;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.RGBA4;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.RGB5_A1;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(t){case _0x354cf8.TEXTUREFORMAT_RGBA:return this._gl.RGB10_A2;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGB10_A2UI;default:return this._gl.RGB10_A2}}return i?this._gl.SRGB8_ALPHA8:this._gl.RGBA8},_0xb82ccc.prototype._getRGBAMultiSampleBufferFormat=function(e){return e===_0x354cf8.TEXTURETYPE_FLOAT?this._gl.RGBA32F:e===_0x354cf8.TEXTURETYPE_HALF_FLOAT?this._gl.RGBA16F:this._gl.RGBA8},_0xb82ccc.prototype._loadFile=function(e,t,i,n,r,o){var a=this,s=_0xb82ccc._FileToolsLoadFile(e,t,i,n,r,o);return this._activeRequests.push(s),s.onCompleteObservable.add((function(e){a._activeRequests.splice(a._activeRequests.indexOf(e),1)})),s},_0xb82ccc._FileToolsLoadFile=function(e,t,i,n,r,o){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("FileTools")},_0xb82ccc.prototype.readPixels=function(e,t,i,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!0);var a=r?4:3,s=r?this._gl.RGBA:this._gl.RGB,l=new Uint8Array(n*i*a);return o&&this.flushFramebuffer(),this._gl.readPixels(e,t,i,n,s,this._gl.UNSIGNED_BYTE,l),Promise.resolve(l)},Object.defineProperty(_0xb82ccc,"IsSupportedAsync",{get:function(){return Promise.resolve(this.isSupported())},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc,"IsSupported",{get:function(){return this.isSupported()},enumerable:!1,configurable:!0}),_0xb82ccc.isSupported=function(){if(null!==this._HasMajorPerformanceCaveat)return!this._HasMajorPerformanceCaveat;if(null===this._IsSupported)try{var e=this._CreateCanvas(1,1),t=e.getContext("webgl")||e.getContext("experimental-webgl");this._IsSupported=null!=t&&!!window.WebGLRenderingContext}catch(e){this._IsSupported=!1}return this._IsSupported},Object.defineProperty(_0xb82ccc,"HasMajorPerformanceCaveat",{get:function(){if(null===this._HasMajorPerformanceCaveat)try{var e=this._CreateCanvas(1,1),t=e.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||e.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!t}catch(e){this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat},enumerable:!1,configurable:!0}),_0xb82ccc.CeilingPOT=function(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},_0xb82ccc.FloorPOT=function(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)},_0xb82ccc.NearestPOT=function(e){var t=_0xb82ccc.CeilingPOT(e),i=_0xb82ccc.FloorPOT(e);return t-e>e-i?i:t},_0xb82ccc.GetExponentOfTwo=function(e,t,i){var n;switch(void 0===i&&(i=_0x354cf8.SCALEMODE_NEAREST),i){case _0x354cf8.SCALEMODE_FLOOR:n=_0xb82ccc.FloorPOT(e);break;case _0x354cf8.SCALEMODE_NEAREST:n=_0xb82ccc.NearestPOT(e);break;case _0x354cf8.SCALEMODE_CEILING:default:n=_0xb82ccc.CeilingPOT(e)}return Math.min(n,t)},_0xb82ccc.QueueNewFrame=function(e,t){return IsWindowObjectExist()?(!t&&(t=window),t.requestPostAnimationFrame?t.requestPostAnimationFrame(e):t.requestAnimationFrame?t.requestAnimationFrame(e):t.msRequestAnimationFrame?t.msRequestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.mozRequestAnimationFrame?t.mozRequestAnimationFrame(e):t.oRequestAnimationFrame?t.oRequestAnimationFrame(e):window.setTimeout(e,16)):"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(e):setTimeout(e,16)},_0xb82ccc.prototype.getHostDocument=function(){return this._renderingCanvas&&this._renderingCanvas.ownerDocument?this._renderingCanvas.ownerDocument:IsDocumentAvailable()?document:null},_0xb82ccc.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:".*AppleWebKit.*(15.4).*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]},{key:".*(15.4).*AppleWebKit.*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]}],_0xb82ccc._TextureLoaders=[],_0xb82ccc.CollisionsEpsilon=.001,_0xb82ccc._IsSupported=null,_0xb82ccc._HasMajorPerformanceCaveat=null,_0xb82ccc.prototype._createHardwareRenderTargetWrapper=function(e,t,i){var n=new _WebGL_webGLRenderTargetWrapper__WEBPACK_IMPORTED_MODULE_4__.WebGLRenderTargetWrapper(e,t,i,this,this._gl);return this._renderTargetWrapperCache.push(n),n},_0xb82ccc.prototype.createDepthStencilTexture=function(e,t,i){if(t.isCube){var n=e.width||e;return this._createDepthStencilCubeTexture(n,t,i)}return this._createDepthStencilTexture(e,t,i)};var _0x13e28c=(_0x1a766e=!0,function(e,t){var i=_0x1a766e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a766e=!1,i}),_0x3bd7e8=_0x13e28c(void 0,(function(){return _0x3bd7e8.toString().search("(((.+)+)+)+$").toString().constructor(_0x3bd7e8).search("(((.+)+)+)+$")})),_0x1a766e;function allocateAndCopyTypedBuffer(e,t,i,n){switch(void 0===i&&(i=!1),e){case _0x354cf8.TEXTURETYPE_BYTE:var r=(ArrayBuffer,new Int8Array(t));return n&&r.set(new Int8Array(n)),r;case _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE:var o=(ArrayBuffer,new Uint8Array(t));return n&&o.set(new Uint8Array(n)),o;case _0x354cf8.TEXTURETYPE_SHORT:var a=t instanceof ArrayBuffer?new Int16Array(t):new Int16Array(i?t/2:t);return n&&a.set(new Int16Array(n)),a;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT:case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:case _0x354cf8.TEXTURETYPE_HALF_FLOAT:var s=t instanceof ArrayBuffer?new Uint16Array(t):new Uint16Array(i?t/2:t);return n&&s.set(new Uint16Array(n)),s;case _0x354cf8.TEXTURETYPE_INT:var l=t instanceof ArrayBuffer?new Int32Array(t):new Int32Array(i?t/4:t);return n&&l.set(new Int32Array(n)),l;case _0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER:case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_24_8:case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:case _0x354cf8.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:var u=t instanceof ArrayBuffer?new Uint32Array(t):new Uint32Array(i?t/4:t);return n&&u.set(new Uint32Array(n)),u;case _0x354cf8.TEXTURETYPE_FLOAT:var c=t instanceof ArrayBuffer?new Float32Array(t):new Float32Array(i?t/4:t);return n&&c.set(new Float32Array(n)),c}var h=(ArrayBuffer,new Uint8Array(t));return n&&h.set(new Uint8Array(n)),h}_0x3bd7e8(),_0xb82ccc.prototype._readTexturePixelsSync=function(e,t,i,n,r,o,a,s,l,u){var c,h;void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===l&&(l=0),void 0===u&&(u=0);var d=this._gl;if(!d)throw new Error("Engine does not have gl rendering context.");if(!this._dummyFramebuffer){var f=d.createFramebuffer();if(!f)throw new Error("Unable to create dummy framebuffer");this._dummyFramebuffer=f}d.bindFramebuffer(d.FRAMEBUFFER,this._dummyFramebuffer),n>-1?d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+n,null===(c=e._hardwareTexture)||void 0===c?void 0:c.underlyingResource,r):d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,null===(h=e._hardwareTexture)||void 0===h?void 0:h.underlyingResource,r);var p=void 0!==e.type?this._getWebGLTextureType(e.type):d.UNSIGNED_BYTE;if(s)!o&&(o=allocateAndCopyTypedBuffer(e.type,4*t*i));else if(p===d.UNSIGNED_BYTE)!o&&(o=new Uint8Array(4*t*i)),p=d.UNSIGNED_BYTE;else!o&&(o=new Float32Array(4*t*i)),p=d.FLOAT;return a&&this.flushFramebuffer(),d.readPixels(l,u,t,i,d.RGBA,p,o),d.bindFramebuffer(d.FRAMEBUFFER,this._currentFramebuffer),o},_0xb82ccc.prototype._readTexturePixels=function(e,t,i,n,r,o,a,s,l,u){return void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===l&&(l=0),void 0===u&&(u=0),Promise.resolve(this._readTexturePixelsSync(e,t,i,n,r,o,a,s,l,u))};var _0x109c01=(_0x31e160=!0,function(e,t){var i=_0x31e160?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31e160=!1,i}),_0x35e8c6=_0x109c01(void 0,(function(){return _0x35e8c6.toString().search("(((.+)+)+)+$").toString().constructor(_0x35e8c6).search("(((.+)+)+)+$")})),_0x31e160;function _0x94ba70(e){this._deferredReleaseBuffers=[],this._device=e}_0x35e8c6(),_0x94ba70._IsGPUBuffer=function(e){return void 0===e.underlyingResource},_0x94ba70.prototype.createRawBuffer=function(e,t,i){void 0===i&&(i=!1);var n={mappedAtCreation:i,size:void 0!==e.byteLength?e.byteLength+3&-4:e+3&-4,usage:t};return this._device.createBuffer(n)},_0x94ba70.prototype.createBuffer=function(e,t){var i=void 0!==e.byteLength,n=new _0x1635a9(this.createRawBuffer(e,t));return n.references=1,n.capacity=i?e.byteLength:e,i&&this.setSubData(n,0,e),n},_0x94ba70.prototype.setRawData=function(e,t,i,n,r){this._device.queue.writeBuffer(e,t,i.buffer,n,r)},_0x94ba70.prototype.setSubData=function(e,t,i,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var o=e.underlyingResource;r=r||i.byteLength,r=Math.min(r,e.capacity-t);var a=i.byteOffset+n,s=a+r,l=r+3&-4;if(l!==r){var u=new Uint8Array(i.buffer.slice(a,s));(i=new Uint8Array(l)).set(u),n=0,a=0,s=l,r=l}for(var c=15728640,h=0;s-(a+h)>c;)this._device.queue.writeBuffer(o,t+h,i.buffer,a+h,c),h+=c;this._device.queue.writeBuffer(o,t+h,i.buffer,a+h,r-h)},_0x94ba70.prototype.createBufferByMap=function(e,t){var i=void 0!==e.byteLength,n=new _0x1635a9(o=this.createRawBuffer(e,t,!0));if(n.references=1,n.capacity=i?e.byteLength:e,i){var r=e,o=n.underlyingResource,a=r.byteLength;a=Math.min(a,n.capacity-0);var s=r.byteOffset,l=s+a,u=a+3&-4;if(u!==a){var c=new Uint8Array(r.buffer.slice(s,l));(r=new Uint8Array(u)).set(c),s=0,l=u,a=u}var h=o.getMappedRange();new(0,r.constructor)(h).set(r),o.unmap()}return n},_0x94ba70.prototype._getHalfFloatAsFloatRGBAArrayBuffer=function(e,t,i){!i&&(i=new Float32Array(e));for(var n=new Uint16Array(t);e--;)i[e]=_0x3956bb(n[e]);return i},_0x94ba70.prototype.readDataFromBuffer=function(e,t,i,n,r,o,a,s,l,u,c){var h=this;void 0===a&&(a=_0x354cf8.TEXTURETYPE_UNSIGNED_BYTE),void 0===s&&(s=0),void 0===l&&(l=null),void 0===u&&(u=!0),void 0===c&&(c=!1);var d=a===_0x354cf8.TEXTURETYPE_FLOAT?2:a===_0x354cf8.TEXTURETYPE_HALF_FLOAT?1:0;return new Promise((function(i,f){e.mapAsync(_0x572d87.MapMode.Read,s,t).then((function(){var f=e.getMappedRange(s,t),p=l;if(c)p=null===p?allocateAndCopyTypedBuffer(a,t,!0,f):allocateAndCopyTypedBuffer(a,p.buffer,void 0,f);else if(null===p)switch(d){case 0:(p=new Uint8Array(t)).set(new Uint8Array(f));break;case 1:p=h._getHalfFloatAsFloatRGBAArrayBuffer(t/2,f);break;case 2:(p=new Float32Array(t/4)).set(new Float32Array(f))}else switch(d){case 0:(p=new Uint8Array(p.buffer)).set(new Uint8Array(f));break;case 1:p=h._getHalfFloatAsFloatRGBAArrayBuffer(t/2,f,l);break;case 2:(p=new Float32Array(p.buffer)).set(new Float32Array(f))}if(r!==o){1===d&&!c&&(r*=2,o*=2);for(var _=new Uint8Array(p.buffer),m=r,g=0,x=1;x{_0x5539b8.Initialize(u),_0x5539b8.PreProcess(i,u,(function(n){a._rawComputeSourceCode=i,t.processFinalCode&&(n=t.processFinalCode(n));var r=_0x5539b8.Finalize(n,"",u);a._useFinalCode(r.vertexCode,e)}),a._engine)}))}_0x33c89e(),_0x1f3490.prototype._useFinalCode=function(e,t){if(t){var i=t.computeElement||t.compute||t.spectorName||t;this._computeSourceCode="//#define SHADER_NAME compute:"+i+"\n"+e}else this._computeSourceCode=e;this._prepareEffect()},Object.defineProperty(_0x1f3490.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),_0x1f3490.prototype.isReady=function(){try{return this._isReadyInternal()}catch(e){return!1}},_0x1f3490.prototype._isReadyInternal=function(){return!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady},_0x1f3490.prototype.getEngine=function(){return this._engine},_0x1f3490.prototype.getPipelineContext=function(){return this._pipelineContext},_0x1f3490.prototype.getCompilationError=function(){return this._compilationError},_0x1f3490.prototype.executeWhenCompiled=function(e){var t=this;this.isReady()?e(this):(this.onCompileObservable.add((function(t){e(t)})),(!this._pipelineContext||this._pipelineContext.isAsync)&&setTimeout((function(){t._checkIsReady(null)}),16))},_0x1f3490.prototype._checkIsReady=function(e){var t=this;try{if(this._isReadyInternal())return}catch(t){return void this._processCompilationErrors(t,e)}setTimeout((function(){t._checkIsReady(e)}),16)},_0x1f3490.prototype._loadShader=function(e,t,i,n){var r;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return void n(Object(_Misc_domManagement__WEBPACK_IMPORTED_MODULE_2__.GetDOMTextContent)(e));"source:"!==e.substr(0,7)?"base64:"!==e.substr(0,7)?this._shaderStore[e+t+"Shader"]?n(this._shaderStore[e+t+"Shader"]):i&&this._shaderStore[e+i+"Shader"]?n(this._shaderStore[e+i+"Shader"]):(r="."===e[0]||"/"===e[0]||e.indexOf("http")>-1?e:this._shaderRepository+e,this._engine._loadFile(r+"."+t.toLowerCase()+".fx",n)):n(window.atob(e.substr(7))):n(e.substr(7))},Object.defineProperty(_0x1f3490.prototype,"computeSourceCode",{get:function(){var e,t;return this._computeSourceCodeOverride?this._computeSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getComputeShaderCode())&&void 0!==t?t:this._computeSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x1f3490.prototype,"rawComputeSourceCode",{get:function(){return this._rawComputeSourceCode},enumerable:!1,configurable:!0}),_0x1f3490.prototype._prepareEffect=function(){var e=this,t=this.defines,i=this._pipelineContext;this._isReady=!1;try{var n=this._engine;this._pipelineContext=n.createComputePipelineContext(),this._pipelineContext._name=this._key,n._prepareComputePipelineContext(this._pipelineContext,this._computeSourceCodeOverride?this._computeSourceCodeOverride:this._computeSourceCode,this._rawComputeSourceCode,this._computeSourceCodeOverride?null:t,this._entryPoint),n._executeWhenComputeStateIsCompiled(this._pipelineContext,(function(){e._compilationError="",e._isReady=!0,e.onCompiled&&e.onCompiled(e),e.onCompileObservable.notifyObservers(e),e.onCompileObservable.clear(),i&&e.getEngine()._deleteComputePipelineContext(i)})),this._pipelineContext.isAsync&&this._checkIsReady(i)}catch(e){this._processCompilationErrors(e,i)}},_0x1f3490.prototype._getShaderCodeAndErrorLine=function(e,t){var i=null;if(t&&e){var n=t.match(/COMPUTE SHADER ERROR: 0:(\d+?):/);if(n&&2===n.length){var r=parseInt(n[1]),o=e.split("\n",-1);o.length>=r&&(i="Offending line ["+r+"] in compute code: "+o[r-1])}}return[e,i]},_0x1f3490.prototype._processCompilationErrors=function(e,t){var i,n;if(void 0===t&&(t=null),this._compilationError=e.message,_0x41154e.Error("Unable to compile compute effect:"),_0x41154e.Error("Defines:\r\n"+this.defines),_0x1f3490.LogShaderCodeOnCompilationError){var r=null,o=null;(null===(n=this._pipelineContext)||void 0===n?void 0:n._getComputeShaderCode())&&(o=(i=this._getShaderCodeAndErrorLine(this._pipelineContext._getComputeShaderCode(),this._compilationError))[0],r=i[1],o&&(_0x41154e.Error("Compute code:"),_0x41154e.Error(o))),r&&_0x41154e.Error(r)}_0x41154e.Error("Error: "+this._compilationError),t&&(this._pipelineContext=t,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this))},_0x1f3490.prototype.dispose=function(){this._pipelineContext&&this._pipelineContext.dispose(),this._engine._releaseComputeEffect(this)},_0x1f3490.RegisterShader=function(e,t){_0x54737b.GetShadersStore(_0x4cf79a.WGSL)[e+"ComputeShader"]=t},_0x1f3490._uniqueIdSeed=0,_0x1f3490.LogShaderCodeOnCompilationError=!0;var _0x59a7c3=(_0x4fbda9=!0,function(e,t){var i=_0x4fbda9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fbda9=!1,i}),_0x5a0f39=_0x59a7c3(void 0,(function(){return _0x5a0f39.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a0f39).search("(((.+)+)+)+$")})),_0x4fbda9;function _0x4d4805(){}_0x5a0f39(),Object.defineProperty(_0x4d4805,"LastCreatedEngine",{get:function(){return 0===this.Instances.length?null:this.Instances[this.Instances.length-1]},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d4805,"LastCreatedScene",{get:function(){return this._LastCreatedScene},enumerable:!1,configurable:!0}),_0x4d4805.Instances=new Array,_0x4d4805._LastCreatedScene=null,_0x4d4805.UseFallbackTexture=!0,_0x4d4805.FallbackTexture="";var _0x31453b=(_0x5e1d13=!0,function(e,t){var i=_0x5e1d13?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e1d13=!1,i}),_0x3817ed=_0x31453b(void 0,(function(){return _0x3817ed.toString().search("(((.+)+)+)+$").toString().constructor(_0x3817ed).search("(((.+)+)+)+$")})),_0x5e1d13;function _0x3f6032(){}function _0x3933e0(){return"undefined"!=typeof window}_0x3817ed(),Object.defineProperty(_0x3f6032,"Now",{get:function(){return _0x3933e0()&&window.performance&&window.performance.now?window.performance.now():Date.now()},enumerable:!1,configurable:!0});var _0x4bc357=(_0x13eb95=!0,function(e,t){var i=_0x13eb95?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13eb95=!1,i}),_0x1fd9fa=_0x4bc357(void 0,(function(){return _0x1fd9fa.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fd9fa).search("(((.+)+)+)+$")})),_0x13eb95;function PerformanceMonitor(e){void 0===e&&(e=30),this._enabled=!0,this._rollingFrameTime=new RollingAverage(e)}function RollingAverage(e){this._samples=new Array(e),this.reset()}_0x1fd9fa(),PerformanceMonitor.prototype.sampleFrame=function(e){if(void 0===e&&(e=_0x3f6032.Now),this._enabled){if(null!=this._lastFrameTimeMs){var t=e-this._lastFrameTimeMs;this._rollingFrameTime.add(t)}this._lastFrameTimeMs=e}},Object.defineProperty(PerformanceMonitor.prototype,"averageFrameTime",{get:function(){return this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"averageFrameTimeVariance",{get:function(){return this._rollingFrameTime.variance},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"instantaneousFrameTime",{get:function(){return this._rollingFrameTime.history(0)},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"averageFPS",{get:function(){return 1e3/this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"instantaneousFPS",{get:function(){var e=this._rollingFrameTime.history(0);return 0===e?0:1e3/e},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"isSaturated",{get:function(){return this._rollingFrameTime.isSaturated()},enumerable:!1,configurable:!0}),PerformanceMonitor.prototype.enable=function(){this._enabled=!0},PerformanceMonitor.prototype.disable=function(){this._enabled=!1,this._lastFrameTimeMs=null},Object.defineProperty(PerformanceMonitor.prototype,"isEnabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),PerformanceMonitor.prototype.reset=function(){this._lastFrameTimeMs=null,this._rollingFrameTime.reset()},RollingAverage.prototype.add=function(e){var t;if(this.isSaturated()){var i=this._samples[this._pos];t=i-this.average,this.average-=t/(this._sampleCount-1),this._m2-=t*(i-this.average)}else this._sampleCount++;t=e-this.average,this.average+=t/this._sampleCount,this._m2+=t*(e-this.average),this.variance=this._m2/(this._sampleCount-1),this._samples[this._pos]=e,this._pos++,this._pos%=this._samples.length},RollingAverage.prototype.history=function(e){if(e>=this._sampleCount||e>=this._samples.length)return 0;var t=this._wrapPosition(this._pos-1);return this._samples[this._wrapPosition(t-e)]},RollingAverage.prototype.isSaturated=function(){return this._sampleCount>=this._samples.length},RollingAverage.prototype.reset=function(){this.average=0,this.variance=0,this._sampleCount=0,this._pos=0,this._m2=0},RollingAverage.prototype._wrapPosition=function(e){var t=this._samples.length;return(e%t+t)%t};var _0xc3d4f7=(_0x1a4077=!0,function(e,t){var i=_0x1a4077?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a4077=!1,i}),_0x1f417b=_0xc3d4f7(void 0,(function(){return _0x1f417b.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f417b).search("(((.+)+)+)+$")})),_0x1a4077;function _0x4d817b(){this._startMonitoringTime=0,this._min=0,this._max=0,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}_0x1f417b(),Object.defineProperty(_0x4d817b.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d817b.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d817b.prototype,"average",{get:function(){return this._average},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d817b.prototype,"lastSecAverage",{get:function(){return this._lastSecAverage},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d817b.prototype,"current",{get:function(){return this._current},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d817b.prototype,"total",{get:function(){return this._totalAccumulated},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d817b.prototype,"count",{get:function(){return this._totalValueCount},enumerable:!1,configurable:!0}),_0x4d817b.prototype.fetchNewFrame=function(){this._totalValueCount++,this._current=0,this._lastSecValueCount++},_0x4d817b.prototype.addCount=function(e,t){_0x4d817b.Enabled&&(this._current+=e,t&&this._fetchResult())},_0x4d817b.prototype.beginMonitoring=function(){_0x4d817b.Enabled&&(this._startMonitoringTime=_0x3f6032.Now)},_0x4d817b.prototype.endMonitoring=function(e){if(void 0===e&&(e=!0),_0x4d817b.Enabled){e&&this.fetchNewFrame();var t=_0x3f6032.Now;this._current=t-this._startMonitoringTime,e&&this._fetchResult()}},_0x4d817b.prototype._fetchResult=function(){this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current),this._average=this._totalAccumulated/this._totalValueCount;var e=_0x3f6032.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)},_0x4d817b.Enabled=!0;var _0x5b509a=(_0x5d0ff1=!0,function(e,t){var i=_0x5d0ff1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d0ff1=!1,i}),_0x2967a1=_0x5b509a(void 0,(function(){return _0x2967a1.toString().search("(((.+)+)+)+$").toString().constructor(_0x2967a1).search("(((.+)+)+)+$")})),_0x5d0ff1;function _0x402caf(e,t,i,n){void 0===n&&(n=!1);var r=_0xb82ccc.call(this,e,t,i,n)||this;if(r.enableOfflineSupport=!1,r.disableManifestCheck=!1,r.scenes=new Array,r._virtualScenes=new Array,r.onNewSceneAddedObservable=new Observable,r.postProcesses=new Array,r.isPointerLock=!1,r.onResizeObservable=new Observable,r.onCanvasBlurObservable=new Observable,r.onCanvasFocusObservable=new Observable,r.onCanvasPointerOutObservable=new Observable,r.onBeginFrameObservable=new Observable,r.customAnimationFrameRequester=null,r.onEndFrameObservable=new Observable,r.onBeforeShaderCompilationObservable=new Observable,r.onAfterShaderCompilationObservable=new Observable,r._deterministicLockstep=!1,r._lockstepMaxSteps=4,r._timeStep=1/60,r._fps=60,r._deltaTime=0,r._drawCalls=new _0x4d817b,r.canvasTabIndex=1,r.disablePerformanceMonitorInBackground=!1,r._performanceMonitor=new PerformanceMonitor,r._compatibilityMode=!0,r.currentRenderPassId=_0x354cf8.RENDERPASS_MAIN,r._renderPassNames=["main"],_0x402caf.Instances.push(r),!e)return r;if(r._features.supportRenderPasses=!0,i=r._creationOptions,e.getContext){var o=e;if(r._sharedInit(o,!!i.doNotHandleTouchAction,i.audioEngine),(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var a=document;r._onFullscreenChange=function(){void 0!==a.fullscreen?r.isFullscreen=a.fullscreen:void 0!==a.mozFullScreen?r.isFullscreen=a.mozFullScreen:void 0!==a.webkitIsFullScreen?r.isFullscreen=a.webkitIsFullScreen:void 0!==a.msIsFullScreen&&(r.isFullscreen=a.msIsFullScreen),r.isFullscreen&&r._pointerLockRequested&&o&&_0x402caf._RequestPointerlock(o)},document.addEventListener("fullscreenchange",r._onFullscreenChange,!1),document.addEventListener("mozfullscreenchange",r._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",r._onFullscreenChange,!1),document.addEventListener("msfullscreenchange",r._onFullscreenChange,!1),r._onPointerLockChange=function(){r.isPointerLock=a.mozPointerLockElement===o||a.webkitPointerLockElement===o||a.msPointerLockElement===o||a.pointerLockElement===o},document.addEventListener("pointerlockchange",r._onPointerLockChange,!1),document.addEventListener("mspointerlockchange",r._onPointerLockChange,!1),document.addEventListener("mozpointerlockchange",r._onPointerLockChange,!1),document.addEventListener("webkitpointerlockchange",r._onPointerLockChange,!1),!_0x402caf.audioEngine&&i.audioEngine&&_0x402caf.AudioEngineFactory&&(_0x402caf.audioEngine=_0x402caf.AudioEngineFactory(r.getRenderingCanvas(),r.getAudioContext(),r.getAudioDestination()))}r._connectVREvents(),r.enableOfflineSupport=void 0!==_0x402caf.OfflineProviderFactory,r._deterministicLockstep=!!i.deterministicLockstep,r._lockstepMaxSteps=i.lockstepMaxSteps||0,r._timeStep=i.timeStep||1/60}return r._prepareVRComponent(),i.autoEnableWebVR&&r.initWebVR(),r}_0x2967a1(),_0xb82ccc&&(_0x402caf.__proto__=_0xb82ccc),_0x402caf.prototype=Object.create(_0xb82ccc&&_0xb82ccc.prototype),_0x402caf.prototype.constructor=_0xb82ccc,Object.defineProperty(_0x402caf,"NpmPackage",{get:function(){return _thinEngine__WEBPACK_IMPORTED_MODULE_6__.ThinEngine.NpmPackage},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf,"Version",{get:function(){return _0xb82ccc.Version},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf,"Instances",{get:function(){return _0x4d4805.Instances},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf,"LastCreatedEngine",{get:function(){return _0x4d4805.LastCreatedEngine},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf,"LastCreatedScene",{get:function(){return _0x4d4805.LastCreatedScene},enumerable:!1,configurable:!0}),_0x402caf.prototype._createImageBitmapFromSource=function(e,t){var i=this;return new Promise((function(n,r){var o=new Image;o.onload=function(){o.decode().then((function(){i.createImageBitmap(o,t).then((function(e){n(e)}))}))},o.onerror=function(){r("Error loading image ".concat(o.src))},o.src=e}))},_0x402caf.prototype.createImageBitmap=function(e,t){return createImageBitmap(e,t)},_0x402caf.prototype.resizeImageBitmap=function(e,t,i){var n=this.createCanvas(t,i).getContext("2d");if(!n)throw new Error("Unable to get 2d context for resizeImageBitmap");return n.drawImage(e,0,0),n.getImageData(0,0,t,i).data},_0x402caf.MarkAllMaterialsAsDirty=function(e,t){for(var i=0;i<_0x402caf.Instances.length;i++)for(var n=_0x402caf.Instances[i],r=0;r0?this.customAnimationFrameRequester?(this.customAnimationFrameRequester.requestID=this._queueNewFrame(this.customAnimationFrameRequester.renderFunction||this._boundRenderFunction,this.customAnimationFrameRequester),this._frameHandler=this.customAnimationFrameRequester.requestID):this.isVRPresenting()?this._requestVRFrame():this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},_0x402caf.prototype._renderViews=function(){return!1},_0x402caf.prototype.switchFullscreen=function(e){this.isFullscreen?this.exitFullscreen():this.enterFullscreen(e)},_0x402caf.prototype.enterFullscreen=function(e){!this.isFullscreen&&(this._pointerLockRequested=e,this._renderingCanvas&&_0x402caf._RequestFullscreen(this._renderingCanvas))},_0x402caf.prototype.exitFullscreen=function(){this.isFullscreen&&_0x402caf._ExitFullscreen()},_0x402caf.prototype.enterPointerlock=function(){this._renderingCanvas&&_0x402caf._RequestPointerlock(this._renderingCanvas)},_0x402caf.prototype.exitPointerlock=function(){_0x402caf._ExitPointerlock()},_0x402caf.prototype.beginFrame=function(){this._measureFps(),this.onBeginFrameObservable.notifyObservers(this),_0xb82ccc.prototype.beginFrame.call(this)},_0x402caf.prototype.endFrame=function(){_0xb82ccc.prototype.endFrame.call(this),this._submitVRFrame(),this.onEndFrameObservable.notifyObservers(this)},_0x402caf.prototype.resize=function(e){void 0===e&&(e=!1),this.isVRPresenting()||_0xb82ccc.prototype.resize.call(this,e)},_0x402caf.prototype.setSize=function(e,t,i){if(void 0===i&&(i=!1),!this._renderingCanvas)return!1;if(!_0xb82ccc.prototype.setSize.call(this,e,t,i))return!1;if(this.scenes){for(var n=0;n1&&r){var a=this.createTransformFeedback();this.bindTransformFeedback(a),this.setTranformFeedbackVaryings(o,r),e.transformFeedback=a}return n.linkProgram(o),this.webGLVersion>1&&r&&this.bindTransformFeedback(null),e.context=n,e.vertexShader=t,e.fragmentShader=i,!e.isParallelCompiled&&this._finalizePipelineContext(e),o},_0x402caf.prototype._releaseTexture=function(e){_0xb82ccc.prototype._releaseTexture.call(this,e)},_0x402caf.prototype._releaseRenderTargetWrapper=function(e){_0xb82ccc.prototype._releaseRenderTargetWrapper.call(this,e),this.scenes.forEach((function(t){t.postProcesses.forEach((function(t){t._outputTexture===e&&(t._outputTexture=null)})),t.cameras.forEach((function(t){t._postProcesses.forEach((function(t){t&&t._outputTexture===e&&(t._outputTexture=null)}))}))}))},_0x402caf.prototype.getRenderPassNames=function(){return this._renderPassNames},_0x402caf.prototype.getCurrentRenderPassName=function(){return this._renderPassNames[this.currentRenderPassId]},_0x402caf.prototype.createRenderPassId=function(e){var t=++_0x402caf._RenderPassIdCounter;return this._renderPassNames[t]=null!=e?e:"NONAME",t},_0x402caf.prototype.releaseRenderPassId=function(e){this._renderPassNames[e]=void 0;for(var t=0;t=0&&_0x402caf.Instances.splice(e,1),this.onResizeObservable.clear(),this.onCanvasBlurObservable.clear(),this.onCanvasFocusObservable.clear(),this.onCanvasPointerOutObservable.clear(),this.onBeginFrameObservable.clear(),this.onEndFrameObservable.clear()},_0x402caf.prototype._disableTouchAction=function(){this._renderingCanvas&&this._renderingCanvas.setAttribute&&(this._renderingCanvas.setAttribute("touch-action","none"),this._renderingCanvas.style.touchAction="none",this._renderingCanvas.style.msTouchAction="none")},_0x402caf.prototype.displayLoadingUI=function(){if((0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var e=this.loadingScreen;e&&e.displayLoadingUI()}},_0x402caf.prototype.hideLoadingUI=function(){if((0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var e=this._loadingScreen;e&&e.hideLoadingUI()}},Object.defineProperty(_0x402caf.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=_0x402caf.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(e){this._loadingScreen=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf.prototype,"loadingUIText",{set:function(e){this.loadingScreen.loadingUIText=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf.prototype,"loadingUIBackgroundColor",{set:function(e){this.loadingScreen.loadingUIBackgroundColor=e},enumerable:!1,configurable:!0}),_0x402caf.prototype.createVideoElement=function(e){return document.createElement("video")},_0x402caf._RequestPointerlock=function(e){e.requestPointerLock=e.requestPointerLock||e.msRequestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock&&(e.requestPointerLock(),e.focus())},_0x402caf._ExitPointerlock=function(){var e=document;document.exitPointerLock=document.exitPointerLock||e.msExitPointerLock||e.mozExitPointerLock||e.webkitExitPointerLock,document.exitPointerLock&&document.exitPointerLock()},_0x402caf._RequestFullscreen=function(e){var t=e.requestFullscreen||e.msRequestFullscreen||e.webkitRequestFullscreen||e.mozRequestFullScreen;t&&t.call(e)},_0x402caf._ExitFullscreen=function(){var e=document;document.exitFullscreen?document.exitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.msCancelFullScreen&&e.msCancelFullScreen()},_0x402caf.prototype.getFontOffset=function(e){var t=document.createElement("span");t.innerHTML="Hg",t.setAttribute("style","font: ".concat(e," !important"));var i=document.createElement("div");i.style.display="inline-block",i.style.width="1px",i.style.height="0px",i.style.verticalAlign="bottom";var n=document.createElement("div");n.style.whiteSpace="nowrap",n.appendChild(t),n.appendChild(i),document.body.appendChild(n);var r=0,o=0;try{o=i.getBoundingClientRect().top-t.getBoundingClientRect().top,i.style.verticalAlign="baseline",r=i.getBoundingClientRect().top-t.getBoundingClientRect().top}finally{document.body.removeChild(n)}return{ascent:r,height:o,descent:o-r}},_0x402caf.ALPHA_DISABLE=_0x354cf8.ALPHA_DISABLE,_0x402caf.ALPHA_ADD=_0x354cf8.ALPHA_ADD,_0x402caf.ALPHA_COMBINE=_0x354cf8.ALPHA_COMBINE,_0x402caf.ALPHA_SUBTRACT=_0x354cf8.ALPHA_SUBTRACT,_0x402caf.ALPHA_MULTIPLY=_0x354cf8.ALPHA_MULTIPLY,_0x402caf.ALPHA_MAXIMIZED=_0x354cf8.ALPHA_MAXIMIZED,_0x402caf.ALPHA_ONEONE=_0x354cf8.ALPHA_ONEONE,_0x402caf.ALPHA_PREMULTIPLIED=_0x354cf8.ALPHA_PREMULTIPLIED,_0x402caf.ALPHA_PREMULTIPLIED_PORTERDUFF=_0x354cf8.ALPHA_PREMULTIPLIED_PORTERDUFF,_0x402caf.ALPHA_INTERPOLATE=_0x354cf8.ALPHA_INTERPOLATE,_0x402caf.ALPHA_SCREENMODE=_0x354cf8.ALPHA_SCREENMODE,_0x402caf.DELAYLOADSTATE_NONE=_0x354cf8.DELAYLOADSTATE_NONE,_0x402caf.DELAYLOADSTATE_LOADED=_0x354cf8.DELAYLOADSTATE_LOADED,_0x402caf.DELAYLOADSTATE_LOADING=_0x354cf8.DELAYLOADSTATE_LOADING,_0x402caf.DELAYLOADSTATE_NOTLOADED=_0x354cf8.DELAYLOADSTATE_NOTLOADED,_0x402caf.NEVER=_0x354cf8.NEVER,_0x402caf.ALWAYS=_0x354cf8.ALWAYS,_0x402caf.LESS=_0x354cf8.LESS,_0x402caf.EQUAL=_0x354cf8.EQUAL,_0x402caf.LEQUAL=_0x354cf8.LEQUAL,_0x402caf.GREATER=_0x354cf8.GREATER,_0x402caf.GEQUAL=_0x354cf8.GEQUAL,_0x402caf.NOTEQUAL=_0x354cf8.NOTEQUAL,_0x402caf.KEEP=_0x354cf8.KEEP,_0x402caf.REPLACE=_0x354cf8.REPLACE,_0x402caf.INCR=_0x354cf8.INCR,_0x402caf.DECR=_0x354cf8.DECR,_0x402caf.INVERT=_0x354cf8.INVERT,_0x402caf.INCR_WRAP=_0x354cf8.INCR_WRAP,_0x402caf.DECR_WRAP=_0x354cf8.DECR_WRAP,_0x402caf.TEXTURE_CLAMP_ADDRESSMODE=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,_0x402caf.TEXTURE_WRAP_ADDRESSMODE=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE,_0x402caf.TEXTURE_MIRROR_ADDRESSMODE=_0x354cf8.TEXTURE_MIRROR_ADDRESSMODE,_0x402caf.TEXTUREFORMAT_ALPHA=_0x354cf8.TEXTUREFORMAT_ALPHA,_0x402caf.TEXTUREFORMAT_LUMINANCE=_0x354cf8.TEXTUREFORMAT_LUMINANCE,_0x402caf.TEXTUREFORMAT_LUMINANCE_ALPHA=_0x354cf8.TEXTUREFORMAT_LUMINANCE_ALPHA,_0x402caf.TEXTUREFORMAT_RGB=_0x354cf8.TEXTUREFORMAT_RGB,_0x402caf.TEXTUREFORMAT_RGBA=_0x354cf8.TEXTUREFORMAT_RGBA,_0x402caf.TEXTUREFORMAT_RED=_0x354cf8.TEXTUREFORMAT_RED,_0x402caf.TEXTUREFORMAT_R=_0x354cf8.TEXTUREFORMAT_R,_0x402caf.TEXTUREFORMAT_RG=_0x354cf8.TEXTUREFORMAT_RG,_0x402caf.TEXTUREFORMAT_RED_INTEGER=_0x354cf8.TEXTUREFORMAT_RED_INTEGER,_0x402caf.TEXTUREFORMAT_R_INTEGER=_0x354cf8.TEXTUREFORMAT_R_INTEGER,_0x402caf.TEXTUREFORMAT_RG_INTEGER=_0x354cf8.TEXTUREFORMAT_RG_INTEGER,_0x402caf.TEXTUREFORMAT_RGB_INTEGER=_0x354cf8.TEXTUREFORMAT_RGB_INTEGER,_0x402caf.TEXTUREFORMAT_RGBA_INTEGER=_0x354cf8.TEXTUREFORMAT_RGBA_INTEGER,_0x402caf.TEXTURETYPE_UNSIGNED_BYTE=_0x354cf8.TEXTURETYPE_UNSIGNED_BYTE,_0x402caf.TEXTURETYPE_UNSIGNED_INT=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,_0x402caf.TEXTURETYPE_FLOAT=_0x354cf8.TEXTURETYPE_FLOAT,_0x402caf.TEXTURETYPE_HALF_FLOAT=_0x354cf8.TEXTURETYPE_HALF_FLOAT,_0x402caf.TEXTURETYPE_BYTE=_0x354cf8.TEXTURETYPE_BYTE,_0x402caf.TEXTURETYPE_SHORT=_0x354cf8.TEXTURETYPE_SHORT,_0x402caf.TEXTURETYPE_UNSIGNED_SHORT=_0x354cf8.TEXTURETYPE_UNSIGNED_SHORT,_0x402caf.TEXTURETYPE_INT=_0x354cf8.TEXTURETYPE_INT,_0x402caf.TEXTURETYPE_UNSIGNED_INTEGER=_0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER,_0x402caf.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=_0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4,_0x402caf.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=_0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1,_0x402caf.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=_0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,_0x402caf.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=_0x354cf8.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV,_0x402caf.TEXTURETYPE_UNSIGNED_INT_24_8=_0x354cf8.TEXTURETYPE_UNSIGNED_INT_24_8,_0x402caf.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=_0x354cf8.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV,_0x402caf.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=_0x354cf8.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV,_0x402caf.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=_0x354cf8.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV,_0x402caf.TEXTURE_NEAREST_SAMPLINGMODE=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,_0x402caf.TEXTURE_BILINEAR_SAMPLINGMODE=_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE,_0x402caf.TEXTURE_TRILINEAR_SAMPLINGMODE=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE,_0x402caf.TEXTURE_NEAREST_NEAREST_MIPLINEAR=_0x354cf8.TEXTURE_NEAREST_NEAREST_MIPLINEAR,_0x402caf.TEXTURE_LINEAR_LINEAR_MIPNEAREST=_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST,_0x402caf.TEXTURE_LINEAR_LINEAR_MIPLINEAR=_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR,_0x402caf.TEXTURE_NEAREST_NEAREST_MIPNEAREST=_0x354cf8.TEXTURE_NEAREST_NEAREST_MIPNEAREST,_0x402caf.TEXTURE_NEAREST_LINEAR_MIPNEAREST=_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPNEAREST,_0x402caf.TEXTURE_NEAREST_LINEAR_MIPLINEAR=_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPLINEAR,_0x402caf.TEXTURE_NEAREST_LINEAR=_0x354cf8.TEXTURE_NEAREST_LINEAR,_0x402caf.TEXTURE_NEAREST_NEAREST=_0x354cf8.TEXTURE_NEAREST_NEAREST,_0x402caf.TEXTURE_LINEAR_NEAREST_MIPNEAREST=_0x354cf8.TEXTURE_LINEAR_NEAREST_MIPNEAREST,_0x402caf.TEXTURE_LINEAR_NEAREST_MIPLINEAR=_0x354cf8.TEXTURE_LINEAR_NEAREST_MIPLINEAR,_0x402caf.TEXTURE_LINEAR_LINEAR=_0x354cf8.TEXTURE_LINEAR_LINEAR,_0x402caf.TEXTURE_LINEAR_NEAREST=_0x354cf8.TEXTURE_LINEAR_NEAREST,_0x402caf.TEXTURE_EXPLICIT_MODE=_0x354cf8.TEXTURE_EXPLICIT_MODE,_0x402caf.TEXTURE_SPHERICAL_MODE=_0x354cf8.TEXTURE_SPHERICAL_MODE,_0x402caf.TEXTURE_PLANAR_MODE=_0x354cf8.TEXTURE_PLANAR_MODE,_0x402caf.TEXTURE_CUBIC_MODE=_0x354cf8.TEXTURE_CUBIC_MODE,_0x402caf.TEXTURE_PROJECTION_MODE=_0x354cf8.TEXTURE_PROJECTION_MODE,_0x402caf.TEXTURE_SKYBOX_MODE=_0x354cf8.TEXTURE_SKYBOX_MODE,_0x402caf.TEXTURE_INVCUBIC_MODE=_0x354cf8.TEXTURE_INVCUBIC_MODE,_0x402caf.TEXTURE_EQUIRECTANGULAR_MODE=_0x354cf8.TEXTURE_EQUIRECTANGULAR_MODE,_0x402caf.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=_0x354cf8.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,_0x402caf.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=_0x354cf8.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,_0x402caf.SCALEMODE_FLOOR=_0x354cf8.SCALEMODE_FLOOR,_0x402caf.SCALEMODE_NEAREST=_0x354cf8.SCALEMODE_NEAREST,_0x402caf.SCALEMODE_CEILING=_0x354cf8.SCALEMODE_CEILING,_0x402caf._RescalePostProcessFactory=null,_0x402caf._RenderPassIdCounter=0;var _0x1adf43=(_0x2601bb=!0,function(e,t){var i=_0x2601bb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2601bb=!1,i}),_0x5ae197=_0x1adf43(void 0,(function(){return _0x5ae197.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ae197).search("(((.+)+)+)+$")})),_0x2601bb;function _0x3a7b63(e,t,i,n,r,o,a,s,l,u,c,h){void 0===n&&(n=null),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null),void 0===c&&(c=""),void 0===h&&(h=_0x4cf79a.GLSL);var d,f,p,_=this;this.name=null,this.defines="",this.onCompiled=null,this.onError=null,this.onBind=null,this.uniqueId=0,this.onCompileObservable=new Observable,this.onErrorObservable=new Observable,this._onBindObservable=null,this._wasPreviouslyReady=!1,this._isDisposed=!1,this._bonesComputationForcedToCPU=!1,this._uniformBuffersNames={},this._multiTarget=!1,this._samplers={},this._isReady=!1,this._compilationError="",this._allFallbacksProcessed=!1,this._uniforms={},this._key="",this._fallbacks=null,this._vertexSourceCodeOverride="",this._fragmentSourceCodeOverride="",this._transformFeedbackVaryings=null,this._pipelineContext=null,this._vertexSourceCode="",this._fragmentSourceCode="",this._rawVertexSourceCode="",this._rawFragmentSourceCode="",this._compiledVertexWGSL="",this._compiledFragmentWGSL="",this.name=e,this._key=c;var m=void 0,g=null;if(t.attributes){var x=t;if(this._engine=i,this._attributesNames=x.attributes,this._uniformsNames=x.uniformsNames.concat(x.samplers),this._samplerList=x.samplers.slice(),this.defines=x.defines,this.onError=x.onError,this.onCompiled=x.onCompiled,this._fallbacks=x.fallbacks,this._indexParameters=x.indexParameters,this._transformFeedbackVaryings=x.transformFeedbackVaryings||null,this._multiTarget=!!x.multiTarget,this._shaderLanguage=null!==(d=x.shaderLanguage)&&void 0!==d?d:_0x4cf79a.GLSL,x.uniformBuffersNames){this._uniformBuffersNamesList=x.uniformBuffersNames.slice();for(var v=0;v{i&&(_._compiledVertexWGSL=n,_._compiledFragmentWGSL=r),this._loadShaderAsNormal(e,y,$,g,t,T)}))}_0x5ae197(),_0x3a7b63.prototype._loadShaderAsNormal=function(e,t,i,n,r,o){var a=this,s=[void 0,void 0],l=function(){if(s[0]&&s[1]){o.isFragment=!0;var t=s[0],i=s[1];_0x5539b8.Process(i,o,(function(i){n&&(i=n("fragment",i));var r=_0x5539b8.Finalize(t,i,o);a._useFinalCode(r.vertexCode,r.fragmentCode,e)}),a._engine)}};r.vertexCode?(_0x5539b8.Initialize(o),_0x5539b8.Process(r.vertexCode,o,(function(e){a._rawVertexSourceCode=r.vertexCode,n&&(e=n("vertex",e)),s[0]=e,l()}),a._engine)):this._loadShader(t,"Vertex","",(function(e){_0x5539b8.Initialize(o),_0x5539b8.Process(e,o,(function(t){a._rawVertexSourceCode=e,n&&(t=n("vertex",t)),s[0]=t,l()}),a._engine)})),r.fragmentCode?(a._rawFragmentSourceCode=r.fragmentCode,s[1]=r.fragmentCode,l()):this._loadShader(i,"Fragment","Pixel",(function(e){a._rawFragmentSourceCode=e,s[1]=e,l()}))},Object.defineProperty(_0x3a7b63,"ShadersRepository",{get:function(){return _0x54737b.ShadersRepository},set:function(e){_0x54737b.ShadersRepository=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3a7b63.prototype,"onBindObservable",{get:function(){return!this._onBindObservable&&(this._onBindObservable=new _Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable),this._onBindObservable},enumerable:!1,configurable:!0}),_0x3a7b63.prototype._useFinalCode=function(e,t,i){if(i){var n=i.vertexElement||i.vertex||i.spectorName||i,r=i.fragmentElement||i.fragment||i.spectorName||i;this._vertexSourceCode=(this._shaderLanguage===_0x4cf79a.WGSL?"//":"")+"#define SHADER_NAME vertex:"+n+"\n"+e,this._fragmentSourceCode=(this._shaderLanguage===_0x4cf79a.WGSL?"//":"")+"#define SHADER_NAME fragment:"+r+"\n"+t}else this._vertexSourceCode=e,this._fragmentSourceCode=t;this._prepareEffect()},Object.defineProperty(_0x3a7b63.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),_0x3a7b63.prototype.isReady=function(){try{return this._isReadyInternal()}catch(e){return!1}},_0x3a7b63.prototype._isReadyInternal=function(){return!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady},_0x3a7b63.prototype.getEngine=function(){return this._engine},_0x3a7b63.prototype.getPipelineContext=function(){return this._pipelineContext},_0x3a7b63.prototype.getAttributesNames=function(){return this._attributesNames},_0x3a7b63.prototype.getAttributeLocation=function(e){return this._attributes[e]},_0x3a7b63.prototype.getAttributeLocationByName=function(e){return this._attributeLocationByName[e]},_0x3a7b63.prototype.getAttributesCount=function(){return this._attributes.length},_0x3a7b63.prototype.getUniformIndex=function(e){return this._uniformsNames.indexOf(e)},_0x3a7b63.prototype.getUniform=function(e){return this._uniforms[e]},_0x3a7b63.prototype.getSamplers=function(){return this._samplerList},_0x3a7b63.prototype.getUniformNames=function(){return this._uniformsNames},_0x3a7b63.prototype.getUniformBuffersNames=function(){return this._uniformBuffersNamesList},_0x3a7b63.prototype.getIndexParameters=function(){return this._indexParameters},_0x3a7b63.prototype.getCompilationError=function(){return this._compilationError},_0x3a7b63.prototype.allFallbacksProcessed=function(){return this._allFallbacksProcessed},_0x3a7b63.prototype.executeWhenCompiled=function(e){var t=this;this.isReady()?e(this):(this.onCompileObservable.add((function(t){e(t)})),(!this._pipelineContext||this._pipelineContext.isAsync)&&setTimeout((function(){t._checkIsReady(null)}),16))},_0x3a7b63.prototype._checkIsReady=function(e){var t=this;try{if(this._isReadyInternal())return}catch(t){return void this._processCompilationErrors(t,e)}this._isDisposed||setTimeout((function(){t._checkIsReady(e)}),16)},_0x3a7b63.prototype._loadShader=function(e,t,i,n){if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return void n(GetDOMTextContent(e));if("source:"!==e.substr(0,7))if("base64:"!==e.substr(0,7)){var r,o=_0x54737b.GetShadersStore(this._shaderLanguage);if(o[e+t+"Shader"])n(o[e+t+"Shader"]);else if(i&&o[e+i+"Shader"])n(o[e+i+"Shader"]);else r="."===e[0]||"/"===e[0]||e.indexOf("http")>-1?e:_0x54737b.GetShadersRepository(this._shaderLanguage)+e,this._engine._loadFile(r+"."+t.toLowerCase()+".fx",n)}else{n(window.atob(e.substr(7)))}else n(e.substr(7))},Object.defineProperty(_0x3a7b63.prototype,"vertexSourceCode",{get:function(){var e,t;return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._vertexSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getVertexShaderCode())&&void 0!==t?t:this._vertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3a7b63.prototype,"fragmentSourceCode",{get:function(){var e,t;return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._fragmentSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getFragmentShaderCode())&&void 0!==t?t:this._fragmentSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3a7b63.prototype,"rawVertexSourceCode",{get:function(){return this._rawVertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3a7b63.prototype,"rawFragmentSourceCode",{get:function(){return this._rawFragmentSourceCode},enumerable:!1,configurable:!0}),_0x3a7b63.prototype._rebuildProgram=function(e,t,i,n){var r=this;this._isReady=!1,this._vertexSourceCodeOverride=e,this._fragmentSourceCodeOverride=t,this.onError=function(e,t){n&&n(t)},this.onCompiled=function(){var e=r.getEngine().scenes;if(e)for(var t=0;t=a&&(r="Offending line [".concat(a,"] in ").concat(i?"fragment":"vertex"," code: ").concat(s[a-1]))}}return[e,r]},_0x3a7b63.prototype._processCompilationErrors=function(e,t){var i,n,r,o,a;void 0===t&&(t=null),this._compilationError=e.message;var s=this._attributesNames,l=this._fallbacks;if(_0x41154e.Error("Unable to compile compute effect:"),_0x41154e.Error("Uniforms: "+this._uniformsNames.map((function(e){return" "+e}))),_0x41154e.Error("Attributes: "+s.map((function(e){return" "+e}))),_0x41154e.Error("Defines:\r\n"+this.defines),_0x3a7b63.LogShaderCodeOnCompilationError){var u=null,c=null,h=null;(null===(r=this._pipelineContext)||void 0===r?void 0:r._getVertexShaderCode())&&(h=(i=this._getShaderCodeAndErrorLine(this._pipelineContext._getVertexShaderCode(),this._compilationError,!1))[0],u=i[1],h&&(_0x41154e.Error("Vertex code:"),_0x41154e.Error(h))),(null===(o=this._pipelineContext)||void 0===o?void 0:o._getFragmentShaderCode())&&(h=(n=this._getShaderCodeAndErrorLine(null===(a=this._pipelineContext)||void 0===a?void 0:a._getFragmentShaderCode(),this._compilationError,!0))[0],c=n[1],h&&(_0x41154e.Error("Fragment code:"),_0x41154e.Error(h))),u&&_0x41154e.Error(u),c&&_0x41154e.Error(c)}_0x41154e.Error("Error: "+this._compilationError),t&&(this._pipelineContext=t,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this)),l?(this._pipelineContext=null,l.hasMoreFallbacks?(this._allFallbacksProcessed=!1,_0x41154e.Error("Trying next fallback."),this.defines=l.reduce(this.defines,this),this._prepareEffect()):(this._allFallbacksProcessed=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this),this.onErrorObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh())):this._allFallbacksProcessed=!0},Object.defineProperty(_0x3a7b63.prototype,"isSupported",{get:function(){return""===this._compilationError},enumerable:!1,configurable:!0}),_0x3a7b63.prototype._bindTexture=function(e,t){this._engine._bindTexture(this._samplers[e],t,e)},_0x3a7b63.prototype.setTexture=function(e,t){this._engine.setTexture(this._samplers[e],this._uniforms[e],t,e)},_0x3a7b63.prototype.setDepthStencilTexture=function(e,t){this._engine.setDepthStencilTexture(this._samplers[e],this._uniforms[e],t,e)},_0x3a7b63.prototype.setTextureArray=function(e,t){var i=e+"Ex";if(-1===this._samplerList.indexOf(i+"0")){for(var n=this._samplerList.indexOf(e),r=1;r=0){for(;r++=0&&(m.push(a[u]),g.push(x))}this.shaderProcessingContext.attributeNamesFromEffect=m,this.shaderProcessingContext.attributeLocationsFromEffect=g},_0x5ccdc7.prototype.buildUniformLayout=function(){if(this.shaderProcessingContext.leftOverUniforms.length){this.uniformBuffer=new _0x2e52cb(this.engine,void 0,void 0,"leftOver-"+this._name);for(var e=0,t=this.shaderProcessingContext.leftOverUniforms;e)?$/,"$1"),r=_0x39a749.UniformSizes[n];this.uniformBuffer.addUniform(i.name,r,i.length),this._leftOverUniformsByName[i.name]=i.type}this.uniformBuffer.create()}},_0x5ccdc7.prototype.dispose=function(){this.uniformBuffer&&this.uniformBuffer.dispose()},_0x5ccdc7.prototype.setInt=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt(e,t)},_0x5ccdc7.prototype.setInt2=function(e,t,i){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt2(e,t,i)},_0x5ccdc7.prototype.setInt3=function(e,t,i,n){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt3(e,t,i,n)},_0x5ccdc7.prototype.setInt4=function(e,t,i,n,r){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt4(e,t,i,n,r)},_0x5ccdc7.prototype.setIntArray=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateIntArray(e,t)},_0x5ccdc7.prototype.setIntArray2=function(e,t){this.setIntArray(e,t)},_0x5ccdc7.prototype.setIntArray3=function(e,t){this.setIntArray(e,t)},_0x5ccdc7.prototype.setIntArray4=function(e,t){this.setIntArray(e,t)},_0x5ccdc7.prototype.setArray=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateArray(e,t)},_0x5ccdc7.prototype.setArray2=function(e,t){this.setArray(e,t)},_0x5ccdc7.prototype.setArray3=function(e,t){this.setArray(e,t)},_0x5ccdc7.prototype.setArray4=function(e,t){this.setArray(e,t)},_0x5ccdc7.prototype.setMatrices=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrices(e,t)},_0x5ccdc7.prototype.setMatrix=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix(e,t)},_0x5ccdc7.prototype.setMatrix3x3=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix3x3(e,t)},_0x5ccdc7.prototype.setMatrix2x2=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix2x2(e,t)},_0x5ccdc7.prototype.setFloat=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat(e,t)},_0x5ccdc7.prototype.setVector2=function(e,t){this.setFloat2(e,t.x,t.y)},_0x5ccdc7.prototype.setFloat2=function(e,t,i){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat2(e,t,i)},_0x5ccdc7.prototype.setVector3=function(e,t){this.setFloat3(e,t.x,t.y,t.z)},_0x5ccdc7.prototype.setFloat3=function(e,t,i,n){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat3(e,t,i,n)},_0x5ccdc7.prototype.setVector4=function(e,t){this.setFloat4(e,t.x,t.y,t.z,t.w)},_0x5ccdc7.prototype.setFloat4=function(e,t,i,n,r){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat4(e,t,i,n,r)},_0x5ccdc7.prototype.setColor3=function(e,t){this.setFloat3(e,t.r,t.g,t.b)},_0x5ccdc7.prototype.setColor4=function(e,t,i){this.setFloat4(e,t.r,t.g,t.b,i)},_0x5ccdc7.prototype.setDirectColor4=function(e,t){this.setFloat4(e,t.r,t.g,t.b,t.a)},_0x5ccdc7.prototype._getVertexShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.vertex},_0x5ccdc7.prototype._getFragmentShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.fragment};var _0x1c3891=(_0x23b919=!0,function(e,t){var i=_0x23b919?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23b919=!1,i}),_0x31b7bd=_0x1c3891(void 0,(function(){return _0x31b7bd.toString().search("(((.+)+)+)+$").toString().constructor(_0x31b7bd).search("(((.+)+)+)+$")})),_0x23b919;_0x31b7bd();var _0x341fd9=4,_0x391697=65536,_0x33c3e4={mat2:2,mat3:3,mat4:4,mat2x2:2,mat3x3:3,mat4x4:4};function _0x41080c(e){this.shaderLanguage=e,this._attributeNextLocation=0,this._varyingNextLocation=0,this.freeGroupIndex=0,this.freeBindingIndex=0,this.availableVaryings={},this.availableAttributes={},this.availableBuffers={},this.availableTextures={},this.availableSamplers={},this.orderedAttributes=[],this.bindGroupLayoutEntries=[],this.bindGroupLayoutEntryInfo=[],this.bindGroupEntries=[],this.bufferNames=[],this.textureNames=[],this.samplerNames=[],this.leftOverUniforms=[],this._findStartingGroupBinding()}Object.defineProperty(_0x41080c,"KnownUBOs",{get:function(){return _0x41080c._SimplifiedKnownBindings?_0x41080c._SimplifiedKnownUBOs:_0x41080c._KnownUBOs},enumerable:!1,configurable:!0}),_0x41080c.prototype._findStartingGroupBinding=function(){var e=_0x41080c.KnownUBOs,t=[];for(var i in e){var n=e[i].binding;-1!==n.groupIndex&&(void 0===t[n.groupIndex]?t[n.groupIndex]=n.bindingIndex:t[n.groupIndex]=Math.max(t[n.groupIndex],n.bindingIndex))}this.freeGroupIndex=t.length-1,0===this.freeGroupIndex?(this.freeGroupIndex++,this.freeBindingIndex=0):this.freeBindingIndex=t[t.length-1]+1},_0x41080c.prototype.getAttributeNextLocation=function(e,t){var i;void 0===t&&(t=0);var n=this._attributeNextLocation;return this._attributeNextLocation+=(null!==(i=_0x33c3e4[e])&&void 0!==i?i:1)*(t||1),n},_0x41080c.prototype.getVaryingNextLocation=function(e,t){var i;void 0===t&&(t=0);var n=this._varyingNextLocation;return this._varyingNextLocation+=(null!==(i=_0x33c3e4[e])&&void 0!==i?i:1)*(t||1),n},_0x41080c.prototype.getNextFreeUBOBinding=function(){return this._getNextFreeBinding(1)},_0x41080c.prototype._getNextFreeBinding=function(e){if(this.freeBindingIndex>_0x391697-e&&(this.freeGroupIndex++,this.freeBindingIndex=0),this.freeGroupIndex===_0x341fd9)throw"Too many textures or UBOs have been declared and it is not supported in WebGPU.";var t={groupIndex:this.freeGroupIndex,bindingIndex:this.freeBindingIndex};return this.freeBindingIndex+=e,t},_0x41080c._SimplifiedKnownBindings=!0,_0x41080c._SimplifiedKnownUBOs={Scene:{binding:{groupIndex:0,bindingIndex:0}},Light0:{binding:{groupIndex:-1,bindingIndex:-1}},Light1:{binding:{groupIndex:-1,bindingIndex:-1}},Light2:{binding:{groupIndex:-1,bindingIndex:-1}},Light3:{binding:{groupIndex:-1,bindingIndex:-1}},Light4:{binding:{groupIndex:-1,bindingIndex:-1}},Light5:{binding:{groupIndex:-1,bindingIndex:-1}},Light6:{binding:{groupIndex:-1,bindingIndex:-1}},Light7:{binding:{groupIndex:-1,bindingIndex:-1}},Light8:{binding:{groupIndex:-1,bindingIndex:-1}},Light9:{binding:{groupIndex:-1,bindingIndex:-1}},Light10:{binding:{groupIndex:-1,bindingIndex:-1}},Light11:{binding:{groupIndex:-1,bindingIndex:-1}},Light12:{binding:{groupIndex:-1,bindingIndex:-1}},Light13:{binding:{groupIndex:-1,bindingIndex:-1}},Light14:{binding:{groupIndex:-1,bindingIndex:-1}},Light15:{binding:{groupIndex:-1,bindingIndex:-1}},Light16:{binding:{groupIndex:-1,bindingIndex:-1}},Light17:{binding:{groupIndex:-1,bindingIndex:-1}},Light18:{binding:{groupIndex:-1,bindingIndex:-1}},Light19:{binding:{groupIndex:-1,bindingIndex:-1}},Light20:{binding:{groupIndex:-1,bindingIndex:-1}},Light21:{binding:{groupIndex:-1,bindingIndex:-1}},Light22:{binding:{groupIndex:-1,bindingIndex:-1}},Light23:{binding:{groupIndex:-1,bindingIndex:-1}},Light24:{binding:{groupIndex:-1,bindingIndex:-1}},Light25:{binding:{groupIndex:-1,bindingIndex:-1}},Light26:{binding:{groupIndex:-1,bindingIndex:-1}},Light27:{binding:{groupIndex:-1,bindingIndex:-1}},Light28:{binding:{groupIndex:-1,bindingIndex:-1}},Light29:{binding:{groupIndex:-1,bindingIndex:-1}},Light30:{binding:{groupIndex:-1,bindingIndex:-1}},Light31:{binding:{groupIndex:-1,bindingIndex:-1}},Material:{binding:{groupIndex:-1,bindingIndex:-1}},Mesh:{binding:{groupIndex:-1,bindingIndex:-1}},Internals:{binding:{groupIndex:-1,bindingIndex:-1}}},_0x41080c._KnownUBOs={Scene:{binding:{groupIndex:0,bindingIndex:0}},Light0:{binding:{groupIndex:1,bindingIndex:0}},Light1:{binding:{groupIndex:1,bindingIndex:1}},Light2:{binding:{groupIndex:1,bindingIndex:2}},Light3:{binding:{groupIndex:1,bindingIndex:3}},Light4:{binding:{groupIndex:1,bindingIndex:4}},Light5:{binding:{groupIndex:1,bindingIndex:5}},Light6:{binding:{groupIndex:1,bindingIndex:6}},Light7:{binding:{groupIndex:1,bindingIndex:7}},Light8:{binding:{groupIndex:1,bindingIndex:8}},Light9:{binding:{groupIndex:1,bindingIndex:9}},Light10:{binding:{groupIndex:1,bindingIndex:10}},Light11:{binding:{groupIndex:1,bindingIndex:11}},Light12:{binding:{groupIndex:1,bindingIndex:12}},Light13:{binding:{groupIndex:1,bindingIndex:13}},Light14:{binding:{groupIndex:1,bindingIndex:14}},Light15:{binding:{groupIndex:1,bindingIndex:15}},Light16:{binding:{groupIndex:1,bindingIndex:16}},Light17:{binding:{groupIndex:1,bindingIndex:17}},Light18:{binding:{groupIndex:1,bindingIndex:18}},Light19:{binding:{groupIndex:1,bindingIndex:19}},Light20:{binding:{groupIndex:1,bindingIndex:20}},Light21:{binding:{groupIndex:1,bindingIndex:21}},Light22:{binding:{groupIndex:1,bindingIndex:22}},Light23:{binding:{groupIndex:1,bindingIndex:23}},Light24:{binding:{groupIndex:1,bindingIndex:24}},Light25:{binding:{groupIndex:1,bindingIndex:25}},Light26:{binding:{groupIndex:1,bindingIndex:26}},Light27:{binding:{groupIndex:1,bindingIndex:27}},Light28:{binding:{groupIndex:1,bindingIndex:28}},Light29:{binding:{groupIndex:1,bindingIndex:29}},Light30:{binding:{groupIndex:1,bindingIndex:30}},Light31:{binding:{groupIndex:1,bindingIndex:31}},Material:{binding:{groupIndex:2,bindingIndex:0}},Mesh:{binding:{groupIndex:2,bindingIndex:1}},Internals:{binding:{groupIndex:2,bindingIndex:2}}};var _0xe85e33=(_0x45c3ec=!0,function(e,t){var i=_0x45c3ec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45c3ec=!1,i}),_0x36bad7=_0xe85e33(void 0,(function(){return _0x36bad7.toString().search("(((.+)+)+)+$").toString().constructor(_0x36bad7).search("(((.+)+)+)+$")})),_0x45c3ec;function _0x3d24e9(){var e=_0x39a749.call(this,arguments)||this;return e._missingVaryings=[],e._textureArrayProcessing=[],e.shaderLanguage=_0x4cf79a.GLSL,e}function _0x16a3cd(e,t){for(var i=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),n=t.length,r=0;r0&&o>0){var a=e.substring(r+1,o);n=+a,isNaN(n)&&(n=+i[a.trim()]),e=e.substr(0,r)}return[e,t,n]},_0x3d24e9.prototype.initializeShaders=function(e){this._webgpuProcessingContext=e,this._missingVaryings.length=0,this._textureArrayProcessing.length=0},_0x3d24e9.prototype.preProcessShaderCode=function(e,t){var i="uniform ".concat(_0x39a749.InternalsUBOName," {\nfloat yFactor__;\nfloat textureOutputHeight__;\n};\n");return t?i+"##INJECTCODE##\n"+e:i+e},_0x3d24e9.prototype.varyingProcessor=function(e,t,i){this._preProcessors=i;var n=/\s*varying\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!=n){var r,o=n[1],a=n[2];t?(r=this._webgpuProcessingContext.availableVaryings[a],this._missingVaryings[r]="",void 0===r&&_0x41154e.Warn('Invalid fragment shader: The varying named "'.concat(a,'" is not declared in the vertex shader! This declaration will be ignored.'))):(r=this._webgpuProcessingContext.getVaryingNextLocation(o,this._getArraySize(a,o,i)[2]),this._webgpuProcessingContext.availableVaryings[a]=r,this._missingVaryings[r]="layout(location = ".concat(r,") in ").concat(o," ").concat(a,";")),e=e.replace(n[0],void 0===r?"":"layout(location = ".concat(r,") ").concat(t?"in":"out"," ").concat(o," ").concat(a,";"))}return e},_0x3d24e9.prototype.attributeProcessor=function(e,t){this._preProcessors=t;var i=/\s*attribute\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!=i){var n=i[1],r=i[2],o=this._webgpuProcessingContext.getAttributeNextLocation(n,this._getArraySize(r,n,t)[2]);this._webgpuProcessingContext.availableAttributes[r]=o,this._webgpuProcessingContext.orderedAttributes[o]=r,e=e.replace(i[0],"layout(location = ".concat(o,") in ").concat(n," ").concat(r,";"))}return e},_0x3d24e9.prototype.uniformProcessor=function(e,t,i){var n,r;this._preProcessors=i;var o=/\s*uniform\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!=o){var a=o[1],s=o[2];if(0===a.indexOf("sampler")||1===a.indexOf("sampler")){var l=0;s=(n=this._getArraySize(s,a,i))[0],a=n[1],l=n[2];var u=this._webgpuProcessingContext.availableTextures[s];if(!u){u={autoBindSampler:!0,isTextureArray:l>0,isStorageTexture:!1,textures:[],sampleType:_0x572d87.TextureSampleType.Float};for(var c=0;c<(l||1);++c)u.textures.push(this._webgpuProcessingContext.getNextFreeUBOBinding())}var h=null!==(r=_0x39a749._SamplerTypeByWebGLSamplerType[a])&&void 0!==r?r:"sampler",d=!!_0x39a749._IsComparisonSamplerByWebGPUSamplerType[h];s.indexOf("depth")>=0&&(d=!0);var f=d?_0x572d87.SamplerBindingType.Comparison:_0x572d87.SamplerBindingType.Filtering,p=s+_0x39a749.AutoSamplerSuffix,_=this._webgpuProcessingContext.availableSamplers[p];!_&&(_={binding:this._webgpuProcessingContext.getNextFreeUBOBinding(),type:f});var m="u"===a.charAt(0)?"u":"i"===a.charAt(0)?"i":"";m&&(a=a.substr(1));var g=d?_0x572d87.TextureSampleType.Depth:"u"===m?_0x572d87.TextureSampleType.Uint:"i"===m?_0x572d87.TextureSampleType.Sint:_0x572d87.TextureSampleType.Float;u.sampleType=g;var x=l>0,v=_.binding.groupIndex,y=_.binding.bindingIndex,$=_0x39a749._SamplerFunctionByWebGLSamplerType[a],b=_0x39a749._TextureTypeByWebGLSamplerType[a],T=_0x39a749._GpuTextureViewDimensionByWebGPUTextureType[b];if(x){var C=[];C.push("layout(set = ".concat(v,", binding = ").concat(y,") uniform ").concat(m).concat(h," ").concat(p,";")),e="\r\n";for(c=0;c0?"\r\n":"","#define ").concat(s).concat(c," ").concat(m).concat($,"(").concat(s,"Texture").concat(c,", ").concat(p,")")}e=C.join("\r\n")+e,this._textureArrayProcessing.push(s)}else l=1,e="layout(set = ".concat(v,", binding = ").concat(y,") uniform ").concat(m).concat(h," ").concat(p,";\n layout(set = ").concat(u.textures[0].groupIndex,", binding = ").concat(u.textures[0].bindingIndex,") uniform ").concat(b," ").concat(s,"Texture;\n #define ").concat(s," ").concat(m).concat($,"(").concat(s,"Texture, ").concat(p,")");this._webgpuProcessingContext.availableTextures[s]=u,this._webgpuProcessingContext.availableSamplers[p]=_,this._addSamplerBindingDescription(p,_,!t);for(c=0;c-1&&_0x16a3cd("gl_FragColor",u)){var h=o?"":"layout(location = 0) out vec4 glFragColor;";u.splice(c,0,h),e=u.join("\n")}var d=e.indexOf("gl_FragCoord")>=0,f=d?"vec4 glFragCoord__;\n":"";e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/texture2DLodEXT\s*\(/g,"textureLod(")).replace(/textureCubeLodEXT\s*\(/g,"textureLod(")).replace(/textureCube\s*\(/g,"texture(")).replace(/gl_FragDepthEXT/g,"gl_FragDepth")).replace(/gl_FragColor/g,"glFragColor")).replace(/gl_FragData/g,"glFragData")).replace(/gl_FragCoord/g,"glFragCoord__")).replace(/dFdy/g,"(-yFactor__)*dFdy")).replace("##INJECTCODE##",f),d&&(e=this._injectStartingAndEndingCode(e,"void main","\n glFragCoord__ = gl_FragCoord;\n if (yFactor__ == 1.) {\n glFragCoord__.y = textureOutputHeight__ - glFragCoord__.y;\n }\n "))}else{if(e=(e=e.replace(/gl_InstanceID/g,"gl_InstanceIndex")).replace(/gl_VertexID/g,"gl_VertexIndex"),-1!==t.indexOf("#define MULTIVIEW"))return"#extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in;\n"+e}if(!i&&-1==e.indexOf("gl_Position.y *= yFactor__")){var p=e.lastIndexOf("}");e=e.substring(0,p),e+="gl_Position.y *= yFactor__;\n",!r.isNDCHalfZRange&&(e+="gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0;\n"),e+="}"}return e},_0x3d24e9.prototype._applyTextureArrayProcessing=function(e,t){for(var i=new RegExp(t+"\\s*\\[(.+)?\\]","gm"),n=i.exec(e);null!=n;){var r=n[1],o=+r;this._preProcessors&&isNaN(o)&&(o=+this._preProcessors[r.trim()]),e=e.replace(n[0],t+o),n=i.exec(e)}return e},_0x3d24e9.prototype._generateLeftOverUBOCode=function(e,t){for(var i="layout(set = ".concat(t.binding.groupIndex,", binding = ").concat(t.binding.bindingIndex,") uniform ").concat(e," {\n "),n=0,r=this._webgpuProcessingContext.leftOverUniforms;n0?i+=" ".concat(o.type," ").concat(o.name,"[").concat(o.length,"];\n"):i+=" ".concat(o.type," ").concat(o.name,";\n")}return i+="};\n\n"},_0x3d24e9.prototype.finalizeShaders=function(e,t){for(var i=0;i0&&(t=r+"\n"+t)}var o=this._buildLeftOverUBO();return e=o+e,t=o+t,this._collectBindingNames(),this._preCreateBindGroupEntries(),this._preProcessors=null,{vertexCode:e,fragmentCode:t}};var _0x514109=(_0x5e7b4d=!0,function(e,t){var i=_0x5e7b4d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e7b4d=!1,i}),_0x305c52=_0x514109(void 0,(function(){return _0x305c52.toString().search("(((.+)+)+)+$").toString().constructor(_0x305c52).search("(((.+)+)+)+$")})),_0x5e7b4d;function ExtractBetweenMarkers(e,t,i,n){for(var r=n,o=0,a="";r=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||95==t}function RemoveComments(e){for(var t=0,i="",n=!1,r=[];t=0&&e.charAt(t)!==i;)t--;return t}function EscapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}_0x305c52();var _0xd5f34f=(_0x8e00cc=!0,function(e,t){var i=_0x8e00cc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8e00cc=!1,i}),_0x3d45fe=_0xd5f34f(void 0,(function(){return _0x3d45fe.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d45fe).search("(((.+)+)+)+$")})),_0x8e00cc;_0x3d45fe();var _0x251f45="gl_VertexID",_0x373238="gl_InstanceID",_0x111d55="gl_Position",_0x52db28="gl_FragCoord",_0x2dc9d3="gl_FrontFacing",_0x4172bb="gl_FragDepth",_0x47225f="gl_FragColor",_0x14adc6="gl_FragData",_0x35b34d=["gl_FragData0","gl_FragData1","gl_FragData2","gl_FragData3","gl_FragData4","gl_FragData5","gl_FragData6","gl_FragData7"],_0x3f7335="uniforms",_0x67a6d7="internals",_0x179a16={texture_1d:_0x572d87.TextureViewDimension.E1d,texture_2d:_0x572d87.TextureViewDimension.E2d,texture_2d_array:_0x572d87.TextureViewDimension.E2dArray,texture_3d:_0x572d87.TextureViewDimension.E3d,texture_cube:_0x572d87.TextureViewDimension.Cube,texture_cube_array:_0x572d87.TextureViewDimension.CubeArray,texture_multisampled_2d:_0x572d87.TextureViewDimension.E2d,texture_depth_2d:_0x572d87.TextureViewDimension.E2d,texture_depth_2d_array:_0x572d87.TextureViewDimension.E2dArray,texture_depth_cube:_0x572d87.TextureViewDimension.Cube,texture_depth_cube_array:_0x572d87.TextureViewDimension.CubeArray,texture_depth_multisampled_2d:_0x572d87.TextureViewDimension.E2d,texture_storage_1d:_0x572d87.TextureViewDimension.E1d,texture_storage_2d:_0x572d87.TextureViewDimension.E2d,texture_storage_2d_array:_0x572d87.TextureViewDimension.E2dArray,texture_storage_3d:_0x572d87.TextureViewDimension.E3d,texture_external:null};function _0xbbdbb1(){var e=_0x39a749.call(this,arguments)||this;return e.shaderLanguage=_0x4cf79a.WGSL,e.uniformRegexp=/uniform\s+(\w+)\s*:\s*(.+)\s*;/,e.textureRegexp=/var\s+(\w+)\s*:\s*((array<\s*)?(texture_\w+)\s*(<\s*(.+)\s*>)?\s*(,\s*\w+\s*>\s*)?);/,e.noPrecision=!0,e}_0xbbdbb1.prototype=Object.create(_0x39a749.prototype),_0xbbdbb1.prototype.constructor=_0x39a749,_0xbbdbb1.prototype._getArraySize=function(e,t,i){var n=0,r=t.lastIndexOf(">");if(t.indexOf("array")>=0&&r>0){for(var o=r;o>0&&" "!==t.charAt(o)&&","!==t.charAt(o);)o--;var a=t.substring(o+1,r);for(n=+a,isNaN(n)&&(n=+i[a.trim()]);o>0&&(" "===t.charAt(o)||","===t.charAt(o));)o--;t=t.substring(t.indexOf("<")+1,o+1)}return[e,t,n]},_0xbbdbb1.prototype.initializeShaders=function(e){this._webgpuProcessingContext=e,this._attributesWGSL=[],this._attributesDeclWGSL=[],this._attributeNamesWGSL=[],this._varyingsWGSL=[],this._varyingsDeclWGSL=[],this._varyingNamesWGSL=[],this._stridedUniformArrays=[]},_0xbbdbb1.prototype.preProcessShaderCode=function(e){return"struct ".concat(_0x39a749.InternalsUBOName," {\nyFactor__: f32,\ntextureOutputHeight__: f32,\n};\nvar ").concat(_0x67a6d7," : ").concat(_0x39a749.InternalsUBOName,";\n")+RemoveComments(e)},_0xbbdbb1.prototype.varyingProcessor=function(e,t,i){var n=/\s*varying\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s*:\s*(.+)\s*;/gm.exec(e);if(null!==n){var r,o=n[2],a=n[1];t?void 0===(r=this._webgpuProcessingContext.availableVaryings[a])&&_0x41154e.Warn('Invalid fragment shader: The varying named "'.concat(a,'" is not declared in the vertex shader! This declaration will be ignored.')):(r=this._webgpuProcessingContext.getVaryingNextLocation(o,this._getArraySize(a,o,i)[2]),this._webgpuProcessingContext.availableVaryings[a]=r,this._varyingsWGSL.push("@location(".concat(r,") ").concat(a," : ").concat(o,",")),this._varyingsDeclWGSL.push("var ".concat(a," : ").concat(o,";")),this._varyingNamesWGSL.push(a)),e=""}return e},_0xbbdbb1.prototype.attributeProcessor=function(e,t){var i=/\s*attribute\s+(\S+)\s*:\s*(.+)\s*;/gm.exec(e);if(null!==i){var n=i[2],r=i[1],o=this._webgpuProcessingContext.getAttributeNextLocation(n,this._getArraySize(r,n,t)[2]);this._webgpuProcessingContext.availableAttributes[r]=o,this._webgpuProcessingContext.orderedAttributes[o]=r,this._attributesWGSL.push("@location(".concat(o,") ").concat(r," : ").concat(n,",")),this._attributesDeclWGSL.push("var ".concat(r," : ").concat(n,";")),this._attributeNamesWGSL.push(r),e=""}return e},_0xbbdbb1.prototype.uniformProcessor=function(e,t,i){var n=this.uniformRegexp.exec(e);if(null!==n){var r=n[2],o=n[1];this._addUniformToLeftOverUBO(o,r,i),e=""}return e},_0xbbdbb1.prototype.textureProcessor=function(e,t,i){var n=this.textureRegexp.exec(e);if(null!==n){var r=n[1],o=n[2],a=!!n[3],s=n[4],l=s.indexOf("storage")>0,u=n[6],c=l?u.substring(0,u.indexOf(",")).trim():null,h=a?this._getArraySize(r,o,i)[2]:0,d=this._webgpuProcessingContext.availableTextures[r];if(d)h=d.textures.length;else{d={isTextureArray:h>0,isStorageTexture:l,textures:[],sampleType:_0x572d87.TextureSampleType.Float,isMultisampled:!1},h=h||1;for(var f=0;f0,_=_0x179a16[s],m=p?_0x572d87.TextureSampleType.Depth:"u32"===u?_0x572d87.TextureSampleType.Uint:"i32"===u?_0x572d87.TextureSampleType.Sint:_0x572d87.TextureSampleType.Float;d.sampleType=m;var g=!!p&&s.indexOf("multisampled")>0;if(d.isMultisampled=g,void 0===_)throw"Can't get the texture dimension corresponding to the texture function \"".concat(s,'"!');if(a){var x=[];for(f=0;f;"))}e=x.join("\r\n")}else{h=1;var $=d.textures[0],b=$.groupIndex,T=$.bindingIndex;e="@group(".concat(b,") @binding(").concat(T,") ").concat(e)}for(f=0;f=0?"\n if (internals.yFactor__ == 1.) {\n gl_FragCoord.y = internals.textureOutputHeight__ - gl_FragCoord.y;\n }\n ":"";e=this._processSamplers(e,!0),t=this._processSamplers(t,!1),e=this._processCustomBuffers(e,!0),t=this._processCustomBuffers(t,!1);var n=this._buildLeftOverUBO();t=n+t,e=(e=n+e).replace(/#define /g,"//#define "),e=this._processStridedUniformArrays(e);var r=this._varyingsDeclWGSL.join("\n")+"\n",o="var ".concat(_0x251f45," : u32;\nvar ").concat(_0x373238," : u32;\nvar ").concat(_0x111d55," : vec4;\n"),a=this._attributesDeclWGSL.join("\n")+"\n",s="struct VertexInputs {\n @builtin(vertex_index) vertexIndex : u32,\n @builtin(instance_index) instanceIndex : u32,\n";this._attributesWGSL.length>0&&(s+=this._attributesWGSL.join("\n")),s+="\n};\n";var l="struct FragmentInputs {\n @builtin(position) position : vec4,\n";this._varyingsWGSL.length>0&&(l+=this._varyingsWGSL.join("\n")),e=o+s+a+(l+="\n};\n")+r+e;for(var u=" var output : FragmentInputs;\n ".concat(_0x251f45," = input.vertexIndex;\n ").concat(_0x373238," = input.instanceIndex;\n"),c=0;c;\nvar ").concat(_0x2dc9d3," : bool;\nvar ").concat(_0x47225f," : vec4;\nvar ").concat(_0x4172bb," : f32;\n");p+="var ".concat(_0x35b34d[0]," : vec4;\nvar ").concat(_0x35b34d[1]," : vec4;\nvar ").concat(_0x35b34d[2]," : vec4;\nvar ").concat(_0x35b34d[3]," : vec4;\nvar ").concat(_0x35b34d[4]," : vec4;\nvar ").concat(_0x35b34d[5]," : vec4;\nvar ").concat(_0x35b34d[6]," : vec4;\nvar ").concat(_0x35b34d[7]," : vec4;\n");var _="struct FragmentInputs {\n @builtin(position) position : vec4,\n @builtin(front_facing) frontFacing : bool,\n";this._varyingsWGSL.length>0&&(_+=this._varyingsWGSL.join("\n")),_+="\n};\n";for(var m,g=!1,x=0,v=-1;x>=0;)if((x=t.indexOf(_0x14adc6,x))>=0){var y=x+_0x14adc6.length,$=t.substring(y,y+1);$=parseInt($),v=Math.max($,v),g=!0,x+=_0x14adc6.length}if(g){m="struct FragmentOutputs {\n";for(var b=0;b,\n"}else m="struct FragmentOutputs {\n @location(0) color : vec4,\n";for(var T=!1,C=0;!(T||(C=t.indexOf(_0x4172bb,C))<0);){var S=C;for(T=!0;C>1&&"\n"!==t.charAt(C);){if("/"===t.charAt(C)&&"/"===t.charAt(C-1)){T=!1;break}C--}C=S+_0x4172bb.length}T&&(m+=" @builtin(frag_depth) fragDepth: f32,\n"),t=p+_+r+(m+="};\n")+t;var w=" var output : FragmentOutputs;\n ".concat(_0x52db28," = input.position;\n ").concat(_0x2dc9d3," = input.frontFacing;\n")+i;for(c=0;c)?$/,"$1"),l=_0x39a749.UniformSizes[s];if(a.length>0)if(l<=2){var u="".concat(e,"_").concat(this._stridedUniformArrays.length,"_strided_arr");i+="struct ".concat(u," {\n @size(16)\n el: ").concat(s,",\n }"),this._stridedUniformArrays.push(a.name),n+=" @align(16) ".concat(a.name," : array<").concat(u,", ").concat(a.length,">,\n")}else n+=" ".concat(a.name," : array<").concat(a.type,", ").concat(a.length,">,\n");else n+=" ".concat(a.name," : ").concat(a.type,",\n")}return n+="};\n",n="".concat(i,"\n").concat(n),n+="@group(".concat(t.binding.groupIndex,") @binding(").concat(t.binding.bindingIndex,") var ").concat(_0x3f7335," : ").concat(e,";\n")},_0xbbdbb1.prototype._processSamplers=function(e,t){for(var i=/var\s+(\w+Sampler)\s*:\s*(sampler|sampler_comparison)\s*;/gm;;){var n=i.exec(e);if(null===n)break;var r=n[1],o=n[2],a=r.indexOf(_0x39a749.AutoSamplerSuffix)===r.length-_0x39a749.AutoSamplerSuffix.length?r.substring(0,r.indexOf(_0x39a749.AutoSamplerSuffix)):null,s="sampler_comparison"===o?_0x572d87.SamplerBindingType.Comparison:_0x572d87.SamplerBindingType.Filtering;if(a){var l=this._webgpuProcessingContext.availableTextures[a];l&&(l.autoBindSampler=!0)}var u=this._webgpuProcessingContext.availableSamplers[r];!u&&(u={binding:this._webgpuProcessingContext.getNextFreeUBOBinding(),type:s},this._webgpuProcessingContext.availableSamplers[r]=u),this._addSamplerBindingDescription(r,u,t);var c=e.substring(0,n.index),h="@group(".concat(u.binding.groupIndex,") @binding(").concat(u.binding.bindingIndex,") "),d=e.substring(n.index);e=c+h+d,i.lastIndex+=h.length}return e},_0xbbdbb1.prototype._processCustomBuffers=function(e,t){for(var i=/var<\s*(uniform|storage)\s*(,\s*(read|read_write)\s*)?>\s+(\S+)\s*:\s*(\S+)\s*;/gm;;){var n=i.exec(e);if(null===n)break;var r=n[1],o=n[3],a=n[4],s=n[5],l=this._webgpuProcessingContext.availableBuffers[a];if(!l){var u="uniform"===r?_0x41080c.KnownUBOs[s]:null,c=void 0;u?(a=s,-1===(c=u.binding).groupIndex&&(c=this._webgpuProcessingContext.getNextFreeUBOBinding())):c=this._webgpuProcessingContext.getNextFreeUBOBinding(),l={binding:c},this._webgpuProcessingContext.availableBuffers[a]=l}this._addBufferBindingDescription(a,this._webgpuProcessingContext.availableBuffers[a],"read_write"===o?_0x572d87.BufferBindingType.Storage:"storage"===r?_0x572d87.BufferBindingType.ReadOnlyStorage:_0x572d87.BufferBindingType.Uniform,t);var h=l.binding.groupIndex,d=l.binding.bindingIndex,f=e.substring(0,n.index),p="@group(".concat(h,") @binding(").concat(d,") "),_=e.substring(n.index);e=f+p+_,i.lastIndex+=p.length}return e},_0xbbdbb1.prototype._processStridedUniformArrays=function(e){for(var t=0,i=this._stridedUniformArrays;t1?4:1;return _0x3ae23a[e.samplingMode]+_0x46bb06[(e._comparisonFunction||514)-512+1]+_0x33a194[e.samplingMode]+((null!==(t=e._cachedWrapU)&&void 0!==t?t:1)<<8)+((null!==(i=e._cachedWrapV)&&void 0!==i?i:1)<<10)+((null!==(n=e._cachedWrapR)&&void 0!==n?n:1)<<12)+((e.useMipMaps?1:0)<<14)+(r<<15)},_0x408e52._GetSamplerFilterDescriptor=function(e,t){var i,n,r,o,a,s=e.useMipMaps;switch(e.samplingMode){case _0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST:i=_0x572d87.FilterMode.Linear,n=_0x572d87.FilterMode.Linear,r=_0x572d87.FilterMode.Nearest,!s&&(o=a=0);break;case _0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR:case _0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE:i=_0x572d87.FilterMode.Linear,n=_0x572d87.FilterMode.Linear,s?r=_0x572d87.FilterMode.Linear:(r=_0x572d87.FilterMode.Nearest,o=a=0);break;case _0x354cf8.TEXTURE_NEAREST_NEAREST_MIPLINEAR:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Nearest,s?r=_0x572d87.FilterMode.Linear:(r=_0x572d87.FilterMode.Nearest,o=a=0);break;case _0x354cf8.TEXTURE_NEAREST_NEAREST_MIPNEAREST:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Nearest,r=_0x572d87.FilterMode.Nearest,!s&&(o=a=0);break;case _0x354cf8.TEXTURE_NEAREST_LINEAR_MIPNEAREST:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Linear,r=_0x572d87.FilterMode.Nearest,!s&&(o=a=0);break;case _0x354cf8.TEXTURE_NEAREST_LINEAR_MIPLINEAR:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Linear,s?r=_0x572d87.FilterMode.Linear:(r=_0x572d87.FilterMode.Nearest,o=a=0);break;case _0x354cf8.TEXTURE_NEAREST_LINEAR:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Linear,r=_0x572d87.FilterMode.Nearest,o=a=0;break;case _0x354cf8.TEXTURE_NEAREST_NEAREST:case _0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Nearest,r=_0x572d87.FilterMode.Nearest,o=a=0;break;case _0x354cf8.TEXTURE_LINEAR_NEAREST_MIPNEAREST:i=_0x572d87.FilterMode.Linear,n=_0x572d87.FilterMode.Nearest,r=_0x572d87.FilterMode.Nearest,!s&&(o=a=0);break;case _0x354cf8.TEXTURE_LINEAR_NEAREST_MIPLINEAR:i=_0x572d87.FilterMode.Linear,n=_0x572d87.FilterMode.Nearest,s?r=_0x572d87.FilterMode.Linear:(r=_0x572d87.FilterMode.Nearest,o=a=0);break;case _0x354cf8.TEXTURE_LINEAR_LINEAR:case _0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE:i=_0x572d87.FilterMode.Linear,n=_0x572d87.FilterMode.Linear,r=_0x572d87.FilterMode.Nearest,o=a=0;break;case _0x354cf8.TEXTURE_LINEAR_NEAREST:i=_0x572d87.FilterMode.Linear,n=_0x572d87.FilterMode.Nearest,r=_0x572d87.FilterMode.Nearest,o=a=0;break;default:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Nearest,r=_0x572d87.FilterMode.Nearest,o=a=0}return t>1&&(0!==o||0!==a)?{magFilter:_0x572d87.FilterMode.Linear,minFilter:_0x572d87.FilterMode.Linear,mipmapFilter:_0x572d87.FilterMode.Linear,anisotropyEnabled:!0}:{magFilter:i,minFilter:n,mipmapFilter:r,lodMinClamp:o,lodMaxClamp:a}},_0x408e52._GetWrappingMode=function(e){switch(e){case _0x354cf8.TEXTURE_WRAP_ADDRESSMODE:return _0x572d87.AddressMode.Repeat;case _0x354cf8.TEXTURE_CLAMP_ADDRESSMODE:return _0x572d87.AddressMode.ClampToEdge;case _0x354cf8.TEXTURE_MIRROR_ADDRESSMODE:return _0x572d87.AddressMode.MirrorRepeat}return _0x572d87.AddressMode.Repeat},_0x408e52._GetSamplerWrappingDescriptor=function(e){return{addressModeU:this._GetWrappingMode(e._cachedWrapU),addressModeV:this._GetWrappingMode(e._cachedWrapV),addressModeW:this._GetWrappingMode(e._cachedWrapR)}},_0x408e52._GetSamplerDescriptor=function(e){var t=e.useMipMaps&&e._cachedAnisotropicFilteringLevel&&e._cachedAnisotropicFilteringLevel>1?4:1,i=this._GetSamplerFilterDescriptor(e,t),n=p$19(i,this._GetSamplerWrappingDescriptor(e));return n=p$19(n,{compare:e._comparisonFunction?_0x408e52.GetCompareFunction(e._comparisonFunction):void 0,maxAnisotropy:i.anisotropyEnabled?t:1})},_0x408e52.GetCompareFunction=function(e){switch(e){case _0x354cf8.ALWAYS:return _0x572d87.CompareFunction.Always;case _0x354cf8.EQUAL:return _0x572d87.CompareFunction.Equal;case _0x354cf8.GREATER:return _0x572d87.CompareFunction.Greater;case _0x354cf8.GEQUAL:return _0x572d87.CompareFunction.GreaterEqual;case _0x354cf8.LESS:return _0x572d87.CompareFunction.Less;case _0x354cf8.LEQUAL:return _0x572d87.CompareFunction.LessEqual;case _0x354cf8.NEVER:return _0x572d87.CompareFunction.Never;case _0x354cf8.NOTEQUAL:return _0x572d87.CompareFunction.NotEqual;default:return _0x572d87.CompareFunction.Less}},_0x408e52.prototype.getSampler=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=0),this.disabled)return this._device.createSampler(_0x408e52._GetSamplerDescriptor(e));t?i=0:0===i&&(i=_0x408e52.GetSamplerHashCode(e));var n=t?void 0:this._samplers[i];return!n&&(n=this._device.createSampler(_0x408e52._GetSamplerDescriptor(e)),!t&&(this._samplers[i]=n)),n},function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.StencilReadMask=0]="StencilReadMask",e[e.StencilWriteMask=1]="StencilWriteMask",e[e.DepthBias=2]="DepthBias",e[e.DepthBiasSlopeScale=3]="DepthBiasSlopeScale",e[e.DepthStencilState=4]="DepthStencilState",e[e.MRTAttachments1=5]="MRTAttachments1",e[e.MRTAttachments2=6]="MRTAttachments2",e[e.RasterizationState=7]="RasterizationState",e[e.ColorStates=8]="ColorStates",e[e.ShaderStage=9]="ShaderStage",e[e.TextureStage=10]="TextureStage",e[e.VertexState=11]="VertexState",e[e.NumStates=12]="NumStates"}(_0x46da76||(_0x46da76={}));var _0x2de812={0:1,1:2,768:3,769:4,770:5,771:6,772:7,773:8,774:9,775:10,776:11,32769:12,32770:13,32771:12,32772:13},_0x4bda0e={0:0,7680:1,7681:2,7682:3,7683:4,5386:5,34055:6,34056:7};function _0x2541a9(e,t,i){this.mrtTextureCount=0,this._device=e,this._useTextureStage=i,this._states=new Array(30),this._statesLength=0,this._stateDirtyLowestIndex=0,this._emptyVertexBuffer=t,this._mrtFormats=[],this._parameter={token:void 0,pipeline:null},this.disabled=!1,this.vertexBuffers=[],this._kMaxVertexBufferStride=e.limits.maxVertexBufferArrayStride||2048,this.reset()}_0x2541a9.prototype.reset=function(){this._isDirty=!0,this.vertexBuffers.length=0,this.setAlphaToCoverage(!1),this.resetDepthCullingState(),this.setClampDepth(!1),this.setDepthBias(0),this._webgpuColorFormat=[_0x572d87.TextureFormat.BGRA8Unorm],this.setColorFormat(_0x572d87.TextureFormat.BGRA8Unorm),this.setMRT([]),this.setAlphaBlendEnabled(!1),this.setAlphaBlendFactors([null,null,null,null],[null,null]),this.setWriteMask(15),this.setDepthStencilFormat(_0x572d87.TextureFormat.Depth24PlusStencil8),this.setStencilEnabled(!1),this.resetStencilState(),this.setBuffers(null,null,null),this._setTextureState(0)},Object.defineProperty(_0x2541a9.prototype,"colorFormats",{get:function(){return this._mrtAttachments1>0?this._mrtFormats:this._webgpuColorFormat},enumerable:!1,configurable:!0}),_0x2541a9.prototype.getRenderPipeline=function(e,t,i,n){if(void 0===n&&(n=0),i>1&&(i=4),this.disabled){var r=_0x2541a9._GetTopology(e);return this._setVertexState(t),this._parameter.pipeline=this._createRenderPipeline(t,r,i),_0x2541a9.NumCacheMiss++,_0x2541a9._NumPipelineCreationCurrentFrame++,this._parameter.pipeline}if(this._setShaderStage(t.uniqueId),this._setRasterizationState(e,i),this._setColorStates(),this._setDepthStencilState(),this._setVertexState(t),this._setTextureState(n),this.lastStateDirtyLowestIndex=this._stateDirtyLowestIndex,!this._isDirty&&this._parameter.pipeline)return this._stateDirtyLowestIndex=this._statesLength,_0x2541a9.NumCacheHitWithoutHash++,this._parameter.pipeline;if(this._getRenderPipeline(this._parameter),this._isDirty=!1,this._stateDirtyLowestIndex=this._statesLength,this._parameter.pipeline)return _0x2541a9.NumCacheHitWithHash++,this._parameter.pipeline;var o=_0x2541a9._GetTopology(e);return this._parameter.pipeline=this._createRenderPipeline(t,o,i),this._setRenderPipeline(this._parameter),_0x2541a9.NumCacheMiss++,_0x2541a9._NumPipelineCreationCurrentFrame++,this._parameter.pipeline},_0x2541a9.prototype.endFrame=function(){_0x2541a9.NumPipelineCreationLastFrame=_0x2541a9._NumPipelineCreationCurrentFrame,_0x2541a9._NumPipelineCreationCurrentFrame=0},_0x2541a9.prototype.setAlphaToCoverage=function(e){this._alphaToCoverageEnabled=e},_0x2541a9.prototype.setFrontFace=function(e){this._frontFace=e},_0x2541a9.prototype.setCullEnabled=function(e){this._cullEnabled=e},_0x2541a9.prototype.setCullFace=function(e){this._cullFace=e},_0x2541a9.prototype.setClampDepth=function(e){this._clampDepth=e},_0x2541a9.prototype.resetDepthCullingState=function(){this.setDepthCullingState(!1,2,1,0,0,!0,!0,_0x354cf8.ALWAYS)},_0x2541a9.prototype.setDepthCullingState=function(e,t,i,n,r,o,a,s){this._depthWriteEnabled=a,this._depthTestEnabled=o,this._depthCompare=(null!=s?s:_0x354cf8.ALWAYS)-512,this._cullFace=i,this._cullEnabled=e,this._frontFace=t,this.setDepthBiasSlopeScale(n),this.setDepthBias(r)},_0x2541a9.prototype.setDepthBias=function(e){this._depthBias!==e&&(this._depthBias=e,this._states[_0x46da76.DepthBias]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.DepthBias))},_0x2541a9.prototype.setDepthBiasSlopeScale=function(e){this._depthBiasSlopeScale!==e&&(this._depthBiasSlopeScale=e,this._states[_0x46da76.DepthBiasSlopeScale]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.DepthBiasSlopeScale))},_0x2541a9.prototype.setColorFormat=function(e){this._webgpuColorFormat[0]=e,this._colorFormat=renderableTextureFormatToIndex[null!=e?e:""]},_0x2541a9.prototype.setMRTAttachments=function(e){this.mrtAttachments=e;for(var t=0,i=0;i10)throw"Can't handle more than 10 attachments for a MRT in cache render pipeline!";this.mrtTextureArray=e,this.mrtTextureCount=t,this._mrtEnabledMask=65535;for(var r=[0,0],o=0,a=0,s=0,l=0;l=32&&(a=0,o++)}this._mrtFormats.length=s,(this._mrtAttachments1!==r[0]||this._mrtAttachments2!==r[1])&&(this._mrtAttachments1=r[0],this._mrtAttachments2=r[1],this._states[_0x46da76.MRTAttachments1]=r[0],this._states[_0x46da76.MRTAttachments2]=r[1],this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.MRTAttachments1))},_0x2541a9.prototype.setAlphaBlendEnabled=function(e){this._alphaBlendEnabled=e},_0x2541a9.prototype.setAlphaBlendFactors=function(e,t){this._alphaBlendFuncParams=e,this._alphaBlendEqParams=t},_0x2541a9.prototype.setWriteMask=function(e){this._writeMask=e},_0x2541a9.prototype.setDepthStencilFormat=function(e){this._webgpuDepthStencilFormat=e,this._depthStencilFormat=void 0===e?0:renderableTextureFormatToIndex[e]},_0x2541a9.prototype.setDepthTestEnabled=function(e){this._depthTestEnabled=e},_0x2541a9.prototype.setDepthWriteEnabled=function(e){this._depthWriteEnabled=e},_0x2541a9.prototype.setDepthCompare=function(e){this._depthCompare=(null!=e?e:_0x354cf8.ALWAYS)-512},_0x2541a9.prototype.setStencilEnabled=function(e){this._stencilEnabled=e},_0x2541a9.prototype.setStencilCompare=function(e,t){e===_0x354cf8.FRONT?this._stencilFrontCompare=(null!=t?t:_0x354cf8.ALWAYS)-512:this._stencilBackCompare=(null!=t?t:_0x354cf8.ALWAYS)-512},_0x2541a9.prototype.setStencilDepthFailOp=function(e,t){e===_0x354cf8.FRONT?this._stencilFrontDepthFailOp=null===t?1:_0x4bda0e[t]:this._stencilBackDepthFailOp=null===t?1:_0x4bda0e[t]},_0x2541a9.prototype.setStencilPassOp=function(e,t){e===_0x354cf8.FRONT?this._stencilFrontPassOp=null===t?2:_0x4bda0e[t]:this._stencilBackPassOp=null===t?2:_0x4bda0e[t]},_0x2541a9.prototype.setStencilFailOp=function(e,t){e===_0x354cf8.FRONT?this._stencilFrontFailOp=null===t?1:_0x4bda0e[t]:this._stencilBackFailOp=null===t?1:_0x4bda0e[t]},_0x2541a9.prototype.setStencilReadMask=function(e){this._stencilReadMask!==e&&(this._stencilReadMask=e,this._states[_0x46da76.StencilReadMask]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.StencilReadMask))},_0x2541a9.prototype.setStencilWriteMask=function(e){this._stencilWriteMask!==e&&(this._stencilWriteMask=e,this._states[_0x46da76.StencilWriteMask]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.StencilWriteMask))},_0x2541a9.prototype.resetStencilState=function(){this.setStencilState(_0x354cf8.FRONT,!1,_0x354cf8.ALWAYS,_0x354cf8.KEEP,_0x354cf8.REPLACE,_0x354cf8.KEEP,255,255),this.setStencilState(_0x354cf8.BACK,!1,_0x354cf8.ALWAYS,_0x354cf8.KEEP,_0x354cf8.REPLACE,_0x354cf8.KEEP,255,255)},_0x2541a9.prototype.setStencilState=function(e,t,i,n,r,o,a,s){this._stencilEnabled=t,e===_0x354cf8.FRONT?(this._stencilFrontCompare=(null!=i?i:_0x354cf8.ALWAYS)-512,this._stencilFrontDepthFailOp=null===n?1:_0x4bda0e[n],this._stencilFrontPassOp=null===r?2:_0x4bda0e[r],this._stencilFrontFailOp=null===o?1:_0x4bda0e[o]):(this._stencilBackCompare=(null!=i?i:_0x354cf8.ALWAYS)-512,this._stencilBackDepthFailOp=null===n?1:_0x4bda0e[n],this._stencilBackPassOp=null===r?2:_0x4bda0e[r],this._stencilBackFailOp=null===o?1:_0x4bda0e[o]),this.setStencilReadMask(a),this.setStencilWriteMask(s)},_0x2541a9.prototype.setBuffers=function(e,t,i){this._vertexBuffers=e,this._overrideVertexBuffers=i,this._indexBuffer=t},_0x2541a9._GetTopology=function(e){switch(e){case _0x354cf8.MATERIAL_TriangleFillMode:return _0x572d87.PrimitiveTopology.TriangleList;case _0x354cf8.MATERIAL_PointFillMode:return _0x572d87.PrimitiveTopology.PointList;case _0x354cf8.MATERIAL_WireFrameFillMode:return _0x572d87.PrimitiveTopology.LineList;case _0x354cf8.MATERIAL_PointListDrawMode:return _0x572d87.PrimitiveTopology.PointList;case _0x354cf8.MATERIAL_LineListDrawMode:return _0x572d87.PrimitiveTopology.LineList;case _0x354cf8.MATERIAL_LineLoopDrawMode:throw"LineLoop is an unsupported fillmode in WebGPU";case _0x354cf8.MATERIAL_LineStripDrawMode:return _0x572d87.PrimitiveTopology.LineStrip;case _0x354cf8.MATERIAL_TriangleStripDrawMode:return _0x572d87.PrimitiveTopology.TriangleStrip;case _0x354cf8.MATERIAL_TriangleFanDrawMode:throw"TriangleFan is an unsupported fillmode in WebGPU";default:return _0x572d87.PrimitiveTopology.TriangleList}},_0x2541a9._GetAphaBlendOperation=function(e){switch(e){case _0x354cf8.GL_ALPHA_EQUATION_ADD:return _0x572d87.BlendOperation.Add;case _0x354cf8.GL_ALPHA_EQUATION_SUBTRACT:return _0x572d87.BlendOperation.Subtract;case _0x354cf8.GL_ALPHA_EQUATION_REVERSE_SUBTRACT:return _0x572d87.BlendOperation.ReverseSubtract;case _0x354cf8.GL_ALPHA_EQUATION_MIN:return _0x572d87.BlendOperation.Min;case _0x354cf8.GL_ALPHA_EQUATION_MAX:return _0x572d87.BlendOperation.Max;default:return _0x572d87.BlendOperation.Add}},_0x2541a9._GetAphaBlendFactor=function(e){switch(e){case 0:return _0x572d87.BlendFactor.Zero;case 1:return _0x572d87.BlendFactor.One;case _0x354cf8.GL_ALPHA_FUNCTION_SRC:return _0x572d87.BlendFactor.Src;case _0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR:return _0x572d87.BlendFactor.OneMinusSrc;case _0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA:return _0x572d87.BlendFactor.SrcAlpha;case _0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA:return _0x572d87.BlendFactor.OneMinusSrcAlpha;case _0x354cf8.GL_ALPHA_FUNCTION_DST_ALPHA:return _0x572d87.BlendFactor.DstAlpha;case _0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA:return _0x572d87.BlendFactor.OneMinusDstAlpha;case _0x354cf8.GL_ALPHA_FUNCTION_DST_COLOR:return _0x572d87.BlendFactor.Dst;case _0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR:return _0x572d87.BlendFactor.OneMinusDst;case _0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED:return _0x572d87.BlendFactor.SrcAlphaSaturated;case _0x354cf8.GL_ALPHA_FUNCTION_CONSTANT_COLOR:return _0x572d87.BlendFactor.Constant;case _0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR:return _0x572d87.BlendFactor.OneMinusConstant;case _0x354cf8.GL_ALPHA_FUNCTION_CONSTANT_ALPHA:return _0x572d87.BlendFactor.Constant;case _0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA:return _0x572d87.BlendFactor.OneMinusConstant;default:return _0x572d87.BlendFactor.One}},_0x2541a9._GetCompareFunction=function(e){switch(e){case 0:return _0x572d87.CompareFunction.Never;case 1:return _0x572d87.CompareFunction.Less;case 2:return _0x572d87.CompareFunction.Equal;case 3:return _0x572d87.CompareFunction.LessEqual;case 4:return _0x572d87.CompareFunction.Greater;case 5:return _0x572d87.CompareFunction.NotEqual;case 6:return _0x572d87.CompareFunction.GreaterEqual;case 7:return _0x572d87.CompareFunction.Always}return _0x572d87.CompareFunction.Never},_0x2541a9._GetStencilOpFunction=function(e){switch(e){case 0:return _0x572d87.StencilOperation.Zero;case 1:return _0x572d87.StencilOperation.Keep;case 2:return _0x572d87.StencilOperation.Replace;case 3:return _0x572d87.StencilOperation.IncrementClamp;case 4:return _0x572d87.StencilOperation.DecrementClamp;case 5:return _0x572d87.StencilOperation.Invert;case 6:return _0x572d87.StencilOperation.IncrementWrap;case 7:return _0x572d87.StencilOperation.DecrementWrap}return _0x572d87.StencilOperation.Keep},_0x2541a9._GetVertexInputDescriptorFormat=function(e){var t=e.type,i=e.normalized,n=e.getSize();switch(t){case VertexBuffer.BYTE:switch(n){case 1:case 2:return i?_0x572d87.VertexFormat.Snorm8x2:_0x572d87.VertexFormat.Sint8x2;case 3:case 4:return i?_0x572d87.VertexFormat.Snorm8x4:_0x572d87.VertexFormat.Sint8x4}break;case VertexBuffer.UNSIGNED_BYTE:switch(n){case 1:case 2:return i?_0x572d87.VertexFormat.Unorm8x2:_0x572d87.VertexFormat.Uint8x2;case 3:case 4:return i?_0x572d87.VertexFormat.Unorm8x4:_0x572d87.VertexFormat.Uint8x4}break;case VertexBuffer.SHORT:switch(n){case 1:case 2:return i?_0x572d87.VertexFormat.Snorm16x2:_0x572d87.VertexFormat.Sint16x2;case 3:case 4:return i?_0x572d87.VertexFormat.Snorm16x4:_0x572d87.VertexFormat.Sint16x4}break;case VertexBuffer.UNSIGNED_SHORT:switch(n){case 1:case 2:return i?_0x572d87.VertexFormat.Unorm16x2:_0x572d87.VertexFormat.Uint16x2;case 3:case 4:return i?_0x572d87.VertexFormat.Unorm16x4:_0x572d87.VertexFormat.Uint16x4}break;case VertexBuffer.INT:switch(n){case 1:return _0x572d87.VertexFormat.Sint32;case 2:return _0x572d87.VertexFormat.Sint32x2;case 3:return _0x572d87.VertexFormat.Sint32x3;case 4:return _0x572d87.VertexFormat.Sint32x4}break;case VertexBuffer.UNSIGNED_INT:switch(n){case 1:return _0x572d87.VertexFormat.Uint32;case 2:return _0x572d87.VertexFormat.Uint32x2;case 3:return _0x572d87.VertexFormat.Uint32x3;case 4:return _0x572d87.VertexFormat.Uint32x4}break;case VertexBuffer.FLOAT:switch(n){case 1:return _0x572d87.VertexFormat.Float32;case 2:return _0x572d87.VertexFormat.Float32x2;case 3:return _0x572d87.VertexFormat.Float32x3;case 4:return _0x572d87.VertexFormat.Float32x4}}throw new Error("Invalid Format '".concat(e.getKind(),"' - type=").concat(t,", normalized=").concat(i,", size=").concat(n))},_0x2541a9.prototype._getAphaBlendState=function(){return this._alphaBlendEnabled?{srcFactor:_0x2541a9._GetAphaBlendFactor(this._alphaBlendFuncParams[2]),dstFactor:_0x2541a9._GetAphaBlendFactor(this._alphaBlendFuncParams[3]),operation:_0x2541a9._GetAphaBlendOperation(this._alphaBlendEqParams[1])}:null},_0x2541a9.prototype._getColorBlendState=function(){return this._alphaBlendEnabled?{srcFactor:_0x2541a9._GetAphaBlendFactor(this._alphaBlendFuncParams[0]),dstFactor:_0x2541a9._GetAphaBlendFactor(this._alphaBlendFuncParams[1]),operation:_0x2541a9._GetAphaBlendOperation(this._alphaBlendEqParams[0])}:null},_0x2541a9.prototype._setShaderStage=function(e){this._shaderId!==e&&(this._shaderId=e,this._states[_0x46da76.ShaderStage]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.ShaderStage))},_0x2541a9.prototype._setRasterizationState=function(e,t){var i=this._frontFace-1+((this._cullEnabled?this._cullFace:0)<<1)+((this._clampDepth?1:0)<<3)+((this._alphaToCoverageEnabled?1:0)<<4)+(e<<5)+(t<<8);this._rasterizationState!==i&&(this._rasterizationState=i,this._states[_0x46da76.RasterizationState]=this._rasterizationState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.RasterizationState))},_0x2541a9.prototype._setColorStates=function(){var e=((this._writeMask?1:0)<<22)+(this._colorFormat<<23)+((this._depthWriteEnabled?1:0)<<29);this._alphaBlendEnabled&&(e+=((null===this._alphaBlendFuncParams[0]?2:_0x2de812[this._alphaBlendFuncParams[0]])<<0)+((null===this._alphaBlendFuncParams[1]?2:_0x2de812[this._alphaBlendFuncParams[1]])<<4)+((null===this._alphaBlendFuncParams[2]?2:_0x2de812[this._alphaBlendFuncParams[2]])<<8)+((null===this._alphaBlendFuncParams[3]?2:_0x2de812[this._alphaBlendFuncParams[3]])<<12)+((null===this._alphaBlendEqParams[0]?1:this._alphaBlendEqParams[0]-32773)<<16)+((null===this._alphaBlendEqParams[1]?1:this._alphaBlendEqParams[1]-32773)<<19)),e!==this._colorStates&&(this._colorStates=e,this._states[_0x46da76.ColorStates]=this._colorStates,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.ColorStates))},_0x2541a9.prototype._setDepthStencilState=function(){var e=this._stencilEnabled?this._stencilFrontCompare+(this._stencilFrontDepthFailOp<<3)+(this._stencilFrontPassOp<<6)+(this._stencilFrontFailOp<<9)+(this._stencilBackCompare<<12)+(this._stencilBackDepthFailOp<<15)+(this._stencilBackPassOp<<18)+(this._stencilBackFailOp<<21):2449408,t=this._depthStencilFormat+((this._depthTestEnabled?this._depthCompare:7)<<6)+(e<<10);this._depthStencilState!==t&&(this._depthStencilState=t,this._states[_0x46da76.DepthStencilState]=this._depthStencilState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.DepthStencilState))},_0x2541a9.prototype._setVertexState=function(e){for(var t,i,n,r=this._statesLength,o=_0x46da76.VertexState,a=e._pipelineContext,s=a.shaderProcessingContext.attributeNamesFromEffect,l=a.shaderProcessingContext.attributeLocationsFromEffect,u=0,c=0;c0)for(var u=0;u=this._video.HAVE_CURRENT_DATA},_0x5e1b10.prototype.dispose=function(){};var _0xca604e=(_0x7e7e64=!0,function(e,t){var i=_0x7e7e64?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x7e7e64=!1,i}),_0x440a0f=_0xca604e(void 0,(function(){return _0x440a0f.toString().search("(((.+)+)+)+$").toString().constructor(_0x440a0f).search("(((.+)+)+)+$")})),_0x7e7e64;function _0x25966f(){this.uniqueId=_0x25966f._Counter++,this.updateId=0,this.reset()}_0x440a0f(),Object.defineProperty(_0x25966f.prototype,"forceBindGroupCreation",{get:function(){return this._numExternalTextures>0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x25966f.prototype,"hasFloatTextures",{get:function(){return this._numFloatTextures>0},enumerable:!1,configurable:!0}),_0x25966f.prototype.reset=function(){this.samplers={},this.textures={},this.isDirty=!0,this._numFloatTextures=0,this._numExternalTextures=0},_0x25966f.prototype.setSampler=function(e,t){var i=this.samplers[e],n=-1;i?n=i.hashCode:this.samplers[e]=i={sampler:t,hashCode:0},i.sampler=t,i.hashCode=t?_0x408e52.GetSamplerHashCode(t):0;var r=n!==i.hashCode;r&&this.updateId++,this.isDirty||(this.isDirty=r)},_0x25966f.prototype.setTexture=function(e,t){var i,n,r,o=this.textures[e],a=-1;o?a=null!==(n=null===(i=o.texture)||void 0===i?void 0:i.uniqueId)&&void 0!==n?n:-1:this.textures[e]=o={texture:t,isFloatTexture:!1,isExternalTexture:!1},o.isExternalTexture&&this._numExternalTextures--,o.isFloatTexture&&this._numFloatTextures--,t?(o.isFloatTexture=t.type===_0x354cf8.TEXTURETYPE_FLOAT,o.isExternalTexture=_0x5e1b10.IsExternalTexture(t),o.isFloatTexture&&this._numFloatTextures++,o.isExternalTexture&&this._numExternalTextures++):(o.isFloatTexture=!1,o.isExternalTexture=!1),o.texture=t;var s=a!==(null!==(r=null==t?void 0:t.uniqueId)&&void 0!==r?r:-1);s&&this.updateId++,this.isDirty||(this.isDirty=s)},_0x25966f._Counter=0;var _0x5578ac=(_0x1e457a=!0,function(e,t){var i=_0x1e457a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e457a=!1,i}),_0x189010=_0x5578ac(void 0,(function(){return _0x189010.toString().search("(((.+)+)+)+$").toString().constructor(_0x189010).search("(((.+)+)+)+$")})),_0x1e457a;function _0x1a5e01(e){this._bufferManager=e,this.uniqueId=_0x1a5e01._Counter++,this._useInstancing=!1,this._currentInstanceCount=0,this.reset()}_0x189010(),_0x1a5e01.prototype.isDirty=function(e){return this._isDirty||this._materialContextUpdateId!==e},_0x1a5e01.prototype.resetIsDirty=function(e){this._isDirty=!1,this._materialContextUpdateId=e},Object.defineProperty(_0x1a5e01.prototype,"useInstancing",{get:function(){return this._useInstancing},set:function(e){this._useInstancing!==e&&(e?(this.indirectDrawBuffer=this._bufferManager.createRawBuffer(40,_0x572d87.BufferUsage.CopyDst|_0x572d87.BufferUsage.Indirect),this._indirectDrawData=new Uint32Array(5),this._indirectDrawData[3]=0,this._indirectDrawData[4]=0):(this.indirectDrawBuffer&&this._bufferManager.releaseBuffer(this.indirectDrawBuffer),this.indirectDrawBuffer=void 0,this._indirectDrawData=void 0),this._useInstancing=e,this._currentInstanceCount=-1)},enumerable:!1,configurable:!0}),_0x1a5e01.prototype.reset=function(){this.buffers={},this._isDirty=!0,this._materialContextUpdateId=0,this.fastBundle=void 0,this.bindGroups=void 0},_0x1a5e01.prototype.setBuffer=function(e,t){var i;this._isDirty||(this._isDirty=(null==t?void 0:t.uniqueId)!==(null===(i=this.buffers[e])||void 0===i?void 0:i.uniqueId)),this.buffers[e]=t},_0x1a5e01.prototype.setIndirectData=function(e,t,i){t!==this._currentInstanceCount&&this.indirectDrawBuffer&&this._indirectDrawData&&(this._currentInstanceCount=t,this._indirectDrawData[0]=e,this._indirectDrawData[1]=t,this._indirectDrawData[2]=i,this._bufferManager.setRawData(this.indirectDrawBuffer,0,this._indirectDrawData,0,20))},_0x1a5e01.prototype.dispose=function(){this.indirectDrawBuffer&&(this._bufferManager.releaseBuffer(this.indirectDrawBuffer),this.indirectDrawBuffer=void 0,this._indirectDrawData=void 0),this.fastBundle=void 0,this.bindGroups=void 0,this.buffers=void 0},_0x1a5e01._Counter=0;var _0x5b7607=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));return i(),function(){this.values={}}}();function _0x4f09ec(e,t,i){this.disabled=!1,this._device=e,this._cacheSampler=t,this._engine=i}Object.defineProperty(_0x4f09ec,"Statistics",{get:function(){return{totalCreated:_0x4f09ec.NumBindGroupsCreatedTotal,lastFrameCreated:_0x4f09ec.NumBindGroupsCreatedLastFrame,lookupLastFrame:_0x4f09ec.NumBindGroupsLookupLastFrame,noLookupLastFrame:_0x4f09ec.NumBindGroupsNoLookupLastFrame}},enumerable:!1,configurable:!0}),_0x4f09ec.prototype.endFrame=function(){_0x4f09ec.NumBindGroupsCreatedLastFrame=_0x4f09ec._NumBindGroupsCreatedCurrentFrame,_0x4f09ec.NumBindGroupsLookupLastFrame=_0x4f09ec._NumBindGroupsLookupCurrentFrame,_0x4f09ec.NumBindGroupsNoLookupLastFrame=_0x4f09ec._NumBindGroupsNoLookupCurrentFrame,_0x4f09ec._NumBindGroupsCreatedCurrentFrame=0,_0x4f09ec._NumBindGroupsLookupCurrentFrame=0,_0x4f09ec._NumBindGroupsNoLookupCurrentFrame=0},_0x4f09ec.prototype.getBindGroups=function(e,t,i,n){var r,o,a,s=void 0;if(!n&&!t.isDirty(i.updateId)&&!i.isDirty)return _0x4f09ec._NumBindGroupsNoLookupCurrentFrame++,t.bindGroups;if(t.resetIsDirty(i.updateId),i.isDirty=!1,s)return t.bindGroups=s,_0x4f09ec._NumBindGroupsLookupCurrentFrame++,s;s=[],t.bindGroups=s,_0x4f09ec.NumBindGroupsCreatedTotal++,_0x4f09ec._NumBindGroupsCreatedCurrentFrame++;for(var l=e.bindGroupLayouts,u=0;u":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}h[d].resource=this._cacheSampler.getSampler(g,!1,f.hashCode)}else _0x41154e.Error('Sampler "'.concat(m,'" could not be bound. entry=').concat(JSON.stringify(p),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"":t}))),50);else if(p.texture||p.storageTexture)if(f=i.textures[m]){if(this._engine.dbgSanityChecks&&null===f.texture){_0x41154e.Error("Trying to bind a null texture! entry=".concat(JSON.stringify(p),", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}var x=f.texture._hardwareTexture;if(this._engine.dbgSanityChecks&&(!x||p.texture&&!x.view||p.storageTexture&&!x.viewForWriting)){_0x41154e.Error("Trying to bind a null gpu texture or view! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"":t})),", isReady=").concat(null===(o=f.texture)||void 0===o?void 0:o.isReady,", materialContext.uniqueId=").concat(i.uniqueId),50);continue}h[d].resource=p.storageTexture?x.viewForWriting:p.texture.multisampled?x.msaaView:x.view}else _0x41154e.Error('Texture "'.concat(m,'" could not be bound. entry=').concat(JSON.stringify(p),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"":t}))),50);else if(p.externalTexture)if(f=i.textures[m]){if(this._engine.dbgSanityChecks&&null===f.texture){_0x41154e.Error("Trying to bind a null external texture! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}var v=f.texture.underlyingResource;if(this._engine.dbgSanityChecks&&!v){_0x41154e.Error("Trying to bind a null gpu external texture! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"":t})),", isReady=").concat(null===(a=f.texture)||void 0===a?void 0:a.isReady,", materialContext.uniqueId=").concat(i.uniqueId),50);continue}h[d].resource=this._device.importExternalTexture({source:v})}else _0x41154e.Error('Texture "'.concat(m,'" could not be bound. entry=').concat(JSON.stringify(p),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"":t}))),50);else if(p.buffer){var y=t.buffers[m];if(y){var $=y.underlyingResource;h[d].resource.buffer=$,h[d].resource.size=y.capacity}else _0x41154e.Error("Can't find buffer \"".concat(m,'". entry=').concat(JSON.stringify(p),", buffers=").concat(JSON.stringify(t.buffers),", drawContext.uniqueId=").concat(t.uniqueId),50)}}var b=l[u];s[u]=this._device.createBindGroup({layout:b,entries:h})}return n&&(n.bindGroups=s),s},_0x4f09ec.NumBindGroupsCreatedTotal=0,_0x4f09ec.NumBindGroupsCreatedLastFrame=0,_0x4f09ec.NumBindGroupsLookupLastFrame=0,_0x4f09ec.NumBindGroupsNoLookupLastFrame=0,_0x4f09ec._Cache=new _0x5b7607,_0x4f09ec._NumBindGroupsCreatedCurrentFrame=0,_0x4f09ec._NumBindGroupsLookupCurrentFrame=0,_0x4f09ec._NumBindGroupsNoLookupCurrentFrame=0;var _0x24e979=(_0x4a8039=!0,function(e,t){var i=_0x4a8039?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a8039=!1,i}),_0x59b731=_0x24e979(void 0,(function(){return _0x59b731.toString().search("(((.+)+)+)+$").toString().constructor(_0x59b731).search("(((.+)+)+)+$")})),_0x4a8039;_0x59b731();var _0x1fe924="clearQuadVertexShader",_0x4d1b56="uniform float depthValue;\nconst vec2 pos[4]={\nvec2(-1.0,1.0),\n vec2(1.0,1.0),\nvec2(-1.0,-1.0),\n vec2(1.0,-1.0)\n};\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n #define CUSTOM_VERTEX_MAIN_BEGIN\n gl_Position=vec4(pos[gl_VertexID],depthValue,1.0);\n #define CUSTOM_VERTEX_MAIN_END\n}\n";_0x54737b.ShadersStore[_0x1fe924]=_0x4d1b56;var _0x321d41=(_0x5dd9bd=!0,function(e,t){var i=_0x5dd9bd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5dd9bd=!1,i}),_0x5e0f39=_0x321d41(void 0,(function(){return _0x5e0f39.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e0f39).search("(((.+)+)+)+$")})),_0x5dd9bd;_0x5e0f39();var _0xfdec53="clearQuadPixelShader",_0x4b1f9d="uniform vec4 color;\nvoid main() {\n\tgl_FragColor=color;\n}\n";_0x54737b.ShadersStore[_0xfdec53]=_0x4b1f9d;var _0x2c3453=(_0xc26403=!0,function(e,t){var i=_0xc26403?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc26403=!1,i}),_0x3d7ea9=_0x2c3453(void 0,(function(){return _0x3d7ea9.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d7ea9).search("(((.+)+)+)+$")})),_0xc26403;function _0x56b5da(e,t,i){this._bindGroups={},this._bundleCache={},this._keyTemp=[],this._device=e,this._engine=t,this._cacheRenderPipeline=new _0x13d308(this._device,i,!t._caps.textureFloatLinearFiltering),this._cacheRenderPipeline.setDepthTestEnabled(!1),this._cacheRenderPipeline.setStencilReadMask(255),this._effect=t.createEffect("clearQuad",[],["color","depthValue"])}_0x3d7ea9(),_0x56b5da.prototype.setDepthStencilFormat=function(e){this._depthTextureFormat=e,this._cacheRenderPipeline.setDepthStencilFormat(e)},_0x56b5da.prototype.setColorFormat=function(e){this._cacheRenderPipeline.setColorFormat(e)},_0x56b5da.prototype.setMRTAttachments=function(e,t,i){this._cacheRenderPipeline.setMRT(t,i),this._cacheRenderPipeline.setMRTAttachments(e)},_0x56b5da.prototype.clear=function(e,t,i,n,r){var o,a;void 0===r&&(r=1);var s,l,u=null,c=!!this._engine._currentRenderTarget;if(e)s=e;else{var h=0;this._keyTemp.length=0;for(var d=0;d1?Math.pow(2,36):0)+f*Math.pow(2,37),l=this._keyTemp.join("_"),u=this._bundleCache[l])return u;s=this._device.createRenderBundleEncoder({colorFormats:this._cacheRenderPipeline.colorFormats,depthStencilFormat:this._depthTextureFormat,sampleCount:r})}this._cacheRenderPipeline.setDepthWriteEnabled(!!i),this._cacheRenderPipeline.setStencilEnabled(!!n&&!!this._depthTextureFormat&&WebGPUTextureHelper.HasStencilAspect(this._depthTextureFormat)),this._cacheRenderPipeline.setStencilWriteMask(n?255:0),this._cacheRenderPipeline.setStencilCompare(_0x354cf8.FRONT,n?_0x354cf8.ALWAYS:_0x354cf8.NEVER),this._cacheRenderPipeline.setStencilCompare(_0x354cf8.BACK,n?_0x354cf8.ALWAYS:_0x354cf8.NEVER),this._cacheRenderPipeline.setStencilPassOp(_0x354cf8.FRONT,n?_0x354cf8.REPLACE:_0x354cf8.KEEP),this._cacheRenderPipeline.setStencilPassOp(_0x354cf8.BACK,n?_0x354cf8.REPLACE:_0x354cf8.KEEP),this._cacheRenderPipeline.setWriteMask(t?15:0);var p=this._cacheRenderPipeline.getRenderPipeline(_0x354cf8.MATERIAL_TriangleStripDrawMode,this._effect,r),_=this._effect._pipelineContext;t&&this._effect.setDirectColor4("color",t),this._effect.setFloat("depthValue",this._engine.useReverseDepthBuffer?this._engine._clearReverseDepthValue:this._engine._clearDepthValue),_.uniformBuffer.update();var m=c?this._engine._ubInvertY:this._engine._ubDontInvertY,g=_.uniformBuffer.getBuffer(),x=g.uniqueId+"-"+m.uniqueId,v=this._bindGroups[x];if(!v){var y=_.bindGroupLayouts;(v=this._bindGroups[x]=[]).push(this._device.createBindGroup({layout:y[0],entries:[]})),!_0x41080c._SimplifiedKnownBindings&&v.push(this._device.createBindGroup({layout:y[1],entries:[]})),v.push(this._device.createBindGroup({layout:y[_0x41080c._SimplifiedKnownBindings?1:2],entries:[{binding:0,resource:{buffer:m.underlyingResource,size:m.capacity}},{binding:1,resource:{buffer:g.underlyingResource,size:g.capacity}}]}))}s.setPipeline(p);for(d=0;d=0&&(t._gpuFrameTimeCounter.fetchNewFrame(),t._gpuFrameTimeCounter.addCount(e,!0)),t._measureDurationState=0})))};const _0x17b2df=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1106f4=_0x17b2df(void 0,(function(){return _0x1106f4.toString().search("(((.+)+)+)+$").toString().constructor(_0x1106f4).search("(((.+)+)+)+$")}));function _0x4257dd(e,t,i,n,r){void 0===r&&(r=!0),this._dstBuffers=[],this._device=i,this._bufferManager=n,this._count=e,this._canUseMultipleBuffers=r,this._querySet=i.createQuerySet({type:t,count:e}),this._queryBuffer=n.createRawBuffer(8*e,_0x572d87.BufferUsage.QueryResolve|_0x572d87.BufferUsage.CopySrc),!r&&this._dstBuffers.push(this._bufferManager.createRawBuffer(8*this._count,_0x572d87.BufferUsage.MapRead|_0x572d87.BufferUsage.CopyDst))}_0x1106f4(),Object.defineProperty(_0x4257dd.prototype,"querySet",{get:function(){return this._querySet},enumerable:!1,configurable:!0}),_0x4257dd.prototype._getBuffer=function(e,t){if(!this._canUseMultipleBuffers&&0===this._dstBuffers.length)return null;var i,n=this._device.createCommandEncoder();return 0===this._dstBuffers.length?i=this._bufferManager.createRawBuffer(8*this._count,_0x572d87.BufferUsage.MapRead|_0x572d87.BufferUsage.CopyDst):(i=this._dstBuffers[this._dstBuffers.length-1],this._dstBuffers.length--),n.resolveQuerySet(this._querySet,e,t,this._queryBuffer,0),n.copyBufferToBuffer(this._queryBuffer,0,i,0,8*t),this._device.queue.submit([n.finish()]),i},_0x4257dd.prototype.readValues=function(e,t,i){return void 0===e&&(e=0),void 0===t&&(t=1),new Promise(((n,r)=>{var o;return null===(o=this._getBuffer(e,t))?r(null):o.mapAsync(_0x572d87.MapMode.Read).then((()=>{const e=new BigUint64Array(o.getMappedRange()).slice();o.unmap(),this._dstBuffers[this._dstBuffers.length]=o,n({data:e,frameId:i})}))}))},_0x4257dd.prototype.readValue=function(e){return void 0===e&&(e=0),new Promise(((t,i)=>{const n=this._getBuffer(e,1);return null===n?t(null):n.mapAsync(_0x572d87.MapMode.Read).then((()=>{const e=new BigUint64Array(n.getMappedRange()),i=Number(e[0]);return n.unmap(),this._dstBuffers[this._dstBuffers.length]=n,t(i)}))}))},_0x4257dd.prototype.readTwoValuesAndSubtract=async function(e){return void 0===e&&(e=0),new Promise(((t,i)=>{const n=this._getBuffer(e,2);return null===n?t(null):n.mapAsync(_0x572d87.MapMode.Read).then((()=>{const e=new BigUint64Array(n.getMappedRange()),i=Number(e[1]-e[0]);return n.unmap(),this._dstBuffers[this._dstBuffers.length]=n,t(i)}))}))},_0x4257dd.prototype.dispose=function(){this._querySet.destroy(),this._bufferManager.releaseBuffer(this._queryBuffer);for(var e=0;e{e._lastBuffer=null})))},_0x2acf8c.prototype._allocateNewIndices=function(e){e=null!=e?e:this._countIncrement,this._delayQuerySetDispose();for(var t=0;t=0&&f.push(_.substring(m+1))}"void"!==o&&f.push("return"),this._functionDescr.push({name:a,type:o,parameters:f,body:h,callIndex:0}),e=c+1;var g=t>0?this._sourceCode.substring(0,t):"",x=c+1=0},_0x2387ba.prototype._replaceFunctionCallsByCode=function(){for(var e=!1,t=0,i=this._functionDescr;t0?this._sourceCode.substring(0,u):"",y=h+1=0||void 0,s3tc:this._deviceEnabledExtensions.indexOf(_0x572d87.FeatureName.TextureCompressionBC)>=0||void 0,pvrtc:null,etc1:null,etc2:this._deviceEnabledExtensions.indexOf(_0x572d87.FeatureName.TextureCompressionETC2)>=0||void 0,bptc:this._deviceEnabledExtensions.indexOf(_0x572d87.FeatureName.TextureCompressionBC)>=0||void 0,maxAnisotropy:4,uintIndices:!0,fragmentDepthSupported:!0,highPrecisionShaderSupported:!0,colorBufferFloat:!0,textureFloat:!0,textureFloatLinearFiltering:!1,textureFloatRender:!0,textureHalfFloat:!0,textureHalfFloatLinearFiltering:!0,textureHalfFloatRender:!0,textureLOD:!0,drawBuffersExtension:!0,depthTextureExtension:!0,vertexArrayObject:!1,instancedArrays:!0,timerQuery:"undefined"!=typeof BigUint64Array&&-1!==this.enabledExtensions.indexOf(_0x572d87.FeatureName.TimestampQuery)||void 0,supportOcclusionQuery:"undefined"!=typeof BigUint64Array,canUseTimestampForTimerQuery:!0,multiview:!1,oculusMultiview:!1,parallelShaderCompile:void 0,blendMinMax:!0,maxMSAASamples:4,canUseGLInstanceID:!0,canUseGLVertexID:!0,supportComputeShaders:!0,supportSRGBBuffers:!0,supportTransformFeedbacks:!1,textureMaxLevel:!0,texture2DArrayMaxLayerCount:e.maxTextureArrayLayers,minUniformBufferOffsetAlignment:e.minUniformBufferOffsetAlignment,maxUniformBufferBindingSize:e.maxUniformBufferBindingSize},this._caps.parallelShaderCompile=null,this._features={forceBitmapOverHTMLImageElement:!0,supportRenderAndCopyToLodForFloatTextures:!0,supportDepthStencilTexture:!0,supportShadowSamplers:!0,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:!0,trackUbosInFrame:!0,checkUbosContentBeforeUpload:!0,supportCSM:!0,basisNeedsPOT:!1,support3DTextures:!0,needTypeSuffixInShaderConstants:!0,supportMSAA:!0,supportSSAO2:!0,supportExtendedTextureFormats:!0,supportSwitchCaseInShader:!0,supportSyncTextureRead:!1,needsInvertingBitmap:!1,useUBOBindingCache:!1,needShaderCodeInlining:!0,needToAlwaysBindUniformBuffers:!0,supportRenderPasses:!0,_collectUbosUpdatedInFrame:!1}},_0x58fcf.prototype._initializeContextAndSwapChain=function(){this._context=this._canvas.getContext("webgpu"),this._configureContext(),this._colorFormat=this._options.swapChainFormat,this._mainRenderPassWrapper.colorAttachmentGPUTextures=[new _0x253af9],this._mainRenderPassWrapper.colorAttachmentGPUTextures[0].format=this._colorFormat},_0x58fcf.prototype._initializeMainAttachments=function(e){var t;void 0===e&&(e=!1),this._mainTextureExtends={width:this.getRenderWidth(e),height:this.getRenderHeight(e),depthOrArrayLayers:1};var i,n=new Float32Array([this.getRenderHeight()]);if(this._bufferManager.setSubData(this._ubInvertY,4,n),this._bufferManager.setSubData(this._ubDontInvertY,4,n),this._options.antialiasing){var r={size:this._mainTextureExtends,mipLevelCount:1,sampleCount:this._mainPassSampleCount,dimension:_0x572d87.TextureDimension.E2d,format:this._options.swapChainFormat,usage:_0x572d87.TextureUsage.RenderAttachment};null===(t=this._mainTexture)||void 0===t||t.destroy(),this._mainTexture=this._device.createTexture(r),i=[{view:this._mainTexture.createView(),clearValue:new e$1U(0,0,0,1),loadOp:_0x572d87.LoadOp.Clear,storeOp:_0x572d87.StoreOp.Store}]}else i=[{view:void 0,clearValue:new e$1U(0,0,0,1),loadOp:_0x572d87.LoadOp.Clear,storeOp:_0x572d87.StoreOp.Store}];this._mainRenderPassWrapper.depthTextureFormat=this.isStencilEnable?_0x572d87.TextureFormat.Depth24PlusStencil8:_0x572d87.TextureFormat.Depth32Float,this._setDepthTextureFormat(this._mainRenderPassWrapper);var o={size:this._mainTextureExtends,mipLevelCount:1,sampleCount:this._mainPassSampleCount,dimension:_0x572d87.TextureDimension.E2d,format:this._mainRenderPassWrapper.depthTextureFormat,usage:_0x572d87.TextureUsage.RenderAttachment};this._depthTexture&&this._depthTexture.destroy(),this._depthTexture=this._device.createTexture(o);var a={view:this._depthTexture.createView(),depthClearValue:this._clearDepthValue,depthLoadOp:_0x572d87.LoadOp.Clear,depthStoreOp:_0x572d87.StoreOp.Store,stencilClearValue:this._clearStencilValue,stencilLoadOp:this.isStencilEnable?_0x572d87.LoadOp.Clear:void 0,stencilStoreOp:this.isStencilEnable?_0x572d87.StoreOp.Store:void 0};this._mainRenderPassWrapper.renderPassDescriptor={colorAttachments:i,depthStencilAttachment:a},null!==this._mainRenderPassWrapper.renderPass&&this._endMainRenderPass()},_0x58fcf.prototype._configureContext=function(){this._context.configure({device:this._device,format:this._options.swapChainFormat,usage:_0x572d87.TextureUsage.RenderAttachment|_0x572d87.TextureUsage.CopySrc,alphaMode:this.premultipliedAlpha?_0x572d87.CanvasCompositingAlphaMode.Premultiplied:_0x572d87.CanvasCompositingAlphaMode.Opaque})},_0x58fcf.prototype.setSize=function(e,t,i){return void 0===i&&(i=!1),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count{if(null!=e){var t=e[e.length-1],n=e.slice(0,t),r=e.slice(t,e.length-1);i(!0,n,r)}else console.log("shader text from indexDB is null."),i(!1,null,null)}),(e=>{i(!1,null,null)})):i(!1,null,null)},_0x58fcf.prototype._saveCompiledShaderToIndexDB=function(e,t,i){if(this._indexedDBScheduler&&this.saveCompiledShaderInIndexDB){var n=t.length+i.length,r=new Uint32Array(n+1);r.set(t,0),r.set(i,t.length),r[n]=t.length,this._indexedDBScheduler.putElementInDB(_0x58fcf.COMPILED_WGSL_TABLE_NAME,e,r)}},_0x58fcf.prototype._createPipelineStageDescriptor=function(e,t,i,n){return this._tintWASM&&n===_0x4cf79a.GLSL&&(t=this._tintWASM.convertSpirV2WGSL(t),i=this._tintWASM.convertSpirV2WGSL(i),t=t.replace(/type\s/g,"alias "),i=i.replace(/type\s/g,"alias ")),{vertexStage:{module:this._device.createShaderModule({code:t}),entryPoint:"main"},fragmentStage:{module:this._device.createShaderModule({code:i}),entryPoint:"main"}}},_0x58fcf.prototype._compileRawPipelineStageDescriptor=function(e,t,i,n){var r=n===_0x4cf79a.GLSL?this._compileRawShaderToSpirV(t,"vertex"):t,o=n===_0x4cf79a.GLSL?this._compileRawShaderToSpirV(i,"fragment"):i;return this._createPipelineStageDescriptor(e,r,o,n)},_0x58fcf.prototype._compilePipelineStageDescriptor=function(e,t,i,n,r){this.onBeforeShaderCompilationObservable.notifyObservers(this);var o="#version 450\n",a=r===_0x4cf79a.GLSL?this._compileShaderToSpirV(t,"vertex",n,o):this._getWGSLShader(t,"vertex",n),s=r===_0x4cf79a.GLSL?this._compileShaderToSpirV(i,"fragment",n,o):this._getWGSLShader(i,"fragment",n),l=this._createPipelineStageDescriptor(e,a,s,r);return this.onAfterShaderCompilationObservable.notifyObservers(this),l},_0x58fcf.prototype.createRawShaderProgram=function(){throw"Not available on WebGPU"},_0x58fcf.prototype.createShaderProgram=function(){throw"Not available on WebGPU"},_0x58fcf.prototype.inlineShaderCode=function(e){var t=new _0x2387ba(e);return t.debug=!1,t.processCode(),t.code},_0x58fcf.prototype.createPipelineContext=function(e){return new _0x5ccdc7(e,this)},_0x58fcf.prototype.createMaterialContext=function(){return new _0x25966f},_0x58fcf.prototype.createDrawContext=function(){return new _0x1a5e01(this._bufferManager)},_0x58fcf.prototype._preparePipelineContext=function(e,t,i,n,r,o,a,s,l,u,c){var h=e,d=c||h.shaderProcessingContext.shaderLanguage;this.dbgShowShaderCode&&(console.log(s),console.log(t),console.log(i)),h.sources={fragment:i,vertex:t,rawVertex:r,rawFragment:o};var f=e._name;h.stages=n?this._compileRawPipelineStageDescriptor(f,t,i,d):this._compilePipelineStageDescriptor(f,t,i,s,d)},_0x58fcf.prototype.getAttributes=function(e,t){for(var i=new Array(t.length),n=e,r=0;r0,l._cachedWrapU=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,l._cachedWrapV=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,l._useSRGBBuffer=s.useSRGBBuffer,this._internalTexturesCache.push(l),!i&&this._textureHelper.createGPUTextureForInternalTexture(l,u,c,h||1,s.creationFlags),l},_0x58fcf.prototype.createTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){var _=this;return void 0===r&&(r=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),this._createTextureBase(e,t,i,n,r,o,a,(function(e,t,i,n,r,o,a,s){var l,c=n;if(e.baseWidth=c.width,e.baseHeight=c.height,e.width=c.width,e.height=c.height,e.format=null!=u?u:-1,s(e.width,e.height,c,t,e,(function(){})),null===(l=e._hardwareTexture)||void 0===l?void 0:l.underlyingResource)!o&&!a&&_._generateMipmaps(e,_._uploadEncoder);else{var h=_._textureHelper.createGPUTextureForInternalTexture(e,c.width,c.height,void 0,f);WebGPUTextureHelper.IsImageBitmap(c)&&(_._textureHelper.updateTexture(c,e,c.width,c.height,e.depth,h.format,0,0,r,!1,0,0),!o&&!a&&_._generateMipmaps(e,_._uploadEncoder))}i&&i._removePendingData(e),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}),(function(){return!1}),s,l,u,c,h,d,p)},_0x58fcf.prototype.wrapWebGPUTexture=function(e){var t=new _0x253af9(e),i=new InternalTexture(this,InternalTextureSource.Unknown,!0);return i._hardwareTexture=t,i.isReady=!0,i},_0x58fcf.prototype.wrapWebGLTexture=function(){throw new Error("wrapWebGLTexture is not supported, use wrapWebGPUTexture instead.")},_0x58fcf.prototype.generateMipMapsForCubemap=function(e){var t;e.generateMipMaps&&(!(null===(t=e._hardwareTexture)||void 0===t?void 0:t.underlyingResource)&&this._textureHelper.createGPUTextureForInternalTexture(e),this._generateMipmaps(e,e.source===InternalTextureSource.RenderTarget||e.source===InternalTextureSource.MultiRenderTarget?this._renderTargetEncoder:void 0))},_0x58fcf.prototype.updateTextureSamplingMode=function(e,t,i){void 0===i&&(i=!1),i&&(t.generateMipMaps=!0,this._generateMipmaps(t)),t.samplingMode=e},_0x58fcf.prototype.updateTextureWrappingMode=function(e,t,i,n){void 0===i&&(i=null),void 0===n&&(n=null),null!==t&&(e._cachedWrapU=t),null!==i&&(e._cachedWrapV=i),(e.is2DArray||e.is3D)&&null!==n&&(e._cachedWrapR=n)},_0x58fcf.prototype.updateTextureDimensions=function(e,t,i,n){if(void 0===n&&(n=1),e._hardwareTexture&&(e.width!==t||e.height!==i||e.depth!==n)){var r=e._hardwareTexture.textureAdditionalUsages;e._hardwareTexture.release(),this._textureHelper.createGPUTextureForInternalTexture(e,t,i,n,r)}},_0x58fcf.prototype._setInternalTexture=function(e,t,i){if(i=null!=i?i:e,this._currentEffect){var n=this._currentEffect._pipelineContext.shaderProcessingContext.availableTextures[i];if(this._currentMaterialContext.setTexture(e,t),n&&n.autoBindSampler){var r=i+_0x39a749.AutoSamplerSuffix;this._currentMaterialContext.setSampler(r,t)}}},_0x58fcf.prototype.setTexture=function(e,t,i,n){this._setTexture(e,i,!1,!1,n,n)},_0x58fcf.prototype.setTextureArray=function(e,t,i,n){for(var r=0;r0;for(var r in e){var o=e[r],a=i[r],s=a.group,l=a.binding,u=o.type,c=o.object,h=o.indexInGroupEntries;switch(!(x=this._bindGroupEntries[s])&&(x=this._bindGroupEntries[s]=[]),u){case ComputeBindingType$1.Sampler:var d=c;void 0!==h&&n?x[h].resource=this._cacheSampler.getSampler(d):(o.indexInGroupEntries=x.length,x.push({binding:l,resource:this._cacheSampler.getSampler(d)}));break;case ComputeBindingType$1.Texture:case ComputeBindingType$1.TextureWithoutSampler:var f=(p=c)._texture._hardwareTexture;void 0!==h&&n?(u===ComputeBindingType$1.Texture&&(x[h++].resource=this._cacheSampler.getSampler(p._texture)),x[h].resource=f.view):(o.indexInGroupEntries=x.length,u===ComputeBindingType$1.Texture&&x.push({binding:l-1,resource:this._cacheSampler.getSampler(p._texture)}),x.push({binding:l,resource:f.view}));break;case ComputeBindingType$1.StorageTexture:var p;0==((f=(p=c)._texture._hardwareTexture).textureAdditionalUsages&_0x572d87.TextureUsage.StorageBinding)&&_0x41154e.Error("computeDispatch: The texture (name=".concat(p.name,", uniqueId=").concat(p.uniqueId,") is not a storage texture!"),50),void 0!==h&&n?x[h].resource=f.viewForWriting:(o.indexInGroupEntries=x.length,x.push({binding:l,resource:f.viewForWriting}));break;case ComputeBindingType$1.UniformBuffer:case ComputeBindingType$1.StorageBuffer:var _=(ComputeBindingType$1.UniformBuffer,c).getBuffer(),m=_.underlyingResource;void 0!==h&&n?(x[h].resource.buffer=m,x[h].resource.size=_.capacity):(o.indexInGroupEntries=x.length,x.push({binding:l,resource:{buffer:m,offset:0,size:_.capacity}}))}}for(var g=0;g= ofstX + width) {\n discard;\n }\n if (gl_FragCoord.y < ofstY || gl_FragCoord.y >= ofstY + height) {\n discard;\n }\n #ifdef INVERTY\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.x, ofstY + height - (gl_FragCoord.y - ofstY)), 0);\n #else\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.xy), 0);\n #endif\n #ifdef PREMULTIPLYALPHA\n color.rgb *= color.a;\n #endif\n outColor = color;\n }\n ",_0x488beb="\n const vec2 pos[4] = vec2[4](vec2(-1.0f, 1.0f), vec2(1.0f, 1.0f), vec2(-1.0f, -1.0f), vec2(1.0f, -1.0f));\n\n void main() {\n gl_Position = vec4(pos[gl_VertexIndex], 0.0, 1.0);\n }\n ",_0x12d653="\n layout(set = 0, binding = 0) uniform Uniforms {\n uniform vec4 color;\n };\n\n layout(location = 0) out vec4 outColor;\n\n void main() {\n outColor = color;\n }\n ",_0x5347dd="\n struct VertexOutput {\n @builtin(position) Position : vec4,\n @location(0) fragUV : vec2\n }\n \n @vertex\n fn main(\n @builtin(vertex_index) VertexIndex : u32\n ) -> VertexOutput {\n var pos = array, 4>(\n vec2(-1.0, 1.0),\n vec2( 1.0, 1.0),\n vec2(-1.0, -1.0),\n vec2( 1.0, -1.0)\n );\n var tex = array, 4>(\n vec2(0.0, 0.0),\n vec2(1.0, 0.0),\n vec2(0.0, 1.0),\n vec2(1.0, 1.0)\n );\n\n var output: VertexOutput;\n\n output.Position = vec4(pos[VertexIndex], 0.0, 1.0);\n output.fragUV = tex[VertexIndex];\n\n return output;\n }\n ",_0x3013d7="\n @group(0) @binding(0) var videoTexture: texture_external;\n\n @fragment\n fn main(\n @location(0) fragUV: vec2\n ) -> @location(0) vec4 {\n let uv : vec2 = vec2(i32(fragUV.x), i32(fragUV.y));\n return textureLoad(videoTexture, uv);\n }\n",_0x2d3db9="\n @group(0) @binding(0) var videoTexture: texture_external;\n\n @fragment\n fn main(\n @location(0) fragUV: vec2\n ) -> @location(0) vec4 {\n let uv : vec2 = vec2(i32(fragUV.x), i32(1 - fragUV.y));\n return textureLoad(videoTexture, uv);\n }\n ",_0x90e6c0,_0x3c651a,_0x53947e;!function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.MipMap=0]="MipMap",e[e.InvertYPremultiplyAlpha=1]="InvertYPremultiplyAlpha",e[e.Clear=2]="Clear",e[e.InvertYPremultiplyAlphaWithOfst=3]="InvertYPremultiplyAlphaWithOfst"}(_0x90e6c0||(_0x90e6c0={})),_0x53947e=_0x3c651a||(_0x3c651a={}),_0x53947e[_0x53947e.DontInvertY=0]="DontInvertY",_0x53947e[_0x53947e.InvertY=1]="InvertY";var _0x5bca02=[{vertex:_0x2b3e17,fragment:_0x4e2580},{vertex:_0x30a3b0,fragment:_0x253350},{vertex:_0x488beb,fragment:_0x12d653},{vertex:_0x326ba2,fragment:_0x2dc2c6}];const renderableTextureFormatToIndex={"":0,r8unorm:1,r8uint:2,r8sint:3,r16uint:4,r16sint:5,r16float:6,rg8unorm:7,rg8uint:8,rg8sint:9,r32uint:10,r32sint:11,r32float:12,rg16uint:13,rg16sint:14,rg16float:15,rgba8unorm:16,"rgba8unorm-srgb":17,rgba8uint:18,rgba8sint:19,bgra8unorm:20,"bgra8unorm-srgb":21,rgb10a2unorm:22,rg32uint:23,rg32sint:24,rg32float:25,rgba16uint:26,rgba16sint:27,rgba16float:28,rgba32uint:29,rgba32sint:30,rgba32float:31,stencil8:32,depth16unorm:33,depth24plus:34,"depth24plus-stencil8":35,depth32float:36,"depth24unorm-stencil8":37,"depth32float-stencil8":38};function WebGPUTextureHelper(e,t,i,n,r){this._pipelines={},this._compiledShaders=[],this._deferredReleaseTextures=[],this._videoPipelines={},this._videoCompiledShaders=[],this._userEngine=r,this._device=e,this._glslang=t,this._tintWASM=i,this._bufferManager=n,this._mipmapSampler=e.createSampler({minFilter:_0x572d87.FilterMode.Linear}),this._videoSampler=e.createSampler({minFilter:_0x572d87.FilterMode.Linear}),this._ubCopyWithOfst=this._bufferManager.createBuffer(16,_0x572d87.BufferUsage.Uniform|_0x572d87.BufferUsage.CopyDst).underlyingResource,this._getPipeline(_0x572d87.TextureFormat.RGBA8Unorm)}WebGPUTextureHelper.ComputeNumMipmapLevels=function(e,t){return _0x121f46.ILog2(Math.max(e,t))+1},WebGPUTextureHelper.prototype._getPipeline=function(e,t,i){void 0===t&&(t=_0x90e6c0.MipMap);var n=t===_0x90e6c0.MipMap?1:t===_0x90e6c0.InvertYPremultiplyAlpha?((i.invertY?1:0)<<1)+((i.premultiplyAlpha?1:0)<<2):t===_0x90e6c0.Clear?8:t===_0x90e6c0.InvertYPremultiplyAlphaWithOfst?((i.invertY?1:0)<<4)+((i.premultiplyAlpha?1:0)<<5):0;!this._pipelines[e]&&(this._pipelines[e]=[]);var r=this._pipelines[e][n];if(!r){var o="#version 450\r\n";(t===_0x90e6c0.InvertYPremultiplyAlpha||t===_0x90e6c0.InvertYPremultiplyAlphaWithOfst)&&(i.invertY&&(o+="#define INVERTY\r\n"),i.premultiplyAlpha&&(o+="#define PREMULTIPLYALPHA\r\n"));var a=this._compiledShaders[n];if(!a){var s=this._glslang.compileGLSL(o+_0x5bca02[t].vertex,"vertex"),l=this._glslang.compileGLSL(o+_0x5bca02[t].fragment,"fragment");this._tintWASM&&(s=this._tintWASM.convertSpirV2WGSL(s),l=this._tintWASM.convertSpirV2WGSL(l));var u=this._device.createShaderModule({code:s}),c=this._device.createShaderModule({code:l});a=this._compiledShaders[n]=[u,c]}var h=this._device.createRenderPipeline({layout:_0x572d87.AutoLayoutMode.Auto,vertex:{module:a[0],entryPoint:"main"},fragment:{module:a[1],entryPoint:"main",targets:[{format:e}]},primitive:{topology:_0x572d87.PrimitiveTopology.TriangleStrip,stripIndexFormat:_0x572d87.IndexFormat.Uint16}});r=this._pipelines[e][n]=[h,h.getBindGroupLayout(0)]}return r},WebGPUTextureHelper.prototype._getVideoPipeline=function(e,t){void 0===t&&(t=_0x3c651a.DontInvertY);var i=t===_0x3c651a.InvertY?1:0;!this._videoPipelines[e]&&(this._videoPipelines[e]=[]);var n=this._videoPipelines[e][i];if(!n){var r=this._videoCompiledShaders[i];if(!r){var o=this._device.createShaderModule({code:_0x5347dd}),a=this._device.createShaderModule({code:0===i?_0x3013d7:_0x2d3db9});r=this._videoCompiledShaders[i]=[o,a]}var s=this._device.createRenderPipeline({label:"CopyVideoToTexture_".concat(e,"_").concat(0===i?"DontInvertY":"InvertY"),layout:_0x572d87.AutoLayoutMode.Auto,vertex:{module:r[0],entryPoint:"main"},fragment:{module:r[1],entryPoint:"main",targets:[{format:e}]},primitive:{topology:_0x572d87.PrimitiveTopology.TriangleStrip,stripIndexFormat:_0x572d87.IndexFormat.Uint16}});n=this._videoPipelines[e][i]=[s,s.getBindGroupLayout(0)]}return n},WebGPUTextureHelper._GetTextureTypeFromFormat=function(e){switch(e){case _0x572d87.TextureFormat.R8Unorm:case _0x572d87.TextureFormat.R8Snorm:case _0x572d87.TextureFormat.R8Uint:case _0x572d87.TextureFormat.R8Sint:case _0x572d87.TextureFormat.RG8Unorm:case _0x572d87.TextureFormat.RG8Snorm:case _0x572d87.TextureFormat.RG8Uint:case _0x572d87.TextureFormat.RG8Sint:case _0x572d87.TextureFormat.RGBA8Unorm:case _0x572d87.TextureFormat.RGBA8UnormSRGB:case _0x572d87.TextureFormat.RGBA8Snorm:case _0x572d87.TextureFormat.RGBA8Uint:case _0x572d87.TextureFormat.RGBA8Sint:case _0x572d87.TextureFormat.BGRA8Unorm:case _0x572d87.TextureFormat.BGRA8UnormSRGB:case _0x572d87.TextureFormat.RGB10A2Unorm:case _0x572d87.TextureFormat.RGB9E5UFloat:case _0x572d87.TextureFormat.RG11B10UFloat:case _0x572d87.TextureFormat.Depth24UnormStencil8:case _0x572d87.TextureFormat.Depth32FloatStencil8:case _0x572d87.TextureFormat.BC7RGBAUnorm:case _0x572d87.TextureFormat.BC7RGBAUnormSRGB:case _0x572d87.TextureFormat.BC6HRGBUFloat:case _0x572d87.TextureFormat.BC6HRGBFloat:case _0x572d87.TextureFormat.BC5RGUnorm:case _0x572d87.TextureFormat.BC5RGSnorm:case _0x572d87.TextureFormat.BC3RGBAUnorm:case _0x572d87.TextureFormat.BC3RGBAUnormSRGB:case _0x572d87.TextureFormat.BC2RGBAUnorm:case _0x572d87.TextureFormat.BC2RGBAUnormSRGB:case _0x572d87.TextureFormat.BC4RUnorm:case _0x572d87.TextureFormat.BC4RSnorm:case _0x572d87.TextureFormat.BC1RGBAUnorm:case _0x572d87.TextureFormat.BC1RGBAUnormSRGB:case _0x572d87.TextureFormat.ETC2RGB8Unorm:case _0x572d87.TextureFormat.ETC2RGB8UnormSRGB:case _0x572d87.TextureFormat.ETC2RGB8A1Unorm:case _0x572d87.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x572d87.TextureFormat.ETC2RGBA8Unorm:case _0x572d87.TextureFormat.ETC2RGBA8UnormSRGB:case _0x572d87.TextureFormat.EACR11Unorm:case _0x572d87.TextureFormat.EACR11Snorm:case _0x572d87.TextureFormat.EACRG11Unorm:case _0x572d87.TextureFormat.EACRG11Snorm:case _0x572d87.TextureFormat.ASTC4x4Unorm:case _0x572d87.TextureFormat.ASTC4x4UnormSRGB:case _0x572d87.TextureFormat.ASTC5x4Unorm:case _0x572d87.TextureFormat.ASTC5x4UnormSRGB:case _0x572d87.TextureFormat.ASTC5x5Unorm:case _0x572d87.TextureFormat.ASTC5x5UnormSRGB:case _0x572d87.TextureFormat.ASTC6x5Unorm:case _0x572d87.TextureFormat.ASTC6x5UnormSRGB:case _0x572d87.TextureFormat.ASTC6x6Unorm:case _0x572d87.TextureFormat.ASTC6x6UnormSRGB:case _0x572d87.TextureFormat.ASTC8x5Unorm:case _0x572d87.TextureFormat.ASTC8x5UnormSRGB:case _0x572d87.TextureFormat.ASTC8x6Unorm:case _0x572d87.TextureFormat.ASTC8x6UnormSRGB:case _0x572d87.TextureFormat.ASTC8x8Unorm:case _0x572d87.TextureFormat.ASTC8x8UnormSRGB:case _0x572d87.TextureFormat.ASTC10x5Unorm:case _0x572d87.TextureFormat.ASTC10x5UnormSRGB:case _0x572d87.TextureFormat.ASTC10x6Unorm:case _0x572d87.TextureFormat.ASTC10x6UnormSRGB:case _0x572d87.TextureFormat.ASTC10x8Unorm:case _0x572d87.TextureFormat.ASTC10x8UnormSRGB:case _0x572d87.TextureFormat.ASTC10x10Unorm:case _0x572d87.TextureFormat.ASTC10x10UnormSRGB:case _0x572d87.TextureFormat.ASTC12x10Unorm:case _0x572d87.TextureFormat.ASTC12x10UnormSRGB:case _0x572d87.TextureFormat.ASTC12x12Unorm:case _0x572d87.TextureFormat.ASTC12x12UnormSRGB:return _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE;case _0x572d87.TextureFormat.R16Uint:case _0x572d87.TextureFormat.R16Sint:case _0x572d87.TextureFormat.RG16Uint:case _0x572d87.TextureFormat.RG16Sint:case _0x572d87.TextureFormat.RGBA16Uint:case _0x572d87.TextureFormat.RGBA16Sint:case _0x572d87.TextureFormat.Depth16Unorm:return _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT;case _0x572d87.TextureFormat.R16Float:case _0x572d87.TextureFormat.RG16Float:case _0x572d87.TextureFormat.RGBA16Float:return _0x354cf8.TEXTURETYPE_HALF_FLOAT;case _0x572d87.TextureFormat.R32Uint:case _0x572d87.TextureFormat.R32Sint:case _0x572d87.TextureFormat.RG32Uint:case _0x572d87.TextureFormat.RG32Sint:case _0x572d87.TextureFormat.RGBA32Uint:case _0x572d87.TextureFormat.RGBA32Sint:return _0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER;case _0x572d87.TextureFormat.R32Float:case _0x572d87.TextureFormat.RG32Float:case _0x572d87.TextureFormat.RGBA32Float:case _0x572d87.TextureFormat.Depth32Float:return _0x354cf8.TEXTURETYPE_FLOAT;case _0x572d87.TextureFormat.Stencil8:throw"No fixed size for Stencil8 format!";case _0x572d87.TextureFormat.Depth24Plus:throw"No fixed size for Depth24Plus format!";case _0x572d87.TextureFormat.Depth24PlusStencil8:throw"No fixed size for Depth24PlusStencil8 format!"}return _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE},WebGPUTextureHelper._GetBlockInformationFromFormat=function(e){switch(e){case _0x572d87.TextureFormat.R8Unorm:case _0x572d87.TextureFormat.R8Snorm:case _0x572d87.TextureFormat.R8Uint:case _0x572d87.TextureFormat.R8Sint:return{width:1,height:1,length:1};case _0x572d87.TextureFormat.R16Uint:case _0x572d87.TextureFormat.R16Sint:case _0x572d87.TextureFormat.R16Float:case _0x572d87.TextureFormat.RG8Unorm:case _0x572d87.TextureFormat.RG8Snorm:case _0x572d87.TextureFormat.RG8Uint:case _0x572d87.TextureFormat.RG8Sint:return{width:1,height:1,length:2};case _0x572d87.TextureFormat.R32Uint:case _0x572d87.TextureFormat.R32Sint:case _0x572d87.TextureFormat.R32Float:case _0x572d87.TextureFormat.RG16Uint:case _0x572d87.TextureFormat.RG16Sint:case _0x572d87.TextureFormat.RG16Float:case _0x572d87.TextureFormat.RGBA8Unorm:case _0x572d87.TextureFormat.RGBA8UnormSRGB:case _0x572d87.TextureFormat.RGBA8Snorm:case _0x572d87.TextureFormat.RGBA8Uint:case _0x572d87.TextureFormat.RGBA8Sint:case _0x572d87.TextureFormat.BGRA8Unorm:case _0x572d87.TextureFormat.BGRA8UnormSRGB:case _0x572d87.TextureFormat.RGB9E5UFloat:case _0x572d87.TextureFormat.RGB10A2Unorm:case _0x572d87.TextureFormat.RG11B10UFloat:return{width:1,height:1,length:4};case _0x572d87.TextureFormat.RG32Uint:case _0x572d87.TextureFormat.RG32Sint:case _0x572d87.TextureFormat.RG32Float:case _0x572d87.TextureFormat.RGBA16Uint:case _0x572d87.TextureFormat.RGBA16Sint:case _0x572d87.TextureFormat.RGBA16Float:return{width:1,height:1,length:8};case _0x572d87.TextureFormat.RGBA32Uint:case _0x572d87.TextureFormat.RGBA32Sint:case _0x572d87.TextureFormat.RGBA32Float:return{width:1,height:1,length:16};case _0x572d87.TextureFormat.Stencil8:throw"No fixed size for Stencil8 format!";case _0x572d87.TextureFormat.Depth16Unorm:return{width:1,height:1,length:2};case _0x572d87.TextureFormat.Depth24Plus:throw"No fixed size for Depth24Plus format!";case _0x572d87.TextureFormat.Depth24PlusStencil8:throw"No fixed size for Depth24PlusStencil8 format!";case _0x572d87.TextureFormat.Depth32Float:case _0x572d87.TextureFormat.Depth24UnormStencil8:return{width:1,height:1,length:4};case _0x572d87.TextureFormat.Depth32FloatStencil8:return{width:1,height:1,length:5};case _0x572d87.TextureFormat.BC7RGBAUnorm:case _0x572d87.TextureFormat.BC7RGBAUnormSRGB:case _0x572d87.TextureFormat.BC6HRGBUFloat:case _0x572d87.TextureFormat.BC6HRGBFloat:case _0x572d87.TextureFormat.BC5RGUnorm:case _0x572d87.TextureFormat.BC5RGSnorm:case _0x572d87.TextureFormat.BC3RGBAUnorm:case _0x572d87.TextureFormat.BC3RGBAUnormSRGB:case _0x572d87.TextureFormat.BC2RGBAUnorm:case _0x572d87.TextureFormat.BC2RGBAUnormSRGB:return{width:4,height:4,length:16};case _0x572d87.TextureFormat.BC4RUnorm:case _0x572d87.TextureFormat.BC4RSnorm:case _0x572d87.TextureFormat.BC1RGBAUnorm:case _0x572d87.TextureFormat.BC1RGBAUnormSRGB:case _0x572d87.TextureFormat.ETC2RGB8Unorm:case _0x572d87.TextureFormat.ETC2RGB8UnormSRGB:case _0x572d87.TextureFormat.ETC2RGB8A1Unorm:case _0x572d87.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x572d87.TextureFormat.EACR11Unorm:case _0x572d87.TextureFormat.EACR11Snorm:return{width:4,height:4,length:8};case _0x572d87.TextureFormat.ETC2RGBA8Unorm:case _0x572d87.TextureFormat.ETC2RGBA8UnormSRGB:case _0x572d87.TextureFormat.EACRG11Unorm:case _0x572d87.TextureFormat.EACRG11Snorm:case _0x572d87.TextureFormat.ASTC4x4Unorm:case _0x572d87.TextureFormat.ASTC4x4UnormSRGB:return{width:4,height:4,length:16};case _0x572d87.TextureFormat.ASTC5x4Unorm:case _0x572d87.TextureFormat.ASTC5x4UnormSRGB:return{width:5,height:4,length:16};case _0x572d87.TextureFormat.ASTC5x5Unorm:case _0x572d87.TextureFormat.ASTC5x5UnormSRGB:return{width:5,height:5,length:16};case _0x572d87.TextureFormat.ASTC6x5Unorm:case _0x572d87.TextureFormat.ASTC6x5UnormSRGB:return{width:6,height:5,length:16};case _0x572d87.TextureFormat.ASTC6x6Unorm:case _0x572d87.TextureFormat.ASTC6x6UnormSRGB:return{width:6,height:6,length:16};case _0x572d87.TextureFormat.ASTC8x5Unorm:case _0x572d87.TextureFormat.ASTC8x5UnormSRGB:return{width:8,height:5,length:16};case _0x572d87.TextureFormat.ASTC8x6Unorm:case _0x572d87.TextureFormat.ASTC8x6UnormSRGB:return{width:8,height:6,length:16};case _0x572d87.TextureFormat.ASTC8x8Unorm:case _0x572d87.TextureFormat.ASTC8x8UnormSRGB:return{width:8,height:8,length:16};case _0x572d87.TextureFormat.ASTC10x5Unorm:case _0x572d87.TextureFormat.ASTC10x5UnormSRGB:return{width:10,height:5,length:16};case _0x572d87.TextureFormat.ASTC10x6Unorm:case _0x572d87.TextureFormat.ASTC10x6UnormSRGB:return{width:10,height:6,length:16};case _0x572d87.TextureFormat.ASTC10x8Unorm:case _0x572d87.TextureFormat.ASTC10x8UnormSRGB:return{width:10,height:8,length:16};case _0x572d87.TextureFormat.ASTC10x10Unorm:case _0x572d87.TextureFormat.ASTC10x10UnormSRGB:return{width:10,height:10,length:16};case _0x572d87.TextureFormat.ASTC12x10Unorm:case _0x572d87.TextureFormat.ASTC12x10UnormSRGB:return{width:12,height:10,length:16};case _0x572d87.TextureFormat.ASTC12x12Unorm:case _0x572d87.TextureFormat.ASTC12x12UnormSRGB:return{width:12,height:12,length:16}}return{width:1,height:1,length:4}},WebGPUTextureHelper._IsHardwareTexture=function(e){return!!e.release},WebGPUTextureHelper._IsInternalTexture=function(e){return!!e.dispose},WebGPUTextureHelper.IsImageBitmap=function(e){return void 0!==e.close},WebGPUTextureHelper.IsImageBitmapArray=function(e){return Array.isArray(e)&&void 0!==e[0].close},WebGPUTextureHelper.prototype.setCommandEncoder=function(e){this._commandEncoderForCreation=e},WebGPUTextureHelper.IsCompressedFormat=function(e){switch(e){case _0x572d87.TextureFormat.BC7RGBAUnormSRGB:case _0x572d87.TextureFormat.BC7RGBAUnorm:case _0x572d87.TextureFormat.BC6HRGBFloat:case _0x572d87.TextureFormat.BC6HRGBUFloat:case _0x572d87.TextureFormat.BC5RGSnorm:case _0x572d87.TextureFormat.BC5RGUnorm:case _0x572d87.TextureFormat.BC4RSnorm:case _0x572d87.TextureFormat.BC4RUnorm:case _0x572d87.TextureFormat.BC3RGBAUnormSRGB:case _0x572d87.TextureFormat.BC3RGBAUnorm:case _0x572d87.TextureFormat.BC2RGBAUnormSRGB:case _0x572d87.TextureFormat.BC2RGBAUnorm:case _0x572d87.TextureFormat.BC1RGBAUnormSRGB:case _0x572d87.TextureFormat.BC1RGBAUnorm:case _0x572d87.TextureFormat.ETC2RGB8Unorm:case _0x572d87.TextureFormat.ETC2RGB8UnormSRGB:case _0x572d87.TextureFormat.ETC2RGB8A1Unorm:case _0x572d87.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x572d87.TextureFormat.ETC2RGBA8Unorm:case _0x572d87.TextureFormat.ETC2RGBA8UnormSRGB:case _0x572d87.TextureFormat.EACR11Unorm:case _0x572d87.TextureFormat.EACR11Snorm:case _0x572d87.TextureFormat.EACRG11Unorm:case _0x572d87.TextureFormat.EACRG11Snorm:case _0x572d87.TextureFormat.ASTC4x4Unorm:case _0x572d87.TextureFormat.ASTC4x4UnormSRGB:case _0x572d87.TextureFormat.ASTC5x4Unorm:case _0x572d87.TextureFormat.ASTC5x4UnormSRGB:case _0x572d87.TextureFormat.ASTC5x5Unorm:case _0x572d87.TextureFormat.ASTC5x5UnormSRGB:case _0x572d87.TextureFormat.ASTC6x5Unorm:case _0x572d87.TextureFormat.ASTC6x5UnormSRGB:case _0x572d87.TextureFormat.ASTC6x6Unorm:case _0x572d87.TextureFormat.ASTC6x6UnormSRGB:case _0x572d87.TextureFormat.ASTC8x5Unorm:case _0x572d87.TextureFormat.ASTC8x5UnormSRGB:case _0x572d87.TextureFormat.ASTC8x6Unorm:case _0x572d87.TextureFormat.ASTC8x6UnormSRGB:case _0x572d87.TextureFormat.ASTC8x8Unorm:case _0x572d87.TextureFormat.ASTC8x8UnormSRGB:case _0x572d87.TextureFormat.ASTC10x5Unorm:case _0x572d87.TextureFormat.ASTC10x5UnormSRGB:case _0x572d87.TextureFormat.ASTC10x6Unorm:case _0x572d87.TextureFormat.ASTC10x6UnormSRGB:case _0x572d87.TextureFormat.ASTC10x8Unorm:case _0x572d87.TextureFormat.ASTC10x8UnormSRGB:case _0x572d87.TextureFormat.ASTC10x10Unorm:case _0x572d87.TextureFormat.ASTC10x10UnormSRGB:case _0x572d87.TextureFormat.ASTC12x10Unorm:case _0x572d87.TextureFormat.ASTC12x10UnormSRGB:case _0x572d87.TextureFormat.ASTC12x12Unorm:case _0x572d87.TextureFormat.ASTC12x12UnormSRGB:return!0}return!1},WebGPUTextureHelper.GetWebGPUTextureFormat=function(e,t,i){switch(void 0===i&&(i=!1),t){case _0x354cf8.TEXTUREFORMAT_DEPTH16:return _0x572d87.TextureFormat.Depth16Unorm;case _0x354cf8.TEXTUREFORMAT_DEPTH24:return _0x572d87.TextureFormat.Depth24Plus;case _0x354cf8.TEXTUREFORMAT_DEPTH24_STENCIL8:return _0x572d87.TextureFormat.Depth24PlusStencil8;case _0x354cf8.TEXTUREFORMAT_DEPTH32_FLOAT:return _0x572d87.TextureFormat.Depth32Float;case _0x354cf8.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8:return _0x572d87.TextureFormat.Depth24UnormStencil8;case _0x354cf8.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8:return _0x572d87.TextureFormat.Depth32FloatStencil8;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM:return i?_0x572d87.TextureFormat.BC7RGBAUnormSRGB:_0x572d87.TextureFormat.BC7RGBAUnorm;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT:return _0x572d87.TextureFormat.BC6HRGBUFloat;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT:return _0x572d87.TextureFormat.BC6HRGBFloat;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5:return i?_0x572d87.TextureFormat.BC3RGBAUnormSRGB:_0x572d87.TextureFormat.BC3RGBAUnorm;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3:return i?_0x572d87.TextureFormat.BC2RGBAUnormSRGB:_0x572d87.TextureFormat.BC2RGBAUnorm;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1:case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1:return i?_0x572d87.TextureFormat.BC1RGBAUnormSRGB:_0x572d87.TextureFormat.BC1RGBAUnorm;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4:return i?_0x572d87.TextureFormat.ASTC4x4UnormSRGB:_0x572d87.TextureFormat.ASTC4x4Unorm;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL:case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2:return i?_0x572d87.TextureFormat.ETC2RGB8UnormSRGB:_0x572d87.TextureFormat.ETC2RGB8Unorm;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC:return i?_0x572d87.TextureFormat.ETC2RGBA8UnormSRGB:_0x572d87.TextureFormat.ETC2RGBA8Unorm}switch(e){case _0x354cf8.TEXTURETYPE_BYTE:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return _0x572d87.TextureFormat.R8Snorm;case _0x354cf8.TEXTUREFORMAT_RG:return _0x572d87.TextureFormat.RG8Snorm;case _0x354cf8.TEXTUREFORMAT_RGB:throw"RGB format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return _0x572d87.TextureFormat.R8Sint;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return _0x572d87.TextureFormat.RG8Sint;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:throw"RGB_INTEGER format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:return _0x572d87.TextureFormat.RGBA8Sint;default:return _0x572d87.TextureFormat.RGBA8Snorm}case _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return _0x572d87.TextureFormat.R8Unorm;case _0x354cf8.TEXTUREFORMAT_RG:return _0x572d87.TextureFormat.RG8Unorm;case _0x354cf8.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA:return i?_0x572d87.TextureFormat.RGBA8UnormSRGB:_0x572d87.TextureFormat.RGBA8Unorm;case _0x354cf8.TEXTUREFORMAT_BGRA:return i?_0x572d87.TextureFormat.BGRA8UnormSRGB:_0x572d87.TextureFormat.BGRA8Unorm;case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return _0x572d87.TextureFormat.R8Uint;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return _0x572d87.TextureFormat.RG8Uint;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:throw"RGB_INTEGER format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:return _0x572d87.TextureFormat.RGBA8Uint;case _0x354cf8.TEXTUREFORMAT_ALPHA:throw"TEXTUREFORMAT_ALPHA format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_LUMINANCE:throw"TEXTUREFORMAT_LUMINANCE format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_LUMINANCE_ALPHA:throw"TEXTUREFORMAT_LUMINANCE_ALPHA format not supported in WebGPU";default:return _0x572d87.TextureFormat.RGBA8Unorm}case _0x354cf8.TEXTURETYPE_SHORT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return _0x572d87.TextureFormat.R16Sint;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return _0x572d87.TextureFormat.RG16Sint;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x572d87.TextureFormat.RGBA16Sint}case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return _0x572d87.TextureFormat.R16Uint;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return _0x572d87.TextureFormat.RG16Uint;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x572d87.TextureFormat.RGBA16Uint}case _0x354cf8.TEXTURETYPE_INT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return _0x572d87.TextureFormat.R32Sint;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return _0x572d87.TextureFormat.RG32Sint;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x572d87.TextureFormat.RGBA32Sint}case _0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return _0x572d87.TextureFormat.R32Uint;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return _0x572d87.TextureFormat.RG32Uint;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x572d87.TextureFormat.RGBA32Uint}case _0x354cf8.TEXTURETYPE_FLOAT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return _0x572d87.TextureFormat.R32Float;case _0x354cf8.TEXTUREFORMAT_RG:return _0x572d87.TextureFormat.RG32Float;case _0x354cf8.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA:default:return _0x572d87.TextureFormat.RGBA32Float}case _0x354cf8.TEXTURETYPE_HALF_FLOAT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return _0x572d87.TextureFormat.R16Float;case _0x354cf8.TEXTUREFORMAT_RG:return _0x572d87.TextureFormat.RG16Float;case _0x354cf8.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA:default:return _0x572d87.TextureFormat.RGBA16Float}case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:throw"TEXTURETYPE_UNSIGNED_SHORT_5_6_5 format not supported in WebGPU";case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:throw"TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV format not supported in WebGPU";case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:throw"TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV format not supported in WebGPU";case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:throw"TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 format not supported in WebGPU";case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:throw"TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 format not supported in WebGPU";case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(t){case _0x354cf8.TEXTUREFORMAT_RGBA:return _0x572d87.TextureFormat.RGB10A2Unorm;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:throw"TEXTUREFORMAT_RGBA_INTEGER format not supported in WebGPU when type is TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV";default:return _0x572d87.TextureFormat.RGB10A2Unorm}}return i?_0x572d87.TextureFormat.RGBA8UnormSRGB:_0x572d87.TextureFormat.RGBA8Unorm},WebGPUTextureHelper.GetNumChannelsFromWebGPUTextureFormat=function(e){switch(e){case _0x572d87.TextureFormat.R8Unorm:case _0x572d87.TextureFormat.R8Snorm:case _0x572d87.TextureFormat.R8Uint:case _0x572d87.TextureFormat.R8Sint:case _0x572d87.TextureFormat.BC4RUnorm:case _0x572d87.TextureFormat.BC4RSnorm:case _0x572d87.TextureFormat.R16Uint:case _0x572d87.TextureFormat.R16Sint:case _0x572d87.TextureFormat.Depth16Unorm:case _0x572d87.TextureFormat.R16Float:case _0x572d87.TextureFormat.R32Uint:case _0x572d87.TextureFormat.R32Sint:case _0x572d87.TextureFormat.R32Float:case _0x572d87.TextureFormat.Depth32Float:case _0x572d87.TextureFormat.Stencil8:case _0x572d87.TextureFormat.Depth24Plus:case _0x572d87.TextureFormat.EACR11Unorm:case _0x572d87.TextureFormat.EACR11Snorm:return 1;case _0x572d87.TextureFormat.RG8Unorm:case _0x572d87.TextureFormat.RG8Snorm:case _0x572d87.TextureFormat.RG8Uint:case _0x572d87.TextureFormat.RG8Sint:case _0x572d87.TextureFormat.Depth24UnormStencil8:case _0x572d87.TextureFormat.Depth32FloatStencil8:case _0x572d87.TextureFormat.BC5RGUnorm:case _0x572d87.TextureFormat.BC5RGSnorm:case _0x572d87.TextureFormat.RG16Uint:case _0x572d87.TextureFormat.RG16Sint:case _0x572d87.TextureFormat.RG16Float:case _0x572d87.TextureFormat.RG32Uint:case _0x572d87.TextureFormat.RG32Sint:case _0x572d87.TextureFormat.RG32Float:case _0x572d87.TextureFormat.Depth24PlusStencil8:case _0x572d87.TextureFormat.EACRG11Unorm:case _0x572d87.TextureFormat.EACRG11Snorm:return 2;case _0x572d87.TextureFormat.RGB9E5UFloat:case _0x572d87.TextureFormat.RG11B10UFloat:case _0x572d87.TextureFormat.BC6HRGBUFloat:case _0x572d87.TextureFormat.BC6HRGBFloat:case _0x572d87.TextureFormat.ETC2RGB8Unorm:case _0x572d87.TextureFormat.ETC2RGB8UnormSRGB:return 3;case _0x572d87.TextureFormat.RGBA8Unorm:case _0x572d87.TextureFormat.RGBA8UnormSRGB:case _0x572d87.TextureFormat.RGBA8Snorm:case _0x572d87.TextureFormat.RGBA8Uint:case _0x572d87.TextureFormat.RGBA8Sint:case _0x572d87.TextureFormat.BGRA8Unorm:case _0x572d87.TextureFormat.BGRA8UnormSRGB:case _0x572d87.TextureFormat.RGB10A2Unorm:case _0x572d87.TextureFormat.BC7RGBAUnorm:case _0x572d87.TextureFormat.BC7RGBAUnormSRGB:case _0x572d87.TextureFormat.BC3RGBAUnorm:case _0x572d87.TextureFormat.BC3RGBAUnormSRGB:case _0x572d87.TextureFormat.BC2RGBAUnorm:case _0x572d87.TextureFormat.BC2RGBAUnormSRGB:case _0x572d87.TextureFormat.BC1RGBAUnorm:case _0x572d87.TextureFormat.BC1RGBAUnormSRGB:case _0x572d87.TextureFormat.RGBA16Uint:case _0x572d87.TextureFormat.RGBA16Sint:case _0x572d87.TextureFormat.RGBA16Float:case _0x572d87.TextureFormat.RGBA32Uint:case _0x572d87.TextureFormat.RGBA32Sint:case _0x572d87.TextureFormat.RGBA32Float:case _0x572d87.TextureFormat.ETC2RGB8A1Unorm:case _0x572d87.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x572d87.TextureFormat.ETC2RGBA8Unorm:case _0x572d87.TextureFormat.ETC2RGBA8UnormSRGB:case _0x572d87.TextureFormat.ASTC4x4Unorm:case _0x572d87.TextureFormat.ASTC4x4UnormSRGB:case _0x572d87.TextureFormat.ASTC5x4Unorm:case _0x572d87.TextureFormat.ASTC5x4UnormSRGB:case _0x572d87.TextureFormat.ASTC5x5Unorm:case _0x572d87.TextureFormat.ASTC5x5UnormSRGB:case _0x572d87.TextureFormat.ASTC6x5Unorm:case _0x572d87.TextureFormat.ASTC6x5UnormSRGB:case _0x572d87.TextureFormat.ASTC6x6Unorm:case _0x572d87.TextureFormat.ASTC6x6UnormSRGB:case _0x572d87.TextureFormat.ASTC8x5Unorm:case _0x572d87.TextureFormat.ASTC8x5UnormSRGB:case _0x572d87.TextureFormat.ASTC8x6Unorm:case _0x572d87.TextureFormat.ASTC8x6UnormSRGB:case _0x572d87.TextureFormat.ASTC8x8Unorm:case _0x572d87.TextureFormat.ASTC8x8UnormSRGB:case _0x572d87.TextureFormat.ASTC10x5Unorm:case _0x572d87.TextureFormat.ASTC10x5UnormSRGB:case _0x572d87.TextureFormat.ASTC10x6Unorm:case _0x572d87.TextureFormat.ASTC10x6UnormSRGB:case _0x572d87.TextureFormat.ASTC10x8Unorm:case _0x572d87.TextureFormat.ASTC10x8UnormSRGB:case _0x572d87.TextureFormat.ASTC10x10Unorm:case _0x572d87.TextureFormat.ASTC10x10UnormSRGB:case _0x572d87.TextureFormat.ASTC12x10Unorm:case _0x572d87.TextureFormat.ASTC12x10UnormSRGB:case _0x572d87.TextureFormat.ASTC12x12Unorm:case _0x572d87.TextureFormat.ASTC12x12UnormSRGB:return 4}throw"Unknown format ".concat(e,"!")},WebGPUTextureHelper.HasStencilAspect=function(e){switch(e){case _0x572d87.TextureFormat.Stencil8:case _0x572d87.TextureFormat.Depth24UnormStencil8:case _0x572d87.TextureFormat.Depth32FloatStencil8:case _0x572d87.TextureFormat.Depth24PlusStencil8:return!0}return!1},WebGPUTextureHelper.HasDepthAndStencilAspects=function(e){switch(e){case _0x572d87.TextureFormat.Depth24UnormStencil8:case _0x572d87.TextureFormat.Depth32FloatStencil8:case _0x572d87.TextureFormat.Depth24PlusStencil8:return!0}return!1},WebGPUTextureHelper.prototype.copyVideoToTexture=function(e,t,i,n,r){var o,a,s,l;void 0===n&&(n=!1);var u=void 0===r,c=this._getVideoPipeline(i,n?_0x3c651a.InvertY:_0x3c651a.DontInvertY),h=c[0],d=c[1];u&&(r=this._device.createCommandEncoder({})),null===(a=(o=r).pushDebugGroup)||void 0===a||a.call(o,"copy video to texture - invertY=".concat(n));var f={colorAttachments:[{view:t._hardwareTexture.underlyingResource.createView({format:i,dimension:_0x572d87.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:1,aspect:_0x572d87.TextureAspect.All}),loadOp:_0x572d87.LoadOp.Load,storeOp:_0x572d87.StoreOp.Store}]},p=r.beginRenderPass(f),_={layout:d,entries:[{binding:0,resource:this._device.importExternalTexture({source:e.underlyingResource})}]},m=this._device.createBindGroup(_);p.setPipeline(h),p.setBindGroup(0,m),p.draw(4,1,0,0),p.end(),null===(l=(s=r).popDebugGroup)||void 0===l||l.call(s),u&&(this._device.queue.submit([r.finish()]),r=null)},WebGPUTextureHelper.prototype.invertYPreMultiplyAlpha=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){var _,m,g,x,v,y;void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=1),void 0===u&&(u=0),void 0===c&&(c=0),void 0===h&&(h=0),void 0===d&&(d=0);var $,b=0!==h,T=void 0===f,C=this._getPipeline(n,b?_0x90e6c0.InvertYPremultiplyAlphaWithOfst:_0x90e6c0.InvertYPremultiplyAlpha,{invertY:r,premultiplyAlpha:o}),S=C[0],w=C[1];if(a=Math.max(a,0),T&&(f=this._device.createCommandEncoder({})),null===(m=(_=f).pushDebugGroup)||void 0===m||m.call(_,"internal process texture - invertY=".concat(r," premultiplyAlpha=").concat(o)),WebGPUTextureHelper._IsHardwareTexture(e)?($=e.underlyingResource,(!r||o||1!==l||0!==a)&&(e=void 0)):($=e,e=void 0),$){b&&this._bufferManager.setRawData(this._ubCopyWithOfst,0,new Float32Array([u,c,h,d]),0,16);var E=e,P=null!==(g=null==E?void 0:E._copyInvertYTempTexture)&&void 0!==g?g:this.createTexture({width:t,height:i,layers:1},!1,!1,!1,!1,!1,n,1,f,_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.RenderAttachment|_0x572d87.TextureUsage.TextureBinding),A=null!==(x=null==E?void 0:E._copyInvertYRenderPassDescr)&&void 0!==x?x:{colorAttachments:[{view:P.createView({format:n,dimension:_0x572d87.TextureViewDimension.E2d,baseMipLevel:0,mipLevelCount:1,arrayLayerCount:1,baseArrayLayer:0}),loadOp:_0x572d87.LoadOp.Load,storeOp:_0x572d87.StoreOp.Store}]},L=f.beginRenderPass(A),M=b?null==E?void 0:E._copyInvertYBindGroupWithOfst:null==E?void 0:E._copyInvertYBindGroup;if(!M){var R={layout:w,entries:[{binding:0,resource:$.createView({format:n,dimension:_0x572d87.TextureViewDimension.E2d,baseMipLevel:s,mipLevelCount:1,arrayLayerCount:l,baseArrayLayer:a})}]};b&&R.entries.push({binding:1,resource:{buffer:this._ubCopyWithOfst}}),M=this._device.createBindGroup(R)}L.setPipeline(S),L.setBindGroup(0,M),L.draw(4,1,0,0),L.end(),f.copyTextureToTexture({texture:P},{texture:$,mipLevel:s,origin:{x:0,y:0,z:a}},{width:t,height:i,depthOrArrayLayers:1}),E?(E._copyInvertYTempTexture=P,E._copyInvertYRenderPassDescr=A,b?E._copyInvertYBindGroupWithOfst=M:E._copyInvertYBindGroup=M):this._deferredReleaseTextures.push([P,null]),null===(y=(v=f).popDebugGroup)||void 0===y||y.call(v),T&&(this._device.queue.submit([f.finish()]),f=null)}},WebGPUTextureHelper.prototype.copyWithInvertY=function(e,t,i,n){var r,o,a,s,l=void 0===n,u=this._getPipeline(t,_0x90e6c0.InvertYPremultiplyAlpha,{invertY:!0,premultiplyAlpha:!1}),c=u[0],h=u[1];l&&(n=this._device.createCommandEncoder({})),null===(o=(r=n).pushDebugGroup)||void 0===o||o.call(r,"internal copy texture with invertY");var d=n.beginRenderPass(i),f=this._device.createBindGroup({layout:h,entries:[{binding:0,resource:e}]});d.setPipeline(c),d.setBindGroup(0,f),d.draw(4,1,0,0),d.end(),null===(s=(a=n).popDebugGroup)||void 0===s||s.call(a),l&&(this._device.queue.submit([n.finish()]),n=null)},WebGPUTextureHelper.prototype.createTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=_0x572d87.TextureFormat.RGBA8Unorm),void 0===s&&(s=1),void 0===u&&(u=-1),void 0===c&&(c=0),void 0===h&&(h=1),s>1&&(s=4);var d=e.layers||1,f={width:e.width,height:e.height,depthOrArrayLayers:d},p=WebGPUTextureHelper.IsCompressedFormat(a),_=t?WebGPUTextureHelper.ComputeNumMipmapLevels(e.width,e.height):1;h>1&&(_=h);var m=u>=0?u:_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.CopyDst|_0x572d87.TextureUsage.TextureBinding;c|=t&&!p?_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.RenderAttachment:0,!p&&!o&&(c|=_0x572d87.TextureUsage.RenderAttachment|_0x572d87.TextureUsage.CopyDst);var g=this._device.createTexture({size:f,dimension:o?_0x572d87.TextureDimension.E3d:_0x572d87.TextureDimension.E2d,format:a,usage:m|c,sampleCount:s,mipLevelCount:_});return WebGPUTextureHelper.IsImageBitmap(e)&&(this.updateTexture(e,g,e.width,e.height,d,a,0,0,n,r,0,0),t&&i&&this.generateMipmaps(g,a,_,0,l)),g},WebGPUTextureHelper.prototype.createCubeTexture=function(e,t,i,n,r,o,a,s,l,u){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o=_0x572d87.TextureFormat.RGBA8Unorm),void 0===a&&(a=1),void 0===l&&(l=-1),void 0===u&&(u=0),a>1&&(a=4);var c=WebGPUTextureHelper.IsImageBitmapArray(e)?e[0].width:e.width,h=WebGPUTextureHelper.IsImageBitmapArray(e)?e[0].height:e.height,d=WebGPUTextureHelper.IsCompressedFormat(o),f=t?WebGPUTextureHelper.ComputeNumMipmapLevels(c,h):1,p=l>=0?l:_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.CopyDst|_0x572d87.TextureUsage.TextureBinding;u|=t&&!d?_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.RenderAttachment:0,!d&&(u|=_0x572d87.TextureUsage.RenderAttachment|_0x572d87.TextureUsage.CopyDst);var _=this._device.createTexture({size:{width:c,height:h,depthOrArrayLayers:6},dimension:_0x572d87.TextureDimension.E2d,format:o,usage:p|u,sampleCount:a,mipLevelCount:f});return WebGPUTextureHelper.IsImageBitmapArray(e)&&(this.updateCubeTextures(e,_,c,h,o,n,r,0,0),t&&i&&this.generateCubeMipmaps(_,o,f,s)),_},WebGPUTextureHelper.prototype.generateCubeMipmaps=function(e,t,i,n){var r,o,a,s,l=void 0===n;l&&(n=this._device.createCommandEncoder({})),null===(o=(r=n).pushDebugGroup)||void 0===o||o.call(r,"create cube mipmaps - ".concat(i," levels"));for(var u=0;u<6;++u)this.generateMipmaps(e,t,i,u,n);null===(s=(a=n).popDebugGroup)||void 0===s||s.call(a),l&&(this._device.queue.submit([n.finish()]),n=null)},WebGPUTextureHelper.prototype.generateMipmaps=function(e,t,i,n,r){var o,a,s,l,u,c,h,d;void 0===n&&(n=0);var f,p=void 0===r,_=this._getPipeline(t),m=_[0],g=_[1];if(n=Math.max(n,0),p&&(r=this._device.createCommandEncoder({})),null===(a=(o=r).pushDebugGroup)||void 0===a||a.call(o,"create mipmaps for face #".concat(n," - ").concat(i," levels")),WebGPUTextureHelper._IsHardwareTexture(e)?(f=e.underlyingResource,e._mipmapGenRenderPassDescr=e._mipmapGenRenderPassDescr||[],e._mipmapGenBindGroup=e._mipmapGenBindGroup||[]):(f=e,e=void 0),f){for(var x=e,v=1;v>e,p=h>>e;if(e>0&&(m=_),0==e){let e=(1&p)<<1|1&n;l.updateInt("srcDimension",e),l.updateFloat2("texelSize",n,p),l.update(),m.setUniformBuffer("params",l),i?m.setTexture("oriDepthTexture",s,!1):m.setTexture("oriTexture",s,!1),m.setStorageTexture("mip0Texture",t)}else{u.updateFloat2("texelSize",n,p),u.update(),m.setUniformBuffer("params",u);let i=o.createView({format:"rgba8unorm",dimension:_0x572d87.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:e});t._texture._hardwareTexture.viewForWriting=i,m.setStorageTexture("mipMapsTexture",t)}1&e?(m.setStorageBuffer("buffer_in",d),m.setStorageBuffer("buffer_out",f)):(e>0&&m.setStorageBuffer("buffer_in",f),m.setStorageBuffer("buffer_out",d)),await m.dispatchWhenReady(Math.ceil(n/8),Math.ceil(p/8),1),e!=r-1&&a._currentRenderTarget&&a.unBindFramebuffer(a._currentRenderTarget)}d.dispose(),f.dispose(),u.dispose(),l.dispose()},WebGPUTextureHelper.prototype.createGPUTextureForInternalTexture=function(e,t,i,n,r){!e._hardwareTexture&&(e._hardwareTexture=new _0x253af9),void 0===t&&(t=e.width),void 0===i&&(i=e.height),void 0===n&&(n=e.depth);var o=e._hardwareTexture,a=0!=((null!=r?r:0)&_0x354cf8.TEXTURE_CREATIONFLAG_STORAGE);o.format=WebGPUTextureHelper.GetWebGPUTextureFormat(e.type,e.format,e._useSRGBBuffer),o.textureUsages=e._source===InternalTextureSource.RenderTarget||e.source===InternalTextureSource.MultiRenderTarget?_0x572d87.TextureUsage.TextureBinding|_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.RenderAttachment:e._source===InternalTextureSource.DepthStencil?_0x572d87.TextureUsage.TextureBinding|_0x572d87.TextureUsage.RenderAttachment:-1,o.textureAdditionalUsages=a?_0x572d87.TextureUsage.StorageBinding:0;var s,l=e.generateMipMaps,u=n||1;if(s=null!==e._maxLodLevel?e._maxLodLevel:e.mipmapCount>1?e.mipmapCount:l?WebGPUTextureHelper.ComputeNumMipmapLevels(t,i):1,e.isCube){var c=this.createCubeTexture({width:t,height:i},e.generateMipMaps,e.generateMipMaps,e.invertY,!1,o.format,1,this._commandEncoderForCreation,o.textureUsages,o.textureAdditionalUsages);o.set(c),o.createView({format:o.format,dimension:_0x572d87.TextureViewDimension.Cube,mipLevelCount:s,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:6,aspect:WebGPUTextureHelper.HasDepthAndStencilAspects(o.format)?_0x572d87.TextureAspect.DepthOnly:_0x572d87.TextureAspect.All},a)}else{c=this.createTexture({width:t,height:i,layers:u},e.generateMipMaps,e.generateMipMaps,e.invertY,!1,e.is3D,o.format,1,this._commandEncoderForCreation,o.textureUsages,o.textureAdditionalUsages,s);o.set(c);var h=o.format;"depth24plus-stencil8"==h&&(h="depth24plus"),o.createView({format:h,dimension:e.is2DArray?_0x572d87.TextureViewDimension.E2dArray:e.is3D?_0x572d87.TextureDimension.E3d:_0x572d87.TextureViewDimension.E2d,mipLevelCount:s,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:e.is3D?1:u,aspect:WebGPUTextureHelper.HasDepthAndStencilAspects(o.format)?_0x572d87.TextureAspect.DepthOnly:_0x572d87.TextureAspect.All},a)}return e.width=e.baseWidth=t,e.height=e.baseHeight=i,e.depth=e.baseDepth=n,this.createMSAATexture(e,e.samples),o},WebGPUTextureHelper.prototype.createMSAATexture=function(e,t){var i=e._hardwareTexture;if((null==i?void 0:i.msaaTexture)&&(this.releaseTexture(i.msaaTexture),i.msaaTexture=null),i&&!((null!=t?t:1)<=1)){var n=e.width,r=e.height,o=e.depth||1;if(e.isCube){var a=this.createCubeTexture({width:n,height:r},!1,!1,e.invertY,!1,i.format,t,this._commandEncoderForCreation,i.textureUsages,i.textureAdditionalUsages);i.msaaTexture=a}else{a=this.createTexture({width:n,height:r,layers:o},!1,!1,e.invertY,!1,e.is3D,i.format,t,this._commandEncoderForCreation,i.textureUsages,i.textureAdditionalUsages);i.msaaTexture=a}var s=i.format;"depth24plus-stencil8"==s&&(s="depth24plus"),i.createMSAAView({format:s,dimension:e.is2DArray?_0x572d87.TextureViewDimension.E2dArray:e.is3D?_0x572d87.TextureDimension.E3d:_0x572d87.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:e.is3D?1:o,aspect:WebGPUTextureHelper.HasDepthAndStencilAspects(i.format)?_0x572d87.TextureAspect.DepthOnly:_0x572d87.TextureAspect.All})}},WebGPUTextureHelper.prototype.updateCubeTextures=function(e,t,i,n,r,o,a,s,l){void 0===o&&(o=!1),void 0===a&&(a=!1),void 0===s&&(s=0),void 0===l&&(l=0);for(var u=[0,3,1,4,2,5],c=0;c{console.log("createImageBitmap")}))}else{if(o==V$10.DEPTH_COMPONENT||o==V$10.DEPTH_COMPONENT16||o==V$10.DEPTH_COMPONENT32F||o==V$10.DEPTH_STENCIL){var y={width:i,height:n},$={generateStencil:o==V$10.DEPTH_STENCIL,bilinearFiltering:!0,isCube:!1,depthTextureFormat:h,samples:this._samples,comparisonFunction:this._sampler._comparisonFunction};g=c.createDepthStencilTexture(y,$),c._textureHelper.createGPUTextureForInternalTexture(g),this._texture=new _0x5cc035(g)}else g=c.createRawTexture(x,i,n,h,this._needGenerateMipmap,u,m,!1,d,0,!1,0,this._samples),this._texture=new _0x5cc035(g);g.wrapU=p,g.wrapV=_}f=l?V$10.compressedTextureSizeInBytes(o,i,n):V$10.textureSizeInBytes(o,a,i,n),this._id=z$V++,this._context=t,this._pixelFormat=o,this._pixelDatatype=a,this._width=i,this._height=n,this._dimensions=new o$1o(i,n),this._size=[i,n],this._mipmapTexture,this._sizeInBytes=f,this._flipY=u,t.memorySize+=f}function H$$(e){return void 0!==e.close}function t$V(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.webgpu?this._inner=new u$S(e):this._inner=new w$U(e)}u$S.fromFramebuffer=function(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context},Object.defineProperties(u$S.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},size:{get:function(){return this._size}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}},thinTexture:{get:function(){return this._texture}},internalTexture:{get:function(){return this._texture._texture}},GPUTexture:{get:function(){return this._texture._texture._hardwareTexture.underlyingResource}}}),u$S.prototype.copyFrom=function(e,t,i){var n=e.width,r=e.height,o=e.arrayBufferView;if(e$2b(o))this._context.engine.updateTextureData(this.internalTexture,o,t,i,n,r);else{var a=this.internalTexture,s=a._hardwareTexture;e instanceof HTMLVideoElement?this._context.engine.updateVideoTexture(a,e,!1):this._context.engine._textureHelper.updateTexture(e,a,n,r,a.depth,s.format,0,0,!0,!1,t,i)}},u$S.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){console.log("TextureGPU.prototype.copyFromFramebuffer")},u$S.prototype.copyFromTexture=function(e,t,i,n,r,o,a){var s=this._context.engine._device,l=this.GPUTexture,u=e._inner.GPUTexture,c=s.createCommandEncoder({});c.copyTextureToTexture({texture:u,origin:{x:n,y:r,z:0}},{texture:l,origin:{x:t,y:i,z:0}},{width:u.width,height:u.height,depthOrArrayLayers:1}),s.queue.submit([c.finish()])},u$S.prototype.generateMipmap=function(e){if(this._needGenerateMipmap&&e$2b(this._texture)){var t=WebGPUTextureHelper.ComputeNumMipmapLevels(this._width,this._height),i=this.GPUTexture;this._context.engine._textureHelper.generateMipmaps(i,i.format,t,0)}else this._needGenerateMipmap=!0},u$S.prototype.generateMipmapTextureByCS=function(){if(e$2b(this.thinTexture)){if(this._context.engine._currentRenderTarget){var e=this;return void this._context.engine._onAfterUnbindFrameBufferObservable.addOnce((function(){e._afterCreate(!1)}))}this._afterCreate(!1)}},u$S.prototype.generateHizDepthTextureByCS=function(){if(e$2b(this.thinTexture)){if(this._context.engine._currentRenderTarget){var e=this;return void this._context.engine._onAfterUnbindFrameBufferObservable.addOnce((function(){e._afterCreate(!0)}))}this._afterCreate(!0)}},u$S.prototype._afterCreate=function(e){var t=WebGPUTextureHelper.ComputeNumMipmapLevels(this._width,this._height),i=this.pixelFormat==V$10.DEPTH_COMPONENT||this.pixelFormat==V$10.DEPTH_STENCIL;let n=this._context.engine.createRawTexture(null,this._width,this._height,_0x354cf8.TEXTUREFORMAT_RGBA,!0,this.internalTexture.invertY,this.internalTexture.samplingMode,!1,0,_0x354cf8.TEXTURE_CREATIONFLAG_STORAGE,!1,t,this.internalTexture.samples);this._mipmapTexture=new _0x5cc035(n),this._context.engine._textureHelper.generateMipmapsByCS(this._texture,this._mipmapTexture,i,e,t)},u$S.prototype.isDestroyed=function(){return!1},u$S.prototype.destroy=function(){return this._context.memorySize-=this._sizeInBytes,this._texture.dispose(),i$10(this)},t$V.create=function(e){return new t$V(e)},t$V.fromFramebuffer=function(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=t._gl,n=u$_(e.pixelFormat,V$10.RGB),r=u$_(e.framebufferXOffset,0),o=u$_(e.framebufferYOffset,0),a=u$_(e.width,i.drawingBufferWidth),s=u$_(e.height,i.drawingBufferHeight),l=e.framebuffer;if(!V$10.validate(n))throw new t$16("Invalid pixelFormat.");if(V$10.isDepthFormat(n)||V$10.isCompressedFormat(n))throw new t$16("pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.");if(o$1q.defined("options.context",e.context),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",r,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",o,0),r+a>i.drawingBufferWidth)throw new t$16("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(o+s>i.drawingBufferHeight)throw new t$16("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new t$V({context:t,width:a,height:s,pixelFormat:n,source:{framebuffer:e$2b(l)?l:t.defaultFramebuffer,xOffset:r,yOffset:o,width:a,height:s}})},Object.defineProperties(t$V.prototype,{id:{set:function(e){this._inner.id=e},get:function(){return this._inner.id}},sampler:{get:function(){return this._inner.sampler},set:function(e){this._inner.sampler=e}},pixelFormat:{get:function(){return this._inner.pixelFormat}},pixelDatatype:{get:function(){return this._inner.pixelDatatype}},dimensions:{get:function(){return this._inner.dimensions}},size:{get:function(){return this._inner.size}},preMultiplyAlpha:{get:function(){return this._inner.preMultiplyAlpha}},flipY:{get:function(){return this._inner.flipY}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},_target:{get:function(){return this._inner._target}},_texture:{get:function(){return this._inner._texture}}}),t$V.prototype.copyFrom=function(e,t,i){this._inner.copyFrom(e,t,i)},t$V.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){this._inner.copyFromFramebuffer(e,t,i,n,r,o)},t$V.prototype.copyFromTexture=function(e,t,i,n,r,o,a){this._inner.copyFromTexture(e,t,i,n,r,o,a)},t$V.prototype.generateMipmap=function(e){this._inner.generateMipmap(e)},t$V.prototype.isDestroyed=function(){return!1},t$V.prototype.destroy=function(){return this._inner.destroy(),i$10(this)};var E$15={NORMAL:0,REFLECT:1,DEPTH:2,NORMAL_AND_DEPTH:3,POSTEFFECT_FILTER:4,RASTER:5,CLAMP:6,PICKRECT:7,SQRESULT:8},Qe$c=Object.freeze(E$15),E$14={RGBA4:de$x.RGBA4,RGBA8:de$x.RGBA8,RGBA16F:de$x.RGBA16F,RGBA32F:de$x.RGBA32F,RGB5_A1:de$x.RGB5_A1,RGB565:de$x.RGB565,DEPTH_COMPONENT16:de$x.DEPTH_COMPONENT16,STENCIL_INDEX8:de$x.STENCIL_INDEX8,DEPTH_STENCIL:de$x.DEPTH_STENCIL,DEPTH24_STENCIL8:de$x.DEPTH24_STENCIL8,validate:function(e){return e===E$14.RGBA4||e===E$14.RGBA8||e===E$14.RGBA16F||e===E$14.RGBA32F||e===E$14.RGB5_A1||e===E$14.RGB565||e===E$14.DEPTH_COMPONENT16||e===E$14.STENCIL_INDEX8||e===E$14.DEPTH_STENCIL||e===E$14.DEPTH24_STENCIL8},getColorFormat:function(e){return e===de$x.FLOAT?E$14.RGBA32F:e===de$x.HALF_FLOAT_OES?E$14.RGBA16F:E$14.RGBA8}},M$13=Object.freeze(E$14);function o$19(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=t._gl,n=e$1T.maximumRenderbufferSize,r=u$_(e.format,M$13.RGBA4),o=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE),a=e$2b(e.width)?e.width:i.drawingBufferWidth,s=e$2b(e.height)?e.height:i.drawingBufferHeight,l=!1,u=u$_(e.samples,0);u>0&&t.webgl2&&(l=!0);var c=G$19(t,r,o);if(!M$13.validate(r))throw new t$16("Invalid format.");if(o$1q.typeOf.number.greaterThan("width",a,0),a>n)throw new t$16("Width must be less than or equal to the maximum renderbuffer size ("+n+"). Check maximumRenderbufferSize.");if(o$1q.typeOf.number.greaterThan("height",s,0),s>n)throw new t$16("Height must be less than or equal to the maximum renderbuffer size ("+n+"). Check maximumRenderbufferSize.");this._gl=i,this._format=r,this._width=a,this._height=s,this._renderbuffer=this._gl.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,this._renderbuffer),l?i.renderbufferStorageMultisample(i.RENDERBUFFER,u,c,a,s):i.renderbufferStorage(i.RENDERBUFFER,c,a,s),i.bindRenderbuffer(i.RENDERBUFFER,null)}function G$19(e,t,i){if(!e.webgl2)return t;var n=t;return t===de$x.RED&&(i===de$x.FLOAT&&(n=de$x.R32F),i===de$x.HALF_FLOAT&&(n=de$x.R16F),i===de$x.UNSIGNED_BYTE&&(n=de$x.R8)),t===de$x.RGB&&(i===de$x.FLOAT&&(n=de$x.RGB32F),i===de$x.HALF_FLOAT&&(n=de$x.RGB16F),i===de$x.UNSIGNED_BYTE&&(n=de$x.RGB8)),t===de$x.RGBA&&(i===de$x.FLOAT&&(n=de$x.RGBA32F),i===de$x.HALF_FLOAT&&(n=de$x.RGBA16F),i===de$x.UNSIGNED_BYTE&&(n=de$x.RGBA8)),n===de$x.R16F||n===de$x.R32F||n===de$x.RGBA16F||n===de$x.RGBA32F?e.colorBufferFloat:(n===de$x.RGB16F||n===de$x.RGB32F)&&console.warn("WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),n===de$x.DEPTH_STENCIL?n=de$x.DEPTH24_STENCIL8:n===de$x.DEPTH_COMPONENT&&(i===de$x.UNSIGNED_SHORT?n=de$x.DEPTH_COMPONENT16:i===de$x.UNSIGNED_INT&&(n=de$x.DEPTH_COMPONENT24)),n}function r$10(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=e$1T.maximumRenderbufferSize,n=u$_(e.format,M$13.RGBA4);u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE);var r=e$2b(e.width)?e.width:t.drawingBufferWidth,o=e$2b(e.height)?e.height:t.drawingBufferHeight;if(u$_(e.samples,0)>0&&t.webgl2,!M$13.validate(n))throw new t$16("Invalid format.");if(o$1q.typeOf.number.greaterThan("width",r,0),r>i)throw new t$16("Width must be less than or equal to the maximum renderbuffer size ("+i+"). Check maximumRenderbufferSize.");if(o$1q.typeOf.number.greaterThan("height",o,0),o>i)throw new t$16("Height must be less than or equal to the maximum renderbuffer size ("+i+"). Check maximumRenderbufferSize.");this._format=n,this._width=r,this._height=o}function r$$(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.webgpu?this._inner=new r$10(e):this._inner=new o$19(e)}Object.defineProperties(o$19.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),o$19.prototype._getRenderbuffer=function(){return this._renderbuffer},o$19.prototype.isDestroyed=function(){return!1},o$19.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),i$10(this)},Object.defineProperties(r$10.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),r$10.prototype._getRenderbuffer=function(){return null},r$10.prototype.isDestroyed=function(){return!1},r$10.prototype.destroy=function(){return i$10(this)},Object.defineProperties(r$$.prototype,{format:{get:function(){return this._inner.format}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}}}),r$$.prototype._getRenderbuffer=function(){return this._inner._getRenderbuffer()},r$$.prototype.isDestroyed=function(){return!1},r$$.prototype.destroy=function(){return this._inner.destroy(),i$10(this)};var v$O="uniform sampler2D u_depthTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n gl_FragColor = czm_packDepth(texture2D(u_depthTexture, v_textureCoordinates).r);\n}\n",C$14="varying v_textureCoordinates : vec2;\nvar u_depthTexture : texture_depth_2d;\nvar u_depthTextureSampler : sampler;\nfn packDepth(depth : f32) -> vec4 {\n var enc : vec4 = (vec4(1.0, 255.0, 65025.0, 16581375.0) * depth);\n enc = fract(enc);\n enc = (enc - (vec4(enc.y, enc.z, enc.w, enc.w) * vec4(0.003921569, 0.003921569, 0.003921569, 0.0)));\n return enc;\n}\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n gl_FragColor = packDepth(textureSample(u_depthTexture, u_depthTextureSampler, v_textureCoordinates));\n}\n";function s$T(e){this._depthTexture=void 0,this._framebuffer=void 0,this._copyDepthCommand=void 0,this._viewport=new f$18,this._rs=void 0,this._passState=new n$Z(e),this._passState.viewport=this._viewport,this._context=e,this._isUpdate=!1,this._beginFunc=void 0,this._endFunc=void 0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!1,isUnderGlobeVisible:!1},this._depthTextureToCopy=void 0,this._manualDepth=!0;var t=new n$Z(e);t.blendingEnabled=!1,t.viewport=new f$18,this._passState=t}function S$S(e,t,i,n,r){(!e$2b(e._framebuffer)||e.width!==n||e.height!==r)&&(e.width=n,e.height=r,e._depthTexture=e._depthTexture&&e._depthTexture.destroy(),e._depthTexture=new t$V({context:t,width:n,height:r,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._framebuffer=new t$W({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1}),t.depthTexture||(e._depthTextureCopyFrom=e._depthTextureCopyFrom&&e._depthTextureCopyFrom.destroy(),e._depthTextureCopyFrom=new t$V({context:t,width:n,height:r,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),e._framebufferCopyFrom=e._framebufferCopyFrom&&e._framebufferCopyFrom.destroy(),e._framebufferCopyFrom=new t$W({context:t,colorTextures:[e._depthTextureCopyFrom],depthStencilRenderbuffer:new r$$({context:t,width:n,height:r,format:M$13.DEPTH_STENCIL}),destroyAttachments:!1})))}function P$10(e,t,i,n){if(e._viewport.width=i,e._viewport.height=n,(!e$2b(e._rs)||!f$18.equals(e._viewport,e._rs.viewport))&&(e._rs=d$1m.fromCache({viewport:e._viewport})),t.depthTexture)e$2b(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(t.webgpu?C$14:v$O,{shaderProgramName:"depthFramebufferCopyDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e._depthTextureToCopy}},owner:e}));else{e._copyDepthCommand=t.createViewportQuadCommand("uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",{renderState:d$1m.fromCache(),uniformMap:{u_texture:function(){return e._depthTextureToCopy}},owner:e})}e$2b(e._clearCommand)||(e._clearCommand=new t$X({color:new e$1U(0,0,0,0),stencil:0,owner:e})),e._copyDepthCommand.renderState=e._rs,e._clearCommand.framebuffer=e._framebuffer,e._copyDepthCommand.framebuffer=e._framebuffer}Object.defineProperties(s$T.prototype,{framebuffer:{get:function(){return this._framebuffer}},depthTexture:{get:function(){return this._depthTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isManualDepth:{get:function(){return this._manualDepth},set:function(e){this._manualDepth!==e&&(this._manualDepth=e,this._isUpdate=!0)}},useType:{get:function(){return 1},set:function(e){}},frameBufferType:{get:function(){return Qe$c.DEPTH}}}),s$T.prototype.begin=function(e){var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._passState.viewport.width=i,this._passState.viewport.height=n,S$S(this,t,e,i,n),P$10(this,t,i,n),this._beginFunc&&this._beginFunc(e),t.depthTexture||(e.passes.depth=!0,e.passes.pick=!0,this._passState.framebuffer=this._framebufferCopyFrom),this._passState},s$T.prototype.end=function(e){e.context.depthTexture||(e.passes.depth=!1,e.passes.pick=!1),this._endFunc&&this._endFunc(e)},s$T.prototype.update=function(e,t,i){this._depthTextureToCopy=e.depthTexture?i.depthStencilTexture:this._depthTextureCopyFrom,e$2b(this._clearCommand)&&this._clearCommand.execute(e,t),e$2b(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t)},s$T.prototype.destroy=function(){return this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._depthTextureCopyFrom=this._depthTextureCopyFrom&&this._depthTextureCopyFrom.destroy(),this._framebufferCopyFrom=this._framebufferCopyFrom&&this._framebufferCopyFrom.destroy(),e$2b(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),this._depthTextureToCopy=void 0,i$10(this)},s$T.prototype.isDestroyed=function(){return!1};var e$1O={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3,getMorphTime:function(e){return e===e$1O.SCENE3D?1:e===e$1O.MORPHING?void 0:0}},C$13=Object.freeze(e$1O);function p$_(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.url",e.url);var t=e.url,i=e.responseType,n=u$_(e.method,"GET"),r=e.data,o=e.headers,a=e.overrideMimeType;t=u$_(t,e.url);var s=e$2b(e.request)?e.request:new r$1b;return s.url=t,s.requestFunction=function(e){var l=o$1l.defer(),u=p$_.load(u$_(e,t),i,n,r,o,l,a);return e$2b(u)&&e$2b(u.abort)&&(s.cancelFunction=function(){u.abort()}),l.promise},r$1a.request(s)}var j$15=/^data:(.*?)(;base64)?,(.*)$/;function h$10(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function b$1a(e,t){for(var i=h$10(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o=300)||c&&0===l.status){var e=l.response,i=l.responseType;if(!e$2b(e)||e$2b(t)&&i!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===i||"document"===i)&&e$2b(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==i&&"text"!==i||!e$2b(l.responseText)?o.reject(new t$14("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new s$_(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new s$_)},l.send(n),l}o.resolve(C$12(s,t))},p$_.defaultLoad=p$_.load;var i$X={Accept:"application/json,*/*;q=0.01"};function u$Q(e,t,i){if(!e$2b(e))throw new t$16("url is required.");e$2b(t)?e$2b(t.Accept)||((t=l$1g(t)).Accept=i$X.Accept):t=i$X;var n=u$R(e,t,i);if(e$2b(n))return n.then((function(e){return JSON.parse(e)}))}var ISERVER_BASIC=!1;function LicenseChecker(){this.urlMap=Object.create(null)}LicenseChecker.functionMap=Object.freeze({ViewShed3D:"可视域分析",SpatialQuery3D:"空间查询",ShadowQueryPoints:"阴影分析",Sightline:"通视分析",Skyline:"天际线分析",ViewDome:"开敞度分析",DirectionalLight:"平行光源",ParticleSystem:"粒子系统",Profile:"剖面分析",SpotLight:"聚光源",PointLight:"点光源",Scene_bloomEffect:"泛光",Scene_hdrEnabled:"HDR开关",Scene_scanEffect:"扫描线",Scene_addLightSource:"添加光源",S3MTilesLayer_hypsometricSetting:"分层设色",DynamicLayer3D:"动态图层",Globe_SlopeSetting:"地形坡度坡向",Globe_setPBRMaterial:"地形PBR材质",CloudBox:"云层",SkyBox:"天空盒",S3MTilesLayer_setPBRMaterial:"PBR材质",ProjectionImage:"视频投放"}),LicenseChecker.prototype.getLicense=function(e){var t,i=o$1l.defer();if(!e$2b(e)||0===e.length)return i.resolve(null),i.promise;if(t=-1!==(e=new URL(e)).href.indexOf("/iserver")?e.href.substring(0,e.href.indexOf("/iserver")+8):e.origin,e$2b(this.urlMap[t]))return i.resolve(this.urlMap[t]),i.promise;var n=this;return u$Q(t+"/manager/license.json").then((function(t){n.urlMap[e]=t,i.resolve(t)})).otherwise((function(){i.reject(null)})),i.promise},LicenseChecker.prototype.check=function(e){e$2b(e)&&(!0!==e.iServerBasic&&!0!==e.iServerBasicSpace||(e$2b(e.productType)?"iServerBasic"===e.productType&&(ISERVER_BASIC=!0):ISERVER_BASIC=!0))},LicenseChecker.prototype.isBasciServer=function(){return ISERVER_BASIC},LicenseChecker.prototype.verify=function(e){if(ISERVER_BASIC)throw e="iServerBasic版本,"+LicenseChecker.functionMap[e]+"不可用",console.warn(e),new t$16(e)},LicenseChecker.LICENSECHECKER=new LicenseChecker;var _0x539d2f=(_0x2bbcef=!0,function(e,t){var i=_0x2bbcef?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2bbcef=!1,i}),_0x362660=_0x539d2f(void 0,(function(){return _0x362660.toString().search("(((.+)+)+)+$").toString().constructor(_0x362660).search("(((.+)+)+)+$")})),_0x2bbcef;function _0x15862b(e){if(!e$2b(e))throw new t$16("scene are required.");if(!e.context.depthTexture)throw new t$16("the depth buffer is not supported.");this._scene=e,this._depthBuffer=void 0,this._depthDownBuffer=void 0,this._depthDownReverBuffer=void 0,this._depthLeftBuffer=void 0,this._depthLeftReverBuffer=void 0,this._depthTopBuffer=void 0,this._depthValue=void 0,this._dataBuffer=void 0,this._frameState=void 0,this._textureWidth=1024,this._textureHeight=1024,this._startPoint3D=[0,0,0],this._endPoint3D=[0,0,0],this._extendHeight=0,this._bManualChangeExtendHeight=!1,this._v3ProfileDir=new o$1p(0,0,0),this._v3MiddlePosition=new o$1p(0,0,0),this._v3ProfileNormal=new o$1p(0,0,0),this._viewMatrix=new p$1d,this._projMatrix=new p$1d,this._update=!0,this._visibleViewport=4095,this._id=0,this._name="",this._downName="",this._downReverName="",this._leftName="",this._leftReverName="",this._topName="",this._func=void 0,this._isGetPositions=!1,this._positions=[]}function _0x3e8607(e,t,i){var n=i.camera._projection,r=.5*(e.startPoint[2]+e.endPoint[2]),o=new o$1p;if(o.x=.5*(e.endPoint[0]-e.startPoint[0])+e.startPoint[0],o.y=.5*(e.endPoint[1]-e.startPoint[1])+e.startPoint[1],o.z=r,e._scene.mode===C$13.SCENE3D){var a=o$1p.fromDegreesArrayHeights([e.startPoint[0],e.startPoint[1],r])[0],s=o$1p.fromDegreesArrayHeights([e.endPoint[0],e.endPoint[1],r])[0];o$1p.subtract(s,a,e._v3ProfileDir),e._v3MiddlePosition=o$1p.fromDegreesArrayHeights([o.x,o.y,r])[0];var l=new o$1p;e._v3MiddlePosition.clone(l),o$1p.normalize(l,l)}else{a=n.project(a$18.fromDegrees(e.startPoint[0],e.startPoint[1],e.startPoint[2]),new o$1p),s=n.project(a$18.fromDegrees(e.endPoint[0],e.endPoint[1],e.startPoint[2]),new o$1p);o$1p.subtract(s,a,e._v3ProfileDir);var u=a$18.fromDegrees(o.x,o.y,r);e._v3MiddlePosition=n.project(u,new o$1p),e._oriPos=n.project(a$18.fromDegrees(o.x,o.y,-6378137),new o$1p);l=new o$1p;o$1p.subtract(e._v3MiddlePosition,e._oriPos,l),o$1p.normalize(l,l)}var c=new o$1p;e._v3ProfileDir.clone(c),o$1p.normalize(c,c),o$1p.cross(c,l,e._v3ProfileNormal),o$1p.normalize(e._v3ProfileNormal,e._v3ProfileNormal)}function _0x360f2b(e,t,i){e._textureWidth=t.drawingBufferWidth,e._textureHeight=t.drawingBufferHeight,e._textureWidth=e._textureWidth<=1?1:e._textureWidth,e._textureHeight=e._textureHeight<=1?1:e._textureHeight;var n=e._textureWidth*e._textureHeight;e._depthValue=new Float32Array(n),e._dataBuffer=new Uint8Array(4*n);for(var r=0;r=0&&m=0&&g=-1){var v=m+(e._textureHeight-g)*e._textureWidth;e._dataBuffer[4*v]=0,e._dataBuffer[4*v+1]=255,e._dataBuffer[4*v+2]=255,e._dataBuffer[4*v+3]=255;var y=e._depthValue[v];e._depthValue[v]=x0&&(e._dataBuffer[4*(n+f*e._textureWidth+p)]=0,e._dataBuffer[4*(n+f*e._textureWidth+p)+1]=255,e._dataBuffer[4*(n+f*e._textureWidth+p)+2]=255,e._dataBuffer[4*(n+f*e._textureWidth+p)+3]=255)}}for(t=1;t{var r={invViewProjection:o,viewProjection:a,currentFrustum:s,log2FarDepthFromNearPlusOne:l,depthData:n,useWebGPU:i.webgpu};_0x3fd0dd(e,r),t.leftOblique&&t.downOblique&&(_0x5aa7e4(e),!e._isGetPositions&&e._func(e._dataBuffer),e._isGetPositions&&e._getPositionsFunc(e._positions))}))}v.setView({destination:T,orientation:{heading:C,pitch:S,roll:v.roll},convert:!1}),v.frustum.near=y,v.frustum.far=$,v.frustum.fov=b,v.frustum.aspectRatio=w,t.depthBuffer.isUpdate=!1;for(var u=0;u8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<8)throw new t$16("the index is 0~8");return 1<0&&(this._hash={},e.length=0)},e$1N.clone=function(e,t){if(e$2b(e)){for(var i in e$2b(t)?t.removeAll():t=new e$1N,e._hash)e._hash.hasOwnProperty(i)&&t.set(i,e._hash[i]);return t}},f$X.prototype.destroy=function(){delete this._bounds,this._bounds=null,e$2b(this._command)&&(this._command.vertexArray=this._command.vertexArray&&!this._command.vertexArray.isDestroyed()&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&!this._command.shaderProgram.isDestroyed()&&this._command.shaderProgram.destroy(),this._command=null);var e=this.colorBuffer;e$2b(e)&&e.destroy(),this.colorBuffer=void 0;var t=this.heightBuffer;e$2b(t)&&t.destroy(),this.heightBuffer=void 0,this._geometry=null},f$X.updateGeometry=function(e,t,i,n){if(e$2b(e))for(var r=new n$1b,o=r.ellipsoid,a=new a$18,s=e.attributes.position,l=new o$1p,u=s.values,c=0;c0&&(e=e.substring(i)),DOMParser?(this.xmldom||(this.xmldom=new DOMParser),(t=this.xmldom).parseFromString(e,"text/xml")):(this.xmldom||(this.xmldom=new ActiveXObject("Microsoft.XMLDOM")),(t=this.xmldom).loadXML(e),t)},s$S.getElementsByTagNameNS=function(e,t,i){var n=[];if(e.getElementsByTagNameNS)n=e.getElementsByTagNameNS(t,i);else for(var r,o,a=e.getElementsByTagName("*"),s=0,l=a.length;se.right)throw new t$16("right must be greater than left.");if(e.bottom>e.top)throw new t$16("top must be greater than bottom.");if(e.near>e.far)throw new t$16("near must be greater than zero and less than far.");e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=p$1d.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}i$W.fromBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("boundingSphere is required.");e$2b(t)||(t=new i$W);var i=T$Z.length,n=t.planes;n.length=2*i;for(var r=e.center,o=e.radius,a=0,s=0;se.far)throw new t$16("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;var i=1/e.aspectRatio;t.right=.5*e.width,t.left=-t.right,t.top=i*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}l$12.prototype.computeCullingVolume=function(e,t,i){if(!e$2b(e))throw new t$16("position is required.");if(!e$2b(t))throw new t$16("direction is required.");if(!e$2b(i))throw new t$16("up is required.");var n=this._cullingVolume.planes,r=this.top,o=this.bottom,a=this.right,s=this.left,l=this.near,u=this.far,c=o$1p.cross(t,i,B$X);o$1p.normalize(c,c);var h=M$12;o$1p.multiplyByScalar(t,l,h),o$1p.add(e,h,h);var d=P$$;o$1p.multiplyByScalar(c,s,d),o$1p.add(h,d,d);var f=n[0];return e$2b(f)||(f=n[0]=new e$29),f.x=c.x,f.y=c.y,f.z=c.z,f.w=-o$1p.dot(c,d),o$1p.multiplyByScalar(c,a,d),o$1p.add(h,d,d),e$2b(f=n[1])||(f=n[1]=new e$29),f.x=-c.x,f.y=-c.y,f.z=-c.z,f.w=-o$1p.dot(o$1p.negate(c,s$R),d),o$1p.multiplyByScalar(i,o,d),o$1p.add(h,d,d),e$2b(f=n[2])||(f=n[2]=new e$29),f.x=i.x,f.y=i.y,f.z=i.z,f.w=-o$1p.dot(i,d),o$1p.multiplyByScalar(i,r,d),o$1p.add(h,d,d),e$2b(f=n[3])||(f=n[3]=new e$29),f.x=-i.x,f.y=-i.y,f.z=-i.z,f.w=-o$1p.dot(o$1p.negate(i,s$R),d),e$2b(f=n[4])||(f=n[4]=new e$29),f.x=t.x,f.y=t.y,f.z=t.z,f.w=-o$1p.dot(t,h),o$1p.multiplyByScalar(t,u,d),o$1p.add(e,d,d),e$2b(f=n[5])||(f=n[5]=new e$29),f.x=-t.x,f.y=-t.y,f.z=-t.z,f.w=-o$1p.dot(o$1p.negate(t,s$R),d),this._cullingVolume},l$12.prototype.getPixelDimensions=function(e,t,i,n,r){if(q$14(this),!e$2b(e)||!e$2b(t))throw new t$16("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new t$16("drawingBufferWidth must be greater than zero.");if(t<=0)throw new t$16("drawingBufferHeight must be greater than zero.");if(!e$2b(i))throw new t$16("distance is required.");if(!e$2b(n))throw new t$16("pixelRatio is required.");if(n<=0)throw new t$16("pixelRatio must be greater than zero.");if(!e$2b(r))throw new t$16("A result object is required.");var o=n*(this.right-this.left)/e,a=n*(this.top-this.bottom)/t;return r.x=o,r.y=a,r},l$12.prototype.clone=function(e){return e$2b(e)||(e=new l$12),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},l$12.prototype.equals=function(e){return e$2b(e)&&e instanceof l$12&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},l$12.prototype.equalsEpsilon=function(e,t,i){return e===this||e$2b(e)&&e instanceof l$12&&e$2a.equalsEpsilon(this.right,e.right,t,i)&&e$2a.equalsEpsilon(this.left,e.left,t,i)&&e$2a.equalsEpsilon(this.top,e.top,t,i)&&e$2a.equalsEpsilon(this.bottom,e.bottom,t,i)&&e$2a.equalsEpsilon(this.near,e.near,t,i)&&e$2a.equalsEpsilon(this.far,e.far,t,i)},a$V.packedLength=4,a$V.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.width,t[i++]=e.aspectRatio,t[i++]=e.near,t[i]=e.far,t},a$V.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new a$V),i.width=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t],i},Object.defineProperties(a$V.prototype,{projectionMatrix:{get:function(){return o$18(this),this._offCenterFrustum.projectionMatrix}}}),a$V.prototype.computeCullingVolume=function(e,t,i){return o$18(this),this._offCenterFrustum.computeCullingVolume(e,t,i)},a$V.prototype.getPixelDimensions=function(e,t,i,n,r){return o$18(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n,r)},a$V.prototype.clone=function(e){return e$2b(e)||(e=new a$V),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},a$V.prototype.equals=function(e){return!!(e$2b(e)&&e instanceof a$V)&&(o$18(this),o$18(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},a$V.prototype.equalsEpsilon=function(e,t,i){return!!(e$2b(e)&&e instanceof a$V)&&(o$18(this),o$18(e),e$2a.equalsEpsilon(this.width,e.width,t,i)&&e$2a.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))};var s$Q={},Z$_=new e$29(0,0,0,1),v$N=new e$29,J$W=new f$18,M$11=new o$1o,j$14=new o$1o;s$Q.wgs84ToWindowCoordinates=function(e,t,i){return s$Q.wgs84WithEyeOffsetToWindowCoordinates(e,t,o$1p.ZERO,i)};var F$11=new e$29,L$15=new o$1p;function P$_(e,t,i,n){var r=i._scene.context.curFusionViewMatrix||i.viewMatrix,o=p$1d.multiplyByVector(r,e$29.fromElements(e.x,e.y,e.z,1,F$11),F$11),a=o$1p.multiplyComponents(t,o$1p.normalize(o,L$15),L$15);return o.x+=t.x+a.x,o.y+=t.y+a.y,o.z+=a.z,p$1d.multiplyByVector(i.frustum.projectionMatrix,o,n)}var K$T=new a$18(Math.PI,e$2a.PI_OVER_TWO),Q$Z=new o$1p,X$Z=new o$1p;s$Q.wgs84WithEyeOffsetToWindowCoordinates=function(e,t,i,n){if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(t))throw new t$16("position is required.");var r=e.frameState,o=s$Q.computeActualWgs84Position(r,t,Z$_);if(e$2b(o)){var a=e.canvas,s=J$W;s.x=0,s.y=0,s.width=a.clientWidth,s.height=a.clientHeight;var l=e.camera,u=!1;if(r.mode===C$13.SCENE2D){var c=e.mapProjection,h=K$T,d=c.project(h,Q$Z),f=o$1p.clone(l.position,X$Z),p=l.frustum.clone(),_=p$1d.computeViewportTransformation(s,0,1,new p$1d),m=l.frustum.projectionMatrix,g=l.positionWC.y,x=o$1p.fromElements(e$2a.sign(g)*d.x-g,0,-l.positionWC.x),v=m$17.pointToGLWindowCoordinates(m,_,x);if(0===g||v.x<=0||v.x>=a.clientWidth)u=!0;else{if(v.x>.5*a.clientWidth){s.width=v.x,l.frustum.right=d.x-g,v$N=P$_(o,i,l,v$N),s$Q.clipToGLWindowCoordinates(s,v$N,M$11),s.x+=v.x,l.position.x=-l.position.x;var y=l.frustum.right;l.frustum.right=-l.frustum.left,l.frustum.left=-y,v$N=P$_(o,i,l,v$N),s$Q.clipToGLWindowCoordinates(s,v$N,j$14)}else{s.x+=v.x,s.width-=v.x,l.frustum.left=-d.x-g,v$N=P$_(o,i,l,v$N),s$Q.clipToGLWindowCoordinates(s,v$N,M$11),s.x=s.x-s.width,l.position.x=-l.position.x;var $=l.frustum.left;l.frustum.left=-l.frustum.right,l.frustum.right=-$,v$N=P$_(o,i,l,v$N),s$Q.clipToGLWindowCoordinates(s,v$N,j$14)}o$1p.clone(f,l.position),l.frustum=p.clone(),((n=o$1o.clone(M$11,n)).x<0||n.x>a.clientWidth)&&(n.x=j$14.x)}}if(r.mode!==C$13.SCENE2D||u){if((v$N=P$_(o,i,l,v$N)).z<0&&!(l.frustum instanceof a$V)&&!(l.frustum instanceof l$12))return;n=s$Q.clipToGLWindowCoordinates(s,v$N,n)}return n.y=a.clientHeight-n.y,n}},s$Q.wgs84ToDrawingBufferCoordinates=function(e,t,i){if(e$2b(i=s$Q.wgs84ToWindowCoordinates(e,t,i)))return s$Q.transformWindowToDrawingBuffer(e,i,i)};var h$$=new o$1p,Y$P=new a$18;s$Q.computeActualWgs84Position=function(e,t,i){var n=e.mode;if(n===C$13.SCENE3D)return o$1p.clone(t,i);var r=e.mapProjection,o=r.ellipsoid.cartesianToCartographic(t,Y$P);if(e$2b(o)){if(r.project(o,h$$),n===C$13.COLUMBUS_VIEW)return o$1p.fromElements(h$$.z,h$$.x,h$$.y,i);if(n===C$13.SCENE2D)return o$1p.fromElements(0,h$$.x,h$$.y,i);var a=e.morphTime;return o$1p.fromElements(e$2a.lerp(h$$.z,t.x,a),e$2a.lerp(h$$.x,t.y,a),e$2a.lerp(h$$.y,t.z,a),i)}};var O$K=new o$1p,N$V=new o$1p,_$T=new p$1d;s$Q.clipToGLWindowCoordinates=function(e,t,i){return o$1p.divideByScalar(t,t.w,O$K),p$1d.computeViewportTransformation(e,0,1,_$T),p$1d.multiplyByPoint(_$T,O$K,N$V),o$1o.fromCartesian3(N$V,i)},s$Q.transformWindowToDrawingBuffer=function(e,t,i){var n=e.canvas,r=e.drawingBufferWidth/n.clientWidth,o=e.drawingBufferHeight/n.clientHeight;return o$1o.fromElements(t.x*r,t.y*o,i)};var $$$=new e$29,G$18=new e$29;s$Q.drawingBufferToWgs84Coordinates=function(e,t,i,n){var r=e.context,o=r.uniformState,a=o.currentFrustum,s=a.x,l=a.y;if(e.frameState.useLogDepth){var u=i*o.log2FarDepthFromNearPlusOne;i=l*(1-s/(Math.pow(2,u)-1+s))/(l-s)}var c=e._view.passState.viewport,h=e$29.clone(e$29.UNIT_W,$$$);h.x=(t.x-c.x)/c.width*2-1,h.y=(t.y-c.y)/c.height*2-1,r.webgpu?h.z=i:h.z=2*i-1,h.w=1;var d,f=e.camera.frustum;if(e$2b(f.fovy)){var p=1/(d=p$1d.multiplyByVector(o.inverseViewProjection,h,G$18)).w;o$1p.multiplyByScalar(d,p,d)}else e$2b(f._offCenterFrustum)&&(f=f._offCenterFrustum),(d=G$18).x=.5*(h.x*(f.right-f.left)+f.left+f.right),d.y=.5*(h.y*(f.top-f.bottom)+f.bottom+f.top),d.z=.5*(h.z*(s-l)-s-l),d.w=1,d=p$1d.multiplyByVector(o.inverseView,d,d);return d.x+=r.relativeOrigin.x,d.y+=r.relativeOrigin.y,d.z+=r.relativeOrigin.z,o$1p.fromCartesian4(d,n)},s$Q.convert2DToCartesian=function(e,t){if(t){var i=t.x,n=t.y;i>20037508.342789244&&(i-=20037508.342789244*Math.floor(i/20037508.342789244)),n>10018754.171394622&&(n-=20037508.342789244*Math.floor((n+10018754.171394622)/20037508.342789244)),t.x=i,t.y=n}var r=e.mapProjection,o=r.ellipsoid,a=new o$1p,s=new a$18,l=r.unproject(t,s);return o.cartographicToCartesian(l,a),a};var _0x10762d=(_0x4394fc=!0,function(e,t){var i=_0x4394fc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4394fc=!1,i}),_0x1a8e32=_0x10762d(void 0,(function(){return _0x1a8e32.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a8e32).search("(((.+)+)+)+$")})),_0x4394fc;function _0x3065eb(e){if(!e$2b(e))throw new t$16("scene are required.");if(!e.context.depthTexture)throw new t$16("the depth buffer is not supported.");this._scene=e,this._cameraDepthBuffer=void 0,this._clearStencilCommand=new t$X({stencil:0}),this._clearStencilCommand.pass=Le$s.ANALYSIS,this._lineCommand=void 0,this._stencilCommand=void 0,this._colorCommand=void 0,this._boundingSphere=new i$1c,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._roll=0,this._horizontalFov=90,this._verticalFov=60,this._distance=200,this._hintLineColor=new e$29(1,1,1,1),this._hintLineVisible=!0,this._texture=void 0,this._segmentCount=20,this._invertViewMatrix=new p$1d,this._viewProjMatrix=new p$1d,this._renderTextureMatrix=new p$1d,this._update=!0,this._id=0,this._name="",this._cameraName="",this._visibleViewport=4095,this._video=void 0,this._hasExcavation=!1,this._polygonTexture=void 0,this._polygonRegions=new e$1N,this._polygonTextureMatrix=new p$1d,this._polygonViewProjMatrix=new p$1d,this._polygonUpdate=!1,this._polygonMode=_0x25a093.CLIP_OUTSIDE,this._brightness=1,this._contrast=1,this._hue=0,this._saturation=1,this._gamma=1,this._featheringScale=0,this._v3AffineX=new o$1p(1,0,0),this._v3AffineY=new o$1p(0,1,0),this._visible=!0,this._boundingSphereFromXML=void 0,this._visibleDistanceMax=500,this._mode=_0x23afcf.ProjectToScene,this._planeRegions=void 0,this._projectEvent=new o$1h,this._projectPlaneOffset=1,this._guid=e$1Q(),this._fusionAlpha=1,this._minDepth=.9999}function _0x476352(e){e$2b(e._stencilCommand)&&(e._stencilCommand.vertexArray=e._stencilCommand.vertexArray&&e._stencilCommand.vertexArray.destroy(),e._stencilCommand.shaderProgram=e._stencilCommand.shaderProgram&&e._stencilCommand.shaderProgram.destroy(),e._stencilCommand=void 0),e$2b(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),e$2b(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0),e$2b(e._planeCommand)&&(e._planeCommand.vertexArray=e._planeCommand.vertexArray&&e._planeCommand.vertexArray.destroy(),e._planeCommand.shaderProgram=e._planeCommand.shaderProgram&&e._planeCommand.shaderProgram.destroy(),e._planeCommand=void 0)}function _0x157bd9(e,t,i){var n=e._horizontalFov*e$2a.RADIANS_PER_DEGREE,r=e._verticalFov*e$2a.RADIANS_PER_DEGREE,o=Math.tan(.5*n)/Math.tan(.5*r);e._distance;var a=Math.max(e._distance,10),s=e._direction*e$2a.RADIANS_PER_DEGREE,l=e._pitch*e$2a.RADIANS_PER_DEGREE,u=e._roll*e$2a.RADIANS_PER_DEGREE,c=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0],h=i.camera,d=h.frustum.aspectRatio,f=h.frustum.fov,p=h.frustum.near,_=h.frustum.far,m=new o$1p,g=h.heading,x=h.pitch,v=h.roll;o$1p.clone(h.position,m),e._cameraDepthBuffer.isUpdate=!0;var y=i.useLogDepth;e._cameraDepthBuffer._beginFunc=function(){i.useLogDepth=!1,d=h.frustum.aspectRatio,f=h.frustum.fov,p=h.frustum.near,_=h.frustum.far,g=h.heading,x=h.pitch,v=h.roll,o$1p.clone(h.position,m),h.frustum.aspectRatio=o,h.frustum.fov=o>=1?n:r,h.frustum.near=1,h.frustum.far=a,y&&(h.frustum.near=.1,h.frustum.far=1e8),h.setView({destination:c,orientation:{heading:s,pitch:l,roll:u}}),p$1d.multiply(h.frustum.projectionMatrix,h.viewMatrix,e._viewProjMatrix),p$1d.clone(h.inverseViewMatrix,e._invertViewMatrix),o$1p.clone(o$1p.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,i$1c.transform(e._boundingSphere,e._invertViewMatrix,e._boundingSphere)},e._cameraDepthBuffer._endFunc=function(){h.setView({destination:m,orientation:{heading:g,pitch:x,roll:v},convert:!1}),h.frustum.aspectRatio=d,h.frustum.fov=f,h.frustum.near=p,h.frustum.far=_,i.useLogDepth=y,e._cameraDepthBuffer.isUpdate=!1}}_0x1a8e32(),Object.defineProperties(_0x3065eb.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},roll:{get:function(){return this._roll},set:function(e){this._roll=e,this._update=!0}},horizontalFov:{get:function(){return this._horizontalFov},set:function(e){this._horizontalFov=e,this._update=!0}},verticalFov:{get:function(){return this._verticalFov},set:function(e){this._verticalFov=e,this._update=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$16("the distance is greater than 0.0");this._distance=e,this._update=!0}},featheringScale:{get:function(){return this._featheringScale},set:function(e){if(e<0||e>1)throw new t$16("the distance is greater than 0.0 an less than 1.0");this._featheringScale=e}},hintLineColor:{get:function(){var e=new e$1U;return e.red=this._hintLineColor.x,e.green=this._hintLineColor.y,e.blue=this._hintLineColor.z,e.alpha=this._hintLineColor.w,e},set:function(e){this._hintLineColor.x=e.red,this._hintLineColor.y=e.green,this._hintLineColor.z=e.blue,this._hintLineColor.w=e.alpha}},hintLineVisible:{get:function(){return this._hintLineVisible},set:function(e){this._hintLineVisible=e}},brightness:{get:function(){return this._brightness},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.brightness",e,0),this._brightness=e}},contrast:{get:function(){return this._contrast},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.contrast",e,0),this._contrast=e}},hue:{get:function(){return this._hue},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.hue",e,0),this._hue=e}},saturation:{get:function(){return this._saturation},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.saturation",e,0),this._saturation=e}},gamma:{get:function(){return this._gamma},set:function(e){o$1q.typeOf.number.greaterThan("ProjectionImage.gamma",e,0),this._gamma=e}},visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("ProjectionImage.visible",e),this._visible=e}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){o$1q.typeOf.number("ProjectionImage.visibleDistance",e),this._visibleDistanceMax=e}},mode:{get:function(){return this._mode},set:function(e){this._mode=e}},projectEvent:{get:function(){return this._projectEvent}},fusionAlpha:{get:function(){return this._fusionAlpha},set:function(e){this._fusionAlpha=e}}});var _0x478721=new e$29,_0x3e2ac7=new e$29(1,1/255,1/65025,1/16581375);function _0x3afe00(e,t,i,n,r,o){var a=t.context.readPixels({x:i,y:n,width:1,height:1,framebuffer:e._cameraDepthBuffer._framebuffer}),s=e$29.unpack(a,0,_0x478721);e$29.divideByScalar(s,255,s);var l=e$29.dot(s,_0x3e2ac7);0!==l?e._minDepth=Math.min(e._minDepth,l):l=e._minDepth;var u=new e$29(r,o,2*l-1,1),c=new e$29,h=p$1d.inverse(e._viewProjMatrix,new p$1d),d=p$1d.multiplyByVector(h,u,c),f=1/d.w;return o$1p.multiplyByScalar(d,f,d)}function _0x1f4b4f(e,t){var i=e._scene,n=i.screenSpaceCameraController;n.enableFusion||(n.enableFusion=!0),e$2b(t.curFusionViewMatrix)||(t.curFusionViewMatrix=p$1d.clone(t.uniformState.view,new p$1d));var r=_0x3afe00(e,i,0,0,-1,-1),o=_0x3afe00(e,i,i.drawingBufferWidth-1,0,1,-1),a=_0x3afe00(e,i,i.drawingBufferWidth-1,i.drawingBufferHeight-1,1,1),s=_0x3afe00(e,i,0,i.drawingBufferHeight-1,-1,1);if(s$Q.wgs84ToDrawingBufferCoordinates(i,r,r),s$Q.wgs84ToDrawingBufferCoordinates(i,o,o),s$Q.wgs84ToDrawingBufferCoordinates(i,a,a),s$Q.wgs84ToDrawingBufferCoordinates(i,s,s),e$2b(r)&&e$2b(o)&&e$2b(a)&&e$2b(s)){e$2b(n.panOffset)&&(r.x+=n.panOffset.x,o.x+=n.panOffset.x,a.x+=n.panOffset.x,s.x+=n.panOffset.x,r.y+=n.panOffset.y,o.y+=n.panOffset.y,a.y+=n.panOffset.y,s.y+=n.panOffset.y),n.zoomDirty=!1,n.panDirty=!1;for(var l=[r.x,r.y,o.x,o.y,a.x,a.y,s.x,s.y],u=i.drawingBufferWidth,c=i.drawingBufferHeight,h=0,d=l.length;hi||e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC).computeVisibility(t)===Ae$u.OUTSIDE}function _0x26954a(e){var t=s$S.queryStringValue(e,"VideoName"),i=s$S.queryFirstNode(e,"Fov"),n=s$S.queryNumericValue(i,"Horizontal"),r=s$S.queryNumericValue(i,"Vertical"),o=s$S.queryNumericValue(e,"Distance"),a=s$S.queryNumericValue(e,"Heading"),s=s$S.queryNumericValue(e,"Pitch"),l=s$S.queryNumericValue(e,"Roll"),u=s$S.queryFirstNode(e,"ViewPosition"),c=[0,0,0];c[0]=s$S.queryNumericValue(u,"X"),c[1]=s$S.queryNumericValue(u,"Y"),c[2]=s$S.queryNumericValue(u,"Z");var h=s$S.queryFirstNode(e,"Matrix"),d=s$S.queryStringValue(h,"U"),f=s$S.queryStringValue(h,"V");s$S.queryStringValue(h,"W");var p=d.split(","),_=new o$1p(parseFloat(p[0]),parseFloat(p[1]),parseFloat(p[2])),m=f.split(","),g=new o$1p(parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])),x=s$S.queryFirstNode(e,"Bounds"),v=void 0;if(x){var y=e$2a.toRadians(s$S.queryNumericValue(x,"Left")),$=e$2a.toRadians(s$S.queryNumericValue(x,"Top")),b=e$2a.toRadians(s$S.queryNumericValue(x,"Right")),T=new h$18(y,e$2a.toRadians(s$S.queryNumericValue(x,"Bottom")),b,$),C=o*Math.cos(e$2a.toRadians(s));C=s<0?-C:C;var S=c[2]+C;v=i$1c.fromRectangle3D(T,void 0,S)}return{videoName:t,viewPosition:c,heading:a,pitch:s,roll:l,horizontalFov:n,verticalFov:r,matrixU:_,matrixV:g,distance:o,boundingSphere:v}}function _0x5828c1(e,t){var i=document.getElementById("projection-image");e$2b(i)||((i=document.createElement("div")).setAttribute("id","projection-image"),document.body.appendChild(i));var n=document.createElement("video");return n.style="visibility:hidden;position:absolute;top:0px;left:0px;",n.setAttribute("width","320"),n.setAttribute("height","240"),n.setAttribute("autoplay","autoplay"),n.setAttribute("loop","loop"),n.setAttribute("crossorigin","crossorigin"),n.setAttribute("src",e),n.setAttribute("id","projection-image-"+t),i.appendChild(n),n}function _0x21843f(e,t){for(var i=o$1p.fromDegreesArrayHeights(t),n=new z$_({polygonHierarchy:{positions:i},vertexFormat:{bitangent:!1,color:!1,normal:!1,position:!0,st:!1,tangent:!1},perPositionHeight:!0}),r=z$_.createGeometry(n),o=[],a=1;a=0&&r.defines.splice(a,1),e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=r$13.fromCache({name:n,context:i,vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:e._attributeLocations})}}function p$Z(){if(!e$2b(i$V._canTransferArrayBuffer)){var e=new Worker(w$T("Workers/transferTypedArrayTest.js"));e.postMessage=u$_(e.webkitPostMessage,e.postMessage);var t=new Int8Array([99]);try{e.postMessage({array:t},[t.buffer])}catch{return i$V._canTransferArrayBuffer=!1,i$V._canTransferArrayBuffer}var i=o$1l.defer();e.onmessage=function(t){var n=t.data.array,r=e$2b(n)&&99===n[0];i.resolve(r),e.terminate(),i$V._canTransferArrayBuffer=r},i$V._canTransferArrayBuffer=i.promise}return i$V._canTransferArrayBuffer}_0x3065eb.prototype.update=function(e,t,i){if(!t._fboState.enabled&&this._visible){var n=t.camera;if(!n.bReflect&&(!e$2b(this._boundingSphereFromXML)||!_0xaba1a4(n,this._boundingSphereFromXML,this._visibleDistanceMax))&&(0===this._boundingSphere.radius||this._update||!_0xaba1a4(n,this._boundingSphere,this._visibleDistanceMax))&&(p$1d.multiply(this._viewProjMatrix,n.inverseViewMatrix,this._renderTextureMatrix),p$1d.multiply(this._polygonViewProjMatrix,n.inverseViewMatrix,this._polygonTextureMatrix),e$2b(this._video)&&this._video.readyState>=2&&(e$2b(this._texture)&&this._texture!==e.defaultTexture?this._texture.copyFrom(this._video):this._texture=new t$V({context:e,source:this._video})),e$2b(this._texture))){var r=this._scene;if(this._update&&(this._frameState=t,e$2b(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new s$T(e),this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),this._update=!1,_0x476352(this),_0x157bd9(this,e,t),_0x2e71f2(this,e)),this._polygonUpdate&&_0x440625(this,e),e$2b(this._cameraDepthBuffer.depthTexture)){if(!e$2b(this._planeCommand)&&this._mode===_0x23afcf.ProjectToPlane&&(_0x1f4b4f(this,e),e$2b(this._fusionLayers)&&this._fusionLayers.length>0))for(var o=0,a=this._fusionLayers.length;o8)throw new t$16("the index is 0~3");this._visibleViewport=t?1<8)throw new t$16("the index is 0~3");return 1<=1&&(p=Math.abs(o$1p.dot(f,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,p):o$1p.clone(o$1p.UNIT_Z,p));var _=new o$1p;o$1p.cross(p,f,_),_=o$1p.normalize(_,_),o$1p.cross(f,_,p),p=o$1p.normalize(p,p),l.setView({destination:i,orientation:{direction:f,up:p},convert:!1}),this.direction=l.heading*e$2a.DEGREES_PER_RADIAN,this.pitch=l.pitch*e$2a.DEGREES_PER_RADIAN,l.setView({destination:d,orientation:{heading:u,pitch:c,roll:h},convert:!1})},_0x3065eb.prototype.pixelToWorldCoordinates=function(e,t){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");var i=this._scene.context,n=this._texture.width,r=this._texture.height,o=e/n*i.drawingBufferWidth,a=i.drawingBufferHeight-t/r*i.drawingBufferHeight;i.drawingBufferHeight;var s=i.readPixels({x:o,y:a,width:1,height:1,framebuffer:this._cameraDepthBuffer.framebuffer}),l=e$29.unpack(s,0,_0x478721);e$29.divideByScalar(l,255,l);var u=e$29.dot(l,_0x3e2ac7),c=p$1d.inverse(this._viewProjMatrix,new p$1d),h=new e$29,d=this._scene._view.passState.viewport;h.x=(o-d.x)/d.width*2-1,h.y=(a-d.y)/d.height*2-1,i.webgpu?h.z=u:h.z=2*u-1,h.w=1;var f=p$1d.multiplyByVector(c,h,new e$29);n=1/f.w;return o$1p.multiplyByScalar(f,n,f),o$1p.fromCartesian4(f,new o$1p)},_0x3065eb.prototype.pixelToWorldCoordinates=function(e,t){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");var i=this._scene.context,n=this._texture.width,r=this._texture.height,o=e/n*i.drawingBufferWidth,a=i.drawingBufferHeight-t/r*i.drawingBufferHeight,s=this;return i.readPixelsAsync({x:o,y:a,width:1,height:1,framebuffer:s._cameraDepthBuffer.framebuffer}).then((e=>{var t=e$29.unpack(e,0,_0x478721);e$29.divideByScalar(t,255,t);var n=e$29.dot(t,_0x3e2ac7),r=p$1d.inverse(s._viewProjMatrix,new p$1d),l=new e$29,u=s._scene._view.passState.viewport;l.x=(o-u.x)/u.width*2-1,l.y=(a-u.y)/u.height*2-1,i.webgpu?l.z=n:l.z=2*n-1,l.w=1;var c=p$1d.multiplyByVector(r,l,new e$29),h=1/c.w;o$1p.multiplyByScalar(c,h,c),Promise.resolve(o$1p.fromCartesian4(c,new o$1p))}))},_0x3065eb.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),""===this._name&&(this._name="projectionimage"+this._scene._analyst3D._layerIndex,this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},_0x3065eb.prototype.setInfo=function(e){if(LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),!e$2b(e))throw new t$16("No url provided.");var t=this;return d$1f(e).then((function(e){var i=_0x26954a(e.firstChild);t.direction=i.heading,t.pitch=u$_(i.pitch,t.pitch),t._roll=u$_(i.roll,t._roll),t.horizontalFov=i.horizontalFov,t.verticalFov=i.verticalFov,o$1p.clone(i.matrixU,t._v3AffineX),o$1p.clone(i.matrixV,t._v3AffineY),t.distance=i.distance,t.viewPosition=i.viewPosition,t._boundingSphereFromXML=i.boundingSphere})).otherwise((function(e){console.error(e)}))},_0x3065eb.fromInfo=function(e,t,i){if(!e$2b(e))throw new t$16("No scene provided.");if(!e$2b(t))throw new t$16("No url provided.");return d$1f(t).then((function(n){for(var r={},o=n.firstChild,a=0,s=o.children.length;a=this._maximumActiveTasks)return;++this._activeIndexedDBTasks}else{if(this._activeTasks>=this._maximumActiveTasks)return;"websocketTaskProcessor"!=this._workerName&&++this._activeTasks}var i=this;return o$1l(p$Z(),(function(n){e$2b(t)?n||(t.length=0):t=D$Y;var r=i._nextID++,o=o$1l.defer();return i._deferreds[r]=o,i._worker.postMessage({id:r,parameters:e,canTransferArrayBuffer:n},t),o.promise}))},i$V.prototype.initWebAssemblyModule=function(e){e$2b(this._worker)||(this._worker=h$_(this));var t=o$1l.defer(),i=this,n=this._worker;return P$Z(this,e).then((function(e){return o$1l(p$Z(),(function(r){var o,a=e.wasmBinary;e$2b(a)&&r&&(o=[a]),n.onmessage=function(e){n.onmessage=function(e){v$M(i,e.data)},t.resolve(e.data)},n.postMessage({webAssemblyConfig:e},o)}))})),t},i$V.prototype.isDestroyed=function(){return!1},i$V.prototype.destroy=function(){return e$2b(this._worker)&&this._worker.terminate(),i$10(this)},i$V.taskCompletedEvent=c$11,i$V._defaultWorkerModulePrefix="Workers/",i$V._workerModulePrefix=i$V._defaultWorkerModulePrefix,i$V._canTransferArrayBuffer=void 0;var _0x4f2eef=(_0x34cc5b=!0,function(e,t){var i=_0x34cc5b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x34cc5b=!1,i}),_0x500ec9=_0x4f2eef(void 0,(function(){return _0x500ec9.toString().search("(((.+)+)+)+$").toString().constructor(_0x500ec9).search("(((.+)+)+)+$")})),_0x34cc5b;_0x500ec9();var _0x26c9cf="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nattribute vec2 offset;\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying vec2 vOffset;\n\nfloat computerOnePixelLength(vec4 viewPos)\n{\n vec4 winPos = czm_projection * viewPos;\n float dwidth = czm_metersPerPixel(viewPos);\n winPos.x = winPos.x - 2.0 * dwidth;\n vec4 newViewPos = czm_inverseProjection * winPos;\n return length(viewPos - newViewPos);\n}\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n float radius = 10.0;\n vec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n viewPos.xy = viewPos.xy + offset * computerOnePixelLength(viewPos) * radius;\n gl_Position = czm_projection * viewPos;\n vTexCoord = aTexCoord0.xy;\n vOffset = offset;\n //clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n}",_0x323fd7=(_0x239c3b=!0,function(e,t){var i=_0x239c3b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x239c3b=!1,i}),_0x44c61b=_0x323fd7(void 0,(function(){return _0x44c61b.toString().search("(((.+)+)+)+$").toString().constructor(_0x44c61b).search("(((.+)+)+)+$")})),_0x239c3b;_0x44c61b();var _0x4e4501="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uTexture0;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying vec2 vOffset;\n\nfloat fade(in float low, in float high, in float value)\n{\n\tfloat mid = (low + high) * 0.5;\n\tfloat range = (high - low) * 0.5;\n\tfloat x = 1.0 - clamp(abs(mid - value) / range, 0.0, 1.0);\n\treturn x;\n}\n\nvec3 getColor(in float intensity)\n{\n\tvec3 blue = vec3(0.0, 0.0, 1.0);\n\tvec3 cyan = vec3(0.0, 1.0, 1.0);\n\tvec3 green = vec3(0.0, 1.0, 0.0);\n\tvec3 yellow = vec3(1.0, 1.0, 0.0);\n\tvec3 red = vec3(1.0, 0.0, 0.0);\n\tvec3 color = fade(-0.25, 0.25, intensity) * blue + fade(0.0, 0.5, intensity) * cyan + fade(0.25, 0.75, intensity) * green + \n\t\t\t\tfade(0.5, 1.0, intensity) * yellow + smoothstep(0.75, 1.0, intensity) * red;\n\treturn color;\n}\n#ifdef COLOR_TABLE\nuniform sampler2D uHypsometricTexture;\nvec4 getContourMapColor(in float intensity){\n float count = floor(intensity * 16.0);\n float y = (count * 2.0 + 1.0) / 32.0;\n float x = fract(intensity * 16.0);\n return texture2D(uHypsometricTexture, vec2(x, y));\n}\n#endif\n\nvoid main()\n{\n\tvec2 texcoord = vTexCoord.xy * 0.5 + 0.5;\n\tfloat fIntensity = czm_unpackDepth(texture2D(uTexture0, texcoord.xy));\n float dist = 1.0 - length(vOffset);\n\tif(dist < 0.5)\n\t{\n\t\tdiscard;\n\t}\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef COLOR_TABLE\n\tgl_FragColor = getContourMapColor(fIntensity);\n#else\n\tgl_FragColor = vec4(getColor(fIntensity), 1.0);\n#endif\n}",_0x1f2427=(_0x5b70bd=!0,function(e,t){var i=_0x5b70bd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b70bd=!1,i}),_0x5592b7=_0x1f2427(void 0,(function(){return _0x5592b7.toString().search("(((.+)+)+)+$").toString().constructor(_0x5592b7).search("(((.+)+)+)+$")})),_0x5b70bd;_0x5592b7();var _0x2328b4="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nattribute vec2 offset;\n\nvarying vec4 vPositionEC;\nvarying vec2 vTexcoord;\n\nfloat computerOnePixelLength(vec4 viewPos)\n{\n vec4 winPos = czm_projection * viewPos;\n float dwidth = czm_metersPerPixel(viewPos);\n winPos.x = winPos.x - 2.0 * dwidth;\n vec4 newViewPos = czm_inverseProjection * winPos;\n return length(viewPos - newViewPos);\n}\n\nvoid main()\n{\n\tvTexcoord = aTexCoord0.xy * 0.5 + 0.5;\n\t//vTexcoord.y = 1.0 - vTexcoord.y;\n\tvPositionEC = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec2 pixelLength = 1.0 / czm_viewport.zw;\n\tgl_Position = vec4(aTexCoord0.xy + pixelLength * offset * 4.0, 0.5, 1.0);\n}",_0x2c47d8=(_0x5c0ac6=!0,function(e,t){var i=_0x5c0ac6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c0ac6=!1,i}),_0x24540e=_0x2c47d8(void 0,(function(){return _0x24540e.toString().search("(((.+)+)+)+$").toString().constructor(_0x24540e).search("(((.+)+)+)+$")})),_0x5c0ac6;_0x24540e();var _0x485098="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform float uSpacing;\nuniform sampler2D shadowMap_texture;\nuniform sampler2D uAssisTexture;\n\nvarying vec4 vPositionEC;\nvarying vec2 vTexcoord;\n\n#define inline\nfloat sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture2D(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\n\n\n#define inline\nfloat shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, sampleShadowMap(shadowMap, uv));\n}\n\nvoid main()\n{\n\tgl_FragColor = texture2D(uAssisTexture, vTexcoord);\n\tvec4 positionEC = vPositionEC;\n\tfloat depth = -positionEC.z;\n\tvec4 weights = czm_cascadeWeights(depth);\n\tvec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;\n\tfloat visibility = shadowDepthCompare(shadowMap_texture, shadowPosition.xy, shadowPosition.z);\n\tif(visibility < 0.001)\n\t{\n\t\treturn;\n\t}\n\tif(depth > shadowMap_cascadeSplits[1].w)\n\t{\n\t\treturn;\n\t}\n\tfloat oldIntensity = czm_unpackDepth(gl_FragColor);\n\tfloat intensity = oldIntensity + uSpacing;\n\tintensity = clamp(intensity, 0.0, 0.9999);\n\tgl_FragColor = czm_packDepth(intensity);\n}",B$W=new o$1p;function o$17(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).minimum,i=e.maximum;if(o$1q.typeOf.object("min",t),o$1q.typeOf.object("max",i),e$2b(e.offsetAttribute)&&e.offsetAttribute===_0x58701d.TOP)throw new t$16("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=o$1p.clone(t),this._max=o$1p.clone(i),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}o$17.fromDimensions=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).dimensions;o$1q.typeOf.object("dimensions",t),o$1q.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=o$1p.multiplyByScalar(t,.5,new o$1p);return new o$17({minimum:o$1p.negate(i,new o$1p),maximum:i,offsetAttribute:e.offsetAttribute})},o$17.fromAxisAlignedBoundingBox=function(e){return o$1q.typeOf.object("boundindBox",e),new o$17({minimum:e.minimum,maximum:e.maximum})},o$17.packedLength=2*o$1p.packedLength+1,o$17.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),o$1p.pack(e._min,t,i),o$1p.pack(e._max,t,i+o$1p.packedLength),t[i+2*o$1p.packedLength]=u$_(e._offsetAttribute,-1),t};var y$U=new o$1p,A$16=new o$1p,v$L={minimum:y$U,maximum:A$16,offsetAttribute:void 0};function o$16(e,t,i,n){e=u$_(e,1),t=u$_(t,1),i=u$_(i,1),n=u$_(n,1),this.value=new Uint8Array([e$1U.floatToByte(e),e$1U.floatToByte(t),e$1U.floatToByte(i),e$1U.floatToByte(n)])}function l$11(e){e=u$_(e,u$_.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=u$_(e.near,1),this._near=this.near,this.far=u$_(e.far,5e8),this._far=this.far,this._cullingVolume=new i$W,this._perspectiveMatrix=new p$1d,this._infinitePerspective=new p$1d}function z$U(e){if(!(e$2b(e.right)&&e$2b(e.left)&&e$2b(e.top)&&e$2b(e.bottom)&&e$2b(e.near)&&e$2b(e.far)))throw new t$16("right, left, top, bottom, near, or far parameters are not set.");var t=e.top,i=e.bottom,n=e.right,r=e.left,o=e.near,a=e.far;if(t!==e._top||i!==e._bottom||r!==e._left||n!==e._right||o!==e._near||a!==e._far){if(e.near<=0||e.near>e.far)throw new t$16("near must be greater than zero and less than far.");e._left=r,e._right=n,e._top=t,e._bottom=i,e._near=o,e._far=a,e._perspectiveMatrix=p$1d.computePerspectiveOffCenter(r,n,i,t,o,a,e._perspectiveMatrix),e._infinitePerspective=p$1d.computeInfinitePerspectiveOffCenter(r,n,i,t,o,e._infinitePerspective)}}o$17.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=o$1p.unpack(e,t,y$U),r=o$1p.unpack(e,t+o$1p.packedLength,A$16),o=e[t+2*o$1p.packedLength];return e$2b(i)?(i._min=o$1p.clone(n,i._min),i._max=o$1p.clone(r,i._max),i._offsetAttribute=-1===o?void 0:o,i):(v$L.offsetAttribute=-1===o?void 0:o,new o$17(v$L))},o$17.createGeometry=function(e){var t=e._min,i=e._max;if(!o$1p.equals(t,i)){var n=new a$_,r=new Uint16Array(24),o=new Float64Array(24);o[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=i.x,o[4]=t.y,o[5]=t.z,o[6]=i.x,o[7]=i.y,o[8]=t.z,o[9]=t.x,o[10]=i.y,o[11]=t.z,o[12]=t.x,o[13]=t.y,o[14]=i.z,o[15]=i.x,o[16]=t.y,o[17]=i.z,o[18]=i.x,o[19]=i.y,o[20]=i.z,o[21]=t.x,o[22]=i.y,o[23]=i.z,n.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:o}),r[0]=4,r[1]=5,r[2]=5,r[3]=6,r[4]=6,r[5]=7,r[6]=7,r[7]=4,r[8]=0,r[9]=1,r[10]=1,r[11]=2,r[12]=2,r[13]=3,r[14]=3,r[15]=0,r[16]=0,r[17]=4,r[18]=1,r[19]=5,r[20]=2,r[21]=6,r[22]=3,r[23]=7;var a=o$1p.subtract(i,t,B$W),s=.5*o$1p.magnitude(a);if(e$2b(e._offsetAttribute)){var l=o.length,u=new Uint8Array(l/3);d$1s(u,e._offsetAttribute===_0x58701d.NONE?0:1),n.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return new I$1p({attributes:n,indices:r,primitiveType:W$18.LINES,boundingSphere:new i$1c(o$1p.ZERO,s),offsetAttribute:e._offsetAttribute})}},Object.defineProperties(o$16.prototype,{componentDatatype:{get:function(){return S$12.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}}),o$16.fromColor=function(e){if(!e$2b(e))throw new t$16("color is required.");return new o$16(e.red,e.green,e.blue,e.alpha)},o$16.toValue=function(e,t){if(!e$2b(e))throw new t$16("color is required.");return e$2b(t)?e.toBytes(t):new Uint8Array(e.toBytes())},o$16.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]},Object.defineProperties(l$11.prototype,{projectionMatrix:{get:function(){return z$U(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return z$U(this),this._infinitePerspective}}});var B$V=new o$1p,O$J=new o$1p,S$R=new o$1p,V$S=new o$1p;function o$15(e){e=u$_(e,u$_.EMPTY_OBJECT),this._offCenterFrustum=new l$11,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=u$_(e.near,1),this._near=this.near,this.far=u$_(e.far,5e8),this._far=this.far,this.xOffset=u$_(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=u$_(e.yOffset,0),this._yOffset=this.yOffset,this.reflect=!1}function f$W(e){if(!(e$2b(e.fov)&&e$2b(e.aspectRatio)&&e$2b(e.near)&&e$2b(e.far)))throw new t$16("fov, aspectRatio, near, or far parameters are not set.");var t=e._offCenterFrustum;if(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset){if(e.fov<0||e.fov>=Math.PI)throw new t$16("fov must be in the range [0, PI).");if(e.aspectRatio<0)throw new t$16("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new t$16("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset}}l$11.prototype.resetProjectionMatrix=function(){if(!(e$2b(this.right)&&e$2b(this.left)&&e$2b(this.top)&&e$2b(this.bottom)&&e$2b(this.near)&&e$2b(this.far)))throw new t$16("right, left, top, bottom, near, or far parameters are not set.");var e=this.top,t=this.bottom,i=this.right,n=this.left,r=this.near,o=this.far;if(this.near<=0||this.near>this.far)throw new t$16("near must be greater than zero and less than far.");this._left=n,this._right=i,this._top=e,this._bottom=t,this._near=r,this._far=o,this._perspectiveMatrix=p$1d.computePerspectiveOffCenter(n,i,t,e,r,o,this._perspectiveMatrix),this._infinitePerspective=p$1d.computeInfinitePerspectiveOffCenter(n,i,t,e,r,this._infinitePerspective)},l$11.prototype.computeCullingVolume=function(e,t,i,n){if(!e$2b(e))throw new t$16("position is required.");if(!e$2b(t))throw new t$16("direction is required.");if(!e$2b(i))throw new t$16("up is required.");var r=this._cullingVolume.planes,o=u$_(n,0);o=Math.min(o,.5),o=Math.max(o,0);var a=this.top+this.top*o,s=this.bottom-this.top*o,l=this.right+this.right*o,u=this.left-this.right*o,c=this.near,h=this.far,d=o$1p.cross(t,i,B$V),f=O$J;o$1p.multiplyByScalar(t,c,f),o$1p.add(e,f,f);var p=S$R;o$1p.multiplyByScalar(t,h,p),o$1p.add(e,p,p);var _=V$S;o$1p.multiplyByScalar(d,u,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.normalize(_,_),o$1p.cross(_,i,_),o$1p.normalize(_,_);var m=r[0];return e$2b(m)||(m=r[0]=new e$29),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),o$1p.multiplyByScalar(d,l,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.cross(i,_,_),o$1p.normalize(_,_),e$2b(m=r[1])||(m=r[1]=new e$29),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),o$1p.multiplyByScalar(i,s,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.cross(d,_,_),o$1p.normalize(_,_),e$2b(m=r[2])||(m=r[2]=new e$29),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),o$1p.multiplyByScalar(i,a,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.cross(_,d,_),o$1p.normalize(_,_),e$2b(m=r[3])||(m=r[3]=new e$29),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),e$2b(m=r[4])||(m=r[4]=new e$29),m.x=t.x,m.y=t.y,m.z=t.z,m.w=-o$1p.dot(t,f),o$1p.negate(t,_),e$2b(m=r[5])||(m=r[5]=new e$29),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,p),this._cullingVolume},l$11.prototype.getPixelDimensions=function(e,t,i,n,r){if(z$U(this),!e$2b(e)||!e$2b(t))throw new t$16("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new t$16("drawingBufferWidth must be greater than zero.");if(t<=0)throw new t$16("drawingBufferHeight must be greater than zero.");if(!e$2b(i))throw new t$16("distance is required.");if(!e$2b(n))throw new t$16("pixelRatio is required");if(n<=0)throw new t$16("pixelRatio must be greater than zero.");if(!e$2b(r))throw new t$16("A result object is required.");var o=1/this.near,a=this.top*o,s=2*n*i*a/t,l=2*n*i*(a=this.right*o)/e;return r.x=l,r.y=s,r},l$11.prototype.clone=function(e){return e$2b(e)||(e=new l$11),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},l$11.prototype.equals=function(e){return e$2b(e)&&e instanceof l$11&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},l$11.prototype.equalsEpsilon=function(e,t,i){return e===this||e$2b(e)&&e instanceof l$11&&e$2a.equalsEpsilon(this.right,e.right,t,i)&&e$2a.equalsEpsilon(this.left,e.left,t,i)&&e$2a.equalsEpsilon(this.top,e.top,t,i)&&e$2a.equalsEpsilon(this.bottom,e.bottom,t,i)&&e$2a.equalsEpsilon(this.near,e.near,t,i)&&e$2a.equalsEpsilon(this.far,e.far,t,i)},o$15.isNDCHalfZRange=!1,o$15.packedLength=6,o$15.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.fov,t[i++]=e.aspectRatio,t[i++]=e.near,t[i++]=e.far,t[i++]=e.xOffset,t[i]=e.yOffset,t},o$15.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new o$15),i.fov=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t++],i.xOffset=e[t++],i.yOffset=e[t],i},Object.defineProperties(o$15.prototype,{projectionMatrix:{get:function(){return f$W(this),this.reflect&&x$14(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return f$W(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return f$W(this),this._fovy}},sseDenominator:{get:function(){return f$W(this),this._sseDenominator}}}),o$15.prototype.resetProjectionMatrix=function(){return this._offCenterFrustum.resetProjectionMatrix()},o$15.prototype.computeCullingVolume=function(e,t,i,n){return f$W(this),this._offCenterFrustum.computeCullingVolume(e,t,i,n)},o$15.prototype.getPixelDimensions=function(e,t,i,n,r){return f$W(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n,r)},o$15.prototype.clone=function(e){return e$2b(e)||(e=new o$15),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e.reflect=this.reflect,e.clipPlane=this.clipPlane,e.currentViewMatrix=this.currentViewMatrix,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},o$15.prototype.equals=function(e){return!!(e$2b(e)&&e instanceof o$15)&&(f$W(this),f$W(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},o$15.prototype.equalsEpsilon=function(e,t,i){return!!(e$2b(e)&&e instanceof o$15)&&(f$W(this),f$W(e),e$2a.equalsEpsilon(this.fov,e.fov,t,i)&&e$2a.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))};var r$_=new o$1m(o$1p.UNIT_Z,1),h$Z=new e$29,c$10=new e$29,s$P=new e$29;function x$14(e){if(e$2b(e.clipPlane)&&e$2b(e.currentViewMatrix)){var t=e.currentViewMatrix,i=e._offCenterFrustum.projectionMatrix;p$1d.multiplyByPlane(t,e.clipPlane,r$_),h$Z.x=(e$2a.sign(r$_.normal.x)+i[8])/i[0],h$Z.y=(e$2a.sign(r$_.normal.y)+i[9])/i[5],h$Z.z=-1,h$Z.w=(1+i[10])/i[14],c$10.x=r$_.normal.x,c$10.y=r$_.normal.y,c$10.z=r$_.normal.z,c$10.w=r$_.distance,e$29.multiplyByScalar(c$10,2/e$29.dot(c$10,h$Z),s$P),i[2]=s$P.x,i[6]=s$P.y,i[10]=s$P.z+1,i[14]=s$P.w,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,i,i)}}var mi$5=new o$1p(1,1,1),B$U=Math.cos,S$Q=Math.sin;function x$13(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.radii,mi$5),i=u$_(e.innerRadii,t),n=u$_(e.minimumClock,0),r=u$_(e.maximumClock,e$2a.TWO_PI),o=u$_(e.minimumCone,0),a=u$_(e.maximumCone,e$2a.PI),s=Math.round(u$_(e.stackPartitions,10)),l=Math.round(u$_(e.slicePartitions,8)),u=Math.round(u$_(e.subdivisions,128));if(s<1)throw new t$16("options.stackPartitions cannot be less than 1");if(l<0)throw new t$16("options.slicePartitions cannot be less than 0");if(u<0)throw new t$16("options.subdivisions must be greater than or equal to zero.");if(e$2b(e.offsetAttribute)&&e.offsetAttribute===_0x58701d.TOP)throw new t$16("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=o$1p.clone(t),this._innerRadii=o$1p.clone(i),this._minimumClock=n,this._maximumClock=r,this._minimumCone=o,this._maximumCone=a,this._stackPartitions=s,this._slicePartitions=l,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}x$13.packedLength=2*o$1p.packedLength+8,x$13.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),o$1p.pack(e._radii,t,i),i+=o$1p.packedLength,o$1p.pack(e._innerRadii,t,i),i+=o$1p.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i++]=e._subdivisions,t[i]=u$_(e._offsetAttribute,-1),t};var K$S=new o$1p,Q$Y=new o$1p,b$18={radii:K$S,innerRadii:Q$Y,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};function a$U(e){var t=u$_(e.radius,1),i={radii:new o$1p(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new x$13(i),this._workerName="createSphereOutlineGeometry"}x$13.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n=o$1p.unpack(e,t,K$S);t+=o$1p.packedLength;var r=o$1p.unpack(e,t,Q$Y);t+=o$1p.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return e$2b(i)?(i._radii=o$1p.clone(n,i._radii),i._innerRadii=o$1p.clone(r,i._innerRadii),i._minimumClock=o,i._maximumClock=a,i._minimumCone=s,i._maximumCone=l,i._stackPartitions=u,i._slicePartitions=c,i._subdivisions=h,i._offsetAttribute=-1===d?void 0:d,i):(b$18.minimumClock=o,b$18.maximumClock=a,b$18.minimumCone=s,b$18.maximumCone=l,b$18.stackPartitions=u,b$18.slicePartitions=c,b$18.subdivisions=h,b$18.offsetAttribute=-1===d?void 0:d,new x$13(b$18))},x$13.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._subdivisions,l=t$13.fromCartesian3(t),u=e._slicePartitions+1,c=e._stackPartitions+1;(u=Math.round(u*Math.abs(r-n)/e$2a.TWO_PI))<2&&(u=2),(c=Math.round(c*Math.abs(a-o)/e$2a.PI))<2&&(c=2);var h=0,d=1,f=i.x!==t.x||i.y!==t.y||i.z!==t.z,p=!1,_=!1;f&&(d=2,o>0&&(p=!0,h+=u),ae$1T.maximumCubeMapSize)throw new t$16("Width and height must be less than or equal to the maximum cube map size ("+e$1T.maximumCubeMapSize+"). Check maximumCubeMapSize.");if(!V$10.validate(l))throw new t$16("Invalid options.pixelFormat.");if(V$10.isDepthFormat(l))throw new t$16("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!_$$.validate(u))throw new t$16("Invalid options.pixelDatatype.");if(u===_$$.FLOAT&&!n.floatingPointTexture)throw new t$16("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(u===_$$.HALF_FLOAT&&!n.halfFloatingPointTexture)throw new t$16("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");var h=6*V$10.textureSizeInBytes(l,u,s,s),d=e.preMultiplyAlpha||l===V$10.RGB||l===V$10.LUMINANCE,f=u$_(e.flipY,!0);const p=u$_(e.skipColorSpaceConversion,!1);var _=n._gl,m=_.TEXTURE_CUBE_MAP,g=_.createTexture();function x(e,i,r,o,a){var h=i.arrayBufferView;e$2b(h)||(h=i.bufferView);let d=4;e$2b(h)&&(d=V$10.alignmentInBytes(l,u,t)),_.pixelStorei(_.UNPACK_ALIGNMENT,d),a?_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,_.NONE):_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,_.BROWSER_DEFAULT_WEBGL),e$2b(h)?(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,!1),o&&(h=V$10.flipY(h,l,u,s,s)),_.texImage2D(e,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),h)):(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,o),_.texImage2D(e,0,c,l,_$$.toWebGLConstant(u,n),i))}_.activeTexture(_.TEXTURE0),_.bindTexture(m,g),e$2b(r)?(x(_.TEXTURE_CUBE_MAP_POSITIVE_X,r.positiveX,d,f,p),x(_.TEXTURE_CUBE_MAP_NEGATIVE_X,r.negativeX,d,f,p),x(_.TEXTURE_CUBE_MAP_POSITIVE_Y,r.positiveY,d,f,p),x(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,r.negativeY,d,f,p),x(_.TEXTURE_CUBE_MAP_POSITIVE_Z,r.positiveZ,d,f,p),x(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,r.negativeZ,d,f,p)):(_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_X,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_X,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Y,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Z,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),null)),_.bindTexture(m,null),this._context=n,this._textureFilterAnisotropic=n._textureFilterAnisotropic,this._textureTarget=m,this._texture=g,this._pixelFormat=l,this._pixelDatatype=u,this._size=s,this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0;var v=e$2b(r);this._positiveX=new c$$(n,g,m,_.TEXTURE_CUBE_MAP_POSITIVE_X,c,l,u,s,d,f,v),this._negativeX=new c$$(n,g,m,_.TEXTURE_CUBE_MAP_NEGATIVE_X,c,l,u,s,d,f,v),this._positiveY=new c$$(n,g,m,_.TEXTURE_CUBE_MAP_POSITIVE_Y,c,l,u,s,d,f,v),this._negativeY=new c$$(n,g,m,_.TEXTURE_CUBE_MAP_NEGATIVE_Y,c,l,u,s,d,f,v),this._positiveZ=new c$$(n,g,m,_.TEXTURE_CUBE_MAP_POSITIVE_Z,c,l,u,s,d,f,v),this._negativeZ=new c$$(n,g,m,_.TEXTURE_CUBE_MAP_NEGATIVE_Z,c,l,u,s,d,f,v),this.sampler=e$2b(e.sampler)?e.sampler:new e$1P}function y$T(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t,i,n=e.context,r=e.source;if(e$2b(r)){var o=[r.positiveX,r.negativeX,r.positiveY,r.negativeY,r.positiveZ,r.negativeZ];if(!(o[0]&&o[1]&&o[2]&&o[3]&&o[4]&&o[5]))throw new t$16("options.source requires positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ faces.");t=o[0].width,i=o[0].height;for(var a=1;a<6;++a)if(Number(o[a].width)!==t||Number(o[a].height)!==i)throw new t$16("Each face in options.source must have the same width and height.")}else t=e.width,i=e.height;var s=t,l=u$_(e.pixelFormat,V$10.RGBA),u=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE);if(!e$2b(t)||!e$2b(i))throw new t$16("options requires a source field to create an initialized cube map or width and height fields to create a blank cube map.");if(t!==i)throw new t$16("Width must equal height.");if(s<=0)throw new t$16("Width and height must be greater than zero.");if(s>e$1T.maximumCubeMapSize)throw new t$16("Width and height must be less than or equal to the maximum cube map size ("+e$1T.maximumCubeMapSize+"). Check maximumCubeMapSize.");if(!V$10.validate(l))throw new t$16("Invalid options.pixelFormat.");if(V$10.isDepthFormat(l))throw new t$16("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!_$$.validate(u))throw new t$16("Invalid options.pixelDatatype.");if(u===_$$.FLOAT&&!n.floatingPointTexture)throw new t$16("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(u===_$$.HALF_FLOAT&&!n.halfFloatingPointTexture)throw new t$16("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");var c=6*V$10.textureSizeInBytes(l,u,s,s),h=e.preMultiplyAlpha||l===V$10.RGB||l===V$10.LUMINANCE,d=u$_(e.flipY,!0);this._context=n,this._textureFilterAnisotropic=n._textureFilterAnisotropic,this._size=s,this._hasMipmap=!1,this._sizeInBytes=c,this._preMultiplyAlpha=h,this._flipY=d,this._sampler=e$2b(e.sampler)?e.sampler:new e$1P,this._pixelFormat=l,this._pixelDatatype=u,r&&r.positiveX&&r.positiveX.internalFormat&&(this._pixelFormat=r.positiveX.internalFormat),r&&r.positiveX&&r.positiveX.pixelDatatype&&(this._pixelDatatype=r.positiveX.pixelDatatype);var f=R$$.toPixelFormat(this._pixelFormat),p=R$$.toPixelType(this._pixelDatatype);R$$.toSamplerMode(this._pixelDatatype,this._sampler);var _=R$$.toAddressMode(this._sampler.wrapS),m=R$$.toAddressMode(this._sampler.wrapT);if(e$2b(r)){var g=e.context.engine,x=new InternalTexture(g,InternalTextureSource.Cube);if(x.wrapU=_,x.wrapV=m,this._texture=new _0x5cc035(x),x.isCube=!0,x.generateMipMaps=!1,x._useSRGBBuffer=!1,x.format=f,x.type=p,r.positiveX.bufferView||r.positiveX.arrayBufferView){var v=[];v.push(x$12(r.positiveX,d,l,u,s)),v.push(x$12(r.positiveY,d,l,u,s)),v.push(x$12(r.positiveZ,d,l,u,s)),v.push(x$12(r.negativeX,d,l,u,s)),v.push(x$12(r.negativeY,d,l,u,s)),v.push(x$12(r.negativeZ,d,l,u,s));var y=g._textureHelper.createGPUTextureForInternalTexture(x,t,i);g._textureHelper.updateCubeTextures(v,y.underlyingResource,t,i,y.format,!1,!1,0,0)}else{var $=[];$.push(createImageBitmap(r.positiveX)),$.push(createImageBitmap(r.positiveY)),$.push(createImageBitmap(r.positiveZ)),$.push(createImageBitmap(r.negativeX)),$.push(createImageBitmap(r.negativeY)),$.push(createImageBitmap(r.negativeZ)),Promise.all($).then((e=>{var n=g._textureHelper.createGPUTextureForInternalTexture(x,t,i);g._textureHelper.updateCubeTextures(e,n.underlyingResource,t,i,n.format,d,!1,0,0)})).catch((e=>{console.log("CubeMapGPU createImageBitmap failed")}))}}}function x$12(e,t,i,n,r){var o;return e.bufferView?o=e.bufferView:e.arrayBufferView&&(o=e.arrayBufferView),t&&(o=V$10.flipY(o,i,n,r,r)),o}function e$1M(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.webgpu?this._inner=new y$T(e):this._inner=new X$Y(e)}a$U.unpack=function(e,t,i){var n=x$13.unpack(e,t,l$10);return s$O.stackPartitions=n._stackPartitions,s$O.slicePartitions=n._slicePartitions,s$O.subdivisions=n._subdivisions,e$2b(i)?(o$1p.clone(n._radii,s$O.radii),i._ellipsoidGeometry=new x$13(s$O),i):(s$O.radius=n._radii.x,new a$U(s$O))},a$U.createGeometry=function(e){return x$13.createGeometry(e._ellipsoidGeometry)},Object.defineProperties(c$$.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}}),c$$.prototype.copyFrom=function(e,t,i){if(t=u$_(t,0),i=u$_(i,0),o$1q.defined("source",e),o$1q.typeOf.number.greaterThanOrEquals("xOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",i,0),t+e.width>this._size)throw new t$16("xOffset + source.width must be less than or equal to width.");if(i+e.height>this._size)throw new t$16("yOffset + source.height must be less than or equal to height.");var n=this._gl,r=this._textureTarget,o=this._targetFace;n.activeTexture(n.TEXTURE0),n.bindTexture(r,this._texture);var a=e.width,s=e.height,l=e.arrayBufferView,u=this._size,c=this._pixelFormat,h=this._pixelDatatype,d=this._internalFormat;const f=this._preMultiplyAlpha,p=this._flipY;let _=4;e$2b(l)&&(_=V$10.alignmentInBytes(c,h,a)),n.pixelStorei(n.UNPACK_ALIGNMENT,_),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.BROWSER_DEFAULT_WEBGL);let m=!1;if(!this._initialized){if(0===t&&0===i&&a===u&&s===u)e$2b(l)?(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),p&&(l=V$10.flipY(l,c,h,u,u)),n.texImage2D(o,0,d,u,u,0,c,_$$.toWebGLConstant(h,this._context),l)):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,p),n.texImage2D(o,0,d,c,_$$.toWebGLConstant(h,this._context),e)),m=!0;else{n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const e=V$10.createTypedArray(c,h,u,u);n.texImage2D(o,0,d,u,u,0,c,_$$.toWebGLConstant(h,this._context),e)}this._initialized=!0}m||(e$2b(l)?(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),p&&(l=V$10.flipY(l,c,h,a,s)),n.texSubImage2D(o,0,t,i,a,s,c,_$$.toWebGLConstant(h,this._context),l)):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,p),n.texSubImage2D(o,0,t,i,c,_$$.toWebGLConstant(h,this._context),e))),n.bindTexture(r,null)},c$$.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){if(e=u$_(e,0),t=u$_(t,0),i=u$_(i,0),n=u$_(n,0),r=u$_(r,this._size),o=u$_(o,this._size),o$1q.typeOf.number.greaterThanOrEquals("xOffset",e,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",i,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",n,0),e+r>this._size)throw new t$16("xOffset + source.width must be less than or equal to width.");if(t+o>this._size)throw new t$16("yOffset + source.height must be less than or equal to height.");if(this._pixelDatatype===_$$.FLOAT)throw new t$16("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===_$$.HALF_FLOAT)throw new t$16("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");const a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.copyTexSubImage2D(this._targetFace,0,e,t,i,n,r,o),a.bindTexture(s,null),this._initialized=!0},Object.defineProperties(X$Y.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$h.NEAREST_MIPMAP_NEAREST||t===tt$h.NEAREST_MIPMAP_LINEAR||t===tt$h.LINEAR_MIPMAP_NEAREST||t===tt$h.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;(o===_$$.FLOAT&&!r.textureFloatLinear||o===_$$.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$h.NEAREST_MIPMAP_NEAREST:tt$h.NEAREST,i=rt$i.NEAREST);var a=r._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.texParameteri(s,a.TEXTURE_MIN_FILTER,t),a.texParameteri(s,a.TEXTURE_MAG_FILTER,i),a.texParameteri(s,a.TEXTURE_WRAP_S,e.wrapS),a.texParameteri(s,a.TEXTURE_WRAP_T,e.wrapT),e$2b(this._textureFilterAnisotropic)&&a.texParameteri(s,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),a.bindTexture(s,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),X$Y.prototype.generateMipmap=function(e){if(e=u$_(e,I$1e.DONT_CARE),this._size>1&&!e$2a.isPowerOfTwo(this._size))throw new t$16("width and height must be a power of two to call generateMipmap().");if(!I$1e.validate(e))throw new t$16("hint is invalid.");this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},X$Y.prototype.isDestroyed=function(){return!1},X$Y.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=i$10(this._positiveX),this._negativeX=i$10(this._negativeX),this._positiveY=i$10(this._positiveY),this._negativeY=i$10(this._negativeY),this._positiveZ=i$10(this._positiveZ),this._negativeZ=i$10(this._negativeZ),i$10(this)},Object.defineProperties(y$T.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),y$T.prototype.generateMipmap=function(e){console.log("CubeMapGPU.prototype.generateMipmap"),this._hasMipmap=!0},y$T.prototype.isDestroyed=function(){return!1},y$T.prototype.destroy=function(){return this._texture.dispose(),i$10(this)},Object.defineProperties(e$1M.prototype,{positiveX:{get:function(){return this._inner.positiveX}},negativeX:{get:function(){return this._inner.negativeX}},positiveY:{get:function(){return this._inner.positiveY}},negativeY:{get:function(){return this._inner.negativeY}},positiveZ:{get:function(){return this._inner.positiveZ}},negativeZ:{get:function(){return this._inner.negativeZ}},sampler:{get:function(){return this._inner.sampler},set:function(e){this._inner.sampler=e}},pixelFormat:{get:function(){return this._inner.pixelFormat}},pixelDatatype:{get:function(){return this._inner.pixelDatatype}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},preMultiplyAlpha:{get:function(){return this._inner.preMultiplyAlpha}},flipY:{get:function(){return this._inner.flipY}},_target:{get:function(){return this._inner._target}},_texture:{get:function(){return this._inner._texture}}}),e$1M.prototype.generateMipmap=function(e){if(e=u$_(e,I$1e.DONT_CARE),this._size>1&&!e$2a.isPowerOfTwo(this._size))throw new t$16("width and height must be a power of two to call generateMipmap().");if(!I$1e.validate(e))throw new t$16("hint is invalid.");this._inner.generateMipmap(e)},e$1M.prototype.isDestroyed=function(){return!1},e$1M.prototype.destroy=function(){return this._inner.destroy(),i$10(this)},void 0===Date.now&&(Date.now=function(){return(new Date).valueOf()});var f$V=f$V||function(){var e=[];return{REVISION:"13",getAll:function(){return e},removeAll:function(){e=[]},add:function(t){e.push(t)},remove:function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)},update:function(t){if(0===e.length)return!1;var i=0;for(t=void 0!==t?t:typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now();i1?1:v);for(x in n){var b=i[x]||0,T=n[x];T instanceof Array?t[x]=d(T,$):("string"==typeof T&&(T=b+parseFloat(T,10)),"number"==typeof T&&(t[x]=b+(T-b)*$))}if(null!==m&&m.call(t,$),1==v){if(y=0,a>0){for(x in isFinite(a)&&a--,r){if("string"==typeof n[x]&&(r[x]=r[x]+parseFloat(n[x],10)),s){var C=r[x];r[x]=n[x],n[x]=C}i[x]=r[x]}return c=e+u,!0}null!==g&&g.call(t);for(var S=0,w=f.length;S1?o(e[i],e[i-1],i-n):o(e[r],e[r+1>i?i:r+1],n-r)},Bezier:function(e,t){var i,n=0,r=e.length-1,o=Math.pow,a=f$V.Interpolation.Utils.Bernstein;for(i=0;i<=r;i++)n+=o(1-t,r-i)*o(t,i)*e[i]*a(r,i);return n},CatmullRom:function(e,t){var i=e.length-1,n=i*t,r=Math.floor(n),o=f$V.Interpolation.Utils.CatmullRom;return e[0]===e[i]?(t<0&&(r=Math.floor(n=i*(1+t))),o(e[(r-1+i)%i],e[r],e[(r+1)%i],e[(r+2)%i],n-r)):t<0?e[0]-(o(e[0],e[0],e[1],e[1],-n)-e[0]):t>1?e[i]-(o(e[i],e[i],e[i-1],e[i-1],n-i)-e[i]):o(e[r?r-1:0],e[r],e[i1;i--)n*=i;return e[t]=n}}(),CatmullRom:function(e,t,i,n,r){var o=.5*(i-e),a=.5*(n-t),s=r*r;return(2*t-2*i+o+a)*(r*s)+(-3*t+3*i-2*o-a)*s+o*r+t}}};var I$1c={LINEAR_NONE:f$V.Easing.Linear.None,QUADRACTIC_IN:f$V.Easing.Quadratic.In,QUADRACTIC_OUT:f$V.Easing.Quadratic.Out,QUADRACTIC_IN_OUT:f$V.Easing.Quadratic.InOut,CUBIC_IN:f$V.Easing.Cubic.In,CUBIC_OUT:f$V.Easing.Cubic.Out,CUBIC_IN_OUT:f$V.Easing.Cubic.InOut,QUARTIC_IN:f$V.Easing.Quartic.In,QUARTIC_OUT:f$V.Easing.Quartic.Out,QUARTIC_IN_OUT:f$V.Easing.Quartic.InOut,QUINTIC_IN:f$V.Easing.Quintic.In,QUINTIC_OUT:f$V.Easing.Quintic.Out,QUINTIC_IN_OUT:f$V.Easing.Quintic.InOut,SINUSOIDAL_IN:f$V.Easing.Sinusoidal.In,SINUSOIDAL_OUT:f$V.Easing.Sinusoidal.Out,SINUSOIDAL_IN_OUT:f$V.Easing.Sinusoidal.InOut,EXPONENTIAL_IN:f$V.Easing.Exponential.In,EXPONENTIAL_OUT:f$V.Easing.Exponential.Out,EXPONENTIAL_IN_OUT:f$V.Easing.Exponential.InOut,CIRCULAR_IN:f$V.Easing.Circular.In,CIRCULAR_OUT:f$V.Easing.Circular.Out,CIRCULAR_IN_OUT:f$V.Easing.Circular.InOut,ELASTIC_IN:f$V.Easing.Elastic.In,ELASTIC_OUT:f$V.Easing.Elastic.Out,ELASTIC_IN_OUT:f$V.Easing.Elastic.InOut,BACK_IN:f$V.Easing.Back.In,BACK_OUT:f$V.Easing.Back.Out,BACK_IN_OUT:f$V.Easing.Back.InOut,BOUNCE_IN:f$V.Easing.Bounce.In,BOUNCE_OUT:f$V.Easing.Bounce.Out,BOUNCE_IN_OUT:f$V.Easing.Bounce.InOut},m$W=Object.freeze(I$1c);function a$T(e,t,i){this.heading=u$_(e,0),this.pitch=u$_(t,0),this.range=u$_(i,0)}a$T.clone=function(e,t){if(e$2b(e))return e$2b(t)||(t=new a$T),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var e$1L={NONE:0,CATMULL_ROM:1},j$13=Object.freeze(e$1L),mr$4={};function Nr$4(e,t,i){var n,r,o;if(e instanceof o$15){var a=Math.tan(.5*e.fovy);return n=e.near,r=e.near*a,o=e.aspectRatio*r,Math.max(t*n/o,i*n/r)}return e instanceof l$11?(n=e.near,r=e.top,o=e.right,Math.max(t*n/o,i*n/r)):Math.max(t,i)}var yr$4=new o$1p,pr$4=new o$1p;function Sr$4(e,t,i,n){if(e$2b(n)&&i(.5)>n){var r=i(0),o=i(1),a=i(.5),s=a-r,l=a-o;return function(n){var a=i(n);if(n<=.5){var u=(a-r)/s;return e$2a.lerp(e,-e$2a.PI_OVER_TWO,u)}var c=(a-o)/l;return e$2a.lerp(-e$2a.PI_OVER_TWO,t,1-c)}}return function(i){return e$2a.lerp(e,t,i)}}function er$9(e,t,i,n,r){var o=r,a=Math.max(i,n);if(!e$2b(o)){var s=e.position,l=t,u=e.up,c=e.right,h=e.frustum,d=o$1p.subtract(s,l,yr$4),f=o$1p.magnitude(o$1p.multiplyByScalar(u,o$1p.dot(d,u),pr$4)),p=o$1p.magnitude(o$1p.multiplyByScalar(c,o$1p.dot(d,c),pr$4));o=Math.min(.2*Nr$4(h,f,p),1e9)}if(ae+Math.PI?e+=e$2a.TWO_PI:te$2a.PI&&(t.longitude+=e$2a.TWO_PI)}var br$2=new a$18,Vr$2=new a$18;function jr$3(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x){var v=e.camera,y=e.mapProjection.ellipsoid,$=a$18.clone(v.positionCartographic,br$2),b=v.pitch,T=x$11(v.heading,n),C=x$11(v.roll,o),S=y.cartesianToCartographic(i,Vr$2);$.longitude=e$2a.zeroToTwoPi($.longitude),S.longitude=e$2a.zeroToTwoPi(S.longitude);var w=!1;if(e$2b(s)){var E=e$2a.zeroToTwoPi(s),P=Math.min($.longitude,S.longitude),A=Math.max($.longitude,S.longitude),L=E>=P&&E<=A;if(e$2b(l)){var M=Math.abs($.longitude-S.longitude),R=e$2a.TWO_PI-M;(L?M:R)<(L?R:M)*l&&!L&&(w=!0)}else L||(w=!0)}w?Wr$1($,S):zr$5($,S);var I=er$9(v,i,$.height,S.height,a),O=Sr$4(b,r,I,u);return function(){var i=$.longitude,r=S.longitude,a=$.latitude,s=S.latitude;return function(l){var u,y,$=l.time/t,b=d?v.positionCartographic.height:I($);if(m!==j$13.NONE&&e$2b(x)){if((u=g._times[x]+l.time)>g._times[g._times.length-1])return;var S=g.evaluate(u),w=a$18.fromCartesian(S);y=o$1p.fromRadians(w.longitude,w.latitude,b)}else y=o$1p.fromRadians(e$2a.lerp(i,r,$),e$2a.lerp(a,s,$),b);if(f){var E=a$18.fromCartesian(y),P=e.globe.getHeight(E);if(!e$2b(P))return;(b0&&b-Pg._times[g._times.length-1])v.setView({destination:y,orientation:{heading:A,pitch:L,roll:M}});else{var D=g.evaluate(R),B=a$18.fromCartesian(D);D=o$1p.fromRadians(B.longitude,B.latitude,b);var N=new o$1p(D.x-y.x,D.y-y.y,D.z-y.z);o$1p.normalize(N,N);var F=m$17.buildUp(y,N);v.setView({destination:y,orientation:{direction:N,up:F}})}}else v.setView({destination:y,orientation:{heading:A,pitch:L,roll:M}})}}()}function Rr$3(e,t,i,n,r,o,a){var s=e.camera,l=o$1p.clone(s.position,dr$5),u=x$11(s.heading,n),c=s.frustum.right-s.frustum.left,h=er$9(s,i,c,i.z,a);return function(e){var r=e.time/t;s.setView({orientation:{heading:e$2a.lerp(u,n,r)}}),o$1o.lerp(l,i,r,s.position);var o=h(r),a=s.frustum,c=a.top/a.right,d=.5*(o-(a.right-a.left));a.right+=d,a.left-=d,a.top=c*a.right,a.bottom=-a.top}}var hr$3=new a$18,Ur$4=new o$1p;function tr$8(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function gr$5(e,t){return function(){"function"==typeof t&&t(),e.enableInputs=!0}}mr$4.createTween=function(e,t){var i=(t=u$_(t,u$_.EMPTY_OBJECT)).destination;if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(i))throw new t$16("destination is required.");var n=e.mode;if(n===C$13.MORPHING)return tr$8();var r=u$_(t.convert,!0),o=e.mapProjection,a=o.ellipsoid,s=t.maximumHeight,l=t.flyOverLongitude,u=t.flyOverLongitudeWeight,c=t.pitchAdjustHeight,h=t.easingFunction,d=t.flyClampToGround,f=t.flyRelativeHeight,p=t.interpolationMode,_=t.catmullRomSpline,m=t.preStopIndex;r&&n!==C$13.SCENE3D&&(a.cartesianToCartographic(i,hr$3),i=o.project(hr$3,Ur$4));var g=e.camera,x=t.endTransform;e$2b(x)&&g._setTransform(x);var v=t.duration;e$2b(v)||(v=Math.ceil(o$1p.distance(g.position,i)/1e6)+2,v=Math.min(v,3));var y=u$_(t.heading,0),$=u$_(t.pitch,-e$2a.PI_OVER_TWO),b=u$_(t.roll,0),T=u$_(t.headingFree,!1),C=u$_(t.pitchFree,!1),S=u$_(t.altitudeFree,!1),w=u$_(t.directTurning,!1),E=e.screenSpaceCameraController;E.enableInputs=t.headingFree||t.pitchFree||t.altitudeFree;var P=gr$5(E,t.complete),A=gr$5(E,t.cancel),L=g.frustum,M=e.mode===C$13.SCENE2D;if(M=(M=(M=(M=M&&o$1o.equalsEpsilon(g.position,i,e$2a.EPSILON6))&&e$2a.equalsEpsilon(Math.max(L.right-L.left,L.top-L.bottom),i.z,e$2a.EPSILON6))||e.mode!==C$13.SCENE2D&&o$1p.equalsEpsilon(i,g.position,e$2a.EPSILON10))&&e$2a.equalsEpsilon(e$2a.negativePiToPi(y),e$2a.negativePiToPi(g.heading),e$2a.EPSILON10)&&e$2a.equalsEpsilon(e$2a.negativePiToPi($),e$2a.negativePiToPi(g.pitch),e$2a.EPSILON10)&&e$2a.equalsEpsilon(e$2a.negativePiToPi(b),e$2a.negativePiToPi(g.roll),e$2a.EPSILON10))return tr$8(P,A);var R=new Array(4);if(R[C$13.SCENE2D]=Rr$3,R[C$13.SCENE3D]=jr$3,R[C$13.COLUMBUS_VIEW]=Lr$4,v<=0){return tr$8((function(){R[n](e,1,i,y,$,b,s,l,u,c)({time:1}),"function"==typeof P&&P()}),A)}var I=R[n](e,v,i,y,$,b,s,l,u,c,T,C,S,d,f,w,p,_,m);if(!e$2b(h)){var O=g.positionCartographic.height;h=O>(n===C$13.SCENE3D?a.cartesianToCartographic(i).height:i.z)&&O>11500?m$W.CUBIC_OUT:m$W.QUINTIC_IN_OUT}return{duration:v,easingFunction:h,startObject:{time:0},stopObject:{time:v},update:I,complete:P,cancel:A}};var e$1K={ROTATE:0,INFINITE_SCROLL:1},Rr$2=Object.freeze(e$1K);function v$K(e){if(!e$2b(e))throw new t$16("scene is required.");this._scene=e,this._transform=p$1d.clone(p$1d.IDENTITY),this._invTransform=p$1d.clone(p$1d.IDENTITY),this._actualTransform=p$1d.clone(p$1d.IDENTITY),this._actualInvTransform=p$1d.clone(p$1d.IDENTITY),this._transformChanged=!1,this.position=new o$1p,this._position=new o$1p,this._positionWC=new o$1p,this._positionCartographic=new a$18,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.direction=new o$1p,this._direction=new o$1p,this._directionWC=new o$1p,this.up=new o$1p,this._up=new o$1p,this._upWC=new o$1p,this.right=new o$1p,this._right=new o$1p,this._rightWC=new o$1p,this.frustum=new o$15,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=e$2a.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new o$1h,this._moveEnd=new o$1h,this._changed=new o$1h,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this.percentageChanged=.5,this._refinePercentageChanged=.001,this._viewMatrix=new p$1d,this._invViewMatrix=new p$1d,zt$6(this),this._mode=C$13.SCENE3D,this._modeChanged=!0;var t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new a$18(Math.PI,e$2a.PI_OVER_TWO)),this._max2Dfrustum=void 0,this._suspendTerrainAdjustment=!1,Xt$4(this,v$K.DEFAULT_VIEW_RECTANGLE,this.position,!0);var i=o$1p.magnitude(this.position);i+=i*v$K.DEFAULT_VIEW_FACTOR,o$1p.normalize(this.position,this.position),o$1p.multiplyByScalar(this.position,i,this.position),this.bReflect=!1,this._bReflect=!1,this._reflectMatrix=new p$1d,this._reflectPosition=new o$1p,this._reflectUp=new o$1p,this._reflectDirection=new o$1p,this._reflectRight=new o$1p,this._isFlyCircle=!1,this._flyCircleCenter=new o$1p,this._flyCircleLoop=!1,this._isResetFlyCircleParm=!1,this._speedRatio=1,this._flyClampToGround=!1,this._flyRelativeHeight=10,this._sensitivePosition=void 0,this._sensitivePositionRatio=0,this._sensitiveRegionRatio=0,this._endLevel=22,this._stateChanged=!0,this._preciseSensitivePosition=!1,this._enableIndoorColliDetection=!1,this.zoomLevel=1}function zt$6(e){p$1d.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),p$1d.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),p$1d.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function ui$6(e){if(e$2b(e._oldPositionWC)){e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;var t=o$1p.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=o$1p.magnitude(t),e._oldPositionWC=o$1p.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=Et$a()):e.timeSinceMoved=Math.max(Et$a()-e._lastMovedTimestamp,0)/1e3}else e._oldPositionWC=o$1p.clone(e.positionWC,e._oldPositionWC)}v$K.TRANSFORM_2D=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),v$K.TRANSFORM_2D_INVERSE=p$1d.inverseTransformation(v$K.TRANSFORM_2D,new p$1d),v$K.DEFAULT_VIEW_RECTANGLE=h$18.fromDegrees(70,0,140,60),v$K.DEFAULT_VIEW_FACTOR=.5,v$K.DEFAULT_OFFSET=new a$T(0,-e$2a.PI_OVER_FOUR,0),v$K.prototype.canPreloadFlight=function(){return e$2b(this._currentFlight)&&this._mode!==C$13.SCENE2D},v$K.prototype._updateCameraChanged=function(){var e=this;if(ui$6(e),this._stateChanged=!1,0!==e._changed.numberOfListeners){var t=e.percentageChanged,i=e._refinePercentageChanged;if(e._mode===C$13.SCENE2D){if(!e$2b(e._changedFrustum))return e._changedPosition=o$1p.clone(e.position,e._changedPosition),void(e._changedFrustum=e.frustum.clone());var n,r=e.position,o=e._changedPosition,a=e.frustum,s=e._changedFrustum,l=r.x+a.left,u=r.x+a.right,c=o.x+s.left,h=o.x+s.right,d=r.y+a.bottom,f=r.y+a.top,p=o.y+s.bottom,_=o.y+s.top,m=Math.max(l,c),g=Math.min(u,h),x=Math.max(d,p),v=Math.min(f,_);if(m>=g||x>=f)n=1;else{var y=s;lh&&d_&&(y=a),n=1-(g-m)*(v-x)/((y.right-y.left)*(y.top-y.bottom))}return void(n>t&&(e._changed.raiseEvent(n),e._changedPosition=o$1p.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum)))}if(!e$2b(e._changedDirection))return e._changedPosition=o$1p.clone(e.positionWC,e._changedPosition),void(e._changedDirection=o$1p.clone(e.directionWC,e._changedDirection));var $,b=e$2a.acosClamped(o$1p.dot(e.directionWC,e._changedDirection));$=e$2b(e.frustum.fovy)?b/(.5*e.frustum.fovy):b;var T=o$1p.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;($>t||T>t)&&(e._changed.raiseEvent(Math.max($,T)),e._changedPosition=o$1p.clone(e.positionWC,e._changedPosition),e._changedDirection=o$1p.clone(e.directionWC,e._changedDirection)),($>i||T>i)&&(e._changed.raiseEvent(Math.max($,T)),this._stateChanged=!0,e._changedPosition=o$1p.clone(e.positionWC,e._changedPosition),e._changedDirection=o$1p.clone(e.directionWC,e._changedDirection))}};var ci$7=new p$1d,fi$6=new a$18;function di$6(e){m$17.basisTo2D(e._projection,e._transform,e._actualTransform)}v$K.prototype._adjustHeightForTerrain=function(){var e=this._scene,t=e.screenSpaceCameraController,i=t.enableCollisionDetection,n=t.minimumCollisionTerrainHeight,r=t.minimumZoomDistance;if(!this._suspendTerrainAdjustment&&i){var o=this._mode,a=e.globe;if(e$2b(a)&&o!==C$13.SCENE2D&&o!==C$13.MORPHING){var s,l,u=a.ellipsoid,c=e.mapProjection;p$1d.equals(this.transform,p$1d.IDENTITY)||(s=p$1d.clone(this.transform,ci$7),l=o$1p.magnitude(this.position),this._setTransform(p$1d.IDENTITY));var h=fi$6;o===C$13.SCENE3D?u.cartesianToCartographic(this.position,h):c.unproject(this.position,h);var d=!1;if(h.heighte$2a.EPSILON10)o$1p.cross(s,u,c);else{var h=e$29.add(p$1d.getColumn(e._transform,1,ut$b),n,ut$b);i.cartesianToCartographic(h,r),t.project(r,o),c.x=o.z,c.y=o.x,c.z=o.y,c.w=0,o$1p.subtract(c,a,c),c.x=0,o$1p.magnitudeSquared(c)e$2a.EPSILON2){var g=1/o$1p.magnitudeSquared(l),x=o$1p.dot(l,a)*g,v=o$1p.multiplyByScalar(a,x,Tt$c);l=o$1p.normalize(o$1p.subtract(l,v,e._up),e._up),o$1p.clone(l,e.up),c=o$1p.cross(a,l,e._right),o$1p.clone(c,e.right)}}(s||f)&&(e._directionWC=p$1d.multiplyByPointAsVector(p,a,e._directionWC),o$1p.normalize(e._directionWC,e._directionWC)),(u||f)&&(e._upWC=p$1d.multiplyByPointAsVector(p,l,e._upWC),o$1p.normalize(e._upWC,e._upWC)),(h||f)&&(e._rightWC=p$1d.multiplyByPointAsVector(p,c,e._rightWC),o$1p.normalize(e._rightWC,e._rightWC)),(o||s||u||h||f||d)&&zt$6(e)}function Bt$a(e,t){var i;return i=e$2a.equalsEpsilon(Math.abs(e.z),1,e$2a.EPSILON3)?Math.atan2(t.y,t.x)-e$2a.PI_OVER_TWO:Math.atan2(e.y,e.x)-e$2a.PI_OVER_TWO,e$2a.TWO_PI-e$2a.zeroToTwoPi(i)}function bt$9(e){return e$2a.PI_OVER_TWO-e$2a.acosClamped(e.z)}function Lt$7(e,t,i){var n=0;return e$2a.equalsEpsilon(Math.abs(e.z),1,e$2a.EPSILON3)||(n=Math.atan2(-i.z,t.z),n=e$2a.zeroToTwoPi(n+e$2a.TWO_PI)),n}var ct$a=new p$1d,ft$9=new p$1d;Object.defineProperties(v$K.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return D$X(this),this._invTransform}},viewMatrix:{get:function(){return D$X(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return D$X(this),this._invViewMatrix}},positionCartographic:{get:function(){return D$X(this),this._positionCartographic}},positionWC:{get:function(){return D$X(this),this._positionWC}},directionWC:{get:function(){return D$X(this),this._directionWC}},upWC:{get:function(){return D$X(this),this._upWC}},rightWC:{get:function(){return D$X(this),this._rightWC}},heading:{get:function(){if(this._mode!==C$13.MORPHING){var e=this._projection.ellipsoid,t=p$1d.clone(this._transform,ct$a),i=m$17.eastNorthUpToFixedFrame(this.positionWC,e,ft$9);this._setTransform(i);var n=Bt$a(this.direction,this.up);return this._setTransform(t),n}}},pitch:{get:function(){if(this._mode!==C$13.MORPHING){var e=this._projection.ellipsoid,t=p$1d.clone(this._transform,ct$a),i=m$17.eastNorthUpToFixedFrame(this.positionWC,e,ft$9);this._setTransform(i);var n=bt$9(this.direction);return this._setTransform(t),n}}},roll:{get:function(){if(this._mode!==C$13.MORPHING){var e=this._projection.ellipsoid,t=p$1d.clone(this._transform,ct$a),i=m$17.eastNorthUpToFixedFrame(this.positionWC,e,ft$9);this._setTransform(i);var n=Lt$7(this.direction,this.up,this.right);return this._setTransform(t),n}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}},flyCircleLoop:{set:function(e){this._flyCircleLoop!==e&&(this._isResetFlyCircleParm=!0),this._flyCircleLoop=e},get:function(){return this._flyCircleLoop}},speedRatio:{get:function(){return this._speedRatio},set:function(e){this._speedRatio=e}},flyClampToGround:{set:function(e){this._flyClampToGround=e},get:function(){return this._flyClampToGround}},flyRelativeHeight:{set:function(e){this._flyRelativeHeight=e},get:function(){return this._flyRelativeHeight}},sensitivePositionRatio:{set:function(e){this._sensitivePositionRatio=e$2a.clamp(e,0,1)},get:function(){return this._sensitivePositionRatio}},preciseSensitivePosition:{set:function(e){e$2b(e)&&"boolean"==typeof e&&(this._preciseSensitivePosition=e)},get:function(){return this._preciseSensitivePosition}},sensitiveRegionRatio:{set:function(e){this._sensitiveRegionRatio=e},get:function(){return this._sensitiveRegionRatio}}}),v$K.prototype._computeSensitivePosition=function(){if(this._scene.mode===C$13.SCENE3D){var e=this._scene.canvas,t=this._scene.frameState;dt$b.x=e.clientWidth/2,dt$b.y=e.clientHeight/2;var i=void 0;if(e$2b(this._scene.globe)&&this._preciseSensitivePosition&&(e$2b(i=this._scene.pickPositionWorldCoordinates(dt$b,wi$5,!0))&&(this._sensitivePosition=i)),!e$2b(i)){var n=this.getPickRay(dt$b),r=t$13.WGS84,o=r.maximumRadius;e$2b(t.averageTerrainHeight)&&0!=t.averageTerrainHeight&&(r=new t$13(o+t.averageTerrainHeight,o+t.averageTerrainHeight,o+t.averageTerrainHeight));var a=g$1h.rayEllipsoid(n,r);if(e$2b(a)){Et$9.x=e.clientWidth/2,Et$9.y=0;var s=this.getPickRay(Et$9);if(e$2b(g$1h.rayEllipsoid(s,r)))this._sensitivePosition=f$17.getPoint(n,a.start);else{var l,u=o$1p.magnitude(this.position);l=us){var c=u.top/u.right;u.right=l,u.left=s,u.top=u.right*c,u.bottom=-u.top}}if(e._scene.mapMode2D===Rr$2.ROTATE){i.heading=i.heading-e$2a.PI_OVER_TWO,i.pitch=-e$2a.PI_OVER_TWO,i.roll=0;var h=n$13.fromHeadingPitchRoll(i,Rt$7),d=p$1e.fromQuaternion(h,St$7);p$1e.getColumn(d,2,e.up),o$1p.cross(e.direction,e.up,e.right)}e._setTransform(r)}var Ni$5=new o$1p,Ai$4=new o$1p,Fi$3=new o$1p;function Ut$6(e,t,i,n){var r=o$1p.clone(i.direction,Ni$5),o=o$1p.clone(i.up,Ai$4);if(e._scene.mode===C$13.SCENE3D){var a=e._projection.ellipsoid,s=m$17.eastNorthUpToFixedFrame(t,a,ct$a),l=p$1d.inverseTransformation(s,ft$9);p$1d.multiplyByPointAsVector(l,r,r),p$1d.multiplyByPointAsVector(l,o,o)}var u=o$1p.cross(r,o,Fi$3);return n.heading=Bt$a(r,o),n.pitch=bt$9(r),n.roll=Lt$7(r,o,u),n}var It$a={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},tt$g=new i$15;v$K.prototype.setView=function(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.orientation,u$_.EMPTY_OBJECT),i=this._mode;if(i!==C$13.MORPHING){e$2b(e.endTransform)&&this._setTransform(e.endTransform);var n=u$_(e.convert,!0),r=u$_(e.destination,o$1p.clone(this.positionWC,lt$6));e$2b(r)&&e$2b(r.west)&&(r=this.getRectangleCameraCoordinates(r,lt$6),n=!1),e$2b(t.direction)&&(t=Ut$6(this,r,t,It$a.orientation)),tt$g.heading=u$_(t.heading,0),tt$g.pitch=u$_(t.pitch,-e$2a.PI_OVER_TWO),tt$g.roll=u$_(t.roll,0),this._suspendTerrainAdjustment=!0,i===C$13.SCENE3D?Di$6(this,r,tt$g):i===C$13.SCENE2D?Oi$5(this,r,tt$g,n):xi$5(this,r,tt$g,n)}};var Vi$5=new o$1p;function jt$5(e,t){var i,n,r=e._scene.mapMode2D===Rr$2.ROTATE,o=e._maxCoord.x,a=e._maxCoord.y;r?i=-(n=o):(n=t.x-2*o,i=t.x+2*o),t.x>o&&(t.x=n),t.x<-o&&(t.x=i),t.y>a&&(t.y=a),t.y<-a&&(t.y=-a)}v$K.prototype.flyHome=function(e){var t=this._mode;if(t===C$13.MORPHING&&this._scene.completeMorph(),t===C$13.SCENE2D)this.flyTo({destination:v$K.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:p$1d.IDENTITY});else if(t===C$13.SCENE3D){var i=this.getRectangleCameraCoordinates(v$K.DEFAULT_VIEW_RECTANGLE),n=o$1p.magnitude(i);n+=n*v$K.DEFAULT_VIEW_FACTOR,o$1p.normalize(i,i),o$1p.multiplyByScalar(i,n,i),this.flyTo({destination:i,duration:e,endTransform:p$1d.IDENTITY})}else if(t===C$13.COLUMBUS_VIEW){var r=this._projection.ellipsoid.maximumRadius,o=new o$1p(0,-1,1);o=o$1p.multiplyByScalar(o$1p.normalize(o,o),5*r,o),this.flyTo({destination:o,duration:e,orientation:{heading:0,pitch:-Math.acos(o$1p.normalize(o,Vi$5).z),roll:0},endTransform:p$1d.IDENTITY,convert:!1})}},v$K.prototype.worldToCameraCoordinates=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required.");return e$2b(t)||(t=new e$29),D$X(this),p$1d.multiplyByVector(this._actualInvTransform,e,t)},v$K.prototype.worldToCameraCoordinatesPoint=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required.");return e$2b(t)||(t=new o$1p),D$X(this),p$1d.multiplyByPoint(this._actualInvTransform,e,t)},v$K.prototype.worldToCameraCoordinatesVector=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required.");return e$2b(t)||(t=new o$1p),D$X(this),p$1d.multiplyByPointAsVector(this._actualInvTransform,e,t)},v$K.prototype.cameraToWorldCoordinates=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required.");return e$2b(t)||(t=new e$29),D$X(this),p$1d.multiplyByVector(this._actualTransform,e,t)},v$K.prototype.cameraToWorldCoordinatesPoint=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required.");return e$2b(t)||(t=new o$1p),D$X(this),p$1d.multiplyByPoint(this._actualTransform,e,t)},v$K.prototype.cameraToWorldCoordinatesVector=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required.");return e$2b(t)||(t=new o$1p),D$X(this),p$1d.multiplyByPointAsVector(this._actualTransform,e,t)};var vt$b=new o$1p;v$K.prototype.move=function(e,t){if(!e$2b(e))throw new t$16("direction is required.");var i=this._scene;if(this._enableIndoorColliDetection){o$1p.multiplyByScalar(e,Math.sign(t),vt$b);var n=i.collideDetection(vt$b);if(e$2b(n))if(o$1p.distance(this.position,n)<1)return}var r=this.position;o$1p.multiplyByScalar(e,t,vt$b),o$1p.add(r,vt$b,r),this._mode===C$13.SCENE2D&&jt$5(this,r),this._adjustOrthographicFrustum(!0)},v$K.prototype.moveForward=function(e){e=u$_(e,this.defaultMoveAmount),this._mode===C$13.SCENE2D?pt$a(this,e):this.move(this.direction,e)},v$K.prototype.moveBackward=function(e){e=u$_(e,this.defaultMoveAmount),this._mode===C$13.SCENE2D?pt$a(this,-e):this.move(this.direction,-e)},v$K.prototype.moveUp=function(e){e=u$_(e,this.defaultMoveAmount),this.move(this.up,e)},v$K.prototype.moveDown=function(e){e=u$_(e,this.defaultMoveAmount),this.move(this.up,-e)},v$K.prototype.moveRight=function(e){e=u$_(e,this.defaultMoveAmount),this.move(this.right,e)},v$K.prototype.moveLeft=function(e){e=u$_(e,this.defaultMoveAmount),this.move(this.right,-e)},v$K.prototype.lookLeft=function(e){e=u$_(e,this.defaultLookAmount),this._mode!==C$13.SCENE2D&&this.look(this.up,-e)},v$K.prototype.lookRight=function(e){e=u$_(e,this.defaultLookAmount),this._mode!==C$13.SCENE2D&&this.look(this.up,e)},v$K.prototype.lookUp=function(e){e=u$_(e,this.defaultLookAmount),this._mode!==C$13.SCENE2D&&this.look(this.right,-e)},v$K.prototype.lookDown=function(e){e=u$_(e,this.defaultLookAmount),this._mode!==C$13.SCENE2D&&this.look(this.right,e)};var zi$5=new n$13,Bi$3=new p$1e;v$K.prototype.look=function(e,t){if(!e$2b(e))throw new t$16("axis is required.");var i=u$_(t,this.defaultLookAmount),n=n$13.fromAxisAngle(e,-i,zi$5),r=p$1e.fromQuaternion(n,Bi$3),o=this.direction,a=this.up,s=this.right;p$1e.multiplyByVector(r,o,o),p$1e.multiplyByVector(r,a,a),p$1e.multiplyByVector(r,s,s)},v$K.prototype.twistLeft=function(e){e=u$_(e,this.defaultLookAmount),this.look(this.direction,e)},v$K.prototype.twistRight=function(e){e=u$_(e,this.defaultLookAmount),this.look(this.direction,-e)};var bi$5=new n$13,Li$3=new p$1e;v$K.prototype.rotate=function(e,t){if(!e$2b(e))throw new t$16("axis is required.");var i=u$_(t,this.defaultRotateAmount),n=n$13.fromAxisAngle(e,-i,bi$5),r=p$1e.fromQuaternion(n,Li$3);p$1e.multiplyByVector(r,this.position,this.position),p$1e.multiplyByVector(r,this.direction,this.direction),p$1e.multiplyByVector(r,this.up,this.up),o$1p.cross(this.direction,this.up,this.right),o$1p.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)},v$K.prototype.rotateDown=function(e){Zt$6(this,e=u$_(e,this.defaultRotateAmount))},v$K.prototype.rotateUp=function(e){Zt$6(this,-(e=u$_(e,this.defaultRotateAmount)))};var Hi$4=new o$1p,Ui$4=new o$1p,ji$4=new o$1p,kt$6=new o$1p;function Zt$6(e,t){var i=e.position,n=o$1p.normalize(i,Hi$4);if(e$2b(e.constrainedAxis)){var r=o$1p.equalsEpsilon(n,e.constrainedAxis,e$2a.EPSILON2),o=o$1p.equalsEpsilon(n,o$1p.negate(e.constrainedAxis,kt$6),e$2a.EPSILON2);if(r||o)(r&&t<0||o&&t>0)&&e.rotate(e.right,t);else{var a=o$1p.normalize(e.constrainedAxis,Ui$4),s=o$1p.dot(n,a),l=e$2a.acosClamped(s);t>0&&t>l&&(t=l-e$2a.EPSILON4),s=o$1p.dot(n,o$1p.negate(a,kt$6)),l=e$2a.acosClamped(s),t<0&&-t>l&&(t=-l+e$2a.EPSILON4);var u=o$1p.cross(a,n,ji$4),c=o$1p.dot(u,e.right);if(c<0&&t>0)return;u=c<0?o$1p.negate(u,u):u,e.rotate(u,t)}}else e.rotate(e.right,t)}function Yt$7(e,t){e$2b(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function pt$a(e,t){var i,n=e.frustum;if(!(n instanceof l$12&&e$2b(n.left)&&e$2b(n.right)&&e$2b(n.bottom)&&e$2b(n.top)))throw new t$16("The camera frustum is expected to be orthographic for 2D camera control.");if(t*=.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){var r=n.top-t,o=n.bottom+t,a=e._maxCoord.y;e._scene.mapMode2D===Rr$2.ROTATE&&(a*=e.maximumZoomFactor),o>a&&(o=a,r=-a),r<=o&&(r=1,o=-1),i=n.right/n.top,n.top=r,n.bottom=o,n.right=n.top*i,n.left=-n.right}else{var s=n.right-t,l=n.left+t,u=e._maxCoord.x;e._scene.mapMode2D===Rr$2.ROTATE&&(u*=e.maximumZoomFactor),s>u&&(s=u,l=-u),s<=l&&(s=1,l=-1),i=n.top/n.right,n.right=s,n.left=l,n.top=n.right*i,n.bottom=-n.top}}function Gt$6(e,t){e.move(e.direction,t)}v$K.prototype.rotateRight=function(e){Yt$7(this,-(e=u$_(e,this.defaultRotateAmount)))},v$K.prototype.rotateLeft=function(e){Yt$7(this,e=u$_(e,this.defaultRotateAmount))},v$K.prototype.zoomIn=function(e){e=u$_(e,this.defaultZoomAmount),this._mode===C$13.SCENE2D?pt$a(this,e):Gt$6(this,e)},v$K.prototype.zoomOut=function(e){e=u$_(e,this.defaultZoomAmount),this._mode===C$13.SCENE2D?pt$a(this,-e):Gt$6(this,-e)},v$K.prototype.getMagnitude=function(){return this._mode===C$13.SCENE3D?o$1p.magnitude(this.position):this._mode===C$13.COLUMBUS_VIEW?Math.abs(this.position.z):this._mode===C$13.SCENE2D?Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom):void 0};var ki$5=new p$1d;v$K.prototype.lookAt=function(e,t){if(!e$2b(e))throw new t$16("target is required");if(!e$2b(t))throw new t$16("offset is required");if(this._mode===C$13.MORPHING)throw new t$16("lookAt is not supported while morphing.");var i=m$17.eastNorthUpToFixedFrame(e,t$13.WGS84,ki$5);this.lookAtTransform(i,t)};var Zi$4=new o$1p,Yi$3=new n$13,Gi$3=new n$13,Qi$3=new p$1e;function Qt$6(e,t,i){t=e$2a.clamp(t,-e$2a.PI_OVER_TWO,e$2a.PI_OVER_TWO),e=e$2a.zeroToTwoPi(e)-e$2a.PI_OVER_TWO;var n=n$13.fromAxisAngle(o$1p.UNIT_Y,-t,Yi$3),r=n$13.fromAxisAngle(o$1p.UNIT_Z,-e,Gi$3),o=n$13.multiply(r,n,r),a=p$1e.fromQuaternion(o,Qi$3),s=o$1p.clone(o$1p.UNIT_X,Zi$4);return p$1e.multiplyByVector(a,s,s),o$1p.negate(s,s),o$1p.multiplyByScalar(s,i,s),s}v$K.prototype.lookAtTransform=function(e,t){if(!e$2b(e))throw new t$16("transform is required");if(this._mode===C$13.MORPHING)throw new t$16("lookAtTransform is not supported while morphing.");if(this._setTransform(e),e$2b(t)){var i;if(i=e$2b(t.heading)?Qt$6(t.heading,t.pitch,t.range):t,this._mode===C$13.SCENE2D){o$1o.clone(o$1o.ZERO,this.position),o$1p.negate(i,this.up),this.up.z=0,o$1p.magnitudeSquared(this.up)l&&(l+=e$2a.TWO_PI);var c,h=.5*(u+l);if(s<-e$2a.PI_OVER_TWO+e$2a.RADIANS_PER_DEGREE&&a>e$2a.PI_OVER_TWO-e$2a.RADIANS_PER_DEGREE)c=0;else{var d=rt$h;d.longitude=h,d.latitude=a,d.height=0;var f=qi$3;f.longitude=h,f.latitude=s,f.height=0;var p=qt$8;(!e$2b(p)||p.ellipsoid!==r)&&(qt$8=p=new E$1s(void 0,void 0,r)),p.setEndPoints(d,f),c=p.interpolateUsingFraction(.5,rt$h).latitude}var _=rt$h;_.longitude=h,_.latitude=c,_.height=0;var m=r.cartographicToCartesian(_,ee$z),g=rt$h;g.longitude=l,g.latitude=a;var x=r.cartographicToCartesian(g,Xi$2);g.longitude=u;var v=r.cartographicToCartesian(g,Ki$3);g.longitude=h;var y=r.cartographicToCartesian(g,te$C);g.latitude=s;var $=r.cartographicToCartesian(g,ie$G);g.longitude=l;var b=r.cartographicToCartesian(g,$i$3);g.longitude=u;var T=r.cartographicToCartesian(g,Ji$3);o$1p.subtract(v,m,v),o$1p.subtract(b,m,b),o$1p.subtract(x,m,x),o$1p.subtract(T,m,T),o$1p.subtract(y,m,y),o$1p.subtract($,m,$);var C=r.geodeticSurfaceNormal(m,o.direction);o$1p.negate(C,C);var S=o$1p.cross(C,o$1p.UNIT_Z,o.right);o$1p.normalize(S,S);var w,E=o$1p.cross(S,C,o.up);if(e.frustum instanceof a$V){var P,A,L=Math.max(o$1p.distance(x,v),o$1p.distance(b,T)),M=Math.max(o$1p.distance(x,b),o$1p.distance(v,T)),R=e.frustum._offCenterFrustum.right/e.frustum._offCenterFrustum.top,I=M*R;L>I?A=(P=L)/R:(A=M,P=I),w=Math.max(P,A)}else{var O=Math.tan(.5*e.frustum.fovy),D=e.frustum.aspectRatio*O;if(w=Math.max(N$U(C,E,v,O),N$U(C,E,b,O),N$U(C,E,x,O),N$U(C,E,T,O),N$U(C,E,y,O),N$U(C,E,$,O),N$U(C,S,v,D),N$U(C,S,b,D),N$U(C,S,x,D),N$U(C,S,T,D),N$U(C,S,y,D),N$U(C,S,$,D)),s<0&&a>0){var B=rt$h;B.longitude=u,B.latitude=0,B.height=0;var N=r.cartographicToCartesian(B,Mt$6);o$1p.subtract(N,m,N),w=Math.max(w,N$U(C,E,N,O),N$U(C,S,N,D)),B.longitude=l,N=r.cartographicToCartesian(B,Mt$6),o$1p.subtract(N,m,N),w=Math.max(w,N$U(C,E,N,O),N$U(C,S,N,D))}}return o$1p.add(m,o$1p.multiplyByScalar(C,-w,Mt$6),i)}var ne$J=new a$18,oe$w=new o$1p,se$z=new o$1p;function ae$z(e,t,i){var n=e._projection;t.west>t.east&&(t=h$18.MAX_VALUE);var r=e._actualTransform,o=e._actualInvTransform,a=ne$J;a.longitude=t.east,a.latitude=t.north;var s=n.project(a,oe$w);p$1d.multiplyByPoint(r,s,s),p$1d.multiplyByPoint(o,s,s),a.longitude=t.west,a.latitude=t.south;var l=n.project(a,se$z);if(p$1d.multiplyByPoint(r,l,l),p$1d.multiplyByPoint(o,l,l),i.x=.5*(s.x-l.x)+l.x,i.y=.5*(s.y-l.y)+l.y,e$2b(e.frustum.fovy)){var u=Math.tan(.5*e.frustum.fovy),c=e.frustum.aspectRatio*u;i.z=.5*Math.max((s.x-l.x)/c,(s.y-l.y)/u)}else{var h=s.x-l.x,d=s.y-l.y;i.z=Math.max(h,d)}return i}var he$u=new a$18,ue$E=new o$1p,ce$w=new o$1p;function fe$t(e,t,i){var n=e._projection;t.west>t.east&&(t=h$18.MAX_VALUE);var r=he$u;r.longitude=t.east,r.latitude=t.north;var o=n.project(r,ue$E);r.longitude=t.west,r.latitude=t.south;var a,s,l=n.project(r,ce$w),u=.5*Math.abs(o.x-l.x),c=.5*Math.abs(o.y-l.y),h=e.frustum.right/e.frustum.top,d=c*h;return u>d?s=(a=u)/h:(s=c,a=d),c=Math.max(2*a,2*s),i.x=.5*(o.x-l.x)+l.x,i.y=.5*(o.y-l.y)+l.y,(r=n.unproject(i,r)).height=c,i=n.project(r,i)}v$K.prototype.getRectangleCameraCoordinates=function(e,t){if(!e$2b(e))throw new t$16("rectangle is required");var i=this._mode;return e$2b(t)||(t=new o$1p),i===C$13.SCENE3D?Xt$4(this,e,t):i===C$13.COLUMBUS_VIEW?ae$z(this,e,t):i===C$13.SCENE2D?fe$t(this,e,t):void 0};var de$w=new f$17;function le$z(e,t,i,n){i=u$_(i,t$13.WGS84);var r=e.getPickRay(t,de$w),o=g$1h.rayEllipsoid(r,i);if(o){var a=o.start>0?o.start:o.stop;return f$17.getPoint(r,a,n)}}var ve$s=new f$17;function pe$y(e,t,i,n){var r=e.getPickRay(t,ve$s).origin;r.z=0;var o=i.unproject(r);if(!(o.latitude<-e$2a.PI_OVER_TWO||o.latitude>e$2a.PI_OVER_TWO))return i.ellipsoid.cartographicToCartesian(o,n)}var ge$s=new f$17;function _e$v(e,t,i,n){var r=e.getPickRay(t,ge$s),o=-r.origin.x/r.direction.x;f$17.getPoint(r,o,n);var a=i.unproject(new o$1p(n.y,n.z,0));if(!(a.latitude<-e$2a.PI_OVER_TWO||a.latitude>e$2a.PI_OVER_TWO||a.longitude<-Math.PI||a.longitude>Math.PI))return i.ellipsoid.cartographicToCartesian(a,n)}v$K.prototype.pickEllipsoid=function(e,t,i){if(!e$2b(e))throw new t$16("windowPosition is required.");var n=this._scene.canvas;if(0!==n.clientWidth&&0!==n.clientHeight){if(e$2b(i)||(i=new o$1p),t=u$_(t,t$13.WGS84),this._mode===C$13.SCENE3D)i=le$z(this,e,t,i);else if(this._mode===C$13.SCENE2D)i=pe$y(this,e,this._projection,i);else{if(this._mode!==C$13.COLUMBUS_VIEW)return;i=_e$v(this,e,this._projection,i)}return i}};var me$x=new o$1p,Ce$l=new o$1p,ye$o=new o$1p;function we$m(e,t,i){var n=e._scene.canvas,r=n.clientWidth,o=n.clientHeight,a=Math.tan(.5*e.frustum.fovy),s=e.frustum.aspectRatio*a,l=e.frustum.near,u=2/r*t.x-1,c=2/o*(o-t.y)-1,h=e.positionWC;o$1p.clone(h,i.origin);var d=o$1p.multiplyByScalar(e.directionWC,l,me$x);o$1p.add(h,d,d);var f=o$1p.multiplyByScalar(e.rightWC,u*l*s,Ce$l),p=o$1p.multiplyByScalar(e.upWC,c*l*a,ye$o),_=o$1p.add(d,f,i.direction);return o$1p.add(_,p,_),o$1p.subtract(_,h,_),o$1p.normalize(_,_),i}var gt$8=new o$1p;function Te$r(e,t,i){var n=e._scene.canvas,r=n.clientWidth,o=n.clientHeight,a=e.frustum;e$2b(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2/r*t.x-1;s*=.5*(a.right-a.left);var l=2/o*(o-t.y)-1;l*=.5*(a.top-a.bottom);var u=i.origin;return o$1p.clone(e.position,u),o$1p.multiplyByScalar(e.right,s,gt$8),o$1p.add(gt$8,u,u),o$1p.multiplyByScalar(e.up,l,gt$8),o$1p.add(gt$8,u,u),o$1p.clone(e.directionWC,i.direction),e._mode===C$13.COLUMBUS_VIEW&&o$1p.fromElements(i.origin.z,i.origin.x,i.origin.y,i.origin),i}v$K.prototype.getPickRay=function(e,t){if(!e$2b(e))throw new t$16("windowPosition is required.");e$2b(t)||(t=new f$17);var i=this.frustum;return e$2b(i.aspectRatio)&&e$2b(i.fov)&&e$2b(i.near)?we$m(this,e,t):Te$r(this,e,t)};var Ee$q=new o$1p,Pe$m=new o$1p;v$K.prototype.distanceToBoundingSphere=function(e){if(!e$2b(e))throw new t$16("boundingSphere is required.");var t=o$1p.subtract(this.positionWC,e.center,Ee$q),i=o$1p.multiplyByScalar(this.directionWC,o$1p.dot(t,this.directionWC),Pe$m);return Math.max(0,o$1p.magnitude(i)-e.radius)};var Re$m=new o$1o;function Se$g(e,t,i,n,r,o){var a=o$1p.clone(t);return i.y>n?a.y-=i.y-n:i.y<-n&&(a.y+=-n-i.y),i.z>r?a.z-=i.z-r:i.z<-r&&(a.z+=-r-i.z),{easingFunction:m$W.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:o,update:function(i){var n=o$1p.lerp(t,a,i.time,new o$1p);e.worldToCameraCoordinatesPoint(n,e.position)}}}v$K.prototype.getPixelSize=function(e,t,i){if(!e$2b(e))throw new t$16("boundingSphere is required.");if(!e$2b(t))throw new t$16("drawingBufferWidth is required.");if(!e$2b(i))throw new t$16("drawingBufferHeight is required.");var n=this.distanceToBoundingSphere(e),r=this.frustum.getPixelDimensions(t,i,n,this._scene.pixelRatio,Re$m);return Math.max(r.x,r.y)};var Ie$n=new o$1p,Jt$6=new o$1p,Me$n=new o$1p,We$m=new o$1p;function De$q(e,t){var i=e.position,n=e.direction,r=e.worldToCameraCoordinatesVector(o$1p.UNIT_X,Ie$n),o=-o$1p.dot(r,i)/o$1p.dot(r,n),a=o$1p.add(i,o$1p.multiplyByScalar(n,o,Jt$6),Jt$6);e.cameraToWorldCoordinatesPoint(a,a),i=e.cameraToWorldCoordinatesPoint(e.position,Me$n);var s=Math.tan(.5*e.frustum.fovy),l=e.frustum.aspectRatio*s,u=o$1p.magnitude(o$1p.subtract(i,a,We$m)),c=l*u,h=s*u,d=e._maxCoord.x,f=e._maxCoord.y,p=Math.max(c-d,d),_=Math.max(h-f,f);if(i.z<-p||i.z>p||i.y<-_||i.y>_){var m=a.y<-p||a.y>p,g=a.z<-_||a.z>_;if(m||g)return Se$g(e,i,a,p,_,t)}}v$K.prototype.createCorrectPositionTween=function(e){if(!e$2b(e))throw new t$16("duration is required.");if(this._mode===C$13.COLUMBUS_VIEW)return De$q(this,e)};var xe$r=new o$1p,M$10={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};function Oe$o(e,t){var i=e.frustum,n=Math.tan(.5*i.fovy),r=i.aspectRatio*n;return Math.max(t/r,t/n)}function Ne$i(e,t){var i=e.frustum;e$2b(i._offCenterFrustum)&&(i=i._offCenterFrustum);var n,r,o=i.right/i.top,a=t*o;return t>a?r=(n=t)/o:(r=t,n=a),1.5*Math.max(n,r)}v$K.prototype.cancelFlight=function(){e$2b(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)},v$K.prototype.flyTo=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).destination;if(!e$2b(t))throw new t$16("destination is required.");if(this._mode!==C$13.MORPHING){this.cancelFlight();var i=u$_(e.orientation,u$_.EMPTY_OBJECT);if(e$2b(i.direction)&&(i=Ut$6(this,t,i,It$a.orientation)),e$2b(e.duration)&&e.duration<=0){var n=It$a;return n.destination=e.destination,n.orientation.heading=i.heading,n.orientation.pitch=i.pitch,n.orientation.roll=i.roll,n.convert=e.convert,n.endTransform=e.endTransform,this.setView(n),void("function"==typeof e.complete&&e.complete())}var r=e$2b(t.west);r&&(t=this.getRectangleCameraCoordinates(t,xe$r));var o,a=this;M$10.destination=t,M$10.heading=i.heading,M$10.pitch=i.pitch,M$10.roll=i.roll,M$10.duration=e.duration,M$10.complete=function(){o===a._currentFlight&&(a._currentFlight=void 0),e$2b(e.complete)&&e.complete()},M$10.cancel=e.cancel,M$10.endTransform=e.endTransform,M$10.convert=!r&&e.convert,M$10.maximumHeight=e.maximumHeight,M$10.pitchAdjustHeight=e.pitchAdjustHeight,M$10.flyOverLongitude=e.flyOverLongitude,M$10.flyOverLongitudeWeight=e.flyOverLongitudeWeight,M$10.easingFunction=e.easingFunction,M$10.headingFree=u$_(e.headingFree,!1),M$10.pitchFree=u$_(e.pitchFree,!1),M$10.altitudeFree=u$_(e.altitudeFree,!1),M$10.directTurning=u$_(e.directTurning,!1),M$10.interpolationMode=u$_(e.interpolationMode,j$13.NONE),M$10.catmullRomSpline=e.catmullRomSpline,M$10.preStopIndex=e.preStopIndex,M$10.flyClampToGround=this._flyClampToGround,M$10.flyRelativeHeight=this._flyRelativeHeight;var s=this._scene,l=mr$4.createTween(s,M$10);if(0===l.duration)return void("function"==typeof l.complete&&l.complete());o=s.tweens.add(l),this._currentFlight=o;var u=this._scene.preloadFlightCamera;this._mode!==C$13.SCENE2D&&(e$2b(u)||(u=v$K.clone(this)),u.setView({destination:t,orientation:i}),this._scene.preloadFlightCullingVolume=u.frustum.computeCullingVolume(u.positionWC,u.directionWC,u.upWC))}};var Ae$s=100;function Kt$7(e,t,i){e$2b(i)||(i=a$T.clone(v$K.DEFAULT_OFFSET));var n=e._scene.screenSpaceCameraController.minimumZoomDistance,r=e._scene.screenSpaceCameraController.maximumZoomDistance,o=i.range;if(!e$2b(o)||0===o){var a=t.radius;0===a?i.range=Ae$s:e.frustum instanceof a$V||e._mode===C$13.SCENE2D?i.range=Ne$i(e,a):i.range=Oe$o(e,a),i.range=e$2a.clamp(i.range,n,r)}return i}v$K.prototype.viewBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("boundingSphere is required.");if(this._mode===C$13.MORPHING)throw new t$16("viewBoundingSphere is not supported while morphing.");t=Kt$7(this,e,t),this.lookAt(e.center,t)};var Fe$l=new p$1d,Ve$k=new o$1p,ze$f=new o$1p,Be$m=new o$1p,be$t=new o$1p,Le$r=new e$29,He$b=new n$13,Ue$i=new p$1e;v$K.prototype.flyToBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("boundingSphere is required.");t=u$_(t,u$_.EMPTY_OBJECT);var i=this._mode===C$13.SCENE2D||this._mode===C$13.COLUMBUS_VIEW;this._setTransform(p$1d.IDENTITY);var n,r=Kt$7(this,e,t.offset);n=i?o$1p.multiplyByScalar(o$1p.UNIT_Z,r.range,Ve$k):Qt$6(r.heading,r.pitch,r.range);var o,a,s=m$17.eastNorthUpToFixedFrame(e.center,t$13.WGS84,Fe$l);if(p$1d.multiplyByPoint(s,n,n),!i){if(o=o$1p.subtract(e.center,n,ze$f),o$1p.normalize(o,o),a=p$1d.multiplyByPointAsVector(s,o$1p.UNIT_Z,Be$m),1-Math.abs(o$1p.dot(o,a))e$2a.PI?u+=e$2a.TWO_PI-f:u+=f,c=d}return e$2a.equalsEpsilon(Math.abs(u),e$2a.TWO_PI,e$2a.EPSILON9)&&(t.west=-e$2a.PI,t.east=e$2a.PI,q$13[0].latitude>=0?t.north=e$2a.PI_OVER_TWO:t.south=-e$2a.PI_OVER_TWO),t}},v$K.prototype.switchToPerspectiveFrustum=function(){if(!(this._mode===C$13.SCENE2D||this.frustum instanceof o$15)){var e=this._scene;this.frustum=new o$15,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=e$2a.toRadians(60)}},v$K.prototype.switchToOrthographicFrustum=function(){if(!(this._mode===C$13.SCENE2D||this.frustum instanceof a$V)){var e=this._scene;this.frustum=new a$V,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.width=o$1p.magnitude(this.position),e$2b(this.frustum.projectionMatrix)&&this._adjustOrthographicFrustum(!0)}},v$K.clone=function(e,t){return e$2b(t)||(t=new v$K(e._scene)),o$1p.clone(e.position,t.position),o$1p.clone(e.direction,t.direction),o$1p.clone(e.up,t.up),o$1p.clone(e.right,t.right),p$1d.clone(e._transform,t.transform),t._mode=e._mode,t._transformChanged=!0,t.frustum=e.frustum.clone(),t},v$K.prototype.enableReflection=function(e){this.bReflect=!0,Ze$8(e,this._reflectMatrix),D$X(this),this.frustum.reflect=!0,this.frustum.clipPlane=e,this.frustum.currentViewMatrix=this._viewMatrix},v$K.prototype.disableReflection=function(){this.bReflect=!1,this.frustum.reflect=!1,this.frustum instanceof o$15&&this.frustum.resetProjectionMatrix(),D$X(this)};var Ye$g=new p$1d,Ge$h=new p$1d,J$V=0,mt$7=!1;v$K.prototype.flyCircle=function(e){J$V=0,mt$7=!1,this._isFlyCircle=!1,this._flyCircle(e)},v$K.prototype._flyCircle=function(e){if(this._flyCircleLoop||!mt$7){(!this._isFlyCircle||this._isResetFlyCircleParm)&&(Et$a(),J$V=0,mt$7=!1,this._flyCircleCenter=o$1p.clone(e),this._isFlyCircle=!0,this._isResetFlyCircleParm=!1);var t=this.constrainedAxis,i=p$1d.clone(this.transform,Ge$h),n=m$17.eastNorthUpToFixedFrame(e,t$13.WGS84,Ye$g);this._setTransform(n),this.constrainedAxis=o$1p.UNIT_Z,Et$a();var r=.01;r*=this._speedRatio;var o=2*Math.PI-Math.abs(J$V);J$V<0&&(o*=-1),!this._flyCircleLoop&&Math.abs(J$V)>=2*Math.PI&&(r=o,mt$7=!0),J$V+=r,this.rotateRight(-r),this.constrainedAxis=t,this._setTransform(i)}else J$V=0},v$K.prototype.stopFlyCircle=function(){this._isFlyCircle=!1};var t$S={FRONT:de$x.FRONT,BACK:de$x.BACK,FRONT_AND_BACK:de$x.FRONT_AND_BACK},G$17=Object.freeze(t$S),j$12=0,I$1b=1;function z$T(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.frustum",e.frustum),o$1q.typeOf.object("options.origin",e.origin),o$1q.typeOf.object("options.orientation",e.orientation);var t,i,n=e.frustum,r=e.orientation,o=e.origin,a=u$_(e.vertexFormat,n$11.DEFAULT),s=u$_(e._drawNearPlane,!0);n instanceof o$15?(t=j$12,i=o$15.packedLength):n instanceof a$V&&(t=I$1b,i=a$V.packedLength),this._frustumType=t,this._frustum=n.clone(),this._origin=o$1p.clone(o),this._orientation=n$13.clone(r),this._drawNearPlane=s,this._vertexFormat=a,this._workerName="createFrustumGeometry",this.packedLength=2+i+o$1p.packedLength+n$13.packedLength+n$11.packedLength}z$T.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0);var n=e._frustumType,r=e._frustum;return t[i++]=n,n===j$12?(o$15.pack(r,t,i),i+=o$15.packedLength):(a$V.pack(r,t,i),i+=a$V.packedLength),o$1p.pack(e._origin,t,i),i+=o$1p.packedLength,n$13.pack(e._orientation,t,i),i+=n$13.packedLength,n$11.pack(e._vertexFormat,t,i),t[i+=n$11.packedLength]=e._drawNearPlane?1:0,t};var ee$y=new o$15,re$G=new a$V,ae$y=new n$13,te$B=new o$1p,oe$v=new n$11;function R$W(e,t,i,n,r,o,a,s){for(var l=e/3*2,u=0;u<4;++u)e$2b(t)&&(t[e]=o.x,t[e+1]=o.y,t[e+2]=o.z),e$2b(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e$2b(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),e+=3;r[l]=0,r[l+1]=0,r[l+2]=1,r[l+3]=0,r[l+4]=1,r[l+5]=1,r[l+6]=0,r[l+7]=1}z$T.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n,r=e[t++];r===j$12?(n=o$15.unpack(e,t,ee$y),t+=o$15.packedLength):(n=a$V.unpack(e,t,re$G),t+=a$V.packedLength);var o=o$1p.unpack(e,t,te$B);t+=o$1p.packedLength;var a=n$13.unpack(e,t,ae$y);t+=n$13.packedLength;var s=n$11.unpack(e,t,oe$v),l=1===e[t+=n$11.packedLength];if(!e$2b(i))return new z$T({frustum:n,origin:o,orientation:a,vertexFormat:s,_drawNearPlane:l});var u=r===i._frustumType?i._frustum:void 0;return i._frustum=n.clone(u),i._frustumType=r,i._origin=o$1p.clone(o,i._origin),i._orientation=n$13.clone(a,i._orientation),i._vertexFormat=n$11.clone(s,i._vertexFormat),i._drawNearPlane=l,i};var ie$F=new p$1e,ve$r=new p$1d,q$12=new p$1d,K$R=new o$1p,W$_=new o$1p,Z$Z=new o$1p,pe$x=new o$1p,ce$v=new o$1p,me$w=new o$1p,C$11=new Array(3),Y$O=new Array(4);Y$O[0]=new e$29(-1,-1,1,1),Y$O[1]=new e$29(1,-1,1,1),Y$O[2]=new e$29(1,1,1,1),Y$O[3]=new e$29(-1,1,1,1);for(var $$_=new Array(4),J$U=0;J$U<4;++J$U)$$_[J$U]=new e$29;z$T._computeNearFarPlanes=function(e,t,i,n,r,o,a,s){var l=p$1e.fromQuaternion(t,ie$F),u=u$_(o,K$R),c=u$_(a,W$_),h=u$_(s,Z$Z);u=p$1e.getColumn(l,0,u),c=p$1e.getColumn(l,1,c),h=p$1e.getColumn(l,2,h),o$1p.normalize(u,u),o$1p.normalize(c,c),o$1p.normalize(h,h),o$1p.negate(u,u);var d,f,p=p$1d.computeView(e,h,c,u,ve$r);if(i===j$12){var _=n.projectionMatrix,m=p$1d.multiply(_,p,q$12);f=p$1d.inverse(m,q$12)}else d=p$1d.inverseTransformation(p,q$12);e$2b(f)?(C$11[0]=n.near,C$11[1]=n.far):(C$11[0]=0,C$11[1]=n.near,C$11[2]=n.far);for(var g=0;g<2;++g)for(var x=0;x<4;++x){var v=e$29.clone(Y$O[x],$$_[x]);if(e$2b(f)){var y=1/(v=p$1d.multiplyByVector(f,v,v)).w;o$1p.multiplyByScalar(v,y,v),o$1p.subtract(v,e,v),o$1p.normalize(v,v);var $=o$1p.dot(h,v);o$1p.multiplyByScalar(v,C$11[g]/$,v),o$1p.add(v,e,v)}else{e$2b(n._offCenterFrustum)&&(n=n._offCenterFrustum);var b=C$11[g],T=C$11[g+1];v.x=.5*(v.x*(n.right-n.left)+n.left+n.right),v.y=.5*(v.y*(n.top-n.bottom)+n.bottom+n.top),v.z=.5*(v.z*(b-T)-b-T),v.w=1,p$1d.multiplyByVector(d,v,v)}r[12*g+3*x]=v.x,r[12*g+3*x+1]=v.y,r[12*g+3*x+2]=v.z}},z$T.createGeometry=function(e){var t=e._frustumType,i=e._frustum,n=e._origin,r=e._orientation,o=e._drawNearPlane,a=e._vertexFormat,s=o?6:5,l=new Float64Array(72);z$T._computeNearFarPlanes(n,r,t,i,l);var u=24;l[u]=l[12],l[u+1]=l[13],l[u+2]=l[14],l[u+3]=l[0],l[u+4]=l[1],l[u+5]=l[2],l[u+6]=l[9],l[u+7]=l[10],l[u+8]=l[11],l[u+9]=l[21],l[u+10]=l[22],l[u+11]=l[23],l[u+=12]=l[15],l[u+1]=l[16],l[u+2]=l[17],l[u+3]=l[3],l[u+4]=l[4],l[u+5]=l[5],l[u+6]=l[0],l[u+7]=l[1],l[u+8]=l[2],l[u+9]=l[12],l[u+10]=l[13],l[u+11]=l[14],l[u+=12]=l[3],l[u+1]=l[4],l[u+2]=l[5],l[u+3]=l[15],l[u+4]=l[16],l[u+5]=l[17],l[u+6]=l[18],l[u+7]=l[19],l[u+8]=l[20],l[u+9]=l[6],l[u+10]=l[7],l[u+11]=l[8],l[u+=12]=l[6],l[u+1]=l[7],l[u+2]=l[8],l[u+3]=l[18],l[u+4]=l[19],l[u+5]=l[20],l[u+6]=l[21],l[u+7]=l[22],l[u+8]=l[23],l[u+9]=l[9],l[u+10]=l[10],l[u+11]=l[11],o||(l=l.subarray(12));var c=new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:l})});if(e$2b(a.normal)||e$2b(a.tangent)||e$2b(a.bitangent)||e$2b(a.st)){var h=e$2b(a.normal)?new Float32Array(12*s):void 0,d=e$2b(a.tangent)?new Float32Array(12*s):void 0,f=e$2b(a.bitangent)?new Float32Array(12*s):void 0,p=e$2b(a.st)?new Float32Array(8*s):void 0,_=K$R,m=W$_,g=Z$Z,x=o$1p.negate(_,pe$x),v=o$1p.negate(m,ce$v),y=o$1p.negate(g,me$w);u=0,o&&(R$W(u,h,d,f,p,y,_,m),u+=12),R$W(u,h,d,f,p,g,x,m),R$W(u+=12,h,d,f,p,x,y,m),R$W(u+=12,h,d,f,p,v,y,x),R$W(u+=12,h,d,f,p,_,g,m),R$W(u+=12,h,d,f,p,m,g,x),e$2b(h)&&(c.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:h})),e$2b(d)&&(c.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:d})),e$2b(f)&&(c.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:f})),e$2b(p)&&(c.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:p}))}for(var $=new Uint16Array(6*s),b=0;b=this._numberOfInstances)throw new t$16("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new t$16("attributeIndex is out of range");var n,r=this._attributes,o=this._offsets[t],a=4*this._stride*e+4*o;n=this._packFloats&&r[t].componentDatatype!==_$$.UNSIGNED_BYTE?P$Y(this._batchValues,a,w$S):e$29.unpack(this._batchValues,a,w$S);var s=g$14(r,t);return e$2b(s.fromCartesian4)?s.fromCartesian4(n,i):e$2b(s.clone)?s.clone(n,i):n.x};var R$V=[void 0,void 0,new o$1o,new o$1p,new e$29],q$11=new e$29;function W$Z(e,t){var i=e._textureDimensions;e._texture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:e._pixelDatatype,width:i.x,height:i.y,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),flipY:!1})}function j$10(e){var t=e._textureDimensions;e._texture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function H$_(e){var t=e.useUBO,i=e._stride;return 1===e._textureDimensions.y?(t?"":"uniform vec4 batchTextureStep{suffix}; \n")+"vec2 computeSt{suffix}(float batchId) \n{ \n float stepX = batchTextureStep{suffix}.x; \n float centerX = batchTextureStep{suffix}.y; \n float numberOfAttributes = float("+i+"); \n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5); \n} \n":(t?"":"uniform vec4 batchTextureStep{suffix}; \nuniform vec2 batchTextureDimensions{suffix}; \n")+"vec2 computeSt{suffix}(float batchId) \n{ \n float stepX = batchTextureStep{suffix}.x; \n float centerX = batchTextureStep{suffix}.y; \n float stepY = batchTextureStep{suffix}.z; \n float centerY = batchTextureStep{suffix}.w; \n float numberOfAttributes = float("+i+"); \n float xId = mod(batchId * numberOfAttributes, batchTextureDimensions{suffix}.x); \n float yId = floor(batchId * numberOfAttributes / batchTextureDimensions{suffix}.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function J$T(e){var t=e._stride;return 1===e._textureDimensions.y?""+"fn computeSt{suffix}(batchId : f32) -> vec2 \n{ \n var stepX = Mesh.batchTextureStep{suffix}.x; \n var centerX = Mesh.batchTextureStep{suffix}.y; \n var numberOfAttributes = f32("+t+"); \n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5f); \n} \n":""+"fn computeSt{suffix}(batchId : f32) -> vec2 \n{ \n var stepX = Mesh.batchTextureStep{suffix}.x; \n var centerX = Mesh.batchTextureStep{suffix}.y; \n var stepY = Mesh.batchTextureStep{suffix}.z; \n var centerY = Mesh.batchTextureStep{suffix}.w; \n var numberOfAttributes = f32("+t+"); \n var d = floor((batchId * numberOfAttributes) / Mesh.batchTextureDimensions{suffix}.x); \n var xId = batchId * numberOfAttributes - d * Mesh.batchTextureDimensions{suffix}.x; \n var yId = floor(batchId * numberOfAttributes / Mesh.batchTextureDimensions{suffix}.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function K$Q(e){return 1===e?"float":"vec"+e}function Q$X(e){return 1===e?"f32":"vec"+e+""}function F$$(e){return 1===e?".x":2===e?".xy":3===e?".xyz":""}function Z$X(e,t){var i=e._attributes[t],n=i.componentsPerAttribute,r=i.functionName,o=K$Q(n),a=F$$(n),s=o+" "+r+"(float batchId) \n{ \n vec2 st = computeSt{suffix}(batchId); \n st.x += batchTextureStep{suffix}.x * float("+e._offsets[t]+"); \n";return e._packFloats&&i.componentDatatype!==_$$.UNSIGNED_BYTE?s+="vec4 textureValue; \ntextureValue.x = czm_unpackFloat(texture2D(batchTexture{suffix}, st)); \ntextureValue.y = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x, 0.0))); \ntextureValue.z = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x * 2.0, 0.0))); \ntextureValue.w = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x * 3.0, 0.0))); \n":s+=" vec4 textureValue = texture2D(batchTexture{suffix}, st); \n",s+=" "+o+" value = textureValue"+a+"; \n",e._pixelDatatype!==_$$.UNSIGNED_BYTE||i.componentDatatype!==S$12.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===_$$.FLOAT&&i.componentDatatype===S$12.UNSIGNED_BYTE&&i.normalize&&(s+="value /= 255.0; \n"):s+="value *= 255.0; \n",s+=" return value; \n} \n"}function $$Z(e,t){var i=e._attributes[t],n=i.componentsPerAttribute,r=i.functionName,o=Q$X(n),a=F$$(n),s="fn "+r+"(batchId : f32) ->"+o+"{ \n var st = computeSt{suffix}(batchId); \n st.x += Mesh.batchTextureStep{suffix}.x * f32("+e._offsets[t]+"); \n";return e._packFloats&&i.componentDatatype!==_$$.UNSIGNED_BYTE?s+="var textureValue : vec4; \ntextureValue.x = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st, 0.0f)); \ntextureValue.y = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st + vec2(Material.batchTextureStep{suffix}.x, 0.0f), 0.0f)); \ntextureValue.z = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st + vec2(Material.batchTextureStep{suffix}.x * 2.0f, 0.0f), 0.0f)); \ntextureValue.w = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st + vec2(Material.batchTextureStep{suffix}.x * 3.0f, 0.0f), 0.0f)); \n":s+=" var textureValue = textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st, 0.0f); \n",s+=" var value = textureValue"+a+"; \n",e._pixelDatatype!==_$$.UNSIGNED_BYTE||i.componentDatatype!==S$12.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===_$$.FLOAT&&i.componentDatatype===S$12.UNSIGNED_BYTE&&i.normalize&&(s+=" value /= 255.0f; \n"):s+=" value *= 255.0f; \n",s+=" return value; \n} \n"}function e$1H(e,t,i,n,r){this._format=e,this._width=t,this._height=i,this._buffer=n,this._datatype=r}h$W.prototype.setBatchedAttribute=function(e,t,i){if(e<0||e>=this._numberOfInstances)throw new t$16("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new t$16("attributeIndex is out of range");if(!e$2b(i))throw new t$16("value is required.");var n=this._attributes,r=R$V[n[t].componentsPerAttribute],o=this.getBatchedAttribute(e,t,r),a=g$14(this._attributes,t);if(!(e$2b(a.equals)?a.equals(o,i):o===i)){var s=q$11;s.x=e$2b(i.x)?i.x:i,s.y=e$2b(i.y)?i.y:0,s.z=e$2b(i.z)?i.z:0,s.w=e$2b(i.w)?i.w:0;var l=this._offsets[t],u=4*this._stride*e+4*l;this._packFloats&&n[t].componentDatatype!==_$$.UNSIGNED_BYTE?L$14(s,this._batchValues,u):e$29.pack(s,this._batchValues,u),this._batchValuesDirty=!0}},h$W.prototype.update=function(e){e$2b(this._texture)&&!this._batchValuesDirty||0===this._attributes.length||(this._batchValuesDirty=!1,e$2b(this._texture)||W$Z(this,e.context),j$10(this))},h$W.prototype.getUniformMapCallback=function(){var e=this;return function(t){if(0===e._attributes.length)return t;var i={};return i["batchTexture"+e._suffix]=function(){return e._texture},e.useUBO||(i["batchTextureDimensions"+e._suffix]=function(){return e._textureDimensions},i["batchTextureStep"+e._suffix]=function(){return e._textureStep}),p$19(t,i)}},h$W.prototype.getVertexShaderCallback=function(e){return(e=u$_(e,!1))?this._getWgslVertexShaderCallback():this._getGlslVertexShaderCallback()},h$W.prototype._getGlslVertexShaderCallback=function(){var e=this._attributes;if(0===e.length)return function(e){return e};var t="uniform highp sampler2D batchTexture{suffix}; \n";s$Y.isPCBroswer()&&(t="uniform sampler2D batchTexture{suffix}; \n"),t+=H$_(this)+"\n";for(var i=e.length,n=0;n1},h$W.prototype.isDestroyed=function(){return!1},h$W.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),i$10(this)},Object.defineProperties(e$1H.prototype,{internalFormat:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},pixelDatatype:{get:function(){return this._datatype}}}),e$1H.clone=function(e){if(e$2b(e))return new e$1H(e._format,e._width,e._height,e._buffer,e._datatype)},e$1H.prototype.clone=function(){return e$1H.clone(this)};var t$P,p$X=!1,I$1a=new i$V("transcodeCRNToDXTprevious",Number.POSITIVE_INFINITY);function a$P(e,t,i){if(i){if(!e$2b(e))throw new t$16("resourceOrUrlOrBuffer is required.");if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))n=o$1l.resolve(e);else n=t$11.createIfNeeded(e).fetchArrayBuffer();return e$2b(n)?n.then((function(e){if(e$2b(e)){var t=[];return e instanceof ArrayBuffer?t.push(e):(0===e.byteOffset&&e.byteLength===e.buffer.byteLength||(e=e.slice(0,e.length)),t.push(e.buffer)),I$1a.scheduleTask(e,t)}})).then((function(e){return e$1H.clone(e)})):void 0}if(e$2b(t$P)||(t$P=new i$V("transcodeCRNToDXT",Number.POSITIVE_INFINITY)).initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){p$X=!0})),p$X){if(!e$2b(e))throw new t$16("resourceOrUrlOrBuffer is required.");var n;return e$2b(n=e instanceof ArrayBuffer||ArrayBuffer.isView(e)?o$1l.resolve(e):t$11.createIfNeeded(e).fetchArrayBuffer())?n.then((function(e){if(e$2b(e)){var i=[];e instanceof ArrayBuffer?i.push(e):(0===e.byteOffset&&e.byteLength===e.buffer.byteLength||(e=e.slice(0,e.length)),i.push(e.buffer));var n=u$_(t,!1);return t$P.scheduleTask({data:e,bMipMap:n},i)}})).then((function(e){return e$1H.clone(e)})):void 0}}function k$V(e){var t;(o$1q.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?t=o$1l.resolve(e):t=t$11.createIfNeeded(e).fetchArrayBuffer();if(e$2b(t))return t.then((function(e){if(e$2b(e))return P$X(e)}))}var c$Z=[171,75,84,88,32,49,49,187,13,10,26,10],L$13=67305985,F$_=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"],n$X=4;function P$X(e){var t,i,n,r=new Uint8Array(e),o=!0;for(t=0;t>t,w=f>>t,E=V$10.isCompressedFormat(c)?V$10.compressedTextureSizeInBytes(c,S,w):V$10.textureSizeInBytes(c,s,S,w),P=new Uint8Array(v.buffer,$,E);T[F$_[C]]=new e$1H(c,S,w,P),$+=E}$+=3-($+3)%4+4}var A=b;if(1===m)for(t=0;t-1)return!0;return!1}function _e$u(e){var t=e._template.components,i=e._template.source;if(e$2b(i))e.shaderSource+=i+"\n";else{if(e.shaderSource+="czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n",e.shaderSource+="czm_material material = czm_getDefaultMaterial(materialInput);\n",e$2b(t)){var n=Object.keys(e._template.materials).length>0;for(var r in t)if(t.hasOwnProperty(r))if("diffuse"===r||"emission"===r){var o=n&&ye$n(t[r],e)?t[r]:"czm_gammaCorrect("+t[r]+")";e.shaderSource+="material."+r+" = "+o+"; \n"}else e.shaderSource+="alpha"===r?"material.alpha = "+t.alpha+"; \n":"material."+r+" = "+t[r]+";\n"}e.shaderSource+="return material;\n}\n"}}var k$U={mat2:f$13,mat3:p$1e,mat4:p$1d},ve$q=/\.ktx$/i,Te$q=/\.crn$/i;function ge$r(e){var t;return function(i,n){var r=i.uniforms,o=r[e],a=t!==o;t=o;var s,l,u=i._textures[e];if(o instanceof HTMLVideoElement)if(o.readyState>=2){if(a&&e$2b(u)&&(u!==n.defaultTexture&&u.destroy(),u=void 0),!e$2b(u)||u===n.defaultTexture)return u=new t$V({context:n,source:o,sampler:new e$1P({minificationFilter:i._minificationFilter,magnificationFilter:i._magnificationFilter})}),void(i._textures[e]=u);u.copyFrom(o)}else e$2b(u)||(i._textures[e]=n.defaultTexture);else{if(o instanceof t$V&&o!==u){i._texturePaths[e]=void 0;var c=i._textures[e];return c!==i._defaultTexture&&c.destroy(),i._textures[e]=o,s=e+"Dimensions",void(r.hasOwnProperty(s)&&(l=r[s],l.x=o._width,l.y=o._height))}if(e$2b(u)||(i._texturePaths[e]=void 0,e$2b(i._defaultTexture)||(i._defaultTexture=n.defaultTexture),u=i._textures[e]=i._defaultTexture,s=e+"Dimensions",r.hasOwnProperty(s)&&((l=r[s]).x=u._width,l.y=u._height)),o!==r$X.DefaultImageId){var h=o instanceof t$11;if(!e$2b(i._texturePaths[e])||h&&o.url!==i._texturePaths[e].url||!h&&o!==i._texturePaths[e]){if("string"==typeof o||h){var d=h?o:t$11.createIfNeeded(o);o$1l(ve$q.test(d.url)?k$V(d):Te$q.test(d.url)?a$P(d):d.fetchImage(),(function(t){i._loadedImages.push({id:e,image:t})}))}else(o instanceof HTMLCanvasElement||o instanceof HTMLImageElement)&&i._loadedImages.push({id:e,image:o});i._texturePaths[e]=o}}}}}function Me$m(e){return function(t,i){var n=t.uniforms[e];if(n instanceof e$1M){var r=t._textures[e];return r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,void(t._textures[e]=n)}if(e$2b(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=i.defaultCubeMap),n!==r$X.DefaultCubeMapId){var o=n.positiveX+n.negativeX+n.positiveY+n.negativeY+n.positiveZ+n.negativeZ;if(o!==t._texturePaths[e]){var a=[t$11.createIfNeeded(n.positiveX).fetchImage(),t$11.createIfNeeded(n.negativeX).fetchImage(),t$11.createIfNeeded(n.positiveY).fetchImage(),t$11.createIfNeeded(n.negativeY).fetchImage(),t$11.createIfNeeded(n.positiveZ).fetchImage(),t$11.createIfNeeded(n.negativeZ).fetchImage()];o$1l.all(a).then((function(i){t._loadedCubeMaps.push({id:e,images:i})})),t._texturePaths[e]=o}}}}function we$l(e){var t=e._template.uniforms;for(var i in t)t.hasOwnProperty(i)&&N$T(e,i)}function N$T(e,t){var i=e._strict,n=e._template.uniforms,r=n[t],o=Ce$k(r);if(!e$2b(o))throw new t$16("fabric: uniform '"+t+"' has invalid type.");if("channels"===o){if(0===C$_(e,t,r,!1)&&i)throw new t$16("strict: shader source does not use channels '"+t+"'.")}else{if("sampler2D"===o){var a=t+"Dimensions";be$s(e,a)>0&&(n[a]={type:"ivec3",x:1,y:1},N$T(e,a))}if(!new RegExp("uniform\\s+"+o+"\\s+"+t+"\\s*;").test(e.shaderSource)){var s="uniform "+o+" "+t+";";e.shaderSource=s+e.shaderSource}var l=t+"_"+e._count++;if(1===C$_(e,t,l)&&i)throw new t$16("strict: shader source does not use uniform '"+t+"'.");if(e.uniforms[t]=r,"sampler2D"===o)e._uniforms[l]=function(){var i=e._textures[t];return i&&i._texture?i:e._defaultTexture},e._updateFunctions.push(ge$r(t));else if("samplerCube"===o)e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(Me$m(t));else if(-1!==o.indexOf("mat")){var u=new k$U[o];e._uniforms[l]=function(){return k$U[o].fromColumnMajorArray(e.uniforms[t],u)}}else e._uniforms[l]=function(){return e.uniforms[t]}}}function Ce$k(e){var t=e.type;if(!e$2b(t)){var i=typeof e;if("number"===i)t="float";else if("boolean"===i)t="bool";else if("string"===i||e instanceof t$V||e instanceof t$11||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)t=/^([rgba]){1,4}$/i.test(e)?"channels":e===r$X.DefaultCubeMapId?"samplerCube":"sampler2D";else if("object"===i)if(Array.isArray(e))(4===e.length||9===e.length||16===e.length)&&(t="mat"+Math.sqrt(e.length));else{var n=0;for(var r in e)e.hasOwnProperty(r)&&(n+=1);n>=2&&n<=4?t="vec"+n:6===n&&(t="samplerCube")}}return t}function xe$q(e){var t=e._strict,i=e._template.materials;for(var n in i)if(i.hasOwnProperty(n)){var r=new r$X({strict:t,fabric:i[n],count:e._count});e._count=r._count,e._uniforms=p$19(e._uniforms,r._uniforms,!0),e.materials[n]=r,e._translucentFunctions=e._translucentFunctions.concat(r._translucentFunctions);var o="czm_getMaterial",a=o+"_"+e._count++;if(C$_(r,o,a),e.shaderSource=r.shaderSource+e.shaderSource,0===C$_(e,n,a+"(materialInput)")&&t)throw new t$16("strict: shader source does not use material '"+n+"'.")}}function C$_(e,t,i,n){n=u$_(n,!0);var r=0,o=new RegExp("([\\w"+(n?".":"")+"])?"+t+"([\\w])?","g");return e.shaderSource=e.shaderSource.replace(o,(function(e,t,n){return t||n?e:(r+=1,i)})),r}function be$s(e,t,i){return C$_(e,t,t,i)}r$X._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}},r$X.DefaultImageId="czm_defaultImage",r$X.DefaultCubeMapId="czm_defaultCubeMap",r$X.ColorType="Color",r$X._materialCache.addMaterial(r$X.ColorType,{fabric:{type:r$X.ColorType,uniforms:{color:new e$1U(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),r$X.ImageType="Image",r$X._materialCache.addMaterial(r$X.ImageType,{fabric:{type:r$X.ImageType,uniforms:{image:r$X.DefaultImageId,repeat:new o$1o(1,1),color:new e$1U(1,1,1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture2D(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),r$X.DiffuseMapType="DiffuseMap",r$X._materialCache.addMaterial(r$X.DiffuseMapType,{fabric:{type:r$X.DiffuseMapType,uniforms:{image:r$X.DefaultImageId,channels:"rgb",repeat:new o$1o(1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),r$X.AlphaMapType="AlphaMap",r$X._materialCache.addMaterial(r$X.AlphaMapType,{fabric:{type:r$X.AlphaMapType,uniforms:{image:r$X.DefaultImageId,channel:"a",repeat:new o$1o(1,1)},components:{alpha:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!0}),r$X.SpecularMapType="SpecularMap",r$X._materialCache.addMaterial(r$X.SpecularMapType,{fabric:{type:r$X.SpecularMapType,uniforms:{image:r$X.DefaultImageId,channel:"r",repeat:new o$1o(1,1)},components:{specular:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!1}),r$X.EmissionMapType="EmissionMap",r$X._materialCache.addMaterial(r$X.EmissionMapType,{fabric:{type:r$X.EmissionMapType,uniforms:{image:r$X.DefaultImageId,channels:"rgb",repeat:new o$1o(1,1)},components:{emission:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),r$X.BumpMapType="BumpMap",r$X._materialCache.addMaterial(r$X.BumpMapType,{fabric:{type:r$X.BumpMapType,uniforms:{image:r$X.DefaultImageId,channel:"r",strength:.8,repeat:new o$1o(1,1)},source:j$$},translucent:!1}),r$X.NormalMapType="NormalMap",r$X._materialCache.addMaterial(r$X.NormalMapType,{fabric:{type:r$X.NormalMapType,uniforms:{image:r$X.DefaultImageId,channels:"rgb",strength:.8,repeat:new o$1o(1,1)},source:V$R},translucent:!1}),r$X.GridType="Grid",r$X._materialCache.addMaterial(r$X.GridType,{fabric:{type:r$X.GridType,uniforms:{color:new e$1U(0,1,0,1),cellAlpha:.1,lineCount:new o$1o(8,8),lineThickness:new o$1o(1,1),lineOffset:new o$1o(0,0)},source:Q$W},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}}),r$X.StripeType="Stripe",r$X._materialCache.addMaterial(r$X.StripeType,{fabric:{type:r$X.StripeType,uniforms:{horizontal:!0,evenColor:new e$1U(1,1,1,.5),oddColor:new e$1U(0,0,1,.5),offset:0,repeat:5},source:ne$I},translucent:function(e){var t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}}),r$X.CheckerboardType="Checkerboard",r$X._materialCache.addMaterial(r$X.CheckerboardType,{fabric:{type:r$X.CheckerboardType,uniforms:{lightColor:new e$1U(1,1,1,.5),darkColor:new e$1U(0,0,0,.5),repeat:new o$1o(5,5)},source:J$S},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),r$X.DotType="Dot",r$X._materialCache.addMaterial(r$X.DotType,{fabric:{type:r$X.DotType,uniforms:{lightColor:new e$1U(1,1,0,.75),darkColor:new e$1U(0,1,1,.75),repeat:new o$1o(5,5)},source:$$Y},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),r$X.WaterType="Water",r$X._materialCache.addMaterial(r$X.WaterType,{fabric:{type:r$X.WaterType,uniforms:{baseWaterColor:new e$1U(.2,.3,.6,1),blendColor:new e$1U(0,1,.699,1),specularMap:r$X.DefaultImageId,normalMap:r$X.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:le$y},translucent:function(e){var t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}}),r$X.RimLightingType="RimLighting",r$X._materialCache.addMaterial(r$X.RimLightingType,{fabric:{type:r$X.RimLightingType,uniforms:{color:new e$1U(1,0,0,.7),rimColor:new e$1U(1,1,1,.4),width:.3},source:ae$x},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}}),r$X.FadeType="Fade",r$X._materialCache.addMaterial(r$X.FadeType,{fabric:{type:r$X.FadeType,uniforms:{fadeInColor:new e$1U(1,0,0,1),fadeOutColor:new e$1U(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new o$1o(.5,.5)},source:K$P},translucent:function(e){var t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}}),r$X.PolylineArrowType="PolylineArrow",r$X._materialCache.addMaterial(r$X.PolylineArrowType,{fabric:{type:r$X.PolylineArrowType,uniforms:{color:new e$1U(1,1,1,1)},source:ee$x},translucent:!0}),r$X.PolylineDashType="PolylineDash",r$X._materialCache.addMaterial(r$X.PolylineDashType,{fabric:{type:r$X.PolylineDashType,uniforms:{color:new e$1U(1,0,1,1),gapColor:new e$1U(0,0,0,0),dashLength:16,dashPattern:255},source:te$A},translucent:!0}),r$X.PolylineGlowType="PolylineGlow",r$X._materialCache.addMaterial(r$X.PolylineGlowType,{fabric:{type:r$X.PolylineGlowType,uniforms:{color:new e$1U(0,.5,1,1),glowPower:.25,taperPower:1},source:re$F},translucent:!0}),r$X.PolylineOutlineType="PolylineOutline",r$X._materialCache.addMaterial(r$X.PolylineOutlineType,{fabric:{type:r$X.PolylineOutlineType,uniforms:{color:new e$1U(1,1,1,1),outlineColor:new e$1U(1,0,0,1),outlineWidth:1},source:R$U},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}}),r$X.ElevationContourType="ElevationContour",r$X._materialCache.addMaterial(r$X.ElevationContourType,{fabric:{type:r$X.ElevationContourType,uniforms:{spacing:100,color:new e$1U(1,0,0,1),width:1},source:q$10},translucent:!1}),r$X.ElevationRampType="ElevationRamp",r$X._materialCache.addMaterial(r$X.ElevationRampType,{fabric:{type:r$X.ElevationRampType,uniforms:{image:r$X.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:U$$},translucent:!1}),r$X.SlopeRampMaterialType="SlopeRamp",r$X._materialCache.addMaterial(r$X.SlopeRampMaterialType,{fabric:{type:r$X.SlopeRampMaterialType,uniforms:{image:r$X.DefaultImageId},source:ie$E},translucent:!1}),r$X.AspectRampMaterialType="AspectRamp",r$X._materialCache.addMaterial(r$X.AspectRampMaterialType,{fabric:{type:r$X.AspectRampMaterialType,uniforms:{image:r$X.DefaultImageId},source:Z$W},translucent:!1}),r$X.EmissionColorType="EmissionColor",r$X._materialCache.addMaterial(r$X.EmissionColorType,{fabric:{type:r$X.EmissionColorType,uniforms:{color:new e$1U(1,1,1,1)},source:fe$s},translucent:function(e){return e.uniforms.color.alpha<1}}),r$X.PolylineDynamicType="PolylineDynamic",r$X._materialCache.addMaterial(r$X.PolylineDynamicType,{fabric:{type:r$X.PolylineDynamicType,uniforms:{color:new e$1U(1,1,1,1),outlineColor:new e$1U(1,0,0,1),outlineWidth:0,v_time:1,bAsy:1},source:R$U},translucent:function(e){return!0}}),r$X.PolylineTrailType="PolylineTrail",r$X._materialCache.addMaterial(r$X.PolylineTrailType,{fabric:{type:r$X.PolylineTrailType,uniforms:{color:new e$1U(1,0,0,.5),trailTime:0,spotSize:1,trailLength:.03,spotIntensity:5,constantSpeed:0,period:1e3,startTime:0},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return!0}});var m$V={numberOfPoints:function(e,t,i){var n=o$1p.distance(e,t);return Math.ceil(n/i)},numberOfPointsRhumbLine:function(e,t,i){var n=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.ceil(Math.sqrt(n/(i*i)))}},F$Z=new a$18;m$V.extractHeights=function(e,t){for(var i=e.length,n=new Array(i),r=0;r0&&(p=ar$6(h,l)),H$Z.setEndPoints(d,f);var _=H$Z.surfaceDistance/h,m=s;d.height=r;var g=n.cartographicToCartesian(d,T$Y);o$1p.pack(g,a,m),m+=3;for(var x=1;x0){t=u$_(t,p$1d.IDENTITY);var r=p$1d.inverseTransformation(t,j$_),o=p$1d.multiplyByPoint(r,o$1p.ZERO,J$R),a=o$1p.normalize(p$1d.multiplyByPointAsVector(r,o$1p.UNIT_Y,M$$),M$$),s=o$1m.fromPointNormal(o,a,K$O),l=o$1p.normalize(p$1d.multiplyByPointAsVector(r,o$1p.UNIT_X,X$W),X$W),u=o$1m.fromPointNormal(o,l,Q$V),c=1;i.push(o$1p.clone(e[0]));for(var h=i[0],d=e.length,f=1;f2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(o$1p.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id,e$2b(t)&&(i=p$1d.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=m$V.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(P$W),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=i$1c.fromPoints(this._actualPositions),this._boundingVolumeWC=i$1c.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new i$1c}m$V.generateRhumbArc=function(e){e$2b(e)||(e={});var t=e.positions;if(!e$2b(t))throw new t$16("options.positions is required.");var i=t.length,n=u$_(e.ellipsoid,t$13.WGS84),r=u$_(e.height,0),o=Array.isArray(r);if(i<1)return[];if(1===i){var a=n.scaleToGeodeticSurface(t[0],B$T);if(0!==(r=o?r[0]:r)){var s=n.geodeticSurfaceNormal(a,T$Y);o$1p.multiplyByScalar(s,r,s),o$1p.add(a,s,a)}return[a.x,a.y,a.z]}var l,u,c=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),h=0,d=n.cartesianToCartographic(t[0],Y$N);for(l=0;l2&&(t===e&&(t=e.slice()),t.push(o$1p.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&n$W(this,d$1a),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=i$1c.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=i$1c.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),n$W(this,I$18),this.update()}},material:{get:function(){return this._material},set:function(e){if(!e$2b(e))throw new t$16("material is required.");this._material!==e&&(this._material=e,n$W(this,E$10))}},width:{get:function(){return this._width},set:function(e){if(!e$2b(e))throw new t$16("value is required.");e!==this._width&&(this._width=e,n$W(this,w$R))}},loop:{get:function(){return this._loop},set:function(e){if(!e$2b(e))throw new t$16("value is required.");if(e!==this._loop){var t=this._actualPositions;e?t.length>2&&!o$1p.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(o$1p.clone(t[0]))):t.length>2&&o$1p.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,n$W(this,d$1a)}}},id:{get:function(){return this._id},set:function(e){this._id=e,e$2b(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");r$Y.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=r$Y.clone(e,this._distanceDisplayCondition),n$W(this,N$R))}}}),o$14.prototype.update=function(){var e=p$1d.IDENTITY;e$2b(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);var t=this._segments.positions.length,i=this._segments.lengths,n=this._propertiesChanged[I$18]>0||this._propertiesChanged[d$1a]>0;if((!p$1d.equals(e,this._modelMatrix)||n)&&(this._segments=m$V.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=i$1c.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=p$1d.clone(e,this._modelMatrix),this._segments.positions.length!==t)n$W(this,d$1a);else for(var r=i.length,o=0;o2){if(r[Te$p]||r[Pe$l]){var p=e.mode===C$13.SCENE2D?t._boundingVolume2D:t._boundingVolumeWC,_=i$11.fromCartesian(p.center,be$r),m=e$29.fromElements(_.low.x,_.low.y,_.low.z,p.radius,xe$p);this._batchTable.setBatchedAttribute(t._index,2,_.high),this._batchTable.setBatchedAttribute(t._index,3,m)}if(r[lr$7]){var g=Be$l;g.x=0,g.y=Number.MAX_VALUE;var x=t.distanceDisplayCondition;e$2b(x)&&(g.x=x.near,g.y=x.far),this._batchTable.setBatchedAttribute(t._index,4,g)}}t._clean()}o.length=0,this._polylinesUpdated=!1}r=this._propertiesChanged;for(var v=0;v0){var R=v.isTranslucent();s>=a?(y=new i$_({owner:e}),i.push(y)):y=i[s],++s,$=p$19(h(v._uniforms),e._uniformMap),y.boundingVolume=i$1c.clone(_e$t,y.boundingVolume),y.modelMatrix=n,y.shaderProgram=C,y.vertexArray=p.va,y.renderState=R?e._translucentRS:e._opaqueRS,y.pass=v.isTranslucent()?Le$s.TRANSLUCENT:Le$s.OPAQUE,y.debugShowBoundingVolume=c,y.pickId="v_pickColor",y.uniformMap=$,y.count=E,y.offset=T,T+=E,E=0,l=!0,t.passes.pick&&e._canAlwaysPick&&(y.pass=Le$s.OVERLAY_AGAINST_DEPTH),o.push(y)}(v=L._material).update(r),x=M}for(var I=L._locatorBuckets,O=I.length,D=0;D0&&(s>=a?(y=new i$_({owner:e}),i.push(y)):y=i[s],++s,$=p$19(h(v._uniforms),e._uniformMap),y.boundingVolume=i$1c.clone(_e$t,y.boundingVolume),y.modelMatrix=n,y.shaderProgram=C,y.vertexArray=p.va,y.renderState=v.isTranslucent()?e._translucentRS:e._opaqueRS,y.pass=v.isTranslucent()?Le$s.TRANSLUCENT:Le$s.OPAQUE,y.debugShowBoundingVolume=c,y.pickId="v_pickColor",y.uniformMap=$,y.count=E,y.offset=T,t.passes.pick&&e._canAlwaysPick&&(y.pass=Le$s.OVERLAY_AGAINST_DEPTH),l=!0,o.push(y)),x=void 0}i.length=s}function _r$4(e){var t=!1,i=e._propertiesChanged,n=e._positionBufferUsage;return i[Te$p]?(n.bufferUsage!==A$19.STREAM_DRAW&&(t=!0,n.bufferUsage=A$19.STREAM_DRAW),n.frameCount=100):n.bufferUsage!==A$19.STATIC_DRAW&&(0===n.frameCount?(t=!0,n.bufferUsage=A$19.STATIC_DRAW):n.frameCount--),t}k$T.prototype.isDestroyed=function(){return!1},k$T.prototype.destroy=function(){return Ue$h(this),Ee$p(this),Ie$m(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$10(this)};var Re$l=[0,0,0];function Le$q(e,t,i){e._createVertexArray=!1,Ee$p(e),Ue$h(e),mr$3(e);var n,r,o=[[]],a=o[0],s=e._batchTable,l=e._useHighlightColor,u=[0],c=0,h=[[]],d=0,f=e._polylineBuckets;for(n in f)f.hasOwnProperty(n)&&((r=f[n]).updateShader(t,s,l),d+=r.lengthOfPositions);if(d>0){var p,_=e._mode,m=new Float32Array(6*d*3),g=new Float32Array(4*d),x=0,v=0,y=0;for(n in f)if(f.hasOwnProperty(n)){(r=f[n]).write(m,g,x,v,y,s,t,i),_===C$13.MORPHING&&(e$2b(p)||(p=new Float32Array(6*d*3)),r.writeForMorph(p,x));var $=r.lengthOfPositions;x+=6*$*3,v+=4*$,y+=4*$,c=r.updateIndices(o,u,h,c)}var b,T=e._positionBufferUsage.bufferUsage,C=A$19.STATIC_DRAW;e._positionBuffer=t$Y.createVertexBuffer({context:t,typedArray:m,usage:T}),e$2b(p)&&(b=t$Y.createVertexBuffer({context:t,typedArray:p,usage:T})),e._texCoordExpandAndBatchIndexBuffer=t$Y.createVertexBuffer({context:t,typedArray:g,usage:C});for(var S=3*Float32Array.BYTES_PER_ELEMENT,w=4*Float32Array.BYTES_PER_ELEMENT,E=0,P=o.length,A=0;A0){var L=new Uint16Array(a),M=t$Y.createIndexBuffer({context:t,typedArray:L,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});E+=u[A];var R,I,O,D,B=6*(A*(S*e$2a.SIXTY_FOUR_KILOBYTES)-E*S),N=S+B,F=S+N,U=S+F,z=S+U,G=S+z,V=A*(w*e$2a.SIXTY_FOUR_KILOBYTES)-E*w,k=[{name:"positionHigh",index:ae$w.positionHigh,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:B,strideInBytes:6*S},{name:"positionLow",index:ae$w.positionLow,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:N,strideInBytes:6*S},{name:"prevPositionHigh",index:ae$w.prevPositionHigh,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:F,strideInBytes:6*S},{name:"prevPositionLow",index:ae$w.prevPositionLow,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:U,strideInBytes:6*S},{name:"nextPositionHigh",index:ae$w.nextPositionHigh,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:z,strideInBytes:6*S},{name:"nextPositionLow",index:ae$w.nextPositionLow,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:G,strideInBytes:6*S},{name:"texCoordExpandAndBatchIndex",index:ae$w.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:V}];_===C$13.SCENE3D?(R=e._positionBuffer,I="vertexBuffer",O=Re$l,D="value"):_===C$13.SCENE2D||_===C$13.COLUMBUS_VIEW?(R=Re$l,I="value",O=e._positionBuffer,D="vertexBuffer"):(R=b,I="vertexBuffer",O=e._positionBuffer,D="vertexBuffer"),_===C$13.SCENE3D?(k[0][I]=R,k[1][I]=R,k[2][I]=R,k[3][I]=R,k[4][I]=R,k[5][I]=R):(_===C$13.SCENE2D||_===C$13.COLUMBUS_VIEW)&&(k[0][D]=O,k[1][D]=O,k[2][D]=O,k[3][D]=O,k[4][D]=O,k[5][D]=O);var W=new c$12({context:t,attributes:k,indexBuffer:M});e._vertexArrays.push({va:W,buckets:h[A]})}}}function ur$5(e,t){return t instanceof t$V?t.id:t}var me$u=[];function dr$4(e){var t=r$X._uniformList[e.type],i=t.length;me$u.length=2*i;for(var n=0,r=0;r1){s.update();var l=s.material,u=n[l.type];e$2b(u)||(u=n[l.type]=new Z$U(l,t,i)),u.addPolyline(s)}}}function gr$4(e,t){var i=t.mode;(e._mode!==i||!p$1d.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=i,e._modelMatrix=p$1d.clone(e.modelMatrix),e._createVertexArray=!0)}function ye$m(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;for(var t=[],i=e._polylines.length,n=0,r=0;n0,g=p._index,x=this.getSegments(p,s),v=x.positions,y=x.lengths,$=v.length,b=p.getPickId(a);f=e$2b(b)?b.color:e$1U.BLACK;for(var T,C=0,S=0,w=0;w<$;++w){0===w?p._loop?T=v[$-2]:(T=ge$q,o$1p.subtract(v[0],v[1],T),o$1p.add(v[0],T,T)):T=v[w-1],o$1p.clone(T,W$Y),o$1p.clone(v[w],D$V),w===$-1?p._loop?T=v[1]:(T=ge$q,o$1p.subtract(v[$-1],v[$-2],T),o$1p.add(v[$-1],T,T)):T=v[w+1],o$1p.clone(T,Y$M);var E=y[C];w===S+E&&(S+=E,++C);var P=w-S==0,A=w===S+y[C]-1;l===C$13.SCENE2D&&(W$Y.z=0,D$V.z=0,Y$M.z=0),(l===C$13.SCENE2D||l===C$13.MORPHING)&&(P||A)&&u-Math.abs(D$V.x)<1&&((D$V.x<0&&W$Y.x>0||D$V.x>0&&W$Y.x<0)&&o$1p.clone(D$V,W$Y),(D$V.x<0&&Y$M.x>0||D$V.x>0&&Y$M.x<0)&&o$1p.clone(D$V,Y$M));for(var L=A?2:4,M=P?2:0;M2&&(o.setBatchedAttribute(g,2,N),o.setBatchedAttribute(g,3,F),o.setBatchedAttribute(g,4,U))}};var Tr$5=new o$1p,yr$3=new o$1p,Er$4=new o$1p,Me$l=new o$1p;Z$U.prototype.writeForMorph=function(e,t){for(var i=this.modelMatrix,n=this.polylines,r=n.length,o=0;o0&&(l=s[s.length-1]+1);for(var u=this.polylines,c=u.length,h=0;h0))continue;d[0]=p}else d=f._segments.lengths;var _=d.length;if(_>0){for(var m=0,g=0;g<_;++g)for(var x=d[g]-1,v=0;ve$2a.SIXTY_FOUR_KILOBYTES&&(f._locatorBuckets.push({locator:o,count:m}),m=0,t.push(4),s=[],e.push(s),l=0,o.count=a,a=0,n=0,o=new Se$f(0,0,this),i[++r]=[o]),s.push(l,l+2,l+1),s.push(l+1,l+2,l+3),m+=6,a+=6,n+=6,l+=4;f._locatorBuckets.push({locator:o,count:m}),l+4>e$2a.SIXTY_FOUR_KILOBYTES&&(t.push(0),s=[],e.push(s),l=0,o.count=a,n=0,a=0,o=new Se$f(0,0,this),i[++r]=[o])}f._clean()}return o.count=a,n},Z$U.prototype.getPolylineStartIndex=function(e){for(var t=this.polylines,i=0,n=t.length,r=0;r0){e._boundingVolume2D=i$1c.fromPoints(o,e._boundingVolume2D);var c=e._boundingVolume2D.center;e._boundingVolume2D.center=new o$1p(c.z,c.x,c.y)}return le$x.positions=o,le$x.lengths=e._segments.lengths,le$x},Z$U.prototype.writeUpdate=function(e,t,i,n){var r=this.mode,o=n.ellipsoid.maximumRadius*e$2a.PI,a=t._actualLength;if(a){e+=this.getPolylineStartIndex(t);var s=Ye$f,l=6*a*3;!e$2b(s)||s.lengthl&&(s=new Float32Array(s.buffer,0,l));var u,c=this.getSegments(t,n),h=c.positions,d=c.lengths,f=0,p=0,_=0;a=h.length;for(var m=0;m0||D$V.x>0&&W$Y.x<0)&&o$1p.clone(D$V,W$Y),(D$V.x<0&&Y$M.x>0||D$V.x>0&&Y$M.x<0)&&o$1p.clone(D$V,Y$M));for(var y=v?2:4,$=x?2:0;$=r&&(d=r-1);var f=(s-e.latitude)/u|0;return f>=o&&(f=o-1),e$2b(i)?(i.x=d,i.y=f,i):new o$1o(d,f)}},g$13.prototype.calculateResolution=function(e){var t=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.x,i=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.y,n=t$13.WGS84.maximumRadius;return new o$1o(t/n,i/n)};var _$R=new o$1p,M$_=new o$1p,C$Z=new a$18,d$19=new o$1p,X$U=new o$1p,S$P=new i$1c,z$S=new g$13,c$Y=[new a$18,new a$18,new a$18,new a$18],g$12=new o$1o,e$1E={};function L$11(e){a$18.fromRadians(e.east,e.north,0,c$Y[0]),a$18.fromRadians(e.west,e.north,0,c$Y[1]),a$18.fromRadians(e.east,e.south,0,c$Y[2]),a$18.fromRadians(e.west,e.south,0,c$Y[3]);var t,i=0,n=0,r=0,o=0,a=e$1E._terrainHeightsMaxLevel;for(t=0;t<=a;++t){for(var s=!1,l=0;l<4;++l){var u=c$Y[l];if(z$S.positionToTileXY(u,t,g$12),0===l)r=g$12.x,o=g$12.y;else if(r!==g$12.x||o!==g$12.y){s=!0;break}}if(s)break;i=r,n=o}if(0!==t)return{x:i,y:n,level:t>a?a:t-1}}function t$O(e){this._ellipsoid=u$_(e,t$13.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}e$1E.initialize=function(){var e=e$1E._initPromise;return e$2b(e)||(e=t$11.fetchJson(n$15("Assets/approximateTerrainHeights.json")).then((function(e){e$1E._terrainHeights=e})),e$1E._initPromise=e),e},e$1E.getMinimumMaximumHeights=function(e,t){if(o$1q.defined("rectangle",e),!e$2b(e$1E._terrainHeights))throw new t$16("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=u$_(t,t$13.WGS84);var i=L$11(e),n=e$1E._defaultMinTerrainHeight,r=e$1E._defaultMaxTerrainHeight;if(e$2b(i)){var o=i.level+"-"+i.x+"-"+i.y,a=e$1E._terrainHeights[o];e$2b(a)&&(n=a[0],r=a[1]),t.cartographicToCartesian(h$18.northeast(e,C$Z),_$R),t.cartographicToCartesian(h$18.southwest(e,C$Z),M$_),o$1p.midpoint(M$_,_$R,d$19);var s=t.scaleToGeodeticSurface(d$19,X$U);if(e$2b(s)){var l=o$1p.distance(d$19,s);n=Math.min(n,-l)}else n=e$1E._defaultMinTerrainHeight}return{minimumTerrainHeight:n=Math.max(e$1E._defaultMinTerrainHeight,n),maximumTerrainHeight:r}},e$1E.getBoundingSphere=function(e,t){if(o$1q.defined("rectangle",e),!e$2b(e$1E._terrainHeights))throw new t$16("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=u$_(t,t$13.WGS84);var i=L$11(e),n=e$1E._defaultMaxTerrainHeight;if(e$2b(i)){var r=i.level+"-"+i.x+"-"+i.y,o=e$1E._terrainHeights[r];e$2b(o)&&(n=o[1])}var a=i$1c.fromRectangle3D(e,t,0);return i$1c.fromRectangle3D(e,t,n,S$P),i$1c.union(a,S$P,a)},e$1E._terrainHeightsMaxLevel=6,e$1E._defaultMaxTerrainHeight=9e3,e$1E._defaultMinTerrainHeight=-1e5,e$1E._terrainHeights=void 0,e$1E._initPromise=void 0,Object.defineProperties(e$1E,{initialized:{get:function(){return e$2b(e$1E._terrainHeights)}}}),Object.defineProperties(t$O.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),t$O.mercatorAngleToGeodeticLatitude=function(e){return e$2a.PI_OVER_TWO-2*Math.atan(Math.exp(-e))},t$O.geodeticLatitudeToMercatorAngle=function(e){e>t$O.MaximumLatitude?e=t$O.MaximumLatitude:e<-t$O.MaximumLatitude&&(e=-t$O.MaximumLatitude);var t=Math.sin(e);return.5*Math.log((1+t)/(1-t))},t$O.MaximumLatitude=t$O.mercatorAngleToGeodeticLatitude(Math.PI),t$O.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=t$O.geodeticLatitudeToMercatorAngle(e.latitude)*i,o=e.height;return e$2b(t)?(t.x=n,t.y=r,t.z=o,t):new o$1p(n,r,o)},t$O.prototype.unproject=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=t$O.mercatorAngleToGeodeticLatitude(e.y*i),o=e.z;return e$2b(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new a$18(n,r,o)};var Za$4=[n$1b,t$O],Hr$1=Za$4.length,ur$4=Math.cos(e$2a.toRadians(30)),Sr$2=Math.cos(e$2a.toRadians(150)),wr$3=0,gr$3=1e3;function aa$4(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions;if(!e$2b(t)||t.length<2)throw new t$16("At least two positions are required.");if(e$2b(e.arcType)&&e.arcType!==m$1f.GEODESIC&&e.arcType!==m$1f.RHUMB)throw new t$16("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=u$_(e.width,1),this._positions=t,this.granularity=u$_(e.granularity,9999),this.loop=u$_(e.loop,!1),this.arcType=u$_(e.arcType,m$1f.GEODESIC),this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(aa$4.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+t$13.packedLength+1+1}}}),aa$4.setProjectionAndEllipsoid=function(e,t){for(var i=0,n=0;nur$4||oe$2a.PI_OVER_TWO&&(s=!0,a=o$1p.subtract(o,i,_r$3),u=l.cartesianToCartographic(a,Tr$4)),u.height=0;var c=e.project(u,r);return(r=o$1p.subtract(c,n,r)).z=0,r=o$1p.normalize(r,r),s&&o$1p.negate(r,r),r}var dn$2=new o$1p,Lr$3=new o$1p;function kr$3(e,t,i,n,r,o){var a=o$1p.subtract(t,e,dn$2);o$1p.normalize(a,a);var s=i-wr$3,l=o$1p.multiplyByScalar(a,s,Lr$3);o$1p.add(e,l,r);var u=n-gr$3;l=o$1p.multiplyByScalar(a,u,Lr$3),o$1p.add(t,l,o)}var mn$3=new o$1p;function Ra$3(e,t){var i=o$1m.getPointDistance(Aa$3,e),n=o$1m.getPointDistance(Aa$3,t),r=mn$3;e$2a.equalsEpsilon(i,0,e$2a.EPSILON2)?(r=X$T(t,e,r),o$1p.multiplyByScalar(r,e$2a.EPSILON2,r),o$1p.add(e,r,e)):e$2a.equalsEpsilon(n,0,e$2a.EPSILON2)&&(r=X$T(e,t,r),o$1p.multiplyByScalar(r,e$2a.EPSILON2,r),o$1p.add(t,r,t))}function On$2(e,t){var i=Math.abs(e.longitude),n=Math.abs(t.longitude);if(e$2a.equalsEpsilon(i,e$2a.PI,e$2a.EPSILON11)){var r=e$2a.sign(t.longitude);return e.longitude=r*(i-e$2a.EPSILON11),1}if(e$2a.equalsEpsilon(n,e$2a.PI,e$2a.EPSILON11)){var o=e$2a.sign(e.longitude);return t.longitude=o*(n-e$2a.EPSILON11),2}return 0}var Ar$2=new a$18,Nr$2=new a$18,Pr$2=new o$1p,Ka$4=new o$1p,Rr$1=new o$1p,Fr$2=new o$1p,Cn=new o$1p,br$1=new o$1p,In=[Ar$2,Nr$2],Tn$3=new h$18,_n$3=new o$1p,Ln$2=new o$1p,kn$1=new o$1p,An$1=new o$1p,Nn$1=new o$1p,Pn$1=new o$1p,Qa$4=new o$1p,$a$4=new o$1p,Rn$2=new o$1p,Fn$1=new o$1p,bn$1=new o$1p,Mr$4=new o$1p,Mn$1=new o$1p,zn=new o$1p,xn$1=new i$11,qn=new i$11,zr$4=new o$1p,yn$1=new o$1p,xr$4=new o$1p,Vn=[new i$1c,new i$1c],qr$1=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],yr$2=qr$1.length;function Wn(e,t,i,n,r,o,a){var s,l,u,c,h,d,f=t._ellipsoid,p=i.length/3-1,_=8*p,m=4*_,g=36*p,x=_>65535?new Uint32Array(g):new Uint16Array(g),v=new Float64Array(3*_),y=new Float32Array(m),$=new Float32Array(m),b=new Float32Array(m),T=new Float32Array(m),C=new Float32Array(m);a&&(u=new Float32Array(m),c=new Float32Array(m),h=new Float32Array(m),d=new Float32Array(2*_));var S=o.length/2,w=0,E=Ar$2;E.height=0;var P=Nr$2;P.height=0;var A=Pr$2,L=Ka$4;if(a)for(l=0,s=1;sur$4?(j=ma$3(t,E,Q,H,Qa$4),Y=ma$3(t,P,G,q,$a$4)):1===Z?(Y=ma$3(t,P,G,q,$a$4),j.x=0,j.y=e$2a.sign(E.longitude-Math.abs(P.longitude)),j.z=0):(j=ma$3(t,E,Q,H,Qa$4),Y.x=0,Y.y=e$2a.sign(E.longitude-P.longitude),Y.z=0)}var ee=o$1p.distance(K,z),te=i$11.fromCartesian(X,xn$1),ie=o$1p.subtract(U,X,Rn$2),ne=o$1p.normalize(ie,Mr$4),re=o$1p.subtract(K,X,Fn$1);re=o$1p.normalize(re,re);var oe=o$1p.cross(ne,re,Mr$4);oe=o$1p.normalize(oe,oe);var ae=o$1p.cross(re,Q,Mn$1);ae=o$1p.normalize(ae,ae);var se=o$1p.subtract(z,U,bn$1);se=o$1p.normalize(se,se);var le=o$1p.cross(G,se,zn);le=o$1p.normalize(le,le);var ue,ce,he,de=ee/I,fe=V/I,pe=0,_e=0,me=0;if(a){pe=o$1p.distance(H,q),ue=i$11.fromCartesian(H,qn),ce=o$1p.subtract(q,H,zr$4);var ge=(he=o$1p.normalize(ce,yn$1)).x;he.x=he.y,he.y=-ge,_e=pe/w,me=k/w}for(R=0;R<8;R++){var xe=N+4*R,ve=D+2*R,ye=xe+3,$e=R<4?1:-1,be=2===R||3===R||6===R||7===R?1:-1;o$1p.pack(te.high,y,xe),y[ye]=ie.x,o$1p.pack(te.low,$,xe),$[ye]=ie.y,o$1p.pack(ae,b,xe),b[ye]=ie.z,o$1p.pack(le,T,xe),T[ye]=de*$e,o$1p.pack(oe,C,xe);var Te=fe*be;0===Te&&be<0&&(Te=Number.POSITIVE_INFINITY),C[ye]=Te,a&&(u[xe]=ue.high.x,u[xe+1]=ue.high.y,u[xe+2]=ue.low.x,u[xe+3]=ue.low.y,h[xe]=-j.y,h[xe+1]=j.x,h[xe+2]=Y.y,h[xe+3]=-Y.x,c[xe]=ce.x,c[xe+1]=ce.y,c[xe+2]=he.x,c[xe+3]=he.y,d[ve]=_e*$e,0===(Te=me*be)&&be<0&&(Te=Number.POSITIVE_INFINITY),d[ve+1]=Te)}var Ce=kn$1,Se=An$1,we=_n$3,Ee=Ln$2,Pe=h$18.fromCartographicArray(In,Tn$3),Ae=e$1E.getMinimumMaximumHeights(Pe,f),Le=Ae.minimumTerrainHeight,Me=Ae.maximumTerrainHeight;W+=Le,W+=Me,kr$3(X,K,Le,Me,Ce,we),kr$3(U,z,Le,Me,Se,Ee);var Re=o$1p.multiplyByScalar(oe,e$2a.EPSILON5,xr$4);o$1p.add(Ce,Re,Ce),o$1p.add(Se,Re,Se),o$1p.add(we,Re,we),o$1p.add(Ee,Re,Ee),Ra$3(Ce,Se),Ra$3(we,Ee),o$1p.pack(Ce,v,B),o$1p.pack(Se,v,B+3),o$1p.pack(Ee,v,B+6),o$1p.pack(we,v,B+9),Re=o$1p.multiplyByScalar(oe,-2*e$2a.EPSILON5,xr$4),o$1p.add(Ce,Re,Ce),o$1p.add(Se,Re,Se),o$1p.add(we,Re,we),o$1p.add(Ee,Re,Ee),Ra$3(Ce,Se),Ra$3(we,Ee),o$1p.pack(Ce,v,B+12),o$1p.pack(Se,v,B+15),o$1p.pack(Ee,v,B+18),o$1p.pack(we,v,B+21),O+=2,l+=3,D+=16,B+=24,N+=32,V+=ee,k+=pe}l=0;var Ie=0;for(s=0;s4)throw new t$16("options.componentsPerAttribute must be between 1 and 4.");if(!e$2b(e.value))throw new t$16("options.value is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=u$_(e.normalize,!1),this.value=e.value}aa$4._projectNormal=ma$3;var Q$U='#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC; // Technically can compute distance for this here\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n\nvoid main(void)\n{\n float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_globeDepthTextureDim.xy)));\n vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\n\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n gl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n\n float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\n\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n gl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n // Check distance of the eye coordinate against start and end planes with normals in the right plane.\n // For computing unskewed lengthwise texture coordinate.\n // Can also be used for clipping extremely pointy miters, but in practice unnecessary because of miter breaking.\n\n // aligned plane: cross the right plane normal with miter plane normal, then cross the result with right again to point it more "forward"\n vec3 alignedPlaneNormal;\n\n // start aligned plane\n alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\n alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\n\n // end aligned plane\n alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\n alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n\n#ifdef PER_INSTANCE_COLOR\n gl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\n // Clamp - distance to aligned planes may be negative due to mitering,\n // so fragment texture coordinate might be out-of-bounds.\n float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\n s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\n float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\n\n czm_materialInput materialInput;\n\n materialInput.s = s;\n materialInput.st = vec2(s, t);\n materialInput.str = vec3(s, t, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n\n czm_writeDepthClampedToFarPlane();\n}\n',W$X="varying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\n\nfloat rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {\n // We don't expect the ray to ever be parallel to the plane\n return (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);\n}\n\nvoid main(void)\n{\n vec4 eyeCoordinate = gl_FragCoord;\n eyeCoordinate /= eyeCoordinate.w;\n\n#ifdef PER_INSTANCE_COLOR\n gl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\n // Use distances for planes aligned with segment to prevent skew in dashing\n float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);\n float distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);\n\n // Clamp - distance to aligned planes may be negative due to mitering\n distanceFromStart = max(0.0, distanceFromStart);\n distanceFromEnd = max(0.0, distanceFromEnd);\n\n float s = distanceFromStart / (distanceFromStart + distanceFromEnd);\n s = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;\n\n czm_materialInput materialInput;\n\n materialInput.s = s;\n materialInput.st = vec2(s, v_texcoordT);\n materialInput.str = vec3(s, v_texcoordT, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n}\n",Y$L='attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\n\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\n\nattribute float batchId;\n\nvarying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n\n// For materials\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\n\n// Morphing planes using SLERP or NLERP doesn\'t seem to work, so instead draw the material directly on the shadow volume.\n// Morph views are from very far away and aren\'t meant to be used precisely, so this should be sufficient.\nvoid main()\n{\n v_batchId = batchId;\n\n // Start position\n vec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));\n vec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);\n vec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\n vec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\n vec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\n vec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\n\n // Start plane\n vec4 startPlane2D;\n vec4 startPlane3D;\n startPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\n startPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlane2D.w = -dot(startPlane2D.xyz, posEc2D);\n startPlane3D.w = -dot(startPlane3D.xyz, posEc3D);\n\n // Right plane\n vec4 rightPlane2D;\n vec4 rightPlane3D;\n rightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\n rightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n rightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);\n rightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);\n\n // End position\n posRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);\n posRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);\n posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\n posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\n posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\n vec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\n vec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));\n vec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));\n\n // End plane\n vec4 endPlane2D;\n vec4 endPlane3D;\n endPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\n endPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlane2D.w = -dot(endPlane2D.xyz, posEc2D);\n endPlane3D.w = -dot(endPlane3D.xyz, posEc3D);\n\n // Forward direction\n v_forwardDirectionEC = normalize(endEC - startEC);\n\n vec2 cleanTexcoordNormalization2D;\n cleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);\n cleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));\n vec2 cleanTexcoordNormalization3D;\n cleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n cleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;\n cleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));\n\n v_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#else // PER_INSTANCE_COLOR\n // For computing texture coordinates\n\n v_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);\n v_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);\n#endif // PER_INSTANCE_COLOR\n\n#ifdef WIDTH_VARYING\n float width = czm_batchTable_width(batchId);\n float halfWidth = width * 0.5;\n v_width = width;\n v_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#else\n float halfWidth = 0.5 * czm_batchTable_width(batchId);\n v_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#endif\n\n // Compute a normal along which to "push" the position out, extending the miter depending on view distance.\n // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.\n // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.\n // Since this is morphing, compute both 3D and 2D positions and then blend.\n\n // ****** 3D ******\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow); // w = 1.0, see czm_computePosition\n float absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);\n vec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Nudge the top vertex upwards to prevent flickering\n vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));\n geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);\n geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\n positionEc3D.xyz += geodeticSurfaceNormal;\n\n // Determine if this vertex is on the "left" or "right"\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n\n // A "perfect" implementation would push along normals according to the angle against forward.\n // In practice, just pushing the normal out by halfWidth is sufficient for morph views.\n positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)\n\n // ****** 2D ******\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); // w = 1.0, see czm_computePosition\n absStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));\n absEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));\n planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);\n upOrDown = normalize(cross(rightPlane2D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Nudge the top vertex upwards to prevent flickering\n geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));\n geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);\n geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\n positionEc2D.xyz += geodeticSurfaceNormal;\n\n // Determine if this vertex is on the "left" or "right"\n normalEC *= sign(texcoordNormalization2D.x);\n#ifndef PER_INSTANCE_COLOR\n // Use vertex\'s sidedness to compute its texture coordinate.\n v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);\n#endif\n\n // A "perfect" implementation would push along normals according to the angle against forward.\n // In practice, just pushing the normal out by halfWidth is sufficient for morph views.\n positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)\n\n // Blend for actual position\n gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);\n\n#ifdef ANGLE_VARYING\n // Approximate relative screen space direction of the line.\n vec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));\n approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\n v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n',q$$='attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\n\n// In 2D and in 3D, texture coordinate normalization component signs encodes:\n// * X sign - sidedness relative to right plane\n// * Y sign - is negative OR magnitude is greater than 1.0 if vertex is on bottom of volume\n#ifndef COLUMBUS_VIEW_2D\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\n#else\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\n#endif\n\nattribute float batchId;\n\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n\n// For materials\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n\nvoid main()\n{\n#ifdef COLUMBUS_VIEW_2D\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;\n\n vec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);\n vec3 ecEnd = forwardDirectionEC + ecStart;\n forwardDirectionEC = normalize(forwardDirectionEC);\n\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n\n v_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);\n v_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;\n\n#else // COLUMBUS_VIEW_2D\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\n vec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\n vec3 ecEnd = ecStart + offset;\n\n vec3 forwardDirectionEC = normalize(offset);\n\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n\n v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n\n#endif // COLUMBUS_VIEW_2D\n\n v_endEcAndStartEcX.xyz = ecEnd;\n v_endEcAndStartEcX.w = ecStart.x;\n v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#endif // PER_INSTANCE_COLOR\n\n // Compute a normal along which to "push" the position out, extending the miter depending on view distance.\n // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.\n // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.\n vec4 positionRelativeToEye = czm_computePosition();\n\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye; // w = 1.0, see czm_computePosition\n float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\n vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Extrude bottom vertices downward for far view distances, like for GroundPrimitives\n upOrDown = cross(forwardDirectionEC, normalEC);\n upOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;\n upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\n upOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;\n positionEC.xyz += upOrDown;\n\n v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\n\n // Determine distance along normalEC to push for a volume of appropriate width.\n // Make volumes about double pixel width for a conservative fit - in practice the\n // extra cost here is minimal compared to the loose volume heights.\n //\n // N = normalEC (guaranteed "right-facing")\n // R = rightEC\n // p = angle between N and R\n // w = distance to push along R if R == N\n // d = distance to push along N\n //\n // N R\n // { p| } * cos(p) = dot(N, R) = w / d\n // d | |w * d = w / dot(N, R)\n // { | }\n // o---------- polyline segment ----\x3e\n //\n float width = czm_batchTable_width(batchId);\n#ifdef WIDTH_VARYING\n v_width = width;\n#endif\n\n v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\n v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\n\n v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\n v_endPlaneNormalEcAndBatchId.w = batchId;\n\n width = width * max(0.0, czm_metersPerPixel(positionEC)); // width = distance to push along R\n width = width / dot(normalEC, v_rightPlaneEC.xyz); // width = distance to push along N\n\n // Determine if this vertex is on the "left" or "right"\n#ifdef COLUMBUS_VIEW_2D\n normalEC *= sign(texcoordNormalization2D.x);\n#else\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n#endif\n\n positionEC.xyz += width * normalEC;\n gl_Position = czm_depthClampFarPlane(czm_projection * positionEC);\n\n#ifdef ANGLE_VARYING\n // Approximate relative screen space direction of the line.\n vec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));\n approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\n v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n',e$1D={TERRAIN:0,CESIUM_3D_TILE:1,S3M_TILE:2,BOTH:3,NUMBER_OF_CLASSIFICATION_TYPES:4},_0x3b5200=Object.freeze(e$1D),l$_="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec4 color;\nattribute float batchId;\n\nvarying vec4 v_color;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = czm_computePosition();\n vec4 prev = czm_computePrevPosition();\n vec4 next = czm_computeNextPosition();\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n\n v_color = color;\n}\n",o$12=Z$Y+"\n"+l$_,p$W=d$1c;function e$1C(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.translucent,!0),i=e$1C.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=u$_(e.vertexShaderSource,o$12),this._fragmentShaderSource=u$_(e.fragmentShaderSource,p$W),this._renderState=a$S.getDefaultRenderState(t,false,e.renderState),this._closed=false,this._vertexFormat=i,this.name="PolylineColorAppearance"}s$Y.isInternetExplorer()||(o$12="#define CLIP_POLYLINE \n"+o$12),Object.defineProperties(e$1C.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),e$1C.VERTEX_FORMAT=n$11.POSITION_ONLY,e$1C.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,e$1C.prototype.isTranslucent=a$S.prototype.isTranslucent,e$1C.prototype.getRenderState=a$S.prototype.getRenderState;var d$18="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec2 st;\nattribute float batchId;\n\n#ifdef TRAIL\nuniform float trailTime_1;\nuniform float spotSize_2;\nuniform float constantSpeed_5;\nuniform float trailLength_3;\nuniform float period_6;\nuniform float startTime_7;\nattribute vec3 dist;\nvarying float v_Percent;\nvarying float v_SpotPercent;\n#endif\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying float v_clipW;\n\nvoid main()\n{\n float u = abs(expandAndWidth.x);\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = czm_computePosition();\n vec4 prev = czm_computePrevPosition();\n vec4 next = czm_computeNextPosition();\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n\n v_width = width;\n v_st.s = st.s;\n v_st.t = czm_writeNonPerspective(st.t, gl_Position.w);\n v_polylineAngle = angle;\n v_alpha = u;\n v_clipW = gl_Position.w;\n\n#ifdef TRAIL\n float t = 0.0;\n if(abs(constantSpeed_5) > czm_epsilon7)\n {\n t = mod((constantSpeed_5 * trailTime_1 + dist.z) / dist.y, 1.0 + trailLength_3) - trailLength_3;\n }\n else\n {\n t = mod((trailTime_1 - startTime_7) / period_6, 1.0 + trailLength_3) - trailLength_3;\n }\n float trailLen = dist.y * trailLength_3;\n v_Percent = (dist.x - t * dist.y) / trailLen;\n v_SpotPercent = spotSize_2 / dist.y;\n#endif\n}\n",i$T=Z$Y+"\n"+d$18,p$V=h$X;function r$W(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.translucent,!0),i=r$W.VERTEX_FORMAT;this.material=e$2b(e.material)?e.material:r$X.fromType(r$X.ColorType),this.translucent=t,this._vertexShaderSource=u$_(e.vertexShaderSource,i$T),this._fragmentShaderSource=u$_(e.fragmentShaderSource,p$V),this._renderState=a$S.getDefaultRenderState(t,false,e.renderState),this._closed=false,this._vertexFormat=i,this._name="PolylineMaterialAppearance"}s$Y.isInternetExplorer()||(i$T="#define CLIP_POLYLINE \n"+i$T),Object.defineProperties(r$W.prototype,{vertexShaderSource:{get:function(){var e=this._vertexShaderSource;return-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&(e="#define POLYLINE_DASH\n"+e),"PolylineDynamic"==this.material.type&&(e="#define ENABLE_DYNAMIC\n"+e),"PolylineTrail"==this.material.type&&(e="#define TRAIL\n"+e),e}},fragmentShaderSource:{get:function(){var e=this._fragmentShaderSource;return"PolylineDynamic"==this.material.type&&(e="#define ENABLE_DYNAMIC\n"+e),"PolylineTrail"==this.material.type&&(e="#define TRAIL\n"+e),e}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},name:{get:function(){return this._name+"_"+this.material._id}}}),r$W.VERTEX_FORMAT=n$11.POSITION_AND_ST,r$W.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,r$W.prototype.isTranslucent=a$S.prototype.isTranslucent,r$W.prototype.getRenderState=a$S.prototype.getRenderState;var t$N={CESIUM_3D_TILE_MASK:128,S3M_TILE:2,MODEL:6,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15,setCesium3DTileBit:function(){return{enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.REPLACE},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.REPLACE},reference:t$N.CESIUM_3D_TILE_MASK,mask:t$N.CESIUM_3D_TILE_MASK}}},u$N=Object.freeze(t$N);function g$11(e){e=u$_(e,u$_.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;var t=e.appearance;e$2b(t)||(t=new r$W),this.appearance=t,this.show=u$_(e.show,!0),this.classificationType=u$_(e.classificationType,_0x3b5200.BOTH),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this._debugShowShadowVolume=u$_(e.debugShowShadowVolume,!1),this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:u$_(e.interleave,!0),releaseGeometryInstances:u$_(e.releaseGeometryInstances,!0),allowPicking:u$_(e.allowPicking,!0),asynchronous:u$_(e.asynchronous,!0),compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=G$13(0),this._renderState3DTiles=G$13(1),this._renderStateS3M=G$13(2),this._renderStateMorph=d$1m.fromCache({cull:{enabled:!0,face:G$17.FRONT},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND,depthMask:!1}),this._polygonEntityId=u$_(e.polygonEntityId,void 0)}function Z$T(e,t,i){var n=t.context,r=e._primitive,o=r._attributeLocations,a=r._batchTable.getVertexShaderCallback()(q$$);a=y$S._appendShowToShader(r,a),a=y$S._appendDistanceDisplayConditionToShader(r,a),a=y$S._modifyShaderPosition(e,a,t.scene3DOnly);var s=r._batchTable.getVertexShaderCallback()(Y$L);s=y$S._appendShowToShader(r,s),s=y$S._appendDistanceDisplayConditionToShader(r,s),s=y$S._modifyShaderPosition(e,s,t.scene3DOnly);var l=r._batchTable.getVertexShaderCallback()(Q$U),u=["GLOBE_MINIMUM_ALTITUDE "+t.mapProjection.ellipsoid.minimumRadius.toFixed(1)],c="",h="";e$2b(i.material)?(-1!==(h=e$2b(i.material)?i.material.shaderSource:"").search(/varying\s+float\s+v_polylineAngle;/g)&&u.push("ANGLE_VARYING"),-1!==h.search(/varying\s+float\s+v_width;/g)&&u.push("WIDTH_VARYING")):c="PER_INSTANCE_COLOR",u.push(c);var d=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",c]:[c],f=new s$U({defines:u,sources:[a],name:"PolylineShadowVolumeVS"}),p=new s$U({defines:d,sources:[h,l],name:"PolylineShadowVolumeFS"});e._sp=r$13.replaceCache({context:n,shaderProgram:r._sp,vertexShaderSource:f,fragmentShaderSource:p,attributeLocations:o});var _=n.shaderCache.getDerivedShaderProgram(e._sp,"2dColor");if(!e$2b(_)){var m=new s$U({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[a]});_=n.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:n,shaderProgram:e._sp2D,vertexShaderSource:m,fragmentShaderSource:p,attributeLocations:o})}e._sp2D=_;var g=n.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor");if(!e$2b(g)){var x=new s$U({defines:u.concat(["MAX_TERRAIN_HEIGHT "+e$1E._defaultMaxTerrainHeight.toFixed(1)]),sources:[s]}),v=new s$U({defines:d,sources:[h,l=r._batchTable.getVertexShaderCallback()(W$X)]});g=n.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:n,shaderProgram:e._spMorph,vertexShaderSource:x,fragmentShaderSource:v,attributeLocations:o})}e._spMorph=g}function G$13(e){return d$1m.fromCache({cull:{enabled:!0},blending:Ee$r.ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e>0,frontFunction:m$X.EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.KEEP},backFunction:m$X.EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.KEEP},reference:2===e?u$N.S3M_TILE:u$N.CESIUM_3D_TILE_MASK,mask:u$N.CLASSIFICATION_MASK}})}function $$W(e,t,i,n,r,o){var a=e._primitive,s=a._va.length;r.length=s,o.length=s;for(var l=t instanceof e$1C?{}:i._uniforms,u=a._batchTable.getUniformMapCallback()(l),c=0;c1&&!e$2b(r.outlines)){var o,a={width:r._outlineWidth._value,material:void 0,positions:[],loop:!0,distanceDisplayCondition:new r$Y(0,5e4)};if(r.definitionChanged.addEventListener((function(e,t,i,n){e$2b(r.outlines)&&r.outlines.removeAll(),r.outlines=void 0})),r.outlines=e.primitives.add(new k$T({polygonEntityId:n.id})),o=e$2b(r._hierarchy._value)?Array.isArray(r._hierarchy._value)?r._hierarchy._value:r._hierarchy._value.positions:r._hierarchy instanceof n$V?r._hierarchy.getValue(e.frameState.time).positions:r._hierarchy.polygon._positions._value,!r.perPositionHeight||r._height>0)for(var s=0;s0){var l=[];for(s=0;s0)for(s=0;s0){for(l=[],s=0;s1&&!e$2b(r.clampOutlines)){var a;e$2b(r.outlineColor)||(r.outlineColor=e$1U.BLACK),r.definitionChanged.addEventListener((function(t,i,n,o){e$2b(r.clampOutlines)&&e.primitives.remove(r.clampOutlines),r.clampOutlines=void 0})),a=e$2b(r._hierarchy._value)?Array.isArray(r._hierarchy._value)?r._hierarchy._value:r._hierarchy._value.positions:r._hierarchy.polygon._positions._value;var s=new E$$;s.positions=a,o$1p.equals(a[0],a[a.length-1])||(s.loop=!0),s.width=r._outlineWidth.getValue(o)||1;var l={show:new e$1F(!0),color:o$16.fromColor(r._outlineColor.getValue(o)),width:new o$13({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,value:[s.width]})},u=new d$1o({id:n,geometry:new aa$4(s),attributes:l});r.clampOutlines=new g$11({show:!0,asynchronous:!0,geometryInstances:u,classificationType:r._classificationType?r._classificationType._value:_0x3b5200.BOTH,appearance:new e$1C,polygonEntityId:n.id}),e.primitives.add(r.clampOutlines)}e$2b(r.clampOutlines)&&(r.clampOutlines.show=!r.show||r.show.getValue(o))}};var _0x3ad629=(_0x354ce2=!0,function(e,t){var i=_0x354ce2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x354ce2=!1,i}),_0x391f0a=_0x3ad629(void 0,(function(){return _0x391f0a.toString().search("(((.+)+)+)+$").toString().constructor(_0x391f0a).search("(((.+)+)+)+$")})),_0x354ce2;function _0x165ffe(){}function _0x3b88b2(e){--e;for(var t=1;32>t;t<<=1)e|=e>>t;return e+1}_0x391f0a(),_0x165ffe.computeNeighbors=function(e,t){for(var i=e.length/3,n=new Uint32Array(t+1),r=new Uint32Array(t+1),o=function(e,t){en;o--)c[i+2*o+2]=c[i+2*o],c[i+2*o+3]=c[i+2*o+1];c[i+2*o+2]=n,c[i+2*o+3]=r}},a=0;ae?-1:e)}function _0x19a1b8(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),e*Math.PI/180}_0x165ffe.deduplicate=function(e,t,i,n,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=e.byteLength/(4*t)),e=new Uint32Array(e,n,r*t),n=new Uint32Array(r);var o=Math.floor(1.1*r)+1;(null==_0xd3af1f||_0xd3af1f.length<2*o)&&(_0xd3af1f=new Uint32Array(_0x3b88b2(2*o)));for(var a=0;a<2*o;a++)_0xd3af1f[a]=0;var s=0,l=0!==i?Math.ceil(7.84*1.96/(i*i)*i*(1-i)):r;for(a=0;a>>2)|0;h=(u>>>=0)%o;for(var d=s;0!==_0xd3af1f[2*h+1];){if(_0xd3af1f[2*h]===u){var f=_0xd3af1f[2*h+1]-1,p=f*t;e:{for(var _=0;_=o&&(h-=o)}d===s&&(_0xd3af1f[2*h]=u,_0xd3af1f[2*h+1]=a+1,s++),n[a]=d}if(0!==i&&1-s/rt}function _0x44eb8d(e){var t=e.faces.length/3,i=e.faces,n=e.neighbors,r=0,o=0;for(o=0;o0&&(t=1/Math.sqrt(t),e.x*=t,e.y*=t,e.z*=t)}function _0x2f66bb(e){for(var t=e.faces.length/3,i=e.vertices,n=e.dim,r=e.faces,o=new Float32Array(3*t),a=0;a_0x335471)continue;_+=T,m++,P||n.cosAngle<_0xe4b898?(h[d++]=n.position0.x,h[d++]=n.position0.y,h[d++]=n.position0.z,h[d++]=n.position1.x,h[d++]=n.position1.y,h[d++]=n.position1.z,h[d++]=n.faceNormal0.x,h[d++]=n.faceNormal0.y,h[d++]=n.faceNormal0.z,v.push(T)):_0x420cc3(n,_0x1af65a)&&(f[p++]=n.position0.x,f[p++]=n.position0.y,f[p++]=n.position0.z,f[p++]=n.position1.x,f[p++]=n.position1.y,f[p++]=n.position1.z,f[p++]=n.faceNormal0.x,f[p++]=n.faceNormal0.y,f[p++]=n.faceNormal0.z,f[p++]=n.faceNormal1.x,f[p++]=n.faceNormal1.y,f[p++]=n.faceNormal1.z,y.push(T))}h=h.slice(0,d),f=f.slice(0,p);var A=_/m,L=v.length,M=y.length;return{regular:{instancesData:h,instanceCount:L,edgeLength:L*A},silhouette:{instancesData:f,instanceCount:M,edgeLength:M*A},averageEdgeLength:A}};var _0x2a99a0=(_0x3ac990=!0,function(e,t){var i=_0x3ac990?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ac990=!1,i}),_0x5683cd=_0x2a99a0(void 0,(function(){return _0x5683cd.toString().search("(((.+)+)+)+$").toString().constructor(_0x5683cd).search("(((.+)+)+)+$")})),_0x3ac990;_0x5683cd();var _0x3b8190={SVC_Vertex:1,SVC_Normal:2,SVC_VertexColor:4,SVC_SecondColor:8,SVC_TexutreCoord:16,SVC_TexutreCoordIsW:32},_0x35ed09=Object.freeze(_0x3b8190),_0x3e19be=(_0x1d454f=!0,function(e,t){var i=_0x1d454f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d454f=!1,i}),_0x476dcb=_0x3e19be(void 0,(function(){return _0x476dcb.toString().search("(((.+)+)+)+$").toString().constructor(_0x476dcb).search("(((.+)+)+)+$")})),_0x1d454f;function _0x30c9ea(e){}function _0x9ebde(e){if(e$2b(e.cachedSidenessVertexBuffer))return e.cachedSidenessVertexBuffer;var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,e.cachedSidenessVertexBuffer=t$Y.createVertexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW}),e.cachedSidenessVertexBuffer.vertexArrayDestroyable=!1,e.cachedSidenessVertexBuffer}function _0x2e38e3(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}function _0x114bcb(e,t){for(var i,n,r,o=t.componentsPerAttribute,a=e.vertCompressConstant,s=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),l=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),u=new Float32Array(3*e.verticesCount),c=0;cs?-1:1)*.5+.5)}}_0x30c9ea.createEdgeDataByIndices=function(e,t){var i,n,r=e.attrLocation.aPosition,o=e.vertexAttributes[r],a=e$2b(e.nCompressOptions)&&(e.nCompressOptions&_0x35ed09.SVC_Vertex)===_0x35ed09.SVC_Vertex,s=o.componentsPerAttribute;a?(s=3,i=_0x114bcb(e,o)):i=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var l=[],u=[],c=(n=0===t.indexType?new Uint16Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/2):new Uint32Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/4)).length,h=0,d=0,f=4*Math.floor(c/4);d1){var a=e[0].modelMatrix;for(n=1;n=0){var l=n[s];r=l.offset+l.count,o=i[a=l.index].indices.length}else r=0,o=i[a=0].indices.length;for(var u=e.length,c=0;co&&(r=0,o=i[++a].indices.length),n.push({index:a,offset:r,count:d}),r+=d}}}function Z$S(e,t){var i=[];return I$17(e,"geometry",t,i),I$17(e,"westHemisphereGeometry",t,i),I$17(e,"eastHemisphereGeometry",t,i),i}Object.defineProperties(e$1B.prototype,{componentDatatype:{get:function(){return S$12.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),e$1B.fromCartesian3=function(e){return o$1q.defined("offset",e),new e$1B(e.x,e.y,e.z)},e$1B.toValue=function(e,t){return o$1q.defined("offset",e),e$2b(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};var k$S={};function _$Q(e,t){var i=e.attributes;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];e$2b(r)&&e$2b(r.values)&&t.push(r.values.buffer)}e$2b(e.indices)&&t.push(e.indices.buffer)}function $$V(e,t){for(var i=e.length,n=0;n0&&((t=Y$K(e)).length>0&&(i=k$13.createAttributeLocations(t[0]),e.createPickOffsets&&(n=Z$S(o,t))),e$2b(o[0].attributes)&&e$2b(o[0].attributes.offset)&&(r=new Array(a),s=!0));for(var l=new Array(a),u=new Array(a),c=0;c0&&(i.set(l.indices,a),a+=x)}}return t.push(i.buffer),{stringTable:n,packedData:i}},k$S.unpackCreateGeometryResults=function(e){for(var t,i=e.stringTable,n=e.packedData,r=new Array(n[0]),o=0,a=1;a0){var T=f.length/p;for(_=ce$x.createTypedArray(T,d),t=0;t1?"vec"+a:"float")+" "+s+";",u="",c="";n&&(u+="vec2 st;\n",c+=" st = czm_decompressTextureCoordinates("+(a>1?s+".x":s)+");\n");i&&r&&o?(u+="vec3 normal;\nvec3 tangent;\nvec3 bitangent;\n",c+=" czm_octDecode("+s+"."+(n?"yz":"xy")+", normal, tangent, bitangent);\n"):(i&&(u+="vec3 normal;\n",c+=" normal = czm_octDecode("+s+(a>1?"."+(n?"y":"x"):"")+");\n"),r&&(u+="vec3 tangent;\n",c+=" tangent = czm_octDecode("+s+"."+(n&&i?"z":"y")+");\n"),o&&(u+="vec3 bitangent;\n",c+=" bitangent = czm_octDecode("+s+"."+(n&&i?"z":"y")+");\n"));var h=t;return h=(h=(h=(h=h.replace(/attribute\s+vec3\s+normal;/g,"")).replace(/attribute\s+vec2\s+st;/g,"")).replace(/attribute\s+vec3\s+tangent;/g,"")).replace(/attribute\s+vec3\s+bitangent;/g,""),[l,u,h=s$U.replaceMain(h,"czm_non_compressed_main"),"void main() \n{ \n"+c+" czm_non_compressed_main(); \n}"].join("\n")}function ut$a(e){var t=s$U.replaceMain(e,"czm_non_depth_clamp_main");return t+="varying float v_WindowZ;\nvoid main() {\n czm_non_depth_clamp_main();\n vec4 position = gl_Position;\n v_WindowZ = (0.5 * (position.z / position.w) + 0.5) * position.w;\n position.z = min(position.z, position.w);\n gl_Position = position;\n}\n"}function dt$a(e){var t=s$U.replaceMain(e,"czm_non_depth_clamp_main");return t="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n"+(t+="varying float v_WindowZ;\nvoid main() {\n czm_non_depth_clamp_main();\n#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\n gl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n")}function De$o(e,t){var i=e.vertexAttributes;for(var n in i)i.hasOwnProperty(n)&&(e$2b(t[n])||delete e.vertexAttributes[n])}function ht$9(e,t){return function(){return e[t]}}y$S._modifyShaderPosition=function(e,t,i){for(var n,r="",o="",a="";null!==(n=ct$9.exec(t));){var s=n[1],l="vec4 czm_compute"+s[0].toUpperCase()+s.substr(1)+"()";"vec4 czm_computePosition()"!==l&&(r+=l+";\n"),e$2b(e.rtcCenter)?(r+="uniform mat4 u_modifiedModelView;\n",o+="attribute vec4 position;\n",a+=l+"\n{\n return u_modifiedModelView * position;\n}\n\n",t=(t=(t=(t=t.replace(/attribute\s+vec(?:3|4)\s+position3DHigh;/g,"")).replace(/attribute\s+vec(?:3|4)\s+position3DLow;/g,"")).replace(/czm_modelViewRelativeToEye\s+\*\s+/g,"")).replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):i?a+=l+"\n{\n return czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow);\n}\n\n":(o+="attribute vec3 "+s+"2DHigh;\nattribute vec3 "+s+"2DLow;\n",a+=l+"\n{\n vec4 p;\n if (czm_morphTime == 1.0)\n {\n p = czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n p = czm_translateRelativeToEye("+s+"2DHigh.zxy, "+s+"2DLow.zxy);\n }\n else\n {\n p = czm_columbusViewMorph(\n czm_translateRelativeToEye("+s+"2DHigh.zxy, "+s+"2DLow.zxy),\n czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow),\n czm_morphTime);\n }\n return p;\n}\n\n")}return[r,o,t,a].join("\n")},y$S._appendShowToShader=function(e,t){if(!e$2b(e._batchTableAttributeIndices.show))return t;return s$U.replaceMain(t,"czm_non_show_main")+"\nvoid main() \n{ \n czm_non_show_main(); \n gl_Position *= czm_batchTable_show(batchId); \n}"},y$S._updateColorAttribute=function(e,t,i){if(!e$2b(e._batchTableAttributeIndices.color)&&!e$2b(e._batchTableAttributeIndices.depthFailColor)||-1===t.search(/attribute\s+vec4\s+color;/g))return t;if(i&&!e$2b(e._batchTableAttributeIndices.depthFailColor))throw new t$16("A depthFailColor per-instance attribute is required when using a depth fail appearance that uses a color attribute.");var n=t;return n=n.replace(/attribute\s+vec4\s+color;/g,""),n=i?n.replace(/(\b)color(\b)/g,"$1czm_batchTable_depthFailColor(batchId)$2"):n.replace(/(\b)color(\b)/g,"$1czm_batchTable_color(batchId)$2")},y$S._updatePickColorAttribute=function(e){var t=e.replace(/attribute\s+vec4\s+pickColor;/g,"");return t=t.replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2")},y$S._appendOffsetToShader=function(e,t){if(!e$2b(e._batchTableAttributeIndices.offset))return t;var i=t.replace(/attribute\s+float\s+batchId;/g,"attribute float batchId;\nattribute float applyOffset;");return" if (czm_sceneMode == czm_sceneMode3D)\n"," {\n"," $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);"," }\n"," else\n"," {\n"," $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);"," }\n",i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,"vec4 $1 = czm_computePosition();\n if (czm_sceneMode == czm_sceneMode3D)\n {\n $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0); }\n else\n {\n $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0); }\n")},y$S._appendDistanceDisplayConditionToShader=function(e,t,i){if(!e$2b(e._batchTableAttributeIndices.distanceDisplayCondition))return t;var n=s$U.replaceMain(t,"czm_non_distanceDisplayCondition_main"),r="void main() \n{ \n czm_non_distanceDisplayCondition_main(); \n vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);\n vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);\n vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);\n float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);\n";return e.updateBoundingSphere?r+=i?" vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n":" vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);\n vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);\n vec4 centerRTE;\n if (czm_morphTime == 1.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);\n }\n else\n {\n centerRTE = czm_columbusViewMorph(\n czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),\n czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),\n czm_morphTime);\n }\n":r+=" vec4 centerRTE = czm_view * vec4(boundingSphereCenter3DHigh + boundingSphereCenter3DLow, 1.0);\n",n+"\n"+(r+=" float radiusSq = boundingSphereRadius * boundingSphereRadius; \n float distanceSq; \n if (czm_sceneMode == czm_sceneMode2D) \n { \n distanceSq = czm_eyeHeight2D.y - radiusSq; \n } \n else \n { \n distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq; \n } \n distanceSq = max(distanceSq, 0.0); \n float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x; \n float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y; \n float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; \n gl_Position *= show; \n}")};var ce$t=Math.max(s$Y.hardwareConcurrency-1,1),Q$S,lt$5=new i$V("combineGeometry",Number.POSITIVE_INFINITY);function ft$8(e,t){var i,n,r,o,a=e._instanceIds;if(e._state===_0x142e29.READY){i=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];var s,l=e._numberOfInstances=i.length,u=[],c=[];for(r=0;r0){var _=new Float64Array(d);for(h=[_.buffer],o=0;o0?(e._recomputeBoundingSpheres=!0,e._state=_0x142e29.COMBINED):j$Z(e,t,_0x142e29.FAILED,void 0)})).otherwise((function(i){j$Z(e,t,_0x142e29.FAILED,i)}))}}function pt$9(e,t){var i,n,r=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],o=e._numberOfInstances=r.length,a=new Array(o),s=e._instanceIds,l=0;for(n=0;n0?(e._recomputeBoundingSpheres=!0,e._state=_0x142e29.COMBINED):j$Z(e,t,_0x142e29.FAILED,void 0)}function _t$8(e,t){var i=e._batchTableAttributeIndices.offset;if(e._recomputeBoundingSpheres&&e$2b(i)){var n,r=e._offsetInstanceExtend,o=e._instanceBoundingSpheres,a=o.length,s=e._tempBoundingSpheres;if(!e$2b(s)){for(s=new Array(a),n=0;n0||i$1c.intersectPlane(f,o$1m.ORIGIN_ZX_PLANE)!==Ae$u.INTERSECTING?c.push(f):(h.push(f),d.push(f))}var p=c[0],_=d[0],m=h[0];for(n=1;n8)||e._interleave;a.push(c$12.fromGeometry({context:o,geometry:u,attributeLocations:i,bufferUsage:A$19.STATIC_DRAW,interleave:v}))}if(e$2b(e._createBoundingVolumeFunction))e._createBoundingVolumeFunction(t,u);else if(e._boundingSpheres.push(i$1c.clone(u.boundingSphere)),e._boundingSphereWC.push(new i$1c),!r&&e$2b(u.boundingSphereCV)){var y=u.boundingSphereCV.center,$=y.x,b=y.y,T=y.z;y.x=T,y.y=$,y.z=b,e._boundingSphereCV.push(i$1c.clone(u.boundingSphereCV)),e._boundingSphere2D.push(new i$1c),e._boundingSphereMorph.push(new i$1c)}}e._va=a,e._primitiveType=n[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,j$Z(e,t,_0x142e29.COMPLETE,void 0)}function Pe$k(e){return e$2b(e._attributeLocations.sideness)}var de$u=null;function yt$8(e){var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,(de$u=t$Y.createVertexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW})).vertexArrayDestroyable=!1,de$u}function U$_(e,t){return t$Y.createVertexBuffer({context:e,typedArray:t.values,usage:A$19.STATIC_DRAW})}function vt$a(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}var W$V=null;function It$9(e){return e$2b(W$V)||((W$V=t$Y.createIndexBuffer({context:e,typedArray:vt$a(),usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})).vertexArrayDestroyable=!1),W$V}function At$8(e,t,i,n,r){var o,a=i.getRenderState();e$2b(r)&&r?a.stencilTest=_0x187e60.createReceiveClampObjectStencilTest(!0):a.stencilTest={enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.ZERO},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.ZERO},reference:0,mask:65535},n?((o=l$1g(a,!1)).cull={enabled:!0,face:G$17.BACK},e._frontFaceRS=d$1m.fromCache(o),o.cull.face=G$17.FRONT,e._backFaceRS=d$1m.fromCache(o)):(e._frontFaceRS=d$1m.fromCache(a),e._backFaceRS=e._frontFaceRS),o=l$1g(a,!1),e$2b(e._depthFailAppearance)&&(o.depthTest.enabled=!1),e$2b(e._depthFailAppearance)&&((o=l$1g(a=e._depthFailAppearance.getRenderState(),!1)).depthTest.func=re$E.GREATER,n?(o.cull={enabled:!0,face:G$17.BACK},e._frontFaceDepthFailRS=d$1m.fromCache(o),o.cull.face=G$17.FRONT,e._backFaceDepthFailRS=d$1m.fromCache(o)):(e._frontFaceDepthFailRS=d$1m.fromCache(o),e._backFaceDepthFailRS=e._frontFaceRS))}function Tt$b(e,t,i){var n=t.context,r=e._attributeLocations,o=Pe$k(e),a=e._batchTable.getVertexShaderCallback()(i.vertexShaderSource);a=y$S._appendOffsetToShader(e,a),a=y$S._appendShowToShader(e,a),a=Ie$l(a=y$S._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=Te$o(e,a=y$S._updateColorAttribute(e,a,!1)),a=y$S._modifyShaderPosition(e,a,t.scene3DOnly);var s=i.getFragmentShaderSource();s=Ae$r(s),a=new s$U({sources:[a],name:i.name}),o&&a.defines.push("APPLY_SIDENESS");var l=[];e._polygonOffset.enabled&&l.push("POLYGON_OFFSET"),s=new s$U({sources:[s],defines:l,name:i.name}),e._swipeEnabled&&s.defines.push("APPLY_SWIPE"),e._sp=r$13.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:r}),De$o(e._sp,r),e$2b(e._depthFailAppearance)&&(a=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),a=y$S._appendShowToShader(e,a),a=Ie$l(a=y$S._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=Te$o(e,a=y$S._updateColorAttribute(e,a,!0)),a=ut$a(a=y$S._modifyShaderPosition(e,a,t.scene3DOnly)),s=dt$a(s=Ae$r(s=e._depthFailAppearance.getFragmentShaderSource())),e._spDepthFail=r$13.replaceCache({name:"depthFail_"+e._depthFailAppearance.name,context:n,shaderProgram:e._spDepthFail,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:r}),De$o(e._spDepthFail,r))}var q$Z=new p$1d;new o$1p;var Be$k=new o$1p;function Ee$o(e,t,i,n){var r=e$2b(i)?i._uniforms:void 0,o={},a=t.uniforms;if(e$2b(a))for(var s in a)if(a.hasOwnProperty(s)){if(e$2b(r)&&e$2b(r[s]))throw new t$16("Appearance and material have a uniform with the same name: "+s);o[s]=ht$9(a,s)}var l=p$19(o,r);return(l=e._batchTable.getUniformMapCallback()(l)).u_polygonOffset=function(){return e._polygonOffset.value},l.uLineWidth=function(){return u$_(e._outlineWidth,1)},l.uSwipeRegion=function(){var t=e._swipeRegion,i=new e$29;return e$29.fromElements(t.x,t.y,t.x+t.z,t.y+t.w,i),i.x=i.x*n.context.drawingBufferWidth,i.y=(1-i.y)*n.context.drawingBufferHeight,i.z=i.z*n.context.drawingBufferWidth,i.w=(1-i.w)*n.context.drawingBufferHeight,i},e$2b(e.rtcCenter)&&(l.u_modifiedModelView=function(){var t=n.context.uniformState.view;return p$1d.multiply(t,e._modelMatrix,q$Z),p$1d.multiplyByPoint(q$Z,e.rtcCenter,Be$k),p$1d.setTranslation(q$Z,Be$k,q$Z),q$Z}),l}function Dt$9(e,t,i,n,r,o,a,s){var l,u=Ee$o(e,t,i,s);e$2b(e._depthFailAppearance)&&(l=Ee$o(e,e._depthFailAppearance,e._depthFailAppearance.material,s));var c=n?Le$s.TRANSLUCENT:Le$s.OPAQUE,h=r?2:1;h*=e$2b(e._depthFailAppearance)?2:1,o.length=e._va.length*h;for(var d=o.length,f=0,p=0;p-1&&this._instanceIds.length>0&&e$2b(this._instanceIds[0])&&e$2b(this._instanceIds[0].entityCollection)&&e$2b(this._instanceIds[0].entityCollection.owner)){var t=this._instanceIds[0].entityCollection.owner;if(typeof t.getVisibleInViewport<"u")if(!t.getVisibleInViewport(e.multiViewportIndex))return}if(!(!e$2b(this.geometryInstances)&&0===this._va.length||e$2b(this.geometryInstances)&&Array.isArray(this.geometryInstances)&&0===this.geometryInstances.length||!e$2b(this.appearance)||e.mode!==C$13.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)){if(e$2b(this._error))throw this._error;if(e$2b(this.rtcCenter)&&!e.scene3DOnly)throw new t$16("RTC rendering is only available for 3D only scenes.");if(this._state!==_0x142e29.FAILED){var i=e.context;if(e$2b(this._batchTable)||at$d(this,i),this._state!==_0x142e29.COMPLETE&&this._state!==_0x142e29.COMBINED&&(this.asynchronous?ft$8(this,e):pt$9(this,e)),this._state===_0x142e29.COMBINED&&(gt$7(this,e),Fe$k(this,e),mt$6(this,e)),this._batchTable.attributes.length>0){if(0===e$1T.maximumVertexTextureImageUnits)throw new t$14("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}if(this.show&&this._state===_0x142e29.COMPLETE){this._batchTableOffsetsUpdated||Fe$k(this,e),this._recomputeBoundingSpheres&&_t$8(this,e);var n=this.appearance,r=n.material,o=!1,a=!1;this._appearance!==n?(this._appearance=n,this._material=r,o=!0,a=!0):this._material!==r?(this._material=r,a=!0):this._swipeEnabled!==this.swipeEnabled&&(this._swipeEnabled=this.swipeEnabled,a=!0);var s=this.depthFailAppearance,l=e$2b(s)?s.material:void 0;this._depthFailAppearance!==s?(this._depthFailAppearance=s,this._depthFailMaterial=l,o=!0,a=!0):this._depthFailMaterial!==l&&(this._depthFailMaterial=l,a=!0);var u=this._appearance.isTranslucent();this._translucent!==u&&(this._translucent=u,o=!0),e$2b(this._material)&&this._material.update(i);var c=e$2b(this._twoPasses)?this._twoPasses:n.closed&&u,h=!1;if(e$2b(this._instanceIds[0])&&e$2b(this._instanceIds[0].receiveObjectClamp)&&this._instanceIds[0].receiveObjectClamp&&(h=!0),o)u$_(this._createRenderStatesFunction,At$8)(this,i,n,c,h);if(a)u$_(this._createShaderProgramFunction,Tt$b)(this,e,n);if(o||a)u$_(this._createCommandsFunction,Dt$9)(this,n,r,u,c,this._colorCommands,this._pickCommands,e);if(e$2b(this._instanceIds[0])){!e$2b(this._instanceIds[0].polygon)||e$2b(this._instanceIds[0].polygon._perPositionHeight)&&(!e$2b(this._instanceIds[0].polygon._perPositionHeight)||this._instanceIds[0].polygon._perPositionHeight._value)||e$2b(this._instanceIds[0].polygon._height)?l$Z.processWideOutline(e.camera._scene,this._instanceIds):l$Z.processClampWideOutline(e.camera._scene,this._instanceIds);for(var d=0,f=this._instanceIds.length;d4)throw new t$16("value must be and array with length between 1 and 4.");var a=ve$p(o);e.setBatchedAttribute(t,i,a),"offset"===r&&(n._recomputeBoundingSpheres=!0,n._batchTableOffsetsUpdated=!1)}}var Pt$6=new o$1p;function Bt$9(e,t,i){t.boundingSphere={get:function(){var n=e._instanceBoundingSpheres[i];if(e$2b(n)&&e.updateBoundingSphere){n=n.clone();var r=e.modelMatrix,o=t.offset;e$2b(o)&&ze$e(n,o$1p.fromArray(o.get(),0,Pt$6),e._offsetInstanceExtend[i]),e$2b(r)&&(n=i$1c.transform(n,r))}return n}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[i]}}}function Et$8(e,t,i){t.pickId={get:function(){return e._pickIds[i]}}}function j$Z(e,t,i,n){e._error=n,e._state=i,t.afterRender.push((function(){e._ready=e._state===_0x142e29.COMPLETE||e._state===_0x142e29.FAILED,e$2b(n)?e._readyPromise.reject(n):e._readyPromise.resolve(e)}))}function p$U(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).camera))throw new t$16("options.camera is required.");this._camera=e.camera,this._color=u$_(e.color,e$1U.CYAN),this._updateOnChange=u$_(e.updateOnChange,!0),this.show=u$_(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}y$S.prototype.getGeometryInstanceAttributes=function(e){if(!e$2b(e))throw new t$16("id is required");if(!e$2b(this._batchTable))throw new t$16("must call update before calling getGeometryInstanceAttributes");for(var t=-1,i=this._lastPerInstanceAttributeIndex,n=this._instanceIds,r=n.length,o=0;o= shadowMap_lightPositionEC.w) \n { \n discard; \n } \n distance /= shadowMap_lightPositionEC.w; // radius \n gl_FragColor = czm_packDepth(distance); \n":(e&&e$2b(o.pickId)&&"vSecondColor"===o.pickId&&(a+=" if(vColor.a < 0.1)\n {\n discard;\n }\n"),a+=" gl_FragColor = czm_packDepth(gl_FragCoord.z); \n"),a+="} \n"}function H$Y(e,t,i,n,r){var o="";return t&&(n||(o+="varying v_positionEC : vec3; \n"),o+="uniform shadowMap_lightPositionEC : vec4; \n"),o+=i?"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n":"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n czm_shadow_cast_main(); \n if (gl_FragColor.a == 0.0) \n { \n discard; \n } \n",t?o+=" var distance = length("+r+"); \n if (distance >= shadowMap_lightPositionEC.w) \n { \n discard; \n } \n distance /= shadowMap_lightPositionEC.w; // radius \n gl_FragColor = czm_packDepth(distance); \n":(o+=" var d = gl_FragCoord.z; \n",o+=" d = (d + 1.0) * 0.5; \n",o+=" gl_FragColor = czm_packDepth(d); \n"),o+="} \n"}function R$T(e,t,i,n){return"vec4 getPositionEC() \n{ \n"+(i?" return vec4("+n+", 1.0); \n":t?" return vec4(v_logPositionEC, 1.0); \n":" return czm_windowToEyeCoordinates(gl_FragCoord); \n")+"} \n"}function V$N(e,t,i){return"vec3 getNormalEC() \n{ \n"+(e?" return normalize("+t+"); \n":i?" return normalize(czm_normal*czm_computeNormal(vPositionMC.xyz)); \n":" return vec3(1.0); \n")+"} \n"}function b$17(e,t,i,n){return"fn getPositionEC() -> vec4 \n{ \n"+(i?" return vec4("+n+", 1.0); \n":t?" return vec4(v_logPositionEC, 1.0); \n":" return czm_windowToEyeCoordinates(gl_FragCoord); \n")+"} \n"}function x$10(e,t,i){return"fn getNormalEC() -> vec3 \n{ \n"+(e?" return normalize("+t+"); \n":i?" return normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(vPositionMC.xyz)); \n":" return vec3(1.0); \n")+"} \n"}function M$Y(){return"void main()\n {\n vec4 positionEC = getPositionEC();\n vec3 normalEC = getNormalEC();\n float depth = -positionEC.z;\n czm_shadow_receive_main();\n float visibility = getShadowVisibility(positionEC, normalEC, depth);\n gl_FragColor.rgb *= visibility;\n }"}function U$Z(){return"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n var positionEC = getPositionEC(); \n var normalEC = getNormalEC(); \n var depth = -positionEC.z; \n var visibility = getShadowVisibility(positionEC, normalEC, depth); \n czm_shadow_receive_main(); \n var fragColor = vec3(gl_FragColor.rgb) * visibility; \n gl_FragColor = vec4(fragColor, gl_FragColor.a); \n} \n"}function e$1z(e,t,i,n,r,o){this._valueCache={},this._engine=e,this._noUBO=!e.context.webgl2,this._dynamic=i,this._name=n??"no-name",this._data=t||[],this._uniformLocations={},this._uniformSizes={},this._uniformArraySizes={},this._uniformLocationPointer=0,this._needSync=!1,this._trackUbosInFrame=!1,this._noUBO?(this.updateMatrix3x3=this._updateMatrix3x3ForEffect,this.updateMatrix2x2=this._updateMatrix2x2ForEffect,this.updateFloat=this._updateFloatForEffect,this.updateFloat2=this._updateFloat2ForEffect,this.updateFloat3=this._updateFloat3ForEffect,this.updateFloat4=this._updateFloat4ForEffect,this.updateFloatArray=this._updateFloatArrayForEffect,this.updateArray=this._updateArrayForEffect,this.updateIntArray=this._updateIntArrayForEffect,this.updateMatrix=this._updateMatrixForEffect,this.updateMatrices=this._updateMatricesForEffect,this.updateVector3=this._updateVector3ForEffect,this.updateVector4=this._updateVector4ForEffect,this.updateColor3=this._updateColor3ForEffect,this.updateColor4=this._updateColor4ForEffect,this.updateDirectColor4=this._updateDirectColor4ForEffect,this.updateInt=this._updateIntForEffect,this.updateInt2=this._updateInt2ForEffect,this.updateInt3=this._updateInt3ForEffect,this.updateInt4=this._updateInt4ForEffect):(this._engine._uniformBuffers.push(this),this.updateMatrix3x3=this._updateMatrix3x3ForUniform,this.updateMatrix2x2=this._updateMatrix2x2ForUniform,this.updateFloat=this._updateFloatForUniform,this.updateFloat2=this._updateFloat2ForUniform,this.updateFloat3=this._updateFloat3ForUniform,this.updateFloat4=this._updateFloat4ForUniform,this.updateFloatArray=this._updateFloatArrayForUniform,this.updateArray=this._updateArrayForUniform,this.updateIntArray=this._updateIntArrayForUniform,this.updateMatrix=this._updateMatrixForUniform,this.updateMatrices=this._updateMatricesForUniform,this.updateVector3=this._updateVector3ForUniform,this.updateVector4=this._updateVector4ForUniform,this.updateColor3=this._updateColor3ForUniform,this.updateColor4=this._updateColor4ForUniform,this.updateDirectColor4=this._updateDirectColor4ForUniform,this.updateInt=this._updateIntForUniform,this.updateInt2=this._updateInt2ForUniform,this.updateInt3=this._updateInt3ForUniform,this.updateInt4=this._updateInt4ForUniform)}p$U.prototype.update=function(e){if(this.show){var t,i,n=this._planesPrimitives,r=this._outlinePrimitives;if(this._updateOnChange){for(i=n.length,t=0;t1)<<4|e.softShadows<<5|t<<6|i<<7|n<<8)},g$10.createShadowReceiveVertexShader=function(e,t,i){var n=e.defines.slice(0),r=e.sources.slice(0);return n.push("SHADOW_MAP"),t&&(i?n.push("GENERATE_POSITION_AND_NORMAL"):n.push("GENERATE_POSITION")),new s$U({name:e.name+"_shadowReceive",defines:n,sources:r,useWGSL:e.useWGSL})},g$10.createShadowReceiveFragmentShader=function(e,t,i,n,r,o){for(var a=u$_(e.useWGSL,!1),s=s$U.findNormalVarying(e),l=!n&&e$2b(s)||n&&r,u=s$U.findPositionVarying(e),c=e$2b(u),h=t._usesDepthTexture,d=(t._polygonOffsetSupported,t._isPointLight),f=t._isSpotLight,p=t._numberOfCascades>1,_=(t.debugCascadeColors,t.softShadows),m=t._pcss,g=t._quality,x=d?t._pointBias:n?t._terrainBias:t._primitiveBias,v=e.defines.slice(0),y=e.sources.slice(0),$=!1,b=y.length,T=0;T")>-1){$=!0;break}if(!$)for(T=0;T0&&v.push("USE_NORMAL_SHADING_SMOOTH")),(x.normalOffset&&l||o)&&v.push("APPLY_NORMAL_OFFSET"),!$){var C="",S=e.defines.indexOf("LOG_DEPTH")>-1,w=a?x$10:V$N,E=a?U$Z:M$Y;C+=(S?a?"varying v_logPositionEC : vec3; \n":"varying vec3 v_logPositionEC; \n":"\n")+(a?b$17:R$T)(e,S,c,u)+w(l,s,o)+"#include \n#include \n"+E(),y.push(C)}return new s$U({name:e.name+"shadowReceive",defines:v,sources:y,useWGSL:e.useWGSL})},Object.defineProperty(e$1z.prototype,"useUbo",{get:function(){return!this._noUBO},enumerable:!1,configurable:!0}),Object.defineProperty(e$1z.prototype,"isSync",{get:function(){return!this._needSync},enumerable:!1,configurable:!0}),e$1z.prototype.isDynamic=function(){return void 0!==this._dynamic},e$1z.prototype.getData=function(){return this._bufferData},e$1z.prototype.getBuffer=function(){return this._buffer},e$1z.prototype._fillAlignment=function(e){var t;if(t=e<=2?e:4,this._uniformLocationPointer%t!=0){var i=this._uniformLocationPointer;this._uniformLocationPointer+=t-this._uniformLocationPointer%t;for(var n=this._uniformLocationPointer-i,r=0;r0){if(t instanceof Array)throw"addUniform should not be use with Array in UBO: "+e;if(this._fillAlignment(4),this._uniformArraySizes[e]={strideSize:t,arraySize:i},16==t)t*=i;else t=t*i+(4-t)*i;n=[];for(var r=0;r1&&this._buffers[this._bufferIndex][1]){if(this._buffersEqual(this._bufferData,this._buffers[this._bufferIndex][1]))return this._needSync=!1,void(this._createBufferOnWrite=!1);this._copyBuffer(this._bufferData,this._buffers[this._bufferIndex][1])}this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._needSync=!1,this._createBufferOnWrite=!1}},e$1z.prototype._createNewBuffer=function(){this._bufferIndex+1=t?t:e$1T.maximumCubeMapSize,r.x=t,r.y=t;var o=new f$18(0,0,t,t);i[0].passState.viewport=o,i[1].passState.viewport=o,i[2].passState.viewport=o,i[3].passState.viewport=o,i[4].passState.viewport=o,i[5].passState.viewport=o}else 1===n?(t=e$1T.maximumTextureSize>=t?t:e$1T.maximumTextureSize,r.x=t,r.y=t,i[0].passState.viewport=new f$18(0,0,t,t)):4===n&&(t=e$1T.maximumTextureSize>=2*t?t:e$1T.maximumTextureSize/2,r.x=2*t,r.y=2*t,i[0].passState.viewport=new f$18(0,0,t,t),i[1].passState.viewport=new f$18(t,0,t,t),i[2].passState.viewport=new f$18(0,t,t,t),i[3].passState.viewport=new f$18(t,t,t,t));e._clearPassState.viewport=new f$18(0,0,r.x,r.y);for(var a=0;a=e.maximumDistance)return e._outOfView=!0,void(e._needsUpdate=!1);var o=t.mapProjection.ellipsoid.geodeticSurfaceNormal(i.positionWC,Dt$8),a=o$1p.negate(n.directionWC,Lt$6),s=o$1p.dot(o,a),l=e$2a.clamp(s/.1,0,1);if(e._darkness=e$2a.lerp(1,e.darkness,l),s<0)return e._outOfView=!0,void(e._needsUpdate=!1);e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)r.center=n.positionWC,r.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(r)===Ae$u.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),i$1c.clone(r,e._boundingSphere);else{var u=n.frustum.far/2,c=o$1p.add(n.positionWC,o$1p.multiplyByScalar(n.directionWC,u,Pe$j),Pe$j);r.center=c,r.radius=u,e._outOfView=t.cullingVolume.computeVisibility(r)===Ae$u.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),i$1c.clone(r,e._boundingSphere)}}function Nt$7(e,t){var i=t.camera,n=e._lightCamera,r=e._sceneCamera,o=e._shadowMapCamera;e._cascadesEnabled?o$1p.clone(n.directionWC,o.directionWC):e._isPointLight?o$1p.clone(n.positionWC,o.positionWC):o.clone(n);var a,s,l=e._lightDirectionEC;p$1d.multiplyByPointAsVector(i.viewMatrix,o.directionWC,l),o$1p.normalize(l,l),o$1p.negate(l,l),p$1d.multiplyByPoint(i.viewMatrix,o.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius,e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),s=Math.min(t.shadowState.farPlane,e.maximumDistance+1),s=Math.max(s,a+1)):(a=i.frustum.near,s=e.maximumDistance),e._sceneCamera=v$K.clone(i,r),i.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=s,e._distance=s-a,Vt$8(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}function Rt$6(e,t,i,n,r,o){var a,s,l;if(e$2b(o)&&(a=o.shaderProgram,s=o.renderState,l=o.uniformMap),(o=i$_.shallowClone(i,o)).castShadows=!0,o.receiveShadows=!1,!e$2b(a)||r!==i.shaderProgram.id||t){var u=i.shaderProgram,c=i.pass===Le$s.GLOBE,h=i.pass!==Le$s.TRANSLUCENT,d=e._isPointLight,f=e._usesDepthTexture,p=i.selectCastShadows,_=g$10.getShadowCastShaderKeyword(d,c,f,h);if(!e$2b(a=n.shaderCache.getDerivedShaderProgram(u,_))){var m=u.vertexShaderSource,g=u.fragmentShaderSource,x=g$10.createShadowCastVertexShader(m,d,c),v=g$10.createShadowCastFragmentShader(g,d,f,h,o,p);a=n.shaderCache.createDerivedShaderProgram(u,_,{vertexShaderSource:x,fragmentShaderSource:v,attributeLocations:u._attributeLocations})}s=e._primitiveRenderState,d?s=e._pointRenderState:c&&(s=e._terrainRenderState),i.renderState.cull.enabled||((s=l$1g(s,!1)).cull=l$1g(s.cull,!1),s.cull.enabled=!1,s=d$1m.fromCache(s)),l=i.uniformMap}return o.shaderProgram=a,o.renderState=s,o.uniformMap=l,o}C$Y.prototype.update=function(e){if(Nt$7(this,e),this._needsUpdate)if(st$6(this,e.context),this._isPointLight&&Pt$5(this,e),this._cascadesEnabled&&(Ot$7(this,e),this._numberOfCascades>1&&St$5(this,e),this._numberOfCascades>1&&bt$7(this)),this._isPointLight)this._shadowMapCullingVolume=i$W.fromBoundingSphere(this._boundingSphere);else{var t=this._shadowMapCamera,i=t.positionWC,n=t.directionWC,r=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(i,n,r),1===this._passes.length&&this._passes[0].camera.clone(t)}if(1===this._passes.length){var o=this._sceneCamera.inverseViewMatrix;p$1d.multiply(this._shadowMapCamera.getViewProjection(),o,this._shadowMapMatrix)}this.debugShow&<$4(this,e),this._ubo.update(e.context)},C$Y.prototype.updatePass=function(e,t){Ee$n(this,e,t)},C$Y.createReceiveDerivedCommand=function(e,t,i,n,r){e$2b(r)||(r={});var o=e.length>0,a=t.shaderProgram,s=a.vertexShaderSource,l=a.fragmentShaderSource,u=t.pass===Le$s.GLOBE,c=t.pass===Le$s.S3MTiles,h=!1;if(u&&(h=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&o){var d,f;e$2b(r.receiveCommand)&&(d=r.receiveCommand.shaderProgram,f=r.receiveCommand.uniformMap);var p=!1;e$2b(r.receiveCommand)||(p=!0),r.receiveCommand=i$_.shallowClone(t,r.receiveCommand),r.castShadows=!1,r.receiveShadows=!0,p&&r.receiveCommand.addUniformBuffer(e[0]._ubo);var _=r.receiveShaderCastShadows!==t.castShadows,m=r.receiveShaderProgramId!==t.shaderProgram.id;if(!e$2b(d)||m||i||_){var g=g$10.getShadowReceiveShaderKeyword(e[0],t.castShadows,u,h);if(!e$2b(d=n.shaderCache.getDerivedShaderProgram(a,g))){var x=g$10.createShadowReceiveVertexShader(s,u,h),v=g$10.createShadowReceiveFragmentShader(l,e[0],t.castShadows,u,h,c);d=n.shaderCache.createDerivedShaderProgram(a,g,{vertexShaderSource:x,fragmentShaderSource:v,attributeLocations:a._attributeLocations})}f=e[0]._ubo._uniformMap?p$19(t.uniformMap,e[0]._ubo._uniformMap,!1):t.uniformMap}r.receiveCommand.shaderProgram=d,r.receiveCommand._uniformMap=f,r.receiveShaderProgramId=t.shaderProgram.id,r.receiveShaderCastShadows=t.castShadows}return r},C$Y.createCastDerivedCommand=function(e,t,i,n,r){if(e$2b(r)||(r={}),t.castShadows){var o=r.castCommands;e$2b(o)||(o=r.castCommands=[]);var a=r.castShaderProgramId,s=e.length;o.length=s;for(var l=0;l1){var r=n[0],o=n[1];for(var a in e.defines)if(-1!==e.defines[a].indexOf(r))return void(e.defines[a]=r+" "+o);e.defines.push(t)}else{for(var a in e.defines)if(e.defines[a]===t){i=!0;break}i||e.defines.push(t)}}function _0x2b1109(e,t,i){if(e$2b(t)){var n=t.shaderProgram.fragmentShaderSource,r=t.shaderProgram.vertexShaderSource;_0x25bd36(n,i);var o=t.shaderProgram._attributeLocations;t.shaderProgram.destroy(),t.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:o})}}function _0x223f51(e,t){for(var i=-1,n=0;n=0&&e.defines.splice(i,1)}function _0x444b2f(e,t,i){if(e$2b(t)){var n=t.shaderProgram.vertexShaderSource,r=t.shaderProgram.fragmentShaderSource;_0x223f51(r,i);var o=t.shaderProgram._attributeLocations;t.shaderProgram.destroy(),t.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:o})}}function _0x22fda8(e){for(var t=0;te.y==f=c&&e.x<=h)return!0}return o}function _0x9c0a49(e,t,i){var n=e._bounds[0],r=e._bounds[1],o=e._bounds[2],a=e._bounds[3],s=0,l=0,u=o$1p.fromDegrees(n,r,t),c=new i$15(0,0,0),h=new p$1d,d=new p$1d,f=new o$1p,p=new o$1p,_=new o$1p;m$17.headingPitchRollToFixedFrame(u,c,t$13.WGS84,m$17.eastNorthUpToFixedFrame,h),p$1d.inverse(h,d);var m=o$1p.fromDegrees(o,r,e._bottom);p$1d.multiplyByPoint(d,m,p);var g=o$1p.fromDegrees(n,a,e._bottom);p$1d.multiplyByPoint(d,g,_);for(var x=o$1p.distance(new o$1p(0,0,0),p),v=o$1p.distance(new o$1p(0,0,0),_),y=(Math.floor(v/e._spacing),0);y0)return e._enuPoints;var t=e._bounds[0],i=e._bounds[1],n=e._bounds[2],r=e._bounds[3],o=0,a=0,s=0,l=o$1p.fromDegrees(t,i,e._bottom),u=new i$15(0,0,0),c=new p$1d,h=new p$1d,d=new o$1p,f=new o$1p,p=new o$1p;m$17.headingPitchRollToFixedFrame(l,u,t$13.WGS84,m$17.eastNorthUpToFixedFrame,c),p$1d.inverse(c,h);var _=o$1p.fromDegrees(n,i,e._bottom);p$1d.multiplyByPoint(h,_,f);var m=o$1p.fromDegrees(t,r,e._bottom);p$1d.multiplyByPoint(h,m,p);for(var g=o$1p.distance(new o$1p(0,0,0),f),x=o$1p.distance(new o$1p(0,0,0),p),v=0;v{if(e._points.length>0){var i={},n=_0x230640(e);i.points=e._points,i.enuPoints=n,i.bounds=e._bounds,i.extend=e._extend,i.spacing=e._spacing,i.bottom=e._bottom,i.pixelsArray=t;var r=_0x3eecee.scheduleTask(i,[]);if(!e$2b(r))return[];r.then((function(t){var i=t.resultData;i.length>0&&e._queryPointsEvent.raiseEvent(i)})).otherwise((function(e){}))}else e._queryPointsEvent.raiseEvent({resultData:[]})})))}}Object.defineProperties(_0x38ed3e.prototype,{startTime:{get:function(){return this._startTime},set:function(e){this._startTime=e.clone(),this._update=!0}},endTime:{get:function(){return this._endTime},set:function(e){this._endTime=e.clone(),this._update=!0}},timeInterval:{get:function(){return this._timeInterval},set:function(e){this._timeInterval=e,this._update=!0}},spacing:{get:function(){return this._spacing},set:function(e){this._spacing=e,this._update=!0}},queryPointsEvent:{get:function(){return this._queryPointsEvent}},isPointsVisible:{get:function(){return this._isPointsVisible},set:function(e){this._isPointsVisible=e}},colorTable:{get:function(){return this._colorTable},set:function(e){if(e$2b(e)){e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:this._scene.context,width:1024,height:64,pixelFormat:V$10.RGBA,flipY:!1})),this._colorTable=e,this._colorTable.generateBuffer(),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._colorTable._imageBuffer});for(i=0,n=(t=this._arrPointCommand).length;i.999?1:c)},_0x38ed3e.prototype.update=function(e,t,i){if(!t._fboState.enabled&&!t.camera.bReflect){if(this._update){if(!this.shadowMap.enabled)throw new t$16("ShadowQueryPoints must be shadow.");if(this._scene.mode!==C$13.SCENE3D)throw new t$16("Shadow anaylsis is not supported for non-3D scenes.");if(this._frameState=t,e$2b(this._depthBuffer)||(this._depthBuffer=new s$T(e),this._depthBuffer.environmentVisible.isSunVisible=!0,this._depthBuffer.environmentVisible.isGlobalVisible=!0,this._depthBuffer.environmentVisible.isObjectVisible=!0,this._depthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._sceneName]=this._depthBuffer),!e$2b(this._globalDepthBuffer)){this._globalDepthBuffer=new s$T(e),this._globalDepthBuffer.environmentVisible.isObjectVisible=!0,this._globalDepthBuffer.environmentVisible.isGlobalVisible=!0,this._globalDepthBuffer._visibleViewport=this._visibleViewport;var n=this._name+"_global";t._framebufferList[n]=this._globalDepthBuffer}this._update=!1,this._timeUpdate=!0,this._currentTime=1;var r=new a$15,o=0;for(this.shadowMap.maximumDistance=this._shadowMapMaxDistance;a$15.addMinutes(this._startTime,o,r),o+=this._timeInterval,!a$15.lessThan(this._endTime,r);)this._currentTime++;_0x22fda8(this),_0x51fd3e(this);var a=_0x230640(this);if(this._points.length=0,a.length>0){for(var s=0;s<=this._extend;s+=this._spacing)_0x422589(this,e,a,this._bottom+s);_0x11247b(this,e,t),_0x5e95dc(this,e,t)}}if(!this._timeUpdate&&this._isPointsVisible){for(var l=0;l0&&this._volDirty){this._volDirty=!1,this._voxelData={values:[]};for(var e=0,t=0;t<=this._extend;t+=this._spacing)_0x9c0a49(this,t,e),e++;this._voxelData.values=new Float32Array(this._voxelData.values),this._voxelData.depth=Math.ceil(this._extend/this._spacing)+1,this._voxelData.minValue=0,this._voxelData.maxValue=1,this._voxelData.minHeight=this._bottom,this._voxelData.maxHeight=this._bottom+this._extend}},_0x38ed3e.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=1<8)throw new t$16("the index is 0~8");return 1<this._bounds[2]||ithis._bounds[3]))return-1;for(var r=!1,o=0,a=.1*this._spacing,s=0;s<=this._extend;s+=this._spacing){if(Math.abs(this._bottom+s-n)=this._arrRasterPointCommand.length)return-1;var d=this._bounds[2]-this._bounds[0],f=(n=this._bounds[3]-this._bounds[1],this._bounds[0]-.025*d),p=this._bounds[1]-.025*n;d+=.05*d,n+=.05*n;var _=parseInt((t-f)/d*1024),m=parseInt((i-p)/n*1024);_=_<1?1:_,m=m<1?1:m;var g=0,x=new e$29(1,1/255,1/65025,1/160581375),v=this._arrRasterPointCommand[o].framebuffer;for(u=-1;u<2;u++)for(var y=-1;y<2;y++){var $=this._scene.context.readPixels({x:_+u,y:m+y,width:1,height:1,framebuffer:v}),b=e$29.unpack($,0);e$29.divideByScalar(b,255,b),g=Math.max(g,e$29.dot(b,x))}return g=g>.999?1:g},_0x38ed3e.prototype.getShadowRadioAsync=function(e){if(!e$2b(e)||this._timeUpdate)return Promise.resolve(-1);var t=e.longitude,i=e.latitude,n=e.height;if(!e$2b(t)||!e$2b(i)||!e$2b(n)||(t=e$2a.toDegrees(t),i=e$2a.toDegrees(i),tthis._bounds[2]||ithis._bounds[3]))return Promise.resolve(-1);for(var r=!1,o=0,a=.1*this._spacing,s=0;s<=this._extend;s+=this._spacing){if(Math.abs(this._bottom+s-n)=this._arrRasterPointCommand.length)return Promise.resolve(-1);var l=_0x230640(this);if(l.length<0)return Promise.resolve(-1);r=!1;for(var u=0;u{for(var t=0,i=0;i.999?1:t,Promise.resolve(t)}))},_0x38ed3e.prototype.qureyRegion=function(e){if(!e$2b(e)||!e$2b(e.position))throw new t$16("the options is required");this._qureyRegion=e.position,this._bottom=u$_(e.bottom,this._bottom),this._extend=u$_(e.extend,this._extend),this._update=!0,this._enuPoints=[];var t=_0x42f13c(this),i=o$1p.distance(t.center,this._scene.camera.position);i+=this._boundingSphere.radius,this.shadowMap.maximumDistance=i,this.shadowMap.size=this._shadowMapParams.analysisSize,this._shadowMapMaxDistance=i},_0x38ed3e.prototype.clear=function(){_0x22fda8(this),this._scene._analyst3D.remove(this._name,!1)},_0x38ed3e.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("ShadowQueryPoints"),""!==this._name||this._checking?e$2b(this._scene._analyst3D.find(this._name))||this._scene._analyst3D.add(this):(this._name="ShadowQueryPoints"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._scene._analyst3D.add(this),this._scene._analysisShadowMap=this.shadowMap)},_0x38ed3e.prototype.destroy=function(){return e$2b(this._frameState)&&(e$2b(this._depthBuffer)&&delete this._frameState._framebufferList[this._sceneName],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),_0x22fda8(this),_0x51fd3e(this),e$2b(this._hypsometricTexture)&&(this._hypsometricTexture=this._hypsometricTexture.destroy()),this._scene._analyst3D.remove(this._name,!0),e$2b(this.shadowMap)&&(this.shadowMap.destroy(),this.shadowMap=void 0,this._scene._analysisShadowMap=void 0),i$10(this)};var _0x23b4cb="attribute vec2 aSideness;\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\n\nuniform float uLineWidth;\nuniform mat4 uRenderTextureMatrix;\n\nvarying vec4 renderTextureCoord;\n\nvec4 resolvePosition(vec4 viewPosV0, vec4 viewPosV1, vec2 sidenessNorm) {\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n vec4 viewPos = mix(viewPosV0, viewPosV1, sidenessNorm.y);\n vec4 projPosV0 = czm_projection * viewPosV0;\n vec4 projPosV1 = czm_projection * viewPosV1;\n vec4 projPos = czm_projection * viewPos;\n vec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\n vec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\n vec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\n float lineLengthPixels = length(screenSpaceLinePixels);\n float dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\n vec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\n vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\n vec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\n float halfLineWidth = max(uLineWidth, 1.0) * 0.5;\n vec2 halfLineWidthNDC = halfLineWidth * uPixelToNDC;\n vec2 ndcOffset = screenSpaceDirection * halfLineWidthNDC + perpendicularScreenSpaceDirection * halfLineWidthNDC;\n projPos.xy += ndcOffset * projPos.w;\n projPos.z += (dzPerPixel * halfLineWidth) * sideness.y * projPos.w;\n return projPos;\n}\n\nvoid main() {\n vec4 viewPosV0 = czm_modelView * vec4(aPosition0, 1.0);\n vec4 viewPosV1 = czm_modelView * vec4(aPosition1, 1.0);\n gl_Position = resolvePosition(viewPosV0, viewPosV1, aSideness);\n vec4 viewPos = czm_inverseProjection * gl_Position;\n renderTextureCoord = uRenderTextureMatrix * viewPos;\n}",_0x2e25fb="uniform sampler2D uTexture0;\nuniform vec4 uVisibleColor;\nuniform vec4 uHiddenColor;\n\nvarying vec4 renderTextureCoord;\n\nvoid main() {\n vec4 resultColor = uVisibleColor;\n vec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n float depth = texCoord.z * 0.5 + 0.5;\n texCoord.xy = texCoord.xy * 0.5 + 0.5;\n float z_window = czm_unpackDepth(texture2D(uTexture0, texCoord.xy));\n#ifdef WEBGPU\n z_window = z_window * 0.5 + 0.5;\n#endif\n if(z_window < depth && z_window > 0.0 && z_window < 1.0)\n {\n resultColor = uHiddenColor;\n }\n gl_FragColor = resultColor;\n}",_0x58ade4=(_0x5b8710=!0,function(e,t){var i=_0x5b8710?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b8710=!1,i}),_0x2dce7d=_0x58ade4(void 0,(function(){return _0x2dce7d.toString().search("(((.+)+)+)+$").toString().constructor(_0x2dce7d).search("(((.+)+)+)+$")})),_0x5b8710;_0x2dce7d();var _0x26c186="\nattribute vec3 aPosition0;\nuniform float uLineWidth;\nuniform mat4 uRenderTextureMatrix;\n\nvarying vec4 renderTextureCoord;\n\nvoid main() {\n vec4 viewPos = czm_modelView * vec4(aPosition0, 1.0);\n gl_Position = czm_projection * viewPos;\n renderTextureCoord = uRenderTextureMatrix * viewPos;\n}",_0x43ce69=(_0x5b4dc2=!0,function(e,t){var i=_0x5b4dc2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b4dc2=!1,i}),_0x2a31cf=_0x43ce69(void 0,(function(){return _0x2a31cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a31cf).search("(((.+)+)+)+$")})),_0x5b4dc2;function _0x23be36(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._depthBuffer=void 0,this._command=void 0,this._frameState=void 0,this._viewPosition=[0,0,0],this._cameraDir=new o$1p,this._viewProjMatrix=new p$1d,this._viewProjMatrixs=new e$1N,this._renderTextureMatrix=new p$1d,this._renderTextureMatrixs=new e$1N,this._visibleColor=new e$29(0,1,0,1),this._hiddenColor=new e$29(1,0,0,1),this._targetPoints=new e$1N,this._sightlineCameras=new e$1N,this._update=!0,this._updateAll=!0,this._id=0,this._name="",this._visibleViewport=4095,this._barrierPointArray=new e$1N,this._depthBuffers=new e$1N,this._commands=new e$1N,this._lineWidth=1}function _0xd52957(e,t,i){var n,r=i.camera,o=r._projection;if(e._scene.mode===C$13.SCENE3D)n=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var a=a$18.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);n=o.project(a,new o$1p)}var s=new o$1p(0,0,0);e._targetPoints._hash;var l,u=0,c=e._currentTargetPoint;if(e._scene.mode===C$13.SCENE3D)l=o$1p.fromDegreesArrayHeights(c,e._scene._globe.ellipsoid)[0];else{var h=a$18.fromDegrees(c[0],c[1],c[2]);l=o.project(h,new o$1p)}var d=new o$1p;o$1p.subtract(l,n,d),o$1p.normalize(d,d),o$1p.add(s,d,s),u=Math.max(u,o$1p.distance(l,n)),o$1p.normalize(s,s),o$1p.clone(s,e._cameraDir);var f=new o$1p,p=new o$1p,_=new o$1p,m=r.frustum.fov;o$1p.clone(r.position,f),o$1p.clone(r.direction,p),o$1p.clone(r.up,_);var g=2*e$2a.PI/3,x=r.frustum.near,v=r.frustum.far,y=i.useLogDepth,$=e._currentTargetName,b=e._depthBuffers.get($);e$2b(b)||((b=new s$T(t)).environmentVisible.isObjectVisible=!0,b.environmentVisible.isGlobalVisible=!0,b._visibleViewport=e._visibleViewport,i._framebufferList[$]=b,e._depthBuffers.set($,b)),b.isUpdate=!0,b._beginFunc=function(){i.useLogDepth=!1,o$1p.clone(r.position,f),o$1p.clone(r.direction,p),o$1p.clone(r.up,_),m=r.frustum.fov,r.frustum.fov=g;var t=s,o=new o$1p;o=o$1p.clone(n,o),o=o$1p.normalize(o,o),Math.abs(o$1p.dot(o,t))>=1&&(o=Math.abs(o$1p.dot(t,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,o):o$1p.clone(o$1p.UNIT_Z,o));var a=new o$1p;o$1p.cross(o,t,a),a=o$1p.normalize(a,a),o$1p.cross(t,a,o),o=o$1p.normalize(o,o);var l={destination:n,orientation:{direction:t,up:o},convert:!1};r.setView(l),e._sightlineCameras.set($,l),r.frustum.near=1,r.frustum.far=Math.ceil(Math.max(u,10));var c=new p$1d;p$1d.multiply(r.frustum.projectionMatrix,r.viewMatrix,c),e._viewProjMatrixs.set($,c),e._renderTextureMatrixs.set($,new p$1d)},b._endFunc=function(){if(i.useLogDepth=y,r.frustum.fov=m,r.setView({destination:f,orientation:{direction:p,up:_},convert:!1}),r.frustum.near=x,r.frustum.far=v,b.isUpdate=!1,!e._update)if(t.webgpu)_0x73245b(e,$).then((t=>{e._barrierPointArray.set($,t)}));else{var n=_0xebdb1b(e,$);e._barrierPointArray.set($,n)}}}_0x2a31cf(),Object.defineProperties(_0x23be36.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._updateAll=!0,this._update=!0}},visibleColor:{get:function(){var e=new e$1U;return e.red=this._visibleColor.x,e.green=this._visibleColor.y,e.blue=this._visibleColor.z,e.alpha=this._visibleColor.w,e},set:function(e){this._visibleColor.x=e.red,this._visibleColor.y=e.green,this._visibleColor.z=e.blue,this._visibleColor.w=e.alpha}},hiddenColor:{get:function(){var e=new e$1U;return e.red=this._hiddenColor.x,e.green=this._hiddenColor.y,e.blue=this._hiddenColor.z,e.alpha=this._hiddenColor.w,e},set:function(e){this._hiddenColor.x=e.red,this._hiddenColor.y=e.green,this._hiddenColor.z=e.blue,this._hiddenColor.w=e.alpha}},lineWidth:{get:function(){return this._lineWidth},set:function(e){o$1q.typeOf.number.greaterThan("Sightline.lineWidth",e,0),this._lineWidth=e}}}),_0x23be36.prototype.addTargetPoint=function(e){LicenseChecker.LICENSECHECKER.verify("Sightline");var t=e.name,i=e.position;return!(!e$2b(t)||!e$2b(i))&&(this._targetPoints.set(t,i),this._currentTargetName=t,this._currentTargetPoint=i,this._update=!0,this._barrierPointArray.set(t,{}),!0)},_0x23be36.prototype.removeTargetPoint=function(e){LicenseChecker.LICENSECHECKER.verify("Sightline"),this._barrierPointArray.remove(e);var t=this._targetPoints.remove(e);if(this._sightlineCameras.remove(e),!t)return!1;this._viewProjMatrixs.remove(e),this._renderTextureMatrixs.remove(e);var i=this._depthBuffers.get(e);e$2b(i)&&(i.destroy(),this._depthBuffers.remove(e),delete this._frameState._framebufferList[e]);var n=this._commands.get(e);if(e$2b(n)){for(var r=0;r1||o.x<-1||o.y>1||o.y<-1)return n;var s=e._scene.context,l=s.drawingBufferWidth,u=s.drawingBufferHeight,c=(.5*o.x+.5)*l-.5,h=(.5*o.y+.5)*u-.5;if(c<0||h<0)return n;for(var d=Math.floor(c),f=c-d,p=Math.floor(h),_=h-p,m=e._depthBuffers.get(t),g=s.readPixels({framebuffer:m.framebuffer,x:d,y:p,width:2,height:2}),x=new e$29,v=(new o$1p,new e$29(1/255,1/65025,1/160581375,1/4228250625)),y=[],$=(e._scene,s.uniformState.currentFrustum),b=($.x,$.y,0);b<4;b++){var T=e$29.unpack(g,4*b,x),C=e$29.dot(T,v);if(!(C<1&&C>0))return n;y[b]=2*C-1}var S=(1-_)*((1-f)*y[0]+f*y[1])+_*((1-f)*y[2]+f*y[3]);if(o.z-S>1e-6){var w=new p$1d;p$1d.inverse(a,w),o.z=S,p$1d.multiplyByVector(w,o,o),e$29.divideByScalar(o,o.w,o);var E=a$18.fromCartesian(o,e._scene._globe.ellipsoid);n.position=E,n.isViewer=!1,n.st=new o$1o(d,p)}return n}}function _0xd82276(e,t){LicenseChecker.LICENSECHECKER.verify("Sightline");var i=e._targetPoints.get(t);if(!e$2b(i))return Promise.resolve(null);var n={isViewer:!0},r=o$1p.fromDegreesArrayHeights(i,e._scene._globe.ellipsoid)[0],o=new e$29(r.x,r.y,r.z,1),a=e._viewProjMatrixs.get(t);if(p$1d.multiplyByVector(a,o,o),e$29.divideByScalar(o,o.w,o),o.x>1||o.x<-1||o.y>1||o.y<-1)return Promise.resolve(n);var s=e._scene.context,l=s.drawingBufferWidth,u=s.drawingBufferHeight,c=(.5*o.x+.5)*l-.5,h=(.5*o.y+.5)*u-.5;if(c<0||h<0)return Promise.resolve(n);var d=Math.floor(c),f=c-d,p=Math.floor(h),_=h-p,m=s.uniformState,g=o$1o.clone(m.currentFrustum),x=e._depthBuffers.get(t);return s.readPixelsAsync({framebuffer:x.framebuffer,x:d,y:p,width:2,height:2}).then((t=>{for(var i=new e$29,r=(new o$1p,new e$29(1/255,1/65025,1/160581375,1/4228250625)),l=[],u=(e._scene,g.x,g.y,0);u<4;u++){var c=e$29.unpack(t,4*u,i),h=e$29.dot(c,r);if(!(h<1&&h>0))return Promise.resolve(n);s.webgpu?l[u]=h:l[u]=2*h-1}var m=(1-f)*l[0]+f*l[1],x=(1-f)*l[2]+f*l[3],v=(1-_)*m+_*x;if(o.z-v>1e-6){var y=new p$1d;p$1d.inverse(a,y),o.z=v,p$1d.multiplyByVector(y,o,o),e$29.divideByScalar(o,o.w,o);var $=a$18.fromCartesian(o,e._scene._globe.ellipsoid);n.position=$,n.isViewer=!1,n.st=new o$1o(d,p)}return Promise.resolve(n)}))}function _0x49404d(e,t){var i=_0xebdb1b(e,t);if(e$2b(i)&&e$2b(i.position)&&e$2b(i.st))return i.st}function _0x73245b(e,t){return _0xd82276(e,t).then((e=>e$2b(e)&&e$2b(e.position)&&e$2b(e.st)?Promise.resolve(e.st):Promise.resolve(null)))}_0x23be36.prototype.update=function(e,t,i){if(!t._fboState.enabled){var n=t.camera;for(var r in this._viewProjMatrixs._hash)p$1d.multiply(this._viewProjMatrixs.get(r),n.inverseViewMatrix,this._renderTextureMatrixs.get(r));if(this._update){if(this._update=!1,this._frameState=t,this._targetPoints.values.length<1)return;if(this._updateAll)for(var o in this._updateAll=!1,this._targetPoints._hash){var a=this._targetPoints.get(o);this._currentTargetPoint=a,this._currentTargetName=o,_0xd52957(this,e,t),_0x3f28d8(this,e,t)}else _0xd52957(this,e,t),_0x3f28d8(this,e,t)}if(!t.passes.pick){var s=this._commands.length;for(o=0;o8)throw new t$16("the index is 0~8");this._visibleViewport=1<8)throw new t$16("the index is 0~8");return 1<{for(var i=[],n=0;n{for(var i=0;i0)for(var r=0;r=this.partCount)return null;for(var t=new t$M,i=0,n=0;n0&&(a*=50);var s,l=e._direction*e$2a.RADIANS_PER_DEGREE,u=e._pitch*e$2a.RADIANS_PER_DEGREE,c=i.camera,h=c._projection;if(e._scene.mode===C$13.SCENE3D)s=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var d=a$18.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);s=h.project(d,new o$1p)}var f=c.frustum.near,p=c.frustum.far,_=new o$1p,m=c.heading,g=c.pitch;o$1p.clone(c.position,_),e._depthBuffer.isUpdate=!0,e._depthBuffer._beginFunc=function(){f=c.frustum.near,p=c.frustum.far,m=c.heading,g=c.pitch,o$1p.clone(c.position,_),c.frustum.near=r,c.frustum.far=a;var t={destination:s,orientation:{heading:l,pitch:u},convert:!1};if(c.setView(t),e.skylineCamera=t,p$1d.clone(c.inverseViewMatrix,e._invertViewMatrix),p$1d.multiply(c.frustum.projectionMatrix,c.viewMatrix,e._invertViewProjectionMatrix),p$1d.inverse(e._invertViewProjectionMatrix,e._invertViewProjectionMatrix),e._scene.mode===C$13.SCENE3D)o$1p.clone(s,e._boundingSphere.center);else{var i=m$17.convertToColumbusCartesian(o$1p.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]));o$1p.clone(i,e._boundingSphere.center)}e._boundingSphere.radius=a},e._depthBuffer._endFunc=function(){if(e$2b(e._lineCommand)){e._lineCommand.modelMatrix=e._invertViewMatrix,e._points.length=0;var i=t.uniformState,n=p$1d.clone(i.inverseProjection),r=p$1d.clone(i.viewProjection),o=o$1o.clone(i.currentFrustum),a=i.log2FarDepthFromNearPlusOne,s=a$18.clone(c.positionCartographic);t.readPixelsAsync({framebuffer:e._depthBuffer.framebuffer}).then((i=>{var l=e._lineCommand.vertexArray.getAttribute(0),u=4*(t.drawingBufferWidth+1),c=S$12.createTypedArray(l.componentDatatype,u);c[0]=0,c[1]=0,c[2]=0,c[3]=1,4*u!==l.vertexBuffer.sizeInBytes&&(_0x48af61(e),_0x4ae862(e,t),l=e._lineCommand.vertexArray.getAttribute(0));for(var h=new e$29,d=new e$29(1,1/255,1/65025,1/160581375),f=o.x,p=o.y,_=0;_-1;g--){var x=4*(t.drawingBufferWidth*g+_),v=e$29.unpack(i,x,h);if(e$29.divideByScalar(v,255,v),(m=e$29.dot(v,d))>0)break;m=0}if(e._scene.frameState.useLogDepth&&m>0){var y=m*a;m=p*(1-f/(Math.pow(2,y)-1+f))/(p-f)}h.x=_/t.drawingBufferWidth*2-1,h.y=g/t.drawingBufferHeight*2-1,t.webgpu?h.z=m:h.z=2*m-1,h.w=1,p$1d.multiplyByVector(n,h,h);var $=new o$1p(h.x,h.y,h.z);o$1p.divideByScalar($,h.w,$);var b=o$1p.magnitude($);e._radius>0&&b>e._radius&&(o$1p.normalize($,$),$.x*=e._radius,$.y*=e._radius,$.z*=e._radius),h.x=$.x,h.y=$.y,h.z=$.z,h.w=1;var T=o$1p.fromCartesian4(p$1d.multiplyByVector(e._invertViewMatrix,h,new e$29));e._scene.mode===C$13.COLUMBUS_VIEW&&(T=m$17.convertTo3DCartesian(T)),e._points.push(T),c[4*(_+1)]=h.x,c[4*(_+1)+1]=h.y,c[4*(_+1)+2]=h.z,c[4*(_+1)+3]=h.w}l.vertexBuffer.copyFromArrayView(c,0);for(var C=0;C=2&&e._lineStripCollection.add({width:e._lineWidth,positions:e._points,material:r$X.fromType(r$X.ColorType,{color:e$1U.fromCartesian4(e._color)})})}))}e$2b(e._faceCommand)&&(e._faceCommand.modelMatrix=e._invertViewMatrix),c.setView({destination:_,orientation:{heading:m,pitch:g,roll:c.roll},convert:!1}),c.frustum.near=f,c.frustum.far=p,e._depthBuffer.isUpdate=!1}}function _0x2ff981(e,t,i){var n=i.camera.frustum,r=10,o=2*Math.atan(n.aspectRatio*Math.tan(.5*n.fovy)),a=r*Math.tan(.5*o),s=r*Math.tan(.5*n.fovy),l=S$12.createTypedArray(S$12.UNSIGNED_SHORT,12),u=S$12.createTypedArray(S$12.UNSIGNED_SHORT,16);l[0]=0,l[1]=2,l[2]=1,l[3]=0,l[4]=4,l[5]=2,l[6]=0,l[7]=3,l[8]=4,l[9]=0,l[10]=1,l[11]=3,u[0]=0,u[1]=1,u[2]=0,u[3]=2,u[4]=0,u[5]=3,u[6]=0,u[7]=4,u[8]=1,u[9]=2,u[10]=1,u[11]=3,u[12]=2,u[13]=4,u[14]=3,u[15]=4;var c=S$12.createTypedArray(S$12.FLOAT,15);c[0]=c[1]=c[2]=0,c[3]=-a,c[4]=-s,c[5]=-10,c[6]=-a,c[7]=s,c[8]=-10,c[9]=a,c[10]=-s,c[11]=-10,c[12]=a,c[13]=s,c[14]=-10;var h=t$Y.createVertexBuffer({context:t,typedArray:c,usage:A$19.STATIC_DRAW}),d=[],f={aPosition:0};d.push({name:"aPosition",index:f.aPosition,vertexBuffer:h,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var p=t$Y.createIndexBuffer({context:t,typedArray:l,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),_=t$Y.createIndexBuffer({context:t,typedArray:u,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});e._viewerLineCommand=new i$_({primitiveType:W$18.LINES,modelMatrix:e._invertViewMatrix,pass:Le$s.ANALYSIS,owner:e,cull:!1}),e._viewerLineCommand.vertexArray=new c$12({context:t,attributes:d,indexBuffer:_}),e._viewerLineCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:f}),e._viewerLineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});for(var m=[],g=0;g<6;g++)m[g]=new e$29(0,0,0,0);var x=new e$29(128/255,1,235/255,1);e._viewerLineCommand.uniformMap={uDiffuseColor:function(){return x},clip_mode:function(){return 0},clip_planes:function(){return m},clip_line_color:function(){return e$29.UNIT_W}},e._viewerCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,pass:Le$s.ANALYSIS,owner:e,cull:!1}),e._viewerCommand.vertexArray=new c$12({context:t,attributes:d,indexBuffer:p}),e._viewerCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:f}),e._viewerCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var v=new e$29(68/255,222/255,158/255,1);e._viewerCommand.uniformMap={uDiffuseColor:function(){return v},clip_mode:function(){return 0},clip_planes:function(){return m},clip_line_color:function(){return e$29.UNIT_W}}}function _0x4ae862(e,t,i){var n=t.drawingBufferWidth+1,r=S$12.createTypedArray(S$12.FLOAT,4*n),o=S$12.createTypedArray(S$12.FLOAT,2*n),a=S$12.createTypedArray(S$12.UNSIGNED_SHORT,n-1),s=S$12.createTypedArray(S$12.UNSIGNED_SHORT,n);o[0]=-1;for(var l=1;l=2&&(this._update=!0)}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},displayMode:{get:function(){return this._displayMode}},displayStyle:{get:function(){return this._displayStyle},set:function(e){this._displayStyle=e}},radius:{get:function(){return this._radius},set:function(e){this._radius=e,this._update=!0}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e,this._update=!0}},ignoreGlobe:{get:function(){return this._ignoreGlobe},set:function(e){this._ignoreGlobe=e,e$2b(this._depthBuffer)&&(this._depthBuffer.environmentVisible.isGlobalVisible=!this._ignoreGlobe,this._update=!0)}}}),_0x1e0d7c.prototype.update=function(e,t,i){if(!t._fboState.enabled){this._update&&(e$2b(this._depthBuffer)||(this._depthBuffer=new s$T(e),this._depthBuffer.environmentVisible.isGlobalVisible=!this._ignoreGlobe,this._depthBuffer.environmentVisible.isObjectVisible=!0,t._framebufferList[this._name]=this._depthBuffer,this._frameState=t),this._update=!1,_0x48af61(this),_0x27ff32(this),_0x594e59(this,e,t),_0x2ff981(this,e,t),_0x4ae862(this,e));for(var n=0;n8)throw new t$16("the index is 0~8");this._visibleViewport=1<8)throw new t$16("the index is 0~8");return 1<-1;u--){var c=4*(e.drawingBufferWidth*u+l),h=e$29.unpack(t,c,a);if(e$29.divideByScalar(h,255,h),e$29.dot(h,s)>0){i.push(l/e.drawingBufferWidth),n.push(u/e.drawingBufferHeight),r.push(l),o.push(u);break}}return{x:i,y:n,drawingBufferXArr:r,drawingBufferYArr:o}}},_0x1e0d7c.prototype.getSkyline2DAsync=function(){if(this._update)return Promise.resolve(void 0);var e=this._scene.context;return e.readPixelsAsync({framebuffer:this._depthBuffer.framebuffer}).then((t=>{e.drawingBufferWidth;for(var i=[],n=[],r=[],o=[],a=new e$29,s=new e$29(1,1/255,1/65025,1/160581375),l=0;l-1;u--){var c=4*(e.drawingBufferWidth*u+l),h=e$29.unpack(t,c,a);if(e$29.divideByScalar(h,255,h),e$29.dot(h,s)>0){i.push(l/e.drawingBufferWidth),n.push(u/e.drawingBufferHeight),r.push(l),o.push(u);break}}var d={x:i,y:n,drawingBufferXArr:r,drawingBufferYArr:o};return Promise.resolve(d)}))},_0x1e0d7c.prototype.getSkyline3D=function(){if(!this._update&&0!==this._points.length){for(var e,t=[],i=[],n=[],r=0,o=this._points.length;rthis.getSkyline2DAsync().then((n=>{if(!e$2b(n))return Promise.resolve(void 0);for(var r,o,a=n.drawingBufferXArr,s=n.drawingBufferYArr,l=a.length,u={};l--;){r=a[l],o=s[l];var c=e$29.fromArray(e,4*i*o+4*r),h=e$1U.byteToRgba(c.x,c.y,c.z,c.w),d=t.getObjectByPickId(h);if(e$2b(d)){var f=d.primitive.id;h=d.id;e$2b(u[f])||(u[f]=[]),-1===u[f].indexOf(h)&&u[f].push(h)}}return Promise.resolve(u)}))))},_0x1e0d7c.prototype.getSkylineSectorParameter=function(){var e=this.getSkyline3D();if(e$2b(e)){for(var t,i,n,r=e.x,o=e.y,a=e.z,s=new t$M,l=0,u=r.length;l>2)*(i+3>>2)*8;case de$x.COMPRESSED_RGBA_S3TC_DXT5_EXT:return(t+3>>2)*(i+3>>2)*16;case de$x.COMPRESSED_RGB_PVRTC_4BPPV1_IMG:case de$x.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case de$x.COMPRESSED_RGB_PVRTC_2BPPV1_IMG:case de$x.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case g$$:return t*i*2;case V$10.RGBA:return t*i*4;case V$10.LUMINANCE_ALPHA:return t*i*2;default:return 0}}var o$$=function(e,t,i,n,r,o,a,s,l,u,c,h){this._context=t,this._gl=t._gl,this._width=i,this._height=n,this._imageBuffer=o,this._oriCompressType=h,this._texture=null,this._internalFormat=r,this._isCompressed=V$10.isCompressedFormat(r),this._wrapS=u$_(s,q$19.CLAMP_TO_EDGE),this._wrapT=u$_(l,q$19.CLAMP_TO_EDGE),this._pixelDataType=u$_(u,_$$.UNSIGNED_BYTE),this._pixelDataType===_$$.FLOAT&&(this._wrapS=q$19.CLAMP_TO_EDGE,this._wrapT=q$19.CLAMP_TO_EDGE),this.ready=!1,this.is3D=a,this.id=e,this._target=this._gl.TEXTURE_2D,this._size=o.length,this._mipmapEnabled=u$_(c,!0),1==this.is3D?this.init3DTexture():(this._target=this._gl.TEXTURE_2D,this._initTexture2D()),V$10.isCompressedFormat(this._internalFormat)?this._sizeInBytes=V$10.compressedTextureSizeInBytes(this._internalFormat,this._width,this._height):this._sizeInBytes=this._width*this._height*4,this._context.memorySize+=this._sizeInBytes};function M$X(e,t,i,n){var r=1;if(!e$2a.isPowerOfTwo(i)||!e$2a.isPowerOfTwo(n))return 1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=V$10.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l==o?r:1}function d$17(e,t,i){var n=e.length,r=Math.ceil(Math.sqrt(n)),o=document.createElement("canvas");o.width=t*r,o.height=i*r;var a=o.getContext("2d");a.fillStyle="#00f",a.fillRect(0,0,o.width,o.height);for(var s=0;s>2)*(i+3>>2)*8;case de$x.COMPRESSED_RGBA_S3TC_DXT5_EXT:return(t+3>>2)*(i+3>>2)*16;case de$x.COMPRESSED_RGB_PVRTC_4BPPV1_IMG:case de$x.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case de$x.COMPRESSED_RGB_PVRTC_2BPPV1_IMG:case de$x.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case V$10.RGB:return t*i*3;case V$10.RGBA:return t*i*4;case V$10.LUMINANCE_ALPHA:return t*i*2;default:return 0}}Object.defineProperties(o$$.prototype,{width:{get:function(){return this._width}},height:{get:function(){return this._height}},size:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._sizeInBytes}},pixelDataType:{get:function(){return this._pixelDataType}}}),o$$.prototype._initTexture2D=function(){var e=this._gl;this._texture=e.createTexture(),this._uploadImageData(!1),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$$.prototype.generateMipmap=function(){var e=I$1e.NICEST;if(this._width>1&&!e$2a.isPowerOfTwo(this._width))throw new DeveloperError("width must be a power of two to call generateMipmap().");if(this._height>1&&!e$2a.isPowerOfTwo(this._height))throw new DeveloperError("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},o$$.prototype.updateTexture=function(e,t,i){this.ready=!1,this._width=i.width,this._height=i.height,this._internalFormat=i.internalFormat,this._pixelDataType=i.pixelDataType,this._wrapS=i.wrapS,this._wrapT=i.wrapT,this._mipmapEnabled=u$_(i.mipmapEnabled,!0);var n=this._gl;this.id=e,this._size=t.length,this._target=n.TEXTURE_2D,this._imageBuffer=t,this._uploadImageData(!0),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$$.prototype._uploadImageData=function(e){var t=this._internalFormat,i=this._width,n=this._height,r=this._imageBuffer,o=this._gl;o.bindTexture(o.TEXTURE_2D,this._texture),t===V$10.LUMINANCE_ALPHA||0===this._oriCompressType?o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1):(t==V$10.RGB||t==V$10.RGBA||t===g$$)&&o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!0);var a,s=M$X(r,t,i,n);this._context.webgl2&&!e&&t!==de$x.LUMINANCE_ALPHA&&(a=t===g$$?o.RGB565:V$10.toInternalFormat(t,this._pixelDataType,this._context),o.texStorage2D(o.TEXTURE_2D,s,a,i,n));var l=s>1&&this._mipmapEnabled,u=0,c=0;do{var h,d=P$T(t,i,n);h=t==V$10.RGBA&&this._pixelDataType===_$$.FLOAT?new Float32Array(r.buffer,r.byteOffset+u,d):new Uint8Array(r.buffer,r.byteOffset+u,d),this._isCompressed?this._context.webgl2?o.compressedTexSubImage2D(o.TEXTURE_2D,c++,0,0,i,n,t,h):o.compressedTexImage2D(o.TEXTURE_2D,c++,t,i,n,0,h):this._context.webgl2?t===g$$?(o.texSubImage2D(o.TEXTURE_2D,0,0,0,i,n,o.RGB,o.UNSIGNED_SHORT_5_6_5,r),d/=2):t===V$10.LUMINANCE_ALPHA?o.texImage2D(o.TEXTURE_2D,0,t,i,n,0,t,o.UNSIGNED_BYTE,h):o.texSubImage2D(o.TEXTURE_2D,c++,0,0,i,n,t,this._pixelDataType,h):t===g$$?(o.texImage2D(o.TEXTURE_2D,0,o.RGB,i,n,0,o.RGB,o.UNSIGNED_SHORT_5_6_5,r),d/=2):o.texImage2D(o.TEXTURE_2D,c++,t,i,n,0,t,this._pixelDataType,h),i=Math.max(i>>1,1),n=Math.max(n>>1,1),u+=d}while(u1?(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),e$2a.isPowerOfTwo(this._width)&&e$2a.isPowerOfTwo(this._height)?o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR_MIPMAP_LINEAR):o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR)):e$2a.isPowerOfTwo(this._width)&&e$2a.isPowerOfTwo(this._height)&&t==V$10.RGBA?(this.generateMipmap(),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR_MIPMAP_LINEAR)):(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR)),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,this._wrapS),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,this._wrapT),o.bindTexture(o.TEXTURE_2D,null)},o$$.prototype.init3DTexture=function(){for(var e=this._imageBuffer,t=this._gl,i=d$17(e,this._width,this._height),n=i.width*i.height*4,r=new Uint8Array(n),o=0;o>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l==o?r:1}Object.defineProperties(o$_.prototype,{width:{get:function(){return this._width}},height:{get:function(){return this._height}},size:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._sizeInBytes}},pixelDataType:{get:function(){return this._pixelDataType}},thinTexture:{get:function(){return this._texture}},internalTexture:{get:function(){return this._texture._texture}}}),o$_.prototype._initTexture2D=function(){this._uploadImageData(),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$_.prototype.generateMipmap=function(){console.log("DDSTextureGPU.prototype.generateMipmap")},o$_.prototype.updateTexture=function(e,t,i){this.ready=!1,this._width=i.width,this._height=i.height,this._internalFormat=i.internalFormat,this._pixelDataType=i.pixelDataType,this._wrapS=i.wrapS,this._wrapT=i.wrapT,this._mipmapEnabled=u$_(i.mipmapEnabled,!0),this.id=e,this._size=t.length,this._imageBuffer=t,this._uploadImageData(),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$_.prototype._uploadImageData=function(){var e=this._context.engine,t=this._internalFormat,i=this._width,n=this._height,r=this._imageBuffer,o=G$12(r,t,i,n),a=o>1&&this._mipmapEnabled;t!==V$10.LUMINANCE_ALPHA&&0!==this._oriCompressType&&(t==V$10.RGB||V$10.RGBA);var s=R$$.toPixelFormat(t),l=R$$.toPixelType(this._pixelDataType),u=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE;if((this._pixelDataType==_$$.FLOAT||this._pixelDataType==_$$.HALF_FLOAT)&&(u=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE),!e$2b(this._texture)){var c=e.createRawTexture(null,i,n,s,!1,!1,u,null,l,0,!1,o);this._texture=new _0x5cc035(c)}var h=0,d=0;do{var f,p=g$_(t,i,n);f=t==V$10.RGBA&&this._pixelDataType===_$$.FLOAT?new Float32Array(r.buffer,r.byteOffset+h,p):new Uint8Array(r.buffer,r.byteOffset+h,p),e.updateSubRawTexture(this._texture._texture,f,s,!1,null,l,!1,i,n,0,0,d++),i=Math.max(i>>1,1),n=Math.max(n>>1,1),h+=p}while(hthis._dictTable.values.length-1)return null;var t=[];for(var i in this._dictTable._hash)t.push(parseFloat(i));t.sort(d$16);var n=t[e];return e$2b(n)?{altitude:n,color:this._dictTable.get(n)}:null},i$S.prototype.count=function(){return this._dictTable.values.length},i$S.prototype.insert=function(e,t){if(!e$2b(this._dictTable.get(e))){var i=e$1U.clone(t,i);this._dictTable.set(e,i)}},i$S.prototype.remove=function(e){return this._dictTable.remove(e)},i$S.prototype.clear=function(){this._dictTable.values.length=0},i$S.clone=function(e,t){if(e$2b(e)){e$2b(t)||(t=new i$S),e$1N.clone(e._dictTable,t._dictTable);for(var i=0;ia.value){var s=l$1g(e[t],!0);e[t]=l$1g(e[o],!0),e[o]=s,r=e[t]}}var l=e[0].value,u=e[e.length-1].value-l,c=document.createElement("canvas");c.width=16384,c.height=1;var h=c.getContext("2d");h.beginPath();var d=h.createLinearGradient(0,0,16384,0);for(t=0;t=e||Math.abs(this._sortKey[t]-e)0&&(this._emissionTextureArray[0].USpeed=e),this._emissionTexCoordSpeed.x=e}},emissionTexCoordVSpeed:{get:function(){return this._emissionTexCoordSpeed.y},set:function(e){e$2b(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].VSpeed=e),this._emissionTexCoordSpeed.y=e}},emissionTexCoordScale:{get:function(){return this._emissionTexCoordScale},set:function(e){e$2b(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].UTiling=e.x,this._emissionTextureArray[0].VTiling=e.y),this._emissionTexCoordScale=e}},emissionTextureArray:{get:function(){return this._emissionTextureArray},set:function(e){this._emissionTextureArray=e,this._emissionTextureChanged=!0,this._loadedEmissionTexture=0}},noValueColor:{get:function(){return this._noValueColor},set:function(e){!e$2b(e)||(this._noValueColor=e$1U.clone(e,this._noValueColor))}},filterMode:{get:function(){return this._textureFilterMode},set:function(e){this._textureFilterMode=e}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}},visibleDistanceMin:{get:function(){return this._visibleDistanceMin},set:function(e){this._visibleDistanceMin=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){this._maxVisibleAltitude=e}}}),u$M.clone=function(e,t){if(e$2b(e)){e$2b(t)||(t=new u$M),t._maxVisibleValue=e._maxVisibleValue,t._minVisibleValue=e._minVisibleValue,t._floor=e._floor,t._ceiling=e._ceiling,t._opacity=e._opacity,t._updateColorDictTable=e._updateColorDictTable,t._linesInterval=e._linesInterval,t._updatePolygon=e._updatePolygon,t._displayMode=e._displayMode,t._lineColor=e$1U.clone(e._lineColor,t._lineColor),t._dictColorTable=i$S.clone(e._dictColorTable,t._dictColorTable),t._emissionTexCoordSpeed=o$1p.clone(e._emissionTexCoordSpeed,t._emissionTexCoordSpeed),t._emissionTexCoordScale=o$1p.clone(e._emissionTexCoordScale,t._emissionTexCoordScale),t._emissionTextureUrl=e._emissionTextureUrl,t._emissionTextureArray=e._emissionTextureArray,t._loadedEmissionTexture=e._loadedEmissionTexture,t._noValueColor=e$1U.clone(e._noValueColor,t._noValueColor),t._coverageArea.length=0;for(var i=0;iy$R.MAX_WIDTH_FOR_PLANAR_EXTENTS}function x$$(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).geometryInstances;if(this.geometryInstances=t,this.show=u$_(e.show,!0),this.classificationType=u$_(e.classificationType,_0x3b5200.BOTH),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=u$_(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=u$_(e._extruded,!1),this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._readyPromise=o$1l.defer(),this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:u$_(e.vertexCacheOptimize,!1),interleave:u$_(e.interleave,!1),releaseGeometryInstances:u$_(e.releaseGeometryInstances,!0),allowPicking:u$_(e.allowPicking,!0),asynchronous:u$_(e.asynchronous,!0),compressVertices:u$_(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0},e.geometryInstances&&e.geometryInstances.length){var i=e.geometryInstances[0].id;e$2b(i)&&i._clampToS3M&&(this.classificationType=_0x3b5200.S3M_TILE)}}function M$W(e,t){var i=t?m$X.EQUAL:m$X.ALWAYS,n=u$N.CESIUM_3D_TILE_MASK;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:i,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.DECREMENT_WRAP,zPass:n$Y.KEEP},backFunction:i,backOperation:{fail:n$Y.KEEP,zFail:n$Y.INCREMENT_WRAP,zPass:n$Y.KEEP},reference:n,mask:n},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:re$E.LESS_OR_EQUAL},depthMask:!1}}function te$y(){return{cull:{enabled:!1},depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:{enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.DECREMENT_WRAP,zPass:n$Y.KEEP},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.DECREMENT_WRAP,zPass:n$Y.KEEP},reference:0,mask:1},stencilMask:1}}function U$W(e,t){var i=t?m$X.EQUAL:m$X.NOT_EQUAL,n=t?u$N.S3M_TILE+1:0;return{stencilTest:{enabled:e,frontFunction:i,frontOperation:{fail:n$Y.ZERO,zFail:n$Y.ZERO,zPass:n$Y.ZERO},backFunction:i,backOperation:{fail:n$Y.ZERO,zFail:n$Y.ZERO,zPass:n$Y.ZERO},reference:n,mask:u$N.CLASSIFICATION_MASK},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Ee$r.ALPHA_BLEND}}function ae$u(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$X.EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},backFunction:m$X.EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:3,mask:3},blending:Ee$r.ALPHA_BLEND}}y$R.getSphericalExtentGeometryInstanceAttributes=function(e,t,i,n,r){o$1q.typeOf.object("boundingRectangle",e),o$1q.defined("textureCoordinateRotationPoints",t),o$1q.typeOf.object("ellipsoid",i),o$1q.typeOf.object("projection",n),o$1q.typeOf.bool("useFloatBatchTable",r);var o=te$z(e.south,e.west,i,re$C),a=o.x,s=o.y,l=te$z(e.north,e.east,i,re$C),u=l.x,c=l.y,h=0;s>c&&(h=e$2a.PI-s,s=-e$2a.PI,c+=h),a-=e$2a.EPSILON5,s-=e$2a.EPSILON5,u+=e$2a.EPSILON5;var d=1/((c+=e$2a.EPSILON5)-s),f=1/(u-a),p={sphericalExtents:new o$13({componentDatatype:S$12.FLOAT,componentsPerAttribute:4,normalize:!1,value:[a,s,f,d]}),longitudeRotation:new o$13({componentDatatype:S$12.FLOAT,componentsPerAttribute:1,normalize:!1,value:[h]})};return Z$R(p,t),U$X(e,n,p,r),p},y$R.hasAttributesForTextureCoordinatePlanes=function(e){var t=e$2b(e.southWest_HIGH)&&e$2b(e.southWest_LOW)&&e$2b(e.northward)&&e$2b(e.eastward)&&e$2b(e.planes2D_HIGH)&&e$2b(e.planes2D_LOW)&&e$2b(e.uMaxVmax)&&e$2b(e.uvMinAndExtents),i=e$2b(e.southWest_HIGH_x)&&e$2b(e.southWest_LOW_x)&&e$2b(e.southWest_HIGH_y)&&e$2b(e.southWest_LOW_y)&&e$2b(e.southWest_HIGH_z)&&e$2b(e.southWest_LOW_z)&&e$2b(e.northward_x)&&e$2b(e.eastward_x)&&e$2b(e.northward_y)&&e$2b(e.eastward_y)&&e$2b(e.northward_z)&&e$2b(e.eastward_z)&&e$2b(e.planes2D_HIGH_x)&&e$2b(e.planes2D_LOW_x)&&e$2b(e.planes2D_HIGH_y)&&e$2b(e.planes2D_LOW_y)&&e$2b(e.planes2D_HIGH_z)&&e$2b(e.planes2D_LOW_z)&&e$2b(e.planes2D_HIGH_w)&&e$2b(e.planes2D_LOW_w)&&e$2b(e.uMaxVmax)&&e$2b(e.uvMinAndExtents);return t||i},y$R.hasAttributesForSphericalExtents=function(e){var t=e$2b(e.sphericalExtents)&&e$2b(e.longitudeRotation)&&e$2b(e.planes2D_HIGH)&&e$2b(e.planes2D_LOW)&&e$2b(e.uMaxVmax)&&e$2b(e.uvMinAndExtents),i=e$2b(e.sphericalExtents)&&e$2b(e.longitudeRotation)&&e$2b(e.planes2D_HIGH_x)&&e$2b(e.planes2D_LOW_x)&&e$2b(e.planes2D_HIGH_y)&&e$2b(e.planes2D_LOW_y)&&e$2b(e.planes2D_HIGH_z)&&e$2b(e.planes2D_LOW_z)&&e$2b(e.planes2D_HIGH_w)&&e$2b(e.planes2D_LOW_w)&&e$2b(e.uMaxVmax)&&e$2b(e.uvMinAndExtents);return t||i},y$R.shouldUseSphericalCoordinates=function(e){return o$1q.typeOf.object("rectangle",e),ve$o(e)},y$R.MAX_WIDTH_FOR_PLANAR_EXTENTS=e$2a.toRadians(1),Object.defineProperties(x$$.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}}),x$$.isSupported=function(e){return e.context.stencilBuffer};var ne$G={stencilTest:{enabled:!0,frontFunction:m$X.NOT_EQUAL,frontOperation:{fail:n$Y.ZERO,zFail:n$Y.ZERO,zPass:n$Y.ZERO},backFunction:m$X.NOT_EQUAL,backOperation:{fail:n$Y.ZERO,zFail:n$Y.ZERO,zPass:n$Y.ZERO},reference:0,mask:u$N.CLASSIFICATION_MASK},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function se$w(e,t,i,n){if(!e$2b(e._rsColorPass)){var r=!e.debugShowShadowVolume;e._rsStencilDepthPass=d$1m.fromCache(M$W(r,!1)),e._rsStencilDepthPass3DTiles=d$1m.fromCache(M$W(r,!0)),e._rsStencilDepthPassS3M=d$1m.fromCache(te$y()),e._rsColorPass=d$1m.fromCache(U$W(r,!1)),e._rsColorPassS3M=d$1m.fromCache(ae$u()),e._rsPickPass=d$1m.fromCache(ne$G)}}function oe$u(e,t){if(!e.compressVertices)return t;if(-1!==t.search(/attribute\s+vec3\s+extrudeDirection;/g)){var i="compressedAttributes",n="attribute vec2 "+i+";",r="vec3 extrudeDirection;\n",o=t;return o=o.replace(/attribute\s+vec3\s+extrudeDirection;/g,""),[n,r,o=s$U.replaceMain(o,"czm_non_compressed_main"),"void main() \n{ \n extrudeDirection = czm_octDecode(compressedAttributes, 65535.0);\n czm_non_compressed_main(); \n}"].join("\n")}}function ie$B(e,t){var i=t.context,n=e._primitive,r=X$Q;r=e._primitive._batchTable.getVertexShaderCallback()(r),r=y$S._appendDistanceDisplayConditionToShader(n,r),r=y$S._modifyShaderPosition(e,r,t.scene3DOnly),r=y$S._updateColorAttribute(n,r);var o=e._hasPlanarExtentsAttributes,a=o||e._hasSphericalExtentsAttribute;e._extruded&&(r=oe$u(n,r));var s=e._extruded?"EXTRUDED_GEOMETRY":"",l=new s$U({defines:[s],sources:[r]}),u=new s$U({sources:[Q$Q]});e._primitive._swipeEnabled&&u.defines.push("APPLY_SWIPE");var c=e._primitive._attributeLocations,h=new y$R(a,o,e.appearance,i.floatTextureSixPlaces);if(e._spStencil=r$13.replaceCache({context:i,shaderProgram:e._spStencil,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c}),e._primitive.allowPicking){var d=s$U.createPickVertexShaderSource(r);d=y$S._appendShowToShader(n,d),d=y$S._updatePickColorAttribute(d);var f=h.createPickFragmentShader(!1),p=h.createPickVertexShader([s],d,!1,t.mapProjection);if(e._spPick=r$13.replaceCache({name:"ClassificationPrimitive_spPick",context:i,shaderProgram:e._spPick,vertexShaderSource:p,fragmentShaderSource:f,attributeLocations:c}),a){var _=i.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!e$2b(_)){var m=h.createPickFragmentShader(!0),g=h.createPickVertexShader([s],d,!0,t.mapProjection);_=i.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:g,fragmentShaderSource:m,attributeLocations:c})}e._spPick2D=_}}else e._spPick=r$13.fromCache({name:"ClassificationPrimitive_spPick",context:i,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});l=new s$U({defines:[s],sources:[r=y$S._appendShowToShader(n,r)]}),e._sp=r$13.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});var x=h.createFragmentShader(!1),v=h.createVertexShader([s],r,!1,t.mapProjection);if(e._spColor=r$13.replaceCache({context:i,shaderProgram:e._spColor,vertexShaderSource:v,fragmentShaderSource:x,attributeLocations:c}),a){var y=i.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!e$2b(y)){var $=h.createFragmentShader(!0),b=h.createVertexShader([s],r,!0,t.mapProjection);y=i.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:b,fragmentShaderSource:$,attributeLocations:c})}e._spColor2D=y}}function de$s(e,t,i){var n=e._primitive,r=2*n._va.length;t.length=r;var o,a,s,l=0,u=n._batchTable.getUniformMapCallback()(e._uniformMap);u.uSwipeRegion=function(){var t=e._primitive._swipeRegion,n=new e$29;return e$29.fromElements(t.x,t.y,t.x+t.z,t.y+t.w,n),n.x=n.x*i.context.drawingBufferWidth,n.y=(1-n.y)*i.context.drawingBufferHeight,n.z=n.z*i.context.drawingBufferWidth,n.w=(1-n.w)*i.context.drawingBufferHeight,n};var c=e._needs2DShader;for(o=0;o0&&(a=l[0].attributes,d=y$R.hasAttributesForSphericalExtents(a),f=y$R.hasAttributesForTextureCoordinatePlanes(a),s=a.color),r=0;r0;t++){var l=e.geometryInstances[t].geometry._groundBottomAltitude,u=e.geometryInstances[t].geometry._groundExtrudedHeight;if(e$2b(l)&&e$2b(u)&&(0!==l||0!==u)){var c=l+u;o=Math.max(o,c),a=Math.min(a,l),s=!0}}e._maxHeight=s?o:e._maxHeight,e._minHeight=s?a:e._minHeight}var h=(Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances])[0].geometry._granularity,d=y$Z.fromRectangle(r,L$Z(e)(h,n),z$Q(e)(h,n),n);if(e._boundingVolumes.push(d),!t.scene3DOnly){var f=t.mapProjection,p=i$1c.fromRectangleWithHeights2D(r,f,e._maxHeight,e._minHeight);o$1p.fromElements(p.center.z,p.center.x,p.center.y,p.center),e._boundingVolumes2D.push(p)}}function j$U(e,t){return Math.floor(e%t/3)}function O$G(e,t,i,n,r,o,a){var s=e._primitive;i.mode!==C$13.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&t.derivedCommands&&t.derivedCommands.appearance2D&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t)}function R$R(e,t,i,n,r,o){var a=e._primitive;i.mode!==C$13.SCENE3D&&t.shaderProgram===a._spPick&&a._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,i.commandList.push(t)}function me$s(e,t,i,n,r,o,a,s){var l;l=t.mode===C$13.SCENE3D?e._boundingVolumes:e._boundingVolumes2D;var u,c,h=e.classificationType,d=h!==_0x3b5200.CESIUM_3D_TILE&&h!==_0x3b5200.S3M_TILE,f=h!==_0x3b5200.TERRAIN&&h!==_0x3b5200.S3M_TILE,p=h!==_0x3b5200.TERRAIN&&h!==_0x3b5200.CESIUM_3D_TILE,_=t.passes,m=e._primitive;if(_.render){var g=i.length;for(u=0;ur$1a.TIMEOUT&&this.request.cancel(),this.state===wt$6.RECEIVED&&(this.state=wt$6.TRANSITIONING,this.image,this.imageryLayer._createTexture(e.context,this,e));var n=this.state===wt$6.READY&&t&&!this.texture;(this.state===wt$6.TEXTURE_LOADED||n)&&(this.state=wt$6.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))},o$V.prototype.isDestroyed=function(){return!1},o$V.prototype.showLabelAndIcon=function(e){},o$V.prototype.setVisible=function(e){},o$V.prototype.release=function(){};var G$$=new o$1o(16,16);function v$I(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.borderWidthInPixels,1),i=u$_(e.initialSize,G$$);if(!e$2b(e.context))throw new t$16("context is required.");if(t<0)throw new t$16("borderWidthInPixels must be greater than or equal to zero.");if(i.x<1||i.y<1)throw new t$16("initialSize must be greater than zero.");this._context=e.context,this._pixelFormat=u$_(e.pixelFormat,V$10.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=e$1Q(),this._idHash={},this._initialSize=i,this._root=void 0}function Z$P(e,t){e._context;var i=e.numberOfImages,n=e._borderWidthInPixels;if(i>0){for(var r=e._texture.width,o=e._texture.height,a=2*(r+t.width+n),s=2*(o+t.height+n),l=r/a,u=o/s,c=new m$T(new o$1o(r+n,n),new o$1o(a,o)),h=new m$T(new o$1o,new o$1o(a,o),e._root,c),d=new m$T(new o$1o(n,o+n),new o$1o(a,s)),f=new m$T(new o$1o,new o$1o(a,s),h,d),p=0;pa){t.childNode1=new m$T(new o$1o(t.bottomLeft.x,t.bottomLeft.y),new o$1o(t.bottomLeft.x+i.width,t.topRight.y));var s=t.bottomLeft.x+i.width+e._borderWidthInPixels;se.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)return console.log("out of range source coordinates for image copy"),t;if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)return console.log("out of range destination coordinates for image copy"),t;for(var a=e.data,s=t.data,l=0;l=0;d--){var f=a[d];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var p=a.pop();d255?255:e}function _0x5a0734(e){return e<0?0:e>1?1:e}function _0x24e54e(e){return"%"===e[e.length-1]?_0x1d3b1b(parseFloat(e)/100*255):_0x1d3b1b(parseInt(e))}function _0x50f432(e){return"%"===e[e.length-1]?_0x5a0734(parseFloat(e)/100):_0x5a0734(parseFloat(e))}function _0x5ba3e9(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function _0x16a51b(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in _0x40aaf7)return _0x40aaf7[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===i.length){var o=i.substr(0,n),a=i.substr(n+1,r-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=_0x50f432(a.pop());case"rgb":return 3!==a.length?null:[_0x24e54e(a[0]),_0x24e54e(a[1]),_0x24e54e(a[2]),s];case"hsla":if(4!==a.length)return null;s=_0x50f432(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=_0x50f432(a[1]),c=_0x50f432(a[2]),h=c<=.5?c*(u+1):c+u-c*u,d=2*c-h;return[_0x1d3b1b(255*_0x5ba3e9(d,h,l+1/3)),_0x1d3b1b(255*_0x5ba3e9(d,h,l)),_0x1d3b1b(255*_0x5ba3e9(d,h,l-1/3)),s];default:return null}}return null}const _0x50ffb1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xeab9b8=_0x50ffb1(void 0,(function(){return _0xeab9b8.toString().search("(((.+)+)+)+$").toString().constructor(_0xeab9b8).search("(((.+)+)+)+$")}));_0xeab9b8();class _0x128d69{constructor(e,t,i,n=1){this.r=e,this.g=t,this.b=i,this.a=n}static parse(e){if(!e)return;if(e instanceof _0x128d69)return e;if("string"!=typeof e)return;const t=_0x16a51b(e);return t?new _0x128d69(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,i,n]=this.toArray();return"rgba("+Math.round(e)+","+Math.round(t)+","+Math.round(i)+","+n+")"}toArray(){const{r:e,g:t,b:i,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*i/n,n]}}_0x128d69.black=new _0x128d69(0,0,0,1),_0x128d69.white=new _0x128d69(1,1,1,1),_0x128d69.transparent=new _0x128d69(0,0,0,0),_0x128d69.red=new _0x128d69(1,0,0,1);var _0x41823f={kind:"null"},_0x293305={kind:"number"},_0x26738c={kind:"string"},_0x3e476a={kind:"boolean"},_0xb02f33={kind:"color"},_0xd44bf0={kind:"object"},_0x3cf6ba={kind:"value"},_0x104a43={kind:"formatted"},_0x49bb9f={kind:"resolvedImage"};function _0x442c66(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));return r(),{kind:"array",itemType:e,N:t}}function _0x134948(e){if("array"===e.kind){var t=_0x134948(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var _0x5a1ca4=[_0x41823f,_0x293305,_0x26738c,_0x3e476a,_0xb02f33,_0x104a43,_0xd44bf0,_0x442c66(_0x3cf6ba),_0x49bb9f];function _0x3dc850(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!_0x3dc850(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var i=0,n=_0x5a1ca4;i=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,i,n]:[e,t,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."},_0x4150fb.isValue=function(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof _0x128d69)return!0;if(e instanceof _0x1bd8bd)return!0;if(e instanceof _0x2683dd)return!0;if(e instanceof _0x313b86)return!0;if(Array.isArray(e)){for(var t=0,i=e;t2){var s=e[1];if("string"!=typeof s||!(s in _0x1f6395)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=_0x1f6395[s],n++}else o=_0x488a70;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}i=_0x197241(o,a)}else i=_0x1f6395[r];for(var l=[];n1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var _0x5b0fee=(_0x4bf18e=!0,function(e,t){var i=_0x4bf18e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4bf18e=!1,i}),_0x45f075=_0x5b0fee(void 0,(function(){return _0x45f075.toString().search("(((.+)+)+)+$").toString().constructor(_0x45f075).search("(((.+)+)+)+$")})),_0x4bf18e;_0x45f075();var _0x7978d6={kind:"number"},_0x483433={kind:"value"};function _0x163f9a(e,t){return{kind:"array",itemType:e,N:t}}var _0x27c3dc=function(e,t,i){this.type=e,this.index=t,this.input=i};_0x27c3dc.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,_0x7978d6),n=t.parse(e[2],2,_0x163f9a(t.expectedType||_0x483433));if(!i||!n)return null;var r=n.type;return new _0x27c3dc(r.itemType,i,n)},_0x27c3dc.prototype.evaluate=function(e){var t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new RuntimeError("Array index out of bounds: "+t+" < 0.");if(t>=i.length)throw new RuntimeError("Array index out of bounds: "+t+" > "+(i.length-1)+".");if(t!==Math.floor(t))throw new RuntimeError("Array index must be an integer, but found "+t+" instead.");return i[t]},_0x27c3dc.prototype.eachChild=function(e){e(this.index),e(this.input)},_0x27c3dc.prototype.possibleOutputs=function(){return[void 0]},_0x27c3dc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var _0x422043=(_0x464e15=!0,function(e,t){var i=_0x464e15?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x464e15=!1,i}),_0x5cba47=_0x422043(void 0,(function(){return _0x5cba47.toString().search("(((.+)+)+)+$").toString().constructor(_0x5cba47).search("(((.+)+)+)+$")})),_0x464e15;_0x5cba47();var _0x2994d7={kind:"boolean"},_0x546e21=function(e,t,i){this.type=e,this.branches=t,this.otherwise=i};_0x546e21.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var i;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(var n=[],r=1;r4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":validateRGBA(t[0],t[1],t[2],t[3])))return new _0x128d69(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new RuntimeError(i||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;si}function _0xf5bb5b(e,t,i){return t<=i}function _0x1c8867(e,t,i){return t>=i}function _0x1142e0(e,t,i,n){return 0===n.compare(t,i)}function _0x28b2ea(e,t,i,n){return!_0x1142e0(e,t,i,n)}function _0x15eade(e,t,i,n){return n.compare(t,i)<0}function _0x5aa41d(e,t,i,n){return n.compare(t,i)>0}function _0x460363(e,t,i,n){return n.compare(t,i)<=0}function _0x5d8fda(e,t,i,n){return n.compare(t,i)>=0}function _0x280644(e,t,i){var n,r=(n=!0,function(e,t){var i=n?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}),o="=="!==e&&"!="!==e;return function(){var n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function a(e,t,i){this.type=_0x31c81e,this.lhs=e,this.rhs=t,this.collator=i,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return n(),a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var i=e[0],n=t.parse(e[1],1,_0x28652f);if(!n)return null;if(!_0x46ea1b(i,n.type))return t.concat(1).error('"'+i+"\" comparisons are not supported for type '"+toString(n.type)+"'.");var r=t.parse(e[2],2,_0x28652f);if(!r)return null;if(!_0x46ea1b(i,r.type))return t.concat(2).error('"'+i+"\" comparisons are not supported for type '"+toString(r.type)+"'.");if(n.type.kind!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot compare types '"+toString(n.type)+"' and '"+toString(r.type)+"'.");o&&("value"===n.type.kind&&"value"!==r.type.kind?n=new _0x58f6bf(r.type,[n]):"value"!==n.type.kind&&"value"===r.type.kind&&(r=new _0x58f6bf(n.type,[r])));var s=null;if(4===e.length){if("string"!==n.type.kind&&"string"!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,_0x1ce745)))return null}return new a(n,r,s)},a.prototype.evaluate=function(n){var r=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(o&&this.hasUntypedArgument){var s=_0x4150fb.typeOf(r),l=_0x4150fb.typeOf(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new RuntimeError('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!o&&this.hasUntypedArgument){var u=_0x4150fb.typeOf(r),c=_0x4150fb.typeOf(a);if("string"!==u.kind||"string"!==c.kind)return t(n,r,a)}return this.collator?i(n,r,a,this.collator.evaluate(n)):t(n,r,a)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.possibleOutputs=function(){return[!0,!1]},a.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},a}()}var _0x208527={};_0x208527.Equals=_0x280644("==",_0x18de7d,_0x1142e0),_0x208527.NotEquals=_0x280644("!=",_0x129694,_0x28b2ea),_0x208527.LessThan=_0x280644("<",_0x3439af,_0x15eade),_0x208527.GreaterThan=_0x280644(">",_0x486d19,_0x5aa41d),_0x208527.LessThanOrEqual=_0x280644("<=",_0xf5bb5b,_0x460363),_0x208527.GreaterThanOrEqual=_0x280644(">=",_0x1c8867,_0x5d8fda);var _0x52c45f=(_0x1bff25=!0,function(e,t){var i=_0x1bff25?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1bff25=!1,i}),_0x583f0b=_0x52c45f(void 0,(function(){return _0x583f0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x583f0b).search("(((.+)+)+)+$")})),_0x1bff25;_0x583f0b();var _0x1a17c5={kind:"number"},_0x14f571={kind:"string"},_0x5049fb={kind:"color"},_0x3284d2={kind:"value"},_0x19c007={kind:"formatted"},_0x27ba1f={kind:"resolvedImage"};function _0x424ccc(e,t){return{kind:"array",itemType:e,N:t}}var _0x252262=function(e){this.type=_0x19c007,this.sections=e};_0x252262.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[1];if(!Array.isArray(i)&&"object"==typeof i)return t.error("First argument must be an image or text section.");for(var n=[],r=!1,o=1;o<=e.length-1;++o){var a=e[o];if(r&&"object"==typeof a&&!Array.isArray(a)){r=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,_0x1a17c5)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,_0x424ccc(_0x14f571))))return null;var u=null;if(a["text-color"]&&!(u=t.parse(a["text-color"],1,_0x5049fb)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var h=t.parse(e[o],1,_0x3284d2);if(!h)return null;var d=h.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new _0x252262(n)},_0x252262.prototype.evaluate=function(e){return new _0x2683dd(this.sections.map((function(t){var i=t.content.evaluate(e);return _0x4150fb.typeOf(i)===_0x27ba1f?new _0x5c9bfa("",i,null,null,null):new _0x5c9bfa(_0x4150fb.toString$1(i),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},_0x252262.prototype.eachChild=function(e){for(var t=0,i=this.sections;t-1&&(i=!0),new _0x313b86({name:t,available:i})},_0x306686.prototype.eachChild=function(e){e(this.input)},_0x306686.prototype.possibleOutputs=function(){return[void 0]},_0x306686.prototype.serialize=function(){return["image",this.input.serialize()]};var _0x5a85a5=(_0x4ab1eb=!0,function(e,t){var i=_0x4ab1eb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4ab1eb=!1,i}),_0x17d2e5=_0x5a85a5(void 0,(function(){return _0x17d2e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x17d2e5).search("(((.+)+)+)+$")})),_0x4ab1eb;_0x17d2e5();var _0x29d6fe=function(e,t,i,n,r){this.type=e,this.operator=t,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=r;o1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(r=t.parse(r,2,_0x47dd67)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=_0x40417d:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var _=t.parse(d,p,u);if(!_)return null;u=u||_.type,l.push([h,_])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new _0x29d6fe(u,i,n,r,l):t.error("Type "+toString(u)+" is not interpolatable.")},_0x29d6fe.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;if(n>=t[r-1])return i[r-1].evaluate(e);var o=findStopLessThanOrEqualTo(t,n),a=t[o],s=t[o+1],l=_0x29d6fe.interpolationFactor(this.interpolation,n,a,s),u=i[o].evaluate(e),c=i[o+1].evaluate(e);return"interpolate"===this.operator?interpolate[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?hcl.reverse(hcl.interpolate(hcl.forward(u),hcl.forward(c),l)):lab.reverse(lab.interpolate(lab.forward(u),lab.forward(c),l))},_0x29d6fe.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t=0},_0xed36fe.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},_0xed36fe.prototype.possibleOutputs=function(){return[!0,!1]},_0xed36fe.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var _0x35a661=(_0x2fb5cd=!0,function(e,t){var i=_0x2fb5cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2fb5cd=!1,i}),_0x5717e8=_0x35a661(void 0,(function(){return _0x5717e8.toString().search("(((.+)+)+)+$").toString().constructor(_0x5717e8).search("(((.+)+)+)+$")})),_0x2fb5cd;_0x5717e8();var _0x23621d=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};_0x23621d.prototype.evaluate=function(e){return this.result.evaluate(e)},_0x23621d.prototype.eachChild=function(e){for(var t=0,i=this.bindings;tNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,_0x4150fb.typeOf(d)))return null}else i=_0x4150fb.typeOf(d);if(void 0!==r[String(d)])return u.error("Branch labels must be unique.");r[String(d)]=o.length}var f=t.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var p=t.parse(e[1],1,_0x3bc402);if(!p)return null;var _=t.parse(e[e.length-1],e.length-1,n);return _?"value"!==p.type.kind&&t.concat(1).checkSubtype(i,p.type)?null:new _0x4bc22e(i,n,p,r,o,_):null},_0x4bc22e.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(_0x4150fb.typeOf(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},_0x4bc22e.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},_0x4bc22e.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},_0x4bc22e.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],i=[],n={},r=0,o=Object.keys(this.cases).sort();rt))throw new RuntimeError("Input is not a number.");a=s-1}return 0}_0x3e5a92();var _0x54a33f=(_0x2ec8d8=!0,function(e,t){var i=_0x2ec8d8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ec8d8=!1,i}),_0x2cd366=_0x54a33f(void 0,(function(){return _0x2cd366.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cd366).search("(((.+)+)+)+$")})),_0x2ec8d8;_0x2cd366();var _0x1c599a={kind:"number"},_0x7d0e5f=function(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,r=i;n=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,r);if(!c)return null;r=r||c.type,n.push([a,c])}return new _0x7d0e5f(r,i,n)},_0x7d0e5f.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;return n>=t[r-1]?i[r-1].evaluate(e):i[_0xb00b14(t,n)].evaluate(e)},_0x7d0e5f.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var _0x3552c9=(_0x463bba=!0,function(e,t){var i=_0x463bba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x463bba=!1,i}),_0x9cc3c9=_0x3552c9(void 0,(function(){return _0x9cc3c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x9cc3c9).search("(((.+)+)+)+$")})),_0x463bba;_0x9cc3c9();var _0x3920b3=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};_0x3920b3.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var i=e[1];return t.scope.has(i)?new _0x3920b3(i,t.scope.get(i)):t.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},_0x3920b3.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},_0x3920b3.prototype.eachChild=function(){},_0x3920b3.prototype.possibleOutputs=function(){return[void 0]},_0x3920b3.prototype.serialize=function(){return["var",this.name]};var _0x5f2024=(_0x2e826f=!0,function(e,t){var i=_0x2e826f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e826f=!1,i}),_0x5a58b3=_0x5f2024(void 0,(function(){return _0x5a58b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a58b3).search("(((.+)+)+)+$")})),_0x2e826f;_0x5a58b3();var _0x97a7f7={"==":_0x208527.Equals,"!=":_0x208527.NotEquals,">":_0x208527.GreaterThan,"<":_0x208527.LessThan,">=":_0x208527.GreaterThanOrEqual,"<=":_0x208527.LessThanOrEqual,array:_0x58f6bf,at:_0x27c3dc,boolean:_0x58f6bf,case:_0x546e21,coalesce:_0x3af8aa,collator:_0x2aa3c9,format:_0x252262,image:_0x306686,in:_0xed36fe,interpolate:_0x29d6fe,"interpolate-hcl":_0x29d6fe,"interpolate-lab":_0x29d6fe,length:_0x4eb776,let:_0x23621d,literal:_0x119c28,match:_0x4bc22e,number:_0x58f6bf,"number-format":_0x4dc893,object:_0x58f6bf,step:_0x7d0e5f,string:_0x58f6bf,"to-boolean":_0x3aa4b5,"to-color":_0x3aa4b5,"to-number":_0x3aa4b5,"to-string":_0x3aa4b5,var:_0x3920b3},_0x4f0320=(_0x24caf8=!0,function(e,t){var i=_0x24caf8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24caf8=!1,i}),_0x42e083=_0x4f0320(void 0,(function(){return _0x42e083.toString().search("(((.+)+)+)+$").toString().constructor(_0x42e083).search("(((.+)+)+)+$")})),_0x24caf8;function _0x416c3b(){}_0x42e083();var _0x449555={};for(var _0x250257 in _0x416c3b.register=function(e,t,i){void 0===i&&(i={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),_0x449555[e]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}},_0x416c3b.register("Object",Object),_0x416c3b.register("Color",_0x128d69),_0x416c3b.register("Error",Error),_0x416c3b.register("ResolvedImage",_0x313b86),_0x416c3b.register("ImageAtlas",_0x7f7567),_0x416c3b.register("ImagePosition",_0x3a607b),_0x416c3b.register("RGBAImage",_0x86a665),_0x416c3b.register("Formatted",_0x2683dd),_0x416c3b.register("FormattedSection",_0x5c9bfa),_0x97a7f7)_0x97a7f7[_0x250257]._classRegistryKey||_0x416c3b.register("Expression_"+_0x250257,_0x97a7f7[_0x250257]);function _0x8bc25a(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}_0x416c3b.serialize=function(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(_0x8bc25a(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var i=e;return t&&t.push(i.buffer),i}if(e instanceof ImageData)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var n=[],r=0,o=e;r=0)){var h=e[c];"function"!=typeof h&&(u[c]=_0x449555[l].shallow.indexOf(c)>=0?h:_0x416c3b.serialize(h,t))}e instanceof Error&&(u.message=e.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof e)},_0x416c3b.deserialize=function(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||_0x8bc25a(e)||ArrayBuffer.isView(e)||e instanceof ImageData)return e;if(Array.isArray(e))return e.map(_0x416c3b.deserialize);if("object"==typeof e){var t=e.$name||"Object",i=_0x449555[t].klass;if(!i)throw new Error("can't deserialize unregistered class "+t);if(i.deserialize)return i.deserialize(e);for(var n=Object.create(i.prototype),r=0,o=Object.keys(e);r=0?s:_0x416c3b.deserialize(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)};var _0x1e0f0e=(_0x1c5d83=!0,function(e,t){var i=_0x1c5d83?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c5d83=!1,i}),_0x392d52=_0x1e0f0e(void 0,(function(){return _0x392d52.toString().search("(((.+)+)+)+$").toString().constructor(_0x392d52).search("(((.+)+)+)+$")})),_0x1c5d83;_0x392d52();var ae$s=8192,_0x4d2f8e=(_0x106377=!0,function(e,t){var i=_0x106377?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x106377=!1,i}),_0x3c80f9=_0x4d2f8e(void 0,(function(){return _0x3c80f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c80f9).search("(((.+)+)+)+$")})),_0x106377;function number(e,t,i){return e*(1-i)+t*i}_0x3c80f9();const _0x35e9c1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2ed9ed=_0x35e9c1(void 0,(function(){return _0x2ed9ed.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ed9ed).search("(((.+)+)+)+$")}));function _0xc968bb(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let i=0;i{t(e,((e,t)=>{e&&(o=e),r[a]=t,0==--n&&i(o,r)}))}))}function extend$1(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n=0)return!0;return!1}const _0x421c95={};function warnOnce(e){_0x421c95[e]||("undefined"!=typeof console&&console.warn(e),_0x421c95[e]=!0)}function isCounterClockwise(e,t,i){return(i.y-e.y)*(t.x-e.x)>(t.y-e.y)*(i.x-e.x)}function isWorker(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function parseCacheControl(e){const t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,i,n,r)=>{const o=n||r;return t[i]=!o||o.toLowerCase(),""})),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}var _0xf80bf5=(_0x37ca71=!0,function(e,t){var i=_0x37ca71?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37ca71=!1,i}),_0x35363f=_0xf80bf5(void 0,(function(){return _0x35363f.toString().search("(((.+)+)+)+$").toString().constructor(_0x35363f).search("(((.+)+)+)+$")})),_0x37ca71;_0x35363f();var _0x45732c=function(){this.first=!0};_0x45732c.prototype.update=function(e,t){var i=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=t):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*t}},_0x416c3b.register("EvaluationParameters",_0x4f93ac);const _0x312abe=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x416ce9=_0x312abe(void 0,(function(){return _0x416ce9.toString().search("(((.+)+)+)+$").toString().constructor(_0x416ce9).search("(((.+)+)+)+$")}));_0x416ce9();const _0x5120e9=128;function _0x3f30ab(e,t){const{expression:i}=t;if("constant"===i.kind){return{kind:"constant",layoutSize:i.evaluate(new _0x4f93ac(e+1))}}if("source"===i.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:n}=i;let r=0;for(;r=0&&(this.text[s]={key:l,feature:t}),(s=a.centerJustifiedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.leftJustifiedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.verticalPlacedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.placedIconSymbolIndex)>=0&&(this.icon[s]={key:l,feature:t}),(s=a.verticalPlacedIconSymbolIndex)>=0&&(this.icon[s]={key:l,feature:t})}};var _0x58176a=new o$1p,_0x12eeb2=new e$1U,_0x1852b6=new e$1U,_0x50001e=new o$1o,_0x85587a=new o$1o,_0xf7ae7f=new o$1o,_0x1b780a=new o$1o,_0x1b30ee=new o$1o,_0x1e3b84=new o$1o,_0x69a33c=new o$1o,_0x1b7d91=new o$1o,_0x482b98=new o$1o,_0x2dd58c=new o$1o;function _0x408a0f(e,t,i,n){var r=Math.floor(.5*n.x);return t||i?t&&!i?r/128:e.uSize:mix(r,n.y,e?e.uSizeT:0)/128}function _0x577e2c(e,t,i,n){const r=e.layoutVertexArray.bytesPerElement/2,o=t+4*i+n;return{tileX:e.layoutVertexArray.int16[o*r],tileY:e.layoutVertexArray.int16[o*r+1],offsetX:e.layoutVertexArray.int16[o*r+2]/32,offsetY:e.layoutVertexArray.int16[o*r+3]/32,texCoordX:e.layoutVertexArray.uint16[o*r+4],texCoordY:e.layoutVertexArray.uint16[o*r+5],sizeX:e.layoutVertexArray.uint16[o*r+6],sizeY:e.layoutVertexArray.uint16[o*r+7],pixeloffsetX:e.layoutVertexArray.int16[o*r+8],pixeloffsetY:e.layoutVertexArray.int16[o*r+9]}}function _0x355f87(e){var t=j$T.LEFT,i=S$O.CENTER;return"center"===e?(t=j$T.CENTER,i=S$O.CENTER):"left"===e?(t=j$T.LEFT,i=S$O.CENTER):"right"===e?(t=j$T.RIGHT,i=S$O.CENTER):"top"===e||"bottom"===e?(t=j$T.CENTER,i=S$O.TOP):"top-left"==e?(t=j$T.LEFT,i=S$O.TOP):"top-right"==e?(t=j$T.RIGHT,i=S$O.TOP):"bottom-left"==e?(t=j$T.LEFT,i=S$O.BOTTOM):"bottom-right"==e&&(t=j$T.RIGHT,i=S$O.BOTTOM),{horizontalOrigin:t,verticalOrigin:i}}function _0xd48061(e,t,i){var n=i.rectangle;return{longtitude:e*n.width/ae$s+n.west,lattitude:t*n.height/ae$s+n.south}}_0x24125a.prototype.drawLayerSymbols=function(e,t,i){var n=e.getBucket(t);if(!n)return;var r,o,a=i?n.text:n.icon;if(!a||!a.segments.get().length)return;r=this._billboardsByLayers[t.bucketName]?this._billboardsByLayers[t.bucketName]:this._billboardsByLayers[t.bucketName]={},this._symbolInstancesInfoByLayers[t.bucketName]?o=this._symbolInstancesInfoByLayers[t.bucketName]:(o=this._symbolInstancesInfoByLayers[t.bucketName]=new _0xa9b408).init(n.symbolInstances,n.features,e.level,i),i?(this._textCollection=this._textCollection||this._provider._billboardCollectionPool.getOne(),this._textCollection.destroyTextureAtlas=!1,this._textCollection._sdf=!0,this._textCollection.textureAtlas=e.cesiumGlyphAtlas):(this._iconCollection=this._iconCollection||this._provider._billboardCollectionPool.getOne(),this._iconCollection.destroyTextureAtlas=!1,this._iconCollection._sdf=!1,this._iconCollection.textureAtlas=e.cesiumImageAtlas);var s=t.paint,l=t.layout,u=s.get("text-color").value.value;u=e$2b(u)?u:s.get("text-color").value.evaluate(),_0x12eeb2.red=u.r,_0x12eeb2.green=u.g,_0x12eeb2.blue=u.b;var c=s.get("text-halo-color").value.value,h=s.get("text-halo-width").value.value;s.get("text-halo-blur").value.value,s.get("text-show-background").value.value;var d=i?s.get("text-translate"):s.get("icon-translate");_0x1852b6.red=c.r,_0x1852b6.green=c.g,_0x1852b6.blue=c.b,_0x1852b6.alpha=c.a,_0x355f87(l.get("text-anchor").value.value);(i||n.sdfIcons)&&t.paint.get(i?"text-halo-width":"icon-halo-width").constantOr(1);var f,p,_=i?n.textSizeData:n.iconSizeData,m=_0x31524b(_,e.level),g=_.kind,x="constant"===g||"source"===g,v="constant"===g||"camera"===g,y=void 0;i?(f=this._textCollection,p=e.cesiumGlyphAtlas,y=e.glyphAtlasTexture.size,n.iconsInText&&(e.imageAtlasTexture.size,e.imageAtlasTexture)):(f=this._iconCollection,p=e.cesiumImageAtlas,y=e.imageAtlasTexture.size);for(var $=a.placedSymbolArray.length,b=0;b<$;b++){var T,C=a.placedSymbolArray.get(b),S=i?o.text[b]:o.icon[b],w=S.feature,E=S.key,P=w.id;!r[E]&&(r[E]=[]),T=r[E];for(var A=C.numGlyphs,L=C.vertexStartIndex,M=0;Mthis.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*_0x520763),_0x243fc6),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&(0==t.length&&console.log("oldUint8Array.length == 0"),this.uint8.set(t))}},_0x3e60cf.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var _0x1dc9f1=(_0x31ea48=!0,function(e,t){var i=_0x31ea48?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31ea48=!1,i}),_0x55169f=_0x1dc9f1(void 0,(function(){return _0x55169f.toString().search("(((.+)+)+)+$").toString().constructor(_0x55169f).search("(((.+)+)+)+$")})),_0x31ea48;function _0x46bdc2(e,t){this.x=e,this.y=t}_0x55169f(),_0x46bdc2.prototype={clone:function(){return new _0x46bdc2(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,i=e.y-this.y;return t*t+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,i=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=i,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),i=Math.sin(e),n=t*this.x-i*this.y,r=i*this.x+t*this.y;return this.x=n,this.y=r,this},_rotateAround:function(e,t){var i=Math.cos(e),n=Math.sin(e),r=t.x+i*(this.x-t.x)-n*(this.y-t.y),o=t.y+n*(this.x-t.x)+i*(this.y-t.y);return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},_0x46bdc2.convert=function(e){return e instanceof _0x46bdc2?e:Array.isArray(e)?new _0x46bdc2(e[0],e[1]):e};var _0x18a187=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=i,e},t}(_0x3e60cf);_0x18a187.prototype.bytesPerElement=4,_0x416c3b.register("StructArrayLayout2i4",_0x18a187);var _0x5d7160=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=i,this.int16[o+2]=n,this.int16[o+3]=r,e},t}(_0x3e60cf);_0x5d7160.prototype.bytesPerElement=8,_0x416c3b.register("StructArrayLayout4i8",_0x5d7160);var _0x2a157e=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(_0x3e60cf);_0x2a157e.prototype.bytesPerElement=12,_0x416c3b.register("StructArrayLayout2i4i12",_0x2a157e);var _0x51528d=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},r.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},r.prototype.emplace=function(e,t,i,n,r,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.uint8[l+4]=n,this.uint8[l+5]=r,this.uint8[l+6]=o,this.uint8[l+7]=a,e},r}(_0x3e60cf);_0x51528d.prototype.bytesPerElement=8,_0x416c3b.register("StructArrayLayout2i4ub8",_0x51528d);var _0x2db6d8=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=i,this.uint16[u+2]=n,this.uint16[u+3]=r,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,e},t}(_0x3e60cf);_0x2db6d8.prototype.bytesPerElement=16,_0x416c3b.register("StructArrayLayout8ui16",_0x2db6d8);var _0x15604f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.int16[f+0]=t,this.int16[f+1]=i,this.int16[f+2]=n,this.int16[f+3]=r,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=d,e},t}(_0x3e60cf);_0x15604f.prototype.bytesPerElement=24,_0x416c3b.register("StructArrayLayout4i4ui4i24",_0x15604f);var _0xe50b96=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.float32[r+0]=t,this.float32[r+1]=i,this.float32[r+2]=n,e},t}(_0x3e60cf);_0xe50b96.prototype.bytesPerElement=12,_0x416c3b.register("StructArrayLayout3f12",_0xe50b96);var _0x3704ae=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint32[i+0]=t,e},t}(_0x3e60cf);_0x3704ae.prototype.bytesPerElement=4,_0x416c3b.register("StructArrayLayout1ul4",_0x3704ae);var _0x47f6d0=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c){var h=this.length;return this.resize(h+1),this.emplace(h,e,t,i,n,r,o,a,s,l,u,c)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=12*e,f=6*e;return this.int16[d+0]=t,this.int16[d+1]=i,this.int16[d+2]=n,this.int16[d+3]=r,this.int16[d+4]=o,this.int16[d+5]=a,this.uint32[f+3]=s,this.uint16[d+8]=l,this.uint16[d+9]=u,this.int16[d+10]=c,this.int16[d+11]=h,e},t}(_0x3e60cf);_0x47f6d0.prototype.bytesPerElement=24,_0x416c3b.register("StructArrayLayout6i1ul2ui2i24",_0x47f6d0);var _0xc3bbd1=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(_0x3e60cf);_0xc3bbd1.prototype.bytesPerElement=12,_0x416c3b.register("StructArrayLayout2i2i2i12",_0xc3bbd1);var _0x544f54=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=i,this.float32[a+1]=n,this.float32[a+2]=r,e},t}(_0x3e60cf);_0x544f54.prototype.bytesPerElement=12,_0x416c3b.register("StructArrayLayout2ub2f12",_0x544f54);var _0x562995=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var g=this.length;return this.resize(g+1),this.emplace(g,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g){var x=24*e,v=12*e,y=48*e;return this.int16[x+0]=t,this.int16[x+1]=i,this.uint16[x+2]=n,this.uint16[x+3]=r,this.uint32[v+2]=o,this.uint32[v+3]=a,this.uint32[v+4]=s,this.uint16[x+10]=l,this.uint16[x+11]=u,this.uint16[x+12]=c,this.float32[v+7]=h,this.float32[v+8]=d,this.uint8[y+36]=f,this.uint8[y+37]=p,this.uint8[y+38]=_,this.uint32[v+10]=m,this.int16[x+22]=g,e},t}(_0x3e60cf);_0x562995.prototype.bytesPerElement=48,_0x416c3b.register("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",_0x562995);var _0x26d71c=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S){var w=this.length;return this.resize(w+1),this.emplace(w,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S,w){var E=30*e,P=15*e;return this.int16[E+0]=t,this.int16[E+1]=i,this.int16[E+2]=n,this.int16[E+3]=r,this.int16[E+4]=o,this.int16[E+5]=a,this.int16[E+6]=s,this.int16[E+7]=l,this.uint16[E+8]=u,this.uint16[E+9]=c,this.uint16[E+10]=h,this.uint16[E+11]=d,this.uint16[E+12]=f,this.uint16[E+13]=p,this.uint16[E+14]=_,this.uint16[E+15]=m,this.uint16[E+16]=g,this.uint16[E+17]=x,this.uint16[E+18]=v,this.uint16[E+19]=y,this.uint16[E+20]=$,this.uint16[E+21]=b,this.uint32[P+11]=T,this.float32[P+12]=C,this.float32[P+13]=S,this.float32[P+14]=w,e},t}(_0x3e60cf);_0x26d71c.prototype.bytesPerElement=60,_0x416c3b.register("StructArrayLayout8i14ui1ul3f60",_0x26d71c);var _0x4d30a7=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.float32[i+0]=t,e},t}(_0x3e60cf);_0x4d30a7.prototype.bytesPerElement=4,_0x416c3b.register("StructArrayLayout1f4",_0x4d30a7);var _0x4d44ce=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.int16[r+0]=t,this.int16[r+1]=i,this.int16[r+2]=n,e},t}(_0x3e60cf);_0x4d44ce.prototype.bytesPerElement=6,_0x416c3b.register("StructArrayLayout3i6",_0x4d44ce);var _0x294c2d=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=2*e,o=4*e;return this.uint32[r+0]=t,this.uint16[o+2]=i,this.uint16[o+3]=n,e},t}(_0x3e60cf);_0x294c2d.prototype.bytesPerElement=8,_0x416c3b.register("StructArrayLayout1ul2ui8",_0x294c2d);var _0xbd6def=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.uint16[r+0]=t,this.uint16[r+1]=i,this.uint16[r+2]=n,e},t}(_0x3e60cf);_0xbd6def.prototype.bytesPerElement=6,_0x416c3b.register("StructArrayLayout3ui6",_0xbd6def);var _0x229baa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=i,e},t}(_0x3e60cf);_0x229baa.prototype.bytesPerElement=4,_0x416c3b.register("StructArrayLayout2ui4",_0x229baa);var _0x53e7bb=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint16[i+0]=t,e},t}(_0x3e60cf);_0x53e7bb.prototype.bytesPerElement=2,_0x416c3b.register("StructArrayLayout1ui2",_0x53e7bb);var _0x3e5f67=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=i,e},t}(_0x3e60cf);_0x3e5f67.prototype.bytesPerElement=8,_0x416c3b.register("StructArrayLayout2f8",_0x3e5f67);var _0x2f4994=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=i,this.float32[o+2]=n,this.float32[o+3]=r,e},t}(_0x3e60cf);_0x2f4994.prototype.bytesPerElement=16,_0x416c3b.register("StructArrayLayout4f16",_0x2f4994);var _0x18f84b=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.float32[s+0]=t,this.float32[s+1]=i,this.float32[s+2]=n,this.float32[s+3]=r,this.float32[s+4]=o,this.float32[s+5]=a,e},t}(_0x3e60cf);_0x18f84b.prototype.bytesPerElement=24,_0x416c3b.register("StructArrayLayout6f24",_0x18f84b);var _0x44766f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.float32[u+0]=t,this.float32[u+1]=i,this.float32[u+2]=n,this.float32[u+3]=r,this.float32[u+4]=o,this.float32[u+5]=a,this.float32[u+6]=s,this.float32[u+7]=l,e},t}(_0x3e60cf);_0x44766f.prototype.bytesPerElement=32,_0x416c3b.register("StructArrayLayout8f32",_0x44766f);var _0xaf2975=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.float32[f+0]=t,this.float32[f+1]=i,this.float32[f+2]=n,this.float32[f+3]=r,this.float32[f+4]=o,this.float32[f+5]=a,this.float32[f+6]=s,this.float32[f+7]=l,this.float32[f+8]=u,this.float32[f+9]=c,this.float32[f+10]=h,this.float32[f+11]=d,e},t}(_0x3e60cf);_0xaf2975.prototype.bytesPerElement=48,_0x416c3b.register("StructArrayLayout12f48",_0xaf2975);var _0x6a3f93=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return i.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.x1.get=function(){return this._structArray.int16[this._pos2+2]},i.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},i.y1.get=function(){return this._structArray.int16[this._pos2+3]},i.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},i.x2.get=function(){return this._structArray.int16[this._pos2+4]},i.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},i.y2.get=function(){return this._structArray.int16[this._pos2+5]},i.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.radius.get=function(){return this._structArray.int16[this._pos2+10]},i.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},i.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},i.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},i.anchorPoint.get=function(){return new pointGeometry(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,i),t}(_0x53c4d7);_0x6a3f93.prototype.size=24;var _0xd62265=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x6a3f93(this,e)},t}(_0x47f6d0);_0x416c3b.register("CollisionBoxArray",_0xd62265);var _0x20bde8=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},i.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},i.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},i.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},i.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},i.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},i.segment.get=function(){return this._structArray.uint16[this._pos2+10]},i.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},i.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},i.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},i.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},i.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},i.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},i.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},i.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},i.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},i.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},i.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},i.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},i.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},i.associatedIconIndex.set=function(e){this._structArray.int16[this._pos2+22]=e},Object.defineProperties(t.prototype,i),t}(_0x53c4d7);_0x20bde8.prototype.size=48;var _0x3db8c3=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x20bde8(this,e)},t}(_0x562995);_0x416c3b.register("PlacedSymbolArray",_0x3db8c3);var _0x230f21=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},i.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},i.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},i.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},i.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},i.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},i.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},i.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},i.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},i.placedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+6]=e},i.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},i.verticalPlacedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+7]=e},i.key.get=function(){return this._structArray.uint16[this._pos2+8]},i.key.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},i.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},i.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},i.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},i.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},i.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},i.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+14]=e},i.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},i.verticalIconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+15]=e},i.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},i.verticalIconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+16]=e},i.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},i.featureIndex.set=function(e){this._structArray.uint16[this._pos2+17]=e},i.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},i.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+18]=e},i.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},i.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+19]=e},i.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},i.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+20]=e},i.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},i.numVerticalIconVertices.set=function(e){this._structArray.uint16[this._pos2+21]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+11]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+11]=e},i.textBoxScale.get=function(){return this._structArray.float32[this._pos4+12]},i.textBoxScale.set=function(e){this._structArray.float32[this._pos4+12]=e},i.textOffset0.get=function(){return this._structArray.float32[this._pos4+13]},i.textOffset0.set=function(e){this._structArray.float32[this._pos4+13]=e},i.textOffset1.get=function(){return this._structArray.float32[this._pos4+14]},i.textOffset1.set=function(e){this._structArray.float32[this._pos4+14]=e},Object.defineProperties(t.prototype,i),t}(_0x53c4d7);_0x230f21.prototype.size=60;var _0x1ec10f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x230f21(this,e)},t}(_0x26d71c);_0x416c3b.register("SymbolInstanceArray",_0x1ec10f);var _0x6ecc27=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={offsetX:{configurable:!0}};return i.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},i.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,i),t}(_0x53c4d7);_0x6ecc27.prototype.size=4;var _0x3b99b6=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new _0x6ecc27(this,e)},t}(_0x4d30a7);_0x416c3b.register("GlyphOffsetArray",_0x3b99b6);var _0x3ccecd=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return i.x.get=function(){return this._structArray.int16[this._pos2+0]},i.x.set=function(e){this._structArray.int16[this._pos2+0]=e},i.y.get=function(){return this._structArray.int16[this._pos2+1]},i.y.set=function(e){this._structArray.int16[this._pos2+1]=e},i.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},i.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,i),t}(_0x53c4d7);_0x3ccecd.prototype.size=6;var _0x2cb00b=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new _0x3ccecd(this,e)},t}(_0x4d44ce);_0x416c3b.register("SymbolLineVertexArray",_0x2cb00b);var _0x2db5ba=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,i),t}(_0x53c4d7);_0x2db5ba.prototype.size=8;var _0x55dc22=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x2db5ba(this,e)},t}(_0x294c2d);function _0x2035d5(e,t,i){return Math.min(i,Math.max(t,e))}function _0x4098ed(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),{min:-1*Math.pow(2,e-1),max:Math.pow(2,e-1)-1}}_0x416c3b.register("FeatureIndexArray",_0x55dc22);var _0x35d78d=_0x4098ed(15);function _0x1724dc(e){for(var t=ae$s/e.extent,i=e.loadGeometry(),n=0;n_0x35d78d.max||a.y<_0x35d78d.min||a.y>_0x35d78d.max)&&(a.x=_0x2035d5(a.x,_0x35d78d.min,_0x35d78d.max),a.y=_0x2035d5(a.y,_0x35d78d.min,_0x35d78d.max))}return i}var _0x568ebb=(_0x945ae7=!0,function(e,t){var i=_0x945ae7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x945ae7=!1,i}),_0x587f4b=_0x568ebb(void 0,(function(){return _0x587f4b.toString().search("(((.+)+)+)+$").toString().constructor(_0x587f4b).search("(((.+)+)+)+$")})),_0x945ae7;function _0x4c9375(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t>3}r--,1===n||2===n?(o+=e.readSVarint(),a+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new _0x46bdc2(o,a))):7===n?t&&t.push(t[0].clone()):console.log("VectorTileFeature loadGeometry unknown command "+n)}return t&&s.push(t),s},_0x4c8e20.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,n=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos>3}if(n--,1===i||2===i)(r+=e.readSVarint())s&&(s=r),(o+=e.readSVarint())u&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},_0x4c8e20.prototype.toGeoJSON=function(e,t,i){var n,r,o=this.extent*Math.pow(2,i),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=_0x4c8e20.types[this.type];function c(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}_0x1ef494(),_0x16ddd8.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new _0x4c8e20(this._pbf,t,this.extent,this._keys,this._values)};var _0x588fac=(_0x459cee=!0,function(e,t){var i=_0x459cee?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x459cee=!1,i}),_0x290506=_0x588fac(void 0,(function(){return _0x290506.toString().search("(((.+)+)+)+$").toString().constructor(_0x290506).search("(((.+)+)+)+$")})),_0x459cee;function _0x3868aa(e,t){this.layers=e.readFields(_0x34cca4,{},t)}function _0x34cca4(e,t,i){if(3===e){var n=new _0x16ddd8(i,i.readVarint()+i.pos);n.length&&(t[n.name]=n)}}_0x290506();var _0x518a79=(_0x169797=!0,function(e,t){var i=_0x169797?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x169797=!1,i}),_0xc43b50=_0x518a79(void 0,(function(){return _0xc43b50.toString().search("(((.+)+)+)+$").toString().constructor(_0xc43b50).search("(((.+)+)+)+$")})),_0x169797;_0xc43b50();var _0xe380d6=3;function _0xad3464(e,t,i){var n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var r=new Int32Array(this.arrayBuffer);e=r[0],t=r[1],i=r[2],this.d=t+2*i;for(var o=0;o=c[f+0]&&n>=c[f+1])?(a[d]=!0,o.push(u[d])):a[d]=!1}}},_0xad3464.prototype._forEachCell=function(e,t,i,n,r,o,a,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(i),h=this._convertToCellCoord(n),d=l;d<=c;d++)for(var f=u;f<=h;f++){var p=this.d*f+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(f),this._convertFromCellCoord(d+1),this._convertFromCellCoord(f+1)))&&r.call(this,e,t,i,n,p,o,a,s))return}},_0xad3464.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},_0xad3464.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},_0xad3464.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=_0xe380d6+this.cells.length+1+1,i=0,n=0;n=0)return!1;var i=!0;return e.eachChild((function(e){i&&!_0x4ccda4.isGlobalPropertyConstant(e,t)&&(i=!1)})),i};var _0x246140=(_0x2211e4=!0,function(e,t){var i=_0x2211e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2211e4=!1,i}),_0x5ded94=_0x246140(void 0,(function(){return _0x5ded94.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ded94).search("(((.+)+)+)+$")})),_0x2211e4;_0x5ded94();var _0x4b0289=function(e,t,i,n,r){void 0===t&&(t=[]),void 0===n&&(n=new _0x223358),void 0===r&&(r=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=r,this.expectedType=i};function _0x3181b4(e,t){const i=t[e];return void 0===i?null:i}_0x4b0289.prototype.parse=function(e,t,i,n,r){return void 0===r&&(r={}),t?this.concat(t,i,n)._parse(e,r):this._parse(e,r)},_0x4b0289.prototype._parse=function(e,t){function i(e,t,i){return"assert"===i?new _0x58f6bf(t,[e]):"coerce"===i?new _0x3aa4b5(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var o=r.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=i(o,a,t.typeAnnotation||"coerce");else o=i(o,a,t.typeAnnotation||"assert")}if(!(o instanceof _0x119c28)&&"resolvedImage"!==o.type.kind&&_0x4ccda4()){var l=new _0x59bf71;try{o=new _0x119c28(o.type,o.evaluate(l))}catch(e){return this.error(e.message),null}}return o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},_0x4b0289.prototype.concat=function(e,t,i){var n="number"==typeof e?this.path.concat(e):this.path,r=i?this.scope.concat(i):this.scope;return new _0x4b0289(this.registry,n,t||null,r,this.errors)},_0x4b0289.prototype.error=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new _0x2bedb9(n,e))},_0x4b0289.prototype.checkSubtype=function(e,t){var i=_0x3dc850(e,t);return i&&this.error(i),i};var _0x29fe3c=function(e,t,i,n){this.name=e,this.type=t,this._evaluate=i,this.args=n};function _0x48833d(e){return Array.isArray(e)?"("+e.map(toString).join(", ")+")":"("+toString(e.type)+"...)"}_0x29fe3c.prototype.evaluate=function(e,t){return this._evaluate(e,this.args,t)},_0x29fe3c.prototype.eachChild=function(e){this.args.forEach(e)},_0x29fe3c.prototype.possibleOutputs=function(){return[void 0]},_0x29fe3c.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},_0x29fe3c.parse=function(e,t){var i,n=e[0],r=_0x29fe3c.definitions[n];if(!r)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=a.filter((function(t){var i=t[0];return!Array.isArray(i)||i.length===e.length-1})),l=null,u=0,c=s;u-1))}],"filter-type-==":[_0x477c8f,[_0x23e119],function(e,t){var i=t[0];return e.geometryType()===i.value}],"filter-<":[_0x477c8f,[_0x23e119,_0x38ecf0],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n":[_0x477c8f,[_0x23e119,_0x38ecf0],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>r}],"filter-id->":[_0x477c8f,[_0x38ecf0],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[_0x477c8f,[_0x23e119,_0x38ecf0],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<=r}],"filter-id-<=":[_0x477c8f,[_0x38ecf0],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[_0x477c8f,[_0x23e119,_0x38ecf0],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>=r}],"filter-id->=":[_0x477c8f,[_0x38ecf0],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[_0x477c8f,[_0x38ecf0],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[_0x477c8f,[],function(e){return null!==e.id()}],"filter-type-in":[_0x477c8f,[_0x277afe(_0x23e119)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[_0x477c8f,[_0x277afe(_0x38ecf0)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[_0x477c8f,[_0x23e119,_0x277afe(_0x38ecf0)],function(e,t){var i=t[0];return t[1].value.indexOf(e.properties()[i.value])>=0}],"filter-in-large":[_0x477c8f,[_0x23e119,_0x277afe(_0x38ecf0)],function(e,t){var i=t[0],n=t[1];return binarySearch(e.properties()[i.value],n.value,0,n.value.length-1)}],all:{type:_0x477c8f,overloads:[[[_0x477c8f,_0x477c8f],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)&&n.evaluate(e)}],[_0x490363(_0x477c8f),function(e,t){for(var i=0,n=t;i-1}function supportsInterpolation(e){return!!e.expression&&e.expression.interpolated}_0xda7fce();var _0x32ff43=(_0x1aba34=!0,function(e,t){var i=_0x1aba34?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1aba34=!1,i}),_0x5266b2=_0x32ff43(void 0,(function(){return _0x5266b2.toString().search("(((.+)+)+)+$").toString().constructor(_0x5266b2).search("(((.+)+)+)+$")})),_0x1aba34;function _0x21a01e(){}function _0x32cbd7(e){return{result:"success",value:e}}function _0x6e2e44(e){return{result:"error",value:e}}_0x5266b2(),_0x21a01e.isExpression=function(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in _0x97a7f7};var _0x29d51a={kind:"number"},_0x1c862c={kind:"string"},_0x3d932e={kind:"boolean"},_0x54d892={kind:"color"},_0x47fbaa={kind:"value"},_0x2bf5b9={kind:"formatted"},_0xa5fc9={kind:"resolvedImage"};function _0x3a8302(e,t){return{kind:"array",itemType:e,N:t}}function _0xb3c8fc(e){var t=null;if(e instanceof _0x23621d)t=_0xb3c8fc(e.result);else if(e instanceof _0x3af8aa){for(var i of e.args)if(t=_0xb3c8fc(i))break}else(e instanceof _0x7d0e5f||e instanceof _0x29d6fe)&&e.input instanceof _0x4b0289.CompoundExpression&&"zoom"===e.input.name&&(t=e);return t instanceof _0x2bedb9||e.eachChild((e=>{var i=_0xb3c8fc(e);i instanceof _0x2bedb9?t=i:!t&&i?t=new _0x2bedb9("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new _0x2bedb9("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function _0x2d1d1b(e){var t={color:_0x54d892,string:_0x1c862c,number:_0x29d51a,enum:_0x1c862c,boolean:_0x3d932e,formatted:_0x2bf5b9,resolvedImage:_0xa5fc9};return"array"===e.type?_0x3a8302(t[e.value]||_0x47fbaa,e.length):t[e.type]}function _0x1f668a(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function _0xff847(e){return e}function _0x3130a(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n=e.stops[r-1][0])return e.stops[r-1][1];var o=_0xb00b14(e.stops.map((e=>e[0])),i),a=_0xeeb445(i,n,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],u=interpolate[t.type]||_0xff847;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=colorSpaces[e.colorSpace];u=(e,t)=>c.reverse(c.interpolate(c.forward(e),c.forward(t),a))}return"function"==typeof s.evaluate?{evaluate(...e){var t=s.evaluate.apply(void 0,e),i=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==i)return u(t,i,a)}}:u(s,l,a)}function _0x32a790(e,t,i){return"color"===t.type?i=_0x128d69.parse(i):"formatted"===t.type?i=Formatted.fromString(i.toString()):"resolvedImage"===t.type?i=ResolvedImage.fromString(i.toString()):_0x58c25e(i)!==t.type&&("enum"!==t.type||!t.values[i])&&(i=void 0),_0x4dbdec(i,e.default,t.default)}function _0xcd8fc6(e,t){var i=new _0x4b0289(_0x97a7f7,[],t?_0x2d1d1b(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?_0x32cbd7(new _0x55e221(n,t)):_0x6e2e44(i.errors)}function _0x15402f(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!_0x4ccda4.isStateConstant(t.expression)}function _0x15f8c5(e,t,i,n){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent="camera"!==e&&!_0x4ccda4.isStateConstant(t.expression),this.interpolationType=n}function _0xbfb981(e,t){if("error"===(e=_0xcd8fc6(e,t)).result)return e;var i=e.value.expression,n=_0x4ccda4.isFeatureConstant(i);if(!n&&!supportsPropertyExpression(t))return _0x6e2e44([new _0x2bedb9("","data expressions not supported")]);var r=_0x4ccda4.isGlobalPropertyConstant(i,["zoom"]);if(!r&&!supportsZoomExpression(t))return _0x6e2e44([new _0x2bedb9("","zoom expressions not supported")]);var o=_0xb3c8fc(i);if(!o&&!r)return _0x6e2e44([new _0x2bedb9("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof _0x2bedb9)return _0x6e2e44([o]);if(o instanceof _0x29d6fe&&!supportsInterpolation(t))return _0x6e2e44([new _0x2bedb9("",'"interpolate" expressions cannot be used with this property')]);if(!o)return _0x32cbd7(new _0x15402f(n?"constant":"source",e.value));var a=o instanceof _0x29d6fe?o.interpolation:void 0;return _0x32cbd7(new _0x15f8c5(n?"camera":"composite",e.value,o.labels,a))}function _0x3795ee(e,t){var i,n,r,o="color"===t.type,a=e.stops&&"object"==typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,u=e.type||(supportsInterpolation(t)?"exponential":"interval");if(o&&((e=_0x3130a({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],_0x128d69.parse(e[1])]}))),e.default?e.default=_0x128d69.parse(e.default):e.default=_0x128d69.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!colorSpaces[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)i=_0x1853e4;else if("interval"===u)i=evaluateIntervalFunction;else if("categorical"===u){i=evaluateCategoricalFunction,n=Object.create(null);for(var c=0,h=e.stops;c=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&Array.isArray(e[2]);case"!in":case"!has":case"none":case"crossFields":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":case"like":case"!like":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,i=e.slice(1);tt?1:0}function _0x63dd4a(e){if(!e)return!0;var t=e[0];return e.length<=1?"any"!==t:"=="===t?_0x369755(e[1],e[2],"=="):"!="===t?_0x28bf68(_0x369755(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?_0x369755(e[1],e[2],t):"any"===t?_0x54f86d(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(_0x63dd4a)):"crossFields"===t?["crossFields"].concat(e.slice(1).map(_0x63dd4a)):"none"===t?["all"].concat(e.slice(1).map(_0x63dd4a).map(_0x28bf68)):"in"===t?_0x21adc5(e[1],e.slice(2)):"!in"===t?_0x28bf68(_0x21adc5(e[1],e.slice(2))):"has"===t?_0x3e4fc1(e[1]):"!has"===t?_0x28bf68(_0x3e4fc1(e[1])):"like"===t?_0x369755(e[1],e[2],"like"):"!like"!==t||_0x28bf68(_0x369755(e[1],e[2],"like"))}function _0x369755(e,t,i){switch(e){case"$type":return["filter-type-"+i,t];case"$id":return["filter-id-"+i,t];default:return["filter-"+i,e,t]}}function _0x54f86d(e){return["any"].concat(e.map(_0x63dd4a))}function _0x21adc5(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(_0x473edc)]]:["filter-in-small",e,["literal",t]]}}function _0x3e4fc1(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function _0x28bf68(e){return["!",e]}_0x570fee.createFilter=function(e){if(null==e)return function(){return!0};!_0x570fee.isExpressionFilter(e)&&(e=_0x63dd4a(e));var t=_0x21a01e.createExpression(e,_0x536422);if("error"===t.result)throw new Error(t.value.map((function(e){return e.key+": "+e.message})).join(", "));return function(e,i){return t.value.evaluate(e,i)}};var D$U=function(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},y$Q=function(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_},g$X={read:D$U,write:y$Q};function h$U(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}h$U.Varint=0,h$U.Fixed64=1,h$U.Bytes=2,h$U.Fixed32=5;var B$Q=4294967296,M$V=1/B$Q;function C$W(e,t,i){var n,r,o=i.buf;if(n=(112&(r=o[i.pos++]))>>4,r<128||(n|=(127&(r=o[i.pos++]))<<3,r<128)||(n|=(127&(r=o[i.pos++]))<<10,r<128)||(n|=(127&(r=o[i.pos++]))<<17,r<128)||(n|=(127&(r=o[i.pos++]))<<24,r<128)||(n|=(1&(r=o[i.pos++]))<<31,r<128))return c$U(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function F$Y(e){return e.type===h$U.Bytes?e.readVarint()+e.pos:e.pos+1}function c$U(e,t,i){return i?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function T$R(e,t){var i,n;if(e>=0?(i=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(i=~(-e%4294967296))?i=i+1|0:(i=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),E$V(i,n,t),N$N(n,t)}function E$V(e,t,i){i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}function N$N(e,t){var i=(7&e)<<4;t.buf[t.pos++]|=i|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function k$O(e,t,i){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=e;r--)i.buf[r+n]=i.buf[r]}function I$14(e,t){for(var i=0;i>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function S$N(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function z$P(e,t,i){for(var n="",r=t;r239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[r+1]))&&((u=(31&l)<<6|63&o)<=127&&(u=null)):3===c?(o=e[r+1],a=e[r+2],128==(192&o)&&128==(192&a)&&(((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null))):4===c&&(o=e[r+1],a=e[r+2],s=e[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null))),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=c}return n}function J$O(e,t,i){for(var n,r,o=0;o55295&&n<57344){if(!r){n>56319||o+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):r=n;continue}if(n<56320){e[i++]=239,e[i++]=191,e[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(e[i++]=239,e[i++]=191,e[i++]=189,r=null);n<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:(n<65536?e[i++]=n>>12|224:(e[i++]=n>>18|240,e[i++]=n>>12&63|128),e[i++]=n>>6&63|128),e[i++]=63&n|128)}return i}h$U.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos>3,o=this.pos;this.type=7&n,e(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=V$L(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=S$N(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=V$L(this.buf,this.pos)+V$L(this.buf,this.pos+4)*B$Q;return this.pos+=8,e},readSFixed64:function(){var e=V$L(this.buf,this.pos)+S$N(this.buf,this.pos+4)*B$Q;return this.pos+=8,e},readFloat:function(){var e=g$X.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=g$X.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,n=this.buf;return t=127&(i=n[this.pos++]),i<128||(t|=(127&(i=n[this.pos++]))<<7,i<128)||(t|=(127&(i=n[this.pos++]))<<14,i<128)||(t|=(127&(i=n[this.pos++]))<<21,i<128)?t:C$W(t|=(15&(i=n[this.pos]))<<28,e,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=z$P(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var i=F$Y(this);for(e=e||[];this.pos127;);else if(t===h$U.Bytes)this.pos=this.readVarint()+this.pos;else if(t===h$U.Fixed32)this.pos+=4;else{if(t!==h$U.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?T$R(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=J$O(this.buf,e,this.pos);var i=this.pos-t;i>=128&&k$O(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),g$X.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),g$X.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i=128&&k$O(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,i){this.writeTag(e,h$U.Bytes),this.writeRawMessage(t,i)},writePackedVarint:function(e,t){this.writeMessage(e,I$14,t)},writePackedSVarint:function(e,t){this.writeMessage(e,U$V,t)},writePackedBoolean:function(e,t){this.writeMessage(e,H$W,t)},writePackedFloat:function(e,t){this.writeMessage(e,A$11,t)},writePackedDouble:function(e,t){this.writeMessage(e,R$P,t)},writePackedFixed32:function(e,t){this.writeMessage(e,_$O,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,m$S,t)},writePackedFixed64:function(e,t){this.writeMessage(e,G$_,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,j$S,t)},writeBytesField:function(e,t){this.writeTag(e,h$U.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,h$U.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,h$U.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,h$U.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,h$U.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,h$U.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,h$U.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,h$U.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,h$U.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,h$U.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var _0x37a2f7=(_0x455947=!0,function(e,t){var i=_0x455947?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x455947=!1,i}),_0x21d882=_0x37a2f7(void 0,(function(){return _0x21d882.toString().search("(((.+)+)+)+$").toString().constructor(_0x21d882).search("(((.+)+)+)+$")})),_0x455947;_0x21d882();var _0x4c869e=function(e,t,i){this.x=e.x,this.y=e.y,this.z=e.z,this.grid=t||new _0xad3464(ae$s,16,0),this.featureIndexArray=i||new _0x55dc22};function _0x4f46e(e){for(var t=1/0,i=1/0,n=-1/0,r=-1/0,o=0,a=e;o=0&&h[3]>=0&&l.insert(s,h[0]-a,h[1]-a,h[2]+a,h[3]+a)}},_0x4c869e.prototype.loadVTLayers=function(){return!this.vtLayers&&(this.vtLayers=new _0x3868aa(new h$U(this.rawTileData)).layers,this.sourceLayerCoder=new _0x4c9375(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},_0x4c869e.prototype.query=function(e,t,i){var n=this;this.loadVTLayers();var r=e.params||{},o=_0x5b03bd(this.z,e.tileSize,r),a=_0x570fee.createFilter(r.filter),s=e.queryGeometry,l=5,u=_0x4f46e(s),c=[];e$2b(r.selectTolerance)&&(l+=o*r.selectTolerance),(c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l)).sort(_0x55c4eb);for(var h,d={},f=function(i){var l=c[i];if(l!==h){h=l;var u=n.featureIndexArray.get(l),f=null;n.loadMatchingFeature(d,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,a,r.layers,t,(function(t,i){!f&&(f=_0x1724dc(t));return i.queryIntersectsFeature(s,t,{},f,n.z,e.transform,o,e.pixelPosMatrix,e.adjustScale)}))}},p=0;p_0x4b6d5a.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==n)&&(r={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},void 0!==n&&(r.sortKey=n),this.segments.push(r)),r},_0x4b6d5a.prototype.get=function(){return this.segments},_0x4b6d5a.prototype.destroy=function(){for(var e=0,t=this.segments;e=n)){for(var r=e[i+n>>1],o=i-1,a=n+1;;){do{o++}while(e[o]r);if(o>=a)break;_0x2d9376(e,o,a),_0x2d9376(t,3*o,3*a),_0x2d9376(t,3*o+1,3*a+1),_0x2d9376(t,3*o+2,3*a+2)}_0xf387b9(e,t,i,a),_0xf387b9(e,t,a+1,n)}}function _0x2d9376(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}_0x5ace2f.prototype.add=function(e,t,i,n){this.ids.push(e),this.positions.push(t,i,n)},_0x5ace2f.prototype.getPositions=function(e){for(var t=0,i=this.ids.length-1;t>1;this.ids[n]>=e?i=n:t=n+1}for(var r=[];this.ids[t]===e;){var o=this.positions[3*t],a=this.positions[3*t+1],s=this.positions[3*t+2];r.push({index:o,start:a,end:s}),t++}return r},_0x5ace2f.serialize=function(e,t){var i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return _0xf387b9(i,n,0,i.length-1),t&&t.push(i.buffer,n.buffer),{ids:i,positions:n}},_0x5ace2f.deserialize=function(e){var t=new _0x5ace2f;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},_0x416c3b.register("FeaturePositionMap",_0x5ace2f);var _0x1489e4=(_0x35f4cf=!0,function(e,t){var i=_0x35f4cf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x35f4cf=!1,i}),_0x1729fd=_0x1489e4(void 0,(function(){return _0x1729fd.toString().search("(((.+)+)+)+$").toString().constructor(_0x1729fd).search("(((.+)+)+)+$")})),_0x35f4cf;function _0x5aaf90(e,t,i){return Math.min(i,Math.max(t,e))}function _0x5acd43(e,t){return 256*(e=_0x5aaf90(Math.floor(e),0,255))+(t=_0x5aaf90(Math.floor(t),0,255))}function _0x249c0e(e){return[_0x5acd43(255*e.r,255*e.g),_0x5acd43(255*e.b,255*e.a)]}_0x1729fd();var _0x49d100=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0};_0x49d100.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},_0x49d100.prototype.setConstantPatternPositions=function(){},_0x49d100.prototype.populatePaintArray=function(){},_0x49d100.prototype.updatePaintArray=function(){},_0x49d100.prototype.upload=function(){},_0x49d100.prototype.destroy=function(){},_0x49d100.prototype.setUniforms=function(e,t,i,n){t.set(n.constantOr(this.value))},_0x49d100.prototype.getBinding=function(e,t){return"color"===this.type?new _0x5ec44f.UniformColor(e,t):new _0x5ec44f.Uniform1f(e,t)},_0x49d100.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){var e=n.get(i).constantOr(r.value);return"color"===r.type&&(e.red=e.r,e.green=e.g,e.blue=e.b,e.alpha=e.a),e}},_0x49d100.serialize=function(e){var t=e.value,i=e.names,n=e.type;return{value:_0x416c3b.serialize(t),names:i,type:n}},_0x49d100.deserialize=function(e){var t=e.value,i=e.names,n=e.type;return new _0x49d100(_0x416c3b.deserialize(t),i,n)};var _0xa17f28=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};_0xa17f28.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},_0xa17f28.prototype.populatePaintArray=function(){},_0xa17f28.prototype.updatePaintArray=function(){},_0xa17f28.prototype.upload=function(){},_0xa17f28.prototype.destroy=function(){},_0xa17f28.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},_0xa17f28.prototype.setUniforms=function(e,t,i,n,r){var o=this.patternPositions;"u_pattern_to"===r&&o.patternTo&&t.set(e$29(o.patternTo[0],o.patternTo[1],o.patternTo[2],o.patternTo[3])),"u_pattern_from"===r&&o.patternFrom&&t.set(e$29(o.patternFrom[0],o.patternFrom[1],o.patternFrom[2],o.patternFrom[3]))},_0xa17f28.prototype.getBinding=function(e,t){return new _0x5ec44f.Uniform4f(e,t)},_0xa17f28.prototype.setUniformMap=function(e,t,i,n){var r=this.patternPositions;e[t]=function(){return"u_pattern_to"===t&&r.patternTo?new e$29(r.patternTo[0],r.patternTo[1],r.patternTo[2],r.patternTo[3]):"u_pattern_from"===t&&r.patternFrom?new e$29(r.patternFrom[0],r.patternFrom[1],r.patternFrom[2],r.patternFrom[3]):void console.log("CrossFadedConstantBinder is not support")}};var _0x4cd7c8=function(e,t,i,n){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?2:1,offset:0}})),this.paintVertexArray=new n};_0x4cd7c8.prototype.defines=function(){return[]},_0x4cd7c8.prototype.setConstantPatternPositions=function(){},_0x4cd7c8.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new _0x4f93ac(0),t,{},[],n);if("color"===this.type)for(var s=_0x249c0e(a),l=o;l-1&&(i[l]=function(){return 0});return i}destroy(){for(const e in this.binders)this.binders[e].destroy()}}class ProgramConfigurationSet{constructor(e,t,i,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=_0x5489a3.createDynamic(r,i,n),this.programConfigurations[r.id].layoutAttributes=e;this.needsUpload=!1,this._featureMap=new _0x5ace2f,this._bufferOffset=0}populatePaintArrays(e,t,i,n,r){for(const o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(e,t,i,n,r);void 0!==t.id&&this._featureMap.add(+t.id,i,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,i,n){for(const r of i)this.needsUpload=this.programConfigurations[r.id].updatePaintArrays(e,this._featureMap,t,r,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function _0x581d75(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"text-show-background":["show-background"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function _0x1bef5d(e){return{"line-pattern":{source:_0x44766f,composite:_0x44766f},"fill-pattern":{source:_0x44766f,composite:_0x44766f},"fill-extrusion-pattern":{source:_0x44766f,composite:_0x44766f}}[e]}function _0x24ec30(e,t,i){var n={color:{source:_0x3e5f67,composite:_0x2f4994},number:{source:_0x4d30a7,composite:_0x3e5f67}},r=_0x1bef5d(e);return r&&r[i]||n[t][i]}_0x416c3b.register("ConstantBinder",_0x49d100),_0x416c3b.register("CrossFadedConstantBinder",_0xa17f28),_0x416c3b.register("SourceExpressionBinder",_0x4cd7c8),_0x416c3b.register("CrossFadedCompositeBinder",_0x38b629),_0x416c3b.register("CompositeExpressionBinder",_0x1affe0),_0x416c3b.register("ProgramConfiguration",_0x5489a3,{omit:["_buffers"]}),_0x416c3b.register("ProgramConfigurationSet",ProgramConfigurationSet);var _0x35f096=(_0x1cbecd=!0,function(e,t){var i=_0x1cbecd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1cbecd=!1,i}),_0x1e52e9=_0x35f096(void 0,(function(){return _0x1e52e9.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e52e9).search("(((.+)+)+)+$")})),_0x1cbecd;_0x1e52e9();var _0x13d567=_0x55f30f([{name:"a_pos",components:2,type:"Int16"}],4),_0x12a7d3=_0x13d567.members,_0x3394b0=_0x55f30f([{name:"a_pos",components:2,type:"Float32"}],4),_0x2f0319=_0x3394b0.members;function _0x31cda6(e,t,i,n,r){e.emplaceBack(2*t+(n+1)/2,2*i+(r+1)/2)}var _0x20263c=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this._sourceLayerIds={};var t=this;this.layerIds=this.layers.map((function(e,i){return t._sourceLayerIds[e.sourceLayer]=i,e.sourceLayer})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new _0x18a187,this.indexArray=new _0xbd6def,this.segments=new _0x4b6d5a,this.programConfigurations=new ProgramConfigurationSet(members,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x20263c.prototype.populate=function(e,t){var i=this.layers[0],n=[],r=null;"circle"===i.type&&(r=i.layout.get("circle-sort-key"));for(var o=0,a=e;o0&&(this.layoutCesiumVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0x3cb0f8.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},_0x20263c.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},_0x20263c.prototype.clear=function(){e$2b(this.layoutVertexArray)&&(this.layoutVertexArray=null),e$2b(this.indexArray)&&(this.indexArray=null)},_0x20263c.prototype.addFeature=function(e,t,i){for(var n=0,r=t;n=ae$s||u<0||u>=ae$s)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),h=c.vertexLength;_0x31cda6(this.layoutVertexArray,l,u,-1,-1),_0x31cda6(this.layoutVertexArray,l,u,1,-1),_0x31cda6(this.layoutVertexArray,l,u,1,1),_0x31cda6(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,{})},_0x416c3b.register("CircleBucket",_0x20263c,{omit:["layers"]});var _0x275dab=(_0x19e1eb=!0,function(e,t){var i=_0x19e1eb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19e1eb=!1,i}),_0x28059b=_0x275dab(void 0,(function(){return _0x28059b.toString().search("(((.+)+)+)+$").toString().constructor(_0x28059b).search("(((.+)+)+)+$")})),_0x19e1eb;_0x28059b();var _0x3f772a=function(e){this.specification=e};_0x3f772a.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},_0x3f772a.prototype.interpolate=function(e,t,i){var n=interpolate[this.specification.type];return n?n(e,t,i):e},_0x416c3b.register("DataConstantProperty",_0x3f772a);var _0x3bec47=(_0x33a44f=!0,function(e,t){var i=_0x33a44f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33a44f=!1,i}),_0x497d93=_0x3bec47(void 0,(function(){return _0x497d93.toString().search("(((.+)+)+)+$").toString().constructor(_0x497d93).search("(((.+)+)+)+$")})),_0x33a44f;_0x497d93();var _0x5678d2=function(e,t){this.specification=e,this.overrides=t};_0x5678d2.prototype.possiblyEvaluate=function(e,t,i){return"constant"===e.expression.kind||"camera"===e.expression.kind?new _0x320c7c(this,{kind:"constant",value:e.expression.evaluate(t,null,{},i)},t):new _0x320c7c(this,e.expression,t)},_0x5678d2.prototype.interpolate=function(e,t,i){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new _0x320c7c(this,{kind:"constant",value:void 0},e.parameters);var n=interpolate[this.specification.type];return n?new _0x320c7c(this,{kind:"constant",value:n(e.value.value,t.value.value,i)},e.parameters):e},_0x5678d2.prototype.evaluate=function(e,t,i,n,r){return"constant"===e.kind?e.value:e.evaluate(t,i,n,r)},_0x416c3b.register("DataDrivenProperty",_0x5678d2);var _0x340bc0=(_0x183e58=!0,function(e,t){var i=_0x183e58?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x183e58=!1,i}),_0x312dcc=_0x340bc0(void 0,(function(){return _0x312dcc.toString().search("(((.+)+)+)+$").toString().constructor(_0x312dcc).search("(((.+)+)+)+$")})),_0x183e58;_0x312dcc();var _0xcc3791=function(e,t){this.property=e,this.value=t,this.expression=_0x21a01e.normalizePropertyExpression(void 0===t?e.specification.default:t,e.specification)};_0xcc3791.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},_0xcc3791.prototype.possiblyEvaluate=function(e,t){return this.property.possiblyEvaluate(this,e,t)};var _0x54aa1b=(_0x2f0b4a=!0,function(e,t){var i=_0x2f0b4a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f0b4a=!1,i}),_0x24fe87=_0x54aa1b(void 0,(function(){return _0x24fe87.toString().search("(((.+)+)+)+$").toString().constructor(_0x24fe87).search("(((.+)+)+)+$")})),_0x2f0b4a;function _0x4155da(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,i=t*e;return 4*(e<.5?i:3*(e-t)+i-.75)}_0x24fe87();var _0x4ef771=function(e,t,i,n,r){this.property=e,this.value=t,this.begin=r+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=i)};_0x4ef771.prototype.possiblyEvaluate=function(e,t){var i=e.now||0,n=this.value.possiblyEvaluate(e,t),r=this.prior;if(r){if(i>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(i=this.maxzoom)||"none"===this.visibility)},_0x353e3f.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},_0x353e3f.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},_0x353e3f.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,t)},_0x353e3f.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),filterObject(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},_0x353e3f.prototype._validate=function(e,t,i,n,r){return!0},_0x353e3f.prototype.is3D=function(){return!1},_0x353e3f.prototype.isTileClipped=function(){return!1},_0x353e3f.prototype.hasOffscreenPass=function(){return!1},_0x353e3f.prototype.resize=function(){},_0x353e3f.prototype.isStateDependent=function(){return!0};var _0xc6fab4=(_0x5f48bb=!0,function(e,t){var i=_0x5f48bb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f48bb=!1,i}),_0x15765e=_0xc6fab4(void 0,(function(){return _0x15765e.toString().search("(((.+)+)+)+$").toString().constructor(_0x15765e).search("(((.+)+)+)+$")})),_0x5f48bb;_0x15765e();var _0x14a25d=8,_0x93a0b3={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},_0x317060={"*":{type:"source"}},_0x16928f=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],_0xf34f4a={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},_0x14e1b4={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},_0x33440e={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},_0x381e71={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},_0x338614={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},_0x971caa={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},_0x41112f={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},_0xc182c4=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],_0x31cf15={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x210d5b={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x498ab3={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x13bc03={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x1ea6ee={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x4612f9={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x14988d={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x5ef310={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x36f24c={type:"array",value:"*"},_0x2b2721={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},_0x44eabe={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},_0x145b2d={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},_0x4318f9={type:"array",value:"*",minimum:1},_0x196d70={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},_0x38e980={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},_0x20fb42=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],_0x1131ff={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},_0x4b6cd3={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},_0xca1690={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},_0xb09ff2={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x398e4a={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-show-background":{type:"boolean",default:!1,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},_0x46de1c={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0xfcb894={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x1c1a44={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x3d2226={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},_0x5f2c0a={$version:_0x14a25d,$root:_0x93a0b3,sources:_0x317060,source:_0x16928f,source_vector:_0xf34f4a,source_raster:_0x14e1b4,source_raster_dem:_0x33440e,source_geojson:_0x381e71,source_video:_0x338614,source_image:_0x971caa,layer:_0x41112f,layout:_0xc182c4,layout_background:_0x31cf15,layout_fill:_0x210d5b,layout_circle:_0x498ab3,layout_heatmap:_0x13bc03,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:_0x1ea6ee,layout_symbol:_0x4612f9,layout_raster:_0x14988d,layout_hillshade:_0x5ef310,filter:_0x36f24c,filter_operator:_0x2b2721,geometry_type:_0x44eabe,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:_0x145b2d,expression:_0x4318f9,expression_name:_0x196d70,light:_0x38e980,paint:_0x20fb42,paint_fill:_0x1131ff,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:_0x4b6cd3,paint_circle:_0xca1690,paint_heatmap:_0xb09ff2,paint_symbol:_0x398e4a,paint_raster:_0x46de1c,paint_hillshade:_0xfcb894,paint_background:_0x1c1a44,transition:_0x3d2226,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},_0x45d668=(_0x1b066d=!0,function(e,t){var i=_0x1b066d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b066d=!1,i}),_0xc3611c=_0x45d668(void 0,(function(){return _0xc3611c.toString().search("(((.+)+)+)+$").toString().constructor(_0xc3611c).search("(((.+)+)+)+$")})),_0x1b066d;function _0x31b87d(){}function _0x49f03d(e,t,i){if(e.length>1){if(_0x40643c(e,t))return!0;for(var n=0;nt.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(o=!o);return o}function _0x346bc4(e,t){for(var i=!1,n=0,r=e.length-1;nt.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}_0xc3611c(),_0x31b87d.polygonIntersectsPolygon=function(e,t){for(var i=0;i=3)for(var o=0;o1?e.distSqr(i):e.distSqr(i.sub(t)._mult(r)._add(t))};var _0xc684e3=new _0x3699c0({"circle-sort-key":new _0x5678d2(_0x5f2c0a.layout_circle["circle-sort-key"])}),_0x564b56=new _0x3699c0({"circle-radius":new _0x5678d2(_0x5f2c0a.paint_circle["circle-radius"]),"circle-color":new _0x5678d2(_0x5f2c0a.paint_circle["circle-color"]),"circle-blur":new _0x5678d2(_0x5f2c0a.paint_circle["circle-blur"]),"circle-opacity":new _0x5678d2(_0x5f2c0a.paint_circle["circle-opacity"]),"circle-translate":new _0x3f772a(_0x5f2c0a.paint_circle["circle-translate"]),"circle-translate-anchor":new _0x3f772a(_0x5f2c0a.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new _0x3f772a(_0x5f2c0a.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new _0x3f772a(_0x5f2c0a.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new _0x5678d2(_0x5f2c0a.paint_circle["circle-stroke-width"]),"circle-stroke-color":new _0x5678d2(_0x5f2c0a.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new _0x5678d2(_0x5f2c0a.paint_circle["circle-stroke-opacity"])}),_0x5182ec={paint:_0x564b56,layout:_0xc684e3},_0x252c8a=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x5182ec)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.createBucket=function(e){return new _0x20263c(e)},r.prototype.queryRadius=function(e){var t=e;return _0x4191d9.getMaximumPaintValue("circle-radius",this,t)+_0x4191d9.getMaximumPaintValue("circle-stroke-width",this,t)+_0x4191d9.translateDistance(this.paint.get("circle-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a,s,l){s=_0x4840f3();for(var u=_0x4191d9.translate(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),0,a),c=this.paint.get("circle-radius")?.evaluate(t,i),h=this.paint.get("circle-stroke-width")?.evaluate(t,i),d=c+h,f="map"===this.paint.get("circle-pitch-alignment"),p=f?u:_0x5d2297(u,s),_=f?d*a:d,m=0,g=n;mthis._skuTokenExpiresAt},_0x414e6d.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},_0x414e6d.prototype.normalizeStyleURL=function(e,t){if(!_0x5c3cdd(e))return e;const i=_0x4371bb(e);return i.path="/styles/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||t)},_0x414e6d.prototype.normalizeGlyphsURL=function(e,t){if(!_0x5c3cdd(e))return e;const i=_0x4371bb(e);return i.path="/fonts/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||t)},_0x414e6d.prototype.normalizeSourceURL=function(e,t){if(!_0x5c3cdd(e))return e;const i=_0x4371bb(e);return i.path="/v4/"+i.authority+".json",i.params.push("secure"),this._makeAPIURL(i,this._customAccessToken||t)},_0x414e6d.prototype.normalizeSpriteURL=function(e,t,i,n){const r=_0x4371bb(e);return _0x5c3cdd(e)?(r.path="/styles/v1"+r.path+"/sprite"+t+i,this._makeAPIURL(r,this._customAccessToken||n)):(r.path+=""+t+i,_0xfd6057(r))},_0x414e6d.prototype.normalizeTileURL=function(e,t,i){if(this._isSkuTokenExpired()&&this._createSkuToken(),!t||!_0x5c3cdd(t))return e;const n=_0x4371bb(e),r=browser.devicePixelRatio>=2||512===i?"@2x":"",o=webpSupported.supported?".webp":"$1";return n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+r+o),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path,config.REQUIRE_ACCESS_TOKEN&&(config.ACCESS_TOKEN||this._customAccessToken)&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,this._customAccessToken)},_0x414e6d.prototype.canonicalizeTileURL=function(e){const t=_0x4371bb(e);if(!t.path.match(/(^\/v4\/)/)||!t.path.match(/\.[\w]+$/))return e;let i="mapbox://tiles/";i+=t.path.replace("/v4/","");const n=t.params.filter((e=>!e.match(/^access_token=/)));return n.length&&(i+="?"+n.join("&")),i},_0x414e6d.prototype.canonicalizeTileset=function(e,t){if(!_0x5c3cdd(t))return e.tiles||[];const i=[];for(const t of e.tiles){const e=this.canonicalizeTileURL(t);i.push(e)}return i},_0x414e6d.prototype._makeAPIURL=function(e,t){const i=_0x4371bb(config.API_URL);if(e.protocol=i.protocol,e.authority=i.authority,"/"!==i.path&&(e.path=""+i.path+e.path),!config.REQUIRE_ACCESS_TOKEN)return _0xfd6057(e);if(!(t=t||config.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. ");if("s"===t[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ");return e.params=e.params.filter((e=>-1===e.indexOf("access_token"))),e.params.push("access_token="+t),_0xfd6057(e)};const _0x4395bd=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function _0x2a0fa3(e){return _0x4395bd.test(e)}function _0x6ec2a5(e){return e.indexOf("sku=")>0&&_0x2a0fa3(e)}const _0x5da7e2=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function _0x4371bb(e){const t=e.match(_0x5da7e2);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function _0xfd6057(e){const t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}const _0x5c6a7c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1ca61f=_0x5c6a7c(void 0,(function(){return _0x1ca61f.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ca61f).search("(((.+)+)+)+$")}));_0x1ca61f();const _0x2e1002="mapbox-tiles",_0x43826e=42e4;let _0x40ba08;function _0x19b03e(e,t){if(void 0===_0x40ba08)try{new Response(new ReadableStream),_0x40ba08=!0}catch(e){_0x40ba08=!1}_0x40ba08?t(e.body):e.blob().then(t)}function cachePut(e,t,i){if(!window.caches)return;const n={status:t.status,statusText:t.statusText,headers:new window.Headers};t.headers.forEach(((e,t)=>n.headers.set(t,e)));const r=parseCacheControl(t.headers.get("Cache-Control")||"");if(r["no-store"])return;r["max-age"]&&n.headers.set("Expires",new Date(i+1e3*r["max-age"]).toUTCString());new Date(n.headers.get("Expires")).getTime()-i<_0x43826e||_0x19b03e(t,(t=>{const i=new window.Response(t,n);window.caches.open(_0x2e1002).then((t=>t.put(_0xd811c4(e.url),i)))}))}function _0xd811c4(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function cacheGet(e,t){if(!window.caches)return t(null);const i=_0xd811c4(e.url);window.caches.open(_0x2e1002).catch(t).then((e=>{e.match(i).catch(t).then((n=>{const r=_0x1350a9(n);e.delete(i),r&&e.put(i,n.clone()),t(null,n,r)}))}))}function _0x1350a9(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")),i=parseCacheControl(e.headers.get("Cache-Control")||"");return t>Date.now()&&!i["no-cache"]}const _0x5af467=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x94b617=_0x5af467(void 0,(function(){return _0x94b617.toString().search("(((.+)+)+)+$").toString().constructor(_0x94b617).search("(((.+)+)+)+$")}));_0x94b617();const _0x179804={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(_0x179804);class _0x2747e6 extends Error{constructor(e,t,i){401===t&&_0x2a0fa3(i)&&(e+=": you may have provided an invalid Mapbox access token."),super(e),this.status=t,this.url=i,this.name=this.constructor.name,this.message=e}toString(){return this.name+": "+this.message+" ("+this.status+"): "+this.url}}const getReferrer=isWorker()?()=>self.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href,_0x43fcb4=e=>/^file:/.test(e)||/^file:/.test(getReferrer())&&!/^\w+:/.test(e);function _0x38552b(e,t){const i=isWorker()?self:window,n=new i.AbortController,r=new i.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:getReferrer(),signal:n.signal});let o=!1,a=!1;const s=_0x6ec2a5(r.url);"json"===e.type&&r.headers.set("Accept","application/json");const l=(n,o,l)=>{if(a)return;if(n&&"SecurityError"!==n.message&&warnOnce(n),o&&l)return u(o);const c=Date.now();i.fetch(r).then((i=>{if(i.ok){const e=s?i.clone():null;return u(i,e,c)}return t(new _0x2747e6(i.statusText,i.status,e.url))})).catch((e=>{20!==e.code&&t(new Error(e.message))}))},u=(i,n,s)=>{("arrayBuffer"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text()).then((e=>{a||(n&&s&&cachePut(r,n,s),o=!0,t(null,e,i.headers.get("Cache-Control"),i.headers.get("Expires")))})).catch((e=>t(new Error(e.message))))};return s?cacheGet(r,l):l(null,null),{cancel:()=>{a=!0,o||n.abort()}}}function _0x5e2201(e,t){const i=new((isWorker()?self:window).XMLHttpRequest);i.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(i.responseType="arraybuffer");for(const t in e.headers)i.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=()=>{t(new Error(i.statusText))},i.onload=()=>{if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){let n=i.response;if("json"===e.type)try{n=JSON.parse(i.response)}catch(e){return t(e)}t(null,n,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else t(new _0x2747e6(i.statusText,i.status,e.url))},i.send(e.body),{cancel:()=>i.abort()}}const makeRequest=function(e,t){const i=isWorker()?self:window;if(!_0x43fcb4(e.url)){if(i.fetch&&i.Request&&i.AbortController&&i.Request.prototype.hasOwnProperty("signal"))return _0x38552b(e,t);if(isWorker()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}return _0x5e2201(e,t)},getJSON=function(e,t){return makeRequest(extend$1(e,{type:"json"}),t)},getArrayBuffer=function(e,t){return makeRequest(extend$1(e,{type:"arrayBuffer"}),t)},_0x3c85d7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let _0x4da4f,_0x48a444;const resetImageRequestQueue=()=>{_0x4da4f=[],_0x48a444=0};resetImageRequestQueue();const _0x31f447=16,getImage=function(e,t){if(_0x48a444>=_0x31f447){const i={requestParameters:e,callback:t,cancelled:!1,cancel(){this.cancelled=!0}};return _0x4da4f.push(i),i}_0x48a444++;let i=!1;const n=()=>{if(!i)for(i=!0,_0x48a444--;_0x4da4f.length&&_0x48a444<_0x31f447;){const e=_0x4da4f.shift(),{requestParameters:t,callback:i,cancelled:n}=e;!n&&(e.cancel=getImage(t,i).cancel)}},r=getArrayBuffer(e,((e,i,r,o)=>{if(n(),e)t(e);else if(i){const e=new window.Image,n=window.URL||window.webkitURL;e.onload=()=>{t(null,e),n.revokeObjectURL(e.src)},e.onerror=()=>t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const a=new window.Blob([new Uint8Array(i)],{type:"image/png"});e.cacheControl=r,e.expires=o,e.src=i.byteLength?n.createObjectURL(a):_0x3c85d7}}));return{cancel:()=>{r.cancel(),n()}}},_0x1f28e7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3f73f1=_0x1f28e7(void 0,(function(){return _0x3f73f1.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f73f1).search("(((.+)+)+)+$")}));_0x3f73f1();const symbolLayoutAttributes=_0x55f30f([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),dynamicLayoutAttributes=_0x55f30f([{name:"a_projected_pos",components:3,type:"Float32"}],4);_0x55f30f([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),_0x55f30f([{name:"a_fade_opacity",components:1,type:"Float32"}],4);const collisionVertexAttributes=_0x55f30f([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);_0x55f30f([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]);const collisionBoxLayout=_0x55f30f([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),collisionCircleLayout=_0x55f30f([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);_0x55f30f([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),_0x55f30f([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"}]),_0x55f30f([{type:"Float32",name:"offsetX"}]),_0x55f30f([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var _0x2dd86a=(_0x4384ca=!0,function(e,t){var i=_0x4384ca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4384ca=!1,i}),_0x59b558=_0x2dd86a(void 0,(function(){return _0x59b558.toString().search("(((.+)+)+)+$").toString().constructor(_0x59b558).search("(((.+)+)+)+$")})),_0x4384ca;_0x59b558();var _0x92a370={"Latin-1 Supplement":function(e){return e>=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};const _0x2523f1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x15817a=_0x2523f1(void 0,(function(){return _0x15817a.toString().search("(((.+)+)+)+$").toString().constructor(_0x15817a).search("(((.+)+)+)+$")}));function allowsVerticalWritingMode(e){for(const t of e)if(charHasUprightVerticalOrientation(t.charCodeAt(0)))return!0;return!1}function charHasUprightVerticalOrientation(e){return 746===e||747===e||!(e<4352)&&(!!_0x92a370["Bopomofo Extended"](e)||(!!_0x92a370.Bopomofo(e)||(!(!_0x92a370["CJK Compatibility Forms"](e)||e>=65097&&e<=65103)||(!!_0x92a370["CJK Compatibility Ideographs"](e)||(!!_0x92a370["CJK Compatibility"](e)||(!!_0x92a370["CJK Radicals Supplement"](e)||(!!_0x92a370["CJK Strokes"](e)||(!(!_0x92a370["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||(!!_0x92a370["CJK Unified Ideographs Extension A"](e)||(!!_0x92a370["CJK Unified Ideographs"](e)||(!!_0x92a370["Enclosed CJK Letters and Months"](e)||(!!_0x92a370["Hangul Compatibility Jamo"](e)||(!!_0x92a370["Hangul Jamo Extended-A"](e)||(!!_0x92a370["Hangul Jamo Extended-B"](e)||(!!_0x92a370["Hangul Jamo"](e)||(!!_0x92a370["Hangul Syllables"](e)||(!!_0x92a370.Hiragana(e)||(!!_0x92a370["Ideographic Description Characters"](e)||(!!_0x92a370.Kanbun(e)||(!!_0x92a370["Kangxi Radicals"](e)||(!!_0x92a370["Katakana Phonetic Extensions"](e)||(!(!_0x92a370.Katakana(e)||12540===e)||(!(!_0x92a370["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||(!(!_0x92a370["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||(!!_0x92a370["Unified Canadian Aboriginal Syllabics"](e)||(!!_0x92a370["Unified Canadian Aboriginal Syllabics Extended"](e)||(!!_0x92a370["Vertical Forms"](e)||(!!_0x92a370["Yijing Hexagram Symbols"](e)||(!!_0x92a370["Yi Syllables"](e)||!!_0x92a370["Yi Radicals"](e))))))))))))))))))))))))))))))}function charInRTLScript(e){return e>=1424&&e<=2303||_0x92a370["Arabic Presentation Forms-A"](e)||_0x92a370["Arabic Presentation Forms-B"](e)}function stringContainsRTLText(e){for(const t of e)if(charInRTLScript(t.charCodeAt(0)))return!0;return!1}_0x15817a();const _0x3b9538=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2aaf82=_0x3b9538(void 0,(function(){return _0x2aaf82.toString().search("(((.+)+)+)+$").toString().constructor(_0x2aaf82).search("(((.+)+)+)+$")}));_0x2aaf82();const verticalizedCharacterMap={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var _0x374cbf=(_0x31cd03=!0,function(e,t){var i=_0x31cd03?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31cd03=!1,i}),_0x55eca9=_0x374cbf(void 0,(function(){return _0x55eca9.toString().search("(((.+)+)+)+$").toString().constructor(_0x55eca9).search("(((.+)+)+)+$")})),_0x31cd03;_0x55eca9();var _0x484b1f=(_0x17544a=!0,function(e,t){var i=_0x17544a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17544a=!1,i}),_0x544229=_0x484b1f(void 0,(function(){return _0x544229.toString().search("(((.+)+)+)+$").toString().constructor(_0x544229).search("(((.+)+)+)+$")})),_0x17544a;function _0x33fa69(e){var t={},i={},n=[],r=0;function o(t){n.push(e[t]),r++}function a(e,t,r){var o=i[e];return delete i[e],i[t]=o,n[o].geometry[0].pop(),n[o].geometry[0]=n[o].geometry[0].concat(r[0]),o}function s(e,i,r){var o=t[i];return delete t[i],t[e]=o,n[o].geometry[0].shift(),n[o].geometry[0]=r[0].concat(n[o].geometry[0]),o}function l(e,t,i){var n=i?t[0][t[0].length-1]:t[0][0];return e+":"+n.x+":"+n.y}for(var u=0;u(_0x1ddc64||(_0x1ddc64=window.document.createElement("a")),_0x1ddc64.href=e,_0x1ddc64.href),hardwareConcurrency:window.navigator.hardwareConcurrency||4,get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(null==_0x43cd3a&&(_0x43cd3a=window.matchMedia("(prefers-reduced-motion: reduce)")),_0x43cd3a.matches)}},_0x2efb5c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xd8df4a=_0x2efb5c(void 0,(function(){return _0xd8df4a.toString().search("(((.+)+)+)+$").toString().constructor(_0xd8df4a).search("(((.+)+)+)+$")}));_0xd8df4a();var _0x5033e4=(_0x2aad13=!0,function(e,t){var i=_0x2aad13?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2aad13=!1,i}),_0x5f18da=_0x5033e4(void 0,(function(){return _0x5f18da.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f18da).search("(((.+)+)+)+$")})),_0x2aad13;_0x5f18da();var _0x1133e7=(_0x164874=!0,function(e,t){var i=_0x164874?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x164874=!1,i}),_0x416482=_0x1133e7(void 0,(function(){return _0x416482.toString().search("(((.+)+)+)+$").toString().constructor(_0x416482).search("(((.+)+)+)+$")})),_0x164874;_0x416482();var _0x3122f8=function(e,t){_0x328301(this,e,1,t)};function _0x328301(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function _0xeefbad(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=_0x328301({},{width:n,height:r},i);_0x217e88(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function _0x217e88(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;li;){if(n-i>600){var o=n-i+1,a=t-i+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);x$Z(e,t,Math.max(i,Math.floor(t-a*l/o+u)),Math.min(n,Math.floor(t+(o-a)*l/o+u)),r)}var c=e[t],h=i,d=n;for(e$1f(e,i,t),r(e[n],c)>0&&e$1f(e,i,n);h0;)d--}0===r(e[i],c)?e$1f(e,i,d):e$1f(e,++d,n),d<=t&&(i=d+1),t<=d&&(n=d-1)}}function e$1f(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function C$V(e,t){return et?1:0}_0x1e820d();var _0x8b9044=(_0x1f8e56=!0,function(e,t){var i=_0x1f8e56?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f8e56=!1,i}),_0x5b8917=_0x8b9044(void 0,(function(){return _0x5b8917.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b8917).search("(((.+)+)+)+$")})),_0x1f8e56;function _0x1a1728(e){for(var t=0,i=0,n=e.length,r=n-1,o=void 0,a=void 0;i1)for(var l=0;li in e?String(e[i]):""))}_0x3e28c4();var _0x469210={kind:"color"},_0x2bf078={kind:"formatted"},_0x5008aa=new _0x3699c0({"symbol-placement":new _0x3f772a(_0x5f2c0a.layout_symbol["symbol-placement"]),"symbol-spacing":new _0x3f772a(_0x5f2c0a.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new _0x3f772a(_0x5f2c0a.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new _0x5678d2(_0x5f2c0a.layout_symbol["symbol-sort-key"]),"symbol-z-order":new _0x3f772a(_0x5f2c0a.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-ignore-placement"]),"icon-optional":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-optional"]),"icon-rotation-alignment":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-rotation-alignment"]),"icon-size":new _0x5678d2(_0x5f2c0a.layout_symbol["icon-size"]),"icon-text-fit":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-text-fit-padding"]),"icon-image":new _0x5678d2(_0x5f2c0a.layout_symbol["icon-image"]),"icon-rotate":new _0x5678d2(_0x5f2c0a.layout_symbol["icon-rotate"]),"icon-padding":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-padding"]),"icon-keep-upright":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-keep-upright"]),"icon-offset":new _0x5678d2(_0x5f2c0a.layout_symbol["icon-offset"]),"icon-anchor":new _0x5678d2(_0x5f2c0a.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new _0x3f772a(_0x5f2c0a.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new _0x3f772a(_0x5f2c0a.layout_symbol["text-rotation-alignment"]),"text-field":new _0x5678d2(_0x5f2c0a.layout_symbol["text-field"]),"text-font":new _0x5678d2(_0x5f2c0a.layout_symbol["text-font"]),"text-size":new _0x5678d2(_0x5f2c0a.layout_symbol["text-size"]),"text-max-width":new _0x5678d2(_0x5f2c0a.layout_symbol["text-max-width"]),"text-line-height":new _0x3f772a(_0x5f2c0a.layout_symbol["text-line-height"]),"text-letter-spacing":new _0x5678d2(_0x5f2c0a.layout_symbol["text-letter-spacing"]),"text-justify":new _0x5678d2(_0x5f2c0a.layout_symbol["text-justify"]),"text-radial-offset":new _0x5678d2(_0x5f2c0a.layout_symbol["text-radial-offset"]),"text-variable-anchor":new _0x3f772a(_0x5f2c0a.layout_symbol["text-variable-anchor"]),"text-anchor":new _0x5678d2(_0x5f2c0a.layout_symbol["text-anchor"]),"text-max-angle":new _0x3f772a(_0x5f2c0a.layout_symbol["text-max-angle"]),"text-writing-mode":new _0x3f772a(_0x5f2c0a.layout_symbol["text-writing-mode"]),"text-rotate":new _0x5678d2(_0x5f2c0a.layout_symbol["text-rotate"]),"text-padding":new _0x3f772a(_0x5f2c0a.layout_symbol["text-padding"]),"text-keep-upright":new _0x3f772a(_0x5f2c0a.layout_symbol["text-keep-upright"]),"text-transform":new _0x5678d2(_0x5f2c0a.layout_symbol["text-transform"]),"text-offset":new _0x5678d2(_0x5f2c0a.layout_symbol["text-offset"]),"text-allow-overlap":new _0x3f772a(_0x5f2c0a.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new _0x3f772a(_0x5f2c0a.layout_symbol["text-ignore-placement"]),"text-optional":new _0x3f772a(_0x5f2c0a.layout_symbol["text-optional"])}),_0x2c781b=new _0x3699c0({"icon-opacity":new _0x5678d2(_0x5f2c0a.paint_symbol["icon-opacity"]),"icon-color":new _0x5678d2(_0x5f2c0a.paint_symbol["icon-color"]),"icon-halo-color":new _0x5678d2(_0x5f2c0a.paint_symbol["icon-halo-color"]),"icon-halo-width":new _0x5678d2(_0x5f2c0a.paint_symbol["icon-halo-width"]),"icon-halo-blur":new _0x5678d2(_0x5f2c0a.paint_symbol["icon-halo-blur"]),"icon-translate":new _0x3f772a(_0x5f2c0a.paint_symbol["icon-translate"]),"icon-translate-anchor":new _0x3f772a(_0x5f2c0a.paint_symbol["icon-translate-anchor"]),"text-opacity":new _0x5678d2(_0x5f2c0a.paint_symbol["text-opacity"]),"text-color":new _0x5678d2(_0x5f2c0a.paint_symbol["text-color"],{runtimeType:_0x469210,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new _0x5678d2(_0x5f2c0a.paint_symbol["text-halo-color"]),"text-halo-width":new _0x5678d2(_0x5f2c0a.paint_symbol["text-halo-width"]),"text-halo-blur":new _0x5678d2(_0x5f2c0a.paint_symbol["text-halo-blur"]),"text-show-background":new _0x5678d2(_0x5f2c0a.paint_symbol["text-show-background"]),"text-translate":new _0x3f772a(_0x5f2c0a.paint_symbol["text-translate"]),"text-translate-anchor":new _0x3f772a(_0x5f2c0a.paint_symbol["text-translate-anchor"])}),_0x2fddb8={paint:_0x2c781b,layout:_0x5008aa},_0x55bb54=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x2fddb8)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){if(e.prototype.recalculate.call(this,t,i),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var r=[],o=0,a=n;o0&&(this.layoutVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.layoutVertexArray,symbolLayoutAttributes.members)),this.indexArray.length>0&&(this.indexBuffer=_0x3cb0f8.toIndexBuffer(e,this.indexArray,t)),this.dynamicLayoutVertexArray.length>0&&(this.dynamicLayoutVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.dynamicLayoutVertexArray,dynamicLayoutAttributes.members,!0)),this.opacityVertexArray.length>0&&(this.opacityVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.opacityVertexArray,_0x321e86,!0),this.opacityVertexBuffer.itemSize=1)),(i||n)&&this.programConfigurations.upload(e)},_0x1057d7.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.dynamicLayoutVertexBuffer&&(this.dynamicLayoutVertexBuffer.destroy(),this.dynamicLayoutVertexBuffer=null),this.opacityVertexBuffer&&(this.opacityVertexBuffer.destroy(),this.opacityVertexBuffer=null),this.programConfigurations.destroy(),this.segments.destroy()},_0x1057d7.prototype.clear=function(){},_0x416c3b.register("SymbolBuffers",_0x1057d7);var _0x365954=function(e,t,i){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new i,this.segments=new _0x4b6d5a,this.collisionVertexArray=new _0x544f54};_0x365954.prototype.upload=function(e){this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.layoutVertexArray,this.layoutAttributes)),this.indexArray.length>0&&(this.indexBuffer=_0x3cb0f8.toIndexBuffer(e,this.indexArray)),this.collisionVertexArray.length>0&&(this.collisionVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.collisionVertexArray,collisionVertexAttributes.members,!0))},_0x365954.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.collisionVertexBuffer&&(this.collisionVertexBuffer.destroy(),this.collisionVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.segments.destroy()},_0x416c3b.register("CollisionBuffers",_0x365954);var _0x3dd3b7=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasPaintOverrides=!1,this.hasRTLText=!1;var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=_0x3f30ab(this.zoom,t["text-size"]),this.iconSizeData=_0x3f30ab(this.zoom,t["icon-size"]);var i=this.layers[0].layout,n=i.get("symbol-sort-key"),r=i.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==r&&void 0!==n.constantOr(1);var o="viewport-y"===r||"auto"===r&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map((function(e){return _0x38221e[e]}))),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id})),this.sourceID=e.sourceID,this.overscaling=1};_0x3dd3b7.prototype.createArrays=function(){const e=this.layers[0].layout;this.hasPaintOverrides=_0x55bb54.hasPaintOverrides(e);var t=symbolLayoutAttributes.members;this.text=new _0x1057d7(new ProgramConfigurationSet(t,this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new _0x1057d7(new ProgramConfigurationSet(t,this.layers,this.zoom,(e=>/^icon/.test(e)))),this.textCollisionBox=new _0x365954(_0xc3bbd1,collisionBoxLayout.members,_0x229baa),this.iconCollisionBox=new _0x365954(_0xc3bbd1,collisionBoxLayout.members,_0x229baa),this.textCollisionCircle=new _0x365954(_0xc3bbd1,collisionCircleLayout.members,_0xbd6def),this.iconCollisionCircle=new _0x365954(_0xc3bbd1,collisionCircleLayout.members,_0xbd6def),this.glyphOffsetArray=new _0x3b99b6,this.lineVertexArray=new _0x2cb00b,this.symbolInstances=new _0x1ec10f},_0x3dd3b7.prototype.calculateGlyphDependencies=function(e,t,i,n,r){for(let o=0;o0)&&("constant"!==r.value.kind||r.value.value.length>0),l=("constant"!==a.value.kind||!!a.value.value)&&Object.keys(a.parameters).length>0,u=n.get("symbol-sort-key");if(this.features=[],s||l){for(var c=t.iconDependencies,h=t.glyphDependencies,d=t.availableImages,f=new _0x4f93ac(this.zoom),p=0,_=e;p<_.length;p+=1){var m=_[p],g=m.feature,x=m.index,v=m.sourceLayerIndex;if(i._featureFilter(f,g)){var y=void 0;if(s){var $=i.getValueAndResolveTokens("text-field",g,d),b=_0x2683dd.factory($);_0x2ab5fc(b)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===getRTLTextPluginStatus()||this.hasRTLText&&plugin.isParsed())&&(y=_0x342adb(b,i,g))}var T=void 0;if(l){var C=i.getValueAndResolveTokens("icon-image",g,d);T=C instanceof _0x313b86?C:_0x313b86.fromString(C)}if(y||T){var S=this.sortFeaturesByKey?u.evaluate(g,{}):void 0,w={text:y,icon:T,index:x,sourceLayerIndex:v,geometry:_0x1724dc(g),properties:g.properties,type:_0x120f9a[g.type],sortKey:S};if(void 0!==g.id&&(w.id=g.id),this.features.push(w),T&&(c[T.name]=!0),y){var E=r.evaluate(g,{}).join(","),P="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(_0x38221e.vertical)>=0;for(var A=0,L=y.sections;A=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:r},s>0&&(r+=t[s-1].dist(t[s]));for(var l=0;l0;this.addCollisionDebugVertices(a,s,l,u,c?n?this.textCollisionCircle:this.iconCollisionCircle:n?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,i,c)}},_0x3dd3b7.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e0},_0x3dd3b7.prototype.hasIconData=function(){return this.icon.segments.get().length>0},_0x3dd3b7.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},_0x3dd3b7.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},_0x3dd3b7.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},_0x3dd3b7.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},_0x3dd3b7.prototype.addIndicesForPlacedSymbol=function(e,t){for(var i=e.placedSymbolArray.get(t),n=i.vertexStartIndex+4*i.numGlyphs,r=i.vertexStartIndex;r1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var i=0,n=this.symbolInstanceIndexes;i=0&&n.indexOf(e)===i&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},_0x416c3b.register("SymbolBucket",_0x3dd3b7,{omit:["layers","collisionBoxArray","compareText"]}),_0x3dd3b7.MAX_GLYPHS=65535,_0x3dd3b7.addDynamicAttributes=_0x4cf153;var _0x52096d=_0x3dd3b7,_0x357aca=!1,_0x4276c1=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n,r,o){this.isMVT=!0,this.mvtProvider=t.imageryProvider,this.tileSize=this.mvtProvider._canvasWidth,this._painter=this.mvtProvider._painter,this._MVTStyle=this.mvtProvider._MVTStyle,this.dispatcher=this._MVTStyle.dispatcher,this._MVTLabel=new _0x24125a(this.mvtProvider),this.highLighting=!1,this._visible=!1,this.working=!1,this.repaintWorking=!1,this.layersToUpdate=[],this.removedIds=[],this.imageryNeedToRender={},e.call(this,t,i,n,r,o),this._isToReRender=!1,this.frameState=null,this.realtime=this.mvtProvider.realtime,this.zoomLevel=-1,this.lastCameraZoomLevel=-1,this._passState=new n$Z,this._passState.viewport=new f$18,this.hasRawData=!1,this.uid=uniqueId()}function o(e){var t=e.mvtProvider._maxImageCacheLevel-e.level,i=0,n=!1,r=e.imageryLayer._detailLevelOffset;if(t0&&(r=!1);var o=null;for(;!r&&e$2b(i);)n>=t&&((r=i.hasRawData)&&(o=i)),i=i.parent,n++;return o}(e,i);return!e$2b(o)&&e.hasRawData?e:o}return e}function a(e){return{param:{featureIndex:e.featureIndex,tileID:{x:e.requestX,y:e.requestY,z:e.requestZ},indexData:e.indexData,pickId:e.pickId,webgpu:_0x357aca,type:"vector",source:e.mvtProvider.name,uid:e.uid,request:e.mvtProvider._requestManager.transformRequest(e.requestUrl,_0x179804.Tile)},transferableObjects:[]}}function s(e,t,i){e.setBuckets(t.buckets),e.imageAtlas=t.imageAtlas,e.featureIndex=t.featureIndex,e.featureIndex.rawTileData=t.rawTileData,e.glyphAtlasImage=t.glyphAtlasImage,i?e.repaintWorking=!1:e.working=!1}function l(e,t){var i=m(e.rectangle,t.rectangle),n=e.level,r=1;if(t.realtime){var o=t.frameState.camera;e$2b(o.zoomLevel)&&o.zoomLevel!=1/0&&(n=o.zoomLevel,t.zoomLevel=n)}else r=Math.pow(2,t.level-e.level);e.targetTileSize=e.tileSize*r,u(e,t,i,n),t.state!=wt$6.READY&&(t.state=wt$6.RENDERED),c(t)}function u(e,t,i,n){var r=e._painter;for(var o in e.buckets){var a=e.buckets[o];if(a instanceof _0x52096d)if(!("point"!==e._MVTStyle._layers[o].layout.get("symbol-placement")))continue;a.upload(r.cesiumContext)}e$2b(e.imageAtlas)&&!e$2b(e.imageAtlasTexture)&&(e.imageAtlasTexture=new _0x6d753e(r.context,r.cesiumContext,e.imageAtlas.image,V$10.RGBA),e.cesiumImageAtlas=new v$I({pixelFormat:V$10.RGBA,context:r.cesiumContext}),e.cesiumImageAtlas._texture=e.imageAtlasTexture.cesiumTexture),e.glyphAtlasImage&&(e.glyphAtlasTexture=new _0x6d753e(r.context,r.cesiumContext,e.glyphAtlasImage,r.cesiumContext.webgpu?V$10.RED:V$10.ALPHA),e.glyphAtlasImage=null,e.cesiumGlyphAtlas=new v$I({pixelFormat:V$10.ALPHA,context:r.cesiumContext}),e.cesiumGlyphAtlas._texture=e.glyphAtlasTexture.cesiumTexture),e.viewProjection=i;var s=e$2b(e.context)?e.context:t.context,l=t.level,u=t.texture||t.textureWebMercator;t._passState.context=s,t._passState.viewport.x=0,t._passState.viewport.y=0,t._passState.viewport.width=u.width,t._passState.viewport.height=u.height;var c=u.width+"_"+u.height;!e$2b(e.mvtProvider._renderTextureList[c])&&(e.mvtProvider._renderTextureList[c]=new t$V({context:s,width:u.width,height:u.height,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8}));var h=e.mvtProvider._renderTextureList[c];!t._framebuffer&&(t._framebuffer=new t$W({context:s,colorTextures:[u],depthStencilTexture:h})),t._passState.framebuffer=t._framebuffer;try{r.renderOneTile(e._MVTStyle,e,{targetTileLevel:l,finestRenderLevel:e.mvtProvider.maximumLevel,zoom:n,lineAntialiasing:e.mvtProvider.lineAntialiasing?1:0,passState:t._passState})}catch(e){console.log(e)}s.webgpu&&s.engine.flushFramebuffer()}function c(e){e.highLighting=!1,e.imageryLayer._finalizeReprojectTexture(e.context,e.texture||e.textureWebMercator)}n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.processStateMachine=function(e,t,i){this.frameState=e,this.context=e.context,_0x357aca=e.context.webgpu,this.state===wt$6.UNLOADED&&!i&&!this.imageryLayer._pausing&&(this.state=wt$6.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===wt$6.RECEIVED&&(this.state=wt$6.TRANSITIONING,this.indexData=this.image.indexData,this.image,this.imageryLayer._createTexture(e.context,this,e)),this.state===wt$6.TEXTURE_LOADED&&function(e){var t=o(e);if(!e$2b(t))return e.highLighting=!1,void console.log("MVTImagery has no rawData.");var i=g(e.x,e.y,e.level);if(t.imageryNeedToRender[i]=e,e$2b(t.buckets)&&!t.repaintWorking&&!t._isToReRender)return void l(t,e);if(!t.working){if(t.repaintWorking||t._isToReRender)return;var n=a(t);function r(e,i){delete t.request,e?(console.log("loadTile tile error in worker"),t.state=wt$6.FAILED):s(t,i,!1)}t.working=!0,!t.actor&&(t.actor=t.dispatcher.getActor()),t.request=t.actor.send("loadTile",n.param,r.bind(this))}}(this);var n=this.state===wt$6.READY&&t&&!this.texture;(this.state===wt$6.RENDERED||n)&&(this.state=wt$6.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))},r.prototype.addRepaintTask=function(e,t,i){var n={};this.layersToUpdate.map((function(e){n[e.id]=!0}));var r=this;e.map((function(e){!e$2b(n[e.id])&&r.layersToUpdate.push(e)})),this.removedIds=t,this.highLighting=i},r.prototype.clearRepaintTask=function(){this.layersToUpdate=[],this.removedIds=[]},r.prototype.update=function(){this.repaint()},r.prototype.setBuckets=function(e){var t=this.buckets;if(e$2b(t))for(var i in e){if(e$2b(t[i]))t[i].destroy(),t[i]=e[i];else t[i]=e[i]}else this.buckets=e},r.prototype.repaint=function(){this.state===wt$6.READY&&(this._isToReRender&&function(e){var t=o(e);if(!e$2b(t))return;var i=g(e.x,e.y,e.level);if(e._isToReRender&&!e.working&&(l(t,e),e._setNeedReRender(!1),e$2b(t.imageryNeedToRender[i])&&delete t.imageryNeedToRender[i],0==Object.getOwnPropertyNames(t.imageryNeedToRender).length&&e$2b(t.buckets)))for(var n in t.buckets){t.buckets[n].clear()}}(this),(this.layersToUpdate.length>0||this.removedIds.length>0)&&function(e){var t=o(e);if(!e$2b(t))return e.clearRepaintTask(),void(e.highLighting=!1);var i=g(e.x,e.y,e.level),n=e.layersToUpdate;if(t.imageryNeedToRender[i]=e,t.repaintWorking){if(!t.IsPickIdSameWithCurrentPickID())return;e.clearRepaintTask()}else{if(t.working)return;n.length>0&&n[0].id.indexOf("_highlight")>-1?t.pickId=n[0].id+n[0].filter[2]:t.pickId=void 0;var r=a(t);e.clearRepaintTask(),t.repaintWorking=!0,!t.actor&&(t.actor=t.dispatcher.getActor());var l=t.featureIndex.rawTileData;function u(i,n){if(delete t.request,i)console.log("reloadTile tile error in worker");else{if(s(t,n,!0),e.featureIndex.rawTileData=l,!t.IsPickIdSameWithCurrentPickID())return;if(!t.isDestroyed())for(var r in t.imageryNeedToRender)!t.imageryNeedToRender[r].isDestroyed()&&t.imageryNeedToRender[r]._setNeedReRender(!0)}}t.request=t.actor.send("reloadTile",r.param,u.bind(this))}}(this))},r.prototype._setNeedReRender=function(e){this._isToReRender=e,this._MVTLabel._setNeedReRender(e)},r.prototype.realtimeRender=function(){if(this.state===wt$6.READY&&this.realtime&&function(e){var t=e.frameState.camera;if(!e$2b(t.zoomLevel)||t.zoomLevel==1/0)return!1;var i=!1;e.lastCameraZoomLevel!=t.zoomLevel&&(i=!0),e.lastCameraZoomLevel=t.zoomLevel;var n=Math.abs(e.zoomLevel-t.zoomLevel);return!(n<.2&&i)&&0!=n}(this)){var e=o(this);e$2b(e)&&e$2b(e.buckets)&&!this.working&&function(e,t){var i=t.frameState.camera,n=void 0;if(!e$2b(i.zoomLevel))return;n=i.zoomLevel;var r=m(e.rectangle,t.rectangle);e.mvtProvider._context,e.targetTileSize=e.tileSize,u(e,t,r,n),c(t),t.zoomLevel=n}(e,this)}},r.prototype.IsPickIdSameWithCurrentPickID=function(){return!e$2b(this.mvtProvider._currentPickID)||!e$2b(this.pickId)||this.mvtProvider._currentPickID===this.pickId},r.prototype.setVisible=function(e){this._visible=e},r.prototype.getBucket=function(e){return e$2b(e.bucketName)?this.buckets[e.bucketName]:this.buckets[e.id]};var h=new p$1d,d=new p$1d,f=new o$1p(0,0,-1),p=new o$1p(0,1,0),_=new o$1p;function m(e,t){var i=t.width/e.width;t.height,e.height;var n=ae$s*i,r=.5*-n,o=.5*n,a=.5*-n,s=.5*n;h=p$1d.computeOrthographicOffCenter(r,o,a,s,-1,400,h);var l=new o$1p(.5*((t.west-e.west)/e.width*ae$s+(t.east-e.west)/e.width*ae$s),.5*((t.north-e.south)/e.height*ae$s+(t.south-e.south)/e.height*ae$s),200);d=p$1d.computeView(l,f,p,_,d);var u=new p$1d;return p$1d.multiply(h,d,u),u}function g(e,t,i){return JSON.stringify([e,t,i])}return _=o$1p.cross(f,p,_),r.prototype.queryRenderedFeatures=function(e,t,i){if(!e$2b(this.featureIndex)||!e$2b(this.featureIndex.rawTileData))return null;var n=this.featureIndex.query({queryGeometry:t,tileSize:this.tileSize,params:i},e,null),r=!1;for(var o in n)if(e[o]instanceof _0x252c8a&&n[o].length>1){r=!0;break}return r&&(n=this.featureIndex.query({queryGeometry:t,tileSize:this.tileSize,params:i,adjustScale:.1},e,null)),n},r.prototype.querySourceFeatures=function(e,t){if(e$2b(this.featureIndex)&&e$2b(this.featureIndex.rawTileData)){var i=this.featureIndex.loadVTLayers(),n=e?e.sourceLayer:"";""!==n&&(n=n.replace(/(.*)(#\d.*)/,"$1"),e.sourceLayer=n);var r=i[n];if(r)for(var o=_0x570fee.createFilter(e&&e.filter),a=0;ae.level)&&(this.xe.x)&&this.y=2&&_0x46a73d.secTaskProcessorReady&&_0x46a73d.useMultiWebWorker&&(t=_0x46a73d.taskProcessorMap.S3MBTilesParserSec);var i=t.scheduleTask(e.data);return!!e$2b(i)&&(e.state=_0x413ba7.ACTIVE,i.then((function(t){e.state!==_0x413ba7.CANCELLED&&(e.state=_0x413ba7.RECEIVED,e.deferred.resolve(t))})).otherwise((function(t){e.state!==_0x413ba7.CANCELLED&&(e.state=_0x413ba7.FAILED,e.deferred.reject(t))})),!0)}_0x46a73d.cancelTask=function(e){e.state=_0x413ba7.CANCELLED,e$2b(e.deferred)&&e.deferred.reject()},_0x46a73d.startTask=function(e){_0x9c19d6(e);var t=_0x3c752a.insert(e);if(e$2b(t)){if(t===e)return;_0x46a73d.cancelTask(t)}return _0x3bd815(e)},_0x46a73d.processTasks=function(){for(var e=_0x3c752a.internalArray,t=_0x3c752a.length,i=0;i0;)if((n=_0x3c752a.pop()).state!==_0x413ba7.CANCELLED&&!_0x47ff94(n))return void _0x3c752a.insert(n)},_0x46a73d.initWebAssembly=function(){if(_0x46a73d.init=!0,0==s$Y.supportsWebAssembly())return _0x46a73d.taskProcessorReady=!0,void(_0x46a73d.CRNTaskProcessorReady=!0);_0x46a73d.S3MBTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper_new.js",wasmBinaryFile:"ThirdParty/draco_decoder_new.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(e){_0x46a73d.taskProcessorReady=e})),_0x46a73d.S3MBTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(e){_0x46a73d.taskProcessorReady=e})),_0x46a73d.S3MBTaskProcessorSec.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper_new.js",wasmBinaryFile:"ThirdParty/draco_decoder_new.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(e){_0x46a73d.secTaskProcessorReady=e})),_0x46a73d.S3MBTaskProcessorSec.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(e){_0x46a73d.secTaskProcessorReady=e})),_0x46a73d.CRNProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){_0x46a73d.CRNTaskProcessorReady=!0})),_0x46a73d.unzipDataTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){_0x46a73d.CRNTaskProcessorReady=!0}))},_0x46a73d.S3MTaskProcessor=new i$V("S3MTilesParser"),_0x46a73d.S3MBTaskProcessor=new i$V("S3MBTilesParser"),_0x46a73d.S3MBTaskProcessorSec=new i$V("S3MBTilesParser"),_0x46a73d.indexTaskProcessor=new i$V("indexedDBWorker"),_0x46a73d.CRNProcessor=new i$V("transcodeCRNToDXT",Number.POSITIVE_INFINITY),_0x46a73d.unzipDataTaskProcessor=new i$V("UnZipData"),_0x46a73d.taskProcessorReady=!1,_0x46a73d.CRNTaskProcessorReady=!1,_0x46a73d.init=!1,_0x46a73d.taskProcessorMap={UnZipData:_0x46a73d.unzipDataTaskProcessor,S3MBTilesParser:_0x46a73d.S3MBTaskProcessor,S3MBTilesParserSec:_0x46a73d.S3MBTaskProcessorSec},_0x46a73d.useMultiWebWorker=!1;var _0x5e84cf=(_0xc19b19=!0,function(e,t){var i=_0xc19b19?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc19b19=!1,i}),_0x7996c0=_0x5e84cf(void 0,(function(){return _0x7996c0.toString().search("(((.+)+)+)+$").toString().constructor(_0x7996c0).search("(((.+)+)+)+$")})),_0xc19b19;function _0x206cda(){this._fileName=void 0,this._relativePath=void 0,this._orientedBoundingBox=void 0,this._boundingSphere=new i$1c,this._childrenPageLod=[],this._pagelodMap={},this._isLeafTile=!1,this._isRootTile=!1,this._hasLeafChild=!1,this._isEmptyTree=!0,this._s3mLoadState=N$P.UNLOAD,this._attrLoadState=N$P.UNLOAD,this._leafAttrLoadState=N$P.UNLOAD,this._attrAppend=[],this._isParsed=!1,this._configLoadState=N$P.UNLOAD,this._avgPix=0,this._disFromCamera=0,this._nLODLev=0,this._ready=!1,this._configReady=!1,this._isVisible=!0,this._owner=void 0,this.s3mBuffer=null,this.volBuffer=null,this.volImage=null,this._visibilityPlaneMask=0,this._texturesByteLength=0,this._replacementNode=null,this._volObj=null,this._volTexture=null,this._volTextures={},this.skeletonState=void 0,this.skeletonPackages=void 0,this.instancePackage=void 0,this._reloadVol=!1,this._oriBoundingSphere=null,this._isAncestorBlock=!1,this._isChildBlock=!1,this._blockKey=void 0,this._priority=1e3,this._rootBatchIdMap={},this._ancestorMap={},this._shouldSelect=!1,this._stackLength=0,this._needRefine=!0,this._selected=!1,this._readyAncestor=void 0,this._parent=void 0,this._depth=1,this._needRequest=!0,this._parentPagelod=void 0,this._leafChildren=[],this._centerZDepth=0,this._foveatedFactor=0,this._priority=0,this._hasConfig=!1,this._needLoad=!1,this._skipLevel=0,this._subdomainIndex=0,this._prepareLoad=!1,this._tmpMaterialArr=[],this.hasTranslate=!1,this.isFlatten=!1}function _0x550c6e(e,t,i){return Math.max(e$2a.normalize(e,t,i)-e$2a.EPSILON7,0)}function _0x4cd18e(e,t,i){var n=e*Math.pow(10,t);return parseInt(n)*Math.pow(10,i)}_0x7996c0(),Object.defineProperties(_0x206cda.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox||this._boundingSphere}}}),_0x206cda.prototype.updatePriority=function(e){var t=e._minimumPriority,i=e._maximumPriority,n=4,r=_0x4cd18e(_0x550c6e(this._foveatedFactor,t.foveatedFactor,i.foveatedFactor),4,n);n=0;var o=_0x4cd18e(1-_0x550c6e(this._avgPix,t.pixel,i.pixel),4,n);n=8;var a=_0x4cd18e(_0x550c6e(this._disFromCamera,t.distance,i.distance),4,n);this._priority=r+o+a},_0x206cda.prototype.memoryUsage=function(){for(var e=this._texturesByteLength,t=0;ti)return o=!0,o;if(!h.renderable){r=!1,l=!1;try{h.transformResource(e,t)}catch(e){console.log(e)}}}d._ready=l}for(a=0,s=this._leafChildren.length;ai)return o=!0,o;if(!h.renderable){r=!1,l=!1;try{h.transformResource(e,t)}catch(e){console.log(e)}}}d._ready=l}return r&&(this._ready=!0,this._s3mLoadState=N$P.TRANSFORMED),o},_0x206cda.prototype.freeResource=function(e){for(var t=0,i=this._childrenPageLod.length;td){var f=2*d/u;f<1&&(c*=f)}}return c}function _0xce6562(e,t,i,n,r){var o=0,a=t.uniformState.resolutionScale,s=i._boundingSphere,l=s.radius,u=s.center,c=o$1p.distance(e.positionWC,u);if(c=Math.max(1e-5,c),e._mode===C$13.SCENE2D&&(c=e.positionCartographic.height),o=t.drawingBufferHeight/(2*Math.tan(.5*e$2a.PI_OVER_FOUR))*l/c,o/=a,e$2b(n)&&(n==_0x10659f.Child_Priority_NonLinear||n===_0x10659f.UsePagedLodInfo)){var h=Math.max(s.radius,r);c>h&&(o*=h/c)}return Math.ceil(o)}_0x3eccba(),_0x46a5cb.prototype.calcPixFromCam=function(e,t,i,n,r){if(this._boundingSphere){var o=e.positionWC,a=o$1p.clone(this._boundingSphere.center),s=o$1p.distance(a,o);e._mode==C$13.SCENE2D&&(s=e.positionCartographic.height),this._disFromCamera=s-this._boundingSphere.radius;var l=0;if(i/=ti$3.getQuality(),this._rangeMode==_0x2056d1.DISTANCE_FROM_EYE_POINT)l=s-this._boundingSphere.radius,this._isLessLodDis=l>this._rangeList*i,l=-l;else if(this._rangeMode===_0x2056d1.GEOMETRY_ERROR)l=_0x1237de(e,t,this,r),this._isLessLodDis=l<=16*i;else l=2*_0xce6562(e,t,this,r,this._fileType===d$15.OSGBFile?800:300),this._isLessLodDis=l<=this._rangeList*i;this._pix=l,this._entity&&(this._entity._avgPix=l,this._entity._disFromCamera=this._disFromCamera,this._entity._isRootTile||(this._entity._disFromCamera*=n))}},_0x46a5cb.prototype.calcImageryScaleLevel=function(e,t,i,n,r){if(this._boundingSphere){var o=e.positionWC,a=o$1p.clone(this._boundingSphere.center),s=o$1p.distance(a,o);e._mode==C$13.SCENE2D&&(s=e.positionCartographic.height),this._disFromCamera=s-this._boundingSphere.radius;var l=0;return i/=ti$3.getQuality(),r==_0x2056d1.DISTANCE_FROM_EYE_POINT?(l=s-this._boundingSphere.radius,this._isLessLodDis=l>this._rangeList*i,l=-l,this._pix=l,Math.sqrt(this._rangeList*i/l)):r===_0x2056d1.GEOMETRY_ERROR?(this._rangeList=16*this._boundingSphere.radius/256,l=_0x1237de(e,t,this,n),this._isLessLodDis=l<=16*i,this._pix=l,Math.sqrt(l/(16*i))):(l=2*_0xce6562(e,t,this,n,this._fileType===d$15.OSGBFile?800:300),this._isLessLodDis=l<=this._rangeList*i,this._pix=l,Math.sqrt(l/(this._rangeList*i)))}},_0x46a5cb.prototype.freeResource=function(e){for(var t=0,i=this._renderEntityList.length;t=e$2a.SIXTY_FOUR_KILOBYTES)&&this.context.elementIndexUint&&(n=ce$x.UNSIGNED_INT),e$2b(i.indexBuffer)||(i.indexBuffer=t$Y.createIndexBuffer({context:e,typedArray:i.indicesTypedArray,usage:A$19.STATIC_DRAW,indexDatatype:n}),t._totalMemoryUsageInBytes+=i.indexBuffer.sizeInBytes,this.model._geometryByteLength+=i.indexBuffer.sizeInBytes,ti$3._memGeometryAdded(i.indexBuffer.sizeInBytes)),i.indicesTypedArray=null,delete i.indicesTypedArray}};var _0x297623=(_0x1e2dbe=!0,function(e,t){var i=_0x1e2dbe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e2dbe=!1,i}),_0x2bfc94=_0x297623(void 0,(function(){return _0x2bfc94.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bfc94).search("(((.+)+)+)+$")})),_0x1e2dbe;function _0x4dad4e(){this.textures={},this.textureRefCounts={},this._context=void 0}_0x2bfc94(),_0x4dad4e.createTexture=function(e){var t=e.imageUrl,i=u$_(e.wrapS,q$19.REPEAT),n=u$_(e.wrapT,q$19.REPEAT),r=u$_(e.minificationFilter,tt$h.LINEAR),o=u$_(e.magnificationFilter,rt$i.LINEAR),a=u$_(e.pixelFormat,V$10.RGBA),s=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE);if(e$2b(t)){var l=t;_0x16a2d8.textureRefCounts[l]?_0x16a2d8.textureRefCounts[l]++:(_0x16a2d8.textureRefCounts[l]=1,o$1l(t$T(t),(function(e){var t=new e$1P({wrapS:i,wrapT:n,minificationFilter:r,magnificationFilter:o}),u=new t$V({context:_0x16a2d8._context,source:e,pixelFormat:a,pixelDatatype:s,sampler:t});u.generateMipmap(),_0x16a2d8.textures[l]=u})))}},_0x4dad4e.getTexture=function(e){if(e$2b(e))return _0x16a2d8.textures[e]},_0x4dad4e.removeTexture=function(e){e$2b(e)&&(e$2b(_0x16a2d8.textureRefCounts[e])&&(_0x16a2d8.textureRefCounts[e]--,0===_0x16a2d8.textureRefCounts[e])&&(_0x16a2d8.textures[e].destroy(),delete _0x16a2d8.textures[e],delete _0x16a2d8.textureRefCounts[e]))},_0x4dad4e.update=function(e){_0x16a2d8._context=e};var _0x16a2d8=new _0x4dad4e,_0x4739b3=(_0x5a6604=!0,function(e,t){var i=_0x5a6604?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a6604=!1,i}),_0x4e8c6a=_0x4739b3(void 0,(function(){return _0x4e8c6a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e8c6a).search("(((.+)+)+)+$")})),_0x5a6604;_0x4e8c6a();var _0x339833={NONE:0,SELECTION:1,ALL:2},_0x381f49=Object.freeze(_0x339833),_0x2a7c12=(_0x2de6d1=!0,function(e,t){var i=_0x2de6d1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2de6d1=!1,i}),_0x57d347=_0x2a7c12(void 0,(function(){return _0x57d347.toString().search("(((.+)+)+)+$").toString().constructor(_0x57d347).search("(((.+)+)+)+$")})),_0x2de6d1;function _0x23730d(){}_0x57d347();var _0x4c4468=[];_0x23730d.createUniformMapsForCompressAttributes=function(e,t){var i=e._vertexPackage,n=i.nCompressOptions;(n&_0x35ed09.SVC_Vertex)==_0x35ed09.SVC_Vertex&&(t.decode_position_min=function(){return i.minVerticesValue},t.decode_position_normConstant=function(){return i.vertCompressConstant}),(n&_0x35ed09.SVC_Normal)==_0x35ed09.SVC_Normal&&(t.normal_rangeConstant=function(){return i.normalRangeConstant}),(n&_0x35ed09.SVC_TexutreCoord)==_0x35ed09.SVC_TexutreCoord&&(i.texCoordCompressConstant.length>0&&(t.decode_texCoord0_min=function(){return i.minTexCoordValue[0]},t.decode_texCoord0_normConstant=function(){return i.texCoordCompressConstant[0]},t.decode_texCoord0_vNormConstant=function(){return i.texCoordCompressConstant[0]}),i.texCoordCompressConstant.length>1&&(t.decode_texCoord1_min=function(){return i.minTexCoordValue[1]},t.decode_texCoord1_normConstant=function(){return i.texCoordCompressConstant[1]},t.decode_texCoord1_vNormConstant=function(){return i.texCoordCompressConstant[1]}),i.texCoordCompressConstant.length>2&&(t.decode_texCoord2_min=function(){return i.minTexCoordValue[2]},t.decode_texCoord2_normConstant=function(){return i.texCoordCompressConstant[2]}),i.texCoordCompressConstant.length>3&&(t.decode_texCoord3_min=function(){return i.minTexCoordValue[3]},t.decode_texCoord3_normConstant=function(){return i.texCoordCompressConstant[3]}),i.texCoordCompressConstant.length>4&&(t.decode_texCoord4_min=function(){return i.minTexCoordValue[4]},t.decode_texCoord4_normConstant=function(){return i.texCoordCompressConstant[4]}),i.texCoordCompressConstant.length>5&&(t.decode_texCoord5_min=function(){return i.minTexCoordValue[5]},t.decode_texCoord5_normConstant=function(){return i.texCoordCompressConstant[5]}),i.texCoordCompressConstant.length>6&&(t.decode_texCoord6_min=function(){return i.minTexCoordValue[6]},t.decode_texCoord6_normConstant=function(){return i.texCoordCompressConstant[6]}),i.texCoordCompressConstant.length>7&&(t.decode_texCoord7_min=function(){return i.minTexCoordValue[7]},t.decode_texCoord7_normConstant=function(){return i.texCoordCompressConstant[7]}))};let _0x3893f8=0,_0x2e2fe9=0;_0x23730d.createWaterUniform=function(e,t,i){if(e$2b(e.waterEffectSet)&&e.multiTemporalUseWater){var n=e._frameState._framebufferList.water;i.uReflectMap=function(){return n.renderTexture._fb.getColorTexture(0)},i.uUseRefectMap=function(){return n&&n.isUpdate?1:0},i.uNoiseMap=function(){return n._waterNormalMap},i.uTimeVal=function(){return _0x2e2fe9!=e._frameState.frameNumber&&(_0x3893f8+=1/60,_0x2e2fe9=e._frameState.frameNumber),_0x3893f8},i.uBumpSpeed=function(){return e._waterParamter.bumpSpeed},i.uWaterColour=function(){return e._waterParamter.waterColour},i.uWaterBrightness=function(){return e._waterParamter.waterBrightness},i.uSunColor=function(){return e._frameState.lightSource.sunLightColor}}};var _0x399c28=new o$1o,_0x2219d3=new o$1o;const _0x5b86f8=new e$29;_0x23730d.createCommonLayerUniform=function(e,t){if(t.uSelColor=function(){return e.selectedColor},t.uTranslationAndBottom=function(){return _0x5b86f8.x=e.selectedTranslate.x,_0x5b86f8.y=e.selectedTranslate.y,_0x5b86f8.z=e.selectedTranslate.z,_0x5b86f8.w=e.style3D.bottomAltitude,e.selectedTranslate},t.uFillForeColor=function(){return e.style3D.fillForeColor},t.uPolygonOffset=function(){var t=e._rsColor.polygonOffset;return e$2b(t)?(_0x2219d3.x=t.factor,_0x2219d3.y=t.units):(_0x2219d3.x=0,_0x2219d3.y=0),_0x2219d3},t.u_polygonOffset=function(){var t=0,i=0,n=e._rsColor.polygonOffset;return e$2b(n)?(t=n.factor,i=n.units):(t=0,i=0),{x:t,y:i}},t.uPointSize=function(){return e.style3D.pointSize},t.uMinMaxTransparent=function(){return _0x399c28.x=e.minTransparentAlpha,_0x399c28.y=e.maxTransparentAlpha,_0x399c28},t.uTransparentFilter=function(){return e.selectionFiltrateByTransparency},e.hasHyp){t.uHypHasAnalysisRegion=function(){return e._bUseHypRegion},t.uMixColorType=function(){return e$2b(e._mixColorType)?e._mixColorType:0},t.uDataFloor=function(){return e._fMinValue===e._fMaxValue?0:e._fMinValue},t.uDataCeil=function(){return e._fMinValue===e._fMaxValue?1:e._fMaxValue},t.uEmissionTexAtlas=function(){return e$2b(e._hypsometricSetting._emissionTextureAtlas)?e._hypsometricSetting._emissionTextureAtlas.texture:e._context.defaultTexture},t.uEmissionTexAtlasRects=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting._getEmissionAtlasTextureRects():_0x4c4468},t.uEmissionTexAtlasTilingAndOffset=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting._getEmissionTexAtlasTilingAndOffset():_0x4c4468},t.uHypsometricTexture=function(){return e._hypsometricTexture},t.uHypsometricRenderTexture=function(){return e._hypsometricRenderTexture},t.uHypOpacity=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.Opacity:1},t.uHypContourInterval=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.LineInterval:100};var i=new e$29;t.uHypLineColor=function(){return e$2b(e._hypsometricSetting)?(i.x=e._hypsometricSetting.LineColor.red,i.y=e._hypsometricSetting.LineColor.green,i.z=e._hypsometricSetting.LineColor.blue,i.w=e._hypsometricSetting.LineColor.alpha,i):e$29.ZERO},t.uHypContourFillMode=function(){var t=1;if(e$2b(e._hypsometricSetting))switch(e._hypsometricSetting.DisplayMode){case k$Q.DisplayMode.NONE:t=0;break;case k$Q.DisplayMode.FACE:t=1;break;case k$Q.DisplayMode.LINE:t=2;break;case k$Q.DisplayMode.FACE_AND_LINE:t=3}return t},t.uHypFloor=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMinKey:0},t.uHypCeil=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMaxKey:0},t.uHypMaxVisibleValue=function(){return(e$2b(e._hypsometricSetting)?e._hypsometricSetting.MaxVisibleValue:0)+e$2a.EPSILON5},t.uHypMinVisibleValue=function(){return(e$2b(e._hypsometricSetting)?e._hypsometricSetting.MinVisibleValue:0)-e$2a.EPSILON5},t.uHypRect=function(){return e._hypsometricBound},t.uNoValueColor=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.noValueColor:e$1U.WHITE},t.uHypsometricVisible=function(){return ro._isLeaf&&ro._isHypsometricVisible||e._hypsometricSetting._visibleDistanceMax===Number.MAX_VALUE&&0===e._hypsometricSetting._visibleDistanceMin&&e._hypsometricSetting._maxVisibleAltitude===Number.MAX_VALUE&&0===e._hypsometricSetting._minVisibleAltitude?1:0}}if(e._hasOverlay&&(t.uOverlayRect=function(){return e._overlayBounds},t.uOverlayTexture=function(){return e._overlayTexture}),e.hasWVisible&&(t.uMaxCategory=function(){return e._hypMaxCategory},t.uMinCategory=function(){return e._hypMinCategory},t.uCategoryWidht=function(){return e._categorieTexture&&e._categorieTexture.width||256},t.uCategoryHeight=function(){return e._categorieTexture&&e._categorieTexture.height||1},t.uCategorieTexture=function(){return e._categorieTexture}),e.hasSketch&&(t.uLineColor=function(){return e.style3D.lineColor},t.uLineWidth=function(){return e.style3D.lineWidth},t.uFillStyle=function(){return e.style3D.fillStyle},t.uNormalDepthTexture=function(){return e._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0)}),e.hasAdjustColor&&(t.uBrightness=function(){return e._brightness},t.uContrast=function(){return e._contrast},t.uHue=function(){return e._hue},t.uSaturation=function(){return e._saturation},t.uOneOverGamma=function(){return 1/e._gamma}),e.hasTransparentBackColor&&(t.uTransparentBackColor=function(){return e._transparentBackColor},t.uTransparentBackColorTolerance=function(){return e._transparentBackColorTolerance}),e.hasExcavation&&(t.uExcavationTexture=function(){return e._excavationTexture},t.uExcavationMode=function(){return e._excavationMode},t.uExcavationRect=function(){return e._excavationBounds},t.uServerExcavationMode=function(){return e._serverExcavationMode},t.uServerExcavationRect=function(){return e._serverExcavationBounds},t.uServerExcavationTexture=function(){return e._excavationTexture}),e.hasClip&&(t.clip_mode=function(){return e._clipMode},t.clip_planes=function(){return e._clipPlane},t.clip_line_color=function(){return e._clipLineColor}),e.hasSplit){t.uSplitDirection=function(){return e.splitDirection},t.uSplitPosition=function(){return e.splitPosition};var n=new e$29;t.uSwipeRegion=function(){return n.x=e._swipeRegion.x*e._frameState.context.drawingBufferWidth,n.y=(1-e._swipeRegion.y)*e._frameState.context.drawingBufferHeight,n.z=e._swipeRegion.z*e._frameState.context.drawingBufferWidth,n.w=(1-e._swipeRegion.w)*e._frameState.context.drawingBufferHeight,n}}if(e.hasPolylineEffect&&isPolylineEffect&&(t.uEffectLineWidth=function(){return e$2b(e._effect)?e._effect._lineWidth:e.style3D.lineWidth},t.uColor=function(){return e$2b(e._effect)?e._effect._color:e.style3D.lineColor},t.uType=function(){return e$2b(e._effect)?e._effect._type:0},t.uOutlineColor=function(){return e$2b(e._effect)?e._effect._outlineColor:e.style3D.lineColor},t.uOutlineWidth=function(){return e$2b(e._effect)?e._effect._outlineWidth:0},t.uGapColor=function(){return e$2b(e._effect)?e._effect._gapColor:e.style3D.lineColor},t.uDashLength=function(){return e$2b(e._effect)?e._effect._dashLength:0},t.uDashPattern=function(){if(e$2b(e._effect)){if(e._effect._isMove){e._effect._frame>159&&(e._effect._frame=0);var t=Math.floor(e._effect._frame/10),i=e._effect._dashPattern<>16-t;return e._effect._frame++,i+n}return e._effect._dashPattern}return 0},t.uGlowPower=function(){return e$2b(e._effect)?e._effect._glowPower:0},t.uIsArrow=function(){return!!e$2b(e._effect)&&e._effect._isArrow}),e.hasRegionEffect&&isRegionEffect&&(t.uRotationAngle=function(){return e._effect._rotationAngle},t.uType=function(){return e._effect._type},t.uForeColor=function(){return e._effect._foreColor},t.uBackColor=function(){return e._effect._backColor},t.uLineWidthX=function(){return e._effect._lineWidthX},t.uLineWidthY=function(){return e._effect._lineWidthY},t.uRepeatX=function(){return e._effect._repeatX},t.uRepeatY=function(){return e._effect._repeatY},t.uOffsetX=function(){return e._effect._offsetX},t.uOffsetY=function(){return e._effect._offsetY}),e.hasFusion){var r={x:0,y:0};t.uPanOffset=function(){return e$2b(e._context.curFusionViewMatrix)?(e$2b(e.panOffset)&&(r.x=e.panOffset.x/e._context.drawingBufferWidth,r.y=e.panOffset.y/e._context.drawingBufferHeight),r):(r.x=0,r.y=0,r)},t.uModelView=function(){return e$2b(e._context.curFusionViewMatrix)?p$1d.multiply(e._context.curFusionViewMatrix,ro._matModel,_0xe3202d):p$1d.multiply(e._context.uniformState.view3D,ro._matModel,_0xe3202d)}}e.hasHorizontalLine&&(t.uHorizontalLine=function(){return e$2b(e._fHorizontalLine)?e._fHorizontalLine:0},t.uHorizontalColor=function(){return e$2b(e$2b(e._HorizontalColor))?e._HorizontalColor:new e$29(1,1,0,0)}),e.hasFlood&&(t.uFloodFlagTexture=function(){if(e$2b(e._floodFlagTexture))return e._floodFlagTexture},t.uFloodRect=function(){if(e$2b(e._floodRect))return e._floodRect},t.uFloodMatrixInvert=function(){var t=new p$1d;return p$1d.multiply(e._matFloodInvertMatrix,ro._matModel,t),t})},_0x23730d.createMaterialUniform=function(e,t,i,n){const r=t._flag,o=1&r,a=r>>1&1,s=r>>2&1;if(n.uDiffuseColor=function(){return i._diffuseColor},n.uAmbientColor=function(){return i._ambientColor},a){n.uTexture=function(){var n;return e$2b(t._symbolTextureUrl)?e$2b(n=_0x4dad4e.getTexture(t._symbolTextureUrl))?n:e._context.defaultTexture:e$2b(i._textures[0])?(n=i._textures[0]).isTexBlock?n.renderable&&n.ready?n:e$2b(i._ancestorTexture)?i._ancestorTexture:n:n:e._context.defaultTexture},n.uTexMatrix=function(){return i._texMatrix},n.uTexture0Width=function(){return e$2b(i._textures[0])?i._textures[0]._width:1},n.uTexture1Width=function(){return e$2b(i._textures[1])?i._textures[1]._width:1};var l=new e$29;n.uTexUVOffset=function(){l.x=0,l.y=0,l.z=1,l.w=1;var t=i._baseColorTextureMotion;if(e$2b(t)){var n=t.OffsetPeriod,r=t.OffsetSpeedU,o=t.OffsetSpeedV,a=t.TilingPeriod,s=t.TilingSpeedU,u=t.TilingSpeedV,c=performance.now()/1e3;if(n>0){var h=c%n;l.x=h*r,l.y=h*o}if(a>0){var d=c%a;l.z=1+d*s,l.w=1+d*u}}else if(0!==e._textureUVSpeed.x||0!==e._textureUVSpeed.y){var f=performance.now()/1e3;l.x=e._textureUVSpeed.x*f,l.y=e._textureUVSpeed.y*f}return l}}if(s&&(n.uSecTexture=function(){var t=i._textures[1];return t.isTexBlock?t.renderable&&t.ready?t:e$2b(i._ancestorTextureBake)?i._ancestorTextureBake:e._context.defaultTexture:t}),o){n.uBaseColorTextureIndex=function(){return i._baseColorTextureIndex>-1?i._baseColorTextureIndex:e._PBRMaterialParams.pbrMetallicRoughness.baseColorTextureIndex},n.uBaseColorFactor=function(){return i._baseColor||e._PBRMaterialParams.pbrMetallicRoughness.baseColor},n.uMetallicFactor=function(){return i._metallicFactor||e._PBRMaterialParams.pbrMetallicRoughness.metallicFactor},n.uRoughnessFactor=function(){return u$_(i._roughnessFactor,e._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor)},n.uEmissiveFactor=function(){return i._emissiveFactor||e._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},n.uEmissionTexture=function(){if(e$2b(i.emissiveTexture))return i.emissiveTexture;var t=i._emissiveTextureIndex;return t>-1&&e$2b(i._textures[t])?i._textures[t]:e._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},n.uMetallicRoughnessTexture=function(){return e$2b(i._metallicRoughnessTextureIndex)&&i._metallicRoughnessTextureIndex>-1?e$2b(i.metallicRoughnessTexture)?i.metallicRoughnessTexture:i._textures[i._metallicRoughnessTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},n.uNormalTexture=function(){return e$2b(i._normalTextureIndex)&&i._normalTextureIndex>-1?i.normalTexture?i.normalTexture:i._textures[i._normalTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.normalTexture},n.uNormalTextureScale=function(){return e$2b(i._normalTextureScale)?i._normalTextureScale:e._PBRMaterialParams.pbrMetallicRoughness.normalTextureScale},n.uOcclusionTexture=function(){return e$2b(i._occlusionTextureIndex)&&i._occlusionTextureIndex>-1?i.occlusionTexture?i.occlusionTexture:e$2b(i._textures[i._occlusionTextureIndex])?i._textures[i._occlusionTextureIndex]:e._context.defaultTexture:e._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},n.uIndexOfRefraction=function(){return e$2b(i._indexOfRefraction)&&i._indexOfRefraction>0?i._indexOfRefraction:e._PBRMaterialParams.pbrMetallicRoughness.indexOfRefraction},n.uTransmissionFactor=function(){return e$2b(i._transmissionFactor)&&i._transmissionFactor>0?i._transmissionFactor:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.volume)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.volume.transmissionFactor)?e._PBRMaterialParams.pbrMetallicRoughness.volume.transmissionFactor:1},n.uThickness=function(){return e$2b(i._volume)?i._volume._thickness:e._PBRMaterialParams.pbrMetallicRoughness.volume.thickness},n.uSnowCoverageFactor=function(){return e$2b(i.snowEffect)&&i.snowEffect._snow_coverage>0?i.snowEffect._snow_coverage:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.snowEffect)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage)&&e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage>0?e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage:.5},n.uSnowMaskTexture=function(){return e$2b(i.snowEffect)&&e$2b(i.snowEffect._snowMaskTexture)?i.snowEffect._snowMaskTexture:e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture},n.uSnowNormalTexture=function(){return e$2b(i.snowEffect)&&e$2b(i.snowEffect._snowNormalTexture)?i.snowEffect._snowNormalTexture:e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture},n.uIntensityScale=function(){return e$2b(i._intensityScale)&&i.rainEffect._intensityScale>0?i._intensityScale:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&e._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0?e._PBRMaterialParams.pbrMetallicRoughness.intensityScale:1},n.uAnimationSpeed=function(){return e$2b(i.rainEffect)&&e$2b(i.rainEffect._animationSpeed)?i.rainEffect._animationSpeed:e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.animationSpeed},n.uRippleTexture=function(){return e$2b(i.rainEffect)&&e$2b(i.rainEffect._rippleTexture)?i.rainEffect._rippleTexture:e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture},n.uWetnessFactor=function(){return e$2b(i.rainEffect)&&i.rainEffect._wetnessFactor>0?i.rainEffect._wetnessFactor:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor:0},n.uRippleScale=function(){return e$2b(i.rainEffect)&&i.rainEffect._ripple_scale>0?i.rainEffect._ripple_scale:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale:5},n.uWindIntensity=function(){return e$2b(i.rainEffect)&&i.rainEffect._wind_intensity>0?i.rainEffect._wind_intensity:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity:0},n.uRain=function(){return e$2b(i.rainEffect)&&i.rainEffect._rain>0?i.rainEffect._rain:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain:200},n.uCameraDepth=function(){return e$2b(i.rainEffect)&&i.rainEffect._cameraDepth>0?i.rainEffect._cameraDepth:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth:.8},n.uTintColor=function(){return e$2b(i._volume)?i._volume._tintColor:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.volume)?e._PBRMaterialParams.pbrMetallicRoughness.volume.tintColor:e$1U.WHITE},n.uDiffusionDistance=function(){return e$2b(i._volume)?i._volume._diffusionDistance:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.volume)?e._PBRMaterialParams.pbrMetallicRoughness.volume.diffusionDistance:e$1U.WHITE},n.uClearcoatFactor=function(){return e$2b(i._clearcoat)?i._clearcoat._clearcoatFactor:e._PBRMaterialParams.pbrMetallicRoughness.clearcoat.clearcoatFactor},n.uClearcoatRoughnessFactor=function(){return e$2b(i._clearcoat)?i._clearcoat._clearcoatRoughnessFactor:e._PBRMaterialParams.pbrMetallicRoughness.clearcoat.clearcoatRoughnessFactor},n.uAnisotropy=function(){return e$2b(i._anisotropy)?i._anisotropy:e._PBRMaterialParams.pbrMetallicRoughness.anisotropy},n.uBaseTexture=function(){return e$2b(i._baseColorTextureIndex)&&i._baseColorTextureIndex>-1?i.baseColorTexture:e._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture};var u=i._emissiveTextureMotion||e._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion,c=new e$29;if(n.uEmissiveUVOffsetAndTiling=function(){var e=performance.now()/1e3,t=u.OffsetPeriod,i=u.OffsetSpeedU,n=u.OffsetSpeedV,r=u.TilingPeriod,o=u.TilingSpeedU,a=u.TilingSpeedV;if(u&&t>0){var s=e%t;c.x=s*i,c.y=s*n}else c.x=0,c.y=0;if(u&&r>0){var l=e%u._tilingPeriod;c.z=1+l*o,c.w=1+l*a}else c.z=1,c.w=1;return c},i._usePBRTextureBatch){var h=new o$1o;n.uPBRTexture=function(){return i.pbrParamTexture},n.uPBRTexWH=function(){var e=i.pbrParamTexture;return h.x=e._width,h.y=e._height,h}}n.uAlphaCutoff=function(){return i._alphaCutoff}}return n},_0x23730d.createMeshUniform=function(e,t){e$2b(e._batchTable);return t.uModelMatrix=function(){return e._relativeModelMatrix},t.uGeoMatrix=function(){return e._geoMatrix},t};var _0xe3202d=new p$1d;_0x23730d.create=function(e,t,i,n){var r=t._fileType;r===d$15.PolylineEffect||r===d$15.ClampGroundRealtimeRasterCache&&e$2b(i._attributeLocations.aTexCoord1),d$15.RegionEffect,r===d$15.ClampGroundRealtimeRasterCache&&e$2b(i._attributeLocations.aTexCoord1),d$15.PointCloudFile;var o=i._material;if(n.uTexture=function(){var e;return e$2b(i._symbolTextureUrl)?e$2b(e=_0x4dad4e.getTexture(i._symbolTextureUrl))?e:t._context.defaultTexture:e$2b(o._textures[0])?(e=o._textures[0]).isTexBlock?e.renderable&&e.ready?e:e$2b(o._ancestorTexture)?o._ancestorTexture:e:e:t._context.defaultTexture},n.uSecTexture=function(){var e=o._textures[1];return e.isTexBlock?e.renderable&&e.ready?e:e$2b(o._ancestorTextureBake)?o._ancestorTextureBake:t._context.defaultTexture:e},t._bUseHypColorTable&&(n.uHypsometricTexture=function(){return t._hypsometricTexture},n.uHypsometricRenderTexture=function(){return t._hypsometricRenderTexture}),t._flattening&&(n.uFlattenTexture=function(){return e.multiViewportIndex>-1?1<-1?o.baseColorTexture:t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture},n.uNormalTexture=function(){return e$2b(o._normalTextureIndex)&&o._normalTextureIndex>-1?o.normalTexture?o.normalTexture:o._textures[o._normalTextureIndex]:t._PBRMaterialParams.pbrMetallicRoughness.normalTexture},n.uEmissionTexture=function(){if(e$2b(o.emissiveTexture))return o.emissiveTexture;var e=o._emissiveTextureIndex;return e>-1&&e$2b(o._textures[e])?o._textures[e]:t._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},n.uMetallicRoughnessTexture=function(){return e$2b(o._metallicRoughnessTextureIndex)&&o._metallicRoughnessTextureIndex>-1?e$2b(o.metallicRoughnessTexture)?o.metallicRoughnessTexture:o._textures[o._metallicRoughnessTextureIndex]:t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},n.uOcclusionTexture=function(){return e$2b(o._occlusionTextureIndex)&&o._occlusionTextureIndex>-1?o.occlusionTexture?o.occlusionTexture:e$2b(o._textures[o._occlusionTextureIndex])?o._textures[o._occlusionTextureIndex]:t._context.defaultTexture:t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},o._usePBRTextureBatch&&(n.uPBRTexture=function(){return o.pbrParamTexture})),(e$2b(i._volTexture)||e$2b(i._volObj))&&(n.uVolumeTexture=function(){return"png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt?i._volTexture:i._volObj.volTexture}),e$2b(t._imageryLayer)&&e$2b(i._attributeLocations.img)&&(n.uImgTexture=function(){return e$2b(i._rasterImageTexture)?i._rasterImageTexture:t._context.defaultTransparentTexture}),e$2b(t.waterEffectSet)||t.multiTemporalUseWater){var a=t._frameState._framebufferList.water;n.uReflectMap=function(){return a.renderTexture._fb.getColorTexture(0)},n.uNoiseMap=function(){return a._waterNormalMap}}t._hasOverlay&&(n.uOverlayTexture=function(){return t._overlayTexture}),t._hasEmissiveTexAtlas&&(n.uEmissionTexAtlas=function(){return e$2b(t._hypsometricSetting._emissionTextureAtlas)?t._hypsometricSetting._emissionTextureAtlas.texture:t._context.defaultTexture}),t._hasSnowEffect&&(n.uSnowMaskTexture=function(){return t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture},n.uSnowNormalTexture=function(){return t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture}),t._hasRainEffect&&(n.uRippleTexture=function(){return t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture}),e$2b(i._batchTable)&&(n=i._batchTable.getUniformMapCallback()(n)),e$2b(o._batchTable)&&(o._batchTable.update(e),n=o._batchTable.getUniformMapCallback()(n)),e$2b(o._batchTableBake)&&(o._batchTableBake.update(e),n=o._batchTableBake.getUniformMapCallback()(n)),e$2b(i._dayTextures)&&i._dayTextures.length>0&&(n.uMapTexture=function(){if(e$2b(o._textures[0])){var e=o._textures[0],i=o._mapTextures[e.id];return e$2b(i)?i:e}return t._context.defaultTexture},n.uImgTexture=function(){return e$2b(i._rasterImageTexture)?i._rasterImageTexture:t._context.defaultTransparentTexture},n.uImgTextureAlpha=function(){return e$2b(t._imageryLayer)?t._imageryLayer instanceof Array?t._imageryLayer[t._imageryLayer.length-1].alpha:t._imageryLayer.show&&i._showImagerysImmediate?t._imageryLayer.alpha:0:1},n.uImgTextureBound=function(){return i._imageryTextureBound},n.u_dayTextures=function(){return i._dayTextures},n.u_dayTextureUseWebMercatorT=function(){return i._dayTextureUseWebMercatorT},n.u_dayTextureTexCoordsRectangle=function(){return i._dayTextureTexCoordsRectangle},n.u_dayTextureTranslationAndScale=function(){return i._dayTextureTranslationAndScale},n.u_transparentBackColor=function(){return i._transparentBackColor},n.u_imageryClipEnable=function(){return i._imageryClipEnable},n.u_dayTextureFlipY=function(){return i._dayTextureFlipY},n.u_dayTextureAlpha=function(){return i._dayTextureAlpha},n.u_dayTextureSize=function(){return i._dayTextureTranslationAndScale}),i._uniformMap=n};var _0x585a6f=(_0x8d93fe=!0,function(e,t){var i=_0x8d93fe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8d93fe=!1,i}),_0x916048=_0x585a6f(void 0,(function(){return _0x916048.toString().search("(((.+)+)+)+$").toString().constructor(_0x916048).search("(((.+)+)+)+$")})),_0x8d93fe;_0x916048();var _0x527139="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#include \n#include \n#include \nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\n#ifdef DepthEXT\nvarying float vWindowZ;\n#endif\n#include \nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n #ifdef DepthEXT\n\t gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n #endif\n#endif\n#ifdef WEBGL2\n #ifdef DepthEXT\n\t gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n #endif\n#endif\n\tif(vColor.a < uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIP\n gl_FragColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n gl_FragColor = vSecondColor;\n}\n",_0x233fd6=(_0x2d3e83=!0,function(e,t){var i=_0x2d3e83?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d3e83=!1,i}),_0x1e9c25=_0x233fd6(void 0,(function(){return _0x1e9c25.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e9c25).search("(((.+)+)+)+$")})),_0x2d3e83;_0x1e9c25();var _0x25cbb0="\n#include \nvarying vec4 vSecondColor; \nvarying vec4 vColor;\nvoid main() \n{\n\tif(vColor.a < uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n gl_FragColor = vSecondColor; \n}",_0x537099=(_0x5eca15=!0,function(e,t){var i=_0x5eca15?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5eca15=!1,i}),_0x598ed1=_0x537099(void 0,(function(){return _0x598ed1.toString().search("(((.+)+)+)+$").toString().constructor(_0x598ed1).search("(((.+)+)+)+$")})),_0x5eca15;_0x598ed1();var _0xaee82b="\n#include \n#include \nvarying vSecondColor : vec4; \nvarying vColor : vec4;\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n\tif(vColor.a < Layer.uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n gl_FragColor = vSecondColor; \n}",_0x602940=(_0x1afd89=!0,function(e,t){var i=_0x1afd89?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1afd89=!1,i}),_0x531cad=_0x602940(void 0,(function(){return _0x531cad.toString().search("(((.+)+)+)+$").toString().constructor(_0x531cad).search("(((.+)+)+)+$")})),_0x1afd89;_0x531cad();var _0x5a4442="\nprecision highp float;\n#include \n#include \n#include \n#include \n// Inputs\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\nattribute float batchId;\n// attribute float aVariantOffset;\nattribute float aVariantStroke;\nattribute float aVariantExtension;\n\n#ifdef SILHOUETTE\nattribute vec3 aNormalA;\nattribute vec3 aNormalB;\n#else /* SILHOUETTE */\nattribute vec3 aNormal;\n#endif /* SILHOUETTE */\n\nattribute vec2 aSideness;\n//attribute vec2 aPackedAttributes;\n\nstruct UnpackedAttributes\n{\n vec2 sideness;\n vec2 sidenessNorm;\n float lineWidthPixels;\n float extensionLengthPixels;\n#if (MODE == 2)\n float edgeType;\n#endif\n};\n\n// Output required to compute color\nvarying vec4 vColor;\n// Output required to compute distance to line/caps\nvarying vec3 vPosition; \nvarying vec3 vViewPosition;\nvarying float vRadius;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\n\nvarying vec2 vStrokeUV;\n\nconst vec2 uDepthBias = vec2(0.5, -4e-4);\n\n// Utility function to check for NaN values\nbool isNaN(float val)\n{\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n // important: some nVidias failed to cope with version below.\n // Probably wrong optimization.\n /*return ( val <= 0.0 || 0.0 <= val ) ? false : true;*/\n}\n\nvec2 calculateProjectedBiasXY(vec4 projPos, vec3 worldNormal)\n{\n float offsetXY = uDepthBias.x;\n float offsetZ = uDepthBias.y;\n vec4 projNormal = czm_projection * czm_view * vec4(worldNormal, 0.0);\n return offsetXY * projPos.w * 2.0 / czm_viewport.zw * normalize(projNormal.xyz).xy;\n}\n\n// A z-offset, using a depth based heuristic.\nfloat calculateProjectedBiasZ(vec4 projPos)\n{\n float fProjZ = projPos.z / projPos.w;\n if(fProjZ < 0.1)\n {\n return 0.0;\n }\n float offsetZ = uDepthBias.y;\n return sqrt(projPos.z) * offsetZ;\n}\n\nvec4 adjustProjectedPosition(vec4 projPos, vec3 worldNormal, float lineWidth)\n{\n vec2 offsetXY = calculateProjectedBiasXY(projPos, worldNormal);\n // we currently have to do this check because some geometries come with 0 length edge normals.\n if (!isNaN(offsetXY.x) && !isNaN(offsetXY.y))\n {\n projPos.xy += offsetXY;\n }\n#ifdef LOG_DEPTH\n vDistanceFromEye = projPos.w;\n#else\n projPos.z += calculateProjectedBiasZ(projPos);\n#endif\n return projPos;\n}\n\n#if (MODE == 0)\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{}\n#elif (MODE == 1)\nfloat strokeVariants = 6.0;\nvoid calculateStyleOutputsSketch(float lineLength, UnpackedAttributes unpackedAttributes) {\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n float lineIndex = clamp(ceil(log2(lineLength)), 0.0, uStrokesLog2Resolution);\n vStrokeUV = vec2(exp2(lineIndex) * sidenessNorm.y, lineIndex * strokeVariants + aVariantStroke + 0.5) * uStrokesTextureScale;\n}\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{\n calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);\n}\n#elif (MODE == 2)\nvarying float vType;\nvoid calculateStyleOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec4 projPos, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vType = unpackedAttributes.edgeType;\n if (unpackedAttributes.edgeType <= 0.0)\n {\n calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);\n }\n}\n#endif\n\n\n// Solid\n#if (MODE == 2 || MODE == 0)\nfloat calculateLineAmplitudeSolid()\n{\n return 0.0;\n}\n#endif\n#if (MODE == 0)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSolid();\n}\n#endif\n// Sketch\n#if (MODE == 2 || MODE == 1)\nfloat calculateLineAmplitudeSketch()\n{\n float strokesAmplitude = 6.0;\n return strokesAmplitude;\n}\n#endif\n#if (MODE == 1)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSketch();\n}\n#endif\n// Uber\n#if (MODE == 2)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n float edgeType = unpackedAttributes.edgeType;\n if (edgeType <= 0.0)\n {\n return calculateLineAmplitudeSketch();\n }\n else\n {\n return calculateLineAmplitudeSolid();\n }\n}\n#endif\n\n\nfloat distanceBasedPerspectiveFactor(float distance)\n{\n return clamp(sqrt(uDistanceFalloffFactor / distance), 0.0, 1.0);\n}\n\n#define COMPONENT_COLOR_FIELD_OFFSET 0.0\n#define COMPONENT_OTHER_FIELDS_OFFSET 1.0\n#define COMPONENT_FIELD_COUNT 2.0\n#define LINE_WIDTH_FRACTION_FACTOR 8.0\n#define EXTENSION_LENGTH_OFFSET 128.0\n#define COMPONENT_TEX_WIDTH 4096.0\n\nstruct ComponentData\n{\n float lineWidth;\n float extensionLength;\n float edgeType;\n};\n\n\nComponentData readComponentData()\n{\n return ComponentData(uLineWidth, 0.0, 0.0);\n}\n\nvec3 modelToWorldNormal(vec3 normal)\n{\n return (czm_model * vec4(normal, 0.0)).xyz;\n}\n\nvec3 silhouetteWorldNormal(vec3 normalA, vec3 normalB)\n{\n return modelToWorldNormal(normalize(normalA + normalB));\n}\n\n// Fall-off extension length for shorter strokes, starting from strokes that are 256 size,\n// fall-off exponentially\nfloat calculateExtensionLength(float extensionLength, float lineLength)\n{\n return extensionLength / (log2(max(1.0, 256.0 / lineLength)) * 0.2 + 1.0);\n}\n\n#ifdef SILHOUETTE\n// #uniforms: czm_view, czm_model\nbool isSilhouetteEdge(vec4 viewPos, vec3 normalA, vec3 normalB)\n{\n// transform the two face normals\n vec3 viewNormalA = (czm_modelView * vec4(normalA, 0.0)).xyz;\n vec3 viewNormalB = (czm_modelView * vec4(normalB, 0.0)).xyz;\n// compute the direction from the edge to the camera\n vec3 viewDir = -viewPos.xyz;\n// check which of the two faces are visible\n// display the edge if exactly one of the two is visible\n float faceAVisible = dot(viewDir, viewNormalA);\n// positive if visible\n float faceBVisible = dot(viewDir, viewNormalB);\n// positive if visible\n// 1 if exactly one face visible, 0 otherwise\n return faceAVisible * faceBVisible < 0.0;\n}\n#endif /* SILHOUETTE */\n\nvoid clipLineSegmentToNearPlane(vec3 p0,vec3 p1,out bool clipped,out bool culledByNearPlane,out vec4 clippedPositionEC)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = czm_currentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -czm_currentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n}\n\nvec4 calculateGeometricOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vec2 sideness = unpackedAttributes.sideness;\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n vec4 clippedViewPosV0; bool clippedV0,culledV0; clipLineSegmentToNearPlane(viewPosV0.xyz, viewPosV1.xyz, clippedV0, culledV0, clippedViewPosV0); vec4 clippedViewPosV1; bool clippedV1, culledV1; clipLineSegmentToNearPlane(viewPosV1.xyz, viewPosV0.xyz, clippedV1, culledV1, clippedViewPosV1); vec4 viewPos = mix(clippedViewPosV0, clippedViewPosV1, sidenessNorm.y);\n vViewPosition = viewPos.xyz / viewPos.w;\n vec4 projPosV0 = czm_projection * clippedViewPosV0;\n vec4 projPosV1 = czm_projection * clippedViewPosV1;\n vec4 projPos = czm_projection * viewPos;\n vec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\n vec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\n vec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\n float lineLengthPixels = length(screenSpaceLinePixels);\n float dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\n vec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\n vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\n float falloffFactor = distanceBasedPerspectiveFactor(-viewPos.z) * uPixelRatio;\n float lineWidthPixels = unpackedAttributes.lineWidthPixels * falloffFactor;\n float extensionLengthPixels = calculateExtensionLength(unpackedAttributes.extensionLengthPixels, lineLengthPixels) * falloffFactor;\n float lineAmplitudePixels = calculateLineAmplitude(unpackedAttributes) * uPixelRatio;\n vSizeFalloffFactor = falloffFactor;\n float lineWidthAndAmplitudePixels = lineWidthPixels + lineAmplitudePixels + lineAmplitudePixels;\n float extendedLineLengthPixels = lineLengthPixels + extensionLengthPixels + extensionLengthPixels;\n#ifdef ANTIALIASING\n const float aaPaddingPixels = 1.0;\n // Line size with padding\n float halfAAPaddedLineWidthAndAmplitudePixels = lineWidthAndAmplitudePixels * 0.5 + aaPaddingPixels;\n float aaPaddedRoundedCapSizePixels = lineWidthPixels * 0.5 + aaPaddingPixels;\n // Line length with padding\n float aaPaddedLineLengthPixels = extendedLineLengthPixels + aaPaddingPixels + aaPaddingPixels;\n float halfAAPaddedLineLengthPixels = aaPaddedLineLengthPixels * 0.5;\n#else /* ANTIALIASING */\n // Even if there is no AA, we still want to do proper <1px rendering,\n // so we effectively clamp the pixel sizes to minimum of 1px and compute\n // coverage in the fragment shader \n float halfAAPaddedLineWidthAndAmplitudePixels = max(lineWidthAndAmplitudePixels, 1.0) * 0.5;\n float aaPaddedRoundedCapSizePixels = max(lineWidthPixels, 1.0) * 0.5;\n float halfAAPaddedLineLengthPixels = max(extendedLineLengthPixels, 1.0) * 0.5;\n#endif /* ANTIALIASING */\n // Half line width in NDC including padding for anti aliasing\n vec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\n vec2 halfAAPaddedLineWidthAndAmplitudeNDC = halfAAPaddedLineWidthAndAmplitudePixels * uPixelToNDC;\n vec2 aaPaddedRoundedCapSizeNDC = aaPaddedRoundedCapSizePixels * uPixelToNDC;\n vec2 extensionLengthNDC = extensionLengthPixels * uPixelToNDC;\n // Compute screen space position of vertex, offsetting for line size and end caps\n vec2 ndcOffset = (screenSpaceDirection * sideness.y * (aaPaddedRoundedCapSizeNDC + extensionLengthNDC) + perpendicularScreenSpaceDirection * halfAAPaddedLineWidthAndAmplitudeNDC);\n projPos.xy += ndcOffset * projPos.w;\n projPos.z += (dzPerPixel * (aaPaddedRoundedCapSizePixels + extensionLengthPixels)) * sideness.y * projPos.w;\n projPos = adjustProjectedPosition(projPos, worldNormal, 1.0 + max((lineWidthAndAmplitudePixels - 1.0) * 0.5, 0.0));\n // Line length with end caps\n float aaPaddedLineWithCapsLengthPixels = extendedLineLengthPixels + aaPaddedRoundedCapSizePixels + aaPaddedRoundedCapSizePixels;\n float pixelPositionAlongLine = aaPaddedLineWithCapsLengthPixels * sidenessNorm.y - aaPaddedRoundedCapSizePixels;\n // Position in pixels with origin at first vertex of line segment\n // The line width radius in pixels\n vRadius = lineWidthPixels * 0.5;\n vLineLengthPixels = extendedLineLengthPixels;\n vPosition = czm_writeNonPerspective(vec3(halfAAPaddedLineWidthAndAmplitudePixels * sideness.x, pixelPositionAlongLine, pixelPositionAlongLine / extendedLineLengthPixels), projPos.w);\n#ifdef SILHOUETTE\n gl_Position = isSilhouetteEdge(viewPosV0, aNormalA, aNormalB) ? projPos : vec4(10.0, 10.0, 10.0, 1.0);\n#else /* SILHOUETTE */\n gl_Position = projPos;\n#endif /* SILHOUETTE */\n\n#if (MODE == 2)\n if (unpackedAttributes.edgeType <= 0.0 && lineLengthPixels <= 3.0)\n {\n gl_Position = vec4(10.0, 10.0, 10.0, 1.0);\n }\n#elif (MODE == 1)\n if (lineLengthPixels <= 3.0)\n {\n gl_Position = vec4(10.0, 10.0, 10.0, 1.0); \n }\n#endif\n return projPos;\n}\n\n\n#if (MODE == 2)\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float fType = component.edgeType;\n float extensionLengthPixels = component.extensionLength;\n float lineWidth = component.lineWidth;\n if (fType <= 0.0)\n {\n extensionLengthPixels *= aVariantExtension * 2.0 - 1.0;\n }\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels, fType);\n}\n#else /* (MODE == 2) */\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float extensionLengthPixels = component.extensionLength;\n#if (MODE == 1)\n // extensionLengthPixels = 0.05 * aVariantExtension * 2.0 - 1.0;\n extensionLengthPixels = 5.0;\n#endif\n float lineWidth = component.lineWidth;\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels);\n}\n#endif /* (MODE == 2) */\n\nvarying vec2 fSelected;\n#ifdef BatchTable\nuniform sampler2D batchTexture; \nvec2 computeSt(float batchId)\n{\n float stepX = batchTextureStep.x;\n float centerX = batchTextureStep.y;\n float numberOfAttributes = float(5);\n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);\n}\nvec4 czm_batchTable_operation(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(1);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n return value;\n}\nvec3 czm_batchTable_translate(float batchId) \n{\n vec2 st = computeSt(batchId); \n st.x += batchTextureStep.x * float(3); \n vec4 textureValue = texture2D(batchTexture, st); \n vec3 value = textureValue.xyz; \n return value; \n} \n#endif\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\nvoid s3mBatchOperation(vec4 operationType, inout vec4 vertexColor, inout vec4 vertexPos_0, inout vec4 vertexPos_1, vec3 translation, inout float fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n fSelected = 1.0;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected = 1.0;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos_0.xyz += translation;\n vertexPos_1.xyz += translation;\n }\n}\nvoid main()\n{\n fSelected = vec2(0.0);\n ComponentData component = readComponentData();\n UnpackedAttributes unpackedAttributes = unpackAttributes(component);\n vec4 vertexPos0 = vec4(aPosition0, 1.0);\n vec4 vertexPos1 = vec4(aPosition1, 1.0);\n vec3 translate = uTranslationAndBottom.xyz;\n#ifdef BatchTable\n #ifdef Translation\n translate = czm_batchTable_translate(batchId);\n #endif\n vColor = uLineColor;\n vec4 operationType = czm_batchTable_operation(batchId);\n s3mBatchOperation(operationType, vColor, vertexPos0, vertexPos1, translate, fSelected.x);\n#endif\n vec4 worldPosV0 = czm_model * vertexPos0;\n vec4 worldPosV1 = czm_model * vertexPos1;\n vec4 viewPosV0 = czm_modelView * vertexPos0;\n vec4 viewPosV1 = czm_modelView * vertexPos1;\n#ifdef SILHOUETTE\n vec3 worldNormal = silhouetteWorldNormal(aNormalA, aNormalB);\n#else /* SILHOUETTE */\n vec3 worldNormal = modelToWorldNormal(aNormal);\n#endif /* SILHOUETTE */\n // General geometric computation for all types of edges\n vec4 projPos = calculateGeometricOutputs(viewPosV0, viewPosV1, worldPosV0, worldPosV1, worldNormal, unpackedAttributes);\n calculateStyleOutputs(unpackedAttributes);\n#ifdef EXCAVATION\n vec3 vertexPos = mix(aPosition0.xyz, aPosition1.xyz, aSideness.y);\n vExcavationVertexPos = uGeoMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n vertexLogDepth();\n}\n",_0x2fe6d8=(_0x4c3a37=!0,function(e,t){var i=_0x4c3a37?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c3a37=!1,i}),_0x236e88=_0x2fe6d8(void 0,(function(){return _0x236e88.toString().search("(((.+)+)+)+$").toString().constructor(_0x236e88).search("(((.+)+)+)+$")})),_0x4c3a37;_0x236e88();var _0x171550="\nprecision highp float;\n\n#include \n#include \nvarying vec4 vColor;\nvarying float vRadius;\nvarying vec3 vPosition;\nvarying vec3 vViewPosition;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\nvarying vec2 vStrokeUV;\nuniform sampler2D uStrokesTexture;\nvarying vec2 fSelected;\n#include \n#include \n#include \n#include \n#include \n\n// At which coverage threshold we discard a fragment completely\n#define COVERAGE_TEST_THRESHOLD 0.01\nconst float nearRange = 1000.0;\nconst float farRange = 20000.0;\n\n// Sketch\n#if (MODE == 1)\nconst vec4 RGBA_2_FLOAT_FACTORS = vec4(\n 255.0 / (256.0),\n 255.0 / (256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\n return dot(rgba, RGBA_2_FLOAT_FACTORS);\n}\nfloat calculateLineOffsetSketch()\n{\n float strokesNormalizationScale = 16.0;\n float offsetNorm = rgba2float(texture2D(uStrokesTexture, vStrokeUV));\n return (offsetNorm - 0.5) * strokesNormalizationScale;\n}\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSketch();\n}\nfloat calculateLinePressureSketch() {\n return rgba2float(texture2D(uStrokesTexture, vStrokeUV + vec2(0.0, 0.5)));\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSketch();\n}\n#endif\n\n// Solid\n#if (MODE == 2 || MODE == 0)\nfloat calculateLineOffsetSolid()\n{\n return 0.0;\n}\nfloat calculateLinePressureSolid()\n{\n return 1.0;\n}\n#endif\n\n#if (MODE == 0)\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSolid();\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSolid();\n}\n#endif\n\n// Uber\n#if (MODE == 2)\nvarying float vType;\nfloat calculateLineOffset()\n{\n if (vType <= 0.0)\n {\n return calculateLineOffsetSketch();\n }\n else\n {\n return calculateLineOffsetSolid();\n }\n}\n\nfloat calculateLinePressure()\n{\n if (vType <= 0.0)\n {\n return calculateLinePressureSketch();\n }\n else\n {\n return calculateLinePressureSolid();\n }\n}\n#endif\n\nvec2 lineWithCapsDistance(float radius, vec2 position, float lineLength)\n{\n float lineOffset = calculateLineOffset();\n float positionX = position.x - lineOffset;\n if (radius < 1.0)\n {\n float coverageX = clamp(min(radius, positionX + 0.5) - max(-radius, positionX - 0.5), 0.0, 1.0);\n float coverageY = clamp(min(lineLength, position.y + 0.5) - max(0.0, position.y - 0.5), 0.0, 1.0);\n float coverage = min(coverageX, coverageY);\n return vec2(0.5 - coverage, 0.0);\n }\n else\n {\n // Between -radius -> 0 for start cap, 0 for line, 0 -> radius\n float positionOnCap = position.y - clamp(position.y, 0.0, lineLength);\n vec2 lineToPosition = vec2(positionX, positionOnCap);\n return vec2(length(lineToPosition) - radius, positionOnCap / radius);\n }\n}\n\nvoid main()\n{\n#ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(executeExcavation())\n {\n discard;\n }\n#endif\n vec3 realPosition = czm_readNonPerspective(vPosition, 1.0 / vDistanceFromEye);\n float radius = vRadius * calculateLinePressure();\n vec2 distance = lineWithCapsDistance(radius, realPosition.xy, vLineLengthPixels);\n float coverage = clamp(0.5 - distance.x, 0.0, 1.0);\n#ifdef ANTIALIASING\n const float coverageLimit = COVERAGE_TEST_THRESHOLD;\n#else\n /* ANTIALIASING */\n // Use subpixel coverage computation when lines get subpixel widths\n // so we still render them appropriately. Otherwise discard anything\n // that is not fully within the line\n float coverageLimit = radius <= 0.5 ? COVERAGE_TEST_THRESHOLD : 0.75;\n#endif /* ANTIALIASING */\n if (coverage < coverageLimit || vColor.a < 0.1)\n {\n discard;\n }\n#ifdef WIREFRAME_SELECT_TYPE\n if(fSelected.x < 0.1)\n {\n discard;\n }\n#endif\n float alpha = vColor.a * coverage;\n gl_FragColor = vec4(vColor.rgb, alpha);\n#ifdef CLIP\n gl_FragColor *= clip(vec4(vViewPosition, 1.0), 1.0);\n#endif\n float attenuation = 1.0 - smoothstep(nearRange, farRange, vDistanceFromEye);\n gl_FragColor.a *= attenuation;\n#ifdef LOG_DEPTH\n writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",tmp$1={};tmp$1=function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,(function(e){var i=t[a][1][e];return r(i||e)}),c,c.exports,e,t,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var i="",a=0;a>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t},i.buf2binstring=function(e){return l(e,e.length)},i.binstring2buf=function(e){for(var t=new n.Buf8(e.length),i=0,r=t.length;i4)u[n++]=65533,i+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&i1?u[n++]=65533:r<65536?u[n++]=r:(r-=65536,u[n++]=55296|r>>10&1023,u[n++]=56320|1023&r)}return l(u,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+a[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){function n(e,t,i,n){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==i;){i-=a=i>2e3?2e3:i;do{o=o+(r=r+t[n++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}t.exports=n},{}],4:[function(e,t,i){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,i){function n(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}var r=n();function o(e,t,i,n){var o=r,a=n+i;e^=-1;for(var s=n;s>>8^o[255&(e^t[s])];return-1^e}t.exports=o},{}],6:[function(e,t,i){function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=n},{}],7:[function(e,t,i){var n=30,r=12;t.exports=function(e,t){var i,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S,w,E,P;i=e.state,o=e.next_in,E=e.input,a=o+(e.avail_in-5),s=e.next_out,P=e.output,l=s-(t-e.avail_out),u=s+(e.avail_out-257),c=i.dmax,h=i.wsize,d=i.whave,f=i.wnext,p=i.window,_=i.hold,m=i.bits,g=i.lencode,x=i.distcode,v=(1<>>=b=$>>>24,m-=b,0==(b=$>>>16&255))P[s++]=65535&$;else{if(!(16&b)){if(0==(64&b)){$=g[(65535&$)+(_&(1<>>=b,m-=b),m<15&&(_+=E[o++]<>>=b=$>>>24,m-=b,!(16&(b=$>>>16&255))){if(0==(64&b)){$=x[(65535&$)+(_&(1<c){e.msg="invalid distance too far back",i.mode=n;break e}if(_>>>=b,m-=b,C>(b=s-l)){if((b=C-b)>d&&i.sane){e.msg="invalid distance too far back",i.mode=n;break e}if(S=0,w=p,0===f){if(S+=h-b,b2;)P[s++]=w[S++],P[s++]=w[S++],P[s++]=w[S++],T-=3;T&&(P[s++]=w[S++],T>1&&(P[s++]=w[S++]))}else{S=s-C;do{P[s++]=P[S++],P[s++]=P[S++],P[s++]=P[S++],T-=3}while(T>2);T&&(P[s++]=P[S++],T>1&&(P[s++]=P[S++]))}break}}break}}while(o>3,_&=(1<<(m-=T<<3))-1,e.next_in=o,e.next_out=s,e.avail_in=o>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ne(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function re(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=b,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(J),t.distcode=t.distdyn=new n.Buf32(ee),t.sane=1,t.back=-1,p):g}function oe(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,re(e)):g}function ae(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?g:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,oe(e))):g}function se(e,t){var i,n;return e?(n=new ne,e.state=n,n.window=null,(i=ae(e,t))!==p&&(e.state=null),i):g}function le(e){return se(e,te)}var ue,ce,he=!0;function de(e){if(he){var t;for(ue=new n.Buf32(512),ce=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(u,e.lens,0,288,ue,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(c,e.lens,0,32,ce,0,e.work,{bits:5}),he=!1}e.lencode=ue,e.lenbits=9,e.distcode=ce,e.distbits=5}function fe(e,t,i,r){var o,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(n.arraySet(a.window,t,i-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),n.arraySet(a.window,t,i-r,o,a.wnext),(r-=o)?(n.arraySet(a.window,t,i-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,i.check=o(i.check,we,2,0),ae=0,se=0,i.mode=T;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",i.mode=Q;break}if((15&ae)!==$){e.msg="unknown compression method",i.mode=Q;break}if(se-=4,$e=8+(15&(ae>>>=4)),0===i.wbits)i.wbits=$e;else if($e>i.wbits){e.msg="invalid window size",i.mode=Q;break}i.dmax=1<<$e,e.adler=i.check=1,i.mode=512&ae?M:I,ae=0,se=0;break;case T:for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<>8&1),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0)),ae=0,se=0,i.mode=C;case C:for(;se<32;){if(0===re)break e;re--,ae+=J[te++]<>>8&255,we[2]=ae>>>16&255,we[3]=ae>>>24&255,i.check=o(i.check,we,4,0)),ae=0,se=0,i.mode=S;case S:for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<>8),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0)),ae=0,se=0,i.mode=w;case w:if(1024&i.flags){for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<>>8&255,i.check=o(i.check,we,2,0)),ae=0,se=0}else i.head&&(i.head.extra=null);i.mode=E;case E:if(1024&i.flags&&((ce=i.length)>re&&(ce=re),ce&&(i.head&&($e=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,J,te,ce,$e)),512&i.flags&&(i.check=o(i.check,J,ce,te)),re-=ce,te+=ce,i.length-=ce),i.length))break e;i.length=0,i.mode=P;case P:if(2048&i.flags){if(0===re)break e;ce=0;do{$e=J[te+ce++],i.head&&$e&&i.length<65536&&(i.head.name+=String.fromCharCode($e))}while($e&&ce>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=I;break;case M:for(;se<32;){if(0===re)break e;re--,ae+=J[te++]<>>=7&se,se-=7&se,i.mode=Y;break}for(;se<3;){if(0===re)break e;re--,ae+=J[te++]<>>=1)){case 0:i.mode=D;break;case 1:if(de(i),i.mode=G,t===f){ae>>>=2,se-=2;break e}break;case 2:i.mode=F;break;case 3:e.msg="invalid block type",i.mode=Q}ae>>>=2,se-=2;break;case D:for(ae>>>=7&se,se-=7&se;se<32;){if(0===re)break e;re--,ae+=J[te++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=Q;break}if(i.length=65535&ae,ae=0,se=0,i.mode=B,t===f)break e;case B:i.mode=N;case N:if(ce=i.length){if(ce>re&&(ce=re),ce>oe&&(ce=oe),0===ce)break e;n.arraySet(ee,J,te,ce,ne),re-=ce,te+=ce,oe-=ce,ne+=ce,i.length-=ce;break}i.mode=I;break;case F:for(;se<14;){if(0===re)break e;re--,ae+=J[te++]<>>=5,se-=5,i.ndist=1+(31&ae),ae>>>=5,se-=5,i.ncode=4+(15&ae),ae>>>=4,se-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=Q;break}i.have=0,i.mode=U;case U:for(;i.have>>=3,se-=3}for(;i.have<19;)i.lens[Ee[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,Te={bits:i.lenbits},be=s(l,i.lens,0,19,i.lencode,0,i.work,Te),i.lenbits=Te.bits,be){e.msg="invalid code lengths set",i.mode=Q;break}i.have=0,i.mode=z;case z:for(;i.have>>16&255,ge=65535&Se,!((_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<>>=_e,se-=_e,i.lens[i.have++]=ge;else{if(16===ge){for(Ce=_e+2;se>>=_e,se-=_e,0===i.have){e.msg="invalid bit length repeat",i.mode=Q;break}$e=i.lens[i.have-1],ce=3+(3&ae),ae>>>=2,se-=2}else if(17===ge){for(Ce=_e+3;se>>=_e)),ae>>>=3,se-=3}else{for(Ce=_e+7;se>>=_e)),ae>>>=7,se-=7}if(i.have+ce>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=Q;break}for(;ce--;)i.lens[i.have++]=$e}}if(i.mode===Q)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=Q;break}if(i.lenbits=9,Te={bits:i.lenbits},be=s(u,i.lens,0,i.nlen,i.lencode,0,i.work,Te),i.lenbits=Te.bits,be){e.msg="invalid literal/lengths set",i.mode=Q;break}if(i.distbits=6,i.distcode=i.distdyn,Te={bits:i.distbits},be=s(c,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,Te),i.distbits=Te.bits,be){e.msg="invalid distances set",i.mode=Q;break}if(i.mode=G,t===f)break e;case G:i.mode=V;case V:if(re>=6&&oe>=258){e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,a(e,ue),ne=e.next_out,ee=e.output,oe=e.avail_out,te=e.next_in,J=e.input,re=e.avail_in,ae=i.hold,se=i.bits,i.mode===I&&(i.back=-1);break}for(i.back=0;me=(Se=i.lencode[ae&(1<>>16&255,ge=65535&Se,!((_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<>xe)])>>>16&255,ge=65535&Se,!(xe+(_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<>>=xe,se-=xe,i.back+=xe}if(ae>>>=_e,se-=_e,i.back+=_e,i.length=ge,0===me){i.mode=j;break}if(32&me){i.back=-1,i.mode=I;break}if(64&me){e.msg="invalid literal/length code",i.mode=Q;break}i.extra=15&me,i.mode=k;case k:if(i.extra){for(Ce=i.extra;se>>=i.extra,se-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=W;case W:for(;me=(Se=i.distcode[ae&(1<>>16&255,ge=65535&Se,!((_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<>xe)])>>>16&255,ge=65535&Se,!(xe+(_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<>>=xe,se-=xe,i.back+=xe}if(ae>>>=_e,se-=_e,i.back+=_e,64&me){e.msg="invalid distance code",i.mode=Q;break}i.offset=ge,i.extra=15&me,i.mode=H;case H:if(i.extra){for(Ce=i.extra;se>>=i.extra,se-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=Q;break}i.mode=q;case q:if(0===oe)break e;if(ce=ue-oe,i.offset>ce){if((ce=i.offset-ce)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=Q;break}ce>i.wnext?(ce-=i.wnext,he=i.wsize-ce):he=i.wnext-ce,ce>i.length&&(ce=i.length),pe=i.window}else pe=ee,he=ne-i.offset,ce=i.length;ce>oe&&(ce=oe),oe-=ce,i.length-=ce;do{ee[ne++]=pe[he++]}while(--ce);0===i.length&&(i.mode=V);break;case j:if(0===oe)break e;ee[ne++]=i.length,oe--,i.mode=V;break;case Y:if(i.wrap){for(;se<32;){if(0===re)break e;re--,ae|=J[te++]<=1&&0===G[R];R--);if(I>R&&(I=R),0===R)return _[m++]=20971520,_[m++]=20971520,x.bits=1,0;for(M=1;M0&&(e===s||1!==R))return-1;for(V[1]=0,A=1;Ao||e===u&&N>a)return 1;for(;;){S=A-D,g[L]C?(w=k[W+g[L]],E=U[z+g[L]]):(w=96,E=0),v=1<>D)+(y-=v)]=S<<24|w<<16|E|0}while(0!==y);for(v=1<>=1;if(0!==v?(F&=v-1,F+=v):F=0,L++,0==--G[A]){if(A===R)break;A=t[i+g[L]]}if(A>I&&(F&b)!==$){for(0===D&&(D=I),T+=M,B=1<<(O=A-D);O+Do||e===u&&N>a)return 1;_[$=F&b]=I<<24|O<<16|T-m|0}}return 0!==F&&(_[T+F]=A-D<<24|64<<16|0),x.bits=I,0}},{"../utils/common":1}],10:[function(e,t,i){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,i){function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=n},{}],"/lib/inflate.js":[function(e,t,i){var n=e("./zlib/inflate"),r=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),l=e("./zlib/zstream"),u=e("./zlib/gzheader"),c=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,t.windowBits);if(i!==a.Z_OK)throw new Error(s[i]);this.header=new u,n.inflateGetHeader(this.strm,this.header)}function d(e,t){var i=new h(t);if(i.push(e,!0),i.err)throw i.msg||s[i.err];return i.result}function f(e,t){return(t=t||{}).raw=!0,d(e,t)}h.prototype.push=function(e,t){var i,s,l,u,h,d,f=this.strm,p=this.options.chunkSize,_=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=o.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(p),f.next_out=0,f.avail_out=p),(i=n.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&_&&(d="string"==typeof _?o.string2buf(_):"[object ArrayBuffer]"===c.call(_)?new Uint8Array(_):_,i=n.inflateSetDictionary(this.strm,d)),i===a.Z_BUF_ERROR&&!0===m&&(i=a.Z_OK,m=!1),i!==a.Z_STREAM_END&&i!==a.Z_OK)return this.onEnd(i),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&i!==a.Z_STREAM_END&&(0!==f.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(f.output,f.next_out),u=f.next_out-l,h=o.buf2string(f.output,l),f.next_out=u,f.avail_out=p-u,u&&r.arraySet(f.output,f.output,l,u,0),this.onData(h)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&i!==a.Z_STREAM_END);return i===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=h,i.inflate=d,i.inflateRaw=f,i.ungzip=d},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js");var nt$9=tmp$1,n$K;function w$Q(e){var t=e.uint8Array,i=e.format,n=e.request,r=u$_(e.flipY,!1);o$1q.typeOf.object("uint8Array",t),o$1q.typeOf.string("format",i);var o,a=new Blob([t],{type:i});return t$11.supportsImageBitmapOptions().then((function(e){return e?o$1l(t$11.createImageBitmapFromBlob(a,{flipY:r,premultiplyAlpha:!1})):new t$11({url:o=window.URL.createObjectURL(a),request:n}).fetchImage({flipY:r})})).then((function(e){return e$2b(o)&&window.URL.revokeObjectURL(o),e})).otherwise((function(e){return e$2b(o)&&window.URL.revokeObjectURL(o),o$1l.reject(e)}))}function h$T(e,t,i){if(!e$2b(t))throw new t$16("resourceOrUrlOrBuffer is required.");var n;t instanceof ArrayBuffer||ArrayBuffer.isView(t)?n=o$1l.resolve(t):n=t$11.createIfNeeded(t).fetchArrayBuffer();if(e$2b(n))return n.then((function(t){if(e$2b(t)){var n=[];t instanceof ArrayBuffer?n.push(t):(0===t.byteOffset&&t.byteLength===t.buffer.byteLength||(t=t.slice(0,t.length)),n.push(t.buffer));var r=u$_(i,!1);return e.scheduleTask({data:t,bMipMap:r},n)}})).then((function(e){return e$1H.clone(e)}))}function o$U(){}function P$R(){var e=o$U._transcodeTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/basis_transcoder.js",wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then((function(){return o$U._transcodeTaskProcessor}));o$U._readyPromise=e}function f$S(e,t){var i;(o$1q.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?i=o$1l.resolve(e):i=t$11.createIfNeeded(e).fetchArrayBuffer();return i.then((function(e){return o$U.transcode(e,n$K,t)}))}o$U._transcodeTaskProcessor=new i$V("transcodeKTX2",Number.POSITIVE_INFINITY),o$U._readyPromise=void 0,o$U.transcode=function(e,t,i){return o$1q.defined("supportedTargetFormats",t),e$2b(o$U._readyPromise)||P$R(),o$U._readyPromise.then((function(n){var r;if(e instanceof ArrayBuffer){var o=new Uint8Array(e);return r={supportedTargetFormats:t,ktx2Buffer:o,testId:i},n.scheduleTask(r,[e])}return r={supportedTargetFormats:t,ktx2Buffer:e},n.scheduleTask(r)})).then((function(e){var t,i=e.length,n=Object.keys(e[0]),r=n.length;for(t=0;t0||(e$2b(this.baseColorTexture)||e$2b(this.normalTexture)||e$2b(this.emissiveTexture)||e$2b(this.metallicRoughnessTexture)||e$2b(this.occlusionTexture))}}}),_0x21d1b1.prototype.clone=function(e){for(var t in e$2b(e)||(e=new _0x21d1b1({})),e._ambientColor=e$1U.clone(this._ambientColor),e._diffuseColor=e$1U.clone(this._diffuseColor),e._specularColor=e$1U.clone(this._specularColor),e._bTransparentSorting=this._bTransparentSorting,e._shininess=this._shininess,e._texMatrix=p$1d.clone(this._texMatrix),e._usePBR=this._usePBR,e._alphaMode=this._alphaMode,e._isInvalidOblique=this._isInvalidOblique,e._isKTK2=this._isKTK2,e._RGBTOBGR=this._RGBTOBGR,e.isAssociateMaterial=this.isAssociateMaterial,this._usePBR&&(e._alphaCutoff=this._alphaCutoff,e._baseColor=e$1U.clone(this._baseColor),e._baseColorTextureIndex=this._baseColorTextureIndex,e._baseColorTextureCoordIndex=this._baseColorTextureCoordIndex,e._doubleSided=this._doubleSided,e._emissiveFactor=e$1U.clone(this._emissiveFactor),e._emissiveTextureIndex=this._emissiveTextureIndex,e._emissiveTextureCoordIndex=this._emissiveTextureCoordIndex,e._roughnessFactor=this._roughnessFactor,e._metallicFactor=this._metallicFactor,e._metallicRoughnessTextureIndex=this._metallicRoughnessTextureIndex,e._metallicRoughnessTextureCoordIndex=this._metallicRoughnessTextureCoordIndex,e._normalTextureIndex=this._normalTextureIndex,e._normalTextureCoordIndex=this._normalTextureCoordIndex,e._normalTextureScale=this._normalTextureScale,e._occlusionTextureIndex=this._occlusionTextureIndex,e._occlusionTextureCoordIndex=this._occlusionTextureCoordIndex,e._occlusionTextureStrength=this._occlusionTextureStrength,e._baseColorTextureMotion=new _0x4fbea6,e._baseColorTextureMotion.clone(this._baseColorTextureMotion),e._emissiveTextureMotion=new _0x4fbea6,e._emissiveTextureMotion.clone(this._emissiveTextureMotion),e._usePBRTextureBatch=this._usePBRTextureBatch,e.baseColorTexture=this.baseColorTexture,e.normalTexture=this.normalTexture,e.emissiveTexture=this.emissiveTexture,e.metallicRoughnessTexture=this.metallicRoughnessTexture,e.occlusionTexture=this.occlusionTexture,e.pbrParamTexture=this.pbrParamTexture),this._textures){!e$2b(i=this._textures[t])||(this._isKTK2?i._inner._context._textureCache.getTexture(i.keyword):Se$d.AddRef(i.id),e._textures[t]=this._textures[t])}for(var t in this._mapTextures){var i;!e$2b(i=this._mapTextures[t])||(Se$d.AddRef(i.id),e._mapTextures[t]=this._mapTextures[t])}},_0x21d1b1.prototype.requestSharedTexture=function(e,t,i,n,r,o,a,s){var l=Se$d._shareTextureCache[e];e$2b(l)||(l=o$10(e,o),Se$d._shareTextureCache[e]=l);var u=this;return o$1l(l,(function(i){var o;if(i instanceof ArrayBuffer){var l,c=new Uint32Array(i,0,6),h=c[0],d=c[1],f=c[2],p=c[3],_=c[4],m=c[5],g=new Uint8Array(i,24,m);if(m===_)l=g;else{var x=nt$9.inflate(g).buffer;l=new Uint8Array(x,0,_)}(o=Se$d.CreateTexture(t,n,d,f,p,h,l,!1,a,s)).isShared=!0,o.sharedKey=e}else o=i;var v=u._baseColorTextureIndex===r,y=u._emissiveTextureIndex===r,$=u._normalTextureIndex===r,b=u._metallicRoughnessTextureIndex===r,T=u._occlusionTextureIndex===r;v?u.baseColorTexture=o:y?u.emissiveTexture=o:$?u.normalTexture=o:b?u.metallicRoughnessTexture=o:T&&(u.occlusionTexture=o),0==r&&u._textures.length>0?u._textures.splice(0,0,o):u._textures.push(o),Se$d._shareTextureCache[e]=o})),l},_0x21d1b1.prototype.createWebp=function(e,t,i,n,r,o,a,s,l,u,c){var h=Se$d.textureManager.textures[e];if(c=u$_(c,!0),e$2b(h))return this._textures.push(h),Se$d.textureManager.refCounts[e]++,h;for(var d=r.length,f=r.byteOffset,p=new DataView(r.buffer),_=0,m=[];_0?y._textures.splice(0,0,a):y._textures.push(a)}var u=i._gl;if(t.length>1&&c){u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,a._texture);for(var h=1,d=t.length;h0?h._textures.splice(0,0,s):h._textures.push(s),d.resolve(s)}})).otherwise((function(e){console.error(e)})),d.promise},_0x21d1b1.prototype.createPBRParamter=function(e){if(e$2b(e.pbrMetallicRoughness)){var t=e.pbrMetallicRoughness;this._usePBR=!0,this._alphaCutoff=u$_(t.alphaCutoff,e.alphaCutoff),this._alphaMode=u$_(t.alphaMode,e.alphaMode),this._baseColor=new e$1U(t.baseColor.x,t.baseColor.y,t.baseColor.z,t.baseColor.w),this._baseColorTextureIndex=t.baseColorTextureIndex,this._baseColorTextureCoordIndex=t.baseColorTextureCoordIndex,this._doubleSided=t.doubleSided,this._emissiveFactor=new e$1U(t.emissiveFactor.x,t.emissiveFactor.y,t.emissiveFactor.z,1),this._emissiveTextureIndex=t.emissiveTextureIndex,this._emissiveTextureCoordIndex=t.emissiveTextureCoordIndex,this._roughnessFactor=t.roughnessFactor,this._metallicFactor=t.metallicFactor,this._metallicRoughnessTextureIndex=t.metallicRoughnessTextureIndex,this._metallicRoughnessTextureCoordIndex=t.metallicRoughnessTextureCoordIndex,this._normalTextureIndex=t.normalTextureIndex,this._normalTextureCoordIndex=t.normalTextureCoordIndex,this._normalTextureScale=t.normalTextureScale,this._occlusionTextureIndex=t.occlusionTextureIndex,this._occlusionTextureCoordIndex=t.occlusionTextureCoordIndex,this._occlusionTextureStrength=t.occlusionTextureStrength,this._baseColorTextureMotion=new _0x4fbea6(t.baseColorTextureMotion),this._emissiveTextureMotion=new _0x4fbea6(t.emissiveTextureMotion),this.baseColorTexture=t.baseColorTexture,this.normalTexture=t.normalTexture,this.emissiveTexture=t.emissiveTexture,this.metallicRoughnessTexture=t.metallicRoughnessTexture,this.occlusionTexture=t.occlusionTexture}},_0x21d1b1.prototype.createCRN=function(e,t,i,n,r,o,a,s,l,u){var c;if(l=u$_(l,!0),s?c=a$P(r.imageBuffer,!0,!0):_0x46a73d.CRNTaskProcessorReady&&(c=h$T(_0x46a73d.CRNProcessor,r.imageBuffer,!0)),e$2b(c)){var h=this;return c.then((function(t){if(!h.isDestroyed()){u=u$_(u,{});var s=Se$d.CreateTexture(e,i,r.width,r.height,r.nFormat,_0x2072ef.enrS3TCDXTN,t.bufferView,!1,o,a,l);u.isEmissiveTex?h.emissiveTexture=s:u.isNormalTexture?h.normalTexture=s:u.isMetallicRoughnessTexture?h.metallicRoughnessTexture=s:u.isBaseColorTexture?h.baseColorTexture=s:0===n&&h._textures.length>0?h._textures.splice(0,0,s):h._textures.push(s)}})),c}},_0x21d1b1.prototype.createKTX2=function(e,t,i,n,r,o,a,s){this._isKTK2=!0;var l=i._textureCache.getTexture(e);if(s=u$_(s,!0),e$2b(l))return this._textures.push(l),l;var u=f$S(r.imageBuffer,r.id);if(e$2b(u)){var c=this;return u.then((function(t){var n=i._textureCache.getTexture(e);if(e$2b(n))c._textures.push(n);else{var r,l=0;Array.isArray(t)&&(l=t.length,r=t.slice(1,t.length).map((function(e){return e.bufferView})),t=t[0]);var u=!0;(!e$2a.isPowerOfTwo(t.width)||!e$2a.isPowerOfTwo(t.height))&&(o=q$19.CLAMP_TO_EDGE,a=q$19.CLAMP_TO_EDGE,u=!1),s||(l=0,r=void 0,u=!1);var h=new e$1P({wrapS:o,wrapT:a,minificationFilter:0!==l&&u?tt$h.LINEAR_MIPMAP_LINEAR:tt$h.LINEAR,magnificationFilter:tt$h.LINEAR});(n=e$2b(t.internalFormat)?new t$V({context:i,pixelFormat:t.internalFormat,width:t.width,height:t.height,source:{arrayBufferView:t.bufferView,mipLevels:r},sampler:h}):new t$V({context:i,source:t,sampler:h})).keyword=e,c._textures.push(n),i._textureCache.addTexture(e,n)}})).otherwise((function(e){console.log(e)})),u}},_0x21d1b1.prototype.createCommonParamter=function(e){var t=u$_(e.ambient,e$1U.WHITE);this._ambientColor=new e$1U(t.r,t.g,t.b,t.a);var i=u$_(e.diffuse,e$1U.WHITE);this._diffuseColor=new e$1U(i.r,i.g,i.b,i.a);var n=u$_(e.specular,e$1U.WHITE);this._specularColor=new e$1U(n.r,n.g,n.b,n.a),this._shininess=u$_(e.shininess,10),this._bTransparentSorting=u$_(e.transparentsorting,!1)};var _0x5c0770=new e$29;function _0x4fbea6(e){if(!e$2b(e))return this.OffsetPeriod=0,this.OffsetSpeedU=0,this.OffsetSpeedV=0,this.TilingPeriod=0,this.TilingSpeedU=0,void(this.TilingSpeedV=0);this.OffsetPeriod=e.offsetPeriod,this.OffsetSpeedU=e.offsetSpeedU,this.OffsetSpeedV=e.offsetSpeedV,this.TilingPeriod=e.tilingPeriod,this.TilingSpeedU=e.tilingSpeedU,this.TilingSpeedV=e.tilingSpeedV}_0x21d1b1.prototype.createPBRUniformMap=function(){var e={};if(!this._usePBR)return e;var t=this;e.u_metallicFactor=function(){return t._metallicFactor},e.u_roughnessFactor=function(){return t._roughnessFactor},e.u_emissiveFactor=function(){return t._emissiveFactor},e.u_baseColorFactor=function(){return t._baseColor},e.u_alphaCutoff=function(){return t._alphaCutoff},e.u_baseColorTexture=function(){return t._textures[t._baseColorTextureIndex]},e.u_metallicRoughnessTexture=function(){return t._textures[t._metallicRoughnessTextureIndex]},e.u_normalTexture=function(){return t._textures[t._normalTextureIndex]},e.u_occlusionTexture=function(){return t._textures[t._occlusionTextureIndex]},e.u_emissiveTexture=function(){return t._textures[t._emissiveTextureIndex]};var i=t._emissiveTextureMotion;e.u_emissiveUVOffsetAndTiling=function(){var e=performance.now()/1e3;if(i._offsetPeriod>0){var t=e%i._offsetPeriod;_0x5c0770.x=t*i._offsetSpeedU,_0x5c0770.y=t*i._offsetSpeedV}else _0x5c0770.x=0,_0x5c0770.y=0;if(i._tilingPeriod>0){var n=e%i._tilingPeriod;_0x5c0770.z=1+n*i._tilingSpeedU,_0x5c0770.w=1+n*i._tilingSpeedV}else _0x5c0770.z=1,_0x5c0770.w=1;return _0x5c0770};var n=t._baseColorTextureMotion;return e.u_baseColorUVOffsetAndTiling=function(){var e=performance.now()/1e3;if(n._offsetPeriod>0){var t=e%n._offsetPeriod;_0x5c0770.x=t*n._offsetSpeedU,_0x5c0770.y=t*n._offsetSpeedV}else _0x5c0770.x=0,_0x5c0770.y=0;if(n._tilingPeriod>0){var i=e%n._tilingPeriod;_0x5c0770.z=1+i*n._tilingSpeedU,_0x5c0770.w=1+i*n._tilingSpeedV}else _0x5c0770.z=1,_0x5c0770.w=1;return _0x5c0770},e},_0x21d1b1.prototype.appendPBRMacroToShader=function(e,t){!this._usePBR||(e.defines.push("USE_PBR"),t.defines.push("USE_PBR"),this._baseColorTextureIndex>=0&&t.defines.push("HAS_BASECOLOR_TEXTURE"),this._normalTextureIndex>=0&&t.defines.push("HAS_NORMAL_TEXTURE"),this._metallicRoughnessTextureIndex>=0&&t.defines.push("HAS_METALLICROUGHNESS_TEXTURE"),this._occlusionTextureIndex>=0&&t.defines.push("HAS_OCCLUSION_TEXTURE"),this._emissiveTextureIndex>=0&&t.defines.push("HAS_EMISSIVE_TEXTURE"),this._doubleSided&&t.defines.push("DOUBLE_SIDED"))},_0x21d1b1.Default=new _0x21d1b1,_0x21d1b1.prototype.isDestroyed=function(){return!1},_0x21d1b1.prototype.destroy=function(){for(var e in this._ambientColor=null,this._diffuseColor=null,this._specularColor=null,this._textures){e$2b(t=this._textures[e])&&(this._isKTK2?t.destroy():Se$d.DestroyTexture(t.id))}for(var e in this._mapTextures){var t;e$2b(t=this._mapTextures[e])&&Se$d.DestroyTexture(t.id)}return i$10(this)},_0x4fbea6.prototype.clone=function(e){this.OffsetPeriod=e.OffsetPeriod,this.OffsetSpeedU=e.OffsetSpeedU,this.OffsetSpeedV=e.OffsetSpeedV,this.TilingPeriod=e.TilingPeriod,this.TilingSpeedU=e.TilingSpeedU,this.TilingSpeedV=e.TilingSpeedV};var _0x4f9230=(_0x3bc009=!0,function(e,t){var i=_0x3bc009?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3bc009=!1,i}),_0x4a5ff6=_0x4f9230(void 0,(function(){return _0x4a5ff6.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a5ff6).search("(((.+)+)+)+$")})),_0x3bc009;_0x4a5ff6();var _0x4cd7d7={EXCAVATION:"EXCAVATION",FALTTEN:"FALTTEN",OVERLAY:"OVERLAY",HYPSOMETRIC:"HYPSOMETRIC",ADJUST_COLOR:"ADJUST_COLOR",TRANSPARENT_BACK_COLOR:"TRANSPARENT_BACK_COLOR",HORIZONTAL_LINE:"HORIZONTAL_LINE",COMPUTE_W_VALUE:"COMPUTE_W_VALUE",COMPUTE_TEXCOORD:"COMPUTE_TEXCOORD",HAS_LIGHT:"HAS_LIGHT",HAS_NORMAL:"HAS_NORMAL",REPLACE_SELECT_TYPE:"REPLACE_SELECT_TYPE",SILHOUETTE_SELECT_TYPE:"SILHOUETTE_SELECT_TYPE",MULTI_TEX:"MULTI_TEX",APPLY_SPLIT:"APPLY_SPLIT",APPLY_SWIPE:"APPLY_SWIPE",TEXCOORD:"TexCoord",TEXCOORD2:"TexCoord2",COMPRESS_VERTEX:"COMPRESS_VERTEX",COMPRESS_NORMAL:"COMPRESS_NORMAL",COMPRESS_COLOR:"COMPRESS_COLOR",COMPRESS_TEXCOORD:"COMPRESS_TEXCOORD",SKETCH_MODE:"SKETCH_MODE",NORMAL_AND_DEPTH:"NORMAL_AND_DEPTH",POST_EFFECT:"POST_EFFECT",CLIP_FILT_BY_ID:"CLIP_FILT_BY_ID",CLIP:"CLIP",CLIPPLANE:"CLIPPLANE",PBR:"PBR",PT_CLOUD:"PT_CLOUD",DIR_LIGHTS:"DIR_LIGHTS ",POINT_LIGHTS:"POINT_LIGHTS ",SPOT_LIGHTS:"SPOT_LIGHTS ",HEMISPHERE_LIGHTS:"HEMISPHERE_LIGHTS ",W_VISIBLE:"W_VISIBLE",EMISSION_TEXTURE_ATLAS:"EMISSION_TEXTURE_ATLAS",EMISSION_TEXTURE_COUNT:"EMISSION_TEXTURE_COUNT ",TEXTURE_MOVE:"TEXTURE_MOVE",VOLUME:"Volume",VOLUME2:"Volume2",TEXTURE_COORD_ONE_IS_W:"TEXTURE_COORD_ONE_IS_W",TRIANGLE_FILTRATE:"TRIANGLE_FILTRATE",UseInstanceSkeletonMatrix:"UseInstanceSkeletonMatrix",RGBTOBGR:"RGBTOBGR",HAS_SKELETONSELECTED:"HAS_SKELETONSELECTED",SKELETONSELECT_ENABLE:"SKELETONSELECT_ENABLE",REPLACE_COLOR_TYPE:"REPLACE_COLOR_TYPE",INVALID_OBLIQUE:"INVALID_OBLIQUE",IGNORE_NORMAL:"IGNORE_NORMAL",TextureBatch:"TextureBatch",Translation:"Translation",VOL_AND_HYP:"VOL_AND_HYP",VERTEX_CAPTURE:"VERTEX_CAPTURE",SEC_TEX_EMISSION:"SEC_TEX_EMISSION",BRDF:"BRDF",PBR_THEME:"PBR_THEME",IBL:"IBL",POINT:"POINT",HAS_BASE_TEXTURE:"HAS_BASE_TEXTURE",HAS_NORMAL_TEXTURE:"HAS_NORMAL_TEXTURE",HAS_OCCLUSION_TEXTURE:"HAS_OCCLUSION_TEXTURE",HAS_EMISSIVE_TEXTURE:"HAS_EMISSIVE_TEXTURE",USE_BatchPBR:"USE_BatchPBR",HAS_DIR_LIGHTS:"HAS_DIR_LIGHTS",HAS_POINT_LIGHTS:"HAS_POINT_LIGHTS",HAS_SPOT_LIGHTS:"HAS_SPOT_LIGHTS",HAS_HEMISPHERE_LIGHTS:"HAS_HEMISPHERE_LIGHTS",NO_TEXCOORD:"NO_TEXCOORD",FLOOD_ANALYSIS:"FLOOD_ANALYSIS",HAS_RAIN:"HAS_RAIN",HAS_WETNESS:"HAS_WETNESS",HAS_SNOW:"HAS_SNOW",HAS_MetallicRoughness_TEXTURE:"HAS_MetallicRoughness_TEXTURE",FusionMode:"FusionMode",VISIBLEDISTANCEMAX:"VISIBLEDISTANCEMAX",MASK:"MASK",LineVector:"LineVector",KtxEnvMap:"KtxEnvMap",WIREFRAME_SELECT_TYPE:"WIREFRAME_SELECT_TYPE",Has_Texture:"Has_Texture",UseFloatTexture:"UseFloatTexture",HypColorByZValue:"HypColorByZValue"},Y$H=Object.freeze(_0x4cd7d7),e$1e={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3},i$Q=Object.freeze(e$1e),_0x459cf2=(_0x22ea2b=!0,function(e,t){var i=_0x22ea2b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x22ea2b=!1,i}),_0x123bea=_0x459cf2(void 0,(function(){return _0x123bea.toString().search("(((.+)+)+)+$").toString().constructor(_0x123bea).search("(((.+)+)+)+$")})),_0x22ea2b;_0x123bea();var _0xda3acb={S3M:49,S3M4:1},_0x41168d=Object.freeze(_0xda3acb),_0x5bb0ac=(_0x5d3176=!0,function(e,t){var i=_0x5d3176?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d3176=!1,i}),_0x3508cb=_0x5bb0ac(void 0,(function(){return _0x3508cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x3508cb).search("(((.+)+)+)+$")})),_0x5d3176;_0x3508cb();var _0x130901={RESET:0,SetColor:1,SELECTED:2,HIDE:4,OFFSET:8,CLIP:16,BLOOM:32,ALL:255},_0x4580ad=Object.freeze(_0x130901),_0x57d5fa=(_0x19118e=!0,function(e,t){var i=_0x19118e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19118e=!1,i}),_0x25de9e=_0x57d5fa(void 0,(function(){return _0x25de9e.toString().search("(((.+)+)+)+$").toString().constructor(_0x25de9e).search("(((.+)+)+)+$")})),_0x19118e;_0x25de9e();var _0x18a3ed={MIX:0,REPLACE:1},_0x203e3b=Object.freeze(_0x18a3ed),_0x2e0f29=(_0x2e1146=!0,function(e,t){var i=_0x2e1146?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e1146=!1,i}),_0x5edc52=_0x2e0f29(void 0,(function(){return _0x5edc52.toString().search("(((.+)+)+)+$").toString().constructor(_0x5edc52).search("(((.+)+)+)+$")})),_0x2e1146;_0x5edc52();var _0x36c72a={DIRECTIONAL:0,POINT:1,SPOT:2,HEMISPHERE:3},_0x1d9df9=Object.freeze(_0x36c72a),_0x5e42fd=(_0x356081=!0,function(e,t){var i=_0x356081?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x356081=!1,i}),_0x4559f9=_0x5e42fd(void 0,(function(){return _0x4559f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4559f9).search("(((.+)+)+)+$")})),_0x356081;_0x4559f9();var _0x2ecd22={POINT:0,VOXEL:1},_0x16e744=Object.freeze(_0x2ecd22),_0x52c0c7=(_0x106b23=!0,function(e,t){var i=_0x106b23?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x106b23=!1,i}),_0x358d29=_0x52c0c7(void 0,(function(){return _0x358d29.toString().search("(((.+)+)+)+$").toString().constructor(_0x358d29).search("(((.+)+)+)+$")})),_0x106b23;_0x358d29();var _0x2fc230={NONE:0,TITANIUM_SCUFFED:1,METAL_PLATE:2,EMISSION:4,ROUGHNESS:8},je$g=Object.freeze(_0x2fc230),_0x38da57=(_0x5a2583=!0,function(e,t){var i=_0x5a2583?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a2583=!1,i}),_0x5a0a8c=_0x38da57(void 0,(function(){return _0x5a0a8c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a0a8c).search("(((.+)+)+)+$")})),_0x5a2583;_0x5a0a8c();var _0x2a7fd2="\n#include \n\nvar uFrontColorTexture : texture_2d;\nvar uFrontColorTextureSampler : sampler;\nvar uFrontDepthTexture : texture_2d;\nvar uFrontDepthTextureSampler : sampler;\nvar uBackDepthTexture : texture_2d;\nvar uBackDepthTextureSampler : sampler;\n\nuniform uSQMode : f32;\n\nvarying vSecondColor : vec4; \nvarying vColor : vec4;\nvarying vSQ_clip_pos : vec4;\n\nfn reverseLogDepth(logZ : f32) -> f32\n{\n#ifdef LOG_DEPTH\n var near = Scene.uCurrentFrustum.x;\n var far = Scene.uCurrentFrustum.y;\n var log2Depth = logZ * Scene.uLog2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#else\n return logZ;\n#endif\n}\n\nfn unpackDepth(packedDepth : vec4) -> f32\n{\n return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n}\n\nfn isPointInObject(ndc : vec4) -> bool\n{\n var depthTexCoord = ndc.xy * 0.5 + 0.5;\n var bIn = false;\n var color = textureSample(uFrontColorTexture, uFrontColorTextureSampler, depthTexCoord.xy);\n var pixelZWindow = ndc.z;\n if(color.r > 0.99 && color.g < 0.01 && color.b < 0.01)\n {\n var z_window_near = unpackDepth(textureSampleLevel(uFrontDepthTexture, uFrontDepthTextureSampler, depthTexCoord.xy, 0.0));\n z_window_near = reverseLogDepth(z_window_near);\n var z_window_far = unpackDepth(textureSampleLevel(uBackDepthTexture, uBackDepthTextureSampler, depthTexCoord.xy, 0.0));\n z_window_far = reverseLogDepth(z_window_far);\n if(pixelZWindow - z_window_near > -0.0000001 && z_window_far - pixelZWindow > -0.0000001)\n {\n bIn = true;\n }\n }\n if(uniforms.uSQMode < 0.5){\n return !bIn;\n }\n else{\n return bIn;\n }\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var ndc = vSQ_clip_pos / vSQ_clip_pos.w; \n if(!isPointInObject(ndc)) \n { \n discard; \n } \n if(vColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = vSecondColor; \n}",_0x2a6cb7=(_0x77ceda=!0,function(e,t){var i=_0x77ceda?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x77ceda=!1,i}),_0x59f65d=_0x2a6cb7(void 0,(function(){return _0x59f65d.toString().search("(((.+)+)+)+$").toString().constructor(_0x59f65d).search("(((.+)+)+)+$")})),_0x77ceda;function _0x104945(e,t){this._content=e,this._id=t,this._batchId=t,this._color=new e$1U(1,1,1,1),this._imageUrl="",this._vertexOffset=[],this._instanceIds=void 0,this._pbrMaterialIndex=void 0}_0x59f65d(),Object.defineProperties(_0x104945.prototype,{show:{get:function(){return!0},set:function(e){}},color:{get:function(){return e$2b(this._color)||(this._color=new e$1U),this._color},set:function(e){this._color=e}},pbrMaterialIndex:{get:function(){return e$2b(this._pbrMaterialIndex)||(this._pbrMaterialIndex=0),this._pbrMaterialIndex},set:function(e){this._pbrMaterialIndex=e}},imageUrl:{get:function(){return this._imageUrl},set:function(e){this._imageUrl=e}},id:{get:function(){return this._id},set:function(e){this._id=e}},batchId:{get:function(){return this._batchId},set:function(e){this._batchId=e}},instanceIds:{get:function(){return this._instanceIds},set:function(e){this._instanceIds=e}}}),_0x104945.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},_0x104945.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},_0x104945.prototype.getProperty=function(e){return this[e]},_0x104945.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},_0x104945.prototype.addVertexOffset=function(e,t){this._vertexOffset.push({vertexCount:e,vertexOffset:t})},_0x104945.prototype.getVertexOffset=function(){return this._vertexOffset},_0x104945.prototype.getRenderBatchKey=function(){var e=this._color.toCssColorString();return this._imageUrl+"_"+e};var _0x36af16=(_0x481689=!0,function(e,t){var i=_0x481689?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x481689=!1,i}),_0x1b0c71=_0x36af16(void 0,(function(){return _0x1b0c71.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b0c71).search("(((.+)+)+)+$")})),_0x481689;_0x1b0c71();var _0x10b3f1=function(){this.model=void 0,this.context=void 0,this.texture=void 0,this.subTextureInfo=void 0};_0x10b3f1.prototype.set=function(e,t,i,n,r){this.model=t,this.context=e,this.texture=i,this.subTextureInfo=n,this.textureLod=r},_0x10b3f1.prototype.execute=function(){var e=this.subTextureInfo;if(!this.texture.ready){if(!this.textureLod)return this.texture.arrayBufferView=e.arrayBufferView,void this.texture.init();this.texture.init()}this.texture.copyFrom({xOffset:e.xOffset,yOffset:e.yOffset,width:e.width,height:e.height,arrayBufferView:e.arrayBufferView})};var _0x4292cf=(_0x292819=!0,function(e,t){var i=_0x292819?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x292819=!1,i}),_0x1d8b09=_0x4292cf(void 0,(function(){return _0x1d8b09.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d8b09).search("(((.+)+)+)+$")})),_0x292819;_0x1d8b09();var _0x50ea4a="\n#include \n#include \n#include \n#include \nattribute vec4 aPosition; \n#ifdef USE_VertexWeight \n attribute float aVertexWeight; \n #ifdef MultiTemporalWeight \n attribute float aVertexWeight_1; \n #endif \n#endif \n#ifdef HAS_NORMAL \n attribute vec3 aNormal; \n#endif \n#ifdef TexCoord \n attribute vec4 aTexCoord0; \n#endif \n#ifdef VertexColor \nattribute vec4 aColor; \n#endif \nvarying float v_pixelDistance; \nvarying vec4 vPosition; \n#ifdef COMPRESS_TEXCOORD \n#ifdef TexCoord \n attribute vec4 aTexCoordZ0; \n#endif \n#endif \n#ifdef COMPUTE_W_VALUE \n varying float wValue; \n#endif \n#ifdef HYPSOMETRIC \n uniform sampler2D uHypsometricTexture; \n#endif \n varying vec4 vColor; \n varying vec4 vPositionMC; \n#include \n#ifdef HYPSOMETRIC \nvec4 computeContourMapColor(float fValue) \n{ \n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0); \n float contourRate = (fValue - uHypFloor) / threshold; \n float finalCoord = clamp(contourRate, 0.0, 1.0); \n float count = floor(finalCoord * 16.0); \n float y = (count*2.0 + 1.0)/32.0; \n float x = fract(finalCoord*16.0); \n if(y > 1.0) \n { \n x = 1.0; \n } \n vec2 contourCoord = vec2(x, y); \n return texture2D(uHypsometricTexture, contourCoord).rgba; \n} \nvec4 getHypsometricColor(vec4 oriColor, float fValue) \n{ \n vec4 contourMapColor = vec4(0.0); \n float finalOpacity = uHypOpacity; \n if(fValue > uHypMaxVisibleValue || fValue < uHypMinVisibleValue) \n { \n return uNoValueColor * oriColor; \n } \n contourMapColor = computeContourMapColor(fValue); \n finalOpacity *= sign(uHypContourFillMode); \n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity); \n return mixColor; \n} \n#endif \n \nvec3 realNormal; \nvoid main() \n{ \n#ifdef COMPRESS_VERTEX \n vec4 vertexPos = vec4(1.0); \n vertexPos = decode_position_min + aPosition * decode_position_normConstant; \n#else \n vec4 vertexPos = aPosition; \n#endif \n#ifdef HAS_NORMAL \n realNormal = aNormal; \n #ifdef COMPRESS_NORMAL \n realNormal = czm_octDecode(aNormal.xy, normal_rangeConstant).zxy; \n #endif \n#endif \n float oriVertexW = computeWValue(vertexPos); \n vertexPos.w = 1.0; \nvec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n #ifdef COMPRESS_COLOR \n #ifdef MeshOPT_Compress \n vertexColor = aColor; \n #else \n vertexColor = aColor / 255.0; \n #endif \n #else \n vertexColor = aColor; \n #endif \n#endif \n vColor = vertexColor*uFillForeColor; \n vPositionMC.xyz = vertexPos.xyz; \n vPositionMC.w = 0.0; \n gl_Position = uViewProjection * uModelMatrix * vertexPos; \n#ifdef HYPSOMETRIC \n vColor = getHypsometricColor(vColor, wValue); \n#endif \n v_pixelDistance = 2.0 / uPointSize;\n gl_PointSize = uPointSize; \n vPosition = uView * uModelMatrix * vertexPos; \n}",_0x30769e=(_0x567353=!0,function(e,t){var i=_0x567353?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x567353=!1,i}),_0x45d9f3=_0x30769e(void 0,(function(){return _0x45d9f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x45d9f3).search("(((.+)+)+)+$")})),_0x567353;_0x45d9f3();var _0x18fcae="#ifdef GL_OES_standard_derivatives \n#extension GL_OES_standard_derivatives : enable \n#endif \n#include \n#include \n#include \n#include \n#ifdef COMPUTE_W_VALUE \n varying float wValue; \n#endif \nvarying vec4 vColor; \nvarying vec4 vPositionMC; \nvarying vec4 vPosition; \nvarying float v_pixelDistance; \n#include \n#include \n#include \nvoid main() \n{ \n preClip();\n vec4 finalColor = vColor; \n#ifdef ADJUST_COLOR \n finalColor.rgb = adjustColor(finalColor.rgb);\n#endif \n float distanceToCenter = length(gl_PointCoord - vec2(0.5)); \n float maxDistance = max(0.0, 0.5 - v_pixelDistance); \n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter); \n finalColor.a *= wholeAlpha; \n\tif(finalColor.a < 0.1) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef CLIP \n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n#ifdef PREPASS\n gl_FragData[0] = vPosition;\n gl_FragData[1] = vec4(0.0, 0.0, 0.0, 1.0);\n gl_FragData[2] = vec4(0.0, 0.0, 0.0, 1.0);\n#else\n gl_FragColor = czm_gammaCorrect(finalColor); \n#endif\n \n}",_0x108904=(_0x1c59d9=!0,function(e,t){var i=_0x1c59d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c59d9=!1,i}),_0x34ba9d=_0x108904(void 0,(function(){return _0x34ba9d.toString().search("(((.+)+)+)+$").toString().constructor(_0x34ba9d).search("(((.+)+)+)+$")})),_0x1c59d9;_0x34ba9d();var _0x390e70="\n#include \n#include \n#include \n#include \n#include \n\n#ifdef COMPRESS_VERTEX\n attribute aPosition : vec4;\n#else\n attribute aPosition : vec4;\n#endif\n#ifdef HAS_NORMAL\n #ifdef COMPRESS_NORMAL\n attribute aNormal : vec2;\n #else\n attribute aNormal : vec3;\n #endif\n#endif\n#ifdef TexCoord\n attribute aTexCoord0 : vec4;\n#endif\n#ifdef VertexColor\n attribute aColor : vec4;\n#endif\n#ifdef USE_VertexWeight\n attribute aVertexWeight : f32;\n#endif\nattribute offset : vec2;\nvarying v_pixelDistance : f32;\nvarying vColor : vec4;\nvarying vPositionMC : vec4;\nvarying vPosition : vec4;\nvarying vOffset : vec2;\n// #ifdef COMPUTE_W_VALUE\n// uniform float uHypHasColorByHeight;\n// varying float wValue;\n// #endif\n// #ifdef HYPSOMETRIC\n// uniform sampler2D uHypsometricTexture;\n// uniform float uHypOpacity;\n// uniform float uHypContourFillMode;\n// uniform float uHypFloor;\n// uniform float uHypCeil;\n// uniform float uHypMaxVisibleValue;\n// uniform float uHypMinVisibleValue;\n// uniform vec4 uNoValueColor;\n// #endif\n// #ifdef EXCAVATION\n// varying vec4 vExcavationVertexPos;\n// #endif\n// #ifdef W_VISIBLE\n// uniform sampler2D uCategorieTexture;\n// uniform float uMaxCategory;\n// uniform float uMinCategory;\n// uniform float uCategoryWidht;\n// #endif\n#ifdef COMPUTE_W_VALUE \n varying wValue : f32; \n#endif \n#ifdef HYPSOMETRIC \n var uHypsometricTexture : texture_2d;\n var uHypsometricTextureSampler : sampler;\n#endif\n#include \n#ifdef HYPSOMETRIC \nfn computeContourMapColor(fValue : f32) -> vec4 \n{ \n var threshold = clamp(abs(Layer.uHypCeil - Layer.uHypFloor), 0.000001, 20000.0); \n var contourRate = (fValue - Layer.uHypFloor) / threshold; \n var finalCoord = clamp(contourRate, 0.0, 1.0); \n var count = floor(finalCoord * 16.0); \n var y = (count*2.0 + 1.0)/32.0; \n var x = fract(finalCoord*16.0); \n if(y > 1.0) \n { \n x = 1.0; \n } \n var contourCoord = vec2(x, y); \n return textureSampleLevel(uHypsometricTexture, uHypsometricTextureSampler, contourCoord, 0.0f).rgba; \n} \nfn getHypsometricColor(oriColor : vec4, fValue : f32) -> vec4 \n{ \n var contourMapColor = vec4(0.0); \n var finalOpacity = Layer.uHypOpacity; \n if(fValue > Layer.uHypMaxVisibleValue || fValue < Layer.uHypMinVisibleValue) \n { \n return Layer.uNoValueColor * oriColor; \n } \n contourMapColor = computeContourMapColor(fValue); \n finalOpacity *= sign(Layer.uHypContourFillMode); \n var mixColor : vec4 = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity); \n return mixColor; \n} \n#endif \n\n//计算偏移\nfn addScreenSpaceOffset(positionEC : vec4, offset : vec2) -> vec4\n{\n var result = positionEC;\n var width=vec2(Layer.uPointSize);\n var halfsize:vec2=width*0.5;\n halfsize*=offset*2.0;\n halfsize*=getMetersPerPixel(positionEC,Scene.uPixelRatio);\n result.x=positionEC.x+halfsize.x;\n result.y=positionEC.y+halfsize.y;\n return result;\n}\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs {\n#ifdef COMPRESS_VERTEX\n var iAPosition = vec4(aPosition);\n var vertexPos : vec4;\n vertexPos = Mesh.decode_position_min + vec4(iAPosition.xyz, 1.0f) * Mesh.decode_position_normConstant;\n#else\n var vertexPos = aPosition;\n#endif\n vOffset = offset;\n var realNormal : vec3;\n#ifdef HAS_NORMAL\n realNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n var fANormal = vec2(aNormal.xy);\n realNormal = czm_octDecode(fANormal.xy, Mesh.normal_rangeConstant).zxy;\n #endif\n#endif\n var oriVertexW = computeWValue(&vertexPos);\n vertexPos.w = 1.0;\n// #ifdef EXCAVATION\n// vExcavationVertexPos = uGeoMatrix * vertexPos;\n// #endif\n var vertexColor = vec4(1.0);\n#ifdef VertexColor\n var fColor = vec4(aColor);\n vertexColor = vec4(fColor.r / 255.0f, fColor.g / 255.0f, fColor.b / 255.0f, fColor.a / 255.0f);\n#endif\n vColor = vertexColor * Layer.uFillForeColor;\n // vPositionMC.xyz = vertexPos.xyz;\n // vPositionMC.w = 0.0;\n //point\n var positionEC= Scene.uView * Mesh.uModelMatrix *vertexPos;\n positionEC=addScreenSpaceOffset(positionEC,offset);\n vPositionMC = vec4(positionEC.xyz, 1.0f);//positionMC不能一致,否者计算法向量返回为0,导致颜色为黑色\n var originPos=Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n gl_Position=Scene.uProjection * positionEC;\n //gl_Position = Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n#ifdef HYPSOMETRIC \n vColor = getHypsometricColor(vColor, wValue); \n#endif \n// #ifdef W_VISIBLE\n// vec2 categoryTexCoord = vec2(abs(oriVertexW - uMinCategory) / uCategoryWidht + 0.5 /uCategoryWidht , 0.5);\n// float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n// vColor.a *= 1.0 - category;\n// #endif\n v_pixelDistance = 2.0 / Layer.uPointSize;\n vPosition = Scene.uView * Mesh.uModelMatrix * vertexPos;\n\n czm_vertexLogDepth();\n}",_0x5c3279=(_0x19da29=!0,function(e,t){var i=_0x19da29?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19da29=!1,i}),_0x9031f3=_0x5c3279(void 0,(function(){return _0x9031f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x9031f3).search("(((.+)+)+)+$")})),_0x19da29;_0x9031f3();var _0x4e9507="\n#include \n#include \n#include \n#include \n\n#ifdef COMPUTE_W_VALUE \n varying wValue : f32; \n#endif \nvarying vColor : vec4;\nvarying vPositionMC : vec4;\nvarying vPosition : vec4;\nvarying vOffset : vec2;\nvarying v_pixelDistance : f32;\n// #ifdef APPLY_SWIPE\n// uniform vec4 uSwipeRegion;\n// #endif\n\nfn sRGBToLinear(srgbIn : vec4) -> vec4 {\n var linearOut = pow(vec3(srgbIn.x, srgbIn.y, srgbIn.z), vec3(2.200000048f, 2.200000048f, 2.200000048f));\n return vec4(linearOut.x, linearOut.y, linearOut.z, srgbIn.w);\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n// #ifdef APPLY_SPLIT\n// czm_splitClip();\n// #endif\n// #ifdef APPLY_SWIPE \n// czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n// #endif\n// #ifdef EXCAVATION\n// if(czm_executeExcavation())\n// {\n// discard;\n// }\n// #endif\n\t// if(vColor.a < 0.1)\n\t// {\n\t// \tdiscard;\n\t// }\n gl_FragColor = vColor;\n#ifdef ADJUST_COLOR\n\t//gl_FragColor.rgb = czm_adjustColor(gl_FragColor.rgb);\n#endif\n var distanceToCenter = length(vOffset);\n var maxDistance = max(0.0, 0.5 - v_pixelDistance);\n var wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n gl_FragColor.a *= wholeAlpha;\n\tif(gl_FragColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n// #ifdef CLIP\n// gl_FragColor *= czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n// #endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n\n#ifdef PREPASS\n // 相机坐标系坐标\n gl_FragData0 = vec4(0.0, 0.0, 0.0, 1.0);\n // 相机坐标系法线\n gl_FragData1 = vec4(0.0, 0.0, 1.0, 1.0);\n // 反射率\n gl_FragData2 = vec4(0.0, 0.0, 0.0, 1.0);\n#else\n //gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}",_0x801551=(_0x173346=!0,function(e,t){var i=_0x173346?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x173346=!1,i}),_0x2ad5c3=_0x801551(void 0,(function(){return _0x2ad5c3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ad5c3).search("(((.+)+)+)+$")})),_0x173346;_0x2ad5c3();var _0x19a31f="\n#include \n#include \n#include \n#include \n#include \nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec2 fSelected;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvarying vec4 vIsFiltByID;\nvarying vec3 v_positionEC;\nvarying vec3 vNormalEC;\nvarying vec4 vPosition;\n\n#ifdef NORMAL_AND_DEPTH\n varying vec4 oriVertex;\n varying vec3 perVertexNormals;\n varying float depthInCamera;\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n varying float fSelectedForSilh;\n#endif\n \n#ifdef PBR_THEME\n varying float vPBRIndex;\n#endif\n\n#ifdef POINT\n varying float v_pixelDistance;\n#endif\n\n#ifdef COMPUTE_W_VALUE\n uniform float uHypHasColorByHeight;\n varying float wValue;\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main()\n{\n VertexFactoryIntermediates intermediates = getVertexFactoryIntermediates();\n vec4 vertexPos = intermediates.position;\n vec3 realNormal = intermediates.normal;\n vTexCoord.xy = intermediates.uv0.xy;\n vTexCoord.zw = intermediates.uv1.xy;\n vec4 vertexColor = intermediates.vertexColor;\n\n#ifdef FALTTEN\n vertexPos = getVertexByFlatten(vertexPos, uTranslationAndBottom.w);\n#endif\n\n vec4 localPos = uGeoMatrix * vertexPos;\n vec4 oriLocalPos = localPos;\n float oriVertexW = computeWValue(localPos);\n #ifdef MultiTemporalWeight\n vertexPos.z += localPos.z - oriLocalPos.z;\n #endif\n vertexPos.w = 1.0;\n\n#ifdef REPLACE_COLOR_TYPE\n vertexColor = uFillForeColor;\n#else\n vertexColor *= uFillForeColor;\n#endif\n vIsFiltByID = vec4(0.0);\n#ifdef BatchTable\n float batchTableID = intermediates.batchTableID;\n vSecondColor = czm_batchTable_pickColor(batchTableID);\n vec4 operationType = czm_batchTable_operation(batchTableID);\n vec4 objsColor = czm_batchTable_color(batchTableID);\n vec3 translate = uTranslationAndBottom.xyz;\n #ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(batchTableID).x + 0.1;\n #endif\n #ifdef Translation\n translate = czm_batchTable_translate(batchTableID);\n #endif\n #ifdef SILHOUETTE_SELECT_TYPE\n fSelectedForSilh = 0.0;\n czm_s3mBatchOperation(operationType, objsColor, vertexColor, vertexPos, vIsFiltByID, translate, fSelectedForSilh);\n #endif\n #ifndef SILHOUETTE_SELECT_TYPE\n fSelected = vec2(0.0);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor, vertexPos, vIsFiltByID, translate, fSelected);\n #endif\n#endif // BatchTable\n vColor = vertexColor;\n vPositionMC.xyz = vertexPos.xyz;\n vPositionMC.w = 0.0;\n vPosition = uViewProjection * uModelMatrix * vertexPos;\n#ifdef FusionMode\n gl_Position = getFusionModePosition(vertexPos);\n#else\n gl_Position = vPosition;\n#endif\n#ifdef COMPUTE_TEXCOORD\n #ifdef TextureBatch\n vec4 xywh = czm_batchTable_xywh_BaseTex(getTextureBatchId0(aTextureBatchId));\n vec4 xywh2 = vec4(0.0);\n #ifdef MULTI_TEX\n xywh2 = czm_batchTable_xywh_BakeTex(getTextureBatchId1(aTextureBatchId));\n #endif\n getUVMatrixForBatch(xywh, xywh2);\n #else\n getUVMatrix(intermediates.uv0, intermediates.uv1);\n #endif\n#endif // COMPUTE_TEXCOORD \n vec4 ec = (uView * uModelMatrix * vertexPos);\n v_positionEC = (ec / ec.w).xyz;\n vNormalEC = vec3(0.0);\n#ifdef HAS_LIGHT\n #ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n vPositionMC.w = 1.0;\n mat3 normalMatrix = getNormalMatrix(uView, uModelMatrix);\n #ifdef Instance\n vNormalEC = normalMatrix * intermediates.normalInstance;\n #else\n vNormalEC = normalMatrix * realNormal;\n #endif\n }\n #endif\n#endif\n#ifdef NORMAL_AND_DEPTH\n oriVertex = vertexPos;\n vec4 position = uView * vertexPos;\n depthInCamera = (position.z - czm_depthRange.near) / (czm_depthRange.far - czm_depthRange.near);\n perVertexNormals = vec3(0.0,0.0,0.0);\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n perVertexNormals = normalize(mat3(uView * uModelMatrix) * realNormal);\n }\n#endif\n#endif\n#ifdef W_VISIBLE\n setAlphaByWValue(oriVertexW, vColor);\n#endif\n\n#ifdef VERTEX_CAPTURE\n vSecondColor = uView * uModelMatrix * vertexPos;\n gl_PointSize = 12.0;\n#endif\n\n#ifdef POINT\n #ifndef WEBGPU\n gl_PointSize = uPointSize;\n #endif\n v_pixelDistance = 2.0 / uPointSize;\n#endif\n\n#ifdef USE_BatchPBR\n getPBRParamFromTexture(intermediates.pbrTextureUV.xy);\n#endif\n\n s3mComputeVaryings(vertexPos);\n \n vertexLogDepth();\n}",_0x3675e4=(_0x1e595b=!0,function(e,t){var i=_0x1e595b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e595b=!1,i}),_0x5edb9d=_0x3675e4(void 0,(function(){return _0x5edb9d.toString().search("(((.+)+)+)+$").toString().constructor(_0x5edb9d).search("(((.+)+)+)+$")})),_0x1e595b;_0x5edb9d();var _0x2b6657="#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n#endif\n#ifdef PREPASS\n#extension GL_EXT_draw_buffers : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n\nvarying vec4 vIsFiltByID;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvarying vec3 v_positionEC;\nvarying vec4 vSecondColor;\nvarying vec3 vNormalEC;\n \n#ifdef COMPUTE_W_VALUE\n varying float wValue;\n#endif\n\n#if defined(REPLACE_SELECT_TYPE) || defined(REPLACE_COLOR_TYPE)\n varying vec2 fSelected;\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n varying float fSelectedForSilh;\n#endif\n\n#ifdef SKETCH_MODE\n uniform vec4 uLineColor;\n uniform float uLineWidth;\n#endif\n\n#ifdef Height_Map\nvec4 renderHeightMap()\n{\n return czm_packValue(wValue);\n}\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#ifdef SHADOW_MAP\n #include \n #include \n#endif\n\n#ifdef HAS_LIGHT\n #include \n #ifdef BRDF\n #include \n #else\n #include \n #endif\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvec4 shaderModel(vec4 baseColor, vec4 realTexCoord, vec2 oriTexCoord)\n{\n#ifndef HAS_LIGHT\n return vec4(LINEARtoSRGB(baseColor.rgb), baseColor.a);\n#else\n #ifdef BRDF\n return brdf(baseColor, realTexCoord.xy, oriTexCoord, v_positionEC, vPositionMC.xyz, vNormalEC, uModelMatrix);\n #else\n return blinnPhong(baseColor, realTexCoord.xy, oriTexCoord, v_positionEC, vPositionMC.xyz, vNormalEC, uModelMatrix);\n #endif\n#endif\n \n}\n\nvec4 renderColor()\n{\n preClip();\n vec4 realTexCoord = vec4(0.0);\n vec2 oriTexCoord = vec2(0.0);\n vec4 baseColor = vColor;\n vec4 baseTexColor = vec4(1.0);\n vec4 finalColor;\n#ifdef Has_Texture\n baseTexColor = getTextureColorForS3M(realTexCoord);\n#endif\n\n baseColor *= baseTexColor * uDiffuseColor;\n vec2 texCoord = vec2(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n\n finalColor = shaderModel(baseColor, realTexCoord, texCoord); \n\n#ifdef ADJUST_COLOR\n finalColor.rgb = adjustColor(finalColor.rgb);\n#endif\n\n#ifdef REPLACE_COLOR_TYPE\n if(fSelected.y > 0.9)\n {\n finalColor = vColor;\n }\n#endif\n\n#ifdef REPLACE_SELECT_TYPE\n if(fSelected.x > 0.9)\n {\n finalColor = vColor;\n }\n#endif\n\n#ifdef HYPSOMETRIC\n\tif(uHypsometricVisible>0.5)\n\t{\n #ifdef Volume2\n vec4 volColor = texture2D(uVolumeTexture, vec2(vTexCoord.x, 1.0 - vTexCoord.y));\n finalColor = getHypsometricColor(finalColor, volColor);\n #else\n finalColor = getHypsometricColor(finalColor, wValue);\n #endif\n }\n#endif\n\n#ifdef VISIBLEDISTANCEMAX\n getAlphaByDistance(v_positionEC, finalColor);\n#endif\n\n#ifdef OVERLAY\n getOverlayColor(finalColor);\n#endif\n\n#ifdef HORIZONTAL_LINE\n finalColor = getHorizontalColor(finalColor, wValue);\n#endif\n\n#ifdef IMAGERY\n getImageryColor(finalColor);\n#endif\n\n#ifdef FLOOD_ANALYSIS\n getFloodWaterColor(finalColor);\n#endif\n\n#ifdef TRANSPARENT_BACK_COLOR\n transparentColorClip(finalColor);\n#endif\n\n#ifdef SKETCH_MODE\n finalColor = sketchMode(finalColor, uLineColor, uLineWidth);\n#endif // SKETCH_MODE\n\n#ifdef CLIP\n #ifdef CLIP_FILT_BY_ID\n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n #else\n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n #endif\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n if(uSelectColorType == 2.)\n {\n if(fSelectedForSilh > 0.9)\n {\n finalColor = sketchMode(finalColor, uSelColor, 3.0);\n }\n }\n else\n {\n finalColor = sketchMode(finalColor, uSelColor, 3.0);\n }\n#endif // SILHOUETTE_SELECT_TYPE\n\n#ifdef Only_LineColor\n finalColor = uLineColor;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n #ifdef TexCoord\n finalColor.rgb += getEmissiveTextureAtlasColor(wValue, vTexCoord.xy);\n #else\n finalColor.rgb += getEmissiveTextureAtlasColor(wValue);\n #endif\n#else\n finalColor.rgb *= uEmissionColor.rgb;\n#endif\n\n if(finalColor.a == 0.0)\n {\n discard;\n }\n return finalColor;\n}\nvoid main()\n{\n#ifdef Height_Map \n gl_FragColor = renderHeightMap();\n return;\n#endif\n#ifdef NORMAL\n gl_FragColor = renderNormal(vPositionMC.xyz);\n return;\n#endif\n#ifdef NORMAL_AND_DEPTH\n gl_FragColor = renderNormalAndDepth(vPositionMC.xyz);\n return;\n#endif\n\n#ifdef PREPASS\n vec2 texCoord = vec2(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n float roughness = getRoughness(texCoord);\n renderPrePass(roughness);\n#else\n gl_FragColor = renderColor();\n#endif\n#ifdef LOG_DEPTH\n writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}",_0x2e8fa3=(_0x445630=!0,function(e,t){var i=_0x445630?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x445630=!1,i}),_0x3321e5=_0x2e8fa3(void 0,(function(){return _0x3321e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3321e5).search("(((.+)+)+)+$")})),_0x445630;_0x3321e5();var _0x46f3da="\n\n#include \n#include \n#include \n#include \n\n#ifdef USE_VertexWeight\n attribute aVertexWeight : f32;\n#endif\n\n#include \n\nvarying vSecondColor : vec4;\nvarying vTexCoord : vec4;\nvarying fSelected : f32;\nvarying vColor : vec4;\nvarying vPositionMC : vec4;\nvarying vIsFiltByID : vec4;\nvarying v_positionEC : vec3;\nvarying vNormalEC : vec3;\n#ifdef COMPUTE_W_VALUE\n varying wValue : f32;\n#endif\n#ifdef W_VISIBLE\n #include \n#endif\n#ifdef NORMAL_AND_DEPTH\n varying oriVertex : vec4;\n varying perVertexNormals : vec3;\n#endif\n#ifdef SILHOUETTE_SELECT_TYPE\n varying fSelectedForSilh : f32;\n#endif\n#include \n#include \n#include \n#include \n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs {\n var intermediates = GetVertexFactoryIntermediates();\n var vertexPos = intermediates.position;\n var realNormal = intermediates.normal;\n vTexCoord = vec4(intermediates.uv0.x, intermediates.uv0.y, intermediates.uv1.x, intermediates.uv1.y);\n\n var vertexColor = intermediates.vertexColor;\n\n#ifdef FALTTEN\n vertexPos = getVertexByFlatten(vertexPos, Layer.uTranslationAndBottom.w);\n#endif\n\n var localPos = Mesh.uGeoMatrix * vertexPos;\n var oriLocalPos = localPos;\n var oriVertexW = computeWValue(&localPos);\n\n vertexPos.w = 1.0f;\n\n var oldVertexColor = vertexColor;\n vertexColor = oldVertexColor * Layer.uFillForeColor;\n vIsFiltByID = vec4(0.0f);\n\n#ifdef BatchTable\n var batchTableID = intermediates.batchTableID;\n vSecondColor = czm_batchTable_pickColor(batchTableID);\n var operationType = czm_batchTable_operation(batchTableID);\n var objsColor = czm_batchTable_color(batchTableID);\n var translate = Layer.uTranslationAndBottom.xyz;\n #ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(batchTableID).x + 0.1f;\n #endif\n #ifdef Translation\n translate = czm_batchTable_translate(batchTableID);\n #endif\n var outIsFiltByID = vIsFiltByID;\n var outSelected = fSelected;\n #ifdef SILHOUETTE_SELECT_TYPE\n var outFSelectedForSilh = fSelectedForSilh;\n fSelectedForSilh = 0.0;\n czm_s3mBatchOperationForSilhouette(operationType, objsColor, &vertexColor, &vertexPos, &outIsFiltByID, translate, &outFSelectedForSilh);\n fSelectedForSilh = outFSelectedForSilh;\n #endif\n #ifndef SILHOUETTE_SELECT_TYPE\n fSelected = 0.0f;\n czm_s3mBatchOperation(operationType, objsColor, Layer.uSelColor, translate, &vertexColor, &vertexPos, &outIsFiltByID, &outSelected);\n vIsFiltByID = outIsFiltByID;\n fSelected = outSelected;\n #endif\n#endif // BatchTable\n#ifdef NORMAL_AND_DEPTH\n oriVertex = vertexPos;\n var position : vec4 = Scene.uView * vertexPos;\n perVertexNormals = vec3(0.0,0.0,0.0);\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n var modelViewMat4 = Scene.uView * Mesh.uModelMatrix;\n var modelViewMat3 = mat3x3(modelViewMat4[0][0], modelViewMat4[1][0], modelViewMat4[2][0], modelViewMat4[0][1], modelViewMat4[1][1], modelViewMat4[2][1], modelViewMat4[0][2], modelViewMat4[1][2], modelViewMat4[2][2]);\n perVertexNormals = normalize(modelViewMat3 * realNormal);\n }\n#endif\n#endif\n#ifdef W_VISIBLE\n setAlphaByWValue(oriVertexW, &vertexColor);\n#endif\n\n vColor = vertexColor;\n vPositionMC = vec4(vertexPos.xyz, 1.0f);\n\n gl_Position = Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n#ifdef COMPUTE_TEXCOORD\n #ifdef TextureBatch\n var xywh = czm_batchTable_xywh_BaseTex(getTextureBatchId0(aTextureBatchId));\n var xywh2 = vec4(0.0);\n #ifdef MULTI_TEX\n xywh2 = czm_batchTable_xywh_BakeTex(getTextureBatchId1(aTextureBatchId));\n #endif\n getUVMatrixForBatch(xywh, xywh2);\n #else\n getUVMatrix(intermediates.uv0, intermediates.uv1);\n #endif\n#endif // COMPUTE_TEXCOORD\n var ec = (Scene.uView * Mesh.uModelMatrix * vertexPos);\n v_positionEC = (ec / ec.w).xyz;\n vNormalEC = vec3(0.0);\n#ifdef HAS_LIGHT\n #ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n vPositionMC.w = 1.0;\n var normalMatrix = czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix);\n #ifdef Instance\n vNormalEC = normalMatrix * intermediates.normalInstance;\n #else\n vNormalEC = normalMatrix * realNormal;\n #endif\n }\n #endif\n#endif\n\n#ifdef USE_BatchPBR\n czm_getPBRParamFromTexture(intermediates.pbrTextureUV);\n#endif\n\n czm_s3mComputeVaryings(vertexPos);\n \n czm_vertexLogDepth();\n}",_0x29f0c2=(_0x20a3b2=!0,function(e,t){var i=_0x20a3b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x20a3b2=!1,i}),_0x5ddcf6=_0x29f0c2(void 0,(function(){return _0x5ddcf6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ddcf6).search("(((.+)+)+)+$")})),_0x20a3b2;_0x5ddcf6();var _0x2288cf="\n#include \n#include \n#include \n#include \n#include \n\nvarying vSecondColor : vec4;\nvarying vTexCoord : vec4;\nvarying fSelected : f32;\nvarying vColor : vec4;\nvarying vPositionMC : vec4;\nvarying vIsFiltByID : vec4;\nvarying v_positionEC : vec3;\nvarying vNormalEC : vec3;\nvarying vOffset : vec2;\n#include \n\n#ifdef HAS_LIGHT\n #include \n #ifdef BRDF\n #include \n #else\n #include \n #endif\n#endif\n\nfn shaderModel(baseColor : vec4, realTexCoord : vec4) -> vec4\n{\n#ifndef HAS_LIGHT\n return baseColor;\n#else\n #ifdef BRDF\n return brdf(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #else\n return blinnPhong(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #endif\n#endif\n}\n\n#include \n\nfn renderColor() -> vec4 {\n \n var realTexCoord = vec4(0.0);\n var baseColor = vColor;\n var baseTexColor = vec4(1.0);\n var finalColor = vec4(1.0);\n#ifdef COMPUTE_TEXCOORD\n var firstColor = vec4(1.0);\n var secColor = vec4(1.0);\n baseTexColor = getTextureColorForS3M(&(realTexCoord), &(firstColor), &(secColor));\n#endif\n baseColor *= baseTexColor;\n baseColor *= Material.uDiffuseColor;\n finalColor = shaderModel(baseColor, realTexCoord);\n\n preClip();\n\n#ifdef CLIP\n #ifdef CLIP_FILT_BY_ID\n finalColor *= czm_clip(Scene.uView * Mesh.uModelMatrix * vec4(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n #else\n finalColor *= czm_clip(Scene.uView * Mesh.uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n #endif // CLIP_FILT_BY_ID\n#endif // CLIP\n\n if(vColor.a == 0.0)\n {\n discard;\n }\n\n var disFromCenter = length(vOffset);\n if(disFromCenter > 0.5){\n discard;\n }\n return finalColor;\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n#ifdef PREPASS\n var texCoord = vec2(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n var reflectivity = 0.0;\n // 相机坐标系坐标\n gl_FragData0 = vec4(v_positionEC, 1.0);\n // 相机坐标系法线\n gl_FragData1 = vec4(0.0, 0.0, 1.0, 1.0);\n // 反射率\n gl_FragData2 = vec4(reflectivity, reflectivity, reflectivity, 1.0);\n#else\n gl_FragColor = renderColor();\n#endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}",_0x23e749=(_0xacb428=!0,function(e,t){var i=_0xacb428?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xacb428=!1,i}),_0x4fa6d3=_0x23e749(void 0,(function(){return _0x4fa6d3.toString().search("(((.+)+)+)+$").toString().constructor(_0x4fa6d3).search("(((.+)+)+)+$")})),_0xacb428;_0x4fa6d3();var _0x519466="\n\n#include \n#include \n#include \n#include \n\n#ifdef USE_VertexWeight\n attribute aVertexWeight : f32;\n#endif\n\n#include \n\nattribute offset:vec2;\nvarying vSecondColor : vec4;\nvarying vTexCoord : vec4;\nvarying fSelected : f32;\nvarying vColor : vec4;\nvarying vPositionMC : vec4;\nvarying vIsFiltByID : vec4;\nvarying v_positionEC : vec3;\nvarying vNormalEC : vec3;\nvarying vOffset : vec2;\n\n#include \n#include \n\n//计算偏移\nfn addScreenSpaceOffset(positionWC : vec4, offset : vec2) -> vec4\n{\n var result = positionWC;\n var width=vec2(Layer.uPointSize);\n var halfsize:vec2=width*0.5;\n halfsize*=offset*2.0;\n halfsize*=getMetersPerPixel(positionWC,Scene.uPixelRatio);\n result.x=positionWC.x+halfsize.x;\n result.y=positionWC.y+halfsize.y;\n return result;\n}\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs {\n var intermediates = GetVertexFactoryIntermediates();\n var vertexPos = intermediates.position;\n var realNormal = intermediates.normal;\n vTexCoord = vec4(intermediates.uv0.x, intermediates.uv0.y, intermediates.uv1.x, intermediates.uv1.y);\n vOffset = offset;\n \n var vertexColor = intermediates.vertexColor;\n vertexPos.w = 1.0f;\n\n var oldVertexColor = vertexColor;\n vertexColor = oldVertexColor * Layer.uFillForeColor;\n vIsFiltByID = vec4(0.0f);\n\n#ifdef BatchTable\n var batchTableID = intermediates.batchTableID;\n vSecondColor = czm_batchTable_pickColor(batchTableID);\n var operationType = czm_batchTable_operation(batchTableID);\n var objsColor = czm_batchTable_color(batchTableID);\n var translate = Layer.uTranslationAndBottom.xyz;\n #ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(batchTableID).x + 0.1f;\n #endif\n #ifdef Translation\n translate = czm_batchTable_translate(batchTableID);\n #endif\n fSelected = 0.0f;\n var outIsFiltByID = vIsFiltByID;\n var outSelected = fSelected;\n czm_s3mBatchOperation(operationType, objsColor, Layer.uSelColor, translate, &vertexColor, &vertexPos, &outIsFiltByID, &outSelected);\n vIsFiltByID = outIsFiltByID;\n fSelected = outSelected;\n#endif // BatchTable\n\n //vColor = vertexColor;\n vColor = vertexColor;\n fSelected = 0.0f;\n //point\n var positionEC= Scene.uView * Mesh.uModelMatrix *vertexPos;\n positionEC=addScreenSpaceOffset(positionEC,offset);\n vPositionMC = vec4(positionEC.xyz, 1.0f);//positionMC不能一致,否者计算法向量返回为0,导致颜色为黑色\n var originPos=Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n gl_Position=Scene.uProjection * positionEC;\n#ifdef COMPUTE_TEXCOORD\n getUVMatrix(intermediates.uv0, intermediates.uv1);\n#endif // COMPUTE_TEXCOORD\n var ec = (Scene.uView * Mesh.uModelMatrix * vertexPos);\n v_positionEC = (ec / ec.w).xyz;\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n vNormalEC = czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * realNormal;\n }\n#endif\n\n#ifdef USE_BatchPBR\n czm_getPBRParamFromTexture(intermediates.pbrTextureUV);\n#endif\n\n czm_s3mComputeVaryings(vertexPos);\n \n czm_vertexLogDepth();\n}",_0x3618ae=(_0x5ea7ca=!0,function(e,t){var i=_0x5ea7ca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ea7ca=!1,i}),_0x192abf=_0x3618ae(void 0,(function(){return _0x192abf.toString().search("(((.+)+)+)+$").toString().constructor(_0x192abf).search("(((.+)+)+)+$")})),_0x5ea7ca;_0x192abf();var _0x1084eb="\n#include \n#include \n#include \n#include \n#include \n#ifdef Volume\n#include \n#endif\n\nvarying vSecondColor : vec4;\nvarying vTexCoord : vec4;\nvarying vColor : vec4;\nvarying vPositionMC : vec4;\nvarying vIsFiltByID : vec4;\nvarying v_positionEC : vec3;\nvarying vNormalEC : vec3;\n#ifdef COMPUTE_W_VALUE\n varying wValue : f32;\n#endif\n\n#if defined(REPLACE_SELECT_TYPE) || defined(REPLACE_COLOR_TYPE)\n varying fSelected : f32;\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n varying fSelectedForSilh : f32;\n #include \n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n\n#ifdef SHADOW_MAP\n #include \n #include \n#endif\n\n#ifdef HAS_LIGHT\n #include \n #ifdef BRDF\n #include \n #else\n #include \n #endif\n#else\nfn sRGBToLinear(srgbIn : vec4) -> vec4 {\n var linearOut = pow(vec3(srgbIn.x, srgbIn.y, srgbIn.z), vec3(2.200000048f, 2.200000048f, 2.200000048f));\n return vec4(linearOut.x, linearOut.y, linearOut.z, srgbIn.w);\n}\n\nfn LINEARtoSRGB(linearIn : vec3) -> vec3\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\n\n#endif\n\nfn shaderModel(baseColor : vec4, realTexCoord : vec4) -> vec4\n{\n#ifndef HAS_LIGHT\n return vec4(LINEARtoSRGB(baseColor.rgb), baseColor.a);\n#else\n #ifdef BRDF\n return brdf(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #else\n return blinnPhong(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #endif\n#endif\n}\n\n#include \n#include \n#include \n#include \n\nfn renderColor() -> vec4 {\n \n var realTexCoord = vec4(0.0);\n var baseColor = vColor;\n var baseTexColor = vec4(1.0);\n var finalColor = vec4(1.0);\n#ifdef Has_Texture\n var firstColor = vec4(1.0);\n var secColor = vec4(1.0);\n baseTexColor = getTextureColorForS3M(&(realTexCoord), &(firstColor), &(secColor));\n #if !defined(INVALID_OBLIQUE) && !defined(NO_TEXCOORD)\n #ifndef TextureBatch\n if(vTexMatrix.z < 0.0){\n baseTexColor = vec4(1.0);\n }\n #endif\n #endif\n#endif\n baseColor *= baseTexColor;\n baseColor *= Material.uDiffuseColor;\n finalColor = shaderModel(baseColor, realTexCoord);\n\n preClip();\n#ifdef ADJUST_COLOR\n finalColor.r = adjustColor(finalColor.rgb).r;\n finalColor.g = adjustColor(finalColor.rgb).g;\n finalColor.b = adjustColor(finalColor.rgb).b;\n#endif\n\n\n#ifdef CLIP\n #ifdef CLIP_FILT_BY_ID\n var clipResult = clip(Scene.uView * Mesh.uModelMatrix * vec4(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n #else\n var clipResult = clip(Scene.uView * Mesh.uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n #endif // CLIP_FILT_BY_ID\n if(clipResult < -0.5){\n discard;\n }\n#endif // CLIP\n\n#ifdef SILHOUETTE_SELECT_TYPE\n var sketchModeColor = sketchMode(finalColor, Layer.uSelColor, 3.0);\n if(Layer.uSelectColorType == 2.0)\n {\n if(fSelectedForSilh > 0.9)\n {\n finalColor = sketchModeColor;\n }\n }\n else\n {\n finalColor = sketchModeColor;\n }\n#endif // SILHOUETTE_SELECT_TYPE\n\n#ifdef EMISSION_TEXTURE_ATLAS\n finalColor.r += getEmissiveTextureAtlasColor(wValue).r;\n finalColor.g += getEmissiveTextureAtlasColor(wValue).g;\n finalColor.b += getEmissiveTextureAtlasColor(wValue).b;\n#else\n finalColor.r *= Layer.uEmissionColor.r;\n finalColor.g *= Layer.uEmissionColor.g;\n finalColor.b *= Layer.uEmissionColor.b;\n#endif\n\n#ifdef HYPSOMETRIC\n\tif(Layer.uHypsometricVisible > 0.5)\n\t{\n #ifdef Volume2\n var volColor = textureSample(uVolumeTexture, uVolumeTextureSampler, vec2(vTexCoord.x, 1.0 - vTexCoord.y));\n finalColor = getHypsometricColor(finalColor, volColor);\n #else\n finalColor = getHypsometricColor(finalColor, wValue);\n #endif\n }\n#endif\n\n#ifdef OVERLAY\n getOverlayColor(&finalColor);\n#endif\n\n#ifdef IMAGERY\n getImageryColor(&finalColor);\n#endif\n\n if(finalColor.a == 0.0)\n {\n discard;\n }\n\n return finalColor;\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n\n#ifdef PREPASS\n var texCoord = vec2(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n var roughness = getRoughness(texCoord);\n var reflectivity = 1.0 - roughness;\n var normalEC = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(vPositionMC.xyz));\n // 相机坐标系坐标\n gl_FragData0 = vec4(v_positionEC, 1.0);\n // 相机坐标系法线\n gl_FragData1 = vec4(normalEC, 1.0);\n // 反射率\n gl_FragData2 = vec4(reflectivity, reflectivity, reflectivity, 1.0);\n#else\n gl_FragColor = renderColor();\n#endif\n#ifdef NORMAL\n gl_FragColor = renderNormal(vPositionMC.xyz);\n#endif\n#ifdef NORMAL_AND_DEPTH\n gl_FragColor = renderNormalAndDepth(vPositionMC.xyz);\n#endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}",_0x11b8b4=(_0x57b6fe=!0,function(e,t){var i=_0x57b6fe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57b6fe=!1,i}),_0x4296ea=_0x11b8b4(void 0,(function(){return _0x4296ea.toString().search("(((.+)+)+)+$").toString().constructor(_0x4296ea).search("(((.+)+)+)+$")})),_0x57b6fe;_0x4296ea();var _0x370b02="\n#include \n#include \n#include \nattribute vec4 aPosition; \n#ifdef TexCoord \n varying vec4 vTexCoord; \n#endif \n\n#ifdef VertexColor\n\t#ifdef WEBGPU\n\t attribute uvec4 aColor;\n\t#else\n\t attribute vec4 aColor;\n\t#endif\n#endif\n\n#ifdef BatchTable \nattribute float batchId; \n#endif \nvarying vec4 vSecondColor; \n#ifdef REPLACE_SELECT_TYPE \nvarying float fSelected; \n#endif \n#ifdef COMPRESS_VERTEX \n uniform vec4 decode_position_min; \n uniform float decode_position_normConstant; \n#endif \nvarying vec4 vColor; \nvoid main() \n{ \n#ifdef COMPRESS_VERTEX \n vec4 vertexPos = vec4(1.0); \n vertexPos = decode_position_min + aPosition * decode_position_normConstant; \n#else \n vec4 vertexPos = aPosition; \n#endif \n#ifdef TexCoord \n vTexCoord.xy = vertexPos.xy * textureRepeat; \n#endif \n vertexPos.w = 1.0; \n vec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n vertexColor = aColor; \n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif\n#endif \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n vec4 operationType = czm_batchTable_operation(batchId); \n vec4 objsColor = czm_batchTable_color(batchId); \n#ifdef REPLACE_SELECT_TYPE \n fSelected = 0.0; \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor, fSelected); \n#else \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor); \n#endif \n#endif \n vColor = vertexColor*uFillForeColor; \n gl_Position = uViewProjection * uModelMatrix * vertexPos;\n}",_0x4204fb=(_0x4b806c=!0,function(e,t){var i=_0x4b806c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4b806c=!1,i}),_0x6cf653=_0x4204fb(void 0,(function(){return _0x6cf653.toString().search("(((.+)+)+)+$").toString().constructor(_0x6cf653).search("(((.+)+)+)+$")})),_0x4b806c;_0x6cf653();var _0x21bee4="\n#include \n#ifdef TexCoord \n uniform sampler2D uTexture; \n varying vec4 vTexCoord; \n#endif \n varying vec4 vColor; \n varying vec4 vSecondColor; \n#ifdef REPLACE_SELECT_TYPE \n varying float fSelected; \n#endif \nvoid main() \n{ \n\tif(vColor.a == 0.0) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef TexCoord \n vec4 texColor = texture2D(uTexture, vTexCoord.xy); \n gl_FragColor = texColor * vColor; \n#else \n gl_FragColor = vColor;\n#endif \n#ifdef REPLACE_SELECT_TYPE \n if(fSelected > 0.9) \n { \n gl_FragColor = vColor; \n } \n#endif \n\tif(gl_FragColor.a == 0.0) \n\t{ \n\t\tdiscard; \n\t}\n}",_0x2b1b26=(_0xf62779=!0,function(e,t){var i=_0xf62779?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf62779=!1,i}),_0x1058ec=_0x2b1b26(void 0,(function(){return _0x1058ec.toString().search("(((.+)+)+)+$").toString().constructor(_0x1058ec).search("(((.+)+)+)+$")})),_0xf62779;_0x1058ec();var _0x21a0db="\n#include \n#include \n#include \n#include \n\nattribute vec3 aPosition;\n#ifdef HAS_NORMAL \nattribute vec3 aNormal;\n#endif \nattribute vec4 aTexCoord0;\n\n#ifdef TexCoord2 \nattribute vec4 aTexCoord1;\n#endif \n \n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n#ifdef BatchTable \nattribute float batchId; \n#endif \n \nvarying vec4 vColor; \nvarying vec4 vSecondColor; \nvarying vec4 vTexCoord; \nvarying vec4 clip_vertex; \n \nfloat computerOnePixelLength() \n{ \n\tvec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0); \n\tviewPos.xyz *= 0.9; \n\tvec4 winPos = uProjection * viewPos; \n\tfloat dwidth = czm_metersPerPixel(viewPos); \n\t#ifdef EYE_DISTANCE_SCALING \n\t dwidth = 1.0; \n\t#endif \n\twinPos.x = winPos.x - 2.0 * dwidth; \n\tvec4 newViewPos = uInverseProjection * winPos; \n\treturn length(viewPos - newViewPos); \n} \n \nvec4 computePos(vec3 v3Normal) \n{ \n vec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0); \n\tviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength(); \n\tviewPos.xyz = viewPos.xyz * 0.9; \n\tclip_vertex = viewPos; \n\tvec4 pos = czm_projection * viewPos; \n\treturn pos; \n} \n \nvoid main() \n{ \n vTexCoord.xy = aTexCoord0.xy; \n vec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif \n#endif \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n vec4 operationType = czm_batchTable_operation(batchId); \n vec4 objsColor = czm_batchTable_color(batchId); \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor); \n#endif \n vColor = vertexColor * uDiffuseColor; \n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz); \n#else \n\n#ifdef TexCoord2 \n vTexCoord.zw = aTexCoord1.xy;\n#endif \n \n #ifdef HAS_NORMAL \n \tgl_Position = computePos(aNormal);\n #else\n gl_Position = computePos(aTexCoord1.xyz);\n #endif\n#endif \n}",_0x2cfc74=(_0x1fd55e=!0,function(e,t){var i=_0x1fd55e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fd55e=!1,i}),_0x30a719=_0x2cfc74(void 0,(function(){return _0x30a719.toString().search("(((.+)+)+)+$").toString().constructor(_0x30a719).search("(((.+)+)+)+$")})),_0x1fd55e;_0x30a719();var _0x5b6bf2="attribute vec3 aPosition;\n\n#ifndef ICON\nattribute vec3 aNormal;\n#endif\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\nattribute vec4 uv0;\n\n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\nuniform vec4 uSelColor;\nuniform vec4 uDiffuseColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nmat3 RotateZ(in float angle)\n{\n float sina = sin(angle);\n float cosa = cos(angle);\n mat3 rotMatrix = mat3(cosa, sina, 0, -sina, cosa, 0, 0, 0, 1);\n return rotMatrix;\n}\n\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n vec4 origViewPos = czm_view * vec4(0.0, 0.0, 0.0, 1.0);\n vec4 cameraViewPos = vec4(0.0, 0.0, 0.0, 1.0);\n vec4 fixedAxis = vec4(1.0);\n vec3 xAxis = vec3(1.0);\n vec3 yAxis = vec3(1.0);\n vec3 zAxis = vec3(1.0);\n vec4 cameraViewVector = vec4(1.0);\n if (czm_sceneMode != czm_sceneMode3D)\n {\n fixedAxis = czm_view * vec4(1.0, 0.0, 0.0, 1.0);\n fixedAxis = fixedAxis - origViewPos;\n zAxis = normalize(fixedAxis.xyz);\n cameraViewVector = viewPos - cameraViewPos;\n yAxis = normalize(cameraViewVector.xyz);\n xAxis = normalize(cross(yAxis, zAxis));\n yAxis = cross(zAxis, xAxis);\n }\n else\n {\n fixedAxis = viewPos - origViewPos;\n yAxis = normalize(fixedAxis.xyz);\n cameraViewVector = cameraViewPos - viewPos;\n zAxis = normalize(cameraViewVector.xyz);\n xAxis = normalize(cross(yAxis, zAxis));\n zAxis = cross(xAxis, yAxis);\n }\n mat3 matrix = mat3(xAxis, yAxis, zAxis) * RotateZ(aTexCoord0.z);\n vec3 offset = czm_sceneMode != czm_sceneMode3D ? v3Normal.xzy : v3Normal;\n offset = matrix * offset;\n\tviewPos.xyz = viewPos.xyz + offset;\n\tclip_vertex = viewPos;\n\tvec4 pos = czm_projection * viewPos;\n\treturn pos;\n}\n\nvoid main()\n{\n vTexCoord.xy = aTexCoord0.xy;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor * uDiffuseColor;\n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz);\n#else\n vTexCoord.zw = aTexCoord1.xy;\n gl_Position = computePos(aNormal);\n#endif\n}",_0x1cd0e7=(_0x4dbf71=!0,function(e,t){var i=_0x4dbf71?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4dbf71=!1,i}),_0x2fb033=_0x1cd0e7(void 0,(function(){return _0x2fb033.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fb033).search("(((.+)+)+)+$")})),_0x4dbf71;_0x2fb033();var _0x539845="\nattribute vec3 aPosition;\n#ifndef ICON\nattribute vec3 aNormal;\n#endif\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#include \n#include \n#include \n#include \n\n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0);\n\tvec4 winPos = uProjection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = uInverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\n\nmat3 rotateZ(in float angle)\n{\n float sina = sin(angle);\n float cosa = cos(angle);\n mat3 rotMatrix = mat3(cosa, sina, 0.0, -sina, cosa, 0.0, 0.0, 0.0, 1.0);\n return rotMatrix;\n}\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0);\n vec4 origViewPos = uView * vec4(0.0, 0.0, 0.0, 1.0);\n vec4 fixedAxis = viewPos - origViewPos;\n vec3 zAxis = normalize(fixedAxis.xyz);\n vec4 upView = vec4(0.0, 1.0, 0.0, 1.0);\n upView = uView * upView;\n vec3 upViewVector = normalize(upView.xyz - origViewPos.xyz);\n vec3 xAxis = normalize(cross(upViewVector, zAxis));\n vec3 yAxis = cross(zAxis, xAxis);\n yAxis = normalize(yAxis);\n mat3 matrix = mat3(xAxis,yAxis,zAxis);\n vec3 offset = matrix * rotateZ(-czm_piOverFour * 3.0 + aTexCoord0.z) * v3Normal;\n\tviewPos.xyz = viewPos.xyz + offset * computerOnePixelLength();\n\tclip_vertex = viewPos;\n\tvec4 pos = uProjection * viewPos;\n\treturn pos;\n}\n\nvoid main()\n{\n vTexCoord.xy = aTexCoord0.xy;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor * uDiffuseColor;\n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz);\n#else\n vTexCoord.zw = aTexCoord1.xy;\n gl_Position = computePos(aNormal);\n#endif\n}\n",_0x1792ba=(_0x2cc6cd=!0,function(e,t){var i=_0x2cc6cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2cc6cd=!1,i}),_0x541f31=_0x1792ba(void 0,(function(){return _0x541f31.toString().search("(((.+)+)+)+$").toString().constructor(_0x541f31).search("(((.+)+)+)+$")})),_0x2cc6cd;_0x541f31();var _0x223db1="\n#include \n#include \nuniform sampler2D uTexture; \nuniform sampler2D uSecTexture; \n \nvarying vec4 vColor; \nvarying vec4 vTexCoord; \nvarying vec4 clip_vertex; \nvarying vec4 vSecondColor; \n#include \n#include \n\nvoid main() \n{ \n preClip(); \n\tvec4 texColor = vec4(vColor.rgb, min(texture2D(uTexture, vTexCoord.xy).a, vColor.a)); \n\tvec4 haloTexColor = vec4(uAmbientColor.rgb, min(texture2D(uSecTexture, vTexCoord.zw).a, uAmbientColor.a)); \n\tif(texColor.a + haloTexColor.a < 0.2) \n\t{ \n\t\tdiscard; \n\t} \n\tvec3 v3Color = mix(haloTexColor.rgb, texColor.rgb, texColor.a + 0.2); \n\tgl_FragColor = vec4(v3Color.rgb, min(1.0, texColor.a + haloTexColor.a)); \n\tif(gl_FragColor.a < 0.1) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef CLIP \n\tgl_FragColor *= clip(clip_vertex, 1.0); \n#endif \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n}",_0x3e9fc0=(_0x16125f=!0,function(e,t){var i=_0x16125f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16125f=!1,i}),_0x461804=_0x3e9fc0(void 0,(function(){return _0x461804.toString().search("(((.+)+)+)+$").toString().constructor(_0x461804).search("(((.+)+)+)+$")})),_0x16125f;_0x461804();var _0x4da3bc="\n#include \n#include \n#include \n#include \nuniform sampler2D uTexture; \nvarying vec4 vColor; \nvarying vec4 vTexCoord; \nvarying vec4 clip_vertex; \nvarying vec4 vSecondColor; \n#include \n#include \n \nvoid main() \n{ \n\tpreClip();\n\tvec4 texColor = texture2D(uTexture, vTexCoord.xy); \n#ifdef RGBTOBGR \n texColor = vec4(texColor.b, texColor.g, texColor.r, texColor.a); \n#endif \n\tgl_FragColor = vColor * texColor; \n\tif(gl_FragColor.a < 0.1) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef CLIP\n gl_FragColor *= clip(uView * uModelMatrix * vec4(clip_vertex.xyz, 1.0), 1.0); \n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n}",_0x16c46b=(_0x1d39f3=!0,function(e,t){var i=_0x1d39f3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d39f3=!1,i}),_0x16361d=_0x16c46b(void 0,(function(){return _0x16361d.toString().search("(((.+)+)+)+$").toString().constructor(_0x16361d).search("(((.+)+)+)+$")})),_0x1d39f3;_0x16361d();var _0x4c08bd="attribute vec4 aPosition;\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\n\nattribute vec4 aTexCoord2;\n\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nuniform float uLineWidth;\nuniform float uIsPicking;\nuniform vec4 uPickPosition;\nuniform mat4 uMatrixInvert;\nuniform vec4 uDiffuseColor;\nuniform vec4 uSelColor;\n#ifdef SELECTED\nvarying float fSelected;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nconst float SCREEN_VALUE = 1.0 / (2.0 * 1236.077);\n\nfloat ComputerLineWidth()\n{\n\tvec4 worldPos = czm_model * aPosition;\n\treturn uLineWidth * length(czm_viewerPositionWC - worldPos.xyz) * SCREEN_VALUE;\n}\n\nvoid main()\n{\n float shadowVolumeWidth = ComputerLineWidth();\n vec4 vertexPos = aPosition;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n if(uIsPicking > 0.0)\n {\n\t\tshadowVolumeWidth = shadowVolumeWidth * 3.0;\n\t\tvertexPos.xyz = vertexPos.xyz + aTexCoord2.xyz * shadowVolumeWidth + normalize(aTexCoord1.xyz) * uPickPosition.z;\n }\n else\n {\n\t\tvertexPos.xyz = vertexPos.xyz + aTexCoord2.xyz * shadowVolumeWidth + aTexCoord1.xyz;\n }\n vec4 v_Position = czm_modelViewProjection * vertexPos;\n vColor = vertexColor * uDiffuseColor;\n#ifdef SELECTED\n vColor = uSelColor;\n fSelected = aTexCoord0.x;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}",_0x204ec8=(_0x441e35=!0,function(e,t){var i=_0x441e35?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x441e35=!1,i}),_0x2423fb=_0x204ec8(void 0,(function(){return _0x2423fb.toString().search("(((.+)+)+)+$").toString().constructor(_0x2423fb).search("(((.+)+)+)+$")})),_0x441e35;_0x2423fb();var _0x3b4223="\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n\n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n\n#ifdef BatchTable\nattribute float batchId;\n#endif\n#include \n#include \n#include \n#include \nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\nvarying vec2 v_inversePlaneExtents;\nvarying float fSelected;\n\nvoid ComputeBounds()\n{\n vec3 southWestCorner = (czm_modelView * vec4(uSouthWest, 1.0)).xyz;\n vec3 northWestCorner = czm_normal * uNorthDir + southWestCorner;\n vec3 southEastCorner = czm_normal * uEastDir + southWestCorner;\n vec3 eastWard = southEastCorner - southWestCorner;\n float eastExtent = length(eastWard);\n eastWard /= eastExtent;\n vec3 northWard = northWestCorner - southWestCorner;\n float northExtent = length(northWard);\n northWard /= northExtent;\n v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\n v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\n v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n}\nvoid main()\n{\n#ifdef HAS_TEXTURE\n ComputeBounds();\n#endif\n vec4 realPosition = aPosition;\n#ifdef COMPRESS_VERTEX\n realPosition = decode_position_min + aPosition * decode_position_normConstant;\n#endif\n vec3 vertexPos = realPosition.xyz;\n vec3 zDir = aTexCoord1.xyz;\n bool hasBaseHeight = false;\n if(length(realPosition) > 0.1){\n hasBaseHeight = true;\n }\n float topOrBottom = dot(zDir, vec3(0.0, 0.0, 1.0)) > 0.0 ? 1.0 : -1.0;\n vec3 upDir = zDir * topOrBottom;\n float fExtendHeight = 0.0;\n float minTerrainHeight = uMinMaxTerrainHeightAndPickInfo.x;\n float maxTerrainHeight = uMinMaxTerrainHeightAndPickInfo.y;\n float isPicking = uMinMaxTerrainHeightAndPickInfo.z;\n float pickPositionHeight = uMinMaxTerrainHeightAndPickInfo.w;\n if(isPicking > 0.0){\n // 顶点保存了高度,在拾取时在原始的顶点高度附近进行上下拉伸\n if(hasBaseHeight){\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, -50.0, 100.0);\n }\n else{\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, pickPositionHeight - 2.0, pickPositionHeight + 10.0);\n }\n }\n else{\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, minTerrainHeight, maxTerrainHeight);\n }\n vertexPos.xyz = realPosition.xyz + upDir * fExtendHeight;\n vec4 v_Position = uViewProjection * uModelMatrix * vec4(vertexPos, 1.0);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor \n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif \n#endif \nfSelected = 0.0;\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, vec4(1.0), vertexColor, fSelected);\n#endif\n#ifdef SELECTED\n vColor = uSelColor;\n#else\n vColor = vertexColor * uDiffuseColor * uFillForeColor;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}\n",_0xbb353=(_0xd86763=!0,function(e,t){var i=_0xd86763?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd86763=!1,i}),_0x4e154b=_0xbb353(void 0,(function(){return _0x4e154b.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e154b).search("(((.+)+)+)+$")})),_0xd86763;_0x4e154b();var _0x3410ec="attribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nuniform float uIsPicking;\nuniform mat4 uMatrixInvert;\nuniform vec4 uPickPosition;\nuniform vec4 uDiffuseColor;\nuniform vec4 uSelColor;\n#ifdef SELECTED\nvarying float fSelected;\n#endif\n\nvoid main()\n{\n vec3 vertexPos = aPosition;\n vertexPos.xyz = vertexPos.xyz + aTexCoord1.xyz;\n vec4 v_Position = czm_modelViewProjection * vec4(vertexPos, 1.0);\n if(uIsPicking > 0.0)\n {\n#ifdef EXTEND_OBJECT\n\t\tvec4 modelBottomPos = uMatrixInvert * czm_model * vec4(aPosition, 1.0);\n\t\tvec4 modelTopPos = uMatrixInvert * czm_model * vec4(vertexPos, 1.0);\n\t\tif(uPickPosition.z < modelBottomPos.z || uPickPosition.z > modelTopPos.z)\n\t\t{\n\t\t\tvColor.a = 0.0;\n\t\t}\n#else\n\t\tvertexPos.xyz = aPosition.xyz + normalize(aTexCoord1.xyz) * (uPickPosition.z + 10.0);\n\t\tvec4 v_Position = czm_modelViewProjection * vec4(vertexPos, 1.0);\n#endif\n }\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n#ifdef SELECTED\n vColor = uSelColor;\n fSelected = aTexCoord0.x;\n#else\n vColor = vertexColor * uDiffuseColor;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}",_0x19dcb4=(_0x5d8085=!0,function(e,t){var i=_0x5d8085?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d8085=!1,i}),_0x127c1a=_0x19dcb4(void 0,(function(){return _0x127c1a.toString().search("(((.+)+)+)+$").toString().constructor(_0x127c1a).search("(((.+)+)+)+$")})),_0x5d8085;_0x127c1a();var _0x5e3105="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec4 vColor;\nvarying float vWindowZ;\nvarying float fSelected;\nvarying vec4 vSecondColor;\n#include \n#include \n#include \n#ifdef HAS_TEXTURE\nuniform sampler2D uTexture;\nuniform vec2 uLevelScale;\nuniform vec2 uRepeatTimes;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\nvarying vec2 v_inversePlaneExtents;\n#endif\n\n#ifdef HAS_TEXTURE\nvec4 getTextureColor()\n{\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n vec2 uv;\n uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\n uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n vec2 st;\n st.x = czm_lineDistance(vec2(0.0), vec2(0.0, 1.0), uv);\n st.y = czm_lineDistance(vec2(0.0), vec2(1.0, 0.0), uv);\n st.xy *= uLevelScale * uRepeatTimes;\n vec4 texColor = texture2D(uTexture, st);\n if(texColor.a < 0.01) {\n texColor.a = 1.0;\n }\n return texColor;\n}\n#endif\n#include \nvoid main()\n{\npreClip();\n#ifdef SELECTED\n if(fSelected < 0.5)\n {\n discard;\n }\n#endif\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec4 texColor = vec4(1.0);\n#ifdef HAS_TEXTURE\n texColor = getTextureColor();\n#endif\n gl_FragColor = vColor * texColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}\n",_0x5f3bb5=(_0x4facc3=!0,function(e,t){var i=_0x4facc3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4facc3=!1,i}),_0x3a68d7=_0x5f3bb5(void 0,(function(){return _0x3a68d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a68d7).search("(((.+)+)+)+$")})),_0x4facc3;_0x3a68d7();var _0x3b10bb="\n#include \n#include \nattribute vec4 aPosition; \nattribute vec3 aNormal; \nattribute vec4 aTexCoord0; \n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable \nattribute float batchId;\nuniform sampler2D batchTexture; \nvec2 computeSt(float batchId)\n{\n float stepX = batchTextureStep.x;\n float centerX = batchTextureStep.y;\n float numberOfAttributes = float(5);\n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);\n}\nvec4 czm_batchTable_pickColor(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(2);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n value /= 255.0;\n return value;\n}\nvec4 czm_batchTable_operation(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(1);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n return value;\n}\n#endif \n \nvarying vec4 vMirrorCoord; \nvarying vec4 vSecondColor; \nvarying vec4 vPostionEC; \nvarying vec4 vPositionMC; \nvarying vec4 vColor;\nvarying vec2 fSelected;\n#ifdef EXCAVATION \n varying vec4 vExcavationVertexPos; \n#endif \nvoid s3mBatchOperation(vec4 operationType, inout vec4 vertexColor)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n}\n\nvoid main() \n{ \n#ifdef EXCAVATION \n vExcavationVertexPos = uGeoMatrix * vec4(aPosition.xyz, 1.0); \n#endif \n\tvec4 oPos = czm_modelViewProjection * aPosition;\n\t\n\tvPositionMC = uGeoMatrix * aPosition; \n\tmat4 textureMatrix = mat4(0.5, 0.0, 0.0, 0.0, \n\t\t\t0.0, 0.5, 0.0, 0.0, \n\t\t\t0.0, 0.0, 0.5, 0.0, \n\t\t\t0.5, 0.5, 0.5, 1.0); \n\tvMirrorCoord = textureMatrix * oPos;\n\tgl_Position = oPos; \n\tvPostionEC = czm_modelView * aPosition; \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n#endif\nvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n s3mBatchOperation(operationType, vertexColor);\n#endif\n vColor = vertexColor;\n}",_0x1b9d13=(_0x5e0b0e=!0,function(e,t){var i=_0x5e0b0e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e0b0e=!1,i}),_0x1d4e5c=_0x1b9d13(void 0,(function(){return _0x1d4e5c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d4e5c).search("(((.+)+)+)+$")})),_0x5e0b0e;_0x1d4e5c();var _0xace9b2="\n#extension GL_EXT_draw_buffers : enable\n#if defined(PREPASS) && defined(WEBGPU)\nlayout(location = 0) out vec4 glFragData[3];\n#endif\n#include \n#include \n#include \n#include \n#include \nuniform sampler2D uReflectMap;\nuniform sampler2D uNoiseMap;\nvarying vec4 vMirrorCoord;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\nvarying vec4 vPostionEC;\nvarying vec4 vColor;\n\nvec4 getNoise( vec2 uv ) {\n vec2 uv0 = ( uv / 103.0 ) + vec2(uTimeVal / 17.0, uTimeVal / 29.0) * uBumpSpeed;\n vec2 uv1 = uv / 107.0 - vec2( uTimeVal / -19.0, uTimeVal / 31.0 ) * uBumpSpeed;\n vec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( uTimeVal / 101.0, uTimeVal / 97.0 ) * uBumpSpeed;\n vec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( uTimeVal / 109.0, uTimeVal / -113.0 ) * uBumpSpeed;\n vec4 noise = texture2D( uNoiseMap, uv0 ) +\n texture2D( uNoiseMap, uv1 ) +\n texture2D( uNoiseMap, uv2 ) +\n texture2D( uNoiseMap, uv3 );\n return noise * 0.5 - 1.0;\n}\n \nvoid sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) \n{\n vec3 sunDirection = czm_lightDirectionEC; \n vec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) ); \n float direction = max( 0.0, dot( eyeDirection, reflection ) ); \n specularColor += pow( direction, shiny ) * uSunColor.rgb * spec; \n diffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * uSunColor.rgb * diffuse; \n} \n\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\n\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ),\n vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ),\n vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n const float toneMappingExposure = 1.0;\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return clamp( color, 0.0, 1.0);\n}\n\n#include \nvoid main()\n{\n preClip();\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n vec3 worldToEye = -vPostionEC.xyz; \n float distance = length(worldToEye);\n vec4 noise = getNoise(vPositionMC.xy); \n noise.xy *= uNoiseScale;\n vec3 surfaceNormalEC = czm_normal * normalize( noise.xyz * vec3( 1.5, 1.5, 1.0 ) );\n vec3 diffuseLight = vec3(0.0); \n vec3 specularLight = vec3(0.0); \n vec3 eyeDirection = normalize( worldToEye.xyz ); \n sunLight( surfaceNormalEC, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );\n vec2 distortion = surfaceNormalEC.xy * ( 0.001 + 1.0 / distance ) * 3.7;\n vec2 mirrorCoord = vMirrorCoord.xy / vMirrorCoord.w;\n vec3 reflectionSample = vec3( textureLod( uReflectMap, mirrorCoord + distortion, uReflectMapLod));\n float theta = max( dot( eyeDirection, surfaceNormalEC ), 0.0 ); \n float rf0 = 0.3; \n vec3 waterColor = uWaterColor.rgb * uWaterBrightness;\n float reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 ); \n vec3 scatter = max( 0.0, dot( surfaceNormalEC, eyeDirection ) ) * waterColor;\n reflectionSample *= uUseRefectMap;\n vec3 albedo = mix((uSunColor.rgb * diffuseLight * 0.3 + scatter), (vec3(0.1) + reflectionSample * 0.9 + reflectionSample * specularLight), reflectance); \n vec4 finalColor = vec4(albedo, 1.0); \n finalColor.a = uWaterColor.a;\n #ifndef HDR\n finalColor.rgb = ACESFilmicToneMapping(finalColor.rgb);\n #endif\n if(finalColor.a < 0.1)\n {\n discard;\n }\n\n#ifdef CLIP\n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n\n#ifdef PREPASS\n vec3 normalEC = normalize(czm_normal * czm_computeNormal(vPositionMC.xyz));\n normalEC += noise.xyz * 0.05;\n gl_FragData[0] = vec4(vPostionEC.xyz, 1.0);\n // 相机坐标系法线\n gl_FragData[1] = vec4(normalEC, 1.0);\n // 反射率\n gl_FragData[2] = vec4(1.0);\n#else\n gl_FragColor = finalColor;\n#endif\n\n}",_0x5739be=(_0x1ad96d=!0,function(e,t){var i=_0x1ad96d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ad96d=!1,i}),_0x417b10=_0x5739be(void 0,(function(){return _0x417b10.toString().search("(((.+)+)+)+$").toString().constructor(_0x417b10).search("(((.+)+)+)+$")})),_0x1ad96d;_0x417b10();var _0x35073f="\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vSecondColor;\nvarying vec2 oUV;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nuniform mat4 uTexMatrix;\nvoid main()\n{\n float fExtendHeight = aTexCoord1.x;\n\tvec3 Postion = aPosition.xyz + (aNormal.xyz * fExtendHeight).xyz;\n\tfloat u = aTexCoord0.x;\n\tfloat v = aTexCoord0.y;\n if ( aTexCoord1.y > 0.2 && aTexCoord1.y < 0.8)\n {\n if (uTexMatrix[0].x > 0.0)\n {\n float fRealSize = uTexMatrix[1].y;\n v = fExtendHeight / fRealSize;\n }\n else\n {\n float fRepeatNum = uTexMatrix[1].y;\n v = fRepeatNum;\n }\n }\n oUV = vec2(u, v);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor;\n\tgl_Position = czm_modelViewProjection * vec4(Postion, 1.0);\n\tvPositionMC = vec4(Postion, 0.0);\n}",_0x3999c7=(_0xe3a89=!0,function(e,t){var i=_0xe3a89?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe3a89=!1,i}),_0x2b2ec6=_0x3999c7(void 0,(function(){return _0x2b2ec6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b2ec6).search("(((.+)+)+)+$")})),_0xe3a89;_0x2b2ec6();var _0x728fb1="\n#ifdef HAS_TEXTURE\nuniform sampler2D uTexture;\n#endif\nvarying vec2 oUV;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvoid main()\n{\n\tvec4 mixColor = vec4(1.0);\n#ifdef HAS_TEXTURE\n mixColor = mixColor * texture2D( uTexture, oUV );\n#endif\n gl_FragColor = mixColor * vColor;\n#ifdef HAS_LIGHT\n\tgl_FragColor *= czm_computeLightColorInFP(vPositionMC.xyz, vPositionMC.w, vec3(0.0));\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x10255e=(_0x3570f0=!0,function(e,t){var i=_0x3570f0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3570f0=!1,i}),_0x55494d=_0x10255e(void 0,(function(){return _0x55494d.toString().search("(((.+)+)+)+$").toString().constructor(_0x55494d).search("(((.+)+)+)+$")})),_0x3570f0;_0x55494d();var _0xb28fe0="\n#include \nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aColor;\nvarying vec2 vTexCoord;\nvarying vec4 selectionColor;\nvarying vec3 oriVertex;\nvarying vec3 vPositionToEyeEC;\nvoid main()\n{\n vTexCoord = aTexCoord0.xy;\n oriVertex = aPosition.xyz;\n\tvec4 vVertex = vec4(aPosition.xyz, 1.0);\n\tgl_Position = uViewProjection * uModelMatrix * vVertex;\n\tselectionColor = vec4(aColor.rgb, 1.0);\n\tvec4 positionEC = uView * uModelMatrix * vVertex;\n vPositionToEyeEC = -normalize(positionEC.xyz);\n}\n",_0x1db8cd=(_0x192865=!0,function(e,t){var i=_0x192865?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x192865=!1,i}),_0x5bc48e=_0x1db8cd(void 0,(function(){return _0x5bc48e.toString().search("(((.+)+)+)+$").toString().constructor(_0x5bc48e).search("(((.+)+)+)+$")})),_0x192865;_0x5bc48e();var _0x362543="\n#include \n#include \n#include \n#include \nvarying vec3 oriVertex;\nvarying vec2 vTexCoord;\nvarying vec4 selectionColor;\nvarying vec3 vPositionToEyeEC;\nconst float horizontal = 0.0;\nconst float PI = 3.1415926535897932384626;\nvec2 rotateTexCoord(vec2 oriTexCoord)\n{\n\tfloat rotationRadian = uRotationAngle * PI;\n\tvec2 n = vec2(cos(rotationRadian),-sin(rotationRadian));\n\tvec2 t = vec2(sin(rotationRadian),cos(rotationRadian));\n\tmat2 rotateZMatrix = mat2(n,t);\n\treturn rotateZMatrix * oriTexCoord;\n}\nvec4 getGridMaterial(vec2 texCoord)\n{\n\tvec2 lineCount = vec2(uRepeatX, uRepeatY);\n\tvec2 lineOffset = vec2(uOffsetX, uOffsetY);\n\tvec2 lineThickness = vec2(uLineWidthX, uLineWidthY);\n\n float scaledWidth = fract(lineCount.s * texCoord.s - lineOffset.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n\n float scaledHeight = fract(lineCount.t * texCoord.t - lineOffset.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n\n float value;\n\n const float fuzz = 1.2;\n vec2 thickness = (lineThickness * 1.0) - 1.0;\n\n vec2 dx = abs(dFdx(texCoord));\n vec2 dy = abs(dFdy(texCoord));\n vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\n\n\tif(uRepeatX < 0.5)\n\t{\n\t\tvalue = smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight);\n\t}\n\telse if(uRepeatY < 0.5)\n\t{\n\t\tvalue = smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth);\n\t}\n\telse\n\t{\n\t\tvalue = min(\n\t\t\tsmoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\n\t\t\tsmoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n\t}\n\n\tif(value < 0.5)\n\t{\n\t\treturn uForeColor;\n\t}\n\treturn uBackColor;\n}\nvec4 getStripMaterial(vec2 texCoord)\n{\n\tfloat repeat = uRepeatX;\n\tfloat offset = uOffsetX;\n\n float coord = mix(texCoord.s, texCoord.t, horizontal);\n float value = fract((coord - offset) * (repeat * 0.5));\n\n vec4 currentColor = mix(uForeColor, uBackColor, step(0.5, value)); \n\n return currentColor;\n}\nvec4 getDotMaterial(vec2 texCoord)\n{\n\tfloat dotRepeat = uRepeatX;\n\n float b = smoothstep(0.3, 0.32, length(fract(dotRepeat * texCoord.st) - 0.5));\n vec4 color = mix(uForeColor, uBackColor, b);\n return color;\n}\nvec4 getCheckBoardMaterial(vec2 texCoord)\n{\n\tvec2 checkBoardRepeat = vec2(uRepeatX, uRepeatY); \n\n float b = mod(floor(checkBoardRepeat.s * texCoord.s) + floor(checkBoardRepeat.t * texCoord.t), 2.0);\n vec4 currentColor = mix(uForeColor, uBackColor, b);\n return currentColor;\n}\n\nvoid main()\n{\n vec3 newNormal = vec3( czm_normal * czm_computeNormal( oriVertex ) );\n newNormal = normalize( newNormal );\n\tvec4 mixColor = czm_directionLight(newNormal,vPositionToEyeEC,oriVertex);\n\n\tvec2 rotateCoord = rotateTexCoord(vTexCoord);\n\n vec4 color = uForeColor;\n \n if(uType > 3.5)\n {\n \tcolor = getGridMaterial(rotateCoord);\n }\n else if(uType > 2.5)\n {\n \tcolor = getCheckBoardMaterial(rotateCoord);\n }\n else if(uType > 1.5)\n {\n \tcolor = getDotMaterial(rotateCoord);\n }\n else if(uType > 0.5)\n {\n \tcolor = getStripMaterial(rotateCoord);\n }\n \n gl_FragColor = color * mixColor * selectionColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}\n",_0x2285c8=(_0x1b42c7=!0,function(e,t){var i=_0x1b42c7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b42c7=!1,i}),_0x3ae718=_0x2285c8(void 0,(function(){return _0x3ae718.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ae718).search("(((.+)+)+)+$")})),_0x1b42c7;_0x3ae718();var _0x1e7638="\n#include \n#include \n#include \n#include \n#include \nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\n#ifdef TexCoord2\n attribute vec4 aTexCoord1;\n#endif\n#ifdef VertexColor\n #ifdef WEBGPU\n attribute uvec4 aColor;\n #else\n attribute vec4 aColor;\n #endif\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying vec4 vPositionMC;\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\nvoid clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane,\n out vec4 clippedPositionEC)\n {\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = uCurrentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -uCurrentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n }\n vec4 getPolylineWindowCoordinates(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n {\n #ifdef POLYLINE_DASH\n vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\n vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\n vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\n vec2 lineDir;\n if (usePrevious) {\n lineDir = normalize(positionWindow.xy - previousWindow.xy);\n }\n else {\n lineDir = normalize(nextWindow.xy - positionWindow.xy);\n }\n angle = atan(lineDir.x, lineDir.y) - 1.570796327;\n angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n #endif\n vec4 clippedPrevWC, clippedPrevEC;\n bool prevSegmentClipped, prevSegmentCulled;\n clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\n vec4 clippedNextWC, clippedNextEC;\n bool nextSegmentClipped, nextSegmentCulled;\n clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\n bool segmentClipped, segmentCulled;\n vec4 clippedPositionWC, clippedPositionEC;\n clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\n if (segmentCulled)\n {\n return vec4(0.0, 0.0, 0.0, 1.0);\n }\n vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\n vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\n if (prevSegmentCulled)\n {\n directionToPrevWC = -directionToNextWC;\n }\n else if (nextSegmentCulled)\n {\n directionToNextWC = -directionToPrevWC;\n }\n vec2 thisSegmentForwardWC, otherSegmentForwardWC;\n if (usePrevious)\n {\n thisSegmentForwardWC = -directionToPrevWC;\n otherSegmentForwardWC = directionToNextWC;\n }\n else\n {\n thisSegmentForwardWC = directionToNextWC;\n otherSegmentForwardWC = -directionToPrevWC;\n }\n vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\n vec2 leftWC = thisSegmentLeftWC;\n float expandWidth = width * 0.5;\n if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n {\n vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\n vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\n float leftSumLength = length(leftSumWC);\n leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\n vec2 u = -thisSegmentForwardWC;\n vec2 v = leftWC;\n float sinAngle = abs(u.x * v.y - u.y * v.x);\n expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n }\n vec2 offset = leftWC * expandDirection * expandWidth * uPixelRatio;\n return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (uProjection * clippedPositionEC).w;\n }\nvoid main()\n{ \n vec4 texCoord2 = vec4(0.0);\n #ifdef TexCoord2\n texCoord2 = aTexCoord1;\n #endif\n\tvec2 expandAndWidth = texCoord2.zw;\n\texpandAndWidth.y = expandAndWidth.y * uEffectLineWidth;\n\tfloat u = abs(expandAndWidth.x);\n\tfloat expandDir = sign(expandAndWidth.x);\n#ifdef ENABLE_DYNAMIC\n\tfloat w = 0.2 + 0.3*(1.0 - pow(2.0*abs(u - 0.5), 2.0));\n\tfloat width = abs(expandAndWidth.y*w) + 0.5;\n#else\n\tfloat width = abs(expandAndWidth.y) + 0.5;\n#endif\n\tbool usePrev = expandAndWidth.y < 0.0;\n\tvPositionMC.xyz = aPosition.xyz;\n vPositionMC.w = 0.0;\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vec4(aPosition.xyz, 1.0);\n#endif\n mat4 modelView = uView * uModelMatrix;\n\tvec4 p = modelView * aPosition;\n\tvec4 prev = modelView * vec4(aNormal, 1.0);\n\tvec4 next = modelView * aTexCoord0;\n\tv_st.s = texCoord2.x;\n\tv_width = width;\n\tv_alpha = u;\n\tfloat polylineAngle;\n\tvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\n\tv_polylineAngle = polylineAngle;\n\tgl_Position = czm_viewportOrthographic * positionWC;\n\tv_st.t = czm_writeNonPerspective(clamp(texCoord2.y, 0.0, 1.0), gl_Position.w);\n\tvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n\tvColor = vertexColor;\n}\n",_0x34b739=(_0x4f196f=!0,function(e,t){var i=_0x4f196f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f196f=!1,i}),_0x41eabd=_0x34b739(void 0,(function(){return _0x41eabd.toString().search("(((.+)+)+)+$").toString().constructor(_0x41eabd).search("(((.+)+)+)+$")})),_0x4f196f;_0x41eabd();var _0x54ee86="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#include \n#include \n#include \n#include \n#include \nvarying vec4 vColor;\nvarying vec2 v_st;\nvarying float v_width;\nvarying float v_polylineAngle;\nvarying vec4 vSecondColor;\nconst float maskLength = 16.0;\nvarying vec4 vPositionMC;\n\nmat2 rotate(float rad)\n{\n\tfloat c = cos(rad);\n\tfloat s = sin(rad);\n\treturn mat2(\n\t\tc, s,\n\t\t-s, c\n\t);\n}\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\n\tfloat slope = (p0.y - p1.y) / (p0.x - p1.x);\n\treturn slope * (x - p0.x) + p0.y;\n}\n\n#include \n#include \nvoid main()\n{\n vec2 st = v_st;\n st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);\n preClip();\n#ifdef GL_OES_standard_derivatives\n\tfloat base = 1.0 - abs(fwidth(st.s)) * 10.0;\n#else\n\tfloat base = 0.99;\n#endif\n\tvec2 center = vec2(1.0, 0.5);\n\tfloat ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\n\tfloat ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\n\tfloat halfWidth = 0.15;\n\tfloat s = step(0.5 - halfWidth, st.t);\n\ts *= 1.0 - step(0.5 + halfWidth, st.t);\n\ts *= 1.0 - step(base, st.s);\n\tfloat t = step(base, st.s);\n\tt *= 1.0 - step(ptOnUpperLine, st.t);\n\tt *= step(ptOnLowerLine, st.t);\n\tfloat dist;\n\n\tvec4 outsideColor = vec4(0.0);\n\tvec4 currentColor;\n\tif (uIsArrow < 0.5 || st.s < base)\n\t{\n\t\tif(uType > 2.5)\n\t\t{\n\t\t\tfloat glow = uGlowPower / abs(st.t - 0.3) - (uGlowPower / 0.5);\n\t\t\tvec3 emission = max(vec3(glow - 1.0 + uColor.rgb), uColor.rgb);\n\t\t\tfloat alpha = clamp(0.0, 1.0, glow) * uColor.a;\n\t\t\tvec4 fragColor = vec4(emission, alpha);\n\t\t\tif(uIsArrow > 0.5)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, fragColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, fragColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = fragColor;\n\t\t\t}\n\t\t}\n\t\telse if(uType > 1.5)\n\t\t{\n\t\t float halfInteriorWidth = 0.5 * (v_width - uOutlineWidth) / v_width;\n\t\t\tfloat b = step(0.5 - halfInteriorWidth, st.t);\n\t\t\tb *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\n\t\t\tfloat d1 = abs(st.t - (0.5 - halfInteriorWidth));\n\t\t\tfloat d2 = abs(st.t - (0.5 + halfInteriorWidth));\n\t\t\tfloat dist = min(d1, d2);\n\t\t\tcurrentColor = mix(uOutlineColor, uColor, b);\n\t\t\tgl_FragColor = czm_antialias(uOutlineColor, uColor, currentColor, dist, 0.1);\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse if(uType == 1.0)\n\t\t{\n\t\t\tvec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n\t\t\tfloat dashPosition = fract(pos.x / uDashLength);\n\t\t\tfloat maskIndex = floor(dashPosition * maskLength);\n\t\t\tfloat maskTest = floor(uDashPattern / pow(2.0, maskIndex));\n\t\t\tvec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? uGapColor : uColor;\n\t\t\tif (fragColor.a < 0.005)\n\t\t\t{\n\t\t\t\tdiscard;\n\t\t\t}\n\t\t\tif(uIsArrow > 0.5)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, fragColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, fragColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = fragColor;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(uIsArrow > 0.5)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, uColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, uColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = uColor;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tfloat d1 = czm_infinity;\n\t\tif (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n\t\t{\n\t\t\td1 = abs(st.s - base);\n\t\t}\n\t\tfloat d2 = abs(st.t - ptOnUpperLine);\n\t\tfloat d3 = abs(st.t - ptOnLowerLine);\n\t\tdist = min(min(d1, d2), d3);\n\t\tcurrentColor = mix(outsideColor, uColor, clamp(s + t, 0.0, 1.0));\n\t\tgl_FragColor = czm_antialias(outsideColor, uColor, currentColor, dist, 0.1);\n\t}\n#ifndef REPLACE_COLOR_TYPE\n gl_FragColor = gl_FragColor * vColor;\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n if(gl_FragColor.a < 0.1){discard;}\n#ifdef LOG_DEPTH\n if(uPolygonOffset.x != 0.0 || uPolygonOffset.y != 0.0){\n float logZ = 1.0 / gl_FragCoord.w + 1.0;\n float DZ = max(dFdx(logZ), dFdy(logZ));\n logZ += DZ * uPolygonOffset.x + 0.0000001 * uPolygonOffset.y;\n czm_writeLogDepth(logZ);\n }\n else{\n czm_writeLogDepth();\n }\n#endif\n#ifdef CLIP\n gl_FragColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n}\n",_0x4ebf9a=(_0x3685e7=!0,function(e,t){var i=_0x3685e7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3685e7=!1,i}),_0x52a5a9=_0x4ebf9a(void 0,(function(){return _0x52a5a9.toString().search("(((.+)+)+)+$").toString().constructor(_0x52a5a9).search("(((.+)+)+)+$")})),_0x3685e7;_0x52a5a9();var _0x45c27e="\n#include \n#include \n#include \n#include \n#include \nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\n\t#ifdef WEBGPU\n\tattribute uvec4 aColor;\n\t#else\n\tattribute vec4 aColor;\n\t#endif\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying float fWindowZ;\nvarying vec4 vPositionMC;\n\nvec4 eyeToWindowCoordinates(vec4 positionEC)\n{\n vec4 q = uProjection * positionEC; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n\nvoid clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p1ToP0 = p1 - p0;\n float magnitude = length(p1ToP0);\n vec3 direction = normalize(p1ToP0);\n float endPoint0Distance = -(uCurrentFrustum.x + p0.z);\n float denominator = -direction.z;\n if (endPoint0Distance < 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance < 0.0 && abs(denominator) > czm_epsilon7)\n {\n float t = (uCurrentFrustum.x + p0.z) / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n clipped = true;\n }\n }\n positionWC = eyeToWindowCoordinates(vec4(p0, 1.0));\n}\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\n\tvec4 endPointWC, p0, p1;\n\tbool culledByNearPlane, clipped;\n\tvec4 positionEC = position;\n\tvec4 prevEC = previous;\n\tvec4 nextEC = next;\n\tvec4 positionWindow = eyeToWindowCoordinates(positionEC);\n\tvec4 previousWindow = eyeToWindowCoordinates(prevEC);\n\tvec4 nextWindow = eyeToWindowCoordinates(nextEC);\n\n\tvec2 lineDir;\n\tif (usePrevious)\n\t{\n\t\tlineDir = normalize(positionWindow.xy - previousWindow.xy);\n\t}\n\telse\n\t{\n\t\tlineDir = normalize(nextWindow.xy - positionWindow.xy);\n\t}\n\tangle = atan(lineDir.x, lineDir.y) - 1.570796327;\n\tangle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n\n\tclipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, p0, clipped, culledByNearPlane);\n\tclipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, p1, clipped, culledByNearPlane);\n\tclipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, endPointWC, clipped, culledByNearPlane);\n\tif (culledByNearPlane)\n\t{\n\t\treturn vec4(0.0, 0.0, 0.0, 1.0);\n\t}\n\tvec2 prevWC = normalize(p0.xy - endPointWC.xy);\n\tvec2 nextWC = normalize(p1.xy - endPointWC.xy);\n\tfloat expandWidth = width * 0.5;\n\tvec2 direction;\n\tif (czm_equalsEpsilon(previous.xyz - position.xyz, vec3(0.0), czm_epsilon7) || czm_equalsEpsilon(prevWC, -nextWC, czm_epsilon7))\n\t{\n\t\tdirection = vec2(-nextWC.y, nextWC.x);\n\t}\n\telse if (czm_equalsEpsilon(next.xyz - position.xyz, vec3(0.0), czm_epsilon7) || clipped)\n\t{\n\t\tdirection = vec2(prevWC.y, -prevWC.x);\n\t}\n\telse\n\t{\n\t\tvec2 normal = vec2(-nextWC.y, nextWC.x);\n\t\tdirection = normalize((nextWC + prevWC) * 0.5);\n\t\tif (dot(direction, normal) < 0.0)\n\t\t{\n\t\t\tdirection = -direction;\n\t\t}\n\t\tfloat sinAngle = abs(direction.x * nextWC.y - direction.y * nextWC.x);\n\t\texpandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n\t}\n\tvec2 offset = direction * expandDirection * expandWidth * czm_resolutionScale;\n\treturn vec4(endPointWC.xy + offset, -endPointWC.z, 1.0);\n}\nvoid main()\n{\n\tvec2 expandAndWidth = aTexCoord1.zw;\n\texpandAndWidth.y = expandAndWidth.y * uEffectLineWidth;\n\tfloat u = abs(expandAndWidth.x);\n\tfloat expandDir = sign(expandAndWidth.x);\n#ifdef ENABLE_DYNAMIC\n\tfloat w = 0.2 + 0.3*(1.0 - pow(2.0*abs(u - 0.5), 2.0));\n\tfloat width = abs(expandAndWidth.y*w) + 0.5;\n#else\n\tfloat width = abs(expandAndWidth.y) + 0.5;\n#endif\n\tbool usePrev = expandAndWidth.y < 0.0;\n\tvPositionMC.xyz = aPosition.xyz;\n vPositionMC.w = 0.0;\n mat4 modelView = uView * uModelMatrix;\n\tvec4 p = modelView * aPosition;\n\tvec4 prev = modelView * vec4(aNormal, 1.0);\n\tvec4 next = modelView * aTexCoord0;\n\tv_st = aTexCoord1.xy;\n\tv_width = width;\n\tv_alpha = u;\n\tvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, v_polylineAngle);\n\tvec4 pos = uProjection * p;\n\tfWindowZ = (0.5 * (pos.z / pos.w) + 0.5);\n\tgl_Position = czm_viewportOrthographic * positionWC;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n\t#ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n float right_2 = operationType.x * 0.5;\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fWindowZ = -1.0;\n }\n#endif\n\tvColor = vertexColor;\n}\n",_0x1a2e03=(_0x35cffe=!0,function(e,t){var i=_0x35cffe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x35cffe=!1,i}),_0xd04321=_0x1a2e03(void 0,(function(){return _0xd04321.toString().search("(((.+)+)+)+$").toString().constructor(_0xd04321).search("(((.+)+)+)+$")})),_0x35cffe;_0xd04321();var _0x4632a6="\nattribute vec4 aPosition;\n#include \n#include \n#ifdef VertexColor\n attribute vec4 aColor;\n#endif\n#ifdef BatchTable\n attribute float batchId;\n#endif\n attribute vec4 aTexCoord0;\n attribute vec4 aTexCoord1;\n attribute vec4 aTexCoord2;\n attribute vec4 aTexCoord3;\n attribute vec4 aTexCoord4;\n attribute vec4 aTexCoord5;\n varying vec4 v_startPlaneNormalEcAndHalfWidth;\n varying vec4 v_endPlaneNormalEcAndBatchId;\n varying vec4 v_rightPlaneEC;\n varying vec4 v_endEcAndStartEcX;\n varying vec4 v_texcoordNormalizationAndStartEcYZ;\n varying vec4 v_vertexColor;\n varying vec4 vSecondColor;\n#ifdef COMPRESS_VERTEX\n uniform vec4 decode_position_min;\n uniform float decode_position_normConstant;\n#endif\n#ifdef COMPRESS_TEXCOORD\n uniform float decode_texCoord0_normConstant;\n uniform float decode_texCoord1_normConstant;\n uniform float decode_texCoord2_normConstant;\n uniform float decode_texCoord3_normConstant;\n uniform float decode_texCoord4_normConstant;\n uniform float decode_texCoord5_normConstant;\n uniform vec4 decode_texCoord0_min;\n uniform vec4 decode_texCoord1_min;\n uniform vec4 decode_texCoord2_min;\n uniform vec4 decode_texCoord3_min;\n uniform vec4 decode_texCoord4_min;\n uniform vec4 decode_texCoord5_min;\n#endif\n void main()\n {\n vec3 position3DHigh = aPosition.xyz;\n vec4 uncompress = vec4(1.0);\n#ifdef COMPRESS_VERTEX\n uncompress = decode_position_min + aPosition * decode_position_normConstant;\n position3DHigh = uncompress.xyz;\n#endif\n vec3 position3DLow = aTexCoord5.xyz;\n#ifdef COMPRESS_TEXCOORD\n uncompress = decode_texCoord5_min + aTexCoord5 * decode_texCoord5_normConstant;\n position3DLow = uncompress.xyz;\n#endif\n vec4 startHiAndForwardOffsetX = aTexCoord0;\n vec4 startLoAndForwardOffsetY = aTexCoord1;\n vec4 startNormalAndForwardOffsetZ = aTexCoord2;\n vec4 endNormalAndTextureCoordinateNormalizationX = aTexCoord3;\n vec4 rightNormalAndTextureCoordinateNormalizationY = aTexCoord4;\n#ifdef COMPRESS_TEXCOORD\n uncompress = decode_texCoord0_min + aTexCoord0 * decode_texCoord0_normConstant;\n startHiAndForwardOffsetX = uncompress;\n uncompress = decode_texCoord1_min + aTexCoord1 * decode_texCoord1_normConstant;\n startLoAndForwardOffsetY = uncompress;\n uncompress = decode_texCoord2_min + aTexCoord2 * decode_texCoord2_normConstant;\n startNormalAndForwardOffsetZ = uncompress;\n uncompress = decode_texCoord3_min + aTexCoord3 * decode_texCoord3_normConstant;\n endNormalAndTextureCoordinateNormalizationX = uncompress;\n uncompress = decode_texCoord4_min + aTexCoord4 * decode_texCoord4_normConstant;\n rightNormalAndTextureCoordinateNormalizationY = uncompress;\n#endif\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\n vec3 forwardOffset = vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\n vec3 offset = czm_normal * forwardOffset;\n vec3 ecEnd = ecStart + offset;\n vec3 forwardDirectionEC = normalize(offset);\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n v_endEcAndStartEcX.xyz = ecEnd;\n v_endEcAndStartEcX.w = ecStart.x;\n v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n vec4 positionRelativeToEye = czm_translateRelativeToEye(position3DHigh, position3DLow);\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye;\n float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\n vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection));\n vec3 normalEC = normalize(cross(planeDirection, upOrDown));\n upOrDown = cross(forwardDirectionEC, normalEC);\n upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\n positionEC.xyz += upOrDown;\n v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\n float width = uLineWidth;\n v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\n v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\n v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\n v_endPlaneNormalEcAndBatchId.w = 0.0;\n width = width * max(0.0, czm_metersPerPixel(positionEC));\n width = width / dot(normalEC, v_rightPlaneEC.xyz);\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n positionEC.xyz += width * normalEC;\n gl_Position = czm_depthClampFarPlane(czm_projection * positionEC);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n v_vertexColor = vertexColor * uLineColor;\n }\n ",_0x47efb1=(_0x334241=!0,function(e,t){var i=_0x334241?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x334241=!1,i}),_0x41705d=_0x47efb1(void 0,(function(){return _0x41705d.toString().search("(((.+)+)+)+$").toString().constructor(_0x41705d).search("(((.+)+)+)+$")})),_0x334241;_0x41705d();var _0x5b2edf="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#include \n varying vec4 v_startPlaneNormalEcAndHalfWidth;\n varying vec4 v_endPlaneNormalEcAndBatchId;\n varying vec4 v_rightPlaneEC; // Technically can compute distance for this here\n varying vec4 v_endEcAndStartEcX;\n varying vec4 v_texcoordNormalizationAndStartEcYZ;\n varying vec4 v_vertexColor;\n varying vec4 vSecondColor;\n void main(void)\n {\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n discard;\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0)\n {\n discard;\n }\n gl_FragColor = v_vertexColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n// vec3 alignedPlaneNormal;\n// // start aligned plane\n// alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\n// alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n// distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\n// // end aligned plane\n// alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\n// alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n// distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n// // Clamp - distance to aligned planes may be negative due to mitering,\n// // so fragment texture coordinate might be out-of-bounds.\n// float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\n// s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\n// float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\n// czm_writeDepthClampedToFarPlane();\n }\n ",_0x5d291d=(_0xbeaa75=!0,function(e,t){var i=_0xbeaa75?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xbeaa75=!1,i}),_0x5e87b3=_0x5d291d(void 0,(function(){return _0x5e87b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e87b3).search("(((.+)+)+)+$")})),_0xbeaa75;_0x5e87b3();var _0x53d054={SIZE_PER_INSTANCE:20,SIZE_PER_DM_INSTANCE:35,S3MB_BIM_INSTANCE:17,S3MB_BIM_INSTANCE_2:16,S3MB_PIPE_INSTANCE:29},_0x721735=Object.freeze(_0x53d054),_0x4af086=(_0x2e1f63=!0,function(e,t){var i=_0x2e1f63?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e1f63=!1,i}),_0x4d73db=_0x4af086(void 0,(function(){return _0x4d73db.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d73db).search("(((.+)+)+)+$")})),_0x2e1f63;_0x4d73db();var _0x37991b={NONE:0,LEFT:1,RIGHT:2,TOP:-1,BOTTOM:-2},_0x405774=Object.freeze(_0x37991b),_0x18a05a=(_0x3eb72d=!0,function(e,t){var i=_0x3eb72d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3eb72d=!1,i}),_0x6d8ff7=_0x18a05a(void 0,(function(){return _0x6d8ff7.toString().search("(((.+)+)+)+$").toString().constructor(_0x6d8ff7).search("(((.+)+)+)+$")})),_0x3eb72d;_0x6d8ff7();var _0x142755={DatasetField:0,EdgeLengthMin:1},_0x7aa085=Object.freeze(_0x142755),_0x21fb91=(_0x3738ed=!0,function(e,t){var i=_0x3738ed?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3738ed=!1,i}),_0x531a67=_0x21fb91(void 0,(function(){return _0x531a67.toString().search("(((.+)+)+)+$").toString().constructor(_0x531a67).search("(((.+)+)+)+$")})),_0x3738ed;_0x531a67();var _0x1e5d33={OPAQUE:"opaque",BLEND:"blend",MASK:"mask"},_0x5f0e97=Object.freeze(_0x1e5d33),_0x1d8672=(_0x3c6931=!0,function(e,t){var i=_0x3c6931?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3c6931=!1,i}),_0x37d4d1=_0x1d8672(void 0,(function(){return _0x37d4d1.toString().search("(((.+)+)+)+$").toString().constructor(_0x37d4d1).search("(((.+)+)+)+$")})),_0x3c6931;function _0x280589(e){var t=_0x3e2f69.call(this)||this;t._layer=e,t._name=_0x27131a.Polyline,this._initUniformMap()}function s$I(e){this._lightList={},this._lightList[_0x1d9df9.DIRECTIONAL]=new e$1N,this._lightList[_0x1d9df9.POINT]=new e$1N,this._lightList[_0x1d9df9.SPOT]=new e$1N,this._lightList[_0x1d9df9.HEMISPHERE]=new e$1N,this._visibleLightList={},this._visibleLightList[_0x1d9df9.POINT]=new e$1N,this._visibleLightList[_0x1d9df9.SPOT]=new e$1N,this._visiblePointLightCount=0,this._visibleSpotLightCount=0,this._visibleDirectionalLightCount=0,this._visibleHemisphereLightCount=0,this._ambientLightColor=new e$1U(0,0,0,1),this._sunLightColor=new e$1U(.8,.8,.8,1),this._sunLightON=1,this._changedLightList=new e$1N,this._pointLightDistanceDecay=[],this._spotLightDistanceDecayCosPenumbra=[],this._context=e,this._visibleDistanceMax=1e4,this._visibleCountAllowed=100,this._enableAmbientLightColor=!1,this._enableSunLightColor=!1}_0x37d4d1(),_0x3e2f69&&(_0x280589.__proto__=_0x3e2f69),_0x280589.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x280589.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x280589.prototype,{}),_0x280589.prototype._initUBOStruct=function(){const e=this._ubo;e.addUniform("uColor",4),e.addUniform("uOutlineColor",4),e.addUniform("uGapColor",4),e.addUniform("uEffectLineWidth",1),e.addUniform("uType",1),e.addUniform("uOutlineWidth",1),e.addUniform("uDashLength",1),e.addUniform("uDashPattern",1),e.addUniform("uGlowPower",1),e.addUniform("uIsArrow",1)},_0x280589.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),this._initUBOStruct(),this._ubo.create()},_0x280589.prototype.update=function(e){if(!e.webgpu&&!e.webgl2)return;e$2b(this._ubo)||this._initUBO(e);const t=this._layer,i=this._ubo,n=t._effect;let r=n._dashPattern;if(n._isMove){n._frame>159&&(n._frame=0);var o=Math.floor(n._frame/10),a=n._dashPattern<>16-o;n._frame++,r=a+s}i.updateDirectColor4("uColor",n._color),i.updateDirectColor4("uOutlineColor",n._outlineColor),i.updateDirectColor4("uGapColor",n._gapColor),i.updateFloat("uEffectLineWidth",n._lineWidth),i.updateFloat("uType",n._type),i.updateFloat("uOutlineWidth",n._outlineWidth),i.updateFloat("uDashLength",n._dashLength),i.updateFloat("uDashPattern",r),i.updateFloat("uGlowPower",n._glowPower),i.updateFloat("uIsArrow",n._isArrow?1:0),i.update()},_0x280589.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(t.webgl2||t.webgpu)return;var i={};const n=e._effect;i.uColor=function(){return n._color},i.uOutlineColor=function(){return n._outlineColor},i.uGapColor=function(){return n._gapColor},i.uEffectLineWidth=function(){return n._lineWidth},i.uType=function(){return n._type},i.uOutlineWidth=function(){return n._outlineWidth},i.uDashLength=function(){return n._dashLength},i.uDashPattern=function(){let e=n._dashPattern;if(n._isMove){n._frame>159&&(n._frame=0);var t=Math.floor(n._frame/10),i=n._dashPattern<>16-t;n._frame++,e=i+r}return e},i.uGlowPower=function(){return n._glowPower},i.uIsArrow=function(){return n._isArrow?1:0},this._uniformMap=i},_0x280589.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x280589.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x280589.prototype.isDestroyed=function(){return!1},_0x280589.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)},s$I.MaxPointLightCount=16,s$I.MaxSpotLightCount=16,s$I.MaxDirectionLightCount=4,Object.defineProperties(s$I.prototype,{pointLight:{get:function(){return this._lightList[_0x1d9df9.POINT]}},spotLight:{get:function(){return this._lightList[_0x1d9df9.SPOT]}},directionalLight:{get:function(){return this._lightList[_0x1d9df9.DIRECTIONAL]}},hemisphereLight:{get:function(){return this._lightList[_0x1d9df9.HEMISPHERE]}},ambientLightColor:{get:function(){return this._ambientLightColor},set:function(e){o$1q.defined("Light source ambientLightColor",e),e$1U.clone(e,this._ambientLightColor),this._enableAmbientLightColor=!0}},sunLightColor:{get:function(){return this._sunLightColor},set:function(e){o$1q.defined("Light source sunLightColor",e),e$1U.clone(e,this._sunLightColor),this._enableSunLightColor=!0}},sunLightON:{get:function(){return this._sunLightON},set:function(e){o$1q.typeOf.bool("Light source sun light on",e),this._sunLightON=e?1:0}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}}}),s$I.prototype.addLightSource=function(e){var t=this._lightList[e.lightType];return t.set(e.id,e),t.length},s$I.prototype.removeLightSource=function(e){var t=this._lightList[e.lightType];return t.get(e.id)?(t.remove(e.id),t.length):-1},s$I.prototype.updateVisiblities=function(e){var t,i=this._lightList[_0x1d9df9.POINT].values;for(t=0;t0},s$I.prototype.resetChange=function(){this._changedLightList.removeAll()},s$I.prototype.combineUniformValue=function(){this._pointLightDistanceDecay=[],this._spotLightDistanceDecayCosPenumbra=[];var e,t=this._visibleLightList[_0x1d9df9.POINT].values,i=t.length;for(e=0;e0){if(c=new s$U({name:l="S3MTilesFragment_",sources:[o?_0x1084eb:_0x2b6657],useWGSL:o}),e$2b(t.materialPass._batchTable)){var f=t.materialPass._batchTable.getVertexShaderCallback(o)(o?_0x46f3da:_0x19a31f);(u=new s$U({name:s,sources:[f],useWGSL:o})).defines.push(Y$H.TextureBatch),c.defines.push(Y$H.TextureBatch)}c.defines.push(Y$H.Has_Texture),d>1&&t.hasTexCoord2&&(e$2b(t.materialPass._batchTableBake)&&(u=new s$U({name:s,sources:[f=t.materialPass._batchTableBake.getVertexShaderCallback(o)(f)],useWGSL:o})).defines.push(Y$H.TextureBatch),u.defines.push(Y$H.MULTI_TEX),c.defines.push(Y$H.MULTI_TEX),2===n.textureEmissionUnit&&c.defines.push(Y$H.SEC_TEX_EMISSION))}t.materialPass.hasTexture&&(u.defines.push(Y$H.COMPUTE_TEXCOORD),c.defines.push(Y$H.COMPUTE_TEXCOORD)),o&&1===t.primitiveType&&(l="S3MTilesPointFragmentWGSL",u=new s$U({name:s="S3MTilesPointVectexWGSL",sources:[_0x519466],useWGSL:o}),c=new s$U({name:s,sources:[_0x2288cf],useWGSL:o}))}!t.hasTexCoord&&d>0&&(c.defines.push(Y$H.Has_Texture),c.defines.push(Y$H.NO_TEXCOORD)),t.materialPass._usePBRTextureBatch&&(u.defines.push(Y$H.USE_BatchPBR),c.defines.push(Y$H.USE_BatchPBR)),n.shadowType===_0x381f49.NONE&&(u.defines.push("NormalVertex"),c.defines.push("NormalVertex")),!r.webgpu&&e$1T.maximumVertexTextureImageUnits>0&&u.defines.push("VertexTextureSupport"),n._isS3MB?((t.instanceMode===_0x721735.S3MB_BIM_INSTANCE||t.instanceMode===_0x721735.S3MB_BIM_INSTANCE_2)&&(u.defines.push("InstanceRenderBIM"),u.defines.push("InstanceS3MB")),t.instanceMode===_0x721735.S3MB_PIPE_INSTANCE&&(u.defines.push("InstanceRenderPipeline"),c.defines.push("InstanceRenderPipeline"),u.defines.push("InstanceS3MB"),_0x43629f(i._vertexPackage)&&(u.defines.push("IS_SQUARE_PIPE"),c.defines.push("IS_SQUARE_PIPE"))),(t.instanceMode===_0x721735.S3MB_BIM_INSTANCE||t.instanceMode===_0x721735.S3MB_BIM_INSTANCE_2||t.instanceMode===_0x721735.S3MB_PIPE_INSTANCE)&&(u.defines.push("Instance"),c.defines.push("Instance"))):(t.instanceMode===_0x721735.SIZE_PER_INSTANCE&&u.defines.push("InstanceRenderBIM"),t.instanceMode===_0x721735.SIZE_PER_DM_INSTANCE&&(u.defines.push("InstanceRenderPipeline"),_0x43629f(i._vertexPackage)&&(u.defines.push("IS_SQUARE_PIPE"),c.defines.push("IS_SQUARE_PIPE"))),(t.instanceMode===_0x721735.SIZE_PER_DM_INSTANCE||t.instanceMode===_0x721735.SIZE_PER_INSTANCE)&&(u.defines.push("Instance"),c.defines.push("Instance"))),n._clipping&&c.defines.push("CLIP"),n._section&&c.defines.push("CLIPPLANE"),t.volObj?(u.defines.push(Y$H.VOLUME),c.defines.push(Y$H.VOLUME)):t.volTexture&&(u.defines.push(Y$H.VOLUME2),c.defines.push(Y$H.VOLUME2)),e$2b(t.materialPass._mapTextures)&&Object.getOwnPropertyNames(t.materialPass._mapTextures).length>0&&c.defines.push("Map"),_0x1b70b4(n)&&c.defines.push(Y$H.ADJUST_COLOR),n._hasLight&&4===t.primitiveType&&(u.defines.push(Y$H.HAS_LIGHT),c.defines.push(Y$H.HAS_LIGHT)),t.hasNormal&&!t.ignoreNormal&&(u.defines.push(Y$H.HAS_NORMAL),c.defines.push(Y$H.HAS_NORMAL)),t.ignoreNormal&&c.defines.push(Y$H.IGNORE_NORMAL),n._selectColorType===Zr$2.REPLACE?(u.defines.push(Y$H.REPLACE_SELECT_TYPE),c.defines.push(Y$H.REPLACE_SELECT_TYPE)):n.isSilhouette()&&(u.defines.push(Y$H.SILHOUETTE_SELECT_TYPE),c.defines.push(Y$H.SILHOUETTE_SELECT_TYPE)),(n._operationType&_0x4580ad.CLIP)===_0x4580ad.CLIP&&c.defines.push(Y$H.CLIP_FILT_BY_ID),n._PBRMaterialType!==je$g.NONE&&(u.defines.push(Y$H.PBR),c.defines.push(Y$H.PBR)),n._flattening&&(u.defines.push(Y$H.FALTTEN),r.floatingPointTexture&&u.defines.push(Y$H.UseFloatTexture)),n._hasOverlay&&(u.defines.push(Y$H.OVERLAY),c.defines.push(Y$H.OVERLAY));h=t.volTexture||t.volObj;if((!n._bVolume&&n._bUseHypColorTable||h&&n._bUseHypColorTable)&&(u.defines.push(Y$H.COMPUTE_W_VALUE),c.defines.push(Y$H.COMPUTE_W_VALUE),u.defines.push(Y$H.HYPSOMETRIC),c.defines.push(Y$H.HYPSOMETRIC),u.defines.push(Y$H.VOL_AND_HYP),c.defines.push(Y$H.VOL_AND_HYP)),n._hasEmissiveTexAtlas&&(u.defines.push(Y$H.COMPUTE_W_VALUE),c.defines.push(Y$H.COMPUTE_W_VALUE),u.defines.push(Y$H.EMISSION_TEXTURE_ATLAS),c.defines.push(Y$H.EMISSION_TEXTURE_ATLAS)),e$2b(n._categorieTexture)&&u.defines.push(Y$H.W_VISIBLE),e$2b(n._vertexWeightMode)&&n._vertexWeightMode===_0x7aa085.EdgeLengthMin&&n._triangleFiltratePixel>0&&u.defines.push(Y$H.TRIANGLE_FILTRATE),e$2b((_=t.vertexPackage).nCompressOptions))((m=_.nCompressOptions)&_0x35ed09.SVC_Vertex)==_0x35ed09.SVC_Vertex&&u.defines.push(Y$H.COMPRESS_VERTEX),(m&_0x35ed09.SVC_Normal)==_0x35ed09.SVC_Normal&&u.defines.push(Y$H.COMPRESS_NORMAL),((m&_0x35ed09.SVC_VertexColor)==_0x35ed09.SVC_VertexColor||"MESHOPT"===n._vertexCompressionType)&&u.defines.push(Y$H.COMPRESS_COLOR),(m&_0x35ed09.SVC_TexutreCoord)==_0x35ed09.SVC_TexutreCoord&&(u.defines.push(Y$H.COMPRESS_TEXCOORD),"MESHOPT"===n._vertexCompressionType&&u.defines.push("UINT_TEXCOORD0"));n._lastSelectSkeletonId>-1&&u.defines.push("HAS_SKELETONSELECTED"),(e$2b(n._imageryLayer)||n._needCoverImageryLayer)&&e$2b(i._imagerys)&&i._imagerys.length>0&&e$2b(t.attributeLocations.img)&&(u.defines.push("IMAGERY"),c.defines.push("IMAGERY")),n.partlyTransparent&&e$2b(t.materialPass._bTransparentSorting)&&c.defines.push("PARTLY_TRANSPARENT"),n._scene.pickPointEnabled&&(u.defines.push(Y$H.VERTEX_CAPTURE),c.defines.push(Y$H.VERTEX_CAPTURE));var p=e$2b(n.themeStyle)&&e$2b(n.themeStyle.pbrMaterialIndex);(t.materialPass._usePBR||n._usePBR||p)&&(c.defines.push(Y$H.BRDF),t.context.textureFloatLinear&&c.defines.push("OES_texture_float_linear"),p&&(u.defines.push(Y$H.PBR_THEME),c.defines.push(Y$H.PBR_THEME),c.defines.push("NUM_PBR_MATERIALS "+e.pbrMaterialsArr.length)),(t.materialPass._baseColorTextureIndex>-1&&e$2b(t.materialPass.baseColorTexture)||e$2b(n._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture))&&t.hasTexCoord&&c.defines.push(Y$H.HAS_BASE_TEXTURE),(t.materialPass._metallicRoughnessTextureIndex>-1&&e$2b(t.materialPass.metallicRoughnessTexture)||e$2b(n._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture))&&t.hasTexCoord&&c.defines.push(Y$H.HAS_MetallicRoughness_TEXTURE),(t.materialPass._normalTextureIndex>-1&&e$2b(t.materialPass.normalTexture)||e$2b(n._PBRMaterialParams.pbrMetallicRoughness.normalTexture))&&t.hasTexCoord&&c.defines.push(Y$H.HAS_NORMAL_TEXTURE),(t.materialPass._emissiveTextureIndex>-1&&e$2b(t.materialPass.emissiveTexture)||e$2b(n._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture))&&c.defines.push(Y$H.HAS_EMISSIVE_TEXTURE),(t.materialPass._occlusionTextureIndex>-1||e$2b(n._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)&&n._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture instanceof t$V)&&t.hasTexCoord&&c.defines.push(Y$H.HAS_OCCLUSION_TEXTURE),n._hasSnowEffect&&c.defines.push(Y$H.HAS_SNOW),e$2b(n._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&n._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture&&n._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof t$V&&c.defines.push(Y$H.HAS_RAIN),e$2b(t.materialPass._alphaMode)&&t.materialPass._alphaMode===_0x5f0e97.MASK&&c.defines.push(Y$H.MASK),(e$2b(e.specularEnvironmentMaps)||e$2b(e.hdrEnvMap))&&(c.defines.push(Y$H.IBL),e$2b(e.specularEnvironmentMaps)&&c.defines.push(Y$H.KtxEnvMap)),i._isPBR=!0),n._PBRMaterialParams.pbrMetallicRoughness.emissionTextureIndex>0&&c.defines.push(Y$H.SEC_TEX_EMISSION),n.visibleDistanceMax<6378137&&n.translucencyByDistance&&c.defines.push(Y$H.VISIBLEDISTANCEMAX),e$2b(t.unFinalResolution)&&t.unFinalResolution&&(u.defines.push("FINAL_RESOLUTION_CLIP"),c.defines.push("FINAL_RESOLUTION_CLIP"));break;case d$15.ClampGroundPolygon:case d$15.ClampObjectPolygon:var _,m;if(e$2b((_=t.vertexPackage).clampRegionEdge))l="S3MTilesShadowVolumeFP_",u=new s$U({name:s="S3MTilesLineShadowVectex_",sources:[_0x4632a6]}),c=new s$U({name:l,sources:[_0x5b2edf]});else{var g=t.materialPass._textures.length>0||t.hasSymbolTexture;l="S3MTilesShadowVolumeFP_",u=new s$U({name:s="S3MTilesRegionShadowVectex_",sources:[_0x3b4223]}),c=new s$U({name:l,sources:[_0x5e3105]}),g&&(u.defines.push("HAS_TEXTURE"),c.defines.push("HAS_TEXTURE"))}if(e$2b(_.nCompressOptions))((m=_.nCompressOptions)&_0x35ed09.SVC_Vertex)==_0x35ed09.SVC_Vertex&&u.defines.push(Y$H.COMPRESS_VERTEX),(m&_0x35ed09.SVC_Normal)==_0x35ed09.SVC_Normal&&u.defines.push(Y$H.COMPRESS_NORMAL),(m&_0x35ed09.SVC_TexutreCoord)==_0x35ed09.SVC_TexutreCoord&&u.defines.push(Y$H.COMPRESS_TEXCOORD);break;case d$15.ExtendClampPolygonCache:l="S3MTilesShadowVolumeFP_",u=new s$U({name:s="S3MTilesExtendPolygonShadowVP_",sources:[_0x3410ec]}),c=new s$U({name:l,sources:[_0x5e3105]});break;case d$15.ClampGroundLine:l="S3MTilesClampGroundLineFP_",u=new s$U({name:s="S3MTilesClampGroundLineVectex_",sources:[_0x4c08bd]}),c=new s$U({name:l,sources:[_0x5e3105]});break;case d$15.ClampGroundAndObjectLineCache:l="S3MTilesShadowVolumeFP_",u=new s$U({name:s="S3MTilesLineShadowVectex_",sources:[_0x4632a6]}),c=new s$U({name:l,sources:[_0x5b2edf]});break;case d$15.ClampObjectLine:l="S3MTilesShadowVolumeFP_",u=new s$U({name:s="S3MTilesLineShadowVectex_",sources:[_0x4c08bd]}),c=new s$U({name:l,sources:[_0x5e3105]});break;case d$15.IconPoint:a.billboardMode===yr$1.FixedZ?u=new s$U({name:s="BillboardAxialVp_",sources:[_0x5b6bf2]}):a.billboardMode===yr$1.FixedXYZ?u=new s$U({name:s="BillboardPixelSizeWithAngleVp_",sources:[_0x539845]}):u=new s$U({name:s="S3MTilesBillboardPixelSizeVp_",sources:[_0x21a0db]}),c=new s$U({name:l="S3MTilesCommonOntTextureFP_",sources:[_0x4da3bc]}),u.defines.push("ICON"),e$2b(a.fixedPixelSize)&&!a.fixedPixelSize&&u.defines.push("EYE_DISTANCE_SCALING"),n._clipping&&c.defines.push("CLIP"),n._section&&c.defines.push("CLIPPLANE"),t.hasNormal&&!t.ignoreNormal&&(u.defines.push(Y$H.HAS_NORMAL),c.defines.push(Y$H.HAS_NORMAL));break;case d$15.Text:s="S3MTilesBillboardPixelSizeVp_",u=a.billboardMode===yr$1.FixedXYZ?new s$U({name:s,sources:[_0x539845]}):new s$U({name:s,sources:[_0x21a0db]}),t.materialPass._textures.length>1?c=new s$U({name:l="S3MTilesFontWithHaloFp_",sources:[_0x223db1]}):t.materialPass._textures.length>0?c=new s$U({name:l="S3MTilesCommonOntTextureFP_",sources:[_0x4da3bc]}):c=new s$U({name:l="S3MTilesCommonOneTextureFP_",sources:[_0x4da3bc]}),n._clipping&&c.defines.push("CLIP"),t.layer._section&&c.defines.push("CLIPPLANE"),t.hasNormal&&!t.ignoreNormal&&(u.defines.push(Y$H.HAS_NORMAL),c.defines.push(Y$H.HAS_NORMAL)),t.hasTexCoord2&&c.defines.push(Y$H.TEXCOORD2);break;case d$15.ExtendRegion3D:l="DynamicExtendRegionFp_",u=new s$U({name:s="DynamicExtendRegionVp_",sources:[_0x35073f]}),c=new s$U({name:l,sources:[_0x728fb1]}),t.materialPass._textures.length>0&&c.defines.push("HAS_TEXTURE"),n._hasLight&&(u.defines.push(Y$H.HAS_LIGHT),c.defines.push(Y$H.HAS_LIGHT));break;case d$15.RegionEffect:l="RegionMaterialFp_",u=new s$U({name:s="RegionMaterialVp_",sources:[_0xb28fe0]}),c=new s$U({name:l,sources:[_0x362543]}),n._clipping&&c.defines.push("CLIP"),n._hasExcavation&&(u.defines.push(Y$H.EXCAVATION),c.defines.push(Y$H.EXCAVATION)),n._hasServerExcavation&&(u.defines.push("SERVEREXCAVATION"),c.defines.push("SERVEREXCAVATION"));break;case d$15.PolylineEffect:l="PolylineFp_",u=new s$U({name:s="PolylineVp_",sources:[_0x1e7638]}),c=new s$U({name:l,sources:[_0x54ee86]}),n._clipping&&c.defines.push("CLIP"),n._hasExcavation&&(u.defines.push(Y$H.EXCAVATION),c.defines.push(Y$H.EXCAVATION)),n._hasServerExcavation&&(u.defines.push("SERVEREXCAVATION"),c.defines.push("SERVEREXCAVATION"));break;case d$15.ClampGroundRealtimeRasterCache:c=new s$U({name:l="S3MTilesFragmentRaster_",sources:[_0x21bee4]}),u=new s$U({name:s="S3MTilesVectexRaster_",sources:[_0x370b02]}),n._selectColorType===Zr$2.REPLACE&&(u.defines.push(Y$H.REPLACE_SELECT_TYPE),c.defines.push(Y$H.REPLACE_SELECT_TYPE)),(t.hasSymbolTexture||t.materialPass._textures.length>0)&&(u.defines.push(Y$H.TEXCOORD),c.defines.push(Y$H.TEXCOORD))}(t.fileType===d$15.ClampGroundRealtimeRasterCache&&t.hasTexCoord2&&(e$2b(n._polylineEffectUbo)||(n._polylineEffectUbo=new _0x280589(n)),l="PolylineFp_",u=new s$U({name:s="PolylineVp_",sources:[_0x45c27e]}),c=new s$U({name:l,sources:[_0x54ee86]})),t.hasTexCoord&&(u.defines.push(Y$H.TEXCOORD),c.defines.push(Y$H.TEXCOORD)),t.hasTexCoord2&&(u.defines.push(Y$H.TEXCOORD2),c.defines.push(Y$H.TEXCOORD2)),n.horizontalline&&(u.defines.push(Y$H.COMPUTE_W_VALUE),c.defines.push(Y$H.COMPUTE_W_VALUE),c.defines.push(Y$H.HORIZONTAL_LINE)),n._transparentBackColorTolerance>0&&c.defines.push(Y$H.TRANSPARENT_BACK_COLOR),(n.swipeEnabled||n.splitDirection!==_0x405774.NONE)&&c.defines.push(Y$H.APPLY_SWIPE),"MESHOPT"===n._vertexCompressionType?u.defines.push("MeshOPT_Compress"):"DRACO"===n._vertexCompressionType&&u.defines.push("DRACO_Compress"),e$2b(t.vertexPackage.customVertexAttribute)&&e$2b(t.vertexPackage.customVertexAttribute.TextureCoordMatrix)&&u.defines.push("USE_TextureCoordMatrix"),e$2b(t.vertexPackage.customVertexAttribute)&&e$2b(t.vertexPackage.customVertexAttribute.VertexWeight)&&u.defines.push("USE_VertexWeight"),i._bMultiTemporalWeight&&(u.defines.push("MultiTemporalWeight"),c.defines.push("MultiTemporalWeight"),n.temporalSetting.changeZValue&&u.defines.push("ChangeZValue")),e$2b(e.lightSource))&&(c.defines.push("MAX_POINT_LIGHT_COUNT "+s$I.MaxPointLightCount),c.defines.push("MAX_SPOT_LIGHT_COUNT "+s$I.MaxSpotLightCount),c.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$I.MaxDirectionLightCount),e.lightSource.directionalLight.length>0&&c.defines.push(Y$H.HAS_DIR_LIGHTS),e.lightSource._visibleLightList[_0x1d9df9.POINT].length>0&&c.defines.push(Y$H.HAS_POINT_LIGHTS),e.lightSource._visibleLightList[_0x1d9df9.SPOT].length>0&&c.defines.push(Y$H.HAS_SPOT_LIGHTS),e.lightSource.hemisphereLight.length>0&&c.defines.push(Y$H.HAS_HEMISPHERE_LIGHTS));if(n._hasExcavation&&(u.defines.push(Y$H.EXCAVATION),c.defines.push(Y$H.EXCAVATION)),n._hasServerExcavation&&(u.defines.push("SERVEREXCAVATION"),c.defines.push("SERVEREXCAVATION")),t.hasInstanceSkeletonMatrix&&u.defines.push(Y$H.UseInstanceSkeletonMatrix),n.mixColorType===_0x203e3b.REPLACE&&(u.defines.push(Y$H.REPLACE_COLOR_TYPE),c.defines.push(Y$H.REPLACE_COLOR_TYPE)),t.hasVertexColor&&u.defines.push("VertexColor"),t.isInstanceModel&&u.defines.push("InstanceModel"),t.hasTranslation&&u.defines.push(Y$H.Translation),1===t.primitiveType&&(u.defines.push(Y$H.POINT),c.defines.push(Y$H.POINT)),2===t.primitiveType&&c.defines.push(Y$H.LineVector),t.materialPass._RGBTOBGR&&c.defines.push(Y$H.RGBTOBGR),n.enableFusion&&u.defines.push(Y$H.FusionMode),e$2b(i._batchTable)&&(u.defines.push("BatchTable"),i._batchTable.hasMultiRow()&&u.defines.push("BatchTableMultiRow")),e$2b(n._floodFlagTexture)&&(u.defines.push(Y$H.FLOOD_ANALYSIS),c.defines.push(Y$H.FLOOD_ANALYSIS)),e$2b(i._batchTable)){for(var x=[f=i._batchTable.getVertexShaderCallback(o)(u.sources[0])],v=1;v0,e$2b(r.waterEffectSet)?n._sp=_0x256445.createWaterShaderProgram(i,r,a,n):r.multiTemporalUseWater?n._sp=_0x256445.createMultiTemporalWaterShaderProgram(i,r,a,n,u):(n._sp=_0x256445.createShaderProgram(t,u,n),r.LoadingPriority===_0x10659f.UsePagedLodInfo&&(u.unFinalResolution=!0,n._spUnFinalResolution=_0x256445.createShaderProgram(t,u,n)))},Object.defineProperties(o$T.prototype,{progress:{get:function(){return this._fProgress},set:function(e){this._fProgress=e}},location:{get:function(){return this._nLocation},set:function(e){this._nLocation=e}},changeZValue:{get:function(){return this._changeZValue},set:function(e){this._changeZValue=e}}}),o$T.clone=function(e,t){if(e$2b(e))return e$2b(t)||(t=new o$T),t._fTemporalPercentage=e._fTemporalPercentage,t._nTemporalPos=e._nTemporalPos,t};var _0x28ce6a=(_0x280771=!0,function(e,t){var i=_0x280771?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x280771=!1,i}),_0x22b946=_0x28ce6a(void 0,(function(){return _0x22b946.toString().search("(((.+)+)+)+$").toString().constructor(_0x22b946).search("(((.+)+)+)+$")})),_0x280771;_0x22b946();const _0x155d61="uTexture",_0x5ff3ad="uSecTexture",_0x435ce0="batchTexture",_0x39bd19="uPBRTexture",_0x82d072="uBaseTexture",_0x23e955="uNormalTexture",_0x4916f0="uMetallicRoughnessTexture",_0x30159e="uEmissionTexture",_0x170378="uOcclusionTexture",_0xf04787="uSnowMaskTexture",_0x1f478b="uSnowNormalTexture",_0x51dca9="uRippleTexture",_0x1ad3b1="batchTexture_baseTex",_0x383288="batchTexture_bakeTex",_0x2dced9="u_dayTextures",_0x40daa0=5;function _0xfa6ee5(e,t,i){var n=_0x3e2f69.call(this)||this;n._ro=e,n._materialPass=t,n._layer=i,n._name=_0x27131a.MATERIAL,n._context=i._context,n._uniformState=n._context.uniformState,n._textures={},n._dayTextures=[],n._textureDirtyFrameCount=-1,this._initUniformMap()}_0x3e2f69&&(_0xfa6ee5.__proto__=_0x3e2f69),_0xfa6ee5.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0xfa6ee5.prototype.constructor=_0x3e2f69,Object.defineProperties(_0xfa6ee5.prototype,{}),_0xfa6ee5.prototype._initUBOStruct=function(){this._ubo.addUniform("uTexMatrix",16),this._ubo.addUniform("uDiffuseColor",4),this._ubo.addUniform("uAmbientColor",4),this._ubo.addUniform("uSpecularColor",4),this._ubo.addUniform("uTexUVOffset",4),this._ubo.addUniform("uTextureDim",4),this._ubo.addUniform("uTextureWidths",2),this._ubo.addUniform("batchTextureStep_baseTex",4),this._ubo.addUniform("batchTextureDimensions_baseTex",2),this._ubo.addUniform("batchTextureStep_bakeTex",4),this._ubo.addUniform("batchTextureDimensions_bakeTex",2),this._ubo.addUniform("uBaseColorFactor",4),this._ubo.addUniform("uEmissiveFactor",4),this._ubo.addUniform("uEmissiveUVOffsetAndTiling",4),this._ubo.addUniform("uMetallicRoughnessIntensityScale",3),this._ubo.addUniform("uPBRTexWH",2),this._ubo.addUniform("uNormalTextureScale",1),this._ubo.addUniform("uAlphaMode",1),this._ubo.addUniform("uAlphaCutoff",1),this._ubo.addUniform("uPbrParTextureWidth",1)},_0xfa6ee5.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())};var _0x5e7812=new e$29;_0xfa6ee5.prototype._updateTexUVOffset=function(){_0x5e7812.x=0,_0x5e7812.y=0,_0x5e7812.z=1,_0x5e7812.w=1;var e=this._materialPass,t=this._layer,i=e._baseColorTextureMotion;if(e$2b(i)){var n=i.OffsetPeriod,r=i.OffsetSpeedU,o=i.OffsetSpeedV,a=i.TilingPeriod,s=i.TilingSpeedU,l=i.TilingSpeedV,u=performance.now()/1e3;if(n>0){var c=u%n;_0x5e7812.x=c*r,_0x5e7812.y=c*o}if(a>0){var h=u%a;_0x5e7812.z=1+h*s,_0x5e7812.w=1+h*l}}else if(e$2b(t._textureUVSpeed)&&(0!==t._textureUVSpeed.x||0!==t._textureUVSpeed.y)){var d=performance.now()/1e3;_0x5e7812.x=t._textureUVSpeed.x*d,_0x5e7812.y=t._textureUVSpeed.y*d}this._ubo.updateFloat4("uTexUVOffset",_0x5e7812.x,_0x5e7812.y,_0x5e7812.z,_0x5e7812.w)},_0xfa6ee5.prototype._updateEmissiveUVOffsetAndTiling=function(){const e=this._materialPass,t=this._layer._PBRMaterialParams.pbrMetallicRoughness;_0x5e7812.x=0,_0x5e7812.y=0,_0x5e7812.z=1,_0x5e7812.w=1;const i=u$_(e._emissiveTextureMotion,t.emissiveTextureMotion);if(e$2b(i)){var n=performance.now()/1e3,r=i.OffsetPeriod,o=i.OffsetSpeedU,a=i.OffsetSpeedV,s=i.TilingPeriod,l=i.TilingSpeedU,u=i.TilingSpeedV;if(i&&r>0){var c=n%r;_0x5e7812.x=c*o,_0x5e7812.y=c*a}if(i&&s>0){var h=n%s;_0x5e7812.z=1+h*l,_0x5e7812.w=1+h*u}}this._ubo.updateFloat4("uEmissiveUVOffsetAndTiling",_0x5e7812.x,_0x5e7812.y,_0x5e7812.z,_0x5e7812.w)},_0xfa6ee5.prototype._updateTextureBatchTable=function(){const e=this._ubo,t=this._materialPass,i=t._batchTable;if(!e$2b(i))return;this._setTextureByType(_0x1ad3b1,i._texture);const n=i._textureStep;e.updateFloat4("batchTextureStep_baseTex",n.x,n.y,n.z,n.w);const r=i._textureDimensions;e.updateFloat2("batchTextureDimensions_baseTex",r.x,r.y);const o=t._batchTableBake;if(!e$2b(o))return;this._setTextureByType(_0x383288,o._texture);const a=o._textureStep;e.updateFloat4("batchTextureStep_bakeTex",a.x,a.y,a.z,a.w);const s=o._textureDimensions;e.updateFloat2("batchTextureDimensions_bakeTex",s.x,s.y)};var _0x411a6c=new o$1p;_0xfa6ee5.prototype._updateMetallicRoughnessIntensityScale=function(){var e=this._materialPass,t=this._layer;_0x411a6c.x=u$_(e._metallicFactor,t._PBRMaterialParams.pbrMetallicRoughness.metallicFactor),_0x411a6c.y=u$_(e._roughnessFactor,t._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor),_0x411a6c.z=1,e$2b(e._intensityScale)&&e._intensityScale>0?_0x411a6c.z=e._intensityScale:e$2b(t._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&t._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0&&(_0x411a6c.z=t._PBRMaterialParams.pbrMetallicRoughness.intensityScale),this._ubo.updateFloat3("uMetallicRoughnessIntensityScale",_0x411a6c.x,_0x411a6c.y,_0x411a6c.z)};var _0x53d3fc=new o$1o;_0xfa6ee5.prototype._updateTextureWidths=function(){var e=this._materialPass;e$2b(e.baseColorTexture)?this._ubo.updateFloat2("uTextureWidths",e.baseColorTexture.width,e.baseColorTexture.height):(e$2b(e._textures[0])?_0x53d3fc.x=e._textures[0].width:_0x53d3fc.x=1,e$2b(e._textures[1])?_0x53d3fc.y=e._textures[1].width:_0x53d3fc.y=1,this._ubo.updateFloat2("uTextureWidths",_0x53d3fc.x,_0x53d3fc.y))};var _0x553766=new e$29;_0xfa6ee5.prototype._updateBatchTextureWidths=function(){const e=this._materialPass;if(!e$2b(e._batchTable))return;let t=e._textures[0];t=t.renderable?t:e$2b(e._ancestorTexture)?e._ancestorTexture:t,_0x553766.x=t._width,_0x553766.y=t._height;let i=e._textures[1];e$2b(i)&&(i=i.renderable?i:e$2b(e._ancestorTextureBake)?e._ancestorTextureBake:i,_0x553766.z=i._width,_0x553766.w=i._height),this._ubo.updateFloat4("uTextureDim",_0x553766.x,_0x553766.y,_0x553766.z,_0x553766.w)},_0xfa6ee5.prototype._updatePbrParTextureValue=function(){var e=this._materialPass,t=e.pbrParamTexture;this._ubo.updateFloat2("uPBRTexWH",t.width,t.height);let i=1;e$2b(e.baseColorTexture)?i=e.baseColorTexture.width:e$2b(e.normalTexture)?i=e.normalTexture.width:e$2b(e.metallicRoughnessTexture)?i=e.metallicRoughnessTexture.width:e$2b(e.emissiveTexture)&&(i=e.emissiveTexture.width),this._ubo.updateFloat("uPbrParTextureWidth",i)},_0xfa6ee5.prototype._getFirstTexture=function(){var e;e$2b(this._ro._symbolTextureUrl)?e$2b(e=_0x4dad4e.getTexture(this._ro._symbolTextureUrl))?this._setTextureByType(_0x155d61,e):this._setTextureByType(_0x155d61,this._layer._context.defaultTexture):e$2b(this._materialPass._textures[0])?((e=this._materialPass._textures[0]).isTexBlock&&(e=e.renderable&&e.ready?e:e$2b(this._materialPass._ancestorTexture)?this._materialPass._ancestorTexture:e),this._setTextureByType(_0x155d61,e)):this._setTextureByType(_0x155d61,this._layer._context.defaultTexture)},_0xfa6ee5.prototype._getSecTexture=function(){if(!(this._materialPass._textures.length<2)){var e=this._materialPass._textures[1];e.isTexBlock&&(e=e.renderable&&e.ready?e:e$2b(this._materialPass._ancestorTextureBake)?this._materialPass._ancestorTextureBake:this._layer._context.defaultTexture),this._setTextureByType(_0x5ff3ad,e)}},_0xfa6ee5.prototype._getBaseColorTexture=function(){e$2b(this._materialPass._baseColorTextureIndex)&&this._materialPass._baseColorTextureIndex>-1?this._setTextureByType(_0x82d072,this._materialPass.baseColorTexture):this._setTextureByType(_0x82d072,this._layer._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture)},_0xfa6ee5.prototype._getNormalTexture=function(){if(e$2b(this._materialPass._normalTextureIndex)&&this._materialPass._normalTextureIndex>-1)return this._materialPass.normalTexture?void this._setTextureByType(_0x23e955,this._materialPass.normalTexture):void this._setTextureByType(_0x23e955,this._materialPass._textures[this._materialPass._normalTextureIndex]);this._setTextureByType(_0x23e955,this._layer._PBRMaterialParams.pbrMetallicRoughness.normalTexture)},_0xfa6ee5.prototype._getEmissiveTexture=function(){if(e$2b(this._materialPass.emissiveTexture))this._setTextureByType(_0x30159e,this._materialPass.emissiveTexture);else{var e=this._materialPass._emissiveTextureIndex;e>-1&&e$2b(this._materialPass._textures[e])?this._setTextureByType(_0x30159e,this._materialPass._textures[e]):this._setTextureByType(_0x30159e,this._layer._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture)}},_0xfa6ee5.prototype._getMetalicRoughnessTexture=function(){if(e$2b(this._materialPass._metallicRoughnessTextureIndex)&&this._materialPass._metallicRoughnessTextureIndex>-1)return e$2b(this._materialPass.metallicRoughnessTexture)?void this._setTextureByType(_0x4916f0,this._materialPass.metallicRoughnessTexture):void this._setTextureByType(_0x4916f0,this._materialPass._textures[this._materialPass._metallicRoughnessTextureIndex]);e$2b(this._layer._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture)&&this._layer._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture instanceof t$V?this._setTextureByType(_0x4916f0,this._layer._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture):this._setTextureByType(_0x4916f0,this._context.defaultTexture)},_0xfa6ee5.prototype._getOcclusionTexture=function(){if(e$2b(this._materialPass._occlusionTextureIndex)&&this._materialPass._occlusionTextureIndex>-1)return this._materialPass.occlusionTexture?void this._setTextureByType(_0x170378,this._materialPass.occlusionTexture):e$2b(this._materialPass._textures[this._materialPass._occlusionTextureIndex])?void this._setTextureByType(_0x170378,this._materialPass._textures[this._materialPass._occlusionTextureIndex]):void this._setTextureByType(_0x170378,this._layer._context.defaultTexture);this._setTextureByType(_0x170378,this._layer._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)},_0xfa6ee5.prototype._getSnowMaskTexture=function(){this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect&&this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture instanceof t$V?this._setTextureByType(_0xf04787,this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture):this._setTextureByType(_0xf04787,this._context.defaultTexture)},_0xfa6ee5.prototype._getSnowNormalTexture=function(){this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect&&this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture instanceof t$V?this._setTextureByType(_0x1f478b,this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture):this._setTextureByType(_0x1f478b,this._context.defaultTexture)},_0xfa6ee5.prototype._getRippleTexture=function(){this._layer._PBRMaterialParams.pbrMetallicRoughness.rainEffect&&this._layer._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof t$V?this._setTextureByType(_0x51dca9,this._layer._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture):this._setTextureByType(_0x51dca9,this._context.defaultTexture)},_0xfa6ee5.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0xfa6ee5.prototype._isBatchTextureRenderable=function(){const e=this._materialPass;if(!e$2b(e._batchTable))return!1;let t=e._textures[0];if(!e$2b(t))return!1;let i=t.renderable,n=e._textures[1];return e$2b(n)&&(i=i&&n.renderable),!i},_0xfa6ee5.prototype.update=function(e){if(!e.webgpu&&!e.webgl2||!this._isValueDirty)return;var t=this._ro;this._isTextureDirty=!1,e$2b(this._ubo)||this._initUBO(e);var i=this._materialPass,n=this._layer;_0x3e2f69.writeMatrix4ToUBO("uTexMatrix",this._ubo,i._texMatrix),_0x3e2f69.writeColorToUBO("uDiffuseColor",this._ubo,i._diffuseColor),_0x3e2f69.writeColorToUBO("uAmbientColor",this._ubo,i._ambientColor),_0x3e2f69.writeColorToUBO("uSpecularColor",this._ubo,i._specularColor);var r=i._baseColor||n._PBRMaterialParams.pbrMetallicRoughness.baseColor;e$2b(r.x)?_0x3e2f69.writeCartesian4ToUBO("uBaseColorFactor",this._ubo,r):e$2b(r.red)&&_0x3e2f69.writeColorToUBO("uBaseColorFactor",this._ubo,r);var o=i._emissiveFactor||n._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor;e$2b(o.x)?this._ubo.updateFloat4("uEmissiveFactor",o.x,o.y,o.z,o.w):e$2b(o.red)&&this._ubo.updateFloat4("uEmissiveFactor",o.red,o.green,o.blue,o.alpha),e$2b(i.pbrParamTexture)&&this._updatePbrParTextureValue(),this._ubo.updateFloat("uNormalTextureScale",1);var a=1;switch(i._alphaMode){case"opaque":a=1;break;case"mask":a=2;break;case"blend":a=3}this._ubo.updateFloat("uAlphaMode",a),this._ubo.updateFloat("uAlphaCutoff",u$_(i._alphaCutoff,0)),this._updateMetallicRoughnessIntensityScale(),this._updateTexUVOffset(),this._updateBatchTextureWidths(),this._updateTextureWidths(),this._updateEmissiveUVOffsetAndTiling(),this._updateTextureBatchTable(),this._ubo.update(),this._getFirstTexture(),this._getSecTexture(),e$2b(this._ro._batchTable)&&this._setTextureByType(_0x435ce0,this._ro._batchTable._texture),this._setTextureByType(_0x39bd19,this._materialPass.pbrParamTexture),this._getBaseColorTexture(),this._getNormalTexture(),this._getMetalicRoughnessTexture(),this._getEmissiveTexture(),this._getOcclusionTexture(),this._getSnowMaskTexture(),this._getSnowNormalTexture(),this._getRippleTexture();const s=u$_(i._emissiveTextureMotion,n._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion);var l=e$2b(n._textureUVSpeed)&&(0!==n._textureUVSpeed.x||0!==n._textureUVSpeed.y);l=l||e$2b(s)&&(s.OffsetPeriod>0||s.TilingPeriod>0||e$2b(this._materialPass._baseColorTextureMotion)),this._isValueDirty=l||this._isBatchTextureRenderable(),e$2b(t._dayTextures)&&t._dayTextures.length>0&&(this._dayTextures!==t._dayTextures&&(this._isTextureDirty=!0),this._dayTextures=t._dayTextures)},_0xfa6ee5.prototype._setTextureByType=function(e,t){var i=this._textures[e]!==t;i&&t.isTexBlock&&(this._textureDirtyFrameCount=0),this._textures[e]=t,this._isTextureDirty=this._isTextureDirty||i},_0xfa6ee5.prototype._getTextureByType=function(e){return this._textures[e]},_0xfa6ee5.prototype.setToEffect=function(e){(e.bindUniformBuffer(this._ubo.getBuffer(),this._name),e$2b(this._ro._batchTable))&&(this._textures[_0x435ce0]!==this._ro._batchTable._texture&&(this._textures[_0x435ce0]=this._ro._batchTable._texture));e$2b(this._ro._dayTextures)&&this._ro._dayTextures.length>0&&_0x3e2f69.setTextureArrayToEffect(e,this._dayTextures,_0x2dced9);for(const t in this._textures)this._setTextureToEffect(e,this._textures[t],t);this._textureDirtyFrameCount>=0?this._textureDirtyFrameCount>_0x40daa0?(this._isTextureDirty=!1,this._textureDirtyFrameCount=-1):this._textureDirtyFrameCount++:this._isTextureDirty=!1};var _0x1e3f3a=new e$29,_0x3b53d0=new o$1o;_0xfa6ee5.prototype._initUniformMap=function(){var e=this._context;if(!e.webgl2&&!e.webgpu){var t=this._materialPass,i=this._layer,n={uTexMatrix:function(){return t._texMatrix},uDiffuseColor:function(){return t._diffuseColor},uSpecularColor:function(){return t._specularColor},uAmbientColor:function(){return t._ambientColor},uTexUVOffset:function(){_0x5e7812.x=0,_0x5e7812.y=0,_0x5e7812.z=1,_0x5e7812.w=1;var e=t._baseColorTextureMotion;if(e$2b(e)){var n=e.OffsetPeriod,r=e.OffsetSpeedU,o=e.OffsetSpeedV,a=e.TilingPeriod,s=e.TilingSpeedU,l=e.TilingSpeedV,u=performance.now()/1e3;if(n>0){var c=u%n;_0x5e7812.x=c*r,_0x5e7812.y=c*o}if(a>0){var h=u%a;_0x5e7812.z=1+h*s,_0x5e7812.w=1+h*l}}else if(0!==i._textureUVSpeed.x||0!==i._textureUVSpeed.y){var d=performance.now()/1e3;_0x5e7812.x=i._textureUVSpeed.x*d,_0x5e7812.y=i._textureUVSpeed.y*d}return _0x5e7812},uTextureDim:function(){var e=t._textures[0].renderable?t._textures[0]:e$2b(t._ancestorTexture)?t._ancestorTexture:t._textures[0];if(_0x1e3f3a.x=e._width,_0x1e3f3a.y=e._height,e$2b(t._textures[1])){var i=t._textures[1].renderable?t._textures[1]:e$2b(t._ancestorTextureBake)?t._ancestorTextureBake:t._textures[1];_0x1e3f3a.z=i._width,_0x1e3f3a.w=i._height}return _0x1e3f3a},uTextureWidths:function(){return e$2b(t.baseColorTexture)?(_0x3b53d0.x=t.baseColorTexture.width,_0x3b53d0.y=t.baseColorTexture.height):(e$2b(t._textures[0])?_0x3b53d0.x=t._textures[0].width:_0x3b53d0.x=1,e$2b(t._textures[1])?_0x3b53d0.y=t._textures[1].width:_0x3b53d0.y=1),_0x3b53d0},batchTextureStep_baseTex:function(){return t._batchTable._textureStep},batchTextureDimensions_baseTex:function(){return t._batchTable._textureDimensions},batchTextureStep_bakeTex:function(){return t._batchTableBake._textureStep},batchTextureDimensions_bakeTex:function(){return t._batchTableBake._textureDimensions},uBaseColorFactor:function(){return t._baseColor||i._PBRMaterialParams.pbrMetallicRoughness.baseColor},uEmissiveFactor:function(){return t._emissiveFactor||i._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},uEmissiveUVOffsetAndTiling:function(){var e=t._emissiveTextureMotion||i._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion,n=performance.now()/1e3,r=e.OffsetPeriod,o=e.OffsetSpeedU,a=e.OffsetSpeedV,s=e.TilingPeriod,l=e.TilingSpeedU,u=e.TilingSpeedV;if(e&&r>0){var c=n%r;_0x1e3f3a.x=c*o,_0x1e3f3a.y=c*a}else _0x1e3f3a.x=0,_0x1e3f3a.y=0;if(e&&s>0){var h=n%e._tilingPeriod;_0x1e3f3a.z=1+h*l,_0x1e3f3a.w=1+h*u}else _0x1e3f3a.z=1,_0x1e3f3a.w=1;return _0x1e3f3a},uMetallicRoughnessIntensityScale:function(){return _0x411a6c.x=u$_(t._metallicFactor,i._PBRMaterialParams.pbrMetallicRoughness.metallicFactor),_0x411a6c.y=u$_(t._roughnessFactor,i._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor),_0x411a6c.z=1,e$2b(t._intensityScale)&&t._intensityScale>0?_0x411a6c.z=t._intensityScale:e$2b(i._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&i._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0&&(_0x411a6c.z=i._PBRMaterialParams.pbrMetallicRoughness.intensityScale),_0x411a6c},uPBRTexWH:function(){var e=t.pbrParamTexture;return _0x3b53d0.x=e.width,_0x3b53d0.y=e.height,_0x3b53d0},uNormalTextureScale:function(){return 1},uAlphaMode:function(){var e=1;switch(t._alphaMode){case"opaque":e=1;break;case"mask":e=2;break;case"blend":e=3}return e},uAlphaCutoff:function(){return u$_(t._alphaCutoff,0)},uPbrParTextureWidth:function(){let e=1;return e$2b(t.baseColorTexture)?e=t.baseColorTexture.width:e$2b(t.normalTexture)?e=t.normalTexture.width:e$2b(t.metallicRoughnessTexture)?e=t.metallicRoughnessTexture.width:e$2b(t.emissiveTexture)&&(e=t.emissiveTexture.width),e}};this._uniformMap=n}},_0xfa6ee5.prototype.isDestroyed=function(){return!1},_0xfa6ee5.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};var _0x1e682c=(_0x24353d=!0,function(e,t){var i=_0x24353d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24353d=!1,i}),_0x2ae4c6=_0x1e682c(void 0,(function(){return _0x2ae4c6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ae4c6).search("(((.+)+)+)+$")})),_0x24353d;function _0x4db383(e){var t=_0x3e2f69.call(this)||this;t._ro=e,t._name=_0x27131a.MESH,this._initUniformMap()}_0x2ae4c6(),_0x3e2f69&&(_0x4db383.__proto__=_0x3e2f69),_0x4db383.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x4db383.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x4db383.prototype,{}),_0x4db383.prototype._initUBOStruct=function(){this._ubo.addUniform("uModelMatrix",16),this._ubo.addUniform("uGeoMatrix",16),this._ubo.addUniform("batchTextureStep",4),this._ubo.addUniform("batchTextureDimensions",2),this._ubo.addUniform("decode_texCoord0_min",2),this._ubo.addUniform("decode_texCoord1_min",2),this._ubo.addUniform("decode_texCoord0_vNormConstant",3),this._ubo.addUniform("decode_texCoord1_vNormConstant",3),this._ubo.addUniform("decode_position_min",4),this._ubo.addUniform("decode_position_normConstant",1),this._ubo.addUniform("normal_rangeConstant",1),this._ubo.addUniform("uInverseGeoMatrix",16),this._ubo.addUniform("uSkeletonMatrix",16),this._ubo.addUniform("uSkeletonCount",1),this._ubo.addUniform("uImgTextureBound",2),this._ubo.addUniform("uImgTextureAlpha",1),this._ubo.addUniform("fMultiTemporalFactor",1),this._ubo.addUniform("uSouthWest",3),this._ubo.addUniform("uNorthDir",3),this._ubo.addUniform("uEastDir",3),this._ubo.addUniform("textureRepeat",2)},_0x4db383.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,_0x27131a.MESH,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,_0x27131a.MESH,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x4db383.prototype._updateImageryValue=function(){const e=this._ubo,t=this._ro,i=t._layer,n=t._imageryTextureBound;let r=1;const o=i._imageryLayer;Array.isArray(o)&&(r=o[o.length-1].alpha),o.show||(r=0),r=o.alpha,e.updateFloat2("uImgTextureBound",n.x,n.y),e.updateFloat("uImgTextureAlpha",r)};var _0xe64cd6=new Float32Array(16),_0xd50e1e=new Matrix;_0x4db383.prototype.update=function(e){if(!e.webgpu&&!e.webgl2||(e$2b(this._ubo)||this._initUBO(e),!this._isValueDirty))return;var t=this._ro;const i=t._layer;var n=t._vertexPackage;const r=i._fileType===d$15.ClampGroundRealtimeRasterCache&&!e$2b(t._attributeLocations.aTexCoord1);if(e$2b(t._relativeModelMatrix)&&(p$1d.toArray(t._relativeModelMatrix,_0xe64cd6),Matrix.FromArrayToRef(_0xe64cd6,0,_0xd50e1e),this._ubo.updateMatrix("uModelMatrix",_0xd50e1e)),e$2b(t._geoMatrix)&&(p$1d.toArray(t._geoMatrix,_0xe64cd6),Matrix.FromArrayToRef(_0xe64cd6,0,_0xd50e1e),this._ubo.updateMatrix("uGeoMatrix",_0xd50e1e)),e$2b(n)){var o=n.minTexCoordValue;o&&o.length>0&&(this._ubo.updateFloat2("decode_texCoord0_min",n.minTexCoordValue[0].x,n.minTexCoordValue[0].y),this._ubo.updateFloat2("decode_texCoord1_min",n.minTexCoordValue[1].x,n.minTexCoordValue[1].y));var a=n.texCoordCompressConstant;if(a&&a.length>0){var s=n.texCoordCompressConstant[0],l=n.texCoordCompressConstant[1];this._ubo.updateFloat3("decode_texCoord0_vNormConstant",s.x,s.y,s.z),this._ubo.updateFloat3("decode_texCoord1_vNormConstant",l.x,l.y,l.z)}var u=n.minVerticesValue,c=n.vertCompressConstant,h=n.normalRangeConstant;e$2b(n.minVerticesValue)&&this._ubo.updateFloat4("decode_position_min",u.x,u.y,u.z,u.w),e$2b(n.vertCompressConstant)&&this._ubo.updateFloat("decode_position_normConstant",c),e$2b(n.normalRangeConstant)&&this._ubo.updateFloat("normal_rangeConstant",h)}if(e$2b(t._batchTable)){var d=t._batchTable._textureStep;this._ubo.updateFloat4("batchTextureStep",d.x,d.y,d.z,d.w);var f=t._batchTable._textureDimensions;this._ubo.updateFloat2("batchTextureDimensions",f.x,f.y)}i._flattening&&(p$1d.toArray(t._inverseGeoMatrix,_0xe64cd6),Matrix.FromArrayToRef(_0xe64cd6,0,_0xd50e1e),this._ubo.updateMatrix("uInverseGeoMatrix",_0xd50e1e)),e$2b(t._instanceSkeletonMatrix)&&(p$1d.toArray(t._instanceSkeletonMatrix,_0xe64cd6),Matrix.FromArrayToRef(_0xe64cd6,0,_0xd50e1e),this._ubo.updateMatrix("uSkeletonMatrix",_0xd50e1e)),t._isInstanceModel&&this._ubo.updateFloat("uSkeletonCount",t.skeletonCount),e$2b(i._imageryLayer)&&e$2b(t._attributeLocations.img)&&this._updateImageryValue(),t._bMultiTemporalWeight&&this._ubo.updateFloat("fMultiTemporalFactor",t._fMultiTemporalFactor),t._isClamp&&i._fileType===d$15.ClampGroundPolygon&&(this._ubo.updateVector3("uSouthWest",t._southWestCorner),this._ubo.updateVector3("uNorthDir",t._northVector),this._ubo.updateVector3("uEastDir",t._eastVector)),r&&this._ubo.updateFloat2("textureRepeat",t._symbolTextureRepeat.x,t._symbolTextureRepeat.y),this._ubo.update(),this._isValueDirty=t._bMultiTemporalWeight},_0x4db383.prototype._initUniformMap=function(){var e=this._ro;const t=e._layer;var i=t._context;if(!i.webgl2&&!i.webgpu){var n={},r=e._vertexPackage,o=r.nCompressOptions;n.uModelMatrix=function(){return e._relativeModelMatrix},n.uGeoMatrix=function(){return e._geoMatrix},(o&_0x35ed09.SVC_Vertex)===_0x35ed09.SVC_Vertex&&(n.decode_position_min=function(){return r.minVerticesValue},n.decode_position_normConstant=function(){return r.vertCompressConstant}),(o&_0x35ed09.SVC_Normal)===_0x35ed09.SVC_Normal&&(n.normal_rangeConstant=function(){return r.normalRangeConstant}),(o&_0x35ed09.SVC_TexutreCoord)===_0x35ed09.SVC_TexutreCoord&&(r.texCoordCompressConstant.length>0&&(n.decode_texCoord0_min=function(){return r.minTexCoordValue[0]},n.decode_texCoord0_normConstant=function(){return r.texCoordCompressConstant[0]},n.decode_texCoord0_vNormConstant=function(){return r.texCoordCompressConstant[0]}),r.texCoordCompressConstant.length>1&&(n.decode_texCoord1_min=function(){return r.minTexCoordValue[1]},n.decode_texCoord1_normConstant=function(){return r.texCoordCompressConstant[1]},n.decode_texCoord1_vNormConstant=function(){return r.texCoordCompressConstant[1]})),n.batchTextureStep=function(){return e._batchTable._textureStep},n.batchTextureDimensions=function(){return e._batchTable._textureDimensions},n.uInverseGeoMatrix=function(){return e._inverseGeoMatrix},n.uSkeletonMatrix=function(){return e._instanceSkeletonMatrix},n.uSkeletonCount=function(){return e.skeletonCount},n.fMultiTemporalFactor=function(){return e._fMultiTemporalFactor},n.uSouthWest=function(){return e._southWestCorner},n.uNorthDir=function(){return e._northVector},n.uEastDir=function(){return e._eastVector},n.textureRepeat=function(){return e._symbolTextureRepeat},n.uImgTextureBound=function(){return e._imageryTextureBound},n.uImgTextureAlpha=function(){return e$2b(t._imageryLayer)?t._imageryLayer instanceof Array?t._imageryLayer[t._imageryLayer.length-1].alpha:t._imageryLayer.show&&e._showImagerysImmediate?t._imageryLayer.alpha:0:1},this._uniformMap=n}},_0x4db383.prototype.isDestroyed=function(){return!1},_0x4db383.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};const _0x52e158=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xd8c283=_0x52e158(void 0,(function(){return _0xd8c283.toString().search("(((.+)+)+)+$").toString().constructor(_0xd8c283).search("(((.+)+)+)+$")}));_0xd8c283();const _0x100aad="uVolumeTexture";function _0x236967(e){var t=_0x3e2f69.call(this)||this;t._ro=e,t._name=_0x27131a.S3MVolume,t._textures={},this._initUniformMap()}_0x3e2f69&&(_0x236967.__proto__=_0x3e2f69),_0x236967.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x236967.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x236967.prototype,{}),_0x236967.prototype._updateVolumeValue=function(){const e=this._ubo,t=this._ro,i=t._layer,n=t._volObj;e$2b(n)&&(e.updateFloat("uVolSideBlockCount",n.nSideBlockCount),e.updateFloat("uVolBlockLength",n.nBlockLength),e.updateFloat("uVolTexLength",n.nLength),e.updateFloat("uVolWidth",n.nWidth),e.updateFloat("uVolHeight",n.nHeight),e.updateFloat("uVolDepth",n.nDepth));let r=0;const o=i._hypsometricSetting;e$2b(o)&&o.filterMode===k$Q.FilterMode.NEAREST&&(r=1);const a=n.nFormat;let s=0;e$2b(a)&&(3200===a?s=0:e$2b(o)?o.filterMode===k$Q.FilterMode.LINEAR&&(s=0):s=1),e.updateFloat("uVolFilterMode",r),e.updateFloat("uVolumeType",s)},_0x236967.prototype._initUBOStruct=function(){this._ubo.addUniform("uVolSideBlockCount",1),this._ubo.addUniform("uVolBlockLength",1),this._ubo.addUniform("uVolTexLength",1),this._ubo.addUniform("uVolWidth",1),this._ubo.addUniform("uVolHeight",1),this._ubo.addUniform("uVolDepth",1),this._ubo.addUniform("uVolFilterMode",1),this._ubo.addUniform("uVolumeType",1)},_0x236967.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x236967.prototype.update=function(e){if(!e.webgpu&&!e.webgl2||(e$2b(this._ubo)||this._initUBO(e),!this._isValueDirty))return;var t=this._ro;const i=t._layer;var n;(e$2b(t._volObj)||e$2b(t._volTexture))&&this._updateVolumeValue(),this._ubo.update(),this._isValueDirty=!1,n="png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt?t._volTexture:t._volObj.volTexture,this._isLayerTextureChanged(_0x100aad,n)},_0x236967.prototype._isLayerTextureChanged=function(e,t){this._isTextureDirty=this._textures[e]!==t,this._textures[e]=t},_0x236967.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name);for(const t in this._textures)this._setTextureToEffect(e,this._textures[t],t)},_0x236967.prototype._initUniformMap=function(){var e=this._ro;const t=e._layer;var i=t._context;if(i.webgl2||i.webgpu)return;const n=e._volObj;var r={uVolSideBlockCount:function(){return n.nSideBlockCount},uVolBlockLength:function(){return n.nBlockLength},uVolTexLength:function(){return n.nLength},uVolWidth:function(){return n.nWidth},uVolHeight:function(){return n.nHeight},uVolDepth:function(){return n.nDepth},uVolFilterMode:function(){let e=0;const i=t._hypsometricSetting;return e$2b(i)&&i.filterMode===k$Q.FilterMode.NEAREST&&(e=1),e},uVolumeType:function(){const e=n.nFormat;let t=0;return e$2b(e)&&(3200===e?t=0:e$2b(hypSetting)?hypSetting.filterMode===k$Q.FilterMode.LINEAR&&(t=0):t=1),t}};this._uniformMap=r},_0x236967.prototype.isDestroyed=function(){return!1},_0x236967.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};var _0x288269=(_0x283ae9=!0,function(e,t){var i=_0x283ae9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x283ae9=!1,i}),_0x4d0a47=_0x288269(void 0,(function(){return _0x4d0a47.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d0a47).search("(((.+)+)+)+$")})),_0x283ae9;function _0x15f4db(e,t){this._id=e,this._worldPosLeftBottom=void 0,this._worldPosLBRelativeOrigin=void 0,this._windowCoordRect=new h$18,this._weight=1e3,this._heigtRangeMax=-1,this._distanceRangeSquare=Number.POSITIVE_INFINITY,this._pixelWidth=-1,this._pixelHeight=-1,this._layer=t,this._visible=void 0}_0x4d0a47(),Object.defineProperties(_0x15f4db.prototype,{windowCoordRect:{get:function(){return this._windowCoordRect}},heigtRangeMax:{get:function(){return this._heigtRangeMax},set:function(e){this._heigtRangeMax=e}},weight:{get:function(){return this._weight},set:function(e){this._weight=e}},pixelWidth:{get:function(){return this._pixelWidth},set:function(e){this._pixelWidth=e}},pixelHeight:{get:function(){return this._pixelHeight},set:function(e){this._pixelHeight=e}},worldPosLeftBottom:{get:function(){return this._worldPosLeftBottom},set:function(e){this._worldPosLeftBottom=e}},worldPosLBRelativeOrigin:{get:function(){return this._worldPosLBRelativeOrigin},set:function(e){this._worldPosLBRelativeOrigin=e}},layerName:{get:function(){return this._layer.name}},layer:{get:function(){return this._layer}},id:{get:function(){return this._id}},visible:{get:function(){return this._visible},set:function(e){(!e$2b(this._visible)||e!==this._visible)&&_0x15f4db.addToChangeQueue(this,e),this._visible=e}}});var _0x11108e=new o$1o;_0x15f4db.prototype.calcWindowCoordRect=function(e,t){m$17.pointToWindowCoordinates(e,t,this._worldPosLBRelativeOrigin,_0x11108e),this._windowCoordRect.west=_0x11108e.x,this._windowCoordRect.east=_0x11108e.x+this._pixelWidth,this._windowCoordRect.south=_0x11108e.y,this._windowCoordRect.north=_0x11108e.y-this._pixelHeight},_0x15f4db.prototype.isInViewport=function(e){return this._windowCoordRect.west+200>=e.x&&this._windowCoordRect.east-this._pixelWidth<=e.x+e.width&&this._windowCoordRect.north+200>=e.y&&this._windowCoordRect.south-this._pixelHeight<=e.y+e.height},_0x15f4db.prototype.isInHeightRange=function(e){return!this._layer._hasHeightRangeAttributeName||e=o)};var _0x16aefb=[],_0x39376e=[];function _0x27ca93(e,t){for(var i=0,n=e._layerQueue.length;i0&&(t[o]=s)}}}}_0x15f4db.meetVisible=function(e,t,i){_0x16aefb.length=0,_0x39376e.length=0;e.sort((function(e,t){return e.weight-t.weight}));for(var n=[],r=0,o=e.length;r0)for(o=0;o0&&n.setOnlyObjsVisible(r,!0,!1)}for(var i in _0x15f4db._invisibleChangedQueue){var r;n=e.find(i);(r=_0x15f4db._invisibleChangedQueue[i]).length>0&&n.setOnlyObjsVisible(r,!1,!1)}},_0x15f4db.resetVisibleChangedQueue=function(){_0x15f4db._visibleChangedQueue={},_0x15f4db._invisibleChangedQueue={}},_0x15f4db.prototype.isDestroyed=function(){return!1},_0x15f4db.prototype.destroy=function(){return i$10(this)};var _0x5451f7=(_0x587331=!0,function(e,t){var i=_0x587331?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x587331=!1,i}),_0x2f8906=_0x5451f7(void 0,(function(){return _0x2f8906.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f8906).search("(((.+)+)+)+$")})),_0x587331;function _0x30a010(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;if(!(e.arrIndexPackage&&e.vertexPackage&&e.mapPass&&e$2b(e.context)))throw new t$16("gl texture indexes vertexes is required to create RenderEntityPagelod");if(this._layer=e.layer,this._entity=e.entity,this._context=e.context,this._arrIndexPackage=t,this._vertexPackage=i,this._attributeLocations=this._vertexPackage.attrLocation,this._vertexDim=4,e$2b(i)&&e$2b(i.vertexAttributes)&&i.vertexAttributes.length>0&&(this._vertexDim=i.vertexAttributes[0].componentsPerAttribute),this._edgeGeometry=e.edgeGeometry,this._pickInfo=u$_(e.pickInfo,{}),this._ids=Object.keys(this._pickInfo),this._vertexBufferToCreate=new r$16,this._vertexWeightBuffers=[],this._bMultiTemporalWeight=!1,this._fMultiTemporalFactor=0,this._fMultiTemporalPercentage=0,this._nFirstMultiTemporalPos=-1,this._nSecondMultiTemporalPos=-1,this._nSpecificTemporalPos=-1,this._layer._temporalCount>0&&(this._bMultiTemporalWeight=!0),this._bMultiTemporalWeight){for(var r=[],o=Object.keys(i.attrLocation),a=o.length,s=0;sr[c-1]){var h=new Uint8Array(this._vertexPackage.vertexAttributes[s].typedArray,0,this._vertexPackage.vertexAttributes[s].byteLength);if(this._vertexWeightBuffers.push(h),s>r[c-1])continue}u.push(this._vertexPackage.vertexAttributes[s]),this._vertexBufferToCreate.enqueue(s)}this._vertexPackage.vertexAttributes=u}else{this.isBillboardPoint(e.fileType)&&this.convertToInstanceBillboardPoint();for(s=0;s0&&this._indexBufferToCreate.enqueue(s);this._subTexturesToUpload=new r$16,this._shaderProgramToCreate=new r$16,this._shaderProgramToCreate.enqueue(0),this._version=e.version||_0x41168d.S3M,this._isS3MBlock=u$_(e.isS3MBlock,!1),this._initialize=!1,this._matModel=e.matModel,this._iblReferenceFrameMatrix=p$1e.clone(p$1e.IDENTITY),this._tranlateMatrix=p$1d.clone(p$1d.IDENTITY),this._mapPass=n;var d=this._arrIndexPackage[0];if(this._material=e$2b(d)&&e$2b(d.materialCode)?n[d.materialCode]:_0x21d1b1.Default,this._colorCommand=void 0,this._pickCommand=void 0,this._wireFrameCommands={},this._stencilCommand=void 0,this._clampColorCommand=void 0,this._clipStencilCommand=void 0,this._pickRectCommand=void 0,this._spatialQueryCommand=void 0,this._waterIndex=-1,this._waterTime=0,this._boundingVolume=e.boundingVolume,this._instanceCount=i.instanceCount,this._instanceMode=i.instanceMode,this._isS3MB=u$_(e.isS3MB,!1),this._volObj=e.volObj,this._volTexture=e.volTexture,this._geoMatrix=u$_(e.geoMatrix,p$1d.IDENTITY),this._inverseGeoMatrix=p$1d.inverse(this._geoMatrix,new p$1d),this._instanceSkeletonMatrix=e.instanceSkeletonMatrix,this._wireFrameIndexBuffers=void 0,this._bufferPrepared=!1,this._fileType=e.fileType,e.fileType===d$15.ExtendRegion3D&&e$2b(i.attrLocation.aTexCoord1)){var f=i.vertexAttributes[i.attrLocation.aTexCoord1].typedArray,p=f.slice(f.buffer,f.byteOffset,f.byteLength);this._texCoord1=new Float32Array(p.buffer,0,p.byteLength/4)}this._selectionInforMap=void 0,this._geometryByteLength=0,this._intersectWithClipPlane=!1,this._boundingRectangle=e.boundingRectangle,this._symbolTextureUrl=e.symbolTextureUrl,this._symbolColor=e.symbolColor,this._symbolTextureRepeat=e.symbolTextureRepeat,e$2b(this._symbolTextureRepeat)||(this._symbolTextureRepeat=new o$1o(600,600)),this._clampRegionEdge=u$_(i.clampRegionEdge,!1),e$2b(e.level)&&(this._level=e.level,this._row=e.row,this._col=e.col),this._rasterized=!1,this._groupName=e.groupName,this._ptIndexGroup=e.ptIndexGroup,this._geoName=e.geoName,this.oriPassGroup=Le$s.S3MTiles,this._labelPosArray=[],this._labelTextArray=[],this._pickIDArray=[],this._labelsCreated={},this._labelIndexs={},this._labelPromiseArr=[],this._labelReady=!1,this._batchTable=void 0,this._updateBatchTable=!0,this._idsOperationMap=new e$1N,this._idsColorMap=new e$1N,this._idsTranslateMap=new e$1N,this._idsPBRIndexMap=new e$1N,this._hasBloomOperation=!1,this._isInstanceModel=this._layer.skeletonSelectEnable&&"InstanceModel"===this._layer._dataType&&i.skeletonCount>0,this.skeletonCount=i.skeletonCount,this._imagerys=[],this._imageryLevels=[],this._showImagerysImmediate=!0,this._imageryTextureBound=new o$1o,this._isLeaf=!1,this._isHypsometricVisible=!0,this._themeDirty=!1,this._passIncrement=0,this._clipCommand=void 0,this._disFromCamera=0,this.materialPass=void 0,this.useWValue=!1,this.useLineColor=!1,this._polygons=void 0,this._polygonId=void 0,this._polygonCommands=[],this._imageRasterFinish=!1,this._isSelected=!1,this._isPBR=!1,this._specularEnvironmentMaps=void 0,this._clipBounds=[],this._scaleImagerys=[],this._visibleScaleImageryIndex=void 0,this._plusRoArray=[],this._modelMatrixDirty=!1,this._relativeOrigin=new o$1p,this._relativeModelMatrix=new p$1d,p$1d.clone(this._matModel,this._relativeModelMatrix),this._meshUBO=new _0x4db383(this),this._materialUBO=new _0xfa6ee5(this,this._material,this._layer),(e$2b(this._volObj)||e$2b(this._volTexture))&&(this._volumeUBO=new _0x236967(this))}_0x2f8906(),Object.defineProperties(_0x30a010.prototype,{renderable:{get:function(){if(!this._isS3MBlock||!e$2b(this._mapPass))return this._bufferPrepared;for(var e in this._mapPass)if(this._mapPass.hasOwnProperty(e)){var t=this._mapPass[e],i=t._textures[0];return e$2b(i)?this._bufferPrepared&&(i.renderable&&i.ready||e$2b(t._ancestorTexture)):this._bufferPrepared}return this._bufferPrepared}}}),_0x30a010.prototype.initialize=function(){if(!this._initialize){if(this.createSelectionMap(),this.createBoundingBoxForInstance(),this._fileType===d$15.Text||this._fileType===d$15.IconPoint?this.createBillboardsBounds(this._layer):this._fileType===d$15.ClampGroundPolygon&&this.createClampGroundBounds(),e$2b(this._symbolTextureUrl)&&_0x4dad4e.createTexture({imageUrl:this._symbolTextureUrl}),this.prepareLabels(),!e$2b(this._batchTable)&&Object.keys(this._pickInfo).length>0){var e=this._layer,t=e._context;_0xdd563a(t,this),_0x14de42(t,this,e)}this._initialize=!0}},_0x30a010.prototype.createSelectionMap=function(){var e=this._pickInfo;if(e$2b(e)&&_0x41168d.S3M4===this._version)for(var t in this._selectionInforMap=new e$1N,e)!e.hasOwnProperty(t)||-1===this._vertexPackage.instanceIndex&&"0"===t||this._selectionInforMap.set(t,e[t])},_0x30a010.prototype.createBoundingBoxForInstance=function(){var e=this._vertexPackage;if(e$2b(e)&&-1!==e.instanceIndex&&e$2b(e.instanceBounds)){var t=e.instanceBounds,i=new o$1p(t[0],t[1],t[2]),n=new o$1p(t[3],t[4],t[5]),r=o$1p.lerp(i,n,.5,new o$1p),o=o$1p.distance(r,i),a=new o$1p;p$1d.multiplyByPoint(this._matModel,r,a),this._boundingVolume.center=a,this._boundingVolume.radius=o>this._boundingVolume.radius?o:this._boundingVolume.radius,e.instanceBounds=void 0}},_0x30a010.prototype.createClampGroundBounds=function(){var e=this._boundingRectangle.x,t=this._boundingRectangle.y,i=this._boundingRectangle.x+this._boundingRectangle.width,n=this._boundingRectangle.y+this._boundingRectangle.height,r=new o$1p(i,t,0),o=new o$1p(e,n,0);this._southWestCorner=new o$1p(e,t,0),this._eastVector=new o$1p,this._northVector=new o$1p,o$1p.subtract(r,this._southWestCorner,this._eastVector),o$1p.subtract(o,this._southWestCorner,this._northVector)},_0x30a010.prototype.createBillboardsBounds=function(e){this._arrtextOverlapInfo=[];var t=this._matModel,i=this._selectionInforMap.values,n=this._vertexPackage.vertexAttributes[0].typedArray;if(e$2b(n)&&e$2b(n.buffer)){var r,o,a=new Float32Array(n.buffer,n.byteOffset,n.byteLength/4);this._fileType===d$15.Text?(r=this._vertexPackage.vertexAttributes[1].typedArray,o=new Float32Array(r.buffer,r.byteOffset,r.byteLength/4)):(r=this._vertexPackage.vertexAttributes[3].typedArray,o=new Float32Array(r.buffer,r.byteOffset,r.byteLength/4));for(var s=Number.MAX_VALUE,l=Number.MIN_VALUE,u=Number.MAX_VALUE,c=Number.MIN_VALUE,h=new o$1p,d=[],f=0;f{if(i&&(e.weight=u$_(t[i],1e3),e.heigtRangeMax=-1),n){var r=parseInt(t[n].split(",")[0]);e.heigtRangeMax=u$_(r,-1)}}))};var _0x43a827=new p$1d;_0x30a010.prototype.updateBillboardsBounds=function(e,t,i){if(!e.isOverlapDisplayed){var n,r={},o=!0;if(0!=e._scene._multiViewportMode){var a=e._scene._multiViewportInfo[i.multiViewportIndex];0==a.x&&0==a.y?(o=!0,r.x=this._context.drawingBufferWidth*a.x,r.y=this._context.drawingBufferHeight*a.y,r.width=this._context.drawingBufferWidth*a.width,r.height=this._context.drawingBufferHeight*a.height,p$1d.computeViewportTransformation(r,0,1,_0x43a827),n=_0x43a827):o=!1}else o=!0,r=t.viewport,n=t.viewportTransformation;for(var s=this._arrtextOverlapInfo,l=i.camera._positionCartographic.height,u=i.camera.positionWC,c=t.viewProjection,h=0,d=s.length;h0)for(t=0,i=r.length;t0)for(var s in a._hash)(n=a._hash[s]).dirty&&(n.dirty=!1,e$2b(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,3,n.translate):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,3,n.translate)})),o$1p.equals(n.translate,o$1p.ZERO)&&a.remove(s));var l=e._idsPBRIndexMap;if(l.length>0)for(t=0,i=l.length;t0)for(t=0,i=u.length;t-1){var c=n.instanceIds[0]*e.skeletonCount+n.skeletonId;e._batchTable.setBatchedAttribute(c,1,n.operationValue)}}else e._instanceCount>0?Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,1,n.operationValue)})):e$2b(n.batchId)&&e._batchTable.setBatchedAttribute(n.batchId,1,n.operationValue)}function _0xdd563a(e,t){var i=[];i.push({functionName:"czm_batchTable_color",componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"czm_batchTable_operation",componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4},{functionName:"czm_batchTable_pickColor",componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"czm_batchTable_translate",componentDatatype:S$12.FLOAT,componentsPerAttribute:3,normalize:!0},{functionName:"czm_batchTable_pbrMaterialIndex",componentDatatype:S$12.FLOAT,componentsPerAttribute:3,normalize:!0});var n=t._pickInfo,r=Object.keys(n),o=new h$W(e,i,t._isInstanceModel?t._instanceCount*t.skeletonCount:t._instanceCount>0?t._instanceCount:r.length);o.useUBO=!0,t._batchTable=o}function _0x14de42(e,t,i){var n=t._batchTable,r=t._selectionInforMap,o=t._selectionInforMap._hash;for(var a in o)if(o.hasOwnProperty(a)){var s=r.get(a);if(t._isInstanceModel){var l=s.instanceIds[0],u=Object.keys(s.skeletonIds).length;for(var c in s.skeletonIds)if(s.skeletonIds.hasOwnProperty(c)){var h=l*u+Number(c),d=(f=e.createPickId({primitive:i,id:a,skeletonId:Number(c)})).color;_0x2ff633.x=e$1U.floatToByte(d.red),_0x2ff633.y=e$1U.floatToByte(d.green),_0x2ff633.z=e$1U.floatToByte(d.blue),_0x2ff633.w=e$1U.floatToByte(d.alpha),n.setBatchedAttribute(h,2,_0x2ff633)}}else{var f;e$2b(f=i._pickObjs[a])||(f=e.createPickId({primitive:i,id:a}),i._pickObjs[a]=f);d=f.color;if(_0x2ff633.x=e$1U.floatToByte(d.red),_0x2ff633.y=e$1U.floatToByte(d.green),_0x2ff633.z=e$1U.floatToByte(d.blue),_0x2ff633.w=e$1U.floatToByte(d.alpha),t._instanceCount>0){s.instanceIds.map((function(e){n.setBatchedAttribute(e,2,_0x2ff633)}))}else{var p=s.batchId;n.setBatchedAttribute(p,2,_0x2ff633)}}}}function _0x324591(e,t){for(var i=e.position.values,n=e.position.componentsPerAttribute,r=i.length/n,o=new Float32Array(3*r),a=0;a0){var o={};o[this._polygonId]=4,this.updateObjsOperation(o)}for(r=0;r-1)return;this._fMultiTemporalPercentage=e.progress;var a=this._fMultiTemporalPercentage,s=a*i,l=Math.floor(s);a=s-(l=e$2a.clamp(0,l,i-1)),this._fMultiTemporalFactor=e$2a.clamp(0,a,1);var u=Math.ceil(s);if(u=e$2a.clamp(0,u,i-1),this._nFirstMultiTemporalPos!==l){r=t[l],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight)).strideInBytes+c.offsetInBytes;c.vertexBuffer.copyFromArrayView(r,o),this._nFirstMultiTemporalPos=l}if(this._nSecondMultiTemporalPos!==u){var c;r=t[u],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight_1)).strideInBytes+c.offsetInBytes;c.vertexBuffer.copyFromArrayView(r,o),this._nSecondMultiTemporalPos=u}}}};var _0x214b10=new o$1p;function _0x426300(e,t){if(!e$2b(t._matModel))return p$1d.IDENTITY;var i,n;if(t._layer._fileType!==d$15.ClampGroundRealtimeRasterCache&&(p$1d.clone(t._matModel,t._relativeModelMatrix),p$1d.getTranslation(t._matModel,_0x214b10),o$1p.subtract(_0x214b10,e.relativeOrigin,_0x214b10),p$1d.setTranslation(t._relativeModelMatrix,_0x214b10,t._relativeModelMatrix)),t._arrtextOverlapInfo&&t._arrtextOverlapInfo.length>0)for(n=t._arrtextOverlapInfo.length,i=0;i0)<<1|(o._textures.length>1)<<2|i._flattening<<3|i._hasExcavation<<4|e$2b(i._categorieTexture)<<5|(e$2b(i._imageryLayer)&&e$2b(n._attributeLocations.img))<<6|i._hasOverlay<<7|i._hasEmissiveTexAtlas<<8|i._hasSnowEffect<<9|i._hasRainEffect<<10|i._bUseHypColorTable<<11,r}function _0x2f4a70(e){if(!e$2b(e._colorCommand))return;const t=e._colorCommand;t.shaderProgram=e._sp,t.uniformMap=e._uniformMap,e._uniformMap=t.uniformMap,e._stencilCommand&&(e._stencilCommand.uniformMap=t.uniformMap)}var _0x38a539=new p$1d;_0x30a010.prototype.update=function(e,t,i,n){const r=_0x12c526(e,t,n,this);if(this._flag!==r&&(this._flag=r,this._uniformMap={},_0x23730d.create(t,n,this,this._uniformMap),e$2b(this._regularEdgeCommand)&&(this._regularEdgeCommand.uniformMap=p$19(this._regularEdgeCommand.uniformMap,this._uniformMap)),e$2b(this._silhouetteEdgeCommand)&&(this._silhouetteEdgeCommand.uniformMap=p$19(this._silhouetteEdgeCommand.uniformMap,this._uniformMap)),this._meshUBO._isValueDirty=!0),e$2b(this._volumeUBO)&&this._volumeUBO.update(e),this._bufferPrepared&&this.createPickRectCommand(n),n._fileType===d$15.ClampGroundRealtimeRasterCache&&_0x4dad4e.getTexture(this._symbolTextureUrl)!=this._materialUBO._getTextureByType("uTexture")&&(this._materialUBO._isValueDirty=!0,this.refreshRaster(t)),this._materialUBO.update(e),this._meshUBO.update(e),e$2b(this._colorCommand)&&e$2b(this._vertexPackage)&&e$2b(this._vertexPackage.vertexAttributes)&&(delete this._vertexPackage.vertexAttributes,this._arrIndexPackage=null),this._arrIndexPackage=null,this._isPBR&&(this._specularEnvironmentMaps!==t.specularEnvironmentMaps||this._hdrEnvMap!==t.hdrEnvMap)&&_0x53ea3e(t,n,this),_0x2f4a70(this),n._fileType===d$15.PointCloudFile&&e$2b(n._pointCloudLayerVisible))if(e$2b(this._ptIndexGroup)){for(var o in this._ptIndexGroup)if(this._ptIndexGroup.hasOwnProperty(o)&&n._pointCloudLayerVisible[n._pointCloudLayerNames[o]]){this.pushCommands(t,i,n);break}}else e$2b(this._groupName)&&n._pointCloudLayerVisible[this._groupName]&&this.pushCommands(t,i,n);else this.pushCommands(t,i,n);n._fileType===d$15.PointCloudFile&&e$2b(this._colorCommand)&&(n._pointCloudShading.renderMode==_0x16e744.VOXEL?this._colorCommand.renderState=d$1m.fromCache({depthTest:{enabled:!1}}):(n._pointCloudShading.eyeDomeLighting||n._pointCloudShading.performance)&&(this._colorCommand.renderState=d$1m.fromCache({depthTest:{enabled:!0}}))),(n._fileType===d$15.Text||n._fileType===d$15.IconPoint)&&this.updateBillboardsBounds(n,e.uniformState,t),this._themeDirty&&_0x280201(n,this),this._layer._showLabel&&this.updateLabels(t),this._updateBatchTable&&Object.keys(this._pickInfo).length>0&&e$2b(this._batchTable)&&this.updateBatchTable(t,t.context,n),this.updatePolygons(e,i,n),e$2b(t.specularEnvironmentMaps)&&(_0x38a539=p$1d.multiply(n._context.uniformState.view3D,this._matModel,_0x38a539),this._iblReferenceFrameMatrix=p$1d.getMatrix3(_0x38a539,this._iblReferenceFrameMatrix),this._iblReferenceFrameMatrix=p$1e.getRotation(this._iblReferenceFrameMatrix,this._iblReferenceFrameMatrix),this._iblReferenceFrameMatrix=p$1e.transpose(this._iblReferenceFrameMatrix,this._iblReferenceFrameMatrix)),this.updateVertexWeight(),(!o$1p.equals(this._relativeOrigin,n._context.relativeOrigin)||this._modelMatrixDirty)&&(this._modelMatrixDirty=!1,_0x426300(n._context,this),e$2b(this._meshUBO)&&(this._meshUBO.valueDirty=!0,this._meshUBO.update(n._context)),o$1p.clone(n._context.relativeOrigin,this._relativeOrigin))};var _0x15b102=new _0x3fd475;function _0x4019b3(e,t,i){for(var n=i._shaderProgramToCreate;n.length&&(n.peek(),_0x15b102.set(e,t,i),e.jobScheduler.execute(_0x15b102,i$Q.PROGRAM));)n.dequeue()}function _0x442f63(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!e$2b(i)){var n=t.fragmentShaderSource.clone();n.defines=e$2b(n.defines)?n.defines.slice(0):[],n.defines.push("POLYGON_OFFSET"),n.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),i=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:t._attributeLocations})}return i}function _0x345ef0(e,t){var i=i$_.shallowClone(t),n=l$1g(i.renderState,!0);n.cull.enabled=!0,n.cull.face=G$17.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5},n.stencilTest=u$N.setCesium3DTileBit(),n.stencilMask=u$N.CESIUM_3D_TILE_MASK,i.renderState=d$1m.fromCache(n),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=l$1g(t.uniformMap);var r=new o$1o(5,5);return i.uniformMap.u_polygonOffset=function(){return r},i.shaderProgram=_0x442f63(e,t.shaderProgram),i}function _0x5ebbfe(e){return(e.renderState.stencilTest.reference&u$N.SKIP_LOD_MASK)>>>u$N.SKIP_LOD_BIT_SHIFT}function _0x30daca(e,t){var i=i$_.shallowClone(e),n=l$1g(i.renderState,!0);return n.cull.enabled=!0,n.stencilTest.enabled=!0,n.stencilTest.mask=u$N.SKIP_LOD_MASK,n.stencilTest.reference=u$N.CESIUM_3D_TILE_MASK|t<0&&t.updateObjsColor(o,e.selectColorType,!0)}function _0x850766(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1N,a=e$1N.clone(r);for(var s in n._hash)if(n._hash.hasOwnProperty(s)){var l=n._hash[s];e$1U.equals(e$1U.WHITE,l)?a.set(s,l):o.set(s,l)}for(var s in i._hash)if(i._hash.hasOwnProperty(s)){l=i._hash[s];e$1U.equals(e$1U.WHITE,l)?a.set(s,l):o.set(s,l)}for(var s in o._hash)if(o._hash.hasOwnProperty(s)&&r.contains(s)){var u=o.get(s),c=(l=r.get(s),e$1U.multiply(u,l,new e$1U));o.set(s,c),a.remove(s)}a.length>0&&t.updateObjsColor(a,Zr$2.MIX,!0),o.length>0&&t.updateObjsColor(o,Zr$2.REPLACE,!0)}function _0x55c4a8(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1N;for(var a in e$1N.clone(n,o),r._hash)if(r._hash.hasOwnProperty(a)){var s=r.get(a),l=u$_(o.get(a),new e$1U),u=e$1U.multiply(l,s,new e$1U);o.set(a,u)}o.length>0&&t.updateObjsColor(o,Zr$2.MIX,!0),i.length>0&&t.updateObjsColor(i,e.selectColorType,!0)}function _0x5299d9(e,t){var i=t._pickInfo,n=[];for(var r in i)if(i.hasOwnProperty(r)&&"0"!==r){var o=new _0x104945(t,r);Object.assign(o,e._layerScheduler._attributes[r]),o.id=r,o.batchId=i[r].batchId,o.instanceIds=i[r].instanceIds,n.push(o)}return n}_0x30a010.prototype.createResources=function(e,t){if(this._bufferPrepared||_0x3ddcbe(this,e,t,t._context),e$2b(this._sp)||_0x4019b3(e,t,this),_0x2e0d4d(this,e,t),t._fileType===d$15.ClampGroundRealtimeRasterCache)return this._bufferPrepared},_0x30a010.prototype.pushClampCommands=function(e,t,i){var n=this._colorCommand;e$2b(this._clampSelected)&&this._clampSelected?(i._fileType===d$15.ClampGroundPolygon||i._fileType===d$15.ClampGroundLine?(n.pass=Le$s.GLOBE+1,this._stencilCommand.pass=Le$s.GLOBE+1,e$2b(this._selectedStencilCommand)&&e$2b(this._selectedColorCommand)&&(this._selectedStencilCommand.pass=Le$s.GLOBE+1,this._selectedColorCommand.pass=Le$s.GLOBE+1)):i._fileType===d$15.ClampObjectPolygon&&(n.pass=Le$s.ClampObject,this._stencilCommand.pass=Le$s.ClampObject,e$2b(this._selectedStencilCommand)&&e$2b(this._selectedColorCommand)&&(this._selectedStencilCommand.pass=Le$s.ClampObject,this._selectedColorCommand.pass=Le$s.ClampObject)),t.push(this._stencilCommand),t.push(n),e$2b(this._selectedStencilCommand)&&e$2b(this._selectedColorCommand)&&(t.push(this._selectedStencilCommand),t.push(this._selectedColorCommand))):(i._fileType===d$15.ClampGroundPolygon||i._fileType===d$15.ClampGroundLine?(n.pass=Le$s.GLOBE+1,this._stencilCommand.pass=Le$s.GLOBE+1):i._fileType===d$15.ClampObjectPolygon&&(n.pass=Le$s.ClampObject,this._stencilCommand.pass=Le$s.ClampObject),t.push(this._stencilCommand),t.push(n))},_0x30a010.prototype.isTransparent=function(e){return e._style3D.fillForeColor.alpha0))return void this.pushCommandsForFrameBuffer(i,o,t,e);if(i._style3D.fillStyle!==fr$2.WireFrame||i._fileType===d$15.ClampGroundPolygon){i.LoadingPriority,_0x10659f.UsePagedLodInfo;var a=this._colorCommand,s=Le$s.S3MTiles,l=this._mapPass,u=!1;if(a.renderState=i._rsColor,e$2b(this.materialPass)&&this.materialPass._alphaMode===_0x5f0e97.BLEND&&!e$2b(i.waterEffectSet))u=!0;else if(i._isTransparencyOptimization){for(var c in l)if(l[c]._bTransparentSorting){u=!0;break}}else for(var c in l)if(l[c]._bTransparentSorting){s+=1;break}if(this._isSelected&&i.selectedColor.alpha<1&&(u=!0),!(e.passes.pick&&i._scene.pickPointEnabled)&&(this.isTransparent(i)||u)&&(i.partlyTransparent?t.push(this._transparentCommand):s=i.orderIndependentTranslucency?Le$s.TRANSLUCENT:s),i._fileType===d$15.IconPoint||i._fileType===d$15.Text?s=Le$s.Label_Billboard:i._pointCloudShading.renderMode==_0x16e744.VOXEL&&(s=Le$s.Voxel_Billboard),e$2b(this._stencilCommand))this.pushClampCommands(e,t,i);else if(this.oriPassGroup!==Le$s.OVERLAY&&(a.pass=i.receiveObjectClamp?s:Le$s.NonClampObject,a.pass+=this._passIncrement),i._fileType===d$15.ClampGroundRealtimeRasterCache)e$2b(this._level)&&(a._globeIndex={level:this._level,row:this._row,col:this._col}),e$2b(a)&&this._updateBatchTable&&Object.keys(this._pickInfo).length>0&&this.updateBatchTable(e,e.context,i),a&&e.commandListRealtimeRaster.push(a);else if(this._clipBounds.length>0)for(n=0;n0){var _=this._plusRoArray.length-1,m=this._plusRoArray[_];for(n=0;n0&&this.updateObjsOperation(e._objsOperationList),e.themeStyle&&_0x280201(e,this),Object.keys(e._objsColorList).length>0&&this.updateObjsColor(e._objsColorList),Object.keys(e._objsOffsetList).length>0&&this.updateObjsTranslate(e._objsOffsetList)},_0x30a010.prototype.initLayerSettingBak=function(e){if(this._isClamp=_0x182d60(e,this),e$2b(e.waterEffectSet)){var t={boundingVolume:this._boundingVolume,distance:e.height+e.style3D.bottomAltitude+e.waterEffectSet[0].averageHeight};this._waterIndex=e.addWaterPlane(t)}if(e.allObjsHide&&this.updateAllObjsVisible(!e.allObjsHide),e.selectColorType===Zr$2.REPLACE?_0x850766(e,this):e.selectColorType===Zr$2.MIX?_0x31a52c(e,this):(this.updateObjsColor(e._selections,e.selectColorType,!0),_0x55c4a8(e,this)),e._objsVisibleList.length>0&&this.updateObjsVisible(e._objsVisibleList,e._objsVisibleList.values[0]),e$2b(e._objsHeightList)&&e._objsHeightList.length>0&&this.updateExtendHeight(e._objsHeightList),Object.keys(e._objsOperationList).length>0){var i=Math.max(Math.abs(e.selectedTranslate.x),Math.abs(e.selectedTranslate.y),Math.abs(e.selectedTranslate.z));this.updateObjsOperation(e._objsOperationList,i)}},_0x30a010.prototype.createAllCommands=function(e,t){e$2b(this._colorCommand)||(e$2b(t.waterEffectSet)||t.multiTemporalUseWater?this.createWater(t):this.createCommand(e,t),this.initLayerSetting(t))};var _0x2c54b7=new _0x4eaac2,_0x5c4149=new _0x5cff5c;function _0x16a0c9(e,t,i){for(var n=e._vertexBufferToCreate;n.length;){var r=n.peek();if(_0x2c54b7.set(i,e,r),!t.jobScheduler.execute(_0x2c54b7,i$Q.BUFFER))break;n.dequeue()}}function _0x24bad6(e,t,i,n){!e$2b(e._wireFrameIndexBuffers)&&i.wireFrameMode===_0x15916e.Triangle&&i.style3D.fillStyle!==fr$2.Fill&&(e._wireFrameIndexBuffers=e.createWireframeIndexBuffer(n));for(var r=e._vertexPackage.verticesCount,o=e._indexBufferToCreate;o.length;){var a=o.peek();if(_0x5c4149.set(n,e,a,r),!t.jobScheduler.execute(_0x5c4149,i$Q.BUFFER))break;o.dequeue()}}var _0x53fa35=new _0x10b3f1;function _0x2e0d4d(e,t,i){if(i._isS3MBlock){for(var n in e._mapPass)if(e._mapPass.hasOwnProperty(n)){(l=e._mapPass[n]).initTexture(),l.initBakeTexture(),l.requestSubTextures(t,t.context,i,e._subTexturesToUpload),l.requestBakeSubTextures(t,t.context,i,e._subTexturesToUpload)}for(var r=e._subTexturesToUpload;r.length;){var o=r.peek(),a=o.texture,s=o.subTextureInfo;if(_0x53fa35.set(t.context,e,a,s,i._textureLod),!t.jobScheduler.execute(_0x53fa35,i$Q.TEXTURE))break;r.dequeue()}if(0===r.length)for(var n in e._mapPass)if(e._mapPass.hasOwnProperty(n)){var l;(l=e._mapPass[n]).enableTextureRenderable(),l.enableBakeTextureRenderable()}}}function _0xa12f4d(e){var t=e._fileType;return e.shadowType!=_0x381f49.NONE&&(t===d$15.OSGBFile||t===d$15.OSGBCacheFile||t===d$15.PointCloudFile)}function _0x182d60(e,t){var i=e._fileType,n=i==d$15.ClampGroundPolygon||i==d$15.ClampObjectPolygon||i==d$15.ExtendClampPolygonCache||i==d$15.ClampGroundLine||i==d$15.ClampObjectLine;return t._clampRegionEdge&&(n=!1),n}_0x30a010.prototype.createWater=function(e){var t=this._arrIndexPackage[0];if(e$2b(t)){var i=e._context,n=this._vertexPackage,r=n.vertexAttributes;this._instanceCount=n.instanceCount,this._instanceMode=n.instanceMode,this._attributeLocations=n.attrLocation;var o=Le$s.S3MTiles;_0xcd424e(n);var a=this._mapPass[t.materialCode],s=W$18.TRIANGLES;switch(t.primitiveType){case 1:s=W$18.POINTS;break;case 2:s=W$18.LINES;break;case 4:s=W$18.TRIANGLES}var l=new i$_({primitiveType:s,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:o,count:t.indicesCount,cull:!0});l.addUniformBuffer(e._context.uniformState._sceneUBO),l.addUniformBuffer(e._layerUBO),l.addUniformBuffer(e._waterLayerUbo),l.addUniformBuffer(this._meshUBO),l.addUniformBuffer(this._materialUBO),l.pickId="vSecondColor",l.vertexArray=new c$12({context:i,attributes:r,indexBuffer:t.indexBuffer}),this.materialPass=a,l.shaderProgram=this._sp,l.renderState=e._rsColor,l.castShadows=!1,l.receiveShadows=!1,l.selectCastShadows=!1,this._uniformMap={},_0x23730d.create(e._frameState,e,this,this._uniformMap),l.uniformMap=this._uniformMap,this._colorCommand=l}},_0x30a010.prototype.createWireframeIndexBuffer=function(e){var t,i,n;if(e$2b(t=this._arrIndexPackage[0])&&e$2b(t.indicesTypedArray)){i={indices:0===t.indexType?new Uint16Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesCount):new Uint32Array(t.indicesTypedArray),primitiveType:W$18.TRIANGLES},k$13.toWireframe(i),n=i.indices;var r=ce$x.UNSIGNED_SHORT;return this._vertexPackage.verticesCount>e$2a.SIXTY_FOUR_KILOBYTES?(r=ce$x.UNSIGNED_INT,n=new Uint32Array(n)):n=new Uint16Array(n),t$Y.createIndexBuffer({context:e,typedArray:n,usage:A$19.STATIC_DRAW,indexDatatype:r})}},_0x30a010.prototype.createStencilCommandForClampLayer=function(e,t){var i=void 0;(i=i$_.shallowClone(e)).renderState=t,this._stencilCommand=i},_0x30a010.prototype.createClampColorCommand=function(e){e._context;var t=this._colorCommand;if(e$2b(t)&&e.isRenderClipSection()&&!e$2b(this._clampColorCommand)){this._intersectWithClipPlane=this.isIntersectWithClipPlane(e);var i=i$_.shallowClone(t);i.renderState=e._rsClampColor,this._clampColorCommand=i;var n=i$_.shallowClone(t);n.renderState=e._rsStencil,this._clipStencilCommand=n}};var _0x2e5c83=new h$18;function _0xcd424e(e){for(var t in e.attrLocation){var i=e.attrLocation[t];e.vertexAttributes[i].name=t}}_0x30a010.prototype.refreshRasterTile=function(e,t){var i=e._rectangle;e$2b(h$18.intersection(t,i,_0x2e5c83))&&(e._rasterized=!1),e$2b(e._southwestChild)&&this.refreshRasterTile(e._southwestChild,t),e$2b(e._southeastChild)&&this.refreshRasterTile(e._southeastChild,t),e$2b(e._northwestChild)&&this.refreshRasterTile(e._northwestChild,t),e$2b(e._northeastChild)&&this.refreshRasterTile(e._northeastChild,t)},_0x30a010.prototype.refreshRasterTile2=function(e,t,i,n){var r=!1;if(e._level>=t){var o=Math.pow(2,e._level-t),a=Math.floor(e.y/o),s=Math.floor(e.x/o);a===i&&s===n&&(r=!0)}else{o=Math.pow(2,t-e._level),a=Math.floor(i/o),s=Math.floor(n/o);a===e.y&&s===e.x&&(r=!0)}r&&(e._rasterized=!1,e$2b(e._southwestChild)&&this.refreshRasterTile2(e._southwestChild,t,i,n),e$2b(e._southeastChild)&&this.refreshRasterTile2(e._southeastChild,t,i,n),e$2b(e._northwestChild)&&this.refreshRasterTile2(e._northwestChild,t,i,n),e$2b(e._northeastChild)&&this.refreshRasterTile2(e._northeastChild,t,i,n))},_0x30a010.prototype.refreshRaster=function(e,t){if(this._layer._fileType===d$15.ClampGroundRealtimeRasterCache)if(e$2b(this._level)&&!e$2b(t))this.refreshRasterTile2(e._quadtree._levelZeroTiles[0],this._level,this._row,this._col),this.refreshRasterTile2(e._quadtree._levelZeroTiles[1],this._level,this._row,this._col);else if(e$2b(e._quadtree._levelZeroTiles)){var i=new h$18(this._boundingVolume.center.x-this._boundingVolume.radius,this._boundingVolume.center.y-this._boundingVolume.radius,this._boundingVolume.center.x+this._boundingVolume.radius,this._boundingVolume.center.y+this._boundingVolume.radius);i.west=e$2a.toRadians(i.west),i.north=e$2a.toRadians(i.north),i.east=e$2a.toRadians(i.east),i.south=e$2a.toRadians(i.south),this.refreshRasterTile(e._quadtree._levelZeroTiles[0],i),this.refreshRasterTile(e._quadtree._levelZeroTiles[1],i)}},_0x30a010.prototype.createSpatialClipCommand=function(e,t){if(!e$2b(this._clipCommand)){var i=this._colorCommand,n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push("SQCLIP"),r.defines.push("SQCLIP"),e.useLogDepth&&r.defines.push("LOG_DEPTH");var o=i$_.shallowClone(i);o.uniformMap.uFrontDepthTexture=function(){return t._sqTextures[0]},o.uniformMap.uBackDepthTexture=function(){return t._sqTextures[1]},o.uniformMap.uFrontColorTexture=function(){return t._sqTextures[2]},o.uniformMap.uSQMode=function(){return t._sqMode},o.shaderProgram=r$13.fromCache({context:t._context,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),this._clipCommand=o}},_0x30a010.prototype.createCommand=function(e,t){if(e$2b(this._sp)){var i=t._context;if(!i.webgpu||!this._clampRegionEdge){var n=this._vertexPackage;if(e$2b(n.vertexAttributes)){e$2b(this._vertexArray)||_0xcd424e(n);var r=n.vertexAttributes;this._instanceCount=n.instanceCount,this._instanceMode=n.instanceMode,this._attributeLocations=n.attrLocation;var o=Le$s.S3MTiles,a=this._clampRegionEdge?t._rsClampLineColor:t._rsColor,s=t._fileType,l=this._arrIndexPackage[0];t._hasWireframe||this._arrIndexPackage.length>1&&(t._hasWireframe=!0);var u,c=_0x21d1b1.Default,h=n.verticesCount,d=W$18.POINTS;if(e$2b(l))switch(!0===(c=u$_(this._mapPass[l.materialCode],_0x21d1b1.Default))._bTransparentSorting&&(o=Le$s.S3MTiles+1),u=l.indexBuffer,l.primitiveType){case 1:d=W$18.POINTS;break;case 2:d=W$18.LINES;break;case 4:d=W$18.TRIANGLES}else if(e$2b(this._ptIndexGroup)){var f,p,_,m,g,x=0;for(g in this._ptIndexGroup)this._ptIndexGroup.hasOwnProperty(g)&&(p=t._pointCloudLayerNames[g],t._pointCloudLayerVisible[p]&&(_=this._ptIndexGroup[g].start,x+=(m=this._ptIndexGroup[g].end)-_+1));if(x>0){var v=ce$x.createTypedArray(n.verticesCount,x),y=0;for(g in this._ptIndexGroup)if(this._ptIndexGroup.hasOwnProperty(g)&&(p=t._pointCloudLayerNames[g],t._pointCloudLayerVisible[p]))for(_=this._ptIndexGroup[g].start,m=this._ptIndexGroup[g].end,f=_;f<=m;)v[y++]=f++;var $=n.verticesCount>=e$2a.SIXTY_FOUR_KILOBYTES&&i.elementIndexUint?ce$x.UNSIGNED_INT:ce$x.UNSIGNED_SHORT;u=t$Y.createIndexBuffer({context:i,typedArray:v,usage:A$19.STATIC_DRAW,indexDatatype:$}),this.isBillboardPoint()&&(u=this._context.createBillboardPointIndexBuffer())}else h=1}this.isBillboardPoint()&&(d=W$18.TRIANGLES),this.materialPass=c,this.useWValue=4===r[0].componentsPerAttribute,e$2b(this._attributeLocations.aVertexWeight)&&(this.useWValue=1),(1===d||s===d$15.ClampGroundRealtimeRasterCache&&e$2b(this._attributeLocations.aTexCoord1))&&(this.useLineColor=!0),this.oriPassGroup=o;var b=new i$_({primitiveType:d,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:o,count:e$2b(u)?void 0:h,cull:!0,occlude:!1});this._entity&&this._entity.isFlatten&&(b.cull=!1),b.opaquePass=Le$s.S3MTiles,t._fileType===d$15.ClampGroundRealtimeRasterCache&&(b.layerId=t.id),b.pickId="vSecondColor",s===d$15.PointCloudFile&&(b.pickId="vPosition"),b.instanceCount=this._instanceCount,this.isBillboardPoint()&&(b.instanceCount=this._vertexPackage.verticesCount),b.vertexArray=new c$12({context:i,attributes:r,indexBuffer:u}),b.shaderProgram=this._sp,_0x182d60(t,this)&&((t._fileType===d$15.ClampGroundPolygon||t._fileType===d$15.ClampObjectPolygon||t._fileType===d$15.ClampGroundLine||t._fileType===d$15.ExtendClampPolygonCache)&&(b.pickId=void 0),this._isClamp=!0),b.renderState=a,b.uniformMap=this._uniformMap,s===d$15.ClampGroundRealtimeRasterCache&&(b.useRelativeOrigin=!1),b.addUniformBuffer(t._context.uniformState._sceneUBO),b.addUniformBuffer(t._context.uniformState._lightUBO),b.addUniformBuffer(t._layerUBO),b.addUniformBuffer(this._meshUBO),b.addUniformBuffer(this._materialUBO),e$2b(t._polylineEffectUbo)?b.addUniformBuffer(t._polylineEffectUbo):e$2b(t._regionEffectUbo)&&b.addUniformBuffer(t._regionEffectUbo),e$2b(this._volumeUBO)&&b.addUniformBuffer(this._volumeUBO),_0x182d60(t,this)&&this.createStencilCommandForClampLayer(b,t._rsStencil);var T=_0xa12f4d(t);b.castShadows=T,b.receiveShadows=T,b.selectCastShadows=!0,b.owner=this,(s==d$15.IconPoint||s===d$15.Text)&&(b.cull=!1),this._colorCommand=b,this.createWireFrameCommand(t,r)}}}},_0x30a010.prototype.createOneEdgeCommand=function(e,t,i,n,r){if(!e$2b(i.attributes)||0==i.attributes.length||!e$2b(i.instanceCount)||0==i.instanceCount)return null;var o,a,s=Le$s.OPAQUE+1,l=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:s,owner:this,cull:!0});if(l.vertexArray=new c$12({context:e,attributes:i.attributes,indexBuffer:n}),l.instanceCount=i.instanceCount,r){var u="RegularEdge_"+t.id,c="RegularEdge_"+t.id;o=new s$U({name:u,sources:[_0x5a4442]}),a=new s$U({name:c,sources:[_0x171550]})}else{u="SilhouetteEdge_"+t.id,c="SilhouetteEdge_"+t.id;o=new s$U({name:u,sources:[_0x5a4442]}),a=new s$U({name:c,sources:[_0x171550]}),o.defines.push("SILHOUETTE"),a.defines.push("SILHOUETTE")}o.defines.push("ANTIALIASING"),a.defines.push("ANTIALIASING"),a.defines.push("POLYGON_OFFSET"),t._hasExcavation&&(o.defines.push(Y$H.EXCAVATION),a.defines.push(Y$H.EXCAVATION)),t._hasServerExcavation&&(o.defines.push("SERVEREXCAVATION"),a.defines.push("SERVEREXCAVATION")),t.swipeEnabled&&a.defines.push(Y$H.APPLY_SWIPE),t._clipping&&a.defines.push("CLIP"),t._section&&a.defines.push("CLIPPLANE"),this._batchTable&&(o.defines.push("BatchTable"),-1===o.defines.indexOf("BatchTableMultiRow")&&o.defines.push("BatchTableMultiRow")),t._selectColorType===Zr$2.WIREFRAME&&t._style3D.fillStyle===fr$2.Fill&&a.defines.push(Y$H.WIREFRAME_SELECT_TYPE);var h=0;t.wireFrameMode===_0x15916e.Sketch&&(h=1),o.defines.push("MODE "+h),a.defines.push("MODE "+h),l.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:i.attributeLocations}),l.renderState=d$1m.fromCache({depthTest:{enabled:!0,func:re$E.LESS_OR_EQUAL},cull:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var d={uStrokesTexture:function(){return e$2b(t._edgeStrokesTexture)||t._initEdgeTexture(),t._edgeStrokesTexture}};return l.uniformMap=p$19(d,this._colorCommand.uniformMap),l.edgeTotalLength=i.edgeLength,l.edgeCount=i.instanceCount,l.wireframeType=t.wireFrameMode,l.addUniformBuffer(t._context.uniformState._sceneUBO),l.addUniformBuffer(t._layerUBO),l.addUniformBuffer(this._meshUBO),l},_0x30a010.prototype.createEdgeCommands=function(e){if(e$2b(this._edgeGeometry)){var t=e._context,i=this._edgeGeometry;_0x30c9ea.createRegularEdgeAttributes(t,i.regular),_0x30c9ea.createSilhouetteEdgeAttributes(t,i.silhouette);var n=_0x30c9ea.createIndexBuffer(t);this._regularEdgeCommand=this.createOneEdgeCommand(t,e,i.regular,n,!0),this._silhouetteEdgeCommand=this.createOneEdgeCommand(t,e,i.silhouette,n,!1),(e$2b(this._regularEdgeCommand)||e$2b(this._silhouetteEdgeCommand))&&e.wireFrameMode===_0x15916e.Quad&&(e.wireFrameMode=_0x15916e.EffectOutline)}},_0x30a010.prototype.createTrangleWireFrameCommand=function(e,t){if(e$2b(this._arrIndexPackage[0])&&e$2b(this._colorCommand)){var i=e._context;this._arrIndexPackage[0].indicesCount;var n=i$_.shallowClone(this._colorCommand);n.primitiveType=W$18.LINES,n.vertexArray=new c$12({context:i,attributes:t,indexBuffer:this._wireFrameIndexBuffers}),this._wireFrameCommands.triangle=n}},_0x30a010.prototype.createQuadWireFrameCommand=function(e,t,i){var n=e._context,r=2===i.primitiveType?W$18.LINES:W$18.LINE_STRIP,o=i$_.shallowClone(this._colorCommand);o.pass=Le$s.LOG_DEPTH_OVERLAY,o.count=void 0,o.primitiveType=r,o.vertexArray=new c$12({context:n,attributes:t,indexBuffer:i.indexBuffer});var a=this._colorCommand.shaderProgram.vertexShaderSource.clone(),s=this._colorCommand.shaderProgram.fragmentShaderSource.clone(),l=a.defines.indexOf(Y$H.SKETCH_MODE);l>0&&a.defines.splice(l,1),(l=a.defines.indexOf(Y$H.COMPUTE_W_VALUE))>0&&a.defines.splice(l,1),(l=a.defines.indexOf(Y$H.EMISSION_TEXTURE_ATLAS))>0&&a.defines.splice(l,1),(l=s.defines.indexOf(Y$H.SKETCH_MODE))>0&&s.defines.splice(l,1),(l=s.defines.indexOf(Y$H.COMPUTE_W_VALUE))>0&&s.defines.splice(l,1),(l=s.defines.indexOf(Y$H.EMISSION_TEXTURE_ATLAS))>0&&s.defines.splice(l,1),a.defines.push("QUAD_OUTLINE"),s.defines.push("QUAD_OUTLINE"),s.defines.push("Only_LineColor"),o.shaderProgram=r$13.fromCache({context:n,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations}),o.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),this._wireFrameCommands.quad=o},_0x30a010.prototype.createWireFrameCommand=function(e,t){if(!this._isClamp&&e._fileType!==d$15.ClampGroundPolygon){if(this._arrIndexPackage.length>1)if(13==this._arrIndexPackage[1].primitiveType)this.createEdgeCommands(e);else if(2==this._arrIndexPackage[1].primitiveType){var i=this._arrIndexPackage[1];this.createQuadWireFrameCommand(e,t,i)}e.wireFrameMode===_0x15916e.Triangle&&e.style3D.fillStyle!==fr$2.Fill&&this.createTrangleWireFrameCommand(e,t)}},_0x30a010.prototype.updateTheme=function(e){_0x280201(e,this)},_0x30a010.prototype.updateObjsColor=function(e){if(this._initialize&&e$2b(this._selectionInforMap)&&_0x41168d.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&e$2b(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)){var n=e[i];if(e$2b(n)){var r=t[i];this._updateBatchTable=!0;var o=r.batchId,a=r.instanceIds;this._idsColorMap.set(i,{batchId:o,instanceIds:a,color:n,dirty:!0});var s=this._idsOperationMap.get(i);e$2b(s)||(s={batchId:o,instanceIds:a,operationValue:new e$29,dirty:!0}),s.dirty=!0,s.operationValue.x=n===e$1U.TRANSPARENT?254&s.operationValue.x:1|s.operationValue.x,this._passIncrement=n.alpha<1?1:0,this._idsOperationMap.set(i,s)}}}},_0x30a010.prototype._radiusToExpand=function(e){if(!this._selectionInforMap||!this._initialize||!e$2b(this._colorCommand))return 0;var t=this._selectionInforMap._hash,i=0;for(var n in t)!t.hasOwnProperty(n)||!e[n]||(i=Math.max(o$1p.magnitude(e[n]),i),this._oriBoundingSphere||(this._oriBoundingSphere=this._boundingVolume.clone()),this._colorCommand.boundingVolume.radius=this._oriBoundingSphere.radius+i,this._boundingVolume.radius=this._oriBoundingSphere.radius+i);return i},_0x30a010.prototype.updateObjsTranslate=function(e){if(this._initialize&&e$2b(this._selectionInforMap)&&_0x41168d.S3M!==this._version){var t=this._selectionInforMap.length,i=this._colorCommand;if(!(t<1)&&e$2b(i)){var n=this._selectionInforMap._hash,r=this._idsTranslateMap.length,o=!1;for(var a in n)if(n.hasOwnProperty(a)){var s=e[a];if(s){var l=n[a];this._updateBatchTable=!0;var u=l.batchId,c=l.instanceIds;this._idsTranslateMap.set(a,{batchId:u,instanceIds:c,translate:s,dirty:!0});var h=this._idsOperationMap.get(a);e$2b(h)||(h={batchId:u,instanceIds:c,operationValue:new o$1p,dirty:!0}),h.dirty=!0,o$1p.equals(s,o$1p.ZERO)?(h.operationValue.x=h.operationValue.x&(_0x4580ad.ALL^_0x4580ad.OFFSET),this._idsOperationMap.set(a,h)):(h.operationValue.x=h.operationValue.x|_0x4580ad.OFFSET,o=!0)}}e$2b(this._entity)&&(this._entity.hasTranslate=o),i.cull=!o;var d=this._idsTranslateMap.length;(d>0&&0===r||r>0&&0===d)&&d>0&&0===r&&this.appendProgramDefine({layer:this._layer},!0,!1,Y$H.Translation,!0,!1)}}},_0x30a010.prototype.updateAllObjsVisible=function(e,t){if(this._initialize&&e$2b(this._selectionInforMap)&&_0x41168d.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&e$2b(this._colorCommand))){var i=this._selectionInforMap._hash;for(var n in i)if(i.hasOwnProperty(n)&&!e._objsVisibleList.contains(n)){var r=i[n];this._updateBatchTable=!0;var o=r.batchId,a=r.instanceIds,s=this._idsOperationMap.get(n);e$2b(s)||(s={batchId:o,instanceIds:a,operationValue:new e$29,dirty:!0}),s.dirty=!0,s.operationValue.x=t?s.operationValue.x&(_0x4580ad.ALL^_0x4580ad.HIDE):s.operationValue.x|_0x4580ad.HIDE,this._idsOperationMap.set(n,s),s.operationValue.x===_0x4580ad.RESET?delete e._objsOperationList[n]:(e._objsOperationList[n]=s.operationValue.x,e._objsHideList.set(n,!0))}}},_0x30a010.prototype.removeAllExtendHeight=function(){this._initialize&&e$2b(this._texCoord1)&&e$2b(this._colorCommand)&&this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1).vertexBuffer.copyFromArrayView(this._texCoord1)},_0x30a010.prototype.removeExtendHeight=function(e){if(this._initialize&&e$2b(this._texCoord1)&&(!(this._selectionInforMap.length<1)&&e$2b(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)&&-1!=e.indexOf(parseInt(i))){var n,r,o,a,s=t[i];n=this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1),r=(a=s.vertexColorOffset*n.componentsPerAttribute)*S$12.getSizeInBytes(n.componentDatatype),o=s.vertexColorCount*n.componentsPerAttribute;var l=this._texCoord1.slice(a,o);n.vertexBuffer.copyFromArrayView(l,r)}}},_0x30a010.prototype.updateExtendHeight=function(e){if(this._initialize&&e$2b(this._texCoord1)&&(!(this._selectionInforMap.length<1)&&e$2b(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)&&e.contains(i)){var n,r,o,a,s=t[i],l=e.get(i);n=this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1),r=(a=s.vertexColorOffset*n.componentsPerAttribute)*S$12.getSizeInBytes(n.componentDatatype),o=s.vertexColorCount*n.componentsPerAttribute;for(var u=S$12.createTypedArray(n.componentDatatype,o),c=0;c.3&&this._texCoord1[2*c+1+a]<.8?(u[2*c]=l,u[2*c+1]=.5):this._texCoord1[2*c+1+a]>.8?(u[2*c]=l,u[2*c+1]=1):(u[2*c]=this._texCoord1[2*c+a],u[2*c+1]=0);n.vertexBuffer.copyFromArrayView(u,r)}}},_0x30a010.prototype.updateObjsOperation=function(e,t){if(this._initialize&&e$2b(this._selectionInforMap)&&_0x41168d.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&e$2b(this._colorCommand))){var i=this._selectionInforMap._hash,n=!1,r=_0x182d60(this._layer,this),o=!1,a=this._layer.isSilhouette(),s=!1,l=!1;for(var u in i)if(i.hasOwnProperty(u)){var c=e[u];if(e$2b(c)){var h=i[u];this._updateBatchTable=!0;var d=this._layer._lastSelectSkeletonId,f=d>-1?u+"_"+d:u,p=h.batchId,_=h.instanceIds,m=this._idsOperationMap.get(f);e$2b(m)||(m={batchId:p,instanceIds:_,skeletonId:d,operationValue:new e$29,dirty:!0}),m.dirty=!0,m.operationValue.x=1&m.operationValue.x|c,this._idsOperationMap.set(f,m),(m.operationValue.x&_0x4580ad.BLOOM)>0&&(n=!0),r&&(m.operationValue.x&_0x4580ad.SELECTED)>0&&(o=!0),a&&(m.operationValue.x&_0x4580ad.SELECTED)>0&&(s=!0),(m.operationValue.x&_0x4580ad.SELECTED)>0&&(l=!0)}}this._hasBloomOperation=n,this._clampSelected=o,this._hasSilhouette=s,this._isSelected=l}};var _0xf460f=new o$1m(new o$1p(1,0,0),0);function _0x1c82a0(e,t){return o$1p.distance(e.center,t.center)<=e.radius+t.radius}function _0x4bcc34(e,t){var i=!1,n=t.split(" "),r=!1;if(n.length>1){var o=n[0],a=n[1];for(var s in e.defines)if(-1!==e.defines[s].indexOf(o))return e.defines[s]=o+" "+a,!0;r=!0,e.defines.push(t)}else{for(var l=0,u=e.defines.length;l=0&&e.defines.splice(i,1)}function _0x55e46c(e,t){e$2b(t)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),t.renderState=void 0,t.uniformMap=void 0,t.removeAllUniformBuffer())}function _0x6d1e60(e,t,i,n){if(!e$2b(i._labelPromiseArr[n])){var r=e._s3MTilesLabelStyle._textField;e.getAttributesById(t).then((function(e){if(i._labelPromiseArr[n]=void 0,e.hasOwnProperty(r)){var o=e[r];i._labelTextArray[n]=o,i._labelsCreated[t]=!0}}))}}_0x30a010.prototype.isIntersectWithClipPlane=function(e){return!!e.isRenderClipSection()&&this._boundingVolume.intersectPlane(o$1m.fromCartesian4(e._oriClipPlane[0],_0xf460f))===Ae$u.INTERSECTING},_0x30a010.prototype.setCustomClipBox=function(e,t){var i={layer:e};t?(this.appendProgramDefine(i,!1,!0,Y$H.CLIP),e._section&&this.appendProgramDefine(i,!1,!0,Y$H.CLIPPLANE)):(this.removeProgramDefine(i,!1,!0,Y$H.CLIP),e._section&&this.removeProgramDefine(i,!1,!0,Y$H.CLIPPLANE)),e$2b(this._clampColorCommand)&&(!this._clampColorCommand.shaderProgram.isDestroyed()&&this._clampColorCommand.shaderProgram.destroy(),this._clampColorCommand=void 0),e$2b(this._clipStencilCommand)&&(!this._clipStencilCommand.shaderProgram.isDestroyed()&&this._clipStencilCommand.shaderProgram.destroy(),this._clipStencilCommand=void 0)},_0x30a010.prototype.updateShadow=function(e){var t=_0xa12f4d(this),i=this._colorCommand;!e$2b(i)||(i.castShadows=t,i.receiveShadows=t,i.selectCastShadows=!e$2b(e.waterEffectSet))},_0x30a010.prototype.cloneSelectCommand=function(e){var t=e._context,i=new s$U({name:"S3MTilesSelection",sources:[_0x527139]});e._clipping&&i.defines.push("CLIP"),i.defines.push("DepthEXT");var n=this._colorCommand;if(e$2b(n)){var r=n.shaderProgram.vertexShaderSource.clone(),o=void 0;if((o=i$_.shallowClone(n,o)).shaderProgram=r$13.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:i,attributeLocations:this._attributeLocations}),this._pickCommand=o,this._pickCommand.pass=Le$s.ClampObject,e$2b(this._stencilCommand)){var a=this._stencilCommand.shaderProgram.vertexShaderSource.clone(),s=this._stencilCommand.shaderProgram.fragmentShaderSource.clone();a.defines.push("SELECTED"),s.defines.push("SELECTED"),this._selectedStencilCommand=i$_.shallowClone(this._stencilCommand),this._selectedStencilCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations}),this._selectedColorCommand=i$_.shallowClone(this._colorCommand),this._selectedColorCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations})}}},_0x30a010.prototype.createNormalAndDepthCommand=function(e){var t=e._context,i=this._colorCommand;if(e.isSilhouette()&&e$2b(i)&&!e$2b(this._normalAndDepthCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push(Y$H.NORMAL_AND_DEPTH),r.defines.push(Y$H.NORMAL_AND_DEPTH),e.isSilhouette()&&(n.defines.push(Y$H.SILHOUETTE_SELECT_TYPE),r.defines.push(Y$H.SILHOUETTE_SELECT_TYPE));var o=void 0;(o=i$_.shallowClone(i,o)).shaderProgram=r$13.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.uniformMap.uNormalDepthTexture=function(){return e._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0)},this._normalAndDepthCommand=o}},_0x30a010.prototype.createTransparentCommand=function(e){var t=e._context,i=this._colorCommand;if(e.partlyTransparent&&e$2b(i)&&!e$2b(this._transparentCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();r.defines.push("TRANSPARENT_PASS");var o=void 0;(o=i$_.shallowClone(i,o)).shaderProgram=r$13.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.pass=Le$s.TRANSLUCENT,this._transparentCommand=o}},_0x30a010.prototype.createPostEffectCommand=function(e){var t=e._context,i=this._colorCommand;if(e.bloomEnable&&e$2b(i)&&!e$2b(this._postEffectCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push(Y$H.POST_EFFECT),r.defines.push(Y$H.POST_EFFECT);var o=void 0;(o=i$_.shallowClone(i,o)).shaderProgram=r$13.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.pass=Le$s.S3MTiles,this._postEffectCommand=o}},_0x30a010.prototype.enableAjustTransparentBackColor=function(e){this.appendProgramDefine(e,!1,!0,Y$H.TRANSPARENT_BACK_COLOR)},_0x30a010.prototype.disableAjustTransparentBackColor=function(e){this.removeProgramDefine(e,!1,!0,Y$H.TRANSPARENT_BACK_COLOR)},_0x30a010.prototype.enableAdjustColor=function(e){this.appendProgramDefine(e,!1,!0,Y$H.ADJUST_COLOR)},_0x30a010.prototype.enableVertexCapture=function(e){this.appendProgramDefine(e,!0,!0,Y$H.VERTEX_CAPTURE)},_0x30a010.prototype.disableVertexCapture=function(e){this.removeProgramDefine(e,!0,!0,Y$H.VERTEX_CAPTURE)},_0x30a010.prototype.enableExcavation=function(e){this.appendProgramDefine(e,!0,!0,Y$H.EXCAVATION)},_0x30a010.prototype.disableExcavation=function(e){this.removeProgramDefine(e,!0,!0,Y$H.EXCAVATION)},_0x30a010.prototype.enableServerExcavation=function(e){this.appendProgramDefine(e,!0,!0,"SERVEREXCAVATION")},_0x30a010.prototype.disableServerExcavation=function(e){this.removeProgramDefine(e,!0,!0,"SERVEREXCAVATION")},_0x30a010.prototype.enableFlatten=function(e){e$2b(e.entity)&&e$2b(e.entity._boundingSphere)&&e$2b(e.boundingSphere)&&(_0x1c82a0(e.entity._boundingSphere,e.boundingSphere)&&(e.entity.isFlatten=!0,e$2b(this._colorCommand)&&(this._colorCommand.cull=!1)));this.appendProgramDefine(e,!0,!1,Y$H.FALTTEN),this.appendProgramDefine(e,!0,!1,Y$H.UseFloatTexture)},_0x30a010.prototype.enableOverlay=function(e){this.appendProgramDefine(e,!0,!0,Y$H.OVERLAY)},_0x30a010.prototype.disableOverlay=function(e){this.removeProgramDefine(e,!1,!0,Y$H.OVERLAY)},_0x30a010.prototype.disableFlatten=function(e){e$2b(e.entity)&&(e.entity.isFlatten=!1),e$2b(this._colorCommand)&&(this._colorCommand.cull=!0),this.removeProgramDefine(e,!0,!1,Y$H.FALTTEN),this.removeProgramDefine(e,!0,!1,Y$H.UseFloatTexture)},_0x30a010.prototype.enableHypsometric=function(e){this.appendProgramDefine(e,!0,!0,Y$H.COMPUTE_W_VALUE),this.appendProgramDefine(e,!0,!0,Y$H.HYPSOMETRIC)},_0x30a010.prototype.disableHypsometric=function(e){this.removeProgramDefine(e,!0,!0,Y$H.COMPUTE_W_VALUE),this.removeProgramDefine(e,!0,!0,Y$H.EMISSION_TEXTURE_ATLAS),this.removeProgramDefine(e,!0,!0,Y$H.HYPSOMETRIC)},_0x30a010.prototype.hasLightChange=function(e){e.enable?this.appendProgramDefine(e,!0,!0,Y$H.HAS_LIGHT):this.removeProgramDefine(e,!0,!0,Y$H.HAS_LIGHT)},_0x30a010.prototype.skeletonSelectedChange=function(e){e.enable?this.appendProgramDefine(e,!0,!0,Y$H.HAS_SKELETONSELECTED):this.removeProgramDefine(e,!0,!0,Y$H.HAS_SKELETONSELECTED)},_0x30a010.prototype.skeletonSelectEnable=function(e){e.enable?this.appendProgramDefine(e,!0,!0,Y$H.SKELETONSELECT_ENABLE):this.removeProgramDefine(e,!0,!0,Y$H.SKELETONSELECT_ENABLE)},_0x30a010.prototype.selectColorTypeChange=function(e){e.selectColorType==Zr$2.REPLACE?(this.appendProgramDefine(e,!0,!0,Y$H.REPLACE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,Y$H.SILHOUETTE_SELECT_TYPE)):e.selectColorType==Zr$2.SILHOUETTE||e.selectColorType==Zr$2.ALWAYS_SHOW_SILHOUETTE?(this.appendProgramDefine(e,!0,!0,Y$H.SILHOUETTE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,Y$H.REPLACE_SELECT_TYPE)):(this.removeProgramDefine(e,!0,!0,Y$H.REPLACE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,Y$H.SILHOUETTE_SELECT_TYPE))},_0x30a010.prototype.mixColorTypeChange=function(e){e.mixColorType===_0x203e3b.REPLACE?this.appendProgramDefine(e,!0,!0,Y$H.REPLACE_COLOR_TYPE):this.removeProgramDefine(e,!0,!0,Y$H.REPLACE_COLOR_TYPE)},_0x30a010.prototype.splitDirectionChange=function(e){e.enableSplit?this.appendProgramDefine(e,!1,!0,Y$H.APPLY_SPLIT):this.removeProgramDefine(e,!1,!0,Y$H.APPLY_SPLIT)},_0x30a010.prototype.swipeStateChange=function(e){e.enableSwipe?this.appendProgramDefine(e,!1,!0,Y$H.APPLY_SWIPE):this.removeProgramDefine(e,!1,!0,Y$H.APPLY_SWIPE)},_0x30a010.prototype.edgeWireFrameModeChange=function(e){this.appendProgramDefineForCommand(this._regularEdgeCommand,e,!0,!0,"MODE "+e.edgeMode,!1),this.appendProgramDefineForCommand(this._silhouetteEdgeCommand,e,!0,!0,"MODE "+e.edgeMode,!1)},_0x30a010.prototype.PBRMaterialTypeChange=function(e){e.PBRType===je$g.NONE?this.removeProgramDefine(e,!0,!0,Y$H.PBR):this.appendProgramDefine(e,!0,!0,Y$H.PBR)},_0x30a010.prototype.emissionTextureChange=function(e){e.enable?(this.appendProgramDefine(e,!0,!0,Y$H.COMPUTE_W_VALUE),this.appendProgramDefine(e,!0,!0,Y$H.EMISSION_TEXTURE_ATLAS)):this.removeProgramDefine(e,!0,!0,Y$H.EMISSION_TEXTURE_ATLAS)},_0x30a010.prototype.enableTextureMove=function(e){e.enable?this.appendProgramDefine(e,!0,!0,Y$H.TEXTURE_MOVE):this.removeProgramDefine(e,!0,!0,Y$H.TEXTURE_MOVE)},_0x30a010.prototype.enableTriangleFiltrate=function(e){e.enable?this.appendProgramDefine(e,!0,!1,Y$H.TRIANGLE_FILTRATE):this.removeProgramDefine(e,!0,!1,Y$H.TRIANGLE_FILTRATE)},_0x30a010.prototype.enableClipFilt=function(e){e.enable?this.appendProgramDefine(e,!1,!0,Y$H.CLIP_FILT_BY_ID):this.removeProgramDefine(e,!1,!0,Y$H.CLIP_FILT_BY_ID)},_0x30a010.prototype.enableFlood=function(e){this.appendProgramDefine(e,!0,!0,Y$H.FLOOD_ANALYSIS)},_0x30a010.prototype.disableFlood=function(e){this.removeProgramDefine(e,!0,!0,Y$H.FLOOD_ANALYSIS)},_0x30a010.prototype.emissionTextureUnitChange=function(e){e.enable?this.appendProgramDefine(e,!0,!1,Y$H.SEC_TEX_EMISSION):this.removeProgramDefine(e,!0,!1,Y$H.SEC_TEX_EMISSION)},_0x30a010.prototype.pbrParameterChange=function(e){if(e.enable){this._materialUBO.valueDirty=!0,this._materialUBO.update(e.layer._context);var t=e.layer,i=(t._pbrParameter&je$g.ROUGHNESS)>0||t._PBRMaterialParams.loadingTexture,n=e$2b(t.themeStyle)&&e$2b(t.themeStyle.pbrMaterialIndex),r=[];if(i||n){r.push(Y$H.BRDF);var o=e$2b(this._attributeLocations.aTexCoord0);n&&(r.push(Y$H.PBR_THEME),r.push("NUM_PBR_MATERIALS "+t._frameState.pbrMaterialsArr.length)),e$2b(t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture instanceof t$V&&o&&r.push(Y$H.HAS_BASE_TEXTURE),o&&e$2b(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2b(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor)&&e$2b(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof t$V&&r.push(Y$H.HAS_RAIN),o&&e$2b(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect)&&e$2b(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture instanceof t$V&&e$2b(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture instanceof t$V&&r.push(Y$H.HAS_SNOW),(e$2b(this.materialPass)&&this.materialPass._metallicRoughnessTextureIndex>-1||e$2b(t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture instanceof t$V)&&o&&r.push(Y$H.HAS_MetallicRoughness_TEXTURE),(e$2b(this.materialPass)&&this.materialPass._normalTextureIndex>-1||e$2b(t._PBRMaterialParams.pbrMetallicRoughness.normalTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.normalTexture instanceof t$V)&&o&&r.push(Y$H.HAS_NORMAL_TEXTURE),(e$2b(this.materialPass)&&this.materialPass._occlusionTextureIndex>-1||e$2b(t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture instanceof t$V)&&o&&r.push(Y$H.HAS_OCCLUSION_TEXTURE),e$2b(this.materialPass)&&this.materialPass._emissiveTextureIndex>-1&&r.push(Y$H.HAS_EMISSIVE_TEXTURE),e$2b(t._frameState.specularEnvironmentMaps)&&r.push(Y$H.IBL),this.appendProgramDefinesForCommand(this._colorCommand,e,!1,!0,r,!0,!0)}else r=[Y$H.BRDF,"NUM_PBR_MATERIALS "+t._frameState.pbrMaterialsArr.length,Y$H.HAS_BASE_TEXTURE,Y$H.HAS_NORMAL_TEXTURE,Y$H.HAS_EMISSIVE_TEXTURE,Y$H.IBL,Y$H.HAS_MetallicRoughness_TEXTURE,Y$H.HAS_SNOW,Y$H.HAS_RAIN],this.removeProgramDefinesForCommand(this._colorCommand,e,!1,!0,r)}},_0x30a010.prototype.enableFusionChange=function(e){e.enable?this.appendProgramDefine(e,!0,!1,Y$H.FusionMode):this.removeProgramDefine(e,!0,!1,Y$H.FusionMode)},_0x30a010.prototype.appendProgramDefine=function(e,t,i,n,r,o){r=u$_(r,!0),o=u$_(o,!0),this.appendProgramDefineForCommand(this._colorCommand,e,t,i,n,r,o),this.appendProgramDefineForCommand(this._regularEdgeCommand,e,t,i,n,!1,o),this.appendProgramDefineForCommand(this._silhouetteEdgeCommand,e,t,i,n,!1,o),this.appendProgramDefineForCommand(this._wireFrameCommands.quad,e,!1,!0,n,!1,o),this.appendProgramDefineForCommand(this._wireFrameCommands.triangle,e,!1,!0,n,!1,o)},_0x30a010.prototype.appendProgramDefineForCommand=function(e,t,i,n,r,o,a){if(o=u$_(o,!0),a=u$_(a,!0),e$2b(e)){l=t.layer._context,u=e.shaderProgram.fragmentShaderSource.clone(),c=e.shaderProgram.vertexShaderSource.clone();e$2b(u.name)||(u.name="fpCustomName"+t.layer.id),e$2b(c.name)||(c.name="vpCustomName"+t.layer.id),i&&_0x4bcc34(c,r),n&&_0x4bcc34(u,r);h=e.shaderProgram._attributeLocations;a&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());var s=r$13.fromCache({context:l,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h});o&&(this._sp=s),e.shaderProgram=s,e$2b(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x442f63(l,e.shaderProgram))}else if(o&&e$2b(this._sp)){var l=t.layer._context,u=this._sp.fragmentShaderSource.clone(),c=this._sp.vertexShaderSource.clone();e$2b(u.name)||(u.name="fpCustomName"+t.layer.id),e$2b(c.name)||(c.name="vpCustomName"+t.layer.id),i&&_0x4bcc34(c,r),n&&_0x4bcc34(u,r);var h=this._attributeLocations;this._sp.destroy(),this._sp=r$13.fromCache({context:l,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h})}},_0x30a010.prototype.appendProgramDefinesForCommand=function(e,t,i,n,r,o,a){o=u$_(o,!0),a=u$_(a,!0);var s=t.layer._context;if(e$2b(e)){u=e.shaderProgram.fragmentShaderSource.clone(),c=e.shaderProgram.vertexShaderSource.clone();e$2b(u.name)||(u.name="fpCustomName"+t.layer.id),e$2b(c.name)||(c.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x4bcc34(c,e),n&&_0x4bcc34(u,e)}));h=e.shaderProgram._attributeLocations;a&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());var l=r$13.fromCache({context:s,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h});o&&(this._sp=l),e.shaderProgram=l,e$2b(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x442f63(s,e.shaderProgram))}else if(o&&e$2b(this._sp)){var u=this._sp.fragmentShaderSource.clone(),c=this._sp.vertexShaderSource.clone();e$2b(u.name)||(u.name="fpCustomName"+t.layer.id),e$2b(c.name)||(c.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x4bcc34(c,e),n&&_0x4bcc34(u,e)}));var h=this._attributeLocations;this._sp.destroy(),this._sp=r$13.fromCache({context:s,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h})}},_0x30a010.prototype.removeProgramDefine=function(e,t,i,n){this.removeProgramDefineForCommand(this._colorCommand,e,t,i,n),e$2b(this._regularEdgeCommand)&&this.removeProgramDefineForCommand(this._regularEdgeCommand,e,t,i,n,!1),e$2b(this._silhouetteEdgeCommand)&&this.removeProgramDefineForCommand(this._silhouetteEdgeCommand,e,t,i,n,!1),e$2b(this._wireFrameCommands.quad)&&this.removeProgramDefineForCommand(this._wireFrameCommands.quad,e,!1,!0,n,!1),e$2b(this._wireFrameCommands.triangle)&&this.removeProgramDefineForCommand(this._wireFrameCommands.triangle,e,!1,!0,n,!1)},_0x30a010.prototype.removeProgramDefineForCommand=function(e,t,i,n,r,o){if(o=u$_(o,!0),e$2b(e)){s=t.layer._context,l=e.shaderProgram.fragmentShaderSource.clone(),u=e.shaderProgram.vertexShaderSource.clone();e$2b(l.name)||(l.name="fpCustomName"+t.layer.id),e$2b(u.name)||(u.name="vpCustomName"+t.layer.id),i&&_0x1ad78b(u,r),n&&_0x1ad78b(l,r);c=e.shaderProgram._attributeLocations;e.shaderProgram.destroy();var a=r$13.fromCache({context:s,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c});e.shaderProgram=a,o&&(this._sp=a),e$2b(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x442f63(s,e.shaderProgram))}else if(o&&e$2b(this._sp)){var s=t.layer._context,l=this._sp.fragmentShaderSource.clone(),u=this._sp.vertexShaderSource.clone();e$2b(l.name)||(l.name="fpCustomName"+t.layer.id),e$2b(u.name)||(u.name="vpCustomName"+t.layer.id),i&&_0x1ad78b(u,r),n&&_0x1ad78b(l,r);var c=this._attributeLocations;this._sp.destroy(),this._sp=r$13.fromCache({context:s,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c})}},_0x30a010.prototype.removeProgramDefinesForCommand=function(e,t,i,n,r,o){var a=t.layer._context;if(o=u$_(o,!0),e$2b(e)){l=e.shaderProgram.fragmentShaderSource.clone(),u=e.shaderProgram.vertexShaderSource.clone();e$2b(l.name)||(l.name="fpCustomName"+t.layer.id),e$2b(u.name)||(u.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x1ad78b(u,e),n&&_0x1ad78b(l,e)}));c=e.shaderProgram._attributeLocations;e.shaderProgram.destroy();var s=r$13.fromCache({context:a,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c});e.shaderProgram=s,o&&(this._sp=s),e$2b(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x442f63(a,e.shaderProgram))}else if(o&&e$2b(this._sp)){var l=this._sp.fragmentShaderSource.clone(),u=this._sp.vertexShaderSource.clone();e$2b(l.name)||(l.name="fpCustomName"+t.layer.id),e$2b(u.name)||(u.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x1ad78b(u,e),n&&_0x1ad78b(l,e)}));var c=this._attributeLocations;this._sp.destroy(),this._sp=r$13.fromCache({context:a,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c})}},_0x30a010.prototype.lightSourceChanged=function(e){if(e$2b(this._colorCommand)){var t=e.changedList,i=this._layer._scene._lightSource;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n],o=r.type,a=r.count;switch(o){case _0x1d9df9.DIRECTIONAL:i.directionalLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_DIR_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_DIR_LIGHTS);break;case _0x1d9df9.POINT:i.pointLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_POINT_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_POINT_LIGHTS);break;case _0x1d9df9.SPOT:i.spotLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_SPOT_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_SPOT_LIGHTS);break;case _0x1d9df9.HEMISPHERE:i.hemisphereLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_HEMISPHERE_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_HEMISPHERE_LIGHTS)}}}},_0x30a010.prototype.enableCategoryVisible=function(e){this.appendProgramDefine(e,!0,!1,Y$H.W_VISIBLE)},_0x30a010.prototype.isDestroyed=function(){return!1},_0x30a010.prototype.destroyScaleImagerys=function(){if(e$2b(this._scaleImagerys)){for(var e=0;e0){if(e$2b(this._colorCommand)){var c=this._colorCommand;c.vertexArray=c.vertexArray&&!c.vertexArray.isDestroyed()&&c.vertexArray.destroy(),c.shaderProgram=c.shaderProgram&&!c.shaderProgram.isDestroyed()&&c.shaderProgram.destroy(),c.renderState=void 0,c.uniformMap=void 0,this._colorCommand=void 0}}else _0x55e46c(a,this._colorCommand),this._colorCommand=void 0,this._wireFrameCommands.triangle&&_0x55e46c(a,this._wireFrameCommands.triangle),this._wireFrameCommands.quad&&_0x55e46c(this._wireFrameCommands.quad),this._wireFrameCommands={},_0x55e46c(a,this._pickCommand),this._pickCommand=void 0,this._stencilCommand=void 0,_0x55e46c(a,this._selectedStencilCommand),this._selectedStencilCommand=void 0,_0x55e46c(a,this._selectedColorCommand),this._selectedColorCommand=void 0,_0x55e46c(a,this._normalAndDepthCommand),this._normalAndDepthCommand=void 0,_0x55e46c(a,this._postEffectCommand),this._postEffectCommand=void 0,_0x55e46c(a,this._pickRectCommand),this._pickRectCommand=void 0,_0x55e46c(a,this._clipCommand),this._clipCommand=void 0,_0x55e46c(a,this._regularEdgeCommand),this._regularEdgeCommand=void 0,_0x55e46c(a,this._silhouetteEdgeCommand),this._silhouetteEdgeCommand=void 0;if(this._clampColorCommand=void 0,this._clipStencilCommand=void 0,e$2b(this._selectionInforMap)&&this._selectionInforMap.removeAll(),this._vertexPackage=void 0,this._vertexColor=void 0,this._texCoord1=void 0,this._vertexColorInstance=void 0,this._arrIndexPackage=void 0,e$2b(this._volObj)&&(this._volObj=void 0),e$2b(this._volTexture)&&(this._volTexture=void 0),e$2b(this._symbolTextureUrl)&&_0x4dad4e.removeTexture(this._symbolTextureUrl),this._waterIndex,this.s3mbuffer&&(this.s3mbuffer=null),e$2b(this._batchTable)&&(this._batchTable=this._batchTable.destroy()),e$2b(this._imagerys)){for(var h=this._imagerys,d=(i=0,h.length);i0&&(this._labelIndexs={}),e$2b(this._layer._layerScheduler._indexedDBScheduler)&&0!==this._pickIDArray.length&&0!==this._labelPosArray.length&&!(this._labelPosArray.length<=Object.keys(this._labelIndexs).length)){var t=this._layer,i=t._labelCollection,n=[],r=t._iconCollection,o=[],a=k$P.RELATIVE_TO_GROUND;if(t.showIcon){if(!e$2b(t.style3D)||!t.style3D.imageReady)return;a=t.style3D.altitudeMode,t._showLabel&&(_0x4751ff.y=-t.style3D.image.height/2,a=t._s3MTilesLabelStyle.heightReference)}t._s3MTilesLabelStyle._textField;for(var s=0;s0||e$2b(this._dayTextures)&&e.length>this._dayTextures.length||!e$2b(this._dayTextures)?this._refreshImageryShader():this._computeImageryParameter(this._layer)}else this._computeImageryParameter(this._layer)},_0x30a010.prototype.hasScaleImagerys=function(e){return e$2b(this._scaleImagerys[e-1])},_0x30a010.prototype.setScaleImagerys=function(e,t){!e$2b(e)||t<1||(this._scaleImagerys[t-1]=e)},_0x30a010.prototype.resetScaleImagerys=function(e,t){if(this._imageRasterFinish&&e$2b(this._sp)&&!this._context.webgpu){if(this._scaleImagerys.length>e){for(var i=e;ie){for(i=e;i0){if(this._visibleScaleImageryIndex=r,!e$2b(this._plusRoArray[r])){var s=this._layer,l=this._sp.fragmentShaderSource.clone();for(i=0;i0;){var p,_=d;p=0===(d-=_=Math.min(_,e$1T._maximumTextureImageUnits-2))?l:l.clone(),h>0&&p.defines.push("MULTIBATCH");var m=[],g=[],x=[],v=[],y=[],$=[],b=[],T=[],C=!1;e$2b(_0x382438)||(_0x382438=new h$18),_0x382438.west=this._cartographic.min.longitude,_0x382438.east=this._cartographic.max.longitude,_0x382438.north=this._cartographic.max.latitude,_0x382438.south=this._cartographic.min.latitude,this._imageryTextureBound.x=this._cartographic.max.longitude-this._cartographic.min.longitude,this._imageryTextureBound.y=this._cartographic.max.latitude-this._cartographic.min.latitude;for(i=0;i<_;i++){var S=a[f+i],w=S.imageryLayer,E=w._imageryProvider.tilingScheme.projection instanceof t$O&&_0x382438.north-t$O.MaximumLatitude;g.push(E);var P=E?S.textureWebMercator:S.texture;e$2b(P)||(P=s._context.defaultTransparentTexture),m.push(P);var A=u$_(w._imageryProvider.flipY,!1);b.push(A);var L=this._calculateTextureTranslationAndScale(_0x382438,S.rectangle,E,w._imageryProvider._tilingScheme),M=this._calculateTextureTexCoordsRectangle(_0x382438,S.rectangle,E,w._imageryProvider._tilingScheme);x.push(M),v.push(L);var R=new e$29;R.x=w.transparentBackColor.red,R.y=w.transparentBackColor.green,R.z=w.transparentBackColor.blue,R.w=w.transparentBackColorTolerance,y.push(R),$.push(w.enableImageryClip),T.push(w.alpha),C=C||w.alpha<.999}f+=_;var I="",O="";(D=!1)&&(O="APPLY_IMAGERY_CUTOUT");var D,B=[],N={mixIndex:!0,mixDirection:0},F="#ifdef IMAGERY\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\nvec4 color = initialColor;\n";F+="vec2 realTextureCoord;\nvec4 currentTextureColor;\n",(D=!1)&&(F+="vec4 cutoutAndColorResult;\nbool texelUnclipped;\n");for(i=0;i<_;++i){F+="realTextureCoord = computeTextureCoord(\n",F+="u_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTranslationAndScale["+i+"],\nu_dayTextureSize["+i+"],\nu_dayTextureFlipY["+i+"]);\ncurrentTextureColor = texture2D(u_dayTextures["+i+"], realTextureCoord);\n\n";var U=_0x229e5c(B,i);if(e$2b(U)){var z=i+1;z==_&&(z=i),F+="color = mvtTextureSampleAndBlend(\ncolor,\nu_dayTextures["+i+"],\nu_dayTextures["+z+"],\nu_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTexCoordsRectangle["+i+"],\nu_dayTextureTranslationAndScale["+i+"],\n"+converColorToVec4(U)+",\n"+(this._applyAlpha?"u_dayTextureAlpha["+i+"]":"1.0")+",\n0.0,\nvec4(0.0,0.0,0.0,0.0)\n);\n",i++}else F+=D?"cutoutAndColorResult = u_dayTextureCutoutRectangles["+i+"];\ntexelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\ncutoutAndColorResult = czm_sampleAndBlend(\n":i===N.mixIndex&&N.mixDirection>0?"color = sampleAndBlendParent(\n":"color = czm_sampleAndBlend(\n",F+="currentTextureColor,\ncolor,\nu_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTexCoordsRectangle["+i+"],\nu_transparentBackColor["+i+"],\nu_imageryClipEnable["+i+"],\n"+(this._applyAlpha?"u_dayTextureAlpha["+i+"]":"1.0")+",\n0.0,\n0.0,\n0.0,\n0.0,\n0.0,\nvec2(0.0,0.0),\nvec4(0.0,0.0,0.0,0.0)\n);\n",D&&(F+="color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(i=0;i<0;++i)F+="color = gridTextureSampleAndBlend(\ncolor,\nu_gridTextures["+i+"],\nu_gridTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_gridTextureTexCoordsRectangle["+i+"],\nu_gridTextureTranslationAndScale["+i+"]);\n";F+="return color;\n}\n#endif",p.sources.push(F);for(c=!1,i=0;i0||e$2b(this._dayTextures)&&this._imagerys.length>this._dayTextures.length||!e$2b(this._dayTextures)?this._refreshImageryShader():this._computeImageryParameter(this._layer)}}}};var _0x32c826=new o$1p,_0x548e53=new o$1p,_0x421c4d=new o$1p;_0x30a010.prototype.setRealtimeRasterCamera=function(e,t){var i=f$18.clone(t.context.uniformState._viewport);this._imageryTextureBound.x=e.max.longitude-e.min.longitude,this._imageryTextureBound.y=e.max.latitude-e.min.latitude;var n=e$2a.toDegrees(e.min.longitude),r=e$2a.toDegrees(e.max.longitude),o=e$2a.toDegrees(e.max.latitude),a=e$2a.toDegrees(e.min.latitude),s=r-n,l=o-a,u=t.camera,c=u.frustum.clipPlane;1===t._fboState.frameBufferType&&u.disableReflection(),o$1p.clone(u.position,_0x32c826),o$1p.clone(u.direction,_0x548e53),o$1p.clone(u.up,_0x421c4d);var h=u._scene._mode;u._mode=C$13.SCENE3D,u._scene._mode=C$13.SCENE3D,u.setView({destination:new o$1p(.5*(n+r),.5*(o+a),50),orientation:{direction:new o$1p(0,0,-1),up:new o$1p(0,1,0)},convert:!1}),u._mode=h,u._scene._mode=h;var d=new a$V({width:s,aspectRatio:s/l,near:1,far:100});return t.context.uniformState.update(t),t.context.uniformState.updateFrustum(d),{position:_0x32c826,direction:_0x548e53,upDirection:_0x421c4d,viewport:i,waterPlane:c}},_0x30a010.prototype.resetCamera=function(e,t){var i=t.camera;1===t._fboState.frameBufferType&&e.waterPlane&&i.enableReflection(e.waterPlane),i.setView({destination:e.position,orientation:{direction:e.direction,up:e.upDirection},convert:!1}),t.context.uniformState.update(t),t.context.uniformState.updateFrustum(i.frustum),t.context.uniformState.viewport=e.viewport},_0x30a010.prototype.isImageryLoaded=function(e){for(var t=!0,i=this._imagerys.length,n=0;n0&&(this._imageRasterFinish=!0,this._computeImageryParameter(e))}else{this._imageryLevels.length!=this._imagerys.length&&(this._imageryLevels.length=this._imagerys.length);i=[];var r=[];for(n=0;n0&&this._computeImageryParameter(e,i,r)}},_0x30a010.prototype.convertToInstanceBillboardPoint=function(){const e=this._vertexPackage,t=e.vertexAttributes;for(var i=0;i0&&(r=this._dayTextures.length-n.length),this._dayTextures=[],this._dayTextureUseWebMercatorT=[],this._dayTextureTexCoordsRectangle=[],this._dayTextureTranslationAndScale=[],this._transparentBackColor=[],this._imageryClipEnable=[],this._dayTextureFlipY=[],this._dayTextureAlpha=[],this._applyAlpha=!1,e$2b(_0x382438)||(_0x382438=new h$18),_0x382438.west=this._cartographic.min.longitude,_0x382438.east=this._cartographic.max.longitude,_0x382438.north=this._cartographic.max.latitude,_0x382438.south=this._cartographic.min.latitude,this._imageryTextureBound.x=this._cartographic.max.longitude-this._cartographic.min.longitude,this._imageryTextureBound.y=this._cartographic.max.latitude-this._cartographic.min.latitude;for(var o=0;o-t$O.MaximumLatitude;this._dayTextureUseWebMercatorT.push(s);var l=s?n[o].textureWebMercator:n[o].texture;e$2b(l)||(l=e._context.defaultTransparentTexture),this._dayTextures.push(l);var u=u$_(a._imageryProvider.flipY,!1);this._dayTextureFlipY.push(u);var c,h=this._calculateTextureTranslationAndScale(_0x382438,n[o].rectangle,s,a._imageryProvider._tilingScheme);c=e$2b(i)?this._calculateTextureTexCoordsRectangle(_0x382438,i[o],s,a._imageryProvider._tilingScheme):this._calculateTextureTexCoordsRectangle(_0x382438,n[o].rectangle,s,a._imageryProvider._tilingScheme),this._dayTextureTexCoordsRectangle.push(c),this._dayTextureTranslationAndScale.push(h);var d=new e$29;d.x=a.transparentBackColor.red,d.y=a.transparentBackColor.green,d.z=a.transparentBackColor.blue,d.w=a.transparentBackColorTolerance,this._transparentBackColor.push(d),this._imageryClipEnable.push(a.enableImageryClip),this._dayTextureAlpha.push(a.alpha),this._applyAlpha=this._applyAlpha||a.alpha<.999}if(r>0)for(o=0;o0){this._computeImageryParameter(e);var i="",n="";(o=!1)&&(n="APPLY_IMAGERY_CUTOUT");var r=this._imagerys.length;r=Math.min(r,e$1T._maximumTextureImageUnits-2);var o,a=[],s={mixIndex:!0,mixDirection:0},l="#ifdef IMAGERY\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\n vec4 color = initialColor;\n";l+=" vec2 realTextureCoord;\n vec4 currentTextureColor;\n",(o=!1)&&(l+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(var u=0;u0?" color = sampleAndBlendParent(\n":" color = czm_sampleAndBlend(\n",l+=" currentTextureColor,\n color,\n u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+u+"],\n u_transparentBackColor["+u+"],\n u_imageryClipEnable["+u+"],\n "+(this._applyAlpha?"u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n vec2(0.0,0.0),\n vec4(0.0,0.0,0.0,0.0)\n );\n",o&&(l+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(u=0;u<0;++u)l+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+u+"],\n u_gridTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_gridTextureTexCoordsRectangle["+u+"],\n u_gridTextureTranslationAndScale["+u+"]);\n";if(l+=" return color;\n}\n#endif",this._context.webgpu){var c=" #ifdef IMAGERY\n fn computeDayColor(initialColor : vec4, textureCoordinates : vec3) -> vec4\n {\n var color : vec4 = initialColor;\n";c+=" var realTextureCoord : vec2;\n var currentTextureColor : vec4;\n",o&&(c+=" var cutoutAndColorResult : vec4;\n var texelUnclipped : bool;\n");for(u=0;u0?" color = sampleAndBlendParent(\n":" color = czm_sampleAndBlend(\n",c+=" currentTextureColor,\n color,\n select(textureCoordinates.xy, textureCoordinates.xz, vec2(bool(uniforms.u_dayTextureUseWebMercatorT["+u+"]))),\n uniforms.u_dayTextureTexCoordsRectangle["+u+"],\n uniforms.u_transparentBackColor["+u+"],\n bool(uniforms.u_imageryClipEnable["+u+"]),\n "+(this._applyAlpha?"uniforms.u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n vec2(0.0,0.0),\n vec4(0.0,0.0,0.0,0.0)\n );\n",o&&(c+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(u=0;u<0;++u)c+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+u+"],\n select(textureCoordinates.xy, textureCoordinates.xz, u_dayTextureUseWebMercatorT["+u+"]),\n u_gridTextureTexCoordsRectangle["+u+"],\n u_gridTextureTranslationAndScale["+u+"]);\n";c+=" return color;\n }\n #endif ",t.sources.unshift(c)}else t.sources.push(l);var f=!1;for(u=0;u65535?1:0,o.primitiveType=W$18.TRIANGLES,r=0===o.indexType?new Uint16Array(o.indicesCount):new Uint32Array(o.indicesCount);for(var a=0,s=0;s-1?_0x411977(t):e$2b(t.clampRegionEdge)?_0x521890(t):e>=d$15.ClampGroundPolygon&&e<=d$15.ClampObjectLine?_0x3dd1f0(t):e==d$15.ClampGroundAndObjectLineCache?_0x521890(t):_0xcdfc90(t)},_0x58bcd6.calcBoundingSphere=function(e,t,i){var n,r=e._fileType;return n=t.instanceIndex>-1?_0x411977(t):e$2b(t.clampRegionEdge)?_0x521890(t):r>=d$15.ClampGroundPolygon&&r<=d$15.ClampObjectLine?_0x3dd1f0(t):r==d$15.ClampGroundAndObjectLineCache?_0x521890(t):_0xcdfc90(t),i$1c.transform(n,i,n),n},_0x58bcd6.calcBoundingRectangle=function(e,t){var i;return e._fileType===d$15.ClampGroundPolygon&&(i=_0x2ce8f9(t)),i},_0x58bcd6.createEdge=function(e,t){if(!(t.length<1)){var i=_0x303916(t);if(0!=i.length){var n,r=_0xeac62e(i),o=e.attrLocation.aPosition,a=e.vertexAttributes[o],s=e$2b(e.nCompressOptions)&&(e.nCompressOptions&_0x35ed09.SVC_Vertex)===_0x35ed09.SVC_Vertex,l=a.componentsPerAttribute;s?(l=3,n=_0x11c789(e,a)):n=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var u=_0x47246a(i),c=_0x3fd992(n,l,i),h=4*u-4*r,d=new Float32Array(3*h),f=new Float32Array(3*h),p=new Float32Array(3*h),_=new Int8Array(2*h),m=0,g=0;g=1&&(C=c[g][v-1]),0!=v&&(f[$-6]=C.x,f[$-5]=C.y,f[$-4]=C.z,f[$-3]=C.x,f[$-2]=C.y,f[$-1]=C.z),v!=x-1&&(f[$]=C.x,f[$+1]=C.y,f[$+2]=C.z,f[$+3]=C.x,f[$+4]=C.y,f[$+5]=C.z),$=2*y+8*v,0!=v&&(_[$-4]=-1,_[$-3]=-1,_[$-2]=1,_[$-1]=-1),v!=x-1&&(_[$]=-1,_[$+1]=1,_[$+2]=1,_[$+3]=1)}m+=c[g].length}var S={vertexAttributes:[],attrLocation:{}},w=S.vertexAttributes,E=S.attrLocation;S.instanceCount=0,S.instanceMode=0,E.aPosition=0,w.push({index:E.aPosition,typedArray:d,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),E.aNormal=1,w.push({index:E.aNormal,typedArray:f,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),E.aTexCoord0=2,w.push({index:E.aTexCoord0,typedArray:p,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),E.aTexCoord1=3,w.push({index:E.aTexCoord1,typedArray:_,componentsPerAttribute:2,componentDatatype:S$12.BYTE,offsetInBytes:0,strideInBytes:2*Int8Array.BYTES_PER_ELEMENT,normalize:!1});for(var P=[],A=0;A=u&&e=n);)++r;if(r-t>16&&e.subarray&&O$F)return O$F.decode(e.subarray(t,r));for(var o="";t>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},a=function(e,t){return e?o(X$P,e,t):""},s=function(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+3>=o)break;t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r},l=function(e,t,i){return s(e,X$P,t,i)},u=function(e,t){W$T.set(e,t)},c=function(e,t){return e%t>0&&(e+=t-e%t),e},h=function(){n$J.HEAP8=W$T=new Int8Array(c$S),n$J.HEAP16=new Int16Array(c$S),n$J.HEAP32=x$Y=new Int32Array(c$S),n$J.HEAPU8=X$P=new Uint8Array(c$S),n$J.HEAPU16=new Uint16Array(c$S),n$J.HEAPU32=new Uint32Array(c$S),n$J.HEAPF32=new Float32Array(c$S),n$J.HEAPF64=new Float64Array(c$S)},d=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?n$J.dynCall_v(i):n$J.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},f=function(){if(n$J.preRun)for("function"==typeof n$J.preRun&&(n$J.preRun=[n$J.preRun]);n$J.preRun.length;)g(n$J.preRun.shift());d(N$M)},p=function(){nn$3||(nn$3=!0,d(Qn))},_=function(){d(Zn)},m=function(){if(n$J.postRun)for("function"==typeof n$J.postRun&&(n$J.postRun=[n$J.postRun]);n$J.postRun.length;)x(n$J.postRun.shift());d(M$U)},g=function(e){N$M.unshift(e)},x=function(e){M$U.unshift(e)},v=function(e){b$15++,n$J.monitorRunDependencies&&n$J.monitorRunDependencies(b$15)},y=function(e){if(b$15--,n$J.monitorRunDependencies&&n$J.monitorRunDependencies(b$15),0==b$15&&(null!==J$N&&(clearInterval(J$N),J$N=null),R$O)){var t=R$O;R$O=null,t()}},$=function(e){return String.prototype.startsWith?e.startsWith(rn$4):0===e.indexOf(rn$4)},b=function(){try{if(n$J.wasmBinary)return new Uint8Array(n$J.wasmBinary);if(n$J.readBinary)return n$J.readBinary(m$R);throw"both async and sync fetching of the wasm failed"}catch(e){R(e)}},T=function(){return n$J.wasmBinary||!_$N&&!h$S||"function"!=typeof fetch?new Promise((function(e,t){e(b())})):fetch(m$R,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+m$R+"'";return e.arrayBuffer()})).catch((function(){return b()}))},C=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Bn$1};function i(e,t){var i=e.exports;n$J.asm=i,y()}function n(e){i(e.instance)}function r(e){return T().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(v(),n$J.instantiateWasm)try{return n$J.instantiateWasm(t,i)}catch{return!1}return function(){if(n$J.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||$(m$R)||"function"!=typeof fetch)return r(n);fetch(m$R,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(n,(function(e){r(n)}))}))}(),{}},S=function(){return W$T.length},w=function(e){return n$J.___errno_location&&(x$Y[n$J.___errno_location()>>2]=e),e},E=function(e){R("OOM")},P=function(e){e=c(e,65536);var t=c$S.byteLength;try{return-1!==P$Q.grow((e-t)/65536)&&(c$S=P$Q.buffer,!0)}catch{return!1}},A=function(e){var t=S(),i=65536,n=2147418112;if(e>n)return!1;for(var r=Math.max(t,16777216);r0||(f(),b$15>0)||n$J.calledRun||(n$J.setStatus?(n$J.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n$J.setStatus("")}),1),t()}),1)):t())},R=function(e){n$J.onAbort&&n$J.onAbort(e),e=void 0!==e?'"'+e+'"':"",d$12=!0};var n$J=typeof n$J<"u"?n$J:{},A$10={},l$X;for(l$X in n$J)n$J.hasOwnProperty(l$X)&&(A$10[l$X]=n$J[l$X]);n$J.arguments=[],n$J.thisProgram="./this.program",n$J.quit=function(e,t){throw t},n$J.preRun=[],n$J.postRun=[];var _$N=!1,h$S=!1,L$Y=!1,D$T=!1,V$K=!1;_$N="object"==typeof window,h$S="function"==typeof importScripts,D$T="object"==typeof process&&"function"==typeof require,L$Y=D$T&&!_$N&&!h$S,V$K=!_$N&&!L$Y&&!h$S;var v$H="",H$V,U$U;if(L$Y)v$H=__dirname+"/",n$J.read=function(e,t){var i;return H$V||(H$V=require("fs")),U$U||(U$U=require("path")),e=U$U.normalize(e),i=H$V.readFileSync(e),t?i:i.toString()},n$J.readBinary=function(e){var i=n$J.read(e,!0);return i.buffer||(i=new Uint8Array(i)),t(i.buffer),i},process.argv.length>1&&(n$J.thisProgram=process.argv[1].replace(/\\/g,"/")),n$J.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=n$J),process.on("uncaughtException",(function(e){if(!(e instanceof L))throw e})),process.on("unhandledRejection",R),n$J.quit=function(e){process.exit(e)},n$J.inspect=function(){return"[Emscripten Module object]"};else V$K?(typeof read<"u"&&(n$J.read=function(e){return read(e)}),n$J.readBinary=function(e){var i;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(i=read(e,"binary"),t("object"==typeof i),i)},typeof scriptArgs<"u"?n$J.arguments=scriptArgs:typeof arguments<"u"&&(n$J.arguments=arguments),"function"==typeof quit&&(n$J.quit=function(e){quit(e)})):(_$N||h$S)&&(h$S?v$H=self.location.href:document.currentScript&&(v$H=document.currentScript.src),v$H=0!==v$H.indexOf("blob:")?v$H.substr(0,v$H.lastIndexOf("/")+1):"",n$J.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h$S&&(n$J.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),n$J.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},n$J.setWindowTitle=function(e){document.title=e});var Sn$1=n$J.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),Gn=n$J.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||Sn$1);for(l$X in A$10)A$10.hasOwnProperty(l$X)&&(n$J[l$X]=A$10[l$X]);A$10=void 0;var Bn$1={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var P$Q,d$12=!1,O$F=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Ln$1=65536,c$S,W$T,X$P,x$Y,Jn=5246e3,E$U=3088,I$13=5242880,S$M=n$J.TOTAL_MEMORY||16777216;S$M>2]=Jn;var N$M=[],Qn=[],Zn=[],M$U=[],nn$3=!1,b$15=0,J$N=null,R$O=null;n$J.preloadedImages={},n$J.preloadedAudios={};var rn$4="data:application/octet-stream;base64,",m$R,$n=typeof window>"u"?self:window;m$R=$n.location.href.endsWith(".openrealspace")?"../../static/Build/SuperMap3D/ThirdParty/Module.wasm":"ThirdParty/Module.wasm",$(m$R)||(m$R=e(m$R)),n$J.asm=function(e,t,i){return t.memory=P$Q,t.table=new WebAssembly.Table({initial:23,maximum:23,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0,C(t)};var Yn={},kn={b:R,c:w,f:S,e:A,d:E,a:E$U},tn$4=n$J.asm(Yn,kn,c$S);n$J.asm=tn$4,n$J.___errno_location=function(){return n$J.asm.g.apply(null,arguments)},n$J._floatToTextureColor=function(){return n$J.asm.h.apply(null,arguments)},n$J._free=function(){return n$J.asm.i.apply(null,arguments)},n$J._free_result=function(){return n$J.asm.j.apply(null,arguments)},n$J._malloc=function(){return n$J.asm.k.apply(null,arguments)};var en$4=n$J.stackAlloc=function(){return n$J.asm.n.apply(null,arguments)},Fn=n$J.stackRestore=function(){return n$J.asm.o.apply(null,arguments)},Kn=n$J.stackSave=function(){return n$J.asm.p.apply(null,arguments)};if(n$J.dynCall_v=function(){return n$J.asm.l.apply(null,arguments)},n$J.dynCall_vi=function(){return n$J.asm.m.apply(null,arguments)},n$J.asm=tn$4,n$J.cwrap=r,L.prototype=new Error,L.prototype.constructor=L,R$O=function e(){n$J.calledRun||M(),n$J.calledRun||(R$O=e)},n$J.run=M,n$J.abort=R,n$J.preInit)for("function"==typeof n$J.preInit&&(n$J.preInit=[n$J.preInit]);n$J.preInit.length>0;)n$J.preInit.pop()();n$J.noExitRuntime=!0,M()}else var n$J=null;var _0x1c5342=n$J;function I$12(){t$16.throwInstantiationError()}Object.defineProperties(I$12.prototype,{errorEvent:{get:t$16.throwInstantiationError},credit:{get:t$16.throwInstantiationError},tilingScheme:{get:t$16.throwInstantiationError},ready:{get:t$16.throwInstantiationError},readyPromise:{get:t$16.throwInstantiationError},hasWaterMask:{get:t$16.throwInstantiationError},hasVertexNormals:{get:t$16.throwInstantiationError},availability:{get:t$16.throwInstantiationError}});var A$$=[];I$12.getRegularGridIndices=function(e,t){if(e*t>=e$2a.FOUR_GIGABYTES)throw new t$16("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=A$$[e];e$2b(i)||(A$$[e]=i=[]);var n=i[t];return e$2b(n)||b$14(e,t,n=e*t=e$2a.FOUR_GIGABYTES)throw new t$16("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=A$$[e];e$2b(i)||(A$$[e]=i=[]);var n=i[t];return e$2b(n)||b$14(e,t,n=e*t=e$2a.FOUR_GIGABYTES)throw new t$16("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=U$T[e];e$2b(i)||(U$T[e]=i=[]);var n=i[t];if(!e$2b(n)){var r=I$12.getRegularGridIndices(e,t),o=O$E(e,t),a=o.westIndicesSouthToNorth,s=o.southIndicesEastToWest,l=o.eastIndicesNorthToSouth,u=o.northIndicesWestToEast;n=i[t]={indices:r,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:l,northIndicesWestToEast:u}}return n};var N$L=[];function O$E(e,t){var i,n=new Array(t),r=new Array(e),o=new Array(t),a=new Array(e);for(i=0;i=e$2a.FOUR_GIGABYTES)throw new t$16("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=N$L[e];e$2b(i)||(N$L[e]=i=[]);var n=i[t];if(!e$2b(n)){var r=e*t,o=(e-1)*(t-1)*6,a=2*e+2*t,s=r+a,l=3*(e+t-2),u=o+6*Math.max(0,a-4)+l,c=O$E(e,t),h=c.westIndicesSouthToNorth,d=c.southIndicesEastToWest,f=c.eastIndicesNorthToSouth,p=c.northIndicesWestToEast,_=ce$x.createTypedArray(s,u);b$14(e,t,_,0),I$12.addSkirtIndices(h,d,f,p,r,_,o+l),n=i[t]={indices:_,westIndicesSouthToNorth:h,southIndicesEastToWest:d,eastIndicesNorthToSouth:f,northIndicesWestToEast:p,indexCountWithoutSkirts:o}}return n},I$12.addSkirtIndices=function(e,t,i,n,r,o,a,s){var l=r;a=S$L(e,l,o,a,s),a=S$L(t,l+=e.length,o,a,s),a=S$L(i,l+=t.length,o,a,s),S$L(n,l+=i.length,o,a,s)},I$12.heightmapTerrainQuality=.25,I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,i){return 2*e.maximumRadius*Math.PI*I$12.heightmapTerrainQuality/(t*i)},I$12.prototype.requestTileGeometry=t$16.throwInstantiationError,I$12.prototype.getLevelMaximumGeometricError=t$16.throwInstantiationError,I$12.prototype.getTileDataAvailable=t$16.throwInstantiationError,I$12.prototype.loadTileDataAvailability=t$16.throwInstantiationError,l$W.handleError=function(e,t,i,n,r,o,a,s,l){var u=e;return e$2b(e)?(u.provider=t,u.message=n,u.x=r,u.y=o,u.level=a,u.retry=!1,u.error=l,++u.timesRetried):u=new l$W(t,n,r,o,a,0,l),i.numberOfListeners>0?i.raiseEvent(u):console.log('An error occurred in "'+t.constructor.name+'": '+f$R(n)),u.retry&&e$2b(s)&&s(),u},l$W.handleSuccess=function(e){e$2b(e)&&(e.timesRetried=-1)},t$I.prototype.execute=function(e){e.execute(this)};var Ve$i="uniform sampler2D u_texture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",je$f="attribute vec4 position;\nattribute float webMercatorT;\n\nuniform vec2 u_textureDimensions;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n v_textureCoordinates = vec2(position.x, webMercatorT);\n gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));\n}\n",e$1d={LEFT:-1,BOTTOM:-1,NONE:0,RIGHT:1,TOP:1},Xe$b=Object.freeze(e$1d);function o$S(e,t,i,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i,this.flipY=n,this.imageryLayer=void 0,this.morphingAlpha=void 0}function c$R(e){if(e=u$_(e,{}),this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._numberOfLevelZeroTilesX=u$_(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=u$_(e.numberOfLevelZeroTilesY,1),this._projection=u$_(e.projection,new t$O(this._ellipsoid)),e$2b(e.rectangleSouthwestInMeters)&&e$2b(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{var t=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new o$1o(-t,-t),this._rectangleNortheastInMeters=new o$1o(t,t)}var i=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new h$18(i.longitude,i.latitude,n.longitude,n.latitude),this._customDPI=e.customDPI,this._scaleDenominators=e.scaleDenominators,this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._orgin=u$_(e.orgin,void 0)}o$S.prototype.freeResources=function(){e$2b(this.readyImagery)&&this.readyImagery.releaseReference(),e$2b(this.loadingImagery)&&this.loadingImagery.releaseReference()},o$S.prototype.processStateMachine=function(e,t,i){var n=this.loadingImagery,r=n.imageryLayer;if(n.processStateMachine(t,!this.useWebMercatorT,i),n.state===wt$6.READY)return e$2b(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this),this.morphingBeginTime=performance.now(),!0;for(var o,a=n.parent;e$2b(a)&&(a.state!==wt$6.READY||!this.useWebMercatorT&&!e$2b(a.texture));)a.state!==wt$6.FAILED&&a.state!==wt$6.INVALID&&(o=o||a),a=a.parent;return this.readyImagery!==a&&(e$2b(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=a,e$2b(a)&&(a.addReference(),this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this))),(n.state===wt$6.FAILED||n.state===wt$6.INVALID)&&(e$2b(o)?(o.processStateMachine(t,!this.useWebMercatorT,i),!1):(n.imageryLayer&&!1===n.imageryLayer.enableUpsample&&(this.discard=!0),!0))},Object.defineProperties(c$R.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}},orgin:{get:function(){return this._orgin}}}),c$R.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<=r&&(p=r-1);var _=f/u|0;return _>=o&&(_=o-1),e$2b(i)?(i.x=p,i.y=_,i):new o$1o(p,_)}},c$R.prototype.calculateResolution=function(e){return new o$1o(.0254*this._scaleDenominators[e]/this._customDPI.x,.0254*this._scaleDenominators[e]/this._customDPI.y)};var _0x4bd0de=(_0x4f7455=!0,function(e,t){var i=_0x4f7455?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f7455=!1,i}),_0xec6068=_0x4bd0de(void 0,(function(){return _0xec6068.toString().search("(((.+)+)+)+$").toString().constructor(_0xec6068).search("(((.+)+)+)+$")})),_0x4f7455;_0xec6068();var _0x2293fb$1=1029,_0x240c69=2305,_0x262381=function(e,t,i){this.enable=e,this.mode=t,this.frontFace=i};_0x262381.disabled=new _0x262381(!1,_0x2293fb$1,_0x240c69),_0x262381.backCCW=new _0x262381(!0,_0x2293fb$1,_0x240c69);var _0x520722=(_0x18bbe3=!0,function(e,t){var i=_0x18bbe3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x18bbe3=!1,i}),_0x48c086=_0x520722(void 0,(function(){return _0x48c086.toString().search("(((.+)+)+)+$").toString().constructor(_0x48c086).search("(((.+)+)+)+$")})),_0x18bbe3;_0x48c086();var _0x4ae57f=519,_0x37eb97=function(e,t,i){this.func=e,this.mask=t,this.range=i};_0x37eb97.ReadOnly=!1,_0x37eb97.ReadWrite=!0,_0x37eb97.disabled=new _0x37eb97(_0x4ae57f,_0x37eb97.ReadOnly,[0,1]);var _0x42cf1d=(_0x1009a7=!0,function(e,t){var i=_0x1009a7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1009a7=!1,i}),_0xea05f3=_0x42cf1d(void 0,(function(){return _0xea05f3.toString().search("(((.+)+)+)+$").toString().constructor(_0xea05f3).search("(((.+)+)+)+$")})),_0x1009a7;_0xea05f3();var _0x177e0f=519,_0x34f1c8=7680,_0x411737=function(e,t,i,n,r,o){this.test=e,this.ref=t,this.mask=i,this.fail=n,this.depthFail=r,this.pass=o};_0x411737.disabled=new _0x411737({func:_0x177e0f,mask:0},0,0,_0x34f1c8,_0x34f1c8,_0x34f1c8);var _0x51fdc5=(_0x102ee4=!0,function(e,t){var i=_0x102ee4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x102ee4=!1,i}),_0x418042=_0x51fdc5(void 0,(function(){return _0x418042.toString().search("(((.+)+)+)+$").toString().constructor(_0x418042).search("(((.+)+)+)+$")})),_0x102ee4;function _0x320daa(e,t,i){if(e.realtime&&e$2b(i)&&e$2b(i.zoom)){var n=i.zoom;e$2b(i.drawFillPattern)&&(n=Math.floor(n+.5));var r=i.zoom-e.level,o=t*(ae$s/(e.targetTileSize*Math.pow(2,r)));o*=e.targetTileSize/512;var a=i.zoom-i.finestRenderLevel;return a>0&&(o*=Math.pow(2,a)),o}return t*(ae$s/e.targetTileSize)}_0x418042();var _0x4514a1=(_0x1c91ee=!0,function(e,t){var i=_0x1c91ee?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c91ee=!1,i}),_0x15a166=_0x4514a1(void 0,(function(){return _0x15a166.toString().search("(((.+)+)+)+$").toString().constructor(_0x15a166).search("(((.+)+)+)+$")})),_0x1c91ee;_0x15a166();var _0x1d95cd={circleUniforms:function(e,t){return{u_camera_to_center_distance:new _0x5ec44f.Uniform1f(e,t.u_camera_to_center_distance),u_scale_with_map:new _0x5ec44f.Uniform1i(e,t.u_scale_with_map),u_pitch_with_map:new _0x5ec44f.Uniform1i(e,t.u_pitch_with_map),u_extrude_scale:new _0x5ec44f.Uniform2f(e,t.u_extrude_scale),u_device_pixel_ratio:new _0x5ec44f.Uniform1f(e,t.u_device_pixel_ratio),u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix)}},circleUniformValues:function(e,t,i){var n,r;if(e.transform,"map"===i.paint.get("circle-pitch-alignment")){var o=_0x320daa(t,1);n=!0,r=[o,o]}else n=!1,r=_0x42c6bf(t);return{u_camera_to_center_distance:1,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:_0x56884f(t),u_pitch_with_map:+n,u_device_pixel_ratio:1,u_extrude_scale:r}},circleUniformMap:function(e,t,i){var n,r;if("map"===i.paint.get("circle-pitch-alignment")){var o=_0x320daa(t,1);n=!0,r=[o,o]}else n=!1,r=_0x42c6bf(t);var a={u_camera_to_center_distance:function(){return 1},u_scale_with_map:function(){return+("map"===i.paint.get("circle-pitch-scale"))},u_matrix:function(){return _0x56884f(t)},u_pitch_with_map:function(){return+n},u_device_pixel_ratio:function(){return 1},u_extrude_scale:function(){return r}};return a}},_0xca121a=new Float32Array(16);function _0x56884f(e){var t=e.viewProjection;return p$1d.toArray(t,_0xca121a)}function _0x42c6bf(e){return[2/e.tileSize,-2/e.tileSize]}var _0x4c4adc=(_0x14d72d=!0,function(e,t){var i=_0x14d72d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x14d72d=!1,i}),_0x1f7c5c=_0x4c4adc(void 0,(function(){return _0x1f7c5c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f7c5c).search("(((.+)+)+)+$")})),_0x14d72d;function _0x5521d4(e,t,i,n){if("translucent"===e.renderPass){var r=i.paint.get("circle-opacity"),o=i.paint.get("circle-stroke-width"),a=i.paint.get("circle-stroke-opacity"),s=void 0!==i.layout.get("circle-sort-key").constantOr(1);if(0!==r.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1)){e.context.gl;var l=e.depthModeForSublayer(0,_0x37eb97.ReadOnly),u=e.colorModeForRenderPass(),c=[],h=t.getBucket(i);if(h){var d=h.programConfigurations.get(i.id),f=e.useProgram("circle",d),p=f.program,_=h.layoutVertexBuffer,m=h.indexBuffer,g=_0x1d95cd.circleUniformValues(e,t,i),x=_0x1d95cd.circleUniformMap(e,t,i),v=f.cesiumProgram,y=d.binders;for(var $ in y){x=y[$].getUniformMap(x,i.paint.get($))}var b={programConfiguration:d,program:p,layoutVertexBuffer:_,indexBuffer:m,uniformValues:g};if(s)for(var T=0,C=h.segments.get();T>16,a>>16],u_pixel_coord_lower:[65535&o,65535&a]}}_0x103f64();var _0x3cc8e8=new e$29,_0x1ed825=new o$1o,_0xfb6e1f=new o$1o,_0x304efe=new o$1o;function _0x2898c9(e,t,i,n){n.drawFillPattern=!0;var r=1/_0x320daa(i,1,n);i.realtime&&(r*=2);var o=i.targetTileSize*i.x,a=i.targetTileSize*i.y;return e.u_image=function(){return n.image},e.u_texsize=function(){return _0x304efe.x=i.imageAtlasTexture.size[0],_0x304efe.y=i.imageAtlasTexture.size[1],_0x304efe},e.u_scale=function(){return _0x3cc8e8.x=1,_0x3cc8e8.y=r,_0x3cc8e8.z=t.fromScale,_0x3cc8e8.w=t.toScale,_0x3cc8e8},e.u_fade=function(){return t.t},e.u_pixel_coord_lower=function(){return _0x1ed825.x=65535&o,_0x1ed825.y=65535&a,_0x1ed825},e.u_pixel_coord_upper=function(){return _0xfb6e1f.x=o>>16,_0xfb6e1f.y=a>>16,_0xfb6e1f},e}var _0x25c2d5={fillUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix)}},fillPatternUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_image:new _0x5ec44f.Uniform1i(e,t.u_image),u_texsize:new _0x5ec44f.Uniform2f(e,t.u_texsize),u_pixel_coord_upper:new _0x5ec44f.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x5ec44f.Uniform2f(e,t.u_pixel_coord_lower),u_scale:new _0x5ec44f.Uniform4f(e,t.u_scale),u_fade:new _0x5ec44f.Uniform1f(e,t.u_fade)}},fillOutlineUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_world:new _0x5ec44f.Uniform2f(e,t.u_world)}},fillOutlinePatternUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_world:new _0x5ec44f.Uniform2f(e,t.u_world),u_image:new _0x5ec44f.Uniform1i(e,t.u_image),u_texsize:new _0x5ec44f.Uniform2f(e,t.u_texsize),u_pixel_coord_upper:new _0x5ec44f.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x5ec44f.Uniform2f(e,t.u_pixel_coord_lower),u_scale:new _0x5ec44f.Uniform4f(e,t.u_scale),u_fade:new _0x5ec44f.Uniform1f(e,t.u_fade)}},fillUniformValues:function(e){return{u_matrix:e}},fillPatternUniformValues:function(e,t,i,n,r){return extend$1(_0x25c2d5.fillUniformValues(e),_0x4f17e1(i,t,n,r))},fillOutlineUniformValues:function(e,t){return{u_matrix:e,u_world:t}},fillOutlinePatternUniformValues:function(e,t,i,n,r,o){return extend$1(_0x25c2d5.fillPatternUniformValues(e,t,i,n,o),{u_world:r})},fillUniformMap:function(e){var t={u_matrix:function(){return e}};return t},fillPatternUniformMap:function(e,t,i,n,r){var o=_0x25c2d5.fillUniformMap(e);return o=_0x2898c9(o,i,n,r)}},_0x557624=new o$1o;_0x25c2d5.fillOutlineUniformMap=function(e,t){var i={u_matrix:function(){return e},u_world:function(){return _0x557624.x=t[0],_0x557624.y=t[1],_0x557624}};return i},_0x25c2d5.fillOutlinePatternUniformMap=function(e,t,i,n,r,o){var a={};return(a=_0x25c2d5.fillPatternUniformMap(e,t,i,n,o)).u_world=function(){return _0x557624.x=r[0],_0x557624.y=r[1],_0x557624},a};var _0x4ff997=(_0x114502=!0,function(e,t){var i=_0x114502?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x114502=!1,i}),_0x3df0db=_0x4ff997(void 0,(function(){return _0x3df0db.toString().search("(((.+)+)+)+$").toString().constructor(_0x3df0db).search("(((.+)+)+)+$")})),_0x114502;_0x3df0db();var _0x5898e0=new Float32Array(16),_0x211ef8={};function _0x416937(e,t,i,n,r,o,a){var s,l,u,c,h=i.paint.get("fill-pattern"),d=h&&h.constantOr(1),f=i.getCrossfadeParameters(),p={};o?(l=d&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=W$18.LINES):(l=d?"fillPattern":"fill",s=W$18.TRIANGLES);var _=t.getBucket(i);if(_){var m=_.programConfigurations.get(i.id);d&&(t.imageAtlasTexture.bind(de$x.LINEAR,de$x.CLAMP_TO_EDGE),a.image=t.imageAtlasTexture.cesiumTexture,m.updatePatternPaintBuffers(f));var g=h.constantOr(null);if(g&&t.imageAtlas){var x=t.imageAtlas,v=x.patternPositions[g.to.toString()],y=x.patternPositions[g.from.toString()];v&&y&&m.setConstantPatternPositions(v,y)}var $=e.useProgram(l,m).cesiumProgram,b=t.viewProjection,T=p$1d.toArray(b,_0x5898e0);if(o){c=_.cesiumIndexBuffer2,u=_.segments2;var C=[t.tileSize,t.tileSize];p="fillOutlinePattern"===l&&d?_0x25c2d5.fillOutlinePatternUniformMap(T,e,f,t,C,a):_0x25c2d5.fillOutlineUniformMap(T,C)}else c=_.cesiumIndexBuffer,u=_.segments,p=d?_0x25c2d5.fillPatternUniformMap(T,e,f,t,a):_0x25c2d5.fillUniformMap(T);var S=$.allUniforms;p=m.getUniformMaps(S,i.paint,p);for(var w=m.getPaintVertexBuffers(),E=m.getAttributeLocation(),P=0,A=u.get();P0?(i[0]=2*(s*a+c*n+l*o-u*r)/h,i[1]=2*(l*a+c*r+u*n-s*o)/h,i[2]=2*(u*a+c*o+s*r-l*n)/h):(i[0]=2*(s*a+c*n+l*o-u*r),i[1]=2*(l*a+c*r+u*n-s*o),i[2]=2*(u*a+c*o+s*r-l*n)),_0xa0dbb0(e,t,i),e}function _0x87163b(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function _0x51d585(e,t){var i=t[0],n=t[1],r=t[2],o=t[4],a=t[5],s=t[6],l=t[8],u=t[9],c=t[10];return e[0]=Math.hypot(i,n,r),e[1]=Math.hypot(o,a,s),e[2]=Math.hypot(l,u,c),e}function _0x2a7876(e,t){var i=new _0x231ae3(3);_0x51d585(i,t);var n=1/i[0],r=1/i[1],o=1/i[2],a=t[0]*n,s=t[1]*r,l=t[2]*o,u=t[4]*n,c=t[5]*r,h=t[6]*o,d=t[8]*n,f=t[9]*r,p=t[10]*o,_=a+c+p,m=0;return _>0?(m=2*Math.sqrt(_+1),e[3]=.25*m,e[0]=(h-f)/m,e[1]=(d-l)/m,e[2]=(s-u)/m):a>c&&a>p?(m=2*Math.sqrt(1+a-c-p),e[3]=(h-f)/m,e[0]=.25*m,e[1]=(s+u)/m,e[2]=(d+l)/m):c>p?(m=2*Math.sqrt(1+c-a-p),e[3]=(d-l)/m,e[0]=(s+u)/m,e[1]=.25*m,e[2]=(h+f)/m):(m=2*Math.sqrt(1+p-a-c),e[3]=(s-u)/m,e[0]=(d+l)/m,e[1]=(h+f)/m,e[2]=.25*m),e}function _0x448f6d(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=t[3],l=r+r,u=o+o,c=a+a,h=r*l,d=r*u,f=r*c,p=o*u,_=o*c,m=a*c,g=s*l,x=s*u,v=s*c,y=n[0],$=n[1],b=n[2];return e[0]=(1-(p+m))*y,e[1]=(d+v)*y,e[2]=(f-x)*y,e[3]=0,e[4]=(d-v)*$,e[5]=(1-(h+m))*$,e[6]=(_+g)*$,e[7]=0,e[8]=(f+x)*b,e[9]=(_-g)*b,e[10]=(1-(h+p))*b,e[11]=0,e[12]=i[0],e[13]=i[1],e[14]=i[2],e[15]=1,e}function _0x45b3d6(e,t,i,n,r){var o=t[0],a=t[1],s=t[2],l=t[3],u=o+o,c=a+a,h=s+s,d=o*u,f=o*c,p=o*h,_=a*c,m=a*h,g=s*h,x=l*u,v=l*c,y=l*h,$=n[0],b=n[1],T=n[2],C=r[0],S=r[1],w=r[2],E=(1-(_+g))*$,P=(f+y)*$,A=(p-v)*$,L=(f-y)*b,M=(1-(d+g))*b,R=(m+x)*b,I=(p+v)*T,O=(m-x)*T,D=(1-(d+_))*T;return e[0]=E,e[1]=P,e[2]=A,e[3]=0,e[4]=L,e[5]=M,e[6]=R,e[7]=0,e[8]=I,e[9]=O,e[10]=D,e[11]=0,e[12]=i[0]+C-(E*C+L*S+I*w),e[13]=i[1]+S-(P*C+M*S+O*w),e[14]=i[2]+w-(A*C+R*S+D*w),e[15]=1,e}function _0x2bdeaa(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i+i,s=n+n,l=r+r,u=i*a,c=n*a,h=n*s,d=r*a,f=r*s,p=r*l,_=o*a,m=o*s,g=o*l;return e[0]=1-h-p,e[1]=c+g,e[2]=d-m,e[3]=0,e[4]=c-g,e[5]=1-u-p,e[6]=f+_,e[7]=0,e[8]=d+m,e[9]=f-_,e[10]=1-u-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x4bac52(e,t,i,n,r,o,a){var s=1/(i-t),l=1/(r-n),u=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(i+t)*s,e[9]=(r+n)*l,e[10]=(a+o)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*u,e[15]=0,e}function _0x515a4c(e,t,i,n,r){var o,a=1/Math.tan(t/2);return e[0]=a/i,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=r&&r!==1/0?(o=1/(n-r),e[10]=(r+n)*o,e[14]=2*r*n*o):(e[10]=-1,e[14]=-2*n),e}function _0x34ee10(e,t,i,n){var r=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(r+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(r-o)*u*.5,e[10]=n/(i-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*i/(i-n),e[15]=0,e}function _0x32dc5e(e,t,i,n,r,o,a){var s=1/(t-i),l=1/(n-r),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+i)*s,e[13]=(r+n)*l,e[14]=(a+o)*u,e[15]=1,e}function _0x5a5640(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p=t[0],_=t[1],m=t[2],g=n[0],x=n[1],v=n[2],y=i[0],$=i[1],b=i[2];return Math.abs(p-y)<_0xc01e75&&Math.abs(_-$)<_0xc01e75&&Math.abs(m-b)<_0xc01e75?_0x2ceaeb(e):(c=p-y,h=_-$,d=m-b,r=x*(d*=f=1/Math.hypot(c,h,d))-v*(h*=f),o=v*(c*=f)-g*d,a=g*h-x*c,(f=Math.hypot(r,o,a))?(r*=f=1/f,o*=f,a*=f):(r=0,o=0,a=0),s=h*a-d*o,l=d*r-c*a,u=c*o-h*r,(f=Math.hypot(s,l,u))?(s*=f=1/f,l*=f,u*=f):(s=0,l=0,u=0),e[0]=r,e[1]=s,e[2]=c,e[3]=0,e[4]=o,e[5]=l,e[6]=h,e[7]=0,e[8]=a,e[9]=u,e[10]=d,e[11]=0,e[12]=-(r*p+o*_+a*m),e[13]=-(s*p+l*_+u*m),e[14]=-(c*p+h*_+d*m),e[15]=1,e)}function _0x4d394c(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=n[0],l=n[1],u=n[2],c=r-i[0],h=o-i[1],d=a-i[2],f=c*c+h*h+d*d;f>0&&(c*=f=1/Math.sqrt(f),h*=f,d*=f);var p=l*d-u*h,_=u*c-s*d,m=s*h-l*c;return(f=p*p+_*_+m*m)>0&&(p*=f=1/Math.sqrt(f),_*=f,m*=f),e[0]=p,e[1]=_,e[2]=m,e[3]=0,e[4]=h*m-d*_,e[5]=d*p-c*m,e[6]=c*_-h*p,e[7]=0,e[8]=c,e[9]=h,e[10]=d,e[11]=0,e[12]=r,e[13]=o,e[14]=a,e[15]=1,e}function _0x5a0ac9(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function _0x340ab8(e){return Math.hypot(e[0],e[1],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function _0x284997(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e[8]=t[8]+i[8],e[9]=t[9]+i[9],e[10]=t[10]+i[10],e[11]=t[11]+i[11],e[12]=t[12]+i[12],e[13]=t[13]+i[13],e[14]=t[14]+i[14],e[15]=t[15]+i[15],e}function _0x16b534(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e[6]=t[6]-i[6],e[7]=t[7]-i[7],e[8]=t[8]-i[8],e[9]=t[9]-i[9],e[10]=t[10]-i[10],e[11]=t[11]-i[11],e[12]=t[12]-i[12],e[13]=t[13]-i[13],e[14]=t[14]-i[14],e[15]=t[15]-i[15],e}function _0x4b0b06(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12]*i,e[13]=t[13]*i,e[14]=t[14]*i,e[15]=t[15]*i,e}function _0xe00363(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e[6]=t[6]+i[6]*n,e[7]=t[7]+i[7]*n,e[8]=t[8]+i[8]*n,e[9]=t[9]+i[9]*n,e[10]=t[10]+i[10]*n,e[11]=t[11]+i[11]*n,e[12]=t[12]+i[12]*n,e[13]=t[13]+i[13]*n,e[14]=t[14]+i[14]*n,e[15]=t[15]+i[15]*n,e}function _0x1d7596(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function _0x1ade5e(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],p=e[12],_=e[13],m=e[14],g=e[15],x=t[0],v=t[1],y=t[2],$=t[3],b=t[4],T=t[5],C=t[6],S=t[7],w=t[8],E=t[9],P=t[10],A=t[11],L=t[12],M=t[13],R=t[14],I=t[15];return Math.abs(i-x)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(n-v)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(r-y)<=_0xc01e75*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(o-$)<=_0xc01e75*Math.max(1,Math.abs(o),Math.abs($))&&Math.abs(a-b)<=_0xc01e75*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(s-T)<=_0xc01e75*Math.max(1,Math.abs(s),Math.abs(T))&&Math.abs(l-C)<=_0xc01e75*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(u-S)<=_0xc01e75*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-w)<=_0xc01e75*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(h-E)<=_0xc01e75*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-P)<=_0xc01e75*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(f-A)<=_0xc01e75*Math.max(1,Math.abs(f),Math.abs(A))&&Math.abs(p-L)<=_0xc01e75*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(_-M)<=_0xc01e75*Math.max(1,Math.abs(_),Math.abs(M))&&Math.abs(m-R)<=_0xc01e75*Math.max(1,Math.abs(m),Math.abs(R))&&Math.abs(g-I)<=_0xc01e75*Math.max(1,Math.abs(g),Math.abs(I))}var _0x33b24d=_0x540a14,_0x486fa7=_0x16b534,_0x592e28=Object.freeze({create:_0x4da59c,clone:_0x332a4e,copy:_0x5e11ca,fromValues:_0x3bd695,set:_0x1b6182,identity:_0x2ceaeb,transpose:_0x2fb1ff,invert:_0x159c68,adjoint:_0x2ca8b1,determinant:_0x216639,multiply:_0x540a14,translate:_0x5d0268,scale:_0x31b0bd,rotate:_0x4fb60b,rotateX:_0x47d9ba,rotateY:_0x463ddd,rotateZ:_0x582c56,fromTranslation:_0x4408fe,fromScaling:_0x487d11,fromRotation:_0x28da76,fromXRotation:_0x5142a4,fromYRotation:_0x315d9a,fromZRotation:_0x5e87f3,fromRotationTranslation:_0xa0dbb0,fromQuat2:_0x302a4a,getTranslation:_0x87163b,getScaling:_0x51d585,getRotation:_0x2a7876,fromRotationTranslationScale:_0x448f6d,fromRotationTranslationScaleOrigin:_0x45b3d6,fromQuat:_0x2bdeaa,frustum:_0x4bac52,perspective:_0x515a4c,perspectiveFromFieldOfView:_0x34ee10,ortho:_0x32dc5e,lookAt:_0x5a5640,targetTo:_0x4d394c,str:_0x5a0ac9,frob:_0x340ab8,add:_0x284997,subtract:_0x16b534,multiplyScalar:_0x4b0b06,multiplyScalarAndAdd:_0xe00363,exactEquals:_0x1d7596,equals:_0x1ade5e,mul:_0x33b24d,sub:_0x486fa7});function _0x39d517(){var e=new _0x231ae3(3);return _0x231ae3!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function _0x590f48(e){var t=new _0x231ae3(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function _0x5e4419(e){var t=e[0],i=e[1],n=e[2];return Math.hypot(t,i,n)}function _0x49b8be(e,t,i){var n=new _0x231ae3(3);return n[0]=e,n[1]=t,n[2]=i,n}function _0x46ccc8(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function _0x2e712d(e,t,i,n){return e[0]=t,e[1]=i,e[2]=n,e}function _0x4005ca(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e}function _0x441e32(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e}function _0x291ad7(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e}function _0x388d73(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e}function _0x34fbd1(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function _0x161c47(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function _0x42bbdd(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e}function _0x1a8421(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e}function _0x4f19b6(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function _0x4877a0(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function _0x3b47c0(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e}function _0x232196(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return Math.hypot(i,n,r)}function _0x842d28(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return i*i+n*n+r*r}function _0x3c9e0b(e){var t=e[0],i=e[1],n=e[2];return t*t+i*i+n*n}function _0x17a9a3(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function _0x396f1a(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function _0x28db52(e,t){var i=t[0],n=t[1],r=t[2],o=i*i+n*n+r*r;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function _0x214b68(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function _0x42e946(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[0],s=i[1],l=i[2];return e[0]=r*l-o*s,e[1]=o*a-n*l,e[2]=n*s-r*a,e}function _0x323c4e(e,t,i,n){var r=t[0],o=t[1],a=t[2];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e[2]=a+n*(i[2]-a),e}function _0x4f1835(e,t,i,n,r,o){var a=o*o,s=a*(2*o-3)+1,l=a*(o-2)+o,u=a*(o-1),c=a*(3-2*o);return e[0]=t[0]*s+i[0]*l+n[0]*u+r[0]*c,e[1]=t[1]*s+i[1]*l+n[1]*u+r[1]*c,e[2]=t[2]*s+i[2]*l+n[2]*u+r[2]*c,e}function _0x32a4ff(e,t,i,n,r,o){var a=1-o,s=a*a,l=o*o,u=s*a,c=3*o*s,h=3*l*a,d=l*o;return e[0]=t[0]*u+i[0]*c+n[0]*h+r[0]*d,e[1]=t[1]*u+i[1]*c+n[1]*h+r[1]*d,e[2]=t[2]*u+i[2]*c+n[2]*h+r[2]*d,e}function _0x399383(e,t){t=t||1;var i=2*_0x4b99e7()*Math.PI,n=2*_0x4b99e7()-1,r=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(i)*r,e[1]=Math.sin(i)*r,e[2]=n*t,e}function _0x20855d(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,e[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,e[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,e[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,e}function _0x21ed6e(e,t,i){var n=t[0],r=t[1],o=t[2];return e[0]=n*i[0]+r*i[3]+o*i[6],e[1]=n*i[1]+r*i[4]+o*i[7],e[2]=n*i[2]+r*i[5]+o*i[8],e}function _0x656610(e,t,i){var n=i[0],r=i[1],o=i[2],a=i[3],s=t[0],l=t[1],u=t[2],c=r*u-o*l,h=o*s-n*u,d=n*l-r*s,f=r*d-o*h,p=o*c-n*d,_=n*h-r*c,m=2*a;return c*=m,h*=m,d*=m,f*=2,p*=2,_*=2,e[0]=s+c+f,e[1]=l+h+p,e[2]=u+d+_,e}function _0x7c45d9(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[0],o[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),o[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x5a1b85(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),o[1]=r[1],o[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x46dfd3(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),o[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),o[2]=r[2],e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x1881ac(e,t){var i=_0x49b8be(e[0],e[1],e[2]),n=_0x49b8be(t[0],t[1],t[2]);_0x28db52(i,i),_0x28db52(n,n);var r=_0x214b68(i,n);return r>1?0:r<-1?Math.PI:Math.acos(r)}function _0x3c943f(e){return e[0]=0,e[1]=0,e[2]=0,e}function _0x5f1128(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function _0x11dc45(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function _0x4256a9(e,t){var i=e[0],n=e[1],r=e[2],o=t[0],a=t[1],s=t[2];return Math.abs(i-o)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-a)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=_0xc01e75*Math.max(1,Math.abs(r),Math.abs(s))}var _0x179024=_0x441e32,_0x2fb97c=_0x291ad7,_0x28d740=_0x388d73,_0x4da22e=_0x232196,_0x57b33c=_0x842d28,_0x46a2ba=_0x5e4419,_0x44615c=_0x3c9e0b,_0x4a04fb=(_0x7ef683=_0x39d517(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=3),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a0&&(a=1/Math.sqrt(a)),e[0]=i*a,e[1]=n*a,e[2]=r*a,e[3]=o*a,e}function _0x2d53e7(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function _0x42ab80(e,t,i,n){var r=i[0]*n[1]-i[1]*n[0],o=i[0]*n[2]-i[2]*n[0],a=i[0]*n[3]-i[3]*n[0],s=i[1]*n[2]-i[2]*n[1],l=i[1]*n[3]-i[3]*n[1],u=i[2]*n[3]-i[3]*n[2],c=t[0],h=t[1],d=t[2],f=t[3];return e[0]=h*u-d*l+f*s,e[1]=-c*u+d*a-f*o,e[2]=c*l-h*a+f*r,e[3]=-c*s+h*o-d*r,e}function _0x456bb0(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=t[3];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e[2]=a+n*(i[2]-a),e[3]=s+n*(i[3]-s),e}function _0x284041(e,t){var i,n,r,o,a,s;t=t||1;do{a=(i=2*_0x4b99e7()-1)*i+(n=2*_0x4b99e7()-1)*n}while(a>=1);do{s=(r=2*_0x4b99e7()-1)*r+(o=2*_0x4b99e7()-1)*o}while(s>=1);var l=Math.sqrt((1-a)/s);return e[0]=t*i,e[1]=t*n,e[2]=t*r*l,e[3]=t*o*l,e}function _0x4b7997(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3];return e[0]=i[0]*n+i[4]*r+i[8]*o+i[12]*a,e[1]=i[1]*n+i[5]*r+i[9]*o+i[13]*a,e[2]=i[2]*n+i[6]*r+i[10]*o+i[14]*a,e[3]=i[3]*n+i[7]*r+i[11]*o+i[15]*a,e}function _0x44b8a6(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[0],s=i[1],l=i[2],u=i[3],c=u*n+s*o-l*r,h=u*r+l*n-a*o,d=u*o+a*r-s*n,f=-a*n-s*r-l*o;return e[0]=c*u+f*-a+h*-l-d*-s,e[1]=h*u+f*-s+d*-a-c*-l,e[2]=d*u+f*-l+c*-s-h*-a,e[3]=t[3],e}function _0x5a7692(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function _0x2363f5(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function _0x506f0e(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function _0x176d77(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t[2],u=t[3];return Math.abs(i-a)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-s)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-l)<=_0xc01e75*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-u)<=_0xc01e75*Math.max(1,Math.abs(o),Math.abs(u))}var _0x443b34=_0xcc6ccf,_0x4be58e=_0x337023,_0x4b58aa=_0x5497bb,_0x2ee395=_0x44f4c4,_0x36bf44=_0x3a7c24,_0xa3c345=_0x355918,_0x2716ff=_0x2d8fcd,_0x47f13a=(_0x3e6bcf=_0x3d5a5b(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=4),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a_0xc01e75?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),i}function _0x3df545(e,t){var i=_0x5dabf3(e,t);return Math.acos(2*i*i-1)}function _0x21b5ba(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*c+a*s+r*u-o*l,e[1]=r*c+a*l+o*s-n*u,e[2]=o*c+a*u+n*l-r*s,e[3]=a*c-n*s-r*l-o*u,e}function _0xb47592(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+a*s,e[1]=r*l+o*s,e[2]=o*l-r*s,e[3]=a*l-n*s,e}function _0x243781(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l-o*s,e[1]=r*l+a*s,e[2]=o*l+n*s,e[3]=a*l-r*s,e}function _0x3f16d1(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+r*s,e[1]=r*l-n*s,e[2]=o*l+a*s,e[3]=a*l-o*s,e}function _0x1a9dd5(e,t){var i=t[0],n=t[1],r=t[2];return e[0]=i,e[1]=n,e[2]=r,e[3]=Math.sqrt(Math.abs(1-i*i-n*n-r*r)),e}function _0x2935ba(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=Math.sqrt(i*i+n*n+r*r),s=Math.exp(o),l=a>0?s*Math.sin(a)/a:0;return e[0]=i*l,e[1]=n*l,e[2]=r*l,e[3]=s*Math.cos(a),e}function _0x4d94f8(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=Math.sqrt(i*i+n*n+r*r),s=a>0?Math.atan2(a,o)/a:0;return e[0]=i*s,e[1]=n*s,e[2]=r*s,e[3]=.5*Math.log(i*i+n*n+r*r+o*o),e}function _0x4dbcf0(e,t,i){return _0x4d94f8(e,t),_0x564690(e,e,i),_0x2935ba(e,e),e}function _0x266c71(e,t,i,n){var r,o,a,s,l,u=t[0],c=t[1],h=t[2],d=t[3],f=i[0],p=i[1],_=i[2],m=i[3];return(o=u*f+c*p+h*_+d*m)<0&&(o=-o,f=-f,p=-p,_=-_,m=-m),1-o>_0xc01e75?(r=Math.acos(o),a=Math.sin(r),s=Math.sin((1-n)*r)/a,l=Math.sin(n*r)/a):(s=1-n,l=n),e[0]=s*u+l*f,e[1]=s*c+l*p,e[2]=s*h+l*_,e[3]=s*d+l*m,e}function _0x21cce1(e){var t=_0x4b99e7(),i=_0x4b99e7(),n=_0x4b99e7(),r=Math.sqrt(1-t),o=Math.sqrt(t);return e[0]=r*Math.sin(2*Math.PI*i),e[1]=r*Math.cos(2*Math.PI*i),e[2]=o*Math.sin(2*Math.PI*n),e[3]=o*Math.cos(2*Math.PI*n),e}function _0x3b9887(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*i+n*n+r*r+o*o,s=a?1/a:0;return e[0]=-i*s,e[1]=-n*s,e[2]=-r*s,e[3]=o*s,e}function _0x36a101(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function _0x1adc6b(e,t){var i,n=t[0]+t[4]+t[8];if(n>0)i=Math.sqrt(n+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{var r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*a+a]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+a]-t[3*a+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[a]=(t[3*a+r]+t[3*r+a])*i}return e}function _0x44ac59(e,t,i,n){var r=.5*Math.PI/180;t*=r,i*=r,n*=r;var o=Math.sin(t),a=Math.cos(t),s=Math.sin(i),l=Math.cos(i),u=Math.sin(n),c=Math.cos(n);return e[0]=o*l*c-a*s*u,e[1]=a*s*c+o*l*u,e[2]=a*l*u-o*s*c,e[3]=a*l*c+o*s*u,e}function _0x47e77c(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var _0x4581ef=_0x42999f,_0x415651=_0x4eeea1,_0x4f9cee=_0x15e2f5,_0x49f4d2=_0x45f7a2,_0xf10fb0=_0x2946a7,_0x35a4d6=_0x21b5ba,_0x564690=_0x37039b,_0x5dabf3=_0x2d53e7,_0x24ed8b=_0x456bb0,_0x51fc74=_0x355918,_0x51f3fe=_0x51fc74,_0x3d25e0=_0x2d8fcd,_0x4494e9=_0x3d25e0,_0x2cf661=_0x5381ae,_0x12a023=_0x506f0e,_0x18337e=_0x176d77,_0x46e84e=(_0x44cfc1=_0x39d517(),_0x4a0189=_0x49b8be(1,0,0),_0x18689b=_0x49b8be(0,1,0),function(e,t,i){var n=_0x214b68(t,i);return n<-.999999?(_0x42e946(_0x44cfc1,_0x4a0189,t),_0x46a2ba(_0x44cfc1)<1e-6&&_0x42e946(_0x44cfc1,_0x18689b,t),_0x28db52(_0x44cfc1,_0x44cfc1),_0x379e00(e,_0x44cfc1,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(_0x42e946(_0x44cfc1,t,i),e[0]=_0x44cfc1[0],e[1]=_0x44cfc1[1],e[2]=_0x44cfc1[2],e[3]=1+n,_0x2cf661(e,e))}),_0x58e3e4=(_0x4268f2=_0x1aac4e(),_0x56500c=_0x1aac4e(),function(e,t,i,n,r,o){return _0x266c71(_0x4268f2,t,r,o),_0x266c71(_0x56500c,i,n,o),_0x266c71(e,_0x4268f2,_0x56500c,2*o*(1-o)),e}),_0x2d0d9b=(_0x490402=_0x3c9785(),function(e,t,i,n){return _0x490402[0]=i[0],_0x490402[3]=i[1],_0x490402[6]=i[2],_0x490402[1]=n[0],_0x490402[4]=n[1],_0x490402[7]=n[2],_0x490402[2]=-t[0],_0x490402[5]=-t[1],_0x490402[8]=-t[2],_0x2cf661(e,_0x1adc6b(e,_0x490402))}),_0x1e55e0=Object.freeze({create:_0x1aac4e,identity:_0x1f6702,setAxisAngle:_0x379e00,getAxisAngle:_0x5175c0,getAngle:_0x3df545,multiply:_0x21b5ba,rotateX:_0xb47592,rotateY:_0x243781,rotateZ:_0x3f16d1,calculateW:_0x1a9dd5,exp:_0x2935ba,ln:_0x4d94f8,pow:_0x4dbcf0,slerp:_0x266c71,random:_0x21cce1,invert:_0x3b9887,conjugate:_0x36a101,fromMat3:_0x1adc6b,fromEuler:_0x44ac59,str:_0x47e77c,clone:_0x4581ef,fromValues:_0x415651,copy:_0x4f9cee,set:_0x49f4d2,add:_0xf10fb0,mul:_0x35a4d6,scale:_0x564690,dot:_0x5dabf3,lerp:_0x24ed8b,length:_0x51fc74,len:_0x51f3fe,squaredLength:_0x3d25e0,sqrLen:_0x4494e9,normalize:_0x2cf661,exactEquals:_0x12a023,equals:_0x18337e,rotationTo:_0x46e84e,sqlerp:_0x58e3e4,setAxes:_0x2d0d9b}),_0x490402,_0x4268f2,_0x56500c,_0x44cfc1,_0x4a0189,_0x18689b;function _0x47dbf3(){var e=new _0x231ae3(8);return _0x231ae3!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0),e[3]=1,e}function _0x4cfd86(e){var t=new _0x231ae3(8);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function _0x2fccb4(e,t,i,n,r,o,a,s){var l=new _0x231ae3(8);return l[0]=e,l[1]=t,l[2]=i,l[3]=n,l[4]=r,l[5]=o,l[6]=a,l[7]=s,l}function _0x2984ed(e,t,i,n,r,o,a){var s=new _0x231ae3(8);s[0]=e,s[1]=t,s[2]=i,s[3]=n;var l=.5*r,u=.5*o,c=.5*a;return s[4]=l*n+u*i-c*t,s[5]=u*n+c*e-l*i,s[6]=c*n+l*t-u*e,s[7]=-l*e-u*t-c*i,s}function _0xbaf5f4(e,t,i){var n=.5*i[0],r=.5*i[1],o=.5*i[2],a=t[0],s=t[1],l=t[2],u=t[3];return e[0]=a,e[1]=s,e[2]=l,e[3]=u,e[4]=n*u+r*l-o*s,e[5]=r*u+o*a-n*l,e[6]=o*u+n*s-r*a,e[7]=-n*a-r*s-o*l,e}function _0xb9c811(e,t){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=.5*t[0],e[5]=.5*t[1],e[6]=.5*t[2],e[7]=0,e}function _0x3207da(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function _0x45533e(e,t){var i=_0x1aac4e();_0x2a7876(i,t);var n=new _0x231ae3(3);return _0x87163b(n,t),_0xbaf5f4(e,i,n),e}function _0x2661aa(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e}function _0x3cc4e8(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function _0x5998b5(e,t,i,n,r,o,a,s,l){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e}var _0x414822=_0x4f9cee;function _0x477b0d(e,t){return e[0]=t[4],e[1]=t[5],e[2]=t[6],e[3]=t[7],e}var _0x29b847=_0x4f9cee;function _0x2ce5d1(e,t){return e[4]=t[0],e[5]=t[1],e[6]=t[2],e[7]=t[3],e}function _0x30014f(e,t){var i=t[4],n=t[5],r=t[6],o=t[7],a=-t[0],s=-t[1],l=-t[2],u=t[3];return e[0]=2*(i*u+o*a+n*l-r*s),e[1]=2*(n*u+o*s+r*a-i*l),e[2]=2*(r*u+o*l+i*s-n*a),e}function _0x503c8f(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=.5*i[0],l=.5*i[1],u=.5*i[2],c=t[4],h=t[5],d=t[6],f=t[7];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=a*s+r*u-o*l+c,e[5]=a*l+o*s-n*u+h,e[6]=a*u+n*l-r*s+d,e[7]=-n*s-r*l-o*u+f,e}function _0x52910b(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0xb47592(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x22c6bd(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x243781(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x8a9558(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x3f16d1(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x27b98c(e,t,i){var n=i[0],r=i[1],o=i[2],a=i[3],s=t[0],l=t[1],u=t[2],c=t[3];return e[0]=s*a+c*n+l*o-u*r,e[1]=l*a+c*r+u*n-s*o,e[2]=u*a+c*o+s*r-l*n,e[3]=c*a-s*n-l*r-u*o,s=t[4],l=t[5],u=t[6],c=t[7],e[4]=s*a+c*n+l*o-u*r,e[5]=l*a+c*r+u*n-s*o,e[6]=u*a+c*o+s*r-l*n,e[7]=c*a-s*n-l*r-u*o,e}function _0x1cbd47(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*c+a*s+r*u-o*l,e[1]=r*c+a*l+o*s-n*u,e[2]=o*c+a*u+n*l-r*s,e[3]=a*c-n*s-r*l-o*u,s=i[4],l=i[5],u=i[6],c=i[7],e[4]=n*c+a*s+r*u-o*l,e[5]=r*c+a*l+o*s-n*u,e[6]=o*c+a*u+n*l-r*s,e[7]=a*c-n*s-r*l-o*u,e}function _0x15954a(e,t,i,n){if(Math.abs(n)<_0xc01e75)return _0x2661aa(e,t);var r=Math.hypot(i[0],i[1],i[2]);n*=.5;var o=Math.sin(n),a=o*i[0]/r,s=o*i[1]/r,l=o*i[2]/r,u=Math.cos(n),c=t[0],h=t[1],d=t[2],f=t[3];e[0]=c*u+f*a+h*l-d*s,e[1]=h*u+f*s+d*a-c*l,e[2]=d*u+f*l+c*s-h*a,e[3]=f*u-c*a-h*s-d*l;var p=t[4],_=t[5],m=t[6],g=t[7];return e[4]=p*u+g*a+_*l-m*s,e[5]=_*u+g*s+m*a-p*l,e[6]=m*u+g*l+p*s-_*a,e[7]=g*u-p*a-_*s-m*l,e}function _0x400ec5(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e}function _0x31251d(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[4],l=i[5],u=i[6],c=i[7],h=t[4],d=t[5],f=t[6],p=t[7],_=i[0],m=i[1],g=i[2],x=i[3];return e[0]=n*x+a*_+r*g-o*m,e[1]=r*x+a*m+o*_-n*g,e[2]=o*x+a*g+n*m-r*_,e[3]=a*x-n*_-r*m-o*g,e[4]=n*c+a*s+r*u-o*l+h*x+p*_+d*g-f*m,e[5]=r*c+a*l+o*s-n*u+d*x+p*m+f*_-h*g,e[6]=o*c+a*u+n*l-r*s+f*x+p*g+h*m-d*_,e[7]=a*c-n*s-r*l-o*u+p*x-h*_-d*m-f*g,e}var _0x21c8b9=_0x31251d;function _0x4ed1e8(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e}var _0x525c49=_0x5dabf3;function _0x37be4f(e,t,i,n){var r=1-n;return _0x525c49(t,i)<0&&(n=-n),e[0]=t[0]*r+i[0]*n,e[1]=t[1]*r+i[1]*n,e[2]=t[2]*r+i[2]*n,e[3]=t[3]*r+i[3]*n,e[4]=t[4]*r+i[4]*n,e[5]=t[5]*r+i[5]*n,e[6]=t[6]*r+i[6]*n,e[7]=t[7]*r+i[7]*n,e}function _0x34488a(e,t){var i=_0x24391b(t);return e[0]=-t[0]/i,e[1]=-t[1]/i,e[2]=-t[2]/i,e[3]=t[3]/i,e[4]=-t[4]/i,e[5]=-t[5]/i,e[6]=-t[6]/i,e[7]=t[7]/i,e}function _0x39cd01(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=t[7],e}var _0x40f711=_0x51fc74,_0xf76045=_0x40f711,_0x24391b=_0x3d25e0,_0x29c6ff=_0x24391b;function _0x3b5ac5(e,t){var i=_0x24391b(t);if(i>0){i=Math.sqrt(i);var n=t[0]/i,r=t[1]/i,o=t[2]/i,a=t[3]/i,s=t[4],l=t[5],u=t[6],c=t[7],h=n*s+r*l+o*u+a*c;e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=(s-n*h)/i,e[5]=(l-r*h)/i,e[6]=(u-o*h)/i,e[7]=(c-a*h)/i}return e}function _0x49d4f7(e){return"quat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+")"}function _0x503fdf(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]}function _0x517c6f(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=t[0],h=t[1],d=t[2],f=t[3],p=t[4],_=t[5],m=t[6],g=t[7];return Math.abs(i-c)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(n-h)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-d)<=_0xc01e75*Math.max(1,Math.abs(r),Math.abs(d))&&Math.abs(o-f)<=_0xc01e75*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(a-p)<=_0xc01e75*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(s-_)<=_0xc01e75*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(l-m)<=_0xc01e75*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(u-g)<=_0xc01e75*Math.max(1,Math.abs(u),Math.abs(g))}var _0x2d4367=Object.freeze({create:_0x47dbf3,clone:_0x4cfd86,fromValues:_0x2fccb4,fromRotationTranslationValues:_0x2984ed,fromRotationTranslation:_0xbaf5f4,fromTranslation:_0xb9c811,fromRotation:_0x3207da,fromMat4:_0x45533e,copy:_0x2661aa,identity:_0x3cc4e8,set:_0x5998b5,getReal:_0x414822,getDual:_0x477b0d,setReal:_0x29b847,setDual:_0x2ce5d1,getTranslation:_0x30014f,translate:_0x503c8f,rotateX:_0x52910b,rotateY:_0x22c6bd,rotateZ:_0x8a9558,rotateByQuatAppend:_0x27b98c,rotateByQuatPrepend:_0x1cbd47,rotateAroundAxis:_0x15954a,add:_0x400ec5,multiply:_0x31251d,mul:_0x21c8b9,scale:_0x4ed1e8,dot:_0x525c49,lerp:_0x37be4f,invert:_0x34488a,conjugate:_0x39cd01,length:_0x40f711,len:_0xf76045,squaredLength:_0x24391b,sqrLen:_0x29c6ff,normalize:_0x3b5ac5,str:_0x49d4f7,exactEquals:_0x503fdf,equals:_0x517c6f});function _0x3c677b(){var e=new _0x231ae3(2);return _0x231ae3!=Float32Array&&(e[0]=0,e[1]=0),e}function _0x103ffb(e){var t=new _0x231ae3(2);return t[0]=e[0],t[1]=e[1],t}function _0x57d0fc(e,t){var i=new _0x231ae3(2);return i[0]=e,i[1]=t,i}function _0x2cbcaf(e,t){return e[0]=t[0],e[1]=t[1],e}function _0xaa7ac4(e,t,i){return e[0]=t,e[1]=i,e}function _0x23052f(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e}function _0x1539d9(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e}function _0x374eda(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e}function _0x243af4(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e}function _0x39f00c(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function _0x3aca14(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function _0x587a65(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e}function _0xf96676(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e}function _0x758761(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function _0x41b222(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e}function _0x36a772(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e}function _0x92eb88(e,t){var i=t[0]-e[0],n=t[1]-e[1];return Math.hypot(i,n)}function _0x2f7460(e,t){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function _0x14b164(e){var t=e[0],i=e[1];return Math.hypot(t,i)}function _0x5a19ca(e){var t=e[0],i=e[1];return t*t+i*i}function _0x47a669(e,t){return e[0]=-t[0],e[1]=-t[1],e}function _0xcc4405(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function _0x391fd9(e,t){var i=t[0],n=t[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r)),e[0]=t[0]*r,e[1]=t[1]*r,e}function _0xb99314(e,t){return e[0]*t[0]+e[1]*t[1]}function _0x28a5e8(e,t,i){var n=t[0]*i[1]-t[1]*i[0];return e[0]=e[1]=0,e[2]=n,e}function _0x3458b7(e,t,i,n){var r=t[0],o=t[1];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e}function _0x20998b(e,t){t=t||1;var i=2*_0x4b99e7()*Math.PI;return e[0]=Math.cos(i)*t,e[1]=Math.sin(i)*t,e}function _0x5e7a35(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[2]*r,e[1]=i[1]*n+i[3]*r,e}function _0x4e6f5f(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[2]*r+i[4],e[1]=i[1]*n+i[3]*r+i[5],e}function _0x500d97(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[3]*r+i[6],e[1]=i[1]*n+i[4]*r+i[7],e}function _0x5cfa72(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[4]*r+i[12],e[1]=i[1]*n+i[5]*r+i[13],e}function _0x5c4fcf(e,t,i,n){var r=t[0]-i[0],o=t[1]-i[1],a=Math.sin(n),s=Math.cos(n);return e[0]=r*s-o*a+i[0],e[1]=r*a+o*s+i[1],e}function _0x3d3763(e,t){var i=e[0],n=e[1],r=t[0],o=t[1],a=i*i+n*n;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var l=(i*r+n*o)*a*s;return l>1?0:l<-1?Math.PI:Math.acos(l)}function _0x354f0f(e){return e[0]=0,e[1]=0,e}function _0x12425a(e){return"vec2("+e[0]+", "+e[1]+")"}function _0x244307(e,t){return e[0]===t[0]&&e[1]===t[1]}function _0x215e50(e,t){var i=e[0],n=e[1],r=t[0],o=t[1];return Math.abs(i-r)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(r))&&Math.abs(n-o)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(o))}var _0x477058=_0x14b164,_0x1135f4=_0x1539d9,_0xaa8548=_0x374eda,_0x558244=_0x243af4,_0x1d12ff=_0x92eb88,_0x3e0d72=_0x2f7460,_0x1b1a4b=_0x5a19ca,_0x293cda=(_0x2f261e=_0x3c677b(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=2),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a=-t[0]&&i<=t[0]&&n>=-t[1]&&n<=t[1]}function _0x49b612(e,t,i,n,r,o,a,s){const l=n?e.textSizeData:e.iconSizeData,u=_0x31524b(l,i.transform.zoom),c=[256/i.width*2+1,256/i.height*2+1],h=n?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();const d=e.lineVertexArray,f=n?e.text.placedSymbolArray:e.icon.placedSymbolArray,p=i.transform.width/i.transform.height;let _=!1;for(let n=0;nMath.abs(i.x-t.x)*n)return{useVertical:!0}}return(e===_0x38221e.vertical?t.yi.x)?{needsFlipping:!0}:null}function _0x3f6d91(e,t,i,n,r,o,a,s,l,u,c,h,d,f){const p=t/24,_=e.lineOffsetX*p,m=e.lineOffsetY*p;let g;if(e.numGlyphs>1){const t=e.glyphStartIndex+e.numGlyphs,r=e.lineStartIndex,u=e.lineStartIndex+e.lineLength,x=_0x3f75b6(p,s,_,m,i,c,h,e,l,o,d,!1);if(!x)return{notEnoughRoom:!0};const v=_0x45c927(x.first.point,a).point,y=_0x45c927(x.last.point,a).point;n&&!i&&_0x39483b(e.writingMode,v,y,f),g=[x.first];for(let n=e.glyphStartIndex+1;n0?o.point:_0x154b2f(h,n,t,1,r),s=_0x39483b(e.writingMode,t,a,f);if(s)return s}const t=_0x4fc09e(p*s.getoffsetX(e.glyphStartIndex),_,m,i,c,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,l,o,d,!1);if(!t)return{notEnoughRoom:!0};g=[t]}for(const e of g){_0x4cf153(u,_0x45c927(e.point,a).point,e.angle)}return{}}function _0x154b2f(e,t,i,n,r){const o=_0x45c927(e.add(e.sub(t)._unit()),r).point,a=i.sub(o);return i.add(a._mult(n/a.mag()))}function _0x4fc09e(e,t,i,n,r,o,a,s,l,u,c,h,d){const f=n?e-t:e+t;let p=f>0?1:-1,_=0;n&&(p*=-1,_=Math.PI),p<0&&(_+=Math.PI);let m=p>0?s+a:s+a+1;const g=m;let x=r,v=r,y=0,$=0;const b=Math.abs(f);for(;y+$<=b;){if(m+=p,m=l)return null;if(v=x,x=h[m],void 0===x){const e=new _0x46bdc2(u.getx(m),u.gety(m)),t=_0x45c927(e,c);if(t.signedDistanceFromCamera>0)x=h[m]=t.point;else{const t=m-p;x=_0x154b2f(0===y?o:new _0x46bdc2(u.getx(t),u.gety(t)),e,v,b-y+1,c)}}y+=$,$=v.dist(x)}const T=(b-y)/$,C=x.sub(v),S=C.mult(T)._add(v);S._add(C._unit()._perp()._mult(i*p));return{point:S,angle:_+Math.atan2(x.y-v.y,x.x-v.x),tileDistance:d?{prevTileDistance:m-p===g?0:u.gettileUnitDistanceFromAnchor(m-p),lastSegmentViewportDistance:b-y}:null}}_0xd49c10();const _0x209fcf=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function _0x2f9503(e,t){for(let i=0;i 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n}\n",_0x485c35=(_0x4b5fcf=!0,function(e,t){var i=_0x4b5fcf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4b5fcf=!1,i}),_0x15c498=_0x485c35(void 0,(function(){return _0x15c498.toString().search("(((.+)+)+)+$").toString().constructor(_0x15c498).search("(((.+)+)+)+$")})),_0x4b5fcf;_0x15c498();var _0x1b123c="\nuniform lowp float u_device_pixel_ratio;\nuniform sampler2D u_image;\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n // For gradient lines, v_lineprogress is the ratio along the entire line,\n // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\n vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x9ed86a=(_0xb359bb=!0,function(e,t){var i=_0xb359bb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb359bb=!1,i}),_0x55a5b4=_0x9ed86a(void 0,(function(){return _0x55a5b4.toString().search("(((.+)+)+)+$").toString().constructor(_0x55a5b4).search("(((.+)+)+)+$")})),_0xb359bb;_0x55a5b4();var _0x202e1c="\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_units_to_pixels;\nuniform mediump float u_ratio;\nuniform lowp float u_device_pixel_ratio;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n float a_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * LINE_DISTANCE_SCALE;\n // float tileRatio = u_scale.y;\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_linesofar = a_linesofar;\n v_width2 = vec2(outset, inset);\n}\n",_0x219fcd=(_0x4e7493=!0,function(e,t){var i=_0x4e7493?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e7493=!1,i}),_0x11ba31=_0x219fcd(void 0,(function(){return _0x11ba31.toString().search("(((.+)+)+)+$").toString().constructor(_0x11ba31).search("(((.+)+)+)+$")})),_0x4e7493;_0x11ba31();var _0x4577cf="\nuniform lowp float u_device_pixel_ratio;\nuniform vec2 u_texsize;\nuniform float u_fade;\nuniform mediump vec4 u_scale;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n vec2 pattern_size_a = vec2(display_size_a.x * fromScale / tileZoomRatio, display_size_a.y);\n vec2 pattern_size_b = vec2(display_size_b.x * toScale / tileZoomRatio, display_size_b.y);\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / pattern_size_b.x, 1.0);\n\n // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\n // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\n // to ensure we don't sample outside the designated symbol on the sprite sheet.\n // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\n // the texture coordinate\n float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_a.y + 2.0) / 2.0) / pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_b.y + 2.0) / 2.0) / pattern_size_b.y);\n vec2 pos_a = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, vec2(x_a, y_a));\n vec2 pos_b = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0xc651f9=(_0x4dc776=!0,function(e,t){var i=_0x4dc776?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4dc776=!1,i}),_0x55b92e=_0xc651f9(void 0,(function(){return _0x55b92e.toString().search("(((.+)+)+)+$").toString().constructor(_0x55b92e).search("(((.+)+)+)+$")})),_0x4dc776;_0x55b92e();var _0x29fa18="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\nattribute ivec4 a_pixeloffset;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec4 a_pixeloffset;\n#endif\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform float u_fade_change;\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\nuniform float u_depthRange;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n vec2 a_pxoffset = vec2(a_pixeloffset.xy);\n vec2 a_minFontScale = vec2(a_pixeloffset.zw) / 256.0;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // See comments in symbol_sdf.vertex\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // See comments in symbol_sdf.vertex\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * max(a_minFontScale, fontScale) + a_pxoffset / 16.0), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n\n v_tex = a_tex / u_texsize;\n // vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n // float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n // v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n v_fade_opacity = 1.0;\n}\n",_0x27a463=(_0x50c886=!0,function(e,t){var i=_0x50c886?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x50c886=!1,i}),_0x3c1885=_0x27a463(void 0,(function(){return _0x3c1885.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c1885).search("(((.+)+)+)+$")})),_0x50c886;_0x3c1885();var _0x24bb2b="\nuniform sampler2D u_texture;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n //lowp float alpha = opacity * v_fade_opacity;\n gl_FragColor = texture2D(u_texture, vec2(v_tex.x, 1.0 - v_tex.y)) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0xcef50e=(_0x393f45=!0,function(e,t){var i=_0x393f45?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x393f45=!1,i}),_0x13c48a=_0xcef50e(void 0,(function(){return _0x13c48a.toString().search("(((.+)+)+)+$").toString().constructor(_0x13c48a).search("(((.+)+)+)+$")})),_0x393f45;_0x13c48a();var _0x5278ba="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\nattribute ivec4 a_pixeloffset;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec4 a_pixeloffset;\n#endif\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\nuniform vec2 u_texsize;\nuniform float u_depthRange;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n vec2 a_pxoffset = vec2(a_pixeloffset.xy);\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n //vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale + a_pxoffset), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n float gamma_scale = gl_Position.w;\n\n //vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n //float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n //float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0 = a_tex / u_texsize;\n v_data1 = vec3(gamma_scale, size, 1.0);\n}\n",_0x397461=(_0x5778b1=!0,function(e,t){var i=_0x5778b1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5778b1=!1,i}),_0x3e7899=_0x397461(void 0,(function(){return _0x3e7899.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e7899).search("(((.+)+)+)+$")})),_0x5778b1;_0x3e7899();var _0x26ba5a="\n#define SDF_PX 8.0\n\nuniform bool u_is_halo;\nuniform sampler2D u_texture;\nuniform highp float u_gamma_scale;\nuniform lowp float u_device_pixel_ratio;\nuniform bool u_is_text;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n float EDGE_GAMMA = 0.105 / u_device_pixel_ratio;\n\n vec2 tex = v_data0.xy;\n float gamma_scale = v_data1.x;\n float size = v_data1.y;\n float fade_opacity = v_data1[2];\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n lowp vec4 color = fill_color;\n highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n lowp float buff = (256.0 - 64.0) / 256.0;\n if (u_is_halo) {\n color = halo_color;\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n buff = (6.0 - halo_width / fontScale) / SDF_PX;\n }\n\n#ifdef WEBGPU\n float dist = texture2D(u_texture, tex).r;\n#else\n float dist = texture2D(u_texture, tex).a;\n#endif\n highp float gamma_scaled = gamma * gamma_scale;\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n //gl_FragColor = color * (alpha * opacity * fade_opacity);\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0xb769cc=(_0x49e0a3=!0,function(e,t){var i=_0x49e0a3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49e0a3=!1,i}),_0x7f81d9=_0xb769cc(void 0,(function(){return _0x7f81d9.toString().search("(((.+)+)+)+$").toString().constructor(_0x7f81d9).search("(((.+)+)+)+$")})),_0x49e0a3;_0x7f81d9();var _0x1c6e1c="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\n#endif\n\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\nuniform vec2 u_texsize;\nuniform vec2 u_texsize_icon;\nuniform float u_depthRange;\n\nvarying vec4 v_data0;\nvarying vec4 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n float is_sdf = a_size[0] - 2.0 * a_size_min;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = size / 24.0;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n float gamma_scale = gl_Position.w;\n\n // vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n // float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n // float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0.xy = a_tex / u_texsize;\n v_data0.zw = a_tex / u_texsize_icon;\n //v_data1 = vec4(gamma_scale, size, interpolated_fade_opacity, is_sdf);\n v_data1 = vec4(gamma_scale, size, 1.0, is_sdf); \n}\n",_0x1f9f58=(_0x18ea62=!0,function(e,t){var i=_0x18ea62?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x18ea62=!1,i}),_0x34ab48=_0x1f9f58(void 0,(function(){return _0x34ab48.toString().search("(((.+)+)+)+$").toString().constructor(_0x34ab48).search("(((.+)+)+)+$")})),_0x18ea62;_0x34ab48();var _0x40df9f="\n#define SDF_PX 8.0\n\n#define SDF 1.0\n#define ICON 0.0\n\nuniform bool u_is_halo;\nuniform sampler2D u_texture;\nuniform sampler2D u_texture_icon;\nuniform highp float u_gamma_scale;\nuniform lowp float u_device_pixel_ratio;\n\nvarying vec4 v_data0;\nvarying vec4 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n// float fade_opacity = v_data1[2];\n\n// if (v_data1.w == ICON) {\n// vec2 tex_icon = v_data0.zw;\n// lowp float alpha = opacity * fade_opacity;\n// gl_FragColor = texture2D(u_texture_icon, tex_icon) * alpha;\n\n// #ifdef OVERDRAW_INSPECTOR\n// gl_FragColor = vec4(1.0);\n// #endif\n// return;\n// }\n\n// vec2 tex = v_data0.xy;\n\n// float EDGE_GAMMA = 0.105 / u_device_pixel_ratio;\n\n// float gamma_scale = v_data1.x;\n// float size = v_data1.y;\n\n// float fontScale = size / 24.0;\n\n// lowp vec4 color = fill_color;\n// highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n// lowp float buff = (256.0 - 64.0) / 256.0;\n// if (u_is_halo) {\n// color = halo_color;\n// gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n// buff = (6.0 - halo_width / fontScale) / SDF_PX;\n// }\n\n// lowp float dist = texture2D(u_texture, tex).a;\n// highp float gamma_scaled = gamma * gamma_scale;\n// highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n// gl_FragColor = color * (alpha * opacity * fade_opacity);\n\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x4a896b=(_0x2f40be=!0,function(e,t){var i=_0x2f40be?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f40be=!1,i}),_0xfdd9ca=_0x4a896b(void 0,(function(){return _0xfdd9ca.toString().search("(((.+)+)+)+$").toString().constructor(_0xfdd9ca).search("(((.+)+)+)+$")})),_0x2f40be;_0xfdd9ca();var _0x47cb55="\n#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n int packedIntValue = int(packedValue);\n int v0 = packedIntValue / 256;\n return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec2 unpack_opacity(const float packedOpacity) {\n int intOpacity = int(packedOpacity) / 2;\n return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\n}\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n// floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n return vec4(\n unpack_float(encodedColor[0]) / 255.0,\n unpack_float(encodedColor[1]) / 255.0\n );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_color(const vec4 packedColors, const float t) {\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n",_0x2881dc=(_0x37d7f4=!0,function(e,t){var i=_0x37d7f4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37d7f4=!1,i}),_0x28f969=_0x2881dc(void 0,(function(){return _0x28f969.toString().search("(((.+)+)+)+$").toString().constructor(_0x28f969).search("(((.+)+)+)+$")})),_0x37d7f4;_0x28f969();var _0x4d2dee="\n#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n",_0x1b9864=(_0x2b7945=!0,function(e,t){var i=_0x2b7945?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b7945=!1,i}),_0x5e8618=_0x1b9864(void 0,(function(){return _0x5e8618.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e8618).search("(((.+)+)+)+$")})),_0x2b7945;_0x5e8618();var _0xb2defe="\nuniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n // We are using Int16 for texture position coordinates to give us enough precision for\n // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n // as an arbitrarily high number to preserve adequate precision when rendering.\n // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n // so math for modifying either is consistent.\n v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n",_0x4cd65e=(_0x3c98d4=!0,function(e,t){var i=_0x3c98d4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3c98d4=!1,i}),_0x63e012=_0x4cd65e(void 0,(function(){return _0x63e012.toString().search("(((.+)+)+)+$").toString().constructor(_0x63e012).search("(((.+)+)+)+$")})),_0x3c98d4;_0x63e012();var _0x30c092="\nuniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n if (color0.a > 0.0) {\n color0.rgb = color0.rgb / color0.a;\n }\n if (color1.a > 0.0) {\n color1.rgb = color1.rgb / color1.a;\n }\n vec4 color = mix(color0, color1, u_fade_t);\n color.a *= u_opacity;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x2f6900=(_0x143a7e=!0,function(e,t){var i=_0x143a7e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x143a7e=!1,i}),_0x2c7979=_0x2f6900(void 0,(function(){return _0x2c7979.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c7979).search("(((.+)+)+)+$")})),_0x143a7e;_0x2c7979(),_0x55f30f([{name:"a_pos",type:"Int16",components:2}]);var _0x3913df=_0x53e3c7(_0x4d2dee,_0x47cb55),_0xf2ff25=_0x53e3c7(_0x5b28a7,_0x5c23af),_0x343377=_0x53e3c7(_0x465329,_0x4ca4fe),_0x507213=_0x53e3c7(_0x4f2541,_0x260fdc),_0x298a31=_0x53e3c7(_0x3387df,_0x8a1548),_0x45a9dc=_0x53e3c7(_0x1e5303,_0xcf3cd3),_0x215ea5=_0x53e3c7(_0x498afd,_0xf08a05),_0x2e244a=_0x53e3c7(_0x52924d,_0x4cb2b8),_0x220457=_0x53e3c7(_0xb89c9,_0x282b30),_0x3df2b2=_0x53e3c7(_0xe79352,_0x48b2de),_0x2a9b4e=_0x53e3c7(_0x16b39d,_0x153d99),_0x44b33a=_0x53e3c7(_0x40e4c2,_0x351028),_0x3c5341=_0x53e3c7(_0x433735,_0x19dc35),_0x4f56c5=_0x53e3c7(_0x39b2b5,_0x1fab96),_0x53ed86=_0x53e3c7(_0x2bfabc,_0x3202d4),_0x227506=_0x53e3c7(_0x4857ca,_0x14fc83),_0x18370c=_0x53e3c7(_0x48ac85,_0xa4a09c),_0x3dc877=_0x53e3c7(_0x2151e9,_0x5a8449),_0x2bf6dd=_0x53e3c7(_0x4d7b5c,_0x5784f9),_0x485f7f=_0x53e3c7(_0x1b123c,_0x5548c9),_0x508450=_0x53e3c7(_0x4577cf,_0x202e1c),_0x153475=_0x53e3c7(_0x5bd5a5,_0x12a338),_0x4e520b=_0x53e3c7(_0x30c092,_0xb2defe),_0x575f26=_0x53e3c7(_0x24bb2b,_0x29fa18),_0x2e8267=_0x53e3c7(_0x26ba5a,_0x5278ba),_0xe87a72=_0x53e3c7(_0x40df9f,_0x1c6e1c);function _0x53e3c7(e,t){var i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:e=e.replace(i,(function(e,t,i,r,o){return n[o]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+i+" "+r+" "+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n"})),vertexSource:t=t.replace(i,(function(e,t,i,r,o){var a="float"===r?"vec2":"vec4",s=o.match(/color/)?"color":a;return n[o]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\nvarying "+i+" "+r+" "+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = a_"+o+";\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n"}))}}var _0x15007c=Object.freeze({__proto__:null,prelude:_0x3913df,background:_0xf2ff25,backgroundPattern:_0x343377,circle:_0x507213,clippingMask:_0x298a31,heatmap:_0x45a9dc,heatmapTexture:_0x215ea5,collisionBox:_0x2e244a,collisionCircle:_0x220457,debug:_0x3df2b2,fill:_0x2a9b4e,fillOutline:_0x44b33a,fillOutlinePattern:_0x3c5341,fillPattern:_0x4f56c5,fillExtrusion:_0x53ed86,fillExtrusionPattern:_0x227506,hillshadePrepare:_0x18370c,hillshade:_0x3dc877,line:_0x2bf6dd,lineGradient:_0x485f7f,linePattern:_0x508450,lineSDF:_0x153475,raster:_0x4e520b,symbolIcon:_0x575f26,symbolSDF:_0x2e8267,symbolTextAndIcon:_0xe87a72}),_0x588f34=(_0x21311a=!0,function(e,t){var i=_0x21311a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x21311a=!1,i}),_0x11d5fe=_0x588f34(void 0,(function(){return _0x11d5fe.toString().search("(((.+)+)+)+$").toString().constructor(_0x11d5fe).search("(((.+)+)+)+$")})),_0x21311a;_0x11d5fe();var _0x2cab4a=(_0x1098af=!0,function(e,t){var i=_0x1098af?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1098af=!1,i}),_0x19f5b0=_0x2cab4a(void 0,(function(){return _0x19f5b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x19f5b0).search("(((.+)+)+)+$")})),_0x1098af;_0x19f5b0();var _0x30411e={clippingMaskUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix)}},clippingMaskUniformValues:function(e){return{u_matrix:e}}},_0x19cc4a=(_0x1d02e3=!0,function(e,t){var i=_0x1d02e3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d02e3=!1,i}),_0x22a137=_0x19cc4a(void 0,(function(){return _0x22a137.toString().search("(((.+)+)+)+$").toString().constructor(_0x22a137).search("(((.+)+)+)+$")})),_0x1d02e3;_0x22a137();var _0x31af54={backgroundUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_opacity:new _0x5ec44f.Uniform1f(e,t.u_opacity),u_color:new _0x5ec44f.UniformColor(e,t.u_color)}},backgroundPatternUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_opacity:new _0x5ec44f.Uniform1f(e,t.u_opacity),u_image:new _0x5ec44f.Uniform1i(e,t.u_image),u_pattern_tl_a:new _0x5ec44f.Uniform2f(e,t.u_pattern_tl_a),u_pattern_br_a:new _0x5ec44f.Uniform2f(e,t.u_pattern_br_a),u_pattern_tl_b:new _0x5ec44f.Uniform2f(e,t.u_pattern_tl_b),u_pattern_br_b:new _0x5ec44f.Uniform2f(e,t.u_pattern_br_b),u_texsize:new _0x5ec44f.Uniform2f(e,t.u_texsize),u_mix:new _0x5ec44f.Uniform1f(e,t.u_mix),u_pattern_size_a:new _0x5ec44f.Uniform2f(e,t.u_pattern_size_a),u_pattern_size_b:new _0x5ec44f.Uniform2f(e,t.u_pattern_size_b),u_scale_a:new _0x5ec44f.Uniform1f(e,t.u_scale_a),u_scale_b:new _0x5ec44f.Uniform1f(e,t.u_scale_b),u_pixel_coord_upper:new _0x5ec44f.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x5ec44f.Uniform2f(e,t.u_pixel_coord_lower),u_tile_units_to_pixels:new _0x5ec44f.Uniform1f(e,t.u_tile_units_to_pixels)}},backgroundUniformValues:function(e,t,i){return{u_matrix:e,u_opacity:t,u_color:i}},backgroundPatternUniformValues:function(e,t,i,n,r,o){return extend$1(bgPatternUniformValues(n,o,i,r),{u_matrix:e,u_opacity:t})}},_0x252f58=(_0xfa75aa=!0,function(e,t){var i=_0xfa75aa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xfa75aa=!1,i}),_0x3b124f=_0x252f58(void 0,(function(){return _0x3b124f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b124f).search("(((.+)+)+)+$")})),_0xfa75aa;_0x3b124f(),_0x25c2d5.fillUniforms,_0x25c2d5.fillPatternUniforms,_0x25c2d5.fillOutlineUniforms,_0x25c2d5.fillOutlinePatternUniforms,_0x1d95cd.circleUniforms,_0x30411e.clippingMaskUniforms,_0x3889a8.lineUniforms,_0x3889a8.lineGradientUniforms,_0x3889a8.linePatternUniforms,_0x3889a8.lineSDFUniforms,_0x56c911.symbolIconUniforms,_0x56c911.symbolSDFUniforms,_0x56c911.symbolTextAndIconUniforms,_0x31af54.backgroundUniforms,_0x31af54.backgroundPatternUniforms;var _0x9fb4f2=(_0x5445b6=!0,function(e,t){var i=_0x5445b6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5445b6=!1,i}),_0x15ba01=_0x9fb4f2(void 0,(function(){return _0x15ba01.toString().search("(((.+)+)+)+$").toString().constructor(_0x15ba01).search("(((.+)+)+)+$")})),_0x5445b6;_0x15ba01();var _0x22b72e=0,_0x474204=1,_0x34e25f=771,_0x5062cb=function(e,t,i){this.blendFunction=e,this.blendColor=t,this.mask=i};_0x5062cb.Replace=[_0x474204,_0x22b72e],_0x5062cb.disabled=new _0x5062cb(_0x5062cb.Replace,_0x128d69.transparent,[!1,!1,!1,!1]),_0x5062cb.unblended=new _0x5062cb(_0x5062cb.Replace,_0x128d69.transparent,[!0,!0,!0,!0]),_0x5062cb.alphaBlended=new _0x5062cb([_0x474204,_0x34e25f],_0x128d69.transparent,[!0,!0,!0,!0]);var _0x3cb967=(_0x27e471=!0,function(e,t){var i=_0x27e471?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27e471=!1,i}),_0xda512c=_0x3cb967(void 0,(function(){return _0xda512c.toString().search("(((.+)+)+)+$").toString().constructor(_0xda512c).search("(((.+)+)+)+$")})),_0x27e471;_0xda512c();var _0x1fc842=function(e,t,i){this.context=e;var n=e.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(i),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),!this.dynamicDraw&&delete t.arrayBuffer};_0x1fc842.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},_0x1fc842.prototype.updateData=function(e){var t=this.context.gl;this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)},_0x1fc842.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var _0x3737b3=(_0x10b458=!0,function(e,t){var i=_0x10b458?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x10b458=!1,i}),_0x2d50c1=_0x3737b3(void 0,(function(){return _0x2d50c1.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d50c1).search("(((.+)+)+)+$")})),_0x10b458;_0x2d50c1();var _0x591b5c={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},_0x30d5ba=function(e,t,i,n){this.length=t.length,this.attributes=i,this.itemSize=t.bytesPerElement,this.dynamicDraw=n,this.context=e;var r=e.gl;this.buffer=r.createBuffer(),e.bindVertexBuffer.set(this.buffer),r.bufferData(r.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),!this.dynamicDraw&&delete t.arrayBuffer};_0x30d5ba.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},_0x30d5ba.prototype.updateData=function(e){var t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)},_0x30d5ba.prototype.enableAttributes=function(e,t){for(var i=0;i256&&this.clearStencil(),i.setColorMode(_0x5062cb.disabled),i.setDepthMode(_0x37eb97.disabled);var r=this.useProgram("clippingMask").program;this._tileClippingMaskIDs={};for(var o=0,a=t;o256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new _0x411737({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},_0x391a82.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new _0x411737({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},_0x391a82.prototype.colorModeForRenderPass=function(){var e=this.context.gl;if(this._showOverdrawInspector){var t=1/8;return new _0x5062cb([e.CONSTANT_COLOR,e.ONE],new _0x128d69(t,t,t,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?_0x5062cb.unblended:_0x5062cb.alphaBlended},_0x391a82.prototype.depthModeForSublayer=function(e,t,i){if(!this.opaquePassEnabledForLayer())return _0x37eb97.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new _0x37eb97(i||de$x.LEQUAL,t,[n,n])},_0x391a82.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer=0;this.currentLayer--){var r=this.style._layers[n[this.currentLayer]];this.renderLayerForOneTile(this,t,r,i)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer=0;this.currentLayer--){var f=this.style._layers[i[this.currentLayer]],p=n[f.source],_=a[f.source];this._renderTileClippingMasks(f,_),this.renderLayer(this,p,f,_)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer>0];case"i16":return A$_[e>>1];case"i32":case"i64":return w$P[e>>2];case"float":return _e$q[e>>2];case"double":return pe$s[e>>3];default:de("invalid type for getValue: "+t)}return null},n=function(e,t){e||de("Assertion failed: "+t)},r=function(e){var t=t$H["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=z$O(i),c(e,t,i)}return t},array:function(e){var t=z$O(e.length);return h(e,t),t}};var u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p=r);)++o;if(o-i>16&&e.subarray&&ke$d)return ke$d.decode(e.subarray(i,o));for(var a="";i>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(b$13,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s=55296&&l<=57343)l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s);if(l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,b$13,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),_$M.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return t$H.extraStackTrace&&(e+="\n"+t$H.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){t$H.HEAP8=_$M=new Int8Array(E$T),t$H.HEAP16=A$_=new Int16Array(E$T),t$H.HEAP32=w$P=new Int32Array(E$T),t$H.HEAPU8=b$13=new Uint8Array(E$T),t$H.HEAPU16=new Uint16Array(E$T),t$H.HEAPU32=D$S=new Uint32Array(E$T),t$H.HEAPF32=_e$q=new Float32Array(E$T),t$H.HEAPF64=pe$s=new Float64Array(E$T)},g=function(){n(0==(3&N$K)),D$S[(N$K>>2)-1]=34821223,D$S[(N$K>>2)-2]=2310721022},x=function(){(34821223!=D$S[(N$K>>2)-1]||2310721022!=D$S[(N$K>>2)-2])&&de("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+D$S[(N$K>>2)-2].toString(16)+" "+D$S[(N$K>>2)-1].toString(16)),1668509029!==w$P[0]&&de("Runtime error: The application has corrupted its heap memory area (address zero)!")},v=function(e){de("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(N$K-de$r()+e)+" bytes available!")},y=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?t$H.dynCall_v(i):t$H.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},$=function(){if(t$H.preRun)for("function"==typeof t$H.preRun&&(t$H.preRun=[t$H.preRun]);t$H.preRun.length;)S(t$H.preRun.shift());y(je$e)},b=function(){x(),!u$L&&(u$L=!0,y(Ge$g))},T=function(){x(),y(We$k)},C=function(){if(x(),t$H.postRun)for("function"==typeof t$H.postRun&&(t$H.postRun=[t$H.postRun]);t$H.postRun.length;)w(t$H.postRun.shift());y(qe$d)},S=function(e){je$e.unshift(e)},w=function(e){qe$d.unshift(e)},E=function(e){C$U++,t$H.monitorRunDependencies&&t$H.monitorRunDependencies(C$U),e&&(n(!P$P[e]),P$P[e]=1,null===k$N&&typeof setInterval<"u"&&(k$N=setInterval((function(){if(ne$E)return clearInterval(k$N),void(k$N=null)}),1e4)))},P=function(e){if(C$U--,t$H.monitorRunDependencies&&t$H.monitorRunDependencies(C$U),e&&(n(P$P[e]),delete P$P[e]),0==C$U&&(null!==k$N&&(clearInterval(k$N),k$N=null),$$R)){var t=$$R;$$R=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(Ve$h):0===e.indexOf(Ve$h)},L=function(){try{if(t$H.wasmBinary)return new Uint8Array(t$H.wasmBinary);if(t$H.readBinary)return t$H.readBinary(S$K);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}},M=function(){return t$H.wasmBinary||!V$J&&!I$11||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(S$K,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+S$K+"'";return e.arrayBuffer()})).catch((function(){return L()}))},R=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Yt$6};function i(e,t){var i=e.exports;t$H.asm=i,P("wasm-instantiate")}E("wasm-instantiate");var r=t$H;function o(e){n(t$H===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(t$H.instantiateWasm)try{return t$H.instantiateWasm(t,i)}catch{return!1}return function(){if(t$H.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(S$K)||"function"!=typeof fetch)return a(o);fetch(S$K,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},I=function(e){return ie$A(e)},O=function(e){e&&B$P[e].refcount++},D=function(e){if(!e||B$P[e])return e;for(var t in B$P)for(var i=+t,n=B$P[i].adjusted,r=n.length,o=0;o"u"||!(e instanceof y$P.ErrnoError))&&de(e),-e.errno}},V=function(){var e=t$H._fflush;e&&e(0);var t=d$11.buffers;t[1].length&&d$11.printChar(1,10),t[2].length&&d$11.printChar(2,10)},k=function(e,t){d$11.varargs=t;try{for(var i=d$11.get(),n=d$11.get(),r=d$11.get(),o=0,a=0;a>2],l=w$P[n+(8*a+4)>>2],u=0;u"u"||!(e instanceof y$P.ErrnoError))&&de(e),-e.errno}},W=function(e,t){d$11.varargs=t;try{return 0}catch(e){return(typeof y$P>"u"||!(e instanceof y$P.ErrnoError))&&de(e),-e.errno}},H=function(e,t){d$11.varargs=t;try{d$11.getStreamFromFD();return de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$P>"u"||!(e instanceof y$P.ErrnoError))&&de(e),-e.errno}},q=function(){},j=function(){t$H.abort()},Y=function(){return _$M.length},X=function(e,t,i){b$13.set(b$13.subarray(t,t+i),e)},K=function(e){if(!t$H.___errno_location)return e;w$P[t$H.___errno_location()>>2]=e},Q=function(e){de("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+_$M.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},Z=function(e){e=_(e,65536);var t=E$T.byteLength;try{return-1!==Y$G.grow((e-t)/65536)&&(E$T=Y$G.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},J=function(e){var i=Y();n(e>i);var r=65536,o=2147418112;if(e>o)return!1;for(var a=Math.max(i,16777216);a0||(g(),$(),C$U>0)||t$H.calledRun||(t$H.setStatus?(t$H.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t$H.setStatus("")}),1),t()}),1)):t(),x())},de=function(e){t$H.onAbort&&t$H.onAbort(e),ne$E=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw Ye$e&&Ye$e.forEach((function(i){t=i(t,e)})),t};var t$H=typeof t$H<"u"?t$H:{},q$X={},U$S;for(U$S in t$H)t$H.hasOwnProperty(U$S)&&(q$X[U$S]=t$H[U$S]);t$H.arguments=[],t$H.thisProgram="./this.program",t$H.quit=function(e,t){throw t},t$H.preRun=[],t$H.postRun=[];var V$J=!1,I$11=!1,fe$q=!1,Ae$p=!1,Ne$h=!1;if(V$J="object"==typeof window,I$11="function"==typeof importScripts,Ae$p="object"==typeof process&&"function"==typeof require,fe$q=Ae$p&&!V$J&&!I$11,Ne$h=!V$J&&!fe$q&&!I$11,t$H.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var O$D="",ce$r,le$v;if(fe$q)O$D=__dirname+"/",t$H.read=function(e,t){var i;return ce$r||(ce$r=require("fs")),le$v||(le$v=require("path")),e=le$v.normalize(e),i=ce$r.readFileSync(e),t?i:i.toString()},t$H.readBinary=function(e){var t=t$H.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(t$H.thisProgram=process.argv[1].replace(/\\/g,"/")),t$H.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=t$H),process.on("uncaughtException",(function(e){if(!(e instanceof ce))throw e})),process.on("unhandledRejection",de),t$H.quit=function(e){process.exit(e)},t$H.inspect=function(){return"[Emscripten Module object]"};else if(Ne$h)typeof read<"u"&&(t$H.read=function(e){return read(e)}),t$H.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?t$H.arguments=scriptArgs:typeof arguments<"u"&&(t$H.arguments=arguments),"function"==typeof quit&&(t$H.quit=function(e){quit(e)});else{if(!V$J&&!I$11)throw new Error("environment detection error");I$11?O$D=self.location.href:document.currentScript&&(O$D=document.currentScript.src),O$D=0!==O$D.indexOf("blob:")?O$D.substr(0,O$D.lastIndexOf("/")+1):"",t$H.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},I$11&&(t$H.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),t$H.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},t$H.setWindowTitle=function(e){document.title=e}}var J$M=t$H.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),T$Q=t$H.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||J$M);for(U$S in q$X)q$X.hasOwnProperty(U$S)&&(t$H[U$S]=q$X[U$S]);q$X=void 0,n(typeof t$H.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$H.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$H.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$H.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),de$r=Je$8=z$O=function(){de("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Yt$6={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var Ie$k=0,Zt$5=function(e){Ie$k=e},$t$5=function(){return Ie$k};"object"!=typeof WebAssembly&&de("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Y$G,ne$E=!1,ke$d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Qe$b=65536,E$T,_$M,b$13,A$_,w$P,D$S,_e$q,pe$s,Pe$i=5872,N$K=5248752,Be$j=5248752,Z$O=5840;n(Pe$i%16==0,"stack must start aligned"),n(Be$j%16==0,"heap must start aligned");var Te$m=5242880;t$H.TOTAL_STACK&&n(Te$m===t$H.TOTAL_STACK,"the stack size can no longer be determined at runtime");var X$O=t$H.TOTAL_MEMORY||16777216;if(X$O>2]=Be$j,w$P[0]=1668509029,A$_[1]=25459,115!==b$13[2]||99!==b$13[3])throw"Runtime error: expected the system to be little-endian!";var je$e=[],Ge$g=[],We$k=[],qe$d=[],u$L=!1,h$R=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var C$U=0,k$N=null,$$R=null,P$P={};t$H.preloadedImages={},t$H.preloadedAudios={};var y$P={error:function(){de("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){y$P.error()},createDataFile:function(){y$P.error()},createPreloadedFile:function(){y$P.error()},createLazyFile:function(){y$P.error()},open:function(){y$P.error()},mkdev:function(){y$P.error()},registerDevice:function(){y$P.error()},analyzePath:function(){y$P.error()},loadFilesFromDB:function(){y$P.error()},ErrnoError:function(){y$P.error()}};t$H.FS_createDataFile=y$P.createDataFile,t$H.FS_createPreloadedFile=y$P.createPreloadedFile;var Ve$h="data:application/octet-stream;base64,",S$K,nn$2=typeof window>"u"?self:window;S$K=nn$2.location.href.endsWith(".openrealspace")?"../../static/Build/SuperMap3D/ThirdParty/earcut.wasm":"ThirdParty/earcut.wasm",A(S$K)||(S$K=e(S$K)),t$H.asm=function(e,t,i){t.memory=Y$G,t.table=new WebAssembly.Table({initial:260,maximum:260,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=R(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var F$X=5856;n(F$X%8==0);var B$P={},rn$3=[],d$11={buffers:[null,[],[]],printChar:function(e,t){var i=d$11.buffers[e];n(i),0===t||10===t?((1===e?J$M:T$Q)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return d$11.varargs+=4,w$P[d$11.varargs-4>>2]},getStr:function(){return l(d$11.get())},get64:function(){var e=d$11.get(),t=d$11.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===d$11.get())}},sn$2={},fn$2={abort:de,setTempRet0:Zt$5,getTempRet0:$t$5,abortStackOverflow:v,nullFunc_ii:ee,nullFunc_iidiiii:te,nullFunc_iiii:ie,nullFunc_jiji:ne,nullFunc_v:re,nullFunc_vi:oe,nullFunc_vii:ae,nullFunc_viiii:se,nullFunc_viiiii:le,nullFunc_viiiiii:ue,___cxa_allocate_exception:I,___cxa_begin_catch:B,___cxa_throw:N,___cxa_uncaught_exception:F,___exception_addRef:O,___exception_deAdjust:D,___gxx_personality_v0:U,___lock:z,___setErrNo:K,___syscall140:G,___syscall146:k,___syscall54:W,___syscall6:H,___unlock:q,_abort:j,_emscripten_get_heap_size:Y,_emscripten_memcpy_big:X,_emscripten_resize_heap:J,abortOnCannotGrowMemory:Q,emscripten_realloc_buffer:Z,flush_NO_FILESYSTEM:V,tempDoublePtr:F$X,DYNAMICTOP_PTR:Z$O},p$Q=t$H.asm(sn$2,fn$2,E$T),cn$2=p$Q.__ZSt18uncaught_exceptionv;p$Q.__ZSt18uncaught_exceptionv=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),cn$2.apply(null,arguments)};var ln$2=p$Q.___cxa_can_catch;p$Q.___cxa_can_catch=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ln$2.apply(null,arguments)};var un$2=p$Q.___cxa_is_pointer_type;p$Q.___cxa_is_pointer_type=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),un$2.apply(null,arguments)};var hn$2=p$Q.___errno_location;p$Q.___errno_location=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),hn$2.apply(null,arguments)};var _n$2=p$Q._earcut;p$Q._earcut=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),_n$2.apply(null,arguments)};var pn$2=p$Q._fflush;p$Q._fflush=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),pn$2.apply(null,arguments)};var Tn$2=p$Q._free;p$Q._free=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Tn$2.apply(null,arguments)};var dn$1=p$Q._llvm_maxnum_f64;p$Q._llvm_maxnum_f64=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),dn$1.apply(null,arguments)};var gn$2=p$Q._llvm_minnum_f64;p$Q._llvm_minnum_f64=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),gn$2.apply(null,arguments)};var vn$2=p$Q._malloc;p$Q._malloc=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),vn$2.apply(null,arguments)};var mn$2=p$Q._sbrk;p$Q._sbrk=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),mn$2.apply(null,arguments)};var yn=p$Q.establishStackSpace;p$Q.establishStackSpace=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),yn.apply(null,arguments)};var wn$1=p$Q.stackAlloc;p$Q.stackAlloc=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wn$1.apply(null,arguments)};var En$2=p$Q.stackRestore;p$Q.stackRestore=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),En$2.apply(null,arguments)};var Rn$1=p$Q.stackSave;p$Q.stackSave=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Rn$1.apply(null,arguments)},t$H.asm=p$Q;var K$L=t$H.__ZSt18uncaught_exceptionv=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.__ZSt18uncaught_exceptionv.apply(null,arguments)};t$H.___cxa_can_catch=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.___cxa_can_catch.apply(null,arguments)},t$H.___cxa_is_pointer_type=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.___cxa_is_pointer_type.apply(null,arguments)},t$H.___errno_location=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.___errno_location.apply(null,arguments)},t$H._earcut=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._earcut.apply(null,arguments)},t$H._emscripten_replace_memory=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._emscripten_replace_memory.apply(null,arguments)},t$H._fflush=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._fflush.apply(null,arguments)},t$H._free=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._free.apply(null,arguments)},t$H._llvm_maxnum_f64=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._llvm_maxnum_f64.apply(null,arguments)},t$H._llvm_minnum_f64=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._llvm_minnum_f64.apply(null,arguments)};var ie$A=t$H._malloc=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._malloc.apply(null,arguments)};t$H._memcpy=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._memcpy.apply(null,arguments)},t$H._memset=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._memset.apply(null,arguments)},t$H._sbrk=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._sbrk.apply(null,arguments)},t$H.establishStackSpace=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.establishStackSpace.apply(null,arguments)};var z$O=t$H.stackAlloc=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.stackAlloc.apply(null,arguments)},Je$8=t$H.stackRestore=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.stackRestore.apply(null,arguments)},de$r=t$H.stackSave=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.stackSave.apply(null,arguments)};t$H.dynCall_ii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_ii.apply(null,arguments)},t$H.dynCall_iidiiii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_iidiiii.apply(null,arguments)},t$H.dynCall_iiii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_iiii.apply(null,arguments)},t$H.dynCall_jiji=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_jiji.apply(null,arguments)},t$H.dynCall_v=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_v.apply(null,arguments)},t$H.dynCall_vi=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_vi.apply(null,arguments)},t$H.dynCall_vii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_vii.apply(null,arguments)},t$H.dynCall_viiii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_viiii.apply(null,arguments)},t$H.dynCall_viiiii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_viiiii.apply(null,arguments)},t$H.dynCall_viiiiii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_viiiiii.apply(null,arguments)},t$H.asm=p$Q,t$H.intArrayFromString||(t$H.intArrayFromString=function(){de("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.intArrayToString||(t$H.intArrayToString=function(){de("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.ccall=o,t$H.cwrap=a,t$H.setValue||(t$H.setValue=function(){de("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getValue=i,t$H.allocate||(t$H.allocate=function(){de("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getMemory||(t$H.getMemory=function(){de("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.AsciiToString||(t$H.AsciiToString=function(){de("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stringToAscii||(t$H.stringToAscii=function(){de("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.UTF8ArrayToString||(t$H.UTF8ArrayToString=function(){de("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.UTF8ToString||(t$H.UTF8ToString=function(){de("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stringToUTF8Array||(t$H.stringToUTF8Array=function(){de("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stringToUTF8||(t$H.stringToUTF8=function(){de("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.lengthBytesUTF8||(t$H.lengthBytesUTF8=function(){de("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.UTF16ToString||(t$H.UTF16ToString=function(){de("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stringToUTF16||(t$H.stringToUTF16=function(){de("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.lengthBytesUTF16||(t$H.lengthBytesUTF16=function(){de("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.UTF32ToString||(t$H.UTF32ToString=function(){de("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stringToUTF32||(t$H.stringToUTF32=function(){de("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.lengthBytesUTF32||(t$H.lengthBytesUTF32=function(){de("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.allocateUTF8||(t$H.allocateUTF8=function(){de("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stackTrace||(t$H.stackTrace=function(){de("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addOnPreRun||(t$H.addOnPreRun=function(){de("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addOnInit||(t$H.addOnInit=function(){de("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addOnPreMain||(t$H.addOnPreMain=function(){de("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addOnExit||(t$H.addOnExit=function(){de("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addOnPostRun||(t$H.addOnPostRun=function(){de("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.writeStringToMemory||(t$H.writeStringToMemory=function(){de("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.writeArrayToMemory||(t$H.writeArrayToMemory=function(){de("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.writeAsciiToMemory||(t$H.writeAsciiToMemory=function(){de("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addRunDependency||(t$H.addRunDependency=function(){de("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.removeRunDependency||(t$H.removeRunDependency=function(){de("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.ENV||(t$H.ENV=function(){de("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.FS||(t$H.FS=function(){de("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.FS_createFolder||(t$H.FS_createFolder=function(){de("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_createPath||(t$H.FS_createPath=function(){de("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_createDataFile||(t$H.FS_createDataFile=function(){de("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_createPreloadedFile||(t$H.FS_createPreloadedFile=function(){de("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_createLazyFile||(t$H.FS_createLazyFile=function(){de("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_createLink||(t$H.FS_createLink=function(){de("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_createDevice||(t$H.FS_createDevice=function(){de("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_unlink||(t$H.FS_unlink=function(){de("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.GL||(t$H.GL=function(){de("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.dynamicAlloc||(t$H.dynamicAlloc=function(){de("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.warnOnce||(t$H.warnOnce=function(){de("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.loadDynamicLibrary||(t$H.loadDynamicLibrary=function(){de("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.loadWebAssemblyModule||(t$H.loadWebAssemblyModule=function(){de("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getLEB||(t$H.getLEB=function(){de("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getFunctionTables||(t$H.getFunctionTables=function(){de("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.alignFunctionTables||(t$H.alignFunctionTables=function(){de("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.registerFunctions||(t$H.registerFunctions=function(){de("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addFunction||(t$H.addFunction=function(){de("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.removeFunction||(t$H.removeFunction=function(){de("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getFuncWrapper||(t$H.getFuncWrapper=function(){de("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.prettyPrint||(t$H.prettyPrint=function(){de("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.makeBigInt||(t$H.makeBigInt=function(){de("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.dynCall||(t$H.dynCall=function(){de("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getCompilerSetting||(t$H.getCompilerSetting=function(){de("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stackSave||(t$H.stackSave=function(){de("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stackRestore||(t$H.stackRestore=function(){de("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stackAlloc||(t$H.stackAlloc=function(){de("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.establishStackSpace||(t$H.establishStackSpace=function(){de("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.print||(t$H.print=function(){de("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.printErr||(t$H.printErr=function(){de("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getTempRet0||(t$H.getTempRet0=function(){de("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.setTempRet0||(t$H.setTempRet0=function(){de("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.Pointer_stringify||(t$H.Pointer_stringify=function(){de("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.ALLOC_NORMAL||Object.defineProperty(t$H,"ALLOC_NORMAL",{get:function(){de("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$H.ALLOC_STACK||Object.defineProperty(t$H,"ALLOC_STACK",{get:function(){de("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$H.ALLOC_DYNAMIC||Object.defineProperty(t$H,"ALLOC_DYNAMIC",{get:function(){de("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$H.ALLOC_NONE||Object.defineProperty(t$H,"ALLOC_NONE",{get:function(){de("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),ce.prototype=new Error,ce.prototype.constructor=ce,$$R=function e(){t$H.calledRun||he(),t$H.calledRun||($$R=e)},t$H.run=he;var Ye$e=[];if(t$H.abort=de,t$H.preInit)for("function"==typeof t$H.preInit&&(t$H.preInit=[t$H.preInit]);t$H.preInit.length>0;)t$H.preInit.pop()();t$H.noExitRuntime=!0,he()}else var t$H=null;var _0x66a0ff=t$H,_0x3099dc=(_0x3bbcd3=!0,function(e,t){var i=_0x3bbcd3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3bbcd3=!1,i}),_0x1982d7=_0x3099dc(void 0,(function(){return _0x1982d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x1982d7).search("(((.+)+)+)+$")})),_0x3bbcd3;_0x1982d7();var _0x56af28=!1;if(e$2b(_0x66a0ff)){_0x66a0ff.onRuntimeInitialized=function(){_0x56af28=!0};var _0x543095=_0x66a0ff.cwrap("earcut","number",["number","number","number","number","number","number"])}var _0x3372cf=_0x55f30f([{name:"a_pos",components:2,type:"Int16"}],4),_0x816495=_0x3372cf.members,_0x157159=500,_0x281e2a=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _0x18a187,this.indexArray=new _0xbd6def,this.indexArray2=new _0x229baa,this.programConfigurations=new ProgramConfigurationSet(_0x816495,e.layers,e.zoom),this.segments=new _0x4b6d5a,this.segments2=new _0x4b6d5a,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x281e2a.prototype.populate=function(e,t){this.hasPattern=_0x10bcf8("fill",this.layers,t);for(var i=[],n=0,r=e;n0&&(this.layoutCesiumVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0x3cb0f8.toIndexBuffer(e,this.indexArray),this.cesiumIndexBuffer2=_0x3cb0f8.toIndexBuffer(e,this.indexArray2))}this.programConfigurations.upload(e),this.uploaded=!0},_0x281e2a.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer?.destroy(),this.cesiumIndexBuffer2?.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},_0x281e2a.prototype.clear=function(){e$2b(this.layoutVertexArray)&&(this.layoutVertexArray=null),e$2b(this.indexArray)&&(this.indexArray=null),e$2b(this.indexArray2)&&(this.indexArray2=null)},_0x281e2a.prototype.addFeature=function(e,t,i,n,r){for(var o=0,a=_0x2f8296(t,_0x157159);on.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},r.prototype.interpolate=function(e){return e},r}(_0x5678d2);_0x416c3b.register("DataDrivenProperty",_0x5678d2);var _0x3b2c10=new _0x3699c0({"fill-sort-key":new _0x5678d2(_0x5f2c0a.layout_fill["fill-sort-key"])}),_0x1831c6=new _0x3699c0({"fill-antialias":new _0x3f772a(_0x5f2c0a.paint_fill["fill-antialias"]),"fill-opacity":new _0x5678d2(_0x5f2c0a.paint_fill["fill-opacity"]),"fill-color":new _0x5678d2(_0x5f2c0a.paint_fill["fill-color"]),"fill-outline-color":new _0x5678d2(_0x5f2c0a.paint_fill["fill-outline-color"]),"fill-translate":new _0x3f772a(_0x5f2c0a.paint_fill["fill-translate"]),"fill-translate-anchor":new _0x3f772a(_0x5f2c0a.paint_fill["fill-translate-anchor"]),"fill-pattern":new _0x19d2e0(_0x5f2c0a.paint_fill["fill-pattern"])}),_0x5df795={paint:_0x1831c6,layout:_0x3b2c10},_0x2e833c=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x5df795)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},r.prototype.createBucket=function(e){return new _0x281e2a(e)},r.prototype.queryRadius=function(){return _0x4191d9.translateDistance(this.paint.get("fill-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){var s=_0x4191d9.translate(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),0,a);return _0x31b87d.polygonIntersectsMultiPolygon(s,n)},r.prototype.isTileClipped=function(){return!0},r}(_0x353e3f),_0x17cfac=(_0x5935d1=!0,function(e,t){var i=_0x5935d1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5935d1=!1,i}),_0xe12c98=_0x17cfac(void 0,(function(){return _0xe12c98.toString().search("(((.+)+)+)+$").toString().constructor(_0xe12c98).search("(((.+)+)+)+$")})),_0x5935d1;_0xe12c98();var _0x305bc1=["Unknown","Point","LineString","Polygon"],_0x7f2c5e=_0x55f30f([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),_0xab4ef=_0x7f2c5e.members,_0x2148e6=63,_0x1f9d45=Math.cos(Math.PI/180*37.5),_0x245306=15,_0x53a8d8=20,_0x39146c=15,_0x25dd1c=.5,_0x1c5ece=Math.pow(2,_0x39146c-1)/_0x25dd1c,_0x2d7c83=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _0x51528d,this.indexArray=new _0xbd6def,this.programConfigurations=new ProgramConfigurationSet(_0xab4ef,e.layers,e.zoom),this.segments=new _0x4b6d5a,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x2d7c83.prototype.populate=function(e,t){this.hasPattern=!1;for(var i=this.layers[0].layout.get("line-sort-key"),n=[],r=0,o=e;r0&&(this.layoutCesiumVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0x3cb0f8.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},_0x2d7c83.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy()),this.programConfigurations.destroy(),this.segments.destroy())},_0x2d7c83.prototype.clear=function(){e$2b(this.layoutVertexArray)&&(this.layoutVertexArray=null),e$2b(this.indexArray)&&(this.indexArray=null)},_0x2d7c83.prototype.addFeature=function(e,t,i,n){for(var r=this.layers[0].layout,o=r.get("line-join").evaluate(e,{}),a=r.get("line-cap"),s=r.get("line-miter-limit"),l=r.get("line-round-limit"),u=0,c=t;u=2&&e[c-1].equals(e[c-2]);)c--;for(var h=0;h0;if(S&&v>h){var E=d.dist(_);if(E>2*f){var P=d.sub(d.sub(_)._mult(f/E)._round());this.updateDistance(_,P),this.addCurrentVertex(P,g,0,0,p),_=P}}var A=_&&m,L=A?i:u?"butt":n;if(A&&"round"===L&&(Tr&&(L="bevel"),"bevel"===L&&(T>2&&(L="flipbevel"),T100)y=x.mult(-1);else{var M=T*g.add(x).mag()/g.sub(x).mag();y._perp()._mult(M*(w?-1:1))}this.addCurrentVertex(d,y,0,0,p),this.addCurrentVertex(d,y.mult(-1),0,0,p)}else if("bevel"===L||"fakeround"===L){var R=-Math.sqrt(T*T-1),I=w?R:0,O=w?0:R;if(_&&this.addCurrentVertex(d,g,I,O,p),"fakeround"===L)for(var D=Math.round(180*C/Math.PI/_0x53a8d8),B=1;B2*f){var V=d.add(m.sub(d)._mult(f/G)._round());this.updateDistance(d,V),this.addCurrentVertex(V,x,0,0,p),d=V}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,a,s)}},_0x2d7c83.prototype.addCurrentVertex=function(e,t,i,n,r,o){void 0===o&&(o=!1);var a=t.x+t.y*i,s=t.y-t.x*i,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,a,s,o,!1,i,r),this.addHalfVertex(e,l,u,o,!0,-n,r),this.distance>_0x1c5ece/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,i,n,r,o))},_0x2d7c83.prototype.addHalfVertex=function(e,t,i,n,r,o,a){var s=e.x,l=e.y,u=this.scaledDistance*_0x25dd1c;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(r?1:0),Math.round(_0x2148e6*t)+128,Math.round(_0x2148e6*i)+128,1+(0===o?0:o<0?-1:1)|(63&u)<<2,u>>6);var c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),a.primitiveLength++),r?this.e2=c:this.e1=c},_0x2d7c83.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(_0x1c5ece-1):this.distance},_0x416c3b.register("LineBucket",_0x2d7c83,{omit:["layers","patternFeatures"]});var _0x570bef=(_0x477cdb=!0,function(e,t){var i=_0x477cdb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x477cdb=!1,i}),_0x24e160=_0x570bef(void 0,(function(){return _0x24e160.toString().search("(((.+)+)+)+$").toString().constructor(_0x24e160).search("(((.+)+)+)+$")})),_0x477cdb;_0x24e160();var _0x308415=function(e){this.specification=e};_0x308415.prototype.possiblyEvaluate=function(e,t,i){if(void 0!==e.value){if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new _0x4f93ac(Math.floor(t.zoom-1),t)),e.expression.evaluate(new _0x4f93ac(Math.floor(t.zoom),t)),e.expression.evaluate(new _0x4f93ac(Math.floor(t.zoom+1),t)),t)}},_0x308415.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},_0x308415.prototype.interpolate=function(e){return e},_0x416c3b.register("CrossFadedProperty",_0x308415);var _0x14695a=(_0x48d6fa=!0,function(e,t){var i=_0x48d6fa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x48d6fa=!1,i}),_0x1b42d7=_0x14695a(void 0,(function(){return _0x1b42d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b42d7).search("(((.+)+)+)+$")})),_0x48d6fa;_0x1b42d7();var _0x23e451=function(e){this.specification=e};_0x23e451.prototype.possiblyEvaluate=function(e,t,i){return!!e.expression.evaluate(t,null,{},i)},_0x23e451.prototype.interpolate=function(){return!1},_0x416c3b.register("ColorRampProperty",_0x23e451);var _0x48ca74=new _0x3699c0({"line-cap":new _0x3f772a(_0x5f2c0a.layout_line["line-cap"]),"line-join":new _0x5678d2(_0x5f2c0a.layout_line["line-join"]),"line-miter-limit":new _0x3f772a(_0x5f2c0a.layout_line["line-miter-limit"]),"line-round-limit":new _0x3f772a(_0x5f2c0a.layout_line["line-round-limit"]),"line-sort-key":new _0x5678d2(_0x5f2c0a.layout_line["line-sort-key"])}),_0x3b2b70=new _0x3699c0({"line-opacity":new _0x5678d2(_0x5f2c0a.paint_line["line-opacity"]),"line-color":new _0x5678d2(_0x5f2c0a.paint_line["line-color"]),"line-translate":new _0x3f772a(_0x5f2c0a.paint_line["line-translate"]),"line-translate-anchor":new _0x3f772a(_0x5f2c0a.paint_line["line-translate-anchor"]),"line-width":new _0x5678d2(_0x5f2c0a.paint_line["line-width"]),"line-gap-width":new _0x5678d2(_0x5f2c0a.paint_line["line-gap-width"]),"line-offset":new _0x5678d2(_0x5f2c0a.paint_line["line-offset"]),"line-blur":new _0x5678d2(_0x5f2c0a.paint_line["line-blur"]),"line-dasharray":new _0x308415(_0x5f2c0a.paint_line["line-dasharray"]),"line-pattern":new _0x19d2e0(_0x5f2c0a.paint_line["line-pattern"]),"line-gradient":new _0x23e451(_0x5f2c0a.paint_line["line-gradient"])}),_0x31537b={paint:_0x3b2b70,layout:_0x48ca74},_0x57508f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,i){return i=new _0x4f93ac(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),e.prototype.possiblyEvaluate.call(this,t,i)},t.prototype.evaluate=function(t,i,n,r){return i=extend({},i,{zoom:Math.floor(i.zoom)}),e.prototype.evaluate.call(this,t,i,n,r)},t}(_0x5678d2),_0x321825=new _0x57508f(_0x31537b.paint.properties["line-width"].specification);_0x321825.useIntegerZoom=!0;var _0x5e23b5=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x31537b)}function o(e,t){return t>0?t+2*e:e}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},r.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=renderColorRamp(e,"lineProgress"),this.gradientTexture=null},r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i),this.paint._values["line-floorwidth"]=_0x321825.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},r.prototype.createBucket=function(e){return new _0x2d7c83(e)},r.prototype.queryRadius=function(e){var t=e,i=o(_0x4191d9.getMaximumPaintValue("line-width",this,t),_0x4191d9.getMaximumPaintValue("line-gap-width",this,t)),n=_0x4191d9.getMaximumPaintValue("line-offset",this,t);return i/2+Math.abs(n)+_0x4191d9.translateDistance(this.paint.get("line-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,a,s){var l=_0x4191d9.translate(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),0,s),u=o(this.paint.get("line-width")?.evaluate(t,i),this.paint.get("line-gap-width")?.evaluate(t,i)),c=s/2*(u=Math.max(u,5)),h=this.paint.get("line-offset")?.evaluate(t,i);return h&&(n=function(e,t){for(var i=[],n=new _0x46bdc2(0,0),r=0;r1?"@2x":"";let s=getJSON(t.transformRequest(t.normalizeSpriteURL(e,a,".json"),_0x179804.SpriteJSON),((e,t)=>{s=null,!o&&(o=e,n=t,u())})),l=getImage(t.transformRequest(t.normalizeSpriteURL(e,a,".png"),_0x179804.SpriteImage),((e,t)=>{l=null,!o&&(o=e,r=t,u())}));function u(){if(o)i(o);else if(n&&r){const e=_0x1ec00b.getImageData(r,0),t={};for(const i in n){const{width:r,height:o,x:a,y:s,sdf:l,pixelRatio:u,stretchX:c,stretchY:h,content:d}=n[i],f=new _0x86a665({width:r,height:o});_0x86a665.copy(e,f,{x:a,y:s},{x:0,y:0},{width:r,height:o}),t[i]={data:f,pixelRatio:u,sdf:l,stretchX:c,stretchY:h,content:d}}i(null,t)}}return{cancel(){s&&(s.cancel(),s=null),l&&(l.cancel(),l=null)}}}_0x3a035a();var _0xc26bfa=(_0x315abc=!0,function(e,t){var i=_0x315abc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x315abc=!1,i}),_0xcf94b7=_0xc26bfa(void 0,(function(){return _0xcf94b7.toString().search("(((.+)+)+)+$").toString().constructor(_0xcf94b7).search("(((.+)+)+)+$")})),_0x315abc;_0xcf94b7();var _0x2b5199=1;function _0x38c377(){this.images={},this.imageCount=0,this.imageList=[],this.imagesCanvas={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new _0x86a665({width:1,height:1}),this.dirty=!0}_0x38c377.prototype.isLoaded=function(){return this.loaded},_0x38c377.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,i=this.requestors;t{if(e)r(e);else if(t){const e={};for(const i of _0x584b7b(t))e[i.id]=i;r(null,e)}}))}_0x973025();var _0x377518=(_0x383edc=!0,function(e,t){var i=_0x383edc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x383edc=!1,i}),_0x199080=_0x377518(void 0,(function(){return _0x199080.toString().search("(((.+)+)+)+$").toString().constructor(_0x199080).search("(((.+)+)+)+$")})),_0x383edc;_0x199080();var _0x4880b8=1e20;function _0x599c8a(e,t,i,n,r,o){this.fontSize=e||24,this.buffer=void 0===t?3:t,this.cutoff=n||.25,this.fontFamily=r||"sans-serif",this.fontWeight=o||"normal",this.radius=i||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function _0x41c0ed(e,t,i,n,r,o,a){for(var s=0;s{let n=this.entries[e];!n&&(n=this.entries[e]={glyphs:{},requests:{}});let r=n.glyphs[t];if(void 0!==r)return void i(null,{stack:e,id:t,glyph:r});if(r=this._tinySDF(n,e,t),r)return n.glyphs[t]=r,void i(null,{stack:e,id:t,glyph:r});const o=Math.floor(t/256);if(256*o>65535)return void i(new Error("glyphs > 65535 not supported"));let a=n.requests[o];!a&&(a=n.requests[o]=[],_0x5d88ab.loadGlyphRange(e,o,this.url,this.requestManager,((e,t)=>{if(t)for(const e in t)!this._doesCharSupportLocalGlyph(+e)&&(n.glyphs[+e]=t[+e]);for(const i of a)i(e,t);delete n.requests[o]}))),a.push(((n,r)=>{n?i(n):r&&i(null,{stack:e,id:t,glyph:r[t]||null})}))}),((e,i)=>{if(e)t(e);else if(i){const e={};for(const{stack:t,id:n,glyph:r}of i)(e[t]||(e[t]={}))[n]=r&&{id:r.id,bitmap:r.bitmap.clone(),metrics:r.metrics};t(null,e)}}))},_0x5d88ab.prototype._doesCharSupportLocalGlyph=function(e){return!!this.localIdeographFontFamily&&(_0x92a370["CJK Unified Ideographs"](e)||_0x92a370["Hangul Syllables"](e)||_0x92a370.Hiragana(e)||_0x92a370.Katakana(e))},_0x5d88ab.prototype._tinySDF=function(e,t,i){const n=this.localIdeographFontFamily;if(!n)return;if(!this._doesCharSupportLocalGlyph(i))return;let r=e.tinySDF;if(!r){let i="400";/bold/i.test(t)?i="900":/medium/i.test(t)?i="500":/light/i.test(t)&&(i="200"),r=e.tinySDF=new _0x5d88ab.TinySDF(24,3,8,.25,n,i)}return{id:i,bitmap:new _0x3122f8({width:30,height:30},r.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}},_0x5d88ab.loadGlyphRange=_0x2c9a5a,_0x5d88ab.TinySDF=_0x599c8a;var _0x41150a=(_0x3dda9b=!0,function(e,t){var i=_0x3dda9b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3dda9b=!1,i}),_0x53d908=_0x41150a(void 0,(function(){return _0x53d908.toString().search("(((.+)+)+)+$").toString().constructor(_0x53d908).search("(((.+)+)+)+$")})),_0x3dda9b;_0x53d908();var _0x183e32=function(e,t){this.width=e,this.height=t,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};_0x183e32.prototype.getDash=function(e,t){var i=e.join(",")+String(t);return!this.positions[i]&&(this.positions[i]=this.addDash(e,t)),this.positions[i]},_0x183e32.prototype.addDash=function(e,t){var i=t?7:0,n=2*i+1;if(this.nextRow+n>this.height)return null;for(var r=0,o=0;o{this._triggered=!1,this._callback()})}_0x5e9308(),_0x404954.prototype.trigger=function(){!this._triggered&&(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))};const _0x1db781=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x52396f=_0x1db781(void 0,(function(){return _0x52396f.toString().search("(((.+)+)+)+$").toString().constructor(_0x52396f).search("(((.+)+)+)+$")}));function _0x58ac76(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function _0x100bea(e,t,i){this.target=e,this.parent=t,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},_0x58ac76(["receive","process"],this),this.invoker=new _0x404954(this.process),this.target.addEventListener("message",this.receive,!1)}_0x52396f(),_0x100bea.prototype.send=function(e,t,i,n){const r=++_0x100bea.taskId;i&&(this.callbacks[r]=i);const o=[];return this.target.postMessage({id:r,type:e,hasCallback:!!i,targetMapId:n,sourceMapId:this.mapId,data:_0x416c3b.serialize(t,o)},o),{cancel:()=>{i&&delete this.callbacks[r],this.target.postMessage({id:r,type:"",targetMapId:n,sourceMapId:this.mapId})}}},_0x100bea.prototype.receive=function(e){const t=e.data,i=t.id;if(i&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[i];const e=this.cancelCallbacks[i];delete this.cancelCallbacks[i],e&&e()}else this.tasks[i]=t,this.taskQueue.push(i),this.invoker.trigger()},_0x100bea.prototype.process=function(){if(!this.taskQueue.length)return;const e=this.taskQueue.shift(),t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t)if(""===t.type){const i=this.callbacks[e];delete this.callbacks[e],i&&(t.error?i(_0x416c3b.deserialize(t.error)):i(null,_0x416c3b.deserialize(t.data)))}else{let i=!1;const n=t.hasCallback?(t,n)=>{i=!0,delete this.cancelCallbacks[e];const r=[];this.target.postMessage({id:e,type:"",sourceMapId:this.mapId,error:t?_0x416c3b.serialize(t):null,data:_0x416c3b.serialize(n,r)},r)}:e=>{i=!0};let r=null;const o=_0x416c3b.deserialize(t.data);if(this.parent[t.type])r=this.parent[t.type](t.sourceMapId,o,n);else if(this.parent.getWorkerSource){const e=t.type.split(".");r=this.parent.getWorkerSource(t.sourceMapId,e[0],o.source)[e[1]](o,n)}else n(new Error("Could not find function "+t.type));!i&&r&&r.cancel&&(this.cancelCallbacks[e]=r.cancel)}},_0x100bea.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},_0x100bea.taskId=0;const _0x1a282c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x507df8=_0x1a282c(void 0,(function(){return _0x507df8.toString().search("(((.+)+)+)+$").toString().constructor(_0x507df8).search("(((.+)+)+)+$")}));function _0x254b91(e,t){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=uniqueId();const i=this.workerPool.acquire(this.id);for(let e=0;e{i.send(e,t,n)}),i)},_0x254b91.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},_0x254b91.prototype.remove=function(){this.actors.forEach((e=>{e.remove()})),this.actors=[],this.workerPool.release(this.id)},_0x254b91.Actor=_0x100bea;const _0x273769=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x29f023=_0x273769(void 0,(function(){return _0x29f023.toString().search("(((.+)+)+)+$").toString().constructor(_0x29f023).search("(((.+)+)+)+$")}));function _0x51ad98(){this.active={}}_0x29f023(),_0x51ad98.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length<_0x51ad98.workerCount;)this.workers.push(new window.Worker(window.mvtWorkerUrl));return this.active[e]=!0,this.workers.slice()},_0x51ad98.prototype.release=function(e){delete this.active[e],0===Object.keys(this.active).length&&(this.workers.forEach((e=>{e.terminate()})),this.workers=[])};const _0x49eef3=Math.floor(s$Y.hardwareConcurrency/2);_0x51ad98.workerCount=Math.max(Math.min(_0x49eef3,6),1);const _0x58b6b5=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x7bec5d=_0x58b6b5(void 0,(function(){return _0x7bec5d.toString().search("(((.+)+)+)+$").toString().constructor(_0x7bec5d).search("(((.+)+)+)+$")}));let _0x4f143b;function _0x2f8351(){return!_0x4f143b&&(_0x4f143b=new _0x51ad98),_0x4f143b}function n$I(e,t){if(e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).billboardStyle)){var i=e.billboardStyle;e.image=u$_(i.image,void 0)}if(e$2b(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$16("disableDepthTestDistance must be greater than or equal to 0.0.");var n=e.translucencyByDistance,r=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,a=e.distanceDisplayCondition;if(e$2b(n)){if(n.far<=n.near)throw new t$16("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=o$Y.clone(n)}if(e$2b(r)){if(r.far<=r.near)throw new t$16("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");r=o$Y.clone(r)}if(e$2b(o)){if(o.far<=o.near)throw new t$16("scaleByDistance.far must be greater than scaleByDistance.near.");o=o$Y.clone(o)}if(e$2b(a)){if(a.far<=a.near)throw new t$16("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");a=r$Y.clone(a)}this._show=u$_(e.show,!0),this._position=o$1p.clone(u$_(e.position,o$1p.ZERO)),this._actualPosition=o$1p.clone(this._position),this._volTexCoord=o$1p.clone(u$_(e.volTexCoord,o$1p.ZERO)),this._pixelOffset=o$1o.clone(u$_(e.pixelOffset,o$1o.ZERO)),this._translate=new o$1o(0,0),this._eyeOffset=o$1p.clone(u$_(e.eyeOffset,o$1p.ZERO)),this._heightReference=u$_(e.heightReference,k$P.NONE),this._verticalOrigin=u$_(e.verticalOrigin,S$O.CENTER),this._horizontalOrigin=u$_(e.horizontalOrigin,j$T.CENTER),this._scale=u$_(e.scale,1),this._color=e$1U.clone(u$_(e.color,e$1U.WHITE)),this._rotation=u$_(e.rotation,0),this._alignedAxis=o$1p.clone(u$_(e.alignedAxis,o$1p.ZERO)),this._width=e.width,this._height=e.height,this._scaleByDistance=o,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=r,this._sizeInMeters=u$_(e.sizeInMeters,!1),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=u$_(e.collection,t),this._pickId=void 0,this._pickPrimitive=u$_(e._pickPrimitive,this),this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageIndex=-1,this._imageIndexPromise=void 0,this._imageId=void 0,this._image=u$_(e.image,void 0),this._imageSubRegion=void 0,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0,this._mvtLayerID=e.mvtLayerID,this._mapName=e.mapName,this._mvtProperties=e.mvtProperties,this._associativeMvtLabel=void 0;var s=e.image,l=e.imageId;e$2b(s)&&(e$2b(l)||(l="string"==typeof s?s:e$2b(s.src)?s.src:e$1Q()),this._imageId=l,this._image=s),e$2b(e.imageSubRegion)&&(this._imageId=l,this._imageSubRegion=e.imageSubRegion),e$2b(this._billboardCollection._textureAtlas)&&this._loadImage(),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=C$13.SCENE3D,this._clusterShow=!0,this._outlineColor=e$1U.clone(u$_(e.outlineColor,e$1U.BLACK)),this._outlineWidth=u$_(e.outlineWidth,0),this._updateClamping(),this._screenSpacePosition=new o$1o,this._opacityState={opacity:0,placed:!1}}_0x7bec5d();var L$X=n$I.SHOW_INDEX=0,T$P=n$I.POSITION_INDEX=1,F$W=n$I.PIXEL_OFFSET_INDEX=2,Z$N=n$I.EYE_OFFSET_INDEX=3,U$R=n$I.HORIZONTAL_ORIGIN_INDEX=4,j$R=n$I.VERTICAL_ORIGIN_INDEX=5,J$L=n$I.SCALE_INDEX=6,w$O=n$I.IMAGE_INDEX_INDEX=7,z$N=n$I.COLOR_INDEX=8,K$K=n$I.ROTATION_INDEX=9,Q$O=n$I.ALIGNED_AXIS_INDEX=10,$$Q=n$I.SCALE_BY_DISTANCE_INDEX=11,ii$5=n$I.TRANSLUCENCY_BY_DISTANCE_INDEX=12,ei$4=n$I.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,ti$5=n$I.DISTANCE_DISPLAY_CONDITION=14,ni$5=n$I.DISABLE_DEPTH_DISTANCE=15;n$I.TEXTURE_COORDINATE_BOUNDS=16;var si$5=n$I.VOL_TEXCOORD_INDEX=17,W$S=n$I.SDF_INDEX=18,ai$6=n$I.OPACITY_STATE_INDEX=19;function o$R(e,t){var i=e._billboardCollection;e$2b(i)&&(i._updateBillboard(e,t),e._dirty=!0)}n$I.NUMBER_OF_PROPERTIES=20,Object.defineProperties(n$I.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._show!==e&&(this._show=e,o$R(this,L$X))}},position:{get:function(){return this._position},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._position;o$1p.equals(t,e)||(o$1p.clone(e,t),o$1p.clone(e,this._actualPosition),this._updateClamping(),o$R(this,T$P))}},heightReference:{get:function(){return this._heightReference},set:function(e){if(!e$2b(e))throw new t$16("value is required.");e!==this._heightReference&&(this._heightReference=e,this._updateClamping(),o$R(this,T$P))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._pixelOffset;o$1o.equals(t,e)||(o$1o.clone(e,t),o$R(this,F$W))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._scaleByDistance;o$Y.equals(t,e)||(this._scaleByDistance=o$Y.clone(e,t),o$R(this,$$Q))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._translucencyByDistance;o$Y.equals(t,e)||(this._translucencyByDistance=o$Y.clone(e,t),o$R(this,ii$5))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._pixelOffsetScaleByDistance;o$Y.equals(t,e)||(this._pixelOffsetScaleByDistance=o$Y.clone(e,t),o$R(this,ei$4))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._eyeOffset;o$1p.equals(t,e)||(o$1p.clone(e,t),o$R(this,Z$N))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._horizontalOrigin!==e&&(this._horizontalOrigin=e,o$R(this,U$R))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._verticalOrigin!==e&&(this._verticalOrigin=e,o$R(this,j$R))}},scale:{get:function(){return this._scale},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._scale!==e&&(this._scale=e,o$R(this,J$L))}},color:{get:function(){return this._color},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._color;e$1U.equals(t,e)||(e$1U.clone(e,t),o$R(this,z$N))}},rotation:{get:function(){return this._rotation},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._rotation!==e&&(this._rotation=e,o$R(this,K$K))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._alignedAxis;o$1p.equals(t,e)||(o$1p.clone(e,t),o$R(this,Q$O))}},width:{get:function(){return u$_(this._width,this._imageWidth)},set:function(e){this._width!==e&&(this._width=e,o$R(this,w$O))}},height:{get:function(){return u$_(this._height,this._imageHeight)},set:function(e){this._height!==e&&(this._height=e,o$R(this,w$O))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,o$R(this,z$N))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!r$Y.equals(e,this._distanceDisplayCondition)){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");this._distanceDisplayCondition=r$Y.clone(e,this._distanceDisplayCondition),o$R(this,ti$5)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(e$2b(e)&&e<0)throw new t$16("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,o$R(this,ni$5)}}},volTextureCoord:{get:function(){return this._volTexCoord},set:function(e){this._volTexCoord!==e&&(this._volTexCoord=e,o$R(this,si$5))}},id:{get:function(){return this._id},set:function(e){this._id=e,e$2b(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,e$2b(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageId},set:function(e){e$2b(e)?"string"==typeof e?this.setImage(e,e):e instanceof t$11?this.setImage(e.url,e):e$2b(e.src)?this.setImage(e.src,e):this.setImage(e$1Q(),e):(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=void 0,this._image=void 0,this._imageIndexPromise=void 0,o$R(this,w$O))}},ready:{get:function(){return-1!==this._imageIndex}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=o$1p.clone(e,this._actualClampedPosition),o$R(this,T$P)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,o$R(this,L$X))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._outlineColor;e$1U.equals(t,e)||(e$1U.clone(e,t),o$R(this,W$S))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,o$R(this,W$S))}},opacityState:{get:function(){return this._opacityState},set:function(e){(this._opacityState.opacity!==e.opacity||this._opacityState.placed!==e.placed)&&(this._opacityState={opacity:e.opacity,placed:e.placed},o$R(this,ai$6))}}}),n$I.prototype.getPickId=function(e){return e$2b(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId},n$I.prototype._updateClamping=function(){n$I._updateClamping(this._billboardCollection,this)};var C$T=new a$18,b$12=new o$1p;n$I._updateClamping=function(e,t){var i=e._scene;if(e$2b(i)&&e$2b(i.globe)){var n=i.globe,r=n.ellipsoid,o=n._surface,a=i.frameState.mode,s=a!==t._mode;if(t._mode=a,(t._heightReference===k$P.NONE||s)&&e$2b(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference!==k$P.NONE&&e$2b(t._position)){var l=r.cartesianToCartographic(t._position);if(e$2b(l)){e$2b(t._removeCallbackFunc)&&t._removeCallbackFunc();e=u$_(t._labelCollection,t._billboardCollection);t._removeCallbackFunc=o.updateHeight(l,c,e$2b(e)&&e._isMVT?void 0:i),a$18.clone(l,C$T);var u=n.getHeight(l);e$2b(u)&&(C$T.height=u),r.cartographicToCartesian(C$T,b$12),a!==C$13.SCENE3D&&(b$12=m$17.convertToColumbusCartesian(b$12)),c(b$12)}else t._actualClampedPosition=void 0}}else if(t._heightReference!==k$P.NONE)throw new t$16("Height reference is not supported without a scene and globe.");function c(e){if(t._heightReference===k$P.RELATIVE_TO_GROUND)if(t._mode===C$13.SCENE3D){var i=r.cartesianToCartographic(e,C$T);i.height+=l.height,r.cartographicToCartesian(i,e)}else e.x+=l.height;t._clampedPosition=o$1p.clone(e,t._clampedPosition)}},n$I.prototype._loadImage=function(){var e,t=this._billboardCollection._textureAtlas,i=this._imageId,n=this._image,r=this._imageSubRegion;if(e$2b(n)&&(e=t.addImage(i,n)),e$2b(r)&&(e=t.addSubRegion(i,r)),this._imageIndexPromise=e,e$2b(e)){var o=this;e.then((function(e){if(o._imageId===i&&o._image===n&&f$18.equals(o._imageSubRegion,r)){var a=t.textureCoordinates[e];o._imageWidth=t.texture.width*a.width,o._imageHeight=t.texture.height*a.height,o._imageIndex=e,o._ready=!0,o._image=void 0,o._imageIndexPromise=void 0,o$R(o,w$O)}})).otherwise((function(e){console.error("Error loading image for billboard: "+e),o._imageIndexPromise=void 0}))}},n$I.prototype.setImage=function(e,t){if(!e$2b(e))throw new t$16("id is required.");if(!e$2b(t))throw new t$16("image is required.");this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,e$2b(this._billboardCollection._textureAtlas)&&this._loadImage())},n$I.prototype.setImageSubRegion=function(e,t){if(!e$2b(e))throw new t$16("id is required.");if(!e$2b(t))throw new t$16("subRegion is required.");this._imageId===e&&f$18.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=f$18.clone(t),e$2b(this._billboardCollection._textureAtlas)&&this._loadImage())},n$I.prototype._setTranslate=function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._translate;o$1o.equals(t,e)||(o$1o.clone(e,t),o$R(this,F$W))},n$I.prototype._getActualPosition=function(){return e$2b(this._clampedPosition)?this._clampedPosition:this._actualPosition},n$I.prototype._setActualPosition=function(e){e$2b(this._clampedPosition)||o$1p.clone(e,this._actualPosition),o$R(this,T$P)};var H$U=new e$29;n$I._computeActualPosition=function(e,t,i,n){return e$2b(e._clampedPosition)?(i.mode!==e._mode&&e._updateClamping(),e._clampedPosition):i.mode===C$13.SCENE3D?t:(p$1d.multiplyByPoint(n,t,H$U),s$Q.computeActualWgs84Position(i,H$U))};var M$T=new o$1p;n$I._computeScreenSpacePosition=function(e,t,i,n,r,o){var a=p$1d.multiplyByPoint(e,t,M$T),s=s$Q.wgs84WithEyeOffsetToWindowCoordinates(r,a,i,o);if(e$2b(s))return o$1o.add(s,n,s),s};var v$G=new o$1o(0,0);n$I.prototype.computeScreenSpacePosition=function(e,t){var i=this._billboardCollection;if(e$2b(t)||(t=this._screenSpacePosition),!e$2b(i))throw new t$16("Billboard must be in a collection. Was it removed?");if(!e$2b(e))throw new t$16("scene is required.");o$1o.clone(this._pixelOffset,v$G),o$1o.add(v$G,this._translate,v$G);var n=i.modelMatrix,r=this._position;if(e$2b(this._clampedPosition)&&(r=this._clampedPosition,e.mode!==C$13.SCENE3D)){var o=e.mapProjection,a=o.ellipsoid,s=o.unproject(r,C$T);r=a.cartographicToCartesian(s,M$T),n=p$1d.IDENTITY}return n$I._computeScreenSpacePosition(n,r,this._eyeOffset,v$G,e,t)},n$I.getScreenSpaceBoundingBox=function(e,t,i){var n=e.width,r=e.height,o=e.scale;n*=o,r*=o;var a=t.x;e.horizontalOrigin===j$T.RIGHT?a-=n:e.horizontalOrigin===j$T.CENTER&&(a-=.5*n);var s=t.y;return e.verticalOrigin===S$O.BOTTOM||e.verticalOrigin===S$O.BASELINE?s-=r:e.verticalOrigin===S$O.CENTER&&(s-=.5*r),e$2b(i)||(i=new f$18),i.x=a,i.y=s,i.width=n,i.height=r,i},n$I.prototype.equals=function(e){return this===e||e$2b(e)&&this._id===e._id&&o$1p.equals(this._position,e._position)&&this._imageId===e._imageId&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&f$18.equals(this._imageSubRegion,e._imageSubRegion)&&e$1U.equals(this._color,e._color)&&o$1o.equals(this._pixelOffset,e._pixelOffset)&&o$1o.equals(this._translate,e._translate)&&o$1p.equals(this._eyeOffset,e._eyeOffset)&&o$Y.equals(this._scaleByDistance,e._scaleByDistance)&&o$Y.equals(this._translucencyByDistance,e._translucencyByDistance)&&o$Y.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&r$Y.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},n$I.prototype._destroy=function(){e$2b(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),e$2b(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0},n$I.prototype.setBillboardStyle=function(e){!e$2b(e)||(this.image=u$_(e.image,this._image))};const _0x2d144b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5e0762=_0x2d144b(void 0,(function(){return _0x5e0762.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e0762).search("(((.+)+)+)+$")}));_0x5e0762();class _0x772bf3{constructor(e,t,i){const n=this.boxCells=[],r=this.circleCells=[];this.xCellCount=Math.ceil(e/i),this.yCellCount=Math.ceil(t/i);for(let e=0;ethis.width||n<0||t>this.height)return!r&&[];const a=[];if(e<=0&&t<=0&&this.width<=i&&this.height<=n){if(r)return!0;for(let e=0;e0:a}}_queryCircle(e,t,i,n,r){const o=e-i,a=e+i,s=t-i,l=t+i;if(a<0||o>this.width||l<0||s>this.height)return!n&&[];const u=[],c={hitTest:n,circle:{x:e,y:t,radius:i},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,u,c,r),n?u.length>0:u}query(e,t,i,n,r){return this._query(e,t,i,n,!1,r)}hitTest(e,t,i,n,r){return this._query(e,t,i,n,!0,r)}hitTestCircle(e,t,i,n){return this._queryCircle(e,t,i,!0,n)}_queryCell(e,t,i,n,r,o,a,s){const l=a.seenUids,u=this.boxCells[r];if(null!==u){const r=this.bboxes;for(const c of u)if(!l.box[c]){l.box[c]=!0;const u=4*c;if(e<=r[u+2]&&t<=r[u+3]&&i>=r[u+0]&&n>=r[u+1]&&(!s||s(this.boxKeys[c]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[c],x1:r[u],y1:r[u+1],x2:r[u+2],y2:r[u+3]})}}}const c=this.circleCells[r];if(null!==c){const r=this.circles;for(const u of c)if(!l.circle[u]){l.circle[u]=!0;const c=3*u;if(this._circleAndRectCollide(r[c],r[c+1],r[c+2],e,t,i,n)&&(!s||s(this.circleKeys[u]))){if(a.hitTest)return o.push(!0),!0;{const e=r[c],t=r[c+1],i=r[c+2];o.push({key:this.circleKeys[u],x1:e-i,y1:t-i,x2:e+i,y2:t+i})}}}}}_queryCellCircle(e,t,i,n,r,o,a,s){const l=a.circle,u=a.seenUids,c=this.boxCells[r];if(null!==c){const e=this.bboxes;for(const t of c)if(!u.box[t]){u.box[t]=!0;const i=4*t;if(this._circleAndRectCollide(l.x,l.y,l.radius,e[i+0],e[i+1],e[i+2],e[i+3])&&(!s||s(this.boxKeys[t])))return o.push(!0),!0}}const h=this.circleCells[r];if(null!==h){const e=this.circles;for(const t of h)if(!u.circle[t]){u.circle[t]=!0;const i=3*t;if(this._circlesCollide(e[i],e[i+1],e[i+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[t])))return o.push(!0),!0}}}_forEachCell(e,t,i,n,r,o,a,s){const l=this._convertToXCellCoord(e),u=this._convertToYCellCoord(t),c=this._convertToXCellCoord(i),h=this._convertToYCellCoord(n);for(let d=l;d<=c;d++)for(let l=u;l<=h;l++){const u=this.xCellCount*l+d;if(r.call(this,e,t,i,n,u,o,a,s))return}}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,i,n,r,o){const a=n-e,s=r-t,l=i+o;return l*l>a*a+s*s}_circleAndRectCollide(e,t,i,n,r,o,a){const s=(o-n)/2,l=Math.abs(e-(n+s));if(l>s+i)return!1;const u=(a-r)/2,c=Math.abs(t-(r+u));if(c>u+i)return!1;if(l<=s||c<=u)return!0;const h=l-s,d=c-u;return h*h+d*d<=i*i}}const _0x2d175b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x197ec5=_0x2d175b(void 0,(function(){return _0x197ec5.toString().search("(((.+)+)+)+$").toString().constructor(_0x197ec5).search("(((.+)+)+)+$")}));_0x197ec5();const _0x52f08b=100;class _0x4024c{constructor(e,t,i,n,r){this.transform=i,this.grid=n||new _0x772bf3(e+2*_0x52f08b,t+2*_0x52f08b,25),this.ignoredGrid=r||new _0x772bf3(e+2*_0x52f08b,t+2*_0x52f08b,25),this.pitchfactor=Math.cos(i._pitch)*i.cameraToCenterDistance,this.screenRightBoundary=e+_0x52f08b,this.screenBottomBoundary=t+_0x52f08b,this.gridRightBoundary=e+2*_0x52f08b,this.gridBottomBoundary=t+2*_0x52f08b}placeCollisionBox(e,t,i){const n=e.x1,r=e.y1,o=e.x2,a=e.y2;return!this.isInsideGrid(n,r,o,a)||!t&&this.grid.hitTest(n,r,o,a,i)?{box:[],offscreen:!1}:{box:[n,r,o,a],offscreen:this.isOffscreen(n,r,o,a)}}approximateTileDistance(e,t,i,n,r){const o=r?1:n/this.pitchfactor,a=e.lastSegmentViewportDistance*i;return e.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(t))}placeCollisionCircles(e,t,i,n,r,o,a,s,l,u,c,h,d){const f=[],p=this.projectAnchor(l,r.anchorX,r.anchorY),_=s/24,m=r.lineOffsetX*s,g=r.lineOffsetY*s,x=new Point(r.anchorX,r.anchorY),v=projection.project(x,u).point,y=projection.placeFirstAndLastGlyph(_,a,m,g,!1,v,x,r,o,u,{},!0);let $=!1,b=!1,T=!0;const C=p.perspectiveRatio*n,S=1/(n*i);let w=0,E=0;y&&(w=this.approximateTileDistance(y.first.tileDistance,y.first.angle,S,p.cameraDistance,h),E=this.approximateTileDistance(y.last.tileDistance,y.last.angle,S,p.cameraDistance,h));for(let i=0;iE){_0x4de5e4(e,i,!1);continue}const s=this.projectPoint(l,n,r),u=o*C;if(f.length>0){const t=s.x-f[f.length-4],n=s.y-f[f.length-3];if(u*u*2>t*t+n*n){if(i+8-w&&t=this.screenRightBoundary||n<_0x52f08b||t>this.screenBottomBoundary}isInsideGrid(e,t,i,n){return i>=0&&e=0&&t0&&t._visible){i.collisionIndex.insertCollisionBox(e.box,!1,o),this.placements[o]=new _0x40d9f3(!0,!1,e.offscreen)}}}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const t=this.prevPlacement;let i=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;const n=t?t.symbolFadeChange(e):1,r=t?t.opacities:{};for(const e in this.placements){const t=this.placements[e],o=r[e];o?(this.opacities[e]=new _0x315e28(o,n,t.text,t.icon),i=i||t.text!==o.text.placed||t.icon!==o.icon.placed):(this.opacities[e]=new _0x315e28(null,n,t.text,t.icon,t.skipFade),i=i||t.text||t.icon)}for(const e in r){const t=r[e];if(!this.opacities[e]){const r=new _0x315e28(t,n,!1,!1);!r.isHidden()&&(this.opacities[e]=r,i=i||t.text.placed||t.icon.placed)}}i?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){const i=new _0x315e28(null,0,!1,!1,!0);for(var n=0;ne}setStale(){this.stale=!0}}const _0x3d9437=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x368a0d=_0x3d9437(void 0,(function(){return _0x368a0d.toString().search("(((.+)+)+)+$").toString().constructor(_0x368a0d).search("(((.+)+)+)+$")}));_0x368a0d();class _0x53d1bc{constructor(){this._currentTileIndex=0}continuePlacement(e,t,i,n){for(;this._currentTileIndex{const e=performance.now()-n;return!this._forceFullPlacement&&e>2};for(;this._currentPlacementIndex>=0;){const n=t[e[this._currentPlacementIndex]];if(n){if(this.placement.collisionIndex.transform.zoom,"symbol"===n.type){if("point"!==n.layout.get("symbol-placement")){this._currentPlacementIndex--;continue}!this._inProgressLayer&&(this._inProgressLayer=new _0x53d1bc);if(this._inProgressLayer.continuePlacement(i,this.placement,n,r))return;delete this._inProgressLayer}this._currentPlacementIndex--}else this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}var _0x2cda14=(_0x5f73b9=!0,function(e,t){var i=_0x5f73b9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f73b9=!1,i}),_0x3e6014=_0x2cda14(void 0,(function(){return _0x3e6014.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e6014).search("(((.+)+)+)+$")})),_0x5f73b9;function _0x4ae6a8(e){this.dispatcher=new _0x254b91(_0x2f8351(),this),this._layers={},this._order=[],this.sourceCaches={},this._loaded=!1,this.highLighting=!1,this.imageManager=new _0x38c377,this.glyphManager=new _0x5d88ab(e._requestManager,e._localIdeographFontFamily),this.lineAtlas=new _0x183e32(256,512),this.map=e,this._resetUpdates()}_0x3e6014(),_0x4ae6a8.prototype._load=function(e){for(var t in this._loaded=!0,this.stylesheet=e,e.sources);e.sprite?this._spriteRequest=_0x5bef2f(e.sprite,this.map._requestManager,((e,t)=>{if(this._spriteRequest=null,e);else if(t)for(const e in t)this.imageManager.addImage(e,t[e]);this.imageManager.setLoaded(!0),this.dispatcher.broadcast("setImages",this.imageManager.listImages()),this.map._resourceReady=!0})):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var i=this.stylesheet.layers;this._order=i.map((function(e){return e.id})),this._layers={};for(var n=0,r=i;n=r&&(n=l,r=u)}}return n},_0x4ae6a8.prototype._updatePlacement=function(e,t,i){let n=!1;var r=this.map.innerLayer._imageryCache,o=[];for(var a in r)o.push(r[a]);o.sort((function(e,t){return t.level-e.level||(e.isTileIDLessThan(t)?-1:1)}));const s=this._layerOrderChanged||0===i;if((s||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(window.performance.now(),t.zoom))&&(this.pauseablePlacement=new _0x1b1ac8(e,t,this._order,s,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,o),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(window.performance.now()),n=!0)),n)for(const e of this._order){const t=this._layers[e];t&&"symbol"===t.type&&this.placement.updateLayerOpacities(t,o)}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(performance.now())},_0x4ae6a8.prototype.getImages=function(e,t,i){this.imageManager.getImages(t.icons,i)},_0x4ae6a8.prototype.getGlyphs=function(e,t,i){this.glyphManager.getGlyphs(t.stacks,i)},_0x4ae6a8.prototype.getResource=function(e,t,i){return makeRequest(t,i)};const _0x44f09b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x312361=_0x44f09b(void 0,(function(){return _0x312361.toString().search("(((.+)+)+)+$").toString().constructor(_0x312361).search("(((.+)+)+)+$")}));_0x312361();class _0x420acd{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))}setNorthEast(e){return this._ne=e instanceof _0xf8942b?new _0xf8942b(e.lng,e.lat):_0xf8942b.convert(e),this}setSouthWest(e){return this._sw=e instanceof _0xf8942b?new _0xf8942b(e.lng,e.lat):_0xf8942b.convert(e),this}extend(e){const t=this._sw,i=this._ne;let n,r;if(e instanceof _0xf8942b)n=e,r=e;else{if(!(e instanceof _0x420acd))return Array.isArray(e)?e.every(Array.isArray)?this.extend(_0x420acd.convert(e)):this.extend(_0xf8942b.convert(e)):this;if(n=e._sw,r=e._ne,!n||!r)return this}return t||i?(t.lng=Math.min(n.lng,t.lng),t.lat=Math.min(n.lat,t.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new _0xf8942b(n.lng,n.lat),this._ne=new _0xf8942b(r.lng,r.lat)),this}getCenter(){return new _0xf8942b((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new _0xf8942b(this.getWest(),this.getNorth())}getSouthEast(){return new _0xf8942b(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"}isEmpty(){return!(this._sw&&this._ne)}contains(e){const{lng:t,lat:i}=_0xf8942b.convert(e),n=this._sw.lat<=i&&i<=this._ne.lat;let r=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(r=this._sw.lng>=t&&t>=this._ne.lng),n&&r}static convert(e){return!e||e instanceof _0x420acd?e:new _0x420acd(e)}}const _0x517c32=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x35b993=_0x517c32(void 0,(function(){return _0x35b993.toString().search("(((.+)+)+)+$").toString().constructor(_0x35b993).search("(((.+)+)+)+$")}));_0x35b993();class _0xf8942b{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new _0xf8942b(wrap(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return"LngLat("+this.lng+", "+this.lat+")"}toBounds(e){const t=360*e/40075017,i=t/Math.cos(Math.PI/180*this.lat);return new _0x420acd(new _0xf8942b(this.lng-i,this.lat-t),new _0xf8942b(this.lng+i,this.lat+t))}static convert(e){if(e instanceof _0xf8942b)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new _0xf8942b(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new _0xf8942b(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const _0x3b3357=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1cf9f8=_0x3b3357(void 0,(function(){return _0x1cf9f8.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cf9f8).search("(((.+)+)+)+$")}));_0x1cf9f8();const _0x552f1b=2*Math.PI*6378137;function _0x446ace(e){return _0x552f1b*Math.cos(e*Math.PI/180)}function mercatorXfromLng(e){return(180+e)/360}function mercatorYfromLat(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function mercatorZfromAltitude(e,t){return e/_0x446ace(t)}function lngFromMercatorX(e){return 360*e-180}function latFromMercatorY(e){const t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}function altitudeFromMercatorZ(e,t){return e*_0x446ace(latFromMercatorY(t))}function mercatorScale(e){return 1/Math.cos(e*Math.PI/180)}class _0x3ee3e9{constructor(e,t,i=0){this.x=+e,this.y=+t,this.z=+i}static fromLngLat(e,t=0){const i=_0xf8942b.convert(e);return new _0x3ee3e9(mercatorXfromLng(i.lng),mercatorYfromLat(i.lat),mercatorZfromAltitude(t,i.lat))}toLngLat(){return new _0xf8942b(lngFromMercatorX(this.x),latFromMercatorY(this.y))}toAltitude(){return altitudeFromMercatorZ(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/_0x552f1b*mercatorScale(latFromMercatorY(this.y))}}const _0x542ca2=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x145e66=_0x542ca2(void 0,(function(){return _0x145e66.toString().search("(((.+)+)+)+$").toString().constructor(_0x145e66).search("(((.+)+)+)+$")}));_0x145e66();class _0x183136{constructor(e,t,i,n,r){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===r||r,this._minZoom=e||0,this._maxZoom=t||26,this._minPitch=null==i?0:i,this._maxPitch=null==n?60:n,this.setMaxBounds(),this.width=0,this.height=0,this._center=new _0xf8942b(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const e=new _0x183136(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._calcMatrices(),e}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get centerPoint(){return this.size._div(2)}get size(){return new _0x46bdc2(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(e){const t=-wrap(e,-180,180)*Math.PI/180;this.angle!==t&&(this._unmodified=!1,this.angle=t,this._calcMatrices(),this.rotationMatrix=mat2.create(),mat2.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(e){const t=clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==t&&(this._unmodified=!1,this._pitch=t,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(e){const t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())}get center(){return this._center}set center(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}coveringZoomLevel(e){const t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)}getVisibleUnwrappedCoordinates(e){const t=[new UnwrappedTileID(0,e)];if(this._renderWorldCopies){const i=this.pointCoordinate(new _0x46bdc2(0,0)),n=this.pointCoordinate(new _0x46bdc2(this.width,0)),r=this.pointCoordinate(new _0x46bdc2(this.width,this.height)),o=this.pointCoordinate(new _0x46bdc2(0,this.height)),a=Math.floor(Math.min(i.x,n.x,r.x,o.x)),s=Math.floor(Math.max(i.x,n.x,r.x,o.x)),l=1;for(let i=a-l;i<=s+l;i++)0!==i&&t.push(new UnwrappedTileID(i,e))}return t}coveringTiles(e){let t=this.coveringZoomLevel(e);const i=t;if(void 0!==e.minzoom&&te.maxzoom&&(t=e.maxzoom);const n=_0x3ee3e9.fromLngLat(this.center),r=Math.pow(2,t),o=new _0x46bdc2(r*n.x-.5,r*n.y-.5),a=[this.pointCoordinate(new _0x46bdc2(0,0)),this.pointCoordinate(new _0x46bdc2(this.width,0)),this.pointCoordinate(new _0x46bdc2(this.width,this.height)),this.pointCoordinate(new _0x46bdc2(0,this.height))];return tileCover(t,a,e.reparseOverscaled?i:t,this._renderWorldCopies).sort(((e,t)=>o.dist(e.canonical)-o.dist(t.canonical)))}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(e){const t=clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new _0x46bdc2(mercatorXfromLng(e.lng)*this.worldSize,mercatorYfromLat(t)*this.worldSize)}unproject(e){return new _0x3ee3e9(e.x/this.worldSize,e.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}setLocationAtPoint(e,t){const i=this.pointCoordinate(t),n=this.pointCoordinate(this.centerPoint),r=this.locationCoordinate(e),o=new _0x3ee3e9(r.x-(i.x-n.x),r.y-(i.y-n.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(e){return this.coordinatePoint(this.locationCoordinate(e))}pointLocation(e){return this.coordinateLocation(this.pointCoordinate(e))}locationCoordinate(e){return _0x3ee3e9.fromLngLat(e)}coordinateLocation(e){return e.toLngLat()}pointCoordinate(e){const t=[e.x,e.y,0,1],i=[e.x,e.y,1,1];vec4.transformMat4(t,t,this.pixelMatrixInverse),vec4.transformMat4(i,i,this.pixelMatrixInverse);const n=t[3],r=i[3],o=t[1]/n,a=i[1]/r,s=t[2]/n,l=i[2]/r,u=s===l?0:(0-s)/(l-s);return new _0x3ee3e9(interpolate(t[0]/n,i[0]/r,u)/this.worldSize,interpolate(o,a,u)/this.worldSize)}coordinatePoint(e){const t=[e.x*this.worldSize,e.y*this.worldSize,0,1];return vec4.transformMat4(t,t,this.pixelMatrix),new _0x46bdc2(t[0]/t[3],t[1]/t[3])}getBounds(){return(new _0x420acd).extend(this.pointLocation(new _0x46bdc2(0,0))).extend(this.pointLocation(new _0x46bdc2(this.width,0))).extend(this.pointLocation(new _0x46bdc2(this.width,this.height))).extend(this.pointLocation(new _0x46bdc2(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new _0x420acd([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}setMaxBounds(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(e,t=!1){const i=e.key,n=t?this._alignedPosMatrixCache:this._posMatrixCache;if(n[i])return n[i];const r=e.canonical,o=this.worldSize/this.zoomScale(r.z),a=r.x+Math.pow(2,r.z)*e.wrap,s=_0x3f85ef.mat4.identity(new Float64Array(16));return _0x3f85ef.mat4.translate(s,s,[a*o,r.y*o,0]),_0x3f85ef.mat4.scale(s,s,[o/ae$s,o/ae$s,1]),_0x3f85ef.mat4.multiply(s,t?this.alignedProjMatrix:this.projMatrix,s),n[i]=new Float32Array(s),n[i]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let e,t,i,n,r=-90,o=90,a=-180,s=180;const l=this.size,u=this._unmodified;if(this.latRange){const t=this.latRange;r=mercatorYfromLat(t[1])*this.worldSize,o=mercatorYfromLat(t[0])*this.worldSize,e=o-ro&&(n=o-t)}if(this.lngRange){const e=c.x,t=l.x/2;e-ts&&(i=s-t)}(void 0!==i||void 0!==n)&&(this.center=this.unproject(new _0x46bdc2(void 0!==i?i:c.x,void 0!==n?n:c.y))),this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;const e=this._fov/2,t=Math.PI/2+this._pitch,i=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-t-e),n=this.point,r=n.x,o=n.y,a=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),s=this.height/50;let l=new Float64Array(16);_0x3f85ef.mat4.perspective(l,this._fov,this.width/this.height,s,a),_0x3f85ef.mat4.scale(l,l,[1,-1,1]),_0x3f85ef.mat4.translate(l,l,[0,0,-this.cameraToCenterDistance]),_0x3f85ef.mat4.rotateX(l,l,this._pitch),_0x3f85ef.mat4.rotateZ(l,l,this.angle),_0x3f85ef.mat4.translate(l,l,[-r,-o,0]),this.mercatorMatrix=_0x3f85ef.mat4.scale([],l,[this.worldSize,this.worldSize,this.worldSize]),_0x3f85ef.mat4.scale(l,l,[1,1,mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=l;const u=this.width%2/2,c=this.height%2/2,h=Math.cos(this.angle),d=Math.sin(this.angle),f=r-Math.round(r)+h*u+d*c,p=o-Math.round(o)+h*c+d*u,_=new Float64Array(l);if(_0x3f85ef.mat4.translate(_,_,[f>.5?f-1:f,p>.5?p-1:p,0]),this.alignedProjMatrix=_,l=_0x3f85ef.mat4.create(),_0x3f85ef.mat4.scale(l,l,[this.width/2,-this.height/2,1]),_0x3f85ef.mat4.translate(l,l,[1,-1,0]),this.labelPlaneMatrix=l,l=_0x3f85ef.mat4.create(),_0x3f85ef.mat4.scale(l,l,[1,-1,1]),_0x3f85ef.mat4.translate(l,l,[-1,-1,0]),_0x3f85ef.mat4.scale(l,l,[2/this.width,2/this.height,1]),this.glCoordMatrix=l,this.pixelMatrix=_0x3f85ef.mat4.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),l=_0x3f85ef.mat4.invert(new Float64Array(16),this.pixelMatrix),!l)throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const e=this.pointCoordinate(new _0x46bdc2(0,0)),t=[e.x*this.worldSize,e.y*this.worldSize,0,1];return vec4.transformMat4(t,t,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const e=this._pitch,t=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new _0x46bdc2(0,t))}getCameraQueryGeometry(e){const t=this.getCameraPoint();if(1===e.length)return[e[0],t];{let i=t.x,n=t.y,r=t.x,o=t.y;for(const t of e)i=Math.min(i,t.x),n=Math.min(n,t.y),r=Math.max(r,t.x),o=Math.max(o,t.y);return[new _0x46bdc2(i,n),new _0x46bdc2(r,n),new _0x46bdc2(r,o),new _0x46bdc2(i,o),new _0x46bdc2(i,n)]}}}function i$P(e,t){return 0!=(e&t)}var e$1c={None:0,QuadKey:1},X$N=Object.freeze(e$1c);function a$K(e,t,i,n){if(!e$2b(e))throw new t$16("uint8Array is required.");if(t<0)throw new t$16("byteOffset cannot be negative.");if(i<0)throw new t$16("byteLength cannot be negative.");if(t+i>e.byteLength)throw new t$16("sub-region exceeds array bounds.");return t=u$_(t,0),i=u$_(i,e.byteLength-t),n=u$_(n,"utf-8"),e=e.subarray(t,t+i),a$K.decode(e,n)}function f$Q(e,t,i){return t<=e&&e<=i}function g$W(e){for(var t=0,i=0,n=0,r=128,o=191,a=[],s=e.length,l=0;l>10),56320+(1023&o)))}return t},typeof TextDecoder<"u"?a$K.decode=a$K.decodeWithTextDecoder:a$K.decode=a$K.decodeWithFromCharCode;var We$j=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642478e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],U$Q=0;function I$10(e,t){t=u$_(t,{}),this._name=t.name,this._tilingScheme=t.tilingScheme,this._owner=void 0,this._hasTileWith=!1,e$2b(t.tileWidth)&&e$2b(t.tileHeight)&&(this._hasTileWith=!0),this._tileWidth=u$_(parseInt(t.tileWidth)||void 0,512),this._tileHeight=u$_(parseInt(t.tileHeight)||void 0,512),this._canvasWidth=u$_(parseInt(t.canvasWidth)||void 0,512),this._canvasWidth=e$2a.clamp(this._canvasWidth,128,1024),e$2b(t.minimumLevel)&&e$2b(t.maximumLevel)&&(this._hasLevel=!0),this._minimumLevel=u$_(parseInt(t.minimumLevel)||void 0,0),this._maximumLevel=parseInt(t.maximumLevel)||void 0,this.minimumTerrainLevel=parseInt(t.minimumTerrainLevel)||void 0,this.maximumTerrainLevel=parseInt(t.maximumTerrainLevel)||void 0,this._styleName=u$_(t.styleName,""),this._mapboxStyle=t.mapboxStyle,this._colDiff=0,this._rowDiff=0,this._ready=!1,this._resourceReady=!1,this._requestMetadataSuccess=!1,this._requestStyleSuccess=!1,this._readyPromise=o$1l.defer(),this._layers={},this._selectEnabled=u$_(t.selectEnabled,!0),this._selectedColor=u$_(t.selectedColor,e$1U.fromCssColorString("#00FFFF")),this._overlapDisplayedThreshold=0,this._localIdeographFontFamily=u$_(t.localIdeographFontFamily,!1),this._key=u$_(t.key,""),this._url=u$_(t.url,""),this._labelScaleByDistance=t.labelScaleByDistance,this._resource=t$11.createIfNeeded(this._url),this._context=e,this._transform=new _0x183136(0,22,0,60),this._painter=new _0x391a82(e,this._transform,this._canvasWidth),this._painter.lineAntialiasing=t.lineAntialiasing,this._requestManager=new _0x414e6d((e=>({url:e,headers:t.customRequestHeaders}))),this._MVTStyle=new _0x4ae6a8(this),this._viewer=t.viewer,this._iswmts=-1!==this._url.indexOf("wmts"),this._isgeoserver=-1!==this._url.indexOf("/geoserver/"),this._isRealspace=-1!==this._url.indexOf("rest/realspace"),this._isTdt=u$_(t.isTdt,!1),this._packingRequest=this._isRealspace?t.packingRequest:void 0,this._hasIndex=t.hasIndex||!1,this._isTdt?(this._urlTiles=this._url+"?t=vt&z={z}&x={x}&y={y}",this.tablename=this._url):this._iswmts?(this._layer=u$_(t.layer,""),this._format=u$_(t.format,"mvt"),this._tilematrixset=u$_(t.tilematrixset,""),this._minimumLevel=u$_(parseInt(t.minimumLevel)||void 0,0),this._maximumLevel=u$_(parseInt(t.maximumLevel)||void 0,0),this.tablename=this._layer+this._tilematrixset):this._isRealspace?(this._urlTiles=this._url+"/data/index/{y}/{x}.mvt?level={z}",this.tablename=this._url):(this._urlTiles=this._url+"/tiles/{z}/{x}/{y}.mvt",this.tablename=this._url),this._tileCache={},this._scales=u$_(t.scales,We$j),this._id=-1,this._errorEvent=new o$1h,this._pausing=!1,this._selectEnabled=!0,this._maxImageCacheLevel=0,this.minificationFilter=t.minificationFilter,this.magnificationFilter=t.magnificationFilter,this._renderTextureList={"512_512":new t$V({context:e,width:512,height:512,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})},this._isOverlapDisplayed=!1,this._enableMorphing=!1,this.realtime=u$_(t.realtime,!1),this._billboardMode=u$_(t.billboardMode,yr$1.None),this.selectTolerance=.2,this._customRequestHeaders=t.customRequestHeaders;var i=this;function n(){if(i._iswmts){var e=t.url+"?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities";e$2b(a$O.CREDENTIAL)&&(e=e$2b(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),o$1l(d$1f(e,i._customRequestHeaders),a,u)}else if(i._isRealspace){e=t.url+"/config";e$2b(a$O.CREDENTIAL)&&(e=e$2b(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),o$1l(u$R(e,i._customRequestHeaders),r,u)}else{var n=t.url+".json";e$2b(a$O.CREDENTIAL)&&(n=e$2b(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,n):a$O.addToken(n)),o$1l(u$Q(n,i._customRequestHeaders),l,u)}}function r(e){var t=function(e){e=o.parseFromString(e,"application/xml");for(var t="http://www.supermap.com/SuperMapCache/sci3d",n=e.childNodes[0],r=Ge$f(G$Z(n,"Levels",t),"Level",t),a=[],s=0,l=r.length;sc.rectangle.east&&(i._rectangle.east=c.rectangle.east),i._rectangle.southc.rectangle.north&&(i._rectangle.north=c.rectangle.north),i._tilingScheme=c,i._urlTemplate=i._url+"data/index/{y}/{x}.{fileExtension}?level={level}",i._ready=!0,i._requestMetadataSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}this._subdomains=t.subdomains,e$2b(this._subdomains)&&(t.url=t.url.replace(/({.*?})/g,(function(e,t){if(!e$2b(i._subdomains.length))throw new t$16("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?i._subdomains[0]:e}))),this._isTdt?function(e){if(!e._hasLevel){var t=30,i=-1;if(!e$2b(e._mapboxStyle))throw new t$16("tdt mapbox style should be passed.");for(var n in e._mapboxStyle.sources){var r=e._mapboxStyle.sources[n];t=Math.min(r.minZoom,t),i=Math.max(r.maxZoom,i)}e._minimumLevel=t,e._maximumLevel=i}e$2b(e._tilingScheme)||(e._tilingScheme=new g$13),e._coordUnit=e._tilingScheme instanceof g$13?"DEGREE":"METER",e._rectangle=h$18.clone(e._tilingScheme._rectangle),e._urlTemplate=e._url+"?t=vt&z={z}&x={x}&y={y}",e._requestMetadataSuccess=!0,A$Z(e,e._mapboxStyle),e._requestStyleSuccess=!0,e._readyPromise.resolve(!0)}(this):(n(),this._isgeoserver||function(){var e;if(e$2b(i._mapboxStyle))A$Z(i,i._mapboxStyle);else if(i._isRealspace)e=t.url+"/data/path/style.json",e$2b(a$O.CREDENTIAL)&&(e=e$2b(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),n=u$Q(e,i._customRequestHeaders);else{var n;e=i._iswmts?t.url+"?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetStyle&STYLENAME="+i._styleName:t.url+"/style.json",e$2b(a$O.CREDENTIAL)&&(e=e$2b(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),n=u$Q(e,i._customRequestHeaders)}o$1l(n,(function(e){e$2b(e)?(i._mapboxStyle=e,A$Z(i,e),i._requestStyleSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)):console.log("style request failed")}),(function(n){e=t.url+"/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true",e$2b(a$O.CREDENTIAL)&&(e=e$2b(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),u$Q(e,i._customRequestHeaders).then((function(e){i._mapboxStyle=e,A$Z(i,e),i._tileFeature=!0,i._urlTiles=i._url+"/tileFeature.mvt?returnAttributes=true&x={x}&y={y}&width=512&height=512&scale={scale}&origin={'x':-180,'y':90}"})),u()}))}());var o=new DOMParser;function a(e){var n=function(e){var t,n,r=e.firstChild,o=r.namespace,a=s$S.queryFirstNode(r,"Contents",o),s=s$S.queryNodes(a,"Layer",o);if(s.length>1)for(var l=0,u=s.length;l0){for(var r,o=null,a=null,l=0;l(r=Math.abs(t.visibleScales[l]-i[u]))))break;a=r,o=u}else a=Math.abs(t.visibleScales[l]-i[u]),o=0;o>=0&&n.push(o)}e._minimumLevel=n[0],e._maximumLevel=n[n.length-1]}}(i,e),"DEGREE"==n)e$2b(i._tilingScheme)||(i._tilingScheme=new g$13),r.left=e$2a.clamp(r.left,-180,180),r.bottom=e$2a.clamp(r.bottom,-90,90),r.right=e$2a.clamp(r.right,-180,180),r.top=e$2a.clamp(r.top,-90,90),i._rectangle=h$18.fromDegrees(r.left,r.bottom,r.right,r.top),i._urlTemplate=i._url+"/tiles/{z}/{x}/{y}.mvt";else{var l=new o$1p(r.left,r.bottom,0);l.x=Math.max(-20037508.342789244,l.x),l.y=Math.max(-20037508.342789244,l.y);var u=new o$1p(r.right,r.top,0);if(u.x=Math.min(20037508.342789244,u.x),u.y=Math.min(20037508.342789244,u.y),!e$2b(i._tilingScheme)){var c=e$2b(e.prjCoordSys)&&(3857==e.prjCoordSys.epsgCode||e$2b(e.prjCoordSys.projection)&&("PRJ_SPHERE_MERCATOR"===e.prjCoordSys.projection.type||"PRJ_TRANSVERSE_MERCATOR"===e.prjCoordSys.projection.type));i._tilingScheme=new c$R({rectangleSouthwestInMeters:c?void 0:l,rectangleNortheastInMeters:c?void 0:u})}var h=i._tilingScheme._projection.unproject(l),d=i._tilingScheme._projection.unproject(u);i._rectangle=new h$18(h.longitude,h.latitude,d.longitude,d.latitude),i._urlTemplate=i._url+"/tiles/{z}/{x}/{y}.mvt"}i._rectangle||(i._rectangle=u$_(t.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._requestMetadataSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}function u(e){var t,r="An error occurred while accessing "+i._url+".";t=l$W.handleError(t,i,i._errorEvent,r,void 0,void 0,void 0,n),i._readyPromise.reject(new RuntimeError(r))}}function ke$c(e,t){if(e$2b(t.metadata)&&e$2b(t.metadata.indexbounds)){var i=-180,n=-270,r=360;e$2b(t.metadata.epsgcode)&&("3857"==t.metadata.epsgcode||t.metadata.indexbounds[0]<-180)&&(i=-20037508.3427892,n="METER"==e._coordUnit?-20037508.3427892:-30056262.5141838,r=40075016.6855784);var o=t.metadata.indexbounds,a=(o[0]-i)/r,s=(o[1]-n)/r;e._colDiff=a,e._rowDiff=s}}function A$Z(e,t){e._MVTStyle._load(t),ke$c(e,t)}function oe$s(e,t,i){var n=Math.pow(2,t);return e+Math.round(n*i)}function He$a(e){e.priority=U$Q,e.throttle=!0,(U$Q+=.001)>100&&(U$Q=0)}function ue$x(e,t,i){return{mvt:!0,colorTexture:new t$V({context:e._context,width:e._canvasWidth,height:e._canvasWidth,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,generateMipmap:!0,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:u$_(e.minificationFilter,tt$h.LINEAR_MIPMAP_LINEAR),magnificationFilter:u$_(e.magnificationFilter,rt$i.LINEAR)})}),rawData:t,indexData:i}}Object.defineProperties(I$10.prototype,{name:{get:function(){return this._name}},proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel>18?this._maximumLevel:18}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},isOverlapDisplayed:{get:function(){return this._isOverlapDisplayed},set:function(e){this._isOverlapDisplayed=e}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready&&this._resourceReady}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}},mapboxStyle:{get:function(){return this._mapboxStyle},set:function(e){this._mapboxStyle=e,e$2b(this._mapboxStyle)&&A$Z(this,this._mapboxStyle)}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2b(e)&&!e$2b(e.length))throw new t$16("Excepted MvtProvider.subdomains to be type of Array.");this._subdomains=e}},globalLineWidthScale:{get:function(){return this._painter._globalLineWidthScale},set:function(e){this._painter._globalLineWidthScale=e}},lineAntialiasing:{get:function(){return this._painter._lineAntialiasing},set:function(e){this._painter._lineAntialiasing=e}},enableMorphing:{get:function(){return this._enableMorphing},set:function(e){this._enableMorphing=e}},billboardMode:{get:function(){return this._billboardMode}},selectedColor:{get:function(){return this._selectedColor},set:function(e){this._selectedColor=e}}}),I$10.prototype.getTileCredits=function(e,t,i){},I$10.prototype.resetVisible=function(){var e=this.innerLayer._imageryCache;for(var t in e)e[t]._visible=!1},I$10.prototype.update=function(e,t,i){var n=this.innerLayer._imageryCache;this._MVTStyle.update(n);var r=[];for(var o in n)r.push(n[o]);r.sort((function(e,t){return e.levelt.level?-1:0})),this._maxImageCacheLevel=0;for(var a=[],s=[],l=r.length,u=0;ua._maximumLevel?(o.hasRawData=!1,ue$x(a,null)):(o.hasRawData=!0,Oe$k(o,n,e,t,s,a),ue$x(a))};var Ve$g=/({.*?})/g;function Oe$k(e,t,i,n,r,o){var a=o._urlTiles;if(o.tilingScheme instanceof c$R||(i=oe$s(i,r,o._colDiff),n=oe$s(n,r,o._rowDiff)),e.requestX=i,e.requestY=n,e.requestZ=r,t.quadKey=Ue$g(i,n,r),o._packingRequest===X$N.QuadKey&&(t.type=V$15.PACK,t.providerName=o._name,t.throttle=!0),o._tileFeature){var s=o._scales[r];a=a.replace("{x}",i).replace("{y}",n).replace("{scale}",s)}else a=a.replace("{x}",i).replace("{y}",n).replace("{z}",r);if(e$2b(o._subdomains)){var l=o._subdomains,u=l[(i+n+r)%l.length];a=a.replace(Ve$g,(function(e,t){return"{s}"===t?u:e}))}e$2b(a$O.CREDENTIAL)&&(e$2b(a$O.CREDENTIAL._keymap[o._url])?o._isTdt?a+="&tk="+a$O.CREDENTIAL._keymap[o._url]:a=a$O.addTokenWithKey(o._url,a):o._isTdt?a+="&tk="+a$O.CREDENTIAL._value:a=a$O.addToken(a)),e.requestUrl=a}function he$p(e,t){Array.isArray(e)||(e=[e]);var i=null;for(var n in t){for(var r=t[n],o=!0,a=0;a=0;--r){var o=1<0?u:void 0}},I$10.prototype.queryRenderedFeatures=function(e,t){var i=[],n=he$p(e,this.innerLayer._imageryCache);if(!e$2b(n)||!e$2b(n.featureIndex))return i;var r,o,a,s=n,l=[];for(r=0,a=e.length;r-1){var i=this._viewer.scene.camera.computeViewRectangle();if(!e$2b(i))return t;for(var n=h$18.southwest(i),r=h$18.southeast(i),o=h$18.northeast(i),a=h$18.northwest(i),s=this.queryRenderedFeatures([n,r,o,a],{layers:[e.sourceLayer]}),l=_0x570fee.createFilter(e&&e.filter),u=0;u0?S$12.getSizeInBytes(e[0].componentDatatype):0,a=o>0?t%o:0;return t+=0===a?0:o-a},v$F._createArrayViews=function(e,t){for(var i=[],n=0,r=e.length,o=0;o0){var i=new ArrayBuffer(t*e.vertexSizeInBytes);if(e$2b(e.arrayBuffer))for(var n=new Uint8Array(i),r=new Uint8Array(e.arrayBuffer),o=r.length,a=0;a0){t.needsCommit=!1;var i=t.vertexBuffer,n=e._size*t.vertexSizeInBytes,r=e$2b(i);if(!r||i.sizeInBytes0){var n=e.vertexSizeInBytes*t,r=e.vertexSizeInBytes*i;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,n,r),n)}}function B$O(e){var t=e.va;if(e$2b(t)){for(var i=t.length,n=0;n=this._size)throw new t$16("offsetInVertices must be greater than or equal to zero and less than the vertex array size.");if(e+t>this._size)throw new t$16("offsetInVertices + lengthInVertices cannot exceed the vertex array size.");for(var i=this._allBuffers,n=0,r=i.length;n= 0.995) // matches 254/255 and 255/255\n {\n discard;\n }\n#endif\n#endif\n\n#ifdef VECTOR_TILE\n color *= u_highlightColor;\n#endif\n\n#ifdef PARTICLESYSTEM\n #ifdef LOG_DEPTH\n float fDepth = log2(v_depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n #else\n float fDepth = gl_FragCoord.z;\n #endif\n gl_FragColor = vec4(fDepth, fDepth * fDepth, 1.0, 1.0);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth();\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\n float temp = v_compressed.y;\n\n temp = temp * SHIFT_RIGHT1;\n\n float temp2 = (temp - floor(temp)) * SHIFT_LEFT1;\n bool enableDepthTest = temp2 != 0.0;\n bool applyTranslate = floor(temp) != 0.0;\n\n if (enableDepthTest) {\n temp = v_compressed.z;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 dimensions;\n dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\n dimensions.x = floor(temp);\n\n temp = v_compressed.w;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 imageSize;\n imageSize.y = (temp - floor(temp)) * SHIFT_LEFT12;\n imageSize.x = floor(temp);\n\n vec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy;\n adjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y);\n\n float epsilonEyeDepth = v_compressed.x + czm_epsilon1;\n float globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize);\n\n // negative values go into the screen\n if (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth)\n {\n float globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize); // top left corner\n if (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth)\n {\n float globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize); // top right corner\n if (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth)\n {\n discard;\n }\n }\n }\n }\n#endif\n\n}\n',Vt$7="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nattribute vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)\nattribute vec4 compressedAttribute1; // aligned axis, translucency by distance, image width\nattribute vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free\nattribute vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)\nattribute vec4 scaleByDistance; // near, nearScale, far, farScale\nattribute vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale\nattribute vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions\nattribute vec2 sdf; // sdf outline color (rgb) and width (w)\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\nattribute vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates\n#endif\n#ifdef VECTOR_TILE\nattribute float a_batchId;\n#endif\n#ifdef MVT\nattribute vec4 a_fade_opacity;\n#endif\n\nuniform float u_eyeOffsetZ;\nuniform float u_fade_change;\nvarying float v_depth;\nvarying vec2 v_textureCoordinates;\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize\nvarying mat2 v_rotationMatrix;\n#endif\n\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\n\nconst float UPPER_BOUND = 32768.0;\n\nconst float SHIFT_LEFT16 = 65536.0;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_LEFT7 = 128.0;\nconst float SHIFT_LEFT5 = 32.0;\nconst float SHIFT_LEFT3 = 8.0;\nconst float SHIFT_LEFT2 = 4.0;\nconst float SHIFT_LEFT1 = 2.0;\n\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT7 = 1.0 / 128.0;\nconst float SHIFT_RIGHT5 = 1.0 / 32.0;\nconst float SHIFT_RIGHT3 = 1.0 / 8.0;\nconst float SHIFT_RIGHT2 = 1.0 / 4.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\n\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)\n{\n // Note the halfSize cannot be computed in JavaScript because it is sent via\n // compressed vertex attributes that coerce it to an integer.\n vec2 halfSize = imageSize * scale * 0.5;\n halfSize *= ((direction * 2.0) - 1.0);\n\n vec2 originTranslate = origin * abs(halfSize);\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n if (validAlignedAxis || rotation != 0.0)\n {\n float angle = rotation;\n if (validAlignedAxis)\n {\n vec4 projectedAlignedAxis = czm_modelViewProjection * vec4(alignedAxis, 0.0);\n angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /\n (projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));\n }\n\n float cosTheta = cos(angle);\n float sinTheta = sin(angle);\n rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\n halfSize = rotationMatrix * halfSize;\n }\n else\n {\n rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n }\n#endif\n\tmpp = czm_metersPerPixel(positionEC);\n#ifdef FixedXYZ\n\tvec4 origViewPos = czm_view * vec4(0.0, 0.0, 0.0, 1.0);\n vec4 fixedAxis = positionEC - origViewPos;\n vec3 zAxis = normalize(fixedAxis.xyz);\n vec3 upViewVector = vec3(0.0, 1.0, 0.0);\n vec3 xAxis = normalize(cross(upViewVector, zAxis));\n vec3 yAxis = cross(zAxis, xAxis);\n yAxis = normalize(yAxis);\n mat3 matrix = mat3(xAxis,yAxis,zAxis);\n\tvec3 tmp = matrix * vec3((originTranslate + halfSize + translate + pixelOffset), 0.0);\n\ttmp *= czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\n\tpositionEC.xy += tmp.xy;\n#else\n positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\n positionEC.xy += (translate + pixelOffset) * mpp;\n#endif\n\n return positionEC;\n}\n\n#ifdef VERTEX_DEPTH_CHECK\nfloat getGlobeDepth(vec4 positionEC)\n{\n vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n\n float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n\n if (globeDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\nvoid main()\n{\n // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition\n\n // unpack attributes\n vec3 positionHigh = positionHighAndScale.xyz;\n vec3 positionLow = positionLowAndRotation.xyz;\n float scale = positionHighAndScale.w;\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n float rotation = positionLowAndRotation.w;\n#else\n float rotation = 0.0;\n#endif\n\n float compressed = compressedAttribute0.x;\n\n vec2 pixelOffset;\n pixelOffset.x = floor(compressed * SHIFT_RIGHT7);\n compressed -= pixelOffset.x * SHIFT_LEFT7;\n pixelOffset.x -= UPPER_BOUND;\n\n vec2 origin;\n origin.x = floor(compressed * SHIFT_RIGHT5);\n compressed -= origin.x * SHIFT_LEFT5;\n\n origin.y = floor(compressed * SHIFT_RIGHT3);\n compressed -= origin.y * SHIFT_LEFT3;\n\n#ifdef FRAGMENT_DEPTH_CHECK\n vec2 depthOrigin = origin.xy;\n#endif\n origin -= vec2(1.0);\n\n float show = floor(compressed * SHIFT_RIGHT2);\n compressed -= show * SHIFT_LEFT2;\n\n#ifdef INSTANCED\n vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\n vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\n #ifdef MVT\n vec2 textureCoordinates;\n textureCoordinates.x = textureCoordinatesBottomLeft.x + direction.x * textureCoordinatesRange.x;\n textureCoordinates.y = textureCoordinatesBottomLeft.y - direction.y * textureCoordinatesRange.y;\n #else\n vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n #endif\n#else\n vec2 direction;\n direction.x = floor(compressed * SHIFT_RIGHT1);\n direction.y = compressed - direction.x * SHIFT_LEFT1;\n\n vec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n#endif\n\n float temp = compressedAttribute0.y * SHIFT_RIGHT8;\n pixelOffset.y = -(floor(temp) - UPPER_BOUND);\n\n vec2 translate;\n translate.y = (temp - floor(temp)) * SHIFT_LEFT16;\n\n temp = compressedAttribute0.z * SHIFT_RIGHT8;\n translate.x = floor(temp) - UPPER_BOUND;\n\n translate.y += (temp - floor(temp)) * SHIFT_LEFT8;\n translate.y -= UPPER_BOUND;\n\n temp = compressedAttribute1.x * SHIFT_RIGHT8;\n float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);\n\n vec2 imageSize = vec2(floor(temp), temp2);\n\n#ifdef FRAGMENT_DEPTH_CHECK\n float labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));\n float applyTranslate = 0.0;\n if (labelHorizontalOrigin != 0.0) // is a billboard, so set apply translate to false\n {\n applyTranslate = 1.0;\n labelHorizontalOrigin -= 2.0;\n depthOrigin.x = labelHorizontalOrigin + 1.0;\n }\n\n depthOrigin = vec2(1.0) - (depthOrigin * 0.5);\n#endif\n\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n vec4 translucencyByDistance;\n translucencyByDistance.x = compressedAttribute1.z;\n translucencyByDistance.z = compressedAttribute1.w;\n\n translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\n temp = compressedAttribute1.y * SHIFT_RIGHT8;\n translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\n temp = compressedAttribute3.w;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 dimensions;\n dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\n dimensions.x = floor(temp);\n#endif\n\n#ifdef ALIGNED_AXIS\n vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\n temp = compressedAttribute2.z * SHIFT_RIGHT5;\n bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n#else\n vec3 alignedAxis = vec3(0.0);\n bool validAlignedAxis = false;\n#endif\n\n vec4 pickColor;\n vec4 color;\n\n temp = compressedAttribute2.y;\n temp = temp * SHIFT_RIGHT8;\n pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor.r = floor(temp);\n\n temp = compressedAttribute2.x;\n temp = temp * SHIFT_RIGHT8;\n color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n color.r = floor(temp);\n\n temp = compressedAttribute2.z * SHIFT_RIGHT8;\n bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\n temp = floor(temp) * SHIFT_RIGHT8;\n\n pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor /= 255.0;\n\n color.a = floor(temp);\n color /= 255.0;\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n\n#if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK)\n float eyeDepth = positionEC.z;\n#endif\n\n#ifdef MVT\n // 实现MVT文字的显隐渐变\n vec2 fade_opacity = a_fade_opacity.xy;\n float placed = fade_opacity.x;\n float fade_change = placed > 0.5 ? u_fade_change : -u_fade_change;\n float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity.y + fade_change));\n color.a = interpolated_fade_opacity;\n // MVT中eyeOffset的y值存储的是布告板的像素高度的一半。根据这个值在相机空间中抬高一点,以免一半被埋入地下\n // u_eyeOffsetZ是相机当前俯仰角计算出的需要在相机空间中拉近的距离,以免被地形挡住\n vec3 realEyeOffset = eyeOffset.xyz;\n float meterPerPixel = czm_metersPerPixel(positionEC);\n realEyeOffset.y = meterPerPixel * eyeOffset.y;\n realEyeOffset.z = u_eyeOffsetZ;\n positionEC = czm_eyeOffset(positionEC, realEyeOffset.xyz);\n if (interpolated_fade_opacity == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#else\n positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\n#endif\n\n ///////////////////////////////////////////////////////////////////////////\n\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n // 2D camera distance is a special case\n // treat all billboards as flattened to the z=0.0 plane\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n lengthSq = dot(positionEC.xyz, positionEC.xyz);\n }\n#endif\n\n#ifdef EYE_DISTANCE_SCALING\n float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);\n scale *= distanceScale;\n translate *= distanceScale;\n // push vertex behind near plane for clipping\n if (scale == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n float translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (translucency == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n#ifdef EYE_DISTANCE_PIXEL_OFFSET\n float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\n pixelOffset *= pixelOffsetScale;\n#endif\n\n#ifdef DISTANCE_DISPLAY_CONDITION\n float nearSq = compressedAttribute3.x;\n float farSq = compressedAttribute3.y;\n if (lengthSq < nearSq || lengthSq > farSq)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n mat2 rotationMatrix;\n float mpp;\n\n#ifdef DISABLE_DEPTH_DISTANCE\n float disableDepthTestDistance = compressedAttribute3.z;\n#endif\n\n#ifdef VERTEX_DEPTH_CHECK\nif (lengthSq < disableDepthTestDistance) {\n float depthsilon = 10.0;\n\n vec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy;\n vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth1 = getGlobeDepth(pEC1);\n\n if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)\n {\n vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth2 = getGlobeDepth(pEC2);\n\n if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)\n {\n vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth3 = getGlobeDepth(pEC3);\n if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)\n {\n positionEC.xyz = vec3(0.0);\n }\n }\n }\n}\n#endif\n\n positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n positionEC.xyz *= show;\n gl_Position = czm_projection * positionEC;\n v_textureCoordinates = textureCoordinates;\n\n#ifdef LOG_DEPTH\n czm_vertexLogDepth();\n v_depth = 1.0 - czm_currentFrustum.x + gl_Position.w;\n#endif\n\n#ifdef DISABLE_DEPTH_DISTANCE\n if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n {\n disableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n }\n\n if (disableDepthTestDistance != 0.0)\n {\n // Don't try to \"multiply both sides\" by w. Greater/less-than comparisons won't work for negative values of w.\n float zclip = gl_Position.z / gl_Position.w;\n\n#ifdef WEBGPU \n bool clipped = (zclip < 0.0 || zclip > 1.0);\n#else\n bool clipped = (zclip < -1.0 || zclip > 1.0);\n#endif\n if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n {\n // Position z on the near plane.\n#ifdef WEBGPU\n gl_Position.z = 0.0;\n#else\n gl_Position.z = -gl_Position.w;\n#endif\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0;\n#endif\n }\n }\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\n if (sizeInMeters) {\n translate /= mpp;\n dimensions /= mpp;\n imageSize /= mpp;\n }\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n v_rotationMatrix = rotationMatrix;\n#else\n v_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n#endif\n\n float enableDepthCheck = 0.0;\n if (lengthSq < disableDepthTestDistance)\n {\n enableDepthCheck = 1.0;\n }\n\n float dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12));\n float dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12));\n\n float iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12));\n float ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12));\n\n v_compressed.x = eyeDepth;\n v_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck;\n v_compressed.z = dw * SHIFT_LEFT12 + dh;\n v_compressed.w = iw * SHIFT_LEFT12 + ih;\n v_originTextureCoordinateAndTranslate.xy = depthOrigin;\n v_originTextureCoordinateAndTranslate.zw = translate;\n v_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate;\n\n#endif\n\n#ifdef SDF\n vec4 outlineColor;\n float outlineWidth;\n\n temp = sdf.x;\n temp = temp * SHIFT_RIGHT8;\n outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.r = floor(temp);\n\n temp = sdf.y;\n temp = temp * SHIFT_RIGHT8;\n float temp3 = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.a = floor(temp);\n outlineColor /= 255.0;\n\n v_outlineWidth = outlineWidth / 255.0;\n v_outlineColor = outlineColor;\n#endif\n\n v_pickColor = pickColor;\n\n v_color = color;\n v_color.a *= translucency;\n\n}\n",e$1a={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2},S$J=Object.freeze(e$1a),e$19={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},V$I=Object.freeze(e$19);function O$B(e,t,i,n,r){return new F$V(e,t,i,n,r)}function F$V(e,t,i,n,r){t=t||P$O,i=i||Q$N,r=r||Array,this.nodeSize=n||64,this.points=e,this.ids=new r(e.length),this.coords=new r(2*e.length);for(var o=0;od+u.width||c+l.widthf+u.height)}function R$N(e,t,i,n,r,o,a,s,l,u,c){for(var h,d,f=[0,e.length-1,0],p=[];f.length;){var _=f.pop(),m=f.pop(),g=f.pop(),x=void 0;if(m-g<=a)for(var v=g;v<=m;v++)h=t[2*v],d=t[2*v+1],void 0!==s&&s.length>v&&(x=l(s[e[v]])),void 0!==u?u(h,d,i,n,r,o,s[e[v]],x,c)&&p.push(e[v]):J$K(h,d,i,n,r,o)&&p.push(e[v]);else{var y=Math.floor((g+m)/2);h=t[2*y],d=t[2*y+1],void 0!==s&&s.length>y&&(x=l(s[e[y]])),void 0!==u?u(h,d,i,n,r,o,s[e[y]],x,c)&&p.push(e[y]):J$K(h,d,i,n,r,o)&&p.push(e[y]);var $=(_+1)%2;(0===_?i<=h:n<=d)&&(f.push(g),f.push(y-1),f.push($)),(0===_?r>=h:o>=d)&&(f.push(y+1),f.push(m),f.push($))}}return p}function U$O(e,t,i,n,r,o,a){for(var s,l,u=[0,e.length-1,0],c=[];u.length;){var h=u.pop(),d=u.pop(),f=u.pop();if(d-f<=a)for(var p=f;p<=d;p++)s=t[2*p],l=t[2*p+1],s>=i&&s<=r&&l>=n&&l<=o&&c.push(e[p]);else{var _=Math.floor((f+d)/2);s=t[2*_],l=t[2*_+1],s>=i&&s<=r&&l>=n&&l<=o&&c.push(e[_]);var m=(h+1)%2;(0===h?i<=s:n<=l)&&(u.push(f),u.push(_-1),u.push(m)),(0===h?r>=s:o>=l)&&(u.push(_+1),u.push(d),u.push(m))}}return c}function K$J(e,t,i,n,r,o){if(!(r-n<=i)){var a=Math.floor((n+r)/2);L$W(e,t,a,n,r,o%2),K$J(e,t,i,n,a-1,o+1),K$J(e,t,i,a+1,r,o+1)}}function L$W(e,t,i,n,r,o){for(;r>n;){if(r-n>600){var a=r-n+1,s=i-n+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);L$W(e,t,i,Math.max(n,Math.floor(i-s*u/a+c)),Math.min(r,Math.floor(i+(a-s)*u/a+c)),o)}var h=t[2*i+o],d=n,f=r;for(B$N(e,t,n,i),t[2*r+o]>h&&B$N(e,t,n,r);dh;)f--}t[2*n+o]===h?B$N(e,t,n,f):B$N(e,t,++f,r),f<=i&&(n=f+1),i<=f&&(r=f-1)}}function B$N(e,t,i,n){C$S(e,i,n),C$S(t,2*i,2*n),C$S(t,2*i+1,2*n+1)}function C$S(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function V$H(e,t,i,n,r,o){for(var a=[0,e.length-1,0],s=[],l=r*r;a.length;){var u=a.pop(),c=a.pop(),h=a.pop();if(c-h<=o)for(var d=h;d<=c;d++)N$J(t[2*d],t[2*d+1],i,n)<=l&&s.push(e[d]);else{var f=Math.floor((h+c)/2),p=t[2*f],_=t[2*f+1];N$J(p,_,i,n)<=l&&s.push(e[f]);var m=(u+1)%2;(0===u?i-r<=p:n-r<=_)&&(a.push(h),a.push(f-1),a.push(m)),(0===u?i+r>=p:n+r>=_)&&(a.push(f+1),a.push(c),a.push(m))}}return s}function N$J(e,t,i,n){var r=e-i,o=t-n;return r*r+o*o}F$V.prototype={range:function(e,t,i,n){return U$O(this.ids,this.coords,e,t,i,n,this.nodeSize)},within:function(e,t,i){return V$H(this.ids,this.coords,e,t,i,this.nodeSize)},intersect:function(e,t,i,n,r,o,a,s){return R$N(this.ids,this.coords,e,t,i,n,this.nodeSize,r,o,a,s)}};var _0x3dc1be=(_0x2c3686=!0,function(e,t){var i=_0x2c3686?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c3686=!1,i}),_0x2d5759=_0x3dc1be(void 0,(function(){return _0x2d5759.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d5759).search("(((.+)+)+)+$")})),_0x2c3686;_0x2d5759();var X$M="\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute float aColor;\nuniform float uLineWidth;\nvarying float vColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nvoid main()\n{\n bool bUsePre = aTexCoord0.x < 0.1;\n float offset = bUsePre ? -uLineWidth : uLineWidth;\n vec4 viewPos1 = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tviewPos1.x = viewPos1.x + offset * computerOnePixelLength();\n\tgl_Position = czm_projection * viewPos1;\n\tvColor = aColor;\n}";function _$L(e){this._point3Ds={},this._points=[],this._style=void 0,this._billboardCollection=void 0,this._isInitialize=!1,this._pointsChanged=!0,this._colorCommand=void 0,this._worldMatrix=p$1d.clone(p$1d.IDENTITY),this._boundingSphere=new i$1c,this._isVisible=!1,this._frameState=void 0,this._colors=void 0,this._isUpdateColor=!1}function G$Y(e,t,i){A$Y(e);var n=q$W(e,i.mode);H$T(e),Y$F(e,t,n),e._isInitialize=!0}function A$Y(e){e$2b(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0)}function Y$F(e,t,i){A$Y(e);var n=t$Y.createVertexBuffer({context:t,typedArray:i.vertices,usage:A$19.STATIC_DRAW}),r=t$Y.createVertexBuffer({context:t,typedArray:i.texcoords,usage:A$19.STATIC_DRAW}),o=t$Y.createVertexBuffer({context:t,typedArray:i.colors,usage:A$19.STATIC_DRAW}),a=[],s={aPosition:0,aTexCoord0:1,aColor:2};a.push({index:s.aPosition,vertexBuffer:n,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),a.push({index:s.aTexCoord0,vertexBuffer:r,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),a.push({index:s.aColor,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$12.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:1,normalize:!1});var l=t$Y.createIndexBuffer({context:t,typedArray:i.indexPackage,usage:A$19.STATIC_DRAW,indexDatatype:i.indexDataType});e._colorCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$s.S3MTiles,owner:e}),e._colorCommand.vertexArray=new c$12({context:t,attributes:a,indexBuffer:l});var u=new s$U({sources:[X$M]}),c=new s$U({sources:["uniform vec4 uFillColor;\nvarying float vColor;\nvoid main()\n{\n if(vColor < 0.1)\n {\n discard;\n return;\n }\n gl_FragColor = uFillColor;\n}\n"]});e._colorCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:s}),e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),e._colorCommand.uniformMap={uLineWidth:function(){return e._style._calloutWidth},uFillColor:function(){return e._style._calloutColor}}}function q$W(e){for(var t=0,i=0,n=0,r=0,o=2*e._points.length,a=S$12.createTypedArray(S$12.FLOAT,3*o),s=S$12.createTypedArray(S$12.FLOAT,2*o),l=new Uint8Array(o),u=o/2*3,c=o>65535?ce$x.UNSIGNED_INT:ce$x.UNSIGNED_SHORT,h=S$12.createTypedArray(c,u),d=0;d0)&&(e._shaderDisableDepthDistance=!0,d===Number.POSITIVE_INFINITY&&(d=-1)),e$2b(r._labelDimensions))h=r._labelDimensions.x,c=r._labelDimensions.y;else{var p=0,_=0,m=r._imageIndex;if(-1!==m){var g=i[m];if(!e$2b(g))throw new t$16("Invalid billboard image index: "+m);p=g.height,_=g.width}c=Math.round(u$_(r.height,e._textureAtlas.texture.dimensions.y*p));var x=e._textureAtlas.texture.width;h=Math.round(u$_(r.width,x*_))}var v=Math.floor(e$2a.clamp(h,0,ze$c)),y=Math.floor(e$2a.clamp(c,0,ze$c)),$=v*ze$c+y;e._instanced?a(o=r._index,s,l,d,$):(a((o=4*r._index)+0,s,l,d,$),a(o+1,s,l,d,$),a(o+2,s,l,d,$),a(o+3,s,l,d,$))}function St$4(e,t,i,n,r){r.heightReference===k$P.CLAMP_TO_GROUND&&(e._shaderClampToGround=e._scene.context.depthTexture);var o,a=n[m$Q.textureCoordinateBoundsOrLabelTranslate];if(e$1T.maximumVertexTextureImageUnits>0){var s=0,l=0;return e$2b(r._labelTranslate)&&(s=r._labelTranslate.x,l=r._labelTranslate.y),void(e._instanced?(o=r._index,a(o,s,l,0,0)):(o=4*r._index,a(o+0,s,l,0,0),a(o+1,s,l,0,0),a(o+2,s,l,0,0),a(o+3,s,l,0,0)))}var u=0,c=0,h=0,d=0,f=r._imageIndex;if(-1!==f){var p=i[f];if(!e$2b(p))throw new t$16("Invalid billboard image index: "+f);u=p.x,c=p.y,h=p.width,d=p.height}var _=u+h,m=c+d;e._instanced?a(o=r._index,u,c,_,m):(a((o=4*r._index)+0,u,c,_,m),a(o+1,u,c,_,m),a(o+2,u,c,_,m),a(o+3,u,c,_,m))}function ei$3(e,t,i,n,r){if(e$2b(e._batchTable)){var o,a=n[m$Q.a_batchId],s=r._batchIndex;e._instanced?a(o=r._index,s):(a((o=4*r._index)+0,s),a(o+1,s),a(o+2,s),a(o+3,s))}}function yt$6(e,t,i,n,r){if(e._sdf){var o,a=n[m$Q.sdf],s=r.outlineColor,l=r.outlineWidth,u=e$1U.floatToByte(s.red),c=e$1U.floatToByte(s.green),h=e$1U.floatToByte(s.blue),d=u*ne$D+c*z$M+h,f=l/V$I.RADIUS,p=e$1U.floatToByte(s.alpha)*ne$D+e$1U.floatToByte(f)*z$M;e._instanced?a(o=r._index,d,p):(o=4*r._index,t.webgpu?(a(o+0,d,p),a(o+1,d,p),a(o+2,d,p),a(o+3,d,p)):(a(o+0,d+ct$7,p),a(o+1,d+lt$3,p),a(o+2,d+mt$4,p),a(o+3,d+Tt$9,p)))}}function It$8(e,t,i,n,r){if(e._isMVT){var o,a=n[m$Q.a_fade_opacity],s=r.opacityState,l=s.placed?1:0,u=s.opacity;e._instanced?a(o=r._index,l,u):(a((o=4*r._index)+0,l,u),a(o+1,l,u),a(o+2,l,u),a(o+3,l,u))}}function ti$4(e,t,i,n,r){ut$8(e,t,i,n,r),vt$8(e,t,i,n,r),xt$6(e,t,i,n,r),Ye$d(e,t,i,n,r),ke$b(e,t,i,n,r),Dt$7(e,t,i,n,r),At$6(e,t,i,n,r),Et$6(e,t,i,n,r),St$4(e,t,i,n,r),ei$3(e,t,i,n,r),yt$6(e,t,i,n,r),It$8(e,t,i,n,r)}function Ke$a(e,t,i,n,r,o){var a;n.mode===C$13.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<8)throw new t$16("the index is 0~8");return 1<-1&&this._billboards.length>0){if(e$2b(this._billboards[0])&&e$2b(this._billboards[0]._id)&&e$2b(this._billboards[0]._id.entityCollection)){var n=this._billboards[0]._id.entityCollection.owner;if(typeof n.getVisibleInViewport<"u")if(!n.getVisibleInViewport(e.multiViewportIndex))return}if(!this.getVisibleInViewport(e.multiViewportIndex))return}Xe$a(this);var r=this._billboards,o=r.length;t=e.context;this._instanced=t.instancedArrays,m$Q=this._instanced?zt$5:Wt$8,Ge$e=this._instanced?Kt$6:kt$5;var a=this._textureAtlas;if(!e$2b(a)){a=this._textureAtlas=new v$I({context:t});for(var s=0;s0){this._vaf=qt$7(t,o,this._buffersUsage,this._instanced,this._batchTable,this._sdf,this._isMVT),p=this._vaf.writers;for(var x=0;x0){var y=ai$5;y.length=0,(h[re$B]||h[nt$8]||h[at$b])&&y.push(ut$8),(h[ae$r]||h[Le$p]||h[st$5]||h[rt$e]||h[it$8])&&(y.push(vt$8),this._instanced&&y.push(ke$b)),(h[ae$r]||h[ht$7]||h[Me$k])&&(y.push(xt$6),y.push(Ye$d)),(h[ae$r]||h[be$q])&&y.push(Ye$d),h[Ve$f]&&y.push(ke$b),h[Fe$i]&&y.push(Dt$7),h[Ue$f]&&y.push(At$6),(h[He$9]||h[Gt$5]||h[ae$r]||h[re$B])&&y.push(Et$6),(h[ae$r]||h[re$B])&&y.push(St$4),h[_t$6]&&y.push(yt$6),h[dt$8]&&y.push(It$8);var $=y.length;if(p=this._vaf.writers,c/o>.1){for(var b=0;b1.5*o&&(u.length=o),e$2b(this._vaf)&&e$2b(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,i$1c.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var P,A=p$1d.IDENTITY;e.mode===C$13.SCENE3D?(A=this.modelMatrix,P=i$1c.clone(this._baseVolumeWC,this._boundingVolume)):P=i$1c.clone(this._baseVolume2D,this._boundingVolume),si$4(this,e,P);var L=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,L){this._blendOption===S$J.OPAQUE||this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=d$1m.fromCache({depthTest:{enabled:this._depthTestEnable,func:de$x.LESS},depthMask:!0}):this._rsOpaque=void 0;var M=this._blendOption===S$J.TRANSLUCENT;this._blendOption===S$J.TRANSLUCENT||this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=d$1m.fromCache({depthTest:{enabled:this._depthTestEnable,func:M?de$x.LEQUAL:de$x.LESS},depthMask:M,blending:Ee$r.ALPHA_BLEND}):this._rsTranslucent=void 0}this._isParticleSystem&&(this._rsParticleSystem=d$1m.fromCache({depthTest:{enabled:!1,func:de$x.LESS},depthMask:!1,blending:Yt$5})),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance;var R,I,O,D,B,N=e$1T.maximumVertexTextureImageUnits>0;if(L||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF||this._swipeEnabled!==this._compiledSwipeEnabled||!e$29.equals(this._swipeRegion,this._compiledSwipeRegion)){R=Vt$7,I=Lt$5,B=[],e$2b(this._batchTable)&&(B.push("VECTOR_TILE"),R=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(R),I=this._batchTable.getFragmentShaderCallback(!1,void 0)(I)),O=new s$U({defines:B,sources:[R],name:"BillboardCollectionVS"}),this._instanced&&O.defines.push("INSTANCED"),this._shaderRotation&&O.defines.push("ROTATION"),this._shaderAlignedAxis&&O.defines.push("ALIGNED_AXIS"),this._billboardMode===yr$1.FixedXYZ&&O.defines.push("FixedXYZ"),this._shaderScaleByDistance&&O.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&O.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&O.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&O.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&O.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(N?O.defines.push("VERTEX_DEPTH_CHECK"):O.defines.push("FRAGMENT_DEPTH_CHECK")),this._ignoreShow&&O.defines.push("IGNORE_SHOW"),this._isMVT&&O.defines.push("MVT");var F=1-V$I.CUTOFF;this._sdf&&O.defines.push("SDF");var U=e$2b(this._batchTable)?"VECTOR_TILE":"";if(this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT&&(D=new s$U({defines:["OPAQUE",U],sources:[I],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(N?D.defines.push("VERTEX_DEPTH_CHECK"):D.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(D.defines.push("SDF"),D.defines.push("SDF_EDGE "+F)),this._isMVT&&D.defines.push("MVT"),this._swipeEnabled&&D.defines.push("APPLY_SWIPE"),this._sp=r$13.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:O,fragmentShaderSource:D,attributeLocations:m$Q}),D=new s$U({defines:["TRANSLUCENT",U],sources:[I],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(N?D.defines.push("VERTEX_DEPTH_CHECK"):D.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(D.defines.push("SDF"),D.defines.push("SDF_EDGE "+F)),this._isMVT&&D.defines.push("MVT"),this._swipeEnabled&&D.defines.push("APPLY_SWIPE"),this._spTranslucent=r$13.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:O,fragmentShaderSource:D,attributeLocations:m$Q})),this._blendOption===S$J.OPAQUE&&(D=new s$U({defines:[U],sources:[I],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(N?D.defines.push("VERTEX_DEPTH_CHECK"):D.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(D.defines.push("SDF"),D.defines.push("SDF_EDGE "+F)),this._isMVT&&D.defines.push("MVT"),this._swipeEnabled&&D.defines.push("APPLY_SWIPE"),this._sp=r$13.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:O,fragmentShaderSource:D,attributeLocations:m$Q})),this._blendOption===S$J.TRANSLUCENT&&(D=new s$U({defines:[U],sources:[I],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(N?D.defines.push("VERTEX_DEPTH_CHECK"):D.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(D.defines.push("SDF"),D.defines.push("SDF_EDGE "+F)),this._isMVT&&D.defines.push("MVT"),this._swipeEnabled&&D.defines.push("APPLY_SWIPE"),this._spTranslucent=r$13.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:O,fragmentShaderSource:D,attributeLocations:m$Q})),this._swipeEnabled&&!e$2b(this._uniforms.uSwipeRegion)){var z=this;this._uniforms.uSwipeRegion=function(){var t=z._swipeRegion;return e$29.fromElements(t.x,t.y,t.x+t.width,t.y+t.height,Y$E),Y$E.x=Y$E.x*e.context.drawingBufferWidth,Y$E.y=(1-Y$E.y)*e.context.drawingBufferHeight,Y$E.z=Y$E.z*e.context.drawingBufferWidth,Y$E.w=(1-Y$E.w)*e.context.drawingBufferHeight,Y$E}}this._isParticleSystem&&(D=new s$U({defines:[U],sources:[I],name:"BillboardCollectionFS"}),this._spParticleSystem=r$13.replaceCache({context:t,shaderProgram:this._spParticleSystem,vertexShaderSource:O,fragmentShaderSource:D,attributeLocations:m$Q})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf,this._compiledSwipeEnabled=this._swipeEnabled,f$18.clone(this._swipeRegion,this._compiledSwipeRegion)}i=e.commandList;var G=!0;if(e._fboState.frameBufferType===Qe$c.NORMAL_AND_DEPTH&&(G=!1),G&&(_.render||_.pick)){var V,k=this._colorCommands,W=this._blendOption===S$J.OPAQUE,H=this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT,q=this._vaf.va,j=q.length,Y=this._uniforms;e$2b(this._batchTable)?(Y=this._batchTable.getUniformMapCallback()(Y),V=this._batchTable.getPickId()):V="v_pickColor",k.length=j;for(var X=H?2*j:j,K=0;K"+t,document.body.appendChild(c),r.leading=1.2*a;var h=u$K(c,"height");if((h=h.replace("px",""))>=2*a&&(r.leading=h/2|0),document.body.removeChild(c),u)r.ascent=0,r.descent=0,r.bounds={minx:0,maxx:r.width,miny:0,maxy:0},r.height=0;else{var d=document.createElement("canvas"),f=100;d.width=r.width+f,d.height=3*a,d.style.opacity=1,d.style.fontFamily=o,d.style.fontSize=a,d.style.fontStyle=s,d.style.fontWeight=l;var p=d.getContext("2d");p.font=s+" "+l+" "+a+"px "+o;var _=d.width,m=d.height,g=m/2;p.fillStyle="white",p.fillRect(-1,-1,_+2,m+2),i&&(p.strokeStyle="black",p.lineWidth=e.lineWidth,p.strokeText(t,50,g)),n&&(p.fillStyle="black",p.fillText(t,50,g));for(var x=p.getImageData(0,0,_,m).data,v=0,y=4*_,$=x.length;++v<$&&255===x[v];);var b=v/y|0;for(v=$-1;--v>0&&255===x[v];);var T=v/y|0;for(v=0;v<$&&255===x[v];)(v+=y)>=$&&(v=v-$+4);var C=v%y/4|0,S=1;for(v=$-3;v>=0&&255===x[v];)(v-=y)<0&&(v=$-3-4*S++);var w=v%y/4+1|0;r.ascent=g-b,r.descent=T-g,r.bounds={minx:C-50,maxx:w-50,miny:0,maxy:T-b},r.height=T-b+1}return r},o$Q;function x$X(e,t){if(!e$2b(e))throw new t$16("text is required.");if(""!==e){t=u$_(t,u$_.EMPTY_OBJECT);var i=u$_(t.font,"10px sans-serif"),n=u$_(t.stroke,!1),r=u$_(t.fill,!0),o=u$_(t.strokeWidth,1),a=u$_(t.backgroundColor,e$1U.TRANSPARENT),s=u$_(t.padding,0),l=2*s,u=document.createElement("canvas");u.width=1,u.height=1,u.style.font=i;var c=u.getContext("2d",{willReadFrequently:!0});e$2b(o$Q)||(e$2b(c.imageSmoothingEnabled)?o$Q="imageSmoothingEnabled":e$2b(c.mozImageSmoothingEnabled)?o$Q="mozImageSmoothingEnabled":e$2b(c.webkitImageSmoothingEnabled)?o$Q="webkitImageSmoothingEnabled":e$2b(c.msImageSmoothingEnabled)&&(o$Q="msImageSmoothingEnabled")),c.font=i,c.lineJoin="round",c.lineWidth=o,c[o$Q]=!1,c.textBaseline=u$_(t.textBaseline,"bottom"),u.style.visibility="hidden",document.body.appendChild(u);var h=F$T(c,e,n,r);u.dimensions=h,document.body.removeChild(u),u.style.visibility="";var d=-h.bounds.minx,f=Math.ceil(h.width)+d+l,p=h.height+l,_=p-(p-h.ascent+s)+l;if(u.width=f,u.height=p,c.font=i,c.lineJoin="round",c.lineWidth=o,c[o$Q]=!1,a!==e$1U.TRANSPARENT&&(c.fillStyle=a.toCssColorString(),c.fillRect(0,0,u.width,u.height)),n){var m=u$_(t.strokeColor,e$1U.BLACK);c.strokeStyle=m.toCssColorString(),c.strokeText(e,d+s,_)}if(r){var g=u$_(t.fillColor,e$1U.WHITE);c.fillStyle=g.toCssColorString(),c.fillText(e,d+s,_)}return u}}var c$Q=1e20;function R$M(e,t,i){return ti?i:e:et?t:e}function b$10(e,t){t||(t={});var i,n,r,o,a,s,l,u,c,h,d,f=null==t.cutoff?.25:t.cutoff,p=null==t.radius?8:t.radius,_=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,n=t.height,o=e,s=t.stride?t.stride:Math.floor(e.length/i/n)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(l=(u=e).getContext("2d"),i=u.width,n=u.height,o=(c=l.getImageData(0,0,i,n)).data,s=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(l=e,i=(u=e.canvas).width,n=u.height,o=(c=l.getImageData(0,0,i,n)).data,s=4):window.ImageData&&e instanceof window.ImageData&&(c=e,i=e.width,n=e.height,o=c.data,s=4);if(r=Math.max(i,n),window.Uint8ClampedArray&&o instanceof window.Uint8ClampedArray||window.Uint8Array&&o instanceof window.Uint8Array)for(a=o,o=Array(i*n),h=0,d=a.length;h]/,r=[],o="",a=g$V.LTR,s="",l=e.length,u=0;u";case">":return"<"}}Object.defineProperties(D$Q.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2b(e))throw new t$16("value is required.");if(this._show!==e){this._show=e;for(var t=this._glyphs,i=0,n=t.length;i-1&&(t.height*=e._text.split("\n").length),t},D$Q.prototype.getScreenSpaceBoundingBox=function(e,t,i){return e$2b(i)||(i=new f$18),this.computeLocalScreenSpaceBoundingBox(e,i),i.x+=t.x,i.y+=t.y,i},D$Q.getScreenSpaceBoundingBox=function(e,t,i){var n=0,r=0,o=0,a=0,s=e.totalScale,l=e._backgroundBillboard;if(e$2b(l))n=t.x+l._translate.x,r=t.y-l._translate.y,o=l.width*s,a=l.height*s,e.verticalOrigin===S$O.BOTTOM||e.verticalOrigin===S$O.BASELINE?r-=a:e.verticalOrigin===S$O.CENTER&&(r-=.5*a);else{n=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(var u=0,c=0,h=e._glyphs,d=h.length,f=0;fu+1?a[u+1].Type===g$V.RTL?(l=h+l,s=0):(l=A$X(l,s,c.Word),s+=c.Word.length):l=A$X(l,0,h)):c.Type===g$V.RTL?l=A$X(l,s,h):c.Type===g$V.LTR?s=(l+=c.Word).length:(c.Type===g$V.WEAK||c.Type===g$V.BRACKETS)&&(u>0&&a[u-1].Type===g$V.RTL?a.length>u+1?a[u+1].Type===g$V.RTL?l=A$X(l,s,h):s=(l+=c.Word).length:l+=c.Word:s=(l+=c.Word).length)}i+=l,n=1){var r=i;return 55296<=(n=e.charCodeAt(t-1))&&n<=56319?1024*(n-55296)+(r-56320)+65536:r}return i}function l(a,s,l){var u=[a].concat(s).concat([l]),c=u[u.length-2],h=l,d=u.lastIndexOf(14);if(d>1&&u.slice(1,d).every((function(t){return t==e}))&&-1==[e,n,o].indexOf(a))return 2;var f=u.lastIndexOf(t);if(f>0&&u.slice(1,f).every((function(e){return e==t}))&&-1==[i,t].indexOf(c))return u.filter((function(e){return e==t})).length%2==1?3:4;if(0==c&&1==h)return 0;if(2==c||0==c||1==c)return 14==h&&s.every((function(t){return t==e}))?2:1;if(2==h||0==h||1==h)return 1;if(6==c&&(6==h||7==h||9==h||10==h))return 0;if(!(9!=c&&7!=c||7!=h&&8!=h))return 0;if((10==c||8==c)&&8==h)return 0;if(h==e||15==h)return 0;if(5==h)return 0;if(c==i)return 0;var p=-1!=u.indexOf(e)?u.lastIndexOf(e)-1:u.length-2;return-1!=[n,o].indexOf(u[p])&&u.slice(p+1,-1).every((function(t){return t==e}))&&14==h||15==c&&-1!=[r,o].indexOf(h)?0:-1!=s.indexOf(t)?2:c==t&&h==t?0:1}function u(a){return 1536<=a&&a<=1541||1757==a||1807==a||2274==a||3406==a||69821==a||70082<=a&&a<=70083||72250==a||72326<=a&&a<=72329||73030==a?i:13==a?0:10==a?1:0<=a&&a<=9||11<=a&&a<=12||14<=a&&a<=31||127<=a&&a<=159||173==a||1564==a||6158==a||8203==a||8206<=a&&a<=8207||8232==a||8233==a||8234<=a&&a<=8238||8288<=a&&a<=8292||8293==a||8294<=a&&a<=8303||55296<=a&&a<=57343||65279==a||65520<=a&&a<=65528||65529<=a&&a<=65531||113824<=a&&a<=113827||119155<=a&&a<=119162||917504==a||917505==a||917506<=a&&a<=917535||917632<=a&&a<=917759||918e3<=a&&a<=921599?2:768<=a&&a<=879||1155<=a&&a<=1159||1160<=a&&a<=1161||1425<=a&&a<=1469||1471==a||1473<=a&&a<=1474||1476<=a&&a<=1477||1479==a||1552<=a&&a<=1562||1611<=a&&a<=1631||1648==a||1750<=a&&a<=1756||1759<=a&&a<=1764||1767<=a&&a<=1768||1770<=a&&a<=1773||1809==a||1840<=a&&a<=1866||1958<=a&&a<=1968||2027<=a&&a<=2035||2070<=a&&a<=2073||2075<=a&&a<=2083||2085<=a&&a<=2087||2089<=a&&a<=2093||2137<=a&&a<=2139||2260<=a&&a<=2273||2275<=a&&a<=2306||2362==a||2364==a||2369<=a&&a<=2376||2381==a||2385<=a&&a<=2391||2402<=a&&a<=2403||2433==a||2492==a||2494==a||2497<=a&&a<=2500||2509==a||2519==a||2530<=a&&a<=2531||2561<=a&&a<=2562||2620==a||2625<=a&&a<=2626||2631<=a&&a<=2632||2635<=a&&a<=2637||2641==a||2672<=a&&a<=2673||2677==a||2689<=a&&a<=2690||2748==a||2753<=a&&a<=2757||2759<=a&&a<=2760||2765==a||2786<=a&&a<=2787||2810<=a&&a<=2815||2817==a||2876==a||2878==a||2879==a||2881<=a&&a<=2884||2893==a||2902==a||2903==a||2914<=a&&a<=2915||2946==a||3006==a||3008==a||3021==a||3031==a||3072==a||3134<=a&&a<=3136||3142<=a&&a<=3144||3146<=a&&a<=3149||3157<=a&&a<=3158||3170<=a&&a<=3171||3201==a||3260==a||3263==a||3266==a||3270==a||3276<=a&&a<=3277||3285<=a&&a<=3286||3298<=a&&a<=3299||3328<=a&&a<=3329||3387<=a&&a<=3388||3390==a||3393<=a&&a<=3396||3405==a||3415==a||3426<=a&&a<=3427||3530==a||3535==a||3538<=a&&a<=3540||3542==a||3551==a||3633==a||3636<=a&&a<=3642||3655<=a&&a<=3662||3761==a||3764<=a&&a<=3769||3771<=a&&a<=3772||3784<=a&&a<=3789||3864<=a&&a<=3865||3893==a||3895==a||3897==a||3953<=a&&a<=3966||3968<=a&&a<=3972||3974<=a&&a<=3975||3981<=a&&a<=3991||3993<=a&&a<=4028||4038==a||4141<=a&&a<=4144||4146<=a&&a<=4151||4153<=a&&a<=4154||4157<=a&&a<=4158||4184<=a&&a<=4185||4190<=a&&a<=4192||4209<=a&&a<=4212||4226==a||4229<=a&&a<=4230||4237==a||4253==a||4957<=a&&a<=4959||5906<=a&&a<=5908||5938<=a&&a<=5940||5970<=a&&a<=5971||6002<=a&&a<=6003||6068<=a&&a<=6069||6071<=a&&a<=6077||6086==a||6089<=a&&a<=6099||6109==a||6155<=a&&a<=6157||6277<=a&&a<=6278||6313==a||6432<=a&&a<=6434||6439<=a&&a<=6440||6450==a||6457<=a&&a<=6459||6679<=a&&a<=6680||6683==a||6742==a||6744<=a&&a<=6750||6752==a||6754==a||6757<=a&&a<=6764||6771<=a&&a<=6780||6783==a||6832<=a&&a<=6845||6846==a||6912<=a&&a<=6915||6964==a||6966<=a&&a<=6970||6972==a||6978==a||7019<=a&&a<=7027||7040<=a&&a<=7041||7074<=a&&a<=7077||7080<=a&&a<=7081||7083<=a&&a<=7085||7142==a||7144<=a&&a<=7145||7149==a||7151<=a&&a<=7153||7212<=a&&a<=7219||7222<=a&&a<=7223||7376<=a&&a<=7378||7380<=a&&a<=7392||7394<=a&&a<=7400||7405==a||7412==a||7416<=a&&a<=7417||7616<=a&&a<=7673||7675<=a&&a<=7679||8204==a||8400<=a&&a<=8412||8413<=a&&a<=8416||8417==a||8418<=a&&a<=8420||8421<=a&&a<=8432||11503<=a&&a<=11505||11647==a||11744<=a&&a<=11775||12330<=a&&a<=12333||12334<=a&&a<=12335||12441<=a&&a<=12442||42607==a||42608<=a&&a<=42610||42612<=a&&a<=42621||42654<=a&&a<=42655||42736<=a&&a<=42737||43010==a||43014==a||43019==a||43045<=a&&a<=43046||43204<=a&&a<=43205||43232<=a&&a<=43249||43302<=a&&a<=43309||43335<=a&&a<=43345||43392<=a&&a<=43394||43443==a||43446<=a&&a<=43449||43452==a||43493==a||43561<=a&&a<=43566||43569<=a&&a<=43570||43573<=a&&a<=43574||43587==a||43596==a||43644==a||43696==a||43698<=a&&a<=43700||43703<=a&&a<=43704||43710<=a&&a<=43711||43713==a||43756<=a&&a<=43757||43766==a||44005==a||44008==a||44013==a||64286==a||65024<=a&&a<=65039||65056<=a&&a<=65071||65438<=a&&a<=65439||66045==a||66272==a||66422<=a&&a<=66426||68097<=a&&a<=68099||68101<=a&&a<=68102||68108<=a&&a<=68111||68152<=a&&a<=68154||68159==a||68325<=a&&a<=68326||69633==a||69688<=a&&a<=69702||69759<=a&&a<=69761||69811<=a&&a<=69814||69817<=a&&a<=69818||69888<=a&&a<=69890||69927<=a&&a<=69931||69933<=a&&a<=69940||70003==a||70016<=a&&a<=70017||70070<=a&&a<=70078||70090<=a&&a<=70092||70191<=a&&a<=70193||70196==a||70198<=a&&a<=70199||70206==a||70367==a||70371<=a&&a<=70378||70400<=a&&a<=70401||70460==a||70462==a||70464==a||70487==a||70502<=a&&a<=70508||70512<=a&&a<=70516||70712<=a&&a<=70719||70722<=a&&a<=70724||70726==a||70832==a||70835<=a&&a<=70840||70842==a||70845==a||70847<=a&&a<=70848||70850<=a&&a<=70851||71087==a||71090<=a&&a<=71093||71100<=a&&a<=71101||71103<=a&&a<=71104||71132<=a&&a<=71133||71219<=a&&a<=71226||71229==a||71231<=a&&a<=71232||71339==a||71341==a||71344<=a&&a<=71349||71351==a||71453<=a&&a<=71455||71458<=a&&a<=71461||71463<=a&&a<=71467||72193<=a&&a<=72198||72201<=a&&a<=72202||72243<=a&&a<=72248||72251<=a&&a<=72254||72263==a||72273<=a&&a<=72278||72281<=a&&a<=72283||72330<=a&&a<=72342||72344<=a&&a<=72345||72752<=a&&a<=72758||72760<=a&&a<=72765||72767==a||72850<=a&&a<=72871||72874<=a&&a<=72880||72882<=a&&a<=72883||72885<=a&&a<=72886||73009<=a&&a<=73014||73018==a||73020<=a&&a<=73021||73023<=a&&a<=73029||73031==a||92912<=a&&a<=92916||92976<=a&&a<=92982||94095<=a&&a<=94098||113821<=a&&a<=113822||119141==a||119143<=a&&a<=119145||119150<=a&&a<=119154||119163<=a&&a<=119170||119173<=a&&a<=119179||119210<=a&&a<=119213||119362<=a&&a<=119364||121344<=a&&a<=121398||121403<=a&&a<=121452||121461==a||121476==a||121499<=a&&a<=121503||121505<=a&&a<=121519||122880<=a&&a<=122886||122888<=a&&a<=122904||122907<=a&&a<=122913||122915<=a&&a<=122916||122918<=a&&a<=122922||125136<=a&&a<=125142||125252<=a&&a<=125258||917536<=a&&a<=917631||917760<=a&&a<=917999?e:127462<=a&&a<=127487?t:2307==a||2363==a||2366<=a&&a<=2368||2377<=a&&a<=2380||2382<=a&&a<=2383||2434<=a&&a<=2435||2495<=a&&a<=2496||2503<=a&&a<=2504||2507<=a&&a<=2508||2563==a||2622<=a&&a<=2624||2691==a||2750<=a&&a<=2752||2761==a||2763<=a&&a<=2764||2818<=a&&a<=2819||2880==a||2887<=a&&a<=2888||2891<=a&&a<=2892||3007==a||3009<=a&&a<=3010||3014<=a&&a<=3016||3018<=a&&a<=3020||3073<=a&&a<=3075||3137<=a&&a<=3140||3202<=a&&a<=3203||3262==a||3264<=a&&a<=3265||3267<=a&&a<=3268||3271<=a&&a<=3272||3274<=a&&a<=3275||3330<=a&&a<=3331||3391<=a&&a<=3392||3398<=a&&a<=3400||3402<=a&&a<=3404||3458<=a&&a<=3459||3536<=a&&a<=3537||3544<=a&&a<=3550||3570<=a&&a<=3571||3635==a||3763==a||3902<=a&&a<=3903||3967==a||4145==a||4155<=a&&a<=4156||4182<=a&&a<=4183||4228==a||6070==a||6078<=a&&a<=6085||6087<=a&&a<=6088||6435<=a&&a<=6438||6441<=a&&a<=6443||6448<=a&&a<=6449||6451<=a&&a<=6456||6681<=a&&a<=6682||6741==a||6743==a||6765<=a&&a<=6770||6916==a||6965==a||6971==a||6973<=a&&a<=6977||6979<=a&&a<=6980||7042==a||7073==a||7078<=a&&a<=7079||7082==a||7143==a||7146<=a&&a<=7148||7150==a||7154<=a&&a<=7155||7204<=a&&a<=7211||7220<=a&&a<=7221||7393==a||7410<=a&&a<=7411||7415==a||43043<=a&&a<=43044||43047==a||43136<=a&&a<=43137||43188<=a&&a<=43203||43346<=a&&a<=43347||43395==a||43444<=a&&a<=43445||43450<=a&&a<=43451||43453<=a&&a<=43456||43567<=a&&a<=43568||43571<=a&&a<=43572||43597==a||43755==a||43758<=a&&a<=43759||43765==a||44003<=a&&a<=44004||44006<=a&&a<=44007||44009<=a&&a<=44010||44012==a||69632==a||69634==a||69762==a||69808<=a&&a<=69810||69815<=a&&a<=69816||69932==a||70018==a||70067<=a&&a<=70069||70079<=a&&a<=70080||70188<=a&&a<=70190||70194<=a&&a<=70195||70197==a||70368<=a&&a<=70370||70402<=a&&a<=70403||70463==a||70465<=a&&a<=70468||70471<=a&&a<=70472||70475<=a&&a<=70477||70498<=a&&a<=70499||70709<=a&&a<=70711||70720<=a&&a<=70721||70725==a||70833<=a&&a<=70834||70841==a||70843<=a&&a<=70844||70846==a||70849==a||71088<=a&&a<=71089||71096<=a&&a<=71099||71102==a||71216<=a&&a<=71218||71227<=a&&a<=71228||71230==a||71340==a||71342<=a&&a<=71343||71350==a||71456<=a&&a<=71457||71462==a||72199<=a&&a<=72200||72249==a||72279<=a&&a<=72280||72343==a||72751==a||72766==a||72873==a||72881==a||72884==a||94033<=a&&a<=94078||119142==a||119149==a?5:4352<=a&&a<=4447||43360<=a&&a<=43388?6:4448<=a&&a<=4519||55216<=a&&a<=55238?7:4520<=a&&a<=4607||55243<=a&&a<=55291?8:44032==a||44060==a||44088==a||44116==a||44144==a||44172==a||44200==a||44228==a||44256==a||44284==a||44312==a||44340==a||44368==a||44396==a||44424==a||44452==a||44480==a||44508==a||44536==a||44564==a||44592==a||44620==a||44648==a||44676==a||44704==a||44732==a||44760==a||44788==a||44816==a||44844==a||44872==a||44900==a||44928==a||44956==a||44984==a||45012==a||45040==a||45068==a||45096==a||45124==a||45152==a||45180==a||45208==a||45236==a||45264==a||45292==a||45320==a||45348==a||45376==a||45404==a||45432==a||45460==a||45488==a||45516==a||45544==a||45572==a||45600==a||45628==a||45656==a||45684==a||45712==a||45740==a||45768==a||45796==a||45824==a||45852==a||45880==a||45908==a||45936==a||45964==a||45992==a||46020==a||46048==a||46076==a||46104==a||46132==a||46160==a||46188==a||46216==a||46244==a||46272==a||46300==a||46328==a||46356==a||46384==a||46412==a||46440==a||46468==a||46496==a||46524==a||46552==a||46580==a||46608==a||46636==a||46664==a||46692==a||46720==a||46748==a||46776==a||46804==a||46832==a||46860==a||46888==a||46916==a||46944==a||46972==a||47e3==a||47028==a||47056==a||47084==a||47112==a||47140==a||47168==a||47196==a||47224==a||47252==a||47280==a||47308==a||47336==a||47364==a||47392==a||47420==a||47448==a||47476==a||47504==a||47532==a||47560==a||47588==a||47616==a||47644==a||47672==a||47700==a||47728==a||47756==a||47784==a||47812==a||47840==a||47868==a||47896==a||47924==a||47952==a||47980==a||48008==a||48036==a||48064==a||48092==a||48120==a||48148==a||48176==a||48204==a||48232==a||48260==a||48288==a||48316==a||48344==a||48372==a||48400==a||48428==a||48456==a||48484==a||48512==a||48540==a||48568==a||48596==a||48624==a||48652==a||48680==a||48708==a||48736==a||48764==a||48792==a||48820==a||48848==a||48876==a||48904==a||48932==a||48960==a||48988==a||49016==a||49044==a||49072==a||49100==a||49128==a||49156==a||49184==a||49212==a||49240==a||49268==a||49296==a||49324==a||49352==a||49380==a||49408==a||49436==a||49464==a||49492==a||49520==a||49548==a||49576==a||49604==a||49632==a||49660==a||49688==a||49716==a||49744==a||49772==a||49800==a||49828==a||49856==a||49884==a||49912==a||49940==a||49968==a||49996==a||50024==a||50052==a||50080==a||50108==a||50136==a||50164==a||50192==a||50220==a||50248==a||50276==a||50304==a||50332==a||50360==a||50388==a||50416==a||50444==a||50472==a||50500==a||50528==a||50556==a||50584==a||50612==a||50640==a||50668==a||50696==a||50724==a||50752==a||50780==a||50808==a||50836==a||50864==a||50892==a||50920==a||50948==a||50976==a||51004==a||51032==a||51060==a||51088==a||51116==a||51144==a||51172==a||51200==a||51228==a||51256==a||51284==a||51312==a||51340==a||51368==a||51396==a||51424==a||51452==a||51480==a||51508==a||51536==a||51564==a||51592==a||51620==a||51648==a||51676==a||51704==a||51732==a||51760==a||51788==a||51816==a||51844==a||51872==a||51900==a||51928==a||51956==a||51984==a||52012==a||52040==a||52068==a||52096==a||52124==a||52152==a||52180==a||52208==a||52236==a||52264==a||52292==a||52320==a||52348==a||52376==a||52404==a||52432==a||52460==a||52488==a||52516==a||52544==a||52572==a||52600==a||52628==a||52656==a||52684==a||52712==a||52740==a||52768==a||52796==a||52824==a||52852==a||52880==a||52908==a||52936==a||52964==a||52992==a||53020==a||53048==a||53076==a||53104==a||53132==a||53160==a||53188==a||53216==a||53244==a||53272==a||53300==a||53328==a||53356==a||53384==a||53412==a||53440==a||53468==a||53496==a||53524==a||53552==a||53580==a||53608==a||53636==a||53664==a||53692==a||53720==a||53748==a||53776==a||53804==a||53832==a||53860==a||53888==a||53916==a||53944==a||53972==a||54e3==a||54028==a||54056==a||54084==a||54112==a||54140==a||54168==a||54196==a||54224==a||54252==a||54280==a||54308==a||54336==a||54364==a||54392==a||54420==a||54448==a||54476==a||54504==a||54532==a||54560==a||54588==a||54616==a||54644==a||54672==a||54700==a||54728==a||54756==a||54784==a||54812==a||54840==a||54868==a||54896==a||54924==a||54952==a||54980==a||55008==a||55036==a||55064==a||55092==a||55120==a||55148==a||55176==a?9:44033<=a&&a<=44059||44061<=a&&a<=44087||44089<=a&&a<=44115||44117<=a&&a<=44143||44145<=a&&a<=44171||44173<=a&&a<=44199||44201<=a&&a<=44227||44229<=a&&a<=44255||44257<=a&&a<=44283||44285<=a&&a<=44311||44313<=a&&a<=44339||44341<=a&&a<=44367||44369<=a&&a<=44395||44397<=a&&a<=44423||44425<=a&&a<=44451||44453<=a&&a<=44479||44481<=a&&a<=44507||44509<=a&&a<=44535||44537<=a&&a<=44563||44565<=a&&a<=44591||44593<=a&&a<=44619||44621<=a&&a<=44647||44649<=a&&a<=44675||44677<=a&&a<=44703||44705<=a&&a<=44731||44733<=a&&a<=44759||44761<=a&&a<=44787||44789<=a&&a<=44815||44817<=a&&a<=44843||44845<=a&&a<=44871||44873<=a&&a<=44899||44901<=a&&a<=44927||44929<=a&&a<=44955||44957<=a&&a<=44983||44985<=a&&a<=45011||45013<=a&&a<=45039||45041<=a&&a<=45067||45069<=a&&a<=45095||45097<=a&&a<=45123||45125<=a&&a<=45151||45153<=a&&a<=45179||45181<=a&&a<=45207||45209<=a&&a<=45235||45237<=a&&a<=45263||45265<=a&&a<=45291||45293<=a&&a<=45319||45321<=a&&a<=45347||45349<=a&&a<=45375||45377<=a&&a<=45403||45405<=a&&a<=45431||45433<=a&&a<=45459||45461<=a&&a<=45487||45489<=a&&a<=45515||45517<=a&&a<=45543||45545<=a&&a<=45571||45573<=a&&a<=45599||45601<=a&&a<=45627||45629<=a&&a<=45655||45657<=a&&a<=45683||45685<=a&&a<=45711||45713<=a&&a<=45739||45741<=a&&a<=45767||45769<=a&&a<=45795||45797<=a&&a<=45823||45825<=a&&a<=45851||45853<=a&&a<=45879||45881<=a&&a<=45907||45909<=a&&a<=45935||45937<=a&&a<=45963||45965<=a&&a<=45991||45993<=a&&a<=46019||46021<=a&&a<=46047||46049<=a&&a<=46075||46077<=a&&a<=46103||46105<=a&&a<=46131||46133<=a&&a<=46159||46161<=a&&a<=46187||46189<=a&&a<=46215||46217<=a&&a<=46243||46245<=a&&a<=46271||46273<=a&&a<=46299||46301<=a&&a<=46327||46329<=a&&a<=46355||46357<=a&&a<=46383||46385<=a&&a<=46411||46413<=a&&a<=46439||46441<=a&&a<=46467||46469<=a&&a<=46495||46497<=a&&a<=46523||46525<=a&&a<=46551||46553<=a&&a<=46579||46581<=a&&a<=46607||46609<=a&&a<=46635||46637<=a&&a<=46663||46665<=a&&a<=46691||46693<=a&&a<=46719||46721<=a&&a<=46747||46749<=a&&a<=46775||46777<=a&&a<=46803||46805<=a&&a<=46831||46833<=a&&a<=46859||46861<=a&&a<=46887||46889<=a&&a<=46915||46917<=a&&a<=46943||46945<=a&&a<=46971||46973<=a&&a<=46999||47001<=a&&a<=47027||47029<=a&&a<=47055||47057<=a&&a<=47083||47085<=a&&a<=47111||47113<=a&&a<=47139||47141<=a&&a<=47167||47169<=a&&a<=47195||47197<=a&&a<=47223||47225<=a&&a<=47251||47253<=a&&a<=47279||47281<=a&&a<=47307||47309<=a&&a<=47335||47337<=a&&a<=47363||47365<=a&&a<=47391||47393<=a&&a<=47419||47421<=a&&a<=47447||47449<=a&&a<=47475||47477<=a&&a<=47503||47505<=a&&a<=47531||47533<=a&&a<=47559||47561<=a&&a<=47587||47589<=a&&a<=47615||47617<=a&&a<=47643||47645<=a&&a<=47671||47673<=a&&a<=47699||47701<=a&&a<=47727||47729<=a&&a<=47755||47757<=a&&a<=47783||47785<=a&&a<=47811||47813<=a&&a<=47839||47841<=a&&a<=47867||47869<=a&&a<=47895||47897<=a&&a<=47923||47925<=a&&a<=47951||47953<=a&&a<=47979||47981<=a&&a<=48007||48009<=a&&a<=48035||48037<=a&&a<=48063||48065<=a&&a<=48091||48093<=a&&a<=48119||48121<=a&&a<=48147||48149<=a&&a<=48175||48177<=a&&a<=48203||48205<=a&&a<=48231||48233<=a&&a<=48259||48261<=a&&a<=48287||48289<=a&&a<=48315||48317<=a&&a<=48343||48345<=a&&a<=48371||48373<=a&&a<=48399||48401<=a&&a<=48427||48429<=a&&a<=48455||48457<=a&&a<=48483||48485<=a&&a<=48511||48513<=a&&a<=48539||48541<=a&&a<=48567||48569<=a&&a<=48595||48597<=a&&a<=48623||48625<=a&&a<=48651||48653<=a&&a<=48679||48681<=a&&a<=48707||48709<=a&&a<=48735||48737<=a&&a<=48763||48765<=a&&a<=48791||48793<=a&&a<=48819||48821<=a&&a<=48847||48849<=a&&a<=48875||48877<=a&&a<=48903||48905<=a&&a<=48931||48933<=a&&a<=48959||48961<=a&&a<=48987||48989<=a&&a<=49015||49017<=a&&a<=49043||49045<=a&&a<=49071||49073<=a&&a<=49099||49101<=a&&a<=49127||49129<=a&&a<=49155||49157<=a&&a<=49183||49185<=a&&a<=49211||49213<=a&&a<=49239||49241<=a&&a<=49267||49269<=a&&a<=49295||49297<=a&&a<=49323||49325<=a&&a<=49351||49353<=a&&a<=49379||49381<=a&&a<=49407||49409<=a&&a<=49435||49437<=a&&a<=49463||49465<=a&&a<=49491||49493<=a&&a<=49519||49521<=a&&a<=49547||49549<=a&&a<=49575||49577<=a&&a<=49603||49605<=a&&a<=49631||49633<=a&&a<=49659||49661<=a&&a<=49687||49689<=a&&a<=49715||49717<=a&&a<=49743||49745<=a&&a<=49771||49773<=a&&a<=49799||49801<=a&&a<=49827||49829<=a&&a<=49855||49857<=a&&a<=49883||49885<=a&&a<=49911||49913<=a&&a<=49939||49941<=a&&a<=49967||49969<=a&&a<=49995||49997<=a&&a<=50023||50025<=a&&a<=50051||50053<=a&&a<=50079||50081<=a&&a<=50107||50109<=a&&a<=50135||50137<=a&&a<=50163||50165<=a&&a<=50191||50193<=a&&a<=50219||50221<=a&&a<=50247||50249<=a&&a<=50275||50277<=a&&a<=50303||50305<=a&&a<=50331||50333<=a&&a<=50359||50361<=a&&a<=50387||50389<=a&&a<=50415||50417<=a&&a<=50443||50445<=a&&a<=50471||50473<=a&&a<=50499||50501<=a&&a<=50527||50529<=a&&a<=50555||50557<=a&&a<=50583||50585<=a&&a<=50611||50613<=a&&a<=50639||50641<=a&&a<=50667||50669<=a&&a<=50695||50697<=a&&a<=50723||50725<=a&&a<=50751||50753<=a&&a<=50779||50781<=a&&a<=50807||50809<=a&&a<=50835||50837<=a&&a<=50863||50865<=a&&a<=50891||50893<=a&&a<=50919||50921<=a&&a<=50947||50949<=a&&a<=50975||50977<=a&&a<=51003||51005<=a&&a<=51031||51033<=a&&a<=51059||51061<=a&&a<=51087||51089<=a&&a<=51115||51117<=a&&a<=51143||51145<=a&&a<=51171||51173<=a&&a<=51199||51201<=a&&a<=51227||51229<=a&&a<=51255||51257<=a&&a<=51283||51285<=a&&a<=51311||51313<=a&&a<=51339||51341<=a&&a<=51367||51369<=a&&a<=51395||51397<=a&&a<=51423||51425<=a&&a<=51451||51453<=a&&a<=51479||51481<=a&&a<=51507||51509<=a&&a<=51535||51537<=a&&a<=51563||51565<=a&&a<=51591||51593<=a&&a<=51619||51621<=a&&a<=51647||51649<=a&&a<=51675||51677<=a&&a<=51703||51705<=a&&a<=51731||51733<=a&&a<=51759||51761<=a&&a<=51787||51789<=a&&a<=51815||51817<=a&&a<=51843||51845<=a&&a<=51871||51873<=a&&a<=51899||51901<=a&&a<=51927||51929<=a&&a<=51955||51957<=a&&a<=51983||51985<=a&&a<=52011||52013<=a&&a<=52039||52041<=a&&a<=52067||52069<=a&&a<=52095||52097<=a&&a<=52123||52125<=a&&a<=52151||52153<=a&&a<=52179||52181<=a&&a<=52207||52209<=a&&a<=52235||52237<=a&&a<=52263||52265<=a&&a<=52291||52293<=a&&a<=52319||52321<=a&&a<=52347||52349<=a&&a<=52375||52377<=a&&a<=52403||52405<=a&&a<=52431||52433<=a&&a<=52459||52461<=a&&a<=52487||52489<=a&&a<=52515||52517<=a&&a<=52543||52545<=a&&a<=52571||52573<=a&&a<=52599||52601<=a&&a<=52627||52629<=a&&a<=52655||52657<=a&&a<=52683||52685<=a&&a<=52711||52713<=a&&a<=52739||52741<=a&&a<=52767||52769<=a&&a<=52795||52797<=a&&a<=52823||52825<=a&&a<=52851||52853<=a&&a<=52879||52881<=a&&a<=52907||52909<=a&&a<=52935||52937<=a&&a<=52963||52965<=a&&a<=52991||52993<=a&&a<=53019||53021<=a&&a<=53047||53049<=a&&a<=53075||53077<=a&&a<=53103||53105<=a&&a<=53131||53133<=a&&a<=53159||53161<=a&&a<=53187||53189<=a&&a<=53215||53217<=a&&a<=53243||53245<=a&&a<=53271||53273<=a&&a<=53299||53301<=a&&a<=53327||53329<=a&&a<=53355||53357<=a&&a<=53383||53385<=a&&a<=53411||53413<=a&&a<=53439||53441<=a&&a<=53467||53469<=a&&a<=53495||53497<=a&&a<=53523||53525<=a&&a<=53551||53553<=a&&a<=53579||53581<=a&&a<=53607||53609<=a&&a<=53635||53637<=a&&a<=53663||53665<=a&&a<=53691||53693<=a&&a<=53719||53721<=a&&a<=53747||53749<=a&&a<=53775||53777<=a&&a<=53803||53805<=a&&a<=53831||53833<=a&&a<=53859||53861<=a&&a<=53887||53889<=a&&a<=53915||53917<=a&&a<=53943||53945<=a&&a<=53971||53973<=a&&a<=53999||54001<=a&&a<=54027||54029<=a&&a<=54055||54057<=a&&a<=54083||54085<=a&&a<=54111||54113<=a&&a<=54139||54141<=a&&a<=54167||54169<=a&&a<=54195||54197<=a&&a<=54223||54225<=a&&a<=54251||54253<=a&&a<=54279||54281<=a&&a<=54307||54309<=a&&a<=54335||54337<=a&&a<=54363||54365<=a&&a<=54391||54393<=a&&a<=54419||54421<=a&&a<=54447||54449<=a&&a<=54475||54477<=a&&a<=54503||54505<=a&&a<=54531||54533<=a&&a<=54559||54561<=a&&a<=54587||54589<=a&&a<=54615||54617<=a&&a<=54643||54645<=a&&a<=54671||54673<=a&&a<=54699||54701<=a&&a<=54727||54729<=a&&a<=54755||54757<=a&&a<=54783||54785<=a&&a<=54811||54813<=a&&a<=54839||54841<=a&&a<=54867||54869<=a&&a<=54895||54897<=a&&a<=54923||54925<=a&&a<=54951||54953<=a&&a<=54979||54981<=a&&a<=55007||55009<=a&&a<=55035||55037<=a&&a<=55063||55065<=a&&a<=55091||55093<=a&&a<=55119||55121<=a&&a<=55147||55149<=a&&a<=55175||55177<=a&&a<=55203?10:9757==a||9977==a||9994<=a&&a<=9997||127877==a||127938<=a&&a<=127940||127943==a||127946<=a&&a<=127948||128066<=a&&a<=128067||128070<=a&&a<=128080||128110==a||128112<=a&&a<=128120||128124==a||128129<=a&&a<=128131||128133<=a&&a<=128135||128170==a||128372<=a&&a<=128373||128378==a||128400==a||128405<=a&&a<=128406||128581<=a&&a<=128583||128587<=a&&a<=128591||128675==a||128692<=a&&a<=128694||128704==a||128716==a||129304<=a&&a<=129308||129310<=a&&a<=129311||129318==a||129328<=a&&a<=129337||129341<=a&&a<=129342||129489<=a&&a<=129501?n:127995<=a&&a<=127999?14:8205==a?15:9792==a||9794==a||9877<=a&&a<=9878||9992==a||10084==a||127752==a||127806==a||127859==a||127891==a||127908==a||127912==a||127979==a||127981==a||128139==a||128187<=a&&a<=128188||128295==a||128300==a||128488==a||128640==a||128658==a?r:128102<=a&&a<=128105?o:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var i=u(s(e,t)),n=[],r=t+1;r0,h=t._backgroundBillboard,d=e._backgroundBillboardCollection;c?(e$2b(h)||(h=e$2b(t._backgroundImage)?d.add({collection:e,image:t._backgroundImage}):d.add({collection:e,image:ie$z,imageSubRegion:ve$n}),t._backgroundBillboard=h),e$2b(t._backgroundImage)||(h.color=t._backgroundColor),h.show=t._show,h.position=t._position,h.eyeOffset=t._eyeOffset,h.pixelOffset=t._pixelOffset,h.horizontalOrigin=j$T.LEFT,h.verticalOrigin=t._verticalOrigin,h.heightReference=t._heightReference,h.scale=t.totalScale,h.pickPrimitive=t,h.id=t._id,h.translucencyByDistance=t._translucencyByDistance,h.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,h.scaleByDistance=t._scaleByDistance,h.distanceDisplayCondition=t._distanceDisplayCondition,h.disableDepthTestDistance=t._disableDepthTestDistance,h.opacityState=t._opacityState):e$2b(h)&&(d.remove(h),t._backgroundBillboard=h=void 0);var f=e._glyphTextureCache,p=[0],_=0;for(r=0;r0&&y.height>0){for(var $=b$10(y,{cutoff:V$I.CUTOFF,radius:V$I.RADIUS}),b=y.getContext("2d"),T=y.width,C=y.height,S=b.getImageData(0,0,T,C),w=0;w0?M=R.pop():((M=e._billboardCollection.add({collection:e}))._labelDimensions=new o$1o,M._labelTranslate=new o$1o),i.billboard=M),M.show=t._show,M._heightReference=t._heightReference,M.position=t._position,M.eyeOffset=t._eyeOffset,M.pixelOffset=t._pixelOffset,M.horizontalOrigin=j$T.LEFT,M.verticalOrigin=t._verticalOrigin,M.scale=t.totalScale,M.pickPrimitive=t,M.id=t._id,M.image=x,M.translucencyByDistance=t._translucencyByDistance,M.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,M.scaleByDistance=t._scaleByDistance,M.distanceDisplayCondition=t._distanceDisplayCondition,M.disableDepthTestDistance=t._disableDepthTestDistance,M._batchIndex=t._batchIndex,M.outlineColor=t.outlineColor,M.opacityState=t._opacityState,t.style===R$Q.FILL_AND_OUTLINE?(M.color=t._fillColor,M.outlineWidth=t.outlineWidth):t.style===R$Q.FILL?(M.color=t._fillColor,M.outlineWidth=0):t.style===R$Q.OUTLINE&&(M.color=e$1U.TRANSPARENT,M.outlineWidth=t.outlineWidth)}}e._isMVT&&Te$l(t,h,l,s,p),t._repositionAllGlyphs=!0}function Te$l(e,t,i,n,r){for(var o=0,a=0;a0&&($=g===j$T.CENTER?-s/2-p.x:g===j$T.RIGHT?-(s+2*p.x):0,c$P.x=$*m,x===S$O.TOP?c$P.y=_-c-u:x===S$O.CENTER?c$P.y=(_-c)/2-u:x===S$O.BASELINE?c$P.y=-p.y-u:c$P.y=0,c$P.y=c$P.y*m,f.width=C,f.height=S,f._setTranslate(c$P),f._labelTranslate=o$1o.clone(c$P,f._labelTranslate)),e.heightReference===k$P.CLAMP_TO_GROUND)for(n=0;n0&&delete this._labelsID[e.id],!0}return!1},g$U.prototype.removeAll=function(){for(var e=this._labels,t=0,i=e.length;t8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<8)throw new t$16("the index is 0~8");return 1<-1&&this._labels.length>0){if(e$2b(this._labels[0]._id)&&e$2b(this._labels[0]._id.entityCollection)){var n=this._labels[0]._id.entityCollection.owner;if(typeof n.getVisibleInViewport<"u")if(!n.getVisibleInViewport(e.multiViewportIndex))return}if(!this.getVisibleInViewport(e.multiViewportIndex))return}var r=this._billboardCollection,o=this._backgroundBillboardCollection;r.modelMatrix=this.modelMatrix,r.debugShowBoundingVolume=this.debugShowBoundingVolume,o.modelMatrix=this.modelMatrix,o.debugShowBoundingVolume=this.debugShowBoundingVolume;t=e.context;e$2b(this._textureAtlas)||(this._textureAtlas=new v$I({context:t}),r.textureAtlas=this._textureAtlas),e$2b(this._backgroundTextureAtlas)||(this._backgroundTextureAtlas=new v$I({context:t,initialSize:q$U}),o.textureAtlas=this._backgroundTextureAtlas,ye$k(this._backgroundTextureAtlas,this));for(var a=this._labelsToUpdate.length,s=0;s0?S$J.TRANSLUCENT:this.blendOption;r.blendOption=h,o.blendOption=h,r._highlightColor=this._highlightColor,o._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,o.update(e,t,i),r.update(e,t,i)},g$U.prototype.isDestroyed=function(){return!1},g$U.prototype.destroy=function(){return this.removeAll(),this._billboardCollection=this._billboardCollection.destroy(),this._textureAtlas=this._textureAtlas&&this._textureAtlas.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),this._backgroundTextureAtlas=this._backgroundTextureAtlas&&this._backgroundTextureAtlas.destroy(),i$10(this)},g$U.prototype.setLabelStyle=function(e){for(var t=this._labels.length,i=0;i=i&&h.x<=n&&h.y>=r&&h.y<=o&&a.push({index:u,clustered:!0,coord:h})}}var d=O$B(a,De$n,Oe$j,4096,Int32Array),f=[],p=a.length;for(s=0;s0?(e=this._unUse[0],this._unUse.splice(0,1),this._use.push(e),e):(e=new w$N({scene:this._scene,style3D:this._owner._style3D,isMVT:!0,swipeEnabled:this._owner._swipeEnabled,swipeRegion:this._owner._swipeRegion,billboardMode:this._owner._billboardMode,depthTestEnable:!1}),e.showCallout=this._showCallout,this._use.push(e),e)},BillboardCollectionPool.prototype.setVisibleInViewport=function(e,t){},BillboardCollectionPool.prototype.getVisibleInViewport=function(e){return 0},BillboardCollectionPool.prototype.destroy=function(){for(var e=0;e100&&(e=100),this._provider.globalLineWidthScale=e}},lineAntialiasing:{get:function(){return this._provider.lineAntialiasing},set:function(e){this._provider.lineAntialiasing=e}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(e$2b(e)&&e instanceof f$18))throw new t$16("Expected VectorTilesMap.swipeRegion to be type of BoundingRectangle.");f$18.equals(e,this._swipeRegion)||(f$18.clone(e,this._swipeRegion),this._billboardCollectionPool.swipeRegion=this._swipeRegion,this._inner.swipeRegion=this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){o$1q.typeOf.bool("VectorTilesMap.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e,this._billboardCollectionPool.swipeEnabled=e,this._inner.swipeEnabled=this._swipeEnabled)}},isOverlapDisplayed:{get:function(){return this._provider.isOverlapDisplayed},set:function(e){this._provider.isOverlapDisplayed=e}},enableMorphing:{get:function(){return this._provider.enableMorphing},set:function(e){this._provider.enableMorphing=e}},queryTolerance:{get:function(){return this._provider.selectTolerance},set:function(e){this._provider.selectTolerance=e}},imageryLayer:{get:function(){return this._inner}}}),i$O.prototype.addLayer=function(e,t,i){this._provider._MVTStyle.addLayer(e,t,i)},i$O.prototype.removeLayer=function(e){this._provider._MVTStyle.removeLayer(e)},i$O.prototype.setFilter=function(e,t,i){if(!0===i){var n=[],r=this._provider._viewer.scene.camera.computeViewRectangle();if(e$2b(r)){var o=h$18.southwest(r),a=h$18.southeast(r),s=h$18.northeast(r),l=h$18.northwest(r);n=this._provider.queryRenderedFeatures([o,a,s,l],{layers:[e.replace(/(.*)(_highlight)/,"$1")]});for(var u=["in","$id"],c=(t=_0x570fee.createFilter(t),0);c/gm,Ge$d=/^data-[\-\w.\u00B7-\uFFFF]/,$e$9=/^aria-[\-\w]+$/,qe$c=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,Ve$e=/^(?:\w+script|data):/i,Xe$9=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,x$V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function c$O(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t"u"?null:window};function Ee$l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ye$c(),t=function(e){return Ee$l(e)};if(t.version="1.0.8",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var i=e.document,n=!1,r=!1,o=e.document,a=e.DocumentFragment,s=e.HTMLTemplateElement,l=e.Node,u=e.NodeFilter,c=e.NamedNodeMap,h=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,d=e.Text,f=e.Comment,p=e.DOMParser;if("function"==typeof s){var _=o.createElement("template");_.content&&_.content.ownerDocument&&(o=_.content.ownerDocument)}var m=o,g=m.implementation,x=m.createNodeIterator,v=m.getElementsByTagName,y=m.createDocumentFragment,$=i.importNode,b={};t.isSupported=g&&typeof g.createHTMLDocument<"u"&&9!==o.documentMode;var T=We$h,C=Be$i,S=Ge$d,w=$e$9,E=Ve$e,P=Xe$9,A=qe$c,L=null,M=o$P({},[].concat(c$O(ce$p),c$O(ve$m),c$O(he$o),c$O(Te$k),c$O(Ae$n))),R=null,I=o$P({},[].concat(c$O(_e$p),c$O(q$T),c$O(ge$n),c$O(M$S))),O=null,D=null,B=!0,N=!0,F=!1,U=!1,z=!1,G=!1,V=!1,k=!1,W=!1,H=!1,q=!1,j=!0,Y=!0,X=!1,K={},Q=o$P({},["audio","head","math","script","style","template","svg","video"]),Z=o$P({},["audio","video","img","source","image"]),J=o$P({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ee=null,te=o.createElement("form"),ie=function(e){"object"!==(typeof e>"u"?"undefined":x$V(e))&&(e={}),L="ALLOWED_TAGS"in e?o$P({},e.ALLOWED_TAGS):M,R="ALLOWED_ATTR"in e?o$P({},e.ALLOWED_ATTR):I,O="FORBID_TAGS"in e?o$P({},e.FORBID_TAGS):{},D="FORBID_ATTR"in e?o$P({},e.FORBID_ATTR):{},K="USE_PROFILES"in e&&e.USE_PROFILES,B=!1!==e.ALLOW_ARIA_ATTR,N=!1!==e.ALLOW_DATA_ATTR,F=e.ALLOW_UNKNOWN_PROTOCOLS||!1,U=e.SAFE_FOR_JQUERY||!1,z=e.SAFE_FOR_TEMPLATES||!1,G=e.WHOLE_DOCUMENT||!1,W=e.RETURN_DOM||!1,H=e.RETURN_DOM_FRAGMENT||!1,q=e.RETURN_DOM_IMPORT||!1,k=e.FORCE_BODY||!1,j=!1!==e.SANITIZE_DOM,Y=!1!==e.KEEP_CONTENT,X=e.IN_PLACE||!1,A=e.ALLOWED_URI_REGEXP||A,z&&(N=!1),H&&(W=!0),K&&(L=o$P({},[].concat(c$O(Ae$n))),R=[],!0===K.html&&(o$P(L,ce$p),o$P(R,_e$p)),!0===K.svg&&(o$P(L,ve$m),o$P(R,q$T),o$P(R,M$S)),!0===K.svgFilters&&(o$P(L,he$o),o$P(R,q$T),o$P(R,M$S)),!0===K.mathMl&&(o$P(L,Te$k),o$P(R,ge$n),o$P(R,M$S))),e.ADD_TAGS&&(L===M&&(L=ye$j(L)),o$P(L,e.ADD_TAGS)),e.ADD_ATTR&&(R===I&&(R=ye$j(R)),o$P(R,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&o$P(J,e.ADD_URI_SAFE_ATTR),Y&&(L["#text"]=!0),G&&o$P(L,["html","head","body"]),L.table&&o$P(L,["tbody"]),Object&&"freeze"in Object&&Object.freeze(e),ee=e},ne=function(e){t.removed.push({element:e});try{e.parentNode.removeChild(e)}catch{e.outerHTML=""}},re=function(e,i){try{t.removed.push({attribute:i.getAttributeNode(e),from:i})}catch{t.removed.push({attribute:null,from:i})}i.removeAttribute(e)},oe=function(e){var t=void 0,i=void 0;if(k)e=""+e;else{var a=e.match(/^[\s]+/);(i=a&&a[0])&&(e=e.slice(i.length))}if(n)try{t=(new p).parseFromString(e,"text/html")}catch{}if(r&&o$P(O,["title"]),!t||!t.documentElement){var s=(t=g.createHTMLDocument("")).body;s.parentNode.removeChild(s.parentNode.firstElementChild),s.outerHTML=e}return i&&t.body.insertBefore(o.createTextNode(i),t.body.childNodes[0]||null),v.call(t,G?"html":"body")[0]};t.isSupported&&(function(){try{oe('

').querySelector("svg img")&&(n=!0)}catch{}}(),function(){try{oe("</title><img>").querySelector("title").textContent.match(/<\/title/)&&(r=!0)}catch{}}());var ae=function(e){return x.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},se=function(e){return!(e instanceof d||e instanceof f)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute)},le=function(e){return"object"===(typeof l>"u"?"undefined":x$V(l))?e instanceof l:e&&"object"===(typeof e>"u"?"undefined":x$V(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ue=function(e,i,n){!b[e]||b[e].forEach((function(e){e.call(t,i,n,ee)}))},ce=function(e){var i=void 0;if(ue("beforeSanitizeElements",e,null),se(e))return ne(e),!0;var n=e.nodeName.toLowerCase();if(ue("uponSanitizeElement",e,{tagName:n,allowedTags:L}),!L[n]||O[n]){if(Y&&!Q[n]&&"function"==typeof e.insertAdjacentHTML)try{e.insertAdjacentHTML("AfterEnd",e.innerHTML)}catch{}return ne(e),!0}return U&&!e.firstElementChild&&(!e.content||!e.content.firstElementChild)&&/</g.test(e.textContent)&&(t.removed.push({element:e.cloneNode()}),e.innerHTML?e.innerHTML=e.innerHTML.replace(/</g,"<"):e.innerHTML=e.textContent.replace(/</g,"<")),z&&3===e.nodeType&&(i=(i=(i=e.textContent).replace(T," ")).replace(C," "),e.textContent!==i&&(t.removed.push({element:e.cloneNode()}),e.textContent=i)),ue("afterSanitizeElements",e,null),!1},he=function(e,t,i){if(j&&("id"===t||"name"===t)&&(i in o||i in te))return!1;if(!(z&&(i=i.replace(T," "),i=i.replace(C," ")),N&&S.test(t)||B&&w.test(t))){if(!R[t]||D[t])return!1;if(!J[t]&&!A.test(i.replace(P,""))&&("src"!==t&&"xlink:href"!==t||"script"===e||0!==i.indexOf("data:")||!Z[e])&&(!F||E.test(i.replace(P,"")))&&i)return!1}return!0},de=function(e){var i=void 0,n=void 0,r=void 0,o=void 0,a=void 0;ue("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R};for(a=s.length;a--;){var u=i=s[a],c=u.name,h=u.namespaceURI;if(n=i.value.trim(),r=c.toLowerCase(),l.attrName=r,l.attrValue=n,l.keepAttr=!0,ue("uponSanitizeAttribute",e,l),n=l.attrValue,"name"===r&&"IMG"===e.nodeName&&s.id)o=s.id,s=Array.prototype.slice.apply(s),re("id",e),re(c,e),s.indexOf(o)>a&&e.setAttribute("id",o.value);else{if("INPUT"===e.nodeName&&"type"===r&&"file"===n&&(R[r]||!D[r]))continue;"id"===c&&e.setAttribute(c,""),re(c,e)}if(l.keepAttr){var d=e.nodeName.toLowerCase();if(he(d,r,n))try{h?e.setAttributeNS(h,c,n):e.setAttribute(c,n),t.removed.pop()}catch{}}}ue("afterSanitizeAttributes",e,null)}},fe=function e(t){var i=void 0,n=ae(t);for(ue("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)ue("uponSanitizeShadowNode",i,null),!ce(i)&&(i.content instanceof a&&e(i.content),de(i));ue("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(n,r){var o=void 0,s=void 0,u=void 0,c=void 0,h=void 0;if(n||(n="\x3c!--\x3e"),"string"!=typeof n&&!le(n)){if("function"!=typeof n.toString)throw new TypeError("toString is not a function");if("string"!=typeof(n=n.toString()))throw new TypeError("dirty is not a string, aborting")}if(!t.isSupported){if("object"===x$V(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof n)return e.toStaticHTML(n);if(le(n))return e.toStaticHTML(n.outerHTML)}return n}if(V||ie(r),t.removed=[],!X)if(n instanceof l)1===(s=(o=oe("\x3c!--\x3e")).ownerDocument.importNode(n,!0)).nodeType&&"BODY"===s.nodeName?o=s:o.appendChild(s);else{if(!W&&!G&&-1===n.indexOf("<"))return n;if(!(o=oe(n)))return W?null:""}o&&k&&ne(o.firstChild);for(var d=ae(X?n:o);u=d.nextNode();)3===u.nodeType&&u===c||ce(u)||(u.content instanceof a&&fe(u.content),de(u),c=u);if(X)return n;if(W){if(H)for(h=y.call(o.ownerDocument);o.firstChild;)h.appendChild(o.firstChild);else h=o;return q&&(h=$.call(i,h,!0)),h}return G?o.outerHTML:o.innerHTML},t.setConfig=function(e){ie(e),V=!0},t.clearConfig=function(){ee=null,V=!1},t.isValidAttribute=function(e,t,i){ee||ie({});var n=e.toLowerCase(),r=t.toLowerCase();return he(n,r,i)},t.addHook=function(e,t){"function"==typeof t&&(b[e]=b[e]||[],b[e].push(t))},t.removeHook=function(e){b[e]&&b[e].pop()},t.removeHooks=function(e){b[e]&&(b[e]=[])},t.removeAllHooks=function(){b={}},t}var je$d=Ee$l(),a$J=0,l$V={};function r$T(e,t){o$1q.typeOf.string("html",e);var i,n=e;e$2b(l$V[n])?i=l$V[n]:(i=a$J++,l$V[n]=i),t=u$_(t,!1),this._id=i,this._html=e,this._showOnScreen=t,this._element=void 0}function f$P(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.typeOf.object("options.clock",e.clock),o$1q.typeOf.object("options.times",e.times),o$1q.typeOf.func("options.requestImageFunction",e.requestImageFunction),o$1q.typeOf.func("options.reloadFunction",e.reloadFunction),this._tileCache={},this._tilesRequestedForInterval=[];var t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}function _$K(e,t,i){return e+"-"+t+"-"+i}function F$S(e){var t=e.split("-");if(3===t.length)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function k$M(e){var t=e._times;if(e$2b(t)){var i=e._clock,n=i.currentTime,r=i.canAnimate&&i.shouldAnimate,o=i.multiplier;if(r||0===o){var a,s=t.indexOf(n);if(!(s<0)){var l=t.get(s);return o>0?(a=a$15.secondsDifference(l.stop,n),++s):(a=a$15.secondsDifference(l.start,n),--s),a/=o,s>=0&&a<=5?t.get(s):void 0}}}}function I$_(e,t,i){var n=e._times.indexOf(i.start),r=e._tileCache,o=r[n];e$2b(o)||(o=r[n]={});var a=t.key;if(e$2b(o[a]))return!0;var s=F$S(a),l=new r$1b({throttle:!0,throttleByServer:!0,type:V$15.IMAGERY,priorityFunction:t.priorityFunction}),u=e._requestImageFunction(s.x,s.y,s.level,l,i);return!!e$2b(u)&&(o[a]={promise:u,request:l},!0)}function B$M(e){var t;(o$1q.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?t=o$1l.resolve(e):t=t$11.createIfNeeded(e).fetchArrayBuffer();if(e$2b(t))return t.then((function(e){if(e$2b(e))return U$M(e)}))}function U$M(e){var t=new DataView(e),i=0,n=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT,t.getUint32(i,!0),i+=Uint32Array.BYTES_PER_ELEMENT;var r=32===n?V$10.RGBA_DXT5:V$10.RGB_DXT1,o=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var a=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT,t.getUint32(i,!0),i+=Uint32Array.BYTES_PER_ELEMENT;var s=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var l=new Uint8Array(e,i,s),u=nt$9.inflate(l).buffer;return new e$1H(r,o,a,new Uint8Array(u))}Object.defineProperties(r$T.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen}},element:{get:function(){if(!e$2b(this._element)){var e=je$d.sanitize(this._html),t=document.createElement("div");t._creditId=this._id,t.style.display="inline",t.innerHTML=e;for(var i=t.querySelectorAll("a"),n=0;n<i.length;n++)i[n].setAttribute("target","_blank");this._element=t}return this._element}}}),r$T.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e._id===t._id},r$T.prototype.equals=function(e){return r$T.equals(this,e)},r$T.getIonCredit=function(e){var t=e$2b(e.collapsible)&&!e.collapsible,i=new r$T(e.html,t);return i._isIon=-1!==i.html.indexOf("logo.png"),i},r$T.clone=function(e){if(e$2b(e))return new r$T(e.html,e.showOnScreen)},Object.defineProperties(f$P.prototype,{clock:{get:function(){return this._clock},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}}),f$P.prototype.getFromCache=function(e,t,i,n){var r,o=_$K(e,t,i),a=this._tileCache[this._currentIntervalIndex];if(e$2b(a)&&e$2b(a[o])){var s=a[o];r=s.promise.otherwise((function(e){throw n.state=s.request.state,e})),delete a[o]}return r},f$P.prototype.checkApproachingInterval=function(e,t,i,n){var r=_$K(e,t,i),o=this._tilesRequestedForInterval,a=k$M(this),s={key:r,priorityFunction:n.priorityFunction};(!e$2b(a)||!I$_(this,s,a))&&o.push(s),o.length>=512&&o.splice(0,256)},f$P.prototype._clockOnTick=function(e){var t=e.currentTime,i=this._times.indexOf(t),n=this._currentIntervalIndex;if(i!==n){var r=this._tileCache[n];for(var o in r)r.hasOwnProperty(o)&&r[o].request.cancel();return delete this._tileCache[n],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,void this._reloadFunction()}var a=k$M(this);if(e$2b(a))for(var s=this._tilesRequestedForInterval,l=!0;l&&0!==s.length;){var u=s.pop();(l=I$_(this,u,a))||s.push(u)}};var Y$D=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function v$E(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url))throw new t$16("options.url is required.");if(!e$2b(e.layer))throw new t$16("options.layer is required.");if(!e$2b(e.style))throw new t$16("options.style is required.");if(!e$2b(e.tileMatrixSetID))throw new t$16("options.tileMatrixSetID is required.");if(e$2b(e.times)&&!e$2b(e.clock))throw new t$16("options.times was specified, so options.clock is required.");this._baseUrl=e.url;var t=t$11.createIfNeeded(e.url),i=e.style,n=e.tileMatrixSetID;if(t.url.indexOf("{")>=0){var r={style:i,Style:i,TileMatrixSet:n};t.setTemplateValues(r),this._useKvp=!1}else t.setQueryParameters(Y$D),this._useKvp=!0;this._resource=t,this._layer=e.layer,this._style=i,this._tileMatrixSetID=n,this._tileMatrixLabels=e.tileMatrixLabels,this._format=u$_(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=e$2b(e.tilingScheme)?e.tilingScheme:new c$R({ellipsoid:e.ellipsoid}),this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._minimumLevel=u$_(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=u$_(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;var o=this;this._reload=void 0;var a=this._baseUrl;this.tablename=this._layer,new l$15({name:a}).then((function(e){e.checkObjectStoreExit(o.tablename)?o._indexedDBScheduler=e:e.createObjectStore(o.tablename).then((function(){o._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){o._indexedDBScheduler.clear(o.tablename)},cache:[]},e$2b(e.times)&&(this._timeDynamicImagery=new f$P({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,n,r){return x$U(o,e,t,i,n,r)},reloadFunction:function(){e$2b(o._reload)&&o._reload()}})),this._readyPromise=o$1l.resolve(!0);var s=this._tilingScheme.positionToTileXY(h$18.southwest(this._rectangle),this._minimumLevel),l=this._tilingScheme.positionToTileXY(h$18.northeast(this._rectangle),this._minimumLevel);Math.abs(l.x-s.x),Math.abs(l.y-s.y),u$_(e.limitLevelZeroTilesCount,!0),this._errorEvent=new o$1h;var u=e.credit;this._credit="string"==typeof u?new r$T(u):u,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():e$2b(this._subdomains)&&this._subdomains.length>0?this._subdomains=this._subdomains.split(""):this._subdomains=["a","b","c"],this._customRequestHeaders=e.customRequestHeaders}function x$U(e,t,i,n,r,o){var a,s=e._tileMatrixLabels,l=e$2b(s)?s[n]:n.toString(),u=e._subdomains,c=e._dimensions,h=e$2b(o)?o.data:void 0;if(e._useKvp){var d={};d.tilematrix=l,d.layer=e._layer,d.style=e._style,d.tilerow=i,d.tilecol=t,d.tilematrixset=e._tileMatrixSetID,d.format=e._format,e$2b(c)&&(d=p$19(d,c)),e$2b(h)&&(d=p$19(d,h)),a=e._resource.getDerivedResource({queryParameters:d,request:r})}else{var f={TileMatrix:l,TileRow:i.toString(),TileCol:t.toString(),s:u[(t+i+n)%u.length]};(a=e._resource.getDerivedResource({request:r})).setTemplateValues(f),e$2b(c)&&a.setTemplateValues(c),e$2b(h)&&a.setTemplateValues(h)}return e$2b(a$O.CREDENTIAL)&&(e$2b(a$O.CREDENTIAL._keymap[e._baseUrl])?a.url=a$O.addTokenWithKey(e._baseUrl,a.url):a.url=a$O.addToken(a.url)),V$G(e,a)}function A$W(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(v$E.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},format:{get:function(){return this._format}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,e$2b(this._reload)&&this._reload())}}}),v$E.prototype.getTileCredits=function(e,t,i){},v$E.prototype.requestImage=function(e,t,i,n){var r,o,a=this._timeDynamicImagery;if(e$2b(a)&&(o=a.currentInterval,r=a.getFromCache(e,t,i,n)),n.quadKey=A$W(e,t,i),!0===this._indexedDBSetting.isOpen&&!e$2b(r)&&!0===n.cacheEnable){if(e$2b(this._indexedDBScheduler)){var s=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2b(s)?s.then((function(e){return e$2b(e)?e:"cacheError"}),(function(e){return"cacheError"})):x$U(this,e,t,i,n,o)}return x$U(this,e,t,i,n,o)}return e$2b(r)||(n.cacheEnable=!1,r=x$U(this,e,t,i,n,o)),e$2b(r)&&e$2b(a)&&a.checkApproachingInterval(e,t,i,n),r},v$E.prototype.pickFeatures=function(e,t,i,n,r){};var j$P=/\.ktx$/i,F$R=/\.crn$/i,N$I=/\.dxtz$/i;function V$G(e,t){o$1q.defined("url",t);var i=t$11.createIfNeeded(t);return j$P.test(i.url)?k$V(i):F$R.test(i.url)?a$P(i):N$I.test(i.url)?(e.flipY=!0,B$M(i)):e$2b(e.tileDiscardPolicy)?i.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(e$2b(e._customRequestHeaders)&&(i.headers=p$19(i.headers,e._customRequestHeaders)),!0===e._indexedDBSetting.isOpen?i.fetchBlob():i.fetchImage({preferImageBitmap:!0,flipY:!0}))}var W$R=new i$V("indexedDBWorker"),Ee$k=-1;function h$Q(e,t){this._imageryProvider=e,t=u$_(t,{}),this.alpha=u$_(t.alpha,u$_(e.defaultAlpha,1)),this.brightness=u$_(t.brightness,u$_(e.defaultBrightness,h$Q.DEFAULT_BRIGHTNESS)),this.contrast=u$_(t.contrast,u$_(e.defaultContrast,h$Q.DEFAULT_CONTRAST)),this.hue=u$_(t.hue,u$_(e.defaultHue,h$Q.DEFAULT_HUE)),this.saturation=u$_(t.saturation,u$_(e.defaultSaturation,h$Q.DEFAULT_SATURATION)),this.gamma=u$_(t.gamma,u$_(e.defaultGamma,h$Q.DEFAULT_GAMMA)),this.transparentBackColor=u$_(t.transparentBackColor,u$_(e.defaultTransparentBackColor,h$Q.DEFAULT_TRANSPARENTBACKCOLOR)),this.transparentBackColorTolerance=u$_(t.transparentBackColorTolerance,u$_(e.defaultTransparentBackColorTolerance,h$Q.DEFAULT_TRANSPARENTBACKCOLORTOLERANCE));var i=u$_(t.splitDirection,u$_(e.defaultSplit,h$Q.DEFAULT_SPLIT)),n=u$_(t.splitDirection,u$_(e.defaultSplit,h$Q.DEFAULT_SPLIT));this.splitDirection=new o$1o(i,n),this.minificationFilter=u$_(t.minificationFilter,u$_(e.defaultMinificationFilter,h$Q.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=u$_(t.magnificationFilter,u$_(e.defaultMagnificationFilter,h$Q.DEFAULT_MAGNIFICATION_FILTER)),this.show=u$_(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=u$_(t.rectangle,h$18.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new o$S(o$V.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this._visibleViewport=4095,this.colorToAlpha=t.colorToAlpha,this._selectColor=new e$1U(0,0,1,1),this.colorToAlphaThreshold=u$_(t.colorToAlphaThreshold,h$Q.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD),this._pausing=!1,e$2b(e._indexedDBSetting)?this._indexedDBSetting=e._indexedDBSetting:this._indexedDBSetting={isOpen:!1},this._imageCanvas={},this._swipeRegion=new e$29(0,0,1,1),this._swipeEnabled=!1,this._lodOffset=0,this._detailLevelOffset=0,this._featherEdgesEnabled=!1,this._minHeight=Number.NEGATIVE_INFINITY,this._maxHeight=1/0,this._inVisibleHeightRange=1,this.enableUpsample=!0,this.enableImageryClip=!1}Object.defineProperties(h$Q.prototype,{featherEdgesEnabled:{get:function(){return this._featherEdgesEnabled},set:function(e){e$2b(e)&&"boolean"==typeof e&&(this._featherEdgesEnabled=e)}},lodOffset:{get:function(){return this._lodOffset},set:function(e){e$2b(e)&&"number"==typeof e&&(this._lodOffset=e)}},imageryProvider:{get:function(){return this._imageryProvider}},rectangle:{get:function(){return this._rectangle}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){e$2b(e)&&"boolean"==typeof e.isOpen&&(this._indexedDBSetting.isOpen=e.isOpen)}},swipeRegion:{get:function(){return new f$18(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2b(e)){if(!(e instanceof f$18))throw new t$16("swipeRegion must be a instance of BoundingRectangle.");e$29.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?o$1o.fromElements(0,0,this.splitDirection):e$29.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e)}},minHeight:{get:function(){return this._minHeight},set:function(e){this._minHeight=e}},maxHeight:{get:function(){return this._maxHeight},set:function(e){return this._maxHeight=e}}}),h$Q.DEFAULT_BRIGHTNESS=1,h$Q.DEFAULT_CONTRAST=1,h$Q.DEFAULT_HUE=0,h$Q.DEFAULT_SATURATION=1,h$Q.DEFAULT_GAMMA=1,h$Q.DEFAULT_TRANSPARENTBACKCOLOR=e$1U.BLACK,h$Q.DEFAULT_TRANSPARENTBACKCOLORTOLERANCE=0,h$Q.DEFAULT_SPLIT=Xe$b.NONE,h$Q.DEFAULT_MINIFICATION_FILTER=tt$h.LINEAR,h$Q.DEFAULT_MAGNIFICATION_FILTER=rt$i.LINEAR,h$Q.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004,h$Q.prototype.isBaseLayer=function(){return this._isBaseLayer&&!e$2b(this._imageryProvider._scales)&&!e$2b(this._imageryProvider._useKvp)},h$Q.prototype.isDestroyed=function(){return!1},h$Q.prototype.destroy=function(){return i$10(this)};var Le$o=new h$18,Ae$m=new h$18,se$t=new h$18,xe$m=new h$18;function Re$j(e,t,i){if(e$2b(e._imageryProvider._indexedDBScheduler)){var n={blob:i,key:t.quadKey,tablename:e._imageryProvider.tablename,dbname:e._imageryProvider._indexedDBScheduler.dbname};W$R.scheduleTask(n,[])}}function ye$i(e,t,i,n,r){var o=new DataView(e),a=0,s=o.getUint32(a,!0);if(t>s-1||s>256)throw new t$16("pack imagery index invalid");a+=4;var l,u,c=[];for(l=0;l<s;l++)u=o.getUint32(a,!0),c.push(u),a+=4;for(l=0;l<s;l++){if(u=c[l],l===t){if(0===u)return void(!0===i._indexedDBSetting.isOpen&&Re$j(i,n,Ee$k));if(!e$2b(r)){var h=new Uint8Array(e,a,u);return new Uint8Array(h).buffer}return et$c({uint8Array:new Uint8Array(e,a,u),format:r,flipY:!0,layer:i,imagery:n})}a+=u}}h$Q.prototype.getViewableRectangle=function(){var e=this._imageryProvider,t=this._rectangle;return e.readyPromise.then((function(){return h$18.intersection(e.rectangle,t)}))},h$Q.prototype._createTileImagerySkeletons=function(e,t,i){var n=e.data;if(e$2b(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||e$2b(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;var r=this._imageryProvider;if(e$2b(i)||(i=n.imagery.length),!r.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),n.imagery.splice(i,0,this._skeletonPlaceholder),!0;var o=r.tilingScheme.projection instanceof t$O&&e.rectangle.north<t$O.MaximumLatitude&&e.rectangle.south>-t$O.MaximumLatitude,a=h$18.intersection(r.rectangle,this._rectangle,Le$o),s=h$18.intersection(e.rectangle,a,Ae$m);if(!e$2b(s)){if(!this.isBaseLayer())return!1;var l=a,u=e.rectangle;s=Ae$m,u.south>=l.north?s.north=s.south=l.north:u.north<=l.south?s.north=s.south=l.south:(s.south=Math.max(u.south,l.south),s.north=Math.min(u.north,l.north)),u.west>=l.east?s.west=s.east=l.east:u.east<=l.west?s.west=s.east=l.west:(s.west=Math.max(u.west,l.west),s.east=Math.min(u.east,l.east))}var c=0;s.south>0?c=s.south:s.north<0&&(c=s.north);var h=nt$7(this,1*t.getLevelMaximumGeometricError(e.level),c,e$2b(this._imageryProvider.resolution)?this._imageryProvider.resolution:1);h=Math.max(0,h);var d=r.maximumLevel;if(h>d&&(h=d),e$2b(r.minimumLevel)&&!(r instanceof I$10)){var f=r.minimumLevel;h<f&&(h=f)}var p=r.tilingScheme,_=p.positionToTileXY(h$18.northwest(s),h),m=p.positionToTileXY(h$18.southeast(s),h),g=e.rectangle.width/512,x=e.rectangle.height/512,v=p.tileXYToRectangle(_.x,_.y,h);Math.abs(v.south-e.rectangle.north)<x&&_.y<m.y&&++_.y,Math.abs(v.east-e.rectangle.west)<g&&_.x<m.x&&++_.x;var y=p.tileXYToRectangle(m.x,m.y,h);Math.abs(y.north-e.rectangle.south)<x&&m.y>_.y&&--m.y,Math.abs(y.west-e.rectangle.east)<g&&m.x>_.x&&--m.x,v.east<r.rectangle.west&&++_.x,v.south>r.rectangle.north&&++_.y,y.west>r.rectangle.east&&--m.x,y.north<r.rectangle.south&&--m.y;var $,b=h$18.clone(e.rectangle,xe$m),T=p.tileXYToRectangle(_.x,_.y,h),C=h$18.intersection(T,a,se$t);o?(p.rectangleToNativeRectangle(b,b),p.rectangleToNativeRectangle(T,T),p.rectangleToNativeRectangle(C,C),p.rectangleToNativeRectangle(a,a),$=p.tileXYToNativeRectangle.bind(p),g=b.width/512,x=b.height/512):$=p.tileXYToRectangle.bind(p);var S,w,E=0,P=1;!this.isBaseLayer()&&Math.abs(C.west-b.west)>=g&&(E=Math.min(1,(C.west-b.west)/b.width)),!this.isBaseLayer()&&Math.abs(C.north-b.north)>=x&&(P=Math.max(0,(C.north-b.south)/b.height));for(var A=P,L=u$_(this._imageryProvider.flipY,!1),M=_.x;M<=m.x;M++)if(S=E,T=$(M,_.y,h),e$2b(C=h$18.simpleIntersection(T,a,se$t))){E=Math.min(1,(C.east-b.west)/b.width),M===m.x&&(this.isBaseLayer()||Math.abs(C.east-b.east)<g)&&(E=1),P=A;for(var R=_.y;R<=m.y;R++)if(w=P,T=$(M,R,h),e$2b(C=h$18.simpleIntersection(T,a,se$t))){P=Math.max(0,(C.south-b.south)/b.height),R===m.y&&(this.isBaseLayer()||Math.abs(C.south-b.south)<x)&&(P=0);var I=new e$29(S,P,E,w),O=this.getImageryFromCache(M,R,h);if(n.imagery.splice(i,0,new o$S(O,I,o,L)),++i,this._imageryProvider.enableMorphing&&e$2b(O.mvtProvider)&&e$2b(O.parent)){var D=new o$S(this.getImageryFromCache(O.parent.x,O.parent.y,O.parent.level),I,o,L);D.morphingAlpha=.9,n.imagery.splice(i,0,D),++i}}}return!0},h$Q.prototype._calculateTextureTranslationAndScale=function(e,t){var i=t.readyImagery.rectangle,n=e.rectangle;if(t.useWebMercatorT){var r=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;i=r.rectangleToNativeRectangle(i,Le$o),n=r.rectangleToNativeRectangle(n,xe$m)}var o=n.width,a=n.height,s=o/i.width,l=a/i.height;return new e$29(s*(n.west-i.west)/o,l*(n.south-i.south)/a,s,l)};var Je$7=/\.dxtz/i;function be$o(e,t,i){var n=new DataView(e),r=0;n.getUint32(r,!0),r+=4;var o=n.getUint32(r,!0);r+=4;for(var a=t.col,s=t.row*t.blockSize+a,l=0,u=0,c=0;c<o;c++){if(c<s)l+=n.getUint32(r,!0);else if(c===s){u=n.getUint32(r,!0),r+=4;break}r+=4}if(r=8+4*o,0!==u){r+=l;var h=o$1l.defer(),d=t.url;return Je$7.test(d)?h.resolve($e$8(e,r,u)):w$Q({uint8Array:new Uint8Array(e,r,u),format:i,flipY:!0})}}function $e$8(e,t,i){var n=new DataView(e,t,i),r=0,o=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var a=32===o?V$10.RGBA_DXT5:V$10.RGB_DXT1,s=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var l=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var u=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var c=new Uint8Array(e,r+t,u),h=nt$9.inflate(c).buffer;return new e$1H(a,s,l,new Uint8Array(h))}function et$c(e){var t=e.uint8Array,i=e.format,n=e.request,r=u$_(e.flipY,!1),o=e.layer,a=e.imagery;o$1q.typeOf.object("uint8Array",t),o$1q.typeOf.string("format",i);var s,l=new Blob([t],{type:i});return!0===o._indexedDBSetting.isOpen&&Re$j(o,a,l),t$11.supportsImageBitmapOptions().then((function(e){return e?o$1l(t$11.createImageBitmapFromBlob(l,{flipY:r,premultiplyAlpha:!1})):new t$11({url:s=window.URL.createObjectURL(l),request:n}).fetchImage({flipY:r})})).then((function(e){return e$2b(s)&&window.URL.revokeObjectURL(s),e})).otherwise((function(e){return e$2b(s)&&window.URL.revokeObjectURL(s),o$1l.reject(e)}))}function tt$d(e,t){var i=document.createElement("canvas");i.getContext("bitmaprenderer").transferFromImageBitmap(e),i.toBlob(t)}function De$m(e,t){var i=e.slice(0),n=new Int8Array(i);for(var r=t.split("").map((function(e){return e.charCodeAt(0)})),o=0;o<r.length;o++)n[o]=n[o]^r[o];return n.buffer}var rt$d={webp:"image/webp",png:"image/png"};function Ie$i(e,t,i){return e+":"+t+":"+i}function ue$v(e,t,i){return JSON.stringify([e,t,i])}h$Q.prototype._requestImagery=function(e){var t=this._imageryProvider,i=this;function n(n){if(!e.isDestroyed()){if(!e$2b(n))return r();if(n===Ee$k)return void(e.state=wt$6.FAILED);if("cacheError"===n)return void o(!1);if(n instanceof ArrayBuffer&&e$2b(t._cacheKey)&&t._cacheKey.length>0&&e.request.type!==V$15.BLOCK){var a=De$m(n,t._cacheKey);n=e.request.type===V$15.PACK?a:new Blob([new Uint8Array(a,0,a.byteLength)],{type:t._fileExtension||"image/png"})}if(e.request.type!==V$15.PACK&&!n.mvt&&e.request.type!==V$15.BLOCK&&e.request.type!==V$15.BLOCKPACK){if(n instanceof Blob){if(!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2b(i._imageryProvider._indexedDBScheduler)){e.quadKey=e.request.quadKey;var s={blob:n,key:e.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};W$R.scheduleTask(s,[])}return void t$11.supportsImageBitmapOptions().then((function(t){if(t)t$11.createImageBitmapFromBlob(n,{flipY:!0,premultiplyAlpha:!1}).then((function(t){e.image=t,e.state=wt$6.RECEIVED,e.request=void 0,l$W.handleSuccess(i._requestImageError)}));else{var r=window.URL.createObjectURL(n);t$T(r,!1).then((function(e){return window.URL.revokeObjectURL(r),e}),(function(e){return window.URL.revokeObjectURL(r),o$1l.reject(e)})).then((function(t){e.image=t,e.state=wt$6.RECEIVED,e.request=void 0,l$W.handleSuccess(i._requestImageError)}))}}))}!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2b(i._imageryProvider._indexedDBScheduler)&&(e.quadKey=e.request.quadKey,createImageBitmap(n,{imageOrientation:"flipY",premultiplyAlpha:"none"}).then((function(t){tt$d(t,(function(t){var n={blob:t,key:e.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};W$R.scheduleTask(n,[])}))})))}var l=rt$d[t._fileExtension];if(e.request.type!==V$15.BLOCKPACK||n.mvt)if(e.request.type!==V$15.PACK||n.mvt)if(e.request.type===V$15.BLOCK){if(!e$2b((c=t.blockCache[e.request.quadKey]).data)&&(c.data=n,!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2b(i._imageryProvider._indexedDBScheduler))){s={blob:n.slice(0),key:e.request.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};W$R.scheduleTask(s,[])}t.blockCacheQueue.touch(c),t.blockCacheQueue.trim(t.blockCacheSize),e$2b(t._cacheKey)&&t._cacheKey.length>0&&(n=De$m(n,t._cacheKey)),e$2b(h=be$o(n,e.request.blockInfo,l))||(e.state=wt$6.FAILED),h.then((function(t){e.image=t,e.state=wt$6.RECEIVED})).otherwise((function(t){e.state=wt$6.FAILED}))}else e.image=n,e.state=wt$6.RECEIVED;else{if(n instanceof Blob&&e.request.cacheEnable&&!0===i._indexedDBSetting.isOpen)return void t$11.supportsImageBitmapOptions().then((function(t){if(t)t$11.createImageBitmapFromBlob(n,{flipY:!0,premultiplyAlpha:!1}).then((function(t){e.image=t,e.state=wt$6.RECEIVED,e.request=void 0,l$W.handleSuccess(i._requestImageError)}));else{var r=window.URL.createObjectURL(n);t$T(r,!1).then((function(e){return window.URL.revokeObjectURL(r),e}),(function(e){return window.URL.revokeObjectURL(r),o$1l.reject(e)})).then((function(t){e.image=t,e.state=wt$6.RECEIVED,e.request=void 0,l$W.handleSuccess(i._requestImageError)}))}}));e.quadKey=e.request.quadKey,l=u$_(l,"image/png");var u=ye$i(n,e.request.quadKeyIndex,i,e,l);if(!e$2b(u))return void(e.state=wt$6.FAILED);u.then((function(t){e.image=t,e.state=wt$6.RECEIVED})).otherwise((function(t){e.state=wt$6.FAILED}))}else if(!e$2b(e.request.quadKeyIndex)&&e$2b(e.request.blockRequest)&&(e.request.quadKeyIndex=e.request.blockRequest.quadKeyIndex),e$2b(e.request.quadKeyIndex)&&(n=ye$i(n,e.request.quadKeyIndex,i,e)),e$2b(n)){var c,h;if(!e$2b(c=t.blockCache[e.request.quadKey])&&(c=new e$1b(t,e.request.quadKey,n),t.blockCache[e.request.quadKey]=c,!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2b(i._imageryProvider._indexedDBScheduler))){var s={blob:n.slice(0),key:e.request.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:5};W$R.scheduleTask(s,[])}t.blockCacheQueue.touch(c),t.blockCacheQueue.trim(t.blockCacheSize),e$2b(h=be$o(n,e.request.blockInfo,l))||(e.state=wt$6.FAILED),h.then((function(t){e.image=t,e.state=wt$6.RECEIVED})).otherwise((function(t){e.state=wt$6.FAILED}))}else e.state=wt$6.FAILED;e.request=void 0,l$W.handleSuccess(i._requestImageError)}}function r(n){if(!e.isDestroyed()){if(e.request.state===W$1c.CANCELLED)return e.state=wt$6.UNLOADED,void(e.request=void 0);e.state=wt$6.FAILED,e.request=void 0;var r="Failed to obtain image tile X: "+e.x+" Y: "+e.y+" Level: "+e.level+".";i._requestImageError=l$W.handleError(i._requestImageError,t,t.errorEvent,r,e.x,e.y,e.level,o,n)}}function o(i){var o=new r$1b({throttle:!1,throttleByServer:!0,type:V$15.IMAGERY});o.cacheEnable=i,e.request=o,e.state=wt$6.TRANSITIONING;var a=t.requestImage(e.x,e.y,e.level,o,e.rectangle,e);if(!e$2b(a))return e.state=wt$6.UNLOADED,void(e.request=void 0);e$2b(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),e.beginRequestTime=performance.now(),o$1l(a,n,r)}o(!0)},h$Q.prototype._createTextureWebGL=function(e,t){var i=new e$1P({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),n=t.image;return e$2b(n.internalFormat)?new t$V({context:e,pixelFormat:n.internalFormat,width:n.width,height:n.height,source:{arrayBufferView:n.bufferView},sampler:i}):e$2b(n.mvt)?n.colorTexture:new t$V({context:e,source:n,pixelFormat:this._imageryProvider.hasAlphaChannel?V$10.RGBA:V$10.RGB,sampler:i})},h$Q.prototype._createTexture=function(e,t,i){var n=this._imageryProvider,r=t.image;if(e$2b(n.tileDiscardPolicy)){var o=n.tileDiscardPolicy;if(e$2b(o)){if(!o.isReady())return void(t.state=wt$6.RECEIVED);if(o.shouldDiscardImage(r))return void(t.state=wt$6.INVALID)}}if(this.minificationFilter!==tt$h.NEAREST&&this.minificationFilter!==tt$h.LINEAR)throw new t$16("ImageryLayer minification filter must be NEAREST or LINEAR");var a=this._createTextureWebGL(e,t);e$2b(r.mvt)&&(t.isMvtTexture=!0,t.iconImageObjects=r.iconImageObjects,t.textObjects=r.textObjects,t.tile=r.tile,t.transform=r.transform,t.isRendered=!1),n.tilingScheme.projection instanceof t$O?t.textureWebMercator=a:t.texture=a,t.image=void 0,t.state=wt$6.TEXTURE_LOADED},h$Q.prototype._finalizeReprojectTexture=function(e,t){var i=this.minificationFilter,n=this.magnificationFilter;if(i===tt$h.LINEAR&&n===rt$i.LINEAR&&!V$10.isCompressedFormat(t.pixelFormat)&&e$2a.isPowerOfTwo(t.width)&&e$2a.isPowerOfTwo(t.height)){i=tt$h.LINEAR_MIPMAP_LINEAR;var r=e$1T.maximumTextureFilterAnisotropy,o=Math.min(r,u$_(this._maximumAnisotropy,r)),a=Ie$i(i,n,o),s=e.cache.imageryLayerMipmapSamplers;e$2b(s)||(s={},e.cache.imageryLayerMipmapSamplers=s);var l=s[a];e$2b(l)||(l=s[a]=new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n,maximumAnisotropy:o})),t.generateMipmap(I$1e.NICEST),t.sampler=l,t.samplerKey=a}else{var u=Ie$i(i,n,0),c=e.cache.imageryLayerNonMipmapSamplers;e$2b(c)||(c={},e.cache.imageryLayerNonMipmapSamplers=c);var h=c[u];e$2b(h)||(h=c[u]=new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n})),t.sampler=h,t.samplerKey=u}},h$Q.prototype._reprojectTexture=function(e,t,i){var n=t.textureWebMercator||t.texture,r=t.rectangle,o=e.context;if((i=u$_(i,!0))&&!(this._imageryProvider.tilingScheme.projection instanceof n$1b)&&r.width/n.width>1e-5){var a=this;t.addReference();var s=new t$I({name:"imageReprojectTexture",persists:!0,owner:this,preExecute:function(e){at$a(e,o,n,t.rectangle)},postExecute:function(e){o.webgpu&&o.engine.flushFramebuffer(),t.texture=e,a._finalizeReprojectTexture(o,e),t.state=wt$6.READY,t.releaseReference()}});this._reprojectComputeCommands.push(s)}else i&&(t.texture=n),this._finalizeReprojectTexture(o,n),t.state=wt$6.READY},h$Q.prototype.queueReprojectionCommands=function(e){for(var t=this._reprojectComputeCommands,i=t.length,n=0;n<i;++n)e.commandList.push(t[n]);t.length=0},h$Q.prototype.cancelReprojections=function(){this._reprojectComputeCommands.length=0},h$Q.prototype.getImageryFromCache=function(e,t,i,n){var r=ue$v(e,t,i),o=this._imageryCache[r];return e$2b(o)||(o=this._imageryProvider instanceof I$10?new _0x4276c1(this,e,t,i,n):new o$V(this,e,t,i,n),this._imageryCache[r]=o),o.addReference(),o},h$Q.prototype.getReadyImageryFromCache=function(e,t,i){for(var n=void 0,r=i;r>0&&!e$2b(n);){r--;var o=ue$v(e,t,i);e$2b(n=this._imageryCache[o])&&n.state!=wt$6.READY&&(n=void 0)}return n},h$Q.prototype.removeImageryFromCache=function(e){var t=ue$v(e.x,e.y,e.level);delete this._imageryCache[t]};var te$w={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new o$1o,texture:void 0},it$7=s$Y.supportsTypedArrays()?new Float32Array(128):void 0;function at$a(e,t,i,n){var r=t.cache.imageryLayer_reproject;if(!e$2b(r)){r=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){e$2b(this.framebuffer)&&this.framebuffer.destroy(),e$2b(this.vertexArray)&&this.vertexArray.destroy(),e$2b(this.shaderProgram)&&this.shaderProgram.destroy()}};for(var o=new Float32Array(256),a=0,s=0;s<64;++s){var l=s/63;o[a++]=0,o[a++]=l,o[a++]=1,o[a++]=l}var u={position:0,webMercatorT:1},c=I$12.getRegularGridIndicesForReproject(2,64),h=t$Y.createIndexBuffer({context:t,typedArray:c,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});r.vertexArray=new c$12({context:t,attributes:[{name:"position",index:u.position,vertexBuffer:t$Y.createVertexBuffer({context:t,typedArray:o,usage:A$19.STATIC_DRAW}),componentsPerAttribute:2},{name:"webMercatorT",index:u.webMercatorT,vertexBuffer:t$Y.createVertexBuffer({context:t,sizeInBytes:512,usage:A$19.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:h});var d=new s$U({sources:[je$f]});r.shaderProgram=r$13.fromCache({name:"ReprojectWebMercator",context:t,vertexShaderSource:d,fragmentShaderSource:Ve$i,attributeLocations:u}),r.sampler=new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}i.sampler=r.sampler;var f=i.width,p=i.height;te$w.textureDimensions.x=f,te$w.textureDimensions.y=p,te$w.texture=i;var _=Math.sin(n.south),m=.5*Math.log((1+_)/(1-_));_=Math.sin(n.north);var g=1/(.5*Math.log((1+_)/(1-_))-m),x=new t$V({context:t,width:f,height:p,pixelFormat:t.webgpu&&i.pixelFormat===V$10.RGB?V$10.RGBA:i.pixelFormat,pixelDatatype:i.pixelDatatype,preMultiplyAlpha:i.preMultiplyAlpha,generateMipmap:e$2a.isPowerOfTwo(f)&&e$2a.isPowerOfTwo(p)});e$2a.isPowerOfTwo(f)&&e$2a.isPowerOfTwo(p)&&x.generateMipmap(I$1e.NICEST);for(var v=n.south,y=n.north,$=it$7,b=0,T=0;T<64;++T){var C=T/63,S=e$2a.lerp(v,y,C);_=Math.sin(S);var w=(.5*Math.log((1+_)/(1-_))-m)*g;$[b++]=w,$[b++]=w}r.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView($),e.shaderProgram=r.shaderProgram,e.outputTexture=x,e.uniformMap=te$w,e.vertexArray=r.vertexArray}function nt$7(e,t,i,n){var r=e._imageryProvider,o=r.tilingScheme,a=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof n$1b?1:Math.cos(i),l=o.rectangle,u=o.getNumberOfXTilesAtLevel(0);e$2b(o._suggest)&&o._suggest?u=o._numberOfLevelZeroTilesX:0!==e._lodOffset&&(e._lodOffset>0?u/=1<<Math.floor(e._lodOffset):u*=1<<Math.floor(-e._lodOffset));var c=l.width,h=a.maximumRadius*c*s/(r.tileWidth*u/n);if(e$2b(o._scaleDenominators)&&o._scaleDenominators.length>0){var d;d=o.tileXYToRectangle(0,0,0,d);var f=o.getNumberOfXTilesAtLevel(0)*d.width;h=a.maximumRadius*c*s/(c/f*r.tileWidth*u/n)}var p=h/t,_=Math.log(p)/Math.log(2);return 0|Math.round(_)}h$Q.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},h$Q.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},h$Q.prototype.saveLocalCache=function(){if(!0===this._indexedDBSetting.isOpen&&e$2b(this._imageryProvider._indexedDBScheduler)){var e={tablename:this._imageryProvider.tablename,dbname:this._imageryProvider._indexedDBScheduler.dbname};W$R.scheduleTask(e,[])}};var A$V=void 0,b$$=void 0;h$Q.prototype.getImagery=function(e,t){var i=1;e$2b(t)&&(i<<=t);var n=[],r=this._imageryProvider;if(e$2b(b$$)||(b$$=new h$18),!e$2b(e)||(b$$.west=e.min.longitude,b$$.south=e.min.latitude,b$$.east=e.max.longitude,b$$.north=e.max.latitude,!e$2b(h$18.intersection(r.rectangle,b$$))))return n;var o,a,s=0,l=23;for(e$2b(r._maximumLevel)&&(l=r._maximumLevel);s<=l&&(o=r._tilingScheme.positionToTileXY(e.max,s),a=r._tilingScheme.positionToTileXY(e.min,s),e$2b(o)||(o=new o$1o(r._tilingScheme.getNumberOfXTilesAtLevel(s),0)),e$2b(a)||(a=new o$1o(0,r._tilingScheme.getNumberOfYTilesAtLevel(s))),s!==l&&(e$2b(A$V)||(A$V=new h$18),r._tilingScheme.tileXYToRectangle(a.x,a.y,s,A$V),!e$2b(A$V)||!(A$V.width*i<2*(e.max.longitude-e.min.longitude)||A$V.height*i<2*(e.max.latitude-e.min.latitude))));s++);for(var u=a.x;u<=o.x;u++)for(var c=a.y;c>=o.y;c--)e$2b(A$V)||(A$V=new h$18),r._tilingScheme.tileXYToRectangle(u,c,s,A$V),e$2b(h$18.intersection(A$V,r.rectangle))&&e$2b(h$18.intersection(A$V,b$$))&&n.push(this.getImageryFromCache(u,c,s));return n},h$Q.prototype.getMaxScaleLevel=function(e){var t=1,i=0,n=this._imageryProvider;if(e$2b(b$$)||(b$$=new h$18),b$$.west=e.min.longitude,b$$.south=e.min.latitude,b$$.east=e.max.longitude,b$$.north=e.max.latitude,!e$2b(h$18.intersection(n.rectangle,b$$)))return[];var r,o,a=0,s=23;for(e$2b(n._maximumLevel)&&(s=n._maximumLevel);a<=s&&(r=n._tilingScheme.positionToTileXY(e.max,a),o=n._tilingScheme.positionToTileXY(e.min,a),e$2b(r)||(r=new o$1o(n._tilingScheme.getNumberOfXTilesAtLevel(a),0)),e$2b(o)||(o=new o$1o(0,n._tilingScheme.getNumberOfYTilesAtLevel(a))),a!==s);a++)e$2b(A$V)||(A$V=new h$18),n._tilingScheme.tileXYToRectangle(o.x,o.y,a,A$V),e$2b(A$V)&&(A$V.width*t<2*(e.max.longitude-e.min.longitude)||A$V.height*t<2*(e.max.latitude-e.min.latitude))&&(i+=1,t*=2);return i},h$Q.prototype.refresh=function(){var e=this._imageryLayers;if(e$2b(e)){for(var t in this._imageryCache){var i=this._imageryCache[t];this.removeImageryFromCache(i)}var n=e.indexOf(this);e.remove(this,!1,!0),e.add(this,n)}},h$Q.prototype.setLayerStatusParameters=function(e){var t=o$1l.defer();return this._imageryProvider.setLayerStatusParameters(e).then((e=>{this.refresh(),t.resolve(e)})).otherwise((e=>{t.reject(e)})),t.promise};var _0x1c15fe=(_0x413897=!0,function(e,t){var i=_0x413897?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x413897=!1,i}),_0x589240=_0x1c15fe(void 0,(function(){return _0x589240.toString().search("(((.+)+)+)+$").toString().constructor(_0x589240).search("(((.+)+)+)+$")})),_0x413897;_0x589240();var _0x43f264=null,_0xb4f2cc=null;function _0x215208(){}null!==_0x1c5342&&(_0x43f264=_0x1c5342.cwrap("floatToTextureColor","number",["number","number","number","number","number","number","number"]),_0xb4f2cc=_0x1c5342.cwrap("free_result",null,["number"]));var _0x4974f4=new s$S;function _0x503312(e,t){for(var i=new Uint8Array(4*e.length),n=t._ceiling-t._floor,r=0,o=e.length;r<o;r++){var a=e[r],s=4*r;if(a<0||a>1)i[s+0]=255,i[s+1]=255,i[s+2]=255,i[s+3]=255;else{a=a*n+t._floor;var l=t._dictColorTable.getColor(a);i[s+0]=255*l.red,i[s+1]=255*l.green,i[s+2]=255*l.blue,i[s+3]=255*l.alpha}}return i}function _0x2e9bb5(e,t){var i=e,n=i.length,r=_0x1c5342._malloc(Float32Array.BYTES_PER_ELEMENT*n);_0x1c5342.HEAPF32.set(i,r/Float32Array.BYTES_PER_ELEMENT);var o=t._ceiling,a=t._floor,s=t._dictColorTable._dictTable._hash,l=[],u=[];for(var c in s)l.push(parseFloat(c));l.sort((function(e,t){return e-t}));for(var h=0,d=l.length;h<d;h++)u.push(s[l[h]]);var f=new ArrayBuffer(4*l.length),p=new Uint8Array(f),_=0;for(d=l.length;_<d;_++){var m=u[_];p[4*_]=255*m.red,p[4*_+1]=255*m.green,p[4*_+2]=255*m.blue,p[4*_+3]=255*m.alpha}var g=new Float32Array(f),x=(c=new Float32Array(l)).length,v=_0x1c5342._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x1c5342.HEAPF32.set(c,v/Float32Array.BYTES_PER_ELEMENT);var y=_0x1c5342._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x1c5342.HEAPF32.set(g,y/Float32Array.BYTES_PER_ELEMENT);var $=_0x43f264(r,n,o,a,v,y,x),b=new Uint8Array(_0x1c5342.HEAPU8.buffer,$,4*n);return _0xb4f2cc($),_0x1c5342._free(r),_0x1c5342._free(v),_0x1c5342._free(y),b}function _0x10a17c(e,t){var i=e.length/4;return _0x2e9bb5(new Float32Array(e.buffer,e.byteOffset,i),t)}function _0xd080bd(e,t){for(var i=e.length/4,n=new Float32Array(e.buffer,e.byteOffset,i),r=0;r<n.length;r++){var o=n[r],a=4*r;if(o<0||o>1)e[a+0]=255,e[a+1]=255,e[a+2]=255,e[a+3]=255;else{o=o*(t._ceiling-t._floor)+t._floor;var s=t._dictColorTable.getColor(o);e[a+0]=255*s.red,e[a+1]=255*s.green,e[a+2]=255*s.blue,e[a+3]=255*s.alpha}}return new Uint8Array(e.buffer,0,e.length)}function _0x2213ff(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function _0x2b64db(e,t,i){for(var n=new Uint8Array(4*e.length),r=0;r<e.length;r++){var o,a,s,l,u=e[r],c=4*r,h=new e$29(0,0,0,0);if(u>=0&&u<=1){var d=_0x2213ff(u);h.x=d.x,h.y=d.y,h.z=d.z,h.w=1}o=255*h.x,a=255*h.y,s=255*h.z,l=255*h.w,e$2b(i)&&!0===i?(n[c+0]=parseInt(s),n[c+1]=parseInt(a),n[c+2]=parseInt(o),n[c+3]=parseInt(l)):(n[c+0]=parseInt(o),n[c+1]=parseInt(a),n[c+2]=parseInt(s),n[c+3]=parseInt(l))}return n}function _0x4f368d(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a,s,l,u,c=r[o],h=4*o,d=new e$29(0,0,0,0);if(c>=0&&c<=1){c<e$2a.EPSILON9?c=e$2a.EPSILON9:1-c<e$2a.EPSILON9&&(c=1-e$2a.EPSILON9);var f=_0x2213ff(c);d.x=f.x,d.y=f.y,d.z=f.z,d.w=1}a=255*d.x,s=255*d.y,l=255*d.z,u=255*d.w,e$2b(i)&&!0===i?(e[h+0]=l,e[h+1]=s,e[h+2]=a,e[h+3]=u):(e[h+0]=a,e[h+1]=s,e[h+2]=l,e[h+3]=u)}return new Uint8Array(e.buffer,0,e.length)}function _0x73ec9a(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(e$2b(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function _0x444666(e,t,i){if(!e$2b(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];e$2b(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function _0x1af293(e,t,i){var n=_0x73ec9a(e,t,i);if(e$2b(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function _0x4956cc(e,t,i){var n=_0x73ec9a(e,t,i);if(e$2b(n))return n.textContent.trim()}function _0x134561(e,t,i){var n=_0x73ec9a(e,t,i);if(e$2b(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function _0x4a7e5e(e,t,i,n){var r=p$1d.multiply(t,i,new p$1d),o=e.vertexAttributes[0],a=o.typedArray,s=new Float32Array(a.buffer,a.byteOffset,a.byteLength/4),l=o.componentsPerAttribute,u=e.verticesCount,c=new Float32Array(3*u),h=e.attrLocation;h.aRatio=Object.keys(h).length;for(var d=0;d<u;d++){var f=new o$1p(s[d*l],s[d*l+1],s[d*l+2]),p=new o$1p;p$1d.multiplyByPoint(r,f,p);var _=a$18.fromCartesian(p),m=e$2a.toDegrees(_.longitude),g=e$2a.toDegrees(_.latitude),x=_.height,v=(m-n.left)/n.width,y=(g-n.bottom)/n.length,$=(x-n.minHeight)/n.height;c[3*d]=v,c[3*d+1]=y,c[3*d+2]=$}e.vertexAttributes.push({index:h.aRatio,typedArray:c,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0x48a6ae(e,t){for(var i=[],n=Math.max(t.max.longitude-t.min.longitude,t.max.latitude-t.min.latitude),r=0,o=Math.PI;r<23&&!(n>o);)o*=.5,r++;r--;var a=e,s=a._imageryProvider;e instanceof i$O&&(s=a._provider,a=a._inner);var l=new g$13,u=l.positionToTileXY(t.max,r),c=l.positionToTileXY(t.min,r);if(!e$2b(s._minimumLevel)||r>s._minimumLevel){var h=s._maximumLevel;if(e instanceof i$O&&h--,e$2b(h)){var d=r-h;d>0&&(c.x=Math.floor(c.x/Math.pow(2,d)),c.y=Math.floor(c.y/Math.pow(2,d)),u.x=Math.floor(u.x/Math.pow(2,d)),u.y=Math.floor(u.y/Math.pow(2,d)),r=h)}for(var f=c.x;f<=u.x;f++)for(var p=c.y;p>=u.y;p--)i.push(a.getImageryFromCache(f,p,r))}return i}_0x215208.convertFloat=function(e,t,i){i===k$Q.FilterMode.NEAREST?null===_0x43f264?_0xd080bd(e.imageArray,t):e.imageArray=_0x10a17c(e.imageArray,t):_0x4f368d(e.imageArray)},_0x215208.convertFloatTexture=function(e,t,i){return i===k$Q.FilterMode.LINEAR?_0x2b64db(e.imageArray,t,!0):null===_0x43f264?_0x503312(e.imageArray,t):_0x2e9bb5(e.imageArray,t)},_0x215208.parseResult=function(e,t,i,n){if(i.isDestroyed())return i.s3mBuffer=null,i.volBuffer=null,void(i.task=void 0);var r=i._fileName.split("_"),o=parseInt(r[1]),a=parseInt(r[2]);o=Math.pow(2,t._level)-o-1,t._version=e.version;for(var s=t._gl,l=_0x4974f4.read(e.xmlDoc).firstChild,u=l.namespaceURI,c=_0x444666(_0x73ec9a(l,"Material3Ds",u),"material",u),h={},d=[],f=t._context,p=0,_=c.length;p<_;p++){var m=c[p],g=_0x4956cc(m,"name",u),x=new _0x21d1b1({});h[g]=x;var v=_0x73ec9a(m,"Ambient",u),y=u$_(_0x1af293(v,"AmbientR",u),_0x1af293(v,"R",u)),$=u$_(_0x1af293(v,"AmbientG",u),_0x1af293(v,"G",u)),b=u$_(_0x1af293(v,"AmbientB",u),_0x1af293(v,"B",u)),T=u$_(_0x1af293(v,"AmbientA",u),_0x1af293(v,"A",u));x._ambientColor=new e$1U(y,$,b,T);var C=_0x73ec9a(m,"Diffuse",u);y=u$_(_0x1af293(C,"DiffuseR",u),_0x1af293(C,"R",u)),$=u$_(_0x1af293(C,"DiffuseG",u),_0x1af293(C,"G",u)),b=u$_(_0x1af293(C,"DiffuseB",u),_0x1af293(C,"B",u)),T=u$_(_0x1af293(C,"DiffuseA",u),_0x1af293(C,"A",u)),x._diffuseColor=new e$1U(y,$,b,T);var S=_0x73ec9a(m,"Specular",u);y=u$_(_0x1af293(S,"SpecularR",u),_0x1af293(S,"R",u)),$=u$_(_0x1af293(S,"SpecularG",u),_0x1af293(S,"G",u)),b=u$_(_0x1af293(S,"SpecularB",u),_0x1af293(S,"B",u)),T=u$_(_0x1af293(S,"SpecularA",u),_0x1af293(S,"A",u)),x._specularColor=new e$1U(y,$,b,T);var w=_0x1af293(m,"Shininess",u);x._shininess=w,x._bTransparentSorting=_0x134561(m,"TransparentSorting",u);var E=_0x444666(m,"texture",u);0===E.length&&t._fileType===d$15.OSGBFile&&(x._isInvalidOblique=!0);for(var P=0;P<E.length;P++){var A=E[P],L=_0x4956cc(A,"name",u),M=_0x4956cc(A,"TextureName",u),R=_0x73ec9a(A,"AddressMode",u),I=_0x4956cc(R,"u",u),O=_0x4956cc(R,"v",u);I="TAM_WRAP"===I?q$19.REPEAT:q$19.CLAMP_TO_EDGE,O="TAM_WRAP"===O?q$19.REPEAT:q$19.CLAMP_TO_EDGE;for(var D=_0x4956cc(A,"TexModMatrix",u).split(","),B=16;B--;)D[B]=parseFloat(D[B]);x._texMatrix=p$1d.unpack(D);var N=e.texturePackage[L],F=L+t._id+f._id+i._relativePath.path;if(e$2b(N)&&(F+=N.imageBuffer.length),e$2b(N)&&N.width>0&&N.height>0&&e$2b(N.imageBuffer)&&N.imageBuffer.byteLength>0)switch(0===N.compressType&&(t._supportCompressType=0),i._texturesByteLength+=N.imageBuffer.length,N.compressType){case _0x3dfacd.WEBP:var U=x.createWebp(F,M,f,P,N.imageBuffer,N.width,N.height,t.mipmapEnabled);d.push(U),x._isWEBP=!0;break;case _0x3dfacd.CRN_DXT5:var z=x.createCRN(F,M,f,P,N,I,O,t.mipmapEnabled);d.push(z);break;default:var G=Se$d.CreateTexture(F,f,N.width,N.height,N.nFormat,N.compressType,N.imageBuffer,!1,I,O,t.mipmapEnabled);x._textures.push(G)}else if(t._isTextureShare){var V=t._baseUri+"Texture/"+M;e$2b(a$O.CREDENTIAL)&&(V=a$O.addToken(V));var k=x.requestSharedTexture(V,L,M,f,P,t.customRequestHeaders,I,O);d.push(k)}if("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt){var W=L+"_"+i._fileName;W=""!==t._volName?W+"_"+t._volName:W,"vol_texture_mapping"===t._strVolumeExt?W+=".vol":W+=".png";var H=i._relativePath.resolve(t._baseUri)+W;if(0!=t.urlType){var q=t._urlArguments,j=H.indexOf("datas")+5,Y=q.layer3DName,X=H.substring(H.indexOf("/path/")+6).split("/"),K=q.scene3DName,Q=X[0],Z=X[1].substring(0,X[1].indexOf(".")),J=X[1].substring(X[1].indexOf(".")+1,X[1].length);H=H.substring(0,j)+"?layerName="+Y+"&rootTile="+Q+"&tile="+Z+"&suffix="+J+"&scene3DName="+K+"&layer3DName="+Y}var ee=void 0;"vol_texture_mapping"===t._strVolumeExt?e$2b(ee=o$10(H,void 0))&&function(e,n,r){e.then((function(e){var o;if(e$2b(e)){var a=void 0,s=new Uint8Array(e,8),l=nt$9.inflate(s).buffer;if(1===new Float64Array(l,0,1)[0]){var u=new Uint32Array(l,8,4),c=u[0],h=u[1],d=u[2];a={nFormat:c,nWidth:h,nHeight:d,nPixelSize:u[3],imageArray:new Float32Array(l,24,h*d)}}if(e$2b(a)){var f,p=tt$h.LINEAR,_=rt$i.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(p=tt$h.NEAREST,_=rt$i.NEAREST),f=t._hypsometricSetting.filterMode===k$Q.FilterMode.LINEAR?_0x2b64db(a.imageArray,t._hypsometricSetting,!0):null===_0x43f264?_0x503312(a.imageArray,t._hypsometricSetting):_0x2e9bb5(a.imageArray,t._hypsometricSetting),(o=new t$V({context:t._context,width:a.nWidth,height:a.nHeight,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({minificationFilter:p,magnificationFilter:_})})).copyFrom({width:a.nWidth,height:a.nHeight,arrayBufferView:f}),i._volTextures[n]=o,r.texID2Vol=n}e=null}}),(function(e){}))}(ee,F,x):"png"===t._strVolumeExt&&(e$2b(ee=t$T(H))&&function(e,n,r){e.then((function(e){var o;if(e$2b(e)){var a,s=tt$h.LINEAR,l=rt$i.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(s=tt$h.NEAREST,l=rt$i.NEAREST),a=t._hypsometricSetting.filterMode===k$Q.FilterMode.LINEAR?_0x4f368d(d$13(e),t._hypsometricSetting,!0):null===_0x43f264?_0xd080bd(d$13(e),t._hypsometricSetting):_0x10a17c(d$13(e),t._hypsometricSetting),(o=new t$V({context:t._context,width:e.width,height:e.height,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({minificationFilter:s,magnificationFilter:l})})).copyFrom({width:e.width,height:e.height,arrayBufferView:a}),e=null,i._volTextures[n]=o,r.texID2Vol=n}}),(function(e){}))}(ee,F,x)),d.push(ee)}}}o$1l.all(d,(function(){var n,r;if(e$2b(t._volData)){n=t._volData._volBounds;var c=t._context._id+"_"+t.id+"_layerVol",d=k$Q.FilterMode.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(d=k$Q.FilterMode.NEAREST),e$2b(t._hypsometricSetting)&&e$2b(t._volData._buffer)&&(d===k$Q.FilterMode.NEAREST?null===_0x43f264?_0xd080bd(t._volData._buffer,t._hypsometricSetting):t._volData._buffer=_0x10a17c(t._volData._buffer,t._hypsometricSetting):_0x4f368d(t._volData._buffer,t._hypsometricSetting));var f={};f.nLength=t._volData._nLength,f.imageArray=t._volData._buffer;var p=Se$d.CreateVolumeTexture(c,s,t._context,f,d);delete t._volData._buffer,t._volData._buffer=void 0,r={volTexture:p,nFormat:3201,nSideBlockCount:t._volData._nSideBlockCount,nBlockLength:t._volData._nBlockLength,nLength:t._volData._nLength,nWidth:t._volData._width,nHeight:t._volData._height,nDepth:t._volData._depth,id:c,dataFloor:t._volData._minValue,dataCeil:t._volData._maxValue,volBounds:n},i._volObj=r}else if("vol"===t._strVolumeExt)if(e.volImageBuffer){n=e.volBounds;c=t._context._id+"_"+t.id+"_"+i._relativePath.resolve(t._baseUri)+"_"+i._fileName,d=k$Q.FilterMode.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(d=k$Q.FilterMode.NEAREST),3201===e.volImageBuffer.nFormat&&e$2b(t._hypsometricSetting)&&(d===k$Q.FilterMode.NEAREST?null===_0x43f264?_0xd080bd(e.volImageBuffer.imageArray,t._hypsometricSetting):e.volImageBuffer.imageArray=_0x10a17c(e.volImageBuffer.imageArray,t._hypsometricSetting):_0x4f368d(e.volImageBuffer.imageArray,t._hypsometricSetting)),r={volTexture:p=Se$d.CreateVolumeTexture(c,s,t._context,e.volImageBuffer,d),nFormat:e.volImageBuffer.nFormat,nSideBlockCount:e.volImageBuffer.nSideBlockCount,nBlockLength:e.volImageBuffer.nBlockLength,nLength:e.volImageBuffer.nLength,nWidth:e.volImageBuffer.nWidth,nHeight:e.volImageBuffer.nHeight,nDepth:e.volImageBuffer.nDepth,id:c,dataFloor:t._fMinValue,dataCeil:t._fMaxValue,volBounds:n},delete e.volImageBuffer.imageArray,e.volImageBuffer.imageArray=null,e$2b(i._volObj)&&Se$d.DecRef(i._volObj.id),i._volObj=r}else t._bVolume&&(e$2b(r=i._volObj)&&(n=i._volObj.volBounds));var _=_0x73ec9a(l,"PageLods",u),m=_0x444666(_,"PagedLOD",u),g=t._matModel;if(m.length>0){for(var x=0;x<m.length;x++){(re=new _0x46a5cb)._fileType=t._fileType;var v=m[x],y=_0x4956cc(v,"RangeDataList",u);y?y=y.replace(/.osgb$/,"").replace(/.s3m$/,""):i._isLeafTile=!0;var $=_0x4956cc(v,"RangeMode",u),b=_0x1af293(v,"RangeList",u),T=_0x73ec9a(v,"BoundingSphere",u),C=_0x1af293(T,"x",u),S=_0x1af293(T,"y",u),w=_0x1af293(T,"z",u),E=_0x1af293(T,"radius",u),P=new o$1p(C,S,w);re._rangeMode="DISTANCE_FROM_EYE_POINT"==$?_0x2056d1.DISTANCE_FROM_EYE_POINT:_0x2056d1.PIXEL_SIZE_ON_SCREEN,re._rangeDataList=y,0===re._rangeDataList.indexOf("Root")&&(re._processFileType=1),re._rangeList=b,re._boundingSphere=new i$1c(P,E),re._originalBS=new i$1c(P,E),i$1c.transform(re._boundingSphere,t._matModel,re._boundingSphere);for(var A=_0x444666(v,"Geode",u),L=[],M=[],R=0;R<A.length;R++){for(var I=_0x4956cc(ae=A[R],"GeoDeModMatrix",u).split(","),O=0;O<16;O++)I[O]=parseFloat(I[O]);if(I=p$1d.unpack(I),1===t._heightScale)se=p$1d.multiply(g,I,new p$1d);else{var D=p$1d.multiplyByScale(I,new o$1p(1,1,t._heightScale),new p$1d);se=p$1d.multiply(g,D,new p$1d)}for(var B=_0x444666(ae,"GeoName"),N=0;N<B.length;N++){var F=B[N].textContent.trim();if(!((ue=(le=e.geoPackage[F]).vertexPackage).verticesCount<1)){var U=le.arrIndexPackage,z=le.pickInfo,G={};for(R=0;R<U.length;R++){if(e$2b(ce=U[R])){var V=ce.materialCode,k=h[V],W=new _0x21d1b1({});e$2b(k)&&k.clone(W),G[V]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&e$2b(k.texID2Vol)&&(p=i._volTextures[k.texID2Vol])}}r&&(_0x4a7e5e(ue,t._oriMatModel,I,n),Se$d.AddRef(i._fileName));var H=re._boundingSphere;if(re._boundingSphere.radius<0){H=_0x58bcd6.calcBoundingSphere(t,ue,se);var q=i$1c.transform(H,p$1d.inverse(se,new p$1d),new i$1c);i$1c.transform(q,I,q),L.push(H),M.push(q)}var j={context:t._context,vertexPackage:ue,arrIndexPackage:U,edgeGeometry:le.edgeGeometry,pickInfo:z,version:e.version,mapPass:G,layer:t,matModel:se,boundingVolume:H,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:I,level:t._level,row:o,col:a,geoName:F,entity:i};if(e$2b(t.themeStyle)&&e$2b(t.themeStyle._image)){var Y=_0x14f094.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(Y)}else{var X=new _0x30a010(j);if(t._imageryLayer instanceof Array){for(var K=[],Q=0;Q<t._imageryLayer.length;Q++){if(e$2b(he=t._imageryLayer[Q])&&(he instanceof h$Q||he instanceof i$O)){var Z=_0x48a6ae(he,le.cartographicBounds);K=K.concat(Z)}}K.length>0&&X.setImagerys(K,le.cartographicBounds)}else{if(e$2b(t._imageryLayer)&&(t._imageryLayer instanceof h$Q||t._imageryLayer instanceof i$O))(K=_0x48a6ae(t._imageryLayer,le.cartographicBounds)).length>0&&X.setImagerys(K,le.cartographicBounds)}re._renderEntityList.push(X)}}}}re._boundingSphere.radius<0&&(re._boundingSphere=i$1c.fromBoundingSpheres(L,new i$1c),re._originalBS=i$1c.fromBoundingSpheres(M,new i$1c)),e$2b(i._pagelodMap[y])?(i._pagelodMap[y]._renderEntityList=re._renderEntityList,i._pagelodMap[y]._ready=!0):(i._childrenPageLod.push(re),t.LoadingPriority===_0x10659f.UsePagedLodInfo&&(re._isLeafNode=!0))}if((A=_0x444666(_,"Geode",u)).length>0){L=[],M=[];(re=new _0x46a5cb)._fileType=t._fileType,re._isLeafNode=!0;for(R=0;R<A.length;R++){for(I=_0x4956cc(ae=A[R],"GeoDeModMatrix",u).split(","),O=0;O<16;O++)I[O]=parseFloat(I[O]);if(1===t._heightScale)se=p$1d.multiply(g,I,new p$1d);else{D=p$1d.multiplyByScale(I,new o$1p(1,1,t._heightScale),new p$1d);se=p$1d.multiply(g,D,new p$1d)}for(var J=_0x444666(ae,"GeoName",u),ee=0;ee<J.length;ee++){F=J[ee].textContent.trim();if(!((ue=(le=e.geoPackage[F]).vertexPackage).verticesCount<1)){z=le.pickInfo;var te=_0x58bcd6.calcBoundingSphere(t,ue,se);q=i$1c.transform(te,p$1d.inverse(se,new p$1d),new i$1c);i$1c.transform(q,I,q),L.push(te),M.push(q);var ie=_0x58bcd6.calcBoundingRectangle(t,ue);U=le.arrIndexPackage,G={};for(var ne in U){if(e$2b(ce=U[ne])){V=ce.materialCode,k=h[V],W=new _0x21d1b1({});e$2b(k)&&k.clone(W),G[V]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&e$2b(k.texID2Vol)&&(p=i._volTextures[k.texID2Vol])}}r&&(_0x4a7e5e(ue,t._oriMatModel,I,n),Se$d.AddRef(i._fileName));j={context:t._context,vertexPackage:ue,arrIndexPackage:U,edgeGeometry:le.edgeGeometry,pickInfo:z,version:e.version,mapPass:G,layer:t,matModel:se,boundingVolume:te,boundingRectangle:ie,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:I,level:t._level,row:o,col:a,geoName:F,entity:i};if(e$2b(t.themeStyle)){Y=_0x14f094.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(Y)}else{X=new _0x30a010(j);if(t._imageryLayer instanceof Array){for(K=[],Q=0;Q<t._imageryLayer.length;Q++){if(e$2b(he=t._imageryLayer[Q])&&(he instanceof h$Q||he instanceof i$O)){Z=_0x48a6ae(he,le.cartographicBounds);K=K.concat(Z)}}K.length>0&&X.setImagerys(K,le.cartographicBounds)}else{if(e$2b(t._imageryLayer)&&(t._imageryLayer instanceof h$Q||t._imageryLayer instanceof i$O))(K=_0x48a6ae(t._imageryLayer,le.cartographicBounds)).length>0&&X.setImagerys(K,le.cartographicBounds)}re._renderEntityList.push(X)}}}}re._boundingSphere=i$1c.fromBoundingSpheres(L,new i$1c),re._originalBS=i$1c.fromBoundingSpheres(M,new i$1c),re._ready=!0,i._childrenPageLod.push(re)}}else{var re;i._isLeafTile=!0,(re=new _0x46a5cb)._isLeafNode=!0,re._fileType=t._fileType;var oe=_0x444666(_,"Geode");for(L=[],M=[],x=0;x<oe.length;x++){var ae;for(I=_0x4956cc(ae=oe[x],"GeoDeModMatrix",u).split(","),O=0;O<16;O++)I[O]=parseFloat(I[O]);var se;if(I=p$1d.unpack(I),1===t._heightScale)se=p$1d.multiply(g,I,new p$1d);else{D=p$1d.multiplyByScale(I,new o$1p(1,1,t._heightScale),new p$1d);se=p$1d.multiply(g,D,new p$1d)}for(J=_0x444666(ae,"GeoName",u),ee=0;ee<J.length;ee++){var le,ue;F=J[ee].textContent.trim();if(!((ue=(le=e.geoPackage[F]).vertexPackage).verticesCount<1)){z=le.pickInfo,te=_0x58bcd6.calcBoundingSphere(t,ue,se),q=i$1c.transform(te,p$1d.inverse(se,new p$1d),new i$1c);i$1c.transform(q,I,q),L.push(te),M.push(te);for(ie=_0x58bcd6.calcBoundingRectangle(t,ue),U=le.arrIndexPackage,G={},R=0;R<U.length;R++){var ce;if(e$2b(ce=U[R])){V=ce.materialCode,k=h[V],W=new _0x21d1b1({});e$2b(k)&&k.clone(W),G[V]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&e$2b(k.texID2Vol)&&(p=i._volTextures[k.texID2Vol])}}r&&(_0x4a7e5e(ue,t._oriMatModel,I,n),Se$d.AddRef(i._fileName));j={context:t._context,vertexPackage:ue,arrIndexPackage:U,edgeGeometry:le.edgeGeometry,pickInfo:z,version:e.version,mapPass:G,layer:t,matModel:se,boundingVolume:te,boundingRectangle:ie,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:I,level:t._level,row:o,col:a,geoName:F,entity:i};if(e$2b(t.themeStyle)&&e$2b(t.themeStyle._image)){Y=_0x14f094.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(Y)}else{X=new _0x30a010(j);if(t._imageryLayer instanceof Array){for(K=[],Q=0;Q<t._imageryLayer.length;Q++){var he;if(e$2b(he=t._imageryLayer[Q])&&(he instanceof h$Q||he instanceof i$O)){Z=_0x48a6ae(he,le.cartographicBounds);K=K.concat(Z)}}K.length>0&&X.setImagerys(K,le.cartographicBounds)}else{if(e$2b(t._imageryLayer)&&(t._imageryLayer instanceof h$Q||t._imageryLayer instanceof i$O))(K=_0x48a6ae(t._imageryLayer,le.cartographicBounds)).length>0&&X.setImagerys(K,le.cartographicBounds)}re._renderEntityList.push(X)}}}}re._boundingSphere=i$1c.fromBoundingSpheres(L,new i$1c),re._originalBS=i$1c.fromBoundingSpheres(M,new i$1c),re._ready=!0,i._childrenPageLod.push(re)}if(!e$2b(i._boundingSphere)||i._isLeafTile){for(var de=[],fe=0;fe<i._childrenPageLod.length;fe++)de.push(i._childrenPageLod[fe]._boundingSphere);i._boundingSphere=i$1c.fromBoundingSpheres(de),i._oriBoundingSphere=i$1c.clone(i._boundingSphere)}if(!o$1p.equals(t._boundingSphereOffset,o$1p.ZERO)){var pe=Math.max(Math.abs(t._boundingSphereOffset.x),Math.abs(t._boundingSphereOffset.y),Math.abs(t._boundingSphereOffset.z));i.extendRadius(pe)}for(var _e in h){var me=h[_e];!e$2b(me)||(me.destroy(),h[_e]=null)}r&&Se$d.DecRef(i._fileName),i._s3mLoadState=N$P.PARSED,i._isParsed=!0,t.LoadingPriority===_0x10659f.UsePagedLodInfo&&i._isEmptyTree&&i.setEmptyTreeFlag(!1)}))},_0x215208.binaryDataParser=function(e,t,i,n){if(t._s3mLoadState===N$P.UNLOAD)return t.s3mBuffer=null,t.volBuffer=null,void(t.task=void 0);var r;e$2b(e._imageryLayer)&&(r=e._fileType!==d$15.OSGBFile&&e._fileType!==d$15.OSGBCacheFile||e$2b(e.waterEffectSet)?void 0:p$1d.pack(e._matModel,new Array(16)));var o={buffer:i,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,bVolume:!1,modelMatrix:r,isCoverImageryLayer:e$2b(e._imageryLayer)},a=[i];e$2b(n)&&"vol"===e._strVolumeExt&&(o.bVolume=!0,o.volbuffer=n,a.push(n)),_0x46a73d.init||_0x46a73d.initWebAssembly();var s=_0x46a73d.S3MTaskProcessor.scheduleTask(o,a);!e$2b(s)||(t._s3mLoadState=N$P.PARSING,e._layerScheduler._statistics.numberOfProcessingAttempted=0,e._layerScheduler._statistics.numberOfTilesProcessing++,t.s3mBuffer=null,t.volBuffer=null,s.then((function(i){if(e$2b(window.Proxy)){var r=t._relativePath.toString()+t._fileName;if((!0===e._indexedDBSetting.isGeoTilesSave||e._indexedDBSetting.isGeoTilesRootNodeSave&&e._layerScheduler._isRootNode(r))&&e$2b(e._layerScheduler._indexedDBScheduler)){if(e$2b(e._layerScheduler._indexedDBScheduler.cachestatus)&&e$2b(e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename])&&(1===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]||2===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]))return;var o={blob:i,key:r,tablename:e._layerScheduler.tablename,dbname:e._layerScheduler._indexedDBScheduler.dbname};_0x46a73d.indexTaskProcessor.scheduleTask(o,[])}}e._layerScheduler._statistics.numberOfTilesProcessing--,_0x215208.parseResult(i,e,t,n)})).otherwise((function(i){if(e._layerScheduler._statistics.numberOfTilesProcessing--,t.task=void 0,t._s3mLoadState==N$P.UNLOAD)return t.s3mBuffer=null,void(t.volBuffer=null);e$2b(i)?(t.s3mBuffer=null,t.volBuffer=null,t._s3mLoadState=N$P.FAILED,console.log(i)):t._s3mLoadState=N$P.LOADED})))};var _0x5a279b=(_0x4a63b7=!0,function(e,t){var i=_0x4a63b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a63b7=!1,i}),_0x38a494=_0x5a279b(void 0,(function(){return _0x38a494.toString().search("(((.+)+)+)+$").toString().constructor(_0x38a494).search("(((.+)+)+)+$")})),_0x4a63b7;function _0x212e1c(){this.skeletons=new e$1N,this.bufferCache={},this.vertexJob=new _0x38010a,this.indexJob=new _0x54c6f3}_0x38a494(),_0x212e1c.STATE={SkeletonParsing:0,SkeletonReady:1};var _0x4f1c86={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,PARSED:4,CREATING:5,READY:6,LOADFAILED:7,PARSFAILED:8};function _0x38010a(){this.context=void 0,this.geoPackage=void 0,this.index=0}function _0x54c6f3(){this.geoPackage=void 0,this.context=void 0,this.index=0}function _0x4ebd8d(e,t,i){if(!e$2b(t.request)){let o=i.split("#");var n=new h$16("./ModelFile/"+(encodeURIComponent(o[0])+(o[1]?"#"+o[1]:""))).resolve(e._baseUri).toString();e$2b(a$O.CREDENTIAL)&&(n=a$O.addToken(n));var r=new r$1b({url:n,throttle:!0,throttleByServer:!0,serverKey:r$1a.getServerKey(n),priorityFunction:function(){return 1e3}});t.request=r}var o=o$10(t.request.url,void 0,t.request);!e$2b(o)||(t.state=_0x4f1c86.LOADING,o.then((function(e){t.request=void 0,t.buffer=e,t.state=_0x4f1c86.LOADED})).otherwise((function(e){e$2b(e)?t.state=_0x4f1c86.LOADFAILED:(t.state=_0x4f1c86.UNLOAD,t.request=void 0)})))}function _0x13d29d(e,t,i){var n={buffer:i,isS3MZ:!1,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,isJsonScp:e._isJsonScp,createEdge:!1},r=[i];if(_0x46a73d.init||_0x46a73d.initWebAssembly(),_0x46a73d.taskProcessorReady){var o=_0x46a73d.S3MBTaskProcessor.scheduleTask(n,r);!e$2b(o)||(t.buffer=void 0,t.state=_0x4f1c86.PARSING,o.then((function(e){t.state=_0x4f1c86.PARSED,t.skeletonPackage=e})).otherwise((function(e){t.state=_0x4f1c86.PARSFAILED})))}}function _0xb2e26f(e,t,i,n){var r=e._context,o=i.skeletonPackage.geoPackage;for(var a in delete o.ignoreNormal,o)if(o.hasOwnProperty(a)){for(var s=o[a],l=s.vertexPackage.vertexAttributes.length,u=new r$16,c=0;c<l;c++)u.enqueue(c);i.vertexBufferToCreate.set(a,u);var h=s.arrIndexPackage[0];if(e$2b(h)){ce$x.UNSIGNED_SHORT,(1===h.indexType||s.vertexPackage.verticesCount>=e$2a.SIXTY_FOUR_KILOBYTES)&&r.elementIndexUint&&ce$x.UNSIGNED_INT;var d=new r$16;d.enqueue(0),i.indexBufferToCreate.set(a,d)}t.bufferCache[n+"_"+a]=1}i.state=_0x4f1c86.CREATING}function _0x4c09ed(e,t,i,n){var r=!0;for(var o in i.vertexBufferToCreate._hash){for(var a=i.vertexBufferToCreate._hash[o];a.length;){var s=a.peek();if(t.vertexJob.set(e._context,i.skeletonPackage.geoPackage[o],s),!e._frameState.jobScheduler.execute(t.vertexJob,i$Q.BUFFER))break;a.dequeue()}r=r&&0===a.length}for(var o in i.indexBufferToCreate._hash){for(a=i.indexBufferToCreate._hash[o];a.length;){s=a.peek();if(t.indexJob.set(e._context,i.skeletonPackage.geoPackage[o],s),!e._frameState.jobScheduler.execute(t.indexJob,i$Q.BUFFER))break;a.dequeue()}r=r&&0===a.length}r&&(i.vertexBufferToCreate=void 0,i.indexBufferToCreate=void 0,i.state=_0x4f1c86.READY)}_0x38010a.prototype.set=function(e,t,i){this.context=e,this.geoPackage=t,this.index=i},_0x38010a.prototype.execute=function(){var e=this.context,t=this.index,i=this.geoPackage.vertexPackage.vertexAttributes[t];e$2b(i.vertexBuffer)||(i.vertexBuffer=t$Y.createVertexBuffer({context:e,typedArray:i.typedArray,usage:A$19.STATIC_DRAW}),delete i.typedArray,i.vertexBuffer.vertexArrayDestroyable=!1)},_0x54c6f3.prototype.set=function(e,t,i){this.geoPackage=t,this.context=e,this.index=i},_0x54c6f3.prototype.execute=function(){var e=this.context;this.index;var t=this.geoPackage.arrIndexPackage[0],i=this.geoPackage.vertexPackage.verticesCount,n=ce$x.UNSIGNED_SHORT;(1===t.indexType||i>=e$2a.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(n=ce$x.UNSIGNED_INT);var r=t$Y.createIndexBuffer({context:e,typedArray:t.indicesTypedArray,usage:A$19.STATIC_DRAW,indexDatatype:n});r.vertexArrayDestroyable=!1,delete t.indicesTypedArray,t.indexBuffer=r},_0x212e1c.prototype.getSkeleton=function(e,t,i){var n=t.skeletonPackages,r=i.indexOf("#"),o=i;r>-1&&(o=i.substring(0,r));var a=this.skeletons.get(o);return e$2b(a)||(a={state:_0x4f1c86.UNLOAD,skeletonPackage:void 0,vertexBufferToCreate:new e$1N,indexBufferToCreate:new e$1N},this.skeletons.set(o,a)),a.state===_0x4f1c86.UNLOAD?_0x4ebd8d(e,a,i):a.state===_0x4f1c86.LOADED?_0x13d29d(e,a,a.buffer):a.state===_0x4f1c86.PARSED?_0xb2e26f(e,this,a,o):a.state===_0x4f1c86.CREATING&&_0x4c09ed(e,this,a),a.state===_0x4f1c86.READY&&(n.contains(o)||n.set(o,a.skeletonPackage)),a},_0x212e1c.prototype.remove=function(e){var t=this.skeletons.get(e);if(e$2b(t)&&e$2b(t.skeletonPackage)){var i=t.skeletonPackage.geoPackage;for(var n in i)if(i.hasOwnProperty(n)){for(var r=i[n],o=r.vertexPackage.vertexAttributes,a=o.length,s=0;s<a;s++){var l=o[s];if(e$2b(l.vertexBuffer)){var u=l.vertexBuffer;l.vertexBuffer.vertexArrayDestroyable=!0,e$2b(u)&&!u.isDestroyed()&&u.vertexArrayDestroyable&&u.destroy(),l.vertexBuffer=void 0}}var c=r.arrIndexPackage[0];if(e$2b(c)){var h=c.indexBuffer;h.vertexArrayDestroyable=!0,e$2b(h)&&!h.isDestroyed()&&h.vertexArrayDestroyable&&h.destroy(),c.indexBuffer=void 0}delete this.bufferCache[e+"_"+n]}this.skeletons.remove(e)}},_0x212e1c.parse=function(e,t){var i=t.instancePackage.geoPackage;delete i.ignoreNormal;var n=!0;for(var r in e$2b(t.skeletonPackages)||(t.skeletonPackages=new e$1N),i)if(i.hasOwnProperty(r)){n=e.instanceSkeletonManager.getSkeleton(e,t,r).state===_0x4f1c86.READY&&n}n&&(t.skeletonState=_0x212e1c.STATE.SkeletonReady)};var y$O=1,l$U=2,B$L=4,P$N=32;function H$R(e,t,i,n){var r=e|t<<8,o=r>>11&31,a=r>>5&63,s=31&r;return i[n+0]=o<<3|o>>2,i[n+1]=a<<2|a>>4,i[n+2]=s<<3|s>>2,i[n+3]=255,r}function M$R(e,t,i,n){for(var r=new Uint8Array(16),o=H$R(t[i+0],t[i+1],r,0),a=H$R(t[i+2],t[i+3],r,4),s=0;s<3;s++){var l=r[s],u=r[4+s];n&&o<=a?(r[8+s]=(l+u)/2,r[12+s]=0):(r[8+s]=(2*l+u)/3,r[12+s]=(l+2*u)/3)}r[11]=255,r[15]=n&&o<=a?0:255;var c=new Uint8Array(16);for(s=0;s<4;++s){var h=t[i+4+s];c[4*s+0]=3&h,c[4*s+1]=h>>2&3,c[4*s+2]=h>>4&3,c[4*s+3]=h>>6&3}for(s=0;s<16;++s)for(var d=4*c[s],f=0;f<4;++f)e[4*s+f]=r[d+f]}function N$H(e,t,i){for(var n=0;n<8;++n){var r=bytes[i+n],o=15&r,a=240&r;e[8*n+3]=o|o<<4,e[8*n+7]=a|a>>4}}function W$Q(e,t,i){var n=t[i+0],r=t[i+1],o=new Uint8Array(8);if(o[0]=n,o[1]=r,n<=r){for(var a=1;a<5;++a)o[1+a]=((5-a)*n+a*r)/5;o[6]=0,o[7]=255}else for(a=1;a<7;++a)o[1+a]=((7-a)*n+a*r)/7;var s=new Uint8Array(16),l=(i=i+2,0);for(a=0;a<2;++a){for(var u=0,c=0;c<3;++c){u|=t[i++]<<8*c}for(c=0;c<8;++c){var h=u>>3*c&7;s[l++]=h}}for(a=0;a<16;++a)e[4*a+3]=o[s[a]]}function E$R(e,t,i,n){var r=0;0!=(n&(l$U|B$L))&&(r=8),M$R(e,t,i+r,0!=(n&y$O)),0!=(n&l$U)?N$H(e,t,i):0!=(n&B$L)&&W$Q(e,t,i)}function G$X(e,t,i,n){for(var r=new Uint16Array(4),o=e,a=0,s=0,l=0,u=0,c=0,h=0,d=0,f=0,p=0,_=t/4,m=i/4,g=0;g<m;g++)for(var x=0;x<_;x++)l=4*((m-g)*_+x),r[0]=n[l],r[1]=n[l+1],u=31&r[0],c=2016&r[0],h=63488&r[0],d=31&r[1],f=2016&r[1],p=63488&r[1],r[2]=5*u+3*d>>3|5*c+3*f>>3&2016|5*h+3*p>>3&63488,r[3]=5*d+3*u>>3|5*f+3*c>>3&2016|5*p+3*h>>3&63488,a=n[l+2],o[s=4*g*t+4*x]=r[3&a],o[s+1]=r[a>>2&3],o[s+2]=r[a>>4&3],o[s+3]=r[a>>6&3],o[s+=t]=r[a>>8&3],o[s+1]=r[a>>10&3],o[s+2]=r[a>>12&3],o[s+3]=r[a>>14],a=n[l+3],o[s+=t]=r[3&a],o[s+1]=r[a>>2&3],o[s+2]=r[a>>4&3],o[s+3]=r[a>>6&3],o[s+=t]=r[a>>8&3],o[s+1]=r[a>>10&3],o[s+2]=r[a>>12&3],o[s+3]=r[a>>14];return o}function R$L(e,t,i,n,r){for(var o=0!=(r&y$O)?8:16,a=0,s=0;s<i;s+=4)for(var l=0;l<t;l+=4){var u=new Uint8Array(64);E$R(u,n,a,r);for(var c=0,h=0;h<4;++h)for(var d=0;d<4;++d){var f=l+d,p=s+h;if(f<t&&p<i)for(var _=4*(t*(i-p)+f),m=0;m<4;++m)e[_++]=u[c++];else c+=4}a+=o}}function L$U(e){}L$U.decode=function(e,t,i,n,r){if(null!=e&&null!=n&&0!=i&&0!=t){var o=0;(o=r>_0x3dfacd.BGR||r===_0x3dfacd.LUMINANCE_ALPHA?B$L:y$O|P$N)&y$O&&o&P$N?G$X(e,t,i,n):R$L(e,t,i,n,o)}};var _0x2b6006=(_0x3d282f=!0,function(e,t){var i=_0x3d282f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3d282f=!1,i}),_0x24d678=_0x2b6006(void 0,(function(){return _0x24d678.toString().search("(((.+)+)+)+$").toString().constructor(_0x24d678).search("(((.+)+)+)+$")})),_0x3d282f;_0x24d678();var _0x55a639=4369,_0x3bcf5d=6410;function _0x413c78(e){this.context=e.context,this.contextId=e.context.id,this.layerId=e.layerId,this.rootName=e.rootName,this.textureId=e.textureId,this._width=e.width,this._height=e.height,this._compressType=e.compressType,this._supportCompressType=e.supportCompressType,this._pixelFormat=e.pixelFormat,this._internalFormat=e.internalFormat,this.wrapS=u$_(e.wrapS,q$19.CLAMP_TO_EDGE),this.wrapT=u$_(e.wrapT,q$19.CLAMP_TO_EDGE),this.arrayBufferView=e.arrayBufferView,this._inner=void 0,this.size=this._width*this._height,this.refCount=1,this.ready=!1,this.renderable=!1,this.isTexBlock=!0,e$2b(this.arrayBufferView)&&this.init(),this._sizeInBytes=V$10.compressedTextureSizeInBytes(this._internalFormat,this._width,this._height),this.context.memorySize+=this._sizeInBytes}function _0x35d955(e,t,i,n){var r=1;if(!e$2a.isPowerOfTwo(i)||!e$2a.isPowerOfTwo(n))return!1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=V$10.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l===o?r:1}Object.defineProperties(_0x413c78.prototype,{_texture:{get:function(){return this._inner._texture}},_target:{get:function(){return this._inner._target}}}),_0x413c78.prototype.init=function(){if(this._compressType===_0x2072ef.enrS3TCDXTN&&1!=this._supportCompressType){if(e$2b(this.arrayBufferView)){var e=null;L$U.decode(e,this._width,this._height,this.arrayBufferView,this._pixelFormat),e=this._pixelFormat>_0x3dfacd.BGR||this._pixelFormat===_0x3dfacd.LUMINANCE_ALPHA?new Uint8Array(this._width*this._height*4):new Uint16Array(this._width*this._height),L$U.decode(e,this._width,this._height,this.arrayBufferView,this._pixelFormat),this.arrayBufferView=e}this._internalFormat=_0x55a639}var t,i,n,r=!1,o=this._internalFormat,a=0,s={};if(e$2b(this.arrayBufferView)){var l=this._width,u=this._height,c=_0x35d955(this.arrayBufferView,o,this._width,this._height)>1,h=this.arrayBufferView.byteLength,d=0;(o===_0x3bcf5d||o===_0x55a639)&&(r=!0);var f=[];do{var p=V$10.compressedTextureSizeInBytes(o,l,u),_=new Uint8Array(this.arrayBufferView.buffer,this.arrayBufferView.byteOffset+d,p);0==a?s.arrayBufferView=_:f.push(_),a++,l=Math.max(l>>1,1),u=Math.max(u>>1,1),d+=p}while(c&&d<h);s.mipLevels=f}else{var m=V$10.compressedTextureSizeInBytes(o,this._width,this._height);s.arrayBufferView=o===_0x55a639?new Uint8Array(this._width*this._height*4):new Uint8Array(m)}a>1?(i=rt$i.LINEAR,t=e$2a.isPowerOfTwo(this._width)&&e$2a.isPowerOfTwo(this._height)?tt$h.LINEAR_MIPMAP_LINEAR:tt$h.LINEAR):(i=rt$i.LINEAR,t=tt$h.LINEAR),n=this._internalFormat==_0x55a639?V$10.RGBA:this._internalFormat==_0x3bcf5d?V$10.LUMINANCE_ALPHA:this._internalFormat,this._inner=new t$V({context:this.context,width:this._width,height:this._height,pixelFormat:n,pixelDatatype:_$$.UNSIGNED_BYTE,flipY:r,source:s,sampler:new e$1P({wrapS:this.wrapS,wrapT:this.wrapT,minificationFilter:t,magnificationFilter:i,maximumAnisotropy:e$1T.maximumTextureFilterAnisotropy})}),this.arrayBufferView=void 0,this.ready=!0},_0x413c78.prototype.copyFrom=function(e){var t=e.xOffset,i=e.yOffset,n=e.width,r=e.height,o=e.arrayBufferView,a=this._internalFormat;if(this._compressType===_0x2072ef.enrS3TCDXTN&&1!=this._supportCompressType){var s=null;a=this._pixelFormat;L$U.decode(s,n,r,o,a),s=a>_0x3dfacd.BGR||a===_0x3dfacd.LUMINANCE_ALPHA?new Uint8Array(n*r*4):new Uint16Array(n*r),L$U.decode(s,n,r,o,a),o=s,this._internalFormat=_0x55a639,this._inner.copyFrom({width:n,height:r,arrayBufferView:o},t,i)}else{var l=V$10.compressedTextureSizeInBytes(a,n,r),u=new Uint8Array(o.buffer,o.byteOffset,l);this._inner.copyFrom({width:n,height:r,arrayBufferView:u},t,i)}},_0x413c78.prototype.update=function(e){this.context=e.context,this.contextId=e.context.id,this.layerId=e.layerId,this.rootName=e.rootName,this.textureId=e.textureId,this._width=e.width,this._height=e.height,this._internalFormat=e.internalFormat,this.arrayBufferView=e.arrayBufferView,this.refCount=1,this.ready=!1,this.renderable=!1,e$2b(this.arrayBufferView)&&this.init()},_0x413c78.prototype.destroy=function(){this._inner&&this._inner.destroy(),this._inner=null,this.refCount=0,this.ready=!1,this.renderable=!1,this.context.memorySize-=this._sizeInBytes};var _0x2f8693=(_0x2e3a6e=!0,function(e,t){var i=_0x2e3a6e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e3a6e=!1,i}),_0x2b8377=_0x2f8693(void 0,(function(){return _0x2b8377.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b8377).search("(((.+)+)+)+$")})),_0x2e3a6e;_0x2b8377();var _0x27ac16={cache:{},cacheSize:0,freeCache:{},freeQueue:new r$16,freeCacheSize:0,throttleSize:52428800,getCache:function(e,t,i){var n=this.cache[e];e$2b(n)||(n=this.cache[e]={});var r=n[t];e$2b(r)||(r=n[t]={});var o=r[i];return e$2b(o)||(o=r[i]={}),o},get:function(e,t,i,n){var r=this.getCache(e,t,i)[n];if(e$2b(r))return r.refCount++,r},create:function(e){var t=e.context,i=t.id,n=e.layerId,r=e.rootName,o=e.textureId,a=this.getCache(i,n,r),s=a[o];if(e$2b(s))return s.refCount++,s;var l=e.width,u=e.height,c=e.compressType,h=e.supportCompressType,d=e.pixelFormat,f=e.arrayBufferView;return s=new _0x413c78({context:t,layerId:n,rootName:r,textureId:o,width:l,height:u,compressType:c,supportCompressType:h,pixelFormat:d,internalFormat:e.internalFormat,arrayBufferView:f}),a[o]=s,s},del:function(e){if(e$2b(e.contextId)){var t=this.getCache(e.contextId,e.layerId,e.rootName);!e$2b(t[e.textureId])||0==--e.refCount&&(delete t[e.textureId],e.destroy())}}},_0x581deb=(_0x118a7f=!0,function(e,t){var i=_0x118a7f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x118a7f=!1,i}),_0x2f5247=_0x581deb(void 0,(function(){return _0x2f5247.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f5247).search("(((.+)+)+)+$")})),_0x118a7f;function _0x34f811(){this.isRoot=!1,this.isLeaf=!1,this.ownerLayerName=void 0,this._refCount=0,this.ownerEntity=void 0,this._ambientColor=new e$29(1,1,1,1),this._diffuseColor=new e$29(1,1,1,1),this._specularColor=new e$29(0),this._texMatrix=p$1d.clone(p$1d.IDENTITY,new p$1d),this._shininess=50,this._bTransparentSorting=!1,this._textures=[],this._created=!1,this._createdBaker=!1,this._subRequested=!1,this._subRequestedBaker=!1,this._subRequestNames=void 0,this._subRequestNamesBake=void 0,this._subTextureNames=void 0,this._subTextureNamesBake=void 0,this._subBatchValues=void 0,this._oriTextureBake=void 0,this._batchTable=void 0,this._batchTableBake=void 0,this._ancestorTexture=void 0,this._oriTexture=void 0,this.textureParameter=void 0,this.textureParameterBake=void 0,this.textureInitilized=!1,this.textureBakeInitilized=!1,this.textureRenderableFlag=!1,this.textureBakeRenderableFlag=!1,this.isCrnTexture=!1,this.taskMap={},this._usePBR=!1}function _0x37286a(e){if(!e$2b(e))return this._offsetPeriod=0,this._offsetSpeedU=0,this._offsetSpeedV=0,this._tilingPeriod=0,this._tilingSpeedU=0,void(this._tilingSpeedV=0);this._offsetPeriod=e.OffsetPeriod,this._offsetSpeedU=e.OffsetSpeedU,this._offsetSpeedV=e.OffsetSpeedV,this._tilingPeriod=e.TilingPeriod,this._tilingSpeedU=e.TilingSpeedU,this._tilingSpeedV=e.TilingSpeedV}_0x2f5247(),Object.defineProperties(_0x34f811.prototype,{hasTexture:{get:function(){return this._textures.length>0||(e$2b(this.baseColorTexture)||e$2b(this.normalTexture)||e$2b(this.emissiveTexture)||e$2b(this.metallicRoughnessTexture)||e$2b(this.occlusionTexture))}}}),_0x34f811.prototype.createPBRParamter=function(e){if(e$2b(e.pbrMetallicRoughness)&&!this._usePBR){var t=e.pbrMetallicRoughness;this._usePBR=!0,this._alphaCutoff=u$_(t.alphaCutoff,e.alphaCutoff),this._alphaMode=u$_(t.alphaMode,e.alphaMode),this._baseColor=new e$1U(t.baseColor.x,t.baseColor.y,t.baseColor.z,t.baseColor.w),this._baseColorTextureIndex=t.baseColorTextureIndex,this._baseColorTextureCoordIndex=t.baseColorTextureCoordIndex,this._doubleSided=t.doubleSided,this._emissiveFactor=new e$1U(t.emissiveFactor.x,t.emissiveFactor.y,t.emissiveFactor.z,1),this._emissiveTextureIndex=t.emissiveTextureIndex,this._emissiveTextureCoordIndex=t.emissiveTextureCoordIndex,this._roughnessFactor=t.roughnessFactor,this._metallicFactor=t.metallicFactor,this._metallicRoughnessTextureIndex=t.metallicRoughnessTextureIndex,this._metallicRoughnessTextureCoordIndex=t.metallicRoughnessTextureCoordIndex,this._normalTextureIndex=t.normalTextureIndex,this._normalTextureCoordIndex=t.normalTextureCoordIndex,this._normalTextureScale=t.normalTextureScale,this._occlusionTextureIndex=t.occlusionTextureIndex,this._occlusionTextureCoordIndex=t.occlusionTextureCoordIndex,this._occlusionTextureStrength=t.occlusionTextureStrength,this._baseColorTextureMotion=new _0x37286a(t.baseColorTextureMotion),this._emissiveTextureMotion=new _0x37286a(t.emissiveTextureMotion)}};var _0x32917e={};function _0x2e40b4(e,t,i){for(var n in i)if(i.hasOwnProperty(n)){var r=i[n],o=Number(n);t.setBatchedAttribute(o,0,r)}t.update(e)}function _0x3ba183(e,t,i,n,r,o){var a=r[n];if(e$2b(a)){for(var s=_0x27ac16.get(e,t,i,a);e$2b(a)&&e$2b(s)&&!s.renderable;)s.refCount--,a=r[a],s=_0x27ac16.get(e,t,i,a);return o.name=a,s}}function _0x476047(e){var t=e.indexOf(".");return e.substr(0,t)}_0x34f811.prototype.createBakeTexture=function(e,t,i,n,r,o,a,s){if(!this._createdBaker){this.textureParameterBake={context:e,layer:t,isRoot:i,rootName:n,curTextureName:r,textureInfo:o,rootBatchIdMap:a,ancestorMap:s};var l=t._textureLod;this._createdBaker=!0,this._subRequestedBaker=i&&l;var u=o.textureData,c=V$10.RGBA_DXT5,h=_0x27ac16.create({context:e,layerId:t.id,rootName:n,textureId:o.id,width:o.width,height:o.height,compressType:o.compressType,supportCompressType:t._supportCompressType,pixelFormat:o.format,internalFormat:c,arrayBufferView:u});h.renderable=i&&l;var d=o.subTexInfos.length,f=a[o.rootTextureName];if(this._textures.push(h),l){var p=[{functionName:"czm_batchTable_xywh_BakeTex",componentDatatype:S$12.FLOAT,componentsPerAttribute:4}],_=e$2b(f)?Object.keys(f).length:d;this._batchTableBake=new h$W(e,p,_),this._batchTableBake.useUBO=!0,this._batchTableBake.useForMaterial=!0,this._batchTableBake.suffix="_bakeTex";var m=_0x32917e[t.name];e$2b(m)||(m=_0x32917e[t.name]={});var g=m[n];e$2b(g)||(g=m[n]={});var x=g[r];e$2b(x)||(x=g[r]={});for(var v=o.subTexInfos,y=0;y<d;y++){var $=v[y],b=$.subName.split("_")[0],T=new e$29($.offsetX,$.offsetY,$.width,$.height);x[b]=T}}if(!i||!l){this._subRequestNamesBake=[];for(y=0;y<o.requestNames.length;y++){var C=o.requestNames[y],S=_0x476047(C);if("Tex"===S.split("_")[0]){var w=C.split("#"),E=_0x476047(w[0]);if(w.length>1)for(var P=w[1],A=P.length,L=0;L<A;L+=3){var M=E+"_"+P.substring(L,L+3);this._subRequestNamesBake.push(M)}}else this._subRequestNamesBake.push(S)}}return this._oriTextureBake=h,h}},_0x34f811.prototype.initTexture=function(){if(!this.textureInitilized&&e$2b(this.textureParameter)){this.textureInitilized=!0;var e=this.textureParameter.context,t=this.textureParameter.layer,i=this.textureParameter.isRoot,n=this.textureParameter.rootName,r=this.textureParameter.curTextureName,o=this.textureParameter.textureInfo,a=this.textureParameter.rootBatchIdMap,s=this.textureParameter.ancestorMap;this.textureParameter=void 0;var l={},u=a[o.rootTextureName],c=i||!t._textureLod?void 0:_0x3ba183(e.id,t.id,n,r,s,l),h=_0x32917e[t.name];e$2b(h)||(h=_0x32917e[t.name]={});var d=h[n];e$2b(d)||(d=h[n]={});var f=d[r];e$2b(f)||(f=d[r]={});for(var p=i?void 0:e$2b(l.name)?d[l.name]:void 0,_={},m=o.subTexInfos,g=[],x=o.subTexInfos.length,v=0;v<x;v++){var y=m[v];if(g.push(y.subName),t._textureLod){var $=y.subName.split("_")[0],b=new e$29(y.offsetX,y.offsetY,y.width,y.height),T=e$2b(u)?u[$]:v,C=i?void 0:e$2b(p)?p[$]:void 0,S=e$2b(C)?C:b;this._batchTable.setBatchedAttribute(T,0,S),_[T]=b,f[$]=b}}this._subTexInfos=m,this._subTextureNames=g,this._subBatchValues=_,this._ancestorTexture=c}},_0x34f811.prototype.initBakeTexture=function(){if(!this.textureBakeInitilized&&e$2b(this.textureParameterBake)){this.textureBakeInitilized=!0;var e=this.textureParameterBake.context,t=this.textureParameterBake.layer,i=this.textureParameterBake.isRoot,n=this.textureParameterBake.rootName,r=this.textureParameterBake.curTextureName,o=this.textureParameterBake.textureInfo,a=this.textureParameterBake.rootBatchIdMap,s=this.textureParameterBake.ancestorMap;this.textureParameterBake=void 0;var l={},u=a[o.rootTextureName],c=i||!t._textureLod?void 0:_0x3ba183(e.id,t.id,n,r,s,l),h=_0x32917e[t.name];e$2b(h)||(h=_0x32917e[t.name]={});var d=h[n];e$2b(d)||(d=h[n]={});var f=d[r];e$2b(f)||(f=d[r]={});for(var p=i?void 0:e$2b(l.name)?d[l.name]:void 0,_={},m=o.subTexInfos,g=[],x=o.subTexInfos.length,v=0;v<x;v++){var y=m[v];if(g.push(y.subName),t._textureLod){var $=y.subName.split("_")[0],b=new e$29(y.offsetX,y.offsetY,y.width,y.height),T=e$2b(u)?u[$]:v,C=i?void 0:e$2b(p)?p[$]:void 0,S=e$2b(C)?C:b;this._batchTableBake.setBatchedAttribute(T,0,S),_[T]=b,f[$]=b}}this._subTexInfosBake=m,this._subTextureNamesBake=g,this._subBatchValuesBake=_,this._ancestorTextureBake=c}},_0x34f811.prototype.createTexture=function(e,t,i,n,r,o,a,s){if(!this._created){this.isCrnTexture=o.compressType===_0x3dfacd.CRN_DXT5,this.textureParameter={context:e,layer:t,isRoot:i,rootName:n,curTextureName:r,textureInfo:o,rootBatchIdMap:a,ancestorMap:s};var l=t._textureLod;this.isRoot=i&&l,this._created=!0,this._subRequested=i&&l;var u=o.textureData,c=V$10.RGBA_DXT5,h=_0x27ac16.create({context:e,layerId:t.id,rootName:n,textureId:o.id,width:o.width,height:o.height,compressType:o.compressType,supportCompressType:t._supportCompressType,pixelFormat:o.format,internalFormat:c,arrayBufferView:u});h.renderable=i&&l;var d=o.subTexInfos.length,f=a[o.rootTextureName];if(this._textures.push(h),l){var p=[{functionName:"czm_batchTable_xywh_BaseTex",componentDatatype:S$12.FLOAT,componentsPerAttribute:4}],_=e$2b(f)?Object.keys(f).length:d;this._batchTable=new h$W(e,p,_),this._batchTable.useUBO=!0,this._batchTable.useForMaterial=!0,this._batchTable.suffix="_baseTex";var m=_0x32917e[t.name];e$2b(m)||(m=_0x32917e[t.name]={});var g=m[n];e$2b(g)||(g=m[n]={});var x=g[r];e$2b(x)||(x=g[r]={});for(var v=o.subTexInfos,y=0;y<d;y++){var $=v[y],b=$.subName.split("_")[0],T=new e$29($.offsetX,$.offsetY,$.width,$.height);x[b]=T}}if(!i||!l){this._subRequestNames=[];for(y=0;y<o.requestNames.length;y++){var C=o.requestNames[y],S=_0x476047(C);if("Tex"===S.split("_")[0]){var w=C.split("#"),E=_0x476047(w[0]);if(w.length>1)for(var P=w[1],A=P.length,L=0;L<A;L+=3){var M=E+"_"+P.substring(L,L+3);this._subRequestNames.push(M)}}else this._subRequestNames.push(S)}}return this.isLeaf=!(i&&l||1===o.requestNames.length&&o.requestNames[0]===r),this._oriTexture=h,h}},_0x34f811.prototype.requestSubTextures=function(e,t,i,n){if(!this._subRequested&&e$2b(this._subRequestNames)){for(var r=this._subRequestNames,o=this._subTexInfos,a=this._subTextureNames,s=this._subBatchValues,l=this._oriTexture,u=[],c=i._baseUri,h=t._subTextureManager,d=0,f=r.length;d<f;d++){var p=r[d];if(e$2b(g=h.get(i._id,c,p,this))){var _=g.result;for(var m in u.push(d),_)if(_.hasOwnProperty(m)){var g=_[m],x=a.indexOf(m);if(x<0&&this.isLeaf)continue;var v=0,y=0,$=g.width,b=g.height;if(x>=0){var T=o[x];v=T.offsetX,y=T.offsetY}this.isLeaf?n.enqueue({texture:l,subTextureInfo:{xOffset:v,yOffset:y,width:$,height:b,arrayBufferView:g.arrayBufferView}}):l.arrayBufferView=g.arrayBufferView}}}if(u.length===r.length)r.length=0;else{var C=0;for(d=0,f=u.length;d<f;d++)r.splice(u[d]-C,1),C++}0===r.length&&(this.textureRenderableFlag=!0,this.isLeaf||l.init(),i._textureLod&&_0x2e40b4(e,this._batchTable,s),this._subRequested=!0,this._subRequestNames=void 0,this._subTextureNames=void 0,this._subBatchValues=void 0,this._subTexInfos=void 0)}},_0x34f811.prototype.requestBakeSubTextures=function(e,t,i,n){if(!this._subRequestedBaker&&e$2b(this._subRequestNamesBake)){for(var r=this._subRequestNamesBake,o=this._subTexInfosBake,a=this._subTextureNamesBake,s=this._subBatchValuesBake,l=this._oriTextureBake,u=[],c=i._baseUri,h=t._subTextureManager,d=0,f=r.length;d<f;d++){var p=r[d];if(e$2b(g=h.get(i._id,c,p,this))){var _=g.result;for(var m in u.push(d),_)if(_.hasOwnProperty(m)){var g=_[m],x=a.indexOf(m);if(x<0&&this.isLeaf)continue;var v=0,y=0,$=g.width,b=g.height;if(x>=0){var T=o[x];v=T.offsetX,y=T.offsetY}n.enqueue({texture:l,subTextureInfo:{xOffset:v,yOffset:y,width:$,height:b,arrayBufferView:g.arrayBufferView}})}}}if(u.length===r.length)r.length=0;else{var C=0;for(d=0,f=u.length;d<f;d++)r.splice(u[d]-C,1),C++}0===r.length&&(this.textureBakeRenderableFlag=!0,this.isLeaf||l.init(),this._subRequestedBaker=!0,this._subRequestNamesBake=void 0,this._subTextureNamesBake=void 0,this._subBatchValuesBake=void 0,this._subTexInfosBake=void 0,i._textureLod&&_0x2e40b4(e,this._batchTableBake,s))}},_0x34f811.prototype.enableTextureRenderable=function(){if(this.textureRenderableFlag){this.textureRenderableFlag=!1;var e=this._oriTexture;e.renderable=!0,e$2b(this._ancestorTexture)&&this._ancestorTexture.textureId!==e.textureId&&_0x27ac16.del(this._ancestorTexture),this._textures[0]=e,this._oriTexture=void 0,this._ancestorTexture=void 0}},_0x34f811.prototype.enableBakeTextureRenderable=function(){if(this.textureBakeRenderableFlag){this.textureBakeRenderableFlag=!1;var e=this._oriTextureBake;e.renderable=!0,e$2b(this._ancestorTextureBake)&&this._ancestorTextureBake.textureId!==e.textureId&&_0x27ac16.del(this._ancestorTextureBake),this._textures[1]=e,this._oriTextureBake=void 0,this._ancestorTextureBake=void 0}},_0x34f811.prototype.isDestroyed=function(){return!1},_0x34f811.prototype.destroy=function(e){this._ambientColor=null,this._diffuseColor=null,this._specularColor=null;for(var t=0,i=this._textures.length;t<i;t++){var n=this._textures[t];_0x27ac16.del(n)}this._textures.length=0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._batchTableBake=this._batchTableBake&&this._batchTableBake.destroy(),this._subTexInfos=void 0,this._subTextureNames=void 0,this._subBatchValues=void 0,this._subTextureNamesBake=void 0,this._subTexInfosBake=void 0,e$2b(this._ancestorTexture)&&this._ancestorTexture.textureId!==this._oriTexture.textureId&&_0x27ac16.del(this._ancestorTexture),this._oriTexture=void 0,this._ancestorTexture=void 0,this.ownerEntity=void 0,this.textureParameter=void 0,this._oriTextureBake=void 0;var r=e._context;if(e$2b(this._subRequestNames)){for(t=0,i=this._subRequestNames.length;t<i;t++){var o=(a=this._subRequestNames[t]).split(".")[0];o=(s=a.indexOf("%23"))>-1?o+a.substring(s):o,r._subTextureManager.del(e._id,o)}this._subRequestNames=void 0}if(e$2b(this._subRequestNamesBake)){for(t=0,i=this._subRequestNamesBake.length;t<i;t++){var a,s;o=(a=this._subRequestNamesBake[t]).split(".")[0];o=(s=a.indexOf("%23"))>-1?o+a.substring(s):o,r._subTextureManager.del(e._id,o)}this._subRequestNames=void 0}if(e$2b(this.taskMap))for(var l in this.taskMap)if(this.taskMap.hasOwnProperty(l)){var u=this.taskMap[l];_0x46a73d.cancelTask(u)}return this.taskMap=void 0,i$10(this)};var _0x55af22=(_0x101427=!0,function(e,t){var i=_0x101427?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x101427=!1,i}),_0x29ddcf=_0x55af22(void 0,(function(){return _0x29ddcf.toString().search("(((.+)+)+)+$").toString().constructor(_0x29ddcf).search("(((.+)+)+)+$")})),_0x101427;function _0x5b0881(){this.cache={}}function h$P(){this.head=void 0,this.tail=void 0,this._length=0}function r$S(e,t,i){this.item=e,this.previous=t,this.next=i}function n$H(e,t){e$2b(t.previous)&&e$2b(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):e$2b(t.previous)?(t.previous.next=void 0,e.tail=t.previous):e$2b(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}_0x29ddcf(),_0x5b0881.prototype.create=function(e){var t=this.cache[e];return e$2b(t)?t._refCount++:(t=new _0x34f811,this.cache[e]=t),t},_0x5b0881.prototype.free=function(e,t){var i=this.cache[t];!e$2b(i)||0==--i._refCount&&(delete this.cache[t],i.destroy(e))},Object.defineProperties(h$P.prototype,{length:{get:function(){return this._length}}}),h$P.prototype.add=function(e){var t=new r$S(e,this.tail,void 0);return e$2b(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t},h$P.prototype.addToHead=function(e){var t=new r$S(e,void 0,this.head);return e$2b(this.head)?(this.head.previous=t,this.head=t):(this.head=t,this.tail=t),++this._length,t},h$P.prototype.remove=function(e){!e$2b(e)||(n$H(this,e),--this._length)},h$P.prototype.splice=function(e,t){if(e!==t&&e$2b(e)){n$H(this,t);var i=e.next;e.next=t,this.tail===e?this.tail=t:e$2b(i)&&(i.previous=t),t.next=i,t.previous=e}},h$P.prototype.moveNodeBefore=function(e,t){if(e!==t){n$H(this,t);var i=e.previous;e.previous=t,this.head===e?this.head=t:i.next=t,t.next=e,t.previous=i}};var _0x3c3683=(_0x76e0a1=!0,function(e,t){var i=_0x76e0a1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x76e0a1=!1,i}),_0x59a256=_0x3c3683(void 0,(function(){return _0x59a256.toString().search("(((.+)+)+)+$").toString().constructor(_0x59a256).search("(((.+)+)+)+$")})),_0x76e0a1;_0x59a256();var _0xdcb724={UnLoad:0,Loading:1,Loaded:2,Parsing:3,Ready:4,Failed:5};function _0x3fad8f(){this.state={},this.cache={},this.zipBufferCache={},this.list=new h$P,this.requests=[],this.requestPriorityMap={},this.requestMap={},this.parseTaskMap={},this.tablenames=[],this.indexedDBSchedulers=[]}var _0xe654f8=0,_0x464955=209715200;_0x3fad8f.prototype.prepareRequest=function(e,t,i,n,r){var o=e+"_"+i;if(!e$2b(this.requestMap[o])){var a=t+i+".texblock",s=new r$1b({url:a,throttle:!0,throttleByServer:!0,type:4,priorityFunction:function(){return n._disFromCamera}});s.quadKey=i,s.providerName=r.ownerLayerName;var l=this.requestPriorityMap[n._priority];e$2b(l)||(l=this.requestPriorityMap[n._priority]=[]),l.push({request:s,url:a,keyWord:o,priority:s.priorityFunction()}),this.requestMap[o]=s}};var _0x9e2e1=function(e,t){return e.priority-t.priority};function _0x111f70(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(!(t>r-1||r>256)){n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e).slice(n,n+a).buffer;n+=a}}}function _0x51d202(e){return function(){return e._disFromCamera}}function f$O(e){if(!e$2b(e))throw new t$16("uri is required.");var t=new h$16(e);t.normalize();var i=t.path,n=i.lastIndexOf("/");return-1!==n&&(i=i.substr(n+1)),i}_0x3fad8f.prototype.processRequests=function(e){var t=0;for(var i in this.requestPriorityMap)if(this.requestPriorityMap.hasOwnProperty(i)){if(t===r$1a.perPacketCount){for(var n=0,r=(a=this.requestPriorityMap[i]).length;n<r;n++){var o=a[n];delete this.requestMap[o.keyWord]}continue}var a;(a=this.requestPriorityMap[i]).sort(_0x9e2e1);for(n=0,r=a.length;n<r;n++){o=a[n];if(this.load(o,e),++t===r$1a.perPacketCount)break}for(;n<r;n++){o=a[n];delete this.requestMap[o.keyWord]}}this.requestPriorityMap={}},_0x3fad8f.prototype.load=function(e,t){var i=this.tablenames[t.id];if(!e$2b(i))return this.request(e,t);var n=e.keyWord,r=this,o=n.indexOf("_"),a=this.indexedDBSchedulers[t.id].getElementFromDB(i,n.slice(o+1));return e$2b(a)?a.then((function(i){if(!e$2b(i))return r.request(e,t);var o={keyWord:t.id+"_"+i.keyWord,result:i.result,byteLength:i.byteLength},a=r.list.add(o);r.cache[n]=a,r.state[n]=_0xdcb724.Ready,delete r.state[n],delete r.parseTaskMap[n],_0xe654f8+=i.byteLength;for(var s=r.list.head;_0xe654f8>_0x464955;){var l=s,u=s.item.keyWord,c=r.cache[u].item;_0xe654f8-=c.byteLength,delete r.cache[u],s=s.next,r.list.remove(l)}}),(function(i){return r.request(e,t)})):r.request(e,t)},_0x3fad8f.prototype.request=function(e,t){var i=e.keyWord,n=e.request,r=o$10(e.url,void 0,n);if(e$2b(r)){this.state[i]=_0xdcb724.Loading;var o=this;r.then((function(e){if(t._layerScheduler._prepareLoaded||t._layerScheduler.dealWithPrepareLoad(e.byteLength),delete o.requestMap[i],e$2b(o.state[i])){o.state[i]=_0xdcb724.Loaded;var r=_0x111f70(e,n.quadKeyIndex);if(!e$2b(r))return delete o.requestMap[i],void(o.state[i]=_0xdcb724.Failed);var a=new Uint8Array(r),s=new DataView(r),l=0,u=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT,o.zipBufferCache[i]=[];for(var c=0;c<u;c++){var h=s.getUint32(l,!0),d=a$K(a,l+=Uint32Array.BYTES_PER_ELEMENT,h);l+=h;var f=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var p=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var _=new Uint8Array(r).slice(l,l+p);o.zipBufferCache[i].push({unzipLength:f,zippedLength:p,zipBuffer:_,name:d}),l+=p}}}),(function(e){delete o.requestMap[i],o.state[i]=e$2b(e)?_0xdcb724.Failed:_0xdcb724.UnLoad}))}else delete this.requestMap[i]},_0x3fad8f.prototype.parse=function(e,t){if(!this.parseTaskMap[e]){var i=this.zipBufferCache[e];if(!e$2b(i))return void(this.state[e]=_0xdcb724.UnLoad);var n=t.taskMap[e];e$2b(n)||(n=t.taskMap[e]={data:{data:i,isCRN:t.isCrnTexture},priority:t.ownerEntity._disFromCamera,state:0,priorityFunction:_0x51d202(t.ownerEntity),processorName:"UnZipData"});var r=_0x46a73d.startTask(n);if(e$2b(r)){this.parseTaskMap[e]=!0,this.state[e]=_0xdcb724.Parsing;var o=this;r.then((function(i){try{delete o.zipBufferCache[e],delete t.taskMap[e];for(var n=i.data,r={},a=0;a<n.length;a++){var s=n[a],l=s.name,u=new Uint8Array(s.unzipBuffer).buffer,c=new DataView(u),h=0;c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var d=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var f=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var p=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var _=new Uint8Array(u,h,p);h+=p,r[l]={width:d,height:f,arrayBufferView:_}}var m={keyWord:e,result:r,byteLength:u.byteLength},g=o.list.add(m);o.cache[e]=g,o.state[e]=_0xdcb724.Ready;var x=e.indexOf("_"),v=e.slice(0,x),y=e.slice(x+1);if(e$2b(o.indexedDBSchedulers[v])){var $={blob:{keyWord:y,result:r,byteLength:u.byteLength},key:y,tablename:o.tablenames[v],dbname:o.indexedDBSchedulers[v].dbname};_0x46a73d.indexTaskProcessor.scheduleTask($,[])}delete o.state[e],delete t.taskMap[e],delete o.parseTaskMap[e],_0xe654f8+=u.byteLength;for(var b=o.list.head;_0xe654f8>_0x464955;){var T=b.item,C=b,S=T.keyWord,w=o.cache[S].item;_0xe654f8-=w.byteLength,delete o.cache[S],b=b.next,o.list.remove(C)}}catch(e){console.log(e),console.log(t.ownerEntity)}})).otherwise((function(i){delete t.taskMap[e],delete o.parseTaskMap[e],e$2b(o.state)&&(e$2b(i)?(console.log(i),o.state[e]=_0xdcb724.Failed):o.state[e]=_0xdcb724.Loaded)}))}}},_0x3fad8f.prototype.get=function(e,t,i,n){var r=e+"_"+i,o=this.cache[r];if(e$2b(o))return this.list.splice(this.list.tail,o),o.item;var a=this.state[r];e$2b(a)||(a=this.state[r]=_0xdcb724.UnLoad),a===_0xdcb724.UnLoad&&this.prepareRequest(e,t,i,n.ownerEntity,n),a===_0xdcb724.Loaded&&this.parse(r,n)},_0x3fad8f.prototype.del=function(e,t){var i=e+"_"+t;delete this.state[i],delete this.zipBufferCache[i];var n=this.requestMap[i];e$2b(n)&&(n.cancelled=!0,delete this.requestMap[i])};var _0x5611c5=(_0x4ac135=!0,function(e,t){var i=_0x4ac135?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4ac135=!1,i}),_0x35dd21=_0x5611c5(void 0,(function(){return _0x35dd21.toString().search("(((.+)+)+)+$").toString().constructor(_0x35dd21).search("(((.+)+)+)+$")})),_0x4ac135;_0x35dd21();var _0x454bc5=null,_0xeadd26=null;function _0x1309b8(){this._taskProcessorReady=!1}function _0x587082(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a,s,l,u,c=r[o],h=4*o,d=new e$29(0,0,0,0);if(c>=0&&c<=1){c<e$2a.EPSILON9?c=e$2a.EPSILON9:1-c<e$2a.EPSILON9&&(c=1-e$2a.EPSILON9);var f=_0x4f1c92(c);d.x=f.x,d.y=f.y,d.z=f.z,d.w=1}a=255*d.x,s=255*d.y,l=255*d.z,u=255*d.w,e$2b(i)&&!0===i?(e[h+0]=l,e[h+1]=s,e[h+2]=a,e[h+3]=u):(e[h+0]=a,e[h+1]=s,e[h+2]=l,e[h+3]=u)}return new Uint8Array(e.buffer,0,e.length)}function _0x1b3561(e,t,i){for(var n=new Uint8Array(4*e.length),r=0;r<e.length;r++){var o,a,s,l,u=e[r],c=4*r,h=new e$29(0,0,0,0);if(u>=0&&u<=1){var d=_0x4f1c92(u);h.x=d.x,h.y=d.y,h.z=d.z,h.w=1}o=255*h.x,a=255*h.y,s=255*h.z,l=255*h.w,e$2b(i)&&!0===i?(n[c+0]=parseInt(s),n[c+1]=parseInt(a),n[c+2]=parseInt(o),n[c+3]=parseInt(l)):(n[c+0]=parseInt(o),n[c+1]=parseInt(a),n[c+2]=parseInt(s),n[c+3]=parseInt(l))}return n}function _0x351f4b(e,t){for(var i=e.length/4,n=new Float32Array(e.buffer,e.byteOffset,i),r=0;r<n.length;r++){var o=n[r],a=4*r;if(o<0||o>1)e[a+0]=255,e[a+1]=255,e[a+2]=255,e[a+3]=255;else{o=o*(t._ceiling-t._floor)+t._floor;var s=t._dictColorTable.getColor(o);e[a+0]=255*s.red,e[a+1]=255*s.green,e[a+2]=255*s.blue,e[a+3]=255*s.alpha}}return new Uint8Array(e.buffer,0,e.length)}function _0x4a8014(e,t){var i=e.length/4;return _0x3da2dc(new Float32Array(e.buffer,e.byteOffset,i),t)}function _0x4f1c92(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function _0x3880d7(e,t){for(var i=new Uint8Array(4*e.length),n=t._ceiling-t._floor,r=0,o=e.length;r<o;r++){var a=e[r],s=4*r;if(a<0||a>1)i[s+0]=255,i[s+1]=255,i[s+2]=255,i[s+3]=255;else{a=a*n+t._floor;var l=t._dictColorTable.getColor(a);i[s+0]=255*l.red,i[s+1]=255*l.green,i[s+2]=255*l.blue,i[s+3]=255*l.alpha}}return i}function _0x3da2dc(e,t){var i=e,n=i.length,r=_0x1c5342._malloc(Float32Array.BYTES_PER_ELEMENT*n);_0x1c5342.HEAPF32.set(i,r/Float32Array.BYTES_PER_ELEMENT);var o=t._ceiling,a=t._floor,s=t._dictColorTable._dictTable._hash,l=[],u=[];for(var c in s)l.push(parseFloat(c));l.sort((function(e,t){return e-t}));for(var h=0,d=l.length;h<d;h++)u.push(s[l[h]]);var f=new ArrayBuffer(4*l.length),p=new Uint8Array(f),_=0;for(d=l.length;_<d;_++){var m=u[_];p[4*_]=255*m.red,p[4*_+1]=255*m.green,p[4*_+2]=255*m.blue,p[4*_+3]=255*m.alpha}var g=new Float32Array(f),x=(c=new Float32Array(l)).length,v=_0x1c5342._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x1c5342.HEAPF32.set(c,v/Float32Array.BYTES_PER_ELEMENT);var y=_0x1c5342._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x1c5342.HEAPF32.set(g,y/Float32Array.BYTES_PER_ELEMENT);var $=_0x454bc5(r,n,o,a,v,y,x),b=new Uint8Array(_0x1c5342.HEAPU8.buffer,$,4*n);return _0xeadd26($),_0x1c5342._free(r),_0x1c5342._free(v),_0x1c5342._free(y),b}function _0x2af3cf(e,t,i,n){var r=p$1d.multiply(t,i,new p$1d),o=e.vertexAttributes[0],a=o.typedArray,s=new Float32Array(a.buffer,a.byteOffset,a.byteLength/4),l=o.componentsPerAttribute,u=e.verticesCount,c=new Float32Array(3*u),h=e.attrLocation;h.aRatio=Object.keys(h).length;for(var d=0;d<u;d++){var f=new o$1p(s[d*l],s[d*l+1],s[d*l+2]),p=new o$1p;p$1d.multiplyByPoint(r,f,p);var _=a$18.fromCartesian(p),m=e$2a.toDegrees(_.longitude),g=e$2a.toDegrees(_.latitude),x=_.height,v=(m-n.left)/n.width,y=(g-n.bottom)/n.length,$=(x-n.minHeight)/n.height;c[3*d]=v,c[3*d+1]=y,c[3*d+2]=$}e.vertexAttributes.push({index:h.aRatio,typedArray:c,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0x4c68d7(e,t,i){e._version=i.version,e._dataVersion=i.dataVersion,e._gl;var n=i.groupNode,r=i.geoPackage,o=i.matrials.material,a=e._context,s=e.materialManager;if(e$2b(s)||(s=e.materialManager=new _0x5b0881),e$2b(a._subTextureManager)||(a._subTextureManager=new _0x3fad8f),e.indexedDBSetting.isGeoTilesSave&&!e$2b(a._subTextureManager.indexedDBSchedulers[e.id])&&e$2b(e._layerScheduler._indexedDBScheduler)&&(a._subTextureManager.indexedDBSchedulers[e.id]=e._layerScheduler._indexedDBScheduler,a._subTextureManager.tablenames[e.id]=e._layerScheduler.tablename+"Texture"),e._layerScheduler._prepareLoaded||!t._prepareLoad)for(var l=0,u=o.length;l<u;l++){var c=o[l].material,h=c.id,d=s.create(h);d.createPBRParamter(c),d.ownerLayerName=e.name,d.ownerEntity=t;var f=c.ambient;e$2b(f)&&(d._ambientColor=new e$1U(f.r,f.g,f.b,f.a));var p=c.diffuse;e$2b(p)&&(d._diffuseColor=new e$1U(p.r,p.g,p.b,p.a));var _=c.specular;e$2b(_)&&(d._specularColor=new e$1U(_.r,_.g,_.b,_.a)),d._shininess=u$_(c.shininess,d._shininess),d._bTransparentSorting=u$_(c.transparentsorting,!1),d.id=h;for(var m=c.textureunitstates,g=0;g<m.length;g++){var x=m[g].textureunitstate,v=x.id;0===x.addressmode.u?q$19.REPEAT:q$19.CLAMP_TO_EDGE,0===x.addressmode.v?q$19.REPEAT:q$19.CLAMP_TO_EDGE;var y,$=i.texturePackage[v];if(e$2b($))e$2b(y=0===g?d.createTexture(a,e,t._isRootTile,t._rootName,v,$,i.rootBatchIdMap,i.ancestorMap):d.createBakeTexture(a,e,t._isRootTile,t._rootName,v,$,i.rootBatchIdMap,i.ancestorMap))&&(t._texturesByteLength+=y._sizeInBytes)}}var b=e._matModel,T=n.pageLods,C=!0;for(l=0;l<T.length;l++){var S=new _0x46a5cb;S._fileType=e._fileType;var w=T[l];if(""===w.childTile?S._isLeafNode=!0:C=!1,S._rangeMode=w.rangeMode,S._rangeDataList=w.childTile,S._rangeList=w.rangeList,-1===w.boundingSphere.radius&&(w.boundingSphere.radius=6378137),S._isLeafNode||(S._boundingSphere=new i$1c(w.boundingSphere.center,w.boundingSphere.radius),i$1c.transform(S._boundingSphere,e._matModel,S._boundingSphere)),e$2b(w._obb)){var E=o$1p.fromElements(w._obb.obbCenter.x,w._obb.obbCenter.y,w._obb.obbCenter.z);p$1d.multiplyByPoint(e._matModel,E,E);var P=e$29.fromElements(w._obb.xExtent.x,w._obb.xExtent.y,w._obb.xExtent.z,0),A=e$29.fromElements(w._obb.yExtent.x,w._obb.yExtent.y,w._obb.yExtent.z,0),L=e$29.fromElements(w._obb.zExtent.x,w._obb.zExtent.y,w._obb.zExtent.z,0);p$1d.multiplyByVector(e._matModel,P,P),p$1d.multiplyByVector(e._matModel,A,A),p$1d.multiplyByVector(e._matModel,L,L);var M=new p$1e(P.x,A.x,L.x,P.y,A.y,L.y,P.z,A.z,L.z);S._orientedBoundingBox=new y$Z(E,M)}var R=w.geodes,I=[];if(e._layerScheduler._prepareLoaded||!t._prepareLoad)for(var O=0;O<R.length;O++){var D,B=R[O],N=B.matrix;if(1===e._heightScale)D=p$1d.multiply(b,N,new p$1d);else{var F=p$1d.multiplyByScale(N,new o$1p(1,1,e._heightScale),new p$1d);D=p$1d.multiply(b,F,new p$1d)}N=p$1d.unpack(N);for(var U=B.skeletonNames,z=0;z<U.length;z++){var G=U[z],V=r[G],k=V.vertexPackage;if(_0x143c43(V,e)){var W;if(S._isLeafNode){var H=k.boundingSphere;e$2b(H)?(W=new i$1c(H.center,H.radius),i$1c.transform(W,D,W)):W=_0x58bcd6.calcBoundingSphere(e,k,D),I.push(W)}var q=_0x58bcd6.calcBoundingRectangle(e,k),j=V.arrIndexPackage,Y=V.pickInfo,X={};for(u=0;u<j.length&&u<1;u++){var K=j[u];if(e$2b(K)){h=K.materialCode;var Q=s.create(h);X[h]=Q}}var Z={context:e._context,vertexPackage:k,arrIndexPackage:j,edgeGeometry:V.edgeGeometry,pickInfo:Y,version:i.version,mapPass:X,layer:e,entity:t,matModel:D,boundingVolume:S._boundingSphere?S._boundingSphere:W,boundingRectangle:q,volObj:null,fileType:e._fileType,isS3MB:e._isS3MB,geoMatrix:N,dataType:e._dataType,level:e._level,geoName:G,isS3MBlock:!0};if(e$2b(e.themeStyle)){var J=_0x14f094.createRenderEntityPageLOD(Z,e);S._renderEntityList=S._renderEntityList.concat(J)}else{var ee=new _0x30a010(Z);if(e._imageryLayer instanceof Array){for(var te=[],ie=0;ie<e._imageryLayer.length;ie++){var ne=e._imageryLayer[ie];if(e$2b(ne)&&(ne instanceof h$Q||ne instanceof i$O)){var re=ne.getImagery(V.cartographicBounds);te=te.concat(re)}}te.length>0&&ee.setImagerys(te,V.cartographicBounds)}else{if(e$2b(e._imageryLayer)&&(e._imageryLayer instanceof h$Q||e._imageryLayer instanceof i$O))((te=e._imageryLayer.getImagery(V.cartographicBounds)).length>0||e._needCoverImageryLayer)&&ee.setImagerys(te,V.cartographicBounds)}S._renderEntityList.push(ee)}}}}S._isLeafNode&&(S._boundingSphere=i$1c.fromBoundingSpheres(I,new i$1c)),e$2b(t._pagelodMap[w.childTile])?(t._pagelodMap[w.childTile]._renderEntityList=S._renderEntityList,t._pagelodMap[w.childTile]._ready=!0):(t._childrenPageLod.push(S),e.LoadingPriority===_0x10659f.UsePagedLodInfo&&(S._ready=!0,t._childrenPageLod.shift(),S._isLeafNode=!0))}if(t._isLeafTile=C,!e$2b(t._boundingSphere)||t._isLeafTile){for(var oe=[],ae=t._childrenPageLod.length;ae--;)oe.push(t._childrenPageLod[ae]._boundingSphere);t._boundingSphere=i$1c.fromBoundingSpheres(oe),t._oriBoundingSphere=i$1c.clone(t._boundingSphere)}t._s3mLoadState=N$P.PARSED}function _0x3353d5(e,t,i){var n=e[i._fileName];if(e$2b(n)){i._blockKey=i._fileName,i._isAncestorBlock=!0,i._rootBatchIdMap=n.rootBatchIdMap,i._ancestorMap=n.ancestorMap,_0x4c68d7(t,i,n);for(var r=[i];r.length;)for(var o=r.pop(),a=o._childrenPageLod,s=0,l=a.length;s<l;s++){var u=a[s],c=u._rangeDataList;if(""!==c){var h=new _0x206cda;if(h.layer=o.layer,h._subdomainIndex=o._subdomainIndex+s+1,h._priority=o._priority-1,h._rootBatchIdMap=e$2b(n)?n.rootBatchIdMap:o._rootBatchIdMap,h._ancestorMap=e$2b(n)?n.ancestorMap:o._ancestorMap,h._rootName=o._rootName,c.indexOf("/")>-1){var d=c.lastIndexOf("/"),f=c.substring(0,d+1);h._fileName=c.substring(d+1),h._relativePath=new Uri(f).resolve(o._relativePath)}else h._relativePath=o._relativePath,h._fileName=c;h._boundingSphere=u._boundingSphere,h._originalBS=u._originalBS,h._orientedBoundingBox=u._orientedBoundingBox,u._entity=h,e$2b(n=e[h._fileName])?(h._blockKey=o._blockKey,h._isChildBlock=!0,_0x4c68d7(t,h,n),r.push(h)):(h._isAncestorBlock=!0,h._blockKey=h._fileName)}}}}function _0x5fb1bc(e){return function(){return e._disFromCamera}}function _0x2619e0(e){return e$2b(e.clampRegionEdge)&&e.clampRegionEdge}function _0x143c43(e,t){var i=e.vertexPackage;if(i.verticesCount<1)return!1;if(t._fileType===d$15.ClampGroundPolygon){var n=t.style3D.fillStyle;return n===fr$2.WireFrame?_0x2619e0(i):n!==fr$2.Fill||!_0x2619e0(i)}return!0}null!==_0x1c5342&&(_0x454bc5=_0x1c5342.cwrap("floatToTextureColor","number",["number","number","number","number","number","number","number"]),_0xeadd26=_0x1c5342.cwrap("free_result",null,["number"])),_0x1309b8.parseResult=function(e,t,i,n){t._version=e.version,t._dataVersion=e.dataVersion;var r=t._gl,o=e.groupNode,a=e.geoPackage,s=e.matrials.material,l={},u=[],c=t._context;t._RGBTOBGR;var h=i._fileName.split("_"),d=parseInt(h[1]),f=parseInt(h[2]);if(d=Math.pow(2,t._level)-d-1,t._layerScheduler._prepareLoaded||!i._prepareLoad){if(e$2b(t._imageryLayer))if(t._imageryLayer instanceof Array)for(var p=0;p<t._imageryLayer.length;p++)u.push(t._imageryLayer[p]._imageryProvider._readyPromise);else(t._imageryLayer instanceof h$Q||t._imageryLayer instanceof i$O)&&u.push(t._imageryLayer._imageryProvider._readyPromise);for(var _=0,m=s.length;_<m;_++){var g=s[_].material,x=g.id,v=!1;if(e$2b(t._materialMap)){var y=t._materialMap[x];e$2b(y)&&(g=y.material,v=!0)}var $=new _0x21d1b1({});$.isAssociateMaterial=v,i._tmpMaterialArr.push($),$.createPBRParamter(g),l[x]=$;var b=u$_(g.ambient,e$1U.WHITE);$._ambientColor=new e$1U(b.r,b.g,b.b,b.a);var T=u$_(g.diffuse,e$1U.WHITE);$._diffuseColor=new e$1U(T.r,T.g,T.b,T.a);var C=u$_(g.specular,e$1U.WHITE);$._specularColor=new e$1U(C.r,C.g,C.b,C.a),$._shininess=u$_(g.shininess,10),$._bTransparentSorting=u$_(g.transparentsorting,!1),$._alphaMode=g.alphaMode;var S=g.textureunitstates;0===S.length&&t._fileType===d$15.OSGBFile&&($._isInvalidOblique=!0);for(var w=0;w<S.length;w++){var E=S[w].textureunitstate,P=E.id,A=P.indexOf("PBRMaterialParam")>-1,L=$._baseColorTextureIndex===w,M=$._emissiveTextureIndex===w,R=$._normalTextureIndex===w,I=$._metallicRoughnessTextureIndex===w,O=$._occlusionTextureIndex===w;A&&($._usePBRTextureBatch=!0);var D=0===E.addressmode.u?q$19.REPEAT:q$19.CLAMP_TO_EDGE,B=0===E.addressmode.v?q$19.REPEAT:q$19.CLAMP_TO_EDGE;0===w&&($._texMatrix=p$1d.unpack(E.texmodmatrix));var N=e.texturePackage[P]||e.texturePackage[P+"\0"],F=P+t._id+t._context._id+i._relativePath.path+i._fileName;if(e$2b(N)&&(F+=N.imageBuffer.length),e$2b(N)&&N.width>0&&N.height>0&&N.imageBuffer.length>0){var U={isPBRMaterialParam:A,isEmissiveTex:M,isNormalTexture:R,isMetallicRoughnessTexture:I,isBaseColorTexture:L};switch(N.compressType){case _0x3dfacd.WEBP:$._RGBTOBGR=N.nFormat===_0x3dfacd.ABGR;var z=$.createWebp(F,P,c,w,N.imageBuffer,N.width,N.height,D,B,N.mipmapLevel,t.mipmapEnabled);u.push(z);break;case _0x3dfacd.CRN_DXT5:if(!e$2b(G=$.createCRN(F,P,c,w,N,D,B,!1,t.mipmapEnabled,U)))return void i.parsingResult;u.push(G);break;case _0x3dfacd.STANDARD_CRN:var G;if(!e$2b(G=$.createCRN(F,P,c,w,N,D,B,!0,t.mipmapEnabled)))return void i.parsingResult;u.push(G);break;case _0x3dfacd.KTX2:var V=$.createKTX2(F,P,c,w,N,D,B,t.mipmapEnabled);e$2b(V)&&u.push(V);break;default:var k=Se$d.CreateTexture(F,c,N.width,N.height,N.nFormat,N.compressType,N.imageBuffer,!1,D,B,t.mipmapEnabled,N.oriCompressType);A?$.pbrParamTexture=k:M?$.emissiveTexture=k:R?$.normalTexture=k:I?$.metallicRoughnessTexture=k:O?$.occlusionTexture=k:L?$.baseColorTexture=k:$._textures.push(k)}}else if(t._isTextureShare&&!e$2b(t._materialMap)){F=P+t._id+t._context._id,P.lastIndexOf("\\")>-1&&(P=f$O(P.replace(/\\/g,"/").replace("png","dxtz"))),P.lastIndexOf("/")>-1&&(P=f$O(P.replace("png","dxtz")));var W=t._baseUri+"Texture/"+P;e$2b(a$O.CREDENTIAL)&&(W=a$O.addToken(W));var H=$.requestSharedTexture(W,F,P,c,w,t.customRequestHeaders,D,B);if(e$2b(H)&&H instanceof _0x2dc616){k=H;L?$.baseColorTexture=k:M?$.emissiveTexture=k:R?$.normalTexture=k:I?$.metallicRoughnessTexture=k:O&&($.occlusionTexture=k),0==w&&$._textures.length>0?$._textures.splice(0,0,k):$._textures.push(k)}else e$2b(H)&&u.push(H)}if(e$2b(t._maps)&&t._maps.mapNames.length>0){var q=P.substring(0,P.indexOf("."))+"_"+i._fileName+"."+t._maps.mapExts[0],j=i._relativePath.path;i._relativePath.path=t._maps.mapNames[0]+"/"+i._relativePath.path;var Y=i._relativePath.resolve(t._baseUri)+q;i._relativePath.path=j,Y=Y.replace(/\+/g,"%2b");var X=o$1l.defer(),K=X.promise;u.push(K);var Q=o$10(Y,void 0);e$2b(Q)?function(e,t,i,n){e.then((function(e){if(e$2b(e)){var r=w$Q({uint8Array:e,format:"image/webp"});e$2b(r)?(o=t,a=i,s=n,r.then((function(e){if(e$2b(e)){var t=new t$V({context:c,source:e,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({wrapS:D,wrapT:B,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})});t.id=o+"map",a._mapTextures[o]=t,Se$d.textureManager.textures[t.id]=t,Se$d.textureManager.refCounts[t.id]=1}s.resolve(Y)}),(function(e){s.resolve()}))):n.resolve(),e=null}else n.resolve();var o,a,s}),(function(e){n.resolve()}))}(Q,F,$,X):X.resolve()}if("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt){var Z=x+"_"+i._fileName;Z=""!==t._volName?Z+"_"+t._volName:Z,"vol_texture_mapping"===t._strVolumeExt?Z+=".vol":Z+=".png";var J=i._relativePath.resolve(t._baseUri)+Z;if(0!==t.urlType){var ee=t._urlArguments,te=J.indexOf("datas")+5,ie=ee.layer3DName,ne=J.substring(J.indexOf("/path/")+6).split("/"),re=ee.scene3DName,oe=ne[0],ae=ne[1].substring(0,ne[1].indexOf(".")),se=ne[1].substring(ne[1].indexOf(".")+1,ne[1].length);J=J.substring(0,te)+"?layerName="+ie+"&rootTile="+oe+"&tile="+ae+"&suffix="+se+"&scene3DName="+re+"&layer3DName="+ie}var le=void 0;"vol_texture_mapping"===t._strVolumeExt?e$2b(le=o$10(J,void 0))&&function(e,n,r){e.then((function(e){var o;if(e$2b(e)){var a=void 0,s=new Uint8Array(e,8),l=nt$9.inflate(s).buffer;if(1===new Float64Array(l,0,1)[0]){var u=new Uint32Array(l,8,4),c=u[0],h=u[1];u[2];var d=u[3];a={nFormat:c,nWidth:h,nHeight:d,nPixelSize:d,imageArray:new Float32Array(l,24,nCount)}}if(e$2b(a)){var f,p=tt$h.LINEAR,_=rt$i.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(p=tt$h.NEAREST,_=rt$i.NEAREST),t._hypsometricSetting.filterMode===k$Q.FilterMode.LINEAR?f=_0x1b3561(a.imageArray,t._hypsometricSetting,!0):(f=null===_0x454bc5?_0x3880d7(a.imageArray,t._hypsometricSetting):_0x3da2dc(a.imageArray,t._hypsometricSetting),(o=new t$V({context:t._context,width:a.nWidth,height:a.nHeight,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({minificationFilter:p,magnificationFilter:_})})).copyForm({width:a.nWidth,height:a.nHeight,arrayBufferView:f}),i._volTexures[n]=o,r.texID2Vol=texureId),e=null}}}),(function(e){}))}(le,F,$):"png"===t._strVolumeExt&&(e$2b(le=t$T(J))&&(e$2b(le=t$T(J))&&function(e,n,r){e.then((function(e){var o;if(e$2b(e)){var a,s=tt$h.LINEAR,l=rt$i.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(s=tt$h.NEAREST,l=rt$i.NEAREST),a=t._hypsometricSetting.filterMode===k$Q.FilterMode.LINEAR?_0x1b3561(d$13(e),t._hypsometricSetting,!0):null==_0x454bc5?_0x351f4b(d$13(e),t._hypsometricSetting):_0x4a8014(d$13(e),t._hypsometricSetting),(o=new t$V({context:t._context,width:e.width,height:e.height,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({minificationFilter:s,magnificationFilter:l})})).copyFrom({width:e.width,height:e.height,arrayBufferView:a}),e=null,i._volTextures[n]=o,r.texID2Vol=n}}),(function(e){}))}(le,F,$)))}}}}o$1l.all(u,(function(){if(i._tmpMaterialArr.length=0,i._s3mLoadState!==N$P.UNLOAD){var n,s;if(e$2b(t._volData)){n=t._volData._volBounds;var u=t._context._id+"_"+t.id+"_layerVol",c=k$Q.FilterMode.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(c=k$Q.FilterMode.NEAREST),e$2b(t._hypsometricSetting)&&e$2b(t._volData._buffer)&&(c===k$Q.FilterMode.NEAREST?null===_0x454bc5?_0x351f4b(t._volData._buffer,t._hypsometricSetting):t._volData._buffer=_0x4a8014(t._volData._buffer,t._hypsometricSetting):_0x587082(t._volData._buffer,t._hypsometricSetting));var h={};h.nLength=t._volData._nLength,h.imageArray=t._volData._buffer;var p=Se$d.CreateVolumeTexture(u,r,t._context,h,c);delete t._volData._buffer,t._volData._buffer=void 0,s={volTexture:p,nFormat:3201,nSideBlockCount:t._volData._nSideBlockCount,nBlockLength:t._volData._nBlockLength,nLength:t._volData._nLength,nWidth:t._volData._width,nHeight:t._volData._height,nDepth:t._volData._depth,id:u,dataFloor:t._volData._minValue,dataCeil:t._volData._maxValue,volBounds:n},i._volObj=s}else if("vol"===t._strVolumeExt)if(e.volImageBuffer){n=e.volBounds;u=t._context._id+"_"+t.id+"_"+i._relativePath.resolve(t._baseUri)+"_"+i._fileName,c=k$Q.FilterMode.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(c=k$Q.FilterMode.NEAREST),3201===e.volImageBuffer.nFormat&&e$2b(t._hypsometricSetting)&&(c===k$Q.FilterMode.NEAREST?null===_0x454bc5?_0x351f4b(e.volImageBuffer.imageArray,t._hypsometricSetting):e.volImageBuffer.imageArray=_0x4a8014(e.volImageBuffer.imageArray,t._hypsometricSetting):_0x587082(e.volImageBuffer.imageArray,t._hypsometricSetting)),s={volTexture:p=Se$d.CreateVolumeTexture(u,r,t._context,e.volImageBuffer,c),nFormat:e.volImageBuffer.nFormat,nSideBlockCount:e.volImageBuffer.nSideBlockCount,nBlockLength:e.volImageBuffer.nBlockLength,nLength:e.volImageBuffer.nLength,nWidth:e.volImageBuffer.nWidth,nHeight:e.volImageBuffer.nHeight,nDepth:e.volImageBuffer.nDepth,id:u,dataFloor:t._fMinValue,dataCeil:t._fMaxValue,volBounds:n},delete e.volImageBuffer.imageArray,e.volImageBuffer.imageArray=null,e$2b(i._volObj)&&Se$d.DecRef(i._volObj.id),i._volObj=s}else t._bVolume&&(e$2b(s=i._volObj)&&(n=i._volObj.volBounds));for(var _=t._matModel,m=o.pageLods,g=!0,x=0;x<m.length;x++){var v=new _0x46a5cb;v._fileType=t._fileType;var y=m[x];if(""===y.childTile?v._isLeafNode=!0:g=!1,v._rangeMode=y.rangeMode,v._rangeDataList=y.childTile,v._rangeList=y.rangeList,-1===y.boundingSphere.radius&&(y.boundingSphere.radius=6378137),y.boundingSphere&&(t._dataVersion>2||!v._isLeafNode)&&(v._boundingSphere=new i$1c(y.boundingSphere.center,y.boundingSphere.radius),v._originalBS=new i$1c(y.boundingSphere.center,y.boundingSphere.radius),i$1c.transform(v._boundingSphere,t._matModel,v._boundingSphere)),e$2b(y._obb)){var $=o$1p.fromElements(y._obb.obbCenter.x,y._obb.obbCenter.y,y._obb.obbCenter.z),b=e$29.fromElements(y._obb.xExtent.x,y._obb.xExtent.y,y._obb.xExtent.z,0),T=e$29.fromElements(y._obb.yExtent.x,y._obb.yExtent.y,y._obb.yExtent.z,0),C=e$29.fromElements(y._obb.zExtent.x,y._obb.zExtent.y,y._obb.zExtent.z,0),S=new p$1e(b.x,T.x,C.x,b.y,T.y,C.y,b.z,T.z,C.z);v._orientedBoundingBox=new y$Z($,S),v._orientedBoundingBox._updateBBox(),v.min=v._orientedBoundingBox.bbox[0].clone(),v.max=v._orientedBoundingBox.bbox[0].clone();for(var w,E=1;E<8;E++)w=v._orientedBoundingBox.bbox[E],v.min.x>w.x&&(v.min.x=w.x),v.min.y>w.y&&(v.min.y=w.y),v.min.z>w.z&&(v.min.z=w.z),v.max.x<w.x&&(v.max.x=w.x),v.max.y<w.y&&(v.max.y=w.y),v.max.z<w.z&&(v.max.z=w.z);p$1d.multiplyByPoint(t._matModel,$,$),p$1d.multiplyByVector(t._matModel,b,b),p$1d.multiplyByVector(t._matModel,T,T),p$1d.multiplyByVector(t._matModel,C,C),S[0]=b.x,S[1]=b.y,S[2]=b.z,S[3]=T.x,S[4]=T.y,S[5]=T.z,S[6]=C.x,S[7]=C.y,S[8]=C.z,v._orientedBoundingBox.center=$,v._orientedBoundingBox.halfAxes=S,v._orientedBoundingBox.areaDirty=1}else if(e$2b(y.min)){var P=[];P.push(new o$1p(y.min.x,y.min.y,y.min.z)),P.push(new o$1p(y.min.x,y.min.y,y.max.z)),P.push(new o$1p(y.min.x,y.max.y,y.min.z)),P.push(new o$1p(y.min.x,y.max.y,y.max.z)),P.push(new o$1p(y.max.x,y.min.y,y.min.z)),P.push(new o$1p(y.max.x,y.min.y,y.max.z)),P.push(new o$1p(y.max.x,y.max.y,y.min.z)),P.push(new o$1p(y.max.x,y.max.y,y.max.z)),v.obbMin=y.min,v.obbMax=y.max;for(var A=0;A<8;A++)P[A]=p$1d.multiplyByPoint(t._matModel,P[A],P[A]);v._orientedBoundingBox=y$Z.fromPoints(P,v._orientedBoundingBox)}var L=y.geodes,M=[],R=[];if(t._layerScheduler._prepareLoaded||!i._prepareLoad)for(var I=0;I<L.length;I++){var O,D=L[I],B=D.matrix;if(1===t._heightScale)O=p$1d.multiply(_,B,new p$1d);else{var N=p$1d.multiplyByScale(B,new o$1p(1,1,t._heightScale),new p$1d);O=p$1d.multiply(_,N,new p$1d)}B=p$1d.unpack(B);for(var F=D.skeletonNames,U=0;U<F.length;U++){var z=F[U],G=a[z],V=G.vertexPackage;if(_0x143c43(G,t)){var k,W;if(v._isLeafNode&&!e$2b(v._boundingSphere)){var H=V.boundingSphere;e$2b(H)?(W=new i$1c(H.center,H.radius),k=i$1c.transform(W,O,new i$1c),W=i$1c.transform(W,B,W)):(k=_0x58bcd6.calcBoundingSphere(t,V,O),W=i$1c.transform(k,p$1d.inverse(O,new p$1d),new i$1c),i$1c.transform(W,B,W)),M.push(k),R.push(W)}for(var q=_0x58bcd6.calcBoundingRectangle(t,V),j=G.arrIndexPackage,Y=G.pickInfo,X={},K=0;K<j.length;K++){var Q=j[K];if(e$2b(Q)){var Z=Q.materialCode;if(e$2b(Z)){var J=new _0x21d1b1({});Z=Z.replace(/\0/,"");var ee=l[Z];e$2b(ee)&&ee.clone(J),X[Z]=J;for(let e=0;e<J._textures.length;e++){let t=J._textures[e];i._texturesByteLength+=t.sizeInBytes,e$2b(J.normalTexture)&&(i._texturesByteLength+=J.normalTexture._sizeInBytes),e$2b(J.baseColorTexture)&&(i._texturesByteLength+=J.baseColorTexture._sizeInBytes),e$2b(J.emissiveTexture)&&(i._texturesByteLength+=J.emissiveTexture._sizeInBytes),e$2b(J.metallicRoughnessTexture)&&(i._texturesByteLength+=J.metallicRoughnessTexture._sizeInBytes),e$2b(J.occlusionTexture)&&(i._texturesByteLength+=J.occlusionTexture._sizeInBytes)}}}}s&&(_0x2af3cf(V,t._oriMatModel,B,n),Se$d.AddRef(i._fileName));var te=u$_(y$Z.clone(v._orientedBoundingBox),i$1c.clone(v._boundingSphere));te=u$_(te,k);var ie={context:t._context,vertexPackage:V,arrIndexPackage:j,edgeGeometry:G.edgeGeometry,pickInfo:Y,version:e.version,mapPass:X,layer:t,entity:i,matModel:O,boundingVolume:te,boundingRectangle:q,volObj:s,volTexture:p,fileType:t._fileType,isS3MB:t._isS3MB,geoMatrix:B,dataType:t._dataType,level:t._level,row:d,col:f,geoName:z};if(t._fileType===d$15.PointCloudFile){var ne=z.split("#");if(ne.length>0&&"SupermapPointCloud"===ne[0]){for(var re={},oe=1;oe<ne.length;oe++){var ae=ne[oe].split("%");if(2===ae.length){var se=ae[0],le=ae[1].split("_");if(2===le.length){var ue=le[0],ce=le[1];re[se]={start:parseInt(ue),end:parseInt(ce)}}}}ie.ptIndexGroup=re}else if(z.lastIndexOf("_")>-1){var he=z.substring(0,z.lastIndexOf("_"));ie.groupName=he}}if(e$2b(t.themeStyle)&&e$2b(t.themeStyle._image)){var de=_0x14f094.createRenderEntityPageLOD(ie,t);v._renderEntityList=v._renderEntityList.concat(de)}else if(V.vertexAttributes.length>0){var fe=new _0x30a010(ie);if(t._imageryLayer instanceof Array){for(var pe=[],_e=0;_e<t._imageryLayer.length;_e++){var me=t._imageryLayer[_e];if(e$2b(me)&&(me instanceof h$Q||me instanceof i$O)){var ge=me.getImagery(G.cartographicBounds);pe=pe.concat(ge)}}pe.length>0&&fe.setImagerys(pe,G.cartographicBounds)}else{if(e$2b(t._imageryLayer)&&(t._imageryLayer instanceof h$Q||t._imageryLayer instanceof i$O))((pe=t._imageryLayer.getImagery(G.cartographicBounds)).length>0||t._needCoverImageryLayer)&&fe.setImagerys(pe,G.cartographicBounds)}v._renderEntityList.push(fe)}}}}if(v._isLeafNode&&!e$2b(v._boundingSphere)&&(v._boundingSphere=i$1c.fromBoundingSpheres(M,new i$1c),v._originalBS=i$1c.fromBoundingSpheres(R,new i$1c)),t.LoadingPriority===_0x10659f.UsePagedLodInfo){var xe=i._fileName;0===xe.indexOf("./")&&(xe=xe.substring(2));_e=xe.lastIndexOf("/");var ve=y.childTile;_e>0&&""!=ve&&(ve=xe.substring(0,_e+1)+ve),e$2b(i._pagelodMap[ve])?i._pagelodMap[ve]._renderEntityList=v._renderEntityList:(i._leafChildren.push(v),v._isLeafNode=!0)}else i._childrenPageLod.push(v)}if(i._isLeafTile=g,!e$2b(i._boundingSphere)||i._isLeafTile||i._hasLeafChild){for(var ye=[],$e=i._childrenPageLod.length;$e--;)ye.push(i._childrenPageLod[$e]._boundingSphere);for(var be=i._leafChildren.length;be--;)ye.push(i._leafChildren[be]._boundingSphere);i._boundingSphere=i$1c.fromBoundingSpheres(ye),i._oriBoundingSphere=i$1c.clone(i._boundingSphere)}for(var Te in l)if(l.hasOwnProperty(Te)){var Ce=l[Te];if(!e$2b(Ce))continue;Ce.destroy(),l[Te]=null}i._s3mLoadState=N$P.PARSED}}))},_0x1309b8.parseResultInstance=function(e,t){var i=t.instancePackage,n=t.skeletonPackages;e._version=i.version,e._gl;var r={},o=e._context,a=i.groupNode;for(C=0;C<n.length;C++){var s=(H=n.values[C]).matrials.material;for(F=0;F<s.length;F++){var l=s[F].material,u=l.id;(Se=new _0x21d1b1({})).createPBRParamter(l),r[u]=Se;var c=l.ambient;e$2b(c)&&(Se._ambientColor=new e$1U(c.r,c.g,c.b,c.a));var h=l.diffuse;e$2b(h)&&(Se._diffuseColor=new e$1U(h.r,h.g,h.b,h.a));var d=l.specular;e$2b(d)&&(Se._specularColor=new e$1U(d.r,d.g,d.b,d.a)),Se._shininess=u$_(l.shininess,Se._shininess),Se._bTransparentSorting=u$_(l.transparentsorting,Se._bTransparentSorting);var f=l.textureunitstates;for(Y=0;Y<f.length;Y++){var p=f[Y].textureunitstate,_=p.id,m=0===p.addressmode.u?q$19.REPEAT:q$19.CLAMP_TO_EDGE,g=0===p.addressmode.v?q$19.REPEAT:q$19.CLAMP_TO_EDGE;Se._texMatrix=p$1d.unpack(p.texmodmatrix);var x=H.texturePackage[_],v=_+e._id+e._context._id;if(e$2b(x)&&x.width>0&&x.height>0&&x.imageBuffer.length>0){0===x.compressType&&(e._supportCompressType=0);var y=Se$d.CreateTexture(v,o,x.width,x.height,x.nFormat,x.compressType,x.imageBuffer,!1,m,g);Se._textures.push(y)}}}}for(var $=e._matModel,b=a.pageLods,T=!0,C=0;C<b.length;C++){var S=new _0x46a5cb;S._fileType=e._fileType;var w=b[C];if(""===w.childTile?S._isLeafNode=!0:T=!1,S._rangeMode=w.rangeMode,S._rangeDataList=w.childTile,S._rangeList=w.rangeList,-1===w.boundingSphere.radius&&(w.boundingSphere.radius=6378137),w.boundingSphere&&(S._boundingSphere=new i$1c(w.boundingSphere.center,w.boundingSphere.radius),S._originalBS=new i$1c(w.boundingSphere.center,w.boundingSphere.radius),i$1c.transform(S._boundingSphere,e._matModel,S._boundingSphere)),e$2b(w._obb)){var E=o$1p.fromElements(w._obb.obbCenter.x,w._obb.obbCenter.y,w._obb.obbCenter.z),P=e$29.fromElements(w._obb.xExtent.x,w._obb.xExtent.y,w._obb.xExtent.z,0),A=e$29.fromElements(w._obb.yExtent.x,w._obb.yExtent.y,w._obb.yExtent.z,0),L=e$29.fromElements(w._obb.zExtent.x,w._obb.zExtent.y,w._obb.zExtent.z,0),M=new p$1e(P.x,A.x,L.x,P.y,A.y,L.y,P.z,A.z,L.z);if(o$1p.equals(o$1p.ZERO,P)||o$1p.equals(o$1p.ZERO,A)||o$1p.equals(o$1p.ZERO,L))S._orientedBoundingBox=void 0;else{S._orientedBoundingBox=new y$Z(E,M),S._orientedBoundingBox._updateBBox(),S.min=S._orientedBoundingBox.bbox[0].clone(),S.max=S._orientedBoundingBox.bbox[0].clone();for(var R,I=1;I<8;I++)R=S._orientedBoundingBox.bbox[I],S.min.x>R.x&&(S.min.x=R.x),S.min.y>R.y&&(S.min.y=R.y),S.min.z>R.z&&(S.min.z=R.z),S.max.x<R.x&&(S.max.x=R.x),S.max.y<R.y&&(S.max.y=R.y),S.max.z<R.z&&(S.max.z=R.z);p$1d.multiplyByPoint(e._matModel,E,E),p$1d.multiplyByVector(e._matModel,P,P),p$1d.multiplyByVector(e._matModel,A,A),p$1d.multiplyByVector(e._matModel,L,L),M[0]=P.x,M[1]=P.y,M[2]=P.z,M[3]=A.x,M[4]=A.y,M[5]=A.z,M[6]=L.x,M[7]=L.y,M[8]=L.z,S._orientedBoundingBox.center=E,S._orientedBoundingBox.halfAxes=M,S._orientedBoundingBox.areaDirty=1}}else if(e$2b(w.min)){var O=[];O.push(new o$1p(w.min.x,w.min.y,w.min.z)),O.push(new o$1p(w.min.x,w.min.y,w.max.z)),O.push(new o$1p(w.min.x,w.max.y,w.min.z)),O.push(new o$1p(w.min.x,w.max.y,w.max.z)),O.push(new o$1p(w.max.x,w.min.y,w.min.z)),O.push(new o$1p(w.max.x,w.min.y,w.max.z)),O.push(new o$1p(w.max.x,w.max.y,w.min.z)),O.push(new o$1p(w.max.x,w.max.y,w.max.z)),S.obbMin=w.min,S.obbMax=w.max;for(var D=0;D<8;D++)O[D]=p$1d.multiplyByPoint(e._matModel,O[D],O[D]);S._orientedBoundingBox=y$Z.fromPoints(O,S._orientedBoundingBox)}S._isLeafNode||(S._boundingSphere=new i$1c(w.boundingSphere.center,w.boundingSphere.radius),i$1c.transform(S._boundingSphere,e._matModel,S._boundingSphere));for(var B=w.geodes,N=[],F=0;F<B.length;F++){var U,z=B[F],G=z.matrix;if(1===e._heightScale)U=p$1d.multiply($,G,new p$1d);else{var V=p$1d.multiplyByScale(G,new o$1p(1,1,e._heightScale),new p$1d);U=p$1d.multiply($,V,new p$1d)}G=p$1d.unpack(G);for(var k=z.skeletonNames,W=0;W<k.length;W++){var H,q=k[W],j=q;if((Me=q.indexOf("#"))>-1&&(j=q.substring(0,Me)),e$2b(H=n.get(j))){var Y,X,K=[],Q={};for(Y=0;Y<H.groupNode.pageLods.length;Y++){var Z=H.groupNode.pageLods[Y].geodes;for(X=0;X<Z.length;X++)for(var J=Z[X],ee=p$1d.unpack(J.matrix,0,new p$1d),te=0;te<J.skeletonNames.length;te++){var ie=J.skeletonNames[te];Q[ie]=ee,K.push(ie)}}for(Y=0;Y<K.length;Y++){var ne=K[Y],re=Q[ne],oe=H.geoPackage[ne];if(e$2b(oe)){var ae=i.geoPackage[q],se=l$1g(ae.pickInfo),le=e$2b(oe.pickInfo)?Object.keys(oe.pickInfo):[],ue=le.length;for(var ce in se)se.hasOwnProperty(ce)&&(se[ce].skeletonIds=le);var he=ae.vertexPackage,de=oe.vertexPackage,fe={},pe=[],_e=de.vertexAttributes.length;for(X=0;X<de.vertexAttributes.length;X++){var me=p$19({},ge=de.vertexAttributes[X]);pe.push(me)}for(X=0;X<he.vertexAttributes.length;X++){var ge;if((ge=he.vertexAttributes[X]).instanceDivisor>0)(me=p$19({},ge)).index=_e++,pe.push(me)}for(var xe in _e=de.vertexAttributes.length,delete he.attrLocation.aColor,fe=p$19({},de.attrLocation),he.attrLocation)fe[xe]=he.attrLocation[xe]+_e;var ve,ye={attrLocation:fe,minVerticesValue:de.minVerticesValue,nCompressOptions:de.nCompressOptions,vertCompressConstant:de.vertCompressConstant,vertexAttributes:pe,vertexColor:de.vertexColor,verticesCount:de.verticesCount,skeletonCount:ue};if(ye.instanceIndex=he.instanceIndex,ye.instanceCount=he.instanceCount,ye.instanceMode=he.instanceMode,ye.instanceBuffer=he.instanceBuffer,ye.instanceBounds=he.instanceBounds,delete he.attrLocation.aColor,S._isLeafNode&&!e$2b(S._boundingSphere)){var $e=ye.boundingSphere;e$2b($e)?(ve=new i$1c($e.center,$e.radius),i$1c.transform(ve,U,ve)):ve=_0x58bcd6.calcBoundingSphere(e,ye,U),N.push(ve),_0x58bcd6.calcBoundingRectangle(e,ye)}var be=u$_(e$2b(S._orientedBoundingBox)?y$Z.clone(S._orientedBoundingBox):void 0,i$1c.clone(S._boundingSphere));be=u$_(be,ve);var Te=oe.arrIndexPackage,Ce={},Se=r[u=Te[0].materialCode],we=new _0x21d1b1({});e$2b(Se)&&Se.clone(we),Ce[u]=we;var Ee={context:e._context,version:i.version,vertexPackage:ye,arrIndexPackage:Te,pickInfo:se,mapPass:Ce,layer:e,entity:t,matModel:U,boundingVolume:be,fileType:e._fileType,isS3MB:e._isS3MB,geoMatrix:G,instanceSkeletonMatrix:re,dataType:e._dataType,instanceSkeletonManager:e.instanceSkeletonManager,geoName:ne,skeletonUrl:j};if(e$2b(e.themeStyle)){var Pe=_0x14f094.createRenderEntityPageLOD(Ee,e);S._renderEntityList=S._renderEntityList.concat(Pe)}else{var Ae=new _0x30a010(Ee);if(e._imageryLayer instanceof Array){for(var Le=[],Me=0;Me<e._imageryLayer.length;Me++){var Re=e._imageryLayer[Me];if(e$2b(Re)&&(Re instanceof h$Q||Re instanceof i$O)){var Ie=Re.getImagery(oe.cartographicBounds);Le=Le.concat(Ie)}}Le.length>0&&Ae.setImagerys(Le,oe.cartographicBounds)}else{if(e$2b(e._imageryLayer)&&(e._imageryLayer instanceof h$Q||e._imageryLayer instanceof i$O))((Le=e._imageryLayer.getImagery(oe.cartographicBounds)).length>0||e._needCoverImageryLayer)&&Ae.setImagerys(Le,oe.cartographicBounds)}S._renderEntityList.push(Ae)}}}}}}if(S._isLeafNode&&!e$2b(S._boundingSphere)){S._boundingSphere=i$1c.fromBoundingSpheres(N,new i$1c);for(var Oe=0;Oe<S._renderEntityList.length;Oe++)S._renderEntityList[Oe]._boundingVolume=S._boundingSphere}t._childrenPageLod.push(S)}if(t._isLeafTile=T,!e$2b(t._boundingSphere)||t._isLeafTile){for(var De=[],Be=t._childrenPageLod.length;Be--;)De.push(t._childrenPageLod[Be]._boundingSphere);t._boundingSphere=i$1c.fromBoundingSpheres(De)}if(!o$1p.equals(e._boundingSphereOffset,o$1p.ZERO)){var Ne=Math.max(Math.abs(e._boundingSphereOffset.x),Math.abs(e._boundingSphereOffset.y),Math.abs(e._boundingSphereOffset.z));t.extendRadius(Ne)}for(var Fe in r)if(r.hasOwnProperty(Fe)){var Ue=r[Fe];if(!e$2b(Ue))continue;Ue.destroy(),r[Fe]=null}t._s3mLoadState=N$P.PARSED,t.instancePackage=void 0,t.skeletonPackages=void 0,t.skeletonState=void 0},_0x1309b8.parseChildGroup=_0x3353d5,_0x1309b8.binaryDataParser=function(e,t,i,n){if(t._s3mLoadState===N$P.UNLOAD)return t.s3mBuffer=null,t.volBuffer=null,void(t.task=void 0);var r;(e._computeHeight||e._needCoverImageryLayer)&&(r=e._fileType!==d$15.OSGBFile&&e._fileType!==d$15.OSGBCacheFile||e$2b(e.waterEffectSet)?void 0:p$1d.pack(e._matModel,new Array(16)));var o,a=e._frameState.mode===C$13.SCENE3D&&e._fileType!=d$15.ClampGroundRealtimeRasterCache&&e._fileType!=d$15.PolylineEffect;if(6378137!==t$13.WGS84.radii.z&&"Ellipsoid_WGS84"!==e._globeType&&a&&!e$2b(e._animationInfo.duration)){var s=new t$13(6378137,6378137,6378137),l=o$1p.fromDegrees(e.lon,e.lat,e.height+e.style3D.bottomAltitude,s);o={sphereMatrix:m$17.eastNorthUpToFixedFrame(l,s),ellipsoidMatrix:e._matModel}}var u={buffer:i,isS3MZ:e._isS3MZ,fileType:e._fileType,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,isJsonScp:e._isJsonScp,isRoot:t._isRootTile,rootBatchIdMap:t._rootBatchIdMap,ancestorMap:t._ancestorMap,isS3MBlock:e._isS3MBlock,modelMatrix:r,materialType:e._materialType,isOSGB:e._isOSGB,isCoverImageryLayer:e._needCoverImageryLayer,fileName:t._fileName,transformPar:o,ellipsoid:6378137!==t$13.WGS84.radii.z&&"Ellipsoid_WGS84"===e._globeType},c=[i];if(e$2b(n)&&(u.bVolume=!0,u.volbuffer=n,c.push(n)),_0x46a73d.init||_0x46a73d.initWebAssembly(),_0x46a73d.taskProcessorReady){e$2b(t.task)||(t.task={data:u,transferableObjects:e._isS3MBlock?void 0:c,priority:t._disFromCamera,state:0,priorityFunction:_0x5fb1bc(t),processorName:"S3MBTilesParser"});var h=_0x46a73d.startTask(t.task);!e$2b(h)||(t._s3mLoadState=N$P.PARSING,e._layerScheduler._statistics.numberOfProcessingAttempted=0,e._layerScheduler._statistics.numberOfTilesProcessing++,h.then((function(i){if(t.s3mBuffer=null,t.volBuffer=null,t.task=void 0,t._s3mLoadState!==N$P.UNLOAD){if(e$2b(window.Proxy)){var r=t._relativePath.toString()+t._fileName;if((!0===e._indexedDBSetting.isGeoTilesSave||e._indexedDBSetting.isGeoTilesRootNodeSave&&e._layerScheduler._isRootNode(r))&&e$2b(e._layerScheduler._indexedDBScheduler)){if(e$2b(e._layerScheduler._indexedDBScheduler.cachestatus)&&e$2b(e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename])&&(1===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]||2===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]))return;var o={blob:i,key:r,tablename:e._layerScheduler.tablename,dbname:e._layerScheduler._indexedDBScheduler.dbname,reserveCount:e._localCacheMemoryReserveCount};_0x46a73d.indexTaskProcessor.scheduleTask(o,[])}e.offlineDownload&&e$2b(e._layerScheduler._indexedDBScheduler)&&(sumEntity++,e._layerScheduler._indexedDBScheduler.putElementInDB(e._layerScheduler.tablename,r,i).then((function(){savedEntity++,sumEntity===savedEntity&&console.log("complete")})).otherwise((function(e){})))}e._layerScheduler._statistics.numberOfTilesProcessing--,null==i&&(t._s3mLoadState,N$P.UNLOAD),"InstanceModel"===e._dataType?(t.skeletonState=_0x212e1c.STATE.SkeletonParsing,t.instancePackage=i):e._isS3MBlock?_0x3353d5(i,e,t):_0x1309b8.parseResult(i,e,t,n)}})).otherwise((function(i){if(e._layerScheduler._statistics.numberOfTilesProcessing--,t.task=void 0,t._s3mLoadState==N$P.UNLOAD)return t.s3mBuffer=null,void(t.volBuffer=null);e$2b(i)?(t.s3mBuffer=null,t.volBuffer=null,t._s3mLoadState=N$P.FAILED,console.log(i)):t._s3mLoadState=N$P.LOADED})))}},_0x1309b8.saveLocalCache=function(e,t){var i={tablename:e,dbname:t};_0x46a73d.indexTaskProcessor.scheduleTask(i,[])};var _0x285a40=(_0xab0760=!0,function(e,t){var i=_0xab0760?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xab0760=!1,i}),_0x3e116f=_0x285a40(void 0,(function(){return _0x3e116f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e116f).search("(((.+)+)+)+$")})),_0xab0760;_0x3e116f();var _0x2ee409={REST:0,KEY_VALUE:1},Tr$3=Object.freeze(_0x2ee409);if(typeof WebAssembly<"u"&&"object"!=typeof window){let e=function(e){return t$G.locateFile?t$G.locateFile(e,x$T):x$T+e},t=function(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1)},i=function(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return l$T[e>>0];case"i16":return A$U[e>>1];case"i32":case"i64":return E$Q[e>>2];case"float":return ue$u[e>>2];case"double":return le$u[e>>3];default:Z("invalid type for getValue: "+t)}return null},n=function(e,t){e||Z("Assertion failed: "+t)},r=function(e){var t=t$G["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=$$O(i),c(e,t,i)}return t},array:function(e){var t=$$O(e.length);return h(e,t),t}};var u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p<o.length;p++){var _=s[i[p]];_?(0===f&&(f=Te$j()),d[p]=_(o[p])):d[p]=o[p]}var m=u.apply(null,d);return m=function(e){return"string"===t?l(e):"boolean"===t?Boolean(e):e}(m),0!==f&&Ge$c(f),m},a=function(e,t,i,n){return function(){return o(e,t,i,arguments)}},s=function(e,i,n){for(var r=i+n,o=i;e[o]&&!(o>=r);)++o;if(o-i>16&&e.subarray&&De$l)return De$l.decode(e.subarray(i,o));for(var a="";i<o;){var s=e[i++];if(128&s){var l=63&e[i++];if(192!=(224&s)){var u=63&e[i++];if(224==(240&s)?s=(15&s)<<12|l<<6|u:(240!=(248&s)&&t("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),s=(7&s)<<18|l<<12|u<<6|63&e[i++]),s<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(b$_,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343)l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s);if(l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,b$_,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),l$T.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return t$G.extraStackTrace&&(e+="\n"+t$G.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){t$G.HEAP8=l$T=new Int8Array(w$L),t$G.HEAP16=A$U=new Int16Array(w$L),t$G.HEAP32=E$Q=new Int32Array(w$L),t$G.HEAPU8=b$_=new Uint8Array(w$L),t$G.HEAPU16=new Uint16Array(w$L),t$G.HEAPU32=I$Z=new Uint32Array(w$L),t$G.HEAPF32=ue$u=new Float32Array(w$L),t$G.HEAPF64=le$u=new Float64Array(w$L)},g=function(){n(0==(3&U$L)),I$Z[(U$L>>2)-1]=34821223,I$Z[(U$L>>2)-2]=2310721022},x=function(){(34821223!=I$Z[(U$L>>2)-1]||2310721022!=I$Z[(U$L>>2)-2])&&Z("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+I$Z[(U$L>>2)-2].toString(16)+" "+I$Z[(U$L>>2)-1].toString(16)),1668509029!==E$Q[0]&&Z("Runtime error: The application has corrupted its heap memory area (address zero)!")},v=function(e){Z("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(U$L-Te$j()+e)+" bytes available!")},y=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?t$G.dynCall_v(i):t$G.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},$=function(){if(t$G.preRun)for("function"==typeof t$G.preRun&&(t$G.preRun=[t$G.preRun]);t$G.preRun.length;)S(t$G.preRun.shift());y(Le$n)},b=function(){x(),!h$O&&(h$O=!0,y(Qe$a))},T=function(){x(),y(Pe$h)},C=function(){if(x(),t$G.postRun)for("function"==typeof t$G.postRun&&(t$G.postRun=[t$G.postRun]);t$G.postRun.length;)w(t$G.postRun.shift());y(je$c)},S=function(e){Le$n.unshift(e)},w=function(e){je$c.unshift(e)},E=function(e){k$L++,t$G.monitorRunDependencies&&t$G.monitorRunDependencies(k$L),e&&(n(!P$M[e]),P$M[e]=1,null===C$R&&typeof setInterval<"u"&&(C$R=setInterval((function(){if(ee$t)return clearInterval(C$R),void(C$R=null)}),1e4)))},P=function(e){if(k$L--,t$G.monitorRunDependencies&&t$G.monitorRunDependencies(k$L),e?(n(P$M[e]),delete P$M[e]):v$D("warning: run dependency removed without ID"),0==k$L&&(null!==C$R&&(clearInterval(C$R),C$R=null),Y$C)){var t=Y$C;Y$C=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(Be$h):0===e.indexOf(Be$h)},L=function(){try{if(t$G.wasmBinary)return new Uint8Array(t$G.wasmBinary);if(t$G.readBinary)return t$G.readBinary(D$O);throw"both async and sync fetching of the wasm failed"}catch(e){Z(e)}},M=function(){return t$G.wasmBinary||!W$P&&!N$G||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(D$O,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+D$O+"'";return e.arrayBuffer()})).catch((function(){return L()}))},R=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Xt$3};function i(e,t){var i=e.exports;t$G.asm=i,P("wasm-instantiate")}E("wasm-instantiate");var r=t$G;function o(e){n(t$G===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(t$G.instantiateWasm)try{return t$G.instantiateWasm(t,i)}catch{return!1}return function(){if(t$G.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(D$O)||"function"!=typeof fetch)return a(o);fetch(D$O,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},I=function(){},O=function(e,t){p$P.varargs=t;try{p$P.getStreamFromFD(),p$P.get(),p$P.get(),p$P.get(),p$P.get();return Z("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$N>"u"||!(e instanceof y$N.ErrnoError))&&Z(e),-e.errno}},D=function(){var e=t$G._fflush;e&&e(0);var t=p$P.buffers;t[1].length&&p$P.printChar(1,10),t[2].length&&p$P.printChar(2,10)},B=function(e,t){p$P.varargs=t;try{for(var i=p$P.get(),n=p$P.get(),r=p$P.get(),o=0,a=0;a<r;a++){for(var s=E$Q[n+8*a>>2],l=E$Q[n+(8*a+4)>>2],u=0;u<l;u++)p$P.printChar(i,b$_[s+u]);o+=l}return o}catch(e){return(typeof y$N>"u"||!(e instanceof y$N.ErrnoError))&&Z(e),-e.errno}},N=function(e,t){p$P.varargs=t;try{return 0}catch(e){return(typeof y$N>"u"||!(e instanceof y$N.ErrnoError))&&Z(e),-e.errno}},F=function(e,t){p$P.varargs=t;try{p$P.getStreamFromFD();return Z("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$N>"u"||!(e instanceof y$N.ErrnoError))&&Z(e),-e.errno}},U=function(){},z=function(){return l$T.length},G=function(e,t,i){b$_.set(b$_.subarray(t,t+i),e)},V=function(e){return t$G.___errno_location?E$Q[t$G.___errno_location()>>2]=e:v$D("failed to set errno from JS"),e},k=function(e){Z("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+l$T.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},W=function(e){e=_(e,65536);var t=w$L.byteLength;try{return-1!==z$L.grow((e-t)/65536)&&(w$L=z$L.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},H=function(e){var i=z();n(e>i);var r=65536,o=2147418112;if(e>o)return v$D("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+o+" bytes!"),!1;for(var a=Math.max(i,16777216);a<e;)(a=a<=536870912?_(2*a,r):Math.min(_((3*a+2147483648)/4,r),o))===i&&t("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+l$T.length);return W(a)?(m(),!0):(v$D("Failed to grow the heap from "+i+" bytes to "+a+" bytes, not enough memory!"),!1)},q=function(e){v$D("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),v$D("Build with ASSERTIONS=2 for more info."),Z(e)},j=function(e){v$D("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),v$D("Build with ASSERTIONS=2 for more info."),Z(e)},Y=function(e){v$D("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),v$D("Build with ASSERTIONS=2 for more info."),Z(e)},X=function(e){v$D("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),v$D("Build with ASSERTIONS=2 for more info."),Z(e)},K=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},Q=function(e){function t(){t$G.calledRun||(t$G.calledRun=!0,!ee$t&&(b(),T(),t$G.onRuntimeInitialized&&t$G.onRuntimeInitialized(),n(!t$G._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),C()))}e=e||t$G.arguments,k$L>0||(g(),$(),k$L>0)||t$G.calledRun||(t$G.setStatus?(t$G.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t$G.setStatus("")}),1),t()}),1)):t(),x())},Z=function(e){t$G.onAbort&&t$G.onAbort(e),ee$t=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw qe$b&&qe$b.forEach((function(i){t=i(t,e)})),t};var t$G=typeof t$G<"u"?t$G:{},q$S={},S$I;for(S$I in t$G)t$G.hasOwnProperty(S$I)&&(q$S[S$I]=t$G[S$I]);t$G.arguments=[],t$G.thisProgram="./this.program",t$G.quit=function(e,t){throw t},t$G.preRun=[],t$G.postRun=[];var W$P=!1,N$G=!1,ie$y=!1,Oe$i=!1,xe$l=!1;if(W$P="object"==typeof window,N$G="function"==typeof importScripts,Oe$i="object"==typeof process&&"function"==typeof require,ie$y=Oe$i&&!W$P&&!N$G,xe$l=!W$P&&!ie$y&&!N$G,t$G.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var x$T="",oe$r,se$s;if(ie$y)x$T=__dirname+"/",t$G.read=function(e,t){var i;return oe$r||(oe$r=require("fs")),se$s||(se$s=require("path")),e=se$s.normalize(e),i=oe$r.readFileSync(e),t?i:i.toString()},t$G.readBinary=function(e){var t=t$G.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(t$G.thisProgram=process.argv[1].replace(/\\/g,"/")),t$G.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=t$G),process.on("uncaughtException",(function(e){if(!(e instanceof K))throw e})),process.on("unhandledRejection",Z),t$G.quit=function(e){process.exit(e)},t$G.inspect=function(){return"[Emscripten Module object]"};else if(xe$l)typeof read<"u"&&(t$G.read=function(e){return read(e)}),t$G.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?t$G.arguments=scriptArgs:typeof arguments<"u"&&(t$G.arguments=arguments),"function"==typeof quit&&(t$G.quit=function(e){quit(e)});else{if(!W$P&&!N$G)throw new Error("environment detection error");N$G?x$T=self.location.href:document.currentScript&&(x$T=document.currentScript.src),x$T=0!==x$T.indexOf("blob:")?x$T.substr(0,x$T.indexOf("/Workers")+1):"",t$G.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},N$G&&(t$G.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),t$G.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},t$G.setWindowTitle=function(e){document.title=e}}var V$F=t$G.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),v$D=t$G.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||V$F);for(S$I in q$S)q$S.hasOwnProperty(S$I)&&(t$G[S$I]=q$S[S$I]);q$S=void 0,n(typeof t$G.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$G.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$G.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$G.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),Te$j=Ge$c=$$O=function(){Z("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Xt$3={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var Ae$l=0,Dt$6=function(e){Ae$l=e},Nt$6=function(){return Ae$l};"object"!=typeof WebAssembly&&Z("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var z$L,ee$t=!1,De$l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Ie$h=65536,w$L,l$T,b$_,A$U,E$Q,I$Z,ue$u,le$u,ke$a=15104,U$L=5257984,Ce$h=5257984,J$H=15072;n(ke$a%16==0,"stack must start aligned"),n(Ce$h%16==0,"heap must start aligned");var he$n=5242880;t$G.TOTAL_STACK&&n(he$n===t$G.TOTAL_STACK,"the stack size can no longer be determined at runtime");var X$K=t$G.TOTAL_MEMORY||16777216;if(X$K<he$n&&v$D("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+X$K+"! (TOTAL_STACK="+he$n+")"),n(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),t$G.buffer?(w$L=t$G.buffer,n(w$L.byteLength===X$K,"provided buffer should be "+X$K+" bytes, but it is "+w$L.byteLength)):("object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(n(X$K%Ie$h==0),z$L=new WebAssembly.Memory({initial:X$K/Ie$h}),w$L=z$L.buffer):w$L=new ArrayBuffer(X$K),n(w$L.byteLength===X$K)),m(),E$Q[J$H>>2]=Ce$h,E$Q[0]=1668509029,A$U[1]=25459,115!==b$_[2]||99!==b$_[3])throw"Runtime error: expected the system to be little-endian!";var Le$n=[],Qe$a=[],Pe$h=[],je$c=[],h$O=!1,_$J=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var k$L=0,C$R=null,Y$C=null,P$M={};t$G.preloadedImages={},t$G.preloadedAudios={};var y$N={error:function(){Z("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){y$N.error()},createDataFile:function(){y$N.error()},createPreloadedFile:function(){y$N.error()},createLazyFile:function(){y$N.error()},open:function(){y$N.error()},mkdev:function(){y$N.error()},registerDevice:function(){y$N.error()},analyzePath:function(){y$N.error()},loadFilesFromDB:function(){y$N.error()},ErrnoError:function(){y$N.error()}};t$G.FS_createDataFile=y$N.createDataFile,t$G.FS_createPreloadedFile=y$N.createPreloadedFile;var Be$h="data:application/octet-stream;base64,",D$O="ThirdParty/unzip.wasm";A(D$O)||(D$O=e(D$O)),t$G.asm=function(e,t,i){t.memory=z$L,t.table=new WebAssembly.Table({initial:22,maximum:22,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=R(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var F$Q=15088;n(F$Q%8==0);var p$P={buffers:[null,[],[]],printChar:function(e,t){var i=p$P.buffers[e];n(i),0===t||10===t?((1===e?V$F:v$D)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return p$P.varargs+=4,E$Q[p$P.varargs-4>>2]},getStr:function(){return l(p$P.get())},get64:function(){var e=p$P.get(),t=p$P.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===p$P.get())}},Bt$8={},Gt$4={abort:Z,setTempRet0:Dt$6,getTempRet0:Nt$6,abortStackOverflow:v,nullFunc_ii:q,nullFunc_iiii:j,nullFunc_jiji:Y,nullFunc_vii:X,___lock:I,___setErrNo:V,___syscall140:O,___syscall146:B,___syscall54:N,___syscall6:F,___unlock:U,_emscripten_get_heap_size:z,_emscripten_memcpy_big:G,_emscripten_resize_heap:H,abortOnCannotGrowMemory:k,emscripten_realloc_buffer:W,flush_NO_FILESYSTEM:D,tempDoublePtr:F$Q,DYNAMICTOP_PTR:J$H},T$M=t$G.asm(Bt$8,Gt$4,w$L),qt$6=T$M.___errno_location;T$M.___errno_location=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),qt$6.apply(null,arguments)};var Wt$7=T$M._fflush;T$M._fflush=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Wt$7.apply(null,arguments)};var Vt$6=T$M._free;T$M._free=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Vt$6.apply(null,arguments)};var zt$4=T$M._freePointer;T$M._freePointer=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),zt$4.apply(null,arguments)};var Jt$4=T$M._llvm_bswap_i32;T$M._llvm_bswap_i32=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Jt$4.apply(null,arguments)};var Yt$4=T$M._malloc;T$M._malloc=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Yt$4.apply(null,arguments)};var Zt$3=T$M._sbrk;T$M._sbrk=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Zt$3.apply(null,arguments)};var $t$3=T$M._unzip;T$M._unzip=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),$t$3.apply(null,arguments)};var Ht$5=T$M.establishStackSpace;T$M.establishStackSpace=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ht$5.apply(null,arguments)};var Kt$5=T$M.stackAlloc;T$M.stackAlloc=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Kt$5.apply(null,arguments)};var Mt$5=T$M.stackRestore;T$M.stackRestore=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Mt$5.apply(null,arguments)};var en$3=T$M.stackSave;T$M.stackSave=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),en$3.apply(null,arguments)},t$G.asm=T$M,t$G.___errno_location=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.___errno_location.apply(null,arguments)},t$G._emscripten_replace_memory=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._emscripten_replace_memory.apply(null,arguments)},t$G._fflush=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._fflush.apply(null,arguments)},t$G._free=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._free.apply(null,arguments)},t$G._freePointer=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._freePointer.apply(null,arguments)},t$G._llvm_bswap_i32=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._llvm_bswap_i32.apply(null,arguments)},t$G._malloc=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._malloc.apply(null,arguments)},t$G._memcpy=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._memcpy.apply(null,arguments)},t$G._memset=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._memset.apply(null,arguments)},t$G._sbrk=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._sbrk.apply(null,arguments)},t$G._unzip=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._unzip.apply(null,arguments)},t$G.establishStackSpace=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.establishStackSpace.apply(null,arguments)};var $$O=t$G.stackAlloc=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.stackAlloc.apply(null,arguments)},Ge$c=t$G.stackRestore=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.stackRestore.apply(null,arguments)},Te$j=t$G.stackSave=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.stackSave.apply(null,arguments)};t$G.dynCall_ii=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_ii.apply(null,arguments)},t$G.dynCall_iiii=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_iiii.apply(null,arguments)},t$G.dynCall_jiji=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_jiji.apply(null,arguments)},t$G.dynCall_vii=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_vii.apply(null,arguments)},t$G.asm=T$M,t$G.intArrayFromString||(t$G.intArrayFromString=function(){Z("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.intArrayToString||(t$G.intArrayToString=function(){Z("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.ccall=o,t$G.cwrap=a,t$G.setValue||(t$G.setValue=function(){Z("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getValue=i,t$G.allocate||(t$G.allocate=function(){Z("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getMemory||(t$G.getMemory=function(){Z("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.AsciiToString||(t$G.AsciiToString=function(){Z("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToAscii||(t$G.stringToAscii=function(){Z("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF8ArrayToString||(t$G.UTF8ArrayToString=function(){Z("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF8ToString||(t$G.UTF8ToString=function(){Z("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF8Array||(t$G.stringToUTF8Array=function(){Z("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF8||(t$G.stringToUTF8=function(){Z("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.lengthBytesUTF8||(t$G.lengthBytesUTF8=function(){Z("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF16ToString||(t$G.UTF16ToString=function(){Z("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF16||(t$G.stringToUTF16=function(){Z("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.lengthBytesUTF16||(t$G.lengthBytesUTF16=function(){Z("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF32ToString||(t$G.UTF32ToString=function(){Z("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF32||(t$G.stringToUTF32=function(){Z("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.lengthBytesUTF32||(t$G.lengthBytesUTF32=function(){Z("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.allocateUTF8||(t$G.allocateUTF8=function(){Z("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackTrace||(t$G.stackTrace=function(){Z("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnPreRun||(t$G.addOnPreRun=function(){Z("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnInit||(t$G.addOnInit=function(){Z("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnPreMain||(t$G.addOnPreMain=function(){Z("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnExit||(t$G.addOnExit=function(){Z("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnPostRun||(t$G.addOnPostRun=function(){Z("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.writeStringToMemory||(t$G.writeStringToMemory=function(){Z("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.writeArrayToMemory||(t$G.writeArrayToMemory=function(){Z("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.writeAsciiToMemory||(t$G.writeAsciiToMemory=function(){Z("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addRunDependency||(t$G.addRunDependency=function(){Z("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.removeRunDependency||(t$G.removeRunDependency=function(){Z("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.ENV||(t$G.ENV=function(){Z("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.FS||(t$G.FS=function(){Z("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.FS_createFolder||(t$G.FS_createFolder=function(){Z("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createPath||(t$G.FS_createPath=function(){Z("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createDataFile||(t$G.FS_createDataFile=function(){Z("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createPreloadedFile||(t$G.FS_createPreloadedFile=function(){Z("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createLazyFile||(t$G.FS_createLazyFile=function(){Z("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createLink||(t$G.FS_createLink=function(){Z("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createDevice||(t$G.FS_createDevice=function(){Z("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_unlink||(t$G.FS_unlink=function(){Z("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.GL||(t$G.GL=function(){Z("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.dynamicAlloc||(t$G.dynamicAlloc=function(){Z("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.warnOnce||(t$G.warnOnce=function(){Z("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.loadDynamicLibrary||(t$G.loadDynamicLibrary=function(){Z("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.loadWebAssemblyModule||(t$G.loadWebAssemblyModule=function(){Z("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getLEB||(t$G.getLEB=function(){Z("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getFunctionTables||(t$G.getFunctionTables=function(){Z("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.alignFunctionTables||(t$G.alignFunctionTables=function(){Z("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.registerFunctions||(t$G.registerFunctions=function(){Z("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addFunction||(t$G.addFunction=function(){Z("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.removeFunction||(t$G.removeFunction=function(){Z("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getFuncWrapper||(t$G.getFuncWrapper=function(){Z("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.prettyPrint||(t$G.prettyPrint=function(){Z("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.makeBigInt||(t$G.makeBigInt=function(){Z("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.dynCall||(t$G.dynCall=function(){Z("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getCompilerSetting||(t$G.getCompilerSetting=function(){Z("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackSave||(t$G.stackSave=function(){Z("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackRestore||(t$G.stackRestore=function(){Z("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackAlloc||(t$G.stackAlloc=function(){Z("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.establishStackSpace||(t$G.establishStackSpace=function(){Z("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.print||(t$G.print=function(){Z("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.printErr||(t$G.printErr=function(){Z("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getTempRet0||(t$G.getTempRet0=function(){Z("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.setTempRet0||(t$G.setTempRet0=function(){Z("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.Pointer_stringify||(t$G.Pointer_stringify=function(){Z("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.ALLOC_NORMAL||Object.defineProperty(t$G,"ALLOC_NORMAL",{get:function(){Z("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$G.ALLOC_STACK||Object.defineProperty(t$G,"ALLOC_STACK",{get:function(){Z("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$G.ALLOC_DYNAMIC||Object.defineProperty(t$G,"ALLOC_DYNAMIC",{get:function(){Z("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$G.ALLOC_NONE||Object.defineProperty(t$G,"ALLOC_NONE",{get:function(){Z("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),K.prototype=new Error,K.prototype.constructor=K,Y$C=function e(){t$G.calledRun||Q(),t$G.calledRun||(Y$C=e)},t$G.run=Q;var qe$b=[];if(t$G.abort=Z,t$G.preInit)for("function"==typeof t$G.preInit&&(t$G.preInit=[t$G.preInit]);t$G.preInit.length>0;)t$G.preInit.pop()();t$G.noExitRuntime=!0,Q()}else var t$G=null;var _0x3ebab5=t$G;function r$R(e){e=u$_(e,0),this._array=new Array(e),this._length=e}Object.defineProperties(r$R.prototype,{length:{get:function(){return this._length},set:function(e){this._length=e,e>this._array.length&&(this._array.length=e)}},values:{get:function(){return this._array}}}),r$R.prototype.get=function(e){return o$1q.typeOf.number.lessThan("index",e,this._array.length),this._array[e]},r$R.prototype.set=function(e,t){o$1q.typeOf.number("index",e),e>=this.length&&(this.length=e+1),this._array[e]=t},r$R.prototype.peek=function(){return this._array[this._length-1]},r$R.prototype.push=function(e){var t=this.length++;this._array[t]=e},r$R.prototype.pop=function(){return this._array[--this.length]},r$R.prototype.reserve=function(e){o$1q.typeOf.number.greaterThanOrEquals("length",e,0),e>this._array.length&&(this._array.length=e)},r$R.prototype.resize=function(e){o$1q.typeOf.number.greaterThanOrEquals("length",e,0),this.length=e},r$R.prototype.trim=function(e){e=u$_(e,this.length),this._array.length=e};var _0x2ed872=(_0x42cb9f=!0,function(e,t){var i=_0x42cb9f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42cb9f=!1,i}),_0x178ed5=_0x2ed872(void 0,(function(){return _0x178ed5.toString().search("(((.+)+)+)+$").toString().constructor(_0x178ed5).search("(((.+)+)+)+$")})),_0x42cb9f;_0x178ed5();var _0x5150e8={Normal:0,Add:1};function _0x3a8ba7(e){return function(){return e._disFromCamera}}function _0x52b7a2(e){return function(){return e._priority}}function _0x3c2b42(e,t){return function(){var i=t._currentMaxLevel,n=1/Math.pow(2,i-e._nLODLev);return e._disFromCamera*n}}var _0x2e6772=function(e){e=e||{},this._context=e.context,this._layer=e.layer,this._customRequestHeaders=e.customRequestHeaders,this._renderQueue=[],this._cache=new e$1N,this._rootEntities=[],this._cameraPos=new o$1p,this._cameraDir=new o$1p,this._cameraUp=new o$1p,this._cacheEntityCount=u$_(e.cacheEntityCount,0),this._sceneMode=C$13.SCENE3D,this._projection=null,this._oriRootEntities=e.rootEntities,this._initializeRootEntities(e.rootEntities),this._nLoadingPriority=_0x10659f.Child_Priority_NonLinear,this.createPriorityFunction=_0x3a8ba7,this._currentMaxLevel=0,this._replacementList=new h$P,this._replacementSentinel=this._replacementList.add(),this._cacheKey=e.cacheKey;var t=this._layer._baseUri.toString(),i=t.substring(0,t.indexOf("/datas"));this.tablename=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),this._indexedDBSetting=this._layer._indexedDBSetting;var n=this,r=o$1l.defer();if(n._attributes={_errorNum:0,_reStoreTimes:0,_memoryCache:0,_redownload:!1,status:{promise:r.promise,needDownload:void 0}},this._scpUrl=e.scpUrl,e$2b(window.Proxy)){var o=o$1l.defer();n._dpPromise=o.promise,new l$15({name:i+this.tablename}).then((function(e){e.checkObjectStoreExit(n.tablename)?e.checkObjectStoreExit(n.tablename+"Texture")?(_0x3c82ae(e,n,r),n._indexedDBScheduler=e,o.resolve(!0)):(_0x3c82ae(e,n,r),e.createObjectStore(n.tablename+"Texture"),n._indexedDBScheduler=e,o.resolve(!0)):e.createObjectStore(n.tablename).then((function(){e.checkObjectStoreExit(n.tablename+"Texture")?(_0x3c82ae(e,n,r),n._indexedDBScheduler=e,o.resolve(!0)):(_0x3c82ae(e,n,r),e.createObjectStore(n.tablename+"Texture"),n._indexedDBScheduler=e,o.resolve(!0))}))}))}this._rasterFrequency=0,this._statistics={numberOfPendingRequests:0,numberOfAttemptedRequests:0,numberOfTilesProcessing:0,numberOfProcessingAttempted:0,lastLoadedTrigger:{time:Date.now(),done:!1},numberOfColorChangePending:0,numberOfColorChangeAttempted:0,numberOfColorChangeProcessing:0,lastColorChangeTrigger:{time:Date.now(),done:!1}},this._statisticsLastRender=p$19({},this._statistics),this._packingRequest=!1,this._packRequestEntities=[],this._parsingEntities=[],this._attrloaded=!1,this._selectEntities=[],this._requestEntities=[],this.attrsave=!1,this._extrudedId=void 0,this._polygons=void 0,this._indexedDBRequestNum=0,this._indexedDBRequestLimit=3,this._requestByteLength=0,this._prepareLoaded=!0,this._prepareRatio=0,this._associatedFieldName=void 0,this._entityObjectId={},this._objectIdChange=!1,this._isFineLayer=!1,this._entityModelId={},this._stopLoadImagery=!1,this._savetoIndexDBDatas=[]};function _0x3c82ae(e,t,i){e.checkObjectStoreExit("attributes")?!0===t._indexedDBSetting.isAttributesSave&&e.getElementFromDB("attributes","queryFieldNames").then((function(n){if("ALL"===n&&(t._attributes.status.needDownload=!1,i.resolve(!0)),e$2b(t._layer.queryFieldNames)){for(var r=0;r<t._layer.queryFieldNames.length;r++)if(-1===n.indexOf(t._layer.queryFieldNames[r]))return t._attributes.status.needDownload=!0,e.updateElementInDB("attributes","queryFieldNames",n.concat(t._layer.queryFieldNames)),void i.resolve(!0);t._attributes.status.needDownload=!1,i.resolve(!0)}})).otherwise((function(){!0===t._indexedDBSetting.isAttributesSave&&(e$2b(t._layer.queryFieldNames)?e.putElementInDB("attributes","queryFieldNames",t._layer.queryFieldNames):e.putElementInDB("attributes","queryFieldNames","ALL"),t._attributes.status.needDownload=!0,i.resolve(!0))})):e.createObjectStore("attributes").then((function(){i.resolve(!0),!0===t._indexedDBSetting.isAttributesSave&&(e$2b(t._layer.queryFieldNames)?e.putElementInDB("attributes","queryFieldNames",t._layer.queryFieldNames):e.putElementInDB("attributes","queryFieldNames","ALL"),t._attributes.status.needDownload=!0)}))}function _0x4a3e23(e,t){!e._indexedDBSetting.isAttributesSave||(e$2b(e._indexedDBScheduler)?_0x3b47a1(e,t):e._dpPromise.then((function(){_0x3b47a1(e,t)})))}function _0x3b47a1(e,t){var i=new TextEncoder("utf-8"),n=[],r=o$1l.defer();if(e._indexedDBScheduler.checkObjectStoreExit("attributes")){for(var o in t){try{var a=JSON.stringify(t[o]);a=i.encode(a).join(256)}catch{return r.reject(null),r.promise}n.push(e._indexedDBScheduler.putElementInDB("attributes",o,a))}o$1l.all(n,(function(t){0===e._savetoIndexDBDatas.length&&e._indexedDBScheduler.putElementInDB("attributes","saved",!0)}),(function(i){t._reStoreTimes<=3&&(t._reStoreTimes++,setTimeout((function(){_0x4a3e23(e,t)}),2e3))}))}else e._indexedDBScheduler.createObjectStore("attributes").then((function(){for(var o in t){try{var a=JSON.stringify(t[o]);a=i.encode(a).join(256)}catch{return r.reject(null),r.promise}n.push(e._indexedDBScheduler.putElementInDB("attributes",o,a))}o$1l.all(n,(function(t){0===e._savetoIndexDBDatas.length&&e._indexedDBScheduler.putElementInDB("attributes","saved",!0)}),(function(i){t._reStoreTimes<=3&&(t._reStoreTimes++,setTimeout((function(){_0x4a3e23(e,t)}),2e3))}))}))}function _0xbea8e7(e,t){if(Array.isArray(e)){for(var i={},n=e.length,r=0;r<n;r++){o=e$2b(t._layer.idFieldName)?e[r][t._layer.idFieldName]:e[r].id||e[r].SmID||e[r].SMID||e[r].smid,!t._attributes.hasOwnProperty(o)&&(t._attributes[o]=e[r],i[o]=e[r],n>500&&r&&r%500==0&&(t._savetoIndexDBDatas.push(i),i={}))}t._savetoIndexDBDatas.push(i)}else{var o;e$2b(o=e.id||e.SmID||e.SMID)&&(t._attributes[o]=e)}t._attributes._memoryCache=1}function _0x59f579(e,t){var i=[],n=e._layer,r="attribute"===n._attributeExtentName?".attribute":n._isS3MB?".s3md":".scvd",o=()=>{};e$2b(a$O.CREDENTIAL)&&(o=e$2b(a$O.CREDENTIAL._keymap[e._scpUrl])?t=>a$O.addTokenWithKey(e._scpUrl,t):e=>a$O.addToken(e));var a="";".attribute"===r&&(a=Object.keys(n._fieldsInfo._hash).join(";"),a=n._fieldsInfo._hash.hasOwnProperty("smid")?"?fields=smid;"+a.replace("smid;",""):"?fields=SmID;"+a.replace("SmID;",""));var s="",l=n._indexInfoAttributeMap;if(e$2b(l)){var u=n._baseUri.toString();for(var c in l)for(var h=l[c],d=0;d<h.length;d++)o(s=u+h[d].url+a),i.push(o$10(s))}else for(var f=0,p=e._rootEntities.length;f<p;f++)s=n._isS3MBlock?e._rootEntities[f]._relativePath.resolve(n._baseUri).toString()+e._rootEntities[f]._fileName:e._rootEntities[f]._relativePath.resolve(n._baseUri).toString()+f$O(e._rootEntities[f]._relativePath.toString().replace(/\/$/,"")),o(s+=r+a),i.push(o$10(s));o$1l.all(i,(function(e){n.attrDatas=e}),(function(t){for(var i=0,o=e._rootEntities.length;i<o;i++){var a;if(a=n._isS3MBlock?e._rootEntities[i]._relativePath.resolve(n._baseUri).toString()+e._rootEntities[i]._fileName+r:e._rootEntities[i]._relativePath.resolve(n._baseUri).toString()+f$O(e._rootEntities[i]._relativePath.toString().replace(/\/$/,""))+r,".attribute"===r){var s=Object.keys(n._fieldsInfo._hash).join(";");n._fieldsInfo._hash.hasOwnProperty("smid")?a=a+"?fields=smid;"+(s=s.replace("smid;","")):a=a+"?fields=SmID;"+(s=s.replace("SmID;",""))}e$2b(a$O.CREDENTIAL)&&(a=e$2b(a$O.CREDENTIAL._keymap[e._scpUrl])?a$O.addTokenWithKey(e._scpUrl,a):a$O.addToken(a)),o$10(a).then((function(e){n.attrDatas=[e]}))}}))}Object.defineProperties(_0x2e6772.prototype,{LoadingPriority:{get:function(){return this._nLoadingPriority},set:function(e){this._nLoadingPriority=e,this.createPriorityFunction=this._nLoadingPriority===_0x10659f.Root_Priority?_0x3c2b42:_0x3a8ba7,this._nLoadingPriority===_0x10659f.UsePagedLodInfo&&(this.createPriorityFunction=_0x52b7a2)}}}),_0x2e6772.prototype._updatingTiles=function(){return this._statistics.numberOfPendingRequests+this._statistics.numberOfAttemptedRequests+this._statistics.numberOfTilesProcessing},_0x2e6772.prototype._requestAllScvd=function(){var e=this;e$2b(this._indexedDBScheduler)?_0x59f579(e,e._layer._isS3MB):this._dpPromise.then((function(){_0x59f579(e,e._layer._isS3MB)}))},_0x2e6772.prototype.getAttributesById=function(e){var t=new TextDecoder("utf-8"),i=o$1l.defer();if(e$2b(this._attributes[e]))return i.resolve(this._attributes[e]),i.promise;if(!this._indexedDBSetting.isAttributesSave&&!this._layer._showLabel||!e$2b(this._indexedDBScheduler)||!this._indexedDBScheduler.checkObjectStoreExit("attributes"))return i.resolve(null),i.promise;var n=this;return this._indexedDBScheduler.getElementFromDB("attributes",e.toString()).then((function(r){if(null!==r){r=r.split(256);var o=new Uint8Array(r);r=t.decode(o),r=JSON.parse(r)}else n._attributes._errorNum++,n._attributes._errorNum>3&&(_0x59f579(n,n._layer._isS3MB),n._attributes._errorNum=0);n._attributes[e]=r,i.resolve(r)}),(function(e){n._attributes._errorNum++,n._attributes._errorNum>3&&!n._attributes._redownload&&(_0x59f579(n,n._layer._isS3MB),n._attributes._redownload=!0),i.resolve(null)})),i.promise},_0x2e6772.prototype._downloadAttributes=function(){for(var e=[],t=o$1l.defer(),i="attribute"===this._layer._attributeExtentName?".attribute":this._layer._isS3MB?".s3md":".scvd",n=this,r=this._layer,o=0,a=this._rootEntities.length;o<a;o++){var s=this._rootEntities[o];if(e$2b(r._indexInfoMap)){var l=s._fileName,u=r._indexInfoMap[l];if(e$2b(u))for(var c=0;c<u.length;c++){var h=new h$16(u[c].url).resolve(r._baseUri).toString(),d=Object.keys(this._layer._fieldsInfo._hash).join(";");r._fieldsInfo._hash.hasOwnProperty("smid")?h=h+"?fields=smid;"+(d=d.replace("smid;","")):h=h+"?fields=SmID;"+(d=d.replace("SmID;","")),e$2b(a$O.CREDENTIAL)&&(h=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,h):a$O.addToken(h)),e.push(o$10(h))}}else{h=this._rootEntities[o]._relativePath.resolve(this._layer._baseUri).toString()+f$O(this._rootEntities[o]._relativePath.toString().replace(/\/$/,""))+i,d=Object.keys(this._layer._fieldsInfo._hash).join(";");this._layer._fieldsInfo._hash.hasOwnProperty("smid")?h=h+"?fields=smid;"+(d=d.replace("smid;","")):h=h+"?fields=SmID;"+(d=d.replace("SmID;","")),e$2b(a$O.CREDENTIAL)&&(h=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,h):a$O.addToken(h)),e.push(o$10(h))}}return o$1l.all(e,(function(e){for(var r=[],o=0,a=e.length;o<a;o++)r.push(_0x2eee9a(e[o],i,n._layer._fieldsInfo));for(var s=0;s<r.length;s++)_0xbea8e7(r[s],n);n._attrloaded||(n._attrloaded=!0,n._layer.attributeDownloaded.raiseEvent(n._layer.name+" attribute downloaded.")),t.resolve(!0)}),(function(e){for(var r=0,o=n._rootEntities.length;r<o;r++){var a=n._rootEntities[r]._relativePath.resolve(n._layer._baseUri).toString()+f$O(n._rootEntities[r]._relativePath.toString().replace(/\/$/,""))+i;e$2b(a$O.CREDENTIAL)&&(a=e$2b(a$O.CREDENTIAL._keymap[n._scpUrl])?a$O.addTokenWithKey(n._scpUrl,a):a$O.addToken(a)),o$10(a).then((function(e){var r=[];r.push(_0x2eee9a(e,i,n._layer._fieldsInfo)),_0xbea8e7(r[0],n),t.resolve(!0)}))}})),t.promise};var _0x7b4aed=null,_0x1d5a67=null,_0x52529f=!1;function _0x31323d(e){var t=4*e.length,i=_0x3ebab5._malloc(Uint8Array.BYTES_PER_ELEMENT*t),n=new Uint8Array(t);_0x3ebab5.HEAPU8.set(n,i/Uint8Array.BYTES_PER_ELEMENT);var r,o=_0x3ebab5._malloc(Uint8Array.BYTES_PER_ELEMENT*e.length);for(_0x3ebab5.HEAPU8.set(e,o/Uint8Array.BYTES_PER_ELEMENT);0==(r=_0x7b4aed(i,t,o,e.length));)_0x1d5a67(i),t*=4,i=_0x3ebab5._malloc(Uint8Array.BYTES_PER_ELEMENT*t),n=new Uint8Array(t),_0x3ebab5.HEAPU8.set(n,i/Uint8Array.BYTES_PER_ELEMENT);var a=new Uint8Array(_0x3ebab5.HEAPU8.buffer,i,r);e=null,n=null;var s=new Uint8Array(a).buffer;return _0x1d5a67(i),_0x1d5a67(o),s}function _0x2eee9a(e,t,i){if(".attribute"===t){var n=new Int32Array(e,0,1);n=n[0];for(var r=new Int32Array(e,4,n),o=[],a=0;a<n;a++)o.push(r[a]);var s=Math.floor(o[0]/4.125),l=g=Math.ceil(s/8),u=new Int8Array(e,4*(n+1)+g,4*s),c=u.subarray(0,4*s),h=new Int8Array(c);u=new Int32Array(h.buffer);var d=4*(n+1)+o[0],f=[];for(a=1;a<n;a++){var p=(i=i)._array[a],_=p.type,m=Number(p.size);s=Math.floor(o[a]/(m+.125));var g=Math.ceil(s/8);(10==_||"ntext"===_||"text"===_)&&(m=1,g=l,s=o[a]-g);var x=new Int8Array(e,d+g,s*m).subarray(0,s*m);h=new Int8Array(x);if(4==_||"int32"===_)x=new Int32Array(h.buffer);else if(16==_||"int64"===_)x=new BigInt64Array(h.buffer);else if(6==_||"float"===_)x=new Float32Array(h.buffer);else if(7==_||"double"===_)x=new Float64Array(h.buffer);else if(10==_||"ntext"===_||"text"===_){for(var v=new DataView(x.buffer),y=0,$=[];y+x.byteOffset<v.byteLength;){var b=v.getInt32(y+x.byteOffset,!0);if((y+=4)+b>h.buffer.byteLength||b<0)break;var T=new Uint8Array(h.buffer,y,b);y+=b;var C=a$K(T,void 0,void 0,"gbk");$.push(C)}x=$}d+=o[a],f.push(x)}var S=Object.keys(i._hash),w=[];for(a=0;a<u.length;a++){(I={})[S[0]]=u[a];for(var E=0;E<f.length;E++)I[S[E+1]]=f[E][a];w.push(I)}return w}var P,A=new Uint8Array(e,8);if(null!==_0x7b4aed&&!0===_0x52529f)try{P=_0x31323d(A)}catch{return[]}else P=nt$9.inflate(A).buffer;h=new Uint8Array(P);var L=new TextDecoder("utf-8").decode(h);if(".s3md"===t){var M,R=L.substring(4);try{M=JSON.parse(R)}catch{R=L.substring(L.indexOf("{")),M=JSON.parse(R)}for(var I=[],O=0,D=M.layerInfos.length;O<D;O++)for(var B=M.layerInfos[O].records,N=(a=0,B.length);a<N;a++){for(var F={},U=(E=0,(G=B[a]).values.length);E<U;E++)F[G.values[E].name]=G.values[E].field,F[G.values[E].name]=!isNaN(1*F[G.values[E].name])&1*F[G.values[E].name]<Number.MAX_SAFE_INTEGER?1*F[G.values[E].name]:F[G.values[E].name];I.push(F)}return I}I=[];var z=(new s$S).read(L).getElementsByTagName("Record");for(a=0,N=z.length;a<N;a++){for(F={},h=z[a].innerHTML.split("\n"),E=0;E<h.length;E++){var G;if(""!==(G=h[E]))if(-1!==G.indexOf("<ID>"))F.id=G.substring(G.indexOf(">")+1,G.indexOf("</"));else{var V=G.indexOf('"');V=G.indexOf('"',V+1);var k=G.substring(G.indexOf("Name=")+6,V);-1!==G.indexOf("/>")?F[k]="":F[k]=G.substring(G.indexOf(">")+1,G.indexOf("</"))}}I.push(F)}return I}function _0xfdcb2c(e,t){var i=new Int8Array(e);for(var n=t.split("").map((function(e){return e.charCodeAt(0)})),r=0;r<n.length;r++)i[r]=i[r]^n[r];return i.buffer}typeof WebAssembly<"u"&&e$2b(_0x3ebab5)&&(_0x3ebab5.onRuntimeInitialized=function(){_0x52529f=!0},_0x7b4aed=_0x3ebab5.cwrap("unzip","number",["number","number","number","number"]),_0x1d5a67=_0x3ebab5.cwrap("freePointer",null,["number"])),_0x2e6772.prototype._updateRootBoundingSphere=function(e,t){for(var i=0,n=e.length;i<n;i++){var r=e[i],o=this._rootEntities[i];if(e$2b(r.bSphere)&&r.bSphere.radius>0&&(o._boundingSphere=i$1c.transform(r.bSphere,t,new i$1c),e$2b(r.min))){var a=[];a.push(new o$1p(r.min.x,r.min.y,r.min.z)),a.push(new o$1p(r.min.x,r.min.y,r.max.z)),a.push(new o$1p(r.min.x,r.max.y,r.min.z)),a.push(new o$1p(r.min.x,r.max.y,r.max.z)),a.push(new o$1p(r.max.x,r.min.y,r.min.z)),a.push(new o$1p(r.max.x,r.min.y,r.max.z)),a.push(new o$1p(r.max.x,r.max.y,r.min.z)),a.push(new o$1p(r.max.x,r.max.y,r.max.z));for(var s=0;s<8;s++)a[s]=p$1d.multiplyByPoint(t,a[s],a[s]);o._orientedBoundingBox=y$Z.fromPoints(a,o._orientedBoundingBox)}}},_0x2e6772.prototype._initializeRootEntities=function(e){if(e$2b(e)){this._rootNodeNameList=[];for(var t=this._layer,i=t._fileType,n=i===d$15.ClampGroundPolygon||i===d$15.ClampObjectPolygon||i===d$15.ClampGroundLine||i===d$15.ClampObjectLine,r=new o$1p,o=new o$1p,a=!1,s=[],l=0,u=e.length;l<u;l++){var c=e[l],h=new _0x206cda;h.layer=t,h._isAncestorBlock=t._isS3MBlock,h._fileName=c.name,h._relativePath=c.relativePath,h._isRootTile=!0,h._nLODLev=0;var d=h._relativePath.toString()+h._fileName;if(this._rootNodeNameList.push(d),e$2b(c.bSphere)&&c.bSphere.radius>0){if(h._originalBS=c.bSphere,h._boundingSphere=i$1c.transform(c.bSphere,t._matModel,new i$1c),h._oriBoundingSphere=i$1c.clone(h._boundingSphere),s.push(h._boundingSphere),e$2b(c.min)&&!t._isS3MBlock){var f=[];f.push(new o$1p(c.min.x,c.min.y,c.min.z)),f.push(new o$1p(c.min.x,c.min.y,c.max.z)),f.push(new o$1p(c.min.x,c.max.y,c.min.z)),f.push(new o$1p(c.min.x,c.max.y,c.max.z)),f.push(new o$1p(c.max.x,c.min.y,c.min.z)),f.push(new o$1p(c.max.x,c.min.y,c.max.z)),f.push(new o$1p(c.max.x,c.max.y,c.min.z)),f.push(new o$1p(c.max.x,c.max.y,c.max.z));for(var p=0;p<8;p++)f[p]=p$1d.multiplyByPoint(t._matModel,f[p],f[p]);h._orientedBoundingBox=y$Z.fromPoints(f,h._orientedBoundingBox),h.obbMin=c.min,h.obbMax=c.max,0==l?(r=c.max.clone(),o=c.min.clone()):(r.x=Math.max(r.x,c.max.x),r.y=Math.max(r.y,c.max.y),r.z=Math.max(r.z,c.max.z),o.x=Math.min(o.x,c.min.x),o.y=Math.min(o.y,c.min.y),o.z=Math.min(o.z,c.min.z),a=!0)}}else if(e$2b(c.obb)){var _=c.obb,m=new p$1e,g=new o$1p(_.center.x,_.center.y,_.center.z),x=new e$29(_.xExtent.x,_.xExtent.y,_.xExtent.z,0),v=new e$29(_.yExtent.x,_.yExtent.y,_.yExtent.z,0),y=new e$29(_.zExtent.x,_.zExtent.y,_.zExtent.z,0);p$1e.setColumn(m,0,x,m),p$1e.setColumn(m,1,v,m),p$1e.setColumn(m,2,y,m);var $=new y$Z(g,m);h._oriBoundingSphere=i$1c.fromOrientedBoundingBox($,new i$1c),h._boundingSphere=i$1c.transform(h._oriBoundingSphere,t._matModel,new i$1c),g=p$1d.multiplyByPoint(t._matModel,g,g),x=p$1d.multiplyByVector(t._matModel,x,x),v=p$1d.multiplyByVector(t._matModel,v,v),y=p$1d.multiplyByVector(t._matModel,y,y),p$1e.setColumn(m,0,x,m),p$1e.setColumn(m,1,v,m),p$1e.setColumn(m,2,y,m),h._orientedBoundingBox=new y$Z(g,m),h.obbMin=x,h.obbMax=v}n&&e$2b(h._boundingSphere)&&(h._boundingSphere.radius+=9e3),h._subdomainIndex=l,this._rootEntities.push(h)}this._layer.max=r,this._layer.min=o,t._oriBoundingSphere=new i$1c,a?i$1c.fromCornerPoints(o,r,t._oriBoundingSphere):s.length>0&&i$1c.fromBoundingSpheres(s,t._oriBoundingSphere),t._boundingSphere=i$1c.transform(t._oriBoundingSphere,t._matModel,new i$1c)}},_0x2e6772.prototype._isRootNode=function(e){return!!e$2b(this._rootNodeNameList)&&-1!==this._rootNodeNameList.indexOf(e)},_0x2e6772.prototype.appendQueryFieldName=function(e){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i],o="attribute"===e._attributeExtentName?".attribute":this._layer._isS3MB?".s3md":".scvd",a=r._relativePath.resolve(this._layer._baseUri).toString()+f$O(r._relativePath.toString().replace(/\/$/,""))+o,s=e._queryFieldNames,l=s.join(";"),u=this;if("attribute"===e._attributeExtentName){var c;if(e._fieldsInfo._hash.hasOwnProperty("smid")?(a=a+"?fields=smid;"+l,c="smid"):(a=a+"?fields=SmID;"+l,c="SmID"),e._urlType===Tr$3.KEY_VALUE){var h=r._relativePath.path.replace(/\//g,"").replace(".",""),d=e._urlArguments,f={layerName:e.name,rootTile:h,tile:r._fileName,suffix:"attribute",fields:c+";"+l},p=m$1b(f=Object.assign(f,d),!0);(g=a.match(/(\S*)\/datas/)).length>0&&(a=g[0]+"?"+p)}e$2b(a$O.CREDENTIAL)&&(a=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,a):a$O.addToken(a));var _=new r$1b({url:a,throttle:!1,throttleByServer:!1,serverKey:r$1a.getServerKey(a)}),m=o$10(a,this._customRequestHeaders,_);e$2b(promies)&&(m.then((function(e){var t=new Int32Array(e,0,1);t=t[0];for(var i=new Int32Array(e,4,t),n=[],r=0;r<t;r++)n.push(i[r]);var o=Math.floor(n[0]/4.125),a=Math.ceil(o/8),l=new Int8Array(e,4*(t+1)+a,4*o),c=l.subarray(0,4*o),h=new Int8Array(c);l=new Int32Array(h.buffer);var d=4*(t+1)+n[0],f=[];for(r=1;r<t;r++){var p=u._layer._fieldsInfo._array[r],_=p.type,m=Number(p.size);o=Math.floor(n[r]/(m+.125));a=Math.ceil(o/8);var g=new Int8Array(e,d+a,o*m).subarray(0,o*m);h=new Int8Array(g);4==_||16==_?g=new Int32Array(h.buffer):6==_?g=new Float32Array(h.buffer):7==_&&(g=new Float64Array(h.buffer)),d+=n[r],f.push(g)}for(r=0;r<l.length;r++){for(var x={},v=0;v<f.length;v++)x[s[v]]=f[v][r];Object.assign(u._attributes[l[r]],x)}})),t.push(m))}else{if(a=a+"?fields="+l,e._urlType===Tr$3.KEY_VALUE){var g;h=r._relativePath.path.replace(/\//g,"").replace(".",""),d=e._urlArguments,f={layerName:e.name,rootTile:h,tile:r._fileName,suffix:e._attributeExtentName,fields:l},p=m$1b(f=Object.assign(f,d),!0);(g=a.match(/(\S*)\/datas/)).length>0&&(a=g[0]+"?"+p)}e$2b(a$O.CREDENTIAL)&&(a=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,a):a$O.addToken(a));m=u$Q(a,this._customRequestHeaders).then((function(e){for(var t=e.Records,i=0;i<t.length;i++){var n=t[i].ID||t[i].id||t[i].SmID||t[i].SMID;u._attributes.hasOwnProperty(n)||Object.assign(u._attributes[n],t[i])}}));t.push(m)}}return t};var _0x599da4=void 0;function _0x5cb704(e,t){if(e$2b(e.xExtent)){var i=o$1p.fromElements(e.center.x,e.center.y,e.center.z),n=e$29.fromElements(e.xExtent.x,e.xExtent.y,e.xExtent.z,0),r=e$29.fromElements(e.yExtent.x,e.yExtent.y,e.yExtent.z,0),o=e$29.fromElements(e.zExtent.x,e.zExtent.y,e.zExtent.z,0);if(p$1d.multiplyByPoint(t,i,i),p$1d.multiplyByVector(t,n,n),p$1d.multiplyByVector(t,r,r),p$1d.multiplyByVector(t,o,o),e$2b(_0x599da4))_0x599da4.center=i,_0x599da4.halfAxes[0]=n.x,_0x599da4.halfAxes[1]=n.y,_0x599da4.halfAxes[2]=n.z,_0x599da4.halfAxes[3]=r.x,_0x599da4.halfAxes[4]=r.y,_0x599da4.halfAxes[5]=r.z,_0x599da4.halfAxes[6]=o.x,_0x599da4.halfAxes[7]=o.y,_0x599da4.halfAxes[8]=o.z,_0x599da4.areaDirty=1;else{var a=new p$1e(n.x,r.x,o.x,n.y,r.y,o.y,n.z,r.z,o.z);_0x599da4=new y$Z(i,a)}_0x599da4._updateBBox();var s=o$1p.distance(_0x599da4.center,_0x599da4.bbox[0]);return m=new i$1c(_0x599da4.center,s)}var l=e.min.x,u=e.min.y,c=e.min.z,h=e.max.x,d=e.max.y,f=e.max.z,p=new o$1p(l,u,c),_=new o$1p(h,d,f),m=new i$1c;return i$1c.fromCornerPoints(p,_,m),i$1c.transform(m,t,m),m}function _0x3586c0(e,t){var i,n=[];n.push(new o$1p(e.min.x,e.min.y,e.min.z)),n.push(new o$1p(e.min.x,e.min.y,e.max.z)),n.push(new o$1p(e.min.x,e.max.y,e.min.z)),n.push(new o$1p(e.min.x,e.max.y,e.max.z)),n.push(new o$1p(e.max.x,e.min.y,e.min.z)),n.push(new o$1p(e.max.x,e.min.y,e.max.z)),n.push(new o$1p(e.max.x,e.max.y,e.min.z)),n.push(new o$1p(e.max.x,e.max.y,e.max.z));for(var r=0;r<8;r++)n[r]=p$1d.multiplyByPoint(t,n[r],n[r]);return i=y$Z.fromPoints(n,i)}function _0x564fb6(e,t,i,n,r,o){if(e$2b(n)){var a=new _0x206cda;if(i._entity=a,a._parent=t,a._relativePath=o,a._boundingSphere=i._boundingSphere,a._orientedBoundingBox=i._orientedBoundingBox,a._fileName=n.modelPath,a._fileName=a._fileName.replace(/.s3mb*|.s3m*../g,""),a._parentPagelod=i,a._depth=i._depth+1,a._index=t._childrenPageLod.length-1,a._rootName=t._rootName,a._subdomainIndex=t._subdomainIndex+a._index+1,a._indexFilePath=n.indexFilePath,e$2b(n.state)&&"PartLeaf"===n.state&&(a._hasLeafChild=!0),e$2b(n.indexFilePath))return void(a._hasConfig=!0);var s=n.children;if(!e$2b(s))return a._isLeafTile=!0,void(a._boundingSphere=void 0);for(var l=0,u=s.length;l<u;l++){var c=s[l];if(e$2b(c.tileInfo)){if(""===c.tileInfo.modelPath){a._hasLeafChild=!0;continue}var h=new _0x46a5cb;if(h._fileType=e._fileType,h._rangeList=c.tileInfo.rangeValue,h._rangeDataList=c.tileInfo.modelPath,h._rangeDataList=h._rangeDataList.replace(/.s3mb*|.s3m*../g,""),0===h._rangeDataList.indexOf("./")&&(h._rangeDataList=h._rangeDataList.substring(2)),"pixelSizeOnScreen"===c.tileInfo.rangeMode?h._rangeMode=_0x2056d1.PIXEL_SIZE_ON_SCREEN:"geometricError"===c.tileInfo.rangeMode&&(h._rangeMode=_0x2056d1.GEOMETRY_ERROR),c.tileInfo.boundingBox.xExtent){var d=c.tileInfo.boundingBox,f=o$1p.fromElements(d.center.x,d.center.y,d.center.z),p=e$29.fromElements(d.xExtent.x,d.xExtent.y,d.xExtent.z,0),_=e$29.fromElements(d.yExtent.x,d.yExtent.y,d.yExtent.z,0),m=e$29.fromElements(d.zExtent.x,d.zExtent.y,d.zExtent.z,0),g=new p$1e(p.x,_.x,m.x,p.y,_.y,m.y,p.z,_.z,m.z);h._orientedBoundingBox=new y$Z(f,g),h._orientedBoundingBox._updateBBox(),h.min=h._orientedBoundingBox.bbox[0].clone(),h.max=h._orientedBoundingBox.bbox[0].clone();for(var x,v=1;v<8;v++)x=h._orientedBoundingBox.bbox[v],h.min.x>x.x&&(h.min.x=x.x),h.min.y>x.y&&(h.min.y=x.y),h.min.z>x.z&&(h.min.z=x.z),h.max.x<x.x&&(h.max.x=x.x),h.max.y<x.y&&(h.max.y=x.y),h.max.z<x.z&&(h.max.z=x.z);var y=o$1p.distance(h._orientedBoundingBox.center,h._orientedBoundingBox.bbox[0]);p$1d.multiplyByPoint(r,f,f),p$1d.multiplyByVector(r,p,p),p$1d.multiplyByVector(r,_,_),p$1d.multiplyByVector(r,m,m),h._orientedBoundingBox.center=f,h._orientedBoundingBox.halfAxes[0]=p.x,h._orientedBoundingBox.halfAxes[1]=p.y,h._orientedBoundingBox.halfAxes[2]=p.z,h._orientedBoundingBox.halfAxes[3]=_.x,h._orientedBoundingBox.halfAxes[4]=_.y,h._orientedBoundingBox.halfAxes[5]=_.z,h._orientedBoundingBox.halfAxes[6]=m.x,h._orientedBoundingBox.halfAxes[7]=m.y,h._orientedBoundingBox.halfAxes[8]=m.z,h._orientedBoundingBox.areaDirty=1,h._boundingSphere=new i$1c(f,y)}else h._boundingSphere=_0x5cb704(c.tileInfo.boundingBox,r),h._orientedBoundingBox=_0x3586c0(c.tileInfo.boundingBox,r),h.max=o$1p.fromElements(c.tileInfo.boundingBox.max.x,c.tileInfo.boundingBox.max.y,c.tileInfo.boundingBox.max.z),h.min=o$1p.fromElements(c.tileInfo.boundingBox.min.x,c.tileInfo.boundingBox.min.y,c.tileInfo.boundingBox.min.z);h._parent=a._parentPagelod,h._depth=a._depth,(!e$2b(n.state)||"AllLeaf"!=n.state)&&(a._childrenPageLod.push(h),a._pagelodMap[h._rangeDataList]=h,_0x564fb6(e,a,h,c.tileInfo,r,o))}}}}function _0x2d2c6b(e,t,i){for(var n=[],r=0;r<e._childrenPageLod.length;r++)e._childrenPageLod[r]._entity._skipLevel=i,n.push(e._childrenPageLod[r]._entity);for(;n.length<t&&n.length>0;){for(var o=[],a=0;a<n.length;a++)for(var s=0;s<n[a]._childrenPageLod.length;s++)n[a]._childrenPageLod[s]._entity._skipLevel=i,o.push(n[a]._childrenPageLod[s]._entity);n=o}if(n.length>0)for(s=0;s<n.length;s++)n[s]._needLoad=!0,_0x2d2c6b(n[s],t,i+1)}function _0x3687f4(e){1==e._childrenPageLod.length?_0x3687f4(e._childrenPageLod[0]._entity):e._needLoad=!0}function _0x69d08c(e,t,i){var n=i._matModel;t._configReady=!0,t._configLoadState=N$P.LOADED;var r=t._relativePath;if(e$2b(e.lodTreeExport.tileInfo.children))for(var o=0,a=e.lodTreeExport.tileInfo.children.length;o<a;o++){t._boundingSphere=_0x5cb704(e.lodTreeExport.tileInfo.boundingBox,n);var s=e.lodTreeExport.tileInfo.children[o];if(e$2b(s.tileInfo)&&(""===s.tileInfo.modelPath&&(t._hasLeafChild=!0),""!==s.tileInfo.modelPath)){var l=new _0x46a5cb;if(l._fileType=i._fileType,l._rangeList=s.tileInfo.rangeValue,l._rangeDataList=s.tileInfo.modelPath,l._rangeDataList=l._rangeDataList.replace(/.s3mb*/g,""),0===l._rangeDataList.indexOf("./")&&(l._rangeDataList=l._rangeDataList.substring(2)),"pixelSizeOnScreen"===s.tileInfo.rangeMode?l._rangeMode=_0x2056d1.PIXEL_SIZE_ON_SCREEN:"geometricError"===s.tileInfo.rangeMode&&(l._rangeMode=_0x2056d1.GEOMETRY_ERROR),s.tileInfo.boundingBox.xExtent){var u=s.tileInfo.boundingBox,c=o$1p.fromElements(u.center.x,u.center.y,u.center.z),h=e$29.fromElements(u.xExtent.x,u.xExtent.y,u.xExtent.z,0),d=e$29.fromElements(u.yExtent.x,u.yExtent.y,u.yExtent.z,0),f=e$29.fromElements(u.zExtent.x,u.zExtent.y,u.zExtent.z,0),p=new p$1e(h.x,d.x,f.x,h.y,d.y,f.y,h.z,d.z,f.z);l._orientedBoundingBox=new y$Z(c,p),l._orientedBoundingBox._updateBBox(),l.min=l._orientedBoundingBox.bbox[0].clone(),l.max=l._orientedBoundingBox.bbox[0].clone();for(var _,m=1;m<8;m++)_=l._orientedBoundingBox.bbox[m],l.min.x>_.x&&(l.min.x=_.x),l.min.y>_.y&&(l.min.y=_.y),l.min.z>_.z&&(l.min.z=_.z),l.max.x<_.x&&(l.max.x=_.x),l.max.y<_.y&&(l.max.y=_.y),l.max.z<_.z&&(l.max.z=_.z);var g=o$1p.distance(l._orientedBoundingBox.center,l._orientedBoundingBox.bbox[0]);p$1d.multiplyByPoint(n,c,c),p$1d.multiplyByVector(n,h,h),p$1d.multiplyByVector(n,d,d),p$1d.multiplyByVector(n,f,f),l._orientedBoundingBox.center=c,l._orientedBoundingBox.halfAxes[0]=h.x,l._orientedBoundingBox.halfAxes[1]=h.y,l._orientedBoundingBox.halfAxes[2]=h.z,l._orientedBoundingBox.halfAxes[3]=d.x,l._orientedBoundingBox.halfAxes[4]=d.y,l._orientedBoundingBox.halfAxes[5]=d.z,l._orientedBoundingBox.halfAxes[6]=f.x,l._orientedBoundingBox.halfAxes[7]=f.y,l._orientedBoundingBox.halfAxes[8]=f.z,l._orientedBoundingBox.areaDirty=1,l._boundingSphere=new i$1c(c,g)}else l._boundingSphere=_0x5cb704(s.tileInfo.boundingBox,n),l._orientedBoundingBox=_0x3586c0(s.tileInfo.boundingBox,n),l.max=o$1p.fromElements(s.tileInfo.boundingBox.max.x,s.tileInfo.boundingBox.max.y,s.tileInfo.boundingBox.max.z),l.min=o$1p.fromElements(s.tileInfo.boundingBox.min.x,s.tileInfo.boundingBox.min.y,s.tileInfo.boundingBox.min.z);l._parent=void 0,l._depth=t._depth,t._childrenPageLod.push(l),t._pagelodMap[l._rangeDataList]=l,e$2b(t._parent)?t._rootName=t._parent._rootName:t._rootName=t._fileName,l._rootName=t._rootName,_0x564fb6(i,t,l,s.tileInfo,n,r)}}_0x2d2c6b(t,i._maxSkipNum,t._skipLevel),t._isRootTile&&_0x3687f4(t)}function _0x1c0e8c(e,t){var i=u$_(e._indexFilePath,e._fileName);i=i.replace(".json","");var n,r,o=e._relativePath.resolve(t._baseUri)+i+".json";(o=o.replace(/\+/g,"%2B"),e$2b(t._wstTaskProcessor))?(r=t._isS3MBlock?o.substring(o.indexOf("data/path/")+9):o.substring(o.indexOf("/data/")+5),r=decodeURIComponent(r),n=t._wstTaskProcessor.scheduleTask({data:r,dataType:"json"})):(e$2b(a$O.CREDENTIAL)&&(o=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,o):a$O.addToken(o)),n=u$Q(o,void 0,new r$1b({url:o,throttle:!1,throttleByServer:!0,serverKey:r$1a.getServerKey(o)})));e$2b(n)&&(e._configLoadState=N$P.LOADING,n.then((function(i){if(e$2b(i)){if(e._needLoad=!1,_0x69d08c(i,e,t),e$2b(t._layerScheduler._indexedDBScheduler)){var n={blob:i,key:e._relativePath.toString()+e._fileName+".json",tablename:t._layerScheduler.tablename,dbname:t._layerScheduler._indexedDBScheduler.dbname};_0x46a73d.indexTaskProcessor.scheduleTask(n,[])}}else e._configLoadState=N$P.UNLOAD}),(function(t){e$2b(t)?e._configLoadState=N$P.FAILED:e._configLoadState=N$P.UNLOAD})))}_0x2e6772.prototype.loadConfig=function(e){if(e._configLoadState===N$P.UNLOAD){var t=this._layer,i=u$_(e._indexFilePath,e._fileName);i=i.replace(".json","");var n=e._relativePath.toString()+i+".json";if(e$2b(window.Proxy)&&(!0===this._indexedDBSetting.isGeoTilesSave||this._indexedDBSetting.isGeoTilesRootNodeSave&&this._isRootNode(n)))if(e$2b(this._indexedDBScheduler)){var r=this._indexedDBScheduler.getElementFromDB(this.tablename,n);e$2b(r)?(e._configLoadState=N$P.LOADING,r.then((function(i){e$2b(i)?_0x69d08c(i,e,t):(e._configLoadState=N$P.UNLOAD,_0x1c0e8c(e,t))}),(function(i){e._configLoadState=N$P.UNLOAD,_0x1c0e8c(e,t)}))):(e._configLoadState=N$P.UNLOAD,_0x1c0e8c(e,t))}else _0x1c0e8c(e,t);else _0x1c0e8c(e,t)}},_0x2e6772.prototype.loadEntity=function(e){var t=e._s3mLoadState,i=this._layer;this._cacheKey;var n,r,o,a,s=this;if(_0x2438b4(e,i._frameState)){if(N$P.UNLOAD===t)if(i._isS3MBlock&&i._blockCache.contains(i._id,e._blockKey))e.s3mBuffer=i._blockCache.get(i._id,e._blockKey),t=e._s3mLoadState=N$P.LOADED;else{if(!e$2b(e.request)){var l=".s3m",u="s3m";i._isS3MBlock?l=".s3mblock":i._isS3MB?(l=i._isS3MZ?".s3mbz":".s3mb",u=i._isS3MZ?"s3mbz":"s3mb"):i._isOSGB&&(l=".osgb",l=".osgb"),e._fileName=e._fileName.replace(/\0/,"");var c=e._relativePath.resolve(i._baseUri)+e._fileName+l;if(i.subdomains&&(c=c.replace(/(.*realspace)/,i._subdomainsUrlScheme)),c=c.replace(/\+/g,"%2B"),i._urlType===Tr$3.KEY_VALUE){n=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),r=i._urlArguments;var h={layerName:i.name,rootTile:n,tile:e._fileName,suffix:u};o=m$1b(h=Object.assign(h,r),!0),(a=c.match(/(\S*)\/datas/)).length>0&&(c=a[0]+"?"+o)}e.request=new r$1b({url:c,throttle:!0,throttleByServer:!0,serverKey:r$1a.getServerKey(c),priorityFunction:this.createPriorityFunction(e,this)})}var d=e._relativePath.toString()+e._fileName;if(e$2b(window.Proxy)&&(!0===this._indexedDBSetting.isGeoTilesSave||this._indexedDBSetting.isGeoTilesRootNodeSave&&this._isRootNode(d)))if(e$2b(this._indexedDBScheduler)&&this._indexedDBRequestNum<this._indexedDBRequestLimit){this._indexedDBRequestNum++;s=this;var f=this._indexedDBScheduler.getElementFromDB(this.tablename,d);e$2b(f)?(e._s3mLoadState=N$P.LOADING,f.then((function(t){s._indexedDBRequestNum--,e$2b(t)?(e._s3mLoadState=N$P.PARSING,e.s3mBuffer=null,e.volBuffer=null,i._isS3MB?i._isS3MBlock?_0x1309b8.parseChildGroup(t,s._layer,e):_0x1309b8.parseResult(t,s._layer,e):_0x215208.parseResult(t,s._layer,e,e.volBuffer)):(e._s3mLoadState=N$P.UNLOAD,_0x4675f7(e,s))}),(function(t){s._indexedDBRequestNum--,e._s3mLoadState=N$P.UNLOAD,_0x4675f7(e,s)}))):(this._indexedDBRequestNum--,e._s3mLoadState=N$P.UNLOAD,_0x4675f7(e,s))}else _0x4675f7(e,s);else this._packingRequest?this._packRequestEntities.push(e):_0x4675f7(e,s)}if(N$P.PARSING===t&&"InstanceModel"===i._dataType&&(e.skeletonState===_0x212e1c.STATE.SkeletonParsing?_0x212e1c.parse(i,e):e.skeletonState===_0x212e1c.STATE.SkeletonReady&&_0x1309b8.parseResultInstance(i,e)),N$P.PARSING===t&&e$2b(e.parsingResult)&&(i._isS3MB?i._isS3MBlock?_0x1309b8.parseChildGroup(e.parsingResult,i,e):_0x1309b8.parseResult(e.parsingResult,i,e):_0x215208.parseResult(e.parsingResult,i,e,e.volBuffer),e.parsingResult=null),N$P.LOADED===t&&(!1!==i._bVolume&&i.loadVolumeData?e._s3mLoadState===N$P.LOST?e._s3mLoadState=N$P.UNLOAD:e._s3mLoadState=N$P.LOADVOL:this._packingRequest?this._parsingEntities.push(e):i._isS3MB||i._isOSGB?_0x1309b8.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer):_0x215208.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer),i._S3MTileLoadedEvent.raiseEvent(e._boundingSphere)),N$P.PARSED===t&&e.transformResource(i._frameState,i,Number.MAX_VALUE),N$P.LOADVOL===t&&"vol"===i._strVolumeExt){var p,_,m;if(""===i._volName?(p=e._relativePath.resolve(i._baseUri)+e._fileName+"."+i._strVolumeExt,_=e._fileName):(p=e._relativePath.resolve(i._baseUri)+e._fileName+"_"+i._volName+"."+i._strVolumeExt,_=e._fileName+"_"+i._volName),i._urlType===Tr$3.KEY_VALUE){n=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),r=i._urlArguments;h={layerName:i.name,rootTile:n,tile:_,suffix:i._strVolumeExt};o=m$1b(h=Object.assign(h,r),!0),(a=p.match(/(\S*)\/datas/)).length>0&&(p=a[0]+"?"+o)}e$2b(a$O.CREDENTIAL)&&(p=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,p):a$O.addToken(p)),e$2b(e.request)||(e.request=new r$1b({url:p,throttle:!0,throttleByServer:!0,serverKey:r$1a.getServerKey(p),priorityFunction:this.createPriorityFunction(e,this)})),e$2b(m="png"===i._strVolumeExt?t$T(e.request.url,this._customRequestHeaders,e.request):o$10(e.request.url,this._customRequestHeaders,e.request))&&(e._s3mLoadState=N$P.LOADING,this._statistics.numberOfPendingRequests++,e.request=null,m.then((function(t){e._s3mLoadState=N$P.VOLLOADED,"png"===i._strVolumeExt?e.volImage=t:e.volBuffer=t,s._statistics.numberOfPendingRequests--,s._statistics.numberOfProcessingAttempted++}),(function(t){e$2b(t)?(s._statistics.numberOfPendingRequests--,e._s3mLoadState=N$P.VOLFAILED):(s._statistics.numberOfAttemptedRequests++,s._statistics.numberOfPendingRequests--,e._s3mLoadState=N$P.LOADVOL)})))}else N$P.LOADVOL===t&&("png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt)&&(e._s3mLoadState=N$P.VOLLOADED);(N$P.VOLLOADED===t||N$P.VOLFAILED===t)&&e$2b(e.s3mBuffer)&&("png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt?i._isS3MB?_0x1309b8.binaryDataParser(i,e,e.s3mBuffer,e.volImage):_0x215208.binaryDataParser(i,e,e.s3mBuffer,e.volImage):i._isS3MB?_0x1309b8.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer):_0x215208.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer))}},_0x2e6772.prototype.reloadVol=function(e){var t,i,n,r,o=this._layer;if(this._cacheKey,"vol"===o._strVolumeExt){var a,s,l;if(""===o._volName?(a=e._relativePath.resolve(o._baseUri)+e._fileName+"."+o._strVolumeExt,s=e._fileName):(a=e._relativePath.resolve(o._baseUri)+e._fileName+"_"+o._volName+"."+o._strVolumeExt,s=e._fileName+"_"+o._volName),o._urlType===Tr$3.KEY_VALUE){t=e._relativePath.path.replace(/\//g,"").replace(".",""),i=o._urlArguments;var u={layerName:o.name,rootTile:t,tile:s,suffix:o._strVolumeExt};n=m$1b(u=Object.assign(u,i),!0),(r=a.match(/(\S*)\/datas/)).length>0&&(a=r[0]+"?"+n)}if(e$2b(a$O.CREDENTIAL)&&(a=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,a):a$O.addToken(a)),e$2b(e.request)||(e.request=new r$1b({url:a,throttle:!0,throttleByServer:!0,serverKey:r$1a.getServerKey(a),priorityFunction:this.createPriorityFunction(e,this)})),l="png"===o._strVolumeExt?t$T(e.request.url,this._customRequestHeaders,e.request):o$10(e.request.url,this._customRequestHeaders,e.request),this._statistics.numberOfColorChangeProcessing++,e$2b(l)){e.request=null,e._reloadVol=!1,this._statistics.numberOfColorChangePending++;var c=this;l.then((function(t){if(c._statistics.numberOfColorChangePending--,"vol"===o._strVolumeExt&&e$2b(t)&&t.byteLength>7&&e$2b(e._volObj)){var i,n=new Uint8Array(t,8);i=null!=_0x7b4aed?_0x31323d(n):nt$9.inflate(n).buffer;var r=new Float64Array(i,0,1),a=new Uint32Array(i,48,1);if(0===r[0]||3200===a[0]||3201===a[0]){var s=0;0===r[0]&&(s=8);var l=new Float64Array(i,s,6),u=l[0],h=l[1],d=l[2],f=l[3],p=l[4]<l[5]?l[4]:l[5],_=l[4]>l[5]?l[4]:l[5],m={left:u,top:h,right:d,bottom:f,minHeight:p,maxHeight:_,width:d-u,length:h-f,height:_-p},g=new Uint32Array(i,48+s,7),x=g[0],v=g[1],y=g[2],$=g[3],b={nFormat:x,nSideBlockCount:v,nBlockLength:y,nLength:$,nWidth:g[4],nHeight:g[5],nDepth:g[6],imageArray:new Uint8Array(i,76+s,$*$*4)},T=o._context._id+"_"+o.id+"_"+e._relativePath.resolve(o._baseUri)+"_"+e._fileName,C=k$Q.FilterMode.LINEAR;e$2b(o._hypsometricSetting)&&o._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(C=k$Q.FilterMode.NEAREST),3201===b.nFormat&&e$2b(o._hypsometricSetting)&&_0x215208.convertFloat(b,o._hypsometricSetting,C);var S=Se$d.ReloadVolumeTexture(T,o._gl,o._context,b,C);e._volObj.volTexture=S,e._volObj.nFormat=b.nFormat,e._volObj.nSideBlockCount=b.nSideBlockCount,e._volObj.nBlockLength=b.nBlockLength,e._volObj.nLength=b.nLength,e._volObj.nWidth=b.nWidth,e._volObj.nHeight=b.nHeight,e._volObj.nDepth=b.nDepth,e._volObj.id=T,e._volObj.dataFloor=o._fMinValue,e._volObj.dataCeil=o._fMaxValue,e._volObj.volBounds=m}}c._statistics.numberOfColorChangeProcessing--}),(function(t){e$2b(t)||(c._statistics.numberOfColorChangeAttempted++,e._reloadVol=!0),c._statistics.numberOfColorChangePending--,c._statistics.numberOfColorChangeProcessing--}))}else this._statistics.numberOfColorChangeProcessing--}},_0x2e6772.prototype.reloadVolMapping=function(e){var t=this._layer;if("vol_texture_mapping"===t._strVolumeExt){var i=t._context;for(var n in e._volTextures){this._statistics.numberOfColorChangeProcessing++;var r=n,o=e._volTextures[r],a=t._id+i._id,s=r.substring(0,r.length-a.length)+"_"+e._fileName;s=""!==t._volName?s+"_"+t._volName:s,s+=".vol";var l=e._relativePath.resolve(t._baseUri)+s;if(0!=t.urlType){var u=t._urlArguments,c=l.indexOf("datas")+5,h=u.layer3DName,d=l.substring(l.indexOf("/path/")+6).split("/"),f=d[0],p=d[1].substring(0,d[1].indexOf(".")),_=d[1].substring(d[1].indexOf(".")+1,d[1].length);for(var n in l=l.substring(0,c)+"?layerName="+h+"&rootTile="+f+"&tile="+p+"&suffix="+_,u)l=l+"&"+n+"="+u[n]}var m=o$10(l,this._customRequestHeaders);if(e$2b(m)){this._statistics.numberOfColorChangePending++;var g=this;m.then((function(i){if(g._statistics.numberOfColorChangePending--,e$2b(i)){var n,r=void 0,a=new Uint8Array(i,8);if(n=null!=_0x7b4aed?_0x31323d(a):nt$9.inflate(a).buffer,1===new Float64Array(n,0,1)[0]){var s=new Uint32Array(n,8,4),l=s[0],u=s[1],c=s[2];r={nFormat:l,nWidth:u,nHeight:c,nPixelSize:s[3],imageArray:new Float32Array(n,24,u*c)}}if(e$2b(r)){var h=_0x215208.convertFloatTexture(r,t._hypsometricSetting,t._hypsometricSetting.filterMode);o.copyFrom({width:r.nWidth,height:r.nHeight,arrayBufferView:h})}g._statistics.numberOfColorChangeProcessing--,i=null,e._reloadVol=!1}}),(function(e){g._statistics.numberOfColorChangePending--,g._statistics.numberOfColorChangeAttempted++,g._statistics.numberOfColorChangeProcessing--}))}else this._statistics.numberOfColorChangeProcessing--}}},_0x2e6772.prototype.dealWithPrepareLoad=function(e){if(this._requestByteLength+=e,this._requestByteLength>this._layer._prepareLoadSize)this._layer._prepareLoadEvent.raiseEvent(100),this._prepareLoaded=!0,this.refreshPrepareLoad();else{var t=Math.floor(100*this._requestByteLength/this._layer._prepareLoadSize);t>this._prepareRatio&&(this._prepareRatio=t,this._layer._prepareLoadEvent.raiseEvent(t))}};var _0x5233c6=/({.*?})/g;function _0x4675f7(e,t){var i,n=e.request.url;if(e$2b(t._layer._wstTaskProcessor)){var r;r=t._layer._isS3MBlock?e.request.url.substring(e.request.url.indexOf("data/path/")+9):e.request.url.substring(e.request.url.indexOf("/data/")+5),r=decodeURIComponent(r),i=t._layer._wstTaskProcessor.scheduleTask({dataType:"arraybuffer",data:r})}else{if(e$2b(t._layer._subdomains)){var o=t._layer._subdomains,a=o[e._subdomainIndex%o.length];n=n.replace(_0x5233c6,(function(e,t){return"{s}"===t?a:e}))}e$2b(a$O.CREDENTIAL)&&(n=e$2b(a$O.CREDENTIAL._keymap[n])?a$O.addTokenWithKey(t._scpUrl,n):a$O.addToken(n)),i=o$10(n,t._customRequestHeaders,e.request)}e$2b(i)?(e._s3mLoadState=N$P.LOADING,t._statistics.numberOfPendingRequests++,i.then((function(i){if(e$2b(t._layer._wstTaskProcessor)&&(!e$2b(i)||!e._isVisible||!ti$3.update(t._layer._context.memorySize)))return e._s3mLoadState=N$P.UNLOAD,void(e.request=null);t._prepareLoaded||t.dealWithPrepareLoad(i.byteLength),e.request=null,t._statistics.numberOfPendingRequests--,e._s3mLoadState===N$P.LOADING&&(t._layer._isS3MBlock&&t._layer._blockCache.set(t._layer._id,e._blockKey,i),0!=t._cacheKey.length?e.s3mBuffer=_0xfdcb2c(i,t._cacheKey):e.s3mBuffer=i,e._s3mLoadState=N$P.LOADED,t._statistics.numberOfProcessingAttempted++)}),(function(i){e.request=null,e$2b(i)?(t._statistics.numberOfPendingRequests--,e._s3mLoadState=N$P.FAILED):(t._statistics.numberOfAttemptedRequests++,t._statistics.numberOfPendingRequests--,e._s3mLoadState=N$P.UNLOAD)}))):e.request=null}function _0x1c0125(e,t,i){var n=t._layer;if(n.hasAttributeIndex&&i){if(e.leafAttrLoadState===N$P.LOADED)return}else if(t.attrsave||e.attrLoadState===N$P.LOADED)return;var r=t;e$2b(n._queryFieldNames)&&"attribute"===n._attributeExtentName&&(i||(e.attrLoadState=N$P.LOADING),r._indexedDBSetting.isAttributesSave?r._indexedDBScheduler.checkObjectStoreExit(e._fileName)?r._indexedDBScheduler.getElementFromDB(e._fileName,"saved").then((function(i){1==i?r._indexedDBScheduler.db.transaction(e._fileName).objectStore(e._fileName).get("obj").onsuccess=function(i){var n=i.target.result.value,r=new FileReader;r.onload=function(){var i=JSON.parse(r.result);t._attributes=Object.assign(t._attributes,i),e.attrLoadState=N$P.LOADED},r.readAsText(n)}:_0x21eae3(e,t)})).otherwise((function(){_0x21eae3(e,t)})):_0x21eae3(e,t):_0x21eae3(e,t,i))}function _0x21eae3(e,t,i){var n=t._layer;if((!t.attrsave||n.hasAttributeIndex)&&e$2b(n._queryFieldNames)){var r="attribute"===n._attributeExtentName?".attribute":n._isS3MB?".s3md":".scvd",o=t,a=e._attrAppend.length>0?e._attrAppend:n._queryFieldNames,s=a.join(";"),l=()=>{};e$2b(a$O.CREDENTIAL)&&(l=e$2b(a$O.CREDENTIAL._keymap[o._scpUrl])?e=>a$O.addTokenWithKey(o._scpUrl,e):e=>a$O.addToken(e));var u=r;if(n.hasAttributeIndex&&i&&(u="_1"+r),".attribute"===r){var c="";c=n._fieldsInfo._hash.hasOwnProperty("smid")?"?fields=smid;"+s:"?fields=SmID;"+s;var h="",d=[],f=n._baseUri.toString(),p=n._indexInfoAttributeMap;if(e$2b(p))for(var _=p[e._relativePath.path+e._fileName],m=0;m<_.length;m++)l(h=f+_[m].url+c),d.push(o$10(h));else{if(h=""===e._relativePath.toString()?f+e._rootName:e._relativePath.resolve(n._baseUri).toString()+f$O(e._relativePath.toString().replace(/\/$/,"")),h+=u+c,n._urlType===Tr$3.KEY_VALUE){var g=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),x=n._urlArguments,v={layerName:n.name,rootTile:g,tile:e._fileName,suffix:"attribute",fields:s},y=m$1b(v=Object.assign(v,x),!0),$=h.match(/(\S*)\/datas/);$.length>0&&(h=$[0]+"?"+y)}l(h),d.push(o$10(h))}d.length>0?(n.hasAttributeIndex&&i?e.leafAttrLoadState=N$P.LOADING:e.attrLoadState=N$P.LOADING,o$1l.all(d,(function(t){o.attrsave=!0,n.hasAttributeIndex&&i?e.leafAttrLoadState=N$P.LOADED:e.attrLoadState=N$P.LOADED,e._attrAppend=[];for(let i=0;i<t.length;i++){var r=t[i],s=new Int32Array(r,0,1);s=s[0];for(var l=new Int32Array(r,4,s),u=[],c=0;c<s;c++)u.push(l[c]);var h=Math.floor(u[0]/4.125),d=C=Math.ceil(h/8),f=new Int8Array(r,4*(s+1)+C,4*h),p=f.subarray(0,4*h),_=new Int8Array(p);f=new Int32Array(_.buffer);var m=4*(s+1)+u[0],g=[],x=[];for(c=1;c<=a.length;c++){var v=o._layer._fieldsInfo,y=a[c-1],$=v.get(y),b=$.type,T=Number($.size);h=Math.floor(u[c]/(T+.125));var C=Math.ceil(h/8);(10==b||"ntext"===b||"text"===b)&&(T=1,C=d,h=u[c]-C);var S=new Uint8Array(r,m,C);g.push(S);var w=new Int8Array(r,m+C,h*T).subarray(0,h*T);_=new Int8Array(w);if(4==b||"int32"===b)w=new Int32Array(_.buffer);else if("int16"===b)w=new Int16Array(_.buffer);else if(16==b||"int64"===b)w=new BigInt64Array(_.buffer);else if(6==b||"float"===b)w=new Float32Array(_.buffer);else if(7==b||"double"===b)w=new Float64Array(_.buffer);else if(10==b||"ntext"===b||"text"===b){for(var E=new DataView(w.buffer.slice(m+C,m+C+h*T)),P=0,A=[];P<E.byteLength;){var L=E.getInt32(P,!0);if((P+=4)+L>_.buffer.byteLength||L<0)break;var M=new Uint8Array(_.buffer,P,L);P+=L;var R=a$K(M,void 0,void 0,"gbk");A.push(R)}w=A}m+=u[c],x.push(w)}var I={};for(c=0;c<f.length;c++){for(var O={},D=0;D<x.length;D++){0!=(g[D][Math.floor(c/8)]>>7-c%8&1)?O[a[D]]=x[D][c]:O[a[D]]=null}e$2b(o._attributes[f[c]])&&(O=p$19(O,o._attributes[f[c]])),o._attributes[f[c]]=O,I[f[c]]=O}if(o._indexedDBSetting.isAttributesSave){var B=new Blob([JSON.stringify(I)],{type:"application/json"});if(o._indexedDBScheduler.checkObjectStoreExit(e._fileName))o._indexedDBScheduler.putElementInDB(e._fileName,"obj",B).then((function(){o.attrsave=!1,o._indexedDBScheduler.putElementInDB(e._fileName,"saved",!0),f=null})).otherwise((function(){o._indexedDBScheduler.clear(e._fileName),o.attrsave=!1,f=null}));else o._indexedDBScheduler.createObjectStore(e._fileName).then((function(){o._indexedDBScheduler.putElementInDB(e._fileName,"obj",B).then((function(){o.attrsave=!1,o._indexedDBScheduler.putElementInDB(e._fileName,"saved",!0),f=null})).otherwise((function(){o.attrsave=!1,f=null}))})).otherwise((function(e){o.attrsave=!1,f=null}))}else o.attrsave=!1}if(e$2b(n.themeStyle))for(var N,F=[e];N=F.pop();)for(var U=0;U<N._childrenPageLod.length;U++)for(var z=N._childrenPageLod[U],G=0;G<z._renderEntityList.length;G++){z._renderEntityList[G].updateTheme(n),e$2b(z._entity)&&F.push(z._entity)}})).otherwise((function(t){o.attrsave=!1,e$2b(t)?n.hasAttributeIndex&&i?e.leafAttrLoadState=N$P.FAILED:e.attrLoadState=N$P.FAILED:n.hasAttributeIndex&&i?e.leafAttrLoadState=N$P.UNLOAD:e.attrLoadState=N$P.UNLOAD}))):n.hasAttributeIndex&&i?e.leafAttrLoadState=N$P.UNLOAD:e.attrLoadState=N$P.UNLOAD}}}function _0x50cee8(e,t){if(e$2b(t._cartographic))if(e instanceof Array){for(var i=[],n=0;n<e.length;n++){var r=e[n];if(e$2b(r)&&(r instanceof h$Q||r instanceof i$O)){var o=r.getImagery(t._cartographic);i=i.concat(o)}}i.length>0&&(t.setImagerys(i,t._cartographic),t._imageRasterFinish=!1,t._imageryLevels=[])}else{if(e$2b(e)&&(e instanceof h$Q||e instanceof i$O))(i=e.getImagery(t._cartographic)).length>0&&(t.setImagerys(i,t._cartographic),t._imageRasterFinish=!1,t._imageryLevels=[])}}function _0x53a47e(e){const t=e._layer,i=t.attrDatas;if(!e$2b(i)||0===i.length)return;const n=t._fieldsInfo,r="attribute"===t._attributeExtentName?".attribute":t._isS3MB?".s3md":".scvd",o=performance.now();for(;i.length;){if(_0xbea8e7(_0x2eee9a(i.pop(),r,n),e),performance.now()-o>10)break}}function _0x32915a(e){const t=e._layer,i=t.attrDatas,n=e._savetoIndexDBDatas;if(e$2b(i)&&0===i.length&&0!==n.length&&0===i.length){e._attrloaded||(e._attrloaded=!0,t.attributeDownloaded.raiseEvent(t.name+" attribute downloaded."));const i=performance.now();for(;n.length;){if(_0x4a3e23(e,n.pop()),performance.now()-i>1)break}}}function _0x298688(e,t){var i=e._statistics,n=e._statisticsLastRender,r=i.numberOfPendingRequests,o=i.numberOfTilesProcessing,a=n.numberOfPendingRequests,s=n.numberOfTilesProcessing,l=r!==a||o!==s,u=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests&&0===i.numberOfProcessingAttempted,c=i.numberOfColorChangePending,h=n.numberOfColorChangePending,d=i.numberOfColorChangeProcessing,f=n.numberOfColorChangeProcessing,p=(c!==h||d!==f)&&0===i.numberOfColorChangeAttempted&&0===c&&0===d;Date.now()-i.lastLoadedTrigger.time>2e3&&i.lastLoadedTrigger.done&&t.afterRender.push((function(){e._layer._allTilesLoaded.raiseEvent(),i.lastLoadedTrigger.done=!1})),l&&u&&(i.lastLoadedTrigger.done=!0,i.lastLoadedTrigger.time=Date.now()),Date.now()-i.lastColorChangeTrigger.time>2e3&&i.lastColorChangeTrigger.done&&t.afterRender.push((function(){e._layer._colorTableChanged.raiseEvent(),i.lastColorChangeTrigger.done=!1})),p&&u&&(i.lastColorChangeTrigger.done=!0,i.lastColorChangeTrigger.time=Date.now())}_0x2e6772.prototype._clearIndexedDBCache=function(){e$2b(this._indexedDBScheduler)&&this._indexedDBScheduler.clear(this.tablename)},_0x2e6772.prototype._refreshVolume=function(){if(this._layer._bVolume){var e=[],t={};if("vol"===this._layer._strVolumeExt){for(var i=0,n=this._rootEntities.length;i<n;i++){e$2b(r=this._rootEntities[i])&&e$2b(r._fileName)&&(t[r._relativePath.resolve(this._layer._baseUri)+r._fileName]=r,e.push(r))}for(;s=e.pop();)for(i=0,n=s._childrenPageLod.length;i<n;i++){if(e$2b((o=s._childrenPageLod[i])._entity)&&e$2b(o._entity._fileName))e$2b(t[u=o._entity._relativePath.resolve(this._layer._baseUri)+o._entity._fileName])||(t[u]=o._entity),e.push(o._entity)}}else if("vol_texture_mapping"===this._layer._strVolumeExt){for(i=0,n=this._rootEntities.length;i<n;i++){var r;e$2b((r=this._rootEntities[i])._volTextures)&&(t[r.name]=r,e.push(r))}for(;s=e.pop();)for(i=0,n=s._childrenPageLod.length;i<n;i++){var o;e$2b((o=s._childrenPageLod[i])._entity)&&e$2b(o._entity._volTextures)&&(t[r.name]=o._entity,e.push(o._entity))}}if(this._layer._refreshVolume)for(var a in this._layer._refreshVolume=!1,t)t[a]._reloadVol=!0;if("vol"===this._layer._strVolumeExt)for(var a in t){var s;if(e$2b(s=t[a])&&s._isParsed&&e$2b(s._volObj)&&s._reloadVol){var l=this._layer,u=l._context._id+"_"+l.id+"_"+s._relativePath.resolve(l._baseUri)+"_"+s._fileName;s._volObj.id==u&&this.reloadVol(s)}}else if("vol_texture_mapping"===this._layer._strVolumeExt)for(var a in t)t[a]._reloadVol&&this.reloadVolMapping(t[a]);e.length=0,t=[]}},_0x2e6772.prototype._refreshImage=function(){if(e$2b(this._layer._imageryLayer)){for(var e=[],t={},i=0;i<this._rootEntities.length;i++){var n=this._rootEntities[i];if(e$2b(n)&&e$2b(n._fileName))for(var r=0;r<n._childrenPageLod.length;r++)for(var o=n._childrenPageLod[r],a=0;a<o._renderEntityList.length;a++){_0x50cee8(this._layer._imageryLayer,o._renderEntityList[a]);for(var s=o._renderEntityList[a]._imagerys.length,l=0;l<s;l++){for(var u=o._renderEntityList[a]._imagerys[l];e$2b(u.parent)&&u.level>u.imageryLayer._imageryProvider.minimumLevel&&!(u=u.parent).rectangle.contains(this._layer.layerBounds););t[JSON.stringify([u.x,u.y,u.level,u.imageryLayer._layerIndex])]=u}e$2b(o._entity)&&e$2b(o._entity._fileName)&&e.push(o._entity)}}for(var c in t)t[c].processStateMachine(this._layer._frameState,!1);for(var h;h=e.pop();)for(i=0,r=h._childrenPageLod.length;i<r;i++){for(o=h._childrenPageLod[i],a=0;a<o._renderEntityList.length;a++)_0x50cee8(this._layer._imageryLayer,o._renderEntityList[a]);e$2b(o._entity)&&e$2b(o._entity._fileName)&&e.push(o._entity)}e.length=0}},_0x2e6772.prototype._hideImage=function(e){if(e$2b(this._layer._imageryLayer)){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i];e$2b(r)&&e$2b(r._fileName)&&t.push(r)}for(var o;o=t.pop();)for(i=0,n=o._childrenPageLod.length;i<n;i++){for(var a=o._childrenPageLod[i],s=0;s<a._renderEntityList.length;s++)a._renderEntityList[s]._showImagerysImmediate=!1;e$2b(a._entity)&&e$2b(a._entity._fileName)&&t.push(a._entity)}t.length=0}},_0x2e6772.prototype.update=function(e,t,i){this._updateSceneMode(t.camera);var n=t.passes.pick;this._statistics.numberOfAttemptedRequests=0,this._statistics.numberOfColorChangeAttempted=0,!n&&!t._fboState.enabled&&(this.LoadingPriority===_0x10659f.UsePagedLodInfo?this._scheduleSkip(t):this._schedule(t)),this._refreshVolume(),this._updatePolygons(),this._updateRenderQueue(e,t,i),t.passes.render&&_0x298688(this,t),this._statisticsLastRender=p$19({},this._statistics),this.traverseRenderEntityRecursionForObjsTranslate(),_0x53a47e(this),_0x32915a(this)},_0x2e6772.prototype._updateRenderQueue=function(e,t,i){if(this.LoadingPriority,_0x10659f.UsePagedLodInfo,i.length,this._layer._fileType===d$15.ClampGroundRealtimeRasterCache){this._rasterFrequency++,40==this._rasterFrequency&&(this._rasterFrequency=0),t.rasterPerFrame=this._layer.rasterPerFrame;for(var n=0,r=this._renderQueue.length;n<r;n++){(o=this._renderQueue[n]).isDestroyed()||o.update(e,t,i,this._layer)}}else for(n=0,r=this._renderQueue.length;n<r;n++){var o;(o=this._renderQueue[n]).isDestroyed()||o.update(e,t,i,this._layer)}},_0x2e6772.prototype._updatePolygons=function(){if(e$2b(this._extrudedId)&&e$2b(this._polygons)){for(var e=0,t=this._renderQueue.length;e<t;e++){var i=this._renderQueue[e],n=i._selectionInforMap._hash;if(e$2b(i._polygonId)){var r={};r[i._polygonId]=0,i.updateObjsOperation(r)}e$2b(n[this._extrudedId])?(i._polygons=this._polygons,i._polygonId=this._extrudedId):(i._polygons=void 0,i._polygonId=void 0,i._polygonCommands=[])}this._polygons=void 0}},_0x2e6772.prototype.saveLocalCache=function(e){if((!0===this._layer._indexedDBSetting.isGeoTilesSave||!0===this._layer._indexedDBSetting.isGeoTilesRootNodeSave||!0===this._layer._indexedDBSetting.isAttributesSave)&&e$2b(this._indexedDBScheduler)){var t={tablename:this.tablename,dbname:this._indexedDBScheduler.dbname};if(e.push(t),this._layer._isS3MBlock){t={tablename:this.tablename+"Texture",dbname:this._indexedDBScheduler.dbname};e.push(t)}}};var _0x35ee84=function(e,t){return e._disFromCamera-t._disFromCamera};function _0x303032(e){e._readyAncestor=void 0;var t=e._parentPagelod;if(e$2b(t)){e._readyAncestor=t._ready?t:t._readyAncestor;for(var i=e._childrenPageLod,n=i.length,r=0;r<n;r++){i[r]._readyAncestor=e._readyAncestor}var o=e._leafChildren;for(n=o.length,r=0;r<n;r++){o[r]._readyAncestor=e._readyAncestor}}}function _0x2342fa(e){return!e._isLeafTile&&e._needRefine}var _0x3df52c=new o$1p,_0x5f7fd8=new o$1p;function _0x3c9068(e,t,i){var n=i._boundingSphere;if(e$2b(n)){var r;if(i._isRootTile){var o=e.cullingVolume,a=e$2b(i._orientedBoundingBox)?i._orientedBoundingBox:n,s=i$W.MASK_INDETERMINATE;i._visibilityPlaneMask=o.computeVisibilityWithPlaneMask(a,s),r=i._visibilityPlaneMask!==i$W.MASK_OUTSIDE}else r=!0;var l=o$1p.distance(n.center,e.camera.position)-n.radius;l=Math.max(0,l),i._disFromCamera=l;var u=o$1p.subtract(n.center,e.camera.positionWC,_0x3df52c);i._centerZDepth=o$1p.dot(e.camera.directionWC,u),i._isVisible=r&&l<=t._visibleDistanceMax&&l>=t._visibleDistanceMin;var c=e.camera,h=n.radius,d=o$1p.multiplyByScalar(c.directionWC,i._centerZDepth,_0x5f7fd8),f=o$1p.add(c.positionWC,d,_0x5f7fd8),p=o$1p.subtract(f,n.center,_0x5f7fd8);if(o$1p.magnitude(p)>h){var _=o$1p.normalize(p,_0x5f7fd8),m=o$1p.multiplyByScalar(_,h,_0x5f7fd8),g=o$1p.add(n.center,m,_0x5f7fd8),x=o$1p.subtract(g,c.positionWC,_0x5f7fd8),v=o$1p.normalize(x,_0x5f7fd8);i._foveatedFactor=1-Math.abs(o$1p.dot(c.directionWC,v))}else i._foveatedFactor=0}else i._isVisible=!0}function _0x318ac6(e,t,i,n){if(e$2b(i._boundingSphere)){var r=e$2b(i._orientedBoundingBox)?i._orientedBoundingBox:i._boundingSphere,o=e.cullingVolume.computeVisibilityWithPlaneMask(r,n),a=o!==i$W.MASK_OUTSIDE;e$2b(i._entity)&&(i._entity._visibilityPlaneMask=o);var s=o$1p.subtract(i._boundingSphere.center,e.camera.positionWC,_0x3df52c);i._centerZDepth=o$1p.dot(e.camera.directionWC,s),i._isVisible=a}else i._isVisible=!0}function _0x2c6cd7(e,t){e._maximumPriority.distance=Math.max(t._disFromCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t._disFromCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t._skipLevel,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t._skipLevel,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t._foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t._foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.pixel=Math.max(t._avgPix,e._maximumPriority.pixel),e._minimumPriority.pixel=Math.min(t._avgPix,e._minimumPriority.pixel)}function _0x130130(e,t,i){var n=e.positionWC,r=t.radius,o=t.center,a=o$1p.distance(o,n),s=.5*e$2a.PI_OVER_FOUR;return 2*(.5*i/Math.tan(s)*r/a)}function _0x59356d(e,t,i){_0x3c9068(e,t,i),i._shouldSelect=!1,i._selected=!1,i._needRequest=!0,i._needRefine=!1;for(var n=i._childrenPageLod,r=n.length,o=0;o<r;o++){(s=n[o])._selected=!1,s._shouldSelect=!1,s._selectionDepth=0,s._stackLength=0,s._finalResolution=!0,s._needRefine=!1,_0x318ac6(e,t,s,i._visibilityPlaneMask),s._isVisible&&(s.calcPixFromCam(e.camera,t._context,t._lodRangeScale,t._fileType,t.LoadingPriority),t._layerScheduler._prepareLoaded||(pageLod._isLessLodDis&&(i._prepareLoad=!0),pageLod._isLessLodDis=!1),s._isLessLodDis||(i._needRefine=!0,s._needRefine=!0))}i._isRootTile&&(i._avgPix=_0x130130(e.camera,i._boundingSphere,t._context.drawingBufferHeight));var a=i._leafChildren;for(r=a.length,o=0;o<r;o++){var s;(s=a[o])._shouldSelect=!1,_0x318ac6(e,t,s,i._visibilityPlaneMask),s._selected=!1,s._needRefine=!1}_0x2c6cd7(t,i)}function _0x441312(e){return e._isVisible}function _0x189d09(e,t,i,n){var r=t._layer;if(n._depth>r._maxSkipLevel&&!n._ready)return!0;var o,a=n._childrenPageLod,s=a.length,l=[],u=!1;for(o=0;o<s;o++){var c=a[o];if(c._isVisible){var h=c._entity;e$2b(h)?(_0x59356d(e,r,h),c._isLessLodDis?u=!0:l.push(h)):u=!0}}n._childrenPageLod.sort(_0x450e29),s=(a=n._leafChildren).length,n._leafChildren.sort(_0x450e29),(n._hasLeafChild||n._leafChildren.length>0)&&(u=!0),s=l.length;var d,f=!1;for(o=0;o<s;o++)_0x441312(d=l[o])&&(i.push(d),f=!0);return!f||u}function _0x2f5f1d(e,t,i){var n=i._boundingVolume;i._isVisible=e.cullingVolume.computeVisibility(n)!==Ae$u.OUTSIDE}function _0x1d3adf(e){if(e._renderEntityList.length>0&&e._ready)return{state:0};var t=[];if(_0x1658d0(e)){for(var i=!1,n=e._entity._childrenPageLod,r=n.length,o=0,a=0,s=0;s<r;++s){if((u=n[s])._isVisible)1===(c=_0x1d3adf(u)).state?(t=t.concat(c.clipBounds),o++):2===c.state&&(t=t.concat(c.clipBounds),i=!0);else o++,a++}var l=(n=e._entity._leafChildren).length;for(s=0;s<l;++s){var u,c;if((u=n[s])._isVisible)0===r&&!e$2b(u.max)&&(u.max=e.max,u.min=e.min),1===(c=_0x1d3adf(u)).state?(t=t.concat(c.clipBounds),o++):2===c.state&&(t=t.concat(c.clipBounds),i=!0);else o++,a++}var h=l+r;return 0===l&&0===r||h===a?((t=[]).push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t}):0===t.length?{state:0}:i||o!==h?{state:2,clipBounds:t}:((t=[]).push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t})}return t.push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t}}function _0x44fb0e(e,t,i){if(!i._selected){i._selected=!0;for(var n=i._renderEntityList,r=n.length,o=0;o<r;o++){var a=n[o];if(a.ownerPagelod=i,_0x2f5f1d(e,t,a),a._isVisible)if(a._clipBounds=[],i._finalResolution)t._renderQueue.push(a);else{for(var s=i._entity._childrenPageLod,l=s.length,u=0;u<l;++u){var c=s[u];if(c._isVisible){var h=_0x1d3adf(c);0!=h.state&&(a._clipBounds=a._clipBounds.concat(h.clipBounds))}}a._clipBounds.length>0&&t._renderQueue.push(a)}}}}function _0x3cf52c(e,t,i){var n=t._layer,r=[];r.push(i);for(var o=!1;r.length>0;)for(var a=r.pop(),s=a._childrenPageLod,l=s.length,u=0;u<l;++u){_0x318ac6(e,n,s[u],a._visibilityPlaneMask);var c=s[u]._entity;e$2b(c)&&_0x441312(s[u])&&(s[u]._needRefine=!0,_0x1c01b6(t,c),c._ready?(o=!0,_0x59356d(e,n,c),_0x211f06(e,t,c)):r.push(c))}return o}function _0x211f06(e,t,i){if(!i._selected){i._selected=!0;for(var n=i._childrenPageLod,r=n.length,o=0;o<r;o++){!(s=n[o])._isVisible||(s._isLessLodDis||!e$2b(s._entity)||s._shouldSelect)&&(s._shouldSelect=!0)}var a=i._leafChildren;for(r=a.length,o=0;o<r;o++){var s;(s=a[o])._isVisible&&(s._shouldSelect=!0)}}}function _0x1c1e01(e,t,i){if(i._ready)_0x211f06(e,t,i);else{var n=i._readyAncestor;e$2b(n)&&(n._shouldSelect=!0),_0x3cf52c(e,t,i)}}function _0x2438b4(e,t){var i=e._boundingSphere;if(!e$2b(i))return!0;!e$2b(i)&&e$2b(e._orientedBoundingBox)&&(i=e._boundingSphere=i$1c.fromOrientedBoundingBox(e._orientedBoundingBox));var n=Math.max(2*i.radius,1),r=t.camera;return 60*(0!==r.positionWCDeltaMagnitude?r.positionWCDeltaMagnitude:r.positionWCDeltaMagnitudeLastFrame)/n<1}function _0x3e2b92(e,t,i){!i._ready&&i._needRequest&&_0x2438b4(i,e)&&(i._hasConfig&&!i._configReady&&(i._needLoad=!0,t.loadConfig(i)),e$2b(i._parent)&&0==i._skipLevel&&(i._parent._hasConfig?i._skipLevel=i._parent._skipLevel+1:i._skipLevel=i._parent._skipLevel),i._needRequest=!1,t._requestEntities.push({entity:i,priority:i._priority,owner:t}))}function _0x1c01b6(e,t){var i=e._replacementList,n=e._replacementSentinel;e$2b(t._replacementNode)?i.splice(n,t._replacementNode):t._replacementNode=i.add(t)}function _0x1658d0(e){if(e$2b(e._entity)&&e._entity._hasLeafChild)for(var t=0;t<e._entity._leafChildren.length;t++){if(!e._entity._leafChildren[t]._ready)return!1}return e._needRefine&&!e._isLeafNode}var _0x989595={stack:new r$R,stackMaximumLength:0,ancestorStack:new r$R,ancestorStackMaximumLength:0};function _0x157273(e,t,i){var n,r=e._layer,o=_0x989595.stack,a=_0x989595.ancestorStack;for(o.push(i);o.length>0||a.length>0;){if(_0x989595.stackMaximumLength=Math.max(_0x989595.stackMaximumLength,o.length),_0x989595.ancestorStackMaximumLength=Math.max(_0x989595.ancestorStackMaximumLength,a.length),a.length>0){var s=a.peek();if(s._stackLength===o.length){a.pop(),s!==n&&(s._finalResolution=!1),_0x44fb0e(t,e,s);continue}}var l=o.pop(),u=l._shouldSelect,c=_0x1658d0(l);if(u){if(l._selectionDepth=a.length,l._selectionDepth>0&&(r._hasMixedContent=!0),n=l,!c){_0x44fb0e(t,e,l);continue}a.push(l),l._stackLength=o.length}if(c){for(var h=l._entity._childrenPageLod,d=h.length,f=0;f<d;++f){(p=h[f])._isVisible&&o.push(p)}d=(h=l._entity._leafChildren).length;for(f=0;f<d;++f){var p;(p=h[f])._isVisible&&o.push(p)}}}}var _0x450e29=function(e,t){return 0===e._disFromCamera&&0===t._disFromCamera?e._centerZDepth-t._centerZDepth:e._disFromCamera-t._disFromCamera};function _0x115e29(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function _0x3daa9c(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(!(t>r-1)){n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e,n,a);n+=a}}}function _0x1b60d3(e,t){var i=t._fileName.split("_"),n=t.request.url;t.request.throttle=!0,t.request.throttleByServer=!0,t.request.type=V$15.PACK,t.request.quadKey=_0x115e29(i[2],i[1],i[0]),t.request.providerName=n.substring(n.indexOf("datas/")+6,n.indexOf("/data/"));var r=t$11.createIfNeeded(n).getDerivedResource({url:n,request:t.request}).fetchArrayBuffer();e$2b(r)?(t._s3mLoadState=N$P.LOADING,e._statistics.numberOfPendingRequests++,r.then((function(i){var n=_0x3daa9c(i,t.request.quadKeyIndex);e$2b(n)?(i=new Uint8Array(n).buffer,0!=e._cacheKey.length?t.s3mBuffer=_0xfdcb2c(i,e._cacheKey):t.s3mBuffer=i,t._s3mLoadState=N$P.LOADED,e._statistics.numberOfPendingRequests--,e._statistics.numberOfProcessingAttempted++,t.request=null):t._s3mLoadState=N$P.FAILED}),(function(i){e$2b(i)?(e._statistics.numberOfPendingRequests--,t._s3mLoadState=N$P.FAILED):(e._statistics.numberOfAttemptedRequests++,e._statistics.numberOfPendingRequests--,t._s3mLoadState=N$P.UNLOAD,t.request=null)}))):t.request=null}function _0x137248(e,t,i){e._isS3MBlock&&!i._isAncestorBlock||(e$2b(i._replacementNode)?t.splice(t.tail,i._replacementNode):i._replacementNode=t.add(i))}function _0x5e7644(e,t,i){var n=e._nLODLev;const r=new _0x206cda;r.layer=e.layer,r._subdomainIndex=e._subdomainIndex+i+1,!e$2b(r._volObj)&&e$2b(e._volObj)&&(r._volObj=e._volObj,Se$d.AddRef(e._volObj.id));var o=t._rangeDataList;if(o.indexOf("/")>-1){var a=o.lastIndexOf("/"),s=o.substring(0,a+1);r._fileName=o.substring(a+1),r._relativePath=new h$16(s).resolve(e._relativePath)}else r._relativePath=e._relativePath,r._fileName=o;return r._avgPix=t._pix,r._disFromCamera=t._disFromCamera,r._nLODLev=n+1,r._boundingSphere=t._boundingSphere,r._originalBS=t._originalBS,r._orientedBoundingBox=t._orientedBoundingBox,r}function _0x19a9a0(e,t){e$2b(e._entityObjectId[t._fileName])&&(e._entityObjectId[t._fileName]=void 0,e._objectIdChange=!0),e$2b(e._entityModelId[t._fileName])&&(e._entityModelId[t._fileName]=void 0,e._objectIdChange=!0)}function _0x8f920b(e,t){if(e$2b(e._associatedFieldName)&&e$2b(e._entityObjectId[t._fileName])){for(var i={},n=0;n<t._childrenPageLod.length;n++)for(var r=0;r<t._childrenPageLod[n]._renderEntityList.length;r++){var o=t._childrenPageLod[n]._renderEntityList[r];for(var a in o._selectionInforMap._hash)i[a]=e._attributes[a][e._associatedFieldName]}e._entityObjectId[t._fileName]=i,e._objectIdChange=!0}}function _0x4a338b(e,t){if(e._isFineLayer&&e$2b(e._entityModelId[t._fileName])){for(var i={},n=0;n<t._childrenPageLod.length;n++)for(var r=0;r<t._childrenPageLod[n]._renderEntityList.length;r++){var o=t._childrenPageLod[n]._renderEntityList[r];for(var a in o._selectionInforMap._hash)i[a]=a}e._entityModelId[t._fileName]=i,e._objectIdChange=!0}}function _0x59aca4(e,t,i){if(e$2b(t._hypsometricSetting))for(var n=e.positionWC,r=_0xf6df4(i,t._hypsometricSetting,n)&&_0x44603d(t._hypsometricSetting,e),o=0;o<i._renderEntityList.length;o++){i._renderEntityList[o]._isHypsometricVisible=r}}function _0x27b6a0(e,t){!e$2b(t._entity._volObj)&&e$2b(e._volObj)&&(t._entity._volObj=e._volObj,Se$d.AddRef(e._volObj.id))}function _0x38f75a(e,t){return o$1p.distance(e.center,t.center)<=e.radius+t.radius}function _0x5a5203(e,t){if(e._flattening){var i=t._boundingSphere;if(e$2b(i))for(var n=e._flattenRegions.values,r=0,o=n.length;r<o;r++){var a=n[r].boundingSphere;if(e$2b(a)&&_0x38f75a(i,a)){t.isFlatten=!0;break}}}}function _0x4c6d9a(e,t,i,n){var r,o=[];if(t instanceof Array)for(var a=0;a<t.length;a++){if(!t[a].imageryProvider.ready)return;var s=t[a].getMaxScaleLevel(e._cartographic);o.push(s),r=0===a?s:Math.max(r,s)}else{if(!t.imageryProvider.ready)return;r=t.getMaxScaleLevel(e._cartographic)}var l=Math.min(i,r);if(l>0&&!e.hasScaleImagerys(l)){var u=[];if(t instanceof Array)for(a=0;a<t.length;a++){var c=t[a].getImagery(e._cartographic,Math.min(o[a],l));u=u.concat(c)}else u=t.getImagery(e._cartographic,l);u.length>0&&e.setScaleImagerys(u,l)}e.resetScaleImagerys(l,n)}function _0x35e240(e,t,i){var n=t._layer,r=e.calcImageryScaleLevel(i.camera,i.context,n._lodRangeScale,t._nLoadingPriority,e._rangeMode);r=Math.ceil(r)-1;for(var o=0;o<e._renderEntityList.length;o++){var a=e._renderEntityList[o];i.cullingVolume.computeVisibility(a._boundingVolume)!=Ae$u.OUTSIDE&&e$2b(a._cartographic)&&_0x4c6d9a(a,n._imageryLayer,r,i)}}function _0x305eab(e,t){if(!e)return 0;for(var i=0,n=0,r=e._childrenPageLod.length;n<r;n++){var o=e._childrenPageLod[n],a=_0x13a796(o,t);o._oriBoundingSphere||(o._oriBoundingSphere=o._boundingSphere.clone()),o._boundingSphere.radius=o._oriBoundingSphere.radius+a,i+=a=Math.max(a,_0x305eab(o._entity,t))}return i}function _0x13a796(e,t){for(var i=0,n=0;n<e._renderEntityList.length;n++)if(e$2b(e._renderEntityList[n])){var r=e._renderEntityList[n];i=Math.max(r._radiusToExpand(t),i)}return i}function _0x2aa23a(e,t){var i=t.positionCartographic.height;return(i=i<0?0:i)<=e._maxVisibleAltitude&&i>=e._minVisibleAltitude}function _0xf6df4(e,t,i){var n=o$1p.distance(e._boundingSphere.center,i)-e._boundingSphere.radius;return(n=n<0?0:n)<=t._visibleDistanceMax&&n>=t._visibleDistanceMin}function _0x44603d(e,t){var i=t.positionCartographic.height;return(i=i<0?0:i)<=e._maxVisibleAltitude&&i>=e._minVisibleAltitude}function _0x53eb49(e,t,i){var n,r=e._boundingSphere,o=e._orientedBoundingBox;if(t._fileType===d$15.ClampGroundRealtimeRasterCache){var a=r.center,s=r.radius,l=o$1p.fromRadians(e$2a.toRadians(a.x),e$2a.toRadians(a.y),a.z),u=o$1p.fromRadians(e$2a.toRadians(a.x),e$2a.toRadians(a.y-s),a.z),c=o$1p.distance(l,u);n=o$1p.distance(l,i)-c}else n=e$2b(r)?o$1p.distance(r.center,i)-r.radius:Math.sqrt(y$Z.distanceSquaredTo(o,i));n=n<0?0:n,e._disFromCamera=n;var h=t._translucencyByDistance?t._visibleDistanceMax+2e3:t._visibleDistanceMax;return n>=t._visibleDistanceMin&&n<=h}_0x2e6772.prototype._scheduleSkip=function(e){var t=this._layer;this._selectEntities.length=0,this._renderQueue.length=0,this._replacementList.splice(this._replacementList.tail,this._replacementSentinel);var i,n,r,o=[],a=[];for(i=0,n=this._rootEntities.length;i<n;i++){var s=this._rootEntities[i];if(_0x59356d(e,t,s),t.residentRootTile||_0x441312(s)){if(!s._configReady){this.loadConfig(s);continue}o.push(s),a.push(s)}}for(a.sort(_0x450e29),o.sort(_0x35ee84);r=o.pop();){_0x303032(r);var l=!0;_0x2342fa(r)&&(l=_0x189d09(e,this,o,r)),r._isLeafTile&&_0x59356d(e,t,r),(l||r._needLoad||t.residentRootTile&&r._isRootTile)&&(_0x1c1e01(e,this,r),_0x3e2b92(e,this,r)),_0x1c01b6(this,r)}for(i=0,n=a.length;i<n;i++){for(var u=a[i],c=0,h=u._childrenPageLod.length;c<h;c++){_0x157273(this,e,u._childrenPageLod[c])}for(var d=0,f=u._leafChildren.length;d<f;d++){_0x157273(this,e,u._leafChildren[d])}}this.freeResource(e);var p=this._requestEntities.length;for(i=0;i<p;i++)this._requestEntities[i].entity.updatePriority(t),e.requests.push(this._requestEntities[i]);this._requestEntities.length=0},_0x2e6772.prototype._processPackRequests=function(){var e=this._packRequestEntities,t=e.length;if(!(t<1)){e.sort(_0x35ee84);for(var i=0;i<t;i++){_0x1b60d3(this,e[i])}this._packRequestEntities.length=0}},_0x2e6772.prototype._processParsingEntities=function(){var e=this._parsingEntities,t=e.length;if(!(t<1)){e.sort(_0x35ee84);for(var i=this._layer,n=i._isS3MB?_0x1309b8.binaryDataParser:_0x215208.binaryDataParser,r=0;r<t;r++){var o=e[r];n(i,o,o.s3mBuffer,o.volBuffer)}this._parsingEntities.length=0}},_0x2e6772.prototype._schedule=function(e){var t=e.camera,i=t.positionWC,n=e.cullingVolume,r=this._layer,o=this._context,a=_0x2aa23a(r,t),s=[],l=e.requests;const u=[],c=e.processingTiles,h=e.replacementList;var d=this;if(!a)return void(r._fileType===d$15.ClampGroundRealtimeRasterCache&&this.refreshRaster(e));var f=0,p=[];const _=i$W.MASK_INDETERMINATE,m=r._fileType===d$15.ClampGroundRealtimeRasterCache,g=e$2b(r.themeStyle)&&e$2b(r.queryFieldNames);for(var x=0,v=this._rootEntities.length;x<v;x++){if((T=this._rootEntities[x])._rootName=T._fileName,T._blockKey=T._fileName,!_0x53eb49(T,r,i)){_0x19a9a0(this,T);continue}const e=T.boundingVolume;(T._visibilityPlaneMask=n.computeVisibilityWithPlaneMask(e,_),T.isVisible=T.isFlatten||T.hasTranslate||T._visibilityPlaneMask!==i$W.MASK_OUTSIDE||m,T.isVisible)?(e$2b(r._queryFieldNames)&&T.attrLoadState!=N$P.LOADED&&T.attrLoadState!=N$P.LOADING&&(!0===d._indexedDBSetting.isAttributesSave?d._attributes.status.promise.then((function(){T.attrLoadState!=N$P.LOADED&&T.attrLoadState!=N$P.LOADING&&_0x1c0125(T,d)})):p.push(T)),T.attrLoadState===N$P.LOADED&&f++,g&&T.attrLoadState!==N$P.LOADED?T.isVisible=!1:(_0x137248(r,h,T),T._s3mLoadState!==N$P.PARSED?T._ready?(s.push(T),_0x8f920b(this,T),_0x4a338b(this,T)):(l.push({entity:T,priority:T._disFromCamera,owner:this}),_0x19a9a0(this,T)):c.push(T))):_0x19a9a0(this,T)}f===v&&!this._attrloaded&&(this._attrloaded=!0,r.attributeDownloaded.raiseEvent(r.name+" attribute downloaded."));for(var y;y=s.pop();){_0x137248(r,h,y);const i=y._visibilityPlaneMask;for(let a=0,d=y._childrenPageLod.length;a<d;a++){const d=y._childrenPageLod[a];if(_0x59aca4(t,r,d),d._isLeafNode){e$2b(r._imageryLayer)&&_0x35e240(d,this,e),u.push(d);continue}if(d.calcPixFromCam(t,o,r._lodRangeScale,r._adjustedLodRangeScale,this._nLoadingPriority),this._prepareLoaded||(d._isLessLodDis&&e$2b(d._entity)&&(d._entity._prepareLoad=!0),d._isLessLodDis=!1),d._isLessLodDis){u.push(d);continue}if(!e$2b(d._entity)){var $=_0x5e7644(y,d,a);_0x5a5203(r,$),this._currentMaxLevel=Math.max(this._currentMaxLevel,$._nLODLev),d._entity=$,u.push(d),_0x137248(r,h,$);continue}const f=d._entity,p=f.boundingVolume;if(f._visibilityPlaneMask=n.computeVisibilityWithPlaneMask(p,i),f.isVisible=f.isFlatten||f.hasTranslate||f._visibilityPlaneMask!==i$W.MASK_OUTSIDE,this._beginToLoadLeaf=!0,this._prepareLoaded||(f.isVisible||(d._entity._prepareLoad=!0),f.isVisible=!0),f.isVisible){if(_0x137248(r,h,f),f._s3mLoadState===N$P.PARSED){c.push(f),u.push(d);continue}if(f._s3mLoadState===N$P.TRANSFORMED){r._nProcessType===_0x5150e8.Add&&u.push(d),s.push(f);continue}_0x27b6a0(y,d),u.push(d),l.push({entity:f,priority:f._disFromCamera,owner:this})}}}let b=[];for(let e=0,t=u.length;e<t;e++){const t=u[e];b=b.concat(t._renderEntityList)}if(this._renderQueue=b,!this._indexedDBSetting.isAttributesSave){for(p.sort(_0x35ee84),x=0;x<p.length;x++)p[x].attrLoadState===N$P.UNLOAD&&_0x1c0125(p[x],this,!1);if(this._beginToLoadLeaf&&r.hasAttributeIndex)for(x=0,v=this._rootEntities.length;x<v;x++){var T;((T=this._rootEntities[x]).leafAttrLoadState===N$P.UNLOAD||T.leafAttrLoadState===N$P.FAILED)&&_0x1c0125(T,this,!0)}}if(r._showLabel||r._showIcon){const e=[];for(let t=0,i=b.length;t<i;t++){const i=b[t];for(let t in i._labelIndexs)i._labelIndexs.hasOwnProperty(t)&&e.push(t)}r._showLabel&&this._layer._labelCollection.setVisibleLabels(e),r._showIcon&&this._layer._iconCollection.setVisibleLabels(e)}this._packingRequest&&(this._processPackRequests(),this._processParsingEntities())},_0x2e6772.prototype.loadImagery=function(e,t){if(!this._stopLoadImagery){for(var i=0,n=[],r=0,o=this._rootEntities.length;r<o;r++){var a=this._rootEntities[r];n.push(a)}for(var s;s=n.pop();){if((i+=s.loadImagery(e,t))>10)return;for(r=0,o=s._childrenPageLod.length;r<o;r++){var l=s._childrenPageLod[r];e$2b(l._entity)&&(l._entity.loadImagery(e,t),n.push(l._entity))}}}},_0x2e6772.prototype._getCameraChanged=function(e){var t=!o$1p.equals(this._cameraPos,e.positionWC)||!o$1p.equals(this._cameraDir,e.directionWC)||!o$1p.equals(this._cameraUp,e.upWC);(this._cameraPos=o$1p.clone(e.position,this._cameraPos),this._cameraDir=o$1p.clone(e.direction,this._cameraDir),this._cameraUp=o$1p.clone(e.up,this._cameraUp),t)?e._clockStart=(new Date).getTime():(new Date).getTime()-e._clockStart<200&&(t=!0);return t},_0x2e6772.prototype.refresh=function(){this._renderQueue.length=0;for(var e=0,t=this._rootEntities.length;e<t;e++){for(var i=this._rootEntities[e],n=0;n<i._childrenPageLod.length;n++){var r=i._childrenPageLod[n];r=r&&!r.isDestroyed()&&r.destroy()}i._childrenPageLod.length=0,i.attributeBuffer=i.attributeBuffer&&!i.attributeBuffer.isDestroyed()&&i.attributeBuffer.destroy(),i._ready=!1,i._s3mLoadState=N$P.UNLOAD}},_0x2e6772.prototype.refreshPrepareLoad=function(){for(var e=[],t=0,i=this._rootEntities.length;t<i;t++){var n=this._rootEntities[t];n._ready&&e.push(n)}for(var r;r=e.pop();)if(r._prepareLoad){for(var o=0;o<r._childrenPageLod.length;o++){var a=r._childrenPageLod[o];a=a&&!a.isDestroyed()&&a.destroy()}r._childrenPageLod.length=0,r.attributeBuffer=r.attributeBuffer&&!r.attributeBuffer.isDestroyed()&&r.attributeBuffer.destroy(),r._ready=!1,r._s3mLoadState=N$P.UNLOAD}else for(t=0,i=r._childrenPageLod.length;t<i;t++){var s=r._childrenPageLod[t];r._isLeafTile||s._entity&&e.push(s._entity)}},_0x2e6772.prototype.getRenderQueueSize=function(){return this._renderQueue.length},_0x2e6772.prototype._updateSceneMode=function(e){if(e._mode!==this._sceneMode){var t=this._layer,i=new p$1d;p$1d.inverse(t._matModel,i),this._sceneMode=e._mode,this._projection=e._projection,t.refresh();for(var n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];!e$2b(o)||!e$2b(o._boundingSphere)||(i$1c.transform(o._boundingSphere,i,o._boundingSphere),i$1c.transform(o._boundingSphere,t._matModel,o._boundingSphere),e$2b(o._orientedBoundingBox)&&(p$1d.multiplyByPoint(i,o._orientedBoundingBox.center,o._orientedBoundingBox.center),p$1d.multiplyByPoint(t._matModel,o._orientedBoundingBox.center,o._orientedBoundingBox.center)))}}},_0x2e6772.prototype.traverseRenderEntity=function(e,t){for(var i=[],n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];i.push(o)}for(var a;a=i.pop();)for(n=0,r=a._childrenPageLod.length;n<r;n++){for(var s=a._childrenPageLod[n],l=0;l<s._renderEntityList.length;l++)!e$2b(s._renderEntityList[l])||(e.entity=a,t(s._renderEntityList[l],e));s._entity&&i.push(s._entity)}},_0x2e6772.prototype.traverseRenderEntityRecursionForObjsTranslate=function(){if(!(Object.keys(this._layer._objsOffsetList).length<1))for(var e=0,t=this._rootEntities.length;e<t;e++){var i=this._rootEntities[e];if(i._ready){var n=_0x305eab(i,this._layer._objsOffsetList);i._oriBoundingSphere||(i._oriBoundingSphere=i._boundingSphere.clone()),i._boundingSphere.radius=i._oriBoundingSphere.radius+n}}},_0x2e6772.prototype.refreshRasterById=function(e,t){for(var i=[],n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];o._ready&&i.push(o)}for(var a;a=i.pop();)for(n=0,r=a._childrenPageLod.length;n<r;n++){for(var s=a._childrenPageLod[n],l=0;l<s._renderEntityList.length;l++)if(e$2b(s._renderEntityList[l])){var u=s._renderEntityList[l]._selectionInforMap;if(e$2b(u))for(var c in u._hash){if(parseInt(c)===parseInt(e)){s._renderEntityList[l].refreshRaster(t,!0);break}}}a._isLeafTile||s._entity&&i.push(s._entity)}},_0x2e6772.prototype.refreshRaster=function(e){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i];r._ready&&t.push(r)}for(var o;o=t.pop();)for(i=0,n=o._childrenPageLod.length;i<n;i++){for(var a=o._childrenPageLod[i],s=0;s<a._renderEntityList.length;s++)!e$2b(a._renderEntityList[s])||a._renderEntityList[s].refreshRaster(e,!0);o._isLeafTile||a._entity&&t.push(a._entity)}},_0x2e6772.prototype._getMemoryUsageInBytes=function(){for(var e=0,t=this._replacementList.head;e$2b(t)&&(e$2b(t.item)||e$2b(t.next));){var i=t.item;e$2b(i)&&(e+=i.memoryUsage()),t=t.next}return e},_0x2e6772.prototype._getCacheMemoryUsageInBytes=function(){for(var e=0,t=this._replacementList.head;t!==this._replacementSentinel;){var i=t.item;e$2b(i)&&(e+=i.memoryUsage()),t=t.next}return e},_0x2e6772.prototype.freeResource=function(e){for(var t=this._getCacheMemoryUsageInBytes(),i=1024*ti$3.getCacheSize()*1024,n=this._replacementList.head;e$2b(n)&&n!==this._replacementSentinel&&(this._layer._clearMemoryImmediately||t>i);){var r=n.item;if(n=n.next,e$2b(r)&&(this._replacementList.remove(r._replacementNode),r._replacementNode=null,!r._isRootTile||!this._layer.residentRootTile)){var o={geoSize:0,texSize:0},a=r.memoryUsageEx(o);ti$3._memGeometryRemoved(o.geoSize),r.freeResource(e),t-=a}}},_0x2e6772.prototype.isDestroyed=function(){return!1},_0x2e6772.prototype.destroy=function(){this._renderQueue.length=0,this._replacementList.splice(this._replacementList.tail,this._replacementSentinel);var e=this._layer,t=void 0;e._fileType===d$15.ClampGroundRealtimeRasterCache&&(t=e._frameState);for(var i=this._replacementList.head;i!==this._replacementSentinel;){var n=i.item,r={geoSize:0,texSize:0};n.memoryUsageEx(r),ti$3._memGeometryRemoved(r.geoSize),i=i.next,this._replacementList.remove(n._replacementNode),n.destroy(t)}return i$10(this)};var _0x32789f=(_0x4fa749=!0,function(e,t){var i=_0x4fa749?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fa749=!1,i}),_0x3c37f7=_0x32789f(void 0,(function(){return _0x3c37f7.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c37f7).search("(((.+)+)+)+$")})),_0x4fa749;_0x3c37f7();var _0x4dbad4="attribute vec4 position;\nuniform vec4 uRect;\nuniform vec4 uSingleRegion;\nvarying float fHeight;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vTexCoord = (vPos.xy - uSingleRegion.xy) / (uSingleRegion.zw - uSingleRegion.xy);\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.5, 1.0);\n fHeight = vPos.z;\n}",k$K=Math.cos,z$K=Math.sin,H$Q=Math.sqrt,j$O={computePosition:function(e,t,i,n,r,o,a){var s=t.radiiSquared,l=e.nwCorner,u=e.boundingRectangle,c=l.latitude-e.granYCos*n+r*e.granXSin,h=k$K(c),d=z$K(c),f=s.z*d,p=l.longitude+n*e.granYSin+r*e.granXCos,_=h*k$K(p),m=h*z$K(p),g=s.x*_,x=s.y*m,v=H$Q(g*_+x*m+f*d);if(o.x=g/v,o.y=x/v,o.z=f/v,i){var y=e.stNwCorner;e$2b(y)?(c=y.latitude-e.stGranYCos*n+r*e.stGranXSin,p=y.longitude+n*e.stGranYSin+r*e.stGranXCos,a.x=(p-e.stWest)*e.lonScalar,a.y=(c-e.stSouth)*e.latScalar):(a.x=(p-u.west)*e.lonScalar,a.y=(c-u.south)*e.latScalar)}}},J$G=new f$13,h$N=new o$1p,K$I=new a$18,E$P=new o$1p,q$R=new n$1b;function Z$K(e,t,i,n,r,o,a){var s=Math.cos(t),l=n*s,u=i*s,c=Math.sin(t),h=n*c,d=i*c;h$N=q$R.project(e,h$N),h$N=o$1p.subtract(h$N,E$P,h$N);var f=f$13.fromRotation(t,J$G);h$N=f$13.multiplyByVector(f,h$N,h$N),h$N=o$1p.add(h$N,E$P,h$N),o-=1,a-=1;var p=(e=q$R.unproject(h$N,e)).latitude,_=p+o*d,m=p-l*a,g=p-l*a+o*d,x=Math.max(p,_,m,g),v=Math.min(p,_,m,g),y=e.longitude,$=y+o*u,b=y+a*h,T=y+a*h+o*u;return{north:x,south:v,east:Math.max(y,$,b,T),west:Math.min(y,$,b,T),granYCos:l,granYSin:h,granXCos:u,granXSin:d,nwCorner:e}}j$O.computeOptions=function(e,t,i,n,r,o,a){var s=e.east,l=e.west,u=e.north,c=e.south,h=!1,d=!1;u===e$2a.PI_OVER_TWO&&(h=!0),c===-e$2a.PI_OVER_TWO&&(d=!0);var f,p,_,m,g,x=u-c;_=(g=l>s?e$2a.TWO_PI-l+s:s-l)/((f=Math.ceil(g/t)+1)-1),m=x/((p=Math.ceil(x/t)+1)-1);var v=h$18.northwest(e,o),y=h$18.center(e,K$I);(0!==i||0!==n)&&(y.longitude<v.longitude&&(y.longitude+=e$2a.TWO_PI),E$P=q$R.project(y,E$P));var $=m,b=_,T=h$18.clone(e,r),C={granYCos:$,granYSin:0,granXCos:b,granXSin:0,nwCorner:v,boundingRectangle:T,width:f,height:p,northCap:h,southCap:d};if(0!==i){var S=Z$K(v,i,_,m,y,f,p);if(u=S.north,c=S.south,s=S.east,l=S.west,u<-e$2a.PI_OVER_TWO||u>e$2a.PI_OVER_TWO||c<-e$2a.PI_OVER_TWO||c>e$2a.PI_OVER_TWO)throw new t$16("Rotated rectangle is invalid. It crosses over either the north or south pole.");C.granYCos=S.granYCos,C.granYSin=S.granYSin,C.granXCos=S.granXCos,C.granXSin=S.granXSin,T.north=u,T.south=c,T.east=s,T.west=l}if(0!==n){i-=n;var w=h$18.northwest(T,a),E=Z$K(w,i,_,m,y,f,p);C.stGranYCos=E.granYCos,C.stGranXCos=E.granXCos,C.stGranYSin=E.granYSin,C.stGranXSin=E.granXSin,C.stNwCorner=w,C.stWest=E.west,C.stSouth=E.south}return C};var Lt$4=new o$1p,Bt$7=new o$1p,Yt$3=new o$1p,qt$5=new o$1p,Xt$2=new h$18,ne$B=new o$1o,ie$x=new i$1c,oe$q=new i$1c;function Wt$6(e,t){var i=new I$1p({attributes:new a$_,primitiveType:W$18.TRIANGLES});return i.attributes.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(i.attributes.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(i.attributes.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(i.attributes.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:t.bitangents})),i}function ue$t(e,t,i,n){var r=e.length,o=t.normal?new Float32Array(r):void 0,a=t.tangent?new Float32Array(r):void 0,s=t.bitangent?new Float32Array(r):void 0,l=0,u=qt$5,c=Yt$3,h=Bt$7;if(t.normal||t.tangent||t.bitangent)for(var d=0;d<r;d+=3){var f=o$1p.fromArray(e,d,Lt$4),p=l+1,_=l+2;h=i.geodeticSurfaceNormal(f,h),(t.tangent||t.bitangent)&&(o$1p.cross(o$1p.UNIT_Z,h,c),p$1e.multiplyByVector(n,c,c),o$1p.normalize(c,c),t.bitangent&&o$1p.normalize(o$1p.cross(h,c,u),u)),t.normal&&(o[l]=h.x,o[p]=h.y,o[_]=h.z),t.tangent&&(a[l]=c.x,a[p]=c.y,a[_]=c.z),t.bitangent&&(s[l]=u.x,s[p]=u.y,s[_]=u.z),l+=3}return Wt$6(t,{positions:e,normals:o,tangents:a,bitangents:s})}var Tt$8=new o$1p,jt$3=new o$1p;function se$r(e,t,i){var n=e.length,r=t.normal?new Float32Array(n):void 0,o=t.tangent?new Float32Array(n):void 0,a=t.bitangent?new Float32Array(n):void 0,s=0,l=0,u=0,c=!0,h=qt$5,d=Yt$3,f=Bt$7;if(t.normal||t.tangent||t.bitangent)for(var p=0;p<n;p+=6){var _=o$1p.fromArray(e,p,Lt$4),m=o$1p.fromArray(e,(p+6)%n,Tt$8);if(c){var g=o$1p.fromArray(e,(p+3)%n,jt$3);o$1p.subtract(m,_,m),o$1p.subtract(g,_,g),f=o$1p.normalize(o$1p.cross(g,m,f),f),c=!1}o$1p.equalsEpsilon(m,_,e$2a.EPSILON10)&&(c=!0),(t.tangent||t.bitangent)&&(h=i.geodeticSurfaceNormal(_,h),t.tangent&&(d=o$1p.normalize(o$1p.cross(h,f,d),d))),t.normal&&(r[s++]=f.x,r[s++]=f.y,r[s++]=f.z,r[s++]=f.x,r[s++]=f.y,r[s++]=f.z),t.tangent&&(o[l++]=d.x,o[l++]=d.y,o[l++]=d.z,o[l++]=d.x,o[l++]=d.y,o[l++]=d.z),t.bitangent&&(a[u++]=h.x,a[u++]=h.y,a[u++]=h.z,a[u++]=h.x,a[u++]=h.y,a[u++]=h.z)}return Wt$6(t,{positions:e,normals:r,tangents:o,bitangents:a})}function Jt$3(e,t){var i=e._vertexFormat,n=e._ellipsoid,r=t.height,o=t.width,a=t.northCap,s=t.southCap,l=0,u=r,c=r,h=0;a&&(l=1,c-=1,h+=1),s&&(u-=1,c-=1,h+=1),h+=o*c;for(var d=i.position?new Float64Array(3*h):void 0,f=i.st?new Float32Array(2*h):void 0,p=0,_=0,m=Lt$4,g=ne$B,x=Number.MAX_VALUE,v=Number.MAX_VALUE,y=-Number.MAX_VALUE,$=-Number.MAX_VALUE,b=l;b<u;++b)for(var T=0;T<o;++T)j$O.computePosition(t,n,i.st,b,T,m,g),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(f[_++]=g.x,f[_++]=g.y,x=Math.min(x,g.x),v=Math.min(v,g.y),y=Math.max(y,g.x),$=Math.max($,g.y));if(a&&(j$O.computePosition(t,n,i.st,0,0,m,g),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(f[_++]=g.x,f[_++]=g.y,x=g.x,v=g.y,y=g.x,$=g.y)),s&&(j$O.computePosition(t,n,i.st,r-1,0,m,g),d[p++]=m.x,d[p++]=m.y,d[p]=m.z,i.st&&(f[_++]=g.x,f[_]=g.y,x=Math.min(x,g.x),v=Math.min(v,g.y),y=Math.max(y,g.x),$=Math.max($,g.y))),i.st&&(x<0||v<0||y>1||$>1))for(var C=0;C<f.length;C+=2)f[C]=(f[C]-x)/(y-x),f[C+1]=(f[C+1]-v)/($-v);var S=ue$t(d,i,n,t.tangentRotationMatrix),w=6*(o-1)*(c-1);a&&(w+=3*(o-1)),s&&(w+=3*(o-1));var E,P=ce$x.createTypedArray(h,w),A=0,L=0;for(E=0;E<c-1;++E){for(var M=0;M<o-1;++M){var R=A,I=R+o,O=I+1,D=R+1;P[L++]=R,P[L++]=I,P[L++]=D,P[L++]=D,P[L++]=I,P[L++]=O,++A}++A}if(a||s){var B,N,F=h-1,U=h-1;if(a&&s&&(F=h-2),A=0,a)for(E=0;E<o-1;E++)N=(B=A)+1,P[L++]=F,P[L++]=B,P[L++]=N,++A;if(s)for(A=(c-1)*o,E=0;E<o-1;E++)N=(B=A)+1,P[L++]=B,P[L++]=U,P[L++]=N,++A}return S.indices=P,i.st&&(S.attributes.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:f})),S}function ct$6(e,t,i,n,r){return e[t++]=n[i],e[t++]=n[i+1],e[t++]=n[i+2],e[t++]=r[i],e[t++]=r[i+1],e[t]=r[i+2],e}function ht$6(e,t,i,n){return e[t++]=n[i],e[t++]=n[i+1],e[t++]=n[i],e[t]=n[i+1],e}var Ht$4=new n$11;function fe$o(e,t){var i,n=e._shadowVolume,r=e._offsetAttribute,o=e._vertexFormat,a=e._extrudedHeight,s=e._surfaceHeight,l=e._ellipsoid,u=t.height,c=t.width;if(n){var h=n$11.clone(o,Ht$4);h.normal=!0,e._vertexFormat=h}var d=Jt$3(e,t);n&&(e._vertexFormat=o);var f=A$1g.scaleToGeodeticHeight(d.attributes.position.values,s,l,!1),p=(f=new Float64Array(f)).length,_=2*p,m=new Float64Array(_);m.set(f);var g=A$1g.scaleToGeodeticHeight(d.attributes.position.values,a,l);m.set(g,p),d.attributes.position.values=m;var x,v,y=o.normal?new Float32Array(_):void 0,$=o.tangent?new Float32Array(_):void 0,b=o.bitangent?new Float32Array(_):void 0,T=o.st?new Float32Array(_/3*2):void 0;if(o.normal){for(v=d.attributes.normal.values,y.set(v),i=0;i<p;i++)v[i]=-v[i];y.set(v,p),d.attributes.normal.values=y}if(n){v=d.attributes.normal.values,o.normal||(d.attributes.normal=void 0);var C=new Float32Array(_);for(i=0;i<p;i++)v[i]=-v[i];C.set(v,p),d.attributes.extrudeDirection=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:C})}var S=e$2b(r);if(S){var w=p/3*2,E=new Uint8Array(w);r===_0x58701d.TOP?E=d$1s(E,1,0,w/2):E=d$1s(E,r===_0x58701d.NONE?0:1),d.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}if(o.tangent){var P=d.attributes.tangent.values;for($.set(P),i=0;i<p;i++)P[i]=-P[i];$.set(P,p),d.attributes.tangent.values=$}if(o.bitangent){var A=d.attributes.bitangent.values;b.set(A),b.set(A,p),d.attributes.bitangent.values=b}o.st&&(x=d.attributes.st.values,T.set(x),T.set(x,p/3*2),d.attributes.st.values=T);var L=d.indices,M=L.length,R=p/3,I=ce$x.createTypedArray(_/3,2*M);for(I.set(L),i=0;i<M;i+=3)I[i+M]=L[i+2]+R,I[i+1+M]=L[i+1]+R,I[i+2+M]=L[i]+R;d.indices=I;var O=t.northCap,D=t.southCap,B=u,N=2,F=0,U=4,z=4;O&&(N-=1,B-=1,F+=1,U-=2,z-=1),D&&(N-=1,B-=1,F+=1,U-=2,z-=1);var G=2*((F+=N*c+2*B-U)+z),V=new Float64Array(3*G),k=n?new Float32Array(3*G):void 0,W=S?new Uint8Array(G):void 0,H=o.st?new Float32Array(2*G):void 0,q=r===_0x58701d.TOP;S&&!q&&(W=d$1s(W,r===_0x58701d.ALL?1:0));var j,Y=0,X=0,K=0,Q=0,Z=c*B;for(i=0;i<Z;i+=c)V=ct$6(V,Y,j=3*i,f,g),Y+=6,o.st&&(H=ht$6(H,X,2*i,x),X+=4),n&&(K+=3,k[K++]=v[j],k[K++]=v[j+1],k[K++]=v[j+2]),q&&(W[Q++]=1,Q+=1);if(D){var J=O?Z+1:Z;for(j=3*J,i=0;i<2;i++)V=ct$6(V,Y,j,f,g),Y+=6,o.st&&(H=ht$6(H,X,2*J,x),X+=4),n&&(K+=3,k[K++]=v[j],k[K++]=v[j+1],k[K++]=v[j+2]),q&&(W[Q++]=1,Q+=1)}else for(i=Z-c;i<Z;i++)V=ct$6(V,Y,j=3*i,f,g),Y+=6,o.st&&(H=ht$6(H,X,2*i,x),X+=4),n&&(K+=3,k[K++]=v[j],k[K++]=v[j+1],k[K++]=v[j+2]),q&&(W[Q++]=1,Q+=1);for(i=Z-1;i>0;i-=c)V=ct$6(V,Y,j=3*i,f,g),Y+=6,o.st&&(H=ht$6(H,X,2*i,x),X+=4),n&&(K+=3,k[K++]=v[j],k[K++]=v[j+1],k[K++]=v[j+2]),q&&(W[Q++]=1,Q+=1);if(O){var ee=Z;for(j=3*ee,i=0;i<2;i++)V=ct$6(V,Y,j,f,g),Y+=6,o.st&&(H=ht$6(H,X,2*ee,x),X+=4),n&&(K+=3,k[K++]=v[j],k[K++]=v[j+1],k[K++]=v[j+2]),q&&(W[Q++]=1,Q+=1)}else for(i=c-1;i>=0;i--)V=ct$6(V,Y,j=3*i,f,g),Y+=6,o.st&&(H=ht$6(H,X,2*i,x),X+=4),n&&(K+=3,k[K++]=v[j],k[K++]=v[j+1],k[K++]=v[j+2]),q&&(W[Q++]=1,Q+=1);var te=se$r(V,o,l);o.st&&(te.attributes.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:H})),n&&(te.attributes.extrudeDirection=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:k})),S&&(te.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:W}));var ie,ne,re,oe,ae=ce$x.createTypedArray(G,6*F);p=V.length/3;var se=0;for(i=0;i<p-1;i+=2){oe=((ie=i)+2)%p;var le=o$1p.fromArray(V,3*ie,Tt$8),ue=o$1p.fromArray(V,3*oe,jt$3);o$1p.equalsEpsilon(le,ue,e$2a.EPSILON10)||(re=((ne=(ie+1)%p)+2)%p,ae[se++]=ie,ae[se++]=ne,ae[se++]=oe,ae[se++]=oe,ae[se++]=ne,ae[se++]=re)}return te.indices=ae,(te=k$13.combineInstances([new d$1o({geometry:d}),new d$1o({geometry:te})]))[0]}var ve$l=[new o$1p,new o$1p,new o$1p,new o$1p],Qt$4=new a$18,le$t=new a$18;function Ot$6(e,t,i,n,r){if(0===i)return h$18.clone(e,r);var o=j$O.computeOptions(e,t,i,0,Xt$2,Qt$4),a=o.height,s=o.width,l=ve$l;return j$O.computePosition(o,n,!1,0,0,l[0]),j$O.computePosition(o,n,!1,0,s-1,l[1]),j$O.computePosition(o,n,!1,a-1,0,l[2]),j$O.computePosition(o,n,!1,a-1,s-1,l[3]),h$18.fromCartesianArray(l,n,r)}function j$N(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).rectangle;if(o$1q.typeOf.object("rectangle",t),h$18.validate(t),t.north<t.south)throw new t$16("options.rectangle.north must be greater than or equal to options.rectangle.south");var i=u$_(e.height,0),n=u$_(e.extrudedHeight,i);this._rectangle=h$18.clone(t),this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._surfaceHeight=Math.max(i,n),this._rotation=u$_(e.rotation,0),this._stRotation=u$_(e.stRotation,0),this._vertexFormat=n$11.clone(u$_(e.vertexFormat,n$11.DEFAULT)),this._extrudedHeight=Math.min(i,n),this._shadowVolume=u$_(e.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}j$N.packedLength=h$18.packedLength+t$13.packedLength+n$11.packedLength+7,j$N.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),h$18.pack(e._rectangle,t,i),i+=h$18.packedLength,t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=u$_(e._offsetAttribute,-1),t};var Zt$2=new h$18,Kt$4=t$13.clone(t$13.UNIT_SPHERE),tt$c={rectangle:Zt$2,ellipsoid:Kt$4,vertexFormat:Ht$4,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};j$N.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=h$18.unpack(e,t,Zt$2);t+=h$18.packedLength;var r=t$13.unpack(e,t,Kt$4);t+=t$13.packedLength;var o=n$11.unpack(e,t,Ht$4);t+=n$11.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=1===e[t++],d=e[t];return e$2b(i)?(i._rectangle=h$18.clone(n,i._rectangle),i._ellipsoid=t$13.clone(r,i._ellipsoid),i._vertexFormat=n$11.clone(o,i._vertexFormat),i._granularity=a,i._surfaceHeight=s,i._rotation=l,i._stRotation=u,i._extrudedHeight=c,i._shadowVolume=h,i._offsetAttribute=-1===d?void 0:d,i):(tt$c.granularity=a,tt$c.height=s,tt$c.rotation=l,tt$c.stRotation=u,tt$c.extrudedHeight=c,tt$c.shadowVolume=h,tt$c.offsetAttribute=-1===d?void 0:d,new j$N(tt$c))},j$N.computeRectangle=function(e,t){var i=(e=u$_(e,u$_.EMPTY_OBJECT)).rectangle;if(o$1q.typeOf.object("rectangle",i),h$18.validate(i),i.north<i.south)throw new t$16("options.rectangle.north must be greater than or equal to options.rectangle.south");var n=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),r=u$_(e.ellipsoid,t$13.WGS84);return Ot$6(i,n,u$_(e.rotation,0),r,t)};var ce$o=new p$1e,$t$2=new n$13,he$m=new a$18;j$N.createGeometry=function(e){if(!e$2a.equalsEpsilon(e._rectangle.north,e._rectangle.south,e$2a.EPSILON10)&&!e$2a.equalsEpsilon(e._rectangle.east,e._rectangle.west,e$2a.EPSILON10)){var t=e._rectangle,i=e._ellipsoid,n=e._rotation,r=e._stRotation,o=e._vertexFormat,a=j$O.computeOptions(t,e._granularity,n,r,Xt$2,Qt$4,le$t),s=ce$o;if(0!==r||0!==n){var l=h$18.center(t,he$m),u=i.geodeticSurfaceNormalCartographic(l,Tt$8);n$13.fromAxisAngle(u,-r,$t$2),p$1e.fromQuaternion($t$2,s)}else p$1e.clone(p$1e.IDENTITY,s);var c,h,d=e._surfaceHeight,f=e._extrudedHeight,p=!e$2a.equalsEpsilon(d,f,0,e$2a.EPSILON2);if(a.lonScalar=1/e._rectangle.width,a.latScalar=1/e._rectangle.height,a.tangentRotationMatrix=s,t=e._rectangle,p){c=fe$o(e,a);var _=i$1c.fromRectangle3D(t,i,d,oe$q),m=i$1c.fromRectangle3D(t,i,f,ie$x);h=i$1c.union(_,m)}else{if((c=Jt$3(e,a)).attributes.position.values=A$1g.scaleToGeodeticHeight(c.attributes.position.values,d,i,!1),e$2b(e._offsetAttribute)){var g=c.attributes.position.values.length,x=new Uint8Array(g/3);d$1s(x,e._offsetAttribute===_0x58701d.NONE?0:1),c.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}h=i$1c.fromRectangle3D(t,i,d)}return o.position||delete c.attributes.position,new I$1p({attributes:c.attributes,indices:c.indices,primitiveType:c.primitiveType,boundingSphere:h,offsetAttribute:e._offsetAttribute})}},j$N.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new j$N({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:r,stRotation:e._stRotation,granularity:n,extrudedHeight:a,height:o,vertexFormat:n$11.POSITION_ONLY,shadowVolume:!0})};var It$7=new h$18,de$q=[new o$1o,new o$1o,new o$1o],me$q=new f$13,ge$m=new a$18;function pe$q(e){if(0===e._stRotation)return[0,0,0,1,1,0];var t=h$18.clone(e._rectangle,It$7),i=e._granularity,n=e._ellipsoid,r=Ot$6(t,i,e._rotation-e._stRotation,n,It$7),o=de$q;o[0].x=r.west,o[0].y=r.south,o[1].x=r.west,o[1].y=r.north,o[2].x=r.east,o[2].y=r.south;for(var a=e.rectangle,s=f$13.fromRotation(e._stRotation,me$q),l=h$18.center(a,ge$m),u=0;u<3;++u){var c=o[u];c.x-=l.longitude,c.y-=l.latitude,f$13.multiplyByVector(s,c,c),c.x+=l.longitude,c.y+=l.latitude,c.x=(c.x-a.west)/a.width,c.y=(c.y-a.south)/a.height}var h=o[0],d=o[1],f=o[2],p=new Array(6);return o$1o.pack(h,p),o$1o.pack(d,p,2),o$1o.pack(f,p,4),p}Object.defineProperties(j$N.prototype,{rectangle:{get:function(){return e$2b(this._rotatedRectangle)||(this._rotatedRectangle=Ot$6(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return e$2b(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=pe$q(this)),this._textureCoordinateRotationPoints}}});var _0x54ba4f=(_0x23aee3=!0,function(e,t){var i=_0x23aee3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23aee3=!1,i}),_0x32b091=_0x54ba4f(void 0,(function(){return _0x32b091.toString().search("(((.+)+)+)+$").toString().constructor(_0x32b091).search("(((.+)+)+)+$")})),_0x23aee3;function _0x4ee275(e){e=e||{},this._font=u$_(e.font,"30px sans-serif"),this._fillColor=u$_(e.fillColor,e$1U.WHITE),this._outlineColor=u$_(e.outlineColor,e$1U.BLACK),this._outlineWidth=u$_(e.outlineWidth,1),this._showBackground=u$_(e.showBackground,!1),this._backgroundColor=u$_(e.backgroundColor,new e$1U(.165,.165,.165,.8)),this._style=u$_(e.fillStyle,R$Q.FILL),this._pixelOffset=o$1o.clone(u$_(e.pixelOffset,o$1o.ZERO)),this._scale=u$_(e.scale,1),this._textField=u$_(e.textField,"Name"),this._heightReference=u$_(e.heightReference,k$P.NONE),this._distanceDisplayCondition=e.distanceDisplayCondition,this._textFieldChanged=!1}_0x32b091(),Object.defineProperties(_0x4ee275.prototype,{font:{get:function(){return this._font},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._font!==e&&(this._font=e)}},fillColor:{get:function(){return this._fillColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._fillColor=e}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._outlineColor=e}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e)}},showBackground:{get:function(){return this._showBackground},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._showBackground!==e&&(this._showBackground=e)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._backgroundColor=e}},fillStyle:{get:function(){return this._style},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._style!==e&&(this._style=e)}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._pixelOffset=e}},scale:{get:function(){return this._scale},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._scale!==e&&(this._scale=e)}},textField:{get:function(){return this._textField},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._textField!==e?(this._textField=e,this._textFieldChanged=!0):this._textFieldChanged=!1}},heightReference:{get:function(){return this._heightReference},set:function(e){this._heightReference=e}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=e}}});var _0xcdf1ea=(_0x560db9=!0,function(e,t){var i=_0x560db9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x560db9=!1,i}),_0x108e06=_0xcdf1ea(void 0,(function(){return _0x108e06.toString().search("(((.+)+)+)+$").toString().constructor(_0x108e06).search("(((.+)+)+)+$")})),_0x560db9;_0x108e06();var _0x4582f3={Hide:0,Visible:1,ResetAll:2},_0x576c2d=Object.freeze(_0x4582f3),_0x1836a9=(_0x2a0609=!0,function(e,t){var i=_0x2a0609?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a0609=!1,i}),_0x5c55c9=_0x1836a9(void 0,(function(){return _0x5c55c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c55c9).search("(((.+)+)+)+$")})),_0x2a0609;function _0x5730db(e,t,i){this._id=e,this._type=t,this._pointCounts=i}_0x5c55c9(),Object.defineProperties(_0x5730db.prototype,{id:{get:function(){return this._id},set:function(e){o$1q.defined("PointCloudClassificationInfo id",e),this._id=e}},type:{get:function(){return this._type},set:function(e){o$1q.defined("PointCloudClassificationInfo type",e),this._type=e}},pointCounts:{get:function(){return this._pointCounts},set:function(e){o$1q.defined("PointCloudClassificationInfo pointCounts",e),this._pointCounts=e}}}),_0x5730db.prototype.isDestroyed=function(){return!1},_0x5730db.prototype.destroy=function(){return i$10(this)};var _0x272d3c=(_0x1441e9=!0,function(e,t){var i=_0x1441e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1441e9=!1,i}),_0x1975bc=_0x272d3c(void 0,(function(){return _0x1975bc.toString().search("(((.+)+)+)+$").toString().constructor(_0x1975bc).search("(((.+)+)+)+$")})),_0x1441e9;_0x1975bc();var _0x35b23a={NONE:0,COLOR:1,MODEL_COLOR:2},_0xff9e19=Object.freeze(_0x35b23a),_0x40520b=(_0x1d7ee3=!0,function(e,t){var i=_0x1d7ee3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d7ee3=!1,i}),_0x1bfeb3=_0x40520b(void 0,(function(){return _0x1bfeb3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bfeb3).search("(((.+)+)+)+$")})),_0x1d7ee3;_0x1bfeb3();var _0x2c582d={NONE:0,STRIP:1,DOT:2,CHECKBOARD:3,GRID:4};function _0x14c08b(){this._rotationAngle=0,this._foreColor=new e$29(1,1,0,1),this._backColor=new e$29(1,0,1,1),this._type=_0x2c582d.DOT,this._lineWidthX=2,this._lineWidthY=2,this._offsetX=0,this._offsetY=0,this._repeatX=20,this._repeatY=20}_0x14c08b.prototype.setValue=function(e,t){"ForeColor"===e&&(this._foreColor=t),"BackColor"===e&&(this._backColor=t),"RegionType"===e&&(this._type=t),"RotationAngle"===e&&(this._rotationAngle=t),"WidthX"===e&&(this._lineWidthX=t),"WidthY"===e&&(this._lineWidthY=t),"OffsetX"===e&&(this._offsetX=t),"OffsetY"===e&&(this._offsetY=t),"RepeatX"===e&&(this._repeatX=t),"RepeatY"===e&&(this._repeatY=t)},_0x14c08b.prototype.getEffectSetting=function(){return[{name:"ForeColor",value:new e$29(1,1,0,1),description:"Region Fore Color",max:new e$29(1,1,1,1),min:new e$29(0,0,0,0),type:e$29},{name:"BackColor",value:new e$29(1,0,1,1),description:"Region Back Color",max:new e$29(1,1,1,1),min:new e$29(0,0,0,0),type:e$29},{name:"RegionType",value:_0x2c582d.DOT,description:"Region Effect Type",max:4,min:0,type:_0x2c582d},{name:"RotationAngle",value:0,description:"Region RotationAngle",max:0,min:1,type:Number},{name:"WidthX",value:2,description:"Region horizontal Line Width",max:20,min:1,type:Number},{name:"WidthY",value:2,description:"Region vertical Line Width",max:20,min:1,type:Number},{name:"OffsetX",value:0,description:"Region horizontal Offset",max:20,min:0,type:Number},{name:"OffsetY",value:0,description:"Region vertical Offset",max:20,min:0,type:Number},{name:"RepeatX",value:20,description:"Region horizontal Repeat",max:20,min:1,type:Number},{name:"RepeatY",value:20,description:"Region vertical Repeat",max:20,min:1,type:Number}]};var _0x2405c2=(_0x3ea41e=!0,function(e,t){var i=_0x3ea41e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ea41e=!1,i}),_0x218c1b=_0x2405c2(void 0,(function(){return _0x218c1b.toString().search("(((.+)+)+)+$").toString().constructor(_0x218c1b).search("(((.+)+)+)+$")})),_0x3ea41e;_0x218c1b();var _0xbe5e40={NONE:0,DASH:1,OUTLINE:2,GLOW:3};function _0x2f60f9(){this._lineWidth=1,this._color=new e$29(1,1,1,1),this._type=_0xbe5e40.NONE,this._outlineColor=new e$29(0,0,0,1),this._outlineWidth=1,this._gapColor=new e$29(1,1,1,0),this._dashLength=16,this._dashPattern=255,this._glowPower=.25,this._isArrow=!1,this._isMove=!1,this._frame=0}_0x2f60f9.prototype.setValue=function(e,t){"Color"===e&&(this._color=t),"Width"===e&&(this._lineWidth=t),"PolylineType"===e&&(this._type=t),"OutlineColor"===e&&(this._outlineColor=t),"OutlineWidth"===e&&(this._outlineWidth=t),"GapColor"===e&&(this._gapColor=t),"DashLength"===e&&(this._dashLength=t),"DashPattern"===e&&(this._dashPattern=t),"GlowPower"===e&&(this._glowPower=t),"IsArrow"===e&&(this._isArrow=t),"IsMove"===e&&(this._isMove=t)},_0x2f60f9.prototype.getEffectSetting=function(){return[{name:"Color",value:new e$29(1,1,1,1),description:"Polyline Color",max:new e$29(1,1,1,1),min:new e$29(0,0,0,0),type:e$29},{name:"Width",value:5,description:"Polyline Width",max:20,min:1,type:Number},{name:"PolylineType",value:_0xbe5e40.DASH,description:"Polyline Type",max:3,min:0,type:_0xbe5e40},{name:"OutlineColor",value:new e$29(0,0,0,1),description:"Polyline Outline Color",max:new e$29(1,1,1,1),min:new e$29(0,0,0,0),type:e$29},{name:"OutlineWidth",value:1,description:"Polyline Outline Width",max:10,min:1,type:Number},{name:"GapColor",value:new e$29(1,1,1,0),description:"Polyline Gap Color",max:new e$29(1,1,1,1),min:new e$29(0,0,0,0),type:e$29},{name:"DashLength",value:16,description:"Polyline Gap Dash Length",max:64,min:1,type:Number},{name:"DashPattern",value:255,description:"Polyline Gap Dash Pattern",max:65535,min:0,type:Number},{name:"GlowPower",value:.25,description:"Polyline Glow Power",max:1,min:0,type:Number},{name:"IsArrow",value:!1,description:"Polyline Is Have Arrow",max:!0,min:!1,type:Boolean},{name:"IsMove",value:!1,description:"Polyline Is Moving",max:!0,min:!1,type:Boolean}]};var _0xd7a1ee=(_0x3e1ac2=!0,function(e,t){var i=_0x3e1ac2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3e1ac2=!1,i}),_0x382375=_0xd7a1ee(void 0,(function(){return _0x382375.toString().search("(((.+)+)+)+$").toString().constructor(_0x382375).search("(((.+)+)+)+$")})),_0x3e1ac2;function _0x5370ac(){}_0x382375();var _0x46f8d2="Assets/Textures/PBR_Material/",_0x1f16f4="",_0x3cf703="",_0x13bdfa="",_0x65eb06="",_0x2fc719="",_0x3b467a="";_0x5370ac.getMaterial=function(e){return e===je$g.TITANIUM_SCUFFED?(_0x1f16f4="titanium_scuffed/Titanium-Scuffed_metallic.png",_0x3cf703="titanium_scuffed/Titanium-Scuffed_roughness.png",_0x13bdfa="titanium_scuffed/Titanium-Scuffed_basecolor.png"):e===je$g.METAL_PLATE&&(_0x1f16f4="metal_plate/metal_plate_disp_1k.jpg",_0x3cf703="metal_plate/metal_plate_rough_1k.jpg",_0x13bdfa="metal_plate/metal_plate_diff_1k.jpg"),_0x65eb06=n$15(_0x46f8d2+_0x1f16f4),_0x2fc719=n$15(_0x46f8d2+_0x3cf703),_0x3b467a=n$15(_0x46f8d2+_0x13bdfa),{metalTextureUrl:_0x65eb06,roughTextureUrl:_0x2fc719,albedoTextureUrl:_0x3b467a}};var _0x5dfbe5=(_0x4f8ed4=!0,function(e,t){var i=_0x4f8ed4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f8ed4=!1,i}),_0x5db831=_0x5dfbe5(void 0,(function(){return _0x5db831.toString().search("(((.+)+)+)+$").toString().constructor(_0x5db831).search("(((.+)+)+)+$")})),_0x4f8ed4;_0x5db831();var _0x3af776="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthTexture;\nuniform vec3 u_distancesAndEdlStrength;\nvarying vec2 v_textureCoordinates;\n\nvec2 neighborContribution(float log2Depth, vec2 padding)\n{\nfloat depthOrLogDepth = texture2D(u_pointCloud_depthTexture, v_textureCoordinates + padding).r;\nif (depthOrLogDepth == 1.0) {\nreturn vec2(0.0);\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(v_textureCoordinates + padding, depthOrLogDepth);\nreturn vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\nvoid main()\n{\nfloat depthOrLogDepth = texture2D(u_pointCloud_depthTexture, v_textureCoordinates).r;\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat log2Depth = log2(-eyeCoordinate.z);\nif (depthOrLogDepth == 1.0)\n{\ndiscard;\n}\nvec4 color = texture2D(u_pointCloud_colorGBuffer, v_textureCoordinates);\n#ifdef EDL_SHADING\nfloat distX = u_distancesAndEdlStrength.x;\nfloat distY = u_distancesAndEdlStrength.y;\nvec2 responseAndCount = vec2(0.0);\nresponseAndCount += neighborContribution(log2Depth, vec2(0, distY));\nresponseAndCount += neighborContribution(log2Depth, vec2(distX, 0));\nresponseAndCount += neighborContribution(log2Depth, vec2(0, -distY));\nresponseAndCount += neighborContribution(log2Depth, vec2(-distX, 0));\nfloat response = responseAndCount.x / responseAndCount.y;\nfloat shade = exp(-response * 300.0 * u_distancesAndEdlStrength.z);\ncolor.rgb *= shade;\n#endif\ngl_FragColor = vec4(color);\ngl_FragColor.a = 1.0;\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + (czm_projection * vec4(eyeCoordinate.xyz, 1.0)).w);\n#else\ngl_FragDepthEXT = czm_eyeToWindowCoordinates(vec4(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n",_0x3fbbe7=(_0x3919ce=!0,function(e,t){var i=_0x3919ce?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3919ce=!1,i}),_0x86a8b5=_0x3fbbe7(void 0,(function(){return _0x86a8b5.toString().search("(((.+)+)+)+$").toString().constructor(_0x86a8b5).search("(((.+)+)+)+$")})),_0x3919ce;_0x86a8b5();var _0x4b2711="\n#include <SceneUboDecl>\nvar u_pointCloud_colorGBuffer : texture_2d<f32>;\nvar u_pointCloud_colorGBufferSampler : sampler;\n\nvar u_pointCloud_depthTexture : texture_depth_2d;\nvar u_pointCloud_depthTextureSampler : sampler;\n\nuniform u_distancesAndEdlStrength : vec3<f32>;\nvarying v_textureCoordinates : vec2<f32>;\n\nfn windowToEyeCoordinates_v4(fragmentCoordinate : vec4<f32>) -> vec4<f32>\n{\n // Reconstruct NDC coordinates\n var x = 2.0 * (fragmentCoordinate.x - Scene.uViewport.x) / Scene.uViewport.z - 1.0;\n var y = 2.0 * (fragmentCoordinate.y - Scene.uViewport.y) / Scene.uViewport.w - 1.0;\n var z = (fragmentCoordinate.z - uniforms.czm_viewportTransformation[3][2]) / uniforms.czm_viewportTransformation[2][2];\n var q = vec4<f32>(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= fragmentCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n q = Scene.uInverseProjection * q;\n\n return q;\n}\n\n\nfn windowToEyeCoordinates(fragmentCoordinateXY : vec2<f32>, depthOrLogDepth : f32) -> vec4<f32>\n{\n var eyeCoordinate : vec4<f32>;\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#ifdef LOG_DEPTH\n var near = Scene.uCurrentFrustum.x;\n var far = Scene.uCurrentFrustum.y;\n var log2Depth = depthOrLogDepth * Scene.uLog2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n var depthFromCamera = depthFromNear + near;\n var windowCoord = vec4<f32>(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n eyeCoordinate = windowToEyeCoordinates_v4(windowCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n#else\n var windowCoord = vec4<f32>(fragmentCoordinateXY, depthOrLogDepth, 1.0);\n eyeCoordinate = windowToEyeCoordinates_v4(windowCoord);\n#endif\n return eyeCoordinate;\n}\n\nfn eyeToWindowCoordinates(positionEC : vec4<f32>) -> vec4<f32>\n{\n var q = Scene.uProjection * positionEC; // clip coordinates\n var qxyz = q.xyz;\n q = vec4<f32>(qxyz / q.w, q.w); // normalized device coordinates\n q = vec4<f32>((uniforms.czm_viewportTransformation * vec4<f32>(q.xyz, 1.0)).xyz, q.w); // window coordinates\n return q;\n}\n\nfn neighborContribution(log2Depth : f32, padding : vec2<f32>) -> vec2<f32>\n{\n var depthOrLogDepth = textureSample(u_pointCloud_depthTexture, u_pointCloud_depthTextureSampler, v_textureCoordinates + padding);\n if (depthOrLogDepth == 1.0) \n {\n return vec2<f32>(0.0);\n }\n var eyeCoordinate = windowToEyeCoordinates(v_textureCoordinates + padding, depthOrLogDepth);\n return vec2<f32>(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var depthOrLogDepth = textureSample(u_pointCloud_depthTexture, u_pointCloud_depthTextureSampler, v_textureCoordinates);\n var eyeCoordinate = windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\n eyeCoordinate /= eyeCoordinate.w;\n var log2Depth = log2(-eyeCoordinate.z);\n if (depthOrLogDepth == 1.0)\n {\n discard;\n }\n var color = textureSample(u_pointCloud_colorGBuffer, u_pointCloud_colorGBufferSampler, v_textureCoordinates);\n#ifdef EDL_SHADING\n var distX = uniforms.u_distancesAndEdlStrength.x;\n var distY = uniforms.u_distancesAndEdlStrength.y;\n var responseAndCount = vec2<f32>(0.0);\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(0, distY));\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(distX, 0));\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(0, -distY));\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(-distX, 0));\n var response = responseAndCount.x / responseAndCount.y;\n var shade = exp(-response * 300.0 * uniforms.u_distancesAndEdlStrength.z);\n color.r *= shade;\n color.g *= shade;\n color.b *= shade;\n#endif\n gl_FragColor = vec4<f32>(color);\n gl_FragColor.a = 1.0;\n#ifdef LOG_DEPTH\n czm_writeLogDepth(1.0 + (Scene.uProjection * vec4<f32>(eyeCoordinate.xyz, 1.0)).w);\n#else\n gl_FragDepth = czm_eyeToWindowCoordinates(vec4<f32>(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n",y$M="#define SAMPLES 8\n\nuniform float delta;\nuniform float sigma;\nuniform float direction; // 0.0 for x direction, 1.0 for y direction\n\nuniform sampler2D colorTexture;\n\n#ifdef USE_STEP_SIZE\nuniform float stepSize;\n#else\nuniform vec2 step;\n#endif\n\nvarying vec2 v_textureCoordinates;\n\n// Incremental Computation of the Gaussian:\n// https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch40.html\n\nvoid main()\n{\n vec2 st = v_textureCoordinates;\n vec2 dir = vec2(1.0 - direction, direction);\n\n#ifdef USE_STEP_SIZE\n vec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));\n#else\n vec2 step = step;\n#endif\n\n vec3 g;\n g.x = 1.0 / (sqrt(czm_twoPi) * sigma);\n g.y = exp((-0.5 * delta * delta) / (sigma * sigma));\n g.z = g.y * g.y;\n\n vec4 result = texture2D(colorTexture, st) * g.x;\n for (int i = 1; i < SAMPLES; ++i)\n {\n g.xy *= g.yz;\n\n vec2 offset = float(i) * dir * step;\n result += texture2D(colorTexture, st - offset) * g.x;\n result += texture2D(colorTexture, st + offset) * g.x;\n }\n\n gl_FragColor = result;\n}\n",_0x3ea35c=(_0x352f9d=!0,function(e,t){var i=_0x352f9d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x352f9d=!1,i}),_0x475d9a=_0x3ea35c(void 0,(function(){return _0x475d9a.toString().search("(((.+)+)+)+$").toString().constructor(_0x475d9a).search("(((.+)+)+)+$")})),_0x352f9d,_0x1bc4e2;function _0xd131b7(e){return new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:e,magnificationFilter:e})}function _0x3cffe6(){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthTexture=void 0,this._blurXFrameBuffer=void 0,this._blurXTexture=void 0,this._blurYFrameBuffer=void 0,this._blurYTexture=void 0,this._useCount=0}_0x475d9a(),_0x3cffe6._useCount=0,_0x3cffe6.addRef=function(){this._useCount++},_0x3cffe6.removeRef=function(){if(this._useCount--,0==this._useCount){var e=_0x1bc4e2._framebuffer;if(!e$2b(e))return;_0x1bc4e2._colorGBuffer.destroy(),_0x1bc4e2._depthTexture.destroy(),e.destroy()}this._useCount=Math.max(0,this._useCount)},_0x3cffe6.setCurrentFrameBuffer=function(e){_0x1bc4e2=e},_0x3cffe6.createFrameBuffer=function(e,t){var i=e.drawingBufferWidth*t,n=e.drawingBufferHeight*t,r=new t$V({context:e,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:_0xd131b7(tt$h.LINEAR)});new t$V({context:e,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:_0xd131b7(tt$h.NEAREST)});var o=new t$V({context:e,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8,sampler:_0xd131b7(tt$h.NEAREST)});_0x1bc4e2._framebuffer=new t$W({context:e,colorTextures:[r],depthStencilTexture:o,destroyAttachments:!1}),_0x1bc4e2._colorGBuffer=r,_0x1bc4e2._depthTexture=o,_0x1bc4e2._blurXTexture=new t$V({context:e,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:_0xd131b7(tt$h.LINEAR)}),_0x1bc4e2._blurXFrameBuffer=new t$W({context:e,colorTextures:[_0x1bc4e2._blurXTexture],destroyAttachments:!1}),_0x1bc4e2._blurYTexture=new t$V({context:e,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:_0xd131b7(tt$h.LINEAR)}),_0x1bc4e2._blurYFrameBuffer=new t$W({context:e,colorTextures:[_0x1bc4e2._blurYTexture],destroyAttachments:!1})},_0x3cffe6.getColorGBuffer=function(){return _0x1bc4e2._colorGBuffer},_0x3cffe6.getDepthTexture=function(){return _0x1bc4e2._depthTexture},_0x3cffe6.getFrameBuffer=function(){return _0x1bc4e2._framebuffer},_0x3cffe6.getBlurXFrameBuffer=function(){return _0x1bc4e2._blurXFrameBuffer},_0x3cffe6.getBlurYFrameBuffer=function(){return _0x1bc4e2._blurYFrameBuffer},_0x3cffe6.getBlurXTexture=function(){return _0x1bc4e2._blurXTexture},_0x3cffe6.getBlurYTexture=function(){return _0x1bc4e2._blurYTexture},_0x3cffe6.destroyFrameBuffer=function(){var e=_0x1bc4e2._framebuffer;!e$2b(e)||(_0x1bc4e2._colorGBuffer.destroy(),_0x1bc4e2._depthTexture.destroy(),e.destroy(),_0x1bc4e2._blurXTexture.destroy(),_0x1bc4e2._blurYTexture.destroy(),_0x1bc4e2._blurXFrameBuffer.destroy(),_0x1bc4e2._blurYFrameBuffer.destroy())};var _0x5b6e3=(_0x3706e4=!0,function(e,t){var i=_0x3706e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3706e4=!1,i}),_0x1941cc=_0x5b6e3(void 0,(function(){return _0x1941cc.toString().search("(((.+)+)+)+$").toString().constructor(_0x1941cc).search("(((.+)+)+)+$")})),_0x3706e4;_0x1941cc();var _0x58ef6d=.5;function _0x25441b(e){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthTexture=void 0,this._blurXFrameBuffer=void 0,this._blurXTexture=void 0,this._blurYFrameBuffer=void 0,this._blurYTexture=void 0,this._blurXCommand=void 0,this._blurYCommand=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this.edlShading=!1,this._edlShading=!1,this._performance=!1,this._strength=1,this._radius=1,this._passType=Le$s.S3MTiles,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},_0x3cffe6.addRef(),this.textureScale=_0x58ef6d}var _0x2f431a=new o$1p,_0x3fa541=new o$1o;function _0x8f7a6b(e,t){_0x3fa541.x=1/e._colorGBuffer.width,_0x3fa541.y=1/e._colorGBuffer.height;var i={delta:function(){return 1},sigma:function(){return 2},stepSize:function(){return 1},direction:function(){return 0},colorTexture:function(){return e._colorGBuffer}},n={delta:function(){return 1},sigma:function(){return 2},stepSize:function(){return 1},direction:function(){return 1},colorTexture:function(){return e._blurXTexture}},r="#define USE_STEP_SIZE\n"+y$M;e._blurXCommand=t.createViewportQuadCommand(r,{shaderProgramName:"blurX",uniformMap:i,pass:e._passType,owner:e}),e._blurXCommand.framebuffer=e._blurXFrameBuffer,e._blurXCommand.renderState=d$1m.fromCache({viewport:_0x45a1fe}),e._blurYCommand=t.createViewportQuadCommand(r,{shaderProgramName:"blurY",uniformMap:n,pass:e._passType,owner:e}),e._blurYCommand.framebuffer=e._blurYFrameBuffer,e._blurYCommand.renderState=d$1m.fromCache({viewport:_0x45a1fe});var o={u_pointCloud_colorGBuffer:function(){return e._performance?e._blurYTexture:e._colorGBuffer},u_pointCloud_depthTexture:function(){return e._depthTexture},u_distancesAndEdlStrength:function(){return _0x2f431a.x=e._radius/(t.drawingBufferWidth*_0x58ef6d),_0x2f431a.y=e._radius/(t.drawingBufferHeight*_0x58ef6d),_0x2f431a.z=e._strength,_0x2f431a}},a=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0}}),s=new s$U({name:"S3MPointCloudEDLFp",sources:[t.webgpu?_0x4b2711:_0x3af776],useWGSL:t.webgpu});e._edlShading&&s.defines.push("EDL_SHADING"),e._drawCommand=t.createViewportQuadCommand(s,{shaderProgramName:"S3MPointCloudEDL",uniformMap:o,renderState:a,pass:e._passType,owner:e,useWGSL:t.webgpu}),e._drawCommand.addUniformBuffer(t.uniformState._sceneUBO),e._clearCommand=new t$X({framebuffer:e._framebuffer,color:new e$1U(0,0,0,0),depth:1,renderState:d$1m.fromCache(),pass:e._passType,owner:e})}function _0x34424e(e,t){var i=t.drawingBufferWidth*_0x58ef6d,n=t.drawingBufferHeight*_0x58ef6d;_0x45a1fe.width=i,_0x45a1fe.height=n;var r=_0x3cffe6.getColorGBuffer(),o=!1,a=e$2b(r)&&(r.width!==i||r.height!==n);(!e$2b(r)||a)&&(_0x3cffe6.destroyFrameBuffer(),_0x3cffe6.createFrameBuffer(t,_0x58ef6d));var s=e._edlShading!=e.edlShading;e._edlShading=e.edlShading;var l=e._colorGBuffer;return a=e._screenWidth!==i||e._screenHeight!==n,(!e$2b(l)||a||s)&&(e._colorGBuffer=_0x3cffe6.getColorGBuffer(),e._depthTexture=_0x3cffe6.getDepthTexture(),e._framebuffer=_0x3cffe6.getFrameBuffer(),e._blurXFrameBuffer=_0x3cffe6.getBlurXFrameBuffer(),e._blurYFrameBuffer=_0x3cffe6.getBlurYFrameBuffer(),e._blurXTexture=_0x3cffe6.getBlurXTexture(),e._blurYTexture=_0x3cffe6.getBlurYTexture(),_0x8f7a6b(e,t),o=!0),e._screenWidth=i,e._screenHeight=n,o}function _0x4b70d5(e){return e.drawBuffers&&e.fragmentDepth}_0x25441b.isSupported=_0x4b70d5;var _0x45a1fe=new f$18;function _0x408338(e,t){var i=e[t.id];if(!e$2b(i)||i.viewport.width!=_0x45a1fe.width||i.viewport.height!=_0x45a1fe.height){var n=d$1m.getState(t);n.viewport=_0x45a1fe,i=d$1m.fromCache(n),e[t.id]=i}return i}_0x25441b.prototype.update=function(e,t,i){if(_0x4b70d5(e.context)){_0x3cffe6.setCurrentFrameBuffer(e.context._sharedEDL),this._strength=i.eyeDomeLightingStrength,this._radius=i.eyeDomeLightingRadius,this._performance=i.performance,this.edlShading=i.eyeDomeLighting,_0x58ef6d=i.performance?.5:1,this.textureScale=_0x58ef6d;var n,r=_0x34424e(this,e.context),o=e.commandList,a=o.length;for(n=t;n<a;++n){var s=o[n];if(s.owner._layer._fileType===d$15.PointCloudFile){var l=s.derivedCommands.pointCloudProcessor;(!e$2b(l)||s.dirty||r||l.framebuffer!==this._framebuffer)&&(l=i$_.shallowClone(s),s.derivedCommands.pointCloudProcessor=l,l.framebuffer=this._framebuffer,l.renderState=_0x408338(this._renderStateCache,l.renderState),l.castShadows=!1,l.receiveShadows=!1,l._pointCloudEyeDomeLighting=!0),o[n]=l}}var u=this._clearCommand,c=this._drawCommand;i.performance&&(o.push(this._blurXCommand),o.push(this._blurYCommand)),o.push(c),o.push(u)}},_0x25441b.prototype.isDestroyed=function(){return!1},_0x25441b.prototype.destroy=function(){return _0x3cffe6.removeRef(),i$10(this)};var _0x33ea35=(_0x5ef8d2=!0,function(e,t){var i=_0x5ef8d2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ef8d2=!1,i}),_0x2d62a0=_0x33ea35(void 0,(function(){return _0x2d62a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d62a0).search("(((.+)+)+)+$")})),_0x5ef8d2;_0x2d62a0();var R$K="attribute vec4 aPosition;\n#ifdef HAS_TEXTURECOORD\nattribute vec3 aTexCoord;\n#endif\n#ifdef Volume\n attribute vec3 aRatio;\n varying vec3 vecRotioCoord;\n\tvarying vec2 vecHypTexCoord;\n#endif\n#ifdef GEOCYLINDER\n uniform float uGeometryHeight;\n#endif\nvarying vec2 v_texCoord;\nvarying float v_face;\nvoid main()\n{\n#ifdef HAS_TEXTURECOORD\n v_texCoord = aTexCoord.xy;\n v_face = aTexCoord.z;\n#endif\n#ifdef GEOCYLINDER\n v_texCoord.y = aPosition.z / uGeometryHeight;\n#endif\n#ifdef Volume\nvecRotioCoord = aRatio;\n#endif\n#ifdef USE_RelativeOrigin\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz - czm_relativeOrigin, 1.0);\n#else\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n#endif\n}",_0x444331=(_0xda221c=!0,function(e,t){var i=_0xda221c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xda221c=!1,i}),_0x3cb131=_0x444331(void 0,(function(){return _0x3cb131.toString().search("(((.+)+)+)+$").toString().constructor(_0x3cb131).search("(((.+)+)+)+$")})),_0xda221c;_0x3cb131();var _0x5a01b0="uniform sampler2D uClampTexture;\nuniform vec4 uClipPlaneColor;\nuniform float uUseColor;\nvoid main()\n{\nvec2 center = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\nvec4 clampColor = texture2D(uClampTexture, center);\nif(clampColor.r < 0.01 && clampColor.g < 0.01 && clampColor.b < 0.01)\n{\n discard;\n}\ngl_FragColor = mix(clampColor, uClipPlaneColor, uUseColor);\n}",_0x5c6c07=(_0x280dbd=!0,function(e,t){var i=_0x280dbd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x280dbd=!1,i}),_0x313445=_0x5c6c07(void 0,(function(){return _0x313445.toString().search("(((.+)+)+)+$").toString().constructor(_0x313445).search("(((.+)+)+)+$")})),_0x280dbd;_0x313445();var _0x2742bb="void main()\n{\ngl_FragColor = vec4(1.0);\n}",_0x26be82=(_0xe50926=!0,function(e,t){var i=_0xe50926?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe50926=!1,i}),_0x5b91ed=_0x26be82(void 0,(function(){return _0x5b91ed.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b91ed).search("(((.+)+)+)+$")})),_0xe50926;function _0x3218ec(e){this._layer=e,this._colorCommand=void 0,this._depthCommand=void 0,this._firstPoint=void 0,this._secondPoint=void 0,this._thirdPoint=void 0,this._boundingSphere=new i$1c(new o$1p(0,0,0),6378137),this._matModel=p$1d.IDENTITY,this._attributeLocations={}}_0x5b91ed(),Object.defineProperties(_0x3218ec.prototype,{}),_0x3218ec.prototype.initialize=function(e,t){this._initialize||(this.createCommand(e,t),this._initialize=!0)},_0x3218ec.prototype.update=function(e,t,i){if(this.initialize(e,t),!t.passes.pick&&!t.passes.depth){if(t._fboState.frameBufferType==Qe$c.CLAMP)return void(e$2b(this._depthCommand)&&i.push(this._depthCommand));e$2b(this._colorCommand)&&i.push(this._colorCommand)}};var _0x2fe92b=new o$1p;function _0x884aed(e){e$2b(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}_0x3218ec.prototype.createVertices=function(e){var t=S$12.createTypedArray(S$12.FLOAT,9),i=0,n=1e3;return t[i++]=(this._firstPoint.x-e.x)*n,t[i++]=(this._firstPoint.y-e.y)*n,t[i++]=(this._firstPoint.z-e.z)*n,t[i++]=(this._secondPoint.x-e.x)*n,t[i++]=(this._secondPoint.y-e.y)*n,t[i++]=(this._secondPoint.z-e.z)*n,t[i++]=(this._thirdPoint.x-e.x)*n,t[i++]=(this._thirdPoint.y-e.y)*n,t[i++]=(this._thirdPoint.z-e.z)*n,t},_0x3218ec.prototype.createCommand=function(e,t){_0x884aed(this._colorCommand),_0x884aed(this._depthCommand);var i=S$12.createTypedArray(S$12.UNSIGNED_SHORT,3);i[0]=0,i[1]=1,i[2]=2,_0x2fe92b.x=(this._firstPoint.x+this._secondPoint.x+this._thirdPoint.x)/3,_0x2fe92b.y=(this._firstPoint.y+this._secondPoint.y+this._thirdPoint.y)/3,_0x2fe92b.z=(this._firstPoint.z+this._secondPoint.z+this._thirdPoint.z)/3;var n=this.createVertices(_0x2fe92b),r=t$Y.createVertexBuffer({context:e,typedArray:n,usage:A$19.STATIC_DRAW}),o=[];this._attributeLocations.aPosition=0,o.push({name:"aPosition",index:this._attributeLocations.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var a=t$Y.createIndexBuffer({context:e,typedArray:i,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),s={};p$1d.fromRotationTranslation(p$1e.IDENTITY,_0x2fe92b,s),this._matModel=s,this._depthCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matModel,boundingVolume:this._boundingSphere,pass:Le$s.S3MTiles,cull:!1}),this._depthCommand.vertexArray=new c$12({context:e,attributes:o,indexBuffer:a}),this._depthCommand.shaderProgram=r$13.fromCache({name:"ClipPlaneDepth",context:e,vertexShaderSource:R$K,fragmentShaderSource:_0x2742bb,attributeLocations:this._attributeLocations}),this._depthCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!0,colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this.createColorCommand(e,t)},_0x3218ec.prototype.createColorCommand=function(e,t){var i=i$_.shallowClone(this._depthCommand),n=this._depthCommand.shaderProgram.vertexShaderSource.clone();i.shaderProgram=r$13.fromCache({name:"ClipPlaneColor",context:e,vertexShaderSource:n,fragmentShaderSource:_0x5a01b0,attributeLocations:this._attributeLocations});var r=this;i.uniformMap={uClampTexture:function(){var i=t._framebufferList.clampTexture;return e$2b(i)?i.renderTexture._fb.getColorTexture(0):e.defaultTexture},uClipPlaneColor:function(){return r._layer._clipPlaneColor},uUseColor:function(){var e=r._layer._clipPlaneMode;return e===_0xff9e19.COLOR?1:(_0xff9e19.MODEL_COLOR,0)}},i.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!0}),i.pass=Le$s.S3MTiles-1,this._colorCommand=i},_0x3218ec.prototype.setPoints=function(e,t,i){this._initialize=!1,this._firstPoint=e,this._secondPoint=t,this._thirdPoint=i},_0x3218ec.prototype.destroy=function(){return _0x884aed(this._colorCommand),this._colorCommand=void 0,_0x884aed(this._depthCommand),this._depthCommand=void 0,i$10(this)};var _0x1b6e2a=(_0x2c585a=!0,function(e,t){var i=_0x2c585a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c585a=!1,i}),_0xb0d308=_0x1b6e2a(void 0,(function(){return _0xb0d308.toString().search("(((.+)+)+)+$").toString().constructor(_0xb0d308).search("(((.+)+)+)+$")})),_0x2c585a;function _0x5ea05b(e){this._enable=!1,this._speed=100,this._period=0,this._layer=e}_0xb0d308(),Object.defineProperties(_0x5ea05b.prototype,{enable:{get:function(){return this._enable},set:function(e){e!=this._enable&&(this._enable=e,this._layer.bloomEnableChange(e))}},speed:{get:function(){return this._speed},set:function(e){this._speed=e}},period:{get:function(){return this._period/1e3},set:function(e){this._period=1e3*e}},maxBloomHeight:{get:function(){if(0==this._period)return Number.MAX_VALUE;var e=performance.now()%this._period;return this._speed*e/1e3}}});var _0x1649be=(_0x45ae4f=!0,function(e,t){var i=_0x45ae4f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45ae4f=!1,i}),_0x1878a5=_0x1649be(void 0,(function(){return _0x1878a5.toString().search("(((.+)+)+)+$").toString().constructor(_0x1878a5).search("(((.+)+)+)+$")})),_0x45ae4f;function _0x5d6ada(){this._cache={},this._queue=new r$16}_0x1878a5();var _0x4ae8ad=0,_0x2f5d88=104857600;_0x5d6ada.prototype.set=function(e,t,i){var n=e+"_"+t;if(!e$2b(this._cache[n])){var r={id:n,buffer:i};for(this._cache[n]=r,this._queue.enqueue(n),_0x4ae8ad+=i.byteLength;_0x4ae8ad>_0x2f5d88;){var o=this._queue.dequeue(),a=this._cache[o];_0x4ae8ad-=a.buffer.byteLength,delete this._cache[o]}}},_0x5d6ada.prototype.get=function(e,t){var i=e+"_"+t,n=this._cache[i];if(e$2b(n))return n.buffer},_0x5d6ada.prototype.contains=function(e,t){var i=e+"_"+t;return e$2b(this._cache[i])},_0x5d6ada._singleInstance=void 0,_0x5d6ada.getSingleInstance=function(){return e$2b(_0x5d6ada._singleInstance)||(_0x5d6ada._singleInstance=new _0x5d6ada),_0x5d6ada._singleInstance};var e$18={KeepOutside:1,KeepInside:2},R$J=Object.freeze(e$18),_0x21397c=(_0x565d42=!0,function(e,t){var i=_0x565d42?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x565d42=!1,i}),_0x364019=_0x21397c(void 0,(function(){return _0x364019.toString().search("(((.+)+)+)+$").toString().constructor(_0x364019).search("(((.+)+)+)+$")})),_0x565d42;_0x364019();var Z$J="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nattribute vec2 aTexCoord1;\nvarying float vHeight;\nvarying float regionHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vHeight = aPosition.w;\n vTexCoord0 = aTexCoord0.xy;\n vTexCoord1 = aTexCoord1;\n regionHeight = aTexCoord0.z;\n gl_Position = pos;\n v_positionMC = vec4(aPosition.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\n}",_0x172f56=(_0x4a5a56=!0,function(e,t){var i=_0x4a5a56?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a5a56=!1,i}),_0x2baec7=_0x172f56(void 0,(function(){return _0x2baec7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2baec7).search("(((.+)+)+)+$")})),_0x4a5a56;_0x2baec7();var $$N="uniform sampler2D uColorTexture;\nuniform sampler2D uRasterTexture;\n#ifdef IsExtract\nuniform float uExtractHeight;\n#endif\nvarying float vHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying float regionHeight;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uRasterTexture, vTexCoord0));\n if(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n }\n if (vHeight > terrainHeight || vHeight < regionHeight) { \n discard;\n }\n#ifdef IsExtract\n if (vHeight < uExtractHeight) { \n discard;\n }\n#endif\n vec4 baseColorWithAlpha = texture2D(uColorTexture, vTexCoord1);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(vTexCoord1.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(vTexCoord1.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, vTexCoord1.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n if(gl_FrontFacing)\n {\n n = -n;\n }\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}";function t$F(e){if(this._renderTexture=new s$L(e),this._context=e,this._isUpdate=!0,this._beginFunc=void 0,this._endFunc=void 0,this._useColor=!0,this._useHeight=!0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!1,isUnderGlobeVisible:!1,isOnlyS3MObjectVisible:!1},!e.webgpu){var t=e._gl,i=e$2b(e._currentFramebuffer)?e._currentFramebuffer._framebuffer:null;e.webgpu||t.bindFramebuffer(t.FRAMEBUFFER,i)}}Object.defineProperties(t$F.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},useType:{get:function(){return this._useHeight<<2|this._useColor<<1|this._isDepth},set:function(e){this._useHeight=(4&e)>0?1:0,this._useColor=(2&e)>0?1:0,this._isDepth=1&e}},frameBufferType:{get:function(){return Qe$c.RASTER}}}),t$F.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._beginFunc&&this._beginFunc(e),this._renderTexture._passState},t$F.prototype.end=function(e){this._endFunc&&this._endFunc(e)},t$F.prototype.update=function(e,t){},t$F.prototype.isDestroyed=function(){return!1},t$F.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)};var e$17={NONE:0,BITS12:1},me$p=Object.freeze(e$17),e$16={NONE:-1,PARTIAL:0,FULL:1},fe$n=Object.freeze(e$16),e$15={DisplayMode:{NONE:0,FACE:1,ARROW:2,FACE_AND_ARROW:3}},_0x256766=Object.freeze(e$15),e$14={NONE:0,LERC:1},T$L=Object.freeze(e$14);function s$G(e,t){o$1q.typeOf.object("ellipsoid",e),this._ellipsoid=e,this._cameraPosition=new o$1p,this._cameraPositionInScaledSpace=new o$1p,this._distanceToLimbInScaledSpaceSquared=0,e$2b(t)&&(this.cameraPosition=t)}Object.defineProperties(s$G.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){var t=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=o$1p.magnitudeSquared(t)-1;o$1p.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=t,this._distanceToLimbInScaledSpaceSquared=i}}});var _$I=new o$1p;s$G.prototype.isPointVisible=function(e){return h$M(this._ellipsoid.transformPositionToScaledSpace(e,_$I),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},s$G.prototype.isScaledSpacePointVisible=function(e){return h$M(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var w$K=new o$1p;s$G.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){var i,n,r=this._ellipsoid;return e$2b(t)&&t<0&&r.minimumRadius>-t?((n=w$K).x=this._cameraPosition.x/(r.radii.x+t),n.y=this._cameraPosition.y/(r.radii.y+t),n.z=this._cameraPosition.z/(r.radii.z+t),i=n.x*n.x+n.y*n.y+n.z*n.z-1):(n=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),h$M(e,n,i)},s$G.prototype.computeHorizonCullingPoint=function(e,t,i){return q$Q(this._ellipsoid,e,t,i)};var b$Z=t$13.clone(t$13.UNIT_SPHERE);s$G.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,i,n){return q$Q(z$J(this._ellipsoid,i,b$Z),e,t,n)},s$G.prototype.computeHorizonCullingPointFromVertices=function(e,t,i,n,r){return E$O(this._ellipsoid,e,t,i,n,r)},s$G.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,i,n,r,o){return E$O(z$J(this._ellipsoid,r,b$Z),e,t,i,n,o)};var O$A=[];s$G.prototype.computeHorizonCullingPointFromRectangle=function(e,t,i){o$1q.typeOf.object("rectangle",e);var n=h$18.subsample(e,t,0,O$A),r=i$1c.fromPoints(n);if(!(o$1p.magnitude(r.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(r.center,n,i)};var R$I=new o$1p;function z$J(e,t,i){if(e$2b(t)&&t<0&&e.minimumRadius>-t){var n=o$1p.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,R$I);e=t$13.fromCartesian3(n,i)}return e}function q$Q(e,t,i,n){o$1q.typeOf.object("directionToPoint",t),o$1q.defined("positions",i),e$2b(n)||(n=new o$1p);for(var r=C$Q(e,t),o=0,a=0,s=i.length;a<s;++a){var l=g$T(e,i[a],r);if(l<0)return;o=Math.max(o,l)}return x$S(r,o,n)}var m$P=new o$1p;function E$O(e,t,i,n,r,o){o$1q.typeOf.object("directionToPoint",t),o$1q.defined("vertices",i),o$1q.typeOf.number("stride",n),e$2b(o)||(o=new o$1p),n=u$_(n,3),r=u$_(r,o$1p.ZERO);for(var a=C$Q(e,t),s=0,l=0,u=i.length;l<u;l+=n){m$P.x=i[l]+r.x,m$P.y=i[l+1]+r.y,m$P.z=i[l+2]+r.z;var c=g$T(e,m$P,a);if(c<0)return;s=Math.max(s,c)}return x$S(a,s,o)}function h$M(e,t,i){var n=t,r=i,o=o$1p.subtract(e,n,_$I),a=-o$1p.dot(o,n);return!(r<0?a>0:a>r&&a*a/o$1p.magnitudeSquared(o)>r)}var V$E=new o$1p,k$J=new o$1p;function g$T(e,t,i){var n=e.transformPositionToScaledSpace(t,V$E),r=o$1p.magnitudeSquared(n),o=Math.sqrt(r),a=o$1p.divideByScalar(n,o,k$J);r=Math.max(1,r);var s=1/(o=Math.max(1,o));return 1/(o$1p.dot(a,i)*s-o$1p.magnitude(o$1p.cross(a,i,a))*(Math.sqrt(r-1)*s))}function x$S(e,t,i){if(!(t<=0||t===1/0||t!=t))return o$1p.multiplyByScalar(e,t,i)}var P$L=new o$1p;function C$Q(e,t){return o$1p.equals(t,o$1p.ZERO)?t:(e.transformPositionToScaledSpace(t,P$L),o$1p.normalize(P$L,P$L))}var N$F=new o$1p,B$K=new o$1p,c$N=new o$1o,M$Q=new p$1d,I$Y=new p$1d,g$S=Math.pow(2,12);function h$L(e,t,i,n,r,o){var a,s,l,u=me$p.NONE;if(e$2b(e)&&e$2b(t)&&e$2b(i)&&e$2b(n)){var c=e.minimum,h=e.maximum,d=o$1p.subtract(h,c,B$K),f=i-t;u=Math.max(o$1p.maximumComponent(d),f)<g$S-1?me$p.BITS12:me$p.NONE,u=me$p.NONE,a=e.center,s=p$1d.inverseTransformation(n,new p$1d);var p=o$1p.negate(c,N$F);p$1d.multiply(p$1d.fromTranslation(p,M$Q),s,s);var _=N$F;_.x=1/d.x,_.y=1/d.y,_.z=1/d.z,p$1d.multiply(p$1d.fromScale(_,M$Q),s,s),l=p$1d.clone(n),p$1d.setTranslation(l,o$1p.ZERO,l),n=p$1d.clone(n,new p$1d);var m=p$1d.fromTranslation(c,M$Q),g=p$1d.fromScale(d,I$Y),x=p$1d.multiply(m,g,M$Q);p$1d.multiply(n,x,n),p$1d.multiply(l,x,l)}this.quantization=u,this.minimumHeight=t,this.maximumHeight=i,this.center=a,this.toScaledENU=s,this.fromScaledENU=n,this.matrix=l,this.hasVertexNormals=r,this.hasWebMercatorT=u$_(o,!1)}h$L.prototype.encode=function(e,t,i,n,r,o,a){var s=n.x,l=n.y;if(this.quantization===me$p.BITS12){(i=p$1d.multiplyByPoint(this.toScaledENU,i,N$F)).x=e$2a.clamp(i.x,0,1),i.y=e$2a.clamp(i.y,0,1),i.z=e$2a.clamp(i.z,0,1);var u=this.maximumHeight-this.minimumHeight,c=e$2a.clamp((r-this.minimumHeight)/u,0,1);o$1o.fromElements(i.x,i.y,c$N);var h=t$10.compressTextureCoordinates(c$N);o$1o.fromElements(i.z,c,c$N);var d=t$10.compressTextureCoordinates(c$N);o$1o.fromElements(s,l,c$N);var f=t$10.compressTextureCoordinates(c$N);if(e[t++]=h,e[t++]=d,e[t++]=f,this.hasWebMercatorT){o$1o.fromElements(a,0,c$N);var p=t$10.compressTextureCoordinates(c$N);e[t++]=p}}else o$1p.subtract(i,this.center,N$F),e[t++]=N$F.x,e[t++]=N$F.y,e[t++]=N$F.z,e[t++]=r,e[t++]=s,e[t++]=l,this.hasWebMercatorT&&(e[t++]=a);return this.hasVertexNormals&&(e[t++]=t$10.octPackFloat(o)),t},h$L.prototype.decodePosition=function(e,t,i){if(e$2b(i)||(i=new o$1p),t*=this.getStride(),this.quantization===me$p.BITS12){var n=t$10.decompressTextureCoordinates(e[t],c$N);i.x=n.x,i.y=n.y;var r=t$10.decompressTextureCoordinates(e[t+1],c$N);return i.z=r.x,p$1d.multiplyByPoint(this.fromScaledENU,i,i)}return i.x=e[t],i.y=e[t+1],i.z=e[t+2],o$1p.add(i,this.center,i)},h$L.prototype.decodeTextureCoordinates=function(e,t,i){return e$2b(i)||(i=new o$1o),t*=this.getStride(),this.quantization===me$p.BITS12?t$10.decompressTextureCoordinates(e[t+2],i):o$1o.fromElements(e[t+4],e[t+5],i)},h$L.prototype.decodeHeight=function(e,t){return t*=this.getStride(),this.quantization===me$p.BITS12?t$10.decompressTextureCoordinates(e[t+1],c$N).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]},h$L.prototype.decodeWebMercatorT=function(e,t){return t*=this.getStride(),this.quantization===me$p.BITS12?t$10.decompressTextureCoordinates(e[t+3],c$N).x:e[t+6]},h$L.prototype.getOctEncodedNormal=function(e,t,i){var n=e[t=(t+1)*this.getStride()-1]/256,r=Math.floor(n),o=256*(n-r);return o$1o.fromElements(r,o,i)},h$L.prototype.getStride=function(){var e;if(this.quantization===me$p.BITS12)e=3;else e=6;return this.hasWebMercatorT&&++e,this.hasVertexNormals&&++e,e};var H$P={position3DAndHeight:0,textureCoordAndEncodedNormals:1},F$P={compressed0:0,compressed1:1};h$L.prototype.getAttributes=function(e){var t,i=S$12.FLOAT,n=S$12.getSizeInBytes(i);if(this.quantization===me$p.NONE){var r=2;this.hasWebMercatorT&&++r,this.hasVertexNormals&&++r,t=(4+r)*n;var o=[{index:H$P.position3DAndHeight,name:"position3DAndHeight",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:4,offsetInBytes:0,strideInBytes:t},{index:H$P.textureCoordAndEncodedNormals,name:"textureCoordAndEncodedNormals",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:r,offsetInBytes:4*n,strideInBytes:t}];return o}var a=3,s=0;return(this.hasWebMercatorT||this.hasVertexNormals)&&++a,this.hasWebMercatorT&&this.hasVertexNormals?(t=(a+ ++s)*n,[{index:o.compressed0,name:"compressed0",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a,offsetInBytes:0,strideInBytes:t},{index:o.compressed1,name:"compressed1",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:s,offsetInBytes:a*n,strideInBytes:t}]):[{index:o.compressed0,name:"compressed0",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a}]},h$L.prototype.getAttributeLocations=function(){return this.quantization===me$p.NONE?H$P:F$P},h$L.clone=function(e,t){return e$2b(t)||(t=new h$L),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=o$1p.clone(e.center),t.toScaledENU=p$1d.clone(e.toScaledENU),t.fromScaledENU=p$1d.clone(e.fromScaledENU),t.matrix=p$1d.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t};var m$O={};m$O.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var lr$6=new o$1p,sa$3=new p$1d,ua$3=new o$1p,Ta$4=new o$1p;function T$K(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x){this.center=e,this.vertices=t,this.stride=u$_(u,6),this.indexCountWithoutSkirts=n,this.vertexCountWithoutSkirts=r,this.indices=i,this.minimumHeight=o,this.maximumHeight=a,this.boundingSphere3D=s,this.occludeePointInScaledSpace=l,this.orientedBoundingBox=c,this.validOrientedBoundingBox=x,this.encoding=h,this.exaggeration=d,this.westIndicesSouthToNorth=f,this.southIndicesEastToWest=p,this.eastIndicesNorthToSouth=_,this.northIndicesWestToEast=m,this.invalid=u$_(g,!1)}function T$J(e){if(!e$2b(e)||!e$2b(e.buffer))throw new t$16("options.buffer is required.");if(!e$2b(e.width))throw new t$16("options.width is required.");if(!e$2b(e.height))throw new t$16("options.height is required.");this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=u$_(e.childTileMask,15),this._encoding=u$_(e.encoding,T$L.NONE),this._valid=u$_(e.valid,!0),e$2b(e.childTileMaskExt)&&(this._childTileMaskExt=e.childTileMaskExt,this._level=e.level,this._x=e.x,this._y=e.y);var t=m$O.DEFAULT_STRUCTURE,i=e.structure;e$2b(i)?i!==t&&(i.heightScale=u$_(i.heightScale,t.heightScale),i.heightOffset=u$_(i.heightOffset,t.heightOffset),i.elementsPerHeight=u$_(i.elementsPerHeight,t.elementsPerHeight),i.stride=u$_(i.stride,t.stride),i.elementMultiplier=u$_(i.elementMultiplier,t.elementMultiplier),i.isBigEndian=u$_(i.isBigEndian,t.isBigEndian)):i=t,this._structure=i,this._createdByUpsampling=u$_(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===T$L.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0,this._skirtMode=u$_(e.skirtMode,!0),this._skirtScale=u$_(e.skirtScale,.1),this._releaseBuffer=!0,e$2b(e.releaseBuffer)&&(this._releaseBuffer=e.releaseBuffer),this._normalTexture=e.normalTexture}m$O.computeVertices=function(e){if(!e$2b(e)||!e$2b(e.heightmap))throw new t$16("options.heightmap is required.");if(!e$2b(e.width)||!e$2b(e.height))throw new t$16("options.width and options.height are required.");if(!e$2b(e.nativeRectangle))throw new t$16("options.nativeRectangle is required.");if(!e$2b(e.skirtHeight))throw new t$16("options.skirtHeight is required.");var t,i,n,r,o=Math.cos,a=Math.sin,s=Math.sqrt,l=Math.atan,u=Math.exp,c=e$2a.PI_OVER_TWO,h=e$2a.toRadians,d=e.heightmap,f=e.width,p=e.height,_=e.skirtHeight,m=u$_(e.isGeographic,!0),g=u$_(e.ellipsoid,t$13.WGS84),x=1/g.maximumRadius,v=e.nativeRectangle,y=e.rectangle;e$2b(y)?(t=y.west,i=y.south,n=y.east,r=y.north):m?(t=h(v.west),i=h(v.south),n=h(v.east),r=h(v.north)):(t=v.west*x,i=c-2*l(u(-v.south*x)),n=v.east*x,r=c-2*l(u(-v.north*x)));var $=e.relativeToCenter,b=e$2b($);$=b?$:o$1p.ZERO;var T=u$_(e.exaggeration,1),C=u$_(e.includeWebMercatorT,!1),S=u$_(e.structure,m$O.DEFAULT_STRUCTURE),w=u$_(S.heightScale,m$O.DEFAULT_STRUCTURE.heightScale),E=u$_(S.heightOffset,m$O.DEFAULT_STRUCTURE.heightOffset),P=u$_(S.elementsPerHeight,m$O.DEFAULT_STRUCTURE.elementsPerHeight),A=u$_(S.stride,m$O.DEFAULT_STRUCTURE.stride),L=u$_(S.elementMultiplier,m$O.DEFAULT_STRUCTURE.elementMultiplier),M=u$_(S.isBigEndian,m$O.DEFAULT_STRUCTURE.isBigEndian),R=h$18.computeWidth(v),I=h$18.computeHeight(v),O=R/(f-1),D=I/(p-1);m||(R*=x,I*=x);var B,N,F=g.radiiSquared,U=F.x,z=F.y,G=F.z,V=65536,k=-65536,W=m$17.eastNorthUpToFixedFrame($,g),H=p$1d.inverseTransformation(W,sa$3);C&&(B=t$O.geodeticLatitudeToMercatorAngle(i),N=1/(t$O.geodeticLatitudeToMercatorAngle(r)-B));var q=ua$3;q.x=Number.POSITIVE_INFINITY,q.y=Number.POSITIVE_INFINITY,q.z=Number.POSITIVE_INFINITY;var j=Ta$4;j.x=Number.NEGATIVE_INFINITY,j.y=Number.NEGATIVE_INFINITY,j.z=Number.NEGATIVE_INFINITY;var Y=Number.POSITIVE_INFINITY,X=f*p,K=X+(_>0?2*f+2*p:0),Q=new Array(K),Z=new Array(K),J=new Array(K),ee=C?new Array(K):[],te=0,ie=p,ne=0,re=f;_>0&&(--te,++ie,--ne,++re);for(var oe=1e-5,ae=te;ae<ie;++ae){var se=ae;se<0&&(se=0),se>=p&&(se=p-1);var le=v.north-D*se,ue=((le=m?h(le):c-2*l(u(-le*x)))-i)/(r-i);ue=e$2a.clamp(ue,0,1);var ce=ae===te,he=ae===ie-1;_>0&&(ce?le+=oe*I:he&&(le-=oe*I));var de,fe=o(le),pe=a(le),_e=G*pe;C&&(de=(t$O.geodeticLatitudeToMercatorAngle(le)-B)*N);for(var me=ne;me<re;++me){var ge=me;ge<0&&(ge=0),ge>=f&&(ge=f-1);var xe,ve,ye=se*(f*A)+ge*A;if(1===P)xe=d[ye];else if(xe=0,M)for(ve=0;ve<P;++ve)xe=xe*L+d[ye+ve];else for(ve=P-1;ve>=0;--ve)xe=xe*L+d[ye+ve];xe=(xe*w+E)*T,k=Math.max(k,xe),V=Math.min(V,xe);var $e=v.west+O*ge;m?$e=h($e):$e*=x;var be=($e-t)/(n-t);be=e$2a.clamp(be,0,1);var Te=se*f+ge;if(_>0){var Ce=me===ne,Se=me===re-1,we=ce||he||Ce||Se;if((ce||he)&&(Ce||Se))continue;we&&(xe-=_,Ce?(Te=X+(p-se-1),$e-=oe*R):he?Te=X+p+(f-ge-1):Se?(Te=X+p+f+se,$e+=oe*R):ce&&(Te=X+p+f+p+ge))}var Ee=fe*o($e),Pe=fe*a($e),Ae=U*Ee,Le=z*Pe,Me=1/s(Ae*Ee+Le*Pe+_e*pe),Re=Ae*Me,Ie=Le*Me,Oe=_e*Me,De=new o$1p;De.x=Re+Ee*xe,De.y=Ie+Pe*xe,De.z=Oe+pe*xe,Q[Te]=De,Z[Te]=xe,J[Te]=new o$1o(be,ue),C&&(ee[Te]=de),p$1d.multiplyByPoint(H,De,lr$6),o$1p.minimumByComponent(lr$6,q,q),o$1p.maximumByComponent(lr$6,j,j),Y=Math.min(Y,xe)}}var Be,Ne,Fe=i$1c.fromPoints(Q);(e$2b(y)&&(Be=y$Z.fromRectangle(y,V,k,g)),b)&&(Ne=new s$G(g).computeHorizonCullingPointPossiblyUnderEllipsoid($,Q,V));for(var Ue=new h$L(new e$26(q,j,$),Y,k,W,!1,C),ze=new Float32Array(K*Ue.getStride()),Ge=0,Ve=0;Ve<K;++Ve)Ge=Ue.encode(ze,Ge,Q[Ve],J[Ve],Z[Ve],void 0,ee[Ve]);return{vertices:ze,maximumHeight:k,minimumHeight:V,encoding:Ue,boundingSphere3D:Fe,orientedBoundingBox:Be,occludeePointInScaledSpace:Ne}},Object.defineProperties(T$J.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return e$2b(this._mesh)}},normalTexture:{get:function(){return this._normalTexture}}});var Q$L=new i$V("createVerticesFromHeightmap");T$J.prototype.createMesh=function(e,t,i,n,r){if(!e$2b(e))throw new t$16("tilingScheme is required.");if(!e$2b(t))throw new t$16("x is required.");if(!e$2b(i))throw new t$16("y is required.");if(!e$2b(n))throw new t$16("level is required.");var o=e.ellipsoid,a=e.tileXYToNativeRectangle(t,i,n),s=e.tileXYToRectangle(t,i,n);r=u$_(r,1);var l=o.cartographicToCartesian(h$18.center(s)),u=this._structure,c=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<n);if(this._skirtMode)if(e.isSct){var h=Math.min.apply(null,this._buffer),d=Math.max.apply(null,this._buffer);this._skirtHeight=this._skirtScale*(d-h),0===this._skirtHeight&&(this._skirtHeight=Math.min(4*c,1e3))}else this._skirtHeight=Math.min(4*c,1e3);else this._skirtHeight=0;var f=Q$L.scheduleTask({heightmap:this._buffer,structure:u,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:a,rectangle:s,relativeToCenter:l,ellipsoid:o,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof n$1b,exaggeration:r,encoding:this._encoding});if(e$2b(f)){var p=this;return o$1l(f,(function(e){var t;t=p._skirtHeight>0?I$12.getRegularGridAndSkirtIndicesAndEdgeIndices(e.gridWidth,e.gridHeight):I$12.getRegularGridIndicesAndEdgeIndices(e.gridWidth,e.gridHeight);var i=e.gridWidth*e.gridHeight;return p._mesh=new T$K(l,new Float32Array(e.vertices),t.indices,t.indexCountWithoutSkirts,i,e.minimumHeight,e.maximumHeight,i$1c.clone(e.boundingSphere3D),o$1p.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,y$Z.clone(e.orientedBoundingBox),h$L.clone(e.encoding),r,t.westIndicesSouthToNorth,t.southIndicesEastToWest,t.eastIndicesNorthToSouth,t.northIndicesWestToEast),p._buffer=void 0,p._mesh}))}},T$J.prototype._createMeshSync=function(e,t,i,n,r){if(!e$2b(e))throw new t$16("tilingScheme is required.");if(!e$2b(t))throw new t$16("x is required.");if(!e$2b(i))throw new t$16("y is required.");if(!e$2b(n))throw new t$16("level is required.");var o=e.ellipsoid,a=e.tileXYToNativeRectangle(t,i,n),s=e.tileXYToRectangle(t,i,n);r=u$_(r,1);var l=o.cartographicToCartesian(h$18.center(s)),u=this._structure,c=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<n);this._skirtHeight=Math.min(4*c,1e3);var h,d=m$O.computeVertices({heightmap:this._buffer,structure:u,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:a,rectangle:s,relativeToCenter:l,ellipsoid:o,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof n$1b,exaggeration:r});this._buffer=void 0,h=this._skirtHeight>0?I$12.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):I$12.getRegularGridIndicesAndEdgeIndices(this._width,this._height);var f=d.gridWidth*d.gridHeight;return new T$K(l,d.vertices,h.indices,h.indexCountWithoutSkirts,f,d.minimumHeight,d.maximumHeight,d.boundingSphere3D,d.occludeePointInScaledSpace,d.encoding.getStride(),d.orientedBoundingBox,d.encoding,r,h.westIndicesSouthToNorth,h.southIndicesEastToWest,h.eastIndicesNorthToSouth,h.northIndicesWestToEast)},T$J.prototype.interpolateHeight=function(e,t,i){var n,r=this._width,o=this._height,a=this._structure,s=a.stride,l=a.elementsPerHeight,u=a.elementMultiplier,c=a.isBigEndian,h=a.heightOffset,d=a.heightScale;e$2b(this._mesh)?n=G$W(this._mesh.vertices,this._mesh.encoding,h,d,e,r,o,t,i,this._mesh.exaggeration):n=(n=ee$s(this._buffer,l,u,s,c,e,r,o,t,i))*d+h;return n};var y$L=33,$$M=new Float32Array(y$L*y$L);function ee$s(e,t,i,n,r,o,a,s,l,u){var c=(l-o.west)*(a-1)/(o.east-o.west),h=(u-o.south)*(s-1)/(o.north-o.south),d=0|c,f=d+1;f>=a&&(f=a-1,d=a-2);var p=0|h,_=p+1;return _>=s&&(_=s-1,p=s-2),_=s-1-_,D$N(c-d,h-p,A$T(e,t,i,n,r,(p=s-1-p)*a+d),A$T(e,t,i,n,r,p*a+f),A$T(e,t,i,n,r,_*a+d),A$T(e,t,i,n,r,_*a+f))}function G$W(e,t,i,n,r,o,a,s,l,u){var c=(s-r.west)*(o-1)/(r.east-r.west),h=(l-r.south)*(a-1)/(r.north-r.south),d=0|c,f=d+1;f>=o&&(f=o-1,d=o-2);var p=0|h,_=p+1;_>=a&&(_=a-1,p=a-2);var m=h-p;return p=a-1-p,_=a-1-_,D$N(c-d,m,(t.decodeHeight(e,p*o+d)/u-i)/n,(t.decodeHeight(e,p*o+f)/u-i)/n,(t.decodeHeight(e,_*o+d)/u-i)/n,(t.decodeHeight(e,_*o+f)/u-i)/n)}function D$N(e,t,i,n,r,o){return t<e?i+e*(n-i)+t*(o-n):i+e*(o-r)+t*(r-i)}function A$T(e,t,i,n,r,o){o*=n;var a,s=0;if(r)for(a=0;a<t;++a)s=s*i+e[o+a];else for(a=t-1;a>=0;--a)s=s*i+e[o+a];return s}function re$A(e,t,i,n,r,o,a,s){var l;if(a*=r,o)for(l=0;l<t-1;++l)e[a+l]=s/n|0,s-=e[a+l]*n,n/=i;else for(l=t-1;l>0;--l)e[a+l]=s/n|0,s-=e[a+l]*n,n/=i;e[a+l]=s}function r$Q(){this.head=void 0,this.tail=void 0,this.count=0}function t$E(e,t){var i=t.previous,n=t.next;t===e.head?e.head=n:i.next=n,t===e.tail?e.tail=i:n.previous=i,t.previous=void 0,t.next=void 0,--e.count}function se$q(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).urls))throw new t$16("options.urls is required.");this._urls=e.urls;for(var t=0;t<this._urls.length;t++)this._urls[t].length>0&&"/"!==this._urls[t][this._urls[t].length-1]&&(this._urls[t]+="/");var i=e.urls[0].indexOf("wmts100");this._useConfigFile=u$_(e.useConfigFile,!0),this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer(),this._isCreateSkirt=e.isCreateSkirt,this._skirtScale=e.skirtScale,this._isSkirtDirty=!1,this._proxy=e.proxy,this._terrainDataStructure={heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1};var n=e.credit;"string"==typeof n&&(n=new r$T({text:n})),this._credit=n,this._tilingScheme=void 0,this._rectangles=[],this._levels=[],this._compressType="NONE",this._quadtree=void 0,this._packingRequest=e.packingRequest,this._combiInfo={},this._isBlock=!1,this._blockCache={},this._blockCacheQueue=new r$Q,this._blockCacheSize=100,this._blockScale=0;var r,o=this,a=u$_(e.ellipsoid,t$13.WGS84);this._hasNormalBuffer=!1,this._requestVertexNormals=u$_(e.requestVertexNormals,!1);var s=0;function l(e){if(1===parseFloat(e.getElementsByTagName("sml:Version")[0].textContent)){var t=e.getElementsByTagName("sml:StoreType",void 0);o._blockScale=t[0].getAttribute("BlockScale"),e$2b(o._blockScale)&&o._blockScale>0&&(o._isBlock=!0)}o._compressType=e.getElementsByTagName("sml:CompressType")[0].textContent,o._heightmapWidth=parseInt(e.getElementsByTagName("sml:CellWidth")[0].textContent),o._heightmapHeight=parseInt(e.getElementsByTagName("sml:CellHeight")[0].textContent),o._tilingScheme=new g$13({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,2*Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0));var i=e.getElementsByTagName("sml:Bounds")[0],n=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Left")[0].textContent)),r=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Bottom")[0].textContent)),u=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Right")[0].textContent)),h=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Top")[0].textContent));o._rectangles.push(new h$18(n,r,u,h));for(var d=e.getElementsByTagName("sml:Levels")[0].getElementsByTagName("sml:Level"),f=[],p=0;p<d.length;++p){var _=d[p];f.push(parseInt(_.textContent))}if(o._levels.push(f),o._ready=!0,o._readyPromise.resolve(!0),s<o._urls.length){var m=o._urls[s++],g=m.substring(0,m.length-1),x=m+"config";e$2b(a$O.CREDENTIAL)&&(x=e$2b(a$O.CREDENTIAL._keymap[g])?a$O.addTokenWithKey(g,x):a$O.addToken(x)),o$1l(d$1f(x),l,c)}}function u(t){var i=(new s$S).read(t).documentElement,n=s$S.queryFirstNode(i,"Contents",void 0),r=s$S.queryFirstNode(n,"Layer",void 0);o._tempLayerName=s$S.queryStringValue(r,"Title",void 0);var h=s$S.queryFirstNode(n,"TileMatrixSet",void 0);o._wmtstileMatrixSet=s$S.queryStringValue(h,"Identifier",void 0);var d=s$S.queryFirstNode(r,"BoundingBox",void 0),f=s$S.queryStringValue(d,"LowerCorner",void 0),p=s$S.queryStringValue(d,"UpperCorner",void 0),_=f.split(" "),m=p.split(" "),g=parseFloat(_[0]),x=parseFloat(m[0]),v=parseFloat(_[1]),y=parseFloat(m[1]);g&&x&&v&&y&&o._rectangles.push(new h$18(g,v,x,y));var $=s$S.queryFirstNode(n,"TileMatrixSet",void 0),b=(h=s$S.queryChildNodes($,"TileMatrix",void 0),s$S.queryNumericValue(h[0],"ScaleDenominator",void 0)),T=s$S.queryNumericValue(h[h.length-1],"ScaleDenominator",void 0),C=s$S.queryNumericValue(h[0],"Identifier",void 0);b=1/b,T=1/T;var S=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],w=S.indexOf(b),E=S.indexOf(T);for(let e=0;e<S.length;e++)b>S[e]&&S[e+1]&&b<S[e+1]&&(w=e-1),T>S[e]&&S[e+1]&&T<S[e+1]&&(E=e-1);w=Math.max(w,0),o.wmts_sub=u$_(w-C,0);for(var P=[],A=w;A<=E;A++)P.push(A);if(o._levels.push(P),e.blockscale>0&&(o._blockScale=1*e.blockscale,o._isBlock=!0),o._compressType="ZIP",o._heightmapWidth=e.cellWidth||32,o._heightmapHeight=e.cellHeight||32,o._tilingScheme=new g$13({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,2*Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0)),o._ready=!0,o._readyPromise.resolve(!0),s<o._urls.length){var L=o._urls[s++];if(-1!==L.indexOf("wmts100")){o$1l(u$R(R=L+"1.0.0/WMTSCapabilities.xml"),u,c)}else{var M=L.substring(0,L.length-1),R=L+"config";e$2b(a$O.CREDENTIAL)&&(R=e$2b(a$O.CREDENTIAL._keymap[M])?a$O.addTokenWithKey(M,R):a$O.addToken(R)),o$1l(d$1f(R),l,c)}}}function c(e){var t=u$_(e,"An error occurred while accessing "+o._url+".");r=l$W.handleError(r,o,o._errorEvent,t,void 0,void 0,void 0,h)}function h(){if(!e$2b(e.rectangles)||!e$2b(e.levels))throw new t$16("options.rectangles,options.levels is required.");o._compressType=u$_(e.compressType,"ZIP"),o._heightmapWidth=u$_(e.heightmapWidth,32),o._heightmapHeight=u$_(e.heightmapHeight,32),o._tilingScheme=new g$13({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0)),o._rectangles=e.rectangles,o._levels=e.levels,o._ready=!0,o._readyPromise.resolve(!0)}this._useConfigFile?function(){if(-1!==i){o$1l(u$R(n=(e=o._urls[s++])+"1.0.0/WMTSCapabilities.xml"),u,c)}else{var e,t=(e=o._urls[s++]).substring(0,e.length-1),n=e+"config";e$2b(a$O.CREDENTIAL)&&(n=e$2b(a$O.CREDENTIAL._keymap[t])?a$O.addTokenWithKey(t,n):a$O.addToken(n)),o$1l(d$1f(n),l,c)}}():h()}function qe$a(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function Me$j(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(t>r-1)throw new t$16("pack imagery index invalid");n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e,n,a);n+=a}}function Re$i(e,t,i,n){var r=Math.min(e._blockScale,n),o=Math.pow(2,r),a=t%o;return{x:Math.floor(t/o),y:Math.floor(i/o),col:a,row:i%o,level:n,blockSize:o}}function We$g(e,t){var i=new DataView(e),n=0;i.getUint32(n,!0),n+=4;var r=i.getUint32(n,!0);n+=4;for(var o=t.col,a=t.row*t.blockSize+o,s=0,l=0,u=0;u<r;u++){if(u<a)s+=i.getUint32(n,!0);else if(u===a){l=i.getUint32(n,!0),n+=4;break}n+=4}if(n=8+4*r,0!==l)return n+=s,new Uint8Array(e).slice(n,n+l).buffer}T$J.prototype.upsample=function(e,t,i,n,r,o,a){if(!e$2b(e))throw new t$16("tilingScheme is required.");if(!e$2b(t))throw new t$16("thisX is required.");if(!e$2b(i))throw new t$16("thisY is required.");if(!e$2b(n))throw new t$16("thisLevel is required.");if(!e$2b(r))throw new t$16("descendantX is required.");if(!e$2b(o))throw new t$16("descendantY is required.");if(!e$2b(a))throw new t$16("descendantLevel is required.");if(a-n>1)throw new t$16("Upsampling through more than one level at a time is not currently supported.");if(!this._valid){var s=16,l=16;return new T$J({buffer:new Uint8Array(s*l),width:s,height:l,skirtMode:this._skirtMode,skirtScale:this._skirtScale,childTileMask:0,structure:this._structure,createdByUpsampling:!0,valid:!1})}var u=this._mesh;if(e$2b(u)){s=this._width,l=this._height;e$2b(this._valid)&&!this._valid&&(s=Math.max(Math.floor(.5*this._width+1),y$L),l=Math.max(Math.floor(.5*this._height+1),y$L));for(var c=this._structure,h=c.stride,d=new this._bufferType(s*l*h),f=u.vertices,p=u.encoding,_=e.tileXYToRectangle(t,i,n),m=e.tileXYToRectangle(r,o,a),g=c.heightOffset,x=c.heightScale,v=u.exaggeration,y=c.elementsPerHeight,$=c.elementMultiplier,b=c.isBigEndian,T=Math.pow($,y-1),C=0;C<l;++C)for(var S=e$2a.lerp(m.north,m.south,C/(l-1)),w=0;w<s;++w){var E=G$W(f,p,g,x,_,s,l,e$2a.lerp(m.west,m.east,w/(s-1)),S,v);re$A(d,y,$,T,h,b,C*s+w,E=(E=E<c.lowestEncodedHeight?c.lowestEncodedHeight:E)>c.highestEncodedHeight?c.highestEncodedHeight:E)}if(!this._structure.isBigEndian){var P=!1;for(w=0;w<d.length;w++)if(Math.abs(d[w])>e$2a.EPSILON3){P=!0;break}P||(l=y$L,s=y$L,d=$$M)}return new T$J({buffer:d,width:s,height:l,skirtMode:this._skirtMode,skirtScale:this._skirtScale,childTileMask:0,structure:this._structure,createdByUpsampling:!0,valid:this._valid})}},T$J.prototype.isChildAvailable=function(e,t,i,n){if(!e$2b(e))throw new t$16("thisX is required.");if(!e$2b(t))throw new t$16("thisY is required.");if(!e$2b(i))throw new t$16("childX is required.");if(!e$2b(n))throw new t$16("childY is required.");var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},T$J.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling},r$Q.prototype.trim=function(e){for(var t=this.tail;this.count>e&&e$2b(t);){var i=t.previous;t.free(),t$E(this,t),t=i}},r$Q.prototype.touch=function(e){var t=this.head;if(t!==e){if(++this.count,!e$2b(t))return e.previous=void 0,e.next=void 0,this.head=e,void(this.tail=e);(e$2b(e.previous)||e$2b(e.next))&&t$E(this,e),e.previous=void 0,e.next=t,t.previous=e,this.head=e}},Object.defineProperties(se$q.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$16("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}},skirtScale:{get:function(){return this._skirtScale},set:function(e){e!==this._skirtScale&&(this._isSkirtDirty=!0),this._skirtScale=e}},hasNormalBuffer:{get:function(){return this._hasNormalBuffer}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}}}),se$q.prototype.division=function(e,t,i,n,r){for(var o=[],a=0;a<r;a++)for(var s=0;s<r;s++){var l=(i+n*(r-1-a)/(r-1))*(r-1),u=(t+n*s/(r-1))*(r-1),c=Math.floor(l),h=Math.ceil(l),d=Math.floor(u),f=Math.ceil(u),p=e[(r-1-c)*r+d],_=e[(r-1-c)*r+f],m=e[(r-1-h)*r+d],g=e[(r-1-h)*r+f],x=m*(l-c)+p*(h-l),v=g*(l-c)+_*(h-l);c===h&&(x=m,v=g);var y=v*(u-d)+x*(f-u);d===f&&(y=v),o[a*r+s]=y}return o};var ue$s=new h$18;function Qe$9(e,t,i,n,r){if(null!=e){for(var o=new Uint8Array(t*i*3),a=6378137,s=n.width,l=n.height,u=e,c=0;c<t;c++)for(var h=0;h<i;h++){var d=h*t+c;u[h*t+c];var f=c,p=h;r>13&&(c=(c=0==c?c+1:c)==t-1?t-2:c,h=(h=0==h?h+1:h)==i-1?i-2:h);var _=Math.max(c-1,0),m=h,g=u[m*t+_],x=u[(m=h)*t+(_=Math.min(c+1,t-1))];_=c;var v=u[(m=Math.min(h+1,i-1))*t+_];_=c;var y=u[(m=Math.max(h-1,0))*t+_];c=f,h=p;var $=n.south+l*(512-2*h-1)/512,b=new o$1p((g-x)/(a*Math.cos($)*s/t),(y-v)/(a*l/i),2);o$1p.normalize(b,b),o[3*d+0]=255*(.5*b.x+.5),o[3*d+1]=255*(.5*b.y+.5),o[3*d+2]=255*(.5*b.z+.5)}return o}}se$q.prototype.requestTileGeometry=function(e,t,i,n,r){if(!this.ready)throw new t$16("requestTileGeometry must not be called before ready returns true.");if(0===i){var o=new Array(this._heightmapWidth*this._heightmapHeight);return o.fill(0),this._hasNormalBuffer=!1,new T$J({buffer:o,width:this._heightmapWidth,height:this._heightmapHeight,skirtMode:this._isCreateSkirt,skirtScale:this._skirtScale,childTileMask:Ie$g(this,e,t,i),structure:this._terrainDataStructure,valid:!1})}var a=[],s=this._tilingScheme.tileXYToRectangle(e,t,i),l=this,u=!1,c=this._rectangles.length-1,h=this._levels[c][this._levels[c].length-1];c=0;var d=this._levels[c][this._levels[c].length-1];if(e$2b(r)||!(i>d)){var f=this,p=!1;(e$2b(f._packingRequest)&&f._packingRequest===X$N.QuadKey||f._isBlock)&&(p=!0);for(var _=0;_<this._rectangles.length;_++){var m=h$18.intersection(this._rectangles[_],s,ue$s);if(e$2b(r)&&!p){var g=r[this._urls[_]];if(e$2b(g)&&(1===g&&(u=!0),0===g||2===g))continue}if(0===a.length&&_===this._rectangles.length-1&&i>h)break;if(e$2b(m)){var x=this._levels[_][0],v=this._levels[_][this._levels[_].length-1],y=!1;if(i>=x&&i<=d&&(y=!0),y){var $=0,b=0,T=1,C=e,S=t,w=i;w>v&&(T=1/Math.pow(2,w-v));for(var E=T;w>v;)C%2==1&&($+=E),S%2==0&&(b+=E),E*=2,w--,C=Math.floor(.5*C),S=Math.floor(.5*S);var P={srcX:$,srcY:b,width:T,dataName:l._urls[_]},A=i+"_"+e+"_"+t;e$2b(l._combiInfo[A])?l._combiInfo[A].push(P):l._combiInfo[A]=[P],function(e){var t,i=l._urls[e];if(-1!==i.indexOf("wmts100")){var n=w-l.wmts_sub;t=i.substring(0,i.lastIndexOf("/"))+"?tilematrix="+n+"&layer="+l._tempLayerName+"&tilerow="+S+"&tilecol="+C+"&tilematrixset="+l._wmtstileMatrixSet+"&service=WMTS&request=GetTile"}else{var r=i.substring(0,i.length-1);t=l._urls[e]+"data/index/"+S+"/"+C+".bil?level="+w}var o=l._proxy;e$2b(o)&&(t=o.getURL(t));var s=new r$1b({throttle:!0,throttleByServer:!1,type:V$15.TERRAIN}),u=void 0;if(e$2b(f._packingRequest)&&f._packingRequest===X$N.QuadKey&&f._isBlock){s.type=V$15.BLOCKPACK;var c=Re$i(f,C,S,w);s.quadKey=qe$a(c.x,c.y,c.level),s.blockInfo=c,s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),e$2b(h=f.blockCache[s.quadKey+"_"+s.providerName])&&(f.blockCacheQueue.touch(h),u={buffer:h.data})}else if(e$2b(f._packingRequest)&&f._packingRequest===X$N.QuadKey)s.type=V$15.PACK,s.quadKey=qe$a(C,S,w),s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/"));else if(f._isBlock){s.type=V$15.BLOCK;var h;c=Re$i(f,C,S,w);s.quadKey=qe$a(c.x,c.y,c.level),s.blockInfo=c,s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),e$2b(h=f.blockCache[s.quadKey+"_"+s.providerName])&&(f.blockCacheQueue.touch(h),u={buffer:h.data})}if(!e$2b(u)){e$2b(a$O.CREDENTIAL)&&(t=e$2b(a$O.CREDENTIAL._keymap[r])?a$O.addTokenWithKey(r,t):a$O.addToken(t));var d=t$11.createIfNeeded(t),p=t;e$2b(s.blockInfo)&&(p=l._urls[e]+"data/index/"+c.y+"/"+c.x+".bil?level="+w),u=d.getDerivedResource({url:p,request:s}).fetchArrayBuffer()}e$2b(u)&&(u.id=e,u.url=t,u.subRequest=s),a.push(u)}(_)}if(u)break}}if(!(a.indexOf(void 0)>-1))return this._hasNormalBuffer=!0,o$1l.allSettled(a,(function(n){if(!(n.length<1)){for(var r=[],o=0;o<n.length;o++){var u=n[o];if(e$2b(u)){if(e$2b(u.buffer)&&(u=u.buffer),0!==i){if(f._isBlock&&e$2b(f._packingRequest)&&f._packingRequest===X$N.QuadKey)!e$2b(a[o].subRequest.quadKeyIndex)&&e$2b(a[o].subRequest.blockRequest)&&(a[o].subRequest.quadKeyIndex=a[o].subRequest.blockRequest.quadKeyIndex),e$2b(a[o].subRequest.quadKeyIndex)&&(u=Me$j(u,a[o].subRequest.quadKeyIndex),u=new Uint8Array(u).buffer),e$2b(c=f.blockCache[a[o].subRequest.quadKey])||(c=new e$1b(f,a[o].subRequest.quadKey,u),f.blockCache[a[o].subRequest.quadKey+"_"+a[o].subRequest.providerName]=c),f.blockCacheQueue.touch(c),f.blockCacheQueue.trim(f.blockCacheSize),u=We$g(u,a[o].subRequest.blockInfo);else if(e$2b(f._packingRequest)&&f._packingRequest===X$N.QuadKey)u=Me$j(u,a[o].subRequest.quadKeyIndex);else if(f._isBlock){var c;e$2b(c=f.blockCache[a[o].subRequest.quadKey])||(c=new e$1b(f,a[o].subRequest.quadKey,u),f.blockCache[a[o].subRequest.quadKey+"_"+a[o].subRequest.providerName]=c),f.blockCacheQueue.touch(c),f.blockCacheQueue.trim(f.blockCacheSize),u=We$g(u,a[o].subRequest.blockInfo)}if(!e$2b(u)){if(0===o&&n.length>1){var h=i+"_"+e+"_"+t;if(1!=(g=l._combiInfo[h])[o+1].width)return void delete l._combiInfo[h]}continue}}var d,p;if(2===(d="ZIP"===l._compressType?nt$9.inflate(u).buffer:u).byteLength/(l._heightmapWidth*l._heightmapHeight)){var _=new Int16Array(d,0,l._heightmapWidth*l._heightmapHeight);p=[];for(var m=0;m<_.length;m++)p.push(parseFloat(_[m]))}else p=new Float32Array(d,0,l._heightmapWidth*l._heightmapHeight);r.push(p)}else r.push(void 0)}h=i+"_"+e+"_"+t;var g=l._combiInfo[h];if(delete l._combiInfo[h],r.length>1)for(o=0;o<r.length;o++)if(e$2b(r[o])&&(0!=g[o].srcX||0!=g[o].srcY||1!=g[o].width)){_=l.division(r[o],g[o].srcX,g[o].srcY,g[o].width,l._heightmapWidth);r[o]=_}var x=[{},{},{},{}];for(o=0;o<r.length;o++)if(e$2b(r[o])){var v=g[o].dataName,y=-1,$=-1,b=-1,T=-1;y=0==r[o][0]?2:1,$=0==r[o][l._heightmapWidth-1]?2:1,b=0==r[o][(l._heightmapHeight-1)*l._heightmapWidth]?2:1,T=0==r[o][l._heightmapHeight*l._heightmapWidth-1]?2:1;for(var C=.5*l._heightmapWidth,S=.5*l._heightmapHeight,w=0;w<r[o].length;w++){var E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E<S&&P<C){var A=r[o][w];if(1===y){if(0==A){y=3;break}}else if(0!=A){y=3;break}}}x[0][v]=y;for(w=0;w<r[o].length;w++){E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E<S&&P>=C){A=r[o][w];if(1===$){if(0==A){$=3;break}}else if(0!=A){$=3;break}}}x[1][v]=$;for(w=0;w<r[o].length;w++){E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E>=S&&P<C){A=r[o][w];if(1===b){if(0==A){b=3;break}}else if(0!=A){b=3;break}}}x[2][v]=b;for(w=0;w<r[o].length;w++){E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E>=S&&P>=C){A=r[o][w];if(1===T){if(0==A){T=3;break}}else if(0!=A){T=3;break}}}if(x[3][v]=T,1===y&&1===$&&1===b&&1===T)break}var L=[];for(o=0;o<r.length;o++)e$2b(r[o])&&L.push(r[o]);if(0!==L.length){var M=L[0];if(L.length>1)for(w=0;w<M.length;w++)if(0==M[w])for(o=1;o<L.length;o++)if(0!=L[o][w]){M[w]=L[o][w];break}var R=!1;for(o=0;o<M.length;o++)if(Math.abs(M[o])>e$2a.EPSILON3){R=!0;break}var I=l._heightmapWidth,O=l._heightmapHeight,D=void 0;return l._requestVertexNormals&&(D=Qe$9(M,I,O,s,i)),new T$J({buffer:M,width:I,height:O,skirtMode:l._isCreateSkirt,skirtScale:l._skirtScale,childTileMask:Ie$g(l,e,t,i),structure:l._terrainDataStructure,valid:R,childTileMaskExt:x,normalTexture:D,level:i,x:e,y:t})}}}),(function(e){return o$1l.reject(e)}))}},se$q.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var ue$s=new h$18;function Ie$g(e,t,i,n){for(var r=e._tilingScheme,o=r.tileXYToRectangle(t,i,n),a=0,s=0;s<e._rectangles.length;s++){var l=e._rectangles[s];e$2b(h$18.intersection(l,o,ue$s))&&(ge$l(r,l,2*t,2*i,n+1)&&(a|=4),ge$l(r,l,2*t+1,2*i,n+1)&&(a|=8),ge$l(r,l,2*t,2*i+1,n+1)&&(a|=1),ge$l(r,l,2*t+1,2*i+1,n+1)&&(a|=2))}return a}function ge$l(e,t,i,n,r){var o=e.tileXYToRectangle(i,n,r);return e$2b(h$18.intersection(o,t,ue$s))}se$q.prototype.getTileDataAvailable=function(e,t,i){if(0===i)return!0;for(var n=this._tilingScheme.tileXYToRectangle(e,t,i),r=0;r<this._rectangles.length;r++){if(e$2b(h$18.intersection(this._rectangles[r],n,ue$s))&&i>=this._levels[r][0]&&i<=this._levels[r][this._levels[r].length-1])return!0}return!1},se$q.prototype.loadTileDataAvailability=function(e,t,i){};var ot$7="attribute vec4 aPosition;\nattribute vec2 textureCoordinates;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main() \n{\n gl_Position = aPosition;\n v_textureCoordinates = textureCoordinates;\n}\n",da$1="uniform sampler2D u_LineTexture;\nuniform float u_texelOffset;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 maxValues = vec4(0.0);\n float halfCoreSize = float(CORESIZE) / 2.0;\n for(int y = 0; y < CORESIZE; y++){\n for(int x = 0; x < CORESIZE; x++){\n float offsetX = (-halfCoreSize + float(x)) * u_texelOffset;\n float offsetY = (-halfCoreSize + float(y)) * u_texelOffset;\n vec2 realTexCoord = v_textureCoordinates + vec2(offsetX, offsetY);\n if(realTexCoord.x > 1.0 || realTexCoord.x < 0.0 || realTexCoord.y > 1.0 || realTexCoord.y < 0.0){\n continue;\n }\n vec4 color = texture2D(u_LineTexture, realTexCoord);\n maxValues = max(maxValues, color);\n }\n }\n if(maxValues.a < 0.01){\n discard;\n }\n gl_FragColor = maxValues;\n}",la$4="varying vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nvoid main()\n{\n vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\n vec4 color = FxaaPixelShader(\n v_textureCoordinates,\n colorTexture,\n fxaaQualityRcpFrame,\n fxaaQualitySubpix,\n fxaaQualityEdgeThreshold,\n fxaaQualityEdgeThresholdMin);\n float alpha = texture2D(colorTexture, v_textureCoordinates).a;\n gl_FragColor = vec4(color.rgb, alpha);\n}\n",k$I="/**\n * @license\n * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of NVIDIA CORPORATION nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// NVIDIA GameWorks Graphics Samples GitHub link: https://github.com/NVIDIAGameWorks/GraphicsSamples\n// Original FXAA 3.11 shader link: https://github.com/NVIDIAGameWorks/GraphicsSamples/blob/master/samples/es3-kepler/FXAA/FXAA3_11.h\n\n// Steps used to integrate into SuperMap3D:\n// * The following defines are set:\n// #define FXAA_PC 1\n// #define FXAA_WEBGL_1 1\n// #define FXAA_GREEN_AS_LUMA 1\n// #define FXAA_EARLY_EXIT 1\n// #define FXAA_GLSL_120 1\n// * All other preprocessor directives besides the FXAA_QUALITY__P* directives were removed.\n// * Double underscores are invalid for preprocessor directives so replace them with a single underscore. Replace\n// /FXAA_QUALITY__P(.*)/g with /FXAA_QUALITY__P$1/.\n// * There are no implicit conversions from ivec* to vec* so replace:\n// #define FxaaInt2 ivec2\n// with\n// #define FxaaInt2 vec2\n// * The texture2DLod function is only available in vertex shaders so replace:\n// #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)\n// #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)\n// with\n// #define FxaaTexTop(t, p) texture2D(t, p)\n// #define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r))\n// * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future.\n// * The following parameters to FxaaPixelShader are unused and can be removed:\n// fxaaConsolePosPos\n// fxaaConsoleRcpFrameOpt\n// fxaaConsoleRcpFrameOpt2\n// fxaaConsole360RcpFrameOpt2\n// fxaaConsoleEdgeSharpness\n// fxaaConsoleEdgeThreshold\n// fxaaConsoleEdgeThresholdMi\n// fxaaConsole360ConstDir\n\n//\n// Choose the quality preset.\n// This needs to be compiled into the shader as it effects code.\n// Best option to include multiple presets is to\n// in each shader define the preset, then include this file.\n//\n// OPTIONS\n// -----------------------------------------------------------------------\n// 10 to 15 - default medium dither (10=fastest, 15=highest quality)\n// 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)\n// 39 - no dither, very expensive\n//\n// NOTES\n// -----------------------------------------------------------------------\n// 12 = slightly faster then FXAA 3.9 and higher edge quality (default)\n// 13 = about same speed as FXAA 3.9 and better than 12\n// 23 = closest to FXAA 3.9 visually and performance wise\n// _ = the lowest digit is directly related to performance\n// _ = the highest digit is directly related to style\n//\n//#define FXAA_QUALITY_PRESET 12\n\n\n#if (FXAA_QUALITY_PRESET == 10)\n #define FXAA_QUALITY_PS 3\n #define FXAA_QUALITY_P0 1.5\n #define FXAA_QUALITY_P1 3.0\n #define FXAA_QUALITY_P2 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 11)\n #define FXAA_QUALITY_PS 4\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 3.0\n #define FXAA_QUALITY_P3 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 12)\n #define FXAA_QUALITY_PS 5\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 4.0\n #define FXAA_QUALITY_P4 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 13)\n #define FXAA_QUALITY_PS 6\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 4.0\n #define FXAA_QUALITY_P5 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 14)\n #define FXAA_QUALITY_PS 7\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 4.0\n #define FXAA_QUALITY_P6 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 15)\n #define FXAA_QUALITY_PS 8\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 4.0\n #define FXAA_QUALITY_P7 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 20)\n #define FXAA_QUALITY_PS 3\n #define FXAA_QUALITY_P0 1.5\n #define FXAA_QUALITY_P1 2.0\n #define FXAA_QUALITY_P2 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 21)\n #define FXAA_QUALITY_PS 4\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 22)\n #define FXAA_QUALITY_PS 5\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 23)\n #define FXAA_QUALITY_PS 6\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 24)\n #define FXAA_QUALITY_PS 7\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 3.0\n #define FXAA_QUALITY_P6 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 25)\n #define FXAA_QUALITY_PS 8\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 4.0\n #define FXAA_QUALITY_P7 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 26)\n #define FXAA_QUALITY_PS 9\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 4.0\n #define FXAA_QUALITY_P8 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 27)\n #define FXAA_QUALITY_PS 10\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 4.0\n #define FXAA_QUALITY_P9 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 28)\n #define FXAA_QUALITY_PS 11\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 4.0\n #define FXAA_QUALITY_P10 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 29)\n #define FXAA_QUALITY_PS 12\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 2.0\n #define FXAA_QUALITY_P10 4.0\n #define FXAA_QUALITY_P11 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 39)\n #define FXAA_QUALITY_PS 12\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.0\n #define FXAA_QUALITY_P2 1.0\n #define FXAA_QUALITY_P3 1.0\n #define FXAA_QUALITY_P4 1.0\n #define FXAA_QUALITY_P5 1.5\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 2.0\n #define FXAA_QUALITY_P10 4.0\n #define FXAA_QUALITY_P11 8.0\n#endif\n\n#define FxaaBool bool\n#define FxaaFloat float\n#define FxaaFloat2 vec2\n#define FxaaFloat3 vec3\n#define FxaaFloat4 vec4\n#define FxaaHalf float\n#define FxaaHalf2 vec2\n#define FxaaHalf3 vec3\n#define FxaaHalf4 vec4\n#define FxaaInt2 vec2\n#define FxaaTex sampler2D\n\n#define FxaaSat(x) clamp(x, 0.0, 1.0)\n#define FxaaTexTop(t, p) texture2D(t, p)\n#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r))\n\nFxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }\n\nFxaaFloat4 FxaaPixelShader(\n //\n // Use noperspective interpolation here (turn off perspective interpolation).\n // {xy} = center of pixel\n FxaaFloat2 pos,\n //\n // Input color texture.\n // {rgb_} = color in linear or perceptual color space\n // if (FXAA_GREEN_AS_LUMA == 0)\n // {___a} = luma in perceptual color space (not linear)\n FxaaTex tex,\n //\n // Only used on FXAA Quality.\n // This must be from a constant/uniform.\n // {x_} = 1.0/screenWidthInPixels\n // {_y} = 1.0/screenHeightInPixels\n FxaaFloat2 fxaaQualityRcpFrame,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_SUBPIX define.\n // It is here now to allow easier tuning.\n // Choose the amount of sub-pixel aliasing removal.\n // This can effect sharpness.\n // 1.00 - upper limit (softer)\n // 0.75 - default amount of filtering\n // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)\n // 0.25 - almost off\n // 0.00 - completely off\n FxaaFloat fxaaQualitySubpix,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.\n // It is here now to allow easier tuning.\n // The minimum amount of local contrast required to apply algorithm.\n // 0.333 - too little (faster)\n // 0.250 - low quality\n // 0.166 - default\n // 0.125 - high quality\n // 0.063 - overkill (slower)\n FxaaFloat fxaaQualityEdgeThreshold,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.\n // It is here now to allow easier tuning.\n // Trims the algorithm from processing darks.\n // 0.0833 - upper limit (default, the start of visible unfiltered edges)\n // 0.0625 - high quality (faster)\n // 0.0312 - visible limit (slower)\n // Special notes when using FXAA_GREEN_AS_LUMA,\n // Likely want to set this to zero.\n // As colors that are mostly not-green\n // will appear very dark in the green channel!\n // Tune by looking at mostly non-green content,\n // then start at zero and increase until aliasing is a problem.\n FxaaFloat fxaaQualityEdgeThresholdMin\n) {\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posM;\n posM.x = pos.x;\n posM.y = pos.y;\n FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);\n #define lumaM rgbyM.y\n FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));\n/*--------------------------------------------------------------------------*/\n FxaaFloat maxSM = max(lumaS, lumaM);\n FxaaFloat minSM = min(lumaS, lumaM);\n FxaaFloat maxESM = max(lumaE, maxSM);\n FxaaFloat minESM = min(lumaE, minSM);\n FxaaFloat maxWN = max(lumaN, lumaW);\n FxaaFloat minWN = min(lumaN, lumaW);\n FxaaFloat rangeMax = max(maxWN, maxESM);\n FxaaFloat rangeMin = min(minWN, minESM);\n FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\n FxaaFloat range = rangeMax - rangeMin;\n FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\n FxaaBool earlyExit = range < rangeMaxClamped;\n/*--------------------------------------------------------------------------*/\n if(earlyExit)\n return rgbyM;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNS = lumaN + lumaS;\n FxaaFloat lumaWE = lumaW + lumaE;\n FxaaFloat subpixRcpRange = 1.0/range;\n FxaaFloat subpixNSWE = lumaNS + lumaWE;\n FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\n FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNESE = lumaNE + lumaSE;\n FxaaFloat lumaNWNE = lumaNW + lumaNE;\n FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\n FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNWSW = lumaNW + lumaSW;\n FxaaFloat lumaSWSE = lumaSW + lumaSE;\n FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\n FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\n FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\n FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\n FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\n FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;\n/*--------------------------------------------------------------------------*/\n FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;\n FxaaFloat lengthSign = fxaaQualityRcpFrame.x;\n FxaaBool horzSpan = edgeHorz >= edgeVert;\n FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\n/*--------------------------------------------------------------------------*/\n if(!horzSpan) lumaN = lumaW;\n if(!horzSpan) lumaS = lumaE;\n if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;\n FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;\n/*--------------------------------------------------------------------------*/\n FxaaFloat gradientN = lumaN - lumaM;\n FxaaFloat gradientS = lumaS - lumaM;\n FxaaFloat lumaNN = lumaN + lumaM;\n FxaaFloat lumaSS = lumaS + lumaM;\n FxaaBool pairN = abs(gradientN) >= abs(gradientS);\n FxaaFloat gradient = max(abs(gradientN), abs(gradientS));\n if(pairN) lengthSign = -lengthSign;\n FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posB;\n posB.x = posM.x;\n posB.y = posM.y;\n FxaaFloat2 offNP;\n offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\n offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\n if(!horzSpan) posB.x += lengthSign * 0.5;\n if( horzSpan) posB.y += lengthSign * 0.5;\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posN;\n posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;\n posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;\n FxaaFloat2 posP;\n posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;\n posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;\n FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;\n FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));\n FxaaFloat subpixE = subpixC * subpixC;\n FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));\n/*--------------------------------------------------------------------------*/\n if(!pairN) lumaNN = lumaSS;\n FxaaFloat gradientScaled = gradient * 1.0/4.0;\n FxaaFloat lumaMM = lumaM - lumaNN * 0.5;\n FxaaFloat subpixF = subpixD * subpixE;\n FxaaBool lumaMLTZero = lumaMM < 0.0;\n/*--------------------------------------------------------------------------*/\n lumaEndN -= lumaNN * 0.5;\n lumaEndP -= lumaNN * 0.5;\n FxaaBool doneN = abs(lumaEndN) >= gradientScaled;\n FxaaBool doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;\n FxaaBool doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;\n/*--------------------------------------------------------------------------*/\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 3)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 4)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 5)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 6)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 7)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 8)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 9)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 10)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 11)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 12)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n/*--------------------------------------------------------------------------*/\n FxaaFloat dstN = posM.x - posN.x;\n FxaaFloat dstP = posP.x - posM.x;\n if(!horzSpan) dstN = posM.y - posN.y;\n if(!horzSpan) dstP = posP.y - posM.y;\n/*--------------------------------------------------------------------------*/\n FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\n FxaaFloat spanLength = (dstP + dstN);\n FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\n FxaaFloat spanLengthRcp = 1.0/spanLength;\n/*--------------------------------------------------------------------------*/\n FxaaBool directionN = dstN < dstP;\n FxaaFloat dst = min(dstN, dstP);\n FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;\n FxaaFloat subpixG = subpixF * subpixF;\n FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\n FxaaFloat subpixH = subpixG * fxaaQualitySubpix;\n/*--------------------------------------------------------------------------*/\n FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\n FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\n if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;\n if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;\n return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);\n}\n";function a$I(e,t){o$1q.typeOf.object("normal",e),o$1q.typeOf.number("distance",t),this._distance=t,this._normal=new s$F(e,this),this.onChangeCallback=void 0,this.index=-1}function s$F(e,t){this._clippingPlane=t,this._cartesian3=o$1p.clone(e)}function h$K(e){e=u$_(e,u$_.EMPTY_OBJECT),this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=u$_(e.enabled,!0),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this.edgeColor=e$1U.clone(u$_(e.edgeColor,e$1U.WHITE)),this.edgeWidth=u$_(e.edgeWidth,0),this.planeAdded=new o$1h,this.planeRemoved=new o$1h,this._owner=void 0;var t=u$_(e.unionClippingRegions,!1);this._unionClippingRegions=t,this._testIntersection=t?C$P:P$K,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;var i=e.planes;if(e$2b(i))for(var n=i.length,r=0;r<n;++r)this.add(i[r])}function C$P(e){return e===Ae$u.OUTSIDE}function P$K(e){return e===Ae$u.INSIDE}function F$O(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||-1!==e._dirtyIndex&&e._dirtyIndex!==t,e._dirtyIndex=t}function D$M(e,t){for(var i=e.length,n=0;n<i;++n)if(o$1m.equals(e[n],t))return n;return-1}Object.defineProperties(a$I.prototype,{distance:{get:function(){return this._distance},set:function(e){o$1q.typeOf.number("value",e),e$2b(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){o$1q.typeOf.object("value",e),e$2b(this.onChangeCallback)&&!o$1p.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),o$1p.clone(e,this._normal._cartesian3)}}}),a$I.fromPlane=function(e,t){return o$1q.typeOf.object("plane",e),e$2b(t)?(t.normal=e.normal,t.distance=e.distance):t=new a$I(e.normal,e.distance),t},a$I.clone=function(e,t){return e$2b(t)?(t.normal=e.normal,t.distance=e.distance,t):new a$I(e.normal,e.distance)},Object.defineProperties(s$F.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){o$1q.typeOf.number("value",e),e$2b(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){o$1q.typeOf.number("value",e),e$2b(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){o$1q.typeOf.number("value",e),e$2b(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}}),Object.defineProperties(h$K.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?C$P:P$K)}},enabled:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e)}},texture:{get:function(){return this._clippingPlanesTexture}},owner:{get:function(){return this._owner}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}}),h$K.prototype.add=function(e){var t=this._planes.length,i=this;e.onChangeCallback=function(e){F$O(i,e)},e.index=t,F$O(this,t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)},h$K.prototype.get=function(e){return o$1q.typeOf.number("index",e),this._planes[e]},h$K.prototype.contains=function(e){return-1!==D$M(this._planes,e)},h$K.prototype.remove=function(e){var t=this._planes,i=D$M(t,e);if(-1===i)return!1;e instanceof a$I&&(e.onChangeCallback=void 0,e.index=-1);for(var n=t.length-1,r=i;r<n;++r){var o=t[r+1];t[r]=o,o instanceof a$I&&(o.index=r)}return this._multipleDirtyPlanes=!0,t.length=n,this.planeRemoved.raiseEvent(e,i),!0},h$K.prototype.removeAll=function(){for(var e=this._planes,t=e.length,i=0;i<t;++i){var n=e[i];n instanceof a$I&&(n.onChangeCallback=void 0,n.index=-1),this.planeRemoved.raiseEvent(n,i)}this._multipleDirtyPlanes=!0,this._planes=[]};var j$M=new e$29,k$H=new e$29;function V$D(e,t,i){for(var n=e._uint8View,r=e._planes,o=0,a=t;a<i;++a){var s=r[a],l=t$10.octEncodeToCartesian4(s.normal,k$H);n[o]=l.x,n[o+1]=l.y,n[o+2]=l.z,n[o+3]=l.w;var u=e$29.packFloat(s.distance,j$M);n[o+4]=u.x,n[o+5]=u.y,n[o+6]=u.z,n[o+7]=u.w,o+=8}}function M$P(e,t,i){for(var n=e._float32View,r=e._planes,o=0,a=t;a<i;++a){var s=r[a],l=s.normal;n[o]=l.x,n[o+1]=l.y,n[o+2]=l.z,n[o+3]=s.distance,o+=4}}function b$Y(e,t){var i=e$1T.maximumTextureSize;return t.x=Math.min(e,i),t.y=Math.ceil(e/t.x),t}var H$O=new o$1o;h$K.prototype.update=function(e){var t=this._clippingPlanesTexture,i=e.context,n=h$K.useFloatTexture(i),r=n?this.length:2*this.length;if(e$2b(t)){var o=t.width*t.height;(o<r||r<.25*o)&&(t.destroy(),t=void 0,this._clippingPlanesTexture=void 0)}if(0!==this.length){if(!e$2b(t)){var a=b$Y(r,H$O);a.y*=2;var s=new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST});n?(t=new t$V({context:i,width:a.x,height:a.y,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT,sampler:s,flipY:!1}),this._float32View=new Float32Array(a.x*a.y*4)):(t=new t$V({context:i,width:a.x,height:a.y,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:s,flipY:!1}),this._uint8View=new Uint8Array(a.x*a.y*4)),this._clippingPlanesTexture=t,this._multipleDirtyPlanes=!0}var l=this._dirtyIndex;if(this._multipleDirtyPlanes||-1!==l){if(this._multipleDirtyPlanes)n?(M$P(this,0,this._planes.length),t.copyFrom({width:t.width,height:t.height,arrayBufferView:this._float32View})):(V$D(this,0,this._planes.length),t.copyFrom({width:t.width,height:t.height,arrayBufferView:this._uint8View}));else{var u=0,c=0;n?(c=Math.floor(l/t.width),u=Math.floor(l-c*t.width),M$P(this,l,l+1),t.copyFrom({width:1,height:1,arrayBufferView:this._float32View},u,c)):(c=Math.floor(2*l/t.width),u=Math.floor(2*l-c*t.width),V$D(this,l,l+1),t.copyFrom({width:2,height:1,arrayBufferView:this._uint8View},u,c))}this._multipleDirtyPlanes=!1,this._dirtyIndex=-1}}};var J$F=new p$1d,S$H=new o$1m(o$1p.UNIT_X,0);h$K.prototype.computeIntersectionWithBoundingVolume=function(e,t){var i=this._planes,n=i.length,r=this.modelMatrix;e$2b(t)&&(r=p$1d.multiply(t,r,J$F));var o=Ae$u.INSIDE;!this.unionClippingRegions&&n>0&&(o=Ae$u.OUTSIDE);for(var a=0;a<n;++a){var s=i[a];o$1m.transform(s,r,S$H);var l=e.intersectPlane(S$H);if(l===Ae$u.INTERSECTING)o=l;else if(this._testIntersection(l))return l}return o},h$K.setOwner=function(e,t,i){if(e!==t[i]&&(t[i]=t[i]&&t[i].destroy(),e$2b(e))){if(e$2b(e._owner))throw new t$16("ClippingPlaneCollection should only be assigned to one object");e._owner=t,t[i]=e}},h$K.useFloatTexture=function(e){return e.floatingPointTexture},h$K.getTextureResolution=function(e,t,i){var n=e.texture;if(e$2b(n))return i.x=n.width,i.y=n.height,i;var r=b$Y(h$K.useFloatTexture(t)?e.length:2*e.length,i);return r.y*=2,r},h$K.prototype.isDestroyed=function(){return!1},h$K.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),i$10(this)};var e$13={START:0,LOADING:1,DONE:2,FAILED:3},re$z=Object.freeze(e$13),I$X={FAILED:0,UNLOADED:1,RECEIVING:2,UNZIP:3,UNZIPING:4,RECEIVED:5,TRANSFORMING:6,TRANSFORMED:7,READY:8,INVALID:9},Le$m=Object.freeze(I$X),Q$K=new i$1c,X$J=new i$1c,Z$I=new o$1p,$$L=new h$18;function Y$B(e,t){var i=e._ellipsoid,n=t.height,r=t.width,o=t.northCap,a=t.southCap,s=n,l=2,u=0,c=4;o&&(l-=1,s-=1,u+=1,c-=2),a&&(l-=1,s-=1,u+=1,c-=2),u+=l*r+2*s-c;var h,d=new Float64Array(3*u),f=0,p=0,_=Z$I;if(o)j$O.computePosition(t,i,!1,p,0,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;else for(h=0;h<r;h++)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(h=r-1,p=1;p<n;p++)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;if(p=n-1,!a)for(h=r-2;h>=0;h--)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(h=0,p=n-2;p>0;p--)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(var m=d.length/3*2,g=ce$x.createTypedArray(d.length/3,m),x=0,v=0;v<d.length/3-1;v++)g[x++]=v,g[x++]=v+1;g[x++]=d.length/3-1,g[x++]=0;var y=new I$1p({attributes:new a$_,primitiveType:W$18.LINES});return y.attributes.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:d}),y.indices=g,y}function G$V(e,t){var i=e._surfaceHeight,n=e._extrudedHeight,r=e._ellipsoid,o=n,a=i,s=Y$B(e,t),l=t.height,u=t.width,c=A$1g.scaleToGeodeticHeight(s.attributes.position.values,a,r,!1),h=c.length,d=new Float64Array(2*h);d.set(c);var f=A$1g.scaleToGeodeticHeight(s.attributes.position.values,o,r);d.set(f,h),s.attributes.position.values=d;var p=t.northCap,_=t.southCap,m=4;p&&(m-=1),_&&(m-=1);var g,x=2*(d.length/3+m),v=ce$x.createTypedArray(d.length/3,x);h=d.length/6;for(var y=0,$=0;$<h-1;$++)v[y++]=$,v[y++]=$+1,v[y++]=$+h,v[y++]=$+h+1;if(v[y++]=h-1,v[y++]=0,v[y++]=h+h-1,v[y++]=h,v[y++]=0,v[y++]=h,p)g=l-1;else{var b=u-1;v[y++]=b,v[y++]=b+h,g=u+l-2}if(v[y++]=g,v[y++]=g+h,!_){var T=u+g-1;v[y++]=T,v[y]=T+h}return s.indices=v,s}function k$G(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).rectangle,i=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),n=u$_(e.ellipsoid,t$13.WGS84),r=u$_(e.rotation,0);if(!e$2b(t))throw new t$16("rectangle is required.");if(h$18.validate(t),t.north<t.south)throw new t$16("options.rectangle.north must be greater than options.rectangle.south");var o=u$_(e.height,0),a=u$_(e.extrudedHeight,o);this._rectangle=h$18.clone(t),this._granularity=i,this._ellipsoid=n,this._surfaceHeight=Math.max(o,a),this._rotation=r,this._extrudedHeight=Math.min(o,a),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}k$G.packedLength=h$18.packedLength+t$13.packedLength+5,k$G.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),h$18.pack(e._rectangle,t,i),i+=h$18.packedLength,t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._extrudedHeight,t[i]=u$_(e._offsetAttribute,-1),t};var V$C=new h$18,J$E=t$13.clone(t$13.UNIT_SPHERE),D$L={rectangle:V$C,ellipsoid:J$E,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};k$G.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n=h$18.unpack(e,t,V$C);t+=h$18.packedLength;var r=t$13.unpack(e,t,J$E);t+=t$13.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t];return e$2b(i)?(i._rectangle=h$18.clone(n,i._rectangle),i._ellipsoid=t$13.clone(r,i._ellipsoid),i._surfaceHeight=a,i._rotation=s,i._extrudedHeight=l,i._offsetAttribute=-1===u?void 0:u,i):(D$L.granularity=o,D$L.height=a,D$L.rotation=s,D$L.extrudedHeight=l,D$L.offsetAttribute=-1===u?void 0:u,new k$G(D$L))};var I$W=new a$18;function y$K(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.rectangle",e.rectangle),this.rectangle=h$18.clone(e.rectangle),this.minimumHeight=u$_(e.minimumHeight,0),this.maximumHeight=u$_(e.maximumHeight,0),this.southwestCornerCartesian=new o$1p,this.northeastCornerCartesian=new o$1p,this.westNormal=new o$1p,this.southNormal=new o$1p,this.eastNormal=new o$1p,this.northNormal=new o$1p;var t=u$_(e.ellipsoid,t$13.WGS84);tt$b(this,e.rectangle,t),u$_(e.computeBoundingVolumes,!0)&&(this._orientedBoundingBox=y$Z.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,t),this._boundingSphere=i$1c.fromOrientedBoundingBox(this._orientedBoundingBox))}k$G.createGeometry=function(e){var t,i,n=e._rectangle,r=e._ellipsoid,o=j$O.computeOptions(n,e._granularity,e._rotation,0,$$L,I$W);if(!e$2a.equalsEpsilon(n.north,n.south,e$2a.EPSILON10)&&!e$2a.equalsEpsilon(n.east,n.west,e$2a.EPSILON10)){var a=e._surfaceHeight,s=e._extrudedHeight;if(!e$2a.equalsEpsilon(a,s,0,e$2a.EPSILON2)){if(t=G$V(e,o),e$2b(e._offsetAttribute)){var l=t.attributes.position.values.length/3,u=new Uint8Array(l);e._offsetAttribute===_0x58701d.TOP?u=d$1s(u,1,0,l/2):u=d$1s(u,e._offsetAttribute===_0x58701d.NONE?0:1),t.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}var c=i$1c.fromRectangle3D(n,r,a,X$J),h=i$1c.fromRectangle3D(n,r,s,Q$K);i=i$1c.union(c,h)}else{if((t=Y$B(e,o)).attributes.position.values=A$1g.scaleToGeodeticHeight(t.attributes.position.values,a,r,!1),e$2b(e._offsetAttribute)){var d=t.attributes.position.values.length,f=new Uint8Array(d/3);d$1s(f,e._offsetAttribute===_0x58701d.NONE?0:1),t.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}i=i$1c.fromRectangle3D(n,r,a)}return new I$1p({attributes:t.attributes,indices:t.indices,primitiveType:W$18.LINES,boundingSphere:i,offsetAttribute:e._offsetAttribute})}},Object.defineProperties(y$K.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});var z$I=new o$1p,M$O=new o$1p,E$N=new o$1p,$$K=new o$1p,F$N=new o$1p,B$J=new o$1p,o$O=new a$18,G$U=new o$1m(o$1p.UNIT_X,0),f$N=new f$17;function tt$b(e,t,i){i.cartographicToCartesian(h$18.southwest(t),e.southwestCornerCartesian),i.cartographicToCartesian(h$18.northeast(t),e.northeastCornerCartesian),o$O.longitude=t.west,o$O.latitude=.5*(t.south+t.north),o$O.height=0;var n=i.cartographicToCartesian(o$O,F$N),r=o$1p.cross(n,o$1p.UNIT_Z,z$I);o$1p.normalize(r,e.westNormal),o$O.longitude=t.east;var o=i.cartographicToCartesian(o$O,B$J),a=o$1p.cross(o$1p.UNIT_Z,o,z$I);o$1p.normalize(a,e.eastNormal);var s,l=o$1p.subtract(n,o,z$I),u=o$1p.normalize(l,$$K),c=t.south;if(c>0){o$O.longitude=.5*(t.west+t.east),o$O.latitude=c;var h=i.cartographicToCartesian(o$O,f$N.origin);o$1p.clone(u,f$N.direction);var d=o$1m.fromPointNormal(e.southwestCornerCartesian,e.westNormal,G$U);g$1h.rayPlane(f$N,d,e.southwestCornerCartesian),s=i.geodeticSurfaceNormal(h,M$O)}else s=i.geodeticSurfaceNormalCartographic(h$18.southeast(t),M$O);var f=o$1p.cross(s,l,E$N);o$1p.normalize(f,e.southNormal);var p,_=t.north;if(_<0){o$O.longitude=.5*(t.west+t.east),o$O.latitude=_;var m=i.cartographicToCartesian(o$O,f$N.origin);o$1p.negate(u,f$N.direction);var g=o$1m.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,G$U);g$1h.rayPlane(f$N,g,e.northeastCornerCartesian),p=i.geodeticSurfaceNormal(m,M$O)}else p=i.geodeticSurfaceNormalCartographic(h$18.northwest(t),M$O);var x=o$1p.cross(l,p,E$N);o$1p.normalize(x,e.northNormal)}var rt$c=new o$1p,et$b=new o$1p,it$6=new o$1p(0,-1,0),at$9=new o$1p(0,0,-1),Z$H=new o$1p;y$K.prototype.distanceToCamera=function(e){o$1q.defined("frameState",e);var t=e.camera,i=new o$1p,n=new a$18;if(e$2b(t._sensitivePosition)&&t._sensitivePositionRatio>0){var r=a$18.fromCartesian(t._sensitivePosition);n.latitude=r.latitude*t._sensitivePositionRatio+t.positionCartographic.latitude*(1-t._sensitivePositionRatio),n.longitude=r.longitude*t._sensitivePositionRatio+t.positionCartographic.longitude*(1-t._sensitivePositionRatio),n.height=t.positionCartographic.height,i=a$18.toCartesian(n)}else i=t.positionWC,n=t.positionCartographic;var o,a,s,l=0;if(!h$18.contains(this.rectangle,n)){var u=this.southwestCornerCartesian,c=this.northeastCornerCartesian,h=this.westNormal,d=this.southNormal,f=this.eastNormal,p=this.northNormal;e.mode!==C$13.SCENE3D&&((u=e.mapProjection.project(h$18.southwest(this.rectangle),rt$c)).z=u.y,u.y=u.x,u.x=0,(c=e.mapProjection.project(h$18.northeast(this.rectangle),et$b)).z=c.y,c.y=c.x,c.x=0,h=it$6,f=o$1p.UNIT_Y,d=at$9,p=o$1p.UNIT_Z);var _=o$1p.subtract(i,u,Z$H),m=o$1p.dot(_,h),g=o$1p.dot(_,d),x=o$1p.subtract(i,c,Z$H),v=o$1p.dot(x,f),y=o$1p.dot(x,p);m>0?l+=m*m:v>0&&(l+=v*v),g>0?l+=g*g:y>0&&(l+=y*y)}e.mode===C$13.SCENE3D?(o=n.height,a=this.minimumHeight,s=this.maximumHeight):(o=i.x,a=this.minimumHeight,s=this.maximumHeight);var $=0;if(o>s){var b=o-s;$=b*b}else if(o<a){var T=a-o;$=T*T}return l>t._sensitiveRegionRatio*$?l+=$:l=$,Math.sqrt(l)},y$K.prototype.intersectPlane=function(e){return o$1q.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)},y$K.prototype.createDebugVolume=function(e){o$1q.defined("color",e);var t=new p$1d.clone(p$1d.IDENTITY);return new y$S({geometryInstances:new d$1o({geometry:new k$G({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),id:"outline",modelMatrix:t,attributes:{color:o$16.fromColor(e)}}),appearance:new t$R({translucent:!1,flat:!0}),asynchronous:!1})};var d$10={};function p$O(e){if(!e$2b(e)||!e$2b(e.quantizedVertices))throw new t$16("options.quantizedVertices is required.");if(!e$2b(e.indices))throw new t$16("options.indices is required.");if(!e$2b(e.minimumHeight))throw new t$16("options.minimumHeight is required.");if(!e$2b(e.maximumHeight))throw new t$16("options.maximumHeight is required.");if(!e$2b(e.boundingSphere))throw new t$16("options.boundingSphere is required.");if(!e$2b(e.horizonOcclusionPoint))throw new t$16("options.horizonOcclusionPoint is required.");if(!e$2b(e.westIndices))throw new t$16("options.westIndices is required.");if(!e$2b(e.southIndices))throw new t$16("options.southIndices is required.");if(!e$2b(e.eastIndices))throw new t$16("options.eastIndices is required.");if(!e$2b(e.northIndices))throw new t$16("options.northIndices is required.");if(!e$2b(e.westSkirtHeight))throw new t$16("options.westSkirtHeight is required.");if(!e$2b(e.southSkirtHeight))throw new t$16("options.southSkirtHeight is required.");if(!e$2b(e.eastSkirtHeight))throw new t$16("options.eastSkirtHeight is required.");if(!e$2b(e.northSkirtHeight))throw new t$16("options.northSkirtHeight is required.");this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;var t=this._quantizedVertices.length/3,i=this._uValues=this._quantizedVertices.subarray(0,t),n=this._vValues=this._quantizedVertices.subarray(t,2*t);function r(e,t){return n[e]-n[t]}function o(e,t){return i[e]-i[t]}this._heightValues=this._quantizedVertices.subarray(2*t,3*t),this._westIndices=y$J(e.westIndices,r,t),this._southIndices=y$J(e.southIndices,o,t),this._eastIndices=y$J(e.eastIndices,r,t),this._northIndices=y$J(e.northIndices,o,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=u$_(e.childTileMask,15),this._createdByUpsampling=u$_(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0,this._normalTexture=e.normalTexture,this.invalid=u$_(e.invalid,!1),0===this._maximumHeight&&(this.invalid=!0),this.rasterIndex=e.rasterIndex,this.rasterVertex=e.rasterVertex,this.modelMatrix=e.modelMatrix,this.hasInvalid=e.hasInvalid,this._validMinimumHeight=e.validMinimumHeight,this._validMaximumHeight=e.validMaximumHeight,this._validOrientedBoundingBox=e.validOrientedBoundingBox}d$10.clipTriangleAtAxisAlignedThreshold=function(e,t,i,n,r,o){if(!e$2b(e))throw new t$16("threshold is required.");if(!e$2b(t))throw new t$16("keepAbove is required.");if(!e$2b(i))throw new t$16("u0 is required.");if(!e$2b(n))throw new t$16("u1 is required.");if(!e$2b(r))throw new t$16("u2 is required.");var a,s,l;e$2b(o)?o.length=0:o=[],t?(a=i<e,s=n<e,l=r<e):(a=i>e,s=n>e,l=r>e);var u,c,h,d,f,p,_=a+s+l;return 1===_?a?(u=(e-i)/(n-i),c=(e-i)/(r-i),o.push(1),o.push(2),1!==c&&(o.push(-1),o.push(0),o.push(2),o.push(c)),1!==u&&(o.push(-1),o.push(0),o.push(1),o.push(u))):s?(h=(e-n)/(r-n),d=(e-n)/(i-n),o.push(2),o.push(0),1!==d&&(o.push(-1),o.push(1),o.push(0),o.push(d)),1!==h&&(o.push(-1),o.push(1),o.push(2),o.push(h))):l&&(f=(e-r)/(i-r),p=(e-r)/(n-r),o.push(0),o.push(1),1!==p&&(o.push(-1),o.push(2),o.push(1),o.push(p)),1!==f&&(o.push(-1),o.push(2),o.push(0),o.push(f))):2===_?a||i===e?s||n===e?!l&&r!==e&&(c=(e-i)/(r-i),h=(e-n)/(r-n),o.push(2),o.push(-1),o.push(0),o.push(2),o.push(c),o.push(-1),o.push(1),o.push(2),o.push(h)):(p=(e-r)/(n-r),u=(e-i)/(n-i),o.push(1),o.push(-1),o.push(2),o.push(1),o.push(p),o.push(-1),o.push(0),o.push(1),o.push(u)):(d=(e-n)/(i-n),f=(e-r)/(i-r),o.push(0),o.push(-1),o.push(1),o.push(0),o.push(d),o.push(-1),o.push(2),o.push(0),o.push(f)):3!==_&&(o.push(0),o.push(1),o.push(2)),o},d$10.computeBarycentricCoordinates=function(e,t,i,n,r,o,a,s,l){if(!e$2b(e))throw new t$16("x is required.");if(!e$2b(t))throw new t$16("y is required.");if(!e$2b(i))throw new t$16("x1 is required.");if(!e$2b(n))throw new t$16("y1 is required.");if(!e$2b(r))throw new t$16("x2 is required.");if(!e$2b(o))throw new t$16("y2 is required.");if(!e$2b(a))throw new t$16("x3 is required.");if(!e$2b(s))throw new t$16("y3 is required.");var u=i-a,c=a-r,h=o-s,d=n-s,f=1/(h*u+c*d),p=t-s,_=e-a,m=(h*_+c*p)*f,g=(-d*_+u*p)*f,x=1-m-g;return e$2b(l)?(l.x=m,l.y=g,l.z=x,l):new o$1p(m,g,x)},d$10.computeLineSegmentLineSegmentIntersection=function(e,t,i,n,r,o,a,s,l){o$1q.typeOf.number("x00",e),o$1q.typeOf.number("y00",t),o$1q.typeOf.number("x01",i),o$1q.typeOf.number("y01",n),o$1q.typeOf.number("x10",r),o$1q.typeOf.number("y10",o),o$1q.typeOf.number("x11",a),o$1q.typeOf.number("y11",s);var u=(s-o)*(i-e)-(a-r)*(n-t);if(0!==u){var c=((a-r)*(t-o)-(s-o)*(e-r))/u,h=((i-e)*(t-o)-(n-t)*(e-r))/u;if(c>=0&&c<=1&&h>=0&&h<=1)return e$2b(l)||(l=new o$1o),l.x=e+c*(i-e),l.y=t+c*(n-t),l}},Object.defineProperties(p$O.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return e$2b(this._mesh)}},normalTexture:{get:function(){return this._normalTexture}}});var B$I=[];function y$J(e,t,i){B$I.length=e.length;for(var n=!1,r=0,o=e.length;r<o;++r)B$I[r]=e[r],n=n||r>0&&t(e[r-1],e[r])>0;return n?(B$I.sort(t),ce$x.createTypedArray(i,B$I)):e}var F$M=new i$V("createVerticesFromQuantizedTerrainMesh");p$O.prototype.createMesh=function(e,t,i,n,r){if(!e$2b(e))throw new t$16("tilingScheme is required.");if(!e$2b(t))throw new t$16("x is required.");if(!e$2b(i))throw new t$16("y is required.");if(!e$2b(n))throw new t$16("level is required.");var o=e.ellipsoid,a=e.tileXYToRectangle(t,i,n);r=u$_(r,1);var s=F$M.scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,validMinimumHeight:this._validMinimumHeight,validMaximumHeight:this._validMaximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:a,relativeToCenter:this._boundingSphere.center,ellipsoid:o,exaggeration:r,level:n});if(e$2b(s)){var l=this;return o$1l(s,(function(e){var t=l._quantizedVertices.length/3,i=t+l._westIndices.length+l._southIndices.length+l._eastIndices.length+l._northIndices.length,n=ce$x.createTypedArray(i,e.indices),o=new Float32Array(e.vertices),a=e.center,s=e.minimumHeight,u=e.maximumHeight,c=u$_(i$1c.clone(e.boundingSphere),l._boundingSphere),h=u$_(y$Z.clone(e.orientedBoundingBox),l._orientedBoundingBox),d=u$_(y$Z.clone(e.validOrientedBoundingBox),l._validOrientedBoundingBox),f=u$_(o$1p.clone(e.occludeePointInScaledSpace),l._horizonOcclusionPoint),p=e.vertexStride,_=h$L.clone(e.encoding),m=0===n.length||0===u||l.invalid;return l._mesh=new T$K(a,o,n,e.indexCountWithoutSkirts,t,s,u,c,f,p,h,_,r,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast,m,d),l._quantizedVertices=void 0,l._encodedNormals=void 0,l._indices=void 0,l._uValues=void 0,l._vValues=void 0,l._heightValues=void 0,l._westIndices=void 0,l._southIndices=void 0,l._eastIndices=void 0,l._northIndices=void 0,l._mesh}))}};var X$I=new i$V("upsampleQuantizedTerrainMesh");p$O.prototype.upsample=function(e,t,i,n,r,o,a){if(!e$2b(e))throw new t$16("tilingScheme is required.");if(!e$2b(t))throw new t$16("thisX is required.");if(!e$2b(i))throw new t$16("thisY is required.");if(!e$2b(n))throw new t$16("thisLevel is required.");if(!e$2b(r))throw new t$16("descendantX is required.");if(!e$2b(o))throw new t$16("descendantY is required.");if(!e$2b(a))throw new t$16("descendantLevel is required.");if(a-n>1)throw new t$16("Upsampling through more than one level at a time is not currently supported.");var s=this._mesh;if(e$2b(this._mesh)){var l=2*t!==r,u=2*i===o,c=e.ellipsoid,h=e.tileXYToRectangle(r,o,a),d=X$I.scheduleTask({vertices:s.vertices,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,validMinimumHeight:this._validMinimumHeight,validMaximumHeight:this._validMaximumHeight,isEastChild:l,isNorthChild:u,childRectangle:h,ellipsoid:c,exaggeration:s.exaggeration});if(e$2b(d)){var f=Math.min(this._westSkirtHeight,this._eastSkirtHeight);f=Math.min(f,this._southSkirtHeight),f=Math.min(f,this._northSkirtHeight);var p=l?.5*f:this._westSkirtHeight,_=u?.5*f:this._southSkirtHeight,m=l?this._eastSkirtHeight:.5*f,g=u?this._northSkirtHeight:.5*f,x=this._credits;return o$1l(d).then((function(e){var t,i=new Uint16Array(e.vertices),n=ce$x.createTypedArray(i.length/3,e.indices);if(e$2b(e.encodedNormals)&&(t=new Uint8Array(e.encodedNormals)),e$2b(e.horizonOcclusionPoint))return new p$O({quantizedVertices:i,indices:n,encodedNormals:t,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:i$1c.clone(e.boundingSphere),orientedBoundingBox:y$Z.clone(e.orientedBoundingBox),horizonOcclusionPoint:o$1p.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:p,southSkirtHeight:_,eastSkirtHeight:m,northSkirtHeight:g,childTileMask:0,credits:x,createdByUpsampling:!0,validMaximumHeight:e.validMaximumHeight,validMinimumHeight:e.validMinimumHeight,validOrientedBoundingBox:e.validOrientedBoundingBox})}))}}};var N$E=32767,E$M=new o$1p;function R$H(e,t,i,n,r,o,a,s){var l=Math.min(i,r,a),u=Math.max(i,r,a),c=Math.min(n,o,s),h=Math.max(n,o,s);return e>=l&&e<=u&&t>=c&&t<=h}p$O.prototype.interpolateHeight=function(e,t,i){var n=e$2a.clamp((t-e.west)/e.width,0,1),r=n*N$E,o=e$2a.clamp((i-e.south)/e.height,0,1),a=o*N$E;return e$2b(this._mesh)?J$D(this,n,o):K$H(this,r,a)};var Y$A=new o$1o,D$K=new o$1o,G$T=new o$1o;function J$D(e,t,i){for(var n=e._mesh,r=n.vertices,o=n.encoding,a=n.indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=o.decodeTextureCoordinates(r,u,Y$A),f=o.decodeTextureCoordinates(r,c,D$K),p=o.decodeTextureCoordinates(r,h,G$T);if(R$H(t,i,d.x,d.y,f.x,f.y,p.x,p.y)){var _=d$10.computeBarycentricCoordinates(t,i,d.x,d.y,f.x,f.y,p.x,p.y,E$M);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){var m=o.decodeHeight(r,u),g=o.decodeHeight(r,c),x=o.decodeHeight(r,h);return _.x*m+_.y*g+_.z*x}}}}function K$H(e,t,i){for(var n=e._uValues,r=e._vValues,o=e._heightValues,a=e._indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=n[u],f=n[c],p=n[h],_=r[u],m=r[c],g=r[h];if(R$H(t,i,d,_,f,m,p,g)){var x=d$10.computeBarycentricCoordinates(t,i,d,_,f,m,p,g,E$M);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){var v=x.x*o[u]+x.y*o[c]+x.z*o[h];return e$2a.lerp(e._minimumHeight,e._maximumHeight,v/N$E)}}}}p$O.prototype.isChildAvailable=function(e,t,i,n){if(!e$2b(e))throw new t$16("thisX is required.");if(!e$2b(t))throw new t$16("thisY is required.");if(!e$2b(i))throw new t$16("childX is required.");if(!e$2b(n))throw new t$16("childY is required.");var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},p$O.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var D$J={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=D$J.RENDERED_AND_KICKED},originalResult:function(e){return 3&e},kick:function(e){return 4|e}},w$J=32767,P$J=w$J/2|0,ie$w=new o$1p,ot$6=new o$1p,ht$5=new o$1p,h$J=new a$18,qe$9=new o$1o,dt$7=[],Ge$b=[],ut$7=[],ft$5=[],ct$5=[],vt$7=[],gt$5=[],lt$2=new o$1p,mt$3=new i$1c,pt$6=new y$Z,It$6=new o$1o;function Ne$g(){}function wt$5(e){var t,i=e.length,n=0;for(t=0;t<i;t++){n+=(s=e[t]).indices.length}var r=new Uint16Array(n),o=0,a=0;for(t=0;t<i;t++){for(var s,l=(s=e[t]).indices.length,u=0;u<l;u++)r[o+u]=s.indices[u]+a;o+=l,a+=s.attributes.position.values.length/3}return r}function Be$g(e,t){var i;return"function"==typeof e.slice&&("function"!=typeof(i=e.slice()).sort&&(i=void 0)),e$2b(i)||(i=Array.prototype.slice.call(e)),i.sort(t),i}function Ae$k(e,t,i,n,r,o,a,s,l,u,c){var h=s.north,d=s.south,f=s.east,p=s.west;f<p&&(f+=e$2a.TWO_PI);for(var _=i.length,m=0;m<_;++m){var g=i[m],x=r[g],v=o[g];h$J.longitude=e$2a.lerp(p,f,v.x)+u,h$J.latitude=e$2a.lerp(d,h,v.y)+c,h$J.height=x-l;var y=a.cartographicToCartesian(h$J,ie$w);t=n.encode(e,t,y,v,h$J.height,qe$9,0)}}function x$R(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}x$R.prototype.clone=function(e){return e$2b(e)||(e=new x$R),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},x$R.prototype.initializeIndexed=function(e,t,i,n){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=i,this.index=n,this.first=void 0,this.second=void 0,this.ratio=void 0},x$R.prototype.initializeFromClipResult=function(e,t,i){var n=t+1;return-1!==e[t]?i[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=i[e[n]],++n,this.second=i[e[n]],++n,this.ratio=e[n],++n),n},x$R.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},x$R.prototype.isIndexed=function(){return e$2b(this.index)},x$R.prototype.getH=function(){return e$2b(this.index)?this.heightBuffer[this.index]:e$2a.lerp(this.first.getH(),this.second.getH(),this.ratio)},x$R.prototype.getU=function(){return e$2b(this.index)?this.uBuffer[this.index]:e$2a.lerp(this.first.getU(),this.second.getU(),this.ratio)},x$R.prototype.getV=function(){return e$2b(this.index)?this.vBuffer[this.index]:e$2a.lerp(this.first.getV(),this.second.getV(),this.ratio)};var N$D=[];function We$f(e,t,i,n,r,o,a){if(0!==o.length){for(var s=0,l=0;l<o.length;)l=N$D[s++].initializeFromClipResult(o,l,a);for(var u=0;u<s;++u){var c=N$D[u];if(c.isIndexed())c.newIndex=r[c.index],c.uBuffer=e,c.vBuffer=t,c.heightBuffer=i;else{var h=c.getKey();if(e$2b(r[h]))c.newIndex=r[h];else{var d=e.length;e.push(c.getU()),t.push(c.getV()),i.push(c.getH()),c.newIndex=d,r[h]=d}}}3===s?(n.push(N$D[0].newIndex),n.push(N$D[1].newIndex),n.push(N$D[2].newIndex)):4===s&&(n.push(N$D[0].newIndex),n.push(N$D[1].newIndex),n.push(N$D[2].newIndex),n.push(N$D[0].newIndex),n.push(N$D[2].newIndex),n.push(N$D[3].newIndex))}}N$D.push(new x$R),N$D.push(new x$R),N$D.push(new x$R),N$D.push(new x$R),Ne$g.createTerrainMesh=function(e,t){var i=e.tilingScheme.ellipsoid,n=e.rectangle,r=t._quantizedVertices,o=r.length/3,a=t._westIndices.length+t._eastIndices.length+t._southIndices.length+t._northIndices.length,s=n.west,l=n.south,u=n.east,c=n.north,h=1*t._minimumHeight,d=1*t._maximumHeight,f=t$O.geodeticLatitudeToMercatorAngle(l),p=1/(t$O.geodeticLatitudeToMercatorAngle(c)-f),_=t._boundingSphere.center,m=r.subarray(0,o),g=r.subarray(o,2*o),x=r.subarray(2*o,3*o),v=new Array(o),y=new Array(o),$=new Array(o),b=new Array(o),T=ot$6;T.x=Number.POSITIVE_INFINITY,T.y=Number.POSITIVE_INFINITY,T.z=Number.POSITIVE_INFINITY;var C=ht$5;C.x=Number.NEGATIVE_INFINITY,C.y=Number.NEGATIVE_INFINITY,C.z=Number.NEGATIVE_INFINITY;for(var S=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,E=Number.POSITIVE_INFINITY,P=Number.NEGATIVE_INFINITY,A=0;A<o;++A){var L,M;if(t.wasCreatedByUpsampling()){var R=m[A],I=g[A];L=R/w$J,M=I/w$J,h$J.longitude=e$2a.lerp(s,u,L),h$J.latitude=e$2a.lerp(l,c,M),h$J.height=x[A]}else h$J.longitude=m[A],h$J.latitude=g[A],h$J.height=x[A],L=(h$J.longitude-s)/n.width,M=(h$J.latitude-l)/n.height;S=Math.min(h$J.longitude,S),w=Math.max(h$J.longitude,w),E=Math.min(h$J.latitude,E),P=Math.max(h$J.latitude,P);var O=i.cartographicToCartesian(h$J);v[A]=new o$1o(L,M),y[A]=h$J.height,$[A]=O,b[A]=(t$O.geodeticLatitudeToMercatorAngle(h$J.latitude)-f)*p}var D,B,N=Be$g(t._westIndices,(function(e,t){return v[e].y-v[t].y})),F=Be$g(t._eastIndices,(function(e,t){return v[t].y-v[e].y})),U=Be$g(t._southIndices,(function(e,t){return v[t].x-v[e].x})),z=Be$g(t._northIndices,(function(e,t){return v[e].x-v[t].x}));B=i$1c.fromPoints($),D=y$Z.fromRectangle(n,h,d,i),_=o$1p.clone(B.center);var G=m$17.eastNorthUpToFixedFrame(_,i),V=p$1d.inverseTransformation(G,new p$1d);for(A=0;A<o;A++){O=$[A];p$1d.multiplyByPoint(V,O,ie$w),o$1p.minimumByComponent(ie$w,T,T),o$1p.maximumByComponent(ie$w,C,C)}for(var k=new h$L(new e$26(T,C,_),h,d,G,!1,!0),W=k.getStride(),H=new Float32Array(o*W+a*W),q=0,j=0;j<o;++j)q=k.encode(H,q,$[j],v[j],y[j],qe$9,b[j]);var Y=Math.max(0,2*(a-4)),X=t._indices.length+3*Y,K=ce$x.createTypedArray(o+a,X);K.set(t._indices,0);var Q=1e-4,Z=(w-S)*Q,J=(P-E)*Q,ee=-Z,te=Z,ie=J,ne=-J,re=o*W;Ae$k(H,re,N,k,y,v,i,n,t._westSkirtHeight,ee,0),Ae$k(H,re+=t._westIndices.length*W,U,k,y,v,i,n,t._southSkirtHeight,0,ne),Ae$k(H,re+=t._southIndices.length*W,F,k,y,v,i,n,t._eastSkirtHeight,te,0),Ae$k(H,re+=t._eastIndices.length*W,z,k,y,v,i,n,t._northSkirtHeight,0,ie),I$12.addSkirtIndices(N,U,F,z,o,K,t._indices.length,void 0);var oe=t._quantizedVertices.length/3,ae=oe+t._westIndices.length+t._southIndices.length+t._eastIndices.length+t._northIndices.length,se=ce$x.createTypedArray(ae,K.buffer),le=0===se.length;return t._mesh=new T$K(_,H,se,t._indices.length,oe,h,d,B,void 0,W,D,k,1,N,U,F,z,le),t._quantizedVertices=void 0,t._encodedNormals=void 0,t._indices=void 0,t._uValues=void 0,t._vValues=void 0,t._heightValues=void 0,t._westIndices=void 0,t._southIndices=void 0,t._eastIndices=void 0,t._northIndices=void 0,t._mesh},Ne$g.upsampleTerrainData=function(e){var t=e.parent;if(e$2b(t)&&e$2b(t.data)&&e$2b(t.data.modifyTerrainData)){var i=t.data.modifyTerrainData,n=t.x,r=t.y;t.level;var o=i._mesh;if(e$2b(o)){var a=2*n!==e.x,s=2*r===e.y,l=e.tilingScheme,u=l.ellipsoid,c=l.tileXYToRectangle(e.x,e.y,e.level),h=a?P$J:0,d=a?w$J:P$J,f=s?P$J:0,p=s?w$J:P$J,_=ft$5,m=ct$5,g=vt$7;_.length=0,m.length=0,g.length=0;var x=gt$5;x.length=0;var v={},y=o.vertices,$=o.indices;$=$.subarray(0,o.indexCountWithoutSkirts);var b=o.encoding,T=o.exaggeration,C=0,S=o.vertexCountWithoutSkirts;i._minimumHeight,i._maximumHeight;var w,E,P,A,L,M=new Array(S),R=new Array(S),I=new Array(S);for(E=0,P=0;E<S;++E,P+=2){var O=b.decodeTextureCoordinates(y,E,It$6);w=b.decodeHeight(y,E)/T,A=e$2a.clamp(O.x*w$J|0,0,w$J),L=e$2a.clamp(O.y*w$J|0,0,w$J),I[E]=w,A<20&&(A=0),L<20&&(L=0),w$J-A<20&&(A=w$J),w$J-L<20&&(L=w$J),M[E]=A,R[E]=L,(a&&A>=P$J||!a&&A<=P$J)&&(s&&L>=P$J||!s&&L<=P$J)&&(v[E]=C,_.push(A),m.push(L),g.push(I[E]),++C)}var D=[];D.push(new x$R),D.push(new x$R),D.push(new x$R);var B,N=[];for(N.push(new x$R),N.push(new x$R),N.push(new x$R),E=0;E<$.length;E+=3){var F=$[E],U=$[E+1],z=$[E+2],G=M[F],V=M[U],k=M[z];D[0].initializeIndexed(M,R,I,F),D[1].initializeIndexed(M,R,I,U),D[2].initializeIndexed(M,R,I,z);var W=d$10.clipTriangleAtAxisAlignedThreshold(P$J,a,G,V,k,dt$7);!((B=0)>=W.length)&&(!((B=N[0].initializeFromClipResult(W,B,D))>=W.length)&&(!((B=N[1].initializeFromClipResult(W,B,D))>=W.length)&&(B=N[2].initializeFromClipResult(W,B,D),We$f(_,m,g,x,v,d$10.clipTriangleAtAxisAlignedThreshold(P$J,s,N[0].getV(),N[1].getV(),N[2].getV(),Ge$b),N),B<W.length&&(N[2].clone(N[1]),N[2].initializeFromClipResult(W,B,D),We$f(_,m,g,x,v,d$10.clipTriangleAtAxisAlignedThreshold(P$J,s,N[0].getV(),N[1].getV(),N[2].getV(),Ge$b),N)))))}var H=a?-w$J:0,q=s?-w$J:0,j=[],Y=[],X=[],K=[],Q=Number.MAX_VALUE,Z=-Q,J=ut$7;J.length=0;var ee=c,te=ee.north,ie=ee.south,ne=ee.east,re=ee.west;for(ne<re&&(ne+=e$2a.TWO_PI),E=0;E<_.length;++E)(A=Math.round(_[E]))<=h?(j.push(E),A=0):A>=d?(X.push(E),A=w$J):A=2*A+H,_[E]=A,(L=Math.round(m[E]))<=f?(Y.push(E),L=0):L>=p?(K.push(E),L=w$J):L=2*L+q,m[E]=L,(w=g[E])<Q&&(Q=w),w>Z&&(Z=w),g[E]=w,h$J.longitude=e$2a.lerp(re,ne,A/w$J),h$J.latitude=e$2a.lerp(ie,te,L/w$J),h$J.height=w,u.cartographicToCartesian(h$J,ie$w),J.push(ie$w.x),J.push(ie$w.y),J.push(ie$w.z);var oe=i$1c.fromVertices(J,o$1p.ZERO,3,mt$3),ae=y$Z.fromRectangle(ee,Q,Z,u,pt$6),se=new s$G(u).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(oe.center,J,3,oe.center,Q,lt$2),le=new Float64Array(_.length+m.length+g.length);for(E=0;E<_.length;++E)le[E]=_[E];var ue=_.length;for(E=0;E<m.length;++E)le[ue+E]=m[E];for(ue+=m.length,E=0;E<g.length;++E)le[ue+E]=g[E];var ce=ce$x.createTypedArray(_.length,x),he=new Float64Array(le.buffer),de=ce$x.createTypedArray(he.length/3,ce.buffer),fe=Math.min(i._westSkirtHeight,i._eastSkirtHeight);fe=Math.min(fe,i._southSkirtHeight),fe=Math.min(fe,i._northSkirtHeight);var pe=a?.5*fe:i._westSkirtHeight,_e=s?.5*fe:i._southSkirtHeight,me=a?i._eastSkirtHeight:.5*fe,ge=s?i._northSkirtHeight:.5*fe,xe=i._credits;if(0!==he.length)return new p$O({quantizedVertices:he,indices:de,minimumHeight:Q,maximumHeight:Z,boundingSphere:oe,orientedBoundingBox:ae,horizonOcclusionPoint:se,westIndices:j,southIndices:Y,eastIndices:X,northIndices:K,westSkirtHeight:pe,southSkirtHeight:_e,eastSkirtHeight:me,northSkirtHeight:ge,childTileMask:0,credits:xe,createdByUpsampling:!0})}}},Ne$g.createTerrainData=function(e,t,i,n,r){var o=t.length;if(!(o<1)){e.data,e.rectangle;for(var a=[],s=0;s<o;s++){var l=t[s].attributes;a=a.concat(o$1p.unpackArray(l.position.values))}var u=a.length,c=new Float64Array(3*u);for(s=0;s<u;s++){var h=a[s];a$18.fromCartesian(h,void 0,h$J);var d=h$J.height;if(e$2b(r)){var f=yt$5(e,h$J);d=r+(f>0?f:0)}c[s]=h$J.longitude,c[u+s]=h$J.latitude,c[2*u+s]=d}return new p$O({quantizedVertices:c,indices:o>1?wt$5(t):t[0].indices,encodedNormals:void 0,minimumHeight:i,maximumHeight:n,boundingSphere:new i$1c,orientedBoundingBox:new y$Z,horizonOcclusionPoint:new o$1p,westIndices:[],southIndices:[],eastIndices:[],northIndices:[],westSkirtHeight:0,southSkirtHeight:0,eastSkirtHeight:0,northSkirtHeight:0,childTileMask:0,credits:void 0,createdByUpsampling:!1})}};var xt$5=new o$1p,Ke$9=new o$1p,St$3=new a$18,Tt$7=new f$17;function yt$5(e,t){if(!e$2b(t))throw new DeveloperError("cartographic is required");for(;e._lastSelectionResult===D$J.REFINED;)e=Ye$b(e.southwestChild,t)||Ye$b(e.southeastChild,t)||Ye$b(e.northwestChild,t)||e.northeastChild;if(e$2b(e.data)&&e$2b(e.data.renderedMesh)){var i=e.tilingScheme.ellipsoid,n=o$1p.fromRadians(t.longitude,t.latitude,0,i,xt$5),r=Tt$7,o=i.geodeticSurfaceNormal(n,r.direction);if(!e$2b(i.getSurfaceNormalIntersectionWithZAxis(n,11500,r.origin))){var a=Math.min(defaultValue(e.data.minimumHeight,0),-11500),s=o$1p.multiplyByScalar(o,Math.abs(a)+1,Ke$9);o$1p.subtract(n,s,r.origin)}if(e$2b(e.data.terrainData)&&e.data.terrainData instanceof p$O)return e.data.terrainData.interpolateHeight(e.rectangle,t.longitude,t.latitude);var l=e.data.pick(r,void 0,void 0,!1,Ke$9);if(e$2b(l))return i.cartesianToCartographic(l,St$3).height}}function Ye$b(e,t){return h$18.contains(e.rectangle,t)?e:void 0}function x$Q(e){this.terrainLayer=e,this.terrainData=void 0,this.vertexArray=void 0,this.terrainState=Le$m.UNLOADED,this.mesh=void 0,this.orientedBoundingBox=void 0,this.occludeePointInScaledSpace=new o$1p,this._rasterTerrainFBO=void 0,this._rasterTerrainTexture=void 0,this._rasterized=!1,this._rasterTextureSize=256}function $$J(e,t,i,n,r){function o(i){e.request=void 0,e$2b(i)?"cacheError"!==i?"cacheInvalid"!==i?(e.terrainData=i,e.terrainState=Le$m.RECEIVED,t._isTerrainZ&&0!==r&&(e.terrainState=Le$m.UNZIP,e.zipTerrainData=i,e.terrainData=void 0)):e.terrainState=Le$m.FAILED:s(!1):e.terrainState=Le$m.FAILED}function a(){if(e.request.state===W$1c.CANCELLED)return e.terrainData=void 0,e.terrainState=Le$m.UNLOADED,void(e.request=void 0);e.terrainState=Le$m.FAILED,e.request=void 0;var o="Failed to obtain terrain tile X: "+i+" Y: "+n+" Level: "+r+".";t._requestError=l$W.handleError(t._requestError,t,t.errorEvent,o,i,n,r,s)}function s(s){var l=new r$1b({throttle:!1,throttleByServer:!0,type:V$15.TERRAIN});l.cacheEnable=s,e.request=l;var u=t.requestTileGeometry(i,n,r,l);e$2b(u)?(e.terrainState=Le$m.RECEIVING,o$1l(u,o,a)):(e.terrainState=Le$m.UNLOADED,e.request=void 0)}s(!0)}function ee$r(e,t,i,n,r,o,a){var s=t.parent;if(s){var l=s.data.terrain[e.terrainLayer.terrainProvider.tablename];if(e$2b(l)){var u=l.terrainData,c=s.x,h=s.y,d=s.level;if(e$2b(u)){var f=u.upsample(n.tilingScheme,c,h,d,r,o,a);!e$2b(f)||(e.terrainState=Le$m.RECEIVING,o$1l(f,(function(t){if(e$2b(t)){var i=u.rasterVertex,n=u.rasterIndex,a=void 0,s=u.hasInvalid;if(e$2b(i)){var l=new p$1d(2,0,0,0,0,2,0,0,0,0,1,0,0,0,0,1);r%c==1&&(l[12]=-32767),o%h==0&&(l[13]=-32767),e$2b(u.modelMatrix)?(a=new p$1d,a=p$1d.multiply(l,u.modelMatrix,a)):a=l,t.rasterVertex=i,t.rasterIndex=n,t.modelMatrix=a,t.hasInvalid=s}e.terrainData=t,e.terrainState=Le$m.RECEIVED}else e.terrainState=Le$m.INVALID}),(function(){e.terrainState=Le$m.FAILED})))}}}else t.state=QuadtreeTileLoadState.FAILED}function re$y(e,t,i,n,r){var o=t.unzip(e.zipTerrainData.buffer);e$2b(o)&&(e.terrainState=Le$m.UNZIPING,o$1l(o,(function(i){if(!e$2b(i))return e.terrainState=Le$m.FAILED,e.zipTerrainData=void 0,void(e.terrainData=void 0);e.terrainState=Le$m.RECEIVED,e.terrainData=t.createTerrainData(e.zipTerrainData,i.data.buffer,!0),e.zipTerrainData=void 0}),(function(t){e.terrainState=Le$m.FAILED})))}function te$v(e,t,i,n,r,o){var a=i.tilingScheme,s=e.terrainData.createMesh(a,n,r,o,t.terrainExaggeration);!e$2b(s)||(e.terrainState=Le$m.TRANSFORMING,o$1l(s,(function(t){e.mesh=t,e.orientedBoundingBox=y$Z.clone(t.orientedBoundingBox,e.orientedBoundingBox),e.occludeePointInScaledSpace=o$1p.clone(t.occludeePointInScaledSpace,e.occludeePointInScaledSpace),e.terrainState=Le$m.TRANSFORMED}),(function(){e.terrainState=Le$m.FAILED})))}function R$G(){this.context=void 0,this.tileTerrain=void 0,this.mesh=void 0}x$Q.prototype.freeResources=function(){this._rasterTerrainTexture=this._rasterTerrainTexture&&!this._rasterTerrainTexture.isDestroyed()&&this._rasterTerrainTexture.destroy(),this._rasterTerrainFBO=this._rasterTerrainFBO&&!this._rasterTerrainFBO.isDestroyed()&&this._rasterTerrainFBO.destroy(),this._rasterTerrainFBO=void 0},Object.defineProperties(x$Q.prototype,{name:{get:function(){return this.terrainLayer.terrainProvider.tablename}}}),x$Q.prototype.processStateMachine=function(e,t){var i=this.terrainLayer.terrainProvider;if(i._ready){var n=e.parent;if(e$2b(n)&&e$2b(n.data)){var r=n.data.terrain[i.tablename];if(e$2b(r)&&this.terrainState===Le$m.FAILED)void 0!==r.terrainData&&!1!==r.terrainData.canUpsample||r.processStateMachine(n,t)}this.terrainState===Le$m.FAILED&&ee$r(this,e,t,i,e.x,e.y,e.level),this.terrainState===Le$m.UNLOADED&&$$J(this,i,e.x,e.y,e.level),this.terrainState===Le$m.UNZIP&&re$y(this,i,e.x,e.y,e.level),this.terrainState===Le$m.RECEIVED&&te$v(this,t,i,e.x,e.y,e.level),this.terrainState===Le$m.TRANSFORMED&&ae$q(t,this,t.context,i,e.x,e.y,e.level),this.terrainState,Le$m.INVALID}},R$G.prototype.set=function(e,t,i,n){this.context=e,this.tileTerrain=t,this.mesh=i,this.terrainProvider=n},R$G.prototype.execute=function(){var e=this.context,t=this.mesh,i=this.tileTerrain;!1===this.terrainProvider.isShowGlobe&&t.invalid?i.vertexArray=void 0:i.vertexArray=v$C._createVertexArrayForMesh(e,t)};var C$O=new R$G;function ae$q(e,t,i,n,r,o,a){C$O.set(i,t,t.mesh,n),e.jobScheduler.execute(C$O,2)&&(t.terrainState=Le$m.READY)}x$Q.prototype.createRealtimeRasterTerrainFBO=function(e){this._rasterTerrainTexture=new t$V({context:e.context,width:this._rasterTextureSize,height:this._rasterTextureSize,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}),this._rasterTerrainFBO=new t$W({context:e.context,colorTextures:[this._rasterTerrainTexture],destroyAttachments:!1})};var ie$v=new f$18(0,0,256,256);function v$C(){this.terrain={},this.imagery=[],this.gridImagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new e$29(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.orientedBoundingBox=void 0,this.boundingVolumeSourceTile=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new o$1p,this.tileTerrainOrientedBoundingBox=void 0,this.terrainState=Le$m.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new i$1c,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1,this.normalTexture=void 0,this.normalTextureTranslationAndScale=new e$29(0,0,1,1),this.modifyTerrainData=void 0,this.modifyTerrainMesh=void 0,this.modifyTerrainVertexArray=void 0,this.modifyOrientedBoundingBox=void 0,this.subDivisionMesh=void 0,this.subDivisionVertexArray=void 0,this.invalid=!1,this.invalidMesh=void 0,this.invalidOrientedBoundingBox=void 0,this.invalidOccludeePointInScaledSpace=void 0,this.invalidVertexArray=void 0,this.invalidTerrainData=void 0}function C$N(e,t,i,n,r,o){if(e.decodePosition(n,r,o),e$2b(t)&&t!==C$13.SCENE3D){var a=i.ellipsoid.cartesianToCartographic(o);i.project(a,o),o$1p.fromElements(o.z,o.x,o.y,o)}return o}x$Q.prototype.realtimeRasterValidTerrain=function(e,t,i){if(!(this._rasterized||i.level<2)&&e$2b(this.terrainData)){this._rasterized=!0;var n=void 0,r=void 0,o=p$1d.IDENTITY;if(e$2b(this.terrainData)){n=this.terrainData.rasterIndex,r=this.terrainData.rasterVertex;e$2b(this.terrainData.modelMatrix)&&(o=this.terrainData.modelMatrix)}if(!e$2b(r))return void(e$2b(this._rasterTerrainFBO)&&(i._clearCommand.framebuffer=this._rasterTerrainFBO,i._clearCommand.execute(e.context)));e$2b(this._rasterTerrainTexture)||this.createRealtimeRasterTerrainFBO(e);var a=t._rasterAAFBOs[0];i._clearCommand.framebuffer=a,i._clearCommand.execute(e.context),i._clearCommand.framebuffer=this._rasterTerrainFBO,i._clearCommand.execute(e.context);var s=i.setRasterValidTerrainCamera(i,e);if(e$2b(r)){var l=t$Y.createVertexBuffer({context:e.context,typedArray:r,usage:A$19.STATIC_DRAW}),u=t$Y.createIndexBuffer({context:e.context,typedArray:n,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.fromSizeInBytes(n.BYTES_PER_ELEMENT)});u.vertexArrayDestroyable=!1,u.referenceCount=1;var c,h=[{index:0,vertexBuffer:l,componentDatatype:S$12.SHORT,componentsPerAttribute:3,offsetInBytes:0,strideInBytes:3*S$12.getSizeInBytes(S$12.SHORT)}],d=new c$12({context:e.context,attributes:h,indexBuffer:u}),f=["attribute vec4 position;","void main()","{"," gl_Position = czm_modelViewProjection * vec4(position.xy, 0.0, 1.0);","}"].join("\n"),p=["void main()","{"," gl_FragColor = czm_packValue(0.0);","}"].join("\n"),_=new s$U({sources:[f]}),m=new s$U({sources:[p]});(c=new i$_).cull=!1,c.boundingVolume=new i$1c(o$1p.ZERO,65535),c.shaderProgram=r$13.fromCache({context:e.context,vertexShaderSource:_,fragmentShaderSource:m,attributeLocations:{position:0}}),c.modelMatrix=o,c.primitiveType=W$18.TRIANGLES,c.vertexArray=d,c.count=n.length,c.pass=2,c.renderState=d$1m.fromCache({viewport:ie$v}),c.framebuffer=this._rasterTerrainFBO,c.execute(e.context)}i.resetCamera(e,s)}},Object.defineProperties(v$C.prototype,{eligibleForUnloading:{get:function(){for(var e=this.terrainState,t=!(e===Le$m.RECEIVING||e===Le$m.TRANSFORMING),i=this.imagery,n=0,r=i.length;t&&n<r;++n){var o=i[n];t=!e$2b(o.loadingImagery)||o.loadingImagery.state!==wt$6.TRANSITIONING}return t}},renderedMesh:{get:function(){return e$2b(this.subDivisionVertexArray)?this.subDivisionMesh:e$2b(this.vertexArray)?this.mesh:e$2b(this.fill)?this.fill.mesh:void 0}}});var ae$p=new o$1p,te$u=new o$1p,ie$u=new o$1p;function ne$A(e,t,i,n){var r=t.getTileDataAvailable(e.x,e.y,e.level);if(!e$2b(r)&&e$2b(e.parent)){var o=e.parent,a=o.data;e$2b(a)&&e$2b(a.terrainData)&&(r=a.terrainData.isChildAvailable(o.x,o.y,e.x,e.y))}!1===r&&(e.data.terrainState=Le$m.FAILED);for(var s=0,l=n.length;s<l;++s){var u=n.get(s);u.show&&u._createTileImagerySkeletons(e,t)}}function oe$p(e){var t=void 0;return e$2b(e.parent)&&e$2b(e.parent._childTileMaskExt)&&(t=e.x%e.parent.x==0?e.y%e.parent.y==0?e.parent._childTileMaskExt[0]:e.parent._childTileMaskExt[2]:e.y%e.parent.y==0?e.parent._childTileMaskExt[1]:e.parent._childTileMaskExt[3]),t}function de$p(e,t,i,n,r,o){var a=e.data,s=e.parent,l=!1;for(var u in a.terrain)a.terrain[u].processStateMachine(e,t),a.terrain[u].terrainState===Le$m.FAILED&&(l=!0);if((a.terrainState===Le$m.FAILED||l)&&void 0!==s)if(void 0!==s.data&&void 0!==s.data.terrainData&&!1!==s.data.terrainData.canUpsample){if(l)for(var u in s.data.terrain)(!e$2b(s.data.terrain[u].terrainData)||0==s.data.terrain[u].terrainData.canUpsample)&&s.data.terrain[u].processStateMachine(s,t)}else v$C.processStateMachine(s,t,i,n,r,!0);if(a.terrainState===Le$m.FAILED&&se$p(a,e,t,i,e.x,e.y,e.level),a.terrainState===Le$m.UNLOADED){var c=oe$p(e);fe$m(a,i,e.x,e.y,e.level,c)}if(a.terrainState===Le$m.UNZIP&&ue$r(a,i,e.x,e.y,e.level),a.terrainState===Le$m.RECEIVED&&(e$2b(a.terrainData)&&(e._childTileMaskExt=a.terrainData._childTileMaskExt),e.showInvalid&&!a.invalid&&a.setShowInvalid(),he$l(a,t,i,e.x,e.y,e.level)),a.terrainState===Le$m.TRANSFORMED&&me$o(t,a,t.context,i,e.x,e.y,e.level,o),a.terrainState!==Le$m.INVALID){var h;if(a.terrainState>=Le$m.RECEIVED&&void 0===a.waterMaskTexture&&i.hasWaterMask)if(void 0!==a.terrainData.waterMask)ce$n(t.context,a);else e$2b(h=a._findAncestorTileWithTerrainData(e))&&e$2b(h.data.waterMaskTexture)&&(a.waterMaskTexture=h.data.waterMaskTexture,++a.waterMaskTexture.referenceCount,a._computeWaterMaskTranslationAndScale(e,h,a.waterMaskTranslationAndScale));if(a.terrainState>=Le$m.RECEIVED&&void 0===a.normalTexture&&i.hasNormalBuffer)if(void 0!==a.terrainData._normalTexture)xe$k(t.context,a);else e$2b(h=a._findAncestorTileWithTerrainData(e))&&e$2b(h.data.normalTexture)&&(a.normalTexture=h.data.normalTexture,++a.normalTexture.referenceCount,a._computeNormalTextureTranslationAndScale(e,h,a.normalTextureTranslationAndScale))}}function se$p(e,t,i,n,r,o,a){var s=t.parent;if(s){var l=s.data.terrainData,u=s.x,c=s.y,h=s.level;if(e$2b(l)){var d=l.upsample(n.tilingScheme,u,c,h,r,o,a);!e$2b(d)||(e.terrainState=Le$m.RECEIVING,o$1l(d,(function(t){if(e$2b(t)){e.terrainData=t;var i=s.data.invalidTerrainData;if(e$2b(i)){var l=i.upsample(n.tilingScheme,u,c,h,r,o,a);if(!e$2b(l))return void(e.terrainState=Le$m.FAILED);o$1l(l,(function(t){e$2b(t)?(e.invalidTerrainData=t,e.terrainState=Le$m.RECEIVED,e.invalid=s.data.invalid):e.terrainState=Le$m.INVALID}))}else e.terrainState=Le$m.RECEIVED,e.invalid=s.data.invalid}else e.terrainState=Le$m.INVALID}),(function(){e.terrainState=Le$m.FAILED})))}}else t.state=re$z.FAILED}function fe$m(e,t,i,n,r,o){function a(i){e.request=void 0,e$2b(i)?"cacheError"!==i?"cacheInvalid"!==i?(e.terrainData=i,e.terrainState=Le$m.RECEIVED,t._isTerrainZ&&0!==r&&(e.terrainState=Le$m.UNZIP,e.zipTerrainData=i,e.terrainData=void 0)):e.terrainState=Le$m.FAILED:l(!1):e.terrainState=Le$m.FAILED}function s(){if(e.request.state===W$1c.CANCELLED)return e.terrainData=void 0,e.terrainState=Le$m.UNLOADED,void(e.request=void 0);e.terrainState=Le$m.FAILED,e.request=void 0;var o="Failed to obtain terrain tile X: "+i+" Y: "+n+" Level: "+r+".";t._requestError=l$W.handleError(t._requestError,t,t.errorEvent,o,i,n,r,l)}function l(l){var u=new r$1b({throttle:!1,throttleByServer:!0,type:V$15.TERRAIN});u.cacheEnable=l,e.request=u;var c=t.requestTileGeometry(i,n,r,u,o);e$2b(c)?(e.terrainState=Le$m.RECEIVING,o$1l(c,a,s)):(e.terrainState=Le$m.UNLOADED,e.request=void 0)}l(!0)}function ue$r(e,t,i,n,r){var o=t.unzip(e.zipTerrainData.buffer);e$2b(o)&&(e.terrainState=Le$m.UNZIPING,o$1l(o,(function(i){if(!e$2b(i))return e.terrainState=Le$m.FAILED,e.zipTerrainData=void 0,void(e.terrainData=void 0);e.terrainState=Le$m.RECEIVED,e.terrainData=t.createTerrainData(e.zipTerrainData,i.data.buffer),t._invisibility&&(e.invalidTerrainData=new T$J({buffer:new Uint8Array(256),width:16,height:16,skirtMode:!0,valid:!1})),e.zipTerrainData=void 0}),(function(t){e.terrainState=Le$m.FAILED})))}function he$l(e,t,i,n,r,o){var a=i.tilingScheme,s=e.terrainData.createMesh(a,n,r,o,t.terrainExaggeration);!e$2b(s)||(e.terrainState=Le$m.TRANSFORMING,o$1l(s,(function(s){if(i._isSct&&i._extrudeTileBoundingBox&&i._levels[0]>12&&s.maximumHeight<1&&(s.maximumHeight=Math.max(i._maxHeight,s.maximumHeight)),e.mesh=s,e.orientedBoundingBox=y$Z.clone(s.orientedBoundingBox,e.orientedBoundingBox),e.occludeePointInScaledSpace=o$1p.clone(s.occludeePointInScaledSpace,e.occludeePointInScaledSpace),i._enablePrjArea&&(e$2b(s.validOrientedBoundingBox)?e.tileBoundingRegion._orientedBoundingBox=y$Z.clone(s.validOrientedBoundingBox,e.tileBoundingRegion._orientedBoundingBox):e.tileBoundingRegion._orientedBoundingBox=y$Z.clone(e.orientedBoundingBox,e.tileBoundingRegion._orientedBoundingBox),e.tileBoundingRegion._boundingSphere=i$1c.fromOrientedBoundingBox(e.tileBoundingRegion._orientedBoundingBox)),e$2b(e.invalidTerrainData)){var l=e.invalidTerrainData.createMesh(a,n,r,o,t.terrainExaggeration);if(!e$2b(l))return void(e.terrainState=Le$m.RECEIVED);o$1l(l,(function(t){e.invalidMesh=t,e.invalidOrientedBoundingBox=y$Z.clone(t.orientedBoundingBox,e.invalidOrientedBoundingBox),e.invalidOccludeePointInScaledSpace=o$1p.clone(t.occludeePointInScaledSpace,e.invalidOccludeePointInScaledSpace),e.terrainState=Le$m.TRANSFORMED}))}else e.terrainState=Le$m.TRANSFORMED}),(function(){e.terrainState=Le$m.FAILED})))}function b$X(){this.context=void 0,this.surfaceTile=void 0,this.mesh=void 0}v$C.prototype.pick=function(e,t,i,n,r){var o=this.renderedMesh;if(e$2b(o)){for(var a=o.vertices,s=o.indices,l=o.encoding,u=s.length,c=Number.MAX_VALUE,h=0;h<u;h+=3){var d=s[h],f=s[h+1],p=s[h+2],_=C$N(l,t,i,a,d,ae$p),m=C$N(l,t,i,a,f,te$u),g=C$N(l,t,i,a,p,ie$u),x=g$1h.rayTriangleParametric(e,_,m,g,n);e$2b(x)&&x<c&&x>=0&&(c=x)}return c!==Number.MAX_VALUE?f$17.getPoint(e,c,r):void 0}},v$C.prototype.freeResources=function(){e$2b(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),e$2b(this.normalTexture)&&(--this.normalTexture.referenceCount,0===this.normalTexture.referenceCount&&this.normalTexture.destroy(),this.normalTexture=void 0),this.terrainData=void 0,this.modifyTerrainData=void 0,this.terrainState=Le$m.UNLOADED,this.mesh=void 0,this.modifyTerrainMesh=void 0,this.subDivisionMesh=void 0,this.fill=this.fill&&this.fill.destroy();for(var e=this.imagery,t=0,i=e.length;t<i;++t)e[t].freeResources();for(var n in this.imagery.length=0,this.terrain)this.terrain[n].freeResources();this.terrain={};var r=this.gridImagery;for(t=0,i=r.length;t<i;++t)r[t].freeResources();this.gridImagery.length=0,this.freeVertexArray(),this.invalid=!1,this.invalidMesh=void 0,this.invalidOrientedBoundingBox=void 0,this.invalidOccludeePointInScaledSpace=void 0,this.invalidVertexArray=void 0,this.invalidTerrainData=void 0},v$C.prototype.freeVertexArray=function(){v$C._freeVertexArray(this.vertexArray),this.vertexArray=void 0,v$C._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0,v$C._freeVertexArray(this.modifyTerrainVertexArray),this.modifyTerrainVertexArray=void 0,v$C._freeVertexArray(this.subDivisionVertexArray),this.subDivisionVertexArray=void 0},v$C.initialize=function(e,t,i,n){var r=e.data;e$2b(r)||(r=e.data=new v$C),e.state===re$z.START&&(ne$A(e,t,i,n),e.state=re$z.LOADING)},v$C.processStateMachine=function(e,t,i,n,r,o,a){v$C.initialize(e,i,n,r);var s=e.data;if(e.state===re$z.LOADING&&de$p(e,t,i,n,r,o),!a||0==e.level){var l=e.renderable;e.renderable=e$2b(s.vertexArray)||!1===i.isShowGlobe&&e$2b(s.mesh)&&s.mesh.invalid;var u=s.terrainState===Le$m.READY;for(var c in s.terrain)if(s.terrain[c].terrainState!==Le$m.READY){u=!1;break}e.upsampledFromParent=e$2b(s.terrainData)&&s.terrainData.wasCreatedByUpsampling();var h=!0,d=r._maxDetailLevelOffset();if(d>0){var f=e.level-d;f=Math.max(0,f);for(var p=e.level,_=e;p>f&&e$2b(_);)e$2b(_=_.parent)&&(v$C.initialize(_,i,n,r),h=s.processImagery(_,i,t)&&h),p=_.level}var m=s.processImagery(e,i,t)&&h,g=s.processGridTile(e,t);if(u&&m&&g||s.terrainState===Le$m.INVALID){var x=e._loadedCallbacks,v={};for(var y in x)x.hasOwnProperty(y)&&(x[y](e)||(v[y]=x[y]));e._loadedCallbacks=v,e.state=re$z.DONE}l&&(e.renderable=!0)}},v$C.prototype.processImagery=function(e,t,i,n){var r,o,a=e.data,s=e.upsampledFromParent,l=!1,u=!0,c=a.imagery,h=!1,d=!1;for(r=0,o=c.length;r<o;++r){var f=c[r];if(!e$2b(f.loadingImagery)&&!e$2b(f.readyImagery)&&e$2b(f.imageryLayer)&&(f.loadingImagery=f.imageryLayer.getImageryFromCache(e.x,e.y,e.level),f.imageryLayer=void 0),e$2b(f.loadingImagery)){if(f.loadingImagery.state===wt$6.PLACEHOLDER){var p=f.loadingImagery.imageryLayer;if(p.imageryProvider.ready){f.freeResources(),c.splice(r,1),p._createTileImagerySkeletons(e,t,r),--r,o=c.length;continue}s=!1}var _,m=void 0;if(f.loadingImagery.imageryLayer._imageryProvider instanceof I$10&&(m=f.loadingImagery.imageryLayer._imageryProvider,h=!0),i.camera._scene._mvtVisibleControl){var g=i.camera._scene._mvtVisibleLevel;!e$2b(m)||e._level>i.camera._endLevel-g?(_=f.processStateMachine(e,i,n))&&e$2b(m)&&(d=!0):_=!0}else _=f.processStateMachine(e,i,n);u=u&&_,l=l||_||e$2b(f.readyImagery),s=s&&e$2b(f.loadingImagery)&&(f.loadingImagery.state===wt$6.FAILED||f.loadingImagery.state===wt$6.INVALID)}else s=!1}return(!h||d)&&(e._mvtLoaded=!0),e.upsampledFromParent=s,e.renderable=e.renderable&&(l||u),u},new h$18,b$X.prototype.set=function(e,t,i,n){this.context=e,this.surfaceTile=t,this.mesh=i,this.terrainProvider=n},b$X.prototype.execute=function(){var e=this.context,t=this.mesh,i=this.surfaceTile;!1===this.terrainProvider.isShowGlobe&&t.invalid?i.vertexArray=void 0:(i.vertexArray=v$C._createVertexArrayForMesh(e,t),e$2b(i.invalidMesh)&&(i.invalidVertexArray=v$C._createVertexArrayForMesh(e,i.invalidMesh)))};var H$N=new b$X;function me$o(e,t,i,n,r,o,a,s){H$N.set(i,t,t.mesh,n),e.jobScheduler.execute(H$N,2)&&(t.terrainState=Le$m.READY,t.fill=t.fill&&t.fill.destroy(s))}function ve$k(e){var t=e.cache.tile_waterMaskData;if(!e$2b(t)){var i=t$V.create({context:e,pixelFormat:e.webgpu?V$10.RED:V$10.LUMINANCE,pixelDatatype:_$$.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});i.referenceCount=1,t={allWaterTexture:i,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR}),destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function ce$n(e,t){var i,n=t.terrainData.waterMask,r=ve$k(e),o=n.length;if(1===o){if(0===n[0])return;i=r.allWaterTexture}else{var a=Math.sqrt(o);(i=t$V.create({context:e,pixelFormat:e.webgpu?V$10.RED:V$10.LUMINANCE,pixelDatatype:_$$.UNSIGNED_BYTE,source:{width:a,height:a,arrayBufferView:n},sampler:r.sampler,flipY:!1})).referenceCount=0}++i.referenceCount,t.waterMaskTexture=i,e$29.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}function le$s(e){var t=e.cache.tile_normalTextureData;if(!e$2b(t)){var i=new t$V({context:e,pixelFormat:e.webgpu?V$10.RGBA:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([0,0,255]),width:1,height:1}});i.referenceCount=1,t={allNormalTexture:i,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR}),destroy:function(){this.allNormalTexture.destroy()}},e.cache.tile_normalTextureData=t}return t}function xe$k(e,t){var i=t.normalTexture;if(e$2b(i)&&(--i.referenceCount,0===i.referenceCount&&i.destroy(),t.normalTexture=void 0),e$2b(t.terrainData)){var n=t.terrainData.normalTexture;if(e$2b(n)){var r,o=le$s(e),a=n.length/3,s=Math.sqrt(a);e.webgpu&&(n=V$10.RGBToRGBA(n,_$$.UNSIGNED_BYTE,s,s)),(r=new t$V({context:e,pixelFormat:e.webgpu?V$10.RGBA:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:o.sampler})).referenceCount=0,++r.referenceCount,t.normalTexture=r,e$29.fromElements(0,0,1,1,t.normalTextureTranslationAndScale)}}}function pe$p(e,t){for(var i=(t=e.data).modifyTerrainMesh.minimumHeight,n=t.modifyTerrainMesh.maximumHeight,r=t.mesh,o=e.parent;!e$2b(r)&&e$2b(o)&&e$2b(o.data);)r=(t=o.data).mesh,o=o.parent;if(!e$2b(r))return t.modifyTerrainMesh.orientedBoundingBox;var a=Math.min(r.minimumHeight,i),s=Math.max(r.maximumHeight,n);return y$Z.fromRectangle(e.rectangle,a,s)}function ge$k(e,t){var i=t.data;i.modifyTerrainVertexArray=v$C._createVertexArrayForMesh(e,i.modifyTerrainMesh),i.modifyOrientedBoundingBox=pe$p(t,i),t.isModified=!0}v$C.prototype.processGridTile=function(e,t,i){for(var n=!0,r=e.data.gridImagery,o=0;o<r.length;o++){var a=r[o]._processStateMachine(e,t,i);n=n&&a}return n},v$C._createVertexArrayForMesh=function(e,t){var i=t.vertices,n=t$Y.createVertexBuffer({context:e,typedArray:i,usage:A$19.STATIC_DRAW}),r=t.encoding.getAttributes(n),o=t.indices.indexBuffers||{},a=o[e.id];if(!e$2b(a)||a.isDestroyed()){var s=t.indices;(a=t$Y.createIndexBuffer({context:e,typedArray:s,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.fromSizeInBytes(s.BYTES_PER_ELEMENT)})).vertexArrayDestroyable=!1,a.referenceCount=1,o[e.id]=a,t.indices.indexBuffers=o}else++a.referenceCount;return new c$12({context:e,attributes:r,indexBuffer:a})},v$C._freeVertexArray=function(e){if(e$2b(e)){var t=e.indexBuffer;e.destroy(),e$2b(t)&&!t.isDestroyed()&&e$2b(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}},v$C.prototype._findAncestorTileWithTerrainData=function(e){for(var t=e.parent;e$2b(t)&&(!e$2b(t.data)||!e$2b(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t},v$C.prototype._computeWaterMaskTranslationAndScale=function(e,t,i){var n=t.rectangle,r=e.rectangle,o=r.width,a=r.height,s=o/n.width,l=a/n.height;return i.x=s*(r.west-n.west)/o,i.y=l*(r.south-n.south)/a,i.z=s,i.w=l,i},v$C.prototype._computeNormalTextureTranslationAndScale=function(e,t,i){var n=t.rectangle,r=e.rectangle,o=r.width,a=r.height,s=o/n.width,l=a/n.height;return i.x=s*(r.west-n.west)/o,i.y=l*(r.south-n.south)/a,i.z=s,i.w=l,i},v$C.prototype.createModifyVertexArray=function(e,t,i,n,r,o,a){var s;if(e$2b(this.modifyTerrainVertexArray)&&(this.modifyTerrainData=void 0,this.modifyTerrainMesh=void 0,this.modifyTerrainVertexArray=!this.modifyTerrainVertexArray.isDestroyed()&&this.modifyTerrainVertexArray.destroy()),e$2b(s=a?Ne$g.upsampleTerrainData(i):Ne$g.createTerrainData(i,n,r,o,t._extractExtendHeight))){this.modifyTerrainData=s,this.modifyTerrainMesh=Ne$g.createTerrainMesh(i,s),ge$k(e,i);var l=i._level+" "+i._x+i._y;t._modifyTilesMap[l]=i}},v$C.prototype.freeModifyResource=function(){v$C._freeVertexArray(this.modifyTerrainVertexArray),this.modifyTerrainVertexArray=void 0,v$C._freeVertexArray(this.subDivisionVertexArray),this.subDivisionVertexArray=void 0,this.modifyTerrainData=void 0,this.modifyOrientedBoundingBox=void 0,this.subDivisionMesh=void 0},v$C.prototype.setShowInvalid=function(e){if(this.invalid!==e){if(e$2b(this.vertexArray)&&e$2b(this.invalidVertexArray)){var t=this.invalidOrientedBoundingBox,i=this.invalidOccludeePointInScaledSpace,n=this.invalidVertexArray,r=this.invalidMesh,o=this.invalidTerrainData;this.invalidOrientedBoundingBox=this.orientedBoundingBox,this.invalidOccludeePointInScaledSpace=this.occludeePointInScaledSpace,this.invalidVertexArray=this.vertexArray,this.invalidMesh=this.mesh,this.invalidTerrainData=this.terrainData,this.orientedBoundingBox=t,this.occludeePointInScaledSpace=i,this.vertexArray=n,this.mesh=r,this.terrainData=o,this.invalid=e}else if(this.terrainState===Le$m.RECEIVED){if(e$2b(this.terrainData)&&e$2b(this.invalidTerrainData)){o=this.invalidTerrainData;this.invalidTerrainData=this.terrainData,this.terrainData=o,this.invalid=e}}else if(this.terrainState===Le$m.TRANSFORMED&&e$2b(this.mesh)&&e$2b(this.invalidMesh)){t=this.invalidOrientedBoundingBox,i=this.invalidOccludeePointInScaledSpace,r=this.invalidMesh,o=this.invalidTerrainData;this.invalidOrientedBoundingBox=this.orientedBoundingBox,this.invalidOccludeePointInScaledSpace=this.occludeePointInScaledSpace,this.invalidMesh=this.mesh,this.invalidTerrainData=this.terrainData,this.orientedBoundingBox=t,this.occludeePointInScaledSpace=i,this.mesh=r,this.terrainData=o,this.invalid=e}this.boundingVolumeSourceTile=void 0}};var T$I={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7};function Q$J(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new e$29}Q$J.prototype.update=function(e,t,i){this.changedThisFrame&&(Le$l(e,t,this.tile,i),this.changedThisFrame=!1)},Q$J.prototype.destroy=function(e){e$2b(this.vertexArray)&&(e$2b(e)?e.push(this.vertexArray):v$C._freeVertexArray(this.vertexArray,e),this.vertexArray=void 0),e$2b(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};var Qe$8=new r$16;function k$F(e,t,i,n,r,o,a,s,l){if(void 0!==n){for(var u=n;u&&(u._lastSelectionResultFrame!==r||D$J.wasKicked(u._lastSelectionResult)||D$J.originalResult(u._lastSelectionResult)===D$J.CULLED);){if(a)return;var c=u.parent;if(o>=T$I.NORTHWEST&&void 0!==c)switch(o){case T$I.NORTHWEST:u=u===c.northwestChild?c:void 0;break;case T$I.NORTHEAST:u=u===c.northeastChild?c:void 0;break;case T$I.SOUTHWEST:u=u===c.southwestChild?c:void 0;break;case T$I.SOUTHEAST:u=u===c.southeastChild?c:void 0}else u=c}if(void 0!==u){if(u._lastSelectionResult===D$J.RENDERED){if(e$2b(u.data.vertexArray))return;return void De$k(e,t,i,u,o,r,s,l)}if(D$J.originalResult(n._lastSelectionResult)!==D$J.CULLED)switch(o){case T$I.WEST:k$F(e,t,i,n.northwestChild,r,o,!0,s,l),k$F(e,t,i,n.southwestChild,r,o,!0,s,l);break;case T$I.EAST:k$F(e,t,i,n.southeastChild,r,o,!0,s,l),k$F(e,t,i,n.northeastChild,r,o,!0,s,l);break;case T$I.SOUTH:k$F(e,t,i,n.southwestChild,r,o,!0,s,l),k$F(e,t,i,n.southeastChild,r,o,!0,s,l);break;case T$I.NORTH:k$F(e,t,i,n.northeastChild,r,o,!0,s,l),k$F(e,t,i,n.northwestChild,r,o,!0,s,l);break;case T$I.NORTHWEST:k$F(e,t,i,n.northwestChild,r,o,!0,s,l);break;case T$I.NORTHEAST:k$F(e,t,i,n.northeastChild,r,o,!0,s,l);break;case T$I.SOUTHWEST:k$F(e,t,i,n.southwestChild,r,o,!0,s,l);break;case T$I.SOUTHEAST:k$F(e,t,i,n.southeastChild,r,o,!0,s,l);break;default:throw new t$16("Invalid edge")}}}}function De$k(e,t,i,n,r,o,a,s){var l=n.data;if(void 0===l.fill)l.fill=new Q$J(n);else if(l.fill.visitedFrame===o)return;l.fill.enqueuedFrame!==o&&(l.fill.enqueuedFrame=o,l.fill.changedThisFrame=!1,a.enqueue(n)),ye$h(e,t,i,n,r,s)}function ye$h(e,t,i,n,r,o){var a,s,l,u=n.data.fill,c=i.data.fill;switch(e$2b(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(Le$l(e,t,i,o),c.changedThisFrame=!1),a=i.data.fill.mesh):a=i.data.mesh,r){case T$I.WEST:s=u.westMeshes,l=u.westTiles;break;case T$I.SOUTH:s=u.southMeshes,l=u.southTiles;break;case T$I.EAST:s=u.eastMeshes,l=u.eastTiles;break;case T$I.NORTH:s=u.northMeshes,l=u.northTiles;break;case T$I.NORTHWEST:return u.changedThisFrame=u.changedThisFrame||u.northwestMesh!==a,u.northwestMesh=a,void(u.northwestTile=i);case T$I.NORTHEAST:return u.changedThisFrame=u.changedThisFrame||u.northeastMesh!==a,u.northeastMesh=a,void(u.northeastTile=i);case T$I.SOUTHWEST:return u.changedThisFrame=u.changedThisFrame||u.southwestMesh!==a,u.southwestMesh=a,void(u.southwestTile=i);case T$I.SOUTHEAST:return u.changedThisFrame=u.changedThisFrame||u.southeastMesh!==a,u.southeastMesh=a,void(u.southeastTile=i)}if(i.level<=n.level)return u.changedThisFrame=u.changedThisFrame||s[0]!==a||1!==s.length,s[0]=a,l[0]=i,s.length=1,void(l.length=1);var h,d,f,p,_=i.rectangle,m=n.rectangle;switch(r){case T$I.WEST:for(p=(m.north-m.south)*e$2a.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2a.greaterThan(_.north,f.south,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2a.greaterThanOrEquals(_.south,f.north,p));++d);break;case T$I.SOUTH:for(p=(m.east-m.west)*e$2a.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2a.lessThan(_.west,f.east,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2a.lessThanOrEquals(_.east,f.west,p));++d);break;case T$I.EAST:for(p=(m.north-m.south)*e$2a.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2a.lessThan(_.south,f.north,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2a.lessThanOrEquals(_.north,f.south,p));++d);break;case T$I.NORTH:for(p=(m.east-m.west)*e$2a.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2a.greaterThan(_.east,f.west,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2a.greaterThanOrEquals(_.west,f.east,p));++d);}d-h==1?(u.changedThisFrame=u.changedThisFrame||s[h]!==a,s[h]=a,l[h]=i):(u.changedThisFrame=!0,s.splice(h,d-h,a),l.splice(h,d-h,i))}Q$J.updateFillTiles=function(e,t,i,n){var r=e._quadtree,o=r._levelZeroTiles,a=r._lastSelectionFrameNumber,s=Qe$8;s.clear();for(var l=0;l<t.length;++l){e$2b(t[l].data.vertexArray)&&s.enqueue(t[l])}for(var u=s.dequeue();void 0!==u;){var c=u.findTileToWest(o),h=u.findTileToSouth(o),d=u.findTileToEast(o),f=u.findTileToNorth(o);k$F(e,i,u,c,a,T$I.EAST,!1,s,n),k$F(e,i,u,h,a,T$I.NORTH,!1,s,n),k$F(e,i,u,d,a,T$I.WEST,!1,s,n),k$F(e,i,u,f,a,T$I.SOUTH,!1,s,n);var p=c.findTileToNorth(o),_=c.findTileToSouth(o),m=d.findTileToNorth(o),g=d.findTileToSouth(o);k$F(e,i,u,p,a,T$I.SOUTHEAST,!1,s,n),k$F(e,i,u,m,a,T$I.SOUTHWEST,!1,s,n),k$F(e,i,u,_,a,T$I.NORTHEAST,!1,s,n),k$F(e,i,u,g,a,T$I.NORTHWEST,!1,s,n),u=s.dequeue()}};var G$S=new a$18,xe$j=new a$18,$$I=new o$1p,ke$9=new o$1p,de$o=new o$1o,Te$i=new o$1o,C$M=new o$1o;function re$x(){this.height=0,this.encodedNormal=new o$1o}function he$k(e,t,i,n,r,o,a,s,l){if(e$2b(r))return r;var u;if(e$2b(o)&&e$2b(a))u=.5*(o.height+a.height);else if(e$2b(o))u=o.height;else if(e$2b(a))u=a.height;else if(e$2b(s))u=s.height;else{var c=e.tile.data.tileBoundingRegion,h=0,d=0;e$2b(c)&&(h=c.minimumHeight,d=c.maximumHeight),u=.5*(h+d)}return Ce$g(e,t,i,n,u,l),l}var et$a={minimumHeight:0,maximumHeight:0},pe$o=new re$x,We$e=new re$x,be$n=new re$x,Ue$e=new re$x,tt$a=typeof Uint8Array<"u"?new Uint8Array(81):void 0;function Le$l(e,t,i,n){v$C.initialize(i,e.terrainProvider,e._terrainLayers,e._imageryLayers);var r=i.data,o=r.fill,a=i.rectangle,s=i.tilingScheme.ellipsoid,l=ne$z(o,s,0,1,o.northwestTile,o.northwestMesh,o.northTiles,o.northMeshes,o.westTiles,o.westMeshes,be$n),u=ne$z(o,s,0,0,o.southwestTile,o.southwestMesh,o.westTiles,o.westMeshes,o.southTiles,o.southMeshes,pe$o),c=ne$z(o,s,1,0,o.southeastTile,o.southeastMesh,o.southTiles,o.southMeshes,o.eastTiles,o.eastMeshes,We$e),h=ne$z(o,s,1,1,o.northeastTile,o.northeastMesh,o.eastTiles,o.eastMeshes,o.northTiles,o.northMeshes,Ue$e);l=he$k(o,s,0,1,l,u,h,c,be$n),u=he$k(o,s,0,0,u,l,c,h,pe$o),c=he$k(o,s,1,1,c,u,h,l,We$e),h=he$k(o,s,1,1,h,c,l,u,Ue$e);var d,f,p=u.height,_=c.height,m=l.height,g=h.height,x=Math.min(p,_,m,g),v=Math.max(p,_,m,g),y=.5*(x+v),$=e.getLevelMaximumGeometricError(i.level),b=s.maximumRadius-$,T=4*Math.acos(b/s.maximumRadius);if(T*=1.5,a.width>T&&v-x<=$){var C=new T$J({width:9,height:9,buffer:tt$a,structure:{heightOffset:v}});o.mesh=C._createMeshSync(i.tilingScheme,i.x,i.y,i.level,1)}else{var S=new h$L(void 0,void 0,void 0,void 0,!0,!0),w=xe$j;w.longitude=.5*(a.east+a.west),w.latitude=.5*(a.north+a.south),w.height=y,S.center=s.cartographicToCartesian(w,S.center);var E,P=5;for(d=0,f=(E=o.westMeshes).length;d<f;++d)e$2b(E[d])&&(P+=E[d].eastIndicesNorthToSouth.length);for(d=0,f=(E=o.southMeshes).length;d<f;++d)e$2b(E[d])&&(P+=E[d].northIndicesWestToEast.length);for(d=0,f=(E=o.eastMeshes).length;d<f;++d)e$2b(E[d])&&(P+=E[d].westIndicesSouthToNorth.length);for(d=0,f=(E=o.northMeshes).length;d<f;++d)e$2b(E[d])&&(P+=E[d].southIndicesEastToWest.length);var A=et$a;A.minimumHeight=x,A.maximumHeight=v;var L=S.getStride(),M=new Float32Array(P*L),R=0,I=R;e$2b(l.height)&&!isNaN(l.height)&&(R=ce$m(o,s,S,M,R=ie$t(s,a,S,M,R,0,1,l.height,l.encodedNormal,1,A),o.westTiles,o.westMeshes,T$I.EAST,A));var O=R;e$2b(u.height)&&!isNaN(u.height)&&(R=ce$m(o,s,S,M,R=ie$t(s,a,S,M,R,0,0,u.height,u.encodedNormal,0,A),o.southTiles,o.southMeshes,T$I.NORTH,A));var D=R;e$2b(c.height)&&!isNaN(c.height)&&(R=ce$m(o,s,S,M,R=ie$t(s,a,S,M,R,1,0,c.height,c.encodedNormal,0,A),o.eastTiles,o.eastMeshes,T$I.WEST,A));var B=R;e$2b(h.height)&&!isNaN(h.height)&&(R=ce$m(o,s,S,M,R=ie$t(s,a,S,M,R,1,1,h.height,h.encodedNormal,1,A),o.northTiles,o.northMeshes,T$I.SOUTH,A)),x=isNaN(A.minimumHeight)?0:A.minimumHeight,v=isNaN(A.maximumHeight)?0:A.maximumHeight;var N=y$Z.fromRectangle(a,x,v,i.tilingScheme.ellipsoid),F=t$O.geodeticLatitudeToMercatorAngle(a.south),U=1/(t$O.geodeticLatitudeToMercatorAngle(a.north)-F),z=(t$O.geodeticLatitudeToMercatorAngle(w.latitude)-F)*U;s.geodeticSurfaceNormalCartographic(G$S,ke$9);var G=t$10.octEncode(ke$9,de$o),V=R;S.encode(M,R*L,N.center,o$1o.fromElements(.5,.5,C$M),y,G,z);var k,W=++R,H=3*(W-1),q=H*(W<256?1:2);if((M.length-W*L)*Float32Array.BYTES_PER_ELEMENT>=q){var j=W*L*Float32Array.BYTES_PER_ELEMENT;k=W<256?new Uint8Array(M.buffer,j,H):new Uint16Array(M.buffer,j,H)}else k=W<256?new Uint8Array(H):new Uint16Array(H);M=new Float32Array(M.buffer,0,W*L);var Y=0;for(d=0;d<W-2;++d)k[Y++]=V,k[Y++]=d,k[Y++]=d+1;k[Y++]=V,k[Y++]=d,k[Y++]=0;var X=[];for(d=O;d>=I;--d)X.push(d);var K=[];for(d=D;d>=O;--d)K.push(d);var Q=[];for(d=B;d>=D;--d)Q.push(d);var Z=[];for(Z.push(0),d=V-1;d>=B;--d)Z.push(d);o.mesh=new T$K(S.center,M,k,H,W,x,v,i$1c.fromOrientedBoundingBox(N),nt$6(e,N.center,a,x,v),S.getStride(),N,S,t.terrainExaggeration,X,K,Q,Z)}var J=t.context;e$2b(o.vertexArray)&&(e$2b(n)?0!==o.mesh.vertices.length&&0!==o.mesh.indices.length&&n.push(o.vertexArray):v$C._freeVertexArray(o.vertexArray)),0!==o.mesh.vertices.length&&0!==o.mesh.indices.length&&(o.vertexArray=v$C._createVertexArrayForMesh(J,o.mesh)),r.processImagery(i,e.terrainProvider,t,!0);var ee=o.waterMaskTexture;if(o.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){var te=r._findAncestorTileWithTerrainData(i);e$2b(te)&&e$2b(te.data.waterMaskTexture)&&(o.waterMaskTexture=te.data.waterMaskTexture,++o.waterMaskTexture.referenceCount,r._computeWaterMaskTranslationAndScale(i,te,o.waterMaskTranslationAndScale))}e$2b(ee)&&(--ee.referenceCount,0===ee.referenceCount&&ee.destroy())}function ie$t(e,t,i,n,r,o,a,s,l,u,c){var h=G$S;h.longitude=e$2a.lerp(t.west,t.east,o),h.latitude=e$2a.lerp(t.south,t.north,a),h.height=s;var d=e.cartographicToCartesian(h,$$I),f=Te$i;return f.x=o,f.y=a,i.encode(n,r*i.getStride(),d,f,s,l,u),c.minimumHeight=Math.min(c.minimumHeight,s),c.maximumHeight=Math.max(c.maximumHeight,s),r+1}var oe$o=new h$18;function D$I(e,t,i,n){var r=e.rectangle,o=t.rectangle;0===t.x&&1===i.x&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?((r=h$18.clone(e.rectangle,oe$o)).west-=e$2a.TWO_PI,r.east-=e$2a.TWO_PI):0===e.x&&0===i.x&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&((r=h$18.clone(e.rectangle,oe$o)).west+=e$2a.TWO_PI,r.east+=e$2a.TWO_PI);var a=r.east-r.west,s=(o.west-r.west)/a,l=(o.east-r.west)/a,u=r.north-r.south,c=(o.south-r.south)/u,h=(o.north-r.south)/u,d=(i.x-s)/(l-s),f=(i.y-c)/(h-c);return Math.abs(d)<Math.EPSILON5?d=0:Math.abs(d-1)<Math.EPSILON5&&(d=1),Math.abs(f)<Math.EPSILON5?f=0:Math.abs(f-1)<Math.EPSILON5&&(f=1),n.x=d,n.y=f,n}var at$8=new o$1o;function ge$j(e,t,i,n,r){var o=e.encoding,a=e.vertices;if(r.height=o.decodeHeight(a,t),o.hasVertexNormals)o.getOctEncodedNormal(a,t,r.encodedNormal);else{var s=r.encodedNormal;s.x=0,s.y=0}}var st$4=new o$1o,rt$b=new o$1p;function ht$4(e,t,i,n,r,o,a,s,l,u){var c,h=n.encoding,d=n.vertices,f=D$I(t,i,h.decodeTextureCoordinates(d,r,C$M),C$M),p=D$I(t,i,h.decodeTextureCoordinates(d,o,Te$i),Te$i);c=l?(a-f.x)/(p.x-f.x):(s-f.y)/(p.y-f.y);var _,m=h.decodeHeight(d,r),g=h.decodeHeight(d,o),x=i.rectangle;if(G$S.longitude=e$2a.lerp(x.west,x.east,a),G$S.latitude=e$2a.lerp(x.south,x.north,s),u.height=G$S.height=e$2a.lerp(m,g,c),!h.isModify)if(h.hasVertexNormals){var v=h.getOctEncodedNormal(d,r,at$8),y=h.getOctEncodedNormal(d,o,st$4),$=t$10.octDecode(v.x,v.y,$$I),b=t$10.octDecode(y.x,y.y,rt$b);_=o$1p.lerp($,b,c,$$I),o$1p.normalize(_,_),t$10.octEncode(_,u.encodedNormal)}else _=e.geodeticSurfaceNormalCartographic(G$S,$$I),t$10.octEncode(_,u.encodedNormal)}function Ce$g(e,t,i,n,r,o){o.height=r;var a=t.geodeticSurfaceNormalCartographic(G$S,$$I);t$10.octEncode(a,o.encodedNormal)}function ne$z(e,t,i,n,r,o,a,s,l,u,c){var h;return _e$o(e,t,s,a,!1,i,n,c)||_e$o(e,t,u,l,!0,i,n,c)?c:ve$j(r,o)?(ge$j(o,0===i?0===n?o.eastIndicesNorthToSouth[0]:o.southIndicesEastToWest[0]:0===n?o.northIndicesWestToEast[0]:o.westIndicesSouthToNorth[0],i,n,c),c):e$2b(h=0===i?0===n?fe$l(e.westMeshes,e.westTiles,T$I.EAST,e.southMeshes,e.southTiles,T$I.NORTH):fe$l(e.northMeshes,e.northTiles,T$I.SOUTH,e.westMeshes,e.westTiles,T$I.EAST):0===n?fe$l(e.southMeshes,e.southTiles,T$I.NORTH,e.eastMeshes,e.eastTiles,T$I.WEST):fe$l(e.eastMeshes,e.eastTiles,T$I.WEST,e.northMeshes,e.northTiles,T$I.SOUTH))?(Ce$g(e,t,i,n,h,c),c):void 0}function fe$l(e,t,i,n,r,o,a,s){var l=Re$h(e,t,!1,i),u=Re$h(n,r,!0,o);return e$2b(l)&&e$2b(u)?.5*(l+u):e$2b(l)?l:u}function ce$m(e,t,i,n,r,o,a,s,l){for(var u=0;u<o.length;++u)e$2b(a[u])&&(r=it$5(e,t,i,n,r,o[u],a[u],s,l));return r}function it$5(e,t,i,n,r,o,a,s,l){var u=o.rectangle;s===T$I.EAST&&0===e.tile.x?((u=h$18.clone(o.rectangle,oe$o)).west-=e$2a.TWO_PI,u.east-=e$2a.TWO_PI):s===T$I.WEST&&0===o.x&&((u=h$18.clone(o.rectangle,oe$o)).west+=e$2a.TWO_PI,u.east+=e$2a.TWO_PI);var c,h,d,f,p=e.tile.rectangle;switch(r>0&&(i.decodeTextureCoordinates(n,r-1,C$M),c=C$M.x,h=C$M.y),s){case T$I.WEST:d=a.westIndicesSouthToNorth,f=!1;break;case T$I.NORTH:d=a.northIndicesWestToEast,f=!0;break;case T$I.EAST:d=a.eastIndicesNorthToSouth,f=!1;break;case T$I.SOUTH:d=a.southIndicesEastToWest,f=!0}var _,m,g=o,x=e.tile,v=a.encoding,y=a.vertices,$=i.getStride();v.hasWebMercatorT&&(_=t$O.geodeticLatitudeToMercatorAngle(p.south),m=1/(t$O.geodeticLatitudeToMercatorAngle(p.north)-_));for(var b=0;b<d.length;++b){var T=d[b],C=v.decodeTextureCoordinates(y,T,C$M);D$I(g,x,C,C);var S=C.x,w=C.y,E=f?S:w;if(!(E<0||E>1||Math.abs(S-c)<e$2a.EPSILON5&&Math.abs(w-h)<e$2a.EPSILON5)){var P=Math.abs(S)<e$2a.EPSILON5||Math.abs(S-1)<e$2a.EPSILON5,A=Math.abs(w)<e$2a.EPSILON5||Math.abs(w-1)<e$2a.EPSILON5;if(!P||!A){var L,M=v.decodePosition(y,T,$$I),R=v.decodeHeight(y,T);v.hasVertexNormals?L=v.getOctEncodedNormal(y,T,de$o):((L=de$o).x=0,L.y=0);var I=w;if(v.hasWebMercatorT){var O=e$2a.lerp(p.south,p.north,w);I=(t$O.geodeticLatitudeToMercatorAngle(O)-_)*m}i.encode(n,r*$,M,C,R,L,I),l.minimumHeight=Math.min(l.minimumHeight,R),l.maximumHeight=Math.max(l.maximumHeight,R),++r}}}return r}function Re$h(e,t,i,n,r,o){var a,s,l;i?(a=0,s=e.length,l=1):(a=e.length-1,s=-1,l=-1);for(var u=a;u!==s;u+=l){var c=e[u];if(ve$j(t[u],c)){var h;switch(n){case T$I.WEST:h=c.westIndicesSouthToNorth;break;case T$I.SOUTH:h=c.southIndicesEastToWest;break;case T$I.EAST:h=c.eastIndicesNorthToSouth;break;case T$I.NORTH:h=c.northIndicesWestToEast}var d=h[i?0:h.length-1];if(e$2b(d))return c.encoding.decodeHeight(c.vertices,d)}}}function ve$j(e,t){return e$2b(t)&&(!e$2b(e.data.fill)||!e.data.fill.changedThisFrame)}function _e$o(e,t,i,n,r,o,a,s){var l,u,c,h,d,f=n[r?0:i.length-1],p=i[r?0:i.length-1];if(ve$j(f,p)&&(0===o?0===a?(l=r?p.northIndicesWestToEast:p.eastIndicesNorthToSouth,u=r,c=r):(l=r?p.eastIndicesNorthToSouth:p.southIndicesEastToWest,u=!r,c=!1):0===a?(l=r?p.westIndicesSouthToNorth:p.northIndicesWestToEast,u=!r,c=!0):(l=r?p.southIndicesEastToWest:p.westIndicesSouthToNorth,u=r,c=!r),l.length>0)){d=l[h=r?0:l.length-1],p.encoding.decodeTextureCoordinates(p.vertices,d,C$M);var _=D$I(f,e.tile,C$M,C$M);if(_.x===o&&_.y===a)return ge$j(p,d,o,a,s),!0;if(h=a$17(l,u?o:a,(function(t,i){p.encoding.decodeTextureCoordinates(p.vertices,t,C$M);var n=D$I(f,e.tile,C$M,C$M);return c?u?n.x-o:n.y-a:u?o-n.x:a-n.y})),!(h<0))return ge$j(p,l[h],o,a,s),!0;if((h=~h)>0&&h<l.length)return ht$4(t,f,e.tile,p,l[h-1],l[h],o,a,u,s),!0}return!1}var ot$5=[new o$1p,new o$1p,new o$1p,new o$1p];function nt$6(e,t,i,n,r,o){var a=e.quadtree._occluders.ellipsoid,s=a.ellipsoid,l=ot$5;return o$1p.fromRadians(i.west,i.south,r,s,l[0]),o$1p.fromRadians(i.east,i.south,r,s,l[1]),o$1p.fromRadians(i.west,i.north,r,s,l[2]),o$1p.fromRadians(i.east,i.north,r,s,l[3]),a.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,n,o)}var _0x231306=(_0x1c0f3e=!0,function(e,t){var i=_0x1c0f3e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c0f3e=!1,i}),_0x379cb6=_0x231306(void 0,(function(){return _0x379cb6.toString().search("(((.+)+)+)+$").toString().constructor(_0x379cb6).search("(((.+)+)+)+$")})),_0x1c0f3e;_0x379cb6();var xa$3="attribute vec4 position;\nattribute vec2 st;\nvarying vec2 v_texCoord;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n v_texCoord = st;\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n v_positionMC = vec4(position.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(position.xyz, 1.0)).xyz;\n}",_0x321504=(_0x37e11b=!0,function(e,t){var i=_0x37e11b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37e11b=!1,i}),_0x29d241=_0x321504(void 0,(function(){return _0x29d241.toString().search("(((.+)+)+)+$").toString().constructor(_0x29d241).search("(((.+)+)+)+$")})),_0x37e11b;_0x29d241();var Ta$3="varying vec2 v_texCoord;\nuniform sampler2D texture1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n vec4 baseColorWithAlpha = texture2D(texture1, v_texCoord);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(v_texCoord.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(v_texCoord.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, v_texCoord.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}",_0x13ebae=(_0x5b0031=!0,function(e,t){var i=_0x5b0031?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b0031=!1,i}),_0xd109f2=_0x13ebae(void 0,(function(){return _0xd109f2.toString().search("(((.+)+)+)+$").toString().constructor(_0xd109f2).search("(((.+)+)+)+$")})),_0x5b0031;_0xd109f2();const _0x3c7ea8="u_dayTextures",_0x2e5fb8="u_gridTextures",_0x2ac6d9="u_waterMask",_0x494605="u_oceanNormalMap",_0x16e394="uModifyRasterTexture",_0x503735="TileUBO",_0x684fbc=16;function _0x55856b(e){var t=_0x3e2f69.call(this)||this;t._context=e,t._dayTextures=[],t._dayTexturesSampleKey=[],t._gridTextures=[],t._waterMask=void 0,t._oceanNormalMap=void 0,t._modifyRasterTexture=void 0,t._center=new o$1p,t._tileBounds=new e$29,t._modifiedModelView=new p$1d,t._modifiedModelViewProjection=new p$1d,t._dayTextureTranslationAndScale=[];for(var i=0;i<_0x684fbc;i++)t._dayTextureTranslationAndScale.push(0),t._dayTextureTranslationAndScale.push(0),t._dayTextureTranslationAndScale.push(0),t._dayTextureTranslationAndScale.push(0);t._dayTextureSize=[];for(i=0;i<_0x684fbc;i++)t._dayTextureSize.push(0),t._dayTextureSize.push(0),t._dayTextureSize.push(0),t._dayTextureSize.push(0);t._dayTextureTexCoordsRectangle=[];for(i=0;i<_0x684fbc;i++)t._dayTextureTexCoordsRectangle.push(0),t._dayTextureTexCoordsRectangle.push(0),t._dayTextureTexCoordsRectangle.push(0),t._dayTextureTexCoordsRectangle.push(0);t._name=_0x503735}_0x3e2f69&&(_0x55856b.__proto__=_0x3e2f69),_0x55856b.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x55856b.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x55856b.prototype,{}),_0x55856b.prototype._initUBO=function(e){this._ubo=new _0x2e52cb(e.engine,void 0,!1,_0x503735,!1,!1),this._ubo.addUniform("u_modifiedModelView",16),this._ubo.addUniform("u_modifiedModelViewProjection",16),this._ubo.addUniform("u_dayTextureTranslationAndScale",4,_0x684fbc),this._ubo.addUniform("u_dayTextureSize",4,_0x684fbc),this._ubo.addUniform("u_dayTextureTexCoordsRectangle",4,_0x684fbc),this._ubo.addUniform("u_dayTextureUseWebMercatorT",1,_0x684fbc),this._ubo.addUniform("u_dayTextureFlipY",1,_0x684fbc),this._ubo.addUniform("u_normalTextureTranslationAndScale",4),this._ubo.addUniform("uTileBounds",4),this._ubo.addUniform("u_tileRectangle",4),this._ubo.addUniform("u_center3D",3),this._ubo.addUniform("u_southAndNorthLatitude",2),this._ubo.addUniform("u_southMercatorYAndOneOverHeight",2),this._ubo.addUniform("u_useNormalTexture",1),this._ubo.create()},_0x55856b.prototype._textureDirty=function(e){if(this._dayTextures.length!=e.dayTextures.length)return!0;var t;for(t=0;t<this._dayTextures.length;t++)if(this._dayTextures[t].id!=e.dayTextures[t].id||this._dayTexturesSampleKey[t]!=e.dayTextures[t].samplerKey)return!0;if(this._gridTextures.length!=e.gridTextures.length)return!0;for(t=0;t<this._gridTextures.length;t++)if(this._gridTextures[t].id!=e.gridTextures[t].id)return!0;return this._waterMask!=e.waterMask||this._oceanNormalMap!=e.oceanNormalMap},_0x55856b.prototype.updateFromProperties=function(e){if(this._context.webgpu){var t;for(e$2b(this._ubo)||this._initUBO(this._context),this._updateUniform(e),this._ubo.updateFloatArray("u_dayTextureTranslationAndScale",this._dayTextureTranslationAndScale),this._ubo.updateFloatArray("u_dayTextureSize",this._dayTextureSize),this._ubo.updateFloatArray("u_dayTextureTexCoordsRectangle",this._dayTextureTexCoordsRectangle),this._ubo.updateFloatArray("u_dayTextureUseWebMercatorT",e.dayTextureUseWebMercatorT),this._ubo.updateFloatArray("u_dayTextureFlipY",e.dayTextureFlipY),_0x3e2f69.writeCartesian4ToUBO("u_normalTextureTranslationAndScale",this._ubo,e.normalTextureTranslationAndScale),_0x3e2f69.writeMatrix4ToUBO("u_modifiedModelView",this._ubo,this._modifiedModelView),_0x3e2f69.writeMatrix4ToUBO("u_modifiedModelViewProjection",this._ubo,this._modifiedModelViewProjection),_0x3e2f69.writeCartesian4ToUBO("uTileBounds",this._ubo,e.tileBounds),_0x3e2f69.writeCartesian4ToUBO("u_tileRectangle",this._ubo,e.tileRectangle),_0x3e2f69.writeCartesian3ToUBO("u_center3D",this._ubo,e.center3D),_0x3e2f69.writeCartesian2ToUBO("u_southAndNorthLatitude",this._ubo,e.southAndNorthLatitude),_0x3e2f69.writeCartesian2ToUBO("u_southMercatorYAndOneOverHeight",this._ubo,e.southMercatorYAndOneOverHeight),this._ubo.updateFloat("u_useNormalTexture",e.normalTexture?1:0),this._ubo.update(),this._isTextureDirty=this._textureDirty(e),this._dayTextures=e.dayTextures,this._dayTexturesSampleKey=[],t=0;t<this._dayTextures.length;t++)this._dayTexturesSampleKey.push(this._dayTextures[t].samplerKey);this._gridTextures=e.gridTextures,this._waterMask=e.waterMask,this._oceanNormalMap=e.oceanNormalMap,this._modifyRasterTexture=e.modifyRasterTexture}};var _0x32e838=new o$1p,_0x5d18c2=new o$1p;_0x55856b.prototype._updateUniform=function(e){var t=this._context.uniformState.view;_0x5d18c2=o$1p.subtract(e.rtc,this._context.relativeOrigin,_0x5d18c2);var i=p$1d.multiplyByPoint(t,_0x5d18c2,_0x32e838);p$1d.setTranslation(t,i,this._modifiedModelView);var n=this._context.uniformState.projection;p$1d.multiply(n,this._modifiedModelView,this._modifiedModelViewProjection),e.dayTextureTranslationAndScale.length>_0x684fbc&&console.log("GlobeTileUBO max day texture is "+_0x684fbc+", used day textures is "+e.dayTextureTranslationAndScale.length);for(var r=0;r<e.dayTextureTranslationAndScale.length;r++){var o=e.dayTextureTranslationAndScale[r];e$29.pack(o,this._dayTextureTranslationAndScale,4*r)}for(r=0;r<e.dayTextureSize.length;r++){var a=e.dayTextureSize[r];e$29.pack(a,this._dayTextureSize,4*r)}for(r=0;r<e.dayTextureTexCoordsRectangle.length;r++){var s=e.dayTextureTexCoordsRectangle[r];e$29.pack(s,this._dayTextureTexCoordsRectangle,4*r)}},_0x55856b.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),_0x3e2f69.setTextureArrayToEffect(e,this._dayTextures,_0x3c7ea8),_0x3e2f69.setTextureArrayToEffect(e,this._gridTextures,_0x2e5fb8),_0x3e2f69.setTextureToEffect(e,this._waterMask,_0x2ac6d9),_0x3e2f69.setTextureToEffect(e,this._oceanNormalMap,_0x494605),_0x3e2f69.setTextureToEffect(e,this._modifyRasterTexture,_0x16e394)},_0x55856b.prototype.isDestroyed=function(){return!1},_0x55856b.prototype.destroy=function(){return i$10(this)};var L$T="varying vec2 v_textureCoordinates;\n\nuniform sampler2D colorTexture;\n\nconst float fxaaQualitySubpix = 1.0;\nconst float fxaaQualityEdgeThreshold = 0.166;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nconst vec3 kLumaCoefficients = vec3(0.2126, 0.7152, 0.0722);\n\n#define FxaaLuma(rgba) dot(rgba.rgb, kLumaCoefficients)\n\nvoid main(){\n vec2 texelSize = vec2(1.0) / czm_viewport.zw;\n\n vec2 sampleCoordS = v_textureCoordinates + vec2( 0.0, 1.0) * texelSize;\n\tvec2 sampleCoordE = v_textureCoordinates + vec2( 1.0, 0.0) * texelSize;\n\tvec2 sampleCoordN = v_textureCoordinates + vec2( 0.0,-1.0) * texelSize;\n\tvec2 sampleCoordW = v_textureCoordinates + vec2(-1.0, 0.0) * texelSize;\n\n\tvec2 sampleCoordNW = v_textureCoordinates + vec2(-1.0,-1.0) * texelSize;\n\tvec2 sampleCoordSE = v_textureCoordinates + vec2( 1.0, 1.0) * texelSize;\n\tvec2 sampleCoordNE = v_textureCoordinates + vec2( 1.0,-1.0) * texelSize;\n\tvec2 sampleCoordSW = v_textureCoordinates + vec2(-1.0, 1.0) * texelSize;\n\n\tvec2 posM;\n\n\tposM.x = v_textureCoordinates.x;\n\tposM.y = v_textureCoordinates.y;\n\n\tvec4 rgbyM = texture2D(colorTexture, v_textureCoordinates, 0.0);\n\tfloat lumaM = FxaaLuma(rgbyM);\n\tfloat lumaS = FxaaLuma(texture2D(colorTexture, sampleCoordS, 0.0));\n\tfloat lumaE = FxaaLuma(texture2D(colorTexture, sampleCoordE, 0.0));\n\tfloat lumaN = FxaaLuma(texture2D(colorTexture, sampleCoordN, 0.0));\n\tfloat lumaW = FxaaLuma(texture2D(colorTexture, sampleCoordW, 0.0));\n\tfloat maxSM = max(lumaS, lumaM);\n\tfloat minSM = min(lumaS, lumaM);\n\tfloat maxESM = max(lumaE, maxSM);\n\tfloat minESM = min(lumaE, minSM);\n\tfloat maxWN = max(lumaN, lumaW);\n\tfloat minWN = min(lumaN, lumaW);\n\tfloat rangeMax = max(maxWN, maxESM);\n\tfloat rangeMin = min(minWN, minESM);\n\tfloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\n\tfloat range = rangeMax - rangeMin;\n\tfloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\n\n// #ifndef MALI\n// \tif(range < rangeMaxClamped) \n// \t{\n// \t\tgl_FragColor = rgbyM;\n// \t\treturn;\n// \t}\n// #endif\n\n\tfloat lumaNW = FxaaLuma(texture2D(colorTexture, sampleCoordNW, 0.0));\n\tfloat lumaSE = FxaaLuma(texture2D(colorTexture, sampleCoordSE, 0.0));\n\tfloat lumaNE = FxaaLuma(texture2D(colorTexture, sampleCoordNE, 0.0));\n\tfloat lumaSW = FxaaLuma(texture2D(colorTexture, sampleCoordSW, 0.0));\n\tfloat lumaNS = lumaN + lumaS;\n\tfloat lumaWE = lumaW + lumaE;\n\tfloat subpixRcpRange = 1.0 / range;\n\tfloat subpixNSWE = lumaNS + lumaWE;\n\tfloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\n\tfloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\n\tfloat lumaNESE = lumaNE + lumaSE;\n\tfloat lumaNWNE = lumaNW + lumaNE;\n\tfloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\n\tfloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\n\tfloat lumaNWSW = lumaNW + lumaSW;\n\tfloat lumaSWSE = lumaSW + lumaSE;\n\tfloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\n\tfloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\n\tfloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\n\tfloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\n\tfloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\n\tfloat edgeVert = abs(edgeVert3) + edgeVert4;\n\tfloat subpixNWSWNESE = lumaNWSW + lumaNESE;\n\tfloat lengthSign = texelSize.x;\n\tbool horzSpan = edgeHorz >= edgeVert;\n\tfloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\n\n\tif (!horzSpan)\n\t{\n\t\tlumaN = lumaW;\n\t}\n\n\tif (!horzSpan) \n\t{\n\t\tlumaS = lumaE;\n\t}\n\n\tif (horzSpan) \n\t{\n\t\tlengthSign = texelSize.y;\n\t}\n\n\tfloat subpixB = (subpixA * (1.0 / 12.0)) - lumaM;\n\tfloat gradientN = lumaN - lumaM;\n\tfloat gradientS = lumaS - lumaM;\n\tfloat lumaNN = lumaN + lumaM;\n\tfloat lumaSS = lumaS + lumaM;\n\tbool pairN = abs(gradientN) >= abs(gradientS);\n\tfloat gradient = max(abs(gradientN), abs(gradientS));\n\n\tif (pairN)\n\t{\n\t\tlengthSign = -lengthSign;\n\t}\n\n\tfloat subpixC = clamp(abs(subpixB) * subpixRcpRange, 0.0, 1.0);\n\tvec2 posB;\n\n\tposB.x = posM.x;\n\tposB.y = posM.y;\n\n\tvec2 offNP;\n\n\toffNP.x = (!horzSpan) ? 0.0 : texelSize.x;\n\toffNP.y = (horzSpan) ? 0.0 : texelSize.y;\n\n\tif (!horzSpan) \n\t{\n\t\tposB.x += lengthSign * 0.5;\n\t}\n\n\tif (horzSpan)\n\t{\n\t\tposB.y += lengthSign * 0.5;\n\t}\n\n\tvec2 posN;\n\n\tposN.x = posB.x - offNP.x * 1.5;\n\tposN.y = posB.y - offNP.y * 1.5;\n\n\tvec2 posP;\n\n\tposP.x = posB.x + offNP.x * 1.5;\n\tposP.y = posB.y + offNP.y * 1.5;\n\n\tfloat subpixD = ((-2.0) * subpixC) + 3.0;\n\tfloat lumaEndN = FxaaLuma(texture2D(colorTexture, posN, 0.0));\n\tfloat subpixE = subpixC * subpixC;\n\tfloat lumaEndP = FxaaLuma(texture2D(colorTexture, posP, 0.0));\n\n\tif (!pairN) \n\t{\n\t\tlumaNN = lumaSS;\n\t}\n\n\tfloat gradientScaled = gradient * 1.0 / 4.0;\n\tfloat lumaMM = lumaM - lumaNN * 0.5;\n\tfloat subpixF = subpixD * subpixE;\n\tbool lumaMLTZero = lumaMM < 0.0;\n\n\tlumaEndN -= lumaNN * 0.5;\n\tlumaEndP -= lumaNN * 0.5;\n\n\tbool doneN = abs(lumaEndN) >= gradientScaled;\n\tbool doneP = abs(lumaEndP) >= gradientScaled;\n\n\tif (!doneN) \n\t{\n\t\tposN.x -= offNP.x * 3.0;\n\t}\n\n\tif (!doneN) \n\t{\n\t\tposN.y -= offNP.y * 3.0;\n\t}\n\n\tbool doneNP = (!doneN) || (!doneP);\n\n\tif (!doneP) \n\t{\n\t\tposP.x += offNP.x * 3.0;\n\t}\n\n\tif (!doneP)\n\t{\n\t\tposP.y += offNP.y * 3.0;\n\t}\n\n vec4 t0 = texture2D(colorTexture, posN.xy, 0.0);\n vec4 t1 = texture2D(colorTexture, posN.xy, 0.0);\n\tif (doneNP)\n\t{\n\t\tif (!doneN) lumaEndN = FxaaLuma(t0);\n\t\tif (!doneP) lumaEndP = FxaaLuma(t1);\n\t\tif (!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n\t\tif (!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n\t\n\t\tdoneN = abs(lumaEndN) >= gradientScaled;\n\t\tdoneP = abs(lumaEndP) >= gradientScaled;\n\t\n\t\tif (!doneN) posN.x -= offNP.x * 12.0;\n\t\tif (!doneN) posN.y -= offNP.y * 12.0;\n\t\n\t\tdoneNP = (!doneN) || (!doneP);\n\t\n\t\tif (!doneP) posP.x += offNP.x * 12.0;\n\t\tif (!doneP) posP.y += offNP.y * 12.0;\n\t}\n\n\tfloat dstN = posM.x - posN.x;\n\tfloat dstP = posP.x - posM.x;\n\n\tif (!horzSpan)\n\t{\n\t\tdstN = posM.y - posN.y;\n\t}\n\tif (!horzSpan) \n\t{\n\t\tdstP = posP.y - posM.y;\n\t}\n\n\tbool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\n\tfloat spanLength = (dstP + dstN);\n\tbool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\n\tfloat spanLengthRcp = 1.0 / spanLength;\n\tbool directionN = dstN < dstP;\n\tfloat dst = min(dstN, dstP);\n\tbool goodSpan = directionN ? goodSpanN : goodSpanP;\n\tfloat subpixG = subpixF * subpixF;\n\tfloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\n\tfloat subpixH = subpixG * fxaaQualitySubpix;\n\tfloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\n\tfloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\n\n\tif (!horzSpan)\n\t{\n\t\tposM.x += pixelOffsetSubpix * lengthSign;\n\t}\n\n\tif (horzSpan)\n\t{\n\t\tposM.y += pixelOffsetSubpix * lengthSign;\n\t}\n\n#ifdef MALI\n\tif(range < rangeMaxClamped) \n\t{\n\t\tgl_FragColor = rgbyM;\n\t}\n\telse\n\t{\n\t\tgl_FragColor = texture2D(colorTexture, posM, 0.0);\n\t}\n#else\n\tgl_FragColor = texture2D(colorTexture, posM, 0.0);\n#endif\n}";function A$S(e){if(!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.terrainProvider))throw new t$16("options.terrainProvider is required.");if(!e$2b(e.imageryLayers))throw new t$16("options.imageryLayers is required.");if(!e$2b(e.surfaceShaderSet))throw new t$16("options.surfaceShaderSet is required.");this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=W$W.RECEIVE_ONLY,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._terrainLayers=e.terrainLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._pickRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new o$1h,this._imageryLayers.layerAdded.addEventListener(A$S.prototype._onLayerAdded,this),this._imageryLayers.layerRemoved.addEventListener(A$S.prototype._onLayerRemoved,this),this._imageryLayers.layerMoved.addEventListener(A$S.prototype._onLayerMoved,this),this._imageryLayers.layerShownOrHidden.addEventListener(A$S.prototype._onLayerShownOrHidden,this),this._imageryLayers.layerUpdate.addEventListener(A$S.prototype._onLayerUpdate,this),this._tileLoadedEvent=new o$1h,this._imageryLayersUpdatedEvent=new o$1h,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._pickCommands=[],this._usedDrawCommands=0,this._usedPickCommands=0,this._drawCommandsByTile={},this._modifyDrawCommandsByTile={},this._uniformMapsByTile={},this._modifyUniformMapsByTile={},this._modifyUsedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new e$1U(0,0,.5,1),this._clippingPlanes=void 0,this.cartographicLimitRectangle=h$18.clone(h$18.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._flattenTextureWidth=1024,this._flattenTexture=void 0,this._hypsometricSetting=void 0,this._hypsometricTexture=void 0,this._hypsometricRenderTexture=void 0,this._hypsometricRegion=void 0,this._hypsometricBound=new e$29,this._bUseHypColorTable=!1,this._bUseHypRegion=!1,this._hypsometricRegionUpdate=!1,this._hypAnalysisMode=k$Q.AnalysisRegionMode.ARM_NONE,this._hypMaxInstensity=e.MaxInstensity,this._hypMinInstensity=e.MinInstensity,this._hypMaxHeight=e.MaxHeight,this._hypMinHeight=e.MinHeight,this._hypUseColorByHeight=!0,this._geoBounds=new e$29,this._style3D=new e$1s,this._slopeSetting=void 0,this._slopeColorTexture=void 0,this._slopeArrowsTexture=void 0,this._slopePolygonTexture=void 0,this._slopeRegion=void 0,this._slopeBound=new e$29,this._bUseSlopeColorTable=!1,this._slopeRegionUpdate=!1,this._slopeAnalysisMode=k$Q.AnalysisRegionMode.ARM_NONE,this._slopeArrowUrl=n$15("Assets/Textures/arrow.png"),this._excavateRectangle=new h$18,this._clipRasterTilesMap={},this._modifyRegions=new e$1N,this._modifyTilesMap={},this._modifyRegionUpdate=!1,this.clippingType=R$J.KeepOutside,this._excavateRegions=new e$1N,this._excavateRegionUpdate=!1,this._extractRegions=new e$1N,this._extractRegionsUpdate=!1,this._imageryClipRegions=new e$1N,this._imageryClipRegionUpate=!1,this._oriClipPlane=[],this._clipPlane=[];for(var t=0;t<6;t++)this._clipPlane[t]=new e$29(0,0,0,0),this._oriClipPlane[t]=new e$29(0,0,0,0);this._clipMode=0,this._clipLineColor=new e$29(1,0,0,1),this._clipping=!1,this._splitDirection=new o$1o,this._cullEnabled=!0,this._rasterTextureSizes=[256,512],this._rasterLineWidth=1,this._rasterLineFBOs=[],this._rasterAAFBOs=[],this._rasterCurrentFBOIdx=0,this._lineExpandCommand=void 0,this._lineFXAACommand=void 0,this._swipeRegion=new e$29(0,0,1,1),this._swipeEnabled=!1,this._polygonOffset={enabled:!1,value:new o$1o(0,0)},this._excavateRegionCommands=new e$1N,this._pbrParameter=je$g.NONE,this._PBRMaterialParams={metallic:0,roughness:0,baseColorFactor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissionFactor:o$1p.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1},this._excavationSideTextureUrl=n$15("Assets/Textures/excavationregion_side.jpg"),this._excavationBottomTextureUrl=n$15("Assets/Textures/excavationregion_top.jpg")}function ba$2(e,t){var i=e.loadingImagery;e$2b(i)||(i=e.readyImagery);var n=t.loadingImagery;return e$2b(n)||(n=t.readyImagery),i.imageryLayer._layerIndex-n.imageryLayer._layerIndex}function Ba$3(e){var t=e.indexBuffer;e.destroy(),!t.isDestroyed()&&e$2b(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}function Sa$2(e,t){var i=t.creditDisplay;e._terrainProvider.ready&&e$2b(e._terrainProvider.credit)&&i.addCredit(e._terrainProvider.credit);for(var n=e._imageryLayers,r=0,o=n.length;r<o;++r){var a=n.get(r).imageryProvider;e$2b(a)&&a.ready&&e$2b(a.credit)&&i.addCredit(a.credit);var s=n.get(r).gridProvider;e$2b(s)&&s.ready&&e$2b(s.credit)&&i.addCredit(s.credit)}}function ii$3(e,t){var i=t.data.mesh;if(e$2b(i)&&!i.isModified){for(var n=e.context,r=i.encoding,o=i.vertices,a=(new o$1o,new o$1p),s=new o$1p,l=i.center,u=new a$18,c=i.stride,h=o.length,d=new Array(h/c),f=0;f<h;f+=c){var p=f/c;d[p]=o$1p.unpack(o,f,d[p]),d[p]=o$1p.add(d[p],l,d[p])}for(var _=t.rectangle.width/50,m=new Array(i.indices.length),g=(f=0,m.length);f<g;f++)m[f]=i.indices[f];var x=A$1g.computeSubdivision(t$13.WGS84,d,m,_,!0),v=x.attributes.position.values;h=v.length;var y=t.rectangle,$=y.width,b=y.height,T=new Float32Array(h/3*c),C=t$O.geodeticLatitudeToMercatorAngle(y.south),S=1/(t$O.geodeticLatitudeToMercatorAngle(y.north)-C),w=0;for(f=0;f<h;f+=3){o$1p.unpack(v,f,a),a$18.fromCartesian(a,void 0,u);var E=(u.longitude-y.west)/$,P=(u.latitude-y.south)/b,A={x:E=e$2a.clamp(E,0,1),y:P=e$2a.clamp(P,0,1)};o$1p.fromRadians(u.longitude,u.latitude,0,void 0,s);var L=(t$O.geodeticLatitudeToMercatorAngle(u.latitude)-C)*S;w=r.encode(T,w,a,A,u.height,new o$1o,L)}var M=new T$K;M.encoding=i.encoding,M.vertices=T,M.indices=new Uint16Array(x.indices),M.center=o$1p.clone(l),t.data.subDivisionMesh=M,t.data.subDivisionVertexArray=t.data.subDivisionVertexArray&&t.data.subDivisionVertexArray.destroy(),t.data.subDivisionVertexArray=v$C._createVertexArrayForMesh(n,t.data.subDivisionMesh),i.isModified=!0}}Object.defineProperties(A$S.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._baseColor=e,this._firstPassInitialColor=e$29.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._quadtree=e}},ready:{get:function(){return this._terrainProvider.ready&&(0===this._imageryLayers.length||this._imageryLayers.get(0).imageryProvider.ready)}},tilingScheme:{get:function(){return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},tileLoadedEvent:{get:function(){return this._tileLoadedEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){if(this._terrainProvider!==e||e._isSkirtDirty){if(!e$2b(e))throw new t$16("terrainProvider is required.");this._terrainProvider=e,this._terrainProvider instanceof se$q&&(this._terrainProvider._quadtree=this._quadtree),e$2b(this._quadtree)&&this._quadtree.invalidateAllTiles()}}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){h$K.setOwner(e,this,"_clippingPlanes")}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection.x=e.x,this._splitDirection.y=e.y}},excavationSideTextureUrl:{get:function(){return this._excavationSideTextureUrl},set:function(e){this._excavationSideTextureUrl=e}},excavationBottomTextureUrl:{get:function(){return this._excavationBottomTextureUrl},set:function(e){this._excavationBottomTextureUrl=e}}}),A$S.prototype.update=function(e){this._imageryLayers._update(),this.terrainProvider._isSkirtDirty&&(this.terrainProvider=this.terrainProvider,this.terrainProvider._isSkirtDirty=!1)},A$S.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile((function(e){e.data.imagery.sort(ba$2)}))),Sa$2(this,e);for(var t=this._vertexArraysToDestroy,i=t.length,n=0;n<i;++n)Ba$3(t[n]);t.length=0,e._quadtree=this._quadtree},A$S.prototype.beginUpdate=function(e){for(var t=this._tilesToRenderByTextureCount,i=0,n=t.length;i<n;++i){var r=t[i];e$2b(r)&&(r.length=0)}var o=this._clippingPlanes;e$2b(o)&&o.enabled&&o.update(e),this._usedDrawCommands=0,this._modifyUsedDrawCommands=0,this._drawCommands=[]},A$S.prototype.createTexture=function(e){if(e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:e,width:1024,height:64,pixelFormat:V$10.RGBA,flipY:!1}),e$2b(this._hypsometricSetting)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer})),e$2b(this._slopeColorTexture)||(this._slopeColorTexture=new t$V({context:e,width:1024,height:64,pixelFormat:V$10.RGBA,flipY:!1}),e$2b(this._slopeSetting)&&this._slopeColorTexture.copyFrom({width:1024,height:64,arrayBufferView:this._slopeSetting.ColorTable._imageBuffer})),!e$2b(this._slopeArrowsTexture)&&(this._slopeArrowsTexture=this._slopeArrowsTexture&&this._slopeArrowsTexture.destroy(),e$2b(this._slopeArrowUrl))){var t=this;o$1l(t$T(this._slopeArrowUrl),(function(i){t._slopeArrowUrl==t._slopeArrowUrl&&(t._slopeArrowsTexture=new t$V({context:e,source:i,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT})}))}))}},A$S.prototype.updateHypRegionFrameBuffer=function(e){if(this._hypsometricRegionUpdate){if(!e$2b(this._hypsometricRegion))return void(this._bUseHypRegion=!1);this._hypsometricRegionUpdate=!1,this._bUseHypRegion=!0,De$j(e.context,this._hypsometricRegion)}},A$S.prototype.updateSlopeRegionFrameBuffer=function(e){if(this._slopeRegionUpdate){if(!e$2b(this._slopeRegion))return void(this._bUseSlopeRegion=!1);this._slopeRegionUpdate=!1,this._bUseSlopeRegion=!0,De$j(e.context,this._slopeRegion)}},A$S.prototype.endUpdate=function(e){if(!e$2b(this._renderState)){this._renderState=d$1m.fromCache({cull:{enabled:this._cullEnabled},depthTest:{enabled:!0,func:re$E.LESS}}),this._blendRenderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:re$E.LESS_OR_EQUAL},blending:Ee$r.ALPHA_BLEND});let e=l$1g(this._renderState,!0);e.cull.enabled=!1,this._disableCullingRenderState=d$1m.fromCache(e),e=l$1g(this._blendRenderState,!0),e.cull.enabled=!1,this._disableCullingBlendRenderState=d$1m.fromCache(e)}if(e._fboState.frameBufferType!=Qe$c.CLAMP){this.createTexture(e.context),this.updateHypRegionFrameBuffer(e),this.updateSlopeRegionFrameBuffer(e),this._updateExcavateRegions(e),this._updateModifyRegions(e),this._updateImageryClipRegions(e),this._updateExtractRegions(e),tn$3(this,e),an$2(this,e),e.rasterLineWidth>1&&e$2b(e.commandListRealtimeRaster)&&e.commandListRealtimeRaster.length>0&&(en$2(this,e),rn$2(this,e)),this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&!1!==this.terrainProvider.isShowGlobe&&Q$J.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);for(var t=0,i=this._tilesToRenderByTextureCount,n=0,r=i.length;n<r;++n){var o=i[n];if(e$2b(o)){var a=0;o.length>0&&(a=o[o.length-1]._level);for(var s=0,l=o.length;s<l;++s){o[s].realtimeRasterVectors(e,this),o[s].renderVectorBy2DCanvas(e,this);var u=o[s],c=u.data.tileBoundingRegion;if(u.data.terrainState!==Le$m.INVALID){u.rasterClipRegion(e,this),e$2b(u.data.modifyTerrainVertexArray)&&(!e._fboState.enabled||e._fboState.name.indexOf("_excavationGlobeHeight2")>-1)&&(nr$6(this,u,void 0,a,e,!0),ii$3(e,u));for(var h=void 0,d=!1,f=e.camera._scene.terrainLayers._layers,p=1;p<f.length;p++){var _=f[p]._terrainProvider.tablename,m=u.data.terrain[_];if(e$2b(m)){if(e$2b(m.terrainData)&&e$2b(m.terrainData.hasInvalid)){if(!m.terrainData.hasInvalid){e$2b(m.terrainData)&&e$2b(m.vertexArray)&&e$2b(m.mesh)&&(u.data.terrainData=m.terrainData,u.data.vertexArray=m.vertexArray,u.data.mesh=m.mesh);break}d=!0}nr$6(this,u,m,a,e,!1,h),e$2b(m)&&(e$2b(m.mesh)&&!m.mesh.invalid&&e$2b(m.vertexArray)?(m.realtimeRasterValidTerrain(e,this,u),h=m._rasterTerrainTexture):h=void 0)}}d&&ii$3(e,u),nr$6(this,u,void 0,a,e,!1,h),e$2b(u.data)&&e$2b(u.data.terrainData)&&e$2b(u.data.terrainData._maximumHeight)&&e$2b(u.data.terrainData._minimumHeight)&&(0==s?t=.5*(u.data.terrainData._maximumHeight+u.data.terrainData._minimumHeight):t+=.5*(u.data.terrainData._maximumHeight+u.data.terrainData._minimumHeight))}e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,c.minimumHeight)}l>1&&(t/=l,e.averageTerrainHeight=t)}}if(e.commandListRealtimeRaster.length=0,!e.camera.bReflect)for(var g in this._excavateRegionCommands._hash)if((e$2b(this._excavationSideTextureUrl)||!(g.indexOf("side")>-1))&&(e$2b(this._excavationBottomTextureUrl)||!(g.indexOf("bottom")>-1))){var x=this._excavateRegionCommands._hash[g];e.commandList.push(x)}if(this._clipping){var v=e.camera.inverseViewMatrix,y=new p$1d;p$1d.transpose(v,y);for(p=0;p<6;p++)p$1d.multiplyByVector(y,this._oriClipPlane[p],this._clipPlane[p])}}},A$S.prototype.updateForPick=function(e){for(var t=this._drawCommands,i=0,n=this._usedDrawCommands;i<n;++i)e.commandList.push(t[i])},A$S.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()},A$S.prototype.getLevelMaximumGeometricError=function(e){return this._terrainProvider.getLevelMaximumGeometricError(e)},A$S.prototype.loadTile=function(e,t){var i=t.parent,n=t.data;if(e$2b(i)&&e$2b(i.data)&&i.data.terrainState===Le$m.INVALID)return n.terrainState=Le$m.INVALID,void(t.state=re$z.DONE);var r,o=!0;e$2b(n)&&(o=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===D$J.CULLED_BUT_NEEDED,r=n.terrainState),v$C.processStateMachine(t,e,this.terrainProvider,this._terrainLayers,this._imageryLayers,this._vertexArraysToDestroy,o),n=t.data,o&&r!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)&&n.boundingVolumeSourceTile===t&&(o=!1,v$C.processStateMachine(t,e,this.terrainProvider,this._terrainLayers,this._imageryLayers,this._vertexArraysToDestroy,o)),t.renderable&&this._tileLoadedEvent.raiseEvent(t)};var La$3=new i$1c,ai$4=new h$18,Ea$3=new h$18,Fa$3=new a$18;function ir$5(e,t){if(t.west<t.east)return t;var i=h$18.clone(t,Ea$3);return h$18.center(e,Fa$3).longitude>0?i.east=e$2a.PI:i.west=-e$2a.PI,i}A$S.prototype.computeTileVisibility=function(e,t,i){var n=this.computeDistanceToTile(e,t);if(e._distance=n,t.fog.enabled&&e$2a.fog(n,t.fog.density)>=1)return fe$n.NONE;var r=e.data,o=r.tileBoundingRegion;if(void 0===r.boundingVolumeSourceTile)return fe$n.PARTIAL;var a=t.cullingVolume,s=u$_(r.modifyOrientedBoundingBox,r.orientedBoundingBox);if(!e$2b(s)&&e$2b(r.renderedMesh))for(var l in s=r.renderedMesh.boundingSphere3D,r.terrain)s=i$1c.union(e,r.terrain[l].mesh.boundingSphere3D,s,s);r.clippedByBoundaries=!1;var u=ir$5(e.rectangle,this.cartographicLimitRectangle),c=h$18.simpleIntersection(u,e.rectangle,ai$4);if(!e$2b(c))return fe$n.NONE;if(h$18.equals(c,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==C$13.SCENE3D)for(var l in s=La$3,i$1c.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,o.minimumHeight,o.maximumHeight,s),o$1p.fromElements(s.center.z,s.center.x,s.center.y,s.center),t.mode===C$13.MORPHING&&e$2b(r.renderedMesh)&&(s=i$1c.union(r.renderedMesh.boundingSphere3D,s,s)),r.terrain)s=i$1c.union(e,r.terrain[l].mesh.boundingSphere3D,s,s);var h=this._clippingPlanes;if(e$2b(h)&&h.enabled&&e$2b(s)){var d=h.computeIntersectionWithBoundingVolume(s);if(e.isClipped=d!==Ae$u.INSIDE,d===Ae$u.OUTSIDE)return fe$n.NONE}var f=Ae$u.INTERSECTING;if(e$2b(s)){if((f=a.computeVisibility(s))===Ae$u.OUTSIDE)for(var l in r.terrain)if(e$2b(s=r.terrain[l].orientedBoundingBox)||(s=r.tileTerrainOrientedBoundingBox),e$2b(s)&&(f=a.computeVisibility(s))!==Ae$u.OUTSIDE)break;if(f===Ae$u.OUTSIDE)return e$2b(e.parent)&&e$2b(e.parent.data.modifyOrientedBoundingBox)?a.computeVisibility(e.parent.data.modifyOrientedBoundingBox):fe$n.NONE}if(e.isModified)return f;var p=t.mode===C$13.SCENE3D&&t.camera.frustum instanceof a$V;if(t.mode===C$13.SCENE3D&&!p&&e$2b(i)){var _=r.occludeePointInScaledSpace;return!e$2b(_)||i.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(_,o.minimumHeight)?f:fe$n.NONE}return f},A$S.prototype.canRefine=function(e){return!!e$2b(e.data.terrainData)||void 0!==this.terrainProvider.getTileDataAvailable(2*e.x,2*e.y,e.level+1)};var Da$3=[],Ia$3=[];A$S.prototype.canRenderWithoutLosingDetail=function(e,t){var i=e.data,n=Da$3;n.length=this._imageryLayers.length;var r,o,a,s=!1,l=!1;for(e$2b(i)&&(s=i.terrainState===Le$m.READY,l=!0,r=i.imagery),o=0,a=n.length;o<a;++o)n[o]=l;if(e$2b(r))for(o=0,a=r.length;o<a;++o){var u=r[o];if(!e$2b(u.imageryLayer)){var c=u.loadingImagery,h=!e$2b(c)||c.state===wt$6.FAILED||c.state===wt$6.INVALID,d=(u.loadingImagery||u.readyImagery).imageryLayer._layerIndex;n[d]=h&&n[d]}}var f=this.quadtree._lastSelectionFrameNumber,p=Ia$3;for(p.length=0,p.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);p.length>0;){var _=p.pop(),m=_._lastSelectionResultFrame===f?_._lastSelectionResult:D$J.NONE;if(m===D$J.RENDERED){if(!e$2b(_.data))continue;if(!s&&_.data.terrainState===Le$m.READY)return!1;var g=_.data.imagery;for(o=0,a=g.length;o<a;++o){var x=g[o];if(!e$2b(x.imageryLayer)){var v=x.loadingImagery,y=!e$2b(v)||v.state===wt$6.FAILED||v.state===wt$6.INVALID,$=(x.loadingImagery||x.readyImagery).imageryLayer._layerIndex;if(y&&!n[$])return!1}}}else m===D$J.REFINED&&p.push(_.southwestChild,_.southeastChild,_.northwestChild,_.northeastChild)}return!0};var Ha$2=new o$1p;A$S.prototype.computeTileLoadPriority=function(e,t){var i=e.data;if(void 0===i)return 0;var n=i.orientedBoundingBox;if(void 0===n)return 0;var r=t.camera.positionWC,o=t.camera.directionWC,a=o$1p.subtract(n.center,r,Ha$2),s=o$1p.magnitude(a);return s<e$2a.EPSILON5?0:(o$1p.divideByScalar(a,s,a),(1-o$1p.dot(a,o))*e._distance)};var ni$4=new p$1d,At$5=new p$1d,Ma$3=new e$29,Ua$3=new e$29,Va$2=new o$1p,oi$3=new o$1p,Na$1=new o$1p,Oa$2=new o$1p,Fe$h=new o$1p;A$S.prototype.showTileThisFrame=function(e,t){for(var i=0,n=e.data.imagery,r=0,o=n.length;r<o;++r){var a=n[r];e$2b(a.readyImagery)&&0!==a.readyImagery.imageryLayer.alpha&&++i}var s=this._tilesToRenderByTextureCount[i];e$2b(s)||(s=[],this._tilesToRenderByTextureCount[i]=s),s.push(e),e$2b(e.data.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;var l=this._debug;++l.tilesRendered,l.texturesRendered+=i};var za$3=[new o$1p,new o$1p,new o$1p,new o$1p];function Ga$3(e,t,i,n,r,o){var a=e.quadtree._occluders.ellipsoid,s=a.ellipsoid,l=za$3;return o$1p.fromRadians(i.west,i.south,r,s,l[0]),o$1p.fromRadians(i.east,i.south,r,s,l[1]),o$1p.fromRadians(i.west,i.north,r,s,l[2]),o$1p.fromRadians(i.east,i.north,r,s,l[3]),a.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,n,o)}function Wa$2(e,t,i){var n=e.data;void 0===n&&(n=e.data=new v$C),void 0===n.tileBoundingRegion&&(n.tileBoundingRegion=new y$K({computeBoundingVolumes:t._enablePrjArea,rectangle:e.rectangle,ellipsoid:e.tilingScheme.ellipsoid,minimumHeight:0,maximumHeight:.1}));var r=n.terrainData,o=n.mesh,a=n.tileBoundingRegion,s=!1;for(var l in void 0!==o&&void 0!==o.minimumHeight&&void 0!==o.maximumHeight?(a.minimumHeight=o.minimumHeight,a.maximumHeight=o.maximumHeight,s=!0):void 0!==r&&void 0!==r._minimumHeight&&void 0!==r._maximumHeight?(a.minimumHeight=r._minimumHeight*i.terrainExaggeration,a.maximumHeight=r._maximumHeight*i.terrainExaggeration,s=!0):e.showInvalid&&(a.minimumHeight=0,a.maximumHeight=0,s=!0),n.terrain)e$2b(n.terrain[l].mesh)?(a.minimumHeight=Math.min(n.terrain[l].mesh.minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(n.terrain[l].mesh.maximumHeight,a.maximumHeight)):e$2b(n.terrain[l].terrainData)?(a.minimumHeight=Math.min(n.terrain[l].terrainData._minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(n.terrain[l].terrainData._maximumHeight,a.maximumHeight)):s=!1;if(s)return e;a.minimumHeight=Number.NaN,a.maximumHeight=Number.NaN;for(var u=e.parent;void 0!==u;){var c=u.data;if(void 0!==c){var h=c.mesh;if(void 0!==h&&void 0!==h.minimumHeight&&void 0!==h.maximumHeight)a.minimumHeight=h.minimumHeight,a.maximumHeight=h.maximumHeight,s=!0;else{var d=c.terrainData;void 0!==d&&void 0!==d._minimumHeight&&void 0!==d._maximumHeight&&(a.minimumHeight=d._minimumHeight*i.terrainExaggeration,a.maximumHeight=d._maximumHeight*i.terrainExaggeration,s=!0)}for(var l in c.terrain)e$2b(c.terrain[l].mesh)?(a.minimumHeight=Math.min(c.terrain[l].mesh.minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(c.terrain[l].mesh.maximumHeight,a.maximumHeight)):e$2b(c.terrain[l].terrainData)?(a.minimumHeight=Math.min(c.terrain[l].terrainData._minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(c.terrain[l].terrainData._maximumHeight,a.maximumHeight)):s=!1;if(s)return u}u=u.parent}}function si$3(e,t,i){return function(n){var r,o,a,s=-1,l=n.data.imagery,u=l.length;for(a=0;a<u;++a)if((o=u$_((r=l[a]).readyImagery,r.loadingImagery)).imageryLayer===t){s=a;break}if(-1!==s){var c=s+e;if(o=e$2b(r=l[c])?u$_(r.readyImagery,r.loadingImagery):void 0,!e$2b(o)||o.imageryLayer!==t)return!t._createTileImagerySkeletons(n,i,c);for(a=s;a<c;++a)l[a].freeResources();l.splice(s,e)}return!0}}A$S.prototype.computeDistanceToTile=function(e,t){var i=Wa$2(e,this.terrainProvider,t),n=e.data,r=n.tileBoundingRegion;if(void 0===i)return 9999999999;n.boundingVolumeSourceTile!==i&&(n.boundingVolumeSourceTile=i,e$2b(e.rectangle)&&(n.orientedBoundingBox=y$Z.fromRectangle(e.rectangle,r.minimumHeight,r.maximumHeight,e.tilingScheme.ellipsoid,n.orientedBoundingBox),n.occludeePointInScaledSpace=Ga$3(this,n.orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,n.occludeePointInScaledSpace),n.tileTerrainOrientedBoundingBox=new y$Z(n.orientedBoundingBox.center,n.orientedBoundingBox.halfAxes)));var o=r.minimumHeight,a=r.maximumHeight;if(n.boundingVolumeSourceTile!==e){var s=t.camera.positionCartographic.height;Math.abs(s-o)>Math.abs(s-a)?(r.minimumHeight=o,r.maximumHeight=o):(r.minimumHeight=a,r.maximumHeight=a)}var l=r.distanceToCamera(t);return r.minimumHeight=o,r.maximumHeight=a,l},A$S.prototype._onLayerAdded=function(e,t){e.show&&(this._terrainProvider,this._imageLayerAdded(e,t),this._gridLayerAdded(e,t))},A$S.prototype._onLayerRemoved=function(e,t){e$2b(e.imageryProvider)&&(this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.imagery,n=-1,r=0,o=0,a=i.length;o<a;++o){var s=i[o],l=s.loadingImagery;if(e$2b(l)||(l=s.readyImagery),l.imageryLayer===e)-1===n&&(n=o),s.freeResources(),++r;else if(-1!==n)break}-1!==n&&i.splice(n,r)})),e$2b(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()),e$2b(e.gridProvider)&&(this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.gridImagery,n=-1,r=0,o=0,a=i.length;o<a;++o){var s=i[o],l=s.loadingGrid;if(e$2b(l)||(l=s.readyGrid),l.gridLayer===e)-1===n&&(n=o),s.freeResources(),++r;else if(-1!==n)break}-1!==n&&i.splice(n,r)})),e$2b(e.gridProvider)&&(e.gridProvider._reload=void 0))},A$S.prototype._onLayerMoved=function(e,t,i){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()},A$S.prototype._onLayerShownOrHidden=function(e,t,i){i?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)},A$S.prototype._imageLayerAdded=function(e,t){var i=this._terrainProvider,n=this,r=e.imageryProvider;if(e$2b(r)){var o=this._imageryLayersUpdatedEvent;r._reload=function(){e._imageryCache={},n._quadtree.forEachLoadedTile((function(t){if(!e$2b(t._loadedCallbacks[e._layerIndex])){var n,r=t.data.imagery,o=r.length,a=-1,s=0;for(n=0;n<o;++n){var l=r[n];if(u$_(l.readyImagery,l.loadingImagery).imageryLayer===e)-1===a&&(a=n),++s;else if(-1!==a)break}if(-1!==a){var u=a+s;e._createTileImagerySkeletons(t,i,u)&&(t._loadedCallbacks[e._layerIndex]=si$3(s,e,i),t.state=re$z.LOADING)}}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=re$z.LOADING,0!==t.level&&(t._lastSelectionResultFrame!==n.quadtree._lastSelectionFrameNumber||t._lastSelectionResult!==D$J.RENDERED)&&(t.renderable=!1))})),this._layerOrderChanged=!0,o.raiseEvent()}},A$S.prototype._gridLayerAdded=function(e,t){var i=this._terrainProvider,n=this,r=e.gridProvider;if(e$2b(r)){var o=this._imageryLayersUpdatedEvent;r._reload=function(){e._gridCache={},n._quadtree.forEachLoadedTile((function(t){if(!e$2b(t._loadedCallbacks[e._layerIndex])){var n,r=t.data.gridImagery,o=r.length,a=-1,s=0;for(n=0;n<o;++n){var l=r[n];if(u$_(l.readyGrid,l.loadingGrid).gridLayer===e)-1===a&&(a=n),++s;else if(-1!==a)break}if(-1!==a){var u=a+s;e._createTileImagerySkeletons(t,i,u)&&(t._loadedCallbacks[e._layerIndex]=si$3(s,e,i),t.state=re$z.LOADING)}}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=re$z.LOADING,0!==t.level&&(t._lastSelectionResultFrame!==n.quadtree._lastSelectionFrameNumber||t._lastSelectionResult!==D$J.RENDERED)&&(t.renderable=!1))})),this._layerOrderChanged=!0,o.raiseEvent()}},A$S.prototype._onLayerUpdate=function(e,t){e$2b(e.gridProvider)&&(this._quadtree.forEachLoadedTile((function(e){e.data.gridImagery.length>0&&(e.state=re$z.LOADING)})),e._isUpdate=!1)};var ka$2=new p$1d,je$b=new e$29,ui$5,di$5,Ct$5;function qa$3(e,t){var i={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){var t=e.context.uniformState.view;Fe$h=o$1p.subtract(this.properties.rtc,e.context.relativeOrigin,Fe$h);var i=p$1d.multiplyByPoint(t,Fe$h,oi$3);return p$1d.setTranslation(t,i,ni$4),ni$4},u_modifiedModelViewProjection:function(){var t=e.context.uniformState.view,i=e.context.uniformState.projection;Fe$h=o$1p.subtract(this.properties.rtc,e.context.relativeOrigin,Fe$h);var n=p$1d.multiplyByPoint(t,Fe$h,oi$3);return p$1d.setTranslation(t,n,At$5),p$1d.multiply(i,At$5,At$5),At$5},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureSize:function(){return this.properties.dayTextureSize},u_transparentBackColor:function(){return this.properties.transparentBackColor},u_imageryClipEnable:function(){return this.properties.imageryClipEnable},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureFlipY:function(){return this.properties.dayTextureFlipY},u_dayTextureAlpha:function(){var e=this.properties.morphingParentIndex;if(e>0){this.properties.morphingBeginTime<0&&(this.properties.morphingBeginTime=performance.now());var t=(performance.now()-this.properties.morphingBeginTime)/1e3;t=Math.min(t,1),this.properties.dayTextureAlpha[e]=1-t}return this.properties.dayTextureAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureSwipeRegion:function(){return this.properties.dayTextureSwipeRegion},u_normalTexture:function(){return this.properties.normalTexture?this.properties.normalTexture:e.context.defaultTexture},u_useNormalTexture:function(){return e$2b(this.properties.normalTexture)?1:0},u_normalTextureTranslationAndScale:function(){return this.properties.normalTextureTranslationAndScale},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){var i=t._clippingPlanes;return e$2b(i)&&e$2b(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){var i=t._clippingPlanes;return e$2b(i)?p$1d.multiply(e.context.uniformState.view,i.modelMatrix,ka$2):p$1d.IDENTITY},u_clippingPlanesEdgeStyle:function(){var e=this.properties.clippingPlanesEdgeColor;return e.alpha=this.properties.clippingPlanesEdgeWidth,e},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_GlobeSplitDirection:function(){return this.properties.globeSplitDirection},u_GlobeSwipeRegion:function(){return je$b.x=this.properties.globeSwipeRegion.x*e.context.drawingBufferWidth,je$b.y=(1-this.properties.globeSwipeRegion.y)*e.context.drawingBufferHeight,je$b.z=this.properties.globeSwipeRegion.z*e.context.drawingBufferWidth,je$b.w=(1-this.properties.globeSwipeRegion.w)*e.context.drawingBufferHeight,je$b},u_polygonOffset:function(){return this.properties.polygonOffset},uHypContourFillMode:function(){return this.properties.hypContourFillMode},uHypContourInterval:function(){return this.properties.hypContourInterval},uHypFloor:function(){return this.properties.hypFloor},uHypCeil:function(){return this.properties.hypCeil},uHypOpacity:function(){return this.properties.hypOpacity},uHypLineColor:function(){return this.properties.hypLineColor},uHypsometricTexture:function(){return this.properties.hypsometricTexture},uHypsometricRenderTexture:function(){return this.properties.hypsometricRenderTexture},uHypHasAnalysisRegion:function(){return this.properties.hypHasAnalysisRegion},uHypRect:function(){return this.properties.hypRect},uHypMaxVisibleValue:function(){return this.properties.hypMaxVisibleValue},uHypMinVisibleValue:function(){return this.properties.hypMinVisibleValue},uHypHasColorTable:function(){return this.properties.hypHasColorTable},uSlopeFillMode:function(){return this.properties.slopeFillMode},uSlopeRect:function(){return this.properties.slopeRect},uSlopeFloor:function(){return this.properties.slopeFloor},uSlopeCeil:function(){return this.properties.slopeCeil},uSlopeOpacity:function(){return this.properties.slopeOpacity},uSlopeColorTexture:function(){return this.properties.slopeColorTexture},uSlopePolygonTexture:function(){return this.properties.slopePolygonTexture},uSlopeArrowsTexture:function(){return this.properties.slopeArrowsTexture},uHasSlopeRegion:function(){return this.properties.hasSlopeRegion},uSlopeMaxVisibleValue:function(){return this.properties.slopeMaxVisibleValue},uSlopeMinVisibleValue:function(){return this.properties.slopeMinVisibleValue},uSlopeHasColorTable:function(){return this.properties.slopeHasColorTable},uLevel:function(){return this.properties.level},uTopLevel:function(){return this.properties.topLevel},clip_mode:function(){return this.properties.clip_mode},clip_planes:function(){return this.properties.clip_planes},clip_line_color:function(){return this.properties.clip_line_color},flattenTexture:function(){return this.properties.flattenTexture},uTileBounds:function(){return this.properties.tileBounds},u_gridTextures:function(){return this.properties.gridTextures},u_gridTextureTranslationAndScale:function(){return this.properties.gridTextureTranslationAndScale},u_gridTextureUseWebMercatorT:function(){return this.properties.gridTextureUseWebMercatorT},u_gridTextureTexCoordsRectangle:function(){return this.properties.gridTextureTexCoordsRectangle},uModifyRasterTexture:function(){return this.properties.modifyRasterTexture},uParentMixDirection:function(){return this.properties.parentMixDirection},uBaseColorFactor:function(){return this.properties.baseColorFactor},uMetallicFactor:function(){return this.properties.metallic},uRoughnessFactor:function(){return this.properties.roughness},uEmissionFactor:function(){return this.properties.emissionFactor},uFloodTexture:function(){return this.properties.floodTexture},uFloodRect:function(){return this.properties.floodRect},u_sunLightColor:function(){return this.properties.sunLightColor},u_ambientLightColor:function(){return this.properties.ambientLightColor},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},properties:{tileUBO:new _0x55856b(e.context),initialColor:new e$29(0,0,.5,1),fillHighlightColor:new e$1U(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new o$1o(65e5,9e6),nightFadeDistance:new o$1o(1e7,4e7),hsbShift:new o$1p,center3D:void 0,rtc:new o$1p,modifiedModelView:new p$1d,tileRectangle:new e$29,dayTextures:[],dayTextureTranslationAndScale:[],dayTextureSize:[],transparentBackColor:[],imageryClipEnable:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureFlipY:[],dayTextureAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureSwipeRegion:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new o$1o,southMercatorYAndOneOverHeight:new o$1o,waterMask:void 0,waterMaskTranslationAndScale:new e$29,minMaxHeight:new o$1o,scaleAndBias:new p$1d,clippingPlanesEdgeColor:e$1U.clone(e$1U.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new e$29,normalTexture:void 0,normalTextureTranslationAndScale:new e$29,tileBounds:new e$29,hypContourFillMode:0,uHypContourInterval:0,hypFloor:0,hypCeil:0,hypOpacity:1,hypLineColor:new e$1U,hypsometricTexture:void 0,hypsometricRenderTexture:void 0,hypHasAnalysisRegion:new e$29,hypRect:new e$29,hypMaxVisibleValue:0,hypMinVisibleValue:0,hypHasColorTable:!1,slopeFillMode:0,slopeRect:new e$29,slopeFloor:0,slopeCeil:0,slopeOpacity:1,slopeColorTexture:void 0,slopePolygonTexture:void 0,slopeArrowsTexture:void 0,hasSlopeRegion:!1,slopeMaxVisibleValue:0,slopeMinVisibleValue:0,slopeHasColorTable:!1,level:0,topLevel:0,clip_mode:0,clip_planes:void 0,clip_line_color:new e$1U,flattenTexture:void 0,gridTextures:[],gridTextureTranslationAndScale:[],gridTextureTexCoordsRectangle:[],gridTextureUseWebMercatorT:[],modifyRasterTexture:void 0,morphingParentIndex:-1,morphingBeginTime:-1,parentMixDirection:0,baseColorFactor:new e$29(1,1,1,1),metallic:0,roughness:0,emissionFactor:o$1p.UNIT_XYZ,floodRect:new e$29,floodTexture:void 0,sunLightColor:new e$1U,ambientLightColor:new e$1U,frontFaceAlphaByDistance:new e$29,backFaceAlphaByDistance:new e$29}};return i}function Ya$3(e,t,i){var n,r,o=i.data;if(e$2b(o.vertexArray)?(n=o.mesh,r=o.vertexArray):e$2b(o.fill)&&e$2b(o.fill.vertexArray)&&(n=o.fill.mesh,r=o.fill.vertexArray),e$2b(n)&&e$2b(r)){if(e$2b(o.wireframeVertexArray)){if(o.wireframeVertexArray.mesh===n)return;o.wireframeVertexArray.destroy(),o.wireframeVertexArray=void 0}o.wireframeVertexArray=Xa$3(e,r,n),o.wireframeVertexArray.mesh=n}}function Xa$3(e,t,i){var n={indices:i.indices,primitiveType:W$18.TRIANGLES};k$13.toWireframe(n);var r=n.indices,o=t$Y.createIndexBuffer({context:e,typedArray:r,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new c$12({context:e,attributes:t._attributes,indexBuffer:o})}!function(){var e,t,i=new d$1o({geometry:o$17.fromDimensions({dimensions:new o$1p(2,2,2)})}),n=new d$1o({geometry:new a$U({radius:1})}),r=new p$1d;function o(e){return new y$S({geometryInstances:e,appearance:new t$R({translucent:!1,flat:!0}),asynchronous:!1})}ui$5=function(n,a){return n===e||(Ct$5(),e=n,r=p$1d.fromRotationTranslation(n.halfAxes,n.center,r),i.modelMatrix=r,i.attributes.color=o$16.fromColor(a),t=o(i)),t},di$5=function(i,a){return i===e||(Ct$5(),e=i,r=p$1d.fromTranslation(i.center,r),r=p$1d.multiplyByUniformScale(r,i.radius,r),n.modelMatrix=r,n.attributes.color=o$16.fromColor(a),t=o(n)),t},Ct$5=function(){e$2b(t)&&(t.destroy(),t=void 0,e=void 0)}}();var Qa$3=new e$29(0,0,0,0),Ka$3={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applySplit:void 0,applySwipe:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,numberOfGridTextures:void 0,gridUpdate:!1};function Za$3(e,t){const i=t.globeTranslucencyState;if(i.translucent){const n=e.renderState.blending.enabled;i.pushDerivedCommands(e,n,t)}else t.commandList.push(e)}var Je$6=new e$29;function nr$6(e,t,i,n,r,o,a){var s=t.data;if(s.terrainState===Le$m.INVALID||!1===e.terrainProvider.isShowGlobe&&(!e$2b(s.mesh)||s.mesh.invalid)||e$2b(i)&&(!e$2b(i.mesh)||i.mesh.invalid||!e$2b(i.vertexArray))||!e$2b(s.vertexArray)&&(void 0===s.fill&&(s.fill=new Q$J(t)),s.fill.update(e,r),!e$2b(t.data.fill.vertexArray)))return;var l=r.creditDisplay,u=s.terrainData;if(e$2b(i))u=i.terrainData;if(e$2b(u)&&e$2b(u.credits))for(var c=u.credits,h=0,d=c.length;h<d;++h)l.addCredit(c[h]);var f=e$1T.maximumTextureImageUnits,p=s.waterMaskTexture,_=s.waterMaskTranslationAndScale;!e$2b(p)&&e$2b(s.fill)&&(p=s.fill.waterMaskTexture,_=s.fill.waterMaskTranslationAndScale);const m=r.cameraUnderground,g=r.globeTranslucencyState,x=g.translucent,v=g.frontFaceAlphaByDistance,y=g.backFaceAlphaByDistance;g.rectangle;var $=e.hasWaterMask&&e$2b(p),b=e.oceanNormalMap,T=$&&e$2b(b),C=e.terrainProvider.ready&&e.terrainProvider.hasVertexNormals,S=e$2b(e._PBRMaterialParams)&&e._PBRMaterialParams.roughness>0,w=r.fog.enabled,E=e.showGroundAtmosphere,P=W$W.castShadows(e.shadows)&&!x,A=W$W.receiveShadows(e.shadows)&&!x,L=e.hueShift,M=e.saturationShift,R=e.brightnessShift,I=!(e$2a.equalsEpsilon(L,0,e$2a.EPSILON7)&&e$2a.equalsEpsilon(M,0,e$2a.EPSILON7)&&e$2a.equalsEpsilon(R,0,e$2a.EPSILON7)),O=!1;if(E){var D,B=r.mode,N=r.camera;D=B===C$13.SCENE2D||B===C$13.COLUMBUS_VIEW?N.positionCartographic.height:o$1p.magnitude(N.positionWC);var F=e.nightFadeOutDistance;B!==C$13.SCENE3D&&(F-=r.mapProjection.ellipsoid.maximumRadius),O=D>F}var U=s.normalTexture,z=e$2b(U),G=e$2b(e._slopeSetting)&&e._slopeSetting.DisplayMode!==_0x256766.DisplayMode.NONE&&e._bUseSlopeColorTable,V=e$2b(e._hypsometricSetting)&&e._hypsometricSetting.DisplayMode!==k$Q.DisplayMode.NONE&&e._bUseHypColorTable,k=e$2b(r.camera._scene.globe._floodFlagTexture);$&&--f,T&&--f,z&&--f,G&&(f-=3),V&&(f-=2),r.shadowMaps.length>0&&--f,k&&--f;var W=!o&&t._clipRegionRasterized&&t.isModified,H=!o&&t._clipRegionRasterized&&(e._excavateRegions.length>0||e._extractRegions.length>0),q=!o&&t._clipRegionRasterized&&e._extractRegions.length>0,j=!o&&t._clipRegionRasterized&&!t.isModified&&e._imageryClipRegions.length>0,Y=!o&&G&&!t.isModified&&e$2b(e._slopeRegion),X=!o&&V&&!t.isModified&&e$2b(e._hypsometricRegion)&&e$2b(t._clipRasterTexture),K=!1,Q=!1;H&&-1===r._fboState.name.indexOf("_excavationGlobeHeight")&&(--f,K=e.clippingType===R$J.KeepOutside,Q=e.clippingType===R$J.KeepInside),W||(W=!e$2b(i)&&e$2b(a)),K||(K=!e$2b(i)&&e$2b(a)),j&&--f;var Z=o?s.modifyTerrainMesh:s.renderedMesh;e$2b(i)&&i.mesh&&(Z=i.mesh);var J=Z.center,ee=Z.encoding,te=Ma$3,ie=0,ne=0,re=0,oe=0,ae=!1;if(r.mode!==C$13.SCENE3D){var se=r.mapProjection,le=se.project(h$18.southwest(t.rectangle),Na$1),ue=se.project(h$18.northeast(t.rectangle),Oa$2);if(te.x=le.x,te.y=le.y,te.z=ue.x,te.w=ue.y,r.mode!==C$13.MORPHING&&((J=Va$2).x=0,J.y=.5*(te.z+te.x),J.z=.5*(te.w+te.y),te.x-=J.y,te.y-=J.z,te.z-=J.y,te.w-=J.z),r.mode===C$13.SCENE2D&&ee.quantization===me$p.BITS12){var ce=1/(Math.pow(2,12)-1)*.5,he=(te.z-te.x)*ce,de=(te.w-te.y)*ce;te.x-=he,te.y-=de,te.z+=he,te.w+=de}se instanceof t$O&&(ie=t.rectangle.south,ne=t.rectangle.north,re=t$O.geodeticLatitudeToMercatorAngle(ie),oe=1/(t$O.geodeticLatitudeToMercatorAngle(ne)-re),ae=!0)}var fe=Ka$3;fe.frameState=r,fe.surfaceTile=s,fe.showReflectiveOcean=$,fe.showOceanWaves=T,fe.enableLighting=e.enableLighting,fe.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,fe.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,fe.showGroundAtmosphere=E,fe.perFragmentGroundAtmosphere=O,fe.hasVertexNormals=C,fe.hasRoughness=S,fe.useWebMercatorProjection=ae,fe.clippedByBoundaries=s.clippedByBoundaries,fe.applyModify=W,fe.applyExtract=q,fe.excavationRegion=K,fe.excavationOuter=Q;var pe=s.imagery,_e=[];if(t._useParentImage){pe=[];for(var me=0;me<s.imagery.length;me++){var ge=!1,xe=s.imagery[me].readyImagery;if(e$2b(xe)&&xe.imageryLayer.featherEdgesEnabled){var ve=t.parent;if(e$2b(ve))for(var ye=xe.imageryLayer.imageryProvider.tablename,$e=0;$e<ve.data.imagery.length;$e++){var be=ve.data.imagery[$e],Te=be.readyImagery;if(e$2b(Te))if((wt=Te.imageryLayer).imageryProvider.tablename===ye){_e[me]=wt._calculateTextureTranslationAndScale(t,be),pe.push(be),ge=!0;break}}}ge||pe.push(s.imagery[me])}}var Ce=0,Se=0,we=pe.length,Ee=s.gridImagery,Pe=Ee.length,Ae=[],Le=[],Me=[];e$2b(t._rasterTexture)&&(Ae.push(t._rasterTexture),Le.push(new e$29(0,0,0,0)),Me.push(1),we+=1),e$2b(t._2DRasterTexture)&&(Ae.push(t._2DRasterTexture),Le.push(new e$29(0,0,0,.1)),Me.push(t._2DRasterTexture.textureAlpha),we+=1);const Re=e.showSkirts&&!m&&!x,Ie=e.backFaceCulling&&!m&&!x;var Oe=Ae.length,De=Ie?e._renderState:e._disableCullingRenderState,Be=Ie?e._blendRenderState:e._disableCullingBlendRenderState,Ne=De,Fe=e._firstPassInitialColor,Ue=r.context;e$2b(e._debug.boundingSphereTile)||Ct$5();var ze=(4&r.useType)>0?1:0;ze&&--f;var Ge=(2&r.useType)>0?1:0;Ge&&--f,e$2b(r.mvtLayerCount)&&r.mvtLayerCount>0&&f--;var Ve=r.multiViewportIndex>-1,ke=e._drawCommands,We=o?e._modifyDrawCommandsByTile:e._drawCommandsByTile,He=o?e._modifyUniformMapsByTile:e._uniformMapsByTile,qe=0;do{var je,Ye,Xe=0,Ke=`${t.x}:${t.y}:${t.level}:${qe}`;qe++,We[Ke]?(je=We[Ke],Ye=He[Ke]):((je=new i$_).owner=t,je.cull=!1,je.boundingVolume=new i$1c,je.orientedBoundingBox=void 0,Ye=qa$3(r,e),Ue.webgpu&&je.addUniformBuffer(Ye.properties.tileUBO),We[Ke]=je,He[Ke]=Ye),ke.push(je),je.owner=t,o?++e._modifyUsedDrawCommands:++e._usedDrawCommands,t===e._debug.boundingSphereTile&&(e$2b(s.orientedBoundingBox)?ui$5(s.orientedBoundingBox,e$1U.RED).update(r):e$2b(s.boundingSphere3D)&&di$5(s.boundingSphere3D,e$1U.RED).update(r));var Qe=Ye.properties;e$29.clone(Fe,Qe.initialColor),e$1U.clone(r.lightSource.sunLightColor,Qe.sunLightColor),e$1U.clone(r.lightSource.ambientLightColor,Qe.ambientLightColor),Qe.oceanNormalMap=b,Qe.lightingFadeDistance.x=e.lightingFadeOutDistance,Qe.lightingFadeDistance.y=e.lightingFadeInDistance,Qe.nightFadeDistance.x=e.nightFadeOutDistance,Qe.nightFadeDistance.y=e.nightFadeInDistance,Qe.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity,Qe.tileBounds.x=t.rectangle.west,Qe.tileBounds.y=t.rectangle.south,Qe.tileBounds.z=t.rectangle.east,Qe.tileBounds.w=t.rectangle.north,e$2b(e._hypsometricSetting)&&(Qe.hypContourFillMode=e._hypsometricSetting.DisplayMode,Qe.hypContourInterval=e._hypsometricSetting.LineInterval,Qe.hypFloor=e._hypsometricSetting.ColorTableMinKey,Qe.hypCeil=e._hypsometricSetting.ColorTableMaxKey,Qe.hypOpacity=e._hypsometricSetting.Opacity,Qe.hypLineColor=e._hypsometricSetting.LineColor,Qe.hypsometricTexture=e._hypsometricTexture,Qe.hypsometricRenderTexture=e._hypsometricRenderTexture,Qe.hypHasAnalysisRegion=e._bUseHypRegion,Qe.hypRect=e._geoBounds,Qe.hypMaxVisibleValue=e._hypsometricSetting.MaxVisibleValue,Qe.hypMinVisibleValue=e._hypsometricSetting.MinVisibleValue,Qe.hypHasColorTable=e._bUseHypColorTable&&!Ge),S&&(Qe.baseColorFactor=e._PBRMaterialParams.baseColorFactor,Qe.metallic=e._PBRMaterialParams.metallic,Qe.roughness=e._PBRMaterialParams.roughness,Qe.emissionFactor=e._PBRMaterialParams.emissionFactor),e$2b(e._slopeSetting)&&(Qe.slopeFillMode=e._slopeSetting.DisplayMode,Qe.slopeRect=e._slopeBound,Qe.slopeFloor=e$2a.toRadians(e._slopeSetting.ColorTableMinKey),Qe.slopeCeil=e$2a.toRadians(e._slopeSetting.ColorTableMaxKey),Qe.slopeOpacity=e._slopeSetting.Opacity,Qe.slopeColorTexture=e._slopeColorTexture,Qe.slopePolygonTexture=e._slopePolygonTexture,Qe.slopeArrowsTexture=e._slopeArrowsTexture,Qe.hasSlopeRegion=e._bUseSlopeRegion,Qe.slopeMaxVisibleValue=e$2a.toRadians(e._slopeSetting.MaxVisibleValue),Qe.slopeMinVisibleValue=e$2a.toRadians(e._slopeSetting.MinVisibleValue),Qe.slopeHasColorTable=e._bUseSlopeColorTable,Qe.level=t.level,Qe.topLevel=n),e$2b(r.camera._scene.globe._floodFlagTexture)&&(Qe.floodRect=r.camera._scene.globe._floodRect,Qe.floodTexture=r.camera._scene.globe._floodFlagTexture),e$2b(t._clipRasterTexture)?Qe.modifyRasterTexture=t._clipRasterTexture:!e$2b(i)&&e$2b(a)&&(Qe.modifyRasterTexture=a),Qe.clip_mode=e._clipMode,Qe.clip_planes=e._clipPlane,Qe.clip_line_color=e._clipLineColor,Qe.flattenTexture=e._flattenTexture;var Ze=!e$2b(s.vertexArray)&&e$2b(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;Ze&&e$1U.clone(e.fillHighlightColor,Qe.fillHighlightColor),Qe.center3D=Z.center,o$1p.clone(J,Qe.rtc),e$29.clone(te,Qe.tileRectangle),Qe.southAndNorthLatitude.x=ie,Qe.southAndNorthLatitude.y=ne,Qe.southMercatorYAndOneOverHeight.x=re,Qe.southMercatorYAndOneOverHeight.y=oe,Qe.globeSplitDirection=e.splitDirection,Qe.globeSwipeRegion=e._swipeRegion,Qe.polygonOffset=e._polygonOffset.value;const u=m?y:v,c=m?v:y;e$2b(u)&&(e$29.fromElements(u.near,u.nearValue,u.far,u.farValue,Qe.frontFaceAlphaByDistance),e$29.fromElements(c.near,c.nearValue,c.far,c.farValue,Qe.backFaceAlphaByDistance));var Je=Ua$3,et=ir$5(t.rectangle,e.cartographicLimitRectangle);o$1p.fromElements(L,M,R,Qe.hsbShift);var tt=t.rectangle,it=1/tt.width,nt=1/tt.height;Je.x=(et.west-tt.west)*it,Je.y=(et.south-tt.south)*nt,Je.z=(et.east-tt.west)*it,Je.w=(et.north-tt.south)*nt,e$29.clone(Je,Qe.localizedCartographicLimitRectangle);var rt=w;!r.context.webgpu&&e$2a.fog(t._distance,r.fog.density)<e$2a.EPSILON3&&(rt=!1),I=I&&(rt||E);for(var ot=!1,at=!1,st=!1,lt=!1,ut=!1,ct=!1,ht=!1,dt=!1,ft=!1,pt=!1,_t=!o$1o.equals(e.splitDirection,o$1o.ZERO),mt=e._swipeEnabled,gt=[],xt=e._polygonOffset.enabled;Xe<f&&Ce<we;)if(Ce!=we-Oe||0==Oe){var vt=pe[Ce],yt=_e[Ce],$t=vt.readyImagery;if(++Ce,!e$2b($t)||vt.discard)continue;var bt=r.camera._positionCartographic.height,Tt=$t.imageryLayer.maxHeight,Ct=$t.imageryLayer.minHeight;if($t.imageryLayer._inVisibleHeightRange=bt>Tt||bt<Ct?0:1,$t.imageryLayer.alpha*$t.imageryLayer._inVisibleHeightRange==0||($t.setVisible(!0),Ve&&!$t.imageryLayer._isBaseLayer&&!$t.imageryLayer.getVisibleInViewport(r.multiViewportIndex)))continue;if(r.camera._scene._mvtVisibleControl){var St=r.camera._scene._mvtVisibleLevel;if(e$2b($t.isMvtTexture)&&$t.isMvtTexture&&!(t._level>r.camera._endLevel-St))continue}if(!e$2b(Vt=vt.useWebMercatorT?$t.textureWebMercator:$t.texture))throw new t$16("readyImagery is not actually ready!");var wt=$t.imageryLayer;if(e$2b($t.isMvtTexture)&&$t.isMvtTexture){var Et=$t.imageryLayer._selectColor;gt.push({textureIndex:Xe,selectColor:Et})}if(e$2b(vt.textureTranslationAndScale)||(vt.textureTranslationAndScale=wt._calculateTextureTranslationAndScale(t,vt)),!e$2b(vt.dayTextureSize)){var Pt=new e$29(Vt.width,Vt.height,1/Vt.width,1/Vt.height);vt.dayTextureSize=Pt}Qe.dayTextures[Xe]=Vt,Qe.dayTextureTranslationAndScale[Xe]=vt.textureTranslationAndScale,Qe.dayTextureTexCoordsRectangle[Xe]=vt.textureCoordinateRectangle,Qe.dayTextureSize[Xe]=vt.dayTextureSize,e$2b(yt)&&(Qe.dayTextureTranslationAndScale[Xe]=yt,Qe.dayTextureTexCoordsRectangle[Xe]=new e$29(0,0,1,1)),Qe.dayTextureUseWebMercatorT[Xe]=vt.useWebMercatorT,Qe.dayTextureFlipY[Xe]=vt.flipY;var At=new e$29;if(At.x=wt.transparentBackColor.red,At.y=wt.transparentBackColor.green,At.z=wt.transparentBackColor.blue,At.w=wt.transparentBackColorTolerance,Qe.transparentBackColor[Xe]=At,Qe.imageryClipEnable[Xe]=wt.enableImageryClip,Qe.dayTextureAlpha[Xe]=u$_(vt.morphingAlpha,wt.alpha),ct=ct||1!==Qe.dayTextureAlpha[Xe],vt.morphingAlpha<1){var Lt=pe[Ce-1];e$2b(Lt)&&!e$2b(Lt.loadingImagery)&&(Qe.morphingParentIndex=Xe,Qe.morphingBeginTime=Lt.morphingBeginTime)}Qe.dayTextureBrightness[Xe]=wt.brightness,ot=ot||Qe.dayTextureBrightness[Xe]!==h$Q.DEFAULT_BRIGHTNESS,Qe.dayTextureContrast[Xe]=wt.contrast,at=at||Qe.dayTextureContrast[Xe]!==h$Q.DEFAULT_CONTRAST,Qe.dayTextureHue[Xe]=wt.hue,st=st||Qe.dayTextureHue[Xe]!==h$Q.DEFAULT_HUE,Qe.dayTextureSaturation[Xe]=wt.saturation,lt=lt||Qe.dayTextureSaturation[Xe]!==h$Q.DEFAULT_SATURATION,Qe.dayTextureOneOverGamma[Xe]=1/wt.gamma,ut=ut||Qe.dayTextureOneOverGamma[Xe]!==1/h$Q.DEFAULT_GAMMA,Qe.dayTextureSplit[Xe]=wt.splitDirection,Je$6.x=wt._swipeRegion.x*r.context.drawingBufferWidth,Je$6.y=(1-wt._swipeRegion.y)*r.context.drawingBufferHeight,Je$6.z=wt._swipeRegion.z*r.context.drawingBufferWidth,Je$6.w=(1-wt._swipeRegion.w)*r.context.drawingBufferHeight,Qe.dayTextureSwipeRegion[Xe]=e$29.clone(Je$6,new e$29),ht=ht||!o$1o.equals(Qe.dayTextureSplit[Xe],o$1o.ZERO),dt=dt||wt.swipeEnabled;var Mt=Qe.dayTextureCutoutRectangles[Xe];if(e$2b(Mt)||(Mt=Qe.dayTextureCutoutRectangles[Xe]=new e$29),e$29.clone(e$29.ZERO,Mt),e$2b(wt.cutoutRectangle)){var Rt=ir$5(tt,wt.cutoutRectangle);ft=e$2b(h$18.simpleIntersection(Rt,tt,ai$4))||ft,Mt.x=(Rt.west-tt.west)*it,Mt.y=(Rt.south-tt.south)*nt,Mt.z=(Rt.east-tt.west)*it,Mt.w=(Rt.north-tt.south)*nt}var It=Qe.colorsToAlpha[Xe];e$2b(It)||(It=Qe.colorsToAlpha[Xe]=new e$29);var Ot=e$2b(wt.colorToAlpha)&&wt.colorToAlphaThreshold>0;if(pt=pt||Ot,Ot){var Dt=wt.colorToAlpha;It.x=Dt.red,It.y=Dt.green,It.z=Dt.blue,It.w=wt.colorToAlphaThreshold}else It.w=-1;if(++Xe,e$2b($t.credits))for(var Bt=$t.credits,Nt=0,Ft=Bt.length;Nt<Ft;++Nt)l.addCredit(Bt[Nt])}else{if(++Ce,!e$2b(Vt=Ae[Se]))throw new t$16("readyImagery is not actually ready!");Qe.dayTextures[Xe]=Vt,Qe.dayTextureTranslationAndScale[Xe]=new e$29(0,0,1,1),Qe.dayTextureSize[Xe]=new e$29(Vt.width,Vt.height,1/Vt.width,1/Vt.height),Qe.transparentBackColor[Xe]=Le[Se],Qe.dayTextureTexCoordsRectangle[Xe]=new e$29(0,0,1,1),Qe.dayTextureUseWebMercatorT[Xe]=!1,Qe.dayTextureAlpha[Xe]=Me[Se],ct=ct||1!==Me[Se],Qe.dayTextureBrightness[Xe]=1,ot=!1,Qe.dayTextureContrast[Xe]=1,at=!1,Qe.dayTextureHue[Xe]=0,st=!1,Qe.dayTextureSaturation[Xe]=1,lt=!1,Qe.dayTextureOneOverGamma[Xe]=1,ut=!1,Qe.dayTextureSplit[Xe]=new o$1o(0,0),Qe.dayTextureSwipeRegion[Xe]=r.realtimeRasterSwipeParams.swipeRegion,ht=!0,dt=r.realtimeRasterSwipeParams.swipeEnabled,Se++,++Xe}for(var Ut=0,zt=0,Gt=!1;Ut<f-Xe&&zt<Pe;){var Vt,kt=Ee[zt],Wt=kt.readyGrid;if(++zt,null!=Wt&&(!Ve||Wt.gridLayer.getVisibleInViewport(r.multiViewportIndex)))if(null!=(Vt=kt.useWebMercatorT?Wt.textureWebMercator:Wt.texture)){Wt.needUpdate&&(Gt=!0,Wt.needUpdate=!1);var Ht=Wt.gridLayer;e$2b(kt.textureTranslationAndScale)||(kt.textureTranslationAndScale=Ht._calculateTextureTranslationAndScale(t,kt)),Qe.gridTextures[Ut]=Vt,Qe.gridTextureTranslationAndScale[Ut]=kt.textureTranslationAndScale,Qe.gridTextureTexCoordsRectangle[Ut]=kt.textureCoordinateRectangle,Qe.gridTextureUseWebMercatorT[Ut]=kt.useWebMercatorT,Ut++}}Qe.gridTextures.length=Ut,Qe.dayTextures.length=Xe,Qe.waterMask=p,e$29.clone(_,Qe.waterMaskTranslationAndScale),Qe.minMaxHeight.x=ee.minimumHeight,Qe.minMaxHeight.y=ee.maximumHeight,p$1d.clone(ee.matrix,Qe.scaleAndBias);var qt=e._clippingPlanes,jt=e$2b(qt)&&qt.enabled&&t.isClipped;jt&&(Qe.clippingPlanesEdgeColor=e$1U.clone(qt.edgeColor,Qe.clippingPlanesEdgeColor),Qe.clippingPlanesEdgeWidth=qt.edgeWidth),e$2b(e.uniformMap)&&(Ye=p$19(Ye,e.uniformMap)),fe.numberOfDayTextures=Xe,fe.applyBrightness=ot,fe.applyContrast=at,fe.applyHue=st,fe.applySaturation=lt,fe.applyGamma=ut,fe.applyAlpha=ct,fe.applySplit=ht,fe.applySwipe=dt,fe.applyGlobeSwipe=mt,fe.applyGlobeSplit=_t,fe.enableFog=rt,fe.enableClippingPlanes=jt,fe.clippingPlanes=qt,fe.hasImageryLayerCutout=ft,fe.colorCorrect=I,fe.isHeight=ze,fe.isColor=Ge,fe.hasNormalMap=z,fe.hasHypsometricSetting=V,fe.hasSlopeAnalysis=G,fe.highlightFillTile=Ze,fe.colorToAlpha=pt,fe.mvtTextureObj=gt,fe.numberOfGridTextures=Ut,fe.gridUpdate=Gt,fe.applyPolygonOffset=xt,fe.mixDirection=0,fe.mixIndex=0,fe.hasFlood=k,fe.applyImageryClip=j,fe.hasHypsometricRegion=X,fe.applySlopeRegion=Y,fe.translucent=x;var Yt=Z.indices.length;Re||(Yt=Z.indexCountWithoutSkirts),Yt=o?s.modifyTerrainVertexArray.indexBuffer.numberOfIndices:Yt,Qe.normalTexture=U,e$29.clone(s.normalTextureTranslationAndScale,Qe.normalTextureTranslationAndScale),je.shaderProgram=e._surfaceShaderSet.getShaderProgram(fe),je.castShadows=P,je.receiveShadows=A,je.renderState=Ne,je.primitiveType=W$18.TRIANGLES,e$2b(i)?je.vertexArray=o?s.modifyTerrainVertexArray:i.vertexArray:je.vertexArray=o?s.modifyTerrainVertexArray:s.subDivisionVertexArray||s.vertexArray||s.fill.vertexArray,je.count=Yt,je.uniformMap=Ye,je.pass=Le$s.GLOBE,e._debug.wireframe&&(Ya$3(Ue,e,t),e$2b(s.wireframeVertexArray)&&(je.vertexArray=s.wireframeVertexArray,je.primitiveType=W$18.LINES));var Xt=je.boundingVolume,Kt=je.orientedBoundingBox;if(r.mode!==C$13.SCENE3D){var Qt=s.tileBoundingRegion;i$1c.fromRectangleWithHeights2D(t.rectangle,r.mapProjection,Qt.minimumHeight,Qt.maximumHeight,Xt),o$1p.fromElements(Xt.center.z,Xt.center.x,Xt.center.y,Xt.center),r.mode===C$13.MORPHING&&(Xt=i$1c.union(Z.boundingSphere3D,Xt,Xt))}else je.boundingVolume=i$1c.clone(Z.boundingSphere3D,Xt),je.orientedBoundingBox=y$Z.clone(s.orientedBoundingBox,Kt),e$2b(je.boundingVolume)||(je.boundingVolume=i$1c.fromOrientedBoundingBox(je.orientedBoundingBox));je.invalid=u$_(t.invalid,!1),x&&g.updateDerivedCommands(je,r),Za$3(je,r),Ne=Be,Fe=Qa$3,Ye.properties.tileUBO.updateFromProperties(Ye.properties)}while(Ce<we)}var li$5=new o$1p,bt$6=new a$18;function $a$3(e,t){for(var i=p$1d.getTranslation(t,new o$1p),n=e.attributes.position.values,r=n.length,o=0;o<r;o+=3){o$1p.unpack(n,o,li$5),a$18.fromCartesian(li$5,void 0,bt$6);var a=e$2a.toDegrees(bt$6.longitude);a-=i.x;var s=e$2a.toDegrees(bt$6.latitude);s-=i.y,n[o]=a,n[o+1]=s,n[o+2]=bt$6.height-1}}function De$j(e,t){if(!e$2b(t.command)){var i=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:t.modelMatrix});$a$3(t.worldGeometry,t.modelMatrix),i.vertexArray=c$12.fromGeometry({context:e,geometry:t.worldGeometry,attributeLocations:{position:0},bufferUsage:A$19.STATIC_DRAW,interleave:!0});var n=["attribute vec4 position;","varying float vHeight;","void main()","{"," vHeight = position.z;"," gl_Position = czm_modelViewProjection * vec4(position.xy, 0.0, 1.0);","}"].join("\n"),r=["varying float vHeight;","void main()","{"," gl_FragColor = czm_packValue(vHeight);","}"].join("\n"),o=new s$U({sources:[n]}),a=new s$U({sources:[r]});i.shaderProgram=r$13.fromCache({name:"ClipRasterTerrain",context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:{position:0}}),i.useRelativeOrigin=!1,t.command=i}}function Ie$f(e){var t=e._clipRasterTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1}}function or$5(e,t){var i=e._clipRasterTilesMap;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];e$2b(h$18.intersection(t,r.rectangle))||(r._clipRasterTexture=r._clipRasterTexture&&!r._clipRasterTexture.isDestroyed()&&r._clipRasterTexture.destroy(),r._clipRasterFbo=r._clipRasterFbo&&!r._clipRasterFbo.isDestroyed()&&r._clipRasterFbo.destroy(),r._clipRegionsCount=0,r._clipRegionRasterized=!1)}}function sr$5(e,t,i){if(i){var n=e.camera._projection.project(a$18.fromDegrees(t.positions[0],t.positions[1]));n=new o$1p(n.z,n.x,n.y),t._excavateMatrix=p$1d.fromTranslation(n)}else t._excavateMatrix=m$17.eastNorthUpToFixedFrame(o$1p.fromDegrees(t.positions[0],t.positions[1]))}function hi$5(e,t){!t._excavationSideTexture&&e$2b(t._excavationSideTextureUrl)&&o$1l(t$11.createIfNeeded(t._excavationSideTextureUrl).fetchImage(),(function(i){t._excavationSideTexture=new t$V({context:e.context,source:i,sampler:new e$1P({wrapS:t._excavateTextureWrap,wrapT:t._excavateTextureWrap})}),t._excavationSideTexture.generateMipmap(I$1e.NICEST)}))}function ci$6(e,t){!t._excavationBottomTexture&&e$2b(t._excavationBottomTextureUrl)&&o$1l(t$11.createIfNeeded(t._excavationBottomTextureUrl).fetchImage(),(function(i){t._excavationBottomTexture=new t$V({context:e.context,source:i})}))}function fi$5(e,t){!t._excavationNormalTexture&&e$2b(t.excavationNormalTextureUrl)&&o$1l(t$11.createIfNeeded(t.excavationNormalTextureUrl).fetchImage(),(function(i){t._excavationNormalTexture=new t$V({context:e.context,source:i})}));!t._excavationSideNormalTexture&&e$2b(t.excavationSideNormalTextureUrl)&&o$1l(t$11.createIfNeeded(t.excavationSideNormalTextureUrl).fetchImage(),(function(i){t._excavationSideNormalTexture=new t$V({context:e.context,source:i,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT})})}))}A$S.prototype._updateExcavateRegions=function(e){if(!(!this._excavateRegionUpdate||e.camera.bReflect||this._tilesToRenderByTextureCount.length<1)){for(var t in this._excavateRegionUpdate=!1,e._framebufferList)t.indexOf("_excavationGlobeHeight")>-1&&!e$2b(this._excavateRegions.get(t.slice(22)))&&(e._framebufferList[t]=!e._framebufferList[t].isDestroyed()&&e._framebufferList[t].destroy(),delete e._framebufferList[t]);if(this._excavateRegions.length<1)return void Ie$f(this);this._onceExcavateRegionsEmpty&&(Ie$f(this),this._onceExcavateRegionsEmpty=!1);var i=!1;e.camera._scene.mode===C$13.COLUMBUS_VIEW&&(i=!0);var n=Pe$g(this._excavateRegions.values);or$5(this,n),this._excavateRectangle=n,hi$5(e,this),ci$6(e,this),fi$5(e,this);for(var r=this._excavateRegions.length,o=0;o<r;o++){var a=this._excavateRegions.values[o];sr$5(e,a,i),De$j(e.context,a),this._excavateTransparent||(ur$3(e,this,a,i),dr$2(e,this,a,i))}}},A$S.prototype._updateExtractRegions=function(e){if(this._extractRegionsUpdate&&!e.camera.bReflect){for(var t in this._extractRegionsUpdate=!1,e._framebufferList)t.indexOf("_excavationGlobeHeight")>-1&&!e$2b(this._extractRegions.get(t.slice(22)))&&(e._framebufferList[t]=!e._framebufferList[t].isDestroyed()&&e._framebufferList[t].destroy(),delete e._framebufferList[t]);if(this._extractRegions.length<1)Ie$f(this);else{this._onceExcavateRegionsEmpty&&(Ie$f(this),this._onceExcavateRegionsEmpty=!1);var i=!1;e.camera._scene.mode===C$13.COLUMBUS_VIEW&&(i=!0);var n=Pe$g(this._extractRegions.values);or$5(this,n),this._excavateRectangle=n,hi$5(e,this),ci$6(e,this),fi$5(e,this);for(var r=this._extractRegions.length,o=0;o<r;o++){sr$5(e,d=this._extractRegions.values[o],i),De$j(e.context,d),this._extractTransparent||(ur$3(e,this,d,i),dr$2(e,this,d,i),ur$3(e,this,d,i,!0),dr$2(e,this,d,i,!0))}if(0!==this._quadtree._tilesToRender.length&&!(this._quadtree._tilesToRender[0].level<10)){if(r<1)return void pi$6(this);mi$3(this,n);var a=lr$5(this._quadtree._tilesToRender,n);if(e$2b(a)&&e$2b(a.data)){var s=a.data,l=e.context,u=[],c=Number.MAX_VALUE,h=Number.MIN_VALUE;for(o=0;o<r;o++){var d=this._extractRegions.values[o];u.push(d.geometry_extract),c=Math.min(c,d.minimumHeight),h=Math.max(h,d.maximumHeight)}s.createModifyVertexArray(l,this,a,u,c,h,!1),e$2b(s.modifyTerrainVertexArray)&&xe$i(l,this,a,n,u,c,h,!0)}}}}else this._extractRegions.length>0&&this._updateModifyTiles(e,this._extractRegions.values,!0)},A$S.prototype._updateImageryClipRegions=function(e){if(this._imageryClipRegionUpate&&!e.camera.bReflect){if(this._imageryClipRegionUpate=!1,this._imageryClipRegions.length<1)return void Ie$f(this);this._onceImageryClipRegionsEmpty&&(Ie$f(this),this._onceImageryClipRegionsEmpty=!1),or$5(this,Pe$g(this._imageryClipRegions.values));for(var t=this._imageryClipRegions.length,i=0;i<t;i++){var n=this._imageryClipRegions.values[i];sr$5(e,n,false),De$j(e.context,n)}}},A$S.prototype._removeAllExcavationCommands=function(){for(var e=Object.keys(this._excavateRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this._removeExcavationCommands(n)}},A$S.prototype._removeAllExtractCommands=function(){for(var e=Object.keys(this._extractRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this._removeExtractCommands(n)}this.modifyParentTiles=void 0},A$S.prototype._removeExcavationCommands=function(e){var t=this._excavateRegions.get(e);t.heightBuffer=t.heightBuffer&&!t.heightBuffer.isDestroyed()&&t.heightBuffer.destroy();var i=this._excavateRegionCommands.get(e+"side"),n=this._excavateRegionCommands.get(e+"bottom");i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),n&&(n.vertexArray=n.vertexArray&&!n.vertexArray.isDestroyed()&&n.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom")},A$S.prototype._removeExtractCommands=function(e){var t=this._extractRegions.get(e);t.heightBuffer=t.heightBuffer&&!t.heightBuffer.isDestroyed()&&t.heightBuffer.destroy(),t.heightBuffer2=t.heightBuffer2&&!t.heightBuffer2.isDestroyed()&&t.heightBuffer2.destroy();var i=this._excavateRegionCommands.get(e+"side"),n=this._excavateRegionCommands.get(e+"side_extract"),r=this._excavateRegionCommands.get(e+"bottom"),o=this._excavateRegionCommands.get(e+"bottom_extract");i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),n&&(n.vertexArray=n.vertexArray&&!n.vertexArray.isDestroyed()&&n.vertexArray.destroy()),r&&(r.vertexArray=r.vertexArray&&!r.vertexArray.isDestroyed()&&r.vertexArray.destroy()),o&&(o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom"),this._excavateRegionCommands.remove(e+"side_extract"),this._excavateRegionCommands.remove(e+"bottom_extract"),this.modifyParentTiles=void 0};var _e$n=new a$V,ja$2=new o$15;function Ja$3(e,t,i,n){var r=e.camera._projection,o=e.camera;if(!o.bReflect){var a=t,s=a.width,l=a.height,u=6378137*Math.cos(a.south+.5*l)*Math.sin(s)*.5,c=6378137*Math.sin(l)*.5;if(s=u,l=c,n){var h=r.project(new a$18(a.west,a.south)),d=r.project(new a$18(a.east,a.north));s=(d.x-h.x)/2,l=(d.y-h.y)/2}var f=o.frustum.clone(ja$2),p=o._scene.globe.globeAlpha,_=new o$1p,m=new o$1p,g=new o$1p,x=new p$1d;i.isUpdate=!0,e$2b(i._beginFunc)||(i._beginFunc=function(){p=o._scene.globe.globeAlpha,o._scene.globe.globeAlpha=1,o$1p.clone(o.position,_),o$1p.clone(o.direction,m),o$1p.clone(o.up,g),p$1d.clone(o.transform,x),o._setTransform(p$1d.IDENTITY),o.setView({destination:o$1p.fromRadians(a.west+.5*a.width,a.south+.5*a.height,1e4)}),_e$n.width=2*s,_e$n.height=2*l,_e$n.near=1,_e$n.far=1e6,_e$n.aspectRatio=s/l,o.frustum=_e$n,e.context.uniformState.updateFrustum(_e$n)}),e$2b(i._endFunc)||(i._endFunc=function(){o._scene.globe.globeAlpha=p,i.isUpdate=!1,o.frustum=f,o._setTransform(x),o$1p.clone(_,o.position),o$1p.clone(m,o.direction),o$1p.clone(g,o.up),o$1p.cross(m,g,o.right),e.context.uniformState.updateFrustum(o.frustum)})}}function ur$3(e,t,i,n,r){var o=e.camera._projection,a=t._excavateRegionCommands;if((!a.contains(i.name+"side")||r)&&(!a.contains(i.name+"side_extract")||!r)){var s=e.context,l=p$1d.inverse(i._excavateMatrix,new p$1d),u=i.positions,c=i.rectangle,h=c.east-c.west,d=c.north-c.south,f=u.length/3,p=new Float32Array(8*f),_=new Float32Array(6*f),m=new Float32Array(4*f),g=new Uint16Array(6*f),x=new o$1p,v=f$18.fromRectangle(i.rectangle),y=Math.max(v.width/100,1),$=Math.max(v.height/100,1),b=Math.max(y,$);b=Math.floor(b),b=Math.min(b,10);for(var T=0;T<f;T++){var C,S;n?(C=new o$1p((C=o.project(a$18.fromDegrees(u[3*T+0],u[3*T+1],-1e4))).z,C.x,C.y),S=new o$1p((S=o.project(a$18.fromDegrees(u[3*T+0],u[3*T+1],1e4))).z,S.x,S.y)):(C=o$1p.fromDegrees(u[3*T+0],u[3*T+1],-1e4),S=o$1p.fromDegrees(u[3*T+0],u[3*T+1],1e4)),x.x=C.x,x.y=C.y,x.z=C.z,x.w=1,p$1d.multiplyByVector(l,x,x),C.x=x.x,C.y=x.y,C.z=x.z,x.x=S.x,x.y=S.y,x.z=S.z,x.w=1,p$1d.multiplyByVector(l,x,x),S.x=x.x,S.y=x.y,S.z=x.z,p[8*T]=S.x,p[8*T+1]=S.y,p[8*T+2]=S.z,p[8*T+3]=1e4,p[8*T+4]=C.x,p[8*T+5]=C.y,p[8*T+6]=C.z,p[8*T+7]=-1e4,_[6*T+0]=_[6*T+3]=(e$2a.toRadians(u[3*T+0])-c.west)/h,_[6*T+1]=_[6*T+4]=(e$2a.toRadians(u[3*T+1])-c.south)/d,_[6*T+2]=_[6*T+5]=i.height,m[4*T+0]=b*(T%2),m[4*T+1]=t._excavateTextureWrap===q$19.CLAMP_TO_EDGE?1:200,m[4*T+2]=b*(T%2),m[4*T+3]=0}for(T=0;T<f-1;T++)g[6*T+0]=0+2*T,g[6*T+1]=2+2*T,g[6*T+2]=3+2*T,g[6*T+3]=0+2*T,g[6*T+4]=3+2*T,g[6*T+5]=1+2*T;g[6*(f-1)+0]=0+2*(f-1),g[6*(f-1)+1]=0,g[6*(f-1)+2]=1,g[6*(f-1)+3]=0+2*(f-1),g[6*(f-1)+4]=1,g[6*(f-1)+5]=1+2*(f-1);var w=t$Y.createVertexBuffer({context:s,typedArray:p,usage:A$19.STATIC_DRAW}),E=t$Y.createVertexBuffer({context:s,typedArray:_,usage:A$19.STATIC_DRAW}),P=t$Y.createVertexBuffer({context:s,typedArray:m,usage:A$19.STATIC_DRAW}),A=[],L={aPosition:0,aTexCoord0:1,aTexCoord1:2};A.push({name:"aPosition",index:L.aPosition,vertexBuffer:w,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),A.push({name:"aTexCoord0",index:L.aTexCoord0,vertexBuffer:E,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),A.push({name:"aTexCoord1",index:L.aTexCoord1,vertexBuffer:P,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var M=t$Y.createIndexBuffer({context:s,typedArray:g,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),R=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:i._excavateMatrix,pass:Le$s.TERRAIN_CLASSIFICATION,owner:t,cull:!1});R.vertexArray=new c$12({context:s,attributes:A,indexBuffer:M});var I=new s$U({sources:[Z$J]}),O=new s$U({sources:[$$N]});r&&O.defines.push("IsExtract"),e$2b(t.excavationNormalTextureUrl)&&O.defines.push("NormalTexture"),R.shaderProgram=r$13.fromCache({name:"SideExcavation",context:s,vertexShaderSource:I,fragmentShaderSource:O,attributeLocations:L}),R.renderState=d$1m.fromCache({cull:{enabled:!1,face:de$x.BACK},depthTest:{enabled:!0}}),R.uniformMap={uRasterTexture:function(){return r?i.heightBuffer2._renderTexture._fb.getColorTexture(0):i.heightBuffer._renderTexture._fb.getColorTexture(0)},uColorTexture:function(){return e$2b(t._excavationSideTexture)?t._excavationSideTexture:s.defaultTexture},uNormalTexture:function(){return t._excavationSideNormalTexture||s.defaultTexture},uExtractHeight:function(){return i.height+t._extractExtendHeight}};var D=new t$F(e.context);D.useType=4,D.environmentVisible.isGlobalVisible=!0,Ja$3(e,i.rectangle,D,n),e$2b(i.removeListenerFunc)||(i.removeListenerFunc=t.tileLoadedEvent.addEventListener((function(e){e$2b(h$18.intersection(e.rectangle,i.rectangle))&&(D.isUpdate=!0)}))),r?(a.set(i.name+"side_extract",R),i.heightBuffer2=D,e._framebufferList["_excavationGlobeHeight2"+i.name]=D):(a.set(i.name+"side",R),i.heightBuffer=D,e._framebufferList["_excavationGlobeHeight"+i.name]=D)}}function dr$2(e,t,i,n,r){var o=e.camera._projection,a=t._excavateRegionCommands;if((!a.contains(i.name+"bottom")||r)&&(!a.contains(i.name+"bottom_extract")||!r)){for(var s=i._excavateMatrix,l=e.context,u=new i$_({primitiveType:W$18.TRIANGLES,pass:Le$s.TERRAIN_CLASSIFICATION,modelMatrix:s}),c=new o$1p,h=[],d=i.worldGeometry,f=p$1d.getTranslation(i.modelMatrix,new o$1p),p=0;p<d.attributes.position.values.length;p+=3)h.push(d.attributes.position.values[p]+f.x),h.push(d.attributes.position.values[p+1]+f.y),h.push(i.height);var _=p$1d.inverse(s,new p$1d),m=[];if(n){p=0;for(var g=h.length;p<g;p+=3){var x=o.project(a$18.fromDegrees(h[p],h[p+1],h[p+2]));m.push(new o$1p(x.z,x.x,x.y))}}else m=o$1p.fromDegreesArrayHeights(h);var v=new Float32Array(4*m.length);for(p=0;p<m.length;p++)c.x=m[p].x,c.y=m[p].y,c.z=m[p].z,c.w=1,p$1d.multiplyByVector(_,c,c),v[4*p]=c.x,v[4*p+1]=c.y,v[4*p+2]=c.z,v[4*p+3]=c.z;var y=i.colorGeometry.attributes.position;y.values=v,y.componentsPerAttribute=4,y.componentDatatype=S$12.FLOAT,u.vertexArray=c$12.fromGeometry({context:l,geometry:i.colorGeometry,attributeLocations:{position:0,st:1},bufferUsage:A$19.STATIC_DRAW,interleave:!0});var $=new s$U({sources:[xa$3]}),b=new s$U({sources:[Ta$3]});if(e$2b(t.excavationNormalTextureUrl)&&b.defines.push("NormalTexture"),u.shaderProgram=r$13.fromCache({name:"BottomExcavation",context:l,vertexShaderSource:$,fragmentShaderSource:b,attributeLocations:{position:0,st:1}}),u.uniformMap={texture1:function(){return e$2b(t._excavationBottomTexture)?t._excavationBottomTexture:l.defaultTexture},uNormalTexture:function(){return t._excavationNormalTexture||l.defaultTexture}},u.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),r){var T=t._extractExtendHeight,C=o$1p.fromArray([0,0,T]),S=p$1d.fromTranslation(C);p$1d.multiply(u.modelMatrix,S,S),u.modelMatrix=S,a.set(i.name+"bottom_extract",u)}else a.set(i.name+"bottom",u)}}function Pe$g(e){for(var t=h$18.clone(e[0].rectangle),i=1,n=e.length;i<n;i++){var r=e[i];t=h$18.union(t,r.rectangle)}return t}function lr$5(e,t){for(var i,n=!1,r=0,o=e.length;r<o;r++){if(i=e[r],e$2b(h$18.simpleIntersection(i.rectangle,t))){n=!0;break}}if(e$2b(i)&&n)for(;e$2b(i);){if(i.rectangle.contains(t))return i;i=i.parent}}function xe$i(e,t,i,n,r,o,a,s){var l=i._southwestChild;e$2b(l)&&e$2b(l.data)&&(e$2b(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2b(l.data.modifyTerrainVertexArray)&&xe$i(e,t,l,n,r,o,a,s))),e$2b(l=i._southeastChild)&&e$2b(l.data)&&(e$2b(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2b(l.data.modifyTerrainVertexArray)&&xe$i(e,t,l,n,r,o,a,s))),e$2b(l=i._northwestChild)&&e$2b(l.data)&&(e$2b(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2b(l.data.modifyTerrainVertexArray)&&xe$i(e,t,l,n,r,o,a,s))),e$2b(l=i._northeastChild)&&e$2b(l.data)&&(e$2b(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2b(l.data.modifyTerrainVertexArray)&&xe$i(e,t,l,n,r,o,a,s)))}function Pa$2(e,t){return t.modifyParentTiles?!(e.level<12):!(!e$2b(e.parent)||!e.parent.isModified)||(e._southwestChild.isModified||e._southeastChild.isModified||e._northwestChild.isModified||e._northeastChild.isModified)}function pi$6(e){var t=e._modifyTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1,n.isModified=!1,n.data.mesh&&(n.data.mesh.isModified=!1),n.data.freeModifyResource()}e._modifyTilesMap={}}function mi$3(e,t){var i=e._modifyTilesMap;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];h$18.intersection(t,r.rectangle)||(r._clipRasterTexture=r._clipRasterTexture&&!r._clipRasterTexture.isDestroyed()&&r._clipRasterTexture.destroy(),r._clipRasterFbo=r._clipRasterFbo&&!r._clipRasterFbo.isDestroyed()&&r._clipRasterFbo.destroy(),r._clipRegionsCount=0,r._clipRegionRasterized=!1,r.isModified=!1,r.data.freeModifyResource(),delete i[n])}}function He$8(e,t,i){var n=new o$1p,r=new o$1p;o$1p.subtract(t,e,n),o$1p.subtract(i,e,r);var o=new o$1p;o$1p.cross(n,r,o),o$1p.normalize(o,o);var a=-o$1p.dot(o,e);return new e$29(o.x,o.y,o.z,a)}function gi$6(e,t){var i=t.context;return new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:e,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})],destroyAttachments:!1,depthStencilTexture:new t$V({context:i,width:e,height:e,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})})}function en$2(e,t){if(!(e._rasterLineFBOs.length>0))for(var i=0;i<e._rasterTextureSizes.length;i++)e._rasterLineFBOs.push(gi$6(e._rasterTextureSizes[i],t))}function tn$3(e,t){if(!(e._rasterAAFBOs.length>0))for(var i=0;i<e._rasterTextureSizes.length;i++)e._rasterAAFBOs.push(gi$6(e._rasterTextureSizes[i],t))}function rn$2(e,t){if(!e$2b(e._lineExpandCommand)||e._rasterLineWidth!==t.rasterLineWidth){e._rasterLineWidth=t.rasterLineWidth;var i=t.context,n=Math.ceil(t.rasterLineWidth),r="#define CORESIZE "+n+"\n",o=new s$U({name:"RasterImageExpandFS_width_"+n,sources:[r+=da$1]}),a=new s$U({name:"ViewportQuadVS",sources:[ot$7]});e._lineExpandCommand=i.createCustomViewportQuadCommand(a,o,{uniformMap:{},owner:e}),e._lineExpandCommand.uniformMap.u_LineTexture=function(){return e._rasterLineFBOs[e._rasterCurrentFBOIdx].getColorTexture(0)},e._lineExpandCommand.uniformMap.u_texelOffset=function(){return 1/e._rasterTextureSizes[e._rasterCurrentFBOIdx]}}}function an$2(e,t){if(!e$2b(e._lineFXAACommand)){var i=t.context,n="#define FXAA_QUALITY_PRESET 39 \n#define FXAA_QUALITY_PS 12 \n#define FXAA_QUALITY_P0 1.0 \n#define FXAA_QUALITY_P1 1.0 \n#define FXAA_QUALITY_P2 1.0 \n#define FXAA_QUALITY_P3 1.0 \n#define FXAA_QUALITY_P4 1.0 \n#define FXAA_QUALITY_P5 1.5 \n#define FXAA_QUALITY_P6 2.0 \n#define FXAA_QUALITY_P7 2.0 \n#define FXAA_QUALITY_P8 2.0 \n#define FXAA_QUALITY_P9 2.0 \n#define FXAA_QUALITY_P10 2.0 \n#define FXAA_QUALITY_P11 8.0 \n"+k$I+"\n"+la$4,r=L$T;e._lineFXAACommand=i.createViewportQuadCommand(i.webgpu?r:n,{shaderProgramName:"RasterLineFXAA",uniformMap:{},owner:e}),e._lineFXAACommand.uniformMap.colorTexture=function(){return e._rasterAAFBOs[e._rasterCurrentFBOIdx].getColorTexture(0)}}}function b$W(){}new o$1p,A$S.prototype._updateModifyTiles=function(e,t,i){for(var n=this._quadtree._tilesToRender,r=n.length,o=!1,a=0;a<r;a++)if(Pa$2(n[a],this)){o=!0;break}if(o){var s=Pe$g(t),l=lr$5(n,s);if(e$2b(l)&&e$2b(l.data)){!e$2b(this.modifyParentTiles)&&i&&(this.modifyParentTiles=l);for(var u=l.data,c=e.context,h=[],d=Number.MAX_VALUE,f=Number.MIN_VALUE,p=(a=0,t.length);a<p;a++){var _=t[a],m=i?_.geometry_extract:_.geometry;h.push(m),d=Math.min(d,_.minimumHeight),f=Math.max(f,_.maximumHeight)}if(l.isModified||u.createModifyVertexArray(c,this,l,h,d,f,!1),e$2b(u.modifyTerrainVertexArray)){if(this.modifyParentTiles&&l.level<this.modifyParentTiles.level)return;xe$i(c,this,l,s,h,d,f,!1)}}}},A$S.prototype._updateModifyRegions=function(e){if(this._modifyRegionUpdate){if(0!==this._quadtree._tilesToRender.length&&!(this._quadtree._tilesToRender[0].level<10)){this._modifyRegionUpdate=!1;var t=this._modifyRegions.values,i=t.length;if(i<1)return void pi$6(this);var n=Pe$g(t);mi$3(this,n),this._excavateRectangle=n;for(var r=0;r<i;r++){var o=t[r];De$j(e.context,o)}var a=lr$5(this._quadtree._tilesToRender,n);if(e$2b(a)&&e$2b(a.data)){var s=a.data,l=e.context,u=[],c=Number.MAX_VALUE,h=Number.MIN_VALUE;for(r=0;r<i;r++){o=t[r];u.push(o.geometry),c=Math.min(c,o.minimumHeight),h=Math.max(h,o.maximumHeight)}s.createModifyVertexArray(l,this,a,u,c,h,!1),e$2b(s.modifyTerrainVertexArray)&&xe$i(l,this,a,n,u,c,h,!0)}}}else this._modifyRegions.length>0&&this._updateModifyTiles(e,this._modifyRegions.values)},A$S.prototype.clearCustomClipBox=function(){this._clipping=!1,this._clipMode=0},A$S.prototype.setCustomClipBox=function(e){if(!((e=e||{}).dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$16("dimensions position is required to create CustomClipBox");if(this._clipMode=2,e$2b(e.clipMode))switch(e.clipMode){case"clip_behind_any_plane":this._clipMode=1;break;case"clip_behind_all_plane":this._clipMode=2;break;case"only_keep_line":this._clipMode=3}if(e.clipLineColor&&e.clipLineColor instanceof e$1U&&(this._clipLineColor=new e$29(e.clipLineColor.red,e.clipLineColor.green,e.clipLineColor.blue,e.clipLineColor.alpha)),e.dimensions){var t=new p$1d,i=e.position,n=new i$15(e.heading||0,e.pitch||0,e.roll||0);m$17.headingPitchRollToFixedFrame(i,n,t$13.WGS84,t);var r=.5*e.dimensions.x,o=.5*e.dimensions.y,a=.5*e.dimensions.z,s=[];s[0]=new e$29,s[0].x=-r,s[0].y=o,s[0].z=a,s[0].w=1,s[1]=new e$29,s[1].x=r,s[1].y=o,s[1].z=a,s[1].w=1,s[2]=new e$29,s[2].x=r,s[2].y=-o,s[2].z=a,s[2].w=1,s[3]=new e$29,s[3].x=-r,s[3].y=-o,s[3].z=a,s[3].w=1,s[4]=new e$29,s[4].x=-r,s[4].y=o,s[4].z=-a,s[4].w=1,s[5]=new e$29,s[5].x=r,s[5].y=o,s[5].z=-a,s[5].w=1,s[6]=new e$29,s[6].x=r,s[6].y=-o,s[6].z=-a,s[6].w=1,s[7]=new e$29,s[7].x=-r,s[7].y=-o,s[7].z=-a,s[7].w=1;for(var l=0;l<8;l++)p$1d.multiplyByVector(t,s[l],s[l]);this._oriClipPlane[0]=e$29.clone(He$8(s[0],s[1],s[2])),this._oriClipPlane[1]=e$29.clone(He$8(s[0],s[4],s[1])),this._oriClipPlane[2]=e$29.clone(He$8(s[0],s[3],s[4])),this._oriClipPlane[3]=e$29.clone(He$8(s[6],s[2],s[5])),this._oriClipPlane[4]=e$29.clone(He$8(s[6],s[7],s[2])),this._oriClipPlane[5]=e$29.clone(He$8(s[6],s[5],s[7]))}else for(l=0;l<e.planePos.length;l++){var u=e.planePos[l],c=e.planeNormal[l];this._oriClipPlane[l].x=c.x,this._oriClipPlane[l].y=c.y,this._oriClipPlane[l].z=c.z,this._oriClipPlane[l].w=-o$1p.dot(u,c)}this._clipping=!0},A$S.prototype.removeAllModifyRegion=function(){for(var e=this._modifyRegions.values,t=0;t<e.length;t++){var i=e[t];e$2b(i.command)&&(i.command.vertexArray=i.command.vertexArray&&!i.command.vertexArray.isDestroyed()&&i.command.vertexArray.destroy(),i.command.shaderProgram=i.command.shaderProgram&&!i.command.shaderProgram.isDestroyed()&&i.command.shaderProgram.destroy()),i.command=void 0}this._modifyRegions.removeAll(),this._modifyTilesMap={},this._modifyRegionUpdate=!1},A$S.prototype.removeAllExcavationRegion=function(){},A$S.prototype.removeAllExtractRegion=function(){},A$S.prototype.isDestroyed=function(){return!1},A$S.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this.removeAllExcavationRegion(),this.removeAllModifyRegion(),this.removeAllExtractRegion(),this._hypsometricTexture=this._hypsometricTexture&&this._hypsometricTexture.destroy(),this._slopeArrowsTexture=this._slopeArrowsTexture&&this._slopeArrowsTexture.destroy();for(var e=0;e<this._rasterTextureSizes.length;e++)e$2b(this._rasterLineFBOs[e])&&this._rasterLineFBOs[e].destroy(),this._rasterAAFBOs.length>0&&this._rasterAAFBOs[e].destroy();return i$10(this)};var _$H=new a$V,ne$y=new o$15,se$o=new o$1p;function ue$q(e,t,i){if(!(u=e.camera).bReflect){var n=t,r=n.width,o=n.height,a=6378137*Math.cos(n.south+.5*o)*Math.sin(r)*.5,s=6378137*Math.sin(o)*.5;r=a,o=s;var l=u.frustum.clone(ne$y),u=e.camera;i.isUpdate=!0,e$2b(i._beginFunc)||(i._beginFunc=function(){i.oldCameraParameter={destination:o$1p.clone(u.position,se$o),orientation:{heading:u.heading,pitch:u.pitch,roll:u.roll}},u.setView({destination:o$1p.fromRadians(n.west+.5*n.width,n.south+.5*n.height,1e3)}),_$H.width=2*r,_$H.height=2*o,_$H.near=1,_$H.far=1e4,_$H.aspectRatio=r/o,u.frustum=_$H,e.context.uniformState.updateFrustum(_$H)}),e$2b(i._endFunc)||(i._endFunc=function(){i.isUpdate=!1,u.frustum=l,u.setView(i.oldCameraParameter),e.context.uniformState.updateFrustum(u.frustum)})}}function n$G(){this.times=void 0,this.points=void 0,t$16.throwInstantiationError()}function r$P(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).points,i=e.times;if(!e$2b(t)||!e$2b(i))throw new t$16("points and times are required.");if(t.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$16("times.length must be equal to points.length.");this._times=i,this._points=t,this._lastTimeIndex=0}function c$M(e){var t=e.points,i=e.times;return function(n,r){e$2b(r)||(r=new n$13);var o=e._lastTimeIndex=e.findTimeInterval(n,e._lastTimeIndex),a=(n-i[o])/(i[o+1]-i[o]),s=t[o],l=t[o+1];return n$13.fastSlerp(s,l,a,r)}}function r$O(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).points,i=e.times;if(!e$2b(t)||!e$2b(i))throw new t$16("points and times are required.");if(t.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$16("times.length must be equal to points.length.");this._times=i,this._points=t,this._evaluateFunction=c$M(this),this._lastTimeIndex=0}function n$F(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).points,i=e.times;if(!e$2b(t)||!e$2b(i))throw new t$16("points and times are required.");if(2!==i.length)throw new t$16("times.length must be equal to 2.");if(2!==t.length)throw new t$16("points.length must be equal to 2.");this._mode=u$_(e.mode,0),this._acceleration=2*o$1p.distance(t[1],t[0])/((i[1]-i[0])*(i[1]-i[0])),this._points=t,this._times=i,this._direction=o$1p.subtract(t[1],t[0],new o$1p),this._duration=this._times[1]-this._times[0],o$1p.normalize(this._direction,this._direction)}b$W._createExcavationSideCommand=function(e,t,i){var n=t._excavateRegionCommands;if(!n.contains(i.name+"side")){for(var r=e.context,o=p$1d.inverse(i._excavateMatrix,new p$1d),a=i.positions,s=i.rectangle,l=s.east-s.west,u=s.north-s.south,c=a.length/3,h=new Float32Array(8*c),d=new Float32Array(6*c),f=new Float32Array(4*c),p=new Uint16Array(6*c),_=new o$1p,m=0;m<c;m++){var g=o$1p.fromDegrees(a[3*m+0],a[3*m+1],-1e3),x=o$1p.fromDegrees(a[3*m+0],a[3*m+1],1e3);_.x=g.x,_.y=g.y,_.z=g.z,_.w=1,p$1d.multiplyByVector(o,_,_),g.x=_.x,g.y=_.y,g.z=_.z,_.x=x.x,_.y=x.y,_.z=x.z,_.w=1,p$1d.multiplyByVector(o,_,_),x.x=_.x,x.y=_.y,x.z=_.z,h[8*m]=x.x,h[8*m+1]=x.y,h[8*m+2]=x.z,h[8*m+3]=1e3,h[8*m+4]=g.x,h[8*m+5]=g.y,h[8*m+6]=g.z,h[8*m+7]=-1e3,d[6*m+0]=d[6*m+3]=(e$2a.toRadians(a[3*m+0])-s.west)/l,d[6*m+1]=d[6*m+4]=(e$2a.toRadians(a[3*m+1])-s.south)/u,d[6*m+2]=d[6*m+5]=i.height,f[4*m+0]=m/(c-1),f[4*m+1]=1,f[4*m+2]=m/(c-1),f[4*m+3]=0}for(m=0;m<c-1;m++)p[6*m+0]=0+2*m,p[6*m+1]=2+2*m,p[6*m+2]=3+2*m,p[6*m+3]=0+2*m,p[6*m+4]=3+2*m,p[6*m+5]=1+2*m;p[6*(c-1)+0]=0+2*(c-1),p[6*(c-1)+1]=0,p[6*(c-1)+2]=1,p[6*(c-1)+3]=0+2*(c-1),p[6*(c-1)+4]=1,p[6*(c-1)+5]=1+2*(c-1);var v=t$Y.createVertexBuffer({context:r,typedArray:h,usage:A$19.STATIC_DRAW}),y=t$Y.createVertexBuffer({context:r,typedArray:d,usage:A$19.STATIC_DRAW}),$=t$Y.createVertexBuffer({context:r,typedArray:f,usage:A$19.STATIC_DRAW}),b=[],T={aPosition:0,aTexCoord0:1,aTexCoord1:2};b.push({name:"aPosition",index:T.aPosition,vertexBuffer:v,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),b.push({name:"aTexCoord0",index:T.aTexCoord0,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),b.push({name:"aTexCoord1",index:T.aTexCoord1,vertexBuffer:$,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var C=t$Y.createIndexBuffer({context:r,typedArray:p,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),S=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:i._excavateMatrix,pass:Le$s.OPAQUE,owner:t,cull:!1});S.vertexArray=new c$12({context:r,attributes:b,indexBuffer:C});var w=new s$U({name:"ExcavationRegionSideVp",sources:[Z$J]}),E=new s$U({name:"ExcavationRegionSideFp",sources:[$$N]});S.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:w,fragmentShaderSource:E,attributeLocations:T}),S.renderState=d$1m.fromCache({cull:{enabled:!1,face:de$x.BACK},depthTest:{enabled:!0}}),S.uniformMap={uRasterTexture:function(){return window.texture11=i.heightBuffer._renderTexture._fb.getColorTexture(0),window.texture11},uColorTexture:function(){return e$2b(t._excavationSideTexture)?t._excavationSideTexture:r.defaultTexture}},n.set(i.name+"side",S);var P=new t$F(e.context);i.heightBuffer=P,P.useType=4,P.environmentVisible.isOnlyS3MObjectVisible=!0;var A=t instanceof A$S?"Globe":"Layer";e._framebufferList["_excavationHeight"+A+i.name]=P,ue$q(e,i.rectangle,P)}},b$W._createExcavationBottomCommand=function(e,t,i){var n=t._excavateRegionCommands;if(!n.contains(i.name+"bottom")){var r=e.context,o=new i$_({primitiveType:W$18.TRIANGLES,pass:Le$s.OPAQUE,modelMatrix:i._excavateMatrix});n.set(i.name+"bottom",o);for(var a=new o$1p,s=[],l=i._geometry,u=0;u<l.attributes.position.values.length;u+=3)a.x=l.attributes.position.values[u],a.y=l.attributes.position.values[u+1],a.z=l.attributes.position.values[u+2],p$1d.multiplyByPoint(t._matModel,a,a),a=a$18.fromCartesian(a),s.push(e$2a.toDegrees(a.longitude)),s.push(e$2a.toDegrees(a.latitude)),s.push(i.height);var c=p$1d.inverse(i._excavateMatrix,new p$1d),h=o$1p.fromDegreesArrayHeights(s),d=new Float32Array(4*h.length);for(u=0;u<h.length;u++)a.x=h[u].x,a.y=h[u].y,a.z=h[u].z,a.w=1,p$1d.multiplyByVector(c,a,a),d[4*u]=a.x,d[4*u+1]=a.y,d[4*u+2]=a.z,d[4*u+3]=a.z;var f=i.colorGeometry.attributes.position;f.values=d,f.componentsPerAttribute=4,f.componentDatatype=S$12.FLOAT,o.vertexArray=c$12.fromGeometry({context:r,geometry:i.colorGeometry,attributeLocations:{position:0,st:1,normal:2},bufferUsage:A$19.STATIC_DRAW,interleave:!0});var p=["attribute vec3 position;","attribute vec2 texCoord;","varying vec2 v_texCoord;","void main()","{"," v_texCoord = texCoord;"," gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);","}"].join("\n"),_=["varying vec2 v_texCoord;","uniform sampler2D texture1;","void main()","{"," gl_FragColor = texture2D(texture1, v_texCoord);","}"].join("\n"),m=new s$U({sources:[p]}),g=new s$U({sources:[_]});o.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:m,fragmentShaderSource:g,attributeLocations:{position:0,texCoord:1}}),o.uniformMap={texture1:function(){return e$2b(t._excavationBottomTexture)?t._excavationBottomTexture:r.defaultTexture}},o.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND})}},b$W.createExcavationSideTexture=function(e,t){t._excavationSideTexture||o$1l(t$11.createIfNeeded(n$15("Assets/Textures/excavationregion_side.jpg")).fetchImage(),(function(i){t._excavationSideTexture=new t$V({context:e.context,source:i})}))},b$W.createExcavationBottomTexture=function(e,t){t._excavationBottomTexture||o$1l(t$11.createIfNeeded(n$15("Assets/Textures/excavationregion_top.jpg")).fetchImage(),(function(i){t._excavationBottomTexture=new t$V({context:e.context,source:i})}))},n$G.prototype.evaluate=t$16.throwInstantiationError,n$G.prototype.findTimeInterval=function(e,t){var i,n=this.times,r=n.length;if(!e$2b(e))throw new t$16("time is required.");if(e<n[0]||e>n[r-1])throw new t$16("time is out of range.");if(e>=n[t=u$_(t,0)]){if(t+1<r&&e<n[t+1])return t;if(t+2<r&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;if(e>n[t])for(i=t;i<r-1&&!(e>=n[i]&&e<n[i+1]);++i);else for(i=t-1;i>=0&&!(e>=n[i]&&e<n[i+1]);--i);return i===r-1&&(i=r-2),i},n$G.prototype.wrapTime=function(e){o$1q.typeOf.number("time",e);var t=this.times,i=t[t.length-1],n=t[0],r=i-n;return e<n&&(e+=(Math.floor((n-e)/r)+1)*r),e>i&&(e-=(Math.floor((e-i)/r)+1)*r),e},n$G.prototype.clampTime=function(e){o$1q.typeOf.number("time",e);var t=this.times;return e$2a.clamp(e,t[0],t[t.length-1])},Object.defineProperties(r$P.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),r$P.prototype.findTimeInterval=n$G.prototype.findTimeInterval,r$P.prototype.wrapTime=n$G.prototype.wrapTime,r$P.prototype.clampTime=n$G.prototype.clampTime,r$P.prototype.evaluate=function(e,t){var i=this.points,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);return e$2b(t)||(t=new o$1p),o$1p.lerp(i[r],i[r+1],o,t)},Object.defineProperties(r$O.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),r$O.prototype.findTimeInterval=n$G.prototype.findTimeInterval,r$O.prototype.wrapTime=n$G.prototype.wrapTime,r$O.prototype.clampTime=n$G.prototype.clampTime,r$O.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},Object.defineProperties(n$F.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),n$F.prototype.clampTime=function(e){return e},n$F.prototype.evaluate=function(e,t){e$2b(t)||(t=new o$1p);var i,n=this._points;(e-=this._times[0],0===this._mode)?i=.5*this._acceleration*e*e:i=this._acceleration*this._duration*e-.5*this._acceleration*e*e;return o$1p.multiplyByScalar(this._direction,i,t),o$1p.add(n[0],t,t),t};var _0x4bc0c3=(_0x25d47d=!0,function(e,t){var i=_0x25d47d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x25d47d=!1,i}),_0x5e134d=_0x4bc0c3(void 0,(function(){return _0x5e134d.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e134d).search("(((.+)+)+)+$")})),_0x25d47d;_0x5e134d();var _0x265574={Linear:0,Acceleration:1,Deceleration:2,CubicSpline:3,SmoothStep:4},_0x186188=Object.freeze(_0x265574),m$N={solve:function(e,t,i,n){if(!(e$2b(e)&&e instanceof Array))throw new t$16("The array lower is required.");if(!(e$2b(t)&&t instanceof Array))throw new t$16("The array diagonal is required.");if(!(e$2b(i)&&i instanceof Array))throw new t$16("The array upper is required.");if(!(e$2b(n)&&n instanceof Array))throw new t$16("The array right is required.");if(t.length!==n.length)throw new t$16("diagonal and right must have the same lengths.");if(e.length!==i.length)throw new t$16("lower and upper must have the same lengths.");if(e.length!==t.length-1)throw new t$16("lower and upper must be one less than the length of diagonal.");var r,o,a=new Array(i.length),s=new Array(n.length),l=new Array(n.length);for(r=0;r<s.length;r++)s[r]=new o$1p,l[r]=new o$1p;for(a[0]=i[0]/t[0],s[0]=o$1p.multiplyByScalar(n[0],1/t[0],s[0]),r=1;r<a.length;++r)o=1/(t[r]-a[r-1]*e[r-1]),a[r]=i[r]*o,s[r]=o$1p.subtract(n[r],o$1p.multiplyByScalar(s[r-1],e[r-1],s[r]),s[r]),s[r]=o$1p.multiplyByScalar(s[r],o,s[r]);for(o=1/(t[r]-a[r-1]*e[r-1]),s[r]=o$1p.subtract(n[r],o$1p.multiplyByScalar(s[r-1],e[r-1],s[r]),s[r]),s[r]=o$1p.multiplyByScalar(s[r],o,s[r]),l[l.length-1]=s[s.length-1],r=l.length-2;r>=0;--r)l[r]=o$1p.subtract(s[r],o$1p.multiplyByScalar(l[r+1],a[r],l[r]),l[r]);return l}},y$I=[],b$V=[],_$G=[],B$H=[];function C$L(e,t,i){var n,r=y$I,o=_$G,a=b$V,s=B$H;r.length=o.length=e.length-1,a.length=s.length=e.length,r[0]=a[0]=1,o[0]=0;var l=s[0];for(e$2b(l)||(l=s[0]=new o$1p),o$1p.clone(t,l),n=1;n<r.length-1;++n)r[n]=o[n]=1,a[n]=4,e$2b(l=s[n])||(l=s[n]=new o$1p),o$1p.subtract(e[n+1],e[n-1],l),o$1p.multiplyByScalar(l,3,l);return r[n]=0,o[n]=1,a[n]=4,e$2b(l=s[n])||(l=s[n]=new o$1p),o$1p.subtract(e[n+1],e[n-1],l),o$1p.multiplyByScalar(l,3,l),a[n+1]=1,e$2b(l=s[n+1])||(l=s[n+1]=new o$1p),o$1p.clone(i,l),m$N.solve(r,a,o,s)}function q$P(e){var t,i=y$I,n=_$G,r=b$V,o=B$H;i.length=n.length=e.length-1,r.length=o.length=e.length,i[0]=n[0]=1,r[0]=2;var a=o[0];for(e$2b(a)||(a=o[0]=new o$1p),o$1p.subtract(e[1],e[0],a),o$1p.multiplyByScalar(a,3,a),t=1;t<i.length;++t)i[t]=n[t]=1,r[t]=4,e$2b(a=o[t])||(a=o[t]=new o$1p),o$1p.subtract(e[t+1],e[t-1],a),o$1p.multiplyByScalar(a,3,a);return r[t]=2,e$2b(a=o[t])||(a=o[t]=new o$1p),o$1p.subtract(e[t],e[t-1],a),o$1p.multiplyByScalar(a,3,a),m$N.solve(i,r,n,o)}function m$M(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).points,i=e.times,n=e.inTangents,r=e.outTangents;if(!(e$2b(t)&&e$2b(i)&&e$2b(n)&&e$2b(r)))throw new t$16("times, points, inTangents, and outTangents are required.");if(t.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$16("times.length must be equal to points.length.");if(n.length!==r.length||n.length!==t.length-1)throw new t$16("inTangents and outTangents must have a length equal to points.length - 1.");this._times=i,this._points=t,this._inTangents=n,this._outTangents=r,this._lastTimeIndex=0}Object.defineProperties(m$M.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}}),m$M.createC1=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).times,i=e.points,n=e.tangents;if(!e$2b(i)||!e$2b(t)||!e$2b(n))throw new t$16("points, times and tangents are required.");if(i.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(t.length!==i.length||t.length!==n.length)throw new t$16("times, points and tangents must have the same length.");var r=n.slice(0,n.length-1);return new m$M({times:t,points:i,inTangents:n.slice(1,n.length),outTangents:r})},m$M.createNaturalCubic=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).times,i=e.points;if(!e$2b(i)||!e$2b(t))throw new t$16("points and times are required.");if(i.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(t.length!==i.length)throw new t$16("times.length must be equal to points.length.");if(i.length<3)return new r$P({points:i,times:t});var n=q$P(i),r=n.slice(0,n.length-1);return new m$M({times:t,points:i,inTangents:n.slice(1,n.length),outTangents:r})},m$M.createClampedCubic=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).times,i=e.points,n=e.firstTangent,r=e.lastTangent;if(!(e$2b(i)&&e$2b(t)&&e$2b(n)&&e$2b(r)))throw new t$16("points, times, firstTangent and lastTangent are required.");if(i.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(t.length!==i.length)throw new t$16("times.length must be equal to points.length.");if(i.length<3)return new r$P({points:i,times:t});var o=C$L(i,n,r),a=o.slice(0,o.length-1);return new m$M({times:t,points:i,inTangents:o.slice(1,o.length),outTangents:a})},m$M.hermiteCoefficientMatrix=new p$1d(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0),m$M.prototype.findTimeInterval=n$G.prototype.findTimeInterval;var x$P=new e$29,c$L=new o$1p;m$M.prototype.wrapTime=n$G.prototype.wrapTime,m$M.prototype.clampTime=n$G.prototype.clampTime,m$M.prototype.evaluate=function(e,t){e$2b(t)||(t=new o$1p);var i=this.points,n=this.times,r=this.inTangents,o=this.outTangents,a=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),s=(e-n[a])/(n[a+1]-n[a]),l=x$P;l.z=s,l.y=s*s,l.x=l.y*s,l.w=1;var u=p$1d.multiplyByVector(m$M.hermiteCoefficientMatrix,l,l);return t=o$1p.multiplyByScalar(i[a],u.x,t),o$1p.multiplyByScalar(i[a+1],u.y,c$L),o$1p.add(t,c$L,t),o$1p.multiplyByScalar(o[a],u.z,c$L),o$1p.add(t,c$L,t),o$1p.multiplyByScalar(r[a],u.w,c$L),o$1p.add(t,c$L,t)};var M$N=new e$29,C$K=new o$1p,s$E=new o$1p;function V$B(e){var t=e.points,i=e.times;if(t.length<3){var n=i[0],r=1/(i[1]-n),o=t[0],a=t[1];return function(e,t){e$2b(t)||(t=new o$1p);var i=(e-n)*r;return o$1p.lerp(o,a,i,t)}}return function(n,r){e$2b(r)||(r=new o$1p);var o,a,s,l,u,c=e._lastTimeIndex=e.findTimeInterval(n,e._lastTimeIndex),h=(n-i[c])/(i[c+1]-i[c]),d=M$N;return d.z=h,d.y=h*h,d.x=d.y*h,d.w=1,0===c?(o=t[0],a=t[1],s=e.firstTangent,l=o$1p.subtract(t[2],o,C$K),o$1p.multiplyByScalar(l,.5,l),u=p$1d.multiplyByVector(m$M.hermiteCoefficientMatrix,d,d)):c===t.length-2?(o=t[c],a=t[c+1],l=e.lastTangent,s=o$1p.subtract(a,t[c-1],C$K),o$1p.multiplyByScalar(s,.5,s),u=p$1d.multiplyByVector(m$M.hermiteCoefficientMatrix,d,d)):(o=t[c-1],a=t[c],s=t[c+1],l=t[c+2],u=p$1d.multiplyByVector(c$K.catmullRomCoefficientMatrix,d,d)),r=o$1p.multiplyByScalar(o,u.x,r),o$1p.multiplyByScalar(a,u.y,s$E),o$1p.add(r,s$E,r),o$1p.multiplyByScalar(s,u.z,s$E),o$1p.add(r,s$E,r),o$1p.multiplyByScalar(l,u.w,s$E),o$1p.add(r,s$E,r)}}var O$z=new o$1p,E$L=new o$1p;function c$K(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).points,i=e.times,n=e.firstTangent,r=e.lastTangent;if(o$1q.defined("points",t),o$1q.defined("times",i),o$1q.typeOf.number.greaterThanOrEquals("points.length",t.length,2),o$1q.typeOf.number.equals("times.length","points.length",i.length,t.length),t.length>2&&(e$2b(n)||(n=O$z,o$1p.multiplyByScalar(t[1],2,n),o$1p.subtract(n,t[2],n),o$1p.subtract(n,t[0],n),o$1p.multiplyByScalar(n,.5,n)),!e$2b(r))){var o=t.length-1;r=E$L,o$1p.multiplyByScalar(t[o-1],2,r),o$1p.subtract(t[o],r,r),o$1p.add(r,t[o-2],r),o$1p.multiplyByScalar(r,.5,r)}this._times=i,this._points=t,this._firstTangent=o$1p.clone(n),this._lastTangent=o$1p.clone(r),this._evaluateFunction=V$B(this),this._lastTimeIndex=0}function r$N(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).points,i=e.times;if(!e$2b(t)||!e$2b(i))throw new t$16("points and times are required.");if(t.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$16("times.length must be equal to points.length.");this._times=i,this._points=t,this._lastTimeIndex=0}Object.defineProperties(c$K.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}}),c$K.catmullRomCoefficientMatrix=new p$1d(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0),c$K.prototype.findTimeInterval=n$G.prototype.findTimeInterval,c$K.prototype.wrapTime=n$G.prototype.wrapTime,c$K.prototype.clampTime=n$G.prototype.clampTime,c$K.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},Object.defineProperties(r$N.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),r$N.prototype.findTimeInterval=n$G.prototype.findTimeInterval,r$N.prototype.wrapTime=n$G.prototype.wrapTime,r$N.prototype.clampTime=n$G.prototype.clampTime,r$N.prototype.evaluate=function(e,t){var i=this.points,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);return o*=(3-2*o)*o,e$2b(t)||(t=new o$1p),o$1p.lerp(i[r],i[r+1],o,t)};var _0x3bca38=(_0x5b86cb=!0,function(e,t){var i=_0x5b86cb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b86cb=!1,i}),_0x13f35d=_0x3bca38(void 0,(function(){return _0x13f35d.toString().search("(((.+)+)+)+$").toString().constructor(_0x13f35d).search("(((.+)+)+)+$")})),_0x5b86cb;_0x13f35d();var _0x4744c1={None:0,First:1,Second:2},_0x3ba5f2=Object.freeze(_0x4744c1),j$L=[],D$H=[];function Q$I(e,t,i,n,r){var o=f$14.fromPoints(t,e).projectPointsOntoPlane(t,j$L);A$1g.computeWindingOrder2D(o)===W$13.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var a,s,l=t.length,u=0;if(n)for(a=new Float64Array(2*l*3),s=0;s<l;s++){var c=t[s],h=t[(s+1)%l];a[u++]=c.x,a[u++]=c.y,a[u++]=c.z,a[u++]=h.x,a[u++]=h.y,a[u++]=h.z}else{var d=0;if(r===m$1f.GEODESIC)for(s=0;s<l;s++)d+=y$_.subdivideLineCount(t[s],t[(s+1)%l],i);else if(r===m$1f.RHUMB)for(s=0;s<l;s++)d+=y$_.subdivideRhumbLineCount(e,t[s],t[(s+1)%l],i);for(a=new Float64Array(3*d),s=0;s<l;s++){var f;r===m$1f.GEODESIC?f=y$_.subdivideLine(t[s],t[(s+1)%l],i,D$H):r===m$1f.RHUMB&&(f=y$_.subdivideRhumbLine(e,t[s],t[(s+1)%l],i,D$H));for(var p=f.length,_=0;_<p;++_)a[u++]=f[_]}}var m=2*(l=a.length/3),g=ce$x.createTypedArray(l,m);for(u=0,s=0;s<l-1;s++)g[u++]=s,g[u++]=s+1;return g[u++]=l-1,g[u++]=0,new d$1o({geometry:new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:a})}),indices:g,primitiveType:W$18.LINES})})}function V$A(e,t,i,n,r){var o=f$14.fromPoints(t,e).projectPointsOntoPlane(t,j$L);A$1g.computeWindingOrder2D(o)===W$13.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var a,s,l=t.length,u=new Array(l),c=0;if(n)for(a=new Float64Array(2*l*3*2),s=0;s<l;++s){u[s]=c/3;var h=t[s],d=t[(s+1)%l];a[c++]=h.x,a[c++]=h.y,a[c++]=h.z,a[c++]=d.x,a[c++]=d.y,a[c++]=d.z}else{var f=0;if(r===m$1f.GEODESIC)for(s=0;s<l;s++)f+=y$_.subdivideLineCount(t[s],t[(s+1)%l],i);else if(r===m$1f.RHUMB)for(s=0;s<l;s++)f+=y$_.subdivideRhumbLineCount(e,t[s],t[(s+1)%l],i);for(a=new Float64Array(3*f*2),s=0;s<l;++s){var p;u[s]=c/3,r===m$1f.GEODESIC?p=y$_.subdivideLine(t[s],t[(s+1)%l],i,D$H):r===m$1f.RHUMB&&(p=y$_.subdivideRhumbLine(e,t[s],t[(s+1)%l],i,D$H));for(var _=p.length,m=0;m<_;++m)a[c++]=p[m]}}l=a.length/6;var g=u.length,x=2*(2*l+g),v=ce$x.createTypedArray(l,x);for(c=0,s=0;s<l;++s)v[c++]=s,v[c++]=(s+1)%l,v[c++]=s+l,v[c++]=(s+1)%l+l;for(s=0;s<g;s++){var y=u[s];v[c++]=y,v[c++]=y+l}return new d$1o({geometry:new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:a})}),indices:v,primitiveType:W$18.LINES})})}function A$R(e){if(o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&e$2b(e.height))throw new t$16("Cannot use both options.perPositionHeight and options.height");if(e$2b(e.arcType)&&e.arcType!==m$1f.GEODESIC&&e.arcType!==m$1f.RHUMB)throw new t$16("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var t=e.polygonHierarchy,i=u$_(e.ellipsoid,t$13.WGS84),n=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),r=u$_(e.perPositionHeight,!1),o=r&&e$2b(e.extrudedHeight),a=u$_(e.arcType,m$1f.GEODESIC),s=u$_(e.height,0),l=u$_(e.extrudedHeight,s);if(!o){var u=Math.max(s,l);l=Math.min(s,l),s=u}this._ellipsoid=t$13.clone(i),this._granularity=n,this._height=s,this._extrudedHeight=l,this._arcType=a,this._polygonHierarchy=t,this._perPositionHeight=r,this._perPositionHeightExtrude=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=y$_.computeHierarchyPackedLength(t)+t$13.packedLength+8}A$R.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),i=y$_.packPolygonHierarchy(e._polygonHierarchy,t,i),t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._arcType,t[i++]=u$_(e._offsetAttribute,-1),t[i]=e.packedLength,t};var X$H=t$13.clone(t$13.UNIT_SPHERE),Z$G={polygonHierarchy:{}};function n$E(e){e=e||[],this._extrudedHeight=void 0,this._closeTop=!0,this._closeBottom=!0,this.init(e)}function c$J(e){for(var t=Number.MAX_VALUE,i=-Number.MAX_VALUE,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=0;o<e.length;o++){var a=e[o];t=Math.min(a.x,t),i=Math.max(a.x,i),n=Math.min(a.y,n),r=Math.max(a.y,r)}return{minLon:t,maxLon:i,minLat:n,maxLat:r}}A$R.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=y$_.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=t$13.unpack(e,t,X$H);t+=t$13.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=1===e[t++],u=1===e[t++],c=e[t++],h=e[t++],d=e[t];return e$2b(i)||(i=new A$R(Z$G)),i._polygonHierarchy=n,i._ellipsoid=t$13.clone(r,i._ellipsoid),i._height=o,i._extrudedHeight=a,i._granularity=s,i._perPositionHeight=u,i._perPositionHeightExtrude=l,i._arcType=c,i._offsetAttribute=-1===h?void 0:h,i.packedLength=d,i},A$R.fromPositions=function(e){return e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new A$R({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute})},A$R.createGeometry=function(e){var t=e._ellipsoid,i=e._granularity,n=e._polygonHierarchy,r=e._perPositionHeight,o=e._arcType,a=y$_.polygonOutlinesFromHierarchy(n,!r,t);if(0!==a.length){var s,l,u=[],c=e$2a.chordLength(i,t.maximumRadius),h=e._height,d=e._extrudedHeight;if(e._perPositionHeightExtrude||!e$2a.equalsEpsilon(h,d,0,e$2a.EPSILON2))for(l=0;l<a.length;l++){if((s=V$A(t,a[l],c,r,o)).geometry=y$_.scaleToGeodeticHeightExtruded(s.geometry,h,d,t,r),e$2b(e._offsetAttribute)){var f=s.geometry.attributes.position.values.length/3,p=new Uint8Array(f);e._offsetAttribute===_0x58701d.TOP?p=d$1s(p,1,0,f/2):p=d$1s(p,e._offsetAttribute===_0x58701d.NONE?0:1),s.geometry.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}u.push(s)}else for(l=0;l<a.length;l++){if((s=Q$I(t,a[l],c,r,o)).geometry.attributes.position.values=A$1g.scaleToGeodeticHeight(s.geometry.attributes.position.values,h,t,!r),e$2b(e._offsetAttribute)){var _=s.geometry.attributes.position.values.length,m=new Uint8Array(_/3);d$1s(m,e._offsetAttribute===_0x58701d.NONE?0:1),s.geometry.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}u.push(s)}var g=k$13.combineInstances(u)[0],x=i$1c.fromVertices(g.attributes.position.values);return new I$1p({attributes:g.attributes,indices:g.indices,primitiveType:g.primitiveType,boundingSphere:x,offsetAttribute:e._offsetAttribute})}},n$E.prototype=new o$11,n$E.prototype.constructor=n$E,n$E.prototype.parent=o$11.prototype,Object.defineProperties(n$E.prototype,{partCount:{get:function(){return this.parts.length}},extrudedHeight:{get:function(){return this._extrudedHeight},set:function(e){this._extrudedHeight=e,this.polygon.extrudedHeight=e,this._isGeometryDirty=!0}},closeTop:{set:function(e){this._closeTop=e,this.polygon.closeTop=e,this._isGeometryDirty=!0}},closeBottom:{set:function(e){this._closeBottom=e,this.polygon.closeBottom=e,this._isGeometryDirty=!0}},bottomAltitude:{get:function(){return this.polygon.height},set:function(e){this.polygon.height=e,this.polygon.perPositionHeight=!1,this._isGeometryDirty=!0}}}),n$E.prototype.init=function(e){this.type=P$U.GEOREGION3D,this.parts=[],this.points=[],this.polygon={positions:[],extrudedHeight:this.extrudedHeight,closeTop:this._closeTop,closeBottom:this._closeBottom,perPositionHeight:!0};for(var t=0,i=e.length;t<i;t++){var n=e[t].pntArray.length;if(this.parts.push(n),n>0)for(var r=0;r<n;r++)this.polygon.positions.push(o$1p.fromDegrees(e[t].pntArray[r].x,e[t].pntArray[r].y,e[t].pntArray[r].z)),this.points.push(new s$M(e[t].pntArray[r].x,e[t].pntArray[r].y,e[t].pntArray[r].z))}this.type=P$U.GEOREGION3D;var o=c$J(this.points),a=o$1p.fromDegrees(o.minLon,o.maxLat,0),s=o$1p.fromDegrees(o.maxLon,o.maxLat,0),l=o$1p.fromDegrees(o.minLon,o.minLat,0);this.width=o$1p.distance(a,s),this.height=o$1p.distance(a,l)},n$E.prototype.addPart=function(e){if(!(!e instanceof t$M)){for(var t=0,i=e.pntArray.length;t<i;t++){var n=e.pntArray[t];this.points.push(n),this.polygon.positions.push(o$1p.fromDegrees(n.x,n.y,n.z))}this.parts.push(e.pntArray.length)}},n$E.prototype.getPart=function(e){if("number"!=typeof e||e>=this.partCount)return null;for(var t=new t$M,i=0,n=0;n<e;n++)i+=this.parts[n];for(n=i;n<this.parts[e];n++)t.add(new s$M(this.points[n].x,this.points[n].y,this.points[n].z));return t},n$E.prototype._createGeometry=function(){var e=z$_.fromPositions(this.polygon);this._geometry=z$_.createGeometry(e),this._isGeometryDirty=!1};const _0x33085f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2bd048=_0x33085f(void 0,(function(){return _0x2bd048.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bd048).search("(((.+)+)+)+$")}));_0x2bd048();const _0x3e247e="uExcavationTexture",_0x18c5c2="uEmissionTexAtlas",_0x3dbc30="uFrontColorTexture",_0xa67472="uFrontDepthTexture",_0x53a5d5="uBackDepthTexture",_0x366751="uCategorieTexture",_0x4ea79b="uOverlayTexture",_0x431981="uFlattenTexture",_0x2a4e3b="uHypsometricTexture",_0x1f609="uHypsometricRenderTexture",_0xbbfeb6="uNormalDepthTexture";function _0x473d2d(e){var t=_0x3e2f69.call(this)||this;t._layer=e,t._hasExcavation=e._hasExcavation,t._textures={},t._name=_0x27131a.LAYER,t._lastTextureUpdateFrame=-1,this._initUniformMap()}function _0x21ffef(e){return 1!==e._brightness||1!==e._contrast||0!==e._hue||1!==e._saturation||1!==e._gamma}function _0x4c279e(e){var t=e._fileType;return t===d$15.ClampGroundPolygon||t===d$15.ClampObjectPolygon||t===d$15.ExtendClampPolygonCache||t===d$15.ClampGroundLine||t===d$15.ClampObjectLine}_0x3e2f69&&(_0x473d2d.__proto__=_0x3e2f69),_0x473d2d.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x473d2d.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x473d2d.prototype,{}),_0x473d2d.prototype._initUBOStruct=function(){this._ubo.addUniform("uSelColor",4),this._ubo.addUniform("uTranslationAndBottom",4),this._ubo.addUniform("uFillForeColor",4),this._ubo.addUniform("uPolygonOffset",4),this._ubo.addUniform("uPointSize",1),this._ubo.addUniform("uMinMaxTransparent",2),this._ubo.addUniform("uTransparentFilter",1),this._ubo.addUniform("uHypLineColor",4),this._ubo.addUniform("uNoValueColor",4),this._ubo.addUniform("uHypRect",4),this._ubo.addUniform("uHypHasAnalysisRegion",1),this._ubo.addUniform("uMixColorType",1),this._ubo.addUniform("uHypOpacity",1),this._ubo.addUniform("uHypContourInterval",1),this._ubo.addUniform("uHypContourFillMode",1),this._ubo.addUniform("uHypFloor",1),this._ubo.addUniform("uHypCeil",1),this._ubo.addUniform("uDataFloor",1),this._ubo.addUniform("uDataCeil",1),this._ubo.addUniform("uHypMaxVisibleValue",1),this._ubo.addUniform("uHypMinVisibleValue",1),this._ubo.addUniform("uHypsometricVisible",1),this._ubo.addUniform("uRect",4),this._ubo.addUniform("uCameraHeight",1),this._ubo.addUniform("uExcavationRect",4),this._ubo.addUniform("uServerExcavationRect",4),this._ubo.addUniform("uExcavationMode",1),this._ubo.addUniform("uServerExcavationMode",1),this._ubo.addUniform("uSwipeRegion",4),this._ubo.addUniform("uBrightness",1),this._ubo.addUniform("uContrast",1),this._ubo.addUniform("uHue",1),this._ubo.addUniform("uSaturation",1),this._ubo.addUniform("uOneOverGamma",1),this._ubo.addUniform("uClipPlanes",4,6),this._ubo.addUniform("uClipLineColor",4),this._ubo.addUniform("uClipMode",1),this._ubo.addUniform("uMaxCategory",1),this._ubo.addUniform("uMinCategory",1),this._ubo.addUniform("uCategoryWidht",1),this._ubo.addUniform("uCategoryHeight",1),this._ubo.addUniform("uLineColor",4),this._ubo.addUniform("uLineWidth",1),this._ubo.addUniform("uFillStyle",1),this._ubo.addUniform("uTransparentBackColor",4),this._ubo.addUniform("uTransparentBackColorTolerance",1),this._ubo.addUniform("uVisibleDistanceMax",1),this._ubo.addUniform("uHorizontalColor",4),this._ubo.addUniform("uHorizontalLine",1),this._ubo.addUniform("uDistanceFalloffFactor",1),this._ubo.addUniform("uStrokesTextureScale",2),this._ubo.addUniform("uStrokesLog2Resolution",1),this._ubo.addUniform("uMinMaxTerrainHeightAndPickInfo",4),this._ubo.addUniform("uOverlayRect",4),this._ubo.addUniform("uEmissionTexAtlasTilingAndOffset",4,10),this._ubo.addUniform("uEmissionTexAtlasRects",4,10),this._ubo.addUniform("uEmissionColor",4),this._ubo.addUniform("uLayerBounds",4),this._ubo.addUniform("uLayerCornerLength",1),this._ubo.addUniform("uMaxCategoryOrHypCeil",1),this._ubo.addUniform("uMinCategoryOrHypFloor",1),this._ubo.addUniform("uEmissionTexAtlasCount",1),this._ubo.addUniform("uSnowCoverageFactor",1),this._ubo.addUniform("uAnimationSpeed",1),this._ubo.addUniform("uRippleScale",1),this._ubo.addUniform("uWindIntensity",1),this._ubo.addUniform("uRain",1),this._ubo.addUniform("uCameraDepth",1),this._ubo.addUniform("uWetnessFactor",1),this._ubo.addUniform("uSelectColorType",1)},_0x473d2d.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x473d2d.prototype._updateHypData=function(){const e=this._layer,t=e._hypsometricSetting,i=t.LineColor,n=t.noValueColor,r=e._hypsometricBound;this._ubo.updateFloat4("uHypLineColor",i.red,i.green,i.blue,i.alpha),this._ubo.updateFloat4("uNoValueColor",n.red,n.green,n.blue,n.alpha),this._ubo.updateFloat4("uHypRect",r.x,r.y,r.z,r.w),this._ubo.updateFloat("uHypHasAnalysisRegion",e._bUseHypRegion),this._ubo.updateFloat("uMixColorType",e._mixColorType),this._ubo.updateFloat("uHypOpacity",t.Opacity),this._ubo.updateFloat("uHypContourInterval",t.LineInterval);let o=1;switch(t.DisplayMode){case k$Q.DisplayMode.NONE:o=0;break;case k$Q.DisplayMode.FACE:o=1;break;case k$Q.DisplayMode.LINE:o=2;break;case k$Q.DisplayMode.FACE_AND_LINE:o=3}this._ubo.updateFloat("uHypContourFillMode",o),this._ubo.updateFloat("uHypFloor",t.ColorTableMinKey),this._ubo.updateFloat("uHypCeil",t.ColorTableMaxKey);let a=e._fMinValue===e._fMaxValue?0:e._fMinValue,s=e._fMinValue===e._fMaxValue?1:e._fMaxValue;this._ubo.updateFloat("uDataFloor",a),this._ubo.updateFloat("uDataCeil",s),this._ubo.updateFloat("uHypMaxVisibleValue",t.MaxVisibleValue),this._ubo.updateFloat("uHypMinVisibleValue",t.MinVisibleValue+e$2a.EPSILON5),this._ubo.updateFloat("uHypsometricVisible",1)},_0x473d2d.prototype._updateWVisibleData=function(){this._ubo.updateVector4("uMaxCategory",this._layer._bUseHypRegion),this._ubo.updateVector4("uMinCategory",this._layer._bUseHypRegion),this._ubo.updateVector4("uCategoryWidht",this._layer._bUseHypRegion),this._ubo.updateVector4("uCategoryHeight",this._layer._bUseHypRegion)},_0x473d2d.prototype._updateSwipe=function(){const e=this._layer,t=this._ubo,i=e._frameState.context,n=e._swipeRegion,r=i.drawingBufferWidth,o=e._frameState.context.drawingBufferHeight,a=n.x*r,s=(1-n.y)*o,l=n.z*r,u=(1-n.w)*o;t.updateFloat4("uSwipeRegion",a,s,l,u)},_0x473d2d.prototype._updateEmissive=function(){const e=this._layer,t=this._ubo,i=e._layerModelBounds,n=i.x,r=i.y,o=i.z-i.x,a=i.w-i.y,s=Math.sqrt(i.z*i.z+i.w*i.w);let l=100,u=0;const c=e._hypsometricSetting;if(e$2b(c)&&(0!==c._floor||0!==c._ceiling)&&(l=c._ceiling,u=c._floor),t.updateFloat4("uLayerBounds",n,r,o,a),t.updateFloat("uLayerCornerLength",s),t.updateFloat("uMaxCategoryOrHypCeil",l),t.updateFloat("uMinCategoryOrHypFloor",u),e$2b(c)){var h=c._getEmissionAtlasTextureRects(),d=c._getEmissionTexAtlasTilingAndOffset(),f=[],p=[];let e=Math.min(10,h.length);for(let t=0;t<e;t++){let e=h[t];e$29.pack(e,f,4*t);let i=d[t];e$29.pack(i,p,4*t)}t.updateFloatArray("uEmissionTexAtlasRects",f),t.updateFloatArray("uEmissionTexAtlasTilingAndOffset",p),t.updateFloat("uEmissionTexAtlasCount",e)}},_0x473d2d.prototype._updateClipValue=function(){const e=this._layer,t=this._ubo,i=e._clipLineColor,n=e._clipPlane,r=n.length,o=new Array(4*r);for(let e=0;e<r;e++){const t=n[e];o[4*e]=t.x,o[4*e+1]=t.y,o[4*e+2]=t.z,o[4*e+3]=t.w}t.updateFloatArray("uClipPlanes",o),t.updateFloat4("uClipLineColor",i.x,i.y,i.z,i.w),t.updateFloat("uClipMode",e._clipMode)},_0x473d2d.prototype._updateWireFrameSketch=function(){const e=this._layer,t=this._ubo;e$2b(e._edgeStrokesTexture)||e._initEdgeTexture(),t.updateFloat2("uStrokesTextureScale",e._strokesTextureScale.x,e._strokesTextureScale.y),t.updateFloat("uStrokesLog2Resolution",e._strokesLog2Resolution)},_0x473d2d.prototype.update=function(e,t){if(!e.webgpu&&!e.webgl2)return;e$2b(this._ubo)||this._initUBO(e);const i=this._layer,n=this._ubo,r=i.style3D,o=i.selectedColor,a=i.selectedTranslate,s=r.fillForeColor,l=r.emissionColor;this._ubo.updateFloat4("uSelColor",o.red,o.green,o.blue,o.alpha),this._ubo.updateFloat4("uTranslationAndBottom",a.x,a.y,a.z,r.bottomAltitude),this._ubo.updateFloat4("uFillForeColor",s.red,s.green,s.blue,s.alpha),this._ubo.updateFloat4("uEmissionColor",l.red,l.green,l.blue,l.alpha);var u=this._layer._rsColor.polygonOffset,c=0,h=0;e$2b(u)&&(c=u.factor,h=u.units),this._ubo.updateFloat4("uPolygonOffset",c,h,-5,-5),this._ubo.updateFloat("uPointSize",this._layer.style3D.pointSize);const d=r.lineColor,f=r.lineWidth;if(this._ubo.updateFloat4("uLineColor",d.red,d.green,d.blue,d.alpha),this._ubo.updateFloat("uLineWidth",f),this._layer._hasExcavation&&(this._ubo.updateFloat2("uExcavationMode",this._layer._excavationMode),this._ubo.updateFloat4("uExcavationRect",this._layer._excavationBounds.x,this._layer._excavationBounds.y,this._layer._excavationBounds.z,this._layer._excavationBounds.w)),n.updateFloat2("uMinMaxTransparent",i.minTransparentAlpha,i.maxTransparentAlpha),i._flattening&&(this._ubo.updateVector4("uRect",i._flattenBounds),this._ubo.updateFloat("uCameraHeight",i._frameState.camera.positionCartographic.height)),i._bUseHypColorTable&&this._updateHypData(),i._hasExcavation&&(n.updateVector4("uExcavationRect",i._excavationBounds),n.updateFloat("uExcavationMode",i._excavationMode)),i._hasServerExcavation&&(n.updateVector4("uServerExcavationRect",i._serverExcavationBounds),n.updateFloat("uServerExcavationMode",i._serverExcavationMode)),i.swipeEnabled&&this._updateSwipe(),i._hasEmissiveTexAtlas&&this._updateEmissive(),_0x21ffef(i)&&(n.updateFloat("uBrightness",i._brightness),n.updateFloat("uContrast",i._contrast),n.updateFloat("uHue",i._hue),n.updateFloat("uSaturation",i._saturation),n.updateFloat("uOneOverGamma",1/i._gamma)),i._clipping&&this._updateClipValue(),e$2b(i._categorieTexture)&&(n.updateFloat("uMaxCategory",i._hypMaxCategory),n.updateFloat("uMinCategory",i._hypMinCategory),n.updateFloat("uCategoryWidht",i._categorieTexture&&i._categorieTexture.width||256),n.updateFloat("uCategoryHeight",i._categorieTexture&&i._categorieTexture.height||1)),n.updateFloat("uFillStyle",i.style3D.fillStyle),i._transparentBackColorTolerance>0&&(n.updateColor("uTransparentBackColor",i._transparentBackColor),n.updateFloat("uTransparentBackColorTolerance",i._transparentBackColorTolerance)),i.visibleDistanceMax<6378137&&i.translucencyByDistance&&n.updateFloat("uVisibleDistanceMax",i._visibleDistanceMax),i.horizontalline&&(n.updateVector4("uHorizontalColor",i._HorizontalColor),n.updateFloat("uHorizontalLine",i._fHorizontalLine)),n.updateFloat("uDistanceFalloffFactor",i._edgeDistanceFalloffFactor),i.wireFrameMode===_0x15916e.Sketch&&this._updateWireFrameSketch(),_0x4c279e(i)&&n.updateFloat4("uMinMaxTerrainHeightAndPickInfo",i._shadowVolumeBottomHeight,i._shadowVolumeTopHeight,i._picking,i._context._pickPositionHeight),i._hasOverlay&&n.updateVector4("uOverlayRect",i._overlayBounds),i._hasSnowEffect){const e=i._PBRMaterialParams.pbrMetallicRoughness.snowEffect;let t=e.snow_coverage>0?e.snow_coverage:.5;n.updateFloat("uSnowCoverageFactor",t)}if(i._hasRainEffect){const e=i._PBRMaterialParams.pbrMetallicRoughness.rainEffect,t=e.ripple_scale>0?e.ripple_scale:5,r=e.rain>0?e.rain:200,o=e.cameraDepth>0?e.cameraDepth:.8,a=e.wetnessFactor>0?e.wetnessFactor:0;n.updateFloat("uAnimationSpeed",e.animationSpeed),n.updateFloat("uRippleScale",t),n.updateFloat("uWindIntensity",e.wind_intensity),n.updateFloat("uRain",r),n.updateFloat("uCameraDepth",o),n.updateFloat("uWetnessFactor",a)}n.updateFloat("uSelectColorType",i.selectColorType),n.updateFloat("uTransparentFilter",i.selectionFiltrateByTransparency),this._ubo.update(),this._setLayerTextureToUBO(t)},_0x473d2d.prototype._setLayerTextureToUBO=function(e){e.frameNumber!=this._lastTextureUpdateFrame&&(e$2b(this._layer._sqTextures)&&this._layer._sqTextures.length>0?(this._isLayerTextureChanged(_0xa67472,this._layer._sqTextures[0]),this._isLayerTextureChanged(_0x53a5d5,this._layer._sqTextures[1]),this._isLayerTextureChanged(_0x3dbc30,this._layer._sqTextures[2])):(this._isLayerTextureChanged(_0xa67472,void 0),this._isLayerTextureChanged(_0x53a5d5,void 0),this._isLayerTextureChanged(_0x3dbc30,void 0)),this._isLayerTextureChanged(_0x18c5c2,this._layer._hasEmissiveTexAtlas?this._layer._hypsometricSetting._emissionTextureAtlas.texture:void 0),this._isLayerTextureChanged(_0x366751,this._layer._categorieTexture),this._isLayerTextureChanged(_0x3e247e,this._layer._excavationTexture),this._isLayerTextureChanged(_0x4ea79b,this._layer._overlayTexture),this._isLayerTextureChanged(_0x431981,this._layer._flattenTexture),this._isLayerTextureChanged(_0x2a4e3b,this._layer._hypsometricTexture),this._isLayerTextureChanged(_0x1f609,this._layer._hypsometricRenderTexture),this._isLayerTextureChanged(_0xbbfeb6,this._layer.isSilhouette()?this._layer._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0):void 0),this._lastTextureUpdateFrame=e.frameNumber)},_0x473d2d.prototype._isLayerTextureChanged=function(e,t){this._isTextureDirty=this._textures[e]!==t,this._textures[e]=t},_0x473d2d.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name);for(const t in this._textures)this._setTextureToEffect(e,this._textures[t],t)},_0x473d2d.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}};var _0x3fda11=new o$1o,_0x43b22a=new o$1o;const _0x3adb9f=new e$29;_0x473d2d.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(!t.webgl2&&!t.webgpu){var i={uSelColor:function(){return e.selectedColor},uTranslationAndBottom:function(){return _0x3adb9f.x=e.selectedTranslate.x,_0x3adb9f.y=e.selectedTranslate.y,_0x3adb9f.z=e.selectedTranslate.z,_0x3adb9f.w=e.style3D.bottomAltitude,e.selectedTranslate},uFillForeColor:function(){return e.style3D.fillForeColor},uPolygonOffset:function(){var t=e._rsColor.polygonOffset;return e$2b(t)?(_0x43b22a.x=t.factor,_0x43b22a.y=t.units):(_0x43b22a.x=0,_0x43b22a.y=0),_0x43b22a},uPointSize:function(){return e.style3D.pointSize},uMinMaxTransparent:function(){return _0x3fda11.x=e.minTransparentAlpha,_0x3fda11.y=e.maxTransparentAlpha,_0x3fda11},uTransparentFilter:function(){return e.selectionFiltrateByTransparency},uHypLineColor:function(){return e$2b(e._hypsometricSetting)?(_0x3adb9f.x=e._hypsometricSetting.LineColor.red,_0x3adb9f.y=e._hypsometricSetting.LineColor.green,_0x3adb9f.z=e._hypsometricSetting.LineColor.blue,_0x3adb9f.w=e._hypsometricSetting.LineColor.alpha,_0x3adb9f):e$29.ZERO},uNoValueColor:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.noValueColor:Color.WHITE},uHypRect:function(){return e._hypsometricBound},uHypHasAnalysisRegion:function(){return e._bUseHypRegion},uMixColorType:function(){return e$2b(e._mixColorType)?e._mixColorType:0},uHypOpacity:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.Opacity:1},uHypContourInterval:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.LineInterval:100},uHypContourFillMode:function(){var t=1;if(e$2b(e._hypsometricSetting))switch(e._hypsometricSetting.DisplayMode){case k$Q.DisplayMode.NONE:t=0;break;case k$Q.DisplayMode.FACE:t=1;break;case k$Q.DisplayMode.LINE:t=2;break;case k$Q.DisplayMode.FACE_AND_LINE:t=3}return t},uHypFloor:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMaxKey:0},uDataFloor:function(){return e._fMinValue===e._fMaxValue?0:e._fMinValue},uDataCeil:function(){return e._fMinValue===e._fMaxValue?1:e._fMaxValue},uHypMaxVisibleValue:function(){return(e$2b(e._hypsometricSetting)?e._hypsometricSetting.MaxVisibleValue:0)+e$2a.EPSILON5},uHypMinVisibleValue:function(){return(e$2b(e._hypsometricSetting)?e._hypsometricSetting.MinVisibleValue:0)-e$2a.EPSILON5},uHypsometricVisible:function(){return 1},uRect:function(){return e._flattenBounds},uCameraHeight:function(){return e._frameState.camera.positionCartographic.height},uExcavationMode:function(){return e._excavationMode},uExcavationRect:function(){return e._excavationBounds},uServerExcavationMode:function(){return e._serverExcavationMode},uServerExcavationRect:function(){return e._serverExcavationBounds},uSwipeRegion:function(){return _0x3adb9f.x=e._swipeRegion.x*e._frameState.context.drawingBufferWidth,_0x3adb9f.y=(1-e._swipeRegion.y)*e._frameState.context.drawingBufferHeight,_0x3adb9f.z=e._swipeRegion.z*e._frameState.context.drawingBufferWidth,_0x3adb9f.w=(1-e._swipeRegion.w)*e._frameState.context.drawingBufferHeight,_0x3adb9f},uBrightness:function(){return e._brightness},uContrast:function(){return e._contrast},uHue:function(){return e._hue},uSaturation:function(){return e._saturation},uOneOverGamma:function(){return 1/e._gamma},uClipMode:function(){return e._clipMode},uClipPlanes:function(){return e._clipPlane},uClipLineColor:function(){return e._clipLineColor},uMaxCategory:function(){return e._hypMaxCategory},uMinCategory:function(){return e._hypMinCategory},uCategoryWidht:function(){return e._categorieTexture&&e._categorieTexture.width||256},uCategoryHeight:function(){return e._categorieTexture&&e._categorieTexture.height||1},uLineColor:function(){return e.style3D.lineColor},uLineWidth:function(){return e.style3D.lineWidth},uFillStyle:function(){return e.style3D.fillStyle},uTransparentBackColor:function(){return e._transparentBackColor},uTransparentBackColorTolerance:function(){return e._transparentBackColorTolerance},uVisibleDistanceMax:function(){return e._visibleDistanceMax},uHorizontalColor:function(){return e$2b(e$2b(e._HorizontalColor))?e._HorizontalColor:new e$29(1,1,0,0)},uHorizontalLine:function(){return e$2b(e._fHorizontalLine)?e._fHorizontalLine:0},uDistanceFalloffFactor:function(){return e._edgeDistanceFalloffFactor},uStrokesTextureScale:function(){return e._strokesTextureScale},uStrokesLog2Resolution:function(){return e._strokesLog2Resolution},uMinMaxTerrainHeightAndPickInfo:function(){return _0x3adb9f.x=e._shadowVolumeBottomHeight,_0x3adb9f.x=e._shadowVolumeTopHeight,_0x3adb9f.x=e._picking,_0x3adb9f.x=e._context._pickPositionHeight,_0x3adb9f},uOverlayRect:function(){return e._overlayBounds},uEmissionTexAtlasTilingAndOffset:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting._getEmissionTexAtlasTilingAndOffset():[]},uEmissionTexAtlasRects:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting._getEmissionAtlasTextureRects():[]},uEmissionColor:function(){return e.style3D.emissionColor},uLayerBounds:function(){return _0x3adb9f.x=e._layerModelBounds.x,_0x3adb9f.y=e._layerModelBounds.y,_0x3adb9f.z=e._layerModelBounds.z-e._layerModelBounds.x,_0x3adb9f.w=e._layerModelBounds.w-e._layerModelBounds.y,_0x3adb9f},uLayerCornerLength:function(){return Math.sqrt(e._layerModelBounds.z*e._layerModelBounds.z+e._layerModelBounds.w*e._layerModelBounds.w)},uMaxCategoryOrHypCeil:function(){var t=e._hypMaxCategory;return e$2b(e._hypsometricSetting)&&(0!=e._hypsometricSetting._floor||0!=e._hypsometricSetting._ceiling)&&(t=e._hypsometricSetting._ceiling),e$2b(t)||(t=100),t},uMinCategoryOrHypFloor:function(){var t=e._hypMinCategory;return e$2b(e._hypsometricSetting)&&(0!=e._hypsometricSetting._floor||0!=e._hypsometricSetting._ceiling)&&(t=e._hypsometricSetting._floor),e$2b(t)||(t=0),t},uEmissionTexAtlasCount:function(){const t=e._hypsometricSetting;if(e$2b(t)){var i=t._getEmissionAtlasTextureRects();return Math.min(10,i.length)}return 0},uSnowCoverageFactor:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.snowEffect;return t.snow_coverage>0?t.snow_coverage:.5},uAnimationSpeed:function(){return e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.animationSpeed},uRippleScale:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.ripple_scale>0?t.ripple_scale:5},uWindIntensity:function(){return e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity},uRain:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.rain>0?t.rain:200},uCameraDepth:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.cameraDepth>0?t.cameraDepth:.8},uWetnessFactor:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.wetnessFactor>0?t.wetnessFactor:0}};this._uniformMap=i}},_0x473d2d.prototype.isDestroyed=function(){return!1},_0x473d2d.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};const _0x551bf4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x50c528=_0x551bf4(void 0,(function(){return _0x50c528.toString().search("(((.+)+)+)+$").toString().constructor(_0x50c528).search("(((.+)+)+)+$")}));function _0x360415(e){var t=_0x3e2f69.call(this)||this;t._layer=e,t._name=_0x27131a.WaterLayer,this._initUniformMap()}_0x50c528(),_0x3e2f69&&(_0x360415.__proto__=_0x3e2f69),_0x360415.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x360415.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x360415.prototype,{}),_0x360415.prototype._initUBOStruct=function(){this._ubo.addUniform("uWaterColor",4),this._ubo.addUniform("uSunColor",4),this._ubo.addUniform("uBumpSpeed",2),this._ubo.addUniform("uTimeVal",1),this._ubo.addUniform("uWaterBrightness",1),this._ubo.addUniform("uUseRefectMap",1),this._ubo.addUniform("uNoiseScale",1),this._ubo.addUniform("uMinVisibleValue",1),this._ubo.addUniform("uMaxVisibleValue",1),this._ubo.addUniform("uReflectMapLod",1)},_0x360415.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())};let _0xfc1b4c=0,_0x55dbf8=0;_0x360415.prototype.update=function(e){if(!e.webgpu&&!e.webgl2)return;e$2b(this._ubo)||this._initUBO(e);const t=this._layer,i=this._ubo,n=t._waterParamter,r=n.waterColour,o=t._frameState.lightSource.sunLightColor,a=n.bumpSpeed,s=n.noiseScale;_0x55dbf8!==t._frameState.frameNumber&&(_0xfc1b4c+=1/60,_0x55dbf8=t._frameState.frameNumber);const l=t._frameState._framebufferList.water;let u=l&&l.isUpdate?1:0;i.updateFloat4("uWaterColor",r.x,r.y,r.z,r.w),i.updateFloat4("uSunColor",o.red,o.green,o.blue,o.alpha),i.updateFloat2("uBumpSpeed",a.x,a.y),i.updateFloat("uTimeVal",_0xfc1b4c),i.updateFloat("uWaterBrightness",n.waterBrightness),i.updateFloat("uUseRefectMap",u),i.updateFloat("uNoiseScale",s),i.updateFloat("uMinVisibleValue",t._hypMinCategory+e$2a.EPSILON5),i.updateFloat("uMaxVisibleValue",t._hypMaxCategory),i.updateFloat("uReflectMapLod",5-l.distinctQuality),this._ubo.update()},_0x360415.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x360415.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x360415.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(t.webgl2||t.webgpu)return;const i=e._waterParamter;this._uniformMap={},this._uniformMap.uWaterColor=function(){return i.waterColour},this._uniformMap.uSunColor=function(){return e._frameState.lightSource.sunLightColor},this._uniformMap.uBumpSpeed=function(){return i.bumpSpeed},this._uniformMap.uTimeVal=function(){return _0x55dbf8!==e._frameState.frameNumber&&(_0xfc1b4c+=1/60,_0x55dbf8=e._frameState.frameNumber),_0xfc1b4c},this._uniformMap.uWaterBrightness=function(){return i.waterBrightness},this._uniformMap.uUseRefectMap=function(){const t=e._frameState._framebufferList.water;return t&&t.isUpdate?1:0},this._uniformMap.uNoiseScale=function(){return i.noiseScale},this._uniformMap.uMaxVisibleValue=function(){return e._hypMaxCategory},this._uniformMap.uMinVisibleValue=function(){return e._hypMinCategory+e$2a.EPSILON5}},_0x360415.prototype.isDestroyed=function(){return!1},_0x360415.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};var _0x21df66=(_0x2a4592=!0,function(e,t){var i=_0x2a4592?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a4592=!1,i}),_0x2b0d67=_0x21df66(void 0,(function(){return _0x2b0d67.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b0d67).search("(((.+)+)+)+$")})),_0x2a4592;_0x2b0d67(),new a$18;var _0x2c98df=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),_0x4a6483={CLIP_NOTHING:0,CLIP_BEHIND_ANY_PLANE:1,CLIP_BEHIND_ALL_PLANE:2,ONLY_KEEP_LINE:3},_0x236c52={Altitude:0,Color:1,Texture:2},_0x2afcbd={Normal:0,Add:1},_0x155b1b={LOD_Loading:0,All_Loading:1},_0x4a4277={DEGREE:"Degree",METER:"Meter"},_0x3fb372=-1e3,_0x15581b=9e3,_0x22e933=function(e){var t=(e=e||{}).gl,i=e.name,n=e.position;if(this._materialType=e.materialType,this._isS3MB=e.isS3MB,this._isOSGB=e.isOSGB,this._isS3MZ=e.isS3MZ,this._isS3MBlock=e.isS3MBlock,this._context=e.context,this._gl=t,this._name=i,this._globeType=e.globeType,this._groupName=e.groupName,this._id=-1,this._version=void 0,this._baseUri=e.baseUri,this._dataType=e.dataType,this._isTextureShare=u$_(e.isTextureShare,!1),this._associateMaterialUrl=e.associateMaterialUrl,this._isTransparencyOptimization=u$_(e.isTransparencyOptimization,!1),this._vertexCompressionType=e.vertexCompressionType,e$2b(e.vertexWeightMode))switch(e.vertexWeightMode){case"DatasetField":default:this._vertexWeightMode=_0x7aa085.DatasetField;break;case"EdgeLengthMin":this._vertexWeightMode=_0x7aa085.EdgeLengthMin}if(this._triangleFiltratePixel=0,this._urlType=u$_(e.urlType,Tr$3.REST),this._urlArguments=e.urlArguments,this._fileType=d$15.OSGBFile,this._RGBTOBGR=!1,this._S3MTileLoadedEvent=new o$1h,this._allTilesLoaded=new o$1h,this._colorTableChanged=new o$1h,this._attributeDownloaded=new o$1h,this._prepareLoadSize=0,this._prepareLoadEvent=void 0,e.pointCloudLayerNames&&e.pointCloudLayerNames.length>0){this._pointCloudLayerVisible={};for(var r=0,o=e.pointCloudLayerNames.length;r<o;r++)this._pointCloudLayerVisible[e.pointCloudLayerNames[r]]=!0;this._pointCloudLayerNames=e.pointCloudLayerNames.slice(0)}if(e$2b(e.fileType))switch(e.fileType){case"ClampGroundLineCache":this._fileType=d$15.ClampGroundLine;break;case"ClampObjectLineCache":this._fileType=d$15.ClampObjectLine;break;case"ClampGroundPolygonCache":this._fileType=d$15.ClampGroundPolygon;break;case"ClampObjectPolygonCache":this._fileType=d$15.ClampObjectPolygon;break;case"ExtendClampPolygonCache":this._fileType=d$15.ExtendClampPolygonCache;break;case"IconPointCache":this._fileType=d$15.IconPoint;break;case"TextCache":this._fileType=d$15.Text;break;case"PointCloudFile":this._fileType=d$15.PointCloudFile;break;case"OSGBCacheFile":this._fileType=d$15.OSGBCacheFile;break;case"ExtendRegionCache":this._fileType=d$15.ExtendRegion3D;break;case"RegionEffect":this._fileType=d$15.RegionEffect;break;case"PolylineEffect":this._fileType=d$15.PolylineEffect;break;case"ClampGroundAndObjectLineCache":this._fileType=d$15.ClampGroundAndObjectLineCache;break;case"ClampGroundRealtimeRasterCache":this._fileType=d$15.ClampGroundRealtimeRasterCache}this._supportCompressType=e.supportCompressType,this.lon=n.lon,this.lat=n.lat,this.height=n.height,this.positionUnits=n.units,this._layerBounds=e.layerBounds;var a=.5*(this._layerBounds.north+this._layerBounds.south);this._layerRange=a$18.sphericalDistance(e$2a.toDegrees(this._layerBounds.east),e$2a.toDegrees(a),e$2a.toDegrees(this._layerBounds.west),e$2a.toDegrees(a)),this._style3D=u$_(e.style3D,new e$1s),this._style3D._owner=this,this._lodRangeScale=u$_(e.lodRangeScale,1),this._adjustedLodRangeScale=this._lodRangeScale,this._selectColorType=Zr$2.MIX,this._mixColorType=_0x203e3b.MIX,this._brightness=u$_(e.brightness,1),this._contrast=u$_(e.constrast,1),this._hue=u$_(e.hue,0),this._saturation=u$_(e.saturation,1),this._gamma=u$_(e.gamma,1),this._visibleDistanceMax=u$_(e.maxVisibleDistance,Number.MAX_VALUE),this._visibleDistanceMin=u$_(e.minVisibleDistance,0),this._minVisibleAltitude=u$_(e.minVisibleAltitude,0),this._maxVisibleAltitude=u$_(e.maxVisibleAltitude,Number.MAX_VALUE),this._hasLight=!(this._fileType===d$15.OSGBFile||this._fileType===d$15.PointCloudFile),this._selectEnabled=u$_(e.selectEnable,!0),this._enableHighlight=u$_(e.enableHighlight,!0),this._heading=u$_(e.heading,0),this._cullEnabled=u$_(e.cullEnabled,!1);let s=e.cullMode;switch(s){case"CW":s=W$13.CLOCKWISE;break;case"CCW":s=W$13.COUNTER_CLOCKWISE;break;default:s=W$13.NONE}this._cullMode=u$_(s,W$13.NONE),this._shadowType=u$_(e.shadowType,_0x381f49.NONE),this._visibleViewport=4095,this._visible=u$_(e.isVisible,!0),this._sceneMode=u$_(e.sceneMode,C$13.SCENE3D),this._selections=[],this._multiChoose=!1,this._selectedColor=new e$1U(.7,.7,1,1),this._selectedLineColor=new e$1U(1,1,1),this._skeletonSelectedColor=new e$1U(1,0,0,1),this._selectedTranslate=new o$1p(0,0,0),this._objsColorList={},this._objsOffsetList={},this._objsVisibleList=new e$1N,this._objsHideList=new e$1N,this._objsVisibleMap={},this._objsOperationList={},this._operationType=_0x4580ad.RESET,this._fileType===d$15.ExtendRegion3D&&(this._objsHeightList=new e$1N),e$2b(e.effect)?this._effect=e.effect:this._fileType===d$15.RegionEffect?this._effect=new _0x14c08b:this._fileType===d$15.PolylineEffect&&(this._effect=new _0x2f60f9),this._bloomEffect=new _0x5ea05b(this),this.waterEffectSet=e.waterEffectSet,this._noiseMapUrl=n$15("Assets/Textures/noise.png"),this._noiseMapTexture=void 0,this._flattenTextureWidth=1024,this._flattening=!1,this._flattenBounds=new e$29,this._flattenTexture=void 0,this._flattenRegions=new e$1N,this._flattenUpdate=!1,this._flattenVisibleViewport=255,this._hasExcavation=!1,this._hasServerExcavation=!1,this._excavationBounds=new e$29,this._excavationTexture=void 0,this._excavationRegions=new e$1N,this._excavationUpdate=!1,this._excavationMode=_0x25a093.CLIP_INSIDE,this._serverExcavationMode=_0x25a093.CLIP_OUTSIDE,this._serverExcavationBounds=new e$29,this._serverExcavationRegions=new e$1N,this._hasOverlay=!1,this._overlayBounds=new e$29,this._overlayRegions=new e$1N,this._overlayTextures=new e$1N,this._overlayTexture=void 0,this.__overlayUpdate=!1,this._hypsometricSetting=void 0,this._hypsometricTexture=void 0,this._hypsometricRenderTexture=void 0,this._hypsometricRegion=void 0,this._hypsometricBound=new e$29,this._bUseHypColorTable=!1,this._bUseHypRegion=!1,this._hypsometricRegionUpdate=!1,this._hypAnalysisMode=k$Q.AnalysisRegionMode.ARM_NONE,this._hypMaxInstensity=e.maxInstensity,this._hypMinInstensity=e.minInstensity,this._hypMaxHeight=e.maxHeight,this._hypMinHeight=e.minHeight,this._hypMaxCategory=e.maxCategory,this._hypMinCategory=e.minCategory,this._hypUseColorByHeight=!0,this._MultiTemporalUseWater=!1,this._categorieTexture=void 0,this._categoryHideList=new e$1N,this._fHorizontalLine=e.horizontalLine,this._oriClipPlane=[],this._renderClipPlaneArray=new e$1N,this._clipPlane=[];for(r=0;r<6;r++)this._clipPlane[r]=new e$29(0,0,0,0),this._oriClipPlane[r]=new e$29(0,0,0,0);this._clipMode=_0x4a6483.CLIP_NOTHING,this._clipLineColor=new e$29(1,0,0,0),this._clipping=!1,this._section=!1,this._clipPlaneMode=_0xff9e19.NONE,this._clipPlaneColor=new e$29(1,0,0,1),this._matModel=new p$1d,this._oriMatModel=new p$1d,this._bReleaseColor=u$_(e.bReleaseColor,!1),this._fileType===d$15.OSGBFile||this._fileType===d$15.OSGBCacheFile?this._ignoreNormal=u$_(e.ignoreNormal,!1):this._ignoreNormal=!1,this._textureLod=u$_(e.textureLod,!0);var l=u$_(e.processType,"Normal");if(this._nProcessType="Normal"===l?_0x2afcbd.Normal:_0x2afcbd.Add,this._nLoadingMode=_0x155b1b.All_Loading,this._clockStart=0,this._polygonOffsetConfig=e.polygonOffset,this._wireFrameType=_0x15916e.Quad,this._bVolume=!1,e$2b(e.volumeObj)&&(this._bVolume=e.volumeObj.bVolume,this._strVolumeExts=e.volumeObj.strVolumeExts,this._volNames=e.volumeObj.volNames,this._maxVolumeValues=e.volumeObj.maxValues,this._minVolumeValues=e.volumeObj.minValues,this._volName=this._volNames[0],this._fMaxValue=this._maxVolumeValues[0],this._fMinValue=this._minVolumeValues[0],this._strVolumeExt=this._strVolumeExts[0]),this._maps=e.maps,this._volData=void 0,this._splitDirection=u$_(e.splitDirection,_0x405774.NONE),this._splitPosition=u$_(e.splitPosition,.5*this._context.drawingBufferWidth),this._pickPosition=new e$29,this._selectionFiltrateByTransparency=.01,this._receiveObjectClamp=!0,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0,this._edgeDistanceFalloffFactor=0,this._enableDepthTest=!0,this.initialize(),e$2b(window.Proxy)){var u=this,c={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1,clear:function(){u._layerScheduler._clearIndexedDBCache()}};this._indexedDBSetting=new Proxy(c,{get:function(e,t){return e[t]},set:function(e,t,i){return"isAttributesSave"===t&&!1===e.isAttributesSave&&!0===i&&!e$2b(u._queryFieldNames)&&(e$2b(u._layerScheduler._indexedDBScheduler)?u._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()}),(function(){0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()})):u._layerScheduler._dpPromise.then((function(){u._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()}),(function(){0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()}))}))),e[t]=i,!0}}),this._isJsonScp=e._isJson||!1}this._queryFieldNames=e.queryFieldNames,this._fieldsInfo=e.fieldsInfo,this._indexInfoMap=e.indexInfoMap,this._indexInfoAttributeMap=e.indexInfoAttributeMap,this._attributeExtentName=u$_(e.attributeExtentName,""),this._layerScheduler=new _0x2e6772({context:this._context,layer:this,rootEntities:e.rootEntities,cacheEntityCount:e.cacheEntityCount,cacheKey:u$_(e.cacheKey,""),customRequestHeaders:e.customRequestHeaders,scpUrl:e.scpUrl}),this._clearMemoryImmediately=!1,this._totalMemoryUsageInBytes=0,this._maximumMemoryUsage=512,this._PBRMaterialType=je$g.NONE,this._pbrMetalTexture=void 0,this._pbrRoughTexture=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:o$1p.ZERO,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}},this._usePBR=!1,this._localCacheMemoryReserveCount=500,this._fileType===d$15.Text&&(this._id2RectangleList=new e$1N),this._textureUVSpeed=new o$1o(0,0),this._pointCloudEyeDomeLighting=new _0x25441b(this._context),this._pointCloudShading=new o$Z({attenuation:!0,geometricErrorScale:1,maximumAttenuation:8,eyeDomeLighting:!0}),this._pointCloudClassificationInfos=void 0,this._styleEngine=new e$1r,this._manualShadowVolumeBottomHeight=_0x3fb372,this._manualShadowVolumeTopHeight=_0x15581b,this._shadowVolumeBottomHeight=_0x3fb372,this._shadowVolumeTopHeight=_0x15581b,"InstanceModel"===this._dataType&&(this.instanceSkeletonManager=new _0x212e1c),this._level=e.level,this._refreshVolume=!1,this._useMercatorProject=u$_(e.useMercatorProject,!1),this._groupNameBounds=e.groupNameBounds,this._skeletonSelectEnable=!1,this._lastSelectSkeletonId=-1,this._minTransparentAlpha=.1,this._maxTransparentAlpha=.98,this._selectRect=void 0,this._selectUpdate=!1,this._matSelectViewProj=new p$1d,this._useOIT=!0,this._partlyTransparent=!1,this._showLabel=!1,this._s3MTilesLabelStyle=new _0x4ee275,this._labelCollection=new g$U({scene:e.scene,isS3MTileLabels:!0,selectedColor:this._selectedColor}),this._scene=e.scene,this._transparentBackColor=u$_(e.transparentBackColor,_0x22e933.DEFAULT_TRANSPARENT_BACK_COLOR),this._transparentBackColorTolerance=u$_(e.transparentBackColorTolerance,_0x22e933.DEFAULT_TRANSPARENT_BACK_COLOR_TOLERANCE),this._shadowDarkness=.5,this._spatialQueryEnable=!1,this._spatialClipEnable=!1,this._sqTextures=[],this._sqViewMatirx=new p$1d,this._sqPrjMatirx=new p$1d,this._sqMode=j$X.Disjoint,this._swipeRegion=new e$29(0,0,1,1),this._swipeEnabled=!1,this._allObjsHide=!1,this._residentRootTile=!1,this._idFieldName=u$_(e.idFieldName,"SmID"),this._imageryLayer=void 0,this._needCoverImageryLayer=!1,this._iconCollection=new w$N({scene:e.scene,style3D:this._style3D}),this._showIcon=u$_(e.showIcon,!1),this._boundingSphereOffset=o$1p.ZERO,this._loadVolumeData=u$_(e.loadVolumeData,!0),this._hasWireframe=!1,this._edgeStrokesTexture=void 0;var h=u$_(e.subdomainConfig,{});this._subdomains=h.subdomains,this._subdomainsUrlScheme=h.urlScheme,this._isOverlapDisplayed=!1,this._iconRelatedTextLayerID=void 0,this._priorityScale=u$_(e.priorityScale,1),this._blockCache=_0x5d6ada.getSingleInstance(),this._clippingType=R$J.KeepOutside,this._spatialQuery=void 0,this._pickObjs={},this._hasMixedContent=!1,this._backfaceCommands=[],this._excavateRegionCommands=new e$1N,this._rasterPerFrame=!1,this._animationInfo={startTime:void 0,array:[],defers:void 0,duration:void 0,defaultInterpolation:void 0,done:!0},this._textureEmissionUnit=_0x3ba5f2.None,this._pbrParameter=je$g.NONE,this._maxSkipNum=256,this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,pixel:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,pixel:Number.MAX_VALUE},this._computeHeight=!1,this._polygonsTranslate={},this._maxSkipLevel=22,this._mipmapEnabled=!0,this._enableFusion=!1,this._floodFlagTexture=void 0,this._floodRect=void 0,this._matFloodInvertMatrix=p$1d.IDENTITY,this._heightScale=1,this._useRasterCull=!1,this._temporalCount=e$2b(e.temporalCount)?e.temporalCount:0,this._temporalSetting=void 0,this._translucencyByDistance=!1,this._overlapWeightAttributeName=void 0,this._heightRangeAttributeName=void 0,this.hasAttributeIndex=e.hasAttributeIndex,this._historicalRecord=e.historicalRecord,this._layerUBO=new _0x473d2d(this),e$2b(this.waterEffectSet)&&(this._waterLayerUbo=new _0x360415(this)),this._fileType===d$15.PolylineEffect&&(this._polylineEffectUbo=new _0x280589(this)),this._fileType===d$15.RegionEffect&&(this._regionEffectUbo=new S3MRegionEffectUBO(this)),this._envMapIntensity=1,this._hasEmissiveTexAtlas=!1,this._hasSnowEffect=!1,this._hasRainEffect=!1};function _0x3a8394(e,t,i,n){for(var r={times:[],points:[],interpolations:[]},o=0,a=i.length;o<a;o++){var s=i[o],l=+s.slice(0,-1)/100*e.duration,u=n[s],c=u$_(u.interpolationType,e.defaultInterpolation);(h=u[t])&&(r.times.push(l),r.points.push(h),r.interpolations.push(c))}var h=_0x4cad54(r=_0x20c3d6(r),e,t);return e.array.push(h),r}function _0x20c3d6(e){var t=e.interpolations,i=e.times,n=e.points;e=[];for(var r=0,o=t.length-1;r<o;r++)e.push({times:[i[r],i[r+1]],points:[n[r],n[r+1]],interpolationType:t[r]});return e}function _0x4cad54(e,t,i){for(var n=[],r=0,o=e.length;r<o;r++){var a=e[r];n.push(_0x4ab0fa(i,a.interpolationType,a.times,a.points))}return{type:i,splines:n}}function _0x4ab0fa(e,t,i,n){var r;if("rotation"===e)return n.forEach((function(e,t){n[t]=n$13.fromHeadingPitchRoll(e)})),new r$O({times:i,points:n});switch(t){case _0x186188.Linear:r=new r$P({times:i,points:n});break;case _0x186188.Acceleration:r=new n$F({times:i,points:n,mode:0});break;case _0x186188.Deceleration:r=new n$F({times:i,points:n,mode:1});break;case _0x186188.CubicSpline:r=new c$K({times:i,points:n});break;case _0x186188.SmoothStep:r=new r$N({times:i,points:n});break;default:r=new r$P({times:i,points:n})}return r}function _0x390168(e,t){!t||!e$2b(h$18.intersection(e.layerBounds,t.rectangle))||(t._rasterized=!1,_0x390168(e,t._southwestChild),_0x390168(e,t._southeastChild),_0x390168(e,t._northwestChild),_0x390168(e,t._northeastChild))}function _0x25b0a3(e){var t=0;e$2b(e.style3D)&&(t=e.style3D.bottomAltitude);var i=e.height+t;if(e._sceneMode===C$13.SCENE3D)if(e._fileType===d$15.ClampGroundRealtimeRasterCache)e._position=new o$1p(e.lon,e.lat,i),p$1d.fromTranslation(e._position,e._matModel);else{var n=o$1p.fromDegrees(e.lon,e.lat,i),r=o$1p.fromDegrees(e.lon,e.lat,e.height);e._position=n;var o=new i$15(e._heading,0,0);m$17.headingPitchRollToFixedFrame(n,o,t$13.WGS84,m$17.eastNorthUpToFixedFrame,e._matModel),m$17.headingPitchRollToFixedFrame(r,o,t$13.WGS84,m$17.eastNorthUpToFixedFrame,e._oriMatModel)}else if(e._fileType!==d$15.ClampGroundRealtimeRasterCache){if(e.lon>180||e.lon<-180||e.lat>180||e.lat<-180||e.positionUnits===_0x4a4277.METER)if(e.useMercatorProject){var a=(u=new t$O).unproject(new o$1p(e.lon,e.lat,0));e._position=e._scene.camera._projection.project(a)}else{var s=e.lon,l=e.lat;s>20037508.342789244&&(o$1p.globalOffset.x=20037508.342789244*Math.floor(s/20037508.342789244),s-=o$1p.globalOffset.x),l>10018754.171394622&&(o$1p.globalOffset.y=20037508.342789244*Math.floor((l+10018754.171394622)/20037508.342789244),l-=o$1p.globalOffset.y),e._position=new o$1p(s,l,i)}else{var u=new n$1b;n=o$1p.fromDegrees(e.lon,e.lat,i),a=u.ellipsoid.cartesianToCartographic(n);e._position=u.project(a)}p$1d.fromTranslation(e._position,e._matModel),p$1d.multiply(_0x2c98df,e._matModel,e._matModel)}else e._position=new o$1p(e.lon,e.lat,i),p$1d.fromTranslation(e._position,e._matModel);e._style3D._dirty&&e$2b(e._layerScheduler)&&(e._layerScheduler._updateRootBoundingSphere(e._layerScheduler._oriRootEntities,e._matModel),e._style3D._dirty=!1),e$2b(e._layerScheduler)&&e._layerScheduler.traverseRenderEntity({},(function(t){!t._colorCommand||(t._colorCommand.modelMatrix=p$1d.multiply(e._matModel,t._geoMatrix,t._colorCommand.modelMatrix))}))}function _0x18fd4b(e,t){var i=e._hypsometricSetting;if(e$2b(i)){if(i._emissionTextureChanged){e$2b(i._emissionTextureAtlas)&&!i._emissionTextureAtlas.isDestroyed()&&i._emissionTextureAtlas.destroy(),i._emissionTextureAtlas=new v$I({context:t});var n={};n.layer=e,n.textureCount=1,e$2b(i._emissionTextureArray)&&i._emissionTextureArray.length>0?i._emissionTextureArray.map((function(t){i._emissionTextureAtlas.addImage(t.url,t.url).then((function(r){t.textureAtlasID=r,i._loadedEmissionTexture++,i._loadedEmissionTexture==i._emissionTextureArray.length&&(e._hasEmissiveTexAtlas=!0,n.enable=!0,n.textureCount=i._loadedEmissionTexture,e.traverseRenderEntity(n,_0x388bf7))}))})):(n.enable=!1,n.textureCount=0,e.traverseRenderEntity(n,_0x388bf7)),i._emissionTextureChanged=!1}}else e._hasEmissiveTexAtlas=!1}function _0x4d88a5(e,t){e._manualShadowVolumeBottomHeight===_0x3fb372&&e._manualShadowVolumeTopHeight===_0x15581b?0===t.minTerrainHeight&&0===t.maxTerrainHeight?(e._shadowVolumeBottomHeight=_0x3fb372,e._shadowVolumeTopHeight=_0x15581b):(e._shadowVolumeBottomHeight=t.minTerrainHeight-10,e._shadowVolumeTopHeight=t.maxTerrainHeight+10):(e._shadowVolumeBottomHeight=e._manualShadowVolumeBottomHeight,e._shadowVolumeTopHeight=e._manualShadowVolumeTopHeight)}function _0x579c48(e,t,i,n,r){var o=t$11.createIfNeeded(t).fetchImage().then((function(t){var o=new t$V({context:e,source:t,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.LINEAR_MIPMAP_LINEAR,magnificationFilter:tt$h.LINEAR}),generateMipmap:!0});!e$2a.isPowerOfTwo(o.width)||!e$2a.isPowerOfTwo(o.height)||o.generateMipmap(I$1e.NICEST),n[r]=o,i.readyTextureCount++})).otherwise((function(){i.pendingTextureCount--}));n[r]=o}function _0x10fc30(e){if(!e._animationInfo.done){var t=(Date.now()-e._animationInfo.startTime)/1e3;t>=e._animationInfo.duration&&(e._animationInfo.defer.resolve(),e._animationInfo.done=!0,t=e._animationInfo.duration);for(var i=0,n=e._animationInfo.array.length;i<n;i++){var r=e._animationInfo.array[i];_0x31d37c(e,r,t),_0x1b9790(e,r,t),_0x4d6b8d(e,r,t)}e.traverseRenderEntity({},(function(e,t){e._modelMatrixDirty=!0})),_0x4ed776(e)}}_0x22e933.DEFAULT_TRANSPARENT_BACK_COLOR=e$1U.BLACK,_0x22e933.DEFAULT_TRANSPARENT_BACK_COLOR_TOLERANCE=0,Object.defineProperties(_0x22e933.prototype,{overlapWeightAttributeName:{get:function(){return this._overlapWeightAttributeName},set:function(e){this._overlapWeightAttributeName=e}},heightRangeAttributeName:{get:function(){return this._heightRangeAttributeName},set:function(e){this._heightRangeAttributeName=e}},urlType:{get:function(){return this._urlType},set:function(e){this._urlType=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){o$1q.typeOf.number("min visible altitude",e),this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){o$1q.typeOf.number("max visible altitude",e),this._maxVisibleAltitude=e}},heading:{get:function(){return this._heading},set:function(e){o$1q.typeOf.number("heading",e),this._heading=e,this.initialize()}},lodRangeScale:{get:function(){return this._lodRangeScale},set:function(e){this._lodRangeScale=e}},priorityScale:{get:function(){return this._priorityScale},set:function(e){this._priorityScale=e}},customRequestHeaders:{get:function(){return this._layerScheduler._customRequestHeaders},set:function(e){this._layerScheduler._customRequestHeaders=e}},style3D:{get:function(){return this._style3D},set:function(e){e&&(this._style3D=e,this._style3D._owner=this,this._iconCollection.style3D=this._style3D)}},themeStyle:{get:function(){return this._styleEngine.style},set:function(e){var t=this;if(e$2b(this._queryFieldNames)||0!==t._layerScheduler._attributes._memoryCache){if(e$2b(t.themeStyle)&&e$2b(t.themeStyle.pbrMaterialIndex)){var i={enable:!0};i.layer=t,t.traverseRenderEntity(i,_0x1ffa57)}t._styleEngine.style=e}else t._layerScheduler._downloadAttributes().then((function(){if(t._styleEngine.style=e,e$2b(t.themeStyle)&&e$2b(t.themeStyle.pbrMaterialIndex)){var i={enable:!0};i.layer=t,t.traverseRenderEntity(i,_0x1ffa57)}}));this.traverseRenderEntity({},(function(e){e._themeDirty=!0}))}},wireFrameMode:{get:function(){return this._wireFrameType},set:function(e){if(e!==this._wireFrameType){if(e===_0x15916e.Quad&&(e=_0x15916e.EffectOutline),e===_0x15916e.Sketch||this._wireFrameType===_0x15916e.Sketch){var t={};t.edgeMode=e===_0x15916e.Sketch?1:0,t.layer=this,this.traverseRenderEntity(t,_0x469ac0)}this._wireFrameType=e}}},visible:{get:function(){return this._visible},set:function(e){this._fileType===d$15.ClampGroundRealtimeRasterCache&&this._visible!=e&&this._layerScheduler.refreshRaster(this._frameState),this._visible=e}},dataMaxValue:{get:function(){return e$2b(this._hypMaxCategory)?this._hypMaxCategory:this._hypMaxHeight}},dataMinValue:{get:function(){return e$2b(this._hypMinCategory)?this._hypMinCategory:this._hypMinHeight}},ColorDictTableMode:{set:function(e){this._hypUseColorByHeight=e}},hypsometricSetting:{get:function(){return LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_hypsometricSetting"),{hypsometricSetting:this._hypsometricSetting,analysisMode:this._hypAnalysisMode}},set:function(e){LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_hypsometricSetting"),this._bUseHypColorTable=!1,this._hypsometricRegionUpdate=!0,e$2b(this._hypsometricRegion)&&(this._hypsometricRegion.destroy(),this._hypsometricRegion=null),e$2b(this._hypsometricRenderTexture)||(this._hypsometricRenderTexture=new t$V({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$10.RGBA})),e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:this._context,width:1024,height:64,pixelFormat:V$10.RGBA,flipY:!1}));var t={};if(t.layer=this,!e$2b(e)||!e$2b(e.hypsometricSetting))return e$2b(this._hypsometricSetting)&&(this._hypsometricSetting.destroy(),this._hypsometricSetting=void 0),void this.traverseRenderEntity(t,_0x1067d9);if(this._hypAnalysisMode=e.analysisMode||this._hypAnalysisMode,this._hypsometricSetting=u$M.clone(e.hypsometricSetting,this._hypsometricSetting),this._hypsometricSetting._emissionTextureChanged=!0,e$2b(this._hypsometricSetting.ColorTable)&&(this._hypsometricSetting.ColorTable.generateBuffer(),e$2b(this._hypsometricTexture)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer})),this._hypAnalysisMode!==k$Q.AnalysisRegionMode.ARM_NONE?(this._bUseHypColorTable=!0,this.traverseRenderEntity(t,_0x2d0dfd)):this.traverseRenderEntity(t,_0x1067d9),this._hypsometricSetting.UpdatePolygonRegion&&this._hypAnalysisMode===k$Q.AnalysisRegionMode.ARM_REGION&&this._hypsometricSetting.CoverageArea.length>0){var i=this._hypsometricSetting.CoverageArea,n=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),r=z$_.createGeometry(n),o=new p$1d;p$1d.inverse(this._matModel,o),f$X.updateGeometry(r,i,o,this._frameState.mode===C$13.COLUMBUS_VIEW);var a=f$X.updateGeoBounds(r),s=.01*(a.z-a.x);a.w,a.y,this._hypsometricRegion=new f$X,this._hypsometricRegion._geometry=r,this._hypsometricRegion._bounds.x=a.x-s,this._hypsometricRegion._bounds.y=a.y-s,this._hypsometricRegion._bounds.z=a.z+s,this._hypsometricRegion._bounds.w=a.w+s,e$29.clone(this._hypsometricRegion._bounds,this._hypsometricBound)}this._bVolume||this._colorTableChanged.raiseEvent()}},multiTemporalUseWater:{get:function(){return this._MultiTemporalUseWater},set:function(e){this._MultiTemporalUseWater=e,e$2b(this._waterLayerUbo)||(this._waterLayerUbo=new _0x360415(this));let t=new o$1o(1,1),i=new e$29(0,.05,.05,1),n=new e$29(0,.67451,.913725,1);this._waterParamter={bumpSpeed:t,fresnelPower:.1,maxFresnel:1,minFresnel:0,noise:1,noiseScale:1,scale:100,scroll:1,timeVal:.05,tintColour:i,waterBrightness:.7,waterColour:n,averageHeight:3.7}}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e}},LoadingMode:{get:function(){return this._nLoadingMode},set:function(e){this._nLoadingMode=e}},LoadingPriority:{get:function(){return e$2b(this._layerScheduler)?this._layerScheduler.LoadingPriority:_0x10659f.Child_Priority},set:function(e){e$2b(this._layerScheduler)&&(this._layerScheduler.LoadingPriority=e)}},bReleaseColor:{get:function(){return this._bReleaseColor},set:function(e){this._bReleaseColor=e}},ignoreNormal:{get:function(){return this._ignoreNormal},set:function(e){this._ignoreNormal!==e&&(this._ignoreNormal=e,this.refresh())}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}},visibleDistanceMin:{get:function(){return this._visibleDistanceMin},set:function(e){this._visibleDistanceMin=e}},clipLineColor:{get:function(){return new e$1U(this._clipLineColor.x,this._clipLineColor.y,this._clipLineColor.z,this._clipLineColor.w)},set:function(e){e instanceof e$1U&&(this._clipLineColor=new e$29(e.red,e.green,e.blue,e.alpha))}},clipPlaneColor:{get:function(){return new e$1U(this._clipPlaneColor.x,this._clipPlaneColor.y,this._clipPlaneColor.z,this._clipPlaneColor.w)},set:function(e){e instanceof e$1U&&(this._clipPlaneColor=new e$29(e.red,e.green,e.blue,e.alpha))}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this.updateShadow())}},horizontalline:{get:function(){return this._fHorizontalLine},set:function(e){this._fHorizontalLine=e}},horizontalColor:{get:function(){return new e$1U(this._HorizontalColor.x,this._HorizontalColor.y,this._HorizontalColor.z,this._HorizontalColor.w)},set:function(e){e instanceof e$1U&&(this._HorizontalColor=new e$29(e.red,e.green,e.blue,e.alpha))}},hasLight:{get:function(){return this._hasLight},set:function(e){if(e$2b(e)){this._hasLight=e;var t={};t.layer=this,t.enable=e,this.traverseRenderEntity(t,_0x5a24f0)}}},cullEnabled:{get:function(){return this._cullEnabled},set:function(e){this.cullMode=e?W$13.COUNTER_CLOCKWISE:W$13.NONE}},cullMode:{get:function(){return this._cullMode},set:function(e){this._cullMode=e;var t=d$1m.getState(this._rsColor);t.cull.enabled=e!==W$13.NONE,t.frontFace=e!==W$13.NONE?e:W$13.COUNTER_CLOCKWISE,this._rsColor=d$1m.fromCache(t)}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){this._enableDepthTest=e;var t=d$1m.getState(this._rsColor);t.depthTest.enabled=e,this._rsColor=d$1m.fromCache(t)}},selectColorType:{get:function(){return this._selectColorType},set:function(e){if(this._selectColorType!==e){this._selectColorType=e,this.isSilhouette()?this._context.numNormalAndDepthObject++:(this._context.numNormalAndDepthObject--,this._context.numNormalAndDepthObject=Math.max(this._context.numNormalAndDepthObject,0));var t={};t.layer=this,t.selectColorType=e,this.traverseRenderEntity(t,_0x264393)}}},mixColorType:{get:function(){return this._mixColorType},set:function(e){if(this._mixColorType!==e){this._mixColorType=e;var t={layer:this,mixColorType:e};this.traverseRenderEntity(t,_0x3fe446)}}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},groupName:{get:function(){return this._groupName}},selectEnabled:{get:function(){return this._selectEnabled},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._selectEnabled=e}},enableHighlight:{get:function(){return this._enableHighlight},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._enableHighlight=e}},skeletonSelectEnable:{get:function(){return this._skeletonSelectEnable},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._skeletonSelectEnable=e,this.refresh()}},selectedColor:{get:function(){return this._selectedColor},set:function(e){o$1q.defined("selectedColor value",e),this._selectedColor=e$1U.clone(e),this._labelCollection.selectedColor=e$1U.clone(e)}},selectedLineColor:{get:function(){return this._selectedLineColor},set:function(e){o$1q.defined("selectedColor value",e),this._selectedLineColor=e$1U.clone(e)}},skeletonSelectedColor:{get:function(){return this._skeletonSelectedColor},set:function(e){o$1q.defined("skeletonSelectedColor value",e),this._skeletonSelectedColor=e$1U.clone(e)}},selectedSkeletonId:{get:function(){return this._lastSelectSkeletonId},set:function(e){o$1q.defined("selectSkeletonId value",e),this._lastSelectSkeletonId=e}},multiChoose:{get:function(){return this._multiChoose},set:function(e){o$1q.defined("multiChoose",e),o$1q.typeOf.bool("multiChoose",e),this._multiChoose=e}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x90188f)}},contrast:{get:function(){return this._contrast},set:function(e){this._contrast=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x90188f)}},hue:{get:function(){return this._hue},set:function(e){this._hue=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x90188f)}},saturation:{get:function(){return this._saturation},set:function(e){this._saturation=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x90188f)}},gamma:{get:function(){return this._gamma},set:function(e){this._gamma=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x90188f)}},transparentBackColor:{get:function(){return this._transparentBackColor},set:function(e){if(this._transparentBackColor!==e){this._transparentBackColor=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x5f032b)}}},transparentBackColorTolerance:{get:function(){return this._transparentBackColorTolerance},set:function(e){if(this._transparentBackColorTolerance!==e){this._transparentBackColorTolerance=e;var t={};t.layer=this,0===this._transparentBackColorTolerance?this.traverseRenderEntity(t,_0x1fc069):this.traverseRenderEntity(t,_0x5f032b)}}},volName:{get:function(){return this._volName},set:function(e){for(var t=0;t<this._volNames.length;t++)this._volNames[t]==e&&(this._volName=e,this._fMaxValue=this._maxVolumeValues[t],this._fMinValue=this._minVolumeValues[t],this._strVolumeExt=this._strVolumeExts[t],this.refreshVolume())}},coverImageryLayer:{get:function(){return this._imageryLayer},set:function(e){if(e$2b(e))if(e$2b(this._imageryLayer)){!(this._imageryLayer instanceof Array)&&!this._imageryLayer.show&&this._layerScheduler._hideImage(),this._imageryLayer=e;var t=this;if(this._imageryLayer instanceof Array){for(var i=[],n=0;n<this._imageryLayer.length;n++)i.push(this._imageryLayer[n]._imageryProvider._readyPromise);t._layerScheduler._stopLoadImagery=!0,Promise.all(i).then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1}))}else t._layerScheduler._stopLoadImagery=!0,this._imageryLayer._imageryProvider._readyPromise.then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1}))}else{if(!this._needCoverImageryLayer)return this.refresh(),this._imageryLayer=e,void(this._needCoverImageryLayer=!0);var r=!1;e$2b(this._imageryLayer)||(r=!0),this._imageryLayer=e;t=this;if(this._imageryLayer instanceof Array){for(i=[],n=0;n<this._imageryLayer.length;n++)i.push(this._imageryLayer[n]._imageryProvider._readyPromise);t._layerScheduler._stopLoadImagery=!0,Promise.all(i).then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1,r&&t._updateCoverImageryLayer(!1)}))}else t._layerScheduler._stopLoadImagery=!0,this._imageryLayer._imageryProvider._readyPromise.then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1,r&&t._updateCoverImageryLayer(!1)}));this._needCoverImageryLayer=!0}else e$2b(this._imageryLayer)&&(this._updateCoverImageryLayer(!0),this._imageryLayer=void 0)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){if(o$1q.typeOf.number("splitDirection",e),this._splitDirection!==e){this._splitDirection=e;var t={layer:this,enableSplit:e!==_0x405774.NONE};this.traverseRenderEntity(t,_0x320632)}}},splitPosition:{get:function(){return this._splitPosition},set:function(e){o$1q.typeOf.number("splitPosition",e),this._splitPosition=e}},selectionFiltrateByTransparency:{get:function(){return this._selectionFiltrateByTransparency},set:function(e){o$1q.typeOf.number("selectionFiltrateByTransparency value",e),this._selectionFiltrateByTransparency=e}},effect:{get:function(){return this._effect},set:function(e){this._effect=e}},bloomEffect:{get:function(){return e$2b(this._bloomEffect)||(this._bloomEffect=new _0x5ea05b),this._bloomEffect}},bloomEnable:{get:function(){return!!e$2b(this._bloomEffect)&&this._bloomEffect.enable}},selectedTranslate:{get:function(){return this._selectedTranslate},set:function(e){o$1q.typeOf.object("selected translate",e),!o$1p.equals(e,this._selectedTranslate)&&(this._selectedTranslate=e)}},clearMemoryImmediately:{get:function(){return this._clearMemoryImmediately},set:function(e){this._clearMemoryImmediately=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMemoryUsage=e}},PBRMaterialType:{get:function(){return this._PBRMaterialType},set:function(e){if(this._PBRMaterialType!==e){this._PBRMaterialType=e;var t=_0x5370ac.getMaterial(e),i=this;e$2b(this._pbrMetalTexture)&&(this._pbrMetalTexture.destroy(),this._pbrMetalTexture=null),e$2b(this._pbrRoughTexture)&&(this._pbrRoughTexture.destroy(),this._pbrRoughTexture=null),o$1l(t$T(t.metalTextureUrl),(function(e){i._pbrMetalTexture=new t$V({context:i._frameState.context,source:e,pixelFormat:V$10.LUMINANCE,pixelDatatype:_$$.UNSIGNED_BYTE})})),o$1l(t$T(t.roughTextureUrl),(function(e){i._pbrRoughTexture=new t$V({context:i._frameState.context,source:e,pixelFormat:V$10.LUMINANCE,pixelDatatype:_$$.UNSIGNED_BYTE})}));var n={};n.layer=this,n.PBRType=e,this.traverseRenderEntity(n,_0x30c7b8)}}},PBRMetallic:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.metallicFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.metallicFactor=e}},PBRRoughness:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor=e}},emissiveFactor:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor=e}},rainEffect:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.rainEffect},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.rainEffect=e}},textureUVSpeed:{get:function(){return this._textureUVSpeed},set:function(e){o$1q.typeOf.object("textureUVSpeed value",e),o$1o.clone(e,this._textureUVSpeed);var t={};t.layer=this,t.enable=0!==this._textureUVSpeed.x||0!==this._textureUVSpeed.y,this.traverseRenderEntity(t,_0xa7b04e)}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){if(e$2b(window.Proxy)){var t=this;if(e$2b(e)&&"boolean"==typeof e.isGeoTilesSave&&"boolean"==typeof e.isAttributesSave&&"boolean"==typeof e.isGeoTilesRootNodeSave){(i={}).isGeoTilesSave=e.isGeoTilesSave,i.isAttributesSave=e.isAttributesSave,i.isGeoTilesRootNodeSave=e.isGeoTilesRootNodeSave,i.clear=function(){t._layerScheduler._clearIndexedDBCache()};var i={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1,clear:function(){t._layerScheduler._clearIndexedDBCache()}};this._indexedDBSetting=new Proxy(i,{get:function(e,t){return e[t]},set:function(e,i,n){"isAttributesSave"===i&&!1===e.isAttributesSave&&!0===n&&(e$2b(t._layerScheduler._indexedDBScheduler)?t._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}),(function(){0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()})):t._layerScheduler._dpPromise.then((function(){t._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}),(function(){0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}))}))),e[i]=n}}),this._layerScheduler._indexedDBSetting=this._indexedDBSetting}}else this._indexedDBSetting={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1},this._layerScheduler._indexedDBSetting=this._indexedDBSetting}},pointCloudShading:{get:function(){return this._pointCloudShading}},shadowVolumeTopHeight:{get:function(){return this._manualShadowVolumeTopHeight},set:function(e){this._manualShadowVolumeTopHeight=e}},shadowVolumeBottomHeight:{get:function(){return this._manualShadowVolumeBottomHeight},set:function(e){this._manualShadowVolumeBottomHeight=e}},triangleFiltratePixel:{get:function(){return this._triangleFiltratePixel},set:function(e){var t=parseFloat(e),i=this._triangleFiltratePixel>0,n=t>0;if(this._triangleFiltratePixel=t,this._vertexWeightMode===_0x7aa085.EdgeLengthMin&&i!=n){var r={};r.layer=this,r.enable=n,this.traverseRenderEntity(r,_0x45f5e3)}}},useMercatorProject:{get:function(){return this._useMercatorProject},set:function(e){this._useMercatorProject=e,this.refresh()}},minTransparentAlpha:{get:function(){return this._minTransparentAlpha},set:function(e){this._minTransparentAlpha=e}},maxTransparentAlpha:{get:function(){return this._maxTransparentAlpha},set:function(e){this._maxTransparentAlpha=e}},selectBound:{get:function(){return this._selectRect},set:function(e){this._selectRect=e,this._selectUpdate=!0,this._selectEnabled=!0}},S3MTileLoadedEvent:{get:function(){return this._S3MTileLoadedEvent}},attributeDownloaded:{get:function(){return this._attributeDownloaded}},allTilesLoaded:{get:function(){return this._allTilesLoaded}},prepareLoadEvent:{get:function(){return this._prepareLoadEvent}},prepareLoadDataSize:{get:function(){return this._prepareLoadSize},set:function(e){o$1q.typeOf.number("value",e),e>0&&(this._prepareLoadSize=e,e$2b(this._prepareLoadEvent)||(this._prepareLoadEvent=new o$1h),this._layerScheduler._prepareLoaded=!1)}},colorTableChanged:{get:function(){return this._colorTableChanged}},receiveObjectClamp:{get:function(){return this._receiveObjectClamp},set:function(e){this._receiveObjectClamp=e;var t=d$1m.getState(this._rsColor);t.stencilTest=_0x187e60.createReceiveClampObjectStencilTest(e),this._rsColor=d$1m.fromCache(t)}},orderIndependentTranslucency:{get:function(){return this._useOIT},set:function(e){o$1q.typeOf.bool("value",e),this._useOIT=e}},partlyTransparent:{get:function(){return this._partlyTransparent},set:function(e){o$1q.typeOf.bool("value",e),this._partlyTransparent=e}},showLabel:{get:function(){return this._showLabel},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._showLabel=e,this._showLabel&&0===Object.keys(this._layerScheduler._attributes).length&&this._layerScheduler._requestAllScvd()}},labelStyle:{get:function(){return this._s3MTilesLabelStyle},set:function(e){o$1q.defined("value",e),(this._s3MTilesLabelStyle._textFieldChanged||e$2b(e._textField)&&this._s3MTilesLabelStyle._textField!==e._textField)&&this._labelCollection.removeAll(),this._s3MTilesLabelStyle=e,e$2b(this._labelCollection)&&this._labelCollection.setLabelStyle(this._s3MTilesLabelStyle)}},swipeRegion:{get:function(){return new f$18(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2b(e)){if(!(e instanceof f$18))throw new t$16("swipeRegion must be a instance of BoundingRectangle.");e$29.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?this.splitDirection=_0x405774.NONE:e$29.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e,this.traverseRenderEntity({layer:this,enableSwipe:e},_0x5ac131))}},allObjsHide:{get:function(){return this._allObjsHide}},residentRootTile:{get:function(){return this._residentRootTile},set:function(e){o$1q.typeOf.bool("residentRootTile",e),this._residentRootTile=e}},idFieldName:{get:function(){return this._idFieldName}},loadVolumeData:{get:function(){return this._loadVolumeData},set:function(e){this._loadVolumeData=e}},showIcon:{get:function(){return this._showIcon},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._showIcon=e}},showCallout:{get:function(){return this._iconCollection.showCallout},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._iconCollection.showCallout=e}},waterColor:{get:function(){return this._waterParamter&&this._waterParamter.waterColour},set:function(e){if(!e$2b(this._waterParamter))throw new t$16("No water exists in this layer");if(o$1q.defined("value",e),!(e instanceof e$1U))throw new t$16("Expected waterColor to be typeof color");let t=new e$29;t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,this._waterParamter.waterColour=t}},waterSpeed:{get:function(){return this._waterParamter&&this._waterParamter.bumpSpeed},set:function(e){if(!this._waterParamter)throw new t$16("No water exists in this layer");if(o$1q.defined("value",e),!(e instanceof o$1o))throw new t$16("Expected waterSpeed to be typeof Cartesian2");this._waterParamter.bumpSpeed=e}},waterWaveScale:{get:function(){return this._waterParamter&&this._waterParamter.noiseScale},set:function(e){if(!this._waterParamter)throw new t$16("No water exists in this layer");o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._waterParamter.noiseScale=e}},attributeFieldNames:{get:function(){return e$2b(this._fieldsInfo)?Object.keys(this._fieldsInfo._hash):void 0}},queryFieldNames:{get:function(){return this._queryFieldNames},set:function(e){if(e$2b(this._queryFieldNames)&&this._queryFieldNames.sort().toString()!==e.sort().toString())for(var t=e.filter((e=>!this._queryFieldNames.includes(e))),i=this._layerScheduler,n=0;n<i._rootEntities.length;n++){var r=i._rootEntities[n];r._attrAppend=t,r.attrLoadState=N$P.UNLOAD}this._queryFieldNames=e}},hasWireframe:{get:function(){return this._hasWireframe}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2b(e)&&!e$2b(e.length))throw new t$16("Excepted S3MTilesLayer.subdomains to be type of Array.");this._subdomains=e}},iconRelatedTextLayerID:{get:function(){return this._iconRelatedTextLayerID},set:function(e){if(typeof e<"u"&&"number"!=typeof e)throw new t$16("Excepted S3MTilesLayer.iconRelatedTextLayerID to be type of number or undefined");this._iconRelatedTextLayerID=e}},isOverlapDisplayed:{get:function(){return this._isOverlapDisplayed},set:function(e){o$1q.typeOf.bool("isOverlapDisplayed",e),this._isOverlapDisplayed=e,this._isOverlapDisplayed?this.setOnlyObjsVisible([],!1,!0,!0):this.setOnlyObjsVisible([],!0,!1)}},clippingType:{get:function(){return this._clippingType},set:function(e){o$1q.defined("clipping type",e),this._clippingType=e,e$2b(this._spatialQuery)&&(this._spatialQuery.positionMode=_0x3e670b(e))}},rasterPerFrame:{get:function(){return this._rasterPerFrame&&this._fileType===d$15.ClampGroundRealtimeRasterCache},set:function(e){o$1q.typeOf.bool("rasterPerFrame",e),this._rasterPerFrame=e}},RGBTOBGR:{get:function(){return this._RGBTOBGR},set:function(e){o$1q.typeOf.bool("RGBTOBGR",e),this._RGBTOBGR=e}},textureEmissionUnit:{get:function(){return this._textureEmissionUnit},set:function(e){this._textureEmissionUnit=e}},computeHeight:{get:function(){return this._computeHeight},set:function(e){this._computeHeight=e}},mipmapEnabled:{get:function(){return this._mipmapEnabled},set:function(e){this._mipmapEnabled=e}},enableFusion:{get:function(){return this._enableFusion},set:function(e){e!==this._enableFusion&&(this._enableFusion=e,this.traverseRenderEntity({enable:e,layer:this},_0xcf3b3))}},heightScale:{get:function(){return this._heightScale},set:function(e){if(e!==this._heightScale){e=Math.max(e,1e-5),this._heightScale=e;var t=p$1d.fromScale(new o$1p(1,1,e),new p$1d);this.traverseRenderEntity({scaleMatrix:t,layerMatrix:this._matModel},_0x10da3d)}}},temporalCount:{get:function(){return this._temporalCount}},temporalSetting:{get:function(){return this._temporalSetting},set:function(e){this._temporalSetting=e}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=e}}}),_0x22e933.prototype.initialize=function(){_0x25b0a3(this);var e,t=this._fileType,i=_0x187e60.createClampGroundStencilRenderState();if(t===d$15.ClampGroundLine||t===d$15.ClampGroundPolygon||t===d$15.ExtendClampPolygonCache?(e=_0x187e60.createClampGroundColorRenderState(),i=_0x187e60.createClampGroundStencilRenderState()):t===d$15.ClampObjectPolygon||t===d$15.ClampObjectLine?(e=_0x187e60.createClampObjectColorRenderState(),i=_0x187e60.createClampObjectStencilRenderState()):t===d$15.ClampGroundAndObjectLineCache?e=_0x187e60.createClampGroundAndObjectLineRenderState():(e=_0x187e60.createNormalColorRenderState(this.cullMode)).stencilTest=_0x187e60.createReceiveClampObjectStencilTest(this._receiveObjectClamp),e$2b(this._polygonOffsetConfig)&&!0===this._polygonOffsetConfig.enabled&&(e.polygonOffset=this._polygonOffsetConfig),this._rsColor=d$1m.fromCache(e),this._rsClampColor=d$1m.fromCache(_0x187e60.createClampGroundColorRenderState()),this._rsClampLineColor=d$1m.fromCache(_0x187e60.createClampGroundAndObjectLineRenderState()),this._rsStencil=d$1m.fromCache(i),e$2b(this.waterEffectSet)&&!e$2b(this._waterParamter)){this._waterPlanes=new e$1N,this._waterParamter=[];for(var n=0;n<this.waterEffectSet[0].gpuProgramParameters.length;n++){for(var r=this.waterEffectSet[0].gpuProgramParameters[n],o=0;o<r.atuoConstants.length;o++){var a=r.atuoConstants[o];if("timeVal"===a.name){this._waterParamter[a.name]=a.fData;break}}for(o=0;o<r.gpuConstants.length;o++){var s=r.gpuConstants[o],l=null;switch(s.arraySize){case 1:l=s.arrayFloat[0];break;case 2:l=new o$1o,o$1o.unpack(s.arrayFloat,0,l);break;case 3:l=new o$1p,o$1p.unpack(s.arrayFloat,0,l);break;case 4:l=new e$29,e$29.unpack(s.arrayFloat,0,l)}!e$2b(l)||(this._waterParamter[s.name]=l)}}}this._computeLayerModelBounds()},_0x22e933.prototype._updateCoverImageryLayer=function(e){for(var t=this._layerScheduler,i=[],n=0;n<t._rootEntities.length;n++){var r=t._rootEntities[n];i.push(r)}for(var o,a={layer:this};o=i.pop();)for(var s=0;s<o._childrenPageLod.length;s++){for(var l=o._childrenPageLod[s]._renderEntityList,u=l.length,c=0;c<u;c++)e?(l[c]._imagerys=void 0,l[c].removeProgramDefineForCommand(l[c]._colorCommand,a,!0,!0,"IMAGERY"),l[c]._imageRasterFinish=!1,l[c]._imageryLevels=[],l[c].destroyScaleImagerys()):l[c].appendProgramDefineForCommand(l[c]._colorCommand,a,!0,!0,"IMAGERY");o._childrenPageLod[s]._entity&&i.push(o._childrenPageLod[s]._entity)}},_0x22e933.prototype.appendQueryFieldName=function(e){e$2b(e.length)||new t$16("Expected value to be type of Array");for(var t=this._queryFieldNames,i=[],n=0,r=e.length;n<r;n++){var o=e[n];-1===t.indexOf(o)&&i.push(o)}if(0===i.length)return o$1l.resolve();this._queryFieldNames=i;var a=this;return o$1l.all(this._layerScheduler.appendQueryFieldName(this)).then((function(){a._queryFieldNames=t.concat(i)}))},_0x22e933.prototype.getPointCloudClassificationInfos=function(){if(e$2b(this._pointCloudClassificationInfos))return this._pointCloudClassificationInfos;if(this._isS3MB){var e=u$Q(i=new h$16("./attribute.json").resolve(this._baseUri).toString()),t=this;return e.then((function(e){var i=[];if(!e$2b(e.classificationInfos))return t._pointCloudClassificationInfos=i,i;for(var n=0,r=e.classificationInfos.length;n<r;n++){var o=e.classificationInfos[n].id,a=e.classificationInfos[n].name,s=e.classificationInfos[n].pointCount;i.push(new _0x5730db(o,a,s))}return t._pointCloudClassificationInfos=i,i})).otherwise((function(e){console.log(e)}))}var i=new h$16("./indexData.dat").resolve(this._baseUri).toString();e$2b(a$O.CREDENTIAL)&&(i=a$O.addToken(i));e=d$1f(i),t=this;return e.then((function(e){for(var i=e.firstChild,n=i.namespaceURI,r=s$S.queryNodes(i,"PointCloudClassification",n),o=[],a=0,s=r.length;a<s;a++){var l=r[a],u=s$S.queryStringAttribute(l,"ID"),c=s$S.queryStringAttribute(l,"Name"),h=s$S.queryNumericAttribute(l,"PointCounts");o.push(new _0x5730db(u,c,h))}return t._pointCloudClassificationInfos=o,o})).otherwise((function(e){console.log(e)}))},_0x22e933.prototype.setPolygonoffset=function(e,t){if(this._rsColor._applyFunctions.length=0,this._rsColor.polygonOffset.factor!==e||this._rsColor.polygonOffset.units!==t){var i=d$1m.getState(this._rsColor);i.polygonOffset={enabled:!0,factor:u$_(e,0),units:u$_(t,0)},this._rsColor=d$1m.fromCache(i)}},_0x22e933.prototype.getVolNames=function(){return this._volNames},_0x22e933.prototype.setQueryParameter=function(e){if(!e$2b((e=e||{}).url))throw new t$16("options.url is required!");if(!e$2b(e.dataSourceName))throw new t$16("options.dataSourceName is required!");if(!e$2b(e.dataSetName)&&!0!==e.isMerge)throw new t$16("options.dataSetName is required or isMerge must be true!");if(e.keyWord=u$_(e.keyWord,"SmID"),e.hasGeometry=u$_(e.hasGeometry,!1),this.queryParameter=l$1g(e),!e$2b(this.queryParameter.dataSetName)&&1==this.queryParameter.isMerge){var t=this;this.datasetInfo().then((function(e){t.queryParameter.datasetList=e}))}},_0x22e933.prototype.getQueryParameter=function(){return this.queryParameter},_0x22e933.prototype.datasetInfo=function(){var e=o$1l.defer();if(this._isS3MB){var t=this._baseUri+"attribute.json";e$2b(a$O.CREDENTIAL)&&(t=a$O.addToken(t)),u$Q(t).then((function(t){for(var i=t.layerInfos,n=new Array,r=0;r<i.length;r++){var o=i[r],a={};a.datasetName=o.layerName,a.startID=parseInt(o.idRange.minID),a.endID=parseInt(o.idRange.maxID),n.push(a)}e.resolve(n)}))}else{var i=this._baseUri+"indexData.dat";e$2b(a$O.CREDENTIAL)&&(i=a$O.addToken(i));e=o$1l.defer();o$1l(d$1f(i),(function(t){for(var i=s$S.getElementsByTagNameNS(t,"*","DatasetName"),n=s$S.getElementsByTagNameNS(t,"*","DatasetIDRange"),r=new Array,o=0;o<i.length;o++){var a={};a.datasetName=i[o].innerHTML;var s=n[o].innerHTML,l=s.indexOf("_");a.startID=parseInt(s.substr(0,l)),a.endID=parseInt(s.substr(l+1,s.length-l-1)),r.push(a)}e.resolve(r)}))}return e.promise},_0x22e933.prototype.getLodRangeScale=function(){return this._lodRangeScale},_0x22e933.prototype.setAnimation=function(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.keyframes",e.keyframes),o$1q.typeOf.number.greaterThan("options.duration",e.duration,0);var t=e.keyframes,i=e.duration,n=e.interpolationType;if("0%"in t){var r=t["0%"];r.scale=u$_(r.scale,new o$1p(1,1,1)),r.rotation=u$_(r.rotation,new i$15(this._heading,0,0)),r.translation=u$_(r.translation,o$1p.fromDegrees(this.lon,this.lat,this.style3D.bottomAltitude))}else t["0%"]={translation:o$1p.fromDegrees(this.lon,this.lat,this.style3D.bottomAltitude),scale:new o$1p(1,1,1),rotation:new i$15(this._heading,0,0)};var o=Object.keys(t);return(o=o.filter((function(e){return"%"===e[e.length-1]}))).sort((function(e,t){return(e=+e.slice(0,-1))-(t=+t.slice(0,-1))})),this._animationInfo={startTime:Date.now(),array:[],duration:i,defer:o$1l.defer(),defaultInterpolation:u$_(n,_0x186188.Linear),done:!1},_0x3a8394(this._animationInfo,"rotation",o,t),_0x3a8394(this._animationInfo,"scale",o,t),_0x3a8394(this._animationInfo,"translation",o,t),this._animationInfo.defer},_0x22e933.prototype.setLodRangeScale=function(e){this._lodRangeScale=e},_0x22e933.prototype.refreshRaster=function(){if(e$2b(this._frameState)){var e=this._frameState._quadtree._levelZeroTiles;e[0]&&_0x390168(this,e[0]),e[1]&&_0x390168(this,e[1])}},_0x22e933.prototype._isNeedUpdate=function(e,t){return!(!e$2b(e)||!e$2b(t)||!this._visible||(e$2b(this.waterEffectSet)||this.multiTemporalUseWater)&&t._fboState.enabled&&"water"===t._fboState.name)},_0x22e933.prototype._loadMaterialTexture=function(e,t){e.loadingTexture=!0;var i=e.pbrMetallicRoughness,n=e.textureunitstates,r=i.baseColorTextureIndex;e$2b(e.pendingTextureCount)||(e.pendingTextureCount=0),e$2b(e.readyTextureCount)||(e.readyTextureCount=0);var o=this._context,a=e$2b(t)?t:this._baseUri+this._materialRelativePath;r>-1&&!e$2b(i.baseColorTexture)&&(_0x579c48(o,a+n[r].textureunitstate.url,e,e.pbrMetallicRoughness,"baseColorTexture"),e.pendingTextureCount++);var s=i.emissiveTextureIndex;s>-1&&!e$2b(i.emissiveTexture)&&(_0x579c48(o,a+n[s].textureunitstate.url,e,e.pbrMetallicRoughness,"emissiveTexture"),e.pendingTextureCount++);var l=i.normalTextureIndex;l>-1&&!e$2b(i.normalTexture)&&(_0x579c48(o,a+n[l].textureunitstate.url,e,e.pbrMetallicRoughness,"normalTexture"),e.pendingTextureCount++);var u=i.metallicRoughnessTextureIndex;u>-1&&!e$2b(i.metallicRoughnessTexture)&&(_0x579c48(o,a+n[u].textureunitstate.url,e,e.pbrMetallicRoughness,"metallicRoughnessTexture"),e.pendingTextureCount++);var c=i.occlusionTextureIndex;c>-1&&!e$2b(i.occlusionTexture)&&(_0x579c48(o,a+n[c].textureunitstate.url,e,e.pbrMetallicRoughness,"occlusionTexture"),e.pendingTextureCount++)},_0x22e933.prototype._loadMaterial=function(e,t,i){var n=this;t$11.createIfNeeded(e).fetchJson().then((function(e){if(e$2b(n._materialMap)||(n._materialMap={}),e.material.ready=!1,e$2b(i)&&e.material.textureunitstates.length>0){var r=e.material.textureunitstates[0].textureunitstate.texmodmatrix,o=p$1d.unpack(r),a=new o$1p(i.ScaleU,i.ScaleV,1);p$1d.fromScale(a,o),p$1d.pack(o,r)}n._materialMap[t]=e,n.readyMaterialCount++}))},_0x22e933.prototype._loadMaterialMap=function(e){if(e$2b(this._materialMapInfo)){this.readyMaterialCount=0;for(var t=0,i=this._materialMapInfo.length;t<i;t++){var n=this._materialMapInfo[t],r=this._baseUri+this._materialRelativePath+n.AssociateMaterial+".json";this._loadMaterial(r,n.OriginalMaterial,n.UVTransformation)}this.pendingMaterialCount=this._materialMapInfo.length,this._materialMapInfo=void 0}if(e$2b(this._materialMap)&&this.pendingMaterialCount===this.readyMaterialCount){var o=!0;for(var a in this._materialMap)if(this._materialMap.hasOwnProperty(a)){var s=this._materialMap[a].material;s.loadingTexture||this._loadMaterialTexture(s),s.pendingTextureCount===s.readyTextureCount&&(s.ready=!0),o=o&&s.ready}this._materialMapReady=o}if(!e$2b(this._associateMaterialPromise)){var l=this,u=e.lastIndexOf("/");this._materialRelativePath=e.substring(0,u+1),e=this._baseUri+e;var c=t$11.createIfNeeded(e);this._associateMaterialPromise=c.fetchJson().then((function(e){l._materialMapInfo=e.Scenes[0].Layers[0].Materials.MaterialExportedMap}))}},_0x22e933.prototype.update=function(e,t,i,n){if(this._fileType!==d$15.Text&&this._fileType!==d$15.IconPoint||!t.passes.pick||!t.passes.offscreen){if(e$2b(this._associateMaterialUrl)&&!this._materialMapReady)return void this._loadMaterialMap(this._associateMaterialUrl);if(this._PBRMaterialParams.loadingTexture&&this._updatePBRMaterial(),_0x10fc30(this),this._isNeedUpdate(e,t)){this._style3D._dirty&&(this.refresh(),_0x25b0a3(this),this._style3D._dirty=!1),this._style3D.billboardMode===yr$1.FixedXYZ&&(this._isOverlapDisplayed=!0),_0x18fd4b(this,e);var r=t.camera;this._sceneMode=r._mode,this._projection=r._projection,this._picking=t.passes.pick,this._frameState=t,this._backfaceCommands.length=0,this._hasMixedContent=!1;var o,a=i.length;for(h=0,o=this._renderClipPlaneArray.length;h<o;h++){this._renderClipPlaneArray.values[h].update(e,t,i)}var s=this._objsVisibleMap;this._hasObjsVisibleMap=Object.keys(s).length>0,this._hasHeightRangeAttributeName=e$2b(this._heightRangeAttributeName);var l=this._PBRMaterialParams.pbrMetallicRoughness.snowEffect,u=this._PBRMaterialParams.pbrMetallicRoughness.rainEffect;if(this._hasSnowEffect=e$2b(l)&&e$2b(l.snowMaskTexture)&&e$2b(l.snowNormalTexture),this._hasRainEffect=e$2b(u)&&e$2b(u.rippleTexture),this._layerScheduler.update(e,t,i),this._shadowDarkness=t.shadowDarkness,this._showIcon&&this._iconCollection.length>0&&this._iconCollection.update(t,e,i),n=u$_(n,!1),this._showLabel&&!0!==n&&(this._labelCollection.s3MlayerId=this._id,this._labelCollection.update(t,e,i)),this._fileType===d$15.PointCloudFile&&t.passes.render)i.length-a>0&&(this._pointCloudShading.eyeDomeLighting||this._pointCloudShading.performance)&&this._pointCloudEyeDomeLighting.update(t,a,this._pointCloudShading);this._fileType===d$15.ClampGroundRealtimeRasterCache&&(t.rasterLineWidth=this.style3D.lineWidth),_0x4d88a5(this,t),this._updateEdgeDistanceFalloffFactor();for(var c=this._excavateRegionCommands.values.length,h=0;h<c;h++){var d=this._excavateRegionCommands.values[h];t.commandList.push(d)}_0x5d18c0(t,this),this._layerUBO.update(e,t),e$2b(this._waterLayerUbo)&&this._waterLayerUbo.update(e),e$2b(this._polylineEffectUbo)&&this._polylineEffectUbo.update(e),e$2b(this._regionEffectUbo)&&this._regionEffectUbo.update(e)}}};var _0x3e6308=new p$1d;function _0x4ed776(e){for(var t=[],i=0,n=e._layerScheduler._rootEntities.length;i<n;i++){var r=e._layerScheduler._rootEntities[i];t.push(r)}for(;t.length;){if(e$2b(r=t.pop())){e$2b(r._originalBS)&&(i$1c.transform(r._originalBS,e._matModel,r._boundingSphere),_0x132fa8(r,e._matModel));for(i=0,n=r._childrenPageLod.length;i<n;i++){var o=r._childrenPageLod[i];_0x132fa8(o,e._matModel),e$2b(o._originalBS)&&i$1c.transform(o._originalBS,e._matModel,o._boundingSphere);for(var a=0,s=o._renderEntityList.length;a<s;a++){var l=o._renderEntityList[a];!e$2b(l)||!e$2b(l._colorCommand)||(p$1d.inverse(l._colorCommand.modelMatrix,_0x3e6308),i$1c.transform(l._boundingVolume,_0x3e6308,l._boundingVolume),p$1d.multiply(e._matModel,l._geoMatrix,l._colorCommand.modelMatrix),i$1c.transform(l._boundingVolume,l._colorCommand.modelMatrix,l._boundingVolume),l._colorCommand._boundingVolume=l._boundingVolume)}t.push(o._entity)}}}}function _0x132fa8(e,t){if(e$2b(e.obbMin)){var i=e.obbMin,n=e.obbMax,r=[];r.push(new o$1p(i.x,i.y,i.z)),r.push(new o$1p(i.x,i.y,n.z)),r.push(new o$1p(i.x,n.y,i.z)),r.push(new o$1p(i.x,n.y,n.z)),r.push(new o$1p(n.x,i.y,i.z)),r.push(new o$1p(n.x,i.y,n.z)),r.push(new o$1p(n.x,n.y,i.z)),r.push(new o$1p(n.x,n.y,n.z));for(var o=0;o<8;o++)r[o]=p$1d.multiplyByPoint(t,r[o],r[o]);e._orientedBoundingBox=y$Z.fromPoints(r,e._orientedBoundingBox)}}function _0x94c960(e,t,i){for(var n,r=0,o=e.length;r<o;r++){var a=e[r],s=a.times;if(t>=s[0]&&t<=s[s.length-1]){n=a;break}}n&&n.evaluate(t,i)}var _0x49662a=n$13.clone(n$13.IDENTITY),_0x12aee3=new i$15,_0x1b7121=new p$1d,_0xffc54a=new p$1e,_0x38366c=new p$1e,_0x425e65=new o$1p;function _0x31d37c(e,t,i){"rotation"===t.type&&(_0x94c960(t.splines,i,_0x49662a),p$1e.fromQuaternion(_0x49662a,_0x38366c),m$17.headingPitchRollToFixedFrame(e._position,_0x12aee3,t$13.WGS84,m$17.eastNorthUpToFixedFrame,_0x1b7121),p$1d.getRotation(_0x1b7121,_0xffc54a),p$1e.multiply(_0xffc54a,_0x38366c,_0xffc54a),p$1d.getTranslation(e._matModel,_0x425e65),p$1d.fromRotationTranslation(_0xffc54a,_0x425e65,e._matModel))}var _0x1b7037=new o$1p(1,1,1);function _0x1b9790(e,t,i){"scale"===t.type&&(_0x94c960(t.splines,i,_0x1b7037),p$1d.setScale(e._matModel,_0x1b7037,e._matModel))}function _0x4d6b8d(e,t,i){"translation"===t.type&&(_0x94c960(t.splines,i,e._position),p$1d.setTranslation(e._matModel,e._position,e._matModel))}var _0x540b05=new e$29;function _0x5d18c0(e,t){e$2b(e.realtimeRasterSwipeParams)||(e.realtimeRasterSwipeParams={}),_0x540b05.x=t._swipeRegion.x*e.context.drawingBufferWidth,_0x540b05.y=(1-t._swipeRegion.y)*e.context.drawingBufferHeight,_0x540b05.z=t._swipeRegion.z*e.context.drawingBufferWidth,_0x540b05.w=(1-t._swipeRegion.w)*e.context.drawingBufferHeight,e.realtimeRasterSwipeParams.swipeRegion=_0x540b05,e.realtimeRasterSwipeParams.swipeEnabled=t._swipeEnabled}var _0x4c8082=new e$29;function _0x3f747d(e,t){e.updateAllObjsVisible(t.layer,t.isVisible)}function _0x538ae5(e,t){e.updateTheme(t.layer)}function _0x2f0852(e,t){e.updateObjsColor(t.ids)}function _0x3f1376(e,t){e.updateObjsTranslate(t.ids)}function _0x58b954(e,t){e.updateExtendHeight(t.ids)}function _0x30e390(e,t){e.removeExtendHeight(t.ids)}function _0x505c51(e,t){e.removeAllExtendHeight()}function _0x9f80c9(e,t){e.updateObjsOperation(t.ids,t)}function _0x3efb93(e,t,i){var n=new o$1p,r=new o$1p;o$1p.subtract(t,e,n),o$1p.subtract(i,e,r);var o=new o$1p;o$1p.cross(n,r,o),o$1p.normalize(o,o);var a=-o$1p.dot(o,e);return new e$29(o.x,o.y,o.z,a)}function _0x230367(e,t){var i=e._projection,n=i.ellipsoid,r=new o$1p,o=new a$18;return n.cartesianToCartographic(t,o),i.project(o,r),o$1p.fromElements(r.z,r.x,r.y)}_0x22e933.prototype.render=function(e,t){if(e$2b(e)&&e$2b(t)){if(t.passes.pick){_0x4c8082.x=e._pickPosition[0],_0x4c8082.y=e._pickPosition[1],_0x4c8082.z=e._pickPosition[2],_0x4c8082.w=1;var i=new p$1d;p$1d.inverse(this._matModel,i),p$1d.multiplyByVector(i,_0x4c8082,_0x4c8082),_0x4c8082.z=_0x4c8082.z+this.height<0?2:_0x4c8082.z+this.height,e$29.clone(_0x4c8082,this._pickPosition)}if(this._picking=t.passes.pick,this.updateFlattenFrameBuffer(e,t),this._updateExcavationFrameBuffer(e,t),this.updateHypRegionFrameBuffer(e,t),this.updateOverlayFrameBuffer(e,t),this._clipping){var n=t.camera.inverseViewMatrix,r=new p$1d;p$1d.transpose(n,r);for(var o=0;o<6;o++)p$1d.multiplyByVector(r,this._oriClipPlane[o],this._clipPlane[o])}this._spatialClipEnable&&e$2b(this._spatialQuery)&&this._spatialQuery._updateTextures(e,t)}},_0x22e933.prototype.setSelection=function(e,t){if(_0x41168d.S3M!==this._version&&(o$1q.defined("setSelection ids",e),this._selectEnabled&&this._enableHighlight)){if(Array.isArray(e)||(e=[e]),this.multiChoose||this.releaseSelection(),this._lastSelectSkeletonId=u$_(t,-1),this._fileType===d$15.ClampGroundRealtimeRasterCache)for(var i=0,n=e.length;i<n;i++)this._layerScheduler.refreshRasterById(e[i],this._frameState);this._scene._layers.setSelectedLayer(this),this._selections=this._selections.concat(e),this.setObjectsOperationByID(e,_0x4580ad.SELECTED)}},_0x22e933.prototype.getSelection=function(){return[].concat(this._selections)},_0x22e933.prototype.releaseSelection=function(){if(_0x41168d.S3M!==this._version&&(this._showLabel&&this._labelCollection.releaseSelection(),!(this._selections.length<1))){if(this._fileType===d$15.ClampGroundRealtimeRasterCache)for(var e=0,t=this._selections.length;e<t;e++)this._layerScheduler.refreshRasterById(this._selections[e],this._frameState);this.removeObjectsOperation(this._selections,_0x4580ad.SELECTED),this._selections.length=0}},_0x22e933.prototype.setSkeletonSelection=function(e){},_0x22e933.prototype.setRenderSelectionTexBySkeletonId=function(e){var t={};t.layer=this,t.enable=e,this.traverseRenderEntity(t,_0x4c8e11)},_0x22e933.prototype.setObjsColor=function(e,t){if(_0x41168d.S3M!==this._version&&this._fileType!==d$15.ClampObjectPolygon){o$1q.defined("setObjsColor ids",e),o$1q.defined("setObjsColor color",t),o$1q.typeOf.object("setObjsColor color",t),Array.isArray(e)||(e=[e]);for(var i={},n=0,r=e.length;n<r;n++){var o=e[n]+"";!e$2b(o)||(this._objsColorList[o]=t,i[o]=t)}this.updateObjsColor(i)}},_0x22e933.prototype.getObjsColor=function(e){if(!e$2b(e))throw new Error("id is required");return _0x41168d.S3M===this._version?null:this._objsColorList[e]},_0x22e933.prototype.removeObjsColor=function(e){o$1q.defined("removeObjsColor ids",e),Array.isArray(e)||(e=[e]);for(var t={},i=0,n=e.length;i<n;i++){var r=e[i];e$2b(this._objsColorList[r])&&(t[r]=e$1U.TRANSPARENT,delete this._objsColorList[r])}this.removeObjectsOperation(e,_0x4580ad.SetColor),this.updateObjsColor(t)},_0x22e933.prototype.removeAllObjsColor=function(){if(!(Object.keys(this._objsColorList).length<1)){var e={};for(var t in this._objsColorList)this._objsColorList.hasOwnProperty(t)&&(e[t]=e$1U.TRANSPARENT);this._objsColorList={},this.updateObjsColor(e)}},_0x22e933.prototype.setObjsExtendHeight=function(e,t){if(_0x41168d.S3M!=this._version&&e$2b(this._objsHeightList)){o$1q.defined("setObjsExtendHeight ids",e),o$1q.defined("setObjsExtendHeight height",t),Array.isArray(e)||(e=[e]);for(var i=new e$1N,n=0,r=e.length;n<r;n++){var o=e[n];this._objsHeightList.set(o,t),i.set(o,t)}this.updateExtendHeight(i)}},_0x22e933.prototype.removeAllObjsExtendHeight=function(){!e$2b(this._objsHeightList)||(this._objsHeightList.removeAll(),this.removeAllExtendHeight())},_0x22e933.prototype.removeObjsExtendHeight=function(e){if(e$2b(this._objsHeightList)){o$1q.defined("removeObjsExtendHeight ids",e),Array.isArray(e)||(e=[e]);for(var t=0,i=e.length;t<i;t++){var n=e[t];this._objsHeightList.remove(n)}this.removeExtendHeight(e)}},_0x22e933.prototype.setOnlyObjsVisible=function(e,t,i,n){if(i=u$_(i,!0),n=u$_(n,!1),_0x41168d.S3M===this._version)return null;if(o$1q.defined("setOnlyObjsVisible ids",e),o$1q.typeOf.bool("setOnlyObjsVisible isVisible",t),Array.isArray(e)||(e=[e]),0===e.length){this._allObjsHide=t,this._objsVisibleList.removeAll();var r=Object.keys(this._objsHideList._hash);return this.removeObjectsOperation(r,_0x4580ad.HIDE),this._objsHideList.removeAll(),i&&!n&&(this._objsVisibleMap={}),void this.updateAllObjsVisible(!t)}var o=this._objsVisibleList,a=this._objsHideList,s=this._objsVisibleMap;t?(e.map((function(e){o.set(e,!0),a.remove(e),i&&(s[e]=!0)})),this.removeObjectsOperation(e,_0x4580ad.HIDE)):(e.map((function(e){o.remove(e),a.set(e,!0),i&&(s[e]=!1)})),this.setObjectsOperationByID(e,_0x4580ad.HIDE))},_0x22e933.prototype.setObjsVisible=function(e,t,i){0!==e.length?(this.setOnlyObjsVisible([],t,i),this.setOnlyObjsVisible(e,t,i)):this.setOnlyObjsVisible([],t,i)},_0x22e933.prototype.setPointCloudGroupsVisible=function(e,t){if(this._fileType===d$15.PointCloudFile&&e$2b(this._pointCloudLayerVisible)){o$1q.defined("setPointCloudGroupsVisible groupNames",e),o$1q.typeOf.bool("setPointCloudGroupsVisible isVisible",t),Array.isArray(e)||(e=[e]);for(var i=0,n=e.length;i<n;i++)this._pointCloudLayerVisible.hasOwnProperty(e[i])&&(this._pointCloudLayerVisible[e[i]]=t)}},_0x22e933.prototype.getPointCloudGroupInfos=function(){if(this._fileType!==d$15.PointCloudFile)return[];if(!e$2b(this._pointCloudLayerVisible))return[];var e=[];for(var t in this._pointCloudLayerVisible)this._pointCloudLayerVisible.hasOwnProperty(t)&&e.push(t);return e},_0x22e933.prototype.getPointCloudGroupBounds=function(e){if(this._fileType===d$15.PointCloudFile&&e$2b(this._groupNameBounds))return this._groupNameBounds.get(e)},_0x22e933.prototype.getObjsVisible=function(e){if(!this.visible)return!1;if(_0x41168d.S3M===this._version)return!0;var t=this._objsColorList[e],i=!0;return e$2b(t)&&(i&=t.alpha),i},_0x22e933.prototype.setObjsOffset=function(e){if(e$2b(this._layerScheduler._extrudedId))if(Array.isArray(e))for(var t=0;t<e.length;t++)this._polygonsTranslate[e[t]]=o$1p.clone(this._selectedTranslate);else this._polygonsTranslate[e]=o$1p.clone(this._selectedTranslate);else this._boundingSphereOffset=o$1p.clone(this._selectedTranslate),this.setObjectsOperationByID(e,_0x4580ad.OFFSET)},_0x22e933.prototype.setObjsTranslate=function(e,t){if(_0x41168d.S3M!==this._version){o$1q.defined("setObjsTranslate ids",e),o$1q.defined("setObjsTranslate translate",t),o$1q.typeOf.object("setObjsTranslate translate",t),Array.isArray(e)||(e=[e]);for(var i={},n=0,r=e.length;n<r;n++){var o=e[n];!e$2b(o)||(this._objsOffsetList[o]=t,i[o]=t)}Object.keys(i).length>0&&(this.traverseRenderEntity({ids:i},_0x3f1376),this.setObjectsOperationByID(e,_0x4580ad.OFFSET))}},_0x22e933.prototype.setBatchObjsTranslate=function(e){_0x41168d.S3M!==this._version&&(o$1q.defined("setObjsTranslate option",e),Object.getPrototypeOf(e)===Object.prototype&&(Object.assign(this._objsOffsetList,e),Object.keys(e).length>0&&(this.traverseRenderEntity({ids:e},_0x3f1376),this.setObjectsOperationByID(Object.keys(e),_0x4580ad.OFFSET))))},_0x22e933.prototype.removeObjsTranslate=function(e){o$1q.defined("removeObjsTranslate ids",e),Array.isArray(e)||(e=[e]);for(var t={},i=0,n=e.length;i<n;i++){var r=e[i];e$2b(this._objsOffsetList[r])&&(delete this._objsOffsetList[r],t[r]=o$1p.ZERO)}this.removeObjectsOperation(e,_0x4580ad.OFFSET),Object.keys(t).length>0&&this.traverseRenderEntity({ids:t},_0x3f1376)},_0x22e933.prototype.removeAllObjsTranslate=function(){var e={};for(var t in this._objsOffsetList)this._objsOffsetList.hasOwnProperty(t)&&(e[t]=o$1p.ZERO);this.traverseRenderEntity({ids:e},_0x3f1376),this._objsOffsetList={}},_0x22e933.prototype.removeObjsOffset=function(e){this.removeObjectsOperation(e,_0x4580ad.OFFSET)},_0x22e933.prototype.removeAllObjsOffset=function(){this._boundingSphereOffset=o$1p.ZERO,this.removeAllObjectsOperation(_0x4580ad.OFFSET)},_0x22e933.prototype.setObjectsOperationByID=function(e,t){if(_0x41168d.S3M!==this._version){o$1q.defined("set Objs Operation ids",e),o$1q.defined("set Objs Operation operationType",t),Array.isArray(e)||(e=[e]),t===_0x4580ad.CLIP&&(this._operationType&_0x4580ad.CLIP)===_0x4580ad.RESET&&(this._operationType|=t,this.traverseRenderEntity({layer:this,enable:!0},_0x30c63e));for(var i,n=new e$1N,r=0,o=e.length;r<o;r++)if(e$2b(i=e[r])){var a=u$_(this._objsOperationList[i],0);a!==t&&(a|=t,this._objsOperationList[i]=a,n.set(i,a))}n.length>0&&this.updateObjsOperation(n._hash)}},_0x22e933.prototype.removeObjectsOperation=function(e,t){if(_0x41168d.S3M!==this._version){o$1q.defined("set Objs Operation ids",e),Array.isArray(e)||(e=[e]);for(var i,n=_0x4580ad.ALL^t,r=new e$1N,o=0,a=e.length;o<a;o++){i=e[o];var s=this._objsOperationList[i];!e$2b(s)||((s&=n)===_0x4580ad.RESET?delete this._objsOperationList[i]:this._objsOperationList[i]=s,r.set(i,s))}r.length>0&&this.updateObjsOperation(r._hash)}},_0x22e933.prototype.removeAllObjectsOperation=function(e){if(_0x41168d.S3M!==this._version&&!(Object.keys(this._objsOperationList).length<1)){var t=_0x4580ad.ALL^e,i=new e$1N,n=this._objsOperationList;for(var r in n)if(n.hasOwnProperty(r)){var o=this._objsOperationList[r];if(!e$2b(o))continue;(o&=t)===_0x4580ad.RESET?delete this._objsOperationList[r]:this._objsOperationList[r]=o,i.set(r,o)}i.length>0&&this.updateObjsOperation(i._hash)}},_0x22e933.prototype.setCategoriesVisible=function(e,t){o$1q.defined("set Categories Visible",e),Array.isArray(e)||(e=[e]);var i=this._hypMaxCategory,n=this._hypMinCategory,r=256,o=Math.max(Math.ceil((i-n)/r),1);e$2b(this._categorieTexture)||(this._categorieTexture=new t$V({context:this._context,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,width:r,height:o,flipY:!1,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),this.traverseRenderEntity({layer:this},_0x2696f4));var a=new Uint8Array(r*o*4);if(t!==_0x576c2d.ResetAll){var s,l,u;if(t===_0x576c2d.Hide)for(s=0,l=e.length;s<l;s++)u=e[s],this._categoryHideList.set(u,u);else for(s=0,l=e.length;s<l;s++)u=e[s],this._categoryHideList.contains(u)&&this._categoryHideList.remove(u);for(s=0;s<this._categoryHideList.values.length;s++){var c=(u=this._categoryHideList.values[s])-n;a[4*c]=255,a[4*c+1]=255,a[4*c+2]=255,a[4*c+3]=255}this._categorieTexture.copyFrom({width:r,height:o,arrayBufferView:a})}else this._categorieTexture.copyFrom({width:r,height:o,arrayBufferView:a})},_0x22e933.prototype.addFlattenRegion=function(e){var t=e.name,i=e.position;if(!e$2b(t)||!e$2b(i))return!1;if(e$2b(this._flattenRegions.get(t)))return!1;e$2b(this._flattenTexture)||(this._flattenTexture=new t$V({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$10.RGBA,pixelDatatype:this._context.floatingPointTexture?_$$.FLOAT:void 0}));var n=this._createRasterRegion(i),r=o$1p.fromDegreesArrayHeights(i),o=i$1c.fromPoints(r,new i$1c);if(n.boundingSphere=o,this._flattenRegions.set(t,n),this._flattenUpdate=!0,this._flattening=!0,1===this._flattenRegions.values.length){var a={};a.layer=this,a.boundingSphere=o,this.traverseRenderEntity(a,_0x8f962)}return!0},_0x22e933.prototype.removeFlattenRegion=function(e){if(!this._flattenRegions.remove(e))return!1;if(this._flattenUpdate=!0,0===this._flattenRegions.values.length){this._flattenUpdate=!1,this._flattening=!1;var t={};t.layer=this,this.traverseRenderEntity(t,_0xb76181)}return!0},_0x22e933.prototype.removeAllFlattenRegion=function(){for(var e=0;e<this._flattenRegions.values.length;e++)this._flattenRegions.values[e].destroy(),this._flattenRegions.values[e]=null;this._flattenRegions.removeAll(),this._flattening=!1;var t={};t.layer=this,this.traverseRenderEntity(t,_0xb76181)},_0x22e933.prototype.addOverlayImage=function(e){var t=(e=u$_(e,{})).name,i=e.bounds,n=e.image;if(!e$2b(t)||!e$2b(i)||!e$2b(e.image))return!1;var r=this._overlayRegions.get(t);if(e$2b(r))return!1;e$2b(this._overlayTexture)||(this._overlayTexture=new t$V({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$10.RGBA}));var o=new t$V({context:this._context,width:n.width,height:n.height,pixelFormat:V$10.RGBA,source:n});if(this._overlayTextures.set(t,o),r=this._createRasterBounds(i),this._overlayRegions.set(t,r),this._overlayUpdate=!0,this._hasOverlay=!0,1===this._overlayRegions.values.length){var a={};a.layer=this,this.traverseRenderEntity(a,_0x56bfb4)}return!0},_0x22e933.prototype.removeOverlayImage=function(e){if(!e$2b(e))return!1;if(!e$2b(this._overlayRegions.get(e)))return!1;if(this._overlayTextures.remove(e),this._overlayRegions.remove(e),this._overlayUpdate=!0,0===this._overlayRegions.values.length){var t={};t.layer=this,this.traverseRenderEntity(t,_0x5d5603)}return!0},_0x22e933.prototype.setModifyRegions=function(e,t){if(this.clearModifyRegions(),t==_0x25a093.CLIP_INSIDE||t==_0x25a093.CLIP_OUTSIDE)for(var i=e.length,n=0;n<i;n++){var r={position:e[n],name:"modify_"+n};this.addExcavationRegion(r)}this._excavationMode=t},_0x22e933.prototype._setServerClipRegions=function(e,t){for(var i=0,n=e.length;i<n;i++){var r={position:e[i],name:"server_clipregion_"+i};this._addServerExcavationRegion(r)}this._serverExcavationMode=u$_(t,_0x25a093.CLIP_OUTSIDE)},_0x22e933.prototype.setClipRegions=function(e){if(!(e instanceof Array))throw new t$16("regions must be a georegion3d array");var t=this._baseUri.toString();new t$11(a={url:t.substring(0,t.indexOf("/data/path"))+"/config",method:"POST",data:JSON.stringify({clipRegions:e})})._makeRequest({method:"POST",data:a.data});for(var i=0;i<e.length;i++){for(var n=[],r=e[i],o=0;o<r.points.length;o++)n.push(r.points[o].x),n.push(r.points[o].y),n.push(r.points[o].z);var a={position:n,name:"server_clipregion_x"+i};this._addServerExcavationRegion(a)}},_0x22e933.prototype.clearModifyRegions=function(){for(var e=Object.keys(this._excavationRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];n.startsWith("modify_")&&this.removeExcavationRegion(n)}},_0x22e933.prototype.addExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(e$2b(t)||o$1q.typeOf.string("options.name",t),e$2b(i)||o$1q.typeOf.string("options.position",i),e$2b(this._excavationRegions.get(t)))return!1;e$2b(this._excavationTexture)||(this._excavationTexture=new t$V({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$10.RGBA}));var r=this._createRasterRegion(i,n,e$2b(n));if(r.name=t,this._excavationRegions.set(t,r),this._excavationUpdate=!0,this._hasExcavation=!0,1===this._excavationRegions.values.length){var o={};o.layer=this,this.traverseRenderEntity(o,_0x235e1d)}return!0},_0x22e933.prototype._addServerExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(e$2b(t)||o$1q.typeOf.string("options.name",t),e$2b(i)||o$1q.typeOf.string("options.position",i),e$2b(this._serverExcavationRegions.get(t)))return!1;e$2b(this._excavationTexture)||(this._excavationTexture=new t$V({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$10.RGBA}));var r=this._createRasterRegion(i,n,e$2b(n));if(r.name=t,this._serverExcavationRegions.set(t,r),this._excavationUpdate=!0,this._hasServerExcavation=!0,1===this._serverExcavationRegions.values.length){var o={};o.layer=this,this.traverseRenderEntity(o,_0x3f4d51)}return!0},_0x22e933.prototype.removeExcavationRegion=function(e){var t=this._excavationRegions.get(e);if(!this._excavationRegions.remove(e))return!1;if(t.destroy(),this._removeExcavationCommands(e),this._excavationUpdate=!0,0===this._excavationRegions.values.length){this._hasExcavation=!1,this._excavationUpdate=!1;var i={};i.layer=this,this.traverseRenderEntity(i,_0x5038fd)}return!0},_0x22e933.prototype._removeServerExcavationRegion=function(e){var t=this._serverExcavationRegions.get(e);if(!this._serverExcavationRegions.remove(e))return!1;if(t.destroy(),this._removeExcavationCommands(e),this._excavationUpdate=!0,0===this._serverExcavationRegions.values.length){this._excavationUpdate=!1,this._hasExcavation=!1;var i={};i.layer=this,this.traverseRenderEntity(i,_0x11e85f)}return!0},_0x22e933.prototype._removeExcavationCommands=function(e){var t=this._excavateRegionCommands.get(e+"side"),i=this._excavateRegionCommands.get(e+"bottom");t&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy()),i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom")},_0x22e933.prototype.removeAllExcavationRegion=function(){this._hasExcavation=!1;for(var e=Object.keys(this._excavationRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this.removeExcavationRegion(n)}this._excavationRegions.removeAll()},_0x22e933.prototype._createRasterRegion=function(e,t,i){var n=o$1p.fromDegreesArrayHeights(e);if(this._sceneMode!==C$13.SCENE3D)for(var r=0;r<n.length;r++)n[r]=_0x230367(this,n[r]);var o=new z$_({polygonHierarchy:{positions:n},perPositionHeight:!0}),a=z$_.createGeometry(o),s=new p$1d;p$1d.inverse(this._matModel,s),f$X.updateGeometry(a,e,s);var l=new f$X;if(l._geometry=a,l._bounds=f$X.updateGeoBounds(a),i){l.worldGeometry=z$_.createGeometry(o),l.colorGeometry=z$_.createGeometry(o);var u=o$1p.fromDegrees(e[0],e[1],0),c=new i$15(0,0,0);l._excavateMatrix=m$17.headingPitchRollToFixedFrame(u,c,t$13.WGS84),l.modelMatrix=p$1d.fromTranslation(new o$1p(e[0],e[1],0),new p$1d);for(var h=Number.MAX_VALUE,d=(r=0,e.length);r<d;r+=3)h=Math.min(h,e[r+2]);l.height=h-t,l.rectangle=h$18.fromCartesianArray(n),l.positions=e}return l},_0x22e933.prototype._createRasterBounds=function(e){var t=new j$N({rectangle:e}),i=j$N.createGeometry(t),n=new p$1d;if(p$1d.inverse(this._matModel,n),this._sceneMode===C$13.COLUMBUS_VIEW)for(var r=0;r<i.attributes.position.values.length;r+=i.attributes.position.componentsPerAttribute){var o=new o$1p(i.attributes.position.values[r],i.attributes.position.values[r+1],i.attributes.position.values[r+2]),a=a$18.fromCartesian(o),s=new o$1p;this._projection.project(a,s),i.attributes.position.values[r]=s.z,i.attributes.position.values[r+1]=s.x,i.attributes.position.values[r+2]=s.y}f$X.updateGeometry(i,void 0,n);var l=new f$X;return l._geometry=i,l._bounds=f$X.updateGeoBounds(i),l},_0x22e933.prototype._computeLayerModelBounds=function(){var e=new o$1p.fromRadians(this._layerBounds.west,this._layerBounds.south,0),t=new o$1p.fromRadians(this._layerBounds.west,this._layerBounds.north,0),i=new o$1p.fromRadians(this._layerBounds.east,this._layerBounds.south,0),n=new o$1p.fromRadians(this._layerBounds.east,this._layerBounds.north,0),r=[];r.push(e),r.push(t),r.push(i),r.push(n);var o=new p$1d;p$1d.inverse(this._matModel,o),this._layerModelBounds=new e$29(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(var a=0;a<4;a++)p$1d.multiplyByPoint(o,r[a],r[a]),this._layerModelBounds.x=Math.min(r[a].x,this._layerModelBounds.x),this._layerModelBounds.y=Math.min(r[a].y,this._layerModelBounds.y),this._layerModelBounds.z=Math.max(r[a].x,this._layerModelBounds.z),this._layerModelBounds.w=Math.max(r[a].y,this._layerModelBounds.w)},_0x22e933.prototype._combineRegionBounds=function(e){for(var t=new e$29(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),i=0;i<e.length;i++){var n=e[i]._bounds;t.x=Math.min(n.x,t.x),t.y=Math.min(n.y,t.y),t.z=Math.max(n.z,t.z),t.w=Math.max(n.w,t.w)}return t},_0x22e933.prototype.createRasterRegionDrawCommand=function(e,t,i,n){if(e$2b(t)&&!e$2b(t._command)){var r=new i$_({primitiveType:W$18.TRIANGLES});t._command=r;var o={position:0};r.vertexArray=c$12.fromGeometry({context:e,geometry:t._geometry,attributeLocations:o,bufferUsage:A$19.STATIC_DRAW,interleave:!0});var a=new s$U({sources:[_0x3af34f]});n==_0x236c52.Altitude?(a.defines.push("Mode_Height"),i.pixelDatatype===_$$.FLOAT&&a.defines.push("UseFloatTexture"),r.shaderProgram=r$13.fromCache({name:"RegionAltitudeSp",context:e,vertexShaderSource:_0x568483,fragmentShaderSource:a,attributeLocations:o})):n==_0x236c52.Texture?(a.defines.push("OVERLAY"),r.shaderProgram=r$13.fromCache({name:"RegionTextureSp",context:e,vertexShaderSource:_0x4dbad4,fragmentShaderSource:a,attributeLocations:o})):r.shaderProgram=r$13.fromCache({name:"RegionRasterSp",context:e,vertexShaderSource:_0x3a1ce5,fragmentShaderSource:a,attributeLocations:o}),r.framebuffer=new t$W({context:e,colorTextures:[i],destroyAttachments:!1}),r.renderState=d$1m.fromCache({viewport:new f$18(0,0,this._flattenTextureWidth,this._flattenTextureWidth)})}},_0x22e933.prototype.updateHypRegionFrameBuffer=function(e,t){if(this._hypsometricRegionUpdate){if(!e$2b(this._hypsometricRegion))return void(this._bUseHypRegion=!1);this._bUseHypRegion=!0,this._hypsometricRegionUpdate=!1;var i=new t$X({color:new e$1U(0,0,0,0),depth:1});i.framebuffer=new t$W({context:e,colorTextures:[this._hypsometricRenderTexture],destroyAttachments:!1}),i.renderState=d$1m.fromCache(),i.execute(e),this.createRasterRegionDrawCommand(e,this._hypsometricRegion,this._hypsometricRenderTexture,_0x236c52.Color);var n=this;this._hypsometricRegion._command.uniformMap={uRect:function(){return n._hypsometricBound}},this._hypsometricRegion._command.execute(e),i.framebuffer.destroy()}},_0x22e933.prototype.updateFlattenFrameBuffer=function(e,t){if(this._flattenUpdate){this._flattening=!0,this._flattenUpdate=!1,this._flattenBounds=this._combineRegionBounds(this._flattenRegions.values);var i=new t$X({color:new e$1U(0,0,0,0),depth:1});e$2b(this._flattenTexture)||(this._flattenTexture=new t$V({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$10.RGBA,pixelDatatype:this._context.floatingPointTexture?_$$.FLOAT:void 0})),i.framebuffer=new t$W({context:e,colorTextures:[this._flattenTexture],destroyAttachments:!1}),i.renderState=d$1m.fromCache(),i.execute(e);var n=this._flattenRegions.values.length;n<1&&(this._flattening=!1);for(var r=0;r<n;r++){var o=this._flattenRegions.values[r];this.createRasterRegionDrawCommand(e,o,this._flattenTexture,_0x236c52.Altitude);var a=this;o._command.uniformMap={uRect:function(){return a._flattenBounds}},o._command.execute(e)}i.framebuffer.destroy()}},_0x22e933.prototype.updateOverlayFrameBuffer=function(e,t){if(this._overlayUpdate){this._overlayUpdate=!1,this._overlayBounds=this._combineRegionBounds(this._overlayRegions.values),this._hasOverlay=this._overlayRegions.length>0;var i=new t$X({color:new e$1U(1,1,1,1),depth:1});i.framebuffer=new t$W({context:e,colorTextures:[this._overlayTexture],destroyAttachments:!1}),i.renderState=d$1m.fromCache(),i.execute(e);for(var n=this._overlayRegions.values.length,r=0;r<n;r++){var o=this._overlayRegions.values[r],a=this._overlayTextures.values[r];this.createRasterRegionDrawCommand(e,o,this._overlayTexture,_0x236c52.Texture),o._command.uniformMap=s(this._overlayBounds,a,o._bounds),o._command.execute(e)}i.framebuffer.destroy()}function s(e,t,i){return{uRect:function(){return e},uTexture:function(){return t},uSingleRegion:function(){return i}}}},_0x22e933.prototype._updateExcavationFrameBuffer=function(e,t){if(this._excavationUpdate){for(var i in t._framebufferList)i.indexOf("_excavationHeightLayer")>-1&&!e$2b(this._excavationRegions.get(i.slice(22)))&&(t._framebufferList[i]=!t._framebufferList[i].isDestroyed()&&t._framebufferList[i].destroy(),delete t._framebufferList[i]);var n=this._excavationRegions.values.length;this._hasExcavation=n>0,this._excavationUpdate=!1,this._excavationBounds=this._combineRegionBounds(this._excavationRegions.values);var r=this._serverExcavationRegions.values.length;if(this._hasServerExcavation=r>0,this._serverExcavationBounds=this._combineRegionBounds(this._serverExcavationRegions.values),0!=n||0!=r){var o=new t$X({color:new e$1U(0,0,0,0),depth:1});o.framebuffer=new t$W({context:e,colorTextures:[this._excavationTexture],destroyAttachments:!1}),o.renderState=d$1m.fromCache(),o.execute(e),b$W.createExcavationSideTexture(t,this),b$W.createExcavationBottomTexture(t,this);for(var a=0;a<n;a++){var s=this._excavationRegions.values[a];this.createRasterRegionDrawCommand(e,s,this._excavationTexture,_0x236c52.Color),e$2b(s.height)&&(b$W._createExcavationSideCommand(t,this,s),b$W._createExcavationBottomCommand(t,this,s));var l=this;s._command.uniformMap={uRect:function(){return l._excavationBounds}},s._command.execute(e)}for(var u=0;u<r;u++){s=this._serverExcavationRegions.values[u];this.createRasterRegionDrawCommand(e,s,this._excavationTexture,_0x236c52.Color),e$2b(s.height)&&(b$W._createExcavationSideCommand(t,this,s),b$W._createExcavationBottomCommand(t,this,s));l=this;s._command.uniformMap={uRect:function(){return l._serverExcavationBounds}},s._command.execute(e)}o.framebuffer.destroy()}}},_0x22e933.prototype.updateAllObjsVisible=function(e){this.traverseRenderEntity({layer:this,isVisible:e},_0x3f747d)},_0x22e933.prototype.updateObjsTheme=function(){var e={layer:this};this.traverseRenderEntity(e,_0x538ae5)},_0x22e933.prototype.updateObjsColor=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x2f0852)},_0x22e933.prototype.updateExtendHeight=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x58b954)},_0x22e933.prototype.removeExtendHeight=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x30e390)},_0x22e933.prototype.removeAllExtendHeight=function(){this.traverseRenderEntity({},_0x505c51)},_0x22e933.prototype.updateObjsOperation=function(e){var t={ids:e,offset:Math.max(Math.abs(this.selectedTranslate.x),Math.abs(this.selectedTranslate.y),Math.abs(this.selectedTranslate.z))};this.traverseRenderEntity(t,_0x9f80c9)},_0x22e933.prototype.refresh=function(){this._layerScheduler.refresh(),this.initialize()},_0x22e933.prototype.refreshVolume=function(){this._refreshVolume=!0},_0x22e933.prototype.clearCustomClipBox=function(){this.isRenderClipSection()&&this._context.numClampClipPlaneLayer--;for(var e=0,t=this._renderClipPlaneArray.values.length;e<t;e++)this._renderClipPlaneArray.values[e].destroy(),this._renderClipPlaneArray.values[e]=null;this._renderClipPlaneArray.removeAll(),this._clipping=!1;var i={layer:this,enable:!1};this.traverseRenderEntity(i,_0x5e8ef6),this._section=!1};var _0x14b66c=new a$18;function _0x3e670b(e){return e===R$J.KeepOutside?j$X.Disjoint:j$X.Intersects}function _0x423032(e,t){e.lightSourceChanged(t)}function _0x3d3175(e,t){e.updateShadow(t.layer)}function _0x5e8ef6(e,t){e.setCustomClipBox(t.layer,t.enable)}function _0x90188f(e,t){e.enableAdjustColor(t)}function _0x235e1d(e,t){e.enableExcavation(t)}function _0x5038fd(e,t){e.disableExcavation(t)}function _0x3f4d51(e,t){e.enableServerExcavation(t)}function _0x11e85f(e,t){e.disableServerExcavation(t)}function _0x8f962(e,t){e.enableFlatten(t)}function _0x56bfb4(e,t){e.enableOverlay(t)}function _0x5d5603(e,t){e.disableOverlay(t)}function _0x5f032b(e,t){e.enableAjustTransparentBackColor(t)}function _0x1fc069(e,t){e.disableAjustTransparentBackColor(t)}function _0xb76181(e,t){e.disableFlatten(t)}function _0x2d0dfd(e,t){e.enableHypsometric(t)}function _0x1067d9(e,t){e.disableHypsometric(t)}function _0x5a24f0(e,t){e.hasLightChange(t)}function _0x4c8e11(e,t){e.skeletonSelectEnable(t)}function _0x264393(e,t){e.selectColorTypeChange(t)}function _0x3fe446(e,t){e.mixColorTypeChange(t)}function _0x320632(e,t){e.splitDirectionChange(t)}function _0x5ac131(e,t){e.swipeStateChange(t)}function _0x30c7b8(e,t){e.PBRMaterialTypeChange(t)}function _0x2696f4(e,t){e.enableCategoryVisible(t)}function _0x388bf7(e,t){e.emissionTextureChange(t)}function _0xa7b04e(e,t){e.enableTextureMove(t)}function _0x45f5e3(e,t){e.enableTriangleFiltrate(t)}function _0x30c63e(e,t){e.enableClipFilt(t)}function _0xcf3b3(e,t){e.enableFusionChange(t)}function _0x44c915(e,t){e.enableFlood(t)}function _0x2c98e0(e,t){e.disableFlood(t)}function _0x53b69d(e){for(var t=1;t<e;)t<<=1;return t}function _0x1e4fa7(e,t){e.emissionTextureUnitChange(t)}function _0x10da3d(e,t){var i=p$1d.multiply(e._geoMatrix,t.scaleMatrix,new p$1d);p$1d.multiply(t.layerMatrix,i,e._matModel),e._modelMatrixDirty=!0}function _0x1ffa57(e,t){e.pbrParameterChange(t)}function _0x469ac0(e,t){e.edgeWireFrameModeChange(t)}function _0x407dab(e,t){var i=t,n=i._PBRMaterialParams.baseUri;i._PBRMaterialParams=e.material,i._PBRMaterialParams.baseUri=n,i._loadMaterialTexture(i._PBRMaterialParams,n);var r=i._PBRMaterialParams.pbrMetallicRoughness,o=i._PBRMaterialParams.textureunitstates;if(e$2b(r.snowEffect)&&-1!==r.snowEffect.snowNormalTextureIndex){var a=n+o[r.snowEffect.snowNormalTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0x579c48(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.snowEffect,"snowNormalTexture")}if(e$2b(r.snowEffect)&&-1!==r.snowEffect.snowMaskTextureIndex){a=n+o[r.snowEffect.snowMaskTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0x579c48(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.snowEffect,"snowMaskTexture")}if(e$2b(r.rainEffect)&&-1!==r.rainEffect.rippleTextureIndex){a=n+o[r.rainEffect.rippleTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0x579c48(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.rainEffect,"rippleTexture")}}function _0x4dd49b(e,t){return e.find((e=>t.url.includes(e._fileName)))}function _0x3b4551(e,t){e._historicalRecord.rootTiles.forEach((i=>{let n=_0x4dd49b(e._layerScheduler._rootEntities,i);if(n){let a=i.History[t];if(!a||(a=a.replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,""),a==n._fileName))return;n._fileName=f$O(a);for(var r=0;r<n._childrenPageLod.length;r++){var o=n._childrenPageLod[r];o=o&&!o.isDestroyed()&&o.destroy()}n._childrenPageLod.length=0,n.attributeBuffer=n.attributeBuffer&&!n.attributeBuffer.isDestroyed()&&n.attributeBuffer.destroy(),e._layerScheduler.LoadingPriority==_0x10659f.UsePagedLodInfo&&n._isRootTile?(n._configReady=!1,n._configLoadState=N$P.UNLOAD):(n._ready=!1,n._s3mLoadState=N$P.UNLOAD)}}))}_0x22e933.prototype.setCustomClipBox=function(e){if(!((e=e||{}).dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$16("dimensions position is required to create CustomClipBox");if(this._clipMode=_0x4a6483.CLIP_BEHIND_ALL_PLANE,e$2b(e.clipMode))switch(e.clipMode){case"clip_behind_any_plane":this._clipMode=_0x4a6483.CLIP_BEHIND_ANY_PLANE;break;case"clip_behind_all_plane":this._clipMode=_0x4a6483.CLIP_BEHIND_ALL_PLANE;break;case"only_keep_line":this._clipMode=_0x4a6483.ONLY_KEEP_LINE}if(e.dimensions){var t=new p$1d,i=e.position,n=new i$15(e.heading||0,e.pitch||0,e.roll||0);t=m$17.headingPitchRollToFixedFrame(i,n,t$13.WGS84);var r=.5*e.dimensions.x,o=.5*e.dimensions.y,a=.5*e.dimensions.z,s=[];s[0]=new e$29,s[0].x=-r,s[0].y=o,s[0].z=a,s[0].w=1,s[1]=new e$29,s[1].x=r,s[1].y=o,s[1].z=a,s[1].w=1,s[2]=new e$29,s[2].x=r,s[2].y=-o,s[2].z=a,s[2].w=1,s[3]=new e$29,s[3].x=-r,s[3].y=-o,s[3].z=a,s[3].w=1,s[4]=new e$29,s[4].x=-r,s[4].y=o,s[4].z=-a,s[4].w=1,s[5]=new e$29,s[5].x=r,s[5].y=o,s[5].z=-a,s[5].w=1,s[6]=new e$29,s[6].x=r,s[6].y=-o,s[6].z=-a,s[6].w=1,s[7]=new e$29,s[7].x=-r,s[7].y=-o,s[7].z=-a,s[7].w=1;for(var l=0;l<8;l++)p$1d.multiplyByVector(t,s[l],s[l]);if(this._sceneMode!==C$13.SCENE3D){var u=new n$1b;for(l=0;l<8;l++){var c=s[l],h=a$18.fromCartesian(c,void 0,_0x14b66c),d=u.project(h,s[l]);p$1d.multiplyByPoint(_0x2c98df,d,s[l])}}this._oriClipPlane[0]=e$29.clone(_0x3efb93(s[0],s[1],s[2])),this._oriClipPlane[1]=e$29.clone(_0x3efb93(s[0],s[4],s[1])),this._oriClipPlane[2]=e$29.clone(_0x3efb93(s[0],s[3],s[4])),this._oriClipPlane[3]=e$29.clone(_0x3efb93(s[6],s[2],s[5])),this._oriClipPlane[4]=e$29.clone(_0x3efb93(s[6],s[7],s[2])),this._oriClipPlane[5]=e$29.clone(_0x3efb93(s[6],s[5],s[7]))}else for(l=0;l<e.planePos.length;l++){var f=e.planePos[l],p=e.planeNormal[l];this._oriClipPlane[l].x=p.x,this._oriClipPlane[l].y=p.y,this._oriClipPlane[l].z=p.z,this._oriClipPlane[l].w=-o$1p.dot(f,p)}if(!this._clipping){e={layer:this,enable:!0};this.traverseRenderEntity(e,_0x5e8ef6)}this._clipping=!0},_0x22e933.prototype.setClipSection=function(e,t,i,n){var r=u$_(n,_0xff9e19.NONE);if(this._clipPlaneMode!==r&&(r!==_0xff9e19.NONE?this._context.numClampClipPlaneLayer++:this._context.numClampClipPlaneLayer--),this._clipPlaneMode=r,this.isRenderClipSection()){var o=this._renderClipPlaneArray.get(0);e$2b(o)||(o=new _0x3218ec(this),this._renderClipPlaneArray.set(0,o)),o.setPoints(e,t,i),this._section||this._context.numClampClipPlaneLayer++}},_0x22e933.prototype.setCustomClipPlane=function(e,t,i,n){if(this._sceneMode===C$13.COLUMBUS_VIEW&&(e=_0x230367(this,e),t=_0x230367(this,t),i=_0x230367(this,i)),this.setClipSection(e,t,i,n),this._oriClipPlane[0]=_0x3efb93(e,t,i),this._clipMode=_0x4a6483.CLIP_BEHIND_ALL_PLANE,this._section=!0,!this._clipping){var r={layer:this,enable:!0};this.traverseRenderEntity(r,_0x5e8ef6)}this._clipping=!0},_0x22e933.prototype.setCustomClipGeometry=function(e){var t=(e=e||{}).geometry;this._spatialClipEnable=!0;var i=e.spatialQuery,n=e.clippingType;i.geometry=t,i.positionMode=_0x3e670b(n),i._profile=!0,i._clipLayers.set(this.name,this),this._sqMode=i.positionMode,this._spatialQuery=i,this._clippingType=n},_0x22e933.prototype.clearCustomClipGeometry=function(){this._spatialClipEnable=!1},_0x22e933.prototype.setCustomClipCross=function(e){if(!(e=e||{}).dimensions||!e.position)throw new t$16("dimensions position is required to create CustomClipBox");this._clipMode=_0x4a6483.CLIP_BEHIND_ALL_PLANE;var t,i,n,r=new p$1d,o=e.position;t=e.heading||0,i=e.pitch||0,n=e.roll||0;var a,s,l,u=u$_(e.extrudeDistance,.1),c=new i$15(e$2a.toRadians(t),e$2a.toRadians(i),e$2a.toRadians(n));if(this._sceneMode===C$13.SCENE3D)r=m$17.headingPitchRollToFixedFrame(o,c,t$13.WGS84);else{var h=_0x230367(this,o);p$1d.setTranslation(p$1d.clone(p$1d.IDENTITY),h,r);var d=p$1e.fromHeadingPitchRoll(c);p$1d.multiplyByMatrix3(r,d,r)}a=.5*e.dimensions.x,s=.5*e.dimensions.y,l=u;var f=[];f[0]=new e$29,f[0].x=-a,f[0].y=s,f[0].z=l,f[0].w=1,f[1]=new e$29,f[1].x=a,f[1].y=s,f[1].z=l,f[1].w=1,f[2]=new e$29,f[2].x=a,f[2].y=-s,f[2].z=l,f[2].w=1,f[3]=new e$29,f[3].x=-a,f[3].y=-s,f[3].z=l,f[3].w=1,f[4]=new e$29,f[4].x=-a,f[4].y=s,f[4].z=-l,f[4].w=1,f[5]=new e$29,f[5].x=a,f[5].y=s,f[5].z=-l,f[5].w=1,f[6]=new e$29,f[6].x=a,f[6].y=-s,f[6].z=-l,f[6].w=1,f[7]=new e$29,f[7].x=-a,f[7].y=-s,f[7].z=-l,f[7].w=1;for(var p=0;p<8;p++)p$1d.multiplyByVector(r,f[p],f[p]);this._oriClipPlane[0]=new e$29(0,0,0,0),this._oriClipPlane[1]=e$29.clone(_0x3efb93(f[0],f[4],f[1])),this._oriClipPlane[2]=e$29.clone(_0x3efb93(f[0],f[3],f[4])),this._oriClipPlane[3]=e$29.clone(_0x3efb93(f[6],f[2],f[5])),this._oriClipPlane[4]=e$29.clone(_0x3efb93(f[6],f[7],f[2])),this._oriClipPlane[5]=e$29.clone(_0x3efb93(f[6],f[5],f[7])),this._clipping||this.traverseRenderEntity({layer:this,enable:!0},_0x5e8ef6),this._clipping=!0},_0x22e933.prototype.getClipRegion=function(){if(this._clipping){var e=o$1m.fromCartesian4(this._oriClipPlane[0]),t=this._layerBounds;if(e$2b(t)){var i=h$18.southwest(t),n=h$18.northwest(t),r=h$18.northeast(t),o=h$18.southeast(t);i=o$1p.fromRadians(i.longitude,i.latitude,i.height),n=o$1p.fromRadians(n.longitude,n.latitude,n.height),r=o$1p.fromRadians(r.longitude,r.latitude,r.height),o=o$1p.fromRadians(o.longitude,o.latitude,o.height);var a=new o$1p(0,0,0),s=o$1p.normalize(i,new o$1p),l=o$1p.normalize(n,new o$1p),u=o$1p.normalize(r,new o$1p),c=o$1p.normalize(o,new o$1p),h=new f$17(a,s),d=new f$17(a,l),f=new f$17(a,u),p=new f$17(a,c),_=g$1h.rayPlane(h,e),m=g$1h.rayPlane(d,e),g=g$1h.rayPlane(f,e),x=g$1h.rayPlane(p,e);if(e$2b(_)&&e$2b(m)&&e$2b(g)&&e$2b(x))return{polygon:{hierarchy:[_,m,g,x],material:e$1U.WHITE.withAlpha(.5),perPositionHeight:!0}}}}},_0x22e933.prototype.addWaterPlane=function(e){if(!(e=e||{}).boundingVolume)throw new t$16("position radius distance is required to add the plane");this._waterPlanes=this._waterPlanes?this._waterPlanes:new e$1N;var t=this._waterPlanes.length;return this._waterPlanes.set(t,e),t},_0x22e933.prototype.removeWaterPlane=function(e){this._waterPlanes.remove(e)},_0x22e933.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x22e933.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~3");return 1<<e&this._visibleViewport},_0x22e933.prototype.setFlattenRegionVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._flattenVisibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x22e933.prototype.updateShadow=function(){var e={layer:this};this.traverseRenderEntity(e,_0x3d3175)},_0x22e933.prototype.isSilhouette=function(){return this._selectColorType===Zr$2.SILHOUETTE||this._selectColorType===Zr$2.ALWAYS_SHOW_SILHOUETTE},_0x22e933.prototype.isRenderClipSection=function(){return this._clipPlaneMode!==_0xff9e19.NONE},_0x22e933.prototype.bloomEnableChange=function(e){e?this._context.numPostEffectFilterObject++:this._context.numPostEffectFilterObject--},_0x22e933.prototype.lightSourceChanged=function(e){this.traverseRenderEntity({changedList:e,layer:this},_0x423032)},_0x22e933.prototype.getAttributesById=function(e){if(0!==parseInt(e)&&!parseInt(e))throw new t$16("id must be a number!");return this._layerScheduler.getAttributesById(e)},_0x22e933.prototype.traverseRenderEntity=function(e,t){this._layerScheduler.traverseRenderEntity(e,t)},_0x22e933.prototype.isDestroyed=function(){return!1},_0x22e933.prototype.destroy=function(){e$2b(this._layerScheduler)&&(this._layerScheduler.destroy(),this._layerScheduler=null);for(var e=0;e<this._flattenRegions.values.length;e++)this._flattenRegions.values[e].destroy(),this._flattenRegions.values[e]=null;this._flattenRegions.removeAll(),delete this._flattenBounds,this._flattenBounds=null,e$2b(this._flattenTexture)&&(this._flattenTexture.destroy(),this._flattenTexture=null);for(var t=Object.keys(this._excavationRegions._hash),i=(e=0,t.length);e<i;e++){var n=t[e];this._excavationRegions.get(n).destroy(),this._removeExcavationCommands(n)}if(this._excavationRegions.removeAll(),delete this._excavationBounds,this._excavationBounds=null,e$2b(this._excavationTexture)&&(this._excavationTexture.destroy(),this._excavationTexture=null),e$2b(this._excavationSideTexture)&&(this._excavationSideTexture.destroy(),this._excavationSideTexture=null),e$2b(this._excavationBottomTexture)&&(this._excavationBottomTexture.destroy(),this._excavationBottomTexture=null),e$2b(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),e$2b(this._hypsometricRenderTexture)&&(this._hypsometricRenderTexture.destroy(),this._hypsometricRenderTexture=null),e$2b(this._hypsometricSetting)&&(this._hypsometricSetting.destroy(),this._hypsometricSetting=null),e$2b(this._hypsometricRegion)&&(this._hypsometricRegion.destroy(),this._hypsometricRegion=null),e$2b(this._noiseMapTexture)&&(this._noiseMapTexture.destroy(),this._noiseMapTexture=null),e$2b(this._pbrMetalTexture)&&(this._pbrMetalTexture.destroy(),this._pbrMetalTexture=null),e$2b(this._pbrRoughTexture)&&(this._pbrRoughTexture.destroy(),this._pbrRoughTexture=null),this._fileType===d$15.ClampGroundRealtimeRasterCache&&this.refreshRaster(),e$2b(this._spatialQuery)&&e$2b(this._spatialQuery._clipLayers)&&this._spatialQuery._clipLayers.remove(this.name),e$2b(this._commonLayerUniformBuffer)&&(this._commonLayerUniformBuffer.destroy(),this._commonLayerUniformBuffer=null),e$2b(this._materialMap))for(var r in this._materialMap)if(this._materialMap.hasOwnProperty(r)){var o=this._materialMap[r].material.pbrMetallicRoughness;if(!e$2b(o))continue;e$2b(o.baseColorTexture)&&o.baseColorTexture.destroy(),e$2b(o.normalTexture)&&o.normalTexture.destroy(),e$2b(o.emissiveTexture)&&o.emissiveTexture.destroy(),e$2b(o.metallicRoughnessTexture)&&o.metallicRoughnessTexture.destroy(),e$2b(o.occlusionTexture)&&o.occlusionTexture.destroy()}if(e$2b(this._spatialQuery)&&e$2b(this._spatialQuery._clipLayers)&&this._spatialQuery._clipLayers.remove(this.name),e$2b(this.instanceSkeletonManager)){for(var r in this.instanceSkeletonManager.skeletons._hash)this.instanceSkeletonManager.skeletons._hash.hasOwnProperty(r)&&this.instanceSkeletonManager.remove(r);this.instanceSkeletonManager=void 0}return e$2b(this._layerUBO)&&(this._layerUBO.destroy(),this._layerUBO=null),i$10(this)},_0x22e933.prototype.setVolume=function(e){if(!(e$2b(e.values)&&e$2b(e.width)&&e$2b(e.height)&&e$2b(e.depth)&&e$2b(e.maxValue)&&e$2b(e.minValue)&&e$2b(e.maxHeight)&&e$2b(e.minHeight)&&e$2b(e.bounds)))throw new t$16("invalid volume object");this._volData={};var t=e.width,i=e.height,n=e.depth,r=Math.ceil(Math.sqrt(n));this._volData._nSideBlockCount=r;var o=Math.max(t,i)+2;this._volData._nBlockLength=o;var a=_0x53b69d(o*r-2);this._volData._nLength=a;var s=e.maxValue,l=e.minValue;this._volData._maxValue=s,this._volData._minValue=l,this._volData._width=t,this._volData._height=i,this._volData._depth=n;var u=e.bounds.leftBottom.x,c=e.bounds.rightTop.y,h=e.bounds.rightTop.x,d=e.bounds.leftBottom.y;this._volData._volBounds={left:u,top:c,right:h,bottom:d,minHeight:e.minHeight,maxHeight:e.maxHeight,width:h-u,length:c-d,height:e.maxHeight-e.minHeight};var f=a*a,p=new Array(f);p.fill(-1);for(var _=s-l,m=0;m<n;m++)for(var g=parseInt(m/r)*o,x=m%r*o,v=0;v<o-2;v++)for(var y=0;y<o-2;y++){var $=Math.min(y,t-1),b=m*i*t+(i-1-Math.min(v,i-1))*t+$,T=e.values[b];new e$29(0,0,0,0),-9999!=T&&(T=(T-l)/_,p[b=(g+v)*a+x+y]=T)}var C=new Float32Array(p,0,f);this._volData._buffer=new Uint8Array(C.buffer,0,4*f),this._fMaxValue=s,this._fMinValue=l},_0x22e933.prototype._setSQTextures=function(e){this._sqTextures=e},_0x22e933.prototype._setSQViewPrjMatrix=function(e,t){this._sqViewMatirx=e,this._sqPrjMatirx=t},_0x22e933.prototype._setSQMode=function(e){this._sqMode=e},_0x22e933.prototype._updateEdgeDistanceFalloffFactor=function(){0!=this._edgeCurrentCount?(this._edgeDistanceFalloffFactor=this._edgeCurrentTotalLength/this._edgeCurrentCount*40,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0):this._edgeCurrentTotalLength=0},_0x22e933.prototype._addRenderedEdge=function(e,t){this._edgeCurrentTotalLength+=e,this._edgeCurrentCount+=t},_0x22e933.prototype.setTextureEmissive=function(e){if(e!==this.textureEmissionUnit){this.textureEmissionUnit=e;var t={enable:!0};t.layer=this,this.traverseRenderEntity(t,_0x1e4fa7)}},_0x22e933.prototype.setPBRMaterial=function(e){LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_setPBRMaterial");var t=this._pbrParameter;if(this._pbrParameter|=e,t!==this._pbrParameter){var i={enable:!0};i.layer=this,this.traverseRenderEntity(i,_0x1ffa57)}},_0x22e933.prototype.setPBRMaterialFromJSON=function(e){if(LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_setPBRMaterial"),this._pbrParameter===je$g.NONE){var t=this,i="string"==typeof e;t._PBRMaterialParams.baseUri=i?i$1a(e):"",i?u$Q(e).then((function(e){_0x407dab(e,t)})):_0x407dab(e,t),this._usePBR=!0}},_0x22e933.prototype._updatePBRMaterial=function(){if(e$2b(this._PBRMaterialParams)&&e$2b(this._PBRMaterialParams.pendingTextureCount)&&this._PBRMaterialParams.pendingTextureCount===this._PBRMaterialParams.readyTextureCount){var e={enable:!0};e.layer=this,this.traverseRenderEntity(e,_0x1ffa57),this._PBRMaterialParams.loadingTexture=!1}},_0x22e933.prototype.removePBRMaterial=function(){var e=this._PBRMaterialParams.pbrMetallicRoughness;for(var t in e)e.hasOwnProperty(t)&&e[t]instanceof t$V&&e[t].destroy();this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:0,baseColor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:o$1p.ZERO,emissiveTextureIndex:-1,occlusionTextureIndex:-1,metallicRoughnessTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0,intensityScale:1,snowEffect:void 0,rainEffect:void 0},loadingTexture:void 0},this._usePBR=!1;var i={enable:!0};i.layer=this,this.traverseRenderEntity(i,_0x1ffa57)},_0x22e933.prototype.setExtrudedPolygons=function(e,t){this._layerScheduler._extrudedId=e,this._layerScheduler._polygons=t},_0x22e933.prototype._initEdgeTexture=function(){var e=[1,256,65536,16777216];function t(t,i,n){var r,o,a,s;n=u$_(n,0),r=t,o=0,a=1,t=Math.min(Math.max(r,o),a);for(var l=0;l<4;l++)i[n+l]=Math.floor(256*((s=t*e[l])-Math.floor(s)))}const i=8,n=256,r=[{distance:[-1.59027,-1.59426,-1.59674,-1.59766,-1.59702,-1.59479,-1.59095,-1.5855,-1.57843,-1.56973,-1.55942,-1.5475,-1.53398,-1.5189,-1.50226,-1.4841,-1.46446,-1.44337,-1.42088,-1.39703,-1.37188,-1.34547,-1.31786,-1.28912,-1.2593,-1.22847,-1.19668,-1.16402,-1.13053,-1.09629,-1.06137,-1.02582,-.98972,-.95313,-.91611,-.87872,-.84102,-.80306,-.76488,-.72654,-.68807,-.64952,-.61092,-.57232,-.53375,-.49527,-.45692,-.41874,-.38078,-.34309,-.3057,-.26867,-.23204,-.19585,-.16015,-.12497,-.09036,-.05634,-.02296,.00977,.04183,.07321,.10389,.13386,.16313,.19169,.21956,.24672,.27321,.299,.32413,.34858,.37237,.3955,.41798,.43981,.461,.48154,.50145,.52073,.53939,.55744,.57488,.5917,.6079,.62347,.63837,.65259,.66609,.67885,.69083,.70201,.71235,.72183,.73042,.73812,.7449,.75076,.7557,.75973,.76284,.76507,.76642,.76692,.76659,.76545,.76352,.76083,.7574,.75324,.74837,.74279,.73652,.72959,.72199,.71377,.70493,.69553,.68558,.67515,.66426,.65298,.64135,.62944,.6173,.60499,.59257,.58008,.56759,.55513,.54275,.5305,.51842,.50654,.4949,.48353,.47246,.4617,.45128,.44121,.43149,.42213,.41313,.40448,.39617,.38818,.3805,.37309,.36594,.35902,.35229,.34572,.33927,.33292,.32663,.32035,.31407,.30774,.30135,.29486,.28824,.28148,.27454,.26739,.26002,.25241,.24454,.23639,.22796,.21922,.21016,.20076,.19098,.18082,.17023,.1592,.14768,.13566,.1231,.10996,.09624,.08188,.06688,.05121,.03485,.01778,0,-.0185,-.03771,-.05763,-.07824,-.09952,-.12144,-.14396,-.16706,-.19069,-.21481,-.23938,-.26436,-.28971,-.31539,-.34136,-.36759,-.39404,-.42067,-.44746,-.47437,-.50136,-.52839,-.55544,-.58248,-.60948,-.63642,-.66329,-.6901,-.71684,-.74352,-.77015,-.79675,-.82332,-.84988,-.87644,-.90301,-.92958,-.95615,-.98272,-1.00926,-1.03575,-1.06217,-1.08847,-1.11463,-1.1406,-1.16633,-1.19178,-1.2169,-1.24164,-1.26595,-1.28979,-1.31312,-1.3359,-1.35809,-1.37963,-1.4005,-1.42064,-1.44,-1.45853,-1.47616,-1.49285,-1.50853,-1.52313,-1.53659,-1.54886,-1.55986,-1.56955,-1.57788,-1.5848],pressure:[-.01365,-.00206,.01025,.02327,.03696,.05129,.06619,.08163,.09755,.11393,.1307,.14784,.16531,.18308,.20111,.21938,.23786,.25651,.2753,.29419,.31315,.33215,.35115,.37015,.38913,.40806,.42694,.44576,.46449,.48313,.50167,.5201,.53839,.55653,.57448,.59222,.60971,.62692,.6438,.66033,.67648,.69221,.70753,.72242,.73688,.75093,.76456,.77779,.79063,.80309,.81517,.82686,.83817,.84911,.85967,.86987,.87972,.88924,.89845,.90734,.91594,.92425,.93229,.94005,.94754,.95475,.96166,.96826,.97451,.9804,.98588,.99092,.99549,.99957,.99685,.99381,.99131,.98936,.98796,.98711,.98681,.98706,.98787,.98923,.99113,.99357,.99654,1,.99607,.99171,.98695,.98181,.97634,.97057,.96452,.95824,.95175,.94506,.93818,.93113,.92389,.91647,.90887,.90109,.89314,.88501,.87672,.86831,.85978,.85119,.84256,.83393,.82533,.8168,.80836,.80002,.79181,.78374,.77582,.7681,.76059,.75331,.74629,.73955,.73311,.72697,.72116,.71568,.71054,.70572,.70121,.697,.69304,.68931,.68576,.68236,.67905,.67582,.67262,.66941,.66619,.66291,.65957,.65613,.65259,.64892,.6451,.6411,.6369,.63248,.62783,.62295,.61783,.61247,.60688,.60104,.59498,.58868,.58216,.57542,.56845,.56125,.5538,.5461,.53813,.52986,.52129,.51239,.50316,.49359,.4837,.47349,.46299,.45223,.44124,.43005,.41869,.40719,.39557,.38386,.37207,.36023,.34836,.33648,.32464,.31287,.30119,.28963,.27822,.26698,.25594,.2451,.23448,.22409,.21391,.20394,.19415,.18452,.17503,.16565,.15636,.14713,.13794,.1288,.11968,.11058,.10151,.09247,.08346,.07447,.06552,.05659,.0477,.03885,.03007,.02137,.01278,.00433,-.00393,-.012,-.01983,-.02738,-.03463,-.04155,-.0481,-.05429,-.0601,-.06553,-.07057,-.07524,-.07954,-.08347,-.08703,-.09022,-.09303,-.09544,-.09744,-.09898,-.10004,-.10059,-.1006,-.10005,-.09892,-.0972,-.09487,-.09192,-.08833,-.08409,-.07918,-.07357,-.06724,-.06019,-.0524,-.04386,-.03455,-.02448]},{distance:[-3.46259,-3.47131,-3.47668,-3.47863,-3.47712,-3.4721,-3.46352,-3.45138,-3.43566,-3.41635,-3.39347,-3.36704,-3.33709,-3.30368,-3.26684,-3.22667,-3.18322,-3.1366,-3.08689,-3.0342,-2.97865,-2.92036,-2.85946,-2.79607,-2.73034,-2.66241,-2.59242,-2.52052,-2.44686,-2.37159,-2.29485,-2.2168,-2.13757,-2.05731,-1.97616,-1.89426,-1.81174,-1.72875,-1.64543,-1.56191,-1.47833,-1.39483,-1.3115,-1.22847,-1.14581,-1.06361,-.98193,-.90083,-.82036,-.74054,-.66141,-.583,-.50532,-.4284,-.35228,-.277,-.20261,-.12916,-.05672,.01463,.08485,.15384,.22153,.28784,.35269,.41602,.47776,.53787,.59629,.653,.70799,.76123,.81274,.86253,.9106,.95698,1.0017,1.04477,1.0862,1.126,1.16415,1.20065,1.23546,1.26857,1.29994,1.32953,1.35731,1.38321,1.40719,1.42921,1.44922,1.46719,1.48309,1.49691,1.50862,1.51825,1.52581,1.53133,1.53486,1.53644,1.53616,1.53409,1.53031,1.52493,1.51803,1.50972,1.50009,1.48924,1.47725,1.46421,1.45019,1.43527,1.4195,1.40295,1.38568,1.36778,1.34929,1.3303,1.31087,1.29108,1.27099,1.25066,1.23018,1.2096,1.18898,1.16838,1.14785,1.12745,1.10721,1.08719,1.06741,1.04791,1.02871,1.00986,.99136,.97324,.95551,.93819,.92127,.90476,.88866,.87296,.85767,.84277,.82823,.81406,.80022,.7867,.77346,.76049,.74774,.73519,.72278,.71049,.69827,.68606,.67381,.66145,.64893,.63618,.62313,.60973,.5959,.5816,.56675,.5513,.53516,.51826,.50053,.4819,.46231,.44169,.42002,.39725,.37336,.34834,.32219,.2949,.2665,.23698,.20638,.17469,.14193,.10809,.07316,.03714,0,-.03827,-.07772,-.11836,-.16022,-.20332,-.24768,-.29332,-.34024,-.38844,-.43788,-.48854,-.54036,-.59329,-.64724,-.70211,-.75782,-.81425,-.87128,-.92881,-.98674,-1.04498,-1.10346,-1.1621,-1.22086,-1.27969,-1.33854,-1.3974,-1.45625,-1.51511,-1.57396,-1.63283,-1.69173,-1.75067,-1.80968,-1.86875,-1.9279,-1.98712,-2.04639,-2.10568,-2.16495,-2.22416,-2.28322,-2.34208,-2.40063,-2.4588,-2.51647,-2.57354,-2.62989,-2.68543,-2.74002,-2.79357,-2.84597,-2.89711,-2.94689,-2.99521,-3.04195,-3.087,-3.13023,-3.17152,-3.21075,-3.24779,-3.28252,-3.3148,-3.34451,-3.37154,-3.39577,-3.41709,-3.43539,-3.45059],pressure:[.87183,.87151,.87129,.87118,.87117,.87128,.87149,.87182,.87225,.8728,.87347,.87424,.87513,.87613,.87723,.87845,.87978,.88122,.88276,.88441,.88616,.88801,.88996,.892,.89414,.89637,.89868,.90108,.90356,.90611,.90874,.91144,.91421,.91704,.91993,.92287,.92587,.92892,.93201,.93514,.93831,.94151,.94474,.94799,.95126,.95456,.95786,.96118,.9645,.96783,.97116,.97448,.9778,.98111,.98441,.9877,.99096,.99421,.99742,.99938,.99622,.9931,.99001,.98697,.98397,.98101,.97811,.97526,.97246,.96972,.96703,.96441,.96185,.95935,.95691,.95455,.95225,.95002,.94786,.94577,.94376,.94182,.93995,.93817,.93646,.93483,.93328,.93181,.93042,.92911,.92788,.92673,.92566,.92467,.92376,.92293,.92217,.92149,.92088,.92034,.91987,.91947,.91913,.91886,.91864,.91849,.91838,.91833,.91834,.91839,.91849,.91863,.91883,.91907,.91935,.91968,.92005,.92046,.92092,.92142,.92195,.92253,.92314,.9238,.92449,.92521,.92598,.92677,.9276,.92847,.92936,.93029,.93125,.93224,.93325,.9343,.93537,.93646,.93758,.93872,.93988,.94106,.94225,.94346,.94469,.94593,.94718,.94844,.94971,.95098,.95226,.95354,.95482,.9561,.95738,.95867,.95995,.96122,.9625,.96377,.96504,.9663,.96757,.96883,.97009,.97135,.97261,.97387,.97513,.9764,.97767,.97895,.98023,.98153,.98284,.98416,.98549,.98684,.98821,.9896,.99101,.99244,.99389,.99537,.99688,.99842,1,.99839,.99675,.99508,.99336,.99161,.98982,.98799,.98613,.98422,.98228,.98029,.97827,.97622,.97414,.97202,.96987,.9677,.96551,.9633,.96107,.95882,.95656,.9543,.95202,.94975,.94747,.94519,.94292,.94065,.93838,.93613,.93388,.93164,.92941,.9272,.92499,.9228,.92062,.91846,.91631,.91418,.91207,.90998,.90792,.90588,.90387,.90189,.89995,.89804,.89617,.89434,.89256,.89083,.88914,.88752,.88595,.88443,.88299,.88161,.8803,.87907,.87791,.87683,.87584,.87494,.87412,.8734,.87278,.87225]},{distance:[.39335,.43437,.47737,.52234,.56923,.61801,.66864,.72109,.7753,.83123,.88882,.94801,1.00875,1.07097,1.13461,1.1996,1.26586,1.33333,1.40193,1.47158,1.54221,1.61373,1.68607,1.75913,1.83284,1.90711,1.98186,2.05699,2.13243,2.20809,2.28387,2.35971,2.4355,2.51117,2.58663,2.66179,2.73658,2.81092,2.88473,2.95792,3.03043,3.10217,3.17308,3.24309,3.31211,3.3801,3.44697,3.51267,3.57712,3.64028,3.70208,3.76247,3.8214,3.87881,3.93467,3.98892,4.04152,4.09244,4.14164,4.18908,4.23474,4.27859,4.32061,4.36077,4.39905,4.43544,4.46992,4.50249,4.53314,4.56185,4.58864,4.61349,4.63642,4.65745,4.67657,4.69381,4.7092,4.72274,4.73447,4.74441,4.75259,4.75903,4.76376,4.76682,4.76822,4.768,4.76618,4.76279,4.75786,4.75142,4.74348,4.73409,4.72326,4.71102,4.69739,4.68241,4.6661,4.64849,4.6296,4.60948,4.58816,4.56567,4.54204,4.51732,4.49154,4.46473,4.43694,4.4082,4.37854,4.348,4.31662,4.28443,4.25145,4.21773,4.1833,4.14819,4.11243,4.07606,4.03912,4.00162,3.96361,3.92512,3.88618,3.84683,3.80708,3.76697,3.72653,3.68579,3.64478,3.60351,3.56202,3.52033,3.47845,3.43642,3.39425,3.35196,3.30957,3.2671,3.22455,3.18196,3.13933,3.09668,3.05402,3.01136,2.96873,2.92613,2.88357,2.84108,2.79865,2.75631,2.71407,2.67195,2.62994,2.58807,2.54634,2.50477,2.46338,2.42216,2.38114,2.34032,2.29971,2.25933,2.21916,2.17923,2.13954,2.10008,2.06087,2.02189,1.98316,1.94468,1.90644,1.86845,1.83069,1.79316,1.75586,1.71877,1.68189,1.6452,1.60868,1.57232,1.53611,1.50004,1.46407,1.4282,1.39241,1.35668,1.321,1.28535,1.24972,1.2141,1.17849,1.14286,1.10723,1.07158,1.03593,1.00028,.96464,.92902,.89344,.85793,.8225,.78719,.75203,.71705,.68231,.64784,.61369,.57991,.54656,.51368,.48134,.44959,.41849,.3881,.35848,.32967,.30174,.27474,.24872,.22373,.19982,.17702,.15539,.13497,.11579,.09791,.08137,.06621,.05248,.04022,.02948,.02029,.01271,.00677,.00252,0,-76e-5,27e-5,.00314,.00788,.01451,.02307,.03357,.04604,.0605,.07697,.09546,.11599,.13858,.16322,.18992,.21869,.24952,.28241,.31735,.35434],pressure:[.95248,.95236,.95228,.95223,.95222,.95224,.95231,.95241,.95256,.95274,.95296,.95322,.95352,.95385,.95423,.95465,.9551,.9556,.95613,.9567,.95731,.95796,.95864,.95936,.96012,.96091,.96173,.96259,.96348,.9644,.96535,.96633,.96734,.96838,.96944,.97053,.97164,.97277,.97393,.9751,.97629,.9775,.97873,.97997,.98122,.98249,.98376,.98505,.98634,.98763,.98893,.99023,.99154,.99284,.99414,.99544,.99673,.99802,.9993,.99942,.99816,.99691,.99568,.99445,.99324,.99205,.99087,.98972,.98858,.98746,.98636,.98528,.98423,.9832,.98219,.98121,.98025,.97931,.9784,.97752,.97666,.97582,.97501,.97423,.97347,.97274,.97203,.97135,.9707,.97007,.96948,.9689,.96836,.96784,.96735,.96689,.96646,.96605,.96567,.96533,.965,.96471,.96445,.96421,.964,.96382,.96367,.96355,.96346,.96339,.96335,.96334,.96336,.9634,.96348,.96358,.9637,.96385,.96403,.96423,.96446,.96471,.96499,.96529,.96561,.96595,.96631,.96669,.96709,.96751,.96795,.9684,.96887,.96935,.96984,.97035,.97087,.9714,.97194,.97249,.97304,.97361,.97418,.97476,.97534,.97592,.97651,.97711,.9777,.9783,.9789,.9795,.9801,.9807,.9813,.9819,.9825,.98309,.98369,.98428,.98486,.98545,.98603,.98661,.98718,.98775,.98832,.98888,.98944,.99,.99056,.99112,.99167,.99223,.99279,.99335,.99392,.99449,.99507,.99565,.99624,.99684,.99745,.99807,.9987,.99934,1,.99933,.99866,.99797,.99727,.99656,.99583,.9951,.99435,.99359,.99283,.99205,.99126,.99046,.98966,.98885,.98803,.9872,.98637,.98554,.9847,.98387,.98303,.98219,.98134,.9805,.97967,.97883,.978,.97717,.97634,.97552,.97471,.97389,.97309,.97229,.9715,.97071,.96993,.96915,.96838,.96762,.96687,.96612,.96539,.96466,.96395,.96324,.96255,.96187,.9612,.96055,.95991,.95929,.95869,.95811,.95754,.957,.95648,.95599,.95552,.95508,.95467,.95428,.95393,.9536,.95331,.95305,.95283,.95264]},{distance:[2.85606,2.86149,2.86432,2.8645,2.862,2.85686,2.84912,2.83886,2.82618,2.81117,2.79393,2.77456,2.75314,2.72975,2.70447,2.67734,2.64844,2.61784,2.58564,2.55196,2.5169,2.48057,2.44305,2.40438,2.36462,2.32383,2.28208,2.23943,2.19591,2.15153,2.10628,2.06016,2.01321,1.96548,1.91702,1.86793,1.8183,1.76829,1.71803,1.66767,1.61737,1.56726,1.51746,1.46803,1.41902,1.37044,1.32228,1.27452,1.22716,1.18023,1.13376,1.08781,1.04244,.99769,.95357,.91003,.86701,.82447,.78238,.74069,.69938,.65836,.61758,.57699,.53656,.49627,.45611,.41611,.37632,.33683,.29776,.25924,.22141,.18441,.14839,.11346,.07972,.04727,.01619,-.01348,-.0417,-.0684,-.09351,-.11698,-.13875,-.1588,-.17713,-.19381,-.20889,-.22242,-.23444,-.24501,-.25421,-.26216,-.26897,-.27473,-.27951,-.28336,-.28631,-.28836,-.28948,-.28963,-.28873,-.28673,-.28355,-.27916,-.27354,-.26673,-.25878,-.2498,-.23992,-.22929,-.21802,-.20623,-.19398,-.18134,-.16836,-.1551,-.14163,-.12809,-.11461,-.1013,-.08826,-.07557,-.06335,-.0517,-.04077,-.03065,-.02143,-.01321,-.00606,0,.00496,.00888,.01181,.01385,.01511,.0157,.01574,.01533,.01458,.01358,.0124,.01112,.00979,.00851,.00738,.0065,.006,.00596,.00646,.00754,.00924,.01161,.01471,.01858,.02323,.02865,.03481,.04169,.0493,.05765,.06677,.07671,.08754,.09934,.11222,.12628,.14159,.15823,.17624,.19561,.21632,.23828,.26142,.28563,.31083,.33696,.36397,.39185,.42057,.4501,.48036,.51125,.54264,.5744,.60646,.63871,.67105,.70337,.73556,.76751,.79918,.83048,.86139,.8919,.92202,.95184,.98144,1.01094,1.04045,1.0701,1.10002,1.13029,1.16103,1.1923,1.22416,1.25664,1.28979,1.32364,1.35824,1.39363,1.42985,1.4669,1.50475,1.54332,1.58252,1.62227,1.6625,1.70312,1.744,1.78501,1.82598,1.8668,1.90734,1.94754,1.98732,2.02666,2.06555,2.10402,2.1421,2.17985,2.2173,2.25448,2.29139,2.328,2.36424,2.4,2.43515,2.46955,2.50309,2.53565,2.56717,2.59761,2.62692,2.65505,2.68191,2.7074,2.73138,2.75375,2.7744,2.79324,2.81017,2.82504,2.83772,2.8481],pressure:[.22758,.23641,.24578,.25568,.26609,.27699,.28835,.30016,.31237,.32495,.33789,.35113,.36466,.37843,.39241,.40658,.4209,.43535,.44989,.4645,.47916,.49385,.50853,.5232,.53784,.55243,.56696,.58141,.59578,.61004,.62419,.63821,.65209,.6658,.67934,.69268,.70582,.71873,.73139,.7438,.75594,.76779,.77935,.79061,.80156,.81221,.82254,.83258,.84231,.85176,.86091,.86978,.87837,.88669,.89473,.9025,.91,.91725,.92425,.931,.93752,.9438,.94985,.95566,.96124,.96658,.97168,.97652,.98109,.98539,.98939,.99309,.99646,.99949,.99783,.99552,.99361,.99209,.99098,.99029,.99003,.99019,.99079,.99181,.99324,.9951,.99735,1,.99698,.99361,.98992,.98592,.98163,.97709,.97231,.96731,.96212,.95676,.95122,.94554,.93973,.93378,.92773,.92157,.91532,.90899,.90258,.89612,.88961,.88308,.87653,.87,.8635,.85705,.85068,.8444,.83823,.83219,.82628,.82052,.81493,.80952,.8043,.79929,.7945,.78994,.78561,.78151,.77765,.77402,.77062,.76742,.76443,.76161,.75896,.75645,.75406,.75175,.74951,.7473,.74511,.74289,.74064,.73833,.73592,.73341,.73078,.728,.72507,.72197,.71869,.71522,.71156,.70769,.70363,.69936,.69489,.69021,.68533,.68023,.67492,.66939,.66363,.65765,.65145,.64501,.63833,.63143,.62428,.61691,.60931,.60148,.59344,.58521,.57679,.5682,.55948,.55063,.54167,.53264,.52354,.51439,.50522,.49603,.48686,.47773,.46865,.45964,.45072,.44192,.43324,.42469,.41629,.40804,.39994,.392,.3842,.37655,.36903,.36164,.35437,.3472,.34012,.33312,.3262,.31933,.31251,.30574,.299,.2923,.28563,.27899,.27239,.26583,.25933,.25288,.24652,.24025,.2341,.22808,.22221,.21653,.21104,.20576,.20072,.19592,.19138,.18712,.18313,.17943,.17602,.17292,.17013,.16766,.16551,.16369,.16222,.1611,.16036,.16001,.16007,.16055,.16148,.16286,.16471,.16705,.16988,.17321,.17706,.18144,.18636,.19182,.19785,.20443,.21158,.2193]},{distance:[-2.31317,-2.3191,-2.32189,-2.32154,-2.31811,-2.31174,-2.30254,-2.29062,-2.27609,-2.25904,-2.23954,-2.21767,-2.19355,-2.16732,-2.13907,-2.10885,-2.07672,-2.04268,-2.00677,-1.96911,-1.92985,-1.88914,-1.84713,-1.80397,-1.75979,-1.71467,-1.66864,-1.62171,-1.57395,-1.52546,-1.47625,-1.42628,-1.3755,-1.32384,-1.27131,-1.218,-1.16408,-1.10972,-1.05508,-1.00031,-.94551,-.89077,-.83615,-.7817,-.72757,-.6739,-.62076,-.56821,-.51625,-.46484,-.41397,-.36366,-.314,-.26506,-.21689,-.16957,-.12316,-.07766,-.03301,.01085,.05399,.09643,.13827,.17967,.22079,.26176,.30265,.34342,.38397,.42414,.46381,.50285,.54115,.57863,.61524,.65093,.6856,.71914,.75153,.78275,.81283,.84182,.86972,.89651,.92208,.94634,.96919,.99052,1.01025,1.02835,1.04484,1.05976,1.07309,1.08479,1.09492,1.1036,1.11096,1.11714,1.12224,1.12627,1.12916,1.13083,1.13125,1.13036,1.12816,1.12466,1.11992,1.11397,1.10677,1.09827,1.08849,1.07746,1.06527,1.05203,1.03786,1.02283,1.00695,.99025,.97279,.9546,.93573,.9163,.8965,.8765,.85647,.83652,.81687,.79775,.77939,.76199,.74568,.73049,.71635,.70316,.69082,.67925,.66834,.65804,.64831,.63911,.63032,.62184,.61363,.60564,.59788,.59036,.58308,.57597,.5689,.56177,.55447,.5469,.53896,.53062,.5219,.51283,.5034,.49355,.48335,.47287,.46223,.45154,.44085,.43012,.41923,.40805,.39648,.38441,.37176,.35849,.34458,.32999,.31461,.29833,.28109,.26288,.2437,.22361,.20265,.18082,.15807,.13434,.1096,.0838,.0569,.02894,0,-.0298,-.0604,-.09173,-.12364,-.15594,-.18843,-.22092,-.25331,-.28559,-.31781,-.35006,-.38244,-.41502,-.44785,-.48098,-.5144,-.54811,-.58218,-.61666,-.65153,-.68677,-.72232,-.75807,-.79397,-.83002,-.86628,-.90281,-.93968,-.97693,-1.01465,-1.05282,-1.09139,-1.13031,-1.16956,-1.20917,-1.24905,-1.28907,-1.32908,-1.36891,-1.40844,-1.44765,-1.48658,-1.52527,-1.56376,-1.60206,-1.64016,-1.67801,-1.71552,-1.75264,-1.78936,-1.8257,-1.86161,-1.89702,-1.93182,-1.96584,-1.99894,-2.03102,-2.06203,-2.0919,-2.12056,-2.14794,-2.17397,-2.19852,-2.22138,-2.24235,-2.26129,-2.27805,-2.29243,-2.30422],pressure:[.9681,.97424,.98046,.98674,.99309,.9995,.99404,.98754,.981,.97444,.96785,.96124,.95462,.94801,.94139,.93479,.92822,.92167,.91515,.90868,.90225,.89589,.88959,.88336,.87722,.87115,.86519,.85932,.85356,.84792,.84239,.83699,.83173,.8266,.82162,.81679,.81211,.80759,.80324,.79906,.79505,.79121,.78756,.78409,.78081,.77771,.77481,.77211,.76959,.76728,.76516,.76324,.76153,.76001,.75869,.75757,.75665,.75593,.7554,.75507,.75493,.75498,.75523,.75565,.75627,.75706,.75803,.75917,.76049,.76197,.76361,.76541,.76737,.76947,.77172,.77409,.7766,.77923,.78198,.78484,.7878,.79086,.79401,.79724,.80055,.80394,.8074,.81092,.8145,.81813,.82182,.82556,.82934,.83317,.83703,.84093,.84487,.84884,.85284,.85687,.86094,.86503,.86915,.87329,.87746,.88166,.88587,.89011,.89436,.89863,.90291,.9072,.91149,.91579,.92009,.92438,.92867,.93295,.9372,.94144,.94566,.94985,.954,.95812,.96219,.96623,.97021,.97415,.97802,.98184,.9856,.9893,.99293,.9965,1,.99657,.9932,.98991,.98668,.98352,.98042,.97738,.9744,.97148,.9686,.96577,.96298,.96023,.95751,.95482,.95214,.94949,.94684,.9442,.94156,.93892,.93627,.93361,.93094,.92825,.92555,.92284,.9201,.91735,.91458,.91179,.90899,.90616,.90332,.90047,.8976,.89472,.89183,.88893,.88603,.88314,.88024,.87735,.87448,.87162,.86878,.86597,.86319,.86044,.85774,.85508,.85247,.84993,.84744,.84503,.84269,.84042,.83825,.83616,.83417,.83227,.83048,.8288,.82724,.82578,.82445,.82324,.82215,.82119,.82037,.81967,.81911,.81868,.81839,.81824,.81823,.81835,.81862,.81903,.81957,.82026,.82109,.82206,.82317,.82443,.82583,.82737,.82906,.83089,.83287,.83499,.83726,.83968,.84223,.84494,.84778,.85077,.8539,.85717,.86058,.86412,.86781,.87163,.87559,.87968,.88391,.88826,.89275,.89737,.90211,.90698,.91198,.91709,.92233,.92768,.93315,.93873,.94441,.95019,.95607,.96205]},{distance:[4.72925,4.81721,4.9037,4.98859,5.07177,5.15311,5.23249,5.3098,5.38491,5.45772,5.52811,5.59598,5.66122,5.72375,5.78346,5.84028,5.8941,5.94486,5.99248,6.03689,6.07803,6.11584,6.15028,6.18128,6.20882,6.23285,6.25336,6.27031,6.28369,6.29348,6.29969,6.3023,6.30133,6.29678,6.28867,6.27703,6.26187,6.24324,6.22116,6.19567,6.16683,6.13468,6.09928,6.06068,6.01896,5.97417,5.92639,5.87569,5.82217,5.76589,5.70696,5.64545,5.58147,5.5151,5.44644,5.37559,5.30265,5.2277,5.15085,5.0722,4.99184,4.90987,4.82639,4.74151,4.65533,4.56794,4.47945,4.38996,4.29959,4.20843,4.11658,4.02416,3.93125,3.83796,3.74437,3.65057,3.55666,3.46272,3.36884,3.27509,3.18155,3.08831,2.99545,2.90303,2.81114,2.71984,2.62922,2.53933,2.45026,2.36207,2.27484,2.18862,2.10349,2.01951,1.93675,1.85528,1.77515,1.69644,1.61919,1.54348,1.46935,1.39685,1.32605,1.25698,1.18967,1.12417,1.06049,.99863,.93862,.88044,.82408,.76953,.71676,.66574,.61644,.56882,.52282,.47841,.43553,.39413,.35414,.31551,.27817,.24206,.20712,.17328,.14048,.10866,.07776,.04772,.01848,-.00999,-.03776,-.06487,-.09134,-.11721,-.14251,-.16725,-.19144,-.21509,-.2382,-.26076,-.28275,-.30416,-.32496,-.34511,-.36459,-.38334,-.40134,-.41852,-.43485,-.45026,-.46471,-.47815,-.49052,-.50179,-.51189,-.52081,-.52849,-.5349,-.54003,-.54383,-.54627,-.54734,-.54702,-.54528,-.54211,-.53752,-.53149,-.52403,-.51515,-.50487,-.4932,-.48015,-.46575,-.45001,-.43297,-.41463,-.39503,-.37419,-.35213,-.32887,-.30443,-.27885,-.25214,-.22432,-.19541,-.16544,-.13442,-.10235,-.06926,-.03514,0,.03616,.07336,.11159,.15088,.19125,.23272,.27531,.31906,.36401,.41019,.45764,.5064,.55651,.60802,.66096,.71538,.77129,.82874,.88776,.94836,1.01056,1.07438,1.13982,1.20687,1.27554,1.34581,1.41766,1.49107,1.56599,1.64239,1.72025,1.79951,1.88013,1.96209,2.04532,2.12979,2.21546,2.30226,2.39017,2.47911,2.56905,2.65991,2.75164,2.84416,2.93742,3.03133,3.12582,3.2208,3.31619,3.41191,3.50785,3.60393,3.70006,3.79612,3.89202,3.98765,4.08291,4.17767,4.27182,4.36525,4.45783,4.54944,4.63995],pressure:[.30942,.30838,.30765,.30724,.30715,.30738,.30795,.30884,.31007,.31164,.31354,.31578,.31837,.32129,.32455,.32815,.33209,.33636,.34097,.34591,.35117,.35675,.36265,.36887,.37539,.38221,.38933,.39674,.40442,.41238,.4206,.42907,.43779,.44675,.45593,.46533,.47493,.48473,.49471,.50486,.51517,.52563,.53623,.54694,.55777,.5687,.57971,.59079,.60194,.61313,.62435,.6356,.64686,.65811,.66935,.68056,.69174,.70286,.71391,.72489,.73579,.74659,.75728,.76785,.7783,.7886,.79876,.80877,.81861,.82827,.83776,.84706,.85617,.86507,.87378,.88227,.89056,.89863,.90649,.91412,.92153,.92872,.93568,.94241,.94892,.95519,.96122,.96702,.97258,.97791,.98299,.98783,.99242,.99677,.99911,.99525,.99164,.98827,.98515,.98228,.97966,.97728,.97514,.97324,.97159,.97017,.96898,.96801,.96727,.96674,.96641,.96629,.96635,.96661,.96703,.96762,.96838,.96928,.97032,.97149,.97279,.9742,.97572,.97734,.97905,.98085,.98273,.98468,.98669,.98877,.99091,.99311,.99535,.99765,1,.9976,.99516,.99267,.99014,.98755,.98491,.98222,.97947,.97666,.97378,.97083,.96781,.96471,.96153,.95826,.9549,.95144,.94787,.9442,.94042,.93651,.93249,.92834,.92407,.91966,.91512,.91045,.90564,.90069,.8956,.89037,.885,.87949,.87384,.86806,.86214,.85608,.84988,.84356,.83711,.83053,.82383,.81702,.81009,.80306,.79594,.78872,.78141,.77403,.76657,.75905,.75148,.74385,.73619,.72849,.72076,.71302,.70526,.69749,.68972,.68195,.67419,.66644,.65871,.65099,.64329,.63561,.62795,.62032,.61271,.60512,.59755,.59001,.58248,.57497,.56749,.56002,.55256,.54512,.5377,.5303,.52291,.51554,.50819,.50087,.49358,.48632,.4791,.47192,.4648,.45773,.45072,.44378,.43692,.43015,.42346,.41687,.41039,.40403,.39779,.39168,.38571,.37989,.37423,.36873,.36342,.35828,.35335,.34862,.34409,.3398,.33573,.3319,.32831,.32498,.32192,.31912,.3166,.31436,.31242,.31077]}];function o(e,t){if(!e)return null;var i=e.length/2;const n=.1*i;i=Array(i);let r=0;t=1===t;for(let o=0;o<e.length;o+=2){const a=(e[o]+e[o+1])/2;i[r++]=t?Math.min(n,1-.5*(1-a)):Math.min(n,.5*a)}return i}var a=function(){var e=n,a=e/2;const s=new Uint8Array(4*e*e),l=4*e*a,u=2*(a=i),c=4*e,h=r.length;let d=8*h*c;for(var f of r){var p=f.distance,_=f.pressure;let e=d;for(let i=0;i<9;i++){0!==i&&(p=o(p,0),_=o(_,1));for(let i=0;i<n;i++){const n=_?_[i%_.length]:1;t(.5+(p?p[i%p.length]/u:0),s,e),t(n,s,e+l),e+=4}e-=c*(h+1)}d+=c}return s}(),s=new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR});this._edgeStrokesTexture=new t$V({context:this._frameState.context,source:{width:256,height:256,arrayBufferView:a},sampler:s,flipY:!1});var l=this._edgeStrokesTexture.width,u=this._edgeStrokesTexture.height;this._strokesLog2Resolution=e$2a.log2(l),this._strokesTextureScale=new o$1o(1/l,1/u)},_0x22e933.prototype._setFloodTexture=function(e,t,i){this._floodFlagTexture=e,this._floodRect=t;var n=new p$1d;p$1d.inverse(i,n),this._matFloodInvertMatrix=n;var r={};r.layer=this,this.traverseRenderEntity(r,_0x44c915)},_0x22e933.prototype._removeFloodTexture=function(){this._floodFlagTexture=void 0,this._floodRect=void 0,this._matFloodInvertMatrix=p$1d.IDENTITY;var e={};e.layer=this,this.traverseRenderEntity(e,_0x2c98e0)},_0x22e933.prototype.setHistoryDataByKey=function(e){if(e$2b(this._historicalRecord))if(e$2b(this._historicalRecord.rootTiles))_0x3b4551(this,e);else{u$Q(this._baseUri.toString()+this._historicalRecord,this.customRequestHeaders).then((t=>{this._historicalRecord=t,_0x3b4551(this,e)}))}},_0x22e933.prototype.getHistoryDataKeys=function(){if(!e$2b(this._historicalRecord))return Promise.resolve();if(e$2b(this._historicalRecord.rootTiles))return Promise.resolve(Object.keys(this._historicalRecord.rootTiles[0].History));return u$Q(this._baseUri.toString()+this._historicalRecord,this.customRequestHeaders).then((e=>(this._historicalRecord=e,Object.keys(this._historicalRecord.rootTiles[0].History))))};var r$M=function(){if(this._layers=null,this.minQuality=1,this._jsHeapSizeLimitRatio=1,this._maxMemory=1024,s$Y.isPCBroswer()&&(this._maxMemory=4096),window.performance&&window.performance.memory){var e=window.performance.memory.usedJSHeapSize/1048576,t=window.performance.memory.jsHeapSizeLimit/1048576;this._maxMemory=(t-e)*this._jsHeapSizeLimitRatio}this._cacheSize=1024,this._memoryUsed=0,this._memoryPredicted=0,this._quality=1,this._canFastRecover=0,this._downscaleMemoryUsed=this._stableQuality=0,this._QualityShrinkRatio=1.3,this._QualityIncreaseStep=.01,this._updating=0,this._geoMemoryEstimate=0,this._texMemoryEstimate=0,this._EMA=0,this._learningWeight=.9,this._beta=1-this._learningWeight,this._logTime=0,this._showMemoryInfo=!1};r$M.showMemoryInfo=function(e){e$12._showMemoryInfo=e},r$M.setCacheSize=function(e){e$12._cacheSize=Math.min(e,e$12._maxMemory)},r$M.getCacheSize=function(){return e$12._cacheSize},r$M.reAllocateMaxMemory=function(e){if(e$12._jsHeapSizeLimitRatio=e,window.performance&&window.performance.memory){var t=window.performance.memory.usedJSHeapSize/1048576,i=window.performance.memory.jsHeapSizeLimit/1048576;e$12._maxMemory=(i-t)*e$12._jsHeapSizeLimitRatio}},r$M.setMaxMemory=function(e){e$12._maxMemory=e},r$M.getMaxMemory=function(){return e$12._maxMemory};const d$$={GeForce:{1050:3,1060:3,1070:8,1080:8,1650:4,1660:6,2060:6,2070:8,2080:8,3050:8,3060:8,3080:12,3090:24,4070:12,4080:16,4090:24},AMD:{7900:24,7600:8,6950:16,6900:16,6800:16,6750:12,6700:12,6650:8,6600:8,6500:4,6400:4,5700:8,5600:6,5500:8,64:8,56:8,590:8,580:4,570:4,560:4,550:4,480:4,470:4,390:8,380:4,7990:6,7970:3,7950:3,6990:4}};r$M._autoSetMaxMemory=function(e){var t=e.split(" "),i=t.filter((function(e,t){return/^[1-9]/g.test(e)}));if(i.length>0){var n,r=t.indexOf("GeForce")>-1,o=t.indexOf("AMD")>-1,a=i[0];r?n=d$$.GeForce[a]:o&&(n=d$$.AMD[a]),n=e$2b(n)?.9*n:2,n*=1024,r$M.setMaxMemory(n)}},r$M.setMinQuality=function(e){e$12.minQuality=Math.min(e,1)},r$M.getMinQuality=function(){return e$12.minQuality},r$M._memGeometryAdded=function(e){e$12._geoMemoryEstimate+=e},r$M._memGeometryRemoved=function(e){e$12._geoMemoryEstimate-=e},r$M._memTextureAdded=function(e){e$12._texMemoryEstimate+=e},r$M._memTextureRemoved=function(e){e$12._texMemoryEstimate-=e},r$M._attachLayers=function(e){e$12._layers=e},r$M._updateMemory=function(e){var t=1048576*e$12._maxMemory,i=e$12._memoryUsed*t;if(e$12._memoryUsed=e,e$12._memoryPredicted=e$12._memoryUsed-i,e$12._memoryPredicted=0==e$12._EMA?e$12._memoryPredicted:e$12._memoryPredicted*e$12._learningWeight+e$12._EMA*(1-e$12._learningWeight),e$12._EMA=e$12._memoryPredicted,e$12._showMemoryInfo&&e$12._memoryUsed>t){var n=Et$a();n-e$12._logTime>1e4&&(console.log(r$M.getStatistics()),e$12._logTime=n)}e$12._memoryPredicted=(e$12._memoryUsed+e$12._memoryPredicted)/t,e$12._memoryUsed=e$12._memoryUsed/t},r$M.getStatistics=function(){var e="内存上限(MB): "+e$12._maxMemory,t=e$12._memoryUsed;e$12._memoryUsed<1&&(t=1048576*e$12._maxMemory*t);for(var i="当前占用内存(MB): "+t/1048576,n="缓存上限(MB): "+e$12._cacheSize,r="当前缓存占用(MB): ",o=0;o<e$12._layers._layerQueue.length;o++){var a=e$12._layers._layerQueue[o];if(a instanceof _0x22e933){var s=a._layerScheduler._getCacheMemoryUsageInBytes()/1048576;r+="第"+o+"层, 图层名:"+a._name+",缓存占用:"+s+","}}var l=e+","+i+","+("渲染质量:"+e$12._quality)+"\n"+n+","+r;if(window.performance&&window.performance.memory){var u=window.performance.memory.totalJSHeapSize/1048576,c=window.performance.memory.usedJSHeapSize/1048576;l+="\n浏览器最大内存(MB):"+window.performance.memory.jsHeapSizeLimit/1048576+",已分配内存(MB):"+c+",堆活跃内存(MB):"+u}return l},r$M.getMemoryUsed=function(){return e$12._memoryUsed},r$M.getQuality=function(){return e$12._quality},r$M._updateQuality=function(e){return(e=Math.min(Math.max(e,e$12.minQuality),1))===e$12._quality?0:(e$12._quality=e,1)},r$M._layersUpdating=function(){for(var e=e$12._layers._layerQueue.length,t=0;t<e;t++){var i=e$12._layers._layerQueue[t];if(i instanceof _0x22e933&&i._layerScheduler._updatingTiles()>0)return!0}return!1},r$M.update=function(e){e$12._layers._setMaxMemory(e$12._maxMemory),e$12._layers._setCacheMemory(e$12._cacheSize),this._updateMemory(e);var t=!0;if(e$12._memoryPredicted>0||e$12._updating){var i=this._layersUpdating();e$12._memoryPredicted<.6&&e$12._canFastRecover?(e$12._stableQuality=e$12._downscaleMemoryUsed=0,e$12._canFastRecover=0,this._updateQuality(1)):i?(e$12._memoryPredicted>1.1||e$12._memoryUsed>1)&&(e$12._stableQuality>0?(e$12._downscaleMemoryUsed=0,this._updateQuality(e$12._stableQuality)):e$12._quality>e$12.minQuality&&e$12._downscaleMemoryUsed<e$12._memoryUsed?(t=i=this._updateQuality(e$12._quality/e$12._QualityShrinkRatio),e$12._downscaleMemoryUsed=e$12._memoryUsed,e$12._canFastRecover=0):t=!1):(i=this._layersUpdating(),e$12._downscaleMemoryUsed=0,e$12._memoryUsed>1?(e$12._stableQuality=0,e$12._canFastRecover=0,t=i=this._updateQuality(e$12._quality/e$12._QualityShrinkRatio),e$12._downscaleMemoryUsed=e$12._memoryPredicted):e$12._stableQuality!=e$12._quality&&(e$12._memoryUsed<.8&&e$12._quality<1?(e$12._stableQuality=e$12._quality,i=this._updateQuality(e$12._quality+e$12._QualityIncreaseStep)):e$12._quality<1&&(e$12._canFastRecover=1))),e$12._updating=i}return t};var e$12=new r$M;r$M.memManager=e$12;var ti$3=r$M,_0x1d4c3f=(_0x3864fa=!0,function(e,t){var i=_0x3864fa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3864fa=!1,i}),_0x284165=_0x1d4c3f(void 0,(function(){return _0x284165.toString().search("(((.+)+)+)+$").toString().constructor(_0x284165).search("(((.+)+)+)+$")})),_0x3864fa;_0x284165();var _0x304496=273,_0x5b2cf4=function(){this.textures={},this.refCounts={},this.unUsedTextures={},this.unUsedSize=0};_0x5b2cf4.reservedMemorySize=50,_0x5b2cf4.CreateTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=_0x532d19.textures[e];if(d)_0x532d19.refCounts[e]++;else{var f=null;switch(o){case _0x2072ef.enrS3TCDXTN:f=r===_0x3dfacd.BGR||r===_0x3dfacd.RGB?V$10.RGB_DXT1:V$10.RGBA_DXT5;break;case _0x2072ef.enrPVRTPF_PVRTC2:case _0x2072ef.enrPVRTPF_PVRTC:f=r===_0x3dfacd.BGR||r===_0x3dfacd.RGB?V$10.RGB_PVRTC_2BPPV1:V$10.RGBA_PVRTC_2BPPV1;break;case _0x2072ef.enrPVRTPF_PVRTC_4bpp:f=V$10.RGBA_PVRTC_4BPPV1;break;case _0x2072ef.enrPVRTPF_ETC1:f=V$10.RGB_ETC1;break;case _0x2072ef.encNONE:f=r===_0x3dfacd.BGR||r===_0x3dfacd.RGB?_0x304496:r===_0x3dfacd.LUMINANCE_ALPHA?V$10.LUMINANCE_ALPHA:V$10.RGBA}var p=25===r?_$$.FLOAT:_$$.UNSIGNED_BYTE;e$2b(_0x532d19.unUsedTextures[e])?(d=_0x532d19.unUsedTextures[e],_0x532d19.unUsedSize-=d.size,delete _0x532d19.unUsedTextures[e]):(s||(d=this.UseTexture(e,t,i,n,f,a,l,u,p)),null==d&&(d=new _0x2dc616(e,t,i,n,f,a,s,l,u,p,c,h),ti$3._memTextureAdded(d.sizeInBytes))),_0x532d19.refCounts[e]=1,_0x532d19.textures[e]=d}return d},_0x5b2cf4.UseTexture=function(e,t,i,n,r,o,a,s,l){for(var u in _0x532d19.unUsedTextures)if(_0x532d19.unUsedTextures[u].size===o.length){var c=_0x532d19.unUsedTextures[u];if(c.context.id!==t.id)return;if(t.webgl2&&(i!==c.width||n!==c.height)||e$2b(t.engine))continue;_0x532d19.unUsedSize-=c.size,delete _0x532d19.unUsedTextures[u];var h={width:i,height:n,internalFormat:r,wrapS:u$_(a,q$19.CLAMP_TO_EDGE),wrapT:u$_(s,q$19.CLAMP_TO_EDGE),pixelDataType:u$_(l,_$$.UNSIGNED_BYTE)};return c.pixelDataType===_$$.FLOAT&&(h.wrapS=q$19.CLAMP_TO_EDGE,h.wrapT=q$19.CLAMP_TO_EDGE),c.updateTexture(e,o,h),c}},_0x5b2cf4.CreateVolumeTexture=function(e,t,i,n,r){var o=_0x532d19.textures[e],a=tt$h.LINEAR,s=rt$i.LINEAR;if(r===k$Q.FilterMode.NEAREST&&(a=tt$h.NEAREST,s=rt$i.NEAREST),o&&!e$2b(n.imageArray))_0x532d19.refCounts[e]++,o.sampler=new e$1P({minificationFilter:a,magnificationFilter:s});else{var l=n.nLength,u=n.imageArray;(o=new t$V({context:i,width:l,height:l,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({minificationFilter:a,magnificationFilter:s})})).copyFrom({width:l,height:l,arrayBufferView:u}),_0x532d19.refCounts[e]=1,_0x532d19.textures[e]=o,ti$3._memTextureAdded(o.sizeInBytes)}return o},_0x5b2cf4.ReloadVolumeTexture=function(e,t,i,n,r){var o=_0x532d19.textures[e];if(o){var a=n.nLength,s=n.imageArray;o.copyFrom({width:a,height:a,arrayBufferView:s})}return o},_0x5b2cf4.AddRef=function(e){_0x532d19.refCounts[e]++},_0x5b2cf4.DecRef=function(e){_0x532d19.refCounts[e]--},_0x5b2cf4.DestroyTexture=function(e){var t=_0x532d19.refCounts[e];_0x532d19.refCounts[e]=t-1,0==_0x532d19.refCounts[e]&&(_0x532d19.textures[e].is3D||e$2b(_0x532d19.textures[e].sampler)?(ti$3._memTextureRemoved(_0x532d19.textures[e].sizeInBytes),_0x532d19.textures[e].destroy()):(_0x532d19.unUsedTextures[e]=_0x532d19.textures[e],_0x532d19.unUsedSize+=_0x532d19.textures[e].size),delete _0x532d19.textures[e],delete _0x532d19.refCounts[e])},_0x5b2cf4.GetUnusedSize=function(){return _0x532d19.unUsedSize},_0x5b2cf4.DeleteUnusedTextures=function(){for(var e in _0x532d19.unUsedTextures)_0x532d19.unUsedTextures[e].is3D&&(_0x532d19.unUsedSize-=_0x532d19.unUsedTextures[e].size,ti$3._memTextureRemoved(_0x532d19.textures[e].sizeInBytes),_0x532d19.unUsedTextures[e].destroy(),delete _0x532d19.unUsedTextures[e]);var t=1024*_0x5b2cf4.reservedMemorySize*1024;for(var e in _0x532d19.unUsedTextures){if(t>_0x532d19.unUsedSize)break;var i=_0x532d19.unUsedTextures[e];_0x532d19.unUsedSize-=i.size,ti$3._memTextureRemoved(i.sizeInBytes),i.destroy(),delete _0x532d19.unUsedTextures[e],i.isShared&&delete _0x5b2cf4._shareTextureCache[i.sharedKey]}};var _0x532d19=new _0x5b2cf4;_0x5b2cf4.textureManager=_0x532d19,_0x5b2cf4._shareTextureCache={};var Se$d=_0x5b2cf4,n$D={},v$B=typeof document<"u"?new h$16(document.location.href):new h$16;function f$M(e){var t=new h$16(e).resolve(v$B);t.normalize();var i=t.authority;return/:/.test(i)||(i=i+":"+("https"===t.scheme?"443":"80")),i}function o$N(e,t){var i=f$M(e),n=u$_(n$D[i],0);if(!(n>=o$N.maximumRequestsPerServer))return n$D[i]=n+1,o$1l(t(e),(function(e){return n$D[i]--,e})).otherwise((function(e){return n$D[i]--,o$1l.reject(e)}))}o$N.maximumRequestsPerServer=6;var _0x52adb4=(_0x333fae=!0,function(e,t){var i=_0x333fae?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x333fae=!1,i}),_0x36c929=_0x52adb4(void 0,(function(){return _0x36c929.toString().search("(((.+)+)+)+$").toString().constructor(_0x36c929).search("(((.+)+)+)+$")})),_0x333fae;_0x36c929();var _0x4d4b5c={INSTANCED_LAYER:"Instanced_Layer",INSTANCED_OBJECT:"Instanced_Object"},bt$5=Object.freeze(_0x4d4b5c),_0x302c63=(_0x256ae2=!0,function(e,t){var i=_0x256ae2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x256ae2=!1,i}),_0x359a7c=_0x302c63(void 0,(function(){return _0x359a7c.toString().search("(((.+)+)+)+$").toString().constructor(_0x359a7c).search("(((.+)+)+)+$")})),_0x256ae2;_0x359a7c();var _0xcde203=new e$1U(.7,.7,1,1);function _0x331f36(e,t,i,n){n=u$_(n,u$_.EMPTY_OBJECT),o$1q.defined("options.position",n.position),this._type=bt$5.INSTANCED_OBJECT,this._ownerGroup=i,this._position=n.position,this._color=u$_(n.color,new e$1U),this._scale=u$_(n.scale,new o$1p(1,1,1)),this._offset=u$_(n.offset,new o$1p(0,0,0));var r=u$_(n.hpr,new i$15);this._hpr=r,this._feature=u$_(n.feature,u$_.EMPTY_OBJECT);var o=a$18.fromCartesian(this._position);o.longitude+=this._offset.x,o.latitude+=this._offset.y,o.height+=this._offset.z,this._offsetPosition=o$1p.fromRadians(o.longitude,o.latitude,o.height),this._mode=n.sceneMode,this._mode===C$13.COLUMBUS_VIEW&&(this._position=m$17.convertToColumbusCartesian(this._position),this._offsetPosition=m$17.convertToColumbusCartesian(this._offsetPosition)),this._quaternion=m$17.headingPitchRollQuaternion(this._position,r);var a={id:t,primitive:this},s=e.createPickId(a).color,l=new e$1U;l.x=e$1U.floatToByte(s.red),l.y=e$1U.floatToByte(s.green),l.z=e$1U.floatToByte(s.blue),l.w=e$1U.floatToByte(s.alpha),this._pickColor=l,this._isSelected=!1,this._preColor=e$1U.clone(this._color),this._oriCenter=void 0,this._oriRadius=1,this._boundingSphere=void 0,this._id=t,this._index=-1,this._isDeleted=!1,this._visible=u$_(n.visible,!0),this._distanceVisible=!0,this._localTransform=void 0,this._localTranslation=void 0,this._localQuaternion=void 0}Object.defineProperties(_0x331f36.prototype,{type:{get:function(){return this._type}},position:{get:function(){return this._position}},color:{get:function(){return this._color}},scale:{get:function(){return this._scale}},hpr:{get:function(){return this._hpr}},visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("S3M Instance visible",e),e!==this._visible&&(this._visible=e,this.updatePosition(this._position))}},show:{get:function(){return this.visible},set:function(e){this.visible=e}},distanceVisible:{get:function(){return this._distanceVisible},set:function(e){o$1q.typeOf.bool("S3M Instance distanceVisible",e),e!==this._distanceVisible&&(this._distanceVisible=e,this.updatePosition(this._position))}},offset:{get:function(){return this._offset}},feature:{get:function(){return this._feature}},isSelected:{get:function(){return this._isSelected}},oriCenter:{get:function(){return this._oriCenter},set:function(e){!e$2b(e)||(this._oriCenter=e)}},oriRadius:{get:function(){return this._oriRadius},set:function(e){!e$2b(e)||(this._oriRadius=e)}},boundingSphere:{get:function(){return this._boundingSphere},set:function(e){!e$2b(e)||(this._boundingSphere=e)}},index:{get:function(){return this._index},set:function(e){this._index=e}},id:{get:function(){return this._id},set:function(e){!e$2b(e)||(this._id=e)}},isDeleted:{get:function(){return this._isDeleted},set:function(e){e$2b(e)&&(this._isDeleted=e)}},localTransform:{get:function(){return this._localTransform}},localTranslation:{get:function(){return this._localTranslation}},localQuaternion:{get:function(){return this._localQuaternion}}}),_0x331f36.prototype.updatePosition=function(e){if(e$2b(e)){var t=this._index;this._position=o$1p.clone(e);var i=a$18.fromCartesian(this._position);i.longitude+=this._offset.x,i.latitude+=this._offset.y,i.height+=this._offset.z,this._offsetPosition=o$1p.fromRadians(i.longitude,i.latitude,i.height);var n=this._ownerGroup.renderEntities;if(e$2b(n)&&!(n.length<1)){for(var r=this._visible&&this._distanceVisible?1:0,o=o$1p.multiplyByScalar(e,r,new o$1p),a=0,s=n.length;a<s;a++){var l=n[a],u=l._colorCommand.vertexArray.getAttribute(l._attributeLocations.aPosHigh),c=t*u.strideInBytes+u.offsetInBytes,h=S$12.createTypedArray(u.componentDatatype,2*u.componentsPerAttribute),d=i$11.fromCartesian(o),f=d.high,p=d.low;h[0]=f.x,h[1]=f.y,h[2]=f.z,h[3]=p.x,h[4]=p.y,h[5]=p.z,u.vertexBuffer.copyFromArrayView(h,c)}o$1p.clone(e,this._boundingSphere.center)}}},_0x331f36.prototype.updateColor=function(e){if(e$2b(e)&&!this._isDeleted){var t=this._index;if(!e$1U.equals(this._color,e)){this._color=e$1U.clone(e,this._color),this._preColor=e$1U.clone(e);var i=this._ownerGroup.renderEntities;if(e$2b(i)&&!(i.length<1))for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aColor2),s=t*a.strideInBytes+a.offsetInBytes,l=S$12.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=e.red,l[1]=e.green,l[2]=e.blue,l[3]=e.alpha,a.vertexBuffer.copyFromArrayView(l,s)}}}},_0x331f36.prototype.updateScale=function(e){if(e$2b(e)){var t=this._index;if(!o$1p.equals(this._scale,e)){this._scale=o$1p.clone(e);var i=this._ownerGroup.renderEntities;if(e$2b(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aScaleAndRadius),s=t*a.strideInBytes+a.offsetInBytes,l=S$12.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=e.x,l[1]=e.y,l[2]=e.z,l[3]=this._oriRadius,a.vertexBuffer.copyFromArrayView(l,s)}var u=o$1p.maximumComponent(e);this._boundingSphere.radius=this.oriRadius*u}}}},_0x331f36.prototype.updateRotation=function(e){if(e$2b(e)){var t=this._index;if(!i$15.equals(this._hpr,e)){if(this._hpr=i$15.clone(e),this._quaternion=m$17.headingPitchRollQuaternion(this._position,e),this._mode===C$13.COLUMBUS_VIEW){var i=p$1e.fromRotationY(-Math.PI/2),n=n$13.fromRotationMatrix(i);this._quaternion=n$13.multiply(this._quaternion,n,this._quaternion)}var r=this._ownerGroup.renderEntities;if(e$2b(r)&&!(r.length<1))for(var o=0,a=r.length;o<a;o++){var s=r[o],l=s._colorCommand.vertexArray.getAttribute(s._attributeLocations.aQuaternion),u=t*l.strideInBytes+l.offsetInBytes,c=S$12.createTypedArray(l.componentDatatype,l.componentsPerAttribute);c[0]=this._quaternion.x,c[1]=this._quaternion.y,c[2]=this._quaternion.z,c[3]=this._quaternion.w,l.vertexBuffer.copyFromArrayView(c,u)}}}},_0x331f36.prototype.updateModelMatrix=function(e){var t=p$1d.getScale(e,new o$1p);this.updateScale(t),this._localTransform=p$1d.clone(e),this._localTranslation=p$1d.getTranslation(e,new o$1p);var i=p$1d.setScale(e,new o$1p(1,1,1),new p$1d),n=p$1d.getRotation(i,new p$1e);this._localQuaternion=n$13.fromRotationMatrix(n,new n$13)},_0x331f36.prototype.setSelected=function(){var e=this._index;if(e$2b(e)&&!(e<0)&&!e$1U.equals(this._color,_0xcde203)){var t=e$1U.multiply(_0xcde203,this._preColor,new e$1U),i=this._ownerGroup.renderEntities;if(e$2b(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aColor2),s=e*a.strideInBytes+a.offsetInBytes,l=S$12.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=t.red,l[1]=t.green,l[2]=t.blue,l[3]=t.alpha,a.vertexBuffer.copyFromArrayView(l,s)}this._isSelected=!0}}},_0x331f36.prototype.setUnSelected=function(){var e=this._index;if(e$2b(e)&&!(e<0)&&this._isSelected){this._isSelected=!1,this._color=e$1U.clone(this._preColor);var t=this._ownerGroup.renderEntities;if(e$2b(t)&&!(t.length<1))for(var i=0,n=t.length;i<n;i++){var r=t[i],o=r._colorCommand.vertexArray.getAttribute(r._attributeLocations.aColor2),a=e*o.strideInBytes+o.offsetInBytes,s=S$12.createTypedArray(o.componentDatatype,o.componentsPerAttribute);s[0]=this._preColor.red,s[1]=this._preColor.green,s[2]=this._preColor.blue,s[3]=this._preColor.alpha,o.vertexBuffer.copyFromArrayView(s,a)}}};var _0x394343=(_0x1de117=!0,function(e,t){var i=_0x1de117?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1de117=!1,i}),_0x454015=_0x394343(void 0,(function(){return _0x454015.toString().search("(((.+)+)+)+$").toString().constructor(_0x454015).search("(((.+)+)+)+$")})),_0x1de117;_0x454015();var _0x451393="\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#extension GL_EXT_shader_texture_lod : enable\n#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef ClampObject\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n #ifdef WEBGPU\n layout(location = 0) out vec4 glFragData[2];\n #endif\n#endif\n\n#include <SceneUboDecl>\n#include <LightUboDecl>\n#include <MaterialUboDecl>\n\n#ifdef TEXTURE\nuniform sampler2D uTexture;\n#endif\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec3 vNormalEC;\nvarying mat4 vModelMatrix;\n\n#ifdef SQRESULT\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \n#endif\n#ifdef Volume2\nvarying vec3 vecRotioCoord;\n#endif\nfloat computeDepth()\n{\n#ifdef LOG_DEPTH\n return log2(v_depthFromNearPlusOne) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\n return gl_FragCoord.z;\n#endif\n}\n#ifdef SQRESULT\nbool isPointInObject(vec2 texCoord)\n{\n bool bIn = false;\n vec4 colorInClipTexture = texture2D(uFrontColorTexture,texCoord.xy);\n if(colorInClipTexture.r > 0.99 && colorInClipTexture.g < 0.01 && colorInClipTexture.b < 0.01)\n {\n float depthNear = czm_unpackDepth(textureLod(uFrontDepthTexture, texCoord.xy, 0.0)) - 0.00001;\n float depthFar = czm_unpackDepth(textureLod(uBackDepthTexture, texCoord.xy, 0.0)) + 0.00001;\n float currentDepth = computeDepth();\n if(currentDepth > depthNear && currentDepth < depthFar){\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\n#endif\n\nvec4 SRGBtoLinear(vec4 srgbIn) \n{\n return vec4(pow(srgbIn.rgb, vec3(2.2)), srgbIn.a);\n}\nvec4 LineartoSRGB(vec4 linearIn) \n{\n#ifndef HDR \n return vec4(pow(linearIn.rgb, vec3(1.0/2.2)), linearIn.a);\n#else \n return linearIn;\n#endif \n}\n\n#include <SRGBtoLINEAR>\n#include <shaderModelBase>\n#include <brdf>\n#include <blinnPhong>\n\nvoid main()\n{\n#ifdef ClampObject\n czm_writeDepthClampedToFarPlane();\n#endif\n vec4 color = vColor;\n#ifdef ClampObject\n #ifdef PROFILE\n #ifdef MRT\n gl_FragData[0] = vec4(vPickColor.xyz, 1.0);\n gl_FragData[1] = color;\n #else\n gl_FragColor = vec4(vPickColor.xyz, 1.0);\n #endif\n #else\n gl_FragColor = color;\n #endif\n#else\n vec2 vecTexCoord = vec2(0.0);\n #ifdef SQRESULT\n vec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\n if(!isPointInObject(texCoord)) \n { \n discard; \n } \n #endif\n \n\t#ifdef TEXTURE\n #ifdef FLIP_Y\n vecTexCoord = vec2(vTexCoord.x,1.0-vTexCoord.y);\n #else\n vecTexCoord = vec2(vTexCoord.x,vTexCoord.y);\n #endif\n #endif\n \n #ifdef TEXTURE\n color = SRGBtoLinear(texture2D(uTexture, vecTexCoord.xy, 0.0)) * color;\n #endif\n vec3 normalEC;\n if(vPositionMC.w > 0.9)\n {\n normalEC = normalize(vNormalEC);\n }\n #ifndef HAS_NORMAL\n vec3 normalMC = czm_computeNormal(vPositionMC.xyz);\n mat4 modelViewMatrix4 = uView * vModelMatrix;\n modelViewMatrix4 = czm_inverseMatrix(modelViewMatrix4);\n mat3 modelViewMatrix3 = mat3(modelViewMatrix4);\n modelViewMatrix3 = czm_transpose(modelViewMatrix3);\n normalEC = normalize(modelViewMatrix3 * normalMC);\n #endif\n \n #ifdef BRDF\n gl_FragColor = brdf(color, vecTexCoord, vTexCoord, vPositionEC, vPositionMC.xyz, normalEC, vModelMatrix);\n #else\n gl_FragColor = blinnPhong(color, vecTexCoord, vTexCoord, vPositionEC, vPositionMC.xyz, normalEC, vModelMatrix);\n #ifdef TEXTURE\n gl_FragColor = LineartoSRGB(gl_FragColor);\n #endif\n #endif\n \n #ifdef Volume\n #ifdef Volume2\n if((vecRotioCoord.x < 1.0 && vecRotioCoord.x >0.0) && (vecRotioCoord.y < 1.0 && vecRotioCoord.y >0.0) && (vecRotioCoord.z < 1.0 && vecRotioCoord.z >0.0))\n {\n vec4 volumeColor = czm_getVolumeValue(vecRotioCoord);\n if (volumeColor.r * volumeColor.g * volumeColor.b * volumeColor.a < 0.99) {\n gl_FragColor = volumeColor;\n }\n }\n #else\n float wValue = 0.0;\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, wValue);\n #endif\n #endif\n#endif\n\n#ifndef MRT\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n#endif\n}",_0x302008=(_0x141af5=!0,function(e,t){var i=_0x141af5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x141af5=!1,i}),_0x2ba86b=_0x302008(void 0,(function(){return _0x2ba86b.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ba86b).search("(((.+)+)+)+$")})),_0x141af5;_0x2ba86b();var _0x4bd175={getDataShape:function(e,t){for(var i=-1/0,n=0,r=0,o=0,a=0;a<e.length;a++){var s=0;if(e[a].value&&(s=e[a].value[3]),s<i){if(o&&o!==r)throw new Error("Invalid data. data should be a row major 2d array.");o=r,r=0,n++}i=s,r++}return{row:n+1,column:r}}},_0x5605df=[],_0x47debb=[],_0x54d348=[];function _0x385fe1(e){var t;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)?(3==(t=e.substring(1).split("")).length&&(t=[t[0],t[0],t[1],t[1],t[2],t[2]]),[((t="0x"+t.join(""))>>16&255)/255,(t>>8&255)/255,(255&t)/255,1]):[255,255,255,1]}_0x4bd175.updateSurfaceMesh=function(e,t,i){for(var n=new Float32Array(3*e.length),r=-900,o=900,a=-900,s=900,l=-900,u=900,c=0;c<e.length;c+=3)r=Math.max(e[c].value[0],r),o=Math.min(e[c].value[0],o),a=Math.max(e[c].value[1],a),s=Math.min(e[c].value[1],s),l=Math.max(e[c].value[2],l),u=Math.min(e[c].value[2],u);var h=_0x4d902f(o,r);_0x5605df=_0x21c072(o,r,h);var d=_0x4d902f(s,a);_0x47debb=_0x21c072(s,a,d);var f=_0x4d902f(u,l);_0x54d348=_0x21c072(u,l,f);var p=0;e.forEach((function(e){e.value&&e.value instanceof Array&&_0xe8c9e7(e.value[0],e.value[1],e.value[2],p,n),p++}));var _=_0x1ce754(0,null,[-50,50],_0x5605df),m=_0x1ce754(0,null,[50,-50],_0x47debb),g=_0x1ce754(0,null,[-50,50],_0x54d348),x=null,v=null,y=null,$=null,b=null,T=t.row,C=t.column,S=(T-1)*(C-1)*4;x=new Float32Array(3*S),$=new Float32Array(4*S),b=new Float32Array(4*S),y=new Float32Array(2*S);var w,E,P,A,L,M,R,I,O,D,B,N,F,U,z,G=[0,3,1,1,3,2],V=[[1,1,0,0],[0,1,0,1],[1,0,0,1],[1,0,1,0]],k=new(S>65535?Uint32Array:Uint16Array)((T-1)*(C-1)*6),W=function(e,t,i){i[1]=e*C+t,i[0]=e*C+t+1,i[3]=(e+1)*C+t+1,i[2]=(e+1)*C+t},H=[],q=[],j=0;v=new Float32Array(3*S);var Y=[[],[],[]],X=[],K=[],Q=[0,0,0],Z=function(e,t,i){var n=3*t;return i[0]=e[n],i[1]=e[n+1],i[2]=e[n+2],i},J=new Float32Array(n.length),ee=new Float32Array(n.length/3*4),te=[0,0,0,1];for(c=0;c<e.length;c++){e[c].itemStyle&&"string"==typeof e[c].itemStyle.color?te=ue=_0x385fe1(e[c].itemStyle.color):ue=te;ue[3]*=1,ue[3];for(var ie=0;ie<4;ie++)ee[4*c+ie]=ue[ie]}for(c=0;c<T-1;c++)for(var ne=0;ne<C-1;ne++){var re=4*(c*(C-1)+ne)*3;W(c,ne,H);for(ie=0;ie<4;ie++)Z(n,H[ie],q);for(ie=0;ie<4;ie++)Z(n,H[ie],q),x.set(q,re+3*ie),$.set(V[ie],re/3*4+ie);for(ie=0;ie<6;ie++)k[j++]=G[ie]+re/3;for(ie=0;ie<2;ie++){for(var oe=3*ie,ae=0;ae<3;ae++){Z(n,he=H[G[oe]+ae],Y[ae])}var se=function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e};se(X,Y[0],Y[1]),se(K,Y[1],Y[2]);R=Q,O=K,D=void 0,B=void 0,N=void 0,F=void 0,U=void 0,z=void 0,D=(I=X)[0],B=I[1],N=I[2],F=O[0],U=O[1],z=O[2],R[0]=B*z-N*U,R[1]=N*F-D*z,R[2]=D*U-B*F;for(ae=0;ae<3;ae++){var le=3*H[G[oe]+ae];J[le]=J[le]+Q[0],J[le+1]=J[le+1]+Q[1],J[le+2]=J[le+2]+Q[2]}}}for(c=0;c<J.length/3;c++){Z(J,c,Q);w=Q,P=void 0,A=void 0,L=void 0,M=void 0,P=(E=Q)[0],A=E[1],L=E[2],(M=P*P+A*A+L*L)>0&&(M=1/Math.sqrt(M),w[0]=E[0]*M,w[1]=E[1]*M,w[2]=E[2]*M),J[3*c]=Q[0],J[3*c+1]=Q[1],J[3*c+2]=Q[2]}var ue=[],ce=[];for(c=0;c<T-1;c++)for(ne=0;ne<C-1;ne++){re=4*(c*(C-1)+ne)*4;W(c,ne,H);for(ie=0;ie<4;ie++){for(ae=0;ae<4;ae++)ue[ae]=ee[4*H[ie]+ae];b.set(ue,re+4*ie),Z(J,H[ie],Q),v.set(Q,re/4*3+3*ie);var he=H[ie];ce[0]=he%C/(C-1),ce[1]=Math.floor(he/C)/(T-1),y.set(ce,re/4*2+2*ie)}0}for(c=0;c<x.length;c+=3){x[c]-=_,x[c+1]-=m,x[c+2]-=g;var de=x[c+1],fe=x[c+2];x[c+2]=de,x[c+1]=fe}return{positionAttr:x,normalAttr:v,texcoordAttr:y,barycentricAttr:$,colorAttr:b,indices:k,vertexColors:ee,vertexNormals:J,vertexCount:S}};var _0x43857a=[0,1];function _0x56850a(e,t,i,n){return(i=i||[])[0]=_0x1ce754(e[0],n,[-50,50],_0x5605df),i[1]=_0x1ce754(e[1],n,[50,-50],_0x47debb),i[2]=_0x1ce754(e[2],n,[-50,50],_0x54d348),i}function _0x1ce754(e,t,i,n){return _0x3e2dce(e=_0x3bd6b2(e,n),_0x43857a,i,t)}function _0x3bd6b2(e,t){var i=t;return i[1]===i[0]?.5:(e-i[0])/(i[1]-i[0])}function _0x3e2dce(e,t,i,n){var r=t[1]-t[0],o=i[1]-i[0];if(0===r)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(e<=t[0])return i[0];if(e>=t[1])return i[1]}else{if(e>=t[0])return i[0];if(e<=t[1])return i[1]}else{if(e===t[0])return i[0];if(e===t[1])return i[1]}return(e-t[0])/r*o+i[0]}function _0xe8c9e7(e,t,i,n,r,o){var a;a=_0x56850a([e,t,i]),r[3*n]=a[0],r[3*n+1]=a[1],r[3*n+2]=a[2]}function _0x4d902f(e,t){var i=(t-e)/5,n=_0x5c361f(i),r=Math.pow(10,n),o=i/r;return i=(o<1.5?1:o<2.5?2:o<4?3:o<7?5:10)*r,n>=-20?+i.toFixed(n<0?-n:0):i}function _0x5c361f(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function _0x21c072(e,t,i){var n=[];return n[0]=_0x21b518(Math.floor(e/i)*i),n[1]=_0x21b518(Math.ceil(t/i)*i),n}function _0x21b518(e,t,i){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),i?e:+e}var _0x15f5b0=(_0x328cb1=!0,function(e,t){var i=_0x328cb1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x328cb1=!1,i}),_0x28ef10=_0x15f5b0(void 0,(function(){return _0x28ef10.toString().search("(((.+)+)+)+$").toString().constructor(_0x28ef10).search("(((.+)+)+)+$")})),_0x328cb1;_0x28ef10();var _0x20f6a4={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,READY:4,LOST:5},_0x5e3972=new s$S,_0x41b30e=25;function _0x243ce4(e,t,i){var n=e.vertexAttributes[0],r=n.typedArray,o=new Float32Array(r.buffer,r.byteOffset,r.byteLength/4),a=n.componentsPerAttribute,s=e.verticesCount,l=new Float32Array(3*s),u=e.attrLocation;u.aRatio=Object.keys(u).length;for(var c=0;c<s;c++){var h=new o$1p(o[c*a],o[c*a+1],o[c*a+2]),d=new o$1p;p$1d.multiplyByPoint(t,h,d);var f=a$18.fromCartesian(d),p=e$2a.toDegrees(f.longitude),_=e$2a.toDegrees(f.latitude),m=f.height,g=(p-i.left)/(i.right-i.left),x=(_-i.bottom)/(i.top-i.bottom),v=(m-i.minHeight)/(i.maxHeight-i.minHeight);l[3*c]=g,l[3*c+1]=x,l[3*c+2]=v}e.vertexAttributes.push({index:u.aRatio,typedArray:l,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0x448857(e){if(!e$2b(e))throw new t$16("context is required.");this._context=e,this._gl=e._gl,this._type=bt$5.INSTANCED_LAYER,this._group={},this._visible=!0,this._picking=!1,this._clampToObject=!1,this._profile=!1,this._visibleViewport=4095,this._maxVisibleAltitude=Number.MAX_VALUE,this._maxVisibleDistance=Number.MAX_VALUE,this._minVisibleAltitude=0,this._minVisibleDistance=0,this._filterMode=_0x2056d1.DISTANCE_FROM_EYE_POINT,this._filterPixel=0,null!==e.s3tc?this._supportCompressType=1:null!==e.pvrtc?this._supportCompressType=2:null!==e.etc1&&(this._supportCompressType=3),this._isOverLay=!1,this._spatialQueryEnable=!1,this._sqTextures=[],this._sqMode=j$X.Disjoint,this._allColorCommand=[],this._shadowType=_0x381f49.NONE,this._needToRender=!0,this._addedEvent=new o$1h,this._volume=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:new o$1p,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}},this._pbrParameter=je$g.NONE,this._mixColorType=_0x203e3b.MIX,_0x46a73d.S3MBTaskProcessor.scheduleTask({})}function _0x2e80e0(e,t,i){if(e$2b(e._profileCommand)||e.createProfileCommand(t),e._profileCommand.derivedCommands={},i){var n=_0x187e60.createClampObjectColorRenderState();e._profileCommand.renderState=d$1m.fromCache(n),e._profileCommand.pass=Le$s.ClampObject,e$2b(e._stencilCommand)||e.createClampCommand()}else e._profileCommand.renderState=d$1m.fromCache({cull:{enabled:group.cullEnabled,face:group.cullFace},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),e.removeProgramDefine(!0,!0,"ClampObject",!0)}function _0x11ed3b(e,t){var i=e._group[t],n=e.customRequestHeaders,r=i.state;if(_0x20f6a4.UNLOAD==r){var o=o$N(t,(function(e){return o$10(e,n)}));e$2b(o)&&(i.state=_0x20f6a4.LOADING,o.then((function(e){i._arrayBuffer=e,i.state=_0x20f6a4.LOADED}),(function(e){i.state=_0x20f6a4.LOST})))}_0x20f6a4.LOADED==r&&(e$2b(i._arrayBuffer)?_0x5c4563(e,i,i._arrayBuffer):e$2b(i._threedmodeling)&&_0xd4664c(e,i._threedmodeling,i))}function _0x527075(e){return e._shadowType==_0x381f49.SELECTION||e._shadowType==_0x381f49.ALL}function _0x5831ff(e,t){var i=e.instances.length,n=e.renderEntities;if(n&&!(n.length<1)&&0!==i){var r=e.instances.values[0];if(e$2b(r)){var o=e$2b(r.localTransform)?_0x41b30e+8:_0x41b30e,a=e.oriCenter,s=e.oriRadius;e.instanceBuffer&&e.instanceBuffer.destroy();for(var l=new Float32Array(i*o),u=0;u<i;u++){(m=e.instances.values[u]).index=u,_0x2c353e(t,l,m,u*o)}e.instanceBuffer=t$Y.createVertexBuffer({context:t,typedArray:l,usage:A$19.STATIC_DRAW}),e.instanceBuffer.vertexArrayDestroyable=!1;u=0;for(var c=n.length;u<c;u++){var h=n[u],d=h._colorCommand;d.vertexArray.destroy();for(var f=0;f<h.attributes.length;f++){var p=h.attributes[f];e$2b(p.instanceDivisor)&&p.instanceDivisor>0&&(p.vertexBuffer=e.instanceBuffer)}d.vertexArray=new c$12({context:t,attributes:h.attributes,indexBuffer:h.indexBuffer}),d.instanceCount=i;for(var _=0;_<i;_++){var m;if((m=e.instances.values[_]).index=_,m.oriCenter=a,m.oriRadius=s,!e$2b(m.boundingSphere)){m.boundingSphere=new i$1c;var g=o$1p.maximumComponent(m.scale);m.boundingSphere.radius=s*g;var x=m$17.eastNorthUpToFixedFrame(m.position,t$13.WGS84,new p$1d);p$1d.multiplyByPoint(x,a,m.boundingSphere.center)}}}e.instanceCount=i,e.dirty=!1}}}function _0x2c353e(e,t,i,n){var r=o$1p.clone(i._offsetPosition),o=i._quaternion;if(i._mode===C$13.COLUMBUS_VIEW){var a=p$1e.fromRotationY(-Math.PI/2),s=n$13.fromRotationMatrix(a);n$13.multiply(o,s,o)}var l=i._scale,u=i$11.fromCartesian(r),c=i.visible?u.high:o$1p.ZERO,h=i.visible?u.low:o$1p.ZERO,d=i._color,f=i._pickColor,p=i._offset,_=i.oriRadius,m=i.localTranslation,g=i.localQuaternion,x=0;t[n+x++]=c.x,t[n+x++]=c.y,t[n+x++]=c.z,t[n+x++]=h.x,t[n+x++]=h.y,t[n+x++]=h.z,t[n+x++]=o.x,t[n+x++]=o.y,t[n+x++]=o.z,t[n+x++]=o.w,t[n+x++]=l.x,t[n+x++]=l.y,t[n+x++]=l.z,t[n+x++]=_,t[n+x++]=d.red,t[n+x++]=d.green,t[n+x++]=d.blue,t[n+x++]=d.alpha,t[n+x++]=f.x,t[n+x++]=f.y,t[n+x++]=f.z,t[n+x++]=f.w,t[n+x++]=p.x,t[n+x++]=p.y,t[n+x++]=p.z,e$2b(m)&&(t[n+x++]=m.x,t[n+x++]=m.y,t[n+x++]=m.z,t[n+x++]=1),e$2b(g)&&(t[n+x++]=g.x,t[n+x++]=g.y,t[n+x++]=g.z,t[n+x++]=g.w)}function _0x37e656(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;if(!(e.arrIndexPackage&&e.vertexPackage&&e.collection&&e.mapPass))throw new t$16("gl texture indexes vertexes collection is required to create RenderEntityPagelod");this._arrIndexPackage=t,this._vertexPackage=i,this._collection=e.collection,this._layer=this._collection,this._attributeLocations={},this._initialize=!1,this._geoMatrix=u$_(e.geoMatrix,p$1d.IDENTITY),this._mapPass=n,this._colorCommand=void 0,this._stencilCommand=void 0,this._profileCommand=void 0,this._spatialQueryCommand=void 0,this._boundingVolume=e.boundingVolume,this._ownerGroup=e.ownerGroup;var r=this._arrIndexPackage[0];this._material=e$2b(r)&&e$2b(r.materialCode)?n[r.materialCode]:_0x21d1b1.Default,this._materialUBO=new _0xfa6ee5(this,this._material,this._collection)}function _0xd4664c(e,t,i){i.state=_0x20f6a4.PARSING;for(var n=new o$1p,r=[],o=Number.MAX_VALUE,a=Number.MIN_VALUE,s=0;s<t.vertexCount;s++)o$1p.fromArray(t.positionAttr,3*s,n),r.push(o$1p.clone(n)),o=Math.min(o,n.y),a=Math.max(a,n.y);var l=p$1d.clone(p$1d.IDENTITY,new p$1d),u=i$1c.fromPoints(r,new i$1c);i$1c.transform(u,l,u);var c=new _0x37e656({vertexPackage:{vertexAttributes:[{index:0,typedArray:t.positionAttr,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1},{index:1,typedArray:t.colorAttr,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:0},{index:2,typedArray:t.normalAttr,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:0}],attrLocation:{aPosition:0,aColor:1,aNormal:2},instanceCount:0,instanceMode:0,instanceIndex:-1,verticesCount:t.vertexCount},arrIndexPackage:[{indicesTypedArray:t.indices,indexType:0,primitiveType:4}],mapPass:{},boundingVolume:u,collection:e,ownerGroup:i,geoMatrix:l});c.initialize(e),i.renderEntities.push(c),i._threedmodeling=void 0,i.state=_0x20f6a4.READY,i.ready=!0,e._addedEvent.raiseEvent(i.url)}function _0x567cba(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function _0x238861(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function _0x5c4563(e,t,i){var n,r={buffer:i,supportCompressType:e._supportCompressType},o=!1;if(t.url.endsWith("s3mb")||/\.(x|X|dae|DAE|osgb)$/.test(t.url)){if(/\.(x|X|dae|DAE|osgb)$/.test(t.url)&&(r.isOSGB=!0),r.suffix=t.url.substring(t.url.lastIndexOf(".")+1),o=!0,_0x46a73d.init||_0x46a73d.initWebAssembly(),!_0x46a73d.taskProcessorReady)return;n=_0x46a73d.S3MBTaskProcessor.scheduleTask(r,[i])}else n=_0x46a73d.S3MTaskProcessor.scheduleTask(r,[i]);e$2b(n)?(t.state=_0x20f6a4.PARSING,t._arrayBuffer=void 0,n.then((function(i){i&&i.result?(o?_0x299732(i,t,e):_0x4b2751(i,t,e),t.ready=!0,t.dirty=!1,t.state=_0x20f6a4.READY):t.state=_0x20f6a4.UNLOAD})).otherwise((function(e){console.log(e)})).then((function(){e._addedEvent.raiseEvent(t.url)}))):t.state=_0x20f6a4.LOADED}function _0x299732(e,t,i){i._gl;var n=i._context,r=e.groupNode,o=e.geoPackage,a=e.matrials.material,s={},l=0,u=0,c=o$1l.defer();a.map((function(i){var r=i.material,o=r.id,a=new _0x21d1b1({});s[o]=a,a.createCommonParamter(r),a.createPBRParamter(r);var h=r.textureunitstates;l+=h.length;for(var d=0;d<h.length;d++){var f=h[d].textureunitstate,p=f.id,_=0===f.addressmode.u?q$19.REPEAT:q$19.CLAMP_TO_EDGE,m=0===f.addressmode.v?q$19.REPEAT:q$19.CLAMP_TO_EDGE;a._texMatrix=p$1d.unpack(f.texmodmatrix);var g=e.texturePackage[p],x=p;if(e$2b(g)&&!n.webgl2)(!e$2a.isPowerOfTwo(g.width)||!e$2a.isPowerOfTwo(g.height))&&(_=q$19.CLAMP_TO_EDGE,m=q$19.CLAMP_TO_EDGE);if(e$2b(g)||!p.endsWith("jpg")&&!p.endsWith("png")){if(e$2b(g)&&g.width>0&&g.height>0&&g.imageBuffer.length>0){var v=Se$d.CreateTexture(x,n,g.width,g.height,g.nFormat,g.compressType,g.imageBuffer,!1,_,m),y=p.indexOf("PBRMaterialParam")>-1,$=a._emissiveTextureIndex===d,b=a._normalTextureIndex===d,T=a._metallicRoughnessTextureIndex===d,C=a._occlusionTextureIndex===d;y?(a._usePBRTextureBatch=!0,a.pbrParamTexture=v):$?a.emissiveTexture=v:b?a.normalTexture=v:T?a.metallicRoughnessTexture=v:C?a.occlusionTexture=v:a._textures.push(v)}c.resolve()}else{var S=t.url.substring(0,t.url.lastIndexOf("/")+1)+p;o$10(S).then((function(e){var t=S.endsWith("jpg")?"jpg":"png";a.createJPGPNG(x,n,d,e,_,m,t).then((function(e){++u==l&&c.resolve()})).otherwise((function(){++u==l&&c.resolve()}))})).otherwise((function(){++u==l&&c.resolve()}))}}c.resolve()})),c.promise.then((function(){var n=r.pageLods,a=[],l=new i$1c;n.forEach((e=>{e.boundingSphere&&a.push(e.boundingSphere)})),i$1c.fromBoundingSpheres(a,l);for(var u=0;u<n.length;u++){n[u].geodes.map((function(n){for(var r=n.matrix,a=n.skeletonNames,u=0;u<t.instances.length;u++){var c=t.instances.values[u];c.oriCenter=o$1p.clone(l.center),c.oriRadius=l.radius,e$2b(t.oriCenter)||(t.oriCenter=c.oriCenter,t.oriRadius=c.oriRadius);var h=c.position,d=m$17.eastNorthUpToFixedFrame(h,t$13.WGS84,new p$1d),f=i$1c.transform(l,d,new i$1c);c.boundingSphere=f}for(var p=0;p<a.length;p++){for(var _=a[p],m=o[_],g=m.vertexPackage,x=m.arrIndexPackage,v={},y=0;y<x.length;y++){var $=x[y];if(e$2b($)){var b=$.materialCode,T=s[b];v[b]=T}}var C=new _0x37e656({vertexPackage:g,arrIndexPackage:x,version:e.version,mapPass:v,collection:i,ownerGroup:t,geoMatrix:r});C.initialize(i),t.renderEntities.push(C)}}))}}))}function _0x4b2751(e,t,i){i._gl;for(var n=i._context,r=_0x5e3972.read(e.xmlDoc).firstChild,o=r.namespaceURI,a=_0x43ec62(_0x38867c(r,"Material3Ds",o),"material",o),s={},l=0,u=a.length;l<u;l++){var c=a[l],h=_0x2411b5(c,"name",o),d=new _0x21d1b1({});s[h]=d;var f=_0x38867c(c,"Ambient",o),p=_0x247774(f,"AmbientR",o),_=_0x247774(f,"AmbientG",o),m=_0x247774(f,"AmbientB",o),g=_0x247774(f,"AmbientA",o);d._ambientColor=new e$1U(p,_,m,g);var x=_0x38867c(c,"Diffuse",o);p=_0x247774(x,"DiffuseR",o),_=_0x247774(x,"DiffuseG",o),m=_0x247774(x,"DiffuseB",o),g=_0x247774(x,"DiffuseA",o),d._diffuseColor=new e$1U(p,_,m,g);var v=_0x38867c(c,"Specular",o);p=_0x247774(v,"SpecularR",o),_=_0x247774(v,"SpecularG",o),m=_0x247774(v,"SpecularB",o),g=_0x247774(v,"SpecularA",o),d._specularColor=new e$1U(p,_,m,g);var y=_0x247774(c,"Shininess",o);d._shininess=y,_0x38867c(c,"TransparentSorting",o),d._bTransparentSorting=_0x3b993d(c,"TransparentSorting",o)||d._diffuseColor.alpha<1;var $=_0x38867c(c,"texture",o),b=_0x2411b5($,"name",o),T=_0x38867c($,"AddressMode",o),C=_0x2411b5(T,"u",o),S=_0x2411b5(T,"v",o);C="TAM_WRAP"===C?q$19.REPEAT:q$19.CLAMP_TO_EDGE,S="TAM_WRAP"===S?q$19.REPEAT:q$19.CLAMP_TO_EDGE;var w=e.texturePackage[b];if(e$2b(w)){b=n._id+"_"+b,(!e$2a.isPowerOfTwo(w.width)||!e$2a.isPowerOfTwo(w.height))&&(C=q$19.CLAMP_TO_EDGE,S=q$19.CLAMP_TO_EDGE);var E=Se$d.CreateTexture(b,n,w.width,w.height,w.nFormat,w.compressType,w.imageBuffer,!1,C,S);d._textures.push(E),0===w.compressType&&(i._supportCompressType=0)}}var P=_0x533f61(_0x38867c(r,"PageLods",o),"Geode",o);for(l=0,u=P.length;l<u;l++){for(var A=[],L=P[l],M=_0x2411b5(L,"GeoDeModMatrix",o).split(","),R=0;R<16;R++)M[R]=parseFloat(M[R]);M=p$1d.unpack(M,0);for(var I=_0x533f61(L,"GeoName",o),O=[],D=0,B=I.length;D<B;D++){var N=I[D].textContent.trim();-1===O.indexOf(N)&&O.push(N)}for(var F=new i$1c,U=0;U<O.length;U++){if(e$2b(J=e.geoPackage[O[U]])){var z=_0x948aea(ee=J.vertexPackage,M);A.push(z)}}if(A.length>0){var G=i$1c.fromBoundingSpheres(A,new i$1c),V=!1;t.instances.length>0&&e$2b(t.instances.values[0].localTransform)&&(i$1c.transform(G,t.instances.values[0].localTransform,G),V=!0);for(var k=[],W=0;W<t.instances.length;W++){var H=t.instances.values[W];H.oriCenter=o$1p.clone(G.center),H.oriRadius=G.radius,e$2b(t.oriCenter)||(t.oriCenter=H.oriCenter,t.oriRadius=H.oriRadius);var q=H.position,j=m$17.eastNorthUpToFixedFrame(q,t$13.WGS84,new p$1d),Y=i$1c.transform(G,j,new i$1c),X=V?2:o$1p.maximumComponent(H.scale);Y.radius=Y.radius*X,H.boundingSphere=Y,k.push(Y)}i$1c.fromBoundingSpheres(k,F)}var K=new p$1d;if(e$2b(i._volume)){var Q=t.instances.values[0]._offsetPosition,Z=new i$15;j=m$17.headingPitchRollToFixedFrame(Q,Z,t$13.WGS84,m$17.eastNorthUpToFixedFrame);K=p$1d.multiply(j,M,K),K=p$1d.multiplyByScale(K,t.instances.values[0].scale,K)}for(B=0;B<O.length;B++){var J;if(e$2b(J=e.geoPackage[O[B]])){var ee=J.vertexPackage,te=J.arrIndexPackage,ie={};for(var ne in te){var re=te[ne];if(e$2b(re)){d=s[h=re.materialCode];ie[h]=d}}e$2b(i._volume)&&_0x243ce4(ee,K,i._volume._volBounds);var oe=new _0x37e656({vertexPackage:ee,arrIndexPackage:te,version:e.version,mapPass:ie,boundingVolume:F,collection:i,ownerGroup:t,geoMatrix:M});oe.initialize(i),t.renderEntities.push(oe)}}}}function _0x948aea(e,t){for(var i=[],n=new i$1c,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1c.fromPoints(i,n),i.length=0,i$1c.transform(n,t,n),n}function _0x38867c(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(e$2b(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function _0x533f61(e,t,i){if(e$2b(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];e$2b(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}}function _0x43ec62(e,t,i){if(!e$2b(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];e$2b(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function _0x247774(e,t,i){var n=_0x38867c(e,t,i);if(e$2b(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function _0x2411b5(e,t,i){var n=_0x38867c(e,t,i);if(e$2b(n))return n.textContent.trim()}function _0x3b993d(e,t,i){var n=_0x38867c(e,t,i);if(e$2b(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function _0x2bfbda(e,t,i,n,r){var o=e$2b(r)?_0x41b30e+8:_0x41b30e,a=S$12.getSizeInBytes(S$12.FLOAT),s=0;t.aPosHigh=i++,e.push({name:"aPosHigh",index:t.aPosHigh,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:s,strideInBytes:a*o,instanceDivisor:1}),s+=3,t.aPosLow=i++,e.push({name:"aPosLow",index:t.aPosLow,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=3,t.aQuaternion=i++,e.push({name:"aQuaternion",index:t.aQuaternion,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aScaleAndRadius=i++,e.push({name:"aScaleAndRadius",index:t.aScaleAndRadius,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aColor2=i++,e.push({name:"aColor2",index:t.aColor2,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aPickColor=i++,e.push({name:"aPickColor",index:t.aPickColor,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aOffset=i++,e.push({name:"aOffset",index:t.aOffset,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=3,e$2b(r)&&(t.aLocalTranslation=i++,e.push({name:"aLocalTranslation",index:t.aLocalTranslation,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aLocalQuaternion=i++,e.push({name:"aLocalQuaternion",index:t.aLocalQuaternion,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4)}function _0x284e0c(e,t,i){var n=t.layer,r={uTexture:function(){return t.texture||n._context._defaultTexture},uHasNormal:function(){return t.hasNormal},uAmbientColor:function(){return n._mixColorType===_0x203e3b.REPLACE?e$1U.WHITE:t.ambientColor},uDiffuseColor:function(){return n._mixColorType===_0x203e3b.REPLACE?e$1U.WHITE:t.diffuseColor},uSpecularColor:function(){return t.specularColor},uShininess:function(){return t.shininess},uPicking:function(){return t.layer._picking},uGeoMat:function(){return t.geoMat},uRangeMode:function(){return n.filterMode},uVisibleDistance:function(){return new o$1o(n.maxVisibleDistance,n.minVisibleDistance)},uFilterPixel:function(){return n.filterPixel},uFillColor:function(){return t.diffuseColor},uVolumeTexture:function(){return n._volume._volTexture},width:function(){return n._volume._volImageBuffer.nWidth},height:function(){return n._volume._volImageBuffer.nHeight},depth:function(){return n._volume._volImageBuffer.nDepth},sideBlockCount:function(){return n._volume._volImageBuffer.nSideBlockCount},blockLength:function(){return n._volume._volImageBuffer.nBlockLength},texLength:function(){return n._volume._volImageBuffer.nLength},uFilterMode:function(){var e=0;return e$2b(n._volume.hypsometricSetting)&&n._volume.hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(e=1),e},uMixColorType:function(){return n._mixColorType},uDataFloor:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMinKey:0},uDataCeil:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMaxKey:0},uVolumeType:function(){return e$2b(n._volume.hypsometricSetting)&&n._volume.hypsometricSetting.filterMode===k$Q.FilterMode.LINEAR?0:1},uHypOpacity:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.Opacity:1},uHypContourInterval:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.LineInterval:100},uHypLineColor:function(){var e=new e$29(0,1,1,1);return e$2b(n._volume.hypsometricSetting)&&(e.x=n._volume.hypsometricSetting.LineColor.red,e.y=n._volume.hypsometricSetting.LineColor.green,e.z=n._volume.hypsometricSetting.LineColor.blue,e.w=n._volume.hypsometricSetting.LineColor.alpha),e},uHypContourFillMode:function(){var e=1;if(e$2b(n._volume.hypsometricSetting))switch(n._volume.hypsometricSetting.DisplayMode){case k$Q.DisplayMode.NONE:e=0;break;case k$Q.DisplayMode.FACE:e=1;break;case k$Q.DisplayMode.LINE:e=2;break;case k$Q.DisplayMode.FACE_AND_LINE:e=3}return e},uHypFloor:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMaxKey:0},uHypMaxVisibleValue:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.MaxVisibleValue:0},uHypMinVisibleValue:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.MinVisibleValue:0},uNoValueColor:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.noValueColor:e$1U.WHITE},uHypsometricVisible:function(){return 1},uHypHasAnalysisRegion:function(){return 0},uHypsometricRenderTexture:function(){return 0},uHypsometricTexture:function(){return n._volume._hypsometricTexture},uBaseColorFactor:function(){return e$2b(i._baseColor)?i._baseColor:n._PBRMaterialParams[t.groupName].baseColorFactor},uBaseColorTextureIndex:function(){return i._baseColorTextureIndex>-1?i._baseColorTextureIndex:n._PBRMaterialParams[t.groupName].baseColorTextureIndex},uMetallicFactor:function(){return e$2b(i._metallicFactor)?i._metallicFactor:n._PBRMaterialParams[t.groupName].metallic},uRoughnessFactor:function(){return e$2b(i._roughnessFactor)?i._roughnessFactor:n._PBRMaterialParams[t.groupName].roughness},uEmissiveFactor:function(){return e$2b(i._emissiveFactor)?i._emissiveFactor:n._PBRMaterialParams[t.groupName].emissionFactor},uEmissionTexture:function(){return e$2b(i.emissiveTexture)&&i._emissiveTextureIndex>-1?i.emissiveTexture:n._PBRMaterialParams[t.groupName].emissiveTexture},uEmissiveUVOffsetAndTiling:function(){var e=i._emissiveTextureMotion,t=new e$29,n=performance.now()/1e3;if(e._offsetPeriod>0){var r=n%e._offsetPeriod;t.x=r*e._offsetSpeedU,t.y=r*e._offsetSpeedV}else t.x=0,t.y=0;if(e._tilingPeriod>0){var o=n%e._tilingPeriod;t.z=1+o*e._tilingSpeedU,t.w=1+o*e._tilingSpeedV}else t.z=1,t.w=1;return t},uBaseTexture:function(){return e$2b(i.baseColorTexture)&&i._baseColorTextureIndex>-1?i.baseColorTexture:n._PBRMaterialParams[t.groupName].baseTexture},uNormalTexture:function(){return e$2b(i.normalTexture)&&i._normalTextureIndex>-1?i.normalTexture:n._PBRMaterialParams[t.groupName].normalTexture},uMetallicRoughnessTexture:function(){return e$2b(i.metallicRoughnessTexture)&&i._metallicRoughnessTextureIndex>-1?i.metallicRoughnessTexture:n._PBRMaterialParams[t.groupName].metallicRoughnessTexture},uOcclusionTexture:function(){return e$2b(i.occlusionTexture)&&i._occlusionTextureIndex>-1?i.occlusionTexture:n._PBRMaterialParams[t.groupName].occlusionTexture}};r=p$19(r,i.createPBRUniformMap()),r=p$19(r,n._frameState.lightSource.createUniformMap()),e.uniformMap=r}function _0x1a2aa1(e,t,i,n){var r=t$11.createIfNeeded(t).fetchImage().then((function(t){var r=new t$V({context:e,source:t,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.LINEAR_MIPMAP_LINEAR,magnificationFilter:tt$h.LINEAR})});!e$2a.isPowerOfTwo(r.width)||!e$2a.isPowerOfTwo(r.height)||r.generateMipmap(I$1e.NICEST),i[n]=r})).otherwise((function(){i[n]=void 0}));i[n]=r}function _0x1f8f59(e,t){if(e$2b(e._group[t])&&e._group[t].renderEntities.length>0)for(var i=e._group[t].renderEntities,n=0;n<i.length;n++)e$2b(i[n]._colorCommand)&&(e$2b(e._PBRMaterialParams[t])&&e$2b(e._PBRMaterialParams[t].roughness)?(i[n].appendProgramDefine(!1,!0,Y$H.BRDF,!1),e._PBRMaterialParams[t].baseColorTextureIndex>-1&&e$2b(e._PBRMaterialParams[t].baseTexture)&&i[n].appendProgramDefine(!1,!0,Y$H.HAS_BASE_TEXTURE,!1),e._PBRMaterialParams[t].normalTextureIndex>-1&&e$2b(e._PBRMaterialParams[t].normalTexture)&&i[n].appendProgramDefine(!1,!0,Y$H.HAS_NORMAL_TEXTURE,!1),e._PBRMaterialParams[t].emissionTextureIndex>-1&&i[n].appendProgramDefine(!1,!0,Y$H.HAS_EMISSIVE_TEXTURE,!1),e$2b(e._frameState.specularEnvironmentMaps)&&i[n].appendProgramDefine(!1,!0,Y$H.IBL,!1)):(i[n].removeProgramDefine(!1,!0,Y$H.BRDF,!1),i[n].removeProgramDefine(!1,!0,Y$H.HAS_BASE_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,Y$H.HAS_NORMAL_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,Y$H.HAS_EMISSIVE_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,Y$H.IBL,!1)))}Object.defineProperties(_0x448857.prototype,{type:{get:function(){return this._type}},group:{get:function(){return this._group}},visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("value",e),this._visible=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){o$1q.typeOf.number("maxVisibleAltitude",e),this._maxVisibleAltitude=e}},maxVisibleDistance:{get:function(){return this._maxVisibleDistance},set:function(e){o$1q.typeOf.number("maxVisibleDistance",e),this._maxVisibleDistance=e}},minVisibleDistance:{get:function(){return this._minVisibleDistance},set:function(e){o$1q.typeOf.number("minVisibleDistance",e),this._minVisibleDistance=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){o$1q.typeOf.number("minVisibleAltitude",e),this._minVisibleAltitude=e}},filterMode:{get:function(){return this._filterMode},set:function(e){o$1q.typeOf.number("filterMode",e),this._filterMode=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){o$1q.typeOf.number("filterPixel",e),this._filterPixel=e}},isOverLay:{get:function(){return this._isOverLay},set:function(e){o$1q.typeOf.bool("value",e),this._isOverLay=e}},clampToObject:{get:function(){return this._clampToObject},set:function(e){if(o$1q.typeOf.bool("value",e),this._clampToObject!==e){this._clampToObject=e;var t=this._group;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];if(!n.ready)continue;for(var r=0,o=n.renderEntities.length;r<o;r++){var a=n.renderEntities[r];this._profile?_0x2e80e0(a,this,e):e$2b(a._colorCommand)&&(a._colorCommand.derivedCommands={},a.createColorRenderState(n,e),e?(a._colorCommand.pass=Le$s.ClampObject,e$2b(a._stencilCommand)||a.createClampCommand(),a.appendProgramDefine(!0,!0,"ClampObject",!1)):a.removeProgramDefine(!0,!0,"ClampObject",!1))}}}}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}},addedEvent:{get:function(){return this._addedEvent}},mixColorType:{get:function(){return this._mixColorType},set:function(e){this._mixColorType!==e&&(this._mixColorType=e)}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders!==e&&(this._customRequestHeaders=e)}}}),_0x448857.prototype.add=function(e,t,i,n){o$1q.defined("url",e),o$1q.typeOf.string("url",e),o$1q.defined("attrs",t),Array.isArray(t)||(t=[t]),e$2b(this._group[e])||(this._group[e]={instances:new e$1N,ready:!1,state:e$2b(i)?_0x20f6a4.LOADED:_0x20f6a4.UNLOAD,instanceCount:0,instanceBuffer:void 0,renderEntities:[],cullEnabled:!1,cullFace:G$17.BACK,oriCenter:void 0,oriRadius:void 0,dirty:!1,url:e});for(var r=this._group[e],o=this._context,a=0,s=t.length;a<s;a++){var l=t[a],u=u$_(l.id,r.instances.length);if(r.instances.contains(u))console.log("id "+u+" exist");else{l.sceneMode=this._context._us._mode;var c=new _0x331f36(o,u,r,l);r.instances.set(u,c)}}if(e$2b(i))if(n=u$_(n,!0),i instanceof Blob){var h=new FileReader,d=this;h.addEventListener("load",(function(){if(n){var t=new Uint8Array(h.result).buffer;d._group[e]._arrayBuffer=t}else d._group[e]._arrayBuffer=h.result})),h.addEventListener("error",(function(){})),h.readAsArrayBuffer(i)}else if(i instanceof ArrayBuffer)if(n){var f=i;this._group[e]._arrayBuffer=f}else this._group[e]._arrayBuffer=i;else{var p=_0x4bd175.getDataShape(i);r=_0x4bd175.updateSurfaceMesh(i,p,!0);this._group[e]._threedmodeling=r}r.dirty=!0},_0x448857.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x448857.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},_0x448857.prototype.removeCollection=function(e){o$1q.defined("removeCollection url",e);var t=this._group[e];if(!e$2b(t))return!1;for(var i=0,n=t.renderEntities.length;i<n;i++)t.renderEntities[i].destroy();return t.renderEntities.length=0,t.instances.removeAll(),this._group[e]=null,delete this._group[e],!0},_0x448857.prototype.getInstance=function(e,t){o$1q.defined("S3MInstanceCollection getInstance url",e),o$1q.defined("S3MInstanceCollection getInstance id",t);var i=this._group[e];if(e$2b(i))return i.instances.get(t)},_0x448857.prototype.removeInstance=function(e,t){o$1q.defined("removeInstance url",e),o$1q.defined("removeInstance ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(!e$2b(i))return!1;for(var n,r=0,o=t.length;r<o;r++){var a=t[r];e$2b(n=i.instances.get(a))&&(n.updateColor(e$1U.WHITE.withAlpha(0),n.id),n.isDeleted=!0,i.instances.remove(a),n=null,this._group[e].dirty=!0)}return!0},_0x448857.prototype.setCullEnabled=function(e,t){o$1q.typeOf.string("S3MInstanceCollection setCullEnabled url",e),t=u$_(t,G$17.BACK);var i=this._group[e];if(e$2b(i)&&(!i.cullEnabled||i.cullFace!==t)&&(i.cullEnabled=!0,i.cullFace=t,i.ready))for(var n=0,r=i.renderEntities.length;n<r;n++){var o=i.renderEntities[n],a=d$1m.getState(o._colorCommand.renderState);a.cull.enabled=!0,a.cull.face=t,o._colorCommand.renderState=d$1m.fromCache(a)}},_0x448857.prototype.setUnSelected=function(){var e=this._group;if(e$2b(e))for(var t in e){var i=e[t];if(e$2b(i.instances)&&!(i.instances.length<1))for(var n=0,r=i.instances.length;n<r;n++){i.instances.values[n].setUnSelected()}}},_0x448857.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;if(this._visible){if(e$2b(this._volume)){if(!this._volume._ready)return;this._volume.loadTexture(this._context)}var t=e.camera;if(!(t.positionCartographic.height>this._maxVisibleAltitude||t.positionCartographic.height<this._minVisibleAltitude)){this._frameState=e;var i=e.commandList,n=this._group,r=e.passes;for(var o in this._picking=r.pick,this._allColorCommand=[],n){var a=n[o];if(_0x11ed3b(this,o),a.ready){a.dirty&&_0x5831ff(a,this._context);for(var s=[],l=!1,u=0;u<a.instances.length;u++){var c=a.instances.values[u];0===u&&(l=c.color.alpha<1);var h=c.boundingSphere;s.push(h)}for(var d=i$1c.fromBoundingSpheres(s,new i$1c),f=0,p=a.renderEntities.length;f<p;f++){var _=a.renderEntities[f];if(_._materialUBO.update(this._context),this._clampToObject&&this._profile){if(e._fboState.frameBufferType===Qe$c.CLAMP)_._stencilCommand.boundingVolume=d,i.push(_._stencilCommand),_._profileCommand.boundingVolume=d,_._profileCommand.instanceCount=a.instanceCount,_._profileCommand.pass=Le$s.ClampObject,i.push(_._profileCommand);else if(this._spatialQueryEnable){e$2b(_._spatialQueryCommand)||_.createSpatialQueryCommand(this);var m=3===this._sqTextures.length?_._spatialQueryCommand:_._colorCommand;m.boundingVolume=d,m.instanceCount=a.instanceCount,m.pass=this._isOverLay?Le$s.OVERLAY_AGAINST_DEPTH:l?Le$s.TRANSLUCENT:Le$s.OPAQUE,e._fboState.enabled||i.push(m)}}else this._clampToObject&&(_._stencilCommand.boundingVolume=d,i.push(_._stencilCommand)),_._colorCommand.boundingVolume=d,_._colorCommand.instanceCount=a.instanceCount,_._colorCommand.pass=this._isOverLay?Le$s.OVERLAY_AGAINST_DEPTH:this._clampToObject?Le$s.ClampObject:l?Le$s.TRANSLUCENT:Le$s.OPAQUE,this._needToRender&&i.push(_._colorCommand),this._allColorCommand.push(_._colorCommand)}}}}}},_0x448857.prototype.isDestroyed=function(){return!1},_0x448857.prototype._updateShadow=function(e){var t=_0x527075(e),i=e._group;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s._colorCommand.castShadows=t,s._colorCommand.receiveShadows=t}}},_0x448857.prototype.destroy=function(){for(var e in this._group){var t=this._group[e];if(t.ready){for(var i=0;i<t.renderEntities.length;i++){var n=t.renderEntities[i]._colorCommand;if(e$2b(n.vertexArray)&&!n.vertexArray.isDestroyed()){n.vertexArray._inner._indexBuffer.vertexArrayDestroyable=!0;for(var r=0;r<n.vertexArray._inner._attributes.length;r++){n.vertexArray._inner._attributes[r].vertexBuffer.vertexArrayDestroyable=!0}n.vertexArray=n.vertexArray.destroy()}n.shaderProgram=n.shaderProgram&&n.shaderProgram.destroy()}t.instanceBuffer=t.instanceBuffer&&!t.instanceBuffer.isDestroyed()&&t.instanceBuffer.destroy()}}return this._group=void 0,this._allColorCommand=[],i$10(this)},_0x37e656.prototype.initialize=function(e){this._initialize||(this.createCommand(e),this._initialize=!0)},_0x37e656.prototype.createVertexData=function(e){for(var t=this._vertexPackage.vertexAttributes,i=0,n=t.length;i<n;i++){var r=t[i];!e$2b(r.typedArray)||(r.vertexBuffer=t$Y.createVertexBuffer({context:e,typedArray:r.typedArray,usage:A$19.STATIC_DRAW}),r.vertexBuffer.vertexArrayDestroyable=!1,r.typedArray=null,delete r.typedArray)}if(!e$2b(this._ownerGroup.instanceBuffer)){var o=this._ownerGroup.instances,a=void 0;o.length>0&&(a=o.values[0].localTransform);var s=o.length;this._ownerGroup.instanceCount=s;var l=e$2b(a)?_0x41b30e+8:_0x41b30e,u=new Float32Array(s*l);for(i=0;i<s;i++){var c=o.values[i];c.index=i,_0x2c353e(e,u,c,i*l)}this._ownerGroup.instanceBuffer=t$Y.createVertexBuffer({context:e,typedArray:u,usage:A$19.STATIC_DRAW})}for(var h in this._attributeLocations=this._vertexPackage.attrLocation,this._attributeLocations){t[d=this._attributeLocations[h]].name=h}var d=Object.keys(this._attributeLocations).length;return _0x2bfbda(t,this._attributeLocations,d,this._ownerGroup,a),t},_0x37e656.prototype.createCommand=function(e){var t=e._context,i=this.createVertexData(t),n=Le$s.OPAQUE;if(!e$2b(this._arrIndexPackage)||!e$2b(this._arrIndexPackage[0]))return;var r=this._arrIndexPackage[0],o=this._vertexPackage.verticesCount,a=ce$x.UNSIGNED_SHORT;(1===r.indexType||o>=e$2a.SIXTY_FOUR_KILOBYTES)&&t.elementIndexUint&&(a=ce$x.UNSIGNED_INT);var s=t$Y.createIndexBuffer({context:t,typedArray:r.indicesTypedArray,usage:A$19.STATIC_DRAW,indexDatatype:a});s.vertexArrayDestroyable=!1,this.indexBuffer=s,this.attributes=i;var l=this._mapPass[r.materialCode]||_0x21d1b1.Default;this._arrIndexPackage[0]=null,!0===l._bTransparentSorting&&(n=Le$s.TRANSLUCENT);var u=W$18.TRIANGLES;switch(r.primitiveType){case 1:u=W$18.POINTS;break;case 2:u=W$18.LINES;break;case 4:u=W$18.TRIANGLES}n=e._isOverLay?Le$s.OVERLAY_AGAINST_DEPTH:n;var c=new i$_({primitiveType:u,boundingVolume:this._boundingVolume,pass:n,owner:this,cull:!0}),h=e._context.uniformState;c.addUniformBuffer(h._sceneUBO),c.addUniformBuffer(h._lightUBO),c.addUniformBuffer(this._materialUBO),e._shadowType===_0x381f49.ALL||e._shadowType===_0x381f49.SELECTION?(c.castShadows=!0,c.receiveShadows=!0):(c.castShadows=!1,c.receiveShadows=!1),c.pickId="vPickColor",c.instanceCount=this._ownerGroup.instances.length,c.vertexArray=new c$12({context:t,attributes:i,indexBuffer:s});var d=new s$U({name:"S3MInstanceCollectionVertex",sources:[_0x3e7b8e]}),f=new s$U({name:"S3ModelFP",sources:[_0x451393]});0===this._collection._supportCompressType&&f.defines.push("FLIP_Y"),e$2b(this._attributeLocations.aColor)&&d.defines.push("VertexColor"),l._textures.length>0&&e$2b(this._attributeLocations.aTexCoord0)&&(d.defines.push("TEXTURE"),f.defines.push("TEXTURE")),e$2b(this._attributeLocations.aNormal)&&(d.defines.push(Y$H.HAS_NORMAL),f.defines.push(Y$H.HAS_NORMAL)),e$2b(e._volume)&&(d.defines.push(Y$H.VOLUME),f.defines.push(Y$H.VOLUME),e._volume.hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(d.defines.push(Y$H.VOLUME2),f.defines.push(Y$H.VOLUME2))),this._collection.clampToObject&&(d.defines.push("ClampObject"),f.defines.push("ClampObject"));const p=e._frameState.lightSource;e$2b(p)&&(f.defines.push("MAX_POINT_LIGHT_COUNT "+s$I.MaxPointLightCount),f.defines.push("MAX_SPOT_LIGHT_COUNT "+s$I.MaxSpotLightCount),f.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$I.MaxDirectionLightCount),p.directionalLight.length>0&&f.defines.push(Y$H.HAS_DIR_LIGHTS),p._visibleLightList[_0x1d9df9.POINT].length>0&&f.defines.push(Y$H.HAS_POINT_LIGHTS),p._visibleLightList[_0x1d9df9.SPOT].length>0&&f.defines.push(Y$H.HAS_SPOT_LIGHTS),p.hemisphereLight.length>0&&f.defines.push(Y$H.HAS_HEMISPHERE_LIGHTS));this._ownerGroup.instances.length>0&&e$2b(this._ownerGroup.instances.values[0].localTransform)&&d.defines.push("LocalTransform");var _=this._ownerGroup.url;(l._usePBR||e$2b(e._PBRMaterialParams[_])&&e._PBRMaterialParams[_].roughness>0)&&(f.defines.push(Y$H.BRDF),(l.baseColorTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_].baseColorTextureIndex>-1&&e$2b(e._PBRMaterialParams[_].baseTexture))&&f.defines.push(Y$H.HAS_BASE_TEXTURE),(l.uNormalTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_].normalTextureIndex>-1&&e$2b(e._PBRMaterialParams[_].normalTexture))&&f.defines.push(Y$H.HAS_NORMAL_TEXTURE),(l.emissiveTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_].emissionTextureIndex>-1)&&f.defines.push(Y$H.HAS_EMISSIVE_TEXTURE),(l.metallicRoughnessTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_]._metallicRoughnessTextureIndex>-1)&&f.defines.push(Y$H.HAS_MetallicRoughness_TEXTURE),(l.occlusionTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_]._occlusionTextureIndex>-1)&&f.defines.push(Y$H.HAS_OCCLUSION_TEXTURE),(e$2b(e._frameState.specularEnvironmentMaps)||e$2b(e._frameState.hdrEnvMap))&&(f.defines.push(Y$H.IBL),e$2b(e._frameState.specularEnvironmentMaps)&&f.defines.push(Y$H.KtxEnvMap)),e$2b(l._alphaMode)&&l._alphaMode===_0x5f0e97.MASK&&f.defines.push(Y$H.MASK)),l.appendPBRMacroToShader(d,f);var m=e$2b(this._attributeLocations.aNormal);c.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:f,attributeLocations:this._attributeLocations});var g=l._diffuseColor,x=l._diffuseColor,v=l._specularColor,y=l._shininess;_0x284e0c(c,{texture:l._textures[0],hasNormal:m,ambientColor:g,diffuseColor:x,specularColor:v,shininess:y,layer:this._collection,geoMat:this._geoMatrix,groupName:_},l),this._texture=l._textures[0],this._colorCommand=c,this._vertexPackage=void 0,this._arrIndexPackage.length=0,this.createColorRenderState(this._ownerGroup,this._collection._clampToObject),this._collection._clampToObject&&(c.pass=Le$s.ClampObject,this.createClampCommand())},_0x37e656.prototype.appendProgramDefine=function(e,t,i,n){var r=this._collection._context,o=n?this._profileCommand:this._colorCommand;if(e$2b(o)){var a=o.shaderProgram.fragmentShaderSource,s=o.shaderProgram.vertexShaderSource;e&&_0x567cba(s,i),t&&_0x567cba(a,i),o.shaderProgram.destroy(),o.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:this._attributeLocations}),e$2b(this._stencilCommand)&&(this._stencilCommand.shaderProgram=o.shaderProgram)}},_0x37e656.prototype.removeProgramDefine=function(e,t,i,n){var r=this._collection._context,o=n?this._profileCommand:this._colorCommand;if(e$2b(o)){var a=o.shaderProgram.fragmentShaderSource,s=o.shaderProgram.vertexShaderSource;e&&_0x238861(s,i),t&&_0x238861(a,i),o.shaderProgram.destroy(),o.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:this._attributeLocations})}},_0x37e656.prototype.createColorRenderState=function(e,t){if(t){var i=_0x187e60.createClampObjectColorRenderState();this._colorCommand.renderState=d$1m.fromCache(i)}else this._colorCommand.renderState=d$1m.fromCache({cull:{enabled:e.cullEnabled,face:e.cullFace},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND})},_0x37e656.prototype.createClampCommand=function(){if(!e$2b(this._stencilCommand)){var e=_0x187e60.createClampObjectStencilRenderState(),t=e$2b(this._profileCommand)?this._profileCommand:this._colorCommand,i=i$_.shallowClone(t);i.renderState=d$1m.fromCache(e),this._stencilCommand=i}},_0x37e656.prototype.createProfileCommand=function(e){if(!e$2b(this._profileCommand)){var t=this._colorCommand,i=t.shaderProgram.vertexShaderSource.clone(),n=t.shaderProgram.fragmentShaderSource.clone();i.defines.push("ClampObject"),n.defines.push("ClampObject"),i.defines.push("PROFILE"),n.defines.push("PROFILE");var r=e._context;r.drawBuffers&&r.colorBufferFloat&&r.depthTexture&&n.defines.push("MRT");var o=i$_.shallowClone(t);o.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._profileCommand=o}},_0x37e656.prototype.createSpatialQueryCommand=function(e){if(!e$2b(this._spatialQueryCommand)){var t=this._colorCommand,i=t.shaderProgram.vertexShaderSource.clone(),n=t.shaderProgram.fragmentShaderSource.clone();i.defines.push("SQRESULT"),n.defines.push("SQRESULT"),e._frameState.useLogDepth&&n.defines.push("LOG_DEPTH");var r=i$_.shallowClone(t);r.uniformMap.uFrontDepthTexture=function(){return e._sqTextures[0]},r.uniformMap.uBackDepthTexture=function(){return e._sqTextures[1]},r.uniformMap.uFrontColorTexture=function(){return e._sqTextures[2]},r.uniformMap.uSQMode=function(){return e._sqMode},r.shaderProgram=r$13.fromCache({context:e._context,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._spatialQueryCommand=r}},_0x37e656.prototype.destroy=function(){for(var e in this._mapPass)this._mapPass.hasOwnProperty(e)&&(this._mapPass[e]=this._mapPass[e]&&!this._mapPass[e].isDestroyed()&&this._mapPass[e].destroy());this._mapPass=void 0;var t=this._colorCommand;e$2b(t)&&(t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy(),this._colorCommand=void 0),e$2b(t=this._stencilCommand)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),this._stencilCommand=void 0),e$2b(t=this._profileCommand)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),this._profileCommand=void 0),this._vertexPackage=null,this._arrIndexPackage.length=0},_0x448857.prototype._setSQTextures=function(e){this._sqTextures=e},_0x448857.prototype._setSQMode=function(e){this._sqMode=e},_0x448857.prototype._getAllColorCommand=function(){return this._allColorCommand},_0x448857.prototype.setPBRMaterialFromJSON=function(e,t){if(this._pbrParameter===je$g.NONE){var i=this;e in i._PBRMaterialParams||(i._PBRMaterialParams[e]={metallic:0,roughness:0,baseColorFactor:new e$29(1,1,1,1),baseColorTextureIndex:-1,baseTexture:void 0,emissionFactor:o$1p.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseUri:""}),i._PBRMaterialParams[e].baseUri=i$1a(t),u$Q(t).then((function(t){var n=t.material,r=n.pbrMetallicRoughness,o=n.textureunitstates;if(i._PBRMaterialParams[e].baseColorFactor=e$2b(r.baseColor)?e$29.fromElements(r.baseColor.x,r.baseColor.y,r.baseColor.z,r.baseColor.w):i._PBRMaterialParams[e].baseColorFactor,i._PBRMaterialParams[e].baseColorTextureIndex=e$2b(r.baseColorTextureIndex)?r.baseColorTextureIndex:-1,i._PBRMaterialParams[e].emissionFactor=e$2b(r.emissiveFactor)?o$1p.fromElements(r.emissiveFactor.x,r.emissiveFactor.y,r.emissiveFactor.z):o$1p.UNIT_XYZ,i._PBRMaterialParams[e].emissionTextureIndex=e$2b(r.emissiveTextureIndex)?r.emissiveTextureIndex:i._PBRMaterialParams[e].emissionTextureIndex,i._PBRMaterialParams[e].metallic=e$2b(r.metallicFactor)?r.metallicFactor:i._PBRMaterialParams[e].metallic,i._PBRMaterialParams[e].roughness=e$2b(r.roughnessFactor)?r.roughnessFactor:i._PBRMaterialParams[e].roughness,i._PBRMaterialParams[e].occlusionTextureIndex=e$2b(r.occlusionTextureIndex)?r.occlusionTextureIndex:-1,i._PBRMaterialParams[e].normalTextureIndex=e$2b(r.normalTextureIndex)?r.normalTextureIndex:-1,-1!==r.baseColorTextureIndex){var a=i._PBRMaterialParams[e].baseUri+o[r.baseColorTextureIndex].textureunitstate.url;_0x1a2aa1(i._context,a,i._PBRMaterialParams[e],"baseTexture")}if(-1!==r.normalTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.normalTextureIndex].textureunitstate.url;_0x1a2aa1(i._context,a,i._PBRMaterialParams[e],"normalTexture")}if(-1!==r.emissiveTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.emissiveTextureIndex].textureunitstate.url;_0x1a2aa1(i._context,a,i._PBRMaterialParams[e],"emissiveTexture")}if(-1!==r.metallicRoughnessTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.metallicRoughnessTextureIndex].textureunitstate.url;_0x1a2aa1(i._context,a,i._PBRMaterialParams[e],"metallicRoughnessTexture")}if(-1!==r.occlusionTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.occlusionTextureIndex].textureunitstate.url;_0x1a2aa1(i._context,a,i._PBRMaterialParams[e],"occlusionTexture")}_0x1f8f59(i,e)}))}},_0x448857.prototype.removePBRMaterial=function(e){delete this._PBRMaterialParams[e],_0x1f8f59(this,e)};var _0x2757fb=(_0x5c282d=!0,function(e,t){var i=_0x5c282d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c282d=!1,i}),_0x371605=_0x2757fb(void 0,(function(){return _0x371605.toString().search("(((.+)+)+)+$").toString().constructor(_0x371605).search("(((.+)+)+)+$")})),_0x5c282d;function _0x4d0d03(e){if(!e$2b(e))throw new t$16("scene are required.");if(!e.context.depthTexture)throw new t$16("the depth buffer is not supported.");this._scene=e,this._name="",this._frameState=void 0,this._isInitlized=!1,this._depthDirty=!1,this._bufferDirty=!1,this._updateIDs=!1,this._disjointIDs=[],this._intersectsIDs=[],this._ids=[],this._textures=[],this._depthBuffers=[],this._resultBuffer=void 0,this._disjointBuffer=void 0,this._worldMatrix=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._matDepthView=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._matDepthProject=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._boundingSphere=new i$1c,this._depthCommands=[],this._colorCommand=void 0,this._clearCommand=new t$X({color:new e$1U(0,0,0,0),stencil:0,depth:1}),this._geometry=void 0,this._layers=[],this._fillColor=new e$1U(1,1,0,.5),this._outlineColor=new e$1U(1,0,0,1),this._positionMode=j$X.Disjoint,this._fillStyle=fr$2.Fill,this._positionMode=j$X.Disjoint,this._beQueryCollection=void 0,this._queryCollection=void 0,this._allS3MColorCommand=[],this._profile=!1,this._clipLayers=new e$1N,this._curFrameNumber=-1,this._width=1,this._height=1}function _0x3c111a(e){e$2b(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&!e._colorCommand.vertexArray.isDestroyed()&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&!e._colorCommand.shaderProgram.isDestroyed()&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0);for(var t=0;t<e._depthCommands.length;t++)e._depthCommands[t].vertexArray=e._depthCommands[t].vertexArray&&!e._depthCommands[t].vertexArray.isDestroyed()&&e._depthCommands[t].vertexArray.destroy(),e._depthCommands[t].shaderProgram=e._depthCommands[t].shaderProgram&&!e._depthCommands[t].shaderProgram.isDestroyed()&&e._depthCommands[t].shaderProgram.destroy(),e._depthCommands[t]=void 0;e._depthCommands=[],e$2b(e._outlineCommand)&&(e._outlineCommand.vertexArray=e._outlineCommand.vertexArray&&!e._outlineCommand.vertexArray.isDestroyed()&&e._outlineCommand.vertexArray.destroy(),e._outlineCommand.shaderProgram=e._outlineCommand.shaderProgram&&!e._outlineCommand.shaderProgram.isDestroyed()&&e._outlineCommand.shaderProgram.destroy(),e._outlineCommand=void 0)}function _0x5843d7(e){for(var t=0;t<e._textures.length;t++)e$2b(e._textures[t])&&(e._textures[t]=e._textures[t]&&e._textures[t].destroy(),e._textures[t]=null);e._textures=[]}function _0xf68f99(e){e$2b(e._frameState)&&(e$2b(e._disjointBuffer)&&delete e._frameState._framebufferList.sqDisjoinTexture,e$2b(e._resultBuffer)&&delete e._frameState._framebufferList.sqResultTexture,e._frameState=void 0),e._disjointBuffer=e._disjointBuffer&&e._disjointBuffer.destroy(),e._resultBuffer=e._resultBuffer&&e._resultBuffer.destroy();for(var t=0;t<e._depthBuffers.length;t++)e._depthBuffers[t]=e._depthBuffers[t]&&e._depthBuffers[t].destroy();e._depthBuffers=[]}function _0x592671(e){return!!e$2b(e)&&(e.geoType===P$U.GEOCONE||e.geoType===P$U.GEOBOX||e.geoType===P$U.GEOCYLINDER||e.geoType===P$U.GEOSPHERE||e.geoType===P$U.GEOREGION3D||e.geoType===P$U.GEOELLIPSOID||e.geoType===P$U.GEOMODEL3D||e instanceof y$S)}function _0x52ad99(e,t,i){_0x3c111a(e);var n=t.drawingBufferWidth,r=t.drawingBufferHeight,o=!0;if(e._textures.length>0){var a=e._textures[0];o=n!=a.width||r!=a.height}o&&(_0xf68f99(e),_0x5843d7(e),_0x1e5c3b(e,t,i),_0x37ae11(e,t)),_0x2a4da7(e,t,i);for(var s=0;s<e._layers.length;s++)e._layers[s]._spatialQueryEnable=!0,e._layers[s]._setSQTextures(e._textures),e._layers[s].selectEnabled=!0;s=0;for(var l=e._clipLayers.length;s<l;s++){e._clipLayers.values[s]._setSQTextures(e._textures)}e._isInitlized=!0}function _0x1e5c3b(e,t,i){var n=t.drawingBufferWidth,r=t.drawingBufferHeight;if(0===e._textures.length)for(var o=0;o<3;o++){var a=new t$V({context:t,width:n,height:r,pixelFormat:V$10.UNSIGNED_BYTE,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})});e._textures.push(a)}var s=new t$L(t);s.isUpdate=!1,i._framebufferList.sqResultTexture=s,e._resultBuffer=s;var l=new t$L(t);l.isUpdate=!1,i._framebufferList.sqDisjoinTexture=l,e._disjointBuffer=l}function _0x2a4da7(e,t,i){if(!e$2b(e._colorCommand)||!e$2b(e._outlineCommand))if(_0x3c111a(e),e._allS3MColorCommand.length>0)for(var n=0;n<e._allS3MColorCommand.length;n++)_0x1d6f0b(e,t,i,e._allS3MColorCommand[n]);else _0x537076(e,t,i)}function _0x537076(e,t,i){var n=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$s.TRANSLUCENT,owner:e}),r={aPosition:0,aNormal:1},o=new s$U({sources:[_0x49106d]});p$1d.equals(e._worldMatrix,p$1d.IDENTITY)&&o.defines.push("USE_RelativeOrigin"),n.vertexArray=e._geometry.getVertexArray(t),n.shaderProgram=r$13.fromCache({name:"spatialQuerySimple",context:t,vertexShaderSource:o,fragmentShaderSource:_0x1b19d0,attributeLocations:r}),n.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),n.uniformMap={uDiffuseColor:function(){return e._fillColor}},e._colorCommand=n,_0x1d6f0b(e,t,i,n);var a=new i$_({primitiveType:W$18.LINES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$s.TRANSLUCENT,owner:e});a.vertexArray=e._geometry.getOutlineVertexArray(t),a.shaderProgram=r$13.fromCache({name:"spatialQueryOutline",context:t,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:r}),a.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),a.uniformMap={uDiffuseColor:function(){return e._outlineColor}},e._outlineCommand=a}function _0x1d6f0b(e,t,i,n){var r=n.shaderProgram.vertexShaderSource.clone(),o=new s$U({name:"SpatialQueryFp",sources:[_0x594de8]});if(o.defines.push("DEPTH"),i.useLogDepth){r.defines.push("LOG_DEPTH");for(var a=r.sources,s=0;s<a.length;++s)a[s]=s$U.replaceMain(a[s],"czm_log_depth_main");a.push("\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n"),o.defines.push("LOG_DEPTH")}var l=n.shaderProgram._attributeLocations,u=i$_.shallowClone(n);u.renderState=d$1m.fromCache({depthTest:{enabled:!0},cull:{enabled:!0,face:de$x.BACK}}),u.shaderProgram=r$13.fromCache({name:"spatialQueryFrontDepth",context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:l}),u.framebuffer=e._depthBuffers[0],e._depthCommands.push(u);var c=i$_.shallowClone(n);c.renderState=d$1m.fromCache({depthTest:{enabled:!0},cull:{enabled:!0,face:de$x.FRONT}}),c.shaderProgram=r$13.fromCache({name:"spatialQueryBackDepth",context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:l}),c.framebuffer=e._depthBuffers[1],e._depthCommands.push(c);var h=i$_.shallowClone(n),d=new s$U({name:"SpatialQueryFp",sources:[_0x594de8]});d.defines.push("COLOR"),h.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1}}),h.shaderProgram=r$13.fromCache({name:"spatialQueryFrontColor",context:t,vertexShaderSource:r,fragmentShaderSource:d,attributeLocations:l}),h.framebuffer=e._depthBuffers[2],e._depthCommands.push(h)}function _0x37ae11(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=new t$W({context:t,colorTextures:[e._textures[0]],destroyAttachments:!1,depthStencilTexture:new t$V({context:t,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})});e._depthBuffers.push(r);var o=new t$W({context:t,colorTextures:[e._textures[1]],destroyAttachments:!1,depthStencilTexture:new t$V({context:t,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})});e._depthBuffers.push(o);var a=new t$W({context:t,colorTextures:[e._textures[2]],destroyAttachments:!1,depthStencilTexture:new t$V({context:t,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})});e._depthBuffers.push(a)}function _0x574b56(e,t,i,n){if(!e$2b(i))return Promise.resolve(!1);var r=[];return _0x4a4337(e._scene._context,i,e._layers,n,r).then((t=>{if(e._positionMode===j$X.Intersects)for(var i=Object.keys(n),o=0;o<i.length;o++){var a=r[i[o]],s=e._layers[a],l=n[i[o]];l.length>0&&s.setSelection(l)}return Promise.resolve(t)}))}function _0x4a4337(e,t,i,n,r){if(!e$2b(t)||!t.isUpdate)return Promise.resolve(!1);var o=t.renderTexture._width,a=t.renderTexture._height;return e.readPixelsAsync({framebuffer:t.renderTexture._fb,x:0,y:0,width:o,height:a}).then((t=>{for(var s=[],l=0;l<i.length;l++){var u=_0x1b4f72(_=i[l].id);r[u]=l,s.push(u),n[u]=[]}for(var c=0;c<o;c++)for(var h=0;h<a;h++){var d=4*(h*o+c);if(0!==t[d]||0!==t[d+1]||0!==t[d+2]){var f=e$1U.byteToRgba(t[d],t[d+1],t[d+2],t[d+3]),p=e.getObjectByPickId(f);if(e$2b(p)){var _=p.primitive.id,m=p.id,g=(u=_0x1b4f72(_),s.indexOf(u));if(!(g<0))if(i[r[u]],0==n[u].length){var x=[];x.push(m),n[u]=x}else(g=n[u].indexOf(m))<0&&n[u].push(m)}}}return Promise.resolve(!0)}))}function _0x1b4f72(e){return"id_"+e}function _0x229894(e,t,i){if(e._profile){e$2b(e._beQueryCollection)&&e._beQueryCollection._setSQMode(e._positionMode);for(var n=0,r=e._clipLayers.length;n<r;n++){e._clipLayers.values[n]._setSQMode(e._positionMode)}}else e._frameState=i,0!==e._textures.length&&e._bufferDirty&&!e._depthDirty&&(e._resultBuffer.isUpdate=!0,e._resultBuffer._beginFunc=function(t){for(var i=0;i<e._layers.length;i++)e._layers[i]._setSQMode(j$X.Intersects)},e._resultBuffer._endFunc=function(t){e._intersectsIDs=[],_0x574b56(e,t,e._resultBuffer,e._intersectsIDs).then((t=>{e._updateIDs=!0})),e._resultBuffer.isUpdate=!1},e._positionMode!==j$X.Intersects&&(e._disjointBuffer.isUpdate=!0,e._disjointBuffer._beginFunc=function(t){for(var i=0;i<e._layers.length;i++)e._layers[i]._setSQMode(j$X.Disjoint)},e._disjointBuffer._endFunc=function(t){e._disjointIDs=[],_0x574b56(e,t,e._disjointBuffer,e._disjointIDs).then((t=>{_0x5f0c57(e),_0x37f7b0(e),e._updateIDs=!0})),e._disjointBuffer.isUpdate=!1}),e._bufferDirty=!1)}function _0x5f0c57(e){if(e._positionMode===j$X.Disjoint)for(var t=Object.keys(e._disjointIDs),i=Object.keys(e._intersectsIDs),n=0;n<e._layers.length;n++){var r=e._layers[n],o=_0x1b4f72(r.id);if(!(t.indexOf(o)<0)){if(i.indexOf(o)<0){r.setSelection(e._disjointIDs[o]);continue}for(var a=e._intersectsIDs[o],s=e._disjointIDs[o],l=0;l<a.length;l++){var u=s.indexOf(a[l]);u>=0&&s.splice(u,1)}r.setSelection(s)}}}function _0x37f7b0(e){if(e._positionMode===j$X.Contains)for(var t=Object.keys(e._disjointIDs),i=Object.keys(e._intersectsIDs),n=0;n<e._layers.length;n++){var r=e._layers[n],o=_0x1b4f72(r.id);if(!(i.indexOf(o)<0)){if(t.indexOf(o)<0){r.setSelection(e._intersectsIDs[o]);continue}for(var a=e._intersectsIDs[o],s=e._disjointIDs[o],l=0;l<s.length;l++){var u=a.indexOf(s[l]);u>=0&&a.splice(u,1)}r.setSelection(a)}}}_0x371605(),Object.defineProperties(_0x4d0d03.prototype,{geometry:{get:function(){return this._geometry},set:function(e){if(LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),this._geometry&&this._geometry.type===P$U.GEOMODEL3D&&(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[],this._queryCollection=void 0),this._geometry=e,this._depthDirty=!0,this._isInitlized=!1,this._geometry.type===P$U.GEOMODEL3D)e$2b(this._queryCollection)&&(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[]),this._queryCollection=new _0x448857(this._scene.context),this._queryCollection._needToRender=!1,this._requestModel(e);else if(e$2b(this._geometry._shape)){var t=new y$S({geometryInstances:new d$1o({attributes:{color:new o$16},geometry:this._geometry}),appearance:new t$R({translucent:!1})});this._scene.primitives.add(t),this._geometry=t}}},layers:{get:function(){return this._layers},set:function(e){for(var t=0;t<this._layers.length;t++)this._layers[t]._spatialQueryEnable=!1;this._layers=e,this._bufferDirty=!0}},fillColor:{get:function(){return this._fillColor},set:function(e){this._fillColor=e}},outlineColor:{get:function(){return this._outlineColor},set:function(e){this._outlineColor=e}},positionMode:{get:function(){return this._positionMode},set:function(e){this._positionMode=e,this._bufferDirty=!0}},fillStyle:{get:function(){return this._fillStyle},set:function(e){this._fillStyle=e}}}),_0x4d0d03.prototype.destroy=function(){return LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),_0xf68f99(this),_0x3c111a(this),_0x5843d7(this),e$2b(this._geometry)&&this._geometry.type===P$U.GEOMODEL3D?(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[]):this._beQueryCollection=void 0,this._profile=!1,this._scene._analyst3D.remove(this._name,!0),i$10(this)},_0x4d0d03.prototype.clear=function(){LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),this._scene._analyst3D.remove(this._name,!1)},_0x4d0d03.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),""===this._name?(this._name="spatialQuery3D"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this)):e$2b(this._scene._analyst3D.find(this._name))||this._scene._analyst3D.add(this)},_0x4d0d03.prototype.update=function(e,t,i){if(this._curFrameNumber!==t.frameNumber&&(this._curFrameNumber=t,!t._fboState.enabled&&e$2b(this._geometry)&&(0!==this._clipLayers.length||0!==this._layers.length||e$2b(this._beQueryCollection)))){if(!_0x592671(this._geometry))throw new t$16("the geometry type is not supported.");var n=e.drawingBufferWidth,r=e.drawingBufferHeight;if((this._width!==n||this._height!==r)&&(this._geometry.isGeometryDirty=!0,this._width=n,this._height=r),this._geometry.isGeometryDirty&&(this._isInitlized=!1),this._geometry.type===P$U.GEOMODEL3D){if(this._queryCollection.update(t),this._allS3MColorCommand=this._queryCollection._getAllColorCommand(),0===this._allS3MColorCommand.length)return}else if(this._geometry instanceof y$S){if(this._allS3MColorCommand=this._geometry._colorCommands,0===this._allS3MColorCommand.length)return;this._geometry._state=_0x142e29.FAILED}else{p$1d.equalsEpsilon(this._worldMatrix,this._geometry.modelMatrix,e$2a.EPSILON8)?0==this._boundingSphere.radius&&(this._boundingSphere=this.geometry._getGeometry().boundingSphere):(p$1d.clone(this._geometry.modelMatrix,this._worldMatrix),i$1c.transform(this.geometry._getGeometry().boundingSphere,this._worldMatrix,this._boundingSphere),this._depthDirty=!0)}this._isInitlized||(_0x52ad99(this,e,t),this._geometry.isGeometryDirty=!1),this._profile||this._updateTextures(e,t),_0x229894(this,e,t),e$2b(this._colorCommand)&&(this.fillStyle===fr$2.Fill||this.fillStyle===fr$2.Fill_And_WireFrame)&&!this._profile&&i.push(this._colorCommand),e$2b(this._outlineCommand)&&(this.fillStyle===fr$2.WireFrame||this.fillStyle===fr$2.Fill_And_WireFrame)&&i.push(this._outlineCommand)}},_0x4d0d03.prototype.getQueryIDs=function(){if(LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),!this._updateIDs)return this._ids;var e=o$1l.defer();this._ids=[],this._bufferDirty=!0,this._resultBuffer.isUpdate=!0,this._scene.initializeFrame();var t=this;return this._scene._renderForQueryAsync().then((function(){for(var i=new e$1N;;){for(var n=!1,r=0;r<t._layers.length;r++){var o=(u=t._layers[r]).getSelection();if(!(o.length<=0)){if(i.contains(u.id)){var a;a=o.concat(i.get(u.id).ids),o=a}var s={layerName:u.name,layerIndex:r,ids:o};i.set(u.id,s),n=!0,u.releaseSelection(),u.setObjsVisible(o,!1)}}if(!n){t._bufferDirty=!1,t._resultBuffer.isUpdate=!1;break}}for(var l=0;l<i.values.length;l++){var u;(u=t._layers[i.values[l].layerIndex]).setObjsVisible([],!1);var c={layerName:i.values[l].layerName,ids:i.values[l].ids};t._ids.push(c)}t._updateIDs=!1,e.resolve(t._ids)})),e.promise},_0x4d0d03.prototype._requestModel=function(){var e=this,t=this._geometry.geoModel;if(e$2b(t)){var i=new Uint8Array(t.model);this._queryCollection.add(this._name,{position:o$1p.fromDegrees(t.position.x,t.position.y,t.position.z),id:this._dataIndex,color:this._fillColor,scale:new o$1p(t.scaleX,t.scaleY,t.scaleZ)},i.buffer)}else if(""!==this._geometry.geoFilePath){var n=this._geometry.geoFilePath,r=n.replace(/\?returnContent=.*$/,"");".json"===(r=r.substring(r.length-5).toLowerCase())?u$Q(this._geometry.geoFilePath).then((function(t){if(null!=t.geometry){e._geometry.geoModel=t.geometry;var i=new Uint8Array(t.geometry.model);e._queryCollection.add(e._name,{position:o$1p.fromDegrees(t.geometry.position.x,t.geometry.position.y,t.geometry.position.z),id:e._dataIndex,color:e._fillColor,scale:new o$1p(t.geometry.scaleX,t.geometry.scaleY,t.geometry.scaleZ)},i.buffer)}})):o$10(n).then((function(t){var i=new DataView(t),r=0,o=i.getInt32(r,!0);r+=4;var a=a$K(new Uint8Array(t,r,o)),s=JSON.parse(a).geometry;if(null!=s){r+=o;var l=i.getInt32(r,!0);r+=4;var u,c,h=[];for(u=0;u<l;u++)c=i.getInt32(r,!0),h.push(c),r+=4;var d=[];for(u=0;u<l;u++){if(0===(c=h[u]))d.push(null);else{var f=new Uint8Array(t,r,c);d.push(new Uint8Array(f).buffer)}r+=c}e._queryCollection.add(n,{position:o$1p.fromDegrees(s.position.x,s.position.y,s.position.z),id:e._dataIndex,scale:new o$1p(s.scaleX,s.scaleY,s.scaleZ),hpr:i$15.fromDegrees(-s.rotationZ,s.rotationX,s.rotationY)},d[0],!1)}}))}},_0x4d0d03.prototype._updateTextures=function(e,t){if(this._curFrameNumber!==t.frameNumber&&(this._curFrameNumber=t,!(!this._depthDirty||e$2b(this._resultBuffer)&&this._resultBuffer.isUpdate||e$2b(this._disjointBuffer)&&this._disjointBuffer.isUpdate)||this._profile)){for(var i=t.camera,n=0;n<this._textures.length;n++)this._clearCommand.framebuffer=this._depthBuffers[n],this._clearCommand.execute(e),this._depthCommands[n].execute(e);e$2b(this._beQueryCollection)&&3===this._textures.length&&this._beQueryCollection._setSQTextures(this._textures),this._clearCommand.framebuffer=void 0,p$1d.clone(i.viewMatrix,this._matDepthView),p$1d.clone(e.uniformState.projection,this._matDepthProject);for(n=0;n<this._layers.length;n++)this._layers[n]._setSQViewPrjMatrix(this._matDepthView,this._matDepthProject);this._depthDirty=!1,this._bufferDirty=!0}};var _0x93ec6f=(_0xb56518=!0,function(e,t){var i=_0xb56518?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb56518=!1,i}),_0x4d1f3f=_0x93ec6f(void 0,(function(){return _0x4d1f3f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d1f3f).search("(((.+)+)+)+$")})),_0xb56518;_0x4d1f3f();var _0x69adc8="\nattribute vec4 aPosition;\nuniform mat4 uTexWorldViewProjMatrix0;\nuniform mat4 uTexWorldViewProjMatrix1;\nuniform mat4 uTexWorldViewProjMatrix2;\nuniform mat4 uTexWorldViewProjMatrix3;\nuniform mat4 uTexWorldViewProjMatrix4;\n\nuniform float uRadius;\n\nvarying vec4 clip_pos0;\nvarying vec4 clip_pos1;\nvarying vec4 clip_pos2;\nvarying vec4 clip_pos3;\nvarying vec4 clip_pos4;\n\n// vec4 GetUV(const mat4 renderTextureMatrix)\n// {\n// \tvec4 texCoord = renderTextureMatrix * vec4(vexPos.xyz, 1.0);\n// \ttexCoord = texCoord / texCoord.w;\n// \ttexCoord.xyz = texCoord.xyz * 0.5 + 0.5;\n// \treturn texCoord;\n// }\n\nvoid main()\n{\t\n vec3 newPos = vec3(aPosition.xyz);\n\tnewPos = newPos * uRadius;\n\tvec4 vexPos = vec4(newPos.xyz, 1.0);\n\tclip_pos0 = uTexWorldViewProjMatrix0 * vexPos;\n\tclip_pos1 = uTexWorldViewProjMatrix1 * vexPos;\n\tclip_pos2 = uTexWorldViewProjMatrix2 * vexPos;\n\tclip_pos3 = uTexWorldViewProjMatrix3 * vexPos;\n\tclip_pos4 = uTexWorldViewProjMatrix4 * vexPos;\n\n\tgl_Position = czm_modelViewProjection * vexPos;\n\t\n}",_0x1f2229=(_0x119524=!0,function(e,t){var i=_0x119524?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x119524=!1,i}),_0x3df629=_0x1f2229(void 0,(function(){return _0x3df629.toString().search("(((.+)+)+)+$").toString().constructor(_0x3df629).search("(((.+)+)+)+$")})),_0x119524;_0x3df629();var _0xefb578="\nuniform sampler2D uDepthMap0;\nuniform sampler2D uDepthMap1;\nuniform sampler2D uDepthMap2;\nuniform sampler2D uDepthMap3;\nuniform sampler2D uDepthMap4;\nuniform int uDomeType;\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\n\n\nvarying vec4 clip_pos0;\nvarying vec4 clip_pos1;\nvarying vec4 clip_pos2;\nvarying vec4 clip_pos3;\nvarying vec4 clip_pos4;\n\nbool IsValidNDC(vec4 ndc)\n{\n\tfloat minNDCZ = -1.0;\n#ifdef WEBGPU\n\tminNDCZ = 0.0;\n#endif\n\tif ((ndc.x<=1.0)&&(ndc.x>=-1.0)&&(ndc.y<=1.0)&&(ndc.y>=-1.0)&&(ndc.z<=1.0)&&(ndc.z>=minNDCZ))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}\n\nbool IsVisible(float depth, vec4 ndc)\n{\n bool isVisible = true;\n\tfloat tolerance = 0.00001;\n\tif(depth < tolerance)\n {\n return isVisible;\n }\n#ifdef WEBGPU\n\tfloat compareNDCZ = depth;\n#else\n\tfloat compareNDCZ = depth * 2.0 - 1.0;\n#endif\n\tif(ndc.z > (compareNDCZ + tolerance))\n {\n isVisible = false;\n }\n\treturn isVisible;\n}\n\nvoid main()\n{\n\tvec4 ndc0 = clip_pos0 / clip_pos0.w;\n\tvec4 ndc1 = clip_pos1 / clip_pos1.w;\n\tvec4 ndc2 = clip_pos2 / clip_pos2.w;\n\tvec4 ndc3 = clip_pos3 / clip_pos3.w;\n\tvec4 ndc4 = clip_pos4 / clip_pos4.w;\n\n\tvec2 texCoord0 = ndc0.xy * 0.5 + 0.5;\n\tvec2 texCoord1 = ndc1.xy * 0.5 + 0.5;\n\tvec2 texCoord2 = ndc2.xy * 0.5 + 0.5;\n\tvec2 texCoord3 = ndc3.xy * 0.5 + 0.5;\n\tvec2 texCoord4 = ndc4.xy * 0.5 + 0.5;\n\n\tfloat depth0 = czm_unpackDepth(texture2D(uDepthMap0, texCoord0.xy));\n\tfloat depth1 = czm_unpackDepth(texture2D(uDepthMap1, texCoord1.xy));\n\tfloat depth2 = czm_unpackDepth(texture2D(uDepthMap2, texCoord2.xy));\n\tfloat depth3 = czm_unpackDepth(texture2D(uDepthMap3, texCoord3.xy));\n\tfloat depth4 = czm_unpackDepth(texture2D(uDepthMap4, texCoord4.xy));\n\t\n\tbool isVisible = true;\n\tif(IsValidNDC(ndc0))\n\t{\n\t\tisVisible = IsVisible(depth0, ndc0);\n\t}\n\telse if(IsValidNDC(ndc1))\n\t{\n\t\tisVisible = IsVisible(depth1, ndc1);\n\t}\n\telse if(IsValidNDC(ndc2))\n\t{\n\t\tisVisible = IsVisible(depth2, ndc2);\n\t}\n\telse if(IsValidNDC(ndc3))\n\t{\n\t\tisVisible = IsVisible(depth3, ndc3);\n\t}\n\telse if(IsValidNDC(ndc4))\n\t{\n\t\tisVisible = IsVisible(depth4, ndc4);\n\t}\n\n\tif(uDomeType == 0)\n\t{\n if (!isVisible)\n {\n discard;\n }\n else\n {\n gl_FragColor = uVisibleAreaColor;\n }\n\t}\n\telse if(uDomeType == 1)\n\t{\n\t\tif (!isVisible)\n\t\t{\n\t\t\tgl_FragColor = uHiddenAreaColor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdiscard;\n\t\t}\n\t}\n\telse\n\t{\n\t if (!isVisible)\n\t\t{\n\t\t\tgl_FragColor = uHiddenAreaColor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgl_FragColor = uVisibleAreaColor;\n\t\t}\n\t}\n}",_0x46175f=(_0x32dc8b=!0,function(e,t){var i=_0x32dc8b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x32dc8b=!1,i}),_0x4228c8=_0x46175f(void 0,(function(){return _0x4228c8.toString().search("(((.+)+)+)+$").toString().constructor(_0x4228c8).search("(((.+)+)+)+$")})),_0x32dc8b;_0x4228c8();var _0x306f15={VISIBLEDOME:0,HIDDENDOME:1,ALLDOME:2},_0xc82867=Object.freeze(_0x306f15),_0x41f32a=(_0x16c4db=!0,function(e,t){var i=_0x16c4db?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16c4db=!1,i}),_0x1894c5=_0x41f32a(void 0,(function(){return _0x1894c5.toString().search("(((.+)+)+)+$").toString().constructor(_0x1894c5).search("(((.+)+)+)+$")})),_0x16c4db;_0x1894c5();var _0x1fc643=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function _0x4f36f0(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._cameraDepthBuffer=[],this._cameraNames=[],this._renderTextureMatrix=[],this._texWorldViewMatrix=[],this._texPrjMatrix=[],this._dirRadian=[],this._dPitch=[],this._colorCommand=void 0,this._boundingSphere=new i$1c,this._frameState=void 0,this._viewPosition=[0,0,0],this._startAngle=0,this._endAngle=360,this._visibleAreaColor=new e$29(0,1,0,.5),this._hiddenAreaColor=new e$29(1,0,0,.5),this._domeType=_0xc82867.ALLDOME,this._quality=0,this._displayMode=0,this._name="",this._checking=!1,this._sceneName="",this._updateCamera=!0,this._isRecreateTexture=!0,this._targetPoints=[],this._worldMatrix=p$1d.IDENTITY.clone(),this._initialize=!1,this._id=0,this._isUpdateCommand=!1,this._textureFinish=!1,this._isClosed=!1}function _0x2153f5(e){e$2b(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0)}function _0x311e1a(e){if(e$2b(e._frameState)){for(var t in e._cameraDepthBuffer)e$2b(e._cameraDepthBuffer[t])&&delete e._frameState._framebufferList[t];e._frameState=void 0}for(var t in e._cameraDepthBuffer)e._cameraDepthBuffer[t]=e._cameraDepthBuffer[t]&&e._cameraDepthBuffer[t].destroy()}function _0x1b73b4(e,t,i){var n=i.camera,r=n.frustum.aspectRatio,o=n.frustum.fov,a=n.frustum.near,s=n.frustum.far,l=new o$1p,u=n.heading,c=n.pitch,h=e._scene.globe.cullEnabled;o$1p.clone(n.position,l);for(var d=0;d<5;d++){var f=90*e$2a.RADIANS_PER_DEGREE,p=90*e$2a.RADIANS_PER_DEGREE,_=Math.tan(.5*f)/Math.tan(.5*p),m=.001*e._distance,g=Math.max(e._distance,10),x=o$1p.fromDegreesArrayHeights(e._viewPosition)[0],v=e._cameraNames[d];e._cameraDepthBuffer[v].isUpdate=!0;var y=i.useLogDepth;e._cameraDepthBuffer[v]._beginFunc=function(t){e._scene.globe.cullEnabled=!1,t.useLogDepth=!1,e._textureFinish=!1;var i=t._fboState.name,r=e._dirRadian[i]*e$2a.RADIANS_PER_DEGREE,o=e._dPitch[i]*e$2a.RADIANS_PER_DEGREE;n.frustum.aspectRatio=_,n.frustum.fov=f,n.frustum.near=m,n.frustum.far=g+100,n.setView({destination:x,orientation:{heading:r,pitch:o,roll:n.roll}}),p$1d.multiply(n.viewMatrix,e._worldMatrix,e._texWorldViewMatrix[i]),p$1d.multiply(n.frustum.projectionMatrix,e._texWorldViewMatrix[i],e._renderTextureMatrix[i]),p$1d.clone(n.frustum.projectionMatrix,e._texPrjMatrix[i])},e._cameraDepthBuffer[v]._endFunc=function(i){n.setView({destination:l,orientation:{heading:u,pitch:c,roll:n.roll},convert:!1}),e._scene.globe.cullEnabled=h,n.frustum.aspectRatio=r,n.frustum.fov=o,n.frustum.near=a,n.frustum.far=s;var d=i._fboState.name;for(var f in e._cameraDepthBuffer[d]._isUpdate=!1,e._cameraDepthBuffer)if(e._cameraDepthBuffer[f]._isUpdate)return void(i.useLogDepth=y);if(e._textureFinish=!0,e._textureFinish){if(!e$2b(e._colorCommand))return;var p=e._colorCommand.shaderProgram.fragmentShaderSource,_=e._colorCommand.shaderProgram.vertexShaderSource,m={aPosition:0};e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=r$13.fromCache({name:"viewDome",context:t,vertexShaderSource:_,fragmentShaderSource:p,attributeLocations:m})}i.useLogDepth=y}}}function _0x3d0151(e,t){var i=_0x317e7e(e);_0x1e3827(e),_0x2ce344(e,t),_0x48ac6a(e,t,i.vertexPackage,i.indexPackage)}function _0x317e7e(e){return{vertexPackage:_0x53e7fe(129,129,1,e._startAngle,e._endAngle,e._isClosed),indexPackage:_0x897896(129,129,e._startAngle,e._endAngle,e._isClosed)}}function _0x53e7fe(e,t,i,n,r,o){var a=e,s=t,l=(r-n)*e$2a.RADIANS_PER_DEGREE/s,u=Math.PI/(2*a),c=0,h=0,d=!1;o&&(0!=n||360!=r)&&(d=!0);for(var f=0,p=d?(e+1)*t+1:(e+1)*t,_=S$12.createTypedArray(S$12.FLOAT,3*p),m=0;m<s;m++){h=m*l+n*e$2a.RADIANS_PER_DEGREE;for(var g=0;g<=a;g++){c=g*u;var x=i*Math.sin(c)*Math.cos(h),v=i*Math.sin(c)*Math.sin(h),y=i*Math.cos(c);_[f++]=v,_[f++]=x,_[f++]=y}}return d&&(_[f++]=0,_[f++]=0,_[f++]=0),_}function _0x897896(e,t,i,n,r){for(var o=[],a=0==i&&360==n?t:t-1,s=0;s<e;s++)for(var l=0;l<a;l++){var u=s+l*(e+1),c=u+1,h=l==t-1?s+1:u+e+2;o.push(u),o.push(c),o.push(h),o.push(u),o.push(h),o.push(h-1)}if(r&&(0!=i||360!=n)){var d=(e+1)*t,f=a*(e+1);for(s=0;s<e;s++)o.push(s),o.push(s+1),o.push(d),o.push(s+f+1),o.push(s+f),o.push(d)}for(var p=0,_=S$12.createTypedArray(S$12.UNSIGNED_SHORT,o.length),m=0;m<o.length;m++)_[p++]=o[m];return _}function _0x1e3827(e){if(e._scene.mode===C$13.SCENE3D){var t=o$1p.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]),i=new i$15(0,0,0);m$17.headingPitchRollToFixedFrame(t,i,t$13.WGS84,m$17.eastNorthUpToFixedFrame,e._worldMatrix)}else if(e._viewPosition[0]>180||e._viewPosition[0]<-180||e._viewPosition[1]>180||e._viewPosition[1]<-180)layer._position=new o$1p(layer.lon,layer.lat,height);else{var n=e._scene._frameState.camera._projection,r=o$1p.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]),o=n.ellipsoid.cartesianToCartographic(r);r=n.project(o),p$1d.fromTranslation(r,e._worldMatrix),p$1d.multiply(_0x1fc643,e._worldMatrix,e._worldMatrix)}o$1p.clone(o$1p.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,i$1c.transform(e._boundingSphere,e._worldMatrix,e._boundingSphere)}function _0x2ce344(e,t){if(e._isRecreateTexture){var i=e._frameState;_0x311e1a(e),e._frameState=i;for(var n=0;n<5;n++){var r=new s$T(t);r.environmentVisible.isObjectVisible=!0,r.environmentVisible.isGlobalVisible=!0,r._visibleViewport=e._visibleViewport;var o=e._cameraNames[n];e._cameraDepthBuffer[o]=r,e._frameState._framebufferList[o]=e._cameraDepthBuffer[o],e._renderTextureMatrix[o]=new p$1d,e._texWorldViewMatrix[o]=new p$1d,e._texPrjMatrix[o]=new p$1d,e._dirRadian[o]=90*n,e._dPitch[o]=4==n?90:0}e._isRecreateTexture=!1}}function _0x48ac6a(e,t,i,n){var r=t$Y.createVertexBuffer({context:t,typedArray:i,usage:A$19.STATIC_DRAW}),o=[],a={aPosition:0};o.push({name:"aPosition",index:a.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var s=t$Y.createIndexBuffer({context:t,typedArray:n,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});e._colorCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!1}),e._colorCommand.vertexArray=new c$12({context:t,attributes:o,indexBuffer:s});var l=new s$U({name:"ViewDomeVp",sources:[_0x69adc8]}),u=new s$U({name:"ViewDomeFp",sources:[_0xefb578]});e._colorCommand.shaderProgram=r$13.fromCache({name:"viewDome",context:t,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:a}),e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),e._colorCommand.uniformMap={uVisibleAreaColor:function(){return e._visibleAreaColor},uHiddenAreaColor:function(){return e._hiddenAreaColor},uTexWorldViewProjMatrix0:function(){return e._renderTextureMatrix[e._cameraNames[0]]},uTexWorldViewProjMatrix1:function(){return e._renderTextureMatrix[e._cameraNames[1]]},uTexWorldViewProjMatrix2:function(){return e._renderTextureMatrix[e._cameraNames[2]]},uTexWorldViewProjMatrix3:function(){return e._renderTextureMatrix[e._cameraNames[3]]},uTexWorldViewProjMatrix4:function(){return e._renderTextureMatrix[e._cameraNames[4]]},uTexWorldViewMatrix0:function(){return e._texWorldViewMatrix[e._cameraNames[0]]},uTexWorldViewMatrix1:function(){return e._texWorldViewMatrix[e._cameraNames[1]]},uTexWorldViewMatrix2:function(){return e._texWorldViewMatrix[e._cameraNames[2]]},uTexWorldViewMatrix3:function(){return e._texWorldViewMatrix[e._cameraNames[3]]},uTexWorldViewMatrix4:function(){return e._texWorldViewMatrix[e._cameraNames[4]]},uTexProjMatrix0:function(){return e._texPrjMatrix[e._cameraNames[0]]},uTexProjMatrix1:function(){return e._texPrjMatrix[e._cameraNames[1]]},uTexProjMatrix2:function(){return e._texPrjMatrix[e._cameraNames[2]]},uTexProjMatrix3:function(){return e._texPrjMatrix[e._cameraNames[3]]},uTexProjMatrix4:function(){return e._texPrjMatrix[e._cameraNames[4]]},uDepthMap0:function(){return e._cameraDepthBuffer[e._cameraNames[0]].depthTexture},uDepthMap1:function(){return e._cameraDepthBuffer[e._cameraNames[1]].depthTexture},uDepthMap2:function(){return e._cameraDepthBuffer[e._cameraNames[2]].depthTexture},uDepthMap3:function(){return e._cameraDepthBuffer[e._cameraNames[3]].depthTexture},uDepthMap4:function(){return e._cameraDepthBuffer[e._cameraNames[4]].depthTexture},uRadius:function(){return e._distance},uDomeType:function(){return e._domeType}}}Object.defineProperties(_0x4f36f0.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._updateCamera=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$16("the distance is greater than 0.0");this._distance=e,this._updateCamera=!0}},startAngle:{get:function(){return this._startAngle},set:function(e){this._startAngle=e,this._initialize=!1,this._updateCamera=!0}},endAngle:{get:function(){return this._endAngle},set:function(e){this._endAngle=e,this._initialize=!1,this._updateCamera=!0}},visibleAreaColor:{get:function(){var e=new e$1U;return e.red=this._visibleAreaColor.x,e.green=this._visibleAreaColor.y,e.blue=this._visibleAreaColor.z,e.alpha=this._visibleAreaColor.w,e},set:function(e){this._visibleAreaColor.x=e.red,this._visibleAreaColor.y=e.green,this._visibleAreaColor.z=e.blue,this._visibleAreaColor.w=e.alpha}},hiddenAreaColor:{get:function(){var e=new e$1U;return e.red=this._hiddenAreaColor.x,e.green=this._hiddenAreaColor.y,e.blue=this._hiddenAreaColor.z,e.alpha=this._hiddenAreaColor.w,e},set:function(e){this._hiddenAreaColor.x=e.red,this._hiddenAreaColor.y=e.green,this._hiddenAreaColor.z=e.blue,this._hiddenAreaColor.w=e.alpha}},domeType:{get:function(){return this._domeType},set:function(e){this._domeType=e}},isClosed:{get:function(){return this._isClosed},set:function(e){this._isClosed=e,this._initialize=!1,this._updateCamera=!0,this._isRecreateTexture=!0}}}),_0x4f36f0.prototype.destroy=function(){return _0x311e1a(this),_0x2153f5(this),this._scene.farToNearRatio=1e3,this._scene._analyst3D.remove(this._name,!0),i$10(this)},_0x4f36f0.prototype.build=function(){if(LicenseChecker.LICENSECHECKER.verify("ViewDome"),""===this._name&&!this._checking){this._name="ViewDome"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene";for(var e=0;e<5;e++)this._cameraNames.push(this._name+"_camera"+e);this._scene._analyst3D.add(this)}},_0x4f36f0.prototype.update=function(e,t,i){"water"===t._fboState.name||t.passes.pick||t._fboState.enabled||(t.camera.bReflect||(this._initialize||(this._frameState=t,_0x3d0151(this,e),this._initialize=!0,this._textureFinish=!1),this._updateCamera&&(this._frameState=t,this._isRecreateTexture&&(_0x2ce344(this),this._isRecreateTexture=!1),_0x1b73b4(this,e,this._frameState),this._update=!1,this._updateCamera=!1),e$2b(this._colorCommand)&&this._textureFinish&&i.push(this._colorCommand)))},_0x4f36f0.prototype.clear=function(){this._scene._analyst3D.remove(this._name,!1)};var _0x1fd1c2=(_0xd64465=!0,function(e,t){var i=_0xd64465?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd64465=!1,i}),_0x16a845=_0x1fd1c2(void 0,(function(){return _0x16a845.toString().search("(((.+)+)+)+$").toString().constructor(_0x16a845).search("(((.+)+)+)+$")})),_0xd64465;_0x16a845();var _0x2818b6="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\nuniform mat4 uRenderTextureMatrix;\nuniform vec2 uTexture1_size;\nuniform sampler2D uTexture1;\nuniform sampler2D uGlobalDepthTexture;\nuniform vec2 uGlobeTextureSize;\nvarying vec4 vClip_pos;\n\nfloat getDepth(in vec4 depth)\n{\n float z_window = czm_unpackDepth(depth);\n#ifdef WEBGPU\n\treturn z_window;\n#else\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n#endif\n}\n\nfloat getDepthFromShadowMap(in vec2 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(uTexture1, t00));\n\tfloat z10 = getDepth(texture2D(uTexture1, t01));\n\tfloat z01 = getDepth(texture2D(uTexture1, t10));\n\tfloat z11 = getDepth(texture2D(uTexture1, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n\n#ifdef CLIPPOLYGON\nuniform sampler2D uPolygonTexture;\nuniform mat4 uPolygonTextureMatrix;\nuniform float uPolygonMode;\nbool isClipValid(vec2 texcoord)\n{\n bool keepInside = (uPolygonMode > 1.5);\n if(keepInside)\n {\n return texture2D(uPolygonTexture, texcoord).r > 0.5;\n }\n else\n {\n return texture2D(uPolygonTexture, texcoord).r < 0.5;\n }\n}\n#endif\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n// #ifdef LOG_DEPTH\n// depthTexCoord.x = depthTexCoord.x * czm_viewport.z / uGlobeTextureSize.x + czm_viewport.x / uGlobeTextureSize.x;\n// depthTexCoord.y = depthTexCoord.y * czm_viewport.w / uGlobeTextureSize.y + czm_viewport.y / uGlobeTextureSize.y;\n// #endif\n\tfloat sceneDepth = czm_unpackDepth(texture2D(uGlobalDepthTexture, depthTexCoord.xy));\n// #ifdef LOG_DEPTH\n// sceneDepth = czm_reverseLogDepth(sceneDepth);\n// #endif\n\n#ifndef WEBGPU\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n#endif\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\t//vec4 viewPos = czm_inverseProjection * pos;\n\tvec4 renderTextureCoord = uRenderTextureMatrix * pos;\n\tvec4 ndcInDepthScene = renderTextureCoord / renderTextureCoord.w;\n\tvec2 texCoord = ndcInDepthScene.xy * 0.5 + 0.5;\n\tfloat depth = getDepthFromShadowMap(texCoord);\n\n\tfloat dxc = abs(dFdx(ndcInDepthScene.z));\n\tfloat dyc = abs(dFdy(ndcInDepthScene.z));\n\tfloat dF = max(dxc, dyc) * 3.0;\n\tfloat bias = 1.0e-6 + dF;\n#ifdef WEBGPU\n\tbias *= 2.0;\n#endif\n\tfloat c = float(depth + bias < ndcInDepthScene.z);\n\tvec4 resultColor = mix(uVisibleAreaColor, uHiddenAreaColor, vec4(c));\n\tif(resultColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIPPOLYGON\n vec4 polygonTextureCoord = uPolygonTextureMatrix * pos;\n\tvec4 texCoordPolygon = polygonTextureCoord / polygonTextureCoord.w;\n\ttexCoordPolygon.xyz = texCoordPolygon.xyz * 0.5 + 0.5;\n\tif(texCoordPolygon.x < 0.0 || texCoordPolygon.x > 1.0 || texCoordPolygon.y < 0.0 || texCoordPolygon.y > 1.0)\n\t{\n\t\tdiscard;\n }\n\tif(!isClipValid(texCoordPolygon.xy))\n {\n discard;\n }\n#endif\n\tgl_FragColor = resultColor;\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x3025ab=(_0x3af55b=!0,function(e,t){var i=_0x3af55b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3af55b=!1,i}),_0x59c650=_0x3025ab(void 0,(function(){return _0x59c650.toString().search("(((.+)+)+)+$").toString().constructor(_0x59c650).search("(((.+)+)+)+$")})),_0x3af55b;_0x59c650();var _0xe651ea="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\nuniform vec2 uTexture1_size;\n#if TEXTURE_UNITS > 0\nuniform sampler2D uTextures[TEXTURE_UNITS];\nuniform mat4 uRenderTextureMatrixs[TEXTURE_UNITS];\n#endif\nuniform sampler2D uGlobalDepthTexture;\nuniform vec2 uGlobeTextureSize;\nuniform int textureCount;\nvarying vec4 vClip_pos;\n\nfloat getDepth(in vec4 depth)\n{\n float z_window = czm_unpackDepth(depth);\n#ifdef WEBGPU\n\treturn z_window;\n#else\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n#endif\n}\n\n#define inline\nfloat getDepthFromShadowMap(in sampler2D viewShedTexture, in vec4 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(viewShedTexture, t00));\n\tfloat z10 = getDepth(texture2D(viewShedTexture, t01));\n\tfloat z01 = getDepth(texture2D(viewShedTexture, t10));\n\tfloat z11 = getDepth(texture2D(viewShedTexture, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n\n#define inline\nfloat isVisibleForOneViewShed(in sampler2D viewShedTexture, in vec4 viewPos, in mat4 renderTextureMatrix1)\n{\n vec4 renderTextureCoord = renderTextureMatrix1 * viewPos;\n\tvec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n\ttexCoord.xyz = texCoord.xyz * 0.5 + 0.5;\n\n if (texCoord.x<0.0 || texCoord.x>1.0\n || texCoord.y<0.0 || texCoord.y>1.0)\n {\n return 1.0;\n }\n\n float depth = getDepthFromShadowMap(viewShedTexture, texCoord);\n depth = depth * 0.5 + 0.5;\n float dxc = abs(dFdx(texCoord.z));\n float dyc = abs(dFdy(texCoord.z));\n float dF = max(dxc, dyc) * 3.0;\n float bias = 1.0e-6 + dF;\n#ifdef WEBGPU\n\tbias *= 2.0;\n#endif\n float c = float(depth+bias < texCoord.z);\n return c;\n}\n\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n\tdepthTexCoord.x = depthTexCoord.x * czm_viewport.z / uGlobeTextureSize.x + czm_viewport.x / uGlobeTextureSize.x;\n\tdepthTexCoord.y = depthTexCoord.y * czm_viewport.w / uGlobeTextureSize.y + czm_viewport.y / uGlobeTextureSize.y;\n\tfloat sceneDepth = czm_unpackDepth(texture2D(uGlobalDepthTexture, depthTexCoord.xy));\n // sceneDepth = czm_reverseLogDepth(sceneDepth);\n#ifndef WEBGPU\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n#endif\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\t//vec4 viewPos = czm_inverseProjection * pos;\n float c = isVisibleForMultiViewShed(pos);\n\tvec4 resultColor = mix(uVisibleAreaColor, uHiddenAreaColor, vec4(c));\n\tif(resultColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = resultColor;\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x435913=(_0x14feba=!0,function(e,t){var i=_0x14feba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x14feba=!1,i}),_0x5efb2a=_0x435913(void 0,(function(){return _0x5efb2a.toString().search("(((.+)+)+)+$").toString().constructor(_0x5efb2a).search("(((.+)+)+)+$")})),_0x14feba;function _0x12cc1f(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._globalDepthBuffer=void 0,this._cameraDepthBuffer=void 0,this._clearStencilCommand=new t$X({stencil:0}),this._clearStencilCommand.pass=Le$s.ANALYSIS,this._lineCommand=void 0,this._stencilCommand=void 0,this._colorCommand=void 0,this._boundingSphere=new i$1c,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._horizontalFov=90,this._verticalFov=60,this._distance=200,this._visibleAreaColor=new e$29(0,1,0,.5),this._hiddenAreaColor=new e$29(1,0,0,.5),this._hintLineColor=new e$29(1,1,1,1),this._segmentCount=20,this._invertViewMatrix=new p$1d,this._viewProjMatrix=new p$1d,this._matProj=new p$1d,this._renderTextureMatrix=new p$1d,this._update=!0,this._id=0,this._name="",this._sceneName="",this._cameraName="",this._checking=!1,this._visibleViewport=4095,this._targetPoints=[],this._multiNames=[],this._isUpdateCommand=!1,this._isShowLine=!0,this._polygonTexture=void 0,this._polygonRegions=new e$1N,this._polygonTextureMatrix=new p$1d,this._polygonViewProjMatrix=new p$1d,this._polygonUpdate=!1,this._polygonMode=R$J.KeepInside,this._attributeLocations={aPosition:0}}function _0x4e4eb7(e){e$2b(e._stencilCommand)&&(e._stencilCommand.vertexArray=e._stencilCommand.vertexArray&&e._stencilCommand.vertexArray.destroy(),e._stencilCommand.shaderProgram=e._stencilCommand.shaderProgram&&e._stencilCommand.shaderProgram.destroy(),e._stencilCommand=void 0),e$2b(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),e$2b(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0)}function _0x1ade4c(e,t,i){var n=e._horizontalFov*e$2a.RADIANS_PER_DEGREE,r=e._verticalFov*e$2a.RADIANS_PER_DEGREE,o=Math.tan(.5*n)/Math.tan(.5*r);e._distance;var a=Math.max(e._distance,10),s=e._direction*e$2a.RADIANS_PER_DEGREE,l=e._pitch*e$2a.RADIANS_PER_DEGREE,u=o$1p.fromDegreesArrayHeights(e._viewPosition)[0],c=i.camera,h=c.frustum.aspectRatio,d=c.frustum.fov,f=c.frustum.near,p=c.frustum.far,_=new o$1p,m=c.heading,g=c.pitch,x=p$1d.clone(c.transform,x);o$1p.clone(c.position,_),e._cameraDepthBuffer.isUpdate=!0;var v=i.useLogDepth,y=e._scene.globe.depthTestAgainstTerrain;e._cameraDepthBuffer._beginFunc=function(t){t.useLogDepth=!1,e._scene.globe.depthTestAgainstTerrain=!0,h=c.frustum.aspectRatio,d=c.frustum.fov,f=c.frustum.near,p=c.frustum.far,m=c.heading,g=c.pitch,x=p$1d.clone(c.transform,x),c._setTransform(p$1d.IDENTITY),o$1p.clone(c.position,_),c.frustum.aspectRatio=o,c.frustum.fov=n,c.frustum.near=1,c.frustum.far=a+100,c.setView({destination:u,orientation:{heading:s,pitch:l,roll:c.roll}}),p$1d.multiply(c.frustum.projectionMatrix,c.viewMatrix,e._viewProjMatrix),p$1d.clone(c.inverseViewMatrix,e._invertViewMatrix),p$1d.clone(c.frustum.projectionMatrix,e._matProj),o$1p.clone(o$1p.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,i$1c.transform(e._boundingSphere,e._invertViewMatrix,e._boundingSphere)},e._cameraDepthBuffer._endFunc=function(t){c.setView({destination:_,orientation:{heading:m,pitch:g,roll:c.roll},convert:!1}),c.frustum.aspectRatio=h,c.frustum.fov=d,c.frustum.near=f,c.frustum.far=p,c._setTransform(x),e._cameraDepthBuffer.isUpdate=!1,t.useLogDepth=v,e._scene.globe.depthTestAgainstTerrain=y},e$2b(e._globalDepthBuffer)&&(e._globalDepthBuffer.isUpdate=!0,e._globalDepthBuffer._beginFunc=function(t){e._scene.globe.depthTestAgainstTerrain=!0,t.useLogDepth=!1;var i=o$1p.distance(c.positionWC,e._boundingSphere.center),n=i<e._boundingSphere.radius?2:i-e._boundingSphere.radius,r=i+e._boundingSphere.radius;c.frustum.near=n,c.frustum.far=r,e._globalDepthProjMatrix=c.frustum.projectionMatrix,e._globalDepthProjMatrixInv=p$1d.inverse(e._globalDepthProjMatrix,new p$1d);var o=p$1d.multiply(c.inverseViewMatrix,e._globalDepthProjMatrixInv,new p$1d);p$1d.multiply(e._viewProjMatrix,o,e._renderTextureMatrix),e$2b(e._polygonViewProjMatrix)&&p$1d.multiply(e._polygonViewProjMatrix,o,e._polygonTextureMatrix)},e._globalDepthBuffer._endFunc=function(t){t.useLogDepth=v,c.frustum.near=f,c.frustum.far=p,e._scene.globe.depthTestAgainstTerrain=y})}function _0x43984b(e,t,i){var n=(e._segmentCount+1)*(e._segmentCount+1)+1,r=S$12.createTypedArray(S$12.FLOAT,3*n),o=3,a=e._horizontalFov*e$2a.RADIANS_PER_DEGREE,s=e._verticalFov*e$2a.RADIANS_PER_DEGREE,l=(Math.tan(.5*a),Math.tan(.5*s));e._distance;var u=e._distance*l,c=Math.PI-.5*a,h=0,d=0,f=a/e._segmentCount;e._targetPoints.length=0;for(var p=0;p<e._segmentCount+1;p++){h=c+p*f;for(var _=u/(e._distance/Math.cos(h)),m=Math.atan(_),g=-m,x=2*m/e._segmentCount,v=new t$M,y=0;y<e._segmentCount+1;y++){d=g+y*x;var $=e._distance*Math.cos(d)*Math.sin(h),b=e._distance*Math.sin(d),T=e._distance*Math.cos(d)*Math.cos(h);r[o++]=$,r[o++]=b,r[o++]=T,v.add(new s$M($,b,T))}e._targetPoints.push(v)}e._targetPoints.reverse();var C=2*(4+5*e._segmentCount+2*e._segmentCount*3),S=e._segmentCount*e._segmentCount*3*2+3*e._segmentCount*4,w=S$12.createTypedArray(S$12.UNSIGNED_SHORT,C),E=S$12.createTypedArray(S$12.UNSIGNED_SHORT,S),P=0;for(p=0;p<e._segmentCount;p++)for(y=0;y<e._segmentCount;y++)E[P++]=1+p+y*(e._segmentCount+1),E[P++]=1+p+1+y*(e._segmentCount+1),E[P++]=1+p+(y+1)*(e._segmentCount+1),E[P++]=1+p+1+y*(e._segmentCount+1),E[P++]=1+p+1+(y+1)*(e._segmentCount+1),E[P++]=1+p+(y+1)*(e._segmentCount+1);for(p=0;p<e._segmentCount;p++)E[P++]=p+1+1,E[P++]=p+1,E[P++]=0,E[P++]=0,E[P++]=p+e._segmentCount*(e._segmentCount+1)+1,E[P++]=p+1+e._segmentCount*(e._segmentCount+1)+1;for(p=0;p<e._segmentCount;p++)E[P++]=0,E[P++]=p*(e._segmentCount+1)+1,E[P++]=(p+1)*(e._segmentCount+1)+1,E[P++]=e._segmentCount+(p+1)*(e._segmentCount+1)+1,E[P++]=e._segmentCount+p*(e._segmentCount+1)+1,E[P++]=0;P=0,w[P++]=0,w[P++]=1,w[P++]=0,w[P++]=e._segmentCount+1,w[P++]=0,w[P++]=e._segmentCount*(e._segmentCount+1)+1,w[P++]=0,w[P++]=(e._segmentCount+1)*(e._segmentCount+1);for(p=0;p<5;p++)for(y=0;y<e._segmentCount;y++)w[P++]=1+y+5*(e._segmentCount+1)*p,w[P++]=1+(y+1)+5*(e._segmentCount+1)*p;for(p=0;p<5;p++)for(y=0;y<e._segmentCount;y++)w[P++]=1+(e._segmentCount+1)*y+5*p,w[P++]=1+(e._segmentCount+1)*(y+1)+5*p;var A=t$Y.createVertexBuffer({context:t,typedArray:r,usage:A$19.STATIC_DRAW}),L=[],M=e._attributeLocations;L.push({name:"aPosition",index:M.aPosition,vertexBuffer:A,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var R=t$Y.createIndexBuffer({context:t,typedArray:w,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),I=t$Y.createIndexBuffer({context:t,typedArray:E,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});e._lineCommand=new i$_({primitiveType:W$18.LINES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!0}),e._lineCommand.vertexArray=new c$12({context:t,attributes:L,indexBuffer:R}),e._lineCommand.shaderProgram=r$13.fromCache({name:"viewshed_lineCommand_SP",context:t,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:M}),e._lineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var O=[];for(p=0;p<6;p++)O[p]=new e$29(0,0,0,0);e._lineCommand.uniformMap={uDiffuseColor:function(){return e._hintLineColor},clip_mode:function(){return 0},clip_planes:function(){return O},clip_line_color:function(){return e$29.UNIT_W}},e._stencilCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!0}),e._stencilCommand.vertexArray=new c$12({context:t,attributes:L,indexBuffer:I}),e._stencilCommand.shaderProgram=r$13.fromCache({name:"viewshed_stencilCommand_SP",context:t,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:M}),e._stencilCommand.renderState=d$1m.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0,func:re$E.GREATER},stencilTest:{enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.INCREMENT_WRAP},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:0,mask:65535}}),e._stencilCommand.uniformMap={uDiffuseColor:function(){return e$29.UNIT_W},clip_mode:function(){return 0},clip_planes:function(){return O},clip_line_color:function(){return e$29.UNIT_W}},e._colorCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!0}),e._colorCommand.vertexArray=new c$12({context:t,attributes:L,indexBuffer:I});var D=void 0,B=new s$U({name:"ViewShedAnalysisVp",sources:[_0x2f8522]});if(e._multiNames.length>1){let t=_0xe651ea.indexOf("void main");var N="#define inline\n float isVisibleForMultiViewShed(vec4 viewPos) {\n float c = 1.0;\n #if TEXTURE_UNITS > 0\n";for(let t=0;t<e._multiNames.length;t++)N+=" c = isVisibleForOneViewShed(uTextures["+t+"], \n viewPos, uRenderTextureMatrixs["+t+"]);\n if(c == 0.0 || textureCount == 1)\n {\n return c;\n }\n";N+=" #endif\n return c;\n }",D=new s$U({sources:[_0xe651ea.slice(0,t)+N+_0xe651ea.slice(t)]})}else D=new s$U({sources:[_0x2818b6]});e._colorCommand.shaderProgram=r$13.fromCache({name:"viewshed_colorCommand_SP",context:t,vertexShaderSource:B,fragmentShaderSource:D,attributeLocations:M}),e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$X.NOT_EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},backFunction:m$X.NOT_EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:0,mask:65535},blending:Ee$r.ALPHA_BLEND}),e._multiNames.length<=1?(e._colorCommand.uniformMap={uVisibleAreaColor:function(){return e._visibleAreaColor},uHiddenAreaColor:function(){return e._hiddenAreaColor},uRenderTextureMatrix:function(){return e._renderTextureMatrix},uTexture1_size:function(){var t=e._cameraDepthBuffer.depthTexture;return new o$1o(t.width,t.height)},uTexture1:function(){return e._cameraDepthBuffer.depthTexture},uGlobalDepthTexture:function(){return e._globalDepthBuffer.depthTexture},uGlobeTextureSize:function(){return new o$1o(e._globalDepthBuffer.depthTexture.width,e._globalDepthBuffer.depthTexture.height)},uPolygonTexture:function(){return e._polygonTexture},uPolygonMode:function(){return e._polygonMode},uPolygonTextureMatrix:function(){return e._polygonTextureMatrix}},e._colorCommand._isViewShed=!0):(D.defines.push("TEXTURE_UNITS "+e._multiNames.length),e._isUpdateCommand=!0)}function _0x1ba372(e,t,i,n){if(e$2b(i)&&!e$2b(i._command)){var r=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix});i._command=r;var o={position:0};r.vertexArray=c$12.fromGeometry({context:t,geometry:i._geometry,attributeLocations:o,bufferUsage:A$19.STATIC_DRAW,interleave:!0});var a=new s$U({sources:["attribute vec4 position;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n}\n"]}),s=new s$U({sources:["void main()\n{\n gl_FragColor = vec4(1.0);\n}\n"]});r.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:o}),r.framebuffer=new t$W({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=d$1m.fromCache({cull:{enabled:!1}})}}function _0x3541ed(e,t,i){if(e._polygonUpdate&&0!==e._polygonRegions.length){e._polygonUpdate=!1;var n=new t$X({color:new e$1U(0,0,0,0),depth:1});n.framebuffer=new t$W({context:t,colorTextures:[e._polygonTexture],destroyAttachments:!1}),n.renderState=d$1m.fromCache(),n.execute(t);for(var r=0;r<e._polygonRegions.values.length;r++){var o=e._polygonRegions.values[r];_0x1ba372(e,t,o,e._polygonTexture),o._command.execute(t)}n.framebuffer.destroy()}}_0x5efb2a(),Object.defineProperties(_0x12cc1f.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},horizontalFov:{get:function(){return this._horizontalFov},set:function(e){this._horizontalFov=e,this._update=!0}},verticalFov:{get:function(){return this._verticalFov},set:function(e){this._verticalFov=e,this._update=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$16("the distance is greater than 0.0");this._distance=e,this._update=!0}},visibleAreaColor:{get:function(){var e=new e$1U;return e.red=this._visibleAreaColor.x,e.green=this._visibleAreaColor.y,e.blue=this._visibleAreaColor.z,e.alpha=this._visibleAreaColor.w,e},set:function(e){this._visibleAreaColor.x=e.red,this._visibleAreaColor.y=e.green,this._visibleAreaColor.z=e.blue,this._visibleAreaColor.w=e.alpha}},hiddenAreaColor:{get:function(){var e=new e$1U;return e.red=this._hiddenAreaColor.x,e.green=this._hiddenAreaColor.y,e.blue=this._hiddenAreaColor.z,e.alpha=this._hiddenAreaColor.w,e},set:function(e){this._hiddenAreaColor.x=e.red,this._hiddenAreaColor.y=e.green,this._hiddenAreaColor.z=e.blue,this._hiddenAreaColor.w=e.alpha}},hintLineColor:{get:function(){var e=new e$1U;return e.red=this._hintLineColor.x,e.green=this._hintLineColor.y,e.blue=this._hintLineColor.z,e.alpha=this._hintLineColor.w,e},set:function(e){this._hintLineColor.x=e.red,this._hintLineColor.y=e.green,this._hintLineColor.z=e.blue,this._hintLineColor.w=e.alpha}},isShowLine:{get:function(){return this._isShowLine},set:function(e){this._isShowLine=e}}}),_0x12cc1f.prototype.destroy=function(){return e$2b(this._frameState)&&(e$2b(this._globalDepthBuffer)&&delete this._frameState._framebufferList[this._sceneName],e$2b(this._cameraDepthBuffer)&&delete this._frameState._framebufferList[this._cameraName],this._frameState=void 0),this._globalDepthBuffer=this._globalDepthBuffer&&this._globalDepthBuffer.destroy(),this._cameraDepthBuffer=this._cameraDepthBuffer&&this._cameraDepthBuffer.destroy(),_0x4e4eb7(this),this._clearStencilCommand=void 0,this._scene.farToNearRatio=1e3,this._scene._analyst3D.remove(this._name,!0),e$2b(this._polygonTexture)&&(this._polygonTexture.destroy(),this._polygonTexture=null),i$10(this)},_0x12cc1f.prototype.clear=function(){this._scene._analyst3D.remove(this._name,!1)},_0x12cc1f.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("ViewShed3D"),""===this._name&&!this._checking&&(this._name="viewshed3d"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_global",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},_0x12cc1f.prototype.setDistDirByPoint=function(e){if(e[0]===this._viewPosition[0]&&e[1]===this._viewPosition[1]&&e[2]===this._viewPosition[2])throw new t$16("the position is [longitude, latitude ,height] and is not equals viewPosition");var t,i,n=this._scene._frameState.camera,r=n._projection;if(this._scene.mode===C$13.SCENE3D)t=o$1p.fromDegreesArrayHeights(e)[0],i=o$1p.fromDegreesArrayHeights(this._viewPosition)[0];else{var o=a$18.fromDegrees(e[0],e[1],e[2]);t=r.project(o,new o$1p);var a=a$18.fromDegrees(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]);i=r.project(a,new o$1p)}var s=new o$1p;o$1p.subtract(t,i,s);var l=o$1p.magnitude(s);o$1p.normalize(s,s),this.distance=l;var u=n.heading,c=n.pitch,h=n.roll,d=new o$1p;o$1p.clone(n.position,d);var f=s.clone(),p=i.clone();p=o$1p.normalize(p,p),Math.abs(o$1p.dot(p,f))>=1&&(p=Math.abs(o$1p.dot(f,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,p):o$1p.clone(o$1p.UNIT_Z,p));var _=new o$1p;o$1p.cross(p,f,_),_=o$1p.normalize(_,_),o$1p.cross(f,_,p),p=o$1p.normalize(p,p),n.setView({destination:i,orientation:{direction:f,up:p},convert:!1}),this.direction=n.heading*e$2a.DEGREES_PER_RADIAN,this.pitch=n.pitch*e$2a.DEGREES_PER_RADIAN,n.setView({destination:d,orientation:{heading:u,pitch:c,roll:h},convert:!1})},_0x12cc1f.prototype.update=function(e,t,i){if("normal"===t._fboState.name&&!t.passes.pick){if(t._fboState.enabled&&(t._fboState.name===this._sceneName||t._fboState.name===this._cameraName))return void(t._fboState.name===this._sceneName&&e$2b(this._stencilCommand)&&i.push(this._stencilCommand));if(!t.camera.bReflect&&(this._update&&(this._frameState=t,e$2b(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new s$T(e),this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),e$2b(this._globalDepthBuffer)||(this._globalDepthBuffer=new s$T(e),this._globalDepthBuffer.environmentVisible.isObjectVisible=!0,this._globalDepthBuffer.environmentVisible.isGlobalVisible=!0,this._globalDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._sceneName]=this._globalDepthBuffer),this._update=!1,_0x4e4eb7(this),_0x1ade4c(this,e,t),_0x43984b(this,e)),e$2b(this._cameraDepthBuffer.framebuffer))){var n=i.pop();!e$2b(n)||(e$2b(this._clearStencilCommand)&&i.push(this._clearStencilCommand),e$2b(this._stencilCommand)&&i.push(this._stencilCommand),e$2b(this._colorCommand)&&i.push(this._colorCommand),e$2b(this._lineCommand)&&this._isShowLine&&i.push(this._lineCommand),i.push(n))}}},_0x12cc1f.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=1<<e,e$2b(this._cameraDepthBuffer)&&(this._cameraDepthBuffer._visibleViewport=this._visibleViewport)},_0x12cc1f.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},_0x12cc1f.prototype.getViewshedParameter=function(){for(var e=[],t=this._invertViewMatrix,i=0,n=this._targetPoints.length;i<n;i++){for(var r=this._targetPoints[i].pntArray,o=new t$M,a=0,s=r.length;a<s;a++){var l=this.getBarrierPoint(r[a]);if(e$2b(l))o.add(l);else{var u=p$1d.multiplyByPoint(t,r[a],new o$1p),c=a$18.fromCartesian(u),h=c.longitude*e$2a.DEGREES_PER_RADIAN,d=c.latitude*e$2a.DEGREES_PER_RADIAN;o.add(new s$M(h,d,c.height))}}e.push(o)}return{viewPosition:new s$M(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]),point3DList:e,distance:this._distance}};var _0x7ba2d1=new e$29(1/255,1/65025,1/160581375,1/4228250625);function _0x297b9b(e,t){for(var i=o$1p.fromDegreesArrayHeights(t),n=new z$_({polygonHierarchy:{positions:i},vertexFormat:{bitangent:!1,color:!1,normal:!1,position:!0,st:!1,tangent:!1},perPositionHeight:!0}),r=z$_.createGeometry(n),o=o$1p.fromDegreesArrayHeights(t),a=h$18.fromCartesianArray(o),s=[],l=1;l<i.length-1;l++)s.push(0),s.push(l),s.push(l+1);r.indices=s;var u=new p$1d;p$1d.inverse(e._invertViewMatrix,u),f$X.updateGeometry(r,t,u);var c=new f$X;return c._geometry=r,c._rectangle=a,c}function _0x286f69(e,t){if(e$2b(e._colorCommand)){var i=e._scene._context,n=e._colorCommand.shaderProgram.fragmentShaderSource,r=e._colorCommand.shaderProgram.vertexShaderSource,o=n.defines.indexOf("CLIPPOLYGON");t?o<0&&n.defines.push("CLIPPOLYGON"):o>=0&&n.defines.splice(o,1),e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=r$13.fromCache({context:i,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:e._attributeLocations})}}function m$L(e){if(e=u$_(e,{}),this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._rectangle=u$_(e.rectangle,h$18.MAX_VALUE),this._projection=new n$1b(this._ellipsoid),this._numberOfLevelZeroTilesX=u$_(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=u$_(e.numberOfLevelZeroTilesY,1),e.hasOwnProperty("tileInfo")&&(this._tileInfo=e.tileInfo),this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._beginLevel=0,this._suggest=void 0,e$2b(e.resolutions)){this._resolutions=e.resolutions;for(var t=0,i=6378137*Math.PI/this._tileWidth;i>this._resolutions[0];)i*=.5,t++;this._beginLevel=t-1,this._dataBounds=e.dataBounds,this._tileBounds=[];for(var n=this._dataBounds.east-this._tileInfo.origin.x,r=this._tileInfo.origin.y-this._dataBounds.south,o=this._dataBounds.west-this._tileInfo.origin.x,a=this._tileInfo.origin.y-this._dataBounds.north,s=0;s<this._resolutions.length;s++){var l=this._resolutions[s]*this._tileInfo.cols,u=this._resolutions[s]*this._tileInfo.rows,c=Math.floor(o/l),h=Math.floor(a/u),d=Math.floor(n/l),f=Math.floor(r/u);this._tileBounds.push(new h$18(c,f,d,h))}}}function n$C(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}_0x12cc1f.prototype.getBarrierPoint=function(e){var t=new e$29(e.x,e.y,e.z,1);if(p$1d.multiplyByVector(this._matProj,t,t),e$29.divideByScalar(t,t.w,t),!(t.x>1||t.x<-1||t.y>1||t.y<-1)){var i=this._scene.context,n=i.drawingBufferWidth,r=i.drawingBufferHeight,o=(.5*t.x+.5)*n-.5,a=(.5*t.y+.5)*r-.5;if(!(o<0||a<0)){for(var s=Math.floor(o),l=o-s,u=Math.floor(a),c=a-u,h=i.readPixels({framebuffer:this._cameraDepthBuffer.framebuffer,x:s,y:u,width:2,height:2}),d=new e$29,f=[],p=0;p<4;p++){var _=e$29.unpack(h,4*p,d);if(f[p]=2*e$29.dot(_,_0x7ba2d1)-1,!(f[p]<1&&f[p]>0))return}var m=(1-c)*((1-l)*f[0]+l*f[1])+c*((1-l)*f[2]+l*f[3]);if(t.z-m>1e-6){var g=new p$1d;p$1d.inverse(this._viewProjMatrix,g),t.z=m,p$1d.multiplyByVector(g,t,t),e$29.divideByScalar(t,t.w,t);var x=a$18.fromCartesian(t);return new s$M(x.longitude*e$2a.DEGREES_PER_RADIAN,x.latitude*e$2a.DEGREES_PER_RADIAN,x.height)}}}},_0x12cc1f.prototype._setMultiViewShedNames=function(e){if(this._multiNames.length!=e.length)return this._update=!0,void(this._multiNames=e);for(var t=0;t<this._multiNames.length;t++)if(this._multiNames[t]!=e[t])return this._update=!0,void(this._multiNames=e)},_0x12cc1f.prototype.addClipRegion=function(e){var t=e.name,i=e.position;if(!e$2b(t)||!e$2b(i))return!1;if(e$2b(this._polygonRegions.get(t)))return!1;var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;e$2b(this._polygonTexture)||(this._polygonTexture=new t$V({context:this._scene._context,width:n,height:r}));var o=_0x297b9b(this,i);this._polygonRegions.set(t,o),this._polygonUpdate=!0;var a=this._frameState.camera,s=o._rectangle,l=new o$1p,u=a.heading,c=a.pitch,h=a._positionCartographic.height;o$1p.clone(a.position,l),a.setView({destination:o$1p.fromRadians(s.west+.5*s.width,s.south+.5*s.height,h+1e3)}),p$1d.multiply(a.frustum.projectionMatrix,a.viewMatrix,this._polygonViewProjMatrix),this._scene._context.uniformState.update(this._frameState),_0x3541ed(this,this._scene._context,this._frameState),_0x286f69(this,!0),a.setView({destination:l,orientation:{heading:u,pitch:c,roll:a.roll}})},_0x12cc1f.prototype.removeClipRegion=function(e){return!!this._polygonRegions.remove(e)&&(this._polygonUpdate=!0,0===this._polygonRegions.values.length&&_0x286f69(this,!1),!0)},_0x12cc1f.prototype.removeAllClipRegion=function(){for(var e=0;e<this._polygonRegions.values.length;e++)this._polygonRegions.values[e].destroy(),this._polygonRegions.values[e]=null;this._polygonRegions.removeAll(),this._polygonUpdate=!0,_0x286f69(this,!1)},_0x12cc1f.prototype.setClipMode=function(e){this._polygonMode=e},Object.defineProperties(m$L.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),m$L.prototype.getNumberOfXTilesAtLevel=function(e){if(e$2b(this._resolutions)){if(e<this._beginLevel)return this._numberOfLevelZeroTilesX<<e;var t=this._dataBounds.east-this._tileInfo.origin.x,i=e$2a.clamp(e-this._beginLevel,0,this._resolutions.length-1),n=this._resolutions[i]*this._tileInfo.cols;return Math.ceil(t/n)}if(e$2b(this._tileInfo)){var r=this._tileInfo.lods.filter((function(t){return t.level===e})),o=e$2a.toDegrees(this._rectangle.east)-this._tileInfo.origin.x,a=r[0].resolution;return Math.ceil(o/(this._tileInfo.rows*a))}return this._numberOfLevelZeroTilesX<<e},m$L.prototype.getNumberOfYTilesAtLevel=function(e){if(e$2b(this._resolutions)){if(e<this._beginLevel)return this._numberOfLevelZeroTilesY<<e;var t=this._tileInfo.origin.y-this._dataBounds.south,i=e$2a.clamp(e-this._beginLevel,0,this._resolutions.length-1),n=this._resolutions[i]*this._tileInfo.rows;return Math.ceil(t/n)}if(e$2b(this._tileInfo)){var r=this._tileInfo.lods.filter((function(t){return t.level===e})),o=this._tileInfo.origin.y-e$2a.toDegrees(this._rectangle.south),a=r[0].resolution;return Math.ceil(o/(this._tileInfo.cols*a))}return this._numberOfLevelZeroTilesY<<e},m$L.prototype.rectangleToNativeRectangle=function(e,t){o$1q.defined("rectangle",e);var i=e$2a.toDegrees(e.west),n=e$2a.toDegrees(e.south),r=e$2a.toDegrees(e.east),o=e$2a.toDegrees(e.north);return e$2b(t)?(t.west=i,t.south=n,t.east=r,t.north=o,t):new h$18(i,n,r,o)},m$L.prototype.tileXYToNativeRectangle=function(e,t,i,n){var r=this.tileXYToRectangle(e,t,i,n);return r.west=e$2a.toDegrees(r.west),r.south=e$2a.toDegrees(r.south),r.east=e$2a.toDegrees(r.east),r.north=e$2a.toDegrees(r.north),r},m$L.prototype.tileXYToRectangle=function(e,t,i,n){var r=this._rectangle;if(e$2b(this._resolutions)){var o=this._resolutions[i-this._beginLevel],a=this._tileInfo.origin.x,s=this._tileInfo.origin.y,l=a+e*this._tileWidth*o,u=a+(e+1)*this._tileWidth*o,c=s-t*this._tileHeight*o,h=s-(t+1)*this._tileHeight*o;return e$2b(n)?(n.west=l,n.south=h,n.east=u,n.north=c,n):new h$18(l/6378137,h/6378137,u/6378137,c/6378137)}if(e$2b(this._tileInfo)){o=this._tileInfo.lods[i].resolution*e$2a.TWO_PI/360;a=e$2a.toRadians(this._tileInfo.origin.x),s=e$2a.toRadians(this._tileInfo.origin.y);l=a+e*this._tileWidth*o,u=a+(e+1)*this._tileWidth*o,c=s-t*this._tileHeight*o,h=s-(t+1)*this._tileHeight*o;return e$2b(n)?(n.west=l,n.south=h,n.east=u,n.north=c,n):new h$18(l,h,u,c)}var d=this.getNumberOfXTilesAtLevel(i),f=this.getNumberOfYTilesAtLevel(i),p=r.width/d,_=(l=e*p+r.west,u=(e+1)*p+r.west,r.height/f);c=r.north-t*_,h=r.north-(t+1)*_;return e$2b(n)||(n=new h$18(l,h,u,c)),n.west=l,n.south=h,n.east=u,n.north=c,n},m$L.prototype.positionToTileXY=function(e,t,i){var n=this._rectangle;if(h$18.contains(n,e)){var r=this.getNumberOfXTilesAtLevel(t),o=this.getNumberOfYTilesAtLevel(t),a=n.width/r,s=n.height/o;if(e$2b(this._resolutions)){var l=this._resolutions[t-this._beginLevel];a=this._tileWidth*l,s=this._tileHeight*l}else if(e$2b(this._tileInfo)){l=this._tileInfo.lods[t].resolution*e$2a.TWO_PI/360;a=this._tileWidth*l,s=this._tileHeight*l}var u,c,h=e.longitude;n.east<n.west&&(h+=e$2a.TWO_PI);var d=(h-(u=e$2b(this._resolutions)?this._tileInfo.origin.x:e$2b(this._tileInfo)?e$2a.toRadians(this._tileInfo.origin.x):n.west))/a|0;e$2b(this._resolutions)&&(d=(6378137*h-u)/a|0,d=e$2a.clamp(d,this._tileBounds[t-this._beginLevel].west,this._tileBounds[t-this._beginLevel].east)),d>=r&&(d=r-1);var f=((c=e$2b(this._resolutions)?this._tileInfo.origin.y:e$2b(this._tileInfo)?e$2a.toRadians(this._tileInfo.origin.y):n.north)-e.latitude)/s|0;return e$2b(this._resolutions)&&(f=(c-6378137*e.latitude)/s|0,f=e$2a.clamp(f,this._tileBounds[t-this._beginLevel].north,this._tileBounds[t-this._beginLevel].south)),f>=o&&(f=o-1),e$2b(i)?(i.x=d,i.y=f,i):new o$1o(d,f)}};var l$S=new h$18;function S$G(e,t,i,n){for(var r=n.length,o=0;o<r;++o){var a=n[o];if(a.x===t&&a.y===i&&a.level===e)return!0}return!1}n$C.prototype.addAvailableTileRange=function(e,t,i,n,r){var o=this._tilingScheme,a=this._rootNodes;if(0===e)for(var s=i;s<=r;++s)for(var l=t;l<=n;++l)S$G(e,l,s,a)||a.push(new _$F(o,void 0,0,l,s));o.tileXYToRectangle(t,i,e,l$S);var u=l$S.west,c=l$S.north;o.tileXYToRectangle(n,r,e,l$S);for(var h=l$S.east,d=new Y$z(e,u,l$S.south,h,c),f=0;f<a.length;++f){var p=a[f];L$S(p.extent,d)&&j$K(this._maximumLevel,p,d)}},n$C.prototype.computeMaximumLevelAtPosition=function(e){for(var t,i=0;i<this._rootNodes.length;++i){var n=this._rootNodes[i];if(m$K(n.extent,e)){t=n;break}}return e$2b(t)?x$O(void 0,t,e):-1};var W$O=[],b$U=[],Q$H=new h$18,X$G=new h$18;n$C.prototype.computeBestAvailableLevelOverRectangle=function(e){var t=W$O;t.length=0,e.east<e.west?(t.push(h$18.fromRadians(-Math.PI,e.south,e.east,e.north,Q$H)),t.push(h$18.fromRadians(e.west,e.south,Math.PI,e.north,X$G))):t.push(e);var i,n=b$U;for(n.length=0,i=0;i<this._rootNodes.length;++i)M$M(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(e$2b(n[i])&&0===n[i].length)return i;return 0};var o$M=new a$18;function _$F(e,t,i,n,r){this.tilingScheme=e,this.parent=t,this.level=i,this.x=n,this.y=r,this.extent=e.tileXYToRectangle(n,r,i),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}function Y$z(e,t,i,n,r){this.level=e,this.west=t,this.south=i,this.east=n,this.north=r}function L$S(e,t){var i=Math.max(e.west,t.west),n=Math.max(e.south,t.south),r=Math.min(e.east,t.east);return n<Math.min(e.north,t.north)&&i<r}function j$K(e,t,i){for(;t.level<e;)if(A$Q(t.nw.extent,i))t=t.nw;else if(A$Q(t.ne.extent,i))t=t.ne;else if(A$Q(t.sw.extent,i))t=t.sw;else{if(!A$Q(t.se.extent,i))break;t=t.se}if(0===t.rectangles.length||t.rectangles[t.rectangles.length-1].level<=i.level)t.rectangles.push(i);else{var n=a$17(t.rectangles,i.level,I$V);n<=0&&(n=~n),t.rectangles.splice(n,0,i)}}function I$V(e,t){return e.level-t}function A$Q(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function m$K(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function x$O(e,t,i){for(var n=0,r=!1;!r;){var o=t._nw&&m$K(t._nw.extent,i),a=t._ne&&m$K(t._ne.extent,i),s=t._sw&&m$K(t._sw.extent,i),l=t._se&&m$K(t._se.extent,i);if(o+a+s+l>1){o&&(n=Math.max(n,x$O(t,t._nw,i))),a&&(n=Math.max(n,x$O(t,t._ne,i))),s&&(n=Math.max(n,x$O(t,t._sw,i))),l&&(n=Math.max(n,x$O(t,t._se,i)));break}o?t=t._nw:a?t=t._ne:s?t=t._sw:l?t=t._se:r=!0}for(;t!==e;){for(var u=t.rectangles,c=u.length-1;c>=0&&u[c].level>n;--c){var h=u[c];m$K(h,i)&&(n=h.level)}t=t.parent}return n}function M$M(e,t,i){if(t){var n,r=!1;for(n=0;n<i.length;++n)r=r||L$S(t.extent,i[n]);if(r){var o=t.rectangles;for(n=0;n<o.length;++n){var a=o[n];e[a.level]||(e[a.level]=i),e[a.level]=q$O(e[a.level],a)}M$M(e,t._nw,i),M$M(e,t._ne,i),M$M(e,t._sw,i),M$M(e,t._se,i)}}}function q$O(e,t){for(var i=[],n=0;n<e.length;++n){var r=e[n];L$S(r,t)?(r.west<t.west&&i.push(new h$18(r.west,r.south,t.west,r.north)),r.east>t.east&&i.push(new h$18(t.east,r.south,r.east,r.north)),r.south<t.south&&i.push(new h$18(Math.max(t.west,r.west),r.south,Math.min(t.east,r.east),t.south)),r.north>t.north&&i.push(new h$18(Math.max(t.west,r.west),t.north,Math.min(t.east,r.east),r.north))):i.push(r)}return i}n$C.prototype.isTileAvailable=function(e,t,i){var n=this._tilingScheme.tileXYToRectangle(t,i,e,l$S);return h$18.center(n,o$M),this.computeMaximumLevelAtPosition(o$M)>=e},n$C.prototype.computeChildMaskForTile=function(e,t,i){var n=e+1;if(n>=this._maximumLevel)return 0;var r=0;return r|=this.isTileAvailable(n,2*t,2*i+1)?1:0,r|=this.isTileAvailable(n,2*t+1,2*i+1)?2:0,r|=this.isTileAvailable(n,2*t,2*i)?4:0,r|=this.isTileAvailable(n,2*t+1,2*i)?8:0},Object.defineProperties(_$F.prototype,{nw:{get:function(){return this._nw||(this._nw=new _$F(this.tilingScheme,this,this.level+1,2*this.x,2*this.y)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new _$F(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new _$F(this.tilingScheme,this,this.level+1,2*this.x,2*this.y+1)),this._sw}},se:{get:function(){return this._se||(this._se=new _$F(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y+1)),this._se}}});var j$J=15;function _$E(e){if(!e$2b(e)||!e$2b(e.url))throw new t$16("options.url is required.");this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;var t=e.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};var i=this,n=u$_(e.ellipsoid,t$13.WGS84);this._readyPromise=o$1l(e.url).then((function(e){var n=t$11.createIfNeeded(e);return n.appendForwardSlash(),e$2b(t)&&(n=n.getDerivedResource({queryParameters:{token:t}})),i._resource=n,n.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()})).then((function(e){var t=e.copyrightText;e$2b(t)&&(i._credit=new r$T(t));var r=e.spatialReference,o=u$_(r.latestWkid,r.wkid),a=e.extent,s={ellipsoid:n};if(4326===o)s.rectangle=h$18.fromDegrees(a.xmin,a.ymin,a.xmax,a.ymax),i._tilingScheme=new g$13(s);else{if(3857!==o)return o$1l.reject(new t$14("Invalid spatial reference"));s.rectangleSouthwestInMeters=new o$1o(a.xmin,a.ymin),s.rectangleNortheastInMeters=new o$1o(a.xmax,a.ymax),i._tilingScheme=new c$R(s)}var l=e.tileInfo;return e$2b(l)?(i._width=l.rows+1,i._height=l.cols+1,i._encoding="LERC"===l.format?T$L.LERC:T$L.NONE,i._lodCount=l.lods.length-1,(i._hasAvailability=-1!==e.capabilities.indexOf("Tilemap"))&&(i._tilesAvailable=new n$C(i._tilingScheme,i._lodCount),i._tilesAvailable.addAvailableTileRange(0,0,0,i._tilingScheme.getNumberOfXTilesAtLevel(0),i._tilingScheme.getNumberOfYTilesAtLevel(0)),i._tilesAvailablityLoaded=new n$C(i._tilingScheme,i._lodCount)),i._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(i._tilingScheme.ellipsoid,i._width,i._tilingScheme.getNumberOfXTilesAtLevel(0)),e.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),i._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:e.minValues[0],highestEncodedHeight:e.maxValues[0]},i._ready=!0,!0):o$1l.reject(new t$14("tileInfo is required"))})).otherwise((function(e){var t="An error occurred while accessing "+i._resource.url+".";return l$W.handleError(void 0,i,i._errorEvent,t),o$1l.reject(e)})),this._errorEvent=new o$1h}function w$I(e,t,i,n){if(e._hasAvailability){var r=e._tilesAvailablityLoaded,o=e._tilesAvailable;if(t>e._lodCount)return!1;if(o.isTileAvailable(t,i,n))return!0;if(r.isTileAvailable(t,i,n))return!1}}function H$M(e,t,i,n){for(var r=t-1,o=i-1,a=n[e.y*t+e.x],s=[],l={startX:e.x,startY:e.y,endX:0,endY:0},u=new o$1o(e.x+1,e.y+1),c=!1,h=!1;!c||!h;){var d=u.x,f=h?u.y+1:u.y;if(!c){for(var p=e.y;p<f;++p)if(n[p*t+u.x]!==a){c=!0;break}c?(s.push(new o$1o(u.x,e.y)),--u.x,--d,l.endX=u.x):u.x===r?(l.endX=u.x,c=!0):++u.x}if(!h){for(var _=u.y*t,m=e.x;m<=d;++m)if(n[_+m]!==a){h=!0;break}h?(s.push(new o$1o(e.x,u.y)),--u.y,l.endY=u.y):u.y===o?(l.endY=u.y,h=!0):++u.y}}return{endingIndices:s,range:l,value:a}}function V$z(e,t,i,n,r){var o=[],a=r.every((function(e){return e===r[0]}));if(a)return 1===r[0]&&o.push({startX:e,startY:t,endX:e+i-1,endY:t+n-1}),o;for(var s=[new o$1o(0,0)];s.length>0;){var l=H$M(s.pop(),i,n,r);if(1===l.value){var u=l.range;u.startX+=e,u.endX+=e,u.startY+=t,u.endY+=t,o.push(u)}var c=l.endingIndices;c.length>0&&(s=s.concat(c))}return o}function L$R(e,t,i,n){if(!e._hasAvailability)return{};var r=128*Math.floor(i/128),o=128*Math.floor(n/128),a=Math.min(1<<t,128),s="tilemap/"+t+"/"+o+"/"+r+"/"+a+"/"+a,l=e._availableCache;if(e$2b(l[s]))return l[s];var u=new r$1b({throttle:!0,throttleByServer:!0,type:V$15.TERRAIN}),c=e._resource.getDerivedResource({url:s,request:u}).fetchJson();return e$2b(c)?(c=c.then((function(s){var l=V$z(r,o,a,a,s.data);e._tilesAvailablityLoaded.addAvailableTileRange(r,o,r+a,o+a);for(var u=e._tilesAvailable,c=0;c<l.length;++c){var h=l[c];u.addAvailableTileRange(t,h.startX,h.startY,h.endX,h.endY)}return w$I(e,t,i,n)})),l[s]={promise:c,request:u},c=c.always((function(e){return delete l[s],e})),{promise:c,request:u}):{}}function l$R(e,t,i){if(o$1q.defined("array",e),e$2b(t)&&o$1q.typeOf.number("begin",t),e$2b(i)&&o$1q.typeOf.number("end",i),"function"==typeof e.slice)return e.slice(t,i);for(var n=Array.prototype.slice.call(e,t,i),r=s$Y.typedArrayTypes,o=r.length,a=0;a<o;++a)if(e instanceof r[a]){n=new r[a](n);break}return n}Object.defineProperties(_$E.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this.ready)throw new t$16("credit must not be called before ready returns true.");return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$16("tilingScheme must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),_$E.prototype.requestTileGeometry=function(e,t,i,n){if(!this._ready)throw new t$16("requestTileGeometry must not be called before the terrain provider is ready.");var r,o=this._resource.getDerivedResource({url:"tile/"+i+"/"+t+"/"+e,request:n}),a=this._hasAvailability,s=o$1l.resolve(!0);if(a&&!e$2b(w$I(this,i+1,2*e,2*t))){var l=L$R(this,i+1,2*e,2*t);s=l.promise,r=l.request}var u=o.fetchArrayBuffer();if(e$2b(u)&&e$2b(s)){var c=this,h=this._tilesAvailable;return o$1l.join(u,s).then((function(n){return new T$J({buffer:n[0],width:c._width,height:c._height,childTileMask:a?h.computeChildMaskForTile(i,e,t):j$J,structure:c._terrainDataStructure,encoding:c._encoding})})).otherwise((function(e){return e$2b(r)&&r.state===W$1c.CANCELLED?(n.cancel(),n.deferred.promise.always((function(){return n.state=W$1c.CANCELLED,o$1l.reject(e)}))):o$1l.reject(e)}))}},_$E.prototype.getLevelMaximumGeometricError=function(e){if(!this.ready)throw new t$16("getLevelMaximumGeometricError must not be called before ready returns true.");return this._levelZeroMaximumGeometricError/(1<<e)},_$E.prototype.getTileDataAvailable=function(e,t,i){if(this._hasAvailability){var n=w$I(this,i,e,t);if(e$2b(n))return n;L$R(this,i,e,t)}},_$E.prototype.loadTileDataAvailability=function(e,t,i){};var e$11={defaultKey:void 0,getKey:function(e){return e$2b(e)?e:e$11.defaultKey}},i$N="";function o$L(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).key;this._key=e$11.getKey(t),this._resource=new t$11({url:i$N,queryParameters:{key:this._key}})}Object.defineProperties(o$L.prototype,{url:{get:function(){return i$N}},key:{get:function(){return this._key}}}),o$L.prototype.geocode=function(e){return o$1q.typeOf.string("query",e),this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then((function(e){return 0===e.resourceSets.length?[]:e.resourceSets[0].resources.map((function(e){var t=e.bbox,i=t[0],n=t[1],r=t[2],o=t[3];return{displayName:e.name,destination:h$18.fromDegrees(n,i,o,r)}}))}))};var W$N=new o$1p;function O$y(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).minimum,i=e.maximum;if(o$1q.typeOf.object("min",t),o$1q.typeOf.object("max",i),e$2b(e.offsetAttribute)&&e.offsetAttribute===_0x58701d.TOP)throw new t$16("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");var n=u$_(e.vertexFormat,n$11.DEFAULT);this._minimum=o$1p.clone(t),this._maximum=o$1p.clone(i),this._vertexFormat=n,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}O$y.fromDimensions=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).dimensions;o$1q.typeOf.object("dimensions",t),o$1q.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=o$1p.multiplyByScalar(t,.5,new o$1p);return new O$y({minimum:o$1p.negate(i,new o$1p),maximum:i,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},O$y.fromAxisAlignedBoundingBox=function(e){return o$1q.typeOf.object("boundingBox",e),new O$y({minimum:e.minimum,maximum:e.maximum})},O$y.packedLength=2*o$1p.packedLength+n$11.packedLength+1,O$y.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),o$1p.pack(e._minimum,t,i),o$1p.pack(e._maximum,t,i+o$1p.packedLength),n$11.pack(e._vertexFormat,t,i+2*o$1p.packedLength),t[i+2*o$1p.packedLength+n$11.packedLength]=u$_(e._offsetAttribute,-1),t};var N$C=new o$1p,U$K=new o$1p,G$R=new n$11,S$F={minimum:N$C,maximum:U$K,vertexFormat:G$R,offsetAttribute:void 0},u$J,n$B;function t$D(e){n$B(e)}function N$B(){}O$y.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=o$1p.unpack(e,t,N$C),r=o$1p.unpack(e,t+o$1p.packedLength,U$K),o=n$11.unpack(e,t+2*o$1p.packedLength,G$R),a=e[t+2*o$1p.packedLength+n$11.packedLength];return e$2b(i)?(i._minimum=o$1p.clone(n,i._minimum),i._maximum=o$1p.clone(r,i._maximum),i._vertexFormat=n$11.clone(o,i._vertexFormat),i._offsetAttribute=-1===a?void 0:a,i):(S$F.offsetAttribute=-1===a?void 0:a,new O$y(S$F))},O$y.createGeometry=function(e){var t=e._minimum,i=e._maximum,n=e._vertexFormat;if(!o$1p.equals(t,i)){var r,o,a=new a$_;if(n.position&&(n.st||n.normal||n.tangent||n.bitangent)){if(n.position&&((o=new Float64Array(72))[0]=t.x,o[1]=t.y,o[2]=i.z,o[3]=i.x,o[4]=t.y,o[5]=i.z,o[6]=i.x,o[7]=i.y,o[8]=i.z,o[9]=t.x,o[10]=i.y,o[11]=i.z,o[12]=t.x,o[13]=t.y,o[14]=t.z,o[15]=i.x,o[16]=t.y,o[17]=t.z,o[18]=i.x,o[19]=i.y,o[20]=t.z,o[21]=t.x,o[22]=i.y,o[23]=t.z,o[24]=i.x,o[25]=t.y,o[26]=t.z,o[27]=i.x,o[28]=i.y,o[29]=t.z,o[30]=i.x,o[31]=i.y,o[32]=i.z,o[33]=i.x,o[34]=t.y,o[35]=i.z,o[36]=t.x,o[37]=t.y,o[38]=t.z,o[39]=t.x,o[40]=i.y,o[41]=t.z,o[42]=t.x,o[43]=i.y,o[44]=i.z,o[45]=t.x,o[46]=t.y,o[47]=i.z,o[48]=t.x,o[49]=i.y,o[50]=t.z,o[51]=i.x,o[52]=i.y,o[53]=t.z,o[54]=i.x,o[55]=i.y,o[56]=i.z,o[57]=t.x,o[58]=i.y,o[59]=i.z,o[60]=t.x,o[61]=t.y,o[62]=t.z,o[63]=i.x,o[64]=t.y,o[65]=t.z,o[66]=i.x,o[67]=t.y,o[68]=i.z,o[69]=t.x,o[70]=t.y,o[71]=i.z,a.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:o})),n.normal){var s=new Float32Array(72);s[0]=0,s[1]=0,s[2]=1,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=1,s[9]=0,s[10]=0,s[11]=1,s[12]=0,s[13]=0,s[14]=-1,s[15]=0,s[16]=0,s[17]=-1,s[18]=0,s[19]=0,s[20]=-1,s[21]=0,s[22]=0,s[23]=-1,s[24]=1,s[25]=0,s[26]=0,s[27]=1,s[28]=0,s[29]=0,s[30]=1,s[31]=0,s[32]=0,s[33]=1,s[34]=0,s[35]=0,s[36]=-1,s[37]=0,s[38]=0,s[39]=-1,s[40]=0,s[41]=0,s[42]=-1,s[43]=0,s[44]=0,s[45]=-1,s[46]=0,s[47]=0,s[48]=0,s[49]=1,s[50]=0,s[51]=0,s[52]=1,s[53]=0,s[54]=0,s[55]=1,s[56]=0,s[57]=0,s[58]=1,s[59]=0,s[60]=0,s[61]=-1,s[62]=0,s[63]=0,s[64]=-1,s[65]=0,s[66]=0,s[67]=-1,s[68]=0,s[69]=0,s[70]=-1,s[71]=0,a.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:s})}if(n.st){var l=new Float32Array(72),u=0;l[u++]=0,l[u++]=0,l[u++]=-1,l[u++]=1,l[u++]=0,l[u++]=-1,l[u++]=1,l[u++]=1,l[u++]=-1,l[u++]=0,l[u++]=1,l[u++]=-1,l[u++]=1,l[u++]=0,l[u++]=-1,l[u++]=0,l[u++]=0,l[u++]=-1,l[u++]=0,l[u++]=1,l[u++]=-1,l[u++]=1,l[u++]=1,l[u++]=-1,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,a.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:l})}if(n.tangent){var c=new Float32Array(72);c[0]=1,c[1]=0,c[2]=0,c[3]=1,c[4]=0,c[5]=0,c[6]=1,c[7]=0,c[8]=0,c[9]=1,c[10]=0,c[11]=0,c[12]=-1,c[13]=0,c[14]=0,c[15]=-1,c[16]=0,c[17]=0,c[18]=-1,c[19]=0,c[20]=0,c[21]=-1,c[22]=0,c[23]=0,c[24]=0,c[25]=1,c[26]=0,c[27]=0,c[28]=1,c[29]=0,c[30]=0,c[31]=1,c[32]=0,c[33]=0,c[34]=1,c[35]=0,c[36]=0,c[37]=-1,c[38]=0,c[39]=0,c[40]=-1,c[41]=0,c[42]=0,c[43]=-1,c[44]=0,c[45]=0,c[46]=-1,c[47]=0,c[48]=-1,c[49]=0,c[50]=0,c[51]=-1,c[52]=0,c[53]=0,c[54]=-1,c[55]=0,c[56]=0,c[57]=-1,c[58]=0,c[59]=0,c[60]=1,c[61]=0,c[62]=0,c[63]=1,c[64]=0,c[65]=0,c[66]=1,c[67]=0,c[68]=0,c[69]=1,c[70]=0,c[71]=0,a.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:c})}if(n.bitangent){var h=new Float32Array(72);h[0]=0,h[1]=1,h[2]=0,h[3]=0,h[4]=1,h[5]=0,h[6]=0,h[7]=1,h[8]=0,h[9]=0,h[10]=1,h[11]=0,h[12]=0,h[13]=1,h[14]=0,h[15]=0,h[16]=1,h[17]=0,h[18]=0,h[19]=1,h[20]=0,h[21]=0,h[22]=1,h[23]=0,h[24]=0,h[25]=0,h[26]=1,h[27]=0,h[28]=0,h[29]=1,h[30]=0,h[31]=0,h[32]=1,h[33]=0,h[34]=0,h[35]=1,h[36]=0,h[37]=0,h[38]=1,h[39]=0,h[40]=0,h[41]=1,h[42]=0,h[43]=0,h[44]=1,h[45]=0,h[46]=0,h[47]=1,h[48]=0,h[49]=0,h[50]=1,h[51]=0,h[52]=0,h[53]=1,h[54]=0,h[55]=0,h[56]=1,h[57]=0,h[58]=0,h[59]=1,h[60]=0,h[61]=0,h[62]=1,h[63]=0,h[64]=0,h[65]=1,h[66]=0,h[67]=0,h[68]=1,h[69]=0,h[70]=0,h[71]=1,a.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:h})}(r=new Uint16Array(36))[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=6,r[7]=5,r[8]=4,r[9]=7,r[10]=6,r[11]=4,r[12]=8,r[13]=9,r[14]=10,r[15]=8,r[16]=10,r[17]=11,r[18]=14,r[19]=13,r[20]=12,r[21]=15,r[22]=14,r[23]=12,r[24]=18,r[25]=17,r[26]=16,r[27]=19,r[28]=18,r[29]=16,r[30]=20,r[31]=21,r[32]=22,r[33]=20,r[34]=22,r[35]=23}else(o=new Float64Array(24))[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=i.x,o[4]=t.y,o[5]=t.z,o[6]=i.x,o[7]=i.y,o[8]=t.z,o[9]=t.x,o[10]=i.y,o[11]=t.z,o[12]=t.x,o[13]=t.y,o[14]=i.z,o[15]=i.x,o[16]=t.y,o[17]=i.z,o[18]=i.x,o[19]=i.y,o[20]=i.z,o[21]=t.x,o[22]=i.y,o[23]=i.z,a.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:o}),(r=new Uint16Array(36))[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;var d=o$1p.subtract(i,t,W$N),f=.5*o$1p.magnitude(d);if(e$2b(e._offsetAttribute)){var p=o.length,_=new Uint8Array(p/3);d$1s(_,e._offsetAttribute===_0x58701d.NONE?0:1),a.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new I$1p({attributes:a,indices:r,primitiveType:W$18.TRIANGLES,boundingSphere:new i$1c(o$1p.ZERO,f),offsetAttribute:e._offsetAttribute})}},O$y.getUnitBox=function(){return e$2b(u$J)||(u$J=O$y.createGeometry(O$y.fromDimensions({dimensions:new o$1p(1,1,1),vertexFormat:n$11.POSITION_ONLY}))),u$J},typeof cancelAnimationFrame<"u"&&(n$B=cancelAnimationFrame),function(){if(!e$2b(n$B)&&typeof window<"u")for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!e$2b(n$B);)e$2b(n$B=window[e[t]+"CancelAnimationFrame"])||(n$B=window[e[t]+"CancelRequestAnimationFrame"]),++t;e$2b(n$B)||(n$B=clearTimeout)}(),N$B.prototype.geocode=function(e){o$1q.typeOf.string("query",e);var t=e.match(/[^\s,\n]+/g);if(2===t.length||3===t.length){var i=+t[0],n=+t[1],r=3===t.length?+t[2]:300;if(isNaN(i)&&isNaN(n))for(var o=/^(\d+.?\d*)([nsew])/i,a=0;a<t.length;++a){var s=t[a].match(o);o.test(t[a])&&3===s.length&&(/^[ns]/i.test(s[2])?n=/^[n]/i.test(s[2])?+s[1]:-s[1]:/^[ew]/i.test(s[2])&&(i=/^[e]/i.test(s[2])?+s[1]:-s[1]))}if(!isNaN(i)&&!isNaN(n)&&!isNaN(r)){var l={displayName:e,destination:o$1p.fromDegrees(i,n,r)};return o$1l.resolve([l])}}return o$1l.resolve([])};var C$J={},b$T=new o$1p,Q$G=new o$1p,G$Q=new n$13,N$A=new p$1e;function W$M(e,t,i,n,r,o,a,s,l,u){var c=e+t;o$1p.multiplyByScalar(n,Math.cos(c),b$T),o$1p.multiplyByScalar(i,Math.sin(c),Q$G),o$1p.add(b$T,Q$G,b$T);var h=Math.cos(e);h*=h;var d=Math.sin(e);d*=d;var f=o/Math.sqrt(a*h+r*d)/s;return n$13.fromAxisAngle(b$T,f,G$Q),p$1e.fromQuaternion(G$Q,N$A),p$1e.multiplyByVector(N$A,l,u),o$1p.normalize(u,u),o$1p.multiplyByScalar(u,s,u),u}var U$J=new o$1p,Z$F=new o$1p,j$I=new o$1p,D$G=new o$1p;C$J.raisePositionsToHeight=function(e,t,i){for(var n=t.ellipsoid,r=t.height,o=t.extrudedHeight,a=i?e.length/3*2:e.length/3,s=new Float64Array(3*a),l=e.length,u=i?l:0,c=0;c<l;c+=3){var h=c+1,d=c+2,f=o$1p.fromArray(e,c,U$J);n.scaleToGeodeticSurface(f,f);var p=o$1p.clone(f,Z$F),_=n.geodeticSurfaceNormal(f,D$G),m=o$1p.multiplyByScalar(_,r,j$I);o$1p.add(f,m,f),i&&(o$1p.multiplyByScalar(_,o,m),o$1p.add(p,m,p),s[c+u]=p.x,s[h+u]=p.y,s[d+u]=p.z),s[c]=f.x,s[h]=f.y,s[d]=f.z}return s};var J$C=new o$1p,K$G=new o$1p,X$F=new o$1p;C$J.computeEllipsePositions=function(e,t,i){var n=e.semiMinorAxis,r=e.semiMajorAxis,o=e.rotation,a=e.center,s=8*e.granularity,l=n*n,u=r*r,c=r*n,h=o$1p.magnitude(a),d=o$1p.normalize(a,J$C),f=o$1p.cross(o$1p.UNIT_Z,a,K$G);f=o$1p.normalize(f,f);var p=o$1p.cross(d,f,X$F),_=1+Math.ceil(e$2a.PI_OVER_TWO/s),m=e$2a.PI_OVER_TWO/(_-1),g=e$2a.PI_OVER_TWO-_*m;g<0&&(_-=Math.ceil(Math.abs(g)/m));var x,v,y,$,b,T=t?new Array(3*(_*(_+2)*2)):void 0,C=0,S=U$J,w=Z$F,E=4*_*3,P=E-1,A=0,L=i?new Array(E):void 0;for(S=W$M(g=e$2a.PI_OVER_TWO,o,p,f,l,c,u,h,d,S),t&&(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z),i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x),g=e$2a.PI_OVER_TWO-m,x=1;x<_+1;++x){if(S=W$M(g,o,p,f,l,c,u,h,d,S),w=W$M(Math.PI-g,o,p,f,l,c,u,h,d,w),t){for(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z,y=2*x+2,v=1;v<y-1;++v)$=v/(y-1),b=o$1p.lerp(S,w,$,j$I),T[C++]=b.x,T[C++]=b.y,T[C++]=b.z;T[C++]=w.x,T[C++]=w.y,T[C++]=w.z}i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,L[A++]=w.x,L[A++]=w.y,L[A++]=w.z),g=e$2a.PI_OVER_TWO-(x+1)*m}for(x=_;x>1;--x){if(S=W$M(-(g=e$2a.PI_OVER_TWO-(x-1)*m),o,p,f,l,c,u,h,d,S),w=W$M(g+Math.PI,o,p,f,l,c,u,h,d,w),t){for(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z,y=2*(x-1)+2,v=1;v<y-1;++v)$=v/(y-1),b=o$1p.lerp(S,w,$,j$I),T[C++]=b.x,T[C++]=b.y,T[C++]=b.z;T[C++]=w.x,T[C++]=w.y,T[C++]=w.z}i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,L[A++]=w.x,L[A++]=w.y,L[A++]=w.z)}S=W$M(-(g=e$2a.PI_OVER_TWO),o,p,f,l,c,u,h,d,S);var M={};return t&&(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z,M.positions=T,M.numPts=_),i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,M.outerPositions=L),M};var te$t=new o$1p,xe$h=new o$1p,pe$n=new o$1p,Me$i=new o$1p,p$N=new o$1o,Te$h=new p$1e,Ye$a=new p$1e,_e$m=new n$13,Ee$j=new o$1p,Ne$f=new o$1p,Fe$g=new o$1p,le$r=new a$18,Se$c=new o$1p,Oe$h=new o$1o,Ce$f=new o$1o;function Pe$f(e,t,i){var n=t.vertexFormat,r=t.center,o=t.semiMajorAxis,a=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,u=i?e.length/3*2:e.length/3,c=t.shadowVolume,h=n.st?new Float32Array(2*u):void 0,d=n.normal?new Float32Array(3*u):void 0,f=n.tangent?new Float32Array(3*u):void 0,p=n.bitangent?new Float32Array(3*u):void 0,_=c?new Float32Array(3*u):void 0,m=0,g=Ee$j,x=Ne$f,v=Fe$g,y=new n$1b(s),$=y.project(s.cartesianToCartographic(r,le$r),Se$c),b=s.scaleToGeodeticSurface(r,te$t);s.geodeticSurfaceNormal(b,b);var T=Te$h,C=Ye$a;if(0!==l){var S=n$13.fromAxisAngle(b,l,_e$m);T=p$1e.fromQuaternion(S,T),S=n$13.fromAxisAngle(b,-l,_e$m),C=p$1e.fromQuaternion(S,C)}else T=p$1e.clone(p$1e.IDENTITY,T),C=p$1e.clone(p$1e.IDENTITY,C);for(var w=o$1o.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Oe$h),E=o$1o.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Ce$f),P=e.length,A=i?P:0,L=A/3*2,M=0;M<P;M+=3){var R=M+1,I=M+2,O=o$1p.fromArray(e,M,te$t);if(n.st){var D=p$1e.multiplyByVector(T,O,xe$h),B=y.project(s.cartesianToCartographic(D,le$r),pe$n);o$1p.subtract(B,$,B),p$N.x=(B.x+o)/(2*o),p$N.y=(B.y+a)/(2*a),w.x=Math.min(p$N.x,w.x),w.y=Math.min(p$N.y,w.y),E.x=Math.max(p$N.x,E.x),E.y=Math.max(p$N.y,E.y),i&&(h[m+L]=p$N.x,h[m+1+L]=p$N.y),h[m++]=p$N.x,h[m++]=p$N.y}(n.normal||n.tangent||n.bitangent||c)&&(g=s.geodeticSurfaceNormal(O,g),c&&(_[M+A]=-g.x,_[R+A]=-g.y,_[I+A]=-g.z),(n.normal||n.tangent||n.bitangent)&&((n.tangent||n.bitangent)&&(x=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,g,x),x),p$1e.multiplyByVector(C,x,x)),n.normal&&(d[M]=g.x,d[R]=g.y,d[I]=g.z,i&&(d[M+A]=-g.x,d[R+A]=-g.y,d[I+A]=-g.z)),n.tangent&&(f[M]=x.x,f[R]=x.y,f[I]=x.z,i&&(f[M+A]=-x.x,f[R+A]=-x.y,f[I+A]=-x.z)),n.bitangent&&(v=o$1p.normalize(o$1p.cross(g,x,v),v),p[M]=v.x,p[R]=v.y,p[I]=v.z,i&&(p[M+A]=v.x,p[R+A]=v.y,p[I+A]=v.z))))}if(n.st){P=h.length;for(var N=0;N<P;N+=2)h[N]=(h[N]-w.x)/(E.x-w.x),h[N+1]=(h[N+1]-w.y)/(E.y-w.y)}var F=new a$_;if(n.position){var U=C$J.raisePositionsToHeight(e,t,i);F.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:U})}if(n.st&&(F.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:h})),n.normal&&(F.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:d})),n.tangent&&(F.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:f})),n.bitangent&&(F.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:p})),c&&(F.extrudeDirection=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:_})),i&&e$2b(t.offsetAttribute)){var z=new Uint8Array(u);if(t.offsetAttribute===_0x58701d.TOP)z=d$1s(z,1,0,u/2);else z=d$1s(z,t.offsetAttribute===_0x58701d.NONE?0:1);F.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}return F}function Ie$e(e){var t,i,n,r,o,a=new Array(e*(e+1)*12-6),s=0;for(t=0,n=1,r=0;r<3;r++)a[s++]=n++,a[s++]=t,a[s++]=n;for(r=2;r<e+1;++r){for(n=r*(r+1)-1,t=(r-1)*r-1,a[s++]=n++,a[s++]=t,a[s++]=n,i=2*r,o=0;o<i-1;++o)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;a[s++]=n++,a[s++]=t,a[s++]=n}for(i=2*e,++n,++t,r=0;r<i-1;++r)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;for(a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t++,a[s++]=t,++t,r=e-1;r>1;--r){for(a[s++]=t++,a[s++]=t,a[s++]=n,i=2*r,o=0;o<i-1;++o)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;a[s++]=t++,a[s++]=t++,a[s++]=n++}for(r=0;r<3;r++)a[s++]=t++,a[s++]=t,a[s++]=n;return a}var $$H=new o$1p;function ke$8(e){var t=e.center;$$H=o$1p.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,$$H),e.height,$$H);var i=new i$1c($$H=o$1p.add(t,$$H,$$H),e.semiMajorAxis),n=C$J.computeEllipsePositions(e,!0,!1),r=n.positions,o=n.numPts,a=Pe$f(r,e,!1),s=Ie$e(o);return{boundingSphere:i,attributes:a,indices:s=ce$x.createTypedArray(r.length/3,s)}}function Ue$d(e,t){var i=t.vertexFormat,n=t.center,r=t.semiMajorAxis,o=t.semiMinorAxis,a=t.ellipsoid,s=t.height,l=t.extrudedHeight,u=t.stRotation,c=e.length/3*2,h=new Float64Array(3*c),d=i.st?new Float32Array(2*c):void 0,f=i.normal?new Float32Array(3*c):void 0,p=i.tangent?new Float32Array(3*c):void 0,_=i.bitangent?new Float32Array(3*c):void 0,m=t.shadowVolume,g=m?new Float32Array(3*c):void 0,x=0,v=Ee$j,y=Ne$f,$=Fe$g,b=new n$1b(a),T=b.project(a.cartesianToCartographic(n,le$r),Se$c),C=a.scaleToGeodeticSurface(n,te$t);a.geodeticSurfaceNormal(C,C);for(var S=n$13.fromAxisAngle(C,u,_e$m),w=p$1e.fromQuaternion(S,Te$h),E=o$1o.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Oe$h),P=o$1o.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Ce$f),A=e.length,L=A/3*2,M=0;M<A;M+=3){var R,I=M+1,O=M+2,D=o$1p.fromArray(e,M,te$t);if(i.st){var B=p$1e.multiplyByVector(w,D,xe$h),N=b.project(a.cartesianToCartographic(B,le$r),pe$n);o$1p.subtract(N,T,N),p$N.x=(N.x+r)/(2*r),p$N.y=(N.y+o)/(2*o),E.x=Math.min(p$N.x,E.x),E.y=Math.min(p$N.y,E.y),P.x=Math.max(p$N.x,P.x),P.y=Math.max(p$N.y,P.y),d[x+L]=p$N.x,d[x+1+L]=p$N.y,d[x++]=p$N.x,d[x++]=p$N.y}D=a.scaleToGeodeticSurface(D,D),R=o$1p.clone(D,xe$h),v=a.geodeticSurfaceNormal(D,v),m&&(g[M+A]=-v.x,g[I+A]=-v.y,g[O+A]=-v.z);var F=o$1p.multiplyByScalar(v,s,Me$i);if(D=o$1p.add(D,F,D),F=o$1p.multiplyByScalar(v,l,F),R=o$1p.add(R,F,R),i.position&&(h[M+A]=R.x,h[I+A]=R.y,h[O+A]=R.z,h[M]=D.x,h[I]=D.y,h[O]=D.z),i.normal||i.tangent||i.bitangent){$=o$1p.clone(v,$);var U=o$1p.fromArray(e,(M+3)%A,Me$i);o$1p.subtract(U,D,U);var z=o$1p.subtract(R,D,pe$n);v=o$1p.normalize(o$1p.cross(z,U,v),v),i.normal&&(f[M]=v.x,f[I]=v.y,f[O]=v.z,f[M+A]=v.x,f[I+A]=v.y,f[O+A]=v.z),i.tangent&&(y=o$1p.normalize(o$1p.cross($,v,y),y),p[M]=y.x,p[I]=y.y,p[O]=y.z,p[M+A]=y.x,p[M+1+A]=y.y,p[M+2+A]=y.z),i.bitangent&&(_[M]=$.x,_[I]=$.y,_[O]=$.z,_[M+A]=$.x,_[I+A]=$.y,_[O+A]=$.z)}}if(i.st){A=d.length;for(var G=0;G<A;G+=2)d[G]=(d[G]-E.x)/(P.x-E.x),d[G+1]=(d[G+1]-E.y)/(P.y-E.y)}var V=new a$_;if(i.position&&(V.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:h})),i.st&&(V.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:d})),i.normal&&(V.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:f})),i.tangent&&(V.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:p})),i.bitangent&&(V.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:_})),m&&(V.extrudeDirection=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:g})),e$2b(t.offsetAttribute)){var k=new Uint8Array(c);if(t.offsetAttribute===_0x58701d.TOP)k=d$1s(k,1,0,c/2);else k=d$1s(k,t.offsetAttribute===_0x58701d.NONE?0:1);V.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:k})}return V}function We$d(e){for(var t=e.length/3,i=ce$x.createTypedArray(t,6*t),n=0,r=0;r<t;r++){var o=r,a=r+t,s=(o+1)%t,l=s+t;i[n++]=o,i[n++]=a,i[n++]=s,i[n++]=s,i[n++]=a,i[n++]=l}return i}var de$n=new i$1c,Ae$j=new i$1c;function qe$8(e){var t=e.center,i=e.ellipsoid,n=e.semiMajorAxis,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,te$t),e.height,te$t);de$n.center=o$1p.add(t,r,de$n.center),de$n.radius=n,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,r),e.extrudedHeight,r),Ae$j.center=o$1p.add(t,r,Ae$j.center),Ae$j.radius=n;var o=C$J.computeEllipsePositions(e,!0,!0),a=o.positions,s=o.numPts,l=o.outerPositions,u=i$1c.union(de$n,Ae$j),c=Pe$f(a,e,!0),h=Ie$e(s),d=h.length;h.length=2*d;for(var f=a.length/3,p=0;p<d;p+=3)h[p+d]=h[p+2]+f,h[p+1+d]=h[p+1]+f,h[p+2+d]=h[p]+f;var _=new I$1p({attributes:c,indices:ce$x.createTypedArray(2*f/3,h),primitiveType:W$18.TRIANGLES}),m=Ue$d(l,e);h=We$d(l);var g=new I$1p({attributes:m,indices:ce$x.createTypedArray(2*l.length/3,h),primitiveType:W$18.TRIANGLES}),x=k$13.combineInstances([new d$1o({geometry:_}),new d$1o({geometry:g})]);return{boundingSphere:u,attributes:x[0].attributes,indices:x[0].indices}}function Re$g(e,t,i,n,r,o,a){for(var s=C$J.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:i,rotation:n,granularity:r},!1,!0).outerPositions,l=s.length/3,u=new Array(l),c=0;c<l;++c)u[c]=o$1p.fromArray(s,3*c);var h=h$18.fromCartesianArray(u,o,a);return h.width>e$2a.PI&&(h.north=h.north>0?e$2a.PI_OVER_TWO-e$2a.EPSILON7:h.north,h.south=h.south<0?e$2a.EPSILON7-e$2a.PI_OVER_TWO:h.south,h.east=e$2a.PI,h.west=-e$2a.PI),h}function Y$y(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).center,i=u$_(e.ellipsoid,t$13.WGS84),n=e.semiMajorAxis,r=e.semiMinorAxis,o=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),a=u$_(e.vertexFormat,n$11.DEFAULT);if(o$1q.defined("options.center",t),o$1q.typeOf.number("options.semiMajorAxis",n),o$1q.typeOf.number("options.semiMinorAxis",r),n<r)throw new t$16("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(o<=0)throw new t$16("granularity must be greater than zero.");var s=u$_(e.height,0),l=u$_(e.extrudedHeight,s);this._center=o$1p.clone(t),this._semiMajorAxis=n,this._semiMinorAxis=r,this._ellipsoid=t$13.clone(i),this._rotation=u$_(e.rotation,0),this._stRotation=u$_(e.stRotation,0),this._height=Math.max(l,s),this._granularity=o,this._vertexFormat=n$11.clone(a),this._extrudedHeight=Math.min(l,s),this._shadowVolume=u$_(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}Y$y.packedLength=o$1p.packedLength+t$13.packedLength+n$11.packedLength+9,Y$y.pack=function(e,t,i){return o$1q.defined("value",e),o$1q.defined("array",t),i=u$_(i,0),o$1p.pack(e._center,t,i),i+=o$1p.packedLength,t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=u$_(e._offsetAttribute,-1),t};var je$a=new o$1p,De$i=new t$13,Ve$d=new n$11,k$E={center:je$a,ellipsoid:De$i,vertexFormat:Ve$d,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};function Qe$7(e){var t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];for(var i=C$J.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,n=i.length/3,r=new Array(n),o=0;o<n;++o)r[o]=o$1p.fromArray(i,3*o);var a=e._ellipsoid,s=e.rectangle;return I$1p._textureCoordinateRotationPoints(r,t,a,s)}function n$A(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).radius;o$1q.typeOf.number("radius",t);var i={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new Y$y(i),this._workerName="createCircleGeometry"}Y$y.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=o$1p.unpack(e,t,je$a);t+=o$1p.packedLength;var r=t$13.unpack(e,t,De$i);t+=t$13.packedLength;var o=n$11.unpack(e,t,Ve$d);t+=n$11.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=1===e[t++],p=e[t];return e$2b(i)?(i._center=o$1p.clone(n,i._center),i._ellipsoid=t$13.clone(r,i._ellipsoid),i._vertexFormat=n$11.clone(o,i._vertexFormat),i._semiMajorAxis=a,i._semiMinorAxis=s,i._rotation=l,i._stRotation=u,i._height=c,i._granularity=h,i._extrudedHeight=d,i._shadowVolume=f,i._offsetAttribute=-1===p?void 0:p,i):(k$E.height=c,k$E.extrudedHeight=d,k$E.granularity=h,k$E.stRotation=u,k$E.rotation=l,k$E.semiMajorAxis=a,k$E.semiMinorAxis=s,k$E.shadowVolume=f,k$E.offsetAttribute=-1===p?void 0:p,new Y$y(k$E))},Y$y.computeRectangle=function(e,t){var i=(e=u$_(e,u$_.EMPTY_OBJECT)).center,n=u$_(e.ellipsoid,t$13.WGS84),r=e.semiMajorAxis,o=e.semiMinorAxis,a=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),s=u$_(e.rotation,0);if(o$1q.defined("options.center",i),o$1q.typeOf.number("options.semiMajorAxis",r),o$1q.typeOf.number("options.semiMinorAxis",o),r<o)throw new t$16("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(a<=0)throw new t$16("granularity must be greater than zero.");return Re$g(i,r,o,s,a,n,t)},Y$y.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,n=!e$2a.equalsEpsilon(t,i,0,e$2a.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var r,o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation};if(n)o.extrudedHeight=i,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=qe$8(o);else if(r=ke$8(o),e$2b(e._offsetAttribute)){var a=r.attributes.position.values.length,s=new Uint8Array(a/3);d$1s(s,e._offsetAttribute===_0x58701d.NONE?0:1),r.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:s})}return new I$1p({attributes:r.attributes,indices:r.indices,primitiveType:W$18.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})}},Y$y.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new Y$y({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:r,rotation:e._rotation,stRotation:e._stRotation,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$11.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(Y$y.prototype,{rectangle:{get:function(){return e$2b(this._rectangle)||(this._rectangle=Re$g(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e$2b(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Qe$7(this)),this._textureCoordinateRotationPoints}}}),n$A.packedLength=Y$y.packedLength,n$A.pack=function(e,t,i){return o$1q.typeOf.object("value",e),Y$y.pack(e._ellipseGeometry,t,i)};var x$N=new Y$y({center:new o$1p,semiMajorAxis:1,semiMinorAxis:1}),t$C={center:new o$1p,radius:void 0,ellipsoid:t$13.clone(t$13.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new n$11,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};n$A.unpack=function(e,t,i){var n=Y$y.unpack(e,t,x$N);return t$C.center=o$1p.clone(n._center,t$C.center),t$C.ellipsoid=t$13.clone(n._ellipsoid,t$C.ellipsoid),t$C.height=n._height,t$C.extrudedHeight=n._extrudedHeight,t$C.granularity=n._granularity,t$C.vertexFormat=n$11.clone(n._vertexFormat,t$C.vertexFormat),t$C.stRotation=n._stRotation,t$C.shadowVolume=n._shadowVolume,e$2b(i)?(t$C.semiMajorAxis=n._semiMajorAxis,t$C.semiMinorAxis=n._semiMinorAxis,i._ellipseGeometry=new Y$y(t$C),i):(t$C.radius=n._semiMajorAxis,new n$A(t$C))},n$A.createGeometry=function(e){return Y$y.createGeometry(e._ellipseGeometry)},n$A.createShadowVolume=function(e,t,i){var n=e._ellipseGeometry._granularity,r=e._ellipseGeometry._ellipsoid,o=t(n,r),a=i(n,r);return new n$A({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:r,stRotation:e._ellipseGeometry._stRotation,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$11.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(n$A.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var V$y=new o$1p,g$R=new o$1p;function F$L(e){var t=e.center;g$R=o$1p.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,g$R),e.height,g$R);var i=new i$1c(g$R=o$1p.add(t,g$R,g$R),e.semiMajorAxis),n=C$J.computeEllipsePositions(e,!1,!0).outerPositions,r=u$_(e.outlineWidth,1);r>1&&n.push(n[0],n[1],n[2]);var o=new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:C$J.raisePositionsToHeight(n,e,!1)})});r>1&&(o.sideness=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:new Float32Array([0,0,0,1,1,1,1,0])}),o.sideness.isInstanceAttribute=!0);for(var a=n.length/3,s=ce$x.createTypedArray(a,2*a),l=0,u=0;u<a;++u)s[l++]=u,s[l++]=(u+1)%a;return{boundingSphere:i,attributes:o,indices:s}}var N$z=new i$1c,j$H=new i$1c;function Y$x(e){var t=e.center,i=e.ellipsoid,n=e.semiMajorAxis,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,V$y),e.height,V$y);N$z.center=o$1p.add(t,r,N$z.center),N$z.radius=n,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,r),e.extrudedHeight,r),j$H.center=o$1p.add(t,r,j$H.center),j$H.radius=n;var o=C$J.computeEllipsePositions(e,!1,!0).outerPositions,a=new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:C$J.raisePositionsToHeight(o,e,!0)})});o=a.position.values;var s=i$1c.union(N$z,j$H),l=o.length/3;if(e$2b(e.offsetAttribute)){var u=new Uint8Array(l);if(e.offsetAttribute===_0x58701d.TOP)u=d$1s(u,1,0,l/2);else u=d$1s(u,e.offsetAttribute===_0x58701d.NONE?0:1);a.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}var c=u$_(e.numberOfVerticalLines,16);c=e$2a.clamp(c,0,l/2);var h=ce$x.createTypedArray(l,2*l+2*c);l/=2;var d,f,p=0;for(d=0;d<l;++d)h[p++]=d,h[p++]=(d+1)%l,h[p++]=d+l,h[p++]=(d+1)%l+l;if(c>0){var _=Math.min(c,l);f=Math.round(l/_);var m=Math.min(f*c,l);for(d=0;d<m;d+=f)h[p++]=d,h[p++]=d+l}return{boundingSphere:s,attributes:a,indices:h}}function M$L(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).center,i=u$_(e.ellipsoid,t$13.WGS84),n=e.semiMajorAxis,r=e.semiMinorAxis,o=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE);if(!e$2b(t))throw new t$16("center is required.");if(!e$2b(n))throw new t$16("semiMajorAxis is required.");if(!e$2b(r))throw new t$16("semiMinorAxis is required.");if(n<r)throw new t$16("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(o<=0)throw new t$16("granularity must be greater than zero.");var a=u$_(e.height,0),s=u$_(e.extrudedHeight,a);this._center=o$1p.clone(t),this._semiMajorAxis=n,this._semiMinorAxis=r,this._ellipsoid=t$13.clone(i),this._rotation=u$_(e.rotation,0),this._height=Math.max(s,a),this._granularity=o,this._extrudedHeight=Math.min(s,a),this._numberOfVerticalLines=Math.max(u$_(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._outlineWidth=u$_(e.outlineWidth,1),this._workerName="createEllipseOutlineGeometry"}M$L.packedLength=o$1p.packedLength+t$13.packedLength+9,M$L.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),o$1p.pack(e._center,t,i),i+=o$1p.packedLength,t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i++]=u$_(e._offsetAttribute,-1),t[i]=e._outlineWidth,t};var B$G=new o$1p,q$N=new t$13,A$P={center:B$G,ellipsoid:q$N,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0,outlineWidth:void 0};function a$H(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).radius;o$1q.typeOf.number("radius",t);var i={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new M$L(i),this._workerName="createCircleOutlineGeometry"}M$L.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n=o$1p.unpack(e,t,B$G);t+=o$1p.packedLength;var r=t$13.unpack(e,t,q$N);t+=t$13.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=e[t];return e$2b(i)?(i._center=o$1p.clone(n,i._center),i._ellipsoid=t$13.clone(r,i._ellipsoid),i._semiMajorAxis=o,i._semiMinorAxis=a,i._rotation=s,i._height=l,i._granularity=u,i._extrudedHeight=c,i._numberOfVerticalLines=h,i._offsetAttribute=-1===d?void 0:d,i._outlineWidth=f,i):(A$P.height=l,A$P.extrudedHeight=c,A$P.granularity=u,A$P.rotation=s,A$P.semiMajorAxis=o,A$P.semiMinorAxis=a,A$P.numberOfVerticalLines=h,A$P.offsetAttribute=-1===d?void 0:d,A$P.outlineWidth=f,new M$L(A$P))},M$L.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,n=!e$2a.equalsEpsilon(t,i,0,e$2a.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var r,o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,outlineWidth:e._outlineWidth,numberOfVerticalLines:e._numberOfVerticalLines};if(n)o.extrudedHeight=i,o.offsetAttribute=e._offsetAttribute,r=Y$x(o);else if(r=F$L(o),e$2b(e._offsetAttribute)){var a=r.attributes.position.values.length,s=new Uint8Array(a/3);d$1s(s,e._offsetAttribute===_0x58701d.NONE?0:1),r.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:s})}return new I$1p({attributes:r.attributes,indices:r.indices,primitiveType:e._outlineWidth>1?W$18.TRIANGLES:W$18.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})}},a$H.packedLength=M$L.packedLength,a$H.pack=function(e,t,i){return o$1q.typeOf.object("value",e),M$L.pack(e._ellipseGeometry,t,i)};var c$I=new M$L({center:new o$1p,semiMajorAxis:1,semiMinorAxis:1}),i$M={center:new o$1p,radius:void 0,ellipsoid:t$13.clone(t$13.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};a$H.unpack=function(e,t,i){var n=M$L.unpack(e,t,c$I);return i$M.center=o$1p.clone(n._center,i$M.center),i$M.ellipsoid=t$13.clone(n._ellipsoid,i$M.ellipsoid),i$M.height=n._height,i$M.extrudedHeight=n._extrudedHeight,i$M.granularity=n._granularity,i$M.numberOfVerticalLines=n._numberOfVerticalLines,e$2b(i)?(i$M.semiMajorAxis=n._semiMajorAxis,i$M.semiMinorAxis=n._semiMinorAxis,i._ellipseGeometry=new M$L(i$M),i):(i$M.radius=n._semiMajorAxis,new a$H(i$M))},a$H.createGeometry=function(e){return M$L.createGeometry(e._ellipseGeometry)};var e$10={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},tt$9=Object.freeze(e$10),e$$={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},g$Q=Object.freeze(e$$);function u$I(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).currentTime,i=e.startTime,n=e.stopTime;if(t=e$2b(t)?a$15.clone(t):e$2b(i)?a$15.clone(i):e$2b(n)?a$15.addDays(n,-1,new a$15):a$15.now(),i=e$2b(i)?a$15.clone(i):a$15.clone(t),n=e$2b(n)?a$15.clone(n):a$15.addDays(i,1,new a$15),a$15.greaterThan(i,n))throw new t$16("startTime must come before stopTime.");this.startTime=i,this.stopTime=n,this.clockRange=u$_(e.clockRange,tt$9.UNBOUNDED),this.canAnimate=u$_(e.canAnimate,!0),this.onTick=new o$1h,this.onStop=new o$1h,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Et$a(),this.currentTime=t,this.multiplier=u$_(e.multiplier,1),this.shouldAnimate=u$_(e.shouldAnimate,!1),this.clockStep=u$_(e.clockStep,g$Q.SYSTEM_CLOCK_MULTIPLIER)}Object.defineProperties(u$I.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){a$15.equals(this._currentTime,e)||(this._clockStep===g$Q.SYSTEM_CLOCK&&(this._clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===g$Q.SYSTEM_CLOCK&&(this._clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===g$Q.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=a$15.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===g$Q.SYSTEM_CLOCK&&(this._clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}}),u$I.prototype.tick=function(){var e=Et$a(),t=a$15.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){var i=this._clockStep;if(i===g$Q.SYSTEM_CLOCK)t=a$15.now(t);else{var n=this._multiplier;if(i===g$Q.TICK_DEPENDENT)t=a$15.addSeconds(t,n,t);else{var r=e-this._lastSystemTime;t=a$15.addSeconds(t,n*(r/1e3),t)}var o=this.clockRange,a=this.startTime,s=this.stopTime;if(o===tt$9.CLAMPED)a$15.lessThan(t,a)?t=a$15.clone(a,t):a$15.greaterThan(t,s)&&(t=a$15.clone(s,t),this.onStop.raiseEvent(this));else if(o===tt$9.LOOP_STOP)for(a$15.lessThan(t,a)&&(t=a$15.clone(a,t));a$15.greaterThan(t,s);)t=a$15.addSeconds(a,a$15.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};const e$_={Webgl1:1,Webgl2:2,WebGPU:3};var De$h=Object.freeze(e$_),g$P={},B$F=new o$1p,C$I=new o$1p,y$H=new o$1p,P$I=new o$1p,M$K=new y$Z;function w$H(e,t,i,n,r){var o=o$1p.subtract(e,t,B$F),a=o$1p.dot(i,o),s=o$1p.dot(n,o);return o$1o.fromElements(a,s,r)}g$P.validOutline=function(e){o$1q.defined("positions",e);var t=y$Z.fromPoints(e,M$K).halfAxes,i=p$1e.getColumn(t,0,C$I),n=p$1e.getColumn(t,1,y$H),r=p$1e.getColumn(t,2,P$I),o=o$1p.magnitude(i),a=o$1p.magnitude(n),s=o$1p.magnitude(r);return!(0===o&&(0===a||0===s)||0===a&&0===s)},g$P.computeProjectTo2DArguments=function(e,t,i,n){o$1q.defined("positions",e),o$1q.defined("centerResult",t),o$1q.defined("planeAxis1Result",i),o$1q.defined("planeAxis2Result",n);var r,o,a=y$Z.fromPoints(e,M$K),s=a.halfAxes,l=p$1e.getColumn(s,0,C$I),u=p$1e.getColumn(s,1,y$H),c=p$1e.getColumn(s,2,P$I),h=o$1p.magnitude(l),d=o$1p.magnitude(u),f=o$1p.magnitude(c),p=Math.min(h,d,f);return(0!==h||0!==d&&0!==f)&&(0!==d||0!==f)&&((p===d||p===f)&&(r=l),p===h?r=u:p===f&&(o=u),(p===h||p===d)&&(o=c),o$1p.normalize(r,i),o$1p.normalize(o,n),o$1p.clone(a.center,t),!0)},g$P.createProjectPointsTo2DFunction=function(e,t,i){return function(n){for(var r=new Array(n.length),o=0;o<n.length;o++)r[o]=w$H(n[o],e,t,i);return r}},g$P.createProjectPointTo2DFunction=function(e,t,i){return function(n,r){return w$H(n,e,t,i,r)}};var ce$l=new o$1p,pe$m=new f$18,se$n=new o$1o,me$n=new o$1o,le$q=new o$1p,ve$i=new o$1p,fe$k=new o$1p,C$H=new o$1p,ye$g=new o$1p,he$j=new o$1p,W$L=new n$13,ue$p=new p$1e,de$m=new p$1e,ge$i=new o$1p;function we$h(e,t,i,n,r,o,a,s){var l=e.positions,u=A$1g.triangulate(e.positions2D,e.holes);u.length<3&&(u=[0,1,2]);var c=ce$x.createTypedArray(l.length,u.length);c.set(u);var h=ue$p;if(0!==n){var d=n$13.fromAxisAngle(o,n,W$L);if(h=p$1e.fromQuaternion(d,h),t.tangent||t.bitangent){d=n$13.fromAxisAngle(o,-n,W$L);var f=p$1e.fromQuaternion(d,de$m);a=o$1p.normalize(p$1e.multiplyByVector(f,a,a),a),t.bitangent&&(s=o$1p.normalize(o$1p.cross(o,a,s),s))}}else h=p$1e.clone(p$1e.IDENTITY,h);var p=me$n;t.st&&(p.x=i.x,p.y=i.y);for(var _=l.length,m=3*_,g=new Float64Array(m),x=t.normal?new Float32Array(m):void 0,v=t.tangent?new Float32Array(m):void 0,y=t.bitangent?new Float32Array(m):void 0,$=t.st?new Float32Array(2*_):void 0,b=0,T=0,C=0,S=0,w=0,E=0;E<_;E++){var P=l[E];if(g[b++]=P.x,g[b++]=P.y,g[b++]=P.z,t.st){var A=r(p$1e.multiplyByVector(h,P,ce$l),se$n);o$1o.subtract(A,p,A);var L=e$2a.clamp(A.x/i.width,0,1),M=e$2a.clamp(A.y/i.height,0,1);$[w++]=L,$[w++]=M}t.normal&&(x[T++]=o.x,x[T++]=o.y,x[T++]=o.z),t.tangent&&(v[S++]=a.x,v[S++]=a.y,v[S++]=a.z),t.bitangent&&(y[C++]=s.x,y[C++]=s.y,y[C++]=s.z)}var R=new a$_;return t.position&&(R.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:g})),t.normal&&(R.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:x})),t.tangent&&(R.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:v})),t.bitangent&&(R.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:y})),t.st&&(R.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:$})),new I$1p({attributes:R,indices:c,primitiveType:W$18.TRIANGLES})}function P$H(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).polygonHierarchy;o$1q.defined("options.polygonHierarchy",t);var i=u$_(e.vertexFormat,n$11.DEFAULT);this._vertexFormat=n$11.clone(i),this._polygonHierarchy=t,this._stRotation=u$_(e.stRotation,0),this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._workerName="createCoplanarPolygonGeometry",this.packedLength=y$_.computeHierarchyPackedLength(t)+n$11.packedLength+t$13.packedLength+2}P$H.fromPositions=function(e){return e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new P$H({polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid})},P$H.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),i=y$_.packPolygonHierarchy(e._polygonHierarchy,t,i),t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._stRotation,t[i]=e.packedLength,t};var Pe$e=t$13.clone(t$13.UNIT_SPHERE),Ae$i=new n$11,be$m={polygonHierarchy:{}};function T$H(e){for(var t=e.length,i=new Float64Array(3*t),n=ce$x.createTypedArray(t,2*t),r=0,o=0,a=0;a<t;a++){var s=e[a];i[r++]=s.x,i[r++]=s.y,i[r++]=s.z,n[o++]=a,n[o++]=(a+1)%t}return new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:i})}),indices:n,primitiveType:W$18.LINES})}function a$G(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).polygonHierarchy;o$1q.defined("options.polygonHierarchy",t),this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=y$_.computeHierarchyPackedLength(t)+1}P$H.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=y$_.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=t$13.unpack(e,t,Pe$e);t+=t$13.packedLength;var o=n$11.unpack(e,t,Ae$i);t+=n$11.packedLength;var a=e[t++],s=e[t];return e$2b(i)||(i=new P$H(be$m)),i._polygonHierarchy=n,i._ellipsoid=t$13.clone(r,i._ellipsoid),i._vertexFormat=n$11.clone(o,i._vertexFormat),i._stRotation=a,i.packedLength=s,i},P$H.createGeometry=function(e){var t=e._vertexFormat,i=e._polygonHierarchy,n=e._stRotation,r=i.positions;if(!((r=D$11(r,o$1p.equalsEpsilon,!0)).length<3)){var o=le$q,a=ve$i,s=fe$k,l=ye$g,u=he$j;if(g$P.computeProjectTo2DArguments(r,C$H,l,u)){if(o=o$1p.cross(l,u,o),o=o$1p.normalize(o,o),!o$1p.equalsEpsilon(C$H,o$1p.ZERO,e$2a.EPSILON6)){var c=e._ellipsoid.geodeticSurfaceNormal(C$H,ge$i);o$1p.dot(o,c)<0&&(o=o$1p.negate(o,o),l=o$1p.negate(l,l))}var h=g$P.createProjectPointsTo2DFunction(C$H,l,u),d=g$P.createProjectPointTo2DFunction(C$H,l,u);t.tangent&&(a=o$1p.clone(l,a)),t.bitangent&&(s=o$1p.clone(u,s));var f=y$_.polygonsFromHierarchy(i,h,!1),p=f.hierarchy,_=f.polygons;if(0!==p.length){r=p[0].outerRing;for(var m=i$1c.fromPoints(r),g=y$_.computeBoundingRectangle(o,d,r,n,pe$m),x=[],v=0;v<_.length;v++){var y=new d$1o({geometry:we$h(_[v],t,g,n,d,o,a,s)});x.push(y)}var $=k$13.combineInstances(x)[0];$.attributes.position.values=new Float64Array($.attributes.position.values),$.indices=ce$x.createTypedArray($.attributes.position.values.length/3,$.indices);var b=$.attributes;return t.position||delete b.position,new I$1p({attributes:b,indices:$.indices,primitiveType:$.primitiveType,boundingSphere:m})}}}},a$G.fromPositions=function(e){return e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new a$G({polygonHierarchy:{positions:e.positions}})},a$G.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i=y$_.packPolygonHierarchy(e._polygonHierarchy,t,i)]=e.packedLength,t};var C$G={polygonHierarchy:{}};a$G.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=y$_.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=e[t];return e$2b(i)||(i=new a$G(C$G)),i._polygonHierarchy=n,i.packedLength=r,i},a$G.createGeometry=function(e){var t=e._polygonHierarchy,i=t.positions;if(!((i=D$11(i,o$1p.equalsEpsilon,!0)).length<3)&&g$P.validOutline(i)){var n=y$_.polygonOutlinesFromHierarchy(t,!1);if(0!==n.length){for(var r=[],o=0;o<n.length;o++){var a=new d$1o({geometry:T$H(n[o])});r.push(a)}var s=k$13.combineInstances(r)[0],l=i$1c.fromPoints(t.positions);return new I$1p({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:l})}}};var e$Z={ROUNDED:0,MITERED:1,BEVELED:2},ar$5=Object.freeze(e$Z),g$O=[new o$1p,new o$1p],hr$2=new o$1p,gr$2=new o$1p,dr$1=new o$1p,pr$2=new o$1p,wr$2=new o$1p,Sr$1=new o$1p,Br$2=new o$1p,xr$3=new o$1p,Er$2=new o$1p,X$E=new o$1p,er$7=new o$1p,J$B={},ur$2=new a$18;function Tr$2(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++){var r=e[n];ur$2=t.cartesianToCartographic(r,ur$2),i[n]=ur$2.height,e[n]=t.scaleToGeodeticSurface(r,r)}return i}function $$G(e,t,i,n){var r,o=e[0],a=e[1],s=o$1p.angleBetween(o,a),l=Math.ceil(s/n),u=new Array(l);if(t===i){for(r=0;r<l;r++)u[r]=t;return u.push(i),u}var c=(i-t)/l;for(r=1;r<l;r++){var h=t+r*c;u[r]=h}return u[0]=t,u.push(i),u}var nr$5=new o$1p,tr$5=new o$1p;function zr$3(e,t,i,n){var r=new f$14(i,n),o=r.projectPointOntoPlane(o$1p.add(i,e,nr$5),nr$5),a=r.projectPointOntoPlane(o$1p.add(i,t,tr$5),tr$5),s=o$1o.angleBetween(o,a);return a.x*o.y-a.y*o.x>=0?-s:s}var Ar$1=new o$1p(-1,0,0),D$F=p$1d.clone(p$1d.IDENTITY),Cr$2=new p$1d,R$F=new p$1e,Nr$1=p$1e.IDENTITY.clone(),Fr$1=new o$1p,Lr$2=new e$29,vr$3=new o$1p;function I$U(e,t,i,n,r,o,a,s){var l=Fr$1,u=Lr$2;D$F=m$17.eastNorthUpToFixedFrame(e,r,D$F),l=p$1d.multiplyByPointAsVector(D$F,Ar$1,l);var c=zr$3(l=o$1p.normalize(l,l),t,e,r);R$F=p$1e.fromRotationZ(c,R$F),vr$3.z=o,D$F=p$1d.multiplyTransformation(D$F,p$1d.fromRotationTranslation(R$F,vr$3,Cr$2),D$F);var h=Nr$1;h[0]=a;for(var d=0;d<s;d++)for(var f=0;f<i.length;f+=3)u=o$1p.fromArray(i,f,u),u=p$1e.multiplyByVector(h,u,u),u=p$1d.multiplyByPoint(D$F,u,u),n.push(u.x,u.y,u.z);return n}function k$D(e,t,i,n,r,o,a,s,l){var u=Fr$1,c=Lr$2;D$F=m$17.eastNorthUpToFixedFrame(e,r,D$F),u=p$1d.multiplyByPointAsVector(D$F,Ar$1,u);var h=zr$3(u=o$1p.normalize(u,u),t,e,r);R$F=p$1e.fromRotationZ(h,R$F),vr$3.z=o,D$F=p$1d.multiplyTransformation(D$F,p$1d.fromRotationTranslation(R$F,vr$3,Cr$2),D$F);var d=Nr$1;d[0]=a;for(var f=0;f<s;f++)for(var p=0;p<i.length;p+=3)c=o$1p.fromArray(i,p,c),c=p$1e.multiplyByVector(d,c,c),c=p$1d.multiplyByPoint(D$F,c,c),c=p$1d.multiplyByPoint(l,c,c),n.push(c.x,c.y,c.z);return n}var Dr$1=new o$1p;function rr$7(e,t,i,n,r,o,a){for(var s=0;s<e.length;s+=3){n=I$U(o$1p.fromArray(e,s,Dr$1),t,i,n,r,o[s/3],a,1)}return n}function Ir$4(e,t,i,n,r,o,a,s){for(var l=0;l<e.length;l+=3){n=k$D(o$1p.fromArray(e,l,Dr$1),t,i,n,r,o[l/3],a,1,s)}return n}function Vr$1(e,t){var i=e.length,n=new Array(6*i),r=0,o=t.x+t.width/2,a=t.y+t.height/2,s=e[0];n[r++]=s.x-o,n[r++]=0,n[r++]=s.y-a;for(var l=1;l<i;l++){var u=(s=e[l]).x-o,c=s.y-a;n[r++]=u,n[r++]=0,n[r++]=c,n[r++]=u,n[r++]=0,n[r++]=c}return s=e[0],n[r++]=s.x-o,n[r++]=0,n[r++]=s.y-a,n}function lr$4(e,t){for(var i=e.length,n=new Array(3*i),r=0,o=t.x+t.width/2,a=t.y+t.height/2,s=0;s<i;s++)n[r++]=e[s].x-o,n[r++]=0,n[r++]=e[s].y-a;return n}var Mr$3=new n$13,Or$1=new o$1p,Gr$2=new p$1e;function or$4(e,t,i,n,r,o,a,s,l,u){var c,h,d=o$1p.angleBetween(o$1p.subtract(t,e,X$E),o$1p.subtract(i,e,er$7)),f=n===ar$5.BEVELED?0:Math.ceil(d/e$2a.toRadians(5));if(c=r?p$1e.fromQuaternion(n$13.fromAxisAngle(o$1p.negate(e,X$E),d/(f+1),Mr$3),Gr$2):p$1e.fromQuaternion(n$13.fromAxisAngle(e,d/(f+1),Mr$3),Gr$2),t=o$1p.clone(t,Or$1),f>0)for(var p=u?2:1,_=0;_<f;_++)t=p$1e.multiplyByVector(c,t,t),h=o$1p.subtract(t,e,X$E),h=o$1p.normalize(h,h),r||(h=o$1p.negate(h,h)),a=I$U(o.scaleToGeodeticSurface(t,er$7),h,s,a,o,l,1,p);else h=o$1p.subtract(t,e,X$E),h=o$1p.normalize(h,h),r||(h=o$1p.negate(h,h)),a=I$U(o.scaleToGeodeticSurface(t,er$7),h,s,a,o,l,1,1),i=o$1p.clone(i,Or$1),h=o$1p.subtract(i,e,X$E),h=o$1p.normalize(h,h),r||(h=o$1p.negate(h,h)),a=I$U(o.scaleToGeodeticSurface(i,er$7),h,s,a,o,l,1,1);return a}J$B.removeDuplicatesFromShape=function(e){for(var t=e.length,i=[],n=t-1,r=0;r<t;n=r++){var o=e[n],a=e[r];o$1o.equals(o,a)||i.push(a)}return i},J$B.angleIsGreaterThanPi=function(e,t,i,n){var r=new f$14(i,n),o=r.projectPointOntoPlane(o$1p.add(i,e,nr$5),nr$5),a=r.projectPointOntoPlane(o$1p.add(i,t,tr$5),tr$5);return a.x*o.y-a.y*o.x>=0};var Ur$3=new o$1p,_r$2=new o$1p;J$B.computePositions=function(e,t,i,n,r){var o=n._ellipsoid,a=Tr$2(e,o),s=n._granularity,l=n._cornerType,u=r?Vr$1(t,i):lr$4(t,i),c=r?lr$4(t,i):void 0,h=i.height/2,d=i.width/2,f=e.length,p=[],_=r?[]:void 0,m=hr$2,g=gr$2,x=dr$1,v=pr$2,y=wr$2,$=Sr$1,b=Br$2,T=xr$3,C=Er$2,S=e[0],w=e[1];v=o.geodeticSurfaceNormal(S,v),m=o$1p.subtract(w,S,m),m=o$1p.normalize(m,m),T=o$1p.cross(v,m,T),T=o$1p.normalize(T,T);var E=a[0],P=a[1];r&&(_=I$U(S,T,c,_,o,E+h,1,1)),C=o$1p.clone(S,C),S=w,g=o$1p.negate(m,g);for(var A,L=1;L<f-1;L++){var M=r?2:1;w=e[L+1],m=o$1p.subtract(w,S,m),m=o$1p.normalize(m,m),x=o$1p.add(m,g,x),x=o$1p.normalize(x,x),v=o.geodeticSurfaceNormal(S,v);var R=o$1p.multiplyByScalar(v,o$1p.dot(m,v),Ur$3);o$1p.subtract(m,R,R),o$1p.normalize(R,R);var I=o$1p.multiplyByScalar(v,o$1p.dot(g,v),_r$2);if(o$1p.subtract(g,I,I),o$1p.normalize(I,I),!e$2a.equalsEpsilon(Math.abs(o$1p.dot(R,I)),1,e$2a.EPSILON7)){x=o$1p.cross(x,v,x),x=o$1p.cross(v,x,x),x=o$1p.normalize(x,x);var O=1/Math.max(.25,o$1p.magnitude(o$1p.cross(x,g,X$E))),D=J$B.angleIsGreaterThanPi(m,g,S,o);D?(y=o$1p.add(S,o$1p.multiplyByScalar(x,O*d,x),y),$=o$1p.add(y,o$1p.multiplyByScalar(T,d,$),$),g$O[0]=o$1p.clone(C,g$O[0]),g$O[1]=o$1p.clone($,g$O[1]),A=$$G(g$O,E+h,P+h,s),p=rr$7(m$V.generateArc({positions:g$O,granularity:s,ellipsoid:o}),T,u,p,o,A,1),T=o$1p.cross(v,m,T),T=o$1p.normalize(T,T),b=o$1p.add(y,o$1p.multiplyByScalar(T,d,b),b),l===ar$5.ROUNDED||l===ar$5.BEVELED?or$4(y,$,b,l,D,o,p,u,P+h,r):p=I$U(S,x=o$1p.negate(x,x),u,p,o,P+h,O,M),C=o$1p.clone(b,C)):(y=o$1p.add(S,o$1p.multiplyByScalar(x,O*d,x),y),$=o$1p.add(y,o$1p.multiplyByScalar(T,-d,$),$),g$O[0]=o$1p.clone(C,g$O[0]),g$O[1]=o$1p.clone($,g$O[1]),A=$$G(g$O,E+h,P+h,s),p=rr$7(m$V.generateArc({positions:g$O,granularity:s,ellipsoid:o}),T,u,p,o,A,1),T=o$1p.cross(v,m,T),T=o$1p.normalize(T,T),b=o$1p.add(y,o$1p.multiplyByScalar(T,-d,b),b),l===ar$5.ROUNDED||l===ar$5.BEVELED?or$4(y,$,b,l,D,o,p,u,P+h,r):p=I$U(S,x,u,p,o,P+h,O,M),C=o$1p.clone(b,C)),g=o$1p.negate(m,g)}else p=I$U(C,T,u,p,o,E+h,1,1),C=S;E=P,P=a[L+1],S=w}g$O[0]=o$1p.clone(C,g$O[0]),g$O[1]=o$1p.clone(S,g$O[1]),A=$$G(g$O,E+h,P+h,s),p=rr$7(m$V.generateArc({positions:g$O,granularity:s,ellipsoid:o}),T,u,p,o,A,1),r&&(_=I$U(S,T,c,_,o,P+h,1,1)),f=p.length;var B=r?f+_.length:f,N=new Float64Array(B);return N.set(p),r&&N.set(_,f),N},J$B.computeLocalPositions=function(e,t,i,n,r,o){var a=n._ellipsoid,s=Tr$2(e,a),l=n._granularity,u=n._cornerType,c=r?Vr$1(t,i):lr$4(t,i),h=r?lr$4(t,i):void 0,d=i.width/2,f=e.length,p=[],_=r?[]:void 0,m=hr$2,g=gr$2,x=dr$1,v=pr$2,y=wr$2,$=Sr$1,b=Br$2,T=xr$3,C=Er$2,S=m$17.eastNorthUpToFixedFrame(o,a,new p$1d),w=p$1d.inverse(S,new p$1d),E=e[0],P=e[1];v=a.geodeticSurfaceNormal(E,v),m=o$1p.subtract(P,E,m),m=o$1p.normalize(m,m),T=o$1p.cross(v,m,T),T=o$1p.normalize(T,T);var A=s[0],L=s[1];r&&(_=k$D(E,T,h,_,a,A+0,1,1,w)),C=o$1p.clone(E,C),E=P,g=o$1p.negate(m,g);for(var M,R=1;R<f-1;R++){var I=r?2:1;P=e[R+1],m=o$1p.subtract(P,E,m),m=o$1p.normalize(m,m),x=o$1p.add(m,g,x),x=o$1p.normalize(x,x),v=a.geodeticSurfaceNormal(E,v);var O=o$1p.multiplyByScalar(v,o$1p.dot(m,v),Ur$3);o$1p.subtract(m,O,O),o$1p.normalize(O,O);var D=o$1p.multiplyByScalar(v,o$1p.dot(g,v),_r$2);if(o$1p.subtract(g,D,D),o$1p.normalize(D,D),!e$2a.equalsEpsilon(Math.abs(o$1p.dot(O,D)),1,e$2a.EPSILON7)){x=o$1p.cross(x,v,x),x=o$1p.cross(v,x,x),x=o$1p.normalize(x,x);var B=1/Math.max(.25,o$1p.magnitude(o$1p.cross(x,g,X$E))),N=J$B.angleIsGreaterThanPi(m,g,E,a);N?(y=o$1p.add(E,o$1p.multiplyByScalar(x,B*d,x),y),$=o$1p.add(y,o$1p.multiplyByScalar(T,d,$),$),g$O[0]=o$1p.clone(C,g$O[0]),g$O[1]=o$1p.clone($,g$O[1]),M=$$G(g$O,A+0,L+0,l),p=rr$7(m$V.generateArc({positions:g$O,granularity:l,ellipsoid:a}),T,c,p,a,M,1,fromEnu),T=o$1p.cross(v,m,T),T=o$1p.normalize(T,T),b=o$1p.add(y,o$1p.multiplyByScalar(T,d,b),b),u===ar$5.ROUNDED||u===ar$5.BEVELED?or$4(y,$,b,u,N,a,p,c,L+0,r):p=k$D(E,x=o$1p.negate(x,x),c,p,a,L+0,B,I,w),C=o$1p.clone(b,C)):(y=o$1p.add(E,o$1p.multiplyByScalar(x,B*d,x),y),$=o$1p.add(y,o$1p.multiplyByScalar(T,-d,$),$),g$O[0]=o$1p.clone(C,g$O[0]),g$O[1]=o$1p.clone($,g$O[1]),M=$$G(g$O,A+0,L+0,l),p=rr$7(m$V.generateArc({positions:g$O,granularity:l,ellipsoid:a}),T,c,p,a,M,1),T=o$1p.cross(v,m,T),T=o$1p.normalize(T,T),b=o$1p.add(y,o$1p.multiplyByScalar(T,-d,b),b),u===ar$5.ROUNDED||u===ar$5.BEVELED?or$4(y,$,b,u,N,a,p,c,L+0,r):p=k$D(E,x,c,p,a,L+0,B,I,w),C=o$1p.clone(b,C)),g=o$1p.negate(m,g)}else p=k$D(C,T,c,p,a,A+0,1,1,w),C=E;A=L,L=s[R+1],E=P}g$O[0]=o$1p.clone(C,g$O[0]),g$O[1]=o$1p.clone(E,g$O[1]),M=$$G(g$O,A+0,L+0,l),p=Ir$4(m$V.generateArc({positions:g$O,granularity:l,ellipsoid:a}),T,c,p,a,M,1,w),r&&(_=k$D(E,T,h,_,a,L+0,1,1,w)),f=p.length;var F=r?f+_.length:f,U=new Float64Array(F);return U.set(p),r&&U.set(_,f),U};var b$S={},A$O=new o$1p,H$L=new o$1p,P$G=new o$1p,I$T=new o$1p,g$N=[new o$1p,new o$1p],J$A=new o$1p,K$F=new o$1p,W$K=new o$1p,rr$6=new o$1p,ar$4=new o$1p,er$6=new o$1p,nr$4=new o$1p,ir$4=new o$1p,lr$3=new o$1p,tr$4=new o$1p,X$D=new n$13,Y$w=new p$1e;function V$x(e,t,i,n,r){var o,a=o$1p.angleBetween(o$1p.subtract(t,e,A$O),o$1p.subtract(i,e,H$L)),s=n===ar$5.BEVELED?1:Math.ceil(a/e$2a.toRadians(5))+1,l=3*s,u=new Array(l);u[l-3]=i.x,u[l-2]=i.y,u[l-1]=i.z,o=r?p$1e.fromQuaternion(n$13.fromAxisAngle(o$1p.negate(e,A$O),a/s,X$D),Y$w):p$1e.fromQuaternion(n$13.fromAxisAngle(e,a/s,X$D),Y$w);var c=0;t=o$1p.clone(t,A$O);for(var h=0;h<s;h++)t=p$1e.multiplyByVector(o,t,t),u[c++]=t.x,u[c++]=t.y,u[c++]=t.z;return u}function or$3(e){var t=J$A,i=K$F,n=W$K,r=e[1];i=o$1p.fromArray(e[1],r.length-3,i),n=o$1p.fromArray(e[0],0,n);var o=V$x(t=o$1p.midpoint(i,n,t),i,n,ar$5.ROUNDED,!1),a=e.length-1,s=e[a-1];return r=e[a],i=o$1p.fromArray(s,s.length-3,i),n=o$1p.fromArray(r,0,n),[o,V$x(t=o$1p.midpoint(i,n,t),i,n,ar$5.ROUNDED,!1)]}function Z$E(e,t,i,n){var r=A$O;return n||(t=o$1p.negate(t,t)),[(r=o$1p.add(e,t,r)).x,r.y,r.z,i.x,i.y,i.z]}function q$M(e,t,i,n){for(var r=new Array(e.length),o=new Array(e.length),a=o$1p.multiplyByScalar(t,i,A$O),s=o$1p.negate(a,H$L),l=0,u=e.length-1,c=0;c<e.length;c+=3){var h=o$1p.fromArray(e,c,P$G),d=o$1p.add(h,s,I$T);r[l++]=d.x,r[l++]=d.y,r[l++]=d.z;var f=o$1p.add(h,a,I$T);o[u--]=f.z,o[u--]=f.y,o[u--]=f.x}return n.push(r,o),n}b$S.addAttribute=function(e,t,i,n){var r=t.x,o=t.y,a=t.z;e$2b(i)&&(e[i]=r,e[i+1]=o,e[i+2]=a),e$2b(n)&&(e[n]=a,e[n-1]=o,e[n-2]=r)};var vr$2=new o$1p,sr$4=new o$1p;b$S.computePositions=function(e){var t=e.granularity,i=e.positions,n=e.ellipsoid,r=e.width/2,o=e.cornerType,a=e.saveAttributes,s=J$A,l=K$F,u=W$K,c=rr$6,h=ar$4,d=er$6,f=nr$4,p=ir$4,_=lr$3,m=tr$4,g=[],x=a?[]:void 0,v=a?[]:void 0,y=i[0],$=i[1];l=o$1p.normalize(o$1p.subtract($,y,l),l),s=n.geodeticSurfaceNormal(y,s),c=o$1p.normalize(o$1p.cross(s,l,c),c),a&&(x.push(c.x,c.y,c.z),v.push(s.x,s.y,s.z)),f=o$1p.clone(y,f),y=$,u=o$1p.negate(l,u);var b,T,C=[],S=i.length;for(b=1;b<S-1;b++){s=n.geodeticSurfaceNormal(y,s),$=i[b+1],l=o$1p.normalize(o$1p.subtract($,y,l),l),h=o$1p.normalize(o$1p.add(l,u,h),h);var w=o$1p.multiplyByScalar(s,o$1p.dot(l,s),vr$2);o$1p.subtract(l,w,w),o$1p.normalize(w,w);var E=o$1p.multiplyByScalar(s,o$1p.dot(u,s),sr$4);if(o$1p.subtract(u,E,E),o$1p.normalize(E,E),!e$2a.equalsEpsilon(Math.abs(o$1p.dot(w,E)),1,e$2a.EPSILON7)){h=o$1p.cross(h,s,h),h=o$1p.cross(s,h,h),h=o$1p.normalize(h,h);var P=r/Math.max(.25,o$1p.magnitude(o$1p.cross(h,u,A$O))),A=J$B.angleIsGreaterThanPi(l,u,y,n);h=o$1p.multiplyByScalar(h,P,h),A?(p=o$1p.add(y,h,p),m=o$1p.add(p,o$1p.multiplyByScalar(c,r,m),m),_=o$1p.add(p,o$1p.multiplyByScalar(c,2*r,_),_),g$N[0]=o$1p.clone(f,g$N[0]),g$N[1]=o$1p.clone(m,g$N[1]),g=q$M(m$V.generateArc({positions:g$N,granularity:t,ellipsoid:n}),c,r,g),a&&(x.push(c.x,c.y,c.z),v.push(s.x,s.y,s.z)),d=o$1p.clone(_,d),c=o$1p.normalize(o$1p.cross(s,l,c),c),_=o$1p.add(p,o$1p.multiplyByScalar(c,2*r,_),_),f=o$1p.add(p,o$1p.multiplyByScalar(c,r,f),f),o===ar$5.ROUNDED||o===ar$5.BEVELED?C.push({leftPositions:V$x(p,d,_,o,A)}):C.push({leftPositions:Z$E(y,o$1p.negate(h,h),_,A)})):(_=o$1p.add(y,h,_),m=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,r,m),m),m),p=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,2*r,p),p),p),g$N[0]=o$1p.clone(f,g$N[0]),g$N[1]=o$1p.clone(m,g$N[1]),g=q$M(m$V.generateArc({positions:g$N,granularity:t,ellipsoid:n}),c,r,g),a&&(x.push(c.x,c.y,c.z),v.push(s.x,s.y,s.z)),d=o$1p.clone(p,d),c=o$1p.normalize(o$1p.cross(s,l,c),c),p=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,2*r,p),p),p),f=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,r,f),f),f),o===ar$5.ROUNDED||o===ar$5.BEVELED?C.push({rightPositions:V$x(_,d,p,o,A)}):C.push({rightPositions:Z$E(y,h,p,A)})),u=o$1p.negate(l,u)}y=$}return s=n.geodeticSurfaceNormal(y,s),g$N[0]=o$1p.clone(f,g$N[0]),g$N[1]=o$1p.clone(y,g$N[1]),g=q$M(m$V.generateArc({positions:g$N,granularity:t,ellipsoid:n}),c,r,g),a&&(x.push(c.x,c.y,c.z),v.push(s.x,s.y,s.z)),o===ar$5.ROUNDED&&(T=or$3(g)),{positions:g,corners:C,lefts:x,normals:v,endPositions:T}};var Be$f=new o$1p,Ye$9=new o$1p,Le$k=new o$1p,Ne$e=new o$1p,Pe$d=new o$1p,We$c=new o$1p,fe$j=new o$1p,me$m=new o$1p;function Ge$a(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function j$G(e,t,i,n,r,o){var a=e.normals,s=e.tangents,l=e.bitangents,u=o$1p.normalize(o$1p.cross(i,t,fe$j),fe$j);o.normal&&b$S.addAttribute(a,t,n,r),o.tangent&&b$S.addAttribute(s,u,n,r),o.bitangent&&b$S.addAttribute(l,i,n,r)}function qe$7(e,t,i){var n,r,o,a=e.positions,s=e.corners,l=e.endPositions,u=e.lefts,c=e.normals,h=new a$_,d=0,f=0,p=0;for(r=0;r<a.length;r+=2)d+=o=a[r].length-3,p+=2*o,f+=a[r+1].length-3;for(d+=3,f+=3,r=0;r<s.length;r++){n=s[r];var _=s[r].leftPositions;e$2b(_)?(d+=o=_.length,p+=o):(f+=o=s[r].rightPositions.length,p+=o)}var m,g=e$2b(l);g&&(d+=m=l[0].length-3,f+=m,p+=6*(m/=3));var x,v,y,$,b,T,C=d+f,S=new Float64Array(C),w={normals:t.normal?new Float32Array(C):void 0,tangents:t.tangent?new Float32Array(C):void 0,bitangents:t.bitangent?new Float32Array(C):void 0},E=0,P=C-1,A=Be$f,L=Ye$9,M=m/2,R=ce$x.createTypedArray(C/3,p),I=0;if(g){T=Le$k,b=Ne$e;var O=l[0];for(A=o$1p.fromArray(c,0,A),L=o$1p.fromArray(u,0,L),r=0;r<M;r++)T=o$1p.fromArray(O,3*(M-1-r),T),b=o$1p.fromArray(O,3*(M+r),b),b$S.addAttribute(S,b,E),b$S.addAttribute(S,T,void 0,P),j$G(w,A,L,E,P,t),$=(v=E/3)+1,y=(x=(P-2)/3)-1,R[I++]=x,R[I++]=v,R[I++]=y,R[I++]=y,R[I++]=v,R[I++]=$,E+=3,P-=3}var D,B,N=0,F=0,U=a[N++],z=a[N++];for(S.set(U,E),S.set(z,P-z.length+1),L=o$1p.fromArray(u,F,L),o=z.length-3,r=0;r<o;r+=3)D=i.geodeticSurfaceNormal(o$1p.fromArray(U,r,fe$j),fe$j),B=i.geodeticSurfaceNormal(o$1p.fromArray(z,o-r,me$m),me$m),j$G(w,A=o$1p.normalize(o$1p.add(D,B,A),A),L,E,P,t),$=(v=E/3)+1,y=(x=(P-2)/3)-1,R[I++]=x,R[I++]=v,R[I++]=y,R[I++]=y,R[I++]=v,R[I++]=$,E+=3,P-=3;for(D=i.geodeticSurfaceNormal(o$1p.fromArray(U,o,fe$j),fe$j),B=i.geodeticSurfaceNormal(o$1p.fromArray(z,o,me$m),me$m),A=o$1p.normalize(o$1p.add(D,B,A),A),F+=3,r=0;r<s.length;r++){var G,V,k,W=(n=s[r]).leftPositions,H=n.rightPositions,q=We$c,j=Le$k,Y=Ne$e;if(A=o$1p.fromArray(c,F,A),e$2b(W)){for(j$G(w,A,L,void 0,P,t),P-=3,V=$,k=y,G=0;G<W.length/3;G++)q=o$1p.fromArray(W,3*G,q),R[I++]=V,R[I++]=k-G-1,R[I++]=k-G,b$S.addAttribute(S,q,void 0,P),j=o$1p.fromArray(S,3*(k-G-1),j),Y=o$1p.fromArray(S,3*V,Y),j$G(w,A,L=o$1p.normalize(o$1p.subtract(j,Y,L),L),void 0,P,t),P-=3;q=o$1p.fromArray(S,3*V,q),j=o$1p.subtract(o$1p.fromArray(S,3*k,j),q,j),Y=o$1p.subtract(o$1p.fromArray(S,3*(k-G),Y),q,Y),j$G(w,A,L=o$1p.normalize(o$1p.add(j,Y,L),L),E,void 0,t),E+=3}else{for(j$G(w,A,L,E,void 0,t),E+=3,V=y,k=$,G=0;G<H.length/3;G++)q=o$1p.fromArray(H,3*G,q),R[I++]=V,R[I++]=k+G,R[I++]=k+G+1,b$S.addAttribute(S,q,E),j=o$1p.fromArray(S,3*V,j),Y=o$1p.fromArray(S,3*(k+G),Y),j$G(w,A,L=o$1p.normalize(o$1p.subtract(j,Y,L),L),E,void 0,t),E+=3;q=o$1p.fromArray(S,3*V,q),j=o$1p.subtract(o$1p.fromArray(S,3*(k+G),j),q,j),Y=o$1p.subtract(o$1p.fromArray(S,3*k,Y),q,Y),j$G(w,A,L=o$1p.normalize(o$1p.negate(o$1p.add(Y,j,L),L),L),void 0,P,t),P-=3}for(U=a[N++],z=a[N++],U.splice(0,3),z.splice(z.length-3,3),S.set(U,E),S.set(z,P-z.length+1),o=z.length-3,F+=3,L=o$1p.fromArray(u,F,L),G=0;G<z.length;G+=3)D=i.geodeticSurfaceNormal(o$1p.fromArray(U,G,fe$j),fe$j),B=i.geodeticSurfaceNormal(o$1p.fromArray(z,o-G,me$m),me$m),j$G(w,A=o$1p.normalize(o$1p.add(D,B,A),A),L,E,P,t),v=($=E/3)-1,x=(y=(P-2)/3)+1,R[I++]=x,R[I++]=v,R[I++]=y,R[I++]=y,R[I++]=v,R[I++]=$,E+=3,P-=3;E-=3,P+=3}if(j$G(w,A=o$1p.fromArray(c,c.length-3,A),L,E,P,t),g){E+=3,P-=3,T=Le$k,b=Ne$e;var X=l[1];for(r=0;r<M;r++)T=o$1p.fromArray(X,3*(m-r-1),T),b=o$1p.fromArray(X,3*r,b),b$S.addAttribute(S,T,void 0,P),b$S.addAttribute(S,b,E),j$G(w,A,L,E,P,t),v=($=E/3)-1,x=(y=(P-2)/3)+1,R[I++]=x,R[I++]=v,R[I++]=y,R[I++]=y,R[I++]=v,R[I++]=$,E+=3,P-=3}if(h.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:S}),t.st){var K,Q,Z=new Float32Array(C/3*2),J=0;if(g){d/=3,f/=3;var ee=Math.PI/(m+1);Q=1/(d-m+1),K=1/(f-m+1);var te,ie=m/2;for(r=ie+1;r<m+1;r++)te=e$2a.PI_OVER_TWO+ee*r,Z[J++]=K*(1+Math.cos(te)),Z[J++]=.5*(1+Math.sin(te));for(r=1;r<f-m+1;r++)Z[J++]=r*K,Z[J++]=0;for(r=m;r>ie;r--)te=e$2a.PI_OVER_TWO-r*ee,Z[J++]=1-K*(1+Math.cos(te)),Z[J++]=.5*(1+Math.sin(te));for(r=ie;r>0;r--)te=e$2a.PI_OVER_TWO-ee*r,Z[J++]=1-Q*(1+Math.cos(te)),Z[J++]=.5*(1+Math.sin(te));for(r=d-m;r>0;r--)Z[J++]=r*Q,Z[J++]=1;for(r=1;r<ie+1;r++)te=e$2a.PI_OVER_TWO+ee*r,Z[J++]=Q*(1+Math.cos(te)),Z[J++]=.5*(1+Math.sin(te))}else{for(Q=1/((d/=3)-1),K=1/((f/=3)-1),r=0;r<f;r++)Z[J++]=r*K,Z[J++]=0;for(r=d;r>0;r--)Z[J++]=(r-1)*Q,Z[J++]=1}h.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:Z})}return t.normal&&(h.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:w.normals})),t.tangent&&(h.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:w.tangents})),t.bitangent&&(h.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:w.bitangents})),{attributes:h,indices:R}}function xe$g(e,t){if(!(t.normal||t.tangent||t.bitangent||t.st))return e;var i,n,r=e.position.values;(t.normal||t.bitangent)&&(i=e.normal.values,n=e.bitangent.values);var o,a=e.position.values.length/18,s=3*a,l=2*a,u=2*s;if(t.normal||t.bitangent||t.tangent){var c=t.normal?new Float32Array(6*s):void 0,h=t.tangent?new Float32Array(6*s):void 0,d=t.bitangent?new Float32Array(6*s):void 0,f=Be$f,p=Ye$9,_=Le$k,m=Ne$e,g=Pe$d,x=We$c,v=u;for(o=0;o<s;o+=3){var y=v+u;f=o$1p.fromArray(r,o,f),p=o$1p.fromArray(r,o+s,p),_=o$1p.fromArray(r,(o+3)%s,_),p=o$1p.subtract(p,f,p),_=o$1p.subtract(_,f,_),m=o$1p.normalize(o$1p.cross(p,_,m),m),t.normal&&(b$S.addAttribute(c,m,y),b$S.addAttribute(c,m,y+3),b$S.addAttribute(c,m,v),b$S.addAttribute(c,m,v+3)),(t.tangent||t.bitangent)&&(x=o$1p.fromArray(i,o,x),t.bitangent&&(b$S.addAttribute(d,x,y),b$S.addAttribute(d,x,y+3),b$S.addAttribute(d,x,v),b$S.addAttribute(d,x,v+3)),t.tangent&&(g=o$1p.normalize(o$1p.cross(x,m,g),g),b$S.addAttribute(h,g,y),b$S.addAttribute(h,g,y+3),b$S.addAttribute(h,g,v),b$S.addAttribute(h,g,v+3))),v+=6}if(t.normal){for(c.set(i),o=0;o<s;o+=3)c[o+s]=-i[o],c[o+s+1]=-i[o+1],c[o+s+2]=-i[o+2];e.normal.values=c}else e.normal=void 0;if(t.bitangent?(d.set(n),d.set(n,s),e.bitangent.values=d):e.bitangent=void 0,t.tangent){var $=e.tangent.values;h.set($),h.set($,s),e.tangent.values=h}}if(t.st){var b=e.st.values,T=new Float32Array(6*l);T.set(b),T.set(b,l);for(var C=2*l,S=0;S<2;S++){for(T[C++]=b[0],T[C++]=b[1],o=2;o<l;o+=2){var w=b[o],E=b[o+1];T[C++]=w,T[C++]=E,T[C++]=w,T[C++]=E}T[C++]=b[0],T[C++]=b[1]}e.st.values=T}return e}function Oe$g(e,t,i){i[t++]=e[0],i[t++]=e[1],i[t++]=e[2];for(var n=3;n<e.length;n+=3){var r=e[n],o=e[n+1],a=e[n+2];i[t++]=r,i[t++]=o,i[t++]=a,i[t++]=r,i[t++]=o,i[t++]=a}return i[t++]=e[0],i[t++]=e[1],i[t++]=e[2],i}function er$5(e,t){var i=new n$11({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),n=e.ellipsoid,r=qe$7(b$S.computePositions(e),i,n),o=e.height,a=e.extrudedHeight,s=r.attributes,l=r.indices,u=s.position.values,c=u.length,h=new Float64Array(6*c),d=new Float64Array(c);d.set(u);var f=new Float64Array(4*c);f=Oe$g(u=A$1g.scaleToGeodeticHeight(u,o,n),0,f),f=Oe$g(d=A$1g.scaleToGeodeticHeight(d,a,n),2*c,f),h.set(u),h.set(d,c),h.set(f,2*c),s.position.values=h,s=xe$g(s,t);var p,_=c/3;if(e.shadowVolume){var m=s.normal.values;c=m.length;var g=new Float32Array(6*c);for(p=0;p<c;p++)m[p]=-m[p];g.set(m,c),g=Oe$g(m,4*c,g),s.extrudeDirection=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:g}),t.normal||(s.normal=void 0)}if(e$2b(e.offsetAttribute)){var x=new Uint8Array(6*_);if(e.offsetAttribute===_0x58701d.TOP)x=d$1s(x,1,0,_),x=d$1s(x,1,2*_,4*_);else x=d$1s(x,e.offsetAttribute===_0x58701d.NONE?0:1);s.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}var v=l.length,y=_+_,$=ce$x.createTypedArray(h.length/3,2*v+3*y);$.set(l);var b,T,C,S,w=v;for(p=0;p<v;p+=3){var E=l[p],P=l[p+1],A=l[p+2];$[w++]=A+_,$[w++]=P+_,$[w++]=E+_}for(p=0;p<y;p+=2)C=(b=p+y)+1,S=(T=b+y)+1,$[w++]=b,$[w++]=T,$[w++]=C,$[w++]=C,$[w++]=T,$[w++]=S;return{attributes:s,indices:$}}var Je$5=new o$1p,pe$l=new o$1p,X$C=new a$18;function Ke$8(e,t,i,n,r,o){var a=o$1p.subtract(t,e,Je$5);o$1p.normalize(a,a);var s=i.geodeticSurfaceNormal(e,pe$l),l=o$1p.cross(a,s,Je$5);o$1p.multiplyByScalar(l,n,l);var u=r.latitude,c=r.longitude,h=o.latitude,d=o.longitude;o$1p.add(e,l,pe$l),i.cartesianToCartographic(pe$l,X$C);var f=X$C.latitude,p=X$C.longitude;u=Math.min(u,f),c=Math.min(c,p),h=Math.max(h,f),d=Math.max(d,p),o$1p.subtract(e,l,pe$l),i.cartesianToCartographic(pe$l,X$C),f=X$C.latitude,p=X$C.longitude,u=Math.min(u,f),c=Math.min(c,p),h=Math.max(h,f),d=Math.max(d,p),r.latitude=u,r.longitude=c,o.latitude=h,o.longitude=d}var Z$D=new o$1p,_e$l=new o$1p,G$P=new a$18,q$L=new a$18;function Qe$6(e,t,i,n,r){var o=D$11(e=Ge$a(e,t),o$1p.equalsEpsilon),a=o.length;if(a<2||i<=0)return new h$18;var s,l,u=.5*i;if(G$P.latitude=Number.POSITIVE_INFINITY,G$P.longitude=Number.POSITIVE_INFINITY,q$L.latitude=Number.NEGATIVE_INFINITY,q$L.longitude=Number.NEGATIVE_INFINITY,n===ar$5.ROUNDED){var c=o[0];o$1p.subtract(c,o[1],Z$D),o$1p.normalize(Z$D,Z$D),o$1p.multiplyByScalar(Z$D,u,Z$D),o$1p.add(c,Z$D,_e$l),t.cartesianToCartographic(_e$l,X$C),s=X$C.latitude,l=X$C.longitude,G$P.latitude=Math.min(G$P.latitude,s),G$P.longitude=Math.min(G$P.longitude,l),q$L.latitude=Math.max(q$L.latitude,s),q$L.longitude=Math.max(q$L.longitude,l)}for(var h=0;h<a-1;++h)Ke$8(o[h],o[h+1],t,u,G$P,q$L);var d=o[a-1];o$1p.subtract(d,o[a-2],Z$D),o$1p.normalize(Z$D,Z$D),o$1p.multiplyByScalar(Z$D,u,Z$D),o$1p.add(d,Z$D,_e$l),Ke$8(d,_e$l,t,u,G$P,q$L),n===ar$5.ROUNDED&&(t.cartesianToCartographic(_e$l,X$C),s=X$C.latitude,l=X$C.longitude,G$P.latitude=Math.min(G$P.latitude,s),G$P.longitude=Math.min(G$P.longitude,l),q$L.latitude=Math.max(q$L.latitude,s),q$L.longitude=Math.max(q$L.longitude,l));var f=e$2b(r)?r:new h$18;return f.north=q$L.latitude,f.south=G$P.latitude,f.east=q$L.longitude,f.west=G$P.longitude,f}function P$F(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,i=e.width;o$1q.defined("options.positions",t),o$1q.defined("options.width",i);var n=u$_(e.height,0),r=u$_(e.extrudedHeight,n);this._positions=t,this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._vertexFormat=n$11.clone(u$_(e.vertexFormat,n$11.DEFAULT)),this._width=i,this._height=Math.max(n,r),this._extrudedHeight=Math.min(n,r),this._cornerType=u$_(e.cornerType,ar$5.ROUNDED),this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._shadowVolume=u$_(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*o$1p.packedLength+t$13.packedLength+n$11.packedLength+7}P$F.pack=function(e,t,i){o$1q.defined("value",e),o$1q.defined("array",t),i=u$_(i,0);var n=e._positions,r=n.length;t[i++]=r;for(var o=0;o<r;++o,i+=o$1p.packedLength)o$1p.pack(n[o],t,i);return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i++]=e._shadowVolume?1:0,t[i]=u$_(e._offsetAttribute,-1),t};var Xe$8=t$13.clone(t$13.UNIT_SPHERE),Ze$7=new n$11,x$M={positions:void 0,ellipsoid:Xe$8,vertexFormat:Ze$7,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};P$F.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);for(var n=e[t++],r=new Array(n),o=0;o<n;++o,t+=o$1p.packedLength)r[o]=o$1p.unpack(e,t);var a=t$13.unpack(e,t,Xe$8);t+=t$13.packedLength;var s=n$11.unpack(e,t,Ze$7);t+=n$11.packedLength;var l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=1===e[t++],p=e[t];return e$2b(i)?(i._positions=r,i._ellipsoid=t$13.clone(a,i._ellipsoid),i._vertexFormat=n$11.clone(s,i._vertexFormat),i._width=l,i._height=u,i._extrudedHeight=c,i._cornerType=h,i._granularity=d,i._shadowVolume=f,i._offsetAttribute=-1===p?void 0:p,i):(x$M.positions=r,x$M.width=l,x$M.height=u,x$M.extrudedHeight=c,x$M.cornerType=h,x$M.granularity=d,x$M.shadowVolume=f,x$M.offsetAttribute=-1===p?void 0:p,new P$F(x$M))},P$F.computeRectangle=function(e,t){var i=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,n=e.width;return o$1q.defined("options.positions",i),o$1q.defined("options.width",n),Qe$6(i,u$_(e.ellipsoid,t$13.WGS84),n,u$_(e.cornerType,ar$5.ROUNDED),t)},P$F.createGeometry=function(e){var t=e._positions,i=e._width,n=e._ellipsoid,r=D$11(t=Ge$a(t,n),o$1p.equalsEpsilon);if(!(r.length<2||i<=0)){var o,a=e._height,s=e._extrudedHeight,l=!e$2a.equalsEpsilon(a,s,0,e$2a.EPSILON2),u=e._vertexFormat,c={ellipsoid:n,positions:r,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0};if(l)c.height=a,c.extrudedHeight=s,c.shadowVolume=e._shadowVolume,c.offsetAttribute=e._offsetAttribute,o=er$5(c,u);else if((o=qe$7(b$S.computePositions(c),u,n)).attributes.position.values=A$1g.scaleToGeodeticHeight(o.attributes.position.values,a,n),e$2b(e._offsetAttribute)){var h=e._offsetAttribute===_0x58701d.NONE?0:1,d=o.attributes.position.values.length,f=new Uint8Array(d/3);d$1s(f,h),o.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}var p=o.attributes,_=i$1c.fromVertices(p.position.values,void 0,3);return u.position||(o.attributes.position.values=void 0),new I$1p({attributes:p,indices:o.indices,primitiveType:W$18.TRIANGLES,boundingSphere:_,offsetAttribute:e._offsetAttribute})}},P$F.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new P$F({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:r,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$11.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(P$F.prototype,{rectangle:{get:function(){return e$2b(this._rectangle)||(this._rectangle=Qe$6(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var te$s=new o$1p,ie$s=new o$1p,pe$k=new o$1p;function ue$o(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function re$w(e,t){var i,n,r,o=[],a=e.positions,s=e.corners,l=e.endPositions,u=new a$_,c=0,h=0,d=0;for(n=0;n<a.length;n+=2)c+=r=a[n].length-3,d+=r/3*4,h+=a[n+1].length-3;for(c+=3,h+=3,n=0;n<s.length;n++){i=s[n];var f=s[n].leftPositions;e$2b(f)?(c+=r=f.length,d+=r/3*2):(h+=r=s[n].rightPositions.length,d+=r/3*2)}var p,_=e$2b(l);_&&(c+=p=l[0].length-3,h+=p,d+=4*(p/=3));var m,g,x,v,y,$,b=c+h,T=new Float64Array(b),C=0,S=b-1,w=p/2,E=ce$x.createTypedArray(b/3,d+4),P=0;if(E[P++]=C/3,E[P++]=(S-2)/3,_){o.push(C/3),$=te$s,y=ie$s;var A=l[0];for(n=0;n<w;n++)$=o$1p.fromArray(A,3*(w-1-n),$),y=o$1p.fromArray(A,3*(w+n),y),b$S.addAttribute(T,y,C),b$S.addAttribute(T,$,void 0,S),v=(g=C/3)+1,x=(m=(S-2)/3)-1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=v,C+=3,S-=3}var L=0,M=a[L++],R=a[L++];for(T.set(M,C),T.set(R,S-R.length+1),r=R.length-3,o.push(C/3,(S-2)/3),n=0;n<r;n+=3)v=(g=C/3)+1,x=(m=(S-2)/3)-1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=v,C+=3,S-=3;for(n=0;n<s.length;n++){var I,O,D=(i=s[n]).leftPositions,B=i.rightPositions,N=pe$k;if(e$2b(D)){for(S-=3,O=x,o.push(v),I=0;I<D.length/3;I++)N=o$1p.fromArray(D,3*I,N),E[P++]=O-I-1,E[P++]=O-I,b$S.addAttribute(T,N,void 0,S),S-=3;o.push(O-Math.floor(D.length/6)),t===ar$5.BEVELED&&o.push((S-2)/3+1),C+=3}else{for(C+=3,O=v,o.push(x),I=0;I<B.length/3;I++)N=o$1p.fromArray(B,3*I,N),E[P++]=O+I,E[P++]=O+I+1,b$S.addAttribute(T,N,C),C+=3;o.push(O+Math.floor(B.length/6)),t===ar$5.BEVELED&&o.push(C/3-1),S-=3}for(M=a[L++],R=a[L++],M.splice(0,3),R.splice(R.length-3,3),T.set(M,C),T.set(R,S-R.length+1),r=R.length-3,I=0;I<R.length;I+=3)g=(v=C/3)-1,m=(x=(S-2)/3)+1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=v,C+=3,S-=3;C-=3,S+=3,o.push(C/3,(S-2)/3)}if(_){C+=3,S-=3,$=te$s,y=ie$s;var F=l[1];for(n=0;n<w;n++)$=o$1p.fromArray(F,3*(p-n-1),$),y=o$1p.fromArray(F,3*n,y),b$S.addAttribute(T,$,void 0,S),b$S.addAttribute(T,y,C),g=(v=C/3)-1,m=(x=(S-2)/3)+1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=v,C+=3,S-=3;o.push(C/3)}else o.push(C/3,(S-2)/3);return E[P++]=C/3,E[P++]=(S-2)/3,u.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:T}),{attributes:u,indices:E,wallIndices:o}}function de$l(e){var t=e.ellipsoid,i=re$w(b$S.computePositions(e),e.cornerType),n=i.wallIndices,r=e.height,o=e.extrudedHeight,a=i.attributes,s=i.indices,l=a.position.values,u=l.length,c=new Float64Array(u);c.set(l);var h=new Float64Array(2*u);if(l=A$1g.scaleToGeodeticHeight(l,r,t),c=A$1g.scaleToGeodeticHeight(c,o,t),h.set(l),h.set(c,u),a.position.values=h,u/=3,e$2b(e.offsetAttribute)){var d=new Uint8Array(2*u);if(e.offsetAttribute===_0x58701d.TOP)d=d$1s(d,1,0,u);else d=d$1s(d,e.offsetAttribute===_0x58701d.NONE?0:1);a.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}var f,p=s.length,_=ce$x.createTypedArray(h.length/3,2*(p+n.length));_.set(s);var m,g,x=p;for(f=0;f<p;f+=2){var v=s[f],y=s[f+1];_[x++]=v+u,_[x++]=y+u}for(f=0;f<n.length;f++)g=(m=n[f])+u,_[x++]=m,_[x++]=g;return{attributes:a,indices:_}}function V$w(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,i=e.width;o$1q.typeOf.object("options.positions",t),o$1q.typeOf.number("options.width",i);var n=u$_(e.height,0),r=u$_(e.extrudedHeight,n);this._positions=t,this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._width=i,this._height=Math.max(n,r),this._extrudedHeight=Math.min(n,r),this._cornerType=u$_(e.cornerType,ar$5.ROUNDED),this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*o$1p.packedLength+t$13.packedLength+6}V$w.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.typeOf.object("array",t),i=u$_(i,0);var n=e._positions,r=n.length;t[i++]=r;for(var o=0;o<r;++o,i+=o$1p.packedLength)o$1p.pack(n[o],t,i);return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i]=u$_(e._offsetAttribute,-1),t};var oe$n=t$13.clone(t$13.UNIT_SPHERE),R$E={positions:void 0,ellipsoid:oe$n,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};function i$L(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}function d$_(e,t){var i=t.replacementPrevious,n=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=n),t===e.head?e.head=n:i.replacementNext=n,t===e.tail?e.tail=i:n.replacementPrevious=i,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}V$w.unpack=function(e,t,i){o$1q.typeOf.object("array",e),t=u$_(t,0);for(var n=e[t++],r=new Array(n),o=0;o<n;++o,t+=o$1p.packedLength)r[o]=o$1p.unpack(e,t);var a=t$13.unpack(e,t,oe$n);t+=t$13.packedLength;var s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return e$2b(i)?(i._positions=r,i._ellipsoid=t$13.clone(a,i._ellipsoid),i._width=s,i._height=l,i._extrudedHeight=u,i._cornerType=c,i._granularity=h,i._offsetAttribute=-1===d?void 0:d,i):(R$E.positions=r,R$E.width=s,R$E.height=l,R$E.extrudedHeight=u,R$E.cornerType=c,R$E.granularity=h,R$E.offsetAttribute=-1===d?void 0:d,new V$w(R$E))},V$w.createGeometry=function(e){var t=e._positions,i=e._width,n=e._ellipsoid,r=D$11(t=ue$o(t,n),o$1p.equalsEpsilon);if(!(r.length<2||i<=0)){var o,a=e._height,s=e._extrudedHeight,l=!e$2a.equalsEpsilon(a,s,0,e$2a.EPSILON2),u={ellipsoid:n,positions:r,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1};if(l)u.height=a,u.extrudedHeight=s,u.offsetAttribute=e._offsetAttribute,o=de$l(u);else if((o=re$w(b$S.computePositions(u),u.cornerType)).attributes.position.values=A$1g.scaleToGeodeticHeight(o.attributes.position.values,a,n),e$2b(e._offsetAttribute)){var c=o.attributes.position.values.length,h=new Uint8Array(c/3);d$1s(h,e._offsetAttribute===_0x58701d.NONE?0:1),o.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}var d=o.attributes,f=i$1c.fromVertices(d.position.values,void 0,3);return new I$1p({attributes:d,indices:o.indices,primitiveType:W$18.LINES,boundingSphere:f,offsetAttribute:e._offsetAttribute})}},i$L.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head},i$L.prototype.trimTiles=function(e,t){for(var i=this.tail,n=!0;n&&e$2b(this._lastBeforeStartOfFrame)&&this.count>e&&e$2b(i);){n=i!==this._lastBeforeStartOfFrame;var r=i.replacementPrevious;i.eligibleForUnloading&&(i.freeResources(),d$_(this,i)),i=r}for(this._lastBeforeStartOfFrame&&(i=this._lastBeforeStartOfFrame.replacementNext);t&&i;)i=i.replacementNext;for(;i;){if(i&&i.data)for(var o=i.data.imagery,a=0,s=o.length;a<s;++a){var l=o[a];l.readyImagery&&l.readyImagery.imageryLayer._imageryProvider instanceof I$10&&e$2b(l.readyImagery)&&(l.imageryLayer=l.readyImagery.imageryLayer,l.readyImagery.releaseReference(),l.readyImagery=void 0,i.state=re$z.LOADING)}i=i.replacementNext}},i$L.prototype.markTileRendered=function(e){var t=this.head;if(t!==e)return++this.count,e$2b(t)?((e$2b(e.replacementPrevious)||e$2b(e.replacementNext))&&d$_(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,void(this.head=e)):(e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,void(this.tail=e));e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext)};var De$g=-1;function et$9(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.availabilityPromiseCache={},this.subLevel=e.subLevel}function ne$x(e){if(!e$2b(e)||!e$2b(e.url))throw new t$16("options.url is required.");var t=-1;if(this._isSct=u$_(e.isSct,!0),"string"==typeof e.url){this._baseUrl=e.url;var i=e.url;t=i.indexOf("wmts100");var n=i.substring(0,i.indexOf("/datas"));this.tablename=i.substring(i.indexOf("datas/")+6,i.length);var r=this;new l$15({name:n+this.tablename}).then((function(e){e.checkObjectStoreExit(r.tablename)?r._indexedDBScheduler=e:e.createObjectStore(r.tablename).then((function(){r._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){e$2b(r._indexedDBScheduler)&&r._indexedDBScheduler.clear(r.tablename)},cache:[]}}else this._isSct=!1;this._tilingScheme=new g$13({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid}),this._heightmapWidth=65,this._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,this._heightmapWidth,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._packingRequest=e.packingRequest,this._isBlock=!1,this._extrudeTileBoundingBox=!1,this._blockCache={},this._blockCacheQueue=new r$Q,this._blockCacheSize=100,this._blockScale=0,this._subdomains=e.subdomains,this._requestVertexNormals=u$_(e.requestVertexNormals,!1),this._requestWaterMask=u$_(e.requestWaterMask,!1),this._requestMetadata=u$_(e.requestMetadata,!0),this._cacheKey=u$_(e.cacheKey,""),this._originOffset=u$_(e.originOffset,new o$1o(0,0)),this._errorEvent=new o$1h;var o=e.credit;"string"==typeof o&&(o=new r$T(o)),this._credit=o,this._availability=void 0;var a=o$1l.defer();this._ready=!1,this._readyPromise=a,this._tileCredits=void 0,this._bounds=null,this._isCreateSkirt=u$_(e.isCreateSkirt,!0),this._urlType=u$_(e.urlType,Tr$3.REST),this._isShowGlobe=!0,this._isTerrainZ=!1,this._hasNormalBuffer=!1,this._currentVersion=null,this._needRefresh=!1,this._isSct&&(this._isShowGlobe=u$_(e.isShowGlobe,!0)),this._isSkirtDirty=!1,this._customRequestHeaders=e.customRequestHeaders,this._invisibility=u$_(e.invisibility,!1),this._visible=!0,this._offset={_x:0,_y:0,_level:0},this._enablePrjArea=u$_(e.enablePrjArea,!1);var s,l,u;r=this;e$2b(this._subdomains)&&(i=i.replace(/({.*?})/g,(function(e,t){if(!e$2b(r._subdomains.length))throw new t$16("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?r._subdomains[0]:e})));var c=this._layers=[],h="",d=[],f=0;if(this._isSct&&-1===t){var p;if(r._hasWaterMask=!0,r._urlType===Tr$3.KEY_VALUE){var _=e.url,m=_.replace(_.substring(_.indexOf("datas")+5,_.indexOf("scene3DName")),"?");r._tileUrlTemplates=[m+"&tile1={z}&tile2={x}&tile3={y}&ext=terrainz&v=1.16389.0"],p=_}else{r._tileUrlTemplates=[e.url+"/data/path/{z}/{x}/{y}.terrain?v=1.16389.0"];var g=e.url.split("/");g[g.length-1],p=n$U(i,"config")}e$2b(a$O.CREDENTIAL)&&(p=e$2b(a$O.CREDENTIAL._keymap[r._baseUrl])?a$O.addTokenWithKey(r._baseUrl,p):a$O.addToken(p)),LicenseChecker.LICENSECHECKER.getLicense(p).then((function(e){LicenseChecker.LICENSECHECKER.check(e)})),o$1l(u$R(p,this._customRequestHeaders),(function(t){t=t.replace("<SuperMapCache>",'<SuperMapCache xmlns:sml="http://www.supermap.com/SuperMapCache">');var i=(new s$S).read(t).documentElement;if(2===s$S.queryNumericValue(i,"Version",void 0)){var n=s$S.queryFirstNode(i,"StoreType",void 0);r._blockScale=s$S.queryNumericAttribute(n,"BlockScale",void 0),e$2b(r._blockScale)&&r._blockScale>0&&(r._isBlock=!0)}var o,a=s$S.queryStringValue(i,"FileExtentName",void 0);if(a=a.toLowerCase(),r._isTerrainZ="terrainz"===a,r._urlType===Tr$3.KEY_VALUE){var s=e.url;o=s.replace(s.substring(s.indexOf("datas")+5,s.indexOf("scene3DName")),"?"),o+="&tile1={z}&tile2={x}&tile3={y}&ext={fileExtent}&v=1.16389.0"}else o=e.url+"/data/path/{z}/{x}/{y}.{fileExtent}?v=1.16389.0";o=o.replace("{fileExtent}",a),r._tileUrlTemplates=[o];var l=s$S.queryFirstNode(i,"HeightRange",void 0),u=s$S.queryNumericValue(l,"MaxHeight",void 0),h=s$S.queryNumericValue(l,"MinHeight",void 0);r._maxHeight=u,r._minHeight=h;var f=s$S.queryFirstNode(i,"Bounds",void 0),p=s$S.queryNumericValue(f,"Left",void 0),_=s$S.queryNumericValue(f,"Right",void 0),m=s$S.queryNumericValue(f,"Bottom",void 0),g=s$S.queryNumericValue(f,"Top",void 0),x=s$S.queryFirstNode(i,"PlaneBounds",void 0);if(e$2b(x)){p>180&&(r._offset._x=Math.floor(p/180)),g>90&&(r._offset._y=Math.floor((g+90)/180));var v=t$13.WGS84.maximumRadius,y=r._offset._x*Math.PI*v,$=r._offset._y*Math.PI*v;p=s$S.queryNumericValue(x,"Left",void 0),p-=y,_=s$S.queryNumericValue(x,"Right",void 0),_-=y,m=s$S.queryNumericValue(x,"Bottom",void 0),m-=$,g=s$S.queryNumericValue(x,"Top",void 0),g-=$;var b=new o$1p(p,m,0),T=new o$1p(_,g,0),C=new n$1b,S=C.unproject(b),w=C.unproject(T);p=e$2a.toDegrees(S.longitude),_=e$2a.toDegrees(w.longitude),m=e$2a.toDegrees(S.latitude),g=e$2a.toDegrees(w.latitude),Math.abs(y)>e$2a.EPSILON1&&(o$1p.globalOffset.x=y),Math.abs($)>e$2a.EPSILON1&&(o$1p.globalOffset.y=$)}p&&_&&m&&g&&(r._bounds=new h$18(p,m,_,g),r._boundsRadians=h$18.fromDegrees(p,m,_,g));for(var E=s$S.queryFirstNode(i,"Levels",void 0),P=s$S.queryChildNodes(E,"Level",void 0),A=[],L=0,M=P.length;L<M;L++){var R=parseInt(P[L].textContent);A.push(R)}var I=s$S.queryFirstNode(i,"History",void 0);if(null!=I){var O=s$S.queryChildNodes(I,"Version",void 0),D=[];for(L=0,M=O.length;L<M;L++){R=O[L].textContent;D.push(R)}r._historyVersions=D}var B=A[0],N=A[A.length-1],F=s$S.queryFirstNode(i,"Available",void 0);if(e$2b(F)){var U=s$S.queryChildNodes(F,"TilesBounds",void 0),z=B>0?A.length+1:A.length,G=new Array(z);for(L=0;L<B;L++)G[L]=[];for(L=0,M=U.length;L<M;L++){var V=U[L],k=[];G[ie=s$S.queryNumericAttribute(V,"level",void 0)]=k;for(var W=s$S.queryChildNodes(V,"TileBounds",void 0),H=0,q=W.length;H<q;H++){var j=W[H],Y=s$S.queryNumericValue(j,"StartCol",void 0),X=s$S.queryNumericValue(j,"StartRow",void 0),K=s$S.queryNumericValue(j,"EndCol",void 0),Q=s$S.queryNumericValue(j,"EndRow",void 0);if(ie>=r._offset._level){var Z=1<<ie-r._offset._level,J=r._offset._x*Z;Y-=J,K-=J;var ee=r._offset._y*Z;X-=ee,Q-=ee}k.push({startX:Y,startY:X,endX:K,endY:Q})}}G[0]=[{startX:0,startY:0,endX:1,endY:1}];for(var te=new n$C(r._tilingScheme,N),ie=0;ie<G.length;++ie){var ne=G[ie],re=r._tilingScheme.getNumberOfYTilesAtLevel(ie);if(e$2b(d[ie])||(d[ie]=[]),e$2b(ne))for(var oe=0;oe<ne.length;++oe){var ae=ne[oe],se=re-ae.endY-1,le=re-ae.startY-1;d[ie].push([ae.startX,se,ae.endX,le]),te.addAvailableTileRange(ie,ae.startX,se,ae.endX,le)}}r._availability=te}c.push(new et$9({resource:t$11.createIfNeeded(e.url),version:"",isHeightmap:!1,tileUrlTemplates:r._tileUrlTemplates,availability:te,hasVertexNormals:!1,hasWaterMask:!0,hasMetadata:!1,availabilityLevels:0,availabilityTilesLoaded:!1,littleEndianExtensionSize:!0})),r._levels=A,r._ready=!0,r._readyPromise.resolve(!0)}),(function(){r._readyPromise.reject(!1)}))}else if(t>-1){var x=i+"/1.0.0/WMTSCapabilities.xml";r._wmtslayer=e.layer||null,r._wmtsformat=e.format||"binary",r._wmtstileMatrixSet=e.tilematrixset||null,e.blockscale>0&&(r._blockScale=1*e.blockscale,r._isBlock=!0),o$1l(u$R(x),(function(t){var i=(new s$S).read(t).documentElement,n=s$S.queryFirstNode(i,"Contents",void 0),o=s$S.queryFirstNode(n,"Layer",void 0);r._tempLayerName=s$S.queryStringValue(o,"Title",void 0);var a=s$S.queryFirstNode(n,"TileMatrixSet",void 0);r._wmtstileMatrixSet=s$S.queryStringValue(a,"Identifier",void 0),r._tileUrlTemplates=[e.url+"?tilematrix={z}&layer="+(r._wmtslayer||r._tempLayerName)+"&tilerow={y}&tilecol={x}&tilematrixset="+r._wmtstileMatrixSet+"&service=WMTS&request=GetTile"];var s=s$S.queryFirstNode(o,"BoundingBox",void 0),l=s$S.queryStringValue(s,"LowerCorner",void 0),u=s$S.queryStringValue(s,"UpperCorner",void 0),h=l.split(" "),d=u.split(" "),f=parseFloat(h[0]),p=parseFloat(d[0]),_=parseFloat(h[1]),m=parseFloat(d[1]);f&&p&&_&&m&&(r._bounds=new h$18(f,_,p,m),r._boundsRadians=h$18.fromDegrees(f,_,p,m));var g=s$S.queryFirstNode(n,"TileMatrixSet",void 0),x=(a=s$S.queryChildNodes(g,"TileMatrix",void 0),s$S.queryNumericValue(a[0],"ScaleDenominator",void 0)),v=s$S.queryNumericValue(a[a.length-1],"ScaleDenominator",void 0),y=s$S.queryNumericValue(a[0],"Identifier",void 0);x=1/x,v=1/v;var $=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],b=$.indexOf(x),T=$.indexOf(v);for(let e=0;e<$.length;e++)x>$[e]&&$[e+1]&&x<$[e+1]&&(b=e-1),v>$[e]&&$[e+1]&&v<$[e+1]&&(T=e-1);for(var C=u$_((b=Math.max(b,0))-y,0),S=[],w=b;w<=T;w++)S.push(w);r._isTerrainZ="terrainz",c.push(new et$9({resource:t$11.createIfNeeded(e.url),version:"",isHeightmap:!1,tileUrlTemplates:r._tileUrlTemplates,hasVertexNormals:!1,hasWaterMask:!0,hasMetadata:!1,availabilityLevels:0,availabilityTilesLoaded:!1,littleEndianExtensionSize:!0,subLevel:C})),r._levels=S,r._ready=!0,r._readyPromise.resolve(!0)}),(function(){r._readyPromise.reject(!1)}))}else o$1l(e.url).then((function(e){var t=t$11.createIfNeeded(e);t.appendForwardSlash(),l=(s=t).getDerivedResource({url:"layer.json"}),r._tileCredits=t.credits,T()})).otherwise((function(e){a.reject(e)}));function v(e){var t;if(!e.format)return t="The tile format is not specified in the layer.json file.",void(u=l$W.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T));if(!e.tiles||0===e.tiles.length)return t="The layer.json file does not specify any tile URL templates.",void(u=l$W.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T));var i=!1,n=!1,o=!1,a=!0,p=!1;if("heightmap-1.0"===e.format)p=!0,e$2b(r._heightmapStructure)||(r._heightmapStructure={heightScale:.2,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:65535}),n=!0,r._requestWaterMask=!0;else if(0!==e.format.indexOf("quantized-mesh-1."))return t='The tile format "'+e.format+'" is invalid or not supported.',void(u=l$W.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T));var _,m=e.tiles,g=e.maxzoom;f=Math.max(f,g),e$2b(e.extensions)&&-1!==e.extensions.indexOf("octvertexnormals")?i=!0:e$2b(e.extensions)&&-1!==e.extensions.indexOf("vertexnormals")&&(i=!0,a=!1),e$2b(e.extensions)&&-1!==e.extensions.indexOf("watermask")&&(n=!0),e$2b(e.extensions)&&-1!==e.extensions.indexOf("metadata")&&(o=!0);var x,$=e.metadataAvailability,b=e.available;if(e$2b(b)&&!e$2b($)){x=new n$C(r._tilingScheme,b.length);for(var C=0;C<b.length;++C){var S=b[C],w=r._tilingScheme.getNumberOfYTilesAtLevel(C);e$2b(d[C])||(d[C]=[]);for(var E=0;E<S.length;++E){var P=S[E],A=w-P.endY-1,L=w-P.startY-1;d[C].push([P.startX,A,P.endX,L]),x.addAvailableTileRange(C,P.startX,A,P.endX,L)}}}else e$2b($)&&(_=new n$C(r._tilingScheme,g),x=new n$C(r._tilingScheme,g),d[0]=[[0,0,1,0]],x.addAvailableTileRange(0,0,0,1,0));r._hasWaterMask=r._hasWaterMask||n,r._hasVertexNormals=r._hasVertexNormals||i,r._hasMetadata=r._hasMetadata||o,e$2b(e.attribution)&&(h.length>0&&(h+=" "),h+=e.attribution),c.push(new et$9({resource:s,version:e.version,isHeightmap:p,tileUrlTemplates:m,availability:x,hasVertexNormals:i,hasWaterMask:n,hasMetadata:o,availabilityLevels:$,availabilityTilesLoaded:_,littleEndianExtensionSize:a}));var M=e.parentUrl;return e$2b(M)?e$2b(x)?((s=s.getDerivedResource({url:M})).appendForwardSlash(),o$1l((l=s.getDerivedResource({url:"layer.json"})).fetchJson(),v,y)):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),o$1l.resolve()):o$1l.resolve()}function y(e){var t="An error occurred while accessing "+l.url+".";u=l$W.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T)}function $(e){v(e).then((function(){if(!e$2b(u)){var e=d.length;if(e>0)for(var t=r._availability=new n$C(r._tilingScheme,f),i=0;i<e;++i)for(var n=d[i],o=0;o<n.length;++o){var a=n[o];t.addAvailableTileRange(i,a[0],a[1],a[2],a[3])}if(h.length>0){var s=new r$T(h);e$2b(r._tileCredits)?r._tileCredits.push(s):r._tileCredits=[s]}r._ready=!0,r._readyPromise.resolve(!0)}}))}function b(e){e$2b(e)&&404===e.statusCode?$({tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]}):y()}function T(){o$1l(l.fetchJson()).then($).otherwise(b)}}var Ye$8={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4,INVALID_FLAG:127};function vt$6(e){return e$2b(e)&&0!==e.length?{Accept:"application/vnd.quantized-mesh;extensions="+e.join("-")+",application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}}function tt$8(e,t,i,n,r,o){var a=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new T$J({buffer:a,childTileMask:new Uint8Array(t,a.byteLength,1)[0],waterMask:new Uint8Array(t,a.byteLength+1,t.byteLength-a.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function We$b(e,t,i,n,r,o,a,s){var l=a.littleEndianExtensionSize,u=0,c=3*Float64Array.BYTES_PER_ELEMENT,h=4*Float64Array.BYTES_PER_ELEMENT,d=3*Uint16Array.BYTES_PER_ELEMENT,f=Uint16Array.BYTES_PER_ELEMENT,p=3*f,_=new DataView(t),m=new o$1p(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0));u+=c;var g=_.getFloat32(u,!0);u+=Float32Array.BYTES_PER_ELEMENT;var x=_.getFloat32(u,!0);u+=Float32Array.BYTES_PER_ELEMENT;var v=x,y=g,$=new i$1c(new o$1p(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0)),_.getFloat64(u+c,!0));u+=h;var b=new o$1p(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0));u+=c;var T=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var C=new Uint16Array(t,u,3*T);u+=T*d,T>65536&&(p=3*(f=Uint32Array.BYTES_PER_ELEMENT));var S=C.subarray(0,T),w=C.subarray(T,2*T),E=C.subarray(2*T,3*T);t$10.zigZagDeltaDecode(S,w,E),u%f!=0&&(u+=f-u%f);var P=_.getUint32(u,!0),A=u+=Uint32Array.BYTES_PER_ELEMENT,L=ce$x.createTypedArrayFromArrayBuffer(T,t,u,3*P);u+=P*p;for(var M=0,R=L.length,I=0;I<R;++I){var O=L[I];L[I]=M-O,0===O&&++M}var D=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var B=ce$x.createTypedArrayFromArrayBuffer(T,t,u,D);u+=D*f;var N=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var F=ce$x.createTypedArrayFromArrayBuffer(T,t,u,N);u+=N*f;var U=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var z=ce$x.createTypedArrayFromArrayBuffer(T,t,u,U);u+=U*f;var G=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var V=ce$x.createTypedArrayFromArrayBuffer(T,t,u,G);u+=G*f;var k,W,H,q,j=!1,Y=!1,X=void 0,K=void 0;!1===e._isShowGlobe&&(0===x||u>=_.byteLength)&&(j=!0);for(var Q=0;u<_.byteLength;){var Z=_.getUint8(u,!0);if(0!==Z){u+=Uint8Array.BYTES_PER_ELEMENT;var J=_.getUint32(u,l);if(u+=Uint32Array.BYTES_PER_ELEMENT,Z===Ye$8.OCT_VERTEX_NORMALS&&e._requestVertexNormals)k=new Uint8Array(t,u,2*T);else if(Z===Ye$8.WATER_MASK&&e._requestWaterMask)W=new Uint8Array(t,u,J);else if(Z===Ye$8.METADATA&&e._requestMetadata&&!e._isSct){var ee=_.getUint32(u,!0);if(ee>0){var te=a$K(new Uint8Array(t),u+Uint32Array.BYTES_PER_ELEMENT,ee),ie=JSON.parse(te).available;if(e$2b(ie))for(var ne=0;ne<ie.length;++ne)for(var re=i+ne+1,oe=ie[ne],ae=e._tilingScheme.getNumberOfYTilesAtLevel(re),se=0;se<oe.length;++se){var le=oe[se],ue=ae-le.endY-1,ce=ae-le.startY-1;e.availability.addAvailableTileRange(re,le.startX,ue,le.endX,ce),a.availability.addAvailableTileRange(re,le.startX,ue,le.endX,ce)}}a.availabilityTilesLoaded.addAvailableTileRange(i,n,r,n,r)}else if(Z===Ye$8.INVALID_FLAG){if((Q=_.getUint32(u,!0))>0){var he=0,de=32767;for(I=0;I<Q;I++)he=Math.max(he,E[L[I]]),de=Math.min(de,E[L[I]]);he<32767&&(v=g+(x-g)*he/32767),de>0&&(y=g+(x-g)*de/32767)}(!1===e._isShowGlobe||e$2b(s))&&(!1===e._isShowGlobe&&(0===Q?j=!0:L=ce$x.createTypedArrayFromArrayBuffer(T,t,A,Q)),(3*P!=Q||0==Q)&&(Y=!0),e$2b(s)&&Q>0&&(0===(X=ce$x.createTypedArrayFromArrayBuffer(T,t,A,Q)).length&&(X=void 0)))}else if(125===Z){var fe=J/4;H=new Uint8Array(3*fe);var pe=u,_e=new o$1p;for(I=0;I<fe;I++){var me=_.getInt16(pe,!0);pe+=Int16Array.BYTES_PER_ELEMENT;var ge=_.getInt16(pe,!0);pe+=Int16Array.BYTES_PER_ELEMENT,t$10.octShortDecode(me,ge,_e),H[3*I]=255*(.5*_e.x+.5),H[3*I+1]=255*(.5*_e.y+.5),H[3*I+2]=255*(.5*_e.z+.5)}}u+=J}else u+=1}if(e$2b(X)){K=new Uint16Array(3*T);for(I=0;I<T;I++)K[3*I]=C[I],K[3*I+1]=C[T+I],K[3*I+2]=C[2*T+I]}!1===e._isShowGlobe&&(q=0);var xe,ve,ye=e._tilingScheme.tileXYToRectangle(n,r,i);return ye.width<e$2a.PI_OVER_TWO+e$2a.EPSILON5&&(xe=y$Z.fromRectangle(ye,g,x,e._tilingScheme.ellipsoid),ve=y$Z.fromRectangle(ye,y,v,e._tilingScheme.ellipsoid)),q=e._isCreateSkirt?5*e.getLevelMaximumGeometricError(i):0,e._hasNormalBuffer=e$2b(H),new p$O({center:m,minimumHeight:g,maximumHeight:x,boundingSphere:$,orientedBoundingBox:xe,validMinimumHeight:y,validMaximumHeight:v,validOrientedBoundingBox:ve,horizonOcclusionPoint:b,quantizedVertices:C,encodedNormals:k,indices:L,westIndices:B,southIndices:F,eastIndices:z,northIndices:V,westSkirtHeight:q,southSkirtHeight:q,eastSkirtHeight:q,northSkirtHeight:q,childTileMask:e._isSct||!e$2b(e.availability)?15:e.availability.computeChildMaskForTile(i,n,r),waterMask:W,credits:e._tileCredits,normalTexture:H,invalid:j,rasterIndex:X,rasterVertex:K,hasInvalid:Y})}function Ne$d(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function _t$5(e,t,i,n){var r=Math.min(e._blockScale,n),o=Math.pow(2,r),a=t%o;return{x:Math.floor(t/o),y:Math.floor(i/o),col:a,row:i%o,level:n,blockSize:o}}ne$x.prototype.requestTileGeometry=function(e,t,i,n,r){if(!this._ready)throw new t$16("requestTileGeometry must not be called before the terrain provider is ready.");if(0===i&&this._isSct){for(var o=new Uint16Array(12288),a=0;a<64;a++)for(var s=0;s<64;s++)o[64*a+s]=Math.floor(32767*a/63),o[4096+64*a+s]=Math.floor(32767*s/63),o[8192+64*a+s]=0;var l=new Uint16Array(23814);for(a=0;a<63;a++)for(s=0;s<63;s++)l[6*(63*a+s)]=64*a+s,l[6*(63*a+s)+1]=64*(a+1)+s+1,l[6*(63*a+s)+2]=64*a+s+1,l[6*(63*a+s)+3]=64*(a+1)+s,l[6*(63*a+s)+4]=64*(a+1)+s+1,l[6*(63*a+s)+5]=64*a+s;var u=new Uint16Array(0),c=new o$1p(NaN,-1/0,NaN),h=new o$1p(0,-3189068.5,0);1===e&&(h.y=3189068.5,c.y=1/0);var d=this;return o$1l.resolve(new p$O({center:h,minimumHeight:0,maximumHeight:0,boundingSphere:new i$1c(h,9567205.5),horizonOcclusionPoint:c,quantizedVertices:o,indices:l,westIndices:u,southIndices:u,eastIndices:u,northIndices:u,westSkirtHeight:0,southSkirtHeight:0,eastSkirtHeight:0,northSkirtHeight:0,childTileMask:d._isSct||!e$2b(d.availability)?15:d.availability.computeChildMaskForTile(i,e,t),invalid:!1,hasInvalid:!1}))}var f,p=this._layers,_=p.length;if(1===_)f=p[0];else for(a=0;a<_;++a){var m=p[a];if(!e$2b(m.availability)||m.availability.isTileAvailable(i,e,t)){f=m;break}}return yt$4(this,e,t,i,f,n,r)};var Dt$5=/({.*?})/g;function yt$4(e,t,i,n,r,o,a){if(!e$2b(r))return o$1l.reject(new t$14("Terrain tile doesn't exist"));var s=r.tileUrlTemplates;if(0!==s.length){var l=e._tilingScheme.getNumberOfYTilesAtLevel(n)-i-1,u=[];e._requestVertexNormals&&r.hasVertexNormals&&u.push(r.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&r.hasWaterMask&&u.push("watermask"),e._requestMetadata&&r.hasMetadata&&u.push("metadata");var c,h,d=s[(t+l+n)%s.length];e$2b(e._currentVersion)&&(d+="&dataVersion="+e._currentVersion),e._isSct&&0===n&&(d=n$15("Assets/Terrain/"+n+"/"+t+"/"+i+".terrain"));var f,p=r.resource;if(e$2b(p._ionEndpoint)&&!e$2b(p._ionEndpoint.externalType)?(0!==u.length&&(h={extensions:u.join("-")}),c=vt$6(void 0)):(c=vt$6(u),e$2b(e._customRequestHeaders)&&(c=p$19(c,e._customRequestHeaders))),0!==n&&(e$2b(e._packingRequest)||e._isBlock))if(e._isBlock&&e$2b(e._packingRequest)&&e._packingRequest===X$N.QuadKey&&!a){if(o.type=V$15.BLOCKPACK,o.throttle=!0,o.providerName=e.tablename,f=_t$5(e,t,l,n),o.quadKey=Ne$d(f.x,f.y,f.level),o.blockInfo=f,e$2b(x=e.blockCache[o.quadKey])&&e$2b(x.data))return e.blockCacheQueue.touch(x),e$2b(_=Fe$f(x.data,f))?{buffer:_,layerToUse:r,level:n,x:t,y:i,tmsY:l}:"cacheInvalid"}else if(e._packingRequest!==X$N.QuadKey||a){if(e._isBlock){var _;if(o.type=V$15.BLOCK,o.providerName=e.tablename,f=_t$5(e,t,l,n),o.quadKey=Ne$d(f.x,f.y,f.level),o.blockInfo=f,e$2b(x=e.blockCache[o.quadKey])&&e$2b(x.data)&&!a)return e.blockCacheQueue.touch(x),e$2b(_=Fe$f(x.data,f))?{buffer:_,layerToUse:r,level:n,x:t,y:i,tmsY:l}:"cacheInvalid";if(!0===e._indexedDBSetting.isOpen&&e$2b(e._indexedDBScheduler)&&!0===o.cacheEnable)return e$2b(y=e._indexedDBScheduler.getElementFromDB(e.tablename,o.quadKey))?y.then((function(a){if(e$2b(a)){if(a===De$g)return"cacheInvalid";var s=new e$1b(e,o.quadKey,a);e.blockCache[o.quadKey]=s;var u=Fe$f(a,f);return e$2b(u)?e._isTerrainZ&&0!==n?{buffer:u,layerToUse:r,level:n,x:t,y:i,tmsY:l}:e$2b(e._heightmapStructure)?tt$8(e,u):We$b(e,u,n,t,i,l,r):"cacheError"}return"cacheError"}),(function(e){return"cacheError"})):"cacheError"}}else o.type=V$15.PACK,o.providerName=e.tablename,o.quadKey=Ne$d(t,l,n),o.throttle=!0;if(!e$2b(e._indexedDBSetting)||!0!==e._indexedDBSetting.isOpen||!0!==o.cacheEnable){let s=function(s){var u;if(e$2b(u=0!==e._cacheKey.length?Ot$5(s,e._cacheKey):s)){if(0!==n&&(e$2b(e._packingRequest)||e._isBlock)){if(e._isBlock&&e$2b(e._packingRequest)&&e._packingRequest===X$N.QuadKey&&!a){!e$2b(o.quadKeyIndex)&&e$2b(o.blockRequest)&&(o.quadKeyIndex=o.blockRequest.quadKeyIndex);var c=gt$4(s,o.quadKeyIndex);e$2b(h=e.blockCache[o.quadKey])&&(h.data=s),e.blockCacheQueue.touch(h),e.blockCacheQueue.trim(e.blockCacheSize),u=Fe$f(c,o.blockInfo)}else if(e._packingRequest!==X$N.QuadKey||a){if(e._isBlock){var h;if(!e$2b((h=e.blockCache[o.quadKey]).data)&&(h.data=s,!0===e._indexedDBSetting.isOpen&&e$2b(e._indexedDBScheduler)&&!o.cacheEnable)){var d=o.quadKey,f={blob:s.slice(0),key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname,cacheSize:5};Ge$9.scheduleTask(f,[])}e.blockCacheQueue.touch(h),e.blockCacheQueue.trim(e.blockCacheSize),u=Fe$f(s,o.blockInfo)}}else u=gt$4(s,o.quadKeyIndex);if(!e$2b(u))return;if(u===De$g){d=Ne$d(t,l,n),f={blob:De$g,key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname};return void Ge$9.scheduleTask(f,[])}}if(e$2b(e._indexedDBSetting)&&!0===e._indexedDBSetting.isOpen&&!e._isBlock&&e$2b(e._indexedDBScheduler)&&e$2b(u)){d=Ne$d(t,l,n),f={blob:u.slice(0),key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname};Ge$9.scheduleTask(f,[])}return e._isTerrainZ&&0!==n?{buffer:u,layerToUse:r,level:n,x:t,y:i,tmsY:l}:e$2b(e._heightmapStructure)?tt$8(e,u):We$b(e,u,n,t,i,l,r)}};if(e$2b(e._subdomains)&&0!==n){var m=e._subdomains,g=m[(t+i+n)%m.length];d=d.replace(Dt$5,(function(e,t){return"{s}"===t?g:e}))}var x,v;return e._isBlock?e$2b(x=e.blockCache[o.quadKey||n+""+t+i])?x.promise.then(s):(v=bt$4(p,d,r,n,t,i,l,h,c,o,e,a,f))?(x=new e$1b(e,o.quadKey||n+""+t+i),e.blockCache[o.quadKey]=x,x.promise=v,v.then(s)):void 0:(v=bt$4(p,d,r,n,t,i,l,h,c,o,e,a,f))?v.then(s):void 0}if(e$2b(e._indexedDBScheduler)){var y,$=Ne$d(t,l,n);return e$2b(y=e._indexedDBScheduler.getElementFromDB(e.tablename,$))?y.then((function(o){return e$2b(o)?o===De$g?"cacheInvalid":e._isTerrainZ&&0!==n?{buffer:o,layerToUse:r,level:n,x:t,y:i,tmsY:l}:e$2b(e._heightmapStructure)?tt$8(e,o):We$b(e,o,n,t,i,l,r):"cacheError"}),(function(e){return"cacheError"})):"cacheError"}}}function gt$4(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(t>r-1)throw new t$16("pack imagery index invalid");n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?De$g:new Uint8Array(e).slice(n,n+a).buffer;n+=a}}function Fe$f(e,t){var i=new DataView(e),n=0;i.getUint32(n,!0),n+=4;var r=i.getUint32(n,!0);n+=4;for(var o=t.col,a=t.row*t.blockSize+o,s=0,l=0,u=0;u<r;u++){if(u<a)s+=i.getUint32(n,!0);else if(u===a){l=i.getUint32(n,!0),n+=4;break}n+=4}if(n=8+4*r,0!==l)return n+=s,new Uint8Array(e).slice(n,n+l).buffer}var Ge$9=new i$V("indexedDBWorker");function bt$4(e,t,i,n,r,o,a,s,l,u,c,h,d){var f,p=t.substring(0,t.lastIndexOf("/realspace/")+10);if(e$2b(a$O.CREDENTIAL)&&(t=e$2b(a$O.CREDENTIAL._keymap[p])?a$O.addTokenWithKey(p,t):a$O.addToken(t)),e$2b(d)){var _=d.x,m=d.y;if(n>=c._offset._level){var g=1<<n-c._offset._level;_+=c._offset._x*g/d.blockSize,m+=c._offset._y*g/d.blockSize}f=e.getDerivedResource({url:t,templateValues:{version:i.version,z:n,x:_,y:m},queryParameters:s,headers:l,request:u}).fetchArrayBuffer()}else{var x=u$_(i.subLevel,0);f=e.getDerivedResource({url:t,templateValues:{version:i.version,z:n-x,x:r,y:a},queryParameters:s,headers:l,request:u}).fetchArrayBuffer()}return f}var Pt$4=new i$V("UnZipTerrainData");ne$x.prototype.unzip=function(e){return Pt$4.scheduleTask({data:e},[e])},ne$x.prototype.createTerrainData=function(e,t,i){return We$b(this,t,e.level,e.x,e.y,e.tmsY,e.layerToUse,i)},Object.defineProperties(ne$x.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this._ready)throw new t$16("credit must not be called before the terrain provider is ready.");return this._credit}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the terrain provider is ready.");return this._tilingScheme}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){if(!this._ready)throw new t$16("hasWaterMask must not be called before the terrain provider is ready.");return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){if(!this._ready)throw new t$16("hasVertexNormals must not be called before the terrain provider is ready.");return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){if(!this._ready)throw new t$16("hasMetadata must not be called before the terrain provider is ready.");return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){if(!this._ready)throw new t$16("availability must not be called before the terrain provider is ready.");return this._availability}},isShowGlobe:{get:function(){return this._isShowGlobe}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){e$2b(e)&&"boolean"==typeof e.isOpen&&(this._indexedDBSetting.isOpen=e.isOpen)}},hasNormalBuffer:{get:function(){return this._hasNormalBuffer}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2b(e)&&!e$2b(e.length))throw new t$16("Excepted SuperMapTerrainProvider.subdomains to be type of Array.");this._subdomains=e}},currentVersion:{get:function(){return this._currentVersion},set:function(e){this._currentVersion=e,this._blockCache={},this._needRefresh=!0}},historyVersions:{get:function(){return this._historyVersions}},visible:{get:function(){return this._visible},set:function(e){this._visible=e}},extrudeTileBoundingBox:{get:function(){return this._extrudeTileBoundingBox},set:function(e){this._extrudeTileBoundingBox=e}}}),ne$x.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var Ut$5=new h$18;function rt$a(e,t,i,n){if(0!==n){var r=e.availabilityLevels,o=n%r==0?n-r:(n/r|0)*r,a=1<<n-o;return{level:o,x:t/a|0,y:i/a|0}}}function Et$5(e,t,i,n,r,o){if(!e$2b(r.availabilityLevels))return{result:!1};for(var a,s=function(){delete r.availabilityPromiseCache[a]},l=r.availabilityTilesLoaded,u=r.availability,c=rt$a(r,t,i,n);e$2b(c);){if(u.isTileAvailable(c.level,c.x,c.y)&&!l.isTileAvailable(c.level,c.x,c.y)){var h;if(!o&&(a=c.level+"-"+c.x+"-"+c.y,!e$2b(h=r.availabilityPromiseCache[a]))){var d=new r$1b({throttle:!0,throttleByServer:!0,type:V$15.TERRAIN});e$2b(h=yt$4(e,c.x,c.y,c.level,r,d))&&(r.availabilityPromiseCache[a]=h,h.then(s))}return{result:!0,promise:h}}c=rt$a(r,c.x,c.y,c.level)}return{result:!1}}function Ot$5(e,t){var i=new Int8Array(e);for(var n=t.split("").map((function(e){return e.charCodeAt(0)})),r=0;r<n.length;r++)i[r]=i[r]^n[r];return i.buffer}ne$x.prototype.getTileDataAvailable=function(e,t,i){if(e$2b(this._availability)){if(i>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(i,e,t))return!0;if(!this._hasMetadata)return!1;for(var n=this._layers,r=n.length,o=0;o<r;++o){if(Et$5(this,e,t,i,n[o],0===o).result)return}return!1}if(this._isSct&&0!==i){if(-1!==this._levels.indexOf(i)){var a=this._tilingScheme.tileXYToRectangle(e,t,i);return e$2b(h$18.intersection(this._boundsRadians,a,Ut$5))}return!1}},ne$x.prototype.loadTileDataAvailability=function(e,t,i){if(!(!e$2b(this._availability)||i>this._availability._maximumLevel||this._availability.isTileAvailable(i,e,t))&&this._hasMetadata)for(var n=this._layers,r=n.length,o=0;o<r;++o){var a=Et$5(this,e,t,i,n[o],0===o);if(e$2b(a.promise))return a.promise}},ne$x.prototype.saveLocalCache=function(){if(e$2b(this._indexedDBSetting)&&!0===this._indexedDBSetting.isOpen&&e$2b(this._indexedDBScheduler)){var e={tablename:this.tablename,dbname:this._indexedDBScheduler.dbname};Ge$9.scheduleTask(e,[])}},ne$x._getAvailabilityTile=rt$a;var i$K,n$z="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhZmRiYzgzMy1hODQ3LTRkMDktYjE0Ni0zNTViMTdmNGEyZWEiLCJpZCI6MjU5LCJzY29wZXMiOlsiYXNyIiwiZ2MiXSwiaWF0IjoxNTgzMTYzMTYwfQ.blu_ATsUNqSYK0fIBrNRvxq9HiCzY5Ul_4v_4-3F5QY",e$Y={};function n$y(e,t){o$1q.defined("endpoint",e),o$1q.defined("endpointResource",t);var i,n=e.externalType,r=e$2b(n);if(r){if("3DTILES"!==n&&"STK_TERRAIN_SERVER"!==n)throw new t$14("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");i={url:e.options.url}}else i={url:e.url,retryAttempts:1,retryCallback:_$D};t$11.call(this,i),this._ionEndpoint=e,this._ionEndpointDomain=r?void 0:new h$16(e.url).authority,this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=r}function _$D(e,t){var i=u$_(e._ionRoot,e),n=i._ionEndpointResource;return e$2b(t)&&(401===t.statusCode||t.target instanceof Image)?(e$2b(i._pendingPromise)||(i._pendingPromise=n.fetchJson().then((function(e){return i._ionEndpoint=e,e})).always((function(e){return i._pendingPromise=void 0,e}))),i._pendingPromise.then((function(t){return e._ionEndpoint=t,!0}))):o$1l.resolve(!1)}function u$H(e){return e=u$_(e,u$_.EMPTY_OBJECT),new ne$x({url:n$y.fromAssetId(1),requestVertexNormals:u$_(e.requestVertexNormals,!1),requestWaterMask:u$_(e.requestWaterMask,!1)})}e$Y.defaultAccessToken=n$z,e$Y.defaultServer=new t$11({url:""}),e$Y.getDefaultTokenCredit=function(e){if(e===n$z){if(!e$2b(i$K)){i$K=new r$T("<b> This application is using SuperMap3D's default ion access token. Please assign <i>SuperMap3D.Ion.defaultAccessToken</i> with an access token from your ion account before making any SuperMap3D API calls. You can sign up for a free ion account at .</b>",!0)}return i$K}},e$2b(Object.create)&&(n$y.prototype=Object.create(t$11.prototype),n$y.prototype.constructor=n$y),n$y.fromAssetId=function(e,t){var i=n$y._createEndpointResource(e,t);return i.fetchJson().then((function(e){return new n$y(e,i)}))},Object.defineProperties(n$y.prototype,{credits:{get:function(){return e$2b(this._ionRoot)?this._ionRoot.credits:(e$2b(this._credits)||(this._credits=n$y.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource)),this._credits)}}}),n$y.getCreditsFromEndpoint=function(e,t){var i=e.attributions.map(r$T.getIonCredit),n=e$Y.getDefaultTokenCredit(t.queryParameters.access_token);return e$2b(n)&&i.push(r$T.clone(n)),i},n$y.prototype.clone=function(e){var t=u$_(this._ionRoot,this);return e$2b(e)||(e=new n$y(t._ionEndpoint,t._ionEndpointResource)),(e=t$11.prototype.clone.call(this,e))._ionRoot=t,e._isExternal=this._isExternal,e},n$y.prototype.fetchImage=function(e){if(!this._isExternal){var t=e;e={preferBlob:!0},e$2b(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return t$11.prototype.fetchImage.call(this,e)},n$y.prototype._makeRequest=function(e){return this._isExternal||new h$16(this.url).authority!==this._ionEndpointDomain||(e$2b(e.headers)||(e.headers={}),e.headers.Authorization="Bearer "+this._ionEndpoint.accessToken),t$11.prototype._makeRequest.call(this,e)},n$y._createEndpointResource=function(e,t){o$1q.defined("assetId",e),t=u$_(t,u$_.EMPTY_OBJECT);var i=u$_(t.server,e$Y.defaultServer),n=u$_(t.accessToken,e$Y.defaultAccessToken);i=t$11.createIfNeeded(i);var r={url:"v1/assets/"+e+"/endpoint"};return e$2b(n)&&(r.queryParameters={access_token:n}),i.getDerivedResource(r)};var Pa$1=function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]},Y$v=1,tt$7=2,wa$1=4,Ot$4=5,ot$4=484813681109536e-20,m$J=Math.PI/2,Sa$1=.16666666666666666,Ia$2=.04722222222222222,Ra$2=.022156084656084655,_$C=1e-10,$$F=.017453292519943295,H$K=57.29577951308232,w$G=Math.PI/4,qt$4=2*Math.PI,R$D=3.14159265359,z$H={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},Oa$1={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},Ft$5=/[\s_\-\/\(\)]/g;function X$B(e,t){if(e[t])return e[t];for(var i,n=Object.keys(e),r=t.toLowerCase().replace(Ft$5,""),o=-1;++o<n.length;)if((i=n[o]).toLowerCase().replace(Ft$5,"")===r)return e[i]}var Tt$6=function(e){var t,i,n,r={},o=e.split("+").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var i=t.split("=");return i.push(!0),e[i[0].toLowerCase()]=i[1],e}),{}),a={proj:"projName",datum:"datumCode",rf:function(e){r.rf=parseFloat(e)},lat_0:function(e){r.lat0=e*$$F},lat_1:function(e){r.lat1=e*$$F},lat_2:function(e){r.lat2=e*$$F},lat_ts:function(e){r.lat_ts=e*$$F},lon_0:function(e){r.long0=e*$$F},lon_1:function(e){r.long1=e*$$F},lon_2:function(e){r.long2=e*$$F},alpha:function(e){r.alpha=parseFloat(e)*$$F},lonc:function(e){r.longc=e*$$F},x_0:function(e){r.x0=parseFloat(e)},y_0:function(e){r.y0=parseFloat(e)},k_0:function(e){r.k0=parseFloat(e)},k:function(e){r.k0=parseFloat(e)},a:function(e){r.a=parseFloat(e)},b:function(e){r.b=parseFloat(e)},r_a:function(){r.R_A=!0},zone:function(e){r.zone=parseInt(e,10)},south:function(){r.utmSouth=!0},towgs84:function(e){r.datum_params=e.split(",").map((function(e){return parseFloat(e)}))},to_meter:function(e){r.to_meter=parseFloat(e)},units:function(e){r.units=e;var t=X$B(Oa$1,e);t&&(r.to_meter=t.to_meter)},from_greenwich:function(e){r.from_greenwich=e*$$F},pm:function(e){var t=X$B(z$H,e);r.from_greenwich=(t||parseFloat(e))*$$F},nadgrids:function(e){"@null"===e?r.datumCode="none":r.nadgrids=e},axis:function(e){var t="ewnsud";3===e.length&&-1!==t.indexOf(e.substr(0,1))&&-1!==t.indexOf(e.substr(1,1))&&-1!==t.indexOf(e.substr(2,1))&&(r.axis=e)}};for(t in o)i=o[t],t in a?"function"==typeof(n=a[t])?n(i):r[n]=i:r[t]=i;return"string"==typeof r.datumCode&&"WGS84"!==r.datumCode&&(r.datumCode=r.datumCode.toLowerCase()),r},lt$1=1,jt$2=2,Qt$3=3,xt$4=4,Wt$5=5,$t$1=-1,qa$2=/\s/,Ta$2=/[A-Za-z]/,$a$2=/[A-Za-z84]/,bt$3=/[,\]]/,Ht$3=/[\d\.E\-\+]/;function Q$F(e){if("string"!=typeof e)throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=lt$1}function La$2(e){return new Q$F(e).output()}function Xt$1(e,t,i){Array.isArray(t)&&(i.unshift(t),t=null);var n=t?{}:e,r=i.reduce((function(e,t){return at$7(t,e),e}),n);t&&(e[t]=r)}function at$7(e,t){if(Array.isArray(e)){var i=e.shift();if("PARAMETER"===i&&(i=e.shift()),1===e.length)return Array.isArray(e[0])?(t[i]={},void at$7(e[0],t[i])):void(t[i]=e[0]);if(e.length)if("TOWGS84"!==i){if("AXIS"===i)return i in t||(t[i]=[]),void t[i].push(e);var n;switch(Array.isArray(i)||(t[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return t[i]={name:e[0].toLowerCase(),convert:e[1]},void(3===e.length&&at$7(e[2],t[i]));case"SPHEROID":case"ELLIPSOID":return t[i]={name:e[0],a:e[1],rf:e[2]},void(4===e.length&&at$7(e[3],t[i]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return e[0]=["name",e[0]],void Xt$1(t,i,e);default:for(n=-1;++n<e.length;)if(!Array.isArray(e[n]))return at$7(e,t[i]);return Xt$1(t,i,e)}}else t[i]=e;else t[i]=!0}else t[e]=!0}Q$F.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==xt$4)for(;qa$2.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case lt$1:return this.neutral(e);case jt$2:return this.keyword(e);case xt$4:return this.quoted(e);case Wt$5:return this.afterquote(e);case Qt$3:return this.number(e);case $t$1:return}},Q$F.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=xt$4);if(bt$3.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},Q$F.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=lt$1)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=lt$1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=$t$1))):void 0},Q$F.prototype.number=function(e){if(!Ht$3.test(e)){if(bt$3.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},Q$F.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=Wt$5},Q$F.prototype.keyword=function(e){if($a$2.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=lt$1)}if(!bt$3.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},Q$F.prototype.neutral=function(e){if(Ta$2.test(e))return this.word=e,void(this.state=jt$2);if('"'===e)return this.word="",void(this.state=xt$4);if(Ht$3.test(e))return this.word=e,void(this.state=Qt$3);if(!bt$3.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},Q$F.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===$t$1)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var Ga$2=.017453292519943295;function za$2(e,t){var i=t[0],n=t[1];!(i in e)&&n in e&&(e[i]=e[n],3===t.length&&(e[i]=t[2](e[i])))}function W$J(e){return e*Ga$2}function Da$2(e){if("GEOGCS"===e.type?e.projName="longlat":"LOCAL_CS"===e.type?(e.projName="identity",e.local=!0):"object"==typeof e.PROJECTION?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",i=0,n=e.AXIS.length;i<n;++i){var r=e.AXIS[i][0].toLowerCase();-1!==r.indexOf("north")?t+="n":-1!==r.indexOf("south")?t+="s":-1!==r.indexOf("east")?t+="e":-1!==r.indexOf("west")&&(t+="w")}2===t.length&&(t+="u"),3===t.length&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.UNIT.convert&&("GEOGCS"===e.type?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var o=e.GEOGCS;function a(t){return t*(e.to_meter||1)}"GEOGCS"===e.type&&(o=e),o&&(o.DATUM?e.datumCode=o.DATUM.name.toLowerCase():e.datumCode=o.name.toLowerCase(),"d_"===e.datumCode.slice(0,2)&&(e.datumCode=e.datumCode.slice(2)),("new_zealand_geodetic_datum_1949"===e.datumCode||"new_zealand_1949"===e.datumCode)&&(e.datumCode="nzgd49"),("wgs_1984"===e.datumCode||"world_geodetic_system_1984"===e.datumCode)&&("Mercator_Auxiliary_Sphere"===e.PROJECTION&&(e.sphere=!0),e.datumCode="wgs84"),"_ferro"===e.datumCode.slice(-6)&&(e.datumCode=e.datumCode.slice(0,-6)),"_jakarta"===e.datumCode.slice(-8)&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(e.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===e.ellps.toLowerCase().slice(0,13)&&(e.ellps="intl"),e.a=o.DATUM.SPHEROID.a,e.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(e.datum_params=o.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),"ch1903+"===e.datumCode&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a);[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",W$J],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",W$J],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",W$J],["lat0","latitude_of_origin",W$J],["lat0","standard_parallel_1",W$J],["lat1","standard_parallel_1",W$J],["lat2","standard_parallel_2",W$J],["azimuth","Azimuth"],["alpha","azimuth",W$J],["srsCode","name"]].forEach((function(t){return za$2(e,t)})),!e.long0&&e.longc&&("Albers_Conic_Equal_Area"===e.projName||"Lambert_Azimuthal_Equal_Area"===e.projName)&&(e.long0=e.longc),!e.lat_ts&&e.lat1&&("Stereographic_South_Pole"===e.projName||"Polar Stereographic (variant B)"===e.projName)&&(e.lat0=W$J(e.lat1>0?90:-90),e.lat_ts=e.lat1)}var Kt$3=function(e){var t=La$2(e),i=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",i]);var r={};return at$7(t,r),Da$2(r),r};function L$Q(e){var t=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?L$Q[e]=Tt$6(arguments[1]):L$Q[e]=Kt$3(arguments[1]):L$Q[e]=i}else if(1===arguments.length){if(Array.isArray(e))return e.map((function(e){Array.isArray(e)?L$Q.apply(t,e):L$Q(e)}));if("string"==typeof e){if(e in L$Q)return L$Q[e]}else"EPSG"in e?L$Q["EPSG:"+e.EPSG]=e:"ESRI"in e?L$Q["ESRI:"+e.ESRI]=e:"IAU2000"in e?L$Q["IAU2000:"+e.IAU2000]=e:console.log(e);return}}function ka$1(e){return"string"==typeof e}function pa$1(e){return e in L$Q}Pa$1(L$Q);var Ua$2=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Ba$2(e){return Ua$2.some((function(t){return e.indexOf(t)>-1}))}var Fa$2=["3857","900913","3785","102113"];function ja$1(e){var t=X$B(e,"authority");if(t){var i=X$B(t,"epsg");return i&&Fa$2.indexOf(i)>-1}}function Qa$2(e){var t=X$B(e,"extension");if(t)return X$B(t,"proj4")}function Wa$1(e){return"+"===e[0]}function Ha$1(e){if(!ka$1(e))return e;if(pa$1(e))return L$Q[e];if(Ba$2(e)){var t=Kt$3(e);if(ja$1(t))return L$Q["EPSG:3857"];var i=Qa$2(t);return i?Tt$6(i):t}return Wa$1(e)?Tt$6(e):void 0}var Jt$2=function(e,t){var i,n;if(e=e||{},!t)return e;for(n in t)void 0!==(i=t[n])&&(e[n]=i);return e},F$K=function(e,t,i){var n=e*t;return i/Math.sqrt(1-n*n)},ft$4=function(e){return e<0?-1:1},g$M=function(e){return Math.abs(e)<=R$D?e:e-ft$4(e)*qt$4},U$I=function(e,t,i){var n=e*i,r=.5*e;return n=Math.pow((1-n)/(1+n),r),Math.tan(.5*(m$J-t))/n},Mt$4=function(e,t){for(var i,n,r=.5*e,o=m$J-2*Math.atan(t),a=0;a<=15;a++)if(i=e*Math.sin(o),o+=n=m$J-2*Math.atan(t*Math.pow((1-i)/(1+i),r))-o,Math.abs(n)<=1e-10)return o;return-9999};function Xa$2(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=F$K(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Ka$2(e){var t,i,n=e.x,r=e.y;if(r*H$K>90&&r*H$K<-90&&n*H$K>180&&n*H$K<-180)return null;if(Math.abs(Math.abs(r)-m$J)<=_$C)return null;if(this.sphere)t=this.x0+this.a*this.k0*g$M(n-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(w$G+.5*r));else{var o=Math.sin(r),a=U$I(this.e,r,o);t=this.x0+this.a*this.k0*g$M(n-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=i,e}function Ja$2(e){var t,i,n=e.x-this.x0,r=e.y-this.y0;if(this.sphere)i=m$J-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var o=Math.exp(-r/(this.a*this.k0));if(-9999===(i=Mt$4(this.e,o)))return null}return t=g$M(this.long0+n/(this.a*this.k0)),e.x=t,e.y=i,e}var Za$2=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],Va$1={init:Xa$2,forward:Ka$2,inverse:Ja$2,names:Za$2};function Ya$2(){}function Zt$1(e){return e}var ts=["longlat","identity"],as={init:Ya$2,forward:Zt$1,inverse:Zt$1,names:ts},ss=[Va$1,as],Ct$4={},Et$4=[];function Vt$5(e,t){var i=Et$4.length;return e.names?(Et$4[i]=e,e.names.forEach((function(e){Ct$4[e.toLowerCase()]=i})),this):(console.log(t),!0)}function is(e){if(!e)return!1;var t=e.toLowerCase();return typeof Ct$4[t]<"u"&&Et$4[Ct$4[t]]?Et$4[Ct$4[t]]:void 0}function hs(){ss.forEach(Vt$5)}var es={start:hs,add:Vt$5,get:is},b$R={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},rs=b$R.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};function ns(e,t,i,n){var r=e*e,o=t*t,a=(r-o)/r,s=0;return n?(r=(e*=1-a*(Sa$1+a*(Ia$2+a*Ra$2)))*e,a=0):s=Math.sqrt(a),{es:a,e:s,ep2:(r-o)/o}}function os(e,t,i,n,r){if(!e){var o=X$B(b$R,n);o||(o=rs),e=o.a,t=o.b,i=o.rf}return i&&!t&&(t=(1-1/i)*e),(0===i||Math.abs(e-t)<_$C)&&(r=!0,t=e),{a:e,b:t,rf:i,sphere:r}}b$R.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var q$K={};function ls(e,t,i,n,r,o){var a={};return a.datum_type=void 0===e||"none"===e?Ot$4:wa$1,t&&(a.datum_params=t.map(parseFloat),(0!==a.datum_params[0]||0!==a.datum_params[1]||0!==a.datum_params[2])&&(a.datum_type=Y$v),a.datum_params.length>3&&(0!==a.datum_params[3]||0!==a.datum_params[4]||0!==a.datum_params[5]||0!==a.datum_params[6])&&(a.datum_type=tt$7,a.datum_params[3]*=ot$4,a.datum_params[4]*=ot$4,a.datum_params[5]*=ot$4,a.datum_params[6]=a.datum_params[6]/1e6+1)),a.a=i,a.b=n,a.es=r,a.ep2=o,a}function j$F(e,t){if(!(this instanceof j$F))return new j$F(e);t=t||function(e){if(e)throw e};var i=Ha$1(e);if("object"==typeof i){var n=j$F.projections.get(i.projName);if(n){if(i.datumCode&&"none"!==i.datumCode){var r=X$B(q$K,i.datumCode);r&&(i.datum_params=r.towgs84?r.towgs84.split(","):null,i.ellps=r.ellipse,i.datumName=r.datumName?r.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84";var o=os(i.a,i.b,i.rf,i.ellps,i.sphere),a=ns(o.a,o.b,o.rf,i.R_A),s=i.datum||ls(i.datumCode,i.datum_params,o.a,o.b,a.es,a.ep2);Jt$2(this,i),Jt$2(this,n),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=s,this.init(),t(null,this)}else t(e)}else t(e)}function fs(e,t){return!(e.datum_type!==t.datum_type||e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===Y$v?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==tt$7||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}function Yt$2(e,t,i){var n,r,o,a,s=e.x,l=e.y,u=e.z?e.z:0;if(l<-m$J&&l>-1.001*m$J)l=-m$J;else if(l>m$J&&l<1.001*m$J)l=m$J;else{if(l<-m$J)return{x:-1/0,y:-1/0,z:e.z};if(l>m$J)return{x:1/0,y:1/0,z:e.z}}return s>Math.PI&&(s-=2*Math.PI),r=Math.sin(l),a=Math.cos(l),o=r*r,{x:((n=i/Math.sqrt(1-t*o))+u)*a*Math.cos(s),y:(n+u)*a*Math.sin(s),z:(n*(1-t)+u)*r}}function ta$2(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v=1e-12,y=e.x,$=e.y,b=e.z?e.z:0;if(r=Math.sqrt(y*y+$*$),o=Math.sqrt(y*y+$*$+b*b),r/i<v){if(g=0,o/i<v)return m$J,x=-n,{x:e.x,y:e.y,z:e.z}}else g=Math.atan2($,y);a=b/o,h=(s=r/o)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*s*s)),d=a*l,m=0;do{m++,u=t*(c=i/Math.sqrt(1-t*d*d))/(c+(x=r*h+b*d-c*(1-t*d*d))),_=(p=a*(l=1/Math.sqrt(1-u*(2-u)*s*s)))*h-(f=s*(1-u)*l)*d,h=f,d=p}while(_*_>1e-24&&m<30);return{x:g,y:Math.atan(p/Math.abs(f)),z:x}}function Ms(e,t,i){if(t===Y$v)return{x:e.x+i[0],y:e.y+i[1],z:e.z+i[2]};if(t===tt$7){var n=i[0],r=i[1],o=i[2],a=i[3],s=i[4],l=i[5],u=i[6];return{x:u*(e.x-l*e.y+s*e.z)+n,y:u*(l*e.x+e.y-a*e.z)+r,z:u*(-s*e.x+a*e.y+e.z)+o}}}function vs(e,t,i){if(t===Y$v)return{x:e.x-i[0],y:e.y-i[1],z:e.z-i[2]};if(t===tt$7){var n=i[0],r=i[1],o=i[2],a=i[3],s=i[4],l=i[5],u=i[6],c=(e.x-n)/u,h=(e.y-r)/u,d=(e.z-o)/u;return{x:c+l*h-s*d,y:-l*c+h+a*d,z:s*c-a*h+d}}}function At$4(e){return e===Y$v||e===tt$7}q$K.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},q$K.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},q$K.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},q$K.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},q$K.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},q$K.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},q$K.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},q$K.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},q$K.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},q$K.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},q$K.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},q$K.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},q$K.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},q$K.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},q$K.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},q$K.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},q$K.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},j$F.projections=es,j$F.projections.start();var us=function(e,t,i){return fs(e,t)||e.datum_type===Ot$4||t.datum_type===Ot$4||e.es===t.es&&e.a===t.a&&!At$4(e.datum_type)&&!At$4(t.datum_type)?i:(i=Yt$2(i,e.es,e.a),At$4(e.datum_type)&&(i=Ms(i,e.datum_type,e.datum_params)),At$4(t.datum_type)&&(i=vs(i,t.datum_type,t.datum_params)),ta$2(i,t.es,t.a,t.b))},aa$3=function(e,t,i){var n,r,o,a=i.x,s=i.y,l=i.z||0,u={};for(o=0;o<3;o++)if(!t||2!==o||void 0!==i.z)switch(0===o?(n=a,r=-1!=="ew".indexOf(e.axis[o])?"x":"y"):1===o?(n=s,r=-1!=="ns".indexOf(e.axis[o])?"y":"x"):(n=l,r="z"),e.axis[o]){case"e":case"w":case"n":case"s":u[r]=n;break;case"u":void 0!==i[r]&&(u.z=n);break;case"d":void 0!==i[r]&&(u.z=-n);break;default:return null}return u},sa$2=function(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t},cs=function(e){ia$2(e.x),ia$2(e.y)};function ia$2(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function ms(e,t){return(e.datum.datum_type===Y$v||e.datum.datum_type===tt$7)&&"WGS84"!==t.datumCode||(t.datum.datum_type===Y$v||t.datum.datum_type===tt$7)&&"WGS84"!==e.datumCode}function Nt$5(e,t,i){var n;return Array.isArray(i)&&(i=sa$2(i)),cs(i),e.datum&&t.datum&&ms(e,t)&&(i=Nt$5(e,n=new j$F("WGS84"),i),e=n),"enu"!==e.axis&&(i=aa$3(e,!1,i)),"longlat"===e.projName?i={x:i.x*$$F,y:i.y*$$F,z:i.z||0}:(e.to_meter&&(i={x:i.x*e.to_meter,y:i.y*e.to_meter,z:i.z||0}),i=e.inverse(i)),e.from_greenwich&&(i.x+=e.from_greenwich),i=us(e.datum,t.datum,i),t.from_greenwich&&(i={x:i.x-t.from_greenwich,y:i.y,z:i.z||0}),"longlat"===t.projName?i={x:i.x*H$K,y:i.y*H$K,z:i.z||0}:(i=t.forward(i),t.to_meter&&(i={x:i.x/t.to_meter,y:i.y/t.to_meter,z:i.z||0})),"enu"!==t.axis?aa$3(t,!0,i):i}var ha$3=j$F("WGS84");function Lt$3(e,t,i){var n,r,o;return Array.isArray(i)?(n=Nt$5(e,t,i)||{x:NaN,y:NaN},i.length>2?typeof e.name<"u"&&"geocent"===e.name||typeof t.name<"u"&&"geocent"===t.name?"number"==typeof n.z?[n.x,n.y,n.z].concat(i.splice(3)):[n.x,n.y,i[2]].concat(i.splice(3)):[n.x,n.y].concat(i.splice(2)):[n.x,n.y]):(r=Nt$5(e,t,i),2===(o=Object.keys(i)).length||o.forEach((function(n){if(typeof e.name<"u"&&"geocent"===e.name||typeof t.name<"u"&&"geocent"===t.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;r[n]=i[n]})),r)}function ea$4(e){return e instanceof j$F?e:e.oProj?e.oProj:j$F(e)}function k$C(e,t,i){e=ea$4(e);var n,r=!1;return typeof t>"u"?(t=e,e=ha$3,r=!0):(typeof t.x<"u"||Array.isArray(t))&&(i=t,t=e,e=ha$3,r=!0),t=ea$4(t),i?Lt$3(e,t,i):(n={forward:function(i){return Lt$3(e,t,i)},inverse:function(i){return Lt$3(t,e,i)}},r&&(n.oProj=t),n)}var ra$3=6,na$2="AJSAJS",oa$3="AFAFAF",st$3=65,D$E=73,p$M=79,vt$5=86,ut$6=90,ds={forward:la$3,inverse:ys,toPoint:fa$2};function la$3(e,t){return t=t||5,xs(_s({lat:e[1],lon:e[0]}),t)}function ys(e){var t=zt$3(ua$2(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function fa$2(e){var t=zt$3(ua$2(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Gt$3(e){return e*(Math.PI/180)}function Ma$2(e){return e/Math.PI*180}function _s(e){var t,i,n,r,o,a,s,l=e.lat,u=e.lon,c=6378137,h=.00669438,d=.9996,f=Gt$3(l),p=Gt$3(u);s=Math.floor((u+180)/6)+1,180===u&&(s=60),l>=56&&l<64&&u>=3&&u<12&&(s=32),l>=72&&l<84&&(u>=0&&u<9?s=31:u>=9&&u<21?s=33:u>=21&&u<33?s=35:u>=33&&u<42&&(s=37)),a=Gt$3(6*(s-1)-180+3),t=h/(1-h),i=c/Math.sqrt(1-h*Math.sin(f)*Math.sin(f)),n=Math.tan(f)*Math.tan(f),r=t*Math.cos(f)*Math.cos(f);var _=d*i*((o=Math.cos(f)*(p-a))+(1-n+r)*o*o*o/6+(5-18*n+n*n+72*r-58*t)*o*o*o*o*o/120)+5e5,m=d*(c*(.9983242984503243*f-.002514607064228144*Math.sin(2*f)+2639046602129982e-21*Math.sin(4*f)-35*h*h*h/3072*Math.sin(6*f))+i*Math.tan(f)*(o*o/2+(5-n+9*r+4*r*r)*o*o*o*o/24+(61-58*n+n*n+600*r-330*t)*o*o*o*o*o*o/720));return l<0&&(m+=1e7),{northing:Math.round(m),easting:Math.round(_),zoneNumber:s,zoneLetter:gs(l)}}function zt$3(e){var t=e.northing,i=e.easting,n=e.zoneLetter,r=e.zoneNumber;if(r<0||r>60)return null;var o,a,s,l,u,c,h,d,f,p=.9996,_=6378137,m=.00669438,g=(1-Math.sqrt(1-m))/(1+Math.sqrt(1-m)),x=i-5e5,v=t;n<"N"&&(v-=1e7),h=6*(r-1)-180+3,o=m/(1-m),f=(d=v/p/6367449.145945056)+(3*g/2-27*g*g*g/32)*Math.sin(2*d)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*d)+151*g*g*g/96*Math.sin(6*d),a=_/Math.sqrt(1-m*Math.sin(f)*Math.sin(f)),s=Math.tan(f)*Math.tan(f),l=o*Math.cos(f)*Math.cos(f),u=_*(1-m)/Math.pow(1-m*Math.sin(f)*Math.sin(f),1.5),c=x/(a*p);var y=f-a*Math.tan(f)/u*(c*c/2-(5+3*s+10*l-4*l*l-9*o)*c*c*c*c/24+(61+90*s+298*l+45*s*s-252*o-3*l*l)*c*c*c*c*c*c/720);y=Ma$2(y);var $,b=(c-(1+2*s+l)*c*c*c/6+(5-2*l+28*s-3*l*l+8*o+24*s*s)*c*c*c*c*c/120)/Math.cos(f);if(b=h+Ma$2(b),e.accuracy){var T=zt$3({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});$={top:T.lat,right:T.lon,bottom:y,left:b}}else $={lat:y,lon:b};return $}function gs(e){var t="Z";return 84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C"),t}function xs(e,t){var i="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+bs(e.easting,e.northing,e.zoneNumber)+i.substr(i.length-5,t)+n.substr(n.length-5,t)}function bs(e,t,i){var n=va$1(i);return Cs(Math.floor(e/1e5),Math.floor(t/1e5)%20,n)}function va$1(e){var t=e%ra$3;return 0===t&&(t=ra$3),t}function Cs(e,t,i){var n=i-1,r=na$2.charCodeAt(n),o=oa$3.charCodeAt(n),a=r+e-1,s=o+t,l=!1;return a>ut$6&&(a=a-ut$6+st$3-1,l=!0),(a===D$E||r<D$E&&a>D$E||(a>D$E||r<D$E)&&l)&&a++,(a===p$M||r<p$M&&a>p$M||(a>p$M||r<p$M)&&l)&&(++a===D$E&&a++),a>ut$6&&(a=a-ut$6+st$3-1),s>vt$5?(s=s-vt$5+st$3-1,l=!0):l=!1,(s===D$E||o<D$E&&s>D$E||(s>D$E||o<D$E)&&l)&&s++,(s===p$M||o<p$M&&s>p$M||(s>p$M||o<p$M)&&l)&&(++s===D$E&&s++),s>vt$5&&(s=s-vt$5+st$3-1),String.fromCharCode(a)+String.fromCharCode(s)}function ua$2(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,i=e.length,n=null,r="",o=0;!/[A-Z]/.test(t=e.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+e;r+=t,o++}var a=parseInt(r,10);if(0===o||o+3>i)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(o++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+e;n=e.substring(o,o+=2);for(var l=va$1(a),u=Es(n.charAt(0),l),c=As(n.charAt(1),l);c<Ns(s);)c+=2e6;var h=i-o;if(h%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+e;var d,f,p,_=h/2,m=0,g=0;return _>0&&(d=1e5/Math.pow(10,_),f=e.substring(o,o+_),m=parseFloat(f)*d,p=e.substring(o+_),g=parseFloat(p)*d),{easting:m+u,northing:g+c,zoneLetter:s,zoneNumber:a,accuracy:d}}function Es(e,t){for(var i=na$2.charCodeAt(t-1),n=1e5,r=!1;i!==e.charCodeAt(0);){if(++i===D$E&&i++,i===p$M&&i++,i>ut$6){if(r)throw"Bad character: "+e;i=st$3,r=!0}n+=1e5}return n}function As(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var i=oa$3.charCodeAt(t-1),n=0,r=!1;i!==e.charCodeAt(0);){if(++i===D$E&&i++,i===p$M&&i++,i>vt$5){if(r)throw"Bad character: "+e;i=st$3,r=!0}n+=1e5}return n}function Ns(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function it$4(e,t,i){if(!(this instanceof it$4))return new it$4(e,t,i);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&typeof t>"u"){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}it$4.fromMGRS=function(e){return new it$4(fa$2(e))},it$4.prototype.toMGRS=function(e){return la$3([this.x,this.y],e)};var Ps=1,ws=.25,ca$1=.046875,ma$2=.01953125,da=.01068115234375,Ss=.75,Is=.46875,Rs=.013020833333333334,Os=.007120768229166667,qs=.3645833333333333,Ts=.005696614583333333,$s=.3076171875,ya$1=function(e){var t=[];t[0]=Ps-e*(ws+e*(ca$1+e*(ma$2+e*da))),t[1]=e*(Ss-e*(ca$1+e*(ma$2+e*da)));var i=e*e;return t[2]=i*(Is-e*(Rs+e*Os)),i*=e,t[3]=i*(qs-e*Ts),t[4]=i*e*$s,t},Pt$3=function(e,t,i,n){return i*=t,t*=t,n[0]*e-i*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))},Ls=20,_a$2=function(e,t,i){for(var n=1/(1-t),r=e,o=Ls;o;--o){var a=Math.sin(r),s=1-t*a*a;if(r-=s=(Pt$3(r,a,Math.cos(r),i)-e)*(s*Math.sqrt(s))*n,Math.abs(s)<_$C)return r}return r};function Gs(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=ya$1(this.es),this.ml0=Pt$3(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function zs(e){var t,i,n,r=e.x,o=e.y,a=g$M(r-this.long0),s=Math.sin(o),l=Math.cos(o);if(this.es){var u=l*a,c=Math.pow(u,2),h=this.ep2*Math.pow(l,2),d=Math.pow(h,2),f=Math.abs(l)>_$C?Math.tan(o):0,p=Math.pow(f,2),_=Math.pow(p,2);t=1-this.es*Math.pow(s,2),u/=Math.sqrt(t);var m=Pt$3(o,s,l,this.en);i=this.a*(this.k0*u*(1+c/6*(1-p+h+c/20*(5-18*p+_+14*h-58*p*h+c/42*(61+179*_-_*p-479*p)))))+this.x0,n=this.a*(this.k0*(m-this.ml0+s*a*u/2*(1+c/12*(5-p+9*h+4*d+c/30*(61+_-58*p+270*h-330*p*h+c/56*(1385+543*_-_*p-3111*p))))))+this.y0}else{var g=l*Math.sin(a);if(Math.abs(Math.abs(g)-1)<_$C)return 93;if(i=.5*this.a*this.k0*Math.log((1+g)/(1-g))+this.x0,n=l*Math.cos(a)/Math.sqrt(1-Math.pow(g,2)),(g=Math.abs(n))>=1){if(g-1>_$C)return 93;n=0}else n=Math.acos(n);o<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return e.x=i,e.y=n,e}function Ds(e){var t,i,n,r,o=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,i=_a$2(t,this.es,this.en),Math.abs(i)<m$J){var s=Math.sin(i),l=Math.cos(i),u=Math.abs(l)>_$C?Math.tan(i):0,c=this.ep2*Math.pow(l,2),h=Math.pow(c,2),d=Math.pow(u,2),f=Math.pow(d,2);t=1-this.es*Math.pow(s,2);var p=o*Math.sqrt(t)/this.k0,_=Math.pow(p,2);n=i-(t*=u)*_/(1-this.es)*.5*(1-_/12*(5+3*d-9*c*d+c-4*h-_/30*(61+90*d-252*c*d+45*f+46*c-_/56*(1385+3633*d+4095*f+1574*f*d)))),r=g$M(this.long0+p*(1-_/6*(1+2*d+c-_/20*(5+28*d+24*f+8*c*d+6*c-_/42*(61+662*d+1320*f+720*f*d))))/l)}else n=m$J*ft$4(a),r=0;else{var m=Math.exp(o/this.k0),g=.5*(m-1/m),x=this.lat0+a/this.k0,v=Math.cos(x);t=Math.sqrt((1-Math.pow(v,2))/(1+Math.pow(g,2))),n=Math.asin(t),a<0&&(n=-n),r=0===g&&0===v?0:g$M(Math.atan2(g,v)+this.long0)}return e.x=r,e.y=n,e}var ks=["Transverse_Mercator","Transverse Mercator","tmerc"],ps={init:Gs,forward:zs,inverse:Ds,names:ks},ga$2=function(e){var t=Math.exp(e);return t=(t-1/t)/2},Dt$4=function(e,t){e=Math.abs(e),t=Math.abs(t);var i=Math.max(e,t),n=Math.min(e,t)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))},Us=function(e){var t=1+e,i=t-1;return 0===i?e:e*Math.log(t)/i},Bs=function(e){var t=Math.abs(e);return t=Us(t*(1+t/(Dt$4(1,t)+1))),e<0?-t:t},kt$4=function(e,t){for(var i,n=2*Math.cos(2*t),r=e.length-1,o=e[r],a=0;--r>=0;)i=n*o-a+e[r],a=o,o=i;return t+i*Math.sin(2*t)},Fs=function(e,t){for(var i,n=2*Math.cos(t),r=e.length-1,o=e[r],a=0;--r>=0;)i=n*o-a+e[r],a=o,o=i;return Math.sin(t)*i},js=function(e){var t=Math.exp(e);return t=(t+1/t)/2},xa$2=function(e,t,i){for(var n,r,o=Math.sin(t),a=Math.cos(t),s=ga$2(i),l=js(i),u=2*a*l,c=-2*o*s,h=e.length-1,d=e[h],f=0,p=0,_=0;--h>=0;)n=p,r=f,d=u*(p=d)-n-c*(f=_)+e[h],_=c*p-r+u*f;return[(u=o*l)*d-(c=a*s)*_,u*_+c*d]};function Qs(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),i=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),i*=t,this.cgb[1]=i*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),i*=t,this.cgb[2]=i*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=i*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),i*=t,this.cgb[3]=i*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=i*(1237/630+t*(t*(-24832/14175)-2.4)),i*=t,this.cgb[4]=i*(4174/315+t*(-144838/6237)),this.cbg[4]=i*(-734/315+t*(109598/31185)),i*=t,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=i*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=i*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),i*=t,this.utg[2]=i*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=i*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),i*=t,this.utg[3]=i*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=i*(49561/161280+t*(-179/168+t*(6601661/7257600))),i*=t,this.utg[4]=i*(-4583/161280+t*(108847/3991680)),this.gtu[4]=i*(34729/80640+t*(-3418889/1995840)),i*=t,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var n=kt$4(this.cbg,this.lat0);this.Zb=-this.Qn*(n+Fs(this.gtu,2*n))}function Ws(e){var t=g$M(e.x-this.long0),i=e.y;i=kt$4(this.cbg,i);var n=Math.sin(i),r=Math.cos(i),o=Math.sin(t),a=Math.cos(t);i=Math.atan2(n,a*r),t=Math.atan2(o*r,Dt$4(n,r*a)),t=Bs(Math.tan(t));var s,l,u=xa$2(this.gtu,2*i,2*t);return i+=u[0],t+=u[1],Math.abs(t)<=2.623395162778?(s=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*i+this.Zb)+this.y0):(s=1/0,l=1/0),e.x=s,e.y=l,e}function Hs(e){var t,i,n=(e.x-this.x0)*(1/this.a),r=(e.y-this.y0)*(1/this.a);if(r=(r-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var o=xa$2(this.utg,2*r,2*n);r+=o[0],n+=o[1],n=Math.atan(ga$2(n));var a=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);r=Math.atan2(a*u,Dt$4(l,u*s)),n=Math.atan2(l,u*s),t=g$M(n+this.long0),i=kt$4(this.cgb,r)}else t=1/0,i=1/0;return e.x=t,e.y=i,e}var Xs=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"],wt$4={init:Qs,forward:Ws,inverse:Hs,names:Xs},Ks=function(e,t){if(void 0===e){if((e=Math.floor(30*(g$M(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e},Js="etmerc";function Zs(){var e=Ks(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*$$F,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,wt$4.init.apply(this),this.forward=wt$4.forward,this.inverse=wt$4.inverse}var Vs=["Universal Transverse Mercator System","utm"],Ys={init:Zs,names:Vs,dependsOn:Js},pt$5=function(e,t){return Math.pow((1-e)/(1+e),t)},ti$2=20;function ai$3(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+w$G)/(Math.pow(Math.tan(.5*this.lat0+w$G),this.C)*pt$5(this.e*e,this.ratexp))}function si$2(e){var t=e.x,i=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+w$G),this.C)*pt$5(this.e*Math.sin(i),this.ratexp))-m$J,e.x=this.C*t,e}function ii$2(e){for(var t=e.x/this.C,i=e.y,n=Math.pow(Math.tan(.5*i+w$G)/this.K,1/this.C),r=ti$2;r>0&&(i=2*Math.atan(n*pt$5(this.e*Math.sin(e.y),-.5*this.e))-m$J,!(Math.abs(i-e.y)<1e-14));--r)e.y=i;return r?(e.x=t,e.y=i,e):null}var hi$4=["gauss"],Ut$4={init:ai$3,forward:si$2,inverse:ii$2,names:hi$4};function ei$2(){Ut$4.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function ri$2(e){var t,i,n,r;return e.x=g$M(e.x-this.long0),Ut$4.forward.apply(this,[e]),t=Math.sin(e.y),i=Math.cos(e.y),n=Math.cos(e.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*i*n),e.x=r*i*Math.sin(e.x),e.y=r*(this.cosc0*t-this.sinc0*i*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function ni$3(e){var t,i,n,r,o;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,o=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(o,this.R2);t=Math.sin(a),i=Math.cos(a),r=Math.asin(i*this.sinc0+e.y*t*this.cosc0/o),n=Math.atan2(e.x*t,o*this.cosc0*i-e.y*this.sinc0*t)}else r=this.phic0,n=0;return e.x=n,e.y=r,Ut$4.inverse.apply(this,[e]),e.x=g$M(e.x+this.long0),e}var oi$2=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],li$4={init:ei$2,forward:ri$2,inverse:ni$3,names:oi$2};function fi$4(e,t,i){return t*=i,Math.tan(.5*(m$J+e))*Math.pow((1-t)/(1+t),.5*i)}function Mi$4(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=_$C&&(this.k0=.5*(1+ft$4(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=_$C&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=_$C&&(this.k0=.5*this.cons*F$K(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/U$I(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=F$K(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-m$J,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function vi$4(e){var t,i,n,r,o,a,s=e.x,l=e.y,u=Math.sin(l),c=Math.cos(l),h=g$M(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=_$C&&Math.abs(l+this.lat0)<=_$C?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*u+this.coslat0*c*Math.cos(h)),e.x=this.a*t*c*Math.sin(h)+this.x0,e.y=this.a*t*(this.coslat0*u-this.sinlat0*c*Math.cos(h))+this.y0,e):(i=2*Math.atan(this.ssfn_(l,u,this.e))-m$J,r=Math.cos(i),n=Math.sin(i),Math.abs(this.coslat0)<=_$C?(o=U$I(this.e,l*this.con,this.con*u),a=2*this.a*this.k0*o/this.cons,e.x=this.x0+a*Math.sin(s-this.long0),e.y=this.y0-this.con*a*Math.cos(s-this.long0),e):(Math.abs(this.sinlat0)<_$C?(t=2*this.a*this.k0/(1+r*Math.cos(h)),e.y=t*n):(t=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*n+this.cosX0*r*Math.cos(h))),e.y=t*(this.cosX0*n-this.sinX0*r*Math.cos(h))+this.y0),e.x=t*r*Math.sin(h)+this.x0,e))}function ui$4(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,o,a=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var s=2*Math.atan(a/(2*this.a*this.k0));return t=this.long0,i=this.lat0,a<=_$C?(e.x=t,e.y=i,e):(i=Math.asin(Math.cos(s)*this.sinlat0+e.y*Math.sin(s)*this.coslat0/a),t=Math.abs(this.coslat0)<_$C?this.lat0>0?g$M(this.long0+Math.atan2(e.x,-1*e.y)):g$M(this.long0+Math.atan2(e.x,e.y)):g$M(this.long0+Math.atan2(e.x*Math.sin(s),a*this.coslat0*Math.cos(s)-e.y*this.sinlat0*Math.sin(s))),e.x=t,e.y=i,e)}if(Math.abs(this.coslat0)<=_$C){if(a<=_$C)return i=this.lat0,t=this.long0,e.x=t,e.y=i,e;e.x*=this.con,e.y*=this.con,n=a*this.cons/(2*this.a*this.k0),i=this.con*Mt$4(this.e,n),t=this.con*g$M(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else r=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=_$C?o=this.X0:(o=Math.asin(Math.cos(r)*this.sinX0+e.y*Math.sin(r)*this.cosX0/a),t=g$M(this.long0+Math.atan2(e.x*Math.sin(r),a*this.cosX0*Math.cos(r)-e.y*this.sinX0*Math.sin(r)))),i=-1*Mt$4(this.e,Math.tan(.5*(m$J+o)));return e.x=t,e.y=i,e}var ci$5=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],mi$2={init:Mi$4,forward:vi$4,inverse:ui$4,names:ci$5,ssfn_:fi$4};function di$4(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),i=this.a,n=1/this.rf,r=2*n-Math.pow(n,2),o=this.e=Math.sqrt(r);this.R=this.k0*i*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+o*t)/(1-o*t));this.K=a-this.alpha*s+this.alpha*o/2*l}function yi$4(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+i)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(o))),s=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(o));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e}function _i$6(e){for(var t=e.x-this.x0,i=e.y-this.y0,n=t/this.R,r=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),s=this.lambda0+a/this.alpha,l=0,u=o,c=-1e3,h=0;Math.abs(u-c)>1e-7;){if(++h>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=s,e.y=u,e}var gi$5=["somerc"],xi$4={init:di$4,forward:yi$4,inverse:_i$6,names:gi$5};function bi$4(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var e=Math.sin(this.lat0),t=Math.cos(this.lat0),i=this.e*e;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(t,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-i*i);var n,r,o=U$I(this.e,this.lat0,e),a=this.bl/t*Math.sqrt((1-this.es)/(1-i*i));if(a*a<1&&(a=1),isNaN(this.longc)){var s=U$I(this.e,this.lat1,Math.sin(this.lat1)),l=U$I(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(a+Math.sqrt(a*a-1))*Math.pow(o,this.bl):this.el=(a-Math.sqrt(a*a-1))*Math.pow(o,this.bl);var u=Math.pow(s,this.bl),c=Math.pow(l,this.bl);r=.5*((n=this.el/u)-1/n);var h=(this.el*this.el-c*u)/(this.el*this.el+c*u),d=(c-u)/(c+u),f=g$M(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(h*Math.tan(.5*this.bl*f)/d)/this.bl,this.long0=g$M(this.long0);var p=g$M(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*p)/r),this.alpha=Math.asin(a*Math.sin(this.gamma0))}else n=this.lat0>=0?a+Math.sqrt(a*a-1):a-Math.sqrt(a*a-1),this.el=n*Math.pow(o,this.bl),r=.5*(n-1/n),this.gamma0=Math.asin(Math.sin(this.alpha)/a),this.long0=this.longc-Math.asin(r*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha))}function Ci$5(e){var t,i,n,r=e.x,o=e.y,a=g$M(r-this.long0);if(Math.abs(Math.abs(o)-m$J)<=_$C)n=o>0?-1:1,i=this.al/this.bl*Math.log(Math.tan(w$G+n*this.gamma0*.5)),t=-1*n*m$J*this.al/this.bl;else{var s=U$I(this.e,o,Math.sin(o)),l=this.el/Math.pow(s,this.bl),u=.5*(l-1/l),c=.5*(l+1/l),h=Math.sin(this.bl*a),d=(u*Math.sin(this.gamma0)-h*Math.cos(this.gamma0))/c;i=Math.abs(Math.abs(d)-1)<=_$C?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-d)/(1+d))/this.bl,t=Math.abs(Math.cos(this.bl*a))<=_$C?this.al*this.bl*a:this.al*Math.atan2(u*Math.cos(this.gamma0)+h*Math.sin(this.gamma0),Math.cos(this.bl*a))/this.bl}return this.no_rot?(e.x=this.x0+t,e.y=this.y0+i):(t-=this.uc,e.x=this.x0+i*Math.cos(this.alpha)+t*Math.sin(this.alpha),e.y=this.y0+t*Math.cos(this.alpha)-i*Math.sin(this.alpha)),e}function Ei$4(e){var t,i;this.no_rot?(i=e.y-this.y0,t=e.x-this.x0):(i=(e.x-this.x0)*Math.cos(this.alpha)-(e.y-this.y0)*Math.sin(this.alpha),t=(e.y-this.y0)*Math.cos(this.alpha)+(e.x-this.x0)*Math.sin(this.alpha),t+=this.uc);var n=Math.exp(-1*this.bl*i/this.al),r=.5*(n-1/n),o=.5*(n+1/n),a=Math.sin(this.bl*t/this.al),s=(a*Math.cos(this.gamma0)+r*Math.sin(this.gamma0))/o,l=Math.pow(this.el/Math.sqrt((1+s)/(1-s)),1/this.bl);return Math.abs(s-1)<_$C?(e.x=this.long0,e.y=m$J):Math.abs(s+1)<_$C?(e.x=this.long0,e.y=-1*m$J):(e.y=Mt$4(this.e,l),e.x=g$M(this.long0-Math.atan2(r*Math.cos(this.gamma0)-a*Math.sin(this.gamma0),Math.cos(this.bl*t/this.al))/this.bl)),e}var Ai$3=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"],Ni$4={init:bi$4,forward:Ci$5,inverse:Ei$4,names:Ai$3};function Pi$5(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<_$C)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),i=Math.cos(this.lat1),n=F$K(this.e,t,i),r=U$I(this.e,this.lat1,t),o=Math.sin(this.lat2),a=Math.cos(this.lat2),s=F$K(this.e,o,a),l=U$I(this.e,this.lat2,o),u=U$I(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>_$C?this.ns=Math.log(n/s)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function wi$4(e){var t=e.x,i=e.y;Math.abs(2*Math.abs(i)-Math.PI)<=_$C&&(i=ft$4(i)*(m$J-2*_$C));var n,r,o=Math.abs(Math.abs(i)-m$J);if(o>_$C)n=U$I(this.e,i,Math.sin(i)),r=this.a*this.f0*Math.pow(n,this.ns);else{if((o=i*this.ns)<=0)return null;r=0}var a=this.ns*g$M(t-this.long0);return e.x=this.k0*(r*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,e}function Si$4(e){var t,i,n,r,o,a=(e.x-this.x0)/this.k0,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+s*s),i=1):(t=-Math.sqrt(a*a+s*s),i=-1);var l=0;if(0!==t&&(l=Math.atan2(i*a,i*s)),0!==t||this.ns>0){if(i=1/this.ns,n=Math.pow(t/(this.a*this.f0),i),-9999===(r=Mt$4(this.e,n)))return null}else r=-m$J;return o=g$M(l/this.ns+this.long0),e.x=o,e.y=r,e}var Ii$3=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"],Ri$3={init:Pi$5,forward:wi$4,inverse:Si$4,names:Ii$3};function Oi$4(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function qi$2(e){var t,i,n,r,o,a,s,l=e.x,u=e.y,c=g$M(l-this.long0);return t=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),o=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(r)),a=this.n*o,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e}function Ti$4(e){var t,i,n,r,o,a,s,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),o=Math.sqrt(e.x*e.x+e.y*e.y),r=Math.atan2(e.y,e.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),i=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(t)),e.x=this.long0-i/this.alfa,a=t,s=0;var u=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,u+=1}while(0===s&&u<15);return u>=15?null:e}var $i$2=["Krovak","krovak"],Li$2={init:Oi$4,forward:qi$2,inverse:Ti$4,names:$i$2},G$O=function(e,t,i,n,r){return e*r-t*Math.sin(2*r)+i*Math.sin(4*r)-n*Math.sin(6*r)},ct$4=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},mt$2=function(e){return.375*e*(1+.25*e*(1+.46875*e))},dt$6=function(e){return.05859375*e*e*(1+.75*e)},yt$3=function(e){return e*e*e*(35/3072)},ht$3=function(e,t,i){var n=t*i;return e/Math.sqrt(1-n*n)},et$8=function(e){return Math.abs(e)<m$J?e:e-ft$4(e)*Math.PI},St$2=function(e,t,i,n,r){var o,a;o=e/t;for(var s=0;s<15;s++)if(o+=a=(e-(t*o-i*Math.sin(2*o)+n*Math.sin(4*o)-r*Math.sin(6*o)))/(t-2*i*Math.cos(2*o)+4*n*Math.cos(4*o)-6*r*Math.cos(6*o)),Math.abs(a)<=1e-10)return o;return NaN};function Gi$2(){this.sphere||(this.e0=ct$4(this.es),this.e1=mt$2(this.es),this.e2=dt$6(this.es),this.e3=yt$3(this.es),this.ml0=this.a*G$O(this.e0,this.e1,this.e2,this.e3,this.lat0))}function zi$4(e){var t,i,n=e.x,r=e.y;if(n=g$M(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(r),Math.cos(n))-this.lat0);else{var o=Math.sin(r),a=Math.cos(r),s=ht$3(this.a,this.e,o),l=Math.tan(r)*Math.tan(r),u=n*Math.cos(r),c=u*u,h=this.es*a*a/(1-this.es);t=s*u*(1-c*l*(1/6-(8-l+8*h)*c/120)),i=this.a*G$O(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+s*o/a*c*(.5+(5-l+6*h)*c/24)}return e.x=t+this.x0,e.y=i+this.y0,e}function Di$5(e){e.x-=this.x0,e.y-=this.y0;var t,i,n=e.x/this.a,r=e.y/this.a;if(this.sphere){var o=r+this.lat0;t=Math.asin(Math.sin(o)*Math.cos(n)),i=Math.atan2(Math.tan(n),Math.cos(o))}else{var a=this.ml0/this.a+r,s=St$2(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-m$J)<=_$C)return e.x=this.long0,e.y=m$J,r<0&&(e.y*=-1),e;var l=ht$3(this.a,this.e,Math.sin(s)),u=l*l*l/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(s),2),h=n*this.a/l,d=h*h;t=s-l*Math.tan(s)/u*h*h*(.5-(1+3*c)*h*h/24),i=h*(1-d*(c/3+(1+3*c)*c*d/15))/Math.cos(s)}return e.x=g$M(i+this.long0),e.y=et$8(t),e}var ki$4=["Cassini","Cassini_Soldner","cass"],pi$5={init:Gi$2,forward:zi$4,inverse:Di$5,names:ki$4},K$E=function(e,t){var i;return e>1e-7?(1-e*e)*(t/(1-(i=e*t)*i)-.5/e*Math.log((1-i)/(1+i))):2*t},Ui$3=1,Bi$2=2,Fi$2=3,ji$3=4;function Qi$2(){var e,t=Math.abs(this.lat0);if(Math.abs(t-m$J)<_$C?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<_$C?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=K$E(this.e,1),this.mmf=.5/(1-this.es),this.apa=th(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=K$E(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function Wi$3(e){var t,i,n,r,o,a,s,l,u,c,h=e.x,d=e.y;if(h=g$M(h-this.long0),this.sphere){if(o=Math.sin(d),c=Math.cos(d),n=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+c*n:1+this.sinph0*o+this.cosph0*c*n)<=_$C)return null;t=(i=Math.sqrt(2/i))*c*Math.sin(h),i*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.phi0)<_$C)return null;i=w$G-.5*d,t=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(h),i*=n}}else{switch(s=0,l=0,u=0,n=Math.cos(h),r=Math.sin(h),o=Math.sin(d),a=K$E(this.e,o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(s=a/this.qp,l=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:u=1+this.sinb1*s+this.cosb1*l*n;break;case this.EQUIT:u=1+l*n;break;case this.N_POLE:u=m$J+d,a=this.qp-a;break;case this.S_POLE:u=d-m$J,a=this.qp+a}if(Math.abs(u)<_$C)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:u=Math.sqrt(2/u),i=this.mode===this.OBLIQ?this.ymf*u*(this.cosb1*s-this.sinb1*l*n):(u=Math.sqrt(2/(1+l*n)))*s*this.ymf,t=this.xmf*u*l*r;break;case this.N_POLE:case this.S_POLE:a>=0?(t=(u=Math.sqrt(a))*r,i=n*(this.mode===this.S_POLE?u:-u)):t=i=0}}return e.x=this.a*t+this.x0,e.y=this.a*i+this.y0,e}function Hi$3(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,o,a,s,l=e.x/this.a,u=e.y/this.a;if(this.sphere){var c,h=0,d=0;if((i=.5*(c=Math.sqrt(l*l+u*u)))>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=Math.sin(i),h=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=_$C?0:Math.asin(u*d/c),l*=d,u=h*c;break;case this.OBLIQ:i=Math.abs(c)<=_$C?this.phi0:Math.asin(h*this.sinph0+u*d*this.cosph0/c),l*=d*this.cosph0,u=(h-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:u=-u,i=m$J-i;break;case this.S_POLE:i-=m$J}t=0!==u||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(l,u):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(l/=this.dd,u*=this.dd,(a=Math.sqrt(l*l+u*u))<_$C)return e.x=0,e.y=this.phi0,e;r=2*Math.asin(.5*a/this.rq),n=Math.cos(r),l*=r=Math.sin(r),this.mode===this.OBLIQ?(s=n*this.sinb1+u*r*this.cosb1/a,o=this.qp*s,u=a*this.cosb1*n-u*this.sinb1*r):(s=u*r/a,o=this.qp*s,u=a*n)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(u=-u),!(o=l*l+u*u))return e.x=0,e.y=this.phi0,e;s=1-o/this.qp,this.mode===this.S_POLE&&(s=-s)}t=Math.atan2(l,u),i=ah(Math.asin(s),this.apa)}return e.x=g$M(this.long0+t),e.y=i,e}var Xi$1=.3333333333333333,Ki$2=.17222222222222222,Ji$2=.10257936507936508,Zi$3=.06388888888888888,Vi$4=.0664021164021164,Yi$2=.016415012942191543;function th(e){var t,i=[];return i[0]=e*Xi$1,t=e*e,i[0]+=t*Ki$2,i[1]=t*Zi$3,t*=e,i[0]+=t*Ji$2,i[1]+=t*Vi$4,i[2]=t*Yi$2,i}function ah(e,t){var i=e+e;return e+t[0]*Math.sin(i)+t[1]*Math.sin(i+i)+t[2]*Math.sin(i+i+i)}var sh=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],ih={init:Qi$2,forward:Wi$3,inverse:Hi$3,names:sh,S_POLE:Ui$3,N_POLE:Bi$2,EQUIT:Fi$2,OBLIQ:ji$3},J$z=function(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)};function hh(){Math.abs(this.lat1+this.lat2)<_$C||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=F$K(this.e3,this.sin_po,this.cos_po),this.qs1=K$E(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=F$K(this.e3,this.sin_po,this.cos_po),this.qs2=K$E(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=K$E(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>_$C?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function eh(e){var t=e.x,i=e.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=K$E(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*g$M(t-this.long0),a=r*Math.sin(o)+this.x0,s=this.rh-r*Math.cos(o)+this.y0;return e.x=a,e.y=s,e}function rh(e){var t,i,n,r,o,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),r=0,0!==t&&(r=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,i)),o=g$M(r/this.ns0+this.long0),e.x=o,e.y=a,e}function nh(e,t){var i,n,r,o,a=J$z(.5*t);if(e<_$C)return a;for(var s=e*e,l=1;l<=25;l++)if(a+=o=.5*(r=1-(n=e*(i=Math.sin(a)))*n)*r/Math.cos(a)*(t/(1-s)-i/r+.5/e*Math.log((1-n)/(1+n))),Math.abs(o)<=1e-7)return a;return null}var oh=["Albers_Conic_Equal_Area","Albers","aea"],lh={init:hh,forward:eh,inverse:rh,names:oh,phi1z:nh};function fh(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Mh(e){var t,i,n,r,o,a,s,l=e.x,u=e.y;return n=g$M(l-this.long0),t=Math.sin(u),i=Math.cos(u),r=Math.cos(n),1,(o=this.sin_p14*t+this.cos_p14*i*r)>0||Math.abs(o)<=_$C?(a=this.x0+1*this.a*i*Math.sin(n)/o,s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*i*r)/o):(a=this.x0+this.infinity_dist*i*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*i*r)),e.x=a,e.y=s,e}function vh(e){var t,i,n,r,o,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(r=Math.atan2(t,this.rc),i=Math.sin(r),n=Math.cos(r),a=J$z(n*this.sin_p14+e.y*i*this.cos_p14/t),o=Math.atan2(e.x*i,t*this.cos_p14*n-e.y*this.sin_p14*i),o=g$M(this.long0+o)):(a=this.phic0,o=0),e.x=o,e.y=a,e}var uh=["gnom"],ch={init:fh,forward:Mh,inverse:vh,names:uh},mh=function(e,t){var i=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-i)<1e-6)return t<0?-1*m$J:m$J;for(var n,r,o,a,s=Math.asin(.5*t),l=0;l<30;l++)if(r=Math.sin(s),o=Math.cos(s),a=e*r,s+=n=Math.pow(1-a*a,2)/(2*o)*(t/(1-e*e)-r/(1-a*a)+.5/e*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return s;return NaN};function dh(){this.sphere||(this.k0=F$K(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function yh(e){var t,i,n=e.x,r=e.y,o=g$M(n-this.long0);if(this.sphere)t=this.x0+this.a*o*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var a=K$E(this.e,Math.sin(r));t=this.x0+this.a*this.k0*o,i=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=i,e}function _h(e){var t,i;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=g$M(this.long0+e.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(i=mh(this.e,2*e.y*this.k0/this.a),t=g$M(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=i,e}var gh=["cea"],xh={init:dh,forward:yh,inverse:_h,names:gh};function bh(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Ch(e){var t=e.x,i=e.y,n=g$M(t-this.long0),r=et$8(i-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*r,e}function Eh(e){var t=e.x,i=e.y;return e.x=g$M(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=et$8(this.lat0+(i-this.y0)/this.a),e}var Ah=["Equirectangular","Equidistant_Cylindrical","eqc"],Nh={init:bh,forward:Ch,inverse:Eh,names:Ah},ba$1=20;function Ph(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ct$4(this.es),this.e1=mt$2(this.es),this.e2=dt$6(this.es),this.e3=yt$3(this.es),this.ml0=this.a*G$O(this.e0,this.e1,this.e2,this.e3,this.lat0)}function wh(e){var t,i,n,r=e.x,o=e.y,a=g$M(r-this.long0);if(n=a*Math.sin(o),this.sphere)Math.abs(o)<=_$C?(t=this.a*a,i=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(o),i=this.a*(et$8(o-this.lat0)+(1-Math.cos(n))/Math.tan(o)));else if(Math.abs(o)<=_$C)t=this.a*a,i=-1*this.ml0;else{var s=ht$3(this.a,this.e,Math.sin(o))/Math.tan(o);t=s*Math.sin(n),i=this.a*G$O(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+s*(1-Math.cos(n))}return e.x=t+this.x0,e.y=i+this.y0,e}function Sh(e){var t,i,n,r,o,a,s,l,u;if(n=e.x-this.x0,r=e.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=_$C)t=g$M(n/this.a+this.long0),i=0;else{var c;for(a=this.lat0+r/this.a,s=n*n/this.a/this.a+a*a,l=a,o=ba$1;o;--o)if(l+=u=-1*(a*(l*(c=Math.tan(l))+1)-l-.5*(l*l+s)*c)/((l-a)/c-1),Math.abs(u)<=_$C){i=l;break}t=g$M(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(r+this.ml0)<=_$C)i=0,t=g$M(this.long0+n/this.a);else{var h,d,f,p,_;for(a=(this.ml0+r)/this.a,s=n*n/this.a/this.a+a*a,l=a,o=ba$1;o;--o)if(_=this.e*Math.sin(l),h=Math.sqrt(1-_*_)*Math.tan(l),d=this.a*G$O(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=u=(a*(h*(p=d/this.a)+1)-p-.5*h*(p*p+s))/(this.es*Math.sin(2*l)*(p*p+s-2*a*p)/(4*h)+(a-p)*(h*f-2/Math.sin(2*l))-f),Math.abs(u)<=_$C){i=l;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),t=g$M(this.long0+Math.asin(n*h/this.a)/Math.sin(i))}return e.x=t,e.y=i,e}var Ih=["Polyconic","poly"],Rh={init:Ph,forward:wh,inverse:Sh,names:Ih};function Oh(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function qh(e){var t,i=e.x,n=e.y-this.lat0,r=i-this.long0,o=n/ot$4*1e-5,a=r,s=1,l=0;for(t=1;t<=10;t++)s*=o,l+=this.A[t]*s;var u,c=l,h=a,d=1,f=0,p=0,_=0;for(t=1;t<=6;t++)u=f*c+d*h,d=d*c-f*h,f=u,p=p+this.B_re[t]*d-this.B_im[t]*f,_=_+this.B_im[t]*d+this.B_re[t]*f;return e.x=_*this.a+this.x0,e.y=p*this.a+this.y0,e}function Th(e){var t,i,n=e.x,r=e.y,o=n-this.x0,a=(r-this.y0)/this.a,s=o/this.a,l=1,u=0,c=0,h=0;for(t=1;t<=6;t++)i=u*a+l*s,l=l*a-u*s,u=i,c=c+this.C_re[t]*l-this.C_im[t]*u,h=h+this.C_im[t]*l+this.C_re[t]*u;for(var d=0;d<this.iterations;d++){var f,p=c,_=h,m=a,g=s;for(t=2;t<=6;t++)f=_*c+p*h,p=p*c-_*h,_=f,m+=(t-1)*(this.B_re[t]*p-this.B_im[t]*_),g+=(t-1)*(this.B_im[t]*p+this.B_re[t]*_);p=1,_=0;var x=this.B_re[1],v=this.B_im[1];for(t=2;t<=6;t++)f=_*c+p*h,p=p*c-_*h,_=f,x+=t*(this.B_re[t]*p-this.B_im[t]*_),v+=t*(this.B_im[t]*p+this.B_re[t]*_);var y=x*x+v*v;c=(m*x+g*v)/y,h=(g*x-m*v)/y}var $=c,b=h,T=1,C=0;for(t=1;t<=9;t++)T*=$,C+=this.D[t]*T;var S=this.lat0+C*ot$4*1e5,w=this.long0+b;return e.x=w,e.y=S,e}var $h=["New_Zealand_Map_Grid","nzmg"],Lh={init:Oh,forward:qh,inverse:Th,names:$h};function Gh(){}function zh(e){var t=e.x,i=e.y,n=g$M(t-this.long0),r=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return e.x=r,e.y=o,e}function Dh(e){e.x-=this.x0,e.y-=this.y0;var t=g$M(this.long0+e.x/this.a),i=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=i,e}var kh=["Miller_Cylindrical","mill"],ph={init:Gh,forward:zh,inverse:Dh,names:kh},Uh=20;function Bh(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=ya$1(this.es)}function Fh(e){var t,i,n=e.x,r=e.y;if(n=g$M(n-this.long0),this.sphere){if(this.m)for(var o=this.n*Math.sin(r),a=Uh;a;--a){var s=(this.m*r+Math.sin(r)-o)/(this.m+Math.cos(r));if(r-=s,Math.abs(s)<_$C)break}else r=1!==this.n?Math.asin(this.n*Math.sin(r)):r;t=this.a*this.C_x*n*(this.m+Math.cos(r)),i=this.a*this.C_y*r}else{var l=Math.sin(r),u=Math.cos(r);i=this.a*Pt$3(r,l,u,this.en),t=this.a*n*u/Math.sqrt(1-this.es*l*l)}return e.x=t,e.y=i,e}function jh(e){var t,i,n,r;return e.x-=this.x0,n=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,n/=this.C_x*(this.m+Math.cos(t)),this.m?t=J$z((this.m*t+Math.sin(t))/this.n):1!==this.n&&(t=J$z(Math.sin(t)/this.n)),n=g$M(n+this.long0),t=et$8(t)):(t=_a$2(e.y/this.a,this.es,this.en),(r=Math.abs(t))<m$J?(r=Math.sin(t),i=this.long0+e.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),n=g$M(i)):r-_$C<m$J&&(n=this.long0)),e.x=n,e.y=t,e}var Qh=["Sinusoidal","sinu"],Wh={init:Bh,forward:Fh,inverse:jh,names:Qh};function Hh(){}function Xh(e){for(var t=e.x,i=e.y,n=g$M(t-this.long0),r=i,o=Math.PI*Math.sin(i);;){var a=-(r+Math.sin(r)-o)/(1+Math.cos(r));if(r+=a,Math.abs(a)<_$C)break}r/=2,Math.PI/2-Math.abs(i)<_$C&&(n=0);var s=.900316316158*this.a*n*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return e.x=s,e.y=l,e}function Kh(e){var t,i;e.x-=this.x0,e.y-=this.y0,i=e.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),t=Math.asin(i);var n=g$M(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*t+Math.sin(2*t))/Math.PI,Math.abs(i)>1&&(i=1);var r=Math.asin(i);return e.x=n,e.y=r,e}var Jh=["Mollweide","moll"],Zh={init:Hh,forward:Xh,inverse:Kh,names:Jh};function Vh(){Math.abs(this.lat1+this.lat2)<_$C||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ct$4(this.es),this.e1=mt$2(this.es),this.e2=dt$6(this.es),this.e3=yt$3(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=F$K(this.e,this.sinphi,this.cosphi),this.ml1=G$O(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<_$C?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=F$K(this.e,this.sinphi,this.cosphi),this.ml2=G$O(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=G$O(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function Yh(e){var t,i=e.x,n=e.y;if(this.sphere)t=this.a*(this.g-n);else{var r=G$O(this.e0,this.e1,this.e2,this.e3,n);t=this.a*(this.g-r)}var o=this.ns*g$M(i-this.long0),a=this.x0+t*Math.sin(o),s=this.y0+this.rh-t*Math.cos(o);return e.x=a,e.y=s,e}function te$r(e){var t,i,n,r;e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns>=0?(i=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(i=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var o=0;if(0!==i&&(o=Math.atan2(t*e.x,t*e.y)),this.sphere)return r=g$M(this.long0+o/this.ns),n=et$8(this.g-i/this.a),e.x=r,e.y=n,e;var a=this.g-i/this.a;return n=St$2(a,this.e0,this.e1,this.e2,this.e3),r=g$M(this.long0+o/this.ns),e.x=r,e.y=n,e}var ae$o=["Equidistant_Conic","eqdc"],se$m={init:Vh,forward:Yh,inverse:te$r,names:ae$o};function ie$r(){this.R=this.a}function he$i(e){var t,i,n=e.x,r=e.y,o=g$M(n-this.long0);Math.abs(r)<=_$C&&(t=this.x0+this.R*o,i=this.y0);var a=J$z(2*Math.abs(r/Math.PI));(Math.abs(o)<=_$C||Math.abs(Math.abs(r)-m$J)<=_$C)&&(t=this.x0,i=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var s=.5*Math.abs(Math.PI/o-o/Math.PI),l=s*s,u=Math.sin(a),c=Math.cos(a),h=c/(u+c-1),d=h*h,f=h*(2/u-1),p=f*f,_=Math.PI*this.R*(s*(h-p)+Math.sqrt(l*(h-p)*(h-p)-(p+l)*(d-p)))/(p+l);o<0&&(_=-_),t=this.x0+_;var m=l+h;return _=Math.PI*this.R*(f*m-s*Math.sqrt((p+l)*(l+1)-m*m))/(p+l),i=r>=0?this.y0+_:this.y0-_,e.x=t,e.y=i,e}function ee$q(e){var t,i,n,r,o,a,s,l,u,c,h,d;return e.x-=this.x0,e.y-=this.y0,h=Math.PI*this.R,o=(n=e.x/h)*n+(r=e.y/h)*r,h=3*(r*r/(l=-2*(a=-Math.abs(r)*(1+o))+1+2*r*r+o*o)+(2*(s=a-2*r*r+n*n)*s*s/l/l/l-9*a*s/l/l)/27)/(u=(a-s*s/3/l)/l)/(c=2*Math.sqrt(-u/3)),Math.abs(h)>1&&(h=h>=0?1:-1),d=Math.acos(h)/3,i=e.y>=0?(-c*Math.cos(d+Math.PI/3)-s/3/l)*Math.PI:-(-c*Math.cos(d+Math.PI/3)-s/3/l)*Math.PI,t=Math.abs(n)<_$C?this.long0:g$M(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-r*r)+o*o))/2/n),e.x=t,e.y=i,e}var re$v=["Van_der_Grinten_I","VanDerGrinten","vandg"],ne$w={init:ie$r,forward:he$i,inverse:ee$q,names:re$v};function oe$m(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function le$p(e){var t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T=e.x,C=e.y,S=Math.sin(e.y),w=Math.cos(e.y),E=g$M(T-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=_$C?(e.x=this.x0+this.a*(m$J-C)*Math.sin(E),e.y=this.y0-this.a*(m$J-C)*Math.cos(E),e):Math.abs(this.sin_p12+1)<=_$C?(e.x=this.x0+this.a*(m$J+C)*Math.sin(E),e.y=this.y0+this.a*(m$J+C)*Math.cos(E),e):(x=this.sin_p12*S+this.cos_p12*w*Math.cos(E),g=(m=Math.acos(x))/Math.sin(m),e.x=this.x0+this.a*g*w*Math.sin(E),e.y=this.y0+this.a*g*(this.cos_p12*S-this.sin_p12*w*Math.cos(E)),e):(t=ct$4(this.es),i=mt$2(this.es),n=dt$6(this.es),r=yt$3(this.es),Math.abs(this.sin_p12-1)<=_$C?(o=this.a*G$O(t,i,n,r,m$J),a=this.a*G$O(t,i,n,r,C),e.x=this.x0+(o-a)*Math.sin(E),e.y=this.y0-(o-a)*Math.cos(E),e):Math.abs(this.sin_p12+1)<=_$C?(o=this.a*G$O(t,i,n,r,m$J),a=this.a*G$O(t,i,n,r,C),e.x=this.x0+(o+a)*Math.sin(E),e.y=this.y0+(o+a)*Math.cos(E),e):(s=S/w,l=ht$3(this.a,this.e,this.sin_p12),u=ht$3(this.a,this.e,S),c=Math.atan((1-this.es)*s+this.es*l*this.sin_p12/(u*w)),v=0===(h=Math.atan2(Math.sin(E),this.cos_p12*Math.tan(c)-this.sin_p12*Math.cos(E)))?Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.abs(Math.abs(h)-Math.PI)<=_$C?-Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.asin(Math.sin(E)*Math.cos(c)/Math.sin(h)),d=this.e*this.sin_p12/Math.sqrt(1-this.es),m=l*v*(1-(y=v*v)*(_=(f=this.e*this.cos_p12*Math.cos(h)/Math.sqrt(1-this.es))*f)*(1-_)/6+($=y*v)/8*(p=d*f)*(1-2*_)+(b=$*v)/120*(_*(4-7*_)-3*d*d*(1-7*_))-b*v/48*p),e.x=this.x0+m*Math.sin(h),e.y=this.y0+m*Math.cos(h),e))}function fe$i(e){var t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=Math.sqrt(e.x*e.x+e.y*e.y))>2*m$J*this.a?void 0:(i=t/this.a,n=Math.sin(i),r=Math.cos(i),o=this.long0,Math.abs(t)<=_$C?a=this.lat0:(a=J$z(r*this.sin_p12+e.y*n*this.cos_p12/t),s=Math.abs(this.lat0)-m$J,o=Math.abs(s)<=_$C?this.lat0>=0?g$M(this.long0+Math.atan2(e.x,-e.y)):g$M(this.long0-Math.atan2(-e.x,e.y)):g$M(this.long0+Math.atan2(e.x*n,t*this.cos_p12*r-e.y*this.sin_p12*n))),e.x=o,e.y=a,e):(l=ct$4(this.es),u=mt$2(this.es),c=dt$6(this.es),h=yt$3(this.es),Math.abs(this.sin_p12-1)<=_$C?(d=this.a*G$O(l,u,c,h,m$J),t=Math.sqrt(e.x*e.x+e.y*e.y),a=St$2((d-t)/this.a,l,u,c,h),o=g$M(this.long0+Math.atan2(e.x,-1*e.y)),e.x=o,e.y=a,e):Math.abs(this.sin_p12+1)<=_$C?(d=this.a*G$O(l,u,c,h,m$J),t=Math.sqrt(e.x*e.x+e.y*e.y),a=St$2((t-d)/this.a,l,u,c,h),o=g$M(this.long0+Math.atan2(e.x,e.y)),e.x=o,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),_=Math.atan2(e.x,e.y),f=ht$3(this.a,this.e,this.sin_p12),m=Math.cos(_),x=-(g=this.e*this.cos_p12*m)*g/(1-this.es),v=3*this.es*(1-x)*this.sin_p12*this.cos_p12*m/(1-this.es),b=1-x*($=(y=t/f)-x*(1+x)*Math.pow(y,3)/6-v*(1+3*x)*Math.pow(y,4)/24)*$/2-y*$*$*$/6,p=Math.asin(this.sin_p12*Math.cos($)+this.cos_p12*Math.sin($)*m),o=g$M(this.long0+Math.asin(Math.sin(_)*Math.sin($)/Math.cos(p))),a=Math.atan((1-this.es*b*this.sin_p12/Math.sin(p))*Math.tan(p)/(1-this.es)),e.x=o,e.y=a,e))}var Me$h=["Azimuthal_Equidistant","aeqd"],ve$h={init:oe$m,forward:le$p,inverse:fe$i,names:Me$h};function ue$n(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function ce$k(e){var t,i,n,r,o,a,s,l=e.x,u=e.y;return n=g$M(l-this.long0),t=Math.sin(u),i=Math.cos(u),r=Math.cos(n),1,((o=this.sin_p14*t+this.cos_p14*i*r)>0||Math.abs(o)<=_$C)&&(a=1*this.a*i*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*i*r)),e.x=a,e.y=s,e}function me$l(e){var t,i,n,r,o,a,s;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),i=J$z(t/this.a),n=Math.sin(i),r=Math.cos(i),a=this.long0,Math.abs(t)<=_$C?(s=this.lat0,e.x=a,e.y=s,e):(s=J$z(r*this.sin_p14+e.y*n*this.cos_p14/t),o=Math.abs(this.lat0)-m$J,Math.abs(o)<=_$C?(a=this.lat0>=0?g$M(this.long0+Math.atan2(e.x,-e.y)):g$M(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=s,e):(a=g$M(this.long0+Math.atan2(e.x*n,t*this.cos_p14*r-e.y*this.sin_p14*n)),e.x=a,e.y=s,e))}var de$k=["ortho"],ye$f={init:ue$n,forward:ce$k,inverse:me$l,names:de$k},I$S={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},P$E={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function _e$k(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=m$J-w$G/2?this.face=I$S.TOP:this.lat0<=-(m$J-w$G/2)?this.face=I$S.BOTTOM:Math.abs(this.long0)<=w$G?this.face=I$S.FRONT:Math.abs(this.long0)<=m$J+w$G?this.face=this.long0>0?I$S.RIGHT:I$S.LEFT:this.face=I$S.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function ge$h(e){var t,i,n,r,o,a,s={x:0,y:0},l={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,i=e.x,this.face===I$S.TOP)r=m$J-t,i>=w$G&&i<=m$J+w$G?(l.value=P$E.AREA_0,n=i-m$J):i>m$J+w$G||i<=-(m$J+w$G)?(l.value=P$E.AREA_1,n=i>0?i-R$D:i+R$D):i>-(m$J+w$G)&&i<=-w$G?(l.value=P$E.AREA_2,n=i+m$J):(l.value=P$E.AREA_3,n=i);else if(this.face===I$S.BOTTOM)r=m$J+t,i>=w$G&&i<=m$J+w$G?(l.value=P$E.AREA_0,n=-i+m$J):i<w$G&&i>=-w$G?(l.value=P$E.AREA_1,n=-i):i<-w$G&&i>=-(m$J+w$G)?(l.value=P$E.AREA_2,n=-i-m$J):(l.value=P$E.AREA_3,n=i>0?-i+R$D:-i-R$D);else{var u,c,h,d,f,p;this.face===I$S.RIGHT?i=rt$9(i,+m$J):this.face===I$S.BACK?i=rt$9(i,+R$D):this.face===I$S.LEFT&&(i=rt$9(i,-m$J)),d=Math.sin(t),f=Math.cos(t),p=Math.sin(i),u=f*Math.cos(i),c=f*p,h=d,this.face===I$S.FRONT?n=It$5(r=Math.acos(u),h,c,l):this.face===I$S.RIGHT?n=It$5(r=Math.acos(c),h,-u,l):this.face===I$S.BACK?n=It$5(r=Math.acos(-u),h,-c,l):this.face===I$S.LEFT?n=It$5(r=Math.acos(-c),h,u,l):(r=n=0,l.value=P$E.AREA_0)}return a=Math.atan(12/R$D*(n+Math.acos(Math.sin(n)*Math.cos(w$G))-m$J)),o=Math.sqrt((1-Math.cos(r))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),l.value===P$E.AREA_1?a+=m$J:l.value===P$E.AREA_2?a+=R$D:l.value===P$E.AREA_3&&(a+=1.5*R$D),s.x=o*Math.cos(a),s.y=o*Math.sin(a),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,e.x=s.x,e.y=s.y,e}function xe$f(e){var t,i,n,r,o,a,s,l,u,c,h,d,f={lam:0,phi:0},p={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,i=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?p.value=P$E.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(p.value=P$E.AREA_1,t-=m$J):e.x<0&&-e.x>=Math.abs(e.y)?(p.value=P$E.AREA_2,t=t<0?t+R$D:t-R$D):(p.value=P$E.AREA_3,t+=m$J),u=R$D/12*Math.tan(t),o=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(o),(s=1-(n=Math.cos(t))*n*(r=Math.tan(i))*r*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?s=-1:s>1&&(s=1),this.face===I$S.TOP)l=Math.acos(s),f.phi=m$J-l,p.value===P$E.AREA_0?f.lam=a+m$J:p.value===P$E.AREA_1?f.lam=a<0?a+R$D:a-R$D:p.value===P$E.AREA_2?f.lam=a-m$J:f.lam=a;else if(this.face===I$S.BOTTOM)l=Math.acos(s),f.phi=l-m$J,p.value===P$E.AREA_0?f.lam=-a+m$J:p.value===P$E.AREA_1?f.lam=-a:p.value===P$E.AREA_2?f.lam=-a-m$J:f.lam=a<0?-a-R$D:-a+R$D;else{var _,m,g;u=(_=s)*_,m=(u+=(g=u>=1?0:Math.sqrt(1-u)*Math.sin(a))*g)>=1?0:Math.sqrt(1-u),p.value===P$E.AREA_1?(u=m,m=-g,g=u):p.value===P$E.AREA_2?(m=-m,g=-g):p.value===P$E.AREA_3&&(u=m,m=g,g=-u),this.face===I$S.RIGHT?(u=_,_=-m,m=u):this.face===I$S.BACK?(_=-_,m=-m):this.face===I$S.LEFT&&(u=_,_=m,m=-u),f.phi=Math.acos(-g)-m$J,f.lam=Math.atan2(m,_),this.face===I$S.RIGHT?f.lam=rt$9(f.lam,-m$J):this.face===I$S.BACK?f.lam=rt$9(f.lam,-R$D):this.face===I$S.LEFT&&(f.lam=rt$9(f.lam,+m$J))}0!==this.es&&(c=f.phi<0?1:0,h=Math.tan(f.phi),d=this.b/Math.sqrt(h*h+this.one_minus_f_squared),f.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),c&&(f.phi=-f.phi));return f.lam+=this.long0,e.x=f.lam,e.y=f.phi,e}function It$5(e,t,i,n){var r;return e<_$C?(n.value=P$E.AREA_0,r=0):(r=Math.atan2(t,i),Math.abs(r)<=w$G?n.value=P$E.AREA_0:r>w$G&&r<=m$J+w$G?(n.value=P$E.AREA_1,r-=m$J):r>m$J+w$G||r<=-(m$J+w$G)?(n.value=P$E.AREA_2,r=r>=0?r-R$D:r+R$D):(n.value=P$E.AREA_3,r+=m$J)),r}function rt$9(e,t){var i=e+t;return i<-R$D?i+=qt$4:i>+R$D&&(i-=qt$4),i}var be$l=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],Ce$e={init:_e$k,forward:ge$h,inverse:xe$f,names:be$l},Bt$6=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],_t$4=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ca$1=.8487,Ea$2=1.3523,Aa$2=H$K/5,Ee$i=1/Aa$2,nt$5=18,Rt$5=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},Ae$h=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};function Ne$c(e,t,i,n){for(var r=t;n;--n){var o=e(r);if(r-=o,Math.abs(o)<i)break}return r}function Pe$c(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function we$g(e){var t=g$M(e.x-this.long0),i=Math.abs(e.y),n=Math.floor(i*Aa$2);n<0?n=0:n>=nt$5&&(n=nt$5-1),i=H$K*(i-Ee$i*n);var r={x:Rt$5(Bt$6[n],i)*t,y:Rt$5(_t$4[n],i)};return e.y<0&&(r.y=-r.y),r.x=r.x*this.a*Ca$1+this.x0,r.y=r.y*this.a*Ea$2+this.y0,r}function Se$b(e){var t={x:(e.x-this.x0)/(this.a*Ca$1),y:Math.abs(e.y-this.y0)/(this.a*Ea$2)};if(t.y>=1)t.x/=Bt$6[nt$5][0],t.y=e.y<0?-m$J:m$J;else{var i=Math.floor(t.y*nt$5);for(i<0?i=0:i>=nt$5&&(i=nt$5-1);;)if(_t$4[i][0]>t.y)--i;else{if(!(_t$4[i+1][0]<=t.y))break;++i}var n=_t$4[i],r=5*(t.y-n[0])/(_t$4[i+1][0]-n[0]);r=Ne$c((function(e){return(Rt$5(n,e)-t.y)/Ae$h(n,e)}),r,_$C,100),t.x/=Rt$5(Bt$6[i],r),t.y=(5*i+r)*$$F,e.y<0&&(t.y=-t.y)}return t.x=g$M(t.x+this.long0),t}var Ie$d=["Robinson","robin"],Re$f={init:Pe$c,forward:we$g,inverse:Se$b,names:Ie$d};function Oe$f(){this.name="geocent"}function qe$6(e){return Yt$2(e,this.es,this.a)}function Te$g(e){return ta$2(e,this.es,this.a,this.b)}var $e$7=["Geocentric","geocentric","geocent","Geocent"],Le$j={init:Oe$f,forward:qe$6,inverse:Te$g,names:$e$7},Ge$8=function(e){e.Proj.projections.add(ps),e.Proj.projections.add(wt$4),e.Proj.projections.add(Ys),e.Proj.projections.add(li$4),e.Proj.projections.add(mi$2),e.Proj.projections.add(xi$4),e.Proj.projections.add(Ni$4),e.Proj.projections.add(Ri$3),e.Proj.projections.add(Li$2),e.Proj.projections.add(pi$5),e.Proj.projections.add(ih),e.Proj.projections.add(lh),e.Proj.projections.add(ch),e.Proj.projections.add(xh),e.Proj.projections.add(Nh),e.Proj.projections.add(Rh),e.Proj.projections.add(Lh),e.Proj.projections.add(ph),e.Proj.projections.add(Wh),e.Proj.projections.add(Zh),e.Proj.projections.add(se$m),e.Proj.projections.add(ne$w),e.Proj.projections.add(ve$h),e.Proj.projections.add(ye$f),e.Proj.projections.add(Ce$e),e.Proj.projections.add(Re$f),e.Proj.projections.add(Le$j)};function p$L(e){e=u$_(e,{});var t=u$_(e.name,"tmerc"),i=u$_(e.centralMeridian,117),n=u$_(e.primeMeridian,0),r=u$_(e.standardParallel_1,0),o=u$_(e.standardParallel_2,0),a=u$_(e.eastFalse,5e5),s=u$_(e.northFalse,0),l=u$_(e.semimajorAxis,6378137),u=u$_(e.inverseFlattening,298.257222101),c=(1-1/u)*l,h=e.ellps;if(e$2b(h))d="+proj={name} +lon_0={lon_0} +lat_0={lat_0} +lat_1={lat_1} +lat_2={lat_2} +x_0={x_0} +y_0={y_0} +ellps={ellps}",this._projection=d.replace("{name}",t).replace("{lon_0}",i).replace("{lat_0}",n).replace("{lat_1}",r).replace("{lat_2}",o).replace("{x_0}",a).replace("{y_0}",s).replace("{ellps}",h);else{var d="+proj={name} +lon_0={lon_0} +lat_0={lat_0} +lat_1={lat_1} +lat_2={lat_2} +x_0={x_0} +y_0={y_0} +a={a} +b={b} +rf={rf}";this._projection=d.replace("{name}",t).replace("{lon_0}",i).replace("{lat_0}",n).replace("{lat_1}",r).replace("{lat_2}",o).replace("{x_0}",a).replace("{y_0}",s).replace("{a}",l).replace("{b}",c).replace("{rf}",u)}}k$C.defaultDatum="WGS84",k$C.Proj=j$F,k$C.WGS84=new k$C.Proj("WGS84"),k$C.Point=it$4,k$C.toPoint=sa$2,k$C.defs=L$Q,k$C.transform=Nt$5,k$C.mgrs=ds,k$C.version="2.6.1",Ge$8(k$C),Object.defineProperties(p$L.prototype,{projection:{get:function(){return this._projection}}}),p$L.prototype.project=function(e,t){var i=k$C(this._projection,[e$2a.toDegrees(e.longitude),e$2a.toDegrees(e.latitude)]);return e$2b(t)?(t.x=i[0],t.y=i[1],t.z=e.height,t):new o$1p(i[0],i[1],e.height)},p$L.prototype.unproject=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required");var i=k$C(this._projection).inverse([e.x,e.y]),n=e$2a.toRadians(i[0]),r=e$2a.toRadians(i[1]);return e$2b(t)?(t.longitude=n,t.latitude=r,t):new a$18(n,r)};var I$R={computePositions:function(e,t,i,n,r){var o,a=.5*e,s=-a,l=n+n,u=new Float64Array(3*(r?2*l:l)),c=0,h=0,d=r?3*l:0,f=r?3*(l+n):3*n;for(o=0;o<n;o++){var p=o/n*e$2a.TWO_PI,_=Math.cos(p),m=Math.sin(p),g=_*i,x=m*i,v=_*t,y=m*t;u[h+d]=g,u[h+d+1]=x,u[h+d+2]=s,u[h+f]=v,u[h+f+1]=y,u[h+f+2]=a,h+=3,r&&(u[c++]=g,u[c++]=x,u[c++]=s,u[c++]=v,u[c++]=y,u[c++]=a)}return u}},M$J=new o$1o,at$6=new o$1p,ut$5=new o$1p,mt$1=new o$1p,vt$4=new o$1p;function l$Q(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=u$_(e.vertexFormat,n$11.DEFAULT),o=u$_(e.slices,128);if(!e$2b(t))throw new t$16("options.length must be defined.");if(!e$2b(i))throw new t$16("options.topRadius must be defined.");if(!e$2b(n))throw new t$16("options.bottomRadius must be defined.");if(o<3)throw new t$16("options.slices must be greater than or equal to 3.");if(e$2b(e.offsetAttribute)&&e.offsetAttribute===_0x58701d.TOP)throw new t$16("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=i,this._bottomRadius=n,this._vertexFormat=n$11.clone(r),this._slices=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}l$Q.packedLength=n$11.packedLength+5,l$Q.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=u$_(e._offsetAttribute,-1),t};var H$J=new n$11,E$K={vertexFormat:H$J,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0},G$N;l$Q.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n=n$11.unpack(e,t,H$J);t+=n$11.packedLength;var r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return e$2b(i)?(i._vertexFormat=n$11.clone(n,i._vertexFormat),i._length=r,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._offsetAttribute=-1===l?void 0:l,i):(E$K.length=r,E$K.topRadius=o,E$K.bottomRadius=a,E$K.slices=s,E$K.offsetAttribute=-1===l?void 0:l,new l$Q(E$K))},l$Q.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._vertexFormat,o=e._slices;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=o+o,l=o+s,u=s+s,c=I$R.computePositions(t,i,n,o,!0),h=r.st?new Float32Array(2*u):void 0,d=r.normal?new Float32Array(3*u):void 0,f=r.tangent?new Float32Array(3*u):void 0,p=r.bitangent?new Float32Array(3*u):void 0,_=r.normal||r.tangent||r.bitangent;if(_){var m=r.tangent||r.bitangent,g=0,x=0,v=0,y=Math.atan2(n-i,t),$=at$6;$.z=Math.sin(y);var b=Math.cos(y),T=mt$1,C=ut$5;for(a=0;a<o;a++){var S=a/o*e$2a.TWO_PI,w=b*Math.cos(S),E=b*Math.sin(S);_&&($.x=w,$.y=E,m&&(T=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,$,T),T)),r.normal&&(d[g++]=$.x,d[g++]=$.y,d[g++]=$.z,d[g++]=$.x,d[g++]=$.y,d[g++]=$.z),r.tangent&&(f[x++]=T.x,f[x++]=T.y,f[x++]=T.z,f[x++]=T.x,f[x++]=T.y,f[x++]=T.z),r.bitangent&&(C=o$1p.normalize(o$1p.cross($,T,C),C),p[v++]=C.x,p[v++]=C.y,p[v++]=C.z,p[v++]=C.x,p[v++]=C.y,p[v++]=C.z))}for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=-1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[v++]=0,p[v++]=-1,p[v++]=0);for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[v++]=0,p[v++]=1,p[v++]=0)}var P=12*o-12,A=ce$x.createTypedArray(u,P),L=0,M=0;for(a=0;a<o-1;a++)A[L++]=M,A[L++]=M+2,A[L++]=M+3,A[L++]=M,A[L++]=M+3,A[L++]=M+1,M+=2;for(A[L++]=s-2,A[L++]=0,A[L++]=1,A[L++]=s-2,A[L++]=1,A[L++]=s-1,a=1;a<o-1;a++)A[L++]=s+a+1,A[L++]=s+a,A[L++]=s;for(a=1;a<o-1;a++)A[L++]=l,A[L++]=l+a,A[L++]=l+a+1;var R=0;if(r.st){var I=Math.max(i,n);for(a=0;a<u;a++){var O=o$1p.fromArray(c,3*a,vt$4);h[R++]=(O.x+I)/(2*I),h[R++]=(O.y+I)/(2*I)}}var D=new a$_;r.position&&(D.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:c})),r.normal&&(D.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:d})),r.tangent&&(D.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:f})),r.bitangent&&(D.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:p})),r.st&&(D.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:h})),M$J.x=.5*t,M$J.y=Math.max(n,i);var B=new i$1c(o$1p.ZERO,o$1o.magnitude(M$J));if(e$2b(e._offsetAttribute)){t=c.length;var N=new Uint8Array(t/3);d$1s(N,e._offsetAttribute===_0x58701d.NONE?0:1),D.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:N})}return new I$1p({attributes:D,indices:A,primitiveType:W$18.TRIANGLES,boundingSphere:B,offsetAttribute:e._offsetAttribute})}},l$Q.getUnitCylinder=function(){return e$2b(G$N)||(G$N=l$Q.createGeometry(new l$Q({topRadius:1,bottomRadius:1,length:1,vertexFormat:n$11.POSITION_ONLY}))),G$N};var l$P=new o$1o;function d$Z(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=u$_(e.slices,128),o=Math.max(u$_(e.numberOfVerticalLines,16),0);if(o$1q.typeOf.number("options.positions",t),o$1q.typeOf.number("options.topRadius",i),o$1q.typeOf.number("options.bottomRadius",n),o$1q.typeOf.number.greaterThanOrEquals("options.slices",r,3),e$2b(e.offsetAttribute)&&e.offsetAttribute===_0x58701d.TOP)throw new t$16("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=i,this._bottomRadius=n,this._slices=r,this._numberOfVerticalLines=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}d$Z.packedLength=6,d$Z.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i++]=e._numberOfVerticalLines,t[i]=u$_(e._offsetAttribute,-1),t};var b$Q={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};d$Z.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=e[t++],r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return e$2b(i)?(i._length=n,i._topRadius=r,i._bottomRadius=o,i._slices=a,i._numberOfVerticalLines=s,i._offsetAttribute=-1===l?void 0:l,i):(b$Q.length=n,b$Q.topRadius=r,b$Q.bottomRadius=o,b$Q.slices=a,b$Q.numberOfVerticalLines=s,b$Q.offsetAttribute=-1===l?void 0:l,new d$Z(b$Q))},d$Z.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._slices,o=e._numberOfVerticalLines;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=2*r,l=I$R.computePositions(t,i,n,r,!1),u=2*r;if(o>0){var c=Math.min(o,r);a=Math.round(r/c),u+=c}var h,d=ce$x.createTypedArray(s,2*u),f=0;for(h=0;h<r-1;h++)d[f++]=h,d[f++]=h+1,d[f++]=h+r,d[f++]=h+1+r;if(d[f++]=r-1,d[f++]=0,d[f++]=r+r-1,d[f++]=r,o>0)for(h=0;h<r;h+=a)d[f++]=h,d[f++]=h+r;var p=new a$_;p.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:l}),l$P.x=.5*t,l$P.y=Math.max(n,i);var _=new i$1c(o$1p.ZERO,o$1o.magnitude(l$P));if(e$2b(e._offsetAttribute)){t=l.length;var m=new Uint8Array(t/3);d$1s(m,e._offsetAttribute===_0x58701d.NONE?0:1),p.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return new I$1p({attributes:p,indices:d,primitiveType:W$18.LINES,boundingSphere:_,offsetAttribute:e._offsetAttribute})}};var w$F=1953029805,c$H=2917034100;function f$L(e,t){if(f$L.passThroughDataForTesting)return t;o$1q.typeOf.object("key",e),o$1q.typeOf.object("data",t);var i=e.byteLength;if(0===i||i%4!=0)throw new t$14("The length of key must be greater than 0 and a multiple of 4.");var n=new DataView(t),r=n.getUint32(0,!0);if(r===w$F||r===c$H)return t;for(var o,a=new DataView(e),s=0,l=t.byteLength,u=l-l%8,c=i,h=8;s<u;)for(o=h=(h+8)%24;s<u&&o<c;)n.setUint32(s,n.getUint32(s,!0)^a.getUint32(o,!0),!0),n.setUint32(s+4,n.getUint32(s+4,!0)^a.getUint32(o+4,!0),!0),s+=8,o+=24;if(s<l)for(o>=c&&(o=h=(h+8)%24);s<l;)n.setUint8(s,n.getUint8(s)^a.getUint8(o)),s++,o++}function o$K(e){this.proxy=e}function t$B(e,t){if(e=u$_(e,0),(t=u$_(t,Number.MAX_VALUE))<=e)throw new t$16("far distance must be greater than near distance.");this.value=new Float32Array([e,t])}f$L.passThroughDataForTesting=!1,o$K.prototype.getURL=function(e){var t=-1===this.proxy.indexOf("?")?"?":"";return this.proxy+t+encodeURIComponent(e)},Object.defineProperties(t$B.prototype,{componentDatatype:{get:function(){return S$12.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}}),t$B.fromDistanceDisplayCondition=function(e){if(!e$2b(e))throw new t$16("distanceDisplayCondition is required.");if(e.far<=e.near)throw new t$16("distanceDisplayCondition.far distance must be greater than distanceDisplayCondition.near distance.");return new t$B(e.near,e.far)},t$B.toValue=function(e,t){if(!e$2b(e))throw new t$16("distanceDisplayCondition is required.");return e$2b(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Ni$3=new o$1p,zi$3=new o$1p,Di$4=new o$1p,Si$3=new o$1p,Ui$2=new o$1p(1,1,1),_i$5=Math.cos,Ci$4=Math.sin;function b$P(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.radii,Ui$2),i=u$_(e.innerRadii,t),n=u$_(e.minimumClock,0),r=u$_(e.maximumClock,e$2a.TWO_PI),o=u$_(e.minimumCone,0),a=u$_(e.maximumCone,e$2a.PI),s=Math.round(u$_(e.stackPartitions,64)),l=Math.round(u$_(e.slicePartitions,64)),u=u$_(e.vertexFormat,n$11.DEFAULT);if(l<3)throw new t$16("options.slicePartitions cannot be less than three.");if(s<3)throw new t$16("options.stackPartitions cannot be less than three.");this._radii=o$1p.clone(t),this._innerRadii=o$1p.clone(i),this._minimumClock=n,this._maximumClock=r,this._minimumCone=o,this._maximumCone=a,this._stackPartitions=s,this._slicePartitions=l,this._vertexFormat=n$11.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}b$P.packedLength=2*o$1p.packedLength+n$11.packedLength+7,b$P.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),o$1p.pack(e._radii,t,i),i+=o$1p.packedLength,o$1p.pack(e._innerRadii,t,i),i+=o$1p.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=u$_(e._offsetAttribute,-1),t};var ki$3=new o$1p,li$3=new o$1p,Pi$4=new n$11,O$x={radii:ki$3,innerRadii:li$3,vertexFormat:Pi$4,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0},ni$2;function t$A(e){e=u$_(e,{}),this._tilingScheme=e.tilingScheme,e$2b(this._tilingScheme)||(this._tilingScheme=new g$13({ellipsoid:u$_(e.ellipsoid,t$13.WGS84)})),this._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new o$1h,this._isCreateSkirt=e.isCreateSkirt,this._isSkirtDirty=!1,this._readyPromise=o$1l.resolve(!0)}function n$x(){this._removalFunctions=[]}b$P.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n=o$1p.unpack(e,t,ki$3);t+=o$1p.packedLength;var r=o$1p.unpack(e,t,li$3);t+=o$1p.packedLength;var o=n$11.unpack(e,t,Pi$4);t+=n$11.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return e$2b(i)?(i._radii=o$1p.clone(n,i._radii),i._innerRadii=o$1p.clone(r,i._innerRadii),i._vertexFormat=n$11.clone(o,i._vertexFormat),i._minimumClock=a,i._maximumClock=s,i._minimumCone=l,i._maximumCone=u,i._stackPartitions=c,i._slicePartitions=h,i._offsetAttribute=-1===d?void 0:d,i):(O$x.minimumClock=a,O$x.maximumClock=s,O$x.minimumCone=l,O$x.maximumCone=u,O$x.stackPartitions=c,O$x.slicePartitions=h,O$x.offsetAttribute=-1===d?void 0:d,new b$P(O$x))},b$P.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._vertexFormat,l=e._slicePartitions+1,u=e._stackPartitions+1;(l=Math.round(l*Math.abs(r-n)/e$2a.TWO_PI))<2&&(l=2),(u=Math.round(u*Math.abs(a-o)/e$2a.PI))<2&&(u=2);var c,h,d=0,f=[o],p=[n];for(c=0;c<u;c++)f.push(o+c*(a-o)/(u-1));for(f.push(a),h=0;h<l;h++)p.push(n+h*(r-n)/(l-1));p.push(r);var _=f.length,m=p.length,g=0,x=1,v=i.x!==t.x||i.y!==t.y||i.z!==t.z,y=!1,$=!1,b=!1;v&&(x=2,o>0&&(y=!0,g+=l-1),a<Math.PI&&($=!0,g+=l-1),(r-n)%e$2a.TWO_PI?(b=!0,g+=2*(u-1)+1):g+=1);var T=m*_*x,C=new Float64Array(3*T),S=d$1s(new Array(T),!1),w=d$1s(new Array(T),!1),E=l*u*x,P=6*(E+g+1-(l+u)*x),A=ce$x.createTypedArray(E,P),L=s.normal?new Float32Array(3*T):void 0,M=s.tangent?new Float32Array(3*T):void 0,R=s.bitangent?new Float32Array(3*T):void 0,I=s.st?new Float32Array(2*T):void 0,O=new Array(_),D=new Array(_);for(c=0;c<_;c++)O[c]=Ci$4(f[c]),D[c]=_i$5(f[c]);var B=new Array(m),N=new Array(m);for(h=0;h<m;h++)N[h]=_i$5(p[h]),B[h]=Ci$4(p[h]);for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=t.x*O[c]*N[h],C[d++]=t.y*O[c]*B[h],C[d++]=t.z*D[c];var F,U,z,G,V=T/2;if(v)for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=i.x*O[c]*N[h],C[d++]=i.y*O[c]*B[h],C[d++]=i.z*D[c],S[V]=!0,c>0&&c!==_-1&&0!==h&&h!==m-1&&(w[V]=!0),V++;for(d=0,c=1;c<_-2;c++)for(F=c*m,U=(c+1)*m,h=1;h<m-2;h++)A[d++]=U+h,A[d++]=U+h+1,A[d++]=F+h+1,A[d++]=U+h,A[d++]=F+h+1,A[d++]=F+h;if(v){var k=_*m;for(c=1;c<_-2;c++)for(F=k+c*m,U=k+(c+1)*m,h=1;h<m-2;h++)A[d++]=U+h,A[d++]=F+h,A[d++]=F+h+1,A[d++]=U+h,A[d++]=F+h+1,A[d++]=U+h+1}if(v){if(y)for(G=_*m,c=1;c<m-2;c++)A[d++]=c,A[d++]=c+1,A[d++]=G+c+1,A[d++]=c,A[d++]=G+c+1,A[d++]=G+c;if($)for(z=_*m-m,G=_*m*x-m,c=1;c<m-2;c++)A[d++]=z+c+1,A[d++]=z+c,A[d++]=G+c,A[d++]=z+c+1,A[d++]=G+c,A[d++]=G+c+1}if(b){for(c=1;c<_-2;c++)G=m*_+m*c,z=m*c,A[d++]=G,A[d++]=z+m,A[d++]=z,A[d++]=G,A[d++]=G+m,A[d++]=z+m;for(c=1;c<_-2;c++)G=m*_+m*(c+1)-1,z=m*(c+1)-1,A[d++]=z+m,A[d++]=G,A[d++]=z,A[d++]=z+m,A[d++]=G+m,A[d++]=G}var W=new a$_;s.position&&(W.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:C}));var H,q=0,j=0,Y=0,X=0,K=T/2,Q=t$13.fromCartesian3(t),Z=t$13.fromCartesian3(i);if(s.st||s.normal||s.tangent||s.bitangent){for(c=0;c<T;c++){H=S[c]?Z:Q;var J=o$1p.fromArray(C,3*c,Ni$3),ee=H.geodeticSurfaceNormal(J,zi$3);if(s.st){var te=Math.atan2(ee.y,ee.x);te<0&&(te+=e$2a.TWO_PI),I[q++]=te/e$2a.TWO_PI,I[q++]=Math.asin(ee.z)/Math.PI+.5}if(s.normal&&(w[c]&&o$1p.negate(ee,ee),L[j++]=ee.x,L[j++]=ee.y,L[j++]=ee.z),s.tangent||s.bitangent){var ie,ne=Di$4,re=0;if(S[c]&&(re=K),ie=!y&&c>=re&&c<re+2*m?o$1p.UNIT_X:o$1p.UNIT_Z,o$1p.cross(ie,ee,ne),o$1p.normalize(ne,ne),s.tangent&&(M[Y++]=ne.x,M[Y++]=ne.y,M[Y++]=ne.z),s.bitangent){var oe=o$1p.cross(ee,ne,Si$3);o$1p.normalize(oe,oe),R[X++]=oe.x,R[X++]=oe.y,R[X++]=oe.z}}}s.st&&(W.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:I})),s.normal&&(W.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:L})),s.tangent&&(W.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:M})),s.bitangent&&(W.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:R}))}if(e$2b(e._offsetAttribute)){var ae=C.length,se=new Uint8Array(ae/3);d$1s(se,e._offsetAttribute===_0x58701d.NONE?0:1),W.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:se})}return new I$1p({attributes:W,indices:A,primitiveType:W$18.TRIANGLES,boundingSphere:i$1c.fromEllipsoid(Q),offsetAttribute:e._offsetAttribute})}}},b$P.getUnitEllipsoid=function(){return e$2b(ni$2)||(ni$2=b$P.createGeometry(new b$P({radii:new o$1p(1,1,1),vertexFormat:n$11.POSITION_ONLY}))),ni$2},Object.defineProperties(t$A.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}}}),t$A.prototype.requestTileGeometry=function(e,t,i,n){return o$1l.resolve(new T$J({buffer:new Uint8Array(256),width:16,height:16,skirtMode:this._isCreateSkirt}))},t$A.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},t$A.prototype.getTileDataAvailable=function(e,t,i){},t$A.prototype.loadTileDataAvailability=function(e,t,i){},n$x.prototype.add=function(e,t,i){if(!e$2b(e))throw new t$16("event is required");var n=e.addEventListener(t,i);this._removalFunctions.push(n);var r=this;return function(){n();var e=r._removalFunctions;e.splice(e.indexOf(n),1)}},n$x.prototype.removeAll=function(){for(var e=this._removalFunctions,t=0,i=e.length;t<i;++t)e[t]();e.length=0};var e$X={NONE:0,HOLD:1,EXTRAPOLATE:2},_0x346789=Object.freeze(e$X);function o$J(){}o$J.prototype.geocode=t$16.throwInstantiationError;var e$W={SEARCH:0,AUTOCOMPLETE:1},c$G=Object.freeze(e$W);function a$F(e,t){return a$K(e,t=u$_(t,0),Math.min(4,e.length))}function g$L(){this.PI=3.14159265358979,this.param_a=0,this.param_d=1e-12,this.p=206264.8062471,this.a=6378137,this.b=6356752.31414036,this.alpha=.003352810681182319,this.e2=.0066943800229,this.e21=.00673949677548,this.c=6399593.62586,this.K0=1.57048761144159e-7,this.K1=.00505250178820567,this.K2=298472900956587e-19,this.K3=2.41626669230084e-7,this.K4=2.22241238938534e-9,this.alpha=1/298.257222101,this.e4=Math.pow(this.e2,2),this.e6=Math.pow(this.e2,3),this.e8=Math.pow(this.e2,4),this.A=1+.5*this.e2+.375*this.e4+.3125*this.e6+630/2304*this.e8,this.B=1/6*this.e2+15/80*this.e4+.1875*this.e6+420/2304*this.e8,this.C=3/80*this.e4+7/112*this.e6+.078125*this.e8,this.D=1/112*this.e6+45/2304*this.e8,this.E=5/2304*this.e8}function x$L(){this.PI=3.14159265358979,this.param_a=0,this.param_d=1e-12,this.p=206264.8062471,this.a=6378140,this.b=6356755.288157528,this.alpha=.0033528131778969143,this.e2=.00669438499958795,this.e21=.00673950181947292,this.c=6399596.65198801,this.K0=1.57048687472752e-7,this.K1=.00505250559291393,this.K2=298473350966158e-19,this.K3=2.41627215981336e-7,this.K4=2.22241909461273e-9,this.e4=Math.pow(this.e2,2),this.e6=Math.pow(this.e2,3),this.e8=Math.pow(this.e2,4),this.A=1+.5*this.e2+.375*this.e4+.3125*this.e6+630/2304*this.e8,this.B=1/6*this.e2+15/80*this.e4+.1875*this.e6+420/2304*this.e8,this.C=3/80*this.e4+7/112*this.e6+.078125*this.e8,this.D=1/112*this.e6+45/2304*this.e8,this.E=5/2304*this.e8}function E$J(e,t,i,n,r,o){var a=0;a=t>1e6?t-5e5-1e6*r:t-5e5;var s=o.K0*e,l=Math.sin(s),u=s+Math.cos(s)*(o.K1*l-o.K2*Math.pow(l,3)+o.K3*Math.pow(l,5)-o.K4*Math.pow(l,7)),c=Math.tan(u),h=o.e21*Math.pow(Math.cos(u),2),d=Math.sqrt(1+h),f=a/(o.c/d),p=Math.pow(d,2)*c,_=Math.pow(c,2);i.B=u-p*Math.pow(f,2)/2+(5+3*_+h-9*h*_)*p*Math.pow(f,4)/24-(61+90*_+45*Math.pow(_,2))*p*Math.pow(f,6)/720;var m=1/Math.cos(u);i.L=m*f-(1+2*_+h)*m*Math.pow(f,3)/6+(5+28*_+24*Math.pow(_,2)+6*h+8*h*_)*m*Math.pow(f,5)/120+n}function G$M(e,t,i,n,r,o){var a=(t-e)/2,s=(t+e)/2,l=(n+i)/2,u=2*o.b*o.b*l,c=Math.cos(s),h=Math.sin(a),d=[];return d[0]=u*o.A*h*c,d[1]=u*o.B*Math.sin(3*a)*Math.cos(3*s),d[2]=u*o.C*Math.sin(5*a)*Math.cos(5*s),d[3]=u*o.D*Math.sin(7*a)*Math.cos(7*s),d[4]=u*o.E*Math.sin(9*a)*Math.cos(9*s),d[0]-d[1]+d[2]-d[3]+d[4]}function q$J(e,t,i,n){for(var r=0,o=0;o<e.length-1;o++)for(var a=e[o],s=e[o+1],l=a.x,u=a.y,c=s.x,h=s.y,d=s.x-a.x,f=s.y-a.y,p=Math.pow(Math.abs(d),2),_=Math.pow(Math.abs(f),2),m=Math.sqrt(p+_),g=Math.floor(m/70),x=1;x<=g+1;x++){var v=0,y=0;x<g+1?(v=a.x+d*x/(g+1),y=a.y+f*x/(g+1)):(v=c,y=h);var $={B:0,L:0},b={B:0,L:0};E$J(u,l,$,t,i,n),E$J(y,v,b,t,i,n),r+=G$M($.B,b.B,$.L,b.L,t,n),l=v,u=y}return Math.abs(r)}function I$Q(e,t,i,n){for(var r=0,o=0;o<e.length-1;o++){var a={B:0,L:0},s={B:0,L:0};E$J(e[o].y,e[o].x,a,t,i,n),E$J(e[o+1].y,e[o+1].x,s,t,i,n);var l=[],u=(s.B-a.B)/2,c=(s.B+a.B)/2,h=(s.L+a.L)/2,d=2*n.b*n.b*h,f=Math.cos(c),p=Math.sin(u);l[0]=d*n.A*f*p,l[1]=d*n.B*Math.sin(3*u)*Math.cos(3*c),l[2]=d*n.C*Math.sin(5*u)*Math.cos(5*c),l[3]=d*n.D*Math.sin(7*u)*Math.cos(7*c),l[4]=d*n.E*Math.sin(9*u)*Math.cos(9*c),r+=l[0]-l[1]+l[2]-l[3]+l[4]}return Math.abs(r)}function R$C(e,t,i,n,r){var o=0,a=e$2a.toRadians(i);if("China2000"===t)o=q$J(e,a,n,new g$L);else if("Xian1980"===t){o=I$Q(e,a,n,new x$L)}return o}var tmp={};(function(global,undefined$1){!function(e,t,i){global.protobuf=function i(n){var r=t[n];return r||e[n][0].call(r=t[n]={exports:{}},i,r,r.exports),r.exports}(7)}({1:[function(e,t,i){t.exports=function(e,t){for(var i=[],n=2;n<arguments.length;)i.push(arguments[n++]);var r=!0;return new Promise((function(n,o){i.push((function(e){if(r)if(r=!1,e)o(e);else{for(var t=[],i=1;i<arguments.length;)t.push(arguments[i++]);n.apply(null,t)}}));try{e.apply(t||this,i)}catch(e){r&&(r=!1,o(e))}}))}},{}],2:[function(e,t,i){var n=i;n.length=function(e){var t=e.length;if(!t)return 0;for(var i=0;--t%4>1&&"="===e.charAt(t);)++i;return Math.ceil(3*e.length)/4-i};for(var r=new Array(64),o=new Array(123),a=0;a<64;)o[r[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;n.encode=function(e,t,i){for(var n,o=[],a=0,s=0;t<i;){var l=e[t++];switch(s){case 0:o[a++]=r[l>>2],n=(3&l)<<4,s=1;break;case 1:o[a++]=r[n|l>>4],n=(15&l)<<2,s=2;break;case 2:o[a++]=r[n|l>>6],o[a++]=r[63&l],s=0}}return s&&(o[a++]=r[n],o[a]=61,1===s&&(o[a+1]=61)),String.fromCharCode.apply(String,o)};var s="invalid encoding";n.decode=function(e,t,i){for(var n,r=i,a=0,l=0;l<e.length;){var u=e.charCodeAt(l++);if(61===u&&a>1)break;if((u=o[u])===undefined$1)throw Error(s);switch(a){case 0:n=u,a=1;break;case 1:t[i++]=n<<2|(48&u)>>4,n=u,a=2;break;case 2:t[i++]=(15&n)<<4|(60&u)>>2,n=u,a=3;break;case 3:t[i++]=(3&n)<<6|u,a=0}}if(1===a)throw Error(s);return i-r},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{}],3:[function(e,t,i){function n(){this._listeners={}}t.exports=n,n.prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this},n.prototype.off=function(e,t){if(e===undefined$1)this._listeners={};else if(t===undefined$1)this._listeners[e]=[];else for(var i=this._listeners[e],n=0;n<i.length;)i[n].fn===t?i.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var i=[],n=1;n<arguments.length;)i.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,i)}return this}},{}],4:[function(require,module,exports){function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],5:[function(e,t,i){t.exports=function(e,t,i){var n=i||8192,r=n>>>1,o=null,a=n;return function(i){if(i<1||i>r)return e(i);a+i>n&&(o=e(n),a=0);var s=t.call(o,a,a+=i);return 7&a&&(a=1+(7|a)),s}}},{}],6:[function(e,t,i){var n=i;n.length=function(e){for(var t=0,i=0,n=0;n<e.length;++n)(i=e.charCodeAt(n))<128?t+=1:i<2048?t+=2:55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,i){if(i-t<1)return"";for(var n,r=null,o=[],a=0;t<i;)(n=e[t++])<128?o[a++]=n:n>191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,o)),a=0);return r?(a&&r.push(String.fromCharCode.apply(String,o.slice(0,a))),r.join("")):String.fromCharCode.apply(String,o.slice(0,a))},n.write=function(e,t,i){for(var n,r,o=i,a=0;a<e.length;++a)(n=e.charCodeAt(a))<128?t[i++]=n:n<2048?(t[i++]=n>>6|192,t[i++]=63&n|128):55296==(64512&n)&&56320==(64512&(r=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&r),++a,t[i++]=n>>18|240,t[i++]=n>>12&63|128,t[i++]=n>>6&63|128,t[i++]=63&n|128):(t[i++]=n>>12|224,t[i++]=n>>6&63|128,t[i++]=63&n|128);return i-o}},{}],7:[function(e,t,i){var n=i;function r(){n.Reader._configure(n.BufferReader),n.util._configure()}n.build="minimal",n.roots={},n.Writer=e(14),n.BufferWriter=e(15),n.Reader=e(8),n.BufferReader=e(9),n.util=e(13),n.rpc=e(10),n.configure=r,n.Writer._configure(n.BufferWriter),r()},{10:10,13:13,14:14,15:15,8:8,9:9}],8:[function(e,t,i){t.exports=l;var n,r=e(13),o=r.LongBits,a=r.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var u=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")};function c(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw s(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}l.create=r.Buffer?function(e){return(l.create=function(e){return r.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u,l.prototype._slice=r.Array.prototype.subarray||r.Array.prototype.slice,l.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return h(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|h(this.buf,this.pos+=4)};var f=typeof Float32Array<"u"?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(i,n){return t[0]=i[n],t[1]=i[n+1],t[2]=i[n+2],t[3]=i[n+3],e[0]}:function(i,n){return t[0]=i[n+3],t[1]=i[n+2],t[2]=i[n+1],t[3]=i[n],e[0]}}():function(e,t){var i=h(e,t+4),n=2*(i>>31)+1,r=i>>>23&255,o=8388607&i;return 255===r?o?NaN:n*(1/0):0===r?1401298464324817e-60*n*o:n*Math.pow(2,r-150)*(o+8388608)};l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=f(this.buf,this.pos);return this.pos+=4,e};var p=typeof Float64Array<"u"?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(i,n){return t[0]=i[n],t[1]=i[n+1],t[2]=i[n+2],t[3]=i[n+3],t[4]=i[n+4],t[5]=i[n+5],t[6]=i[n+6],t[7]=i[n+7],e[0]}:function(i,n){return t[0]=i[n+7],t[1]=i[n+6],t[2]=i[n+5],t[3]=i[n+4],t[4]=i[n+3],t[5]=i[n+2],t[6]=i[n+1],t[7]=i[n],e[0]}}():function(e,t){var i=h(e,t+4),n=h(e,t+8),r=2*(n>>31)+1,o=n>>>20&2047,a=4294967296*(1048575&n)+i;return 2047===o?a?NaN:r*(1/0):0===o?5e-324*r*a:r*Math.pow(2,o-1075)*(a+4503599627370496)};l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=p(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,i=this.pos+e;if(i>this.len)throw s(this,e);return this.pos+=e,t===i?new this.buf.constructor(0):this._slice.call(this.buf,t,i)},l.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4==(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){n=e;var t=r.Long?"toLong":"toNumber";r.merge(l.prototype,{int64:function(){return c.call(this)[t](!1)},uint64:function(){return c.call(this)[t](!0)},sint64:function(){return c.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},{13:13}],9:[function(e,t,i){t.exports=o;var n=e(8);(o.prototype=Object.create(n.prototype)).constructor=o;var r=e(13);function o(e){n.call(this,e)}r.Buffer&&(o.prototype._slice=r.Buffer.prototype.slice),o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{13:13,8:8}],10:[function(e,t,i){i.Service=e(11)},{11:11}],11:[function(e,t,i){t.exports=r;var n=e(13);function r(e,t,i){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(i)}(r.prototype=Object.create(n.EventEmitter.prototype)).constructor=r,r.prototype.rpcCall=function e(t,i,r,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,i,r,o);if(!s.rpcImpl)return setTimeout((function(){a(Error("already ended"))}),0),undefined$1;try{return s.rpcImpl(t,i[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,i){if(e)return s.emit("error",e,t),a(e);if(null===i)return s.end(!0),undefined$1;if(!(i instanceof r))try{i=r[s.responseDelimited?"decodeDelimited":"decode"](i)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",i,t),a(null,i)}))}catch(e){return s.emit("error",e,t),setTimeout((function(){a(e)}),0),undefined$1}},r.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{13:13}],12:[function(e,t,i){t.exports=r;var n=e(13);function r(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=r.zero=new r(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var i=e>>>0,n=(e-i)/4294967296>>>0;return t&&(n=~n>>>0,i=~i>>>0,++i>4294967295&&(i=0,++n>4294967295&&(n=0))),new r(i,n)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if(n.isString(e)){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):o},r.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,i=~this.hi>>>0;return t||(i=i+1>>>0),-(t+4294967296*i)}return this.lo+4294967296*this.hi},r.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;r.fromHash=function(e){return e===a?o:new r((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},r.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},r.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:i<128?9:10}},{13:13}],13:[function(e,t,i){var n=i;function r(e,t,i){for(var n=Object.keys(t),r=0;r<n.length;++r)(e[n[r]]===undefined$1||!i)&&(e[n[r]]=t[n[r]]);return e}function o(e){function t(e,i){if(!(this instanceof t))return new t(e,i);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),i&&r(this,i)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=e(1),n.base64=e(2),n.EventEmitter=e(3),n.inquire=e(4),n.utf8=e(6),n.pool=e(5),n.LongBits=e(12),n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)},n.Array=typeof Uint8Array<"u"?Uint8Array:Array,n.Long=global.dcodeIO&&global.dcodeIO.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var i=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(i.lo,i.hi,t):i.toNumber(Boolean(t))},n.merge=r,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},i=0;i<e.length;++i)t[e[i]]=1;return function(){for(var e=Object.keys(this),i=e.length-1;i>-1;--i)if(1===t[e[i]]&&this[e[i]]!==undefined$1&&null!==this[e[i]])return e[i]}},n.oneOfSetter=function(e){return function(t){for(var i=0;i<e.length;++i)e[i]!==t&&delete this[e[i]]}},n.lazyResolve=function(e,t){for(var i=0;i<t.length;++i)for(var n=Object.keys(t[i]),r=0;r<n.length;++r){for(var o=t[i][n[r]].split("."),a=e;o.length;)a=a[o.shift()];t[i][n[r]]=a}},n.toJSONOptions={longs:String,enums:String,bytes:String},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,i){return new e(t,i)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},{1:1,12:12,2:2,3:3,4:4,5:5,6:6}],14:[function(e,t,i){t.exports=h;var n,r=e(13),o=r.LongBits,a=r.base64,s=r.utf8;function l(e,t,i){this.fn=e,this.len=t,this.next=undefined$1,this.val=i}function u(){}function c(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function h(){this.len=0,this.head=new l(u,0,0),this.tail=this.head,this.states=null}function d(e,t,i){t[i]=255&e}function f(e,t){this.len=e,this.next=undefined$1,this.val=t}function p(e,t,i){for(;e.hi;)t[i++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[i++]=127&e.lo|128,e.lo=e.lo>>>7;t[i++]=e.lo}function _(e,t,i){t[i++]=255&e,t[i++]=e>>>8&255,t[i++]=e>>>16&255,t[i]=e>>>24}h.create=r.Buffer?function(){return(h.create=function(){return new n})()}:function(){return new h},h.alloc=function(e){return new r.Array(e)},r.Array!==Array&&(h.alloc=r.pool(h.alloc,r.Array.prototype.subarray)),h.prototype.push=function(e,t,i){return this.tail=this.tail.next=new l(e,t,i),this.len+=t,this},f.prototype=Object.create(l.prototype),f.prototype.fn=function(e,t,i){for(;e>127;)t[i++]=127&e|128,e>>>=7;t[i]=e},h.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},h.prototype.int32=function(e){return e<0?this.push(p,10,o.fromNumber(e)):this.uint32(e)},h.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},h.prototype.uint64=function(e){var t=o.from(e);return this.push(p,t.length(),t)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this.push(p,t.length(),t)},h.prototype.bool=function(e){return this.push(d,1,e?1:0)},h.prototype.fixed32=function(e){return this.push(_,4,e>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(e){var t=o.from(e);return this.push(_,4,t.lo).push(_,4,t.hi)},h.prototype.sfixed64=h.prototype.fixed64;var m=typeof Float32Array<"u"?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(i,n,r){e[0]=i,n[r++]=t[0],n[r++]=t[1],n[r++]=t[2],n[r]=t[3]}:function(i,n,r){e[0]=i,n[r++]=t[3],n[r++]=t[2],n[r++]=t[1],n[r]=t[0]}}():function(e,t,i){var n=e<0?1:0;if(n&&(e=-e),0===e)_(1/e>0?0:2147483648,t,i);else if(isNaN(e))_(2147483647,t,i);else if(e>34028234663852886e22)_((n<<31|2139095040)>>>0,t,i);else if(e<11754943508222875e-54)_((n<<31|Math.round(e/1401298464324817e-60))>>>0,t,i);else{var r=Math.floor(Math.log(e)/Math.LN2);_((n<<31|r+127<<23|8388607&Math.round(e*Math.pow(2,-r)*8388608))>>>0,t,i)}};h.prototype.float=function(e){return this.push(m,4,e)};var g=typeof Float64Array<"u"?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(i,n,r){e[0]=i,n[r++]=t[0],n[r++]=t[1],n[r++]=t[2],n[r++]=t[3],n[r++]=t[4],n[r++]=t[5],n[r++]=t[6],n[r]=t[7]}:function(i,n,r){e[0]=i,n[r++]=t[7],n[r++]=t[6],n[r++]=t[5],n[r++]=t[4],n[r++]=t[3],n[r++]=t[2],n[r++]=t[1],n[r]=t[0]}}():function(e,t,i){var n=e<0?1:0;if(n&&(e=-e),0===e)_(0,t,i),_(1/e>0?0:2147483648,t,i+4);else if(isNaN(e))_(4294967295,t,i),_(2147483647,t,i+4);else if(e>17976931348623157e292)_(0,t,i),_((n<<31|2146435072)>>>0,t,i+4);else{var r;if(e<22250738585072014e-324)_((r=e/5e-324)>>>0,t,i),_((n<<31|r/4294967296)>>>0,t,i+4);else{var o=Math.floor(Math.log(e)/Math.LN2);1024===o&&(o=1023),_(4503599627370496*(r=e*Math.pow(2,-o))>>>0,t,i),_((n<<31|o+1023<<20|1048576*r&1048575)>>>0,t,i+4)}}};h.prototype.double=function(e){return this.push(g,8,e)};var x=r.Array.prototype.set?function(e,t,i){t.set(e,i)}:function(e,t,i){for(var n=0;n<e.length;++n)t[i+n]=e[n]};h.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this.push(d,1,0);if(r.isString(e)){var i=h.alloc(t=a.length(e));a.decode(e,i,0),e=i}return this.uint32(t).push(x,t,e)},h.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t).push(s.write,t,e):this.push(d,1,0)},h.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(u,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},h.prototype.ldelim=function(){var e=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=e.next,this.tail=t,this.len+=i),this},h.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),i=0;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t},h._configure=function(e){n=e}},{13:13}],15:[function(e,t,i){t.exports=a;var n=e(14);(a.prototype=Object.create(n.prototype)).constructor=a;var r=e(13),o=r.Buffer;function a(){n.call(this)}a.alloc=function(e){return(a.alloc=r._Buffer_allocUnsafe)(e)};var s=o&&o.prototype instanceof Uint8Array&&"set"===o.prototype.set.name?function(e,t,i){t.set(e,i)}:function(e,t,i){if(e.copy)e.copy(t,i,0,e.length);else for(var n=0;n<e.length;)t[i++]=e[n++]};function l(e,t,i){e.length<40?r.utf8.write(e,t,i):t.utf8Write(e,i)}a.prototype.bytes=function(e){r.isString(e)&&(e=r._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(s,t,e),this},a.prototype.string=function(e){var t=o.byteLength(e);return this.uint32(t),t&&this.push(l,t,e),this}},{13:13,14:14}]},{})})(tmp);var R$B=tmp.protobuf,d$Y=[1,2,4,8],a$E=15,m$I=16,p$K=64,y$G=128;function e$V(e,t,i,n,r,o){this._bits=e,this.cnodeVersion=t,this.imageryVersion=i,this.terrainVersion=n,this.imageryProvider=r,this.terrainProvider=o,this.ancestorHasTerrain=!1,this.terrainState=void 0}function U$H(e){for(var t=e.length,i=new ArrayBuffer(t),n=new Uint8Array(i),r=0;r<t;++r)n[r]=e.charCodeAt(r);return i}e$V.clone=function(e,t){return e$2b(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new e$V(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t},e$V.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},e$V.prototype.hasSubtree=function(){return i$P(this._bits,m$I)},e$V.prototype.hasImagery=function(){return i$P(this._bits,p$K)},e$V.prototype.hasTerrain=function(){return i$P(this._bits,y$G)},e$V.prototype.hasChildren=function(){return i$P(this._bits,a$E)},e$V.prototype.hasChild=function(e){return i$P(this._bits,d$Y[e])},e$V.prototype.getChildBitmask=function(){return this._bits&a$E};var X$A=U$H('Eô½\vyâjE"’,ÍqøIFgQ\0B%Æèa,f)\bÆ4Üjb%y\nwmiÖðœk“¡½NuàA[ß@V\fÙ»r›|3SîOlÔq°{ÀEVZ­wUe\v3’*¬l5Å0sø3>mF8J´Ýð.ÝuڌDt"úa"\f3"So¯9D\vŒ9Ù9L¹¿«\\ŒP_Ÿ"uxéq‘h;Áěð<VqH‚\'UfYNe˜u£aF}a?A\0Ÿ×´4M·F°Õ¸Š\'{‹Ü+»Mg0ÈÑö\\Pú[/F›n5/\'C.ë\n\f^¥se4ål.jC\'c#U©?q{gC}:¯ÍâTUœýKÆâŸ/(íË\\Æ-fˆ§;/*"N°k.Ý\r•}}GºC²²+>Mª>}æÎI‰Ææx\fa1-¤O¥~q ˆì\r1èN\v\0nPh}=\b\r•¦n£h—$[kó#ó¶s³\r\v@ÀŸØQ]ú".jßI\0¹ wUÆïj¿{GLƒîÜÜF…©­S+S4ÿ”Yä8è1ƒN¹XFkË-#†’p\x005ˆ"Ï1²&/çÃu-6,rt°#G·ÓÑ&…7râ\0ŒDÏÚ3-Þ`†i#i*|ÍKQ\r•T9w.)ê¦P¢joP™\\>TûïP[\vE‰m(w7ێJfJo™ åpâ¹q~\fmI-zþrÇòY0»]såÉ êxì ðŠB|G`°½&·q¶ÇŸÑ3‚=Ó«îc™È+S D\\qÆÌD2O<ÊÀ)=RÓaX©}e´ÜÏ\rô=ñ\b©BÚ#\tØ¿^PIøMÀËGLO÷{+ØÅ1’;µoÜl\r’ˆўÛ?âéÚ_ԄâFaZÞUϤ\0¾ýÎgñJi—æ HØ]~®q N®ÀV©‘<‚rçvì)IÖ]-ƒãÛ6©;f—‡jÕ¶=P^R¹KÇsWxÉô.Y•“oÐKW>\'\'Ç`Û;íšSD>?’mw¢\në?R¨ÆU^1I7…ôÅ&-©¿‹\'TÚÃj å*x°Öprª‹h½ˆ÷_H±~ÀXL?fù>áeÀp§Ï8i¯ðVldIœ\'­xtO‡ÞV9\0Úw\vË-‰û5Oõ\bQ`Á\nZGM&30xÚÀœFGâ[y`In7gS\n>éìF9²ñ4\rƄSuná\fYÙÞ)…{II¥wy¾IV.6ç\v:»Ob{ÒM1•/½8{¨O!áìFpv•})"xˆ\nÝ\\ÚÞQÏðüYRe|3ßóHÚ»*uÛ`²Ôüíì5¨ÿ(1-È܈F|Š["');function c$F(e){o$1q.defined("resourceOrUrl",e);var t=e;"string"!=typeof t&&!(t instanceof t$11)&&(o$1q.typeOf.string("resourceOrUrl.url",e.url),t=e.url);var i=t$11.createIfNeeded(t);i.appendForwardSlash(),this._resource=i,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=e$2a.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};var n=this;this._readyPromise=z$G(this).then((function(){return n.getQuadTreePacket("",n._quadPacketVersion)})).then((function(){return!0})).otherwise((function(e){var t="An error occurred while accessing "+B$E(n,"",1).url+".";return o$1l.reject(new t$14(t))}))}Object.defineProperties(c$F.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}}),c$F.tileXYToQuadKey=function(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n},c$F.quadKeyToTileXY=function(e){for(var t=0,i=0,n=e.length-1,r=n;r>=0;--r){var o=1<<r,a=+e[n-r];i$P(a,2)?i$P(a,1)||(t|=o):(i|=o,i$P(a,1)&&(t|=o))}return{x:t,y:i,level:n}},c$F.prototype.isValid=function(e){var t=this.getTileInformationFromQuadKey(e);if(e$2b(t))return null!==t;for(var i,n=!0,r=e;r.length>1;){if(i=r.substring(r.length-1),r=r.substring(0,r.length-1),e$2b(t=this.getTileInformationFromQuadKey(r))){!t.hasSubtree()&&!t.hasChild(parseInt(i))&&(n=!1);break}if(null===t){n=!1;break}}return n};var k$B=new i$V("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY),w$E,I$P;function P$D(e,t,i){var n=e._tileInfo,r=t,o=n[r];if(e$2b(o)&&(!o.hasSubtree()||o.hasChildren()))return o;for(;void 0===o&&r.length>1;)o=n[r=r.substring(0,r.length-1)];var a,s=e._subtreePromises,l=s[r];return e$2b(l)?l.then((function(){return a=new r$1b({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),P$D(e,t,a)})):e$2b(o)&&o.hasSubtree()?e$2b(l=e.getQuadTreePacket(r,o.cnodeVersion,i))?(s[r]=l,l.then((function(){return a=new r$1b({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),P$D(e,t,a)})).always((function(){delete s[r]}))):void 0:o$1l.reject(new t$14("Couldn't load metadata for tile "+t))}function B$E(e,t,i,n){return e._resource.getDerivedResource({url:"flatfile?q2-0"+t+"-q."+i.toString(),request:n})}function z$G(e){var t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!e$2b(I$P)){var i=n$15("ThirdParty/google-earth-dbroot-parser.js"),n=window.cesiumGoogleEarthDbRootParser;I$P=a$11(i).then((function(){w$E=window.cesiumGoogleEarthDbRootParser(R$B),e$2b(n)?window.cesiumGoogleEarthDbRootParser=n:delete window.cesiumGoogleEarthDbRootParser}))}return I$P.then((function(){return t.fetchArrayBuffer()})).then((function(t){var i=w$E.EncryptedDbRootProto.decode(new Uint8Array(t)),n=i.encryptionData,r=n.byteOffset,o=r+n.byteLength,a=e.key=n.buffer.slice(r,o);o=(r=(n=i.dbrootData).byteOffset)+n.byteLength;var s=n.buffer.slice(r,o);return k$B.scheduleTask({buffer:s,type:"DbRoot",key:a},[s])})).then((function(t){var i=w$E.DbRootProto.decode(new Uint8Array(t.buffer));if(e.imageryPresent=u$_(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=u$_(i.terrainPresent,e.terrainPresent),e$2b(i.endSnippet)&&e$2b(i.endSnippet.model)){var n=i.endSnippet.model;e.negativeAltitudeExponentBias=u$_(n.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=u$_(n.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)}e$2b(i.databaseVersion)&&(e._quadPacketVersion=u$_(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));for(var r=e.providers,o=u$_(i.providerInfo,[]),a=o.length,s=0;s<a;++s){var l=o[s],u=l.copyrightString;e$2b(u)&&(r[l.providerId]=new r$T(u.value))}})).otherwise((function(){console.log("Failed to retrieve "+t.url+". Using defaults."),e.key=X$A}))}function T$G(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.typeOf.object("options.buffer",e.buffer),o$1q.typeOf.number("options.negativeAltitudeExponentBias",e.negativeAltitudeExponentBias),o$1q.typeOf.number("options.negativeElevationThreshold",e.negativeElevationThreshold),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;var t=u$_(e.childTileMask,15),i=3&t;i|=4&t?8:0,i|=8&t?4:0,this._childTileMask=i,this._createdByUpsampling=u$_(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}c$F.prototype.getQuadTreePacket=function(e,t,i){t=u$_(t,1);var n=B$E(this,e=u$_(e,""),t,i).fetchArrayBuffer();if(e$2b(n)){var r=this._tileInfo,o=this.key;return n.then((function(t){return k$B.scheduleTask({buffer:t,quadKey:e,type:"Metadata",key:o},[t]).then((function(t){var i,n=-1;if(""!==e){n=e.length+1;var o=t[e];(i=r[e])._bits|=o._bits,delete t[e]}var a=Object.keys(t);a.sort((function(e,t){return e.length-t.length}));for(var s=a.length,l=0;l<s;++l){var u=a[l];if(null!==t[u]){var c=e$V.clone(t[u]),h=u.length;if(h===n)c.setParent(i);else if(h>1){var d=r[u.substring(0,u.length-1)];c.setParent(d)}r[u]=c}else r[u]=null}}))}))}},c$F.prototype.populateSubtree=function(e,t,i,n){return P$D(this,c$F.tileXYToQuadKey(e,t,i),n)},c$F.prototype.getTileInformation=function(e,t,i){var n=c$F.tileXYToQuadKey(e,t,i);return this._tileInfo[n]},c$F.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]},Object.defineProperties(T$G.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var te$q=new i$V("createVerticesFromGoogleEarthEnterpriseBuffer"),F$J=new h$18,z$F=new h$18;T$G.prototype.createMesh=function(e,t,i,n,r){o$1q.typeOf.object("tilingScheme",e),o$1q.typeOf.number("x",t),o$1q.typeOf.number("y",i),o$1q.typeOf.number("level",n);var o=e.ellipsoid;e.tileXYToNativeRectangle(t,i,n,F$J),e.tileXYToRectangle(t,i,n,z$F),r=u$_(r,1);var a=o.cartographicToCartesian(h$18.center(z$F)),s=40075.16/(1<<n);this._skirtHeight=Math.min(8*s,1e3);var l=te$q.scheduleTask({buffer:this._buffer,nativeRectangle:F$J,rectangle:z$F,relativeToCenter:a,ellipsoid:o,skirtHeight:this._skirtHeight,exaggeration:r,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(e$2b(l)){var u=this;return l.then((function(e){return u._mesh=new T$K(a,new Float32Array(e.vertices),new Uint16Array(e.indices),e.indexCountWithoutSkirts,e.vertexCountWithoutSkirts,e.minimumHeight,e.maximumHeight,i$1c.clone(e.boundingSphere3D),o$1p.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,y$Z.clone(e.orientedBoundingBox),h$L.clone(e.encoding),r,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast),u._minimumHeight=e.minimumHeight,u._maximumHeight=e.maximumHeight,u._buffer=void 0,u._mesh}))}},T$G.prototype.interpolateHeight=function(e,t,i){var n=e$2a.clamp((t-e.west)/e.width,0,1),r=e$2a.clamp((i-e.south)/e.height,0,1);return e$2b(this._mesh)?oe$l(this,n,r):de$j(this,n,r,e)};var ie$q=new i$V("upsampleQuantizedTerrainMesh");T$G.prototype.upsample=function(e,t,i,n,r,o,a){if(o$1q.typeOf.object("tilingScheme",e),o$1q.typeOf.number("thisX",t),o$1q.typeOf.number("thisY",i),o$1q.typeOf.number("thisLevel",n),o$1q.typeOf.number("descendantX",r),o$1q.typeOf.number("descendantY",o),o$1q.typeOf.number("descendantLevel",a),a-n>1)throw new t$16("Upsampling through more than one level at a time is not currently supported.");var s=this._mesh;if(e$2b(this._mesh)){var l=2*t!==r,u=2*i===o,c=e.ellipsoid,h=e.tileXYToRectangle(r,o,a),d=ie$q.scheduleTask({vertices:s.vertices,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:l,isNorthChild:u,childRectangle:h,ellipsoid:c,exaggeration:s.exaggeration});if(e$2b(d)){var f=this;return d.then((function(e){var t=new Uint16Array(e.vertices),i=ce$x.createTypedArray(t.length/3,e.indices),n=f._skirtHeight;return new p$O({quantizedVertices:t,indices:i,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:i$1c.clone(e.boundingSphere),orientedBoundingBox:y$Z.clone(e.orientedBoundingBox),horizonOcclusionPoint:o$1p.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:n,southSkirtHeight:n,eastSkirtHeight:n,northSkirtHeight:n,childTileMask:0,createdByUpsampling:!0,credits:f._credits})}))}}},T$G.prototype.isChildAvailable=function(e,t,i,n){o$1q.typeOf.number("thisX",e),o$1q.typeOf.number("thisY",t),o$1q.typeOf.number("childX",i),o$1q.typeOf.number("childY",n);var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},T$G.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var re$u=new o$1o,ne$v=new o$1o,ae$n=new o$1o,Y$u=new o$1p;function oe$l(e,t,i){for(var n=e._mesh,r=n.vertices,o=n.encoding,a=n.indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=o.decodeTextureCoordinates(r,u,re$u),f=o.decodeTextureCoordinates(r,c,ne$v),p=o.decodeTextureCoordinates(r,h,ae$n),_=d$10.computeBarycentricCoordinates(t,i,d.x,d.y,f.x,f.y,p.x,p.y,Y$u);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){var m=o.decodeHeight(r,u),g=o.decodeHeight(r,c),x=o.decodeHeight(r,h);return _.x*m+_.y*g+_.z*x}}}var se$l=Uint16Array.BYTES_PER_ELEMENT,L$P=Uint32Array.BYTES_PER_ELEMENT,P$C=Int32Array.BYTES_PER_ELEMENT,he$h=Float32Array.BYTES_PER_ELEMENT,U$G=Float64Array.BYTES_PER_ELEMENT;function de$j(e,t,i,n){var r=e._buffer,o=0,a=0,s=0;i>.5?(t>.5?(o=2,a=.5):o=3,s=.5):t>.5&&(o=1,a=.5);for(var l=new DataView(r),u=0,c=0;c<o;++c)u+=l.getUint32(u,!0),u+=L$P;u+=L$P,u+=2*U$G;var h=e$2a.toRadians(180*l.getFloat64(u,!0));u+=U$G;var d=e$2a.toRadians(180*l.getFloat64(u,!0));u+=U$G;var f=n.width/h/2,p=n.height/d/2,_=l.getInt32(u,!0);u+=P$C;var m=3*l.getInt32(u,!0);u+=P$C,u+=P$C;var g,x=new Array(_),v=new Array(_),y=new Array(_);for(g=0;g<_;++g)x[g]=a+l.getUint8(u++)*f,v[g]=s+l.getUint8(u++)*p,y[g]=6371010*l.getFloat32(u,!0),u+=he$h;var $=new Array(m);for(g=0;g<m;++g)$[g]=l.getUint16(u,!0),u+=se$l;for(g=0;g<m;g+=3){var b=$[g],T=$[g+1],C=$[g+2],S=x[b],w=x[T],E=x[C],P=v[b],A=v[T],L=v[C],M=d$10.computeBarycentricCoordinates(t,i,S,P,w,A,E,L,Y$u);if(M.x>=-1e-15&&M.y>=-1e-15&&M.z>=-1e-15)return M.x*y[b]+M.y*y[T]+M.z*y[C]}}var d$X={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},S$E=new a$15;function I$O(){this._terrainCache={},this._lastTidy=a$15.now()}function _$B(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url)&&!e$2b(e.metadata))throw new t$16("options.url or options.metadata is required.");var t;if(e$2b(e.metadata))t=e.metadata;else{var i=t$11.createIfNeeded(e.url);t=new c$F(i)}this._metadata=t,this._tilingScheme=new g$13({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new h$18(-e$2a.PI,-e$2a.PI,e$2a.PI,e$2a.PI),ellipsoid:e.ellipsoid});var n=e.credit;"string"==typeof n&&(n=new r$T(n)),this._credit=n,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new I$O,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new o$1h,this._ready=!1;var r,o=this;this._readyPromise=t.readyPromise.then((function(e){if(!t.terrainPresent){var i=new t$14("The server "+t.url+" doesn't have terrain");return r=l$W.handleError(r,o,o._errorEvent,i.message,void 0,void 0,void 0,i),o$1l.reject(i)}return l$W.handleSuccess(r),o._ready=e,e})).otherwise((function(e){return r=l$W.handleError(r,o,o._errorEvent,e.message,void 0,void 0,void 0,e),o$1l.reject(e)}))}I$O.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:a$15.now()}},I$O.prototype.get=function(e){var t=this._terrainCache[e];if(e$2b(t))return delete this._terrainCache[e],t.buffer},I$O.prototype.tidy=function(){if(a$15.now(S$E),a$15.secondsDifference(S$E,this._lastTidy)>10){for(var e=this._terrainCache,t=Object.keys(e),i=t.length,n=0;n<i;++n){var r=t[n],o=e[r];a$15.secondsDifference(S$E,o.timestamp)>10&&delete e[r]}a$15.clone(S$E,this._lastTidy)}},Object.defineProperties(_$B.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var z$E=new i$V("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY);function G$L(e,t,i){var n=t.getChildBitmask();if(t.terrainState===d$X.PARENT){n=0;for(var r=0;r<4;++r){var o=i.getTileInformationFromQuadKey(e+r.toString());e$2b(o)&&o.hasTerrain()&&(n|=1<<r)}}return n}function $$E(e,t,i,n){return i=e$2b(i)&&i>0?i:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1c-0"+t+"-t."+i.toString(),request:n})}_$B.prototype.requestTileGeometry=function(e,t,i,n){if(!this._ready)throw new t$16("requestTileGeometry must not be called before the terrain provider is ready.");var r=c$F.tileXYToQuadKey(e,t,i),o=this._terrainCache,a=this._metadata,s=a.getTileInformationFromQuadKey(r);if(!e$2b(s))return o$1l.reject(new t$14("Terrain tile doesn't exist"));var l=s.terrainState;e$2b(l)||(l=s.terrainState=d$X.UNKNOWN);var u=o.get(r);if(e$2b(u)){var c=a.providers[s.terrainProvider];return o$1l.resolve(new T$G({buffer:u,childTileMask:G$L(r,s,a),credits:e$2b(c)?[c]:void 0,negativeAltitudeExponentBias:a.negativeAltitudeExponentBias,negativeElevationThreshold:a.negativeAltitudeThreshold}))}if(o.tidy(),!s.ancestorHasTerrain)return o$1l.resolve(new T$J({buffer:new Uint8Array(256),width:16,height:16}));if(l===d$X.NONE)return o$1l.reject(new t$14("Terrain tile doesn't exist"));var h,d=r,f=-1;switch(l){case d$X.SELF:f=s.terrainVersion;break;case d$X.PARENT:d=d.substring(0,d.length-1),f=(h=a.getTileInformationFromQuadKey(d)).terrainVersion;break;case d$X.UNKNOWN:s.hasTerrain()?f=s.terrainVersion:(d=d.substring(0,d.length-1),e$2b(h=a.getTileInformationFromQuadKey(d))&&h.hasTerrain()&&(f=h.terrainVersion))}if(f<0)return o$1l.reject(new t$14("Terrain tile doesn't exist"));var p,_,m=this._terrainPromises,g=this._terrainRequests;if(e$2b(m[d]))p=m[d],_=g[d];else{var x=$$E(this,d,f,_=n).fetchArrayBuffer();if(!e$2b(x))return;p=x.then((function(e){return e$2b(e)?z$E.scheduleTask({buffer:e,type:"Terrain",key:a.key},[e]).then((function(e){var t=a.getTileInformationFromQuadKey(d);t.terrainState=d$X.SELF,o.add(d,e[0]);for(var i=t.terrainProvider,n=e.length-1,r=0;r<n;++r){var s=d+r.toString(),l=a.getTileInformationFromQuadKey(s);e$2b(l)&&(o.add(s,e[r+1]),l.terrainState=d$X.PARENT,0===l.terrainProvider&&(l.terrainProvider=i))}})):o$1l.reject(new t$14("Failed to load terrain."))})),m[d]=p,g[d]=_,p=p.always((function(){delete m[d],delete g[d]}))}return p.then((function(){var e=o.get(r);if(e$2b(e)){var t=a.providers[s.terrainProvider];return new T$G({buffer:e,childTileMask:G$L(r,s,a),credits:e$2b(t)?[t]:void 0,negativeAltitudeExponentBias:a.negativeAltitudeExponentBias,negativeElevationThreshold:a.negativeAltitudeThreshold})}return o$1l.reject(new t$14("Failed to load terrain."))})).otherwise((function(e){return _.state===W$1c.CANCELLED?(n.state=_.state,o$1l.reject(e)):(s.terrainState=d$X.NONE,o$1l.reject(e))}))},_$B.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},_$B.prototype.getTileDataAvailable=function(e,t,i){var n=this._metadata,r=c$F.tileXYToQuadKey(e,t,i),o=n.getTileInformation(e,t,i);if(null===o)return!1;if(e$2b(o)){if(!o.ancestorHasTerrain)return!0;var a=o.terrainState;if(a===d$X.NONE)return!1;if(!(e$2b(a)&&a!==d$X.UNKNOWN||(o.terrainState=d$X.UNKNOWN,o.hasTerrain()))){r=r.substring(0,r.length-1);var s=n.getTileInformationFromQuadKey(r);if(!e$2b(s)||!s.hasTerrain())return!1}return!0}if(n.isValid(r)){var l=new r$1b({throttle:!0,throttleByServer:!0,type:V$15.TERRAIN});n.populateSubtree(e,t,i,l)}return!1},_$B.prototype.loadTileDataAvailability=function(e,t,i){};var K$D=e$2a.factorial;function k$A(e,t,i,n,r,o){var a,s,l,u=0;if(n>0){for(s=0;s<r;s++){for(a=!1,l=0;l<o.length&&!a;l++)s===o[l]&&(a=!0);a||(o.push(s),u+=k$A(e,t,i,n-1,r,o),o.splice(o.length-1,1))}return u}for(u=1,s=0;s<r;s++){for(a=!1,l=0;l<o.length&&!a;l++)s===o[l]&&(a=!0);a||(u*=e-i[t[s]])}return u}var E$I={type:"Hermite",getRequiredDataPoints:function(e,t){if(t=u$_(t,0),!e$2b(e))throw new t$16("degree is required.");if(e<0)throw new t$16("degree must be 0 or greater.");if(t<0)throw new t$16("inputOrder must be 0 or greater.");return Math.max(Math.floor((e+1)/(t+1)),2)},interpolateOrderZero:function(e,t,i,n,r){e$2b(r)||(r=new Array(n));var o,a,s,l,u,c=t.length,h=new Array(n);for(o=0;o<n;o++){r[o]=0;var d=new Array(c);for(h[o]=d,a=0;a<c;a++)d[a]=[]}var f=c,p=new Array(f);for(o=0;o<f;o++)p[o]=o;var _=c-1;for(l=0;l<n;l++){for(a=0;a<f;a++)u=p[a]*n+l,h[l][0].push(i[u]);for(o=1;o<f;o++){var m=!1;for(a=0;a<f-o;a++){var g,x=t[p[a]],v=t[p[a+o]];v-x<=0?(g=i[u=p[a]*n+n*o+l],h[l][o].push(g/K$D(o))):(g=h[l][o-1][a+1]-h[l][o-1][a],h[l][o].push(g/(v-x))),m=m||0!==g}m||(_=o-1)}}for(s=0,0;s<=0;s++)for(o=s;o<=_;o++){var y=k$A(e,p,t,s,o,[]);for(l=0;l<n;l++){var $=h[l][o][0];r[l+s*n]+=$*y}}return r}},Q$E=[];function U$F(e,t,i,n,r,o){for(var a,s,l=-1,u=t.length,c=u*(u+1)/2,h=0;h<r;h++){var d=Math.floor(h*c);for(a=0;a<u;a++)s=t[a]*r*(o+1)+h,e[d+a]=n[s];for(var f=1;f<u;f++){var p=0,_=Math.floor(f*(1-f)/2)+u*f,m=!1;for(a=0;a<u-f;a++){var g,x,v=i[t[a]],y=i[t[a+f]];if(y-v<=0)x=(g=n[s=t[a]*r*(o+1)+r*f+h])/e$2a.factorial(f),e[d+_+p]=x,p++;else{var $=Math.floor((f-1)*(2-f)/2)+u*(f-1);x=(g=e[d+$+a+1]-e[d+$+a])/(y-v),e[d+_+p]=x,p++}m=m||0!==g}m&&(l=Math.max(l,f))}}return l}function o$I(e,t,i,n){this.rightAscension=e,this.declination=t,this.rotation=i,this.rotationRate=n}E$I.interpolate=function(e,t,i,n,r,o,a){var s=n*(o+1);e$2b(a)||(a=new Array(s));for(var l=0;l<s;l++)a[l]=0;var u,c=t.length,h=new Array(c*(r+1));for(u=0;u<c;u++)for(var d=0;d<r+1;d++)h[u*(r+1)+d]=u;for(var f=h.length,p=Q$E,_=U$F(p,h,t,i,n,r),m=[],g=f*(f+1)/2,x=Math.min(_,o),v=0;v<=x;v++)for(u=v;u<=_;u++){m.length=0;for(var y=k$A(e,h,t,v,u,m),$=Math.floor(u*(1-u)/2)+f*u,b=0;b<n;b++){var T=p[Math.floor(b*g)+$];a[b+v*n]+=T*y}}return a};var y$F={},_0=32.184,h0$1=2451545,L$O=-.0529921,b$O=-.1059842,j$E=13.0120009,k$z=13.3407154,q$I=.9856003,z$D=26.4057084,B$D=13.064993,F$I=.3287146,H$I=1.7484877,K$C=-.1589763,Q$D=.0036096,V$v=.1643573,W$I=12.9590088,s$D=new a$15;function h$I(e){(!e$2b(e)||"function"!=typeof e)&&(e=y$F.ComputeMoon),this._computeFunction=e}y$F.ComputeMoon=function(e,t){e$2b(e)||(e=a$15.now()),s$D=a$15.addSeconds(e,_0,s$D);var i=a$15.totalDays(s$D)-h0$1,n=i/h$17.DAYS_PER_JULIAN_CENTURY,r=(125.045+L$O*i)*e$2a.RADIANS_PER_DEGREE,o=(250.089+b$O*i)*e$2a.RADIANS_PER_DEGREE,a=(260.008+j$E*i)*e$2a.RADIANS_PER_DEGREE,s=(176.625+k$z*i)*e$2a.RADIANS_PER_DEGREE,l=(357.529+q$I*i)*e$2a.RADIANS_PER_DEGREE,u=(311.589+z$D*i)*e$2a.RADIANS_PER_DEGREE,c=(134.963+B$D*i)*e$2a.RADIANS_PER_DEGREE,h=(276.617+F$I*i)*e$2a.RADIANS_PER_DEGREE,d=(34.226+H$I*i)*e$2a.RADIANS_PER_DEGREE,f=(15.134+K$C*i)*e$2a.RADIANS_PER_DEGREE,p=(119.743+Q$D*i)*e$2a.RADIANS_PER_DEGREE,_=(239.961+V$v*i)*e$2a.RADIANS_PER_DEGREE,m=(25.053+W$I*i)*e$2a.RADIANS_PER_DEGREE,g=Math.sin(r),x=Math.sin(o),v=Math.sin(a),y=Math.sin(s),$=Math.sin(l),b=Math.sin(u),T=Math.sin(c),C=Math.sin(h),S=Math.sin(d),w=Math.sin(f),E=Math.sin(p),P=Math.sin(_),A=Math.sin(m),L=Math.cos(r),M=Math.cos(o),R=Math.cos(a),I=Math.cos(s),O=Math.cos(l),D=Math.cos(u),B=Math.cos(c),N=Math.cos(h),F=Math.cos(d),U=Math.cos(f),z=Math.cos(p),G=Math.cos(_),V=Math.cos(m),k=(269.9949+.0031*n-3.8787*g-.1204*x+.07*v-.0172*y+.0072*b-.0052*w+.0043*A)*e$2a.RADIANS_PER_DEGREE,W=(66.5392+.013*n+1.5419*L+.0239*M-.0278*R+.0068*I-.0029*D+9e-4*B+8e-4*U-9e-4*V)*e$2a.RADIANS_PER_DEGREE,H=(38.3213+13.17635815*i-14e-13*i*i+3.561*g+.1208*x-.0642*v+.0158*y+.0252*$-.0066*b-.0047*T-.0046*C+.0028*S+.0052*w+.004*E+.0019*P-.0044*A)*e$2a.RADIANS_PER_DEGREE,q=(13.17635815-2*i*14e-13+3.561*L*L$O+.1208*M*b$O-.0642*R*j$E+.0158*I*k$z+.0252*O*q$I-.0066*D*z$D-.0047*B*B$D-.0046*N*F$I+.0028*F*H$I+.0052*U*K$C+.004*z*Q$D+.0019*G*V$v-.0044*V*W$I)/86400*e$2a.RADIANS_PER_DEGREE;return e$2b(t)||(t=new o$I),t.rightAscension=k,t.declination=W,t.rotation=H,t.rotationRate=q,t};var y$E=new o$1p,A$N=new o$1p,w$D=new o$1p;function z$C(e,t,i){var n=y$E;n.x=Math.cos(e+e$2a.PI_OVER_TWO),n.y=Math.sin(e+e$2a.PI_OVER_TWO),n.z=0;var r=Math.cos(t),o=w$D;o.x=r*Math.cos(e),o.y=r*Math.sin(e),o.z=Math.sin(t);var a=o$1p.cross(o,n,A$N);return e$2b(i)||(i=new p$1e),i[0]=n.x,i[1]=a.x,i[2]=o.x,i[3]=n.y,i[4]=a.y,i[5]=o.y,i[6]=n.z,i[7]=a.z,i[8]=o.z,i}var u$G=new p$1e,_$A=new n$13;h$I.prototype.evaluate=function(e,t){e$2b(e)||(e=a$15.now());var i=this._computeFunction(e),n=z$C(i.rightAscension,i.declination,t),r=e$2a.zeroToTwoPi(i.rotation),o=n$13.fromAxisAngle(o$1p.UNIT_Z,r,_$A),a=p$1e.fromQuaternion(n$13.conjugate(o,o),u$G);return p$1e.multiply(a,n,n)};var r$L={};function i$J(e){o$1q.defined("url",e),this._url=t$11.createIfNeeded(e),this._url.appendForwardSlash()}function s$C(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.typeOf.object("options.scene",e.scene);var t=u$_(e.accessToken,e$Y.defaultAccessToken),i=t$11.createIfNeeded(u$_(e.server,e$Y.defaultServer));i.appendForwardSlash();var n=e$Y.getDefaultTokenCredit(t);e$2b(n)&&e.scene.frameState.creditDisplay.addDefaultCredit(r$T.clone(n));var r=i.getDerivedResource({url:"v1/geocode"});e$2b(t)&&r.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=i,this._pelias=new i$J(r)}function d$W(e){e=u$_(e,u$_.EMPTY_OBJECT),this.start=e$2b(e.start)?a$15.clone(e.start):new a$15,this.stop=e$2b(e.stop)?a$15.clone(e.stop):new a$15,this.data=e.data,this.isStartIncluded=u$_(e.isStartIncluded,!0),this.isStopIncluded=u$_(e.isStopIncluded,!0)}r$L.type=void 0,r$L.getRequiredDataPoints=t$16.throwInstantiationError,r$L.interpolateOrderZero=t$16.throwInstantiationError,r$L.interpolate=t$16.throwInstantiationError,Object.defineProperties(i$J.prototype,{url:{get:function(){return this._url}}}),i$J.prototype.geocode=function(e,t){return o$1q.typeOf.string("query",e),this._url.getDerivedResource({url:t===c$G.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then((function(e){return e.features.map((function(e){var t,i=e.bbox;if(e$2b(i))t=h$18.fromDegrees(i[0],i[1],i[2],i[3]);else{var n=e.geometry.coordinates[0],r=e.geometry.coordinates[1];t=o$1p.fromDegrees(n,r)}return{displayName:e.properties.label,destination:t}}))}))},s$C.prototype.geocode=function(e,t){return this._pelias.geocode(e,t)},Object.defineProperties(d$W.prototype,{isEmpty:{get:function(){var e=a$15.compare(this.stop,this.start);return e<0||0===e&&(!this.isStartIncluded||!this.isStopIncluded)}}});var I$N={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};d$W.fromIso8601=function(e,t){o$1q.typeOf.object("options",e),o$1q.typeOf.string("options.iso8601",e.iso8601);var i=e.iso8601.split("/");if(2!==i.length)throw new t$16("options.iso8601 is an invalid ISO 8601 interval.");var n=a$15.fromIso8601(i[0]),r=a$15.fromIso8601(i[1]),o=u$_(e.isStartIncluded,!0),a=u$_(e.isStopIncluded,!0),s=e.data;return e$2b(t)?(t.start=n,t.stop=r,t.isStartIncluded=o,t.isStopIncluded=a,t.data=s,t):(I$N.start=n,I$N.stop=r,I$N.isStartIncluded=o,I$N.isStopIncluded=a,I$N.data=s,new d$W(I$N))},d$W.toIso8601=function(e,t){return o$1q.typeOf.object("timeInterval",e),a$15.toIso8601(e.start,t)+"/"+a$15.toIso8601(e.stop,t)},d$W.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new d$W(e)},d$W.equals=function(e,t,i){return e===t||e$2b(e)&&e$2b(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&a$15.equals(e.start,t.start)&&a$15.equals(e.stop,t.stop)&&(e.data===t.data||e$2b(i)&&i(e.data,t.data)))},d$W.equalsEpsilon=function(e,t,i,n){return o$1q.typeOf.number("epsilon",i),e===t||e$2b(e)&&e$2b(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&a$15.equalsEpsilon(e.start,t.start,i)&&a$15.equalsEpsilon(e.stop,t.stop,i)&&(e.data===t.data||e$2b(n)&&n(e.data,t.data)))},d$W.intersect=function(e,t,i,n){if(o$1q.typeOf.object("left",e),o$1q.typeOf.object("result",i),!e$2b(t))return d$W.clone(d$W.EMPTY,i);var r=e.start,o=e.stop,a=t.start,s=t.stop,l=a$15.greaterThanOrEquals(a,r)&&a$15.greaterThanOrEquals(o,a),u=!l&&a$15.lessThanOrEquals(a,r)&&a$15.lessThanOrEquals(r,s);if(!l&&!u)return d$W.clone(d$W.EMPTY,i);var c=e.isStartIncluded,h=e.isStopIncluded,d=t.isStartIncluded,f=t.isStopIncluded,p=a$15.lessThan(o,s);return i.start=l?a:r,i.isStartIncluded=c&&d||!a$15.equals(a,r)&&(l&&d||u&&c),i.stop=p?o:s,i.isStopIncluded=p?h:h&&f||!a$15.equals(s,o)&&f,i.data=e$2b(n)?n(e.data,t.data):e.data,i},d$W.contains=function(e,t){if(o$1q.typeOf.object("timeInterval",e),o$1q.typeOf.object("julianDate",t),e.isEmpty)return!1;var i=a$15.compare(e.start,t);if(0===i)return e.isStartIncluded;var n=a$15.compare(t,e.stop);return 0===n?e.isStopIncluded:i<0&&n<0},d$W.prototype.clone=function(e){return d$W.clone(this,e)},d$W.prototype.equals=function(e,t){return d$W.equals(this,e,t)},d$W.prototype.equalsEpsilon=function(e,t,i){return d$W.equalsEpsilon(this,e,t,i)},d$W.prototype.toString=function(){return d$W.toIso8601(this)},d$W.EMPTY=Object.freeze(new d$W({start:new a$15,stop:new a$15,isStartIncluded:!1,isStopIncluded:!1}));var M$I=Object.freeze(a$15.fromIso8601("0000-01-01T00:00:00Z")),r$K=Object.freeze(a$15.fromIso8601("9999-12-31T24:00:00Z")),t$z=Object.freeze(new d$W({start:M$I,stop:r$K})),o$H={MINIMUM_VALUE:M$I,MAXIMUM_VALUE:r$K,MAXIMUM_INTERVAL:t$z},e$U={SHIFT:0,CTRL:1,ALT:2},Aa$1=Object.freeze(e$U),i$I={type:"Lagrange",getRequiredDataPoints:function(e){return Math.max(e+1,2)},interpolateOrderZero:function(e,t,i,n,r){e$2b(r)||(r=new Array(n));var o,a,s=t.length;for(o=0;o<n;o++)r[o]=0;for(o=0;o<s;o++){var l=1;for(a=0;a<s;a++)if(a!==o){var u=t[o]-t[a];l*=(e-t[a])/u}for(a=0;a<n;a++)r[a]+=l*i[o*n+a]}return r}},v$A={type:"Linear"};function l$O(e,t,i){return p$_({url:e,responseType:"blob",headers:t,request:i})}v$A.getRequiredDataPoints=function(e){return 2},v$A.interpolateOrderZero=function(e,t,i,n,r){if(2!==t.length)throw new t$16("The xTable provided to the linear interpolator must have exactly two elements.");if(n<=0)throw new t$16("There must be at least 1 dependent variable for each independent variable.");e$2b(r)||(r=new Array(n));var o,a,s,l=t[0],u=t[1];if(l===u)throw new t$16("Divide by zero error: xTable[0] and xTable[1] are equal");for(o=0;o<n;o++)a=i[o],s=i[o+n],r[o]=((s-a)*e+u*a-l*s)/(u-l);return r};var p$J=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch{return!1}}();function c$E(e,t){if(!p$J||e$23(e))return t$T(e,void 0,t);var i=l$O(e,void 0,t);return e$2b(i)?i.then((function(e){var t=window.URL.createObjectURL(e);return t$T(t,!1).then((function(i){return i.blob=e,window.URL.revokeObjectURL(t),i}),(function(e){return window.URL.revokeObjectURL(t),o$1l.reject(e)}))})):void 0}function d$V(e,t,i){if(!e$2b(e))throw new t$16("url is required.");var n;t=u$_(t,u$_.EMPTY_OBJECT);do{n="loadJsonp"+Math.random().toString().substring(2,8)}while(e$2b(window[n]));var r=new h$16(e),o=m$1a(u$_(r.query,""));e$2b(t.parameters)&&(o=p$19(t.parameters,o)),o[u$_(t.callbackParameterName,"callback")]=n,r.query=m$1b(o),e=r.toString();var a=t.proxy;return e$2b(a)&&(e=a.getURL(e)),(i=e$2b(i)?i:new r$1b).url=e,i.requestFunction=function(){var t=o$1l.defer();return window[n]=function(e){t.resolve(e);try{delete window[n]}catch{window[n]=void 0}},d$V.loadAndExecuteScript(e,n,t),t.promise},r$1a.request(i)}d$V.loadAndExecuteScript=function(e,t,i){var n=document.createElement("script");n.async=!0,n.src=e;var r=document.getElementsByTagName("head")[0];n.onload=function(){n.onload=void 0,r.removeChild(n)},n.onerror=function(e){i.reject(e)},r.appendChild(n)},d$V.defaultLoadAndExecuteScript=d$V.loadAndExecuteScript;var e$T={defaultAccessToken:void 0},n$w=!1,o$G,a$D="<b>This application is using SuperMap3D's default Mapbox access token. Please create a new access token for the application as soon as possible and prior to deployment , and provide your token to SuperMap3D by setting the SuperMap3D.MapboxApi.defaultAccessToken property before constructing the Widget or any other object that uses the Mapbox API.</b>";function r$J(){t$16.throwInstantiationError()}e$T.getAccessToken=function(e){return e$2b(e)?e:e$2b(e$T.defaultAccessToken)?e$T.defaultAccessToken:(n$w||(console.log(a$D),n$w=!0),"pk.eyJ1IjoiYW5hbHl0aWNhbGdyYXBoaWNzIiwiYSI6ImNpd204Zm4wejAwNzYyeW5uNjYyZmFwdWEifQ.7i-VIZZWX8pd1bTfxIVj9g")},e$T.getErrorCredit=function(e){if(!e$2b(e)&&!e$2b(e$T.defaultAccessToken))return e$2b(o$G)||(o$G=new r$T(a$D,!0)),o$G},Object.defineProperties(r$J.prototype,{ellipsoid:{get:t$16.throwInstantiationError}}),r$J.prototype.project=t$16.throwInstantiationError,r$J.prototype.unproject=t$16.throwInstantiationError;var l$N=[],c$D=[];function M$H(e,t,i,n,r,o){var a,s,l=r-n+1,u=o-r,c=l$N,h=c$D;for(a=0;a<l;++a)c[a]=e[n+a];for(s=0;s<u;++s)h[s]=e[r+s+1];a=0,s=0;for(var d=n;d<=o;++d){var f=c[a],p=h[s];a<l&&(s>=u||t(f,p,i)<=0)?(e[d]=f,++a):s<u&&(e[d]=p,++s)}}function u$F(e,t,i,n,r){if(!(n>=r)){var o=Math.floor(.5*(n+r));u$F(e,t,i,n,o),u$F(e,t,i,o+1,r),M$H(e,t,i,n,o,r)}}function m$H(e,t,i){if(!e$2b(e))throw new t$16("array is required.");if(!e$2b(t))throw new t$16("comparator is required.");var n=e.length,r=Math.ceil(.5*n);l$N.length=r,c$D.length=r,u$F(e,t,i,0,n-1),l$N.length=0,c$D.length=0}function d$U(e,t){if(!e$2b(e))throw new t$16("occluderBoundingSphere is required.");if(!e$2b(t))throw new t$16("camera position is required.");this._occluderPosition=o$1p.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var m$G=new o$1p;Object.defineProperties(d$U.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){if(!e$2b(e))throw new t$16("cameraPosition is required.");e=o$1p.clone(e,this._cameraPosition);var t,i,n,r=o$1p.subtract(this._occluderPosition,e,m$G),o=o$1p.magnitudeSquared(r),a=this._occluderRadius*this._occluderRadius;if(o>a){t=Math.sqrt(o-a),o=1/Math.sqrt(o),i=o$1p.multiplyByScalar(r,o,m$G);var s=t*t*o;n=o$1p.add(e,o$1p.multiplyByScalar(i,s,m$G),m$G)}else t=Number.MAX_VALUE;this._horizonDistance=t,this._horizonPlaneNormal=i,this._horizonPlanePosition=n,this._cameraPosition=e}}}),d$U.fromBoundingSphere=function(e,t,i){if(!e$2b(e))throw new t$16("occluderBoundingSphere is required.");if(!e$2b(t))throw new t$16("camera position is required.");return e$2b(i)?(o$1p.clone(e.center,i._occluderPosition),i._occluderRadius=e.radius,i.cameraPosition=t,i):new d$U(e,t)};var L$N=new o$1p;d$U.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){var t=o$1p.subtract(e,this._occluderPosition,L$N),i=this._occluderRadius;if((i=o$1p.magnitudeSquared(t)-i*i)>0)return i=Math.sqrt(i)+this._horizonDistance,t=o$1p.subtract(e,this._cameraPosition,t),i*i>o$1p.magnitudeSquared(t)}return!1};var X$z=new o$1p;d$U.prototype.isBoundingSphereVisible=function(e){var t=o$1p.clone(e.center,X$z),i=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){var n=o$1p.subtract(t,this._occluderPosition,L$N),r=this._occluderRadius-i;if(r=o$1p.magnitudeSquared(n)-r*r,i<this._occluderRadius)return r>0&&(r=Math.sqrt(r)+this._horizonDistance,n=o$1p.subtract(t,this._cameraPosition,n),r*r+i*i>o$1p.magnitudeSquared(n));if(r>0){n=o$1p.subtract(t,this._cameraPosition,n);var o=o$1p.magnitudeSquared(n),a=this._occluderRadius*this._occluderRadius,s=i*i;return(this._horizonDistance*this._horizonDistance+a)*s>o*a||(r=Math.sqrt(r)+this._horizonDistance)*r+s>o}return!0}return!1};var j$D=new o$1p;d$U.prototype.computeVisibility=function(e){if(!e$2b(e))throw new t$16("occludeeBS is required.");var t=o$1p.clone(e.center),i=e.radius;if(i>this._occluderRadius)return fe$n.FULL;if(this._horizonDistance!==Number.MAX_VALUE){var n=o$1p.subtract(t,this._occluderPosition,j$D),r=this._occluderRadius-i,o=o$1p.magnitudeSquared(n);if((r=o-r*r)>0){r=Math.sqrt(r)+this._horizonDistance,n=o$1p.subtract(t,this._cameraPosition,n);var a=o$1p.magnitudeSquared(n);return r*r+i*i<a?fe$n.NONE:(r=o-(r=this._occluderRadius+i)*r)>0?a<(r=Math.sqrt(r)+this._horizonDistance)*r+i*i?fe$n.FULL:fe$n.PARTIAL:(n=o$1p.subtract(t,this._horizonPlanePosition,n),o$1p.dot(n,this._horizonPlaneNormal)>-i?fe$n.PARTIAL:fe$n.FULL)}}return fe$n.NONE};var b$N=new o$1p;d$U.computeOccludeePoint=function(e,t,i){if(!e$2b(e))throw new t$16("occluderBoundingSphere is required.");if(!e$2b(i))throw new t$16("positions is required.");if(0===i.length)throw new t$16("positions must contain at least one element");var n=o$1p.clone(t),r=o$1p.clone(e.center),o=e.radius,a=i.length;if(o$1p.equals(r,t))throw new t$16("occludeePosition must be different than occluderBoundingSphere.center");var s=o$1p.normalize(o$1p.subtract(n,r,b$N),b$N),l=-o$1p.dot(s,r),u=d$U._anyRotationVector(r,s,l),c=d$U._horizonToPlaneNormalDotProduct(e,s,l,u,i[0]);if(c){for(var h,d=1;d<a;++d){if(!(h=d$U._horizonToPlaneNormalDotProduct(e,s,l,u,i[d])))return;h<c&&(c=h)}if(!(c<.0017453283658983088)){var f=o/c;return o$1p.add(r,o$1p.multiplyByScalar(s,f,b$N),b$N)}}};var B$C=[];d$U.computeOccludeePointFromRectangle=function(e,t){if(!e$2b(e))throw new t$16("rectangle is required.");t=u$_(t,t$13.WGS84);var i=h$18.subsample(e,t,0,B$C),n=i$1c.fromPoints(i),r=o$1p.ZERO;if(!o$1p.equals(r,n.center))return d$U.computeOccludeePoint(new i$1c(r,t.minimumRadius),n.center,i)};var Z$C=new o$1p;d$U._anyRotationVector=function(e,t,i){var n=o$1p.abs(t,Z$C),r=n.x>n.y?0:1;(0===r&&n.z>n.x||1===r&&n.z>n.y)&&(r=2);var o,a=new o$1p;0===r?(n.x=e.x,n.y=e.y+1,n.z=e.z+1,o=o$1p.UNIT_X):1===r?(n.x=e.x+1,n.y=e.y,n.z=e.z+1,o=o$1p.UNIT_Y):(n.x=e.x+1,n.y=e.y+1,n.z=e.z,o=o$1p.UNIT_Z);var s=(o$1p.dot(t,n)+i)/-o$1p.dot(t,o);return o$1p.normalize(o$1p.subtract(o$1p.add(n,o$1p.multiplyByScalar(o,s,a),n),e,n),n)};var G$K=new o$1p;d$U._rotationVector=function(e,t,i,n,r){var o=o$1p.subtract(n,e,G$K);if(o=o$1p.normalize(o,o),o$1p.dot(t,o)<.9999999847691291){var a=o$1p.cross(t,o,o);if(o$1p.magnitude(a)>e$2a.EPSILON13)return o$1p.normalize(a,new o$1p)}return r};var S$D=new o$1p,W$H=new o$1p,q$H=new o$1p,T$F=new o$1p;function s$B(e,t,i){o$1q.defined("url",e),o$1q.defined("apiKey",t),e$2b(i)&&o$1q.typeOf.object("params",i),(e=t$11.createIfNeeded(e)).appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=u$_(i,{})}d$U._horizonToPlaneNormalDotProduct=function(e,t,i,n,r){var o=o$1p.clone(r,S$D),a=o$1p.clone(e.center,W$H),s=e.radius,l=o$1p.subtract(a,o,q$H),u=o$1p.magnitudeSquared(l),c=s*s;if(u<c)return!1;var h=u-c,d=Math.sqrt(h),f=d*(1/Math.sqrt(u))*d;l=o$1p.normalize(l,l);var p=o$1p.add(o,o$1p.multiplyByScalar(l,f,T$F),T$F),_=Math.sqrt(h-f*f),m=this._rotationVector(a,t,i,o,n),g=o$1p.fromElements(m.x*m.x*l.x+(m.x*m.y-m.z)*l.y+(m.x*m.z+m.y)*l.z,(m.x*m.y+m.z)*l.x+m.y*m.y*l.y+(m.y*m.z-m.x)*l.z,(m.x*m.z-m.y)*l.x+(m.y*m.z+m.x)*l.y+m.z*m.z*l.z,S$D);g=o$1p.normalize(g,g);var x=o$1p.multiplyByScalar(g,_,S$D);m=o$1p.normalize(o$1p.subtract(o$1p.add(p,x,q$H),a,q$H),q$H);var v=o$1p.dot(t,m);m=o$1p.normalize(o$1p.subtract(o$1p.subtract(p,x,m),a,m),m);var y=o$1p.dot(t,m);return v<y?v:y},Object.defineProperties(s$B.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}}),s$B.prototype.geocode=function(e){return o$1q.typeOf.string("query",e),this._url.getDerivedResource({url:"json",queryParameters:p$19(this._params,{q:e})}).fetchJson().then((function(e){return e.results.map((function(e){var t,i=e.bounds;if(e$2b(i))t=h$18.fromDegrees(i.southwest.lng,i.southwest.lat,i.northeast.lng,i.northeast.lat);else{var n=e.geometry.lat,r=e.geometry.lng;t=o$1p.fromDegrees(n,r)}return{displayName:e.formatted,destination:t}}))}))};var t$y={packedLength:void 0,pack:t$16.throwInstantiationError,unpack:t$16.throwInstantiationError},o$F={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:t$16.throwInstantiationError,unpackInterpolationResult:t$16.throwInstantiationError},e$S={BASECOLOR_UV_OFFSET_AND_TILING:0,EMISSIVE_UV_OFFSET_AND_TILING:1},ie$p=Object.freeze(e$S);function s$A(){this._cache={}}s$A.prototype.fromColor=function(e,t){if(!e$2b(e))throw new t$16("color is required");if(!e$2b(t))throw new t$16("size is required");return h$H(void 0,void 0,e,t,this._cache)},s$A.prototype.fromUrl=function(e,t,i){if(!e$2b(e))throw new t$16("url is required");if(!e$2b(t))throw new t$16("color is required");if(!e$2b(i))throw new t$16("size is required");return h$H(e,void 0,t,i,this._cache)},s$A.prototype.fromMakiIconId=function(e,t,i){if(!e$2b(e))throw new t$16("id is required");if(!e$2b(t))throw new t$16("color is required");if(!e$2b(i))throw new t$16("size is required");return h$H(n$15("Assets/Textures/maki/"+encodeURIComponent(e)+".png"),void 0,t,i,this._cache)},s$A.prototype.fromText=function(e,t,i){if(!e$2b(e))throw new t$16("text is required");if(!e$2b(t))throw new t$16("color is required");if(!e$2b(i))throw new t$16("size is required");return h$H(void 0,e,t,i,this._cache)};var q$G=new e$1U;function b$M(e,t,i){e.save(),e.scale(i/24,i/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,q$G).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function C$F(e,t,i){var n=i/2.5,r=n,o=n;t.width>t.height?o=n*(t.height/t.width):t.width<t.height&&(r=n*(t.width/t.height));var a=Math.round((i-r)/2),s=Math.round(7/24*i-o/2);e.globalCompositeOperation="destination-out",e.drawImage(t,a-1,s,r,o),e.drawImage(t,a,s-1,r,o),e.drawImage(t,a+1,s,r,o),e.drawImage(t,a,s+1,r,o),e.globalCompositeOperation="destination-over",e.fillStyle=e$1U.BLACK.toCssColorString(),e.fillRect(a-1,s-1,r+2,o+2),e.globalCompositeOperation="destination-out",e.drawImage(t,a,s,r,o),e.globalCompositeOperation="destination-over",e.fillStyle=e$1U.WHITE.toCssColorString(),e.fillRect(a-1,s-2,r+2,o+2)}var l$M=new Array(4);function h$H(e,t,i,n,r){l$M[0]=e,l$M[1]=t,l$M[2]=i,l$M[3]=n;var o=JSON.stringify(l$M),a=r[o];if(e$2b(a))return a;var s=document.createElement("canvas");s.width=n,s.height=n;var l=s.getContext("2d");if(b$M(l,i,n),e$2b(e)){var u=t$11.createIfNeeded(e).fetchImage().then((function(e){return C$F(l,e,n),r[o]=s,s}));return r[o]=u,u}if(e$2b(t)){var c=x$X(t,{font:"bold "+n+"px sans-serif"});C$F(l,c,n)}return r[o]=s,s}function f$K(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.vertexFormat,n$11.DEFAULT);this._vertexFormat=t,this._workerName="createPlaneGeometry"}f$K.packedLength=n$11.packedLength,f$K.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),n$11.pack(e._vertexFormat,t,i),t};var T$E=new n$11,G$J={vertexFormat:T$E};f$K.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=n$11.unpack(e,t,T$E);return e$2b(i)?(i._vertexFormat=n$11.clone(n,i._vertexFormat),i):new f$K(G$J)};var w$C=new o$1p(-.5,-.5,0),A$M=new o$1p(.5,.5,0);function i$H(){this._workerName="createPlaneOutlineGeometry"}f$K.createGeometry=function(e){var t,i,n=e._vertexFormat,r=new a$_;if(n.position){if((i=new Float64Array(12))[0]=w$C.x,i[1]=w$C.y,i[2]=0,i[3]=A$M.x,i[4]=w$C.y,i[5]=0,i[6]=A$M.x,i[7]=A$M.y,i[8]=0,i[9]=w$C.x,i[10]=A$M.y,i[11]=0,r.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:i}),n.normal){var o=new Float32Array(12);o[0]=0,o[1]=0,o[2]=1,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=1,o[9]=0,o[10]=0,o[11]=1,r.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:o})}if(n.st){var a=new Float32Array(8);a[0]=0,a[1]=0,a[2]=1,a[3]=0,a[4]=1,a[5]=1,a[6]=0,a[7]=1,r.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:a})}if(n.tangent){var s=new Float32Array(12);s[0]=1,s[1]=0,s[2]=0,s[3]=1,s[4]=0,s[5]=0,s[6]=1,s[7]=0,s[8]=0,s[9]=1,s[10]=0,s[11]=0,r.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:s})}if(n.bitangent){var l=new Float32Array(12);l[0]=0,l[1]=1,l[2]=0,l[3]=0,l[4]=1,l[5]=0,l[6]=0,l[7]=1,l[8]=0,l[9]=0,l[10]=1,l[11]=0,r.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:l})}(t=new Uint16Array(6))[0]=0,t[1]=1,t[2]=2,t[3]=0,t[4]=2,t[5]=3}return new I$1p({attributes:r,indices:t,primitiveType:W$18.TRIANGLES,boundingSphere:new i$1c(o$1p.ZERO,Math.sqrt(2))})},i$H.packedLength=0,i$H.pack=function(e,t){return o$1q.defined("value",e),o$1q.defined("array",t),t},i$H.unpack=function(e,t,i){return o$1q.defined("array",e),e$2b(i)?i:new i$H};var r$I=new o$1p(-.5,-.5,0),o$E=new o$1p(.5,.5,0);i$H.createGeometry=function(){var e=new a$_,t=new Uint16Array(8),i=new Float64Array(12);return i[0]=r$I.x,i[1]=r$I.y,i[2]=r$I.z,i[3]=o$E.x,i[4]=r$I.y,i[5]=r$I.z,i[6]=o$E.x,i[7]=o$E.y,i[8]=r$I.z,i[9]=r$I.x,i[10]=o$E.y,i[11]=r$I.z,e.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:i}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new I$1p({attributes:e,indices:t,primitiveType:W$18.LINES,boundingSphere:new i$1c(o$1p.ZERO,Math.sqrt(2))})};var r$H=new o$1p;function c$C(e,t,i,n){return S$Z(e,t,i,n,r$H),r$H.x>0&&r$H.y>0&&r$H.z>0}var fe$h=[];function xe$e(e,t,i,n,r){var o=fe$h;o.length=r;var a,s=i.red,l=i.green,u=i.blue,c=i.alpha,h=n.red,d=n.green,f=n.blue,p=n.alpha;if(e$1U.equals(i,n)){for(a=0;a<r;a++)o[a]=e$1U.clone(i);return o}var _=(h-s)/r,m=(d-l)/r,g=(f-u)/r,x=(p-c)/r;for(a=0;a<r;a++)o[a]=new e$1U(s+a*_,l+a*m,u+a*g,c+a*x);return o}function R$A(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,i=e.colors,n=u$_(e.width,1),r=u$_(e.hMax,-1),o=u$_(e.colorsPerVertex,!1);if(!e$2b(t)||t.length<2)throw new t$16("At least two positions are required.");if("number"!=typeof n)throw new t$16("width must be a number");if(e$2b(i)&&(o&&i.length<t.length||!o&&i.length<t.length-1))throw new t$16("colors has an invalid length.");this._positions=t,this._colors=i,this._width=n,this._hMax=r,this._colorsPerVertex=o,this._dist=e.dist,this._period=e.period,this._vertexFormat=n$11.clone(u$_(e.vertexFormat,n$11.DEFAULT)),this._followSurface=u$_(e.followSurface,!0),e$2b(e.followSurface)&&(t$12("PolylineGeometry.followSurface","PolylineGeometry.followSurface is deprecated and will be removed in SuperMap3D. Use PolylineGeometry.arcType instead."),e.arcType=e.followSurface?m$1f.GEODESIC:m$1f.NONE),this._arcType=u$_(e.arcType,m$1f.GEODESIC),this._followSurface=this._arcType!==m$1f.NONE,this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._workerName="createPolylineGeometry";var a=1+t.length*o$1p.packedLength;a+=e$2b(i)?1+i.length*e$1U.packedLength:1,this.packedLength=a+t$13.packedLength+n$11.packedLength+4+2}R$A.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");i=u$_(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._colors;for(o=e$2b(a)?a.length:0,t[i++]=o,n=0;n<o;++n,i+=e$1U.packedLength)e$1U.pack(a[n],t,i);return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._width,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i++]=e._granularity,t[i++]=e._hMax,t[i++]=e._dist,t[i]=e._period,t};var le$o=t$13.clone(t$13.UNIT_SPHERE),se$k=new n$11,P$B={positions:void 0,colors:void 0,ellipsoid:le$o,vertexFormat:se$k,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};R$A.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);var a=(r=e[t++])>0?new Array(r):void 0;for(n=0;n<r;++n,t+=e$1U.packedLength)a[n]=e$1U.unpack(e,t);var s=t$13.unpack(e,t,le$o);t+=t$13.packedLength;var l=n$11.unpack(e,t,se$k);t+=n$11.packedLength;var u=e[t++],c=1===e[t++],h=e[t++],d=e[t++],f=e[t++],p=1==e[t++],_=e[t];return e$2b(i)?(i._positions=o,i._colors=a,i._ellipsoid=t$13.clone(s,i._ellipsoid),i._vertexFormat=n$11.clone(l,i._vertexFormat),i._width=u,i._colorsPerVertex=c,i._arcType=h,i._granularity=d,i._hMax=f,i._dist=p,i._period=_,i):(P$B.positions=o,P$B.colors=a,P$B.width=u,P$B.colorsPerVertex=c,P$B.arcType=h,P$B.granularity=d,P$B.hMax=f,P$B.dist=p,P$B.period=_,new R$A(P$B))};var de$i=new o$1p,me$k=new o$1p,_e$j=new o$1p,ue$m=new o$1p;function ae$m(e,t,i,n){var r=e.combinedPositions,o=e.combinedLocalPositions,a=new a$_;n.position&&(a.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:r}));var s,l,u,c,h,d,f=t.length,p=r.length/3,_=(p-2*f)/(2*f),m=A$1g.triangulate(t),g=(_-1)*f*6+2*m.length,x=ce$x.createTypedArray(p,g),v=2*f,y=0;for(s=0;s<_-1;s++){for(l=0;l<f-1;l++)d=(u=2*l+s*f*2)+v,h=(c=u+1)+v,x[y++]=c,x[y++]=u,x[y++]=h,x[y++]=h,x[y++]=u,x[y++]=d;h=(c=(u=2*f-2+s*f*2)+1)+v,d=u+v,x[y++]=c,x[y++]=u,x[y++]=h,x[y++]=h,x[y++]=u,x[y++]=d}if(n.st||n.tangent||n.bitangent){var $,b,T=new Float32Array(2*p),C=1/(_-1),S=1/i.height,w=i.height/2,E=0;for(s=0;s<_;s++){for($=s*C,b=S*(t[0].y+w),T[E++]=$,T[E++]=b,l=1;l<f;l++)b=S*(t[l].y+w),T[E++]=$,T[E++]=b,T[E++]=$,T[E++]=b;b=S*(t[0].y+w),T[E++]=$,T[E++]=b}for(l=0;l<f;l++)$=0,b=S*(t[l].y+w),T[E++]=$,T[E++]=b;for(l=0;l<f;l++)$=(_-1)*C,b=S*(t[l].y+w),T[E++]=$,T[E++]=b;a.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:new Float32Array(T)})}var P=p-2*f;for(s=0;s<m.length;s+=3){var A=m[s]+P,L=m[s+1]+P,M=m[s+2]+P;x[y++]=A,x[y++]=L,x[y++]=M,x[y++]=M+f,x[y++]=L+f,x[y++]=A+f}var R=new I$1p({attributes:a,indices:x,boundingSphere:i$1c.fromVertices(r),primitiveType:W$18.TRIANGLES});if(n.normal&&(R=k$13.computeNormal(R)),n.tangent||n.bitangent){try{R=k$13.computeTangentAndBitangent(R)}catch{e$1$("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}n.tangent||(R.attributes.tangent=void 0),n.bitangent||(R.attributes.bitangent=void 0),n.st||(R.attributes.st=void 0)}return e$2b(o)&&(R.attributes.position.values=o,R.attributes.position.componentDatatype=S$12.FLOAT),R}function N$y(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;if(!e$2b(t))throw new t$16("options.polylinePositions is required.");if(!e$2b(i))throw new t$16("options.shapePositions is required.");this._positions=t,this._shape=i,this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._cornerType=u$_(e.cornerType,ar$5.ROUNDED),this._vertexFormat=n$11.clone(u$_(e.vertexFormat,n$11.DEFAULT)),this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry",this.enuCenter=u$_(e.enuCenter,o$1p.ZERO);var n=1+t.length*o$1p.packedLength;n+=1+i.length*o$1o.packedLength+o$1p.packedLength,this.packedLength=n+t$13.packedLength+n$11.packedLength+2}R$A.createGeometry=function(e){var t,i,n,r=e._width,o=e._hMax,a=e._vertexFormat,s=e._colors,l=e._colorsPerVertex,u=e._arcType,c=e._granularity,h=e._ellipsoid,d=e._dist,f=e._period,p=D$11(e._positions,o$1p.equalsEpsilon),_=p.length;if(!(_<2||r<=0)){if(u===m$1f.GEODESIC||u===m$1f.RHUMB){var m,g;u===m$1f.GEODESIC?(m=e$2a.chordLength(c,h.maximumRadius),g=m$V.numberOfPoints):(m=c,g=m$V.numberOfPointsRhumbLine);var x=m$V.extractHeights(p,h);if(e$2b(s)){var v=1;for(t=0;t<_-1;++t)v+=g(p[t],p[t+1],m);var y=new Array(v),$=0;for(t=0;t<_-1;++t){var b=p[t],T=p[t+1],C=s[t],S=g(b,T,m);if(l&&t<v){var w=xe$e(b,T,C,s[t+1],S),E=w.length;for(i=0;i<E;++i)y[$++]=w[i]}else for(i=0;i<S;++i)y[$++]=e$1U.clone(C)}y[$]=e$1U.clone(s[s.length-1]),s=y,fe$h.length=0}p=u===m$1f.GEODESIC?m$V.generateCartesianArc({positions:p,minDistance:m,ellipsoid:h,height:x,hMax:o}):m$V.generateCartesianRhumbArc({positions:p,granularity:m,ellipsoid:h,height:x})}var P,A=4*(_=p.length)-4,L=new Float64Array(3*A),M=new Float64Array(3*A),R=new Float64Array(3*A),I=new Float32Array(2*A),O=a.st?new Float32Array(2*A):void 0,D=e$2b(s)?new Uint8Array(4*A):void 0,B=d?new Float32Array(3*A):void 0,N=0,F=0,U=0,z=0,G=0,V=0;for(i=0;i<_;++i){var k,W;0===i?(P=de$i,o$1p.subtract(p[0],p[1],P),o$1p.add(p[0],P,P)):P=p[i-1],o$1p.clone(P,_e$j),o$1p.clone(p[i],me$k),i===_-1?(P=de$i,o$1p.subtract(p[_-1],p[_-2],P),o$1p.add(p[_-1],P,P)):P=p[i+1],o$1p.clone(P,ue$m),e$2b(D)&&(k=0===i||l?s[i]:s[i-1],i!==_-1&&(W=s[i]));var H=i===_-1?2:4;for(n=0===i?2:0;n<H;++n){o$1p.pack(me$k,L,N),o$1p.pack(_e$j,M,N),o$1p.pack(ue$m,R,N),N+=3;var q=n-2<0?-1:1,j=n%2*2-1,Y=j*i/_;if(I[F++]=o>0?Y:j,I[F++]=q*r,a.st&&(O[U++]=i/(_-1),O[U++]=Math.max(I[F-2],0)),e$2b(D)){var X=n<2?k:W;D[z++]=e$1U.floatToByte(X.red),D[z++]=e$1U.floatToByte(X.green),D[z++]=e$1U.floatToByte(X.blue),D[z++]=e$1U.floatToByte(X.alpha)}d&&(B[3*G]=V,G++)}V+=o$1p.distance(P,p[i])}if(d){var K=V,Q=Math.random()*(f>0?f:K);for(i=0;i<A;i++)B[3*i+1]=K,B[3*i+2]=Q}var Z=new a$_;Z.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:L}),Z.prevPosition=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:M}),Z.nextPosition=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:R}),Z.expandAndWidth=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:I}),a.st&&(Z.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:O})),e$2b(D)&&(Z.color=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,values:D,normalize:!0})),d&&(Z.dist=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:B}));var J=ce$x.createTypedArray(A,6*_-6),ee=0,te=0,ie=_-1;for(i=0;i<ie;++i)J[te++]=ee,J[te++]=ee+2,J[te++]=ee+1,J[te++]=ee+1,J[te++]=ee+2,J[te++]=ee+3,ee+=4;return new I$1p({attributes:Z,indices:J,primitiveType:W$18.TRIANGLES,boundingSphere:i$1c.fromPoints(p),geometryType:Me$p.POLYLINES})}},N$y.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");i=u$_(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._shape;for(o=a.length,t[i++]=o,n=0;n<o;++n,i+=o$1o.packedLength)o$1o.pack(a[n],t,i);return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._cornerType,t[i++]=e._granularity,o$1p.pack(e.enuCenter,t,i),t};var z$B=t$13.clone(t$13.UNIT_SPHERE),Q$C=new n$11,C$E={polylinePositions:void 0,shapePositions:void 0,ellipsoid:z$B,vertexFormat:Q$C,cornerType:void 0,granularity:void 0,enuCenter:void 0};N$y.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);r=e[t++];var a=new Array(r);for(n=0;n<r;++n,t+=o$1o.packedLength)a[n]=o$1o.unpack(e,t);var s=t$13.unpack(e,t,z$B);t+=t$13.packedLength;var l=n$11.unpack(e,t,Q$C);t+=n$11.packedLength;var u,c=e[t++],h=e[t++];return u=o$1p.unpack(e,t),e$2b(i)?(i._positions=o,i._shape=a,i._ellipsoid=t$13.clone(s,i._ellipsoid),i._vertexFormat=n$11.clone(l,i._vertexFormat),i._cornerType=c,i._granularity=h,i.enuCenter=u,i):(C$E.polylinePositions=o,C$E.shapePositions=a,C$E.cornerType=c,C$E.granularity=h,C$E.enuCenter=u,new N$y(C$E))};var pe$j=new f$18;function U$E(e,t){var i=new a$_;i.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:e});var n,r,o=t.length,a=i.position.values.length/3,s=e.length/3/o,l=ce$x.createTypedArray(a,2*o*(s+1)),u=0,c=(n=0)*o;for(r=0;r<o-1;r++)l[u++]=r+c,l[u++]=r+c+1;for(l[u++]=o-1+c,l[u++]=c,c=(n=s-1)*o,r=0;r<o-1;r++)l[u++]=r+c,l[u++]=r+c+1;for(l[u++]=o-1+c,l[u++]=c,n=0;n<s-1;n++){var h=o*n,d=h+o;for(r=0;r<o;r++)l[u++]=r+h,l[u++]=r+d}return new I$1p({attributes:i,indices:ce$x.createTypedArray(a,l),boundingSphere:i$1c.fromVertices(e),primitiveType:W$18.LINES})}function _$z(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;if(!e$2b(t))throw new t$16("options.polylinePositions is required.");if(!e$2b(i))throw new t$16("options.shapePositions is required.");this._positions=t,this._shape=i,this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._cornerType=u$_(e.cornerType,ar$5.ROUNDED),this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";var n=1+t.length*o$1p.packedLength;n+=1+i.length*o$1o.packedLength,this.packedLength=n+t$13.packedLength+2}N$y.createGeometry=function(e){for(var t=D$11(e._positions,o$1p.equalsEpsilon),i=t.length,n=new Array(i),r=0;r<i;r++)n[r]=o$1p.clone(t[r]);var o=e._shape;if(o=J$B.removeDuplicatesFromShape(o),!(t.length<2||o.length<3)){A$1g.computeWindingOrder2D(o)===W$13.CLOCKWISE&&o.reverse();var a=f$18.fromPoints(o,pe$j),s={};if(s.combinedPositions=J$B.computePositions(n,o,a,e,!0),!o$1p.equals(e.enuCenter,o$1p.ZERO)){var l=new Array(i);for(r=0;r<i;r++)l[r]=o$1p.clone(t[r]);s.combinedLocalPositions=J$B.computeLocalPositions(l,o,a,e,!0,e.enuCenter)}return ae$m(s,o,a,e._vertexFormat)}},_$z.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");i=u$_(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._shape;for(o=a.length,t[i++]=o,n=0;n<o;++n,i+=o$1o.packedLength)o$1o.pack(a[n],t,i);return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,t[i++]=e._cornerType,t[i]=e._granularity,t};var L$M=t$13.clone(t$13.UNIT_SPHERE),P$A={polylinePositions:void 0,shapePositions:void 0,ellipsoid:L$M,height:void 0,cornerType:void 0,granularity:void 0};_$z.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);r=e[t++];var a=new Array(r);for(n=0;n<r;++n,t+=o$1o.packedLength)a[n]=o$1o.unpack(e,t);var s=t$13.unpack(e,t,L$M);t+=t$13.packedLength;var l=e[t++],u=e[t];return e$2b(i)?(i._positions=o,i._shape=a,i._ellipsoid=t$13.clone(s,i._ellipsoid),i._cornerType=l,i._granularity=u,i):(P$A.polylinePositions=o,P$A.shapePositions=a,P$A.cornerType=l,P$A.granularity=u,new _$z(P$A))};var V$u=new f$18;_$z.createGeometry=function(e){var t=D$11(e._positions,o$1p.equalsEpsilon),i=e._shape;if(i=J$B.removeDuplicatesFromShape(i),!(t.length<2||i.length<3)){A$1g.computeWindingOrder2D(i)===W$13.CLOCKWISE&&i.reverse();var n=f$18.fromPoints(i,V$u);return U$E(J$B.computePositions(t,i,n,e,!1),i)}};var e$R={TMERC:"tmerc",ALBERS:"aea",LCC:"lcc",UTM:"utm"},ProjectionName=Object.freeze(e$R);function B$B(e,t){if(!(this instanceof B$B))return new B$B(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function w$B(e,t,i){if(!i)return t.indexOf(e);for(var n=0;n<t.length;n++)if(i(e,t[n]))return n;return-1}function u$E(e,t){x$K(e,0,e.children.length,t,e)}function x$K(e,t,i,n,r){r||(r=m$F(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=t;a<i;a++)o=e.children[a],p$I(r,e.leaf?n(o):o);return r}function p$I(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function g$K(e,t){return e.minX-t.minX}function v$z(e,t){return e.minY-t.minY}function X$y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d$T(e){return e.maxX-e.minX+(e.maxY-e.minY)}function S$C(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function A$L(e,t){var i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}function Y$t(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function M$G(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function m$F(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y$D(e,t,i,n,r){for(var o,a=[t,i];a.length;)!((i=a.pop())-(t=a.pop())<=n)&&(s$J(e,o=t+Math.ceil((i-t)/n/2)*n,t,i,r),a.push(t,o,o,i))}function r$G(){this._tree=B$B()}function n$v(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}function d$S(e,t){return e.id===t.id}B$B.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,i=[],n=this.toBBox;if(!M$G(e,t))return i;for(var r,o,a,s,l=[];t;){for(r=0,o=t.children.length;r<o;r++)a=t.children[r],M$G(e,s=t.leaf?n(a):a)&&(t.leaf?i.push(a):Y$t(e,s)?this._all(a,i):l.push(a));t=l.pop()}return i},collides:function(e){var t=this.data,i=this.toBBox;if(!M$G(e,t))return!1;for(var n,r,o,a,s=[];t;){for(n=0,r=t.children.length;n<r;n++)if(o=t.children[n],M$G(e,a=t.leaf?i(o):o)){if(t.leaf||Y$t(e,a))return!0;s.push(o)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=m$F([]),this},remove:function(e,t){if(!e)return this;for(var i,n,r,o,a=this.data,s=this.toBBox(e),l=[],u=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=u.pop(),o=!0),a.leaf&&-1!==(r=w$B(e,a.children,t)))return a.children.splice(r,1),l.push(a),this._condense(l),this;o||a.leaf||!Y$t(a,s)?n?(i++,a=n.children[i],o=!1):a=null:(l.push(a),u.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:g$K,compareMinY:v$z,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},_build:function(e,t,i,n){var r,o=i-t+1,a=this._maxEntries;if(o<=a)return u$E(r=m$F(e.slice(t,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=m$F([])).leaf=!1,r.height=n;var s,l,u,c,h=Math.ceil(o/a),d=h*Math.ceil(Math.sqrt(a));for(y$D(e,t,i,d,this.compareMinX),s=t;s<=i;s+=d)for(y$D(e,s,u=Math.min(s+d-1,i),h,this.compareMinY),l=s;l<=u;l+=h)c=Math.min(l+h-1,u),r.children.push(this._build(e,l,c,n-1));return u$E(r,this.toBBox),r},_chooseSubtree:function(e,t,i,n){for(var r,o,a,s,l,u,c,h;n.push(t),!t.leaf&&n.length-1!==i;){for(c=h=1/0,r=0,o=t.children.length;r<o;r++)l=X$y(a=t.children[r]),(u=S$C(e,a)-l)<h?(h=u,c=l<c?l:c,s=a):u===h&&l<c&&(c=l,s=a);t=s||t.children[0]}return t},_insert:function(e,t,i){var n=this.toBBox,r=i?e:n(e),o=[],a=this._chooseSubtree(r,this.data,t,o);for(a.children.push(e),p$I(a,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},_split:function(e,t){var i=e[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=m$F(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,u$E(i,this.toBBox),u$E(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(e,t){this.data=m$F([e,t]),this.data.height=e.height+1,this.data.leaf=!1,u$E(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,i){var n,r,o,a,s,l,u,c;for(l=u=1/0,n=t;n<=i-t;n++)a=A$L(r=x$K(e,0,n,this.toBBox),o=x$K(e,n,i,this.toBBox)),s=X$y(r)+X$y(o),a<l?(l=a,c=n,u=s<u?s:u):a===l&&s<u&&(u=s,c=n);return c},_chooseSplitAxis:function(e,t,i){var n=e.leaf?this.compareMinX:g$K,r=e.leaf?this.compareMinY:v$z;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)},_allDistMargin:function(e,t,i,n){e.children.sort(n);var r,o,a=this.toBBox,s=x$K(e,0,t,a),l=x$K(e,i-t,i,a),u=d$T(s)+d$T(l);for(r=t;r<i-t;r++)o=e.children[r],p$I(s,e.leaf?a(o):o),u+=d$T(s);for(r=i-t-1;r>=t;r--)o=e.children[r],p$I(l,e.leaf?a(o):o),u+=d$T(l);return u},_adjustParentBBoxes:function(e,t,i){for(var n=i;n>=0;n--)p$I(t[n],e)},_condense:function(e){for(var t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children).splice(t.indexOf(e[i]),1):this.clear():u$E(e[i],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}},n$v.fromRectangleAndId=function(e,t,i){return i.minX=t.west,i.minY=t.south,i.maxX=t.east,i.maxY=t.north,i.id=e,i},r$G.prototype.insert=function(e,t){o$1q.typeOf.string("id",e),o$1q.typeOf.object("rectangle",t);var i=n$v.fromRectangleAndId(e,t,new n$v);this._tree.insert(i)};var h$G=new n$v;r$G.prototype.remove=function(e,t){o$1q.typeOf.string("id",e),o$1q.typeOf.object("rectangle",t);var i=n$v.fromRectangleAndId(e,t,h$G);this._tree.remove(i,d$S)};var m$E=new n$v,e$Q;function p$H(e){return e$Q(e)}function y$C(e,t,i){return o$1q.typeOf.object("terrainProvider",e),o$1q.typeOf.number("level",t),o$1q.defined("positions",i),e.readyPromise.then((function(){return b$L(e,t,i)}))}function b$L(e,t,i){var n,r=e.tilingScheme,o=[],a={};for(n=0;n<i.length;++n){var s=r.positionToTileXY(i[n],t),l=s.toString();if(!a.hasOwnProperty(l)){var u={x:s.x,y:s.y,level:t,tilingScheme:r,terrainProvider:e,positions:[]};a[l]=u,o.push(u)}a[l].positions.push(i[n])}var c=[];for(n=0;n<o.length;++n){var h=o[n],d=new r$1b({throttle:!1,throttleByServer:!1,type:V$15.TERRAIN}),f=h.terrainProvider.requestTileGeometry(h.x,h.y,h.level,d,!0).then(w$A(h,e)).otherwise(x$J(h));c.push(f)}return o$1l.all(c,(function(){return i}))}function w$A(e,t){var i=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(e){if(t._isSct&&t._isTerrainZ)for(var r=nt$9.inflate(e.buffer).buffer,o=t.createTerrainData(e,r),a=0;a<i.length;++a){(s=i[a]).height=o.interpolateHeight(n,s.longitude,s.latitude)}else for(a=0;a<i.length;++a){var s;(s=i[a]).height=e.interpolateHeight(n,s.longitude,s.latitude)}}}function x$J(e){var t=e.positions;return function(){for(var e=0;e<t.length;++e){t[e].height=void 0}}}r$G.prototype.collides=function(e){o$1q.typeOf.object("rectangle",e);var t=n$v.fromRectangleAndId("",e,m$E);return this._tree.collides(t)},typeof requestAnimationFrame<"u"&&(e$Q=requestAnimationFrame),function(){if(!e$2b(e$Q)&&typeof window<"u")for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!e$2b(e$Q);)e$Q=window[e[t]+"RequestAnimationFrame"],++t;if(!e$2b(e$Q)){var n=0;e$Q=function(e){var t=Et$a(),i=Math.max(16.666666666666668-(t-n),0);return n=t+i,setTimeout((function(){e(n)}),i)}}}();var o$D=new o$1o;function y$B(e,t){if(!e$2b(e))throw new t$16("terrainProvider is required.");if(!e$2b(t))throw new t$16("positions is required.");return e.readyPromise.then((function(){var i=[],n=[],r=e.availability;if(!e$2b(r)&&!e._isSct)throw new t$16("sampleTerrainMostDetailed requires a terrain provider that has tile availability.");for(var o=[],a=0;a<t.length;++a){var s=t[a],l=e$2b(r)?r.computeMaximumLevelAtPosition(s):e._levels[e._levels.length-1];if(n[a]=l,0===l){e.tilingScheme.positionToTileXY(s,1,o$D);var u=e.loadTileDataAvailability(o$D.x,o$D.y,1);e$2b(u)&&o.push(u)}var c=i[l];e$2b(c)||(i[l]=c=[]),c.push(s)}return o$1l.all(o).then((function(){return o$1l.all(i.map((function(t,i){if(e$2b(t))return y$C(e,i,t)})))})).then((function(){for(var i=[],o=0;o<t.length;++o){var a=t[o];(e$2b(r)?r.computeMaximumLevelAtPosition(a):e._levels[e._levels.length-1])!==n[o]&&i.push(a)}if(i.length>0)return y$B(e,i)})).then((function(){return t}))}))}var E$H={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},G$I=Object.freeze(E$H);function w$z(e,t,i){let n=e._element,r=n.offsetWidth/n.getBoundingClientRect().width,o=n.offsetHeight/n.getBoundingClientRect().height;if(n===document)return i.x=t.clientX*r,i.y=t.clientY*o,i;var a=n.getBoundingClientRect();return i.x=(t.clientX-a.left)*r,i.y=(t.clientY-a.top)*o,i}function R$z(e,t){var i=e;return e$2b(t)&&(i+="+"+t),i}function y$A(e){return e.shiftKey?Aa$1.SHIFT:e.ctrlKey?Aa$1.CTRL:e.altKey?Aa$1.ALT:void 0}var l$L={LEFT:0,MIDDLE:1,RIGHT:2};function T$D(e,t,i,n){function r(t){n(e,t)}i.addEventListener(t,r,!1),e._removalFunctions.push((function(){i.removeEventListener(t,r,!1)}))}function ho(e){var t=e._element,i=e$2b(t.disableRootEvents)?t:document;s$Y.supportsPointerEvents()?(T$D(e,"pointerdown",t,go),T$D(e,"pointerup",t,W$G),T$D(e,"pointermove",t,ao),T$D(e,"pointercancel",t,W$G)):(T$D(e,"mousedown",t,j$C),T$D(e,"mouseup",i,K$B),T$D(e,"mousemove",i,Q$B),T$D(e,"touchstart",t,To),T$D(e,"touchend",i,$$D),T$D(e,"touchmove",i,Po),T$D(e,"touchcancel",i,$$D)),T$D(e,"dblclick",t,lo),T$D(e,"onwheel"in t?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",t,mo)}function _o(e){for(var t=e._removalFunctions,i=0;i<t.length;++i)t[i]()}var Y$s={position:new o$1o};function O$w(e){e._lastSeenTouchEvent=Et$a()}function k$y(e){return Et$a()-e._lastSeenTouchEvent>g$J.mouseEmulationIgnoreMilliseconds}function d$R(e,t,i){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)<i}function j$C(e,t){if(k$y(e)){var i,n=t.button;if(e._buttonDown[n]=!0,n===l$L.LEFT)i=G$I.LEFT_DOWN;else if(n===l$L.MIDDLE)i=G$I.MIDDLE_DOWN;else{if(n!==l$L.RIGHT)return;i=G$I.RIGHT_DOWN}var r=w$z(e,t,e._primaryPosition);o$1o.clone(r,e._primaryStartPosition),o$1o.clone(r,e._primaryPreviousPosition);var o=y$A(t),a=e.getInputAction(i,o);e$2b(a)&&(o$1o.clone(r,Y$s.position),a(Y$s),t.preventDefault())}}var z$A={position:new o$1o},J$y={position:new o$1o};function G$H(e,t,i,n){var r=y$A(n),o=e.getInputAction(t,r),a=e.getInputAction(i,r);if(e$2b(o)||e$2b(a)){var s=w$z(e,n,e._primaryPosition);if(e$2b(o)&&(o$1o.clone(s,z$A.position),o(z$A)),e$2b(a))d$R(e._primaryStartPosition,s,e._clickPixelTolerance)&&(o$1o.clone(s,J$y.position),a(J$y))}}function K$B(e,t){if(k$y(e)){var i=t.button;i!==l$L.LEFT&&i!==l$L.MIDDLE&&i!==l$L.RIGHT||(e._buttonDown[l$L.LEFT]&&(G$H(e,G$I.LEFT_UP,G$I.LEFT_CLICK,t),e._buttonDown[l$L.LEFT]=!1),e._buttonDown[l$L.MIDDLE]&&(G$H(e,G$I.MIDDLE_UP,G$I.MIDDLE_CLICK,t),e._buttonDown[l$L.MIDDLE]=!1),e._buttonDown[l$L.RIGHT]&&(G$H(e,G$I.RIGHT_UP,G$I.RIGHT_CLICK,t),e._buttonDown[l$L.RIGHT]=!1))}}var U$D={startPosition:new o$1o,endPosition:new o$1o};function Q$B(e,t){if(k$y(e)){var i=y$A(t),n=w$z(e,t,e._primaryPosition),r=e._primaryPreviousPosition,o=e.getInputAction(G$I.MOUSE_MOVE,i);e$2b(o)&&(o$1o.clone(r,U$D.startPosition),o$1o.clone(n,U$D.endPosition),o(U$D,t)),o$1o.clone(n,r),(e._buttonDown[l$L.LEFT]||e._buttonDown[l$L.MIDDLE]||e._buttonDown[l$L.RIGHT])&&t.preventDefault()}}var Z$B={position:new o$1o};function lo(e,t){var i;if(t.button===l$L.LEFT){i=G$I.LEFT_DOUBLE_CLICK;var n=y$A(t),r=e.getInputAction(i,n);e$2b(r)&&(w$z(e,t,Z$B.position),r(Z$B))}}function mo(e,t){var i;if(e$2b(t.deltaY)){var n=t.deltaMode;i=n===t.DOM_DELTA_PIXEL?-t.deltaY:n===t.DOM_DELTA_LINE?40*-t.deltaY:120*-t.deltaY}else i=t.detail>0?-120*t.detail:t.wheelDelta;if(e$2b(i)){var r=y$A(t),o=e.getInputAction(G$I.WHEEL,r);e$2b(o)&&(o(i),t.preventDefault())}}function To(e,t){O$w(e);var i,n,r,o=t.changedTouches,a=o.length,s=e._positions;for(i=0;i<a;++i)r=(n=o[i]).identifier,s.set(r,w$z(e,n,new o$1o));p$G(e,t);var l=e._previousPositions;for(i=0;i<a;++i)r=(n=o[i]).identifier,l.set(r,o$1o.clone(s.get(r)))}function $$D(e,t){O$w(e);var i,n,r=t.changedTouches,o=r.length,a=e._positions;for(i=0;i<o;++i)n=r[i].identifier,a.remove(n);p$G(e,t);var s=e._previousPositions;for(i=0;i<o;++i)n=r[i].identifier,s.remove(n)}var X$x={position:new o$1o},N$x={position1:new o$1o,position2:new o$1o},e$P={position:new o$1o},E$G={position:new o$1o},H$H={position:new o$1o};function p$G(e,t){var i,n,r=y$A(t),o=e._positions,a=o.length,s=e._isPinching;if(1!==a&&e._buttonDown[l$L.LEFT]){if(e._buttonDown[l$L.LEFT]=!1,e$2b(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),e$2b(i=e.getInputAction(G$I.LEFT_UP,r))&&(o$1o.clone(e._primaryPosition,e$P.position),i(e$P)),0===a&&!e._isTouchHolding&&e$2b(n=e.getInputAction(G$I.LEFT_CLICK,r)))d$R(e._primaryStartPosition,e._previousPositions.values[0],e._clickPixelTolerance)&&(o$1o.clone(e._primaryPosition,E$G.position),n(E$G));e._isTouchHolding=!1}if(0===a&&s&&(e._isPinching=!1,e$2b(i=e.getInputAction(G$I.PINCH_END,r))&&i()),1===a&&!s){var l=o.values[0];o$1o.clone(l,e._primaryPosition),o$1o.clone(l,e._primaryStartPosition),o$1o.clone(l,e._primaryPreviousPosition),e._buttonDown[l$L.LEFT]=!0,e$2b(i=e.getInputAction(G$I.LEFT_DOWN,r))&&(o$1o.clone(l,X$x.position),i(X$x)),e._touchHoldTimer=setTimeout((function(){!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,e$2b(n=e.getInputAction(G$I.RIGHT_CLICK,r)))&&(d$R(e._primaryStartPosition,e._previousPositions.values[0],e._holdPixelTolerance)&&(o$1o.clone(e._primaryPosition,H$H.position),n(H$H)))}),g$J.touchHoldDelayMilliseconds),t.preventDefault()}2===a&&!s&&(e._isPinching=!0,e$2b(i=e.getInputAction(G$I.PINCH_START,r))&&(o$1o.clone(o.values[0],N$x.position1),o$1o.clone(o.values[1],N$x.position2),i(N$x),t.preventDefault()))}function Po(e,t){O$w(e);var i,n,r,o=t.changedTouches,a=o.length,s=e._positions;for(i=0;i<a;++i){r=(n=o[i]).identifier;var l=s.get(r);e$2b(l)&&w$z(e,n,l)}S$B(e,t);var u=e._previousPositions;for(i=0;i<a;++i)r=(n=o[i]).identifier,o$1o.clone(s.get(r),u.get(r))}var c$B={startPosition:new o$1o,endPosition:new o$1o},L$L={distance:{startPosition:new o$1o,endPosition:new o$1o},angleAndHeight:{startPosition:new o$1o,endPosition:new o$1o}};function S$B(e,t){var i,n=y$A(t),r=e._positions,o=e._previousPositions,a=r.length;if(1===a&&e._buttonDown[l$L.LEFT]){var s=r.values[0];o$1o.clone(s,e._primaryPosition);var l=e._primaryPreviousPosition;e$2b(i=e.getInputAction(G$I.MOUSE_MOVE,n))&&(o$1o.clone(l,c$B.startPosition),o$1o.clone(s,c$B.endPosition),i(c$B,t)),o$1o.clone(s,l),t.preventDefault()}else if(2===a&&e._isPinching&&e$2b(i=e.getInputAction(G$I.PINCH_MOVE,n))){var u=r.values[0],c=r.values[1],h=o.values[0],d=o.values[1],f=c.x-u.x,p=c.y-u.y,_=.25*Math.sqrt(f*f+p*p),m=d.x-h.x,g=d.y-h.y,x=.25*Math.sqrt(m*m+g*g),v=.125*(c.y+u.y),y=.125*(d.y+h.y),$=Math.atan2(p,f),b=Math.atan2(g,m);o$1o.fromElements(0,x,L$L.distance.startPosition),o$1o.fromElements(0,_,L$L.distance.endPosition),o$1o.fromElements(b,y,L$L.angleAndHeight.startPosition),o$1o.fromElements($,v,L$L.angleAndHeight.endPosition),i(L$L)}}function go(e,t){if(t.target.setPointerCapture(t.pointerId),"touch"===t.pointerType){var i=e._positions,n=t.pointerId;i.set(n,w$z(e,t,new o$1o)),p$G(e,t),e._previousPositions.set(n,o$1o.clone(i.get(n)))}else j$C(e,t)}function W$G(e,t){if("touch"===t.pointerType){var i=e._positions,n=t.pointerId;i.remove(n),p$G(e,t),e._previousPositions.remove(n)}else K$B(e,t)}function ao(e,t){if("touch"===t.pointerType){var i=e._positions,n=t.pointerId,r=i.get(n);if(!e$2b(r))return;w$z(e,t,r),S$B(e,t);var o=e._previousPositions;o$1o.clone(i.get(n),o.get(n))}else Q$B(e,t)}function g$J(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-g$J.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new o$1o,this._primaryPosition=new o$1o,this._primaryPreviousPosition=new o$1o,this._positions=new e$1N,this._previousPositions=new e$1N,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=u$_(e,document),ho(this)}g$J.prototype.setInputAction=function(e,t,i){if(!e$2b(e))throw new t$16("action is required.");if(!e$2b(t))throw new t$16("type is required.");var n=R$z(t,i);this._inputEvents[n]=e},g$J.prototype.getInputAction=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=R$z(e,t);return this._inputEvents[i]},g$J.prototype.removeInputAction=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=R$z(e,t);delete this._inputEvents[i]},g$J.prototype.registerListenersForWindowTop=function(){var e=window.top,t=e$2b(e.disableRootEvents)?e:document;s$Y.supportsPointerEvents()?T$D(this,"pointerup",e,W$G):T$D(this,"mouseup",t,K$B)},g$J.prototype.isDestroyed=function(){return!1},g$J.prototype.destroy=function(){return _o(this),i$10(this)},g$J.mouseEmulationIgnoreMilliseconds=800,g$J.touchHoldDelayMilliseconds=1500;var F$H={};function wa(e){var t=6.239996+.0172019696544*e;return.001657*Math.sin(t+.01671*Math.sin(t))}var Ta$1=32.184,la$2=2451545;function K$A(e,t){t=a$15.addSeconds(e,Ta$1,t);var i=a$15.totalDays(t)-la$2;return t=a$15.addSeconds(t,wa(i),t)}var B$A=new a$15(2451545,0,H$19.TAI),ga$1=1e3,S$A=e$2a.RADIANS_PER_DEGREE,p$F=e$2a.RADIANS_PER_ARCSECOND,f$J=14959787e4,X$w=new p$1e;function k$x(e,t,i,n,r,o,a){if(i<0&&(i=-i,r+=e$2a.PI),i<0||i>e$2a.PI)throw new t$16("The inclination is out of range. Inclination must be greater than or equal to zero and less than or equal to Pi radians.");var s=e*(1-t),l=n-r,u=r,c=Aa(o-n,t);if("Hyperbolic"===Ea$1(t,0)&&Math.abs(e$2a.negativePiToPi(c))>=Math.acos(-1/t))throw new t$16("The true anomaly of the hyperbolic orbit lies outside of the bounds of the hyperbola.");ba(l,i,u,X$w);var h=s*(1+t),d=Math.cos(c),f=Math.sin(c),p=1+t*d;if(p<=e$2a.Epsilon10)throw new t$16("elements cannot be converted to cartesian");var _=h/p;return e$2b(a)?(a.x=_*d,a.y=_*f,a.z=0):a=new o$1p(_*d,_*f,0),p$1e.multiplyByVector(X$w,a,a)}function Ea$1(e,t){if(e<0)throw new t$16("eccentricity cannot be negative.");return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function Aa(e,t){if(t<0||t>=1)throw new t$16("eccentricity out of range.");return _a$1(Oa(e,t),t)}var G$G=50,Ia$1=e$2a.EPSILON8;function Oa(e,t){if(t<0||t>=1)throw new t$16("eccentricity out of range.");var i,n=Math.floor(e/e$2a.TWO_PI),r=(e-=n*e$2a.TWO_PI)+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE;for(i=0;i<G$G&&Math.abs(o-r)>Ia$1;++i){r=(o=r)-(o-t*Math.sin(o)-e)/(1-t*Math.cos(o))}if(i>=G$G)throw new t$16("Kepler equation did not converge");return o=r+n*e$2a.TWO_PI}function _a$1(e,t){if(t<0||t>=1)throw new t$16("eccentricity out of range.");var i=Math.floor(e/e$2a.TWO_PI);e-=i*e$2a.TWO_PI;var n=Math.cos(e)-t,r=Math.sin(e)*Math.sqrt(1-t*t),o=Math.atan2(r,n);return o=e$2a.zeroToTwoPi(o),e<0&&(o-=e$2a.TWO_PI),o+=i*e$2a.TWO_PI}function ba(e,t,i,n){if(t<0||t>e$2a.PI)throw new t$16("inclination out of range");var r=Math.cos(e),o=Math.sin(e),a=Math.cos(t),s=Math.sin(t),l=Math.cos(i),u=Math.sin(i);return e$2b(n)?(n[0]=l*r-u*o*a,n[1]=u*r+l*o*a,n[2]=o*s,n[3]=-l*o-u*r*a,n[4]=-u*o+l*r*a,n[5]=r*s,n[6]=u*s,n[7]=-l*s,n[8]=a):n=new p$1e(l*r-u*o*a,-l*o-u*r*a,u*s,u*r+l*o*a,-u*o+l*r*a,-l*s,o*s,r*s,a),n}var Da$1=1.0000010178*f$J,Na=100.46645683*S$A,ya=1295977422.83429*p$F,Q$A=16002,Z$A=21863,$$C=32004,j$B=10931,aa$2=14529,ra$2=16368,ta$1=15318,oa$2=32794,Ra$1=64*1e-7*f$J,qa$1=1e-7*-152*f$J,xa$1=62*1e-7*f$J,La$1=-8e-7*f$J,Wa=32*1e-7*f$J,Ya$1=1e-7*-41*f$J,Ua$1=19*1e-7*f$J,Ba$1=1e-7*-11*f$J,Va=1e-7*-150*f$J,Fa$1=1e-7*-46*f$J,Ja$1=68*1e-7*f$J,za$1=54*1e-7*f$J,Ha=14*1e-7*f$J,Ka$1=24*1e-7*f$J,Xa$1=1e-7*-28*f$J,ka=22*1e-7*f$J,na$1=10,ea$3=16002,ia$1=21863,sa$1=10931,ha$2=1473,va=32004,Ma$1=4387,ca=73,Ga$1=1e-7*-325,Qa$1=1e-7*-322,Za$1=1e-7*-79,$a$1=232*1e-7,ja=1e-7*-52,a0=97*1e-7,r0=55*1e-7,t0$1=1e-7*-41,o0=1e-7*-105,n0=1e-7*-137,e0=258*1e-7,i0=35*1e-7,s0=1e-7*-116,h0=1e-7*-88,v0=1e-7*-112,M0=1e-7*-80,b$K=new a$15(0,0,H$19.TAI);function c0(e,t){K$A(e,b$K);var i=(b$K.dayNumber-B$A.dayNumber+(b$K.secondsOfDay-B$A.secondsOfDay)/h$17.SECONDS_PER_DAY)/(10*h$17.DAYS_PER_JULIAN_CENTURY),n=.3595362*i,r=Da$1+Ra$1*Math.cos(Q$A*n)+Va*Math.sin(Q$A*n)+qa$1*Math.cos(Z$A*n)+Fa$1*Math.sin(Z$A*n)+xa$1*Math.cos($$C*n)+Ja$1*Math.sin($$C*n)+La$1*Math.cos(j$B*n)+za$1*Math.sin(j$B*n)+Wa*Math.cos(aa$2*n)+Ha*Math.sin(aa$2*n)+Ya$1*Math.cos(ra$2*n)+Ka$1*Math.sin(ra$2*n)+Ua$1*Math.cos(ta$1*n)+Xa$1*Math.sin(ta$1*n)+Ba$1*Math.cos(oa$2*n)+ka*Math.sin(oa$2*n),o=Na+ya*i+Ga$1*Math.cos(na$1*n)+o0*Math.sin(na$1*n)+Qa$1*Math.cos(ea$3*n)+n0*Math.sin(ea$3*n)+Za$1*Math.cos(ia$1*n)+e0*Math.sin(ia$1*n)+$a$1*Math.cos(sa$1*n)+i0*Math.sin(sa$1*n)+ja*Math.cos(ha$2*n)+s0*Math.sin(ha$2*n)+a0*Math.cos(va*n)+h0*Math.sin(va*n)+r0*Math.cos(Ma$1*n)+v0*Math.sin(Ma$1*n)+t0$1*Math.cos(ca*n)+M0*Math.sin(ca*n);return k$x(r,.0167086342-.0004203654*i,469.97289*p$F*i,102.93734808*S$A+11612.3529*p$F*i,174.87317577*S$A-8679.27034*p$F*i,o,t)}function fa$1(e,t){K$A(e,b$K);var i=(b$K.dayNumber-B$A.dayNumber+(b$K.secondsOfDay-B$A.secondsOfDay)/h$17.SECONDS_PER_DAY)/h$17.DAYS_PER_JULIAN_CENTURY,n=i*i,r=n*i,o=r*i,a=383397.7725+.004*i,s=.055545526-16e-9*i,l=5.15668983*S$A,u=-8e-5*i+.02966*n-42e-6*r-13e-8*o,c=83.35324312*S$A,h=14643420.2669*i-38.2702*n-.045047*r+21301e-8*o,d=125.04455501*S$A,f=-6967919.3631*i+6.3602*n+.007625*r-3586e-8*o,p=218.31664563*S$A,_=1732559343.4847*i-6.391*n+.006588*r-3169e-8*o,m=297.85019547*S$A+p$F*(1602961601.209*i-6.3706*n+.006593*r-3169e-8*o),g=134.96340251*S$A+p$F*(1717915923.2178*i+31.8792*n+.051635*r-2447e-7*o),x=357.52910918*S$A+p$F*(129596581.0481*i-.5532*n+136e-6*r-1149e-8*o),v=310.17137918*S$A-p$F*(6967051.436*i+6.2068*n+.007618*r-3219e-8*o),y=2*m,$=4*m,b=6*m,T=2*g,C=3*g,S=4*g,w=2*(93.27209062*S$A+p$F*(1739527262.8478*i-12.7512*n-.001037*r+417e-8*o));a+=3400.4*Math.cos(y)-635.6*Math.cos(y-g)-235.6*Math.cos(g)+218.1*Math.cos(y-x)+181*Math.cos(y+g),s+=.014216*Math.cos(y-g)+.008551*Math.cos(y-T)-.001383*Math.cos(g)+.001356*Math.cos(y+g)-.001147*Math.cos($-C)-914e-6*Math.cos($-T)+869e-6*Math.cos(y-x-g)-627e-6*Math.cos(y)-394e-6*Math.cos($-S)+282e-6*Math.cos(y-x-T)-279e-6*Math.cos(m-g)-236e-6*Math.cos(T)+231e-6*Math.cos($)+229e-6*Math.cos(b-S)-201e-6*Math.cos(T-w),u+=486.26*Math.cos(y-w)-40.13*Math.cos(y)+37.51*Math.cos(w)+25.73*Math.cos(T-w)+19.97*Math.cos(y-x-w),h+=-55609*Math.sin(y-g)-34711*Math.sin(y-T)-9792*Math.sin(g)+9385*Math.sin($-C)+7505*Math.sin($-T)+5318*Math.sin(y+g)+3484*Math.sin($-S)-3417*Math.sin(y-x-g)-2530*Math.sin(b-S)-2376*Math.sin(y)-2075*Math.sin(y-C)-1883*Math.sin(T)-1736*Math.sin(b-5*g)+1626*Math.sin(x)-1370*Math.sin(b-C),f+=-5392*Math.sin(y-w)-540*Math.sin(x)-441*Math.sin(y)+423*Math.sin(w)-288*Math.sin(T-w),_+=-3332.9*Math.sin(y)+1197.4*Math.sin(y-g)-662.5*Math.sin(x)+396.3*Math.sin(g)-218*Math.sin(y-x);var E=2*v,P=3*v;u+=46.997*Math.cos(v)*i-.614*Math.cos(y-w+v)*i+.614*Math.cos(y-w-v)*i-.0297*Math.cos(E)*n-.0335*Math.cos(v)*n+.0012*Math.cos(y-w+E)*n-16e-5*Math.cos(v)*r+4e-5*Math.cos(P)*r+4e-5*Math.cos(E)*r;var A=2.116*Math.sin(v)*i-.111*Math.sin(y-w-v)*i-.0015*Math.sin(v)*n;return h+=A,_+=A,f+=-520.77*Math.sin(v)*i+13.66*Math.sin(y-w+v)*i+1.12*Math.sin(y-v)*i-1.06*Math.sin(w-v)*i+.66*Math.sin(E)*n+.371*Math.sin(v)*n-.035*Math.sin(y-w+E)*n-.015*Math.sin(y-w+v)*n+.0014*Math.sin(v)*r-.0011*Math.sin(P)*r-9e-4*Math.sin(E)*r,k$x(a*=ga$1,s,l+u*p$F,c+h*p$F,d+f*p$F,p+_*p$F,t)}var ua$1=.012300034,f0=ua$1/(ua$1+1)*-1;function u0(e,t){return t=fa$1(e,t),o$1p.multiplyByScalar(t,f0,t)}var ma$1=new p$1e(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),R$y=new o$1p;function ae$l(e,t,i,n,r,o,a){var s,l=m$V.numberOfPoints(e,t,r),u=i.red,c=i.green,h=i.blue,d=i.alpha,f=n.red,p=n.green,_=n.blue,m=n.alpha;if(e$1U.equals(i,n)){for(s=0;s<l;s++)o[a++]=e$1U.floatToByte(u),o[a++]=e$1U.floatToByte(c),o[a++]=e$1U.floatToByte(h),o[a++]=e$1U.floatToByte(d);return a}var g=(f-u)/l,x=(p-c)/l,v=(_-h)/l,y=(m-d)/l,$=a;for(s=0;s<l;s++)o[$++]=e$1U.floatToByte(u+s*g),o[$++]=e$1U.floatToByte(c+s*x),o[$++]=e$1U.floatToByte(h+s*v),o[$++]=e$1U.floatToByte(d+s*y);return $}function S$z(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,i=e.colors,n=u$_(e.colorsPerVertex,!1);if(!e$2b(t)||t.length<2)throw new t$16("At least two positions are required.");if(e$2b(i)&&(n&&i.length<t.length||!n&&i.length<t.length-1))throw new t$16("colors has an invalid length.");this._positions=t,this._colors=i,this._colorsPerVertex=n,this._arcType=u$_(e.arcType,m$1f.GEODESIC),this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._workerName="createSimplePolylineGeometry";var r=1+t.length*o$1p.packedLength;r+=e$2b(i)?1+i.length*e$1U.packedLength:1,this.packedLength=r+t$13.packedLength+3}F$H.computeSunPositionInEarthInertialFrame=function(e,t){return e$2b(e)||(e=a$15.now()),e$2b(t)||(t=new o$1p),R$y=c0(e,R$y),t=o$1p.negate(R$y,t),u0(e,R$y),o$1p.subtract(t,R$y,t),p$1e.multiplyByVector(ma$1,t,t),t},F$H.computeMoonPositionInEarthInertialFrame=function(e,t){return e$2b(e)||(e=a$15.now()),t=fa$1(e,t),p$1e.multiplyByVector(ma$1,t,t),t},S$z.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");i=u$_(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._colors;for(o=e$2b(a)?a.length:0,t[i++]=o,n=0;n<o;++n,i+=e$1U.packedLength)e$1U.pack(a[n],t,i);return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i]=e._granularity,t},S$z.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);var a=(r=e[t++])>0?new Array(r):void 0;for(n=0;n<r;++n,t+=e$1U.packedLength)a[n]=e$1U.unpack(e,t);var s=t$13.unpack(e,t);t+=t$13.packedLength;var l=1===e[t++],u=e[t++],c=e[t];return e$2b(i)?(i._positions=o,i._colors=a,i._ellipsoid=s,i._colorsPerVertex=l,i._arcType=u,i._granularity=c,i):new S$z({positions:o,colors:a,ellipsoid:s,colorsPerVertex:l,arcType:u,granularity:c})};var U$C=new Array(2),q$F=new Array(2),te$p={positions:U$C,height:q$F,ellipsoid:void 0,minDistance:void 0,granularity:void 0};function l$K(){this._maxVisibleValue=17976931348623157e292,this._minVisibleValue=-17976931348623157e292,this._floor=0,this._ceiling=0,this._opacity=1,this._updateColorDictTable=!1,this._coverageArea=[],this._updatePolygon=!0,this._displayMode=_0x256766.DisplayMode.FACE,this._dictColorTable=void 0}function n$u(e){var t=u$_(e.radius,1),i={radii:new o$1p(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new b$P(i),this._workerName="createSphereGeometry"}S$z.createGeometry=function(e){var t,i,n,r,o,a=e._positions,s=e._colors,l=e._colorsPerVertex,u=e._arcType,c=e._granularity,h=e._ellipsoid,d=e$2a.chordLength(c,h.maximumRadius),f=e$2b(s)&&!l,p=a.length,_=0;if(u===m$1f.GEODESIC||u===m$1f.RHUMB){var m,g,x;u===m$1f.GEODESIC?(m=e$2a.chordLength(c,h.maximumRadius),g=m$V.numberOfPoints,x=m$V.generateArc):(m=c,g=m$V.numberOfPointsRhumbLine,x=m$V.generateRhumbArc);var v=m$V.extractHeights(a,h),y=te$p;if(u===m$1f.GEODESIC?y.minDistance=d:y.granularity=c,y.ellipsoid=h,f){var $=0;for(t=0;t<p-1;t++)$+=g(a[t],a[t+1],m)+1;i=new Float64Array(3*$),r=new Uint8Array(4*$),y.positions=U$C,y.height=q$F;var b=0;for(t=0;t<p-1;++t){U$C[0]=a[t],U$C[1]=a[t+1],q$F[0]=v[t],q$F[1]=v[t+1];var T=x(y);if(e$2b(s)){var C=T.length/3;o=s[t];for(var S=0;S<C;++S)r[b++]=e$1U.floatToByte(o.red),r[b++]=e$1U.floatToByte(o.green),r[b++]=e$1U.floatToByte(o.blue),r[b++]=e$1U.floatToByte(o.alpha)}i.set(T,_),_+=T.length}}else if(y.positions=a,y.height=v,i=new Float64Array(x(y)),e$2b(s)){for(r=new Uint8Array(i.length/3*4),t=0;t<p-1;++t){_=ae$l(a[t],a[t+1],s[t],s[t+1],d,r,_)}var w=s[p-1];r[_++]=e$1U.floatToByte(w.red),r[_++]=e$1U.floatToByte(w.green),r[_++]=e$1U.floatToByte(w.blue),r[_++]=e$1U.floatToByte(w.alpha)}}else{n=f?2*p-2:p,i=new Float64Array(3*n),r=e$2b(s)?new Uint8Array(4*n):void 0;var E=0,P=0;for(t=0;t<p;++t){var A=a[t];if(f&&t>0&&(o$1p.pack(A,i,E),E+=3,o=s[t-1],r[P++]=e$1U.floatToByte(o.red),r[P++]=e$1U.floatToByte(o.green),r[P++]=e$1U.floatToByte(o.blue),r[P++]=e$1U.floatToByte(o.alpha)),f&&t===p-1)break;o$1p.pack(A,i,E),E+=3,e$2b(s)&&(o=s[t],r[P++]=e$1U.floatToByte(o.red),r[P++]=e$1U.floatToByte(o.green),r[P++]=e$1U.floatToByte(o.blue),r[P++]=e$1U.floatToByte(o.alpha))}}var L=new a$_;L.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:i}),e$2b(s)&&(L.color=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,values:r,normalize:!0}));var M=2*((n=i.length/3)-1),R=ce$x.createTypedArray(n,M),I=0;for(t=0;t<n-1;++t)R[I++]=t,R[I++]=t+1;return new I$1p({attributes:L,indices:R,primitiveType:W$18.LINES,boundingSphere:i$1c.fromPoints(a)})},l$K.prototype.destroy=function(){this._coverageArea.length=0,e$2b(this._dictColorTable)&&this._dictColorTable.destroy()},Object.defineProperties(l$K.prototype,{MinVisibleValue:{get:function(){return this._minVisibleValue},set:function(e){this._minVisibleValue=e}},MaxVisibleValue:{get:function(){return this._maxVisibleValue},set:function(e){this._maxVisibleValue=e}},ColorTableMaxKey:{get:function(){return this._ceiling},set:function(e){this._ceiling=e}},ColorTableMinKey:{get:function(){return this._floor},set:function(e){this._floor=e}},ColorTable:{get:function(){return this._dictColorTable},set:function(e){if(e$2b(e)){this._dictColorTable=i$S.clone(e,this._dictColorTable),this._updateColorDictTable=!0;var t=this._dictColorTable.count();if(!(t<1)){new e$1U;var i=0,n=0,r=this._dictColorTable.getItem(0);e$2b(r)&&e$2b(r.altitude)&&(i=parseFloat(r.altitude)),e$2b(r=this._dictColorTable.getItem(t-1))&&e$2b(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n)}}else e$2b(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null)}},Opacity:{get:function(){return this._opacity},set:function(e){this._opacity=e}},CoverageArea:{get:function(){return this._coverageArea},set:function(e){if(this._updatePolygon=!0,this._coverageArea.length=0,e$2b(e))for(var t=0;t<e.length;t++)this._coverageArea[t]=e[t]}},DisplayMode:{get:function(){return this._displayMode},set:function(e){this._displayMode=e}},UpdateColorDictTable:{get:function(){return this._updateColorDictTable},set:function(e){this._updateColorDictTable=e}},UpdatePolygonRegion:{get:function(){return this._updatePolygon},set:function(e){this._updatePolygon=e}}}),l$K.clone=function(e,t){if(e$2b(e)){e$2b(t)||(t=new l$K),t._maxVisibleValue=e._maxVisibleValue,t._minVisibleValue=e._minVisibleValue,t._floor=e._floor,t._ceiling=e._ceiling,t._opacity=e._opacity,t._updateColorDictTable=e._updateColorDictTable,t._updatePolygon=e._updatePolygon,t._displayMode=e._displayMode,t._dictColorTable=i$S.clone(e._dictColorTable,t._dictColorTable),t._coverageArea.length=0;for(var i=0;i<e._coverageArea.length;i++)t._coverageArea[i]=e._coverageArea[i];return t}},n$u.packedLength=b$P.packedLength,n$u.pack=function(e,t,i){return o$1q.typeOf.object("value",e),b$P.pack(e._ellipsoidGeometry,t,i)};var p$E=new b$P,r$F={radius:void 0,radii:new o$1p,vertexFormat:new n$11,stackPartitions:void 0,slicePartitions:void 0};function c$A(e,t,i){this.clock=u$_(e,0),this.cone=u$_(t,0),this.magnitude=u$_(i,1)}function f$I(e){this.url=u$_(e.url,"")}function r$E(){t$16.throwInstantiationError()}function o$C(e){throw new t$16("This type should not be instantiated directly. Instead, use WebMercatorTilingScheme or GeographicTilingScheme.")}function D$D(e,t){return a$15.compare(e.start,t.start)}function c$z(e){if(this._intervals=[],this._changedEvent=new o$1h,e$2b(e))for(var t=e.length,i=0;i<t;i++)this.addInterval(e[i])}n$u.unpack=function(e,t,i){var n=b$P.unpack(e,t,p$E);return r$F.vertexFormat=n$11.clone(n._vertexFormat,r$F.vertexFormat),r$F.stackPartitions=n._stackPartitions,r$F.slicePartitions=n._slicePartitions,e$2b(i)?(o$1p.clone(n._radii,r$F.radii),i._ellipsoidGeometry=new b$P(r$F),i):(r$F.radius=n._radii.x,new n$u(r$F))},n$u.createGeometry=function(e){return b$P.createGeometry(e._ellipsoidGeometry)},c$A.fromCartesian3=function(e,t){o$1q.typeOf.object("cartesian3",e);var i=e.x,n=e.y,r=e.z,o=i*i+n*n;return e$2b(t)||(t=new c$A),t.clock=Math.atan2(n,i),t.cone=Math.atan2(Math.sqrt(o),r),t.magnitude=Math.sqrt(o+r*r),t},c$A.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new c$A(e.clock,e.cone,e.magnitude)},c$A.normalize=function(e,t){return o$1q.typeOf.object("spherical",e),e$2b(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new c$A(e.clock,e.cone,1)},c$A.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude},c$A.equalsEpsilon=function(e,t,i){return i=u$_(i,0),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e.clock-t.clock)<=i&&Math.abs(e.cone-t.cone)<=i&&Math.abs(e.magnitude-t.magnitude)<=i},c$A.prototype.equals=function(e){return c$A.equals(this,e)},c$A.prototype.clone=function(e){return c$A.clone(this,e)},c$A.prototype.equalsEpsilon=function(e,t){return c$A.equalsEpsilon(this,e,t)},c$A.prototype.toString=function(){return"("+this.clock+", "+this.cone+", "+this.magnitude+")"},f$I.checkSptialLicense=function(e){if(!e$2b(e))throw new t$16("url is required");if("string"!=typeof e)throw new t$16("url must be a string");var t=e.lastIndexOf("realspace");if(-1===t)return o$1l.resolve(!1).then((function(){return!1})).otherwise((function(){return!1}));var i=e.substring(0,t);return e=i+"realspace/spatiallicense.xml",e$2b(a$O.CREDENTIAL)&&(e=a$O.addToken(e)),p$_({url:e,responseType:"text"}).then((function(e){return-1!==e.indexOf("<boolean>true</boolean>")})).otherwise((function(e){return!1}))},Object.defineProperties(r$E.prototype,{credits:{get:t$16.throwInstantiationError},waterMask:{get:t$16.throwInstantiationError}}),r$E.prototype.interpolateHeight=t$16.throwInstantiationError,r$E.prototype.isChildAvailable=t$16.throwInstantiationError,r$E.prototype.createMesh=t$16.throwInstantiationError,r$E.prototype.upsample=t$16.throwInstantiationError,r$E.prototype.wasCreatedByUpsampling=t$16.throwInstantiationError,Object.defineProperties(o$C.prototype,{ellipsoid:{get:t$16.throwInstantiationError},rectangle:{get:t$16.throwInstantiationError},projection:{get:t$16.throwInstantiationError}}),o$C.prototype.getNumberOfXTilesAtLevel=t$16.throwInstantiationError,o$C.prototype.getNumberOfYTilesAtLevel=t$16.throwInstantiationError,o$C.prototype.rectangleToNativeRectangle=t$16.throwInstantiationError,o$C.prototype.tileXYToNativeRectangle=t$16.throwInstantiationError,o$C.prototype.tileXYToRectangle=t$16.throwInstantiationError,o$C.prototype.positionToTileXY=t$16.throwInstantiationError,Object.defineProperties(c$z.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){var e=this._intervals;return 0===e.length?void 0:e[0].start}},isStartIncluded:{get:function(){var e=this._intervals;return 0!==e.length&&e[0].isStartIncluded}},stop:{get:function(){var e=this._intervals,t=e.length;return 0===t?void 0:e[t-1].stop}},isStopIncluded:{get:function(){var e=this._intervals,t=e.length;return 0!==t&&e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return 0===this._intervals.length}}}),c$z.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof c$z))return!1;var i=this._intervals,n=e._intervals,r=i.length;if(r!==n.length)return!1;for(var o=0;o<r;o++)if(!d$W.equals(i[o],n[o],t))return!1;return!0},c$z.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return this._intervals[e]},c$z.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))},c$z.prototype.findIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t]:void 0},c$z.prototype.findDataForIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0},c$z.prototype.contains=function(e){return this.indexOf(e)>=0};var q$E=new d$W;c$z.prototype.indexOf=function(e){if(!e$2b(e))throw new t$16("date is required");var t=this._intervals;q$E.start=e,q$E.stop=e;var i=a$17(t,q$E,D$D);return i>=0?t[i].isStartIncluded?i:i>0&&t[i-1].stop.equals(e)&&t[i-1].isStopIncluded?i-1:~i:(i=~i)>0&&i-1<t.length&&d$W.contains(t[i-1],e)?i-1:~i},c$z.prototype.findInterval=function(e){for(var t=(e=u$_(e,u$_.EMPTY_OBJECT)).start,i=e.stop,n=e.isStartIncluded,r=e.isStopIncluded,o=this._intervals,a=0,s=o.length;a<s;a++){var l=o[a];if((!e$2b(t)||l.start.equals(t))&&(!e$2b(i)||l.stop.equals(i))&&(!e$2b(n)||l.isStartIncluded===n)&&(!e$2b(r)||l.isStopIncluded===r))return o[a]}},c$z.prototype.addInterval=function(e,t){if(!e$2b(e))throw new t$16("interval is required");if(!e.isEmpty){var i=this._intervals;if(0===i.length||a$15.greaterThan(e.start,i[i.length-1].stop))return i.push(e),void this._changedEvent.raiseEvent(this);var n,r=a$17(i,e,D$D);for(r<0?r=~r:r>0&&e.isStartIncluded&&i[r-1].isStartIncluded&&i[r-1].start.equals(e.start)?--r:r<i.length&&!e.isStartIncluded&&i[r].isStartIncluded&&i[r].start.equals(e.start)&&++r,r>0&&(((n=a$15.compare(i[r-1].stop,e.start))>0||0===n&&(i[r-1].isStopIncluded||e.isStartIncluded))&&((e$2b(t)?t(i[r-1].data,e.data):i[r-1].data===e.data)?(e=a$15.greaterThan(e.stop,i[r-1].stop)?new d$W({start:i[r-1].start,stop:e.stop,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):new d$W({start:i[r-1].start,stop:i[r-1].stop,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:i[r-1].isStopIncluded||e.stop.equals(i[r-1].stop)&&e.isStopIncluded,data:e.data}),i.splice(r-1,1),--r):(((n=a$15.compare(i[r-1].stop,e.stop))>0||0===n&&i[r-1].isStopIncluded&&!e.isStopIncluded)&&i.splice(r,0,new d$W({start:e.stop,stop:i[r-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[r-1].isStopIncluded,data:i[r-1].data})),i[r-1]=new d$W({start:i[r-1].start,stop:e.start,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:i[r-1].data}))));r<i.length&&((n=a$15.compare(e.stop,i[r].start))>0||0===n&&(e.isStopIncluded||i[r].isStartIncluded));)if(e$2b(t)?t(i[r].data,e.data):i[r].data===e.data)e=new d$W({start:e.start,stop:a$15.greaterThan(i[r].stop,e.stop)?i[r].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:a$15.greaterThan(i[r].stop,e.stop)?i[r].isStopIncluded:e.isStopIncluded,data:e.data}),i.splice(r,1);else{if(i[r]=new d$W({start:e.stop,stop:i[r].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[r].isStopIncluded,data:i[r].data}),!i[r].isEmpty)break;i.splice(r,1)}i.splice(r,0,e),this._changedEvent.raiseEvent(this)}},c$z.prototype.removeInterval=function(e){if(!e$2b(e))throw new t$16("interval is required");if(e.isEmpty)return!1;var t=this._intervals,i=a$17(t,e,D$D);i<0&&(i=~i);var n=!1;for(i>0&&(a$15.greaterThan(t[i-1].stop,e.start)||t[i-1].stop.equals(e.start)&&t[i-1].isStopIncluded&&e.isStartIncluded)&&(n=!0,(a$15.greaterThan(t[i-1].stop,e.stop)||t[i-1].isStopIncluded&&!e.isStopIncluded&&t[i-1].stop.equals(e.stop))&&t.splice(i,0,new d$W({start:e.stop,stop:t[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i-1].isStopIncluded,data:t[i-1].data})),t[i-1]=new d$W({start:t[i-1].start,stop:e.start,isStartIncluded:t[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[i-1].data})),i<t.length&&!e.isStartIncluded&&t[i].isStartIncluded&&e.start.equals(t[i].start)&&(n=!0,t.splice(i,0,new d$W({start:t[i].start,stop:t[i].start,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data})),++i);i<t.length&&a$15.greaterThan(e.stop,t[i].stop);)n=!0,t.splice(i,1);return i<t.length&&e.stop.equals(t[i].stop)&&(n=!0,!e.isStopIncluded&&t[i].isStopIncluded?i+1<t.length&&t[i+1].start.equals(e.stop)&&t[i].data===t[i+1].data?(t.splice(i,1),t[i]=new d$W({start:t[i].start,stop:t[i].stop,isStartIncluded:!0,isStopIncluded:t[i].isStopIncluded,data:t[i].data})):t[i]=new d$W({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data}):t.splice(i,1)),i<t.length&&(a$15.greaterThan(e.stop,t[i].start)||e.stop.equals(t[i].start)&&e.isStopIncluded&&t[i].isStartIncluded)&&(n=!0,t[i]=new d$W({start:e.stop,stop:t[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i].isStopIncluded,data:t[i].data})),n&&this._changedEvent.raiseEvent(this),n},c$z.prototype.intersect=function(e,t,i){if(!e$2b(e))throw new t$16("other is required.");for(var n=new c$z,r=0,o=0,a=this._intervals,s=e._intervals;r<a.length&&o<s.length;){var l=a[r],u=s[o];if(a$15.lessThan(l.stop,u.start))++r;else if(a$15.lessThan(u.stop,l.start))++o;else{if(e$2b(i)||e$2b(t)&&t(l.data,u.data)||!e$2b(t)&&u.data===l.data){var c=d$W.intersect(l,u,new d$W,i);c.isEmpty||n.addInterval(c,t)}a$15.lessThan(l.stop,u.stop)||l.stop.equals(u.stop)&&!l.isStopIncluded&&u.isStopIncluded?++r:++o}}return n},c$z.fromJulianDateArray=function(e,t){if(!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.julianDates))throw new t$16("options.iso8601Array is required.");e$2b(t)||(t=new c$z);var i,n=e.julianDates,r=n.length,o=e.dataCallback,a=u$_(e.isStartIncluded,!0),s=u$_(e.isStopIncluded,!0),l=u$_(e.leadingInterval,!1),u=u$_(e.trailingInterval,!1),c=0;l&&(++c,(i=new d$W({start:o$H.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!a})).data=e$2b(o)?o(i,t.length):t.length,t.addInterval(i));for(var h=0;h<r-1;++h){var d=n[h],f=n[h+1];(i=new d$W({start:d,stop:f,isStartIncluded:t.length!==c||a,isStopIncluded:h===r-2&&s})).data=e$2b(o)?o(i,t.length):t.length,t.addInterval(i),d=f}return u&&((i=new d$W({start:n[r-1],stop:o$H.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0})).data=e$2b(o)?o(i,t.length):t.length,t.addInterval(i)),t};var I$M=new d$1r,m$D=[0,31,28,31,30,31,30,31,31,30,31,30,31];function _$y(e,t,i){e$2b(i)||(i=new a$15),a$15.toGregorianDate(e,I$M);var n=I$M.millisecond+t.millisecond,r=I$M.second+t.second,o=I$M.minute+t.minute,a=I$M.hour+t.hour,s=I$M.day+t.day,l=I$M.month+t.month,u=I$M.year+t.year;for(n>=1e3&&(r+=Math.floor(n/1e3),n%=1e3),r>=60&&(o+=Math.floor(r/60),r%=60),o>=60&&(a+=Math.floor(o/60),o%=60),a>=24&&(s+=Math.floor(a/24),a%=24),m$D[2]=i$1b(u)?29:28;s>m$D[l]||l>=13;)s>m$D[l]&&(s-=m$D[l],++l),l>=13&&(--l,u+=Math.floor(l/12),l%=12,++l),m$D[2]=i$1b(u)?29:28;return I$M.millisecond=n,I$M.second=r,I$M.minute=o,I$M.hour=a,I$M.day=s,I$M.month=l,I$M.year=u,a$15.fromGregorianDate(I$M,i)}var k$w=new a$15,N$w=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function A$K(e,t){if(!e$2b(e)||0===e.length)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,"P"===e[0]){var i=e.match(N$w);if(!e$2b(i))return!1;if(e$2b(i[1])&&(t.year=Number(i[1].replace(",","."))),e$2b(i[2])&&(t.month=Number(i[2].replace(",","."))),e$2b(i[3])&&(t.day=7*Number(i[3].replace(",","."))),e$2b(i[4])&&(t.day+=Number(i[4].replace(",","."))),e$2b(i[5])&&(t.hour=Number(i[5].replace(",","."))),e$2b(i[6])&&(t.minute=Number(i[6].replace(",","."))),e$2b(i[7])){var n=Number(i[7].replace(",","."));t.second=Math.floor(n),t.millisecond=n%1*1e3}}else"Z"!==e[e.length-1]&&(e+="Z"),a$15.toGregorianDate(a$15.fromIso8601(e,k$w),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var w$y=new d$1r;function n$t(e){e=u$_(e,u$_.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=u$_(e.epoch,o$H.MINIMUM_VALUE),this.tolerance=u$_(e.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}function p$D(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}function B$z(e,t){this.rectangle=e,this.maxLevel=t}function l$J(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url))throw new t$16("options.url is required.");var t=t$11.createIfNeeded(e.url);this._resource=t,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer(),this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:16777215};var i=e.credit;"string"==typeof i&&(i=new r$T(i)),this._credit=i,this._tilingScheme=void 0,this._rectangles=[];var n,r=this,o=u$_(e.ellipsoid,t$13.WGS84);function a(e){var t=e.getElementsByTagName("SRS")[0].textContent;if("EPSG:4326"===t){r._tilingScheme=new g$13({ellipsoid:o});var i=e.getElementsByTagName("TileFormat")[0];r._heightmapWidth=parseInt(i.getAttribute("width"),10),r._heightmapHeight=parseInt(i.getAttribute("height"),10),r._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,Math.min(r._heightmapWidth,r._heightmapHeight),r._tilingScheme.getNumberOfXTilesAtLevel(0));for(var n=e.getElementsByTagName("DataExtent"),a=0;a<n.length;++a){var l=n[a],u=e$2a.toRadians(parseFloat(l.getAttribute("minx"))),c=e$2a.toRadians(parseFloat(l.getAttribute("miny"))),h=e$2a.toRadians(parseFloat(l.getAttribute("maxx"))),d=e$2a.toRadians(parseFloat(l.getAttribute("maxy"))),f=parseInt(l.getAttribute("maxlevel"),10);r._rectangles.push(new B$z(new h$18(u,c,h,d),f))}r._ready=!0,r._readyPromise.resolve(!0)}else s("SRS "+t+" is not supported.")}function s(e){var t=u$_(e,"An error occurred while accessing "+r._resource.url+".");n=l$W.handleError(n,r,r._errorEvent,t,void 0,void 0,void 0,l)}function l(){o$1l(r._resource.fetchXML(),a,s)}l()}c$z.fromIso8601=function(e,t){if(!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.iso8601))throw new t$16("options.iso8601 is required.");var i=e.iso8601.split("/"),n=a$15.fromIso8601(i[0]),r=a$15.fromIso8601(i[1]),o=[];if(A$K(i[2],w$y)){var a=a$15.clone(n);for(o.push(a);a$15.compare(a,r)<0;){a=_$y(a,w$y),a$15.compare(r,a)<=0&&a$15.clone(r,a),o.push(a)}}else o.push(n,r);return c$z.fromJulianDateArray({julianDates:o,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},c$z.fromIso8601DateArray=function(e,t){if(!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.iso8601Dates))throw new t$16("options.iso8601Dates is required.");return c$z.fromJulianDateArray({julianDates:e.iso8601Dates.map((function(e){return a$15.fromIso8601(e)})),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},c$z.fromIso8601DurationArray=function(e,t){if(!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.epoch))throw new t$16("options.epoch is required.");if(!e$2b(e.iso8601Durations))throw new t$16("options.iso8601Durations is required.");for(var i,n,r=e.epoch,o=e.iso8601Durations,a=u$_(e.relativeToPrevious,!1),s=[],l=o.length,u=0;u<l;++u)(A$K(o[u],w$y)||0===u)&&(i=a&&e$2b(n)?_$y(n,w$y):_$y(r,w$y),s.push(i),n=i);return c$z.fromJulianDateArray({julianDates:s,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},Object.defineProperties(n$t.prototype,{clock:{get:function(){return this._clock},set:function(e){var t=this._clock;t!==e&&(e$2b(t)&&(this._clockSubscription(),this._clockSubscription=void 0),e$2b(e)&&(this._clockSubscription=e.onTick.addEventListener(n$t.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){var t=this._element;t!==e&&(e$2b(t)&&t.removeEventListener("seeked",this._seekFunction,!1),e$2b(e)&&(this._seeking=!1,this._seekFunction=p$D(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}}),n$t.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,i$10(this)},n$t.prototype.isDestroyed=function(){return!1},n$t.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate!==e.multiplier){var t=this._element;try{t.playbackRate=e.multiplier}catch{t.playbackRate=0}this._lastPlaybackRate=e.multiplier}},n$t.prototype._onTick=function(e){var t=this._element;if(e$2b(t)&&!(t.readyState<2)){var i=t.paused,n=e.shouldAnimate;if(n===i&&(n?t.play():t.pause()),this._seeking||this._firstTickAfterSeek)return void(this._firstTickAfterSeek=!1);this._trySetPlaybackRate(e);var r,o=e.currentTime,a=u$_(this.epoch,o$H.MINIMUM_VALUE),s=a$15.secondsDifference(o,a),l=t.duration,u=t.currentTime;t.loop?((s%=l)<0&&(s=l-s),r=s):r=s>l?l:s<0?0:s;var c=n?u$_(this.tolerance,1):.001;Math.abs(r-u)>c&&(this._seeking=!0,t.currentTime=r)}},Object.defineProperties(l$J.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$16("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),l$J.prototype.requestTileGeometry=function(e,t,i,n){if(!this.ready)throw new t$16("requestTileGeometry must not be called before ready returns true.");var r=this._tilingScheme.getNumberOfYTilesAtLevel(i),o=this._resource.getDerivedResource({url:i+"/"+e+"/"+(r-t-1)+".tif",queryParameters:{supermap3d:!0},request:n}).fetchImage({preferImageBitmap:!0});if(e$2b(o)){var a=this;return o$1l(o).then((function(n){return new T$J({buffer:d$13(n),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:W$F(a,e,t,i),structure:a._terrainDataStructure})}))}},l$J.prototype.getLevelMaximumGeometricError=function(e){if(!this.ready)throw new t$16("requestTileGeometry must not be called before ready returns true.");return this._levelZeroMaximumGeometricError/(1<<e)};var S$y=new h$18;function W$F(e,t,i,n){for(var r=e._tilingScheme,o=e._rectangles,a=r.tileXYToRectangle(t,i,n),s=0,l=0;l<o.length&&15!==s;++l){var u=o[l];if(!(u.maxLevel<=n)){var c=u.rectangle;e$2b(h$18.intersection(c,a,S$y))&&(y$z(r,c,2*t,2*i,n+1)&&(s|=4),y$z(r,c,2*t+1,2*i,n+1)&&(s|=8),y$z(r,c,2*t,2*i+1,n+1)&&(s|=1),y$z(r,c,2*t+1,2*i+1,n+1)&&(s|=2))}}return s}function y$z(e,t,i,n,r){var o=e.tileXYToRectangle(i,n,r);return e$2b(h$18.intersection(o,t,S$y))}l$J.prototype.getTileDataAvailable=function(e,t,i){},l$J.prototype.loadTileDataAvailability=function(e,t,i){};var _$x={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},VulkanConstants=Object.freeze(_$x),D$C={};function x$I(e,t){return e$2a.equalsEpsilon(e.latitude,t.latitude,e$2a.EPSILON10)&&e$2a.equalsEpsilon(e.longitude,t.longitude,e$2a.EPSILON10)}var M$F=new a$18,R$x=new a$18;function U$B(e,t,i,n){var r=(t=D$11(t,o$1p.equalsEpsilon)).length;if(!(r<2)){var o=e$2b(n),a=e$2b(i),s=!0,l=new Array(r),u=new Array(r),c=new Array(r),h=t[0];l[0]=h;var d=e.cartesianToCartographic(h,M$F);a&&(d.height=i[0]),s=s&&0==d.height,u[0]=d.height,c[0]=o?n[0]:0;for(var f=1,p=1;p<r;++p){var _=t[p],m=e.cartesianToCartographic(_,R$x);a&&(m.height=i[p]),s=s&&0==m.height,x$I(d,m)?d.height<m.height&&(u[f-1]=m.height):(l[f]=_,u[f]=m.height,c[f]=o?n[p]:0,a$18.clone(m,d),++f)}if(!(s||f<2))return l.length=f,u.length=f,c.length=f,{positions:l,topHeights:u,bottomHeights:c}}}var z$z=new Array(2),G$F=new Array(2),W$E={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};function O$v(e,t){for(var i=new Array(e.length),n=0;n<e.length;n+=3){var r=new o$1p(e[n],e[n+1],e[n+2]);p$1d.multiplyByPoint(t,r,r),i[n]=r.x,i[n+1]=r.y,i[n+2]=r.z}return i}D$C.computePositions=function(e,t,i,n,r,o,a){var s=U$B(e,t,i,n);if(e$2b(s)){var l=m$17.eastNorthUpToFixedFrame(s.positions[0],e,new p$1d),u=p$1d.inverse(l,new p$1d);t=s.positions,i=s.topHeights,n=s.bottomHeights;var c,h,d,f,p=t.length,_=p-2,m=e$2a.chordLength(r,e.maximumRadius),g=W$E;if(g.minDistance=m,g.ellipsoid=e,o){var x,v=0;for(x=0;x<p-1;x++)v+=m$V.numberOfPoints(t[x],t[x+1],m)+1;c=new Float64Array(3*v),h=new Float64Array(3*v),e$2b(a)&&(d=new Float64Array(3*v),f=new Float64Array(3*v));var y=z$z,$=G$F;g.positions=y,g.height=$;var b=0;for(x=0;x<p-1;x++){y[0]=t[x],y[1]=t[x+1],$[0]=i[x],$[1]=i[x+1];var T=m$V.generateArc(g);c.set(T,b),e$2b(a)&&d.set(O$v(T,u),b),$[0]=n[x],$[1]=n[x+1],h.set(m$V.generateArc(g),b),e$2b(a)&&f.set(O$v(m$V.generateArc(g),u),b),b+=T.length}}else g.positions=t,g.height=i,c=new Float64Array(m$V.generateArc(g)),e$2b(a)&&(d=new Float64Array(O$v(m$V.generateArc(g)))),g.height=n,h=new Float64Array(m$V.generateArc(g)),e$2b(a)&&(f=new Float64Array(O$v(m$V.generateArc(g))));var C={pos:{bottomPositions:h,topPositions:c,numCorners:_}};return e$2b(a)&&(C.localPos={bottomPositions:f,topPositions:d,numCorners:_}),C}};var $$B=new o$1p,U$A=new o$1p,re$t=new o$1p,ye$e=new o$1p,ne$u=new o$1p,be$k=new o$1p,Fe$e=new o$1p,Ce$d=new o$1p;function E$F(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,i=e.maximumHeights,n=e.minimumHeights;if(!e$2b(t))throw new t$16("options.positions is required.");if(e$2b(i)&&i.length!==t.length)throw new t$16("options.positions and options.maximumHeights must have the same length.");if(e$2b(n)&&n.length!==t.length)throw new t$16("options.positions and options.minimumHeights must have the same length.");var r=u$_(e.vertexFormat,n$11.DEFAULT),o=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),a=u$_(e.ellipsoid,t$13.WGS84);this._positions=t,this._minimumHeights=n,this._maximumHeights=i,this._vertexFormat=n$11.clone(r),this._granularity=o,this._ellipsoid=t$13.clone(a),this._enuCenter=e.enuCenter,this._workerName="createWallGeometry";var s=1+t.length*o$1p.packedLength+2;e$2b(n)&&(s+=n.length),e$2b(i)&&(s+=i.length),this.packedLength=s+t$13.packedLength+n$11.packedLength+1,this.packedLength+=o$1p.packedLength}E$F.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");i=u$_(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._minimumHeights;if(o=e$2b(a)?a.length:0,t[i++]=o,e$2b(a))for(n=0;n<o;++n)t[i++]=a[n];var s=e._maximumHeights;if(o=e$2b(s)?s.length:0,t[i++]=o,e$2b(s))for(n=0;n<o;++n)t[i++]=s[n];return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._granularity,e$2b(e._enuCenter)?o$1p.pack(e._enuCenter,t,i):o$1p.pack(o$1p.ZERO,t,i),t};var ae$k=t$13.clone(t$13.UNIT_SPHERE),oe$k=new n$11,N$v={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:ae$k,vertexFormat:oe$k,granularity:void 0,enuCenter:void 0};E$F.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n,r,o,a=e[t++],s=new Array(a);for(n=0;n<a;++n,t+=o$1p.packedLength)s[n]=o$1p.unpack(e,t);if((a=e[t++])>0)for(r=new Array(a),n=0;n<a;++n)r[n]=e[t++];if((a=e[t++])>0)for(o=new Array(a),n=0;n<a;++n)o[n]=e[t++];var l=t$13.unpack(e,t,ae$k);t+=t$13.packedLength;var u=n$11.unpack(e,t,oe$k);t+=n$11.packedLength;var c=e[t++],h=o$1p.unpack(e,t);return o$1p.equals(h,o$1p.ZERO)&&(h=void 0),e$2b(i)?(i._positions=s,i._minimumHeights=r,i._maximumHeights=o,i._ellipsoid=t$13.clone(l,i._ellipsoid),i._vertexFormat=n$11.clone(u,i._vertexFormat),i._granularity=c,i._enuCenter=h,i):(N$v.positions=s,N$v.minimumHeights=r,N$v.maximumHeights=o,N$v.granularity=c,N$v.enuCenter=h,new E$F(N$v))},E$F.fromConstantHeights=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions;if(!e$2b(t))throw new t$16("options.positions is required.");var i,n,r=e.minimumHeight,o=e.maximumHeight,a=e$2b(r),s=e$2b(o);if(a||s){var l=t.length;i=a?new Array(l):void 0,n=s?new Array(l):void 0;for(var u=0;u<l;++u)a&&(i[u]=r),s&&(n[u]=o)}return new E$F({positions:t,maximumHeights:n,minimumHeights:i,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat})},E$F.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,n=e._maximumHeights,r=e._vertexFormat,o=e._granularity,a=e._ellipsoid,s=e._enuCenter,l=D$C.computePositions(a,t,n,i,o,!0,s);if(e$2b(l.pos)){var u;e$2b(s)&&(u=m$17.eastNorthUpToFixedFrame(s));var c,h=l.pos.bottomPositions,d=l.pos.topPositions,f=l.pos.numCorners,p=d.length,_=2*p,m=r.position?new Float64Array(_):void 0,g=r.normal?new Float32Array(_):void 0,x=r.tangent?new Float32Array(_):void 0,v=r.bitangent?new Float32Array(_):void 0,y=r.st?new Float32Array(_/3*2):void 0,$=0,b=0,T=0,C=0,S=0,w=Ce$d,E=Fe$e,P=be$k,A=!0,L=0,M=1/((p/=3)-t.length+1);for(c=0;c<p;++c){var R=3*c,I=o$1p.fromArray(d,R,$$B),O=o$1p.fromArray(h,R,U$A);if(r.position&&(m[$++]=O.x,m[$++]=O.y,m[$++]=O.z,m[$++]=I.x,m[$++]=I.y,m[$++]=I.z),r.st&&(y[S++]=L,y[S++]=0,y[S++]=L,y[S++]=1),r.normal||r.tangent||r.bitangent){var D,B=o$1p.clone(o$1p.ZERO,ne$u),N=a.scaleToGeodeticSurface(o$1p.fromArray(d,R,U$A),U$A);if(c+1<p&&(D=a.scaleToGeodeticSurface(o$1p.fromArray(d,R+3,re$t),re$t),B=o$1p.fromArray(d,R+3,ne$u)),A){var F=o$1p.subtract(B,I,ye$e),U=o$1p.subtract(N,I,$$B);w=o$1p.normalize(o$1p.cross(U,F,w),w),A=!1}o$1p.equalsEpsilon(D,N,e$2a.EPSILON10)?A=!0:(L+=M,r.tangent&&(E=o$1p.normalize(o$1p.subtract(D,N,E),E)),r.bitangent&&(P=o$1p.normalize(o$1p.cross(w,E,P),P))),r.normal&&(e$2b(s)&&(p$1d.multiplyByPoint(u,w,w),o$1p.normalize(w,w)),g[b++]=w.x,g[b++]=w.y,g[b++]=w.z,g[b++]=w.x,g[b++]=w.y,g[b++]=w.z),r.tangent&&(x[C++]=E.x,x[C++]=E.y,x[C++]=E.z,x[C++]=E.x,x[C++]=E.y,x[C++]=E.z),r.bitangent&&(v[T++]=P.x,v[T++]=P.y,v[T++]=P.z,v[T++]=P.x,v[T++]=P.y,v[T++]=P.z)}}var z=new a$_;r.position&&(z.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:m})),r.normal&&(z.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:g})),r.tangent&&(z.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:x})),r.bitangent&&(z.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:v})),r.st&&(z.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:y}));var G=_/3;_-=6*(f+1);var V=ce$x.createTypedArray(G,_),k=0;for(c=0;c<G-2;c+=2){var W=c,H=c+2,q=o$1p.fromArray(m,3*W,$$B),j=o$1p.fromArray(m,3*H,U$A);if(!o$1p.equalsEpsilon(q,j,e$2a.EPSILON10)){var Y=c+1,X=c+3;V[k++]=Y,V[k++]=W,V[k++]=X,V[k++]=X,V[k++]=W,V[k++]=H}}var K=new I$1p({attributes:z,indices:V,primitiveType:W$18.TRIANGLES,boundingSphere:new i$1c.fromVertices(m)});return e$2b(e._enuCenter)&&(K.attributes.position.values.set(l.localPos.topPositions,0),K.attributes.position.values.set(l.localPos.bottomPositions,K.attributes.position.values.length/2),K.attributes.position.componentDatatype=S$12.FLOAT),K}};var S$x=new o$1p,q$D=new o$1p;function w$x(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,i=e.maximumHeights,n=e.minimumHeights;if(!e$2b(t))throw new t$16("options.positions is required.");if(e$2b(i)&&i.length!==t.length)throw new t$16("options.positions and options.maximumHeights must have the same length.");if(e$2b(n)&&n.length!==t.length)throw new t$16("options.positions and options.minimumHeights must have the same length.");var r=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),o=u$_(e.ellipsoid,t$13.WGS84);this._positions=t,this._minimumHeights=n,this._maximumHeights=i,this._granularity=r,this._ellipsoid=t$13.clone(o),this._workerName="createWallOutlineGeometry";var a=1+t.length*o$1p.packedLength+2;e$2b(n)&&(a+=n.length),e$2b(i)&&(a+=i.length),this.packedLength=a+t$13.packedLength+1}w$x.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");i=u$_(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._minimumHeights;if(o=e$2b(a)?a.length:0,t[i++]=o,e$2b(a))for(n=0;n<o;++n)t[i++]=a[n];var s=e._maximumHeights;if(o=e$2b(s)?s.length:0,t[i++]=o,e$2b(s))for(n=0;n<o;++n)t[i++]=s[n];return t$13.pack(e._ellipsoid,t,i),t[i+=t$13.packedLength]=e._granularity,t};var G$E=t$13.clone(t$13.UNIT_SPHERE),A$J={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:G$E,granularity:void 0};function t$x(e){switch(e){case de$x.FLOAT:return"float";case de$x.FLOAT_VEC2:return"vec2";case de$x.FLOAT_VEC3:return"vec3";case de$x.FLOAT_VEC4:return"vec4";case de$x.FLOAT_MAT2:return"mat2";case de$x.FLOAT_MAT3:return"mat3";case de$x.FLOAT_MAT4:return"mat4";case de$x.SAMPLER_2D:return"sampler2D";case de$x.BOOL:return"bool"}}w$x.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n,r,o,a=e[t++],s=new Array(a);for(n=0;n<a;++n,t+=o$1p.packedLength)s[n]=o$1p.unpack(e,t);if((a=e[t++])>0)for(r=new Array(a),n=0;n<a;++n)r[n]=e[t++];if((a=e[t++])>0)for(o=new Array(a),n=0;n<a;++n)o[n]=e[t++];var l=t$13.unpack(e,t,G$E),u=e[t+=t$13.packedLength];return e$2b(i)?(i._positions=s,i._minimumHeights=r,i._maximumHeights=o,i._ellipsoid=t$13.clone(l,i._ellipsoid),i._granularity=u,i):(A$J.positions=s,A$J.minimumHeights=r,A$J.maximumHeights=o,A$J.granularity=u,new w$x(A$J))},w$x.fromConstantHeights=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions;if(!e$2b(t))throw new t$16("options.positions is required.");var i,n,r=e.minimumHeight,o=e.maximumHeight,a=e$2b(r),s=e$2b(o);if(a||s){var l=t.length;i=a?new Array(l):void 0,n=s?new Array(l):void 0;for(var u=0;u<l;++u)a&&(i[u]=r),s&&(n[u]=o)}return new w$x({positions:t,maximumHeights:n,minimumHeights:i,ellipsoid:e.ellipsoid})},w$x.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,n=e._maximumHeights,r=e._granularity,o=e._ellipsoid,a=D$C.computePositions(o,t,n,i,r,!1);if(e$2b(a)){var s,l=a.pos.bottomPositions,u=a.pos.topPositions,c=u.length,h=2*c,d=new Float64Array(h),f=0;for(c/=3,s=0;s<c;++s){var p=3*s,_=o$1p.fromArray(u,p,S$x),m=o$1p.fromArray(l,p,q$D);d[f++]=m.x,d[f++]=m.y,d[f++]=m.z,d[f++]=_.x,d[f++]=_.y,d[f++]=_.z}var g=new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:d})}),x=h/3;h=2*x-4+x;var v=ce$x.createTypedArray(x,h),y=0;for(s=0;s<x-2;s+=2){var $=s,b=s+2,T=o$1p.fromArray(d,3*$,S$x),C=o$1p.fromArray(d,3*b,q$D);if(!o$1p.equalsEpsilon(T,C,e$2a.EPSILON10)){var S=s+1,w=s+3;v[y++]=S,v[y++]=$,v[y++]=S,v[y++]=w,v[y++]=$,v[y++]=b}}return v[y++]=x-2,v[y++]=x-1,new I$1p({attributes:g,indices:v,primitiveType:W$18.LINES,boundingSphere:new i$1c.fromVertices(d)})}};var u$D={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3};function l$I(e,t,i){this._url=e,this._maximumActiveTasks=u$_(i.maximumActiveTasks,100),this._activeTasks=0,this._deferreds={},this._nextID=0,this._event=t,this._enableHeartCheck=u$_(i.enableHeartCheck,!1),this._heartTimeOut=u$_(i.heartTimeOut,1e4),this._createWS(t)}function x$H(e,t){if(t instanceof ArrayBuffer){--e._activeTasks;var i=new DataView(t).getInt32(0,!0);if(!e$2b(i))return;var n=e._deferreds,r=n[i];if(e$2b(r)){if("blob"===r.binaryType)4===t.byteLength?r.reject(404):r.resolve(new Blob([t.slice(4,t.byteLength)]));else if("arraybuffer"===r.binaryType)if(4===t.byteLength)r.reject(404);else{var o=t.slice(4,t.byteLength);r.extratiles?r.progress(o):r.resolve(o)}else{t=t.slice(4,t.byteLength);var a=a$K(new Uint8Array(t));if("json"===r.binaryType){var s=JSON.parse(a);r.resolve(s)}else r.resolve(a)}!0!==r.extratiles&&delete n[i]}}}function m$C(e,t,i,n){var r;return-1!==t.indexOf("extratiles=")?(n.extratiles=!0,r={id:e,binaryType:u$_(i,"blob"),tileName:t.substring(0,t.indexOf("?")),extraTiles:t.substring(t.indexOf("extratiles=")+11)}):(n.extratiles=!1,r={id:e,binaryType:u$_(i,"blob"),tileName:t}),JSON.stringify(r)}function r$D(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).weights,i=e.times;if(o$1q.defined("weights",t),o$1q.defined("times",i),o$1q.typeOf.number.greaterThanOrEquals("weights.length",t.length,3),t.length%i.length!=0)throw new t$16("times.length must be a factor of weights.length.");this._times=i,this._weights=t,this._count=t.length/i.length,this._lastTimeIndex=0}function e$O(e,t,i){if("function"!=typeof t)throw new t$16("oldFunction is required to be a function.");if("function"!=typeof i)throw new t$16("oldFunction is required to be a function.");return function(){i.apply(e,arguments),t.apply(e,arguments)}}l$I.prototype.scheduleTask=function(e,t){var i=this;if(!this.isOpened()){var n=o$1l.defer();return this._event.addEventListener((function(r){if(r===u$D.OPEN){++i._activeTasks;var o=i,a=o._nextID++;o._deferreds[a]=n,n.binaryType=t;var s=m$C(a,e,t,n);o._ws.send(s)}})),n.promise}if(!(this._activeTasks>=this._maximumActiveTasks)){++this._activeTasks;var r=this,o=r._nextID++;n=o$1l.defer();r._deferreds[o]=n,n.binaryType=t;var a=m$C(o,e,t,n);return r._ws.send(a),n.promise}},l$I.prototype._createWS=function(e){this._ws=new WebSocket(this._url),this._ws.binaryType="arraybuffer";var t=this;this._ws.onopen=function(){e.raiseEvent(u$D.OPEN)},this._ws.onclose=function(){e.raiseEvent(u$D.CLOSED)},this._ws.onerror=function(){error=new t$14("open failure"),e.raiseEvent(error)},this._ws.onmessage=function(e){x$H(t,e.data)}},l$I.prototype.isOpened=function(){return this._ws&&this._ws.readyState===u$D.OPEN},l$I.prototype.close=function(){this._ws.close()},Object.defineProperties(r$D.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}}),r$D.prototype.findTimeInterval=n$G.prototype.findTimeInterval,r$D.prototype.wrapTime=n$G.prototype.wrapTime,r$D.prototype.clampTime=n$G.prototype.clampTime,r$D.prototype.evaluate=function(e,t){var i=this.weights,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);e$2b(t)||(t=new Array(this._count));for(var a=0;a<this._count;a++){var s=r*this._count+a;t[a]=i[s]*(1-o)+i[s+this._count]*o}return t};var e$N={DONE:0,PENDING:1,FAILED:2},R$w=Object.freeze(e$N),U$z=e$1U.WHITE,z$y=o$1p.ZERO,A$I=k$P.NONE,I$L=o$1o.ZERO,P$z=1,q$C=0,H$G=o$1p.ZERO,T$C=j$T.CENTER,L$K=S$O.CENTER,M$E=!1,Z$z=new o$1p,F$G=new e$1U,j$A=new o$1p,W$D=new o$1o,k$v=new o$Y,J$x=new o$Y,K$z=new o$Y,Q$z=new f$18,X$v=new r$Y;function C$D(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function g$I(e,t){if(!e$2b(e))throw new t$16("entityCluster is required.");if(!e$2b(t))throw new t$16("entityCollection is required.");t.collectionChanged.addEventListener(g$I.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1N,this._onCollectionChanged(t,t.values,[],[])}function p$C(e,t,i){e$2b(e)&&(e.billboard=void 0,i.removeBillboard(t))}g$I.prototype.update=function(e){if(!e$2b(e))throw new t$16("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a,s=t[n],l=s.entity,u=l._billboard,c=s.billboard,h=l.isShowing&&l.isAvailable(e)&&r$Z.getValueOrDefault(u._show,e,!0);if(h&&(a=r$Z.getValueOrUndefined(l._position,e,Z$z),o=r$Z.getValueOrUndefined(u._image,e),h=e$2b(a)&&e$2b(o)),h){r$Z.isConstant(l._position)||(i._clusterDirty=!0),e$2b(c)||((c=i.getBillboard(l)).id=l,c.image=void 0,s.billboard=c),c.show=h,(!e$2b(c.image)||s.textureValue!==o)&&(c.image=o,s.textureValue=o),c.position=a,c.color=r$Z.getValueOrDefault(u._color,e,U$z,F$G),c.eyeOffset=r$Z.getValueOrDefault(u._eyeOffset,e,z$y,j$A),c.heightReference=r$Z.getValueOrDefault(u._heightReference,e,A$I),c.pixelOffset=r$Z.getValueOrDefault(u._pixelOffset,e,I$L,W$D),c.scale=r$Z.getValueOrDefault(u._scale,e,P$z),c.rotation=r$Z.getValueOrDefault(u._rotation,e,q$C),c.alignedAxis=r$Z.getValueOrDefault(u._alignedAxis,e,H$G),c.horizontalOrigin=r$Z.getValueOrDefault(u._horizontalOrigin,e,T$C),c.verticalOrigin=r$Z.getValueOrDefault(u._verticalOrigin,e,L$K),c.width=r$Z.getValueOrUndefined(u._width,e),c.height=r$Z.getValueOrUndefined(u._height,e),c.scaleByDistance=r$Z.getValueOrUndefined(u._scaleByDistance,e,k$v),c.translucencyByDistance=r$Z.getValueOrUndefined(u._translucencyByDistance,e,J$x),c.pixelOffsetScaleByDistance=r$Z.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,K$z),c.sizeInMeters=r$Z.getValueOrDefault(u._sizeInMeters,e,M$E),c.distanceDisplayCondition=r$Z.getValueOrUndefined(u._distanceDisplayCondition,e,X$v),c.disableDepthTestDistance=r$Z.getValueOrUndefined(u._disableDepthTestDistance,e);var d=r$Z.getValueOrUndefined(u._imageSubRegion,e,Q$z);e$2b(d)&&c.setImageSubRegion(c._imageId,d)}else p$C(s,l,i)}return!0},g$I.prototype.getBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("entity is required.");if(!e$2b(t))throw new t$16("result is required.");var i=this._items.get(e.id);if(!e$2b(i)||!e$2b(i.billboard))return R$w.FAILED;var n=i.billboard;if(n.heightReference===k$P.NONE)t.center=o$1p.clone(n.position,t.center);else{if(!e$2b(n._clampedPosition))return R$w.PENDING;t.center=o$1p.clone(n._clampedPosition,t.center)}return t.radius=0,R$w.DONE},g$I.prototype.isDestroyed=function(){return!1},g$I.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(g$I.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return i$10(this)},g$I.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)e$2b((o=t[r])._billboard)&&e$2b(o._position)&&a.set(o.id,new C$D(o));for(r=n.length-1;r>-1;r--)e$2b((o=n[r])._billboard)&&e$2b(o._position)?a.contains(o.id)||a.set(o.id,new C$D(o)):(p$C(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],p$C(a.get(o.id),o,s),a.remove(o.id)};var f$H="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = tangentToEyeMatrix;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",d$Q="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec3 tangent;\nattribute vec3 bitangent;\nattribute vec2 st;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_tangentEC = czm_normal * tangent; // tangent in eye coordinates\n v_bitangentEC = czm_normal * bitangent; // bitangent in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",i$G="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",l$H="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",m$B="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",h$F="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",_$w="attribute vec3 position;\nattribute vec3 normal;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = vec4(position, 1.0);\n\n v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n\n gl_Position = czm_modelViewProjection * p;\n}\n",g$H="attribute vec3 position;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = vec4(position, 1.0);\n\n v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjection * p;\n}\n";function t$w(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.translucent,!0),i=u$_(e.closed,!1),n=u$_(e.materialSupport,t$w.MaterialSupport.TEXTURED);this.material=e$2b(e.material)?e.material:r$X.fromType(r$X.ColorType),this.translucent=t,this._vertexShaderSource=u$_(e.vertexShaderSource,n.vertexShaderSource),this._fragmentShaderSource=u$_(e.fragmentShaderSource,n.fragmentShaderSource),this._renderState=a$S.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._materialSupport=n,this._vertexFormat=n.vertexFormat,this._flat=u$_(e.flat,!1),this._faceForward=u$_(e.faceForward,!i)}function r$C(){t$16.throwInstantiationError()}function a$C(e,t,i){o$1q.defined("geometryUpdater",e),o$1q.defined("primitives",t),o$1q.defined("orderedGroundPrimitives",i),this._primitives=t,this._orderedGroundPrimitives=i,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}Object.defineProperties(t$w.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),t$w.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,t$w.prototype.isTranslucent=a$S.prototype.isTranslucent,t$w.prototype.getRenderState=a$S.prototype.getRenderState,t$w.MaterialSupport={BASIC:Object.freeze({vertexFormat:n$11.POSITION_AND_NORMAL,vertexShaderSource:l$H,fragmentShaderSource:i$G}),BASICMODEL:Object.freeze({vertexFormat:n$11.POSITION_AND_NORMAL,vertexShaderSource:_$w,fragmentShaderSource:i$G}),TEXTURED:Object.freeze({vertexFormat:n$11.POSITION_NORMAL_AND_ST,vertexShaderSource:h$F,fragmentShaderSource:m$B}),TEXTUREDMODEL:Object.freeze({vertexFormat:n$11.POSITION_NORMAL_AND_ST,vertexShaderSource:g$H,fragmentShaderSource:m$B}),ALL:Object.freeze({vertexFormat:n$11.ALL,vertexShaderSource:d$Q,fragmentShaderSource:f$H})},Object.defineProperties(r$C.prototype,{isConstant:{get:t$16.throwInstantiationError},definitionChanged:{get:t$16.throwInstantiationError}}),r$C.prototype.getType=t$16.throwInstantiationError,r$C.prototype.getValue=t$16.throwInstantiationError,r$C.prototype.equals=t$16.throwInstantiationError,r$C.getValue=function(e,t,i){var n;return e$2b(t)&&e$2b(n=t.getType(e))?((!e$2b(i)||i.type!==n)&&(i=r$X.fromType(n)),t.getValue(e,i.uniforms),i):((!e$2b(i)||i.type!==r$X.ColorType)&&(i=r$X.fromType(r$X.ColorType)),e$1U.clone(e$1U.WHITE,i.uniforms.color),i)},a$C.prototype._isHidden=function(e,t,i){return!e.isShowing||!e.isAvailable(i)||!r$Z.getValueOrDefault(t.show,i,!0)},a$C.prototype._setOptions=t$16.throwInstantiationError,a$C.prototype.update=function(e){o$1q.defined("time",e);var t=this._geometryUpdater,i=t._onTerrain,n=this._primitives,r=this._orderedGroundPrimitives;r.remove(this._primitive),n.removeAndDestroy(this._primitive),n.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0,this._primitive=void 0;var o=this._entity,a=o[this._geometryUpdater._geometryPropertyName];if(this._setOptions(o,a,e),!this._isHidden(o,a,e)){var s=this._geometryUpdater.shadowsProperty.getValue(e),l=this._options;if(!e$2b(a.fill)||a.fill.getValue(e)){var u,c=t.fillMaterialProperty,h=c instanceof t$Q,d=t._getIsClosed(l);if(h)u=new t$R({closed:d,flat:i&&!t._supportsMaterialsforEntitiesOnTerrain});else{var f=r$C.getValue(e,c,this._material);this._material=f,u=new t$w({material:f,translucent:f.isTranslucent(),closed:d})}if(i)l.vertexFormat=t$R.VERTEX_FORMAT,this._primitive=r.add(new d$14({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:u,asynchronous:!1,shadows:s,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),r$Z.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{l.vertexFormat=u.vertexFormat;var p=this._geometryUpdater.createFillGeometryInstance(e);h&&(u.translucent=255!==p.attributes.color.value[3]),this._primitive=n.add(new y$S({geometryInstances:p,appearance:u,asynchronous:!1,shadows:s}))}}if(!i&&e$2b(a.outline)&&a.outline.getValue(e)){var _=this._geometryUpdater.createOutlineGeometryInstance(e),m=r$Z.getValueOrDefault(a.outlineWidth,e,1);this._outlinePrimitive=n.add(new y$S({geometryInstances:_,appearance:new t$R({flat:!0,translucent:255!==_.attributes.color.value[3],renderState:{lineWidth:t._scene.clampLineWidth(m)}}),asynchronous:!1,shadows:s}))}}},a$C.prototype.getBoundingSphere=function(e){if(!e$2b(e))throw new t$16("result is required.");var t,i=this._entity,n=this._primitive,r=this._outlinePrimitive;return e$2b(n)&&n.show&&n.ready&&(e$2b(t=n.getGeometryInstanceAttributes(i))&&e$2b(t.boundingSphere))||e$2b(r)&&r.show&&r.ready&&(e$2b(t=r.getGeometryInstanceAttributes(i))&&e$2b(t.boundingSphere))?(i$1c.clone(t.boundingSphere,e),R$w.DONE):e$2b(n)&&!n.ready||e$2b(r)&&!r.ready?R$w.PENDING:R$w.FAILED},a$C.prototype.isDestroyed=function(){return!1},a$C.prototype.destroy=function(){var e=this._primitives;this._orderedGroundPrimitives.remove(this._primitive),e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),i$10(this)};var M$D=new t$Q(e$1U.WHITE),D$B=new e$1I(!0),V$t=new e$1I(!0),N$u=new e$1I(!1),U$y=new e$1I(e$1U.BLACK),A$H=new e$1I(W$W.DISABLED),L$J=new e$1I(new r$Y),S$w=new e$1I(_0x3b5200.BOTH);function i$F(e){o$1q.defined("options.entity",e.entity),o$1q.defined("options.scene",e.scene),o$1q.defined("options.geometryOptions",e.geometryOptions),o$1q.defined("options.geometryPropertyName",e.geometryPropertyName),o$1q.defined("options.observedPropertyNames",e.observedPropertyNames);var t=e.entity,i=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new o$1h,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=i,this._id=i+"-"+t.id,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=h$V.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(i$F.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!e$2b(this._entity.availability)&&r$Z.isConstant(this._showProperty)&&r$Z.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!e$2b(this._entity.availability)&&r$Z.isConstant(this._showProperty)&&r$Z.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),i$F.prototype.isOutlineVisible=function(e){var t=this._entity;return u$_(this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e),!1)},i$F.prototype.isFilled=function(e){var t=this._entity;return u$_(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e),!1)},i$F.prototype.createFillGeometryInstance=t$16.throwInstantiationError,i$F.prototype.createOutlineGeometryInstance=t$16.throwInstantiationError,i$F.prototype.isDestroyed=function(){return!1},i$F.prototype.destroy=function(){i$10(this)},i$F.prototype._isHidden=function(e,t){var i=t.show;return e$2b(i)&&i.isConstant&&!i.getValue(o$H.MINIMUM_VALUE)},i$F.prototype._isOnTerrain=function(e,t){return!1},i$F.prototype._getIsClosed=function(e){return!0},i$F.prototype._isDynamic=t$16.throwInstantiationError,i$F.prototype._setStaticOptions=t$16.throwInstantiationError,i$F.prototype._onEntityPropertyChanged=function(e,t,i,n){if(-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(!e$2b(r))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var o=r.fill,a=!e$2b(o)||!o.isConstant||o.getValue(o$H.MINIMUM_VALUE),s=r.outline,l=e$2b(s);if(l&&s.isConstant&&(l=s.getValue(o$H.MINIMUM_VALUE)),!a&&!l)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var u=r.show;if(this._isHidden(e,r))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));this._materialProperty=u$_(r.material,M$D),this._fillProperty=u$_(o,V$t),this._showProperty=u$_(u,D$B),this._showOutlineProperty=u$_(r.outline,N$u),this._outlineColorProperty=l?u$_(r.outlineColor,U$y):void 0,this._shadowsProperty=u$_(r.shadows,A$H),this._distanceDisplayConditionProperty=u$_(r.distanceDisplayCondition,L$J),this._classificationTypeProperty=u$_(r.classificationType,S$w),this._fillEnabled=a;var c=this._isOnTerrain(e,r)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof t$Q);if(l&&c&&(e$1$(e$1$.geometryOutlines),l=!1),this._onTerrain=c,this._outlineEnabled=l,this._isDynamic(e,r))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,r),this._isClosed=this._getIsClosed(this._options);var h=r.outlineWidth;this._outlineWidth=e$2b(h)?h.getValue(o$H.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}}},i$F.prototype.createDynamicUpdater=function(e,t){if(o$1q.defined("primitives",e),o$1q.defined("groundPrimitives",t),!this._dynamic)throw new t$16("This instance does not represent dynamic geometry.");return new this.constructor.DynamicGeometryUpdater(this,e,t)};var m$A=new o$1p,H$F=new a$18;function h$E(e,t,i,n){o$1q.defined("scene",e),o$1q.defined("positionProperty",t),this._scene=e,this._heightReference=i,this._extrudedHeightReference=n,this._positionProperty=t,this._position=new o$1p,this._cartographicPosition=new a$18,this._normal=new o$1p,this._definitionChanged=new o$1h,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;var r=this;if(e$2b(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener((function(){r._updateClamping()})),this._removeModeListener=e.morphComplete.addEventListener((function(){r._updateClamping()}))),t.isConstant){var o=t.getValue(o$H.MINIMUM_VALUE,m$A);if(!e$2b(o)||o$1p.equals(o,o$1p.ZERO)||!e$2b(e.globe))return;this._position=o$1p.clone(o,this._position),this._updateClamping(),this._normal=e.globe.ellipsoid.geodeticSurfaceNormal(o,this._normal)}}function a$B(e,t,i,n){if(i$F.prototype._onEntityPropertyChanged.call(this,e,t,i,n),-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(e$2b(r)){e$2b(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);var o=r.heightReference;if(e$2b(o)){var a=new n$V(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new h$E(this._scene,a,o)}}}}Object.defineProperties(h$E.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),h$E.prototype._updateClamping=function(){e$2b(this._removeCallbackFunc)&&this._removeCallbackFunc();var e=this._scene,t=e.globe,i=this._position;if(e$2b(t)&&!o$1p.equals(i,o$1p.ZERO)){var n=t.ellipsoid,r=t._surface,o=this,a=n.cartesianToCartographic(i,this._cartographicPosition),s=t.getHeight(a);e$2b(s)?this._terrainHeight=s:this._terrainHeight=0,this._removeCallbackFunc=r.updateHeight(a,(function(t){if(e.mode===C$13.SCENE3D){var i=n.cartesianToCartographic(t,H$F);o._terrainHeight=i.height}else o._terrainHeight=t.x;o.definitionChanged.raiseEvent()}))}else this._terrainHeight=0},h$E.prototype.getValue=function(e,t){var i=r$Z.getValueOrDefault(this._heightReference,e,k$P.NONE),n=r$Z.getValueOrDefault(this._extrudedHeightReference,e,k$P.NONE);if(i===k$P.NONE&&n!==k$P.RELATIVE_TO_GROUND)return this._position=o$1p.clone(o$1p.ZERO,this._position),o$1p.clone(o$1p.ZERO,t);if(this._positionProperty.isConstant)return o$1p.multiplyByScalar(this._normal,this._terrainHeight,t);var r=this._scene,o=this._positionProperty.getValue(e,m$A);if(!e$2b(o)||o$1p.equals(o,o$1p.ZERO)||!e$2b(r.globe))return o$1p.clone(o$1p.ZERO,t);if(o$1p.equalsEpsilon(this._position,o,e$2a.EPSILON10))return o$1p.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=o$1p.clone(o,this._position),this._updateClamping();var a=r.globe.ellipsoid.geodeticSurfaceNormal(o,this._normal);return o$1p.multiplyByScalar(a,this._terrainHeight,t)},h$E.prototype.isDestroyed=function(){return!1},h$E.prototype.destroy=function(){return e$2b(this._removeEventListener)&&this._removeEventListener(),e$2b(this._removeModeListener)&&this._removeModeListener(),e$2b(this._removeCallbackFunc)&&this._removeCallbackFunc(),i$10(this)};var V$s=o$1p.ZERO,E$E=new o$1p,N$t=new o$1p,G$D=new e$1U;function H$E(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function i$E(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new H$E(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}function p$B(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(i$E.prototype=Object.create(i$F.prototype),i$E.prototype.constructor=i$E),Object.defineProperties(i$E.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),i$E.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:t$B.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,G$D)),e$2b(t)||(t=e$1U.WHITE),a.color=o$16.fromColor(t));return e$2b(this._options.offsetAttribute)&&(a.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,V$s,E$E))),new d$1o({id:i,geometry:O$y.fromDimensions(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:a})},i$E.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,G$D),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r),offset:void 0};return e$2b(this._options.offsetAttribute)&&(o.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,V$s,E$E))),new d$1o({id:t,geometry:o$17.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:o})},i$E.prototype._computeCenter=function(e,t){return r$Z.getValueOrUndefined(this._entity.position,e,t)},i$E.prototype._isHidden=function(e,t){return!e$2b(t.dimensions)||!e$2b(e.position)||i$F.prototype._isHidden.call(this,e,t)},i$E.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$Z.isConstant(e.orientation)&&t.dimensions.isConstant&&r$Z.isConstant(t.outlineWidth))},i$E.prototype._setStaticOptions=function(e,t){var i=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$Q?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,n.dimensions=t.dimensions.getValue(o$H.MINIMUM_VALUE,n.dimensions),n.offsetAttribute=i!==k$P.NONE?_0x58701d.ALL:void 0},i$E.prototype._onEntityPropertyChanged=a$B,i$E.DynamicGeometryUpdater=p$B,e$2b(Object.create)&&(p$B.prototype=Object.create(a$C.prototype),p$B.prototype.constructor=p$B),p$B.prototype._isHidden=function(e,t,i){var n=r$Z.getValueOrUndefined(e.position,i,N$t),r=this._options.dimensions;return!e$2b(n)||!e$2b(r)||a$C.prototype._isHidden.call(this,e,t,i)},p$B.prototype._setOptions=function(e,t,i){var n=r$Z.getValueOrDefault(t.heightReference,i,k$P.NONE),r=this._options;r.dimensions=r$Z.getValueOrUndefined(t.dimensions,i,r.dimensions),r.offsetAttribute=n!==k$P.NONE?_0x58701d.ALL:void 0};var a$A={X:0,Y:1,Z:2,Y_UP_TO_Z_UP:p$1d.fromRotationTranslation(p$1e.fromRotationX(e$2a.PI_OVER_TWO)),Z_UP_TO_Y_UP:p$1d.fromRotationTranslation(p$1e.fromRotationX(-e$2a.PI_OVER_TWO)),X_UP_TO_Z_UP:p$1d.fromRotationTranslation(p$1e.fromRotationY(-e$2a.PI_OVER_TWO)),Z_UP_TO_X_UP:p$1d.fromRotationTranslation(p$1e.fromRotationY(e$2a.PI_OVER_TWO)),X_UP_TO_Y_UP:p$1d.fromRotationTranslation(p$1e.fromRotationZ(e$2a.PI_OVER_TWO)),Y_UP_TO_X_UP:p$1d.fromRotationTranslation(p$1e.fromRotationZ(-e$2a.PI_OVER_TWO)),fromName:function(e){return o$1q.typeOf.string("name",e),a$A[e]}},v$y=Object.freeze(a$A),A$G={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"},Q$y=Object.freeze(A$G),e$M={HIGHLIGHT:0,REPLACE:1,MIX:2},L$I=Object.freeze(e$M),T$B={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},c$y={SCALAR:void 0,VEC2:o$1o,VEC3:o$1p,VEC4:e$29,MAT2:f$13,MAT3:p$1e,MAT4:p$1d};function M$C(e){var t,i=e.componentType;t="string"==typeof i?S$12.fromName(i):i;var n=T$B[e.type],r=c$y[e.type];return{componentsPerAttribute:n,classType:r,createArrayBufferView:function(e,i,r){return S$12.createArrayBufferView(t,e,i,n*r)}}}var I$K=e$1U.WHITE,X$u=!0;function h$D(e,t,i,n,r){var o;this.featuresLength=t,this._translucentFeaturesLength=0,e$2b(i)&&(o=i.extensions),this._extensions=u$_(o,{});var a,s,l=_e$i(i);if(this._properties=l,this._batchTableHierarchy=me$j(this,i,n),this._batchTableBinaryProperties=V$r(t,l,n),this._showAlphaProperties=void 0,this._batchValues=void 0,this._batchValuesDirty=!1,this._batchTexture=void 0,this._defaultTexture=void 0,this._pickTexture=void 0,this._pickIds=[],this._content=e,this._colorChangedCallback=r,t>0){var u=Math.min(t,e$1T.maximumTextureSize),c=Math.ceil(t/e$1T.maximumTextureSize),h=1/u,d=.5*h,f=1/c,p=.5*f;a=new o$1o(u,c),s=new e$29(h,d,f,p)}this._textureDimensions=a,this._textureStep=s}function _e$i(e){var t={};if(!e$2b(e))return t;for(var i in e)e.hasOwnProperty(i)&&"HIERARCHY"!==i&&"extensions"!==i&&"extras"!==i&&(t[i]=l$1g(e[i],!0));return t}function me$j(e,t,i){if(e$2b(t)){var n=e._extensions["3DTILES_batch_table_hierarchy"],r=t.HIERARCHY;if(e$2b(r)&&(h$D._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),e._extensions["3DTILES_batch_table_hierarchy"]=r,n=r),e$2b(n))return ge$g(n,i)}}function ge$g(e,t){var i,n,r,o=e.instancesLength,a=e.classes,s=e.classIds,l=e.parentCounts,u=e.parentIds,c=o;if(e$2b(s.byteOffset)&&(s.componentType=u$_(s.componentType,S$12.UNSIGNED_SHORT),s.type=Q$y.SCALAR,s=M$C(s).createArrayBufferView(t.buffer,t.byteOffset+s.byteOffset,o)),e$2b(l))for(e$2b(l.byteOffset)&&(l.componentType=u$_(l.componentType,S$12.UNSIGNED_SHORT),l.type=Q$y.SCALAR,l=M$C(l).createArrayBufferView(t.buffer,t.byteOffset+l.byteOffset,o)),r=new Uint16Array(o),c=0,i=0;i<o;++i)r[i]=c,c+=l[i];e$2b(u)&&e$2b(u.byteOffset)&&(u.componentType=u$_(u.componentType,S$12.UNSIGNED_SHORT),u.type=Q$y.SCALAR,u=M$C(u).createArrayBufferView(t.buffer,t.byteOffset+u.byteOffset,c));var h=a.length;for(i=0;i<h;++i){var d=a[i].length,f=a[i].instances,p=V$r(d,f,t);a[i].instances=p$19(p,f)}var _=d$1s(new Array(h),0),m=new Uint16Array(o);for(i=0;i<o;++i)n=s[i],m[i]=_[n],++_[n];var g={classes:a,classIds:s,classIndexes:m,parentCounts:l,parentIndexes:r,parentIds:u};return ye$d(g),g}h$D._deprecationWarning=t$12,Object.defineProperties(h$D.prototype,{memorySizeInBytes:{get:function(){var e=0;return e$2b(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),e$2b(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}}});var de$h=[];function ye$d(e){var t=de$h;t.length=0;for(var i=e.classIds.length,n=0;n<i;++n)j$z(e,n,t)}function j$z(e,t,i){var n=e.parentCounts,r=e.parentIds,o=e.parentIndexes,a=e.classIds.length;if(e$2b(r)){if(t>=a)throw new t$16("Parent index "+t+" exceeds the total number of instances: "+a);if(i.indexOf(t)>-1)throw new t$16("Circular dependency detected in the batch table hierarchy.");i.push(t);for(var s=e$2b(n)?n[t]:1,l=e$2b(n)?o[t]:t,u=0;u<s;++u){var c=r[l+u];c!==t&&j$z(e,c,i)}i.pop(t)}}function V$r(e,t,i){var n;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=o.byteOffset;if(e$2b(a)){var s=o.componentType,l=o.type;if(!e$2b(s))throw new t$14("componentType is required.");if(!e$2b(l))throw new t$14("type is required.");if(!e$2b(i))throw new t$14("Property "+r+" requires a batch table binary.");var u=M$C(o),c=u.componentsPerAttribute,h=u.classType,d=u.createArrayBufferView(i.buffer,i.byteOffset+a,e);e$2b(n)||(n={}),n[r]={typedArray:d,componentCount:c,type:h}}}return n}function Z$y(e){var t=e._textureDimensions;return t.x*t.y*4}function $$A(e){if(!e$2b(e._batchValues)){var t=Z$y(e),i=new Uint8Array(t);d$1s(i,255),e._batchValues=i}return e._batchValues}function J$w(e){if(!e$2b(e._showAlphaProperties)){var t=2*e.featuresLength,i=new Uint8Array(t);d$1s(i,255),e._showAlphaProperties=i}return e._showAlphaProperties}function g$G(e,t){if(!e$2b(e)||e<0||e>t)throw new t$16("batchId is required and between zero and featuresLength - 1 ("+t-NaN)}h$D.getBinaryProperties=function(e,t,i){return V$r(e,t,i)},h$D.prototype.setShow=function(e,t){if(g$G(e,this.featuresLength),o$1q.typeOf.bool("show",t),!t||e$2b(this._showAlphaProperties)){var i=J$w(this),n=2*e,r=t?255:0;if(i[n]!==r)i[n]=r,$$A(this)[4*e+3]=t?i[n+1]:0,this._batchValuesDirty=!0}},h$D.prototype.setAllShow=function(e){o$1q.typeOf.bool("show",e);for(var t=this.featuresLength,i=0;i<t;++i)this.setShow(i,e)},h$D.prototype.getShow=function(e){if(g$G(e,this.featuresLength),!e$2b(this._showAlphaProperties))return!0;var t=2*e;return 255===this._showAlphaProperties[t]};var Se$a=new Array(4);h$D.prototype.setColor=function(e,t){if(g$G(e,this.featuresLength),o$1q.typeOf.object("color",t),!e$1U.equals(t,I$K)||e$2b(this._batchValues)){var i=t.toBytes(Se$a),n=i[3],r=$$A(this),o=4*e,a=J$w(this),s=2*e;if(r[o]!==i[0]||r[o+1]!==i[1]||r[o+2]!==i[2]||a[s+1]!==n){r[o]=i[0],r[o+1]=i[1],r[o+2]=i[2];var l=255!==a[s+1],u=0!==a[s];r[o+3]=u?n:0,a[s+1]=n;var c=255!==n;c&&!l?++this._translucentFeaturesLength:!c&&l&&--this._translucentFeaturesLength,this._batchValuesDirty=!0,e$2b(this._colorChangedCallback)&&this._colorChangedCallback(e,t)}}},h$D.prototype.setAllColor=function(e){o$1q.typeOf.object("color",e);for(var t=this.featuresLength,i=0;i<t;++i)this.setColor(i,e)},h$D.prototype.getColor=function(e,t){if(g$G(e,this.featuresLength),o$1q.typeOf.object("result",t),!e$2b(this._batchValues))return e$1U.clone(I$K,t);var i=this._batchValues,n=4*e,r=this._showAlphaProperties,o=2*e;return e$1U.fromBytes(i[n],i[n+1],i[n+2],r[o+1],t)},h$D.prototype.getPickColor=function(e){return g$G(e,this.featuresLength),this._pickIds[e]};var Te$f=new e$1U;function ee$p(e,t){var i=e.typedArray,n=e.componentCount;return 1===n?i[t]:e.type.unpack(i,t*n)}function te$o(e,t,i){var n=e.typedArray,r=e.componentCount;1===r?n[t]=i:e.type.pack(i,n,t*r)}h$D.prototype.applyStyle=function(e){if(!e$2b(e))return this.setAllColor(I$K),void this.setAllShow(X$u);for(var t=this._content,i=this.featuresLength,n=0;n<i;++n){var r=t.getFeature(n),o=e$2b(e.color)?e.color.evaluateColor(r,Te$f):I$K,a=e$2b(e.show)?e.show.evaluate(r):X$u;this.setColor(n,o),this.setShow(n,a)}};var xe$d=[],Ce$c=[],Le$i=0;function Ae$g(e,t,i){var n=e.classIds,r=e.parentCounts,o=e.parentIds,a=e.parentIndexes,s=n.length,l=xe$d;l.length=Math.max(l.length,s);var u=++Le$i,c=Ce$c;for(c.length=0,c.push(t);c.length>0;)if(l[t=c.pop()]!==u){l[t]=u;var h=i(e,t);if(e$2b(h))return h;for(var d=r[t],f=a[t],p=0;p<d;++p){var _=o[f+p];_!==t&&c.push(_)}}}function we$f(e,t,i){for(var n=!0;n;){var r=i(e,t);if(e$2b(r))return r;var o=e.parentIds[t];n=o!==t,t=o}}function P$y(e,t,i){var n=e.parentCounts;return e$2b(e.parentIds)?e$2b(n)?Ae$g(e,t,i):we$f(e,t,i):i(e,t)}function De$f(e,t,i){var n=P$y(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t];if(e$2b(e.classes[n].instances[i]))return!0}));return e$2b(n)}function Pe$b(e,t,i){P$y(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t],r=e.classes[n].instances;for(var o in r)r.hasOwnProperty(o)&&-1===i.indexOf(o)&&i.push(o)}))}function Ee$h(e,t,i){return P$y(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t],r=e.classes[n],o=e.classIndexes[t],a=r.instances[i];if(e$2b(a))return e$2b(a.typedArray)?ee$p(a,o):l$1g(a[o],!0)}))}function be$j(e,t,i,n){var r=P$y(e._batchTableHierarchy,t,(function(e,r){var o=e.classIds[r],a=e.classes[o],s=e.classIndexes[r],l=a.instances[i];if(e$2b(l)){if(r!==t)throw new t$16('Inherited property "'+i+'" is read-only.');return e$2b(l.typedArray)?te$o(l,s,n):l[s]=l$1g(n,!0),!0}}));return e$2b(r)}function Oe$e(e){return 1===e._textureDimensions.y?"uniform vec4 tile_textureStep; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n return vec2(centerX + (batchId * stepX), 0.5); \n} \n":"uniform vec4 tile_textureStep; \nuniform vec2 tile_textureDimensions; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n float stepY = tile_textureStep.z; \n float centerY = tile_textureStep.w; \n float xId = mod(batchId, tile_textureDimensions.x); \n float yId = floor(batchId / tile_textureDimensions.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function re$s(e,t){return e=s$U.replaceMain(e,"tile_main"),t?e+"uniform float tile_colorBlend; \nvoid tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n tile_featureColor = czm_gammaCorrect(tile_featureColor); \n gl_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n} \n":e+"void tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n} \n"}function Ie$c(e,t){for(var i,n="texture2D("+t,r=0,o=e.indexOf(n,r);o>-1;){for(var a=0,s=o;s<e.length;++s){var l=e.charAt(s);if("("===l)++a;else if(")"===l&&0===--a){i=s+1;break}}var u="tile_diffuse_final("+e.slice(o,i)+", tile_diffuse)";e=e.slice(0,o)+u+e.slice(i),r=o+u.length,o=e.indexOf(n,r)}return e}function ne$t(e,t,i){if(!e$2b(t))return re$s(e,i);var n=new RegExp("(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+"+t+";"),r=e.match(n);if(!e$2b(r))return re$s(e,i);var o=r[0],a=r[2];e=(e=s$U.replaceMain(e,"tile_main")).replace(o,"");var s;if("vec3"===a||"vec4"===a){var l="vec3"===a?"vec4("+t+", 1.0)":t,u="vec3"===a?"tile_diffuse.xyz":"tile_diffuse";n=new RegExp(t,"g"),e=e.replace(n,u),s=" vec4 source = "+l+"; \n tile_diffuse = tile_diffuse_final(source, tile_featureColor); \n tile_main(); \n"}else"sampler2D"===a&&(e=Ie$c(e,t),s=" tile_diffuse = tile_featureColor; \n tile_main(); \n");return e="uniform float tile_colorBlend; \nvec4 tile_diffuse = vec4(1.0); \nbool isWhite(vec3 color) \n{ \n return all(greaterThan(color, vec3(1.0 - czm_epsilon3))); \n} \nvec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse) \n{ \n vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend); \n vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse; \n return vec4(diffuse.rgb, sourceDiffuse.a); \n} \n"+o+"\n"+e+"\nvoid tile_color(vec4 tile_featureColor) \n{ \n"+s,i&&(e+=" tile_featureColor = czm_gammaCorrect(tile_featureColor); \n gl_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n"),e+="} \n"}function ke$7(e){var t=e._content.tileset,i=t.colorBlendMode,n=t.colorBlendAmount;if(i===L$I.HIGHLIGHT)return 0;if(i===L$I.REPLACE)return 1;if(i===L$I.MIX)return e$2a.clamp(n,e$2a.EPSILON4,1);throw new t$16('Invalid color blend mode "'+i+'".')}h$D.prototype.isClass=function(e,t){g$G(e,this.featuresLength),o$1q.typeOf.string("className",t);var i=this._batchTableHierarchy;if(!e$2b(i))return!1;var n=P$y(i,e,(function(e,i){var n=e.classIds[i];if(e.classes[n].name===t)return!0}));return e$2b(n)},h$D.prototype.isExactClass=function(e,t){return o$1q.typeOf.string("className",t),this.getExactClassName(e)===t},h$D.prototype.getExactClassName=function(e){g$G(e,this.featuresLength);var t=this._batchTableHierarchy;if(e$2b(t)){var i=t.classIds[e];return t.classes[i].name}},h$D.prototype.hasProperty=function(e,t){return g$G(e,this.featuresLength),o$1q.typeOf.string("name",t),e$2b(this._properties[t])||e$2b(this._batchTableHierarchy)&&De$f(this,e,t)},h$D.prototype.getPropertyNames=function(e,t){g$G(e,this.featuresLength),(t=e$2b(t)?t:[]).length=0;var i=Object.keys(this._properties);return t.push.apply(t,i),e$2b(this._batchTableHierarchy)&&Pe$b(this,e,t),t},h$D.prototype.getProperty=function(e,t){if(g$G(e,this.featuresLength),o$1q.typeOf.string("name",t),e$2b(this._batchTableBinaryProperties)){var i=this._batchTableBinaryProperties[t];if(e$2b(i))return ee$p(i,e)}var n=this._properties[t];if(e$2b(n))return l$1g(n[e],!0);if(e$2b(this._batchTableHierarchy)){var r=Ee$h(this,e,t);if(e$2b(r))return r}},h$D.prototype.setProperty=function(e,t,i){var n=this.featuresLength;if(g$G(e,n),o$1q.typeOf.string("name",t),e$2b(this._batchTableBinaryProperties)){var r=this._batchTableBinaryProperties[t];if(e$2b(r))return void te$o(r,e,i)}if(!e$2b(this._batchTableHierarchy)||!be$j(this,e,t,i)){var o=this._properties[t];e$2b(o)||(this._properties[t]=new Array(n),o=this._properties[t]),o[e]=l$1g(i,!0)}},h$D.prototype.getVertexShaderCallback=function(e,t,i){if(0!==this.featuresLength){var n=this;return function(r){var o,a=ne$t(r,i,!1);return e$1T.maximumVertexTextureImageUnits>0?(o="",e&&(o+="uniform bool tile_translucentCommand; \n"),o+="uniform sampler2D tile_batchTexture; \nvarying vec4 tile_featureColor; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n vec2 st = computeSt("+t+"); \n vec4 featureProperties = texture2D(tile_batchTexture, st); \n tile_color(featureProperties); \n float show = ceil(featureProperties.a); \n gl_Position *= show; \n",e&&(o+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n gl_Position *= 0.0; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n gl_Position *= 0.0; \n } \n } \n"),o+=" tile_featureColor = featureProperties; \n tile_featureSt = st; \n}"):o="varying vec2 tile_featureSt; \nvoid main() \n{ \n tile_color(vec4(1.0)); \n tile_featureSt = computeSt("+t+"); \n}",a+"\n"+Oe$e(n)+o}}},h$D.prototype.getFragmentShaderCallback=function(e,t){if(0!==this.featuresLength)return function(i){return i=ne$t(i,t,!0),e$1T.maximumVertexTextureImageUnits>0?i+="#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\nuniform sampler2D tile_pickTexture; \nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n#ifdef APPLY_SWIPE \n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n tile_color(tile_featureColor); \n}":(e&&(i+="uniform bool tile_translucentCommand; \n"),i+="uniform sampler2D tile_pickTexture; \nuniform sampler2D tile_batchTexture; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n",e&&(i+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n discard; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n discard; \n } \n } \n"),i+=" tile_color(featureProperties); \n} \n"),i}},h$D.prototype.getClassificationFragmentShaderCallback=function(){if(0!==this.featuresLength)return function(e){return e=s$U.replaceMain(e,"tile_main"),e$1T.maximumVertexTextureImageUnits>0?e+="uniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n tile_main(); \n gl_FragColor = tile_featureColor; \n}":e+="uniform sampler2D tile_batchTexture; \nuniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvoid main() \n{ \n tile_main(); \n vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n gl_FragColor = featureProperties; \n} \n",e}},h$D.prototype.getUniformMapCallback=function(){if(0!==this.featuresLength){var e=this;return function(t){var i={tile_batchTexture:function(){return u$_(e._batchTexture,e._defaultTexture)},tile_textureDimensions:function(){return e._textureDimensions},tile_textureStep:function(){return e._textureStep},tile_colorBlend:function(){return ke$7(e)},uSwipeRegion:function(){var t=e._content.tileset._swipeRegion,i=e._content.tileset.frameState.context.drawingBufferWidth,n=e._content.tileset.frameState.context.drawingBufferHeight,r=new e$29;return r.x=t.x*i,r.y=(1-t.y)*n,r.z=t.z*i,r.w=(1-t.w)*n,r},tile_pickTexture:function(){return e._pickTexture}};return p$19(t,i)}}},h$D.prototype.getPickId=function(){return"texture2D(tile_pickTexture, tile_featureSt)"};var x$G={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};function Re$e(e){var t=e._translucentFeaturesLength;return 0===t?x$G.ALL_OPAQUE:t===e.featuresLength?x$G.ALL_TRANSLUCENT:x$G.OPAQUE_AND_TRANSLUCENT}function Be$e(e){var t=i$_.shallowClone(e),i=t.pass===Le$s.TRANSLUCENT;return t.uniformMap=e$2b(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return i},t}function Me$g(e){var t=i$_.shallowClone(e);return t.pass=Le$s.TRANSLUCENT,t.renderState=ze$b(e.renderState),t}function Ue$c(e){var t=i$_.shallowClone(e);return t.renderState=Ge$7(e.renderState),t}function Ne$b(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!e$2b(i)){var n=t.fragmentShaderSource.clone();n.defines=e$2b(n.defines)?n.defines.slice(0):[],n.defines.push("POLYGON_OFFSET"),n.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),i=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:t._attributeLocations})}return i}function Ve$c(e,t){var i=i$_.shallowClone(t),n=l$1g(i.renderState,!0);n.cull.enabled=!0,n.cull.face=G$17.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5},n.stencilTest=u$N.setCesium3DTileBit(),n.stencilMask=u$N.CESIUM_3D_TILE_MASK,i.renderState=d$1m.fromCache(n),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=l$1g(t.uniformMap);var r=new o$1o(5,5);return i.uniformMap.u_polygonOffset=function(){return r},i.shaderProgram=Ne$b(e,t.shaderProgram),i}function Fe$d(e,t){var i=i$_.shallowClone(e),n=l$1g(i.renderState,!0);return n.stencilTest.enabled=!0,n.stencilTest.mask=u$N.SKIP_LOD_MASK,n.stencilTest.reference=u$N.CESIUM_3D_TILE_MASK|t<<u$N.SKIP_LOD_BIT_SHIFT,n.stencilTest.frontFunction=m$X.GREATER_OR_EQUAL,n.stencilTest.frontOperation.zPass=n$Y.REPLACE,n.stencilTest.backFunction=m$X.GREATER_OR_EQUAL,n.stencilTest.backOperation.zPass=n$Y.REPLACE,n.stencilMask=u$N.CESIUM_3D_TILE_MASK|u$N.SKIP_LOD_MASK,i.renderState=d$1m.fromCache(n),i}function He$7(e){return(e.renderState.stencilTest.reference&u$N.SKIP_LOD_MASK)>>>u$N.SKIP_LOD_BIT_SHIFT}function ze$b(e){var t=l$1g(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=Ee$r.ALPHA_BLEND,d$1m.fromCache(t)}function Ge$7(e){var t=l$1g(e,!0);return t.stencilTest=u$N.setCesium3DTileBit(),t.stencilMask=u$N.CESIUM_3D_TILE_MASK,d$1m.fromCache(t)}function ie$o(e,t,i){var n=e._textureDimensions;return new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,source:{width:n.x,height:n.y,arrayBufferView:i},flipY:!1,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})}function Ke$7(e,t){var i=e.featuresLength;if(!e$2b(e._pickTexture)&&i>0){for(var n=e._pickIds,r=Z$y(e),o=new Uint8Array(r),a=e._content,s=0;s<i;++s){var l=t.createPickId(a.getFeature(s));n.push(l);var u=l.color,c=4*s;o[c]=e$1U.floatToByte(u.red),o[c+1]=e$1U.floatToByte(u.green),o[c+2]=e$1U.floatToByte(u.blue),o[c+3]=e$1U.floatToByte(u.alpha)}e._pickTexture=ie$o(e,t,o),a.tileset._statistics.batchTableByteLength+=e._pickTexture.sizeInBytes}}function Ye$7(e){var t=e._textureDimensions;e._batchTexture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function e$L(e,t){this._content=e,this._batchId=t,this._color=void 0}function o$B(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function n$s(e,t,i,n,r,o){var a=e._cachedTypedArrays,s=a[t];return e$2b(s)||(s=S$12.createArrayBufferView(i,e.buffer.buffer,e.buffer.byteOffset+o,r*n),a[t]=s),s}function A$F(e,t,i,n){var r=e._cachedTypedArrays,o=r[t];return e$2b(o)||(o=S$12.createTypedArray(i,n),r[t]=o),o}function d$P(e,t,i){if(i=u$_(i,!1)){var n=e.indexOf(t);if(n>-1)return n}return e.push(t),e.length-1}function i$D(e,t){return e$2b(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}function e$K(){}function r$B(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}function p$A(e,t){var i=t.bufferView;if(e$2b(i)){var n=e.bufferViews[i];if(e$2b(n.byteStride)&&n.byteStride>0)return n.byteStride}return S$12.getSizeInBytes(t.componentType)*r$B(t.type)}function E$D(e){e$K.accessor(e,(function(e){e$2b(e.bufferView)&&(e.byteOffset=u$_(e.byteOffset,0))})),e$K.bufferView(e,(function(e){e$2b(e.buffer)&&(e.byteOffset=u$_(e.byteOffset,0))})),e$K.mesh(e,(function(t){e$K.meshPrimitive(t,(function(t){if(t.mode=u$_(t.mode,de$x.TRIANGLES),!e$2b(t.material)){e$2b(e.materials)||(e.materials=[]);t.material=d$P(e.materials,{name:"default"})}}))})),e$K.accessorContainingVertexAttributeData(e,(function(t){var i=e.accessors[t],n=i.bufferView;if(i.normalized=u$_(i.normalized,!1),e$2b(n)){var r=e.bufferViews[n];r.byteStride=p$A(e,i),r.target=de$x.ARRAY_BUFFER}})),e$K.accessorContainingIndexData(e,(function(t){var i=e.accessors[t].bufferView;e$2b(i)&&(e.bufferViews[i].target=de$x.ELEMENT_ARRAY_BUFFER)})),e$K.material(e,(function(e){var t=u$_(e.extensions,u$_.EMPTY_OBJECT),i=t.KHR_materials_common;if(e$2b(i)){var n=i.technique,r=e$2b(i.values)?i.values:{};return i.values=r,r.ambient=e$2b(r.ambient)?r.ambient:[0,0,0,1],r.emission=e$2b(r.emission)?r.emission:[0,0,0,1],r.transparency=u$_(r.transparency,1),r.transparent=u$_(r.transparent,!1),r.doubleSided=u$_(r.doubleSided,!1),void("CONSTANT"!==n&&(r.diffuse=e$2b(r.diffuse)?r.diffuse:[0,0,0,1],"LAMBERT"!==n&&(r.specular=e$2b(r.specular)?r.specular:[0,0,0,1],r.shininess=u$_(r.shininess,0))))}e.emissiveFactor=u$_(e.emissiveFactor,[0,0,0]),e.alphaMode=u$_(e.alphaMode,"OPAQUE"),e.doubleSided=u$_(e.doubleSided,!1),"MASK"===e.alphaMode&&(e.alphaCutoff=u$_(e.alphaCutoff,.5)),e$2b(t.KHR_techniques_webgl)&&e$K.materialValue(e,(function(e){e$2b(e.index)&&d$O(e)})),d$O(e.emissiveTexture),d$O(e.normalTexture),d$O(e.occlusionTexture);var o=e.pbrMetallicRoughness;e$2b(o)&&(o.baseColorFactor=u$_(o.baseColorFactor,[1,1,1,1]),o.metallicFactor=u$_(o.metallicFactor,1),o.roughnessFactor=u$_(o.roughnessFactor,1),d$O(o.baseColorTexture),d$O(o.metallicRoughnessTexture));var a=t.pbrSpecularGlossiness;e$2b(a)&&(a.diffuseFactor=u$_(a.diffuseFactor,[1,1,1,1]),a.specularFactor=u$_(a.specularFactor,[1,1,1]),a.glossinessFactor=u$_(a.glossinessFactor,1),d$O(a.specularGlossinessTexture))})),e$K.animation(e,(function(e){e$K.animationSampler(e,(function(e){e.interpolation=u$_(e.interpolation,"LINEAR")}))}));var t=l$G(e);return e$K.node(e,(function(e,i){e$2b(t[i])||e$2b(e.translation)||e$2b(e.rotation)||e$2b(e.scale)?(e.translation=u$_(e.translation,[0,0,0]),e.rotation=u$_(e.rotation,[0,0,0,1]),e.scale=u$_(e.scale,[1,1,1])):e.matrix=u$_(e.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])})),e$K.sampler(e,(function(e){e.wrapS=u$_(e.wrapS,de$x.REPEAT),e.wrapT=u$_(e.wrapT,de$x.REPEAT)})),e$2b(e.scenes)&&!e$2b(e.scene)&&(e.scene=0),e}function l$G(e){var t={};return e$K.animation(e,(function(e){e$K.animationChannel(e,(function(e){var i=e.target,n=i.node,r=i.path;("translation"===r||"rotation"===r||"scale"===r)&&(t[n]=!0)}))})),t}function d$O(e){e$2b(e)&&(e.texCoord=u$_(e.texCoord,0))}function s$z(e){return e$K.shader(e,(function(e){n$r(e)})),e$K.buffer(e,(function(e){n$r(e)})),e$K.image(e,(function(e){n$r(e),e$K.compressedImage(e,(function(e){n$r(e)}))})),n$r(e),e}function n$r(e){e.extras=e$2b(e.extras)?e.extras:{},e.extras._pipeline=e$2b(e.extras._pipeline)?e.extras._pipeline:{}}function s$y(e,t){var i=e.extensionsRequired;if(e$2b(i)){var n=i.indexOf(t);n>=0&&i.splice(n,1),0===i.length&&delete e.extensionsRequired}}function d$N(e,t){var i=e.extensionsUsed;if(e$2b(i)){var n=i.indexOf(t);n>=0&&i.splice(n,1),s$y(e,t),0===i.length&&delete e.extensionsUsed}}h$D.prototype.addDerivedCommands=function(e,t){for(var i=e.commandList,n=i.length,r=this._content._tile,o=r._finalResolution,a=r.tileset,s=a._skipLevelOfDetail&&a._hasMixedContent&&e.context.stencilBuffer,l=Re$e(this),u=t;u<n;++u){var c=i[u],h=c.derivedCommands.tileset;(!e$2b(h)||c.dirty)&&(h={},c.derivedCommands.tileset=h,h.originalCommand=Be$e(c),c.dirty=!1);var d=h.originalCommand;l!==x$G.ALL_OPAQUE&&c.pass!==Le$s.TRANSLUCENT&&(e$2b(h.translucent)||(h.translucent=Me$g(d))),l!==x$G.ALL_TRANSLUCENT&&c.pass!==Le$s.TRANSLUCENT&&(e$2b(h.opaque)||(h.opaque=Ue$c(d)),s&&(o||(e$2b(h.zback)||(h.zback=Ve$c(e.context,d)),a._backfaceCommands.push(h.zback)),(!e$2b(h.stencil)||r._selectionDepth!==He$7(h.stencil))&&(c.renderState.depthMask?h.stencil=Fe$d(d,r._selectionDepth):h.stencil=h.opaque)));var f=s?h.stencil:h.opaque,p=h.translucent;c.pass!==Le$s.TRANSLUCENT?(l===x$G.ALL_OPAQUE&&(i[u]=f),l===x$G.ALL_TRANSLUCENT&&(i[u]=p),l===x$G.OPAQUE_AND_TRANSLUCENT&&(i[u]=f,i.push(p))):i[u]=d}},h$D.prototype.update=function(e,t){var i=t.context;this._defaultTexture=i.defaultTexture;var n=t.passes;(n.pick||n.postProcess)&&Ke$7(this,i),this._batchValuesDirty&&(this._batchValuesDirty=!1,e$2b(this._batchTexture)||(this._batchTexture=ie$o(this,i,this._batchValues),e._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes),Ye$7(this))},h$D.prototype.isDestroyed=function(){return!1},h$D.prototype.destroy=function(){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),this._pickTexture=this._pickTexture&&this._pickTexture.destroy();for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();return i$10(this)},Object.defineProperties(e$L.prototype,{show:{get:function(){return this._content.batchTable.getShow(this._batchId)},set:function(e){this._content.batchTable.setShow(this._batchId,e)}},color:{get:function(){return e$2b(this._color)||(this._color=new e$1U),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickId:{get:function(){return this._content.batchTable.getPickColor(this._batchId)}}}),e$L.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},e$L.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},e$L.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},e$L.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},e$L.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},e$L.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},e$L.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},o$B.prototype.getGlobalProperty=function(e,t,i){var n=this.json[e];if(e$2b(n))return e$2b(n.byteOffset)?n$s(this,e,t=u$_(t,S$12.UNSIGNED_INT),i=u$_(i,1),1,n.byteOffset):n},o$B.prototype.getPropertyArray=function(e,t,i){var n=this.json[e];if(e$2b(n))return e$2b(n.byteOffset)?(e$2b(n.componentType)&&(t=S$12.fromName(n.componentType)),n$s(this,e,t,i,this.featuresLength,n.byteOffset)):A$F(this,e,t,n)},o$B.prototype.getProperty=function(e,t,i,n,r){if(e$2b(this.json[e])){var o=this.getPropertyArray(e,t,i);if(1===i)return o[n];for(var a=0;a<i;++a)r[a]=o[i*n+a];return r}},e$K.objectLegacy=function(e,t){if(e$2b(e))for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=t(e[i],i);if(e$2b(n))return n}},e$K.object=function(e,t){if(e$2b(e))for(var i=e.length,n=0;n<i;n++){var r=t(e[n],n);if(e$2b(r))return r}},e$K.topLevel=function(e,t,i){var n=e[t];return e$2b(n)&&!Array.isArray(n)?e$K.objectLegacy(n,i):e$K.object(n,i)},e$K.accessor=function(e,t){return e$K.topLevel(e,"accessors",t)},e$K.accessorWithSemantic=function(e,t,i){var n={};return e$K.mesh(e,(function(e){return e$K.meshPrimitive(e,(function(e){var r=e$K.meshPrimitiveAttribute(e,(function(e,r){if(0===r.indexOf(t)&&!e$2b(n[e])){n[e]=!0;var o=i(e);if(e$2b(o))return o}}));return e$2b(r)?r:e$K.meshPrimitiveTarget(e,(function(e){return e$K.meshPrimitiveTargetAttribute(e,(function(e,r){if(0===r.indexOf(t)&&!e$2b(n[e])){n[e]=!0;var o=i(e);if(e$2b(o))return o}}))}))}))}))},e$K.accessorContainingVertexAttributeData=function(e,t){var i={};return e$K.mesh(e,(function(e){return e$K.meshPrimitive(e,(function(e){var n=e$K.meshPrimitiveAttribute(e,(function(e){if(!e$2b(i[e])){i[e]=!0;var n=t(e);if(e$2b(n))return n}}));return e$2b(n)?n:e$K.meshPrimitiveTarget(e,(function(e){return e$K.meshPrimitiveTargetAttribute(e,(function(e){if(!e$2b(i[e])){i[e]=!0;var n=t(e);if(e$2b(n))return n}}))}))}))}))},e$K.accessorContainingIndexData=function(e,t){var i={};return e$K.mesh(e,(function(e){return e$K.meshPrimitive(e,(function(e){var n=e.indices;if(e$2b(n)&&!e$2b(i[n])){i[n]=!0;var r=t(n);if(e$2b(r))return r}}))}))},e$K.animation=function(e,t){return e$K.topLevel(e,"animations",t)},e$K.animationChannel=function(e,t){var i=e.channels;return e$K.object(i,t)},e$K.animationSampler=function(e,t){var i=e.samplers;return e$K.object(i,t)},e$K.buffer=function(e,t){return e$K.topLevel(e,"buffers",t)},e$K.bufferView=function(e,t){return e$K.topLevel(e,"bufferViews",t)},e$K.camera=function(e,t){return e$K.topLevel(e,"cameras",t)},e$K.image=function(e,t){return e$K.topLevel(e,"images",t)},e$K.compressedImage=function(e,t){if(e$2b(e.extras)){var i=e.extras.compressedImage3DTiles;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2b(r))return r}}},e$K.material=function(e,t){return e$K.topLevel(e,"materials",t)},e$K.materialValue=function(e,t){var i=e.values;for(var n in e$2b(e.extensions)&&e$2b(e.extensions.KHR_techniques_webgl)&&(i=e.extensions.KHR_techniques_webgl.values),i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2b(r))return r}},e$K.mesh=function(e,t){return e$K.topLevel(e,"meshes",t)},e$K.meshPrimitive=function(e,t){var i=e.primitives;if(e$2b(i))for(var n=i.length,r=0;r<n;r++){var o=t(i[r],r);if(e$2b(o))return o}},e$K.meshPrimitiveAttribute=function(e,t){var i=e.attributes;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2b(r))return r}},e$K.meshPrimitiveTarget=function(e,t){var i=e.targets;if(e$2b(i))for(var n=i.length,r=0;r<n;++r){var o=t(i[r],r);if(e$2b(o))return o}},e$K.meshPrimitiveTargetAttribute=function(e,t){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=t(e[i],i);if(e$2b(n))return n}},e$K.node=function(e,t){return e$K.topLevel(e,"nodes",t)},e$K.nodeInTree=function(e,t,i){var n=e.nodes;if(e$2b(n))for(var r=t.length,o=0;o<r;o++){var a=t[o],s=n[a];if(e$2b(s)){var l=i(s,a);if(e$2b(l))return l;var u=s.children;if(e$2b(u)&&e$2b(l=e$K.nodeInTree(e,u,i)))return l}}},e$K.nodeInScene=function(e,t,i){var n=t.nodes;if(e$2b(n))return e$K.nodeInTree(e,n,i)},e$K.program=function(e,t){return i$D(e,"KHR_techniques_webgl")?e$K.object(e.extensions.KHR_techniques_webgl.programs,t):e$K.topLevel(e,"programs",t)},e$K.sampler=function(e,t){return e$K.topLevel(e,"samplers",t)},e$K.scene=function(e,t){return e$K.topLevel(e,"scenes",t)},e$K.shader=function(e,t){return i$D(e,"KHR_techniques_webgl")?e$K.object(e.extensions.KHR_techniques_webgl.shaders,t):e$K.topLevel(e,"shaders",t)},e$K.skin=function(e,t){return e$K.topLevel(e,"skins",t)},e$K.skinJoint=function(e,t){var i=e.joints;if(e$2b(i))for(var n=i.length,r=0;r<n;r++){var o=t(i[r]);if(e$2b(o))return o}},e$K.techniqueAttribute=function(e,t){var i=e.attributes;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2b(r))return r}},e$K.techniqueUniform=function(e,t){var i=e.uniforms;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2b(r))return r}},e$K.techniqueParameter=function(e,t){var i=e.parameters;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2b(r))return r}},e$K.technique=function(e,t){return i$D(e,"KHR_techniques_webgl")?e$K.object(e.extensions.KHR_techniques_webgl.techniques,t):e$K.topLevel(e,"techniques",t)},e$K.texture=function(e,t){return e$K.topLevel(e,"textures",t)};var x$F=4;function O$u(e){if("glTF"!==a$F(e))throw new t$14("File is not valid binary glTF");var t=d$M(e,0,5),i=t[1];if(1!==i&&2!==i)throw new t$14("Binary glTF version is not 1 or 2");return 1===i?S$v(e,t):T$A(e,t)}function d$M(e,t,i){for(var n=new DataView(e.buffer),r=new Array(i),o=0;o<i;++o)r[o]=n.getUint32(e.byteOffset+t+o*x$F,!0);return r}function S$v(e,t){var i=t[2],n=t[3];if(0!==t[4])throw new t$14("Binary glTF scene format is not JSON");var r=20+n,o=a$K(e,20,n),a=JSON.parse(o);s$z(a);var s=e.subarray(r,i),l=a.buffers;if(e$2b(l)&&Object.keys(l).length>0){var u=u$_(l.binary_glTF,l.KHR_binary_glTF);e$2b(u)&&(u.extras._pipeline.source=s)}return d$N(a,"KHR_binary_glTF"),a}function T$A(e,t){for(var i,n,r=t[2],o=12;o<r;){var a=d$M(e,o,2),s=a[0],l=a[1];o+=8;var u=e.subarray(o,o+s);if(o+=s,1313821514===l){var c=a$K(u);s$z(i=JSON.parse(c))}else 5130562===l&&(n=u)}if(e$2b(i)&&e$2b(n)){var h=i.buffers;if(e$2b(h)&&h.length>0)h[0].extras._pipeline.source=n}return i}function i$C(e,t){var i=e.extensionsUsed;e$2b(i)||(i=[],e.extensionsUsed=i),d$P(i,t,!0)}function c$x(e){switch(e){case S$12.BYTE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt8(t+o*n)};case S$12.UNSIGNED_BYTE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint8(t+o*n)};case S$12.SHORT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt16(t+o*n,!0)};case S$12.UNSIGNED_SHORT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint16(t+o*n,!0)};case S$12.INT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt32(t+o*n,!0)};case S$12.UNSIGNED_INT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint32(t+o*n,!0)};case S$12.FLOAT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getFloat32(t+o*n,!0)};case S$12.DOUBLE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getFloat64(t+o*n,!0)}}}function B$y(e,t){var i=e.bufferViews,n=e.buffers,r=t.bufferView,o=r$B(t.type);if(!e$2b(t.bufferView))return{min:d$1s(new Array(o),0),max:d$1s(new Array(o),0)};for(var a=d$1s(new Array(o),Number.POSITIVE_INFINITY),s=d$1s(new Array(o),Number.NEGATIVE_INFINITY),l=i[r],u=n[l.buffer].extras._pipeline.source,c=t.count,h=p$A(e,t),d=t.byteOffset+l.byteOffset+u.byteOffset,f=t.componentType,p=S$12.getSizeInBytes(f),_=new DataView(u.buffer),m=new Array(o),g=c$x(f),x=0;x<c;x++){g(_,d,o,p,m);for(var v=0;v<o;v++){var y=m[v];a[v]=Math.min(a[v],y),s[v]=Math.max(s[v],y)}d+=h}return{min:a,max:s}}var E$C=[de$x.FUNC_ADD,de$x.FUNC_ADD],p$z=[de$x.ONE,de$x.ZERO,de$x.ONE,de$x.ZERO];function O$t(e,t){var i=e.enable;return!!e$2b(i)&&i.indexOf(t)>-1}var N$s=[de$x.ZERO,de$x.ONE,de$x.SRC_COLOR,de$x.ONE_MINUS_SRC_COLOR,de$x.SRC_ALPHA,de$x.ONE_MINUS_SRC_ALPHA,de$x.DST_ALPHA,de$x.ONE_MINUS_DST_ALPHA,de$x.DST_COLOR,de$x.ONE_MINUS_DST_COLOR];function L$H(e,t){if(!e$2b(e))return t;for(var i=0;i<4;i++)if(-1===N$s.indexOf(e[i]))return t;return e}function R$v(e){var t={},i={};return e$2b(e.techniques)&&(e$K.technique(e,(function(e,n){var r=e.states;if(e$2b(r)){var o=i[n]={};if(O$t(r,de$x.BLEND)){o.alphaMode="BLEND";var a=r.functions;e$2b(a)&&(e$2b(a.blendEquationSeparate)||e$2b(a.blendFuncSeparate))&&(t[n]={blendEquation:u$_(a.blendEquationSeparate,E$C),blendFactors:L$H(a.blendFuncSeparate,p$z)})}O$t(r,de$x.CULL_FACE)||(o.doubleSided=!0),delete e.states}})),Object.keys(t).length>0&&(e$2b(e.extensions)||(e.extensions={}),i$C(e,"KHR_blend")),e$K.material(e,(function(e){if(e$2b(e.technique)){var n=i[e.technique];e$K.objectLegacy(n,(function(t,i){e[i]=t}));var r=t[e.technique];e$2b(r)&&(e$2b(e.extensions)||(e.extensions={}),e.extensions.KHR_blend=r)}}))),e}function s$x(e,t){var i=e.extensionsRequired;e$2b(i)||(i=[],e.extensionsRequired=i),d$P(i,t,!0),i$C(e,t)}function R$u(e){var t=e.techniques,i={},n={};if(e$2b(t)){var r={programs:[],shaders:[],techniques:[]},o=e.glExtensionsUsed;delete e.glExtensionsUsed,e$K.technique(e,(function(t,a){var s,l={name:t.name,program:void 0,attributes:{},uniforms:{}};e$K.techniqueAttribute(t,(function(e,i){s=t.parameters[e],l.attributes[i]={semantic:s.semantic}})),e$K.techniqueUniform(t,(function(e,n){s=t.parameters[e],l.uniforms[n]={count:s.count,node:s.node,type:s.type,semantic:s.semantic,value:s.value},i[e]=n}));var u=e.programs[t.program],c={name:u.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:o},h=e.shaders[u.fragmentShader];c.fragmentShader=d$P(r.shaders,h,!0);var d=e.shaders[u.vertexShader];c.vertexShader=d$P(r.shaders,d,!0),l.program=d$P(r.programs,c),n[a]=d$P(r.techniques,l)})),r.techniques.length>0&&(e$2b(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,i$C(e,"KHR_techniques_webgl"),s$x(e,"KHR_techniques_webgl"))}return e$K.material(e,(function(e){if(e$2b(e.technique)){var t={technique:n[e.technique]};e$K.objectLegacy(e.values,(function(e,n){e$2b(t.values)||(t.values={});var r=i[n];t.values[r]=e})),e$2b(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=t}delete e.technique,delete e.values})),delete e.techniques,delete e.programs,delete e.shaders,e}var b$J=["mesh","node","material","accessor","bufferView","buffer"];function d$L(e,t){return t=u$_(t,b$J),b$J.forEach((function(i){t.indexOf(i)>-1&&p$y(e,i)})),e}var _$v={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",node:"nodes",material:"materials",mesh:"meshes"};function p$y(e,t){var i=e[_$v[t]];if(e$2b(i))for(var n=0,r=m$z[t](e),o=i.length,a=0;a<o;++a)r[a]||(a$z[t](e,a-n),n++)}function a$z(){}function m$z(){}function v$x(e,t){return!(e$2b(t.mesh)||e$2b(t.camera)||e$2b(t.skin)||e$2b(t.weights)||e$2b(t.extras)||e$2b(t.extensions)&&0!==t.extensions.length)&&(!e$2b(t.children)||0===t.children.filter((function(t){return!v$x(e,e.nodes[t])})).length)}function a$y(e,t){var i={byteLength:t.length,extras:{_pipeline:{source:t}}},n={buffer:d$P(e.buffers,i),byteOffset:0,byteLength:t.length};return d$P(e.bufferViews,n)}function T$z(e,t){var i=p$A(e,t),n=S$12.getSizeInBytes(t.componentType),r=r$B(t.type),o=t.count,a=new Array(r*o);if(!e$2b(t.bufferView))return d$1s(a,0),a;for(var s=e.bufferViews[t.bufferView],l=e.buffers[s.buffer].extras._pipeline.source,u=t.byteOffset+s.byteOffset+l.byteOffset,c=new DataView(l.buffer),h=new Array(r),d=c$x(t.componentType),f=0;f<o;++f){d(c,u,r,n,h);for(var p=0;p<r;++p)a[f*r+p]=h[p];u+=i}return a}function T$y(e){var t;return e$K.accessorWithSemantic(e,"JOINTS_0",(function(i){var n=e.accessors[i];(t=n.componentType)===de$x.BYTE?t$v(e,n,S$12.UNSIGNED_BYTE):t!==de$x.UNSIGNED_BYTE&&t!==de$x.UNSIGNED_SHORT&&t$v(e,n,S$12.UNSIGNED_SHORT)})),e$K.accessorWithSemantic(e,"WEIGHTS_0",(function(i){var n=e.accessors[i];(t=n.componentType)===de$x.BYTE?t$v(e,n,S$12.UNSIGNED_BYTE):t===de$x.SHORT&&t$v(e,n,S$12.UNSIGNED_SHORT)})),e}function t$v(e,t,i){var n=S$12.createTypedArray(i,T$z(e,t)),r=new Uint8Array(n.buffer);t.bufferView=a$y(e,r),t.componentType=i,t.byteOffset=0}a$z.accessor=function(e,t){e.accessors.splice(t,1),e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$K.meshPrimitiveAttribute(e,(function(i,n){i>t&&e.attributes[n]--})),e$K.meshPrimitiveTarget(e,(function(e){e$K.meshPrimitiveTargetAttribute(e,(function(i,n){i>t&&e[n]--}))}));var i=e.indices;e$2b(i)&&i>t&&e.indices--}))})),e$K.skin(e,(function(e){e$2b(e.inverseBindMatrices)&&e.inverseBindMatrices>t&&e.inverseBindMatrices--})),e$K.animation(e,(function(e){e$K.animationSampler(e,(function(e){e$2b(e.input)&&e.input>t&&e.input--,e$2b(e.output)&&e.output>t&&e.output--}))}))},a$z.buffer=function(e,t){e.buffers.splice(t,1),e$K.bufferView(e,(function(e){e$2b(e.buffer)&&e.buffer>t&&e.buffer--}))},a$z.bufferView=function(e,t){e.bufferViews.splice(t,1),e$K.accessor(e,(function(e){e$2b(e.bufferView)&&e.bufferView>t&&e.bufferView--})),e$K.shader(e,(function(e){e$2b(e.bufferView)&&e.bufferView>t&&e.bufferView--})),e$K.image(e,(function(e){e$2b(e.bufferView)&&e.bufferView>t&&e.bufferView--,e$K.compressedImage(e,(function(e){var i=e.bufferView;e$2b(i)&&i>t&&e.bufferView--}))})),i$D(e,"KHR_draco_mesh_compression")&&e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$2b(e.extensions)&&e$2b(e.extensions.KHR_draco_mesh_compression)&&e.extensions.KHR_draco_mesh_compression.bufferView>t&&e.extensions.KHR_draco_mesh_compression.bufferView--}))}))},a$z.mesh=function(e,t){e.meshes.splice(t,1),e$K.node(e,(function(e){e$2b(e.mesh)&&(e.mesh>t?e.mesh--:e.mesh===t&&delete e.mesh)}))},a$z.node=function(e,t){e.nodes.splice(t,1),e$K.skin(e,(function(e){e$2b(e.skeleton)&&e.skeleton>t&&e.skeleton--,e.joints=e.joints.map((function(e){return e>t?e-1:e}))})),e$K.animation(e,(function(e){e$K.animationChannel(e,(function(e){e$2b(e.target)&&e$2b(e.target.node)&&e.target.node>t&&e.target.node--}))})),e$K.technique(e,(function(e){e$K.techniqueUniform(e,(function(e){e$2b(e.node)&&e.node>t&&e.node--}))})),e$K.node(e,(function(e){!e$2b(e.children)||(e.children=e.children.filter((function(e){return e!==t})).map((function(e){return e>t?e-1:e})))})),e$K.scene(e,(function(e){e.nodes=e.nodes.filter((function(e){return e!==t})).map((function(e){return e>t?e-1:e}))}))},a$z.material=function(e,t){e.materials.splice(t,1),e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$2b(e.material)&&e.material>t&&e.material--}))}))},m$z.accessor=function(e){var t={};return e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$K.meshPrimitiveAttribute(e,(function(e){t[e]=!0})),e$K.meshPrimitiveTarget(e,(function(e){e$K.meshPrimitiveTargetAttribute(e,(function(e){t[e]=!0}))}));var i=e.indices;e$2b(i)&&(t[i]=!0)}))})),e$K.skin(e,(function(e){e$2b(e.inverseBindMatrices)&&(t[e.inverseBindMatrices]=!0)})),e$K.animation(e,(function(e){e$K.animationSampler(e,(function(e){e$2b(e.input)&&(t[e.input]=!0),e$2b(e.output)&&(t[e.output]=!0)}))})),t},m$z.buffer=function(e){var t={};return e$K.bufferView(e,(function(e){e$2b(e.buffer)&&(t[e.buffer]=!0)})),t},m$z.bufferView=function(e){var t={};return e$K.accessor(e,(function(e){e$2b(e.bufferView)&&(t[e.bufferView]=!0)})),e$K.shader(e,(function(e){e$2b(e.bufferView)&&(t[e.bufferView]=!0)})),e$K.image(e,(function(e){e$2b(e.bufferView)&&(t[e.bufferView]=!0),e$K.compressedImage(e,(function(e){e$2b(e.bufferView)&&(t[e.bufferView]=!0)}))})),i$D(e,"KHR_draco_mesh_compression")&&e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$2b(e.extensions)&&e$2b(e.extensions.KHR_draco_mesh_compression)&&(t[e.extensions.KHR_draco_mesh_compression.bufferView]=!0)}))})),t},m$z.mesh=function(e){var t={};return e$K.node(e,(function(i){if(e$2b(i.mesh&&e$2b(e.meshes))){var n=e.meshes[i.mesh];e$2b(n)&&e$2b(n.primitives)&&n.primitives.length>0&&(t[i.mesh]=!0)}})),t},m$z.node=function(e){var t={};return e$K.node(e,(function(i,n){v$x(e,i)||(t[n]=!0)})),e$K.skin(e,(function(e){e$2b(e.skeleton)&&(t[e.skeleton]=!0),e$K.skinJoint(e,(function(e){t[e]=!0}))})),e$K.animation(e,(function(e){e$K.animationChannel(e,(function(e){e$2b(e.target)&&e$2b(e.target.node)&&(t[e.target.node]=!0)}))})),e$K.technique(e,(function(e){e$K.techniqueUniform(e,(function(e){e$2b(e.node)&&(t[e.node]=!0)}))})),t},m$z.material=function(e){var t={};return e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$2b(e.material)&&(t[e.material]=!0)}))})),t};var V$q={.8:se$j,"1.0":Re$d,"2.0":void 0};function re$r(e,t){var i=(t=u$_(t,u$_.EMPTY_OBJECT)).targetVersion,n=e.version;e.asset=u$_(e.asset,{version:"1.0"}),e.asset.version=u$_(e.asset.version,"1.0"),n=u$_(n,e.asset.version).toString(),Object.prototype.hasOwnProperty.call(V$q,n)||(e$2b(n)&&(n=n.substring(0,3)),Object.prototype.hasOwnProperty.call(V$q,n)||(n="1.0"));for(var r=V$q[n];e$2b(r)&&n!==i;)r(e,t),n=e.asset.version,r=V$q[n];return e}function F$F(e){var t=e.materials;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.instanceTechnique;e$2b(r)&&(n.technique=r.technique,n.values=r.values,delete n.instanceTechnique)}}function ie$n(e){var t=e.meshes;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i].primitives;if(e$2b(n))for(var r=n.length,o=0;o<r;++o){var a=n[o],s=u$_(a.primitive,de$x.TRIANGLES);a.mode=u$_(a.mode,s),delete a.primitive}}}function ne$s(e){var t=e.nodes,i=new o$1p,n=new n$13;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var o=t[r];if(e$2b(o.rotation)){var a=o.rotation;o$1p.fromArray(a,0,i),n$13.fromAxisAngle(i,a[3],n),o.rotation=[n.x,n.y,n.z,n.w]}var s=o.instanceSkin;e$2b(s)&&(o.skeletons=s.skeletons,o.skin=s.skin,o.meshes=s.meshes,delete o.instanceSkin)}}function te$n(e){var t=e.animations,i=e.accessors,n=e.bufferViews,r=e.buffers,o={},a=new o$1p,s=new n$13;for(var l in t)if(Object.prototype.hasOwnProperty.call(t,l)){var u=t[l],c=u.channels,h=u.parameters,d=u.samplers;if(e$2b(c))for(var f=c.length,p=0;p<f;++p){var _=c[p];if("rotation"===_.target.path){var m=h[d[_.sampler].output];if(e$2b(o[m]))continue;o[m]=!0;for(var g=i[m],x=n[g.bufferView],v=r[x.buffer].extras._pipeline.source,y=v.byteOffset+x.byteOffset+g.byteOffset,$=g.componentType,b=g.count,T=r$B(g.type),C=g.count*T,S=S$12.createArrayBufferView($,v.buffer,y,C),w=0;w<b;w++){var E=w*T;o$1p.unpack(S,E,a);var P=S[E+3];n$13.fromAxisAngle(a,P,s),n$13.pack(s,S,E)}}}}}function ae$j(e){var t=e.techniques;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.passes;if(e$2b(r)){var o=u$_(n.pass,"defaultPass");if(Object.prototype.hasOwnProperty.call(r,o)){var a=r[o],s=a.instanceProgram;n.attributes=u$_(n.attributes,s.attributes),n.program=u$_(n.program,s.program),n.uniforms=u$_(n.uniforms,s.uniforms),n.states=u$_(n.states,a.states)}delete n.passes,delete n.pass}}}function se$j(e){e$2b(e.asset)||(e.asset={});var t=e.asset;if(t.version="1.0","string"==typeof t.profile){var i=t.profile.split(" ");t.profile={api:i[0],version:i[1]}}else t.profile={};if(e$2b(e.version)&&delete e.version,F$F(e),ie$n(e),ne$s(e),te$n(e),ae$j(e),e$2b(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions),e$2b(e.lights)){var n=u$_(e.extensions,{});e.extensions=n;var r=u$_(n.KHR_materials_common,{});n.KHR_materials_common=r,r.lights=e.lights,delete e.lights,i$C(e,"KHR_materials_common")}}function oe$j(e){var t=e.animations;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.parameters;if(e$2b(r)){var o=n.samplers;for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)){var s=o[a];s.input=r[s.input],s.output=r[s.output]}delete n.parameters}}}function K$y(e,t){var i=[];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];t[n]=i.length,i.push(r),e$2b(r.name)||(r.name=n)}return i}function fe$g(e){var t,i,n={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}},r={},o=e.nodes;for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e$2b(i=o[a].jointName)&&(r[i]=a));for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&e$2b(n[s])){var l={},u=e[s];e[s]=K$y(u,l),n[s]=l}for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&(r[i]=n.nodes[r[i]]);e$2b(e.scene)&&(e.scene=n.scenes[e.scene]),e$K.bufferView(e,(function(e){e$2b(e.buffer)&&(e.buffer=n.buffers[e.buffer])})),e$K.accessor(e,(function(e){e$2b(e.bufferView)&&(e.bufferView=n.bufferViews[e.bufferView])})),e$K.shader(e,(function(e){var t=e.extensions;if(e$2b(t)){var i=t.KHR_binary_glTF;e$2b(i)&&(e.bufferView=n.bufferViews[i.bufferView],delete t.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}})),e$K.program(e,(function(e){e$2b(e.vertexShader)&&(e.vertexShader=n.shaders[e.vertexShader]),e$2b(e.fragmentShader)&&(e.fragmentShader=n.shaders[e.fragmentShader])})),e$K.technique(e,(function(e){e$2b(e.program)&&(e.program=n.programs[e.program]),e$K.techniqueParameter(e,(function(e){e$2b(e.node)&&(e.node=n.nodes[e.node]);var t=e.value;"string"==typeof t&&(e.value={index:n.textures[t]})}))})),e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$2b(e.indices)&&(e.indices=n.accessors[e.indices]),e$K.meshPrimitiveAttribute(e,(function(t,i){e.attributes[i]=n.accessors[t]})),e$2b(e.material)&&(e.material=n.materials[e.material])}))})),e$K.node(e,(function(i){var r=i.children;if(e$2b(r)){var o=r.length;for(t=0;t<o;++t)r[t]=n.nodes[r[t]]}if(e$2b(i.meshes)){var a=i.meshes,s=a.length;if(s>0)for(i.mesh=n.meshes[a[0]],t=1;t<s;++t){var l={mesh:n.meshes[a[t]]},u=d$P(e.nodes,l);e$2b(r)||(r=[],i.children=r),r.push(u)}delete i.meshes}if(e$2b(i.camera)&&(i.camera=n.cameras[i.camera]),e$2b(i.skin)&&(i.skin=n.skins[i.skin]),e$2b(i.skeletons)){var c=i.skeletons;if(c.length>0&&e$2b(i.skin))e.skins[i.skin].skeleton=n.nodes[c[0]];delete i.skeletons}e$2b(i.jointName)&&delete i.jointName})),e$K.skin(e,(function(e){e$2b(e.inverseBindMatrices)&&(e.inverseBindMatrices=n.accessors[e.inverseBindMatrices]);var i=e.jointNames;if(e$2b(i)){var o=[],a=i.length;for(t=0;t<a;++t)o[t]=r[i[t]];e.joints=o,delete e.jointNames}})),e$K.scene(e,(function(e){var i=e.nodes;if(e$2b(i)){var r=i.length;for(t=0;t<r;++t)i[t]=n.nodes[i[t]]}})),e$K.animation(e,(function(e){var t={};e.samplers=K$y(e.samplers,t),e$K.animationSampler(e,(function(e){e.input=n.accessors[e.input],e.output=n.accessors[e.output]})),e$K.animationChannel(e,(function(e){e.sampler=t[e.sampler];var i=e.target;e$2b(i)&&(i.node=n.nodes[i.id],delete i.id)}))})),e$K.material(e,(function(e){e$2b(e.technique)&&(e.technique=n.techniques[e.technique]),e$K.materialValue(e,(function(t,i){"string"==typeof t&&(e.values[i]={index:n.textures[t]})}));var t=e.extensions;if(e$2b(t)){var i=t.KHR_materials_common;e$2b(i)&&e$K.materialValue(i,(function(e,t){"string"==typeof e&&(i.values[t]={index:n.textures[e]})}))}})),e$K.image(e,(function(e){var t=e.extensions;if(e$2b(t)){var i=t.KHR_binary_glTF;e$2b(i)&&(e.bufferView=n.bufferViews[i.bufferView],e.mimeType=i.mimeType,delete t.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}e$K.compressedImage(e,(function(e){var i=e.extensions;if(e$2b(i)){var r=i.KHR_binary_glTF;e$2b(r)&&(e.bufferView=n.bufferViews[r.bufferView],e.mimeType=r.mimeType,delete i.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}}))})),e$K.texture(e,(function(e){e$2b(e.sampler)&&(e.sampler=n.samplers[e.sampler]),e$2b(e.source)&&(e.source=n.images[e.source])}))}function ue$l(e){e$K.animation(e,(function(e){e$K.animationSampler(e,(function(e){delete e.name}))}))}function ve$g(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];Array.isArray(i)&&0===i.length&&delete e[t]}e$K.node(e,(function(e){e$2b(e.children)&&0===e.children.length&&delete e.children}))}function ce$j(e){var t=e.asset;delete t.profile,delete t.premultipliedAlpha}var me$i={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function pe$i(e){var t=e.extensionsUsed;if(e.extensionsRequired=u$_(e.extensionsRequired,[]),e$2b(t))for(var i=t.length,n=0;n<i;++n){var r=t[n];e$2b(me$i[r])&&e.extensionsRequired.push(r)}}function be$i(e){e$K.buffer(e,(function(e){delete e.type}))}function he$g(e){e$K.texture(e,(function(e){delete e.format,delete e.internalFormat,delete e.target,delete e.type}))}function ye$c(e){e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$K.meshPrimitiveAttribute(e,(function(t,i){"TEXCOORD"===i?e.attributes.TEXCOORD_0=t:"COLOR"===i&&(e.attributes.COLOR_0=t)})),delete e.attributes.TEXCOORD,delete e.attributes.COLOR}))})),e$K.technique(e,(function(e){e$K.techniqueParameter(e,(function(e){var t=e.semantic;e$2b(t)&&("TEXCOORD"===t?e.semantic="TEXCOORD_0":"COLOR"===t&&(e.semantic="COLOR_0"))}))}))}var Oe$d={POSITION:!0,NORMAL:!0,TANGENT:!0},le$n={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function de$g(e){var t={};e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){for(var i in e$K.meshPrimitiveAttribute(e,(function(e,i){if("_"!==i.charAt(0)){var n=i.search(/_[0-9]+/g),r=i,o="_0";n>=0&&(r=i.substring(0,n),o=i.substring(n));var a,s=le$n[r];e$2b(s)?(a=s+o,t[i]=a):e$2b(Oe$d[r])||(a="_"+i,t[i]=a)}})),t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=e.attributes[i];e$2b(r)&&(delete e.attributes[i],e.attributes[n]=r)}}))})),e$K.technique(e,(function(e){e$K.techniqueParameter(e,(function(e){var i=t[e.semantic];e$2b(i)&&(e.semantic=i)}))}))}function Te$e(e){e$K.camera(e,(function(e){var t=e.perspective;if(e$2b(t)){var i=t.aspectRatio;e$2b(i)&&0===i&&delete t.aspectRatio;var n=t.yfov;e$2b(n)&&0===n&&(t.yfov=1)}}))}function C$C(e,t){return e$2b(t.byteStride)&&0!==t.byteStride?t.byteStride:p$A(e,t)}function we$e(e){e$K.buffer(e,(function(e){e$2b(e.byteLength)||(e.byteLength=e.extras._pipeline.source.length)})),e$K.accessor(e,(function(t){var i=t.bufferView;if(e$2b(i)){var n=e.bufferViews[i],r=C$C(e,t),o=t.byteOffset+t.count*r;n.byteLength=Math.max(u$_(n.byteLength,0),o)}}))}function xe$c(e){var t,i,n,r=e.bufferViews,o={};e$K.accessorContainingVertexAttributeData(e,(function(t){var i=e.accessors[t];e$2b(i.bufferView)&&(o[i.bufferView]=!0)}));var a={};for(var s in e$K.accessor(e,(function(e){e$2b(e.bufferView)&&(a[e.bufferView]=u$_(a[e.bufferView],[]),a[e.bufferView].push(e))})),a)if(Object.prototype.hasOwnProperty.call(a,s)){n=r[s];var l=a[s];l.sort((function(e,t){return e.byteOffset-t.byteOffset}));var u=0,c=0,h=l.length;for(t=0;t<h;++t){var d=l[t],f=C$C(e,d),p=d.byteOffset,_=d.count*f;delete d.byteStride;var m=t<h-1;if(f!==(m?C$C(e,l[t+1]):void 0)){var g=l$1g(n,!0);o[s]&&(g.byteStride=f),g.byteOffset+=u,g.byteLength=p+_-u;var x=d$P(r,g);for(i=c;i<=t;++i)(d=l[i]).bufferView=x,d.byteOffset=d.byteOffset-u;u=m?l[t+1].byteOffset:void 0,c=t+1}}}d$L(e,["accessor","bufferView","buffer"])}function Ae$f(e){e$K.accessorWithSemantic(e,"POSITION",(function(t){var i=e.accessors[t];if(!e$2b(i.min)||!e$2b(i.max)){var n=B$y(e,i);i.min=n.min,i.max=n.max}}))}function D$A(e){return(!e$2b(e.children)||0===e.children.length)&&(!e$2b(e.meshes)||0===e.meshes.length)&&!e$2b(e.camera)&&!e$2b(e.skin)&&!e$2b(e.skeletons)&&!e$2b(e.jointName)&&(!e$2b(e.translation)||o$1p.fromArray(e.translation).equals(o$1p.ZERO))&&(!e$2b(e.scale)||o$1p.fromArray(e.scale).equals(new o$1p(1,1,1)))&&(!e$2b(e.rotation)||e$29.fromArray(e.rotation).equals(new e$29(0,0,0,1)))&&(!e$2b(e.matrix)||p$1d.fromColumnMajorArray(e.matrix).equals(p$1d.IDENTITY))&&!e$2b(e.extensions)&&!e$2b(e.extras)}function L$G(e,t){e$K.scene(e,(function(e){var i=e.nodes;if(e$2b(i))for(var n=i.length;n>=0;--n)if(i[n]===t)return void i.splice(n,1)})),e$K.node(e,(function(i,n){if(e$2b(i.children)){var r=i.children.indexOf(t);r>-1&&(i.children.splice(r,1),D$A(i)&&L$G(e,n))}})),delete e.nodes[t]}function _e$h(e){return e$K.node(e,(function(t,i){D$A(t)&&L$G(e,i)})),e}function Pe$a(e){e$K.animation(e,(function(t){e$K.animationSampler(t,(function(t){var i=e.accessors[t.input];if(!e$2b(i.min)||!e$2b(i.max)){var n=B$y(e,i);i.min=n.min,i.max=n.max}}))}))}function Re$d(e){e.asset=u$_(e.asset,{}),e.asset.version="2.0",F$F(e),oe$j(e),_e$h(e),fe$g(e),ue$l(e),ce$j(e),pe$i(e),we$e(e),xe$c(e),Ae$f(e),Pe$a(e),be$i(e),he$g(e),ye$c(e),de$g(e),T$y(e),Te$e(e),R$v(e),R$u(e),ve$g(e)}function t$u(){this.initialized=!1,this.resourcesParsed=!1,this.vertexBuffersToCreate=new r$16,this.indexBuffersToCreate=new r$16,this.buffers={},this.pendingBufferLoads=0,this.programsToCreate=new r$16,this.shaders={},this.pendingShaderLoads=0,this.texturesToCreate=new r$16,this.pendingTextureLoads=0,this.texturesToCreateFromBufferView=new r$16,this.pendingBufferViewToImage=0,this.createSamplers=!0,this.createSkins=!0,this.createRuntimeAnimations=!0,this.createVertexArrays=!0,this.createRenderStates=!0,this.createUniformMaps=!0,this.createRuntimeNodes=!0,this.createdBufferViews={},this.primitivesToDecode=new r$16,this.activeDecodingTasks=0,this.pendingDecodingCache=!1,this.skinnedNodesIds=[]}function s$w(e,t,i){return e.subarray(t,t+i)}t$u.prototype.getBuffer=function(e){return s$w(this.buffers[e.buffer],e.byteOffset,e.byteLength)},t$u.prototype.finishedPendingBufferLoads=function(){return 0===this.pendingBufferLoads},t$u.prototype.finishedBuffersCreation=function(){return 0===this.pendingBufferLoads&&0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length},t$u.prototype.finishedProgramCreation=function(){return 0===this.pendingShaderLoads&&0===this.programsToCreate.length},t$u.prototype.finishedTextureCreation=function(){var e=0===this.pendingTextureLoads,t=0===this.texturesToCreate.length&&0===this.texturesToCreateFromBufferView.length;return e&&t},t$u.prototype.finishedEverythingButTextureCreation=function(){var e=0===this.pendingBufferLoads&&0===this.pendingShaderLoads,t=0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length&&0===this.programsToCreate.length&&0===this.pendingBufferViewToImage;return this.finishedDecoding()&&e&&t},t$u.prototype.finishedDecoding=function(){return 0===this.primitivesToDecode.length&&0===this.activeDecodingTasks&&!this.pendingDecodingCache},t$u.prototype.finished=function(){return this.finishedDecoding()&&this.finishedTextureCreation()&&this.finishedEverythingButTextureCreation()};var s$v={updateForwardAxis:function(e){var t=e.gltf.extras.sourceVersion;(e$2b(t)&&"2.0"!==t||"2.0"!==s$v.getAssetVersion(e.gltf))&&(e._gltfForwardAxis=v$y.X)},getAssetVersion:function(e){return e$2b(e.asset)&&e$2b(e.asset.version)?e.asset.version:"1.0"},splitIncompatibleMaterials:function(e){var t=e.accessors,i=e.materials,n={};return e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){var r,o,a=e.material,s=i[a],l=e.attributes.JOINTS_0;if(e$2b(l)){var u=t[l];r=u.componentType,o=u.type}var c=e$2b(l),h=e$2b(e.attributes.COLOR_0),d=e$2b(e.targets),f=e$2b(e.attributes.NORMAL),p=e$2b(e.attributes.TANGENT),_=e$2b(e.attributes.TEXCOORD_0),m=_&&e$2b(e.attributes.TEXCOORD_1),g=n[a];if(e$2b(g)){if(g.skinning.skinned!==c||g.skinning.type!==o||g.hasVertexColors!==h||g.hasMorphTargets!==d||g.hasNormals!==f||g.hasTangents!==p||g.hasTexCoords!==_||g.hasTexCoord1!==m){var x=l$1g(s,!0);a=d$P(i,x),e.material=a,n[a]={skinning:{skinned:c,componentType:r,type:o},hasVertexColors:h,hasMorphTargets:d,hasNormals:f,hasTangents:p,hasTexCoords:_,hasTexCoord1:m}}}else n[a]={skinning:{skinned:c,componentType:r,type:o},hasVertexColors:h,hasMorphTargets:d,hasNormals:f,hasTangents:p,hasTexCoords:_,hasTexCoord1:m}}))})),n},getShaderVariable:function(e){return"SCALAR"===e?"float":e.toLowerCase()},ModelState:{NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3},getFailedLoadFunction:function(e,t,i){return function(n){e._state=s$v.ModelState.FAILED;var r="Failed to load "+t+": "+i;e$2b(n)&&(r+="\n"+n.message),e._readyPromise.reject(new t$14(r))}},parseBuffers:function(e,t){var i=e._loadResources;e$K.buffer(e.gltf,(function(n,r){if(e$2b(n.extras._pipeline.source))i.buffers[r]=n.extras._pipeline.source;else if(e$2b(t)){var o=e._resource.getDerivedResource({url:n.uri});++i.pendingBufferLoads,o.fetchArrayBuffer().then(t(e,r)).otherwise(s$v.getFailedLoadFunction(e,"buffer",o.url))}}))}},cn$1=new o$1p,fn$1=new o$1p;function vn$1(e,t){return e$K.techniqueAttribute(e,(function(e,i){if(e.semantic===t)return i}))}function _n$1(e,t){var i=e.accessors,n=e.materials,r=e.extensions.KHR_techniques_webgl,o=r.techniques,a=r.programs,s=r.shaders,l=t.targets,u=t.attributes;for(var c in l)if(l.hasOwnProperty(c)){var h=l[c];for(var d in h)"extras"!==d&&(u[d+"_"+c]=h[d])}var f=o[n[t.material].extensions.KHR_techniques_webgl.technique],p=s[a[f.program].vertexShader];for(var _ in u)if(u.hasOwnProperty(_)&&!e$2b(vn$1(f,_))){var m=i[u[_]],g=_.toLowerCase();"_"===g.charAt(0)&&(g=g.slice(1));var x="a_"+g;f.attributes[x]={semantic:_,type:m.componentType};var v=p.extras._pipeline,y=v.source;y="attribute "+s$v.getShaderVariable(m.type)+" "+x+";\n"+y,v.source=y}}function tn$2(e,t,i,n){return i$D(e,"KHR_techniques_webgl")?function(e,t){if(!(e.semantic!==i||n&&e$2b(e.node)))return t}:function(e,r){var o=t.parameters[e];if(!(o.semantic!==i||n&&e$2b(o.node)))return r}}s$v.computeBoundingSphere=function(e){for(var t=e.gltf,i=t.nodes,n=t.meshes,r=t.scenes[t.scene].nodes,o=r.length,a=[],s=new o$1p(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),l=new o$1p(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),u=0;u<o;++u){var c=i[r[u]];for(c._transformToRoot=s$v.getTransform(c),a.push(c);a.length>0;){var h=(c=a.pop())._transformToRoot,d=c.mesh;if(e$2b(d))for(var f=n[d].primitives,p=f.length,_=0;_<p;++_){var m=f[_].attributes.POSITION;if(e$2b(m)){var g=s$v.getAccessorMinMax(t,m),x=o$1p.fromArray(g.min,0,cn$1),v=o$1p.fromArray(g.max,0,fn$1);e$2b(s)&&e$2b(l)&&(p$1d.multiplyByPoint(h,x,x),p$1d.multiplyByPoint(h,v,v),o$1p.minimumByComponent(s,x,s),o$1p.maximumByComponent(l,v,l))}}var y=c.children;if(e$2b(y))for(var $=y.length,b=0;b<$;++b){var T=i[y[b]];T._transformToRoot=s$v.getTransform(T),p$1d.multiplyTransformation(h,T._transformToRoot,T._transformToRoot),a.push(T)}delete c._transformToRoot}}var C=i$1c.fromCornerPoints(s,l);return e._minCorner=s,e._maxCorner=l,e._forwardAxis===v$y.Z&&i$1c.transformWithoutScale(C,v$y.Z_UP_TO_X_UP,C),e._upAxis===v$y.Y?i$1c.transformWithoutScale(C,v$y.Y_UP_TO_Z_UP,C):e._upAxis===v$y.X&&i$1c.transformWithoutScale(C,v$y.X_UP_TO_Z_UP,C),C},s$v.ensureSemanticExistence=function(e){return e$K.mesh(e,(function(t){e$K.meshPrimitive(t,(function(t){_n$1(e,t)}))})),e},s$v.createAttributeLocations=function(e,t){var i={},n=!1,r=1;if(e$K.techniqueAttribute(e,(function(e,t){/pos/i.test(t)&&!n?(i[t]=0,n=!0):i[t]=r++})),e$2b(t))for(var o in t)t.hasOwnProperty(o)&&(i[o]=r++);return i},s$v.getAccessorMinMax=function(e,t){var i=e.accessors[t],n=i.extensions,r=i.min,o=i.max;if(e$2b(n)){var a=n.WEB3D_quantized_attributes;e$2b(a)&&(r=a.decodedMin,o=a.decodedMax)}return{min:r,max:o}},s$v.getAttributeOrUniformBySemantic=function(e,t,i,n){return e$K.technique(e,(function(r){if(!e$2b(i)||r.program===i){var o=e$K.techniqueAttribute(r,tn$2(e,r,t,n));return e$2b(o)?o:e$K.techniqueUniform(r,tn$2(e,r,t,n))}}))},s$v.getDiffuseAttributeOrUniform=function(e,t){var i=s$v.getAttributeOrUniformBySemantic(e,"COLOR_0",t);return e$2b(i)||(i=s$v.getAttributeOrUniformBySemantic(e,"_3DTILESDIFFUSE",t)),i};var ln$1=new o$1p,mn$1=new n$13,hn$1=new o$1p;function N$r(e,t,i){t+="(?!\\w)",t=new RegExp(t,"g");var n=e.search(t);return e.replace(t,(function(e,t){return n===t?e:i}))}function En$1(e,t){var i=e.accessors[t].extensions;if(e$2b(i))return i.WEB3D_quantized_attributes}function on$1(e,t,i){var n=t.material,r=e.materials[n];if(i$D(e,"KHR_techniques_webgl")&&e$2b(r.extensions)&&e$2b(r.extensions.KHR_techniques_webgl)){var o=r.extensions.KHR_techniques_webgl.technique,a=e.extensions.KHR_techniques_webgl.techniques[o];return e$K.techniqueAttribute(a,(function(e,t){if(e.semantic===i)return t}))}}function D$z(e){var t={value:e,clone:function(e,t){return e},func:function(){return t.value}};return t}function K$x(e){var t={value:o$1o.fromArray(e),clone:o$1o.clone,func:function(){return t.value}};return t}function X$t(e){var t={value:o$1p.fromArray(e),clone:o$1p.clone,func:function(){return t.value}};return t}function d$K(e){var t={value:e$29.fromArray(e),clone:e$29.clone,func:function(){return t.value}};return t}function Y$r(e){var t={value:f$13.fromColumnMajorArray(e),clone:f$13.clone,func:function(){return t.value}};return t}function Z$x(e){var t={value:p$1e.fromColumnMajorArray(e),clone:p$1e.clone,func:function(){return t.value}};return t}function G$C(e){var t={value:p$1d.fromColumnMajorArray(e),clone:p$1d.clone,func:function(){return t.value}};return t}s$v.getTransform=function(e,t){return e$2b(e.matrix)?p$1d.fromColumnMajorArray(e.matrix,t):p$1d.fromTranslationQuaternionRotationScale(o$1p.fromArray(e.translation,0,ln$1),n$13.unpack(e.rotation,0,mn$1),o$1p.fromArray(e.scale,0,hn$1),t)},s$v.getUsedExtensions=function(e){var t=e.extensionsUsed,i={};if(e$2b(t))for(var n=t.length,r=0;r<n;r++){i[t[r]]=!0}return i},s$v.getRequiredExtensions=function(e){var t=e.extensionsRequired,i={};if(e$2b(t))for(var n=t.length,r=0;r<n;r++){i[t[r]]=!0}return i},s$v.supportedExtensions={AGI_articulations:!0,CESIUM_RTC:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_binary_glTF:!0,KHR_draco_mesh_compression:!0,KHR_materials_common:!0,KHR_techniques_webgl:!0,KHR_materials_unlit:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_texture_transform:!0,WEB3D_quantized_attributes:!0},s$v.checkSupportedExtensions=function(e,t){for(var i in e)if(e.hasOwnProperty(i)){if(!s$v.supportedExtensions[i])throw new t$14("Unsupported glTF Extension: "+i);if("EXT_texture_webp"===i&&!1===t)throw new t$14("Loaded model requires WebP but browser does not support it.")}},s$v.checkSupportedGlExtensions=function(e,t){if(e$2b(e))for(var i=e.length,n=0;n<i;n++){var r=e[n];if("OES_element_index_uint"!==r)throw new t$14("Unsupported WebGL Extension: "+r);if(!t.elementIndexUint)throw new t$14("OES_element_index_uint WebGL extension is not enabled.")}},s$v.modifyShaderForDracoQuantizedAttributes=function(e,t,i,n){var r={};for(var o in n)if(n.hasOwnProperty(o)){var a=n[o],s=a.quantization;if(!e$2b(s))continue;var l=on$1(e,t,o);"_"===o.charAt(0)&&(o=o.substring(1));var u="gltf_u_dec_"+o.toLowerCase();if(!e$2b(r[u])){var c,h="gltf_decoded_"+o,d=l.replace("a_","gltf_a_dec_"),f=a.componentsPerAttribute;i=N$r(i,l,d),i=(c=s.octEncoded?"vec3":f>1?"vec"+f:"float")+" "+d+";\n"+i;var p=3===f&&"COLOR_0"===o;p&&(i=N$r(i,d,"vec4("+d+", 1.0)"));var _="";if(s.octEncoded){var m=u+"_rangeConstant";i="uniform float "+m+";\n"+i,_="\nvoid main() {\n "+d+" = czm_octDecode("+l+".xy, "+m+").zxy;\n "+h+"();\n}\n"}else{var g=u+"_normConstant",x=u+"_min";i="uniform float "+g+";\nuniform "+c+" "+x+";\n"+i,_="\nvoid main() {\n "+d+" = "+x+" + "+l+(p?".xyz":"")+" * "+g+";\n "+h+"();\n}\n"}i=s$U.replaceMain(i,h),i+=_}}return{shader:i}},s$v.modifyShaderForQuantizedAttributes=function(e,t,i){var n={},r=t.attributes;for(var o in r)if(r.hasOwnProperty(o)){var a=on$1(e,t,o),s=t.attributes[o];"_"===o.charAt(0)&&(o=o.substring(1));var l="gltf_u_dec_"+o.toLowerCase(),u=l+"_scale",c=l+"_translate";if(!e$2b(n[l])&&!e$2b(n[u])){var h=En$1(e,s);if(e$2b(h)){var d,f=h.decodeMatrix,p="gltf_decoded_"+o,_=a.replace("a_","gltf_a_dec_"),m=Math.floor(Math.sqrt(f.length));i=(d=m>2?"vec"+(m-1):"float")+" "+_+";\n"+(i=N$r(i,a,_));var g="";5===m?(i="uniform vec4 "+c+";\n"+(i="uniform mat4 "+u+";\n"+i),g="\nvoid main() {\n "+_+" = "+u+" * "+a+" + "+c+";\n "+p+"();\n}\n",n[u]={mat:4},n[c]={vec:4}):(i="uniform mat"+m+" "+l+";\n"+i,g="\nvoid main() {\n "+_+" = "+d+"("+l+" * vec"+m+"("+a+",1.0));\n "+p+"();\n}\n",n[l]={mat:m}),i=s$U.replaceMain(i,p),i+=g}}}return{shader:i,uniforms:n}},s$v.toClipCoordinatesGLSL=function(e,t){var i=s$v.getAttributeOrUniformBySemantic(e,"POSITION"),n=i.replace("a_","gltf_a_dec_");-1!==t.indexOf(n)&&(i=n);var r=s$v.getAttributeOrUniformBySemantic(e,"MODELVIEWPROJECTION",void 0,!0);if(!e$2b(r)||-1===t.indexOf(r)){var o=s$v.getAttributeOrUniformBySemantic(e,"PROJECTION",void 0,!0),a=s$v.getAttributeOrUniformBySemantic(e,"MODELVIEW",void 0,!0);-1!==t.indexOf("czm_instanced_modelView ")?a="czm_instanced_modelView":e$2b(a)||(a=s$v.getAttributeOrUniformBySemantic(e,"CESIUM_RTC_MODELVIEW",void 0,!0)),r=o+" * "+a}return r+" * vec4("+i+".xyz, 1.0)"},s$v.modifyFragmentShaderForLogDepth=function(e){return e=s$U.replaceMain(e,"czm_depth_main"),e+="\nvoid main() \n{ \n czm_depth_main(); \n czm_writeLogDepth(); \n} \n"},s$v.modifyVertexShaderForLogDepth=function(e,t){return e=s$U.replaceMain(e,"czm_depth_main"),e+="\nvoid main() \n{ \n czm_depth_main(); \n czm_vertexLogDepth("+t+"); \n} \n"};var R$t=new e$29;function un$1(e){var t={value:e,clone:e$29.clone,func:function(){var e=performance.now()/1e3,i=t.value[4];if(i>0){var n=e%i;R$t.x=n*t.value[0]+t.value[1],R$t.y=n*t.value[2]+t.value[3]}else R$t.x=t.value[1],R$t.y=t.value[3];var r=t.value[9];if(r>0){var o=e%r;R$t.z=o*t.value[5]+t.value[6],R$t.w=o*t.value[7]+t.value[8]}else R$t.z=t.value[6],R$t.w=t.value[8];return R$t}};return t}function j$y(e,t,i){this._value=void 0,this._textureId=e.index,this._textures=t,this._defaultTexture=i}function pn$1(e,t,i){var n=new j$y(e,t,i);return n.func=function(){return n.value._texture?n.value:i},n}Object.defineProperties(j$y.prototype,{value:{get:function(){if(!e$2b(this._value)){var e=this._textures[this._textureId];if(!e$2b(e))return this._defaultTexture;this._value=e}return this._value},set:function(e){this._value=e}}}),j$y.prototype.clone=function(e){return e},j$y.prototype.func=void 0;var A$E={};A$E[de$x.FLOAT]=D$z,A$E[de$x.FLOAT_VEC2]=K$x,A$E[de$x.FLOAT_VEC3]=X$t,A$E[de$x.FLOAT_VEC4]=d$K,A$E[de$x.INT]=D$z,A$E[de$x.INT_VEC2]=K$x,A$E[de$x.INT_VEC3]=X$t,A$E[de$x.INT_VEC4]=d$K,A$E[de$x.BOOL]=D$z,A$E[de$x.BOOL_VEC2]=K$x,A$E[de$x.BOOL_VEC3]=X$t,A$E[de$x.BOOL_VEC4]=d$K,A$E[de$x.FLOAT_MAT2]=Y$r,A$E[de$x.FLOAT_MAT3]=Z$x,A$E[de$x.FLOAT_MAT4]=G$C,A$E[de$x.SAMPLER_2D]=pn$1;var z$x={};function gn$1(e){return[e[0],e[1],e[2],e[3],e[5],e[6],e[7],e[8],e[10],e[11],e[12],e[13],e[15],e[16],e[17],e[18]]}function On$1(e){return[e[20],e[21],e[22],e[23]]}z$x[ie$p.BASECOLOR_UV_OFFSET_AND_TILING]=un$1,z$x[ie$p.EMISSIVE_UV_OFFSET_AND_TILING]=un$1,s$v.createUniformFunction=function(e,t,i,n,r){return e$2b(r)?z$x[r](t,i,n):A$E[e](t,i,n)},s$v.createUniformsForDracoQuantizedAttributes=function(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i],r=n.quantization;if(!e$2b(r))continue;"_"===i.charAt(0)&&(i=i.substring(1));var o="gltf_u_dec_"+i.toLowerCase();if(r.octEncoded){var a=o+"_rangeConstant",s=(1<<r.quantizationBits)-1;t[a]=D$z(s).func;continue}var l=o+"_normConstant",u=r.range/(1<<r.quantizationBits);t[l]=D$z(u).func;var c=o+"_min";switch(n.componentsPerAttribute){case 1:t[c]=D$z(r.minValues).func;break;case 2:t[c]=K$x(r.minValues).func;break;case 3:t[c]=X$t(r.minValues).func;break;case 4:t[c]=d$K(r.minValues).func}}return t},s$v.createUniformsForQuantizedAttributes=function(e,t,i){var n=e.accessors,r={},o={},a=t.attributes;for(var s in a)if(a.hasOwnProperty(s)){var l=n[a[s]],u=l.extensions;if("_"===s.charAt(0)&&(s=s.substring(1)),e$2b(u)){var c=u.WEB3D_quantized_attributes;if(e$2b(c)){var h=c.decodeMatrix,d="gltf_u_dec_"+s.toLowerCase();switch(l.type){case Q$y.SCALAR:o[d]=Y$r(h).func,r[d]=!0;break;case Q$y.VEC2:o[d]=Z$x(h).func,r[d]=!0;break;case Q$y.VEC3:o[d]=G$C(h).func,r[d]=!0;break;case Q$y.VEC4:var f=d+"_scale",p=d+"_translate";o[f]=G$C(gn$1(h)).func,o[p]=d$K(On$1(h)).func,r[f]=!0,r[p]=!0}}}}for(var _ in i)if(i.hasOwnProperty(_)&&!r[_]){var m=i[_];e$2b(m.mat)&&(2===m.mat?o[_]=Y$r(f$13.IDENTITY).func:3===m.mat?o[_]=Z$x(p$1e.IDENTITY).func:4===m.mat&&(o[_]=G$C(p$1d.IDENTITY).func)),e$2b(m.vec)&&4===m.vec&&(o[_]=d$K([0,0,0,0]).func)}return o};var B$x=new o$1p,Tn$1={MODEL:function(e,t){return function(){return e.model}},VIEW:function(e,t){return function(){return e.view}},PROJECTION:function(e,t){return function(){return e.projection}},MODELVIEW:function(e,t){return function(){return e.modelView}},CESIUM_RTC_MODELVIEW:function(e,t){var i=new p$1d;return function(){return e$2b(t._rtcCenter)?(p$1d.getTranslation(e.model,B$x),o$1p.add(B$x,t._rtcCenter,B$x),p$1d.multiplyByPoint(e.view,B$x,B$x),p$1d.setTranslation(e.modelView,B$x,i)):e.modelView}},MODELVIEWPROJECTION:function(e,t){return function(){return e.modelViewProjection}},MODELINVERSE:function(e,t){return function(){return e.inverseModel}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t){return function(){return e.inverseModelView}},MODELVIEWPROJECTIONINVERSE:function(e,t){return function(){return e.inverseModelViewProjection}},MODELINVERSETRANSPOSE:function(e,t){return function(){return e.inverseTransposeModel}},MODELVIEWINVERSETRANSPOSE:function(e,t){return function(){return e.normal}},VIEWPORT:function(e,t){return function(){return e.viewportCartesian4}}};function ue$k(e,t){if(t=u$_(t,{}),e$2b(e)&&i$D(e,"KHR_materials_common")){i$D(e,"KHR_techniques_webgl")||(e$2b(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl"));var i=e.extensions.KHR_techniques_webgl;le$m(e);var n=ve$f(e),r=s$v.splitIncompatibleMaterials(e),o={},a=!1;return e$K.material(e,(function(s,l){if(e$2b(s.extensions)&&e$2b(s.extensions.KHR_materials_common)){var u=s.extensions.KHR_materials_common,c=r[l],h=_e$g(u,c),d=o[h];e$2b(d)||(d=fe$f(e,i,c,u,n,t.addBatchIdToGeneratedShaders),o[h]=d,a=!0);var f={},p=u.values;for(var _ in p)p.hasOwnProperty(_)&&"transparent"!==_&&"doubleSided"!==_&&(f["u_"+_.toLowerCase()]=p[_]);s.extensions.KHR_techniques_webgl={technique:d,values:f},s.alphaMode="OPAQUE",u.transparent&&(s.alphaMode="BLEND"),u.doubleSided&&(s.doubleSided=!0)}})),a&&s$v.ensureSemanticExistence(e),e}}function ve$f(e){var t,i={};if(e$2b(e.extensions)&&e$2b(e.extensions.KHR_materials_common)&&(t=e.extensions.KHR_materials_common.lights),e$2b(t)){var n=e.nodes;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];if(e$2b(o.extensions)&&e$2b(o.extensions.KHR_materials_common)){var a=o.extensions.KHR_materials_common.light;e$2b(a)&&e$2b(t[a])&&(t[a].node=r),delete o.extensions.KHR_materials_common}}var s=0;for(var l in t)if(t.hasOwnProperty(l)){var u=t[l],c=u.type;if("ambient"!==c&&!e$2b(u.node)){delete t[l];continue}var h="light"+s.toString();switch(u.baseName=h,c){case"ambient":var d=u.ambient;i[h+"Color"]={type:de$x.FLOAT_VEC3,value:d.color};break;case"directional":var f=u.directional;i[h+"Color"]={type:de$x.FLOAT_VEC3,value:f.color},e$2b(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$x.FLOAT_MAT4});break;case"point":var p=u.point;i[h+"Color"]={type:de$x.FLOAT_VEC3,value:p.color},e$2b(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$x.FLOAT_MAT4}),i[h+"Attenuation"]={type:de$x.FLOAT_VEC3,value:[p.constantAttenuation,p.linearAttenuation,p.quadraticAttenuation]};break;case"spot":var _=u.spot;i[h+"Color"]={type:de$x.FLOAT_VEC3,value:_.color},e$2b(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$x.FLOAT_MAT4},i[h+"InverseTransform"]={node:u.node,semantic:"MODELVIEWINVERSE",type:de$x.FLOAT_MAT4,useInFragment:!0}),i[h+"Attenuation"]={type:de$x.FLOAT_VEC3,value:[_.constantAttenuation,_.linearAttenuation,_.quadraticAttenuation]},i[h+"FallOff"]={type:de$x.FLOAT_VEC2,value:[_.fallOffAngle,_.fallOffExponent]}}++s}}return i}function fe$f(e,t,i,n,r,o){e$2b(n)||(n={}),o=u$_(o,!1);var a,s=t.techniques,l=t.shaders,u=t.programs,c=n.technique.toUpperCase();e$2b(e.extensions)&&e$2b(e.extensions.KHR_materials_common)&&(a=e.extensions.KHR_materials_common.lights);var h,d=n.values,f=u$_(n.jointCount,0),p=!1,_=!1;e$2b(i)&&(p=(h=i.skinning).skinned,_=i.hasVertexColors);var m="precision highp float;\n",g="precision highp float;\n",x="CONSTANT"!==c,v={u_modelViewMatrix:{semantic:i$D(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:de$x.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:de$x.FLOAT_MAT4}};x&&(v.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:de$x.FLOAT_MAT3}),p&&(v.u_jointMatrix={count:f,semantic:"JOINTMATRIX",type:de$x.FLOAT_MAT4});var y,$=!1;for(var b in d)if(d.hasOwnProperty(b)&&"transparent"!==b&&"doubleSided"!==b){var T=ne$r(b,d[b]);y="u_"+b.toLowerCase(),!$&&T===de$x.SAMPLER_2D&&($=!0),v[y]={type:T}}if(e$2b(v.u_diffuse)&&(v.u_diffuse.semantic="_3DTILESDIFFUSE"),e$2b(r))for(var C in r)r.hasOwnProperty(C)&&(v[y="u_"+C]=r[C]);for(y in v)if(v.hasOwnProperty(y)){var S=v[y],w=e$2b(S.count)?"["+S.count+"]":"";S.type!==de$x.FLOAT_MAT3&&S.type!==de$x.FLOAT_MAT4||S.useInFragment?(g+="uniform "+t$x(S.type)+" "+y+w+";\n",delete S.useInFragment):m+="uniform "+t$x(S.type)+" "+y+w+";\n"}var E="";if(p){var P,A,L=r$B(h.type),M=!1;if(0===h.type.indexOf("MAT")&&(M=!0,L=Math.sqrt(L)),M)for(P=0;P<L;P++)for(A=0;A<L;A++)E+=0===P&&0===A?" mat4 skinMat = ":" skinMat += ",E+="a_weight["+P+"]["+A+"] * u_jointMatrix[int(a_joint["+P+"]["+A+"])];\n";else for(P=0;P<L;P++)E+=0===P?" mat4 skinMat = ":" skinMat += ",E+="a_weight["+P+"] * u_jointMatrix[int(a_joint["+P+"])];\n"}var R,I={a_position:{semantic:"POSITION"}};if(m+="attribute vec3 a_position;\n",m+="varying vec3 v_positionEC;\n",E+=p?" vec4 pos = u_modelViewMatrix * skinMat * vec4(a_position,1.0);\n":" vec4 pos = u_modelViewMatrix * vec4(a_position,1.0);\n",E+=" v_positionEC = pos.xyz;\n",E+=" gl_Position = u_projectionMatrix * pos;\n",g+="varying vec3 v_positionEC;\n",x&&(I.a_normal={semantic:"NORMAL"},m+="attribute vec3 a_normal;\n",m+="varying vec3 v_normal;\n",E+=p?" v_normal = u_normalMatrix * mat3(skinMat) * a_normal;\n":" v_normal = u_normalMatrix * a_normal;\n",g+="varying vec3 v_normal;\n"),$&&(I.a_texcoord_0={semantic:"TEXCOORD_0"},m+="attribute vec2 a_texcoord_0;\n",m+="varying vec2 "+(R="v_texcoord_0")+";\n",E+=" "+R+" = a_texcoord_0;\n",g+="varying vec2 "+R+";\n"),p){var O=s$v.getShaderVariable(h.type);I.a_joint={semantic:"JOINT"},I.a_weight={semantic:"WEIGHT"},m+="attribute "+O+" a_joint;\n",m+="attribute "+O+" a_weight;\n"}_&&(I.a_vertexColor={semantic:"COLOR_0"},m+="attribute vec4 a_vertexColor;\n",m+="varying vec4 v_vertexColor;\n",E+=" v_vertexColor = a_vertexColor;\n",g+="varying vec4 v_vertexColor;\n"),o&&(I.a_batchId={semantic:"_BATCHID"},m+="attribute float a_batchId;\n");var D=x&&("BLINN"===c||"PHONG"===c)&&e$2b(v.u_specular)&&e$2b(v.u_shininess)&&v.u_shininess>0,B=!1,N=!1,F="";for(var U in a)if(a.hasOwnProperty(U)){var z=a[U],G=z.type.toLowerCase(),V=z.baseName;F+=" {\n";var k,W,H="u_"+V+"Color";"ambient"===G?(N=!0,F+=" ambientLight += "+H+";\n"):x&&(B=!0,k="v_"+V+"Direction",W="v_"+V+"Position","point"!==G&&(m+="varying vec3 "+k+";\n",g+="varying vec3 "+k+";\n",E+=" "+k+" = mat3(u_"+V+"Transform) * vec3(0.,0.,1.);\n","directional"===G&&(F+=" vec3 l = normalize("+k+");\n")),"directional"!==G?(m+="varying vec3 "+W+";\n",g+="varying vec3 "+W+";\n",E+=" "+W+" = u_"+V+"Transform[3].xyz;\n",F+=" vec3 VP = "+W+" - v_positionEC;\n",F+=" vec3 l = normalize(VP);\n",F+=" float range = length(VP);\n",F+=" float attenuation = 1.0 / (u_"+V+"Attenuation.x + ",F+="(u_"+V+"Attenuation.y * range) + ",F+="(u_"+V+"Attenuation.z * range * range));\n"):F+=" float attenuation = 1.0;\n","spot"===G&&(F+=" float spotDot = dot(l, normalize("+k+"));\n",F+=" if (spotDot < cos(u_"+V+"FallOff.x * 0.5))\n",F+=" {\n",F+=" attenuation = 0.0;\n",F+=" }\n",F+=" else\n",F+=" {\n",F+=" attenuation *= max(0.0, pow(spotDot, u_"+V+"FallOff.y));\n",F+=" }\n"),F+=" diffuseLight += "+H+"* max(dot(normal,l), 0.) * attenuation;\n",D&&("BLINN"===c?(F+=" vec3 h = normalize(l + viewDir);\n",F+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess)) * attenuation;\n"):(F+=" vec3 reflectDir = reflect(-l, normal);\n",F+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess)) * attenuation;\n"),F+=" specularLight += "+H+" * specularIntensity;\n")),F+=" }\n"}if(N||(F+=" ambientLight += vec3(0.2, 0.2, 0.2);\n"),!B&&"CONSTANT"!==c){F+=" vec3 l = normalize(czm_sunDirectionEC);\n";F+=" diffuseLight += vec3(1.0, 1.0, 1.0) * max(dot(normal,l), 0.2);\n",D&&("BLINN"===c?(F+=" vec3 h = normalize(l + viewDir);\n",F+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess));\n"):(F+=" vec3 reflectDir = reflect(-l, normal);\n",F+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess));\n"),F+=" specularLight += vec3(1.0, 1.0, 1.0) * specularIntensity;\n")}m+="void main(void) {\n",m+=E,m+="}\n",g+="void main(void) {\n";var q,j=" vec3 color = vec3(0.0, 0.0, 0.0);\n";x&&(g+=" vec3 normal = normalize(v_normal);\n",n.doubleSided&&(g+=" if (gl_FrontFacing == false)\n",g+=" {\n",g+=" normal = -normal;\n",g+=" }\n")),"CONSTANT"!==c?(e$2b(v.u_diffuse)&&(v.u_diffuse.type===de$x.SAMPLER_2D?g+=" vec4 diffuse = texture2D(u_diffuse, "+R+");\n":g+=" vec4 diffuse = u_diffuse;\n",g+=" vec3 diffuseLight = vec3(0.0, 0.0, 0.0);\n",j+=" color += diffuse.rgb * diffuseLight;\n"),D&&(v.u_specular.type===de$x.SAMPLER_2D?g+=" vec3 specular = texture2D(u_specular, "+R+").rgb;\n":g+=" vec3 specular = u_specular.rgb;\n",g+=" vec3 specularLight = vec3(0.0, 0.0, 0.0);\n",j+=" color += specular * specularLight;\n"),q=e$2b(v.u_transparency)?" gl_FragColor = vec4(color * diffuse.a * u_transparency, diffuse.a * u_transparency);\n":" gl_FragColor = vec4(color * diffuse.a, diffuse.a);\n"):q=e$2b(v.u_transparency)?" gl_FragColor = vec4(color * u_transparency, u_transparency);\n":" gl_FragColor = vec4(color, 1.0);\n",_&&(j+=" color *= v_vertexColor.rgb;\n"),e$2b(v.u_emission)&&(v.u_emission.type===de$x.SAMPLER_2D?g+=" vec3 emission = texture2D(u_emission, "+R+").rgb;\n":g+=" vec3 emission = u_emission.rgb;\n",j+=" color += emission;\n"),(e$2b(v.u_ambient)||"CONSTANT"!==c)&&(e$2b(v.u_ambient)?v.u_ambient.type===de$x.SAMPLER_2D?g+=" vec3 ambient = texture2D(u_ambient, "+R+").rgb;\n":g+=" vec3 ambient = u_ambient.rgb;\n":g+=" vec3 ambient = diffuse.rgb;\n",j+=" color += ambient * ambientLight;\n"),g+=" vec3 viewDir = -normalize(v_positionEC);\n",g+=" vec3 ambientLight = vec3(0.0, 0.0, 0.0);\n",g+=F,g+=j,g+=q,g+="}\n";var Y=d$P(l,{type:de$x.VERTEX_SHADER,extras:{_pipeline:{source:m,extension:".glsl"}}}),X=d$P(l,{type:de$x.FRAGMENT_SHADER,extras:{_pipeline:{source:g,extension:".glsl"}}}),K=d$P(u,{fragmentShader:X,vertexShader:Y});return d$P(s,{attributes:I,program:K,uniforms:v})}function ne$r(e,t){var i;switch(i=e$2b(t.value)?t.value:e$2b(t.index)?[t.index]:t,e){case"ambient":case"diffuse":case"emission":case"specular":return 1===i.length?de$x.SAMPLER_2D:de$x.FLOAT_VEC4;case"shininess":case"transparency":return de$x.FLOAT;case"transparent":case"doubleSided":return de$x.BOOL}}function _e$g(e,t){var i="";i+="technique:"+e.technique+";";for(var n=e.values,r=Object.keys(n).sort(),o=r.length,a=0;a<o;++a){var s=r[a];n.hasOwnProperty(s)&&(i+=s+":"+ne$r(s,n[s]),i+=";")}var l=u$_(e.jointCount,0);if(i+=l.toString()+";",e$2b(t)){var u=t.skinning;l>0&&(i+=u.type+";"),i+=t.hasVertexColors}return i}function le$m(e){var t=e.extensions.KHR_materials_common;if(e$2b(t)&&e$2b(t.lights))for(var i=t.lights,n=i.length,r=0;r<n;r++){var o=i[r];if("ambient"===o.type){e$2b(o.ambient)||(o.ambient={});var a=o.ambient;e$2b(a.color)||(a.color=[1,1,1])}else if("directional"===o.type){e$2b(o.directional)||(o.directional={});var s=o.directional;e$2b(s.color)||(s.color=[1,1,1])}else if("point"===o.type){e$2b(o.point)||(o.point={});var l=o.point;e$2b(l.color)||(l.color=[1,1,1]),l.constantAttenuation=u$_(l.constantAttenuation,1),l.linearAttenuation=u$_(l.linearAttenuation,0),l.quadraticAttenuation=u$_(l.quadraticAttenuation,0)}else if("spot"===o.type){e$2b(o.spot)||(o.spot={});var u=o.spot;e$2b(u.color)||(u.color=[1,1,1]),u.constantAttenuation=u$_(u.constantAttenuation,1),u.fallOffAngle=u$_(u.fallOffAngle,3.14159265),u.fallOffExponent=u$_(u.fallOffExponent,0),u.linearAttenuation=u$_(u.linearAttenuation,0),u.quadraticAttenuation=u$_(u.quadraticAttenuation,0)}}}function he$f(e,t){if(t=u$_(t,{}),i$D(e,"KHR_techniques_webgl")||!e$2b(e.materials)||0===e.materials.length)return e;e$2b(e.extensions)||(e.extensions={}),e$2b(e.extensionsUsed)||(e.extensionsUsed=[]),e$2b(e.extensionsRequired)||(e.extensionsRequired=[]),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl");var i=s$v.splitIncompatibleMaterials(e);return e$K.material(e,(function(n,r){var o={},a=xe$b(e,n,r,o,i,t);e$2b(n.extensions)||(n.extensions={}),n.extensions.KHR_techniques_webgl={values:o,technique:a}})),s$v.ensureSemanticExistence(e),e}function pe$h(e){return e$2b(e.extensions)&&e$2b(e.extensions.KHR_materials_pbrSpecularGlossiness)}function ge$f(e){return e$2b(e.textureMotion)}function te$m(e,t,i){var n=0,r=0,o=0,a=0,s=0,l=0,u=0,c=0,h=0;e.hasOwnProperty("start")&&(n+=e.start[0],o+=e.start[1]),e.hasOwnProperty("range")&&(n+=e.range[0],r=e.range[1],o+=e.range[2],a=e.range[3],c=e.range[0],h=e.range[2]),e.hasOwnProperty("speed")&&0!=e.speed&&(s=(r-c)/(u=1/e.speed),l=(a-h)/u),t[i]=s,t[i+1]=n,t[i+2]=l,t[i+3]=o,t[i+4]=u}function se$i(e,t,i,n){i[n]=[0,0,0,0,1,0,1,0,1,1],e$2b(e)&&te$m(e,i[n],0),e$2b(t)&&te$m(t,i[n],5)}function me$h(e,t){var i=e.textureMotion;(i.hasOwnProperty("baseColorTextureScroll")||i.hasOwnProperty("baseColorTextureScale"))&&se$i(i.baseColorTextureScroll,i.baseColorTextureScale,t,"u_baseColorUVOffsetAndTiling"),(i.hasOwnProperty("emissiveTextureScroll")||i.hasOwnProperty("emissiveTextureScale"))&&se$i(i.emissiveTextureScroll,i.emissiveTextureScale,t,"u_emissiveUVOffsetAndTiling")}function xe$b(e,t,i,n,r,o){var a,s,l=u$_(o.addBatchIdToGeneratedShaders,!1),u=e.extensions.KHR_techniques_webgl,c=u.techniques,h=u.shaders,d=u.programs,f=pe$h(t),p=ge$f(t),_=t.pbrMetallicRoughness;if(e$2b(_)&&!f)for(s in _)_.hasOwnProperty(s)&&(n[a="u_"+s]=_[s]);if(f){var m=t.extensions.KHR_materials_pbrSpecularGlossiness;for(s in m)m.hasOwnProperty(s)&&(n[a="u_"+s]=m[s])}for(var g in p&&me$h(t,n),t)t.hasOwnProperty(g)&&(g.indexOf("Texture")>=0||g.indexOf("Factor")>=0)&&(n[a="u_"+g]=t[g]);var x,v="precision highp float;\n",y="precision highp float;\n";e$2b(e.skins)&&(x=e.skins[0]);var $,b,T=e$2b(x)?x.joints:[],C=T.length,S=r[i],w=!1,E=!1,P=!1,A=!1,L=!1,M=!1,R=!1;e$2b(S)&&(w=($=S.skinning).skinned&&T.length>0,E=S.hasVertexColors,P=S.hasMorphTargets,A=S.hasNormals,L=S.hasTangents,M=S.hasTexCoords),P&&e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){if(e.material===i){var t=e.targets;e$2b(t)&&(b=t)}}))}));var I={u_modelViewMatrix:{semantic:i$D(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:de$x.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:de$x.FLOAT_MAT4}};e$2b(t.extensions)&&e$2b(t.extensions.KHR_materials_unlit)&&(R=!0,A=!1,L=!1),A&&(I.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:de$x.FLOAT_MAT3}),w&&(I.u_jointMatrix={count:C,semantic:"JOINTMATRIX",type:de$x.FLOAT_MAT4}),P&&(I.u_morphWeights={count:b.length,semantic:"MORPHWEIGHTS",type:de$x.FLOAT});var O=t.alphaMode;for(a in e$2b(O)&&"MASK"===O&&(I.u_alphaCutoff={semantic:"ALPHACUTOFF",type:de$x.FLOAT}),n)n.hasOwnProperty(a)&&(I[a]={type:Te$d(a),extensionType:Ce$b(a)});var D=u$_(I.u_baseColorTexture,I.u_baseColorFactor);for(a in e$2b(D)&&(D.semantic="_3DTILESDIFFUSE"),I)if(I.hasOwnProperty(a)){var B=I[a],N=e$2b(B.count)?"["+B.count+"]":"";B.type!==de$x.FLOAT_MAT3&&B.type!==de$x.FLOAT_MAT4&&"u_morphWeights"!==a||B.useInFragment?(y+="uniform "+t$x(B.type)+" "+a+N+";\n",delete B.useInFragment):v+="uniform "+t$x(B.type)+" "+a+N+";\n"}var F="";if(w){var U,z,G=r$B($.type),V=!1;if(0===$.type.indexOf("MAT")&&(V=!0,G=Math.sqrt(G)),V)for(U=0;U<G;U++)for(z=0;z<G;z++)F+=0===U&&0===z?" mat4 skinMatrix = ":" skinMatrix += ",F+="a_weight["+U+"]["+z+"] * u_jointMatrix[int(a_joint["+U+"]["+z+"])];\n";else for(U=0;U<G;U++)F+=0===U?" mat4 skinMatrix = ":" skinMatrix += ",F+="a_weight["+U+"] * u_jointMatrix[int(a_joint["+U+"])];\n"}var k,W={a_position:{semantic:"POSITION"}};if(v+="attribute vec3 a_position;\n",A&&(v+="varying vec3 v_positionEC;\n",v+="varying vec3 v_positionWC;\n"),F+=" vec3 weightedPosition = a_position;\n",A&&(F+=" vec3 weightedNormal = a_normal;\n"),L&&(F+=" vec4 weightedTangent = a_tangent;\n"),P)for(var H=0;H<b.length;H++){var q=b[H];for(var j in q)if(q.hasOwnProperty(j)&&"extras"!==j){var Y="a_"+j+"_"+H;W[Y]={semantic:j+"_"+H},v+="attribute vec3 "+Y+";\n","POSITION"===j?F+=" weightedPosition += u_morphWeights["+H+"] * "+Y+";\n":"NORMAL"===j?F+=" weightedNormal += u_morphWeights["+H+"] * "+Y+";\n":L&&"TANGENT"===j&&(F+=" weightedTangent.xyz += u_morphWeights["+H+"] * "+Y+";\n")}}if(F+=w?" vec4 position = skinMatrix * vec4(weightedPosition, 1.0);\n":" vec4 position = vec4(weightedPosition, 1.0);\n",A&&(F+=" v_positionWC = (czm_model * position).xyz;\n"),F+=" position = u_modelViewMatrix * position;\n",A&&(F+=" v_positionEC = position.xyz;\n"),F+=" gl_Position = u_projectionMatrix * position;\n",A&&(W.a_normal={semantic:"NORMAL"},v+="attribute vec3 a_normal;\n",v+="varying vec3 v_normal;\n",F+=w?" v_normal = u_normalMatrix * mat3(skinMatrix) * weightedNormal;\n":" v_normal = u_normalMatrix * weightedNormal;\n",y+="varying vec3 v_normal;\n",y+="varying vec3 v_positionEC;\n",y+="varying vec3 v_positionWC;\n"),L&&(W.a_tangent={semantic:"TANGENT"},v+="attribute vec4 a_tangent;\n",v+="varying vec4 v_tangent;\n",F+=" v_tangent.xyz = u_normalMatrix * weightedTangent.xyz;\n",F+=" v_tangent.w = weightedTangent.w;\n",y+="varying vec4 v_tangent;\n"),M&&(W.a_texcoord_0={semantic:"TEXCOORD_0"},v+="attribute vec2 a_texcoord_0;\n",v+="varying vec2 "+(k="v_texcoord_0")+";\n",F+=" "+k+" = a_texcoord_0;\n",y+="varying vec2 "+k+";\n"),w){var X=s$v.getShaderVariable($.type);W.a_joint={semantic:"JOINTS_0"},W.a_weight={semantic:"WEIGHTS_0"},v+="attribute "+X+" a_joint;\n",v+="attribute "+X+" a_weight;\n"}E&&(W.a_vertexColor={semantic:"COLOR_0"},v+="attribute vec4 a_vertexColor;\n",v+="varying vec4 v_vertexColor;\n",F+=" v_vertexColor = a_vertexColor;\n",y+="varying vec4 v_vertexColor;\n"),l&&(W.a_batchId={semantic:"_BATCHID"},v+="attribute float a_batchId;\n"),v+="void main(void) \n{\n",v+=F,v+="}\n",A&&(y+="const float M_PI = 3.141592653589793;\n",y+="vec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\n\n",y+="vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\n\n",y+="vec3 fresnelSchlick(float metalness, float VdotH) \n{\n return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n}\n\n",y+="vec3 F_Schlick(float ndv, vec3 spec) \n{\n return spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n}\n\n",y+="float D_Phong(float g, float ndh) \n{\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\n",y+="float smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\n",y+="float smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\n\n",y+="float GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\n\n",y+="void getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm) \n{\n vec3 h = normalize(viewDir + lightDir);\n float NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\n float NdotH = clamp(dot(normal, h), 0.0, 1.0);\n vec3 li = lightColor * NdotL;\n diffuseTerm = li;\n specularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n}\n\n"),y+="vec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\n",y+="vec4 SRGBtoLINEAR4(vec4 srgbIn) \n{\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\n",y+="vec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR \n return czm_acesTonemapping(linearIn);\n#else \n return linearIn;\n#endif \n}\n\n",y+="vec3 LINEARtoSRGB(vec3 linearIn) \n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else \n return linearIn;\n#endif \n}\n\n",y+="float calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent) \n{\n return pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n}\n\n",y+="#ifdef USE_IBL_LIGHTING \n",y+="uniform vec2 gltf_iblFactor; \n",y+="#endif \n",y+="#ifdef USE_CUSTOM_LIGHT_COLOR \n",y+="uniform vec3 gltf_lightColor; \n",y+="#endif \n",y+="void main(void) \n{\n",A&&(y+=" vec3 ng = normalize(v_normal);\n",e$2b(n.u_normalTexture)?L?(y+=" vec3 t = normalize(v_tangent.xyz);\n",y+=" vec3 b = normalize(cross(ng, t) * v_tangent.w);\n",y+=" mat3 tbn = mat3(t, b, ng);\n",y+=" vec3 n = texture2D(u_normalTexture, "+k+").rgb;\n",y+=" n = normalize(tbn * (2.0 * n - 1.0));\n"):(y="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"+y,y+="#ifdef GL_OES_standard_derivatives\n",y+=" vec3 pos_dx = dFdx(v_positionEC);\n",y+=" vec3 pos_dy = dFdy(v_positionEC);\n",y+=" vec3 tex_dx = dFdx(vec3("+k+",0.0));\n",y+=" vec3 tex_dy = dFdy(vec3("+k+",0.0));\n",y+=" vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n",y+=" t = normalize(t - ng * dot(ng, t));\n",y+=" vec3 b = normalize(cross(ng, t));\n",y+=" mat3 tbn = mat3(t, b, ng);\n",y+=" vec3 n = texture2D(u_normalTexture, "+k+").rgb;\n",y+=" n = normalize(tbn * (2.0 * n - 1.0));\n",y+="#else\n",y+=" vec3 n = ng;\n",y+="#endif\n"):y+=" vec3 n = ng;\n",t.doubleSided&&(y+=" if (!gl_FrontFacing)\n",y+=" {\n",y+=" n = -n;\n",y+=" }\n")),e$2b(n.u_baseColorTexture)?(y+=" vec2 uvOffset = vec2(0.0);\n",y+=" vec2 uvTiling = vec2(1.0);\n",e$2b(n.u_baseColorUVOffsetAndTiling)&&(y+=" uvOffset = u_baseColorUVOffsetAndTiling.xy;\n",y+=" uvTiling = u_baseColorUVOffsetAndTiling.zw;\n"),y+=" vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, "+k+" * uvTiling.xy + uvOffset.xy));\n",e$2b(n.u_baseColorFactor)&&(y+=" baseColorWithAlpha *= u_baseColorFactor;\n")):e$2b(n.u_baseColorFactor)?y+=" vec4 baseColorWithAlpha = u_baseColorFactor;\n":y+=" vec4 baseColorWithAlpha = vec4(1.0);\n",E&&(y+=" baseColorWithAlpha *= v_vertexColor;\n"),y+=" vec3 baseColor = baseColorWithAlpha.rgb;\n",A?(f?(e$2b(n.u_specularGlossinessTexture)?(y+=" vec4 specularGlossiness = SRGBtoLINEAR4(texture2D(u_specularGlossinessTexture, "+k+"));\n",y+=" vec3 specular = specularGlossiness.rgb;\n",y+=" float glossiness = specularGlossiness.a;\n",e$2b(n.u_specularFactor)&&(y+=" specular *= u_specularFactor;\n"),e$2b(n.u_glossinessFactor)&&(y+=" glossiness *= u_glossinessFactor;\n")):(e$2b(n.u_specularFactor)?y+=" vec3 specular = clamp(u_specularFactor, vec3(0.0), vec3(1.0));\n":y+=" vec3 specular = vec3(1.0);\n",e$2b(n.u_glossinessFactor)?y+=" float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);\n":y+=" float glossiness = 1.0;\n"),e$2b(n.u_diffuseTexture)?(e$2b(n.u_diffuseTextureUVSpeedFactor)?y+=" vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, "+k+" + u_diffuseTextureUVSpeedFactor.xy));\n":y+=" vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, "+k+"));\n",e$2b(n.u_diffuseFactor)&&(y+=" diffuse *= u_diffuseFactor;\n")):e$2b(n.u_diffuseFactor)?y+=" vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));\n":y+=" vec4 diffuse = vec4(1.0);\n"):e$2b(n.u_metallicRoughnessTexture)?(y+=" vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, "+k+").rgb;\n",y+=" float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n",y+=" float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n",e$2b(n.u_metallicFactor)&&(y+=" metalness *= u_metallicFactor;\n"),e$2b(n.u_roughnessFactor)&&(y+=" roughness *= u_roughnessFactor;\n")):(e$2b(n.u_metallicFactor)?y+=" float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n":y+=" float metalness = 1.0;\n",e$2b(n.u_roughnessFactor)?y+=" float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n":y+=" float roughness = 1.0;\n"),y+=" vec3 v = -normalize(v_positionEC);\n",f?(y+=" float roughness = 1.0 - glossiness;\n",y+=" vec3 diffuseColor = diffuse.rgb * (1.0 - max(max(specular.r, specular.g), specular.b));\n",y+=" vec3 specularColor = specular;\n"):(y+=" vec3 f0 = vec3(0.04);\n",y+=" vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n",y+=" vec3 specularColor = mix(f0, baseColor, metalness);\n"),y+=" float NdotV = abs(dot(n, v)) + 0.001;\n",y+=" vec3 diffuseTerm = vec3(0.0);\n",y+=" vec3 specularTerm = vec3(0.0);\n",y+=" vec3 fresnelTerm = F_Schlick(NdotV, specularColor);\n",y+=" vec3 color = vec3(0.0);\n",y+="#if DIR_LIGHTS > 0 \n",y+=" for (int i = 0; i < DIR_LIGHTS; i++) { \n",y+=" vec3 lightDiffuseTerm = vec3(0.0);\n",y+=" vec3 lightSpecularTerm = vec3(0.0);\n",y+=" getLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",y+=" diffuseTerm +=lightDiffuseTerm;\n",y+=" specularTerm += lightSpecularTerm;\n",y+=" } \n",y+="#endif \n",y+="#if POINT_LIGHTS > 0 \n",y+=" for (int i = 0; i < POINT_LIGHTS; i++) { \n",y+=" vec3 lVector = uPointLightPositionEC[i] - v_positionEC;\n",y+=" float lightDistance = length(lVector);\n",y+=" float lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\n",y+=" if(lightAttenuation < 0.001) {\n",y+=" continue;}\n",y+=" vec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\n",y+=" vec3 lightDiffuseTerm = vec3(0.0);\n",y+=" vec3 lightSpecularTerm = vec3(0.0);\n",y+=" getLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",y+=" diffuseTerm +=lightDiffuseTerm;\n",y+=" specularTerm += lightSpecularTerm;\n",y+=" }\n",y+="#endif \n",y+="#if SPOT_LIGHTS > 0 \n",y+=" for (int i = 0; i < SPOT_LIGHTS; i++) { \n",y+=" vec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\n",y+=" float lightDistance = length(lVector);\n",y+=" float lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\n",y+=" if(lightAttenuation < 0.001) {\n",y+=" continue;}\n",y+=" float spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\n",y+=" if(spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z) {\n",y+=" vec3 spotLightColor = uSpotLightColorAndExponent[i].xyz * lightAttenuation * spotEffect;\n",y+=" vec3 lightDiffuseTerm = vec3(0.0);\n",y+=" vec3 lightSpecularTerm = vec3(0.0);\n",y+=" getLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",y+=" diffuseTerm +=lightDiffuseTerm;\n",y+=" specularTerm += lightSpecularTerm;\n",y+=" }\n",y+=" }\n",y+="#endif \n",y+=" color = baseColor; \n",y+=" color *= max(diffuseTerm, vec3(0.0)); \n",y+=" color += max(specularTerm, vec3(0.0)); \n",y+="#ifndef USE_CUSTOM_LIGHT_COLOR \n",y+=" vec3 lightColorHdr = czm_lightColorHdr;\n",y+="#else \n",y+=" vec3 lightColorHdr = gltf_lightColor;\n",y+="#endif \n",y+=" vec3 l = normalize(czm_lightDirectionEC);\n",y+=" vec3 h = normalize(v + l);\n",y+=" float NdotL = clamp(dot(n, l), 0.001, 1.0);\n",y+=" float NdotH = clamp(dot(n, h), 0.0, 1.0);\n",y+=" float LdotH = clamp(dot(l, h), 0.0, 1.0);\n",y+=" float VdotH = clamp(dot(v, h), 0.0, 1.0);\n",y+=" float alpha = roughness * roughness;\n",y+=" float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n",y+=" vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n",y+=" vec3 r0 = specularColor.rgb;\n",y+=" vec3 F = fresnelSchlick2(r0, r90, VdotH);\n",y+=" float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n",y+=" float D = GGX(alpha, NdotH);\n",y+=" vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n",y+=" vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n",y+=" color += NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n",y+="#if defined(USE_IBL_LIGHTING) && !defined(DIFFUSE_IBL) && !defined(SPECULAR_IBL) \n",y+=" vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n",y+=" czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n",y+=" float vertexRadius = length(v_positionWC);\n",y+=" float horizonDotNadir = 1.0 - min(1.0, ellipsoid.radii.x / vertexRadius);\n",y+=" float reflectionDotNadir = dot(r, normalize(v_positionWC));\n",y+=" r.x = -r.x;\n",y+=" r = -normalize(czm_temeToPseudoFixed * r);\n",y+=" r.x = -r.x;\n",y+=" float inverseRoughness = 1.04 - roughness;\n",y+=" inverseRoughness *= inverseRoughness;\n",y+=" vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n",y+=" float atmosphereHeight = 0.05;\n",y+=" float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n",y+=" float blendRegionOffset = roughness * -1.0;\n",y+=" float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n",y+=" float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n",y+=" float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n",y+=" float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n",y+=" vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n",y+=" vec3 nadirColor = belowHorizonColor * 0.5;\n",y+=" vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n",y+=" vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n",y+=" vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n",y+=" vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n",y+=" float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n",y+=" float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n",y+=" vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n",y+=" float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n",y+=" vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n",y+=" specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n",y+=" specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n",y+="#ifdef USE_SUN_LUMINANCE \n",y+=" float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(v_positionWC * -1.0)), 0.001, 1.0);\n",y+=" float S = acos(LdotZenith);\n",y+=" float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(v_positionWC * -1.0)), 0.001, 1.0);\n",y+=" float sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\n",y+=" float gamma = acos(sunNdotL);\n",y+=" float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n",y+=" float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n",y+=" float luminance = gltf_luminanceAtZenith * (numerator / denominator);\n",y+="#endif \n",y+=" vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",y+=" vec3 IBLColor = (diffuseIrradiance * diffuseColor * gltf_iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * gltf_iblFactor.y);\n",y+="#ifdef USE_SUN_LUMINANCE \n",y+=" color += IBLColor * luminance;\n",y+="#else \n",y+=" color += IBLColor; \n",y+="#endif \n",y+="#elif defined(DIFFUSE_IBL) || defined(SPECULAR_IBL) \n",y+=" mat3 fixedToENU = mat3(gltf_clippingPlanesMatrix[0][0], gltf_clippingPlanesMatrix[1][0], gltf_clippingPlanesMatrix[2][0], \n",y+=" gltf_clippingPlanesMatrix[0][1], gltf_clippingPlanesMatrix[1][1], gltf_clippingPlanesMatrix[2][1], \n",y+=" gltf_clippingPlanesMatrix[0][2], gltf_clippingPlanesMatrix[1][2], gltf_clippingPlanesMatrix[2][2]); \n",y+=" const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0); \n",y+=" vec3 cubeDir = normalize(yUpToZUp * fixedToENU * normalize(reflect(-v, n))); \n",y+="#ifdef DIFFUSE_IBL \n",y+="#ifdef CUSTOM_SPHERICAL_HARMONICS \n",y+=" vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, gltf_sphericalHarmonicCoefficients); \n",y+="#else \n",y+=" vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients); \n",y+="#endif \n",y+="#else \n",y+=" vec3 diffuseIrradiance = vec3(0.0); \n",y+="#endif \n",y+="#ifdef SPECULAR_IBL \n",y+=" vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",y+="#ifdef CUSTOM_SPECULAR_IBL \n",y+=" vec3 specularIBL = czm_sampleOctahedralProjection(gltf_specularMap, gltf_specularMapSize, cubeDir, roughness * gltf_maxSpecularLOD, gltf_maxSpecularLOD);\n",y+="#else \n",y+=" vec3 specularIBL = czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, czm_specularEnvironmentMapSize, cubeDir, roughness * czm_specularEnvironmentMapsMaximumLOD, czm_specularEnvironmentMapsMaximumLOD);\n",y+="#endif \n",y+=" specularIBL *= F * brdfLut.x + brdfLut.y;\n",y+="#else \n",y+=" vec3 specularIBL = vec3(0.0); \n",y+="#endif \n",y+=" color += diffuseIrradiance * diffuseColor + specularColor * specularIBL;\n",y+="#endif \n"):y+=" vec3 color = baseColor;\n",R||(e$2b(n.u_occlusionTexture)&&(y+=" color *= texture2D(u_occlusionTexture, "+k+").r;\n"),e$2b(n.u_emissiveTexture)?(y+=" vec2 uvEmissiveOffset = vec2(0.0);\n",y+=" vec2 uvEmissiveTiling = vec2(1.0);\n",e$2b(n.u_emissiveUVOffsetAndTiling)&&(y+=" uvEmissiveOffset = u_emissiveUVOffsetAndTiling.xy;\n",y+=" uvEmissiveTiling = u_emissiveUVOffsetAndTiling.zw;\n"),y+=" vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, "+k+"* uvEmissiveTiling.xy + uvEmissiveOffset.xy).rgb);\n",e$2b(n.u_emissiveFactor)&&(y+=" emissive *= u_emissiveFactor;\n"),y+=" color += emissive;\n"):e$2b(n.u_emissiveFactor)&&(y+=" color += u_emissiveFactor;\n")),R||(y+=" color = applyTonemapping(color);\n"),y+=" color = LINEARtoSRGB(color);\n",e$2b(O)?"MASK"===O?(y+=" if (baseColorWithAlpha.a < u_alphaCutoff) {\n",y+=" discard;\n",y+=" }\n",y+=" gl_FragColor = vec4(color, 1.0);\n"):y+="BLEND"===O?" gl_FragColor = vec4(color, baseColorWithAlpha.a);\n":" gl_FragColor = vec4(color, 1.0);\n":y+=" gl_FragColor = vec4(color, 1.0);\n",y+="}\n";var K=d$P(h,{type:de$x.VERTEX_SHADER,extras:{_pipeline:{source:v,extension:".glsl"}}}),Q=d$P(h,{type:de$x.FRAGMENT_SHADER,extras:{_pipeline:{source:y,extension:".glsl"}}}),Z=d$P(d,{fragmentShader:Q,vertexShader:K});return d$P(c,{attributes:W,program:Z,uniforms:I})}function Te$d(e){switch(e){case"u_baseColorFactor":case"u_baseColorUVOffsetAndTiling":case"u_emissiveUVOffsetAndTiling":case"u_diffuseFactor":return de$x.FLOAT_VEC4;case"u_metallicFactor":case"u_roughnessFactor":case"u_glossinessFactor":return de$x.FLOAT;case"u_baseColorTexture":case"u_metallicRoughnessTexture":case"u_normalTexture":case"u_occlusionTexture":case"u_emissiveTexture":case"u_diffuseTexture":case"u_specularGlossinessTexture":return de$x.SAMPLER_2D;case"u_emissiveFactor":case"u_specularFactor":return de$x.FLOAT_VEC3}return-1!==e.indexOf("Offset")?de$x.FLOAT_VEC2:-1!==e.indexOf("Rotation")?de$x.FLOAT:-1!==e.indexOf("Scale")?de$x.FLOAT_VEC2:-1!==e.indexOf("Texture")?de$x.SAMPLER_2D:void 0}function Ce$b(e){switch(e){case"u_baseColorUVOffsetAndTiling":return ie$p.BASECOLOR_UV_OFFSET_AND_TILING;case"u_emissiveUVOffsetAndTiling":return ie$p.EMISSIVE_UV_OFFSET_AND_TILING}}function c$w(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}s$v.getGltfSemanticUniforms=function(){return Tn$1};var G$B="attribute vec3 position;\nattribute float a_batchId;\n\nuniform mat4 u_modifiedModelViewProjection;\n\nvoid main()\n{\n gl_Position = czm_depthClampFarPlane(u_modifiedModelViewProjection * vec4(position, 1.0));\n}\n",J$v={};!function(e){var t="Compound",i="MemberExpression",n="Literal",r=function(e,t){var i=new Error(e+" at character "+t);throw i.index=t,i.description=e,i},o=!0,a={"-":o,"!":o,"~":o,"+":o},s={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},l=function(e){var t,i=0;for(var n in e)(t=n.length)>i&&e.hasOwnProperty(n)&&(i=t);return i},u=l(a),c=l(s),h={true:!0,false:!1,null:null},d=function(e){return s[e]||0},f=function(e,t,i){return{type:"||"===e||"&&"===e?"LogicalExpression":"BinaryExpression",operator:e,left:t,right:i}},p=function(e){return e>=48&&e<=57},_=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=128&&!s[String.fromCharCode(e)]},m=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e>=128&&!s[String.fromCharCode(e)]},g=function(e){for(var o,l,g=0,x=e.charAt,v=e.charCodeAt,y=function(t){return x.call(e,t)},$=function(t){return v.call(e,t)},b=e.length,T=function(){for(var e=$(g);32===e||9===e;)e=$(++g)},C=function(){var e,t,i=w();return T(),63!==$(g)?i:(g++,(e=C())||r("Expected expression",g),T(),58===$(g)?(g++,(t=C())||r("Expected expression",g),{type:"ConditionalExpression",test:i,consequent:e,alternate:t}):void r("Expected :",g))},S=function(){T();for(var t=e.substr(g,c),i=t.length;i>0;){if(s.hasOwnProperty(t))return g+=i,t;t=t.substr(0,--i)}return!1},w=function(){var e,t,i,n,o,a,s,l;if(a=E(),!(t=S()))return a;for(o={value:t,prec:d(t)},(s=E())||r("Expected expression after "+t,g),n=[a,o,s];(t=S())&&0!==(i=d(t));){for(o={value:t,prec:i};n.length>2&&i<=n[n.length-2].prec;)s=n.pop(),t=n.pop().value,a=n.pop(),e=f(t,a,s),n.push(e);(e=E())||r("Expected expression after "+t,g),n.push(o,e)}for(e=n[l=n.length-1];l>1;)e=f(n[l-1].value,n[l-2],e),l-=2;return e},E=function(){var t,i,n;if(T(),t=$(g),p(t)||46===t)return P();if(39===t||34===t)return A();if(_(t)||40===t)return R();if(91===t)return O();for(n=(i=e.substr(g,u)).length;n>0;){if(a.hasOwnProperty(i))return g+=n,{type:"UnaryExpression",operator:i,argument:E(),prefix:!0};i=i.substr(0,--n)}return!1},P=function(){for(var e,t,i="";p($(g));)i+=y(g++);if(46===$(g))for(i+=y(g++);p($(g));)i+=y(g++);if("e"===(e=y(g))||"E"===e){for(i+=y(g++),("+"===(e=y(g))||"-"===e)&&(i+=y(g++));p($(g));)i+=y(g++);p($(g-1))||r("Expected exponent ("+i+y(g)+")",g)}return t=$(g),_(t)?r("Variable names cannot start with a number ("+i+y(g)+")",g):46===t&&r("Unexpected period",g),{type:n,value:parseFloat(i),raw:i}},A=function(){for(var e,t="",i=y(g++),o=!1;g<b;){if((e=y(g++))===i){o=!0;break}if("\\"===e)switch(e=y(g++),e){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+="\\"+e}else t+=e}return o||r('Unclosed quote after "'+t+'"',g),{type:n,value:t,raw:i+t+i}},L=function(){var t,i=$(g),o=g;for(_(i)?g++:r("Unexpected "+y(g),g);g<b&&(i=$(g),m(i));)g++;return t=e.slice(o,g),h.hasOwnProperty(t)?{type:n,value:h[t],raw:t}:"this"===t?{type:"ThisExpression"}:{type:"Identifier",name:t}},M=function(e){for(var i,n,o=[],a=!1;g<b;){if(T(),(i=$(g))===e){a=!0,g++;break}44===i?g++:((!(n=C())||n.type===t)&&r("Expected comma",g),o.push(n))}return a||r("Expected "+String.fromCharCode(e),g),o},R=function(){var e,t;for(t=40===(e=$(g))?I():L(),T(),e=$(g);46===e||91===e||40===e;)g++,46===e?(T(),t={type:i,computed:!1,object:t,property:L()}):91===e?(t={type:i,computed:!0,object:t,property:C()},T(),93!==(e=$(g))&&r("Unclosed [",g),g++):40===e&&(t={type:"CallExpression",arguments:M(41),callee:t}),T(),e=$(g);return t},I=function(){g++;var e=C();if(T(),41===$(g))return g++,e;r("Unclosed (",g)},O=function(){return g++,{type:"ArrayExpression",elements:M(93)}},D=[];g<b;)59===(o=$(g))||44===o?g++:(l=C())?D.push(l):g<b&&r('Unexpected "'+y(g)+'"',g);return 1===D.length?D[0]:{type:t,body:D}};g.version="0.3.1",g.toString=function(){return"JavaScript Expression Parser (JSEP) v"+g.version},g.addUnaryOp=function(e){return u=Math.max(e.length,u),a[e]=o,this},g.addBinaryOp=function(e,t){return c=Math.max(e.length,c),s[e]=t,this},g.addLiteral=function(e,t){return h[e]=t,this},g.removeUnaryOp=function(e){return delete a[e],e.length===u&&(u=l(a)),this},g.removeAllUnaryOps=function(){return a={},u=0,this},g.removeBinaryOp=function(e){return delete s[e],e.length===c&&(c=l(s)),this},g.removeAllBinaryOps=function(){return s={},c=0,this},g.removeLiteral=function(e){return delete h[e],this},g.removeAllLiterals=function(){return h={},this},e.jsep=g}(J$v);var q$B=J$v.jsep,L$F={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18},s$u=Object.freeze(L$F);function L$E(e,t){var i;o$1q.typeOf.string("expression",e),this._expression=e,e=fe$e(le$l(e=se$h(e,t))),q$B.addBinaryOp("=~",0),q$B.addBinaryOp("!~",0);try{i=q$B(e)}catch(e){throw new t$14(e)}this._runtimeAst=_$u(this,i)}Object.defineProperties(L$E.prototype,{expression:{get:function(){return this._expression}}});var m$y={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new o$1o],cartesian3Array:[new o$1p],cartesian4Array:[new e$29],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);var e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new o$1o),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new o$1p),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new e$29),this.cartesian4Array[this.cartesian4Index++]}};L$E.prototype.evaluate=function(e,t){m$y.reset();var i=this._runtimeAst.evaluate(e);return t instanceof e$1U&&i instanceof e$29?e$1U.fromCartesian4(i,t):i instanceof o$1o||i instanceof o$1p||i instanceof e$29?i.clone(t):i},L$E.prototype.evaluateColor=function(e,t){m$y.reset();var i=this._runtimeAst.evaluate(e);return e$1U.fromCartesian4(i,t)},L$E.prototype.getShaderFunction=function(e,t,i,n){var r=this.getShaderExpression(t,i);return r=n+" "+e+"() \n{ \n return "+r+"; \n} \n"},L$E.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};var K$w=["!","-","+"],G$A=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],V$p=/\${(.*?)}/g,J$u=/\\/g,W$C="@#%",Z$w=/@#%/g,T$x=new e$1U,C$B={abs:w$w(Math.abs),sqrt:w$w(Math.sqrt),cos:w$w(Math.cos),sin:w$w(Math.sin),tan:w$w(Math.tan),acos:w$w(Math.acos),asin:w$w(Math.asin),atan:w$w(Math.atan),radians:w$w(e$2a.toRadians),degrees:w$w(e$2a.toDegrees),sign:w$w(e$2a.sign),floor:w$w(Math.floor),ceil:w$w(Math.ceil),round:w$w(Math.round),exp:w$w(Math.exp),exp2:w$w(ee$o),log:w$w(Math.log),log2:w$w(te$l),fract:w$w(Q$x),length:re$q,normalize:ae$i},O$s={atan2:B$w(Math.atan2,!1),pow:B$w(Math.pow,!1),min:B$w(Math.min,!0),max:B$w(Math.max,!0),distance:ne$q,dot:ie$m,cross:ue$j},F$E={clamp:Y$q(e$2a.clamp,!0),mix:Y$q(e$2a.lerp,!0)};function Q$x(e){return e-Math.floor(e)}function ee$o(e){return Math.pow(2,e)}function te$l(e){return e$2a.log2(e)}function w$w(e){return function(t,i){if("number"==typeof i)return e(i);if(i instanceof o$1o)return o$1o.fromElements(e(i.x),e(i.y),m$y.getCartesian2());if(i instanceof o$1p)return o$1p.fromElements(e(i.x),e(i.y),e(i.z),m$y.getCartesian3());if(i instanceof e$29)return e$29.fromElements(e(i.x),e(i.y),e(i.z),e(i.w),m$y.getCartesian4());throw new t$14('Function "'+t+'" requires a vector or number argument. Argument is '+i+".")}}function B$w(e,t){return function(i,n,r){if(t&&"number"==typeof r){if("number"==typeof n)return e(n,r);if(n instanceof o$1o)return o$1o.fromElements(e(n.x,r),e(n.y,r),m$y.getCartesian2());if(n instanceof o$1p)return o$1p.fromElements(e(n.x,r),e(n.y,r),e(n.z,r),m$y.getCartesian3());if(n instanceof e$29)return e$29.fromElements(e(n.x,r),e(n.y,r),e(n.z,r),e(n.w,r),m$y.getCartesian4())}if("number"==typeof n&&"number"==typeof r)return e(n,r);if(n instanceof o$1o&&r instanceof o$1o)return o$1o.fromElements(e(n.x,r.x),e(n.y,r.y),m$y.getCartesian2());if(n instanceof o$1p&&r instanceof o$1p)return o$1p.fromElements(e(n.x,r.x),e(n.y,r.y),e(n.z,r.z),m$y.getCartesian3());if(n instanceof e$29&&r instanceof e$29)return e$29.fromElements(e(n.x,r.x),e(n.y,r.y),e(n.z,r.z),e(n.w,r.w),m$y.getCartesian4());throw new t$14('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+n+" and "+r+".")}}function Y$q(e,t){return function(i,n,r,o){if(t&&"number"==typeof o){if("number"==typeof n&&"number"==typeof r)return e(n,r,o);if(n instanceof o$1o&&r instanceof o$1o)return o$1o.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),m$y.getCartesian2());if(n instanceof o$1p&&r instanceof o$1p)return o$1p.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),e(n.z,r.z,o),m$y.getCartesian3());if(n instanceof e$29&&r instanceof e$29)return e$29.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),e(n.z,r.z,o),e(n.w,r.w,o),m$y.getCartesian4())}if("number"==typeof n&&"number"==typeof r&&"number"==typeof o)return e(n,r,o);if(n instanceof o$1o&&r instanceof o$1o&&o instanceof o$1o)return o$1o.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),m$y.getCartesian2());if(n instanceof o$1p&&r instanceof o$1p&&o instanceof o$1p)return o$1p.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),e(n.z,r.z,o.z),m$y.getCartesian3());if(n instanceof e$29&&r instanceof e$29&&o instanceof e$29)return e$29.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),e(n.z,r.z,o.z),e(n.w,r.w,o.w),m$y.getCartesian4());throw new t$14('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+n+", "+r+", and "+o+".")}}function re$q(e,t){if("number"==typeof t)return Math.abs(t);if(t instanceof o$1o)return o$1o.magnitude(t);if(t instanceof o$1p)return o$1p.magnitude(t);if(t instanceof e$29)return e$29.magnitude(t);throw new t$14('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function ae$i(e,t){if("number"==typeof t)return 1;if(t instanceof o$1o)return o$1o.normalize(t,m$y.getCartesian2());if(t instanceof o$1p)return o$1p.normalize(t,m$y.getCartesian3());if(t instanceof e$29)return e$29.normalize(t,m$y.getCartesian4());throw new t$14('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function ne$q(e,t,i){if("number"==typeof t&&"number"==typeof i)return Math.abs(t-i);if(t instanceof o$1o&&i instanceof o$1o)return o$1o.distance(t,i);if(t instanceof o$1p&&i instanceof o$1p)return o$1p.distance(t,i);if(t instanceof e$29&&i instanceof e$29)return e$29.distance(t,i);throw new t$14('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function ie$m(e,t,i){if("number"==typeof t&&"number"==typeof i)return t*i;if(t instanceof o$1o&&i instanceof o$1o)return o$1o.dot(t,i);if(t instanceof o$1p&&i instanceof o$1p)return o$1p.dot(t,i);if(t instanceof e$29&&i instanceof e$29)return e$29.dot(t,i);throw new t$14('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function ue$j(e,t,i){if(t instanceof o$1p&&i instanceof o$1p)return o$1p.cross(t,i,m$y.getCartesian3());throw new t$14('Function "'+e+'" requires vec3 arguments. Arguments are '+t+" and "+i+".")}function u$C(e,t,i,n,r){this._type=e,this._value=t,this._left=i,this._right=n,this._test=r,this.evaluate=void 0,we$d(this)}function se$h(e,t){if(!e$2b(t))return e;for(var i in t)if(t.hasOwnProperty(i)){var n=new RegExp("\\$\\{"+i+"\\}","g"),r="("+t[i]+")";e$2b(r)&&(e=e.replace(n,r))}return e}function le$l(e){return e.replace(J$u,W$C)}function d$J(e){return e.replace(Z$w,"\\")}function fe$e(e){for(var t=e,i="",n=t.indexOf("${");n>=0;){var r,o=t.indexOf("'"),a=t.indexOf('"');if(o>=0&&o<n)r=t.indexOf("'",o+1),i+=t.substr(0,r+1),n=(t=t.substr(r+1)).indexOf("${");else if(a>=0&&a<n)r=t.indexOf('"',a+1),i+=t.substr(0,r+1),n=(t=t.substr(r+1)).indexOf("${");else{i+=t.substr(0,n);var s=t.indexOf("}");if(s<0)throw new t$14("Unmatched {.");i+="czm_"+t.substr(n+2,s-(n+2)),n=(t=t.substr(s+1)).indexOf("${")}}return i+=t}function oe$i(e){var t=typeof e.value;return null===e.value?new u$C(s$u.LITERAL_NULL,null):"boolean"===t?new u$C(s$u.LITERAL_BOOLEAN,e.value):"number"===t?new u$C(s$u.LITERAL_NUMBER,e.value):"string"===t?e.value.indexOf("${")>=0?new u$C(s$u.VARIABLE_IN_STRING,e.value):new u$C(s$u.LITERAL_STRING,d$J(e.value)):void 0}function ve$e(e,t){var i,n,r,o,a=t.arguments,s=a.length;if("MemberExpression"===t.callee.type){i=t.callee.property.name;var l=t.callee.object;if("test"===i||"exec"===i){if("regExp"!==l.callee.name)throw new t$14(i+" is not a function.");return 0===s?"test"===i?new u$C(s$u.LITERAL_BOOLEAN,!1):new u$C(s$u.LITERAL_NULL,null):(r=_$u(e,l),o=_$u(e,a[0]),new u$C(s$u.FUNCTION_CALL,i,r,o))}if("toString"===i)return n=_$u(e,l),new u$C(s$u.FUNCTION_CALL,i,n);throw new t$14('Unexpected function call "'+i+'".')}if("color"===(i=t.callee.name)){if(0===s)return new u$C(s$u.LITERAL_COLOR,i);if(n=_$u(e,a[0]),e$2b(a[1])){var u=_$u(e,a[1]);return new u$C(s$u.LITERAL_COLOR,i,[n,u])}return new u$C(s$u.LITERAL_COLOR,i,[n])}if("rgb"===i||"hsl"===i){if(s<3)throw new t$14(i+" requires three arguments.");return n=[_$u(e,a[0]),_$u(e,a[1]),_$u(e,a[2])],new u$C(s$u.LITERAL_COLOR,i,n)}if("rgba"===i||"hsla"===i){if(s<4)throw new t$14(i+" requires four arguments.");return n=[_$u(e,a[0]),_$u(e,a[1]),_$u(e,a[2]),_$u(e,a[3])],new u$C(s$u.LITERAL_COLOR,i,n)}if("vec2"===i||"vec3"===i||"vec4"===i){n=new Array(s);for(var c=0;c<s;++c)n[c]=_$u(e,a[c]);return new u$C(s$u.LITERAL_VECTOR,i,n)}if("isNaN"===i||"isFinite"===i)return 0===s?new u$C(s$u.LITERAL_BOOLEAN,"isNaN"===i):(n=_$u(e,a[0]),new u$C(s$u.UNARY,i,n));if("isExactClass"===i||"isClass"===i){if(s<1||s>1)throw new t$14(i+" requires exactly one argument.");return n=_$u(e,a[0]),new u$C(s$u.UNARY,i,n)}if("getExactClassName"===i){if(s>0)throw new t$14(i+" does not take any argument.");return new u$C(s$u.UNARY,i)}if(e$2b(C$B[i])){if(1!==s)throw new t$14(i+" requires exactly one argument.");return n=_$u(e,a[0]),new u$C(s$u.UNARY,i,n)}if(e$2b(O$s[i])){if(2!==s)throw new t$14(i+" requires exactly two arguments.");return r=_$u(e,a[0]),o=_$u(e,a[1]),new u$C(s$u.BINARY,i,r,o)}if(e$2b(F$E[i])){if(3!==s)throw new t$14(i+" requires exactly three arguments.");r=_$u(e,a[0]),o=_$u(e,a[1]);var h=_$u(e,a[2]);return new u$C(s$u.TERNARY,i,r,o,h)}if("Boolean"===i)return 0===s?new u$C(s$u.LITERAL_BOOLEAN,!1):(n=_$u(e,a[0]),new u$C(s$u.UNARY,i,n));if("Number"===i)return 0===s?new u$C(s$u.LITERAL_NUMBER,0):(n=_$u(e,a[0]),new u$C(s$u.UNARY,i,n));if("String"===i)return 0===s?new u$C(s$u.LITERAL_STRING,""):(n=_$u(e,a[0]),new u$C(s$u.UNARY,i,n));if("regExp"===i)return ce$i(e,t);throw new t$14('Unexpected function call "'+i+'".')}function ce$i(e,t){var i=t.arguments;if(0===i.length)return new u$C(s$u.LITERAL_REGEX,new RegExp);var n,r=_$u(e,i[0]);if(i.length>1){var o=_$u(e,i[1]);if(U$x(r)&&U$x(o)){try{n=new RegExp(d$J(String(r._value)),o._value)}catch(e){throw new t$14(e)}return new u$C(s$u.LITERAL_REGEX,n)}return new u$C(s$u.REGEX,r,o)}if(U$x(r)){try{n=new RegExp(d$J(String(r._value)))}catch(e){throw new t$14(e)}return new u$C(s$u.LITERAL_REGEX,n)}return new u$C(s$u.REGEX,r)}function me$g(e){if(ye$b(e.name)){var t=ge$e(e.name);return"tiles3d_"===t.substr(0,8)?new u$C(s$u.BUILTIN_VARIABLE,t):new u$C(s$u.VARIABLE,t)}if("NaN"===e.name)return new u$C(s$u.LITERAL_NUMBER,NaN);if("Infinity"===e.name)return new u$C(s$u.LITERAL_NUMBER,1/0);if("undefined"===e.name)return new u$C(s$u.LITERAL_UNDEFINED,void 0);throw new t$14(e.name+" is not defined.")}function he$e(e){var t=e.property.name;return"PI"===t?new u$C(s$u.LITERAL_NUMBER,Math.PI):"E"===t?new u$C(s$u.LITERAL_NUMBER,Math.E):void 0}function _e$f(e){if("POSITIVE_INFINITY"===e.property.name)return new u$C(s$u.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function pe$g(e,t){if("Math"===t.object.name)return he$e(t);if("Number"===t.object.name)return _e$f(t);var i,n=_$u(e,t.object);return t.computed?(i=_$u(e,t.property),new u$C(s$u.MEMBER,"brackets",n,i)):(i=new u$C(s$u.LITERAL_STRING,t.property.name),new u$C(s$u.MEMBER,"dot",n,i))}function U$x(e){return e._type>=s$u.LITERAL_NULL}function ye$b(e){return"czm_"===e.substr(0,4)}function ge$e(e){return e.substr(4)}function _$u(e,t){var i,n,r,o;if("Literal"===t.type)i=oe$i(t);else if("CallExpression"===t.type)i=ve$e(e,t);else if("Identifier"===t.type)i=me$g(t);else if("UnaryExpression"===t.type){n=t.operator;var a=_$u(e,t.argument);if(!(K$w.indexOf(n)>-1))throw new t$14('Unexpected operator "'+n+'".');i=new u$C(s$u.UNARY,n,a)}else if("BinaryExpression"===t.type){if(n=t.operator,r=_$u(e,t.left),o=_$u(e,t.right),!(G$A.indexOf(n)>-1))throw new t$14('Unexpected operator "'+n+'".');i=new u$C(s$u.BINARY,n,r,o)}else if("LogicalExpression"===t.type)n=t.operator,r=_$u(e,t.left),o=_$u(e,t.right),G$A.indexOf(n)>-1&&(i=new u$C(s$u.BINARY,n,r,o));else if("ConditionalExpression"===t.type){var s=_$u(e,t.test);r=_$u(e,t.consequent),o=_$u(e,t.alternate),i=new u$C(s$u.CONDITIONAL,"?",r,o,s)}else if("MemberExpression"===t.type)i=pe$g(e,t);else{if("ArrayExpression"!==t.type)throw"Compound"===t.type?new t$14("Provide exactly one expression."):new t$14("Cannot parse expression.");for(var l=[],u=0;u<t.elements.length;u++)l[u]=_$u(e,t.elements[u]);i=new u$C(s$u.ARRAY,l)}return i}function we$d(e){e._type===s$u.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===s$u.FUNCTION_CALL?"test"===e._value?e.evaluate=e._evaluateRegExpTest:"exec"===e._value?e.evaluate=e._evaluateRegExpExec:"toString"===e._value&&(e.evaluate=e._evaluateToString):e._type===s$u.UNARY?"!"===e._value?e.evaluate=e._evaluateNot:"-"===e._value?e.evaluate=e._evaluateNegative:"+"===e._value?e.evaluate=e._evaluatePositive:"isNaN"===e._value?e.evaluate=e._evaluateNaN:"isFinite"===e._value?e.evaluate=e._evaluateIsFinite:"isExactClass"===e._value?e.evaluate=e._evaluateIsExactClass:"isClass"===e._value?e.evaluate=e._evaluateIsClass:"getExactClassName"===e._value?e.evaluate=e._evaluateGetExactClassName:"Boolean"===e._value?e.evaluate=e._evaluateBooleanConversion:"Number"===e._value?e.evaluate=e._evaluateNumberConversion:"String"===e._value?e.evaluate=e._evaluateStringConversion:e$2b(C$B[e._value])&&(e.evaluate=Ae$e(e._value)):e._type===s$u.BINARY?"+"===e._value?e.evaluate=e._evaluatePlus:"-"===e._value?e.evaluate=e._evaluateMinus:"*"===e._value?e.evaluate=e._evaluateTimes:"/"===e._value?e.evaluate=e._evaluateDivide:"%"===e._value?e.evaluate=e._evaluateMod:"==="===e._value?e.evaluate=e._evaluateEqualsStrict:"!=="===e._value?e.evaluate=e._evaluateNotEqualsStrict:"<"===e._value?e.evaluate=e._evaluateLessThan:"<="===e._value?e.evaluate=e._evaluateLessThanOrEquals:">"===e._value?e.evaluate=e._evaluateGreaterThan:">="===e._value?e.evaluate=e._evaluateGreaterThanOrEquals:"&&"===e._value?e.evaluate=e._evaluateAnd:"||"===e._value?e.evaluate=e._evaluateOr:"=~"===e._value?e.evaluate=e._evaluateRegExpMatch:"!~"===e._value?e.evaluate=e._evaluateRegExpNotMatch:e$2b(O$s[e._value])&&(e.evaluate=Re$c(e._value)):e._type===s$u.TERNARY?e.evaluate=be$h(e._value):e._type===s$u.MEMBER?"brackets"===e._value?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===s$u.ARRAY?e.evaluate=e._evaluateArray:e._type===s$u.VARIABLE?e.evaluate=e._evaluateVariable:e._type===s$u.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===s$u.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===s$u.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===s$u.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===s$u.REGEX?e.evaluate=e._evaluateRegExp:e._type===s$u.BUILTIN_VARIABLE?"tiles3d_tileset_time"===e._value&&(e.evaluate=Ee$g):e.evaluate=e._evaluateLiteral}function Ee$g(e){return e$2b(e)?e.content.tileset.timeSinceLoad:0}function Ae$e(e){var t=C$B[e];return function(i){var n=this._left.evaluate(i);return t(e,n)}}function Re$c(e){var t=O$s[e];return function(i){var n=this._left.evaluate(i),r=this._right.evaluate(i);return t(e,n,r)}}function be$h(e){var t=F$E[e];return function(i){var n=this._left.evaluate(i),r=this._right.evaluate(i),o=this._test.evaluate(i);return t(e,n,r,o)}}function M$B(e,t){if(e$2b(e))return e.getProperty(t)}function D$y(e){return"feature"===e._value}function k$u(e){for(var t=e._left,i=t.length,n=0;n<i;++n)if(t[n]._type!==s$u.LITERAL_NUMBER)return;var r=t[0]._value,o=t[1]._value,a=t[2]._value,s=4===i?t[3]._value:1;return e$1U.fromHsl(r,o,a,s,T$x)}function P$x(e){for(var t=e._left,i=t.length,n=0;n<i;++n)if(t[n]._type!==s$u.LITERAL_NUMBER)return;var r=T$x;return r.red=t[0]._value/255,r.green=t[1]._value/255,r.blue=t[2]._value/255,r.alpha=4===i?t[3]._value:1,r}function A$D(e){return e%1==0?e.toFixed(1):e.toString()}function Le$h(e){return"vec3("+A$D(e.red)+", "+A$D(e.green)+", "+A$D(e.blue)+")"}function S$u(e){return"vec4("+A$D(e.red)+", "+A$D(e.green)+", "+A$D(e.blue)+", "+A$D(e.alpha)+")"}function X$s(e,t,i,n){for(var r=e.length,o=new Array(r),a=0;a<r;++a)o[a]=e[a].getShaderExpression(t,i,n);return o}u$C.prototype._evaluateLiteral=function(){return this._value},u$C.prototype._evaluateLiteralColor=function(e){var t=T$x,i=this._left;if("color"===this._value)e$2b(i)?i.length>1?(e$1U.fromCssColorString(i[0].evaluate(e),t),t.alpha=i[1].evaluate(e)):e$1U.fromCssColorString(i[0].evaluate(e),t):e$1U.fromBytes(255,255,255,255,t);else if("rgb"===this._value)e$1U.fromBytes(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),255,t);else if("rgba"===this._value){var n=255*i[3].evaluate(e);e$1U.fromBytes(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),n,t)}else"hsl"===this._value?e$1U.fromHsl(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),1,t):"hsla"===this._value&&e$1U.fromHsl(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),i[3].evaluate(e),t);return e$29.fromColor(t,m$y.getCartesian4())},u$C.prototype._evaluateLiteralVector=function(e){for(var t=m$y.getArray(),i=this._value,n=this._left,r=n.length,o=0;o<r;++o){var a=n[o].evaluate(e);if("number"==typeof a)t.push(a);else if(a instanceof o$1o)t.push(a.x,a.y);else if(a instanceof o$1p)t.push(a.x,a.y,a.z);else{if(!(a instanceof e$29))throw new t$14(i+" argument must be a vector or number. Argument is "+a+".");t.push(a.x,a.y,a.z,a.w)}}var s=t.length,l=parseInt(i.charAt(3));if(0===s)throw new t$14("Invalid "+i+" constructor. No valid arguments.");if(s<l&&s>1)throw new t$14("Invalid "+i+" constructor. Not enough arguments.");if(s>l&&r>1)throw new t$14("Invalid "+i+" constructor. Too many arguments.");if(1===s){var u=t[0];t.push(u,u,u)}return"vec2"===i?o$1o.fromArray(t,0,m$y.getCartesian2()):"vec3"===i?o$1p.fromArray(t,0,m$y.getCartesian3()):"vec4"===i?e$29.fromArray(t,0,m$y.getCartesian4()):void 0},u$C.prototype._evaluateLiteralString=function(){return this._value},u$C.prototype._evaluateVariableString=function(e){for(var t=this._value,i=V$p.exec(t);null!==i;){var n=i[0],r=M$B(e,i[1]);e$2b(r)||(r=""),t=t.replace(n,r),i=V$p.exec(t)}return t},u$C.prototype._evaluateVariable=function(e){return M$B(e,this._value)},u$C.prototype._evaluateMemberDot=function(e){if(D$y(this._left))return M$B(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(e$2b(t)){var i=this._right.evaluate(e);if(t instanceof o$1o||t instanceof o$1p||t instanceof e$29){if("r"===i)return t.x;if("g"===i)return t.y;if("b"===i)return t.z;if("a"===i)return t.w}return t[i]}},u$C.prototype._evaluateMemberBrackets=function(e){if(D$y(this._left))return M$B(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(e$2b(t)){var i=this._right.evaluate(e);if(t instanceof o$1o||t instanceof o$1p||t instanceof e$29){if(0===i||"r"===i)return t.x;if(1===i||"g"===i)return t.y;if(2===i||"b"===i)return t.z;if(3===i||"a"===i)return t.w}return t[i]}},u$C.prototype._evaluateArray=function(e){for(var t=[],i=0;i<this._value.length;i++)t[i]=this._value[i].evaluate(e);return t},u$C.prototype._evaluateNot=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$14('Operator "!" requires a boolean argument. Argument is '+t+".");return!t},u$C.prototype._evaluateNegative=function(e){var t=this._left.evaluate(e);if(t instanceof o$1o)return o$1o.negate(t,m$y.getCartesian2());if(t instanceof o$1p)return o$1p.negate(t,m$y.getCartesian3());if(t instanceof e$29)return e$29.negate(t,m$y.getCartesian4());if("number"==typeof t)return-t;throw new t$14('Operator "-" requires a vector or number argument. Argument is '+t+".")},u$C.prototype._evaluatePositive=function(e){var t=this._left.evaluate(e);if(!(t instanceof o$1o||t instanceof o$1p||t instanceof e$29||"number"==typeof t))throw new t$14('Operator "+" requires a vector or number argument. Argument is '+t+".");return t},u$C.prototype._evaluateLessThan=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$14('Operator "<" requires number arguments. Arguments are '+t+" and "+i+".");return t<i},u$C.prototype._evaluateLessThanOrEquals=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$14('Operator "<=" requires number arguments. Arguments are '+t+" and "+i+".");return t<=i},u$C.prototype._evaluateGreaterThan=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$14('Operator ">" requires number arguments. Arguments are '+t+" and "+i+".");return t>i},u$C.prototype._evaluateGreaterThanOrEquals=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$14('Operator ">=" requires number arguments. Arguments are '+t+" and "+i+".");return t>=i},u$C.prototype._evaluateOr=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$14('Operator "||" requires boolean arguments. First argument is '+t+".");if(t)return!0;var i=this._right.evaluate(e);if("boolean"!=typeof i)throw new t$14('Operator "||" requires boolean arguments. Second argument is '+i+".");return t||i},u$C.prototype._evaluateAnd=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$14('Operator "&&" requires boolean arguments. First argument is '+t+".");if(!t)return!1;var i=this._right.evaluate(e);if("boolean"!=typeof i)throw new t$14('Operator "&&" requires boolean arguments. Second argument is '+i+".");return t&&i},u$C.prototype._evaluatePlus=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.add(t,i,m$y.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.add(t,i,m$y.getCartesian3());if(i instanceof e$29&&t instanceof e$29)return e$29.add(t,i,m$y.getCartesian4());if("string"==typeof t||"string"==typeof i)return t+i;if("number"==typeof t&&"number"==typeof i)return t+i;throw new t$14('Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateMinus=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.subtract(t,i,m$y.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.subtract(t,i,m$y.getCartesian3());if(i instanceof e$29&&t instanceof e$29)return e$29.subtract(t,i,m$y.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t-i;throw new t$14('Operator "-" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateTimes=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.multiplyComponents(t,i,m$y.getCartesian2());if(i instanceof o$1o&&"number"==typeof t)return o$1o.multiplyByScalar(i,t,m$y.getCartesian2());if(t instanceof o$1o&&"number"==typeof i)return o$1o.multiplyByScalar(t,i,m$y.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.multiplyComponents(t,i,m$y.getCartesian3());if(i instanceof o$1p&&"number"==typeof t)return o$1p.multiplyByScalar(i,t,m$y.getCartesian3());if(t instanceof o$1p&&"number"==typeof i)return o$1p.multiplyByScalar(t,i,m$y.getCartesian3());if(i instanceof e$29&&t instanceof e$29)return e$29.multiplyComponents(t,i,m$y.getCartesian4());if(i instanceof e$29&&"number"==typeof t)return e$29.multiplyByScalar(i,t,m$y.getCartesian4());if(t instanceof e$29&&"number"==typeof i)return e$29.multiplyByScalar(t,i,m$y.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t*i;throw new t$14('Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateDivide=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.divideComponents(t,i,m$y.getCartesian2());if(t instanceof o$1o&&"number"==typeof i)return o$1o.divideByScalar(t,i,m$y.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.divideComponents(t,i,m$y.getCartesian3());if(t instanceof o$1p&&"number"==typeof i)return o$1p.divideByScalar(t,i,m$y.getCartesian3());if(i instanceof e$29&&t instanceof e$29)return e$29.divideComponents(t,i,m$y.getCartesian4());if(t instanceof e$29&&"number"==typeof i)return e$29.divideByScalar(t,i,m$y.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t/i;throw new t$14('Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateMod=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.fromElements(t.x%i.x,t.y%i.y,m$y.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.fromElements(t.x%i.x,t.y%i.y,t.z%i.z,m$y.getCartesian3());if(i instanceof e$29&&t instanceof e$29)return e$29.fromElements(t.x%i.x,t.y%i.y,t.z%i.z,t.w%i.w,m$y.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t%i;throw new t$14('Operator "%" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateEqualsStrict=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);return i instanceof o$1o&&t instanceof o$1o||i instanceof o$1p&&t instanceof o$1p||i instanceof e$29&&t instanceof e$29?t.equals(i):("bigint"==typeof t&&(t=Number(t)),t===i)},u$C.prototype._evaluateNotEqualsStrict=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);return i instanceof o$1o&&t instanceof o$1o||i instanceof o$1p&&t instanceof o$1p||i instanceof e$29&&t instanceof e$29?!t.equals(i):t!==i},u$C.prototype._evaluateConditional=function(e){var t=this._test.evaluate(e);if("boolean"!=typeof t)throw new t$14("Conditional argument of conditional expression must be a boolean. Argument is "+t+".");return t?this._left.evaluate(e):this._right.evaluate(e)},u$C.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))},u$C.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))},u$C.prototype._evaluateIsExactClass=function(e){return!!e$2b(e)&&e.isExactClass(this._left.evaluate(e))},u$C.prototype._evaluateIsClass=function(e){return!!e$2b(e)&&e.isClass(this._left.evaluate(e))},u$C.prototype._evaluateGetExactClassName=function(e){if(e$2b(e))return e.getExactClassName()},u$C.prototype._evaluateBooleanConversion=function(e){return Boolean(this._left.evaluate(e))},u$C.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))},u$C.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))},u$C.prototype._evaluateRegExp=function(e){var t,i=this._value.evaluate(e),n="";e$2b(this._left)&&(n=this._left.evaluate(e));try{t=new RegExp(i,n)}catch(e){throw new t$14(e)}return t},u$C.prototype._evaluateRegExpTest=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof i))throw new t$14("RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+i+".");return t.test(i)},u$C.prototype._evaluateRegExpMatch=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof i)return t.test(i);if(i instanceof RegExp&&"string"==typeof t)return i.test(t);throw new t$14('Operator "=~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateRegExpNotMatch=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof i)return!t.test(i);if(i instanceof RegExp&&"string"==typeof t)return!i.test(t);throw new t$14('Operator "!~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateRegExpExec=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof i))throw new t$14("RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+i+".");var n=t.exec(i);return e$2b(n)?n[1]:null},u$C.prototype._evaluateToString=function(e){var t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof o$1o||t instanceof o$1p||t instanceof e$29)return String(t);throw new t$14('Unexpected function call "'+this._value+'".')};var $$z="czm_infinity";function y$y(e){e=u$_(e,u$_.EMPTY_OBJECT),this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=u$_(e.center,o$1p.ZERO),this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilPreloadPass=void 0,this._rsStencilPreloadPass3DTiles=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=e$1U.clone(e$1U.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=u$_(e.classificationType,_0x3b5200.BOTH),this._vertexShaderSource=e._vertexShaderSource,this._fragmentShaderSource=e._fragmentShaderSource,this._attributeLocations=e._attributeLocations,this._uniformMap=e._uniformMap,this._pickId=e._pickId,this._modelMatrix=e._modelMatrix,this._boundingSphere=e._boundingSphere,this._batchIdLookUp={};for(var t=this._batchIds.length,i=0;i<t;++i){var n=this._batchIds[i];this._batchIdLookUp[n]=i}}u$C.prototype.getShaderExpression=function(e,t,i){var n,r,o,a,s=this._type,l=this._value;switch(e$2b(this._left)&&(r=Array.isArray(this._left)?X$s(this._left,e,t,this):this._left.getShaderExpression(e,t,this)),e$2b(this._right)&&(o=this._right.getShaderExpression(e,t,this)),e$2b(this._test)&&(a=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(l=X$s(this._value,e,t,this)),s){case s$u.VARIABLE:return e+l;case s$u.UNARY:if("Boolean"===l)return"bool("+r+")";if("Number"===l)return"float("+r+")";if("round"===l)return"floor("+r+" + 0.5)";if(e$2b(C$B[l]))return l+"("+r+")";if("isNaN"===l)return"("+r+" != "+r+")";if("isFinite"===l)return"(abs("+r+") < czm_infinity)";if("String"===l||"isExactClass"===l||"isClass"===l||"getExactClassName"===l)throw new t$14('Error generating style shader: "'+l+'" is not supported.');return e$2b(C$B[l])?l+"("+r+")":l+r;case s$u.BINARY:return"%"===l?"mod("+r+", "+o+")":"==="===l?"("+r+" == "+o+")":"!=="===l?"("+r+" != "+o+")":"atan2"===l?"atan("+r+", "+o+")":e$2b(O$s[l])?l+"("+r+", "+o+")":"("+r+" "+l+" "+o+")";case s$u.TERNARY:if(e$2b(F$E[l]))return l+"("+r+", "+o+", "+a+")";break;case s$u.CONDITIONAL:return"("+a+" ? "+r+" : "+o+")";case s$u.MEMBER:return"r"===o||"x"===o||"0.0"===o?r+"[0]":"g"===o||"y"===o||"1.0"===o?r+"[1]":"b"===o||"z"===o||"2.0"===o?r+"[2]":"a"===o||"w"===o||"3.0"===o?r+"[3]":r+"[int("+o+")]";case s$u.FUNCTION_CALL:throw new t$14('Error generating style shader: "'+l+'" is not supported.');case s$u.ARRAY:if(4===l.length)return"vec4("+l[0]+", "+l[1]+", "+l[2]+", "+l[3]+")";if(3===l.length)return"vec3("+l[0]+", "+l[1]+", "+l[2]+")";if(2===l.length)return"vec2("+l[0]+", "+l[1]+")";throw new t$14("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case s$u.REGEX:throw new t$14("Error generating style shader: Regular expressions are not supported.");case s$u.VARIABLE_IN_STRING:throw new t$14("Error generating style shader: Converting a variable to a string is not supported.");case s$u.LITERAL_NULL:return $$z;case s$u.LITERAL_BOOLEAN:return l?"true":"false";case s$u.LITERAL_NUMBER:return A$D(l);case s$u.LITERAL_STRING:if(e$2b(i)&&i._type===s$u.MEMBER&&("r"===l||"g"===l||"b"===l||"a"===l||"x"===l||"y"===l||"z"===l||"w"===l))return l;if(e$2b(n=e$1U.fromCssColorString(l,T$x)))return Le$h(n);throw new t$14("Error generating style shader: String literals are not supported.");case s$u.LITERAL_COLOR:var u=r;if("color"===l){if(!e$2b(u))return"vec4(1.0)";if(u.length>1){var c=u[0],h=u[1];return"1.0"!==h&&(t.translucent=!0),"vec4("+c+", "+h+")"}return"vec4("+u[0]+", 1.0)"}if("rgb"===l)return e$2b(n=P$x(this))?S$u(n):"vec4("+u[0]+" / 255.0, "+u[1]+" / 255.0, "+u[2]+" / 255.0, 1.0)";if("rgba"===l)return"1.0"!==u[3]&&(t.translucent=!0),e$2b(n=P$x(this))?S$u(n):"vec4("+u[0]+" / 255.0, "+u[1]+" / 255.0, "+u[2]+" / 255.0, "+u[3]+")";if("hsl"===l)return e$2b(n=k$u(this))?S$u(n):"vec4(czm_HSLToRGB(vec3("+u[0]+", "+u[1]+", "+u[2]+")), 1.0)";if("hsla"===l)return e$2b(n=k$u(this))?(1!==n.alpha&&(t.translucent=!0),S$u(n)):("1.0"!==u[3]&&(t.translucent=!0),"vec4(czm_HSLToRGB(vec3("+u[0]+", "+u[1]+", "+u[2]+")), "+u[3]+")");break;case s$u.LITERAL_VECTOR:if(!e$2b(r))throw new t$16("left should always be defined for type ExpressionNodeType.LITERAL_VECTOR");for(var d=r.length,f=l+"(",p=0;p<d;++p)f+=r[p],p<d-1&&(f+=", ");return f+=")";case s$u.LITERAL_REGEX:throw new t$14("Error generating style shader: Regular expressions are not supported.");case s$u.LITERAL_UNDEFINED:return $$z;case s$u.BUILTIN_VARIABLE:if("tiles3d_tileset_time"===l)return"u_time"}},Object.defineProperties(y$y.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var te$k={position:0,a_batchId:1};function se$g(e,t){if(!e$2b(e._va)){var i=t$Y.createVertexBuffer({context:t,typedArray:e._positions,usage:A$19.STATIC_DRAW}),n=t$Y.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:A$19.STATIC_DRAW}),r=t$Y.createIndexBuffer({context:t,typedArray:e._indices,usage:A$19.DYNAMIC_DRAW,indexDatatype:2===e._indices.BYTES_PER_ELEMENT?ce$x.UNSIGNED_SHORT:ce$x.UNSIGNED_INT}),o=[{index:0,vertexBuffer:i,componentDatatype:S$12.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:n,componentDatatype:S$12.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}];e._va=new c$12({context:t,attributes:o,indexBuffer:r}),t.webgl2&&(e._vaSwap=new c$12({context:t,attributes:o,indexBuffer:t$Y.createIndexBuffer({context:t,sizeInBytes:r.sizeInBytes,usage:A$19.DYNAMIC_DRAW,indexDatatype:r.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._verticesPromise=void 0}}function ne$p(e,t){if(!e$2b(e._sp)){var i=e._batchTable,n=u$_(e._attributeLocations,te$k),r=e._pickId,o=e._vertexShaderSource,a=e._fragmentShaderSource;if(e$2b(o))return e._sp=r$13.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:n}),e._spStencil=e._sp,a=(a=s$U.replaceMain(a,"czm_non_pick_main"))+"void main() \n{ \n czm_non_pick_main(); \n gl_FragColor = "+r+"; \n} \n",void(e._spPick=r$13.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:n}));var s=i.getVertexShaderCallback(!1,"a_batchId",void 0)(G$B),l=i.getFragmentShaderCallback()(Q$Q,!1,void 0);r=i.getPickId();var u=new s$U({sources:[s]}),c=new s$U({defines:["VECTOR_TILE"],sources:[l]});e._sp=r$13.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:n}),u=new s$U({sources:[G$B]}),c=new s$U({defines:["VECTOR_TILE"],sources:[Q$Q]}),e._spStencil=r$13.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:n}),l=(l=s$U.replaceMain(l,"czm_non_pick_main"))+"\nvoid main() \n{ \n czm_non_pick_main(); \n gl_FragColor = "+r+"; \n} \n";var h=new s$U({sources:[s]}),d=new s$U({defines:["VECTOR_TILE"],sources:[l]});e._spPick=r$13.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:n})}}function m$x(e){var t=e?m$X.EQUAL:m$X.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.DECREMENT_WRAP,zPass:n$Y.DECREMENT_WRAP},backFunction:t,backOperation:{fail:n$Y.KEEP,zFail:n$Y.INCREMENT_WRAP,zPass:n$Y.INCREMENT_WRAP},reference:u$N.CESIUM_3D_TILE_MASK,mask:u$N.CESIUM_3D_TILE_MASK},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1}}function J$t(e){var t=e?m$X.EQUAL:m$X.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.INCREMENT_WRAP},backFunction:t,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:u$N.CESIUM_3D_TILE_MASK,mask:u$N.CESIUM_3D_TILE_MASK},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:re$E.LESS_OR_EQUAL},depthMask:!1}}var oe$h={stencilTest:{enabled:!0,frontFunction:m$X.NOT_EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},backFunction:m$X.NOT_EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:0,mask:u$N.CLASSIFICATION_MASK},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Ee$r.ALPHA_BLEND},fe$d={stencilTest:{enabled:!0,frontFunction:m$X.NOT_EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},backFunction:m$X.NOT_EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:0,mask:u$N.CLASSIFICATION_MASK},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function ce$h(e){e$2b(e._rsStencilPreloadPass)||(e._rsStencilPreloadPass=d$1m.fromCache(m$x(!1)),e._rsStencilPreloadPass3DTiles=d$1m.fromCache(m$x(!0)),e._rsStencilDepthPass=d$1m.fromCache(J$t(!1)),e._rsStencilDepthPass3DTiles=d$1m.fromCache(J$t(!0)),e._rsColorPass=d$1m.fromCache(oe$h),e._rsPickPass=d$1m.fromCache(fe$d))}var w$v=new p$1d,Z$v=new o$1p;function _e$e(e,t){if(!e$2b(e._uniformMap)){var i={u_modifiedModelViewProjection:function(){var i=t.uniformState.view,n=t.uniformState.projection;return p$1d.clone(i,w$v),p$1d.multiplyByPoint(w$v,e._center,Z$v),p$1d.setTranslation(w$v,Z$v,w$v),p$1d.multiply(n,w$v,w$v),w$v},u_highlightColor:function(){return e._highlightColor}};e._uniformMap=e._batchTable.getUniformMapCallback()(i)}}function U$w(e,t,i,n,r,o,a){for(var s=e.constructor.BYTES_PER_ELEMENT,l=o.length,u=0;u<l;++u){var c=a[o[u]],h=n[c],d=r[c],f=new e.constructor(e.buffer,s*h,d);t.set(f,i),n[c]=i,i+=d}return i}function ue$i(e,t){var i=e._indices,n=e._indexOffsets,r=e._indexCounts,o=e._batchIdLookUp,a=new i.constructor(i.length),s=t.pop(),l=[s],u=U$w(i,a,0,n,r,s.batchIds,o);for(s.offset=0,s.count=u;t.length>0;){var c=t.pop();if(e$1U.equals(c.color,s.color))u=U$w(i,a,u,n,r,c.batchIds,o),s.batchIds=s.batchIds.concat(c.batchIds),s.count=u-s.offset;else{var h=u;u=U$w(i,a,u,n,r,c.batchIds,o),c.offset=h,c.count=u-h,l.push(c),s=c}}e._va.indexBuffer.copyFromArrayView(a),e._indices=a,e._batchedIndices=l}function B$v(e,t,i,n,r,o,a){for(var s=e.bytesPerIndex,l=o.length,u=0;u<l;++u){var c=a[o[u]],h=n[c],d=r[c];t.copyFromBuffer(e,h*s,i*s,d*s),n[c]=i,i+=d}return i}function he$d(e,t){var i=e._indexOffsets,n=e._indexCounts,r=e._batchIdLookUp,o=t.pop(),a=[o],s=e._va.indexBuffer,l=e._vaSwap.indexBuffer,u=B$v(s,l,0,i,n,o.batchIds,r);for(o.offset=0,o.count=u;t.length>0;){var c=t.pop();if(e$1U.equals(c.color,o.color))u=B$v(s,l,u,i,n,c.batchIds,r),o.batchIds=o.batchIds.concat(c.batchIds),o.count=u-o.offset;else{var h=u;u=B$v(s,l,u,i,n,c.batchIds,r),c.offset=h,c.count=u-h,a.push(c),o=c}}var d=e._va;e._va=e._vaSwap,e._vaSwap=d,e._batchedIndices=a}function de$f(e,t){return t.color.toRgba()-e.color.toRgba()}function le$k(e,t){if(!e._batchDirty)return!1;for(var i=e._batchedIndices,n=i.length,r=!1,o={},a=0;a<n;++a){var s=i[a].color.toRgba();if(e$2b(o[s])){r=!0;break}o[s]=!0}return r?r&&!e.forceRebatch&&e._framesSinceLastRebatch<120?void++e._framesSinceLastRebatch:(i.sort(de$f),t.webgl2?he$d(e,i):ue$i(e,i),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0):(e._batchDirty=!1,!1)}function ie$l(e,t){var i=le$k(e,t),n=e._commands,r=e._batchedIndices,o=r.length,a=3*o;if(!e$2b(n)||i||n.length!==a){n.length=a;for(var s=e._va,l=e._sp,u=u$_(e._modelMatrix,p$1d.IDENTITY),c=e._uniformMap,h=e._boundingVolume,d=0;d<o;++d){var f=r[d].offset,p=r[d].count,_=n[3*d];e$2b(_)||(_=n[3*d]=new i$_({owner:e})),_.vertexArray=s,_.modelMatrix=u,_.offset=f,_.count=p,_.renderState=e._rsStencilPreloadPass,_.shaderProgram=l,_.uniformMap=c,_.boundingVolume=h,_.cull=!1,_.pass=Le$s.TERRAIN_CLASSIFICATION;var m=i$_.shallowClone(_,_.derivedCommands.tileset);m.renderState=e._rsStencilPreloadPass3DTiles,m.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,_.derivedCommands.tileset=m;var g=n[3*d+1];e$2b(g)||(g=n[3*d+1]=new i$_({owner:e})),g.vertexArray=s,g.modelMatrix=u,g.offset=f,g.count=p,g.renderState=e._rsStencilDepthPass,g.shaderProgram=l,g.uniformMap=c,g.boundingVolume=h,g.cull=!1,g.pass=Le$s.TERRAIN_CLASSIFICATION;var x=i$_.shallowClone(g,g.derivedCommands.tileset);x.renderState=e._rsStencilDepthPass3DTiles,x.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,g.derivedCommands.tileset=x;var v=n[3*d+2];e$2b(v)||(v=n[3*d+2]=new i$_({owner:e})),v.vertexArray=s,v.modelMatrix=u,v.offset=f,v.count=p,v.renderState=e._rsColorPass,v.shaderProgram=l,v.uniformMap=c,v.boundingVolume=h,v.cull=!1,v.pass=Le$s.TERRAIN_CLASSIFICATION;var y=i$_.shallowClone(v,v.derivedCommands.tileset);y.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,v.derivedCommands.tileset=y}e._commandsDirty=!0}}function Ie$b(e,t){if(e.classificationType!==_0x3b5200.TERRAIN&&t.invertClassification&&(!e$2b(e._commandsIgnoreShow)||e._commandsDirty)){for(var i=e._commands,n=e._commandsIgnoreShow,r=e._spStencil,o=i.length,a=n.length=o/3*2,s=0,l=0;l<a;l+=2){var u=n[l]=i$_.shallowClone(i[s],n[l]);u.shaderProgram=r,u.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,(u=n[l+1]=i$_.shallowClone(i[s+1],n[l+1])).shaderProgram=r,u.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,s+=3}e._commandsDirty=!1}}function Se$9(e){if(e._pickCommandsDirty){var t=e._indexOffsets.length,i=e._pickCommands;i.length=3*t;for(var n=e._va,r=e._spStencil,o=e._spPick,a=u$_(e._modelMatrix,p$1d.IDENTITY),s=e._uniformMap,l=0;l<t;++l){var u=e._indexOffsets[l],c=e._indexCounts[l],h=e$2b(e._boundingVolumes)?e._boundingVolumes[l]:e.boundingVolume,d=i[3*l];e$2b(d)||(d=i[3*l]=new i$_({owner:e,pickOnly:!0})),d.vertexArray=n,d.modelMatrix=a,d.offset=u,d.count=c,d.renderState=e._rsStencilPreloadPass,d.shaderProgram=r,d.uniformMap=s,d.boundingVolume=h,d.pass=Le$s.TERRAIN_CLASSIFICATION;var f=i$_.shallowClone(d,d.derivedCommands.tileset);f.renderState=e._rsStencilPreloadPass3DTiles,f.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=f;var p=i[3*l+1];e$2b(p)||(p=i[3*l+1]=new i$_({owner:e,pickOnly:!0})),p.vertexArray=n,p.modelMatrix=a,p.offset=u,p.count=c,p.renderState=e._rsStencilDepthPass,p.shaderProgram=r,p.uniformMap=s,p.boundingVolume=h,p.pass=Le$s.TERRAIN_CLASSIFICATION;var _=i$_.shallowClone(p,p.derivedCommands.tileset);_.renderState=e._rsStencilDepthPass3DTiles,_.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=_;var m=i[3*l+2];e$2b(m)||(m=i[3*l+2]=new i$_({owner:e,pickOnly:!0})),m.vertexArray=n,m.modelMatrix=a,m.offset=u,m.count=c,m.renderState=e._rsPickPass,m.shaderProgram=o,m.uniformMap=s,m.boundingVolume=h,m.pass=Le$s.TERRAIN_CLASSIFICATION;var g=i$_.shallowClone(m,m.derivedCommands.tileset);g.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,m.derivedCommands.tileset=g}e._pickCommandsDirty=!1}}function be$g(e,t){e._updatingAllCommands=!0;var i,n=e._batchIds,r=n.length;for(i=0;i<r;++i){var o=t[n[i]];o.show=!0,o.color=e$1U.WHITE}var a=e._batchedIndices;for(r=a.length,i=0;i<r;++i)a[i].color=e$1U.clone(e$1U.WHITE);e._updatingAllCommands=!1,e._batchDirty=!0}y$y.prototype.createFeatures=function(e,t){for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=i[r];t[o]=new e$L(e,o)}},y$y.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var ge$d=new e$1U,Ee$f=e$1U.WHITE,Te$c=!0,Ae$d=/\$/;function $$y(e,t,i,n){var r,o,a=e.classificationType,s=a!==_0x3b5200.CESIUM_3D_TILE,l=a!==_0x3b5200.TERRAIN,u=t.commandList,c=i.length;for(o=0;o<c;++o)s&&((r=i[o]).pass=Le$s.TERRAIN_CLASSIFICATION,u.push(r)),l&&((r=i[o].derivedCommands.tileset).pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,u.push(r));if(t.invertClassification&&e$2b(n))for(c=n.length,o=0;o<c;++o)u.push(n[o])}function ve$d(e,t){for(var i=e.commandList,n=t.length,r=0;r<n;r+=3){var o=t[r+2];o.pass=Le$s.OPAQUE,i.push(o)}}function Le$g(e){var t=e.debugWireframe===e._debugWireframe;if(!(t=t&&!(e.debugWireframe&&e._wireframeDirty))){var i,n;e$2b(e._rsWireframe)||(e._rsWireframe=d$1m.fromCache({})),e.debugWireframe?(i=e._rsWireframe,n=W$18.LINES):(i=e._rsColorPass,n=W$18.TRIANGLES);for(var r=e._commands,o=r.length,a=0;a<o;a+=3){var s=r[a+2];s.renderState=i,s.primitiveType=n}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}}y$y.prototype.applyStyle=function(e,t){if(e$2b(e)){var i=e.color,n=i instanceof L$E&&!Ae$d.test(i.expression);this._updatingAllCommands=n;var r,o=this._batchIds,a=o.length;for(r=0;r<a;++r){var s=t[o[r]];s.color=e$2b(e.color)?e.color.evaluateColor(s,ge$d):Ee$f,s.show=e$2b(e.show)?e.show.evaluate(s):Te$c}if(n){var l=this._batchedIndices;for(a=l.length,r=0;r<a;++r)l[r].color=e$1U.clone(e$1U.WHITE);this._updatingAllCommands=!1,this._batchDirty=!0}}else be$g(this,t)},y$y.prototype.updateCommands=function(e,t){if(!this._updatingAllCommands){var i=this._batchIdLookUp,n=i[e];if(e$2b(n)){var r,o=this._indexOffsets,a=this._indexCounts,s=o[n],l=a[n],u=this._batchedIndices,c=u.length;for(r=0;r<c;++r){var h=u[r].offset,d=u[r].count;if(s>=h&&s<h+d)break}u.push(new c$w({color:e$1U.clone(t),offset:s,count:l,batchIds:[e]}));for(var f=[],p=[],_=u[r].batchIds,m=_.length,g=0;g<m;++g){var x=_[g];if(x!==e)o[i[x]]<s?f.push(x):p.push(x)}0!==p.length&&u.push(new c$w({color:e$1U.clone(u[r].color),offset:s+l,count:u[r].offset+u[r].count-(s+l),batchIds:p})),0!==f.length?(u[r].count=s-u[r].offset,u[r].batchIds=f):u.splice(r,1),this._batchDirty=!0}}},y$y.prototype.update=function(e){var t=e.context;se$g(this,t),ne$p(this,t),ce$h(this),_e$e(this,t);var i=e.passes;i.render&&(ie$l(this,t),Ie$b(this,e),Le$g(this),this._debugWireframe?ve$d(e,this._commands):$$y(this,e,this._commands,this._commandsIgnoreShow)),i.pick&&(Se$9(this),$$y(this,e,this._pickCommands))},y$y.prototype.isDestroyed=function(){return!1},y$y.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaSwap=this._vaSwap&&this._vaSwap.destroy(),i$10(this)};var Ee$e=new o$1p,y$x=s$v.ModelState;function A$C(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).gltf;if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),!(t instanceof Uint8Array))throw new t$14("Only binary glTF is supported as a classifier.");re$r(t=O$u(t)),E$D(t),ue$k(t),he$f(t),e$K.buffer(t,(function(e){if(!e$2b(e.extras._pipeline.source))throw new t$14("Buffer data must be embedded in the binary gltf.")}));var i=t.nodes,n=t.meshes,r=i[0].mesh;if(1!==i.length||!e$2b(r))throw new t$14("Only one node is supported for classification and it must have a mesh.");if(1!==n.length)throw new t$14("Only one mesh is supported when using b3dm for classification.");var o=n[0].primitives;if(1!==o.length)throw new t$14("Only one primitive per mesh is supported when using b3dm for classification.");if(!e$2b(o[0].attributes.POSITION))throw new t$14("The mesh must have a position attribute.");if(!e$2b(o[0].attributes._BATCHID))throw new t$14("The mesh must have a batch id attribute.");this._gltf=t,this.show=u$_(e.show,!0),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(this.modelMatrix),this._ready=!1,this._readyPromise=o$1l.defer(),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=u$_(e.debugWireframe,!1),this._debugWireframe=!1,this._classificationType=e.classificationType,this._vertexShaderLoaded=e.vertexShaderLoaded,this._classificationShaderLoaded=e.classificationShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=u$_(e.ignoreCommands,!1),this._upAxis=u$_(e.upAxis,v$y.Y),this._batchTable=e.batchTable,this._computedModelMatrix=new p$1d,this._initialRadius=void 0,this._boundingSphere=void 0,this._scaledBoundingSphere=new i$1c,this._state=y$x.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._dirty=!1,this._nodeMatrix=new p$1d,this._primitive=void 0,this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms=void 0,this._buffers={},this._vertexArray=void 0,this._shaderProgram=void 0,this._uniformMap=void 0,this._geometryByteLength=0,this._trianglesLength=0,this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0}function Ce$a(e){var t=e.gltf,i=e._loadResources;e$K.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function Be$d(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;e$K.bufferView(e.gltf,(function(e,t){e.target===de$x.ARRAY_BUFFER&&i.enqueue(t)}));var n=e._loadResources.indexBuffersToCreate,r={};e$K.accessor(e.gltf,(function(e){var i=e.bufferView;t[i].target===de$x.ELEMENT_ARRAY_BUFFER&&!e$2b(r[i])&&(r[i]=!0,n.enqueue({id:i,componentType:e.componentType}))}))}function Le$f(e,t){var i=t._loadResources,n=t.gltf.bufferViews[e],r=i.getBuffer(n);t._buffers[e]=r,t._geometryByteLength+=r.byteLength}function Oe$c(e,t,i){var n=i._loadResources,r=i.gltf.bufferViews[e],o={typedArray:n.getBuffer(r),indexDatatype:t};i._buffers[e]=o,i._geometryByteLength+=o.typedArray.byteLength}function Ae$c(e){var t=e._loadResources;if(0===t.pendingBufferLoads){for(var i=t.vertexBuffersToCreate,n=t.indexBuffersToCreate;i.length>0;)Le$f(i.dequeue(),e);for(;n.length>0;){var r=n.dequeue();Oe$c(r.id,r.componentType,e)}}}function Me$f(e,t){var i=t.gltf.meshes[0].primitives[0],n=s$v.modifyShaderForQuantizedAttributes(t.gltf,i,e);return t._quantizedUniforms=n.uniforms,n.shader}function ne$o(e,t){return e$2b(t)&&(e=t(e)),e}function we$c(e){var t=e.gltf,i=s$v.getAttributeOrUniformBySemantic(t,"POSITION"),n=s$v.getAttributeOrUniformBySemantic(t,"_BATCHID"),r={};r[i]=0,r[n]=1;var o,a,s=s$v.getAttributeOrUniformBySemantic(t,"MODELVIEWPROJECTION");if(e$2b(s))o="uniform mat4 "+s+";\n",a=s+" * vec4("+i+", 1.0)";else{var l=s$v.getAttributeOrUniformBySemantic(t,"PROJECTION"),u=s$v.getAttributeOrUniformBySemantic(t,"MODELVIEW");e$2b(u)||(u=s$v.getAttributeOrUniformBySemantic(t,"CESIUM_RTC_MODELVIEW")),o="uniform mat4 "+u+";\nuniform mat4 "+l+";\n",a=l+" * "+u+" * vec4("+i+", 1.0)"}var c="attribute vec3 "+i+";\nattribute float "+n+";\n"+o+"void main() {\n"+(" vec4 positionInClipCoords = "+a+";\n")+" gl_Position = czm_depthClampFarPlane(positionInClipCoords);\n}\n";e.extensionsUsed.WEB3D_quantized_attributes&&(c=Me$f(c,e));var h=ne$o(c,e._vertexShaderLoaded),d=ne$o("#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvoid main() \n{ \n gl_FragColor = vec4(1.0); \n czm_writeDepthClampedToFarPlane();\n}\n",e._classificationShaderLoaded);h=s$v.modifyVertexShaderForLogDepth(h,a),d=s$v.modifyFragmentShaderForLogDepth(d),e._shaderProgram={vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:r}}function De$e(){return{POSITION:0,_BATCHID:1}}function Re$b(e){if(e._loadResources.finishedBuffersCreation()&&!e$2b(e._vertexArray)){var t,i=e._buffers,n=e.gltf,r=n.accessors,o=n.meshes[0].primitives[0],a=De$e(),s={};if(e$K.meshPrimitiveAttribute(o,(function(e,t){var o=a[t];if(e$2b(o)){var l=r[e];s[t]={index:o,vertexBuffer:i[l.bufferView],componentsPerAttribute:r$B(l.type),componentDatatype:l.componentType,offsetInBytes:l.byteOffset,strideInBytes:p$A(n,l)}}})),e$2b(o.indices)){var l=r[o.indices];t=i[l.bufferView]}e._vertexArray={attributes:s,indexBuffer:t}}}Object.defineProperties(A$C.prototype,{gltf:{get:function(){return this._gltf}},boundingSphere:{get:function(){if(this._state!==y$x.LOADED)throw new t$16("The model is not loaded. Use ClassificationModel.readyPromise or wait for ClassificationModel.ready to be true.");var e=this.modelMatrix,t=p$1d.getScale(e,Ee$e),i=this._scaledBoundingSphere;return i.center=o$1p.multiplyComponents(this._boundingSphere.center,t,i.center),i.radius=o$1p.maximumComponent(t)*this._initialRadius,e$2b(this._rtcCenter)&&o$1p.add(this._rtcCenter,i.center,i.center),i}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},dirty:{get:function(){return this._dirty}},extensionsUsed:{get:function(){return e$2b(this._extensionsUsed)||(this._extensionsUsed=s$v.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return e$2b(this._extensionsRequired)||(this._extensionsRequired=s$v.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return 0}},classificationType:{get:function(){return this._classificationType}}});var se$f={PROJECTION:function(e,t){return s$v.getGltfSemanticUniforms().PROJECTION(e,t)},MODELVIEW:function(e,t){return s$v.getGltfSemanticUniforms().MODELVIEW(e,t)},CESIUM_RTC_MODELVIEW:function(e,t){return s$v.getGltfSemanticUniforms().CESIUM_RTC_MODELVIEW(e,t)},MODELVIEWPROJECTION:function(e,t){return s$v.getGltfSemanticUniforms().MODELVIEWPROJECTION(e,t)}};function Pe$9(e,t){if(!e$2b(e._uniformMap)){var i={};e$K.technique(e.gltf,(function(n){e$K.techniqueUniform(n,(function(n,r){!e$2b(n.semantic)||!e$2b(se$f[n.semantic])||(i[r]=se$f[n.semantic](t.uniformState,e))}))})),e._uniformMap=i}}function Ue$b(e,t){return s$v.createUniformsForQuantizedAttributes(e.gltf,t,e._quantizedUniforms)}function Ve$b(e,t){switch(e.mode){case W$18.TRIANGLES:return t/3;case W$18.TRIANGLE_STRIP:case W$18.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function Ne$a(e){var t,i,n=e._batchTable,r=e._uniformMap,o=e._vertexArray,a=e.gltf,s=a.accessors,l=a.meshes[0].primitives[0],u=s[l.indices],c=l.attributes.POSITION,h=s$v.getAccessorMinMax(a,c),d=i$1c.fromCornerPoints(o$1p.fromArray(h.min),o$1p.fromArray(h.max));e$2b(u)?(i=u.count,t=u.byteOffset/ce$x.getSizeInBytes(u.componentType)):(i=s[l.attributes.POSITION].count,t=0);(e._trianglesLength+=Ve$b(l,i),e$2b(e._uniformMapLoaded)&&(r=e._uniformMapLoaded(r)),e.extensionsUsed.WEB3D_quantized_attributes)&&(r=p$19(r,Ue$b(e,l)));var f=o.attributes.POSITION,p=f.componentDatatype,_=f.vertexBuffer,m=_.byteOffset,g=_.byteLength/S$12.getSizeInBytes(p),x=S$12.createArrayBufferView(p,_.buffer,m,g);p=(f=o.attributes._BATCHID).componentDatatype,m=(_=f.vertexBuffer).byteOffset,g=_.byteLength/S$12.getSizeInBytes(p);var v,y=S$12.createArrayBufferView(p,_.buffer,m,g),$=o.indexBuffer.typedArray;v=o.indexBuffer.indexDatatype===ce$x.UNSIGNED_SHORT?new Uint16Array($.buffer,$.byteOffset,$.byteLength/Uint16Array.BYTES_PER_ELEMENT):new Uint32Array($.buffer,$.byteOffset,$.byteLength/Uint32Array.BYTES_PER_ELEMENT),x=l$R(x);var b=[],T=[],C=[],S=[],w=(y=l$R(y))[(v=l$R(v,t,t+i))[0]];b.push(w),C.push(0);for(var E,P,A,L=v.length,M=1;M<L;++M)(E=y[v[M]])!==w&&(A=M-(P=C[C.length-1]),b.push(E),T.push(A),C.push(M),S.push(new c$w({offset:P,count:A,batchIds:[w],color:e$1U.WHITE})),w=E);A=L-(P=C[C.length-1]),T.push(A),S.push(new c$w({offset:P,count:A,batchIds:[w],color:e$1U.WHITE}));var R=e._shaderProgram,I=R.vertexShaderSource,O=R.fragmentShaderSource,D=R.attributeLocations,B=e$2b(e._pickIdLoaded)?e._pickIdLoaded():void 0;e._primitive=new y$y({classificationType:e._classificationType,positions:x,indices:v,indexOffsets:C,indexCounts:T,batchIds:b,vertexBatchIds:y,batchedIndices:S,batchTable:n,boundingVolume:new i$1c,_vertexShaderSource:I,_fragmentShaderSource:O,_attributeLocations:D,_uniformMap:r,_pickId:B,_modelMatrix:new p$1d,_boundingSphere:d}),e._buffers=void 0,e._vertexArray=void 0,e._shaderProgram=void 0,e._uniformMap=void 0}function We$a(e){if(e._loadResources.finished()&&!e$2b(e._primitive)){var t=e.gltf.nodes[0];e._nodeMatrix=s$v.getTransform(t,e._nodeMatrix),Ne$a(e)}}function ae$h(e,t){var i=t.context;s$v.checkSupportedGlExtensions(e.gltf.glExtensionsUsed,i),Ae$c(e),we$c(e),Re$b(e),Pe$9(e,i),We$a(e)}var Fe$c=new e$29,Z$u=new p$1d;function qe$5(e,t,i,n){var r=e._computedModelMatrix;if(e._mode!==C$13.SCENE3D&&!e._ignoreCommands){var o=p$1d.getColumn(r,3,Fe$c);if(e$29.equals(o,e$29.UNIT_W)){var a=e.boundingSphere.center,s=m$17.wgs84To2DModelMatrix(n,a,Z$u);r=p$1d.multiply(s,r,Z$u),e$2b(e._rtcCenter)&&(p$1d.setTranslation(r,e$29.UNIT_W,r),e._rtcCenter=e._rtcCenter2D)}else r=m$17.basisTo2D(n,r,Z$u),e._rtcCenter=e._rtcCenter3D}var l=e._primitive;(t||i)&&(p$1d.multiplyTransformation(r,e._nodeMatrix,l._modelMatrix),i$1c.transform(l._boundingSphere,l._modelMatrix,l._boundingVolume),e$2b(e._rtcCenter)&&o$1p.add(e._rtcCenter,l._boundingVolume.center,l._boundingVolume.center))}A$C.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},A$C.prototype.update=function(e){if(e.mode!==C$13.MORPHING){var t=s$Y.supportsWebPSync();if(e$2b(t)){if(this._state===y$x.NEEDS_LOAD&&e$2b(this.gltf)&&(this._state=y$x.LOADING,this._state!==y$x.FAILED)){var i=this.gltf.extensions;if(e$2b(i)&&e$2b(i.CESIUM_RTC)){var n=o$1p.fromArray(i.CESIUM_RTC.center);if(!o$1p.equals(n,o$1p.ZERO)){this._rtcCenter3D=n;var r=e.mapProjection,o=r.ellipsoid.cartesianToCartographic(this._rtcCenter3D),a=r.project(o);o$1p.fromElements(a.z,a.x,a.y,a),this._rtcCenter2D=a,this._rtcCenterEye=new o$1p,this._rtcCenter=this._rtcCenter3D}}this._loadResources=new t$u,s$v.parseBuffers(this)}var s=this._loadResources,l=!1;this._state===y$x.LOADING&&(0===s.pendingBufferLoads&&(s$v.checkSupportedExtensions(this.extensionsRequired,t),Ce$a(this),Be$d(this),this._boundingSphere=s$v.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,ae$h(this,e)),s.finished()&&(this._state=y$x.LOADED,l=!0)),e$2b(s)&&this._state===y$x.LOADED&&(l||ae$h(this,e),s.finished()&&(this._loadResources=void 0));var u=this.show;if(u&&this._state===y$x.LOADED||l){this._dirty=!1;var c=this.modelMatrix,h=e.mode!==this._mode;this._mode=e.mode;var d=!p$1d.equals(this._modelMatrix,c)||h;if(d||l){p$1d.clone(c,this._modelMatrix);var f=this._computedModelMatrix;p$1d.clone(c,f),this._upAxis===v$y.Y?p$1d.multiplyTransformation(f,v$y.Y_UP_TO_Z_UP,f):this._upAxis===v$y.X&&p$1d.multiplyTransformation(f,v$y.X_UP_TO_Z_UP,f)}(d||l)&&(qe$5(this,d,l,e.mapProjection),this._dirty=!0)}if(l){var p=this;return void e.afterRender.push((function(){p._ready=!0,p._readyPromise.resolve(p)}))}u&&!this._ignoreCommands&&(this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.debugWireframe=this.debugWireframe,this._primitive.update(e))}}},A$C.prototype.isDestroyed=function(){return!1},A$C.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$10(this)};var e$J={HIGHLIGHT:0,REPLACE:1,MIX:2,getColorBlend:function(e,t){return e===e$J.HIGHLIGHT?0:e===e$J.REPLACE?1:e===e$J.MIX?e$2a.clamp(t,e$2a.EPSILON4,1):void 0}},I$J=Object.freeze(e$J);function r$A(){}function b$I(e,t){var i="runtime."+Object.keys(e.createdBufferViews).length,n=e.buffers,r=Object.keys(n).length;return n[r]=t,e.createdBufferViews[i]={buffer:r,byteOffset:0,byteLength:t.byteLength},i}function R$s(e,t,i){var n=t._loadResources,r=b$I(n,e);return n.vertexBuffersToCreate.enqueue(r),r}function P$w(e,t,i){var n=e.typedArray,r=t._loadResources,o=b$I(r,n);return r.indexBuffersToCreate.enqueue({id:o,componentType:S$12.fromTypedArray(n)}),{bufferViewId:o,numberOfIndices:e.numberOfIndices}}function T$w(e,t,i,n){if(r$A._taskProcessorReady){var r=i.primitivesToDecode.peek();if(e$2b(r)){var o=e.scheduleTask(r,[r.array.buffer]);if(e$2b(o))return i.activeDecodingTasks++,i.primitivesToDecode.dequeue(),o.then((function(e){i.activeDecodingTasks--;var n=P$w(e.indexArray,t),o={},a=e.attributeData;for(var s in a)if(a.hasOwnProperty(s)){var l=a[s],u=R$s(l.array,t),c=l.data;c.bufferView=u,o[s]=c}t._decodedData[r.mesh+".primitive."+r.primitive]={bufferView:n.bufferViewId,numberOfIndices:n.numberOfIndices,attributes:o}}))}}}function p$x(e,t,i){return o$1q.typeOf.string("samplerUniformName",e),o$1q.typeOf.string("matrixUniformName",t),o$1q.typeOf.string("styleUniformName",i)," float clipDistance = clip(gl_FragCoord, "+e+", "+t+"); \n vec4 clippingPlanesEdgeColor = vec4(1.0); \n clippingPlanesEdgeColor.rgb = "+i+".rgb; \n float clippingPlanesEdgeWidth = "+i+".a; \n if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) \n { \n gl_FragColor = clippingPlanesEdgeColor;\n } \n"}r$A._maxDecodingConcurrency=Math.max(s$Y.hardwareConcurrency-1,1),r$A._decoderTaskProcessor=void 0,r$A._taskProcessorReady=!1,r$A._getDecoderTaskProcessor=function(){if(!e$2b(r$A._decoderTaskProcessor)){var e=new i$V("decodeDraco",r$A._maxDecodingConcurrency);e.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper.js",wasmBinaryFile:"ThirdParty/draco_decoder.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(){r$A._taskProcessorReady=!0})),r$A._decoderTaskProcessor=e}return r$A._decoderTaskProcessor},r$A.hasExtension=function(e){return e$2b(e.extensionsRequired.KHR_draco_mesh_compression)||e$2b(e.extensionsUsed.KHR_draco_mesh_compression)},r$A._decodedModelResourceCache=void 0,r$A.parse=function(e,t){if(r$A.hasExtension(e)){var i=e._loadResources,n=e.cacheKey;if(e$2b(n)){e$2b(r$A._decodedModelResourceCache)||(e$2b(t.cache.modelDecodingCache)||(t.cache.modelDecodingCache={}),r$A._decodedModelResourceCache=t.cache.modelDecodingCache);var r=r$A._decodedModelResourceCache[n];if(e$2b(r))return r.count++,void(i.pendingDecodingCache=!0)}var o=e._dequantizeInShader,a=e.gltf;e$K.mesh(a,(function(e,t){e$K.meshPrimitive(e,(function(e,n){if(e$2b(e.extensions)){var r=e.extensions.KHR_draco_mesh_compression;if(e$2b(r)){var s=a.bufferViews[r.bufferView],l=l$R(a.buffers[s.buffer].extras._pipeline.source,s.byteOffset,s.byteOffset+s.byteLength);i.primitivesToDecode.enqueue({mesh:t,primitive:n,array:l,bufferView:s,compressedAttributes:r.attributes,dequantizeInShader:o})}}}))}))}},r$A.decodeModel=function(e,t){if(!r$A.hasExtension(e))return o$1l.resolve();var i=e._loadResources,n=e.cacheKey;if(e$2b(n)&&e$2b(r$A._decodedModelResourceCache)){var r=r$A._decodedModelResourceCache[n];if(e$2b(r)&&i.pendingDecodingCache)return o$1l(r.ready,(function(){e._decodedData=r.data,i.pendingDecodingCache=!1}));r$A._decodedModelResourceCache[n]={ready:!1,count:1,data:void 0}}if(0===i.primitivesToDecode.length)return o$1l.resolve();for(var o=r$A._getDecoderTaskProcessor(),a=[],s=T$w(o,e,i);e$2b(s);)a.push(s),s=T$w(o,e,i);return o$1l.all(a)},r$A.decodePointCloud=function(e){var t=r$A._getDecoderTaskProcessor();if(r$A._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])},r$A.cacheDataForModel=function(e){var t=e.cacheKey;if(e$2b(t)&&e$2b(r$A._decodedModelResourceCache)){var i=r$A._decodedModelResourceCache[t];e$2b(i)&&(i.ready=!0,i.data=e._decodedData)}},r$A.destroyCachedDataForModel=function(e){var t=e.cacheKey;if(e$2b(t)&&e$2b(r$A._decodedModelResourceCache)){var i=r$A._decodedModelResourceCache[t];e$2b(i)&&0==--i.count&&delete r$A._decodedModelResourceCache[t]}};var m$w=new o$1o;function f$G(e,t){o$1q.typeOf.object("clippingPlaneCollection",e),o$1q.typeOf.object("context",t);var i=e.unionClippingRegions,n=e.length,r=h$K.useFloatTexture(t),o=h$K.getTextureResolution(e,t,m$w),a=o.x,s=o.y,l=r?x$E(a,s):d$I(a,s);return l+="\n",l+=i?s$t(n):v$w(n)}function s$t(e){for(var t="#define inline\nfloat clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount;\n float amount;\n float pixelWidth = czm_metersPerPixel(position);\n bool breakAndDiscard = false;\n vec4 clippingPlane = vec4(0.0);\n",i=0;i<e;++i)t+=" clippingPlane = getClippingPlane(clippingPlanes, "+i+", clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = czm_branchFreeTernary("+i+" == 0, amount, min(amount, clipAmount));\n if (amount <= 0.0)\n {\n breakAndDiscard = true;\n //break;\n }\n";return t+=" if (breakAndDiscard) {\n discard;\n }\n return clipAmount;\n}\n"}function v$w(e){for(var t="#define inline\nfloat clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n bool clipped = true;\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount = 0.0;\n float amount;\n float pixelWidth = czm_metersPerPixel(position);\n vec4 clippingPlane = vec4(0.0);\n",i=0;i<e;++i)t+=" clippingPlane = getClippingPlane(clippingPlanes, "+i+", clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = max(amount, clipAmount);\n clipped = clipped && (amount <= 0.0);\n";return t+=" if (clipped)\n {\n discard;\n }\n return clipAmount;\n}\n"}function x$E(e,t){var i=1/t,n=1/e+"";-1===n.indexOf(".")&&(n+=".0");var r=i+"";return-1===r.indexOf(".")&&(r+=".0"),"#define inline\nvec4 getClippingPlane(sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int pixY = clippingPlaneNumber / "+e+";\n int pixX = clippingPlaneNumber - (pixY * "+e+");\n float u = (float(pixX) + 0.5) * "+n+";\n float v = (float(pixY) + 0.5) * "+r+";\n vec4 plane = texture2D(packedClippingPlanes, vec2(u, v));\n return czm_transformPlane(plane, transform);\n}\n"}function d$I(e,t){var i=1/t,n=1/e+"";-1===n.indexOf(".")&&(n+=".0");var r=i+"";return-1===r.indexOf(".")&&(r+=".0"),"#define inline\nvec4 getClippingPlane(sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int clippingPlaneStartIndex = clippingPlaneNumber * 2;\n int pixY = clippingPlaneStartIndex / "+e+";\n int pixX = clippingPlaneStartIndex - (pixY * "+e+");\n float u = (float(pixX) + 0.5) * "+n+";\n float v = (float(pixY) + 0.5) * "+r+";\n vec4 oct32 = texture2D(packedClippingPlanes, vec2(u, v)) * 255.0;\n vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);\n vec4 plane;\n plane.xyz = czm_octDecode(oct, 65535.0);\n plane.w = czm_unpackFloat(texture2D(packedClippingPlanes, vec2(u + "+n+", v)));\n return czm_transformPlane(plane, transform);\n}\n"}function S$t(){}var W$B=/^data\:/i;function d$H(e,t){var i=e.gltf,n=i.buffers,r=i.bufferViews[t.bufferView],o=n[r.buffer],a=r.byteOffset+t.byteOffset,s=t.count*r$B(t.type),l=W$B.test(o.uri)?"":o.uri;return e.cacheKey+"//"+l+"/"+a+"/"+s}var k$t={};S$t.getAnimationParameterValues=function(e,t){var i=d$H(e,t),n=k$t[i];if(!e$2b(n)){var r=e.gltf,o=r.buffers,a=r.bufferViews[t.bufferView],s=o[a.buffer].extras._pipeline.source,l=t.componentType,u=t.type,c=r$B(u),h=t.count,d=p$A(r,t);n=new Array(h);for(var f=u$_(t.byteOffset,0),p=a.byteOffset+f,_=0;_<h;_++){var m=S$12.createArrayBufferView(l,s.buffer,s.byteOffset+p,c);"SCALAR"===u?n[_]=m[0]:"VEC3"===u?n[_]=o$1p.fromArray(m):"VEC4"===u&&(n[_]=n$13.unpack(m)),p+=d}e$2b(e.cacheKey)&&(k$t[i]=n)}return n};var L$D={};function D$x(e,t,i){return e.cacheKey+"//"+t+"/"+i}function V$o(e){this._value=e}V$o.prototype.evaluate=function(e,t){return this._value},V$o.prototype.wrapTime=function(e){return 0},V$o.prototype.clampTime=function(e){return 0},S$t.getAnimationSpline=function(e,t,i,n,r,o,a,s){var l=D$x(e,t,n),u=L$D[l];if(!e$2b(u)){var c=o,h=s;1===c.length&&1===h.length?u=new V$o(h[0]):"LINEAR"===r.interpolation&&("translation"===a||"scale"===a?u=new r$P({times:c,points:h}):"rotation"===a?u=new r$O({times:c,points:h}):"weights"===a&&(u=new r$D({times:c,weights:h}))),e$2b(e.cacheKey)&&(L$D[l]=u)}return u};var c$v={};S$t.getSkinInverseBindMatrices=function(e,t){var i=d$H(e,t),n=c$v[i];if(!e$2b(n)){var r=e.gltf,o=r.buffers,a=r.bufferViews[t.bufferView],s=o[a.buffer].extras._pipeline.source,l=t.componentType,u=t.type,c=t.count,h=p$A(r,t),d=a.byteOffset+t.byteOffset,f=r$B(u);if(n=new Array(c),l===de$x.FLOAT&&u===Q$y.MAT4)for(var p=0;p<c;++p){var _=S$12.createArrayBufferView(l,s.buffer,s.byteOffset+d,f);n[p]=p$1d.fromArray(_),d+=h}c$v[i]=n}return n};var e$I={NONE:0,REPEAT:1,MIRRORED_REPEAT:2},_0x157d80=Object.freeze(e$I),E$B=Object.freeze({STOPPED:0,ANIMATING:1});function a$x(e,t,i){this._name=i.name,this._startTime=a$15.clone(e.startTime),this._delay=u$_(e.delay,0),this._stopTime=e.stopTime,this.removeOnStop=u$_(e.removeOnStop,!1),this._multiplier=u$_(e.multiplier,1),this._reverse=u$_(e.reverse,!1),this._loop=u$_(e.loop,_0x157d80.NONE),this.start=new o$1h,this.update=new o$1h,this.stop=new o$1h,this._state=E$B.STOPPED,this._runtimeAnimation=i,this._computedStartTime=void 0,this._duration=void 0;var n=this;this._raiseStartEvent=function(){n.start.raiseEvent(t,n)},this._updateEventTime=0,this._raiseUpdateEvent=function(){n.update.raiseEvent(t,n,n._updateEventTime)},this._raiseStopEvent=function(){n.stop.raiseEvent(t,n)}}function f$F(e){this.animationAdded=new o$1h,this.animationRemoved=new o$1h,this._model=e,this._scheduledAnimations=[],this._previousTime=void 0}function R$r(e,t,i){var n=e._model,r=new a$x(i,n,n._runtime.animations[t]);return e._scheduledAnimations.push(r),e.animationAdded.raiseEvent(n,r),r}function N$q(e,t){for(var i=e.channelEvaluators,n=i.length,r=0;r<n;++r)i[r](t)}Object.defineProperties(a$x.prototype,{name:{get:function(){return this._name}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}}}),Object.defineProperties(f$F.prototype,{length:{get:function(){return this._scheduledAnimations.length}}}),f$F.prototype.add=function(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=this._model._runtime.animations;if(!e$2b(t))throw new t$16("Animations are not loaded. Wait for Model.readyPromise to resolve.");if(!e$2b(e.name)&&!e$2b(e.index))throw new t$16("Either options.name or options.index must be defined.");if(e$2b(e.multiplier)&&e.multiplier<=0)throw new t$16("options.multiplier must be greater than zero.");if(e$2b(e.index)&&(e.index>=t.length||e.index<0))throw new t$16("options.index must be a valid animation index.");if(e$2b(e.index))return R$r(this,e.index,e);for(var i,n=t.length,r=0;r<n;++r)if(t[r].name===e.name){i=r;break}if(!e$2b(i))throw new t$16("options.name must be a valid animation name.");return R$r(this,i,e)},f$F.prototype.addAll=function(e){if(e=u$_(e,u$_.EMPTY_OBJECT),!e$2b(this._model._runtime.animations))throw new t$16("Animations are not loaded. Wait for Model.readyPromise to resolve.");if(e$2b(e.multiplier)&&e.multiplier<=0)throw new t$16("options.multiplier must be greater than zero.");for(var t=[],i=this._model._runtime.animations.length,n=0;n<i;++n)t.push(R$r(this,n,e));return t},f$F.prototype.remove=function(e){if(e$2b(e)){var t=this._scheduledAnimations,i=t.indexOf(e);if(-1!==i)return t.splice(i,1),this.animationRemoved.raiseEvent(this._model,e),!0}return!1},f$F.prototype.removeAll=function(){var e=this._model,t=this._scheduledAnimations,i=t.length;this._scheduledAnimations=[];for(var n=0;n<i;++n)this.animationRemoved.raiseEvent(e,t[n])},f$F.prototype.contains=function(e){return!!e$2b(e)&&-1!==this._scheduledAnimations.indexOf(e)},f$F.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return this._scheduledAnimations[e]};var T$v=[];function q$A(e,t,i){return function(){e.animationRemoved.raiseEvent(t,i)}}function a$w(e,t,i){this._name=t.name,this._id=i,this._uniformMap=e._uniformMaps[i],this._technique=void 0,this._program=void 0,this._values=void 0}function a$v(e,t,i){for(var n=[],r=e.primitives,o=r.length,a=0;a<o;++a){var s=r[a];n[a]=t[s.material]}this._name=e.name,this._materials=n,this._id=i}function r$z(e,t,i,n,r){this._model=e,this._runtimeNode=i,this._name=t.name,this._id=n,this.useMatrix=!1,this._show=!0,this._matrix=p$1d.clone(r),this._originalMatrix=p$1d.clone(r)}f$F.prototype.update=function(e){var t=this._scheduledAnimations,i=t.length;if(0===i)return this._previousTime=void 0,!1;if(a$15.equals(e.time,this._previousTime))return!1;this._previousTime=a$15.clone(e.time,this._previousTime);for(var n=!1,r=e.time,o=this._model,a=0;a<i;++a){var s=t[a],l=s._runtimeAnimation;e$2b(s._computedStartTime)||(s._computedStartTime=a$15.addSeconds(u$_(s.startTime,r),s.delay,new a$15)),e$2b(s._duration)||(s._duration=l.stopTime*(1/s.multiplier));var u=s._computedStartTime,c=s._duration,h=s.stopTime,d=0!==c?a$15.secondsDifference(r,u)/c:0,f=d>=0,p=s.loop===_0x157d80.REPEAT||s.loop===_0x157d80.MIRRORED_REPEAT;if((f||p&&!e$2b(s.startTime))&&(d<=1||p)&&(!e$2b(h)||a$15.lessThanOrEquals(r,h))){if(s._state===E$B.STOPPED&&(s._state=E$B.ANIMATING,s.start.numberOfListeners>0&&e.afterRender.push(s._raiseStartEvent)),s.loop===_0x157d80.REPEAT)d-=Math.floor(d);else if(s.loop===_0x157d80.MIRRORED_REPEAT){var _=Math.floor(d),m=d-_;d=_%2==1?1-m:m}s.reverse&&(d=1-d);var g=d*c*s.multiplier;N$q(l,g=e$2a.clamp(g,l.startTime,l.stopTime)),s.update.numberOfListeners>0&&(s._updateEventTime=g,e.afterRender.push(s._raiseUpdateEvent)),n=!0}else f&&s._state===E$B.ANIMATING&&(s._state=E$B.STOPPED,s.stop.numberOfListeners>0&&e.afterRender.push(s._raiseStopEvent),s.removeOnStop&&T$v.push(s))}i=T$v.length;for(var x=0;x<i;++x){var v=T$v[x];t.splice(t.indexOf(v),1),e.afterRender.push(q$A(this,o,v))}return T$v.length=0,n},Object.defineProperties(a$w.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}}}),a$w.prototype.setValue=function(e,t){if(!e$2b(e))throw new t$16("name is required.");var i="u_"+e,n=this._uniformMap.values[i];if(!e$2b(n))throw new t$16("name must match a parameter name in the material's technique that is targetable and not optimized out.");n.value=n.clone(t,n.value)},a$w.prototype.getValue=function(e){if(!e$2b(e))throw new t$16("name is required.");var t="u_"+e,i=this._uniformMap.values[t];if(e$2b(i))return i.value},Object.defineProperties(a$v.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},materials:{get:function(){return this._materials}}}),Object.defineProperties(r$z.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._model._perNodeShowDirty=!0)}},matrix:{get:function(){return this._matrix},set:function(e){this._matrix=p$1d.clone(e,this._matrix),this.useMatrix=!0;var t=this._model;t._cesiumAnimationsDirty=!0,this._runtimeNode.dirtyNumber=t._maxDirtyNumber}},originalMatrix:{get:function(){return this._originalMatrix}}}),r$z.prototype.setMatrix=function(e){p$1d.clone(e,this._matrix)};var $$x="varying vec2 v_textureCoordinates;\n\nuniform float originalSize;\nuniform sampler2D texture0;\nuniform sampler2D texture1;\nuniform sampler2D texture2;\nuniform sampler2D texture3;\nuniform sampler2D texture4;\nuniform sampler2D texture5;\n\nconst float yMipLevel1 = 1.0 - (1.0 / pow(2.0, 1.0));\nconst float yMipLevel2 = 1.0 - (1.0 / pow(2.0, 2.0));\nconst float yMipLevel3 = 1.0 - (1.0 / pow(2.0, 3.0));\nconst float yMipLevel4 = 1.0 - (1.0 / pow(2.0, 4.0));\n\nvoid main()\n{\n vec2 uv = v_textureCoordinates;\n vec2 textureSize = vec2(originalSize * 1.5 + 2.0, originalSize);\n vec2 pixel = 1.0 / textureSize;\n\n float mipLevel = 0.0;\n\n if (uv.x - pixel.x > (textureSize.y / textureSize.x))\n {\n mipLevel = 1.0;\n if (uv.y - pixel.y > yMipLevel1)\n {\n mipLevel = 2.0;\n if (uv.y - pixel.y * 3.0 > yMipLevel2)\n {\n mipLevel = 3.0;\n if (uv.y - pixel.y * 5.0 > yMipLevel3)\n {\n mipLevel = 4.0;\n if (uv.y - pixel.y * 7.0 > yMipLevel4)\n {\n mipLevel = 5.0;\n }\n }\n }\n }\n }\n\n if (mipLevel > 0.0)\n {\n float scale = pow(2.0, mipLevel);\n\n uv.y -= (pixel.y * (mipLevel - 1.0) * 2.0);\n uv.x *= ((textureSize.x - 2.0) / textureSize.y);\n\n uv.x -= 1.0 + pixel.x;\n uv.y -= (1.0 - (1.0 / pow(2.0, mipLevel - 1.0)));\n uv *= scale;\n }\n else\n {\n uv.x *= (textureSize.x / textureSize.y);\n }\n\n vec4 color0 = texture2D(texture0, uv);\n vec4 color1 = texture2D(texture1, uv);\n vec4 color2 = texture2D(texture2, uv);\n vec4 color3 = texture2D(texture3, uv);\n vec4 color4 = texture2D(texture4, uv);\n vec4 color5 = texture2D(texture5, uv);\n\n if(mipLevel == 0.0)\n {\n gl_FragColor = color0;\n }\n else if(mipLevel == 1.0)\n {\n gl_FragColor = color1;\n }\n else if(mipLevel == 2.0)\n {\n gl_FragColor = color2;\n }\n else if(mipLevel == 3.0)\n {\n gl_FragColor = color3;\n }\n else if(mipLevel == 4.0)\n {\n gl_FragColor = color4;\n }\n else if(mipLevel == 5.0)\n {\n gl_FragColor = color5;\n }\n else\n {\n gl_FragColor = vec4(0.0);\n }\n}\n",z$w="varying vec3 v_cubeMapCoordinates;\nuniform samplerCube cubeMap;\n\nvoid main()\n{\n vec4 rgba = textureCube(cubeMap, v_cubeMapCoordinates);\n #ifdef RGBA_NORMALIZED\n gl_FragColor = vec4(rgba.rgb, 1.0);\n #else\n float m = rgba.a * 16.0;\n vec3 r = rgba.rgb * m;\n gl_FragColor = vec4(r * r, 1.0);\n #endif\n}\n",Q$w="attribute vec4 aPosition;\nattribute vec3 cubeMapCoordinates;\n\nvarying vec3 v_cubeMapCoordinates;\n\nvoid main()\n{\n gl_Position = aPosition;\n v_cubeMapCoordinates = cubeMapCoordinates;\n}\n";function u$B(e){this._url=e,this._cubeMapBuffers=void 0,this._cubeMaps=void 0,this._texture=void 0,this._mipTextures=void 0,this._va=void 0,this._sp=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._readyPromise=o$1l.defer()}var J$s=/(^data:image\/ktx)|(\.ktx$)/i,ee$n=/(^data:image\/ktx2)|(\.ktx2$)/i;Object.defineProperties(u$B.prototype,{url:{get:function(){return this._url}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),u$B.isSupported=function(e){return e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat};for(var te$j=new o$1p(1,0,0),re$p=new o$1p(0,0,1),ie$k=new o$1p(-1,0,0),ae$g=new o$1p(0,0,-1),d$G=new o$1p(0,1,0),oe$g=new o$1p(0,-1,0),C$A=[d$G,ie$k,re$p,oe$g,te$j,d$G,ae$g,d$G,d$G],L$C=C$A.length,D$w=new Float32Array(3*L$C),F$D=0,_$t=0;_$t<L$C;++_$t,F$D+=3)o$1p.pack(C$A[_$t],D$w,F$D);var ne$n=new Float32Array([-1,1,-1,0,0,1,0,0,1,0,1,1,0,-1,-1,-1,1,-1]),se$e=new Uint16Array([0,1,2,2,3,1,7,6,1,3,6,1,2,5,4,3,4,2,4,8,6,3,4,6]);function ue$h(e){var t=t$Y.createVertexBuffer({context:e,typedArray:ne$n,usage:A$19.STATIC_DRAW}),i=t$Y.createVertexBuffer({context:e,typedArray:D$w,usage:A$19.STATIC_DRAW}),n=t$Y.createIndexBuffer({context:e,typedArray:se$e,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});return new c$12({context:e,attributes:[{name:"aPosition",index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:S$12.FLOAT},{name:"cubeMapCoordinates",index:1,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:S$12.FLOAT}],indexBuffer:n})}function O$r(e){return function(){return e}}function x$D(e){e._va=e._va&&e._va.destroy(),e._sp=e._sp&&e._sp.destroy(),e._atlasSp=e._atlasSp&&e._atlasSp.destroy();var t,i,n=e._cubeMaps;if(e$2b(n))for(i=n.length,t=0;t<i;++t)n[t].destroy();var r=e._mipTextures;if(e$2b(r))for(i=r.length,t=0;t<i;++t)r[t].destroy();e._va=void 0,e._sp=void 0,e._atlasSp=void 0,e._cubeMaps=void 0,e._cubeMapBuffers=void 0,e._mipTextures=void 0}function f$E(e){return e$K.shader(e,(function(e){n$q(e)})),e$K.buffer(e,(function(e){n$q(e)})),e$K.image(e,(function(e){n$q(e),e$K.compressedImage(e,(function(e){n$q(e)}))})),n$q(e),e}function n$q(e){!e$2b(e.extras)||(e$2b(e.extras._pipeline)&&delete e.extras._pipeline,0===Object.keys(e.extras).length&&delete e.extras)}u$B.prototype.update=function(e){var t=e.context;if(!u$B.isSupported(t)||(e$2b(this._texture)&&e$2b(this._va)&&x$D(this),e$2b(this._texture)))return;if(!e$2b(this._texture)&&!this._loading){var i=t.textureCache.getTexture(this._url);if(e$2b(i))return x$D(this),this._texture=i,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0,void this._readyPromise.resolve()}var n=this._cubeMapBuffers;if(!e$2b(n)&&!this._loading){var r=this;J$s.test(this._url)?k$V(this._url).then((function(e){r._cubeMapBuffers=e,r._loading=!1})).otherwise(this._readyPromise.reject):ee$n.test(this._url)&&f$S(this._url).then((function(e){r._cubeMapBuffers=e,r._loading=!1})).otherwise(this._readyPromise.reject),this._loading=!0}if(!e$2b(this._cubeMapBuffers))return;const o=[];let a=n[0].positiveX.pixelDatatype;e$2b(a)?o.push("RGBA_NORMALIZED"):a=t.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT;const s=V$10.RGBA,l=new s$U({defines:o,sources:[z$w]});this._va=ue$h(t),this._sp=r$13.fromCache({name:"OctahedralProjection",context:t,vertexShaderSource:Q$w,fragmentShaderSource:l,attributeLocations:{aPosition:0,cubeMapCoordinates:1}});var u=Math.min(n.length,6);this._maximumMipmapLevel=u-1;for(var c=this._cubeMaps=new Array(u),h=this._mipTextures=new Array(u),d=2*n[0].positiveX.width,f={originalSize:function(){return d}},p=0;p<u;++p){var _=n[p].positiveY;n[p].positiveY=n[p].negativeY,n[p].negativeY=_;var m=c[p]=new e$1M({context:t,source:n[p],pixelDatatype:a}),g=2*c[p].width,x=h[p]=new t$V({context:t,width:g,height:g,pixelDatatype:a,pixelFormat:s}),v=new t$I({name:"OctahedralProjection",vertexArray:this._va,shaderProgram:this._sp,uniformMap:{cubeMap:O$r(m)},outputTexture:x,persists:!0,owner:this});e.commandList.push(v),f["texture"+p]=O$r(x)}this._texture=new t$V({context:t,width:1.5*d+2,height:d,pixelDatatype:a,pixelFormat:s}),this._texture.maximumMipmapLevel=this._maximumMipmapLevel,t.textureCache.addTexture(this._url,this._texture),this._atlasSp=r$13.fromCache({name:"AtlasSP",context:t,vertexShaderSource:ot$7,fragmentShaderSource:$$x,attributeLocations:{aPosition:0,textureCoordinates:1}});var y=new t$I({name:"OctahedralProjectionAtlas",shaderProgram:this._atlasSp,uniformMap:f,outputTexture:this._texture,persists:!1,owner:this});e.commandList.push(y),this._ready=!0,this._readyPromise.resolve()},u$B.prototype.isDestroyed=function(){return!1},u$B.prototype.destroy=function(){return x$D(this),this._texture=this._texture&&this._texture.destroy(),i$10(this)};var Tt$5=new o$1p,O$q=s$v.ModelState,At$3="model/gltf-binary,model/gltf+json;q=0.8,application/json;q=0.2,*/*;q=0.01";function $e$6(e,t){e._cachedGltf=t}function be$f(e){this._gltf=e.gltf,this.ready=e.ready,this.modelsToLoad=[],this.count=0}Object.defineProperties(be$f.prototype,{gltf:{set:function(e){this._gltf=e},get:function(){return this._gltf}}}),be$f.prototype.makeReady=function(e){this.gltf=e;for(var t=this.modelsToLoad,i=t.length,n=0;n<i;++n){var r=t[n];r.isDestroyed()||$e$6(r,this)}this.modelsToLoad=void 0,this.ready=!0};var X$r={},Lr$1={};function F$C(e){var t,i=(e=u$_(e,u$_.EMPTY_OBJECT)).cacheKey;if(this._cacheKey=i,this._cachedGltf=void 0,this._releaseGltfJson=u$_(e.releaseGltfJson,!1),e$2b(i)&&e$2b(X$r[i])&&X$r[i].ready)++(t=X$r[i]).count;else{var n=e.gltf;if(e$2b(n)){if(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),n instanceof Uint8Array)t=new be$f({gltf:O$u(n),ready:!0});else t=new be$f({gltf:e.gltf,ready:!0});t.count=1,e$2b(i)&&(X$r[i]=t)}}$e$6(this,t);var r=u$_(e.basePath,"");this._resource=t$11.createIfNeeded(r),this.owner=e.owner,this.show=u$_(e.show,!0),this.silhouetteColor=u$_(e.silhouetteColor,e$1U.RED),this._silhouetteColor=new e$1U,this._silhouetteColorPreviousAlpha=1,this._normalAttributeName=void 0,this.silhouetteSize=u$_(e.silhouetteSize,0),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(this.modelMatrix),this._clampedModelMatrix=void 0,this.scale=u$_(e.scale,1),this._scale=this.scale,this.minimumPixelSize=u$_(e.minimumPixelSize,0),this._minimumPixelSize=this.minimumPixelSize,this.maximumScale=e.maximumScale,this._maximumScale=this.maximumScale,this.id=e.id,this._id=e.id,this.heightReference=u$_(e.heightReference,k$P.NONE),this._heightReference=this.heightReference,this._heightChanged=!1,this._removeUpdateHeightCallback=void 0;var o=e.scene;this._scene=o,e$2b(o)&&e$2b(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener((function(){this._heightChanged=!0}),this)),this._pickObject=e.pickObject,this._allowPicking=u$_(e.allowPicking,!0),this._ready=!1,this._readyPromise=o$1l.defer(),this.activeAnimations=new f$F(this),this.clampAnimations=u$_(e.clampAnimations,!0),this._defaultTexture=void 0,this._incrementallyLoadTextures=u$_(e.incrementallyLoadTextures,!0),this._asynchronous=u$_(e.asynchronous,!0),this.shadows=u$_(e.shadows,W$W.ENABLED),this._shadows=this.shadows,this.color=u$_(e.color,e$1U.clone(e$1U.WHITE)),this._color=new e$1U,this._colorPreviousAlpha=1,this.colorBlendMode=u$_(e.colorBlendMode,I$J.HIGHLIGHT),this.colorBlendAmount=u$_(e.colorBlendAmount,.5),this._colorShadingEnabled=!1,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._clippingPlanesState=0,this.clippingPlanesOriginMatrix=void 0,this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=u$_(e.debugWireframe,!1),this._debugWireframe=!1,this._distanceDisplayCondition=e.distanceDisplayCondition,this._addBatchIdToGeneratedShaders=e.addBatchIdToGeneratedShaders,this._precreatedAttributes=e.precreatedAttributes,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=u$_(e.ignoreCommands,!1),this._requestType=e.requestType,this._upAxis=u$_(e.upAxis,v$y.Y),this._gltfForwardAxis=v$y.Z,this._forwardAxis=e.forwardAxis,this.cull=u$_(e.cull,!0),this.opaquePass=u$_(e.opaquePass,Le$s.OPAQUE),this._computedModelMatrix=new p$1d,this._clippingPlaneModelViewMatrix=p$1d.clone(p$1d.IDENTITY),this._initialRadius=void 0,this._boundingSphere=void 0,this._minCorner=void 0,this._maxCorner=void 0,this._scaledBoundingSphere=new i$1c,this._state=O$q.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._perNodeShowDirty=!1,this._cesiumAnimationsDirty=!1,this._dirty=!1,this._maxDirtyNumber=0,this._runtime={animations:void 0,rootNodes:void 0,nodes:void 0,nodesByName:void 0,skinnedNodes:void 0,meshesByName:void 0,materialsByName:void 0,materialsById:void 0},this._uniformMaps={},this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms={},this._programPrimitives={},this._rendererResources={buffers:{},vertexArrays:{},programs:{},sourceShaders:{},silhouettePrograms:{},textures:{},samplers:{},renderStates:{}},this._cachedRendererResources=void 0,this._loadRendererResourcesFromCache=!1,this._dequantizeInShader=u$_(e.dequantizeInShader,!0),this._decodedData={},this._cachedGeometryByteLength=0,this._cachedTexturesByteLength=0,this._geometryByteLength=0,this._texturesByteLength=0,this._trianglesLength=0,this._sourceTechniques={},this._sourcePrograms={},this._quantizedVertexShaders={},this._nodeCommands=[],this._pickIds=[],this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0,this._sourceVersion=void 0,this._sourceKHRTechniquesWebGL=void 0,this._imageBasedLightingFactor=new o$1o(1,1),o$1o.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this._lightColor=o$1p.clone(e.lightColor),this._luminanceAtZenith=void 0,this.luminanceAtZenith=u$_(e.luminanceAtZenith,.2),this._sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._shouldUpdateSpecularMapAtlas=!0,this._specularEnvironmentMapAtlas=void 0,this._useDefaultSphericalHarmonics=!1,this._useDefaultSpecularMaps=!1,this._shouldRegenerateShaders=!1}function Pr$1(e){return e.stencilBuffer}function er$4(e){return!e$1U.equals(e.color,e$1U.WHITE)||e.colorBlendMode!==I$J.HIGHLIGHT}function Rr(e){var t=e._clippingPlanes;return e$2b(t)&&t.enabled&&0!==t.length}function It$4(e){return"glTF"===a$F(e)}function rr$5(e,t,i){if(e._state!==O$q.LOADED)throw new t$16("The model is not loaded. Use Model.readyPromise or wait for Model.ready to be true.");if(!e$2b(i))throw new t$16("name is required.");return e._runtime[t][i]}function Bt$5(e){var t=e.gltf,i=e._loadResources;e$K.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function Ft$4(e,t){return function(i){var n=e._loadResources,r=new Uint8Array(i);--n.pendingBufferLoads,e.gltf.buffers[t].extras._pipeline.source=r}}function Dt$3(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;e$K.bufferView(e.gltf,(function(e,t){e.target===de$x.ARRAY_BUFFER&&i.enqueue(t)}));var n=e._loadResources.indexBuffersToCreate,r={};e$K.accessor(e.gltf,(function(e){var i=e.bufferView;e$2b(i)&&(t[i].target===de$x.ELEMENT_ARRAY_BUFFER&&!e$2b(r[i])&&(r[i]=!0,n.enqueue({id:i,componentType:e.componentType})))}))}function Nt$4(e){var t=e.gltf;if(i$D(t,"KHR_techniques_webgl")){var i=e._sourcePrograms,n=e._sourceTechniques,r=t.extensions.KHR_techniques_webgl.programs;e$K.technique(t,(function(e,t){n[t]=l$1g(e);var o=e.program;e$2b(i[o])||(i[o]=l$1g(r[o]))}))}}function Ot$3(e,t,i){return function(n){var r=e._loadResources;r.shaders[i]={source:n,type:t,bufferView:void 0},--r.pendingShaderLoads,e._rendererResources.sourceShaders[i]=n}}function Ut$3(e){var t=e.gltf,i=t.buffers,n=t.bufferViews,r=e._rendererResources.sourceShaders;e$K.shader(t,(function(t,o){if(e$2b(t.bufferView)){var a=t.bufferView,s=n[a],l=s.buffer,u=a$K(i[l].extras._pipeline.source,s.byteOffset,s.byteLength);r[o]=u}else if(e$2b(t.extras._pipeline.source))r[o]=t.extras._pipeline.source;else{++e._loadResources.pendingShaderLoads;var c=e._resource.getDerivedResource({url:t.uri});c.fetchText().then(Ot$3(e,t.type,o)).otherwise(s$v.getFailedLoadFunction(e,"shader",c.url))}}))}function Vt$4(e){var t=e._sourceTechniques;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];e._loadResources.programsToCreate.enqueue({programId:n.program,techniqueId:i})}}function He$6(e,t){return function(i){const n=e._loadResources;let r;--n.pendingTextureLoads,Array.isArray(i)&&(r=i.slice(1,i.length).map((function(e){return e.bufferView})),i=i[0]),n.texturesToCreate.enqueue({id:t,image:i,bufferView:i.bufferView,width:i.width,height:i.height,internalFormat:i.internalFormat,mipLevels:r})}}Object.defineProperties(F$C.prototype,{gltf:{get:function(){return e$2b(this._cachedGltf)?this._cachedGltf.gltf:void 0}},releaseGltfJson:{get:function(){return this._releaseGltfJson}},cacheKey:{get:function(){return this._cacheKey}},basePath:{get:function(){return this._resource.url}},boundingSphere:{get:function(){if(this._state!==O$q.LOADED)throw new t$16("The model is not loaded. Use Model.readyPromise or wait for Model.ready to be true.");var e=this.modelMatrix;this.heightReference!==k$P.NONE&&this._clampedModelMatrix&&(e=this._clampedModelMatrix);var t,i=p$1d.getScale(e,Tt$5);this.scale instanceof o$1p?(t=this.scale,e$2b(this.maximumScale)&&(t.x=Math.min(this.maximumScale,t.x),t.y=Math.min(this.maximumScale,t.y),t.z=Math.min(this.maximumScale,t.z)),o$1p.multiplyComponents(i,t,i)):(t=e$2b(this.maximumScale)?Math.min(this.maximumScale,this.scale):this.scale,o$1p.multiplyByScalar(i,t,i));var n=this._scaledBoundingSphere;return n.center=o$1p.multiplyComponents(this._boundingSphere.center,i,n.center),n.radius=o$1p.maximumComponent(i)*this._initialRadius,e$2b(this._rtcCenter)&&o$1p.add(this._rtcCenter,n.center,n.center),n}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},asynchronous:{get:function(){return this._asynchronous}},allowPicking:{get:function(){return this._allowPicking}},incrementallyLoadTextures:{get:function(){return this._incrementallyLoadTextures}},pendingTextureLoads:{get:function(){return e$2b(this._loadResources)?this._loadResources.pendingTextureLoads:0}},dirty:{get:function(){return this._dirty}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far must be greater than near");this._distanceDisplayCondition=r$Y.clone(e,this._distanceDisplayCondition)}},extensionsUsed:{get:function(){return e$2b(this._extensionsUsed)||(this._extensionsUsed=s$v.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return e$2b(this._extensionsRequired)||(this._extensionsRequired=s$v.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},forwardAxis:{get:function(){return e$2b(this._forwardAxis)?this._forwardAxis:this._gltfForwardAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return this._texturesByteLength}},cachedGeometryByteLength:{get:function(){return this._cachedGeometryByteLength}},cachedTexturesByteLength:{get:function(){return this._cachedTexturesByteLength}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&h$K.setOwner(e,this,"_clippingPlanes")}},pickIds:{get:function(){return this._pickIds}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o$1q.typeOf.object("imageBasedLightingFactor",e),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1);var t=this._imageBasedLightingFactor;e===t||o$1o.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._imageBasedLightingFactor.x>0&&0===e.x||0===this._imageBasedLightingFactor.x&&e.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._imageBasedLightingFactor.y>0&&0===e.y||0===this._imageBasedLightingFactor.y&&e.y>0,o$1o.clone(e,this._imageBasedLightingFactor))}},lightColor:{get:function(){return this._lightColor},set:function(e){var t=this._lightColor;e===t||o$1p.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||e$2b(t)&&!e$2b(e)||e$2b(e)&&!e$2b(t),this._lightColor=o$1p.clone(e,t))}},luminanceAtZenith:{get:function(){return this._luminanceAtZenith},set:function(e){var t=this._luminanceAtZenith;e!==t&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||e$2b(t)&&!e$2b(e)||e$2b(e)&&!e$2b(t),this._luminanceAtZenith=e)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){if(e$2b(e)&&(!Array.isArray(e)||9!==e.length))throw new t$16("sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.");e!==this._sphericalHarmonicCoefficients&&(this._sphericalHarmonicCoefficients=e,this._shouldRegenerateShaders=!0)}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){this._shouldUpdateSpecularMapAtlas=e!==this._specularEnvironmentMaps,this._specularEnvironmentMaps=e}}}),F$C.silhouetteSupported=function(e){return Pr$1(e.context)},F$C.fromGltf=function(e){if(!e$2b(e)||!e$2b(e.url))throw new t$16("options.url is required");var t=e.url;e=l$1g(e);var i=t$11.createIfNeeded(t),n=u$_(e.basePath,i.clone()),r=t$11.createIfNeeded(n),o=u$_(e.cacheKey,Lr$1[o$1j(i.url)]);e$2b(o)||(o=e$1Q(),Lr$1[o$1j(i.url)]=o),e$2b(e.basePath)&&!e$2b(e.cacheKey)&&(o+=r.url),e.cacheKey=o,e.basePath=r;var a=new F$C(e),s=X$r[o];return e$2b(s)?s.ready||(++s.count,s.modelsToLoad.push(a)):((s=new be$f({ready:!1})).count=1,s.modelsToLoad.push(a),$e$6(a,s),X$r[o]=s,e$2b(i.headers.Accept)||(i.headers.Accept=At$3),i.fetchArrayBuffer().then((function(e){var t=new Uint8Array(e);if(It$4(t)){var i=O$u(t);s.makeReady(i)}else{var n=a$K(t);s.makeReady(JSON.parse(n))}})).otherwise(s$v.getFailedLoadFunction(a,"model",i.url))),a},F$C._gltfCache=X$r,F$C.prototype.getNode=function(e){var t=rr$5(this,"nodesByName",e);return e$2b(t)?t.publicNode:void 0},F$C.prototype.getMesh=function(e){return rr$5(this,"meshesByName",e)},F$C.prototype.getMaterial=function(e){return rr$5(this,"materialsByName",e)};var qt$3=/(^data:image\/ktx)|(\.ktx$)/i,Ht$2=/(^data:image\/crn)|(\.crn$)/i;function zt$2(e,t,i){var n,r=e.gltf,o=r.images;e$K.texture(r,(function(r,a){var s=r.source;e$2b(r.extensions)&&e$2b(r.extensions.EXT_texture_webp)&&i&&(s=r.extensions.EXT_texture_webp.source);var l=o[s],u=l.extras,c=l.bufferView,h=l.mimeType;if(n=l.uri,e$2b(u)&&e$2b(u.compressedImage3DTiles)){var d=u.compressedImage3DTiles.crunch,f=u.compressedImage3DTiles.s3tc,p=u.compressedImage3DTiles.pvrtc1,_=u.compressedImage3DTiles.etc1;t.s3tc&&e$2b(d)?(h=d.mimeType,e$2b(d.bufferView)?c=d.bufferView:n=d.uri):t.s3tc&&e$2b(f)?(h=f.mimeType,e$2b(f.bufferView)?c=f.bufferView:n=f.uri):t.pvrtc&&e$2b(p)?(h=p.mimeType,e$2b(p.bufferView)?c=p.bufferView:n=p.uri):t.etc1&&e$2b(_)&&(h=_.mimeType,e$2b(_.bufferView)?c=_.bufferView:n=_.uri)}if(e$2b(c))e._loadResources.texturesToCreateFromBufferView.enqueue({id:a,image:void 0,bufferView:c,mimeType:h});else{++e._loadResources.pendingTextureLoads;var m=e._resource.getDerivedResource({url:n});(qt$3.test(n)?k$V(m):Ht$2.test(n)?a$P(m,void 0,!0):m.fetchImage()).then(He$6(e,a)).otherwise(s$v.getFailedLoadFunction(e,"image",m.url))}}))}function kt$3(e){var t={},i={},n=[],r=e._loadResources.skinnedNodesIds;e$K.node(e.gltf,(function(o,a){var s={matrix:void 0,translation:void 0,rotation:void 0,scale:void 0,computedShow:!0,transformToRoot:new p$1d,computedMatrix:new p$1d,dirtyNumber:0,commands:[],inverseBindMatrices:void 0,bindShapeMatrix:void 0,joints:[],computedJointMatrices:[],jointName:o.jointName,weights:[],children:[],parents:[],publicNode:void 0};s.publicNode=new r$z(e,o,s,a,s$v.getTransform(o)),t[a]=s,i[o.name]=s,e$2b(o.skin)&&(r.push(a),n.push(s))})),e._runtime.nodes=t,e._runtime.nodesByName=i,e._runtime.skinnedNodes=n}function Gt$2(e){var t=e.gltf,i=e._sourceTechniques,n={},r={},o=e._uniformMaps;e$K.material(t,(function(t,a){o[a]={uniformMap:void 0,values:void 0,jointMatrixUniformName:void 0,morphWeightsUniformName:void 0};var s=new a$w(e,t,a);if(e$2b(t.extensions)&&e$2b(t.extensions.KHR_techniques_webgl)){var l=t.extensions.KHR_techniques_webgl.technique;s._technique=l,s._program=i[l].program,e$K.materialValue(t,(function(e,t){e$2b(s._values)||(s._values={}),s._values[t]=l$1g(e)}))}n[t.name]=s,r[a]=s})),e._runtime.materialsByName=n,e._runtime.materialsById=r}function Wt$4(e){var t={},i=e._runtime.materialsById;e$K.mesh(e.gltf,(function(n,r){t[n.name]=new a$v(n,i,r),(e$2b(e.extensionsUsed.WEB3D_quantized_attributes)||e._dequantizeInShader)&&e$K.meshPrimitive(n,(function(t,i){var n=nr$3(e,t),o=e._programPrimitives[n];e$2b(o)||(o={},e._programPrimitives[n]=o),o[r+".primitive."+i]=t}))})),e._runtime.meshesByName=t}var tr$3=function(){this.id=void 0,this.model=void 0,this.context=void 0};function Tr$1(e,t,i){var n=t._loadResources,r=t.gltf.bufferViews[e];e$2b(r)||(r=n.createdBufferViews[e]);var o=t$Y.createVertexBuffer({context:i,typedArray:n.getBuffer(r),usage:A$19.STATIC_DRAW});o.vertexArrayDestroyable=!1,t._rendererResources.buffers[e]=o,t._geometryByteLength+=o.sizeInBytes}tr$3.prototype.set=function(e,t,i){this.id=e,this.model=t,this.context=i},tr$3.prototype.execute=function(){Tr$1(this.id,this.model,this.context)};var ir$3=function(){this.id=void 0,this.componentType=void 0,this.model=void 0,this.context=void 0};function Ar(e,t,i,n){var r=i._loadResources,o=i.gltf.bufferViews[e];e$2b(o)||(o=r.createdBufferViews[e]);var a=t$Y.createIndexBuffer({context:n,typedArray:r.getBuffer(o),usage:A$19.STATIC_DRAW,indexDatatype:t});a.vertexArrayDestroyable=!1,i._rendererResources.buffers[e]=a,i._geometryByteLength+=a.sizeInBytes}ir$3.prototype.set=function(e,t,i,n){this.id=e,this.componentType=t,this.model=i,this.context=n},ir$3.prototype.execute=function(){Ar(this.id,this.componentType,this.model,this.context)};var Ir$3=new tr$3,Br$1=new ir$3;function Kt$2(e,t){var i=e._loadResources;if(0===i.pendingBufferLoads){var n,r=t.context,o=i.vertexBuffersToCreate,a=i.indexBuffersToCreate;if(e.asynchronous){for(;o.length>0&&(Ir$3.set(o.peek(),e,r),t.jobScheduler.execute(Ir$3,i$Q.BUFFER));)o.dequeue();for(;a.length>0&&(n=a.peek(),Br$1.set(n.id,n.componentType,e,r),t.jobScheduler.execute(Br$1,i$Q.BUFFER));)a.dequeue()}else{for(;o.length>0;)Tr$1(o.dequeue(),e,r);for(;a.length>0;)Ar((n=a.dequeue()).id,n.componentType,e,r)}}}function nr$3(e,t){var i=e._runtime.materialsById[t.material];if(e$2b(i))return i._program}function Fr(e,t,i){var n,r,o=i._programPrimitives[t];if(!e$2b(o))return e;for(r in o)if(o.hasOwnProperty(r)&&nr$3(i,n=o[r])===t)break;var a=e;if(i.extensionsUsed.WEB3D_quantized_attributes)a=s$v.modifyShaderForQuantizedAttributes(i.gltf,n,e),i._quantizedUniforms[t]=a.uniforms;else{var s=i._decodedData[r];if(!e$2b(s))return a;a=s$v.modifyShaderForDracoQuantizedAttributes(i.gltf,n,e,s.attributes)}return i._programPrimitives[t]=void 0,a.shader}function jt$1(e){return e=s$U.replaceMain(e,"gltf_blend_main"),e+="uniform vec4 gltf_color; \nuniform float gltf_colorBlend; \nvoid main() \n{ \n gltf_blend_main(); \n gl_FragColor.rgb = mix(gl_FragColor.rgb, gltf_color.rgb, gltf_colorBlend); \n float highlight = ceil(gltf_colorBlend); \n gl_FragColor.rgb *= mix(gltf_color.rgb, vec3(1.0), highlight); \n gl_FragColor.a *= gltf_color.a; \n} \n"}function Me$e(e,t,i){return e$2b(i)&&(e=i(e,t)),e}var ar$3=function(){this.programToCreate=void 0,this.model=void 0,this.context=void 0,this.frameState=void 0};function Dr(e,t,i){return i="#include <LightUboDecl>\n"+i,t="#define DIR_LIGHTS "+e.lightSource.directionalLight.length+"\n"+t,i="#define DIR_LIGHTS "+e.lightSource.directionalLight.length+"\n"+i,t="#define POINT_LIGHTS "+e.lightSource.pointLight.length+"\n"+t,i="#define POINT_LIGHTS "+e.lightSource.pointLight.length+"\n"+i,{vs:t="#define SPOT_LIGHTS "+e.lightSource.spotLight.length+"\n"+t,fs:i="#define SPOT_LIGHTS "+e.lightSource.spotLight.length+"\n"+i}}function Nr(e,t,i,n){var r=e.programId,o=e.techniqueId,a=t._sourcePrograms[r],s=t._rendererResources.sourceShaders,l=s[a.vertexShader],u=s[a.fragmentShader],c=t._quantizedVertexShaders,h=t._toClipCoordinatesGLSL[r];if(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader){var d=c[r];e$2b(d)||(d=Fr(l,r,t),c[r]=d),l=d}var f=Me$e(l,r,t._vertexShaderLoaded),p=Me$e(u,r,t._fragmentShaderLoaded);s$Y.isInternetExplorer()||(f=s$v.modifyVertexShaderForLogDepth(f,h),p=s$v.modifyFragmentShaderForLogDepth(p));var _=[];e$2b(t._uniformMapLoaded)||(p="uniform vec4 czm_pickColor;\n"+p);var m=t._imageBasedLightingFactor.x>0||t._imageBasedLightingFactor.y>0;m&&(p="#define USE_IBL_LIGHTING \n\n"+p,_.push("USE_IBL_LIGHTING")),e$2b(t._lightColor)&&(p="#define USE_CUSTOM_LIGHT_COLOR \n\n"+p,_.push("USE_CUSTOM_LIGHT_COLOR")),e$2b(t.owner)&&t.owner._swipeEnabled&&(p="#define APPLY_SWIPE \n\n"+p,_.push("APPLY_SWIPE"));var g=Dr(n,f,p);if(f=g.vs,p=g.fs,("2.0"!==t._sourceVersion||t._sourceKHRTechniquesWebGL)&&(p=s$U.replaceMain(p,"non_gamma_corrected_main"),p+="\nvoid main() { \n non_gamma_corrected_main(); \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),u$B.isSupported(i)){var x=e$2b(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,v=e$2b(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps;(x||v||m)&&(p="uniform mat4 gltf_clippingPlanesMatrix; \n"+p),e$2b(t._sphericalHarmonicCoefficients)?(p="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+p,_.push("DIFFUSE_IBL"),_.push("CUSTOM_SPHERICAL_HARMONICS")):t._useDefaultSphericalHarmonics&&(p="#define DIFFUSE_IBL \n"+p,_.push("DIFFUSE_IBL")),e$2b(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?(p="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+p,_.push("SPECULAR_IBL"),_.push("CUSTOM_SPECULAR_IBL")):t._useDefaultSpecularMaps&&(p="#define SPECULAR_IBL \n"+p,_.push("SPECULAR_IBL"))}e$2b(t._luminanceAtZenith)&&(p="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+p,_.push("USE_SUN_LUMINANCE"));var y=new s$U({name:"gltfVp_"+a.vertexShader,sources:[f],defines:_});Or(r,o,new s$U({name:"gltfFp_"+a.fragmentShader,sources:[p],defines:_}),y,t,i)}function Yt$1(e,t,i,n){var r=e.programId,o=e.techniqueId,a=t._sourcePrograms[r],s=t._rendererResources.sourceShaders,l=t._quantizedVertexShaders,u=t._toClipCoordinatesGLSL[r],c=t.clippingPlanes,h=Rr(t),d=s[a.vertexShader],f=s[a.fragmentShader];(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader)&&(d=l[r]);var p=f;er$4(t)&&(p=F$C._modifyShaderForColor(p)),h&&(p=Yi$1(p,c,i));var _=Me$e(d,r,t._vertexShaderLoaded),m=Me$e(p,r,t._fragmentShaderLoaded);s$Y.isInternetExplorer()||(_=s$v.modifyVertexShaderForLogDepth(_,u),m=s$v.modifyFragmentShaderForLogDepth(m));var g=[];e$2b(t._uniformMapLoaded)||(m="uniform vec4 czm_pickColor;\n"+m);var x=t._imageBasedLightingFactor.x>0||t._imageBasedLightingFactor.y>0;x&&(m="#define USE_IBL_LIGHTING \n\n"+m,g.push("USE_IBL_LIGHTING")),e$2b(t._lightColor)&&(m="#define USE_CUSTOM_LIGHT_COLOR \n\n"+m,g.push("USE_CUSTOM_LIGHT_COLOR")),e$2b(t.owner)&&t.owner._swipeEnabled&&(m="#define APPLY_SWIPE \n\n"+m,g.push("APPLY_SWIPE"));var v=Dr(n,_,m);if(_=v.vs,m=v.fs,("2.0"!==t._sourceVersion||t._sourceKHRTechniquesWebGL)&&(m=s$U.replaceMain(m,"non_gamma_corrected_main"),m+="\nvoid main() { \n non_gamma_corrected_main(); \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),u$B.isSupported(i)){var y=e$2b(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,$=e$2b(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps;!h&&(y||$||x)&&(m="uniform mat4 gltf_clippingPlanesMatrix; \n"+m),e$2b(t._sphericalHarmonicCoefficients)?(m="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+m,g.push("DIFFUSE_IBL"),g.push("CUSTOM_SPHERICAL_HARMONICS")):t._useDefaultSphericalHarmonics&&(m="#define DIFFUSE_IBL \n"+m,g.push("DIFFUSE_IBL")),e$2b(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?(m="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+m,g.push("SPECULAR_IBL"),g.push("CUSTOM_SPECULAR_IBL")):t._useDefaultSpecularMaps&&(m="#define SPECULAR_IBL \n"+m,g.push("SPECULAR_IBL"))}e$2b(t._luminanceAtZenith)&&(m="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+m,g.push("USE_SUN_LUMINANCE"));var b=new s$U({name:"gltfVp_"+a.vertexShader,sources:[_],defines:g});Or(r,o,new s$U({name:"gltfFp_"+a.fragmentShader,sources:[m],defines:g}),b,t,i)}function Or(e,t,i,n,r,o){var a=r._sourceTechniques[t],s=s$v.createAttributeLocations(a,r._precreatedAttributes);r._rendererResources.programs[e]=r$13.fromCache({context:o,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:s}),o.webgpu&&r._rendererResources.programs[e]._createEffect()}ar$3.prototype.set=function(e,t,i,n){this.programToCreate=e,this.model=t,this.context=i,this.frameState=n},ar$3.prototype.execute=function(){Nr(this.programToCreate,this.model,this.context,this.frameState)};var Ur$2=new ar$3;function Zt(e,t){var i=e._loadResources,n=i.programsToCreate;if(0===i.pendingShaderLoads&&0===i.pendingBufferLoads){var r=t.context;if(e.asynchronous)for(;n.length>0&&(Ur$2.set(n.peek(),e,r,t),t.jobScheduler.execute(Ur$2,i$Q.PROGRAM));)n.dequeue();else for(;n.length>0;)Nr(n.dequeue(),e,r)}}function Jt$1(e,t){return function(i){e.texturesToCreate.enqueue({id:t.id,image:i,bufferView:void 0}),--e.pendingBufferViewToImage}}function Qt$2(e){var t=e._loadResources;if(0===t.pendingBufferLoads)for(;t.texturesToCreateFromBufferView.length>0;){var i=t.texturesToCreateFromBufferView.dequeue(),n=e.gltf,r=n.bufferViews[i.bufferView];n.textures[i.id].source;var o=s$v.getFailedLoadFunction(e,"image","id: "+i.id+", bufferView: "+i.bufferView);if("image/ktx"===i.mimeType)k$V(t.getBuffer(r)).then(He$6(e,i.id)).otherwise(o),++e._loadResources.pendingTextureLoads;else if("image/ktx2"===i.mimeType){f$S(new Uint8Array(t.getBuffer(r))).then(He$6(e,i.id)),++e._loadResources.pendingTextureLoads}else if("image/crn"===i.mimeType){var a=a$P(t.getBuffer(r),void 0,!0);e$2b(a)&&a.then(He$6(e,i.id)).otherwise(o),++e._loadResources.pendingTextureLoads}else{var s=Jt$1(t,i);w$Q({uint8Array:t.getBuffer(r),format:i.mimeType,flipY:!1}).then(s).otherwise(o),++t.pendingBufferViewToImage}}}function Xt(e){var t=e._loadResources;if(t.createSamplers){t.createSamplers=!1;var i=e._rendererResources.samplers;e$K.sampler(e.gltf,(function(e,t){i[t]=new e$1P({wrapS:e.wrapS,wrapT:e.wrapT,minificationFilter:e.minFilter,magnificationFilter:e.magFilter})}))}}var sr$3=function(){this.gltfTexture=void 0,this.model=void 0,this.context=void 0};function Vr(e,t,i){var n=t.gltf.textures[e.id],r=t._rendererResources.samplers[n.sampler];r=u$_(r,new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT}));var o,a=e.internalFormat,s=!(e$2b(a)&&V$10.isCompressedFormat(a)||r.minificationFilter!==tt$h.NEAREST_MIPMAP_NEAREST&&r.minificationFilter!==tt$h.NEAREST_MIPMAP_LINEAR&&r.minificationFilter!==tt$h.LINEAR_MIPMAP_NEAREST&&r.minificationFilter!==tt$h.LINEAR_MIPMAP_LINEAR),l=s||r.wrapS===q$19.REPEAT||r.wrapS===q$19.MIRRORED_REPEAT||r.wrapT===q$19.REPEAT||r.wrapT===q$19.MIRRORED_REPEAT,u=e.image;if(e$2b(a))o=new t$V({context:i,source:{arrayBufferView:e.bufferView,mipLevels:e.mipLevels},width:e.width,height:e.height,pixelFormat:a,sampler:r});else if(e$2b(u)){var c=!e$2a.isPowerOfTwo(u.width)||!e$2a.isPowerOfTwo(u.height);if(l&&c){var h=document.createElement("canvas");h.width=e$2a.nextPowerOfTwo(u.width),h.height=e$2a.nextPowerOfTwo(u.height),h.getContext("2d").drawImage(u,0,0,u.width,u.height,0,0,h.width,h.height),u=h}o=new t$V({context:i,source:u,pixelFormat:n.internalFormat,pixelDatatype:n.type,sampler:r,flipY:!1}),s&&o.generateMipmap()}e$2b(o)&&(t._rendererResources.textures[e.id]=o,t._texturesByteLength+=o.sizeInBytes)}sr$3.prototype.set=function(e,t,i){this.gltfTexture=e,this.model=t,this.context=i},sr$3.prototype.execute=function(){Vr(this.gltfTexture,this.model,this.context)};var qr=new sr$3;function $t(e,t){var i=t.context,n=e._loadResources.texturesToCreate;if(e.asynchronous)for(;n.length>0&&(qr.set(n.peek(),e,i),t.jobScheduler.execute(qr,i$Q.TEXTURE));)n.dequeue();else for(;n.length>0;)Vr(n.dequeue(),e,i)}function ei$1(e,t){var i,n,r=e._sourceTechniques,o={},a=e._runtime.materialsById[t.material];if(!e$2b(a))return o;var s=r[a._technique];if(!e$2b(s))return o;var l=s.attributes,u=e._rendererResources.programs[s.program],c=u.vertexAttributes,h=u._attributeLocations;for(i in c)if(c.hasOwnProperty(i)){var d=l[i];e$2b(d)&&(n=h[i],o[d.semantic]={index:n,nameInProgram:i})}var f=e._precreatedAttributes;if(e$2b(f))for(i in f)f.hasOwnProperty(i)&&(n=h[i],o[i]={index:n,nameInProgram:i});return o}function ri$1(e,t){for(var i=e.gltf,n=i.skins,r=i.nodes,o=e._runtime.nodes,a=e._loadResources.skinnedNodesIds,s=a.length,l=0;l<s;++l){var u=a[l],c=o[u],h=r[u],d=t[h.skin];c.inverseBindMatrices=d.inverseBindMatrices,c.bindShapeMatrix=d.bindShapeMatrix;for(var f=n[h.skin].joints,p=f.length,_=0;_<p;++_){var m=o[f[_]];c.joints.push(m)}}}function ti$1(e){var t=e._loadResources;if(0===t.pendingBufferLoads&&t.createSkins){t.createSkins=!1;var i=e.gltf,n=i.accessors,r={};e$K.skin(i,(function(t,i){var o,a=n[t.inverseBindMatrices];p$1d.equals(t.bindShapeMatrix,p$1d.IDENTITY)||(o=p$1d.clone(t.bindShapeMatrix)),r[i]={inverseBindMatrices:S$t.getSkinInverseBindMatrices(e,a),bindShapeMatrix:o}})),ri$1(e,r)}}function ii$1(e,t,i,n){return function(r){e$2b(n)&&(r=e.clampAnimations?n.clampTime(r):n.wrapTime(r),t[i]=n.evaluate(r,t[i]),t.dirtyNumber=e._maxDirtyNumber)}}function ni$1(e){var t=e._loadResources;if(t.finishedPendingBufferLoads()&&t.createRuntimeAnimations){t.createRuntimeAnimations=!1,e._runtime.animations=[];var i=e._runtime.nodes,n=e.gltf.accessors;e$K.animation(e.gltf,(function(t,r){for(var o=t.channels,a=t.samplers,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=o.length,c=new Array(u),h=0;h<u;++h){var d=o[h],f=d.target,p=f.path,_=a[d.sampler],m=S$t.getAnimationParameterValues(e,n[_.input]),g=S$t.getAnimationParameterValues(e,n[_.output]);s=Math.min(s,m[0]),l=Math.max(l,m[m.length-1]);var x=S$t.getAnimationSpline(e,r,t,d.sampler,_,m,p,g);c[h]=ii$1(e,i[f.node],f.path,x)}e._runtime.animations[r]={name:t.name,startTime:s,stopTime:l,channelEvaluators:c}}))}}function Hr(e){console.log("webgpu引擎要求顶点属性是4字节的倍数, gltf数据中的"+e+"顶点属性不符合要求,不能显示.")}function zr$2(e,t){var i=e._loadResources;if(i.finishedBuffersCreation()&&i.finishedProgramCreation()&&i.createVertexArrays){i.createVertexArrays=!1;var n=e._rendererResources.buffers,r=e._rendererResources.vertexArrays,o=e.gltf,a=o.accessors;e$K.mesh(o,(function(i,s){e$K.meshPrimitive(i,(function(i,l){var u,c=[],h=ei$1(e,i),d=e._decodedData[s+".primitive."+l];e$K.meshPrimitiveAttribute(i,(function(e,i){if(e$2b(h[i])){if(u=h[i].index,e$2b(d)){var r=d.attributes;if(r.hasOwnProperty(i)){var s=r[i];return t.webgpu&&s.byteStride%4!=0&&Hr(h[i].nameInProgram),void c.push({name:h[i].nameInProgram,index:u,vertexBuffer:n[s.bufferView],componentsPerAttribute:s.componentsPerAttribute,componentDatatype:s.componentDatatype,normalize:s.normalized,offsetInBytes:s.byteOffset,strideInBytes:s.byteStride})}}var l=a[e],f=p$A(o,l);t.webgpu&&f%4!=0&&Hr(h[i].nameInProgram);var p=e$2b(l.normalized)&&l.normalized;c.push({name:h[i].nameInProgram,index:u,vertexBuffer:n[l.bufferView],componentsPerAttribute:r$B(l.type),componentDatatype:l.componentType,normalize:p,offsetInBytes:l.byteOffset,strideInBytes:f})}}));var f,p,_,m=e._precreatedAttributes;if(e$2b(m))for(p in m)m.hasOwnProperty(p)&&e$2b(h[p])&&(u=h[p].index,(f=m[p]).index=u,c.push(f));if(e$2b(i.indices)){var g=a[i.indices].bufferView;e$2b(d)&&(g=d.bufferView),_=n[g]}r[s+".primitive."+l]=new c$12({context:t,attributes:c,indexBuffer:_})}))}))}}function ai$2(e){var t=e._loadResources;t.createRenderStates&&(t.createRenderStates=!1,e$K.material(e.gltf,(function(t,i){si$1(e,t,i)})))}function si$1(e,t,i){var n=e._rendererResources.renderStates,r=[de$x.FUNC_ADD,de$x.FUNC_ADD],o=[de$x.ONE,de$x.ONE_MINUS_SRC_ALPHA,de$x.ONE,de$x.ONE_MINUS_SRC_ALPHA];e$2b(t.extensions)&&e$2b(t.extensions.KHR_blend)&&(r=t.extensions.KHR_blend.blendEquation,o=t.extensions.KHR_blend.blendFactors);var a=!t.doubleSided,s="BLEND"===t.alphaMode;n[i]=d$1m.fromCache({cull:{enabled:a},depthTest:{enabled:!0},depthMask:!s,blending:{enabled:s,equationRgb:r[0],equationAlpha:r[1],functionSourceRgb:o[0],functionDestinationRgb:o[1],functionSourceAlpha:o[2],functionDestinationAlpha:o[3]},stencilTest:{enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.REPLACE},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.REPLACE},reference:u$N.MODEL,mask:65535}})}var oi$1={MODEL:function(e,t,i){return function(){return i.computedMatrix}},VIEW:function(e,t,i){return function(){return e.view}},PROJECTION:function(e,t,i){return function(){return e.projection}},MODELVIEW:function(e,t,i){var n=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n)}},CESIUM_RTC_MODELVIEW:function(e,t,i){var n=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.setTranslation(n,t._rtcCenterEye,n)}},MODELVIEWPROJECTION:function(e,t,i){var n=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.multiply(e._projection,n,n)}},MODELINVERSE:function(e,t,i){var n=new p$1d;return function(){return p$1d.inverse(i.computedMatrix,n)}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t,i){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t,i){var n=new p$1d,r=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.inverse(n,r)}},MODELVIEWPROJECTIONINVERSE:function(e,t,i){var n=new p$1d,r=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.multiply(e._projection,n,n),p$1d.inverse(n,r)}},MODELINVERSETRANSPOSE:function(e,t,i){var n=new p$1d,r=new p$1e;return function(){return p$1d.inverse(i.computedMatrix,n),p$1d.getRotation(n,r),p$1e.transpose(r,r)}},MODELVIEWINVERSETRANSPOSE:function(e,t,i){var n=new p$1d,r=new p$1d,o=new p$1e;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.inverse(n,r),p$1d.getRotation(r,o),p$1e.transpose(o,o)}},VIEWPORT:function(e,t,i){return function(){return e.viewportCartesian4}}};function ui$3(e,t,i,n){var r=t._runtime.nodes[e];return oi$1[i](n,t,r)}function ci$4(e,t,i,n,r,o,a){var s,l,u={},c={};return e$K.techniqueUniform(i,(function(i,h){var d;if(e$2b(n)&&e$2b(n[h]))d=s$v.createUniformFunction(i.type,n[h],o,a,i.extensionType),u[h]=d.func,c[h]=d;else if(e$2b(i.node))u[h]=ui$3(i.node,e,i.semantic,r.uniformState);else if(e$2b(i.semantic))if("JOINTMATRIX"===i.semantic)s=h;else if("MORPHWEIGHTS"===i.semantic)l=h;else if("ALPHACUTOFF"===i.semantic){var f=t.alphaMode;if(e$2b(f)&&"MASK"===f){var p=u$_(t.alphaCutoff,.5);d=s$v.createUniformFunction(i.type,p,o,a,i.extensionType),u[h]=d.func,c[h]=d}}else u[h]=s$v.getGltfSemanticUniforms()[i.semantic](r.uniformState,e);else if(e$2b(i.value)){var _=s$v.createUniformFunction(i.type,i.value,o,a,i.extensionType);u[h]=_.func,c[h]=_}})),{map:u,values:c,jointMatrixUniformName:s,morphWeightsUniformName:l}}function fi$3(e,t){var i=e._loadResources;if(i.finishedProgramCreation()&&i.createUniformMaps){i.createUniformMaps=!1;var n=e.gltf,r=e._sourceTechniques,o=e._uniformMaps,a=e._rendererResources.textures,s=e._defaultTexture;e$K.material(n,(function(i,n){var l=e._runtime.materialsById[n],u=r[l._technique],c=l._values,h=ci$4(e,i,u,c,t,a,s),d=o[n];d.uniformMap=h.map,d.values=h.values,d.jointMatrixUniformName=h.jointMatrixUniformName,d.morphWeightsUniformName=h.morphWeightsUniformName}))}}function hi$3(e){return s$v.createUniformsForDracoQuantizedAttributes(e.attributes)}function li$2(e,t){var i=nr$3(e,t),n=e._quantizedUniforms[i];return s$v.createUniformsForQuantizedAttributes(e.gltf,t,n)}function di$3(e){return function(){return e}}function pi$4(e){return function(){return e.computedJointMatrices}}function _i$4(e){return function(){return e.weights}}function gi$4(e){return function(){return e.silhouetteColor}}function vi$3(e){return function(){return e.silhouetteSize}}function mi$1(e){return function(){return e.color}}var xi$3=new p$1d;function yi$3(e){return function(){var t=e.clippingPlanes;if(!e$2b(t)&&!e$2b(e._sphericalHarmonicCoefficients)&&!e$2b(e._specularEnvironmentMaps))return p$1d.IDENTITY;var i=e$2b(t)?t.modelMatrix:p$1d.IDENTITY;return p$1d.multiply(e._clippingPlaneModelViewMatrix,i,xi$3)}}function Si$2(e){return function(){var t=e.clippingPlanes;return e$2b(t)&&t.enabled?t.texture:e._defaultTexture}}function Ci$3(e){return function(){var t=e.clippingPlanes;if(!e$2b(t))return e$1U.WHITE.withAlpha(0);var i=e$1U.clone(t.edgeColor);return i.alpha=t.edgeWidth,i}}function Ei$3(e){return function(){return I$J.getColorBlend(e.colorBlendMode,e.colorBlendAmount)}}function bi$3(e){return function(){return e._imageBasedLightingFactor}}function Mi$3(e){return function(){return e._lightColor}}function wi$3(e){return function(){return e.luminanceAtZenith}}function Li$1(e){return function(){return e._sphericalHarmonicCoefficients}}function Pi$3(e){return function(){return e._specularEnvironmentMapAtlas.texture}}function Ri$2(e){return function(){return e._specularEnvironmentMapAtlas.texture.dimensions}}function Ti$3(e){return function(){return e._specularEnvironmentMapAtlas.maximumMipmapLevel}}function Ai$2(e,t){switch(e.mode){case W$18.TRIANGLES:return t/3;case W$18.TRIANGLE_STRIP:case W$18.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function Ii$2(e,t,i,n,r,o){for(var a=e._nodeCommands,s=e._pickIds,l=e.allowPicking,u=e._runtime.meshesByName,c=e._rendererResources,h=c.vertexArrays,d=c.programs,f=c.renderStates,p=e._uniformMaps,_=e.gltf,m=_.accessors,g=_.meshes,x=t.mesh,v=g[x],y=v.primitives,$=y.length,b=0;b<$;++b){var T,C=y[b],S=m[C.indices],w=e._runtime.materialsById[C.material]._program,E=e._decodedData[x+".primitive."+b],P=C.attributes.POSITION;if(e$2b(P)){var A=s$v.getAccessorMinMax(_,P);T=i$1c.fromCornerPoints(o$1p.fromArray(A.min),o$1p.fromArray(A.max))}var L,M,R=h[x+".primitive."+b];if(e$2b(E))M=E.numberOfIndices,L=0;else if(e$2b(S))M=S.count,L=S.byteOffset/ce$x.getSizeInBytes(S.componentType);else{M=m[C.attributes.POSITION].count,L=0}e._trianglesLength+=Ai$2(C,M);var I=p[C.material],O=I.uniformMap;if(e$2b(I.jointMatrixUniformName)){var D={};D[I.jointMatrixUniformName]=pi$4(i),O=p$19(O,D)}if(e$2b(I.morphWeightsUniformName)){var B={};B[I.morphWeightsUniformName]=_i$4(i),O=p$19(O,B)}O=p$19(O,{gltf_color:mi$1(e),gltf_colorBlend:Ei$3(e),gltf_clippingPlanes:Si$2(e),gltf_clippingPlanesEdgeStyle:Ci$3(e),gltf_clippingPlanesMatrix:yi$3(e),gltf_iblFactor:bi$3(e),gltf_lightColor:Mi$3(e),gltf_sphericalHarmonicCoefficients:Li$1(e),gltf_specularMap:Pi$3(e),gltf_specularMapSize:Ri$2(e),gltf_maxSpecularLOD:Ti$3(e),gltf_luminanceAtZenith:wi$3(e)}),O=p$19(O,o.lightSource.createUniformMap()),e$2b(e._uniformMapLoaded)&&(O=e._uniformMapLoaded(O,w,i));var N={};e.extensionsUsed.WEB3D_quantized_attributes?N=li$2(e,C):e._dequantizeInShader&&e$2b(E)&&(N=hi$3(E)),O=p$19(O,N);var F=f[C.material],U=F.blending.enabled,z=e._pickObject;e$2b(z)||(z={primitive:e,id:e.id,node:i.publicNode,mesh:u[v.name]});var G,V=W$W.castShadows(e._shadows),k=W$W.receiveShadows(e._shadows);if(l&&!e$2b(e._uniformMapLoaded))G=n.createPickId(z),s.push(G),O=p$19(O,{czm_pickColor:di$3(G.color)});l&&(G=e$2b(e._pickIdLoaded)&&e$2b(e._uniformMapLoaded)?e._pickIdLoaded():"czm_pickColor");var W,H=new i$_({boundingVolume:new i$1c,cull:e.cull,modelMatrix:new p$1d,primitiveType:C.mode,vertexArray:R,count:M,offset:L,shaderProgram:d[w],castShadows:V,receiveShadows:k,uniformMap:O,renderState:F,owner:z,pass:U?Le$s.TRANSLUCENT:e.opaquePass,pickId:G});H.addUniformBuffer(n.uniformState._lightUBO),r||((W=i$_.shallowClone(H)).boundingVolume=new i$1c,W.modelMatrix=new p$1d);var q={show:!0,boundingSphere:T,command:H,command2D:W,silhouetteModelCommand:void 0,silhouetteModelCommand2D:void 0,silhouetteColorCommand:void 0,silhouetteColorCommand2D:void 0,translucentCommand:void 0,translucentCommand2D:void 0,programId:w};i.commands.push(q),a.push(q)}}function Bi$1(e,t,i,n){var r=e._loadResources;if(r.finishedEverythingButTextureCreation()&&r.createRuntimeNodes){r.createRuntimeNodes=!1;for(var o=[],a=e._runtime.nodes,s=e.gltf,l=s.nodes,u=(s.skins,s.scenes[s.scene].nodes),c=u.length,h=[],d={},f=0;f<c;++f)for(h.push({parentRuntimeNode:void 0,gltfNode:l[u[f]],id:u[f]});h.length>0;){var p=h.pop();d[p.id]=!0;var _=p.parentRuntimeNode,m=p.gltfNode,g=a[p.id];if(0===g.parents.length)if(e$2b(m.matrix))g.matrix=p$1d.fromColumnMajorArray(m.matrix);else{var x=m.rotation;g.translation=o$1p.fromArray(m.translation),g.rotation=n$13.unpack(x),g.scale=o$1p.fromArray(m.scale)}e$2b(_)?(_.children.push(g),g.parents.push(_)):o.push(g),e$2b(m.mesh)&&Ii$2(e,m,g,t,i,n);var v=m.children;if(e$2b(v))for(var y=v.length,$=0;$<y;$++){var b=v[$];d[b]||h.push({parentRuntimeNode:g,gltfNode:l[b],id:v[$]})}}e._runtime.rootNodes=o,e._runtime.nodes=a}}function Fi$1(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&(t+=e[i].sizeInBytes);return t}function Di$3(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&(t+=e[i].sizeInBytes);return t}function kr$2(e,t){var i=t.context,n=t.scene3DOnly,r=e._quantizedVertexShaders,o=e._toClipCoordinatesGLSL={},a=e._sourceTechniques,s=e._sourcePrograms,l=e._rendererResources,u=l.sourceShaders;for(var c in e._loadRendererResourcesFromCache&&(u=l.sourceShaders=e._cachedRendererResources.sourceShaders),a)if(a.hasOwnProperty(c)){var h=a[c].program,d=s[h],f=u[d.vertexShader];if(s$v.checkSupportedGlExtensions(d.glExtensions,i),e.extensionsUsed.WEB3D_quantized_attributes||e._dequantizeInShader){var p=r[h];e$2b(p)||(p=Fr(f,h,e),r[h]=p),f=p}f=Me$e(f,h,e._vertexShaderLoaded),o[h]=s$v.toClipCoordinatesGLSL(e.gltf,f)}if(e._loadRendererResourcesFromCache){var _=e._cachedRendererResources;l.buffers=_.buffers,l.vertexArrays=_.vertexArrays,l.programs=_.programs,l.silhouettePrograms=_.silhouettePrograms,l.textures=_.textures,l.samplers=_.samplers,l.renderStates=_.renderStates,e$2b(e._precreatedAttributes)&&zr$2(e,i),e._cachedGeometryByteLength+=Fi$1(_.buffers),e._cachedTexturesByteLength+=Di$3(_.textures)}else Kt$2(e,t),Zt(e,t),Xt(e),Qt$2(e),$t(e,t);ti$1(e),ni$1(e),e._loadRendererResourcesFromCache||(zr$2(e,i),ai$2(e)),fi$3(e,i),Bi$1(e,i,n,t)}function Gr$1(e,t){var i=e.publicNode,n=i.matrix;i.useMatrix&&e$2b(n)?p$1d.clone(n,t):e$2b(e.matrix)?p$1d.clone(e.matrix,t):(p$1d.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t),i.setMatrix(t))}var Wr=[],Ni$2=new e$29,or$2=new p$1d;function Kr$2(e,t,i,n){var r=e._maxDirtyNumber,o=e._runtime.rootNodes,a=o.length,s=Wr,l=e._computedModelMatrix;if(e._mode!==C$13.SCENE3D&&!e._ignoreCommands){var u=p$1d.getColumn(l,3,Ni$2);if(e$29.equals(u,e$29.UNIT_W)){var c=e.boundingSphere.center,h=m$17.wgs84To2DModelMatrix(n,c,or$2);l=p$1d.multiply(h,l,or$2),e$2b(e._rtcCenter)&&(p$1d.setTranslation(l,e$29.UNIT_W,l),e._rtcCenter=e._rtcCenter2D)}else l=m$17.basisTo2D(n,l,or$2),e._rtcCenter=e._rtcCenter3D}for(var d=0;d<a;++d){var f=o[d];for(Gr$1(f,f.transformToRoot),s.push(f);s.length>0;){var p=(f=s.pop()).transformToRoot,_=f.commands;if(f.dirtyNumber===r||t||i){var m=p$1d.multiplyTransformation(l,p,f.computedMatrix),g=_.length;if(g>0)for(var x=0;x<g;++x){var v=_[x],y=v.command;p$1d.clone(m,y.modelMatrix),i$1c.transform(v.boundingSphere,y.modelMatrix,y.boundingVolume),e$2b(e._rtcCenter)&&o$1p.add(e._rtcCenter,y.boundingVolume.center,y.boundingVolume.center),e$2b(y=v.command2D)&&e._mode===C$13.SCENE2D&&(p$1d.clone(m,y.modelMatrix),y.modelMatrix[13]-=2*e$2a.sign(y.modelMatrix[13])*e$2a.PI*n.ellipsoid.maximumRadius,i$1c.transform(v.boundingSphere,y.modelMatrix,y.boundingVolume))}}var $=f.children;if(e$2b($))for(var b=$.length,T=0;T<b;++T){var C=$[T];C.dirtyNumber=Math.max(C.dirtyNumber,f.dirtyNumber),(C.dirtyNumber===r||i)&&(Gr$1(C,C.transformToRoot),p$1d.multiplyTransformation(p,C.transformToRoot,C.transformToRoot)),s.push(C)}}}++e._maxDirtyNumber}var ur$1=new p$1d;function jr$1(e){for(var t=e._runtime.skinnedNodes,i=t.length,n=0;n<i;++n){var r=t[n];ur$1=p$1d.inverseTransformation(r.transformToRoot,ur$1);for(var o=r.computedJointMatrices,a=r.joints,s=r.bindShapeMatrix,l=r.inverseBindMatrices,u=l.length,c=0;c<u;++c)e$2b(o[c])||(o[c]=new p$1d),o[c]=p$1d.multiplyTransformation(ur$1,a[c].transformToRoot,o[c]),o[c]=p$1d.multiplyTransformation(o[c],l[c],o[c]),e$2b(s)&&(o[c]=p$1d.multiplyTransformation(o[c],s,o[c]))}}function Oi$3(e){for(var t=e._runtime.rootNodes,i=t.length,n=Wr,r=0;r<i;++r){var o=t[r];for(o.computedShow=o.publicNode.show,n.push(o);n.length>0;){for(var a=(o=n.pop()).computedShow,s=o.commands,l=s.length,u=0;u<l;++u)s[u].show=a;var c=o.children;if(e$2b(c))for(var h=c.length,d=0;d<h;++d){var f=c[d];f.computedShow=a&&f.publicNode.show,n.push(f)}}}}function Ui$1(e,t){var i=e.id;if(e._id!==i){e._id=i;for(var n=e._pickIds,r=n.length,o=0;o<r;++o)n[o].object.id=i}}function Vi$3(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?W$18.LINES:W$18.TRIANGLES,i=e._nodeCommands,n=i.length,r=0;r<n;++r)i[r].command.primitiveType=t}}function qi$1(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e.debugShowBoundingVolume,i=e._nodeCommands,n=i.length,r=0;r<n;++r)i[r].command.debugShowBoundingVolume=t}}function Hi$2(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=W$W.castShadows(e.shadows),i=W$W.receiveShadows(e.shadows),n=e._nodeCommands,r=n.length,o=0;o<r;o++){var a=n[o];a.command.castShadows=t,a.command.receiveShadows=i}}}function zi$2(e){var t=l$1g(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=Ee$r.ALPHA_BLEND,d$1m.fromCache(t)}function Yr$1(e){var t=i$_.shallowClone(e);return t.pass=Le$s.TRANSLUCENT,t.renderState=zi$2(e.renderState),t}function Zr$1(e,t,i){var n=t.scene3DOnly,r=e.color.alpha;if(r>0&&r<1){var o=e._nodeCommands,a=o.length;if(!e$2b(o[0].translucentCommand)||i)for(var s=0;s<a;++s){var l=o[s],u=l.command;if(l.translucentCommand=Yr$1(u),!n){var c=l.command2D;l.translucentCommand2D=Yr$1(c)}}}}function ki$2(e,t){var i=e._rendererResources.programs;for(var n in i)if(i.hasOwnProperty(n)&&i[n]===t)return n}function Gi$1(e,t,i){var n=t.vertexShaderSource.sources[0],r=t._attributeLocations,o=e._normalAttributeName;n=s$U.replaceMain(n,"gltf_silhouette_main"),n+="uniform float gltf_silhouetteSize; \nvoid main() \n{ \n gltf_silhouette_main(); \n vec3 n = normalize(czm_normal3D * "+o+"); \n n.x *= czm_projection[0][0]; \n n.y *= czm_projection[1][1]; \n vec4 clip = gl_Position; \n clip.xy += n.xy * clip.w * gltf_silhouetteSize / czm_viewport.z; \n gl_Position = clip; \n}";return r$13.fromCache({context:i.context,vertexShaderSource:n,fragmentShaderSource:"uniform vec4 gltf_silhouetteColor; \nvoid main() \n{ \n gl_FragColor = gltf_silhouetteColor; \n}",attributeLocations:r})}function Jr$1(e,t){return Pr$1(t.context)&&e.silhouetteSize>0&&e.silhouetteColor.alpha>0&&e$2b(e._normalAttributeName)}function Wi$2(e){for(var t=e._nodeCommands,i=t.length,n=0;n<i;++n){if(t[n].command.pass===Le$s.TRANSLUCENT)return!0}return!1}function cr$2(e){return e.color.alpha>0&&e.color.alpha<1}function Qr$1(e){return 0===e.color.alpha}function Xr$1(e,t){return Math.floor(e)!==Math.floor(t)||Math.ceil(e)!==Math.ceil(t)}var Ki$1=0;function ji$2(e,t){for(var i=++Ki$1%255,n=Wi$2(e)||cr$2(e)||e.silhouetteColor.alpha<1,r=e._rendererResources.silhouettePrograms,o=t.scene3DOnly,a=e._nodeCommands,s=a.length,l=0;l<s;++l){var u=a[l],c=u.command,h=cr$2(e)?u.translucentCommand:c,d=i$_.shallowClone(h),f=l$1g(h.renderState);f.stencilTest={enabled:!0,frontFunction:de$x.ALWAYS,backFunction:de$x.ALWAYS,reference:i,mask:65535,frontOperation:{fail:de$x.KEEP,zFail:de$x.KEEP,zPass:de$x.REPLACE},backOperation:{fail:de$x.KEEP,zFail:de$x.KEEP,zPass:de$x.REPLACE}},Qr$1(e)&&(f.colorMask={red:!1,green:!1,blue:!1,alpha:!1},f.depthMask=!1),f=d$1m.fromCache(f),d.renderState=f,u.silhouetteModelCommand=d;var p=i$_.shallowClone(c);(f=l$1g(c.renderState,!0)).depthTest.enabled=!0,f.cull.enabled=!1,n&&(p.pass=Le$s.TRANSLUCENT,f.depthMask=!1,f.blending=Ee$r.ALPHA_BLEND),f.stencilTest={enabled:!0,frontFunction:de$x.NOTEQUAL,backFunction:de$x.NOTEQUAL,reference:i,mask:65535,frontOperation:{fail:de$x.KEEP,zFail:de$x.KEEP,zPass:de$x.KEEP},backOperation:{fail:de$x.KEEP,zFail:de$x.KEEP,zPass:de$x.KEEP}},f=d$1m.fromCache(f);var _=c.shaderProgram,m=ki$2(e,_),g=r[m];e$2b(g)||(g=Gi$1(e,_,t),r[m]=g);var x=p$19(c.uniformMap,{gltf_silhouetteColor:gi$4(e),gltf_silhouetteSize:vi$3(e)});if(p.renderState=f,p.shaderProgram=g,p.uniformMap=x,p.castShadows=!1,p.receiveShadows=!1,u.silhouetteColorCommand=p,!o){var v=u.command2D,y=i$_.shallowClone(d);y.boundingVolume=v.boundingVolume,y.modelMatrix=v.modelMatrix,u.silhouetteModelCommand2D=y;var $=i$_.shallowClone(p);y.boundingVolume=v.boundingVolume,y.modelMatrix=v.modelMatrix,u.silhouetteColorCommand2D=$}}}function Yi$1(e,t,i){return e=s$U.replaceMain(e,"gltf_clip_main"),e+=F$C._getClippingFunction(t,i)+"\n",e+="uniform sampler2D gltf_clippingPlanes; \nuniform mat4 gltf_clippingPlanesMatrix; \nuniform vec4 gltf_clippingPlanesEdgeStyle; \nvoid main() \n{ \n gltf_clip_main(); \n"+p$x("gltf_clippingPlanes","gltf_clippingPlanesMatrix","gltf_clippingPlanesEdgeStyle")+"} \n"}function $r$2(e,t,i){if(Jr$1(e,t)){var n=e._nodeCommands,r=Xr$1(e.color.alpha,e._colorPreviousAlpha)||Xr$1(e.silhouetteColor.alpha,e._silhouetteColorPreviousAlpha)||!e$2b(n[0].silhouetteModelCommand);e._colorPreviousAlpha=e.color.alpha,e._silhouetteColorPreviousAlpha=e.silhouetteColor.alpha,(r||i)&&ji$2(e,t)}}function Zi$2(e,t){var i=e._clippingPlanes;e$2b(i)&&i.owner===e&&i.enabled&&i.update(t)}var fr$1=new i$1c;function Ji$1(e,t,i){return fr$1.center=e,fr$1.radius=t,i.camera.getPixelSize(fr$1,i.context.drawingBufferWidth,i.context.drawingBufferHeight)}var B$u=new o$1p,we$b=new a$18,Qi$1=new o$1p;function Xi(e,t){var i=e.scale;if(0!==e.minimumPixelSize){var n=t.context,r=Math.max(n.drawingBufferWidth,n.drawingBufferHeight),o=e$2b(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;if(B$u.x=o[12],B$u.y=o[13],B$u.z=o[14],e$2b(e._rtcCenter)&&o$1p.add(e._rtcCenter,B$u,B$u),e._mode!==C$13.SCENE3D){var a=t.mapProjection,s=a.ellipsoid.cartesianToCartographic(B$u,we$b);a.project(s,B$u),o$1p.fromElements(B$u.z,B$u.x,B$u.y,B$u)}var l=e.boundingSphere.radius,u=Ji$1(B$u,l,t),c=1/u;Math.min(c*(2*l),r)<e.minimumPixelSize&&(i=e.minimumPixelSize*u/(2*e._initialRadius))}return i instanceof o$1p?e$2b(e.maximumScale)&&(i.x=i.x>e.maximumScale?e.maximumScale:i.x,i.y=i.y>e.maximumScale?e.maximumScale:i.y,i.z=i.z>e.maximumScale?e.maximumScale:i.z):(e$2b(e.maximumScale)&&(i=i>e.maximumScale?e.maximumScale:i),i=o$1p.fromElements(i,i,i,Qi$1)),i}function et$7(e){e$2b(e._cacheKey)&&e$2b(e._cachedGltf)&&0==--e._cachedGltf.count&&delete X$r[e._cacheKey],e._cachedGltf=void 0}function hr$1(e,t){this.buffers=void 0,this.vertexArrays=void 0,this.programs=void 0,this.sourceShaders=void 0,this.silhouettePrograms=void 0,this.textures=void 0,this.samplers=void 0,this.renderStates=void 0,this.ready=!1,this.context=e,this.cacheKey=t,this.count=0}function $$w(e){for(var t in e)e.hasOwnProperty(t)&&e[t].destroy()}function $i$1(e){$$w(e.buffers),$$w(e.vertexArrays),$$w(e.programs),$$w(e.silhouettePrograms),$$w(e.textures)}function rt$8(e,t,i){return function(n){if(e.heightReference===k$P.RELATIVE_TO_GROUND){var r=t.cartesianToCartographic(n,we$b);r.height+=i.height,t.cartographicToCartesian(r,n)}var o=e._clampedModelMatrix;p$1d.clone(e.modelMatrix,o),o[12]=n.x,o[13]=n.y,o[14]=n.z,e._heightChanged=!0}}function en$1(e){e$2b(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);var t=e._scene;if(e$2b(t)&&e$2b(t.globe)&&e.heightReference!==k$P.NONE){var i=t.globe,n=i.ellipsoid,r=e.modelMatrix;B$u.x=r[12],B$u.y=r[13],B$u.z=r[14];var o=n.cartesianToCartographic(B$u);e$2b(e._clampedModelMatrix)||(e._clampedModelMatrix=p$1d.clone(r,new p$1d));var a=i._surface;e._removeUpdateHeightCallback=a.updateHeight(o,rt$8(e,n,o));var s=i.getHeight(o);if(e$2b(s)){var l=rt$8(e,n,o);a$18.clone(o,we$b),we$b.height=s,n.cartographicToCartesian(we$b,B$u),l(B$u)}}else{if(e.heightReference!==k$P.NONE)throw new t$16("Height reference is not supported without a scene and globe.");e._clampedModelMatrix=void 0}}hr$1.prototype.release=function(){if(0==--this.count)return e$2b(this.cacheKey)&&delete this.context.cache.modelRendererResourceCache[this.cacheKey],$i$1(this),i$10(this)};var rn$1=new o$1p,tn$1=new a$18;function nn$1(e,t){var i,n=e.distanceDisplayCondition,r=n.near*n.near,o=n.far*n.far;if(t.mode===C$13.SCENE2D){i=.5*(t.camera.frustum.right-t.camera.frustum.left),i*=i}else{var a=p$1d.getTranslation(e.modelMatrix,rn$1);if(t.mode===C$13.COLUMBUS_VIEW){var s=t.mapProjection,l=s.ellipsoid.cartesianToCartographic(a,tn$1);a=s.project(l,a),o$1p.fromElements(a.z,a.x,a.y,a)}i=o$1p.distanceSquared(a,t.camera.positionWC)}return i>=r&&i<=o}var an$1=new o$1p,_e$d=new o$1p,Le$e=new p$1d;function tt$6(e,t){e.programs!==t.programs&&$$w(e.programs),e.silhouettePrograms!==t.silhouettePrograms&&$$w(e.silhouettePrograms)}function sn$1(e,t){var i,n=e._rendererResources,r=e._cachedRendererResources;if(tt$6(n,r),Rr(e)||er$4(e)||e._shouldRegenerateShaders){e._shouldRegenerateShaders=!1,n.programs={},n.silhouettePrograms={};var o={},a=e._sourceTechniques;for(var s in a)a.hasOwnProperty(s)&&(o[i=a[s].program]||(o[i]=!0,Yt$1({programId:i,techniqueId:s},e,t.context,t)))}else n.programs=r.programs,n.silhouettePrograms=r.silhouettePrograms;for(var l=n.programs,u=e._nodeCommands,c=u.length,h=0;h<c;++h){var d=u[h],f=l[i=d.programId];d.command.shaderProgram=f,e$2b(d.command2D)&&(d.command2D.shaderProgram=f)}Zr$1(e,t,!0),$r$2(e,t,!0)}function n$p(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._model=void 0,this._batchTable=void 0,this._features=void 0,this._batchIdAttributeName=void 0,this._diffuseAttributeOrUniformName={},this._rtcCenterTransform=void 0,this._contentModelMatrix=void 0,this.featurePropertiesDirty=!1,re$o(this,n,r)}F$C.prototype.update=function(e){if(e.multiViewportIndex>-1&&e$2b(this.id)){var t=this.id.entityCollection;if(e$2b(t)){var i=t.owner;if(e$2b(i)&&typeof i.getVisibleInViewport<"u")if(!i.getVisibleInViewport(e.multiViewportIndex))return}}if(e.mode!==C$13.MORPHING){var n=s$Y.supportsWebPSync();if(e$2b(n)){var r=e.context;if(this._defaultTexture=r.defaultTexture,this._state===O$q.NEEDS_LOAD&&e$2b(this.gltf)){var o,a=this.cacheKey;if(e$2b(a)){r.cache.modelRendererResourceCache=u$_(r.cache.modelRendererResourceCache,{});var s=r.cache.modelRendererResourceCache;if(e$2b(o=s[this.cacheKey])){if(!o.ready)return;++o.count,this._loadRendererResourcesFromCache=!0}else(o=new hr$1(r,a)).count=1,s[this.cacheKey]=o;this._cachedRendererResources=o}else(o=new hr$1(r)).count=1,this._cachedRendererResources=o;if(this._state=O$q.LOADING,this._state!==O$q.FAILED){var l=this.gltf.extensions;if(e$2b(l)&&e$2b(l.CESIUM_RTC)){var u=o$1p.fromArray(l.CESIUM_RTC.center);if(!o$1p.equals(u,o$1p.ZERO)){this._rtcCenter3D=u;var c=e.mapProjection,h=c.ellipsoid.cartesianToCartographic(this._rtcCenter3D),d=c.project(h);o$1p.fromElements(d.z,d.x,d.y,d),this._rtcCenter2D=d,this._rtcCenterEye=new o$1p,this._rtcCenter=this._rtcCenter3D}}s$z(this.gltf),this._loadResources=new t$u,this._loadRendererResourcesFromCache||s$v.parseBuffers(this,Ft$4)}}var f=this._loadResources,p=this._incrementallyLoadTextures,_=!1;if(this._state===O$q.LOADING){if(0===f.pendingBufferLoads){if(!f.initialized){if(e.brdfLutGenerator.update(e),s$v.checkSupportedExtensions(this.extensionsRequired,n),s$v.updateForwardAxis(this),!this._loadRendererResourcesFromCache){var m=this.gltf;m.extras.sourceVersion=s$v.getAssetVersion(m),m.extras.sourceKHRTechniquesWebGL=e$2b(s$v.getUsedExtensions(m).KHR_techniques_webgl),this._sourceVersion=m.extras.sourceVersion,this._sourceKHRTechniquesWebGL=m.extras.sourceKHRTechniquesWebGL,re$r(m),E$D(m);var g={addBatchIdToGeneratedShaders:this._addBatchIdToGeneratedShaders};ue$k(m,g),he$f(m,g)}this._sourceVersion=this.gltf.extras.sourceVersion,this._sourceKHRTechniquesWebGL=this.gltf.extras.sourceKHRTechniquesWebGL,this._dequantizeInShader=this._dequantizeInShader&&r$A.hasExtension(this),Bt$5(this),Nt$4(this),this._loadRendererResourcesFromCache||(Dt$3(this),Ut$3(this),Vt$4(this),zt$2(this,r,n)),Gt$2(this),Wt$4(this),kt$3(this),r$A.parse(this,r),f.initialized=!0}f.finishedDecoding()||r$A.decodeModel(this,r).otherwise(s$v.getFailedLoadFunction(this,"model",this.basePath)),f.finishedDecoding()&&!f.resourcesParsed&&(this._boundingSphere=s$v.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,r$A.cacheDataForModel(this),f.resourcesParsed=!0),f.resourcesParsed&&0===f.pendingShaderLoads&&kr$2(this,e)}(f.finished()||p&&f.finishedEverythingButTextureCreation())&&(this._state=O$q.LOADED,_=!0)}if(e$2b(f)&&this._state===O$q.LOADED&&(p&&!_&&kr$2(this,e),f.finished())){this._loadResources=void 0;var x=this._rendererResources,v=this._cachedRendererResources;v.buffers=x.buffers,v.vertexArrays=x.vertexArrays,v.programs=x.programs,v.sourceShaders=x.sourceShaders,v.silhouettePrograms=x.silhouettePrograms,v.textures=x.textures,v.samplers=x.samplers,v.renderStates=x.renderStates,v.ready=!0,this._normalAttributeName=s$v.getAttributeOrUniformBySemantic(this.gltf,"NORMAL"),e$2b(this._precreatedAttributes)&&(v.vertexArrays={}),this.releaseGltfJson&&et$7(this)}var y=u$B.isSupported(r);if(this._shouldUpdateSpecularMapAtlas&&y){if(this._shouldUpdateSpecularMapAtlas=!1,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),this._specularEnvironmentMapAtlas=void 0,e$2b(this._specularEnvironmentMaps)){this._specularEnvironmentMapAtlas=new u$B(this._specularEnvironmentMaps);var $=this;this._specularEnvironmentMapAtlas.readyPromise.then((function(){$._shouldRegenerateShaders=!0}))}this._shouldRegenerateShaders=!0}e$2b(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e);var b=!e$2b(this._specularEnvironmentMapAtlas)&&e$2b(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,T=!e$2b(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,C=!e$2b(this._sphericalHarmonicCoefficients)&&e$2b(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,S=!e$2b(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||b||T||C||S,this._useDefaultSpecularMaps=!e$2b(this._specularEnvironmentMapAtlas)&&e$2b(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!e$2b(this._sphericalHarmonicCoefficients)&&e$2b(e.sphericalHarmonicCoefficients);var w=Jr$1(this,e),E=cr$2(this),P=Qr$1(this),A=!e$2b(this.distanceDisplayCondition)||nn$1(this,e),L=this.show&&A&&(this.scale instanceof o$1p?!o$1p.equals(this._scale,o$1p.ZERO):0!==this.scale)&&(!P||w);if(L&&this._state===O$q.LOADED||_){var M=this.activeAnimations.update(e)||this._cesiumAnimationsDirty;this._cesiumAnimationsDirty=!1,this._dirty=!1;var R=this.modelMatrix,I=e.mode!==this._mode;this._mode=e.mode;var O=!p$1d.equals(this._modelMatrix,R)||(this.scale instanceof o$1p?!o$1p.equals(this._scale,this.scale):this._scale!==this.scale)||this._minimumPixelSize!==this.minimumPixelSize||0!==this.minimumPixelSize||this._maximumScale!==this.maximumScale||this._heightReference!==this.heightReference||this._heightChanged||I;if(O||_){p$1d.clone(R,this._modelMatrix),en$1(this),e$2b(this._clampedModelMatrix)&&(R=this._clampedModelMatrix),this._minimumPixelSize=this.minimumPixelSize,this._maximumScale=this.maximumScale,this._heightReference=this.heightReference,this._heightChanged=!1;var D=Xi(this,e),B=this._computedModelMatrix;if(e$2b(this._offsetMatrix)){if(!this._lastDefinedOffset){"number"==typeof this._scale?(_e$d.x=this._scale,_e$d.y=this._scale,_e$d.z=this._scale):o$1p.clone(this._scale,_e$d);var N=p$1d.getTranslation(this._offsetMatrix,an$1),F=o$1p.divideComponents(N,_e$d,_e$d);o$1p.negate(N,N),this._offsetMat4ForScale=this._offsetMat4ForScale||new p$1d,this._realOffsetMat4ForScale=this._realOffsetMat4ForScale||new p$1d,p$1d.fromTranslation(N,this._offsetMat4ForScale),p$1d.fromTranslation(F,this._realOffsetMat4ForScale)}p$1d.multiply(p$1d.fromScale(D),this._realOffsetMat4ForScale,Le$e),p$1d.multiply(this._offsetMat4ForScale,Le$e,Le$e)}else p$1d.fromScale(D,Le$e);p$1d.multiply(R,Le$e,B),this._scale=this.scale,this._lastDefinedOffset=e$2b(this._offsetMatrix),this._upAxis===v$y.Y?p$1d.multiplyTransformation(B,v$y.Y_UP_TO_Z_UP,B):this._upAxis===v$y.X&&p$1d.multiplyTransformation(B,v$y.X_UP_TO_Z_UP,B),this.forwardAxis===v$y.Z&&p$1d.multiplyTransformation(B,v$y.Z_UP_TO_X_UP,B)}(M||O||_)&&(Kr$2(this,O,_,e.mapProjection),this._dirty=!0,(M||_)&&jr$1(this)),this._perNodeShowDirty&&(this._perNodeShowDirty=!1,Oi$3(this)),Ui$1(this),Vi$3(this),qi$1(this),Hi$2(this),Zi$2(this,e);var U=this._clippingPlanes,z=0,G=e$2b(U)&&U.enabled&&U.length>0,V=e$2b(this._sphericalHarmonicCoefficients)||this._useDefaultSphericalHarmonics,k=e$2b(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready||this._useDefaultSpecularMaps;if(G||V||k){var W=u$_(this.clippingPlanesOriginMatrix,R);p$1d.multiply(r.uniformState.view3D,W,this._clippingPlaneModelViewMatrix)}G&&(z=U.clippingPlanesState),e.lightSource.hasChange()&&(this._shouldRegenerateShaders=!0);var H=this._shouldRegenerateShaders;H=H||this._clippingPlanesState!==z,this._clippingPlanesState=z;var q=er$4(this);q!==this._colorShadingEnabled&&(this._colorShadingEnabled=q,H=!0),H?sn$1(this,e):(Zr$1(this,e,!1),$r$2(this,e,!1))}if(_){var j=this;return void e.afterRender.push((function(){j._ready=!0,j._readyPromise.resolve(j)}))}if(L&&!this._ignoreCommands){var Y,X,K,Q=e.commandList,Z=e.passes,J=this._nodeCommands,ee=J.length,te=e.mapProjection.ellipsoid.maximumRadius*e$2a.PI;if(Z.render||Z.pick&&this.allowPicking){for(Y=0;Y<ee;++Y)if((X=J[Y]).show){var ie=E?X.translucentCommand:X.command;if(ie=w?X.silhouetteModelCommand:ie,Q.push(ie),K=X.command.boundingVolume,e.mode===C$13.SCENE2D&&(K.center.y+K.radius>te||K.center.y-K.radius<te)){var ne=E?X.translucentCommand2D:X.command2D;ne=w?X.silhouetteModelCommand2D:ne,Q.push(ne)}}if(w&&!Z.pick)for(Y=0;Y<ee;++Y)(X=J[Y]).show&&(Q.push(X.silhouetteColorCommand),K=X.command.boundingVolume,e.mode===C$13.SCENE2D&&(K.center.y+K.radius>te||K.center.y-K.radius<te)&&Q.push(X.silhouetteColorCommand2D))}}}}},F$C.prototype.updateAnimation=function(e){this._state===O$q.LOADED&&((this.activeAnimations.update(e)||this._cesiumAnimationsDirty)&&(Kr$2(this,!0,!0,e.mapProjection),jr$1(this)))},F$C.prototype.isDestroyed=function(){return!1},F$C.prototype.destroy=function(){e$2b(this._precreatedAttributes)&&$$w(this._rendererResources.vertexArrays),e$2b(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),e$2b(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0),e$2b(this._cachedRendererResources)&&tt$6(this._rendererResources,this._cachedRendererResources),this._rendererResources=void 0,this._cachedRendererResources=this._cachedRendererResources&&this._cachedRendererResources.release(),r$A.destroyCachedDataForModel(this);for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();et$7(this),this._quantizedVertexShaders=void 0;var n=this._clippingPlanes;return e$2b(n)&&!n.isDestroyed()&&n.owner===this&&n.destroy(),this._clippingPlanes=void 0,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),i$10(this)},F$C._getClippingFunction=f$G,F$C._modifyShaderForColor=jt$1,n$p._deprecationWarning=t$12,Object.defineProperties(n$p.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return this._model.trianglesLength}},geometryByteLength:{get:function(){return this._model.geometryByteLength}},texturesByteLength:{get:function(){return this._model.texturesByteLength}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._model.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var s$s=Uint32Array.BYTES_PER_ELEMENT;function O$p(e){var t=s$v.getAttributeOrUniformBySemantic(e,"_BATCHID");return e$2b(t)||e$2b(t=s$v.getAttributeOrUniformBySemantic(e,"BATCHID"))&&n$p._deprecationWarning("b3dm-legacy-batchid","The glTF in this b3dm uses the semantic `BATCHID`. Application-specific semantics should be prefixed with an underscore: `_BATCHID`."),t}function I$I(e){return function(t,i){var n=e._batchTable,r=!e$2b(e._tileset.classificationType),o=e._model.gltf;e$2b(o)&&(e._batchIdAttributeName=O$p(o),e._diffuseAttributeOrUniformName[i]=s$v.getDiffuseAttributeOrUniform(o,i));var a=n.getVertexShaderCallback(r,e._batchIdAttributeName,e._diffuseAttributeOrUniformName[i]);return e$2b(a)?a(t):t}}function ee$m(e){return function(t,i){var n=e._batchTable,r=!e$2b(e._tileset.classificationType),o=e._model.gltf;e$2b(o)&&(e._diffuseAttributeOrUniformName[i]=s$v.getDiffuseAttributeOrUniform(o,i));var a=n.getFragmentShaderCallback(r,e._diffuseAttributeOrUniformName[i]);return e$2b(a)?a(t):t}}function N$p(e){return function(){return e._batchTable.getPickId()}}function te$i(e){return function(t){var i=e._batchTable.getClassificationFragmentShaderCallback();return e$2b(i)?i(t):t}}function ie$j(e){return function(t,i){e._model.updateCommands(t,i)}}function re$o(e,t,i){var n=e._tileset,r=e._tile,o=e._resource,a=u$_(i,0);i=a;var s=new Uint8Array(t),l=new DataView(t);i+=s$s;var u=l.getUint32(i,!0);if(1!==u)throw new t$14("Only Batched 3D Model version 1 is supported. Version "+u+" is not.");i+=s$s;var c=l.getUint32(i,!0);i+=s$s;var h=l.getUint32(i,!0);i+=s$s;var d=l.getUint32(i,!0);i+=s$s;var f=l.getUint32(i,!0);i+=s$s;var p,_,m=l.getUint32(i,!0);if(i+=s$s,f>=570425344?(i-=2*s$s,p=h,f=d,m=0,h=0,d=0,n$p._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] .")):m>=570425344&&(i-=s$s,p=f,f=h,m=d,h=0,d=0,n$p._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] .")),0===h)_={BATCH_LENGTH:u$_(p,0)};else{var g=a$K(s,i,h);_=JSON.parse(g),i+=h}var x=new Uint8Array(t,i,d);i+=d;var v,y,$,b=new o$B(_,x);if(p=b.getGlobalProperty("BATCH_LENGTH"),b.featuresLength=p,f>0){var T=a$K(s,i,f);v=JSON.parse(T),i+=f,m>0&&(y=new Uint8Array(t,i,m),y=new Uint8Array(y),i+=m)}e$2b(n.classificationType)&&($=ie$j(e));var C=new h$D(e,p,v,y,$);e._batchTable=C;var S,w=a+c-i;if(0===w)throw new t$14("glTF byte length must be greater than 0.");i%4==0?S=new Uint8Array(t,i,w):(n$p._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),S=new Uint8Array(s.subarray(i,i+w)));var E={content:e,primitive:n};e._rtcCenterTransform=p$1d.IDENTITY;var P=b.getGlobalProperty("RTC_CENTER",S$12.FLOAT,3);e$2b(P)&&(e._rtcCenterTransform=p$1d.fromTranslation(o$1p.fromArray(P))),e._contentModelMatrix=p$1d.multiply(r.computedTransform,e._rtcCenterTransform,new p$1d),e$2b(n.classificationType)?e._model=new A$C({gltf:S,cull:!1,basePath:o,requestType:V$15.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:n._gltfUpAxis,forwardAxis:v$y.X,debugWireframe:n.debugWireframe,vertexShaderLoaded:I$I(e),classificationShaderLoaded:te$i(e),uniformMapLoaded:C.getUniformMapCallback(),pickIdLoaded:N$p(e),classificationType:n._classificationType,batchTable:C}):e._model=new F$C({gltf:S,cull:!1,releaseGltfJson:!0,opaquePass:Le$s.CESIUM_3D_TILE,basePath:o,requestType:V$15.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:n._gltfUpAxis,forwardAxis:v$y.X,shadows:n.shadows,debugWireframe:n.debugWireframe,incrementallyLoadTextures:!1,vertexShaderLoaded:I$I(e),fragmentShaderLoaded:ee$m(e),uniformMapLoaded:C.getUniformMapCallback(),pickIdLoaded:N$p(e),addBatchIdToGeneratedShaders:p>0,pickObject:E,imageBasedLightingFactor:n.imageBasedLightingFactor,lightColor:n.lightColor,luminanceAtZenith:n.luminanceAtZenith,sphericalHarmonicCoefficients:n.sphericalHarmonicCoefficients,specularEnvironmentMaps:n.specularEnvironmentMaps,owner:n})}function ae$f(e){var t=e.featuresLength;if(!e$2b(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$L(e,n);e._features=i}}function i$B(e,t,i,n,r,o){this._tileset=e,this._tile=t,this._resource=i,this._contents=[],this._readyPromise=o$1l.defer(),L$B(this,n,r,o)}n$p.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},n$p.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2b(e)||e<0||e>=t)throw new t$16("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return ae$f(this),this._features[e]},n$p.prototype.applyDebugSettings=function(e,t){t=e?t:e$1U.WHITE,0===this.featuresLength?this._model.color=t:this._batchTable.setAllColor(t)},n$p.prototype.applyStyle=function(e){if(0===this.featuresLength){var t=e$2b(e)&&e$2b(e.color),i=e$2b(e)&&e$2b(e.show);this._model.color=t?e.color.evaluateColor(void 0,this._model.color):e$1U.clone(e$1U.WHITE,this._model.color),this._model.show=!i||e.show.evaluate(void 0)}else this._batchTable.applyStyle(e)},n$p.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._contentModelMatrix=p$1d.multiply(this._tile.computedTransform,this._rtcCenterTransform,this._contentModelMatrix),this._model.modelMatrix=this._contentModelMatrix,this._model.shadows=this._tileset.shadows,this._model.imageBasedLightingFactor=this._tileset.imageBasedLightingFactor,this._model.lightColor=this._tileset.lightColor,this._model.luminanceAtZenith=this._tileset.luminanceAtZenith,this._model.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._model.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._model.debugWireframe=this._tileset.debugWireframe;var n=this._tileset.clippingPlanes;this._model.clippingPlanesOriginMatrix=this._tileset.clippingPlanesOriginMatrix,e$2b(n)&&this._tile.clippingPlanesDirty&&(this._model._clippingPlanes=n.enabled&&this._tile._isClipped?n:void 0),e$2b(n)&&e$2b(this._model._clippingPlanes)&&this._model._clippingPlanes!==n&&(this._model._clippingPlanes=n),this._model.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&!e$2b(e.classificationType)&&this._batchTable.addDerivedCommands(t,i)},n$p.prototype.isDestroyed=function(){return!1},n$p.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$10(this)},Object.defineProperties(i$B.prototype,{featurePropertiesDirty:{get:function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)if(e[i].featurePropertiesDirty)return!0;return!1},set:function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}});var u$A=Uint32Array.BYTES_PER_ELEMENT;function L$B(e,t,i,n){i=u$_(i,0);var r=new Uint8Array(t),o=new DataView(t);i+=u$A;var a=o.getUint32(i,!0);if(1!==a)throw new t$14("Only Composite Tile version 1 is supported. Version "+a+" is not.");i+=u$A,i+=u$A;var s=o.getUint32(i,!0);i+=u$A;for(var l=[],u=0;u<s;++u){var c=a$F(r,i),h=o.getUint32(i+2*u$A,!0),d=n[c];if(!e$2b(d))throw new t$14("Unknown tile content type, "+c+", inside Composite tile");var f=d(e._tileset,e._tile,e._resource,t,i);e._contents.push(f),l.push(f.readyPromise),i+=h}o$1l.all(l).then((function(){e._readyPromise.resolve(e)})).otherwise((function(t){e._readyPromise.reject(t)}))}function e$H(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,e$2b(this._center)||(e$2b(this._boundingVolume)?this._center=o$1p.clone(this._boundingVolume.center):this._center=o$1p.clone(o$1p.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=_0x3b5200.BOTH}function F$B(e){var t=new Float64Array(p$1d.packedLength+o$1p.packedLength),i=0;return o$1p.pack(e._center,t,i),i+=o$1p.packedLength,p$1d.pack(e._modelMatrix,t,i),t}function M$A(e,t){for(var i=0,n=t[i++],r=t[i++],o=e._boundingVolumes=new Array(r),a=0;a<r;++a)o[a]=i$1c.unpack(t,i),i+=i$1c.packedLength;for(var s=t[i++],l=e._batchedIndices=new Array(s),u=0;u<s;++u){var c=e$1U.unpack(t,i);i+=e$1U.packedLength;for(var h=t[i++],d=t[i++],f=t[i++],p=new Array(f),_=0;_<f;++_)p[_]=t[i++];l[u]=new c$w({color:c,offset:h,count:d,batchIds:p})}return n}i$B.prototype.hasProperty=function(e,t){return!1},i$B.prototype.getFeature=function(e){},i$B.prototype.applyDebugSettings=function(e,t){for(var i=this._contents,n=i.length,r=0;r<n;++r)i[r].applyDebugSettings(e,t)},i$B.prototype.applyStyle=function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].applyStyle(e)},i$B.prototype.update=function(e,t){for(var i=this._contents,n=i.length,r=0;r<n;++r)i[r].update(e,t)},i$B.prototype.isDestroyed=function(){return!1},i$B.prototype.destroy=function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)e[i].destroy();return i$10(this)},Object.defineProperties(e$H.prototype,{trianglesLength:{get:function(){return e$2b(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return e$2b(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}}),e$H.packedBoxLength=p$1d.packedLength+o$1p.packedLength,e$H.packedCylinderLength=p$1d.packedLength+2,e$H.packedEllipsoidLength=p$1d.packedLength+o$1p.packedLength,e$H.packedSphereLength=o$1p.packedLength+1;var R$q=new i$V("createVectorTileGeometries"),E$A=new e$1U;function W$A(e){if(!e$2b(e._primitive)){if(!e$2b(e._verticesPromise)){var t=e._boxes,i=e._boxBatchIds,n=e._cylinders,r=e._cylinderBatchIds,o=e._ellipsoids,a=e._ellipsoidBatchIds,s=e._spheres,l=e._sphereBatchIds,u=e._batchTableColors,c=e._packedBuffer;if(!e$2b(u)){var h=0;e$2b(e._boxes)&&(t=e._boxes=l$R(t),h+=(i=e._boxBatchIds=l$R(i)).length),e$2b(e._cylinders)&&(n=e._cylinders=l$R(n),h+=(r=e._cylinderBatchIds=l$R(r)).length),e$2b(e._ellipsoids)&&(o=e._ellipsoids=l$R(o),h+=(a=e._ellipsoidBatchIds=l$R(a)).length),e$2b(e._spheres)&&(s=e._sphere=l$R(s),h+=(l=e._sphereBatchIds=l$R(l)).length),u=e._batchTableColors=new Uint32Array(h);for(var d=e._batchTable,f=0;f<h;++f){var p=d.getColor(f,E$A);u[f]=p.toRgba()}c=e._packedBuffer=F$B(e)}var _=[];e$2b(t)&&_.push(t.buffer,i.buffer),e$2b(n)&&_.push(n.buffer,r.buffer),e$2b(o)&&_.push(o.buffer,a.buffer),e$2b(s)&&_.push(s.buffer,l.buffer),_.push(u.buffer,c.buffer);var m={boxes:e$2b(t)?t.buffer:void 0,boxBatchIds:e$2b(t)?i.buffer:void 0,cylinders:e$2b(n)?n.buffer:void 0,cylinderBatchIds:e$2b(n)?r.buffer:void 0,ellipsoids:e$2b(o)?o.buffer:void 0,ellipsoidBatchIds:e$2b(o)?a.buffer:void 0,spheres:e$2b(s)?s.buffer:void 0,sphereBatchIds:e$2b(s)?l.buffer:void 0,batchTableColors:u.buffer,packedBuffer:c.buffer},g=e._verticesPromise=R$q.scheduleTask(m,_);if(!e$2b(g))return;g.then((function(t){var i=new Float64Array(t.packedBuffer),n=M$A(e,i);e._indices=2===n?new Uint16Array(t.indices):new Uint32Array(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._positions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.vertexBatchIds),e._batchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!e$2b(e._primitive)&&(e._primitive=new y$y({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:u$_(e._pickObject,e)}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}function p$w(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._geometries=void 0,this._contentReadyPromise=void 0,this._readyPromise=o$1l.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,Q$v(this,n,r)}function q$z(e){return function(t,i){e$2b(e._geometries)&&e._geometries.updateCommands(t,i)}}function K$v(e,t){var i,n,r,o,a,s=u$_(e.BOXES_LENGTH,0),l=u$_(e.CYLINDERS_LENGTH,0),u=u$_(e.ELLIPSOIDS_LENGTH,0),c=u$_(e.SPHERES_LENGTH,0);if(s>0&&e$2b(e.BOX_BATCH_IDS)){var h=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,h,s)}if(l>0&&e$2b(e.CYLINDER_BATCH_IDS)){var d=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,d,l)}if(u>0&&e$2b(e.ELLIPSOID_BATCH_IDS)){var f=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,f,u)}if(c>0&&e$2b(e.SPHERE_BATCH_IDS)){var p=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,p,c)}var _=e$2b(i)||e$2b(n)||e$2b(r)||e$2b(o),m=s>0&&!e$2b(i)||l>0&&!e$2b(n)||u>0&&!e$2b(r)||c>0&&!e$2b(o);if(_&&m)throw new t$14("If one group of batch ids is defined, then all batch ids must be defined.");if(!(e$2b(i)||e$2b(n)||e$2b(r)||e$2b(o))){var g=0;if(!e$2b(i)&&s>0)for(i=new Uint16Array(s),a=0;a<s;++a)i[a]=g++;if(!e$2b(n)&&l>0)for(n=new Uint16Array(l),a=0;a<l;++a)n[a]=g++;if(!e$2b(r)&&u>0)for(r=new Uint16Array(u),a=0;a<u;++a)r[a]=g++;if(!e$2b(o)&&c>0)for(o=new Uint16Array(c),a=0;a<c;++a)o[a]=g++}return{boxes:i,cylinders:n,ellipsoids:r,spheres:o}}e$H.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},e$H.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},e$H.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},e$H.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},e$H.prototype.update=function(e){W$A(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},e$H.prototype.isDestroyed=function(){return!1},e$H.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$10(this)},Object.defineProperties(p$w.prototype,{featuresLength:{get:function(){return e$2b(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return e$2b(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return e$2b(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return e$2b(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var c$u=Uint32Array.BYTES_PER_ELEMENT;function Q$v(e,t,i){i=u$_(i,0);var n=new Uint8Array(t),r=new DataView(t);i+=c$u;var o=r.getUint32(i,!0);if(1!==o)throw new t$14("Only Geometry tile version 1 is supported. Version "+o+" is not.");i+=c$u;var a=r.getUint32(i,!0);if(i+=c$u,0!==a){var s=r.getUint32(i,!0);if(i+=c$u,0===s)throw new t$14("Feature table must have a byte length greater than zero");var l=r.getUint32(i,!0);i+=c$u;var u=r.getUint32(i,!0);i+=c$u;var c=r.getUint32(i,!0),h=a$K(n,i+=c$u,s),d=JSON.parse(h);i+=s;var f,p,_=new Uint8Array(t,i,l);if(i+=l,u>0){var m=a$K(n,i,u);f=JSON.parse(m),i+=u,c>0&&(p=new Uint8Array(t,i,c),p=new Uint8Array(p))}var g=u$_(d.BOXES_LENGTH,0),x=u$_(d.CYLINDERS_LENGTH,0),v=u$_(d.ELLIPSOIDS_LENGTH,0),y=u$_(d.SPHERES_LENGTH,0),$=g+x+v+y,b=new h$D(e,$,f,p,q$z(e));if(e._batchTable=b,0!==$){var T,C=e.tile.computedTransform;e$2b(d.RTC_CENTER)&&(T=o$1p.unpack(d.RTC_CENTER),p$1d.multiplyByPoint(C,T,T));var S=K$v(d,_);if(g>0||x>0||v>0||y>0){var w,E,P,A;if(g>0){var L=_.byteOffset+d.BOXES.byteOffset;w=new Float32Array(_.buffer,L,e$H.packedBoxLength*g)}if(x>0){var M=_.byteOffset+d.CYLINDERS.byteOffset;E=new Float32Array(_.buffer,M,e$H.packedCylinderLength*x)}if(v>0){var R=_.byteOffset+d.ELLIPSOIDS.byteOffset;P=new Float32Array(_.buffer,R,e$H.packedEllipsoidLength*v)}if(y>0){var I=_.byteOffset+d.SPHERES.byteOffset;A=new Float32Array(_.buffer,I,e$H.packedSphereLength*y)}e._geometries=new e$H({boxes:w,boxBatchIds:S.boxes,cylinders:E,cylinderBatchIds:S.cylinders,ellipsoids:P,ellipsoidBatchIds:S.ellipsoids,spheres:A,sphereBatchIds:S.spheres,center:T,modelMatrix:C,batchTable:b,boundingVolume:e.tile.boundingVolume.boundingVolume})}}}else e._readyPromise.resolve(e)}function x$C(e){var t=e.featuresLength;if(!e$2b(e._features)&&t>0){var i=new Array(t);e$2b(e._geometries)&&e._geometries.createFeatures(e,i),e._features=i}}function e$G(e,t,i){this.primitive=e,this._modelMatrix=p$1d.clone(t),this._instanceId=i}p$w.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},p$w.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2b(e)||e<0||e>=t)throw new t$16("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return x$C(this),this._features[e]},p$w.prototype.applyDebugSettings=function(e,t){e$2b(this._geometries)&&this._geometries.applyDebugSettings(e,t)},p$w.prototype.applyStyle=function(e){x$C(this),e$2b(this._geometries)&&this._geometries.applyStyle(e,this._features)},p$w.prototype.update=function(e,t){if(e$2b(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),e$2b(this._batchTable)&&this._geometries._ready&&this._batchTable.update(e,t),!e$2b(this._contentReadyPromise)){var i=this;this._contentReadyPromise=this._geometries.readyPromise.then((function(){i._readyPromise.resolve(i)}))}},p$w.prototype.isDestroyed=function(){return!1},p$w.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$10(this)},Object.defineProperties(e$G.prototype,{instanceId:{get:function(){return this._instanceId}},model:{get:function(){return this.primitive._model}},modelMatrix:{get:function(){return p$1d.clone(this._modelMatrix)},set:function(e){p$1d.clone(e,this._modelMatrix),this.primitive.expandBoundingSphere(this._modelMatrix),this.primitive._dirty=!0}}});var y$w={NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3};function w$u(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).gltf)&&!e$2b(e.url))throw new t$16("Either options.gltf or options.url is required.");if(e$2b(e.gltf)&&e$2b(e.url))throw new t$16("Cannot pass in both options.gltf and options.url.");this.show=u$_(e.show,!0),this._instancingSupported=!1,this._dynamic=u$_(e.dynamic,!1),this._allowPicking=u$_(e.allowPicking,!0),this._ready=!1,this._readyPromise=o$1l.defer(),this._state=y$w.NEEDS_LOAD,this._dirty=!1,this._cull=u$_(e.cull,!0),this._opaquePass=u$_(e.opaquePass,Le$s.OPAQUE),this._instances=re$n(this,e.instances),this._batchTable=e.batchTable,this._model=void 0,this._vertexBufferTypedArray=void 0,this._vertexBuffer=void 0,this._batchIdBuffer=void 0,this._instancedUniformsByProgram=void 0,this._drawCommands=[],this._modelCommands=void 0,this._boundingSphere=ae$e(this),this._center=o$1p.clone(this._boundingSphere.center),this._rtcTransform=new p$1d,this._rtcModelView=new p$1d,this._mode=void 0,this.modelMatrix=p$1d.clone(p$1d.IDENTITY),this._modelMatrix=p$1d.clone(this.modelMatrix),this._url=t$11.createIfNeeded(e.url),this._requestType=e.requestType,this._gltf=e.gltf,this._basePath=t$11.createIfNeeded(e.basePath),this._asynchronous=e.asynchronous,this._incrementallyLoadTextures=e.incrementallyLoadTextures,this._upAxis=e.upAxis,this._forwardAxis=e.forwardAxis,this.shadows=u$_(e.shadows,W$W.ENABLED),this._shadows=this.shadows,this._pickIdLoaded=e.pickIdLoaded,this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=u$_(e.debugWireframe,!1),this._debugWireframe=!1,this._imageBasedLightingFactor=new o$1o(1,1),o$1o.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=e.luminanceAtZenith,this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps}function re$n(e,t){for(var i=(t=u$_(t,[])).length,n=new Array(i),r=0;r<i;++r){var o=t[r],a=o.modelMatrix,s=u$_(o.batchId,r);n[r]=new e$G(e,a,s)}return n}function ae$e(e){for(var t=e.length,i=new Array(t),n=0;n<t;++n)i[n]=p$1d.getTranslation(e._instances[n]._modelMatrix,new o$1p);return i$1c.fromPoints(i)}Object.defineProperties(w$u.prototype,{allowPicking:{get:function(){return this._allowPicking}},length:{get:function(){return this._instances.length}},activeAnimations:{get:function(){return this._model.activeAnimations}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o$1q.typeOf.object("imageBasedLightingFactor",e),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),o$1o.clone(e,this._imageBasedLightingFactor)}}});var te$h=new o$1p,M$z=new p$1d;function ne$m(e,t,i,n){return function(r,o){var a=r.semantic;if(e$2b(a)&&e.indexOf(a)>-1){if(!(t.indexOf(a)>-1))throw new t$14('Shader program cannot be optimized for instancing. Uniform "'+o+'" in program "'+i+'" uses unsupported semantic "'+a+'"');n[o]=a}}}function F$A(e,t){if(e$2b(e._instancedUniformsByProgram))return e._instancedUniformsByProgram[t];var i={};e._instancedUniformsByProgram=i;var n=["MODEL","MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELINVERSE","MODELVIEWINVERSE","MODELVIEWPROJECTIONINVERSE","MODELINVERSETRANSPOSE","MODELVIEWINVERSETRANSPOSE"],r=["MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELVIEWINVERSETRANSPOSE"],o=e._model._sourceTechniques;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a],l=s.program;if(!e$2b(i[l])){var u={};i[l]=u,e$K.techniqueUniform(s,ne$m(n,r,t,u))}}return i[t]}function ie$i(e){return function(t,i){var n=F$A(e,i),r=e$2b(e._batchTable),o=s$U.replaceMain(t,"czm_instancing_main"),a="",s="";for(var l in n)if(n.hasOwnProperty(l)){var u,c=n[l];"MODELVIEW"===c||"CESIUM_RTC_MODELVIEW"===c?u="czm_instanced_modelView":"MODELVIEWPROJECTION"===c?(u="czm_instanced_modelViewProjection",a+="mat4 czm_instanced_modelViewProjection;\n",s+="czm_instanced_modelViewProjection = czm_projection * czm_instanced_modelView;\n"):"MODELVIEWINVERSETRANSPOSE"===c&&(u="czm_instanced_modelViewInverseTranspose",a+="mat3 czm_instanced_modelViewInverseTranspose;\n",s+="czm_instanced_modelViewInverseTranspose = mat3(czm_instanced_modelView);\n");var h=new RegExp("uniform.*"+l+".*");o=o.replace(h,""),h=new RegExp(l+"\\b","g"),o=o.replace(h,u)}var d,f,p;r?(d="attribute float a_batchId;\n",f="",p=""):(d="",f="attribute vec4 pickColor;\nvarying vec4 v_pickColor;\n",p=" v_pickColor = pickColor;\n");var _="uniform mat4 czm_instanced_modifiedModelView;\nuniform mat4 czm_instanced_nodeTransform;\n"+a+"mat4 czm_instanced_modelView;\nattribute vec4 czm_modelMatrixRow0;\nattribute vec4 czm_modelMatrixRow1;\nattribute vec4 czm_modelMatrixRow2;\n"+d+f+o+"void main()\n{\n mat4 czm_instanced_model = mat4(czm_modelMatrixRow0.x, czm_modelMatrixRow1.x, czm_modelMatrixRow2.x, 0.0, czm_modelMatrixRow0.y, czm_modelMatrixRow1.y, czm_modelMatrixRow2.y, 0.0, czm_modelMatrixRow0.z, czm_modelMatrixRow1.z, czm_modelMatrixRow2.z, 0.0, czm_modelMatrixRow0.w, czm_modelMatrixRow1.w, czm_modelMatrixRow2.w, 1.0);\n czm_instanced_modelView = czm_instanced_modifiedModelView * czm_instanced_model * czm_instanced_nodeTransform;\n"+s+" czm_instancing_main();\n"+p+"}\n";if(r){var m=e._model.gltf,g=s$v.getDiffuseAttributeOrUniform(m,i);_=e._batchTable.getVertexShaderCallback(!0,"a_batchId",g)(_)}return _}}function se$d(e){return function(t,i){var n=e._batchTable;if(e$2b(n)){var r=e._model.gltf,o=s$v.getDiffuseAttributeOrUniform(r,i);t=n.getFragmentShaderCallback(!0,o)(t)}else t="varying vec4 v_pickColor;\n"+t;return t}}function de$e(e,t){return function(){return p$1d.multiply(t.uniformState.view,e._rtcTransform,e._rtcModelView)}}function oe$f(e){return function(){return e.computedMatrix}}function me$f(e,t){return function(i,n,r){(i=l$1g(i)).czm_instanced_modifiedModelView=de$e(e,t),i.czm_instanced_nodeTransform=oe$f(r);var o=F$A(e,n);for(var a in o)o.hasOwnProperty(a)&&delete i[a];return e$2b(e._batchTable)&&(i=e._batchTable.getUniformMapCallback()(i)),i}}function ue$g(e){return function(t,i){if(e$2b(e._batchTable)){var n=e._model.gltf,r=s$v.getDiffuseAttributeOrUniform(n,i);t="uniform float a_batchId\n;"+(t=e._batchTable.getVertexShaderCallback(!0,"a_batchId",r)(t))}return t}}function he$c(e){return function(t,i){var n=e._batchTable;if(e$2b(n)){var r=e._model.gltf,o=s$v.getDiffuseAttributeOrUniform(r,i);t=n.getFragmentShaderCallback(!0,o)(t)}else t="uniform vec4 czm_pickColor;\n"+t;return t}}function fe$c(e){return function(t){return e$2b(e._batchTable)&&(t=e._batchTable.getUniformMapCallback()(t)),t}}function U$v(e){var t=e._instances,i=e.length,n=e._center,r=e._vertexBufferTypedArray;e$2b(r)||(r=new Float32Array(12*i)),e._dynamic&&(e._vertexBufferTypedArray=r);for(var o=0;o<i;++o){var a=t[o]._modelMatrix,s=p$1d.clone(a,M$z);s[12]-=n.x,s[13]-=n.y,s[14]-=n.z;var l=12*o;r[l+0]=s[0],r[l+1]=s[4],r[l+2]=s[8],r[l+3]=s[12],r[l+4]=s[1],r[l+5]=s[5],r[l+6]=s[9],r[l+7]=s[13],r[l+8]=s[2],r[l+9]=s[6],r[l+10]=s[10],r[l+11]=s[14]}return r}function _e$c(e,t){var i,n=e._instances,r=e.length,o=e._dynamic,a=e$2b(e._batchTable);if(a){var s=new Uint16Array(r);for(i=0;i<r;++i)s[i]=n[i]._instanceId;e._batchIdBuffer=t$Y.createVertexBuffer({context:t,typedArray:s,usage:A$19.STATIC_DRAW})}if(!a){var l=new Uint8Array(4*r);for(i=0;i<r;++i){var u=e._pickIds[i].color,c=4*i;l[c]=e$1U.floatToByte(u.red),l[c+1]=e$1U.floatToByte(u.green),l[c+2]=e$1U.floatToByte(u.blue),l[c+3]=e$1U.floatToByte(u.alpha)}e._pickIdBuffer=t$Y.createVertexBuffer({context:t,typedArray:l,usage:A$19.STATIC_DRAW})}var h=U$v(e);e._vertexBuffer=t$Y.createVertexBuffer({context:t,typedArray:h,usage:o?A$19.STREAM_DRAW:A$19.STATIC_DRAW})}function ge$c(e){var t=U$v(e);e._vertexBuffer.copyFromArrayView(t)}function ce$g(e,t){for(var i=e._instances,n=i.length,r=new Array(n),o=0;o<n;++o)r[o]=t.createPickId(i[o]);return r}function ve$c(e,t){var i=e._instancingSupported,n=e$2b(e._batchTable),r=e._allowPicking,o={url:e._url,requestType:e._requestType,gltf:e._gltf,basePath:e._basePath,shadows:e._shadows,cacheKey:void 0,asynchronous:e._asynchronous,allowPicking:r,incrementallyLoadTextures:e._incrementallyLoadTextures,upAxis:e._upAxis,forwardAxis:e._forwardAxis,precreatedAttributes:void 0,vertexShaderLoaded:void 0,fragmentShaderLoaded:void 0,uniformMapLoaded:void 0,pickIdLoaded:e._pickIdLoaded,ignoreCommands:!0,opaquePass:e._opaquePass,imageBasedLightingFactor:e.imageBasedLightingFactor,lightColor:e.lightColor,luminanceAtZenith:e.luminanceAtZenith,sphericalHarmonicCoefficients:e.sphericalHarmonicCoefficients,specularEnvironmentMaps:e.specularEnvironmentMaps};if(n||(e._pickIds=ce$g(e,t)),i){_e$c(e,t);var a=S$12.getSizeInBytes(S$12.FLOAT),s={czm_modelMatrixRow0:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:12*a,instanceDivisor:1},czm_modelMatrixRow1:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:4*a,strideInBytes:12*a,instanceDivisor:1},czm_modelMatrixRow2:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:8*a,strideInBytes:12*a,instanceDivisor:1}};n&&(s.a_batchId={index:0,vertexBuffer:e._batchIdBuffer,componentsPerAttribute:1,componentDatatype:S$12.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),n||(s.pickColor={index:0,vertexBuffer:e._pickIdBuffer,componentsPerAttribute:4,componentDatatype:S$12.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),o.precreatedAttributes=s,o.vertexShaderLoaded=ie$i(e),o.fragmentShaderLoaded=se$d(e),o.uniformMapLoaded=me$f(e,t),e$2b(e._url)&&(o.cacheKey=e._url.getUrlComponent()+"#instanced")}else o.vertexShaderLoaded=ue$g(e),o.fragmentShaderLoaded=he$c(e),o.uniformMapLoaded=fe$c(e);e$2b(e._url)?e._model=F$C.fromGltf(o):e._model=new F$C(o)}function pe$f(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?W$18.LINES:W$18.TRIANGLES,i=e._drawCommands,n=i.length,r=0;r<n;++r)i[r].primitiveType=t}}function le$j(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e._drawCommands,i=t.length,n=0;n<i;++n)t[n].debugShowBoundingVolume=e.debugShowBoundingVolume}}function be$e(e,t){for(var i=t.length,n=e.length,r=e._boundingSphere,o=e._cull,a=0;a<i;++a){var s=i$_.shallowClone(t[a]);s.instanceCount=n,s.boundingVolume=r,s.cull=o,e$2b(e._batchTable)?s.pickId=e._batchTable.getPickId():s.pickId="v_pickColor",e._drawCommands.push(s)}}function ye$a(e){return function(){return e}}function we$a(e){return function(){return e}}function Ee$d(e,t){for(var i=e._instances,n=t.length,r=e.length,o=e$2b(e._batchTable),a=e._cull,s=0;s<n;++s)for(var l=0;l<r;++l){var u=i$_.shallowClone(t[s]);if(u.modelMatrix=new p$1d,u.boundingVolume=new i$1c,u.cull=a,u.uniformMap=l$1g(u.uniformMap),o)u.uniformMap.a_batchId=ye$a(i[l]._instanceId);else{var c=e._pickIds[l];u.uniformMap.czm_pickColor=we$a(c.color)}e._drawCommands.push(u)}}function W$z(e){for(var t=e._modelCommands,i=t.length,n=e.length,r=e._rtcTransform,o=e._center,a=0;a<i;++a)for(var s=t[a],l=0;l<n;++l){var u=a*n+l,c=e._drawCommands[u],h=p$1d.clone(e._instances[l]._modelMatrix,M$z);h[12]-=o.x,h[13]-=o.y,h[14]-=o.z,h=p$1d.multiply(r,h,M$z);var d=s.modelMatrix,f=c.modelMatrix;p$1d.multiply(h,d,f);var p=s.boundingVolume,_=c.boundingVolume;i$1c.transform(p,h,_)}}function q$y(e){for(var t=e._nodeCommands,i=t.length,n=[],r=0;r<i;++r){var o=t[r];o.show&&n.push(o.command)}return n}function Te$b(e){for(var t=e._nodeCommands,i=t.length,n=0;n<i;n++){if(t[n].command.dirty)return!0}return!1}function H$D(e,t){e._drawCommands=[];var i=q$y(e._model);t?be$e(e,i):(Ee$d(e,i),W$z(e))}function Ie$a(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=W$W.castShadows(e.shadows),i=W$W.receiveShadows(e.shadows),n=e._drawCommands,r=n.length,o=0;o<r;++o){var a=n[o];a.castShadows=t,a.receiveShadows=i}}}function u$z(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._modelInstanceCollection=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,Se$8(this,n,r)}function Ne$9(e){return function(){return e._batchTable.getPickId()}}w$u.prototype.expandBoundingSphere=function(e){var t=p$1d.getTranslation(e,te$h);i$1c.expand(this._boundingSphere,t,this._boundingSphere)},w$u.prototype.update=function(e){if(e.mode!==C$13.MORPHING&&this.show&&0!==this.length){var t=e.context;if(this._state===y$w.NEEDS_LOAD){this._state=y$w.LOADING,this._instancingSupported=t.instancedArrays,ve$c(this,t);var i=this;this._model.readyPromise.otherwise((function(e){i._state=y$w.FAILED,i._readyPromise.reject(e)}))}var n=this._instancingSupported,r=this._model;if(r.imageBasedLightingFactor=this.imageBasedLightingFactor,r.lightColor=this.lightColor,r.luminanceAtZenith=this.luminanceAtZenith,r.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,r.specularEnvironmentMaps=this.specularEnvironmentMaps,r.update(e),r.ready&&this._state===y$w.LOADING){this._state=y$w.LOADED,this._ready=!0;var o=r.boundingSphere.radius+o$1p.magnitude(r.boundingSphere.center);return this._boundingSphere.radius+=o,this._modelCommands=q$y(r),H$D(this,n),void this._readyPromise.resolve(this)}if(this._state===y$w.LOADED){var a=e.mode!==this._mode,s=this.modelMatrix,l=!p$1d.equals(this._modelMatrix,s);if(a||l){this._mode=e.mode,p$1d.clone(s,this._modelMatrix);var u=p$1d.multiplyByTranslation(this._modelMatrix,this._center,this._rtcTransform);this._mode!==C$13.SCENE3D&&(u=m$17.basisTo2D(e.mapProjection,u,u)),p$1d.getTranslation(u,this._boundingSphere.center)}n&&this._dirty&&(this._dynamic=!0,this._dirty=!1,ge$c(this)),Te$b(r)&&H$D(this,n),!n&&(r.dirty||this._dirty||a||l)&&W$z(this),Ie$a(this),pe$f(this),le$j(this);var c=e.passes;if(c.render||c.pick)for(var h=e.commandList,d=this._drawCommands,f=d.length,p=0;p<f;++p)h.push(d[p])}}},w$u.prototype.isDestroyed=function(){return!1},w$u.prototype.destroy=function(){this._model=this._model&&this._model.destroy();var e=this._pickIds;if(e$2b(e))for(var t=e.length,i=0;i<t;++i)e[i].destroy();return i$10(this)},u$z._deprecationWarning=t$12,Object.defineProperties(u$z.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){var e=this._modelInstanceCollection._model;return e$2b(e)?e.trianglesLength:0}},geometryByteLength:{get:function(){var e=this._modelInstanceCollection._model;return e$2b(e)?e.geometryByteLength:0}},texturesByteLength:{get:function(){var e=this._modelInstanceCollection._model;return e$2b(e)?e.texturesByteLength:0}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._modelInstanceCollection.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var g$F=Uint32Array.BYTES_PER_ELEMENT,L$A=new Array(4),ie$h=new Array(4);function Se$8(e,t,i){var n=u$_(i,0);i=n;var r=new Uint8Array(t),o=new DataView(t);i+=g$F;var a=o.getUint32(i,!0);if(1!==a)throw new t$14("Only Instanced 3D Model version 1 is supported. Version "+a+" is not.");i+=g$F;var s=o.getUint32(i,!0);i+=g$F;var l=o.getUint32(i,!0);if(0===l)throw new t$14("featureTableJsonByteLength is zero, the feature table must be defined.");i+=g$F;var u=o.getUint32(i,!0);i+=g$F;var c=o.getUint32(i,!0);i+=g$F;var h=o.getUint32(i,!0);i+=g$F;var d=o.getUint32(i,!0);if(1!==d&&0!==d)throw new t$14("Only glTF format 0 (uri) or 1 (embedded) are supported. Format "+d+" is not.");var f=a$K(r,i+=g$F,l),p=JSON.parse(f);i+=l;var _=new Uint8Array(t,i,u);i+=u;var m,g,x=new o$B(p,_),v=x.getGlobalProperty("INSTANCES_LENGTH");if(x.featuresLength=v,!e$2b(v))throw new t$14("Feature table global property: INSTANCES_LENGTH must be defined");if(c>0){var y=a$K(r,i,c);m=JSON.parse(y),i+=c,h>0&&(g=new Uint8Array(t,i,h),g=new Uint8Array(g),i+=h)}e._batchTable=new h$D(e,v,m,g);var $,b=n+s-i;if(0===b)throw new t$14("glTF byte length is zero, i3dm must have a glTF to instance.");i%4==0?$=new Uint8Array(t,i,b):(u$z._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),$=new Uint8Array(r.subarray(i,i+b)));var T=e._tileset,C={instances:new Array(v),batchTable:e._batchTable,cull:!1,url:void 0,requestType:V$15.TILES3D,gltf:void 0,basePath:void 0,incrementallyLoadTextures:!1,upAxis:T._gltfUpAxis,forwardAxis:v$y.X,opaquePass:Le$s.CESIUM_3D_TILE,pickIdLoaded:Ne$9(e),imageBasedLightingFactor:T.imageBasedLightingFactor,lightColor:T.lightColor,luminanceAtZenith:T.luminanceAtZenith,sphericalHarmonicCoefficients:T.sphericalHarmonicCoefficients,specularEnvironmentMaps:T.specularEnvironmentMaps};if(0===d){var S=a$K($);S=S.replace(/[\s\0]+$/,""),C.url=e._resource.getDerivedResource({url:S})}else C.gltf=$,C.basePath=e._resource.clone();var w,E=x.getGlobalProperty("EAST_NORTH_UP"),P=x.getGlobalProperty("RTC_CENTER",S$12.FLOAT,3);e$2b(P)&&(w=o$1p.unpack(P));for(var A=C.instances,L=new o$1p,M=new Array(3),R=new o$1p,I=new o$1p,O=new o$1p,D=new p$1e,B=new n$13,N=new o$1p,F=new e$1X,U=new p$1d,z=0;z<v;z++){var G=x.getProperty("POSITION",S$12.FLOAT,3,z,L$A);if(!e$2b(G)){G=M;var V=x.getProperty("POSITION_QUANTIZED",S$12.UNSIGNED_SHORT,3,z,L$A);if(!e$2b(V))throw new t$14("Either POSITION or POSITION_QUANTIZED must be defined for each instance.");var k=x.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",S$12.FLOAT,3);if(!e$2b(k))throw new t$14("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");var W=x.getGlobalProperty("QUANTIZED_VOLUME_SCALE",S$12.FLOAT,3);if(!e$2b(W))throw new t$14("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");for(var H=0;H<3;H++)G[H]=V[H]/65535*W[H]+k[H]}o$1p.unpack(G,0,L),e$2b(w)&&o$1p.add(L,w,L),F.translation=L;var q=x.getProperty("NORMAL_UP",S$12.FLOAT,3,z,L$A),j=x.getProperty("NORMAL_RIGHT",S$12.FLOAT,3,z,ie$h),Y=!1;if(e$2b(q)){if(!e$2b(j))throw new t$14("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");o$1p.unpack(q,0,I),o$1p.unpack(j,0,R),Y=!0}else{var X=x.getProperty("NORMAL_UP_OCT32P",S$12.UNSIGNED_SHORT,2,z,L$A),K=x.getProperty("NORMAL_RIGHT_OCT32P",S$12.UNSIGNED_SHORT,2,z,ie$h);if(e$2b(X)){if(!e$2b(K))throw new t$14("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");t$10.octDecodeInRange(X[0],X[1],65535,I),t$10.octDecodeInRange(K[0],K[1],65535,R),Y=!0}else E?(m$17.eastNorthUpToFixedFrame(L,t$13.WGS84,U),p$1d.getMatrix3(U,D)):p$1e.clone(p$1e.IDENTITY,D)}Y&&(o$1p.cross(R,I,O),o$1p.normalize(O,O),p$1e.setColumn(D,0,R,D),p$1e.setColumn(D,1,I,D),p$1e.setColumn(D,2,O,D)),n$13.fromRotationMatrix(D,B),F.rotation=B,N=o$1p.fromElements(1,1,1,N);var Q=x.getProperty("SCALE",S$12.FLOAT,1,z);e$2b(Q)&&o$1p.multiplyByScalar(N,Q,N);var Z=x.getProperty("SCALE_NON_UNIFORM",S$12.FLOAT,3,z,L$A);e$2b(Z)&&(N.x*=Z[0],N.y*=Z[1],N.z*=Z[2]),F.scale=N;var J=x.getProperty("BATCH_ID",S$12.UNSIGNED_SHORT,1,z);e$2b(J)||(J=z),p$1d.fromTranslationRotationScale(F,U);var ee=U.clone();A[z]={modelMatrix:ee,batchId:J}}e._modelInstanceCollection=new w$u(C)}function Ue$a(e){var t=e.featuresLength;if(!e$2b(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$L(e,n);e._features=i}}u$z.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},u$z.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2b(e)||e<0||e>=t)throw new t$16("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return Ue$a(this),this._features[e]},u$z.prototype.applyDebugSettings=function(e,t){t=e?t:e$1U.WHITE,this._batchTable.setAllColor(t)},u$z.prototype.applyStyle=function(e){this._batchTable.applyStyle(e)},u$z.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._modelInstanceCollection.modelMatrix=this._tile.computedTransform,this._modelInstanceCollection.shadows=this._tileset.shadows,this._modelInstanceCollection.lightColor=this._tileset.lightColor,this._modelInstanceCollection.luminanceAtZenith=this._tileset.luminanceAtZenith,this._modelInstanceCollection.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._modelInstanceCollection.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._modelInstanceCollection.debugWireframe=this._tileset.debugWireframe;var n=this._modelInstanceCollection._model;if(e$2b(n)){var r=this._tileset.clippingPlanes;n.clippingPlanesOriginMatrix=this._tileset.clippingPlanesOriginMatrix,e$2b(r)&&this._tile.clippingPlanesDirty&&(n._clippingPlanes=r.enabled&&this._tile._isClipped?r:void 0),e$2b(r)&&e$2b(n._clippingPlanes)&&n._clippingPlanes!==r&&(n._clippingPlanes=r)}this._modelInstanceCollection.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&this._batchTable.addDerivedCommands(t,i,!1)},u$z.prototype.isDestroyed=function(){return!1},u$z.prototype.destroy=function(){return this._modelInstanceCollection=this._modelInstanceCollection&&this._modelInstanceCollection.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$10(this)};var e$F={ADD:0,REPLACE:1},f$D=Object.freeze(e$F),K$u={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function ie$g(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.arrayBuffer",e.arrayBuffer),this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=e$1U.clone(e$1U.DARKGRAY),this._highlightColor=e$1U.clone(e$1U.WHITE),this._pointSize=1,this._rtcCenter=void 0,this._quantizedVolumeScale=void 0,this._quantizedVolumeOffset=void 0,this._styleableShaderAttributes=void 0,this._isQuantized=!1,this._isOctEncoded16P=!1,this._isRGB565=!1,this._hasColors=!1,this._hasNormals=!1,this._hasBatchIds=!1,this._decodingState=K$u.READY,this._dequantizeInShader=!0,this._isQuantizedDraco=!1,this._isOctEncodedDraco=!1,this._quantizedRange=0,this._octEncodedRange=0,this.backFaceCulling=!1,this._backFaceCulling=!1,this.normalShading=!0,this._normalShading=!0,this._opaqueRenderState=void 0,this._translucentRenderState=void 0,this._mode=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._pointsLength=0,this._geometryByteLength=0,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._batchTableLoaded=e.batchTableLoaded,this._pickIdLoaded=e.pickIdLoaded,this._opaquePass=u$_(e.opaquePass,Le$s.OPAQUE),this._cull=u$_(e.cull,!0),this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=p$1d.clone(p$1d.IDENTITY),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.time=0,this.shadows=W$W.ENABLED,this._boundingSphere=void 0,this.clippingPlanes=void 0,this.isClipped=!1,this.clippingPlanesDirty=!1,this.clippingPlanesOriginMatrix=void 0,this.attenuation=!1,this._attenuation=!1,this.geometricError=0,this.geometricErrorScale=1,this.maximumAttenuation=this._pointSize,We$9(this,e)}Object.defineProperties(ie$g.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},color:{get:function(){return e$1U.clone(this._highlightColor)},set:function(e){this._highlightColor=e$1U.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(e$2b(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=i$1c.clone(e,this._boundingSphere)}}});var X$q=Uint32Array.BYTES_PER_ELEMENT;function We$9(e,t){var i=t.arrayBuffer,n=u$_(t.byteOffset,0),r=new Uint8Array(i),o=new DataView(i);n+=X$q;var a=o.getUint32(n,!0);if(1!==a)throw new t$14("Only Point Cloud tile version 1 is supported. Version "+a+" is not.");n+=X$q,n+=X$q;var s=o.getUint32(n,!0);if(0===s)throw new t$14("Feature table must have a byte length greater than zero");n+=X$q;var l=o.getUint32(n,!0);n+=X$q;var u=o.getUint32(n,!0);n+=X$q;var c=o.getUint32(n,!0),h=a$K(r,n+=X$q,s),d=JSON.parse(h);n+=s;var f,p,_=new Uint8Array(i,n,l);if(n+=l,u>0){var m=a$K(r,n,u);f=JSON.parse(m),n+=u,c>0&&(p=new Uint8Array(i,n,c),n+=c)}var g=new o$B(d,_),x=g.getGlobalProperty("POINTS_LENGTH");if(g.featuresLength=x,!e$2b(x))throw new t$14("Feature table global property: POINTS_LENGTH must be defined");var v=g.getGlobalProperty("RTC_CENTER",S$12.FLOAT,3);e$2b(v)&&(e._rtcCenter=o$1p.unpack(v));var y,$,b,T,C,S,w,E,P,A=!1,L=!1,M=!1,R=!1,I=!1,O=!1,D=!1,B=!1,N=e$2b(d.extensions)?d.extensions["3DTILES_draco_point_compression"]:void 0,F=e$2b(f)&&e$2b(f.extensions)?f.extensions["3DTILES_draco_point_compression"]:void 0;if(e$2b(F)&&(w=F.properties),e$2b(N)){S=N.properties;var U=N.byteOffset,z=N.byteLength;if(!e$2b(S)||!e$2b(U)||!e$2b(z))throw new t$14("Draco properties, byteOffset, and byteLength must be defined");C=l$R(_,U,U+z),A=e$2b(S.POSITION),L=e$2b(S.RGB)||e$2b(S.RGBA),M=e$2b(S.NORMAL),R=e$2b(S.BATCH_ID),O=e$2b(S.RGBA),e._decodingState=K$u.NEEDS_DECODE}if(e$2b(C)&&(E={buffer:C,featureTableProperties:S,batchTableProperties:w,properties:p$19(S,w),dequantizeInShader:e._dequantizeInShader}),!A)if(e$2b(d.POSITION))y=g.getPropertyArray("POSITION",S$12.FLOAT,3),A=!0;else if(e$2b(d.POSITION_QUANTIZED)){y=g.getPropertyArray("POSITION_QUANTIZED",S$12.UNSIGNED_SHORT,3),I=!0,A=!0;var G=g.getGlobalProperty("QUANTIZED_VOLUME_SCALE",S$12.FLOAT,3);if(!e$2b(G))throw new t$14("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");e._quantizedVolumeScale=o$1p.unpack(G),e._quantizedRange=65535;var V=g.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",S$12.FLOAT,3);if(!e$2b(V))throw new t$14("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");e._quantizedVolumeOffset=o$1p.unpack(V)}if(L||(e$2b(d.RGBA)?($=g.getPropertyArray("RGBA",S$12.UNSIGNED_BYTE,4),O=!0,L=!0):e$2b(d.RGB)?($=g.getPropertyArray("RGB",S$12.UNSIGNED_BYTE,3),L=!0):e$2b(d.RGB565)&&($=g.getPropertyArray("RGB565",S$12.UNSIGNED_SHORT,1),D=!0,L=!0)),M||(e$2b(d.NORMAL)?(b=g.getPropertyArray("NORMAL",S$12.FLOAT,3),M=!0):e$2b(d.NORMAL_OCT16P)&&(b=g.getPropertyArray("NORMAL_OCT16P",S$12.UNSIGNED_BYTE,2),B=!0,M=!0)),R||e$2b(d.BATCH_ID)&&(T=g.getPropertyArray("BATCH_ID",S$12.UNSIGNED_SHORT,1),R=!0),!A)throw new t$14("Either POSITION or POSITION_QUANTIZED must be defined.");if(e$2b(d.CONSTANT_RGBA)){var k=g.getGlobalProperty("CONSTANT_RGBA",S$12.UNSIGNED_BYTE,4);e._constantColor=e$1U.fromBytes(k[0],k[1],k[2],k[3],e._constantColor)}if(R){var W=g.getGlobalProperty("BATCH_LENGTH");if(!e$2b(W))throw new t$14("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");e$2b(p)&&(p=new Uint8Array(p)),e$2b(e._batchTableLoaded)&&e._batchTableLoaded(W,f,p)}!R&&e$2b(p)&&(P=h$D.getBinaryProperties(x,f,p)),e._parsedContent={positions:y,colors:$,normals:b,batchIds:T,styleableProperties:P,draco:E},e._pointsLength=x,e._isQuantized=I,e._isOctEncoded16P=B,e._isRGB565=D,e._isTranslucent=O,e._hasColors=L,e._hasNormals=M,e._hasBatchIds=R}var je$9=new o$1p,Je$4=new o$1p,Ke$6=new o$1p,le$i;function Xe$7(e){if(!e$2b(le$i)){e$2a.setRandomNumberSeed(0),le$i=new Array(e);for(var t=0;t<e;++t)le$i[t]=e$2a.nextRandomNumber()}return le$i}function $e$5(e){for(var t=e.length/3,i=Math.min(t,20),n=Xe$7(20),r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=o$1p.fromElements(r,r,r,je$9),s=o$1p.fromElements(o,o,o,Je$4),l=0;l<i;++l){var u=Math.floor(n[l]*t),c=o$1p.unpack(e,3*u,Ke$6);o$1p.minimumByComponent(a,c,a),o$1p.maximumByComponent(s,c,s)}var h=i$1c.fromCornerPoints(a,s);return h.radius+=e$2a.EPSILON2,h}function Ne$8(e,t){var i=S$12.fromTypedArray(e);return i===S$12.INT||i===S$12.UNSIGNED_INT||i===S$12.DOUBLE?(e$1$("Cast pnts property to floats",'Point cloud property "'+t+'" will be casted to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.'),new Float32Array(e)):e}var er$3=new e$29,rr$4=new e$29,tr$2=new e$1U,Be$c=0,fe$b=1,_e$b=2,ze$a=3,ar$2=4,ue$f=new p$1d;function ir$2(e,t){var i,n,r=t.context,o=e._parsedContent,a=e._pointsLength,s=o.positions,l=o.colors,u=o.normals,c=o.batchIds,h=o.styleableProperties,d=e$2b(h),f=e._isQuantized,p=e._isQuantizedDraco,_=e._isOctEncoded16P,m=e._isOctEncodedDraco,g=e._quantizedRange,x=e._octEncodedRange,v=e._isRGB565,y=e._isTranslucent,$=e._hasColors,b=e._hasNormals,T=e._hasBatchIds,C=[],S={};if(e._styleableShaderAttributes=S,d){var w=ar$2;for(var E in h)if(h.hasOwnProperty(E)){var P=h[E],A=Ne$8(P.typedArray,E);i=P.componentCount,n=S$12.fromTypedArray(A);var L=t$Y.createVertexBuffer({context:r,typedArray:A,usage:A$19.STATIC_DRAW});e._geometryByteLength+=L.sizeInBytes;var M={index:w,vertexBuffer:L,componentsPerAttribute:i,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0};C.push(M),S[E]={location:w,componentCount:i},++w}}var R,I,O,D=t$Y.createVertexBuffer({context:r,typedArray:s,usage:A$19.STATIC_DRAW});e._geometryByteLength+=D.sizeInBytes,$&&(R=t$Y.createVertexBuffer({context:r,typedArray:l,usage:A$19.STATIC_DRAW}),e._geometryByteLength+=R.sizeInBytes),b&&(I=t$Y.createVertexBuffer({context:r,typedArray:u,usage:A$19.STATIC_DRAW}),e._geometryByteLength+=I.sizeInBytes),T&&(c=Ne$8(c,"batchIds"),O=t$Y.createVertexBuffer({context:r,typedArray:c,usage:A$19.STATIC_DRAW}),e._geometryByteLength+=O.sizeInBytes);var B=[];if(n=f?S$12.UNSIGNED_SHORT:p?g<=255?S$12.UNSIGNED_BYTE:S$12.UNSIGNED_SHORT:S$12.FLOAT,B.push({index:Be$c,vertexBuffer:D,componentsPerAttribute:3,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(e._boundingSphere=f||p?i$1c.fromCornerPoints(o$1p.ZERO,e._quantizedVolumeScale):$e$5(s)),$)if(v)B.push({index:fe$b,vertexBuffer:R,componentsPerAttribute:1,componentDatatype:S$12.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{var N=y?4:3;B.push({index:fe$b,vertexBuffer:R,componentsPerAttribute:N,componentDatatype:S$12.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}b&&(_?(i=2,n=S$12.UNSIGNED_BYTE):m?(i=2,n=x<=255?S$12.UNSIGNED_BYTE:S$12.UNSIGNED_SHORT):(i=3,n=S$12.FLOAT),B.push({index:_e$b,vertexBuffer:I,componentsPerAttribute:i,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0})),T&&B.push({index:ze$a,vertexBuffer:O,componentsPerAttribute:1,componentDatatype:S$12.fromTypedArray(c),normalize:!1,offsetInBytes:0,strideInBytes:0}),d&&(B=B.concat(C));var F=new c$12({context:r,attributes:B}),U={depthTest:{enabled:!0}};e._opaquePass===Le$s.CESIUM_3D_TILE&&(U.stencilTest=u$N.setCesium3DTileBit(),U.stencilMask=u$N.CESIUM_3D_TILE_MASK),e._opaqueRenderState=d$1m.fromCache(U),e._translucentRenderState=d$1m.fromCache({depthTest:{enabled:!0},depthMask:!1,blending:Ee$r.ALPHA_BLEND}),e._drawCommand=new i$_({boundingVolume:new i$1c,cull:e._cull,modelMatrix:new p$1d,primitiveType:W$18.POINTS,vertexArray:F,count:a,shaderProgram:void 0,uniformMap:void 0,renderState:y?e._translucentRenderState:e._opaqueRenderState,pass:y?Le$s.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function nr$2(e,t){var i=t.context,n=e._isQuantized,r=e._isQuantizedDraco,o=e._isOctEncodedDraco,a={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){var n=er$3;if(n.x=e._attenuation?e.maximumAttenuation:e._pointSize,n.x*=t.pixelRatio,n.y=e.time,e._attenuation){var r,o=t.camera.frustum;r=t.mode===C$13.SCENE2D||o instanceof a$V?Number.POSITIVE_INFINITY:i.drawingBufferHeight/t.camera.frustum.sseDenominator,n.z=e.geometricError*e.geometricErrorScale,n.w=r}return n},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){var t=e.clippingPlanes;return e.isClipped?t.texture:i.defaultTexture},u_clippingPlanesEdgeStyle:function(){var t=e.clippingPlanes;if(!e$2b(t))return e$1U.TRANSPARENT;var i=e$1U.clone(t.edgeColor,tr$2);return i.alpha=t.edgeWidth,i},u_clippingPlanesMatrix:function(){var t=e.clippingPlanes;if(!e$2b(t))return p$1d.IDENTITY;var n=u$_(e.clippingPlanesOriginMatrix,e._modelMatrix);return p$1d.multiply(i.uniformState.view3D,n,ue$f),p$1d.multiply(ue$f,t.modelMatrix,ue$f)}};(n||r||o)&&(a=p$19(a,{u_quantizedVolumeScaleAndOctEncodedRange:function(){var t=rr$4;if(e$2b(e._quantizedVolumeScale)){var i=o$1p.clone(e._quantizedVolumeScale,t);o$1p.divideByScalar(i,e._quantizedRange,t)}return t.w=e._octEncodedRange,t}})),e$2b(e._uniformMapLoaded)&&(a=e._uniformMapLoaded(a)),e._drawCommand.uniformMap=a}var ve$b=["POSITION","COLOR","NORMAL","POSITION_ABSOLUTE"];function ge$b(e,t){for(var i=/czm_tiles3d_style_(\w+)/g,n=i.exec(e);null!==n;){var r=n[1];-1===t.indexOf(r)&&t.push(r),n=i.exec(e)}}function pe$e(e,t){for(var i=e.numberOfAttributes,n=0;n<i;++n){var r=e.getAttribute(n);if(r.index===t)return r}}function ye$9(e){for(var t=ve$b.length,i=0;i<t;++i){var n=ve$b[i],r="czm_tiles3d_style_"+n,o=n.toLowerCase();e=e.replace(new RegExp(r+"(\\W)","g"),o+"$1")}return e.replace("()","(vec3 position, vec3 position_absolute, vec4 color, vec3 normal)")}function or$1(e,t,i){var n,r,o,a,s,l,u=t.context,c=e$2b(i),h=e._isQuantized,d=e._isQuantizedDraco,f=e._isOctEncoded16P,p=e._isOctEncodedDraco,_=e._isRGB565,m=e._isTranslucent,g=e._hasColors,x=e._hasNormals,v=e._hasBatchIds,y=e._backFaceCulling,$=e._normalShading,b=e._drawCommand.vertexArray,T=e.clippingPlanes,C=e._attenuation,S=m;if(c){var w={translucent:!1};a=i.getColorShaderFunction("getColorFromStyle","czm_tiles3d_style_",w),s=i.getShowShaderFunction("getShowFromStyle","czm_tiles3d_style_",w),l=i.getPointSizeShaderFunction("getPointSizeFromStyle","czm_tiles3d_style_",w),e$2b(a)&&w.translucent&&(S=!0)}e._styleTranslucent=S;var E=e$2b(a),P=e$2b(s),A=e$2b(l),L=e.isClipped,M=[];E&&(ge$b(a,M),a=ye$9(a)),P&&(ge$b(s,M),s=ye$9(s)),A&&(ge$b(l,M),l=ye$9(l));var R=M.indexOf("COLOR")>=0,I=M.indexOf("NORMAL")>=0,O=M.filter((function(e){return-1===ve$b.indexOf(e)}));if(I&&!x)throw new t$14("Style references the NORMAL semantic but the point cloud does not have normals");var D=e._styleableShaderAttributes;for(r in D)if(D.hasOwnProperty(r)){o=D[r];var B=O.indexOf(r)>=0;pe$e(b,o.location).enabled=B}var N=g&&(!E||R);g&&(pe$e(b,fe$b).enabled=N);var F=x&&($||y||I);x&&(pe$e(b,_e$b).enabled=F);var U={a_position:Be$c};N&&(U.a_color=fe$b),F&&(U.a_normal=_e$b),v&&(U.a_batchId=ze$a);var z="",G=O.length;for(n=0;n<G;++n){if(!e$2b(o=D[r=O[n]]))throw new t$14('Style references a property "'+r+'" that does not exist or is not styleable.');var V=o.componentCount,k="czm_tiles3d_style_"+r;z+="attribute "+(1===V?"float":"vec"+V)+" "+k+"; \n",U[k]=o.location}nr$2(e,t);var W="attribute vec3 a_position; \nvarying vec4 v_color; \nuniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier; \nuniform vec4 u_constantColor; \nuniform vec4 u_highlightColor; \n";W+="float u_pointSize; \nfloat u_time; \n",C&&(W+="float u_geometricError; \nfloat u_depthMultiplier; \n"),W+=z,N&&(W+=m?"attribute vec4 a_color; \n":_?"attribute float a_color; \nconst float SHIFT_RIGHT_11 = 1.0 / 2048.0; \nconst float SHIFT_RIGHT_5 = 1.0 / 32.0; \nconst float SHIFT_LEFT_11 = 2048.0; \nconst float SHIFT_LEFT_5 = 32.0; \nconst float NORMALIZE_6 = 1.0 / 64.0; \nconst float NORMALIZE_5 = 1.0 / 32.0; \n":"attribute vec3 a_color; \n"),F&&(W+=f||p?"attribute vec2 a_normal; \n":"attribute vec3 a_normal; \n"),v&&(W+="attribute float a_batchId; \n"),(h||d||p)&&(W+="uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange; \n"),E&&(W+=a),P&&(W+=s),A&&(W+=l),W+="void main() \n{ \n u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x; \n u_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y; \n",C&&(W+=" u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z; \n u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w; \n"),W+=N?m?" vec4 color = a_color; \n":_?" float compressed = a_color; \n float r = floor(compressed * SHIFT_RIGHT_11); \n compressed -= r * SHIFT_LEFT_11; \n float g = floor(compressed * SHIFT_RIGHT_5); \n compressed -= g * SHIFT_LEFT_5; \n float b = compressed; \n vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5); \n vec4 color = vec4(rgb, 1.0); \n":" vec4 color = vec4(a_color, 1.0); \n":" vec4 color = u_constantColor; \n",W+=h||d?" vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz; \n":" vec3 position = a_position; \n",W+=" vec3 position_absolute = vec3(czm_model * vec4(position, 1.0)); \n",F?(W+=f?" vec3 normal = czm_octDecode(a_normal); \n":p?" vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy; \n":" vec3 normal = a_normal; \n",W+=" vec3 normalEC = czm_normal * normal; \n"):W+=" vec3 normal = vec3(1.0); \n",E&&(W+=" color = getColorFromStyle(position, position_absolute, color, normal); \n"),P&&(W+=" float show = float(getShowFromStyle(position, position_absolute, color, normal)); \n"),W+=A?" gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio; \n":C?" vec4 positionEC = czm_modelView * vec4(position, 1.0); \n float depth = -positionEC.z; \n gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize); \n":" gl_PointSize = u_pointSize; \n",W+=" color = color * u_highlightColor; \n",F&&$&&(W+=" float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); \n diffuseStrength = max(diffuseStrength, 0.4); \n color.xyz *= diffuseStrength * czm_lightColor; \n"),W+=" v_color = color; \n gl_Position = czm_modelViewProjection * vec4(position, 1.0); \n",F&&y&&(W+=" float visible = step(-normalEC.z, 0.0); \n gl_Position *= visible; \n gl_PointSize *= visible; \n"),P&&(W+=" gl_Position.w *= float(show); \n gl_PointSize *= float(show); \n"),W+="} \n";var H="varying vec4 v_color; \n";L&&(H+="uniform sampler2D u_clippingPlanes; \nuniform mat4 u_clippingPlanesMatrix; \nuniform vec4 u_clippingPlanesEdgeStyle; \n",H+="\n",H+=f$G(T,u),H+="\n"),H+="void main() \n{ \n gl_FragColor = czm_gammaCorrect(v_color); \n",L&&(H+=p$x("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),H+="} \n",e$2b(e._vertexShaderLoaded)&&(W=e._vertexShaderLoaded(W)),e$2b(e._fragmentShaderLoaded)&&(H=e._fragmentShaderLoaded(H));var q=e._drawCommand;e$2b(q.shaderProgram)&&q.shaderProgram.destroy(),q.shaderProgram=r$13.fromCache({context:u,vertexShaderSource:W,fragmentShaderSource:H,attributeLocations:U});try{q.shaderProgram._bind()}catch{throw new t$14("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function sr$2(e,t){if(e._decodingState===K$u.READY)return!1;if(e._decodingState===K$u.NEEDS_DECODE){var i=e._parsedContent,n=i.draco,r=r$A.decodePointCloud(n,t);e$2b(r)&&(e._decodingState=K$u.DECODING,r.then((function(t){e._decodingState=K$u.READY;var r=e$2b(t.POSITION)?t.POSITION.array:void 0,o=e$2b(t.RGB)?t.RGB.array:void 0,a=e$2b(t.RGBA)?t.RGBA.array:void 0,s=e$2b(t.NORMAL)?t.NORMAL.array:void 0,l=e$2b(t.BATCH_ID)?t.BATCH_ID.array:void 0,u=e$2b(r)&&e$2b(t.POSITION.data.quantization),c=e$2b(s)&&e$2b(t.NORMAL.data.quantization);if(u){var h=t.POSITION.data.quantization,d=h.range;e._quantizedVolumeScale=o$1p.fromElements(d,d,d),e._quantizedVolumeOffset=o$1p.unpack(h.minValues),e._quantizedRange=(1<<h.quantizationBits)-1,e._isQuantizedDraco=!0}c&&(e._octEncodedRange=(1<<t.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);var f=i.styleableProperties,p=n.batchTableProperties;for(var _ in p)if(p.hasOwnProperty(_)){var m=t[_];e$2b(f)||(f={}),f[_]={typedArray:m.array,componentCount:m.data.componentsPerAttribute}}i.positions=u$_(r,i.positions),i.colors=u$_(u$_(a,o),i.colors),i.normals=u$_(s,i.normals),i.batchIds=u$_(l,i.batchIds),i.styleableProperties=f})).otherwise((function(t){e._decodingState=K$u.FAILED,e._readyPromise.reject(t)})))}return!0}var cr$1=new e$29,lr$2=new o$1p;function a$u(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._pickId=void 0,this._batchTable=void 0,this._styleDirty=!1,this._features=void 0,this.featurePropertiesDirty=!1,this._pointCloud=new ie$g({arrayBuffer:n,byteOffset:r,cull:!1,opaquePass:Le$s.CESIUM_3D_TILE,vertexShaderLoaded:v$v(this),fragmentShaderLoaded:P$v(this),uniformMapLoaded:k$s(this),batchTableLoaded:x$B(this),pickIdLoaded:E$z(this)})}function v$v(e){return function(t){return e$2b(e._batchTable)?e._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(t):t}}function P$v(e){return function(t){return e$2b(e._batchTable)?e._batchTable.getFragmentShaderCallback(!1,void 0)(t):"uniform vec4 czm_pickColor;\n"+t}}function k$s(e){return function(t){return e$2b(e._batchTable)?e._batchTable.getUniformMapCallback()(t):p$19(t,{czm_pickColor:function(){return e._pickId.color}})}}function x$B(e){return function(t,i,n){e._batchTable=new h$D(e,t,i,n)}}function E$z(e){return function(){return e$2b(e._batchTable)?e._batchTable.getPickId():"czm_pickColor"}}function I$H(e){var t=e._tileset.pointCloudShading,i=e._tile.contentBoundingVolume.boundingSphere.volume(),n=e$2a.cbrt(i/e.pointsLength),r=e._tile.geometricError;return 0===r&&(r=e$2b(t)&&e$2b(t.baseResolution)?t.baseResolution:n),r}function B$t(e){var t=e.featuresLength;if(!e$2b(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$L(e,n);e._features=i}}ie$g.prototype.update=function(e){if(!sr$2(this,e.context)){var t=!1,i=!p$1d.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,i=!0),e$2b(this._drawCommand)||(ir$2(this,e),i=!0,t=!0,this._ready=!0,this._readyPromise.resolve(this),this._parsedContent=void 0),i){p$1d.clone(this.modelMatrix,this._modelMatrix);var n=this._drawCommand.modelMatrix;if(p$1d.clone(this._modelMatrix,n),e$2b(this._rtcCenter)&&p$1d.multiplyByTranslation(n,this._rtcCenter,n),e$2b(this._quantizedVolumeOffset)&&p$1d.multiplyByTranslation(n,this._quantizedVolumeOffset,n),e.mode!==C$13.SCENE3D){var r=e.mapProjection,o=p$1d.getColumn(n,3,cr$1);e$29.equals(o,e$29.UNIT_W)||m$17.basisTo2D(r,n,n)}var a=this._drawCommand.boundingVolume;if(i$1c.clone(this._boundingSphere,a),this._cull){var s=a.center;p$1d.multiplyByPoint(n,s,s);var l=p$1d.getScale(n,lr$2);a.radius*=o$1p.maximumComponent(l)}}this.clippingPlanesDirty&&(this.clippingPlanesDirty=!1,t=!0),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,t=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,t=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,t=!0),(this._style!==this.style||this.styleDirty)&&(this._style=this.style,this.styleDirty=!1,t=!0),t&&or$1(this,e,this._style),this._drawCommand.castShadows=W$W.castShadows(this.shadows),this._drawCommand.receiveShadows=W$W.receiveShadows(this.shadows);var u=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=u?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=u?Le$s.TRANSLUCENT:this._opaquePass;var c=e.commandList,h=e.passes;(h.render||h.pick)&&c.push(this._drawCommand)}},ie$g.prototype.isDestroyed=function(){return!1},ie$g.prototype.destroy=function(){var e=this._drawCommand;return e$2b(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),i$10(this)},Object.defineProperties(a$u.prototype,{featuresLength:{get:function(){return e$2b(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return this._pointCloud.pointsLength}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return this._pointCloud.geometryByteLength}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return e$2b(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._pointCloud.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}}),a$u.prototype.hasProperty=function(e,t){return!!e$2b(this._batchTable)&&this._batchTable.hasProperty(e,t)},a$u.prototype.getFeature=function(e){if(e$2b(this._batchTable)){var t=this.featuresLength;if(!e$2b(e)||e<0||e>=t)throw new t$16("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return B$t(this),this._features[e]}},a$u.prototype.applyDebugSettings=function(e,t){this._pointCloud.color=e?t:e$1U.WHITE},a$u.prototype.applyStyle=function(e){e$2b(this._batchTable)?this._batchTable.applyStyle(e):this._styleDirty=!0};var w$t=new o$Z;function t$t(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._readyPromise=o$1l.defer(),this.featurePropertiesDirty=!1,c$t(this,n,r)}function c$t(e,t,i){i=u$_(i,0);var n,r=a$K(new Uint8Array(t),i);try{n=JSON.parse(r)}catch{return void e._readyPromise.reject(new t$14("Invalid tile content."))}e._tileset.loadTileset(e._resource,n,e._tile),e._readyPromise.resolve(e)}function i$A(e,t,i,n,r){return function(){var o=document.createElement("canvas"),a=r+2*n;o.height=o.width=a;var s=o.getContext("2d");return s.clearRect(0,0,a,a),0!==n&&(s.beginPath(),s.arc(a/2,a/2,a/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=i,s.fill(),e<1&&(s.save(),s.globalCompositeOperation="destination-out",s.beginPath(),s.arc(a/2,a/2,r/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle="black",s.fill(),s.restore())),s.beginPath(),s.arc(a/2,a/2,r/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=t,s.fill(),o}}function i$z(e,t,i,n,r){this._content=e,this._billboard=i,this._label=n,this._polyline=r,this._batchId=t,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),s$r(this)}a$u.prototype.update=function(e,t){var i,n=this._pointCloud,r=u$_(e.pointCloudShading,w$t),o=this._tile,a=this._batchTable,s=t.mode,l=e.clippingPlanes;!e$2b(this._pickId)&&!e$2b(a)&&(this._pickId=t.context.createPickId({primitive:e,content:this})),e$2b(a)&&a.update(e,t),i=e$2b(o._contentBoundingVolume)?s===C$13.SCENE3D?o._contentBoundingVolume.boundingSphere:o._contentBoundingVolume2D.boundingSphere:s===C$13.SCENE3D?o._boundingVolume.boundingSphere:o._boundingVolume2D.boundingSphere;var u=this._styleDirty;this._styleDirty=!1,n.clippingPlanesOriginMatrix=e.clippingPlanesOriginMatrix,n.style=e$2b(a)?void 0:e.style,n.styleDirty=u,n.modelMatrix=o.computedTransform,n.time=e.timeSinceLoad,n.shadows=e.shadows,n.boundingSphere=i,n.clippingPlanes=l,n.isClipped=e$2b(l)&&l.enabled&&o._isClipped,n.clippingPlanesDirty=o.clippingPlanesDirty,n.attenuation=r.attenuation,n.backFaceCulling=r.backFaceCulling,n.normalShading=r.normalShading,n.geometricError=I$H(this),n.geometricErrorScale=r.geometricErrorScale,e$2b(r)&&e$2b(r.maximumAttenuation)?n.maximumAttenuation=r.maximumAttenuation:o.refine===f$D.ADD?n.maximumAttenuation=5:n.maximumAttenuation=e.maximumScreenSpaceError,n.update(t)},a$u.prototype.isDestroyed=function(){return!1},a$u.prototype.destroy=function(){return this._pickId=this._pickId&&this._pickId.destroy(),this._pointCloud=this._pointCloud&&this._pointCloud.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$10(this)},Object.defineProperties(t$t.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}}),t$t.prototype.hasProperty=function(e,t){return!1},t$t.prototype.getFeature=function(e){},t$t.prototype.applyDebugSettings=function(e,t){},t$t.prototype.applyStyle=function(e){},t$t.prototype.update=function(e,t){},t$t.prototype.isDestroyed=function(){return!1},t$t.prototype.destroy=function(){return i$10(this)};var m$v=new a$18;function s$r(e){var t=e._billboard;if(e$2b(e._billboardImage)&&e._billboardImage!==t.image)t.image=e._billboardImage;else if(!e$2b(e._billboardImage)){var i=u$_(e._color,i$z.defaultColor),n=u$_(e._pointOutlineColor,i$z.defaultPointOutlineColor),r=u$_(e._pointOutlineWidth,i$z.defaultPointOutlineWidth),o=u$_(e._pointSize,i$z.defaultPointSize),a=e._billboardColor,s=e._billboardOutlineColor,l=e._billboardOutlineWidth,u=e._billboardSize;if(!e$1U.equals(i,a)||!e$1U.equals(n,s)||r!==l||o!==u){e._billboardColor=e$1U.clone(i,e._billboardColor),e._billboardOutlineColor=e$1U.clone(n,e._billboardOutlineColor),e._billboardOutlineWidth=r,e._billboardSize=o;var c=i.alpha,h=i.toCssColorString(),d=n.toCssColorString(),f=JSON.stringify([h,o,d,r]);t.setImage(f,i$A(c,h,d,r,o))}}}function b$H(e){this._positions=e.positions,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._rectangle=e.rectangle,this._minHeight=e.minimumHeight,this._maxHeight=e.maximumHeight,this._billboardCollection=void 0,this._labelCollection=void 0,this._polylineCollection=void 0,this._verticesPromise=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._resolvedPromise=!1}function G$z(e,t){var i=e._rectangle,n=e._minHeight,r=e._maxHeight,o=2+h$18.packedLength+t$13.packedLength,a=new Float64Array(o),s=0;return a[s++]=n,a[s++]=r,h$18.pack(i,a,s),s+=h$18.packedLength,t$13.pack(t,a,s),a}Object.defineProperties(i$z.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=e$1U.clone(e,this._color),s$r(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,s$r(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=e$1U.clone(e,this._pointOutlineColor),s$r(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,s$r(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&e.alpha>0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){e$2b(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){var t=u$_(this._heightOffset,0),i=this._content.tileset.ellipsoid,n=i.cartesianToCartographic(this._billboard.position,m$v);n.height=n.height-t+e;var r=i.cartographicToCartesian(n);this._billboard.position=r,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],r],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=e$1U.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){var t=this._billboardImage!==e;this._billboardImage=e,t&&s$r(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){var e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}}),i$z.defaultColor=e$1U.WHITE,i$z.defaultPointOutlineColor=e$1U.BLACK,i$z.defaultPointOutlineWidth=0,i$z.defaultPointSize=8,i$z.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},i$z.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},i$z.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},i$z.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},i$z.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},i$z.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},i$z.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},Object.defineProperties(b$H.prototype,{pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){return this._billboardCollection.textureAtlas.texture.sizeInBytes+this._labelCollection._textureAtlas.texture.sizeInBytes}},readyPromise:{get:function(){return this._readyPromise.promise}}});var q$x=new i$V("createVectorTilePoints"),J$r=new o$1p;function K$t(e,t){if(!e$2b(e._billboardCollection)){var i;if(!e$2b(e._verticesPromise)){i=e._positions;var n=e._packedBuffer;e$2b(n)||(i=e._positions=l$R(i),e._batchIds=l$R(e._batchIds),n=e._packedBuffer=G$z(e,t));var r=[i.buffer,n.buffer],o={positions:i.buffer,packedBuffer:n.buffer},a=e._verticesPromise=q$x.scheduleTask(o,r);if(!e$2b(a))return;a.then((function(t){e._positions=new Float64Array(t.positions),e._ready=!0}))}if(e._ready&&!e$2b(e._billboardCollection)){i=e._positions;var s=e._batchTable,l=e._batchIds,u=e._billboardCollection=new w$N({batchTable:s}),c=e._labelCollection=new g$U({batchTable:s}),h=e._polylineCollection=new k$T;h._useHighlightColor=!0;for(var d=i.length/3,f=0;f<d;++f){var p=l[f],_=o$1p.unpack(i,3*f,J$r),m=u.add();m.position=_,m._batchIndex=p;var g=c.add();g.text=" ",g.position=_,g._batchIndex=p,h.add().positions=[o$1p.clone(_),o$1p.clone(_)]}e._positions=void 0,e._packedBuffer=void 0}}}function M$y(e,t){for(var i=e._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.show=!0,o.pointSize=i$z.defaultPointSize,o.color=i$z.defaultColor,o.pointOutlineColor=i$z.defaultPointOutlineColor,o.pointOutlineWidth=i$z.defaultPointOutlineWidth,o.labelColor=e$1U.WHITE,o.labelOutlineColor=e$1U.WHITE,o.labelOutlineWidth=1,o.font="30px sans-serif",o.labelStyle=R$Q.FILL,o.labelText=void 0,o.backgroundColor=new e$1U(.165,.165,.165,.8),o.backgroundPadding=new o$1o(7,5),o.backgroundEnabled=!1,o.scaleByDistance=void 0,o.translucencyByDistance=void 0,o.distanceDisplayCondition=void 0,o.heightOffset=0,o.anchorLineEnabled=!1,o.anchorLineColor=e$1U.WHITE,o.image=void 0,o.disableDepthTestDistance=0,o.horizontalOrigin=j$T.CENTER,o.verticalOrigin=S$O.CENTER,o.labelHorizontalOrigin=j$T.RIGHT,o.labelVerticalOrigin=S$O.BASELINE}}b$H.prototype.createFeatures=function(e,t){for(var i=this._billboardCollection,n=this._labelCollection,r=this._polylineCollection,o=this._batchIds,a=o.length,s=0;s<a;++s){var l=o[s],u=i.get(s),c=n.get(s),h=r.get(s);t[l]=new i$z(e,l,u,c,h)}},b$H.prototype.applyDebugSettings=function(e,t){e?(e$1U.clone(t,this._billboardCollection._highlightColor),e$1U.clone(t,this._labelCollection._highlightColor),e$1U.clone(t,this._polylineCollection._highlightColor)):(e$1U.clone(e$1U.WHITE,this._billboardCollection._highlightColor),e$1U.clone(e$1U.WHITE,this._labelCollection._highlightColor),e$1U.clone(e$1U.WHITE,this._polylineCollection._highlightColor))};var Q$u=new e$1U,U$u=new e$1U,X$p=new e$1U,Y$p=new e$1U,Z$t=new e$1U,$$v=new e$1U,g$E=new o$Y,C$z=new o$Y,k$r=new r$Y;function a$t(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=u$_(e.center,o$1p.ZERO),this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=_0x3b5200.BOTH}function U$t(e){var t=new Float64Array(3+o$1p.packedLength+t$13.packedLength+h$18.packedLength),i=0;return t[i++]=e._indices.BYTES_PER_ELEMENT,t[i++]=e._minimumHeight,t[i++]=e._maximumHeight,o$1p.pack(e._center,t,i),i+=o$1p.packedLength,t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,h$18.pack(e._rectangle,t,i),t}function F$z(e,t){for(var i=1,n=t[i++],r=e._boundingVolumes=new Array(n),o=0;o<n;++o)r[o]=y$Z.unpack(t,i),i+=y$Z.packedLength;for(var a=t[i++],s=e._batchedIndices=new Array(a),l=0;l<a;++l){var u=e$1U.unpack(t,i);i+=e$1U.packedLength;for(var c=t[i++],h=t[i++],d=t[i++],f=new Array(d),p=0;p<d;++p)f[p]=t[i++];s[l]=new c$w({color:u,offset:c,count:h,batchIds:f})}}b$H.prototype.applyStyle=function(e,t){if(e$2b(e))for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];if(e$2b(e.show)&&(o.show=e.show.evaluate(o)),e$2b(e.pointSize)&&(o.pointSize=e.pointSize.evaluate(o)),e$2b(e.color)&&(o.color=e.color.evaluateColor(o,Q$u)),e$2b(e.pointOutlineColor)&&(o.pointOutlineColor=e.pointOutlineColor.evaluateColor(o,U$u)),e$2b(e.pointOutlineWidth)&&(o.pointOutlineWidth=e.pointOutlineWidth.evaluate(o)),e$2b(e.labelColor)&&(o.labelColor=e.labelColor.evaluateColor(o,X$p)),e$2b(e.labelOutlineColor)&&(o.labelOutlineColor=e.labelOutlineColor.evaluateColor(o,Y$p)),e$2b(e.labelOutlineWidth)&&(o.labelOutlineWidth=e.labelOutlineWidth.evaluate(o)),e$2b(e.font)&&(o.font=e.font.evaluate(o)),e$2b(e.labelStyle)&&(o.labelStyle=e.labelStyle.evaluate(o)),e$2b(e.labelText)?o.labelText=e.labelText.evaluate(o):o.labelText=void 0,e$2b(e.backgroundColor)&&(o.backgroundColor=e.backgroundColor.evaluateColor(o,Z$t)),e$2b(e.backgroundPadding)&&(o.backgroundPadding=e.backgroundPadding.evaluate(o)),e$2b(e.backgroundEnabled)&&(o.backgroundEnabled=e.backgroundEnabled.evaluate(o)),e$2b(e.scaleByDistance)){var a=e.scaleByDistance.evaluate(o);g$E.near=a.x,g$E.nearValue=a.y,g$E.far=a.z,g$E.farValue=a.w,o.scaleByDistance=g$E}else o.scaleByDistance=void 0;if(e$2b(e.translucencyByDistance)){var s=e.translucencyByDistance.evaluate(o);C$z.near=s.x,C$z.nearValue=s.y,C$z.far=s.z,C$z.farValue=s.w,o.translucencyByDistance=C$z}else o.translucencyByDistance=void 0;if(e$2b(e.distanceDisplayCondition)){var l=e.distanceDisplayCondition.evaluate(o);k$r.near=l.x,k$r.far=l.y,o.distanceDisplayCondition=k$r}else o.distanceDisplayCondition=void 0;e$2b(e.heightOffset)&&(o.heightOffset=e.heightOffset.evaluate(o)),e$2b(e.anchorLineEnabled)&&(o.anchorLineEnabled=e.anchorLineEnabled.evaluate(o)),e$2b(e.anchorLineColor)&&(o.anchorLineColor=e.anchorLineColor.evaluateColor(o,$$v)),e$2b(e.image)?o.image=e.image.evaluate(o):o.image=void 0,e$2b(e.disableDepthTestDistance)&&(o.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(o)),e$2b(e.horizontalOrigin)&&(o.horizontalOrigin=e.horizontalOrigin.evaluate(o)),e$2b(e.verticalOrigin)&&(o.verticalOrigin=e.verticalOrigin.evaluate(o)),e$2b(e.labelHorizontalOrigin)&&(o.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(o)),e$2b(e.labelVerticalOrigin)&&(o.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(o))}else M$y(this,t)},b$H.prototype.update=function(e){K$t(this,e.mapProjection.ellipsoid),this._ready&&(this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e),this._resolvedPromise||(this._readyPromise.resolve(),this._resolvedPromise=!0))},b$H.prototype.isDestroyed=function(){return!1},b$H.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),i$10(this)},Object.defineProperties(a$t.prototype,{trianglesLength:{get:function(){return e$2b(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return e$2b(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}});var W$y=new i$V("createVectorTilePolygons"),z$v=new e$1U;function G$y(e){if(!e$2b(e._primitive)){if(!e$2b(e._verticesPromise)){var t=e._positions,i=e._counts,n=e._indexCounts,r=e._indices,o=e._transferrableBatchIds,a=e._batchTableColors,s=e._packedBuffer;if(!e$2b(a)){t=e._positions=l$R(e._positions),i=e._counts=l$R(e._counts),n=e._indexCounts=l$R(e._indexCounts),r=e._indices=l$R(e._indices),e._center=e._ellipsoid.cartographicToCartesian(h$18.center(e._rectangle)),o=e._transferrableBatchIds=new Uint32Array(e._batchIds),a=e._batchTableColors=new Uint32Array(o.length);for(var l=e._batchTable,u=a.length,c=0;c<u;++c){var h=l.getColor(c,z$v);a[c]=h.toRgba()}s=e._packedBuffer=U$t(e)}var d=[t.buffer,i.buffer,n.buffer,r.buffer,o.buffer,a.buffer,s.buffer],f={packedBuffer:s.buffer,positions:t.buffer,counts:i.buffer,indexCounts:n.buffer,indices:r.buffer,batchIds:o.buffer,batchTableColors:a.buffer},p=e._polygonMinimumHeights,_=e._polygonMaximumHeights;e$2b(p)&&e$2b(_)&&(p=l$R(p),_=l$R(_),d.push(p.buffer,_.buffer),f.minimumHeights=p,f.maximumHeights=_);var m=e._verticesPromise=W$y.scheduleTask(f,d);if(!e$2b(m))return;o$1l(m,(function(t){e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;var i=new Float64Array(t.packedBuffer),n=i[0];F$z(e,i),e._indices=2===ce$x.getSizeInBytes(n)?new Uint16Array(t.indices):new Uint32Array(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._batchedPositions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!e$2b(e._primitive)&&(e._primitive=new y$y({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}a$t.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},a$t.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},a$t.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},a$t.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},a$t.prototype.update=function(e){G$y(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},a$t.prototype.isDestroyed=function(){return!1},a$t.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$10(this)};var $$u="attribute vec4 currentPosition;\nattribute vec4 previousPosition;\nattribute vec4 nextPosition;\nattribute vec2 expandAndWidth;\nattribute float a_batchId;\n\nuniform mat4 u_modifiedModelView;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = u_modifiedModelView * currentPosition;\n vec4 prev = u_modifiedModelView * previousPosition;\n vec4 next = u_modifiedModelView * nextPosition;\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n\n#ifdef LOG_DEPTH\n czm_vertexLogDepth(czm_projection * p);\n#endif\n}\n";function h$C(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=e$1U.clone(e$1U.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._readyPromise=o$1l.defer(),this._verticesPromise=void 0}function re$m(e){var t=e._rectangle,i=e._minimumHeight,n=e._maximumHeight,r=e._ellipsoid,o=e._center,a=2+h$18.packedLength+t$13.packedLength+o$1p.packedLength,s=new Float64Array(a),l=0;return s[l++]=i,s[l++]=n,h$18.pack(t,s,l),l+=h$18.packedLength,t$13.pack(r,s,l),l+=t$13.packedLength,o$1p.pack(o,s,l),s}Object.defineProperties(h$C.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},readyPromise:{get:function(){return this._readyPromise.promise}}});var ae$d=new i$V("createVectorTilePolylines"),m$u={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function ne$l(e,t){if(!e$2b(e._va)){if(!e$2b(e._verticesPromise)){var i=e._positions,n=e._widths,r=e._counts,o=e._transferrableBatchIds,a=e._packedBuffer;e$2b(a)||(i=e._positions=l$R(i),n=e._widths=l$R(n),r=e._counts=l$R(r),o=e._transferrableBatchIds=l$R(e._batchIds),a=e._packedBuffer=re$m(e));var s=[i.buffer,n.buffer,r.buffer,o.buffer,a.buffer],l={positions:i.buffer,widths:n.buffer,counts:r.buffer,batchIds:o.buffer,packedBuffer:a.buffer},u=e._verticesPromise=ae$d.scheduleTask(l,s);if(!e$2b(u))return;o$1l(u,(function(t){e._currentPositions=new Float32Array(t.currentPositions),e._previousPositions=new Float32Array(t.previousPositions),e._nextPositions=new Float32Array(t.nextPositions),e._expandAndWidth=new Float32Array(t.expandAndWidth),e._vertexBatchIds=new Uint16Array(t.batchIds);var i=t.indexDatatype;e._indices=i===ce$x.UNSIGNED_SHORT?new Uint16Array(t.indices):new Uint32Array(t.indices),e._ready=!0}))}if(e._ready&&!e$2b(e._va)){var c=e._currentPositions,h=e._previousPositions,d=e._nextPositions,f=e._expandAndWidth,p=e._vertexBatchIds,_=e._indices,m=h.byteLength+c.byteLength+d.byteLength;m+=f.byteLength+p.byteLength+_.byteLength,e._trianglesLength=_.length/3,e._geometryByteLength=m;var g=t$Y.createVertexBuffer({context:t,typedArray:h,usage:A$19.STATIC_DRAW}),x=t$Y.createVertexBuffer({context:t,typedArray:c,usage:A$19.STATIC_DRAW}),v=t$Y.createVertexBuffer({context:t,typedArray:d,usage:A$19.STATIC_DRAW}),y=t$Y.createVertexBuffer({context:t,typedArray:f,usage:A$19.STATIC_DRAW}),$=t$Y.createVertexBuffer({context:t,typedArray:p,usage:A$19.STATIC_DRAW}),b=t$Y.createIndexBuffer({context:t,typedArray:_,usage:A$19.STATIC_DRAW,indexDatatype:2===_.BYTES_PER_ELEMENT?ce$x.UNSIGNED_SHORT:ce$x.UNSIGNED_INT}),T=[{index:m$u.previousPosition,vertexBuffer:g,componentDatatype:S$12.FLOAT,componentsPerAttribute:3},{index:m$u.currentPosition,vertexBuffer:x,componentDatatype:S$12.FLOAT,componentsPerAttribute:3},{index:m$u.nextPosition,vertexBuffer:v,componentDatatype:S$12.FLOAT,componentsPerAttribute:3},{index:m$u.expandAndWidth,vertexBuffer:y,componentDatatype:S$12.FLOAT,componentsPerAttribute:2},{index:m$u.a_batchId,vertexBuffer:$,componentDatatype:S$12.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new c$12({context:t,attributes:T,indexBuffer:b}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0,e._readyPromise.resolve()}}}var b$G=new p$1d,H$C=new o$1p;function oe$e(e,t){e$2b(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){var i=t.uniformState.view;return p$1d.clone(i,b$G),p$1d.multiplyByPoint(b$G,e._center,H$C),p$1d.setTranslation(b$G,H$C,b$G),b$G},u_highlightColor:function(){return e._highlightColor}})}function ie$f(e){if(!e$2b(e._rs)){e._rs=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:{enabled:!0,factor:-5,units:-5}})}}var de$d="uniform vec4 u_highlightColor; \nvoid main()\n{\n gl_FragColor = u_highlightColor;\n}\n";function fe$a(e,t){if(!e$2b(e._sp)){var i=e._batchTable,n=i.getVertexShaderCallback(!1,"a_batchId",void 0)($$u),r=i.getFragmentShaderCallback()(de$d,!1,void 0),o=new s$U({defines:["VECTOR_TILE",s$Y.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[Z$Y,n]}),a=new s$U({defines:["VECTOR_TILE"],sources:[r]});e._sp=r$13.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:m$u})}}function ue$e(e,t){if(!e$2b(e._command)){var i=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new i$_({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:i,boundingVolume:e._boundingVolume,pass:Le$s.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}function se$c(e,t){for(var i=e._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.show=!0,o.color=e$1U.WHITE}}h$C.prototype.createFeatures=function(e,t){for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=i[r];t[o]=new e$L(e,o)}},h$C.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var he$b=new e$1U,ce$f=e$1U.WHITE,_e$a=!0;function y$v(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._contentReadyPromise=void 0,this._readyPromise=o$1l.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,vt$3(this,n,r)}function ft$3(e){return function(t,i){e$2b(e._polygons)&&e._polygons.updateCommands(t,i)}}function dt$5(e,t){var i,n,r,o,a=u$_(e.POLYGONS_LENGTH,0),s=u$_(e.POLYLINES_LENGTH,0),l=u$_(e.POINTS_LENGTH,0);if(a>0&&e$2b(e.POLYGON_BATCH_IDS)){var u=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,u,a)}if(s>0&&e$2b(e.POLYLINE_BATCH_IDS)){var c=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,c,s)}if(l>0&&e$2b(e.POINT_BATCH_IDS)){var h=t.byteOffset+e.POINT_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,h,l)}var d=e$2b(i)||e$2b(n)||e$2b(r),f=a>0&&!e$2b(i)||s>0&&!e$2b(n)||l>0&&!e$2b(r);if(d&&f)throw new t$14("If one group of batch ids is defined, then all batch ids must be defined.");if(!e$2b(i)&&!e$2b(n)&&!e$2b(r)){var p=0;if(!e$2b(i)&&a>0)for(i=new Uint16Array(a),o=0;o<a;++o)i[o]=p++;if(!e$2b(n)&&s>0)for(n=new Uint16Array(s),o=0;o<s;++o)n[o]=p++;if(!e$2b(r)&&l>0)for(r=new Uint16Array(l),o=0;o<l;++o)r[o]=p++}return{polygons:i,polylines:n,points:r}}h$C.prototype.applyStyle=function(e,t){if(e$2b(e))for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.color=e$2b(e.color)?e.color.evaluateColor(o,he$b):ce$f,o.show=e$2b(e.show)?e.show.evaluate(o):_e$a}else se$c(this,t)},h$C.prototype.update=function(e){var t=e.context;if(ne$l(this,t),oe$e(this,t),fe$a(this,t),ie$f(this),this._ready){var i=e.passes;(i.render||i.pick)&&ue$e(this,e)}},h$C.prototype.isDestroyed=function(){return!1},h$C.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),i$10(this)},Object.defineProperties(y$v.prototype,{featuresLength:{get:function(){return e$2b(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return e$2b(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){var e=0;return e$2b(this._polygons)&&(e+=this._polygons.trianglesLength),e$2b(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){var e=0;return e$2b(this._polygons)&&(e+=this._polygons.geometryByteLength),e$2b(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return e$2b(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return e$2b(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var B$s=Uint16Array.BYTES_PER_ELEMENT,h$B=Uint32Array.BYTES_PER_ELEMENT;function vt$3(e,t,i){i=u$_(i,0);var n=new Uint8Array(t),r=new DataView(t);i+=h$B;var o=r.getUint32(i,!0);if(1!==o)throw new t$14("Only Vector tile version 1 is supported. Version "+o+" is not.");i+=h$B;var a=r.getUint32(i,!0);if(i+=h$B,0!==a){var s=r.getUint32(i,!0);if(i+=h$B,0===s)throw new t$14("Feature table must have a byte length greater than zero");var l=r.getUint32(i,!0);i+=h$B;var u=r.getUint32(i,!0);i+=h$B;var c=r.getUint32(i,!0);i+=h$B;var h=r.getUint32(i,!0);i+=h$B;var d=r.getUint32(i,!0);i+=h$B;var f=r.getUint32(i,!0);i+=h$B;var p=r.getUint32(i,!0),_=a$K(n,i+=h$B,s),m=JSON.parse(_);i+=s;var g,x,v=new Uint8Array(t,i,l);if(i+=l,u>0){var y=a$K(n,i,u);g=JSON.parse(y),i+=u,c>0&&(x=new Uint8Array(t,i,c),x=new Uint8Array(x),i+=c)}var $=u$_(m.POLYGONS_LENGTH,0),b=u$_(m.POLYLINES_LENGTH,0),T=u$_(m.POINTS_LENGTH,0),C=$+b+T,S=new h$D(e,C,g,x,ft$3(e));if(e._batchTable=S,0!==C){var w,E,P;if(!e$2b(m.REGION))throw new t$14("REGION is required in the feature table.");var A=m.REGION;w=h$18.unpack(A),E=A[4],P=A[5];var L,M=e._tile.computedTransform;e$2b(m.RTC_CENTER)?(L=o$1p.unpack(m.RTC_CENTER),p$1d.multiplyByPoint(M,L,L)):((L=h$18.center(w)).height=e$2a.lerp(E,P,.5),L=t$13.WGS84.cartographicToCartesian(L));var R=dt$5(m,v);if(i+=i%4,$>0){var I=new Uint32Array(t,i,h/h$B);i+=h;var O=new Uint16Array(t,i,d/B$s);i+=d;var D,B,N=v.byteOffset+m.POLYGON_COUNT.byteOffset,F=new Uint32Array(v.buffer,N,$),U=v.byteOffset+m.POLYGON_INDEX_COUNT.byteOffset,z=new Uint32Array(v.buffer,U,$);if(e$2b(m.POLYGON_MINIMUM_HEIGHTS)&&e$2b(m.POLYGON_MAXIMUM_HEIGHTS)){var G=v.byteOffset+m.POLYGON_MINIMUM_HEIGHTS.byteOffset;D=new Float32Array(v.buffer,G,$);var V=v.byteOffset+m.POLYGON_MAXIMUM_HEIGHTS.byteOffset;B=new Float32Array(v.buffer,V,$)}e._polygons=new a$t({positions:O,counts:F,indexCounts:z,indices:I,minimumHeight:E,maximumHeight:P,polygonMinimumHeights:D,polygonMaximumHeights:B,center:L,rectangle:w,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:S,batchIds:R.polygons,modelMatrix:M})}if(b>0){var k=new Uint16Array(t,i,f/B$s);i+=f;var W,H=v.byteOffset+m.POLYLINE_COUNT.byteOffset,q=new Uint32Array(v.buffer,H,b);if(e$2b(m.POLYLINE_WIDTHS)){var j=v.byteOffset+m.POLYLINE_WIDTHS.byteOffset;W=new Uint16Array(v.buffer,j,b)}else{W=new Uint16Array(b);for(var Y=0;Y<b;++Y)W[Y]=2}e._polylines=new h$C({positions:k,widths:W,counts:q,batchIds:R.polylines,minimumHeight:E,maximumHeight:P,center:L,rectangle:w,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:S})}if(T>0){var X=new Uint16Array(t,i,p/B$s);e._points=new b$H({positions:X,batchIds:R.points,minimumHeight:E,maximumHeight:P,rectangle:w,batchTable:S})}}}else e._readyPromise.resolve(e)}function k$q(e){var t=e.featuresLength;if(!e$2b(e._features)&&t>0){var i=new Array(t);e$2b(e._polygons)&&e._polygons.createFeatures(e,i),e$2b(e._polylines)&&e._polylines.createFeatures(e,i),e$2b(e._points)&&e._points.createFeatures(e,i),e._features=i}}y$v.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},y$v.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2b(e)||e<0||e>=t)throw new t$16("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return k$q(this),this._features[e]},y$v.prototype.applyDebugSettings=function(e,t){e$2b(this._polygons)&&this._polygons.applyDebugSettings(e,t),e$2b(this._polylines)&&this._polylines.applyDebugSettings(e,t),e$2b(this._points)&&this._points.applyDebugSettings(e,t)},y$v.prototype.applyStyle=function(e){k$q(this),e$2b(this._polygons)&&this._polygons.applyStyle(e,this._features),e$2b(this._polylines)&&this._polylines.applyStyle(e,this._features),e$2b(this._points)&&this._points.applyStyle(e,this._features)},y$v.prototype.update=function(e,t){var i=!0;if(e$2b(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),i=i&&this._polygons._ready),e$2b(this._polylines)&&(this._polylines.update(t),i=i&&this._polylines._ready),e$2b(this._points)&&(this._points.update(t),i=i&&this._points._ready),e$2b(this._batchTable)&&i&&this._batchTable.update(e,t),!e$2b(this._contentReadyPromise)){var n=e$2b(this._points)?this._points.readyPromise:void 0,r=e$2b(this._polygons)?this._polygons.readyPromise:void 0,o=e$2b(this._polylines)?this._polylines.readyPromise:void 0,a=this;this._contentReadyPromise=o$1l.all([n,r,o]).then((function(){a._readyPromise.resolve(a)}))}},y$v.prototype.isDestroyed=function(){return!1},y$v.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$10(this)};var i$y={b3dm:function(e,t,i,n,r){return new n$p(e,t,i,n,r)},pnts:function(e,t,i,n,r){return new a$u(e,t,i,n,r)},i3dm:function(e,t,i,n,r){return new u$z(e,t,i,n,r)},cmpt:function(e,t,i,n,r){return new i$B(e,t,i,n,r,i$y)},json:function(e,t,i,n,r){return new t$t(e,t,i,n,r)},geom:function(e,t,i,n,r){return new p$w(e,t,i,n,r)},vctr:function(e,t,i,n,r){return new y$v(e,t,i,n,r)}},e$E={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5},X$o=Object.freeze(e$E),e$D={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0},s$q=Object.freeze(e$D);function f$C(){}var u$y={stack:new r$R,stackMaximumLength:0};function d$F(e){return e._visible&&e._inRequestVolume}function m$t(e){return e.hasEmptyContent||e.hasTilesetContent}function l$F(e){return!m$t(e)&&e.contentUnloaded}function T$u(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:(t.hasEmptyContent,!0))}function g$D(e,t,i,n){for(var r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];s.updateVisibility(n),d$F(s)&&i.push(s)}}function C$y(e,t){(l$F(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function _$s(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function b$F(e){++e.statistics.visited}function x$A(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==Ae$u.OUTSIDE&&e._selectedTiles.push(t)}function W$x(){}function g$C(e){return e._visible&&e._inRequestVolume}f$C.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e._hasMixedContent=!1;var i=!0,n=e.root;if(n.updateVisibility(t),!d$F(n))return i;var r=u$y.stack;for(r.push(e.root);r.length>0;){u$y.stackMaximumLength=Math.max(u$y.stackMaximumLength,r.length);var o=r.pop(),a=o.refine===f$D.ADD,s=o.refine===f$D.REPLACE,l=T$u(e,o);l&&g$D(e,o,r,t),(a||s&&!l)&&(C$y(e,o),_$s(e,o,t),x$A(e,o,t),!m$t(o)&&!o.contentAvailable&&(i=!1)),b$F(e)}return u$y.stack.trim(u$y.stackMaximumLength),i};var k$p={stack:new r$R,stackMaximumLength:0},E$y={stack:new r$R,stackMaximumLength:0},S$s={stack:new r$R,stackMaximumLength:0},d$E={stack:new r$R,stackMaximumLength:0,ancestorStack:new r$R,ancestorStackMaximumLength:0},H$B=2;function I$G(e,t,i){V$n(e,t,e._maximumScreenSpaceError,e._maximumScreenSpaceError,i)}function B$r(e,t,i){V$n(e,t,Number.MAX_VALUE,e._maximumScreenSpaceError,i),w$s(e,t,i)}function z$u(e,t,i){V$n(e,t,Math.max(e.baseScreenSpaceError,e.maximumScreenSpaceError),e.maximumScreenSpaceError,i),w$s(e,t,i)}function C$x(e){return e._skipLevelOfDetail}function Z$s(e,t){e._emptyTiles.push(t)}function b$E(e,t,i){if(t.contentVisibility(i)!==Ae$u.OUTSIDE){var n=t.content;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,t.lastStyleTime=0,e._selectedTilesToStyle.push(t)):t._selectedFrame<i.frameNumber-1&&e._selectedTilesToStyle.push(t),t._selectedFrame=i.frameNumber,e._selectedTiles.push(t)}}function X$n(e,t,i){var n=S$s.stack;for(n.push(t);n.length>0;){S$s.stackMaximumLength=Math.max(S$s.stackMaximumLength,n.length);for(var r=n.pop().children,o=r.length,a=0;a<o;++a){var s=r[a];g$C(s)&&(s.contentAvailable?(P$u(e,s,i),F$y(e,s,i),b$E(e,s,i)):s._depth-t._depth<H$B&&n.push(s))}}}function D$v(e,t,i){if(C$x(e)){var n=t.contentAvailable?t:t._ancestorWithContentAvailable;e$2b(n)?n._shouldSelect=!0:X$n(e,t,i)}else t.contentAvailable&&b$E(e,t,i)}function j$x(e,t,i){++e._statistics.visited,t._visitedFrame=i.frameNumber}function F$y(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function G$x(e,t){e._maximumPriority.distance=Math.max(t._priorityHolder._distanceToCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t._priorityHolder._distanceToCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t._depth,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t._depth,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t._priorityHolder._foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t._priorityHolder._foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.reverseScreenSpaceError=Math.max(t._priorityReverseScreenSpaceError,e._maximumPriority.reverseScreenSpaceError),e._minimumPriority.reverseScreenSpaceError=Math.min(t._priorityReverseScreenSpaceError,e._minimumPriority.reverseScreenSpaceError)}function J$q(e,t,i){if(!e._cullRequestsWhileMoving)return!0;var n=t.boundingSphere,r=Math.max(2*n.radius,1),o=i.camera,a=0!==o.positionWCDeltaMagnitude?o.positionWCDeltaMagnitude:o.positionWCDeltaMagnitudeLastFrame;return e.cullRequestsWhileMovingMultiplier*a/r<1}function x$z(e,t,i){if(t._requestedFrame!==i.frameNumber&&(q$w(t)||t.contentExpired)&&J$q(e,t,i)){var n=i.camera.timeSinceMoved<e.foveatedTimeDelay;t.priorityDeferred&&n||(t._requestedFrame=i.frameNumber,e._requestedTiles.push(t))}}function N$o(e,t,i){t._updatedVisibilityFrame!==e._updatedVisibilityFrame&&(t.updateVisibility(i),t._updatedVisibilityFrame=e._updatedVisibilityFrame)}function K$s(e,t,i){for(var n=!1,r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];N$o(e,s,i),n=n||g$C(s)}return n}function Q$t(e,t,i){var n=t.parent;return!(!e$2b(n)||n.hasTilesetContent||n.refine!==f$D.ADD)&&t.getScreenSpaceError(i,!0)<=e._maximumScreenSpaceError}function O$o(e,t,i){if(N$o(e,t,i),g$C(t)){var n=t.children.length>0;if(t.hasTilesetContent&&n){var r=t.children[0];return O$o(e,r,i),void(t._visible=r._visible)}if(Q$t(e,t,i))return void(t._visible=!1);var o=t.refine===f$D.REPLACE,a=t._optimChildrenWithinParent===s$q.USE_OPTIMIZATION;if(o&&a&&n&&!K$s(e,t,i))return++e._statistics.numberOfTilesCulledWithChildrenUnion,void(t._visible=!1)}}function P$u(e,t,i){O$o(e,t,i),t.updateExpiration(),t._wasMinPriorityChild=!1,t._priorityHolder=t,G$x(e,t),t._shouldSelect=!1,t._finalResolution=!0}function Y$o(e,t){e._ancestorWithContent=void 0,e._ancestorWithContentAvailable=void 0;var i=e.parent;if(e$2b(i)){var n=!q$w(i)||i._requestedFrame===t.frameNumber;e._ancestorWithContent=n?i:i._ancestorWithContent,e._ancestorWithContentAvailable=i.contentAvailable?i:i._ancestorWithContentAvailable}}function L$z(e){return e.hasEmptyContent||e.hasTilesetContent}function q$w(e){return!L$z(e)&&e.contentUnloaded}function $$t(e,t){var i=t._ancestorWithContent;return!e.immediatelyLoadDesiredLevelOfDetail&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf||e$2b(i)&&t._screenSpaceError<i._screenSpaceError/e.skipScreenSpaceErrorFactor&&t._depth>i._depth+e.skipLevels)}function rr$3(e,t){return 0===t._distanceToCamera&&0===e._distanceToCamera?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera}function ar$1(e,t,i,n){var r,o=t.refine===f$D.REPLACE,a=t.children,s=a.length;for(r=0;r<s;++r)P$u(e,a[r],n);a.sort(rr$3);var l,u=!C$x(e)&&o&&!L$z(t),c=!0,h=!1,d=-1,f=Number.MAX_VALUE;for(r=0;r<s;++r)if(g$C(l=a[r])?(i.push(l),l._foveatedFactor<f&&(d=r,f=l._foveatedFactor),h=!0):(u||e.loadSiblings)&&(l._foveatedFactor<f&&(d=r,f=l._foveatedFactor),x$z(e,l,n),F$y(e,l,n)),u){var p;p=!!l._inRequestVolume&&(L$z(l)?nr$1(e,l,n):l.contentAvailable),c=c&&p}if(h||(c=!1),-1!==d&&!C$x(e)&&o){var _=a[d];_._wasMinPriorityChild=!0;var m=(t._wasMinPriorityChild||t===e.root)&&f<=t._priorityHolder._foveatedFactor?t._priorityHolder:t;for(m._foveatedFactor=Math.min(_._foveatedFactor,m._foveatedFactor),m._distanceToCamera=Math.min(_._distanceToCamera,m._distanceToCamera),r=0;r<s;++r)(l=a[r])._priorityHolder=m}return c}function er$2(e,t,i){return!C$x(e)||!e.immediatelyLoadDesiredLevelOfDetail&&(!e$2b(t._ancestorWithContent)||(0===t._screenSpaceError?t.parent._screenSpaceError>i:t._screenSpaceError>i))}function A$B(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:t._screenSpaceError>e._maximumScreenSpaceError)}function V$n(e,t,i,n,r){var o=k$p.stack;for(o.push(t);o.length>0;){k$p.stackMaximumLength=Math.max(k$p.stackMaximumLength,o.length);var a=o.pop();Y$o(a,r);var s=er$2(e,a,i),l=a.refine===f$D.ADD,u=a.refine===f$D.REPLACE,c=a.parent,h=!e$2b(c)||c._refines,d=!1;A$B(e,a)&&(d=ar$1(e,a,o,r)&&h);var f=!d&&h;L$z(a)?(Z$s(e,a),x$z(e,a,r),f&&D$v(e,a,r)):l?(D$v(e,a,r),x$z(e,a,r)):u&&(s?(x$z(e,a,r),f&&D$v(e,a,r)):f?(D$v(e,a,r),x$z(e,a,r)):$$t(e,a)&&x$z(e,a,r)),j$x(e,a,r),F$y(e,a,r),a._refines=d}}function nr$1(e,t,i){var n=!0,r=E$y.stack;for(r.push(t);r.length>0;){E$y.stackMaximumLength=Math.max(E$y.stackMaximumLength,r.length);var o=r.pop(),a=o.children,s=a.length,l=L$z(o)&&A$B(e,o);if(!l&&!o.contentAvailable&&(n=!1),P$u(e,o,i),g$C(o)||(x$z(e,o,i),F$y(e,o,i)),l)for(var u=0;u<s;++u){var c=a[u];r.push(c)}}return n}function w$s(e,t,i){var n,r=d$E.stack,o=d$E.ancestorStack;for(r.push(t);r.length>0||o.length>0;){if(d$E.stackMaximumLength=Math.max(d$E.stackMaximumLength,r.length),d$E.ancestorStackMaximumLength=Math.max(d$E.ancestorStackMaximumLength,o.length),o.length>0){var a=o.peek();if(a._stackLength===r.length){o.pop(),a!==n&&(a._finalResolution=!1),b$E(e,a,i);continue}}var s=r.pop();if(e$2b(s)){var l=s.refine===f$D.ADD,u=s._shouldSelect,c=s.children,h=c.length,d=A$B(e,s);if(u)if(l)b$E(e,s,i);else{if(s._selectionDepth=o.length,s._selectionDepth>0&&(e._hasMixedContent=!0),n=s,!d){b$E(e,s,i);continue}o.push(s),s._stackLength=r.length}if(d)for(var f=0;f<h;++f){var p=c[f];g$C(p)&&r.push(p)}}}}W$x.selectTiles=function(e,t){if(e._requestedTiles.length=0,!e.debugFreezeFrame){e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e._hasMixedContent=!1;var i=e.root;if(P$u(e,i,t),g$C(i)&&!(i.getScreenSpaceError(t,!0)<=e._maximumScreenSpaceError)){C$x(e)?e.immediatelyLoadDesiredLevelOfDetail?B$r(e,i,t):z$u(e,i,t):I$G(e,i,t),k$p.stack.trim(k$p.stackMaximumLength),E$y.stack.trim(E$y.stackMaximumLength),S$s.stack.trim(S$s.stackMaximumLength),d$E.stack.trim(d$E.stackMaximumLength),d$E.ancestorStack.trim(d$E.ancestorStackMaximumLength);for(var n=e._requestedTiles,r=n.length,o=0;o<r;++o)n[o].updatePriority()}}};var e$C={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},r$y=new Array(e$C.NUMBER_OF_PASSES);r$y[e$C.RENDER]=Object.freeze({traversal:W$x,isRender:!0,requestTiles:!0,ignoreCommands:!1}),r$y[e$C.PICK]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!1,ignoreCommands:!1}),r$y[e$C.SHADOW]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!1}),r$y[e$C.PRELOAD]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$C.PRELOAD_FLIGHT]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$C.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$C.MOST_DETAILED_PRELOAD]=Object.freeze({traversal:f$C,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$C.MOST_DETAILED_PICK]=Object.freeze({traversal:f$C,isRender:!1,requestTiles:!1,ignoreCommands:!1}),e$C.getPassOptions=function(e){return r$y[e]};var ue$d=Object.freeze(e$C);function t$s(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}function t$r(e,t){0===t&&(t=e$2a.EPSILON7),this._boundingSphere=new i$1c(e,t)}Object.defineProperties(t$s.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},batchTable:{get:function(){}}}),t$s.prototype.hasProperty=function(e,t){return!1},t$s.prototype.getFeature=function(e){},t$s.prototype.applyDebugSettings=function(e,t){},t$s.prototype.applyStyle=function(e){},t$s.prototype.update=function(e,t){},t$s.prototype.isDestroyed=function(){return!1},t$s.prototype.destroy=function(){return i$10(this)},Object.defineProperties(t$r.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}}),t$r.prototype.distanceToCamera=function(e){o$1q.defined("frameState",e);var t=this._boundingSphere;return Math.max(0,o$1p.distance(t.center,e.camera.positionWC)-t.radius)},t$r.prototype.intersectPlane=function(e){return o$1q.defined("plane",e),i$1c.intersectPlane(this._boundingSphere,e)},t$r.prototype.update=function(e,t){o$1p.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t},t$r.prototype.createDebugVolume=function(e){return o$1q.defined("color",e),new y$S({geometryInstances:new d$1o({geometry:new a$U({radius:this.radius}),id:"outline",modelMatrix:p$1d.fromTranslation(this.center,new p$1d.clone(p$1d.IDENTITY)),attributes:{color:o$16.fromColor(e)}}),appearance:new t$R({translucent:!1,flat:!0}),asynchronous:!1})};var b$D=new o$1p,h$A=new o$1p,I$F=new o$1p,S$r=new o$1p;function u$x(e,t,i){i=o$1p.cross(e,t,i);var n=o$1p.magnitude(i);return o$1p.multiplyByScalar(i,e$2a.EPSILON7/n,i)}function g$B(e,t){var i=o$1p.normalize(e,S$r);return u$x(e,o$1p.equalsEpsilon(i,o$1p.UNIT_X,e$2a.EPSILON6)?o$1p.UNIT_Y:o$1p.UNIT_X,t)}function B$q(e){var t=p$1e.getColumn(e,0,b$D),i=p$1e.getColumn(e,1,h$A),n=p$1e.getColumn(e,2,I$F),r=o$1p.equals(t,o$1p.ZERO),o=o$1p.equals(i,o$1p.ZERO),a=o$1p.equals(n,o$1p.ZERO);return r||o||a?r&&o&&a?(e[0]=e$2a.EPSILON7,e[4]=e$2a.EPSILON7,e[8]=e$2a.EPSILON7,e):(!r||o||a?r||!o||a?r||o||!a?r?o?a||(i=u$x(n,t=g$B(n,t),i)):n=u$x(i,t=g$B(i,t),n):n=u$x(i=g$B(t,i),t,n):n=u$x(i,t,n):i=u$x(t,n,i):t=u$x(i,n,t),p$1e.setColumn(e,0,t,e),p$1e.setColumn(e,1,i,e),p$1e.setColumn(e,2,n,e),e):e}function c$s(e,t){t=B$q(t),this._orientedBoundingBox=new y$Z(e,t),this._boundingSphere=i$1c.fromOrientedBoundingBox(this._orientedBoundingBox)}function c$r(e,t,i,n){this._tileset=e,this._header=i;var r=i.content;this.transform=e$2b(i.transform)?p$1d.unpack(i.transform):p$1d.clone(p$1d.IDENTITY);var o,a,s,l,u,c,h,d,f=e$2b(n)?n.computedTransform:e.modelMatrix,p=p$1d.multiply(f,this.transform,new p$1d),_=e$2b(n)?n._initialTransform:p$1d.IDENTITY;if(this._initialTransform=p$1d.multiply(_,this.transform,new p$1d),this.computedTransform=p,this._boundingVolume=this.createBoundingVolume(i.boundingVolume,p),this._boundingVolume2D=void 0,e$2b(r)&&e$2b(r.boundingVolume)&&(o=this.createBoundingVolume(r.boundingVolume,p)),this._contentBoundingVolume=o,this._contentBoundingVolume2D=void 0,e$2b(i.viewerRequestVolume)&&(a=this.createBoundingVolume(i.viewerRequestVolume,p)),this._viewerRequestVolume=a,this.geometricError=i.geometricError,this._geometricError=i.geometricError,e$2b(this._geometricError)||(this._geometricError=e$2b(n)?n.geometricError:e._geometricError,c$r._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale(),e$2b(i.refine)?(("replace"===i.refine||"add"===i.refine)&&c$r._deprecationWarning("lowercase-refine",'This tile uses a lowercase refine "'+i.refine+'". Instead use "'+i.refine.toUpperCase()+'".'),s="REPLACE"===i.refine.toUpperCase()?f$D.REPLACE:f$D.ADD):s=e$2b(n)?n.refine:f$D.REPLACE,this.refine=s,this.children=[],this.parent=n,t=t$11.createIfNeeded(t),e$2b(r)){var m=r.uri;e$2b(r.url)&&(c$r._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),m=r.url),u=!1,c=X$o.UNLOADED,(h=e.isSuperMapiServer?-1!==m.indexOf(".json")?-1===t.url.indexOf("/data/path")?t.getDerivedResource({url:"./data/path/"+m}):t.getDerivedResource({url:m}):-1===t.url.indexOf("/data/path")&&-1!==m.indexOf(".b3dm")?t.getDerivedResource({url:"./data/path/"+m}):t.getDerivedResource({url:m}):t.getDerivedResource({url:m})).url=h.url.replace(/\+/g,"%2B"),d=r$1a.getServerKey(h.getUrlComponent())}else l=new t$s(e,this),u=!0,c=X$o.READY;this._content=l,this._contentResource=h,this._contentState=c,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this._expiredContent=void 0,this._serverKey=d,this.hasEmptyContent=u,this.hasTilesetContent=!1,this.cacheNode=void 0;var g,x,v=i.expire;e$2b(v)&&(g=v.duration,e$2b(v.date)&&(x=a$15.fromIso8601(v.date))),this.expireDuration=g,this.expireDate=x,this.lastStyleTime=0,this._optimChildrenWithinParent=s$q.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.priorityDeferred=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._clippingPlanesState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=e$1U.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,this._priorityHolder=this,this._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new a$15,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}Object.defineProperties(c$s.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}}),c$s.prototype.distanceToCamera=function(e){return o$1q.defined("frameState",e),Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))},c$s.prototype.intersectPlane=function(e){return o$1q.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)},c$s.prototype.update=function(e,t){o$1p.clone(e,this._orientedBoundingBox.center),t=B$q(t),p$1e.clone(t,this._orientedBoundingBox.halfAxes),i$1c.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)},c$s.prototype.createDebugVolume=function(e){return o$1q.defined("color",e),new y$S({geometryInstances:new d$1o({geometry:new o$17({minimum:new o$1p(-1,-1,-1),maximum:new o$1p(1,1,1)}),id:"outline",modelMatrix:p$1d.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),attributes:{color:o$16.fromColor(e)}}),appearance:new t$R({translucent:!1,flat:!0}),asynchronous:!1})},c$r._deprecationWarning=t$12,Object.defineProperties(c$r.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return u$_(this._contentBoundingVolume,this._boundingVolume)}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},extras:{get:function(){return this._header.extras}},color:{get:function(){return e$2b(this._color)||(this._color=new e$1U),e$1U.clone(this._color)},set:function(e){this._color=e$1U.clone(e,this._color),this._colorDirty=!0}},contentAvailable:{get:function(){return this.contentReady&&!this.hasEmptyContent&&!this.hasTilesetContent||e$2b(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===X$o.READY}},contentUnloaded:{get:function(){return this._contentState===X$o.UNLOADED}},contentExpired:{get:function(){return this._contentState===X$o.EXPIRED}},contentFailed:{get:function(){return this._contentState===X$o.FAILED}},contentReadyToProcessPromise:{get:function(){if(e$2b(this._contentReadyToProcessPromise))return this._contentReadyToProcessPromise.promise}},contentReadyPromise:{get:function(){if(e$2b(this._contentReadyPromise))return this._contentReadyPromise.promise}},commandsLength:{get:function(){return this._commandsLength}}});var P$t=new o$1p;function Ce$9(e,t){var i=e._tileset,n=t.camera,r=e.boundingSphere,o=r.radius,a=o$1p.multiplyByScalar(n.directionWC,e._centerZDepth,P$t),s=o$1p.add(n.positionWC,a,P$t),l=o$1p.subtract(s,r.center,P$t);if(o$1p.magnitude(l)>o){var u=o$1p.normalize(l,P$t),c=o$1p.multiplyByScalar(u,o,P$t),h=o$1p.add(r.center,c,P$t),d=o$1p.subtract(h,n.positionWC,P$t),f=o$1p.normalize(d,P$t);e._foveatedFactor=1-Math.abs(o$1p.dot(n.directionWC,f))}else e._foveatedFactor=0;var p=e.refine===f$D.REPLACE,_=i._skipLevelOfDetail;if(p&&!_||!i.foveatedScreenSpaceError||1===i.foveatedConeSize||e._priorityProgressiveResolution&&p&&_||i._pass===ue$d.PRELOAD_FLIGHT||i._pass===ue$d.PRELOAD)return!1;var m=1-Math.cos(.5*n.frustum.fov),g=i.foveatedConeSize*m;if(e._foveatedFactor<=g)return!1;var x=m-g,v=e$2a.clamp((e._foveatedFactor-g)/x,0,1),y=i.foveatedInterpolationCallback(i.foveatedMinimumScreenSpaceErrorRelaxation,i.maximumScreenSpaceError,v),$=0===e._screenSpaceError&&e$2b(e.parent)?.5*e.parent._screenSpaceError:e._screenSpaceError;return i.maximumScreenSpaceError-y<=$}var X$m=new a$15;function Ee$c(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;var i=t._screenSpaceErrorProgressiveResolution>e._maximumScreenSpaceError;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;var n=t.parent,r=e._maximumScreenSpaceError,o=t._screenSpaceErrorProgressiveResolution<=r,a=e$2b(n)&&n._screenSpaceErrorProgressiveResolution>r;return o&&a&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}function be$d(e,t){var i=t.parent,n=e$2b(i)&&(!e._skipLevelOfDetail||0===t._screenSpaceError||i.hasTilesetContent)?i._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-n}function De$d(e){if(e$2b(e.expireDuration)){var t=a$15.now(X$m);a$15.addSeconds(t,e.expireDuration,t),e$2b(e.expireDate)?a$15.lessThan(e.expireDate,t)&&a$15.clone(t,e.expireDate):e.expireDate=a$15.clone(t)}}function Re$a(e,t){return function(i){e._contentState===X$o.PROCESSING?--t.statistics.numberOfTilesProcessing:--t.statistics.numberOfPendingRequests,e._contentState=X$o.FAILED,e._contentReadyPromise.reject(i),e._contentReadyToProcessPromise.reject(i)}}function Pe$8(e){return function(){return e._priority}}c$r.prototype.getScreenSpaceError=function(e,t,i){var n=this._tileset,r=u$_(i,1),o=e$2b(this.parent)?this.parent.geometricError:n._geometricError,a=t?o:this.geometricError;if(0===a)return 0;var s,l=e.camera,u=l.frustum,c=e.context,h=c.drawingBufferWidth,d=c.drawingBufferHeight*r;if(e.mode===C$13.SCENE2D||u instanceof a$V){e$2b(u._offCenterFrustum)&&(u=u._offCenterFrustum),s=a/(Math.max(u.top-u.bottom,u.right-u.left)/Math.max(h,d))}else{var f=Math.max(this._distanceToCamera,e$2a.EPSILON7);if(s=a*d/(f*l.frustum.sseDenominator),n.dynamicScreenSpaceError){var p=n._dynamicScreenSpaceErrorComputedDensity,_=n.dynamicScreenSpaceErrorFactor;s-=e$2a.fog(f,p)*_}}return s/=e.pixelRatio},c$r.prototype.updateVisibility=function(e){var t=this.parent,i=this._tileset,n=e$2b(t)?t.computedTransform:i.modelMatrix,r=e$2b(t)?t._visibilityPlaneMask:i$W.MASK_INDETERMINATE;this.updateTransform(n),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,i.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,r),this._visible=this._visibilityPlaneMask!==i$W.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=be$d(i,this),this._priorityProgressiveResolution=Ee$c(i,this),this.priorityDeferred=Ce$9(this,e)},c$r.prototype.updateExpiration=function(){if(e$2b(this.expireDate)&&this.contentReady&&!this.hasEmptyContent){var e=a$15.now(X$m);a$15.lessThan(this.expireDate,e)&&(this._contentState=X$o.EXPIRED,this._expiredContent=this._content)}},c$r.prototype.requestContent=function(){var e=this,t=this._tileset;if(this.hasEmptyContent)return!1;var i=this._contentResource.clone(),n=this.contentExpired;n&&i.setQueryParameters({expired:this.expireDate.toString()});var r=new r$1b({throttle:!0,throttleByServer:!0,type:V$15.TILES3D,priorityFunction:Pe$8(this),serverKey:this._serverKey});this._request=r,i.request=r;var o=i.fetchArrayBuffer();if(!e$2b(o))return!1;var a=this._contentState;this._contentState=X$o.LOADING,this._contentReadyToProcessPromise=o$1l.defer(),this._contentReadyPromise=o$1l.defer();var s=Re$a(this,t);return o.then((function(i){if(!e.isDestroyed()){var r,o=a$F(new Uint8Array(i)),a=i$y[o];return t._disableSkipLevelOfDetail=t._disableSkipLevelOfDetail||"vctr"===o||"geom"===o,e$2b(a)?r=a(t,e,e._contentResource,i,0):(r=i$y.json(t,e,e._contentResource,i,0),e.hasTilesetContent=!0),n&&(e.expireDate=void 0),e._content=r,e._contentState=X$o.PROCESSING,e._contentReadyToProcessPromise.resolve(r),r.readyPromise.then((function(t){e.isDestroyed()?s():(De$d(e),e._selectedFrame=0,e.lastStyleTime=0,a$15.now(e._loadTimestamp),e._contentState=X$o.READY,e._contentReadyPromise.resolve(t))}))}s()})).otherwise((function(i){if(r.state===W$1c.CANCELLED)return e._contentState=a,--t.statistics.numberOfPendingRequests,void++t.statistics.numberOfAttemptedRequests;s(i)})),!0},c$r.prototype.unloadContent=function(){this.hasEmptyContent||this.hasTilesetContent||(this._content=this._content&&this._content.destroy(),this._contentState=X$o.UNLOADED,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this.lastStyleTime=0,this.clippingPlanesDirty=0===this._clippingPlanesState,this._clippingPlanesState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var Q$s=new i$1c;function j$w(e,t){if(t.mode!==C$13.SCENE3D&&!e$2b(e._boundingVolume2D)){var i=e._boundingVolume.boundingSphere,n=i$1c.projectTo2D(i,t.mapProjection,Q$s);e._boundingVolume2D=new t$r(n.center,n.radius)}return t.mode!==C$13.SCENE3D?e._boundingVolume2D:e._boundingVolume}function Te$a(e,t){if(t.mode!==C$13.SCENE3D&&!e$2b(e._contentBoundingVolume2D)){var i=e._contentBoundingVolume.boundingSphere,n=i$1c.projectTo2D(i,t.mapProjection,Q$s);e._contentBoundingVolume2D=new t$r(n.center,n.radius)}return t.mode!==C$13.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}c$r.prototype.visibility=function(e,t){var i=e.cullingVolume,n=j$w(this,e),r=this._tileset,o=r.clippingPlanes;if(e$2b(o)&&o.enabled){var a=o.computeIntersectionWithBoundingVolume(n,r.clippingPlanesOriginMatrix);if(this._isClipped=a!==Ae$u.INSIDE,a===Ae$u.OUTSIDE)return i$W.MASK_OUTSIDE}return i.computeVisibilityWithPlaneMask(n,t)},c$r.prototype.contentVisibility=function(e){if(!e$2b(this._contentBoundingVolume))return Ae$u.INSIDE;if(this._visibilityPlaneMask===i$W.MASK_INSIDE)return Ae$u.INSIDE;var t=e.cullingVolume,i=Te$a(this,e),n=this._tileset,r=n.clippingPlanes;if(e$2b(r)&&r.enabled){var o=r.computeIntersectionWithBoundingVolume(i,n.clippingPlanesOriginMatrix);if(this._isClipped=o!==Ae$u.INSIDE,o===Ae$u.OUTSIDE)return Ae$u.OUTSIDE}return t.computeVisibility(i)},c$r.prototype.distanceToTile=function(e){return j$w(this,e).distanceToCamera(e)};var Be$b=new o$1p;c$r.prototype.distanceToTileCenter=function(e){var t=j$w(this,e).boundingVolume,i=o$1p.subtract(t.center,e.camera.positionWC,Be$b);return o$1p.dot(e.camera.directionWC,i)},c$r.prototype.insideViewerRequestVolume=function(e){var t=this._viewerRequestVolume;return!e$2b(t)||0===t.distanceToCamera(e)};var $$s=new p$1e,ee$l=new o$1p,we$9=new p$1e,te$g=new o$1p,re$l=new h$18,xe$a=new y$Z,K$r=new p$1d;function Le$d(e,t,i){var n=o$1p.fromElements(e[0],e[1],e[2],te$g),r=p$1e.fromArray(e,3,we$9);n=p$1d.multiplyByPoint(t,n,n);var o=p$1d.getMatrix3(t,$$s);return r=p$1e.multiply(o,r,r),e$2b(i)?(i.update(n,r),i):new c$s(n,r)}function qe$4(e,t,i,n){var r=h$18.unpack(e,0,re$l),o=e[4],a=e[5],s=y$Z.fromRectangle(r,o,a,t$13.WGS84,xe$a),l=s.center,u=s.halfAxes;t=p$1d.multiplyTransformation(t,p$1d.inverseTransformation(i,K$r),K$r),l=p$1d.multiplyByPoint(t,l,l);var c=p$1d.getMatrix3(t,$$s);return u=p$1e.multiply(c,u,u),e$2b(n)&&n instanceof c$s?(n.update(l,u),n):new c$s(l,u)}function Fe$b(e,t,i,n){return p$1d.equalsEpsilon(t,i,e$2a.EPSILON8)?e$2b(n)?n:new y$K({rectangle:h$18.unpack(e,0,re$l),minimumHeight:e[4],maximumHeight:e[5]}):qe$4(e,t,i,n)}function Ie$9(e,t,i){var n=o$1p.fromElements(e[0],e[1],e[2],te$g),r=e[3];n=p$1d.multiplyByPoint(t,n,n);var o=p$1d.getScale(t,ee$l);return r*=o$1p.maximumComponent(o),e$2b(i)?(i.update(n,r),i):new t$r(n,r)}function Oe$b(e,t,i,n){if(n.isRender){var r=e$2b(e._header.content)&&e$2b(e._header.content.boundingVolume),o=e.hasEmptyContent||e.hasTilesetContent,a=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!r;if(a){var s;s=e._finalResolution?o?e$1U.DARKGRAY:e$1U.WHITE:e$1U.YELLOW,e$2b(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(s)),e._debugBoundingVolume.update(i);var l=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");l.color=o$16.toValue(s,l.color)}else!a&&e$2b(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&r?(e$2b(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(e$1U.BLUE)),e._debugContentBoundingVolume.update(i)):!t.debugShowContentBoundingVolume&&e$2b(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&e$2b(e._viewerRequestVolume)?(e$2b(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(e$1U.YELLOW)),e._debugViewerRequestVolume.update(i)):!t.debugShowViewerRequestVolume&&e$2b(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());var u=t.debugColorizeTiles&&!e._debugColorizeTiles||e$2b(t._heatmap.tilePropertyName),c=!t.debugColorizeTiles&&e._debugColorizeTiles;u?(t._heatmap.colorize(e,i),e._debugColorizeTiles=!0,e.color=e._debugColor):c&&(e._debugColorizeTiles=!1,e.color=e$1U.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),c&&t.makeStyleDirty()}}function Ae$b(e,t,i){var n=e._content,r=e._expiredContent;if(e$2b(r)){if(!e.contentReady)return void r.update(t,i);e._expiredContent.destroy(),e._expiredContent=void 0}n.update(t,i)}function Me$d(e,t){var i=t.clippingPlanes,n=0;e$2b(i)&&e._isClipped&&i.enabled&&(n=i.clippingPlanesState),n!==e._clippingPlanesState&&(e._clippingPlanesState=n,e.clippingPlanesDirty=!0)}c$r.prototype.createBoundingVolume=function(e,t,i){if(!e$2b(e))throw new t$14("boundingVolume must be defined");if(e$2b(e.box))return Le$d(e.box,t,i);if(e$2b(e.region))return Fe$b(e.region,t,this._initialTransform,i);if(e$2b(e.sphere))return Ie$9(e.sphere,t,i);throw new t$14("boundingVolume must contain a sphere, region, or box")},c$r.prototype.updateTransform=function(e){e=u$_(e,p$1d.IDENTITY);var t=p$1d.multiply(e,this.transform,K$r);if(!p$1d.equals(t,this.computedTransform)){p$1d.clone(t,this.computedTransform);var i=this._header,n=this._header.content;this._boundingVolume=this.createBoundingVolume(i.boundingVolume,this.computedTransform,this._boundingVolume),e$2b(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(n.boundingVolume,this.computedTransform,this._contentBoundingVolume)),e$2b(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(i.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy()}},c$r.prototype.updateGeometricErrorScale=function(){var e=p$1d.getScale(this.computedTransform,ee$l),t=o$1p.maximumComponent(e);this.geometricError=this._geometricError*t},c$r.prototype.update=function(e,t,i){var n=t.commandList.length;Me$d(this,e),Oe$b(this,e,t,i),Ae$b(this,e,t),this._commandsLength=t.commandList.length-n,this.clippingPlanesDirty=!1};var ie$e=[];function ne$k(e,t,i){var n=e*Math.pow(10,t);return parseInt(n)*Math.pow(10,i)}function F$x(e,t,i){return Math.max(e$2a.normalize(e,t,i)-e$2a.EPSILON7,0)}c$r.prototype.process=function(e,t){var i=t.commandList;t.commandList=ie$e,this._content.update(e,t),ie$e.length=0,t.commandList=i},c$r.prototype.updatePriority=function(){var e=this.tileset,t=e.preferLeaves,i=e._minimumPriority,n=e._maximumPriority,r=Math.pow(10,8),o=Math.pow(10,9),a=Math.pow(10,10),s=F$x(this._depth,i.depth,n.depth);s=t?1-s:s;var l=ne$k(!e._skipLevelOfDetail&&this.refine===f$D.REPLACE?F$x(this._priorityHolder._distanceToCamera,i.distance,n.distance):F$x(this._priorityReverseScreenSpaceError,i.reverseScreenSpaceError,n.reverseScreenSpaceError),4,0),u=this._priorityProgressiveResolution?0:r,c=ne$k(F$x(this._priorityHolder._foveatedFactor,i.foveatedFactor,n.foveatedFactor),4,4),h=this.priorityDeferred?o:0,d=e._pass===ue$d.PRELOAD_FLIGHT?0:a;this._priority=s+l+u+c+h+d},c$r.prototype.isDestroyed=function(){return!1},c$r.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),i$10(this)};var I$E={},y$u=new o$1p;function e$B(){this._list=new h$P,this._sentinel=this._list.add(),this._trimTiles=!1}function a$s(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function f$B(e,t){return"_loadTimestamp"===t?a$15.toDate(e).getTime():e}function L$y(e,t){var i=e.tilePropertyName;if(e$2b(i)){var n=f$B(t[i],i);return e$2b(n)?(e._maximum=Math.max(n,e._maximum),e._minimum=Math.min(n,e._minimum),n):(e.tilePropertyName=void 0,n)}}I$E.checkChildrenWithinParent=function(e){o$1q.typeOf.object("tile",e);var t=e.children,i=t.length,n=e.boundingVolume;if(n instanceof c$s||n instanceof y$K){var r=n._orientedBoundingBox;e._optimChildrenWithinParent=s$q.USE_OPTIMIZATION;for(var o=0;o<i;++o){var a=t[o].boundingVolume;if(!(a instanceof c$s||a instanceof y$K)){e._optimChildrenWithinParent=s$q.SKIP_OPTIMIZATION;break}var s=a._orientedBoundingBox,l=o$1p.subtract(s.center,r.center,y$u),u=o$1p.magnitude(l);if(o$1p.divideByScalar(l,u,l),Math.abs(r.halfAxes[0]*l.x)+Math.abs(r.halfAxes[1]*l.y)+Math.abs(r.halfAxes[2]*l.z)+Math.abs(r.halfAxes[3]*l.x)+Math.abs(r.halfAxes[4]*l.y)+Math.abs(r.halfAxes[5]*l.z)+Math.abs(r.halfAxes[6]*l.x)+Math.abs(r.halfAxes[7]*l.y)+Math.abs(r.halfAxes[8]*l.z)<=Math.abs(s.halfAxes[0]*l.x)+Math.abs(s.halfAxes[1]*l.y)+Math.abs(s.halfAxes[2]*l.z)+Math.abs(s.halfAxes[3]*l.x)+Math.abs(s.halfAxes[4]*l.y)+Math.abs(s.halfAxes[5]*l.z)+Math.abs(s.halfAxes[6]*l.x)+Math.abs(s.halfAxes[7]*l.y)+Math.abs(s.halfAxes[8]*l.z)+u){e._optimChildrenWithinParent=s$q.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===s$q.USE_OPTIMIZATION},e$B.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)},e$B.prototype.touch=function(e){var t=e.cacheNode;e$2b(t)&&this._list.splice(this._sentinel,t)},e$B.prototype.add=function(e){e$2b(e.cacheNode)||(e.cacheNode=this._list.add(e))},e$B.prototype.unloadTile=function(e,t,i){var n=t.cacheNode;!e$2b(n)||(this._list.remove(n),t.cacheNode=void 0,i(e,t))},e$B.prototype.unloadTiles=function(e,t){var i=this._trimTiles;this._trimTiles=!1;for(var n=this._list,r=1024*e.maximumMemoryUsage*1024,o=this._sentinel,a=n.head;a!==o&&(e.totalMemoryUsageInBytes>r||i);){var s=a.item;a=a.next,this.unloadTile(e,s,t)}},e$B.prototype.trim=function(){this._trimTiles=!0},a$s.prototype.setReferenceMinimumMaximum=function(e,t,i){this._referenceMinimum[i]=f$B(e,i),this._referenceMaximum[i]=f$B(t,i)};var p$v=[new e$1U(.1,.1,.1,1),new e$1U(.153,.278,.878,1),new e$1U(.827,.231,.49,1),new e$1U(.827,.188,.22,1),new e$1U(1,.592,.259,1),new e$1U(1,.843,0,1)];function r$x(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.batchTableByteLength=0}function f$A(e,t,i,n){var r=t.innerContents,o=t.pointsLength,a=t.trianglesLength,s=t.featuresLength,l=t.geometryByteLength,u=t.texturesByteLength,c=t.batchTableByteLength;if(n?(e.numberOfFeaturesLoaded+=i?-s:s,e.numberOfPointsLoaded+=i?-o:o,e.geometryByteLength+=i?-l:l,e.texturesByteLength+=i?-u:u,e.batchTableByteLength+=i?-c:c):(e.numberOfFeaturesSelected+=i?-s:s,e.numberOfPointsSelected+=i?-o:o,e.numberOfTrianglesSelected+=i?-a:a),e$2b(r))for(var h=r.length,d=0;d<h;++d)f$A(e,r[d],i,n)}function p$u(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.url",e.url),this._url=void 0,this._basePath=void 0,this._root=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._extensionsUsed=void 0,this._gltfUpAxis=void 0,this._cache=new e$B,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._cullWithChildrenBounds=u$_(e.cullWithChildrenBounds,!0),this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new r$R,this._maximumScreenSpaceError=u$_(e.maximumScreenSpaceError,16),this._maximumMemoryUsage=u$_(e.maximumMemoryUsage,512),this._styleEngine=new e$1r,this._modelMatrix=e$2b(e.modelMatrix)?p$1d.clone(e.modelMatrix):p$1d.clone(p$1d.IDENTITY),this._statistics=new r$x,this._statisticsLast=new r$x,this._statisticsPerPass=new Array(ue$d.NUMBER_OF_PASSES);for(var t=0;t<ue$d.NUMBER_OF_PASSES;++t)this._statisticsPerPass[t]=new r$x;this._requestedTilesInFlight=[],this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,reverseScreenSpaceError:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,reverseScreenSpaceError:Number.MAX_VALUE},this._heatmap=new a$s(e.debugHeatmapTilePropertyName),this.cullRequestsWhileMoving=u$_(e.cullRequestsWhileMoving,!0),this._cullRequestsWhileMoving=!1,this._visibleViewport=4095,this.cullRequestsWhileMovingMultiplier=u$_(e.cullRequestsWhileMovingMultiplier,60),this.progressiveResolutionHeightFraction=e$2a.clamp(u$_(e.progressiveResolutionHeightFraction,.3),0,.5),this.preferLeaves=u$_(e.preferLeaves,!1),this._tilesLoaded=!1,this._initialTilesLoaded=!1,this._tileDebugLabels=void 0,this._readyPromise=o$1l.defer(),this._classificationType=e.classificationType,this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._initialClippingPlanesOriginMatrix=p$1d.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this.preloadWhenHidden=u$_(e.preloadWhenHidden,!1),this.preloadFlightDestinations=u$_(e.preloadFlightDestinations,!0),this._pass=void 0,this.dynamicScreenSpaceError=u$_(e.dynamicScreenSpaceError,!1),this.foveatedScreenSpaceError=u$_(e.foveatedScreenSpaceError,!0),this._foveatedConeSize=u$_(e.foveatedConeSize,.1),this._foveatedMinimumScreenSpaceErrorRelaxation=u$_(e.foveatedMinimumScreenSpaceErrorRelaxation,0),this.foveatedInterpolationCallback=u$_(e.foveatedInterpolationCallback,e$2a.lerp),this.foveatedTimeDelay=u$_(e.foveatedTimeDelay,.2),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorFactor=4,this.dynamicScreenSpaceErrorHeightFalloff=.25,this._dynamicScreenSpaceErrorComputedDensity=0,this.shadows=u$_(e.shadows,W$W.ENABLED),this.show=u$_(e.show,!0),this.colorBlendMode=L$I.HIGHLIGHT,this.colorBlendAmount=.5,this.pointCloudShading=new o$Z(e.pointCloudShading),this._pointCloudEyeDomeLighting=new m$U,this.loadProgress=new o$1h,this.allTilesLoaded=new o$1h,this.initialTilesLoaded=new o$1h,this.tileLoad=new o$1h,this.tileUnload=new o$1h,this.tileFailed=new o$1h,this.tileVisible=new o$1h,this.skipLevelOfDetail=u$_(e.skipLevelOfDetail,!1),this._skipLevelOfDetail=this.skipLevelOfDetail,this._disableSkipLevelOfDetail=!1,this.baseScreenSpaceError=u$_(e.baseScreenSpaceError,1024),this.skipScreenSpaceErrorFactor=u$_(e.skipScreenSpaceErrorFactor,16),this.skipLevels=u$_(e.skipLevels,1),this.immediatelyLoadDesiredLevelOfDetail=u$_(e.immediatelyLoadDesiredLevelOfDetail,!1),this.loadSiblings=u$_(e.loadSiblings,!1),this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._imageBasedLightingFactor=new o$1o(1,1),o$1o.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=u$_(e.luminanceAtZenith,.2),this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps,this.debugFreezeFrame=u$_(e.debugFreezeFrame,!1),this.debugColorizeTiles=u$_(e.debugColorizeTiles,!1),this.debugWireframe=u$_(e.debugWireframe,!1),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.debugShowContentBoundingVolume=u$_(e.debugShowContentBoundingVolume,!1),this.debugShowViewerRequestVolume=u$_(e.debugShowViewerRequestVolume,!1),this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=u$_(e.debugShowGeometricError,!1),this.debugShowRenderingStatistics=u$_(e.debugShowRenderingStatistics,!1),this.debugShowMemoryUsage=u$_(e.debugShowMemoryUsage,!1),this.debugShowUrl=u$_(e.debugShowUrl,!1),this.isSuperMapiServer=u$_(e.isSuperMapiServer,!1),this._swipeRegion=new e$29(0,0,1,1),this._swipeEnabled=!1;var i,n=this;o$1l(e.url).then((function(e){var t;return i=t$11.createIfNeeded(e),n._credits=i.credits,"json"===i.extension?t=i.getBaseUri(!0):i.isDataUri&&(t=""),n._url=i.url,n._basePath=t,p$u.loadJson(i)})).then((function(e){n._root=n.loadTileset(i,e);var t=e$2b(e.asset.gltfUpAxis)?v$y.fromName(e.asset.gltfUpAxis):v$y.Y,r=e.asset;n._asset=r,n._properties=e.properties,n._geometricError=e.geometricError,n._extensionsUsed=e.extensionsUsed,n._gltfUpAxis=t,n._extras=e.extras;var o=r.extras;if(e$2b(o)&&e$2b(o.supermap3d)&&e$2b(o.supermap3d.credits)){var a=o.supermap3d.credits,s=n._credits;e$2b(s)||(s=[],n._credits=s);for(var l=0;l<a.length;++l){var u=a[l];s.push(new r$T(u.html,u.showOnScreen))}}var c=n._root.createBoundingVolume(e.root.boundingVolume,p$1d.IDENTITY).boundingSphere.center,h=n._ellipsoid.cartesianToCartographic(c);e$2b(h)&&h.height>e$1E._defaultMinTerrainHeight&&(n._initialClippingPlanesOriginMatrix=m$17.eastNorthUpToFixedFrame(c)),n._clippingPlanesOriginMatrix=p$1d.clone(n._initialClippingPlanesOriginMatrix),n._readyPromise.resolve(n)})).otherwise((function(e){n._readyPromise.reject(e)}))}a$s.prototype.colorize=function(e,t){if(e$2b(this.tilePropertyName)&&e.contentAvailable&&e._selectedFrame===t.frameNumber){var i=L$y(this,e),n=this._previousMinimum,r=this._previousMaximum;if(n!==Number.MAX_VALUE&&r!==-Number.MAX_VALUE){var o=r-n+e$2a.EPSILON7,a=e$2a.clamp(i-n,0,o)/o*(p$v.length-1),s=Math.floor(a),l=Math.ceil(a),u=a-s,c=p$v[s],h=p$v[l],d=e$1U.clone(e$1U.WHITE);d.red=e$2a.lerp(c.red,h.red,u),d.green=e$2a.lerp(c.green,h.green,u),d.blue=e$2a.lerp(c.blue,h.blue,u),e._debugColor=d}}},a$s.prototype.resetMinimumMaximum=function(){var e=this.tilePropertyName;if(e$2b(e)){var t=this._referenceMinimum[e],i=this._referenceMaximum[e],n=e$2b(t)&&e$2b(i);this._previousMinimum=n?t:this._minimum,this._previousMaximum=n?i:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}},r$x.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0},r$x.prototype.incrementSelectionCounts=function(e){f$A(this,e,!1,!1)},r$x.prototype.incrementLoadCounts=function(e){f$A(this,e,!1,!0)},r$x.prototype.decrementLoadCounts=function(e){f$A(this,e,!0,!0)},r$x.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.selected=e.selected,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.batchTableByteLength=e.batchTableByteLength},Object.defineProperties(p$u.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){if(!this.ready)throw new t$16("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._asset}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){h$K.setOwner(e,this,"_clippingPlanes")}},properties:{get:function(){if(!this.ready)throw new t$16("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._properties}},ready:{get:function(){return e$2b(this._root)}},readyPromise:{get:function(){return this._readyPromise.promise}},tilesLoaded:{get:function(){return this._tilesLoaded}},url:{get:function(){return this._url}},basePath:{get:function(){return t$12("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("maximumScreenSpaceError",e,0),this._maximumScreenSpaceError=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMemoryUsage=e}},root:{get:function(){if(!this.ready)throw new t$16("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._root}},boundingSphere:{get:function(){if(!this.ready)throw new t$16("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=p$1d.clone(e,this._modelMatrix)}},swipeRegion:{get:function(){return new f$18(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2b(e)){if(!(e instanceof f$18))throw new t$16("swipeRegion must be a instance of BoundingRectangle.");e$29.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){if(e!==this._swipeEnabled){e||e$29.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e;var t=[];for(t.push(this.root);t.length>0;)for(var i=t.pop().children,n=i.length,r=0;r<n;++r)if(t.push(i[r]),e$2b(i[r]._content)){var o=i[r]._content._model;!e$2b(o)||(o._shouldRegenerateShaders=!0)}}}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){var e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return e$2b(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(p$1d.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):p$1d.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("foveatedConeSize",e,0),o$1q.typeOf.number.lessThanOrEquals("foveatedConeSize",e,1),this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,0),o$1q.typeOf.number.lessThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,this.maximumScreenSpaceError),this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){if(!this.ready)throw new t$16("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._extras}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o$1q.typeOf.object("imageBasedLightingFactor",e),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),o$1o.clone(e,this._imageBasedLightingFactor)}}}),p$u.loadJson=function(e){return t$11.createIfNeeded(e).fetchJson()},p$u.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},p$u.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},p$u.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()},p$u.prototype.loadTileset=function(e,t,i){var n=t.asset;if(!e$2b(n))throw new t$14("Tileset must have an asset property.");if("0.0"!==n.version&&"1.0"!==n.version)throw new t$14("The tileset must be 3D Tiles version 0.0 or 1.0.");var r=this._statistics,o=n.tilesetVersion;e$2b(o)&&(this._basePath+="?v="+o,e.setQueryParameters({v:o}));var a=new c$r(this,e,t.root,i);e$2b(i)&&(i.children.push(a),a._depth=i._depth+1);var s=[];for(s.push(a);s.length>0;){var l=s.pop();++r.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&l.refine===f$D.ADD;var u=l._header.children;if(e$2b(u))for(var c=u.length,h=0;h<c;++h){var d=new c$r(this,e,u[h],l);l.children.push(d),d._depth=l._depth+1,s.push(d)}this._cullWithChildrenBounds&&I$E.checkChildrenWithinParent(l)}return a};var j$v=new o$1p,Me$c=new a$18,Pe$7=new p$1d,Le$c=new o$1p,xe$9=new o$1p,De$c=new o$1p;function Oe$a(e,t){var i,n,r,o,a,s=t.camera,l=e._root,u=l.contentBoundingVolume;if(u instanceof y$K)i=o$1p.normalize(s.positionWC,j$v),n=s.directionWC,r=s.positionCartographic.height,o=u.minimumHeight,a=u.maximumHeight;else{var c=p$1d.inverseTransformation(l.computedTransform,Pe$7),h=t.mapProjection.ellipsoid,d=u.boundingVolume,f=p$1d.multiplyByPoint(c,d.center,Le$c);if(o$1p.magnitude(f)>h.minimumRadius){var p=a$18.fromCartesian(f,h,Me$c);i=o$1p.normalize(s.positionWC,j$v),n=s.directionWC,r=s.positionCartographic.height,o=0,a=2*p.height}else{var _=p$1d.multiplyByPoint(c,s.positionWC,xe$9);if(i=o$1p.UNIT_Z,n=p$1d.multiplyByPointAsVector(c,s.directionWC,De$c),n=o$1p.normalize(n,n),r=_.z,u instanceof c$s){var m=l._header.boundingVolume.box[11];o=f.z-m,a=f.z+m}else if(u instanceof t$r){var g=d.radius;o=f.z-g,a=f.z+g}}}var x=o+(a-o)*e.dynamicScreenSpaceErrorHeightFalloff,v=a,y=e$2a.clamp((r-x)/(v-x),0,1),$=1-Math.abs(o$1p.dot(n,i));$*=1-y;var b=e.dynamicScreenSpaceErrorDensity;b*=$,e._dynamicScreenSpaceErrorComputedDensity=b}function Re$9(e,t){if(!t.hasEmptyContent){var i=e._statistics,n=t.contentExpired;if(!t.requestContent())return void++i.numberOfAttemptedRequests;n&&(t.hasTilesetContent?He$5(e,t):(i.decrementLoadCounts(t.content),--i.numberOfTilesWithContentReady)),++i.numberOfPendingRequests,e._requestedTilesInFlight.push(t),t.contentReadyToProcessPromise.then(Ue$9(e,t)),t.contentReadyPromise.then(qe$3(e,t)).otherwise(Be$a(e,t))}}function Ae$a(e,t){return e._priority-t._priority}function Ve$a(e,t){for(var i=e._requestedTilesInFlight,n=0,r=i.length,o=0;o<r;++o){var a=i[o],s=t.frameNumber-a._touchedFrame>=1;a._contentState===X$o.LOADING?s?(a._request.cancel(),++n):n>0&&(i[o-n]=a):++n}i.length-=n}function Fe$a(e,t){var i=e._requestedTiles,n=i.length;i.sort(Ae$a);for(var r=0;r<n;++r)Re$9(e,i[r])}function Ue$9(e,t){return function(){e._processingQueue.push(t),--e._statistics.numberOfPendingRequests,++e._statistics.numberOfTilesProcessing}}function Be$a(e,t){return function(i){var n=t._contentResource.url,r=e$2b(i.message)?i.message:i.toString();e.tileFailed.numberOfListeners>0?e.tileFailed.raiseEvent({url:n,message:r}):(console.log("A 3D tile failed to load: "+n),console.log("Error: "+r))}}function qe$3(e,t){return function(){--e._statistics.numberOfTilesProcessing,t.hasTilesetContent||(e._statistics.incrementLoadCounts(t.content),++e._statistics.numberOfTilesWithContentReady,++e._statistics.numberOfLoadedTilesTotal,e._cache.add(t)),e.tileLoad.raiseEvent(t)}}function Ne$7(e){for(var t=e._processingQueue,i=t.length,n=0,r=0;r<i;++r){var o=t[r];o._contentState===X$o.PROCESSING?n>0&&(t[r-n]=o):++n}t.length-=n}function Ie$8(e,t){Ne$7(e);for(var i=e._processingQueue,n=i.length,r=0;r<n;++r)i[r].process(e,t)}p$u.prototype.postPassesUpdate=function(e){!this.ready||(Ve$a(this,e),Ge$6(this,e),this._cache.unloadTiles(this,K$q))},p$u.prototype.prePassesUpdate=function(e){if(this.ready){Ie$8(this,e);var t=this._clippingPlanes;this._clippingPlanesOriginMatrixDirty=!0,e$2b(t)&&t.enabled&&t.update(e),e$2b(this._loadTimestamp)||(this._loadTimestamp=a$15.clone(e.time)),this._timeSinceLoad=Math.max(1e3*a$15.secondsDifference(e.time,this._loadTimestamp),0),this._skipLevelOfDetail=this.skipLevelOfDetail&&!e$2b(this._classificationType)&&!this._disableSkipLevelOfDetail&&!this._allTilesAdditive,this.dynamicScreenSpaceError&&Oe$a(this,e),e.newFrame&&this._cache.reset()}};var D$u=new o$1p,ke$6={maximumFractionDigits:3};function Q$r(e){var t=e/1048576;return t<1?t.toLocaleString(void 0,ke$6):Math.round(t).toLocaleString()}function V$m(e){var t=e.boundingVolume.boundingVolume,i=t.halfAxes,n=t.radius,r=o$1p.clone(t.center,D$u);if(e$2b(i))r.x+=.75*(i[0]+i[3]+i[6]),r.y+=.75*(i[1]+i[4]+i[7]),r.z+=.75*(i[2]+i[5]+i[8]);else if(e$2b(n)){var o=o$1p.normalize(t.center,D$u);o=o$1p.multiplyByScalar(o,.75*n,D$u),r=o$1p.add(o,t.center,D$u)}return r}function F$w(e,t,i){var n="",r=0;(t.debugShowGeometricError&&(n+="\nGeometric error: "+e.geometricError,r++),t.debugShowRenderingStatistics)&&(n+="\nCommands: "+e.commandsLength,r++,e.content.pointsLength>0&&(n+="\nPoints: "+e.content.pointsLength,r++),e.content.trianglesLength>0&&(n+="\nTriangles: "+e.content.trianglesLength,r++),n+="\nFeatures: "+e.content.featuresLength,r++);t.debugShowMemoryUsage&&(n+="\nTexture Memory: "+Q$r(e.content.texturesByteLength),n+="\nGeometry Memory: "+Q$r(e.content.geometryByteLength),r+=2),t.debugShowUrl&&(n+="\nUrl: "+e._header.content.uri,r++);var o={text:n.substring(1),position:i,font:19-r+"px sans-serif",showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(o)}function We$8(e,t){var i,n,r=e._selectedTiles,o=r.length,a=e._emptyTiles,s=a.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(e$2b(e.debugPickedTile)){var l=e$2b(e.debugPickPosition)?e.debugPickPosition:V$m(e.debugPickedTile);F$w(e.debugPickedTile,e,l).pixelOffset=new o$1o(15,-15)}}else{for(i=0;i<o;++i)F$w(n=r[i],e,V$m(n));for(i=0;i<s;++i)(n=a[i]).hasTilesetContent&&F$w(n,e,V$m(n))}e._tileDebugLabels.update(t)}function ze$9(e,t,i){e._styleEngine.applyStyle(e,i);var n,r,o=i.isRender,a=e._statistics,s=t.commandList,l=s.length,u=e._selectedTiles,c=u.length,h=e._emptyTiles,d=h.length,f=e.tileVisible,p=e._skipLevelOfDetail&&e._hasMixedContent&&t.context.stencilBuffer&&c>0;e._backfaceCommands.length=0,p&&(e$2b(e._stencilClearCommand)||(e._stencilClearCommand=new t$X({stencil:0,pass:Le$s.CESIUM_3D_TILE,renderState:d$1m.fromCache({stencilMask:u$N.SKIP_LOD_MASK})})),s.push(e._stencilClearCommand));var _=s.length;for(n=0;n<c;++n)r=u[n],o&&f.raiseEvent(r),r.update(e,t,i),a.incrementSelectionCounts(r.content),++a.selected;for(n=0;n<d;++n)(r=h[n]).update(e,t,i);var m=s.length-_;if(e._backfaceCommands.trim(),p){var g=e._backfaceCommands.values,x=g.length;for(s.length+=x,n=m-1;n>=0;--n)s[_+x+n]=s[_+n];for(n=0;n<x;++n)s[_+n]=g[n]}m=s.length-l,a.numberOfCommands=m,o&&e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&m>0&&e._pointCloudEyeDomeLighting.update(t,l,e.pointCloudShading),o&&(e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(e$2b(e._tileDebugLabels)||(e._tileDebugLabels=new g$U),We$8(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var Y$n=[];function He$5(e,t){var i=t,n=Y$n;for(n.push(t);n.length>0;){for(var r=(t=n.pop()).children,o=r.length,a=0;a<o;++a)n.push(r[a]);t!==i&&(Xe$6(e,t),--e._statistics.numberOfTilesTotal)}i.children=[]}function K$q(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function Xe$6(e,t){e._cache.unloadTile(e,t,K$q),t.destroy()}function Ge$6(e,t){var i=e._statistics,n=e._statisticsLast,r=i.numberOfPendingRequests,o=i.numberOfTilesProcessing,a=n.numberOfPendingRequests,s=n.numberOfTilesProcessing;r$x.clone(i,n);var l=r!==a||o!==s;l&&t.afterRender.push((function(){e.loadProgress.raiseEvent(r,o)})),e._tilesLoaded=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests,l&&e._tilesLoaded&&(t.afterRender.push((function(){e.allTilesLoaded.raiseEvent()})),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push((function(){e.initialTilesLoaded.raiseEvent()}))))}function je$8(e){e._heatmap.resetMinimumMaximum(),e._minimumPriority.depth=Number.MAX_VALUE,e._maximumPriority.depth=-Number.MAX_VALUE,e._minimumPriority.foveatedFactor=Number.MAX_VALUE,e._maximumPriority.foveatedFactor=-Number.MAX_VALUE,e._minimumPriority.distance=Number.MAX_VALUE,e._maximumPriority.distance=-Number.MAX_VALUE,e._minimumPriority.reverseScreenSpaceError=Number.MAX_VALUE,e._maximumPriority.reverseScreenSpaceError=-Number.MAX_VALUE}function Qe$5(e,t){(t.frameNumber!==e._updatedModelMatrixFrame||!e$2b(e._previousModelMatrix))&&(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!p$1d.equals(e.modelMatrix,e._previousModelMatrix),e._previousModelMatrix=p$1d.clone(e.modelMatrix,e._previousModelMatrix))}function Ye$6(e,t,i,n){if(t.mode===C$13.MORPHING||!e.ready)return!1;var r=e._statistics;r.clear();var o=n.isRender;++e._updatedVisibilityFrame,je$8(e),Qe$5(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;var a=n.traversal.selectTiles(e,t),s=t.context;if(n.requestTiles&&s.memorySize<s.memoryThresholdValue&&Fe$a(e),ze$9(e,t,n),r$x.clone(r,i),o){var l=e._credits;if(e$2b(l)&&0!==r.selected)for(var u=l.length,c=0;c<u;++c)t.creditDisplay.addCredit(l[c])}return a}p$u.prototype.trimLoadedTiles=function(){this._cache.trim()},p$u.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;this.frameState=e,this.updateForPass(e,e.tilesetPassState)},p$u.prototype.updateForPass=function(e,t){o$1q.typeOf.object("frameState",e),o$1q.typeOf.object("tilesetPassState",t);var i=t.pass;if((i!==ue$d.PRELOAD||this.preloadWhenHidden&&!this.show)&&(i!==ue$d.PRELOAD_FLIGHT||this.preloadFlightDestinations&&(this.show||this.preloadWhenHidden))&&(i!==ue$d.REQUEST_RENDER_MODE_DEFER_CHECK||!(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))){var n=e.commandList,r=e.camera,o=e.cullingVolume;t.ready=!1;var a=ue$d.getPassOptions(i),s=a.ignoreCommands,l=u$_(t.commandList,n),u=l.length;e.commandList=l,e.camera=u$_(t.camera,r),e.cullingVolume=u$_(t.cullingVolume,o);var c=this._statisticsPerPass[i];(this.show||s)&&(this._pass=i,t.ready=Ye$6(this,e,c,a)),s&&(l.length=u),e.commandList=n,e.camera=r,e.cullingVolume=o}},p$u.prototype.hasExtension=function(e){return!!e$2b(this._extensionsUsed)&&this._extensionsUsed.indexOf(e)>-1},p$u.prototype.isDestroyed=function(){return!1},p$u.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),e$2b(this._root)){var e=Y$n;for(e.push(this._root);e.length>0;){var t=e.pop();t.destroy();for(var i=t.children,n=i.length,r=0;r<n;++r)e.push(i[r])}}return this._root=void 0,i$10(this)};var P$s=new p$1d;function l$E(e,t){if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(t))throw new t$16("entityCollection is required.");t.collectionChanged.addEventListener(l$E.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new e$1N,this._onCollectionChanged(t,t.values,[],[])}function _$r(e,t,i,n){var r=i[t.id];e$2b(r)&&(n.removeAndDestroy(r.tilesetPrimitive),delete i[t.id])}function V$l(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}l$E.prototype.update=function(e){if(!e$2b(e))throw new t$16("time is required.");for(var t=this._entitiesToVisualize.values,i=this._tilesetHash,n=this._primitives,r=0,o=t.length;r<o;r++){var a,s,l=t[r],u=l._tileset,c=i[l.id],h=l.isShowing&&l.isAvailable(e)&&r$Z.getValueOrDefault(u._show,e,!0);if(h&&(s=l.computeModelMatrix(e,P$s),a=t$11.createIfNeeded(r$Z.getValueOrUndefined(u._uri,e))),h){var d=e$2b(c)?c.tilesetPrimitive:void 0;(!e$2b(d)||a.url!==c.url)&&(e$2b(d)&&(n.removeAndDestroy(d),delete i[l.id]),(d=new p$u({url:a})).id=l,n.add(d),c={tilesetPrimitive:d,url:a.url,loadFail:!1},i[l.id]=c,V$l(d,l,i)),d.show=!0,e$2b(s)&&(d.modelMatrix=s),d.maximumScreenSpaceError=r$Z.getValueOrDefault(u.maximumScreenSpaceError,e,d.maximumScreenSpaceError)}else e$2b(c)&&(c.tilesetPrimitive.show=!1)}return!0},l$E.prototype.isDestroyed=function(){return!1},l$E.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$E.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._tilesetHash,i=this._primitives,n=e.length-1;n>-1;n--)_$r(this,e[n],t,i);return i$10(this)},l$E.prototype.getBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("entity is required.");if(!e$2b(t))throw new t$16("result is required.");var i=this._tilesetHash[e.id];if(!e$2b(i)||i.loadFail)return R$w.FAILED;var n=i.tilesetPrimitive;return e$2b(n)&&n.show?n.ready?(i$1c.clone(n.boundingSphere,t),R$w.DONE):R$w.PENDING:R$w.FAILED},l$E.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._entitiesToVisualize,s=this._tilesetHash,l=this._primitives;for(r=t.length-1;r>-1;r--)e$2b((o=t[r])._tileset)&&a.set(o.id,o);for(r=n.length-1;r>-1;r--)e$2b((o=n[r])._tileset)?a.set(o.id,o):(_$r(this,o,s,l),a.remove(o.id));for(r=i.length-1;r>-1;r--)_$r(this,o=i[r],s,l),a.remove(o.id)};var f$z=e$1U.WHITE,p$t=e$1U.BLACK,u$w=new o$1o(2,2);function r$w(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(r$w.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._evenColor)&&r$Z.isConstant(this._oddColor)&&r$Z.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:C$$("evenColor"),oddColor:C$$("oddColor"),repeat:C$$("repeat")}),r$w.prototype.getType=function(e){return"Checkerboard"},r$w.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.lightColor=r$Z.getValueOrClonedDefault(this._evenColor,e,f$z,t.lightColor),t.darkColor=r$Z.getValueOrClonedDefault(this._oddColor,e,p$t,t.darkColor),t.repeat=r$Z.getValueOrDefault(this._repeat,e,u$w),t},r$w.prototype.equals=function(e){return this===e||e instanceof r$w&&r$Z.equals(this._evenColor,e._evenColor)&&r$Z.equals(this._oddColor,e._oddColor)&&r$Z.equals(this._repeat,e._repeat)};var A$A={id:void 0};function _$q(e){if(e._firing)e._refire=!0;else if(0===e._suspendCount){var t=e._addedEntities,i=e._removedEntities,n=e._changedEntities;if(0!==n.length||0!==t.length||0!==i.length){e._firing=!0;do{e._refire=!1;var r=t.values.slice(0),o=i.values.slice(0),a=n.values.slice(0);t.removeAll(),i.removeAll(),n.removeAll(),e._collectionChanged.raiseEvent(e,r,o,a)}while(e._refire);e._firing=!1}}}function r$v(e){this._owner=e,this._entities=new e$1N,this._addedEntities=new e$1N,this._removedEntities=new e$1N,this._changedEntities=new e$1N,this._suspendCount=0,this._collectionChanged=new o$1h,this._id=e$1Q(),this._show=!0,this._firing=!1,this._refire=!1}function b$C(e){if(e$2b(e.box))return{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),box:{dimensions:new o$1p(e.box.dimensions.x,e.box.dimensions.y,e.box.dimensions.z),material:new e$1U(0,0,1,.2)}};if(e$2b(e.cylinder))return{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),cylinder:{length:e.cylinder.length,topRadius:e.cylinder.topRadius,bottomRadius:e.cylinder.bottomRadius,material:new e$1U(0,0,1,.2)}};if(e$2b(e.billboard))return{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),billboard:{image:e.imagePath,width:e.width,height:e.height}};if(e$2b(e.ellipsoid))return e$2b(e.radius)?{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.radius),ellipsoid:{radii:new o$1p(e.radius,e.radius,e.radius),material:new e$1U(0,0,1,.2)}}:{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.yAxis),ellipsoid:{radii:new o$1p(e.ellipsoid.radii.x,e.ellipsoid.radii.y,e.ellipsoid.radii.z),material:new e$1U(0,0,1,.2)}};if(e$2b(e.polygon))return{polygon:{hierarchy:e.polygon.positions,material:new e$1U(1,0,0,.1),extrudedHeight:e.polygon.extrudedHeight,perPositionHeight:e.polygon.perPositionHeight,height:e.polygon.height}};if(e$2b(e.polyline)){for(var t=[],i=0,n=e.polyline.positions.length;i<n;++i)t.push(o$1p.fromDegrees(e.polyline.positions[i].x,e.polyline.positions[i].y,e.polyline.positions[i].z));return{polyline:{positions:t,width:5,material:new e$1U(1,0,0,1)}}}return e$2b(e.ellipse)?{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z),ellipse:{semiMinorAxis:e.ellipse.semiMinorAxis,semiMajorAxis:e.ellipse.semiMajorAxis,height:e.position.z,material:new e$1U(0,0,1,.2)}}:"POINT3D"===e.type?{position:o$1p.fromDegrees(e.x,e.y,e.z),point:new n$M({color:new e$1U(1,1,0),pixelSize:10,outlineColor:new e$1U(0,1,1)})}:{}}r$v.prototype.suspendEvents=function(){this._suspendCount++},r$v.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new t$16("resumeEvents can not be called before suspendEvents.");this._suspendCount--,_$q(this)},r$v.collectionChangedEventCallback=void 0,Object.defineProperties(r$v.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(!e$2b(e))throw new t$16("value is required.");if(e!==this._show){this.suspendEvents();var t,i=[],n=this._entities.values,r=n.length;for(t=0;t<r;t++)i.push(n[t].isShowing);for(this._show=e,t=0;t<r;t++){var o=i[t],a=n[t];o!==a.isShowing&&a.definitionChanged.raiseEvent(a,"isShowing",a.isShowing,o)}this.resumeEvents()}}},owner:{get:function(){return this._owner}}}),r$v.prototype.computeAvailability=function(){for(var e=o$H.MAXIMUM_VALUE,t=o$H.MINIMUM_VALUE,i=this._entities.values,n=0,r=i.length;n<r;n++){var o=i[n].availability;if(e$2b(o)){var a=o.start,s=o.stop;a$15.lessThan(a,e)&&!a.equals(o$H.MINIMUM_VALUE)&&(e=a),a$15.greaterThan(s,t)&&!s.equals(o$H.MAXIMUM_VALUE)&&(t=s)}}return o$H.MAXIMUM_VALUE.equals(e)&&(e=o$H.MINIMUM_VALUE),o$H.MINIMUM_VALUE.equals(t)&&(t=o$H.MAXIMUM_VALUE),new d$W({start:e,stop:t})},r$v.prototype.add=function(e){if(!e$2b(e))throw new t$16("entity is required.");e instanceof o$11&&(e=b$C(e)),e instanceof h$V||(e=new h$V(e));var t=e.id,i=this._entities;if(i.contains(t))throw new t$14("An entity with id "+t+" already exists in this collection.");return e.entityCollection=this,i.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(r$v.prototype._onEntityDefinitionChanged,this),_$q(this),e},r$v.prototype.remove=function(e){return!!e$2b(e)&&this.removeById(e.id)},r$v.prototype.contains=function(e){if(!e$2b(e))throw new t$16("entity is required");return!!e$2b(e.id)&&this._entities.get(e.id)===e},r$v.prototype.removeById=function(e){if(!e$2b(e))return!1;var t=this._entities.get(e);return!!this._entities.remove(e)&&(e$2b(t._polygon)&&e$2b(t._polygon.outlines)&&t._polygon.outlines.removeAll(),e$2b(t._polygon)&&e$2b(t._polygon.clampOutlines)&&t.entityCollection._owner._entityCluster._scene._primitives.remove(t._polygon.clampOutlines),this._addedEntities.remove(e)||(this._removedEntities.set(e,t),this._changedEntities.remove(e)),this._entities.remove(e),t.definitionChanged.removeEventListener(r$v.prototype._onEntityDefinitionChanged,this),_$q(this),!0)},r$v.prototype.removeAll=function(){for(var e=this._entities,t=e.length,i=e.values,n=this._addedEntities,r=this._removedEntities,o=0;o<t;o++){var a=i[o];e$2b(a._polygon)&&e$2b(a._polygon.outlines)&&a._polygon.outlines.removeAll(),e$2b(a._polygon)&&e$2b(a._polygon.clampOutlines)&&a.entityCollection._owner._entityCluster._scene._primitives.remove(a._polygon.clampOutlines);var s=a.id;e$2b(n.get(s))||(a.definitionChanged.removeEventListener(r$v.prototype._onEntityDefinitionChanged,this),r.set(s,a))}e.removeAll(),n.removeAll(),this._changedEntities.removeAll(),_$q(this)},r$v.prototype.getById=function(e){if(!e$2b(e))throw new t$16("id is required.");return this._entities.get(e)},r$v.prototype.getOrCreateEntity=function(e){if(!e$2b(e))throw new t$16("id is required.");var t=this._entities.get(e);return e$2b(t)||(A$A.id=e,t=new h$V(A$A),this.add(t)),t},r$v.prototype._onEntityDefinitionChanged=function(e){var t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),_$q(this)};var w$r={id:void 0},C$w=new Array(2);function x$y(e){for(var t=e.propertyNames,i=t.length,n=0;n<i;n++)e[t[n]]=void 0;e._name=void 0,e._availability=void 0}function A$z(e,t,i,n){C$w[0]=i,C$w[1]=n.id,t[JSON.stringify(C$w)]=n.definitionChanged.addEventListener(s$p.prototype._onDefinitionChanged,e)}function T$t(e,t,i,n){C$w[0]=i,C$w[1]=n.id;var r=JSON.stringify(C$w);t[r](),t[r]=void 0}function g$A(e){if(e._shouldRecomposite=!0,0===e._suspendCount){var t,i,n,r,o,a,s=e._collections,l=s.length,u=e._collectionsCopy,c=u.length,h=e._composite,d=new r$v(e),f=e._eventHash;for(t=0;t<c;t++)for((o=u[t]).collectionChanged.removeEventListener(s$p.prototype._onCollectionChanged,e),n=o.values,a=o.id,r=n.length-1;r>-1;r--)T$t(e,f,a,i=n[r]);for(t=l-1;t>=0;t--)for((o=s[t]).collectionChanged.addEventListener(s$p.prototype._onCollectionChanged,e),n=o.values,a=o.id,r=n.length-1;r>-1;r--){A$z(e,f,a,i=n[r]);var p=d.getById(i.id);e$2b(p)||(e$2b(p=h.getById(i.id))?x$y(p):(w$r.id=i.id,p=new h$V(w$r)),d.add(p)),p.merge(i)}e._collectionsCopy=s.slice(0),h.suspendEvents(),h.removeAll();var _=d.values;for(t=0;t<_.length;t++)h.add(_[t]);h.resumeEvents()}}function s$p(e,t){this._owner=t,this._composite=new r$v(this),this._suspendCount=0,this._collections=e$2b(e)?e.slice():[],this._collectionsCopy=[],this._id=e$1Q(),this._eventHash={},g$A(this),this._shouldRecomposite=!1}function E$x(e,t){if(!e$2b(t))throw new t$16("collection is required.");var i=e.indexOf(t);if(-1===i)throw new t$16("collection is not in this composite.");return i}function q$v(e,t,i){var n=e._collections;if((t=e$2a.clamp(t,0,n.length-1))!==(i=e$2a.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,g$A(e)}}function c$q(e,t,i,n){function r(){i.raiseEvent(e)}var o=[];t.removeAll();for(var a=n.length,s=0;s<a;s++){var l=n.get(s);e$2b(l.data)&&-1===o.indexOf(l.data)&&t.add(l.data.definitionChanged,r)}}function e$A(){this._eventHelper=new n$x,this._definitionChanged=new o$1h,this._intervals=new c$z,this._intervals.changedEvent.addEventListener(e$A.prototype._intervalsChanged,this)}function e$z(){this._definitionChanged=new o$1h,this._composite=new e$A,this._composite.definitionChanged.addEventListener(e$z.prototype._raiseDefinitionChanged,this)}function t$q(e){this._referenceFrame=u$_(e,Re$k.FIXED),this._definitionChanged=new o$1h,this._composite=new e$A,this._composite.definitionChanged.addEventListener(t$q.prototype._raiseDefinitionChanged,this)}Object.defineProperties(s$p.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}}),s$p.prototype.addCollection=function(e,t){var i=e$2b(t);if(!e$2b(e))throw new t$16("collection is required.");if(i){if(t<0)throw new t$16("index must be greater than or equal to zero.");if(t>this._collections.length)throw new t$16("index must be less than or equal to the number of collections.")}i?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),g$A(this)},s$p.prototype.removeCollection=function(e){var t=this._collections.indexOf(e);return-1!==t&&(this._collections.splice(t,1),g$A(this),!0)},s$p.prototype.removeAllCollections=function(){this._collections.length=0,g$A(this)},s$p.prototype.containsCollection=function(e){return-1!==this._collections.indexOf(e)},s$p.prototype.contains=function(e){return this._composite.contains(e)},s$p.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)},s$p.prototype.getCollection=function(e){if(!e$2b(e))throw new t$16("index is required.","index");return this._collections[e]},s$p.prototype.getCollectionsLength=function(){return this._collections.length},s$p.prototype.raiseCollection=function(e){var t=E$x(this._collections,e);q$v(this,t,t+1)},s$p.prototype.lowerCollection=function(e){var t=E$x(this._collections,e);q$v(this,t,t-1)},s$p.prototype.raiseCollectionToTop=function(e){var t=E$x(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),g$A(this))},s$p.prototype.lowerCollectionToBottom=function(e){var t=E$x(this._collections,e);0!==t&&(this._collections.splice(t,1),this._collections.splice(0,0,e),g$A(this))},s$p.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()},s$p.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new t$16("resumeEvents can not be called before suspendEvents.");this._suspendCount--,this._shouldRecomposite&&0===this._suspendCount&&(g$A(this),this._shouldRecomposite=!1),this._composite.resumeEvents()},s$p.prototype.computeAvailability=function(){return this._composite.computeAvailability()},s$p.prototype.getById=function(e){return this._composite.getById(e)},s$p.prototype._onCollectionChanged=function(e,t,i){var n=this._collectionsCopy,r=n.length,o=this._composite;o.suspendEvents();var a,s,l,u,c=i.length,h=this._eventHash,d=e.id;for(a=0;a<c;a++){var f=i[a];T$t(this,h,d,f);var p=f.id;for(s=r-1;s>=0;s--)e$2b(l=n[s].getById(p))&&(e$2b(u)||x$y(u=o.getById(p)),u.merge(l));e$2b(u)||o.removeById(p),u=void 0}var _=t.length;for(a=0;a<_;a++){var m=t[a];A$z(this,h,d,m);var g=m.id;for(s=r-1;s>=0;s--)e$2b(l=n[s].getById(g))&&(e$2b(u)||(e$2b(u=o.getById(g))?x$y(u):(w$r.id=g,u=new h$V(w$r),o.add(u))),u.merge(l));u=void 0}o.resumeEvents()},s$p.prototype._onDefinitionChanged=function(e,t,i,n){for(var r=this._collections,o=this._composite,a=r.length,s=e.id,l=o.getById(s),u=l[t],c=!e$2b(u),h=!0,d=a-1;d>=0;d--){var f=r[d].getById(e.id);if(e$2b(f)){var p=f[t];if(e$2b(p)){if(h){if(h=!1,!e$2b(p.merge)||!e$2b(p.clone)){u=p;break}u=p.clone(u)}u.merge(p)}}}c&&-1===l.propertyNames.indexOf(t)&&l.addProperty(t),l[t]=u},Object.defineProperties(e$A.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),e$A.prototype.getValue=function(e,t){if(!e$2b(e))throw new t$16("time is required");var i=this._intervals.findDataForIntervalContainingDate(e);if(e$2b(i))return i.getValue(e,t)},e$A.prototype.equals=function(e){return this===e||e instanceof e$A&&this._intervals.equals(e._intervals,r$Z.equals)},e$A.prototype._intervalsChanged=function(){c$q(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)},Object.defineProperties(e$z.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}}),e$z.prototype.getType=function(e){if(!e$2b(e))throw new t$16("time is required");var t=this._composite._intervals.findDataForIntervalContainingDate(e);if(e$2b(t))return t.getType(e)},e$z.prototype.getValue=function(e,t){if(!e$2b(e))throw new t$16("time is required");var i=this._composite._intervals.findDataForIntervalContainingDate(e);if(e$2b(i))return i.getValue(e,t)},e$z.prototype.equals=function(e){return this===e||e instanceof e$z&&this._composite.equals(e._composite,r$Z.equals)},e$z.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(t$q.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}}),t$q.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$k.FIXED,t)},t$q.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2b(e))throw new t$16("time is required.");if(!e$2b(t))throw new t$16("referenceFrame is required.");var n=this._composite._intervals.findDataForIntervalContainingDate(e);if(e$2b(n))return n.getValueInReferenceFrame(e,t,i)},t$q.prototype.equals=function(e){return this===e||e instanceof t$q&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,r$Z.equals)},t$q.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var N$n=new e$1I(0);function i$x(e){i$F.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}e$2b(Object.create)&&(i$x.prototype=Object.create(i$F.prototype),i$x.prototype.constructor=i$x),Object.defineProperties(i$x.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),i$x.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!e$2b(t.height)&&!e$2b(t.extrudedHeight)&&d$14.isSupported(this._scene)},i$x.prototype._getIsClosed=function(e){var t=e.height,i=e.extrudedHeight;return 0===t||e$2b(i)&&i!==t},i$x.prototype._computeCenter=t$16.throwInstantiationError,i$x.prototype._onEntityPropertyChanged=function(e,t,i,n){if(i$F.prototype._onEntityPropertyChanged.call(this,e,t,i,n),-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(e$2b(r)){e$2b(r.zIndex)&&(e$2b(r.height)||e$2b(r.extrudedHeight))&&e$1$(e$1$.geometryZIndex),this._zIndex=u$_(r.zIndex,N$n),e$2b(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);var o=r.heightReference,a=r.extrudedHeightReference;if(e$2b(o)||e$2b(a)){var s=new n$V(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new h$E(this._scene,s,o,a)}}}},i$x.prototype.destroy=function(){e$2b(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),i$F.prototype.destroy.call(this)},i$x.getGeometryHeight=function(e,t){if(o$1q.defined("heightReference",t),e$2b(e))return t!==k$P.CLAMP_TO_GROUND?e:0;t!==k$P.NONE&&e$1$(e$1$.geometryHeightReference)},i$x.getGeometryExtrudedHeight=function(e,t){if(o$1q.defined("extrudedHeightReference",t),e$2b(e))return t!==k$P.CLAMP_TO_GROUND?e:i$x.CLAMP_TO_GROUND;t!==k$P.NONE&&e$1$(e$1$.geometryExtrudedHeightReference)},i$x.CLAMP_TO_GROUND="clamp",i$x.computeGeometryOffsetAttribute=function(e,t,i,n){(!e$2b(e)||!e$2b(t))&&(t=k$P.NONE),(!e$2b(i)||!e$2b(n))&&(n=k$P.NONE);var r=0;return t!==k$P.NONE&&r++,n===k$P.RELATIVE_TO_GROUND&&r++,2===r?_0x58701d.ALL:1===r?_0x58701d.TOP:void 0};var H$A=new e$1U,I$D=o$1p.ZERO,D$t=new o$1p,G$w=new h$18;function T$s(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function f$y(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new T$s(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}function l$D(e,t,i){a$C.call(this,e,t,i)}function o$A(){t$16.throwInstantiationError()}function s$o(e,t){if(e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$16("disableDepthTestDistance must be greater than or equal to 0.0.");var i=e.translucencyByDistance,n=e.scaleByDistance,r=e.distanceDisplayCondition;if(e$2b(i)){if(i.far<=i.near)throw new t$16("translucencyByDistance.far must be greater than translucencyByDistance.near.");i=o$Y.clone(i)}if(e$2b(n)){if(n.far<=n.near)throw new t$16("scaleByDistance.far must be greater than scaleByDistance.near.");n=o$Y.clone(n)}if(e$2b(r)){if(r.far<=r.near)throw new t$16("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");r=r$Y.clone(r)}this._show=u$_(e.show,!0),this._position=o$1p.clone(u$_(e.position,o$1p.ZERO)),this._actualPosition=o$1p.clone(this._position),this._color=e$1U.clone(u$_(e.color,e$1U.WHITE)),this._outlineColor=e$1U.clone(u$_(e.outlineColor,e$1U.TRANSPARENT)),this._outlineWidth=u$_(e.outlineWidth,0),this._pixelSize=u$_(e.pixelSize,10),this._scaleByDistance=n,this._translucencyByDistance=i,this._distanceDisplayCondition=r,this._disableDepthTestDistance=u$_(e.disableDepthTestDistance,0),this._id=e.id,this._collection=u$_(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1}e$2b(Object.create)&&(f$y.prototype=Object.create(i$x.prototype),f$y.prototype.constructor=f$y),f$y.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,H$A)),e$2b(t)||(t=e$1U.WHITE),r.color=o$16.fromColor(t));return e$2b(this._options.offsetAttribute)&&(r.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,I$D,D$t))),new d$1o({id:i,geometry:new P$F(this._options),attributes:r})},f$y.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,H$A),r={show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return e$2b(this._options.offsetAttribute)&&(r.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,I$D,D$t))),new d$1o({id:t,geometry:new V$w(this._options),attributes:r})},f$y.prototype._computeCenter=function(e,t){var i=r$Z.getValueOrUndefined(this._entity.corridor.positions,e);if(e$2b(i)&&0!==i.length)return o$1p.clone(i[Math.floor(i.length/2)],t)},f$y.prototype._isHidden=function(e,t){return!e$2b(t.positions)||!e$2b(t.width)||i$F.prototype._isHidden.call(this,e,t)},f$y.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!r$Z.isConstant(t.height)||!r$Z.isConstant(t.extrudedHeight)||!r$Z.isConstant(t.granularity)||!r$Z.isConstant(t.width)||!r$Z.isConstant(t.outlineWidth)||!r$Z.isConstant(t.cornerType)||!r$Z.isConstant(t.zIndex)||this._onTerrain&&!r$Z.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$Q)},f$y.prototype._setStaticOptions=function(e,t){var i=r$Z.getValueOrUndefined(t.height,o$H.MINIMUM_VALUE),n=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),r=r$Z.getValueOrUndefined(t.extrudedHeight,o$H.MINIMUM_VALUE),o=r$Z.getValueOrDefault(t.extrudedHeightReference,o$H.MINIMUM_VALUE,k$P.NONE);e$2b(r)&&!e$2b(i)&&(i=0);var a=this._options;a.vertexFormat=this._materialProperty instanceof t$Q?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,a.positions=t.positions.getValue(o$H.MINIMUM_VALUE,a.positions),a.width=t.width.getValue(o$H.MINIMUM_VALUE),a.granularity=r$Z.getValueOrUndefined(t.granularity,o$H.MINIMUM_VALUE),a.cornerType=r$Z.getValueOrUndefined(t.cornerType,o$H.MINIMUM_VALUE),a.offsetAttribute=i$x.computeGeometryOffsetAttribute(i,n,r,o),a.height=i$x.getGeometryHeight(i,n),(r=i$x.getGeometryExtrudedHeight(r,o))===i$x.CLAMP_TO_GROUND&&(r=e$1E.getMinimumMaximumHeights(P$F.computeRectangle(a,G$w)).minimumTerrainHeight),a.extrudedHeight=r},f$y.DynamicGeometryUpdater=l$D,e$2b(Object.create)&&(l$D.prototype=Object.create(a$C.prototype),l$D.prototype.constructor=l$D),l$D.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2b(n.positions)||!e$2b(n.width)||a$C.prototype._isHidden.call(this,e,t,i)},l$D.prototype._setOptions=function(e,t,i){var n=this._options,r=r$Z.getValueOrUndefined(t.height,i),o=r$Z.getValueOrDefault(t.heightReference,i,k$P.NONE),a=r$Z.getValueOrUndefined(t.extrudedHeight,i),s=r$Z.getValueOrDefault(t.extrudedHeightReference,i,k$P.NONE);e$2b(a)&&!e$2b(r)&&(r=0),n.positions=r$Z.getValueOrUndefined(t.positions,i),n.width=r$Z.getValueOrUndefined(t.width,i),n.granularity=r$Z.getValueOrUndefined(t.granularity,i),n.cornerType=r$Z.getValueOrUndefined(t.cornerType,i),n.offsetAttribute=i$x.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$x.getGeometryHeight(r,o),(a=i$x.getGeometryExtrudedHeight(a,s))===i$x.CLAMP_TO_GROUND&&(a=e$1E.getMinimumMaximumHeights(P$F.computeRectangle(n,G$w)).minimumTerrainHeight),n.extrudedHeight=a},Object.defineProperties(o$A.prototype,{name:{get:t$16.throwInstantiationError},clock:{get:t$16.throwInstantiationError},entities:{get:t$16.throwInstantiationError},isLoading:{get:t$16.throwInstantiationError},changedEvent:{get:t$16.throwInstantiationError},errorEvent:{get:t$16.throwInstantiationError},loadingEvent:{get:t$16.throwInstantiationError},show:{get:t$16.throwInstantiationError},clustering:{get:t$16.throwInstantiationError}}),o$A.prototype.update=t$16.throwInstantiationError,o$A.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var I$C=s$o.SHOW_INDEX=0,C$v=s$o.POSITION_INDEX=1,g$z=s$o.COLOR_INDEX=2,O$n=s$o.OUTLINE_COLOR_INDEX=3,b$B=s$o.OUTLINE_WIDTH_INDEX=4,q$u=s$o.PIXEL_SIZE_INDEX=5,A$y=s$o.SCALE_BY_DISTANCE_INDEX=6,X$l=s$o.TRANSLUCENCY_BY_DISTANCE_INDEX=7,x$x=s$o.DISTANCE_DISPLAY_CONDITION_INDEX=8,L$x=s$o.DISABLE_DEPTH_DISTANCE_INDEX=9;function c$p(e,t){var i=e._pointPrimitiveCollection;e$2b(i)&&(i._updatePointPrimitive(e,t),e._dirty=!0)}s$o.NUMBER_OF_PROPERTIES=10,Object.defineProperties(s$o.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._show!==e&&(this._show=e,c$p(this,I$C))}},position:{get:function(){return this._position},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._position;o$1p.equals(t,e)||(o$1p.clone(e,t),o$1p.clone(e,this._actualPosition),c$p(this,C$v))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._scaleByDistance;o$Y.equals(t,e)||(this._scaleByDistance=o$Y.clone(e,t),c$p(this,A$y))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._translucencyByDistance;o$Y.equals(t,e)||(this._translucencyByDistance=o$Y.clone(e,t),c$p(this,X$l))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._pixelSize!==e&&(this._pixelSize=e,c$p(this,q$u))}},color:{get:function(){return this._color},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._color;e$1U.equals(t,e)||(e$1U.clone(e,t),c$p(this,g$z))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._outlineColor;e$1U.equals(t,e)||(e$1U.clone(e,t),c$p(this,O$n))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,c$p(this,b$B))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far must be greater than near");r$Y.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=r$Y.clone(e,this._distanceDisplayCondition),c$p(this,x$x))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(!e$2b(e)||e<0)throw new t$16("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,c$p(this,L$x)}}},id:{get:function(){return this._id},set:function(e){this._id=e,e$2b(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,c$p(this,I$C))}}}),s$o.prototype.getPickId=function(e){return e$2b(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId},s$o.prototype._getActualPosition=function(){return this._actualPosition},s$o.prototype._setActualPosition=function(e){o$1p.clone(e,this._actualPosition),c$p(this,C$v)};var m$s=new e$29;s$o._computeActualPosition=function(e,t,i){return t.mode===C$13.SCENE3D?e:(p$1d.multiplyByPoint(i,e,m$s),s$Q.computeActualWgs84Position(t,m$s))};var E$w=new e$29;s$o._computeScreenSpacePosition=function(e,t,i,n){var r=p$1d.multiplyByVector(e,e$29.fromElements(t.x,t.y,t.z,1,E$w),E$w);return s$Q.wgs84ToWindowCoordinates(i,r,n)},s$o.prototype.computeScreenSpacePosition=function(e,t){var i=this._pointPrimitiveCollection;if(e$2b(t)||(t=new o$1o),!e$2b(i))throw new t$16("PointPrimitive must be in a collection.");if(!e$2b(e))throw new t$16("scene is required.");var n=i.modelMatrix,r=s$o._computeScreenSpacePosition(n,this._actualPosition,e,t);if(e$2b(r))return r.y=e.canvas.clientHeight-r.y,r},s$o.getScreenSpaceBoundingBox=function(e,t,i){var n=e.pixelSize,r=.5*n,o=t.x-r,a=t.y-r,s=n,l=n;return e$2b(i)||(i=new f$18),i.x=o,i.y=a,i.width=s,i.height=l,i},s$o.prototype.equals=function(e){return this===e||e$2b(e)&&this._id===e._id&&o$1p.equals(this._position,e._position)&&e$1U.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&e$1U.equals(this._outlineColor,e._outlineColor)&&o$Y.equals(this._scaleByDistance,e._scaleByDistance)&&o$Y.equals(this._translucencyByDistance,e._translucencyByDistance)&&r$Y.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},s$o.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var X$k="varying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nvarying vec2 v_offset;\n\nvoid main()\n{\n if(length(v_offset) > 0.5){\n discard;\n }\n // The distance in UV space from this fragment to the center of the point, at most 0.5.\n float distanceToCenter = 0.0;\n // The max distance stops one pixel shy of the edge to leave space for anti-aliasing.\n float maxDistance = max(0.0, 0.5 - v_pixelDistance);\n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n float innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);\n\n vec4 color = mix(v_outlineColor, v_color, innerAlpha);\n color.a *= wholeAlpha;\n\n// Fully transparent parts of the billboard are not pickable.\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\n if (color.a < 0.005) // matches 0/255 and 1/255\n {\n discard;\n }\n#else\n// The billboard is rendered twice. The opaque pass discards translucent fragments\n// and the translucent pass discards opaque fragments.\n#ifdef OPAQUE\n if (color.a < 0.995) // matches < 254/255\n {\n discard;\n }\n#else\n if (color.a >= 0.995) // matches 254/255 and 255/255\n {\n discard;\n }\n#endif\n#endif\n\n gl_FragColor = czm_gammaCorrect(color);\n czm_writeLogDepth();\n}",Pe$6='uniform float u_maxTotalPointSize;\n\nattribute vec2 offset;\nattribute vec4 positionHighAndSize;\nattribute vec4 positionLowAndOutline;\nattribute vec4 compressedAttribute0; // color, outlineColor, pick color\nattribute vec4 compressedAttribute1; // show, translucency by distance, some free space\nattribute vec4 scaleByDistance; // near, nearScale, far, farScale\nattribute vec3 distanceDisplayConditionAndDisableDepth; // near, far, disableDepthTestDistance\n\nvarying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nvarying vec2 v_offset;\n\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\n\nfloat computerOnePixelLength(vec4 viewPos)\n{\n vec4 winPos = czm_projection * viewPos;\n float dwidth = czm_metersPerPixel(viewPos);\n winPos.x = winPos.x - 2.0 * dwidth;\n vec4 newViewPos = czm_inverseProjection * winPos;\n return length(viewPos - newViewPos);\n}\n\nvoid main()\n{\n // Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition\n\n // unpack attributes\n vec3 positionHigh = positionHighAndSize.xyz;\n vec3 positionLow = positionLowAndOutline.xyz;\n float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;\n float totalSize = positionHighAndSize.w + outlineWidthBothSides;\n float outlinePercent = outlineWidthBothSides / totalSize;\n // Scale in response to browser-zoom.\n totalSize *= czm_pixelRatio;\n // Add padding for anti-aliasing on both sides.\n totalSize += 3.0;\n\n float temp = compressedAttribute1.x * SHIFT_RIGHT8;\n float show = floor(temp);\n\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n vec4 translucencyByDistance;\n translucencyByDistance.x = compressedAttribute1.z;\n translucencyByDistance.z = compressedAttribute1.w;\n\n translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\n temp = compressedAttribute1.y * SHIFT_RIGHT8;\n translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 color;\n vec4 outlineColor;\n vec4 pickColor;\n\n // compressedAttribute0.z => pickColor.rgb\n\n temp = compressedAttribute0.z * SHIFT_RIGHT8;\n pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor.r = floor(temp);\n\n // compressedAttribute0.x => color.rgb\n\n temp = compressedAttribute0.x * SHIFT_RIGHT8;\n color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n color.r = floor(temp);\n\n // compressedAttribute0.y => outlineColor.rgb\n\n temp = compressedAttribute0.y * SHIFT_RIGHT8;\n outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.r = floor(temp);\n\n // compressedAttribute0.w => color.a, outlineColor.a, pickColor.a\n\n temp = compressedAttribute0.w * SHIFT_RIGHT8;\n pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor = pickColor / 255.0;\n\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor /= 255.0;\n color.a = floor(temp);\n color /= 255.0;\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n\n ///////////////////////////////////////////////////////////////////////////\n\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n // 2D camera distance is a special case\n // treat all billboards as flattened to the z=0.0 plane\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n lengthSq = dot(positionEC.xyz, positionEC.xyz);\n }\n#endif\n\n#ifdef EYE_DISTANCE_SCALING\n totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);\n#endif\n // If size is too small, push vertex behind near plane for clipping.\n // Note that context.minimumAliasedPointSize "will be at most 1.0".\n if (totalSize < 1.0)\n {\n positionEC.xyz = vec3(0.0);\n totalSize = 1.0;\n }\n\n float translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (translucency < 0.004)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n#ifdef DISTANCE_DISPLAY_CONDITION\n float nearSq = distanceDisplayConditionAndDisableDepth.x;\n float farSq = distanceDisplayConditionAndDisableDepth.y;\n if (lengthSq < nearSq || lengthSq > farSq) {\n // push vertex behind camera to force it to be clipped\n positionEC.xyz = vec3(0.0, 0.0, 1.0);\n }\n#endif\n\n positionEC.xy = positionEC.xy + offset * computerOnePixelLength(positionEC) * totalSize;\n gl_Position = czm_projection * positionEC;\n czm_vertexLogDepth();\n\n#ifdef DISABLE_DEPTH_DISTANCE\n float disableDepthTestDistance = distanceDisplayConditionAndDisableDepth.z;\n if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n {\n disableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n }\n\n if (disableDepthTestDistance != 0.0)\n {\n // Don\'t try to "multiply both sides" by w. Greater/less-than comparisons won\'t work for negative values of w.\n float zclip = gl_Position.z / gl_Position.w;\n bool clipped = (zclip < -1.0 || zclip > 1.0);\n if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n {\n // Position z on the near plane.\n gl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\n czm_vertexLogDepth(vec4(czm_currentFrustum.x));\n#endif\n }\n }\n#endif\n\n v_color = color;\n v_color.a *= translucency * show;\n v_outlineColor = outlineColor;\n v_outlineColor.a *= translucency * show;\n\n v_innerPercent = 1.0 - outlinePercent;\n v_pixelDistance = 2.0 / totalSize;\n v_offset = offset;\n gl_Position *= show;\n\n v_pickColor = pickColor;\n}',Le$b=s$o.SHOW_INDEX,Z$r=s$o.POSITION_INDEX,de$c=s$o.COLOR_INDEX,Ve$9=s$o.OUTLINE_COLOR_INDEX,Ue$8=s$o.OUTLINE_WIDTH_INDEX,we$8=s$o.PIXEL_SIZE_INDEX,_e$9=s$o.SCALE_BY_DISTANCE_INDEX,pe$d=s$o.TRANSLUCENCY_BY_DISTANCE_INDEX,le$h=s$o.DISTANCE_DISPLAY_CONDITION_INDEX,Re$8=s$o.DISABLE_DEPTH_DISTANCE_INDEX,q$t=s$o.NUMBER_OF_PROPERTIES,p$s={offset:0,positionHighAndSize:1,positionLowAndOutline:2,compressedAttribute0:3,compressedAttribute1:4,scaleByDistance:5,distanceDisplayConditionAndDisableDepth:6};function D$s(e){e=u$_(e,u$_.EMPTY_OBJECT),this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(q$t),this._maxPixelSize=1,this._baseVolume=new i$1c,this._baseVolumeWC=new i$1c,this._baseVolume2D=new i$1c,this._boundingVolume=new i$1c,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.blendOption=u$_(e.blendOption,S$J.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=C$13.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW];var t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}},this.depthTestEnabled=u$_(e.depthTestEnabled,!0)}function ue$c(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function J$p(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;for(var t=[],i=e._pointPrimitives,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._pointPrimitives=t}}function Me$b(e,t,i){return new v$F(e,[{index:p$s.positionHighAndSize,name:"positionHighAndSize",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[Z$r]},{index:p$s.positionLowAndOutline,name:"positionLowAndOutline",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[Z$r]},{index:p$s.compressedAttribute0,name:"compressedAttribute0",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[de$c]},{index:p$s.compressedAttribute1,name:"compressedAttribute1",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[pe$d]},{index:p$s.scaleByDistance,name:"scaleByDistance",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[_e$9]},{index:p$s.distanceDisplayConditionAndDisableDepth,name:"distanceDisplayConditionAndDisableDepth",componentsPerAttribute:3,componentDatatype:S$12.FLOAT,usage:i[le$h]},{name:"offset",index:p$s.offset,vertexBuffer:e.createBillboardOffsetVertexBuffer(),componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}],t,!0)}Object.defineProperties(D$s.prototype,{length:{get:function(){return J$p(this),this._pointPrimitives.length}}}),D$s.prototype.add=function(e){var t=new s$o(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t},D$s.prototype.remove=function(e){return!!this.contains(e)&&(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},D$s.prototype.removeAll=function(){ue$c(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0},D$s.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]},D$s.prototype.contains=function(e){return e$2b(e)&&e._pointPrimitiveCollection===this},D$s.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return J$p(this),this._pointPrimitives[e]},D$s.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,n=0;n<q$t;++n){var r=0===i[n]?A$19.STATIC_DRAW:A$19.STREAM_DRAW;t=t||e[n]!==r,e[n]=r}return t};var K$p=new i$11;function ce$e(e,t,i,n){var r=n._index,o=n._getActualPosition();e._mode===C$13.SCENE3D&&(i$1c.expand(e._baseVolume,o,e._baseVolume),e._boundingVolumeDirty=!0),i$11.fromCartesian(o,K$p);var a=n.pixelSize,s=n.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,a+s);var l=i[p$s.positionHighAndSize],u=K$p.high;l(r,u.x,u.y,u.z,a);var c=i[p$s.positionLowAndOutline],h=K$p.low;c(r,h.x,h.y,h.z,s)}var z$t=65536,L$w=256;function fe$9(e,t,i,n){var r=n._index,o=n.color,a=n.getPickId(t).color,s=n.outlineColor,l=e$1U.floatToByte(o.red),u=e$1U.floatToByte(o.green),c=e$1U.floatToByte(o.blue),h=l*z$t+u*L$w+c;l=e$1U.floatToByte(s.red),u=e$1U.floatToByte(s.green),c=e$1U.floatToByte(s.blue);var d=l*z$t+u*L$w+c;l=e$1U.floatToByte(a.red),u=e$1U.floatToByte(a.green),c=e$1U.floatToByte(a.blue);var f=l*z$t+u*L$w+c,p=e$1U.floatToByte(o.alpha)*z$t+e$1U.floatToByte(s.alpha)*L$w+e$1U.floatToByte(a.alpha);(0,i[p$s.compressedAttribute0])(r,h,d,f,p)}function me$e(e,t,i,n){var r=n._index,o=0,a=1,s=1,l=1,u=n.translucencyByDistance;e$2b(u)&&(o=u.near,a=u.nearValue,s=u.far,l=u.farValue,(1!==a||1!==l)&&(e._shaderTranslucencyByDistance=!0));var c=n.show&&n.clusterShow;0===n.color.alpha&&0===n.outlineColor.alpha&&(c=!1),a=e$2a.clamp(a,0,1);var h=(c?1:0)*L$w+(a=1===a?255:255*a|0),d=l=1===(l=e$2a.clamp(l,0,1))?255:255*l|0;(0,i[p$s.compressedAttribute1])(r,h,d,o,s)}function De$b(e,t,i,n){var r=n._index,o=i[p$s.scaleByDistance],a=0,s=1,l=1,u=1,c=n.scaleByDistance;e$2b(c)&&(a=c.near,s=c.nearValue,l=c.far,u=c.farValue,(1!==s||1!==u)&&(e._shaderScaleByDistance=!0)),o(r,a,s,l,u)}function ve$a(e,t,i,n){var r=n._index,o=i[p$s.distanceDisplayConditionAndDisableDepth],a=0,s=Number.MAX_VALUE,l=n.distanceDisplayCondition;e$2b(l)&&(a=l.near,s=l.far,a*=a,s*=s,e._shaderDistanceDisplayCondition=!0);var u=n.disableDepthTestDistance;(u*=u)>0&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1)),o(r,a,s,u)}function Xe$5(e,t,i,n){ce$e(e,t,i,n),fe$9(e,t,i,n),me$e(e,t,i,n),De$b(e,t,i,n),ve$a(e,t,i,n)}function $$r(e,t,i,n,r,o){var a;n.mode===C$13.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=s$o._computeActualPosition(c,n,r);e$2b(h)&&(u._setActualPosition(h),o?s.push(h):i$1c.expand(a,h,a))}o&&i$1c.fromPoints(s,a)}function ze$8(e,t){var i=t.mode,n=e._pointPrimitives,r=e._pointPrimitivesToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==C$13.SCENE3D&&!p$1d.equals(o,e.modelMatrix)?(e._mode=i,p$1d.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===C$13.SCENE3D||i===C$13.SCENE2D||i===C$13.COLUMBUS_VIEW)&&$$r(e,n,n.length,t,o,!0)):i===C$13.MORPHING?$$r(e,n,n.length,t,o,!0):(i===C$13.SCENE2D||i===C$13.COLUMBUS_VIEW)&&$$r(e,r,e._pointPrimitivesToUpdateIndex,t,o,!1)}function Fe$9(e,t,i){var n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;i.radius+=n}var We$7=[];function a$r(e){e=u$_(e,u$_.EMPTY_OBJECT),this._enabled=u$_(e.enabled,!1),this._pixelRange=u$_(e.pixelRange,80),this._minimumClusterSize=u$_(e.minimumClusterSize,1),this._clusterBillboards=u$_(e.clusterBillboards,!0),this._clusterLabels=u$_(e.clusterLabels,!0),this._clusterPoints=u$_(e.clusterPoints,!0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new o$1h}function ci$3(e){return e.coord.x}function di$2(e){return e.coord.y}function Z$q(e,t){e.x-=t,e.y-=t,e.width+=2*t,e.height+=2*t}D$s.prototype.update=function(e){if(e.multiViewportIndex>-1&&this._pointPrimitives.length>0&&e$2b(this._pointPrimitives[0])&&e$2b(this._pointPrimitives[0].id)&&e$2b(this._pointPrimitives[0].id.entityCollection)&&e$2b(this._pointPrimitives[0].id.entityCollection.owner)){var t=this._pointPrimitives[0].id.entityCollection.owner;if(typeof t.getVisibleInViewport<"u")if(!t.getVisibleInViewport(e.multiViewportIndex))return}J$p(this),this._maxTotalPointSize=e$1T.maximumAliasedPointSize,ze$8(this,e);var i,n=this._pointPrimitives.length,r=this._pointPrimitivesToUpdate,o=this._pointPrimitivesToUpdateIndex,a=this._propertiesChanged,s=this._createVertexArray,l=e.context,u=e.passes,c=u.pick;if(s||!c&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var h=0;h<q$t;++h)a[h]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=Me$b(l,n,this._buffersUsage),i=this._vaf.writers;for(var d=0;d<n;++d){var f=this._pointPrimitives[d];f._dirty=!1,Xe$5(this,l,i,f)}this._vaf.commit(l.createBillboardPointIndexBuffer())}this._pointPrimitivesToUpdateIndex=0}else if(o>0){var p=We$7;p.length=0,(a[Z$r]||a[Ue$8]||a[we$8])&&p.push(ce$e),(a[de$c]||a[Ve$9])&&p.push(fe$9),(a[Le$b]||a[pe$d])&&p.push(me$e),a[_e$9]&&p.push(De$b),(a[le$h]||a[Re$8])&&p.push(ve$a);var _=p.length;if(i=this._vaf.writers,o/n>.1){for(var m=0;m<o;++m){var g=r[m];g._dirty=!1;for(var x=0;x<_;++x)p[x](this,l,i,g)}this._vaf.commit(l.createBillboardPointIndexBuffer())}else{for(var v=0;v<o;++v){var y=r[v];y._dirty=!1;for(var $=0;$<_;++$)p[$](this,l,i,y);this._vaf.subCommit(y._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(o>1.5*n&&(r.length=n),e$2b(this._vaf)&&e$2b(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,i$1c.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var b,T=p$1d.IDENTITY;e.mode===C$13.SCENE3D?(T=this.modelMatrix,b=i$1c.clone(this._baseVolumeWC,this._boundingVolume)):b=i$1c.clone(this._baseVolume2D,this._boundingVolume),Fe$9(this,e,b);var C,S,w=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,w&&(this._blendOption===S$J.OPAQUE||this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=d$1m.fromCache({depthTest:{enabled:this.depthTestEnabled,func:de$x.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===S$J.TRANSLUCENT||this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=d$1m.fromCache({depthTest:{enabled:!0,func:de$x.LEQUAL},depthMask:!1,blending:Ee$r.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance,(w||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(C=new s$U({name:"PointPrimitiveCollectionVS",sources:[Pe$6]}),this._shaderScaleByDistance&&C.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&C.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&C.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&C.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT&&(S=new s$U({name:"PointPrimitiveCollectionFS",defines:["OPAQUE"],sources:[X$k]}),this._sp=r$13.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s}),S=new s$U({name:"PointPrimitiveCollectionFS",defines:["TRANSLUCENT"],sources:[X$k]}),this._spTranslucent=r$13.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s})),this._blendOption===S$J.OPAQUE&&(S=new s$U({name:"PointPrimitiveCollectionFS",sources:[X$k]}),this._sp=r$13.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s})),this._blendOption===S$J.TRANSLUCENT&&(S=new s$U({name:"PointPrimitiveCollectionFS",sources:[X$k]}),this._spTranslucent=r$13.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);var E,P,A,L,M=e.commandList;if(e._fboState.frameBufferType!=Qe$c.CLAMP&&(u.render||c)){var R=this._colorCommands,I=this._blendOption===S$J.OPAQUE,O=this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT;P=(E=this._vaf.va).length,R.length=P;var D=O?2*P:P;for(L=0;L<D;++L){var B=I||O&&L%2==0;e$2b(A=R[L])||(A=R[L]=new i$_),A.primitiveType=W$18.TRIANGLES,A.pass=B||!O?Le$s.OPAQUE:Le$s.TRANSLUCENT,A.owner=this,A.instanceCount=this._pointPrimitives.length;var N=O?Math.floor(L/2):L;A.boundingVolume=b,A.modelMatrix=T,A.shaderProgram=B?this._sp:this._spTranslucent,A.uniformMap=this._uniforms,A.vertexArray=E[N].va,A.renderState=B?this._rsOpaque:this._rsTranslucent,A.debugShowBoundingVolume=this.debugShowBoundingVolume,A.pickId="v_pickColor",M.push(A)}}}},D$s.prototype.isDestroyed=function(){return!1},D$s.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),ue$c(this._pointPrimitives),i$10(this)};var ai$1=new f$18;function G$v(e,t,i,n,r){if(e$2b(e._labelCollection)&&n._clusterLabels?r=D$Q.getScreenSpaceBoundingBox(e,t,r):e$2b(e._billboardCollection)&&n._clusterBillboards?r=n$I.getScreenSpaceBoundingBox(e,t,r):e$2b(e._pointPrimitiveCollection)&&n._clusterPoints&&(r=s$o.getScreenSpaceBoundingBox(e,t,r)),Z$q(r,i),n._clusterLabels&&!e$2b(e._labelCollection)&&e$2b(e.id)&&J$o(n,e.id.id)&&e$2b(e.id._label)){var o=n._collectionIndicesByEntity[e.id.id].labelIndex,a=n._labelCollection.get(o),s=a.getScreenSpaceBoundingBox(a,t,ai$1);Z$q(s,i),r=f$18.union(r,s,r)}return r}function ui$2(e,t){if(e.clusterShow=!0,!e$2b(e._labelCollection)&&e$2b(e.id)&&J$o(t,e.id.id)&&e$2b(e.id._label)){var i=t._collectionIndicesByEntity[e.id.id].labelIndex;t._labelCollection.get(i).clusterShow=!0}}function hi$2(e,t,i,n){var r={billboard:n._clusterBillboardCollection.add(),label:n._clusterLabelCollection.add(),point:n._clusterPointCollection.add()};r.billboard.show=!1,r.point.show=!1,r.label.show=!0,r.label.text=t.toLocaleString(),r.label.id=i,r.billboard.position=r.label.position=r.point.position=e,n._clusterEvent.raiseEvent(i,r)}function J$o(e,t){return e$2b(e)&&e$2b(e._collectionIndicesByEntity[t])&&e$2b(e._collectionIndicesByEntity[t].labelIndex)}function z$s(e,t,i,n,r){if(e$2b(e))for(var o=e.length,a=0;a<o;++a){var s=e.get(a);if(s.clusterShow=!1,s.show&&(r._scene.mode!==C$13.SCENE3D||n.isPointVisible(s.position))){var l=r._clusterLabels&&e$2b(s._labelCollection),u=r._clusterBillboards&&e$2b(s.id._billboard),c=r._clusterPoints&&e$2b(s.id._point);if(!l||!c&&!u){var h=s.computeScreenSpacePosition(i);!e$2b(h)||t.push({index:a,collection:e,clustered:!1,coord:h})}}}}var _i$3=new f$18,bi$2=new f$18,fi$2=new f$18;function gi$3(e){return function(t){if(!(e$2b(t)&&t<.05)&&e.enabled){var i=e._scene,n=e._labelCollection,r=e._billboardCollection,o=e._pointCollection;if((e$2b(n)||e$2b(r)||e$2b(o))&&(e._clusterBillboards||e._clusterLabels||e._clusterPoints)){var a=e._clusterLabelCollection,s=e._clusterBillboardCollection,l=e._clusterPointCollection;e$2b(a)?a.removeAll():a=e._clusterLabelCollection=new g$U({scene:i}),e$2b(s)?s.removeAll():s=e._clusterBillboardCollection=new w$N({scene:i}),e$2b(l)?l.removeAll():l=e._clusterPointCollection=new D$s;var u=e._pixelRange,c=e._minimumClusterSize;e._previousClusters;var h=[];e._previousHeight;var d=i.camera.positionCartographic.height,f=i.mapProjection.ellipsoid,p=i.camera.positionWC,_=new s$G(f,p),m=[];e._clusterLabels&&z$s(n,m,i,_,e),e._clusterBillboards&&z$s(r,m,i,_,e),e._clusterPoints&&z$s(o,m,i,_,e);var g,x,v,y,$,b,T,C,S,w,E,P=O$B(m,ci$3,di$2,4096,Int32Array);for(v=m.length,g=0;g<v;++g){var A=m[g];if(!A.clustered){A.clustered=!0,w=A.collection,E=A.index;var L=w.get(E);y=G$v(L,A.coord,u,e,_i$3);var M=f$18.clone(y,bi$2);b=($=P.intersect(y.x,y.y,y.x+y.width,y.y+y.height)).length;var R=o$1p.clone(L.position);S=1,C=[L.id];var I=o$1p.distanceSquared(p,R);for(x=0;x<b;++x)if(!(T=m[$[x]]).clustered){var O=T.collection.get(T.index),D=G$v(O,T.coord,u,e,fi$2);o$1p.distanceSquared(p,O.position)<I&&(R=o$1p.clone(O.position)),f$18.union(M,D,M),++S,C.push(O.id)}if(S>=c){var B=o$1p.clone(R);for(hi$2(B,S,C,e),h.push({position:B,width:M.width,height:M.height,minimumWidth:y.width,minimumHeight:y.height}),x=0;x<b;++x)m[$[x]].clustered=!0}else ui$2(L,e)}}0===a.length&&(a.destroy(),e._clusterLabelCollection=void 0),0===s.length&&(s.destroy(),e._clusterBillboardCollection=void 0),0===l.length&&(l.destroy(),e._clusterPointCollection=void 0),e._previousClusters=h,e._previousHeight=d}}}}function R$p(e,t,i,n){return function(r){var o=this[e];e$2b(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});var a=this._collectionIndicesByEntity[r.id];if(e$2b(a)||(a=this._collectionIndicesByEntity[r.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),e$2b(o)&&e$2b(a[n]))return o.get(a[n]);e$2b(o)||(o=this[e]=new t({scene:this._scene}));var s,l,u=this[i];return u.length>0?(s=u.pop(),l=o.get(s)):(l=o.add(),s=o.length-1),a[n]=s,this._clusterDirty=!0,l}}function Y$m(e,t){var i=e._collectionIndicesByEntity[t];!e$2b(i.billboardIndex)&&!e$2b(i.labelIndex)&&!e$2b(i.pointIndex)&&delete e._collectionIndicesByEntity[t]}function M$x(e){if(e$2b(e))for(var t=e.length,i=0;i<t;++i)e.get(i).clusterShow=!0}function pi$3(e){e.enabled||(e$2b(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),e$2b(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),e$2b(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,M$x(e._labelCollection),M$x(e._billboardCollection),M$x(e._pointCollection))}function n$o(e){this._name=e,this._clock=void 0,this._changed=new o$1h,this._error=new o$1h,this._isLoading=!1,this._loading=new o$1h,this._entityCollection=new r$v(this),this._entityCluster=new a$r}function K$o(e){this.id=e,this.vertexFormat=void 0,this.slices=void 0,this.offsetAttribute=void 0}a$r.prototype._initialize=function(e){this._scene=e;var t=gi$3(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)},Object.defineProperties(a$r.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}}}),a$r.prototype.getLabel=R$p("_labelCollection",g$U,"_unusedLabelIndices","labelIndex"),a$r.prototype.removeLabel=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(e$2b(this._labelCollection)&&e$2b(t)&&e$2b(t.labelIndex)){var i=t.labelIndex;t.labelIndex=void 0,Y$m(this,e.id);var n=this._labelCollection.get(i);n.show=!1,n.text="",n.id=void 0,this._unusedLabelIndices.push(i),this._clusterDirty=!0}},a$r.prototype.getBillboard=R$p("_billboardCollection",w$N,"_unusedBillboardIndices","billboardIndex"),a$r.prototype.removeBillboard=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(e$2b(this._billboardCollection)&&e$2b(t)&&e$2b(t.billboardIndex)){var i=t.billboardIndex;t.billboardIndex=void 0,Y$m(this,e.id);var n=this._billboardCollection.get(i);n.id=void 0,n.show=!1,n.image=void 0,this._unusedBillboardIndices.push(i),this._clusterDirty=!0}},a$r.prototype.getPoint=R$p("_pointCollection",D$s,"_unusedPointIndices","pointIndex"),a$r.prototype.removePoint=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(e$2b(this._pointCollection)&&e$2b(t)&&e$2b(t.pointIndex)){var i=t.pointIndex;t.pointIndex=void 0,Y$m(this,e.id);var n=this._pointCollection.get(i);n.show=!1,n.id=void 0,this._unusedPointIndices.push(i),this._clusterDirty=!0}},a$r.prototype.update=function(e){var t;e$2b(this._labelCollection)&&this._labelCollection.length>0&&0===this._labelCollection.get(0)._glyphs.length&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),e$2b(this._billboardCollection)&&this._billboardCollection.length>0&&!e$2b(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,pi$3(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),e$2b(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),e$2b(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),e$2b(this._clusterPointCollection)&&this._clusterPointCollection.update(e),e$2b(this._labelCollection)&&this._labelCollection.update(e),e$2b(this._billboardCollection)&&this._billboardCollection.update(e),e$2b(this._pointCollection)&&this._pointCollection.update(e)},a$r.prototype.destroy=function(){this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),e$2b(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1},Object.defineProperties(n$o.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){o$A.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2b(e))throw new t$16("value must be defined.");this._entityCluster=e}}});var N$m=new i$V("ruleModeling"),i$w={unResolved:0,parsing:1,resolved:2,failed:3};function m$r(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new K$o(e),geometryPropertyName:"geometry",observedPropertyNames:["loftParam","geometry","children","orientation","scale","position"]}),this.asynchronous=!1,this.twoPasses=!0,this.wrapS=q$19.REPEAT,this.wrapT=q$19.REPEAT,this.compressVertices=!1;var i=this;e$2b(e.geometry)&&(e.geometry.outlineWidth=new e$1I(e.geometry.outlineWidth||1),this._outline=new e$1I(e.geometry.outline||!1),Object.defineProperties(e.geometry,{outline:{get:function(){return i._outline},set:function(t){t!==i._outline&&(!0===t?(i._outline.setValue(!0),e.geometry.outlineWidth=new e$1I(e.geometry.outlineWidth||1),i._onEntityPropertyChanged(e,"geometry",e.geometry,void 0)):i._outline.setValue(!1))}}})),this._onEntityPropertyChanged(e,"geometry",e.geometry,void 0),this.geometryState=i$w.unResolved,this.outlineState=i$w.unResolved}function Q$q(e,t){var i={attrLocation:{aPosition:0},vertexAttributes:[{componentsPerAttribute:3,typedArray:new Float32Array(e)}]},n=[{indexType:1,indicesTypedArray:new Uint32Array(t)}];return _0x30c9ea.createEdgeData(i,n)}e$2b(Object.create)&&(m$r.prototype=Object.create(i$F.prototype),m$r.prototype.constructor=m$r),Object.defineProperties(m$r.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),m$r.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");if(this._options.instance instanceof d$1o)return this._options.instance;if(this.geometryState===i$w.unResolved){var t=N$m.scheduleTask({loftParam:this._options.loftParam,linearExtrudeParam:this._options.linearExtrudeParam,rotateExtrudeParam:this._options.rotateExtrudeParam},[]);if(!e$2b(t))return"unResolve";this.geometryState=i$w.parsing;var i=this;return t.then((function(t){if("notReady"!==t){if(!e$2b(t))return i.geometry=null,void(i.geometryState=i$w.resolved);var n,r,o=[],a=i._entity;n=e$2b(a.orientation)?a.orientation.getValue(e):{heading:0,pitch:0,roll:0},r=e$2b(a.scale)?a.scale.getValue(e):{x:1,y:1,z:1};for(var s=0;s<t.length;s++){var l=t[s].vertex.typedArray,u=t[s].indices.typedArray,c=t[s].normal,h=t[s].uv,d=t[s].position,f=a.isAvailable(e);(!e$2b(a.position)||!e$2b(a.position.getValue(e)))&&(a.position=d);var p=new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:new Float64Array(l)}),normal:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:new Float32Array(c)}),st:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:new Float32Array(h)})});0===h.length&&delete p.st;var _=i$1c.fromVertices(new Float64Array(l),new o$1p(0,0,0),3),m=new I$1p({attributes:p,indices:u,primitiveType:W$18.TRIANGLES,boundingSphere:_});0===c.length&&(m=k$13.computeNormal(m)),d=a.position.getValue(e);var g=m$17.headingPitchRollToFixedFrame(o$1p.fromDegrees(d.x,d.y,d.z),new i$15(n.heading,n.pitch,n.roll),t$13.WGS84,m$17.eastNorthUpToFixedFrame);p$1d.multiplyByScale(g,r,g),o.push(new d$1o({id:a,geometry:m,modelMatrix:g,attributes:{show:new e$1F(f&&a.isShowing&&i._showProperty.getValue(e))}}))}if(o.length>1){var x=[];for(s=0;s<o.length;s++){var v=new a$R(a.geometry.material);v._unique=!0;var y=new h$V({geometry:{instance:o[s],material:v}});y.position=d,x.push(y)}a.children=x,i.geometry=null,i.geometryState=i$w.resolved}else i.geometry=o[0],i.geometryState=i$w.resolved}else i.geometryState=i$w.unResolved})).otherwise((function(){i.geometryState=i$w.failed})),"unResolve"}return this.geometryState===i$w.parsing?"unResolve":this.geometryState===i$w.failed?null:this.geometry},m$r.prototype.createOutlineGeometryInstance=function(e){var t,i,n,r=this._options.loftParam,o=this._options.linearExtrudeParam,a=this._options.rotateExtrudeParam;if(this.outlineState===i$w.unResolved){if(e$2b(r)){var s={createTexCoord:r.buildParam.createTexCoord,generateNormal:r.buildParam.generateNormal,group:!0,att:r.buildParam.att,splitSegment:r.buildParam.splitSegment,splitSide:r.buildParam.splitSide,chamferFactor:r.buildParam.chamferFactor,segmentClosed:r.buildParam.segmentClosed,normalAngle:r.buildParam.normalAngle};t={line:r.line,region:r.region,buildParam:s,uvwParam:r.uvwParam}}else if(e$2b(o)){s={createTexCoord:o.buildParam.createTexCoord,generateNormal:o.buildParam.generateNormal,group:!0,att:o.buildParam.att,height:o.buildParam.height,scaleX:o.buildParam.scaleX,scaleY:o.buildParam.scaleY,normalAngle:o.buildParam.normalAngle};i={region:o.region,buildParam:s,uvwParam:o.uvwParam}}else if(e$2b(a)){s={createTexCoord:a.buildParam.createTexCoord,generateNormal:a.buildParam.generateNormal,group:!0,att:a.buildParam.att,normalAngle:a.buildParam.normalAngle,slices:a.buildParam.slices,angle:a.buildParam.angle};n={region:a.geometry,buildParam:s,uvwParam:a.uvwParam}}var l=N$m.scheduleTask({loftParam:t,linearExtrudeParam:i,rotateExtrudeParam:n},[]);if(!e$2b(l))return this.createOutlineGeometryInstance();this.outlineState=i$w.parsing;var u=this;l.then((function(e){if("notReady"===e)return u.outlineState=i$w.unResolved,void u.createOutlineGeometryInstance();var t=e[0].vertex.typedArray,i=e[0].indices.typedArray,n=u._entity,r=Q$q(t,i),o=i$1c.fromVertices(new Float64Array(t),new o$1p(0,0,0),3);n.boundingSphere=o,n.edgedata=r,u.outlineState=i$w.resolved}))}return null},m$r.prototype._isDynamic=function(e,t){return!1},m$r.prototype.isOutlineVisible=function(e){return!0},m$r.prototype._setStaticOptions=function(e,t){var i=this._options;i.loftParam=t.loftParam,i.linearExtrudeParam=t.linearExtrudeParam,i.rotateExtrudeParam=t.rotateExtrudeParam,i.instance=t.instance},m$r.prototype._onEntityPropertyChanged=a$B;var P$r=o$1p.ZERO,U$s=new o$1p,N$l=new o$1p,D$r=new e$1U;function x$w(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function s$n(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new x$w(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}function f$x(e,t,i){a$C.call(this,e,t,i)}function e$y(){this._definitionChanged=new o$1h,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}e$2b(Object.create)&&(s$n.prototype=Object.create(i$F.prototype),s$n.prototype.constructor=s$n),Object.defineProperties(s$n.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),s$n.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:t$B.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,D$r)),e$2b(t)||(t=e$1U.WHITE),a.color=o$16.fromColor(t));return e$2b(this._options.offsetAttribute)&&(a.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,P$r,U$s))),new d$1o({id:i,geometry:new l$Q(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:a})},s$n.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,D$r),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r),offset:void 0};return e$2b(this._options.offsetAttribute)&&(o.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,P$r,U$s))),new d$1o({id:t,geometry:new d$Z(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:o})},s$n.prototype._computeCenter=function(e,t){return r$Z.getValueOrUndefined(this._entity.position,e,t)},s$n.prototype._isHidden=function(e,t){return!e$2b(e.position)||!e$2b(t.length)||!e$2b(t.topRadius)||!e$2b(t.bottomRadius)||i$F.prototype._isHidden.call(this,e,t)},s$n.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$Z.isConstant(e.orientation)&&t.length.isConstant&&t.topRadius.isConstant&&t.bottomRadius.isConstant&&r$Z.isConstant(t.slices)&&r$Z.isConstant(t.outlineWidth)&&r$Z.isConstant(t.numberOfVerticalLines))},s$n.prototype._setStaticOptions=function(e,t){var i=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$Q?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,n.length=t.length.getValue(o$H.MINIMUM_VALUE),n.topRadius=t.topRadius.getValue(o$H.MINIMUM_VALUE),n.bottomRadius=t.bottomRadius.getValue(o$H.MINIMUM_VALUE),n.slices=r$Z.getValueOrUndefined(t.slices,o$H.MINIMUM_VALUE),n.numberOfVerticalLines=r$Z.getValueOrUndefined(t.numberOfVerticalLines,o$H.MINIMUM_VALUE),n.offsetAttribute=i!==k$P.NONE?_0x58701d.ALL:void 0},s$n.prototype._onEntityPropertyChanged=a$B,s$n.DynamicGeometryUpdater=f$x,e$2b(Object.create)&&(f$x.prototype=Object.create(a$C.prototype),f$x.prototype.constructor=f$x),f$x.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2b(r$Z.getValueOrUndefined(e.position,i,N$l))||!e$2b(n.length)||!e$2b(n.topRadius)||!e$2b(n.bottomRadius)||a$C.prototype._isHidden.call(this,e,t,i)},f$x.prototype._setOptions=function(e,t,i){var n=r$Z.getValueOrDefault(t.heightReference,i,k$P.NONE),r=this._options;r.length=r$Z.getValueOrUndefined(t.length,i),r.topRadius=r$Z.getValueOrUndefined(t.topRadius,i),r.bottomRadius=r$Z.getValueOrUndefined(t.bottomRadius,i),r.slices=r$Z.getValueOrUndefined(t.slices,i),r.numberOfVerticalLines=r$Z.getValueOrUndefined(t.numberOfVerticalLines,i),r.offsetAttribute=n!==k$P.NONE?_0x58701d.ALL:void 0},Object.defineProperties(e$y.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:c$W("startTime"),stopTime:c$W("stopTime"),currentTime:c$W("currentTime"),clockRange:c$W("clockRange"),clockStep:c$W("clockStep"),multiplier:c$W("multiplier")}),e$y.prototype.clone=function(e){return e$2b(e)||(e=new e$y),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e},e$y.prototype.equals=function(e){return this===e||e$2b(e)&&a$15.equals(this.startTime,e.startTime)&&a$15.equals(this.stopTime,e.stopTime)&&a$15.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier},e$y.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.startTime=u$_(this.startTime,e.startTime),this.stopTime=u$_(this.stopTime,e.stopTime),this.currentTime=u$_(this.currentTime,e.currentTime),this.clockRange=u$_(this.clockRange,e.clockRange),this.clockStep=u$_(this.clockStep,e.clockStep),this.multiplier=u$_(this.multiplier,e.multiplier)},e$y.prototype.getValue=function(e){return e$2b(e)||(e=new u$I),e.startTime=u$_(this.startTime,e.startTime),e.stopTime=u$_(this.stopTime,e.stopTime),e.currentTime=u$_(this.currentTime,e.currentTime),e.clockRange=u$_(this.clockRange,e.clockRange),e.multiplier=u$_(this.multiplier,e.multiplier),e.clockStep=u$_(this.clockStep,e.clockStep),e};var h$z=e$1U.WHITE,u$v=.1,c$o=new o$1o(8,8),d$D=new o$1o(0,0),p$r=new o$1o(1,1);function t$p(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}function t$o(e){this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(t$p.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)&&r$Z.isConstant(this._cellAlpha)&&r$Z.isConstant(this._lineCount)&&r$Z.isConstant(this._lineThickness)&&r$Z.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color"),cellAlpha:C$$("cellAlpha"),lineCount:C$$("lineCount"),lineThickness:C$$("lineThickness"),lineOffset:C$$("lineOffset")}),t$p.prototype.getType=function(e){return"Grid"},t$p.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,h$z,t.color),t.cellAlpha=r$Z.getValueOrDefault(this._cellAlpha,e,u$v),t.lineCount=r$Z.getValueOrClonedDefault(this._lineCount,e,c$o,t.lineCount),t.lineThickness=r$Z.getValueOrClonedDefault(this._lineThickness,e,p$r,t.lineThickness),t.lineOffset=r$Z.getValueOrClonedDefault(this._lineOffset,e,d$D,t.lineOffset),t},t$p.prototype.equals=function(e){return this===e||e instanceof t$p&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._cellAlpha,e._cellAlpha)&&r$Z.equals(this._lineCount,e._lineCount)&&r$Z.equals(this._lineThickness,e._lineThickness)&&r$Z.equals(this._lineOffset,e._lineOffset)},Object.defineProperties(t$o.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color")}),t$o.prototype.getType=function(e){return"PolylineArrow"},t$o.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,e$1U.WHITE,t.color),t},t$o.prototype.equals=function(e){return this===e||e instanceof t$o&&r$Z.equals(this._color,e._color)};var d$C=e$1U.WHITE,l$C=e$1U.TRANSPARENT,f$w=16,g$y=255;function o$z(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=e.color,this.gapColor=e.gapColor,this.dashLength=e.dashLength,this.dashPattern=e.dashPattern}Object.defineProperties(o$z.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)&&r$Z.isConstant(this._gapColor)&&r$Z.isConstant(this._dashLength)&&r$Z.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color"),gapColor:C$$("gapColor"),dashLength:C$$("dashLength"),dashPattern:C$$("dashPattern")}),o$z.prototype.getType=function(e){return"PolylineDash"},o$z.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,d$C,t.color),t.gapColor=r$Z.getValueOrClonedDefault(this._gapColor,e,l$C,t.gapColor),t.dashLength=r$Z.getValueOrDefault(this._dashLength,e,f$w,t.dashLength),t.dashPattern=r$Z.getValueOrDefault(this._dashPattern,e,g$y,t.dashPattern),t},o$z.prototype.equals=function(e){return this===e||e instanceof o$z&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._gapColor,e._gapColor)&&r$Z.equals(this._dashLength,e._dashLength)&&r$Z.equals(this._dashPattern,e._dashPattern)};var f$v=e$1U.WHITE,p$q=.25,P$q=1;function t$n(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower,this.taperPower=e.taperPower}Object.defineProperties(t$n.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)&&r$Z.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color"),glowPower:C$$("glowPower"),taperPower:C$$("taperPower")}),t$n.prototype.getType=function(e){return"PolylineGlow"},t$n.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,f$v,t.color),t.glowPower=r$Z.getValueOrDefault(this._glowPower,e,p$q,t.glowPower),t.taperPower=r$Z.getValueOrDefault(this._taperPower,e,P$q,t.taperPower),t},t$n.prototype.equals=function(e){return this===e||e instanceof t$n&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._glowPower,e._glowPower)&&r$Z.equals(this._taperPower,e._taperPower)};var f$u=e$1U.WHITE,h$y=e$1U.BLACK,a$q=1;function e$x(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}function n$n(e,t){this._value=void 0,this._definitionChanged=new o$1h,this._eventHelper=new n$x,this._referenceFrame=u$_(t,Re$k.FIXED),this.setValue(e)}function i$v(e){this._value=void 0,this._definitionChanged=new o$1h,this._eventHelper=new n$x,this.setValue(e)}function s$m(e){var t=e._targetProperty;if(!e$2b(t)){var i=e._targetEntity;if(!e$2b(i)){if(!e$2b(i=e._targetCollection.getById(e._targetId)))return void(e._targetEntity=e._targetProperty=void 0);i.definitionChanged.addEventListener(a$p.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=i}var n=e._targetPropertyNames;t=e._targetEntity;for(var r=0,o=n.length;r<o&&e$2b(t);++r)t=t[n[r]];e._targetProperty=t}return t}function a$p(e,t,i){if(!e$2b(e))throw new t$16("targetCollection is required.");if(!e$2b(t)||""===t)throw new t$16("targetId is required.");if(!e$2b(i)||0===i.length)throw new t$16("targetPropertyNames is required.");for(var n=0;n<i.length;n++){var r=i[n];if(!e$2b(r)||""===r)throw new t$16("reference contains invalid properties.")}this._targetCollection=e,this._targetId=t,this._targetPropertyNames=i,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new o$1h,e.collectionChanged.addEventListener(a$p.prototype._onCollectionChanged,this)}Object.defineProperties(e$x.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)&&r$Z.isConstant(this._outlineColor)&&r$Z.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth")}),e$x.prototype.getType=function(e){return"PolylineOutline"},e$x.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,f$u,t.color),t.outlineColor=r$Z.getValueOrClonedDefault(this._outlineColor,e,h$y,t.outlineColor),t.outlineWidth=r$Z.getValueOrDefault(this._outlineWidth,e,a$q),t},e$x.prototype.equals=function(e){return this===e||e instanceof e$x&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._outlineColor,e._outlineColor)&&r$Z.equals(this._outlineWidth,e._outlineWidth)},Object.defineProperties(n$n.prototype,{isConstant:{get:function(){var e=this._value;if(!e$2b(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!r$Z.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),n$n.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$k.FIXED,t)},n$n.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2b(e))throw new t$16("time is required.");if(!e$2b(t))throw new t$16("referenceFrame is required.");var n=this._value;if(e$2b(n)){var r=n.length;e$2b(i)||(i=new Array(r));for(var o=0,a=0;o<r;){var s=n[o].getValueInReferenceFrame(e,t,i[o]);e$2b(s)&&(i[a]=s,a++),o++}return i.length=a,i}},n$n.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),e$2b(e)){this._value=e.slice();for(var i=e.length,n=0;n<i;n++){var r=e[n];e$2b(r)&&t.add(r.definitionChanged,n$n.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},n$n.prototype.equals=function(e){return this===e||e instanceof n$n&&this._referenceFrame===e._referenceFrame&&r$Z.arrayEquals(this._value,e._value)},n$n.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(i$v.prototype,{isConstant:{get:function(){var e=this._value;if(!e$2b(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!r$Z.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),i$v.prototype.getValue=function(e,t){if(!e$2b(e))throw new t$16("time is required.");var i=this._value;if(e$2b(i)){var n=i.length;e$2b(t)||(t=new Array(n));for(var r=0,o=0;r<n;){var a=this._value[r].getValue(e,t[r]);e$2b(a)&&(t[o]=a,o++),r++}return t.length=o,t}},i$v.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),e$2b(e)){this._value=e.slice();for(var i=e.length,n=0;n<i;n++){var r=e[n];e$2b(r)&&t.add(r.definitionChanged,i$v.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},i$v.prototype.equals=function(e){return this===e||e instanceof i$v&&r$Z.arrayEquals(this._value,e._value)},i$v.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(a$p.prototype,{isConstant:{get:function(){return r$Z.isConstant(s$m(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){var e=s$m(this);return e$2b(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return s$m(this)}}}),a$p.fromString=function(e,t){if(!e$2b(e))throw new t$16("targetCollection is required.");if(!e$2b(t))throw new t$16("referenceString is required.");for(var i,n=[],r=!0,o=!1,a="",s=0;s<t.length;++s){var l=t.charAt(s);o?(a+=l,o=!1):"\\"===l?o=!0:r&&"#"===l?(i=a,r=!1,a=""):r||"."!==l?a+=l:(n.push(a),a="")}return n.push(a),new a$p(e,i,n)},a$p.prototype.getValue=function(e,t){var i=s$m(this);return e$2b(i)?i.getValue(e,t):void 0},a$p.prototype.getValueInReferenceFrame=function(e,t,i){var n=s$m(this);return e$2b(n)?n.getValueInReferenceFrame(e,t,i):void 0},a$p.prototype.getType=function(e){var t=s$m(this);return e$2b(t)?t.getType(e):void 0},a$p.prototype.equals=function(e){if(this===e)return!0;var t=this._targetPropertyNames,i=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==i.length)return!1;for(var n=this._targetPropertyNames.length,r=0;r<n;r++)if(t[r]!==i[r])return!1;return!0},a$p.prototype._onTargetEntityDefinitionChanged=function(e,t,i,n){e$2b(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))},a$p.prototype._onCollectionChanged=function(e,t,i){var n=this._targetEntity;e$2b(n)&&-1!==i.indexOf(n)?(n.definitionChanged.removeEventListener(a$p.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):e$2b(n)||e$2b(n=s$m(this))&&this._definitionChanged.raiseEvent(this)};var m$q={packedLength:1,pack:function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return t[i=u$_(i,0)]=e,t},unpack:function(e,t,i){if(!e$2b(e))throw new t$16("array is required");return e[t=u$_(t,0)]},convertPackedArrayForInterpolation:function(e,t,i,n){if(!e$2b(e))throw new t$16("packedArray is required");t=u$_(t,0);for(var r,o=0,a=(i=u$_(i,e.length))-t+1;o<a;o++){var s=e[t+o];0===o||Math.abs(r-s)<Math.PI?n[o]=s:n[o]=s-e$2a.TWO_PI,r=s}},unpackInterpolationResult:function(e,t,i,n,r){if(!e$2b(e))throw new t$16("array is required");if(!e$2b(t))throw new t$16("sourceArray is required");return(r=e[0])<0?r+e$2a.TWO_PI:r}},j$u={packedLength:1,pack:function(e,t,i){t[i=u$_(i,0)]=e},unpack:function(e,t,i){return e[t=u$_(t,0)]}};function J$n(e,t,i){var n,r=e.length,o=i.length,a=r+o;if(e.length=a,r!==t){var s=r-1;for(n=a-1;n>=t;n--)e[n]=e[s--]}for(n=0;n<o;n++)e[t++]=i[n]}function Z$p(e,t){return e instanceof a$15?e:"string"==typeof e?a$15.fromIso8601(e):a$15.addSeconds(t,e,new a$15)}var P$p=[],q$s=[];function S$q(e,t,i,n,r){for(var o,a,s,l,u,c,h=0;h<n.length;){var d=0,f=0;if((s=a$17(t,u=Z$p(n[h],e),a$15.compare))<0){for(l=(s=~s)*r,a=void 0,c=t[s];h<n.length&&(u=Z$p(n[h],e),!(e$2b(a)&&a$15.compare(a,u)>=0||e$2b(c)&&a$15.compare(u,c)>=0));){for(P$p[d++]=u,h+=1,o=0;o<r;o++)q$s[f++]=n[h],h+=1;a=u}d>0&&(q$s.length=f,J$n(i,l,q$s),P$p.length=d,J$n(t,s,P$p))}else{for(o=0;o<r;o++)h++,i[s*r+o]=n[h];h++}}}function g$x(e,t){o$1q.defined("type",e);var i=e;i===Number&&(i=j$u);var n,r=i.packedLength,o=u$_(i.packedInterpolationLength,r),a=0;if(e$2b(t)){var s=t.length;n=new Array(s);for(var l=0;l<s;l++){var u=t[l];u===Number&&(u=j$u);var c=u.packedLength;r+=c,o+=u$_(u.packedInterpolationLength,c),n[l]=u}a=s}this._type=e,this._innerType=i,this._interpolationDegree=1,this._interpolationAlgorithm=v$A,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=r,this._packedInterpolationLength=o,this._updateTableLength=!0,this._interpolationResult=new Array(o),this._definitionChanged=new o$1h,this._derivativeTypes=t,this._innerDerivativeTypes=n,this._inputOrder=a,this._forwardExtrapolationType=_0x346789.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=_0x346789.NONE,this._backwardExtrapolationDuration=0}function z$r(e,t,i){var n=e._packedLength;e._times.splice(t,i),e._values.splice(t*n,i*n),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}function o$y(e,t){var i;if((t=u$_(t,0))>0){i=new Array(t);for(var n=0;n<t;n++)i[n]=o$1p}this._numberOfDerivatives=t,this._property=new g$x(o$1p,i),this._definitionChanged=new o$1h,this._referenceFrame=u$_(e,Re$k.FIXED),this._property._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)}Object.defineProperties(g$x.prototype,{isConstant:{get:function(){return 0===this._values.length}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}}),g$x.prototype.getValue=function(e,t){o$1q.defined("time",e);var i=this._times,n=i.length;if(0!==n){var r,o=this._innerType,a=this._values,s=a$17(i,e,a$15.compare);if(s<0){if(0===(s=~s)){var l=i[s];if(r=this._backwardExtrapolationDuration,this._backwardExtrapolationType===_0x346789.NONE||0!==r&&a$15.secondsDifference(l,e)>r)return;if(this._backwardExtrapolationType===_0x346789.HOLD)return o.unpack(a,0,t)}if(s>=n){var u=i[s=n-1];if(r=this._forwardExtrapolationDuration,this._forwardExtrapolationType===_0x346789.NONE||0!==r&&a$15.secondsDifference(e,u)>r)return;if(this._forwardExtrapolationType===_0x346789.HOLD)return s=n-1,o.unpack(a,s*o.packedLength,t)}var c=this._xTable,h=this._yTable,d=this._interpolationAlgorithm,f=this._packedInterpolationLength,p=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;var _=Math.min(d.getRequiredDataPoints(this._interpolationDegree,p),n);_!==this._numberOfPoints&&(this._numberOfPoints=_,c.length=_,h.length=_*f)}var m=this._numberOfPoints-1;if(m<1)return;var g=0,x=n-1;if(x-g+1>=m+1){var v=s-(m/2|0)-1;v<g&&(v=g);var y=v+m;y>x&&((v=(y=x)-m)<g&&(v=g)),g=v,x=y}for(var $=x-g+1,b=0;b<$;++b)c[b]=a$15.secondsDifference(i[g+b],i[x]);if(e$2b(o.convertPackedArrayForInterpolation))o.convertPackedArrayForInterpolation(a,g,x,h);else for(var T=0,C=this._packedLength,S=g*C,w=(x+1)*C;S<w;)h[T]=a[S],S++,T++;var E,P=a$15.secondsDifference(e,i[x]);if(0!==p&&e$2b(d.interpolate)){var A=Math.floor(f/(p+1));E=d.interpolate(P,c,h,A,p,p,this._interpolationResult)}else E=d.interpolateOrderZero(P,c,h,f,this._interpolationResult);return e$2b(o.unpackInterpolationResult)?o.unpackInterpolationResult(E,a,g,x,t):o.unpack(E,0,t)}return o.unpack(a,s*this._packedLength,t)}},g$x.prototype.setInterpolationOptions=function(e){if(e$2b(e)){var t=!1,i=e.interpolationAlgorithm,n=e.interpolationDegree;e$2b(i)&&this._interpolationAlgorithm!==i&&(this._interpolationAlgorithm=i,t=!0),e$2b(n)&&this._interpolationDegree!==n&&(this._interpolationDegree=n,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this))}},g$x.prototype.addSample=function(e,t,i){var n=this._innerDerivativeTypes,r=e$2b(n);o$1q.defined("time",e),o$1q.defined("value",t),r&&o$1q.defined("derivatives",i);var o=this._innerType,a=[];if(a.push(e),o.pack(t,a,a.length),r)for(var s=n.length,l=0;l<s;l++)n[l].pack(i[l],a,a.length);S$q(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$x.prototype.addSamples=function(e,t,i){var n=this._innerDerivativeTypes,r=e$2b(n);if(o$1q.defined("times",e),o$1q.defined("values",t),e.length!==t.length)throw new t$16("times and values must be the same length.");if(r&&(!e$2b(i)||i.length!==e.length))throw new t$16("times and derivativeValues must be the same length.");for(var o=this._innerType,a=e.length,s=[],l=0;l<a;l++)if(s.push(e[l]),o.pack(t[l],s,s.length),r)for(var u=i[l],c=n.length,h=0;h<c;h++)n[h].pack(u[h],s,s.length);S$q(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$x.prototype.addSamplesPackedArray=function(e,t){o$1q.defined("packedSamples",e),S$q(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$x.prototype.removeSample=function(e){o$1q.defined("time",e);var t=a$17(this._times,e,a$15.compare);return!(t<0)&&(z$r(this,t,1),!0)},g$x.prototype.removeSamples=function(e){o$1q.defined("timeInterval",e);var t=this._times,i=a$17(t,e.start,a$15.compare);i<0?i=~i:e.isStartIncluded||++i;var n=a$17(t,e.stop,a$15.compare);n<0?n=~n:e.isStopIncluded&&++n,z$r(this,i,n-i)},g$x.prototype.equals=function(e){if(this===e)return!0;if(!e$2b(e)||this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;var t,i,n=this._derivativeTypes,r=e$2b(n),o=e._derivativeTypes;if(r!==e$2b(o))return!1;if(r){if((i=n.length)!==o.length)return!1;for(t=0;t<i;t++)if(n[t]!==o[t])return!1}var a=this._times,s=e._times;if((i=a.length)!==s.length)return!1;for(t=0;t<i;t++)if(!a$15.equals(a[t],s[t]))return!1;var l=this._values,u=e._values;for(t=0;t<i;t++)if(l[t]!==u[t])return!1;return!0},g$x._mergeNewSamples=S$q,Object.defineProperties(o$y.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}}),o$y.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$k.FIXED,t)},o$y.prototype.getValueInReferenceFrame=function(e,t,i){if(o$1q.defined("time",e),o$1q.defined("referenceFrame",t),e$2b(i=this._property.getValue(e,i)))return t$K.convertToReferenceFrame(e,i,this._referenceFrame,t,i)},o$y.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)},o$y.prototype.addSample=function(e,t,i){var n=this._numberOfDerivatives;if(n>0&&(!e$2b(i)||i.length!==n))throw new t$16("derivatives length must be equal to the number of derivatives.");this._property.addSample(e,t,i)},o$y.prototype.addSamples=function(e,t,i){this._property.addSamples(e,t,i)},o$y.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)},o$y.prototype.removeSample=function(e){this._property.removeSample(e)},o$y.prototype.removeSamples=function(e){this._property.removeSamples(e)},o$y.prototype.equals=function(e){return this===e||e instanceof o$y&&r$Z.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var e$w={HORIZONTAL:0,VERTICAL:1},mr$1=Object.freeze(e$w),l$B=mr$1.HORIZONTAL,u$u=e$1U.WHITE,C$u=e$1U.BLACK,p$p=0,_$p=1;function i$u(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}function t$m(e){this._definitionChanged=new o$1h,this._intervals=new c$z,this._intervals.changedEvent.addEventListener(t$m.prototype._intervalsChanged,this),this._referenceFrame=u$_(e,Re$k.FIXED)}function t$l(){this._definitionChanged=new o$1h,this._intervals=new c$z,this._intervals.changedEvent.addEventListener(t$l.prototype._intervalsChanged,this)}function r$u(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new o$1h,this._normalize=u$_(t,!0),this.position=e}Object.defineProperties(i$u.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._orientation)&&r$Z.isConstant(this._evenColor)&&r$Z.isConstant(this._oddColor)&&r$Z.isConstant(this._offset)&&r$Z.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:C$$("orientation"),evenColor:C$$("evenColor"),oddColor:C$$("oddColor"),offset:C$$("offset"),repeat:C$$("repeat")}),i$u.prototype.getType=function(e){return"Stripe"},i$u.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.horizontal=r$Z.getValueOrDefault(this._orientation,e,l$B)===mr$1.HORIZONTAL,t.evenColor=r$Z.getValueOrClonedDefault(this._evenColor,e,u$u,t.evenColor),t.oddColor=r$Z.getValueOrClonedDefault(this._oddColor,e,C$u,t.oddColor),t.offset=r$Z.getValueOrDefault(this._offset,e,p$p),t.repeat=r$Z.getValueOrDefault(this._repeat,e,_$p),t},i$u.prototype.equals=function(e){return this===e||e instanceof i$u&&r$Z.equals(this._orientation,e._orientation)&&r$Z.equals(this._evenColor,e._evenColor)&&r$Z.equals(this._oddColor,e._oddColor)&&r$Z.equals(this._offset,e._offset)&&r$Z.equals(this._repeat,e._repeat)},Object.defineProperties(t$m.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}}),t$m.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$k.FIXED,t)},t$m.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2b(e))throw new t$16("time is required.");if(!e$2b(t))throw new t$16("referenceFrame is required.");var n=this._intervals.findDataForIntervalContainingDate(e);if(e$2b(n))return t$K.convertToReferenceFrame(e,n,this._referenceFrame,t,i)},t$m.prototype.equals=function(e){return this===e||e instanceof t$m&&this._intervals.equals(e._intervals,r$Z.equals)&&this._referenceFrame===e._referenceFrame},t$m.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(t$l.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),t$l.prototype.getValue=function(e,t){if(!e$2b(e))throw new t$16("time is required");var i=this._intervals.findDataForIntervalContainingDate(e);return e$2b(i)&&"function"==typeof i.clone?i.clone(t):i},t$l.prototype.equals=function(e){return this===e||e instanceof t$l&&this._intervals.equals(e._intervals,r$Z.equals)},t$l.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(r$u.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){var t=this._position;t!==e&&(e$2b(t)&&this._subscription(),this._position=e,e$2b(e)&&(this._subscription=e._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(e){this._normalize!==e&&(this._normalize=e,this._definitionChanged.raiseEvent(this))}}});var C$t=new o$1p,c$n=new o$1p,_$o=new a$15,p$o=1/60;function e$v(e,t){this._velocityVectorProperty=new r$u(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new o$1h,this.ellipsoid=u$_(t,t$13.WGS84);var i=this;this._velocityVectorProperty.definitionChanged.addEventListener((function(){i._definitionChanged.raiseEvent(i)}))}r$u.prototype.getValue=function(e,t){return this._getValue(e,t)},r$u.prototype._getValue=function(e,t,i){if(!e$2b(e))throw new t$16("time is required");e$2b(t)||(t=new o$1p);var n=this._position;if(r$Z.isConstant(n))return this._normalize?void 0:o$1p.clone(o$1p.ZERO,t);var r=n.getValue(e,C$t),o=n.getValue(a$15.addSeconds(e,p$o,_$o),c$n);if(e$2b(r)&&(e$2b(o)||(o=r,e$2b(r=n.getValue(a$15.addSeconds(e,-p$o,_$o),c$n))))){if(o$1p.equals(r,o))return this._normalize?void 0:o$1p.clone(o$1p.ZERO,t);e$2b(i)&&r.clone(i);var a=o$1p.subtract(o,r,t);return this._normalize?o$1p.normalize(a,t):o$1p.divideByScalar(a,p$o,t)}},r$u.prototype.equals=function(e){return this===e||e instanceof r$u&&r$Z.equals(this._position,e._position)},Object.defineProperties(e$v.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){this._ellipsoid!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var s$l=new o$1p,m$p=new o$1p,l$A=new p$1e,xr$2;function y$t(){}function U$r(e,t){return"#"===t[0]&&(t=xr$2+t),a$p.fromString(e,t)}function Kr$1(e,t,i){if(e$2b(i.reference))return U$r(t,i.reference);if(e$2b(i.velocityReference)){var n=U$r(t,i.velocityReference);switch(e){case o$1p:case y$t:return new r$u(n,e===y$t);case n$13:return new e$v(n)}}throw new t$14(JSON.stringify(i)+" is not valid CZML.")}function Ye$5(e,t){return new n$V((function(i,n){return t(e.getValue(i,n))}),e.isConstant)}e$v.prototype.getValue=function(e,t){var i=this._velocityVectorProperty._getValue(e,m$p,s$l);if(e$2b(i))return m$17.rotationMatrixFromPositionVelocity(s$l,i,this._ellipsoid,l$A),n$13.fromRotationMatrix(l$A,t)},e$v.prototype.equals=function(e){return this===e||e instanceof e$v&&r$Z.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))},y$t.packedLength=o$1p.packedLength,y$t.unpack=o$1p.unpack,y$t.pack=o$1p.pack;var g$w=new o$1p,B$p=new c$A,x$v=new a$18,Y$l=new d$W,pr$1=new n$13;function Ke$5(e){var t=e.rgbaf;if(e$2b(t))return t;var i=e.rgba;if(e$2b(i)){var n=i.length;if(n===e$1U.packedLength)return[e$1U.byteToFloat(i[0]),e$1U.byteToFloat(i[1]),e$1U.byteToFloat(i[2]),e$1U.byteToFloat(i[3])];t=new Array(n);for(var r=0;r<n;r+=5)t[r]=i[r],t[r+1]=e$1U.byteToFloat(i[r+1]),t[r+2]=e$1U.byteToFloat(i[r+2]),t[r+3]=e$1U.byteToFloat(i[r+3]),t[r+4]=e$1U.byteToFloat(i[r+4]);return t}}function $r$1(e,t){var i=u$_(e.uri,e);return e$2b(t)?t.getDerivedResource({url:i}):t$11.createIfNeeded(i)}function $e$4(e){var t=e.wsen;if(e$2b(t))return t;var i=e.wsenDegrees;if(e$2b(i)){var n=i.length;if(n===h$18.packedLength)return[e$2a.toRadians(i[0]),e$2a.toRadians(i[1]),e$2a.toRadians(i[2]),e$2a.toRadians(i[3])];t=new Array(n);for(var r=0;r<n;r+=5)t[r]=i[r],t[r+1]=e$2a.toRadians(i[r+1]),t[r+2]=e$2a.toRadians(i[r+2]),t[r+3]=e$2a.toRadians(i[r+3]),t[r+4]=e$2a.toRadians(i[r+4]);return t}}function Ie$7(e){var t=e.length;if(B$p.magnitude=1,2===t)return B$p.clock=e[0],B$p.cone=e[1],o$1p.fromSpherical(B$p,g$w),[g$w.x,g$w.y,g$w.z];for(var i=new Array(t/3*4),n=0,r=0;n<t;n+=3,r+=4)i[r]=e[n],B$p.clock=e[n+1],B$p.cone=e[n+2],o$1p.fromSpherical(B$p,g$w),i[r+1]=g$w.x,i[r+2]=g$w.y,i[r+3]=g$w.z;return i}function ke$5(e){var t=e.length;if(3===t)return B$p.clock=e[0],B$p.cone=e[1],B$p.magnitude=e[2],o$1p.fromSpherical(B$p,g$w),[g$w.x,g$w.y,g$w.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],B$p.clock=e[n+1],B$p.cone=e[n+2],B$p.magnitude=e[n+3],o$1p.fromSpherical(B$p,g$w),i[n+1]=g$w.x,i[n+2]=g$w.y,i[n+3]=g$w.z;return i}function je$7(e){var t=e.length;if(3===t)return x$v.longitude=e[0],x$v.latitude=e[1],x$v.height=e[2],t$13.WGS84.cartographicToCartesian(x$v,g$w),[g$w.x,g$w.y,g$w.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],x$v.longitude=e[n+1],x$v.latitude=e[n+2],x$v.height=e[n+3],t$13.WGS84.cartographicToCartesian(x$v,g$w),i[n+1]=g$w.x,i[n+2]=g$w.y,i[n+3]=g$w.z;return i}function ze$7(e){var t=e.length;if(3===t)return x$v.longitude=e$2a.toRadians(e[0]),x$v.latitude=e$2a.toRadians(e[1]),x$v.height=e[2],t$13.WGS84.cartographicToCartesian(x$v,g$w),[g$w.x,g$w.y,g$w.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],x$v.longitude=e$2a.toRadians(e[n+1]),x$v.latitude=e$2a.toRadians(e[n+2]),x$v.height=e[n+3],t$13.WGS84.cartographicToCartesian(x$v,g$w),i[n+1]=g$w.x,i[n+2]=g$w.y,i[n+3]=g$w.z;return i}function _r$1(e){var t=e.cartesian;if(e$2b(t))return t;var i=e.cartesianVelocity;if(e$2b(i))return i;var n=e.unitCartesian;if(e$2b(n))return n;var r=e.unitSpherical;if(e$2b(r))return Ie$7(r);var o=e.spherical;if(e$2b(o))return ke$5(o);var a=e.cartographicRadians;if(e$2b(a))return je$7(a);var s=e.cartographicDegrees;if(e$2b(s))return ze$7(s);throw new t$14(JSON.stringify(e)+" is not a valid CZML interval.")}function Ir$2(e,t){o$1p.unpack(e,t,g$w),o$1p.normalize(g$w,g$w),o$1p.pack(g$w,e,t)}function Ce$8(e){var t=_r$1(e);if(3===t.length)return Ir$2(t,0),t;for(var i=1;i<t.length;i+=4)Ir$2(t,i);return t}function kr$1(e,t){n$13.unpack(e,t,pr$1),n$13.normalize(pr$1,pr$1),n$13.pack(pr$1,e,t)}function Ue$7(e){var t=e.unitQuaternion;if(e$2b(t)){if(4===t.length)return kr$1(t,0),t;for(var i=1;i<t.length;i+=5)kr$1(t,i)}return t}function jr(e){return"boolean"==typeof e?Boolean:"number"==typeof e?Number:"string"==typeof e?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?f$18:e.hasOwnProperty("cartesian2")?o$1o:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?o$1p:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?y$t:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?e$1U:e.hasOwnProperty("arcType")?m$1f:e.hasOwnProperty("classificationType")?_0x3b5200:e.hasOwnProperty("colorBlendMode")?I$J:e.hasOwnProperty("cornerType")?ar$5:e.hasOwnProperty("heightReference")?k$P:e.hasOwnProperty("horizontalOrigin")?j$T:e.hasOwnProperty("date")?a$15:e.hasOwnProperty("labelStyle")?R$Q:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?o$Y:e.hasOwnProperty("distanceDisplayCondition")?r$Y:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?n$13:e.hasOwnProperty("shadowMode")?W$W:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?mr$1:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?h$18:e.hasOwnProperty("uri")?h$16:e.hasOwnProperty("verticalOrigin")?S$O:Object}function rn(e,t,i){switch(e){case m$1f:return m$1f[u$_(t.arcType,t)];case Array:return t.array;case Boolean:return u$_(t.boolean,t);case f$18:return t.boundingRectangle;case o$1o:return t.cartesian2;case o$1p:return _r$1(t);case y$t:return Ce$8(t);case e$1U:return Ke$5(t);case _0x3b5200:return _0x3b5200[u$_(t.classificationType,t)];case I$J:return I$J[u$_(t.colorBlendMode,t)];case ar$5:return ar$5[u$_(t.cornerType,t)];case k$P:return k$P[u$_(t.heightReference,t)];case j$T:return j$T[u$_(t.horizontalOrigin,t)];case Image:return $r$1(t,i);case a$15:return a$15.fromIso8601(u$_(t.date,t));case R$Q:return R$Q[u$_(t.labelStyle,t)];case Number:return u$_(t.number,t);case o$Y:return t.nearFarScalar;case r$Y:return t.distanceDisplayCondition;case Object:return u$_(u$_(t.object,t.value),t);case n$13:return Ue$7(t);case m$q:return u$_(t.number,t);case W$W:return W$W[u$_(u$_(t.shadowMode,t.shadows),t)];case String:return u$_(t.string,t);case mr$1:return mr$1[u$_(t.stripeOrientation,t)];case h$18:return $e$4(t);case h$16:return $r$1(t,i);case S$O:return S$O[u$_(t.verticalOrigin,t)];default:throw new t$14(e)}}var en={HERMITE:E$I,LAGRANGE:i$I,LINEAR:v$A};function lr$1(e,t){var i=e.interpolationAlgorithm,n=e.interpolationDegree;(e$2b(i)||e$2b(n))&&t.setInterpolationOptions({interpolationAlgorithm:en[i],interpolationDegree:n});var r=e.forwardExtrapolationType;e$2b(r)&&(t.forwardExtrapolationType=_0x346789[r]);var o=e.forwardExtrapolationDuration;e$2b(o)&&(t.forwardExtrapolationDuration=o);var a=e.backwardExtrapolationType;e$2b(a)&&(t.backwardExtrapolationType=_0x346789[a]);var s=e.backwardExtrapolationDuration;e$2b(s)&&(t.backwardExtrapolationDuration=s)}var zr$1={iso8601:void 0};function b$A(e){if(e$2b(e))return zr$1.iso8601=e,d$W.fromIso8601(zr$1)}function Br(e){var t=o$H.MAXIMUM_INTERVAL.clone();return t.data=e,t}function Cr$1(e){var t=new e$A;return t.intervals.addInterval(Br(e)),t}function Ur$1(e){var t=new t$q(e.referenceFrame);return t.intervals.addInterval(Br(e)),t}function gr$1(e,t,i,n,r,o,a){var s=b$A(n.interval);e$2b(r)&&(s=e$2b(s)?d$W.intersect(s,r,Y$l):r);var l,u,c,h=!e$2b(n.reference)&&!e$2b(n.velocityReference),d=e$2b(s)&&!s.equals(o$H.MAXIMUM_INTERVAL);if(!0===n.delete)return d?re$k(t[i],s):void(t[i]=void 0);var f=!1;if(h){if(!e$2b(u=rn(e,n,o)))return;l=u$_(e.packedLength,1),c=u$_(u.length,1),f=!e$2b(n.array)&&"string"!=typeof u&&c>l&&e!==Object}var p="function"==typeof e.unpack&&e!==m$q;if(f||d){var _,m,g=t[i],x=n.epoch;if(e$2b(x)&&(_=a$15.fromIso8601(x)),f&&!d)return g instanceof g$x||(t[i]=g=new g$x(e)),g.addSamplesPackedArray(u,_),void lr$1(n,g);if(!f&&d)return(s=s.clone()).data=h?p?e.unpack(u,0):u:Kr$1(e,a,n),e$2b(g)||(t[i]=g=h?new t$l:new e$A),void(h&&g instanceof t$l?g.intervals.addInterval(s):g instanceof e$A?(h&&(s.data=new e$1I(s.data)),g.intervals.addInterval(s)):(t[i]=g=Cr$1(g),h&&(s.data=new e$1I(s.data)),g.intervals.addInterval(s)));e$2b(g)||(t[i]=g=new e$A),g instanceof e$A||(t[i]=g=Cr$1(g));var v=g.intervals;(!e$2b(m=v.findInterval(s))||!(m.data instanceof g$x))&&((m=s.clone()).data=new g$x(e),v.addInterval(m)),m.data.addSamplesPackedArray(u,_),lr$1(n,m.data)}else t[i]=h?new e$1I(p?e.unpack(u,0):u):Kr$1(e,a,n)}function re$k(e,t){if(e instanceof g$x)e.removeSamples(t);else if(e instanceof t$l)e.intervals.removeInterval(t);else if(e instanceof e$A){for(var i=e.intervals,n=0;n<i.length;++n){var r=d$W.intersect(i.get(n),t,Y$l);r.isEmpty||re$k(r.data,t)}i.removeInterval(t)}else;}function f$t(e,t,i,n,r,o,a){if(e$2b(n))if(Array.isArray(n))for(var s=0,l=n.length;s<l;++s)gr$1(e,t,i,n[s],r,o,a);else gr$1(e,t,i,n,r,o,a)}function ee$k(e,t,i,n,r,o){var a=b$A(i.interval);e$2b(n)&&(a=e$2b(a)?d$W.intersect(a,n,Y$l):n);var s,l=e$2b(i.cartesianVelocity)?1:0,u=o$1p.packedLength*(l+1),c=!e$2b(i.reference),h=e$2b(a)&&!a.equals(o$H.MAXIMUM_INTERVAL);if(!0===i.delete)return h?ne$j(e[t],a):void(e[t]=void 0);var d,f=!1;if(c&&(e$2b(i.referenceFrame)&&(d=Re$k[i.referenceFrame]),d=u$_(d,Re$k.FIXED),f=u$_((s=_r$1(i)).length,1)>u),f||h){var p,_,m=e[t],g=i.epoch;if(e$2b(g)&&(p=a$15.fromIso8601(g)),f&&!h)return(!(m instanceof o$y)||e$2b(d)&&m.referenceFrame!==d)&&(e[t]=m=new o$y(d,l)),m.addSamplesPackedArray(s,p),void lr$1(i,m);if(!f&&h)return(a=a.clone()).data=c?o$1p.unpack(s):U$r(o,i.reference),e$2b(m)||(m=c?new t$m(d):new t$q(d),e[t]=m),void(c&&m instanceof t$m&&e$2b(d)&&m.referenceFrame===d?m.intervals.addInterval(a):m instanceof t$q?(c&&(a.data=new r$U(a.data,d)),m.intervals.addInterval(a)):(e[t]=m=Ur$1(m),c&&(a.data=new r$U(a.data,d)),m.intervals.addInterval(a)));e$2b(m)?m instanceof t$q||(e[t]=m=Ur$1(m)):e[t]=m=new t$q(d);var x=m.intervals;(!e$2b(_=x.findInterval(a))||!(_.data instanceof o$y)||e$2b(d)&&_.data.referenceFrame!==d)&&((_=a.clone()).data=new o$y(d,l),x.addInterval(_)),_.data.addSamplesPackedArray(s,p),lr$1(i,_.data)}else e[t]=c?new r$U(o$1p.unpack(s),d):U$r(o,i.reference)}function ne$j(e,t){if(e instanceof o$y)e.removeSamples(t);else if(e instanceof t$m)e.intervals.removeInterval(t);else if(e instanceof t$q){for(var i=e.intervals,n=0;n<i.length;++n){var r=d$W.intersect(i.get(n),t,Y$l);r.isEmpty||ne$j(r.data,t)}i.removeInterval(t)}else;}function ae$c(e,t,i,n,r,o){if(e$2b(i))if(Array.isArray(i))for(var a=0,s=i.length;a<s;++a)ee$k(e,t,i[a],n,r,o);else ee$k(e,t,i,n,r,o)}function ie$d(e,t,i,n,r,o){var a=b$A(i.interval);e$2b(n)&&(a=e$2b(a)?d$W.intersect(a,n,Y$l):n);var s,l,u,c=e[t];if(e$2b(a)){c instanceof e$z||(c=new e$z,e[t]=c);var h=c.intervals;e$2b(l=h.findInterval({start:a.start,stop:a.stop}))?s=l.data:(l=a.clone(),h.addInterval(l))}else s=c;e$2b(i.solidColor)?(s instanceof t$Q||(s=new t$Q),f$t(e$1U,s,"color",(u=i.solidColor).color,void 0,void 0,o)):e$2b(i.grid)?(s instanceof t$p||(s=new t$p),f$t(e$1U,s,"color",(u=i.grid).color,void 0,r,o),f$t(Number,s,"cellAlpha",u.cellAlpha,void 0,r,o),f$t(o$1o,s,"lineCount",u.lineCount,void 0,r,o),f$t(o$1o,s,"lineThickness",u.lineThickness,void 0,r,o),f$t(o$1o,s,"lineOffset",u.lineOffset,void 0,r,o)):e$2b(i.image)?(s instanceof a$R||(s=new a$R),u=i.image,f$t(Image,s,"image",u.image,void 0,r,o),f$t(o$1o,s,"repeat",u.repeat,void 0,r,o),f$t(e$1U,s,"color",u.color,void 0,r,o),f$t(Boolean,s,"transparent",u.transparent,void 0,r,o)):e$2b(i.stripe)?(s instanceof i$u||(s=new i$u),u=i.stripe,f$t(mr$1,s,"orientation",u.orientation,void 0,r,o),f$t(e$1U,s,"evenColor",u.evenColor,void 0,r,o),f$t(e$1U,s,"oddColor",u.oddColor,void 0,r,o),f$t(Number,s,"offset",u.offset,void 0,r,o),f$t(Number,s,"repeat",u.repeat,void 0,r,o)):e$2b(i.polylineOutline)?(s instanceof e$x||(s=new e$x),f$t(e$1U,s,"color",(u=i.polylineOutline).color,void 0,r,o),f$t(e$1U,s,"outlineColor",u.outlineColor,void 0,r,o),f$t(Number,s,"outlineWidth",u.outlineWidth,void 0,r,o)):e$2b(i.polylineGlow)?(s instanceof t$n||(s=new t$n),f$t(e$1U,s,"color",(u=i.polylineGlow).color,void 0,r,o),f$t(Number,s,"glowPower",u.glowPower,void 0,r,o),f$t(Number,s,"taperPower",u.taperPower,void 0,r,o)):e$2b(i.polylineArrow)?(s instanceof t$o||(s=new t$o),f$t(e$1U,s,"color",(u=i.polylineArrow).color,void 0,void 0,o)):e$2b(i.polylineDash)?(s instanceof o$z||(s=new o$z),f$t(e$1U,s,"color",(u=i.polylineDash).color,void 0,void 0,o),f$t(e$1U,s,"gapColor",u.gapColor,void 0,void 0,o),f$t(Number,s,"dashLength",u.dashLength,void 0,r,o),f$t(Number,s,"dashPattern",u.dashPattern,void 0,r,o)):e$2b(i.checkerboard)&&(s instanceof r$w||(s=new r$w),f$t(e$1U,s,"evenColor",(u=i.checkerboard).evenColor,void 0,r,o),f$t(e$1U,s,"oddColor",u.oddColor,void 0,r,o),f$t(o$1o,s,"repeat",u.repeat,void 0,r,o)),e$2b(l)?l.data=s:e[t]=s}function L$v(e,t,i,n,r,o){if(e$2b(i))if(Array.isArray(i))for(var a=0,s=i.length;a<s;++a)ie$d(e,t,i[a],n,r,o);else ie$d(e,t,i,n,r,o)}function nn(e,t,i,n){e$2b(t.name)&&(e.name=t.name)}function an(e,t,i,n){var r=t.description;e$2b(r)&&f$t(String,e,"description",r,void 0,n,i)}function on(e,t,i,n){var r=t.position;e$2b(r)&&ae$c(e,"position",r,void 0,n,i)}function sn(e,t,i,n){var r=t.viewFrom;e$2b(r)&&f$t(o$1p,e,"viewFrom",r,void 0,n,i)}function fn(e,t,i,n){var r=t.orientation;e$2b(r)&&f$t(n$13,e,"orientation",r,void 0,n,i)}function tn(e,t,i,n){var r=t.properties;if(e$2b(r))for(var o in e$2b(e.properties)||(e.properties=new f$T),r)if(r.hasOwnProperty(o)){e.properties.hasProperty(o)||e.properties.addProperty(o);var a=r[o];if(Array.isArray(a))for(var s=0,l=a.length;s<l;++s)gr$1(jr(a[s]),e.properties,o,a[s],void 0,n,i);else gr$1(jr(a),e.properties,o,a,void 0,n,i)}}function Mr$2(e,t,i,n,r,o,a){var s=i.map((function(e){return U$r(r,e)}));if(e$2b(n)){n=b$A(n);var l=e[t];if(!(l instanceof a)){var u=new a;u.intervals.addInterval(Br(l)),e[t]=l=u}n.data=new o(s),l.intervals.addInterval(n)}else e[t]=new o(s)}function oe$d(e,t,i,n){var r=i.references;e$2b(r)?Mr$2(e,t,r,i.interval,n,i$v,e$A):f$t(Array,e,t,i,void 0,void 0,n)}function se$b(e,t,i,n){if(e$2b(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)oe$d(e,t,i[r],n);else oe$d(e,t,i,n)}function fe$8(e,t,i,n){var r=i.references;e$2b(r)?Mr$2(e,t,r,i.interval,n,n$n,t$q):(e$2b(i.cartesian)?i.array=o$1p.unpackArray(i.cartesian):e$2b(i.cartographicRadians)?i.array=o$1p.fromRadiansArrayHeights(i.cartographicRadians):e$2b(i.cartographicDegrees)&&(i.array=o$1p.fromDegreesArrayHeights(i.cartographicDegrees)),e$2b(i.array)&&f$t(Array,e,t,i,void 0,void 0,n))}function vr$1(e,t,i,n){if(e$2b(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)fe$8(e,t,i[r],n);else fe$8(e,t,i,n)}function dn(e){return o$1p.unpackArray(e)}function un(e){return o$1p.fromRadiansArrayHeights(e)}function hn(e){return o$1p.fromDegreesArrayHeights(e)}function te$f(e,t,i,n){var r=i.references;if(e$2b(r)){var o=r.map((function(e){var t={};return Mr$2(t,"positions",e,i.interval,n,n$n,t$q),t.positions}));e[t]=new n$n(o)}else e$2b(i.cartesian)?i.array=i.cartesian.map(dn):e$2b(i.cartographicRadians)?i.array=i.cartographicRadians.map(un):e$2b(i.cartographicDegrees)&&(i.array=i.cartographicDegrees.map(hn)),e$2b(i.array)&&f$t(Array,e,t,i,void 0,void 0,n)}function mn(e,t,i,n){if(e$2b(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)te$f(e,t,i[r],n);else te$f(e,t,i,n)}function pn(e,t,i,n){var r=t.availability;if(e$2b(r)){var o;if(Array.isArray(r))for(var a=0,s=r.length;a<s;++a)e$2b(o)||(o=new c$z),o.addInterval(b$A(r[a]));else(o=new c$z).addInterval(b$A(r));e.availability=o}}function ln(e,t,i,n,r){!e$2b(t)||f$t(y$t,e,"alignedAxis",t,i,n,r)}function gn(e,t,i,n){var r=t.billboard;if(e$2b(r)){var o=b$A(r.interval),a=e.billboard;e$2b(a)||(e.billboard=a=new n$T),f$t(Boolean,a,"show",r.show,o,n,i),f$t(Image,a,"image",r.image,o,n,i),f$t(Number,a,"scale",r.scale,o,n,i),f$t(o$1o,a,"pixelOffset",r.pixelOffset,o,n,i),f$t(o$1p,a,"eyeOffset",r.eyeOffset,o,n,i),f$t(j$T,a,"horizontalOrigin",r.horizontalOrigin,o,n,i),f$t(S$O,a,"verticalOrigin",r.verticalOrigin,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(e$1U,a,"color",r.color,o,n,i),f$t(m$q,a,"rotation",r.rotation,o,n,i),ln(a,r.alignedAxis,o,n,i),f$t(Boolean,a,"sizeInMeters",r.sizeInMeters,o,n,i),f$t(Number,a,"width",r.width,o,n,i),f$t(Number,a,"height",r.height,o,n,i),f$t(o$Y,a,"scaleByDistance",r.scaleByDistance,o,n,i),f$t(o$Y,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),f$t(o$Y,a,"pixelOffsetScaleByDistance",r.pixelOffsetScaleByDistance,o,n,i),f$t(f$18,a,"imageSubRegion",r.imageSubRegion,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function vn(e,t,i,n){var r=t.box;if(e$2b(r)){var o=b$A(r.interval),a=e.box;e$2b(a)||(e.box=a=new n$S),f$t(Boolean,a,"show",r.show,o,n,i),f$t(o$1p,a,"dimensions",r.dimensions,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function wn(e,t,i,n){var r=t.corridor;if(e$2b(r)){var o=b$A(r.interval),a=e.corridor;e$2b(a)||(e.corridor=a=new n$R),f$t(Boolean,a,"show",r.show,o,n,i),vr$1(a,"positions",r.positions,i),f$t(Number,a,"width",r.width,o,n,i),f$t(Number,a,"height",r.height,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$t(k$P,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$t(ar$5,a,"cornerType",r.cornerType,o,n,i),f$t(Number,a,"granularity",r.granularity,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(_0x3b5200,a,"classificationType",r.classificationType,o,n,i),f$t(Number,a,"zIndex",r.zIndex,o,n,i)}}function Pn(e,t,i,n){var r=t.cylinder;if(e$2b(r)){var o=b$A(r.interval),a=e.cylinder;e$2b(a)||(e.cylinder=a=new n$Q),f$t(Boolean,a,"show",r.show,o,n,i),f$t(Number,a,"length",r.length,o,n,i),f$t(Number,a,"topRadius",r.topRadius,o,n,i),f$t(Number,a,"bottomRadius",r.bottomRadius,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(Number,a,"numberOfVerticalLines",r.numberOfVerticalLines,o,n,i),f$t(Number,a,"slices",r.slices,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function bn(e,t){var i=e.version;if(e$2b(i)&&"string"==typeof i){var n=i.split(".");if(2===n.length){if("1"!==n[0])throw new t$14("SuperMap3D only supports CZML version 1.");t._version=i}}if(!e$2b(t._version))throw new t$14("CZML version information invalid. It is expected to be a property on the document object in the <Major>.<Minor> version format.");var r=t._documentPacket;e$2b(e.name)&&(r.name=e.name);var o=e.clock;if(e$2b(o)){var a=r.clock;e$2b(a)?(a.interval=u$_(o.interval,a.interval),a.currentTime=u$_(o.currentTime,a.currentTime),a.range=u$_(o.range,a.range),a.step=u$_(o.step,a.step),a.multiplier=u$_(o.multiplier,a.multiplier)):r.clock={interval:o.interval,currentTime:o.currentTime,range:o.range,step:o.step,multiplier:o.multiplier}}}function On(e,t,i,n){var r=t.ellipse;if(e$2b(r)){var o=b$A(r.interval),a=e.ellipse;e$2b(a)||(e.ellipse=a=new n$P),f$t(Boolean,a,"show",r.show,o,n,i),f$t(Number,a,"semiMajorAxis",r.semiMajorAxis,o,n,i),f$t(Number,a,"semiMinorAxis",r.semiMinorAxis,o,n,i),f$t(Number,a,"height",r.height,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$t(k$P,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$t(m$q,a,"rotation",r.rotation,o,n,i),f$t(m$q,a,"stRotation",r.stRotation,o,n,i),f$t(Number,a,"granularity",r.granularity,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(Number,a,"numberOfVerticalLines",r.numberOfVerticalLines,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(_0x3b5200,a,"classificationType",r.classificationType,o,n,i),f$t(Number,a,"zIndex",r.zIndex,o,n,i)}}function Tn(e,t,i,n){var r=t.ellipsoid;if(e$2b(r)){var o=b$A(r.interval),a=e.ellipsoid;e$2b(a)||(e.ellipsoid=a=new e$1n),f$t(Boolean,a,"show",r.show,o,n,i),f$t(o$1p,a,"radii",r.radii,o,n,i),f$t(o$1p,a,"innerRadii",r.innerRadii,o,n,i),f$t(Number,a,"minimumClock",r.minimumClock,o,n,i),f$t(Number,a,"maximumClock",r.maximumClock,o,n,i),f$t(Number,a,"minimumCone",r.minimumCone,o,n,i),f$t(Number,a,"maximumCone",r.maximumCone,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(Number,a,"stackPartitions",r.stackPartitions,o,n,i),f$t(Number,a,"slicePartitions",r.slicePartitions,o,n,i),f$t(Number,a,"subdivisions",r.subdivisions,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function An(e,t,i,n){var r=t.label;if(e$2b(r)){var o=b$A(r.interval),a=e.label;e$2b(a)||(e.label=a=new n$O),f$t(Boolean,a,"show",r.show,o,n,i),f$t(String,a,"text",r.text,o,n,i),f$t(String,a,"font",r.font,o,n,i),f$t(R$Q,a,"style",r.style,o,n,i),f$t(Number,a,"scale",r.scale,o,n,i),f$t(Boolean,a,"showBackground",r.showBackground,o,n,i),f$t(e$1U,a,"backgroundColor",r.backgroundColor,o,n,i),f$t(o$1o,a,"backgroundPadding",r.backgroundPadding,o,n,i),f$t(o$1o,a,"pixelOffset",r.pixelOffset,o,n,i),f$t(o$1p,a,"eyeOffset",r.eyeOffset,o,n,i),f$t(j$T,a,"horizontalOrigin",r.horizontalOrigin,o,n,i),f$t(S$O,a,"verticalOrigin",r.verticalOrigin,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(e$1U,a,"fillColor",r.fillColor,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(o$Y,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),f$t(o$Y,a,"pixelOffsetScaleByDistance",r.pixelOffsetScaleByDistance,o,n,i),f$t(o$Y,a,"scaleByDistance",r.scaleByDistance,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function Rn(e,t,i,n){var r=t.model;if(e$2b(r)){var o=b$A(r.interval),a=e.model;e$2b(a)||(e.model=a=new t$J),f$t(Boolean,a,"show",r.show,o,n,i),f$t(h$16,a,"uri",r.gltf,o,n,i),f$t(Number,a,"scale",r.scale,o,n,i),f$t(Number,a,"minimumPixelSize",r.minimumPixelSize,o,n,i),f$t(Number,a,"maximumScale",r.maximumScale,o,n,i),f$t(Boolean,a,"incrementallyLoadTextures",r.incrementallyLoadTextures,o,n,i),f$t(Boolean,a,"runAnimations",r.runAnimations,o,n,i),f$t(Boolean,a,"clampAnimations",r.clampAnimations,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(e$1U,a,"silhouetteColor",r.silhouetteColor,o,n,i),f$t(Number,a,"silhouetteSize",r.silhouetteSize,o,n,i),f$t(e$1U,a,"color",r.color,o,n,i),f$t(I$J,a,"colorBlendMode",r.colorBlendMode,o,n,i),f$t(Number,a,"colorBlendAmount",r.colorBlendAmount,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i);var s,l,u=r.nodeTransformations;if(e$2b(u))if(Array.isArray(u))for(s=0,l=u.length;s<l;++s)de$b(a,u[s],o,n,i);else de$b(a,u,o,n,i);var c=r.articulations;if(e$2b(c))if(Array.isArray(c))for(s=0,l=c.length;s<l;++s)ue$b(a,c[s],o,n,i);else ue$b(a,c,o,n,i)}}function de$b(e,t,i,n,r){var o=b$A(t.interval);e$2b(i)&&(o=e$2b(o)?d$W.intersect(o,i,Y$l):i);for(var a=e.nodeTransformations,s=Object.keys(t),l=0,u=s.length;l<u;++l){var c=s[l];if("interval"!==c){var h=t[c];if(e$2b(h)){e$2b(a)||(e.nodeTransformations=a=new f$T),a.hasProperty(c)||a.addProperty(c);var d=a[c];e$2b(d)||(a[c]=d=new a$N),f$t(o$1p,d,"translation",h.translation,o,n,r),f$t(n$13,d,"rotation",h.rotation,o,n,r),f$t(o$1p,d,"scale",h.scale,o,n,r)}}}}function ue$b(e,t,i,n,r){var o=b$A(t.interval);e$2b(i)&&(o=e$2b(o)?d$W.intersect(o,i,Y$l):i);for(var a=e.articulations,s=Object.keys(t),l=0,u=s.length;l<u;++l){var c=s[l];if("interval"!==c){var h=t[c];!e$2b(h)||(e$2b(a)||(e.articulations=a=new f$T),a.hasProperty(c)||a.addProperty(c),f$t(Number,a,c,h,o,n,r))}}}function xn(e,t,i,n){var r=t.path;if(e$2b(r)){var o=b$A(r.interval),a=e.path;e$2b(a)||(e.path=a=new n$N),f$t(Boolean,a,"show",r.show,o,n,i),f$t(Number,a,"leadTime",r.leadTime,o,n,i),f$t(Number,a,"trailTime",r.trailTime,o,n,i),f$t(Number,a,"width",r.width,o,n,i),f$t(Number,a,"resolution",r.resolution,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function _n(e,t,i,n){var r=t.point;if(e$2b(r)){var o=b$A(r.interval),a=e.point;e$2b(a)||(e.point=a=new n$M),f$t(Boolean,a,"show",r.show,o,n,i),f$t(Number,a,"pixelSize",r.pixelSize,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(e$1U,a,"color",r.color,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(o$Y,a,"scaleByDistance",r.scaleByDistance,o,n,i),f$t(o$Y,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function rr$2(e){this.polygon=e,this._definitionChanged=new o$1h}function Bn(e,t,i,n){var r=t.polygon;if(e$2b(r)){var o=b$A(r.interval),a=e.polygon;e$2b(a)||(e.polygon=a=new l$Z),f$t(Boolean,a,"show",r.show,o,n,i),vr$1(a,"_positions",r.positions,i),mn(a,"_holes",r.holes,i),(e$2b(a._positions)||e$2b(a._holes))&&(a.hierarchy=new rr$2(a)),f$t(Number,a,"height",r.height,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$t(k$P,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$t(m$q,a,"stRotation",r.stRotation,o,n,i),f$t(Number,a,"granularity",r.granularity,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(Boolean,a,"perPositionHeight",r.perPositionHeight,o,n,i),f$t(Boolean,a,"closeTop",r.closeTop,o,n,i),f$t(Boolean,a,"closeBottom",r.closeBottom,o,n,i),f$t(m$1f,a,"arcType",r.arcType,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(_0x3b5200,a,"classificationType",r.classificationType,o,n,i),f$t(Number,a,"zIndex",r.zIndex,o,n,i)}}function Mn(e){return e?m$1f.GEODESIC:m$1f.NONE}function En(e,t,i,n){var r=t.polyline;if(e$2b(r)){var o=b$A(r.interval),a=e.polyline;if(e$2b(a)||(e.polyline=a=new a$L),f$t(Boolean,a,"show",r.show,o,n,i),vr$1(a,"positions",r.positions,i),f$t(Number,a,"width",r.width,o,n,i),f$t(Number,a,"granularity",r.granularity,o,n,i),L$v(a,"material",r.material,o,n,i),L$v(a,"depthFailMaterial",r.depthFailMaterial,o,n,i),f$t(m$1f,a,"arcType",r.arcType,o,n,i),f$t(Boolean,a,"clampToGround",r.clampToGround,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(_0x3b5200,a,"classificationType",r.classificationType,o,n,i),f$t(Number,a,"zIndex",r.zIndex,o,n,i),e$2b(r.followSurface)&&!e$2b(r.arcType)){var s={};f$t(Boolean,s,"followSurface",r.followSurface,o,n,i),a.arcType=Ye$5(s.followSurface,Mn)}}}function Nn(e,t,i,n){var r=t.rectangle;if(e$2b(r)){var o=b$A(r.interval),a=e.rectangle;e$2b(a)||(e.rectangle=a=new n$L),f$t(Boolean,a,"show",r.show,o,n,i),f$t(h$18,a,"coordinates",r.coordinates,o,n,i),f$t(Number,a,"height",r.height,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$t(k$P,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$t(m$q,a,"rotation",r.rotation,o,n,i),f$t(m$q,a,"stRotation",r.stRotation,o,n,i),f$t(Number,a,"granularity",r.granularity,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(_0x3b5200,a,"classificationType",r.classificationType,o,n,i),f$t(Number,a,"zIndex",r.zIndex,o,n,i)}}function Ln(e,t,i,n){var r=t.tileset;if(e$2b(r)){var o=b$A(r.interval),a=e.tileset;e$2b(a)||(e.tileset=a=new i$R),f$t(Boolean,a,"show",r.show,o,n,i),f$t(h$16,a,"uri",r.uri,o,n,i),f$t(Number,a,"maximumScreenSpaceError",r.maximumScreenSpaceError,o,n,i)}}function Sn(e,t,i,n){var r=t.wall;if(e$2b(r)){var o=b$A(r.interval),a=e.wall;e$2b(a)||(e.wall=a=new e$1j),f$t(Boolean,a,"show",r.show,o,n,i),vr$1(a,"positions",r.positions,i),se$b(a,"minimumHeights",r.minimumHeights,i),se$b(a,"maximumHeights",r.maximumHeights,i),f$t(Number,a,"granularity",r.granularity,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function he$a(e,t,i,n,r){var o=e.id;if(e$2b(o)||(o=e$1Q()),xr$2=o,!e$2b(r._version)&&"document"!==o)throw new t$14("The first CZML packet is required to be the document object.");if(!0===e.delete)t.removeById(o);else if("document"===o)bn(e,r);else{var a=t.getOrCreateEntity(o),s=e.parent;e$2b(s)&&(a.parent=t.getOrCreateEntity(s));for(var l=i.length-1;l>-1;l--)i[l](a,e,t,n)}xr$2=void 0}function Hn(e){var t,i=e._documentPacket.clock;if(!e$2b(i)){if(!e$2b(e._clock)){var n=e._entityCollection.computeAvailability();if(!n.start.equals(o$H.MINIMUM_VALUE)){var r=n.start,o=n.stop,a=a$15.secondsDifference(o,r),s=Math.round(a/120);return(t=new e$y).startTime=a$15.clone(r),t.stopTime=a$15.clone(o),t.clockRange=tt$9.LOOP_STOP,t.multiplier=s,t.currentTime=a$15.clone(r),t.clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}e$2b(e._clock)?t=e._clock.clone():((t=new e$y).startTime=o$H.MINIMUM_VALUE.clone(),t.stopTime=o$H.MAXIMUM_VALUE.clone(),t.currentTime=o$H.MINIMUM_VALUE.clone(),t.clockRange=tt$9.LOOP_STOP,t.clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);var l=b$A(i.interval);return e$2b(l)&&(t.startTime=l.start,t.stopTime=l.stop),e$2b(i.currentTime)&&(t.currentTime=a$15.fromIso8601(i.currentTime)),e$2b(i.range)&&(t.clockRange=u$_(tt$9[i.range],tt$9.LOOP_STOP)),e$2b(i.step)&&(t.clockStep=u$_(g$Q[i.step],g$Q.SYSTEM_CLOCK_MULTIPLIER)),e$2b(i.multiplier)&&(t.multiplier=i.multiplier),!t.equals(e._clock)&&(e._clock=t.clone(e._clock),!0)}function me$d(e,t,i,n){if(!e$2b(t))throw new t$16("czml is required.");var r=t,o=(i=u$_(i,u$_.EMPTY_OBJECT)).sourceUri,a=i.credit;if("string"==typeof a&&(a=new r$T(a)),e._credit=a,"string"==typeof t||t instanceof t$11){r=(t=t$11.createIfNeeded(t)).fetchJson(),o=u$_(o,t.clone());var s=e._resourceCredits,l=t.credits;if(e$2b(l))for(var u=l.length,c=0;c<u;c++)s.push(l[c])}return o=t$11.createIfNeeded(o),o$A.setLoading(e,!0),o$1l(r,(function(t){return cn(e,t,o,n)})).otherwise((function(t){return o$A.setLoading(e,!1),e._error.raiseEvent(e,t),console.log(t),o$1l.reject(t)}))}function cn(e,t,i,n){o$A.setLoading(e,!0);var r=e._entityCollection;n&&(e._version=void 0,e._documentPacket=new pe$c,r.removeAll()),E$v._processCzml(t,r,i,void 0,e);var o=Hn(e),a=e._documentPacket;return e$2b(a.name)&&e._name!==a.name?(e._name=a.name,o=!0):!e$2b(e._name)&&e$2b(i)&&(e._name=f$O(i.getUrlComponent()),o=!0),o$A.setLoading(e,!1),o&&e._changed.raiseEvent(e),e}function pe$c(){this.name=void 0,this.clock=void 0}function E$v(e){this._name=e,this._changed=new o$1h,this._error=new o$1h,this._isLoading=!1,this._loading=new o$1h,this._clock=void 0,this._documentPacket=new pe$c,this._version=void 0,this._entityCollection=new r$v(this),this._entityCluster=new a$r,this._credit=void 0,this._resourceCredits=[]}function i$t(){this._dataSources=[],this._dataSourceAdded=new o$1h,this._dataSourceRemoved=new o$1h,this._dataSourceMoved=new o$1h}function c$m(e,t){if(!e$2b(t))throw new t$16("dataSource is required.");var i=e.indexOf(t);if(-1===i)throw new t$16("dataSource is not in this collection.");return i}function h$x(e,t,i){var n=e._dataSources,r=n.length-1;if((t=e$2a.clamp(t,0,r))!==(i=e$2a.clamp(i,0,r))){var o=n[t];n[t]=n[i],n[i]=o,e.dataSourceMoved.raiseEvent(o,i,t)}}function o$x(e){e=u$_(e,u$_.EMPTY_OBJECT),this._primitives=[],this._guid=e$1Q(),this._zIndex=void 0,this.show=u$_(e.show,!0),this.destroyPrimitives=u$_(e.destroyPrimitives,!0)}function a$o(e,t){if(!e.contains(t))throw new t$16("primitive is not in this collection.");return e._primitives.indexOf(t)}function r$t(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}function r$s(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new e$1N}Object.defineProperties(rr$2.prototype,{isConstant:{get:function(){var e=this.polygon._positions,t=this.polygon._holes;return(!e$2b(e)||e.isConstant)&&(!e$2b(t)||t.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}}),rr$2.prototype.getValue=function(e,t){var i,n;return e$2b(this.polygon._positions)&&(i=this.polygon._positions.getValue(e)),e$2b(this.polygon._holes)&&(e$2b(n=this.polygon._holes.getValue(e))&&(n=n.map((function(e){return new e$1J(e)})))),e$2b(t)?(t.positions=i,t.holes=n,t):new e$1J(i,n)},rr$2.prototype.equals=function(e){return this===e||e instanceof rr$2&&r$Z.equals(this.polygon._positions,e.polygon._positions)&&r$Z.equals(this.polygon._holes,e.polygon._holes)},E$v.load=function(e,t){return(new E$v).load(e,t)},Object.defineProperties(E$v.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2b(e))throw new t$16("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),E$v.updaters=[gn,vn,wn,Pn,On,Tn,An,Rn,nn,an,xn,_n,Bn,En,tn,Nn,on,Ln,sn,Sn,fn,pn],E$v.prototype.process=function(e,t){return me$d(this,e,t,!1)},E$v.prototype.load=function(e,t){return me$d(this,e,t,!0)},E$v.processPacketData=f$t,E$v.processPositionPacketData=ae$c,E$v.processMaterialPacketData=L$v,E$v._processCzml=function(e,t,i,n,r){if(n=u$_(n,E$v.updaters),Array.isArray(e))for(var o=0,a=e.length;o<a;++o)he$a(e[o],t,n,i,r);else he$a(e,t,n,i,r)},Object.defineProperties(i$t.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}}),i$t.prototype.add=function(e){if(!e$2b(e))throw new t$16("dataSource is required.");var t=this,i=this._dataSources;return o$1l(e,(function(e){return i===t._dataSources&&(t._dataSources.push(e),t._dataSourceAdded.raiseEvent(t,e)),e}))},i$t.prototype.remove=function(e,t){t=u$_(t,!1);var i=this._dataSources.indexOf(e);if(-1!==i){this._dataSources.splice(i,1);for(var n=0;n<e._entityCollection.values.length;n++){var r=e._entityCollection.values[n];e$2b(r._polygon)&&e$2b(r._polygon.outlines)&&r._polygon.outlines.removeAll(),e$2b(r._polygon)&&e$2b(r._polygon.clampOutlines)&&r.entityCollection._owner._entityCluster._scene._primitives.remove(r._polygon.clampOutlines)}return this._dataSourceRemoved.raiseEvent(this,e),t&&"function"==typeof e.destroy&&e.destroy(),!0}return!1},i$t.prototype.removeAll=function(e){e=u$_(e,!1);for(var t=this._dataSources,i=0,n=t.length;i<n;++i){var r=t[i];this._dataSourceRemoved.raiseEvent(this,r);for(var o=0;o<r._entityCollection.values.length;o++){var a=r._entityCollection.values[o];e$2b(a._polygon)&&e$2b(a._polygon.outlines)&&a._polygon.outlines.removeAll(),e$2b(a._polygon)&&e$2b(a._polygon.clampOutlines)&&a.entityCollection._owner._entityCluster._scene._primitives.remove(a._polygon.clampOutlines)}e&&"function"==typeof r.destroy&&r.destroy()}this._dataSources=[]},i$t.prototype.contains=function(e){return-1!==this.indexOf(e)},i$t.prototype.indexOf=function(e){return this._dataSources.indexOf(e)},i$t.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return this._dataSources[e]},i$t.prototype.getByName=function(e){if(!e$2b(e))throw new t$16("name is required.");return this._dataSources.filter((function(t){return t.name===e}))},i$t.prototype.raise=function(e){var t=c$m(this._dataSources,e);h$x(this,t,t+1)},i$t.prototype.lower=function(e){var t=c$m(this._dataSources,e);h$x(this,t,t-1)},i$t.prototype.raiseToTop=function(e){var t=c$m(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))},i$t.prototype.lowerToBottom=function(e){var t=c$m(this._dataSources,e);0!==t&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))},i$t.prototype.isDestroyed=function(){return!1},i$t.prototype.destroy=function(){return this.removeAll(!0),i$10(this)},Object.defineProperties(o$x.prototype,{length:{get:function(){return this._primitives.length}}}),o$x.prototype.add=function(e){if(!e$2b(e))throw new t$16("primitive is required.");var t=e._external=e._external||{};return(t._composites=t._composites||{})[this._guid]={collection:this},this._primitives.push(e),e},o$x.prototype.remove=function(e){if(this.contains(e)){var t=this._primitives.indexOf(e);if(-1!==t)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this.destroyPrimitives&&e.destroy(),!0}return!1},o$x.prototype.removeAndDestroy=function(e){var t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t},o$x.prototype.removeAll=function(){for(var e=this._primitives,t=e.length,i=0;i<t;++i)delete e[i]._external._composites[this._guid],this.destroyPrimitives&&e[i].destroy();this._primitives=[]},o$x.prototype.contains=function(e){return!!(e$2b(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])},o$x.prototype.raise=function(e){if(e$2b(e)){var t=a$o(this,e),i=this._primitives;if(t!==i.length-1){var n=i[t];i[t]=i[t+1],i[t+1]=n}}},o$x.prototype.raiseToTop=function(e){if(e$2b(e)){var t=a$o(this,e),i=this._primitives;t!==i.length-1&&(i.splice(t,1),i.push(e))}},o$x.prototype.lower=function(e){if(e$2b(e)){var t=a$o(this,e),i=this._primitives;if(0!==t){var n=i[t];i[t]=i[t-1],i[t-1]=n}}},o$x.prototype.lowerToBottom=function(e){if(e$2b(e)){var t=a$o(this,e),i=this._primitives;0!==t&&(i.splice(t,1),i.unshift(e))}},o$x.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return this._primitives[e]},o$x.prototype.update=function(e){if(this.show)for(var t=this._primitives,i=0;i<t.length;++i)t[i].update(e)},o$x.prototype.prePassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var n=t[i];e$2b(n.prePassesUpdate)&&n.prePassesUpdate(e)}},o$x.prototype.updateForPass=function(e,t){for(var i=this._primitives,n=0;n<i.length;++n){var r=i[n];e$2b(r.updateForPass)&&r.updateForPass(e,t)}},o$x.prototype.postPassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var n=t[i];e$2b(n.postPassesUpdate)&&n.postPassesUpdate(e)}},o$x.prototype.isDestroyed=function(){return!1},o$x.prototype.destroy=function(){return this.removeAll(),i$10(this)},Object.defineProperties(r$t.prototype,{length:{get:function(){return this._length}}}),r$t.prototype.add=function(e,t){o$1q.defined("primitive",e),e$2b(t)&&o$1q.typeOf.number("zIndex",t),t=u$_(t,0);var i=this._collections[t];if(!e$2b(i)){(i=new o$x({destroyPrimitives:!1}))._zIndex=t,this._collections[t]=i;for(var n=this._collectionsArray,r=0;r<n.length&&n[r]._zIndex<t;)r++;n.splice(r,0,i)}return i.add(e),this._length++,e._zIndex=t,e},r$t.prototype.set=function(e,t){return o$1q.defined("primitive",e),o$1q.typeOf.number("zIndex",t),t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e},r$t.prototype.remove=function(e,t){if(this.contains(e)){var i,n=e._zIndex,r=this._collections[n];return(i=t?r.remove(e):r.removeAndDestroy(e))&&this._length--,0===r.length&&(this._collectionsArray.splice(this._collectionsArray.indexOf(r),1),this._collections[n]=void 0,r.destroy()),i}return!1},r$t.prototype.removeAll=function(){for(var e=this._collectionsArray,t=0;t<e.length;t++){var i=e[t];i.destroyPrimitives=!0,i.destroy()}this._collections={},this._collectionsArray=[],this._length=0},r$t.prototype.contains=function(e){if(!e$2b(e))return!1;var t=this._collections[e._zIndex];return e$2b(t)&&t.contains(e)},r$t.prototype.update=function(e){if(this.show)for(var t=this._collectionsArray,i=0;i<t.length;i++)t[i].update(e)},r$t.prototype.isDestroyed=function(){return!1},r$t.prototype.destroy=function(){return this.removeAll(),i$10(this)},r$s.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))},r$s.prototype.remove=function(e){var t=e.id,i=this._dynamicUpdaters.get(t);e$2b(i)&&(this._dynamicUpdaters.remove(t),i.destroy())},r$s.prototype.update=function(e){for(var t=this._dynamicUpdaters.values,i=0,n=t.length;i<n;i++)t[i].update(e);return!0},r$s.prototype.removeAllPrimitives=function(){for(var e=this._dynamicUpdaters.values,t=0,i=e.length;t<i;t++)e[t].destroy();this._dynamicUpdaters.removeAll()},r$s.prototype.getBoundingSphere=function(e,t){return e$2b(e=this._dynamicUpdaters.get(e.id))&&e$2b(e.getBoundingSphere)?e.getBoundingSphere(t):R$w.FAILED};var I$B=new e$1U,E$u=o$1p.ZERO,H$z=new o$1p,D$q=new h$18;function L$u(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function u$t(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new L$u(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}function h$w(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(u$t.prototype=Object.create(i$x.prototype),u$t.prototype.constructor=u$t),u$t.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,I$B)),e$2b(t)||(t=e$1U.WHITE),r.color=o$16.fromColor(t));return e$2b(this._options.offsetAttribute)&&(r.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,E$u,H$z))),new d$1o({id:i,geometry:new Y$y(this._options),attributes:r})},u$t.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,I$B),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r),offset:void 0};return e$2b(this._options.offsetAttribute)&&(o.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,E$u,H$z))),new d$1o({id:t,geometry:new M$L(this._options),attributes:o})},u$t.prototype._computeCenter=function(e,t){return r$Z.getValueOrUndefined(this._entity.position,e,t)},u$t.prototype._isHidden=function(e,t){return!e$2b(e.position)||!e$2b(t.semiMajorAxis)||!e$2b(t.semiMinorAxis)||i$F.prototype._isHidden.call(this,e,t)},u$t.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!r$Z.isConstant(t.rotation)||!r$Z.isConstant(t.height)||!r$Z.isConstant(t.extrudedHeight)||!r$Z.isConstant(t.granularity)||!r$Z.isConstant(t.stRotation)||!r$Z.isConstant(t.outlineWidth)||!r$Z.isConstant(t.numberOfVerticalLines)||!r$Z.isConstant(t.zIndex)||this._onTerrain&&!r$Z.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$Q)},u$t.prototype._setStaticOptions=function(e,t){var i=r$Z.getValueOrUndefined(t.height,o$H.MINIMUM_VALUE),n=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),r=r$Z.getValueOrUndefined(t.extrudedHeight,o$H.MINIMUM_VALUE),o=r$Z.getValueOrDefault(t.extrudedHeightReference,o$H.MINIMUM_VALUE,k$P.NONE);e$2b(r)&&!e$2b(i)&&(i=0);var a=this._options;a.vertexFormat=this._materialProperty instanceof t$Q?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,a.center=e.position.getValue(o$H.MINIMUM_VALUE,a.center),a.semiMajorAxis=t.semiMajorAxis.getValue(o$H.MINIMUM_VALUE,a.semiMajorAxis),a.semiMinorAxis=t.semiMinorAxis.getValue(o$H.MINIMUM_VALUE,a.semiMinorAxis),a.rotation=r$Z.getValueOrUndefined(t.rotation,o$H.MINIMUM_VALUE),a.granularity=r$Z.getValueOrUndefined(t.granularity,o$H.MINIMUM_VALUE),a.stRotation=r$Z.getValueOrUndefined(t.stRotation,o$H.MINIMUM_VALUE),a.numberOfVerticalLines=r$Z.getValueOrUndefined(t.numberOfVerticalLines,o$H.MINIMUM_VALUE),a.offsetAttribute=i$x.computeGeometryOffsetAttribute(i,n,r,o),a.height=i$x.getGeometryHeight(i,n),a.outlineWidth=t.outlineWidth?t.outlineWidth.getValue():1,(r=i$x.getGeometryExtrudedHeight(r,o))===i$x.CLAMP_TO_GROUND&&(r=e$1E.getMinimumMaximumHeights(Y$y.computeRectangle(a,D$q)).minimumTerrainHeight),a.extrudedHeight=r},u$t.DynamicGeometryUpdater=h$w,e$2b(Object.create)&&(h$w.prototype=Object.create(a$C.prototype),h$w.prototype.constructor=h$w),h$w.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2b(n.center)||!e$2b(n.semiMajorAxis)||!e$2b(n.semiMinorAxis)||a$C.prototype._isHidden.call(this,e,t,i)},h$w.prototype._setOptions=function(e,t,i){var n=this._options,r=r$Z.getValueOrUndefined(t.height,i),o=r$Z.getValueOrDefault(t.heightReference,i,k$P.NONE),a=r$Z.getValueOrUndefined(t.extrudedHeight,i),s=r$Z.getValueOrDefault(t.extrudedHeightReference,i,k$P.NONE);e$2b(a)&&!e$2b(r)&&(r=0),n.center=r$Z.getValueOrUndefined(e.position,i,n.center),n.semiMajorAxis=r$Z.getValueOrUndefined(t.semiMajorAxis,i),n.semiMinorAxis=r$Z.getValueOrUndefined(t.semiMinorAxis,i),n.rotation=r$Z.getValueOrUndefined(t.rotation,i),n.granularity=r$Z.getValueOrUndefined(t.granularity,i),n.stRotation=r$Z.getValueOrUndefined(t.stRotation,i),n.numberOfVerticalLines=r$Z.getValueOrUndefined(t.numberOfVerticalLines,i),n.offsetAttribute=i$x.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$x.getGeometryHeight(r,o),(a=i$x.getGeometryExtrudedHeight(a,s))===i$x.CLAMP_TO_GROUND&&(a=e$1E.getMinimumMaximumHeights(Y$y.computeRectangle(n,D$q)).minimumTerrainHeight),n.extrudedHeight=a};var pe$b=new t$Q(e$1U.WHITE),G$u=o$1p.ZERO,L$t=new o$1p,ye$8=new o$1p,_e$8=new o$1p,F$v=new e$1U,ve$9=new o$1p(1,1,1);function Ce$7(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function l$z(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new Ce$7(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}function M$w(e,t,i){a$C.call(this,e,t,i),this._scene=e._scene,this._modelMatrix=new p$1d,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new o$1p,this._material={}}e$2b(Object.create)&&(l$z.prototype=Object.create(i$F.prototype),l$z.prototype.constructor=l$z),Object.defineProperties(l$z.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),l$z.prototype.createFillGeometryInstance=function(e,t,i){o$1q.defined("time",e);var n,r,o=this._entity,a=o.isAvailable(e),s=new e$1F(a&&o.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),l=this._distanceDisplayConditionProperty.getValue(e),u={show:s,distanceDisplayCondition:t$B.fromDistanceDisplayCondition(l),color:void 0,offset:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||a)&&(r=this._materialProperty.color.getValue(e,F$v)),e$2b(r)||(r=e$1U.WHITE),n=o$16.fromColor(r),u.color=n);return e$2b(this._options.offsetAttribute)&&(u.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,G$u,L$t))),new d$1o({id:o,geometry:new b$P(this._options),modelMatrix:t?void 0:o.computeModelMatrixForHeightReference(e,o.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:u})},l$z.prototype.createOutlineGeometryInstance=function(e,t,i){o$1q.defined("time",e);var n=this._entity,r=n.isAvailable(e),o=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,F$v),a=this._distanceDisplayConditionProperty.getValue(e),s={show:new e$1F(r&&n.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(o),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(a),offset:void 0};return e$2b(this._options.offsetAttribute)&&(s.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,G$u,L$t))),new d$1o({id:n,geometry:new x$13(this._options),modelMatrix:t?void 0:n.computeModelMatrixForHeightReference(e,n.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:s})},l$z.prototype._computeCenter=function(e,t){return r$Z.getValueOrUndefined(this._entity.position,e,t)},l$z.prototype._isHidden=function(e,t){return!e$2b(e.position)||!e$2b(t.radii)||i$F.prototype._isHidden.call(this,e,t)},l$z.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$Z.isConstant(e.orientation)&&t.radii.isConstant&&r$Z.isConstant(t.innerRadii)&&r$Z.isConstant(t.stackPartitions)&&r$Z.isConstant(t.slicePartitions)&&r$Z.isConstant(t.outlineWidth)&&r$Z.isConstant(t.minimumClock)&&r$Z.isConstant(t.maximumClock)&&r$Z.isConstant(t.minimumCone)&&r$Z.isConstant(t.maximumCone)&&r$Z.isConstant(t.subdivisions))},l$z.prototype._setStaticOptions=function(e,t){var i=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$Q?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,n.radii=t.radii.getValue(o$H.MINIMUM_VALUE,n.radii),n.innerRadii=r$Z.getValueOrUndefined(t.innerRadii,n.radii),n.minimumClock=r$Z.getValueOrUndefined(t.minimumClock,o$H.MINIMUM_VALUE),n.maximumClock=r$Z.getValueOrUndefined(t.maximumClock,o$H.MINIMUM_VALUE),n.minimumCone=r$Z.getValueOrUndefined(t.minimumCone,o$H.MINIMUM_VALUE),n.maximumCone=r$Z.getValueOrUndefined(t.maximumCone,o$H.MINIMUM_VALUE),n.stackPartitions=r$Z.getValueOrUndefined(t.stackPartitions,o$H.MINIMUM_VALUE),n.slicePartitions=r$Z.getValueOrUndefined(t.slicePartitions,o$H.MINIMUM_VALUE),n.subdivisions=r$Z.getValueOrUndefined(t.subdivisions,o$H.MINIMUM_VALUE),n.offsetAttribute=i!==k$P.NONE?_0x58701d.ALL:void 0},l$z.prototype._onEntityPropertyChanged=a$B,l$z.DynamicGeometryUpdater=M$w,e$2b(Object.create)&&(M$w.prototype=Object.create(a$C.prototype),M$w.prototype.constructor=M$w),M$w.prototype.update=function(e){o$1q.defined("time",e);var t=this._entity,i=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!r$Z.getValueOrDefault(i.show,e,!0))return e$2b(this._primitive)&&(this._primitive.show=!1),void(e$2b(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var n=r$Z.getValueOrUndefined(i.radii,e,ye$8),r=e$2b(n)?t.computeModelMatrixForHeightReference(e,i.heightReference,.5*n.z,this._scene.mapProjection.ellipsoid,this._modelMatrix):void 0;if(!e$2b(r)||!e$2b(n))return e$2b(this._primitive)&&(this._primitive.show=!1),void(e$2b(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var o=r$Z.getValueOrDefault(i.fill,e,!0),a=r$Z.getValueOrDefault(i.outline,e,!1),s=r$Z.getValueOrClonedDefault(i.outlineColor,e,e$1U.BLACK,F$v),l=r$C.getValue(e,u$_(i.material,pe$b),this._material),u=r$Z.getValueOrUndefined(i.innerRadii,e,_e$8),c=r$Z.getValueOrUndefined(i.minimumClock,e),h=r$Z.getValueOrUndefined(i.maximumClock,e),d=r$Z.getValueOrUndefined(i.minimumCone,e),f=r$Z.getValueOrUndefined(i.maximumCone,e),p=r$Z.getValueOrUndefined(i.stackPartitions,e),_=r$Z.getValueOrUndefined(i.slicePartitions,e),m=r$Z.getValueOrUndefined(i.subdivisions,e),g=r$Z.getValueOrDefault(i.outlineWidth,e,1),x=r$Z.getValueOrDefault(i.heightReference,e,k$P.NONE),v=x!==k$P.NONE?_0x58701d.ALL:void 0,y=this._scene.mode,$=y===C$13.SCENE3D&&x===k$P.NONE,b=this._options,T=this._geometryUpdater.shadowsProperty.getValue(e),C=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),S=r$Z.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,G$u,L$t);if(!$||this._lastSceneMode!==y||!e$2b(this._primitive)||b.stackPartitions!==p||b.slicePartitions!==_||e$2b(u)&&!o$1p.equals(b.innerRadii!==u)||b.minimumClock!==c||b.maximumClock!==h||b.minimumCone!==d||b.maximumCone!==f||b.subdivisions!==m||this._lastOutlineWidth!==g||b.offsetAttribute!==v){var w=this._primitives;if(w.removeAndDestroy(this._primitive),w.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=y,this._lastOutlineWidth=g,b.stackPartitions=p,b.slicePartitions=_,b.subdivisions=m,b.offsetAttribute=v,b.radii=o$1p.clone($?ve$9:n,b.radii),e$2b(u))if($){var E=o$1p.magnitude(n);b.innerRadii=o$1p.fromElements(u.x/E,u.y/E,u.z/E,b.innerRadii)}else b.innerRadii=o$1p.clone(u,b.innerRadii);else b.innerRadii=void 0;b.minimumClock=c,b.maximumClock=h,b.minimumCone=d,b.maximumCone=f;var P=new t$w({material:l,translucent:l.isTranslucent(),closed:!0});b.vertexFormat=P.vertexFormat;var A=this._geometryUpdater.createFillGeometryInstance(e,$,this._modelMatrix);this._primitive=w.add(new y$S({geometryInstances:A,appearance:P,asynchronous:!1,shadows:T}));var L=this._geometryUpdater.createOutlineGeometryInstance(e,$,this._modelMatrix);this._outlinePrimitive=w.add(new y$S({geometryInstances:L,appearance:new t$R({flat:!0,translucent:255!==L.attributes.color.value[3],renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(g)}}),asynchronous:!1,shadows:T})),this._lastShow=o,this._lastOutlineShow=a,this._lastOutlineColor=e$1U.clone(s,this._lastOutlineColor),this._lastDistanceDisplayCondition=C,this._lastOffset=o$1p.clone(S,this._lastOffset)}else if(this._primitive.ready){var M=this._primitive,R=this._outlinePrimitive;M.show=!0,R.show=!0,M.appearance.material=l;var I=this._attributes;e$2b(I)||(I=M.getGeometryInstanceAttributes(t),this._attributes=I),o!==this._lastShow&&(I.show=e$1F.toValue(o,I.show),this._lastShow=o);var O=this._outlineAttributes;e$2b(O)||(O=R.getGeometryInstanceAttributes(t),this._outlineAttributes=O),a!==this._lastOutlineShow&&(O.show=e$1F.toValue(a,O.show),this._lastOutlineShow=a),e$1U.equals(s,this._lastOutlineColor)||(O.color=o$16.toValue(s,O.color),e$1U.clone(s,this._lastOutlineColor)),r$Y.equals(C,this._lastDistanceDisplayCondition)||(I.distanceDisplayCondition=t$B.toValue(C,I.distanceDisplayCondition),O.distanceDisplayCondition=t$B.toValue(C,O.distanceDisplayCondition),r$Y.clone(C,this._lastDistanceDisplayCondition)),o$1p.equals(S,this._lastOffset)||(I.offset=e$1B.toValue(S,I.offset),O.offset=e$1B.toValue(S,I.offset),o$1p.clone(S,this._lastOffset))}$&&(n.x=Math.max(n.x,.001),n.y=Math.max(n.y,.001),n.z=Math.max(n.z,.001),r=p$1d.multiplyByScale(r,n,r),this._primitive.modelMatrix=r,this._outlinePrimitive.modelMatrix=r)};var R$o=new o$1p,N$k=new e$1U;function z$q(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function p$n(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new z$q(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}function h$v(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(p$n.prototype=Object.create(i$F.prototype),p$n.prototype.constructor=p$n),p$n.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$1F(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=t$B.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$Q?(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,N$k)),e$2b(i)||(i=e$1U.WHITE),t={show:o,distanceDisplayCondition:s,color:o$16.fromColor(i)}):t={show:o,distanceDisplayCondition:s};var l=n.plane,u=this._options,c=n.computeModelMatrix(e),h=r$Z.getValueOrDefault(l.plane,e,u.plane),d=r$Z.getValueOrUndefined(l.dimensions,e,u.dimensions);return u.plane=h,u.dimensions=d,c=O$m(h,d,c,this._scene.mapProjection.ellipsoid,c),new d$1o({id:n,geometry:new f$K(this._options),modelMatrix:c,attributes:t})},p$n.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,N$k),r=this._distanceDisplayConditionProperty.getValue(e),o=t.plane,a=this._options,s=t.computeModelMatrix(e),l=r$Z.getValueOrDefault(o.plane,e,a.plane),u=r$Z.getValueOrUndefined(o.dimensions,e,a.dimensions);return a.plane=l,a.dimensions=u,s=O$m(l,u,s,this._scene.mapProjection.ellipsoid,s),new d$1o({id:t,geometry:new i$H,modelMatrix:s,attributes:{show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r)}})},p$n.prototype._isHidden=function(e,t){return!e$2b(t.plane)||!e$2b(t.dimensions)||!e$2b(e.position)||i$F.prototype._isHidden.call(this,e,t)},p$n.prototype._getIsClosed=function(e){return!1},p$n.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$Z.isConstant(e.orientation)&&t.plane.isConstant&&t.dimensions.isConstant&&r$Z.isConstant(t.outlineWidth))},p$n.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$Q,n=this._options;n.vertexFormat=i?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,n.plane=t.plane.getValue(o$H.MINIMUM_VALUE,n.plane),n.dimensions=t.dimensions.getValue(o$H.MINIMUM_VALUE,n.dimensions)},p$n.DynamicGeometryUpdater=h$v,e$2b(Object.create)&&(h$v.prototype=Object.create(a$C.prototype),h$v.prototype.constructor=h$v),h$v.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2b(r$Z.getValueOrUndefined(e.position,i,R$o))||!e$2b(n.plane)||!e$2b(n.dimensions)||a$C.prototype._isHidden.call(this,e,t,i)},h$v.prototype._setOptions=function(e,t,i){var n=this._options;n.plane=r$Z.getValueOrDefault(t.plane,i,n.plane),n.dimensions=r$Z.getValueOrUndefined(t.dimensions,i,n.dimensions)};var B$o=new o$1p,Q$p=new o$1p,X$j=new o$1p,q$r=new o$1p,W$w=new o$1p,k$o=new n$13,K$n=new p$1e;function O$m(e,t,i,n,r){var o=e.normal,a=e.distance,s=o$1p.multiplyByScalar(o,-a,X$j);s=p$1d.multiplyByPoint(i,s,s);var l=p$1d.multiplyByPointAsVector(i,o,q$r);o$1p.normalize(l,l);var u=n.geodeticSurfaceNormal(s,Q$p);e$2a.equalsEpsilon(Math.abs(o$1p.dot(u,l)),1,e$2a.EPSILON8)&&(u=o$1p.clone(o$1p.UNIT_Z,u),e$2a.equalsEpsilon(Math.abs(o$1p.dot(u,l)),1,e$2a.EPSILON8)&&(u=o$1p.clone(o$1p.UNIT_X,u)));var c=o$1p.cross(u,l,B$o);u=o$1p.cross(l,c,u),o$1p.normalize(c,c),o$1p.normalize(u,u);var h=K$n;p$1e.setColumn(h,0,c,h),p$1e.setColumn(h,1,u,h),p$1e.setColumn(h,2,l,h);var d=n$13.fromRotationMatrix(h,k$o),f=o$1o.clone(t,W$w);return f.z=1,p$1d.fromTranslationQuaternionRotationScale(s,d,f,r)}p$n.createPrimitiveMatrix=O$m;var B$n="Entity polygons cannot have both height and perPositionHeight. height will be ignored",S$p="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",j$t=new e$1U,F$u=o$1p.ZERO,W$v=new o$1p,X$i=new h$18,te$e=[],re$j=new o$1o;function ie$c(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0,this.depthTestEnabled=void 0,this.groundBottomAltitude=void 0,this.groundExtrudedHeight=void 0}function l$y(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new ie$c(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}function v$u(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(l$y.prototype=Object.create(i$x.prototype),l$y.prototype.constructor=l$y),l$y.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=this._options,o={show:new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,j$t)),e$2b(t)||(t=e$1U.WHITE),o.color=o$16.fromColor(t));return e$2b(r.offsetAttribute)&&(o.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,F$u,W$v))),new d$1o({id:i,geometry:r.perPositionHeight&&!e$2b(r.extrudedHeight)?new P$H(r):new z$_(r),attributes:o})},l$y.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=this._options,r=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,j$t),o=this._distanceDisplayConditionProperty.getValue(e),a={show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(r),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(o),offset:void 0};return e$2b(n.offsetAttribute)&&(a.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,F$u,W$v))),new d$1o({id:t,geometry:n.perPositionHeight&&!e$2b(n.extrudedHeight)?new a$G(n):new A$R(n),attributes:a})},l$y.prototype._computeCenter=function(e,t){var i=r$Z.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(e$2b(i)){var n=i.positions;if(0!==n.length){for(var r=this._scene.mapProjection.ellipsoid,o=f$14.fromPoints(n,r),a=o.projectPointsOntoPlane(n,te$e),s=a.length,l=0,u=s-1,c=new o$1o,h=0;h<s;u=h++){var d=a[h],f=a[u],p=d.x*f.y-f.x*d.y,_=o$1o.add(d,f,re$j);_=o$1o.multiplyByScalar(_,p,_),c=o$1o.add(c,_,c),l+=p}var m=1/(3*l);return c=o$1o.multiplyByScalar(c,m,c),o.projectPointOntoEllipsoid(c,t)}}},l$y.prototype._isHidden=function(e,t){return!e$2b(t.hierarchy)||i$F.prototype._isHidden.call(this,e,t)},l$y.prototype._isOnTerrain=function(e,t){var i=i$x.prototype._isOnTerrain.call(this,e,t),n=t.perPositionHeight,r=e$2b(n)&&(!n.isConstant||n.getValue(o$H.MINIMUM_VALUE));return i&&!r},l$y.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!r$Z.isConstant(t.height)||!r$Z.isConstant(t.extrudedHeight)||!r$Z.isConstant(t.granularity)||!r$Z.isConstant(t.stRotation)||!r$Z.isConstant(t.outlineWidth)||!r$Z.isConstant(t.perPositionHeight)||!r$Z.isConstant(t.closeTop)||!r$Z.isConstant(t.closeBottom)||!r$Z.isConstant(t.zIndex)||!r$Z.isConstant(t.arcType)||this._onTerrain&&!r$Z.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$Q)},l$y.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$Q,n=this._options;n.vertexFormat=i?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat;var r,o=t.hierarchy.getValue(o$H.MINIMUM_VALUE),a=r$Z.getValueOrUndefined(t.height,o$H.MINIMUM_VALUE),s=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),l=r$Z.getValueOrUndefined(t.extrudedHeight,o$H.MINIMUM_VALUE),u=r$Z.getValueOrDefault(t.extrudedHeightReference,o$H.MINIMUM_VALUE,k$P.NONE),c=r$Z.getValueOrDefault(t.perPositionHeight,o$H.MINIMUM_VALUE,!1);a=i$x.getGeometryHeight(a,s),c?(e$2b(a)&&(a=void 0,e$1$(B$n)),s!==k$P.NONE&&c&&(a=void 0,e$1$(S$p))):(e$2b(l)&&!e$2b(a)&&(a=0),r=i$x.computeGeometryOffsetAttribute(a,s,l,u)),n.polygonHierarchy=o,n.granularity=r$Z.getValueOrUndefined(t.granularity,o$H.MINIMUM_VALUE),n.stRotation=r$Z.getValueOrUndefined(t.stRotation,o$H.MINIMUM_VALUE),n.perPositionHeight=c,n.closeTop=r$Z.getValueOrDefault(t.closeTop,o$H.MINIMUM_VALUE,!0),n.closeBottom=r$Z.getValueOrDefault(t.closeBottom,o$H.MINIMUM_VALUE,!0),n.offsetAttribute=r,n.height=a,n.arcType=r$Z.getValueOrDefault(t.arcType,o$H.MINIMUM_VALUE,m$1f.GEODESIC),n.depthTestEnabled=!e$2b(e._depthTestEnabled)||e._depthTestEnabled,(l=i$x.getGeometryExtrudedHeight(l,u))===i$x.CLAMP_TO_GROUND&&(l=e$1E.getMinimumMaximumHeights(z$_.computeRectangle(n,X$i)).minimumTerrainHeight),n.extrudedHeight=l,n.groundBottomAltitude=r$Z.getValueOrUndefined(t.groundBottomAltitude,o$H.MINIMUM_VALUE),n.groundExtrudedHeight=r$Z.getValueOrUndefined(t.groundExtrudedHeight,o$H.MINIMUM_VALUE)},l$y.prototype._getIsClosed=function(e){var t=e.height,i=e.extrudedHeight,n=e$2b(i)&&i!==t;return!e.perPositionHeight&&(!n&&0===t||n&&e.closeTop&&e.closeBottom)},l$y.DynamicGeometryUpdater=v$u,e$2b(Object.create)&&(v$u.prototype=Object.create(a$C.prototype),v$u.prototype.constructor=v$u),v$u.prototype._isHidden=function(e,t,i){return!e$2b(this._options.polygonHierarchy)||a$C.prototype._isHidden.call(this,e,t,i)},v$u.prototype._setOptions=function(e,t,i){var n=this._options;n.polygonHierarchy=r$Z.getValueOrUndefined(t.hierarchy,i),Array.isArray(n.polygonHierarchy)&&(n.polygonHierarchy=new e$1J(n.polygonHierarchy));var r,o=r$Z.getValueOrUndefined(t.height,i),a=r$Z.getValueOrDefault(t.heightReference,i,k$P.NONE),s=r$Z.getValueOrDefault(t.extrudedHeightReference,i,k$P.NONE),l=r$Z.getValueOrUndefined(t.extrudedHeight,i),u=r$Z.getValueOrUndefined(t.perPositionHeight,i);o=i$x.getGeometryHeight(o,s),u?(e$2b(o)&&(o=void 0,e$1$(B$n)),a!==k$P.NONE&&u&&(o=void 0,e$1$(S$p))):(e$2b(l)&&!e$2b(o)&&(o=0),r=i$x.computeGeometryOffsetAttribute(o,a,l,s)),n.granularity=r$Z.getValueOrUndefined(t.granularity,i),n.stRotation=r$Z.getValueOrUndefined(t.stRotation,i),n.perPositionHeight=r$Z.getValueOrUndefined(t.perPositionHeight,i),n.closeTop=r$Z.getValueOrDefault(t.closeTop,i,!0),n.closeBottom=r$Z.getValueOrDefault(t.closeBottom,i,!0),n.offsetAttribute=r,n.height=o,n.arcType=r$Z.getValueOrDefault(t.arcType,i,m$1f.GEODESIC),(l=i$x.getGeometryExtrudedHeight(l,s))===i$x.CLAMP_TO_GROUND&&(l=e$1E.getMinimumMaximumHeights(z$_.computeRectangle(n,X$i)).minimumTerrainHeight),n.extrudedHeight=l};var M$v=new e$1U;function A$x(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0,this.enuCenter=void 0}function a$n(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new A$x(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}function l$x(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(a$n.prototype=Object.create(i$F.prototype),a$n.prototype.constructor=a$n),a$n.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$1F(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=t$B.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$Q?(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,M$v)),e$2b(i)||(i=e$1U.WHITE),t={show:o,distanceDisplayCondition:s,color:o$16.fromColor(i)}):t={show:o,distanceDisplayCondition:s};return new d$1o({id:n,geometry:new N$y(this._options),attributes:t})},a$n.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,M$v),r=this._distanceDisplayConditionProperty.getValue(e);return new d$1o({id:t,geometry:new _$z(this._options),attributes:{show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r)}})},a$n.prototype._isHidden=function(e,t){return!e$2b(t.positions)||!e$2b(t.shape)||i$F.prototype._isHidden.call(this,e,t)},a$n.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&t.shape.isConstant&&r$Z.isConstant(t.granularity)&&r$Z.isConstant(t.outlineWidth)&&r$Z.isConstant(t.cornerType))},a$n.prototype._setStaticOptions=function(e,t){var i=t.granularity,n=t.cornerType,r=t.enuCenter,o=this._options,a=this._materialProperty instanceof t$Q;o.vertexFormat=a?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(o$H.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(o$H.MINIMUM_VALUE,o.shape),o.granularity=e$2b(i)?i.getValue(o$H.MINIMUM_VALUE):void 0,o.cornerType=e$2b(n)?n.getValue(o$H.MINIMUM_VALUE):void 0,o.enuCenter=e$2b(r)?r.getValue(o$H.MINIMUM_VALUE):void 0},a$n.DynamicGeometryUpdater=l$x,e$2b(Object.create)&&(l$x.prototype=Object.create(a$C.prototype),l$x.prototype.constructor=l$x),l$x.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2b(n.polylinePositions)||!e$2b(n.shapePositions)||a$C.prototype._isHidden.call(this,e,t,i)},l$x.prototype._setOptions=function(e,t,i){var n=this._options;n.polylinePositions=r$Z.getValueOrUndefined(t.positions,i,n.polylinePositions),n.shapePositions=r$Z.getValueOrUndefined(t.shape,i),n.granularity=r$Z.getValueOrUndefined(t.granularity,i),n.cornerType=r$Z.getValueOrUndefined(t.cornerType,i)};var D$p=new e$1U,G$t=o$1p.ZERO,E$t=new o$1p,w$q=new h$18,S$o=new h$18,F$t=new a$18;function j$s(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function d$B(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new j$s(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}function h$u(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(d$B.prototype=Object.create(i$x.prototype),d$B.prototype.constructor=d$B),d$B.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,D$p)),e$2b(t)||(t=e$1U.WHITE),r.color=o$16.fromColor(t));return e$2b(this._options.offsetAttribute)&&(r.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,G$t,E$t))),new d$1o({id:i,geometry:new j$N(this._options),attributes:r})},d$B.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,D$p),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r),offset:void 0};return e$2b(this._options.offsetAttribute)&&(o.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,G$t,E$t))),new d$1o({id:t,geometry:new k$G(this._options),attributes:o})},d$B.prototype._computeCenter=function(e,t){var i=r$Z.getValueOrUndefined(this._entity.rectangle.coordinates,e,S$o);if(e$2b(i)){var n=h$18.center(i,F$t);return a$18.toCartesian(n,t$13.WGS84,t)}},d$B.prototype._isHidden=function(e,t){return!e$2b(t.coordinates)||i$F.prototype._isHidden.call(this,e,t)},d$B.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!r$Z.isConstant(t.height)||!r$Z.isConstant(t.extrudedHeight)||!r$Z.isConstant(t.granularity)||!r$Z.isConstant(t.stRotation)||!r$Z.isConstant(t.rotation)||!r$Z.isConstant(t.outlineWidth)||!r$Z.isConstant(t.zIndex)||this._onTerrain&&!r$Z.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$Q)},d$B.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$Q,n=r$Z.getValueOrUndefined(t.height,o$H.MINIMUM_VALUE),r=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),o=r$Z.getValueOrUndefined(t.extrudedHeight,o$H.MINIMUM_VALUE),a=r$Z.getValueOrDefault(t.extrudedHeightReference,o$H.MINIMUM_VALUE,k$P.NONE);e$2b(o)&&!e$2b(n)&&(n=0);var s=this._options;s.vertexFormat=i?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,s.rectangle=t.coordinates.getValue(o$H.MINIMUM_VALUE,s.rectangle),s.granularity=r$Z.getValueOrUndefined(t.granularity,o$H.MINIMUM_VALUE),s.stRotation=r$Z.getValueOrUndefined(t.stRotation,o$H.MINIMUM_VALUE),s.rotation=r$Z.getValueOrUndefined(t.rotation,o$H.MINIMUM_VALUE),s.offsetAttribute=i$x.computeGeometryOffsetAttribute(n,r,o,a),s.height=i$x.getGeometryHeight(n,r),(o=i$x.getGeometryExtrudedHeight(o,a))===i$x.CLAMP_TO_GROUND&&(o=e$1E.getMinimumMaximumHeights(j$N.computeRectangle(s,w$q)).minimumTerrainHeight),s.extrudedHeight=o},d$B.DynamicGeometryUpdater=h$u,e$2b(Object.create)&&(h$u.prototype=Object.create(a$C.prototype),h$u.prototype.constructor=h$u),h$u.prototype._isHidden=function(e,t,i){return!e$2b(this._options.rectangle)||a$C.prototype._isHidden.call(this,e,t,i)},h$u.prototype._setOptions=function(e,t,i){var n=this._options,r=r$Z.getValueOrUndefined(t.height,i),o=r$Z.getValueOrDefault(t.heightReference,i,k$P.NONE),a=r$Z.getValueOrUndefined(t.extrudedHeight,i),s=r$Z.getValueOrDefault(t.extrudedHeightReference,i,k$P.NONE);e$2b(a)&&!e$2b(r)&&(r=0),n.rectangle=r$Z.getValueOrUndefined(t.coordinates,i,n.rectangle),n.granularity=r$Z.getValueOrUndefined(t.granularity,i),n.stRotation=r$Z.getValueOrUndefined(t.stRotation,i),n.rotation=r$Z.getValueOrUndefined(t.rotation,i),n.offsetAttribute=i$x.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$x.getGeometryHeight(r,o),(a=i$x.getGeometryExtrudedHeight(a,s))===i$x.CLAMP_TO_GROUND&&(a=e$1E.getMinimumMaximumHeights(j$N.computeRectangle(n,w$q)).minimumTerrainHeight),n.extrudedHeight=a};var W$u=new e$1U,Y$k=new r$Y,$$q=new r$Y,ee$j=o$1p.ZERO,te$d=new o$1p;function v$t(e,t,i,n,r,o,a){var s;this.translucent=t,this.appearanceType=i,this.depthFailAppearanceType=n,this.depthFailMaterialProperty=r,this.depthFailMaterial=void 0,this.closed=o,this.shadows=a,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1N,this.updaters=new e$1N,this.updatersWithAttributes=new e$1N,this.attributes=new e$1N,this.subscriptions=new e$1N,this.showsUpdated=new e$1N,this.itemsToRemove=[],this.invalidated=!1,this.asynchronous=!0,e$2b(r)&&(s=r.definitionChanged.addEventListener(v$t.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=s}function y$s(e,t,i,n,r){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=n,this._shadows=r}function q$q(e,t){for(var i=e.length-1;i>=0;i--){var n=e[i];if(n.remove(t))return 0===n.updaters.length&&(e.splice(i,1),n.destroy()),!0}return!1}function L$s(e,t,i){for(var n=!1,r=t.length,o=0;o<r;++o){var a=t[o],s=a.itemsToRemove,l=s.length;if(l>0)for(o=0;o<l;o++){var u=s[o];a.remove(u),e.add(i,u),n=!0}}return n}function C$s(e,t,i,n){var r,o=t.length;for(r=o-1;r>=0;r--){var a=t[r];if(a.invalidated){t.splice(r,1);for(var s=a.updaters.values,l=s.length,u=0;u<l;u++)e.add(i,s[u]);a.destroy()}}for(o=t.length,r=0;r<o;++r)n=t[r].update(i)&&n;return n}function N$j(e,t,i){for(var n=e.length,r=0;r<n;r++){var o=e[r];if(o.contains(t))return o.getBoundingSphere(t,i)}return R$w.FAILED}function x$u(e){for(var t=e.length,i=0;i<t;i++)e[i].destroy();e.length=0}v$t.prototype.onMaterialChanged=function(){this.invalidated=!0},v$t.prototype.isMaterial=function(e){var t=this.depthFailMaterialProperty,i=e.depthFailMaterialProperty;return i===t||!!e$2b(t)&&t.equals(i)},v$t.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,e$2b(e.asynchronous)&&(this.asynchronous=e.asynchronous),this.enuCenter=e._options&&e._options.enuCenter,e$2b(this.enuCenter)&&(this.materialSupport=t$R.MaterialSupport.FLOAT_POSITION),this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&r$Z.isConstant(e.distanceDisplayConditionProperty)&&r$Z.isConstant(e.terrainOffsetProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},v$t.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2b(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},v$t.prototype.update=function(e){var t,i=!0,n=0,r=this.primitive,o=this.primitives;if(this.createPrimitive){var a=this.geometry.values;if(a.length>0){var s;e$2b(r)&&(e$2b(this.oldPrimitive)?o.remove(r):this.oldPrimitive=r),e$2b(this.depthFailAppearanceType)&&(e$2b(this.depthFailMaterialProperty)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),s=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),(r=new y$S({show:!1,asynchronous:this.asynchronous,geometryInstances:a,appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed,materialSupport:this.materialSupport,renderState:{depthTest:{enabled:this._depthTestEnabled}}}),depthFailAppearance:s,shadows:this.shadows,updateBoundingSphere:!e$2b(this.enuCenter),modelMatrix:e$2b(this.enuCenter)?m$17.eastNorthUpToFixedFrame(this.enuCenter,t$13.WGS84,new p$1d):void 0}))._polygonOffset=this.polygonOffset,o.add(r),i=!1}else{e$2b(r)&&(o.remove(r),r=void 0);var l=this.oldPrimitive;e$2b(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(e$2b(r)&&r.ready){r.show=!0,e$2b(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),e$2b(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof t$Q)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);var u=this.updatersWithAttributes.values,c=u.length,h=this.waitingOnCreate;for(t=0;t<c;t++){var d=u[t],f=this.geometry.get(d.id),p=this.attributes.get(f.id.id);if(e$2b(p)||(p=r.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,p)),!d.fillMaterialProperty.isConstant||h){var _=d.fillMaterialProperty.color,m=r$Z.getValueOrDefault(_,e,e$1U.WHITE,W$u);e$1U.equals(p._lastColor,m)||(p._lastColor=e$1U.clone(m,p._lastColor),p.color=o$16.toValue(m,p.color),(this.translucent&&255===p.color[3]||!this.translucent&&255!==p.color[3])&&(this.itemsToRemove[n++]=d))}if(e$2b(this.depthFailAppearanceType)&&d.depthFailMaterialProperty instanceof t$Q&&(!d.depthFailMaterialProperty.isConstant||h)){var g=d.depthFailMaterialProperty.color,x=r$Z.getValueOrDefault(g,e,e$1U.WHITE,W$u);e$1U.equals(p._lastDepthFailColor,x)||(p._lastDepthFailColor=e$1U.clone(x,p._lastDepthFailColor),p.depthFailColor=o$16.toValue(x,p.depthFailColor))}var v=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e));v!==(1===p.show[0])&&(p.show=e$1F.toValue(v,p.show));var y=d.distanceDisplayConditionProperty;if(!r$Z.isConstant(y)){var $=r$Z.getValueOrDefault(y,e,$$q,Y$k);r$Y.equals($,p._lastDistanceDisplayCondition)||(p._lastDistanceDisplayCondition=r$Y.clone($,p._lastDistanceDisplayCondition),p.distanceDisplayCondition=t$B.toValue($,p.distanceDisplayCondition))}var b=d.terrainOffsetProperty;if(!r$Z.isConstant(b)){var T=r$Z.getValueOrDefault(b,e,ee$j,te$d);o$1p.equals(T,p._lastOffset)||(p._lastOffset=o$1p.clone(T,p._lastOffset),p.offset=e$1B.toValue(T,p.offset))}}this.updateShows(r),this.waitingOnCreate=!1}else e$2b(r)&&!r.ready&&(i=!1);return this.itemsToRemove.length=n,i},v$t.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);e$2b(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$1F.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},v$t.prototype.contains=function(e){return this.updaters.contains(e.id)},v$t.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2b(n)||!e$2b(n.boundingSphere)||e$2b(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},v$t.prototype.destroy=function(){var e=this.primitive,t=this.primitives;e$2b(e)&&t.remove(e);var i=this.oldPrimitive;e$2b(i)&&t.remove(i),e$2b(this.removeMaterialSubscription)&&this.removeMaterialSubscription()},y$s.prototype.add=function(e,t){var i,n,r=t.createFillGeometryInstance(e);255===r.attributes.color.value[3]?(i=this._solidItems,n=!1):(i=this._translucentItems,n=!0);for(var o=i.length,a=0;a<o;a++){var s=i[a];if(this.enuCenter)break;if(!s._hasEnuCenter&&s.isMaterial(t))return void s.add(t,r)}var l=new v$t(this._primitives,n,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);l._hasEnuCenter=t._options&&!!t._options.enuCenter,l._depthTestEnabled=!e$2b(t._options)||!e$2b(t._options.depthTestEnabled)||t._options.depthTestEnabled,l.polygonOffset=t._entity._polygonOffset,l.add(t,r),i.push(l)},y$s.prototype.remove=function(e){q$q(this._solidItems,e)||q$q(this._translucentItems,e)},y$s.prototype.update=function(e){var t=C$s(this,this._solidItems,e,!0);t=C$s(this,this._translucentItems,e,t)&&t;var i=L$s(this,this._solidItems,e),n=L$s(this,this._translucentItems,e);return(i||n)&&(t=C$s(this,this._solidItems,e,t)&&t,t=C$s(this,this._translucentItems,e,t)&&t),t},y$s.prototype.getBoundingSphere=function(e,t){var i=N$j(this._solidItems,e,t);return i===R$w.FAILED?N$j(this._translucentItems,e,t):i},y$s.prototype.removeAllPrimitives=function(){x$u(this._solidItems),x$u(this._translucentItems)};var J$m=new r$Y,K$m=new r$Y,Q$o=o$1p.ZERO,Y$j=new o$1p;function p$m(e,t,i,n,r,o,a){this.primitives=e,this.appearanceType=t,this.materialProperty=i,this.depthFailAppearanceType=n,this.depthFailMaterialProperty=r,this.closed=o,this.shadows=a,this.updaters=new e$1N,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1N,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new e$1N,this.attributes=new e$1N,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(p$m.prototype.onMaterialChanged,this),this.subscriptions=new e$1N,this.showsUpdated=new e$1N,this.materialSupport=void 0,this.asynchronous=!0,this.wrapS=q$19.CLAMP_TO_EDGE,this.wrapT=q$19.CLAMP_TO_EDGE,this.compressVertices=!0}p$m.prototype.onMaterialChanged=function(){},p$m.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty,n=this.depthFailMaterialProperty,r=e.depthFailMaterialProperty;if(i===t&&r===n)return!0;var o=e$2b(t)&&t.equals(i);return o=(!e$2b(n)&&!e$2b(r)||e$2b(n)&&n.equals(r))&&o},p$m.prototype.add=function(e,t){var i=t.id;this.updaters.set(i,t);var n=t.createFillGeometryInstance(e);if("unResolve"===n?(this.invalidated=!0,this.geometry.set(i,null)):this.geometry.set(i,n),this.enuCenter=e$2b(t._options)?t._options.enuCenter:void 0,e$2b(this.enuCenter)&&(this.materialSupport=t$w.MaterialSupport.TEXTUREDMODEL),e$2b(t.asynchronous)&&(this.asynchronous=t.asynchronous),e$2b(t.wrapS)&&(this.wrapS=t.wrapS),e$2b(t.wrapT)&&(this.wrapT=t.wrapT),e$2b(t.compressVertices)&&(this.compressVertices=t.compressVertices),this.twoPasses=t.twoPasses,t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$Z.isConstant(t.distanceDisplayConditionProperty)&&r$Z.isConstant(t.terrainOffsetProperty)){var r=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(i,t);this.createPrimitive=!0},p$m.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2b(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};var $$p=new e$1U;p$m.prototype.update=function(e){for(var t=!0,i=this.primitive,n=this.primitives,r=this.geometry.values,o=0;o<r.length;o++)null===r[o]&&(r.splice(o,1),o--);if(0===r.length&&(this.createPrimitive=!1),this.createPrimitive){if(r.length>0){var a;if(e$2b(i)&&(e$2b(this.oldPrimitive)?n.remove(i):this.oldPrimitive=i),this.material=r$C.getValue(e,this.materialProperty,this.material),this.material._wrapS=this.wrapS,this.material._wrapT=this.wrapT,e$2b(this.depthFailMaterialProperty)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),r.length>1){var s=r[0].modelMatrix,l=p$1d.inverse(r[0].modelMatrix,new p$1d);for(o=1;o<r.length;o++)!p$1d.equals(s,r[o].modelMatrix)&&e$2b(r[o].id.geometry)&&(ee$i(r[o].modelMatrix,r[o].geometry.attributes.position,l),r[o].modelMatrix=s,r[o].geometry.boundingSphere=i$1c.fromVertices(r[o].geometry.attributes.position.values,new o$1p(0,0,0),3))}i=new y$S({show:!1,asynchronous:this.asynchronous,geometryInstances:r,appearance:new this.appearanceType({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed,materialSupport:this.materialSupport}),depthFailAppearance:a,shadows:this.shadows,updateBoundingSphere:!e$2b(this.enuCenter),modelMatrix:e$2b(this.enuCenter)?m$17.eastNorthUpToFixedFrame(this.enuCenter,t$13.WGS84,new p$1d):void 0,twoPasses:this.twoPasses,compressVertices:this.compressVertices}),n.add(i),t=!1}else{e$2b(i)&&(n.remove(i),i=void 0);var u=this.oldPrimitive;e$2b(u)&&(n.remove(u),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1}else if(e$2b(i)&&i.ready){i.show=!0,e$2b(this.oldPrimitive)&&(n.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=r$C.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,e$2b(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof t$Q)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);var c=this.updatersWithAttributes.values,h=c.length;for(o=0;o<h;o++){var d=c[o],f=d.entity,p=this.geometry.get(d.id),_=this.attributes.get(p.id.id);if(e$2b(_)||(_=i.getGeometryInstanceAttributes(p.id),this.attributes.set(p.id.id,_)),e$2b(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof t$Q&&!d.depthFailMaterialProperty.isConstant){var m=d.depthFailMaterialProperty.color,g=r$Z.getValueOrDefault(m,e,e$1U.WHITE,$$p);e$1U.equals(_._lastDepthFailColor,g)||(_._lastDepthFailColor=e$1U.clone(g,_._lastDepthFailColor),_.depthFailColor=o$16.toValue(g,_.depthFailColor))}var x=f.isShowing&&(d.hasConstantFill||d.isFilled(e));x!==(1===_.show[0])&&(_.show=e$1F.toValue(x,_.show));var v=d.distanceDisplayConditionProperty;if(!r$Z.isConstant(v)){var y=r$Z.getValueOrDefault(v,e,K$m,J$m);r$Y.equals(y,_._lastDistanceDisplayCondition)||(_._lastDistanceDisplayCondition=r$Y.clone(y,_._lastDistanceDisplayCondition),_.distanceDisplayCondition=t$B.toValue(y,_.distanceDisplayCondition))}var $=d.terrainOffsetProperty;if(!r$Z.isConstant($)){var b=r$Z.getValueOrDefault($,e,Q$o,Y$j);o$1p.equals(b,_._lastOffset)||(_._lastOffset=o$1p.clone(b,_._lastOffset),_.offset=e$1B.toValue(b,_.offset))}}this.updateShows(i)}else e$2b(i)&&!i.ready&&(t=!1);return t};var M$u=new o$1p;function ee$i(e,t,i){if(e$2b(t))for(var n=t.values,r=n.length,o=0;o<r;o+=3){o$1p.unpack(n,o,M$u),p$1d.multiplyByPoint(e,M$u,M$u);var a=p$1d.multiplyByPoint(i,M$u,new o$1p);o$1p.pack(a,n,o)}}function u$s(e,t,i,n,r){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=n,this._shadows=r}p$m.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);e$2b(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$1F.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},p$m.prototype.contains=function(e){return this.updaters.contains(e.id)},p$m.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!e$2b(i)||!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2b(n)||!e$2b(n.boundingSphere)||e$2b(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},p$m.prototype.destroy=function(){var e=this.primitive,t=this.primitives;e$2b(e)&&t.remove(e);var i=this.oldPrimitive;e$2b(i)&&t.remove(i),this.removeMaterialSubscription()},u$s.prototype.add=function(e,t){var i=this._items,n=i.length;if(t instanceof a$n&&e$2b(t.entity._polylineVolume.enuCenter))if(0===i.length){(a=new p$m(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),a.enuCenter=t.entity._polylineVolume.enuCenter._value,i.push(a)}else{for(var r=0;r<n;r++){var o=i[r];if(o$1p.equals(o.enuCenter,t.entity._polylineVolume.enuCenter._value))return void o.add(e,t)}(a=new p$m(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),a.enuCenter=t.entity._polylineVolume.enuCenter._value,i.push(a)}else{for(r=0;r<n;r++){if((o=i[r]).isMaterial(t))return void o.add(e,t)}var a;(a=new p$m(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),i.push(a)}},u$s.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},u$s.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},u$s.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},u$s.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var x$t=new e$1U,E$s=new r$Y,F$s=new r$Y;function d$A(e,t,i,n){this.primitives=e,this.zIndex=n,this.classificationType=t,this.color=i,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1N,this.updaters=new e$1N,this.updatersWithAttributes=new e$1N,this.attributes=new e$1N,this.subscriptions=new e$1N,this.showsUpdated=new e$1N,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new r$G}function p$l(e,t){this._batches=[],this._primitives=e,this._classificationType=t}d$A.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},d$A.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),this.rectangleCollisionCheck.insert(i,t.geometry.rectangle),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&r$Z.isConstant(e.distanceDisplayConditionProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},d$A.prototype.remove=function(e){var t=e.id,i=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,i.geometry.rectangle),this.updatersWithAttributes.remove(t);var n=this.subscriptions.get(t);return e$2b(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},d$A.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.primitives;if(this.createPrimitive){var o=this.geometry.values;if(o.length>0)e$2b(n)&&(e$2b(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),n=new d$14({show:!1,asynchronous:!0,geometryInstances:o.slice(),classificationType:this.classificationType}),r.add(n,this.zIndex),i=!1;else{e$2b(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;e$2b(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(e$2b(n)&&n.ready){n.show=!0,e$2b(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0);var s=this.updatersWithAttributes.values,l=s.length,u=this.waitingOnCreate;for(t=0;t<l;t++){var c=s[t],h=this.geometry.get(c.id),d=this.attributes.get(h.id.id);if(e$2b(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d)),!c.fillMaterialProperty.isConstant||u){var f=c.fillMaterialProperty.color,p=r$Z.getValueOrDefault(f,e,e$1U.WHITE,x$t);e$1U.equals(d._lastColor,p)||(d._lastColor=e$1U.clone(p,d._lastColor),d.color=o$16.toValue(p,d.color))}var _=c.entity.isShowing&&(c.hasConstantFill||c.isFilled(e));_!==(1===d.show[0])&&(d.show=e$1F.toValue(_,d.show));var m=c.distanceDisplayConditionProperty;if(!r$Z.isConstant(m)){var g=r$Z.getValueOrDefault(m,e,F$s,E$s);r$Y.equals(g,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=r$Y.clone(g,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=t$B.toValue(g,d.distanceDisplayCondition))}}this.updateShows(n),this.waitingOnCreate=!1}else e$2b(n)&&!n.ready&&(i=!1);return this.itemsToRemove.length=0,i},d$A.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);e$2b(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$1F.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},d$A.prototype.contains=function(e){return this.updaters.contains(e.id)},d$A.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getBoundingSphere(e.entity);return e$2b(n)?(n.clone(t),R$w.DONE):R$w.FAILED},d$A.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;e$2b(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;e$2b(i)&&(e.remove(i),this.oldPrimitive=void 0)},p$l.prototype.add=function(e,t){for(var i,n=t.createFillGeometryInstance(e),r=this._batches,o=r$Z.getValueOrDefault(t.zIndex,0),a=r.length,s=0;s<a;++s){var l=r[s];if(l.zIndex===o&&!l.overlapping(n.geometry.rectangle)){i=l;break}}return e$2b(i)||(i=new d$A(this._primitives,this._classificationType,n.attributes.color.value,o),r.push(i)),i.add(t,n),i},p$l.prototype.remove=function(e){for(var t=this._batches,i=t.length,n=0;n<i;++n)if(t[n].remove(e))return},p$l.prototype.update=function(e){var t,i,n=!0,r=this._batches,o=r.length;for(t=0;t<o;++t)n=r[t].update(e)&&n;for(t=0;t<o;++t)for(var a=r[t],s=a.itemsToRemove,l=s.length,u=0;u<l;u++){i=s[u],a.remove(i);var c=this.add(e,i);a.isDirty=!0,c.isDirty=!0}for(t=o-1;t>=0;--t){var h=r[t];h.isDirty&&(n=r[t].update(e)&&n,h.isDirty=!1),0===h.geometry.length&&r.splice(t,1)}return n},p$l.prototype.getBoundingSphere=function(e,t){for(var i=this._batches,n=i.length,r=0;r<n;++r){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},p$l.prototype.removeAllPrimitives=function(){for(var e=this._batches,t=e.length,i=0;i<t;++i)e[i].removeAllPrimitives()};var b$z=new r$Y,U$q=new r$Y;function v$s(e,t,i,n,r,o){this.primitives=e,this.classificationType=t,this.appearanceType=i,this.materialProperty=n,this.updaters=new e$1N,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1N,this.material=void 0,this.updatersWithAttributes=new e$1N,this.attributes=new e$1N,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(v$s.prototype.onMaterialChanged,this),this.subscriptions=new e$1N,this.showsUpdated=new e$1N,this.usingSphericalTextureCoordinates=r,this.zIndex=o,this.rectangleCollisionCheck=new r$G}function f$s(e,t,i){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=i}v$s.prototype.onMaterialChanged=function(){this.invalidated=!0},v$s.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},v$s.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty;return i===t||i instanceof t$Q&&t instanceof t$Q||e$2b(t)&&t.equals(i)},v$s.prototype.add=function(e,t,i){var n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,i),this.rectangleCollisionCheck.insert(n,i.geometry.rectangle),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$Z.isConstant(t.distanceDisplayConditionProperty)){var r=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},v$s.prototype.remove=function(e){var t=e.id,i=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,i.geometry.rectangle),this.updatersWithAttributes.remove(t);var n=this.subscriptions.get(t);return e$2b(n)&&(n(),this.subscriptions.remove(t)),!0}return!1},v$s.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.primitives,o=this.geometry.values;if(this.createPrimitive){if(o.length>0)e$2b(n)&&(e$2b(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),this.material=r$C.getValue(e,this.materialProperty,this.material),n=new d$14({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({material:this.material}),classificationType:this.classificationType}),r.add(n,this.zIndex),i=!1;else{e$2b(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;e$2b(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(e$2b(n)&&n.ready){n.show=!0,e$2b(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=r$C.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;var s=this.updatersWithAttributes.values,l=s.length;for(t=0;t<l;t++){var u=s[t],c=u.entity,h=this.geometry.get(u.id),d=this.attributes.get(h.id.id);e$2b(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d));var f=c.isShowing&&(u.hasConstantFill||u.isFilled(e));f!==(1===d.show[0])&&(d.show=e$1F.toValue(f,d.show));var p=u.distanceDisplayConditionProperty;if(!r$Z.isConstant(p)){var _=r$Z.getValueOrDefault(p,e,U$q,b$z);r$Y.equals(_,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=r$Y.clone(_,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=t$B.toValue(_,d.distanceDisplayCondition))}}this.updateShows(n)}else e$2b(n)&&!n.ready&&(i=!1);return i},v$s.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);e$2b(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$1F.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},v$s.prototype.contains=function(e){return this.updaters.contains(e.id)},v$s.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2b(n)||!e$2b(n.boundingSphere)||e$2b(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},v$s.prototype.destroy=function(){var e=this.primitive,t=this.primitives;e$2b(e)&&t.remove(e);var i=this.oldPrimitive;e$2b(i)&&t.remove(i),this.removeMaterialSubscription()},f$s.prototype.add=function(e,t){for(var i=this._items,n=i.length,r=t.createFillGeometryInstance(e),o=y$R.shouldUseSphericalCoordinates(r.geometry.rectangle),a=r$Z.getValueOrDefault(t.zIndex,0),s=0;s<n;++s){var l=i[s];if(l.isMaterial(t)&&l.usingSphericalTextureCoordinates===o&&l.zIndex===a&&!l.overlapping(r.geometry.rectangle))return void l.add(e,t,r)}var u=new v$s(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,o,a);u.add(e,t,r),i.push(u)},f$s.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},f$s.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},f$s.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},f$s.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var x$s=new e$1U,F$r=new r$Y,H$y=new r$Y,Z$o=o$1p.ZERO,j$r=new o$1p;function c$l(e,t,i,n){this.translucent=t,this.width=i,this.shadows=n,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1N,this.updaters=new e$1N,this.updatersWithAttributes=new e$1N,this.attributes=new e$1N,this.itemsToRemove=[],this.subscriptions=new e$1N,this.showsUpdated=new e$1N}function y$r(e,t,i){this._primitives=e,this._scene=t,this._shadows=i,this._solidBatches=new e$1N,this._translucentBatches=new e$1N}c$l.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantOutline&&e.outlineColorProperty.isConstant&&r$Z.isConstant(e.distanceDisplayConditionProperty)&&r$Z.isConstant(e.terrainOffsetProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},c$l.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2b(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},c$l.prototype.update=function(e){var t,i=!0,n=0,r=this.primitive,o=this.primitives;if(this.createPrimitive){var a=this.geometry.values;if(a.length>0)e$2b(r)&&(e$2b(this.oldPrimitive)?o.remove(r):this.oldPrimitive=r),r=new y$S({show:!1,asynchronous:!0,geometryInstances:a,appearance:new t$R({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width},hasSideness:e$2b(this.outlineWidth)}),shadows:this.shadows}),e$2b(this.outlineWidth)&&(r._outlineWidth=this.outlineWidth),o.add(r),i=!1;else{e$2b(r)&&(o.remove(r),r=void 0);var s=this.oldPrimitive;e$2b(s)&&(o.remove(s),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(e$2b(r)&&r.ready){r.show=!0,e$2b(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);var l=this.updatersWithAttributes.values,u=l.length,c=this.waitingOnCreate;for(t=0;t<u;t++){var h=l[t],d=this.geometry.get(h.id),f=this.attributes.get(d.id.id);if(e$2b(f)||(f=r.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,f)),!h.outlineColorProperty.isConstant||c){var p=h.outlineColorProperty,_=r$Z.getValueOrDefault(p,e,e$1U.WHITE,x$s);e$1U.equals(f._lastColor,_)||(f._lastColor=e$1U.clone(_,f._lastColor),f.color=o$16.toValue(_,f.color),(this.translucent&&255===f.color[3]||!this.translucent&&255!==f.color[3])&&(this.itemsToRemove[n++]=h))}var m=h.entity.isShowing&&(h.hasConstantOutline||h.isOutlineVisible(e));m!==(1===f.show[0])&&(f.show=e$1F.toValue(m,f.show));var g=h.distanceDisplayConditionProperty;if(!r$Z.isConstant(g)){var x=r$Z.getValueOrDefault(g,e,H$y,F$r);r$Y.equals(x,f._lastDistanceDisplayCondition)||(f._lastDistanceDisplayCondition=r$Y.clone(x,f._lastDistanceDisplayCondition),f.distanceDisplayCondition=t$B.toValue(x,f.distanceDisplayCondition))}var v=h.terrainOffsetProperty;if(!r$Z.isConstant(v)){var y=r$Z.getValueOrDefault(v,e,Z$o,j$r);o$1p.equals(y,f._lastOffset)||(f._lastOffset=o$1p.clone(y,f._lastOffset),f.offset=e$1B.toValue(y,f.offset))}}this.updateShows(r),this.waitingOnCreate=!1}else e$2b(r)&&!r.ready&&(i=!1);return this.itemsToRemove.length=n,i},c$l.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);e$2b(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$1F.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},c$l.prototype.contains=function(e){return this.updaters.contains(e.id)},c$l.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2b(n)||!e$2b(n.boundingSphere)||e$2b(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},c$l.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;e$2b(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;e$2b(i)&&(e.remove(i),this.oldPrimitive=void 0)},y$r.prototype.add=function(e,t){var i=t.createOutlineGeometryInstance(e);if(e$2b(i)){var n,r,o,a=this._scene.clampLineWidth(t.outlineWidth);if(255===i.attributes.color.value[3])n=this._solidBatches,t instanceof u$t?(o=t.outlineWidth,r=n.get(o)):r=n.get(a),e$2b(r)||(r=new c$l(this._primitives,!1,a,this._shadows),e$2b(o)?(n.set(o,r),r.outlineWidth=o):n.set(a,r)),r.add(t,i);else n=this._translucentBatches,t instanceof u$t?(o=t.outlineWidth,r=n.get(o)):r=n.get(a),e$2b(r)||(r=new c$l(this._primitives,!0,a,this._shadows),n.set(a,r),e$2b(o)&&(r.outlineWidth=o)),r.add(t,i)}},y$r.prototype.remove=function(e){var t,i=this._solidBatches.values,n=i.length;for(t=0;t<n;t++)if(i[t].remove(e))return;var r=this._translucentBatches.values,o=r.length;for(t=0;t<o;t++)if(r[t].remove(e))return},y$r.prototype.update=function(e){var t,i,n,r,o,a=this._solidBatches.values,s=a.length,l=this._translucentBatches.values,u=l.length,c=!0,h=!1;do{for(h=!1,i=0;i<s;i++){c=(r=a[i]).update(e);var d=(o=r.itemsToRemove).length;if(d>0)for(h=!0,t=0;t<d;t++)n=o[t],r.remove(n),this.add(e,n)}for(i=0;i<u;i++){c=(r=l[i]).update(e);var f=(o=r.itemsToRemove).length;if(f>0)for(h=!0,t=0;t<f;t++)n=o[t],r.remove(n),this.add(e,n)}}while(h);return c},y$r.prototype.getBoundingSphere=function(e,t){var i,n=this._solidBatches.values,r=n.length;for(i=0;i<r;i++){var o=n[i];if(o.contains(e))return o.getBoundingSphere(e,t)}var a=this._translucentBatches.values,s=a.length;for(i=0;i<s;i++){var l=a[i];if(l.contains(e))return l.getBoundingSphere(e,t)}return R$w.FAILED},y$r.prototype.removeAllPrimitives=function(){var e,t=this._solidBatches.values,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._translucentBatches.values,r=n.length;for(e=0;e<r;e++)n[e].removeAllPrimitives()};var I$A=new e$1U;function A$w(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0,this.enuCenter=void 0}function n$m(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new A$w(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}function p$k(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(n$m.prototype=Object.create(i$F.prototype),n$m.prototype.constructor=n$m),n$m.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$1F(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=t$B.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$Q?(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,I$A)),e$2b(i)||(i=e$1U.WHITE),t={show:o,distanceDisplayCondition:s,color:o$16.fromColor(i)}):t={show:o,distanceDisplayCondition:s};return new d$1o({id:n,geometry:new E$F(this._options),attributes:t})},n$m.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,I$A),r=this._distanceDisplayConditionProperty.getValue(e);return new d$1o({id:t,geometry:new w$x(this._options),attributes:{show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r)}})},n$m.prototype._isHidden=function(e,t){return!e$2b(t.positions)||i$F.prototype._isHidden.call(this,e,t)},n$m.prototype._getIsClosed=function(e){return!1},n$m.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&r$Z.isConstant(t.minimumHeights)&&r$Z.isConstant(t.maximumHeights)&&r$Z.isConstant(t.outlineWidth)&&r$Z.isConstant(t.granularity))},n$m.prototype._setStaticOptions=function(e,t){var i=t.minimumHeights,n=t.maximumHeights,r=t.granularity,o=this._materialProperty instanceof t$Q,a=t.enuCenter,s=this._options;s.vertexFormat=o?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(o$H.MINIMUM_VALUE,s.positions),s.minimumHeights=e$2b(i)?i.getValue(o$H.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=e$2b(n)?n.getValue(o$H.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=e$2b(r)?r.getValue(o$H.MINIMUM_VALUE):void 0,s.enuCenter=e$2b(a)?a.getValue(o$H.MINIMUM_VALUE):void 0},n$m.DynamicGeometryUpdater=p$k,e$2b(Object.create)&&(p$k.prototype=Object.create(a$C.prototype),p$k.prototype.constructor=p$k),p$k.prototype._isHidden=function(e,t,i){return!e$2b(this._options.positions)||a$C.prototype._isHidden.call(this,e,t,i)},p$k.prototype._setOptions=function(e,t,i){var n=this._options;n.positions=r$Z.getValueOrUndefined(t.positions,i,n.positions),n.minimumHeights=r$Z.getValueOrUndefined(t.minimumHeights,i,n.minimumHeights),n.maximumHeights=r$Z.getValueOrUndefined(t.maximumHeights,i,n.maximumHeights),n.granularity=r$Z.getValueOrUndefined(t.granularity,i)};var ee$h=[],I$z=[i$E,s$n,f$y,u$t,l$z,p$n,l$y,a$n,d$B,n$m,m$r];function m$o(e,t){this.entity=e,this.scene=t;var i=new Array(I$z.length),n=new o$1h;function r(e){n.raiseEvent(e)}for(var o=new n$x,a=0;a<i.length;a++){var s=new I$z[a](e,t);o.add(s.geometryChanged,r),i[a]=s}this.updaters=i,this.geometryChanged=n,this.eventHelper=o,this._removeEntitySubscription=e.definitionChanged.addEventListener(m$o.prototype._onEntityPropertyChanged,this)}function c$k(e,t,i,n){o$1q.defined("scene",e),o$1q.defined("entityCollection",t),i=u$_(i,e.primitives),n=u$_(n,e.groundPrimitives),this._scene=e,this._primitives=i,this._groundPrimitives=n,this._entityCollection=void 0,this._addedObjects=new e$1N,this._removedObjects=new e$1N,this._changedObjects=new e$1N;var r=W$W.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(2*r),this._closedColorBatches=new Array(2*r),this._closedMaterialBatches=new Array(2*r),this._openColorBatches=new Array(2*r),this._openMaterialBatches=new Array(2*r);var o,a=h$V.supportsMaterialsforEntitiesOnTerrain(e);for(this._supportsMaterialsforEntitiesOnTerrain=a,o=0;o<r;++o)this._outlineBatches[o]=new y$r(i,e,o,!1),this._outlineBatches[r+o]=new y$r(i,e,o,!0),this._closedColorBatches[o]=new y$s(i,t$R,void 0,!0,o,!0),this._closedColorBatches[r+o]=new y$s(i,t$R,void 0,!0,o,!1),this._closedMaterialBatches[o]=new u$s(i,t$w,void 0,!0,o,!0),this._closedMaterialBatches[r+o]=new u$s(i,t$w,void 0,!0,o,!1),this._openColorBatches[o]=new y$s(i,t$R,void 0,!1,o,!0),this._openColorBatches[r+o]=new y$s(i,t$R,void 0,!1,o,!1),this._openMaterialBatches[o]=new u$s(i,t$w,void 0,!1,o,!0),this._openMaterialBatches[r+o]=new u$s(i,t$w,void 0,!1,o,!1);var s=_0x3b5200.NUMBER_OF_CLASSIFICATION_TYPES,l=new Array(s),u=[];if(a)for(o=0;o<s;++o)u.push(new f$s(n,o,t$w)),l[o]=new p$l(n,o);else for(o=0;o<s;++o)l[o]=new p$l(n,o);this._groundColorBatches=l,this._groundMaterialBatches=u,this._dynamicBatch=new r$s(i,n),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new e$1N,this._updaterSets=new e$1N,this._entityCollection=t,t.collectionChanged.addEventListener(c$k.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,ee$h)}m$o.prototype._onEntityPropertyChanged=function(e,t,i,n){for(var r=this.updaters,o=0;o<r.length;o++)r[o]._onEntityPropertyChanged(e,t,i,n)},m$o.prototype.forEach=function(e){for(var t=this.updaters,i=0;i<t.length;i++)e(t[i])},m$o.prototype.destroy=function(){this.eventHelper.removeAll();for(var e=this.updaters,t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),i$10(this)},c$k.prototype.update=function(e){o$1q.defined("time",e);var t,i,n,r,o=this._addedObjects,a=o.values,s=this._removedObjects,l=s.values,u=this._changedObjects,c=u.values,h=this;for(t=c.length-1;t>-1;t--)n=(i=c[t]).id,(r=this._updaterSets.get(n)).entity===i?r.forEach((function(t){h._removeUpdater(t),h._insertUpdaterIntoBatch(e,t)})):(l.push(i),a.push(i));for(t=l.length-1;t>-1;t--)if(n=(i=l[t]).id,e$2b(r=this._updaterSets.get(n))&&(r.forEach(this._removeUpdater.bind(this)),r.destroy(),this._updaterSets.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n),i.children.length>0))for(var d=0;d<i.children.length;d++){n=(f=i.children[d]).id,e$2b(r=this._updaterSets.get(n))&&(r.forEach(this._removeUpdater.bind(this)),r.destroy(),this._updaterSets.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n))}for(t=a.length-1;t>-1;t--)if(n=(i=a[t]).id,r=new m$o(i,this._scene),this._updaterSets.set(n,r),r.forEach((function(t){h._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(n,r.geometryChanged.addEventListener(c$k._onGeometryChanged,this)),i.children.length>0)for(d=0;d<i.children.length;d++){var f=i.children[d];i.entityCollection.contains(f)||(n=f.id,r=new m$o(f,this._scene),this._updaterSets.set(n,r),r.forEach((function(t){h._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(n,r.geometryChanged.addEventListener(c$k._onGeometryChanged,this)))}o.removeAll(),s.removeAll(),u.removeAll();var p=!0,_=this._batches,m=_.length;for(t=0;t<m;t++)p=_[t].update(e)&&p;return p};var te$c=[],re$i=new i$1c;c$k.prototype.getBoundingSphere=function(e,t){o$1q.defined("entity",e),o$1q.defined("result",t);for(var i=te$c,n=re$i,r=0,o=R$w.DONE,a=this._batches,s=a.length,l=e.id,u=this._updaterSets.get(l).updaters,c=0;c<u.length;c++)for(var h=u[c],d=0;d<s;d++){if((o=a[d].getBoundingSphere(h,n))===R$w.PENDING)return R$w.PENDING;o===R$w.DONE&&(i[r]=i$1c.clone(n,i[r]),r++)}return 0===r?R$w.FAILED:(i.length=r,i$1c.fromBoundingSpheres(i,t),R$w.DONE)},c$k.prototype.isDestroyed=function(){return!1},c$k.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(c$k.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var e,t=this._batches,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._subscriptions.values;for(i=n.length,e=0;e<i;e++)n[e]();this._subscriptions.removeAll();var r=this._updaterSets.values;for(i=r.length,e=0;e<i;e++)r[e].destroy();return this._updaterSets.removeAll(),i$10(this)},c$k.prototype._removeUpdater=function(e){for(var t=this._batches,i=t.length,n=0;n<i;n++)t[n].remove(e)},c$k.prototype._insertUpdaterIntoBatch=function(e,t){if(t.isDynamic)this._dynamicBatch.add(e,t);else{var i;(t.outlineEnabled||t.fillEnabled)&&(i=t.shadowsProperty.getValue(e));var n=W$W.NUMBER_OF_SHADOW_MODES;if(t.outlineEnabled&&(e$2b(t.terrainOffsetProperty)?this._outlineBatches[n+i].add(e,t):this._outlineBatches[i].add(e,t)),t.fillEnabled)if(t.onTerrain){var r=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof t$Q?this._groundColorBatches[r].add(e,t):this._groundMaterialBatches[r].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof t$Q?e$2b(t.terrainOffsetProperty)?this._closedColorBatches[n+i].add(e,t):this._closedColorBatches[i].add(e,t):e$2b(t.terrainOffsetProperty)?this._closedMaterialBatches[n+i].add(e,t):this._closedMaterialBatches[i].add(e,t):t.fillMaterialProperty instanceof t$Q?e$2b(t.terrainOffsetProperty)?this._openColorBatches[n+i].add(e,t):this._openColorBatches[i].add(e,t):e$2b(t.terrainOffsetProperty)?this._openMaterialBatches[n+i].add(e,t):this._openMaterialBatches[i].add(e,t)}},c$k._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,n=e.entity,r=n.id;!e$2b(t.get(r))&&!e$2b(i.get(r))&&i.set(r,n)},c$k.prototype._onCollectionChanged=function(e,t,i){var n,r,o,a=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)r=(o=i[n]).id,a.remove(r)||(s.set(r,o),l.remove(r));for(n=t.length-1;n>-1;n--)r=(o=t[n]).id,s.remove(r)?l.set(r,o):a.set(r,o)};var U$p=1,q$p="30px sans-serif",N$i=R$Q.FILL,z$p=e$1U.WHITE,A$v=e$1U.BLACK,F$q=1,H$x=!1,T$r=new e$1U(.165,.165,.165,.8),W$t=new o$1o(7,5),I$y=o$1o.ZERO,Z$n=o$1p.ZERO,j$q=k$P.NONE,K$l=j$T.CENTER,J$l=S$O.CENTER,M$t=new o$1p,Q$n=new e$1U,X$h=new e$1U,Y$i=new e$1U,$$o=new o$1o,G$s=new o$1p,b$y=new o$1o,ee$g=new o$Y,te$b=new o$Y,re$h=new o$Y,ne$i=new r$Y;function S$n(e){this.entity=e,this.label=void 0,this.index=void 0}function l$w(e,t){if(!e$2b(e))throw new t$16("entityCluster is required.");if(!e$2b(t))throw new t$16("entityCollection is required.");t.collectionChanged.addEventListener(l$w.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1N,this._onCollectionChanged(t,t.values,[],[])}function y$q(e,t,i){e$2b(e)&&(e.label=void 0,i.removeLabel(t))}l$w.prototype.update=function(e){if(!e$2b(e))throw new t$16("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a,s=t[n],l=s.entity,u=l._label,c=s.label,h=l.isShowing&&l.isAvailable(e)&&r$Z.getValueOrDefault(u._show,e,!0);if(h&&(a=r$Z.getValueOrUndefined(l._position,e,M$t),o=r$Z.getValueOrUndefined(u._text,e),h=e$2b(a)&&e$2b(o)),h){r$Z.isConstant(l._position)||(i._clusterDirty=!0);var d=!1,f=r$Z.getValueOrDefault(u._heightReference,e,j$q);e$2b(c)||((c=i.getLabel(l)).id=l,s.label=c,d=o$1p.equals(c.position,a)&&c.heightReference===f),c.show=!0,c.position=a,c.text=o,c.scale=r$Z.getValueOrDefault(u._scale,e,U$p),c.font=r$Z.getValueOrDefault(u._font,e,q$p),c.style=r$Z.getValueOrDefault(u._style,e,N$i),c.fillColor=r$Z.getValueOrDefault(u._fillColor,e,z$p,Q$n),c.outlineColor=r$Z.getValueOrDefault(u._outlineColor,e,A$v,X$h),c.outlineWidth=r$Z.getValueOrDefault(u._outlineWidth,e,F$q),c.showBackground=r$Z.getValueOrDefault(u._showBackground,e,H$x),c.backgroundColor=r$Z.getValueOrDefault(u._backgroundColor,e,T$r,Y$i),c.backgroundPadding=r$Z.getValueOrDefault(u._backgroundPadding,e,W$t,$$o),c.pixelOffset=r$Z.getValueOrDefault(u._pixelOffset,e,I$y,b$y),c.eyeOffset=r$Z.getValueOrDefault(u._eyeOffset,e,Z$n,G$s),c.heightReference=f,c.horizontalOrigin=r$Z.getValueOrDefault(u._horizontalOrigin,e,K$l),c.verticalOrigin=r$Z.getValueOrDefault(u._verticalOrigin,e,J$l),c.translucencyByDistance=r$Z.getValueOrUndefined(u._translucencyByDistance,e,ee$g),c.pixelOffsetScaleByDistance=r$Z.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,te$b),c.scaleByDistance=r$Z.getValueOrUndefined(u._scaleByDistance,e,re$h),c.distanceDisplayCondition=r$Z.getValueOrUndefined(u._distanceDisplayCondition,e,ne$i),c.disableDepthTestDistance=r$Z.getValueOrUndefined(u._disableDepthTestDistance,e),d&&c._updateClamping()}else y$q(s,l,i)}return!0},l$w.prototype.getBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("entity is required.");if(!e$2b(t))throw new t$16("result is required.");var i=this._items.get(e.id);if(!e$2b(i)||!e$2b(i.label))return R$w.FAILED;var n=i.label;return t.center=o$1p.clone(u$_(n._clampedPosition,n.position),t.center),t.radius=0,R$w.DONE},l$w.prototype.isDestroyed=function(){return!1},l$w.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$w.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return i$10(this)},l$w.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)e$2b((o=t[r])._label)&&e$2b(o._position)&&a.set(o.id,new S$n(o));for(r=n.length-1;r>-1;r--)e$2b((o=n[r])._label)&&e$2b(o._position)?a.contains(o.id)||a.set(o.id,new S$n(o)):(y$q(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],y$q(a.get(o.id),o,s),a.remove(o.id)};var N$h=1,j$p=0,k$n=!0,W$s=!0,J$k=W$W.ENABLED,K$k=k$P.NONE,Q$m=e$1U.RED,X$g=0,Y$h=e$1U.WHITE,Z$m=I$J.HIGHLIGHT,$$n=.5,G$r=new o$1o(1,1),ee$f=new p$1d,ie$b=new p$1d;function d$z(e,t){if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(t))throw new t$16("entityCollection is required.");t.collectionChanged.addEventListener(d$z.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new e$1N,this._onCollectionChanged(t,t.values,[],[])}function M$s(e,t,i,n){var r=i[t.id];e$2b(r)&&(n.removeAndDestroy(r.modelPrimitive),delete i[t.id])}function re$g(e,t){var i=t[e.id];e$2b(i)&&(i.nodeTransformationsScratch={})}function te$a(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}function i$s(e){this._definitionChanged=new o$1h,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}d$z.prototype.update=function(e){if(!e$2b(e))throw new t$16("time is required.");for(var t=this._entitiesToVisualize.values,i=this._modelHash,n=this._primitives,r=0,o=t.length;r<o;r++){var a,s,l=t[r],u=l._model,c=i[l.id],h=l.isShowing&&l.isAvailable(e)&&r$Z.getValueOrDefault(u._show,e,!0);if(h&&(s=l.computeModelMatrix(e,ee$f),a=t$11.createIfNeeded(r$Z.getValueOrUndefined(u._uri,e)),h=e$2b(s)&&e$2b(a)),h){var d=e$2b(c)?c.modelPrimitive:void 0;if((!e$2b(d)||a.url!==c.url)&&(e$2b(d)&&(n.removeAndDestroy(d),delete i[l.id]),(d=F$C.fromGltf({url:a,incrementallyLoadTextures:r$Z.getValueOrDefault(u._incrementallyLoadTextures,e,k$n),scene:this._scene})).id=l,n.add(d),c={modelPrimitive:d,url:a.url,animationsRunning:!1,nodeTransformationsScratch:{},originalNodeMatrixHash:{},loadFail:!1},i[l.id]=c,te$a(d,l,i)),d.show=!0,d.scale=r$Z.getValueOrDefault(u._scale,e,N$h),d._offsetMatrix=u._offsetMatrix,d.minimumPixelSize=r$Z.getValueOrDefault(u._minimumPixelSize,e,j$p),d.maximumScale=r$Z.getValueOrUndefined(u._maximumScale,e),d.modelMatrix=p$1d.clone(s,d.modelMatrix),d.shadows=r$Z.getValueOrDefault(u._shadows,e,J$k),d.heightReference=r$Z.getValueOrDefault(u._heightReference,e,K$k),d.distanceDisplayCondition=r$Z.getValueOrUndefined(u._distanceDisplayCondition,e),d.silhouetteColor=r$Z.getValueOrDefault(u._silhouetteColor,e,Q$m,d._silhouetteColor),d.silhouetteSize=r$Z.getValueOrDefault(u._silhouetteSize,e,X$g),d.color=r$Z.getValueOrDefault(u._color,e,Y$h,d._color),d.colorBlendMode=r$Z.getValueOrDefault(u._colorBlendMode,e,Z$m),d.colorBlendAmount=r$Z.getValueOrDefault(u._colorBlendAmount,e,$$n),d.clippingPlanes=r$Z.getValueOrUndefined(u._clippingPlanes,e),d.clampAnimations=r$Z.getValueOrDefault(u._clampAnimations,e,W$s),d.imageBasedLightingFactor=r$Z.getValueOrDefault(u._imageBasedLightingFactor,e,G$r),d.lightColor=r$Z.getValueOrUndefined(u._lightColor,e),d.ready){var f=r$Z.getValueOrDefault(u._runAnimations,e,!0);c.animationsRunning!==f&&(f?d.activeAnimations.addAll({loop:_0x157d80.REPEAT}):d.activeAnimations.removeAll(),c.animationsRunning=f);var p=r$Z.getValueOrUndefined(u._nodeTransformations,e,c.nodeTransformationsScratch);if(e$2b(p))for(var _=c.originalNodeMatrixHash,m=Object.keys(p),g=0,x=m.length;g<x;++g){var v=m[g],y=p[v];if(e$2b(y)){var $=d.getNode(v);if(e$2b($)){var b=_[v];e$2b(b)||(b=$.matrix.clone(),_[v]=b);var T=p$1d.fromTranslationRotationScale(y,ie$b);$.matrix=p$1d.multiply(b,T,T)}}}}}else e$2b(c)&&(c.modelPrimitive.show=!1)}return!0},d$z.prototype.isDestroyed=function(){return!1},d$z.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(d$z.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._modelHash,i=this._primitives,n=e.length-1;n>-1;n--)M$s(this,e[n],t,i);return i$10(this)},d$z.prototype.getBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("entity is required.");if(!e$2b(t))throw new t$16("result is required.");var i=this._modelHash[e.id];if(!e$2b(i)||i.loadFail)return R$w.FAILED;var n=i.modelPrimitive;if(!e$2b(n)||!n.show)return R$w.FAILED;if(!n.ready)return R$w.PENDING;if(n.heightReference===k$P.NONE)i$1c.transform(n.boundingSphere,n.modelMatrix,t);else{if(!e$2b(n._clampedModelMatrix))return R$w.PENDING;i$1c.transform(n.boundingSphere,n._clampedModelMatrix,t)}return R$w.DONE},d$z.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._entitiesToVisualize,s=this._modelHash,l=this._primitives;for(r=t.length-1;r>-1;r--)e$2b((o=t[r])._model)&&e$2b(o._position)&&a.set(o.id,o);for(r=n.length-1;r>-1;r--)e$2b((o=n[r])._model)&&e$2b(o._position)?(re$g(o,s),a.set(o.id,o)):(M$s(this,o,s,l),a.remove(o.id));for(r=i.length-1;r>-1;r--)M$s(this,o=i[r],s,l),a.remove(o.id)},Object.defineProperties(i$s.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return e$2b(this._value)?this._value.referenceFrame:Re$k.FIXED}}}),i$s.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$k.FIXED,t)},i$s.prototype.setValue=function(e){this._value!==e&&(this._value=e,e$2b(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),e$2b(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))},i$s.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2b(e))throw new t$16("time is required.");if(!e$2b(t))throw new t$16("referenceFrame is required.");if(e$2b(this._value))return e$2b(i=this._value.getValueInReferenceFrame(e,t,i))?t$13.WGS84.scaleToGeodeticSurface(i,i):void 0},i$s.prototype.equals=function(e){return this===e||e instanceof i$s&&this._value===e._value},i$s.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var $$m=60,U$o=1,F$p=new d$W,V$k=new d$W,D$o=new d$W;function T$q(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function ee$e(e,t,i,n,r,o,a,s,l){var u,c=s;e$2b(u=e.getValueInReferenceFrame(t,o,l[c]))&&(l[c++]=u);for(var h,d,f,p=!e$2b(r)||a$15.lessThanOrEquals(r,t)||a$15.greaterThanOrEquals(r,i),_=0,m=n.length,g=n[_],x=i,v=!1;_<m;){if(!p&&a$15.greaterThanOrEquals(g,r)&&(e$2b(u=e.getValueInReferenceFrame(r,o,l[c]))&&(l[c++]=u),p=!0),a$15.greaterThan(g,t)&&a$15.lessThan(g,x)&&!g.equals(r)&&(e$2b(u=e.getValueInReferenceFrame(g,o,l[c]))&&(l[c++]=u)),_<m-1){if(a>0&&!v){var y=n[_+1],$=a$15.secondsDifference(y,g);(v=$>a)&&(h=Math.ceil($/a),d=0,f=$/Math.max(h,2),h=Math.max(h-1,1))}if(v&&d<h){g=a$15.addSeconds(g,f,new a$15),d++;continue}}v=!1,g=n[++_]}return e$2b(u=e.getValueInReferenceFrame(i,o,l[c]))&&(l[c++]=u),c}function ne$h(e,t,i,n,r,o,a,s){for(var l,u=0,c=a,h=t,d=Math.max(o,60),f=!e$2b(n)||a$15.lessThanOrEquals(n,t)||a$15.greaterThanOrEquals(n,i);a$15.lessThan(h,i);)!f&&a$15.greaterThanOrEquals(h,n)&&(f=!0,e$2b(l=e.getValueInReferenceFrame(n,r,s[c]))&&(s[c]=l,c++)),e$2b(l=e.getValueInReferenceFrame(h,r,s[c]))&&(s[c]=l,c++),u++,h=a$15.addSeconds(t,d*u,new a$15);return e$2b(l=e.getValueInReferenceFrame(i,r,s[c]))&&(s[c]=l,c++),c}function oe$c(e,t,i,n,r,o,a,s){D$o.start=t,D$o.stop=i;for(var l=a,u=e.intervals,c=0;c<u.length;c++){var h=u.get(c);if(!d$W.intersect(h,D$o,F$p).isEmpty){var d=h.start;h.isStartIncluded||(d=h.isStopIncluded?h.stop:a$15.addSeconds(h.start,a$15.secondsDifference(h.stop,h.start)/2,new a$15));var f=e.getValueInReferenceFrame(d,r,s[l]);e$2b(f)&&(s[l]=f,l++)}}return l}function ie$a(e,t,i,n,r,o,a,s){var l=e.getValueInReferenceFrame(t,r,s[a]);return e$2b(l)&&(s[a++]=l),a}function re$f(e,t,i,n,r,o,a,s){V$k.start=t,V$k.stop=i;for(var l=a,u=e.intervals,c=0;c<u.length;c++){var h=u.get(c);if(!d$W.intersect(h,V$k,F$p).isEmpty){var d=h.start,f=h.stop,p=t;a$15.greaterThan(d,p)&&(p=d);var _=i;a$15.lessThan(f,_)&&(_=f),l=x$r(h.data,p,_,n,r,o,l,s)}}return l}function x$r(e,t,i,n,r,o,a,s){for(;e instanceof a$p;)e=e.resolvedProperty;e instanceof o$y?a=ee$e(e,t,i,e._property._times,n,r,o,a,s):a=e instanceof t$q?re$f(e,t,i,n,r,o,a,s):e instanceof t$m?oe$c(e,t,i,n,r,o,a,s):e instanceof r$U||e instanceof i$s&&r$Z.isConstant(e)?ie$a(e,t,i,n,r,o,a,s):ne$h(e,t,i,n,r,o,a,s);return a}function A$u(e,t,i,n,r,o,a){e$2b(a)||(a=[]);var s=x$r(e,t,i,n,r,o,0,a);return a.length=s,a}var G$q=new p$1e;function I$x(e,t){this._unusedIndexes=[],this._polylineCollection=new k$T,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}function w$p(e,t){if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(t))throw new t$16("entityCollection is required.");t.collectionChanged.addEventListener(w$p.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new e$1N,this._onCollectionChanged(t,t.values,[],[])}I$x.prototype.update=function(e){if(this._referenceFrame===Re$k.INERTIAL){var t=m$17.computeIcrfToFixedMatrix(e,G$q);e$2b(t)||(t=m$17.computeTemeToPseudoFixedMatrix(e,G$q)),p$1d.fromRotationTranslation(t,o$1p.ZERO,this._polylineCollection.modelMatrix)}},I$x.prototype.updateObject=function(e,t){var i,n,r=t.entity,o=r._path,a=r._position,s=o._show,l=t.polyline,u=r.isShowing&&(!e$2b(s)||s.getValue(e));if(u){var c=r$Z.getValueOrUndefined(o._leadTime,e),h=r$Z.getValueOrUndefined(o._trailTime,e),d=r._availability,f=e$2b(d),p=e$2b(c),_=e$2b(h);if(u=f||p&&_){if(_&&(i=a$15.addSeconds(e,-h,new a$15)),p&&(n=a$15.addSeconds(e,c,new a$15)),f){var m=d.start,g=d.stop;(!_||a$15.greaterThan(m,i))&&(i=m),(!p||a$15.lessThan(g,n))&&(n=g)}u=a$15.lessThan(i,n)}}if(u){if(!e$2b(l)){var x=this._unusedIndexes;if(x.length>0){var v=x.pop();l=this._polylineCollection.get(v),t.index=v}else t.index=this._polylineCollection.length,l=this._polylineCollection.add();l.id=r,t.polyline=l}var y=r$Z.getValueOrDefault(o._resolution,e,$$m);l.show=!0,l.positions=A$u(a,i,n,e,this._referenceFrame,y,l.positions.slice()),l.material=r$C.getValue(e,o._material,l.material),l.width=r$Z.getValueOrDefault(o._width,e,U$o),l.distanceDisplayCondition=r$Z.getValueOrUndefined(o._distanceDisplayCondition,e,l.distanceDisplayCondition)}else e$2b(l)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,l.show=!1,t.index=void 0)},I$x.prototype.removeObject=function(e){var t=e.polyline;e$2b(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)},I$x.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),i$10(this)},w$p.prototype.update=function(e){if(!e$2b(e))throw new t$16("time is required.");var t=this._updaters;for(var i in t)t.hasOwnProperty(i)&&t[i].update(e);var n=this._items.values;if(0===n.length&&e$2b(this._updaters)&&Object.keys(this._updaters).length>0){for(var r in t)t.hasOwnProperty(r)&&t[r].destroy();this._updaters={}}for(var o=0,a=n.length;o<a;o++){var s=n[o],l=s.entity._position,u=s.updater,c=Re$k.FIXED;this._scene.mode===C$13.SCENE3D&&(c=l.referenceFrame);var h=this._updaters[c];u===h&&e$2b(h)?h.updateObject(e,s):(e$2b(u)&&u.removeObject(s),e$2b(h)||((h=new I$x(this._scene,c)).update(e),this._updaters[c]=h),s.updater=h,e$2b(h)&&h.updateObject(e,s))}return!0},w$p.prototype.isDestroyed=function(){return!1},w$p.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(w$p.prototype._onCollectionChanged,this);var e=this._updaters;for(var t in e)e.hasOwnProperty(t)&&e[t].destroy();return i$10(this)},w$p.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a,s=this._items;for(r=t.length-1;r>-1;r--)e$2b((o=t[r])._path)&&e$2b(o._position)&&s.set(o.id,new T$q(o));for(r=n.length-1;r>-1;r--)e$2b((o=n[r])._path)&&e$2b(o._position)?s.contains(o.id)||s.set(o.id,new T$q(o)):e$2b(a=s.get(o.id))&&(e$2b(a.updater)&&a.updater.removeObject(a),s.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],e$2b(a=s.get(o.id))&&(e$2b(a.updater)&&a.updater.removeObject(a),s.remove(o.id))},w$p._subSample=A$u;var x$q=e$1U.WHITE,I$w=e$1U.BLACK,L$r=0,W$r=1,z$o=0,M$r=new e$1U,w$o=new o$1p,F$o=new e$1U,H$w=new o$Y,j$o=new o$Y,k$m=new r$Y;function J$j(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function v$r(e,t){if(!e$2b(e))throw new t$16("entityCluster is required.");if(!e$2b(t))throw new t$16("entityCollection is required.");t.collectionChanged.addEventListener(v$r.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1N,this._onCollectionChanged(t,t.values,[],[])}function V$j(e,t,i){if(e$2b(e)){if(e$2b(e.pointPrimitive))return e.pointPrimitive=void 0,void i.removePoint(t);e$2b(e.billboard)&&(e.billboard=void 0,i.removeBillboard(t))}}v$r.prototype.update=function(e){if(!e$2b(e))throw new t$16("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a=t[n],s=a.entity,l=s._point,u=a.pointPrimitive,c=a.billboard,h=r$Z.getValueOrDefault(l._heightReference,e,k$P.NONE),d=s.isShowing&&s.isAvailable(e)&&r$Z.getValueOrDefault(l._show,e,!0);if(d&&(d=e$2b(o=r$Z.getValueOrUndefined(s._position,e,w$o))),d){r$Z.isConstant(s._position)||(i._clusterDirty=!0);var f=!1,p=!1;if(h===k$P.NONE||e$2b(c)?h===k$P.NONE&&!e$2b(u)&&(e$2b(c)&&(V$j(a,s,i),c=void 0),(u=i.getPoint(s)).id=s,a.pointPrimitive=u):(e$2b(u)&&(V$j(a,s,i),u=void 0),(c=i.getBillboard(s)).id=s,c.image=void 0,a.billboard=c,f=!0,p=o$1p.equals(c.position,o)&&c.heightReference===h),e$2b(u))u.show=!0,u.position=o,u.scaleByDistance=r$Z.getValueOrUndefined(l._scaleByDistance,e,H$w),u.translucencyByDistance=r$Z.getValueOrUndefined(l._translucencyByDistance,e,j$o),u.color=r$Z.getValueOrDefault(l._color,e,x$q,M$r),u.outlineColor=r$Z.getValueOrDefault(l._outlineColor,e,I$w,F$o),u.outlineWidth=r$Z.getValueOrDefault(l._outlineWidth,e,L$r),u.pixelSize=r$Z.getValueOrDefault(l._pixelSize,e,W$r),u.distanceDisplayCondition=r$Z.getValueOrUndefined(l._distanceDisplayCondition,e,k$m),u.disableDepthTestDistance=r$Z.getValueOrDefault(l._disableDepthTestDistance,e,z$o);else if(e$2b(c)){c.show=!0,c.position=o,c.scaleByDistance=r$Z.getValueOrUndefined(l._scaleByDistance,e,H$w),c.translucencyByDistance=r$Z.getValueOrUndefined(l._translucencyByDistance,e,j$o),c.distanceDisplayCondition=r$Z.getValueOrUndefined(l._distanceDisplayCondition,e,k$m),c.disableDepthTestDistance=r$Z.getValueOrDefault(l._disableDepthTestDistance,e,z$o),c.heightReference=h;var _=r$Z.getValueOrDefault(l._color,e,x$q,M$r),m=r$Z.getValueOrDefault(l._outlineColor,e,I$w,F$o),g=Math.round(r$Z.getValueOrDefault(l._outlineWidth,e,L$r)),x=Math.max(1,Math.round(r$Z.getValueOrDefault(l._pixelSize,e,W$r)));if(g>0?(c.scale=1,f=f||g!==a.outlineWidth||x!==a.pixelSize||!e$1U.equals(_,a.color)||!e$1U.equals(m,a.outlineColor)):(c.scale=x/50,x=50,f=f||g!==a.outlineWidth||!e$1U.equals(_,a.color)||!e$1U.equals(m,a.outlineColor)),f){a.color=e$1U.clone(_,a.color),a.outlineColor=e$1U.clone(m,a.outlineColor),a.pixelSize=x,a.outlineWidth=g;var v=_.alpha,y=_.toCssColorString(),$=m.toCssColorString(),b=JSON.stringify([y,x,$,g]);c.setImage(b,i$A(v,y,$,g,x))}p&&c._updateClamping()}}else V$j(a,s,i)}return!0},v$r.prototype.getBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("entity is required.");if(!e$2b(t))throw new t$16("result is required.");var i=this._items.get(e.id);if(!e$2b(i)||!e$2b(i.pointPrimitive)&&!e$2b(i.billboard))return R$w.FAILED;if(e$2b(i.pointPrimitive))t.center=o$1p.clone(i.pointPrimitive.position,t.center);else{var n=i.billboard;if(!e$2b(n._clampedPosition))return R$w.PENDING;t.center=o$1p.clone(n._clampedPosition,t.center)}return t.radius=0,R$w.DONE},v$r.prototype.isDestroyed=function(){return!1},v$r.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(v$r.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return i$10(this)},v$r.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)e$2b((o=t[r])._point)&&e$2b(o._position)&&a.set(o.id,new J$j(o));for(r=n.length-1;r>-1;r--)e$2b((o=n[r])._point)&&e$2b(o._position)?a.contains(o.id)||a.set(o.id,new J$j(o)):(V$j(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],V$j(a.get(o.id),o,s),a.remove(o.id)};var d$y=e$1U.WHITE,l$v=1,f$r=.3,h$t=5,u$r=0,c$j=1e3;function o$w(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._spotSize=void 0,this._trailLength=void 0,this._spotIntensity=void 0,this._constantSpeed=void 0,this._period=void 0,this.color=e.color,this.spotSize=e.spotSize,this.trailLength=e.trailLength,this.spotIntensity=e.spotIntensity,this.constantSpeed=e.constantSpeed/1e3,this.period=1e3*e.period,this.trailTime=void 0,this._startTime=performance.now(),this._bAsy=u$_(e.bAsy,!0)}Object.defineProperties(o$w.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._trailLength)&&r$Z.isConstant(this._constantSpeed)&&r$Z.isConstant(this._period)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color"),spotSize:C$$("spotSize"),trailLength:C$$("trailLength"),spotIntensity:C$$("spotIntensity"),constantSpeed:C$$("constantSpeed"),period:C$$("period")}),o$w.prototype.getType=function(e){return"PolylineTrail"},o$w.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,d$y,t.color),t.trailTime=performance.now(),t.spotSize=r$Z.getValueOrDefault(this._spotSize,e,l$v),t.constantSpeed=r$Z.getValueOrDefault(this._constantSpeed,e,u$r),t.trailLength=r$Z.getValueOrDefault(this._trailLength,e,f$r),t.period=r$Z.getValueOrDefault(this._period,e,c$j),t.spotIntensity=r$Z.getValueOrDefault(this._spotIntensity,e,h$t),t.startTime=this._startTime,t},o$w.prototype.equals=function(e){return this===e||e instanceof o$w&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._spotSize,e._spotSize)&&r$Z.equals(this._constantSpeed,e._constantSpeed)&&r$Z.equals(this._trailLength,e._trailLength)&&r$Z.equals(this._period,e._period)&&r$Z.equals(this._spotIntensity,e._spotIntensity)};var ne$g=new e$1I(0),O$l={},W$q=new e$1U,oe$b=new t$Q(e$1U.WHITE),ae$b=new e$1I(!0),se$a=new e$1I(W$W.DISABLED),le$g=new e$1I(new r$Y),de$a=new e$1I(_0x3b5200.BOTH);function pe$a(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.hMax=void 0,this.followSurface=void 0,this.arcType=void 0,this.granularity=void 0}function he$9(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function u$q(e,t){if(!e$2b(e))throw new t$16("entity is required");if(!e$2b(t))throw new t$16("scene is required");this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(u$q.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new o$1h,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new pe$a,this._groundGeometryOptions=new he$9,this._id="polyline-"+e.id,this._clampToGround=!1,this._supportsPolylinesOnTerrain=h$V.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(u$q.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!e$2b(this._entity.availability)&&r$Z.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}}),u$q.prototype.isOutlineVisible=function(e){return!1},u$q.prototype.isFilled=function(e){var t=this._entity;return u$_(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e),!1)},u$q.prototype.createFillGeometryInstance=function(e){if(!e$2b(e))throw new t$16("time is required.");if(!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:t$B.fromDistanceDisplayCondition(o)};return this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,W$q)),e$2b(t)||(t=e$1U.WHITE),a.color=o$16.fromColor(t)),this.clampToGround||this.entity.clampToS3M?new d$1o({id:i,geometry:new aa$4(this._groundGeometryOptions),attributes:a}):(this._materialProperty instanceof o$w?(this._geometryOptions.dist=1,e$2b(this._materialProperty.constantSpeed)&&this._materialProperty.constantSpeed>0?this._geometryOptions.period=-1:this._geometryOptions.period=e$2b(this._materialProperty.period)?this._materialProperty.period:1e3):(this._geometryOptions.dist=0,this._geometryOptions.period=-1),e$2b(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof t$Q&&(e$2b(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(t=this._depthFailMaterialProperty.color.getValue(e,W$q)),e$2b(t)||(t=e$1U.WHITE),a.depthFailColor=o$16.fromColor(t)),new d$1o({id:i,geometry:new R$A(this._geometryOptions),attributes:a}))},u$q.prototype.createOutlineGeometryInstance=function(e){throw new t$16("This instance does not represent an outlined geometry.")},u$q.prototype.isDestroyed=function(){return!1},u$q.prototype.destroy=function(){this._entitySubscription(),i$10(this)},u$q.prototype._onEntityPropertyChanged=function(e,t,i,n){if("availability"===t||"polyline"===t){var r=this._entity.polyline;if(!e$2b(r))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));var o=r.positions,a=r.show;if(e$2b(a)&&a.isConstant&&!a.getValue(o$H.MINIMUM_VALUE)||!e$2b(o))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=r.zIndex,l=u$_(r.material,oe$b),u=l instanceof t$Q;this._materialProperty=l,this._depthFailMaterialProperty=r.depthFailMaterial,this._showProperty=u$_(a,ae$b),this._shadowsProperty=u$_(r.shadows,se$a),this._distanceDisplayConditionProperty=u$_(r.distanceDisplayCondition,le$g),this._classificationTypeProperty=u$_(r.classificationType,de$a),this._fillEnabled=!0,this._zIndex=u$_(s,ne$g);var c=r.width,h=r.hMax,d=r.followSurface,f=r.arcType,p=r.clampToGround,_=r.granularity;if(o.isConstant&&r$Z.isConstant(c)&&r$Z.isConstant(d)&&r$Z.isConstant(f)&&r$Z.isConstant(_)&&r$Z.isConstant(p)&&r$Z.isConstant(s)){var m,g=this._geometryOptions,x=o.getValue(o$H.MINIMUM_VALUE,g.positions);if(!e$2b(x)||x.length<2)return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));m=u&&(!e$2b(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof t$Q)?e$1C.VERTEX_FORMAT:r$W.VERTEX_FORMAT,g.vertexFormat=m,g.positions=x,g.width=e$2b(c)?c.getValue(o$H.MINIMUM_VALUE):void 0,g.hMax=e$2b(h)?h.getValue(o$H.MINIMUM_VALUE):void 0,g.followSurface=e$2b(d)?d.getValue(o$H.MINIMUM_VALUE):void 0,g.arcType=e$2b(f)?f.getValue(o$H.MINIMUM_VALUE):void 0,g.granularity=e$2b(_)?_.getValue(o$H.MINIMUM_VALUE):void 0;var v=this._groundGeometryOptions;v.positions=x,v.width=g.width,v.arcType=g.arcType,v.granularity=g.granularity,this._clampToGround=!!e$2b(p)&&p.getValue(o$H.MINIMUM_VALUE),!this._clampToGround&&e$2b(s)&&e$1$("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},u$q.prototype.createDynamicUpdater=function(e,t){if(o$1q.defined("primitives",e),o$1q.defined("groundPrimitives",t),!this._dynamic)throw new t$16("This instance does not represent dynamic geometry.");return new I$v(e,t,this)};var w$n={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function I$v(e,t,i){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=i,this._positions=[]}function q$o(e){if(e$2b(e._line))return e._line;var t=e._geometryUpdater._scene.id,i=O$l[t],n=e._primitives;!e$2b(i)||i.isDestroyed()?(i=new k$T,O$l[t]=i,n.add(i)):n.contains(i)||n.add(i);var r=i.add();return r.id=e._geometryUpdater._entity,e._line=r,r}I$v.prototype.update=function(e){var t=this._geometryUpdater,i=t._entity,n=i.polyline,r=n.positions,o=r$Z.getValueOrUndefined(r,e,this._positions);t._clampToGround=r$Z.getValueOrDefault(n._clampToGround,e,!1),t._groundGeometryOptions.positions=o,t._groundGeometryOptions.width=r$Z.getValueOrDefault(n._width,e,1),t._groundGeometryOptions.arcType=r$Z.getValueOrDefault(n._arcType,e,m$1f.GEODESIC),t._groundGeometryOptions.granularity=r$Z.getValueOrDefault(n._granularity,e,9999);var a=this._groundPrimitives;if(e$2b(this._groundPolylinePrimitive)&&(a.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!i.isShowing||!i.isAvailable(e)||!r$Z.getValueOrDefault(n._show,e,!0)||!e$2b(o)||o.length<2)return;var s,l=t.fillMaterialProperty;if(l instanceof t$Q)s=new e$1C;else{var u=r$C.getValue(e,l,this._material);s=new r$W({material:u,translucent:u.isTranslucent()}),this._material=u}return this._groundPolylinePrimitive=a.add(new g$11({geometryInstances:t.createFillGeometryInstance(e),appearance:s,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),r$Z.getValueOrUndefined(t.zIndex,e)),void(e$2b(this._line)&&(this._line.show=!1))}var c=q$o(this);if(i.isShowing&&i.isAvailable(e)&&r$Z.getValueOrDefault(n._show,e,!0))if(!e$2b(o)||o.length<2)c.show=!1;else{var h=r$Z.getValueOrUndefined(n._followSurface,e),d=m$1f.GEODESIC;e$2b(h)&&(d=h?m$1f.GEODESIC:m$1f.NONE),d=r$Z.getValueOrDefault(n._arcType,e,d);var f=t._scene.globe;d!==m$1f.NONE&&e$2b(f)&&(w$n.ellipsoid=f.ellipsoid,w$n.positions=o,w$n.granularity=r$Z.getValueOrUndefined(n._granularity,e),w$n.height=m$V.extractHeights(o,f.ellipsoid),w$n.hMax=r$Z.getValueOrUndefined(n._hMax,e),o=m$V.generateCartesianArc(w$n)),c.show=!0,c.positions=o.slice(),c.material=r$C.getValue(e,t.fillMaterialProperty,c.material),c.width=r$Z.getValueOrDefault(n._width,e,1),c.distanceDisplayCondition=r$Z.getValueOrUndefined(n._distanceDisplayCondition,e,c.distanceDisplayCondition)}else c.show=!1},I$v.prototype.getBoundingSphere=function(e){if(o$1q.defined("result",e),this._geometryUpdater.clampToGround){var t=this._groundPolylinePrimitive;if(e$2b(t)&&t.show&&t.ready){var i=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(e$2b(i)&&e$2b(i.boundingSphere))return i$1c.clone(i.boundingSphere,e),R$w.DONE}return e$2b(t)&&!t.ready?R$w.PENDING:R$w.DONE}var n=q$o(this);return n.show&&n.positions.length>0?(i$1c.fromPoints(n.positions,e),R$w.DONE):R$w.FAILED},I$v.prototype.isDestroyed=function(){return!1},I$v.prototype.destroy=function(){var e=this._geometryUpdater._scene.id,t=O$l[e];e$2b(t)&&(t.remove(this._line),0===t.length&&(this._primitives.removeAndDestroy(t),delete O$l[e])),e$2b(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),i$10(this)};var b$x=new e$1U,L$q=new r$Y,O$k=new r$Y;function v$q(e,t,i,n,r){var o;o=i instanceof t$Q?e$1C:r$W,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=o,this.materialProperty=i,this.updaters=new e$1N,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1N,this.material=void 0,this.updatersWithAttributes=new e$1N,this.attributes=new e$1N,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(v$q.prototype.onMaterialChanged,this),this.subscriptions=new e$1N,this.showsUpdated=new e$1N,this.zIndex=n,this._asynchronous=r}function m$n(e,t,i){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=u$_(i,!0)}v$q.prototype.onMaterialChanged=function(){this.invalidated=!0},v$q.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty;return i===t||i instanceof t$Q&&t instanceof t$Q||e$2b(t)&&t.equals(i)},v$q.prototype.add=function(e,t,i){var n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,i),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$Z.isConstant(t.distanceDisplayConditionProperty)){var r=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},v$q.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2b(i)&&(i(),this.subscriptions.remove(t)),!0}return!1},v$q.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.orderedGroundPrimitives,o=this.geometry.values;if(this.createPrimitive){if(o.length>0)e$2b(n)&&(e$2b(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),n=new g$11({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===r$W&&(this.material=r$C.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),r.add(n,this.zIndex),i=!1;else{e$2b(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;e$2b(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(e$2b(n)&&n.ready){n.show=!0,e$2b(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===r$W&&(this.material=r$C.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);var s=this.updatersWithAttributes.values,l=s.length;for(t=0;t<l;t++){var u=s[t],c=u.entity,h=this.geometry.get(u.id),d=this.attributes.get(h.id.id);if(e$2b(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d)),!u.fillMaterialProperty.isConstant){var f=u.fillMaterialProperty.color,p=r$Z.getValueOrDefault(f,e,e$1U.WHITE,b$x);e$1U.equals(d._lastColor,p)||(d._lastColor=e$1U.clone(p,d._lastColor),d.color=o$16.toValue(p,d.color))}var _=c.isShowing&&(u.hasConstantFill||u.isFilled(e));_!==(1===d.show[0])&&(d.show=e$1F.toValue(_,d.show));var m=u.distanceDisplayConditionProperty;if(!r$Z.isConstant(m)){var g=r$Z.getValueOrDefault(m,e,O$k,L$q);r$Y.equals(g,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=r$Y.clone(g,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=t$B.toValue(g,d.distanceDisplayCondition))}}this.updateShows(n)}else e$2b(n)&&!n.ready&&(i=!1);return i},v$q.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);e$2b(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$1F.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},v$q.prototype.contains=function(e){return this.updaters.contains(e.id)},v$q.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2b(n)||!e$2b(n.boundingSphere)||e$2b(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},v$q.prototype.destroy=function(){var e=this.primitive,t=this.orderedGroundPrimitives;e$2b(e)&&t.remove(e);var i=this.oldPrimitive;e$2b(i)&&t.remove(i),this.removeMaterialSubscription()},m$n.prototype.add=function(e,t){for(var i=this._items,n=i.length,r=t.createFillGeometryInstance(e),o=r$Z.getValueOrDefault(t.zIndex,0),a=0;a<n;++a){var s=i[a];if(s.isMaterial(t)&&s.zIndex===o)return void s.add(e,t,r)}var l=new v$q(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,o,this._asynchronous);l.add(e,t,r),i.push(l)},m$n.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},m$n.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},m$n.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},m$n.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var I$u=[];function A$t(e,t){for(var i=e._batches,n=i.length,r=0;r<n;r++)i[r].remove(t)}function E$r(e,t,i,n){if(i.isDynamic)e._dynamicBatch.add(t,i);else{if((i.clampToGround||i.entity.clampToS3M)&&i.fillEnabled){var r=i.classificationTypeProperty.getValue(t);return i.entity.clampToS3M&&(r=_0x3b5200.S3M_TILE),void e._groundBatches[r].add(t,i)}var o;i.fillEnabled&&(o=i.shadowsProperty.getValue(t));var a,s=0;e$2b(i.depthFailMaterialProperty)&&(s=i.depthFailMaterialProperty instanceof t$Q?1:2),e$2b(o)&&(a=o+s*W$W.NUMBER_OF_SHADOW_MODES),i.fillEnabled&&(i.fillMaterialProperty instanceof t$Q?e._colorBatches[a].add(t,i):e._materialBatches[a].add(t,i))}}function l$u(e,t,i,n){o$1q.defined("scene",e),o$1q.defined("entityCollection",t),n=u$_(n,e.groundPrimitives),i=u$_(i,e.primitives),this._scene=e,this._primitives=i,this._entityCollection=void 0,this._addedObjects=new e$1N,this._removedObjects=new e$1N,this._changedObjects=new e$1N;var r,o=W$W.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(3*o),this._materialBatches=new Array(3*o),r=0;r<o;++r)this._colorBatches[r]=new y$s(i,e$1C,void 0,!1,r),this._materialBatches[r]=new u$s(i,r$W,void 0,!1,r),this._colorBatches[r+o]=new y$s(i,e$1C,e$1C,!1,r),this._materialBatches[r+o]=new u$s(i,r$W,e$1C,!1,r),this._colorBatches[r+2*o]=new y$s(i,e$1C,r$W,!1,r),this._materialBatches[r+2*o]=new u$s(i,r$W,r$W,!1,r);this._dynamicBatch=new r$s(i,n);var a=_0x3b5200.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(a),r=0;r<a;++r)this._groundBatches[r]=new m$n(n,r);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new e$1N,this._updaters=new e$1N,this._entityCollection=t,t.collectionChanged.addEventListener(l$u.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,I$u)}l$u.prototype.update=function(e){o$1q.defined("time",e);var t,i,n,r,o=this._addedObjects,a=o.values,s=this._removedObjects,l=s.values,u=this._changedObjects,c=u.values;for(t=c.length-1;t>-1;t--)n=(i=c[t]).id,(r=this._updaters.get(n)).entity===i?(A$t(this,r),E$r(this,e,r)):(l.push(i),a.push(i));for(t=l.length-1;t>-1;t--)n=(i=l[t]).id,A$t(this,r=this._updaters.get(n)),r.destroy(),this._updaters.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n);for(t=a.length-1;t>-1;t--)n=(i=a[t]).id,r=new u$q(i,this._scene),this._updaters.set(n,r),E$r(this,e,r),this._subscriptions.set(n,r.geometryChanged.addEventListener(l$u._onGeometryChanged,this));o.removeAll(),s.removeAll(),u.removeAll();var h=!0,d=this._batches,f=d.length;for(t=0;t<f;t++)h=d[t].update(e)&&h;return h};var T$p=[],F$n=new i$1c;function u$p(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.scene",e.scene),o$1q.typeOf.object("options.dataSourceCollection",e.dataSourceCollection),d$14.initializeTerrainHeights(),g$11.initializeTerrainHeights();var t=e.scene,i=e.dataSourceCollection;this._eventHelper=new n$x,this._eventHelper.add(i.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(i.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(i.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=i,this._scene=t,this._visualizersCallback=u$_(e.visualizersCallback,u$p.defaultVisualizersCallback);var n=!1,r=new o$x,o=new o$x;i.length>0&&(t.primitives.add(r),t.groundPrimitives.add(o),n=!0),this._primitives=r,this._groundPrimitives=o;for(var a=0,s=i.length;a<s;a++)this._onDataSourceAdded(i,i.get(a));var l,u,c=new n$o;if(this._onDataSourceAdded(void 0,c),this._defaultDataSource=c,!n){var h=this,d=function(){t.primitives.add(r),t.groundPrimitives.add(o),l(),u(),h._removeDefaultDataSourceListener=void 0,h._removeDataSourceCollectionListener=void 0};l=c.entities.collectionChanged.addEventListener(d),u=i.dataSourceAdded.addEventListener(d)}this._removeDefaultDataSourceListener=l,this._removeDataSourceCollectionListener=u,this._ready=!1}l$u.prototype.getBoundingSphere=function(e,t){o$1q.defined("entity",e),o$1q.defined("result",t);for(var i=T$p,n=F$n,r=0,o=R$w.DONE,a=this._batches,s=a.length,l=this._updaters.get(e.id),u=0;u<s;u++){if((o=a[u].getBoundingSphere(l,n))===R$w.PENDING)return R$w.PENDING;o===R$w.DONE&&(i[r]=i$1c.clone(n,i[r]),r++)}return 0===r?R$w.FAILED:(i.length=r,i$1c.fromBoundingSpheres(i,t),R$w.DONE)},l$u.prototype.isDestroyed=function(){return!1},l$u.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$u.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var e,t=this._batches,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._subscriptions.values;for(i=n.length,e=0;e<i;e++)n[e]();return this._subscriptions.removeAll(),i$10(this)},l$u._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,n=e.entity,r=n.id;!e$2b(t.get(r))&&!e$2b(i.get(r))&&i.set(r,n)},l$u.prototype._onCollectionChanged=function(e,t,i){var n,r,o,a=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)r=(o=i[n]).id,a.remove(r)||(s.set(r,o),l.remove(r));for(n=t.length-1;n>-1;n--)r=(o=t[n]).id,s.remove(r)?l.set(r,o):a.set(r,o)},u$p.defaultVisualizersCallback=function(e,t,i){var n=i.entities;return[new g$I(t,n),new c$k(e,n,i._primitives,i._groundPrimitives),new l$w(t,n),new d$z(e,n),new l$E(e,n),new v$r(t,n),new w$p(e,n),new l$u(e,n,i._primitives,i._groundPrimitives)]},Object.defineProperties(u$p.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}}),u$p.prototype.isDestroyed=function(){return!1},u$p.prototype.destroy=function(){this._eventHelper.removeAll();for(var e=this._dataSourceCollection,t=0,i=e.length;t<i;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),e$2b(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),i$10(this)},u$p.prototype.update=function(e){if(o$1q.defined("time",e),!e$1E.initialized)return this._ready=!1,!1;var t,i,n,r,o=!0,a=this._dataSourceCollection,s=a.length;for(t=0;t<s;t++){var l=a.get(t);for(e$2b(l.update)&&(o=l.update(e)&&o),r=(n=l._visualizers).length,i=0;i<r;i++)o=n[i].update(e)&&o}for(r=(n=this._defaultDataSource._visualizers).length,i=0;i<r;i++)o=n[i].update(e)&&o;return this._ready=o,o},u$p.prototype._postRender=function(){for(var e=this._scene.frameState,t=this._dataSourceCollection,i=t.length,n=0;n<i;n++){var r=t.get(n),o=r.credit;e$2b(o)&&e.creditDisplay.addCredit(o);var a=r._resourceCredits;if(e$2b(a))for(var s=a.length,l=0;l<s;l++)e.creditDisplay.addCredit(a[l])}};var R$n=[],k$l=new i$1c;function h$s(e,t,i,n){if(!e$2b(e))throw new t$16("entity is required.");if(!e$2b(n))throw new t$16("result is required.");var r;return e$2b(t)&&t.show&&t.ready&&(e$2b(r=t.getGeometryInstanceAttributes(e))&&e$2b(r.boundingSphere))||e$2b(i)&&i.show&&i.ready&&(e$2b(r=i.getGeometryInstanceAttributes(e))&&e$2b(r.boundingSphere))?(i$1c.clone(r.boundingSphere,n),R$w.DONE):e$2b(t)&&!t.ready||e$2b(i)&&!i.ready?R$w.PENDING:R$w.FAILED}u$p.prototype.getBoundingSphere=function(e,t,i){if(o$1q.defined("entity",e),o$1q.typeOf.bool("allowPartial",t),o$1q.defined("result",i),!this._ready)return R$w.PENDING;var n,r,o=this._defaultDataSource;if(!o.entities.contains(e)){o=void 0;var a=this._dataSourceCollection;for(r=a.length,n=0;n<r;n++){var s=a.get(n);if(s.entities.contains(e)){o=s;break}}}if(!e$2b(o))return R$w.FAILED;var l=R$n,u=k$l,c=0,h=R$w.DONE,d=o._visualizers,f=d.length;for(n=0;n<f;n++){if(e$2b(d[n].getBoundingSphere)){if(h=d[n].getBoundingSphere(e,u),!t&&h===R$w.PENDING)return R$w.PENDING;h===R$w.DONE&&(l[c]=i$1c.clone(u,l[c]),c++)}}return 0===c?R$w.FAILED:(l.length=c,i$1c.fromBoundingSpheres(l,i),R$w.DONE)},u$p.prototype._onDataSourceAdded=function(e,t){var i=this._scene,n=this._primitives,r=this._groundPrimitives,o=n.add(new o$x),a=r.add(new r$t);t._primitives=o,t._groundPrimitives=a;var s=t.clustering;s._initialize(i),o.add(s),t._visualizers=this._visualizersCallback(i,s,t)},u$p.prototype._onDataSourceRemoved=function(e,t){var i=this._primitives,n=this._groundPrimitives,r=t._primitives,o=t._groundPrimitives,a=t.clustering;r.remove(a);for(var s=r._primitives,l=0;l<s.length;l++)if(e$2b(s[l]._instanceIds))for(var u=s[l]._instanceIds,c=0;c<u.length;c++)e$2b(u[c]._polygon)&&e$2b(u[c]._polygon.outlines)&&this._scene._primitives.remove(u[c]._polygon.outlines);var h=t._visualizers,d=h.length;for(c=0;c<d;c++)h[c].destroy();i.remove(r),n.remove(o),t._visualizers=void 0},u$p.prototype._onDataSourceMoved=function(e,t,i){var n=this._primitives,r=this._groundPrimitives,o=e._primitives,a=e._groundPrimitives;t===i+1?(n.raise(o),r.raise(a)):t===i-1?(n.lower(o),r.lower(a)):0===t?(n.lowerToBottom(o),r.lowerToBottom(a),n.raise(o),r.raise(a)):(n.raiseToTop(o),r.raiseToTop(a))};var p$j=new e$1U(1,1,1,1);function t$k(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=new e$1U(1,1,1,1),this._colorSubscription=void 0,this.color=e.color}Object.defineProperties(t$k.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color")}),t$k.prototype.getType=function(e){return"EmissionColor"},t$k.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,p$j,t.color),t},t$k.prototype.equals=function(e){return this===e||e instanceof t$k&&r$Z.equals(this._color,e._color)};var Z$l=new p$1e,F$m=new p$1e,j$n=new p$1e,s$k=new p$1d,P$o=new o$1p,J$i=new o$1p,q$n=new o$1p,x$p=new o$1p,W$p=new o$1p,K$j=new o$1p,_$n=new a$15,B$m=1.25;function ee$d(e,t,i,n,r,o,a){var s=e.scene.mode,l=r.getValue(o,e._lastCartesian);if(e$2b(l)){var u,c,h,d,f,p,_=!1,m=!1;if(s===C$13.SCENE3D){a$15.addSeconds(o,.001,_$n);var g=r.getValue(_$n,P$o);if(e$2b(g)||(a$15.addSeconds(o,-.001,_$n),g=r.getValue(_$n,P$o),m=!0),e$2b(g)){var x,v=m$17.computeFixedToIcrfMatrix(o,Z$l),y=m$17.computeFixedToIcrfMatrix(_$n,F$m);e$2b(v)&&e$2b(y)?x=p$1e.transpose(v,j$n):(x=m$17.computeTemeToPseudoFixedMatrix(o,j$n),v=p$1e.transpose(x,Z$l),y=m$17.computeTemeToPseudoFixedMatrix(_$n,F$m),p$1e.transpose(y,y));var $=p$1e.multiplyByVector(v,l,W$p),b=p$1e.multiplyByVector(y,g,K$j);o$1p.subtract($,b,x$p);var T=1e3*o$1p.magnitude(x$p),C=e$2a.GRAVITATIONALPARAMETER,S=-C/(T*T-2*C/o$1p.magnitude($));S<0||S>B$m*a.maximumRadius?(u=J$i,o$1p.normalize(l,u),o$1p.negate(u,u),h=o$1p.clone(o$1p.UNIT_Z,q$n),c=o$1p.cross(h,u,P$o),o$1p.magnitude(c)>e$2a.EPSILON7&&(o$1p.normalize(u,u),o$1p.normalize(c,c),h=o$1p.cross(u,c,q$n),o$1p.normalize(h,h),_=!0)):o$1p.equalsEpsilon(l,g,e$2a.EPSILON7)||(h=J$i,o$1p.normalize($,h),o$1p.normalize(b,b),c=o$1p.cross(h,b,q$n),m&&(c=o$1p.multiplyByScalar(c,-1,c)),o$1p.equalsEpsilon(c,o$1p.ZERO,e$2a.EPSILON7)||(u=o$1p.cross(c,h,P$o),p$1e.multiplyByVector(x,u,u),p$1e.multiplyByVector(x,c,c),p$1e.multiplyByVector(x,h,h),o$1p.normalize(u,u),o$1p.normalize(c,c),o$1p.normalize(h,h),_=!0))}}e$2b(e.boundingSphere)&&(l=e.boundingSphere.center),n&&(d=o$1p.clone(t.position,x$p),f=o$1p.clone(t.direction,W$p),p=o$1p.clone(t.up,K$j));var w=s$k;_?(w[0]=u.x,w[1]=u.y,w[2]=u.z,w[3]=0,w[4]=c.x,w[5]=c.y,w[6]=c.z,w[7]=0,w[8]=h.x,w[9]=h.y,w[10]=h.z,w[11]=0,w[12]=l.x,w[13]=l.y,w[14]=l.z,w[15]=0):m$17.eastNorthUpToFixedFrame(l,a,w),t._setTransform(w),n&&(o$1p.clone(d,t.position),o$1p.clone(f,t.direction),o$1p.clone(p,t.up),o$1p.cross(f,p,t.right))}if(i){var E=s===C$13.SCENE2D||o$1p.equals(e._offset3D,o$1p.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,E)}}function V$i(e,t,i){o$1q.defined("entity",e),o$1q.defined("scene",t),this.entity=e,this.scene=t,this.ellipsoid=u$_(i,t$13.WGS84),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new o$1p,this._defaultOffset3D=void 0,this._offset3D=new o$1p}Object.defineProperties(V$i,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=o$1p.clone(e,new o$1p)}}}),V$i.defaultOffset3D=new o$1p(-14e3,3500,3500);var C$r=new a$T,re$e=new o$1p;V$i.prototype.update=function(e,t){o$1q.defined("time",e);var i=this.scene,n=this.ellipsoid,r=i.mode;if(r!==C$13.MORPHING){var o=this.entity,a=o.position;if(e$2b(a)){var s=o!==this._lastEntity,l=r!==this._mode,u=i.camera,c=s||l,h=!0;if(s){var d=o.viewFrom,f=e$2b(d);if(!f&&e$2b(t)){C$r.pitch=-e$2a.PI_OVER_FOUR,C$r.range=0;var p=a.getValue(e,re$e);if(e$2b(p)){var _=2-1/Math.max(1,o$1p.magnitude(p)/n.maximumRadius);C$r.pitch*=_}u.viewBoundingSphere(t,C$r),this.boundingSphere=t,c=!1,h=!1}else(!f||!e$2b(d.getValue(e,this._offset3D)))&&o$1p.clone(V$i._defaultOffset3D,this._offset3D)}else!l&&this._mode!==C$13.SCENE2D&&o$1p.clone(u.position,this._offset3D);this._lastEntity=o,this._mode=r,ee$d(this,u,c,h,a,e,n)}}};var $$l={};!function(e){var t,i,n="File format is not recognized.",r="Error while reading zip file.",o="Error while reading file data.",a=524288,s="text/plain",l="message";try{t=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch{}function u(){var e=-1,t=this;t.append=function(i){var n,r=t.table;for(n=0;n<i.length;n++)e=e>>>8^r[255&(e^i[n])]},t.get=function(){return~e}}function c(e,t){var i,n;return i=new ArrayBuffer(e),n=new Uint8Array(i),t&&n.set(t,0),{buffer:i,array:n,view:new DataView(i)}}function h(){}function d(e){var t,i=this;i.size=0,i.init=function(n,r){var o=new Blob([e],{type:s});(t=new p(o)).init((function(){i.size=t.size,n()}),r)},i.readUint8Array=function(e,i,n,r){t.readUint8Array(e,i,n,r)}}function f(e){var t,i=this;i.size=0,i.init=function(n){for(var r=e.length;"="==e.charAt(r-1);)r--;t=e.indexOf(",")+1,i.size=Math.floor(.75*(r-t)),n()},i.readUint8Array=function(i,n,r){var o,a=c(n),s=4*Math.floor(i/3),l=4*Math.ceil((i+n)/3),u=window.atob(e.substring(s+t,l+t)),h=i-3*Math.floor(s/4);for(o=h;o<h+n;o++)a.array[o-h]=u.charCodeAt(o);r(a.array)}}function p(e){var t=this;t.size=0,t.init=function(t){this.size=e.size,t()},t.readUint8Array=function(t,i,n,r){var o=new FileReader;o.onload=function(e){n(new Uint8Array(e.target.result))},o.onerror=r,o.readAsArrayBuffer(function(e,t,i){return e.slice?e.slice(t,t+i):e.webkitSlice?e.webkitSlice(t,t+i):e.mozSlice?e.mozSlice(t,t+i):e.msSlice?e.msSlice(t,t+i):void 0}(e,t,i))}}function _(){}function m(e){var i,n=this;n.init=function(e){i=new Blob([],{type:s}),e()},n.writeUint8Array=function(e,n){i=new Blob([i,t?e:e.buffer],{type:s}),n()},n.getData=function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=n,r.readAsText(i,e)}}function g(e){var t=this,i="",n="";t.init=function(t){i+="data:"+(e||"")+";base64,",t()},t.writeUint8Array=function(e,t){var r,o=n.length,a=n;for(n="",r=0;r<3*Math.floor((o+e.length)/3)-o;r++)a+=String.fromCharCode(e[r]);for(;r<e.length;r++)n+=String.fromCharCode(e[r]);a.length>2?i+=window.btoa(a):n=a,t()},t.getData=function(e){e(i+window.btoa(n))}}function x(e){var i,n=this;n.init=function(t){i=new Blob([],{type:e}),t()},n.writeUint8Array=function(n,r){i=new Blob([i,t?n:n.buffer],{type:e}),r()},n.getData=function(e){e(i)}}function v(e,t,i,n,r,o,s,u,c,h){var d,f,p=0;function _(){e.removeEventListener(l,m,!1),u(f)}function m(e){var t=e.data,n=t.data;t.onappend&&(f+=n.length,i.writeUint8Array(n,(function(){o(!1,n),g()}),h)),t.onflush&&(n?(f+=n.length,i.writeUint8Array(n,(function(){o(!1,n),_()}),h)):_()),t.progress&&s&&s(d+t.current,r)}function g(){(d=p*a)<r?t.readUint8Array(n+d,Math.min(a,r-d),(function(t){e.postMessage({append:!0,data:t}),p++,s&&s(d,r),o(!0,t)}),c):e.postMessage({flush:!0})}f=0,e.addEventListener(l,m,!1),g()}function y(e,t,i,n,r,o,s,l,u,c){var h,d=0,f=0;!function p(){var _;(h=d*a)<r?t.readUint8Array(n+h,Math.min(a,r-h),(function(t){var a=e.append(t,(function(){s&&s(n+h,r)}));f+=a.length,o(!0,t),i.writeUint8Array(a,(function(){o(!1,a),d++,setTimeout(p,1)}),c),s&&s(h,r)}),u):(_=e.flush())?(f+=_.length,i.writeUint8Array(_,(function(){o(!1,_),l(f)}),c)):l(f)}()}function $(e,t,i,n,r,o,s,l,c){var h=0,d=new u;!function u(){var f=h*a;f<n?e.readUint8Array(i+f,Math.min(a,n-f),(function(e){r&&d.append(e),s&&s(f,n,e),t.writeUint8Array(e,(function(){h++,u()}),c)}),l):o(n,d.get())}()}function b(e){var t,i,n="",r=["Ç","ü","é","â","ä","à","å","ç","ê","ë","è","ï","î","ì","Ä","Å","É","æ","Æ","ô","ö","ò","û","ù","ÿ","Ö","Ü","ø","£","Ø","×","ƒ","á","í","ó","ú","ñ","Ñ","ª","º","¿","®","¬","½","¼","¡","«","»","_","_","_","¦","¦","Á","Â","À","©","¦","¦","+","+","¢","¥","+","+","-","-","+","-","+","ã","Ã","+","+","-","-","¦","-","+","¤","ð","Ð","Ê","Ë","È","i","Í","Î","Ï","+","+","_","_","¦","Ì","_","Ó","ß","Ô","Ò","õ","Õ","µ","þ","Þ","Ú","Û","Ù","ý","Ý","¯","´","­","±","_","¾","¶","§","÷","¸","°","¨","·","¹","³","²","_"," "];for(t=0;t<e.length;t++)n+=(i=255&e.charCodeAt(t))>127?r[i-128]:String.fromCharCode(i);return n}function T(e){return decodeURIComponent(escape(e))}function C(e){var t,i="";for(t=0;t<e.length;t++)i+=String.fromCharCode(e[t]);return i}function S(e,t,i,n,r){e.version=t.view.getUint16(i,!0),e.bitFlag=t.view.getUint16(i+2,!0),e.compressionMethod=t.view.getUint16(i+4,!0),e.lastModDateRaw=t.view.getUint32(i+6,!0),e.lastModDate=function(e){var t=(4294901760&e)>>16,i=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&i)>>11,(2016&i)>>5,2*(31&i),0)}catch{}}(e.lastModDateRaw),1!=(1&e.bitFlag)?((n||8!=(8&e.bitFlag))&&(e.crc32=t.view.getUint32(i+10,!0),e.compressedSize=t.view.getUint32(i+14,!0),e.uncompressedSize=t.view.getUint32(i+18,!0)),4294967295!==e.compressedSize&&4294967295!==e.uncompressedSize?(e.filenameLength=t.view.getUint16(i+22,!0),e.extraFieldLength=t.view.getUint16(i+24,!0)):r("File is using Zip64 (4gb+ file size).")):r("File contains encrypted entry.")}function w(t,i){function a(){}function s(e,n){t.readUint8Array(t.size-e,e,(function(t){var i=c(t.length,t).view;1347093766!=i.getUint32(0)?s(e+1,n):n(i)}),(function(){i(r)}))}return a.prototype.getData=function(r,a,s,l){var h,d=this;function f(e,t){h&&h.terminate(),h=null,e&&e(t)}function p(e,t){l&&!function(e){var t=c(4);return t.view.setUint32(0,e),d.crc32==t.view.getUint32(0)}(t)?_():r.getData((function(e){f(a,e)}))}function _(){f(i,o)}function m(){f(i,"Error while writing file data.")}t.readUint8Array(d.offset,30,(function(o){var a,f=c(o.length,o);1347093252==f.view.getUint32(0)?(S(d,f,4,!1,i),a=d.offset+30+d.filenameLength+d.extraFieldLength,r.init((function(){0===d.compressionMethod?$(t,r,a,d.compressedSize,l,p,s,_,m):h=function(t,i,n,r,o,a,s,l,c){var h,d=new u;function f(e,t){o&&!e&&d.append(t)}function p(e){a(e,d.get())}return e.zip.useWebWorkers?v(h=new Worker(e.zip.workerScriptsPath+"inflate.js"),t,i,n,r,f,s,p,l,c):y(new e.zip.Inflater,t,i,n,r,f,s,p,l,c),h}(t,r,a,d.compressedSize,l,p,s,_,m)}),m)):i(n)}),_)},{getEntries:function(e){t.size<22?i(n):s(22,(function(o){var s,l;s=o.getUint32(16,!0),l=o.getUint16(8,!0),t.readUint8Array(s,t.size-s,(function(t){var r,o,s,u,h=0,d=[],f=c(t.length,t);for(r=0;r<l;r++){if(o=new a,1347092738!=f.view.getUint32(h))return void i(n);S(o,f,h+6,!0,i),o.commentLength=f.view.getUint16(h+32,!0),o.directory=16==(16&f.view.getUint8(h+38)),o.offset=f.view.getUint32(h+42,!0),s=C(f.array.subarray(h+46,h+46+o.filenameLength)),o.filename=2048==(2048&o.bitFlag)?T(s):b(s),!o.directory&&"/"==o.filename.charAt(o.filename.length-1)&&(o.directory=!0),u=C(f.array.subarray(h+46+o.filenameLength+o.extraFieldLength,h+46+o.filenameLength+o.extraFieldLength+o.commentLength)),o.comment=2048==(2048&o.bitFlag)?T(u):b(u),d.push(o),h+=46+o.filenameLength+o.extraFieldLength+o.commentLength}e(d)}),(function(){i(r)}))}))},close:function(e){e&&e()}}}function E(e){return unescape(encodeURIComponent(e))}function P(e){var t,i=[];for(t=0;t<e.length;t++)i.push(e.charCodeAt(t));return i}function A(t,i,n){var r,a={},s=[],h=0;function d(e,t){r&&r.terminate(),r=null,e&&e(t)}function f(){d(i,"Error while writing zip file.")}function p(){d(i,o)}return{add:function(o,_,m,g,x){var b,T,C;function S(e,i){var n=c(16);h+=e||0,n.view.setUint32(0,1347094280),typeof i<"u"&&(b.view.setUint32(10,i,!0),n.view.setUint32(4,i,!0)),_&&(n.view.setUint32(8,e,!0),b.view.setUint32(14,e,!0),n.view.setUint32(12,_.size,!0),b.view.setUint32(18,_.size,!0)),t.writeUint8Array(n.array,(function(){h+=16,d(m)}),f)}function w(){x=x||{},o=o.trim(),x.directory&&"/"!=o.charAt(o.length-1)&&(o+="/"),a.hasOwnProperty(o)?i("File already exists."):(T=P(E(o)),s.push(o),function(e){var i;C=x.lastModDate||new Date,b=c(26),a[o]={headerArray:b.array,directory:x.directory,filename:T,offset:h,comment:P(E(x.comment||""))},b.view.setUint32(0,335546376),x.version&&b.view.setUint8(0,x.version),!n&&0!==x.level&&!x.directory&&b.view.setUint16(4,2048),b.view.setUint16(6,(C.getHours()<<6|C.getMinutes())<<5|C.getSeconds()/2,!0),b.view.setUint16(8,(C.getFullYear()-1980<<4|C.getMonth()+1)<<5|C.getDate(),!0),b.view.setUint16(22,T.length,!0),(i=c(30+T.length)).view.setUint32(0,1347093252),i.array.set(b.array,4),i.array.set(T,30),h+=i.array.length,t.writeUint8Array(i.array,e,f)}((function(){_?n||0===x.level?$(_,t,0,_.size,!0,S,g,p,f):r=function(t,i,n,r,o,a,s){var c,h=new u;function d(e,t){e&&h.append(t)}function f(e){r(e,h.get())}return e.zip.useWebWorkers?((c=new Worker(e.zip.workerScriptsPath+"deflate.js")).addEventListener(l,(function e(){c.removeEventListener(l,e,!1),v(c,t,i,0,t.size,d,o,f,a,s)}),!1),c.postMessage({init:!0,level:n})):y(new e.zip.Deflater,t,i,0,t.size,d,o,f,a,s),c}(_,t,x.level,S,g,p,f):S()})))}_?_.init(w,p):w()},close:function(e){var i,n,r,o=0,l=0;for(n=0;n<s.length;n++)o+=46+(r=a[s[n]]).filename.length+r.comment.length;for(i=c(o+22),n=0;n<s.length;n++)r=a[s[n]],i.view.setUint32(l,1347092738),i.view.setUint16(l+4,5120),i.array.set(r.headerArray,l+6),i.view.setUint16(l+32,r.comment.length,!0),r.directory&&i.view.setUint8(l+38,16),i.view.setUint32(l+42,r.offset,!0),i.array.set(r.filename,l+46),i.array.set(r.comment,l+46+r.filename.length),l+=46+r.filename.length+r.comment.length;i.view.setUint32(l,1347093766),i.view.setUint16(l+8,s.length,!0),i.view.setUint16(l+10,s.length,!0),i.view.setUint32(l+12,o,!0),i.view.setUint32(l+16,h,!0),t.writeUint8Array(i.array,(function(){d((function(){t.getData(e)}))}),f)}}}u.prototype.table=function(){var e,t,i,n=[];for(e=0;e<256;e++){for(i=e,t=0;t<8;t++)1&i?i=i>>>1^3988292384:i>>>=1;n[e]=i}return n}(),d.prototype=new h,d.prototype.constructor=d,f.prototype=new h,f.prototype.constructor=f,p.prototype=new h,p.prototype.constructor=p,_.prototype.getData=function(e){e(this.data)},m.prototype=new _,m.prototype.constructor=m,g.prototype=new _,g.prototype.constructor=g,x.prototype=new _,x.prototype.constructor=x,e.zip={Reader:h,Writer:_,BlobReader:p,Data64URIReader:f,TextReader:d,BlobWriter:x,Data64URIWriter:g,TextWriter:m,createReader:function(e,t,i){e.init((function(){t(w(e,i))}),i)},createWriter:function(e,t,i,n){e.init((function(){t(A(e,i,n))}),i)},useWebWorkers:!0},Object.defineProperties(e.zip,{workerScriptsPath:{get:function(){return typeof i>"u"&&(i=n$15("ThirdParty/Workers/")),i}}})}($$l);var he$8=$$l.zip,ie$9=32,ze$6="http://www.opengis.net/kml/2.2",A$s="http://www.google.com/kml/ext/2.2",Ge$5="http://www.w3.org/2000/xmlns/";function Y$g(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var We$6=/^data:image\/([^,;]+)/;function je$6(e,t){return function(i){e._files[t]=i}}function $$k(e){this._time=e}function ne$f(){this._ids={},this._styles={},this._count=0}function se$9(){this._ids={}}function oe$a(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).entities,i=u$_(e.kmz,!1);if(!e$2b(t))throw new t$16("entities is required.");var n=oe$a._createState(e),r=t.values.filter((function(e){return!e$2b(e.parent)})),o=n.kmlDoc,a=o.documentElement;a.setAttributeNS(Ge$5,"xmlns:gx",A$s);var s=o.createElement("Document");a.appendChild(s),ge$a(n,s,r),n.styleCache.save(s);var l=n.externalFileHandler;return l.promise.then((function(){var e=(new XMLSerializer).serializeToString(n.kmlDoc);return i?qe$2(e,l.files):{kml:e,externalFiles:l.files}}))}function qe$2(e,t){var i=o$1l.defer();return he$8.createWriter(new he$8.BlobWriter,(function(n){Ke$4(n,e).then((function(){var e=Object.keys(t);return me$c(n,e,t,0)})).then((function(){n.close((function(e){i.resolve({kmz:e})}))}))})),i.promise}function Ke$4(e,t){var i=o$1l.defer();return e.add("doc.kml",new he$8.TextReader(t),(function(){i.resolve()})),i.promise}function me$c(e,t,i,n){if(t.length!==n){var r=t[n],o=o$1l.defer();return e.add(r,new he$8.BlobReader(i[r]),(function(){o.resolve()})),o.promise.then((function(){return me$c(e,t,i,n+1)}))}}function ge$a(e,t,i){for(var n,r,o,a=e.kmlDoc,s=e.styleCache,l=e.valueGetter,u=e.idManager,c=i.length,h=0;h<c;++h){var d=i[h];n=[],Xe$4(e,d,r=[],o=[]),Ze$6(e,d.polyline,r,o),we$7(e,d.rectangle,r,o,n),we$7(e,d.polygon,r,o,n),rr$1(e,d,d.model,r,o);var f,p=d.availability;e$2b(p)&&(f=a.createElement("TimeSpan"),a$15.equals(p.start,o$H.MINIMUM_VALUE)||f.appendChild(l$t(a,"begin",a$15.toIso8601(p.start))),a$15.equals(p.stop,o$H.MAXIMUM_VALUE)||f.appendChild(l$t(a,"end",a$15.toIso8601(p.stop))));for(var _=0;_<n.length;++_){var m=n[_];m.setAttribute("id",u.get(d.id)),m.appendChild(l$t(a,"name",d.name)),m.appendChild(l$t(a,"visibility",d.show)),m.appendChild(l$t(a,"description",d.description)),e$2b(f)&&m.appendChild(f),t.appendChild(m)}var g=r.length;if(g>0){var x=a.createElement("Placemark");x.setAttribute("id",u.get(d.id));var v=d.name,y=d.label;if(e$2b(y)){var $=a.createElement("LabelStyle"),b=l.get(y.text);v=e$2b(b)&&b.length>0?b:v;var T=l.getColor(y.fillColor);e$2b(T)&&($.appendChild(l$t(a,"color",T)),$.appendChild(l$t(a,"colorMode","normal")));var C=l.get(y.scale);e$2b(C)&&$.appendChild(l$t(a,"scale",C)),o.push($)}x.appendChild(l$t(a,"name",v)),x.appendChild(l$t(a,"visibility",d.show)),x.appendChild(l$t(a,"description",d.description)),e$2b(f)&&x.appendChild(f),t.appendChild(x);var S=o.length;if(S>0){for(var w=a.createElement("Style"),E=0;E<S;++E)w.appendChild(o[E]);x.appendChild(l$t(a,"styleUrl",s.get(w)))}if(1===r.length)x.appendChild(r[0]);else if(r.length>1){for(var P=a.createElement("MultiGeometry"),A=0;A<g;++A)P.appendChild(r[A]);x.appendChild(P)}}var L=d._children;if(L.length>0){var M=a.createElement("Folder");M.setAttribute("id",u.get(d.id)),M.appendChild(l$t(a,"name",d.name)),M.appendChild(l$t(a,"visibility",d.show)),M.appendChild(l$t(a,"description",d.description)),t.appendChild(M),ge$a(e,M,L)}}}Y$g.prototype.texture=function(e){var t,i=this;if("string"==typeof e||e instanceof t$11){if(!(e=t$11.createIfNeeded(e)).isDataUri)return e.url;var n=e.url.match(We$6);t="texture_"+ ++this._count,e$2b(n)&&(t+="."+n[1]);var r=e.fetchBlob().then((function(e){i._files[t]=e}));return this._promises.push(r),t}if(e instanceof HTMLCanvasElement){var o=o$1l.defer();return this._promises.push(o.promise),t="texture_"+ ++this._count+".png",e.toBlob((function(e){i._files[t]=e,o.resolve()})),t}return""},Y$g.prototype.model=function(e,t){var i=this._modelCallback;if(!e$2b(i))throw new t$14("Encountered a model entity while exporting to KML, but no model callback was supplied.");var n={},r=i(e,t,n);for(var o in n)if(n.hasOwnProperty(o)){var a=o$1l(n[o]);this._promises.push(a),a.then(je$6(this,o))}return r},Object.defineProperties(Y$g.prototype,{promise:{get:function(){return o$1l.all(this._promises)}},files:{get:function(){return this._files}}}),$$k.prototype.get=function(e,t,i){var n;return e$2b(e)&&(n=e$2b(e.getValue)?e.getValue(this._time,i):e),u$_(n,t)},$$k.prototype.getColor=function(e,t){var i=this.get(e,t);if(e$2b(i))return H$v(i)},$$k.prototype.getMaterialType=function(e){if(e$2b(e))return e.getType(this._time)},ne$f.prototype.get=function(e){var t=this._ids,i=e.innerHTML;if(e$2b(t[i]))return t[i];var n="style-"+ ++this._count;return e.setAttribute("id",n),n="#"+n,t[i]=n,this._styles[i]=e,n},ne$f.prototype.save=function(e){var t=this._styles,i=e.childNodes[0];for(var n in t)t.hasOwnProperty(n)&&e.insertBefore(t[n],i)},se$9.prototype.get=function(e){if(!e$2b(e))return this.get(e$1Q());var t=this._ids;return e$2b(t[e])?e.toString()+"-"+ ++t[e]:(t[e]=0,e)},oe$a._createState=function(e){var t=e.entities,i=new ne$f,n=t.computeAvailability(),r=e$2b(e.time)?e.time:n.start,o=u$_(e.defaultAvailability,n),a=u$_(e.sampleDuration,60);o.start===o$H.MINIMUM_VALUE?o.stop===o$H.MAXIMUM_VALUE?o=new d$W:a$15.addSeconds(o.stop,-10*a,o.start):o.stop===o$H.MAXIMUM_VALUE&&a$15.addSeconds(o.start,10*a,o.stop);var s=new Y$g(e.modelCallback);return{kmlDoc:document.implementation.createDocument(ze$6,"kml"),ellipsoid:u$_(e.ellipsoid,t$13.WGS84),idManager:new se$9,styleCache:i,externalFileHandler:s,time:r,valueGetter:new $$k(r),sampleDuration:a,defaultAvailability:new c$z([o])}};var T$o=new o$1p,_$m=new a$18,R$m=new a$15;function Xe$4(e,t,i,n){var r=e.kmlDoc,o=e.ellipsoid,a=e.valueGetter,s=u$_(t.billboard,t.point);if(e$2b(s)||e$2b(t.path)){var l=t.position;if(!l.isConstant)return void Ce$6(e,t,s,i,n);a.get(l,void 0,T$o);var u=l$t(r,"coordinates",F$l(T$o,o)),c=r.createElement("Point"),h=r.createElement("altitudeMode");h.appendChild(B$l(e,s.heightReference)),c.appendChild(h),c.appendChild(u),i.push(c);var d=s instanceof n$T?De$a(e,s):Ee$b(e,s);n.push(d)}}function Ce$6(e,t,i,n,r){var o,a=e.kmlDoc,s=e.ellipsoid,l=e.valueGetter,u=t.position,c=!0;u instanceof t$q?(o=u.intervals,c=!1):o=u$_(t.availability,e.defaultAvailability);var h,d,f,p=i instanceof t$J,_=[];for(h=0;h<o.length;++h){var m=o.get(h),g=c?u:m.data,x=a.createElement("altitudeMode");g instanceof i$s?(g=g._value,x.appendChild(B$l(e,k$P.CLAMP_TO_GROUND))):e$2b(i)?x.appendChild(B$l(e,i.heightReference)):x.appendChild(B$l(e,k$P.NONE));var v=[],y=[];if(g.isConstant){l.get(g,void 0,T$o);var $=l$t(a,"coordinates",F$l(T$o,s));v.push(a$15.toIso8601(m.start)),y.push($),v.push(a$15.toIso8601(m.stop)),y.push($)}else if(g instanceof o$y)for(f=g._property._times,d=0;d<f.length;++d)v.push(a$15.toIso8601(f[d])),g.getValueInReferenceFrame(f[d],Re$k.FIXED,T$o),y.push(F$l(T$o,s));else if(g instanceof g$x){f=g._times;var b=g._values;for(d=0;d<f.length;++d)v.push(a$15.toIso8601(f[d])),o$1p.fromArray(b,3*d,T$o),y.push(F$l(T$o,s))}else{var T=e.sampleDuration;m.start.clone(R$m),m.isStartIncluded||a$15.addSeconds(R$m,T,R$m);for(var C=m.stop;a$15.lessThan(R$m,C);)g.getValue(R$m,T$o),v.push(a$15.toIso8601(R$m)),y.push(F$l(T$o,s)),a$15.addSeconds(R$m,T,R$m);m.isStopIncluded&&a$15.equals(R$m,C)&&(g.getValue(R$m,T$o),v.push(a$15.toIso8601(R$m)),y.push(F$l(T$o,s)))}var S=a.createElementNS(A$s,"Track");S.appendChild(x);for(var w=0;w<v.length;++w){var E=l$t(a,"when",v[w]),P=l$t(a,"coord",y[w],A$s);S.appendChild(E),S.appendChild(P)}p&&S.appendChild(_e$7(e,i)),_.push(S)}if(1===_.length)n.push(_[0]);else if(_.length>1){var A=a.createElementNS(A$s,"MultiTrack");for(h=0;h<_.length;++h)A.appendChild(_[h]);n.push(A)}if(e$2b(i)&&!p){var L=i instanceof n$T?De$a(e,i):Ee$b(e,i);r.push(L)}var M=t.path;if(e$2b(M)){var R=l.get(M.width),I=M.material;if(e$2b(I)||e$2b(R)){var O=a.createElement("LineStyle");e$2b(R)&&O.appendChild(l$t(a,"width",R)),de$9(e,I,O),r.push(O)}}}function Ee$b(e,t){var i=e.kmlDoc,n=e.valueGetter,r=i.createElement("IconStyle"),o=n.getColor(t.color);e$2b(o)&&(r.appendChild(l$t(i,"color",o)),r.appendChild(l$t(i,"colorMode","normal")));var a=n.get(t.pixelSize);return e$2b(a)&&r.appendChild(l$t(i,"scale",a/ie$9)),r}function De$a(e,t){var i=e.kmlDoc,n=e.valueGetter,r=e.externalFileHandler,o=i.createElement("IconStyle"),a=n.get(t.image);if(e$2b(a)){a=r.texture(a);var s=i.createElement("Icon");s.appendChild(l$t(i,"href",a));var l=n.get(t.imageSubRegion);e$2b(l)&&(s.appendChild(l$t(i,"x",l.x,A$s)),s.appendChild(l$t(i,"y",l.y,A$s)),s.appendChild(l$t(i,"w",l.width,A$s)),s.appendChild(l$t(i,"h",l.height,A$s))),o.appendChild(s)}var u=n.getColor(t.color);e$2b(u)&&(o.appendChild(l$t(i,"color",u)),o.appendChild(l$t(i,"colorMode","normal")));var c=n.get(t.scale);e$2b(c)&&o.appendChild(l$t(i,"scale",c));var h=n.get(t.pixelOffset);if(e$2b(h)){c=u$_(c,1),o$1o.divideByScalar(h,c,h);var d=n.get(t.width,ie$9),f=n.get(t.height,ie$9),p=n.get(t.horizontalOrigin,j$T.CENTER);p===j$T.CENTER?h.x-=.5*d:p===j$T.RIGHT&&(h.x-=d);var _=n.get(t.verticalOrigin,S$O.CENTER);_===S$O.TOP?h.y+=f:_===S$O.CENTER&&(h.y+=.5*f);var m=i.createElement("hotSpot");m.setAttribute("x",-h.x),m.setAttribute("y",h.y),m.setAttribute("xunits","pixels"),m.setAttribute("yunits","pixels"),o.appendChild(m)}var g=n.get(t.rotation),x=n.get(t.alignedAxis);return e$2b(g)&&o$1p.equals(o$1p.UNIT_Z,x)&&(0===(g=e$2a.toDegrees(-g))&&(g=360),o.appendChild(l$t(i,"heading",g))),o}function Ze$6(e,t,i,n){var r=e.kmlDoc,o=e.ellipsoid,a=e.valueGetter;if(e$2b(t)){var s,l=r.createElement("LineString"),u=r.createElement("altitudeMode"),c=a.get(t.clampToGround,!1);c?(l.appendChild(l$t(r,"tessellate",!0)),s=r.createTextNode("clampToGround")):s=r.createTextNode("absolute"),u.appendChild(s),l.appendChild(u);var h=t.positions,d=l$t(r,"coordinates",F$l(a.get(h),o));l.appendChild(d);var f=a.get(t.zIndex);c&&e$2b(f)&&l.appendChild(l$t(r,"drawOrder",f,A$s)),i.push(l);var p=r.createElement("LineStyle"),_=a.get(t.width);e$2b(_)&&p.appendChild(l$t(r,"width",_)),de$9(e,t.material,p),n.push(p)}}function Je$3(e,t,i){var n,r=e.kmlDoc,o=e.valueGetter,a=o.get(t.height,0);i>0&&(a=i);for(var s=t.coordinates,l=o.get(s),u=[],c=[h$18.northeast,h$18.southeast,h$18.southwest,h$18.northwest],h=0;h<4;++h)c[h](l,_$m),u.push(e$2a.toDegrees(_$m.longitude)+","+e$2a.toDegrees(_$m.latitude)+","+a);n=l$t(r,"coordinates",u.join(" "));var d=r.createElement("outerBoundaryIs"),f=r.createElement("LinearRing");return f.appendChild(n),d.appendChild(f),[d]}function Me$a(e,t,i,n){for(var r=e.kmlDoc,o=e.ellipsoid,a=[],s=t.length,l=0;l<s;++l)a$18.fromCartesian(t[l],o,_$m),a.push(e$2a.toDegrees(_$m.longitude)+","+e$2a.toDegrees(_$m.latitude)+","+(n?_$m.height:i));var u=l$t(r,"coordinates",a.join(" ")),c=r.createElement("LinearRing");return c.appendChild(u),c}function Qe$4(e,t,i){var n=e.kmlDoc,r=e.valueGetter,o=r.get(t.height,0),a=r.get(t.perPositionHeight,!1);!a&&i>0&&(o=i);var s=[],l=t.hierarchy,u=r.get(l),c=Array.isArray(u)?u:u.positions,h=n.createElement("outerBoundaryIs");h.appendChild(Me$a(e,c,o,a)),s.push(h);var d=u.holes;if(e$2b(d))for(var f=d.length,p=0;p<f;++p){var _=n.createElement("innerBoundaryIs");_.appendChild(Me$a(e,d[p].positions,o,a)),s.push(_)}return s}function we$7(e,t,i,n,r){var o=e.kmlDoc,a=e.valueGetter;if(e$2b(t)){var s=t instanceof n$L;if(s&&"Image"===a.getMaterialType(t.material))return void Ve$8(e,t,r);var l=o.createElement("Polygon"),u=a.get(t.extrudedHeight,0);u>0&&l.appendChild(l$t(o,"extrude",!0));for(var c=s?Je$3(e,t,u):Qe$4(e,t,u),h=c.length,d=0;d<h;++d)l.appendChild(c[d]);var f=o.createElement("altitudeMode");f.appendChild(B$l(e,t.heightReference)),l.appendChild(f),i.push(l);var p=o.createElement("PolyStyle"),_=a.get(t.fill,!1);_&&p.appendChild(l$t(o,"fill",_)),de$9(e,t.material,p);var m=a.get(t.outline,!1);if(m){p.appendChild(l$t(o,"outline",m));var g=o.createElement("LineStyle"),x=a.get(t.outlineWidth,1);g.appendChild(l$t(o,"width",x));var v=a.getColor(t.outlineColor,e$1U.BLACK);g.appendChild(l$t(o,"color",v)),g.appendChild(l$t(o,"colorMode","normal")),n.push(g)}n.push(p)}}function Ve$8(e,t,i){var n=e.kmlDoc,r=e.valueGetter,o=e.externalFileHandler,a=n.createElement("GroundOverlay"),s=n.createElement("altitudeMode");s.appendChild(B$l(e,t.heightReference)),a.appendChild(s);var l=r.get(t.height);e$2b(l)&&a.appendChild(l$t(n,"altitude",l));var u=r.get(t.coordinates),c=n.createElement("LatLonBox");c.appendChild(l$t(n,"north",e$2a.toDegrees(u.north))),c.appendChild(l$t(n,"south",e$2a.toDegrees(u.south))),c.appendChild(l$t(n,"east",e$2a.toDegrees(u.east))),c.appendChild(l$t(n,"west",e$2a.toDegrees(u.west))),a.appendChild(c);var h=r.get(t.material),d=o.texture(h.image),f=n.createElement("Icon");f.appendChild(l$t(n,"href",d)),a.appendChild(f),e$2b(h.color)&&a.appendChild(l$t(n,"color",H$v(h.color))),i.push(a)}var Ye$4=new o$1p;function _e$7(e,t){var i=e.kmlDoc,n=e.valueGetter,r=e.externalFileHandler,o=i.createElement("Model"),a=n.get(t.scale);if(e$2b(a)){a instanceof o$1p||(a=o$1p.fromElements(a,a,a,Ye$4));var s=i.createElement("Scale");s.appendChild(l$t(i,"x",a.x)),s.appendChild(l$t(i,"y",a.y)),s.appendChild(l$t(i,"z",a.z)),o.appendChild(s)}var l=i.createElement("Link"),u=r.model(t,e.time);return l.appendChild(l$t(i,"href",u)),o.appendChild(l),o}var xe$8=new p$1e,$e$3=new p$1d,le$f=new p$1d;function er$1(e,t){var i=m$17.eastNorthUpToFixedFrame(e,void 0,le$f),n=p$1e.fromQuaternion(t,xe$8),r=p$1d.fromRotationTranslation(n,o$1p.ZERO,$e$3),o=p$1d.inverse(i,le$f),a=p$1d.multiply(o,r,le$f),s=p$1d.getMatrix3(a,xe$8);return i$15.fromQuaternion(n$13.fromRotationMatrix(s))}function rr$1(e,t,i,n,r){var o=e.kmlDoc,a=e.ellipsoid,s=e.valueGetter;if(e$2b(i)){var l=t.position;if(!l.isConstant)return void Ce$6(e,t,i,n,r);var u=_e$7(e,i),c=o.createElement("altitudeMode");c.appendChild(B$l(e,i.heightReference)),u.appendChild(c),s.get(l,void 0,T$o),a$18.fromCartesian(T$o,a,_$m);var h=o.createElement("Location");h.appendChild(l$t(o,"longitude",e$2a.toDegrees(_$m.longitude))),h.appendChild(l$t(o,"latitude",e$2a.toDegrees(_$m.latitude))),h.appendChild(l$t(o,"altitude",_$m.height)),u.appendChild(h);var d=n$13.IDENTITY;e$2b(t.orientation)&&(d=t.orientation.getValue(e.time));var f=er$1(t.position.getValue(e.time),d),p=o.createElement("Orientation");p.appendChild(l$t(o,"heading",e$2a.toDegrees(f.heading))),p.appendChild(l$t(o,"tilt",e$2a.toDegrees(f.pitch))),p.appendChild(l$t(o,"roll",e$2a.toDegrees(f.roll))),u.appendChild(p),n.push(u)}}function de$9(e,t,i){var n=e.kmlDoc,r=e.valueGetter;if(e$2b(t)){var o=r.get(t);if(e$2b(o)){var a;switch(r.getMaterialType(t)){case"Image":a=H$v(e$1U.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":a=H$v(o.color);break;case"PolylineOutline":a=H$v(o.color);var s=H$v(o.outlineColor),l=o.outlineWidth;i.appendChild(l$t(n,"outerColor",s,A$s)),i.appendChild(l$t(n,"outerWidth",l,A$s));break;case"Stripe":a=H$v(o.oddColor)}e$2b(a)&&(i.appendChild(l$t(n,"color",a)),i.appendChild(l$t(n,"colorMode","normal")))}}}function B$l(e,t){var i,n=e.kmlDoc;switch(e.valueGetter.get(t,k$P.NONE)){case k$P.NONE:i=n.createTextNode("absolute");break;case k$P.CLAMP_TO_GROUND:i=n.createTextNode("clampToGround");break;case k$P.RELATIVE_TO_GROUND:i=n.createTextNode("relativeToGround")}return i}function F$l(e,t){Array.isArray(e)||(e=[e]);for(var i=e.length,n=[],r=0;r<i;++r)a$18.fromCartesian(e[r],t,_$m),n.push(e$2a.toDegrees(_$m.longitude)+","+e$2a.toDegrees(_$m.latitude)+","+_$m.height);return n.join(" ")}function l$t(e,t,i,n){"boolean"==typeof(i=u$_(i,""))&&(i=i?"1":"0");var r=e$2b(n)?e.createElementNS(n,t):e.createElement(t),o="string"===i&&-1!==i.indexOf("<")?e.createCDATASection(i):e.createTextNode(i);return r.appendChild(o),r}function H$v(e){for(var t="",i=e.toBytes(),n=3;n>=0;--n)t+=i[n]<16?"0"+i[n].toString(16):i[n].toString(16);return t}var ce$d={};!function(e,t){!function(e){var t=function(e){return e},i=function(e){if(null==e)return t;var i,n,r=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(i=n=0);var l=2,u=e.length,c=new Array(u);for(c[0]=(i+=e[0])*r+a,c[1]=(n+=e[1])*o+s;l<u;)c[l]=e[l],++l;return c}},n=function(e){var t,n=i(e.transform),r=1/0,o=r,a=-r,s=-r;function l(e){(e=n(e))[0]<r&&(r=e[0]),e[0]>a&&(a=e[0]),e[1]<o&&(o=e[1]),e[1]>s&&(s=e[1])}function u(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(u);break;case"Point":l(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(l)}}for(t in e.arcs.forEach((function(e){for(var t,i=-1,l=e.length;++i<l;)(t=n(e[i],i))[0]<r&&(r=t[0]),t[0]>a&&(a=t[0]),t[1]<o&&(o=t[1]),t[1]>s&&(s=t[1])})),e.objects)u(e.objects[t]);return[r,o,a,s]},r=function(e,t){for(var i,n=e.length,r=n-t;r<--n;)i=e[r],e[r++]=e[n],e[n]=i},o=function(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return a(e,t)}))}:a(e,t)};function a(e,t){var i=t.id,n=t.bbox,r=null==t.properties?{}:t.properties,o=s(e,t);return null==i&&null==n?{type:"Feature",properties:r,geometry:o}:null==n?{type:"Feature",id:i,properties:r,geometry:o}:{type:"Feature",id:i,bbox:n,properties:r,geometry:o}}function s(e,t){var n=i(e.transform),o=e.arcs;function a(e,t){t.length&&t.pop();for(var i=o[e<0?~e:e],a=0,s=i.length;a<s;++a)t.push(n(i[a],a));e<0&&r(t,s)}function s(e){return n(e)}function l(e){for(var t=[],i=0,n=e.length;i<n;++i)a(e[i],t);return t.length<2&&t.push(t[0]),t}function u(e){for(var t=l(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(u)}function h(e){var t,i=e.type;switch(i){case"GeometryCollection":return{type:i,geometries:e.geometries.map(h)};case"Point":t=s(e.coordinates);break;case"MultiPoint":t=e.coordinates.map(s);break;case"LineString":t=l(e.arcs);break;case"MultiLineString":t=e.arcs.map(l);break;case"Polygon":t=c(e.arcs);break;case"MultiPolygon":t=e.arcs.map(c);break;default:return null}return{type:i,coordinates:t}}return h(t)}var l=function(e,t){var i={},n={},r={},o=[],a=-1;function s(t){var i,n=e.arcs[t<0?~t:t],r=n[0];return e.transform?(i=[0,0],n.forEach((function(e){i[0]+=e[0],i[1]+=e[1]}))):i=n[n.length-1],t<0?[i,r]:[r,i]}function l(e,t){for(var n in e){var r=e[n];delete t[r.start],delete r.start,delete r.end,r.forEach((function(e){i[e<0?~e:e]=1})),o.push(r)}}return t.forEach((function(i,n){var r,o=e.arcs[i<0?~i:i];o.length<3&&!o[1][0]&&!o[1][1]&&(r=t[++a],t[a]=i,t[n]=r)})),t.forEach((function(e){var t,i,o=s(e),a=o[0],l=o[1];if(t=r[a])if(delete r[t.end],t.push(e),t.end=l,i=n[l]){delete n[i.start];var u=i===t?t:t.concat(i);n[u.start=t.start]=r[u.end=i.end]=u}else n[t.start]=r[t.end]=t;else if(t=n[l])if(delete n[t.start],t.unshift(e),t.start=a,i=r[a]){delete r[i.end];var c=i===t?t:i.concat(t);n[c.start=i.start]=r[c.end=t.end]=c}else n[t.start]=r[t.end]=t;else n[(t=[e]).start=a]=r[t.end=l]=t})),l(r,n),l(n,r),t.forEach((function(e){i[e<0?~e:e]||o.push([e])})),o},u=function(e){return s(e,c.apply(this,arguments))};function c(e,t,i){var n,r,o;if(arguments.length>1)n=h(e,t,i);else for(r=0,n=new Array(o=e.arcs.length);r<o;++r)n[r]=r;return{type:"MultiLineString",arcs:l(e,n)}}function h(e,t,i){var n,r=[],o=[];function a(e){var t=e<0?~e:e;(o[t]||(o[t]=[])).push({i:e,g:n})}function s(e){e.forEach(a)}function l(e){e.forEach(s)}function u(e){e.forEach(l)}function c(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(c);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":u(e.arcs)}}return c(t),o.forEach(null==i?function(e){r.push(e[0].i)}:function(e){i(e[0].g,e[e.length-1].g)&&r.push(e[0].i)}),r}function d(e){for(var t,i=-1,n=e.length,r=e[n-1],o=0;++i<n;)t=r,r=e[i],o+=t[0]*r[1]-t[1]*r[0];return Math.abs(o)}var f=function(e){return s(e,p.apply(this,arguments))};function p(e,t){var i={},n=[],r=[];function o(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(o);break;case"Polygon":a(e.arcs);break;case"MultiPolygon":e.arcs.forEach(a)}}function a(e){e.forEach((function(t){t.forEach((function(t){(i[t=t<0?~t:t]||(i[t]=[])).push(e)}))})),n.push(e)}function u(t){return d(s(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach(o),n.forEach((function(e){if(!e._){var t=[],n=[e];for(e._=1,r.push(t);e=n.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].forEach((function(e){e._||(e._=1,n.push(e))}))}))}))}})),n.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:r.map((function(t){var n,r=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].length<2&&r.push(e)}))}))})),(n=(r=l(e,r)).length)>1)for(var o,a,s=1,c=u(r[0]);s<n;++s)(o=u(r[s]))>c&&(a=r[0],r[0]=r[s],r[s]=a,c=o);return r}))}}var _=function(e,t){for(var i=0,n=e.length;i<n;){var r=i+n>>>1;e[r]<t?i=r+1:n=r}return i},m=function(e){var t={},i=e.map((function(){return[]}));function n(e,i){e.forEach((function(e){e<0&&(e=~e);var n=t[e];n?n.push(i):t[e]=[i]}))}function r(e,t){e.forEach((function(e){n(e,t)}))}function o(e,t){"GeometryCollection"===e.type?e.geometries.forEach((function(e){o(e,t)})):e.type in a&&a[e.type](e.arcs,t)}var a={LineString:n,MultiLineString:r,Polygon:r,MultiPolygon:function(e,t){e.forEach((function(e){r(e,t)}))}};for(var s in e.forEach(o),t)for(var l=t[s],u=l.length,c=0;c<u;++c)for(var h=c+1;h<u;++h){var d,f=l[c],p=l[h];(d=i[f])[s=_(d,p)]!==p&&d.splice(s,0,p),(d=i[p])[s=_(d,f)]!==f&&d.splice(s,0,f)}return i},g=function(e){if(null==e)return t;var i,n,r=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(i=n=0);var l=2,u=e.length,c=new Array(u),h=Math.round((e[0]-a)/r),d=Math.round((e[1]-s)/o);for(c[0]=h-i,i=h,c[1]=d-n,n=d;l<u;)c[l]=e[l],++l;return c}},x=function(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)l=e.bbox;else{if(!((i=Math.floor(t))>=2))throw new Error("n must be ≥2");var i,r=(l=e.bbox||n(e))[0],o=l[1],a=l[2],s=l[3];t={scale:[a-r?(a-r)/(i-1):1,s-o?(s-o)/(i-1):1],translate:[r,o]}}var l,u,c=g(t),h=e.objects,d={};function f(e){return c(e)}function p(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(p)};break;case"Point":t={type:"Point",coordinates:f(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(f)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function _(e){var t,i=0,n=1,r=e.length,o=new Array(r);for(o[0]=c(e[0],0);++i<r;)((t=c(e[i],i))[0]||t[1])&&(o[n++]=t);return 1===n&&(o[n++]=[0,0]),o.length=n,o}for(u in h)d[u]=p(h[u]);return{type:"Topology",bbox:l,transform:t,objects:d,arcs:e.arcs.map(_)}},v=function(e){var t=1/0,i=1/0,n=-1/0,r=-1/0;function o(e){null!=e&&a.hasOwnProperty(e.type)&&a[e.type](e)}var a={GeometryCollection:function(e){e.geometries.forEach(o)},Point:function(e){s(e.coordinates)},MultiPoint:function(e){e.coordinates.forEach(s)},LineString:function(e){l(e.arcs)},MultiLineString:function(e){e.arcs.forEach(l)},Polygon:function(e){e.arcs.forEach(l)},MultiPolygon:function(e){e.arcs.forEach(u)}};function s(e){var o=e[0],a=e[1];o<t&&(t=o),o>n&&(n=o),a<i&&(i=a),a>r&&(r=a)}function l(e){e.forEach(s)}function u(e){e.forEach(l)}for(var c in e)o(e[c]);return n>=t&&r>=i?[t,i,n,r]:void 0},y=function(e,t,i,n,r){3===arguments.length&&(n=Array,r=null);for(var o=new n(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),a=e-1,s=0;s<e;++s)o[s]=r;function l(n){for(var s=t(n)&a,l=o[s],u=0;l!=r;){if(i(l,n))return!0;if(++u>=e)throw new Error("full hashset");l=o[s=s+1&a]}return o[s]=n,!0}function u(n){for(var s=t(n)&a,l=o[s],u=0;l!=r;){if(i(l,n))return!0;if(++u>=e)break;l=o[s=s+1&a]}return!1}function c(){for(var e=[],t=0,i=o.length;t<i;++t){var n=o[t];n!=r&&e.push(n)}return e}return{add:l,has:u,values:c}},$=function(e,t,i,n,r,o){3===arguments.length&&(n=o=Array,r=null);for(var a=new n(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),s=new o(e),l=e-1,u=0;u<e;++u)a[u]=r;function c(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u]=o;if(++h>=e)throw new Error("full hashmap");c=a[u=u+1&l]}return a[u]=n,s[u]=o,o}function h(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u];if(++h>=e)throw new Error("full hashmap");c=a[u=u+1&l]}return a[u]=n,s[u]=o,o}function d(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u];if(++h>=e)break;c=a[u=u+1&l]}return o}function f(){for(var e=[],t=0,i=a.length;t<i;++t){var n=a[t];n!=r&&e.push(n)}return e}return{set:c,maybeSet:h,get:d,keys:f}},b=function(e,t){return e[0]===t[0]&&e[1]===t[1]},T=new ArrayBuffer(16),C=new Uint32Array(T),S=function(e){var t=C[0]^C[1];return 2147483647&(t=t<<5^t>>7^C[2]^C[3])},w=function(e){var t,i,n,r,o=e.coordinates,a=e.lines,s=e.rings,l=C(),u=new Int32Array(o.length),c=new Int32Array(o.length),h=new Int32Array(o.length),d=new Int8Array(o.length),f=0;for(t=0,i=o.length;t<i;++t)u[t]=c[t]=h[t]=-1;for(t=0,i=a.length;t<i;++t){var p=a[t],_=p[0],m=p[1];for(n=l[_],r=l[++_],++f,d[n]=1;++_<=m;)T(t,n,n=r,r=l[_]);++f,d[r]=1}for(t=0,i=o.length;t<i;++t)u[t]=-1;for(t=0,i=s.length;t<i;++t){var g=s[t],x=g[0]+1,v=g[1];for(T(t,l[v-1],n=l[x-1],r=l[x]);++x<=v;)T(t,n,n=r,r=l[x])}function T(e,t,i,n){if(u[i]!==e){u[i]=e;var r=c[i];if(r>=0){var o=h[i];(r!==t||o!==n)&&(r!==n||o!==t)&&(++f,d[i]=1)}else c[i]=t,h[i]=n}}function C(){for(var e=$(1.4*o.length,w,E,Int32Array,-1,Int32Array),t=new Int32Array(o.length),i=0,n=o.length;i<n;++i)t[i]=e.maybeSet(i,i);return t}function w(e){return S(o[e])}function E(e,t){return b(o[e],o[t])}u=c=h=null;var P,A=y(1.4*f,S,b);for(t=0,i=o.length;t<i;++t)d[P=l[t]]&&A.add(o[P]);return A},E=function(e){var t,i,n,r=w(e),o=e.coordinates,a=e.lines,s=e.rings;for(i=0,n=a.length;i<n;++i)for(var l=a[i],u=l[0],c=l[1];++u<c;)r.has(o[u])&&(t={0:u,1:l[1]},l[1]=u,l=l.next=t);for(i=0,n=s.length;i<n;++i)for(var h=s[i],d=h[0],f=d,p=h[1],_=r.has(o[d]);++f<p;)r.has(o[f])&&(_?(t={0:f,1:h[1]},h[1]=f,h=h.next=t):(P(o,d,p,p-f),o[p]=o[d],_=!0,f=d));return e};function P(e,t,i,n){A(e,t,i),A(e,t,t+n),A(e,t+n,i)}function A(e,t,i){for(var n,r=t+(i---t>>1);t<r;++t,--i)n=e[t],e[t]=e[i],e[i]=n}var L=function(e){var t,i,n,r,o=e.coordinates,a=e.lines,s=e.rings,l=a.length+s.length;for(delete e.lines,delete e.rings,n=0,r=a.length;n<r;++n)for(t=a[n];t=t.next;)++l;for(n=0,r=s.length;n<r;++n)for(i=s[n];i=i.next;)++l;var u=$(2*l*1.4,S,b),c=e.arcs=[];for(n=0,r=a.length;n<r;++n){t=a[n];do{h(t)}while(t=t.next)}for(n=0,r=s.length;n<r;++n)if((i=s[n]).next)do{h(i)}while(i=i.next);else d(i);function h(e){var t,i,n,r,a,s,l,h;if(n=u.get(t=o[e[0]]))for(l=0,h=n.length;l<h;++l)if(f(r=n[l],e))return e[0]=r[0],void(e[1]=r[1]);if(a=u.get(i=o[e[1]]))for(l=0,h=a.length;l<h;++l)if(p(s=a[l],e))return e[1]=s[0],void(e[0]=s[1]);n?n.push(e):u.set(t,[e]),a?a.push(e):u.set(i,[e]),c.push(e)}function d(e){var t,i,n,r,a;if(i=u.get(t=o[e[0]]))for(r=0,a=i.length;r<a;++r){if(_(n=i[r],e))return e[0]=n[0],void(e[1]=n[1]);if(m(n,e))return e[0]=n[1],void(e[1]=n[0])}if(i=u.get(t=o[e[0]+g(e)]))for(r=0,a=i.length;r<a;++r){if(_(n=i[r],e))return e[0]=n[0],void(e[1]=n[1]);if(m(n,e))return e[0]=n[1],void(e[1]=n[0])}i?i.push(e):u.set(t,[e]),c.push(e)}function f(e,t){var i=e[0],n=t[0],r=e[1];if(i-r!=n-t[1])return!1;for(;i<=r;++i,++n)if(!b(o[i],o[n]))return!1;return!0}function p(e,t){var i=e[0],n=t[0],r=e[1],a=t[1];if(i-r!=n-a)return!1;for(;i<=r;++i,--a)if(!b(o[i],o[a]))return!1;return!0}function _(e,t){var i=e[0],n=t[0],r=e[1]-i;if(r!==t[1]-n)return!1;for(var a=g(e),s=g(t),l=0;l<r;++l)if(!b(o[i+(l+a)%r],o[n+(l+s)%r]))return!1;return!0}function m(e,t){var i=e[0],n=t[0],r=e[1],a=t[1],s=r-i;if(s!==a-n)return!1;for(var l=g(e),u=s-g(t),c=0;c<s;++c)if(!b(o[i+(c+l)%s],o[a-(c+u)%s]))return!1;return!0}function g(e){for(var t=e[0],i=e[1],n=t,r=n,a=o[n];++n<i;){var s=o[n];(s[0]<a[0]||s[0]===a[0]&&s[1]<a[1])&&(r=n,a=s)}return r-t}return e},M=function(e){for(var t=-1,i=e.length;++t<i;){for(var n,r,o=e[t],a=0,s=1,l=o.length,u=o[0],c=u[0],h=u[1];++a<l;)n=(u=o[a])[0],r=u[1],(n!==c||r!==h)&&(o[s++]=[n-c,r-h],c=n,h=r);1===s&&(o[s++]=[0,0]),o.length=s}return e},R=function(e){var t=-1,i=[],n=[],r=[];function o(e){e&&a.hasOwnProperty(e.type)&&a[e.type](e)}var a={GeometryCollection:function(e){e.geometries.forEach(o)},LineString:function(e){e.arcs=s(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(s)},Polygon:function(e){e.arcs=e.arcs.map(l)},MultiPolygon:function(e){e.arcs=e.arcs.map(u)}};function s(e){for(var n=0,o=e.length;n<o;++n)r[++t]=e[n];var a={0:t-o+1,1:t};return i.push(a),a}function l(e){for(var i=0,o=e.length;i<o;++i)r[++t]=e[i];var a={0:t-o+1,1:t};return n.push(a),a}function u(e){return e.map(l)}for(var c in e)o(e[c]);return{type:"Topology",coordinates:r,lines:i,rings:n,objects:e}},I=function(e){var t,i={};for(t in e)i[t]=O(e[t]);return i};function O(e){return null==e?{type:null}:("FeatureCollection"===e.type?D:"Feature"===e.type?B:N)(e)}function D(e){var t={type:"GeometryCollection",geometries:e.features.map(B)};return null!=e.bbox&&(t.bbox=e.bbox),t}function B(e){var t,i=N(e.geometry);for(t in null!=e.id&&(i.id=e.id),null!=e.bbox&&(i.bbox=e.bbox),e.properties){i.properties=e.properties;break}return i}function N(e){if(null==e)return{type:null};var t="GeometryCollection"===e.type?{type:"GeometryCollection",geometries:e.geometries.map(N)}:"Point"===e.type||"MultiPoint"===e.type?{type:e.type,coordinates:e.coordinates}:{type:e.type,arcs:e.coordinates};return null!=e.bbox&&(t.bbox=e.bbox),t}var F=function(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=o-n?(i-1)/(o-n):1,l=a-r?(i-1)/(a-r):1;function u(e){return[Math.round((e[0]-n)*s),Math.round((e[1]-r)*l)]}function c(e,t){for(var i,o,a,u,c,h=-1,d=0,f=e.length,p=new Array(f);++h<f;)i=e[h],u=Math.round((i[0]-n)*s),c=Math.round((i[1]-r)*l),(u!==o||c!==a)&&(p[d++]=[o=u,a=c]);for(p.length=d;d<t;)d=p.push([p[0][0],p[0][1]]);return p}function h(e){return c(e,2)}function d(e){return c(e,4)}function f(e){return e.map(d)}function p(e){null!=e&&_.hasOwnProperty(e.type)&&_[e.type](e)}var _={GeometryCollection:function(e){e.geometries.forEach(p)},Point:function(e){e.coordinates=u(e.coordinates)},MultiPoint:function(e){e.coordinates=e.coordinates.map(u)},LineString:function(e){e.arcs=h(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(h)},Polygon:function(e){e.arcs=f(e.arcs)},MultiPolygon:function(e){e.arcs=e.arcs.map(f)}};for(var m in e)p(e[m]);return{scale:[1/s,1/l],translate:[n,r]}},U=function(e,t){var i=v(e=I(e)),n=t>0&&i&&F(e,i,t),r=L(E(R(e))),o=r.coordinates,a=$(1.4*r.arcs.length,z,G);function s(e){e&&l.hasOwnProperty(e.type)&&l[e.type](e)}e=r.objects,r.bbox=i,r.arcs=r.arcs.map((function(e,t){return a.set(e,t),o.slice(e[0],e[1]+1)})),delete r.coordinates,o=null;var l={GeometryCollection:function(e){e.geometries.forEach(s)},LineString:function(e){e.arcs=u(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(u)},Polygon:function(e){e.arcs=e.arcs.map(u)},MultiPolygon:function(e){e.arcs=e.arcs.map(c)}};function u(e){var t=[];do{var i=a.get(e);t.push(e[0]<e[1]?i:~i)}while(e=e.next);return t}function c(e){return e.map(u)}for(var h in e)s(e[h]);return n&&(r.transform=n,r.arcs=M(r.arcs)),r};function z(e){var t,i=e[0],n=e[1];return n<i&&(t=i,i=n,n=t),i+31*n}function G(e,t){var i,n=e[0],r=e[1],o=t[0],a=t[1];return r<n&&(i=n,n=r,r=i),a<o&&(i=o,o=a,a=i),n===o&&r===a}var V=function(e){var t,i,n=e.objects,r={},o=e.arcs,a=o.length,s=-1,l=new Array(a),u=0,c=-1;function h(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(h);break;case"LineString":f(e.arcs);break;case"MultiLineString":case"Polygon":e.arcs.forEach(f);break;case"MultiPolygon":e.arcs.forEach(p)}}function d(e){e<0&&(e=~e),l[e]||(l[e]=1,++u)}function f(e){e.forEach(d)}function p(e){e.forEach(f)}function _(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(_)};break;case"LineString":t={type:"LineString",arcs:g(e.arcs)};break;case"MultiLineString":t={type:"MultiLineString",arcs:e.arcs.map(g)};break;case"Polygon":t={type:"Polygon",arcs:e.arcs.map(g)};break;case"MultiPolygon":t={type:"MultiPolygon",arcs:e.arcs.map(x)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function m(e){return e<0?~l[~e]:l[e]}function g(e){return e.map(m)}function x(e){return e.map(g)}for(i in n)h(n[i]);for(t=new Array(u);++s<a;)l[s]&&(l[s]=++c,t[c]=o[s]);for(i in n)r[i]=_(n[i]);return{type:"Topology",bbox:e.bbox,transform:e.transform,objects:r,arcs:t}},k=function(e,t){var i,n=e.objects,r={};function o(e){var t,i;switch(e.type){case"Polygon":t=(i=a(e.arcs))?{type:"Polygon",arcs:i}:{type:null};break;case"MultiPolygon":t=(i=e.arcs.map(a).filter(H)).length?{type:"MultiPolygon",arcs:i}:{type:null};break;case"GeometryCollection":t=(i=e.geometries.map(o).filter(q)).length?{type:"GeometryCollection",geometries:i}:{type:null};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function a(e){return e.length&&s(e[0])?[e[0]].concat(e.slice(1).filter(l)):null}function s(e){return t(e,!1)}function l(e){return t(e,!0)}for(i in null==t&&(t=W),n)r[i]=o(n[i]);return V({type:"Topology",bbox:e.bbox,transform:e.transform,objects:r,arcs:e.arcs})};function W(){return!0}function H(e){return e}function q(e){return null!=e.type}var j=function(e){var t,i=new Array(e.arcs.length),n=0;function r(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(r);break;case"Polygon":o(e.arcs);break;case"MultiPolygon":e.arcs.forEach(o)}}function o(e){for(var t=0,r=e.length;t<r;++t,++n)for(var o=e[t],a=0,s=o.length;a<s;++a){var l=o[a];l<0&&(l=~l);var u=i[l];null==u?i[l]=n:u!==n&&(i[l]=-1)}}for(t in e.objects)r(e.objects[t]);return function(e){for(var t,n=0,r=e.length;n<r;++n)if(-1===i[(t=e[n])<0?~t:t])return!0;return!1}};function Y(e){var t=e[0],i=e[1],n=e[2];return Math.abs((t[0]-n[0])*(i[1]-t[1])-(t[0]-i[0])*(n[1]-t[1]))/2}function X(e){for(var t,i=-1,n=e.length,r=e[n-1],o=0;++i<n;)t=r,r=e[i],o+=t[0]*r[1]-t[1]*r[0];return Math.abs(o)/2}var K=function(e,t,i){return t=null==t?Number.MIN_VALUE:+t,null==i&&(i=X),function(n,r){return i(o(e,{type:"Polygon",arcs:[n]}).geometry.coordinates[0],r)>=t}},Q=function(e,t,i){var n=j(e),r=K(e,t,i);return function(e,t){return n(e,t)||r(e,t)}};function Z(e,t){return e[1][2]-t[1][2]}var J=function(){var e={},t=[],i=0;function n(e,i){for(;i>0;){var n=(i+1>>1)-1,r=t[n];if(Z(e,r)>=0)break;t[r._=i]=r,t[e._=i=n]=e}}function r(e,n){for(;;){var r=n+1<<1,o=r-1,a=n,s=t[a];if(o<i&&Z(t[o],s)<0&&(s=t[a=o]),r<i&&Z(t[r],s)<0&&(s=t[a=r]),a===n)break;t[s._=n]=s,t[e._=n=a]=e}}return e.push=function(e){return n(t[e._=i]=e,i++),i},e.pop=function(){if(!(i<=0)){var e,n=t[0];return--i>0&&(e=t[i],r(t[e._=0]=e,0)),n}},e.remove=function(e){var o,a=e._;if(t[a]===e)return a!==--i&&(Z(o=t[i],e)<0?n:r)(t[o._=a]=o,a),a},e};function ee(e){return[e[0],e[1],0]}var te=function(e,t){var n=e.transform?i(e.transform):ee,r=J();null==t&&(t=Y);var o=e.arcs.map((function(e){var i,o,s,l=[],u=0;for(o=1,s=(e=e.map(n)).length-1;o<s;++o)(i=[e[o-1],e[o],e[o+1]])[1][2]=t(i),l.push(i),r.push(i);for(e[0][2]=e[s][2]=1/0,o=0,s=l.length;o<s;++o)(i=l[o]).previous=l[o-1],i.next=l[o+1];for(;i=r.pop();){var c=i.previous,h=i.next;i[1][2]<u?i[1][2]=u:u=i[1][2],c&&(c.next=h,c[2]=i[2],a(c)),h&&(h.previous=c,h[0]=i[0],a(h))}return e}));function a(e){r.remove(e),e[1][2]=t(e),r.push(e)}return{type:"Topology",bbox:e.bbox,objects:e.objects,arcs:o}},ie=function(e,t){var i=[];return e.arcs.forEach((function(e){e.forEach((function(e){isFinite(e[2])&&i.push(e[2])}))})),i.length&&ne(i.sort(re),t)};function ne(e,t){if(i=e.length){if((t=+t)<=0||i<2)return e[0];if(t>=1)return e[i-1];var i,n=(i-1)*t,r=Math.floor(n),o=e[r];return o+(e[r+1]-o)*(n-r)}}function re(e,t){return t-e}var oe=function(e,t){t=null==t?Number.MIN_VALUE:+t;var i=e.arcs.map((function(e){for(var i,n=-1,r=0,o=e.length,a=new Array(o);++n<o;)(i=e[n])[2]>=t&&(a[r++]=[i[0],i[1]]);return a.length=r,a}));return{type:"Topology",transform:e.transform,bbox:e.bbox,objects:e.objects,arcs:i}},ae=Math.PI,se=2*ae,le=ae/4,ue=ae/180,ce=Math.abs,he=Math.atan2,de=Math.cos,fe=Math.sin;function pe(e,t){for(var i,n,r=0,o=e.length,a=0,s=e[t?r++:o-1],l=s[0]*ue,u=s[1]*ue/2+le,c=de(u),h=fe(u);r<o;++r){i=l,l=(s=e[r])[0]*ue,u=s[1]*ue/2+le,n=c,c=de(u);var d=l-i,f=d>=0?1:-1,p=f*d,_=h*(h=fe(u)),m=n*c+_*de(p),g=_*f*fe(p);a+=he(g,m)}return a}function _e(e,t){var i=pe(e,!0);return t&&(i*=-1),2*(i<0?se+i:i)}function me(e){return 2*ce(pe(e,!1))}e.bbox=n,e.feature=o,e.mesh=u,e.meshArcs=c,e.merge=f,e.mergeArcs=p,e.neighbors=m,e.quantize=x,e.transform=i,e.untransform=g,e.topology=U,e.filter=k,e.filterAttached=j,e.filterAttachedWeight=Q,e.filterWeight=K,e.planarRingArea=X,e.planarTriangleArea=Y,e.presimplify=te,e.quantile=ie,e.simplify=oe,e.sphericalRingArea=_e,e.sphericalTriangleArea=me,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof exports&&typeof module<"u"?exports:e.topojson=e.topojson||{})}(ce$d);var ke$4=ce$d.topojson;function P$n(e){return o$1p.fromDegrees(e[0],e[1],e[2])}var A$r={"urn:ogc:def:crs:OGC:1.3:CRS84":P$n,"EPSG:4326":P$n,"urn:ogc:def:crs:EPSG::4326":P$n},J$h={},Q$l={},M$q=48,R$l,G$p=e$1U.ROYALBLUE,L$p=e$1U.YELLOW,O$j=2,U$n=e$1U.fromBytes(255,255,0,100),D$n=!1,Le$a={small:24,medium:48,large:64},Oe$9=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function Z$k(e,t){var i="";for(var n in e)if(e.hasOwnProperty(n)){if(n===t||-1!==Oe$9.indexOf(n))continue;var r=e[n];e$2b(r)&&(i+="object"==typeof r?"<tr><th>"+n+"</th><td>"+Z$k(r)+"</td></tr>":"<tr><th>"+n+"</th><td>"+r+"</td></tr>")}return i.length>0&&(i='<table class="supermap3d-infoBox-defaultTable"><tbody>'+i+"</tbody></table>"),i}function Ue$6(e,t,i){var n;return function(r,o){return e$2b(n)||(n=e(t,i)),n}}function $$j(e,t){return new n$V(Ue$6(Z$k,e,t),!0)}function B$k(e,t,i){var n=e.id;if(e$2b(n)&&"Feature"===e.type){for(var r=2,o=n;e$2b(t.getById(o));)o=n+"_"+r,r++;n=o}else n=e$1Q();var a=t.getOrCreateEntity(n),s=e.properties;if(e$2b(s)){a.properties=s;var l,u=s.title;if(e$2b(u))a.name=u,l="title";else{var c=Number.MAX_VALUE;for(var h in s)if(s.hasOwnProperty(h)&&s[h]){var d=h.toLowerCase();if(c>1&&"title"===d){c=1,l=h;break}c>2&&"name"===d?(c=2,l=h):c>3&&/title/i.test(h)?(c=3,l=h):c>4&&/name/i.test(h)&&(c=4,l=h)}e$2b(l)&&(a.name=s[l])}var f=s.description;null!==f&&(a.description=e$2b(f)?new e$1I(f):i(s,l))}return a}function F$k(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++)i[n]=t(e[n]);return i}var K$i={Feature:re$d,FeatureCollection:Be$9,GeometryCollection:ie$8,LineString:le$e,MultiLineString:ae$a,MultiPoint:oe$9,MultiPolygon:me$b,Point:ne$e,Polygon:ce$c,Topology:ue$a},ee$c={GeometryCollection:ie$8,LineString:le$e,MultiLineString:ae$a,MultiPoint:oe$9,MultiPolygon:me$b,Point:ne$e,Polygon:ce$c,Topology:ue$a};function re$d(e,t,i,n,r){if(null!==t.geometry){if(!e$2b(t.geometry))throw new t$14("feature.geometry is required.");var o=t.geometry.type,a=ee$c[o];if(!e$2b(a))throw new t$14("Unknown geometry type: "+o);a(e,t,t.geometry,n,r)}else B$k(t,e._entityCollection,r.describe)}function Be$9(e,t,i,n,r){for(var o=t.features,a=0,s=o.length;a<s;a++)re$d(e,o[a],void 0,n,r)}function ie$8(e,t,i,n,r){for(var o=i.geometries,a=0,s=o.length;a<s;a++){var l=o[a],u=l.type,c=ee$c[u];if(!e$2b(c))throw new t$14("Unknown geometry type: "+u);c(e,t,l,n,r)}}function te$9(e,t,i,n,r){var o,a=r.markerSymbol,s=r.markerColor,l=r.markerSize,u=t.properties;if(e$2b(u)){var c=u["marker-color"];e$2b(c)&&(s=e$1U.fromCssColorString(c)),l=u$_(Le$a[u["marker-size"]],l);var h=u["marker-symbol"];e$2b(h)&&(a=h)}o=e$2b(a)?1===a.length?e._pinBuilder.fromText(a.toUpperCase(),s,l):e._pinBuilder.fromMakiIconId(a,s,l):e._pinBuilder.fromColor(s,l);var d=new n$T;d.verticalOrigin=new e$1I(S$O.BOTTOM),2===n.length&&r.clampToGround&&(d.heightReference=k$P.CLAMP_TO_GROUND);var f=B$k(t,e._entityCollection,r.describe);f.billboard=d,f.position=new r$U(i(n));var p=o$1l(o).then((function(e){d.image=new e$1I(e)})).otherwise((function(){d.image=new e$1I(e._pinBuilder.fromColor(s,l))}));e._promises.push(p)}function ne$e(e,t,i,n,r){te$9(e,t,n,i.coordinates,r)}function oe$9(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)te$9(e,t,n,o[a],r)}function se$8(e,t,i,n,r){var o=r.strokeMaterialProperty,a=r.strokeWidthProperty,s=t.properties;if(e$2b(s)){var l=s["stroke-width"];e$2b(l)&&(a=new e$1I(l));var u,c=s.stroke;e$2b(c)&&(u=e$1U.fromCssColorString(c));var h=s["stroke-opacity"];e$2b(h)&&1!==h&&(e$2b(u)||(u=o.color.clone()),u.alpha=h),e$2b(u)&&(o=new t$Q(u))}var d=B$k(t,e._entityCollection,r.describe),f=new a$L;d.polyline=f,f.clampToGround=r.clampToGround,f.material=o,f.width=a,f.positions=new e$1I(F$k(n,i)),f.arcType=m$1f.RHUMB}function le$e(e,t,i,n,r){se$8(e,t,n,i.coordinates,r)}function ae$a(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)se$8(e,t,n,o[a],r)}function fe$7(e,t,i,n,r){if(0!==n.length&&0!==n[0].length){var o=r.strokeMaterialProperty.color,a=r.fillMaterialProperty,s=r.strokeWidthProperty,l=t.properties;if(e$2b(l)){var u=l["stroke-width"];e$2b(u)&&(s=new e$1I(u));var c,h=l.stroke;e$2b(h)&&(c=e$1U.fromCssColorString(h));var d=l["stroke-opacity"];e$2b(d)&&1!==d&&(e$2b(c)||(c=r.strokeMaterialProperty.color.clone()),c.alpha=d),e$2b(c)&&(o=new e$1I(c));var f,p=l.fill;e$2b(p)&&((f=e$1U.fromCssColorString(p)).alpha=a.color.alpha),e$2b(d=l["fill-opacity"])&&d!==a.color.alpha&&(e$2b(f)||(f=a.color.clone()),f.alpha=d),e$2b(f)&&(a=new t$Q(f))}var _=new l$Z;_.outline=new e$1I(!0),_.outlineColor=o,_.outlineWidth=s,_.material=a,_.arcType=m$1f.GEODESIC,_._fromDataSource=!0;for(var m=[],g=1,x=n.length;g<x;g++)m.push(new e$1J(F$k(n[g],i)));var v=n[0];_.hierarchy=new e$1I(new e$1J(F$k(v,i),m)),v[0].length>2?_.perPositionHeight=new e$1I(!0):r.clampToGround||(_.height=0);var y=B$k(t,e._entityCollection,r.describe);r.clampToGround&&(_.classificationType=_0x3b5200.TERRAIN),r.clampToS3M&&(_.classificationType=_0x3b5200.S3M_TILE),y.polygon=_}}function ce$c(e,t,i,n,r){fe$7(e,t,n,i.coordinates,r)}function me$b(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)fe$7(e,t,n,o[a],r)}function ue$a(e,t,i,n,r){for(var o in i.objects)if(i.objects.hasOwnProperty(o)){var a=ke$4.feature(i,i.objects[o]);(0,K$i[a.type])(e,a,a,n,r)}}function y$p(e){this._name=e,this._changed=new o$1h,this._error=new o$1h,this._isLoading=!1,this._loading=new o$1h,this._entityCollection=new r$v(this),this._promises=[],this._pinBuilder=new s$A,this._entityCluster=new a$r,this._credit=void 0,this._resourceCredits=[],this._visibleViewport=4095,this._swipeRegion=new e$29(0,0,1,1),this._swipeEnabled=!1}function pe$9(e,t,i,n){var r;e$2b(n)&&(r=f$O(n)),e$2b(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));var o=K$i[t.type];if(!e$2b(o))throw new t$14("Unsupported GeoJSON object type: "+t.type);var a=t.crs,s=null!==a?P$n:null;if(e$2b(a)){if(!e$2b(a.properties))throw new t$14("crs.properties is undefined.");var l=a.properties;if("name"===a.type){if(!e$2b(s=A$r[l.name]))throw new t$14("Unknown crs name: "+l.name)}else if("link"===a.type){var u=J$h[l.href];if(e$2b(u)||(u=Q$l[l.type]),!e$2b(u))throw new t$14("Unable to resolve crs link: "+JSON.stringify(l));s=u(l)}else{if("EPSG"!==a.type)throw new t$14("Unknown crs type: "+a.type);if(!e$2b(s=A$r["EPSG:"+l.code]))throw new t$14("Unknown crs EPSG code: "+l.code)}}return o$1l(s,(function(n){return e._entityCollection.removeAll(),null!==n&&o(e,t,t,n,i),o$1l.all(e._promises,(function(){return e._promises.length=0,o$A.setLoading(e,!1),e}))}))}function o$v(e,t){this.position=e,this.headingPitchRoll=t}y$p.load=function(e,t){return(new y$p).load(e,t)},Object.defineProperties(y$p,{markerSize:{get:function(){return M$q},set:function(e){M$q=e}},markerSymbol:{get:function(){return R$l},set:function(e){R$l=e}},markerColor:{get:function(){return G$p},set:function(e){G$p=e}},stroke:{get:function(){return L$p},set:function(e){L$p=e}},strokeWidth:{get:function(){return O$j},set:function(e){O$j=e}},fill:{get:function(){return U$n},set:function(e){U$n=e}},clampToGround:{get:function(){return D$n},set:function(e){D$n=e}},crsNames:{get:function(){return A$r}},crsLinkHrefs:{get:function(){return J$h}},crsLinkTypes:{get:function(){return Q$l}}}),Object.defineProperties(y$p.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2b(e))throw new t$16("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}},swipeRegion:{get:function(){return new f$18(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2b(e)){if(!(e instanceof f$18))throw new t$16("swipeRegion must be a instance of BoundingRectangle.");if(e$29.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion),e$2b(this._entityCluster._billboardCollection)&&(this._entityCluster._billboardCollection._swipeRegion=e$29.clone(this._swipeRegion,new e$29)),e$2b(this._primitives))for(var t=0;t<this._primitives._primitives.length;t++)this._primitives._primitives[t]instanceof y$S&&(this._primitives._primitives[t]._swipeRegion=e$29.clone(this._swipeRegion,new e$29));if(e$2b(this._groundPrimitives)){var i=this._groundPrimitives._collectionsArray;for(t=0;t<i.length;t++)if(i[t]instanceof o$x)for(var n=0;n<i[t]._primitives.length;n++)i[t]._primitives[n]._primitive._primitive._swipeRegion=e$29.clone(this._swipeRegion,new e$29)}}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){if(e!==this._swipeEnabled){if(e||e$29.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e,e$2b(this._entityCluster._billboardCollection)&&(this._entityCluster._billboardCollection._swipeEnabled=e),e$2b(this._primitives))for(var t=0;t<this._primitives._primitives.length;t++)this._primitives._primitives[t]instanceof y$S&&(this._primitives._primitives[t].swipeEnabled=e);if(e$2b(this._groundPrimitives)){var i=this._groundPrimitives._collectionsArray;for(t=0;t<i.length;t++)if(i[t]instanceof o$x)for(var n=0;n<i[t]._primitives.length;n++)i[t]._primitives[n]._primitive._primitive.swipeEnabled=e}}}}}),y$p.prototype.load=function(e,t){if(!e$2b(e))throw new t$16("data is required.");o$A.setLoading(this,!0);var i=(t=u$_(t,u$_.EMPTY_OBJECT)).credit;"string"==typeof i&&(i=new r$T(i)),this._credit=i;var n=e,r=t.sourceUri;if("string"==typeof e||e instanceof t$11){n=(e=t$11.createIfNeeded(e)).fetchJson(),r=u$_(r,e.getUrlComponent());var o=this._resourceCredits,a=e.credits;if(e$2b(a))for(var s=a.length,l=0;l<s;l++)o.push(a[l])}t={describe:u$_(t.describe,$$j),markerSize:u$_(t.markerSize,M$q),markerSymbol:u$_(t.markerSymbol,R$l),markerColor:u$_(t.markerColor,G$p),strokeWidthProperty:new e$1I(u$_(t.strokeWidth,O$j)),strokeMaterialProperty:new t$Q(u$_(t.stroke,L$p)),fillMaterialProperty:new t$Q(u$_(t.fill,U$n)),clampToGround:u$_(t.clampToGround,D$n),clampToS3M:u$_(t.clampToS3M,!1)};var u=this;return o$1l(n,(function(e){return pe$9(u,e,t,r)})).otherwise((function(e){return o$A.setLoading(u,!1),u._error.raiseEvent(u,e),console.log(e),o$1l.reject(e)}))},y$p.prototype.loadPoiJsonData=function(e,t){if(!e$2b(e))throw new t$16("data is required.");o$A.setLoading(this,!0);var i=(t=u$_(t,u$_.EMPTY_OBJECT)).sourceUri;return pe$9(this,e,t={describe:u$_(t.describe,$$j),markerSize:u$_(t.markerSize,M$q),markerSymbol:u$_(t.markerSymbol,R$l),markerColor:u$_(t.markerColor,G$p),strokeWidthProperty:new e$1I(u$_(t.strokeWidth,O$j)),strokeMaterialProperty:new t$Q(u$_(t.stroke,L$p)),fillMaterialProperty:new t$Q(u$_(t.fill,U$n))},i)},y$p.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},y$p.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport};var be$c={};be$c.Autolinker=function(){function e(e,t){for(var i in t)t.hasOwnProperty(i)&&void 0===e[i]&&(e[i]=t[i]);return e}function t(e,t,i){var n;return e.length>t&&(null==i?(i="…",n=3):n=i.length,e=e.substring(0,t-n)+i),e}function i(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}function n(e,t){for(var i=e.length-1;i>=0;i--)!0===t(e[i])&&e.splice(i,1)}function r(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var i,n=[],r=0;i=t.exec(e);)n.push(e.substring(r,i.index)),n.push(i[0]),r=i.index+i[0].length;return n.push(e.substring(r)),n}function o(e){throw new Error("Unhandled case for value: '"+e+"'")}var a=function(){function e(e){void 0===e&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return e.prototype.setTagName=function(e){return this.tagName=e,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(e,t){return this.getAttrs()[e]=t,this},e.prototype.getAttr=function(e){return this.getAttrs()[e]},e.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(e){return this.setAttr("class",e)},e.prototype.addClass=function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,o=n?n.split(r):[],a=e.split(r);t=a.shift();)-1===i(o,t)&&o.push(t);return this.getAttrs().class=o.join(" "),this},e.prototype.removeClass=function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,o=n?n.split(r):[],a=e.split(r);o.length&&(t=a.shift());){var s=i(o,t);-1!==s&&o.splice(s,1)}return this.getAttrs().class=o.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},e.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},e.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i+'="'+e[i]+'"');return t.join(" ")},e}();function s(e,t,i){var n,r;null==i?(i="…",r=3,n=8):(r=i.length,n=i.length);var o=function(e){var t={},i=e,n=i.match(/^([a-z]+):\/\//i);return n&&(t.scheme=n[1],i=i.substr(n[0].length)),(n=i.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(t.host=n[1],i=i.substr(n[0].length)),(n=i.match(/^\/(.*?)(?=(\?|#|$))/i))&&(t.path=n[1],i=i.substr(n[0].length)),(n=i.match(/^\?(.*?)(?=(#|$))/i))&&(t.query=n[1],i=i.substr(n[0].length)),(n=i.match(/^#(.*?)$/i))&&(t.fragment=n[1]),t},a=function(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t},s=function(e,t){var n=t/2,r=Math.ceil(n),o=-1*Math.floor(n),a="";return o<0&&(a=e.substr(o)),e.substr(0,r)+i+a};if(e.length<=t)return e;var l=t-r,u=o(e);if(u.query){var c=u.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);c&&(u.query=u.query.substr(0,c[1].length),e=a(u))}if(e.length<=t||(u.host&&(u.host=u.host.replace(/^www\./,""),e=a(u)),e.length<=t))return e;var h="";if(u.host&&(h+=u.host),h.length>=l)return u.host.length==t?(u.host.substr(0,t-r)+i).substr(0,l+n):s(h,l).substr(0,l+n);var d="";if(u.path&&(d+="/"+u.path),u.query&&(d+="?"+u.query),d){if((h+d).length>=l)return(h+d).length==t?(h+d).substr(0,t):(h+s(d,l-h.length)).substr(0,l+n);h+=d}if(u.fragment){var f="#"+u.fragment;if((h+f).length>=l)return(h+f).length==t?(h+f).substr(0,t):(h+s(f,l-h.length)).substr(0,l+n);h+=f}if(u.scheme&&u.host){var p=u.scheme+"://";if((h+p).length<l)return(p+h).substr(0,t)}if(h.length<=t)return h;var _="";return l>0&&(_=h.substr(-1*Math.floor(l/2))),(h.substr(0,Math.ceil(l/2))+i+_).substr(0,l+n)}function l(e,t,i){if(e.length<=t)return e;var n,r;null==i?(i="…",n=8,r=3):(n=i.length,r=i.length);var o=t-r,a="";return o>0&&(a=e.substr(-1*Math.floor(o/2))),(e.substr(0,Math.ceil(o/2))+i+a).substr(0,o+n)}function u(e,i,n){return t(e,i,n)}var c=function(){function e(e){void 0===e&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return e.prototype.build=function(e){return new a({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},e.prototype.createAttrs=function(e){var t={href:e.getAnchorHref()},i=this.createCssClass(e);return i&&(t.class=i),this.newWindow&&(t.target="_blank",t.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(t.title=e.getAnchorHref()),t},e.prototype.createCssClass=function(e){var t=this.className;if(t){for(var i=[t],n=e.getCssClassSuffixes(),r=0,o=n.length;r<o;r++)i.push(t+"-"+n[r]);return i.join(" ")}return""},e.prototype.processAnchorText=function(e){return e=this.doTruncate(e)},e.prototype.doTruncate=function(e){var t=this.truncate;if(!t||!t.length)return e;var i=t.length,n=t.location;return"smart"===n?s(e,i):"middle"===n?l(e,i):u(e,i)},e}(),h=function(){function e(e){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(e){this.offset=e},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.getType()]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}(),d=function(e,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},d(e,t)};function f(e,t){function i(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var p=function(){return p=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},p.apply(this,arguments)},_=function(e){function t(t){var i=e.call(this,t)||this;return i.email="",i.email=t.email,i}return f(t,e),t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(h),m=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="",i.hashtag="",i.serviceName=t.serviceName,i.hashtag=t.hashtag,i}return f(t,e),t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var e=this.serviceName,t=this.hashtag;switch(e){case"twitter":case"facebook":case"instagram":return""+t;default:throw new Error("Unknown service name to point hashtag to: "+e)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t}(h),g=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.mention="",i.mention=t.mention,i.serviceName=t.serviceName,i}return f(t,e),t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":case"instagram":case"soundcloud":return""+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var t=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&t.push(i),t},t}(h),x=function(e){function t(t){var i=e.call(this,t)||this;return i.number="",i.plusSign=!1,i.number=t.number,i.plusSign=t.plusSign,i}return f(t,e),t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(h),v=function(e){function t(t){var i=e.call(this,t)||this;return i.url="",i.urlMatchType="scheme",i.protocolUrlMatch=!1,i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.schemePrefixRegex=/^(https?:\/\/)?/i,i.wwwPrefixRegex=/^(https?:\/\/)?(www\.)?/i,i.protocolRelativeRegex=/^\/\//,i.protocolPrepended=!1,i.urlMatchType=t.urlMatchType,i.url=t.url,i.protocolUrlMatch=t.protocolUrlMatch,i.protocolRelativeMatch=t.protocolRelativeMatch,i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return f(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var e=this.url;return!this.protocolRelativeMatch&&!this.protocolUrlMatch&&!this.protocolPrepended&&(e=this.url="http://"+e,this.protocolPrepended=!0),e},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},t.prototype.getAnchorText=function(){var e=this.getMatchedText();return this.protocolRelativeMatch&&(e=this.stripProtocolRelativePrefix(e)),this.stripPrefix.scheme&&(e=this.stripSchemePrefix(e)),this.stripPrefix.www&&(e=this.stripWwwPrefix(e)),this.stripTrailingSlash&&(e=this.removeTrailingSlash(e)),this.decodePercentEncoding&&(e=this.removePercentEncoding(e)),e},t.prototype.stripSchemePrefix=function(e){return e.replace(this.schemePrefixRegex,"")},t.prototype.stripWwwPrefix=function(e){return e.replace(this.wwwPrefixRegex,"$1")},t.prototype.stripProtocolRelativePrefix=function(e){return e.replace(this.protocolRelativeRegex,"")},t.prototype.removeTrailingSlash=function(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e},t.prototype.removePercentEncoding=function(e){var t=e.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(t)}catch{return t}},t}(h),y=function(){function e(e){this.__jsduckDummyDocProp=null,this.tagBuilder=e.tagBuilder}return e}(),$=/[A-Za-z]/,b=/[0-9]/,T=/\s/,C=/['"]/,S=/[\x00-\x1F\x7F]/,w=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,E=w+/\u00a9\u00ae\u2000-\u3300\ud83c\ud000-\udfff\ud83d\ud000-\udfff\ud83e\ud000-\udfff/.source+/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,P=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,A=E+P,L=E+P,M="(?:["+P+"]{1,3}\\.){3}["+P+"]{1,3}",R="["+L+"](?:["+L+"\\-]{0,61}["+L+"])?",I=function(e){return"(?=("+R+"))\\"+e},O=function(e){return"(?:"+I(e)+"(?:\\."+I(e+1)+"){0,126}|"+M+")"},D=new RegExp("["+L+"]"),B=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|warman|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|グーグル|クラウド|ポイント|大众汽车|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ストア|セール|みんな|中文网|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.localPartCharRegex=new RegExp("["+L+"!#$%&'*+/=?^_`{|}~-]"),t.strictTldRegex=new RegExp("^"+B.source+"$"),t}return f(t,e),t.prototype.parseMatches=function(e){for(var t=this.tagBuilder,i=this.localPartCharRegex,n=this.strictTldRegex,r=[],a=e.length,s=new F,l={m:"a",a:"i",i:"l",l:"t",t:"o",o:":"},u=0,c=0,h=s;u<a;){var d=e.charAt(u);switch(c){case 0:f(d);break;case 1:m(e.charAt(u-1),d);break;case 2:g(d);break;case 3:x(d);break;case 4:v(d);break;case 5:y(d);break;case 6:$(d);break;case 7:b(d);break;default:o(c)}u++}return S(),r;function f(e){"m"===e?T(1):i.test(e)&&T()}function m(e,t){":"===e?i.test(t)?(c=2,h=new F(p({},h,{hasMailtoPrefix:!0}))):C():l[e]===t||(i.test(t)?c=2:"."===t?c=3:"@"===t?c=4:C())}function g(e){"."===e?c=3:"@"===e?c=4:i.test(e)||C()}function x(e){"."===e||"@"===e?C():i.test(e)?c=2:C()}function v(e){D.test(e)?c=5:C()}function y(e){"."===e?c=7:"-"===e?c=6:D.test(e)||S()}function $(e){"-"===e||"."===e?S():D.test(e)?c=5:S()}function b(e){"."===e||"-"===e?S():D.test(e)?(c=5,h=new F(p({},h,{hasDomainDot:!0}))):S()}function T(e){void 0===e&&(e=2),c=e,h=new F({idx:u})}function C(){c=0,h=s}function S(){if(h.hasDomainDot){var i=e.slice(h.idx,u);/[-.]$/.test(i)&&(i=i.slice(0,-1));var o=h.hasMailtoPrefix?i.slice(7):i;a(o)&&r.push(new _({tagBuilder:t,matchedText:i,offset:h.idx,email:o}))}function a(e){var t=(e.split(".").pop()||"").toLowerCase();return n.test(t)}C()}},t}(y),F=function(){function e(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.hasMailtoPrefix=!!e.hasMailtoPrefix,this.hasDomainDot=!!e.hasDomainDot}return e}(),U=function(){function e(){}return e.isValid=function(e,t){return!(t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(e,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,t)&&!this.isValidIpAddress(e)||this.containsMultipleDots(e))},e.isValidIpAddress=function(e){var t=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==e.match(t)},e.containsMultipleDots=function(e){var t=e;return this.hasFullProtocolRegex.test(e)&&(t=e.split("://")[1]),t.split("/")[0].indexOf("..")>-1},e.isValidUriScheme=function(e){var t=e.match(this.uriSchemeRegex),i=t&&t[0].toLowerCase();return"javascript:"!==i&&"vbscript:"!==i},e.urlMatchDoesNotHaveProtocolOrDot=function(e,t){return!(!e||t&&this.hasFullProtocolRegex.test(t)||-1!==e.indexOf("."))},e.urlMatchDoesNotHaveAtLeastOneWordChar=function(e,t){return!(!e||!t||this.hasWordCharAfterProtocolRegex.test(e))},e.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,e.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,e.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+w+"]"),e.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,e}(),z=function(e){function t(t){var i=e.call(this,t)||this;return i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.matcherRegex=function(){var e=/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/,t=/(?:www\.)/,i=new RegExp("[/?#](?:["+L+"\\-+&@#/%=~_()|'$*\\[\\]?!:,.;✓]*["+L+"\\-+&@#/%=~_()|'$*\\[\\]✓])?");return new RegExp(["(?:","(",e.source,O(2),")","|","(","(//)?",t.source,O(6),")","|","(","(//)?",O(10)+"\\.",B.source,"(?![-"+A+"])",")",")","(?::[0-9]+)?","(?:"+i.source+")?"].join(""),"gi")}(),i.wordCharRegExp=new RegExp("["+L+"]"),i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.stripPrefix,r=this.stripTrailingSlash,o=this.decodePercentEncoding,a=this.tagBuilder,s=[],l=function(){var i=t[0],l=t[1],c=t[4],h=t[5],d=t[9],f=t.index,p=h||d,_=e.charAt(f-1);if(!U.isValid(i,l)||f>0&&"@"===_||f>0&&p&&u.wordCharRegExp.test(_))return"continue";if(/\?$/.test(i)&&(i=i.substr(0,i.length-1)),u.matchHasUnbalancedClosingParen(i))i=i.substr(0,i.length-1);else{var m=u.matchHasInvalidCharAfterTld(i,l);m>-1&&(i=i.substr(0,m))}var g=["http://","https://"].find((function(e){return!!l&&-1!==l.indexOf(e)}));if(g){var x=i.indexOf(g);i=i.substr(x),l=l.substr(x),f+=x}var y=l?"scheme":c?"www":"tld",$=!!l;s.push(new v({tagBuilder:a,matchedText:i,offset:f,urlMatchType:y,url:i,protocolUrlMatch:$,protocolRelativeMatch:!!p,stripPrefix:n,stripTrailingSlash:r,decodePercentEncoding:o}))},u=this;null!==(t=i.exec(e));)l();return s},t.prototype.matchHasUnbalancedClosingParen=function(e){var t,i=e.charAt(e.length-1);if(")"===i)t="(";else{if("]"!==i)return!1;t="["}for(var n=0,r=0,o=e.length-1;r<o;r++){var a=e.charAt(r);a===t?n++:a===i&&(n=Math.max(n-1,0))}return 0===n},t.prototype.matchHasInvalidCharAfterTld=function(e,t){if(!e)return-1;var i=0;t&&(i=e.indexOf(":"),e=e.slice(i));var n=new RegExp("^((.?//)?[-."+L+"]*[-"+L+"]\\.[-"+L+"]+)").exec(e);return null===n?-1:(i+=n[1].length,e=e.slice(n[1].length),/^[^-.A-Za-z0-9:\/?#]/.test(e)?i:-1)},t}(y),G=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegex=new RegExp("#[_"+L+"]{1,139}(?![_"+L+"])","g"),i.nonWordCharRegex=new RegExp("[^"+L+"]"),i.serviceName=t.serviceName,i}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.nonWordCharRegex,r=this.serviceName,o=this.tagBuilder,a=[];null!==(t=i.exec(e));){var s=t.index,l=e.charAt(s-1);if(0===s||n.test(l)){var u=t[0],c=t[0].slice(1);a.push(new m({tagBuilder:o,matchedText:u,offset:s,serviceName:r,hashtag:c}))}}return a},t}(y),V=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.matcherRegex=/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/g,t}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.tagBuilder,r=[];null!==(t=i.exec(e));){var o=t[0],a=o.replace(/[^0-9,;#]/g,""),s=!(!t[1]&&!t[2]),l=0==t.index?"":e.substr(t.index-1,1),u=e.substr(t.index+o.length,1),c=!l.match(/\d/)&&!u.match(/\d/);this.testMatch(t[3])&&this.testMatch(o)&&c&&r.push(new x({tagBuilder:n,matchedText:o,offset:t.index,number:a,plusSign:s}))}return r},t.prototype.testMatch=function(e){return/\D/.test(e)},t}(y),k=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegexes={twitter:new RegExp("@[_"+L+"]{1,50}(?![_"+L+"])","g"),instagram:new RegExp("@[_."+L+"]{1,30}(?![_"+L+"])","g"),soundcloud:new RegExp("@[-_."+L+"]{1,50}(?![-_"+L+"])","g")},i.nonWordCharRegex=new RegExp("[^"+L+"]"),i.serviceName=t.serviceName,i}return f(t,e),t.prototype.parseMatches=function(e){var t,i=this.serviceName,n=this.matcherRegexes[this.serviceName],r=this.nonWordCharRegex,o=this.tagBuilder,a=[];if(!n)return a;for(;null!==(t=n.exec(e));){var s=t.index,l=e.charAt(s-1);if(0===s||r.test(l)){var u=t[0].replace(/\.+$/g,""),c=u.slice(1);a.push(new g({tagBuilder:o,matchedText:u,offset:s,serviceName:i,mention:c}))}}return a},t}(y);function W(e,t){for(var i=t.onOpenTag,n=t.onCloseTag,r=t.onText,a=t.onComment,s=t.onDoctype,l=new H,u=0,c=e.length,h=0,d=0,f=l;u<c;){var _=e.charAt(u);switch(h){case 0:m(_);break;case 1:g(_);break;case 2:v(_);break;case 3:x(_);break;case 4:y(_);break;case 5:w(_);break;case 6:E(_);break;case 7:P(_);break;case 8:A(_);break;case 9:L(_);break;case 10:M(_);break;case 11:R(_);break;case 12:I(_);break;case 13:O();break;case 14:D(_);break;case 15:B(_);break;case 16:N(_);break;case 17:F(_);break;case 18:U(_);break;case 19:z(_);break;case 20:G(_);break;default:o(h)}u++}function m(e){"<"===e&&k()}function g(e){"!"===e?h=13:"/"===e?(h=2,f=new H(p({},f,{isClosing:!0}))):"<"===e?k():$.test(e)?(h=3,f=new H(p({},f,{isOpening:!0}))):(h=0,f=l)}function x(e){T.test(e)?(f=new H(p({},f,{name:j()})),h=4):"<"===e?k():"/"===e?(f=new H(p({},f,{name:j()})),h=12):">"===e?(f=new H(p({},f,{name:j()})),W()):!$.test(e)&&!b.test(e)&&":"!==e&&V()}function v(e){">"===e?V():$.test(e)?h=3:V()}function y(e){T.test(e)||("/"===e?h=12:">"===e?W():"<"===e?k():"="===e||C.test(e)||S.test(e)?V():h=5)}function w(e){T.test(e)?h=6:"/"===e?h=12:"="===e?h=7:">"===e?W():"<"===e?k():C.test(e)&&V()}function E(e){T.test(e)||("/"===e?h=12:"="===e?h=7:">"===e?W():"<"===e?k():C.test(e)?V():h=5)}function P(e){T.test(e)||('"'===e?h=8:"'"===e?h=9:/[>=`]/.test(e)?V():"<"===e?k():h=10)}function A(e){'"'===e&&(h=11)}function L(e){"'"===e&&(h=11)}function M(e){T.test(e)?h=4:">"===e?W():"<"===e&&k()}function R(e){T.test(e)?h=4:"/"===e?h=12:">"===e?W():"<"===e?k():(h=4,Y())}function I(e){">"===e?(f=new H(p({},f,{isClosing:!0})),W()):h=4}function O(t){"--"===e.substr(u,2)?(u+=2,f=new H(p({},f,{type:"comment"})),h=14):"DOCTYPE"===e.substr(u,7).toUpperCase()?(u+=7,f=new H(p({},f,{type:"doctype"})),h=20):V()}function D(e){"-"===e?h=15:">"===e?V():h=16}function B(e){"-"===e?h=18:">"===e?V():h=16}function N(e){"-"===e&&(h=17)}function F(e){h="-"===e?18:16}function U(e){">"===e?W():"!"===e?h=19:"-"===e||(h=16)}function z(e){"-"===e?h=17:">"===e?W():h=16}function G(e){">"===e?W():"<"===e&&k()}function V(){h=0,f=l}function k(){h=1,f=new H({idx:u})}function W(){var t=e.slice(d,f.idx);t&&r(t,d),"comment"===f.type?a(f.idx):"doctype"===f.type?s(f.idx):(f.isOpening&&i(f.name,f.idx),f.isClosing&&n(f.name,f.idx)),V(),d=u+1}function q(){var t=e.slice(d,u);r(t,d),d=u+1}function j(){var t=f.idx+(f.isClosing?2:1);return e.slice(t,u).toLowerCase()}function Y(){u--}d<u&&q()}var H=function(){function e(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.type=e.type||"tag",this.name=e.name||"",this.isOpening=!!e.isOpening,this.isClosing=!!e.isClosing}return e}(),q=function(){function t(e){void 0===e&&(e={}),this.version=t.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(e.urls),this.email="boolean"==typeof e.email?e.email:this.email,this.phone="boolean"==typeof e.phone?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow="boolean"==typeof e.newWindow?e.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(e.stripPrefix),this.stripTrailingSlash="boolean"==typeof e.stripTrailingSlash?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding="boolean"==typeof e.decodePercentEncoding?e.decodePercentEncoding:this.decodePercentEncoding;var i=this.mention;if(!1!==i&&"twitter"!==i&&"instagram"!==i&&"soundcloud"!==i)throw new Error("invalid `mention` cfg - see docs");var n=this.hashtag;if(!1!==n&&"twitter"!==n&&"facebook"!==n&&"instagram"!==n)throw new Error("invalid `hashtag` cfg - see docs");this.truncate=this.normalizeTruncateCfg(e.truncate),this.className=e.className||this.className,this.replaceFn=e.replaceFn||this.replaceFn,this.context=e.context||this}return t.link=function(e,i){return new t(i).link(e)},t.parse=function(e,i){return new t(i).parse(e)},t.prototype.normalizeUrlsCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{schemeMatches:e,wwwMatches:e,tldMatches:e}:{schemeMatches:"boolean"!=typeof e.schemeMatches||e.schemeMatches,wwwMatches:"boolean"!=typeof e.wwwMatches||e.wwwMatches,tldMatches:"boolean"!=typeof e.tldMatches||e.tldMatches}},t.prototype.normalizeStripPrefixCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{scheme:e,www:e}:{scheme:"boolean"!=typeof e.scheme||e.scheme,www:"boolean"!=typeof e.www||e.www}},t.prototype.normalizeTruncateCfg=function(t){return"number"==typeof t?{length:t,location:"end"}:e(t||{},{length:Number.POSITIVE_INFINITY,location:"end"})},t.prototype.parse=function(e){var t=this,i=["a","style","script"],n=0,o=[];return W(e,{onOpenTag:function(e){i.indexOf(e)>=0&&n++},onText:function(e,i){if(0===n){var a=r(e,/( | |<|<|>|>|"|"|')/gi),s=i;a.forEach((function(e,i){if(i%2==0){var n=t.parseText(e,s);o.push.apply(o,n)}s+=e.length}))}},onCloseTag:function(e){i.indexOf(e)>=0&&(n=Math.max(n-1,0))},onComment:function(e){},onDoctype:function(e){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},t.prototype.compactMatches=function(e){e.sort((function(e,t){return e.getOffset()-t.getOffset()}));for(var t=0;t<e.length-1;t++){var i=e[t],n=i.getOffset(),r=i.getMatchedText().length,o=n+r;if(t+1<e.length){if(e[t+1].getOffset()===n){var a=e[t+1].getMatchedText().length>r?t:t+1;e.splice(a,1);continue}e[t+1].getOffset()<o&&e.splice(t+1,1)}}return e},t.prototype.removeUnwantedMatches=function(e){return this.hashtag||n(e,(function(e){return"hashtag"===e.getType()})),this.email||n(e,(function(e){return"email"===e.getType()})),this.phone||n(e,(function(e){return"phone"===e.getType()})),this.mention||n(e,(function(e){return"mention"===e.getType()})),this.urls.schemeMatches||n(e,(function(e){return"url"===e.getType()&&"scheme"===e.getUrlMatchType()})),this.urls.wwwMatches||n(e,(function(e){return"url"===e.getType()&&"www"===e.getUrlMatchType()})),this.urls.tldMatches||n(e,(function(e){return"url"===e.getType()&&"tld"===e.getUrlMatchType()})),e},t.prototype.parseText=function(e,t){void 0===t&&(t=0),t=t||0;for(var i=this.getMatchers(),n=[],r=0,o=i.length;r<o;r++){for(var a=i[r].parseMatches(e),s=0,l=a.length;s<l;s++)a[s].setOffset(t+a[s].getOffset());n.push.apply(n,a)}return n},t.prototype.link=function(e){if(!e)return"";for(var t=this.parse(e),i=[],n=0,r=0,o=t.length;r<o;r++){var a=t[r];i.push(e.substring(n,a.getOffset())),i.push(this.createMatchReturnVal(a)),n=a.getOffset()+a.getMatchedText().length}return i.push(e.substring(n)),i.join("")},t.prototype.createMatchReturnVal=function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this.context,e)),"string"==typeof t?t:!1===t?e.getMatchedText():t instanceof a?t.toAnchorString():e.buildTag().toAnchorString()},t.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var e=this.getTagBuilder(),t=[new G({tagBuilder:e,serviceName:this.hashtag}),new N({tagBuilder:e}),new V({tagBuilder:e}),new k({tagBuilder:e,serviceName:this.mention}),new z({tagBuilder:e,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=t},t.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new c({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},t.version="3.11.0",t.AnchorTagBuilder=c,t.HtmlTag=a,t.matcher={Email:N,Hashtag:G,Matcher:y,Mention:k,Phone:V,Url:z},t.match={Email:_,Hashtag:m,Match:h,Mention:g,Phone:x,Url:v},t}();return q}();var zr=be$c.Autolinker;function o$u(e,t){this.position=e,this.headingPitchRange=t}function l$s(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new o$1h,this.tourEnd=new o$1h,this.entryStart=new o$1h,this.entryEnd=new o$1h,this._activeEntries=[]}function h$r(e){for(var t=e.pop();void 0!==t;t=e.pop())t.stop()}function f$q(e,t,i){var n=this.playlist[this.playlistIndex];if(n){var r=y$o.bind(this,e,t,i);if(this._activeEntries.push(n),this.entryStart.raiseEvent(n),n.blocking)n.play(r,e.scene.camera,t);else{var o=this;n.play((function(){o.entryEnd.raiseEvent(n);var e=o._activeEntries.indexOf(n);e>=0&&o._activeEntries.splice(e,1)})),r(e,t,i)}}else e$2b(i)&&i(!1)}function y$o(e,t,i,n){var r=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(r,n),n)i(n);else{var o=this._activeEntries.indexOf(r);o>=0&&this._activeEntries.splice(o,1),this.playlistIndex++,f$q.call(this,e,t,i)}}function a$m(e,t,i){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=i,this.flyToMode=t}function i$r(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}l$s.prototype.addPlaylistEntry=function(e){this.playlist.push(e)},l$s.prototype.play=function(e,t){this.tourStart.raiseEvent();var i=this;f$q.call(this,e,t,(function(e){i.playlistIndex=0,e||h$r(i._activeEntries),i.tourEnd.raiseEvent(e)}))},l$s.prototype.stop=function(){h$r(this._activeEntries)},a$m.prototype.play=function(e,t,i){if(this.activeCamera=t,e$2b(e)&&null!==e){var n=this;this.activeCallback=function(t){delete n.activeCallback,delete n.activeCamera,e(!e$2b(t)&&t)}}var r=this.getCameraOptions(i);if(this.view.headingPitchRoll)t.flyTo(r);else if(this.view.headingPitchRange){var o=new i$1c(this.view.position);t.flyToBoundingSphere(o,r)}},a$m.prototype.stop=function(){e$2b(this.activeCamera)&&this.activeCamera.cancelFlight(),e$2b(this.activeCallback)&&this.activeCallback(!0)},a$m.prototype.getCameraOptions=function(e){var t={duration:this.duration};return e$2b(this.activeCallback)&&(t.complete=this.activeCallback),"smooth"===this.flyToMode&&(t.easingFunction=m$W.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),e$2b(e)&&(t=p$19(t,e)),t},i$r.prototype.play=function(e){var t=this;this.activeCallback=e,this.timeout=setTimeout((function(){delete t.activeCallback,e(!1)}),1e3*this.duration)},i$r.prototype.stop=function(){clearTimeout(this.timeout),e$2b(this.activeCallback)&&this.activeCallback(!0)};var ir$1={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){var t=e.toLowerCase();return t=a$13(t),ir$1[t]}},xe$7;typeof DOMParser<"u"&&(xe$7=new DOMParser);var dt$4=new zr({stripPrefix:!1,email:!1,replaceFn:function(e){if(!e.protocolUrlMatch)return!1}}),ee$b=32,ar=2414016,nr=1,or=16093e3,lr=.1,sr$1=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],mr=["http://www.google.com/kml/ext/2.2"],pt$4=["http://www.w3.org/2005/Atom"],m$m={kml:sr$1,gx:mr,atom:pt$4,kmlgx:sr$1.concat(mr)},Ue$5={Document:Er$1,Folder:Ct$3,Placemark:Et$3,NetworkLink:At$2,GroundOverlay:Dt$2,PhotoOverlay:We$5,ScreenOverlay:We$5,Tour:Pt$2};function Q$k(e){this._dataSource=e,this._deferred=o$1l.defer(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}function vt$2(e){var t=e.slice(0,Math.min(4,e.size)),i=o$1l.defer(),n=new FileReader;return n.addEventListener("load",(function(){i.resolve(1347093252===new DataView(n.result).getUint32(0,!1))})),n.addEventListener("error",(function(){i.reject(n.error)})),n.readAsArrayBuffer(t),i.promise}function fr(e){var t=o$1l.defer(),i=new FileReader;return i.addEventListener("load",(function(){t.resolve(i.result)})),i.addEventListener("error",(function(){t.reject(i.error)})),i.readAsText(e),t.promise}function ur(e){var t,i,n,r={xsi:"http://www.w3.org/2001/XMLSchema-instance"};for(var o in r)r.hasOwnProperty(o)&&(n="xmlns:"+o+"=",RegExp("[< ]"+o+":").test(e)&&-1===e.indexOf(n)&&(e$2b(t)||(t=e.substr(0,e.indexOf("<kml")+4),i=e.substr(t.length)),t+=" "+n+'"'+r[o]+'"'));return e$2b(t)&&(e=t+i),e}function dr(e){for(var t,i,n,r=e.indexOf("xmlns:"),o=e.indexOf(">",r);-1!==r&&r<o;)t=e.slice(r,e.indexOf('"',r)),i=r,-1!==(r=e.indexOf(t,r+1))?(n=e.indexOf('"',e.indexOf('"',r)+1),r=(e=e.slice(0,r-1)+e.slice(n+1,e.length)).indexOf("xmlns:",i-1)):r=e.indexOf("xmlns:",i+1);return e}function ct$3(e,t,i){e.getData(new he$8.TextWriter,(function(e){e=dr(e=ur(e)),t.kml=xe$7.parseFromString(e,"application/xml"),i.resolve()}))}function Ae$9(e,t,i){var n=u$_(ir$1.detectFromFilename(e.filename),"application/octet-stream");e.getData(new he$8.Data64URIWriter(n),(function(n){t[e.filename]=n,i.resolve()}))}function pr(e,t,i,n){for(var r=n.keys,o=new h$16("."),a=e.querySelectorAll(t),s=0;s<a.length;s++){var l=a[s],u=new h$16(l.getAttribute(i)).resolve(o).toString(),c=r.indexOf(u);if(-1!==c){var h=r[c];l.setAttribute(i,n[h]),"a"===t&&null===l.getAttribute("download")&&l.setAttribute("download",h)}}}function vr(e,t,i,n){for(var r=e.querySelectorAll(t),o=0;o<r.length;o++){var a=r[o],s=we$6(a.getAttribute(i),n);a.setAttribute(i,s.url)}}function cr(e,t,i){var n=W$o(e,"id");n=e$2b(n)&&0!==n.length?n:e$1Q(),e$2b(i)&&(n=i+n);var r=t.getById(n);return e$2b(r)&&(n=e$1Q(),e$2b(i)&&(n=i+n)),e$2b((r=t.add(new h$V({id:n}))).kml)||(r.addProperty("kml"),r.kml=new Kt$1),r}function ve$8(e,t){return"absolute"===e||"relativeToGround"===e||"relativeToSeaFloor"===t}function fe$6(e,t){if(!e$2b(e))return o$1p.fromDegrees(0,0,0,t);var i=e.match(/[^\s,\n]+/g);if(!e$2b(i))return o$1p.fromDegrees(0,0,0,t);var n=parseFloat(i[0]),r=parseFloat(i[1]),o=parseFloat(i[2]);return n=isNaN(n)?0:n,r=isNaN(r)?0:r,o=isNaN(o)?0:o,o$1p.fromDegrees(n,r,o,t)}function Te$9(e,t){if(e$2b(e)){var i=e.textContent.match(/[^\s\n]+/g);if(e$2b(i)){for(var n=i.length,r=new Array(n),o=0,a=0;a<n;a++)r[o++]=fe$6(i[a],t);return r}}}function hr(e,t){if(e$2b(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function W$o(e,t){if(e$2b(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function y$n(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function gr(e,t,i){if(e$2b(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function H$u(e,t,i){if(!e$2b(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}function I$t(e,t,i){var n=y$n(e,t,i);if(e$2b(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function T$n(e,t,i){var n=y$n(e,t,i);if(e$2b(n))return n.textContent.trim()}function q$m(e,t,i){var n=y$n(e,t,i);if(e$2b(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function we$6(e,t,i){if(e$2b(e)){var n;if(e$2b(i)){var r=i[e=e.replace(/\\/g,"/")];if(e$2b(r))n=new t$11({url:r});else{var o=new h$16(t.getUrlComponent());e$2b(r=i[new h$16(e).resolve(o)])&&(n=new t$11({url:r}))}}return e$2b(n)||(n=e$2b(t)?t.getDerivedResource({url:e}):new t$11({url:e})),n}}Object.defineProperties(Q$k.prototype,{dataSource:{get:function(){return this._dataSource}}}),Q$k.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0},Q$k.prototype.addPromise=function(e){this._promises.push(e)},Q$k.prototype.wait=function(){var e=this._deferred;return this._used||e.resolve(),o$1l.join(e.promise,o$1l.all(this._promises))},Q$k.prototype.process=function(){var e=1===this._stack.length;return e&&(this._started=U$m._getTimestamp()),this._process(e)},Q$k.prototype._giveUpTime=function(){if(!this._timeoutSet){this._timeoutSet=!0,this._timeThreshold=50;var e=this;setTimeout((function(){e._timeoutSet=!1,e._started=U$m._getTimestamp(),e._process(!0)}),0)}},Q$k.prototype._nextNode=function(){var e=this._stack,t=e[e.length-1],i=t.index,n=t.nodes;if(i!==n.length)return++t.index,n[i]},Q$k.prototype._pop=function(){var e=this._stack;return e.pop(),0!==e.length||(this._deferred.resolve(),!1)},Q$k.prototype._process=function(e){for(var t=this.dataSource,i=this._stack[this._stack.length-1].processingData,n=this._nextNode();e$2b(n);){var r=Ue$5[n.localName];if(e$2b(r)&&(-1!==m$m.kml.indexOf(n.namespaceURI)||-1!==m$m.gx.indexOf(n.namespaceURI))&&(r(t,n,i,this),this._timeoutSet||U$m._getTimestamp()>this._started+this._timeThreshold))return void this._giveUpTime();n=this._nextNode()}this._pop()&&e&&this._process(!0)};var G$o={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function Fe$8(e,t){if(e$2b(e)&&!/^\s*$/gm.test(e)){"#"===e[0]&&(e=e.substring(1));var i=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,o=parseInt(e.substring(6,8),16)/255;return t?(o>0?(G$o.maximumRed=o,G$o.red=void 0):(G$o.maximumRed=void 0,G$o.red=0),r>0?(G$o.maximumGreen=r,G$o.green=void 0):(G$o.maximumGreen=void 0,G$o.green=0),n>0?(G$o.maximumBlue=n,G$o.blue=void 0):(G$o.maximumBlue=void 0,G$o.blue=0),G$o.alpha=i,e$1U.fromRandom(G$o)):new e$1U(o,r,n,i)}}function ne$d(e,t,i){var n=T$n(e,t,i);if(e$2b(n))return Fe$8(n,"random"===T$n(e,"colorMode",i))}function ht$2(e){var t=y$n(e,"TimeStamp",m$m.kmlgx),i=T$n(t,"when",m$m.kmlgx);if(e$2b(t)&&e$2b(i)&&0!==i.length){var n=a$15.fromIso8601(i),r=new c$z;return r.addInterval(new d$W({start:n,stop:o$H.MAXIMUM_VALUE})),r}}function gt$3(e){var t=y$n(e,"TimeSpan",m$m.kmlgx);if(e$2b(t)){var i,n=y$n(t,"begin",m$m.kmlgx),r=e$2b(n)?a$15.fromIso8601(n.textContent):void 0,o=y$n(t,"end",m$m.kmlgx),a=e$2b(o)?a$15.fromIso8601(o.textContent):void 0;if(e$2b(r)&&e$2b(a)){if(a$15.lessThan(a,r)){var s=r;r=a,a=s}(i=new c$z).addInterval(new d$W({start:r,stop:a}))}else e$2b(r)?(i=new c$z).addInterval(new d$W({start:r,stop:o$H.MAXIMUM_VALUE})):e$2b(a)&&(i=new c$z).addInterval(new d$W({start:o$H.MINIMUM_VALUE,stop:a}));return i}}function kr(){var e=new n$T;return e.width=ee$b,e.height=ee$b,e.scaleByDistance=new o$Y(ar,nr,or,lr),e.pixelOffsetScaleByDistance=new o$Y(ar,nr,or,lr),e}function Ve$7(){var e=new l$Z;return e.outline=!0,e.outlineColor=e$1U.WHITE,e}function _r(){var e=new n$O;return e.translucencyByDistance=new o$Y(3e6,1,5e6,0),e.distanceDisplayCondition=new r$Y(0,8e4),e.pixelOffset=new o$1o(17,0),e.horizontalOrigin=j$T.LEFT,e.font="16px sans-serif",e.style=R$Q.FILL_AND_OUTLINE,e}function xr$1(e,t,i,n,r){var o=T$n(e,"href",m$m.kml);if(e$2b(o)&&0!==o.length){var a=we$6(o,i,n);if(r){var s=T$n(e,"refreshMode",m$m.kml),l=T$n(e,"viewRefreshMode",m$m.kml);"onInterval"===s||"onExpire"===s?e$1$("kml-refreshMode-"+s,"KML - Unsupported Icon refreshMode: "+s):("onStop"===l||"onRegion"===l)&&e$1$("kml-refreshMode-"+l,"KML - Unsupported Icon viewRefreshMode: "+l);var u=u$_(T$n(e,"viewBoundScale",m$m.kml),1),c="onStop"===l?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",h=u$_(T$n(e,"viewFormat",m$m.kml),c),d=T$n(e,"httpQuery",m$m.kml);e$2b(h)&&a.setQueryParameters(m$1a(Le$9(h))),e$2b(d)&&a.setQueryParameters(m$1a(Le$9(d)));var f=t._ellipsoid;return He$4(a,t._camera,t._canvas,u,t._lastCameraView.bbox,f),a}return a}}function kt$2(e,t,i,n,r){var o=I$t(t,"scale",m$m.kml),a=I$t(t,"heading",m$m.kml),s=ne$d(t,"color",m$m.kml),l=y$n(t,"Icon",m$m.kml),u=xr$1(l,e,n,r,!1);e$2b(l)&&!e$2b(u)&&(u=!1);var c,h,d=I$t(l,"x",m$m.gx),f=I$t(l,"y",m$m.gx),p=I$t(l,"w",m$m.gx),_=I$t(l,"h",m$m.gx),m=y$n(t,"hotSpot",m$m.kml),g=hr(m,"x"),x=hr(m,"y"),v=W$o(m,"xunits"),y=W$o(m,"yunits"),$=i.billboard;e$2b($)||($=kr(),i.billboard=$),$.image=u,$.scale=o,$.color=s,(e$2b(d)||e$2b(f)||e$2b(p)||e$2b(_))&&($.imageSubRegion=new f$18(d,f,p,_)),e$2b(a)&&0!==a&&($.rotation=e$2a.toRadians(-a),$.alignedAxis=o$1p.UNIT_Z),o=u$_(o,1),e$2b(g)&&("pixels"===v?c=-g*o:"insetPixels"===v?c=(g-ee$b)*o:"fraction"===v&&(c=-g*ee$b*o),c+=.5*ee$b*o),e$2b(x)&&("pixels"===y?h=x*o:"insetPixels"===y?h=(-x+ee$b)*o:"fraction"===y&&(h=x*ee$b*o),h-=.5*ee$b*o),(e$2b(c)||e$2b(h))&&($.pixelOffset=new o$1o(c,h))}function Me$9(e,t,i,n,r){for(var o=0,a=t.childNodes.length;o<a;o++){var s=t.childNodes.item(o);if("IconStyle"===s.localName)kt$2(e,s,i,n,r);else if("LabelStyle"===s.localName){var l=i.label;e$2b(l)||(l=_r(),i.label=l),l.scale=u$_(I$t(s,"scale",m$m.kml),l.scale),l.fillColor=u$_(ne$d(s,"color",m$m.kml),l.fillColor),l.text=i.name}else if("LineStyle"===s.localName){var u=i.polyline;e$2b(u)||(u=new a$L,i.polyline=u),u.width=I$t(s,"width",m$m.kml),u.material=ne$d(s,"color",m$m.kml),e$2b(ne$d(s,"outerColor",m$m.gx))&&e$1$("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),e$2b(I$t(s,"outerWidth",m$m.gx))&&e$1$("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),e$2b(I$t(s,"physicalWidth",m$m.gx))&&e$1$("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),e$2b(q$m(s,"labelVisibility",m$m.gx))&&e$1$("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if("PolyStyle"===s.localName){var c=i.polygon;e$2b(c)||(c=Ve$7(),i.polygon=c),c.material=u$_(ne$d(s,"color",m$m.kml),c.material),c.fill=u$_(q$m(s,"fill",m$m.kml),c.fill),c.outline=u$_(q$m(s,"outline",m$m.kml),c.outline)}else if("BalloonStyle"===s.localName){var h=u$_(Fe$8(T$n(s,"bgColor",m$m.kml)),e$1U.WHITE),d=u$_(Fe$8(T$n(s,"textColor",m$m.kml)),e$1U.BLACK),f=T$n(s,"text",m$m.kml);i.addProperty("balloonStyle"),i.balloonStyle={bgColor:h,textColor:d,text:f}}else if("ListStyle"===s.localName){var p=T$n(s,"listItemType",m$m.kml);("radioFolder"===p||"checkOffOnly"===p)&&e$1$("kml-listStyle-"+p,"KML - Unsupported ListStyle with listItemType: "+p)}}}function _t$3(e,t,i,n,r){for(var o,a=new h$V,s=-1,l=t.childNodes,u=l.length,c=0;c<u;c++){var h=l[c];("Style"===h.localName||"StyleMap"===h.localName)&&(s=c)}if(-1!==s){var d=l[s];if("Style"===d.localName)Me$9(e,d,a,n,r);else for(var f=H$u(d,"Pair",m$m.kml),p=0;p<f.length;p++){var _=f[p],m=T$n(_,"key",m$m.kml);if("normal"===m){var g=T$n(_,"styleUrl",m$m.kml);if(e$2b(g))e$2b(o=i.getById(g))||(o=i.getById("#"+g)),e$2b(o)&&a.merge(o);else Me$9(e,y$n(_,"Style",m$m.kml),a,n,r)}else e$1$("kml-styleMap-"+m,"KML - Unsupported StyleMap key: "+m)}}var x=T$n(t,"styleUrl",m$m.kml);if(e$2b(x)){var v=x;if("#"!==x[0]&&-1!==x.indexOf("#")){var y=x.split("#"),$=y[0];v=n.getDerivedResource({url:$}).getUrlComponent()+"#"+y[1]}e$2b(o=i.getById(v))||(o=i.getById("#"+v)),e$2b(o)&&a.merge(o)}return a}function xt$3(e,t,i){return t.fetchXML().then((function(n){return Tr(e,n,i,t,!0)}))}function Tr(e,t,i,n,r,o){var a,s,l,u,c=gr(t,"Style",m$m.kml);if(e$2b(c)){var h=c.length;for(a=0;a<h;a++)e$2b(s=W$o(u=c[a],"id"))&&(s="#"+s,r&&e$2b(n)&&(s=n.getUrlComponent()+s),e$2b(i.getById(s))||(l=new h$V({id:s}),i.add(l),Me$9(e,u,l,n,o)))}var d=gr(t,"StyleMap",m$m.kml);if(e$2b(d)){var f=d.length;for(a=0;a<f;a++){var p=d[a];if(e$2b(s=W$o(p,"id")))for(var _=H$u(p,"Pair",m$m.kml),m=0;m<_.length;m++){var g=_[m],x=T$n(g,"key",m$m.kml);if("normal"===x){if(s="#"+s,r&&e$2b(n)&&(s=n.getUrlComponent()+s),!e$2b(i.getById(s))){l=i.getOrCreateEntity(s);var v=T$n(g,"styleUrl",m$m.kml);if(e$2b(v)){"#"!==v[0]&&(v="#"+v),r&&e$2b(n)&&(v=n.getUrlComponent()+v);var y=i.getById(v);e$2b(y)&&l.merge(y)}else Me$9(e,u=y$n(g,"Style",m$m.kml),l,n,o)}}else e$1$("kml-styleMap-"+x,"KML - Unsupported StyleMap key: "+x)}}}var $=[],b=t.getElementsByTagName("styleUrl"),T=b.length;for(a=0;a<T;a++){var C=b[a].textContent;if("#"!==C[0]){var S=C.split("#");if(2===S.length){var w=S[0],E=n.getDerivedResource({url:w});$.push(xt$3(e,E,i))}}}return $}function Be$8(e,t,i){var n=new a$p(e,t.id,["position"]),r=new i$s(t.position);t.polyline=e$2b(i.polyline)?i.polyline.clone():new a$L,t.polyline.positions=new n$n([n,r])}function wr$1(e,t){return!e$2b(e)&&!e$2b(t)||"clampToGround"===e?k$P.CLAMP_TO_GROUND:"relativeToGround"===e?k$P.RELATIVE_TO_GROUND:"absolute"===e?k$P.NONE:"clampToSeaFloor"===t?(e$1$("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),k$P.CLAMP_TO_GROUND):"relativeToSeaFloor"===t?(e$1$("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),k$P.RELATIVE_TO_GROUND):(e$2b(e)?e$1$("kml-altitudeMode-unknown","KML - Unknown <kml:altitudeMode>:"+e+", using <kml:altitudeMode>:CLAMP_TO_GROUND."):e$1$("kml-gx:altitudeMode-unknown","KML - Unknown <gx:altitudeMode>:"+t+", using <kml:altitudeMode>:CLAMP_TO_GROUND."),k$P.CLAMP_TO_GROUND)}function Mr$1(e,t,i){return"relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t?e:((e$2b(t)&&"clampToGround"!==t||e$2b(i)&&"clampToSeaFloor"!==i)&&e$1$("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+u$_(t,i)),new i$s(e))}function Tt$4(e,t,i,n){if(e$2b(e)){if("relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t)return e;(e$2b(t)&&"clampToGround"!==t||e$2b(i)&&"clampToSeaFloor"!==i)&&e$1$("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+u$_(t,i));for(var r=e.length,o=0;o<r;o++){var a=e[o];n.scaleToGeodeticSurface(a,a)}return e}}function be$b(e,t,i,n){var r=t.label;e$2b(r)||(r=e$2b(i.label)?i.label.clone():_r(),t.label=r),r.text=t.name;var o=t.billboard;e$2b(o)||(o=e$2b(i.billboard)?i.billboard.clone():kr(),t.billboard=o),e$2b(o.image)?o.image.getValue()||(o.image=void 0):o.image=e._pinBuilder.fromColor(e$1U.YELLOW,64);var a=1;e$2b(o.scale)&&(0!==(a=o.scale.getValue())?r.pixelOffset=new o$1o(16*a+1,-16):(r.pixelOffset=void 0,r.horizontalOrigin=void 0)),e$2b(n)&&e._clampToGround&&(o.heightReference=n,r.heightReference=n,r.pixelOffset=new o$1o(16*a+1,-16))}function br(e,t){var i=e.path;e$2b(i)||((i=new n$N).leadTime=0,e.path=i);var n=t.polyline;e$2b(n)&&(i.material=n.material,i.width=n.width)}function wt$3(e,t,i,n,r){var o=T$n(i,"coordinates",m$m.kml),a=T$n(i,"altitudeMode",m$m.kml),s=T$n(i,"altitudeMode",m$m.gx),l=q$m(i,"extrude",m$m.kml),u=fe$6(o,e._ellipsoid);return n.position=u,be$b(e,n,r,wr$1(a,s)),l&&ve$8(a,s)&&Be$8(t,n,r),!0}function Ir$1(e,t,i,n,r){var o=y$n(i,"coordinates",m$m.kml),a=T$n(i,"altitudeMode",m$m.kml),s=T$n(i,"altitudeMode",m$m.gx),l=q$m(i,"extrude",m$m.kml),u=q$m(i,"tessellate",m$m.kml),c=ve$8(a,s),h=I$t(i,"drawOrder",m$m.gx),d=e._ellipsoid,f=Te$9(o,d),p=r.polyline;if(c&&l){var _=new e$1j;n.wall=_,_.positions=f;var m=r.polygon;e$2b(m)&&(_.fill=m.fill,_.material=m.material),_.outline=!0,e$2b(p)?(_.outlineColor=e$2b(p.material)?p.material.color:e$1U.WHITE,_.outlineWidth=p.width):e$2b(m)&&(_.outlineColor=e$2b(m.material)?m.material.color:e$1U.WHITE)}else if(!e._clampToS3M&&!e._clampToGround||c)e$2b(h)&&e$1$("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),p=e$2b(p)?p.clone():new a$L,n.polyline=p,p.positions=Tt$4(f,a,s,d),(!u||c)&&(p.arcType=m$1f.NONE);else{e._clampToS3M&&(n.clampToS3M=!0,n.classificationType=_0x3b5200.S3M_TILE);var g=new a$L;e._clampToGround&&(g.clampToGround=!0,g.classificationType=e._classificationType),n.polyline=g,g.positions=f,e$2b(p)?(g.material=e$2b(p.material)?p.material.color.getValue(o$H.MINIMUM_VALUE):e$1U.WHITE,g.width=u$_(p.width,1)):(g.material=e$1U.WHITE,g.width=1),g.zIndex=h}return!0}function Mt$3(e,t,i,n,r){var o=y$n(i,"outerBoundaryIs",m$m.kml),a=y$n(o,"LinearRing",m$m.kml),s=y$n(a,"coordinates",m$m.kml),l=e._ellipsoid,u=Te$9(s,l),c=q$m(i,"extrude",m$m.kml),h=ve$8(T$n(i,"altitudeMode",m$m.kml),T$n(i,"altitudeMode",m$m.gx)),d=e$2b(r.polygon)?r.polygon.clone():Ve$7(),f=r.polyline;if(e$2b(f)&&(d.outlineColor=e$2b(f.material)?f.material.color:e$1U.WHITE,d.outlineWidth=f.width),n.polygon=d,h?(d.perPositionHeight=!0,d.extrudedHeight=c?0:void 0):!e._clampToGround&&!e._clampToS3M&&(d.height=0),e._clampToS3M&&(d.classificationType=_0x3b5200.S3M_TILE),e._clampToGround&&(d.classificationType=_0x3b5200.TERRAIN),e$2b(u)){for(var p=new e$1J(u),_=H$u(i,"innerBoundaryIs",m$m.kml),m=0;m<_.length;m++){a=H$u(_[m],"LinearRing",m$m.kml);for(var g=0;g<a.length;g++)e$2b(u=Te$9(s=y$n(a[g],"coordinates",m$m.kml),l))&&p.holes.push(new e$1J(u))}d.hierarchy=p}return!0}function bt$2(e,t,i,n,r){var o=T$n(i,"altitudeMode",m$m.kml),a=T$n(i,"altitudeMode",m$m.gx),s=H$u(i,"coord",m$m.gx),l=H$u(i,"angles",m$m.gx),u=H$u(i,"when",m$m.kml),c=q$m(i,"extrude",m$m.kml),h=ve$8(o,a),d=e._ellipsoid;l.length>0&&e$1$("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");for(var f=Math.min(s.length,u.length),p=[],_=[],m=0;m<f;m++){var g=fe$6(s[m].textContent,d);p.push(g),_.push(a$15.fromIso8601(u[m].textContent))}var x=new o$y;return x.addSamples(_,p),n.position=x,be$b(e,n,r,wr$1(o,a)),br(n,r),n.availability=new c$z,u.length>0&&n.availability.addInterval(new d$W({start:_[0],stop:_[_.length-1]})),h&&c&&Be$8(t,n,r),!0}function Lr(e,t,i,n,r,o,a,s,l){var u=e[0],c=e[e.length-1],h=new o$y;h.addSamples(e,t),i.intervals.addInterval(new d$W({start:u,stop:c,isStartIncluded:l,isStopIncluded:l,data:Mr$1(h,a,s)})),n.addInterval(new d$W({start:u,stop:c,isStartIncluded:l,isStopIncluded:l})),r.intervals.addInterval(new d$W({start:u,stop:c,isStartIncluded:l,isStopIncluded:l,data:o}))}function yr(e,t,i,n,r){for(var o,a,s,l=q$m(i,"interpolate",m$m.gx),u=H$u(i,"Track",m$m.gx),c=!1,h=new t$l,d=new c$z,f=new t$q,p=e._ellipsoid,_=0,m=u.length;_<m;_++){var g=u[_],x=H$u(g,"when",m$m.kml),v=H$u(g,"coord",m$m.gx),y=T$n(g,"altitudeMode",m$m.kml),$=T$n(g,"altitudeMode",m$m.gx),b=ve$8(y,$),T=q$m(g,"extrude",m$m.kml),C=Math.min(v.length,x.length),S=[];o=[];for(var w=0;w<C;w++){var E=fe$6(v[w].textContent,p);S.push(E),o.push(a$15.fromIso8601(x[w].textContent))}l&&(e$2b(a)&&Lr([a,o[0]],[s,S[0]],f,d,h,!1,"absolute",void 0,!1),a=o[C-1],s=S[S.length-1]),Lr(o,S,f,d,h,b&&T,y,$,!0),c=c||b&&T}return n.availability=d,n.position=f,be$b(e,n,r),br(n,r),c&&(Be$8(t,n,r),n.polyline.show=h),!0}var Cr={Point:wt$3,LineString:Ir$1,LinearRing:Ir$1,Polygon:Mt$3,Track:bt$2,MultiTrack:yr,MultiGeometry:It$3,Model:Gt$1},J$g;function It$3(e,t,i,n,r,o){for(var a=i.childNodes,s=!1,l=0,u=a.length;l<u;l++){var c=a.item(l),h=Cr[c.localName];if(e$2b(h)){var d=cr(c,t,o);d.parent=n,d.name=n.name,d.availability=n.availability,d.description=n.description,d.kml=n.kml,h(e,t,c,d,r)&&(s=!0)}}return s}function Lt$2(e,t){var i=y$n(e,"ExtendedData",m$m.kml);if(e$2b(i)){e$2b(y$n(i,"SchemaData",m$m.kml))&&e$1$("kml-schemaData","KML - SchemaData is unsupported"),e$2b(W$o(i,"xmlns:prefix"))&&e$1$("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");var n={},r=H$u(i,"Data",m$m.kml);if(e$2b(r))for(var o=r.length,a=0;a<o;a++){var s=r[a],l=W$o(s,"name");e$2b(l)&&(n[l]={displayName:T$n(s,"displayName",m$m.kml),value:T$n(s,"value",m$m.kml)})}t.kml.extendedData=n}}function yt$2(e,t,i,n,r){var o,a,s,l,u=t.kml,c=u.extendedData,h=T$n(e,"description",m$m.kml),d=u$_(t.balloonStyle,i.balloonStyle),f=e$1U.WHITE,p=e$1U.BLACK,_=h;if(e$2b(d)&&(f=u$_(d.bgColor,e$1U.WHITE),p=u$_(d.textColor,e$1U.BLACK),_=u$_(d.text,h)),e$2b(_)){if(_=(_=(_=(_=(_=(_=_.replace("$[name]",u$_(t.name,""))).replace("$[description]",u$_(h,""))).replace("$[address]",u$_(u.address,""))).replace("$[Snippet]",u$_(u.snippet,""))).replace("$[id]",t.id)).replace("$[geDirections]",""),e$2b(c)){var m=_.match(/\$\[.+?\]/g);if(null!==m)for(o=0;o<m.length;o++){var g=m[o],x=g.substr(2,g.length-3),v=/\/displayName$/.test(x);e$2b(l=c[x=x.replace(/\/displayName$/,"")])&&(l=v?l.displayName:l.value),e$2b(l)&&(_=_.replace(g,u$_(l,"")))}}}else if(e$2b(c)&&(s=Object.keys(c)).length>0){for(_='<table class="supermap3d-infoBox-defaultTable supermap3d-infoBox-defaultTable-lighter"><tbody>',o=0;o<s.length;o++)_+="<tr><th>"+u$_((l=c[a=s[o]]).displayName,a)+"</th><td>"+u$_(l.value,"")+"</td></tr>";_+="</tbody></table>"}if(e$2b(_)){_=dt$4.link(_),J$g.innerHTML=_;var y=J$g.querySelectorAll("a");for(o=0;o<y.length;o++)y[o].setAttribute("target","_blank");e$2b(n)&&n.keys.length>1&&(pr(J$g,"a","href",n),pr(J$g,"img","src",n)),vr(J$g,"a","href",r),vr(J$g,"img","src",r);var $='<div class="supermap3d-infoBox-description-lighter" style="';$+="overflow:auto;",$+="word-wrap:break-word;",$+="background-color:"+f.toCssColorString()+";",$+="color:"+p.toCssColorString()+";",$+='">',$+=J$g.innerHTML+"</div>",J$g.innerHTML="",t.description=$}}function Ie$6(e,t,i){var n=i.entityCollection,r=i.parentEntity,o=i.sourceResource,a=i.uriResolver,s=cr(t,n,i.context),l=s.kml,u=_t$3(e,t,i.styleCollection,o,a),c=T$n(t,"name",m$m.kml);s.name=c,s.parent=r;var h=gt$3(t);e$2b(h)||(h=ht$2(t)),s.availability=h,ze$5(s);var d=q$m(t,"visibility",m$m.kml);s.show=function e(t){return!t||t.show&&e(t.parent)}(r)&&u$_(d,!0);var f=y$n(t,"author",m$m.atom),p=l.author;p.name=T$n(f,"name",m$m.atom),p.uri=T$n(f,"uri",m$m.atom),p.email=T$n(f,"email",m$m.atom);var _=y$n(t,"link",m$m.atom),m=l.link;m.href=W$o(_,"href"),m.hreflang=W$o(_,"hreflang"),m.rel=W$o(_,"rel"),m.type=W$o(_,"type"),m.title=W$o(_,"title"),m.length=W$o(_,"length"),l.address=T$n(t,"address",m$m.kml),l.phoneNumber=T$n(t,"phoneNumber",m$m.kml),l.snippet=T$n(t,"Snippet",m$m.kml),Lt$2(t,s),yt$2(t,s,u,a,o);var g=e._ellipsoid;return Pr(t,s,g),Sr(t,s,g),e$2b(y$n(t,"Region",m$m.kml))&&e$1$("kml-region","KML - Placemark Regions are unsupported"),{entity:s,styleEntity:u}}function Er$1(e,t,i,n){n.addNodes(t.childNodes,i),n.process()}function Ct$3(e,t,i,n){var r=Ie$6(e,t,i),o=l$1g(i);o.parentEntity=r.entity,Er$1(e,t,o,n)}function Et$3(e,t,i,n){for(var r=Ie$6(e,t,i),o=r.entity,a=r.styleEntity,s=!1,l=t.childNodes,u=0,c=l.length;u<c&&!s;u++){var h=l.item(u),d=Cr[h.localName];e$2b(d)&&(d(e,i.entityCollection,h,o,a,o.id,i.sourceResource),s=!0)}s||(o.merge(a),be$b(e,o,a))}typeof document<"u"&&(J$g=document.createElement("div"));var St$1={FlyTo:Nt$3,Wait:Ot$2,SoundCue:Ke$3,AnimatedUpdate:Ke$3,TourControl:Ke$3};function Pt$2(e,t,i,n){var r=new l$s(T$n(t,"name",m$m.kml),W$o(t,"id")),o=y$n(t,"Playlist",m$m.gx);if(o)for(var a=e._ellipsoid,s=o.childNodes,l=0;l<s.length;l++){var u=s[l];if(u.localName){var c=St$1[u.localName];c?c(r,u,a):console.log("Unknown KML Tour playlist entry type "+u.localName)}}e$2b(e.kmlTours)||(e.kmlTours=[]),e.kmlTours.push(r)}function Ke$3(e,t){e$1$("KML Tour unsupported node "+t.localName)}function Ot$2(e,t){var i=I$t(t,"duration",m$m.gx);e.addPlaylistEntry(new i$r(i))}function Nt$3(e,t,i){var n=I$t(t,"duration",m$m.gx),r=T$n(t,"flyToMode",m$m.gx),o={kml:{}};Pr(t,o,i),Sr(t,o,i);var a=new a$m(n,r,o.kml.lookAt||o.kml.camera);e.addPlaylistEntry(a)}function Sr(e,t,i){var n=y$n(e,"Camera",m$m.kml);if(e$2b(n)){var r=u$_(I$t(n,"longitude",m$m.kml),0),o=u$_(I$t(n,"latitude",m$m.kml),0),a=u$_(I$t(n,"altitude",m$m.kml),0),s=u$_(I$t(n,"heading",m$m.kml),0),l=u$_(I$t(n,"tilt",m$m.kml),0),u=u$_(I$t(n,"roll",m$m.kml),0),c=o$1p.fromDegrees(r,o,a,i),h=i$15.fromDegrees(s,l-90,u);t.kml.camera=new o$v(c,h)}}function Pr(e,t,i){var n=y$n(e,"LookAt",m$m.kml);if(e$2b(n)){var r=u$_(I$t(n,"longitude",m$m.kml),0),o=u$_(I$t(n,"latitude",m$m.kml),0),a=u$_(I$t(n,"altitude",m$m.kml),0),s=I$t(n,"heading",m$m.kml),l=I$t(n,"tilt",m$m.kml),u=u$_(I$t(n,"range",m$m.kml),0);l=e$2a.toRadians(u$_(l,0));var c=new a$T(s=e$2a.toRadians(u$_(s,0)),l-e$2a.PI_OVER_TWO,u),h=o$1p.fromDegrees(r,o,a,i);t.kml.lookAt=new o$u(h,c)}}function Dt$2(e,t,i,n){var r,o=Ie$6(e,t,i).entity,a=!1,s=e._ellipsoid,l=Te$9(y$n(t,"LatLonQuad",m$m.gx),s),u=I$t(t,"drawOrder",m$m.kml);if(e$2b(l))(r=Ve$7()).hierarchy=new e$1J(l),r.zIndex=u,o.polygon=r,a=!0;else{(r=new n$L).zIndex=u,o.rectangle=r;var c=y$n(t,"LatLonBox",m$m.kml);if(e$2b(c)){var h=I$t(c,"west",m$m.kml),d=I$t(c,"south",m$m.kml),f=I$t(c,"east",m$m.kml),p=I$t(c,"north",m$m.kml);e$2b(h)&&(h=e$2a.negativePiToPi(e$2a.toRadians(h))),e$2b(d)&&(d=e$2a.clampToLatitudeRange(e$2a.toRadians(d))),e$2b(f)&&(f=e$2a.negativePiToPi(e$2a.toRadians(f))),e$2b(p)&&(p=e$2a.clampToLatitudeRange(e$2a.toRadians(p))),r.coordinates=new h$18(h,d,f,p);var _=I$t(c,"rotation",m$m.kml);if(e$2b(_)){var m=e$2a.toRadians(_);r.rotation=m,r.stRotation=m}}}var g=y$n(t,"Icon",m$m.kml),x=xr$1(g,e,i.sourceResource,i.uriResolver,!0);if(e$2b(x)){a&&e$1$("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");var v=I$t(g,"x",m$m.gx),y=I$t(g,"y",m$m.gx),$=I$t(g,"w",m$m.gx),b=I$t(g,"h",m$m.gx);(e$2b(v)||e$2b(y)||e$2b($)||e$2b(b))&&e$1$("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),r.material=x,r.material.color=ne$d(t,"color",m$m.kml),r.material.transparent=!0}else r.material=ne$d(t,"color",m$m.kml);var T=T$n(t,"altitudeMode",m$m.kml);e$2b(T)?"absolute"===T?(r.height=I$t(t,"altitude",m$m.kml),r.zIndex=void 0):"clampToGround"!==T&&e$1$("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+T):"relativeToSeaFloor"===(T=T$n(t,"altitudeMode",m$m.gx))?(e$1$("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),r.height=I$t(t,"altitude",m$m.kml),r.zIndex=void 0):"clampToSeaFloor"===T?e$1$("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):e$2b(T)&&e$1$("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+T)}function We$5(e,t,i,n){e._unsupportedNode.raiseEvent(e,i.parentEntity,t,i.entityCollection,i.styleCollection,i.sourceResource,i.uriResolver),e$1$("kml-unsupportedFeature-"+t.nodeName,"KML - Unsupported feature: "+t.nodeName)}var re$c={INTERVAL:0,EXPIRE:1,STOP:2};function Le$9(e){if(!e$2b(e)||0===e.length)return"";var t=e[0];return("&"===t||"?"===t)&&(e=e.substring(1)),e}var Rt$4=new h$18,ue$9=new a$18,Ge$4=new o$1o,Ut$2=new o$1p;function He$4(e,t,i,n,r,o){function a(e){return e<-e$2a.PI_OVER_TWO?-e$2a.PI_OVER_TWO:e>e$2a.PI_OVER_TWO?e$2a.PI_OVER_TWO:e}function s(e){return e>e$2a.PI?e-e$2a.TWO_PI:e<-e$2a.PI?e+e$2a.TWO_PI:e}var l=m$1b(e.queryParameters);if(l=l.replace(/%5B/g,"[").replace(/%5D/g,"]"),e$2b(t)&&t._mode!==C$13.MORPHING){var u,c;if(r=u$_(r,Rt$4),e$2b(i)&&(Ge$4.x=.5*i.clientWidth,Ge$4.y=.5*i.clientHeight,u=t.pickEllipsoid(Ge$4,o,Ut$2)),e$2b(u)?c=o.cartesianToCartographic(u,ue$9):(c=h$18.center(r,ue$9),u=o.cartographicToCartesian(c)),e$2b(n)&&!e$2a.equalsEpsilon(n,1,e$2a.EPSILON9)){var h=r.width*n*.5,d=r.height*n*.5;r=new h$18(s(c.longitude-h),a(c.latitude-d),s(c.longitude+h),a(c.latitude+d))}l=(l=(l=(l=l.replace("[bboxWest]",e$2a.toDegrees(r.west).toString())).replace("[bboxSouth]",e$2a.toDegrees(r.south).toString())).replace("[bboxEast]",e$2a.toDegrees(r.east).toString())).replace("[bboxNorth]",e$2a.toDegrees(r.north).toString());var f=e$2a.toDegrees(c.longitude).toString(),p=e$2a.toDegrees(c.latitude).toString();l=(l=(l=(l=(l=(l=(l=(l=l.replace("[lookatLon]",f)).replace("[lookatLat]",p)).replace("[lookatTilt]",e$2a.toDegrees(t.pitch).toString())).replace("[lookatHeading]",e$2a.toDegrees(t.heading).toString())).replace("[lookatRange]",o$1p.distance(t.positionWC,u))).replace("[lookatTerrainLon]",f)).replace("[lookatTerrainLat]",p)).replace("[lookatTerrainAlt]",c.height.toString()),o.cartesianToCartographic(t.positionWC,ue$9),l=(l=(l=l.replace("[cameraLon]",e$2a.toDegrees(ue$9.longitude).toString())).replace("[cameraLat]",e$2a.toDegrees(ue$9.latitude).toString())).replace("[cameraAlt]",e$2a.toDegrees(ue$9.height).toString());var _=t.frustum,m=_.aspectRatio,g="",x="";if(e$2b(m)){var v=e$2a.toDegrees(_.fov);m>1?(g=v,x=v/m):(x=v,g=v*m)}l=(l=l.replace("[horizFov]",g.toString())).replace("[vertFov]",x.toString())}else l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=l.replace("[bboxWest]","-180")).replace("[bboxSouth]","-90")).replace("[bboxEast]","180")).replace("[bboxNorth]","90")).replace("[lookatLon]","")).replace("[lookatLat]","")).replace("[lookatRange]","")).replace("[lookatTilt]","")).replace("[lookatHeading]","")).replace("[lookatTerrainLon]","")).replace("[lookatTerrainLat]","")).replace("[lookatTerrainAlt]","")).replace("[cameraLon]","")).replace("[cameraLat]","")).replace("[cameraAlt]","")).replace("[horizFov]","")).replace("[vertFov]","");e$2b(i)?l=(l=l.replace("[horizPixels]",i.clientWidth)).replace("[vertPixels]",i.clientHeight):l=(l=l.replace("[horizPixels]","")).replace("[vertPixels]",""),l=(l=(l=(l=(l=l.replace("[terrainEnabled]","1")).replace("[clientVersion]","1")).replace("[kmlVersion]","2.2")).replace("[clientName]","SuperMap3D")).replace("[language]","English"),e.setQueryParameters(m$1a(l))}function At$2(e,t,i,n){var r=Ie$6(e,t,i).entity,o=i.sourceResource,a=i.uriResolver,s=y$n(t,"Link",m$m.kml);if(e$2b(s)||(s=y$n(t,"Url",m$m.kml)),e$2b(s)){var l,u,c=T$n(s,"href",m$m.kml);if(e$2b(c)){var h=c;if(c=we$6(c,o,i.uriResolver),/^data:/.test(c.getUrlComponent()))/\.kmz/i.test(o.getUrlComponent())||(h=o.getDerivedResource({url:h}));else{h=c.clone(),l=T$n(s,"viewRefreshMode",m$m.kml),u=u$_(T$n(s,"viewBoundScale",m$m.kml),1);var d="onStop"===l?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",f=u$_(T$n(s,"viewFormat",m$m.kml),d),p=T$n(s,"httpQuery",m$m.kml);e$2b(f)&&c.setQueryParameters(m$1a(Le$9(f))),e$2b(p)&&c.setQueryParameters(m$1a(Le$9(p)));var _=e._ellipsoid;He$4(c,e._camera,e._canvas,u,e._lastCameraView.bbox,_)}var m={sourceUri:h,uriResolver:a,context:r.id},g=new r$v,x=qe$1(e,g,c,m).then((function(t){var i=e._entityCollection,n=g.values;i.suspendEvents();for(var o=0;o<n.length;o++){var a=n[o];e$2b(a.parent)||(a.parent=r,ze$5(a)),i.add(a)}i.resumeEvents();var h=T$n(s,"refreshMode",m$m.kml),d=u$_(I$t(s,"refreshInterval",m$m.kml),0);if("onInterval"===h&&d>0||"onExpire"===h||"onStop"===l){var f=y$n(t,"NetworkLinkControl",m$m.kml),p=e$2b(f),_=a$15.now(),m={id:e$1Q(),href:c,cookie:{},lastUpdated:_,updating:!1,entity:r,viewBoundScale:u,needsUpdate:!1,cameraUpdateTime:_},x=0;if(p&&(m.cookie=m$1a(u$_(T$n(f,"cookie",m$m.kml),"")),x=u$_(I$t(f,"minRefreshPeriod",m$m.kml),0)),"onInterval"===h)p&&(d=Math.max(x,d)),m.refreshMode=re$c.INTERVAL,m.time=d;else if("onExpire"===h){var v;if(p&&(v=T$n(f,"expires",m$m.kml)),e$2b(v))try{var y=a$15.fromIso8601(v),$=a$15.secondsDifference(y,_);$>0&&$<x&&a$15.addSeconds(_,x,y),m.refreshMode=re$c.EXPIRE,m.time=y}catch{e$1$("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else e$1$("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else e._camera?(m.refreshMode=re$c.STOP,m.time=u$_(I$t(s,"viewRefreshTime",m$m.kml),0)):e$1$("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires a camera be passed in when creating the KmlDataSource");e$2b(m.refreshMode)&&e._networkLinks.set(m.id,m)}else"onRegion"===l&&e$1$("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion")})).otherwise((function(t){e$1$("An error occured during loading "+c.url),e._error.raiseEvent(e,t)}));n.addPromise(x)}}}function Ft$3(e,t,i,n){var r=Ue$5[t.localName];return e$2b(r)?r(e,t,i,n):We$5(e,t,i)}function ye$7(e,t,i,n,r,o){t.removeAll();var a=i.documentElement,s=T$n("Document"===a.localName?a:y$n(a,"Document",m$m.kml),"name",m$m.kml);e$2b(s)||(s=f$O(n.getUrlComponent())),e$2b(e._name)||(e._name=s);var l=new U$m._DeferredLoading(e),u=new r$v(e);return o$1l.all(Tr(e,i,u,n,!1,r)).then((function(){var a=i.documentElement;if("kml"===a.localName)for(var s=a.childNodes,c=0;c<s.length;c++){var h=s[c];if(e$2b(Ue$5[h.localName])){a=h;break}}var d={parentEntity:void 0,entityCollection:t,styleCollection:u,sourceResource:n,uriResolver:r,context:o};return t.suspendEvents(),Ft$3(e,a,d,l),t.resumeEvents(),l.wait().then((function(){return i.documentElement}))}))}function Vt$3(e,t,i,n){var r=o$1l.defer();return he$8.createReader(new he$8.BlobReader(i),(function(i){i.getEntries((function(o){for(var a,s,l=[],u={},c=0;c<o.length;c++){var h=o[c];if(!h.directory){var d=o$1l.defer();l.push(d.promise),!/\.kml$/i.test(h.filename)||e$2b(a)&&/\//i.test(h.filename)?Ae$9(h,u,d):(e$2b(a)&&Ae$9(a,u,s),a=h,s=d)}}e$2b(a)&&ct$3(a,u,s),o$1l.all(l).then((function(){if(i.close(),e$2b(u.kml))return u.keys=Object.keys(u),ye$7(e,t,u.kml,n,u);r.reject(new t$14("KMZ file does not contain a KML document."))})).then(r.resolve).otherwise(r.reject)}))}),(function(e){r.reject(e)})),r.promise}function qe$1(e,t,i,n){var r=(n=u$_(n,u$_.EMPTY_OBJECT)).sourceUri,o=n.uriResolver,a=n.context,s=i;if("string"==typeof i||i instanceof t$11){s=(i=t$11.createIfNeeded(i)).fetchBlob(),r=u$_(r,i.clone());var l=e._resourceCredits,u=i.credits;if(e$2b(u))for(var c=u.length,h=0;h<c;h++)l.push(u[h])}else r=u$_(r,t$11.DEFAULT.clone());return r=t$11.createIfNeeded(r),o$1l(s).then((function(i){return i instanceof Blob?vt$2(i).then((function(n){return n?Vt$3(e,t,i,r):fr(i).then((function(i){var n,s;i=dr(i=ur(i));try{n=xe$7.parseFromString(i,"application/xml")}catch(e){s=e.toString()}if(e$2b(s)||n.body||"parsererror"===n.documentElement.tagName){var l=e$2b(s)?s:n.documentElement.firstChild.nodeValue;throw l||(l=n.body.innerText),new t$14(l)}return ye$7(e,t,n,r,o,a)}))})):ye$7(e,t,i,r,o,a)})).otherwise((function(t){return e._error.raiseEvent(e,t),console.log(t),o$1l.reject(t)}))}function U$m(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).camera,i=e.canvas;if(!e$2b(t))throw new t$16("options.camera is required.");if(!e$2b(i))throw new t$16("options.canvas is required.");this._changed=new o$1h,this._error=new o$1h,this._loading=new o$1h,this._refresh=new o$1h,this._unsupportedNode=new o$1h,this._clock=void 0,this._entityCollection=new r$v(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new s$A,this._networkLinks=new e$1N,this._entityCluster=new a$r,this._canvas=i,this._camera=t,this._lastCameraView={position:e$2b(t)?o$1p.clone(t.positionWC):void 0,direction:e$2b(t)?o$1p.clone(t.directionWC):void 0,up:e$2b(t)?o$1p.clone(t.upWC):void 0,bbox:e$2b(t)?t.computeViewRectangle():h$18.clone(h$18.MAX_VALUE)},this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._visibleViewport=4095;var n=e.credit;"string"==typeof n&&(n=new r$T(n)),this._credit=n,this._resourceCredits=[]}function ze$5(e){var t=e.parent;if(e$2b(t)){var i=t.availability;if(e$2b(i)){var n=e.availability;e$2b(n)?n.intersect(i):e.availability=i}}}function Bt$4(e,t,i,n,r){return function(o){if(n.contains(t.id)){var a=!1,s=y$n(o,"NetworkLinkControl",m$m.kml),l=0;if(e$2b(s)){if(e$2b(y$n(s,"Update",m$m.kml)))return e$1$("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,void n.remove(t.id);t.cookie=m$1a(u$_(T$n(s,"cookie",m$m.kml),"")),l=u$_(I$t(s,"minRefreshPeriod",m$m.kml),0)}var u=a$15.now(),c=t.refreshMode;if(c===re$c.INTERVAL)e$2b(s)&&(t.time=Math.max(l,t.time));else if(c===re$c.EXPIRE){var h;if(e$2b(s)&&(h=T$n(s,"expires",m$m.kml)),e$2b(h))try{var d=a$15.fromIso8601(h),f=a$15.secondsDifference(d,u);f>0&&f<l&&a$15.addSeconds(u,l,d),t.time=d}catch{e$1$("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),a=!0}else e$1$("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),a=!0}var p=t.entity,_=e._entityCollection,m=i.values;_.suspendEvents();var g,x=_.values.slice();for(g=0;g<x.length;++g){var v=x[g];v.parent===p&&(v.parent=void 0,E(v))}for(_.resumeEvents(),_.suspendEvents(),g=0;g<m.length;g++){var y=m[g];e$2b(y.parent)||(y.parent=p,ze$5(y)),_.add(y)}_.resumeEvents(),a?n.remove(t.id):t.lastUpdated=u;var $=_.computeAvailability(),b=$.start,T=$.stop,C=a$15.equals(b,o$H.MINIMUM_VALUE),S=a$15.equals(T,o$H.MAXIMUM_VALUE);if(!C||!S){var w=e._clock;(w.startTime!==b||w.stopTime!==T)&&(w.startTime=b,w.stopTime=T,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,r.getUrlComponent(!0))}function E(e){_.remove(e);for(var t=e._children,i=t.length,n=0;n<i;++n)E(t[n])}}}U$m.load=function(e,t){return new U$m(t=u$_(t,u$_.EMPTY_OBJECT)).load(e,t)},Object.defineProperties(U$m.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},s3mInstanceCollection:{get:function(){return this._s3mInstanceCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2b(e))throw new t$16("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),U$m.prototype.load=function(e,t){if(!e$2b(e))throw new t$16("data is required.");t=u$_(t,u$_.EMPTY_OBJECT),o$A.setLoading(this,!0);var i=this._name;this._name=void 0,this._clampToGround=u$_(t.clampToGround,!1),this._clampToS3M=u$_(t.clampToS3M,!1),this._classificationType=u$_(t.classificationType,_0x3b5200.TERRAIN);var n=this;return qe$1(this,this._entityCollection,e,t).then((function(){var e,t,r=n._entityCollection.computeAvailability(),o=r.start,a=r.stop,s=a$15.equals(o,o$H.MINIMUM_VALUE),l=a$15.equals(a,o$H.MAXIMUM_VALUE);s&&l||(s&&((t=new Date).setHours(0,0,0,0),o=a$15.fromDate(t)),l&&((t=new Date).setHours(24,0,0,0),a=a$15.fromDate(t)),(e=new e$y).startTime=o,e.stopTime=a,e.currentTime=a$15.clone(o),e.clockRange=tt$9.LOOP_STOP,e.clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER,e.multiplier=Math.round(Math.min(Math.max(a$15.secondsDifference(a,o)/60,1),31556900)));var u=!1;return e!==n._clock&&(n._clock=e,u=!0),i!==n._name&&(u=!0),u&&n._changed.raiseEvent(n),o$A.setLoading(n,!1),n})).otherwise((function(e){return o$A.setLoading(n,!1),n._error.raiseEvent(n,e),console.log(e),o$1l.reject(e)}))};var je$5=new e$1N;function Kt$1(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}function Wt$3(e,t,i,n){var r=(n=u$_(n,u$_.EMPTY_OBJECT)).sourceUri;return o$1l(fr(i)).then((function(i){var n,o;try{n=xe$7.parseFromString(i,"application/xml")}catch(e){o=e.toString()}if(e$2b(o)||n.body||"parsererror"===n.documentElement.tagName){var a=e$2b(o)?o:n.documentElement.firstChild.nodeValue;throw a||(a=n.body.innerText),new t$14(a)}return ye$7(e,t,n,r,void 0)}))}function Gt$1(e,t,i,n,r,o,a,s){var l,u=y$n(i,"Location",m$m.kml),c=T$n(i,"altitudeMode",m$m.kml),h=T$n(i,"altitudeMode",m$m.gx),d=y$n(i,"Orientation",m$m.kml),f=I$t(d,"heading",m$m.kml),p=I$t(d,"tilt",m$m.kml),_=I$t(d,"roll",m$m.kml),m=y$n(i,"Scale",m$m.kml),g=I$t(m,"x",m$m.kml),x=I$t(m,"y",m$m.kml),v=I$t(m,"z",m$m.kml),y=T$n(y$n(i,"Link",m$m.kml),"href",m$m.kml);if(e$2b(s)&&(l=s[y]),-1!==(y=we$6(y,a,s)).url.indexOf(".s3m")){e$2b(e._s3mInstanceCollection)||(e._s3mInstanceCollection=new _0x448857(e._camera._scene.context),e._camera._scene.primitives.add(e._s3mInstanceCollection));var $=fe$6(T$n(u,"longitude",m$m.kml)+","+T$n(u,"latitude",m$m.kml)+","+T$n(u,"altitude",m$m.kml)),b=-e$2a.toRadians(f),T=e$2a.toRadians(p),C=e$2a.toRadians(_);return e._s3mInstanceCollection.add(y.url,[{position:$,scale:new o$1p(g,x,v),hpr:new i$15(b,T,C)}]),!0}var S=y$n(u,"MultiTrack",m$m.gx);if(e$2b(S))r.billboard=new n$T({show:!1}),r.label=new n$O({show:!1}),yr(e,t,S,n,r),n.orientation=new e$v(n.position);else{$=fe$6(T$n(u,"longitude",m$m.kml)+","+T$n(u,"latitude",m$m.kml)+","+T$n(u,"altitude",m$m.kml));n.position=Mr$1(new r$U($),c,h);var w=m$17.headingPitchRollQuaternion($,i$15.fromDegrees(f,p,_));n.orientation=w}return n.model={uri:y.url,minimumPixelSize:16,maximumScale:16,scale:new o$1p(g,x,v),blob:l},!0}U$m.prototype.update=function(e){var t=this._networkLinks;if(0===t.length)return!0;var i=a$15.now(),n=this;function r(e){for(var t=e._children,i=t.length,n=0;n<i;++n){var o=t[n];je$5.set(o.id,o),r(o)}}je$5.removeAll();var o=!1,a=this._lastCameraView,s=this._camera;e$2b(s)&&!(s.positionWC.equalsEpsilon(a.position,e$2a.EPSILON7)&&s.directionWC.equalsEpsilon(a.direction,e$2a.EPSILON7)&&s.upWC.equalsEpsilon(a.up,e$2a.EPSILON7))&&(a.position=o$1p.clone(s.positionWC),a.direction=o$1p.clone(s.directionWC),a.up=o$1p.clone(s.upWC),a.bbox=s.computeViewRectangle(),o=!0);var l=new e$1N,u=!1;return t.values.forEach((function(e){var t=e.entity;if(!je$5.contains(t.id)){if(!e.updating){var s=!1;if(e.refreshMode===re$c.INTERVAL?a$15.secondsDifference(i,e.lastUpdated)>e.time&&(s=!0):e.refreshMode===re$c.EXPIRE?a$15.greaterThan(i,e.time)&&(s=!0):e.refreshMode===re$c.STOP&&(o&&(e.needsUpdate=!0,e.cameraUpdateTime=i),e.needsUpdate&&a$15.secondsDifference(i,e.cameraUpdateTime)>=e.time&&(s=!0)),s){r(t),e.updating=!0;var c=new r$v,h=e.href.clone();h.setQueryParameters(e.cookie);var d=u$_(n._ellipsoid,t$13.WGS84);He$4(h,n._camera,n._canvas,e.viewBoundScale,a.bbox,d),qe$1(n,c,h,{context:t.id}).then(Bt$4(n,e,c,l,h)).otherwise((function(t){var i="NetworkLink "+e.href+" refresh failed: "+t;console.log(i),n._error.raiseEvent(n,i)})),u=!0}}l.set(e.id,e)}})),u&&(this._networkLinks=l,this._changed.raiseEvent(this)),!0},U$m.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},U$m.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,e$2b(this._s3mInstanceCollection)&&this._s3mInstanceCollection.setVisibleInViewport(e,t)},U$m.importFile=function(e,t){return new U$m(t=u$_(t,u$_.EMPTY_OBJECT)).read(e,t)},U$m.prototype.read=function(e,t){if(!e$2b(e))throw new t$16("data is required.");o$A.setLoading(this,!0);var i=this._name;this._name=void 0,this._promises=[];var n=this;return Wt$3(this,this._entityCollection,e,t).then((function(){return o$1l.all(n._promises,(function(){var e,t,r=n._entityCollection.computeAvailability(),o=r.start,a=r.stop,s=a$15.equals(o,o$H.MINIMUM_VALUE),l=a$15.equals(a,o$H.MAXIMUM_VALUE);s&&l||(s&&((t=new Date).setHours(0,0,0,0),o=a$15.fromDate(t)),l&&((t=new Date).setHours(24,0,0,0),a=a$15.fromDate(t)),(e=new e$y).startTime=o,e.stopTime=a,e.currentTime=a$15.clone(o),e.clockRange=tt$9.LOOP_STOP,e.clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER,e.multiplier=Math.round(Math.min(Math.max(a$15.secondsDifference(a,o)/60,1),31556900)));var u=!1;return e!==n._clock&&(n._clock=e,u=!0),i!==n._name&&(u=!0),u&&n._changed.raiseEvent(n),o$A.setLoading(n,!1),n._promises=void 0,n}))})).otherwise((function(e){return o$A.setLoading(n,!1),n._error.raiseEvent(n,e),console.log(e),o$1l.reject(e)}))},U$m._DeferredLoading=Q$k,U$m._getTimestamp=Et$a;var a$l=e$1U.WHITE,h$q=e$1U.BLACK,s$j=1;function e$u(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth,this.vtime=3.14*Math.random(),this._bAsy=u$_(e.bAsy,!0),this._speedRatio=u$_(e.speedRatio,1)}function r$r(){t$16.throwInstantiationError()}Object.defineProperties(e$u.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)&&r$Z.isConstant(this._outlineColor)&&r$Z.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth")}),e$u.prototype.getType=function(e){return"PolylineDynamic"},e$u.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,a$l,t.color),t.outlineColor=r$Z.getValueOrClonedDefault(this._outlineColor,e,h$q,t.outlineColor),t.outlineWidth=r$Z.getValueOrDefault(this._outlineWidth,e,s$j),t.bAsy=1==this._bAsy?1:0,t.v_time=618e-6*performance.now()-1.9788000000000001-this.vtime,t.v_time*=this._speedRatio,t},e$u.prototype.equals=function(e){return this===e||e instanceof e$u&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._outlineColor,e._outlineColor)&&r$Z.equals(this._outlineWidth,e._outlineWidth)},r$r.prototype.update=t$16.throwInstantiationError,r$r.prototype.getBoundingSphere=t$16.throwInstantiationError,r$r.prototype.isDestroyed=t$16.throwInstantiationError,r$r.prototype.destroy=t$16.throwInstantiationError;var e$t={StopPause:"StopPause",StopAround:"StopAround"},A$q=Object.freeze(e$t);function e$s(e){this._duration=u$_(e.duration,10),this._waitTime=u$_(e.waitTime,0),this._point=e.point,this._heading=u$_(e.heading,0),this._tilt=u$_(e.tilt,0),this._stopName=e.stopName,this._speed=u$_(e.speed,0),this._stopPlayMode=e.stopPlayMode||A$q.StopPause,this._surroundDuration=u$_(e.surroundDuration,0),this._promise=void 0,this._index=u$_(e.index,0),this._nextStopIndex=void 0,this._preStopIndex=void 0,this._isConvert=u$_(e.isConvert,!0)}Object.defineProperties(e$s.prototype,{duration:{get:function(){return this._duration},set:function(e){e&&(this._duration=e)}},waitTime:{get:function(){return this._waitTime},set:function(e){e&&!this._isGenerated&&(this._waitTime=e)}},heading:{get:function(){return this._heading},set:function(e){e&&(this._heading=e)}},tilt:{get:function(){return this._tilt},set:function(e){e&&(this._tilt=e)}},stopName:{get:function(){return this._stopName},set:function(e){e&&(this._stopName=e)}},point:{get:function(){return this._point},set:function(e){this._point=e}},speed:{get:function(){return this._speed},set:function(e){e&&(this._speed=e)}},stopPlayMode:{get:function(){return this._stopPlayMode},set:function(e){e&&(this._stopPlayMode=e)}},surroundDuration:{get:function(){return this._surroundDuration},set:function(e){e&&(this._surroundDuration=e)}},index:{get:function(){return this._index}},promise:{get:function(){return this._promise},set:function(e){e&&(this._promise=e)}}});var e$r={Smoothly:0,Directly:1},v$p=Object.freeze(e$r),n$l={Playing:0,Pause:1,Stop:2,Wait:3},m$l;function l$r(e){var t=e.scene,i=e.routes;if(!t)throw new t$16("scene is required!");if(!i)throw new t$16("routes is required!");this._routes=i,this._scene=t,this._currentStopIndex=0,this._dynamicCurrentStopIndex=0,this._currentTween=void 0,this._stopArrived=new o$1h,this._playRate=1,this._flyStatus=n$l.Stop,this._turningMode=v$p.Smoothly,this._interpolationMode=j$13.NONE}function c$i(e,t,i){e._flyStatus=n$l.Playing;var n=e._scene.camera,r=e._routes.routes[0],o=r._catmullRomSpline,a=e._interpolationMode,s=r.isFlyLoop,l=r.isHeadingFree,u=r.isTiltFree,c=r.isAltitudeFree,h=u$_(r._stopCollection.get(t),r._stopCollection._array[t]);if(!h)return!0===s?(t=r._stopCollection._array[0].index,e$2b(o)&&(o._lastTimeIndex=0),e._dynamicCurrentStopIndex=t,e.currentStopIndex=t,void c$i(e,t)):void(e._flyStatus=n$l.Stop);if(t===e.currentStopIndex){var d=r.isAlongline&&e$2b(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};n.setView({destination:h.point,orientation:d,convert:h._isConvert}),t++,c$i(e,t)}else{if(h._bImmediately){d=r.isAlongline&&e$2b(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};return n.setView({destination:h.point,orientation:d,convert:h._isConvert}),void g$v(e,h,t)}var f=u$_(r._stopCollection.get(t-1),r._stopCollection.get(h._preStopIndex));e$2b(i)&&(f=i);var p,_=f.altitude<h.altitude?f.altitude:h.altitude;if(f.stopPlayMode===A$q.StopAround)p=f.surroundDuration;else{if(e$2b(i)){var m=o$1p.distance(i.point,h.point);f.duration=m/f.speed}p=f.duration}p/=e._playRate;d=r.isAlongline&&e$2b(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};var g=!1;if(e._turningMode===v$p.Directly&&e$2b(f.direction)){d={direction:f.direction,up:f.up};g=!0}n.flyTo({convert:h._isConvert,destination:h.point,orientation:d,maximumHeight:_,duration:p,headingFree:l,pitchFree:u,altitudeFree:c,directTurning:g,catmullRomSpline:o,preStopIndex:t-1,interpolationMode:a,easingFunction:m$W.LINEAR_NONE,complete:function(){g$v(e,h,t)}})}}function g$v(e,t,i){if(m$l&&clearTimeout(m$l),e._dynamicCurrentStopIndex=t._index,i=u$_(t._nextStopIndex,t._index+1),e._stopArrived.raiseEvent(t),t.promise)o$1l(t.promise,(function(){var n=t.waitTime;n>0?setTimeout((function(){c$i(e,i)}),1e3*n):c$i(e,i)}));else{var n=t.waitTime;n>0?(e._flyStatus=n$l.Wait,m$l=setTimeout((function(){e._flyStatus===n$l.Wait&&(e._flyStatus=n$l.Playing,c$i(e,i))}),1e3*n)):c$i(e,i)}}function f$p(e){e=e||{},this._stopCollection=new e$1N,this._isStopVisible=u$_(e.isStopVisible,!1),this._stopMarkCollection=[],this._isFlyLoop=u$_(e.isFlyLoop,!1),this._isLineVisible=u$_(e.isLineVisible,!1),this._lineEntity=void 0,this._routeName=u$_(e.routeName,""),this._speed=u$_(e.speed,50),this._isAlongline=u$_(e.isAlongline,!1),this._totalDuration=u$_(e.totalDuration,0),this._isHeadingFree=!this._isAlongline&&u$_(e.isHeadingFree,!1),this._isTiltFree=u$_(e.isTiltFree,!1),this._isAltitudeFree=u$_(e.isAltitudeFree,!1),this._entityCollection=e.entityCollection,this._catmullRomSpline=void 0,this._isCleared=!1,this._stopsInfo=u$_(e.stopsInfo,{}),this._removeIndex=[],this._addedStops=[]}function d$x(e){this._entityCollection=e,this._routes=[],this._ready=!1,this._readyPromise=o$1l.defer()}function p$i(e,t){for(var i=e,n=t.firstChild,r=n.namespaceURI,o=h$p(n,"route",r),a=0,s=o.length;a<s;a++){var l=o[a],u=h$p(l,"routestop",r),c=I$s(l,"speed"),h=O$i(l,"name"),d=l$q(l,"showroutestop"),f=l$q(l,"showrouteline"),p=l$q(l,"flycircle"),_=l$q(l,"alongline"),m=l$q(l,"headingfree"),g=l$q(l,"tiltfree"),x=l$q(l,"altitudefree"),v=new f$p({entityCollection:i._entityCollection,routeName:h,speed:c,isLineVisible:f,isFlyLoop:p,isStopVisible:d,isAlongline:_,isHeadingFree:m,isTiltFree:g,isAltitudeFree:x,stopsInfo:{stopNodes:u,namespace:r}});v.init(),i.addRoute(v),i._ready=!0}i._readyPromise.resolve()}function I$s(e,t){if(e$2b(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function O$i(e,t){if(e$2b(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function l$q(e,t){if(e$2b(e)){var i=e.getAttribute(t);if("false"===(i=i.toLowerCase()))return!1;if("true"===i)return!0}}function h$p(e,t,i){if(!e$2b(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}function o$t(){this.Name="",this.NumParts=0,this.NumPoints=0,this.Parts=[],this.Points=[],this.Description="",this.Color=new e$1U(1,1,1),this.Radius=.02}function z$n(e,t){this.a0=80,this.r=35.187*.001,e$2b(t)?(this.a0=e,this.r=t,this.m_sag=new d$w(e,t)):e$2b(e)&&(this.m_sag=new d$w(e)),this.enuCenters=[]}Object.defineProperties(l$r.prototype,{routes:{get:function(){return this._routes},set:function(e){e&&(this._routes=e)}},stopArrived:{get:function(){return this._stopArrived}},currentStopIndex:{get:function(){return e$2b(this._routes.routes[0]._stopCollection.get(this._currentStopIndex))||(this._dynamicCurrentStopIndex=this._currentStopIndex=this._routes.routes[0]._stopCollection._array[0].index),this._currentStopIndex},set:function(e){if(e$2b(e)&&1==this._routes.ready){var t=this._routes.routes[0].stopCollection.length-1;e=(e=e>t?t:e)<0?0:e,this._currentStopIndex=e}}},currentRoute:{get:function(){if(this._routes.ready)return this._routes.routes[0]}},readyPromise:{get:function(){return this._routes.readyPromise}},playRate:{get:function(){return this._playRate},set:function(e){if(e&&0!==e&&this._playRate!==e&&(this._playRate=e,this._flyStatus===n$l.Playing)){this._scene.camera.cancelFlight();var t=this._routes.routes[0].get(this._dynamicCurrentStopIndex),i=new e$s({});for(var n in t)i[n]=t[n];i.point=this._scene.camera._position,c$i(this,this._dynamicCurrentStopIndex+1,i)}}},turningMode:{get:function(){return this._turningMode},set:function(e){this._turningMode=e}},interpolationMode:{get:function(){return this._interpolationMode},set:function(e){this._interpolationMode=e}}}),l$r.prototype.play=function(){if(this.currentRoute&&this._flyStatus!==n$l.Playing)if(this._flyStatus===n$l.Pause||this._flyStatus===n$l.Wait)this._currentTween&&this._scene.camera._currentFlight?(this._currentTween.tweenjs.endPause(),this._flyStatus=n$l.Playing):c$i(this,this._dynamicCurrentStopIndex+1);else{if(this.currentStopIndex>=this._routes.routes[0].stopCollection[this._routes.routes[0].stopCollection.length-1].index)return void(this._flyStatus=n$l.Stop);c$i(this,this.currentStopIndex)}},l$r.prototype.pause=function(){this._flyStatus===n$l.Playing?(this._currentTween=this._scene.camera._currentFlight,this._currentTween&&this._currentTween.tweenjs&&this._currentTween.tweenjs.pause(),this._flyStatus=n$l.Pause):this._flyStatus===n$l.Wait&&(this._flyStatus=n$l.Pause)},l$r.prototype.stop=function(){this._currentTween=this._scene.tweens.get(0),this._currentTween&&this._flyStatus!==n$l.Stop?(this._currentTween.cancelTween(),this._flyStatus=n$l.Stop,this._currentTween=void 0):this._flyStatus===n$l.Wait&&(this._flyStatus=n$l.Stop),this._dynamicCurrentStopIndex=this._currentStopIndex},l$r.prototype.viewToStop=function(e){if(e&&this._flyStatus!==n$l.Playing){var t=this._scene.camera,i={heading:e.heading,pitch:e.tilt,roll:0};t.setView({destination:e.point,orientation:i,convert:e._isConvert}),this._dynamicCurrentStopIndex=e.index}},l$r.prototype.getAllRouteStops=function(){return this.currentRoute?this.currentRoute.stopCollection:[]},Object.defineProperties(f$p.prototype,{stopCollection:{get:function(){return this._stopCollection.values}},isStopVisible:{get:function(){return this._isStopVisible},set:function(e){e$2b(e)&&e!==this._isStopVisible&&(this._isStopVisible=e,this.setStopVisible())}},isFlyLoop:{get:function(){return this._isFlyLoop},set:function(e){e&&(this._isFlyLoop=e)}},isLineVisible:{get:function(){return this._isLineVisible},set:function(e){e$2b(e)&&e!==this._isLineVisible&&(this._isLineVisible=e,this.setLineVisible())}},lineEntity:{get:function(){return this._lineEntity},set:function(e){e$2b(e)&&(this._lineEntity=e)}},routeName:{get:function(){return this._routeName},set:function(e){e&&(this._routeName=e)}},speed:{get:function(){return this._speed},set:function(e){if(e&&e!=this._speed){this._speed=e;for(var t=this.speed,i=this.stopCollection,n=0,r=i.length;n<r-1;n++){var o=i[n];o.duration=Math.ceil(o.distanceToNext/t)}}}},stopCount:{get:function(){return this._stopCollection.length}},isAlongline:{get:function(){return this._isAlongline},set:function(e){e$2b(e)&&(this._isAlongline=e)}},totalDuration:{get:function(){return this._totalDuration}},isHeadingFree:{get:function(){return this._isHeadingFree},set:function(e){e$2b(e)&&(this._isHeadingFree=e)}},isTiltFree:{get:function(){return this._isTiltFree},set:function(e){e$2b(e)&&(this._isTiltFree=e)}},isAltitudeFree:{get:function(){return this._isAltitudeFree},set:function(e){e$2b(e)&&(this._isAltitudeFree=e)}}}),f$p.prototype.init=function(){var e=0,t=[0],i=[],n=this._stopsInfo.stopNodes,r=this._stopsInfo.namespace;n=e$2b(n)?n.concat(this._addedStops):this._addedStops;for(var o=0;o<n.length;o++)if(!(this._removeIndex.indexOf(o)>-1)){var a,s=n[o];if(s instanceof e$s){if(-1!==(a=s)._preStopIndex){var l=(S=this._stopCollection._array[a._preStopIndex]).point,u=o$1p.distance(l,a.point);S.distanceToNext=u}}else{var c=s$S.queryFirstNode(s,"camera",r),h=s$S.queryNumericValue(c,"longitude",r),d=s$S.queryNumericValue(c,"latitude",r),f=s$S.queryNumericValue(c,"altitude",r),p=s$S.queryNumericValue(c,"heading",r);p=e$2a.toRadians(p);var _=s$S.queryNumericValue(c,"tilt",r);_=e$2a.toRadians(_-90),s$S.queryStringValue(c,"altitudeMode",r);var m,g=s$S.queryStringAttribute(s,"name"),x=s$S.queryNumericAttribute(s,"speed",r),v=s$S.queryFirstNode(s,"setting",r),y=s$S.queryStringValue(v,"stopPlayMode",r),$=s$S.queryNumericValue(v,"pauseTime",r),b=s$S.queryNumericValue(v,"angularSpeed",r),T=s$S.queryFirstNode(v,"stopViews",r),C=!0;h>180||d>180?(m=new o$1p(h,d,f),C=!1):m=o$1p.fromDegrees(h,d,f),i.push(m);var S,w=this.stopCount;if(o>0&&w>0)if((S=this._stopCollection._array[this._stopCollection.length-1]).stopPlayMode!=A$q.StopAround){l=S.point,u=o$1p.distance(l,m);S.distanceToNext=u;var E,P=S.speed;E=0<P?P:this._speed,S.duration=u/E,S.speed=E,e+=S.duration,t.push(e)}(a=new e$s({index:o,point:m,heading:p,tilt:_,stopName:g,waitTime:$,speed:x,isConvert:C})).altitude=f}if(this._addStop(a),e$2b(S)&&(S._nextStopIndex=o,a._preStopIndex=S.index),y===A$q.StopAround&&T){var A=queryChildNodes(T,"view",r);if(2==A.length){var L=A[0],M=A[1],R=s$S.queryNumericAttribute(L,"heading",r),I=s$S.queryNumericAttribute(M,"heading",r);s$S.queryNumericAttribute(L,"tilt",r),s$S.queryNumericAttribute(M,"tilt",r),s$S.queryNumericAttribute(L,"altitude",r),s$S.queryNumericAttribute(M,"altitude",r);var O=s$S.queryStringAttribute(L,"direction",r);s$S.queryStringAttribute(M,"direction",r);var D,B="Clockwise"===O?1:-1;e$2a.equalsEpsilon(R,I,e$2a.EPSILON15)?D=360:((D=I-R)<0&&"Clockwise"===O?D+=360:D>0&&"Clockwise"!==O&&(D=360-D),D=Math.abs(D));var N=D/b;a.surroundDuration=N/3,a.stopPlayMode=A$q.StopAround;var F=e$2a.toRadians(R),U=e$2a.toRadians(R+B*D/3),z=e$2a.toRadians(R+B*D*2/3),G=e$2a.toRadians(I),V=new e$s({point:m,heading:F,tilt:_,stopName:g,waitTime:$,speed:x,surroundDuration:N/3,stopPlayMode:A$q.StopAround});V._bImmediately=!0,V._isGenerated=!0,this._addStop(V);var k=new e$s({point:m,heading:U,tilt:_,stopName:g,waitTime:0,speed:x,surroundDuration:N/3,stopPlayMode:A$q.StopAround});k._isGenerated=!0,this._addStop(k);var W=new e$s({point:m,heading:z,tilt:_,stopName:g,waitTime:0,speed:x,surroundDuration:N/3,stopPlayMode:A$q.StopAround});W._isGenerated=!0,this._addStop(W);var H=new e$s({point:m,heading:G,tilt:_,stopName:g,waitTime:$,speed:x});this._addStop(H),e+=N}}}for(var q=0;q<this.stopCount-1;q++){var j=this.stopCollection[q],Y=this.stopCollection[q+1],X=new o$1p(Y.point.x-j.point.x,Y.point.y-j.point.y,Y.point.z-j.point.z);X.equals(o$1p.ZERO)||(o$1p.normalize(X,X),j.direction=X,j.up=m$17.buildUp(j.point,X),this._isTiltFree&&(j.heading=m$17.getHeading(j.direction,j.up)-e$2a.PI))}if(this.stopCount>2){var K=this.stopCollection[this.stopCollection.length-1],Q=this.stopCollection[this.stopCollection.length-2];K.direction=Q.direction,K.up=Q.up,this._isTiltFree&&(K.heading=m$17.getHeading(K.direction,K.up)-e$2a.PI)}i.length>=2&&(this._catmullRomSpline=new c$K({times:t,points:i})),this.setStopVisible(),this._totalDuration=e},f$p.prototype._addStop=function(e){if(!e)throw new t$16("parameter stop is required!");if(!(e instanceof e$s))throw new t$16("parameter stop must be instanceof RouteStop!");if(this._stopCollection.set(e.index,e),e$2b(this._entityCollection)&&this._isStopVisible){var t=this._entityCollection.add({position:e.point,billboard:{image:n$15("Assets/Textures/maki/grepin.png"),scale:.5}});this._stopMarkCollection.push(t)}if(this._isCleared&&this._stopCollection.length>2)if(e$2b(this._catmullRomSpline)){var i=[].concat(this._catmullRomSpline.times),n=[].concat(this._catmullRomSpline.points),r=this._stopCollection.length>0?this._stopCollection._array[this._stopCollection.length-2]._duration:0,o=i.length>0?i[i.length-1]:0;i.push(o+r),n.push(e.point),this._catmullRomSpline=new c$K({times:i,points:n})}else{for(var a=[0],s=[this._stopCollection._array[0].point],l=0,u=1;u<this._stopCollection.length;u++){var c=this._stopCollection._array[u],h=this._stopCollection._array[u-1];s.push(c.point),l+=h.duration,a.push(l)}this._catmullRomSpline=new c$K({times:a,points:s})}return!0},f$p.prototype.addStop=function(e){if(!e)throw new t$16("parameter stop is required!");if(!(e instanceof e$s))throw new t$16("parameter stop must be instanceof RouteStop!");e._preStopIndex=this._stopsInfo.stopNodes.length+this._addedStops.length-1,e._index=e._preStopIndex+1,this._addedStops.push(e),this.clear(),this.init(),this.setLineVisible()},f$p.prototype.removeStop=function(e){this.clear(),-1===this._removeIndex.indexOf(e.index)&&this._removeIndex.push(e.index),this.init(),this.setLineVisible()},f$p.prototype.setLineVisible=function(){if(e$2b(this._entityCollection)){if(!e$2b(this._lineEntity)){for(var e=this.stopCollection,t=e.length,i=[];t--;)i.push(e[t].point);this._lineEntity=this._entityCollection.add({name:this.routeName,polyline:{positions:i,width:5}})}this._lineEntity.show=this._isLineVisible}},f$p.prototype.setStopVisible=function(){if(e$2b(this._entityCollection)){if(0===this._stopMarkCollection.length&&this._isStopVisible)for(var e=this.stopCollection,t=e.length;t--;){var i=e[t],n=this._entityCollection.add({position:i.point,billboard:{image:n$15("Assets/Textures/maki/grepin.png"),scale:.5}});this._stopMarkCollection.push(n)}for(var r=0,o=this._stopMarkCollection.length;r<o;r++){(n=this._stopMarkCollection[r]).show=this._isStopVisible}}},f$p.prototype.get=function(e){return void 0===this._stopCollection.get(e)?this.stopCollection[e]:this._stopCollection.get(e)},f$p.prototype.clear=function(){this._isCleared=!0;for(var e=0;e<this._stopMarkCollection.length;e++)this._entityCollection.remove(this._stopMarkCollection[e]);e$2b(this._lineEntity)&&(this._entityCollection.remove(this._lineEntity),this._lineEntity=void 0),this._stopCollection.removeAll(),e$2b(this._catmullRomSpline)&&(this._catmullRomSpline=void 0)},Object.defineProperties(d$x.prototype,{routes:{get:function(){return this._routes}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}}}),d$x.prototype.addRoute=function(e){if(e&&(this._routes.push(e),e.isLineVisible&&e$2b(this._entityCollection))){for(var t=e.stopCollection,i=t.length,n=[];i--;)n.push(t[i].point);e.lineEntity=this._entityCollection.add({name:e.routeName,polyline:{positions:n,width:5}})}},d$x.prototype.get=function(e){return this._routes[e]},d$x.prototype.fromFile=function(e){var t=this;o$1l(d$1f(e),(function(e){p$i(t,e)}),(function(){t._readyPromise.reject()}))},d$x.prototype.fromXML=function(e){if(!e$2b(e))throw new t$16("xml content is required to create routes!");var t=(new DOMParser).parseFromString(e,"text/xml");try{p$i(this,t)}catch(e){throw new t$16(e)}},o$t.prototype.Clone=function(){var e=new o$t;if(e.Name=this.Name,e.Description=this.Description,e.NumParts=this.NumParts,e.NumPoints=this.NumPoints,e.Color=this.Color,e.Radius=this.Radius,null!=this.Parts){for(var t=[],i=0;i<this.Parts.length;i++)t.push(this.Parts[i]);e.Parts=t}e.Points=[];for(i=0;i<this.NumPoints;i++)e.Points[i]=new o$1p,e.Points[i].x=this.Points[i].x,e.Points[i].y=this.Points[i].y,e.Points[i].z=this.Points[i].z;return e},o$t.prototype.ComputeBox=function(e,t){e=new o$1p(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),t=new o$1p(Number.MIN_VALUE,Number.MIN_VALUE,Number.MIN_VALUE);for(var i=0,n=this.Points.length;i<n;i++){var r=this.Points[i];e.x>r.x&&(e.x=r.x),e.y>r.y&&(e.y=r.y),e.z>r.z&&(e.z=r.z),t.x<r.x&&(t.x=r.x),t.y<r.y&&(t.y=r.y),t.z<r.z&&(t.z=r.z)}},z$n.enuCenter=void 0;var M$p={sh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-e))/2},arsh:function(e){return Math.log(e+Math.sqrt(e*e+1),Math.E)}};function N$g(e){return new o$1p(parseFloat(e.x)||0,parseFloat(e.y)||0,parseFloat(e.z)||0)}z$n.prototype.GetPowerline=function(e){if(!e instanceof o$t||null==e.Points||e.Points.Length<2)return null},z$n.prototype.gernerateCatenarylines=function(e){if(!(e.points instanceof Array&&e$2b(e.points[0].begin)&&e$2b(e.points[0].end)))throw new t$16("options.points is required and must like [{begin : 0, end : 1}, {begin : 1, end : 2}]");for(var t=[],i=u$_(e.imageUrl,""),n=u$_(e.imageRepeat,new o$1o(30,1)),r=u$_(e.imageTransparent,!1),o=u$_(e.volumeDisplayCondition,new o$1o(0,500)),a=u$_(e.lineDisplayCondition,new o$1o(500,5e4)),s=u$_(e.lineColor,e$1U.WHITE),l=0,u=e.points.length;l<u;l++){var c=e.points[l].begin,h=e.points[l].end;c=N$g(c),h=N$g(h);var d=this.InsertTwoPoints(c,h),f=[],p=null,_=o$1p.fromDegrees(d[0].x,d[0].y,d[0].z);if(0===this.enuCenters.length)this.enuCenters.push(_),p=this.enuCenters[0];else{for(var m=0;m<this.enuCenters.length;m++)if(o$1p.distance(this.enuCenters[m],_)<1e4){p=this.enuCenters[m];break}e$2b(p)||(p=_,this.enuCenters.push(_))}for(var g=0;g<d.length;g++){var x=o$1p.fromDegrees(d[g].x,d[g].y,d[g].z);f.push(x)}if(f.length>1){var v=new h$V({polylineVolume:new e$1k({positions:f,enuCenter:p,shape:U$l(this.r),material:new a$R({image:i,repeat:n,transparent:r}),distanceDisplayCondition:new r$Y(o.x,o.y)}),polyline:new a$L({positions:f,distanceDisplayCondition:new r$Y(a.x,a.y),width:2,material:s})});t.push(v)}}return t};var q$l={};function U$l(e){if(e$2b(q$l["_"+e]))return q$l["_"+e];for(var t=[],i=0;i<360;){var n=e$2a.toRadians(i);t.push(new o$1o(e*Math.cos(n),e*Math.sin(n))),i+=11.25}return q$l["_"+e]=t,t}function T$m(e,t,i,n){return.5*n-e/t*M$p.arsh(t*i/(2*e*M$p.sh(t*n/(2*e))))}function H$t(e,t,i){return e*e+t*t+i*i}function S$m(e,t,i){return Math.sqrt(H$t(e,t,i))}function J$f(e,t,i){var n=S$m(e,t,i);return new o$1p(e/n,t/n,i/n)}function O$h(e,t,i){e*=Math.PI/180,t*=Math.PI/180;var n=i*Math.cos(e);return new o$1p(n*Math.cos(t),n*Math.sin(t),i*Math.sin(e))}function D$m(e){new o$1p;return O$h(e.y,e.x,e.z+6378137)}function d$w(e,t){this.l=0,this.h=0,e$2b(t)?(this.a0=e,this.r=t,this.k=Q$j(e,t)):(this.k=e,this.a0=0,this.r=0)}function Q$j(e,t){return t*Math.pow(10,5)/(8*e)}function i$q(){this.init()}function i$p(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function i$o(e){e=parseFloat(e)||0,this.init(e)}function r$q(e,t){e=parseFloat(e)||0,t=parseFloat(t)||0,this._vertex=void 0,this._rotateOrigin=O$I.CENTER,this.init(e,t)}function i$n(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function i$m(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function t$j(){this.init()}function e$q(e){e=e||{},this.init(e)}function e$p(e){e=parseFloat(e)||0,this.init(e)}z$n.prototype.InsertTwoPoints=function(e,t){if(!(e instanceof o$1p&&t instanceof o$1p))throw new t$16("startPos and endPos must be Cartesian3!");if(e.x==t.x&&e.y==t.y&&e.z==t.z)return[new o$1p(e.x,e.y,e.z)];var i=D$m(e),n=D$m(t),r=o$1p.subtract(n,i,new o$1p),o=o$1p.magnitude(r),a=Math.max(Math.floor(o/10),2);a=a%2==0?a:a+1;var s=new Array(a+2),l=t.z-e.z,u=l/o,c=Math.sqrt(1-u*u)||1;T$m(this.a0,this.r,l,o*c);var h=o/(a+1);this.m_sag.l=o*c,this.m_sag.h=l;for(var d=0;d<=a+1;d++){var f=new o$1p((t.x-e.x)*d/(a+1),(t.y-e.y)*d/(a+1),(t.z-e.z)*d/(a+1));if(s[d]=new o$1p(e.x+f.x,e.y+f.y,e.z+f.z),0!=d||d!=this.segments+1){var p=h*d;this.m_sag.fx(p*c),s[d].z=s[d].z-this.m_sag.fx(p*c)}}return s},z$n.prototype.CalcPoint=function(e,t,i){var n=D$m(e),r=D$m(t),o=new o$1p(r.x-n.x,r.y-n.y,r.z-n.z),a=Math.sqrt(o.x*o.x+o.y*o.y+o.z*o.z),s=null,l=t.z-e.z,u=l/a,c=Math.sqrt(1-u*u);T$m(this.a0,this.r,l,a*c),this.m_sag.l=a*c,this.m_sag.h=l;var h=i/this.m_sag.l,d=new o$1p(t.x-e.x,t.y-e.y,t.z-e.z);o=new o$1p((d=J$f(d.x,d.y,d.z)).x*a*h,d.y*a*h,d.z*a*h);return(s=new o$1p(e.x+o.x,e.y+o.y,e.z+o.z)).z=s.z-this.m_sag.fx(i),s},d$w.prototype.fx=function(e){var t=8*Math.pow(10,-5)*this.k,i=this.Loa();return e*(this.h/this.l)+2/t*(M$p.sh(t*(2*i-e)/2)*M$p.sh(t*e/2))},d$w.prototype.Loa=function(){var e=8*Math.pow(10,-5)*this.k;return.5*this.l-1/e*M$p.arsh(this.h*e/2/M$p.sh(e*this.l/2))},i$q.prototype=new o$11,i$q.prototype.constructor=i$q,Object.defineProperties(i$q.prototype,{geoImagePath:{get:function(){return this.imagePath},set:function(e){"string"==typeof e&&(this.imagePath=e,this.billboard.image=e)}},geoWidth:{get:function(){return this.width},set:function(e){"number"==typeof e&&(this.width=e,this.billboard.width=e)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.billboard.height=e)}}}),i$q.prototype.init=function(){this.type=P$U.GEOBILLBOARD,this.height=100,this.width=100,this.imagePath="",this.billboard={image:"",width:100,height:100}},i$p.prototype=new o$11,i$p.prototype.constructor=i$p,Object.defineProperties(i$p.prototype,{geoLength:{get:function(){return this.length},set:function(e){"number"==typeof e&&(this.length=e,this.box.dimensions.x=e,this._isGeometryDirty=!0)}},geoWidth:{get:function(){return this.width},set:function(e){"number"==typeof e&&(this.width=e,this.box.dimensions.y=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.box.dimensions.z=e,this._isGeometryDirty=!0)}}}),i$p.prototype.init=function(e,t,i){this.type=P$U.GEOBOX,this.length=e,this.width=t,this.height=i,this.box={dimensions:new o$1p(e,t,i),vertexFormat:n$11.POSITION_NORMAL_AND_ST}},i$p.prototype.isValid=function(){return this.length>0&&this.width&&this.height>0},i$p.prototype._createGeometry=function(){let e=O$y.fromDimensions(this.box);this._geometry=O$y.createGeometry(e),this._isGeometryDirty=!1,this._vertexBuffer&&!this._vertexBuffer.isDestroyed()&&(this._vertexBuffer=this._vertexBuffer.destroy())},i$p.prototype.getCenter=function(){return new s$M(this.position.x,this.position.y,this.position.z+this.height/2)},i$p.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(24);t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,t[8]=4,t[9]=5,t[10]=5,t[11]=6,t[12]=6,t[13]=7,t[14]=7,t[15]=4,t[16]=1,t[17]=5,t[18]=2,t[19]=6,t[20]=0,t[21]=4,t[22]=3,t[23]=7;let i=t$Y.createIndexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),n=[];return n.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$12({context:e,attributes:n,indexBuffer:i})},i$o.prototype=new o$11,i$o.prototype.constructor=i$o,Object.defineProperties(i$o.prototype,{geoRadius:{get:function(){return this.radius},set:function(e){"number"==typeof e&&(this.radius=e,this.ellipse.semiMinorAxis=e,this.ellipse.semiMajorAxis=e)}}}),i$o.prototype.init=function(e){this.type=P$U.GEOCIRCLE3D,this.radius=e,this.ellipse={semiMinorAxis:e,semiMajorAxis:e}},i$o.prototype.isValid=function(){return this.radius>0},i$o.prototype.getCenter=function(){return new Point3D(this.position.x,this.position.y,this.position.z)},r$q.prototype=new o$11,r$q.prototype.constructor=r$q,Object.defineProperties(r$q.prototype,{geoBottomRadius:{get:function(){return this.bottomRadius},set:function(e){"number"==typeof e&&(this.bottomRadius=e,this.cylinder.bottomRadius=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.cylinder.length=e,this._isGeometryDirty=!0)}},rotateOrigin:{get:function(){return this._rotateOrigin},set:function(e){o$1q.typeOf.number("GeoCone rotateOrigin",e),this._rotateOrigin=e}}}),r$q.prototype.init=function(e,t){this.type=P$U.GEOCONE,this.height=t,this.bottomRadius=e,this.cylinder={length:t,topRadius:0,bottomRadius:e,vertexFormat:n$11.POSITION_NORMAL_AND_ST}},r$q.prototype.clone=function(){return new r$q(this.bottomRadius,this.height)},r$q.prototype._createGeometry=function(){var e=new l$Q(this.cylinder);this._geometry=l$Q.createGeometry(e),this._vertex=o$1p.fromDegrees(this.position.x,this.position.y,this.position.z+this.height/2),this._isGeometryDirty=!1},r$q.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(768),i=0;for(let e=0;e<256;e+=2)t[i++]=e,t[i++]=e+1,t[i++]=e,t[i++]=e+2,t[i++]=e+1,t[i++]=e+3;t[i-1]=1;let n=t$Y.createIndexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),r=[];return r.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$12({context:e,attributes:r,indexBuffer:n})},i$n.prototype=new o$11,i$n.prototype.constructor=i$n,Object.defineProperties(i$n.prototype,{geoTopRadius:{get:function(){return this.topRadius},set:function(e){"number"==typeof e&&(this.topRadius=e,this.cylinder.topRadius=e,this._isGeometryDirty=!0)}},geoBottomRadius:{get:function(){return this.bottomRadius},set:function(e){"number"==typeof e&&(this.bottomRadius=e,this.cylinder.bottomRadius=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.cylinder.length=e,this._isGeometryDirty=!0)}}}),i$n.prototype.init=function(e,t,i){this.type=P$U.GEOCYLINDER,this.height=i,this.topRadius=e,this.bottomRadius=t,this.cylinder={length:i,topRadius:e,bottomRadius:t,vertexFormat:n$11.POSITION_NORMAL_AND_ST}},i$n.prototype.clone=function(){return new i$n(this.topRadius,this.bottomRadius,this.height)},i$n.prototype._createGeometry=function(){var e=new l$Q(this.cylinder);this._geometry=l$Q.createGeometry(e),this._isGeometryDirty=!1},i$n.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(768),i=0;for(let e=0;e<256;e+=2)t[i++]=e,t[i++]=e+1,t[i++]=e,t[i++]=e+2,t[i++]=e+1,t[i++]=e+3;t[i-1]=1;let n=t$Y.createIndexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),r=[];return r.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$12({context:e,attributes:r,indexBuffer:n})},i$m.prototype=new o$11,i$m.prototype.constructor=i$m,Object.defineProperties(i$m.prototype,{geoXAxis:{get:function(){return this.xAxis},set:function(e){"number"==typeof e&&(this.xAxis=e,this.ellipsoid.radii.x=e,this._isGeometryDirty=!0)}},geoYAxis:{get:function(){return this.yAxis},set:function(e){"number"==typeof e&&(this.yAxis=e,this.ellipsoid.radii.z=e,this._isGeometryDirty=!0)}},geoZAxis:{get:function(){return this.zAxis},set:function(e){"number"==typeof e&&(this.zAxis=e,this.ellipsoid.radii.y=e,this._isGeometryDirty=!0)}}}),i$m.prototype.init=function(e,t,i){this.type=P$U.GEOELLIPSOID,this.xAxis=e,this.yAxis=t,this.zAxis=i,this.ellipsoid={radii:new o$1p(e,i,t),vertexFormat:n$11.POSITION_NORMAL_AND_ST}},i$m.prototype.isValid=function(){return this.xAxis>0&&this.yAxis&&this.zAxis>0},i$m.prototype.getCenter=function(){return new s$M(this.position.x,this.position.y,this.position.z+this.zAxis)},i$m.prototype._createGeometry=function(){var e=new b$P(this.ellipsoid);this._geometry=b$P.createGeometry(e),this._isGeometryDirty=!1},i$m.prototype.getOutlineVertexArray=function(e){this._getGeometry();let t=0,i=new Uint16Array(17956);for(let e=0;e<67;e++){var n=67*e;for(let e=0;e<66;e++)i[t++]=n+e,i[t++]=n+e+1}for(let e=0;e<67;e++)for(let n=0;n<65;n++)i[t++]=67+e+67*n,i[t++]=67+e+67*(n+1);let r=t$Y.createIndexBuffer({context:e,typedArray:i,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),o=[];return o.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$12({context:e,attributes:o,indexBuffer:r})},t$j.prototype=new o$11,t$j.prototype.constructor=t$j,t$j.prototype.parent=o$11.prototype,Object.defineProperties(t$j.prototype,{geoFilePath:{get:function(){return this.modelUrl},set:function(e){"string"==typeof e&&(this.modelUrl=e)}},geoModel:{get:function(){return this._geoModel},set:function(e){this._geoModel=e}}}),t$j.prototype.init=function(){this.modelUrl="",this._geoModel=void 0,this.type=P$U.GEOMODEL3D},e$q.prototype=new o$11,e$q.prototype.constructor=e$q,e$q.prototype.parent=o$11.prototype,Object.defineProperties(e$q.prototype,{X:{get:function(){return this.x},set:function(e){"number"==typeof e&&(this.x=e)}},Y:{get:function(){return this.y},set:function(e){"number"==typeof e&&(this.y=e)}},Z:{get:function(){return this.z},set:function(e){"number"==typeof e&&(this.z=e)}}}),e$q.prototype.init=function(e){this.x=u$_(e.x,0),this.y=u$_(e.y,0),this.z=u$_(e.z,0),this.type=P$U.GEOPOINT3D},e$p.prototype=new o$11,e$p.prototype.constructor=e$p,Object.defineProperties(e$p.prototype,{geoRadius:{get:function(){return this.radius},set:function(e){"number"==typeof e&&(this.radius=e,this.ellipsoid.radii.x=e,this.ellipsoid.radii.y=e,this.ellipsoid.radii.z=e,this.sphere.radius=e,this._isGeometryDirty=!0)}}}),e$p.prototype.init=function(e){this.type=P$U.GEOSPHERE,this.radius=e,this.ellipsoid={radii:new o$1p(e,e,e)},this.sphere={radius:e,vertexFormat:n$11.POSITION_NORMAL_AND_ST}},e$p.prototype.isValid=function(){return this.radius>0},e$p.prototype.getCenter=function(){return new s$M(this.position.x,this.position.y,this.position.z+this.radius)},e$p.prototype._createGeometry=function(){var e=new n$u(this.sphere);this._geometry=n$u.createGeometry(e),this._isGeometryDirty=!1},e$p.prototype.getOutlineVertexArray=function(e){this._getGeometry();let t=0,i=new Uint16Array(17956);for(let e=0;e<67;e++){var n=67*e;for(let e=0;e<66;e++)i[t++]=n+e,i[t++]=n+e+1}for(let e=0;e<67;e++)for(let n=0;n<65;n++)i[t++]=67+e+67*n,i[t++]=67+e+67*(n+1);let r=t$Y.createIndexBuffer({context:e,typedArray:i,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),o=[];return o.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$12({context:e,attributes:o,indexBuffer:r})};var xe$6=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function S$l(e,t){if(!e$2b(e)||!e$2b(t))throw new t$16("No viewer or box provided.");if(!e$2b(t.box))throw new t$16("Expected object to be a box.");this.handler=new g$J(e.scene.canvas),this.viewer=e,this.editEvt=new o$1h,this._distanceDisplayCondition=void 0,this._id=e$1Q(),re$b(this,t),te$8(this),this.activate()}function re$b(e,t){e.box=t,e.hpr=de$8(t),e.center=t.position.getValue(0),e.dimensions=t.box.dimensions.getValue(0),e._rotateCircleRadius=Math.max(Math.min(e.dimensions.x,e.dimensions.y)/7,.01),e._unifiedMoveBarLength=Math.max(Math.max(Math.max(e.dimensions.x,e.dimensions.y),e.dimensions.z)/6,.1),e._movePolygonDimension=e._rotateCircleRadius/2,e._moveBarXLength=e._unifiedMoveBarLength,e._moveBarYLength=e._unifiedMoveBarLength,e._moveBarZLength=e._unifiedMoveBarLength,e.isActive=!1,e._color=e$1U.WHITE.withAlpha(.1),e._lineColor=e$1U.fromCssColorString("rgba(250, 158, 62, 1)"),e._outlineColor=e$1U.fromCssColorString("rgba(1, 107, 185, 1)"),e._lineWidth=5,e._modelMatrix=m$17.headingPitchRollToFixedFrame(e.center,e.hpr),e._modelMatrixInverse=p$1d.inverse(e._modelMatrix,new p$1d),e._hoverColor=e$1U.RED,e._linesHover=[]}function de$8(e){if(!e$2b(e.orientation))return new i$15;var t=p$1e.fromQuaternion(e.orientation.getValue(0),new p$1e),i=p$1d.fromRotationTranslation(t,o$1p.ZERO,new p$1d),n=p$1d.inverse(m$17.eastNorthUpToFixedFrame(e.position.getValue(0)),new p$1d),r=p$1d.multiply(n,i,new p$1d),o=p$1d.getMatrix3(r,new p$1e);return i$15.fromQuaternion(n$13.fromRotationMatrix(o))}function te$8(e){var t=e;t.positions=be$a(t),t.polylines=new k$T({opaqueRS:d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}),modelMatrix:e._modelMatrix}),t.translucentPolylines=new k$T({translucentRS:d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}}),modelMatrix:e._modelMatrix}),t.translucentPolylines._canAlwaysPick=!0;for(var i=0;i<7;i++)t.polylines.add({id:"box-editor-prim"+i+e._id,width:t._lineWidth,positions:e.positions[i],material:r$X.fromType(r$X.ColorType,{color:t._lineColor})});for(i=0;i<7;i++)t.translucentPolylines.add({id:"box-editor-prim"+i+e._id,width:t._lineWidth,positions:e.positions[i],material:r$X.fromType(r$X.ColorType,{color:t._lineColor.withAlpha(.2)})});t.boundingBox=Be$7(t,"edit_box"),t.viewer.entities.add(t.boundingBox),t.viewer.scene.primitives.add(t.polylines),t.viewer.scene.primitives.add(t.translucentPolylines),t._polygon=new Z$j(t),t.viewer.scene.primitives.add(t._polygon)}function Z$j(e){this.editor=e,this.show=!0,this._color=e$1U.clone(e._lineColor),this._isCustomPolygon=!0}function ke$3(e,t,i){var n=new P$H({polygonHierarchy:{positions:e.positions[7]}}),r=P$H.createGeometry(n),o=p$1d.clone(e._modelMatrix);if(e.viewer.scene.mode===C$13.COLUMBUS_VIEW){var a=new n$1b,s=a.ellipsoid.cartesianToCartographic(e.center),l=a.project(s);p$1d.fromTranslation(l,o),p$1d.multiply(xe$6,o,o)}let u=[];var c=t$Y.createVertexBuffer({context:t,typedArray:S$12.createTypedArray(S$12.FLOAT,r.attributes.position.values),usage:A$19.STATIC_DRAW});u.push({index:0,vertexBuffer:c,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1,name:"aPosition"});var h=new c$12({context:t,attributes:u,indexBuffer:t$Y.createIndexBuffer({context:t,typedArray:r.indices,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})}),d=r$13.fromCache({name:"boxEditor",context:t,vertexShaderSource:"attribute vec4 aPosition;\nuniform vec4 uColor;\nuniform vec4 uPickColor;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n vColor = uColor;\n vPickColor = uPickColor;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",fragmentShaderSource:"varying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n gl_FragColor = vColor;\n}\n",attributeLocations:{aPosition:0}}),f=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:o,pass:Le$s.OPAQUE,owner:i});f.vertexArray=h,f.shaderProgram=d;var p={id:"box-editor-prim7"+e._id,primitive:i},_=t.createPickId(p);f.pickId="vPickColor",f.uniformMap={uColor:function(){return i._color},uPickColor:function(){return _.color}},f.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var m=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:o,pass:Le$s.OPAQUE+1,owner:i});m.vertexArray=h,m.shaderProgram=d;var g={id:"box-editor-prim7"+e._id,primitive:i},x=t.createPickId(g);m.pickId="vPickColor",m.uniformMap={uColor:function(){return i._color.withAlpha(.2)},uPickColor:function(){return x.color}},m.renderState=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),i._colorCommandAlpha=m,i._colorCommand=f}function be$a(e){var t=[];t.push([new o$1p(0,0,e.dimensions.z/2),new o$1p(0,0,e.dimensions.z/2+e._moveBarZLength)]),t.push([new o$1p(0,0,-e.dimensions.z/2),new o$1p(0,0,-e.dimensions.z/2-e._moveBarZLength)]),t.push([new o$1p(e.dimensions.x/2,0,0),new o$1p(e.dimensions.x/2+e._moveBarXLength,0,0)]),t.push([new o$1p(-e.dimensions.x/2,0,0),new o$1p(-e.dimensions.x/2-e._moveBarXLength,0,0)]),t.push([new o$1p(0,e.dimensions.y/2,0),new o$1p(0,e.dimensions.y/2+e._moveBarYLength,0)]),t.push([new o$1p(0,-e.dimensions.y/2,0),new o$1p(0,-e.dimensions.y/2-e._moveBarYLength,0)]);for(var i=Me$8(e._rotateCircleRadius,64),n=0;n<i.length;n++)i[n].z=e.dimensions.z/2;t.push(i);var r=e._movePolygonDimension;return t.push([new o$1p(r,r,.505*e.dimensions.z+.01),new o$1p(-r,r,.505*e.dimensions.z+.01),new o$1p(-r,-r,.505*e.dimensions.z+.01),new o$1p(r,-r,.505*e.dimensions.z+.01)]),t}function Me$8(e,t){var i=[];const n=2*Math.PI/t;for(var r=0;r<t+1;r++){var o=new o$1p,a=n*r;o.x=e*Math.sin(a),o.y=e*Math.cos(a),i.push(o)}return i}function Be$7(e,t){var i=m$17.headingPitchRollQuaternion(e.center,e.hpr);return new h$V({id:t+e._id,position:new n$V((function(){return e.center}),!1),orientation:new n$V((function(){return i}),!1),box:{material:e._color,outline:!0,outlineWidth:2,outlineColor:e._outlineColor,dimensions:new n$V((function(){return e.dimensions}),!1)}})}Object.defineProperties(S$l.prototype,{distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2b(e)&&!(e instanceof r$Y))throw new t$16("Expected BoxEditor.distanceDisplayCondition to be type of DistanceDisplayCondition!");this._distanceDisplayCondition=e}},color:{get:function(){return this._color},set:function(e){this._color=e,this.boundingBox.box.material=e}},hoverColor:{get:function(){return this._hoverColor},set:function(e){this._hoverColor=e}}}),Object.defineProperties(Z$j.prototype,{color:{get:function(){return this._color},set:function(e){this._color=e,this.dirty=!0}}}),Z$j.prototype.update=function(e){(!this._colorCommand||this.dirty)&&(ke$3(this.editor,e.context,this),this.dirty=!1);var t=this.editor;if(e$2b(t._distanceDisplayCondition)&&t.isActive){var i=t.viewer.scene.camera.positionWC;if(e.mode===C$13.COLUMBUS_VIEW&&(i=m$17.convertTo3DCartesian(i)),o$1p.distance(t.center,i)<t._distanceDisplayCondition.far){t._polygon.show=!0;for(var n=0;n<t.polylines._polylines.length;n++)t.polylines._polylines[n].show=!0,t.translucentPolylines._polylines[n].show=!0}else{t._polygon.show=!1;for(n=0;n<t.polylines._polylines.length;n++)t.polylines._polylines[n].show=!1,t.translucentPolylines._polylines[n].show=!1}}var r=e._fboState.frameBufferType;this.show&&r==Qe$c.NORMAL&&(e.commandList.push(this._colorCommand),e.commandList.push(this._colorCommandAlpha))},Z$j.prototype.destroy=function(e){};var X$f=new o$1p,ae$9=new i$1c,se$7=new o$1p,Te$8=new o$1o,Ie$5=new o$1o,Ee$a=new f$17,Oe$8=new o$1p,Re$7=new o$1p,Ae$8=new f$17,Se$7=new o$1p,Le$8=new o$1p,Ve$6=new o$1m(o$1p.UNIT_X,0);function ze$4(e,t){t.endPosition,e.currentPickObject;var i=+e.currentPickObject.id.slice(15,16),n=e.viewer.camera,r=o$1o.clone(t.startPosition,Te$8),o=o$1o.clone(t.endPosition,Ie$5),a=o$1p.clone(o$1p.ZERO,Oe$8),s=o$1p.UNIT_X;(0===i||1===i)&&(s=o$1p.UNIT_Y);var l=m$17.convertToColumbusCartesian(e.center);e$2b(l)&&(a.x=l.x,(0===i||1===i)&&(a.y=l.y));var u=o$1m.fromPointNormal(a,s,Ve$6),c=n.getPickRay(r,Ee$a),h=g$1h.rayPlane(c,u,Re$7),d=n.getPickRay(o,Ae$8),f=g$1h.rayPlane(d,u,Se$7),p=o$1p.subtract(h,f,Le$8),_=p.x;if(p.x=p.y,p.y=p.z,p.z=_,o$1p.magnitude(p)>e$2a.EPSILON6&&(f=m$17.convertTo3DCartesian(f),e.currentPickPos=f),0===i||1===i){var m=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p),g=(T=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).z-m.z,x=new o$1p(0,0,g/2);1===i&&(x=new o$1p(0,0,-(g=m.z-T.z)/2)),e.dimensions.z+=g,e.dimensions.z<=0&&(g=0,e.dimensions.z=0,x=new o$1p(0,0,0)),e.positions[0][0].z+=g/2,e.positions[0][1].z+=g/2,e.positions[1][0].z-=g/2,e.positions[1][1].z-=g/2;for(var v=e.positions[6],y=0;y<v.length;y++)v[y].z+=g/2;var $=e.positions[7];for(y=0;y<$.length;y++)$[y].z+=g/2;p$1d.multiplyByPoint(e._modelMatrix,x,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(2===i||3===i){m=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var b=(T=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).x-m.x;x=new o$1p(b/2,0,0);3===i&&(x=new o$1p(-(b=m.x-T.x)/2)),e.dimensions.x+=b,e.dimensions.x<0&&(e.dimensions.x=0,x=new o$1p(0,0,0),b=0),e.positions[2][0].x+=b/2,e.positions[2][1].x+=b/2,e.positions[3][0].x-=b/2,e.positions[3][1].x-=b/2,p$1d.multiplyByPoint(e._modelMatrix,x,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(4===i||5===i){e.viewer.camera.getPickRay(t.endPosition);m=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var T,C=(T=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).y-m.y;x=new o$1p(0,C/2,0);5===i&&(x=new o$1p(0,-(C=m.y-T.y)/2,0)),e.dimensions.y+=C,e.dimensions.y<0&&(e.dimensions.y=0,x=new o$1p(0,0,0),C=0),e.positions[4][0].y+=C/2,e.positions[4][1].y+=C/2,e.positions[5][0].y-=C/2,e.positions[5][1].y-=C/2,p$1d.multiplyByPoint(e._modelMatrix,x,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}}function Ue$4(e,t){var i=t.endPosition;e.currentPickObject;var n=+e.currentPickObject.id.slice(15,16);if(0===n||1===n){var r=e.viewer.scene.camera,o=r.getPickRay(i),a=o$1o.fromElements(i.x+5,i.y,new o$1o),s=r.getPickRay(a),l=o$1p.normalize(o$1p.cross(o.direction,s.direction,se$7),se$7),u=o$1m.fromPointNormal(r.positionWC,l),c=new f$17(o$1p.ZERO,e.currentPickPos);e.currentPickPos=g$1h.rayPlane(c,u);var h=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p),d=(y=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).z-h.z,f=new o$1p(0,0,d/2);1===n&&(f=new o$1p(0,0,-(d=h.z-y.z)/2)),e.dimensions.z+=d,e.dimensions.z<=0&&(d=0,e.dimensions.z=0,f=new o$1p(0,0,0)),e.positions[0][0].z+=d/2,e.positions[0][1].z+=d/2,e.positions[1][0].z-=d/2,e.positions[1][1].z-=d/2;for(var p=e.positions[6],_=0;_<p.length;_++)p[_].z+=d/2;var m=e.positions[7];for(_=0;_<m.length;_++)m[_].z+=d/2;p$1d.multiplyByPoint(e._modelMatrix,f,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(2===n||3===n){c=e.viewer.camera.getPickRay(t.endPosition);var g=i$1c.unpack([0,0,0,o$1p.distance(e.lastPickPos,o$1p.ZERO)],0,ae$9),x=g$1h.raySphere(c,g);e.currentPickPos=f$17.getPoint(c,x.start);h=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var v=(y=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).x-h.x;f=new o$1p(v/2,0,0);3===n&&(f=new o$1p(-(v=h.x-y.x)/2)),e.dimensions.x+=v,e.dimensions.x<0&&(e.dimensions.x=0,f=new o$1p(0,0,0),v=0),e.positions[2][0].x+=v/2,e.positions[2][1].x+=v/2,e.positions[3][0].x-=v/2,e.positions[3][1].x-=v/2,p$1d.multiplyByPoint(e._modelMatrix,f,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(4===n||5===n){c=e.viewer.camera.getPickRay(t.endPosition),g=i$1c.unpack([0,0,0,o$1p.distance(e.lastPickPos,o$1p.ZERO)],0,ae$9),x=g$1h.raySphere(c,g);e.currentPickPos=f$17.getPoint(c,x.start);h=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var y,$=(y=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).y-h.y;f=new o$1p(0,$/2,0);5===n&&(f=new o$1p(0,-($=h.y-y.y)/2,0)),e.dimensions.y+=$,e.dimensions.y<0&&(e.dimensions.y=0,f=new o$1p(0,0,0),$=0),e.positions[4][0].y+=$/2,e.positions[4][1].y+=$/2,e.positions[5][0].y-=$/2,e.positions[5][1].y-=$/2,p$1d.multiplyByPoint(e._modelMatrix,f,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}}function Ne$6(e,t){var i=p$1d.multiplyByPoint(e._modelMatrix,e.positions[0][0],new o$1p),n=m$17.convertToColumbusCartesian(i),r=m$17.convertToColumbusCartesian(e.lastPickPos);r.x=n.x;var o=o$1p.subtract(r,n,new o$1p);e.tangent=o$1p.cross(o$1p.UNIT_X,o,new o$1p);var a=t.endPosition;o$1p.clone(e.lastPickPos,X$f);var s=e.viewer.camera.getPickRay(a),l=o$1m.fromPointNormal(n,o$1p.UNIT_X),u=g$1h.rayPlane(s,l),c=o$1p.subtract(r,n,new o$1p),h=o$1p.subtract(u,n,new o$1p),d=o$1p.dot(o$1p.normalize(c,c),o$1p.normalize(h,h)),f=Math.acos(d);o$1p.cross(o$1p.UNIT_X,c,e.tangent);var p=o$1p.dot(e.tangent,o$1p.subtract(u,r,new o$1p));f*=p=p<0?1:-1,e.hpr.heading+=f;var _=m$17.headingPitchRollQuaternion(e.center,e.hpr);e.boundingBox.orientation=_;var m=m$17.convertTo3DCartesian(u);o$1p.clone(m,e.lastPickPos)}function je$4(e,t){var i=p$1d.multiplyByPoint(e._modelMatrix,e.positions[0][0],new o$1p),n=o$1p.subtract(e.lastPickPos,i,new o$1p);e.tangent=o$1p.cross(o$1p.UNIT_Z,n,new o$1p);var r=t.endPosition,o=o$1p.clone(e.lastPickPos,X$f),a=e.viewer.camera.getPickRay(r),s=new i$1c(o$1p.ZERO,o$1p.distance(o,o$1p.ZERO)),l=g$1h.raySphere(a,s);o=f$17.getPoint(a,l.start);var u=o$1p.subtract(e.lastPickPos,i,new o$1p),c=o$1p.subtract(o,i,new o$1p),h=o$1p.dot(o$1p.normalize(u,u),o$1p.normalize(c,c)),d=Math.acos(h);o$1p.cross(o$1p.UNIT_Z,u,e.tangent);var f=o$1p.dot(e.tangent,o$1p.subtract(o,e.lastPickPos,new o$1p));d*=f=f<0?1:-1,e.hpr.heading+=d;var p=m$17.headingPitchRollQuaternion(e.center,e.hpr);e.boundingBox.orientation=p,o$1p.clone(o,e.lastPickPos)}function We$4(e,t){var i=t.endPosition;o$1p.clone(e.lastPickPos,X$f);var n=e.viewer.camera.getPickRay(i),r=m$17.convertToColumbusCartesian(e.lastPickPos),o=o$1m.fromPointNormal(r,o$1p.UNIT_X),a=g$1h.rayPlane(n,o),s=a.y-r.y,l=a.z-r.z,u=m$17.convertToColumbusCartesian(e.center);u.y+=s,u.z+=l,e.center=m$17.convertTo3DCartesian(u);var c=m$17.convertTo3DCartesian(a);o$1p.clone(c,e.lastPickPos)}function He$3(e,t){var i=t.endPosition,n=o$1p.clone(e.lastPickPos,X$f),r=e.viewer.camera.getPickRay(i),o=new i$1c(o$1p.ZERO,o$1p.distance(n,o$1p.ZERO)),a=g$1h.raySphere(r,o),s=f$17.getPoint(r,a.start),l=p$1d.multiplyByPoint(e._modelMatrixInverse,n,new o$1p),u=p$1d.multiplyByPoint(e._modelMatrixInverse,s,new o$1p),c=new o$1p(u.x-l.x,u.y-l.y,0);p$1d.multiplyByPoint(e._modelMatrix,c,e.center),o$1p.clone(s,e.lastPickPos)}function Fe$7(e){for(var t=0;t<e._linesHover.length;t++){var i=e._linesHover[t];i._isCustomPolygon?i.color=e._lineColor:i.material.uniforms.color.alpha<1?i.material=r$X.fromType(r$X.ColorType,{color:e._lineColor.withAlpha(.2)}):i.material=r$X.fromType(r$X.ColorType,{color:e._lineColor})}e._linesHover.length=0,e.viewer.scene.pickAsync(e.viewer.scene.screenSpaceCameraController._aggregator._currentMousePosition).then((t=>{var i=e.currentPickObject=t;if(i&&"string"==typeof i.id&&i.id.indexOf("box-editor-prim")>-1&&i.id.indexOf(e._id)>-1){var n=i.primitive._index;if(e$2b(n)){var r=e.polylines.get(n),o=e.translucentPolylines.get(n);r.material=r$X.fromType(r$X.ColorType,{color:e._hoverColor}),o.material=r$X.fromType(r$X.ColorType,{color:e._hoverColor.withAlpha(.2)}),e._linesHover.push(r),e._linesHover.push(o)}else i.primitive.color=e._hoverColor,e._linesHover.push(i.primitive)}}))}S$l.prototype.destroy=function(){this.viewer.scene.screenSpaceCameraController.enableInputs=!0,this.deactivate(),this.clear(),this.handler.destroy(),i$10(this)},S$l.prototype.activate=function(){if(!this.isActive){this.isActive=!0;for(var e=0;e<this.polylines._polylines.length;e++)this.polylines._polylines[e].show=!0,this.translucentPolylines._polylines[e].show=!0;var t=this;t.boundingBox.show=!0,t._polygon.show=!0,t.handler.setInputAction((function(e){t.viewer.scene.pickPositionAsync(e.position).then((e=>{t.startPickPos=e,t._isOperate=!1,e$2b(t.startPickPos)&&t.currentPickObject&&"string"==typeof t.currentPickObject.id&&t.currentPickObject.id.slice(-36)===t._id&&"box-editor"===t.currentPickObject.id.slice(0,10)&&(t._isOperate=!0,t.lastPickPos=o$1p.clone(t.startPickPos,new o$1p),t.currentPickPos=o$1p.clone(t.startPickPos,new o$1p))}))}),G$I.LEFT_DOWN),t.handler.setInputAction((function(e){if(t._isOperate){t.viewer.scene.screenSpaceCameraController.enableInputs=!1;var i=+t.currentPickObject.id.slice(15,16);i>=0&&i<6?t.viewer.scene.mode===C$13.COLUMBUS_VIEW?ze$4(t,e):Ue$4(t,e):6===i?t.viewer.scene.mode===C$13.COLUMBUS_VIEW?Ne$6(t,e):je$4(t,e):7===i&&(t.viewer.scene.mode===C$13.COLUMBUS_VIEW?We$4(t,e):He$3(t,e)),t._polygon.dirty=!0,t._modelMatrix=m$17.headingPitchRollToFixedFrame(t.center,t.hpr),t._modelMatrixInverse=p$1d.inverse(t._modelMatrix,t._modelMatrixInverse),t.polylines.modelMatrix=t._modelMatrix,t.translucentPolylines.modelMatrix=t._modelMatrix,t.box.orientation=new n$V((function(e,i){return t.boundingBox.orientation.getValue(0)}),!1),t.box.position=new n$V((function(e,i){return t.boundingBox.position.getValue(0)}),!1),t.box.box.dimensions=new n$V((function(e,i){return t.boundingBox.box.dimensions.getValue(0)}),!1),t.editEvt.raiseEvent({position:t.boundingBox.position.getValue(0),dimensions:t.boundingBox.box.dimensions.getValue(0),orientation:t.boundingBox.orientation.getValue(0)})}else Fe$7(t)}),G$I.MOUSE_MOVE),t.handler.setInputAction((function(e){t._isOperate=!1,t.viewer.scene.screenSpaceCameraController.enableInputs=!0,t.currentPickObject=void 0}),G$I.LEFT_UP)}},S$l.prototype.deactivate=function(){if(this.isActive){this.isActive=!1,this.boundingBox.show=!1,this._polygon.show=!1;for(var e=0;e<this.polylines._polylines.length;e++)this.polylines._polylines[e].show=!1,this.translucentPolylines._polylines[e].show=!1;this.handler.removeInputAction(G$I.LEFT_CLICK),this.handler.removeInputAction(G$I.MOUSE_MOVE),this.handler.removeInputAction(G$I.RIGHT_CLICK)}},S$l.prototype.clear=function(){this.polylines.removeAll(),this.viewer.scene.primitives.remove(this.polylines),this.polylines=void 0,this.translucentPolylines.removeAll(),this.viewer.scene.primitives.remove(this.translucentPolylines),this.viewer.scene.primitives.remove(this._polygon),this._polygon=void 0,this.translucentPolylines=void 0,this.viewer.entities.remove(this.boundingBox)},S$l.prototype.setEditObject=function(e){if(this.isActive){if(o$1q.typeOf.object("editObject",e),!e$2b(e.box))throw new t$16("Expected editObject to be a box.");var t=this.boundingBox.orientation.getValue(0),i=this.boundingBox.position.getValue(0),n=this.boundingBox.box.dimensions.getValue(0);this.box.orientation=new n$V((function(){return t}),!1),this.box.position=new n$V((function(){return i}),!1),this.box.box.dimensions=new n$V((function(){return n}),!1),re$b(this,e),this.deactivate(),this.clear(),te$8(this),this.activate()}};var e$o={Space:0,Ground:1,S3mModel:2,Raster:3,Both:4},l$p=Object.freeze(e$o),e$n={Point:0,Line:1,Polygon:2,Marker:3,Box:4},_0x20cc4b=Object.freeze(e$n),e$m={POLYLINE:0,POLYGON:1,POLYGON_HOLE:2},C$q=Object.freeze(e$m),w$m=function(e,t,i){if(!e$2b(e)||!e$2b(t))throw new t$16("viewer and mode is required!");this.handler=new g$J(e.scene.canvas),this.viewer=e,this.mode=t,this._clampMode=u$_(i,l$p.Space),this.isDrawing=!1,this.active=!1,this._drawEvt=new o$1h,this._activeEvt=new o$1h,this._enableDepthTest=!0,this.movingEvt=new o$1h,this.positions=[],this._positions=[]};function ee$a(e,t){var i=t;if(i&&i.active){var n=i.viewer.scene;if(!n.pickPositionSupported)return void console.log("your browser not supported pickPosition!");n.pickPositionAsync(e.position).then((t=>{if(t)if(i.isDrawing){var n=new o$1o(e.position.x,e.position.y);switch(i.mode){case _0x20cc4b.Line:j$m(n,i,!0);break;case _0x20cc4b.Polygon:K$h(n,i,!0)}}else switch(i.isDrawing=!0,i.positions.length=0,i.positions.push(t.clone()),i.mode){case _0x20cc4b.Point:ie$7(t,i);break;case _0x20cc4b.Line:G$n(t,i);break;case _0x20cc4b.Polygon:te$7(t,i);break;case _0x20cc4b.Marker:oe$8(t,i)}i.mode===_0x20cc4b.Box&&re$a(t,i)}))}}function ie$7(e,t){var i=t;e$2b(i.points)?i.point.position=e:(i.points=new D$s({depthTestEnabled:!1}),i.point=i.points.add({position:e,pixelSize:10,color:e$1U.WHITE}),i.viewer.scene.primitives.add(i.points)),i.deactivate(),i.drawEvt.raiseEvent({object:i.point})}function G$n(e,t){var i=t;if(i._positions=[e,e],e$2b(i.polyline))i.polyline.show=!0;else{var n=i._clampMode>0,r=i._clampMode<l$p.S3mModel?_0x3b5200.TERRAIN:i._clampMode<l$p.Both?_0x3b5200.S3M_TILE:_0x3b5200.BOTH;i.polyline=i.viewer.entities.add({polyline:{positions:new n$V((function(){return e$2b(i.polygon)?i._positions.concat([i._positions[0]]):i._positions}),!1),width:3,material:e$1U.fromCssColorString("#51ff00"),clampToGround:n,classificationType:r}})}}function te$7(e,t){var i=t;if(i._positions=[e,e],G$n(e,t),e$2b(i.polygon))i.polygon.show=!0,i.polyline.show=!0,e$2b(i.rasterPolygon)&&i.viewer.scene.rasterVectorCollection.remove(i.rasterPolygon),e$2b(i.rasterPolylines)&&i.viewer.scene.rasterVectorCollection.remove(i.rasterPolylines);else{var n=l$p.Space===i._clampMode,r=i._clampMode<l$p.S3mModel?_0x3b5200.TERRAIN:i._clampMode<l$p.Both?_0x3b5200.S3M_TILE:_0x3b5200.BOTH;i.polygon=i.viewer.entities.add({polygon:{hierarchy:new n$V((function(){return{positions:i._positions,holes:[]}}),!1),material:e$1U.ORANGE.withAlpha(.5),perPositionHeight:n,classificationType:r},depthTestEnabled:i._enableDepthTest})}}function oe$8(e,t){var i=t;a$18.fromCartesian(e).height,e$2b(i.marker)?i.marker.position=e:(i.markers=new w$N,i.marker=i.markers.add({position:e,image:n$15("Assets/Textures/maki/grepin.png"),verticalOrigin:S$O.BOTTOM,scale:.5}),i.viewer.scene.primitives.add(i.markers)),i.deactivate(),i.drawEvt.raiseEvent({object:i.marker})}function re$a(e,t){e$2b(t.boxConfig)||(t.boxConfig={leftClickTimes:0,scratchPosition:new o$1p,length:0,width:0,height:0}),e$2b(t.boxes)||(t.boxes=[]);var i=t.boxConfig;if(0!==i.leftClickTimes||e$2b(e))if(i.leftClickTimes++,i.firstPoint=e,1===i.leftClickTimes)i.enu=m$17.eastNorthUpToFixedFrame(e),i.enuInverse=p$1d.inverse(i.enu,new p$1d),o$1p.clone(e,i.scratchPosition),t.box=i.entity=t.viewer.entities.add({position:new n$V((function(){return i.scratchPosition}),!1),box:{dimensions:new n$V((function(e,t){return(t=t||new o$1p(i.length,i.width,i.height)).x=i.length,t.y=i.width,t.z=i.height,t}),!1),material:e$1U.fromCssColorString("rgba(0, 160, 233, 0.5)"),outline:!0,outlineColor:e$1U.BLACK}}),t.boxes.push(t.box),i.box=i.entity.box;else if(2===i.leftClickTimes){var n=p$1d.multiplyByPoint(i.enuInverse,i.scratchPosition,new o$1p);o$1p.multiplyByScalar(n,2,n),i.secondPoint=p$1d.multiplyByPoint(i.enu,n,n)}}function ne$c(e,t){var i=t;if(i&&i.active&&i.isDrawing){var n=new o$1o(e.endPosition.x,e.endPosition.y);switch(i.mode){case _0x20cc4b.Line:j$m(n,i,!1);break;case _0x20cc4b.Polygon:K$h(n,i,!1);break;case _0x20cc4b.Box:le$d(n,i)}}i.movingEvt.raiseEvent(new o$1o(e.endPosition.x,e.endPosition.y))}function j$m(e,t,i){var n=t;n.viewer.scene.pickPositionAsync(e).then((e=>{if(e$2b(e)){var t=n._positions.length;1==i?(n._positions[t]=e,n.positions.push(e.clone())):n._positions[t-1]=e}}))}function K$h(e,t,i){var n=t;n.viewer.scene.pickPositionAsync(e).then((e=>{if(e$2b(e)){var t=n._positions.length;1==i?(n.positions.push(e.clone()),n._positions[t]=e):n._positions[t-1]=e}}))}Object.defineProperties(w$m.prototype,{drawEvt:{get:function(){return this._drawEvt}},activeEvt:{get:function(){return this._activeEvt}},clampMode:{get:function(){return this._clampMode},set:function(e){if(this._clampMode!==l$p.Raster&&e!==l$p.Raster){if(e$2b(e)&&e!=this._clampMode){if(this._clampMode=e,e$2b(this.polyline)&&e$2b(this.polyline.polyline)){var t=e!==l$p.Space,i=this._clampMode<l$p.S3mModel?_0x3b5200.TERRAIN:this._clampMode<l$p.Both?_0x3b5200.S3M_TILE:_0x3b5200.BOTH;this.polyline.polyline.clampToGround=t,this.polyline.polyline.classificationType=i}if(e$2b(this.polygon)){var n=l$p.Space===this._clampMode;i=this._clampMode<l$p.S3mModel?_0x3b5200.TERRAIN:this._clampMode<l$p.Both?_0x3b5200.S3M_TILE:_0x3b5200.BOTH;this.polygon.polygon.perPositionHeight=n,this.polygon.polygon.classificationType=i}}}else this._clampMode=l$p.Raster}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){this._enableDepthTest=e}}}),w$m.prototype.activate=function(){if(1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){ee$a(t,e)}),G$I.LEFT_CLICK),this.handler.setInputAction((function(t){ne$c(t,e)}),G$I.MOUSE_MOVE),this.handler.setInputAction((function(t){ce$b(t,e)}),G$I.RIGHT_CLICK),this.activeEvt.raiseEvent(!0)}},w$m.prototype.deactivate=function(){this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(G$I.LEFT_CLICK),this.handler.removeInputAction(G$I.MOUSE_MOVE),this.handler.removeInputAction(G$I.RIGHT_CLICK),this.activeEvt.raiseEvent(!1)},w$m.prototype.clear=function(){if(this.deactivate(),this.positions.length=0,this._positions.length=0,e$2b(this.rasterPolylines)&&(this.viewer.scene.rasterVectorCollection.remove(this.rasterPolylines),this.rasterPolylines=void 0),e$2b(this.rasterPolygon)&&(this.viewer.scene.rasterVectorCollection.remove(this.rasterPolygon),this.rasterPolygon=void 0),e$2b(this.polygon)&&(this.viewer.entities.remove(this.polygon),this.polygon=void 0),e$2b(this.polyline)&&(this.viewer.entities.remove(this.polyline),this.polyline=void 0),e$2b(this.points)&&(this.points.removeAll(),this.viewer.scene.primitives.remove(this.points),this.points=void 0),e$2b(this.markers)&&(this.viewer.scene.primitives.remove(this.markers),this.markers=void 0,e$2b(this.marker)&&(this.marker=void 0)),e$2b(this.corridor)&&this.viewer.entities.remove(this.corridor),e$2b(this.boxes)){for(var e=0,t=this.boxes.length;e<t;e++)this.viewer.entities.remove(this.boxes[e]);this.boxes=void 0,this.box=void 0,this.boxConfig=void 0}};var se$6=new o$1p,M$o=new o$1p,F$j=new o$1o,ae$8=new i$1c;function le$d(e,t,i){var n=t.boxConfig;if(e$2b(n))if(1==n.leftClickTimes)if(t.viewer.scene.mode===C$13.COLUMBUS_VIEW){var r=(v=t.viewer.scene.camera).getPickRay(e),o=m$17.convertToColumbusCartesian(n.firstPoint);e$2b(n.first)||(n.first=o$1p.clone(n.firstPoint));var a=o$1m.fromPointNormal(o,o$1p.UNIT_X);if(!e$2b(h=g$1h.rayPlane(r,a)))return;a$18.fromCartesian(n.firstPoint);var s=m$17.convertTo3DCartesian(h);n.second=o$1p.clone(s),s=a$18.fromCartesian(s);var l=Math.cos(s.latitude);n.ratio=l,s=a$18.toCartesian(s),h=m$17.convertToColumbusCartesian(s),n.scratchPosition=o$1p.midpoint(h,o,new o$1p),n.scratchPosition=m$17.convertTo3DCartesian(n.scratchPosition),n.length=Math.abs(h.y-o.y)*l,n.width=Math.abs(h.z-o.z),n.height=0}else{r=t.viewer.camera.getPickRay(e);var u=i$1c.unpack([0,0,0,o$1p.distance(n.firstPoint,o$1p.ZERO)],0,ae$8),c=g$1h.raySphere(r,u),h=f$17.getPoint(r,c.start),d=p$1d.multiplyByPoint(n.enuInverse,h,se$6);d.z=0,n.scratchPosition=p$1d.multiplyByPoint(n.enu,o$1p.divideByScalar(d,2,d),n.scratchPosition),p$1d.multiplyByPoint(n.enuInverse,n.scratchPosition,d),n.length=2*(d.x>0?d.x:-d.x),n.width=2*(d.y>0?d.y:-d.y),n.height=0}else if(n.leftClickTimes>1)if(t.viewer.scene.mode===C$13.COLUMBUS_VIEW){var f=(v=t.viewer.scene.camera).getPickRay(e),p=o$1o.fromElements(e.x+5,e.y,F$j),_=v.getPickRay(p),m=o$1p.normalize(o$1p.cross(f.direction,_.direction,M$o),M$o),g=(a=o$1m.fromPointNormal(v.positionWC,m),m$17.convertToColumbusCartesian(n.second));g.x=.1;r=new f$17(g,o$1p.UNIT_X);var x=g$1h.rayPlane(r,a);if(!e$2b(x))return;o=m$17.convertToColumbusCartesian(n.first);n.scratchPosition=o$1p.midpoint(o,x,new o$1p),n.scratchPosition=m$17.convertTo3DCartesian(n.scratchPosition),n.secondPoint=m$17.convertTo3DCartesian(x),n.height=Math.abs(o.x-x.x)}else{var v;f=(v=t.viewer.scene.camera).getPickRay(e),p=o$1o.fromElements(e.x+5,e.y,F$j),_=v.getPickRay(p),m=o$1p.normalize(o$1p.cross(f.direction,_.direction,M$o),M$o),a=o$1m.fromPointNormal(v.positionWC,m),r=new f$17(o$1p.ZERO,n.secondPoint);n.secondPoint=g$1h.rayPlane(r,a);var y=p$1d.multiplyByPoint(n.enuInverse,n.secondPoint,new o$1p);o$1p.divideByScalar(y,2,y),p$1d.multiplyByPoint(n.enu,y,n.scratchPosition),n.length=2*(y.x>0?y.x:-y.x),n.width=2*(y.y>0?y.y:-y.y),n.height=2*(y.z>0?y.z:-y.z)}}var L$o=0;function ce$b(e,t){var i=t;if(i&&i.active&&i.isDrawing){if(i.deactivate(),i.mode===_0x20cc4b.Box)return t.boxConfig=void 0,void i.drawEvt.raiseEvent({object:i.box,positions:i._positions});if(!e$2b(i.polyline))return;if(i._positions=i._positions.slice(0,i._positions.length-1),i.mode===_0x20cc4b.Polygon){if(i._positions.length<3)return void(i._positions.length=0);var n=[].concat(i._positions);if(i.polygon.positions=n,l$p.Raster===i._clampMode){i._positions.length=0,e$2b(i.polyline)&&(i.polyline.show=!1),e$2b(i.polygon)&&(i.polygon.show=!1);for(var r=[],o=0;o<n.length;o++)r.push(a$18.fromCartesian(n[o]));L$o+=1,i.rasterPolygon=L$o,i.viewer.scene.rasterVectorCollection.add({name:i.rasterPolygon,pickId:i.rasterPolygon,positions:r,fillColor:e$1U.ORANGE.withAlpha(.5),geometryType:C$q.POLYGON});var a=[];for(o=0;o<r.length;o++)a.push(r[o]);a.push(r[0]),i.rasterPolylines=L$o,i.viewer.scene.rasterVectorCollection.add({name:i.rasterPolylines,pickId:i.rasterPolylines,positions:a,lineColor:e$1U.fromCssColorString("#51ff00"),lineWidth:3,geometryType:C$q.POLYLINE}),i.drawEvt.raiseEvent({object:n,positions:i.positions})}else i.drawEvt.raiseEvent({object:i.polygon,positions:i.positions})}else i.mode===_0x20cc4b.Line&&(i.polyline.positions=i._positions,i.drawEvt.raiseEvent({object:i.polyline,positions:i.positions}))}}var w$l="referencePoint",I$r="referenceAddPoint",_$l=function(e,t){if(!e$2b(e)||!e$2b(t))throw new t$16("viewer and mode is required!");this.handler=new g$J(e.scene.canvas),this.viewer=e,this.active=!1,this.referencePointColor=e$1U.WHITE,this.editPointColor=e$1U.VIOLET,this.setEditObject(t),this._editZ=!1,this._changedEvt=new o$1h};function C$p(e,t){if(!e.scene.pickRasterData(t.position).isS3MTilesLayerSel)return e.scene.pickAsync(t.position).then((e=>{if(e$2b(e)){var t=u$_(e.id,e.primitive.id);if(t instanceof h$V)return Promise.resolve(t);if(e$2b(e.primitive))return Promise.resolve(e)}}))}function K$g(e,t){var i=t;i&&i.active&&C$p(i.viewer,e).then((e=>{if(e$2b(e)){var t=e.id;if(!e$2b(t))return;var n=t.split("_");2==n.length&&n[0]===w$l&&(i._editPointIndex=parseInt(n[1]),i._editPoint=e.primitive,i._editPoint.color=i.editPointColor,i.viewer.scene._screenSpaceCameraController.enableRotate=!1)}}))}function G$m(e,t){var i=t;i&&i.active&&i._editPoint&&(i._editPointIndex=-1,e$2b(i._editPoint)&&(i._editPoint.color=i.referencePointColor,i._editPoint=void 0),i.viewer.scene._screenSpaceCameraController.enableRotate=!0,i._changedEvt.raiseEvent(t._positions))}function N$f(e,t){var i=t;if(i&&i.active&&i._editPointIndex>-1&&i.viewer.scene._screenSpaceCameraController._aggregator._isDown[0]){var n,r=new o$1o(e.endPosition.x,e.endPosition.y),o=i._polyline,a=i._polygon,s=!0;if(e$2b(o)&&(s=o.clampToGround instanceof e$1I?o.clampToGround._value:o.clampToGround),e$2b(a)&&(s=!a.perPositionHeight),s)n=i.viewer.scene.pickPosition(r);else if(i._editZ){var l=i.viewer.camera.getPickRay(r),u=new o$1o(r.x+5,r.y),c=i.viewer.camera.getPickRay(u),h=new o$1p;h=o$1p.cross(l.direction,c.direction,h);var d=new o$1p;o$1p.normalize(h,d);var f=o$1m.fromPointNormal(i.viewer.camera.position,d),p=new f$17(o$1p.ZERO,i._editPoint.position);n=g$1h.rayPlane(p,f)}else{p=i.viewer.camera.getPickRay(r);var _=new i$1c(o$1p.ZERO,o$1p.distance(i._editPoint.position,o$1p.ZERO)),m=g$1h.raySphere(p,_);n=f$17.getPoint(p,m.start)}i._editPoint.position=n;var g=i._positions;g[i._editPointIndex]=n,e$2b(o)&&(o.positions=new n$V((function(){return g}),!1)),e$2b(a)&&(a.hierarchy=new n$V((function(){return{positions:g,holes:[]}}),!1)),i.refreshReferenceAddPoint()}}function q$k(e,t){var i=t;i&&i.active&&C$p(i.viewer,e).then((e=>{if(e$2b(e)){var t=e.id;if(!e$2b(t))return;var n=t.split("_");if(2==n.length&&n[0]===I$r){var r=parseInt(n[1]),o=i._addPositions[r];(u=i._positions).splice(r+1,0,o);var a=i._polyline;e$2b(a)&&(a.positions=new n$V((function(){return u}),!1));var s=i._polygon;if(e$2b(s)){var l=new n$V((function(){return u}),!1),u=s.hierarchy.getValue(0);Array.isArray(u)?s.hierarchy=l:s.hierarchy.positions=l}i.refreshReferencePoint(),i.refreshReferenceAddPoint()}}}))}function j$l(e,t){var i=t;i&&i.active&&C$p(i.viewer,e).then((e=>{if(e$2b(e)){var t=e.id;if(!e$2b(t))return;var n=t.split("_");if(2==n.length&&n[0]===w$l){var r=parseInt(n[1]),o=i._positions;o.splice(r,1);var a=i._polyline;e$2b(a)&&(a.positions=new n$V((function(){return o}),!1));var s=i._polygon;e$2b(s)&&(s.hierarchy=new n$V((function(){return o}),!1)),i.refreshReferencePoint(),i.refreshReferenceAddPoint()}}}))}Object.defineProperties(_$l.prototype,{isEditZ:{get:function(){return this._editZ},set:function(e){this._editZ=e}},changedEvt:{get:function(){return this._changedEvt}}}),_$l.prototype.setEditObject=function(e){if(e$2b(e._polygon)||e$2b(e._polyline)){if(this.clear(),this._editObject=e,this._polygon=e._polygon,e$2b(this._polygon)){var t=this._polygon.hierarchy.getValue(0);if(!Array.isArray(t)){if(!Array.isArray(t.positions))throw new t$16("positions is required!");t=t.positions}if(this._polygon.classificationType&&(this._polygon.classificationType===_0x3b5200.BOTH||this._polygon.classificationType===_0x3b5200.TERRAIN)||!e$2b(this._polygon.height)&&!e$2b(this._polygon.extrudedHeight)&&e$2b(this._polygon.perPositionHeight)&&!this._polygon.perPositionHeight.getValue()){for(var i=[],n=0;n<t.length;n++){var r=a$18.fromCartesian(t[n]);r.height=this.viewer.scene.globe.getHeight(r),i.push(a$18.toCartesian(r))}this._positions=i}else this._positions=t}this._polyline=e._polyline,e$2b(this._polyline)&&(this._positions=this._polyline.positions.getValue(0)),this._editPoints=this.viewer.scene.primitives.add(new w$N({depthTestEnable:!1}));for(n=0;n<this._positions.length;n++)this._editPoints.add({id:w$l+"_"+n,position:this._positions[n],image:n$15("Assets/Textures/vertex-edit.png")});this._editPointIndex=-1,this._editPoint=void 0,this._addPositions=[],this._addPoints=this.viewer.scene.primitives.add(new w$N({depthTestEnable:!1}));for(n=0;n<this._positions.length-1;n++){var o=new o$1p;o$1p.add(this._positions[n],this._positions[n+1],o),o$1p.multiplyByScalar(o,.5,o),this._addPositions.push(o)}if(e$2b(this._polygon)){o=new o$1p;o$1p.add(this._positions[0],this._positions[this._positions.length-1],o),o$1p.multiplyByScalar(o,.5,o),this._addPositions.push(o)}for(n=0;n<this._addPositions.length;n++)this._addPoints.add({id:I$r+"_"+n,position:this._addPositions[n],image:n$15("Assets/Textures/middle-edit.png")});this.activate()}},_$l.prototype.activate=function(){if(1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){K$g(t,e)}),G$I.LEFT_DOWN),this.handler.setInputAction((function(t){G$m(t,e)}),G$I.LEFT_UP),this.handler.setInputAction((function(t){N$f(t,e)}),G$I.MOUSE_MOVE),this.handler.setInputAction((function(t){q$k(t,e)}),G$I.LEFT_CLICK),this.handler.setInputAction((function(t){j$l(t,e)}),G$I.RIGHT_CLICK)}},_$l.prototype.deactivate=function(){this.active=!1,this.handler.removeInputAction(G$I.LEFT_DOWN),this.handler.removeInputAction(G$I.LEFT_UP),this.handler.removeInputAction(G$I.MOUSE_MOVE),this.handler.removeInputAction(G$I.LEFT_CLICK),this.handler.removeInputAction(G$I.RIGHT_CLICK)},_$l.prototype.clear=function(){this.deactivate(),e$2b(this._editPoints)&&this._editPoints.removeAll(),e$2b(this._editPointIndex)&&(this._editPointIndex=-1),e$2b(this._editPoint)&&(this._editPoint=void 0),e$2b(this._editObject)&&(this._editObject=void 0),e$2b(this._polygon)&&(this._polygon=void 0),e$2b(this._polyline)&&(this._polyline=void 0),e$2b(this._addPoints)&&this._addPoints.removeAll(),e$2b(this._addPositions)&&(this._addPositions.length=0),e$2b(this._positions)&&(this._positions=void 0)},_$l.prototype.refreshReferencePoint=function(){e$2b(this._editPoints)&&this._editPoints.removeAll(),this._editPoints=this.viewer.scene.primitives.add(new w$N({depthTestEnable:!1}));for(var e=0;e<this._positions.length;e++)this._editPoints.add({id:w$l+"_"+e,position:this._positions[e],image:n$15("Assets/Textures/vertex-edit.png")});e$2b(this._editPointIndex)&&(this._editPointIndex=-1),e$2b(this._editPoint)&&(this._editPoint=void 0)},_$l.prototype.refreshReferenceAddPoint=function(){e$2b(this._addPoints)&&this._addPoints.removeAll(),this._addPositions=[],this._addPoints=this.viewer.scene.primitives.add(new w$N({depthTestEnable:!1}));for(var e=0;e<this._positions.length-1;e++){var t=new o$1p;o$1p.add(this._positions[e],this._positions[e+1],t),o$1p.multiplyByScalar(t,.5,t),this._addPositions.push(t)}if(e$2b(this._polygon)){t=new o$1p;o$1p.add(this._positions[0],this._positions[this._positions.length-1],t),o$1p.multiplyByScalar(t,.5,t),this._addPositions.push(t)}for(e=0;e<this._addPositions.length;e++)this._addPoints.add({position:this._addPositions[e],id:I$r+"_"+e,image:n$15("Assets/Textures/middle-edit.png")})};var e$l={Distance:0,Area:1,DVH:2,DVHX:3},_0x91cd7b=Object.freeze(e$l),T$l=function(e,t,i,n){if(!e$2b(e)||!e$2b(t))throw new t$16("viewer and mode is required!");this.handler=new g$J(e.scene.canvas),this.viewer=e,this._clampMode=u$_(i,l$p.Space),this.mode=t,this.isDrawing=!1,this.active=!1,this.tmpEntities=[],this._areaLabel=void 0,this._disLabel=void 0,this._vLabel=void 0,this._hLabel=void 0,this._measureEvt=new o$1h,this._activeEvt=new o$1h,this._enableDepthTest=!1,this._labelBackgroundColor=e$1U.fromCssColorString("rgba(38, 38, 38, 0.85)"),this._labelPixelOffsetScaleByDistance=new o$Y(150,3,15e6,.5),this._labelPixelOffset=new o$1o(15,0),this._lineColor=e$1U.fromCssColorString("#51ff00"),this._fillColor=e$1U.ORANGE.withAlpha(.5),this._lineWidth=2,this._dblclickListener=void 0,this._showMeasureResult=u$_(n,!0),this._lineDisplayType=X$V.NON_OCCLUDED};function we$5(e,t){var i=t;if(i&&i.active){var n=i.viewer.scene;n.pickPositionAsync(e.position).then((t=>{!e$2b(t)&&n.mode===C$13.SCENE2D&&(t=n.camera.pickEllipsoid(e.position));var r=n.pickPointEnabled?u$_(o$1p.clone(n.pickPoint),t):t;if(r)if(i.isDrawing)if(i.mode==_0x91cd7b.DVH||i.mode==_0x91cd7b.DVHX)i.deactivate();else{var o=r;if(i&&i.active&&i.isDrawing&&e$2b(o))switch(i.mode){case _0x91cd7b.Distance:le$c(o,i);break;case _0x91cd7b.Area:ne$b(o,i);break;case _0x91cd7b.DVH:re$9(o,i)}Ce$5(r,i)}else switch(i.isDrawing=!0,i.mode){case _0x91cd7b.Distance:De$9(r,i);break;case _0x91cd7b.Area:Le$7(r,i);break;case _0x91cd7b.DVH:Me$7(r,i);break;case _0x91cd7b.DVHX:Se$6(r,i)}}))}}function be$9(e,t){var i=t,n=i.viewer.scene;n.pickPositionAsync(e.endPosition).then((t=>{!e$2b(t)&&n.mode===C$13.SCENE2D&&(t=n.camera.pickEllipsoid(e.endPosition));var r=n.pickPointEnabled?u$_(o$1p.clone(n.pickPoint),t):t;if(i&&i.active&&i.isDrawing&&e$2b(r))switch(i.mode){case _0x91cd7b.Distance:le$c(r,i);break;case _0x91cd7b.Area:ne$b(r,i);break;case _0x91cd7b.DVH:re$9(r,i)}}))}function Ee$9(e,t){var i=t;i.viewer.scene.pickPositionAsync(e.position).then((e=>{if(i&&i.active&&i.isDrawing){var n;if(i.deactivate(),e$2b(i.polyline)&&(i.mode===_0x91cd7b.Distance?(n=i._accumulationPositions,1===i.polyline.positions.length&&i.viewer.entities.remove(i.spEntity)):(i.mode===_0x91cd7b.Area?i.polyline.positions.push(i.polyline.positions[0]):i.polyline.positions=i.polyline.positions.slice(0,i.polyline.positions.length-1),1===i.polyline.positions.length&&i.viewer.entities.remove(i.spEntity),n=i.polyline.positions),i.viewer.entities.remove(i.epEntity),!e$2b(i.polygon))){i.polylinePositions=n,i._disLabel.position=n[n.length-1];var r=0;if(t._clampMode===l$p.Ground)r=Pe$5(i.viewer.scene,i._accumulationPositions);else for(var o=0,a=n.length-1;o<a;o++)r+=o$1p.distance(n[o],n[o+1]);i._disLabel.show=!0,i.measureEvt.raiseEvent({distance:r.toFixed(8),positions:n})}if(e$2b(i.polygon)){if(n.length<3){i._areaLabel.show=!1,i.viewer.entities.remove(i.spEntity);for(o=0,a=i.tmpEntities.length;o<a;o++)i.viewer.entities.remove(i.tmpEntities[o]);i.tmpEntities.length=0,i.viewer.entities.remove(i.epEntity),i.polyline.positions.length=0}if(i._areaLabel.show=!0,(i._clampMode==l$p.Ground||i._clampMode==l$p.S3mModel)&&(i.polyline.show=!0),i.polygonPositions=i.polyline.positions,i.polygon.show=!0,n.length>2){if(i._clampMode!==l$p.Ground)i._areaLabel.position=i.polyline.positions[i.polyline.positions.length-1];else{var s=i.tmpEntities[i.tmpEntities.length-1]._position._value;i._areaLabel.position=s}if(i._clampMode===l$p.Ground){var l=Oe$7(i.viewer.scene,i.polyline.positions);return void i.measureEvt.raiseEvent({area:l.toFixed(8),positions:n})}var u,c,h,d=A$1g.triangulate(n),f=d.length/3,p=0;for(o=0;o<f;o++)u=n[d[3*o]],c=n[d[3*o+1]],h=n[d[3*o+2]],b$w=o$1p.subtract(c,u,b$w),E$q=o$1p.subtract(h,u,E$q),C$o=o$1p.cross(b$w,E$q,C$o),p+=.5*o$1p.magnitude(C$o);i.measureEvt.raiseEvent({area:p.toFixed(8),positions:n})}}}}))}function Ce$5(e,t){var i=t;i.mode===_0x91cd7b.Distance?(i.polyline.positions.push(e),i._accumulationPositions.push(e)):(i.mode===_0x91cd7b.Area&&(i._accumulationArea=i._currentArea),i.polyline.positions.pop(),i.polyline.positions.push(e),i.polyline.positions.push(i.polyline.positions[0])),e$2b(i.polygon)&&(i.polygonPositions=i.polyline.positions),i.tmpEntities.push(i.viewer.entities.add({show:i._showMeasureResult,position:e,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}))}Object.defineProperties(T$l.prototype,{activeEvt:{get:function(){return this._activeEvt}},measureEvt:{get:function(){return this._measureEvt}},disLabel:{get:function(){return this._disLabel}},areaLabel:{get:function(){return this._areaLabel}},hLabel:{get:function(){return this._hLabel}},vLabel:{get:function(){return this._vLabel}},clampMode:{get:function(){return this._clampMode},set:function(e){e$2b(e)&&e!=this._clampMode&&(this._clampMode=e,e$2b(this.polygon)&&(e==l$p.Space?(this.polygon.polygon.perPositionHeight.setValue(!0),this.polygon.clampToS3M=!1):e==l$p.Ground?(this.polygon.polygon.perPositionHeight.setValue(!1),this.polygon.clampToS3M=!1):e==l$p.S3mModel&&(this.polygon.polygon.perPositionHeight.setValue(!1),this.polygon.clampToS3M=!0)),e$2b(this.polyline)&&(e==l$p.Ground?this.polyline._polyline.clampToGround=!0:this.polyline._polyline.clampToGround=!1))}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){console.warn("MeasureHandler.enableDepthTest is deprecated, use MeasureHandler.lineDisplayType instead."),o$1q.typeOf.bool("MeasureHandler.enableDepthTest",e),this._enableDepthTest=e,this._lineDisplayType=e?X$V.OCCLUDED:X$V.NON_OCCLUDED}},capturePointSize:{get:function(){return this.viewer._capturePointSize},set:function(e){this.viewer._capturePointSize=e}},capturePointColor:{get:function(){return this.viewer._capturePointColor},set:function(e){this.viewer._capturePointColor=e}},lineColor:{get:function(){return this._lineColor},set:function(e){this._lineColor=e}},fillColor:{get:function(){return this._fillColor},set:function(e){this._fillColor=e}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e}},lineDisplayType:{get:function(){return this._lineDisplayType},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("MeasureHandler.lineDisplayType",e,0),o$1q.typeOf.number.lessThanOrEquals("MeasureHandler.lineDisplayType",e,2),this._lineDisplayType=e,this.polylines&&(this.polylines.lineDisplayType=e)}}}),T$l.prototype.activate=function(){if(this.mode!==_0x91cd7b.DVH&&this.clear(),1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){we$5(t,e)}),G$I.LEFT_CLICK),this.handler.setInputAction((function(t){be$9(t,e)}),G$I.MOUSE_MOVE),this.handler.setInputAction((function(t){Ee$9(t,e)}),G$I.RIGHT_CLICK),this.activeEvt.raiseEvent(!0),this._dblclickListener=this.viewer.screenSpaceEventHandler.getInputAction(G$I.LEFT_DOUBLE_CLICK),this.viewer.screenSpaceEventHandler.removeInputAction(G$I.LEFT_DOUBLE_CLICK)}},T$l.prototype.deactivate=function(){!0===this.active&&this.activeEvt.raiseEvent(!1),this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(G$I.LEFT_CLICK),this.handler.removeInputAction(G$I.MOUSE_MOVE),this.handler.removeInputAction(G$I.RIGHT_CLICK),e$2b(this._dblclickListener)&&(this.viewer.screenSpaceEventHandler.setInputAction(this._dblclickListener,G$I.LEFT_DOUBLE_CLICK),this._dblclickListener=void 0)},T$l.prototype.clear=function(){this.deactivate();for(var e=0,t=this.tmpEntities.length;e<t;e++)this.viewer.entities.remove(this.tmpEntities[e]);if(this.tmpEntities.length=0,e$2b(this.polylines)&&(this.polylines.removeAll(),this.viewer.scene.primitives.remove(this.polylines),this.polylines=void 0),e$2b(this.spEntity)&&(this.viewer.entities.remove(this.spEntity),this.spEntity=void 0),e$2b(this.epEntity)&&(this.viewer.entities.remove(this.epEntity),this.epEntity=void 0),e$2b(this.fpEntity)&&(this.viewer.entities.remove(this.fpEntity),this.fpEntity=void 0),e$2b(this.labels))switch(this.mode){case _0x91cd7b.Distance:this.labels.remove(this._disLabel);break;case _0x91cd7b.Area:this.labels.remove(this._areaLabel);break;case _0x91cd7b.DVH:this.labels.removeAll()}e$2b(this.polygon)&&(this.viewer.entities.remove(this.polygon),this.polygon=void 0),e$2b(this.polyline)&&this.viewer.entities.remove(this.polyline)};var b$w=new o$1p,E$q=new o$1p,C$o=new o$1p;function ne$b(e,t){var i=t;if(e$2b(e)){i.endPoint=e;var n=i.polyline.positions,r=n.length;if(r>3?(n[r-2]=e,n.pop()):n[r-1]=e,r>2&&(e$2b(i._areaLabel)&&(i._areaLabel.show=!0),i.polygonPositions=n),i.polyline.positions=n,n.length>2){var o;if(i.epEntity.position=e,i._areaLabel.position=e,i._areaLabel.show=t._clampMode!==l$p.Ground,i.polyline.positions.push(i.polyline.positions[0]),t._clampMode===l$p.Ground)return;o=T$l.computeArea(n),i.measureEvt.raiseEvent({area:o.toFixed(8),positions:n})}}}function Le$7(e,t){var i=t;i.polygonPositions=[],i.polylineCoord=[e,e],i.tmpEntities.length=0;var n=i._enableDepthTest;i.polyline=i.viewer.entities.add({polyline:{positions:new n$V((function(){return i.polylineCoord}),!1),width:i._lineWidth,material:e$1U.fromCssColorString("#51ff00"),loop:!0,clampToGround:i._clampMode===l$p.Ground}}),i.polyline.positions=i.polylineCoord,i.spEntity=i.viewer.entities.add({position:e,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}});var r=i.viewer.scene.primitives.add(new g$U({depthTestEnable:!1}));i._areaLabel=r.add({position:e,font:"100 20px SimSun",fillColor:e$1U.WHITE,style:R$Q.FILL_AND_OUTLINE,showBackground:!0,outlineWidth:1,outlineColor:e$1U.BLUE,pixelOffset:i._labelPixelOffset,text:"",show:i._showMeasureResult,horizontalOrigin:j$T.LEFT});var o=i._clampMode,a=!1,s=!1;o==l$p.Space?a=!0:o==l$p.S3mModel&&(s=!0),i.polygon=i.viewer.entities.add({polygon:{hierarchy:new n$V((function(){return{positions:JSON.parse(JSON.stringify(i.polygonPositions)),holes:[]}}),!1),material:i._fillColor,perPositionHeight:a},clampToS3M:s,depthTestEnabled:n,show:!0}),i.labels=r,t._clampMode===l$p.Ground&&(i.polyline.show=!0),i._areaLabel.show=!1}function De$9(e,t){var i=t;i.polylinePositions=[e,e],i.polyline=i.viewer.entities.add({polyline:{positions:new n$V((function(){return i.polylinePositions}),!1),width:i._lineWidth,material:i._lineColor,clampToGround:t._clampMode===l$p.Ground}}),i.polyline.positions=i.polylinePositions,i.tmpEntities.length=0,i._accumulationPositions=[e],i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}});var n=i.viewer.scene.primitives.add(new g$U({depthTestEnable:!1}));i._disLabel=n.add({position:e,font:"100 20px SimSun",fillColor:e$1U.WHITE,style:R$Q.FILL_AND_OUTLINE,showBackground:!0,backgroundColor:i._labelBackgroundColor,outlineWidth:1,outlineColor:e$1U.BLUE,pixelOffset:i._labelPixelOffset,text:"",show:i._showMeasureResult,horizontalOrigin:j$T.LEFT}),i.labels=n}function le$c(e,t){var i=t;i.endPoint=e;var n=i.polyline.positions,r=n.length;i.polylinePositions=n,n[r-1]=e,i.polyline.positions=n,i.epEntity.position=e;var o=0,a=i._accumulationPositions.concat([e]);if(i.polyline._distance=o,i._disLabel.position=e,i._disLabel.show=t._clampMode!==l$p.Ground,t._clampMode!==l$p.Ground){for(var s=0,l=a.length-1;s<l;s++)o+=o$1p.distance(a[s],a[s+1]);i.measureEvt.raiseEvent({distance:o.toFixed(8),positions:a})}}function Me$7(e,t){var i=t;if(!e$2b(i.polylines)){var n=i._enableDepthTest;i.polylines=new k$T({opaqueRS:d$1m.fromCache({depthMask:n,depthTest:{enabled:n}}),lineDisplayType:i._lineDisplayType}),i.viewer.scene.primitives.add(i.polylines)}i.horizontalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$X.fromType(r$X.ColorType,{color:i._lineColor})}),i.verticalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$X.fromType(r$X.ColorType,{color:i._lineColor})}),i.dirPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$X.fromType(r$X.ColorType,{color:i._lineColor})}),i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}),i.fpEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}),i.tmpEntities.push(i.spEntity),i.tmpEntities.push(i.epEntity),i.tmpEntities.push(i.fpEntity),e$2b(i.labels)||(i.labels=i.viewer.scene.primitives.add(new g$U({depthTestEnable:!1}))),i._disLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:R$Q.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1U.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$T.LEFT}),i._vLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:R$Q.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1U.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$T.LEFT}),i._hLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:R$Q.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1U.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$T.LEFT});var r=new o$1p;o$1p.normalize(e,r),i.plane=o$1m.fromPointNormal(e,r),i.startPoint=e,i.startHeight=a$18.fromCartesian(e).height,i.normal=r;var o=new o$1p;o$1p.negate(r,o),i.negateNormal=o,i.spEntity.position=e}function Se$6(e,t){var i=t;if(!e$2b(i.polylines)){i.polylines=new k$T,i.verticalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$X.fromType(r$X.ColorType,{color:i._lineColor})}),i.startPoint=e,i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}),i.fpEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}});var n=i.viewer.scene.primitives.add(new g$U({depthTestEnable:!1}));i._vLabel=n.add({position:e,font:"500 16px sans-serif",style:R$Q.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1U.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$T.LEFT}),i.viewer.scene.primitives.add(i.polylines),i.labels=n}i.startPoint=e,i.spEntity.position=e}var Te$7=new o$1p;function re$9(e,t){var i=t;if(i.viewer.scene,e$2b(e)){i.endPoint=e;var n,r,o=a$18.fromCartesian(e).height;if(o>i.startHeight){var a=o$1p.normalize(e,Te$7);n=o$1m.fromPointNormal(e,a),r=new f$17(i.startPoint,a)}else n=i.plane,r=new f$17(e,i.normal);var s=g$1h.rayPlane(r,n);if(e$2b(s)||(r=new f$17(e,i.normal),s=g$1h.rayPlane(r,i.plane))){o>i.startHeight?(i.horizontalPolyline.positions=[e,s],i.verticalPolyline.positions=[i.startPoint,s]):(i.horizontalPolyline.positions=[i.startPoint,s],i.verticalPolyline.positions=[e,s]),i.dirPolyline.positions=[i.startPoint,e],i.epEntity.position=e,i.fpEntity.position=s;var l=o$1p.distance(i.startPoint,e).toFixed(8),u=o$1p.distance(i.startPoint,s).toFixed(8),c=o$1p.distance(e,s).toFixed(8);o>i.startHeight?(o$1p.lerp(i.startPoint,e,.5,i._disLabel.position),o$1p.lerp(i.startPoint,s,.5,i._vLabel.position),o$1p.lerp(e,s,.5,i._hLabel.position)):(o$1p.lerp(i.startPoint,e,.5,i._disLabel.position),o$1p.lerp(e,s,.5,i._vLabel.position),o$1p.lerp(i.startPoint,s,.5,i._hLabel.position),u=o$1p.distance(e,s).toFixed(8),c=o$1p.distance(i.startPoint,s).toFixed(8)),i.measureEvt.raiseEvent({distance:l,directionalPositions:i.dirPolyline.positions,verticalHeight:u,verticalPositions:i.verticalPolyline.positions,horizontalDistance:c,horizontalPositions:i.horizontalPolyline.positions,endHeight:o})}}}function Oe$7(e,t){for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=0;a<t.length;a++){var s=a$18.fromCartesian(t[a]);i=Math.min(s.longitude,i),n=Math.max(s.longitude,n),r=Math.min(s.latitude,r),o=Math.max(s.latitude,o)}for(var l=a$18.toCartesian(new a$18(i,r,0)),u=a$18.toCartesian(new a$18(n,o,0)),c=o$1p.angleBetween(l,u),h=z$_.fromPositions({positions:t,granularity:c/32}),d=z$_.createGeometry(h),f=0,p={},_=0;_<d.indices.length;_+=3){var m,g=d.indices[_];if(e$2b(p[g]))m=p[g];else{m=new o$1p(d.attributes.position.values[3*g],d.attributes.position.values[3*g+1],d.attributes.position.values[3*g+2]);var x=a$18.fromCartesian(m),v=e.globe.getHeight(x);if(!e$2b(v))continue;x=a$18.fromRadians(x.longitude,x.latitude,v),m=a$18.toCartesian(x),p[g]=o$1p.clone(m)}var y,$=d.indices[_+1];if(e$2b(p[$]))y=p[$];else{y=new o$1p(d.attributes.position.values[3*$],d.attributes.position.values[3*$+1],d.attributes.position.values[3*$+2]);var b=a$18.fromCartesian(y),T=e.globe.getHeight(b);if(!e$2b(T))continue;b=a$18.fromRadians(b.longitude,b.latitude,T),y=a$18.toCartesian(b),p[$]=o$1p.clone(y)}var C,S=d.indices[_+2];if(e$2b(p[S]))C=p[S];else{C=new o$1p(d.attributes.position.values[3*S],d.attributes.position.values[3*S+1],d.attributes.position.values[3*S+2]);var w=a$18.fromCartesian(C),E=e.globe.getHeight(w);if(!e$2b(E))continue;w=a$18.fromRadians(w.longitude,w.latitude,E),C=a$18.toCartesian(w),p[S]=o$1p.clone(C)}b$w=o$1p.subtract(y,m,b$w),E$q=o$1p.subtract(C,m,E$q),C$o=o$1p.cross(b$w,E$q,C$o),f+=.5*o$1p.magnitude(C$o)}return f}function Pe$5(e,t){for(var i=0,n=[],r=t.length-1,o=0;o<r;o++){var a=t[o],s=t[o+1],l=o$1p.angleBetween(a,s);if(!(l<e$2a.EPSILON10))for(var u=l/64,c=e$2a.chordLength(u,6378137),h=y$_.subdivideLine(a,s,c,n),d=o$1p.unpackArray(h),f=d.length-1,p=0;p<f;p++){var _=d[p],m=a$18.fromCartesian(_),g=e.globe.getHeight(m);m=a$18.fromRadians(m.longitude,m.latitude,g);var x=a$18.toCartesian(m),v=d[p+1];m=a$18.fromCartesian(v),g=e.globe.getHeight(m),m=a$18.fromRadians(m.longitude,m.latitude,g);var y=a$18.toCartesian(m);i+=o$1p.distance(x,y)}}return i}T$l.computeArea=function(e){for(var t,i,n,r=A$1g.triangulate(e),o=r.length/3,a=0,s=0;s<o;s++)t=e[r[3*s]],i=e[r[3*s+1]],n=e[r[3*s+2]],b$w=o$1p.subtract(i,t,b$w),E$q=o$1p.subtract(n,t,E$q),C$o=o$1p.cross(b$w,E$q,C$o),a+=.5*o$1p.magnitude(C$o);return a};var l$o={LINE_X:1,LINE_Y:2,LINE_Z:3,CIRCLE_X:4,CIRCLE_Y:5,CIRCLE_Z:6,SCALE_LINE_X:7,SCALE_LINE_Y:8,SCALE_LINE_Z:9,UNIFORM_SCALE:10},U$k={ENTITY:1,S3MINSTANCE:2},q$j=new o$1p,J$e=new o$1p,K$f=new o$1p,de$7=new o$1p,I$q=new o$1p;new p$1d;var Te$6=new o$1p,Y$f=new p$1e,me$a=new n$13,g$u=new p$1d,Re$6=new p$1d,Ae$7=new p$1d,be$8=new o$1p,Ze$5=new o$1p,Oe$6=new o$1p,Ue$3=new o$1p,S$k=new i$15,Ye$3=new p$1d;new o$1p;var $$i=new o$1p;function z$m(e,t){for(var i=e.attributes.position.values,n=0,r=i.length;n<r;n+=3)i[n+2]+=t}function De$8(e,t,i){var n=p$1d.getMatrix3(e,Y$f),r=n$13.fromRotationMatrix(n,me$a),o=p$1e.fromQuaternion(r,Y$f),a=p$1d.fromRotationTranslation(o,o$1p.ZERO,Ye$3),s=p$1d.inverse(t,g$u),l=p$1d.multiply(s,a,g$u),u=p$1d.getMatrix3(l,Y$f);return p$1d.fromRotationTranslation(u,o$1p.ZERO,i)}function ve$7(e,t){return p$1d.getMatrix3(e,Y$f),n$13.fromRotationMatrix(Y$f,t),t}function b$v(e,t,i,n){var r=e.getPickRay(t),o=o$1m.fromPointNormal(i,n);return g$1h.rayPlane(r,o)}function We$3(e,t,i){var n=[],r=t$Y.createVertexBuffer({context:e,typedArray:S$12.createTypedArray(S$12.FLOAT,i.attributes.position.values),usage:A$19.STATIC_DRAW});n.push({name:"aPosition",index:0,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var o=new c$12({context:e,attributes:n,indexBuffer:t$Y.createIndexBuffer({context:e,typedArray:i.indices,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})}),a=r$13.fromCache({name:"modelEditor",context:e,vertexShaderSource:"attribute vec4 aPosition;\nuniform vec4 uColor;\nuniform vec4 uPickColor;\nuniform float uScale;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n vColor = uColor;\n vPickColor = uPickColor;\n mat4 scaleMatrix;\n scaleMatrix[0] = vec4(uScale, 0.0, 0.0, 0.0);\n scaleMatrix[1] = vec4(0.0, uScale, 0.0, 0.0);\n scaleMatrix[2] = vec4(0.0, 0.0, uScale, 0.0);\n scaleMatrix[3] = vec4(0.0, 0.0, 0.0, 1.0);\n gl_Position = czm_modelViewProjection * scaleMatrix * vec4(aPosition.xyz, 1.0);\n}",fragmentShaderSource:"varying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n gl_FragColor = vColor;\n}\n",attributeLocations:{aPosition:0}}),s=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:t._modelMatrix,pass:Le$s.LOG_DEPTH_OVERLAY,owner:t});s.vertexArray=o,s.shaderProgram=a;var l={id:t._id,primitive:t},u=e.createPickId(l);s.pickId="vPickColor",s.uniformMap={uColor:function(){return t._uColor},uPickColor:function(){return u.color},uScale:function(){return t._scaleAdjusted}},s.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var c=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:t._modelMatrix,pass:Le$s.OPAQUE+2,owner:t});c.vertexArray=o,c.shaderProgram=a;var h={id:t._id+"#2",primitive:t},d=e.createPickId(h);c.pickId="vPickColor",c.uniformMap={uColor:function(){return t._uColor.withAlpha(.2)},uPickColor:function(){return d.color},uScale:function(){return t._scaleAdjusted}},c.renderState=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),t._commands.push(c),t._commands.push(s)}var Be$6=new n$13;function Xe$3(e,t){var i=t.modelMatrix,n=o$1p.negate(e._offset,K$f),r=p$1d.fromTranslation(n,Ae$7),o=m$17.eastNorthUpToFixedFrame(e._position,void 0,Re$6),a=De$8(i,o,g$u),s=ve$7(a,Be$6);p$1d.multiply(o,p$1d.multiply(a,r,a),g$u);var l=p$1d.getTranslation(g$u,Te$6);ke$2(e,l,ve$7(g$u,me$a),t.nonUniformScaleAddition,t.uniformScaleAddition,r),Fe$6(e,l,s,t.nonUniformScaleAddition,t.uniformScaleAddition)}function ke$2(e,t,i,n,r,o){if(e._modelType===U$k.ENTITY){e._model.model._offsetMatrix=o,e._model.position=t,e._model.orientation=i;var a=n;n||(a=o$1p.clone(o$1p.ZERO)),r&&(a.x+=r,a.y+=r,a.z+=r),e._model.model.scale||(e._model.model.scale=o$1p.clone(o$1p.UNIT_XYZ));var s=e._model.model.scale.getValue(0);s instanceof o$1p?(o$1p.add(a,s,a),e._model.model.scale=a):(a.x+=s,a.y+=s,a.z+=s,e._model.model.scale=a)}}function Fe$6(e,t,i,n,r){if(e._modelType===U$k.S3MINSTANCE){e._model.updatePosition(t);var o=i$15.fromQuaternion(i);e._model.updateRotation(o);var a=o$1p.clone(e._model.scale);e$2b(r)&&(a.x+=r,a.y+=r,a.z+=r),e$2b(n)&&o$1p.add(a,n,a),e._model.updateScale(a)}}function D$l(e,t){e.prototype.__proto__=Object.create(t.prototype),e.prototype.__proto__.constructor=e}function E$p(e){this._owner=e.owner,this._color=e$1U.clone(u$_(e.color,e$1U.WHITE)),this._hoverColor=e$1U.clone(u$_(e.hoverColor,e$1U.WHITE)),this._uColor=e$1U.clone(this._color),this._visible=u$_(e.visible,!0),this._scale=u$_(e.scale,o$1p.UNIT_XYZ),this._initTransition=u$_(e.transition,new o$1p),this._initHpr=u$_(e.headingPitchRoll,new i$15),this._initModelMatrix=p$1d.clone(p$1d.IDENTITY),this._initModelMatrixInverse=p$1d.clone(p$1d.IDENTITY),this._modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._id=u$_(e.id,e$1Q()),this._typeForModelEditor=u$_(e.type,-1),this._commands=[],this._geometries=[],this._updateMatrix(),this._setChangeEvt(),this._adjustAxisLength=void 0,this._scaleAdjusted=1}function je$3(e,t){return function(i){if(!(e$2b(i)&&i<.05)){var n=150*Ge$3(e,t._owner._model._position||t._owner._model._position._value);t._scaleAdjusted=Math.max(n/10,1),t._scaleAdjusted=t._scaleAdjusted>1e3?1:t._scaleAdjusted}}}function W$n(e){this._color=u$_(e.color,e$1U.WHITE),this._lineWidth=u$_(e.lineWidth,.02),this._lineLength=u$_(e.lineLength,5),this._arrowWidth=u$_(e.arrowWidth,.2),this._arrowLength=u$_(e.arrowLength,1),this._lineWidth=this._lineWidth*u$_(e.lineWidthScale,4),E$p.call(this,e)}function B$j(e){this._lineWidth=u$_(e.lineWidth,.02),this._lineLength=u$_(e.lineLength,10),this._headDimension=u$_(e.headDimension,.2),E$p.call(this,e)}function ee$9(e){this._dimensions=u$_(e.dimensions,.2),this._color=u$_(e.color,e$1U.WHITE),E$p.call(this,e)}function X$e(e){this._width=u$_(e.width,.02),this._radius=u$_(e.radius,7.5),this._width=this._width*u$_(e.lineWidthScale,4),E$p.call(this,e)}function k$k(e){this._dimensions=u$_(e.dimensions,.2),E$p.call(this,e)}function u$o(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.scene",e.scene),o$1q.typeOf.object("options.model",e.model);var t=e.model,i=t instanceof h$V;if(!i&&!(t instanceof _0x331f36))throw new t$16("Unsupported model type.");this._scene=e.scene,this._modelType=i?U$k.ENTITY:U$k.S3MINSTANCE,this._offset=u$_(e.offset,o$1p.ZERO),this._hoverColor=u$_(e.hoverColor,e$1U.WHITE),this._scale=u$_(e.scale,1),this._model=t,this._active=!1,this._hpr=void 0,this._handler=new g$J(this._scene.canvas),this._primitives=[],this._axesShow=p$19(e.axesShow,{translation:!0,rotation:!0,scale:!0}),this._lineWidthScale=u$_(e.lineWidthScale,4),this._modelType===U$k.ENTITY?(this._position=t.position.getValue(0),this._orientation=t.orientation?t.orientation.getValue(0):new n$13,this._calcHpr()):(this._position=t.position,this._hpr=i$15.clone(t.hpr)),this._fromEnu=m$17.eastNorthUpToFixedFrame(this._position),p$1d.multiplyByPoint(this._fromEnu,this._offset,this._position),this._modelMatrix=m$17.headingPitchRollToFixedFrame(this._position,this._hpr),this._modelMatrixInverse=p$1d.inverse(this._modelMatrix,new p$1d),!e$2b(this._changedEvt)&&(this._changedEvt=new o$1h),!e$2b(this._hoverChanged)&&(this._hoverChanged=new o$1h),this._axesCreated=!1;var n=this;this._changedEvt.addEventListener((function(e){Xe$3(n,e)}))}function Ge$3(e,t){var i=e.context._us,n=i._viewport,r=n.width,o=n.height,a=new o$1p;p$1d.multiplyByPoint(i._view,t,a);var s,l,u=i.frustumPlanes,c=u.x,h=u.y,d=u.z,f=u.w;if(e.mode===C$13.COLUMBUS_VIEW||i.orthographicIn3D){s=(f-d)/r,l=(c-h)/o}else{var p=-a.z,_=1/i.currentFrustum.x,m=c*_;l=2*p*m/o,s=2*p*(m=f*_)/r}return Math.max(s,l)}E$p.prototype._setChangeEvt=function(){var e=this;this._owner._changedEvt.addEventListener((function(t){p$1d.multiply(t.modelMatrix,e._initModelMatrix,e._modelMatrix)})),this._owner._hoverChanged.addEventListener((function(t){t===e._typeForModelEditor?e$1U.clone(e._hoverColor,e._uColor):e$1U.clone(e._color,e._uColor),t>=1&&t<=10&&t!==e._typeForModelEditor?e._color=e._color.withAlpha(.05,e._color):e._color=e._color.withAlpha(1,e._color)}))},E$p.prototype._createGeometry=function(){},E$p.prototype._updateMatrix=function(){p$1d.fromTranslationQuaternionRotationScale(this._initTransition,n$13.fromHeadingPitchRoll(this._initHpr),this._scale,this._initModelMatrix),p$1d.inverse(this._initModelMatrix,this._initModelMatrixInverse),p$1d.multiply(this._modelMatrix,this._initModelMatrix,this._modelMatrix)},E$p.prototype.update=function(e){if(e$2b(this._adjustAxisLength)||(this._adjustAxisLength=je$3(e,this),e.camera.changed.addEventListener(this._adjustAxisLength)),0===this._commands.length){this._createGeometry();for(var t=0,i=this._geometries.length;t<i;t++){var n=this._geometries[t];We$3(e.context,this,n)}}if(this._visible)for(t=0,i=this._commands.length;t<i;t++){var r=this._commands[t];e.commandList.push(r)}},E$p.prototype.destroy=function(){this._geometries.length=0;for(var e=0,t=this._commands.length;e<t;e++){var i=this._commands[e];i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy(),i.shaderProgram=i.shaderProgram&&!i.shaderProgram.isDestroyed()&&i.shaderProgram.destroy()}this._commands.length=0},W$n.prototype._createGeometry=function(){var e=l$Q.createGeometry(new l$Q({length:this._lineLength,topRadius:this._lineWidth,bottomRadius:this._lineWidth})),t=l$Q.createGeometry(new l$Q({length:this._arrowLength,topRadius:.01,bottomRadius:this._arrowWidth}));z$m(e,this._lineLength/2),z$m(t,this._lineLength),this._geometries.push(e),this._geometries.push(t)},D$l(W$n,E$p),B$j.prototype._createGeometry=function(){var e=l$Q.createGeometry(new l$Q({length:this._lineLength,topRadius:this._lineWidth,bottomRadius:this._lineWidth})),t=O$y.createGeometry(new O$y({minimum:new o$1p(-this._headDimension,-this._headDimension,-this._headDimension),maximum:new o$1p(this._headDimension,this._headDimension,this._headDimension),vertexFormat:n$11.POSITION_AND_NORMAL}));z$m(e,this._lineLength/2),z$m(t,this._lineLength),this._geometries.push(e),this._geometries.push(t)},D$l(B$j,E$p),ee$9.prototype._createGeometry=function(){var e=O$y.createGeometry(new O$y({minimum:new o$1p(-this._dimensions,-this._dimensions,-this._dimensions),maximum:new o$1p(this._dimensions,this._dimensions,this._dimensions),vertexFormat:n$11.POSITION_AND_NORMAL}));this._geometries.push(e)},D$l(ee$9,E$p),X$e.prototype._createGeometry=function(){var e=N$y.createGeometry(new N$y({polylinePositions:function(e){for(var t=[],i=0;i<=360;i+=3){var n=e$2a.toRadians(i),r=new o$1p(e*Math.cos(n),e*Math.sin(n),0);t.push(r)}return t}(this._radius),shapePositions:function(e){for(var t=[],i=0;i<=360;i+=10){var n=e$2a.toRadians(i);t.push(new o$1o(e*Math.cos(n),e*Math.sin(n)))}return t}(this._width),vertexFormat:n$11.POSITION_AND_NORMAL}));this._geometries.push(e)},D$l(X$e,E$p),k$k.prototype._createGeometry=function(){var e=this._dimensions,t=P$H.createGeometry(new P$H({polygonHierarchy:new e$1J([new o$1p(-e,e,0),new o$1p(-e,-e,0),new o$1p(e,-e,0),new o$1p(e,e,0)]),perPositionHeight:!0,vertexFormat:n$11.POSITION_AND_NORMAL}));this._geometries.push(t)},D$l(k$k,E$p),Object.defineProperties(u$o.prototype,{changedEvt:{get:function(){return this._changedEvt}}}),u$o.prototype.setEditObject=function(e){this._clearEditObject(),this.constructor({model:e,scene:this._scene,offset:this._offset,axesShow:this._axesShow}),this.activate()},u$o.prototype._clearEditObject=function(){for(var e=0;e<this._primitives.length;e++)this._scene.primitives.remove(this._primitives[e]),this._primitives[e]=void 0;this._primitives=[],this._handler.destroy()},u$o.prototype._calcHpr=function(){var e=p$1e.fromQuaternion(this._orientation,new p$1e),t=p$1d.fromRotationTranslation(e,o$1p.ZERO,new p$1d),i=p$1d.inverse(m$17.eastNorthUpToFixedFrame(this._position),new p$1d),n=p$1d.multiply(i,t,new p$1d),r=p$1d.getMatrix3(n,new p$1e);this._hpr=i$15.fromQuaternion(n$13.fromRotationMatrix(r))},u$o.prototype._createAxes=function(){this._axisX=new W$n({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,-90,0),color:e$1U.RED,hoverColor:this._hoverColor,type:l$o.LINE_X,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._axisY=new W$n({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,0,-90),color:e$1U.GREEN,hoverColor:this._hoverColor,type:l$o.LINE_Y,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._axisZ=new W$n({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,0,0),color:e$1U.BLUE,hoverColor:this._hoverColor,type:l$o.LINE_Z,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._scaleLineX=new B$j({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,-90,0),color:e$1U.RED,hoverColor:this._hoverColor,type:l$o.SCALE_LINE_X,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._scaleLineY=new B$j({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,0,-90),color:e$1U.GREEN,hoverColor:this._hoverColor,type:l$o.SCALE_LINE_Y,visible:this._axesShow.scale}),this._scaleLineZ=new B$j({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,0,0),color:e$1U.BLUE,hoverColor:this._hoverColor,type:l$o.SCALE_LINE_Z,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._axisCircleX=new X$e({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,-90,0),color:e$1U.RED,hoverColor:this._hoverColor,type:l$o.CIRCLE_X,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._axisCircleY=new X$e({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,0,-90),color:e$1U.GREEN,hoverColor:this._hoverColor,type:l$o.CIRCLE_Y,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._axisCircleZ=new X$e({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,0,0),color:e$1U.BLUE,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._transitionPlaneX=new k$k({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.4,transition:new o$1p(0,.4,.4),headingPitchRoll:i$15.fromDegrees(0,-90,0),color:e$1U.RED,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z}),this._transitionPlaneY=new k$k({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.4,transition:new o$1p(.4,0,.4),headingPitchRoll:i$15.fromDegrees(0,0,90),color:e$1U.GREEN,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z}),this._transitionPlaneZ=new k$k({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.4,transition:new o$1p(.4,.4,0),headingPitchRoll:i$15.fromDegrees(0,0,0),color:e$1U.BLUE,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z}),this._uniformScale=new ee$9({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.2,transition:new o$1p(.2001,.2,.2),headingPitchRoll:i$15.fromDegrees(0,0,0),type:l$o.UNIFORM_SCALE,hoverColor:this._hoverColor,color:e$1U.ORANGE,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._primitives=[this._scaleLineX,this._scaleLineY,this._scaleLineZ,this._axisCircleX,this._axisCircleY,this._axisCircleZ,this._uniformScale,this._axisX,this._axisY,this._axisZ],this._scene.primitives.add(this._scaleLineX),this._scene.primitives.add(this._scaleLineY),this._scene.primitives.add(this._scaleLineZ),this._scene.primitives.add(this._axisCircleX),this._scene.primitives.add(this._axisCircleY),this._scene.primitives.add(this._axisCircleZ),this._scene.primitives.add(this._uniformScale),this._scene.primitives.add(this._axisX),this._scene.primitives.add(this._axisY),this._scene.primitives.add(this._axisZ)},u$o.prototype._initEvent=function(){var e=this._scene,t=this,i=this._handler;i.setInputAction((function(i){var n=t._pickObj;!n||!n.primitive||!n.primitive._typeForModelEditor||(t._isEdit=!0,t._pickObj=n,e.screenSpaceCameraController.enableInputs=!1)}),G$I.LEFT_DOWN),i.setInputAction((function(e){t._isEdit?(t._handleTransition(e),t._handleRotation(e),t._handleScale(e),t._handleUniformScale(e)):t._handleHover(e)}),G$I.MOUSE_MOVE),i.setInputAction((function(i){e.screenSpaceCameraController.enableInputs=!0,t._isEdit=!1,t._pickObj=void 0}),G$I.LEFT_UP)},u$o.prototype._handleTransition=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$o.LINE_X||t===l$o.LINE_Y||t===l$o.LINE_Z){var i,n;switch(t){case l$o.LINE_X:i=o$1p.UNIT_Z,n=o$1p.UNIT_Z;break;case l$o.LINE_Y:i=o$1p.UNIT_X,n=o$1p.UNIT_X;break;case l$o.LINE_Z:i=o$1p.UNIT_Y,n=o$1p.UNIT_Y}var r=this._scene,o=e.startPosition,a=e.endPosition,s=p$1d.multiplyByPoint(this._modelMatrix,i,q$j),l=p$1d.multiplyByPoint(this._modelMatrix,o$1p.ZERO,J$e);n=p$1d.multiplyByPoint(this._modelMatrix,n,$$i),o$1p.subtract(s,l,s);var u=o$1p.normalize(s,s),c=b$v(r.camera,o,n,u),h=b$v(r.camera,a,n,u),d=p$1d.multiplyByPoint(this._modelMatrixInverse,c,de$7),f=p$1d.multiplyByPoint(this._modelMatrixInverse,h,K$f);switch(t){case l$o.LINE_X:I$q.x=f.x-d.x;break;case l$o.LINE_Y:I$q.y=f.y-d.y;break;case l$o.LINE_Z:I$q.z=f.z-d.z}p$1d.multiply(this._modelMatrix,p$1d.fromTranslation(I$q,g$u),this._modelMatrix),this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,transitionAddtion:I$q}),p$1d.getTranslation(this._modelMatrix,this._position),o$1p.clone(o$1p.ZERO,I$q)}},u$o.prototype._handleRotation=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$o.CIRCLE_X||t===l$o.CIRCLE_Y||t===l$o.CIRCLE_Z){var i,n,r=this._scene,o=e.startPosition,a=e.endPosition,s=this._position;switch(t){case l$o.CIRCLE_X:i=o$1p.UNIT_X,n=o$1p.UNIT_Y;break;case l$o.CIRCLE_Y:i=o$1p.UNIT_Y,n=o$1p.UNIT_Z;break;case l$o.CIRCLE_Z:i=o$1p.UNIT_Z,n=o$1p.UNIT_X}var l=p$1d.multiplyByPoint(this._modelMatrix,i,q$j),u=p$1d.multiplyByPoint(this._modelMatrix,o$1p.ZERO,J$e);n=p$1d.multiplyByPoint(this._modelMatrix,n,$$i),o$1p.subtract(l,u,l);var c=o$1p.normalize(l,l),h=b$v(r.camera,a,n,c),d=b$v(r.camera,o,n,c),f=o$1p.subtract(h,s,Ze$5),p=o$1p.subtract(d,s,Oe$6),_=o$1p.dot(o$1p.normalize(f,f),o$1p.normalize(p,p)),m=Math.acos(_),g=o$1p.cross(l,f,be$8),x=o$1p.subtract(d,h,Ue$3),v=o$1p.dot(g,o$1p.normalize(x,x));switch(m*=v=v>0?1:-1,t){case l$o.CIRCLE_X:S$k.roll=-m;break;case l$o.CIRCLE_Y:S$k.pitch=m;break;case l$o.CIRCLE_Z:S$k.heading=m}p$1d.multiply(this._modelMatrix,p$1d.fromRotationTranslation(p$1e.fromHeadingPitchRoll(S$k),o$1p.ZERO,g$u),this._modelMatrix),p$1d.inverse(this._modelMatrix,this._modelMatrixInverse),this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,rotationAddtion:S$k}),S$k.heading=0,S$k.pitch=0,S$k.roll=0}},u$o.prototype._handleScale=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$o.SCALE_LINE_X||t===l$o.SCALE_LINE_Y||t===l$o.SCALE_LINE_Z){var i,n;switch(t){case l$o.SCALE_LINE_X:i=o$1p.UNIT_Z,n=o$1p.UNIT_Z;break;case l$o.SCALE_LINE_Y:i=o$1p.UNIT_X,n=o$1p.UNIT_X;break;case l$o.SCALE_LINE_Z:i=o$1p.UNIT_Y,n=o$1p.UNIT_Y}var r=this._scene,o=e.startPosition,a=e.endPosition,s=p$1d.multiplyByPoint(this._modelMatrix,i,q$j),l=p$1d.multiplyByPoint(this._modelMatrix,o$1p.ZERO,J$e);n=p$1d.multiplyByPoint(this._modelMatrix,n,$$i),o$1p.subtract(s,l,s);var u=o$1p.normalize(s,s),c=b$v(r.camera,o,n,u),h=b$v(r.camera,a,n,u),d=p$1d.multiplyByPoint(this._modelMatrixInverse,c,de$7),f=p$1d.multiplyByPoint(this._modelMatrixInverse,h,K$f);switch(t){case l$o.SCALE_LINE_X:I$q.x=f.x-d.x;break;case l$o.SCALE_LINE_Y:I$q.y=f.y-d.y;break;case l$o.SCALE_LINE_Z:I$q.z=f.z-d.z}this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,nonUniformScaleAddition:o$1p.clone(I$q)}),o$1p.clone(o$1p.ZERO,I$q)}},u$o.prototype._handleHover=function(e){this._scene.pickAsync(e.startPosition).then((e=>{if(this._pickObj=e,!e||!e.primitive||e.primitive._typeForModelEditor<1||e.primitive._typeForModelEditor>10)this._hoverChanged.raiseEvent(-1);else{var t=e.primitive._typeForModelEditor;this._hoverChanged.raiseEvent(t)}}))},u$o.prototype._handleUniformScale=function(e){if(this._pickObj.primitive._typeForModelEditor===l$o.UNIFORM_SCALE){this._scene;var t=e.startPosition,i=e.endPosition.x-t.x;this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,uniformScaleAddition:i/50})}},u$o.prototype.activate=function(){this._active||(this._axesCreated||(this._createAxes(),this._axesCreated=!0),this._initEvent(),this._active=!0)},u$o.prototype.deactivate=function(){if(this._active){this._disableEvent(),this._active=!1;for(var e=0,t=this._primitives.length;e<t;e++){this._primitives[e]._visible=!1}this._scene.screenSpaceCameraController.enableInputs=!0,this._isEdit=!1,this._pickObj=void 0}},u$o.prototype._disableEvent=function(){var e=this._handler;e.removeInputAction(G$I.LEFT_UP),e.removeInputAction(G$I.LEFT_DOWN),e.removeInputAction(G$I.MOUSE_MOVE)},u$o.prototype.destroy=function(){this.deactivate();for(var e=0,t=this._primitives.length;e<t;e++){this._primitives[e].destroy()}this._handler.destroy(),i$10(this)},u$o.prototype.isDestroyed=function(){return!1};var d$v=function(e){t$12("PointHandler","PointHandler is deprecated,please use DrawHandler.");var t=new w$m(e,_0x20cc4b.Point,l$p.Space);return t.drawCompletedEvent=t.drawEvt,t},l$n=function(e){t$12("PolygonHandler","PolygonHandler is deprecated,please use DrawHandler.");var t=new w$m(e,_0x20cc4b.Polygon,l$p.Space);return t.drawCompletedEvent=t.drawEvt,t},d$u=function(e){t$12("PolylineHandler","PolylineHandler is deprecated,please use DrawHandler.");var t=new w$m(e,_0x20cc4b.Line,l$p.Space);return t.drawCompletedEvent=t.drawEvt,t};function c$h(e,t){if(LicenseChecker.LICENSECHECKER.verify("DirectionalLight"),t=u$_(t,{}),o$1q.defined("PointLight Position",e),o$1p.equals(e,o$1p.ZERO))throw new t$16("directional light position equals zero");this._id=e$1Q(),this._position=o$1p.clone(e),this._positionCV=new o$1p,this._targetPosition=u$_(t.targetPosition,new o$1p),this._targetPositionCV=new o$1p,this._color=u$_(t.color,new e$1U(1,1,1,1)),this._intensity=u$_(t.intensity,1),this._direction=new o$1p,o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction),this._lightColor=e$1U.multiplyByScalar(this._color,this._intensity,new e$1U),this._directionEC=new o$1p,this._sceneMode=C$13.SCENE3D}function e$k(e){e=u$_(e,{}),this._id=e$1Q(),this._skyColor=u$_(e.skyColor,new e$1U(.7,.7,.7)),this._groundColor=u$_(e.groundColor,new e$1U(.2,.2,.2)),this._groundLightColor=new e$1U,this._skyLightColor=new e$1U,this._intensity=u$_(e.intensity,1),this._sceneMode=C$13.SCENE3D}function c$g(e,t){LicenseChecker.LICENSECHECKER.verify("PointLight"),t=u$_(t,{}),o$1q.defined("PointLight Position",e),this._id=e$1Q(),this._position=o$1p.clone(e),this._positionCV=new o$1p,this._positionEC=new o$1p,this._color=u$_(t.color,new e$1U(1,1,1,1)),this._intensity=u$_(t.intensity,2),this._cutoffDistance=u$_(t.cutoffDistance,10),this._decay=u$_(t.decay,1),this._lightColor=e$1U.multiplyByScalar(this._color,this._intensity,new e$1U),this._visibleInCullingVolume=1,this._sceneMode=C$13.SCENE3D}Object.defineProperties(c$h.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===C$13.SCENE3D?this._position:this._positionCV},set:function(e){o$1q.defined("directional light position",e),!o$1p.equals(e,this._targetPosition)&&(this._position=e,this._sceneMode===C$13.COLUMBUS_VIEW?(this._positionCV=m$17.convertToColumbusCartesian(this._position),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},targetPosition:{get:function(){return this._sceneMode===C$13.SCENE3D?this._targetPosition:this._targetPositionCV},set:function(e){o$1q.defined("directional light target position",e),!o$1p.equals(e,this._position)&&(this._targetPosition=e,this._sceneMode===C$13.COLUMBUS_VIEW?(this._targetPositionCV=m$17.convertToColumbusCartesian(this._targetPosition),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},color:{get:function(){return this._color},set:function(e){o$1q.defined("directional light color",e),this._color=e,e$1U.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){o$1q.typeOf.number("directional light intensity",e),this._intensity=e,e$1U.multiplyByScalar(this._color,this._intensity,this._lightColor)}},direction:{get:function(){return this._direction}},lightColor:{get:function(){return this._lightColor}},directionEC:{get:function(){return this._directionEC},set:function(e){o$1q.defined("directioinal light directionEC",e),this._directionEC=e}},lightType:{get:function(){return _0x1d9df9.DIRECTIONAL}},sceneMode:{get:function(){return this._sceneMode},set:function(e){if(o$1q.typeOf.number("spot light sceneMode",e),this._sceneMode!==e){if(this._sceneMode=e,this._sceneMode===C$13.COLUMBUS_VIEW){if(this._positionCV=m$17.convertToColumbusCartesian(this._position),this._targetPositionCV=m$17.convertToColumbusCartesian(this._targetPosition),o$1p.equals(this._positionCV,this._targetPositionCV))return;o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)}else o$1p.subtract(this._position,this._targetPosition,this._direction);o$1p.normalize(this._direction,this._direction)}}}}),Object.defineProperties(e$k.prototype,{id:{get:function(){return this._id}},lightType:{get:function(){return _0x1d9df9.HEMISPHERE}},skyColor:{get:function(){return e$1U.multiplyByScalar(this._skyColor,this._intensity,this._skyLightColor)},set:function(e){o$1q.defined("skyColor color",e),e$1U.clone(e,this._skyColor)}},groundColor:{get:function(){return e$1U.multiplyByScalar(this._groundColor,this._intensity,this._groundLightColor)},set:function(e){o$1q.defined("groundColor color",e),e$1U.clone(e,this._groundColor)}}}),Object.defineProperties(c$g.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===C$13.SCENE3D?this._position:this._positionCV},set:function(e){o$1q.defined("point light position",e),this._position=e,this._sceneMode===C$13.COLUMBUS_VIEW&&(this._positionCV=m$17.convertToColumbusCartesian(this._position))}},color:{get:function(){return this._color},set:function(e){o$1q.defined("point color color",e),this._color=e,e$1U.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){o$1q.typeOf.number("point light intensity",e),this._intensity=e,e$1U.multiplyByScalar(this._color,this._intensity,this._lightColor)}},cutoffDistance:{get:function(){return this._cutoffDistance},set:function(e){o$1q.typeOf.number("point light cutoffDistance",e),this._cutoffDistance=e}},decay:{get:function(){return this._decay},set:function(e){o$1q.typeOf.number("point light decay",e),this._decay=e}},lightColor:{get:function(){return this._lightColor}},positionEC:{get:function(){return this._positionEC},set:function(e){o$1q.defined("point light positionEC",e),this._positionEC=e}},lightType:{get:function(){return _0x1d9df9.POINT}},visibleInCullingVolume:{get:function(){return this._visibleInCullingVolume}},sceneMode:{get:function(){return this._sceneMode},set:function(e){o$1q.typeOf.number("point light sceneMode",e),this._sceneMode!==e&&(this._sceneMode=e,this._sceneMode===C$13.COLUMBUS_VIEW&&(this._positionCV=m$17.convertToColumbusCartesian(this._position)))}}});var h$o=new i$1c;function _$k(e,t,i){if(LicenseChecker.LICENSECHECKER.verify("SpotLight"),i=u$_(i,{}),o$1q.defined("SpotLight Position",e),o$1q.defined("SpotLight target position",t),o$1p.equals(e,t))throw new t$16("position equals targetPosition");this._id=e$1Q(),this._position=o$1p.clone(e),this._positionCV=new o$1p,this._targetPosition=o$1p.clone(t),this._targetPositionCV=new o$1p,this._color=u$_(i.color,new e$1U(1,1,1,1)),this._intensity=u$_(i.intensity,2),this._distance=u$_(i.distance,100),this._angle=u$_(i.angle,Math.PI/6),this._penumbra=u$_(i.penumbra,0),this._exponent=u$_(i.exponent,10),this._decay=u$_(i.decay,1),this._direction=new o$1p,this._directionEC=new o$1p,o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction),this._lightColor=e$1U.multiplyByScalar(this._color,this._intensity,new e$1U),this._angleCos=Math.cos(this._angle),this._penumbraCos=Math.cos(this._angle*(1-this._penumbra)),this._positionEC=new o$1p,this._visibleInCullingVolume=1,this._sceneMode=C$13.SCENE3D}c$g.prototype.computeVisiblityInCullingVolume=function(e){return h$o.radius=this._cutoffDistance,h$o.center=this.position,this._visibleInCullingVolume=e.computeVisibility(h$o)!==Ae$u.OUTSIDE?1:0,!!this._visibleInCullingVolume},Object.defineProperties(_$k.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===C$13.SCENE3D?this._position:this._positionCV},set:function(e){o$1q.defined("spot light position",e),!o$1p.equals(e,this._targetPosition)&&(this._position=e,this._sceneMode===C$13.COLUMBUS_VIEW?(this._positionCV=m$17.convertToColumbusCartesian(this._position),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},targetPosition:{get:function(){return this._sceneMode===C$13.SCENE3D?this._targetPosition:this._targetPositionCV},set:function(e){o$1q.defined("spot light target position",e),!o$1p.equals(e,this._position)&&(this._targetPosition=e,this._sceneMode===C$13.COLUMBUS_VIEW?(this._targetPositionCV=m$17.convertToColumbusCartesian(this._targetPosition),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},color:{get:function(){return this._color},set:function(e){o$1q.defined("spot color color",e),this._color=e,e$1U.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){o$1q.typeOf.number("spot light intensity",e),this._intensity=e,e$1U.multiplyByScalar(this._color,this._intensity,this._lightColor)}},distance:{get:function(){return this._distance},set:function(e){o$1q.typeOf.number("spot light istance",e),this._distance=e}},angle:{get:function(){return this._angle},set:function(e){o$1q.typeOf.number("spot light angle",e),this._angle=e,this._angleCos=Math.cos(this._angle)}},exponent:{get:function(){return this._exponent},set:function(e){o$1q.typeOf.number("spot light exponent",e),this._exponent=e}},decay:{get:function(){return this._decay},set:function(e){o$1q.typeOf.number("spot light decay",e),this._decay=e}},direction:{get:function(){return this._direction}},lightColor:{get:function(){return this._lightColor}},angleCos:{get:function(){return this._angleCos}},penumbra:{get:function(){return this._penumbra},set:function(e){o$1q.typeOf.number("spot light angle",e),this._penumbra=e,this._penumbraCos=Math.cos(this._angle*(1-this._penumbra))}},penumbraCos:{get:function(){return this._penumbraCos}},positionEC:{get:function(){return this._positionEC},set:function(e){o$1q.defined("spot light positionEC",e),this._positionEC=e}},directionEC:{get:function(){return this._directionEC}},lightType:{get:function(){return _0x1d9df9.SPOT}},visibleInCullingVolume:{get:function(){return this._visibleInCullingVolume}},sceneMode:{get:function(){return this._sceneMode},set:function(e){if(o$1q.typeOf.number("spot light sceneMode",e),this._sceneMode!==e){if(this._sceneMode=e,this._sceneMode===C$13.COLUMBUS_VIEW){if(this._positionCV=m$17.convertToColumbusCartesian(this._position),this._targetPositionCV=m$17.convertToColumbusCartesian(this._targetPosition),o$1p.equals(this._positionCV,this._targetPositionCV))return;o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)}else o$1p.subtract(this._position,this._targetPosition,this._direction);o$1p.normalize(this._direction,this._direction)}}}});var u$n=new i$1c;_$k.prototype.computeVisiblityInCullingVolume=function(e){return u$n.radius=this._distance,u$n.center=this.position,this._visibleInCullingVolume=e.computeVisibility(u$n)!==Ae$u.OUTSIDE?1:0,!!this._visibleInCullingVolume};var _0xe4a84=(_0x185bb3=!0,function(e,t){var i=_0x185bb3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x185bb3=!1,i}),_0x180a77=_0xe4a84(void 0,(function(){return _0x180a77.toString().search("(((.+)+)+)+$").toString().constructor(_0x180a77).search("(((.+)+)+)+$")})),_0x185bb3;function _0xdbdb64(e,t){return this.position=new o$1p,this.rotation=new o$1p,this.scale=new o$1p,this.isVisible=!0,this._worldMatrix=new p$1d,this._rotationQuaternion=new n$13,p$1d.clone(p$1d.IDENTITY,this._worldMatrix),this}function _0x31fbd2(e,t,i,n){var r=.5*i,o=.5*t,a=.5*e,s=Math.sin(r),l=Math.cos(r),u=Math.sin(o),c=Math.cos(o),h=Math.sin(a),d=Math.cos(a);return n.x=d*u*l+h*c*s,n.y=h*c*l-d*u*s,n.z=d*c*s-h*u*l,n.w=d*c*l+h*u*s,n}_0x180a77(),_0xdbdb64.prototype.setDirection=function(e,t,i,n){t=u$_(t,0),i=u$_(i,0),n=u$_(n,0);var r=-Math.atan2(e.z,e.x)+Math.PI/2,o=Math.sqrt(e.x*e.x+e.z*e.z),a=-Math.atan2(e.y,o);return this.rotation.x=a+i,this.rotation.y=r+t,this.rotation.z=n,this},_0xdbdb64.prototype.computeWorldMatrix=function(){_0x31fbd2(this.rotation.y,this.rotation.x,this.rotation.z,this._rotationQuaternion),p$1d.fromTranslationQuaternionRotationScale(this.position,this._rotationQuaternion,this.scale,this._worldMatrix)},_0xdbdb64.prototype.getWorldMatrix=function(){return this.computeWorldMatrix(),this._worldMatrix};var _0x523da7=(_0x3a0c1e=!0,function(e,t){var i=_0x3a0c1e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a0c1e=!1,i}),_0x3ff620=_0x523da7(void 0,(function(){return _0x3ff620.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ff620).search("(((.+)+)+)+$")})),_0x3a0c1e;function _0x142894(e,t,i,n,r,o){this.name=e,this.targetProperty=t,this.framePerSecond=i,this.dataType=n,this.loopMode=r,this.enableBlending=o,this._runtimeAnimations=new Array,this._events=new Array,this.blendingSpeed=.01,this._ranges={},this.targetPropertyPath=t.split("."),this.dataType=n,this.loopMode=void 0===r?_0x142894.ANIMATIONLOOPMODE_CYCLE:r}_0x3ff620(),_0x142894._PrepareAnimation=function(e,t,i,n,r,o,a,s){var l=void 0;if(!isNaN(parseFloat(r))&&isFinite(r)?l=_0x142894.ANIMATIONTYPE_FLOAT:r instanceof _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion?l=_0x142894.ANIMATIONTYPE_QUATERNION:r instanceof _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3?l=_0x142894.ANIMATIONTYPE_VECTOR3:r instanceof _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector2?l=_0x142894.ANIMATIONTYPE_VECTOR2:r instanceof _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color3?l=_0x142894.ANIMATIONTYPE_COLOR3:r instanceof _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color4?l=_0x142894.ANIMATIONTYPE_COLOR4:r instanceof _Maths_math_size__WEBPACK_IMPORTED_MODULE_8__.Size&&(l=_0x142894.ANIMATIONTYPE_SIZE),null==l)return null;var u=new _0x142894(e,t,i,l,a),c=[{frame:0,value:r},{frame:n,value:o}];return u.setKeys(c),void 0!==s&&u.setEasingFunction(s),u},_0x142894.CreateAnimation=function(e,t,i,n){var r=new _0x142894(e+"Animation",e,i,t,_0x142894.ANIMATIONLOOPMODE_CONSTANT);return r.setEasingFunction(n),r},_0x142894.CreateAndStartAnimation=function(e,t,i,n,r,o,a,s,l,u){var c=_0x142894._PrepareAnimation(e,i,n,r,o,a,s,l);return c?t.getScene().beginDirectAnimation(t,[c],0,r,1===c.loopMode,1,u):null},_0x142894.CreateAndStartHierarchyAnimation=function(e,t,i,n,r,o,a,s,l,u,c){var h=_0x142894._PrepareAnimation(e,n,r,o,a,s,l,u);return h?t.getScene().beginDirectHierarchyAnimation(t,i,[h],0,o,1===h.loopMode,1,c):null},_0x142894.CreateMergeAndStartAnimation=function(e,t,i,n,r,o,a,s,l,u){var c=_0x142894._PrepareAnimation(e,i,n,r,o,a,s,l);return c?(t.animations.push(c),t.getScene().beginAnimation(t,0,r,1===c.loopMode,1,u)):null},_0x142894.MakeAnimationAdditive=function(e,t,i,n,r){void 0===t&&(t=0),void 0===n&&(n=!1);var o=e;if(n&&((o=e.clone()).name=r||o.name),!o._keys.length)return o;t=t>=0?t:0;var a=0,s=o._keys[0],l=o._keys.length-1,u=o._keys[l],c={referenceValue:s.value,referencePosition:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[0],referenceQuaternion:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Quaternion[0],referenceScaling:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[1],keyPosition:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[2],keyQuaternion:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Quaternion[1],keyScaling:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[3]},h=!1,d=s.frame,f=u.frame;if(i){var p=o.getRange(i);p&&(d=p.from,f=p.to)}var _=s.frame===d,m=u.frame===f;if(1===o._keys.length){var g=o._getKeyValue(o._keys[0]);c.referenceValue=g.clone?g.clone():g,h=!0}else if(t<=s.frame){g=o._getKeyValue(s.value);c.referenceValue=g.clone?g.clone():g,h=!0}else if(t>=u.frame){g=o._getKeyValue(u.value);c.referenceValue=g.clone?g.clone():g,h=!0}for(var x=0;!h||!_||!m&&x<o._keys.length-1;){var v=o._keys[x],y=o._keys[x+1];if(!h&&t>=v.frame&&t<=y.frame){g=void 0;if(t===v.frame)g=o._getKeyValue(v.value);else if(t===y.frame)g=o._getKeyValue(y.value);else{var $={key:x,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};g=o._interpolate(t,$)}c.referenceValue=g.clone?g.clone():g,h=!0}if(!_&&d>=v.frame&&d<=y.frame){if(d===v.frame)a=x;else if(d===y.frame)a=x+1;else{$={key:x,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};var b={frame:d,value:(g=o._interpolate(d,$)).clone?g.clone():g};o._keys.splice(x+1,0,b),a=x+1}_=!0}if(!m&&f>=v.frame&&f<=y.frame){if(f===v.frame)l=x;else if(f===y.frame)l=x+1;else{$={key:x,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT},b={frame:f,value:(g=o._interpolate(f,$)).clone?g.clone():g};o._keys.splice(x+1,0,b),l=x+1}m=!0}x++}o.dataType===_0x142894.ANIMATIONTYPE_QUATERNION?c.referenceValue.normalize().conjugateInPlace():o.dataType===_0x142894.ANIMATIONTYPE_MATRIX&&(c.referenceValue.decompose(c.referenceScaling,c.referenceQuaternion,c.referencePosition),c.referenceQuaternion.normalize().conjugateInPlace());for(x=a;x<=l;x++){b=o._keys[x];if(!x||o.dataType===_0x142894.ANIMATIONTYPE_FLOAT||b.value!==s.value)switch(o.dataType){case _0x142894.ANIMATIONTYPE_MATRIX:b.value.decompose(c.keyScaling,c.keyQuaternion,c.keyPosition),c.keyPosition.subtractInPlace(c.referencePosition),c.keyScaling.divideInPlace(c.referenceScaling),c.referenceQuaternion.multiplyToRef(c.keyQuaternion,c.keyQuaternion),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.ComposeToRef(c.keyScaling,c.keyQuaternion,c.keyPosition,b.value);break;case _0x142894.ANIMATIONTYPE_QUATERNION:c.referenceValue.multiplyToRef(b.value,b.value);break;case _0x142894.ANIMATIONTYPE_VECTOR2:case _0x142894.ANIMATIONTYPE_VECTOR3:case _0x142894.ANIMATIONTYPE_COLOR3:case _0x142894.ANIMATIONTYPE_COLOR4:b.value.subtractToRef(c.referenceValue,b.value);break;case _0x142894.ANIMATIONTYPE_SIZE:b.value.width-=c.referenceValue.width,b.value.height-=c.referenceValue.height;break;default:b.value-=c.referenceValue}}return o},_0x142894.TransitionTo=function(e,t,i,n,r,o,a,s){if(void 0===s&&(s=null),a<=0)return i[e]=t,s&&s(),null;var l=r*(a/1e3);o.setKeys([{frame:0,value:i[e].clone?i[e].clone():i[e]},{frame:l,value:t}]),i.animations||(i.animations=[]),i.animations.push(o);var u=n.beginAnimation(i,0,l,!1);return u.onAnimationEnd=s,u},Object.defineProperty(_0x142894.prototype,"runtimeAnimations",{get:function(){return this._runtimeAnimations},enumerable:!1,configurable:!0}),Object.defineProperty(_0x142894.prototype,"hasRunningRuntimeAnimations",{get:function(){for(var e=0,t=this._runtimeAnimations;e<t.length;e++){if(!t[e].isStopped)return!0}return!1},enumerable:!1,configurable:!0}),_0x142894.prototype.toString=function(e){var t="Name: "+this.name+", property: "+this.targetProperty;if(t+=", datatype: "+["Float","Vector3","Quaternion","Matrix","Color3","Vector2"][this.dataType],t+=", nKeys: "+(this._keys?this._keys.length:"none"),t+=", nRanges: "+(this._ranges?Object.keys(this._ranges).length:"none"),e){t+=", Ranges: {";var i=!0;for(var n in this._ranges)i&&(t+=", ",i=!1),t+=n;t+="}"}return t},_0x142894.prototype.addEvent=function(e){this._events.push(e),this._events.sort((function(e,t){return e.frame-t.frame}))},_0x142894.prototype.removeEvents=function(e){for(var t=0;t<this._events.length;t++)this._events[t].frame===e&&(this._events.splice(t,1),t--)},_0x142894.prototype.getEvents=function(){return this._events},_0x142894.prototype.createRange=function(e,t,i){this._ranges[e]||(this._ranges[e]=new _animationRange__WEBPACK_IMPORTED_MODULE_6__.AnimationRange(e,t,i))},_0x142894.prototype.deleteRange=function(e,t){void 0===t&&(t=!0);var i=this._ranges[e];if(i){if(t)for(var n=i.from,r=i.to,o=this._keys.length-1;o>=0;o--)this._keys[o].frame>=n&&this._keys[o].frame<=r&&this._keys.splice(o,1);this._ranges[e]=null}},_0x142894.prototype.getRange=function(e){return this._ranges[e]},_0x142894.prototype.getKeys=function(){return this._keys},_0x142894.prototype.getHighestFrame=function(){for(var e=0,t=0,i=this._keys.length;t<i;t++)e<this._keys[t].frame&&(e=this._keys[t].frame);return e},_0x142894.prototype.getEasingFunction=function(){return this._easingFunction},_0x142894.prototype.setEasingFunction=function(e){this._easingFunction=e},_0x142894.prototype.floatInterpolateFunction=function(e,t,i){return _Maths_math_scalar__WEBPACK_IMPORTED_MODULE_2__.Scalar.Lerp(e,t,i)},_0x142894.prototype.floatInterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_scalar__WEBPACK_IMPORTED_MODULE_2__.Scalar.Hermite(e,t,i,n,r)},_0x142894.prototype.quaternionInterpolateFunction=function(e,t,i){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Slerp(e,t,i)},_0x142894.prototype.quaternionInterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Hermite(e,t,i,n,r).normalize()},_0x142894.prototype.vector3InterpolateFunction=function(e,t,i){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Lerp(e,t,i)},_0x142894.prototype.vector3InterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Hermite(e,t,i,n,r)},_0x142894.prototype.vector2InterpolateFunction=function(e,t,i){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector2.Lerp(e,t,i)},_0x142894.prototype.vector2InterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector2.Hermite(e,t,i,n,r)},_0x142894.prototype.sizeInterpolateFunction=function(e,t,i){return _Maths_math_size__WEBPACK_IMPORTED_MODULE_8__.Size.Lerp(e,t,i)},_0x142894.prototype.color3InterpolateFunction=function(e,t,i){return _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color3.Lerp(e,t,i)},_0x142894.prototype.color4InterpolateFunction=function(e,t,i){return _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color4.Lerp(e,t,i)},_0x142894.prototype._getKeyValue=function(e){return"function"==typeof e?e():e},_0x142894.prototype._interpolate=function(e,t){if(t.loopMode===_0x142894.ANIMATIONLOOPMODE_CONSTANT&&t.repeatCount>0)return t.highLimitValue.clone?t.highLimitValue.clone():t.highLimitValue;var i=this._keys;if(1===i.length)return this._getKeyValue(i[0].value);var n=t.key;if(i[n].frame>=e)for(;n-1>=0&&i[n].frame>=e;)n--;for(var r=n;r<i.length;r++){var o=i[r+1];if(o.frame>=e){t.key=r;var a=i[r],s=this._getKeyValue(a.value);if(a.interpolation===_animationKey__WEBPACK_IMPORTED_MODULE_5__.AnimationKeyInterpolation.STEP)return s;var l=this._getKeyValue(o.value),u=void 0!==a.outTangent&&void 0!==o.inTangent,c=o.frame-a.frame,h=(e-a.frame)/c,d=this.getEasingFunction();switch(null!=d&&(h=d.ease(h)),this.dataType){case _0x142894.ANIMATIONTYPE_FLOAT:var f=u?this.floatInterpolateFunctionWithTangents(s,a.outTangent*c,l,o.inTangent*c,h):this.floatInterpolateFunction(s,l,h);switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return f;case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return t.offsetValue*t.repeatCount+f}break;case _0x142894.ANIMATIONTYPE_QUATERNION:var p=u?this.quaternionInterpolateFunctionWithTangents(s,a.outTangent.scale(c),l,o.inTangent.scale(c),h):this.quaternionInterpolateFunction(s,l,h);switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return p;case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return p.addInPlace(t.offsetValue.scale(t.repeatCount))}return p;case _0x142894.ANIMATIONTYPE_VECTOR3:var _=u?this.vector3InterpolateFunctionWithTangents(s,a.outTangent.scale(c),l,o.inTangent.scale(c),h):this.vector3InterpolateFunction(s,l,h);switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return _;case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return _.add(t.offsetValue.scale(t.repeatCount))}case _0x142894.ANIMATIONTYPE_VECTOR2:var m=u?this.vector2InterpolateFunctionWithTangents(s,a.outTangent.scale(c),l,o.inTangent.scale(c),h):this.vector2InterpolateFunction(s,l,h);switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return m;case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return m.add(t.offsetValue.scale(t.repeatCount))}case _0x142894.ANIMATIONTYPE_SIZE:switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return this.sizeInterpolateFunction(s,l,h);case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return this.sizeInterpolateFunction(s,l,h).add(t.offsetValue.scale(t.repeatCount))}case _0x142894.ANIMATIONTYPE_COLOR3:switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return this.color3InterpolateFunction(s,l,h);case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return this.color3InterpolateFunction(s,l,h).add(t.offsetValue.scale(t.repeatCount))}case _0x142894.ANIMATIONTYPE_COLOR4:switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return this.color4InterpolateFunction(s,l,h);case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return this.color4InterpolateFunction(s,l,h).add(t.offsetValue.scale(t.repeatCount))}case _0x142894.ANIMATIONTYPE_MATRIX:switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:if(_0x142894.AllowMatricesInterpolation)return this.matrixInterpolateFunction(s,l,h,t.workValue);case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return s}}break}}return this._getKeyValue(i[i.length-1].value)},_0x142894.prototype.matrixInterpolateFunction=function(e,t,i,n){return _0x142894.AllowMatrixDecomposeForInterpolation?n?(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.DecomposeLerpToRef(e,t,i,n),n):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.DecomposeLerp(e,t,i):n?(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.LerpToRef(e,t,i,n),n):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.Lerp(e,t,i)},_0x142894.prototype.clone=function(){var e=new _0x142894(this.name,this.targetPropertyPath.join("."),this.framePerSecond,this.dataType,this.loopMode);if(e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed,this._keys&&e.setKeys(this._keys),this._ranges)for(var t in e._ranges={},this._ranges){var i=this._ranges[t];!i||(e._ranges[t]=i.clone())}return e},_0x142894.prototype.setKeys=function(e){this._keys=e.slice(0)},_0x142894.prototype.serialize=function(){var e={};e.name=this.name,e.property=this.targetProperty,e.framePerSecond=this.framePerSecond,e.dataType=this.dataType,e.loopBehavior=this.loopMode,e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed;var t=this.dataType;e.keys=[];for(var i=this.getKeys(),n=0;n<i.length;n++){var r=i[n],o={};switch(o.frame=r.frame,t){case _0x142894.ANIMATIONTYPE_FLOAT:o.values=[r.value],void 0!==r.inTangent&&o.values.push(r.inTangent),void 0!==r.outTangent&&(void 0===r.inTangent&&o.values.push(void 0),o.values.push(r.outTangent));break;case _0x142894.ANIMATIONTYPE_QUATERNION:case _0x142894.ANIMATIONTYPE_MATRIX:case _0x142894.ANIMATIONTYPE_VECTOR3:case _0x142894.ANIMATIONTYPE_COLOR3:case _0x142894.ANIMATIONTYPE_COLOR4:o.values=r.value.asArray(),null!=r.inTangent&&o.values.push(r.inTangent.asArray()),null!=r.outTangent&&(void 0===r.inTangent&&o.values.push(void 0),o.values.push(r.outTangent.asArray()))}e.keys.push(o)}for(var a in e.ranges=[],this._ranges){var s=this._ranges[a];if(s){var l={};l.name=a,l.from=s.from,l.to=s.to,e.ranges.push(l)}}return e},_0x142894._UniversalLerp=function(e,t,i){var n=e.constructor;return n.Lerp?n.Lerp(e,t,i):n.Slerp?n.Slerp(e,t,i):e.toFixed?e*(1-i)+i*t:t},_0x142894.Parse=function(e){var t,i,n=new _0x142894(e.name,e.property,e.framePerSecond,e.dataType,e.loopBehavior),r=e.dataType,o=[];for(e.enableBlending&&(n.enableBlending=e.enableBlending),e.blendingSpeed&&(n.blendingSpeed=e.blendingSpeed),i=0;i<e.keys.length;i++){var a,s,l=e.keys[i];switch(r){case _0x142894.ANIMATIONTYPE_FLOAT:t=l.values[0],l.values.length>=1&&(a=l.values[1]),l.values.length>=2&&(s=l.values[2]);break;case _0x142894.ANIMATIONTYPE_QUATERNION:if(t=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(l.values),l.values.length>=8){var u=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(l.values.slice(4,8));u.equals(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Zero())||(a=u)}if(l.values.length>=12){var c=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(l.values.slice(8,12));c.equals(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Zero())||(s=c)}break;case _0x142894.ANIMATIONTYPE_MATRIX:t=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.FromArray(l.values);break;case _0x142894.ANIMATIONTYPE_COLOR3:t=_Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color3.FromArray(l.values);break;case _0x142894.ANIMATIONTYPE_COLOR4:t=_Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color4.FromArray(l.values);break;case _0x142894.ANIMATIONTYPE_VECTOR3:default:t=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.FromArray(l.values)}var h={};h.frame=l.frame,h.value=t,null!=a&&(h.inTangent=a),null!=s&&(h.outTangent=s),o.push(h)}if(n.setKeys(o),e.ranges)for(i=0;i<e.ranges.length;i++)t=e.ranges[i],n.createRange(t.name,t.from,t.to);return n},_0x142894.AppendSerializedAnimations=function(e,t){_Misc_decorators__WEBPACK_IMPORTED_MODULE_3__.SerializationHelper.AppendSerializedAnimations(e,t)},_0x142894.ParseFromFileAsync=function(e,t){var i=this;return new Promise((function(n,r){var o=new _Misc_webRequest__WEBPACK_IMPORTED_MODULE_9__.WebRequest;o.addEventListener("readystatechange",(function(){if(4==o.readyState)if(200==o.status){var t=JSON.parse(o.responseText);if(t.length){for(var a=new Array,s=0,l=t;s<l.length;s++){var u=l[s];a.push(i.Parse(u))}n(a)}else{a=i.Parse(t);e&&(a.name=e),n(a)}}else r("Unable to load the animation")})),o.open("GET",t),o.send()}))},_0x142894.CreateFromSnippetAsync=function(e){var t=this;return new Promise((function(i,n){var r=new _Misc_webRequest__WEBPACK_IMPORTED_MODULE_9__.WebRequest;r.addEventListener("readystatechange",(function(){if(4==r.readyState)if(200==r.status){var o=JSON.parse(JSON.parse(r.responseText).jsonPayload);if(o.animations){for(var a=JSON.parse(o.animations),s=new Array,l=0,u=a;l<u.length;l++){var c=u[l];s.push(t.Parse(c))}i(s)}else{a=JSON.parse(o.animation);(s=t.Parse(a)).snippetId=e,i(s)}}else n("Unable to load the snippet "+e)})),r.open("GET",t.SnippetUrl+"/"+e.replace(/#/g,"/")),r.send()}))},_0x142894.AllowMatricesInterpolation=!1,_0x142894.AllowMatrixDecomposeForInterpolation=!0,_0x142894.SnippetUrl="",_0x142894.ANIMATIONTYPE_FLOAT=0,_0x142894.ANIMATIONTYPE_VECTOR3=1,_0x142894.ANIMATIONTYPE_QUATERNION=2,_0x142894.ANIMATIONTYPE_MATRIX=3,_0x142894.ANIMATIONTYPE_COLOR3=4,_0x142894.ANIMATIONTYPE_COLOR4=7,_0x142894.ANIMATIONTYPE_VECTOR2=5,_0x142894.ANIMATIONTYPE_SIZE=6,_0x142894.ANIMATIONLOOPMODE_RELATIVE=0,_0x142894.ANIMATIONLOOPMODE_CYCLE=1,_0x142894.ANIMATIONLOOPMODE_CONSTANT=2;var _0x39392f=(_0x267fbd=!0,function(e,t){var i=_0x267fbd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x267fbd=!1,i}),_0x2f757e=_0x39392f(void 0,(function(){return _0x2f757e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f757e).search("(((.+)+)+)+$")})),_0x267fbd;function _0x2c1e2b(){}_0x2f757e(),_0x2c1e2b.WithinEpsilon=function(e,t,i){void 0===i&&(i=1401298e-51);var n=e-t;return-i<=n&&n<=i},_0x2c1e2b.ToHex=function(e){var t=e.toString(16);return e<=15?("0"+t).toUpperCase():t.toUpperCase()},_0x2c1e2b.Sign=function(e){return 0===(e=+e)||isNaN(e)?e:e>0?1:-1},_0x2c1e2b.Clamp=function(e,t,i){return void 0===t&&(t=0),void 0===i&&(i=1),Math.min(i,Math.max(t,e))},_0x2c1e2b.Log2=function(e){return Math.log(e)*Math.LOG2E},_0x2c1e2b.Repeat=function(e,t){return e-Math.floor(e/t)*t},_0x2c1e2b.Normalize=function(e,t,i){return(e-t)/(i-t)},_0x2c1e2b.Denormalize=function(e,t,i){return e*(i-t)+t},_0x2c1e2b.DeltaAngle=function(e,t){var i=_0x2c1e2b.Repeat(t-e,360);return i>180&&(i-=360),i},_0x2c1e2b.PingPong=function(e,t){var i=_0x2c1e2b.Repeat(e,2*t);return t-Math.abs(i-t)},_0x2c1e2b.SmoothStep=function(e,t,i){var n=_0x2c1e2b.Clamp(i);return t*(n=-2*n*n*n+3*n*n)+e*(1-n)},_0x2c1e2b.MoveTowards=function(e,t,i){return Math.abs(t-e)<=i?t:e+_0x2c1e2b.Sign(t-e)*i},_0x2c1e2b.MoveTowardsAngle=function(e,t,i){var n=_0x2c1e2b.DeltaAngle(e,t),r=0;return-i<n&&n<i?r=t:(t=e+n,r=_0x2c1e2b.MoveTowards(e,t,i)),r},_0x2c1e2b.Lerp=function(e,t,i){return e+(t-e)*i},_0x2c1e2b.LerpAngle=function(e,t,i){var n=_0x2c1e2b.Repeat(t-e,360);return n>180&&(n-=360),e+n*_0x2c1e2b.Clamp(i)},_0x2c1e2b.InverseLerp=function(e,t,i){return e!=t?_0x2c1e2b.Clamp((i-e)/(t-e)):0},_0x2c1e2b.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o;return e*(2*a-3*o+1)+i*(-2*a+3*o)+t*(a-2*o+r)+n*(a-o)},_0x2c1e2b.RandomRange=function(e,t){return e===t?e:Math.random()*(t-e)+e},_0x2c1e2b.RangeToPercent=function(e,t,i){return(e-t)/(i-t)},_0x2c1e2b.PercentToRange=function(e,t,i){return(i-t)*e+t},_0x2c1e2b.NormalizeRadians=function(e){return e-=_0x2c1e2b.TwoPi*Math.floor((e+Math.PI)/_0x2c1e2b.TwoPi)},_0x2c1e2b.TwoPi=2*Math.PI;var _0x475e35=(_0x209660=!0,function(e,t){var i=_0x209660?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x209660=!1,i}),_0x58a92c=_0x475e35(void 0,(function(){return _0x58a92c.toString().search("(((.+)+)+)+$").toString().constructor(_0x58a92c).search("(((.+)+)+)+$")})),_0x209660;function _0x19aa0e(e,t,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=i}_0x58a92c();var _0x211ea0=new o$1p;_0x19aa0e.prototype.startDirectionFunction=function(e,t,i,n){_0x211ea0=p$1d.getTranslation(e,_0x211ea0);var r=new o$1p;o$1p.subtract(i.position,_0x211ea0,r),o$1p.normalize(r,r);var o=_0x2c1e2b.RandomRange(0,this.directionRandomizer),a=_0x2c1e2b.RandomRange(0,this.directionRandomizer),s=_0x2c1e2b.RandomRange(0,this.directionRandomizer);r.x+=o,r.y+=a,r.z+=s,o$1p.normalize(r,r),n?o$1p.clone(r,t):p$1d.multiplyByDirection(e,r,t)},_0x19aa0e.prototype.startPositionFunction=function(e,t,i,n){var r=this.radius-_0x2c1e2b.RandomRange(0,this.radius*this.radiusRange),o=_0x2c1e2b.RandomRange(0,1),a=_0x2c1e2b.RandomRange(0,2*Math.PI),s=Math.acos(2*o-1),l=r*Math.cos(a)*Math.sin(s),u=r*Math.cos(s),c=r*Math.sin(a)*Math.sin(s);if(n)return t.x=l,t.y=c,void(t.z=u);_0x211ea0.x=l,_0x211ea0.y=c,_0x211ea0.z=u,p$1d.multiplyByPoint(e,_0x211ea0,t)},_0x19aa0e.prototype.clone=function(){var e=new _0x19aa0e(this.radius,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x19aa0e.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer}},_0x19aa0e.prototype.getEffectDefines=function(e){e.push("SPHEREEMITTER")},_0x19aa0e.prototype.getClassName=function(){return"SphereParticleEmitter"},_0x19aa0e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},_0x19aa0e.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer};var _0x35f9b1=(_0x3faa38=!0,function(e,t){var i=_0x3faa38?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3faa38=!1,i}),_0x1910ca=_0x35f9b1(void 0,(function(){return _0x1910ca.toString().search("(((.+)+)+)+$").toString().constructor(_0x1910ca).search("(((.+)+)+)+$")})),_0x3faa38;function _0x18a488(e,t,i){void 0===e&&(e=1),void 0===t&&(t=new o$1p(0,1,0)),void 0===i&&(i=new o$1p(0,1,0)),this.radius=e,this.height=1,this.radiusRange=1,this.directionRandomizer=0;var n=this;return n.direction1=t,n.direction2=i,n}_0x1910ca();var _0x255d89=new o$1p;_0x18a488.prototype.startDirectionFunction=function(e,t,i){var n=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),r=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),o=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);_0x255d89.x=n,_0x255d89.y=o,_0x255d89.z=r,p$1d.multiplyByDirection(e,_0x255d89,t)},_0x18a488.prototype.startPositionFunction=function(e,t,i){var n=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),r=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),o=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);_0x255d89.x=n,_0x255d89.y=o,_0x255d89.z=r,p$1d.multiplyByPoint(e,_0x255d89,t)},_0x18a488.prototype.clone=function(){var e=new _0x18a488(this.radius,this.direction1,this.direction2);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x18a488.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.radiusRange=function(){return t.radiusRange},e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x18a488.prototype.getEffectDefines=function(e){e.push("SPHEREEMITTER"),e.push("DIRECTEDSPHEREEMITTER")},_0x18a488.prototype.getClassName=function(){return"SphereDirectedParticleEmitter"},_0x18a488.prototype.serialize=function(){var e=_super.prototype.serialize.call(this);return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},_0x18a488.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer,o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2)};var _0x1c742c=(_0x128659=!0,function(e,t){var i=_0x128659?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x128659=!1,i}),_0x1eb322=_0x1c742c(void 0,(function(){return _0x1eb322.toString().search("(((.+)+)+)+$").toString().constructor(_0x1eb322).search("(((.+)+)+)+$")})),_0x128659;function _0xf9ea81(e,t,i){void 0===e&&(e=1),void 0===t&&(t=Math.PI),void 0===i&&(i=0),this.directionRandomizer=i,this.radiusRange=1,this.heightRange=1,this.emitFromSpawnPointOnly=!1,this.angle=t,this.radius=e}_0x1eb322(),Object.defineProperty(_0xf9ea81.prototype,"radius",{get:function(){return this._radius},set:function(e){this._radius=e,this._buildHeight()},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf9ea81.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this._buildHeight()},enumerable:!1,configurable:!0}),_0xf9ea81.prototype._buildHeight=function(){0!==this._angle?this._height=this._radius/Math.tan(this._angle/2):this._height=1};var _0x71fe81=new o$1p;_0xf9ea81.prototype.startDirectionFunction=function(e,t,i,n){n?(o$1p.clone(i._localPositio,_0x71fe81),o$1p.normalize(_0x71fe81,_0x71fe81)):(_0x71fe81=p$1d.getTranslation(e,_0x71fe81),o$1p.subtract(i.position,_0x71fe81,_0x71fe81),0==!o$1p.magnitudeSquared(_0x71fe81)&&o$1p.normalize(_0x71fe81,_0x71fe81));var r=_0x2c1e2b.RandomRange(0,this.directionRandomizer),o=_0x2c1e2b.RandomRange(0,this.directionRandomizer),a=_0x2c1e2b.RandomRange(0,this.directionRandomizer);t.x=_0x71fe81.x+r,t.y=_0x71fe81.y+o,t.z=_0x71fe81.z+a,0==!o$1p.magnitudeSquared(t)&&o$1p.normalize(t,t)},_0xf9ea81.prototype.startPositionFunction=function(e,t,i,n){var r,o=_0x2c1e2b.RandomRange(0,2*Math.PI);this.emitFromSpawnPointOnly?r=1e-4:r=1-(r=_0x2c1e2b.RandomRange(0,this.heightRange))*r;var a=this._radius-_0x2c1e2b.RandomRange(0,this._radius*this.radiusRange),s=(a*=r)*Math.sin(o),l=a*Math.cos(o),u=r*this._height;if(n)return t.x=s,t.y=l,void(t.z=u);_0x71fe81.x=s,_0x71fe81.y=l,_0x71fe81.z=u,p$1d.multiplyByPoint(e,_0x71fe81,t)},_0xf9ea81.prototype.clone=function(){var e=new _0xf9ea81(this._radius,this._angle,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e};var _0x418902=new o$1o,_0x438c21=new o$1o;_0xf9ea81.prototype.applyToShader=function(e){var t=this;e.radius=function(){return _0x418902.x=t._radius,_0x418902.y=t.radiusRange,_0x418902},e.coneAngle=function(){return t._angle},e.height=function(){return _0x438c21.x=t._height,_0x438c21.y=t.heightRange,_0x438c21},e.directionRandomizer=function(){return t.directionRandomizer}},_0xf9ea81.prototype.getEffectDefines=function(e){e.push("CONEEMITTER"),this.emitFromSpawnPointOnly&&e.push("CONEEMITTERSPAWNPOINT")},_0xf9ea81.prototype.getClassName=function(){return"ConeParticleEmitter"},_0xf9ea81.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this._radius,e.angle=this._angle,e.directionRandomizer=this.directionRandomizer,e.radiusRange=this.radiusRange,e.heightRange=this.heightRange,e.emitFromSpawnPointOnly=this.emitFromSpawnPointOnly,e},_0xf9ea81.prototype.parse=function(e){this.radius=e.radius,this.angle=e.angle,this.directionRandomizer=e.directionRandomizer,this.radiusRange=void 0!==e.radiusRange?e.radiusRange:1,this.heightRange=void 0!==e.radiusRange?e.heightRange:1,this.emitFromSpawnPointOnly=void 0!==e.emitFromSpawnPointOnly&&e.emitFromSpawnPointOnly};var _0x141db2=(_0x488be1=!0,function(e,t){var i=_0x488be1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x488be1=!1,i}),_0x477154=_0x141db2(void 0,(function(){return _0x477154.toString().search("(((.+)+)+)+$").toString().constructor(_0x477154).search("(((.+)+)+)+$")})),_0x488be1;function _0x17a06c(e,t,i,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=0),this.radius=e,this.height=t,this.radiusRange=i,this.directionRandomizer=n}_0x477154();var _0x56849e=new o$1p;_0x17a06c.prototype.startDirectionFunction=function(e,t,i,n){_0x56849e=p$1d.getTranslation(e,_0x56849e);var r=new o$1p;o$1p.subtract(i.position,_0x56849e,r),o$1p.normalize(r,r);var o=_0x2c1e2b.RandomRange(-this.directionRandomizer/2,this.directionRandomizer/2),a=Math.atan2(r.x,r.z);a+=_0x2c1e2b.RandomRange(-Math.PI/2,Math.PI/2)*this.directionRandomizer,r.z=o,r.x=Math.sin(a),r.y=Math.cos(a),o$1p.normalize(r,r),n?o$1p.clone(r,t):p$1d.multiplyByDirection(e,r,t)},_0x17a06c.prototype.startPositionFunction=function(e,t,i,n){var r=_0x2c1e2b.RandomRange(-this.height/2,this.height/2),o=_0x2c1e2b.RandomRange(0,2*Math.PI),a=_0x2c1e2b.RandomRange((1-this.radiusRange)*(1-this.radiusRange),1),s=Math.sqrt(a)*this.radius,l=s*Math.cos(o),u=s*Math.sin(o);if(n)return t.x=l,t.y=r,void(t.z=u);_0x56849e.x=l,_0x56849e.y=r,_0x56849e.z=u,p$1d.multiplyByPoint(e,_0x56849e,t)},_0x17a06c.prototype.clone=function(){var e=new _0x17a06c(this.radius,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x17a06c.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.height=function(){return t.height},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer}},_0x17a06c.prototype.getEffectDefines=function(e){e.push("CYLINDEREMITTER")},_0x17a06c.prototype.getClassName=function(){return"CylinderParticleEmitter"},_0x17a06c.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.height=this.height,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},_0x17a06c.prototype.parse=function(e){this.radius=e.radius,this.height=e.height,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer};var _0x5d74dc=(_0x32ce7b=!0,function(e,t){var i=_0x32ce7b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x32ce7b=!1,i}),_0xc67336=_0x5d74dc(void 0,(function(){return _0xc67336.toString().search("(((.+)+)+)+$").toString().constructor(_0xc67336).search("(((.+)+)+)+$")})),_0x32ce7b;function _0x732f89(e,t,i,n,r){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=new o$1p(0,1,0)),void 0===r&&(r=new o$1p(0,1,0)),this.radius=e,this.height=t,this.radiusRange=i,this.directionRandomizer=0;var o=this;return o.direction1=n,o.direction2=r,o}_0xc67336();var _0x1178ce=new o$1p;_0x732f89.prototype.startDirectionFunction=function(e,t,i){var n=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),r=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),o=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);_0x1178ce.x=n,_0x1178ce.y=r,_0x1178ce.z=o,p$1d.multiplyByDirection(e,_0x1178ce,t)},_0x732f89.prototype.startPositionFunction=function(e,t,i){var n=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),r=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),o=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);_0x1178ce.x=n,_0x1178ce.y=o,_0x1178ce.z=r,p$1d.multiplyByPoint(e,_0x1178ce,t)},_0x732f89.prototype.clone=function(){var e=new _0x732f89(this.radius,this.height,this.radiusRange,this.direction1,this.direction2);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x732f89.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.height=function(){return t.height},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer},e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x732f89.prototype.getEffectDefines=function(e){e.push("CYLINDEREMITTER"),e.push("CYLINDEREMITDIRECTEDCYLINDEREMITTERTER")},_0x732f89.prototype.getClassName=function(){return"CylinderDirectedParticleEmitter"},_0x732f89.prototype.serialize=function(){var e=_super.prototype.serialize.call(this);return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},_0x732f89.prototype.parse=function(e){this.radius=e.radius,this.height=e.height,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer,o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2)};var _0x598a05=(_0x3f996f=!0,function(e,t){var i=_0x3f996f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f996f=!1,i}),_0x19ab5a=_0x598a05(void 0,(function(){return _0x19ab5a.toString().search("(((.+)+)+)+$").toString().constructor(_0x19ab5a).search("(((.+)+)+)+$")})),_0x3f996f;function _0x498a84(e,t,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=i}_0x19ab5a();var _0x4bb81d=new o$1p;_0x498a84.prototype.startDirectionFunction=function(e,t,i,n){_0x4bb81d=p$1d.getTranslation(e,_0x4bb81d);var r=new o$1p;o$1p.subtract(i.position,_0x4bb81d,r),o$1p.normalize(r,r);var o=_0x2c1e2b.RandomRange(0,this.directionRandomizer),a=_0x2c1e2b.RandomRange(0,this.directionRandomizer),s=_0x2c1e2b.RandomRange(0,this.directionRandomizer);r.x+=o,r.y+=a,r.z+=s,o$1p.normalize(r,r),n?o$1p.clone(r,t):p$1d.multiplyByDirection(e,r,t)},_0x498a84.prototype.startPositionFunction=function(e,t,i,n){var r=this.radius-_0x2c1e2b.RandomRange(0,this.radius*this.radiusRange),o=_0x2c1e2b.RandomRange(0,1),a=_0x2c1e2b.RandomRange(0,2*Math.PI),s=Math.acos(2*o-1),l=r*Math.cos(a)*Math.sin(s),u=r*Math.cos(s),c=r*Math.sin(a)*Math.sin(s);if(n)return t.x=l,t.y=c,void(t.z=Math.abs(u));_0x4bb81d.x=l,_0x4bb81d.y=c,_0x4bb81d.z=Math.abs(u),p$1d.multiplyByPoint(e,_0x4bb81d,t)},_0x498a84.prototype.clone=function(){var e=new _0x498a84(this.radius,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x498a84.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer}},_0x498a84.prototype.getEffectDefines=function(e){e.push("HEMISPHERICEMITTER")},_0x498a84.prototype.getClassName=function(){return"HemisphericParticleEmitter"},_0x498a84.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},_0x498a84.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer};var _0x2f2345=(_0x2de777=!0,function(e,t){var i=_0x2de777?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2de777=!1,i}),_0x43c2ae=_0x2f2345(void 0,(function(){return _0x43c2ae.toString().search("(((.+)+)+)+$").toString().constructor(_0x43c2ae).search("(((.+)+)+)+$")})),_0x2de777;function _0x21fe0a(){this.direction1=new o$1p(0,1,0),this.direction2=new o$1p(0,1,0)}_0x43c2ae();var _0x2b94ae=new o$1p;_0x21fe0a.prototype.startDirectionFunction=function(e,t,i,n){var r=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),o=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),a=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);if(n)return t.x=r,t.y=a,void(t.z=o);_0x2b94ae.x=r,_0x2b94ae.y=a,_0x2b94ae.z=o,p$1d.multiplyByDirection(e,_0x2b94ae,t)},_0x21fe0a.prototype.startPositionFunction=function(e,t,i,n){if(n)return t.x=0,t.y=0,void(t.z=0);p$1d.multiplyByPoint(e,o$1p.ZERO,t)},_0x21fe0a.prototype.clone=function(){var e=new _0x21fe0a;return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x21fe0a.prototype.applyToShader=function(e){var t=this;e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x21fe0a.prototype.getEffectDefines=function(e){e.push("POINTEMITTER")},_0x21fe0a.prototype.getClassName=function(){return"PointParticleEmitter"},_0x21fe0a.prototype.serialize=function(){var e={};e.type=this.getClassName();var t=[],i=[];return o$1p.pack(this.direction1,t,0),o$1p.pack(this.direction2,i,0),e.direction1=t,e.direction2=i,e},_0x21fe0a.prototype.parse=function(e){o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2)};var _0x508933=(_0x537436=!0,function(e,t){var i=_0x537436?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x537436=!1,i}),_0x16e32e=_0x508933(void 0,(function(){return _0x16e32e.toString().search("(((.+)+)+)+$").toString().constructor(_0x16e32e).search("(((.+)+)+)+$")})),_0x537436;function _0x419949(){this.direction1=new o$1p(0,1,0),this.direction2=new o$1p(0,1,0),this.minEmitBox=new o$1p(-.5,-.5,-.5),this.maxEmitBox=new o$1p(.5,.5,.5)}_0x16e32e();var _0x1f6721=new o$1p;_0x419949.prototype.startDirectionFunction=function(e,t,i,n){var r=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),o=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),a=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);if(n)return t.x=r,t.y=a,void(t.z=o);_0x1f6721.x=r,_0x1f6721.y=a,_0x1f6721.z=o,p$1d.multiplyByDirection(e,_0x1f6721,t)},_0x419949.prototype.startPositionFunction=function(e,t,i,n){var r=_0x2c1e2b.RandomRange(this.minEmitBox.x,this.maxEmitBox.x),o=_0x2c1e2b.RandomRange(this.minEmitBox.y,this.maxEmitBox.y),a=_0x2c1e2b.RandomRange(this.minEmitBox.z,this.maxEmitBox.z);if(n)return t.x=r,t.y=a,void(t.z=o);_0x1f6721.x=r,_0x1f6721.y=a,_0x1f6721.z=o,p$1d.multiplyByPoint(e,_0x1f6721,t)},_0x419949.prototype.clone=function(){var e=new _0x419949;return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x419949.prototype.applyToShader=function(e){var t=this;e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2},e.minEmitBox=function(){return t.minEmitBox},e.maxEmitBox=function(){return t.maxEmitBox}},_0x419949.prototype.getEffectDefines=function(e){e.push("BOXEMITTER")},_0x419949.prototype.getClassName=function(){return"BoxParticleEmitter"},_0x419949.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e.minEmitBox=this.minEmitBox.asArray(),e.maxEmitBox=this.maxEmitBox.asArray(),e},_0x419949.prototype.parse=function(e){o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2),o$1p.unpack(e.minEmitBox,0,this.minEmitBox),o$1p.unpack(e.maxEmitBox,0,this.maxEmitBox)};var _0x2307b7=(_0x54681e=!0,function(e,t){var i=_0x54681e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x54681e=!1,i}),_0x4ba4c3=_0x2307b7(void 0,(function(){return _0x4ba4c3.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ba4c3).search("(((.+)+)+)+$")})),_0x54681e;_0x4ba4c3();var _0x56747d={BILLBOARDMODE_Y:2,BILLBOARDMODE_ALL:7,BILLBOARDMODE_STRETCHED:8},_0x29b01c=Object.freeze(_0x56747d),_0x5f1b1e=(_0x276707=!0,function(e,t){var i=_0x276707?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x276707=!1,i}),_0x104b8b=_0x5f1b1e(void 0,(function(){return _0x104b8b.toString().search("(((.+)+)+)+$").toString().constructor(_0x104b8b).search("(((.+)+)+)+$")})),_0x276707;_0x104b8b();var _0xb610a9={BLENDMODE_ONEONE:0,BLENDMODE_STANDARD:1,BLENDMODE_ADD:2,BLENDMODE_MULTIPLY:3,BLENDMODE_MULTIPLYADD:4},_0x5f5957=Object.freeze(_0xb610a9),_0x429982=(_0x51dfc7=!0,function(e,t){var i=_0x51dfc7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51dfc7=!1,i}),_0xb32716=_0x429982(void 0,(function(){return _0xb32716.toString().search("(((.+)+)+)+$").toString().constructor(_0xb32716).search("(((.+)+)+)+$")})),_0x51dfc7;function _0x36dee7(e){this.animations=[],this.renderingGroupId=0,this.emitter=new o$1p(0,0,0),this.emitRate=10,this.manualEmitCount=-1,this.updateSpeed=.01,this.targetStopDuration=0,this.disposeOnStop=!1,this.minEmitPower=1,this.maxEmitPower=1,this.minLifeTime=1,this.maxLifeTime=1,this.minSize=1,this.maxSize=1,this.minScaleX=1,this.maxScaleX=1,this.minScaleY=1,this.maxScaleY=1,this.minInitialRotation=0,this.maxInitialRotation=0,this.minAngularSpeed=0,this.maxAngularSpeed=0,this.layerMask=268435455,this.customShader=null,this.preventAutoStart=!1,this.noiseStrength=new o$1p(10,10,10),this.onAnimationEnd=null,this.blendMode=_0x36dee7.BLENDMODE_ONEONE,this.forceDepthWrite=!1,this.preWarmCycles=0,this.preWarmStepOffset=1,this.spriteCellChangeSpeed=1,this.startSpriteCellID=0,this.endSpriteCellID=0,this.spriteCellWidth=0,this.spriteCellHeight=0,this.spriteRandomStartCell=!1,this.translationPivot=new o$1o(0,0),this.beginAnimationOnStart=!1,this.beginAnimationFrom=0,this.beginAnimationTo=60,this.beginAnimationLoop=!1,this.worldOffset=new o$1p(0,0,0),this.gravity=new o$1p(0,0,0),this._colorGradients=null,this._sizeGradients=null,this._lifeTimeGradients=null,this._angularSpeedGradients=null,this._velocityGradients=null,this._limitVelocityGradients=null,this._dragGradients=null,this._emitRateGradients=null,this._startSizeGradients=null,this._rampGradients=null,this._colorRemapGradients=null,this._alphaRemapGradients=null,this.startDelay=0,this.limitVelocityDamping=.4,this.color1=new e$1U(1,1,1,1),this.color2=new e$1U(1,1,1,1),this.colorDead=new e$1U(0,0,0,1),this.textureMask=new e$1U(1,1,1,1),this._isSubEmitter=!1,this.billboardMode=_0x29b01c.PARTICLES_BILLBOARDMODE_ALL,this._isBillboardBased=!0,this.id=e,this.name=e}_0xb32716(),Object.defineProperties(_0x36dee7.prototype,{noiseTexture:{get:function(){return this._noiseTexture},set:function(e){this._noiseTexture!==e&&(this._noiseTexture=e,this._reset())}},isAnimationSheetEnabled:{get:function(){return this._isAnimationSheetEnabled},set:function(e){this._isAnimationSheetEnabled!=e&&(this._isAnimationSheetEnabled=e,this._reset())}},direction1:{get:function(){return this.particleEmitterType.direction1?this.particleEmitterType.direction1:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.direction1&&(this.particleEmitterType.direction1=e)}},direction2:{get:function(){return this.particleEmitterType.direction2?this.particleEmitterType.direction2:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.direction2&&(this.particleEmitterType.direction2=e)}},minEmitBox:{get:function(){return this.particleEmitterType.minEmitBox?this.particleEmitterType.minEmitBox:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.minEmitBox&&(this.particleEmitterType.minEmitBox=e)}},maxEmitBox:{get:function(){return this.particleEmitterType.maxEmitBox?this.particleEmitterType.maxEmitBox:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.maxEmitBox&&(this.particleEmitterType.maxEmitBox=e)}},isBillboardBased:{get:function(){return this._isBillboardBased},set:function(e){this._isBillboardBased!==e&&(this._isBillboardBased=e,this._reset())}}}),_0x36dee7.prototype.getScene=function(){return this._scene},_0x36dee7.prototype._hasTargetStopDurationDependantGradient=function(){return this._startSizeGradients&&this._startSizeGradients.length>0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0},_0x36dee7.prototype.getDragGradients=function(){return this._dragGradients},_0x36dee7.prototype.getLimitVelocityGradients=function(){return this._limitVelocityGradients},_0x36dee7.prototype.getColorGradients=function(){return this._colorGradients},_0x36dee7.prototype.getSizeGradients=function(){return this._sizeGradients},_0x36dee7.prototype.getColorRemapGradients=function(){return this._colorRemapGradients},_0x36dee7.prototype.getAlphaRemapGradients=function(){return this._alphaRemapGradients},_0x36dee7.prototype.getLifeTimeGradients=function(){return this._lifeTimeGradients},_0x36dee7.prototype.getAngularSpeedGradients=function(){return this._angularSpeedGradients},_0x36dee7.prototype.getVelocityGradients=function(){return this._velocityGradients},_0x36dee7.prototype.getStartSizeGradients=function(){return this._startSizeGradients},_0x36dee7.prototype.getEmitRateGradients=function(){return this._emitRateGradients},_0x36dee7.prototype._reset=function(){},_0x36dee7.prototype._removeGradientAndTexture=function(e,t,i){if(!t)return this;for(var n=0,r=0,o=t;r<o.length;r++){if(o[r].gradient===e){t.splice(n,1);break}n++}return i&&i.dispose(),this},_0x36dee7.prototype.createPointEmitter=function(e,t){var i=new _0x21fe0a;return i.direction1=e,i.direction2=t,this.particleEmitterType=i,i},_0x36dee7.prototype.createHemisphericEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1);var i=new _0x498a84(e,t);return this.particleEmitterType=i,i},_0x36dee7.prototype.createSphereEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1);var i=new _0x19aa0e(e,t);return this.particleEmitterType=i,i},_0x36dee7.prototype.createDirectedSphereEmitter=function(e,t,i){void 0===e&&(e=1),void 0===t&&(t=new o$1p(0,0,1)),void 0===i&&(i=new o$1p(0,0,1));var n=new _0x18a488(e,t,i);return this.particleEmitterType=n,n},_0x36dee7.prototype.createCylinderEmitter=function(e,t,i,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=0);var r=new _0x17a06c(e,t,i,n);return this.particleEmitterType=r,r},_0x36dee7.prototype.createDirectedCylinderEmitter=function(e,t,i,n,r){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=new o$1p(0,0,1)),void 0===r&&(r=new o$1p(0,0,1));var o=new _0x732f89(e,t,i,n,r);return this.particleEmitterType=o,o},_0x36dee7.prototype.createConeEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=Math.PI/4);var i=new _0xf9ea81(e,t);return this.particleEmitterType=i,i},_0x36dee7.prototype.createBoxEmitter=function(e,t,i,n){var r=new _0x419949;return this.particleEmitterType=r,this.direction1=e,this.direction2=t,this.minEmitBox=i,this.maxEmitBox=n,r},_0x36dee7._setRenderState=function(e,t){var i={};switch(t){case _0x5f5957.BLENDMODE_ADD:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.SOURCE_ALPHA,functionSourceAlpha:l$14.ONE,functionDestinationRgb:l$14.ONE,functionDestinationAlpha:l$14.ONE}});break;case _0x5f5957.BLENDMODE_ONEONE:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.ONE,functionSourceAlpha:l$14.ONE,functionDestinationRgb:l$14.ONE,functionDestinationAlpha:l$14.ONE}});break;case _0x5f5957.BLENDMODE_STANDARD:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.SOURCE_ALPHA,functionSourceAlpha:l$14.ONE,functionDestinationRgb:l$14.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:l$14.ONE_MINUS_SOURCE_ALPHA}});break;case _0x5f5957.BLENDMODE_MULTIPLY:case _0x5f5957.BLENDMODE_MULTIPLYADD:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.DESTINATION_COLOR,functionSourceAlpha:l$14.ZERO,functionDestinationRgb:l$14.ONE,functionDestinationAlpha:l$14.ONE}})}e.renderState=i},_0x36dee7._Parse=function(e,t){var i;e.texture?((i=new Image).src=e.texture.url,i.onload=function(){e$2b(t.particleTexture)||(t.particleTexture=new t$V({context:t._context,source:this,pixelFormat:V$10.RGBA,flipY:!1})),t.particleTexture.name=e.texture.url}):e.textureName&&((i=new Image).src=e.textureName,i.onload=function(){e$2b(t.particleTexture)||(t.particleTexture=new t$V({context:t._context,source:this,pixelFormat:V$10.RGBA,flipY:!1})),t.particleTexture.name=e.textureName});if(e.emitterId||0===e.emitterId||void 0!==e.emitter){if(!e.emitterId){var n=new o$1p;n.x=e.emitter[0],n.y=e.emitter[2],n.z=e.emitter[1],t.emitter=n}}else t.emitter=new o$1p(0,0,0);if(t.isLocal=!1,void 0!==e.renderingGroupId&&(t.renderingGroupId=e.renderingGroupId),void 0!==e.isBillboardBased&&(t.isBillboardBased=e.isBillboardBased),void 0!==e.billboardMode&&(t.billboardMode=e.billboardMode),e.animations){for(var r=0;r<e.animations.length;r++){var o=e.animations[r];t.animations.push(_0x142894.Parse(o))}t.beginAnimationOnStart=e.beginAnimationOnStart,t.beginAnimationFrom=e.beginAnimationFrom,t.beginAnimationTo=e.beginAnimationTo,t.beginAnimationLoop=e.beginAnimationLoop}e.autoAnimate&&scene&&scene.beginAnimation(t,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),t.startDelay=0|e.startDelay,t.minAngularSpeed=e.minAngularSpeed,t.maxAngularSpeed=e.maxAngularSpeed,t.minSize=e.minSize,t.maxSize=e.maxSize,e.minScaleX&&(t.minScaleX=e.minScaleX,t.maxScaleX=e.maxScaleX,t.minScaleY=e.minScaleY,t.maxScaleY=e.maxScaleY),void 0!==e.preWarmCycles&&(t.preWarmCycles=e.preWarmCycles,t.preWarmStepOffset=e.preWarmStepOffset),void 0!==e.minInitialRotation&&(t.minInitialRotation=e.minInitialRotation,t.maxInitialRotation=e.maxInitialRotation),t.minLifeTime=e.minLifeTime,t.maxLifeTime=e.maxLifeTime,t.minEmitPower=e.minEmitPower,t.maxEmitPower=e.maxEmitPower,t.emitRate=e.emitRate;var a=new o$1p;if(a.x=e.gravity[0],a.y=e.gravity[2],a.z=e.gravity[1],t.gravity=a,e.noiseStrength){var s=new o$1p;s.x=e.noiseStrength[0],s.y=e.noiseStrength[2],s.z=e.noiseStrength[1],t.noiseStrength=s}var l,u=new e$1U,c=new e$1U,h=new e$1U;if(e$1U.unpack(e.color1,0,u),e$1U.unpack(e.color2,0,c),e$1U.unpack(e.colorDead,0,h),t.color1=u,t.color2=c,t.colorDead=h,t.updateSpeed=e.updateSpeed,t.targetStopDuration=e.targetStopDuration,t.blendMode=e.blendMode,e.colorGradients)for(var d=0,f=e.colorGradients;d<f.length;d++){var p=f[d],_=new e$1U;e$1U.unpack(p.color1,0,_);var m=void 0;p.color2&&(m=new e$1U,e$1U.unpack(p.color2,0,m)),t.addColorGradient(p.gradient,_,m)}if(e.rampGradients){for(var g=0,x=e.rampGradients;g<x.length;g++){var v=x[g],y=new e$1U;e$1U.unpack(v.color,0,y),t.addRampGradient(v.gradient,y)}t.useRampGradients=e.useRampGradients}if(e.colorRemapGradients)for(var $=0,b=e.colorRemapGradients;$<b.length;$++){var T=b[$];t.addColorRemapGradient(T.gradient,void 0!==T.factor1?T.factor1:T.factor,T.factor2)}if(e.alphaRemapGradients)for(var C=0,S=e.alphaRemapGradients;C<S.length;C++){var w=S[C];t.addAlphaRemapGradient(w.gradient,void 0!==w.factor1?w.factor1:w.factor,w.factor2)}if(e.sizeGradients)for(var E=0,P=e.sizeGradients;E<P.length;E++){var A=P[E];t.addSizeGradient(A.gradient,void 0!==A.factor1?A.factor1:A.factor,A.factor2)}if(e.angularSpeedGradients)for(var L=0,M=e.angularSpeedGradients;L<M.length;L++){var R=M[L];t.addAngularSpeedGradient(R.gradient,void 0!==R.factor1?R.factor1:R.factor,R.factor2)}if(e.velocityGradients)for(var I=0,O=e.velocityGradients;I<O.length;I++){var D=O[I];t.addVelocityGradient(D.gradient,void 0!==D.factor1?D.factor1:D.factor,D.factor2)}if(e.dragGradients)for(var B=0,N=e.dragGradients;B<N.length;B++){var F=N[B];t.addDragGradient(F.gradient,void 0!==F.factor1?F.factor1:F.factor,F.factor2)}if(e.emitRateGradients)for(var U=0,z=e.emitRateGradients;U<z.length;U++){var G=z[U];t.addEmitRateGradient(G.gradient,void 0!==G.factor1?G.factor1:G.factor,G.factor2)}if(e.startSizeGradients)for(var V=0,k=e.startSizeGradients;V<k.length;V++){var W=k[V];t.addStartSizeGradient(W.gradient,void 0!==W.factor1?W.factor1:W.factor,W.factor2)}if(e.lifeTimeGradients)for(var H=0,q=e.lifeTimeGradients;H<q.length;H++){var j=q[H];t.addLifeTimeGradient(j.gradient,void 0!==j.factor1?j.factor1:j.factor,j.factor2)}if(e.limitVelocityGradients){for(var Y=0,X=e.limitVelocityGradients;Y<X.length;Y++){var K=X[Y];t.addLimitVelocityGradient(K.gradient,void 0!==K.factor1?K.factor1:K.factor,K.factor2)}t.limitVelocityDamping=e.limitVelocityDamping}if(e.particleEmitterType){switch(e.particleEmitterType.type){case"SphereParticleEmitter":l=new _0x19aa0e;break;case"SphereDirectedParticleEmitter":l=new _0x18a488;break;case"ConeEmitter":case"ConeParticleEmitter":l=new _0xf9ea81;break;case"CylinderParticleEmitter":l=new _0x17a06c;break;case"CylinderDirectedParticleEmitter":l=new _0x732f89;break;case"HemisphericParticleEmitter":l=new _0x498a84;break;case"PointParticleEmitter":l=new _0x21fe0a;break;case"MeshParticleEmitter":l=new MeshParticleEmitter;break;default:l=new _0x419949}l.parse(e.particleEmitterType)}else(l=new _0x419949).parse(e,scene);t.particleEmitterType=l,t.startSpriteCellID=e.startSpriteCellID,t.endSpriteCellID=e.endSpriteCellID,t.spriteCellWidth=e.spriteCellWidth,t.spriteCellHeight=e.spriteCellHeight,t.spriteCellChangeSpeed=e.spriteCellChangeSpeed,t.spriteRandomStartCell=e.spriteRandomStartCell};var _0x10e10b=(_0x29e73b=!0,function(e,t){var i=_0x29e73b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29e73b=!1,i}),_0x1da133=_0x10e10b(void 0,(function(){return _0x1da133.toString().search("(((.+)+)+)+$").toString().constructor(_0x1da133).search("(((.+)+)+)+$")})),_0x29e73b;function _0x48c0c2(e,t){this.gradient=e,this.color=t}_0x1da133();var _0x3cc57e=(_0x50653f=!0,function(e,t){var i=_0x50653f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x50653f=!1,i}),_0x2fbf41=_0x3cc57e(void 0,(function(){return _0x2fbf41.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fbf41).search("(((.+)+)+)+$")})),_0x50653f;function _0x43ab59(e,t,i){this.gradient=e,this.color1=t,this.color2=i}_0x2fbf41(),_0x43ab59.prototype.getColorToRef=function(e){this.color2?e$1U.lerp(this.color1,this.color2,Math.random(),e):e$1U.clone(this.color1,e)};var _0x431c89=(_0x5d177e=!0,function(e,t){var i=_0x5d177e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d177e=!1,i}),_0x1e0654=_0x431c89(void 0,(function(){return _0x1e0654.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e0654).search("(((.+)+)+)+$")})),_0x5d177e;function _0x28226b(e,t,i){this.gradient=e,this.factor1=t,this.factor2=i}function g$t(e,t){if(t!==e._currentFramebuffer){var i;e._currentFramebuffer=t,typeof WebGLRenderingContext<"u"&&(i=[de$x.BACK]);var n=i;if(e$2b(t))t._bind(),n=t._getActiveColorAttachments();else{var r=e._gl;r.bindFramebuffer(r.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}function B$i(e,t,i,n){var r=e._currentRenderState,o=e._currentPassState,a=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,d$1m.partialApply(e._gl,r,t,o,i,a,i.viewport,n)}function u$m(e,t,i,n){var r=u$_(i._renderState,e._defaultRenderState);if(e$2b(t)&&r.depthTest&&r.depthTest.enabled&&!t.hasDepthAttachment)throw new t$16("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");g$t(e,t),B$i(e,r,n,!1)}function s$i(e){this._pointCount=e.pointCount,this._primitiveMode=e.primitiveMode,this._feedbackShaderProgram=e.feedbackShader,this._normalShaderProgram=e.normalShader,this._modelMatrix=e.modelMatrix,this._normalShaderUniformMap=e.normalShaderUniformMap,this._feedbackShaderUniformMap=e.feedbackShaderUniformMap,this._attributes=e.attributes,this._framebuffer=e.framebuffer,this._renderState=e.renderState,this._indices=e.indices,this._textureEffect=e.textureEffect,this._frameIdx=0,this._VBOs=new Array,this._VBOs[0]=new Array,this._VBOs[1]=new Array,this._indexBuffer=null,this._pass=Le$s.ANALYSIS,this._handle=void 0,this._gl=void 0,this.initialized=!1,this._drawEvent=new o$1h,this._uniformBuffers=[]}_0x1e0654(),_0x28226b.prototype.getFactor=function(){return void 0===this.factor2||this.factor2===this.factor1?this.factor1:this.factor1+(this.factor2-this.factor1)*Math.random()},s$i.prototype.beginDraw=function(e,t,i,n){u$m(e,t,i,n)},s$i.prototype.execute=function(e,t){var i=e._gl;if(this._gl=i,!this.initialized){for(var n=this._attributes.length,r=0;r<n;++r)this._addAttribute(e,this._attributes[r]);this._textureEffect&&this._createIndexBuffer(e),e$2b(this._handle)||(this._handle=i.createTransformFeedback()),this.initialized=!0}u$m(e,u$_(this._framebuffer,t.framebuffer),this,t),this._bindVBOToVertexAttribute(e),this._enableVertexAttribArray(e,!0),this._drawTransformFeedback(e),this._drawNormal(e,t),this._drawEvent.raiseEvent(e,t),this._enableVertexAttribArray(e,!1),this._frameIdx=1-this._frameIdx},s$i.prototype._drawNormal=function(e,t){var i=e._gl;this._normalShaderProgram._bind(),e._us.model=u$_(this._modelMatrix,p$1d.IDENTITY),this._normalShaderProgram._setUniforms(this._normalShaderUniformMap,e._us,e.validateShaderProgram,this),this._textureEffect?(i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,this._indexBuffer),i.drawElements(this._primitiveMode,this._indices.length,i.UNSIGNED_INT,0)):i.drawArrays(this._primitiveMode,0,this._pointCount)},s$i.prototype._drawTransformFeedback=function(e){var t=e._gl;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,this._handle),this._bindVBOToTransformFeedback(e,!0),this._feedbackShaderProgram._bind(),e._us.model=u$_(this._modelMatrix,p$1d.IDENTITY),this._feedbackShaderProgram._setUniforms(this._feedbackShaderUniformMap,e._us,e.validateShaderProgram,this),t.enable(t.RASTERIZER_DISCARD),t.beginTransformFeedback(this._primitiveMode),this._textureEffect?t.drawArrays(this._primitiveMode,0,4*this._pointCount):t.drawArrays(this._primitiveMode,0,this._pointCount),t.endTransformFeedback(),t.disable(t.RASTERIZER_DISCARD),this._bindVBOToTransformFeedback(e,!1)},s$i.prototype._enableVertexAttribArray=function(e,t){for(var i=e._gl,n=0;n<this._attributes.length;n++){var r=this._attributes[n].index;t?i.enableVertexAttribArray(r):i.disableVertexAttribArray(r)}},s$i.prototype._bindVBOToVertexAttribute=function(e){for(var t=e._gl,i=0;i<this._attributes.length;i++){var n=this._attributes[i],r=n.index,o=n.componentsPerAttribute;t.bindBuffer(t.ARRAY_BUFFER,this._VBOs[this._frameIdx][r]._getBuffer()),t.vertexAttribPointer(r,o,t.FLOAT,!1,0,0)}},s$i.prototype._bindVBOToTransformFeedback=function(e,t){for(var i=e._gl,n=0;n<this._attributes.length;n++){var r=this._attributes[n].index,o=t?this._VBOs[1-this._frameIdx][r]._getBuffer():null;i.bindBufferBase(i.TRANSFORM_FEEDBACK_BUFFER,r,o)}},s$i.prototype._addAttribute=function(e,t){var i=t.data,n=t.index;this._VBOs[0][n]=this._createVBO(e,i),this._VBOs[1][n]=this._createVBO(e,i)},s$i.prototype._createVBO=function(e,t){return new t$Y({context:e,bufferTarget:de$x.ARRAY_BUFFER,usage:de$x.DYNAMIC_DRAW,typedArray:t})},s$i.prototype._createIndexBuffer=function(e){var t=e._gl;this._indexBuffer=t.createBuffer(),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this._indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this._indices,t.STATIC_DRAW)},s$i.prototype.isDestroyed=function(){return!1},s$i.prototype.destroy=function(){e$2b(this._normalShaderProgram)&&(this._normalShaderProgram=this._normalShaderProgram&&this._normalShaderProgram.destroy()),e$2b(this._feedbackShaderProgram)&&(this._feedbackShaderProgram=this._feedbackShaderProgram&&this._feedbackShaderProgram.destroy());for(var e=0;e<this._attributes.length;e++){var t=this._attributes[e].index;this._VBOs[0][t].destroy(),this._VBOs[1][t].destroy()}return e$2b(this._indexBuffer)&&this._gl.deleteBuffer(this._indexBuffer),e$2b(this._handle)&&(this._handle=this._gl.deleteTransformFeedback(this._handle),this._handle=void 0),i$10(this)},Object.defineProperties(s$i.prototype,{pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e)}}});var _0x31663e="#version 300 es\n#define PI 3.14159\nuniform float currentCount;\nuniform float timeDelta;\nuniform float stopFactor;\n#ifndef LOCAL\nuniform mat4 emitterWM;\n#endif\nuniform vec2 lifeTime;\nuniform vec2 emitPower;\nuniform vec2 sizeRange;\nuniform vec4 scaleRange;\n\n#ifndef COLORGRADIENTS\nuniform vec4 color1;\nuniform vec4 color2;\n#endif\nuniform vec3 gravity;\nuniform sampler2D randomSampler;\nuniform sampler2D randomSampler2;\nuniform vec4 angleRange;\n\n#ifdef BOXEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\nuniform vec3 minEmitBox;\nuniform vec3 maxEmitBox;\n#endif\n\n#ifdef POINTEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#endif\n\n#ifdef HEMISPHERICEMITTER\nuniform float radius;\nuniform float radiusRange;\nuniform float directionRandomizer;\n#endif\n\n#ifdef SPHEREEMITTER\nuniform float radius;\nuniform float radiusRange;\n#ifdef DIRECTEDSPHEREEMITTER\n uniform vec3 direction1;\n uniform vec3 direction2;\n#else\n uniform float directionRandomizer;\n#endif\n#endif\n\n#ifdef CYLINDEREMITTER\nuniform float radius;\nuniform float height;\nuniform float radiusRange;\n#ifdef DIRECTEDCYLINDEREMITTER\n uniform vec3 direction1;\n uniform vec3 direction2;\n#else\n uniform float directionRandomizer;\n#endif\n#endif\n\n#ifdef CONEEMITTER\nuniform vec2 radius;\nuniform float coneAngle;\nuniform vec2 height;\nuniform float directionRandomizer;\n#endif\n\n// Particles state\nin vec3 position;\n#ifdef CUSTOMEMITTER\nin vec3 initialPosition;\n#endif\nin float age;\nin float life;\nin vec4 seed;\nin vec3 size;\n#ifndef COLORGRADIENTS\nin vec4 color;\n#endif\nin vec3 direction;\n#ifndef BILLBOARD\nin vec3 initialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nin float angle;\n#else\nin vec2 angle;\n#endif\n#ifdef ANIMATESHEET\nin float cellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nin float cellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nin vec3 noiseCoordinates1;\nin vec3 noiseCoordinates2;\n#endif\n\n// Output\nout vec3 outPosition;\n#ifdef CUSTOMEMITTER\nout vec3 outInitialPosition;\n#endif\nout float outAge;\nout float outLife;\nout vec4 outSeed;\nout vec3 outSize;\n#ifndef COLORGRADIENTS\nout vec4 outColor;\n#endif\nout vec3 outDirection;\n#ifndef BILLBOARD\nout vec3 outInitialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nout float outAngle;\n#else\nout vec2 outAngle;\n#endif\n#ifdef ANIMATESHEET\nout float outCellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nout float outCellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nout vec3 outNoiseCoordinates1;\nout vec3 outNoiseCoordinates2;\n#endif\n\n#ifdef SIZEGRADIENTS\nuniform sampler2D sizeGradientSampler;\n#endif\n\n#ifdef ANGULARSPEEDGRADIENTS\nuniform sampler2D angularSpeedGradientSampler;\n#endif\n\n#ifdef VELOCITYGRADIENTS\nuniform sampler2D velocityGradientSampler;\n#endif\n\n#ifdef LIMITVELOCITYGRADIENTS\nuniform sampler2D limitVelocityGradientSampler;\nuniform float limitVelocityDamping;\n#endif\n\n#ifdef DRAGGRADIENTS\nuniform sampler2D dragGradientSampler;\n#endif\n\n#ifdef NOISE\nuniform vec3 noiseStrength;\nuniform sampler2D noiseSampler;\n#endif\n\n#ifdef ANIMATESHEET\nuniform vec4 cellInfos;\n#endif\n\nvec3 getRandomVec3(float offset) {\n return texture(randomSampler2, vec2(float(gl_VertexID) * offset / currentCount, 0)).rgb;\n}\n\nvec4 getRandomVec4(float offset) {\n return texture(randomSampler, vec2(float(gl_VertexID) * offset / currentCount, 0));\n}\n\nvoid main() {\n float newAge = age + timeDelta;\n\n // If particle is dead and system is not stopped, spawn as new particle\n if (newAge >= life && stopFactor != 0.) {\n vec3 newPosition;\n vec3 newDirection;\n\n // Let's get some random values\n vec4 randoms = getRandomVec4(seed.x);\n\n // Age and life\n outLife = lifeTime.x + (lifeTime.y - lifeTime.x) * randoms.r;\n outAge = newAge - life;\n\n // Seed\n outSeed = seed;\n\n // Size\n#ifdef SIZEGRADIENTS\n outSize.x = texture(sizeGradientSampler, vec2(0, 0)).r;\n#else\n outSize.x = sizeRange.x + (sizeRange.y - sizeRange.x) * randoms.g;\n#endif\n outSize.y = scaleRange.x + (scaleRange.y - scaleRange.x) * randoms.b;\n outSize.z = scaleRange.z + (scaleRange.w - scaleRange.z) * randoms.a;\n\n#ifndef COLORGRADIENTS\n // Color\n outColor = color1 + (color2 - color1) * randoms.b;\n#endif\n\n // Angular speed\n#ifndef ANGULARSPEEDGRADIENTS\n outAngle.y = angleRange.x + (angleRange.y - angleRange.x) * randoms.a;\n outAngle.x = angleRange.z + (angleRange.w - angleRange.z) * randoms.r;\n#else\n outAngle = angleRange.z + (angleRange.w - angleRange.z) * randoms.r;\n#endif\n\n // Position / Direction (based on emitter type)\n#ifdef POINTEMITTER\n vec3 randoms2 = getRandomVec3(seed.y);\n vec3 randoms3 = getRandomVec3(seed.z);\n newPosition = vec3(0, 0, 0);\n newDirection = direction1 + (direction2 - direction1) * randoms3;\n#elif defined(BOXEMITTER)\n vec3 randoms2 = getRandomVec3(seed.y);\n vec3 randoms3 = getRandomVec3(seed.z);\n\n newPosition = minEmitBox + (maxEmitBox - minEmitBox) * randoms2;\n newDirection = direction1 + (direction2 - direction1) * randoms3;\n#elif defined(HEMISPHERICEMITTER)\n vec3 randoms2 = getRandomVec3(seed.y);\n vec3 randoms3 = getRandomVec3(seed.z);\n\n // Position on the sphere surface\n float phi = 2.0 * PI * randoms2.x;\n float theta = acos(2.0 * randoms2.y - 1.0);\n float randX = cos(phi) * sin(theta);\n float randY = sin(phi) * sin(theta);\n float randZ = cos(theta);\n newPosition = (radius - (radius * radiusRange * randoms2.z)) * vec3(randX, abs(randY), randZ);\n newDirection = newPosition + directionRandomizer * randoms3;\n#elif defined(SPHEREEMITTER)\n vec3 randoms2 = getRandomVec3(seed.y);\n vec3 randoms3 = getRandomVec3(seed.z);\n\n // Position on the sphere surface\n float phi = 2.0 * PI * randoms2.x;\n float theta = acos(2.0 * randoms2.y - 1.0);\n float randX = cos(phi) * sin(theta);\n float randY = cos(theta);\n float randZ = sin(phi) * sin(theta);\n\n newPosition = (radius - (radius * radiusRange * randoms2.z)) * vec3(randX, randY, randZ);\n\n #ifdef DIRECTEDSPHEREEMITTER\n newDirection = normalize(direction1 + (direction2 - direction1) * randoms3);\n #else\n // Direction\n newDirection = normalize(newPosition + directionRandomizer * randoms3);\n #endif\n#elif defined(CYLINDEREMITTER)\n vec3 randoms2 = getRandomVec3(seed.y);\n vec3 randoms3 = getRandomVec3(seed.z);\n\n // Position on the cylinder\n float zPos = (randoms2.x - 0.5)*height;\n float angle = randoms2.y * PI * 2.;\n float inverseRadiusRangeSquared = ((1.-radiusRange) * (1.-radiusRange));\n float positionRadius = radius*sqrt(inverseRadiusRangeSquared + (randoms2.z * (1.-inverseRadiusRangeSquared)));\n float xPos = positionRadius * cos(angle);\n float yPos = positionRadius * sin(angle);\n newPosition = vec3(xPos, yPos, zPos);\n\n #ifdef DIRECTEDCYLINDEREMITTER\n newDirection = direction1 + (direction2 - direction1) * randoms3;\n #else\n // Direction\n angle = angle + ((randoms3.x-0.5) * PI) * directionRandomizer;\n newDirection = vec3(cos(angle), (randoms3.y-0.5) * directionRandomizer, sin(angle));\n newDirection = normalize(newDirection);\n #endif\n#elif defined(CONEEMITTER)\n vec3 randoms2 = getRandomVec3(seed.y);\n float s = 2.0 * PI * randoms2.x;\n\n #ifdef CONEEMITTERSPAWNPOINT\n float h = 0.0001;\n #else\n float h = randoms2.y * height.y;\n\n // Better distribution in a cone at normal angles.\n h = 1. - h * h;\n #endif\n\n float lRadius = radius.x - radius.x * randoms2.z * radius.y;\n lRadius = lRadius * h;\n\n float randX = lRadius * sin(s);\n float randY = lRadius * cos(s);\n float randZ = h * height.x;\n\n newPosition = vec3(randX, randY, randZ);\n\n // Direction\n if (abs(cos(coneAngle)) == 1.0) {\n newDirection = vec3(0.0, 0.0, 1.0);\n } else {\n vec3 randoms3 = getRandomVec3(seed.z);\n newDirection = normalize(newPosition + directionRandomizer * randoms3);\n }\n#elif defined(CUSTOMEMITTER)\n newPosition = initialPosition;\n outInitialPosition = initialPosition;\n#else\n // Create the particle at origin\n newPosition = vec3(0., 0., 0.);\n\n // Spread in all directions\n newDirection = 2.0 * (getRandomVec3(seed.w) - vec3(0.5, 0.5, 0.5));\n#endif\n\n float power = emitPower.x + (emitPower.y - emitPower.x) * randoms.a;\n\n #ifdef LOCAL\n outPosition = newPosition;\n #else\n outPosition = (emitterWM * vec4(newPosition, 1.)).xyz;\n #endif\n\n#ifdef CUSTOMEMITTER\n outDirection = direction;\n #ifndef BILLBOARD\n outInitialDirection = direction;\n #endif\n#else\n #ifdef LOCAL\n vec3 initial = newDirection;\n #else\n vec3 initial = (emitterWM * vec4(newDirection, 0.)).xyz;\n #endif\n outDirection = initial * power;\n #ifndef BILLBOARD\n outInitialDirection = initial;\n #endif\n#endif\n#ifdef ANIMATESHEET\n outCellIndex = cellInfos.x;\n\n#ifdef ANIMATESHEETRANDOMSTART\n outCellStartOffset = randoms.a * outLife;\n#endif\n#endif\n\n#ifdef NOISE\n outNoiseCoordinates1 = noiseCoordinates1;\n outNoiseCoordinates2 = noiseCoordinates2;\n#endif\n\n } else {\n float directionScale = timeDelta;\n outAge = newAge;\n float ageGradient = newAge / life;\n\n#ifdef VELOCITYGRADIENTS\n directionScale *= texture(velocityGradientSampler, vec2(ageGradient, 0)).r;\n#endif\n\n#ifdef DRAGGRADIENTS\n directionScale *= 1.0 - texture(dragGradientSampler, vec2(ageGradient, 0)).r;\n#endif\n\n#if defined(CUSTOMEMITTER)\n outPosition = position + (direction - position) * ageGradient;\n outInitialPosition = initialPosition;\n#else\n outPosition = position + direction * directionScale;\n#endif\n\n outLife = life;\n outSeed = seed;\n#ifndef COLORGRADIENTS\n outColor = color;\n#endif\n\n#ifdef SIZEGRADIENTS\n\toutSize.x = texture(sizeGradientSampler, vec2(ageGradient, 0)).r;\n outSize.yz = size.yz;\n#else\n outSize = size;\n#endif\n\n#ifndef BILLBOARD\n outInitialDirection = initialDirection;\n#endif\n\n#ifdef CUSTOMEMITTER\n outDirection = direction;\n#else\n vec3 updatedDirection = direction + gravity * timeDelta;\n\n #ifdef LIMITVELOCITYGRADIENTS\n float limitVelocity = texture(limitVelocityGradientSampler, vec2(ageGradient, 0)).r;\n\n float currentVelocity = length(updatedDirection);\n\n if (currentVelocity > limitVelocity) {\n updatedDirection = updatedDirection * limitVelocityDamping;\n }\n #endif\n\n outDirection = updatedDirection;\n\n #ifdef NOISE\n float fetchedR = texture(noiseSampler, vec2(noiseCoordinates1.x, noiseCoordinates1.y) * vec2(0.5) + vec2(0.5)).r;\n float fetchedG = texture(noiseSampler, vec2(noiseCoordinates1.z, noiseCoordinates2.x) * vec2(0.5) + vec2(0.5)).r;\n float fetchedB = texture(noiseSampler, vec2(noiseCoordinates2.y, noiseCoordinates2.z) * vec2(0.5) + vec2(0.5)).r;\n vec3 force = vec3(2. * fetchedR - 1., 2. * fetchedG - 1., 2. * fetchedB - 1.) * noiseStrength;\n outDirection = outDirection + force * timeDelta;\n outNoiseCoordinates1 = noiseCoordinates1;\n outNoiseCoordinates2 = noiseCoordinates2;\n #endif\n#endif\n\n#ifdef ANGULARSPEEDGRADIENTS\n float angularSpeed = texture(angularSpeedGradientSampler, vec2(ageGradient, 0)).r;\n outAngle = angle + angularSpeed * timeDelta;\n#else\n outAngle = vec2(angle.x + angle.y * timeDelta, angle.y);\n#endif\n\n#ifdef ANIMATESHEET\n float offsetAge = outAge;\n float dist = cellInfos.y - cellInfos.x;\n\n#ifdef ANIMATESHEETRANDOMSTART\n outCellStartOffset = cellStartOffset;\n offsetAge += cellStartOffset;\n#else\n float cellStartOffset = 0.;\n#endif\n\n float ratio = 0.;\n if (cellInfos.w == 1.0) {\n ratio = clamp(mod(cellStartOffset + cellInfos.z * offsetAge, life) / life, 0., 1.0);\n }\n else {\n ratio = clamp(cellStartOffset + cellInfos.z * offsetAge / life, 0., 1.0);\n }\n\n outCellIndex = float(int(cellInfos.x + ratio * dist));\n#endif\n }\n}",_0xdbe70b="#version 300 es\n\nvoid main() {\n discard;\n}\n",_0x3de8c9="precision highp float;\nuniform vec2 translationPivot;\nuniform vec3 worldOffset;\n#ifdef LOCAL\nuniform mat4 emitterWM;\n#endif\n\n// Particles state\nattribute vec3 position;\nattribute float age;\nattribute float life;\nattribute vec3 size;\n#ifndef BILLBOARD\nattribute vec3 initialDirection;\n#endif\n#ifdef BILLBOARDSTRETCHED\nattribute vec3 direction;\n#endif\nattribute float angle;\n#ifdef ANIMATESHEET\nattribute float cellIndex;\n#endif\nattribute vec2 offset;\nattribute vec2 uv;\n\nvarying vec2 vUV;\nvarying vec4 vColor;\nvarying vec3 vPositionW;\n\n#ifdef COLORGRADIENTS\nuniform sampler2D colorGradientSampler;\n#else\nuniform vec4 colorDead;\nattribute vec4 color;\n#endif\n\n#ifdef ANIMATESHEET\nuniform vec3 sheetInfos;\n#endif\n\n#ifdef BILLBOARD\n\tuniform vec3 eyePosition;\n#endif\n\nvec3 rotate(vec3 yaxis, vec3 rotatedCorner) {\n\tvec3 xaxis = normalize(cross(vec3(0., 1.0, 0.), yaxis));\n\tvec3 zaxis = normalize(cross(yaxis, xaxis));\n\t\n\tvec3 row0 = vec3(xaxis.x, xaxis.y, xaxis.z);\n\tvec3 row1 = vec3(yaxis.x, yaxis.y, yaxis.z);\n\tvec3 row2 = vec3(zaxis.x, zaxis.y, zaxis.z);\n\t\n\tmat3 rotMatrix = mat3(row0, row1, row2);\n\t\n\tvec3 alignedCorner = rotMatrix * rotatedCorner;\n\t#ifdef LOCAL\n\t\treturn ((emitterWM * vec4(position, 1.0)).xyz + worldOffset) + alignedCorner;\n\t#else\n\t\treturn (position + worldOffset) + alignedCorner;\n\t#endif\n}\n\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera, vec3 rotatedCorner) {\n\tvec3 normalizedToCamera = normalize(toCamera);\n\tvec3 normalizedCrossDirToCamera = normalize(cross(normalize(direction), normalizedToCamera));\n\tvec3 crossProduct = normalize(cross(normalizedToCamera, normalizedCrossDirToCamera));\n\t\n\tvec3 row0 = vec3(normalizedCrossDirToCamera.x, normalizedCrossDirToCamera.y, normalizedCrossDirToCamera.z);\n\tvec3 row1 = vec3(crossProduct.x, crossProduct.y, crossProduct.z);\n\tvec3 row2 = vec3(normalizedToCamera.x, normalizedToCamera.y, normalizedToCamera.z);\n\tmat3 rotMatrix = mat3(row0, row1, row2);\n\t\n\tvec3 alignedCorner = rotMatrix * rotatedCorner;\n\t#ifdef LOCAL\n\t\treturn ((emitterWM * vec4(position, 1.0)).xyz + worldOffset) + alignedCorner;\n\t#else\n\t\treturn (position + worldOffset) + alignedCorner;\n\t#endif\n}\n#endif\n\nvoid main() {\n\t#ifdef ANIMATESHEET\n\t\tfloat rowOffset = floor(cellIndex / sheetInfos.z);\n\t\tfloat columnOffset = cellIndex - rowOffset * sheetInfos.z;\n\t\tvec2 uvScale = sheetInfos.xy;\n\t\tvec2 uvOffset = vec2(uv.x , 1.0 - uv.y);\n\t\tvUV = (uvOffset + vec2(columnOffset, rowOffset)) * uvScale;\n\t#else\n \t vUV = uv;\n\t#endif\n float ratio = age / life;\n#ifdef COLORGRADIENTS\n\tvColor = texture2D(colorGradientSampler, vec2(ratio, 0));\n#else\n\tvColor = color * vec4(1.0 - ratio) + colorDead * vec4(ratio);\n#endif\n\n vec2 cornerPos = (offset - translationPivot) * size.yz * size.x + translationPivot;\n //TODO \n //vec2 cornerPos = (offset - translationPivot) * vec2(2.0) + translationPivot;\n \n#ifdef BILLBOARD\n\tvec4 rotatedCorner;\n\trotatedCorner.w = 0.;\n\t\n\t#ifdef BILLBOARDY\n\t\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\t\trotatedCorner.z = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\trotatedCorner.y = 0.;\n\t\t\n\t\tvec3 yaxis = (position + worldOffset) - eyePosition;\n\t\tyaxis.y = 0.;\n\t\tvPositionW = rotate(normalize(yaxis), rotatedCorner.xyz);\n\t\t\n\t\tvec4 viewPosition = (czm_view * vec4(vPositionW, 1.0));\n\t#elif defined(BILLBOARDSTRETCHED)\n\t\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\t\trotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\trotatedCorner.z = 0.;\n\t\t\n\t\tvec3 toCamera = (position + worldOffset) - eyePosition;\n\t\tvPositionW = rotateAlign(toCamera, rotatedCorner.xyz);\n\t\t\n\t\tvec4 viewPosition = (czm_view * vec4(vPositionW, 1.0));\n\t#else\n\t\t// Rotate\n\t\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\t\trotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\trotatedCorner.z = 0.;\n\t\t\n\t\t// Expand position\n\t\t#ifdef LOCAL\n\t\t\tvec4 viewPosition = czm_modelView * vec4(((emitterWM * vec4(position, 1.0)).xyz + worldOffset), 1.0) + rotatedCorner;\n\t\t#else\n\t\t\tvec4 viewPosition = czm_modelView * vec4((position + worldOffset), 1.0) + rotatedCorner;\n\t\t#endif\n\t\t\n vPositionW = (czm_inverseView * viewPosition).xyz;\n\t#endif // BILLBOARDY \n#else\n // Rotate\n\tvec3 rotatedCorner;\n\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\trotatedCorner.y = 0.;\n\trotatedCorner.z = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\n\tvec3 yaxis = normalize(initialDirection);\n\tvPositionW = rotate(yaxis, rotatedCorner);\n\t\n // Expand position\n vec4 viewPosition = czm_view * vec4(vPositionW, 1.0);\n#endif // BILLBOARD\n\tgl_Position = czm_projection * viewPosition;\n}\n",_0x7d752a="precision highp float;\nuniform sampler2D diffuseSampler;\n\nvarying vec2 vUV;\nvarying vec4 vColor;\n\nvoid main() {\n\tvec4 textureColor = texture2D(diffuseSampler, vUV);\n \tgl_FragColor = textureColor * vColor;\n\t#ifdef BLENDMULTIPLYMODE\n\t float alpha = vColor.a * textureColor.a;\n\t gl_FragColor.rgb = gl_FragColor.rgb * alpha + vec3(1.0) * (1.0 - alpha);\n\t#endif\n}",_0x48ce9b=(_0x5b9f2f=!0,function(e,t){var i=_0x5b9f2f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b9f2f=!1,i}),_0x4ba278=_0x48ce9b(void 0,(function(){return _0x4ba278.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ba278).search("(((.+)+)+)+$")})),_0x5b9f2f;function _0x4ba997(){this.particlePositionGenerator=function(){},this.particleDestinationGenerator=function(){}}_0x4ba278(),_0x4ba997.prototype.startDirectionFunction=function(e,t,i,n){var r=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.TmpVectors.Vector3[0];if(this.particleDestinationGenerator){this.particleDestinationGenerator(-1,i,r);var o=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.TmpVectors.Vector3[1];r.subtractToRef(i.position,o),o.scaleToRef(1/i.lifeTime,r)}else r.set(0,0,0);n?t.copyFrom(r):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Vector3.TransformNormalToRef(r,e,t)},_0x4ba997.prototype.startPositionFunction=function(e,t,i,n){var r=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.TmpVectors.Vector3[0];this.particlePositionGenerator?this.particlePositionGenerator(-1,i,r):r.set(0,0,0),n?t.copyFrom(r):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Vector3.TransformCoordinatesToRef(r,e,t)},_0x4ba997.prototype.clone=function(){var e=new _0x4ba997;return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x4ba997.prototype.applyToShader=function(e){},_0x4ba997.prototype.getEffectDefines=function(e){e.push("CUSTOMEMITTER")},_0x4ba997.prototype.getClassName=function(){return"CustomParticleEmitter"},_0x4ba997.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e},_0x4ba997.prototype.parse=function(e){};var _0x54320b=(_0x40e9ba=!0,function(e,t){var i=_0x40e9ba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40e9ba=!1,i}),_0x2c4222=_0x54320b(void 0,(function(){return _0x2c4222.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c4222).search("(((.+)+)+)+$")})),_0x40e9ba;function _0xf6a90a(){}_0x2c4222(),_0xf6a90a.GetCurrentGradient=function(e,t,i){if(t[0].gradient>e)i(t[0],t[0],1);else{for(var n=0;n<t.length-1;n++){var r=t[n],o=t[n+1];if(e>=r.gradient&&e<=o.gradient)return void i(r,o,(e-r.gradient)/(o.gradient-r.gradient))}var a=t.length-1;i(t[a],t[a],1)}};var _0x27b750=(_0xd0e5e4=!0,function(e,t){var i=_0xd0e5e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd0e5e4=!1,i}),_0x40e152=_0x27b750(void 0,(function(){return _0x40e152.toString().search("(((.+)+)+)+$").toString().constructor(_0x40e152).search("(((.+)+)+)+$")})),_0xd0e5e4;function _0x326310(e,t,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=null);var o=_0x36dee7.call(this,e)||this;o._modelMatrx=p$1d.IDENTITY,o._context=i._context,o.layerMask=268435455,o._accumulatedCount=0,o._targetIndex=0,o._currentRenderId=-1,o._started=!1,o._stopped=!1,o._timeDelta=0,o._actualFrame=0,o._rawTextureWidth=256,o.forceDepthWrite=!1,o._preWarmDone=!1,o.isLocal=!1,e$2b(i)&&i.particleSystems.push(o),o._onBeforeDrawParticlesObservable=null,o._customEffect={0:r},o._capacity=u$_(t.capacity,5e4),o._activeCount=o._capacity,o._currentActiveCount=0,o._isAnimationSheetEnabled=n,o.particleEmitterType=new _0x419949;for(var a=u$_(t.randomTextureSize,512),s=[],l=0;l<a;++l)s.push(Math.random()),s.push(Math.random()),s.push(Math.random()),s.push(Math.random());o._randomTexture=new t$V({context:context,source:{width:a,height:1,arrayBufferView:new Float32Array(s)},flipY:!1,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),s=[];for(l=0;l<a;++l)s.push(Math.random()),s.push(Math.random()),s.push(Math.random()),s.push(Math.random());return o._randomTexture2=new t$V({context:context,source:{width:a,height:1,arrayBufferView:new Float32Array(s)},flipY:!1,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),o._randomTextureSize=a,o}function _0x38ef28(e,t,i){var n=e.attributeLocations,r=e.attributes,o=e.attIndex,a=e.offset,s=S$12.FLOAT,l=S$12.getSizeInBytes(s),u=e.attributesStrideSize*l;n[t]=o++,r.push({index:n[t],vertexBuffer:e.buffer,componentsPerAttribute:i,componentDatatype:s,normalize:!1,offsetInBytes:l*a,strideInBytes:u,instanceDivisor:e.instanceDivisor}),e.offset+=i,e.attributeLocations=n,e.attIndex=o,e.attributes=r}_0x40e152(),_0x326310.prototype=Object.create(_0x36dee7.prototype),_0x326310.prototype.constructor=_0x36dee7,Object.defineProperties(_0x326310.prototype,{IsSupported:{get:function(){return this._context.webgl2}},activeParticleCount:{get:function(){return this._activeCount},set:function(e){this._activeCount=Math.min(e,this._capacity)}},modelMatrix:{get:function(){return this._modelMatrx},set:function(e){this._modelMatrx!==e&&(this._modelMatrx=e)}}}),_0x326310.prototype.getCapacity=function(){return this._capacity},_0x326310.prototype.isStarted=function(){return this._started},_0x326310.prototype.isStopped=function(){return this._stopped},_0x326310.prototype.isStopping=function(){return!1},_0x326310.prototype.getActiveCount=function(){return this._currentActiveCount},_0x326310.prototype._hasTargetStopDurationDependantGradient=function(){return this._startSizeGradients&&this._startSizeGradients.length>0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0},_0x326310.prototype.start=function(e){var t=this;if(void 0===e&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set";e?setTimeout((function(){t.start(0)}),e):(this._started=!0,this._stopped=!1,this._preWarmDone=!1,this.beginAnimationOnStart&&this.animations&&this.animations.length>0&&this._scene&&this._scene.beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop))},_0x326310.prototype.stop=function(){this._stopped||(this._stopped=!0)},_0x326310.prototype.reset=function(){this._releaseBuffers(),this._releaseVAOs(),this._currentActiveCount=0,this._targetIndex=0},_0x326310.prototype.getClassName=function(){return"GPUParticleSystem"},_0x326310.prototype.getCustomEffect=function(e){var t;return void 0===e&&(e=0),null!==(t=this._customEffect[e])&&void 0!==t?t:this._customEffect[0]},_0x326310.prototype.setCustomEffect=function(e,t){void 0===t&&(t=0),this._customEffect[t]=e},_0x326310.prototype._removeGradientAndTexture=function(e,t,i){return _super.prototype._removeGradientAndTexture.call(this,e,t,i),this._releaseBuffers(),this},_0x326310.prototype.addColorGradient=function(e,t,i){this._colorGradients||(this._colorGradients=[]);var n=new _0x43ab59(e,t);return this._colorGradients.push(n),this._refreshColorGradient(!0),this._releaseBuffers(),this},_0x326310.prototype._refreshColorGradient=function(e){void 0===e&&(e=!1),this._colorGradients&&(e&&this._colorGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null))},_0x326310.prototype.forceRefreshGradients=function(){this._refreshColorGradient(),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture"),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture"),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture"),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture"),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture"),this.reset()},_0x326310.prototype.removeColorGradient=function(e){return this._removeGradientAndTexture(e,this._colorGradients,this._colorGradientsTexture),this._colorGradientsTexture=null,this},_0x326310.prototype._addFactorGradient=function(e,t,i){var n=new _0x28226b(t,i);e.push(n),this._releaseBuffers()},_0x326310.prototype.addSizeGradient=function(e,t){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture",!0),this._releaseBuffers(),this},_0x326310.prototype.removeSizeGradient=function(e){return this._removeGradientAndTexture(e,this._sizeGradients,this._sizeGradientsTexture),this._sizeGradientsTexture=null,this},_0x326310.prototype._refreshFactorGradient=function(e,t,i){if(void 0===i&&(i=!1),e){i&&e.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}));var n=this;n[t]&&(n[t].dispose(),n[t]=null)}},_0x326310.prototype.addAngularSpeedGradient=function(e,t){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture",!0),this._releaseBuffers(),this},_0x326310.prototype.removeAngularSpeedGradient=function(e){return this._removeGradientAndTexture(e,this._angularSpeedGradients,this._angularSpeedGradientsTexture),this._angularSpeedGradientsTexture=null,this},_0x326310.prototype.addVelocityGradient=function(e,t){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture",!0),this._releaseBuffers(),this},_0x326310.prototype.removeVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._velocityGradients,this._velocityGradientsTexture),this._velocityGradientsTexture=null,this},_0x326310.prototype.addLimitVelocityGradient=function(e,t){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture",!0),this._releaseBuffers(),this},_0x326310.prototype.removeLimitVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._limitVelocityGradients,this._limitVelocityGradientsTexture),this._limitVelocityGradientsTexture=null,this},_0x326310.prototype.addDragGradient=function(e,t){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture",!0),this._releaseBuffers(),this},_0x326310.prototype.removeDragGradient=function(e){return this._removeGradientAndTexture(e,this._dragGradients,this._dragGradientsTexture),this._dragGradientsTexture=null,this},_0x326310.prototype.addEmitRateGradient=function(e,t,i){return this},_0x326310.prototype.removeEmitRateGradient=function(e){return this},_0x326310.prototype.addStartSizeGradient=function(e,t,i){return this},_0x326310.prototype.removeStartSizeGradient=function(e){return this},_0x326310.prototype.addColorRemapGradient=function(e,t,i){return this},_0x326310.prototype.removeColorRemapGradient=function(){return this},_0x326310.prototype.addAlphaRemapGradient=function(e,t,i){return this},_0x326310.prototype.removeAlphaRemapGradient=function(){return this},_0x326310.prototype.addRampGradient=function(e,t){return this},_0x326310.prototype.removeRampGradient=function(){return this},_0x326310.prototype.getRampGradients=function(){return null},_0x326310.prototype.addLifeTimeGradient=function(e,t,i){return this},_0x326310.prototype.removeLifeTimeGradient=function(e){return this},_0x326310.prototype._reset=function(){this._releaseBuffers()},_0x326310.prototype._createUpdateVAO=function(e){var t={attributeLocations:{},attributes:[],attIndex:0,offset:0,attributesStrideSize:this._attributesStrideSize,buffer:e};return _0x38ef28(t,"position",3),this.particleEmitterType instanceof _0x4ba997&&_0x38ef28(t,"initialPosition",3),_0x38ef28(t,"age",1),_0x38ef28(t,"life",1),_0x38ef28(t,"seed",4),_0x38ef28(t,"size",3),this._colorGradientsTexture||_0x38ef28(t,"color",4),_0x38ef28(t,"direction",3),this._isBillboardBased||_0x38ef28(t,"initialDirection",3),this._angularSpeedGradientsTexture?_0x38ef28(t,"angle",1):_0x38ef28(t,"angle",2),this._isAnimationSheetEnabled&&(_0x38ef28(t,"cellIndex",1),this.spriteRandomStartCell&&_0x38ef28(t,"cellStartOffset",1)),this.noiseTexture&&(_0x38ef28(t,"noiseCoordinates1",3),_0x38ef28(t,"noiseCoordinates2",3)),this._updateAttributeLocations=t.attributeLocations,this._updateAttributes=t.attributes,new c$12({context:this._context,attributes:this._updateAttributes})},_0x326310.prototype._createRenderVAO=function(e,t){var i={attributeLocations:[],attributes:[],attIndex:0,offset:0,attributesStrideSize:4,buffer:t};_0x38ef28(i,"offset",2),_0x38ef28(i,"uv",2);var n={attributeLocations:i.attributeLocations,attributes:i.attributes,attIndex:i.attIndex,offset:0,attributesStrideSize:this._attributesStrideSize,buffer:e,instanceDivisor:1};return _0x38ef28(n,"position",3),this.particleEmitterType instanceof _0x4ba997&&(n.offset+=3),_0x38ef28(n,"age",1),_0x38ef28(n,"life",1),n.offset+=4,_0x38ef28(n,"size",3),this._colorGradientsTexture||_0x38ef28(n,"color",4),this.billboardMode===_0x29b01c.BILLBOARDMODE_STRETCHED?_0x38ef28(n,"direction",3):n.offset+=3,this._isBillboardBased||_0x38ef28(n,"initialDirection",3),this._angularSpeedGradientsTexture?_0x38ef28(n,"angle",1):_0x38ef28(n,"angle",2),this._isAnimationSheetEnabled&&(_0x38ef28(n,"cellIndex",1),this.spriteRandomStartCell&&_0x38ef28(n,"cellStartOffset",1)),this.noiseTexture&&(_0x38ef28(n,"noiseCoordinates1",3),_0x38ef28(n,"noiseCoordinates2",3)),this._renderAttributeLocations=n.attributeLocations,this._renderAttributes=n.attributes,new c$12({context:this._context,attributes:this._renderAttributes})};var _0x54f166=new o$1p;_0x326310.prototype._initialize=function(e){if(!e$2b(this._buffer0)||e){var t=new Array;this._attributesStrideSize=21,this._targetIndex=0,this.particleEmitterType instanceof _0x4ba997&&(this._attributesStrideSize+=3),this.isBillboardBased||(this._attributesStrideSize+=3),this._colorGradientsTexture&&(this._attributesStrideSize-=4),this._angularSpeedGradientsTexture&&(this._attributesStrideSize-=1),this._isAnimationSheetEnabled&&(this._attributesStrideSize+=1,this.spriteRandomStartCell&&(this._attributesStrideSize+=1)),this.noiseTexture&&(this._attributesStrideSize+=6);for(var i=this.particleEmitterType instanceof _0x4ba997,n=0;n<this._capacity;n++)t.push(0),t.push(0),t.push(0),i&&(this.particleEmitterType.particlePositionGenerator(n,null,_0x54f166),t.push(_0x54f166.x),t.push(_0x54f166.y),t.push(_0x54f166.z)),t.push(0),t.push(0),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(0),t.push(0),t.push(0),this._colorGradientsTexture||(t.push(0),t.push(0),t.push(0),t.push(0)),i?(this.particleEmitterType.particleDestinationGenerator(n,null,_0x54f166),t.push(_0x54f166.x),t.push(_0x54f166.y),t.push(_0x54f166.z)):(t.push(0),t.push(0),t.push(0)),this.isBillboardBased||(t.push(0),t.push(0),t.push(0)),t.push(0),this._angularSpeedGradientsTexture||t.push(0),this._isAnimationSheetEnabled&&(t.push(0),this.spriteRandomStartCell&&t.push(0)),this.noiseTexture&&(t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()));var r=new Float32Array(t),o=new Float32Array([.5,.5,1,1,-.5,.5,0,1,-.5,-.5,0,0,.5,-.5,1,0]);this._buffer0=t$Y.createVertexBuffer({context:this._context,typedArray:r,usage:A$19.STATIC_DRAW}),this._buffer1=t$Y.createVertexBuffer({context:this._context,typedArray:r,usage:A$19.STATIC_DRAW}),this._spriteBuffer=t$Y.createVertexBuffer({context:this._context,typedArray:o,usage:A$19.STATIC_DRAW}),this._updateVAO=[],this._updateVAO.push(this._createUpdateVAO(this._buffer0)),this._updateVAO.push(this._createUpdateVAO(this._buffer1)),this._renderVAO=[],this._renderVAO.push(this._createRenderVAO(this._buffer1,this._spriteBuffer)),this._renderVAO.push(this._createRenderVAO(this._buffer0,this._spriteBuffer)),this._sourceBuffer=this._buffer0,this._targetBuffer=this._buffer1}},_0x326310.prototype._recreateUpdateEffect=function(){var e=[];if(this.particleEmitterType&&this.particleEmitterType.getEffectDefines(e),this._isBillboardBased&&e.push("BILLBOARD"),this._colorGradientsTexture&&e.push("COLORGRADIENTS"),this._sizeGradientsTexture&&e.push("SIZEGRADIENTS"),this._angularSpeedGradientsTexture&&e.push("ANGULARSPEEDGRADIENTS"),this._velocityGradientsTexture&&e.push("VELOCITYGRADIENTS"),this._limitVelocityGradientsTexture&&e.push("LIMITVELOCITYGRADIENTS"),this._dragGradientsTexture&&e.push("DRAGGRADIENTS"),this.isAnimationSheetEnabled&&(e.push("ANIMATESHEET"),this.spriteRandomStartCell&&e.push("ANIMATESHEETRANDOMSTART")),this.noiseTexture&&e.push("NOISE"),this.isLocal&&e.push("LOCAL"),this._transformFeedbackVaryings=["outPosition"],this.particleEmitterType instanceof _0x4ba997&&this._transformFeedbackVaryings.push("outInitialPosition"),this._transformFeedbackVaryings.push("outAge"),this._transformFeedbackVaryings.push("outLife"),this._transformFeedbackVaryings.push("outSeed"),this._transformFeedbackVaryings.push("outSize"),this._colorGradientsTexture||this._transformFeedbackVaryings.push("outColor"),this._transformFeedbackVaryings.push("outDirection"),this._isBillboardBased||this._transformFeedbackVaryings.push("outInitialDirection"),this._transformFeedbackVaryings.push("outAngle"),this.isAnimationSheetEnabled&&(this._transformFeedbackVaryings.push("outCellIndex"),this.spriteRandomStartCell&&this._transformFeedbackVaryings.push("outCellStartOffset")),this.noiseTexture&&(this._transformFeedbackVaryings.push("outNoiseCoordinates1"),this._transformFeedbackVaryings.push("outNoiseCoordinates2")),!e$2b(this._updateSp)){this._updateDefines=e;var t,i,n=this._updateCommand;e$2b(n.shaderProgram)?(t=n.shaderProgram.vertexShaderSource.clone(),i=n.shaderProgram.fragmentShaderSource.clone()):(t=new s$U({name:"BabylonGpuUpdateParticlesVS",sources:[_0x31663e]}),i=new s$U({name:"BabylonGpuUpdateParticlesFS",sources:[_0xdbe70b]})),t.defines=e,i.defines=e,this._updateSp=this._updateSp&&this._updateSp.destroy(),this._updateSp=r$13.fromCache({context:this._context,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:this._updateAttributeLocations,transformFeedback:!0,transformFeedbackVaryings:this._transformFeedbackVaryings})}this._updateCommand.shaderProgram=this._updateSp},_0x326310.prototype._getEffect=function(){var e;return null!==(e=this.getCustomEffect())&&void 0!==e?e:this._renderEffect},_0x326310.prototype.fillDefines=function(e,t){if(this.blendMode===_0x5f5957.BLENDMODE_MULTIPLY&&e.push("BLENDMULTIPLYMODE"),this.isLocal&&e.push("LOCAL"),this._isBillboardBased)switch(e.push("BILLBOARD"),this.billboardMode){case _0x29b01c.BILLBOARDMODE_Y:e.push("BILLBOARDY");break;case _0x29b01c.BILLBOARDMODE_STRETCHED:e.push("BILLBOARDSTRETCHED");break;case _0x29b01c.BILLBOARDMODE_ALL:e.push("BILLBOARDMODE_ALL")}this._colorGradientsTexture&&e.push("COLORGRADIENTS"),this.isAnimationSheetEnabled&&e.push("ANIMATESHEET")},_0x326310.prototype._recreateRenderEffect=function(){var e=[];if(this.fillDefines(e),!e$2b(this._renderDefines)){this._renderDefines=e;var t,i,n=this._drawCommand;e$2b(n.shaderProgram)?(t=n.shaderProgram.vertexShaderSource.clone(),i=n.shaderProgram.fragmentShaderSource.clone()):(t=new s$U({name:"BabylonGpuRenderParticlesVS",sources:[_0x3de8c9]}),i=new s$U({name:"BabylonGpuRenderParticlesFS",sources:[_0x7d752a]})),t.defines=e,i.defines=e,this._renderSp=this._renderSp&&this._renderSp.destroy(),this._renderSp=r$13.fromCache({context:this._context,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:this._renderAttributeLocations})}this._drawCommand.shaderProgram=this._renderSp},_0x326310.prototype.animate=function(){this._timeDelta=this.updateSpeed,this._actualFrame+=this._timeDelta,this._stopped||this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()},_0x326310.prototype._createFactorGradientTexture=function(e,t){var i=this[t];if(e&&e.length&&!i){for(var n=new Float32Array(3*this._rawTextureWidth),r=0;r<this._rawTextureWidth;r++){var o=r/this._rawTextureWidth;_0xf6a90a.GetCurrentGradient(o,e,(function(e,t,i){n[3*r]=_0x2c1e2b.Lerp(e.factor1,t.factor1,i),n[3*r+1]=n[3*r],n[3*r+2]=n[3*r]}))}this[t]=new t$V({context:this._context,source:{width:this._rawTextureWidth,height:1,arrayBufferView:n},flipY:!1,pixelFormat:V$10.RGB,pixelDatatype:_$$.FLOAT,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})}},_0x326310.prototype._createSizeGradientTexture=function(){this._createFactorGradientTexture(this._sizeGradients,"_sizeGradientsTexture")},_0x326310.prototype._createAngularSpeedGradientTexture=function(){this._createFactorGradientTexture(this._angularSpeedGradients,"_angularSpeedGradientsTexture")},_0x326310.prototype._createVelocityGradientTexture=function(){this._createFactorGradientTexture(this._velocityGradients,"_velocityGradientsTexture")},_0x326310.prototype._createLimitVelocityGradientTexture=function(){this._createFactorGradientTexture(this._limitVelocityGradients,"_limitVelocityGradientsTexture")},_0x326310.prototype._createDragGradientTexture=function(){this._createFactorGradientTexture(this._dragGradients,"_dragGradientsTexture")};var _0x31f86f=new e$1U;_0x326310.prototype._createColorGradientTexture=function(){if(this._colorGradients&&this._colorGradients.length&&!this._colorGradientsTexture){for(var e=new Uint8Array(4*this._rawTextureWidth),t=_0x31f86f,i=0;i<this._rawTextureWidth;i++){var n=i/this._rawTextureWidth;_0xf6a90a.GetCurrentGradient(n,this._colorGradients,(function(n,r,o){e$1U.lerp(n.color1,r.color1,o,t),e[4*i]=255*t.red,e[4*i+1]=255*t.green,e[4*i+2]=255*t.blue,e[4*i+3]=255*t.alpha}))}this._colorGradientsTexture=new t$V({context:this._context,source:{width:this._rawTextureWidth,height:1,arrayBufferView:e},flipY:!1,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})}},_0x326310.prototype.update=function(e){e$2b(this._drawCommand)||this._createDrawCommand(),this.render(e)},_0x326310.prototype.render=function(e){if(!this._started)return 0;this._createColorGradientTexture(),this._createSizeGradientTexture(),this._createAngularSpeedGradientTexture(),this._createVelocityGradientTexture(),this._createLimitVelocityGradientTexture(),this._createDragGradientTexture(),this.animate(!0),this._initialize(!1),this._recreateUpdateEffect(),this._recreateRenderEffect();var t=this.emitRate*this._timeDelta;if(this._accumulatedCount+=t,this._accumulatedCount>1){var i=0|this._accumulatedCount;this._accumulatedCount-=i,this._currentActiveCount=Math.min(this._activeCount,this._currentActiveCount+i)}if(!this._currentActiveCount)return 0;this._transformFeedback.targetBuffer=this._targetBuffer,_0x36dee7._setRenderState(this._drawCommand,this.blendMode),this._updateCommand.vertexArray=this._updateVAO[this._targetIndex],this._updateCommand.vertexArray._numberOfVertices=this._currentActiveCount,this._drawCommand.vertexArray=this._renderVAO[this._targetIndex],this._drawCommand.instanceCount=this._currentActiveCount,e.commandList.push(this._updateCommand),e.commandList.push(this._drawCommand),this._targetIndex++,2===this._targetIndex&&(this._targetIndex=0);var n=this._sourceBuffer;return this._sourceBuffer=this._targetBuffer,this._targetBuffer=n,this._currentActiveCount},_0x326310.prototype.rebuild=function(){this._initialize(!0)},_0x326310.prototype._releaseBuffers=function(){},_0x326310.prototype._releaseVAOs=function(){if(this._updateVAO){for(var e=0;e<this._updateVAO.length;e++){(t=this._updateVAO[e]).isDestroyed()&&t.destroy()}this._updateVAO=[];for(e=0;e<this._renderVAO.length;e++){var t;(t=this._renderVAO[e]).isDestroyed()&&t.destroy()}this._renderVAO=[]}},_0x326310.prototype.isDestroyed=function(){return!1},_0x326310.prototype.destroy=function(){var e;e$2b(this._drawCommand)&&((e=this._drawCommand).shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.vertexArray=void 0,e.renderState=void 0,e.uniformMap=void 0,this._drawCommand=void 0);e$2b(this._updateCommand)&&((e=this._updateCommand).shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.vertexArray=void 0,e.renderState=void 0,e.uniformMap=void 0,this._updateCommand=void 0);this._transformFeedback&&(!this._transformFeedback.isDestroyed()&&this._transformFeedback.destroy(),this._transformFeedback=void 0),this._releaseBuffers(),this._releaseVAOs(),this._colorGradientsTexture&&(!this._colorGradientsTexture.isDestroyed()&&this._colorGradientsTexture.destroy(),this._colorGradientsTexture=null),this._sizeGradientsTexture&&(!this._sizeGradientsTexture.isDestroyed()&&this._sizeGradientsTexture.destroy(),this._sizeGradientsTexture=null),this._angularSpeedGradientsTexture&&(!this._angularSpeedGradientsTexture.isDestroyed()&&this._angularSpeedGradientsTexture.destroy(),this._angularSpeedGradientsTexture=null),this._velocityGradientsTexture&&(!this._velocityGradientsTexture.isDestroyed()&&this._velocityGradientsTexture.destroy(),this._velocityGradientsTexture=null),this._limitVelocityGradientsTexture&&(!this._limitVelocityGradientsTexture.isDestroyed()&&this._limitVelocityGradientsTexture.destroy(),this._limitVelocityGradientsTexture=null),this._dragGradientsTexture&&(!this._dragGradientsTexture.isDestroyed()&&this._dragGradientsTexture.destroy(),this._dragGradientsTexture=null),this._randomTexture&&(!this._randomTexture.isDestroyed()&&this._randomTexture.destroy(),this._randomTexture=null),this._randomTexture2&&(!this._randomTexture2.isDestroyed()&&this._randomTexture2.destroy(),this._randomTexture2=null),this.particleTexture&&(!this.particleTexture.isDestroyed()&&this.particleTexture.destroy(),this.particleTexture=null),this.noiseTexture&&(!this.noiseTexture.isDestroyed()&&this.noiseTexture.destroy(),this.noiseTexture=null)},_0x326310.prototype.clone=function(e,t){var i=this.serialize(),n=_0x326310.Parse(i,null,"");return n.name=e,void 0===t&&(t=this.emitter),n.emitter=t,n.noiseTexture=this.noiseTexture,n},_0x326310.prototype.serialize=function(e){void 0===e&&(e=!1);var t={};return ParticleSystem._Serialize(t,this,e),t.activeParticleCount=this.activeParticleCount,t.randomTextureSize=this._randomTextureSize,t},_0x326310.Parse=function(e,t,i,n){void 0===n&&(n=!1);var r=new _0x326310(e.name,{capacity:e.capacity,randomTextureSize:e.randomTextureSize},t,!1,null);return e.activeParticleCount&&(r.activeParticleCount=e.activeParticleCount),_0x36dee7._Parse(e,r,t,i),e.preventAutoStart&&(r.preventAutoStart=e.preventAutoStart),!n&&!r.preventAutoStart&&r.start(),r},_0x326310.fromJsonUrl=function(e,t){return t$11.createIfNeeded(e).fetchJson().then((function(e){return _0x326310.Parse(e,null,"",!1,t)}))};var _0x51abf8=new o$1o,_0x1d2ee7=new o$1o,_0x55fe0c=new o$1o,_0x54a610=new o$1p,_0x20667b=new o$1p,_0x2341c5=new e$29,_0x21a40c=new e$29,_0x31f86f=new e$1U;_0x326310.prototype._createUpdateUniformMap=function(){var e,t={},i=this;if(t.currentCount=function(){return i._currentActiveCount},t.timeDelta=function(){return i._timeDelta},t.stopFactor=function(){return i._stopped?0:1},t.randomSampler=function(){return e$2b(i._randomTexture)?i._randomTexture:i._context.defaultTexture},t.randomSampler2=function(){return e$2b(i._randomTexture2)?i._randomTexture2:i._context.defaultTexture},t.lifeTime=function(){return _0x51abf8.x=i.minLifeTime,_0x51abf8.y=i.maxLifeTime,_0x51abf8},t.emitPower=function(){return _0x1d2ee7.x=i.minEmitPower,_0x1d2ee7.y=i.maxEmitPower,_0x1d2ee7},t.color1=function(){return i.color1},t.color2=function(){return i.color2},t.sizeRange=function(){return _0x55fe0c.x=i.minSize,_0x55fe0c.y=i.maxSize,_0x55fe0c},t.scaleRange=function(){return _0x2341c5.x=i.minScaleX,_0x2341c5.y=i.maxScaleX,_0x2341c5.z=i.minScaleY,_0x2341c5.w=i.maxScaleY,_0x2341c5},t.angleRange=function(){return _0x21a40c.x=i.minAngularSpeed,_0x21a40c.y=i.maxAngularSpeed,_0x21a40c.z=i.minInitialRotation,_0x21a40c.w=i.maxInitialRotation,_0x21a40c},t.gravity=function(){return i.gravity},t.sizeGradientSampler=function(){return e$2b(i._sizeGradientsTexture)?i._sizeGradientsTexture:i._context.defaultTexture},t.angularSpeedGradientSampler=function(){return e$2b(i._angularSpeedGradientsTexture)?i._angularSpeedGradientsTexture:i._context.defaultTexture},t.velocityGradientSampler=function(){return e$2b(i._velocityGradientsTexture)?i._velocityGradientsTexture:i._context.defaultTexture},t.limitVelocityGradientSampler=function(){return e$2b(i._limitVelocityGradientsTexture)?i._limitVelocityGradientsTexture:i._context.defaultTexture},t.limitVelocityDamping=function(){return i.limitVelocityDamping},t.dragGradientSampler=function(){return e$2b(i._dragGradientsTexture)?i._dragGradientsTexture:i._context.defaultTexture},this.particleEmitterType&&this.particleEmitterType.applyToShader(t),t.cellInfos=function(){return _0x54a610.x=i.startSpriteCellID,_0x54a610.y=i.endSpriteCellID,_0x54a610.z=i.spriteCellChangeSpeed,_0x54a610},t.noiseSampler=function(){return e$2b(i.noiseTexture)?i.noiseTexture:i._context.defaultTexture},t.noiseStrength=function(){return i.noiseStrength},this.emitter.position){var n=this.emitter;e=n.getWorldMatrix()}else{var r=this.emitter;e=p$1d.fromTranslation(r)}t.emitterWM=function(){return e},this._updateUniformMap=t},_0x326310.prototype._createRenderUniformMap=function(){var e,t={},i=this;if(t.diffuseSampler=function(){return e$2b(i.particleTexture)?i.particleTexture:i._context.defaultTexture},t.translationPivot=function(){return i.translationPivot},t.worldOffset=function(){return i.worldOffset},this.emitter.position){var n=this.emitter;e=n.getWorldMatrix()}else{var r=this.emitter;e=p$1d.fromTranslation(r)}t.emitterWM=function(){return e},t.colorGradientSampler=function(){return e$2b(i._colorGradientsTexture)?i._colorGradientsTexture:i._context.defaultTexture},t.colorDead=function(){return i.colorDead},t.sheetInfos=function(){return _0x20667b.x=i.spriteCellWidth/baseSize.width,_0x20667b.y=i.spriteCellHeight/baseSize.height,_0x20667b.z=i.width/baseSize.spriteCellWidth,_0x20667b},this._renderUniformMap=t},_0x326310.prototype._createDrawCommand=function(){this._boundingVolume=new i$1c,this._createRenderUniformMap(),this._createUpdateUniformMap();var e=new i$_({primitiveType:W$18.TRIANGLE_FAN,modelMatrix:this._modelMatrx,boundingVolume:this._boundingVolume,pass:Le$s.OPAQUE,cull:!1});e.castShadows=!1,e.receiveShadows=!1,e.selectCastShadows=!1,e.uniformMap=this._renderUniformMap,this._drawCommand=e;var t=new i$_({primitiveType:W$18.POINTS,modelMatrix:this._modelMatrx,boundingVolume:this._boundingVolume,pass:Le$s.OPAQUE,cull:!1});t.castShadows=!1,t.receiveShadows=!1,t.selectCastShadows=!1,t.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,blending:!1}),t.uniformMap=this._updateUniformMap,this._updateCommand=t,this._transformFeedback=new s$i({context:this._context,primitiveType:W$18.POINTS}),this._updateCommand.transformFeedback=this._transformFeedback};var _0x134623=(_0x10ac7f=!0,function(e,t){var i=_0x10ac7f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x10ac7f=!1,i}),_0x5df2f4=_0x134623(void 0,(function(){return _0x5df2f4.toString().search("(((.+)+)+)+$").toString().constructor(_0x5df2f4).search("(((.+)+)+)+$")})),_0x10ac7f;function _0x15de7e(e){this.particleSystem=e,this.position=new o$1p(0,0,0),this.direction=new o$1p(0,0,0),this.color=new e$1U(0,0,0,0),this.colorStep=new e$1U(0,0,0,0),this.lifeTime=1,this.age=0,this.size=0,this.scale=new o$1o(1,1),this.angle=0,this.angularSpeed=0,this.cellIndex=0,this._attachedSubEmitters=null,this._currentColor1=new e$1U(0,0,0,0),this._currentColor2=new e$1U(0,0,0,0),this._currentSize1=0,this._currentSize2=0,this._currentAngularSpeed1=0,this._currentAngularSpeed2=0,this._currentVelocity1=0,this._currentVelocity2=0,this._currentLimitVelocity1=0,this._currentLimitVelocity2=0,this._currentDrag1=0,this._currentDrag2=0,this.id=_0x15de7e._Count++,this.particleSystem.isAnimationSheetEnabled&&this.updateCellInfoFromSystem()}_0x5df2f4(),_0x15de7e.prototype.updateCellInfoFromSystem=function(){this.cellIndex=this.particleSystem.startSpriteCellID},_0x15de7e.prototype.updateCellIndex=function(){var e=this.age,t=this.particleSystem.spriteCellChangeSpeed;this.particleSystem.spriteRandomStartCell&&(void 0===this._randomCellOffset&&(this._randomCellOffset=Math.random()*this.lifeTime),0===t?(t=1,e=this._randomCellOffset):e+=this._randomCellOffset);var i=this._initialEndSpriteCellID-this._initialStartSpriteCellID,n=_0x2c1e2b.Clamp(e*t%this.lifeTime/this.lifeTime);this.cellIndex=this._initialStartSpriteCellID+n*i|0};var _0x317e3c=new o$1p;_0x15de7e.prototype._inheritParticleInfoToSubEmitter=function(e){if(e.particleSystem.emitter.position){var t=e.particleSystem.emitter;if(o$1p.clone(this.position,t.position),e.inheritDirection){var i=_0x317e3c;o$1p.normalize(this.direction,i),t.setDirection(i,0,Math.PI/2)}}else{var n=e.particleSystem.emitter;o$1p.clone(this.position,n)}o$1p.multiplyByScalar(this.direction,e.inheritedVelocityAmount/2,_0x317e3c),o$1p.clone(_0x317e3c,e.particleSystem._inheritedVelocityOffset)},_0x15de7e.prototype._inheritParticleInfoToSubEmitters=function(){var e=this;this._attachedSubEmitters&&this._attachedSubEmitters.length>0&&this._attachedSubEmitters.forEach((function(t){e._inheritParticleInfoToSubEmitter(t)}))},_0x15de7e.prototype._reset=function(){this.age=0,this.id=_0x15de7e._Count++,this._currentColorGradient=null,this._currentSizeGradient=null,this._currentAngularSpeedGradient=null,this._currentVelocityGradient=null,this._currentLimitVelocityGradient=null,this._currentDragGradient=null,this.cellIndex=this.particleSystem.startSpriteCellID,this._randomCellOffset=void 0},_0x15de7e.prototype.copyTo=function(e){e.position=o$1p.clone(this.position,e.position),this._initialDirection?e._initialDirection=o$1p.clone(this._initialDirection,e._initialDirection):e._initialDirection=null,e.direction=o$1p.clone(this.direction,e.direction),this._localPosition&&(e._localPosition=o$1p.clone(this._localPosition,e._localPosition)),e.color=e$1U.clone(this.color,e.color),e.colorStep=e$1U.clone(this.colorStep,e.colorStep),e.lifeTime=this.lifeTime,e.age=this.age,e._randomCellOffset=this._randomCellOffset,e.size=this.size,e.scale=o$1o.clone(this.scale,e.scale),e.angle=this.angle,e.angularSpeed=this.angularSpeed,e.particleSystem=this.particleSystem,e.cellIndex=this.cellIndex,e.id=this.id,e._attachedSubEmitters=this._attachedSubEmitters,this._currentColorGradient&&(e._currentColorGradient=this._currentColorGradient,e._currentColor1=e$1U.clone(this._currentColor1,e._currentColor1),e._currentColor2=e$1U.clone(this._currentColor2,e._currentColor2)),this._currentSizeGradient&&(e._currentSizeGradient=this._currentSizeGradient,e._currentSize1=this._currentSize1,e._currentSize2=this._currentSize2),this._currentAngularSpeedGradient&&(e._currentAngularSpeedGradient=this._currentAngularSpeedGradient,e._currentAngularSpeed1=this._currentAngularSpeed1,e._currentAngularSpeed2=this._currentAngularSpeed2),this._currentVelocityGradient&&(e._currentVelocityGradient=this._currentVelocityGradient,e._currentVelocity1=this._currentVelocity1,e._currentVelocity2=this._currentVelocity2),this._currentLimitVelocityGradient&&(e._currentLimitVelocityGradient=this._currentLimitVelocityGradient,e._currentLimitVelocity1=this._currentLimitVelocity1,e._currentLimitVelocity2=this._currentLimitVelocity2),this._currentDragGradient&&(e._currentDragGradient=this._currentDragGradient,e._currentDrag1=this._currentDrag1,e._currentDrag2=this._currentDrag2),this.particleSystem.isAnimationSheetEnabled&&(e._initialStartSpriteCellID=this._initialStartSpriteCellID,e._initialEndSpriteCellID=this._initialEndSpriteCellID),this.particleSystem.useRampGradients&&(e.remapData&&this.remapData?e$29.clone(this.remapData,e.remapData):e.remapData=new e$29(0,0,0,0)),this._randomNoiseCoordinates1&&(e._randomNoiseCoordinates1=o$1p.clone(this._randomNoiseCoordinates1,e._randomNoiseCoordinates1),e._randomNoiseCoordinates2=o$1p.clone(this._randomNoiseCoordinates2,e._randomNoiseCoordinates2))},_0x15de7e._Count=0;var _0x464a98="attribute vec3 position;\nattribute vec4 color;\nattribute float angle;\nattribute vec2 size;\n#ifdef ANIMATESHEET\nattribute float cellIndex;\n#endif\n#ifndef BILLBOARD\nattribute vec3 direction;\n#endif\n#ifdef BILLBOARDSTRETCHED\nattribute vec3 direction;\n#endif\n#ifdef RAMPGRADIENT\nattribute vec4 remapData;\n#endif\nattribute vec2 offset;\n\n// Uniforms\nuniform vec2 translationPivot;\n\n#ifdef ANIMATESHEET\nuniform vec3 particlesInfos; // x (number of rows) y(number of columns) z(rowSize)\n#endif\n\n// Output\nvarying vec2 vUV;\nvarying vec4 vColor;\n\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\n#endif\n\nvec3 rotate(vec3 yaxis, vec3 rotatedCorner) {\n\tvec3 xaxis = normalize(cross(vec3(0., 1.0, 0.), yaxis));\n\tvec3 zaxis = normalize(cross(yaxis, xaxis));\n\n\tvec3 row0 = vec3(xaxis.x, xaxis.y, xaxis.z);\n\tvec3 row1 = vec3(yaxis.x, yaxis.y, yaxis.z);\n\tvec3 row2 = vec3(zaxis.x, zaxis.y, zaxis.z);\n\n\tmat3 rotMatrix = mat3(row0, row1, row2);\n\n\tvec3 alignedCorner = rotMatrix * rotatedCorner;\n\treturn position + alignedCorner;\n}\n\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera, vec3 rotatedCorner) {\n\tvec3 normalizedToCamera = normalize(toCamera);\n\tvec3 normalizedCrossDirToCamera = normalize(cross(normalize(direction), normalizedToCamera));\n\tvec3 crossProduct = normalize(cross(normalizedToCamera, normalizedCrossDirToCamera));\n\n\tvec3 row0 = vec3(normalizedCrossDirToCamera.x, normalizedCrossDirToCamera.y, normalizedCrossDirToCamera.z);\n\tvec3 row1 = vec3(crossProduct.x, crossProduct.y, crossProduct.z);\n\tvec3 row2 = vec3(normalizedToCamera.x, normalizedToCamera.y, normalizedToCamera.z);\n\n\tmat3 rotMatrix = mat3(row0, row1, row2);\n\n\tvec3 alignedCorner = rotMatrix * rotatedCorner;\n\treturn position + alignedCorner;\n}\n#endif\n\nvoid main() {\n\tvec2 cornerPos = (vec2(offset.x - 0.5, offset.y - 0.5) - translationPivot) * size + translationPivot;\n\n#ifdef BILLBOARD\n\t// Rotate\n\tvec3 rotatedCorner;\n\n\t#ifdef BILLBOARDY\n\t\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\t\trotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\trotatedCorner.z = 0.;\n\n\t\tvec3 oriViewPos = (czm_modelView * vec4(position, 1.0)).xyz;\n\t\tvec3 yaxis = oriViewPos;\n\t\tyaxis.y = 0.;\n\n\t\tvec3 vPositionCorner = rotate(normalize(yaxis), rotatedCorner);\n\n\t\tvec3 viewPos = (czm_modelView * vec4(vPositionCorner, 1.0)).xyz;\n\t#elif defined(BILLBOARDSTRETCHED)\n\t\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\t\trotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\trotatedCorner.z = 0.;\n\n\t\tvec3 oriViewPos = (czm_modelView * vec4(position, 1.0)).xyz;\n\t\tvec3 toCamera = oriViewPos;\n\t\tvec3 vPositionCorner = rotateAlign(toCamera, rotatedCorner);\n\n\t\tvec3 viewPos = (czm_modelView * vec4(vPositionCorner, 1.0)).xyz;\n\t#else\n\t\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\t\trotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\trotatedCorner.z = 0.;\n\n\t\tvec3 viewPos = (czm_modelView * vec4(position, 1.0)).xyz + rotatedCorner;\n\t#endif // BILLBOARDY\n\n\t#ifdef RAMPGRADIENT\n\t\tremapRanges = remapData;\n\t#endif\n\n\t// Position\n\tgl_Position = czm_projection * vec4(viewPos, 1.0);\n#else\n\t// Rotate\n\tvec3 rotatedCorner;\n\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\trotatedCorner.z = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\trotatedCorner.y = 0.;\n\n\tvec3 yaxis = normalize(direction);\n\tvec3 vPositionW = rotate(yaxis, rotatedCorner);\n\n\tgl_Position = czm_modelViewProjection * vec4(vPositionW, 1.0);\n#endif // BILLBOARD\n\tvColor = color;\n\n\t#ifdef ANIMATESHEET\n\t\tfloat rowOffset = floor(cellIndex * particlesInfos.z);\n\t\tfloat columnOffset = cellIndex - rowOffset / particlesInfos.z;\n\n\t\tvec2 uvScale = particlesInfos.xy;\n\t\tvec2 uvOffset = vec2(offset.x , 1.0 - offset.y);\n\t\tvUV = (uvOffset + vec2(columnOffset, rowOffset)) * uvScale;\n\t#else\n\t\tvUV = offset;\n\t#endif\n}",_0xd79fc7="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec2 vUV;\nvarying vec4 vColor;\nuniform vec4 textureMask;\nuniform sampler2D diffuseSampler;\n\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\nuniform sampler2D rampSampler;\n#endif\n\nvoid main() {\n\tvec4 textureColor = texture2D(diffuseSampler, vUV);\n\tvec4 baseColor = textureColor * vColor;\n\n\t#ifdef RAMPGRADIENT\n\t\tfloat alpha = baseColor.a;\n\t\tfloat remappedColorIndex = clamp((alpha - remapRanges.x) / remapRanges.y, 0.0, 1.0);\n\n\t\tvec4 rampColor = texture2D(rampSampler, vec2(1.0 - remappedColorIndex, 0.));\n\t\tbaseColor.rgb *= rampColor.rgb;\n\n\t\t// Remapped alpha\n\t\tfloat finalAlpha = baseColor.a;\n\t\tbaseColor.a = clamp((alpha * rampColor.a - remapRanges.z) / remapRanges.w, 0.0, 1.0);\n\t#endif\n\n\t#ifdef BLENDMULTIPLYMODE\n\t\tfloat sourceAlpha = vColor.a * textureColor.a;\n\t\tbaseColor.rgb = baseColor.rgb * sourceAlpha + vec3(1.0) * (1.0 - sourceAlpha);\n\t#endif\n\n\tbaseColor = czm_gammaCorrect(baseColor);\n\tgl_FragColor = baseColor;\n}",_0x2db8ae=(_0x137775=!0,function(e,t){var i=_0x137775?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x137775=!1,i}),_0x4635dc=_0x2db8ae(void 0,(function(){return _0x4635dc.toString().search("(((.+)+)+)+$").toString().constructor(_0x4635dc).search("(((.+)+)+)+$")})),_0x137775;function _0x40adc0(e){void 0===e&&(e=null),this._indices=null,this._positions=null,this._normals=null,this._storedNormal=new o$1p(0,0,0),this._mesh=null,this.direction1=new o$1p(0,1,0),this.direction2=new o$1p(0,1,0),this.useMeshNormalsForDirection=!0,this.mesh=e}_0x4635dc(),Object.defineProperty(_0x40adc0.prototype,"mesh",{get:function(){return this._mesh},set:function(e){this._mesh!==e&&(this._mesh=e,e?(this._indices=e.getIndices(),this._positions=e.getVerticesData(),this._normals=e.getVerticesData()):(this._indices=null,this._positions=null,this._normals=null))},enumerable:!1,configurable:!0});var _0x3efe85=new o$1p;_0x40adc0.prototype.startDirectionFunction=function(e,t,i,n){if(this.useMeshNormalsForDirection&&this._normals)p$1d.multiplyByDirection(e,this._storedNormal,t);else{var r=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),o=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),a=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);if(n)return t.x=r,t.y=o,void(t.z=a);_0x3efe85.x=r,_0x3efe85.y=o,_0x3efe85.z=a,p$1d.multiplyByDirection(e,_0x3efe85,t)}};var _0x5cf78f=new o$1p,_0x4a2825=new o$1p,_0x50a104=new o$1p,_0x2e7827=new o$1p;_0x40adc0.prototype.startPositionFunction=function(e,t,i,n){if(this._indices&&this._positions){var r=3*Math.random()*(this._indices.length/3)|0,o=Math.random(),a=Math.random()*(1-o),s=1-o-a,l=this._indices[r],u=this._indices[r+1],c=this._indices[r+2];o$1p.unpack(this._positions,3*l,_0x5cf78f),o$1p.unpack(this._positions,3*u,_0x4a2825),o$1p.unpack(this._positions,3*c,_0x50a104),_0x2e7827.x=o*_0x5cf78f.x+a*_0x4a2825.x+s*_0x50a104.x,_0x2e7827.y=o*_0x5cf78f.y+a*_0x4a2825.y+s*_0x50a104.y,_0x2e7827.z=o*_0x5cf78f.z+a*_0x4a2825.z+s*_0x50a104.z,n?o$1p.clone(_0x2e7827,t):p$1d.multiplyByPoint(e,_0x2e7827,t),this.useMeshNormalsForDirection&&this._normals&&(o$1p.unpack(this._normals,3*l,_0x5cf78f),o$1p.unpack(this._normals,3*u,_0x4a2825),o$1p.unpack(this._normals,3*c,_0x50a104),this._storedNormal.x=o*_0x5cf78f.x+a*_0x4a2825.x+s*_0x50a104.x,this._storedNormal.y=o*_0x5cf78f.y+a*_0x4a2825.y+s*_0x50a104.y,this._storedNormal.z=o*_0x5cf78f.z+a*_0x4a2825.z+s*_0x50a104.z)}},_0x40adc0.prototype.clone=function(){var e=new _0x40adc0(this.mesh);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x40adc0.prototype.applyToShader=function(e){var t=this;e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x40adc0.prototype.getEffectDefines=function(){},_0x40adc0.prototype.getClassName=function(){return"MeshParticleEmitter"},_0x40adc0.prototype.serialize=function(){var e,t={};return t.type=this.getClassName(),t.direction1=this.direction1.asArray(),t.direction2=this.direction2.asArray(),t.meshId=null===(e=this.mesh)||void 0===e?void 0:e.id,t.useMeshNormalsForDirection=this.useMeshNormalsForDirection,t},_0x40adc0.prototype.parse=function(e){o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2),e.meshId,this.useMeshNormalsForDirection=e.useMeshNormalsForDirection};var _0x27a235=(_0x4f8696=!0,function(e,t){var i=_0x4f8696?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f8696=!1,i}),_0x5c9b4c=_0x27a235(void 0,(function(){return _0x5c9b4c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c9b4c).search("(((.+)+)+)+$")})),_0x4f8696;_0x5c9b4c();var _0x46d900={ATTACHED:0,END:1},_0x536d2c=Object.freeze(_0x46d900),_0x2fb40c=(_0x481618=!0,function(e,t){var i=_0x481618?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x481618=!1,i}),_0x2dbf3b=_0x2fb40c(void 0,(function(){return _0x2dbf3b.toString().search("(((.+)+)+)+$").toString().constructor(_0x2dbf3b).search("(((.+)+)+)+$")})),_0x481618;function _0x1e1355(e){this.particleSystem=e,this.type=_0x536d2c.END,this.inheritDirection=!1,this.inheritedVelocityAmount=0,(!e.emitter||!e.emitter.dispose)&&(e.emitter=new _0xdbdb64("SubemitterSystemEmitter",e.getScene()))}_0x2dbf3b(),_0x1e1355.prototype.clone=function(){var e=this.particleSystem.emitter;e?e instanceof o$1p?e=e.clone():e instanceof _0xdbdb64&&((e=new _0xdbdb64).isVisible=!1):e=new o$1p;var t=new _0x1e1355(this.particleSystem.clone("",e));return t.particleSystem.name+="Clone",t.type=this.type,t.inheritDirection=this.inheritDirection,t.inheritedVelocityAmount=this.inheritedVelocityAmount,t.particleSystem._disposeEmitterOnDispose=!0,t.particleSystem.disposeOnStop=!0,t},_0x1e1355.prototype.serialize=function(){var e={};return e.type=this.type,e.inheritDirection=this.inheritDirection,e.inheritedVelocityAmount=this.inheritedVelocityAmount,e.particleSystem=this.particleSystem.serialize(),e},_0x1e1355._ParseParticleSystem=function(e,t,i){return _0x2fb622.Parse(e,t,i,!0)},_0x1e1355.Parse=function(e,t,i){var n=e.particleSystem,r=new _0x1e1355(_0x1e1355._ParseParticleSystem(n,t,i));return r.type=e.type,r.inheritDirection=e.inheritDirection,r.inheritedVelocityAmount=e.inheritedVelocityAmount,r.particleSystem._isSubEmitter=!0,r},_0x1e1355.prototype.destroy=function(){this.particleSystem.destroy()};var _0x351d40=(_0x7e4ac8=!0,function(e,t){var i=_0x7e4ac8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x7e4ac8=!1,i}),_0xa37f23=_0x351d40(void 0,(function(){return _0xa37f23.toString().search("(((.+)+)+)+$").toString().constructor(_0xa37f23).search("(((.+)+)+)+$")})),_0x7e4ac8;function _0x2fb622(e,t,i,n,r,o){void 0===n&&(n=null),void 0===r&&(r=!1),void 0===o&&(o=.01);var a=_0x36dee7.call(this,e)||this;return a._scene=i,a._context=i._context,a._modelMatrx=p$1d.IDENTITY,a._inheritedVelocityOffset=new o$1p,a._particles=new Array,a._stockParticles=new Array,a._newPartsExcess=0,a._scaledColorStep=new e$1U(0,0,0,0),a._colorDiff=new e$1U(0,0,0,0),a._scaledDirection=new o$1p(0,0,0),a._scaledGravity=new o$1p(0,0,0),a._currentRenderId=-1,a._useInstancing=!1,a._started=!1,a._stopped=!1,a._actualFrame=0,a._currentEmitRate1=0,a._currentEmitRate2=0,a._currentStartSize1=0,a._currentStartSize2=0,a._rawTextureWidth=256,a._useRampGradients=!1,a._disposeEmitterOnDispose=!1,a.isLocal=!1,a._onBeforeDrawParticlesObservable=null,a.recycleParticle=function(e){var t=a._particles.pop();t!==e&&t.copyTo(e),a._stockParticles.push(t)},a._createParticle=function(){var e;if(0!==a._stockParticles.length?(e=a._stockParticles.pop())._reset():e=new _0x15de7e(a),a._subEmitters&&a._subEmitters.length>0){var t=a._subEmitters[Math.floor(Math.random()*a._subEmitters.length)];e._attachedSubEmitters=[],t.forEach((function(t){if(t.type===_0x536d2c.ATTACHED){var i=t.clone();e._attachedSubEmitters.push(i),i.particleSystem.start()}}))}return e},a._emitFromParticle=function(e){if(a._subEmitters&&0!==a._subEmitters.length){var t=Math.floor(Math.random()*a._subEmitters.length);a._subEmitters[t].forEach((function(t){if(t.type===_0x536d2c.END){var i=t.clone();e._inheritParticleInfoToSubEmitter(i),i.particleSystem._rootParticleSystem=a,a.activeSubSystems.push(i.particleSystem),i.particleSystem.start()}}))}},a._capacity=t,a._epsilon=o,a._isAnimationSheetEnabled=r,e$2b(i)&&i.primitives.add(a),a._vertexArrayObject=null,a._customEffect={0:n},a._useInstancing=!0,a._createIndexBuffer(),a._createVertexBuffers(),a.particleEmitterType=new _0x419949,a.updateFunction=function(e){var t=null,i=null;a.noiseTexture&&(t=a.noiseTexture.getSize(),i=a.noiseTexture.getContent());for(var n,r=function(){n=e[o];var r=a._scaledUpdateSpeed,s=n.age;if(n.age+=r,n.age>n.lifeTime){var l=n.age-s;r=(n.lifeTime-s)*r/l,n.age=n.lifeTime}var u=n.age/n.lifeTime;a._colorGradients&&a._colorGradients.length>0?_0xf6a90a.GetCurrentGradient(u,a._colorGradients,(function(e,t,i){e!==n._currentColorGradient&&(e$1U.clone(n._currentColor2,n._currentColor1),t.getColorToRef(n._currentColor2),n._currentColorGradient=e),e$1U.lerp(n._currentColor1,n._currentColor2,i,n.color)})):(e$1U.multiplyByScalar(n.colorStep,r,a._scaledColorStep),e$1U.add(n.color,a._scaledColorStep,n.color),n.color.a<0&&(n.color.a=0)),a._angularSpeedGradients&&a._angularSpeedGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._angularSpeedGradients,(function(e,t,i){e!==n._currentAngularSpeedGradient&&(n._currentAngularSpeed1=n._currentAngularSpeed2,n._currentAngularSpeed2=t.getFactor(),n._currentAngularSpeedGradient=e),n.angularSpeed=_0x2c1e2b.Lerp(n._currentAngularSpeed1,n._currentAngularSpeed2,i)})),n.angle+=n.angularSpeed*r;var c=r;if(a._velocityGradients&&a._velocityGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._velocityGradients,(function(e,t,i){e!==n._currentVelocityGradient&&(n._currentVelocity1=n._currentVelocity2,n._currentVelocity2=t.getFactor(),n._currentVelocityGradient=e),c*=_0x2c1e2b.Lerp(n._currentVelocity1,n._currentVelocity2,i)})),o$1p.multiplyByScalar(n.direction,c,a._scaledDirection),a._limitVelocityGradients&&a._limitVelocityGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._limitVelocityGradients,(function(e,t,i){e!==n._currentLimitVelocityGradient&&(n._currentLimitVelocity1=n._currentLimitVelocity2,n._currentLimitVelocity2=t.getFactor(),n._currentLimitVelocityGradient=e);var r=_0x2c1e2b.Lerp(n._currentLimitVelocity1,n._currentLimitVelocity2,i);o$1p.magnitude(n.direction)>r&&o$1p.multiplyByScalar(n.direction,a.limitVelocityDamping,n.direction)})),a._dragGradients&&a._dragGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._dragGradients,(function(e,t,i){e!==n._currentDragGradient&&(n._currentDrag1=n._currentDrag2,n._currentDrag2=t.getFactor(),n._currentDragGradient=e);var r=_0x2c1e2b.Lerp(n._currentDrag1,n._currentDrag2,i);o$1p.multiplyByScalar(a._scaledDirection,1-r,a._scaledDirection)})),a.isLocal&&n._localPosition?(o$1p.add(n._localPosition,a._scaledDirection,n._localPosition),p$1d.multiplyByPoint(a._emitterWorldMatrix,n._localPosition,n.position)):o$1p.add(n.position,a._scaledDirection,n.position),i&&t&&n._randomNoiseCoordinates1){var h=a._fetchR(n._randomNoiseCoordinates1.x,n._randomNoiseCoordinates1.y,t.width,t.height,i),d=a._fetchR(n._randomNoiseCoordinates1.z,n._randomNoiseCoordinates2.x,t.width,t.height,i),f=a._fetchR(n._randomNoiseCoordinates2.y,n._randomNoiseCoordinates2.z,t.width,t.height,i),p=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Vector3[0],_=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Vector3[1];p.x=(2*h-1)*a.noiseStrength.x,p.y=(2*d-1)*a.noiseStrength.y,p.z=(2*f-1)*a.noiseStrength.z,o$1p.multiplyByScalar(p,r,_),o$1p.add(n.direction,_,n.direction)}if(o$1p.multiplyByScalar(a.gravity,r,a._scaledGravity),o$1p.add(n.direction,a._scaledGravity,n.direction),a._sizeGradients&&a._sizeGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._sizeGradients,(function(e,t,i){e!==n._currentSizeGradient&&(n._currentSize1=n._currentSize2,n._currentSize2=t.getFactor(),n._currentSizeGradient=e),n.size=_0x2c1e2b.Lerp(n._currentSize1,n._currentSize2,i)})),a._useRampGradients&&(a._colorRemapGradients&&a._colorRemapGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._colorRemapGradients,(function(e,t,i){var r=_0x2c1e2b.Lerp(e.factor1,t.factor1,i),o=_0x2c1e2b.Lerp(e.factor2,t.factor2,i);n.remapData.x=r,n.remapData.y=o-r})),a._alphaRemapGradients&&a._alphaRemapGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._alphaRemapGradients,(function(e,t,i){var r=_0x2c1e2b.Lerp(e.factor1,t.factor1,i),o=_0x2c1e2b.Lerp(e.factor2,t.factor2,i);n.remapData.z=r,n.remapData.w=o-r}))),a._isAnimationSheetEnabled&&n.updateCellIndex(),n._inheritParticleInfoToSubEmitters(),n.age>=n.lifeTime)return a._emitFromParticle(n),n._attachedSubEmitters&&(n._attachedSubEmitters.forEach((function(e){e.particleSystem.disposeOnStop=!0,e.particleSystem.stop()})),n._attachedSubEmitters=null),a.recycleParticle(n),o--,"continue"},o=0;o<e.length;o++)r()},a}_0xa37f23(),_0x2fb622.prototype=Object.create(_0x36dee7.prototype),_0x2fb622.prototype.constructor=_0x36dee7,Object.defineProperties(_0x2fb622.prototype,{onDispose:{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}},useRampGradients:{get:function(){return this._useRampGradients},set:function(e){this._useRampGradients!==e&&(this._useRampGradients=e,this._resetEffect())}},particles:{get:function(){return this._particles}},modelMatrix:{get:function(){return this._modelMatrx},set:function(e){if(this._modelMatrx!==e&&(this._modelMatrx=e,this.subEmitters&&this.subEmitters.length))for(var t=0;t<this.subEmitters.length;t++)for(var i=0,n=this.subEmitters[t];i<n.length;i++){n[i].particleSystem.modelMatrix=e}}}}),_0x2fb622.prototype.getActiveCount=function(){return this._particles.length},_0x2fb622.prototype.getClassName=function(){return"ParticleSystem"},_0x2fb622.prototype.isStopping=function(){return this._stopped&&this.isAlive()},_0x2fb622.prototype.getCustomEffect=function(e){var t;return void 0===e&&(e=0),null!==(t=this._customEffect[e])&&void 0!==t?t:this._customEffect[0]},_0x2fb622.prototype.setCustomEffect=function(e,t){void 0===t&&(t=0),this._customEffect[t]=e},_0x2fb622.prototype._addFactorGradient=function(e,t,i,n){var r=new _0x28226b(t,i,n);e.push(r),e.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}))},_0x2fb622.prototype._removeFactorGradient=function(e,t){if(e)for(var i=0,n=0,r=e;n<r.length;n++){if(r[n].gradient===t){e.splice(i,1);break}i++}},_0x2fb622.prototype.addLifeTimeGradient=function(e,t,i){return this._lifeTimeGradients||(this._lifeTimeGradients=[]),this._addFactorGradient(this._lifeTimeGradients,e,t,i),this},_0x2fb622.prototype.removeLifeTimeGradient=function(e){return this._removeFactorGradient(this._lifeTimeGradients,e),this},_0x2fb622.prototype.addSizeGradient=function(e,t,i){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t,i),this},_0x2fb622.prototype.removeSizeGradient=function(e){return this._removeFactorGradient(this._sizeGradients,e),this},_0x2fb622.prototype.addColorRemapGradient=function(e,t,i){return this._colorRemapGradients||(this._colorRemapGradients=[]),this._addFactorGradient(this._colorRemapGradients,e,t,i),this},_0x2fb622.prototype.removeColorRemapGradient=function(e){return this._removeFactorGradient(this._colorRemapGradients,e),this},_0x2fb622.prototype.addAlphaRemapGradient=function(e,t,i){return this._alphaRemapGradients||(this._alphaRemapGradients=[]),this._addFactorGradient(this._alphaRemapGradients,e,t,i),this},_0x2fb622.prototype.removeAlphaRemapGradient=function(e){return this._removeFactorGradient(this._alphaRemapGradients,e),this},_0x2fb622.prototype.addAngularSpeedGradient=function(e,t,i){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t,i),this},_0x2fb622.prototype.removeAngularSpeedGradient=function(e){return this._removeFactorGradient(this._angularSpeedGradients,e),this},_0x2fb622.prototype.addVelocityGradient=function(e,t,i){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t,i),this},_0x2fb622.prototype.removeVelocityGradient=function(e){return this._removeFactorGradient(this._velocityGradients,e),this},_0x2fb622.prototype.addLimitVelocityGradient=function(e,t,i){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t,i),this},_0x2fb622.prototype.removeLimitVelocityGradient=function(e){return this._removeFactorGradient(this._limitVelocityGradients,e),this},_0x2fb622.prototype.addDragGradient=function(e,t,i){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t,i),this},_0x2fb622.prototype.removeDragGradient=function(e){return this._removeFactorGradient(this._dragGradients,e),this},_0x2fb622.prototype.addEmitRateGradient=function(e,t,i){return this._emitRateGradients||(this._emitRateGradients=[]),this._addFactorGradient(this._emitRateGradients,e,t,i),this},_0x2fb622.prototype.removeEmitRateGradient=function(e){return this._removeFactorGradient(this._emitRateGradients,e),this},_0x2fb622.prototype.addStartSizeGradient=function(e,t,i){return this._startSizeGradients||(this._startSizeGradients=[]),this._addFactorGradient(this._startSizeGradients,e,t,i),this},_0x2fb622.prototype.removeStartSizeGradient=function(e){return this._removeFactorGradient(this._startSizeGradients,e),this};var _0x24482b=new e$1U;_0x2fb622.prototype._createRampGradientTexture=function(){if(this._rampGradients&&this._rampGradients.length&&!this._rampGradientsTexture){for(var e=new Uint8Array(4*this._rawTextureWidth),t=_0x24482b,i=0;i<this._rawTextureWidth;i++){var n=i/this._rawTextureWidth;_0xf6a90a.GetCurrentGradient(n,this._rampGradients,(function(n,r,o){e$1U.lerp(n.color,r.color,o,t),e[4*i]=255*t.red,e[4*i+1]=255*t.green,e[4*i+2]=255*t.blue,e[4*i+3]=255}))}this._rampGradientsTexture=new t$V({context:this._context,width:this._rawTextureWidth,height:1,source:{arrayBufferView:e},pixelFormat:V$10.RGBA,flipY:!1})}},_0x2fb622.prototype.getRampGradients=function(){return this._rampGradients},_0x2fb622.prototype.forceRefreshGradients=function(){this._syncRampGradientTexture()},_0x2fb622.prototype._syncRampGradientTexture=function(){!this._rampGradients||(this._rampGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this._rampGradientsTexture&&(this._rampGradientsTexture.destroy(),this._rampGradientsTexture=null),this._createRampGradientTexture())},_0x2fb622.prototype.addRampGradient=function(e,t){this._rampGradients||(this._rampGradients=[]);var i=new _0x48c0c2(e,t);return this._rampGradients.push(i),this._syncRampGradientTexture(),this},_0x2fb622.prototype.removeRampGradient=function(e){return this._removeGradientAndTexture(e,this._rampGradients,this._rampGradientsTexture),this._rampGradientsTexture=null,this._rampGradients&&this._rampGradients.length>0&&this._createRampGradientTexture(),this},_0x2fb622.prototype.addColorGradient=function(e,t,i){this._colorGradients||(this._colorGradients=[]);var n=new _0x43ab59(e,t,i);return this._colorGradients.push(n),this._colorGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this},_0x2fb622.prototype.removeColorGradient=function(e){if(!this._colorGradients)return this;for(var t=0,i=0,n=this._colorGradients;i<n.length;i++){if(n[i].gradient===e){this._colorGradients.splice(t,1);break}t++}return this},_0x2fb622.prototype._fetchR=function(e,t,i,n,r){return r[4*(((e=.5*Math.abs(e)+.5)*i%i|0)+((t=.5*Math.abs(t)+.5)*n%n|0)*i)]/255},_0x2fb622.prototype._reset=function(){this._resetEffect()},_0x2fb622.prototype._resetEffect=function(){e$2b(this._drawCommand)&&(this._drawCommand.vertexArray=null),this._vertexArray&&!this._vertexArray.isDestroyed()&&this._vertexArray.destroy(),this._createIndexBuffer(),this._createVertexBuffers()},_0x2fb622.prototype._createVertexBuffers=function(){var e={},t=[],i=0;e.offset=i++;var n=new Float32Array([0,0,1,0,1,1,0,1]);this._spriteBuffer=t$Y.createVertexBuffer({context:this._context,typedArray:n,usage:A$19.STATIC_DRAW}),t.push({name:"offset",index:e.offset,vertexBuffer:this._spriteBuffer,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:2*S$12.getSizeInBytes(S$12.FLOAT),normalize:!1}),this._vertexBufferSize=10,this._isAnimationSheetEnabled&&(this._vertexBufferSize+=1),(!this._isBillboardBased||this.billboardMode===_0x29b01c.BILLBOARDMODE_STRETCHED)&&(this._vertexBufferSize+=3),this._useRampGradients&&(this._vertexBufferSize+=4),this._vertexData=new Float32Array(this._capacity*this._vertexBufferSize),this._vertexBuffer=t$Y.createVertexBuffer({context:this._context,sizeInBytes:this._vertexData.byteLength,usage:A$19.STATIC_DRAW});var r=S$12.getSizeInBytes(S$12.FLOAT),o=this._vertexBufferSize*r,a=0;e.position=i++,t.push({name:"position",index:e.position,vertexBuffer:this._vertexBuffer,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=3,e.color=i++,t.push({name:"color",index:e.color,vertexBuffer:this._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=4,e.angle=i++,t.push({name:"angle",index:e.angle,vertexBuffer:this._vertexBuffer,componentsPerAttribute:1,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=1,e.size=i++,t.push({name:"size",index:e.size,vertexBuffer:this._vertexBuffer,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=2,this._isAnimationSheetEnabled&&(e.cellIndex=i++,t.push({name:"cellIndex",index:e.cellIndex,vertexBuffer:this._vertexBuffer,componentsPerAttribute:1,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=1),(!this._isBillboardBased||this.billboardMode===_0x29b01c.BILLBOARDMODE_STRETCHED)&&(e.direction=i++,t.push({name:"direction",index:e.direction,vertexBuffer:this._vertexBuffer,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=3),this._useRampGradients&&(e.remapData=i++,t.push({name:"remapData",index:e.remapData,vertexBuffer:this._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=4),this._attributeLocations=e,this._attributes=t,this._vertexArray=new c$12({context:this._context,attributes:this._attributes,indexBuffer:this._indexBuffer})},_0x2fb622.prototype._createIndexBuffer=function(){var e=new Uint16Array(6),t=0;e[t++]=0,e[t++]=1,e[t++]=2,e[t++]=0,e[t++]=2,e[t++]=3,this._indexBuffer=t$Y.createIndexBuffer({context:this._context,typedArray:e,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})},_0x2fb622.prototype.getCapacity=function(){return this._capacity},_0x2fb622.prototype.isAlive=function(){return this._alive},_0x2fb622.prototype.isStarted=function(){return this._started},_0x2fb622.prototype._prepareSubEmitterInternalArray=function(){var e=this;this._subEmitters=new Array,this.subEmitters&&this.subEmitters.forEach((function(t){t instanceof _0x2fb622?e._subEmitters.push([new _0x1e1355(t)]):t instanceof _0x1e1355?e._subEmitters.push([t]):t instanceof Array&&e._subEmitters.push(t)}))},_0x2fb622.prototype.start=function(e){var t=this;if(void 0===e&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set";if(e)setTimeout((function(){t.start(0)}),e);else{if(this._prepareSubEmitterInternalArray(),this._started=!0,this._stopped=!1,this._actualFrame=0,this._subEmitters&&0!=this._subEmitters.length&&(this.activeSubSystems=new Array),this._emitRateGradients&&(this._emitRateGradients.length>0&&(this._currentEmitRateGradient=this._emitRateGradients[0],this._currentEmitRate1=this._currentEmitRateGradient.getFactor(),this._currentEmitRate2=this._currentEmitRate1),this._emitRateGradients.length>1&&(this._currentEmitRate2=this._emitRateGradients[1].getFactor())),this._startSizeGradients&&(this._startSizeGradients.length>0&&(this._currentStartSizeGradient=this._startSizeGradients[0],this._currentStartSize1=this._currentStartSizeGradient.getFactor(),this._currentStartSize2=this._currentStartSize1),this._startSizeGradients.length>1&&(this._currentStartSize2=this._startSizeGradients[1].getFactor())),this.preWarmCycles){e$2b(this.emitter)&&this.emitter instanceof _0xdbdb64&&this.emitter.computeWorldMatrix(!0);var i=this.noiseTexture;if(i&&i.onGeneratedObservable)i.onGeneratedObservable.addOnce((function(){setTimeout((function(){for(var e=0;e<t.preWarmCycles;e++)t.animate(!0),i.render()}))}));else for(var n=0;n<this.preWarmCycles;n++)this.animate(!0)}this.beginAnimationOnStart&&this.animations&&this.animations.length>0&&this._scene}},_0x2fb622.prototype.stop=function(e){void 0===e&&(e=!0),!this._stopped&&(this._stopped=!0,e&&this._stopSubEmitters())},_0x2fb622.prototype.reset=function(){this._stockParticles=[],this._particles=[]},_0x2fb622.prototype._appendParticleVertex=function(e,t,i,n){var r=e*this._vertexBufferSize;if(this._vertexData[r++]=t.position.x+this.worldOffset.x,this._vertexData[r++]=t.position.y+this.worldOffset.y,this._vertexData[r++]=t.position.z+this.worldOffset.z,this._vertexData[r++]=t.color.red,this._vertexData[r++]=t.color.green,this._vertexData[r++]=t.color.blue,this._vertexData[r++]=t.color.alpha,this._vertexData[r++]=t.angle,this._vertexData[r++]=t.scale.x*t.size,this._vertexData[r++]=t.scale.y*t.size,this._isAnimationSheetEnabled&&(this._vertexData[r++]=t.cellIndex),this._isBillboardBased)this.billboardMode===_0x29b01c.BILLBOARDMODE_STRETCHED&&(this._vertexData[r++]=t.direction.x,this._vertexData[r++]=t.direction.y,this._vertexData[r++]=t.direction.z);else if(t._initialDirection){var o=t._initialDirection;this.isLocal&&p$1d.multiplyByDirection(this._emitterWorldMatrix,o,o),0===o.x&&0===o.z&&(o.x=.001),this._vertexData[r++]=o.x,this._vertexData[r++]=o.y,this._vertexData[r++]=o.z}else{var a=t.direction;this.isLocal&&p$1d.multiplyByDirection(this._emitterWorldMatrix,a,a),0===a.x&&0===a.z&&(a.x=.001),this._vertexData[r++]=a.x,this._vertexData[r++]=a.y,this._vertexData[r++]=a.z}this._useRampGradients&&t.remapData&&(this._vertexData[r++]=t.remapData.x,this._vertexData[r++]=t.remapData.y,this._vertexData[r++]=t.remapData.z,this._vertexData[r++]=t.remapData.w),this._useInstancing||(this._isAnimationSheetEnabled&&(0===i?i=this._epsilon:1===i&&(i=1-this._epsilon),0===n?n=this._epsilon:1===n&&(n=1-this._epsilon)),this._vertexData[r++]=i,this._vertexData[r++]=n)},_0x2fb622.prototype._stopSubEmitters=function(){!this.activeSubSystems||(this.activeSubSystems.forEach((function(e){e.stop(!0)})),this.activeSubSystems=new Array)},_0x2fb622.prototype._removeFromRoot=function(){if(this._rootParticleSystem){var e=this._rootParticleSystem.activeSubSystems.indexOf(this);-1!==e&&this._rootParticleSystem.activeSubSystems.splice(e,1),this._rootParticleSystem=null}},_0x2fb622.prototype._update=function(e){var t=this;if(this._alive=this._particles.length>0,this.emitter.position){var i=this.emitter;this._emitterWorldMatrix=i.getWorldMatrix()}else{var n=this.emitter;this._emitterWorldMatrix=p$1d.fromTranslation(n,this._emitterWorldMatrix)}this.updateFunction(this._particles);for(var r,o,a=function(){if(s._particles.length===s._capacity)return"break";if(r=s._createParticle(),s._particles.push(r),s.targetStopDuration&&s._lifeTimeGradients&&s._lifeTimeGradients.length>0){var e=_0x2c1e2b.Clamp(s._actualFrame/s.targetStopDuration);_0xf6a90a.GetCurrentGradient(e,s._lifeTimeGradients,(function(t,i){var n=t,o=i,a=n.getFactor(),s=o.getFactor(),l=(e-n.gradient)/(o.gradient-n.gradient);r.lifeTime=_0x2c1e2b.Lerp(a,s,l)}))}else r.lifeTime=_0x2c1e2b.RandomRange(s.minLifeTime,s.maxLifeTime);var i=_0x2c1e2b.RandomRange(s.minEmitPower,s.maxEmitPower);if(s.startPositionFunction?s.startPositionFunction(s._emitterWorldMatrix,r.position,r,s.isLocal):s.particleEmitterType.startPositionFunction(s._emitterWorldMatrix,r.position,r,s.isLocal),s.isLocal&&(r._localPosition=o$1p.clone(r.position,r._localPosition),p$1d.multiplyByPoint(s._emitterWorldMatrix,r._localPosition,r.position)),s.startDirectionFunction?s.startDirectionFunction(s._emitterWorldMatrix,r.direction,r,s.isLocal):s.particleEmitterType.startDirectionFunction(s._emitterWorldMatrix,r.direction,r,s.isLocal),r._initialDirection=0===i?o$1p.clone(r.direction,r._initialDirection):null,o$1p.multiplyByScalar(r.direction,i,r.direction),s._sizeGradients&&0!==s._sizeGradients.length?(r._currentSizeGradient=s._sizeGradients[0],r._currentSize1=r._currentSizeGradient.getFactor(),r.size=r._currentSize1,s._sizeGradients.length>1?r._currentSize2=s._sizeGradients[1].getFactor():r._currentSize2=r._currentSize1):r.size=_0x2c1e2b.RandomRange(s.minSize,s.maxSize),r.scale.x=_0x2c1e2b.RandomRange(s.minScaleX,s.maxScaleX),r.scale.y=_0x2c1e2b.RandomRange(s.minScaleY,s.maxScaleY),s._startSizeGradients&&s._startSizeGradients[0]&&s.targetStopDuration){var n=s._actualFrame/s.targetStopDuration;_0xf6a90a.GetCurrentGradient(n,s._startSizeGradients,(function(e,i,n){e!==t._currentStartSizeGradient&&(t._currentStartSize1=t._currentStartSize2,t._currentStartSize2=i.getFactor(),t._currentStartSizeGradient=e);var o=_0x2c1e2b.Lerp(t._currentStartSize1,t._currentStartSize2,n);o$1p.multiplyByScalar(r.scale,o,r.scale)}))}s._angularSpeedGradients&&0!==s._angularSpeedGradients.length?(r._currentAngularSpeedGradient=s._angularSpeedGradients[0],r.angularSpeed=r._currentAngularSpeedGradient.getFactor(),r._currentAngularSpeed1=r.angularSpeed,s._angularSpeedGradients.length>1?r._currentAngularSpeed2=s._angularSpeedGradients[1].getFactor():r._currentAngularSpeed2=r._currentAngularSpeed1):r.angularSpeed=_0x2c1e2b.RandomRange(s.minAngularSpeed,s.maxAngularSpeed),r.angle=_0x2c1e2b.RandomRange(s.minInitialRotation,s.maxInitialRotation),s._velocityGradients&&s._velocityGradients.length>0&&(r._currentVelocityGradient=s._velocityGradients[0],r._currentVelocity1=r._currentVelocityGradient.getFactor(),s._velocityGradients.length>1?r._currentVelocity2=s._velocityGradients[1].getFactor():r._currentVelocity2=r._currentVelocity1),s._limitVelocityGradients&&s._limitVelocityGradients.length>0&&(r._currentLimitVelocityGradient=s._limitVelocityGradients[0],r._currentLimitVelocity1=r._currentLimitVelocityGradient.getFactor(),s._limitVelocityGradients.length>1?r._currentLimitVelocity2=s._limitVelocityGradients[1].getFactor():r._currentLimitVelocity2=r._currentLimitVelocity1),s._dragGradients&&s._dragGradients.length>0&&(r._currentDragGradient=s._dragGradients[0],r._currentDrag1=r._currentDragGradient.getFactor(),s._dragGradients.length>1?r._currentDrag2=s._dragGradients[1].getFactor():r._currentDrag2=r._currentDrag1),s._colorGradients&&0!==s._colorGradients.length?(r._currentColorGradient=s._colorGradients[0],r._currentColorGradient.getColorToRef(r.color),e$1U.clone(r.color,r._currentColor1),s._colorGradients.length>1?s._colorGradients[1].getColorToRef(r._currentColor2):e$1U.clone(r.color,r._currentColor2)):(o=_0x2c1e2b.RandomRange(0,1),e$1U.lerp(s.color1,s.color2,o,r.color),e$1U.subtract(s.colorDead,r.color,s._colorDiff),e$1U.multiplyByScalar(s._colorDiff,1/r.lifeTime,r.colorStep)),s._isAnimationSheetEnabled&&(r._initialStartSpriteCellID=s.startSpriteCellID,r._initialEndSpriteCellID=s.endSpriteCellID),o$1p.add(r.direction,s._inheritedVelocityOffset,r.direction),s._useRampGradients&&(r.remapData=new e$29(0,1,0,1)),s.noiseTexture&&(r._randomNoiseCoordinates1?(o$1p.unpack([Math.random(),Math.random(),Math.random()],0,r._randomNoiseCoordinates1),o$1p.unpack([Math.random(),Math.random(),Math.random()],0,r._randomNoiseCoordinates2)):(r._randomNoiseCoordinates1=new o$1p(Math.random(),Math.random(),Math.random()),r._randomNoiseCoordinates2=new o$1p(Math.random(),Math.random(),Math.random()))),r._inheritParticleInfoToSubEmitters()},s=this,l=0;l<e;l++){if("break"===a())break}},_0x2fb622.prototype.fillDefines=function(e,t){if(this._isAnimationSheetEnabled&&e.push("ANIMATESHEET"),t===_0x5f5957.BLENDMODE_MULTIPLY&&e.push("BLENDMULTIPLYMODE"),this._useRampGradients&&e.push("RAMPGRADIENT"),this._isBillboardBased)switch(e.push("BILLBOARD"),this.billboardMode){case _0x29b01c.BILLBOARDMODE_Y:e.push("BILLBOARDY");break;case _0x29b01c.BILLBOARDMODE_STRETCHED:e.push("BILLBOARDSTRETCHED");break;case _0x29b01c.BILLBOARDMODE_ALL:e.push("BILLBOARDMODE_ALL")}},_0x2fb622.prototype._getEffect=function(e){var t=this.getCustomEffect(e);if(t)return t;var i=[];this.fillDefines(i,e);var n=i.join("\n");if(this._cachedDefines!==n){this._cachedDefines=n;var r,o,a=this._drawCommand;e$2b(a.shaderProgram)?(r=a.shaderProgram.vertexShaderSource.clone(),o=a.shaderProgram.fragmentShaderSource.clone()):(r=new s$U({name:"BabylonParticlesVS",sources:[_0x464a98]}),o=new s$U({name:"BabylonParticlesFS",sources:[_0xd79fc7]})),r.defines=i,o.defines=i,this._sp=this._sp&&this._sp.destroy(),this._sp=r$13.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}this._drawCommand.shaderProgram=this._sp},_0x2fb622.prototype.update=function(e){LicenseChecker.LICENSECHECKER.verify("ParticleSystem"),this.animate(!1,e),this.render(e),this._stopped&&(this._alive||(this._started=!1,this.onAnimationEnd&&this.onAnimationEnd(),this.disposeOnStop&&this._scene&&this._scene.primitives.remove(this)))},_0x2fb622.prototype.animate=function(e,t){var i=this;if(void 0===e&&(e=!1),this._started){if(!e&&this._scene){if(!this.isReady()||this._currentRenderId===t.frameNumber)return;this._currentRenderId=t.frameNumber}var n;if(this._scaledUpdateSpeed=this.updateSpeed*(e?this.preWarmStepOffset:1),this.manualEmitCount>-1)n=this.manualEmitCount,this._newPartsExcess=0,this.manualEmitCount=0;else{var r=this.emitRate;if(this._emitRateGradients&&this._emitRateGradients.length>0&&this.targetStopDuration){var o=this._actualFrame/this.targetStopDuration;_0xf6a90a.GetCurrentGradient(o,this._emitRateGradients,(function(e,t,n){e!==i._currentEmitRateGradient&&(i._currentEmitRate1=i._currentEmitRate2,i._currentEmitRate2=t.getFactor(),i._currentEmitRateGradient=e),r=_0x2c1e2b.Lerp(i._currentEmitRate1,i._currentEmitRate2,n)}))}n=r*this._scaledUpdateSpeed>>0,this._newPartsExcess+=r*this._scaledUpdateSpeed-n}if(this._newPartsExcess>1&&(n+=this._newPartsExcess>>0,this._newPartsExcess-=this._newPartsExcess>>0),this._alive=!1,this._stopped?n=0:(this._actualFrame+=this._scaledUpdateSpeed,this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()),this._update(n),!e){for(var a=0,s=0;s<this._particles.length;s++){var l=this._particles[s];this._appendParticleVertices(a,l),a+=this._useInstancing?1:4}this._vertexBuffer&&this._vertexBuffer.copyFromArrayView(this._vertexData)}0===this.manualEmitCount&&this.disposeOnStop&&this.stop()}},_0x2fb622.prototype._appendParticleVertices=function(e,t){this._appendParticleVertex(e++,t,0,0),this._useInstancing||(this._appendParticleVertex(e++,t,1,0),this._appendParticleVertex(e++,t,1,1),this._appendParticleVertex(e++,t,0,1))},_0x2fb622.prototype.isReady=function(){return!!this.emitter},_0x2fb622.prototype._render=function(e,t){return e$2b(this._drawCommand)||this._createDrawCommand(),this._getEffect(e),this._drawCommand.vertexArray=this._vertexArray,this._drawCommand.instanceCount=this._capacity,_0x36dee7._setRenderState(this._drawCommand,e),this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.notifyObservers(effect),t.commandList.push(this._drawCommand),this._particles.length},_0x2fb622.prototype.render=function(e){if(!this._particles.length)return 0;this.forceDepthWrite;return this.blendMode===_0x5f5957.BLENDMODE_MULTIPLYADD?this._render(_0x5f5957.BLENDMODE_ADD,e):this._render(this.blendMode,e)},_0x2fb622.prototype.destroy=function(){if(e$2b(this._drawCommand)){var e=this._drawCommand;e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0,this._drawCommand=void 0}if(this.noiseTexture&&(!this.noiseTexture.isDestroyed()&&this.noiseTexture.destroy(),this.noiseTexture=null),this._rampGradientsTexture&&(!this._rampGradientsTexture.isDestroyed()&&this._rampGradientsTexture.destroy(),this._rampGradientsTexture=null),this._removeFromRoot(),this._subEmitters&&this._subEmitters.length){for(var t=0;t<this._subEmitters.length;t++)for(var i=0,n=this._subEmitters[t];i<n.length;i++){var r=n[i];r.hasOwnProperty("particleSystem")?r.particleSystem.destroy():r.dispose()}this._subEmitters=[],this.subEmitters=[]}this._disposeEmitterOnDispose&&this.emitter&&this.emitter.dispose&&this.emitter.dispose(!0),this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.clear(),this.reset()},_0x2fb622.prototype.clone=function(e,t){this._engine;var i=this.serialize(),n=_0x2fb622.Parse(i,this._scene||this._engine,"",!1,this._context);return n.name=e,n.customShader=null,n._customEffect={},void 0===t&&(t=this.emitter),this.noiseTexture&&(n.noiseTexture=this.noiseTexture.clone()),this.particleTexture&&(n.particleTexture=this.particleTexture),e$2b(this._modelMatrx)&&(n._modelMatrx=new p$1d,p$1d.clone(this._modelMatrx,n._modelMatrx)),n.emitter=t,this.preventAutoStart||n.start(),n},_0x2fb622.prototype.serialize=function(e){void 0===e&&(e=!1);var t={};_0x2fb622._Serialize(t,this,e);var i=[];if(e$1U.pack(this.textureMask,i),t.textureMask=i,t.customShader=this.customShader,t.preventAutoStart=this.preventAutoStart,this.subEmitters){t.subEmitters=[],this._subEmitters||this._prepareSubEmitterInternalArray();for(var n=0,r=this._subEmitters;n<r.length;n++){for(var o=[],a=0,s=r[n];a<s.length;a++){var l=s[a];o.push(l.serialize())}t.subEmitters.push(o)}}return t},_0x2fb622._Serialize=function(e,t,i){if(e.name=t.name,e.id=t.id,e.capacity=t.getCapacity(),t.emitter.position){var n=t.emitter;e.emitterId=n.id}else{var r=t.emitter,o=[];o$1p.pack(r,o),e.emitter=o}t.particleEmitterType&&(e.particleEmitterType=t.particleEmitterType.serialize()),t.particleTexture&&(i?e.texture=t.particleTexture.serialize():(e.textureName=t.particleTexture.name,e.invertY=!!t.particleTexture._flipY)),e.isLocal=t.isLocal,e.startDelay=t.startDelay,e.renderingGroupId=t.renderingGroupId,e.isBillboardBased=t.isBillboardBased,e.billboardMode=t.billboardMode,e.minAngularSpeed=t.minAngularSpeed,e.maxAngularSpeed=t.maxAngularSpeed,e.minSize=t.minSize,e.maxSize=t.maxSize,e.minScaleX=t.minScaleX,e.maxScaleX=t.maxScaleX,e.minScaleY=t.minScaleY,e.maxScaleY=t.maxScaleY,e.minEmitPower=t.minEmitPower,e.maxEmitPower=t.maxEmitPower,e.minLifeTime=t.minLifeTime,e.maxLifeTime=t.maxLifeTime,e.emitRate=t.emitRate;var a=[];o$1p.pack(t.gravity,a),e.gravity=a;var s=[];o$1p.pack(t.noiseStrength,s),e.noiseStrength=s;var l=[];e$1U.pack(t.color1,l),e.color1=l;var u=[];e$1U.pack(t.color2,u),e.color2=u;var c=[];e$1U.pack(t.colorDead,c),e.colorDead=c,e.updateSpeed=t.updateSpeed,e.targetStopDuration=t.targetStopDuration,e.blendMode=t.blendMode,e.preWarmCycles=t.preWarmCycles,e.preWarmStepOffset=t.preWarmStepOffset,e.minInitialRotation=t.minInitialRotation,e.maxInitialRotation=t.maxInitialRotation,e.startSpriteCellID=t.startSpriteCellID,e.endSpriteCellID=t.endSpriteCellID,e.spriteCellChangeSpeed=t.spriteCellChangeSpeed,e.spriteCellWidth=t.spriteCellWidth,e.spriteCellHeight=t.spriteCellHeight,e.spriteRandomStartCell=t.spriteRandomStartCell,e.isAnimationSheetEnabled=t.isAnimationSheetEnabled;var h=t.getColorGradients();if(h){e.colorGradients=[];for(var d=0,f=h;d<f.length;d++){var p=f[d];l=[];e$1U.pack(p.color1,l);var _={gradient:p.gradient,color1:l};if(p.color2){u=[];e$1U.pack(p.color2,u),_.color2=u}else{u=[];e$1U.pack(p.color1,u),_.color2=u}e.colorGradients.push(_)}}var m=t.getRampGradients();if(m){e.rampGradients=[];for(var g=0,x=m;g<x.length;g++){var v=x[g],y=[];e$1U.pack(v.color,y);_={gradient:v.gradient,color:y};e.rampGradients.push(_)}e.useRampGradients=t.useRampGradients}var $=t.getColorRemapGradients();if($){e.colorRemapGradients=[];for(var b=0,T=$;b<T.length;b++){var C=T[b];_={gradient:C.gradient,factor1:C.factor1};void 0!==C.factor2?_.factor2=C.factor2:_.factor2=C.factor1,e.colorRemapGradients.push(_)}}var S=t.getAlphaRemapGradients();if(S){e.alphaRemapGradients=[];for(var w=0,E=S;w<E.length;w++){var P=E[w];_={gradient:P.gradient,factor1:P.factor1};void 0!==P.factor2?_.factor2=P.factor2:_.factor2=P.factor1,e.alphaRemapGradients.push(_)}}var A=t.getSizeGradients();if(A){e.sizeGradients=[];for(var L=0,M=A;L<M.length;L++){var R=M[L];_={gradient:R.gradient,factor1:R.factor1};void 0!==R.factor2?_.factor2=R.factor2:_.factor2=R.factor1,e.sizeGradients.push(_)}}var I=t.getAngularSpeedGradients();if(I){e.angularSpeedGradients=[];for(var O=0,D=I;O<D.length;O++){var B=D[O];_={gradient:B.gradient,factor1:B.factor1};void 0!==B.factor2?_.factor2=B.factor2:_.factor2=B.factor1,e.angularSpeedGradients.push(_)}}var N=t.getVelocityGradients();if(N){e.velocityGradients=[];for(var F=0,U=N;F<U.length;F++){var z=U[F];_={gradient:z.gradient,factor1:z.factor1};void 0!==z.factor2?_.factor2=z.factor2:_.factor2=z.factor1,e.velocityGradients.push(_)}}var G=t.getDragGradients();if(G){e.dragGradients=[];for(var V=0,k=G;V<k.length;V++){var W=k[V];_={gradient:W.gradient,factor1:W.factor1};void 0!==W.factor2?_.factor2=W.factor2:_.factor2=W.factor1,e.dragGradients.push(_)}}var H=t.getEmitRateGradients();if(H){e.emitRateGradients=[];for(var q=0,j=H;q<j.length;q++){var Y=j[q];_={gradient:Y.gradient,factor1:Y.factor1};void 0!==Y.factor2?_.factor2=Y.factor2:_.factor2=Y.factor1,e.emitRateGradients.push(_)}}var X=t.getStartSizeGradients();if(X){e.startSizeGradients=[];for(var K=0,Q=X;K<Q.length;K++){var Z=Q[K];_={gradient:Z.gradient,factor1:Z.factor1};void 0!==Z.factor2?_.factor2=Z.factor2:_.factor2=Z.factor1,e.startSizeGradients.push(_)}}var J=t.getLifeTimeGradients();if(J){e.lifeTimeGradients=[];for(var ee=0,te=J;ee<te.length;ee++){var ie=te[ee];_={gradient:ie.gradient,factor1:ie.factor1};void 0!==ie.factor2?_.factor2=ie.factor2:_.factor2=ie.factor1,e.lifeTimeGradients.push(_)}}var ne=t.getLimitVelocityGradients();if(ne){e.limitVelocityGradients=[];for(var re=0,oe=ne;re<oe.length;re++){var ae=oe[re];_={gradient:ae.gradient,factor1:ae.factor1};void 0!==ae.factor2?_.factor2=ae.factor2:_.factor2=ae.factor1,e.limitVelocityGradients.push(_)}e.limitVelocityDamping=t.limitVelocityDamping}t.noiseTexture&&(e.noiseTexture=t.noiseTexture.serialize())},_0x2fb622.Parse=function(e,t,i,n){void 0===n&&(n=!1);var r=new _0x2fb622(e.name,e.capacity,t,null,e.isAnimationSheetEnabled,0);if(r.customShader=null,e.id&&(r.id=e.id),e.subEmitters){r.subEmitters=[];for(var o=0,a=e.subEmitters;o<a.length;o++){for(var s=[],l=0,u=a[o];l<u.length;l++){var c=u[l];s.push(_0x1e1355.Parse(c,t,i))}r.subEmitters.push(s)}}if(_0x36dee7._Parse(e,r,i),e.textureMask){var h=new e$1U;e$1U.unpack(e.textureMask,0,h),r.textureMask=h}return e.preventAutoStart&&(r.preventAutoStart=e.preventAutoStart),!n&&!r.preventAutoStart&&r.start(),r};var _0x14690c=new o$1p;function _0x5a120b(e){var t=e.maxAngularSpeed*e.maxLifeTime;let i=p$1d.multiply(e.modelMatrix,e._emitterWorldMatrix,new p$1d);i$1c.transform(new i$1c,i,e._boundingVolume),e._boundingVolume.radius=t+10}new e$29,_0x2fb622.prototype._createUniformMap=function(e){var t={},i=this;t.diffuseSampler=function(){return e$2b(i.particleTexture)?i.particleTexture:i._context.defaultTexture},t.particlesInfos=function(){var e=i._rawTextureWidth,t=i._rawTextureWidth;if(i.particleTexture)e=i.particleTexture.width,t=i.particleTexture.height;return _0x14690c.x=i.spriteCellWidth/e,_0x14690c.y=i.spriteCellHeight/t,_0x14690c.z=i.spriteCellWidth/e,_0x14690c},t.translationPivot=function(){return i.translationPivot},t.textureMask=function(){return i.textureMask},t.rampSampler=function(){return i._rampGradientsTexture},this._uniformMap=t},_0x2fb622.prototype._createDrawCommand=function(){this._boundingVolume=new i$1c,_0x5a120b(this);var e=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._modelMatrx,boundingVolume:this._boundingVolume,pass:Le$s.OPAQUE,cull:!1});e.castShadows=!1,e.receiveShadows=!1,e.selectCastShadows=!1,this._createUniformMap(),e.uniformMap=this._uniformMap,e.vertexArray=this._vertexArray,this._drawCommand=e};var _0x4f3b22=(_0x33883f=!0,function(e,t){var i=_0x33883f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33883f=!1,i}),_0x3f559a=_0x4f3b22(void 0,(function(){return _0x3f559a.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f559a).search("(((.+)+)+)+$")})),_0x33883f;function _0x279143(){this.systems=new Array,this._modelMatrx=new p$1d}_0x3f559a(),Object.defineProperties(_0x279143.prototype,{modelMatrix:{get:function(){return this._modelMatrx},set:function(e){if(this._modelMatrx!==e){this._modelMatrx=e;for(var t=0,i=this.systems;t<i.length;t++){i[t].modelMatrix=e}}}},emitterNode:{get:function(){return this._emitterNode}}}),_0x279143.prototype.setEmitterAsSphere=function(e,t,i){this._emitterNode&&this._emitterNode.dispose(),this._emitterCreationOptions={kind:"Sphere",options:e,renderingGroupId:t};var n=_Meshes_Builders_sphereBuilder__WEBPACK_IMPORTED_MODULE_1__.SphereBuilder.CreateSphere("emitterSphere",{diameter:e.diameter,segments:e.segments},i);n.renderingGroupId=t;var r=new _Materials_standardMaterial__WEBPACK_IMPORTED_MODULE_5__.StandardMaterial("emitterSphereMaterial",i);r.emissiveColor=e.color,n.material=r;for(var o=0,a=this.systems;o<a.length;o++){a[o].emitter=n}this._emitterNode=n},_0x279143.prototype.update=function(e){for(var t=0,i=this.systems;t<i.length;t++){i[t].update(e)}},_0x279143.prototype.start=function(e){for(var t=0,i=this.systems;t<i.length;t++){var n=i[t];e&&(n.emitter=e),n.start()}},_0x279143.prototype.dispose=function(){for(var e=0,t=this.systems;e<t.length;e++){t[e].dispose()}this.systems=[],this._emitterNode&&(this._emitterNode.dispose(),this._emitterNode=null)},_0x279143.prototype.serialize=function(e){void 0===e&&(e=!1);for(var t={systems:[]},i=0,n=this.systems;i<n.length;i++){var r=n[i];t.systems.push(r.serialize(e))}return this._emitterNode&&(t.emitter=this._emitterCreationOptions),t},_0x279143.Parse=function(e,t,i){for(var n=new _0x279143,r=this.BaseAssetsUrl+"/textures/",o=0,a=e.systems;o<a.length;o++){var s=a[o];e$2b(t.context.webgl2)&&t.context.webgl2&&e$2b(i)&&i?n.systems.push(_0x326310.Parse(s,t,r,!0)):n.systems.push(_0x2fb622.Parse(s,t,r,!0))}return n},_0x279143.BaseAssetsUrl="https://assets.babylonjs.com/particles";var _0x40cd23=(_0x333ea4=!0,function(e,t){var i=_0x333ea4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x333ea4=!1,i}),_0x433622=_0x40cd23(void 0,(function(){return _0x433622.toString().search("(((.+)+)+)+$").toString().constructor(_0x433622).search("(((.+)+)+)+$")})),_0x333ea4;function _0x42502(){}_0x433622(),_0x42502.fromJsonUrl=function(e,t,i){return t$11.createIfNeeded(e).fetchJson().then((function(e){return e$2b(e.systems)?_0x279143.Parse(e,t,i):e$2b(t.context.webgl2)&&t.context.webgl2&&e$2b(i)&&i?_0x326310.Parse(e,t,"",!1):_0x2fb622.Parse(e,t,"",!1)}))};var f$o="varying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n czm_materialInput materialInput;\n\n vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n materialInput.s = v_st.s;\n materialInput.st = v_st;\n materialInput.str = vec3(v_st, 0.0);\n\n // Convert tangent space material normal to eye space\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);\n\n // Convert view vector to world space\n vec3 positionToEyeEC = -v_positionEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",d$t="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec2 st;\nattribute float batchId;\n\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionMC = position3DHigh + position3DLow; // position in model coordinates\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";function t$i(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.translucent,!0),i=u$_(e.aboveGround,!1);this.material=e$2b(e.material)?e.material:r$X.fromType(r$X.ColorType),this.translucent=u$_(e.translucent,!0),this._vertexShaderSource=u$_(e.vertexShaderSource,d$t),this._fragmentShaderSource=u$_(e.fragmentShaderSource,f$o),this._renderState=a$S.getDefaultRenderState(t,!i,e.renderState),this._closed=!1,this._flat=u$_(e.flat,!1),this._faceForward=u$_(e.faceForward,i),this._aboveGround=i,this._name="EllipsoidSurfaceAppearance"}Object.defineProperties(t$i.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return t$i.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}},name:{get:function(){return this._name+"_"+this.material._id}}}),t$i.VERTEX_FORMAT=n$11.POSITION_AND_ST,t$i.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,t$i.prototype.isTranslucent=a$S.prototype.isTranslucent,t$i.prototype.getRenderState=a$S.prototype.getRenderState;var _0x100472=(_0x308045=!0,function(e,t){var i=_0x308045?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x308045=!1,i}),_0x2c223f=_0x100472(void 0,(function(){return _0x2c223f.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c223f).search("(((.+)+)+)+$")})),_0x308045;_0x2c223f();var _0x501f60={FIRE:0,FOUNTAIN:1,RAIN:2},v$o=Object.freeze(_0x501f60),n$k=new o$1o(1,1);function a$k(e){e=u$_(e,u$_.EMPTY_OBJECT),this.mass=u$_(e.mass,1),this.position=o$1p.clone(u$_(e.position,o$1p.ZERO)),this.velocity=o$1p.clone(u$_(e.velocity,o$1p.ZERO)),this.life=u$_(e.life,Number.MAX_VALUE),this.image=e.image,this.startColor=e$1U.clone(u$_(e.startColor,e$1U.WHITE)),this.endColor=e$1U.clone(u$_(e.endColor,e$1U.WHITE)),this.startScale=u$_(e.startScale,1),this.endScale=u$_(e.endScale,1),this.imageSize=o$1o.clone(u$_(e.imageSize,n$k)),this.rotationSpeed=u$_(e.rotationSpeed,0),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(a$k.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var o$s=new o$1p;function u$l(e,t,i,n){e=u$_(e,1),o$1q.typeOf.number.greaterThan("radius",e,0),this._radius=u$_(e,1),this._innerRadius=u$_(t,0),this._startAngle=u$_(i,0),this._endAngle=u$_(n,e$2a.TWO_PI)}function o$r(e){e=u$_(e,1),o$1q.typeOf.number.greaterThan("radius",e,0),this._radius=u$_(e,1),this.radius=this._radius}a$k.prototype.update=function(e,t){return o$1p.multiplyByScalar(this.velocity,e,o$s),o$1p.add(this.position,o$s,this.position),e$2b(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life},Object.defineProperties(u$l.prototype,{radius:{get:function(){return this._radius},set:function(e){o$1q.typeOf.number.greaterThan("value",e,0),this._radius=e}},innerRadius:{get:function(){return this._innerRadius},set:function(e){o$1q.typeOf.number.greaterThan("value",e,0),this._innerRadius=e}},startAngle:{get:function(){return this._startAngle},set:function(e){this._startAngle=e}},endAngle:{get:function(){return this._endAngle},set:function(e){this._endAngle=e}},type:{get:function(){return"Circle"}}}),u$l.prototype.emit=function(e){var t=this._startAngle,i=this._endAngle;t>i&&(t=this._endAngle,i=this._startAngle);var n=e$2a.randomBetween(t,i),r=e$2a.randomBetween(this._innerRadius,this._radius),o=r*Math.cos(n),a=r*Math.sin(n);e.position=o$1p.fromElements(o,a,0,e.position),e.velocity=o$1p.clone(o$1p.UNIT_Z,e.velocity)},Object.defineProperties(o$r.prototype,{radius:{get:function(){return this._radius},set:function(e){o$1q.typeOf.number.greaterThan("value",e,0),this._radius=e}},type:{get:function(){return"Sphere"}}}),o$r.prototype.emit=function(e){var t=e$2a.randomBetween(0,e$2a.TWO_PI),i=e$2a.randomBetween(0,e$2a.PI),n=e$2a.randomBetween(0,this._radius),r=n*Math.cos(t)*Math.sin(i),o=n*Math.sin(t)*Math.sin(i),a=n*Math.cos(i);e.position=o$1p.fromElements(r,o,a,e.position),e.velocity=o$1p.normalize(e.position,e.velocity)};var v$n=e$2a.toRadians(30);function n$j(e){this._angle=u$_(e,v$n)}Object.defineProperties(n$j.prototype,{angle:{get:function(){return this._angle},set:function(e){o$1q.typeOf.number("value",e),this._angle=e}}}),n$j.prototype.emit=function(e){var t=Math.tan(this._angle),i=e$2a.randomBetween(0,e$2a.TWO_PI),n=e$2a.randomBetween(0,t),r=n*Math.cos(i),o=n*Math.sin(i);e.velocity=o$1p.fromElements(r,o,1,e.velocity),o$1p.normalize(e.velocity,e.velocity),e.position=o$1p.clone(o$1p.ZERO,e.position)};var I$p=new o$1o(1,1);function g$s(e){e=u$_(e,u$_.EMPTY_OBJECT),this.show=u$_(e.show,!0),this.updateCallback=e.updateCallback,this.loop=u$_(e.loop,!0),this.image=u$_(e.image,void 0);var t=e.emitter;e$2b(t)||(t=new u$l(.5)),this._emitter=t,t.owner=this,this._bursts=e.bursts,this._modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._emitterModelMatrix=p$1d.clone(u$_(e.emitterModelMatrix,p$1d.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new p$1d,this._startColor=e$1U.clone(u$_(e.color,u$_(e.startColor,e$1U.WHITE))),this._endColor=e$1U.clone(u$_(e.color,u$_(e.endColor,e$1U.WHITE))),this._startScale=u$_(e.scale,u$_(e.startScale,1)),this._endScale=u$_(e.scale,u$_(e.endScale,1)),this._minRotationSpeed=u$_(e.minRotationSpeed,u$_(e.minimumRotationSpeed,0)),this._maxRotationSpeed=u$_(e.maxRotationSpeed,u$_(e.maximumRotationSpeed,0)),this._emissionRate=u$_(e.emissionRate,5),this._emissionRateByDistance=u$_(e.emissionRate,5),this._minimumSpeed=u$_(e.speed,u$_(e.minimumSpeed,1)),this._maximumSpeed=u$_(e.speed,u$_(e.maximumSpeed,1)),this._minimumParticleLife=u$_(e.particleLife,u$_(e.minimumParticleLife,5)),this._maximumParticleLife=u$_(e.particleLife,u$_(e.maximumParticleLife,5)),this._minimumMass=u$_(e.mass,u$_(e.minimumMass,1)),this._maximumMass=u$_(e.mass,u$_(e.maximumMass,1)),this._minimumImageSize=o$1o.clone(u$_(e.imageSize,u$_(e.minimumImageSize,I$p))),this._maximumImageSize=o$1o.clone(u$_(e.imageSize,u$_(e.maximumImageSize,I$p))),this._lifetime=u$_(e.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new o$1h,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0,this._sizeInMeters=u$_(e.sizeInMeters,u$_(e.sizeInMeters,!1)),this._boundingSphere=new i$1c(o$1p.ZERO,100),this.lodRangeScale=1,this._performance=u$_(e.performance,!0),this._type=u$_(e.type,v$o.FIRE)}function W$m(e){var t=e._emissionRate,i=e._maximumParticleLife,n=0,r=e._bursts;if(e$2b(r))for(var o=r.length,a=0;a<o;++a)n+=r[a].maximum;var s=e._billboardCollection,l=e.image,u=Math.ceil(t*i+n),c=e._particles,h=e._particlePool,d=e._emitter;e$2b(d.areaFactor)&&(u=Math.min(u,d.areaFactor));for(var f=Math.max(u-c.length-h.length,0),p=0;p<f;++p){var _=new a$k;_._billboard=s.add({image:l,sizeInMeters:e._sizeInMeters}),h.push(_)}e._particleEstimate=u}function j$k(e){var t=e._particlePool.pop();return e$2b(t)||(t=new a$k),t}function H$s(e,t){e._particlePool.push(t)}function Y$e(e){for(var t=e._particles,i=e._particlePool,n=e._billboardCollection,r=(t.length,i.length),o=e._particleEstimate,a=o;a<r;++a){var s=i[a];!e$2b(s)||n.remove(s._billboard)}i.length=o}function J$d(e){e$2b(e._billboard)&&(e._billboard.show=!1)}function w$k(e,t){var i=t._billboard;e$2b(i)||(i=t._billboard=e._billboardCollection.add({image:t.image,sizeInMeters:e._sizeInMeters})),i.width=t.imageSize.x,i.height=t.imageSize.y,i.position=t.position,i.show=!0;var n=e$2a.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),r=e$2a.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),o=e$2a.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),a=e$2a.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);i.color=new e$1U(n,r,o,a),i.scale=e$2a.lerp(t.startScale,t.endScale,t.normalizedAge),i.rotation=t.age*t.rotationSpeed}function X$d(e,t){t.startColor=e$1U.clone(e._startColor,t.startColor),t.endColor=e$1U.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=e$2a.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=e$2a.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=e$2a.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=e$2a.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t.rotationSpeed=e$2a.randomBetween(e._minRotationSpeed,e._maxRotationSpeed),t._normalizedAge=0,t._age=0;var i=e$2a.randomBetween(e._minimumSpeed,e._maximumSpeed);o$1p.multiplyByScalar(t.velocity,i,t.velocity),e._particles.push(t)}function K$e(e,t){if(e._isComplete)return 0;var i=(t=e$2a.mod(t,e._lifetime))*e._emissionRateByDistance,n=Math.floor(i);if(e._carryOver+=i-n,e._carryOver>1&&(n++,e._carryOver-=1),e$2b(e.bursts))for(var r=e.bursts.length,o=0;o<r;o++){var a=e.bursts[o],s=e._currentTime;e$2b(a)&&!a._complete&&s>a.time&&(n+=e$2a.randomBetween(a.minimum,a.maximum),a._complete=!0)}return n}Object.defineProperties(g$s.prototype,{emitter:{get:function(){return this._emitter},set:function(e){o$1q.defined("value",e),this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){o$1q.defined("value",e),this._matrixDirty=this._matrixDirty||!p$1d.equals(this._modelMatrix,e),p$1d.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){o$1q.defined("value",e),this._matrixDirty=this._matrixDirty||!p$1d.equals(this._emitterModelMatrix,e),p$1d.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){o$1q.defined("value",e),e$1U.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){o$1q.defined("value",e),e$1U.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumSpeed=e}},minimumRotationSpeed:{get:function(){return this._minRotationSpeed},set:function(e){this._minRotationSpeed=e}},maximumRotationSpeed:{get:function(){return this._maxRotationSpeed},set:function(e){this._maxRotationSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){o$1q.typeOf.object("value",e),o$1q.typeOf.number.greaterThanOrEquals("value.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){o$1q.typeOf.object("value",e),o$1q.typeOf.number.greaterThanOrEquals("value.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._maximumImageSize=e}},lifetime:{get:function(){return this._lifetime},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._lifetime=e}},type:{get:function(){return this._ParticleSystemType},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._ParticleSystemType=e,this.setParticleType(e)}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});var Z$i=new i$1c,P$m=new p$1d;function G$l(e,t){if(e$2b(e._emitter)&&"Polygon"==e._emitter.type)e._boundingSphere=e._emitter.boundingSphere;else{var i=e._maxVelocity*e._maximumParticleLife;P$m=p$1d.multiply(e.modelMatrix,e.emitterModelMatrix,P$m),i$1c.transform(Z$i,P$m,e._boundingSphere),e._boundingSphere.radius=i+10+e._emitter.radius}t.mode===C$13.COLUMBUS_VIEW&&s$Q.computeActualWgs84Position(t,e._boundingSphere.center,e._boundingSphere.center)}function Q$i(e,t){var i=t.camera.positionWC,n=o$1p.distance(i,e._boundingSphere.center)-e._boundingSphere.radius,r=0;n>1e3*e.lodRangeScale?r=0:n>200*e.lodRangeScale?(r=e._emissionRate/8,r=Math.max(2,r)):n>50*e.lodRangeScale?(r=e._emissionRate/2,r=Math.max(2,r)):r=e._emissionRate,e$2b(e._emitter.areaFactor)&&(r=Math.min(e._emitter.areaFactor,r)),e._emissionRateByDistance=r}var C$n=new o$1p;g$s.prototype.setParticleType=function(e){switch(e){case v$o.FIRE:this._emitter=new n$j(e$2a.toRadians(45)),this._emissionRate=150,this._particleSize=2,this._minimumParticleLife=1.5,this._maximumParticleLife=1.8,this._minimumSpeed=7,this._maximumSpeed=9,this._startScale=3,this._endScale=1.5,this._startColor=new e$1U(1,1,1,1),this._endColor=new e$1U(1,0,0,0),this._lifeTime=6,this._sizeInMeters=!0,this._performance=!0;break;case v$o.FOUNTAIN:this._emitter=new o$1o(1,1),this._emissionRate=40,this._particleSize=1,this._minimumParticleLife=6,this._maximumParticleLife=7,this._minimumSpeed=10,this._maximumSpeed=10,this._startScale=1,this._endScale=30,this._startColor=new e$1U(1,1,1,.6),this._endColor=new e$1U(.8,.86,1,.4),this._lifeTime=16,this._sizeInMeters=!0,this._performance=!0;break;case v$o.RAIN:this._emitter=new o$r(5e3),this._emissionRate=8e3,this._particleSize=30,this._minimumParticleLife=6,this._maximumParticleLife=6,this._minimumSpeed=0,this._maximumSpeed=0,this._startScale=1,this._endScale=1,this._startColor=new e$1U(1,1,1,.8),this._endColor=new e$1U(1,1,1,.8),this._lifeTime=10,this._sizeInMeters=!0,this._performance=!1}},g$s.prototype.update=function(e){if(LicenseChecker.LICENSECHECKER.verify("ParticleSystem"),this.show){e$2b(this._billboardCollection)||(this._billboardCollection=new w$N({particleSystem:this._performance,ignoreShow:!0})),this._updateParticlePool&&(W$m(this),this._updateParticlePool=!1);var t=e.cullingVolume;if(G$l(this,e),t.computeVisibility(this._boundingSphere)!=Ae$u.OUTSIDE){Q$i(this,e);var i=0;this._previousTime&&(i=a$15.secondsDifference(e.time,this._previousTime)),i<0&&(i=0),this._maxVelocity=0;var n,r,o=this._particles,a=this._emitter,s=this.updateCallback,l=o.length;for(n=0;n<l;++n)(r=o[n]).update(i,s)?(w$k(this,r),this._maxVelocity=Math.max(this._maxVelocity,o$1p.magnitude(r.velocity))):(J$d(r),H$s(this,r),o[n]=o[l-1],--n,--l);o.length=l;var u=K$e(this,i);if(u>0&&e$2b(a)){this._matrixDirty&&(this._combinedMatrix=p$1d.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);var c=this._combinedMatrix;for(n=0;n<u;n++)r=j$k(this),this._emitter.emit(r),"Polygon"!==this._emitter.type&&(o$1p.add(r.position,r.velocity,C$n),p$1d.multiplyByPoint(c,C$n,C$n),r.position=p$1d.multiplyByPoint(c,r.position,r.position),o$1p.subtract(C$n,r.position,r.velocity),o$1p.normalize(r.velocity,r.velocity)),X$d(this,r),w$k(this,r)}if(this._billboardCollection.update(e),this._previousTime=a$15.clone(e.time,this._previousTime),this._currentTime+=i,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=e$2a.mod(this._currentTime,this._lifetime),this.bursts){var h=this.bursts.length;for(n=0;n<h;n++)this.bursts[n]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%60==0&&Y$e(this)}}},g$s.prototype.isDestroyed=function(){return!1},g$s.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),i$10(this)};var y$m=new o$1p(1,1,1);function a$j(e){e=u$_(e,y$m),o$1q.defined("dimensions",e),o$1q.typeOf.number.greaterThanOrEquals("dimensions.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.y",e.y,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.z",e.z,0),this._dimensions=o$1p.clone(e)}Object.defineProperties(a$j.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number.greaterThanOrEquals("value.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("value.y",e.y,0),o$1q.typeOf.number.greaterThanOrEquals("value.z",e.z,0),o$1p.clone(e,this._dimensions)}}});var l$m=new o$1p;a$j.prototype.emit=function(e){var t=this._dimensions,i=o$1p.multiplyByScalar(t,.5,l$m),n=e$2a.randomBetween(-i.x,i.x),r=e$2a.randomBetween(-i.y,i.y),o=e$2a.randomBetween(-i.z,i.z);e.position=o$1p.fromElements(n,r,o,e.position),e.velocity=o$1p.normalize(e.position,e.velocity)};var _0x39572f=(_0x4593b4=!0,function(e,t){var i=_0x4593b4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4593b4=!1,i}),_0x5a8d5a=_0x39572f(void 0,(function(){return _0x5a8d5a.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a8d5a).search("(((.+)+)+)+$")})),_0x4593b4;_0x5a8d5a();var _0x40a7a7=function(e){e=e||{},this._scene=e.scene,this._name=e.name,this._layerConfigs=new e$1N,this._s3mLayers=new e$1N,this._s3mURLs=[],this._associatedFieldName=void 0,this._resetVisible=!1,this._associatedLayerIds=[],this._visible=u$_(e.isVisible,!0)};Object.defineProperties(_0x40a7a7.prototype,{size:{get:function(){return this._s3mLayers.length}},associatedField:{get:function(){return this._associatedFieldName},set:function(e){this._associatedFieldName=e}},visible:{get:function(){return this._visible},set:function(e){for(var t in this._visible=e,this._s3mLayers._hash){this._s3mLayers.get(t).visible=e}}}}),_0x40a7a7.prototype.getLayer=function(e){return this._s3mLayers._array[e]},_0x40a7a7.prototype.getSubLayer=function(e){var t,i=o$1l.defer();if(!e$2b(e))throw new t$16("name is required.");for(var n in this._layerConfigs._hash){var r=this._layerConfigs.get(n);if(r.name===e){if(r.ready){t=this._s3mLayers.get(n);break}t=this._scene.addS3MTilesLayerByScp(n+"?t=1",r,r.index,!0),r.ready=!0;break}}return e$2b(t)?o$1l(t,(function(e){i.resolve(e)})):i.resolve(),i.promise},_0x40a7a7.prototype.findByIndex=function(e){if(!e$2b(e))throw new t$16("index is required.");if(e>this._s3mLayers.length-1)throw new t$16("index is out of bounds.");return this._s3mLayers._array[e]},_0x40a7a7.prototype.releaseSelection=function(){},_0x40a7a7.prototype.remove=function(e,t){if(t=u$_(t,!0),!e$2b(e))return!1;var i,n;for(var r in this._s3mLayers._hash){var o=this._s3mLayers.get(r);if(o.name===e){i=r,n=o;break}}return e$2b(i)?(this._s3mLayers.remove(i),t&&n.destroy(),!0):void 0};var _0x578a9e=.25,_0x19b92b=64,_0x4a9693=2,_0x307ee6=6378137,_0xa1c82e=2*_0x307ee6*Math.PI*_0x578a9e/(_0x19b92b*_0x4a9693),_0x28208c=2;function _0x122f16(e,t,i){return _0xa1c82e/(1<<t)*e.context.drawingBufferHeight/(i*e.camera.frustum.sseDenominator)}_0x40a7a7.prototype.setSelection=function(e,t,i,n){for(var r=!1,o=this._s3mURLs.length-1;o>=0;o--)if(e$2b(this._s3mURLs[o])){var a=this._s3mLayers.get(this._s3mURLs[o]);!e$2b(a)||(a.id===i&&a.selectEnabled&&a.name===n?(a.setSelection(e,t),r=!0):a.releaseSelection())}return r},_0x40a7a7.prototype.releaseSelection=function(){for(var e=this._s3mURLs.length-1;e>=0;e--)if(e$2b(this._s3mURLs[e])){var t=this._s3mLayers.get(this._s3mURLs[e]);!e$2b(t)||t.releaseSelection()}},_0x40a7a7.prototype.getSelection=function(){for(var e=[],t=this._s3mURLs.length-1;t>=0;t--)if(e$2b(this._s3mURLs[t])){var i=this._s3mLayers.get(this._s3mURLs[t]);!e$2b(i)||(e=e.concat(i.getSelection()))}return e},_0x40a7a7.prototype.update=function(e,t,i,n){var r=this,o=this._layerConfigs;for(var a in o._hash)!function(a){var s=o.get(a),l=t.camera.positionWC,u=i$1c.fromRectangle3D(s.layerBounds),c=o$1p.distance(u.center,l);c>u.radius&&(c-=u.radius);for(var h=Math.max(s.layerBounds.width,s.layerBounds.height),d=0,f=Math.PI;f>h;)f*=.5,d++;var p=_0x122f16(t,d-=1,c)<_0x28208c;if(s.ready){var _=r._s3mLayers.get(a);if(!e$2b(_))return;p?(e$2b(_._flattenTexture)||e$2b(_._excavationTexture)?_.refresh():(r.remove(_._name,!0),s.ready=!1),r._resetVisible=!0):_.update(e,t,i,n)}else{if(!p)r._scene.addS3MTilesLayerByScp(a+"?t=1",s,s.index,!0).then((function(o){if(e$2b(o)){if(o.visible=r.visible,r._s3mLayers.set(a,o),e$2b(r._associatedFieldName)&&("attribute"===o._attributeExtentName?(o._queryFieldNames=[r._associatedFieldName],o._layerScheduler._indexedDBSetting.isAttributesSave=!0):o._layerScheduler._downloadAttributes(),o._layerScheduler._associatedFieldName=r._associatedFieldName),r._associatedLayerIds.length>0){for(var s=void 0,l=0;l<r._associatedLayerIds.length;l++)if(e$2b(s=r._associatedLayerIds[l].fineLayer)&&s===o.name){o._layerScheduler._isFineLayer=!0;break}o._layerScheduler._isFineLayer=!0}o.update(e,t,i,n)}})),s.ready=!0}}(a)},_0x40a7a7.prototype.render=function(e,t){for(var i=void 0,n={},r={},o=this._s3mURLs.length-1;o>=0;o--)if(e$2b(this._s3mURLs[o])){var a=this._s3mLayers.get(this._s3mURLs[o]);if(e$2b(a)){if(this._resetVisible){var s=[];for(var l in a._layerScheduler._attributes){e$2b(n[a._layerScheduler._attributes[l][this._associatedFieldName]])&&s.push(l)}if(a.setObjsVisible(s,!1),this._associatedLayerIds.length>0){var u,c=void 0;for(u=0;u<this._associatedLayerIds.length&&(!e$2b(c=this._associatedLayerIds[u].coarseLayer)||c!==a.name);u++)c=void 0;if(e$2b(c)){var h=[];for(var l in r){var d=this._associatedLayerIds[u].idMapping[l];e$2b(d)&&h.push(d)}a.setObjsVisible(h,!1)}}this._resetVisible=!1}if(a._fileType===d$15.OSGBFile&&e$2b(this._associatedFieldName)&&e$2b(i)){var f=e$2a.toDegrees(i.east),p=e$2a.toDegrees(i.north),_=e$2a.toDegrees(i.south),m=e$2a.toDegrees(i.west),g=[m,p,0,f,p,0,f,_,0,m,_,0,m,p,0];a.addFlattenRegion({position:g,name:"flatten"})}if(a.render(e,t),i=a._layerBounds,a._layerScheduler._objectIdChange){for(var x in a._layerScheduler._entityObjectId){var v=a._layerScheduler._entityObjectId[x];for(var l in v)n[v[l]]=l}for(var x in a._layerScheduler._entityModelId){v=a._layerScheduler._entityModelId[x];for(var l in v)r[l]=l}this._resetVisible=!0,a._layerScheduler._objectIdChange=!1}}}},_0x40a7a7.prototype.destroy=function(){for(var e=this._s3mURLs.length-1;e>=0;e--)if(e$2b(this._s3mURLs[e])){var t=this._s3mLayers.get(this._s3mURLs[e]);e$2b(t)&&t.destroy()}return i$10(this)};const g$r=1048576;var u$k=function(){this._layers=new e$1N,this._layerQueue=[],this._layerIndex=3,this._selectedLayer=void 0,this._clampLayerIndex=Number.MAX_VALUE,this._allTextOverlap=[],this._s3mLayerAddedIndex=0,this._processingTiles=[],this._replacementList=new h$P,this._replacementSentinel=this._replacementList.add(),this._maxMemory=2048,this._maxMemoryInBytes=this._maxMemory*g$r,this._cacheBytes=this._maxMemory*g$r};Object.defineProperties(u$k.prototype,{layerQueue:{get:function(){return this._layerQueue}}}),u$k.prototype._setCacheMemory=function(e){this._cacheBytes=e*g$r},u$k.prototype._setMaxMemory=function(e){this._maxMemory=e,this._maxMemoryInBytes=this._maxMemory*g$r};var N$e=function(e,t){return e.priority-t.priority},E$o=function(e,t){return e._disFromCamera-t._disFromCamera};function G$k(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];i._adjustedLodRangeScale=Math.min(1.02*i._adjustedLodRangeScale,1e4)}}function k$j(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];i._adjustedLodRangeScale=Math.max(i._adjustedLodRangeScale/1.02,i._lodRangeScale)}}function b$u(e,t,i){if((t=e$2a.clamp(t,0,e.length-1))===(i=e$2a.clamp(i,0,e.length-1)))return!1;var n=e[t];return e[t]=e[i],e[i]=n,!0}u$k.prototype._processTiles=function(e){const t=e.context;e.processingTiles.sort(E$o);const i=this._maxMemoryInBytes,n=i+.5*i,r=e.processingTiles;let o=!1;for(let t=0,i=r.length;t<i;t++){const i=r[t];o=i.transformResource(e,i.layer,n)}const a=this._layerQueue;t.memorySize<i?k$j(a):o&&r.length>0&&G$k(a),this._processingTiles.length=0},u$k.prototype.update=function(e,t,i,n){_0x4dad4e.update(e);var r=this._layerQueue,o=this._layerQueue.length;this._replacementList.splice(this._replacementList.tail,this._replacementSentinel),t.replacementList=this._replacementList,t.processingTiles=this._processingTiles;var a=0,s=[];for(a=0;a<o;a++){var l=r[a];if(e$2b(l)){if(t.multiViewportIndex>-1)if(!l.getVisibleInViewport(t.multiViewportIndex))continue;if(e$2b(n)&&!0===n){if(l._fileType!=d$15.ClampGroundRealtimeRasterCache){if(t.multiViewportIndex>-1&&!l.getVisibleInViewport(t.multiViewportIndex))continue;continue}s.push(l.id)}else if(l._fileType===d$15.ClampGroundRealtimeRasterCache)continue;var u=t._fboState.frameBufferType;if(u==Qe$c.NORMAL_AND_DEPTH){if(!e$2b(l._wireFrameType)||!l.isSilhouette())continue}else if(u==Qe$c.POSTEFFECT_FILTER){if(!e$2b(l.bloomEnable)||!l.bloomEnable)continue}else if(!(u!=Qe$c.CLAMP||e$2b(l._section)&&l._section))continue;l.update(e,t,i)}}ti$3.update(e.memorySize),t.requests.sort(N$e);for(var c=performance.now(),h=(a=0,t.requests.length);a<h;a++){var d=t.requests[a];if(d.owner.loadEntity(d.entity),performance.now()-c>5)break}return t.requests.length=0,this._processTiles(t),s},u$k.prototype.updateTextVisible=function(e,t){var i=this._layerQueue.length;if(0!==i){for(var n=0;n<i;n++){var r=this._layerQueue[n];if(r._fileType!==d$15.Text&&r._fileType!==d$15.IconPoint&&r._fileType!==d$15.OSGBCacheFile)return;_0x15f4db.addPotentialVisibiltyChangedLayer(r.name)}var o=t.camera._scene.overlapDisplayOptions,a=o&&o.allowIconWithTextDisplay,s=t.camera._scene._overlapDisplayedThreshold;_0x15f4db.meetVisible(this._allTextOverlap,s,a),_0x15f4db.setVisibiltyChangedToLayer(this,a),_0x15f4db.resetVisibleChangedQueue(),this._allTextOverlap=[]}},u$k.prototype._freeResource=function(e){for(var t=e.context,i=this._replacementList.head,n=this._cacheBytes;i!==this._replacementSentinel&&t.memorySize>n;){var r=i.item,o=r.layer;if(i=i.next,this._replacementList.remove(r._replacementNode),r._isRootTile&&o.residentRootTile)r._replacementNode=null;else{var a={geoSize:0,texSize:0};r.memoryUsageEx(a),ti$3._memGeometryRemoved(a.geoSize),r.destroy(e,!1)}}},u$k.prototype.endFrame=function(e){if(Se$d.GetUnusedSize()>0&&Se$d.DeleteUnusedTextures(),e.lightSource.hasChange()){var t=e.lightSource._changedLightList._hash;this.lightSourceChanged(t),e.lightSource.resetChange()}for(var i=this._layerQueue,n=this._layerQueue.length,r=performance.now(),o=0;o<n;o++){var a=i[o];if(a._isS3MBlock&&a._context._subTextureManager&&a._context._subTextureManager.processRequests(a),performance.now()-r>5)break}_0x46a73d.processTasks(),e.passes.offscreen||this._freeResource(e)},u$k.prototype.render=function(e,t){var i=this._layerQueue,n=this._layerQueue.length,r=0;for(r=0;r<n;r++){var o=i[r];if(e$2b(o)){if(t.multiViewportIndex>-1)if(!o.getVisibleInViewport(t.multiViewportIndex))continue;o.render(e,t)}}},u$k.prototype._setSelection=function(e){var t=e.primitive.id,i=e.id,n=e.skeletonId,r=this._layerQueue,o=this._layerQueue.length,a=0,s=void 0;for(a=0;a<o;a++){var l=r[a];l instanceof _0x40a7a7?l.setSelection(i,n,t,e.primitive.name)&&(s=l):l.id===t&&l.selectEnabled?(l.setSelection(i,n),s=l):l.releaseSelection()}s instanceof _0x40a7a7||this.setSelectedLayer(s)},u$k.prototype.releaseSelection=function(){var e=this._layerQueue,t=this._layerQueue.length,i=0;for(i=0;i<t;i++){var n=e[i];!e$2b(n)||n.releaseSelection()}this.setSelectedLayer(void 0)},u$k.prototype.find=function(e){if(!e$2b(e))throw new t$16("name is required.");var t=this._layers.get(e);if(!e$2b(t))for(var i=this._layerQueue,n=this._layerQueue.length,r=0;r<n;r++){var o=i[r];if(o instanceof _0x40a7a7)for(var a=i[r],s=0;s<a._s3mLayers._array.length;s++)if((o=a._s3mLayers._array[s]).name===e){t=o;break}}return t},u$k.prototype.findByIndex=function(e){if(!e$2b(e))throw new t$16("index is required.");if(e>this._layerQueue.length-1)throw new t$16("index is out of bounds.");return this._layerQueue[e]},u$k.prototype.add=function(e,t){if(!e$2b(e))throw new t$16("layer is required.");var i=e._name;if(!e$2b(i)||""==i)throw new t$16("name is required.");var n=this._layers;if(n.contains(i))throw new RuntimeError("An layer with name "+i+" already exists in this Scene.");e._id=this._layerIndex++;var r=this._layerQueue.length;n.set(i,e),t=u$_(t,r),e.index=t,this._layerQueue.push(e),this._layerQueue.sort((function(e,t){return e.index-t.index})),e._fileType===d$15.ClampObjectPolygon?this._clampLayerIndex=t:t>this._clampLayerIndex&&(e.receiveObjectClamp=!1)},u$k.prototype.remove=function(e,t){if(t=u$_(t,!0),!e$2b(e))return!1;var i=this.find(e);return!!i&&(!!this._layers.remove(e)&&(this._layerQueue.splice(this._layerQueue.indexOf(i),1),t&&i.destroy(),i._fileType===d$15.ClampObjectPolygon&&(this._clampLayerIndex=Number.MAX_VALUE),this._selectedLayer===i&&(this._selectedLayer=void 0),this._s3mLayerAddedIndex--,!0))},u$k.prototype.removeAll=function(e){if(e=u$_(e,!0)){var t=this._layerQueue,i=this._layerQueue.length,n=0;for(n=0;n<i;n++){var r=t[n];!e$2b(r)||r.destroy()}}this._layers.removeAll(),this._layerQueue.length=0,this._clampLayerIndex=Number.MAX_VALUE,this._selectedLayer=void 0,this._s3mLayerAddedIndex=0},u$k.prototype.pickFeatures=function(e,t){var i,n=t._context,r=n.pixels,o=e$1U.byteToRgba(r[0],r[1],r[2],r[3]),a=n.getObjectByPickId(o);if(e$2b(a)&&e$2b(a.primitive)&&a.primitive instanceof _0x22e933){var s=a.id;if(!e$2b((i=a.primitive).queryParameter)||!i.selectEnabled)return;var l=i.queryParameter,u=l.url+"/datasources/{datasourceName}/datasets/{datasetName}/features/{id}.jsonp?hasGeometry={hasGeometry}";if(e$2b(l.dataSetName))return u=u.replace("{datasourceName}",l.dataSourceName).replace("{datasetName}",l.dataSetName).replace("{id}",s).replace("{hasGeometry}",l.hasGeometry),e$2b(a$O.CREDENTIAL)&&(u=a$O.addToken(u)),d$V(u);if(1==l.isMerge&&e$2b(l.datasetList)){for(var c,h=0,d=l.datasetList.length;h<d;h++){var f=l.datasetList[h];if(s>=f.startID&&s<=f.endID){s=s-f.startID+1,c=f.datasetName;break}}if(e$2b(c))return u=u.replace("{datasourceName}",l.dataSourceName).replace("{datasetName}",c).replace("{id}",s).replace("{hasGeometry}",l.hasGeometry),e$2b(a$O.CREDENTIAL)&&(u=a$O.addToken(u)),d$V(u)}}},u$k.prototype.raise=function(e){if(e$2b(e)){var t=e.index;if(b$u(this._layerQueue,t,t+1)&&(e.index+=1),e._fileType===d$15.ClampGroundRealtimeRasterCache)for(var i=0;i<this._layerQueue.length;i++)this._layerQueue[i]._fileType===d$15.ClampGroundRealtimeRasterCache&&this._layerQueue[i]._layerScheduler.refreshRaster(this._layerQueue[i]._frameState)}},u$k.prototype.lower=function(e){if(e$2b(e)){var t=e.index;if(b$u(this._layerQueue,t,t-1)&&(e.index-=1),e._fileType===d$15.ClampGroundRealtimeRasterCache)for(var i=0;i<this._layerQueue.length;i++)this._layerQueue[i]._fileType===d$15.ClampGroundRealtimeRasterCache&&this._layerQueue[i]._layerScheduler.refreshRaster(this._layerQueue[i]._frameState)}},u$k.prototype.lowerToBottom=function(e){if(e$2b(e)){var t=e.index;this._layerQueue.splice(t,1),this._layerQueue.unshift(e),e.index=0;for(let i=1;i<=t;i++){(e=this._layers.get(this._layerQueue[i].name)).index+=1}}},u$k.prototype.raiseToTop=function(e){if(e$2b(e)){var t=e.index;this._layerQueue.splice(t,1),this._layerQueue.push(e),e.index=this._layerQueue.length-1;for(let i=t;i<this._layerQueue.length-1;i++){(e=this._layers.get(this._layerQueue[i].name)).index-=1}}},u$k.prototype.setSelectedLayer=function(e){this._selectedLayer=e},u$k.prototype.getSelectedLayer=function(){if(!e$2b(this._selectedLayer)||!this._selectedLayer.isDestroyed())return this._selectedLayer},u$k.prototype.lightSourceChanged=function(e){for(var t=0,i=this._layerQueue.length;t<i;t++)this._layerQueue[t]instanceof _0x22e933&&this._layerQueue[t].lightSourceChanged(e)},u$k.prototype.saveLocalCache=function(){for(var e=[],t=0,i=this._layerQueue.length;t<i;t++)this._layerQueue[t]instanceof _0x22e933&&this._layerQueue[t]._layerScheduler.saveLocalCache(e);if(e.length>0){var n={nameArray:e};_0x46a73d.indexTaskProcessor.scheduleTask(n,[])}};var _0x355f51=(_0x5bb442=!0,function(e,t){var i=_0x5bb442?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5bb442=!1,i}),_0x1187b6=_0x355f51(void 0,(function(){return _0x1187b6.toString().search("(((.+)+)+)+$").toString().constructor(_0x1187b6).search("(((.+)+)+)+$")})),_0x5bb442;_0x1187b6();var WebGLPlot$f=window.WebGLPlot=window.WebGLPlot||{};function _0x5a145c(){}WebGLPlot$f.defaultValue=u$_,WebGLPlot$f.defined=e$2b,WebGLPlot$f.Cartesian2=o$1o,WebGLPlot$f.Cartesian3=o$1p,WebGLPlot$f.WallGeometry=E$F,WebGLPlot$f.GeometryInstance=d$1o,WebGLPlot$f.PolylineVolumeGeometry=N$y,WebGLPlot$f.GroundPolylineGeometry=aa$4,WebGLPlot$f.PolylineGeometry=R$A,WebGLPlot$f.PolygonGeometry=z$_,WebGLPlot$f.Color=e$1U,WebGLPlot$f.ColorGeometryInstanceAttribute=o$16,WebGLPlot$f.PerInstanceColorAppearance=t$R,WebGLPlot$f.LabelStyle=R$Q,WebGLPlot$f.SceneTransforms=s$Q,WebGLPlot$f.HorizontalOrigin=j$T,WebGLPlot$f.SceneMode=C$13,WebGLPlot$f.Material=r$X,WebGLPlot$f.VertexFormat=n$11,WebGLPlot$f.CesiumMath=e$2a,WebGLPlot$f.HeadingPitchRoll=i$15,WebGLPlot$f.Ellipsoid=t$13,WebGLPlot$f.Transforms=m$17,WebGLPlot$f.EllipsoidGeodesic=E$1s,WebGLPlot$f.Cartographic=a$18,WebGLPlot$f.BillboardCollection=w$N,WebGLPlot$f.MaterialAppearance=t$w,WebGLPlot$f.LabelCollection=g$U,WebGLPlot$f.EllipsoidSurfaceAppearance=t$i,WebGLPlot$f.BoundingSphere=i$1c,WebGLPlot$f.Primitive=y$S,WebGLPlot$f.GroundPrimitive=d$14,WebGLPlot$f.RenderState=d$1m,WebGLPlot$f.PolylineCollection=k$T,WebGLPlot$f.GroundPolylinePrimitive=g$11,WebGLPlot$f.PolylineColorAppearance=e$1C,WebGLPlot$f.ClassificationType=_0x3b5200,WebGLPlot$f.Polyline=o$14,WebGLPlot$f.Event=o$1h,WebGLPlot$f.ScreenSpaceEventHandler=g$J,WebGLPlot$f.DeveloperError=t$16,WebGLPlot$f.clone=l$1g,WebGLPlot$f.when=o$1l,WebGLPlot$f.Check=o$1q,WebGLPlot$f.Request=r$1b,WebGLPlot$f.RequestErrorEvent=s$_,WebGLPlot$f.RequestScheduler=r$1a,WebGLPlot$f.RuntimeError=t$14,WebGLPlot$f.TrustedServers=u$X,WebGLPlot$f.ScreenSpaceEventType=G$I,WebGLPlot$f.buildModuleUrl=n$15,WebGLPlot$f.IntersectionTests=g$1h,WebGLPlot$f.Ray=f$17,WebGLPlot$f.Cartographic=a$18,WebGLPlot$f.BoxOutlineGeometry=o$17,WebGLPlot$f.Matrix3=p$1e,WebGLPlot$f.Matrix4=p$1d,WebGLPlot$f.AxisAlignedBoundingBox=e$26,WebGLPlot$f.createGuid=e$1Q,WebGLPlot$f.Entity=h$V,WebGLPlot$f.VerticalOrigin=S$O,WebGLPlot$f.Model=F$C,WebGLPlot$f.PolygonHierarchy=e$1J,WebGLPlot$f.AssociativeArray=e$1N,WebGLPlot$f.ModelUtility=s$v,WebGLPlot$f.KeyboardEventModifier=Aa$1,WebGLPlot$f.ParticleSystem=g$s,WebGLPlot$f.CircleEmitter=u$l,WebGLPlot$f.ConeEmitter=n$j,WebGLPlot$f.TranslationRotationScale=e$1X,WebGLPlot$f.BoxEmitter=a$j,WebGLPlot$f.Quaternion=n$13,WebGLPlot$f.JulianDate=a$15,WebGLPlot$f.Property=r$Z,WebGLPlot$f.S3MInstanceCollection=_0x448857,WebGLPlot$f.arrayFill=d$1s,WebGLPlot$f.ComponentDatatype=S$12,WebGLPlot$f.Geometry=I$1p,WebGLPlot$f.GeometryAttribute=o$1c,WebGLPlot$f.GeometryAttributes=a$_,WebGLPlot$f.GeometryOffsetAttribute=_0x58701d,WebGLPlot$f.IndexDatatype=ce$x,WebGLPlot$f.PrimitiveType=W$18,WebGLPlot$f.PolylinePipeline=m$V,WebGLPlot$f.ImageMaterialProperty=a$R,WebGLPlot$f.ColorMaterialProperty=t$Q,WebGLPlot$f.ShadowMode=W$W,WebGLPlot$f.ShowGeometryInstanceAttribute=e$1F,WebGLPlot$f.DistanceDisplayCondition=r$Y,WebGLPlot$f.DistanceDisplayConditionGeometryInstanceAttribute=t$B,WebGLPlot$f.MeasureHandler=T$l,WebGLPlot$f.MeasureMode=_0x91cd7b,WebGLPlot$f.DrawHandler=w$m,WebGLPlot$f.DrawMode=_0x20cc4b,WebGLPlot$f.Sightline=_0x23be36,WebGLPlot$f.ViewShed3D=_0x12cc1f,WebGLPlot$f.PrimitiveCollection=o$x,WebGLPlot$f.PolylineMaterialAppearance=r$W,WebGLPlot$f.ApproximateTerrainHeights=e$1E,WebGLPlot$f.destroyObject=i$10,WebGLPlot$f.OrientedBoundingBox=y$Z,WebGLPlot$f.Rectangle=h$18,WebGLPlot$f.ClassificationPrimitive=x$$,WebGLPlot$f.ShadowVolumeAppearance=y$R,WebGLPlot$f.ColorTable=i$S,WebGLPlot$f.HypsometricSettingEnum=k$Q,WebGLPlot$f.SlopeSetting=l$K,WebGLPlot$f.SlopeSettingEnum=_0x256766,WebGLPlot$f.CallbackProperty=n$V,WebGLPlot$f.S3MTilesLayer=_0x22e933,WebGLPlot$f.Layers=u$k,WebGLPlot$f.PlaneGeometry=f$K,WebGLPlot$f.ModelAnimationLoop=_0x157d80,WebGLPlot$f.NearFarScalar=o$Y,WebGLPlot$f.createPropertyDescriptor=C$$,WebGLPlot$f.CatmullRomSpline=c$K,WebGLPlot$f.GeometryPipeline=k$13,WebGLPlot$f.EllipseGeometry=Y$y,WebGLPlot$f.CylinderGeometry=l$Q;var _0x157c3b=(_0x53ed5c=!0,function(e,t){var i=_0x53ed5c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53ed5c=!1,i}),_0x2d8e22=_0x157c3b(void 0,(function(){return _0x2d8e22.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d8e22).search("(((.+)+)+)+$")})),_0x53ed5c;function _0x11ff81(e,t,i){this.x=WebGLPlot.defaultValue(e,0),this.y=WebGLPlot.defaultValue(t,0),this.z=WebGLPlot.defaultValue(i,0)}_0x2d8e22(),_0x11ff81.clone=function(e,t){if(WebGLPlot.defined(e))return WebGLPlot.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new _0x11ff81(e.x,e.y,e.z)},_0x11ff81.equals=function(e,t){return e===t||WebGLPlot.defined(e)&&WebGLPlot.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},_0x11ff81.prototype.clone=function(e){return _0x11ff81.clone(this,e)},_0x11ff81.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},_0x11ff81.prototype.equals=function(e){return _0x11ff81.equals(this,e)};var _0x39bed8=(_0xd56a3a=!0,function(e,t){var i=_0xd56a3a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd56a3a=!1,i}),_0x50896b=_0x39bed8(void 0,(function(){return _0x50896b.toString().search("(((.+)+)+)+$").toString().constructor(_0x50896b).search("(((.+)+)+)+$")})),_0xd56a3a;_0x50896b();var _0x3b6584={SYMBOL_UNKNOW:0,SYMBOL_DOT:1,SYMBOL_ALGO:2,SYMBOL_PICTURE:20,SYMBOL_POLYLINE:24,SYMBOL_RECTANGLE:26,SYMBOL_PARALLELOGRAM:28,SYMBOL_CIRCLE:29,SYMBOL_ELLIPSE:31,SYMBOL_ARBITRARYPOLYGON:32,SYMBOL_TEXT:34,SYMBOL_ARC:44,SYMBOL_PARALLELLINE:48,SYMBOL_TRAPEZOID:350,SYMBOL_POLYBEZIERCLOSED:360,SYMBOL_CHORD:370,SYMBOL_PIE:380,SYMBOL_KIDNEY:390,SYMBOL_BRACE:400,SYMBOL_REGULARPOLYGON:410,SYMBOL_POLYBEZIER:590,SYMBOL_RUNWAY:1013,SYMBOL_CURVEEIGHT:1014,SYMBOL_CONCENTRICCIRCLE:1019,SYMBOL_COMBINATIONALCIRCLE:1022,SYMBOL_NODECHAIN:1025,GROUPOBJECT:1e3,SYMBOL_CIRCLECHORD:3701,SYMBOL_CIRCLEPIE:3801,SYMBOL_CIRCLEARC:4401,SYMBOL_Model:99999,SYMBOL_POINT:99998},_0x18bc2f=Object.freeze(_0x3b6584),_0x978852=(_0x501def=!0,function(e,t){var i=_0x501def?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x501def=!1,i}),_0x3a4601=_0x978852(void 0,(function(){return _0x3a4601.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a4601).search("(((.+)+)+)+$")})),_0x501def;_0x3a4601();var _0x8fbb19={SURROUNDLINE_NONE:0,SURROUNDLINE_INNER:1,SURROUNDLINE_OUT:2,SURROUNDLINE_ALL:3},_0x26609d=Object.freeze(_0x8fbb19),_0x7b935f=(_0x59227f=!0,function(e,t){var i=_0x59227f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59227f=!1,i}),_0x25ae49=_0x7b935f(void 0,(function(){return _0x25ae49.toString().search("(((.+)+)+)+$").toString().constructor(_0x25ae49).search("(((.+)+)+)+$")})),_0x59227f;_0x25ae49();var _0x2354e4={None:0,Linear:1,Radial:2},_0x83f1a2=Object.freeze(_0x2354e4),_0x25d76f=(_0x70d266=!0,function(e,t){var i=_0x70d266?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x70d266=!1,i}),_0x39a6fc=_0x25d76f(void 0,(function(){return _0x39a6fc.toString().search("(((.+)+)+)+$").toString().constructor(_0x39a6fc).search("(((.+)+)+)+$")})),_0x70d266;_0x39a6fc();var _0x353f2e=void 0;class _0x47a70a{constructor(){this._layerAdded=new WebGLPlot$f.Event,this._layerDeleted=new WebGLPlot$f.Event,this._layerActived=new WebGLPlot$f.Event,this._layerEditableChanged=new WebGLPlot$f.Event,this._layerVisibleChanged=new WebGLPlot$f.Event,this._layerSelectedChanged=new WebGLPlot$f.Event,this._symbolAdded=new WebGLPlot$f.Event,this._symbolDeleted=new WebGLPlot$f.Event,this._symbolBeforeDeleted=new WebGLPlot$f.Event,this._symbolModified=new WebGLPlot$f.Event,this._symbolUpdated=new WebGLPlot$f.Event,this._symbolDestroyed=new WebGLPlot$f.Event,this._symbolSelected=new WebGLPlot$f.Event,this._symbolUnSelected=new WebGLPlot$f.Event,this._animationCreated=new WebGLPlot$f.Event,this._animationDeleted=new WebGLPlot$f.Event,this._animationModified=new WebGLPlot$f.Event,this._animationBegined=new WebGLPlot$f.Event,this._animationFinished=new WebGLPlot$f.Event,this._animationJsonEnd=new WebGLPlot$f.Event}static getInstance(){return _0x353f2e||(_0x353f2e=new _0x47a70a),_0x353f2e}}Object.defineProperties(_0x47a70a.prototype,{layerAdded:{get:function(){return this._layerAdded}},layerDeleted:{get:function(){return this._layerDeleted}},layerActived:{get:function(){return this._layerActived}},layerEditableChanged:{get:function(){return this._layerEditableChanged}},layerVisibleChanged:{get:function(){return this._layerVisibleChanged}},layerSelectedChanged:{get:function(){return this._layerSelectedChanged}},symbolAdded:{get:function(){return this._symbolAdded}},symbolBeforeDeleted:{get:function(){return this._symbolBeforeDeleted}},symbolDeleted:{get:function(){return this._symbolDeleted}},symbolModified:{get:function(){return this._symbolModified}},symbolUpdated:{get:function(){return this._symbolUpdated}},symbolDestroyed:{get:function(){return this._symbolDestroyed}},symbolSelected:{get:function(){return this._symbolSelected}},symbolUnSelected:{get:function(){return this._symbolUnSelected}},animationCreated:{get:function(){return this._animationCreated}},animationDeleted:{get:function(){return this._animationDeleted}},animationModified:{get:function(){return this._animationModified}},animationBegined:{get:function(){return this._animationBegined}},animationFinished:{get:function(){return this._animationFinished}},animationJsonEnd:{get:function(){return this._animationJsonEnd}}});var _0x12187b=(_0x1ea24b=!0,function(e,t){var i=_0x1ea24b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ea24b=!1,i}),_0x53fd83=_0x12187b(void 0,(function(){return _0x53fd83.toString().search("(((.+)+)+)+$").toString().constructor(_0x53fd83).search("(((.+)+)+)+$")})),_0x1ea24b;function _0x53d051(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._graphicObject=WebGLPlot.defaultValue(e.graphicObject,void 0),this._lineColor=WebGLPlot.defaultValue(e.lineColor,new WebGLPlot.Color(1,0,0,1)),this._lineWidth=WebGLPlot.defaultValue(e.lineWidth,3),this._fillBackColor=WebGLPlot.defaultValue(e.fillBackColor,new WebGLPlot.Color(1,0,0,1)),this._fillBackOpaque=WebGLPlot.defaultValue(e.fillBackOpaque,!1),this._fillGradientAngle=WebGLPlot.defaultValue(e.fillGradientAngle,0),this._fillGradientMode=WebGLPlot.defaultValue(e.fillGradientMode,_0x83f1a2.None),this._fillGradientOffsetRatioY=WebGLPlot.defaultValue(e.fillGradientOffsetRatioY,0),this._fillGradientOffsetRatioX=WebGLPlot.defaultValue(e.fillGradientOffsetRatioX,0),this._fillForeColor=WebGLPlot.defaultValue(e.fillForeColor,new WebGLPlot.Color(1,0,0,1)),this._fillSymbolID=WebGLPlot.defaultValue(e.fillSymbolID,1),this._fillOpaqueRate=WebGLPlot.defaultValue(e.fillOpaqueRate,70),this._surroundLineColor=WebGLPlot.defaultValue(e.surroundLineColor,WebGLPlot.Color.YELLOW),this._surroundLineType=WebGLPlot.defaultValue(e.surroundLineType,0),this._surroundLineWidth=WebGLPlot.defaultValue(e.surroundLineWidth,3),this._opacity=WebGLPlot.defaultValue(e.opacity,1)}_0x53fd83(),_0x53d051.prototype.clone=function(){var e=new _0x53d051;return e._graphicObject=this._graphicObject,e._lineColor=WebGLPlot.Color.clone(this._lineColor),e._lineWidth=JSON.parse(JSON.stringify(void 0!==this._lineWidth?this._lineWidth:3)),e._fillBackColor=WebGLPlot.Color.clone(this._fillBackColor),e._fillBackOpaque=JSON.parse(JSON.stringify(void 0!==this._fillBackOpaque&&this._fillBackOpaque)),e._fillGradientAngle=JSON.parse(JSON.stringify(void 0!==this._fillGradientAngle?this._fillGradientAngle:0)),e._fillGradientMode=JSON.parse(JSON.stringify(void 0!==this._fillGradientMode?this._fillGradientMode:_0x83f1a2.None)),e._fillGradientOffsetRatioY=JSON.parse(JSON.stringify(void 0!==this._fillGradientOffsetRatioY?this._fillGradientOffsetRatioY:0)),e._fillGradientOffsetRatioX=JSON.parse(JSON.stringify(void 0!==this._fillGradientOffsetRatioX?this._fillGradientOffsetRatioX:0)),e._fillForeColor=WebGLPlot.Color.clone(this._fillForeColor),e._fillSymbolID=JSON.parse(JSON.stringify(void 0!==this._fillSymbolID?this._fillSymbolID:1)),e._fillOpaqueRate=JSON.parse(JSON.stringify(void 0!==this._fillOpaqueRate?this._fillOpaqueRate:70)),e._surroundLineColor=WebGLPlot.Color.clone(this._surroundLineColor),e._surroundLineType=JSON.parse(JSON.stringify(void 0!==this._surroundLineType?this._surroundLineType:0)),e._surroundLineWidth=JSON.parse(JSON.stringify(void 0!==this._surroundLineWidth?this._surroundLineWidth:3)),e._opacity=JSON.parse(JSON.stringify(void 0!==this._opacity?this._opacity:1)),e},_0x53d051.prototype.update=function(){this._graphicObject&&(this._graphicObject._initialize=!1,this._graphicObject._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this._graphicObject))},Object.defineProperties(_0x53d051.prototype,{lineColor:{get:function(){return this._lineColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._lineColor))return;this._lineColor=e,this.update()}}},lineWidth:{get:function(){return this._lineWidth},set:function(e){e!==this._lineWidth&&(this._lineWidth=e,this._graphicObject._CorridorWidth=-1,this.update())}},fillBackColor:{get:function(){return this._fillBackColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._fillBackColor))return;this._fillBackColor=e,this.update()}}},fillForeColor:{get:function(){return this._fillForeColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._fillForeColor))return;this._fillForeColor=e,this.update()}}},fillBackOpaque:{get:function(){return this._fillBackOpaque},set:function(e){e!==this._fillBackOpaque&&(this._fillBackOpaque=e,this.update())}},fillGradientAngle:{get:function(){return this._fillGradientAngle},set:function(e){e!==this._fillGradientAngle&&(this._fillGradientAngle=e,this.update())}},fillGradientMode:{get:function(){return this._fillGradientMode},set:function(e){e!==this._fillGradientMode&&(this._fillGradientMode=e,this.update())}},fillGradientOffsetRatioY:{get:function(){return this._fillGradientOffsetRatioY},set:function(e){e===this._fillGradientOffsetRatioY||this._fillGradientOffsetRatioY<0||this._fillGradientOffsetRatioY>100||(this._fillGradientOffsetRatioY=e,this.update())}},fillGradientOffsetRatioX:{get:function(){return this._fillGradientOffsetRatioX},set:function(e){e===this._fillGradientOffsetRatioX||this._fillGradientOffsetRatioX<0||this._fillGradientOffsetRatioX>100||(this._fillGradientOffsetRatioX=e,this.update())}},fillSymbolID:{get:function(){return this._fillSymbolID},set:function(e){e!==this._fillSymbolID&&(this._fillSymbolID=e,this.update())}},fillOpaqueRate:{get:function(){return this._fillOpaqueRate},set:function(e){e===this._fillOpaqueRate||e>100||e<0||(this._fillOpaqueRate=e,this.update())}},surroundLineWidth:{get:function(){return this._surroundLineWidth},set:function(e){e!==this._surroundLineWidth&&(this._surroundLineWidth=e,this.update())}},surroundLineColor:{get:function(){return this._surroundLineColor},set:function(e){e!==this._surroundLineColor&&(this._surroundLineColor=e,this.update())}},opacity:{get:function(){return this._opacity},set:function(e){e!==this._opacity&&(this._opacity=e,this.update())}},surroundLineType:{get:function(){return this._surroundLineType},set:function(e){e!==this._surroundLineType&&(this._surroundLineType=e,this.update())}}});var _0x19a446=(_0x236add=!0,function(e,t){var i=_0x236add?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x236add=!1,i}),_0x495a1d=_0x19a446(void 0,(function(){return _0x495a1d.toString().search("(((.+)+)+)+$").toString().constructor(_0x495a1d).search("(((.+)+)+)+$")})),_0x236add;function _0x34d1aa(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._graphicObject=WebGLPlot.defaultValue(e.graphicObject,void 0),this._fontHeight=WebGLPlot.defaultValue(e.fontHeight,508/96),this._foreColor=WebGLPlot.defaultValue(e.foreColor,WebGLPlot.Color.WHITE),this._backColor=WebGLPlot.defaultValue(e.backColor,new WebGLPlot.Color(1,0,0,.3)),this._outline=WebGLPlot.defaultValue(e.outline,!0),this._fontName=WebGLPlot.defaultValue(e.fontName,WebGLPlot.plotI18n("SongTi")),this._italic=WebGLPlot.defaultValue(e.italic,!1),this._bold=WebGLPlot.defaultValue(e.bold,!0),this._align=WebGLPlot.defaultValue(e.align,0),this._italicAngle=WebGLPlot.defaultValue(e.italicAngle,0),this._shadow=WebGLPlot.defaultValue(e.shadow,!1),this._sizeFixed=WebGLPlot.defaultValue(e.sizeFixed,!0),this._underline=WebGLPlot.defaultValue(e.underline,!1),this._rotation=WebGLPlot.defaultValue(e.rotation,0),this._backOpaque=WebGLPlot.defaultValue(e.backOpaque,!1),this._strikeout=WebGLPlot.defaultValue(e.strikeout,!1),this._borderSpacingWidth=WebGLPlot.defaultValue(e.borderSpacingWidth,4),this._outlineWidth=WebGLPlot.defaultValue(e.outlineWidth,1),this._fontWidth=WebGLPlot.defaultValue(e.fontWidth,0),this._opaqueRate=WebGLPlot.defaultValue(e.opaqueRate,255),this._stringAlignment=WebGLPlot.defaultValue(e.stringAlignment,0),this._text3DScale=WebGLPlot.defaultValue(e.text3DScale,1),this._fontWeight=WebGLPlot.defaultValue(e.fontWeight,0),this._fontSize=WebGLPlot.defaultValue(e.fontSize,20),this._textBoxColor=WebGLPlot.defaultValue(e.textBoxColor,new WebGLPlot.Color(1,0,0,.3)),this._textBoxLineColor=WebGLPlot.defaultValue(e.textBoxLineColor,new WebGLPlot.Color(1,0,0,.8)),this._isShowTextBox=WebGLPlot.defaultValue(e.isShowTextBox,!1)}_0x495a1d(),_0x34d1aa.prototype.setTextRectColor=function(e,t){this._textBoxLineColor=WebGLPlot.Color.clone(e),this._textBoxColor=new WebGLPlot.Color(e.red,e.green,e.blue,.3),WebGLPlot.defined(t)&&t&&this.update()},_0x34d1aa.prototype.clone=function(){var e=new _0x34d1aa;return e._graphicObject=this._graphicObject,e._fontHeight=JSON.parse(JSON.stringify(void 0!==this._fontHeight?this._fontHeight:508/96)),e._foreColor=WebGLPlot.Color.clone(this._foreColor),e._backColor=WebGLPlot.Color.clone(this._backColor),e._outline=JSON.parse(JSON.stringify(void 0!==this._outline&&this._outline)),e._fontName=JSON.parse(JSON.stringify(void 0!==this._fontName?this._fontName:WebGLPlot.plotI18n("SongTi"))),e._italic=JSON.parse(JSON.stringify(void 0!==this._italic&&this._italic)),e._bold=JSON.parse(JSON.stringify(void 0===this._bold||this._bold)),e._align=JSON.parse(JSON.stringify(void 0!==this._align?this._align:0)),e._italicAngle=JSON.parse(JSON.stringify(void 0!==this._italicAngle?this._italicAngle:0)),e._shadow=JSON.parse(JSON.stringify(void 0!==this._shadow?this._shadow:0)),e._sizeFixed=JSON.parse(JSON.stringify(void 0!==this._sizeFixed&&this._sizeFixed)),e._underline=JSON.parse(JSON.stringify(void 0!==this._underline?this._underline:0)),e._rotation=JSON.parse(JSON.stringify(void 0!==this._rotation?this._rotation:0)),e._backOpaque=JSON.parse(JSON.stringify(void 0!==this._backOpaque?this._backOpaque:0)),e._strikeout=JSON.parse(JSON.stringify(void 0!==this._strikeout?this._strikeout:0)),e._borderSpacingWidth=JSON.parse(JSON.stringify(void 0!==this._borderSpacingWidth?this._borderSpacingWidth:4)),e._outlineWidth=JSON.parse(JSON.stringify(void 0!==this._outlineWidth?this._outlineWidth:1)),e._opaqueRate=JSON.parse(JSON.stringify(void 0!==this._opaqueRate?this._opaqueRate:255)),e._stringAlignment=JSON.parse(JSON.stringify(void 0!==this._stringAlignment?this._stringAlignment:0)),e._text3DScale=JSON.parse(JSON.stringify(void 0!==this._text3DScale?this._text3DScale:1)),e._fontWeight=JSON.parse(JSON.stringify(void 0!==this._fontWeight?this._fontWeight:0)),e._fontSize=JSON.parse(JSON.stringify(void 0!==this._fontSize?this._fontSize:20)),e._textBoxColor=WebGLPlot.Color.clone(this._textBoxColor),e._textBoxLineColor=WebGLPlot.Color.clone(this._textBoxLineColor),e._isShowTextBox=JSON.parse(JSON.stringify(void 0!==this._isShowTextBox&&this._isShowTextBox)),e},Object.defineProperties(_0x34d1aa.prototype,{fontHeight:{get:function(){return this._fontHeight},set:function(e){e!==this._fontHeight&&(this._fontHeight=e,this._fontSize=parseInt(96*e/25.4),this.update())}},foreColor:{get:function(){return this._foreColor},set:function(e){e===this._foreColor||!(e instanceof WebGLPlot.Color)||(this._foreColor=e,this.update())}},backColor:{get:function(){return this._backColor},set:function(e){e!==this._backColor&&(this._backColor=e,this.update())}},outline:{get:function(){return this._outline},set:function(e){e!==this._outline&&(this._outline=e,this.update())}},fontName:{get:function(){return this._fontName},set:function(e){e!==this._fontName&&(this._fontName=e,this.update())}},italic:{get:function(){return this._italic},set:function(e){e!==this._italic&&(this._italic=e,this.update())}},bold:{get:function(){return this._bold},set:function(e){e!==this._bold&&(this._bold=e,this.update())}},align:{get:function(){return this._align},set:function(e){e!==this._italic&&(this._align=e,this.update())}},italicAngle:{get:function(){return this._italicAngle},set:function(e){e!==this._italicAngle&&(this._italicAngle=e,this.update())}},shadow:{get:function(){return this._shadow},set:function(e){e!==this._shadow&&(this._shadow=e,this.update())}},sizeFixed:{get:function(){return this._sizeFixed},set:function(e){e!==this._sizeFixed&&(this._sizeFixed=e,this.update())}},underline:{get:function(){return this._underline},set:function(e){e!==this._underline&&(this._underline=e,this.update())}},backOpaque:{get:function(){return this._backOpaque},set:function(e){e!==this._backOpaque&&(this._backOpaque=e,this.update())}},strikeout:{get:function(){return this._strikeout},set:function(e){e!==this._strikeout&&(this._strikeout=e,this.update())}},borderSpacingWidth:{get:function(){return this._borderSpacingWidth},set:function(e){e!==this._borderSpacingWidth&&(this._borderSpacingWidth=e,this.update())}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){e!==this._outlineWidth&&(this._outlineWidth=e,this.update())}},fontWidth:{get:function(){return this._fontWidth},set:function(e){e!==this._fontWidth&&(this._fontWidth=e,this.update())}},opaqueRate:{get:function(){return this._opaqueRate},set:function(e){e!==this._opaqueRate&&(this._opaqueRate=e,this.update())}},stringAlignment:{get:function(){return this._stringAlignment},set:function(e){e!==this._stringAlignment&&(this._stringAlignment=e,this.update())}},text3DScale:{get:function(){return this._text3DScale},set:function(e){e!==this._text3DScale&&(this._text3DScale=e,this.update())}},fontWeight:{get:function(){return this._fontWeight},set:function(e){e!==this._fontWeight&&(this._fontWeight=e,this.update())}},fontSize:{get:function(){return this._fontSize},set:function(e){e!==this._fontSize&&(this._fontSize=e,this._fontHeight=25.4*e/96,this.update())}},textBoxColor:{get:function(){return this._textBoxColor},set:function(e){e!==this._textBoxColor&&(this._textBoxColor=e,this.update())}},textBoxLineColor:{get:function(){return this._textBoxLineColor},set:function(e){e!==this._textBoxLineColor&&(this._textBoxLineColor=e,this.update())}},isShowTextBox:{get:function(){return this._isShowTextBox},set:function(e){e!==this._isShowTextBox&&(this._isShowTextBox=e,this.update())}}}),_0x34d1aa.prototype.update=function(){this._graphicObject&&(this._graphicObject._initialize=!1,this._graphicObject._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this._graphicObject))};var _0x38cb4d=(_0x45cbfd=!0,function(e,t){var i=_0x45cbfd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45cbfd=!1,i}),_0x51c58b=_0x38cb4d(void 0,(function(){return _0x51c58b.toString().search("(((.+)+)+)+$").toString().constructor(_0x51c58b).search("(((.+)+)+)+$")})),_0x45cbfd;_0x51c58b();var _0x1fb934={LeftUp:0,LeftDown:1,RightUp:2,RightDown:3,Up:4,Down:5,Left:6,Right:7,Middle:8},_0x4c2bdd=Object.freeze(_0x1fb934),_0x4515fb=(_0x4c4679=!0,function(e,t){var i=_0x4c4679?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c4679=!1,i}),_0x265de0=_0x4515fb(void 0,(function(){return _0x265de0.toString().search("(((.+)+)+)+$").toString().constructor(_0x265de0).search("(((.+)+)+)+$")})),_0x4c4679;_0x265de0();var _0x490e97={Vector:0,Grid:1,Marker:2,Picture:3,Unkown:4},_0x4e5d29=Object.freeze(_0x490e97),_0x202964=(_0x3050a1=!0,function(e,t){var i=_0x3050a1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3050a1=!1,i}),_0x596b4b=_0x202964(void 0,(function(){return _0x596b4b.toString().search("(((.+)+)+)+$").toString().constructor(_0x596b4b).search("(((.+)+)+)+$")})),_0x3050a1;function _0x2d6822(){}_0x596b4b(),_0x2d6822.clearNextSamePts=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)&&this.equalFuzzy(e[i].z,e[i+1].z)?(e.splice(i,1),t--):i++;return e},_0x2d6822.clearNextSamePtsXY=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)?(e.splice(i,1),t--):i++;return e},_0x2d6822.clearSamePts=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)&&this.equalFuzzy(e[i].z,e[i+1].z)?(e.splice(i,1),t--):i++;return e},_0x2d6822.clearSamePtsXY=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)?(e.splice(i,1),t--):i++;return e},_0x2d6822.equalFuzzy=function(e,t,i){return WebGLPlot$f.defined(i)||(i=1e-31),Math.abs(e-t)<=i},_0x2d6822.distance=function(e,t){return WebGLPlot$f.defined(e)&&WebGLPlot$f.defined(t)?Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)):0},_0x2d6822.distance3D=function(e,t){return WebGLPlot$f.defined(e)&&WebGLPlot$f.defined(t)?Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)+(e.z-t.z)*(e.z-t.z)):0},_0x2d6822.isRight=function(e,t,i){var n=t,r=i,o=t,a=e;return(r.x-n.x)*(a.y-o.y)-(a.x-o.x)*(r.y-n.y)<0},_0x2d6822.isPloyClockwise=function(e){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),i=t.length;if(!(i<3)){var n=t[0].y*(t[i-1].x-t[1].x);t.push(t[0].clone());for(var r=1;r<i;++r)n+=t[r].y*(t[r-1].x-t[r+1].x);return!(n>0)}},_0x2d6822.parallel=function(e,t){var i=[];if(!WebGLPlot$f.defined(e)||e.length<2)return i;var n=!1;e.length>3&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y&&e[0].z===e[e.length-1].z&&(n=!0),n?(i[0]=this.findBisectorPoint(e[e.length-2],e[0],e[1],t),i[e.length-1]=i[0]):(i[0]=this.findPoint(e[0],e[1],t,90),i[e.length-1]=this.findPoint(e[e.length-1],e[e.length-2],-t,90));for(var r=e[0],o=e[1],a=e[1],s=1;s<e.length-1;++s)if(o=e[s],e[s]!==e[s-1]&&(r=e[s-1]),e[s]!==e[s+1]){a=e[s+1];var l=this.findBisectorPoint(r,o,a,t);this.isCross(r,i[s-1],o,l)&&(l=i[s-1]),i[s]=l}return i},_0x2d6822.isCross=function(e,t,i,n){var r=new _0x11ff81(0,0,0);return!(!this.intersectLineSegs(e,t,i,n,r)||r===e||r===t||r===i||r===n)},_0x2d6822.intersectLineSegs=function(e,t,i,n,r){if(this.equalFuzzy(e.x,t.x)&&this.equalFuzzy(e.y,t.y)&&this.equalFuzzy(e.z,t.z))return r.x=e.x,r.y=e.y,!1;if(this.equalFuzzy(i.x,n.x)&&this.equalFuzzy(i.y,n.y)&&this.equalFuzzy(i.z,n.z))return r.x=i.x,r.y=i.y,!1;var o=1e-16,a=0,s=0;if(a=e.x>t.x?e.x:t.x,s=e.x<t.x?e.x:t.x,i.x-a>o&&n.x-a>o||i.x-s<-1e-16&&n.x-s<-1e-16||(a=e.y>t.y?e.y:t.y,s=e.y<t.y?e.y:t.y,i.y-a>o&&n.y-a>o||i.y-s<-1e-16&&n.y-s<-1e-16))return!1;var l=t.x-e.x,u=t.y-e.y,c=n.x-i.x,h=n.y-i.y,d=e.x-i.x,f=e.y-i.y,p=l*h-c*u,_=p;if(Math.abs(l)>1e-31&&Math.abs(c)>1e-31&&(_/=l*c),Math.abs(_)<1e-31)return e===i?(r.x=e.x,r.y=e.y,!this.isSameQuadrant(e,t,i,n)):t===n?(r.x=t.x,r.y=t.y,!this.isSameQuadrant(e,t,i,n)):e===n?(r.x=e.x,r.y=e.y,this.isSameQuadrant(e,t,i,n)):t===i&&(r.x=t.x,r.y=t.y,this.isSameQuadrant(e,t,i,n));var m=(l*f-u*d)/p,g=(c*f-h*d)/p;return!(m<0&&(Math.abs(m*c)>o||Math.abs(m*h)>o)||m>1&&(Math.abs((m-1)*c)>o||Math.abs((m-1)*h)>o)||g<0&&(Math.abs(g*l)>o||Math.abs(g*u)>o)||g>1&&(Math.abs((g-1)*l)>o||Math.abs((g-1)*u)>o))&&(Math.abs(m)<1e-31?(r.x=i.x,r.y=i.y,!0):Math.abs(m-1)<1e-31?(r.x=n.x,r.y=n.y,!0):Math.abs(g)<1e-31?(r.x=e.x,r.y=e.y,!0):Math.abs(g-1)<1e-31?(r.x=t.x,r.y=t.y,!0):!(m<0&&(Math.abs(m*c)>o||Math.abs(m*h)>o)||m>1&&(Math.abs((m-1)*c)>o||Math.abs((m-1)*h)>o)||g<0&&(Math.abs(g*l)>o||Math.abs(g*u)>o)||g>1&&(Math.abs((g-1)*l)>o||Math.abs((g-1)*u)>o))&&(r.x=m*c+i.x,r.y=m*h+i.y,!0))},_0x2d6822.plumbLineLen=function(e,t,i){return this.distance(e,t)*Math.sin(this.innerAngle(t,e,i))},_0x2d6822.innerAngle=function(e,t,i){if(e===t||e===i)return 0;var n=this.distance(e,t),r=this.distance(e,i),o=this.distance(t,i),a=(n*n+r*r-o*o)/(2*n*r);return a>1&&this.equalFuzzy(a,1)?a=1:a<1&&this.equalFuzzy(a,-1)&&(a=-1),Math.acos(a)},_0x2d6822.isSameQuadrant=function(e,t,i,n){var r=(t.x-e.x)*(n.x-i.x),o=(t.y-e.y)*(n.y-i.y);return!(Math.abs(r)<1e-31&&Math.abs(o)<1e-31)&&((r>0||Math.abs(r)<1e-31)&&(o>0||Math.abs(o)<1e-31))},_0x2d6822.findPoint=function(e,t,i,n){if(e===t||Math.abs(i)<1e-31)return e;var r=this.radian(e,t)+n*Math.PI/180;return new _0x11ff81(e.x+i*Math.cos(r),e.y+i*Math.sin(r),e.z)},_0x2d6822.LinePnt=function(e,t,i){var n=_0x2d6822.distance(e,t);if(0===n)return e;var r=i/n;return _0x2d6822.FindPointOnLineByRatio(r,e,t)},_0x2d6822.FindPointOnLineByRatio=function(e,t,i){var n=new _0x11ff81(0,0,0);return n.x=t.x+(i.x-t.x)*e,n.y=t.y+(i.y-t.y)*e,n.z=t.z+(i.z-t.z)*e,n},_0x2d6822.getPolygonCenterPt=function(e){if(!e||null===e||0===e.length)return null;for(var t=0,i=0,n=0,r=0;r<e.length;r++)t+=e[r].x,i+=e[r].y,n+=e[r].z;return new _0x11ff81(t/e.length,i/e.length,n/e.length)},_0x2d6822.findBisectorPoint=function(e,t,i,n){var r=this.radian(t,e),o=(r+this.radian(t,i))/2,a=Math.cos(o-r+Math.PI/2),s=n;return this.isNear(a,.15)||(s=n/a),new _0x11ff81(t.x+s*Math.cos(o),t.y+s*Math.sin(o),t.z)},_0x2d6822.rotateAngle=function(e,t,i){var n=new _0x11ff81(0,0,0),r=t,o=Math.cos(r),a=Math.sin(r),s=i.x-e.x,l=i.y-e.y,u=i.z-e.z;return n.x=s*o-l*a+e.x,n.y=s*a+l*o+e.y,n.z=u*a+u*o+e.z,n},_0x2d6822.calcCirclePts=function(e,t,i){WebGLPlot$f.defined(i)||(i=72);for(var n=[],r=360/i,o=0;o<i-1;++o){var a=WebGLPlot$f.CesiumMath.toRadians(o*r);n.push(new _0x11ff81(t.x+e*Math.cos(a),t.y+e*Math.sin(a),t.z))}return n.push(n[0].clone()),n},_0x2d6822.circlePoint=function(e,t,i,n){return n*=Math.PI/180,new _0x11ff81(e.x+t*Math.cos(n),e.y+i*Math.sin(n),0)},_0x2d6822.generateBezierCtrlPts=function(e){var t=[],i=e.length;if(i<3)for(var n=0;n!=i;++n)t[n]=e[n].clone();else{var r=0;for(n=0;n<3*i-2;n+=3)"function"==typeof e[r].clone?t[n]=e[r].clone():t[n]=new _0x11ff81(e[r].x,e[r].y,e[r].z),t[n+1]=new _0x11ff81(0,0,e[r].z),t[n+2]=new _0x11ff81(0,0,e[r].z),r++;for(n=1;n<i-1;++n)this.generateTrianglePoints(8,3,e[n-1],e[n],e[n+1],t[3*n-1],t[3*n+1]);this.getTrapezoidPoints(.6,t[0],t[3],t[2],t[1]),this.getTrapezoidPoints(.6,t[3*i-3],t[3*i-6],t[3*i-5],t[3*i-4]),"function"==typeof e[i-1].clone?t[3*i-1]=t[3*i-2]=e[i-1].clone():t[3*i-1]=t[3*i-2]=new _0x11ff81(e[i-1].x,e[i-1].y,e[i-1].z)}return t},_0x2d6822.generateBezierPointsWithCtrlPts=function(e){var t=e.length,i=[];if(e.length<3)for(var n=0;n<t;++n)i[n]=e[n].clone();else{t/=3;for(n=0;n<3*t&&!(n+4>=3*t);n+=3){var r=e[n].x,o=e[n].y,a=e[n].z,s=e[n+1].x,l=e[n+1].y,u=e[n+1].z,c=e[n+2].x,h=e[n+2].y,d=e[n+2].z,f=e[n+3].x,p=e[n+3].y,_=e[n+3].z;if(this.equalFuzzy(r,s,1e-10)&&this.equalFuzzy(o,l,1e-10)&&this.equalFuzzy(c,f,1e-10)&&this.equalFuzzy(h,p,1e-10))i.push(new _0x11ff81(r,o,a)),i.push(new _0x11ff81(c,h,d));else for(var m=0;m<=1;m+=.03125){var g,x,v,y,$=m*m,b=$*m,T=new _0x11ff81((g=1-3*m+3*$-b)*r+(x=3*(m-2*$+b))*s+(v=3*($-b))*c+(y=b)*f,g*o+x*l+v*h+y*p,g*a+x*u+v*d+y*_);i.push(T)}}}return i},_0x2d6822.generateBeizerPointsNoCtrlPt=function(e){var t=_0x2d6822.generateBezierCtrlPts(e);return _0x2d6822.generateBezierPointsWithCtrlPts(t)},_0x2d6822.generateBezierPtsWithScalePts=function(e,t,i,n){var r=[],o=e.x,a=e.y,s=t.x,l=t.y,u=i.x,c=i.y,h=n.x,d=n.y;if(this.equalFuzzy(o,s,1e-10)&&this.equalFuzzy(a,l,1e-10)&&this.equalFuzzy(u,h,1e-10)&&this.equalFuzzy(c,d,1e-10))r.push(new _0x11ff81(o,a,0)),r.push(new _0x11ff81(u,c,0));else for(var f=0;f<=1;f+=.03125){var p,_,m,g,x=f*f,v=x*f,y=new _0x11ff81((p=1-3*f+3*x-v)*o+(_=3*(f-2*x+v))*s+(m=3*(x-v))*u+(g=v)*h,p*a+_*l+m*c+g*d,0);r.push(y)}return r},_0x2d6822.generateTrianglePoints=function(e,t,i,n,r,o,a){var s=i.x,l=i.y,u=i.z,c=n.x,h=n.y,d=n.z,f=r.x,p=r.y,_=r.z;this.getPointsByTriangle(e,t,s,l,u,c,h,d,f,p,_,o,a)},_0x2d6822.getPointsByTriangle=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=o+(l-i),p=a+(u-n),_=0,m=0;if(i==l)_=i,m=p;else if(n==u)_=f,m=n;else{var g=1*(u-n)/(l-i),x=n-i*g;m=g*(_=(p+f/g-x)/(g+1/g))+x}var v=Math.sqrt(1*(o-f)*(o-f)+1*(a-p)*(a-p)),y=Math.sqrt(1*(i-o)*(i-o)+1*(n-a)*(n-a)),$=Math.sqrt(1*(o-l)*(o-l)+1*(a-u)*(a-u)),b=0;f=_+(f-_)*(b=y+$?1+($-y)*e/($+y):1),p=m+(p-m)*b,0==v&&(v=1),h.x=o+(o-f)*y/(t*v),h.y=a+(a-p)*y/(t*v),h.z=r,d.x=o+(f-o)*$/(t*v),d.y=a+(p-a)*$/(t*v),d.z=c},_0x2d6822.getPtsByTriangle=function(e,t,i,n,r){var o=new _0x11ff81(0,0,0);new _0x11ff81(0,0,0);var a=0,s=0;return a=this.distance(r,i),s=this.distance(n,r),1==t&&(a*=2),2==t&&(s*=2),o.x=(a*n.x+s*i.x)/(a+s),o.y=(a*n.y+s*i.y)/(a+s),{pl:this.getWhichPtOfNormal(e,i,o,r),pr:this.getWhichPtOfNormal(e,n,o,r)}},_0x2d6822.getWhichPtOfNormal=function(e,t,i,n){new _0x11ff81(0,0,0),new _0x11ff81(0,0,0);var r=0;r=this.distance(n,t)/e;var o=this.getPointsOfNormal(r,i,n);return this.distance(t,o.pt4)>=(r=this.distance(t,o.pt3))?o.pt3:o.pt4},_0x2d6822.getTrapezoidPoints=function(e,t,i,n,r){var o=t.x,a=t.y,s=t.z,l=i.x,u=i.y,c=i.z,h=n.x,d=n.y,f=n.z;this.getPointsByTrapezoid(e,o,a,s,l,u,c,h,d,f,r)},_0x2d6822.getPointsByTrapezoid=function(e,t,i,n,r,o,a,s,l,u,c){var h=0,d=0,f=0,p=0;if(0===Math.abs(i-o))h=t+r-s,d=l;else if(0==Math.abs(t-r))h=s,d=i+o-l;else{var _=1*(i-o)/(t-r),m=l-_*s;d=_*(h=((o+i)/2+(t+r)/(2*_)-m)/(_+1/_))+m,h=2*h-s,d=2*d-l}var g=Math.sqrt(1*(t-r)*(t-r)+1*(i-o)*(i-o)),x=Math.sqrt(1*(t-h)*(t-h)+1*(i-d)*(i-d));return g>0?(f=t+(r-t)*x/g,p=i+(o-i)*x/g):(f=t,p=i),c.x=f+(h-f)*e,c.y=p+(d-p)*e,c.z=u,c},_0x2d6822.generateArcInfo=function(e,t,i){var n={};n.pntCenter=new _0x11ff81(0,0,0),n.dRadius=0,n.dStartAngle=0,n.dEndAngle=0;var r=t.x-e.x,o=t.y-e.y;if(Math.abs(r)<1e-31){var a={};(l={}).x=(t.x+e.x)/2,l.y=(t.y+e.y)/2,a.x=(t.x+i.x)/2,a.y=(t.y+i.y)/2;var s=0;Math.abs(i.x-t.x)>=1e-31&&(s=(i.y-t.y)/(i.x-t.x)),n.pntCenter.y=l.y,Math.abs(s)<1e-31?n.pntCenter.x=a.x:n.pntCenter.x=a.x-s*(l.y-a.y)}else{var l;a={};(l={}).x=(t.x+e.x)/2,l.y=(t.y+e.y)/2,a.x=(t.x+i.x)/2,a.y=(t.y+i.y)/2;var u=o/r,c=1;Math.abs(u)<1e-31?(n.pntCenter.x=l.x,Math.abs(i.x-t.x<1e-31)?n.pntCenter.y=a.y:n.pntCenter.y=-(i.x-t.x)/(i.y-t.y)*(n.pntCenter.x-a.x)+a.y):Math.abs(i.x-t.x)<1e-31?(n.pntCenter.y=a.y,n.pntCenter.x=-u*(n.pntCenter.y-l.y)+l.x):(c=(i.y-t.y)/(i.x-t.x),n.pntCenter.x=(u*c*(l.y-a.y)+c*l.x-u*a.x)/(c-u),n.pntCenter.y=(a.x-l.x+c*a.y-u*l.y)/(c-u))}var h=Math.atan2(e.y-n.pntCenter.y,e.x-n.pntCenter.x),d=Math.atan2(i.y-n.pntCenter.y,i.x-n.pntCenter.x);if(this.isCounterClockwise(e,t,i)){for(;h>=2*Math.PI;)h-=2*Math.PI;for(;h<0;)h+=2*Math.PI;for(;d>2*Math.PI;)d-=2*Math.PI;for(;d<h;)d+=2*Math.PI}else{for(;d>=2*Math.PI;)d-=2*Math.PI;for(;d<0;)d+=2*Math.PI;for(;h>2*Math.PI;)h-=2*Math.PI;for(;d>h;)h+=2*Math.PI;var f=h;h=d,d=f}return n.dRadius=Math.sqrt((n.pntCenter.x-e.x)*(n.pntCenter.x-e.x)+(n.pntCenter.y-e.y)*(n.pntCenter.y-e.y)),n.dEndAngle=180*d/Math.PI,n.dStartAngle=180*h/Math.PI,n},_0x2d6822.isCounterClockwise=function(e,t,i){return(i.x-t.x)*(e.y-t.y)-(e.x-t.x)*(i.y-t.y)>0},_0x2d6822.generateArcSpatialData=function(e,t,i,n,r,o,a){WebGLPlot$f.defined(a)||(a=36);var s=(o-r)/a,l=[];if(Math.abs(s)<1e-31)return l;for(;o<r;)o+=2*Math.PI;for(;o>r+2*Math.PI;)r+=2*Math.PI;var u=Math.cos(n)*t,c=Math.sin(n)*t,h=Math.cos(n)*i,d=Math.sin(n)*i,f=this.calcEllipseRadian(r,t,i),p=this.calcEllipseRadian(o,t,i);p-f<1e-31&&(p+=2*Math.PI);var _=Math.round(Math.abs((p-f)/s)+1);if(_<2)return l;for(var m=0;m<_-1;f+=s,m++){m===_-2&&(f=o);var g=e.x+u*Math.cos(f)-d*Math.sin(f),x=e.y+c*Math.cos(f)+h*Math.sin(f);l.push(new _0x11ff81(g,x,0))}return 0>l.length&&(l[l.length-1].x=e.x+u*Math.cos(p)-d*Math.sin(p),l[l.length-1].y=e.y+c*Math.cos(p)+h*Math.sin(p)),l},_0x2d6822.calcEllipseRadian=function(e,t,i){var n=e,r=t*Math.sin(e),o=i*Math.cos(e),a=Math.atan2(r,o);if(e>Math.PI)for(;n>Math.PI;)n-=2*Math.PI,a+=2*Math.PI;else if(e<-Math.PI)for(;n<-Math.PI;)n+=2*Math.PI,a-=2*Math.PI;return a},_0x2d6822.radian=function(e,t){var i=0,n=t.x-e.x,r=t.y-e.y;return(i=Math.atan2(r,n))<0&&(i+=2*Math.PI),i},_0x2d6822.intersectLines=function(e,t,i,n){var r={isIntersectLines:!1};if(e.x===t.x&&e.y===t.y||i.x===n.x&&i.y===n.y)return r;var o=t.x-e.x,a=t.y-e.y,s=n.x-i.x,l=n.y-i.y,u=o*l-s*a;if(this.isNear(u))return r;var c=(o*(e.y-i.y)-a*(e.x-i.x))/u,h=new _0x11ff81(0,0,0);return h.x=c*s+i.x,h.y=c*l+i.y,h.z=e.z,r.isIntersectLines=!0,r.intersectPoint=h,r},_0x2d6822.isNear=function(e,t){return t||(t=1e-31),e<t&&e>-t},_0x2d6822.calcKidneyShapePts=function(e){var t=[],i=[],n=e.length;if(0!==n){if(1===n)return void t.push(e[0]);if(2===n){var r=this.calcProtudeC3(e[0],e[1]);i.push(e[0]),i.push(e[1]),i.push(r)}else if(i.push(e[0]),i.push(e[1]),i.push(e[2]),(this.isSamePt(e[0],e[2])||this.isSamePt(e[1],e[2]))&&(t.push(e[0]),t.push(e[1])),this.isSamePt(e[0],e[1]))return t.push(e[0]),void t.push(e[2]);i=this.reNormalizeKidneyCtrlPoints(i);var o=new _0x11ff81(0,0,0),a=new _0x11ff81(0,0,0);o.x=.5*(i[0].x+i[1].x),o.y=.5*(i[0].y+i[1].y),a.x=o.x-.1*(i[2].x-o.x),a.y=o.y-.1*(i[2].y-o.y);var s=this.getPtsByTriangle(3,0,i[1],i[0],a);t.push(s.pr),t.push(a),t.push(s.pl);var l=this.getPtsByTriangle(4,2,i[2],i[0],i[1]);t.push(l.pr),t.push(i[1]),t.push(l.pl);var u=this.getPtsByTriangle(2,0,i[0],i[1],i[2]);t.push(u.pr),t.push(i[2]),t.push(u.pl);var c=this.getPtsByTriangle(4,1,i[1],i[2],i[0]);return t.push(c.pr),t.push(i[0]),t.push(c.pl),t}},_0x2d6822.generateKidneyShapePts=function(e){var t=[];if(2>e.length)return t;var i=this.calcKidneyShapePts(e);if(12!=i.length)return t;i.push(i[0]),i.push(i[1]),i.splice(0,1);for(var n=0;n<i.length-3;n+=3){var r;i.slice(n,n+4),r=this.generateBezierPtsWithScalePts(i[n],i[n+1],i[n+2],i[n+3]),t=t.concat(r)}return t},_0x2d6822.calcProtudeC3=function(e,t){var i,n=new _0x11ff81(0,0,0);return n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y),i=_0x2d6822.distance(t,e)/2.7,this.getPointsOfNormal(i,e,n).pt3},_0x2d6822.getPointsOfNormal=function(e,t,i){var n,r=new _0x11ff81(0,0,0),o=new _0x11ff81(0,0,0),a=new _0x11ff81(0,0,0);return 0==(n=this.distance(t,i))?(a.y=0,a.x=e):(a.x=e*(t.x-i.x)/n,a.y=e*(t.y-i.y)/n),r.x=-a.y+i.x,r.y=a.x+i.y,o.x=a.y+i.x,o.y=-a.x+i.y,{pt3:r,pt4:o}},_0x2d6822.isSamePt=function(e,t){return!!(this.equalFuzzy(e.x,t.x)&&this.equalFuzzy(e.y,t.y)&&this.equalFuzzy(e.z,t.z))},_0x2d6822.reNormalizeKidneyCtrlPoints=function(e){var t=[];t.push(new _0x11ff81(0,0,0)),t.push(new _0x11ff81(0,0,0)),t.push(new _0x11ff81(0,0,0));var i=e.length;if(!(i<2)){if(2==i)t[0]=e[0],t[1]=e[1],t[2]=this.calcProtudeC3(e[0],e[1]);else{var n,r,o,a=e[0],s=e[1],l=e[2];if(n=this.distance(s,a),r=this.distance(l,s),o=this.distance(a,l),r>=n&&r>=o){var u=a.clone();a=l.clone(),l=u.clone()}else if(o>=n&&o>=r){u=l.clone();l=s.clone(),s=u.clone()}if(!this.isRight(l,a,s)){u=a.clone();a=s.clone(),s=u.clone()}t[0]=a,t[1]=s,t[2]=l}return t}},_0x2d6822.pointIsRightToVerticle=function(e,t,i){var n=new WebGLPlot$f.Cartesian2(.5*(t.x+e.x),.5*(t.y+e.y)),r=new WebGLPlot$f.Cartesian2(t.x-e.x,t.y-e.y),o=new WebGLPlot$f.Cartesian2(i.x-n.x,i.y-n.y);return r.x*o.x+r.y*o.y>0},_0x2d6822.StringtoColor=function(e){if(e.length){var t;t=e.length<8?1:parseInt(e.slice(7,9),16)/255;var i=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255;return new WebGLPlot$f.Color(i,n,r,t)}return e},_0x2d6822.getPosition=function(e,t){if(WebGLPlot$f.defined(t)){var i=void 0,n=e.pickPosition(t);if(n){var r=WebGLPlot$f.Cartographic.fromCartesian(n);i=new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(r.longitude),WebGLPlot$f.CesiumMath.toDegrees(r.latitude),r.height<-1e4?0:r.height)}else if(n=e.camera.pickEllipsoid(t,e.globe.ellipsod)){r=WebGLPlot$f.Cartographic.fromCartesian(n);i=new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(r.longitude),WebGLPlot$f.CesiumMath.toDegrees(r.latitude),r.height)}return void 0===i||NaN===i.x||NaN===i.y||NaN===i.z?new WebGLPlot$f.Cartesian3:i}},_0x2d6822.getPosition2=function(e,t){if(!WebGLPlot$f.defined(t))return;let i=e.camera.pickEllipsoid(t,e.globe.ellipsod);var n=WebGLPlot$f.Cartographic.fromCartesian(i);const r=new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(n.longitude),WebGLPlot$f.CesiumMath.toDegrees(n.latitude),1);return void 0===r||NaN===r.x||NaN===r.y||NaN===r.z?new WebGLPlot$f.Cartesian3:r},_0x2d6822.getSurroundLinePts=function(e,t){var i=[],n=[];t*=_0x2d6822.innerOutlineDir(e);for(var r=0;r<e.length-1;r++){var o,a,s=[];if(!_0x2d6822.equalFuzzy(e[r].x,e[r+1].x)||!_0x2d6822.equalFuzzy(e[r].y,e[r+1].y)){s.push(e[r]),s.push(e[r+1]);var l=_0x2d6822.parallel(s,t);if(o=l[0],a=l[1],0!=i.length){var u=_0x2d6822.intersectLines(o,a,i[0],i[1]);if(u.isIntersectLines){var c=u.intersectPoint,h=_0x2d6822.distance(o,a);_0x2d6822.distance(c,a)>2*h||(n[n.length-1]=c),n.push(a)}else n.push(a)}else n.push(o),n.push(a);(i=[]).push(n[n.length-2]),i.push(n[n.length-1])}}if(e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y&&e[0].z===e[e.length-1].z&&1<n.length){var d=_0x2d6822.intersectLines(n[0],n[1],n[n.length-2],n[n.length-1]);if(d.isIntersectLines){var f=d.intersectPoint;n[n.length-1]=f,n[0]=f}}return n},_0x2d6822.innerOutlineDir=function(e){function t(e,t){function i(e){var t=Math.atan2(e.y,e.x);return t<0&&(t+=2*Math.PI),t}var n=i(t)-i(e);return n<-Math.PI&&(n+=2*Math.PI),n>Math.PI&&(n-=2*Math.PI),n}if((e=_0x2d6822.clearNextSamePts(e)).length<3)return 1;for(var i=0,n={x:0,y:0},r={x:0,y:0},o=2;o<e.length;o++)r.x=e[o].x-e[o-1].x,r.y=e[o].y-e[o-1].y,n.x=e[o-1].x-e[o-2].x,n.y=e[o-1].y-e[o-2].y,i+=t(n,r);return r.x=e[1].x-e[0].x,r.y=e[1].y-e[0].y,n.x=e[0].x-e[e.length-1].x,n.y=e[0].y-e[e.length-1].y,(i+=t(n,r))>=0?-1:1},_0x2d6822.isSpecialHeightSymbol=function(e,t){if(22===e)switch(t){case 1001:case 1002:case 1003:case 1004:case 1006:case 1007:case 1009:case 1011:return!0}return 50308===t||26400===t},_0x2d6822.isCanFill=function(e){if(!WebGLPlot$f.defined(e)||_0x18bc2f.SYMBOL_ALGO!==e.symbolType)return!1;switch(e.code){case 1001:case 1002:case 1003:case 1004:case 1006:case 1011:case 25200:return!0}return!1},_0x2d6822.isSymbolCellCanFill=function(e){return _0x18bc2f.SYMBOL_CHORD===e.type||_0x18bc2f.SYMBOL_ARBITRARYPOLYGON===e.type||_0x18bc2f.SYMBOL_POLYBEZIERCLOSED===e.type||_0x18bc2f.SYMBOL_PIE===e.type||_0x18bc2f.SYMBOL_CIRCLE===e.type||_0x18bc2f.SYMBOL_RECTANGLE===e.type||_0x18bc2f.SYMBOL_PARALLELOGRAM===e.type||_0x18bc2f.SYMBOL_ELLIPSE===e.type||_0x18bc2f.SYMBOL_TRAPEZOID===e.type||_0x18bc2f.SYMBOL_KIDNEY===e.type||_0x18bc2f.SYMBOL_REGULARPOLYGON===e.type||_0x18bc2f.SYMBOL_COMBINATIONALCIRCLE===e.type||_0x18bc2f.SYMBOL_CIRCLECHORD===e.type||_0x18bc2f.SYMBOL_CIRCLEPIE===e.type},_0x2d6822.getSpaceDistance=function(e,t){var i=WebGLPlot$f.Cartesian3.fromDegrees(e.x,e.y,e.z),n=WebGLPlot$f.Cartesian3.fromDegrees(t.x,t.y,t.z),r=WebGLPlot$f.Cartographic.fromCartesian(i),o=WebGLPlot$f.Cartographic.fromCartesian(n),a=new WebGLPlot$f.EllipsoidGeodesic;return a.setEndPoints(r,o),a.surfaceDistance},_0x2d6822.getSpaceDistanceByCartesian=function(e,t){var i=WebGLPlot$f.Cartographic.fromCartesian(e),n=WebGLPlot$f.Cartographic.fromCartesian(t),r=new WebGLPlot$f.EllipsoidGeodesic;return r.setEndPoints(i,n),r.surfaceDistance},_0x2d6822.intersectionOfRectByPointslopeline=function(e,t,i){var n=new WebGLPlot$f.Cartesian2,r=new WebGLPlot$f.Cartesian2;if(-1==t)n.x=e.x,n.y=i.bottom,r.x=e.x,r.y=i.top;else if(0==t)n.x=i.left,n.y=e.y,r.x=i.right,r.y=e.y;else{var o=0,a=[];if((l=t*((u=i.left)-e.x)+e.y)>i.bottom&&l<i.top&&(a[2*o]=u,a[2*o+1]=l,o++),(l=t*((u=i.right)-e.x)+e.y)>i.bottom&&l<i.top&&(a[2*o]=u,a[2*o+1]=l,o++),o<2){var s=-1/t;l=i.bottom,(u=e.x-s*(l-e.y))>i.left&&u<i.right&&(a[2*o]=u,a[2*o+1]=l,o++)}if(o<2){s=-1/t;var l=i.top,u=e.x-s*(l-e.y);o<2&&u>i.left&&u<i.right&&(a[2*o]=u,a[2*o+1]=l,o++)}n.x=a[0],n.y=a[1],r.x=a[2],r.y=a[3]}return[n,r]},_0x2d6822.ptIsInPolygon=function(e,t){if(!e||0===e.length)return!1;for(var i=0,n=e.length,r=0;r<n;r++){var o=e[r],a=e[(r+1)%n];if(o.y!==a.y){var s=o.y<a.y?o.y:a.y,l=o.y>a.y?o.y:a.y;if(!(t.y<s||t.y>l))(t.y-o.y)*(a.x-o.x)/(a.y-o.y)+o.x>t.x&&i++}}return i%2==1},_0x2d6822.pixelDisToRealDis=function(e,t,i){var n=WebGLPlot$f.Cartesian3.fromDegrees(t.x,t.y,t.z),r=WebGLPlot$f.SceneTransforms.wgs84ToWindowCoordinates(e,n);if(!WebGLPlot$f.defined(r))return 0;var o=new WebGLPlot$f.Cartesian2(r.x+i,r.y),a=_0x2d6822.getPosition(e,r),s=_0x2d6822.getPosition(e,o);return _0x2d6822.distance(a,s)},_0x2d6822.computeMatrix=function(e,t,i){var n=WebGLPlot$f.Cartesian3.fromDegrees(e.x,e.y,e.z),r=new WebGLPlot$f.HeadingPitchRoll,o=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west");i||(i=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot$f.Ellipsoid.WGS84,o));var a=Math.PI/180;return r.pitch=a*t.x,r.roll=a*t.y,r.heading=a*t.z,WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot$f.Ellipsoid.WGS84,o,i),i},_0x2d6822.computeMatrix2=function(e,t,i){var n=new WebGLPlot$f.HeadingPitchRoll,r=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west");i||(i=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(e,n,WebGLPlot$f.Ellipsoid.WGS84,r));var o=Math.PI/180;return n.pitch=o*t.x,n.roll=o*t.y,n.heading=o*t.z,WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(e,n,WebGLPlot$f.Ellipsoid.WGS84,r,i),i},_0x2d6822.Cross=function(e,t){return e.x*t.y-e.y*t.x},_0x2d6822.IsClockwise=function(e){for(var t=0,i=0,n=1,r=2;i<e.length;i++,n++,r++){n>=e.length&&(n-=e.length),r>=e.length&&(r-=e.length);var o=new WebGLPlot$f.Cartesian2(e[n].x-e[i].x,e[n].y-e[i].y),a=new WebGLPlot$f.Cartesian2(e[r].x-e[n].x,e[r].y-e[n].y);_0x2d6822.Cross(o,a)>=0?t++:t--}return t>=0},_0x2d6822.Resolve=function(e){var t=[];if(e.length<3)return null;for(var i=_0x2d6822.IsClockwise(e),n=[],r=0;r<e.length;r++){var o={point:e[r],index:r,isConvex:!1,isSeparable:!1};i?n.push(o):n.unshift(o)}for(var a=[],s=0;s<n.length;s++)_0x2d6822.UpdatePointStatus(n[s],n,s),n[s].isSeparable&&a.unshift({Value:n[s],Array:n,ArrayIndex:s});for(;n.length>=3;){if(0===a.length)return null;var l=a[0];a.shift();var u={Array:l.Array,ArrayIndex:WebGLPlot$f.defined(l.Array[l.ArrayIndex-1])?l.ArrayIndex-1:l.Array.length-1},c={Array:l.Array,ArrayIndex:WebGLPlot$f.defined(l.Array[l.ArrayIndex+1])?l.ArrayIndex+1:0},h=WebGLPlot$f.defined(l.Array[l.ArrayIndex])?l.Array[l.ArrayIndex]:l.Array[0],d=u.Array[u.ArrayIndex],f=c.Array[c.ArrayIndex];if(n.splice(l.ArrayIndex,1),t.push(h.index),t.push(d.index),t.push(f.index),d.isSeparable){if(_0x2d6822.UpdatePointStatus(d,u.Array,u.ArrayIndex),!d.isSeparable){var p=a.indexOf(u);a.splice(p,1)}}else _0x2d6822.UpdatePointStatus(d,u.Array,u.ArrayIndex),d.isSeparable&&a.unshift(u);if(f.isSeparable){if(_0x2d6822.UpdatePointStatus(f,c.Array,c.ArrayIndex),!f.isSeparable){p=a.indexOf(c);a.splice(p,1)}}else _0x2d6822.UpdatePointStatus(f,c.Array,c.ArrayIndex),f.isSeparable&&a.unshift(c)}return t},_0x2d6822.UpdatePointStatus=function(e,t,i){var n=WebGLPlot$f.defined(t[i-1])?t[i-1]:t[t.length-1],r=WebGLPlot$f.defined(t[i+1])?t[i+1]:t[0];if(!e.isConvex){var o=new WebGLPlot$f.Cartesian2,a=new WebGLPlot$f.Cartesian2;if(!(_0x2d6822.Cross(WebGLPlot$f.Cartesian2.subtract(e.point,n.point,o),WebGLPlot$f.Cartesian2.subtract(r.point,e.point,a))>=0))return void(e.isSeparable=!1);e.isConvex=!0}for(var s=0;s<t.length;s++)if(!WebGLPlot$f.Cartesian2.equals(t[s].point,e.point)&&!WebGLPlot$f.Cartesian2.equals(t[s].point,n.point)&&!WebGLPlot$f.Cartesian2.equals(t[s].point,r.point)&&_0x2d6822.TestInTriangle(t[s].point,e.point,n.point,r.point))return void(e.isSeparable=!1);e.isSeparable=!0},_0x2d6822.TestInTriangle=function(e,t,i,n){var r=new WebGLPlot$f.Cartesian2,o=new WebGLPlot$f.Cartesian2,a=new WebGLPlot$f.Cartesian2,s=new WebGLPlot$f.Cartesian2,l=new WebGLPlot$f.Cartesian2;WebGLPlot$f.Cartesian2.subtract(i,t,r),WebGLPlot$f.Cartesian2.subtract(n,t,o),WebGLPlot$f.Cartesian2.subtract(n,i,a),WebGLPlot$f.Cartesian2.subtract(e,t,s);var u=_0x2d6822.Cross(r,o)>=0;return u^_0x2d6822.Cross(r,s)<0&&_0x2d6822.Cross(a,r)>0^_0x2d6822.Cross(a,WebGLPlot$f.Cartesian2.subtract(e,i,l))>=0&&u^_0x2d6822.Cross(o,s)>=0},_0x2d6822.screenSpaceCameraController=function(e,t){if(e){var i=e.screenSpaceCameraController;2===e.mode?i.enableTranslate=t:3===e.mode&&(i.enableRotate=t),e.camera.update(e.mode),i.update()}},_0x2d6822.pixelDisToRealDisInMeters=function(e,t){var i=e.camera,n=new WebGLPlot$f.Cartesian2(e._canvas.clientWidth/2,e._canvas.clientHeight/2),r=new WebGLPlot$f.Cartesian2(n.x+t.x,n.y),o=new WebGLPlot$f.Cartesian2(n.x,n.y+t.y),a=i.getPickRay(n),s=i.getPickRay(r),l=i.getPickRay(o),u=e.globe.pick(a,e),c=e.globe.pick(s,e),h=e.globe.pick(l,e),d=WebGLPlot$f.Cartesian3.distance(u,c),f=WebGLPlot$f.Cartesian3.distance(u,h);return new WebGLPlot$f.Cartesian2(d,f)},_0x2d6822.pixelHeightToRealHeight=function(e,t,i){var n=e.camera,r=new WebGLPlot$f.Cartesian2(t.x,t.y+1),o=n.getPickRay(t),a=n.getPickRay(r),s=e.globe.pick(o,e),l=e.globe.pick(a,e),u=.3*WebGLPlot$f.Cartesian3.distance(s,l);return(t.y-i.y)*u},_0x2d6822.getPlotLayers=function(e){var t=null;if(WebGLPlot$f.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot$f.PlotLayers)t=e.plotLayers;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot$f.defined(r)&&r instanceof WebGLPlot$f.PlotLayers){t=r;break}}return t};var _0x21dec1=new WebGLPlot$f.Cartesian3,_0x302661=new WebGLPlot$f.Cartesian3;_0x2d6822.getModelMinAndMaxCorner=function(e){for(var t=e.gltf,i=t.nodes,n=t.meshes,r=t.scenes[t.scene].nodes,o=r.length,a=[],s=new WebGLPlot$f.Cartesian3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),l=new WebGLPlot$f.Cartesian3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),u=0;u<o;++u){var c=i[r[u]];for(c._transformToRoot=WebGLPlot$f.ModelUtility.getTransform(c),a.push(c);a.length>0;){var h=(c=a.pop())._transformToRoot,d=c.mesh;if(WebGLPlot$f.defined(d))for(var f=n[d].primitives,p=f.length,_=0;_<p;++_)if(f[_].attributes&&f[_].attributes.POSITION){var m=f[_].attributes.POSITION;if(WebGLPlot$f.defined(m)){var g=WebGLPlot$f.ModelUtility.getAccessorMinMax(t,m);if(WebGLPlot$f.defined(g.min)&&WebGLPlot$f.defined(g.max)){var x=WebGLPlot$f.Cartesian3.fromArray(g.min,0,_0x21dec1),v=WebGLPlot$f.Cartesian3.fromArray(g.max,0,_0x302661);WebGLPlot$f.Matrix4.multiplyByPoint(h,x,x),WebGLPlot$f.Matrix4.multiplyByPoint(h,v,v),WebGLPlot$f.Cartesian3.minimumByComponent(s,x,s),WebGLPlot$f.Cartesian3.maximumByComponent(l,v,l)}}}var y=c.children;if(WebGLPlot$f.defined(y))for(var $=y.length,b=0;b<$;++b){var T=i[y[b]];T._transformToRoot=WebGLPlot$f.ModelUtility.getTransform(T),WebGLPlot$f.Matrix4.multiplyTransformation(h,T._transformToRoot,T._transformToRoot),a.push(T)}delete c._transformToRoot}}return{minCorner:s,maxCorner:l}},_0x2d6822.localPtsToCartesian=function(e,t,i){var n=new WebGLPlot$f.Cartesian3,r=new WebGLPlot$f.Cartesian3;return r=WebGLPlot$f.Cartesian3.multiplyByScalar(new WebGLPlot$f.Cartesian3(e.x,e.y,e.z),i,r),{position:n=WebGLPlot$f.Matrix4.multiplyByPoint(t,r,n),vector:r}},_0x2d6822.latLon2LocalPts=function(e){let t=[],i=[],n=WebGLPlot$f.Cartesian3.fromDegrees(e[0].x,e[0].y,e[0].z);if(i.push(new WebGLPlot$f.Cartesian3(0,0,0)),t.push(n),Array.isArray(e)){for(let r=1;r<e.length;r++){let o=WebGLPlot$f.Cartesian3.fromDegrees(e[r].x,e[r].y,e[r].z);const a=o.x-n.x,s=o.y-n.y,l=o.z-n.z;t.push(o),i.push(new WebGLPlot$f.Cartesian3(a,s,l))}var r=new WebGLPlot$f.HeadingPitchRoll,o=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west");const a=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot$f.Ellipsoid.WGS84,o);return console.log(t,"test"),{positions:i,modelMatrix:a}}},_0x2d6822.extend=function(e){var t,i,n,r;for(i=1,n=arguments.length;i<n;i++)for(t in r=arguments[i])e[t]=r[t];return e},_0x2d6822.isSymbolDot=function(e){switch(e){case _0x18bc2f.SYMBOL_DOT:case _0x18bc2f.SYMBOL_PICTURE:case _0x18bc2f.SYMBOL_POINT:case _0x18bc2f.SYMBOL_Model:return!0}return!1};var _0x50d63b=(_0x57e7fd=!0,function(e,t){var i=_0x57e7fd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57e7fd=!1,i}),_0x375ddd=_0x50d63b(void 0,(function(){return _0x375ddd.toString().search("(((.+)+)+)+$").toString().constructor(_0x375ddd).search("(((.+)+)+)+$")})),_0x57e7fd;function _0x3c9c12(e,t){this.scene=WebGLPlot.defaultValue(e,null),this.dotBillboards=new WebGLPlot.BillboardCollection,this._name=WebGLPlot.defaultValue(t,"PlotCollentionLayer"),this._waterPlanes=[],this._visibleViewport=0,this._valid=!0,this._visibility=!0,this._id=-1,this.bIsUpdateDepthTestDis=!1,this.setInterval(),this.PolygonFillInstances={},this.WallInstances={},this.Labels={},this.ploygonFillPrimitive=[],this.wallPrimitive=[],this.ploygonFillAppearance={},this.wallAppearance={},this.algoLabels=new WebGLPlot.LabelCollection,this.updatePrimitive=!1,this.createPolylineCollention(!0),this.GroundInstances={},this.groundPrimitive=null,this.dynamicScaneInstances={},this.dynamicScaneimitive=null,this._dotModelAndVectorPrimitives=new WebGLPlot.PrimitiveCollection,this.scene.primitives.add(this._dotModelAndVectorPrimitives)}function _0x14bbaf(e){if(WebGLPlot.defined(e)&&null!==e&&WebGLPlot.defined(this.scene)&&null!==this.scene){var t=e.position,i=e.width,n=e.height;if(WebGLPlot.defined(i)&&WebGLPlot.defined(n)){var r=new WebGLPlot.BoundingSphere(t,0),o=this.scene.camera.getPixelSize(r,this.scene.frameState.context.drawingBufferWidth,this.scene.frameState.context.drawingBufferHeight),a=i*o,s=n*o,l=Math.max(a,s)/3;r.radius=l,WebGLPlot.BoundingSphere.isOccluded(r,this.scene.frameState.occluder)?e.disableDepthTestDistance=0:e.disableDepthTestDistance=Number.POSITIVE_INFINITY}}}function _0x1bd677(e){var t=e.ForeRGBA;return e.isClampToGround&&(t+="_isClampToGround"),t}_0x375ddd(),_0x3c9c12.prototype.update=function(e,t,i,n){WebGLPlot.defined(this.dotBillboards)&&null!==this.dotBillboards&&this.dotBillboards.update(e,t),WebGLPlot.defined(this.polylineCollection)&&null!==this.polylineCollection&&this.polylineCollection.update(e);for(var r=0;r<this.ploygonFillPrimitive.length;r++)(this.ploygonFillPrimitive[r]instanceof WebGLPlot.GroundPrimitive||this.ploygonFillPrimitive[r]instanceof WebGLPlot.Primitive)&&this.ploygonFillPrimitive[r].update(e);for(var o=0;o<this.wallPrimitive.length;o++)this.wallPrimitive[o]instanceof WebGLPlot.Primitive&&this.wallPrimitive[o].update(e);null!==this.groundPrimitive&&this.groundPrimitive.update(e),this.dynamicScaneimitive&&this.dynamicScaneimitive.update(e),this.algoLabels.update(e)},_0x3c9c12.prototype.render=function(){if(this._valid&&this.updatePrimitive){for(var e=0;e<this.ploygonFillPrimitive.length;e++)this.ploygonFillPrimitive[e]=null;for(e=0;e<this.wallPrimitive.length;e++)this.wallPrimitive[e]=null;this.groundPrimitive&&(this.groundPrimitive=null),this.dynamicScaneimitive&&(this.dynamicScaneimitive=null),this.ploygonFillPrimitive=[],this.wallPrimitive=[],this.ploygonFillAppearance={},this.wallAppearance={};var t=[],i=[],n=[],r=[];for(var o in this.PolygonFillInstances)!this.PolygonFillInstances[o]||this.PolygonFillInstances[o].length<=0?(delete this.PolygonFillInstances[o],this.PolygonFillInstances[o]=null):t=t.concat(this.PolygonFillInstances[o]);for(var a in this.WallInstances)this.WallInstances[a].length<=0?delete this.WallInstances[a]:i=i.concat(this.WallInstances[a]);for(var s in this.GroundInstances)this.GroundInstances[s].length<=0?delete this.GroundInstances[s]:n=n.concat(this.GroundInstances[s]);for(var s in this.dynamicScaneInstances)this.dynamicScaneInstances[s].length<=0?delete this.dynamicScaneInstances[s]:r=r.concat(this.dynamicScaneInstances[s]);for(s=0;s<t.length;s++){var l=t[s];this.ploygonFillAppearance.hasOwnProperty(_0x1bd677(l))?this.ploygonFillAppearance[_0x1bd677(l)].push(l):this.ploygonFillAppearance[_0x1bd677(l)]=[l]}if(WebGLPlot.defined(this.ploygonFillAppearance)&&null!==this.ploygonFillAppearance)for(var e in this.ploygonFillAppearance){var u=this.createPolygonFillPrimitive(e,this.ploygonFillAppearance[e]);this.ploygonFillPrimitive.push(u)}for(var c=0;c<i.length;c++){var h=i[c];this.wallAppearance.hasOwnProperty(h.ForeRGBA)?this.wallAppearance[h.ForeRGBA].push(h):this.wallAppearance[h.ForeRGBA]=[h]}if(WebGLPlot.defined(this.wallAppearance)&&null!==this.wallAppearance)for(var d in this.wallAppearance){var f=this.createWallPrimitive(d,this.wallAppearance[d]);this.wallPrimitive.push(f)}n.length>0&&n[0]&&(this.groundPrimitive=new WebGLPlot.GroundPolylinePrimitive({geometryInstances:n,classificationType:WebGLPlot.ClassificationType.BOTH,clampToS3M:!0,show:!0,appearance:new WebGLPlot.PolylineColorAppearance}),this.groundPrimitive.SymbolType=_0x18bc2f.SYMBOL_ALGO),r.length>0&&r[0]&&(this.dynamicScaneimitive=new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.PerInstanceColorAppearance({flat:!0}),asynchronous:!1})),this.updatePrimitive=!1}},_0x3c9c12.prototype.createPolygonFillPrimitive=function(e,t){var i;i=e.includes("_isClampToGround")?WebGLPlot.Color.fromRgba(e.split("_")[0]):WebGLPlot.Color.fromRgba(e);var n,r=new WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),o=new WebGLPlot.EllipsoidSurfaceAppearance({material:r,aboveGround:!0});return(n=t[0]&&t[0].isClampToGround?new WebGLPlot.GroundPrimitive({geometryInstances:t,appearance:o,show:this._display,asynchronous:!0,classificationType:WebGLPlot.ClassificationType.BOTH}):new WebGLPlot.Primitive({geometryInstances:t,appearance:o,show:this._display,asynchronous:!1})).PolygonFillOrWall=!0,n.SymbolType=_0x18bc2f.SYMBOL_ALGO,n},_0x3c9c12.prototype.createWallPrimitive=function(e,t){var i=WebGLPlot.Color.fromRgba(e),n=WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),r=new WebGLPlot.MaterialAppearance({material:n,faceForward:!0}),o=new WebGLPlot.Primitive({geometryInstances:t,appearance:r,asynchronous:!1,compressVertices:!0,show:!0});return o.PolygonFillOrWall=!0,o.SymbolType=_0x18bc2f.SYMBOL_ALGO,o},_0x3c9c12.prototype.setInterval=function(){var e=this;setInterval((function(){if(WebGLPlot.defined(e.dotBillboards)&&e.dotBillboards.length>0&&e.bIsUpdateDepthTestDis)for(var t in e.dotBillboards._billboards)_0x14bbaf(t)}),100)},_0x3c9c12.prototype.releaseSelection=function(){this._valid},_0x3c9c12.prototype.createPolylineCollention=function(e){if(this.polylineCollection&&this.polylineCollection.destroy(),this.polylineCollection=new WebGLPlot.PolylineCollection({opaqueRS:WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}}),translucentRS:WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}})}),this.scene&&this.scene.plotLayers){let e=this.scene.plotLayers._layerQueue.length;for(let t=0;t<e;t++){let e=this.scene.plotLayers._layerQueue[t];if(WebGLPlot.defined(e)&&e){let t=e._geoGraphicObjects.length;for(let i=0;i<t;i++)e._geoGraphicObjects[i]._initialize=!1}}}};const _0x3385bb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4f9aad=_0x3385bb(void 0,(function(){return _0x4f9aad.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f9aad).search("(((.+)+)+)+$")}));_0x4f9aad();var _0x2a46cb=new Map;function _0x38860f(e){this.collentionLayer=new _0x3c9c12(e);var t=!1;if(WebGLPlot.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot.PlotLayers)e.plotLayers.collentionLayer=this.collentionLayer,t=!0;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot.defined(r)&&r instanceof WebGLPlot.PlotLayers){r.collentionLayer=this.collentionLayer,t=!0;break}}if(!t){var o=new WebGLPlot.PlotLayers;o.collentionLayer=this.collentionLayer,e.primitives.add(o),e.plotLayers=o}this.overLayerPolylineCollection=new WebGLPlot.PolylineCollection,e.primitives.add(this.overLayerPolylineCollection)}_0x38860f.getInstance=function(e){let t=_0x2a46cb.get(e._plottingID);return e&&!WebGLPlot.defined(t)&&(t=new _0x38860f(e),_0x2a46cb.set(e._plottingID,t)),t},_0x38860f.addBillboard=function(e,t){let i=_0x2a46cb.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.collentionLayer.dotBillboards.add(e)},_0x38860f.removeBillboard=function(e,t){let i=_0x2a46cb.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.collentionLayer.dotBillboards.remove(e)},_0x38860f.addDotModelAndVector=function(e,t){let i=_0x2a46cb.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.collentionLayer._dotModelAndVectorPrimitives.add(e)},_0x38860f.removeDotModelAndVector=function(e,t){let i=_0x2a46cb.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.collentionLayer._dotModelAndVectorPrimitives.removeAndDestroy(e)},_0x38860f.removeAllBillboard=function(e){let t=_0x2a46cb.get(e._plottingID);WebGLPlot.defined(t)&&null!==t&&t.collentionLayer.dotBillboards.removeAll()},_0x38860f.addAlgoPloyline=function(e,t,i){let n=_0x2a46cb.get(i._plottingID);if(null===e)return n.collentionLayer.polylineCollection.add(t);if(WebGLPlot.defined(n)&&null!==n){var r=n.collentionLayer.polylineCollection.add(t);return e.Polylines.push(r),r}},_0x38860f.removeAllAlgoPloyline=function(e,t){let i=_0x2a46cb.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i){for(var n in!e.Polylines&&e instanceof WebGLPlot.Polyline&&i.collentionLayer.polylineCollection.remove(e),e.Polylines)i.collentionLayer.polylineCollection.remove(e.Polylines[n]);e.Polylines=[]}},_0x38860f.addAlgoLabel=function(e,t,i){let n=_0x2a46cb.get(i._plottingID);if(WebGLPlot.defined(n)&&null!==n){var r=n.collentionLayer.algoLabels.add(t);return e.Labels.push(r),r}},_0x38860f.removeAllAlgoLabel=function(e,t){let i=_0x2a46cb.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i){for(var n in e.Labels)i.collentionLayer.algoLabels.remove(e.Labels[n]);e.Labels=[]}},_0x38860f.setUpdatePrimitive=function(e,t){let i=_0x2a46cb.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&(i.collentionLayer.updatePrimitive=e)},_0x38860f.setPolygonFillInstances=function(e,t,i){let n=_0x2a46cb.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.PolygonFillInstances[e]=t)},_0x38860f.setWallInstances=function(e,t,i){let n=_0x2a46cb.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.WallInstances[e]=t)},_0x38860f.setGroundInstances=function(e,t,i){let n=_0x2a46cb.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.GroundInstances[e]=t)},_0x38860f.setScaneInstances=function(e,t,i){let n=_0x2a46cb.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.dynamicScaneInstances[e]=t,n.collentionLayer.updatePrimitive=!0)},_0x38860f.setUseDepthTest=function(e,t){let i=_0x2a46cb.get(t._plottingID);var n=WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}});WebGLPlot.defined(i)&&null!==i&&(i.collentionLayer.polylineCollection._opaqueRS=n,i.collentionLayer.polylineCollection._translucentRS=n)},_0x38860f.removeAll=function(e){let t=_0x2a46cb.get(e._plottingID);WebGLPlot.defined(t)&&WebGLPlot.defined(t.collentionLayer)&&(t.collentionLayer.polylineCollection.removeAll(),t.collentionLayer.algoLabels.removeAll(),t.collentionLayer.dotBillboards.removeAll(),t.collentionLayer.WallInstances=[],t.collentionLayer.PolygonFillInstances=[],t.collentionLayer.updatePrimitive=[],t.collentionLayer.GroundInstances=[],t.collentionLayer.dynamicScaneInstances=[])},_0x38860f.addOverLayerPolyLine=function(e,t){let i=_0x2a46cb.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.overLayerPolylineCollection.add(e)},_0x38860f.removeOverLayerPolyLine=function(e,t){let i=_0x2a46cb.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.overLayerPolylineCollection.remove(e)};var _0x504be0=(_0x5ae031=!0,function(e,t){var i=_0x5ae031?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ae031=!1,i}),_0x158c65=_0x504be0(void 0,(function(){return _0x158c65.toString().search("(((.+)+)+)+$").toString().constructor(_0x158c65).search("(((.+)+)+)+$")})),_0x5ae031;_0x158c65();class _0x4157b2{constructor(e){this._visible=!1,this._isUsePlotVisible=WebGLPlot.defaultValue(e.isUsePlotVisible,!0),this._position=WebGLPlot.defaultValue(e.position,new _0x11ff81(0,0,0)),this._rotate=WebGLPlot.defaultValue(e.rotate,new _0x11ff81(0,0,0)),this._scale=WebGLPlot.defaultValue(e.scale,1),this._scene=e.scene,this._geoGraphicObject=e.geoGraphicObject}setIsUsePlotVisible(e){this._isUsePlotVisible=e}getIsUsePlotVisible(){return this._isUsePlotVisible}setScene(e){this._scene=e}setVisible(e){return!this._isUsePlotVisible&&(this._visible!==e&&(this._visible=e,e?this._addEffectToScene(this._options):this._removeEffectFromScene()),!0)}isVisible(){return this._visible}setGeoGraphicObject(e){this._geoGraphicObject=e}updateEffect(e){}_addEffectToScene(){}_removeEffectFromScene(){}destroy(){}toGeoJson(){return{}}fromGeoJson(e){}}var _0x58760a=(_0x3d9fad=!0,function(e,t){var i=_0x3d9fad?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3d9fad=!1,i}),_0x307ee8=_0x58760a(void 0,(function(){return _0x307ee8.toString().search("(((.+)+)+)+$").toString().constructor(_0x307ee8).search("(((.+)+)+)+$")})),_0x3d9fad;_0x307ee8();const _0x57454b=2;class _0x21fac2{constructor(e){null!=e&&(e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._libID=WebGLPlot$f.defaultValue(e.libID,-1),this._code=WebGLPlot$f.defaultValue(e.code,-1),this._localPoints=WebGLPlot$f.defaultValue(e.localPoints,[]),this._symbolName=WebGLPlot$f.defaultValue(e.symbolName,""),this._symbolType=_0x18bc2f.SYMBOL_UNKNOW,this._display=WebGLPlot$f.defaultValue(e.display,!0),this._id=WebGLPlot$f.createGuid(),this._showTipLength=WebGLPlot$f.defaultValue(e.showTipLength,100),this._markHalo=WebGLPlot$f.defaultValue(e.markHalo,!1),this._extendWallHeight=WebGLPlot$f.defaultValue(e.extendWallHeight,-1),this._isUseSymbolLibStyle=WebGLPlot$f.defaultValue(e.isUseSymbolLibStyle,!0),this._surroundRatioVal=WebGLPlot$f.defaultValue(e.surroundRatioVal,.002),this._isEdit=!1,this.isDrawing=WebGLPlot$f.defaultValue(e.isDrawing,!1),this._layer=WebGLPlot$f.defaultValue(e.layer,null),this._initialize=!1,this._primitive=[],this._symbolLibManager=WebGLPlot$f.getLibManager(this.layer._scene._plottingID),this._symbolStyle=WebGLPlot$f.defaultValue(e.symbolStyle,new _0x53d051({graphicObject:this})),this._symbolTextStyle=WebGLPlot$f.defaultValue(e.symbolTextStyle,new _0x34d1aa({graphicObject:this})),this._serverData=WebGLPlot$f.defaultValue(e.serverData,null),this._textContent=WebGLPlot$f.defaultValue(e.textContent,""),this.readStyleFromSymbolLib(),this._GeoJsonFeature=null,this._extendProperty=new WebGLPlot$f.createProperty,this._annotationArray=WebGLPlot$f.defaultValue(e.annotationArray,[]),this._wholeHeight=WebGLPlot$f.defaultValue(e.wholeHeight,0),this._disableDepthTestDistance=Number.MAX_VALUE,this._dotDepthTest=!0,this._initSymbolFinished=new WebGLPlot$f.Event,this._geoEffectArray=[],this._geoEntity=void 0)}readStyleFromSymbolLib(){var e=this._serverData;WebGLPlot$f.defined(e)&&this._isUseSymbolLibStyle?(this._symbolType=this._serverData.symbolType,this._symbolName=WebGLPlot$f.defaultValue(e.symbolName,""),this._middleMarkExist=WebGLPlot$f.defaultValue(e.middleMarkExist,!1),this._symbolStyle._lineColor=WebGLPlot$f.defaultValue(_0x1b9fe2(e.style.lineColor),this._symbolStyle.lineColor),this._symbolStyle._fillForeColor=WebGLPlot$f.defaultValue(_0x1b9fe2(e.style.fillForeColor),this._symbolStyle.fillForeColor)):this.setSymbolName(this._code)}setGeoEntityShowMode(e){switch((!WebGLPlot$f.defined(this.__dotPlotLibID)||!WebGLPlot$f.defined(this.__dotPlotCode))&&(this.__dotPlotLibID=0,this.__dotPlotCode=_0x18bc2f.SYMBOL_POINT),e){case _0x4e5d29.Marker:if(""===this.modelPath)return;this._libID=0,this._code=_0x18bc2f.SYMBOL_Model;break;case _0x4e5d29.Picture:if(""===this.picturePath)return;this._libID=0,this._code=_0x18bc2f.SYMBOL_PICTURE;break;case _0x4e5d29.Grid:case _0x4e5d29.Vector:if(this._libID=this.__dotPlotLibID,this._code=this.__dotPlotCode,0===this.__dotPlotLibID)this._code===_0x18bc2f.SYMBOL_POINT&&this.__initSymbolPointSymbolData();else{let t=this;const i=WebGLPlot$f.getLibManager(this.layer._scene._plottingID).getSymbolLibByLibId(this._libID);if(WebGLPlot$f.defined(i)){const n=i.getSymbolData(this._code);WebGLPlot$f.defined(n)?(this._serverData=n,this.readStyleFromSymbolLib(),this._getServerDataPrototype(n)):this.getServerData(this._libID,this._code,(function(){t.readStyleFromSymbolLib(),t._getServerDataPrototype(t._serverData),t._initialize=!1,t.showMode=e}))}else this.getServerData(this._libID,this._code,(function(){t.readStyleFromSymbolLib(),t._getServerDataPrototype(t._serverData),t._initialize=!1,t.showMode=e}))}}this.showMode===e&&(this._initialize=!1),this.showMode=e}getGeoEntityShowMode(){return this._showMode}setGeoEntity(e){this._geoEntity=e}getGeoEntity(){return this._geoEntity}createSymbol(){_0x18bc2f.SYMBOL_UNKNOW!==this._symbolType&&(_0x18bc2f.SYMBOL_DOT,this._symbolType,WebGLPlot$f.defined(this._symbol))}setSymbolName(e){switch(e){case _0x18bc2f.SYMBOL_POLYLINE:this._symbolName=WebGLPlot$f.plotI18n("polyLine");break;case _0x18bc2f.SYMBOL_RECTANGLE:this._symbolName=WebGLPlot$f.plotI18n("rectangle");break;case _0x18bc2f.SYMBOL_PARALLELOGRAM:this._symbolName=WebGLPlot$f.plotI18n("parallelogram");break;case _0x18bc2f.SYMBOL_CIRCLE:this._symbolName=WebGLPlot$f.plotI18n("circle");break;case _0x18bc2f.SYMBOL_ELLIPSE:this._symbolName=WebGLPlot$f.plotI18n("ellipse");break;case _0x18bc2f.SYMBOL_ARBITRARYPOLYGON:this._symbolName=WebGLPlot$f.plotI18n("polygon");break;case _0x18bc2f.SYMBOL_TEXT:this._symbolName=WebGLPlot$f.plotI18n("text");break;case _0x18bc2f.SYMBOL_ARC:this._symbolName=WebGLPlot$f.plotI18n("arc");break;case _0x18bc2f.SYMBOL_PARALLELLINE:this._symbolName=WebGLPlot$f.plotI18n("parallel");break;case _0x18bc2f.SYMBOL_TRAPEZOID:this._symbolName=WebGLPlot$f.plotI18n("trapezoid");break;case _0x18bc2f.SYMBOL_POLYBEZIERCLOSED:this._symbolName=WebGLPlot$f.plotI18n("closedBesselCurve");break;case _0x18bc2f.SYMBOL_CHORD:this._symbolName=WebGLPlot$f.plotI18n("chord");break;case _0x18bc2f.SYMBOL_PIE:this._symbolName=WebGLPlot$f.plotI18n("sector");break;case _0x18bc2f.SYMBOL_KIDNEY:this._symbolName=WebGLPlot$f.plotI18n("kidney");break;case _0x18bc2f.SYMBOL_BRACE:this._symbolName=WebGLPlot$f.plotI18n("brace");break;case _0x18bc2f.SYMBOL_REGULARPOLYGON:this._symbolName=WebGLPlot$f.plotI18n("regularPolygon");break;case _0x18bc2f.SYMBOL_POLYBEZIER:this._symbolName=WebGLPlot$f.plotI18n("bezier");break;case _0x18bc2f.SYMBOL_RUNWAY:this._symbolName=WebGLPlot$f.plotI18n("runway");break;case _0x18bc2f.SYMBOL_CURVEEIGHT:this._symbolName=WebGLPlot$f.plotI18n("curveEight");break;case _0x18bc2f.SYMBOL_CONCENTRICCIRCLE:this._symbolName=WebGLPlot$f.plotI18n("concentricCircle");break;case _0x18bc2f.SYMBOL_COMBINATIONALCIRCLE:this._symbolName=WebGLPlot$f.plotI18n("combinedCircle");break;case _0x18bc2f.SYMBOL_NODECHAIN:this._symbolName=WebGLPlot$f.plotI18n("nodeChain");break;case _0x18bc2f.SYMBOL_CIRCLECHORD:this._symbolName=WebGLPlot$f.plotI18n("chord");break;case _0x18bc2f.SYMBOL_CIRCLEPIE:this._symbolName=WebGLPlot$f.plotI18n("sector");break;case _0x18bc2f.SYMBOL_CIRCLEARC:this._symbolName=WebGLPlot$f.plotI18n("arc");break;case _0x18bc2f.SYMBOL_Model:this._symbolName=WebGLPlot$f.plotI18n("SYMBOL_Model");break;case _0x18bc2f.SYMBOL_POINT:this._symbolName=WebGLPlot$f.plotI18n("SYMBOL_POINT")}}setVisible(e){if(0!==this._primitive.length)for(var t=0;t<this._primitive.length;t++)this._primitive[t].show=e;WebGLPlot$f.defined(this._layer.selectedFeature)&&this.id===this._layer.selectedFeature.id&&!this.display&&this._layer._plottingEdit&&this._layer._plottingEdit.releaseSelection(!0),!this.billboard||this.showMode!==_0x4e5d29.Grid&&this.showMode!==_0x4e5d29.Picture?this._initialize=!1:this.billboard.show=e}getServerData(e,t,i){var n=this,r=WebGLPlot$f.getLibManager(this.layer._scene._plottingID);var o=WebGLPlot$f.getServerData(e,t,void 0,this._layer._scene._plottingID);!o||(o.getSymbolInfo.events.on({processCompleted:function(t){-1!==t.result.libID&&-1!==t.result.code&&(n._serverData=t.result,r.setSymbolData(e,t.result),i())},processFailed:function(){},scope:n}),o.getSymbolInfo.processAsync(o.getSymbolInfoParameters))}addGeoEffect(e){if(e instanceof _0x4157b2)return this._geoEffectArray.forEach((t=>{if(t.id===e.id)return this._geoEffectArray})),this._geoEffectArray.push(e),e.setGeoGraphicObject(this),this._geoEffectArray}getGeoEffectArray(){return this._geoEffectArray}getGeoEffectByID(e){if(!WebGLPlot$f.defined(e))return!1;for(let t=0;t<this._geoEffectArray.length;t++){const i=this._geoEffectArray[t];if(e===i.id)return i}}removeGeoEffectByIndex(e){return e>=0&&e<this._geoEffectArray.length&&(this._geoEffectArray[e].destroy(),this._geoEffectArray[e]=void 0,this._geoEffectArray.splice(e,1),!0)}removeGeoEffectByID(e){if(!WebGLPlot$f.defined(e))return!1;for(let t=0;t<this._geoEffectArray.length;t++){if(e===this._geoEffectArray[t].id)return this._geoEffectArray[t].destroy(),this._geoEffectArray[t]=void 0,this._geoEffectArray.splice(t,1),!0}return!1}removeAllGeoEffect(){this._geoEffectArray.forEach((e=>{e.destroy(),e=void 0})),this._geoEffectArray=[]}__setEffectParameter(e,t){WebGLPlot$f.defined(t)&&t>=0&&t<this._geoEffectArray.length?this._geoEffectArray[t].updateEffect(e):this._geoEffectArray.forEach((t=>{t.updateEffect(e)}))}mergeDefaultStyle(){var e=WebGLPlot$f.getDefaultStyle({libID:this._libID,code:this._code});if(e&&e.defaultFlag){var t=e.symbolStyle,i=e.symbolTextStyle,n=e.gridSymbolSize;this._symbolStyle=t.clone(),this._symbolStyle._graphicObject=this,this._symbolTextStyle=i.clone(),_0x18bc2f.SYMBOL_DOT===this.symbolType&&(-1!==e.lineSymbolID&&(this.lineSymbolID=e.lineSymbolID),-1!==e.gridLineWidth&&(this.gridLineWidth=e.gridLineWidth),n.x>0&&n.y>0&&(this.gridSymbolSize=e.gridSymbolSize.clone()),""!==e.modelPath&&(this.modelPath=e.modelPath))}}update(e,t,i,n){if(this._display&&0!==this._primitive.length)for(var r=0;r<this._primitive.length;r++)this._primitive[r].update(e)}initSymbol(){}getSymbolData(e){WebGLPlot$f.defined(e)||(e=!0);var t={};if(t.version=_0x57454b,t.hasOwnProperty("type")||(t.type="GRAPHICOBJECT"),t.hasOwnProperty("libID")||(t.libID=this._libID),t.hasOwnProperty("code")||(t.code=this._code),t.hasOwnProperty("dotPlotLibID")||(t.dotPlotLibID=this.__dotPlotLibID),t.hasOwnProperty("dotPlotCode")||(t.dotPlotCode=this.__dotPlotCode),t.hasOwnProperty("localePoints")||(t.localePoints=this.localPoints),t.hasOwnProperty("symbolName")||(t.symbolName=this.symbolName),t.hasOwnProperty("symbolType")||(t.symbolType=this.symbolType),t.hasOwnProperty("uuid")||(t.uuid=this.id),t.hasOwnProperty("isEdit")||(t.isEdit=!1),t.hasOwnProperty("scaleByMap")||(t.scaleByMap=!1),t.hasOwnProperty("wholeHeight")||(t.wholeHeight=this.wholeHeight),!t.hasOwnProperty("style")){var i=new Object;t.style=i,i.lineColor=_0x1a2b6f(this.symbolStyle.lineColor),i.fillSymbolID=this.symbolStyle._fillSymbolID,i.fillBackColor=_0x1a2b6f(this.symbolStyle._fillBackColor),i.fillForeColor=_0x1a2b6f(this.symbolStyle._fillForeColor),i.fillBackOpaque=this.symbolStyle._fillBackOpaque,i.fillGradientMode=this.symbolStyle._fillGradientMode,i.fillCenterOffsetX=this.symbolStyle.fillGradientOffsetRatioX,i.fillCenterOffsetY=this.symbolStyle.fillGradientOffsetRatioY,i.fillAngle=this.symbolStyle.fillGradientAngle,i.fillOpaqueRate=100-this.symbolStyle.fillOpaqueRate,i.lineWidth3D=this.symbolStyle.lineWidth,t.style.hasOwnProperty("display")||(this._display?i.display="display":i.display="none"),t.style=i}if(!t.hasOwnProperty("textStyle2D")){var n=new Object;n.fontHeight=25.4*this._symbolTextStyle.fontSize/96,n.foreColor=_0x1a2b6f(this._symbolTextStyle._foreColor),n.backColor=_0x1a2b6f(this._symbolTextStyle._backColor),n.outline=this._symbolTextStyle._outline,n.fontStrokeColor=_0x1a2b6f(this._symbolTextStyle._backColor),n.backOpaque=this.symbolTextStyle.isShowTextBox,n.fontBackgroundColor=_0x1a2b6f(this.symbolTextStyle.textBoxLineColor),n.fontName=this._symbolTextStyle._fontName,n.italic=this._symbolTextStyle._italic,n.bold=this._symbolTextStyle._bold,n.align=this._symbolTextStyle._align,n.italicAngle=this._symbolTextStyle._italicAngle,n.shadow=this._symbolTextStyle._shadow,n.sizeFixed=this._symbolTextStyle._sizeFixed,n.underline=this._symbolTextStyle._underline,n.rotation=this._symbolTextStyle._rotation,n.strikeout=this._symbolTextStyle._strikeout,n.borderSpacingWidth=this._symbolTextStyle._borderSpacingWidth,n.outlineWidth=25.4*this._symbolTextStyle._outlineWidth/96,n.fontWidth=this._symbolTextStyle._fontWidth,n.opaqueRate=this._symbolTextStyle._opaqueRate,n.stringAlignment=this._symbolTextStyle._stringAlignment,n.fontScale=this._symbolTextStyle._text3DScale,n.fontWeight=this._symbolTextStyle._fontWeight,t.textStyle2D=n}if(!t.hasOwnProperty("textStyle3D")){var r=new Object;r.foreColor=_0x1a2b6f(this.symbolTextStyle.foreColor),r.backColor=_0x1a2b6f(this.symbolTextStyle.backColor),r.outline=this.symbolTextStyle.outline,r.textBoxColor=this.symbolTextStyle.textBoxColor,r.textBoxLineColor=this.symbolTextStyle.textBoxLineColor,r.fontName=this.symbolTextStyle.fontName,r.italic=this.symbolTextStyle.italic,r.bold=this.symbolTextStyle.bold,r.align=this.symbolTextStyle.align,r.fontSize=this.symbolTextStyle.fontSize,r.isShowTextBox=this.symbolTextStyle.isShowTextBox,t.textStyle3D=r}if(t.hasOwnProperty("surroundLineColor")||(t.surroundLineColor=_0x1a2b6f(this.symbolStyle.surroundLineColor)),t.hasOwnProperty("surroundLineWidth2D")||(t.surroundLineWidth2D=.5),t.hasOwnProperty("surroundLineType")||(t.surroundLineType=this.symbolStyle.surroundLineType),_0x18bc2f.SYMBOL_DOT===this._symbolType||_0x18bc2f.SYMBOL_Model===this._symbolType||_0x18bc2f.SYMBOL_PICTURE===this._symbolType)t.hasOwnProperty("showMode")||(t.showMode=this.showMode),t.hasOwnProperty("scale3D")||(t.scale3D=this._scale),t.hasOwnProperty("rotate3D")||(t.rotate3D=this._rotate),t.hasOwnProperty("positionOffset")||(t.positionOffset=this._hasDragLine),t.hasOwnProperty("dragPoint")||(t.dragPoint=this.dragPoint),t.hasOwnProperty("symbolRank")||(t.symbolRank=this._symbolRank),t.hasOwnProperty("anchorPoint")||(t.anchorPoint=this.anchorPoint),t.hasOwnProperty("middleMarkBounds")||(t.middleMarkBounds=this.middleMarkBounds),t.hasOwnProperty("negativeImage")||(t.negativeImage=this._isNegativeImage),t.hasOwnProperty("symbolSize")||(t.symbolSize=this._symbolSize),t.hasOwnProperty("gridSymbolSize")||(t.gridSymbolSize=this._gridSymbolSize),t.hasOwnProperty("pictureSymbolSize")||(t.pictureSymbolSize=this._pictureSymbolSize),t.hasOwnProperty("picturePath")||(t.picturePath=this.picturePath),t.hasOwnProperty("modelPath")||(t.modelPath=this.modelPath),t.hasOwnProperty("modelScale")||(t.modelScale=this.modelScale),t.hasOwnProperty("modelRotate")||(t.modelRotate=this._modelRotate),t.hasOwnProperty("vectorScale")||(t.vectorScale=this.vectorScale),t.hasOwnProperty("middleMarkExist")||(t.middleMarkExist=this._isMiddleMarkExist),t.hasOwnProperty("middleMarkBounds")||(t.middleMarkBounds=this._middleMarkBounds),t.hasOwnProperty("vectorRotate")||(t.vectorRotate=this._vectorRotate),t.hasOwnProperty("vectorDefaultSize")||(t.vectorDefaultSize=this._vectorDefaultSize),t.hasOwnProperty("dotShowMode")||(t.dotShowMode=this._showMode),t.hasOwnProperty("innerCells")||(t.innerCells=this._innerCells),t.hasOwnProperty("surroundLineWidth3D")||(t.surroundlineWidth3D=this.surroundLineWidth),t.hasOwnProperty("middleMarkExist")||(t.middleMarkExist=this.middleMarkExist),t.hasOwnProperty("annotationPosition")||(t.annotationPosition=this._textPos),t.hasOwnProperty("gridSurroundLineWidth3D")||(t.gridSurroundLineWidth3D=this._gridSurroundLineWidth/4),t.hasOwnProperty("gridLineWidth")||(t.gridLineWidth3D=this._gridLineWidth/4),t.hasOwnProperty("symbolSizeInLib")||(t.symbolSizeInLib=this._symbolSizeInLib),t.hasOwnProperty("BloodVolumes")||(t.BloodVolumes=this.BloodVolumes),t.hasOwnProperty("bIsShowBloodVolume")||(t.bIsShowBloodVolume=this.bIsShowBloodVolume),t.hasOwnProperty("disableDepthTestDistance")||(t.disableDepthTestDistance=this._disableDepthTestDistance.toString()),t.hasOwnProperty("sizeInMeters")||(t.sizeInMeters=this.sizeInMeters),t.hasOwnProperty("symbolSizeInMeters")||(t.symbolSizeInMeters=this.symbolSizeInMeters),t.hasOwnProperty("alwaysHasMiddelText")||(t.alwaysHasMiddelText=this.alwaysHasMiddelText),t.style.hasOwnProperty("lineSymbolID")||(t.style.lineSymbolID=this._lineSymbolID);else{if(t.hasOwnProperty("surroundLineWidth3D")||(t.surroundlineWidth3D=this._symbolStyle._surroundLineWidth),t.hasOwnProperty("updateSubSize")||(t.updateSubSize=this._updateSubSize),t.hasOwnProperty("subSymbolSize")||(t.subSymbolSize=this._subSymbolSize),!t.hasOwnProperty("subSymbols")&&(t.subSymbols=[],this._subSymbols))for(var o=0;o<this._subSymbols.length;++o)t.subSymbols.push(this._subSymbols[o]);t.hasOwnProperty("scaleValues")||(t.scaleValues=this._scaleValues),t.hasOwnProperty("subSymbolScaleValue")||(t.subSymbolScaleValue=this._subSymbolScaleValue),t.hasOwnProperty("extendWallOpacity")||(t.wallOpaqueRate=100-this.extendWallOpacity),!t.hasOwnProperty("isClampToGround")&&WebGLPlot$f.defined(this.isClampToGround)&&(t.isClampToGround=this.isClampToGround),!t.hasOwnProperty("arrowHeadType")&&WebGLPlot$f.defined(this.arrowHeadType)&&(t.arrowHeadType=this.arrowHeadType),!t.hasOwnProperty("arrowBodyType")&&WebGLPlot$f.defined(this.arrowBodyType)&&(t.arrowBodyType=this.arrowBodyType),!t.hasOwnProperty("arrowTailType")&&WebGLPlot$f.defined(this.arrowTailType)&&(t.arrowTailType=this.arrowTailType),t.style.hasOwnProperty("extendWallHeight")||(t.style.extendHeight=this._extendWallHeight)}return(this._symbolType!==_0x18bc2f.SYMBOL_DOT||this._symbolType!==_0x18bc2f.SYMBOL_TEXT)&&(t._CenterPosition=this._CenterPosition),t.hasOwnProperty("textContent")||(t.textContent=this._textContent),t.hasOwnProperty("markHalo")||(t.markHalo=this._markHalo),t.hasOwnProperty("showTipLength")||(t.showTipLength=this._showTipLength),t.hasOwnProperty("extendProperty")||(t.extendProperty=this.extendProperty),t.hasOwnProperty("annotationArray")||(t.annotationArray=this.annotationArray),null!==this._GeoJsonFeature?(_0x5a4c87(this._GeoJsonFeature,t),this._GeoJsonFeature):t}toGeoJson(){var e=this.getSymbolData();return WebGLPlot$f.toJSON(e)}getMinEditPts(){return WebGLPlot$f.defined(this)?_0x2d6822.isSymbolDot(this._symbolType)?1:this.getMinEditPts():0}getMaxEditPts(){return WebGLPlot$f.defined(this)?_0x2d6822.isSymbolDot(this._symbolType)?1:this.getMaxEditPts():0}drawAnnotationArray(){if(this._annotationArray.length>0)for(var e=0;e<this._annotationArray.length;e++){var t=null,i=this._annotationArray[e];if(""!==i._textContent&&i){var n=i._textStyle,r=i._textContent,o=new WebGLPlot$f.Color(n._foreColor.red,n._foreColor.green,n._foreColor.blue,n._foreColor.alpha),a=n._fontSize+"px "+n._fontName;0!==i._localPoint.x&&0!==i._localPoint.y?t=i._localPoint:(t=this._localPoints[0].clone(),i._localPoint=t),t=WebGLPlot$f.Cartesian3.fromDegrees(t.x,t.y,t.z);var s={style:n._outline?WebGLPlot$f.LabelStyle.FILL_AND_OUTLINE:WebGLPlot$f.LabelStyle.FILL,outlineColor:n._outlineColor,outlineWidth:n._outlineWidth,position:t,text:r,font:a,fillColor:o,horizontalOrigin:WebGLPlot$f.HorizontalOrigin.CENTER,id:this._id};(s=_0x38860f.addAlgoLabel(this,s,this._layer._scene)).SymbolType=_0x18bc2f.SYMBOL_TEXT}}}clearAllAnnotationArray(){this.annotationArray=[]}setAnnotationArray(e,t,i){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t)||!WebGLPlot$f.defined(i)||this.annotationArray.length<=0)return!1;var n=this.annotationArray[e];switch(t){case"textContent":n.textContent=i;break;case"localPoint":n.localPoint=i;break;case"fontName":n._textStyle.fontName=i;break;case"foreColor":n._textStyle.foreColor=i;break;case"fontSize":n._textStyle.fontSize=i;break;case"outlineWidth":n._textStyle.outlineWidth=i;break;case"outlineColor":n._textStyle.outlineColor=i;break;case"outline":n._textStyle.outline=i}return this._initialize=!1,!0}releaseSelection(){this.layer&&this.layer._plottingEdit&&this.layer._plottingEdit.unSelection(!0)}_destroy(){}_destroyBase(){}}function _0x5a4c87(e,t){for(var i in t)"style"===i||"textStyle2D"===i||"textStyle3D"===i||(e[i]=t[i]);var n=new Object;for(var i in t.style)n[i]=t.style[i];e.style=n;var r=new Object;for(var i in t.textStyle2D)r[i]=t.textStyle2D[i];e.textStyle2D=r;var o=new Object;for(var i in t.textStyle3D)o[i]=t.textStyle3D[i];e.textStyle3D=o}function _0x1b9fe2(e){var t=new WebGLPlot$f.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,t}function _0x1a2b6f(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}Object.defineProperties(_0x21fac2.prototype,{libID:{get:function(){return this._libID},set:function(e){if(e===this._libID||"number"!=typeof e)return!1;this._libID=e}},code:{get:function(){return this._code},set:function(e){if(e===this._code||"number"!=typeof e)return!1;this._code=e}},symbolName:{get:function(){return this._symbolName},set:function(e){if(e===this._symbolName)return!1;this._symbolName=e}},symbolType:{get:function(){return this._symbolType}},id:{get:function(){return this._id},set:function(e){e!==this._id&&(this._id=e)}},localPoints:{get:function(){return this._localPoints},set:function(e){e===this._localPoints||!Array.isArray(e)||(this.__setEffectParameter({point:e[0]}),this._localPoints=e,_0x2d6822.isSymbolDot(this.symbolType)&&WebGLPlot$f.defined(this.billboard)?this.billboard.position=WebGLPlot$f.Cartesian3.fromDegrees(e[0].x,e[0].y,e[0].z):this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this),this._layer&&this._layer._isEditable&&this._layer._plottingEdit&&this._layer._plottingEdit._graphicObject&&this._layer._plottingEdit._graphicObject.id===this.id&&this._layer._plottingEdit.drawSymbolExtend(this))}},layer:{get:function(){return this._layer}},isEdit:{get:function(){return this._isEdit},set:function(e){e===this._isEdit||e.constructor!==Boolean||(this._isEdit=e,this._initialize=!1)}},middleMarkExist:{get:function(){return this._middleMarkExist}},symbolStyle:{get:function(){return this._symbolStyle},set:function(e){e===this._symbolStyle||"number"!=typeof e||(this._symbolStyle=e,this._initialize=!1)}},symbolTextStyle:{get:function(){return this._symbolTextStyle},set:function(e){e===this._symbolTextStyle||"number"!=typeof e||(this._symbolTextStyle=e,this._initialize=!1)}},markHalo:{get:function(){return this._markHalo},set:function(e){e===this._markHalo||e.constructor!==Boolean||(this._markHalo=e,this._initialize=!1)}},showTipLength:{get:function(){return this._showTipLength},set:function(e){e===this._showTipLength||"number"!=typeof e||(this._showTipLength=e,this._initialize=!1)}},display:{get:function(){return this._display},set:function(e){e===this._display||e.constructor!==Boolean||(this._display=e,this.setVisible(e),this.__setEffectParameter({visible:e}))}},symbol:{get:function(){return this}},extendProperty:{get:function(){return this._extendProperty}},annotationArray:{get:function(){return this._annotationArray},set:function(e){if(e===this._annotationArray||!Array.isArray(e))return null;var t=this._layer._plottingEdit.CtrlPosition._ctrlPoints;if(this._annotationArray=e,WebGLPlot$f.defined(e.length)&&0===e.length){if(WebGLPlot$f.defined(this._layer._plottingEdit))for(var i=0;i<t.length;i++){var n=t.get(i);WebGLPlot$f.defined(n.annotationIndex)&&(n.show=!1)}}else if(WebGLPlot$f.defined(e.length)&&0!==e.length){const i=this._layer._scene.camera._positionCartographic.height;if(this._isEdit&&WebGLPlot$f.defined(this._layer._plottingEdit)){for(var r=0;r<t.length;r++)WebGLPlot$f.defined(t.get(r).annotationIndex)&&(t.get(r).show=!1,t.remove(t.get(r)));for(var o=0;o<e.length;o++){var a=e[o];if(0===a._localPoint.x&&0===a._localPoint.y){const e=1.141e-8*i*(o+1);let t=this._localPoints[0].clone();t.x+=e,a._localPoint=t}this._layer._plottingEdit.addAnnotationArrayPositionPt(a,o)}}}this._initialize=!1}},wholeHeight:{get:function(){return this._wholeHeight},set:function(e){e===this._wholeHeight||"number"!=typeof e||(this._wholeHeight=e,this._initialize=!1)}},dotDepthTest:{get:function(){return this._dotDepthTest},set:function(e){e===this._dotDepthTest||e.constructor!==Boolean||(this._disableDepthTestDistance=e?Number.MAX_VALUE:Number.MIN_VALUE,this._dotDepthTest=e,this._initialize=!1)}},textContent:{get:function(){return this._textContent},set:function(e){e!==this._textContent&&(this._textContent=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}}});var _0x2b9fd7=(_0x11f0d0=!0,function(e,t){var i=_0x11f0d0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x11f0d0=!1,i}),_0xa4d6be=_0x2b9fd7(void 0,(function(){return _0xa4d6be.toString().search("(((.+)+)+)+$").toString().constructor(_0xa4d6be).search("(((.+)+)+)+$")})),_0x11f0d0;function _0x3a6b26(e,t){this.subObjects=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._id=void 0===t?WebGLPlot.createGuid():t,this._initialize=!0,this.subFeatures=[],this.symbolName="GroupObject",this._isEdit=!1,this.libID=0,this.code=_0x18bc2f.GROUPOBJECT,this.symbolType=_0x18bc2f.GROUPOBJECT,this.addComponents(this.subObjects),this._GeoJsonFeature=null,this._centerPt3D=new _0x11ff81}_0xa4d6be(),_0x3a6b26.prototype.addComponents=function(e){for(var t in e)e[t]&&(e[t]instanceof _0x21fac2||e[t]instanceof _0x3a6b26)&&this.subFeatures.push(e[t].clone());this._initialize=!1},_0x3a6b26.prototype.unGroupObject=function(e){for(var t in this.subObjects)this.subObjects[t]._initialize=!1;return this.subObjects},_0x3a6b26.prototype.setOffset=function(e,t){var i=e.z-this.getBounds().min_Z;for(var n in this.subFeatures){if(t)for(var r=0;r<this.subFeatures[n]._localPoints.length;r++)this.subFeatures[n]._localPoints[r].z+=i;else for(r=0;r<this.subFeatures[n]._localPoints.length;r++){var o=this.subFeatures[n]._localPoints[r];this.subFeatures[n]._localPoints[r]=new _0x11ff81(o.x+e.x,o.y+e.y,o.z+e.z)}this.subFeatures[n]._initialize=!1}},_0x3a6b26.prototype.clone=function(){return new _0x3a6b26(this.subFeatures)},_0x3a6b26.prototype.update=function(e,t,i,n){if(0!==this.subFeatures.length)for(var r=this.getSubObjectsFromFeatures(this.subFeatures),o=0;o<r.length;o++)r[o].update(e,t,i,n)},_0x3a6b26.prototype.initSymbol=function(){if(0!==this.subFeatures.length)for(var e=this.getSubObjectsFromFeatures(this.subFeatures),t=0;t<e.length;t++)e[t].initSymbol();this._initialize=!0},_0x3a6b26.prototype.getFeatureByUuid=function(e){var t=this.getSubObjectsFromFeatures(this.subFeatures);for(var i in t)if(t[i]._id===e)return!0;return!1},_0x3a6b26.prototype.getBounds=function(){var e=[],t=[],i=[],n=0,r=0;for(var o in this.subFeatures){var a=this.subFeatures[o];if(a.symbolType===_0x18bc2f.SYMBOL_DOT||a.symbolType===_0x18bc2f.SYMBOL_TEXT){a.showMode===_0x4e5d29.Marker?n=a._model._initialRadius*a._model.scale:a.showMode===_0x4e5d29.Vector&&(n=a._dotVector.vectorHeight);var s=a.localPoints[0];e.push(s.x),t.push(s.y),i.push(s.z),r=s.z+n}else if(a.symbolType===_0x18bc2f.GROUPOBJECT){var l=a.getBounds();e.push(l.max_X),t.push(l.max_Y),i.push(l.max_Z),e.push(l.min_X),t.push(l.min_Y),i.push(l.min_Z)}else{var u=a.computeBounds();for(var c in a.localPoints){var h=a.localPoints[c];e.push(h.x),t.push(h.y),i.push(h.z)}e.push(u.maxX),t.push(u.maxY),e.push(u.minX),t.push(u.minY)}}var d=Math.max.apply({},e),f=Math.max.apply({},t),p=Math.max.apply({},i);return{max_X:d,max_Y:f,max_Z:p=p>r?p:r,min_X:Math.min.apply({},e),min_Y:Math.min.apply({},t),min_Z:Math.min.apply({},i),modelRadius:n}},_0x3a6b26.prototype.getSubObjectsFromFeatures=function(e){var t=[];for(var i in e)e[i]instanceof _0x3a6b26?t=t.concat(this.getSubObjectsFromFeatures(e[i].subFeatures)):t.push(e[i]);return t},_0x3a6b26.prototype.getSymbolData=function(){if(null===this._GeoJsonFeature){var e={version:2,libID:0,code:1e3,type:"GRAPHICOBJECT"};for(var t in e.uuid=this._id,e.symbolName=this.symbolName,e.symbolType=this.symbolType,e.geometries=[],this.subFeatures)e.geometries.push(this.subFeatures[t].getSymbolData());return e}return this._GeoJsonFeature},_0x3a6b26.prototype._destroy=function(){for(var e in this.subFeatures)this.subFeatures[e]._destroy(),this.subFeatures[e]=null;this.subFeatures=[]};var _0xb2e33e=(_0x1e7d1a=!0,function(e,t){var i=_0x1e7d1a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e7d1a=!1,i}),_0xd16c68=_0xb2e33e(void 0,(function(){return _0xd16c68.toString().search("(((.+)+)+)+$").toString().constructor(_0xd16c68).search("(((.+)+)+)+$")})),_0x1e7d1a;_0xd16c68();var _0x67b2cd={UNKNOWN:0,PLAYING:1,PAUSE:2,STOP:3,RESET:4},_0x5140b5=Object.freeze(_0x67b2cd),_0x326aef=(_0x142337=!0,function(e,t){var i=_0x142337?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x142337=!1,i}),_0x10a2ba=_0x326aef(void 0,(function(){return _0x10a2ba.toString().search("(((.+)+)+)+$").toString().constructor(_0x10a2ba).search("(((.+)+)+)+$")})),_0x142337;_0x10a2ba();var _0x2b4314={ANIMATION_UNKNOWN:-1,ANIMATION_WAY:0,ANIMATION_BLINK:1,ANIMATION_ATTRIBUTE:2,ANIMATION_SHOW:3,ANIMATION_ROTATE:4,ANIMATION_SCALE:5,ANIMATION_GROW:6,ANIMATION_HIDE_EXP:12,ANIMATION_REDUCE_EXP:13,ANIMATION_MOVEIN_EXP:14,ANIMATION_MOVEOUT_EXP:15,ANIMATION_ZOOMIN_EXP:16,ANIMATION_ZOOMOUT_EXP:17,ANIMATION_CURVE_EXP:18,ANIMATION_BROKENLINE_EXP:19,ANIMATION_GROW_EXP:20,ANIMATION_WAY_EXP:21,ANIMATION_BLINK_EXP:22,ANIMATION_SHOW_EXP:23,ANIMATION_MOVEVIEW_EXP:24,ANIMATION_WAY_GROUP:25},_0x304306=Object.freeze(_0x2b4314),_0x154918=(_0xe8a5d1=!0,function(e,t){var i=_0xe8a5d1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe8a5d1=!1,i}),_0xf4f675=_0x154918(void 0,(function(){return _0xf4f675.toString().search("(((.+)+)+)+$").toString().constructor(_0xf4f675).search("(((.+)+)+)+$")})),_0xe8a5d1;_0xf4f675();var WebGLPlot$e=window.WebGLPlot=window.WebGLPlot||{};function _0x18cb5a(e,t){if(e&&!(t.points.length<2)){this.plottingLayer=WebGLPlot$e.defaultValue(e,null),this.libID=WebGLPlot$e.defaultValue(t.libID,0),this.code=WebGLPlot$e.defaultValue(t.code,99999),this.url=WebGLPlot$e.defaultValue(t.url,""),this.startTime=WebGLPlot$e.defaultValue(t.startTime,0),this.duration=WebGLPlot$e.defaultValue(t.duration,5),this.lineColor=WebGLPlot$e.defaultValue(t.lineColor,new WebGLPlot$e.Color(1,0,0,1)),this.lineWidth=WebGLPlot$e.defaultValue(t.lineWidth,1),this.linePtsCount=WebGLPlot$e.defaultValue(t.linePtsCount,100),this.pathType=WebGLPlot$e.defaultValue(t.pathType,0),this.isShowPathLine=WebGLPlot$e.defaultValue(t.isShowPathLine,!1),this.isTangentDirection=WebGLPlot$e.defaultValue(t.isTangentDirection,!0),this.PathPts=t.points;var i=this;if(0===this.libID&&99999===this.code){var n={libID:this.libID,code:this.code,url:this.url,points:this.PathPts};e.createModelAndPicture(n,(function(e){e.feature&&(i.geo=e.feature)}))}else e.createSymbol(t.libID,t.code,t.points,(function(e){e.feature&&(i.geo=e.feature,i.geo.modelPath=t.url,i.geo.showMode=_0x4e5d29.Marker)}));this._updatePathLinePts=[],this.Polylines=[],this.createPathLine()}}_0x18cb5a.prototype.setPathLineisVisible=function(e){this.isShowPathLine=e},_0x18cb5a.prototype.getPathLineisVisible=function(){return this.isShowPathLine},_0x18cb5a.prototype.setTangentDirection=function(e){this.isTangentDirection=e},_0x18cb5a.prototype.getTangentDirection=function(){return this.isTangentDirection},_0x18cb5a.prototype.play=function(){var e=new Date;this._animationState===_0x5140b5.PAUSE?this._innerStartTime+=e.getTime()/1e3-this._pauseTime:this._innerStartTime=e.getTime()/1e3,this._updatePathLinePts=[],this._lastExecute=!1,this._animationState=_0x5140b5.PLAYING},_0x18cb5a.prototype.pause=function(){if(this._animationState===_0x5140b5.PLAYING){this._animationState=_0x5140b5.PAUSE;var e=new Date;this._pauseTime=e.getTime()/1e3}},_0x18cb5a.prototype.stop=function(){this._animationState=_0x5140b5.STOP},_0x18cb5a.prototype.execute=function(){if(!this.geo||!this.canExecute())return!1;this.polyline&&(this.polyline.show=this.isShowPathLine);var e=this._ratio,t=new Object;if(!((t=this._findPos(e,this._shapePoints,t))&&t.pt instanceof _0x11ff81))return!1;this.geo.localPoints[0]=this.PtsToSpherical(t.pt);var i=t.index;if(this.isTangentDirection){t.angle;var n=this.modifyAnimationFollowPath(this._shapePoints,i,t.pt),r=57.29577951308232,o=this.geo.showMode;_0x4e5d29.Marker===o?this.geo._modelRotate=new _0x11ff81(n.x*r,n.y*r,n.z*r):_0x4e5d29.Vector===o&&(this.geo._vectorRotate=n)}return this.geo._initialize=!1,!0},_0x18cb5a.prototype.updatePathLine=function(e){this._updatePathLinePts.length>=this.linePtsCount&&this._updatePathLinePts.splice(0,1),this._updatePathLinePts.push(e);var t=WebGLPlot$e.Material.fromType(WebGLPlot$e.Material.ColorType,{color:this.lineColor});this.polyline&&(this.polyline.positions=this._updatePathLinePts,this.polyline.width=this.lineWidth,this.polyline._material=t)},_0x18cb5a.prototype.createPathLine=function(){this.computerPathLinePts();var e=WebGLPlot$e.Material.fromType(WebGLPlot$e.Material.ColorType,{color:this.lineColor});if(!this.polyline){var t={width:this.lineWidth,positions:this._shapePoints,material:e,id:this.geo.id+"_PathLine"};this.polyline=_0x38860f.addAlgoPloyline(this,t,this.plottingLayer._scene),this.polyline&&(this.polyline.show=!1)}},_0x18cb5a.prototype.computerPathLinePts=function(){if(0===this.pathType)this._shapePoints=this.PathPts;else{var e=_0x2d6822.generateBezierCtrlPts(this.PathPts);this._shapePoints=_0x2d6822.generateBezierPointsWithCtrlPts(e)}for(var t=[],i=0;i<this._shapePoints.length;i++){var n=this._shapePoints[i];t.push(n.x),t.push(n.y),t.push(n.z)}this._shapePoints=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(t),this._pathLineLength=0;for(var r=1;r<this._shapePoints.length;r++)this._pathLineLength+=_0x2d6822.distance3D(this._shapePoints[r-1],this._shapePoints[r])},_0x18cb5a.prototype.canExecute=function(){if(this._animationState!==_0x5140b5.PLAYING)return!1;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this.startTime>e)return!1;var t=this.getRatioByTime();return!(t>1&&this._lastExecute||t<0)},_0x18cb5a.prototype.getRatioByTime=function(){if(this._animationState!==_0x5140b5.PLAYING)return 0;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this.startTime>e)return 0;var t=(e-this._innerStartTime-this.startTime)/this.duration;return t>=1&&!this._lastExecute?this._repeat?(this._innerStartTime=(new Date).getTime()/1e3,t=0,this._lastExecute=!1,this._animationState=_0x5140b5.PLAYING):(t=1,this._lastExecute=!0,this._animationState=_0x5140b5.STOP):t<0&&(t=0),this._ratio=t,t},_0x18cb5a.prototype._findPos=function(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLineLength)).result)return!1;var n=i.pt;return this.isTangentDirection&&(i.angle=_0x2d6822.radian(n,t[i.index])/Math.PI*180),i},_0x18cb5a.prototype.getPtsIndexByDistance=function(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x2d6822.distance(e[o],e[o+1]))>=t){var a=_0x2d6822.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x11ff81(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n},_0x18cb5a.prototype.modifyAnimationFollowPath=function(e,t,i){if(this.isTangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot$e.Cartesian3;u=WebGLPlot$e.Cartesian3.subtract(l[0],a,u),u=WebGLPlot$e.Cartesian3.normalize(u,u);var c=new WebGLPlot$e.Cartesian3;c=WebGLPlot$e.Cartesian3.subtract(s,a,c),c=WebGLPlot$e.Cartesian3.normalize(c,c);var h=new WebGLPlot$e.Cartesian3;h=WebGLPlot$e.Cartesian3.cross(c,u,h),h=WebGLPlot$e.Cartesian3.normalize(h,h);var d=new WebGLPlot$e.Cartesian3;d=WebGLPlot$e.Cartesian3.cross(h,c,d),d=WebGLPlot$e.Cartesian3.normalize(d,d),c=new WebGLPlot$e.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot$e.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot$e.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),h=WebGLPlot$e.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),c=WebGLPlot$e.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),d=WebGLPlot$e.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot$e.Cartesian3(p,_,m)}},_0x18cb5a.prototype.FromAngleAxis=function(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x11ff81(r*i.x,r*i.y,r*i.z),s=new _0x11ff81;s=WebGLPlot$e.Cartesian3.cross(a,e,s);var l=new _0x11ff81;l=WebGLPlot$e.Cartesian3.cross(a,s,l);var u=new _0x11ff81(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x11ff81(2*l.x,2*l.y,2*l.z);return new _0x11ff81(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)},_0x18cb5a.prototype.ToEulerAnglesXYZ=function(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x11ff81(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x11ff81((n=0)-Math.atan2(t.x,t.y),r,n):new _0x11ff81(Math.atan2(t.x,t.y)-(n=0),r,n)},_0x18cb5a.prototype.PtsToSpherical=function(e){var t=this.plottingLayer._scene.globe.ellipsoid,i=new WebGLPlot$e.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot$e.CesiumMath.toDegrees(n.latitude);return new _0x11ff81(WebGLPlot$e.CesiumMath.toDegrees(n.longitude),r,n.height)};var _0x3c74ee=(_0x425058=!0,function(e,t){var i=_0x425058?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x425058=!1,i}),_0x33edc8=_0x3c74ee(void 0,(function(){return _0x33edc8.toString().search("(((.+)+)+)+$").toString().constructor(_0x33edc8).search("(((.+)+)+)+$")})),_0x425058;_0x33edc8();var WebGLPlot$d=window.WebGLPlot=window.WebGLPlot||{};class _0x4381c6 extends _0x21fac2{constructor(e){super(e=WebGLPlot$d.defaultValue(e,WebGLPlot$d.defaultValue.EMPTY_OBJECT)),this._scalePoints=WebGLPlot$d.defaultValue(e.scalePoints,[]),this._scaleValues=WebGLPlot$d.defaultValue(e.scaleValues,[]),this._subSymbols=WebGLPlot$d.defaultValue(e.subSymbols,[]),this._isPixelLine=WebGLPlot$d.defaultValue(e.isPixelLine,!0),this._layer=WebGLPlot$d.defaultValue(e.layer,null),this._isEdit=WebGLPlot$d.defaultValue(e.isEdit,!0),this._extendWallOpacity=WebGLPlot$d.defaultValue(e.extendWallOpacity,.7),this._wholeHeight=0,this._isScalePtModify=!1,this._modifyScalePtParams=null,this._symbolAlgo=null,this._updateSubSize=!0,this._subSymbolSize=0,this._isAnimationFeature=!1,this._subSymbolScaleValue=.1,this.sceneMode=WebGLPlot$d.SceneMode.SCENE3D,this.fillCanvas=document.createElement("canvas"),this.mergeDefaultStyle(),this._isClampToGround=!1,this.Polylines=[],this.PolygonFillInstances=[],this.WallInstances=[],this.GroundLineInstances=[],this._SubSymbolDefaultPixelSize=20}initSymbol(){if((!this._initialize||this.sceneMode!==this._layer._scene.mode)&&(this._initialize=!0,WebGLPlot$d.defined(this._layer)&&WebGLPlot$d.defined(this._layer._scene)&&(this.sceneMode=this._layer._scene.mode),this._clearCells(),this._display&&this._layer.visibility&&(null===this._symbolAlgo&&(this._symbolAlgo=WebGLPlot$d.createAlgo({libID:this.libID,code:this.code}),this._subSymbols.length>0&&this._subSymbols.symbolData?this._symbolAlgo.subSymbols=this._subSymbols:this.createSubSymbolData()),WebGLPlot$d.defined(this._symbolAlgo)))){this.__setArrowType();var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.localPoints);if(e=_0x2d6822.clearNextSamePts(e),!(this.symbolType!==_0x18bc2f.SYMBOL_TEXT&&e.length<2)){var t,i=this.localPoints.length;this._dHeight=0;for(var n=[],r=0;r<i;r++)0===r?this._dHeight=this.localPoints[0].z:this._dHeight<this.localPoints[r].z&&(this._dHeight=this.localPoints[r].z),0!==this._wholeHeight&&(this.localPoints[r].z=this._wholeHeight,this._dHeight=this._wholeHeight),n.push(new _0x11ff81(this.localPoints[r].x,this.localPoints[r].y,this.localPoints[r].z));if(this._symbolAlgo.controlPoints=n,this.setAlgoDefaultValue(),this._scalePoints=[],this._symbolAlgo.scaleValues.length<=this._scaleValues.length&&(this._symbolAlgo.scaleValues=this._scaleValues),this._symbolAlgo.style={color:this.symbolStyle.lineColor},WebGLPlot$d.defined(this._symbolAlgo.subSymbolScaleValue)?this._subSymbolScaleValue=this._symbolAlgo.subSymbolScaleValue:this._symbolAlgo.subSymbolScaleValue=this._subSymbolScaleValue,this._isScalePtModify){var o=this._modifyScalePtParams.index,a=this._modifyScalePtParams.position;a.isScalePoint=!0,this._symbolAlgo.isEdit=!0,this._symbolAlgo.modifyPoint(o,a),t=this._symbolAlgo.components}else this._updateSubSize&&!this._isAnimationFeature?(this._symbolAlgo.subSymbolDefaultPixelSize=this._SubSymbolDefaultPixelSize,this._symbolAlgo.subSymbolSize=this.pixelDisToRealDis(this._symbolAlgo.controlPoints[0],this._symbolAlgo.subSymbolDefaultPixelSize),this._subSymbolSize=this._symbolAlgo.subSymbolSize,this._updateSubSize=!1,this.createSubSymbolData()):this._symbolAlgo.subSymbolSize=this._subSymbolSize,this._isAnimationFeature&&(this._symbolAlgo.isEdit=!0,this._symbolAlgo.subSymbolScaleValue=this._subSymbolScaleValue),this._symbolAlgo.isEdit=this._isEdit,this._symbolAlgo.calculateParts(),t=this._symbolAlgo.components;if(this._scalePoints=this._symbolAlgo.scalePoints,this._scaleValues=this._symbolAlgo.scaleValues,this._subSymbols=this._symbolAlgo.subSymbols,WebGLPlot$d.defined(t)){var s=[];if(s=Array.isArray(t)?t:[t],0===this.libID&&this.code===_0x18bc2f.SYMBOL_COMBINATIONALCIRCLE)for(let e=0;e<s.length;e++){const t=s[e];if(t&&t.type===_0x18bc2f.SYMBOL_ARBITRARYPOLYGON){s.splice(e,1);break}}this.createGeometryInstances(s,this._dHeight),this._pushCollentionInstances(this.id),_0x38860f.setUpdatePrimitive(!0,this._layer._scene),this._initSymbolFinished.raiseEvent(this)}}}}getMinEditPts(){return WebGLPlot$d.defined(this._symbolAlgo)?this._symbolAlgo.minEditPts:0}getMaxEditPts(){return WebGLPlot$d.defined(this._symbolAlgo)?this._symbolAlgo.maxEditPts:0}getSymbolName(){return WebGLPlot$d.defined(this._symbolAlgo)&&0!==this._symbolAlgo.symbolName.length?this._symbolAlgo.symbolName:""}createGeometryInstances(e,t){var i=this.isAllPointsHaveZ(e),n=[],r=this.computeBounds(e);let o=[];for(var a=0;a<e.length;a++){var s=e[a];Array.isArray(s.positionPoints)||(s.positionPoints=[s.positionPoints]);var l=s.positionPoints;if(s.shapePts&&(l=s.shapePts),!WebGLPlot$d.defined(l))return n;if(0===this.libID&&34===this.code&&(this._symbolAlgo.maxEditPts=1,this._symbolAlgo.minEditPts=1,l=[s.positionPoints[0]]),l.length>1){_0x2d6822.isSymbolCellCanFill(s)&&l.push(l[0]);for(var u=[],c=[],h=[],d=0;d<l.length;d++){var f=l[d];isNaN(f.x)||isNaN(f.y)||((isNaN(f.z)||void 0===f.z)&&(f.z=0),WebGLPlot$d.defined(this._layer)&&WebGLPlot$d.defined(this._layer._scene)&&this._layer._scene.mode===WebGLPlot$d.SceneMode.SCENE2D&&(t=0,f.z=0),i&&0!==this.libID||48===this.code||24===this.code||32===this.code?c.push(new _0x11ff81(f.x,f.y,f.z)):(f=new _0x11ff81(f.x,f.y,t),c.push(new _0x11ff81(f.x,f.y,t))),u.push(WebGLPlot$d.Cartesian3.fromDegrees(f.x,f.y,f.z)),h.push(f.z))}if(u=this.interPolation(u),0===this.libID&&this.code===_0x18bc2f.SYMBOL_COMBINATIONALCIRCLE&&29!==s.type&&o.push(u),0===this.libID&&this.code===_0x18bc2f.SYMBOL_CONCENTRICCIRCLE){if(29===s.type&&o.unshift(u),0===s.style.strokeWidth&&s.style.lineWidthLimit)continue}else if(this.createFillGeometry(s,u),0===s.style.strokeWidth&&s.style.lineWidthLimit){this._symbolStyle._fillSymbolID||this.generateFillGeometry(u,void 0);continue}var p=this._symbolStyle._surroundLineType;if(s.style&&s.style.surroundLineLimit){p===_0x26609d.SURROUNDLINE_NONE&&(p=s.style.surroundLineType);for(var _=this.generateSurroundLineGeometry(c,u,r,s.style,p),m=0;m<_.length;m++)_[m]&&n.push(_[m])}else if(_0x26609d.SURROUNDLINE_NONE!==this._symbolStyle._surroundLineType)for(_=this.generateSurroundLineGeometry(c,u,r,this._symbolStyle,p),m=0;m<_.length;m++)_[m]&&n.push(_[m]);var g=this._symbolStyle._lineWidth,x=null;s.style.lineColorLimit?(x=_0x2d6822.StringtoColor(s.style.color)).alpha=s.style.strokeOpacity:(x=this._symbolStyle._lineColor).alpha=this._symbolStyle._opacity,this._layer.selectedFeature&&this._id===this._layer.selectedFeature.id&&!this._layer.isEditable&&(x=new WebGLPlot$d.Color(0,0,1,1));var v=WebGLPlot$d.getDefaultStyle({libID:this.libID,code:this.code});v.color&&((x=_0x2d6822.StringtoColor(v.color)).alpha=this._symbolStyle._opacity);var y=this.createLineGeometry(u,g,x);if(null!==y&&n.push(y),this._extendWallHeight>0&&u.length>1){x=this._symbolStyle._lineColor;x=WebGLPlot$d.Color.fromAlpha(x,this._extendWallOpacity),this.createExtendWall(u,x,h)}}else 1===l.length&&34===s.type&&this.addTextContent(s,t);this.drawAnnotationArray()}return o.length>0&1!==this._symbolStyle._fillSymbolID&&this.generateFillGeometry(o,void 0,!0),n}computeBounds(e){var t=0,i=0,n=180,r=180,o=!1;WebGLPlot$d.defined(e)||(e=this._symbolAlgo.components,o=!0);for(var a=0;a<e.length;a++){var s=e[a];if(0!==s.style.weight){Array.isArray(s.positionPoints)||(s.positionPoints=[s.positionPoints]);var l=void 0;if(0===this.libID&&1014!==this.code&&1022!==this.code&&_0x18bc2f.SYMBOL_CIRCLE===s.type){let e=WebGLPlot$d.Cartesian3.fromDegrees(s.positionPoints[0].x,s.positionPoints[0].y,s.positionPoints[0].z),t=WebGLPlot$d.Cartesian3.fromDegrees(s.positionPoints[1].x,s.positionPoints[1].y,s.positionPoints[1].z);var u=WebGLPlot$d.Transforms.eastNorthUpToFixedFrame(e);const i=WebGLPlot$d.Cartesian3.distance(e,t);for(var c=_0x2d6822.calcCirclePts(i,new WebGLPlot$d.Cartesian3(0,0,0),72),h=[],d=0;d<c.length;d++){var f=new WebGLPlot$d.Cartesian3,p=new WebGLPlot$d.Cartesian3;f=WebGLPlot$d.Cartesian3.multiplyByScalar(new WebGLPlot$d.Cartesian3(c[d].x,c[d].y,0),1,f),p=WebGLPlot$d.Matrix4.multiplyByPoint(u,f,p);var _=WebGLPlot$d.Cartographic.fromCartesian(p);const e=WebGLPlot$d.CesiumMath.toDegrees(_.longitude),t=WebGLPlot$d.CesiumMath.toDegrees(_.latitude);h.push(new WebGLPlot$d.Cartesian3(e,t,0))}l=h,s.shapePts=h}else l=WebGLPlot$d.getSpatialData(s.type,s.positionPoints),s.shapePts=l;if(WebGLPlot$d.defined(l))for(var m=0;m<l.length;++m)l[m].x<n&&(n=l[m].x),l[m].y<r&&(r=l[m].y),l[m].x>t&&(t=l[m].x),l[m].y>i&&(i=l[m].y)}}this._CenterPosition=new _0x11ff81((t+n)/2,(r+i)/2,0);var g=t-n,x=i-r;return o?{x:n+g/2,y:r,z:0,maxX:t,maxY:i,minX:n,minY:r}:g>=x?g:x}generateSurroundLineGeometry(e,t,i,n,r){var o,a,s,l=[],u=[],c=[],h=this.symbolStyle.surroundLineColor;switch(h=WebGLPlot$d.Color.fromAlpha(h,this.symbolStyle.opacity),n.surroundLineLimit&&(r=n.surroundLineType,n.lineColorLimit&&((!n.surroundLineColor||""===n.surroundLineColor)&&(n.surroundLineColor="#ffff00"),(h=_0x249384(n.surroundLineColor)).alpha=n.surroundLineColorOpacity)),r){case _0x26609d.SURROUNDLINE_ALL:a=this._symbolStyle._surroundLineWidth/2+this._symbolStyle._lineWidth/2,this._isPixelLine&&(a=this._surroundRatioVal*i),s=_0x2d6822.getSurroundLinePts(e,a);for(var d=0;d<s.length;++d)u.push(new WebGLPlot$d.Cartesian3.fromDegrees(s[d].x,s[d].y,s[d].z));a=-a;for(var f=(s=_0x2d6822.getSurroundLinePts(e,a)).length-1;f>=0;--f)c.push(new WebGLPlot$d.Cartesian3.fromDegrees(s[f].x,s[f].y,s[f].z));o=this._symbolStyle._surroundLineWidth;break;case _0x26609d.SURROUNDLINE_INNER:case _0x26609d.SURROUNDLINE_OUT:a=this._symbolStyle._surroundLineWidth/2+this._symbolStyle._lineWidth/2,this._isPixelLine&&(a=this._surroundRatioVal*i),r===_0x26609d.SURROUNDLINE_INNER&&(a=-a),s=_0x2d6822.getSurroundLinePts(e,a);for(d=0;d<s.length;++d)u.push(new WebGLPlot$d.Cartesian3.fromDegrees(s[d].x,s[d].y,s[d].z));o=this._symbolStyle._surroundLineWidth}return u.length<2||(u=this.interPolation(u),l.push(this.createLineGeometry(u,o,h,!0)),c.length>=2&&(c=this.interPolation(c),l.push(this.createLineGeometry(c,o,h,!0)))),l}createFillGeometry(e,t){if(!e.style.fillLimit||e.style.fill){if((e.style.fillLimit&&e.style.fill||0===e.style.fillStyle&&e.style.fillLimit)&&_0x2d6822.isSymbolCellCanFill(e))return void this.generateFillGeometry(t,e.style);if(1!==this.symbolStyle.fillSymbolID&&(_0x2d6822.isCanFill(this)||_0x2d6822.isSymbolCellCanFill(e)))return void this.generateFillGeometry(t,void 0);if(WebGLPlot$d.defined(e.style.fillSymbolID)&&0===e.style.fillSymbolID)return void this.generateFillGeometry(t,e.style)}}generateFillGeometry(e,t,i){var n,r,o=void 0;if(i){let t=0;for(let i=1;i<e.length;i++)e[i].length>e[t].length&&(t=i);let i=WebGLPlot$d.clonePoints(e[t]);e.splice(t,1);let n=[];for(let t=0;t<e.length;t++){let i=e[t];n.push(new WebGLPlot$d.PolygonHierarchy(i))}let r=new WebGLPlot$d.PolygonHierarchy(i,n);o=new WebGLPlot$d.PolygonGeometry({polygonHierarchy:r,perPositionHeight:!0})}else o=WebGLPlot$d.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0});if(WebGLPlot$d.defined(t)&&t.fillLimit?n=WebGLPlot$d.defined(t.fillColor)&&t.fillColorLimit?_0x2d6822.StringtoColor(t.fillColor):t.color&&t.fillColorLimit?WebGLPlot$d.Color.clone(_0x2d6822.StringtoColor(t.color)):WebGLPlot$d.Color.clone(this._symbolStyle._lineColor):(n=WebGLPlot$d.Color.clone(this._symbolStyle._fillForeColor)).alpha=1-this._symbolStyle._fillOpaqueRate/100,this._layer.selectedFeature&&this._id===this._layer.selectedFeature.id&&!this._layer.isEditable&&(n=new WebGLPlot$d.Color(0,0,1,1)),null!==(r=this.isClampToGround?o:WebGLPlot$d.PolygonGeometry.createGeometry(o))&&WebGLPlot$d.defined(r)){var a=new WebGLPlot$d.GeometryInstance({geometry:r,id:this.id,attributes:{color:WebGLPlot$d.ColorGeometryInstanceAttribute.fromColor(n)}});a.ForeRGBA=n.toRgba(),a.BackRGBA=this._symbolStyle._fillBackColor.toRgba(),a.isClampToGround=this.isClampToGround,a._isAnimationFeature=this._isAnimationFeature,this.PolygonFillInstances.push(a)}}createFillCanvas(){var e=this.fillCanvas.width=100,t=this.fillCanvas.height=100;this._ctx=this.fillCanvas.getContext("2d");var i=null;switch(this._symbolStyle._fillGradientMode){case 1:i=this._ctx.createLinearGradient(0,0,e,t);break;case 2:var n=e/2,r=t/2,o=e/4,a=2*o;i=this._ctx.createRadialGradient(n,r,o,n,r,a)}return i.addColorStop(0,this._symbolStyle._fillForeColor.toCssColorString()),i.addColorStop(1,this._symbolStyle._fillBackColor.toCssColorString()),this._ctx.fillStyle=i,this._ctx.fillRect(0,0,100,100),this.fillCanvas}isAllPointsHaveZ(e){for(var t=!0,i=0;i<e.length;i++)for(var n=e[i],r=0;r<n.positionPoints.length;r++){if(void 0===n.positionPoints[r].z){t=!1;break}}return t}createSubSymbolData(){0===this._subSymbols.length&&this._symbolAlgo&&(this._subSymbols=JSON.parse(JSON.stringify(this._symbolAlgo.subSymbols)));for(var e=0;e<this._subSymbols.length;e++)this.getServerData(this._subSymbols[e],e)}getServerData(e,t,i){var n=this,r=WebGLPlot$d.getLibManager(this._layer._scene._plottingID).getSymbolData(e.libID,e.code);if(WebGLPlot$d.defined(r)&&null!==r){var o=[];if(!WebGLPlot$d.defined(r.innerCells))return;for(var a=0;a<r.innerCells.length;a++)r.innerCells[a].surroundLineFlag||o.push(r.innerCells[a]);return r.innerCells=o,e.symbolData=r,n._symbolAlgo.subSymbols[t]=e,n._initialize=!1,i&&i(),!0}var s=WebGLPlot$d.getServerData(e.libID,e.code,void 0,this._layer._scene._plottingID);!s||(s.getSymbolInfo.events.on({processCompleted:function(r){var o=r.result,a=[];if(WebGLPlot$d.defined(o.innerCells)){for(var s=0;s<o.innerCells.length;s++)o.innerCells[s].surroundLineFlag||a.push(o.innerCells[s]);return o.innerCells=a,e.symbolData=o,n._symbolAlgo.subSymbols[t]=e,n._initialize=!1,i&&i(),!0}},processFailed:function(e){},scope:this}),s.getSymbolInfo.processAsync(s.getSymbolInfoParameters))}pixelDisToRealDis(e,t){if(void 0===e)return 0;var i=this._layer._scene,n=WebGLPlot$d.Cartesian3.fromDegrees(e.x,e.y,e.z),r=WebGLPlot$d.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(!WebGLPlot$d.defined(r))return.001;var o=new WebGLPlot$d.Cartesian2(r.x,r.y+t),a=_0x2d6822.getPosition2(i,r),s=_0x2d6822.getPosition2(i,o);return _0x2d6822.distance(a,s)}setAlgoDefaultValue(){if(this._updateSubSize&&0===this._symbolAlgo.libID&&1019===this._symbolAlgo.code&&(this._symbolAlgo.startAngle=0,this._symbolAlgo.endAngle=360),0===this._symbolAlgo.libID&&1022===this._symbolAlgo.code){WebGLPlot$d.defined(this._symbolAlgo.radius)||(this._symbolAlgo.radius=[]);var e=this.localPoints;if(this._symbolAlgo.radius.length<e.length){var t=this.pixelDisToRealDis(e[0],this._symbolAlgo.defaultRadius);this._symbolAlgo.radius.push(t)}}}addTextContent(e,t){if(WebGLPlot$d.defined(e.textContent)&&null!==e.textContent){0===e.textContent.length&&(!WebGLPlot$d.defined(this.textContent)||0===this.textContent.length)&&(this.textContent="AaBb"),0!==e.textContent.length&&(this.textContent=e.textContent);var i=this.textContent,n=WebGLPlot$d.Cartesian3.fromDegrees(e.positionPoints[0].x,e.positionPoints[0].y,t),r=this._symbolTextStyle,o=new WebGLPlot$d.Color(r._foreColor.red,r._foreColor.green,r._foreColor.blue,r._foreColor.alpha);this._isSelected&&(o=new WebGLPlot$d.Color(0,1,0,1));var a,s=r._fontSize+"px "+r._fontName;0===this.libID&&34===this.code?a={style:r.outline?WebGLPlot$d.LabelStyle.FILL_AND_OUTLINE:WebGLPlot$d.LabelStyle.FILL,outlineColor:r._backColor,outlineWidth:r.outlineWidth,position:n,text:i,font:s,fillColor:o,horizontalOrigin:WebGLPlot$d.HorizontalOrigin.CENTER,id:this._id}:(WebGLPlot$d.defined(e.style.fontColorLimit)&&WebGLPlot$d.defined(e.style.fontColor)&&e.style.fontColorLimit&&(o=_0x249384(e.style.fontColor)),a={position:n,text:i,font:s,fillColor:o,horizontalOrigin:WebGLPlot$d.HorizontalOrigin.CENTER}),(a=_0x38860f.addAlgoLabel(this,a,this._layer._scene)).SymbolType=_0x18bc2f.SYMBOL_TEXT}}createExtendWall(e,t,i){var n=[],r=[];if(i.length===e.length)for(let e=0;e<i.length;e++){var o=i[e]-this._extendWallHeight;n.push(o),0===this._dHeight?r.push(.1):r=void 0}else for(var a=0;a<e.length;a++){(o=WebGLPlot$d.Cartographic.fromCartesian(e[a]).height-this._extendWallHeight)<0&&(o=0),n.push(o),0===this._dHeight?r.push(.1):r=void 0}var s=new WebGLPlot$d.WallGeometry({positions:e,minimumHeights:n,maximumHeights:r}),l=WebGLPlot$d.WallGeometry.createGeometry(s);if(WebGLPlot$d.defined(l)){var u=WebGLPlot$d.ColorGeometryInstanceAttribute.fromColor({alpha:0,red:1,green:1,blue:0}),c=new WebGLPlot$d.GeometryInstance({geometry:l,attributes:{color:u},id:this.id});c.ForeRGBA=t.toRgba(),c._isAnimationFeature=this._isAnimationFeature,this.WallInstances.push(c)}}setSubSymbols(e,t){if(0===this._symbolAlgo.subSymbols.length&&0===this.libID&&1025!==this.code||e===this._subSymbols[t])return!1;{this._initialize=!1;let i=this;return this.getServerData(e,t,(function(){_0x47a70a.getInstance().symbolModified.raiseEvent(i)})),!0}}createLineGeometry(e,t,i,n){if(this.isClampToGround&&!this.isDrawing)return this.createGroundPolylineGeometry(e,t,i,n),null;var r=void 0;if(this._isPixelLine){var o={width:t,positions:e,material:WebGLPlot$d.Material.fromType(WebGLPlot$d.Material.ColorType,{color:i}),id:this.id};return(o=_0x38860f.addAlgoPloyline(this,o,this._layer._scene)).SymbolType=_0x18bc2f.SYMBOL_ALGO,o}var a=new WebGLPlot$d.PolylineVolumeGeometry({polylinePositions:e,shapePositions:[new WebGLPlot$d.Cartesian2(-.5*t,-.5*t),new WebGLPlot$d.Cartesian2(.5*t,-.5*t),new WebGLPlot$d.Cartesian2(.5*t,.5*t),new WebGLPlot$d.Cartesian2(-.5*t,.5*t)],cornerType:2});if(r=WebGLPlot$d.PolylineVolumeGeometry.createGeometry(a),!WebGLPlot$d.defined(r))return null;var s=new WebGLPlot$d.GeometryInstance({geometry:r,id:this.id,attributes:{color:i}});return n&&(s.bIsSurroundLine=!0),s}createGroundPolylineGeometry(e,t,i,n){var r=new WebGLPlot$d.GroundPolylineGeometry({vertexFormat:WebGLPlot$d.VertexFormat.POSITION_ONLY,positions:e,width:t}),o=new WebGLPlot$d.GeometryInstance({geometry:r,attributes:{color:WebGLPlot$d.ColorGeometryInstanceAttribute.fromColor(i)},id:this._id});n&&(o.bIsSurroundLine=!0),o._isAnimationFeature=this._isAnimationFeature,this.GroundLineInstances.push(o)}_destroy(){_0x47a70a.getInstance().symbolDestroyed.raiseEvent(this.id),this._clearCells(),_0x38860f.setUpdatePrimitive(!0,this._layer._scene)}_clearCells(){_0x38860f.removeAllAlgoPloyline(this,this._layer._scene),_0x38860f.removeAllAlgoLabel(this,this._layer._scene),this.PolygonFillInstances=[],this.WallInstances=[],this.GroundLineInstances=[],this._pushCollentionInstances(this.id)}_pushCollentionInstances(e){this.PolygonFillInstances.length>0?_0x38860f.setPolygonFillInstances(e,this.PolygonFillInstances,this._layer._scene):_0x38860f.setPolygonFillInstances(e,[],this._layer._scene),this.WallInstances.length>0?_0x38860f.setWallInstances(e,this.WallInstances,this._layer._scene):_0x38860f.setWallInstances(e,[],this._layer._scene),this.GroundLineInstances.length>0?_0x38860f.setGroundInstances(e,this.GroundLineInstances,this._layer._scene):_0x38860f.setGroundInstances(e,[],this._layer._scene)}clone(){var e=new _0x4381c6({layer:this._layer,libID:this._libID,code:this._code,localPoints:this.localPoints,serverData:this._serverData});return e._libID=JSON.parse(JSON.stringify(this._libID)),e._code=JSON.parse(JSON.stringify(this._code)),e._symbolName=JSON.parse(JSON.stringify(this._symbolName)),e._symbolType=JSON.parse(JSON.stringify(this._symbolType)),e._display=JSON.parse(JSON.stringify(this._display)),e._id=JSON.parse(JSON.stringify(this._id)),e._initialize=JSON.parse(JSON.stringify(!1)),e._isEdit=JSON.parse(JSON.stringify(this._isEdit)),e._isUseSymbolLibStyle=JSON.parse(JSON.stringify(this._isUseSymbolLibStyle)),e._markHalo=JSON.parse(JSON.stringify(this._markHalo)),e._localPoints=WebGLPlot$d.clonePoints(this.localPoints),e._symbolStyle=this._symbolStyle.clone(),e._symbolTextStyle=this._symbolTextStyle.clone(),e._serverData=JSON.parse(JSON.stringify(this._serverData)),e._extendProperty=JSON.parse(JSON.stringify(this._extendProperty)),e._annotationArray=JSON.parse(JSON.stringify(this._annotationArray)),e._extendWallHeight=JSON.parse(JSON.stringify(this._extendWallHeight)),e._wholeHeight=JSON.parse(JSON.stringify(this._wholeHeight)),e._scaleValues=JSON.parse(JSON.stringify(this._scaleValues)),e._subSymbolSize=JSON.parse(JSON.stringify(this._subSymbolSize)),e._subSymbols=JSON.parse(JSON.stringify(this._subSymbols)),e._isUpdateSubSymbolSize=JSON.parse(JSON.stringify(this._updateSubSize)),e._isAnimationFeature=JSON.parse(JSON.stringify(this._isAnimationFeature)),e._subSymbolScaleValue=JSON.parse(JSON.stringify(this._subSymbolScaleValue)),e._extendWallOpacity=JSON.parse(JSON.stringify(this._extendWallOpacity)),e.isClampToGround=JSON.parse(JSON.stringify(this.isClampToGround)),e}interPolation(e){var t=[];for(let n=0;n<e.length;n++){const r=e[n];var i=WebGLPlot$d.Cartographic.fromCartesian(r);t.push(i.height+1)}return WebGLPlot$d.PolylinePipeline.generateCartesianArc({positions:e,height:t,minDistance:WebGLPlot$d.defaultValue(WebGLPlot$d.Plotting._AlgoSymoblPipelineDisMin,1e4)}).push(e[e.length-1]),e}__setArrowType(){this._symbolAlgo&&(WebGLPlot$d.defined(this._arrowHeadType)&&(this._symbolAlgo.arrowHeadType=this._arrowHeadType),WebGLPlot$d.defined(this._arrowBodyType)&&(this._symbolAlgo.arrowBodyType=this._arrowBodyType),WebGLPlot$d.defined(this._arrowTailType)&&(this._symbolAlgo.arrowTailType=this._arrowTailType))}}function _0x249384(e){if(!e||""===e)return new WebGLPlot$d.Color(1,0,0);var t=parseInt(e.slice(1,3),16)/255,i=parseInt(e.slice(3,5),16)/255,n=parseInt(e.slice(5,7),16)/255;return new WebGLPlot$d.Color(t,i,n)}Object.defineProperties(_0x4381c6.prototype,{subSymbols:{get:function(){return this._subSymbols},set:function(e){e===this._subSymbols||!Array.isArray(e)||(this._subSymbols=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},ispixelLine:{get:function(){return this._ispixelLine},set:function(e){e===this._ispixelLine||e.constructor!==Boolean||(this._ispixelLine=e,this._initialize=!1)}},surroundRatioVal:{get:function(){return this._surroundRatioVal},set:function(e){e===this._surroundRatioVal||"number"!=typeof e||(this._surroundRatioVal=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},extendWallHeight:{get:function(){return this._extendWallHeight},set:function(e){e===this._extendWallHeight||"number"!=typeof e||(this._extendWallHeight=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},extendWallOpacity:{get:function(){return Math.round(100*(1-this._extendWallOpacity))},set:function(e){this.extendWallOpacity==e||"number"!=typeof e||(this._extendWallOpacity=1-e/100,this._initialize=!1)}},isClampToGround:{get:function(){return this._isClampToGround},set:function(e){e!==this._isClampToGround&&(this._isClampToGround=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},arrowHeadType:{get:function(){return this._arrowHeadType},set:function(e){"number"==typeof e&&(this._arrowHeadType=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},arrowBodyType:{get:function(){return this._arrowBodyType},set:function(e){"number"==typeof e&&(this._arrowBodyType=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},arrowTailType:{get:function(){return this._arrowTailType},set:function(e){"number"==typeof e&&(this._arrowTailType=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}}});var _0x4db37b=(_0x4349d2=!0,function(e,t){var i=_0x4349d2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4349d2=!1,i}),_0x251291=_0x4db37b(void 0,(function(){return _0x251291.toString().search("(((.+)+)+)+$").toString().constructor(_0x251291).search("(((.+)+)+)+$")})),_0x4349d2;function _0x526be0(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.symbolType=WebGLPlot.defaultValue(e.symbolType,_0x18bc2f.SYMBOL_UNKNOW),this.points=WebGLPlot.defaultValue(e.points,[]),this.lineColorLimit=WebGLPlot.defaultValue(e.lineColorLimit,!1),this.lineColor=WebGLPlot.defaultValue(e.lineColor,WebGLPlot.Color.RED),this.lineTypeLimit=WebGLPlot.defaultValue(e.lineTypeLimit,!1),this.lineWidthLimit=WebGLPlot.defaultValue(e.lineWidthLimit,!1),this.lineWidth=WebGLPlot.defaultValue(e.lineWidth,-1),this.fillLimit=WebGLPlot.defaultValue(e.fillLimit,!1),this.fillStyle=WebGLPlot.defaultValue(e.fillStyle,!1),this.fillColorLimit=WebGLPlot.defaultValue(e.fillColorLimit,!1),this.fillColor=WebGLPlot.defaultValue(e.fillColor,new WebGLPlot.Color(1,0,0,.8)),this.fontColorLimit=WebGLPlot.defaultValue(e.fontColorLimit,!1),this.textContent=WebGLPlot.defaultValue(e.textContent,""),this.textStyle=WebGLPlot.defaultValue(e.textContent,void 0),this.textAngle=WebGLPlot.defaultValue(e.textAngle,0),this.textBounds=WebGLPlot.defaultValue(e.textBounds,void 0)}_0x251291();var _0x151f52=(_0x5f0aaa=!0,function(e,t){var i=_0x5f0aaa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f0aaa=!1,i}),_0x705acd=_0x151f52(void 0,(function(){return _0x705acd.toString().search("(((.+)+)+)+$").toString().constructor(_0x705acd).search("(((.+)+)+)+$")})),_0x5f0aaa;function _0x3b1257(){this._code=_0x18bc2f.SYMBOL_ARC,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_ARC,this._symbolName=WebGLPlot.plotI18n("arc"),this._minEditPts=3,this._maxEditPts=3}_0x705acd(),_0x3b1257.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(2==t.length&&_0x2d6822.isSamePt(t[0],t[1])||t.length<this._minEditPts)return null;var i=_0x2d6822.generateArcInfo(t[0],t[1],t[2]);i.dStartAngle*=Math.PI/180,i.dEndAngle*=Math.PI/180;var n,r=_0x2d6822.generateArcSpatialData(i.pntCenter,i.dRadius,i.dRadius,0,i.dStartAngle,i.dEndAngle);return 0!==r.length&&(n=new _0x526be0({points:r,symbolType:_0x18bc2f.SYMBOL_POLYLINE})),n},_0x3b1257.prototype.getMinEditPts=function(){return this._minEditPts},_0x3b1257.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x3b1257.prototype.getSymbolName=function(){return this._symbolName};var _0x396ddc=(_0x4eaed6=!0,function(e,t){var i=_0x4eaed6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4eaed6=!1,i}),_0x7205cd=_0x396ddc(void 0,(function(){return _0x7205cd.toString().search("(((.+)+)+)+$").toString().constructor(_0x7205cd).search("(((.+)+)+)+$")})),_0x4eaed6;function _0x2ad880(){this._code=_0x18bc2f.SYMBOL_POLYBEZIER,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_POLYBEZIER,this._symbolName=WebGLPlot.plotI18n("bezier"),this._minEditPts=2,this._maxEditPts=9999}_0x7205cd(),_0x2ad880.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(t);return SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),new _0x526be0({points:i,symbolType:_0x18bc2f.SYMBOL_POLYLINE})},_0x2ad880.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x2ad880.prototype.getMinEditPts=function(){return this._minEditPts},_0x2ad880.prototype.getSymbolName=function(){return this._symbolName};var _0x368315=(_0x4227f0=!0,function(e,t){var i=_0x4227f0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4227f0=!1,i}),_0x195a36=_0x368315(void 0,(function(){return _0x195a36.toString().search("(((.+)+)+)+$").toString().constructor(_0x195a36).search("(((.+)+)+)+$")})),_0x4227f0;function _0x2ebfea(){this._code=_0x18bc2f.SYMBOL_ELLIPSE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_ELLIPSE,this._symbolName=WebGLPlot.plotI18n("ellipse"),this._maxEditPts=3,this._minEditPts=3}_0x195a36(),_0x2ebfea.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x2ebfea.prototype.getMinEditPts=function(){return this._minEditPts},_0x2ebfea.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t,i,n,r=e.points;if(r.length<this._minEditPts)return null;t=_0x2d6822.distance(r[0],r[2]),i=_0x2d6822.distance(r[0],r[1]),n=_0x2d6822.radian(r[0],r[1]);var o=2*Math.PI,a=_0x2d6822.generateArcSpatialData(r[0],i,t,n,0,o);return a.push[a[0].clone()],new _0x526be0({symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,points:a})},_0x2ebfea.prototype.getSymbolName=function(){return this._symbolName};var _0xbfd9a5=(_0xe5ebf4=!0,function(e,t){var i=_0xe5ebf4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe5ebf4=!1,i}),_0x17a89d=_0xbfd9a5(void 0,(function(){return _0x17a89d.toString().search("(((.+)+)+)+$").toString().constructor(_0x17a89d).search("(((.+)+)+)+$")})),_0xe5ebf4;function _0x3a50ed(){this._code=_0x18bc2f.SYMBOL_PARALLELOGRAM,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_PARALLELOGRAM,this._symbolName=WebGLPlot.plotI18n("parallel"),this._maxEditPts=3,this._minEditPts=3}_0x17a89d(),_0x3a50ed.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;t.length>this._maxEditPts&&t.splice(3,t.length-3);for(var i=t[0].x+(t[2].x-t[1].x),n=t[0].y+(t[2].y-t[1].y),r=new WebGLPlot.Cartesian3(i,n,0),o=[],a=0;a<t.length;++a)o.push(t[a].clone());return o.push(r),o.push(o[0].clone()),new _0x526be0({symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,points:o})},_0x3a50ed.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x3a50ed.prototype.getMinEditPts=function(){return this._minEditPts},_0x3a50ed.prototype.getSymbolName=function(){return this._symbolName};var _0x12e14c=(_0x1e93d7=!0,function(e,t){var i=_0x1e93d7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e93d7=!1,i}),_0x4f02c9=_0x12e14c(void 0,(function(){return _0x4f02c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f02c9).search("(((.+)+)+)+$")})),_0x1e93d7;function _0x26b28c(){this._code=_0x18bc2f.SYMBOL_RECTANGLE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_RECTANGLE,this._symbolName=WebGLPlot.plotI18n("rectangle"),this._minEditPts=2,this._maxEditPts=2}_0x4f02c9(),_0x26b28c.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i=new WebGLPlot.Cartesian2(t[0].x,t[0].y),n=new WebGLPlot.Cartesian2(t[1].x,t[1].y),r=i.clone();return new _0x526be0({points:[r,new WebGLPlot.Cartesian2(n.x,i.y),n.clone(),new WebGLPlot.Cartesian2(i.x,n.y),r.clone()],symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON})},_0x26b28c.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x26b28c.prototype.getMinEditPts=function(){return this._minEditPts},_0x26b28c.prototype.getSymbolName=function(){return this._symbolName};var _0x1d157a=(_0x2a1c92=!0,function(e,t){var i=_0x2a1c92?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a1c92=!1,i}),_0x2d2849=_0x1d157a(void 0,(function(){return _0x2d2849.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d2849).search("(((.+)+)+)+$")})),_0x2a1c92;function _0x5538dd(){this._code=_0x18bc2f.SYMBOL_CIRCLE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_CIRCLE,this._symbolName=WebGLPlot.plotI18n("circle"),this._minEditPts=2,this._maxEditPts=2}_0x2d2849(),_0x5538dd.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(null===t||t.length<this._minEditPts)return null;t.length>this._maxEditPts&&t.splice(2,t.length-this._maxEditPts);var i=_0x2d6822.distance(t[0],t[1]),n=_0x2d6822.calcCirclePts(i,t[0]);return new _0x526be0({symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,points:n})},_0x5538dd.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5538dd.prototype.getMinEditPts=function(){return this._minEditPts},_0x5538dd.prototype.getSymbolName=function(){return this._symbolName};var _0x203042=(_0x496944=!0,function(e,t){var i=_0x496944?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x496944=!1,i}),_0x5b7796=_0x203042(void 0,(function(){return _0x5b7796.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b7796).search("(((.+)+)+)+$")})),_0x496944;function _0x56bfc5(){this._code=_0x18bc2f.SYMBOL_CHORD,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_CHORD,this._symbolName=WebGLPlot.plotI18n("chord"),this._maxEditPts=3,this._minEditPts=3}_0x5b7796(),_0x56bfc5.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x56bfc5.prototype.getMinEditPts=function(){return this._minEditPts},_0x56bfc5.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(2==t.length&&_0x2d6822.isSamePt(t[0],t[1])||t.length<this._minEditPts)return null;var i=_0x2d6822.generateArcInfo(t[0],t[1],t[2]);i.dStartAngle*=Math.PI/180,i.dEndAngle*=Math.PI/180;var n=_0x2d6822.generateArcSpatialData(i.pntCenter,i.dRadius,i.dRadius,0,i.dStartAngle,i.dEndAngle);return n.push(n[0].clone()),new _0x526be0({points:n,symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON})},_0x56bfc5.prototype.getSymbolName=function(){return this._symbolName};var _0x2a988f=(_0x1b0ef8=!0,function(e,t){var i=_0x1b0ef8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b0ef8=!1,i}),_0x1d3128=_0x2a988f(void 0,(function(){return _0x1d3128.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d3128).search("(((.+)+)+)+$")})),_0x1b0ef8;_0x1d3128();var _0x28db24={TOP:4,BOTTOM:5,LEFT:6,RIGHT:7},_0x3dc8e2=Object.freeze(_0x28db24),_0x268d99=(_0x4d8e86=!0,function(e,t){var i=_0x4d8e86?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d8e86=!1,i}),_0x555773=_0x268d99(void 0,(function(){return _0x555773.toString().search("(((.+)+)+)+$").toString().constructor(_0x555773).search("(((.+)+)+)+$")})),_0x4d8e86;function _0xb27609(e,t,i,n){n=n||{},this.volume=e>1?1:e,this.position=t,(void 0===this.position||null===this.position)&&(this.position=_0x3dc8e2.TOP),this.offsetX=n.offsetX?n.offsetX:0,this.offsetY=n.offsetY?n.offsetY:0,this.width=n.width?n.width:40,this.height=n.height?n.height:8,null!==i&&WebGLPlot.defined(i)?this.style=i:(this.style={},this.style.fillColor=new WebGLPlot.Color(0,1,0),this.style.frameColor=new WebGLPlot.Color(0,0,0)),this.bounds=null}_0x555773(),_0xb27609.clone=function(e){var t=new _0xb27609(e.volume,e.position,null,null);return t.offsetX=e.offsetX,t.offsetY=e.offsetY,t.width=e.width,t.height=e.height,t.bounds=e.bounds,t.style=e.style,t};var _0x5b0a52=(_0x5bf698=!0,function(e,t){var i=_0x5bf698?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5bf698=!1,i}),_0xccedcd=_0x5b0a52(void 0,(function(){return _0xccedcd.toString().search("(((.+)+)+)+$").toString().constructor(_0xccedcd).search("(((.+)+)+)+$")})),_0x5bf698;_0xccedcd();const _0x319a80=8;function _0x22f580(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._symbolSize=WebGLPlot.defaultValue(e.symbolDot._gridSymbolSize,void 0),this._xOffset=0,this._anchorPoint=WebGLPlot.defaultValue(e.symbolDot._anchorPoint,void 0),this._canvas=void 0,this._surroundLineType=void 0,this._isFirst=!0,this.returnisflag=!1,this._OffsetText_Down=0,this.initCanvas(),this._symbolDot._oldSymbolSize=this._symbolDot._symbolSizeInLib,this._dotGridScale=this._symbolDot.scale,this._OffSetY=0,this.TopOffSet=0,this._textContentLength=0}function _0x348bd4(e,t){for(var i=[],n=t,r=0;r<n.length;r++)for(var o=0;o<n[r].points.length;o++){var a=n[r].points[o];i.push(a.x)}var s=Math.min.apply({},i),l=(Math.max.apply({},i)+s)/2;Math.abs(s/e._dotGridScale)<_0x319a80&&(l=0,e.returnisflag=!0);for(r=0;r<n.length;r++)for(o=0;o<n[r].points.length;o++){(a=n[r].points[o]).x=2*l-a.x,n[r].points[o]=a}return n}function _0x3f50b3(e){return null===e||typeof e>"u"||""===e||e.match(/^[ ]+$/)}Object.defineProperties(_0x22f580.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x22f580.prototype.drawDotSymbolGraphic=function(e){if(!WebGLPlot.defined(this._symbolDot))return null;if(this._OffsetText_Down=0,this.DEFAULTLINEWIDTH=this._symbolDot._billboardBoundsLineWidth,null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent&&(this._textContentLength=this._ctx.measureText(this._symbolDot._textContent).width),this.symbolDot.BloodVolumes.length>1){for(var t=[],i=0;i<this.symbolDot.BloodVolumes.length;i++)t.push(_0xb27609.clone(this.symbolDot.BloodVolumes[i]));this.symbolDot.BloodVolumes=t}this.fontSize=0!==this._textContentLength?this._symbolDot._symbolTextStyle._fontSize:0,this.isForVector=e;var n=this.transformPoints();this.computeImageBounds(n),this.drawPicture(n);var r=this._canvas.toDataURL("image/png");return this._xOffset=0,r},_0x22f580.prototype.transformPoints=function(){this.computerScale();for(var e=[],t=[],i=this._symbolDot._canvasSymbolData,n=[],r=0;r<i.length;r++){(a=i[r]).surroundLineFlag&&0===this.symbolDot.symbolStyle.surroundLineType||n.push(a)}for(var o=0;o<n.length;o++){for(var a=n[o],s=[],l=0;l<a.positionPoints.length;l++)s.push(new WebGLPlot.Cartesian3(a.positionPoints[l].x,a.positionPoints[l].y,0));var u={points:s,cell:a,style:a.style,type:a.type,flag:a.surroundLineFlag};t.push(this.computePts(u))}var c=this.getMax_Y(t);for(o=0;o<t.length;o++){a=t[o];var h=[];for(l=0;l<a.points.length;l++){var d=new WebGLPlot.Cartesian2(a.points[l].x,a.points[l].y);d.y=(-d.y+c)*this._dotGridScale,d.x*=this._dotGridScale,h.push(d)}u={points:h,cell:a,style:a.style,type:a.type,flag:a.surroundLineFlag};e.push(u)}return this._symbolDot._isMiddleMarkExist&&this._symbolDot._middleMarkBounds&&(this._middleMarkBounds={},this._middleMarkBounds.x=this._symbolDot._middleMarkBounds.left*this._dotGridScale,this._middleMarkBounds.y=(-this._symbolDot._middleMarkBounds.top+c)*this._dotGridScale,this._middleMarkBounds.width=this._symbolDot._middleMarkBounds.right-this._symbolDot._middleMarkBounds.left,this._middleMarkBounds.height=this._symbolDot._middleMarkBounds.top-this._symbolDot._middleMarkBounds.bottom,this._middleMarkBounds.width*=this._dotGridScale,this._middleMarkBounds.height*=this._dotGridScale),this._symbolDot._isNegativeImage&&(e=_0x348bd4(this,e)),e},_0x22f580.prototype.computeImageBounds=function(e){this.symbolCellsBounds=this.getSymbolCellsBounds(e),this.selectedRectBounds=this.getSelectedRectBounds(this.symbolCellsBounds),this.bloodVolumeOffset=this.getBloodVolumeBounds(this.selectedRectBounds),this.textBounds=this.getContentTexBounds(this.selectedRectBounds,this.bloodVolumeOffset);var t=this.bloodVolumeOffset.LeftOffset>this.bloodVolumeOffset.RightOffset?2*this.bloodVolumeOffset.LeftOffset:2*this.bloodVolumeOffset.RightOffset,i=this.bloodVolumeOffset.DownOffset+this.bloodVolumeOffset.UpOffset,n=2*this.textBounds.LRoffset,r=Math.abs(this.textBounds.UDoffset),o=this.textBounds.UDoffset>0?this.textBounds.UDoffset:0;this.textBounds.UDoffset<0&&this.bloodVolumeOffset.DownOffset>=r?this._symbolDot._textPos!==_0x4c2bdd.Down&&(r=0):this.textBounds.UDoffset<0&&this.bloodVolumeOffset.DownOffset<r&&(i=r+this.bloodVolumeOffset.UpOffset);var a,s=0;Math.abs(this.symbolCellsBounds.x/this._dotGridScale)<_0x319a80||this.returnisflag?(this.returnisflag=!0,s=this.selectedRectBounds.width):s=this.selectedRectBounds.width/2+2*this.DEFAULTLINEWIDTH,a=this.selectedRectBounds.height;var l=this.selectedRectBounds.width+s+t+n;l=l>this.textBounds.width?l:this.textBounds.width;var u=a+i+r+2*this.DEFAULTLINEWIDTH;this.setCanvasSize(l,u),this.symbolLROffset=l/2,this.symbolUDOffset=this.bloodVolumeOffset.UpOffset+o,this.offsetSymbolBounds(e)},_0x22f580.prototype.getSymbolCellsBounds=function(e){if(e.length<=0)return{x:0,y:0,width:0,height:0};for(var t=[],i=[],n=0;n<e.length;n++)for(var r=e[n].points,o=0;o<r.length;o++)t.push(r[o].x),i.push(r[o].y);var a=Math.max.apply({},t),s=Math.max.apply({},i),l=Math.min.apply({},t),u=Math.min.apply({},i),c=a-l;return a<=0&&(c=Math.abs(l)-Math.abs(a)),{x:l,y:u,width:c,height:s-u}},_0x22f580.prototype.getSelectedRectBounds=function(e){return{x:e.x-this.DEFAULTLINEWIDTH,y:e.y-this.DEFAULTLINEWIDTH,width:e.width+2*this.DEFAULTLINEWIDTH,height:e.height+2*this.DEFAULTLINEWIDTH}},_0x22f580.prototype.getBloodVolumeBounds=function(e){for(var t=0,i=0,n=0,r=0,o=0,a=0,s=0,l=0,u=0,c=0;c<this.symbolDot.BloodVolumes.length;c++){e.x>0&&(l=e.width/2+e.x),u=e.height/2+e.y;var h=this.symbolDot.BloodVolumes[c];if(!(h instanceof _0xb27609))return{UpOffset:t,DownOffset:i,LeftOffset:n,RightOffset:r};switch(h.width>e.width&&(o=e.width),h.position){case _0x3dc8e2.TOP:a=l-h.width/2,s=e.y-h.height-t,h.bounds={x:a,y:s,width:o,height:h.height},t+=h.height+this.DEFAULTLINEWIDTH;break;case _0x3dc8e2.BOTTOM:a=l-h.width/2,s=e.y+e.height+h.height+i,h.bounds={x:a,y:s,width:o,height:h.height},i+=h.height+this.DEFAULTLINEWIDTH,this._OffsetText_Down=i;break;case _0x3dc8e2.LEFT:a=e.x-h.height-n,s=u-h.width/2,h.bounds={x:a,y:s,width:h.height,height:o},n+=h.height+this.DEFAULTLINEWIDTH;break;case _0x3dc8e2.RIGHT:a=e.x+e.width+r,s=u-h.width/2,h.bounds={x:a,y:s,width:h.height,height:o},r+=h.height+this.DEFAULTLINEWIDTH;break;default:a=l-h.width/2,s=e.y-h.height-t,h.bounds={x:a,y:s,width:o,height:h.height},t+=h.height+this.DEFAULTLINEWIDTH}}return{UpOffset:t,DownOffset:i,LeftOffset:n,RightOffset:r}},_0x22f580.prototype.getContentTexBounds=function(e,t){var i=0,n=0,r=0,o=0,a=0,s=0;if(null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent){this.setCanvasTextFont();var l=this._ctx.measureText(this._symbolDot._textContent).width,u=this._symbolDot._textPos;switch(this._symbolDot._showMode!==_0x4e5d29.Grid&&(u=_0x4c2bdd.Up),u){case _0x4c2bdd.Left:i=e.x-t.LeftOffset,n=e.height/2+e.y;break;case _0x4c2bdd.Right:i=e.x+e.width+t.RightOffset,n=e.height/2+e.y;break;case _0x4c2bdd.LeftUp:i=e.x-t.LeftOffset,n=e.y-this.fontSize/2,s=this.fontSize;break;case _0x4c2bdd.RightUp:i=e.x+e.width+t.RightOffset,n=e.y-this.fontSize/2,s=this.fontSize;break;case _0x4c2bdd.LeftDown:i=e.x-t.LeftOffset,n=e.y+e.height+this.fontSize/2,s=-this.fontSize,this._OffsetText_Down=this._OffsetText_Down>this.fontSize?this._OffsetText_Down:2*this.fontSize;break;case _0x4c2bdd.RightDown:i=e.x+e.width+t.RightOffset,n=e.y+e.height+this.fontSize/2,s=-this.fontSize,this._OffsetText_Down=this._OffsetText_Down>this.fontSize?this._OffsetText_Down:2*this.fontSize;break;case _0x4c2bdd.Up:i=e.x<0?0:e.width/2+e.x,n=e.y-t.UpOffset-this.fontSize/2,s=this.fontSize;break;case _0x4c2bdd.Down:i=e.x<0?0:e.width/2+e.x,n=e.y+e.height+this.fontSize/2+t.DownOffset,s=-this.fontSize,this._OffsetText_Down=2*this.fontSize;case _0x4c2bdd.Middle:}r=l,o=this.fontSize,a=l}return{x:i,y:n,width:r,height:o,UDoffset:s,LRoffset:a}},_0x22f580.prototype.offsetSymbolBounds=function(e){for(var t=0;t<e.length;t++)for(var i=0;i<e[t].points.length;i++){var n=e[t].points[i];let r=e[t].cell.style.lineWidth;n.x+=this.symbolLROffset,n.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH-r/2,e[t].points[i]=n}this.selectedRectBounds.x+=this.symbolLROffset,this.selectedRectBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH,this._symbolDot._isMiddleMarkExist&&(this._symbolDot._textPos===_0x4c2bdd.Middle||this._symbolDot._alwaysHasMiddelText)&&(this._middleMarkBounds.x+=this.symbolLROffset,this._middleMarkBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH),this.textBounds.x+=this.symbolLROffset,this._symbolDot._isNegativeImage&&this.returnisflag&&(4===this._symbolDot._textPos||5===this._symbolDot._textPos)?this.textBounds.x-=this.symbolCellsBounds.width/2:this.returnisflag&&(4===this._symbolDot._textPos||5===this._symbolDot._textPos)&&(this.textBounds.x=this.symbolLROffset+this.symbolCellsBounds.width/2),this.textBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH;for(var r=0;r<this.symbolDot.BloodVolumes.length;r++){var o=this.symbolDot.BloodVolumes[r];o instanceof _0xb27609&&(this._symbolDot._isNegativeImage&&this.returnisflag&&(4===o.position||5===o.position)?o.bounds.x+=this.symbolLROffset-this.selectedRectBounds.width/2:!this.returnisflag||4!==o.position&&5!==o.position?o.bounds.x+=this.symbolLROffset:o.bounds.x+=this.symbolLROffset+this.selectedRectBounds.width/2,o.bounds.y+=this.symbolUDOffset)}},_0x22f580.prototype.setCanvasSize=function(e,t){this._canvas.setAttribute("width",e),this._canvas.setAttribute("height",t)},_0x22f580.prototype.drawPolyline=function(e){var t=e.points,i=e.cell.style;this._ctx.beginPath(),this._ctx.moveTo(t[0].x,t[0].y);for(var n=1,r=t.length;n<r;n++)this._ctx.lineTo(t[n].x,t[n].y);this._ctx.globalAlpha=i.globalAlpha,this._ctx.setLineDash(i.dashArray),this._ctx.strokeStyle=i.lineColor,this._ctx.lineWidth=i.lineWidth,this._ctx.stroke()},_0x22f580.prototype.drawPolygon=function(e){var t=e.points,i=e.cell.style;this._ctx.beginPath();var n=t[0].x,r=t[0].y,o=r,a=r,s=n,l=n;this._ctx.moveTo(n,r);for(var u=1;u<t.length;u++){var c=t[u].x,h=t[u].y;this._ctx.lineTo(c,h),h<o&&(o=h),h>a&&(a=h),c>l&&(l=c),c<s&&(s=c)}if(this._ctx.lineTo(t[0].x,t[0].y),0===i.fill){if(i.hasShade){var d={mode:this._symbolDot._symbolStyle._fillGradientMode,style:i,maximum:{minX:s,minY:o,maxX:l,maxY:a}},f=this.drawGradient(d);this._ctx.fillStyle=f}else this._ctx.fillStyle=i.fillStyle;this._ctx.fill()}this._ctx.globalAlpha=i.globalAlpha,this._ctx.setLineDash(i.dashArray),this._ctx.strokeStyle=i.lineColor,this._ctx.lineWidth=i.lineWidth,this._ctx.closePath(),this._ctx.stroke()},_0x22f580.prototype.drawGradient=function(e){var t,i=e.style;const n=(100-this._symbolDot._symbolStyle.fillGradientOffsetRatioX)/100,r=(100-this._symbolDot._symbolStyle.fillGradientOffsetRatioY)/100;var o=e.maximum.minX,a=e.maximum.maxX*n,s=e.maximum.minY,l=e.maximum.maxY*r;switch(e.mode){case 1:t=this._ctx.createLinearGradient(o,s,a,l);break;case 2:var u=a-o,c=l-s,h=o+u/2,d=s+c/2,f=u>c?u/4:c/4,p=2*f;t=this._ctx.createRadialGradient(h,d,f,h,d,p)}return t.addColorStop(0,i.fillForeColor),t.addColorStop(1,i.fillBackColor),t},_0x22f580.prototype.drawText=function(e){if(!(e.points[0].x<0||e.points[0].y<0)){var t=e.cell.cell.textContent,i=e.cell.cell.textStyle,n=i.fontScale,r=i.fontName,o=i.fontHeight*n*.7*this._dotGridScale;if(!(o<4)){i.bold?this._ctx.font="bold "+o+"px "+r:i.italic?this._ctx.font="italic "+o+"px "+r:this._ctx.font=o+"px "+r,this._ctx.textAlign="center";var a=i.align;("TOPLEFT"===a||"TOPCENTER"===a||"TOPRIGHT"===a)&&(this._ctx.textBaseline="middle"),this._ctx.textBaseline="middle",this._ctx.fillStyle=i.foreColor.toCssColorString(),this._ctx.fillText(t,e.points[0].x,e.points[0].y+this._OffSetY)}}},_0x22f580.prototype.computePts=function(e){var t=e.cell,i=null;_0x18bc2f.SYMBOL_RECTANGLE===t.type?(i=(new _0x26b28c).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_ELLIPSE===t.type?(i=(new _0x2ebfea).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_CIRCLE===t.type?(i=(new _0x5538dd).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_POLYBEZIER===t.type?(i=(new _0x2ad880).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_ARC===t.type?(i=(new _0x3b1257).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_PARALLELOGRAM===t.type?(i=(new _0x3a50ed).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_PIE===t.type?(i=SuperMapAlgoPlot.Primitives.sector(e.points),e.points=i):_0x18bc2f.SYMBOL_KIDNEY===t.type?e.points=SuperMapAlgoPlot.Primitives.getSpatialData(SuperMapAlgoPlot.SymbolType.KIDNEY,e.points):_0x18bc2f.SYMBOL_TRAPEZOID===t.type?(i=(new SymbolTrapezoid).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_CHORD===t.type&&(i=(new _0x56bfc5).calculateParts(e),e.points=i.points);return e},_0x22f580.prototype.drawPicture=function(e,t){if(WebGLPlot.defined(t)&&t){if(this.drawBloodVolume(),_0x4e5d29.Vector===this._symbolDot._showMode&&this._symbolDot._textPos===_0x4c2bdd.Middle)return;this.drawtextContent()}else{for(var i=0;i<e.length;i++){var n=e[i],r=n.cell;this.isForVector?_0x18bc2f.SYMBOL_TEXT===r.type&&this.drawText(n):_0x18bc2f.SYMBOL_POLYLINE===r.type||_0x18bc2f.SYMBOL_POLYBEZIER===r.type||_0x18bc2f.SYMBOL_ARC===r.type?this.drawPolyline(n):_0x18bc2f.SYMBOL_TEXT===r.type?this.drawText(n):this.drawPolygon(n)}this._symbolDot._showMode===_0x4e5d29.Grid&&(null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent&&this.drawtextContent(),this.drawBloodVolume(),WebGLPlot.defined(this._symbolDot._layer.selectedFeature)&&!this.isForVector&&this._symbolDot._isSelected&&this.drawBoundingRect())}},_0x22f580.prototype.drawtextContent=function(){var e=null,t=this._symbolDot._textPos;this._symbolDot._showMode!==_0x4e5d29.Grid&&(t=_0x4c2bdd.Up),t===_0x4c2bdd.Left?e={textAlign:"right",textBaseline:"middle"}:t===_0x4c2bdd.Right?e={textAlign:"left",textBaseline:"middle"}:t===_0x4c2bdd.Up?(e={textAlign:"center",textBaseline:"middle"},this.returnisflag&&(e.x=(this._canvas.width+this._symbolWidth)/2)):t===_0x4c2bdd.Down||t===_0x4c2bdd.Middle?e={textAlign:"center",textBaseline:"middle"}:t===_0x4c2bdd.LeftUp||t===_0x4c2bdd.LeftDown?e={textAlign:"right",textBaseline:"middle"}:(t===_0x4c2bdd.RightUp||t===_0x4c2bdd.RightDown)&&(e={textAlign:"left",textBaseline:"middle"}),this.drawText2(e)},_0x22f580.prototype.drawText2=function(e){if(e){var t=this._symbolDot._textContent,i=this._symbolDot._symbolTextStyle;this.setCanvasTextFont(),this._ctx.textAlign=e.textAlign,this._ctx.textBaseline=e.textBaseline;var n=0,r=0;if(this._middleMarkBounds&&(n=this._middleMarkBounds.x+this._middleMarkBounds.width/2,r=this._middleMarkBounds.y+this._middleMarkBounds.height/2),i._outline){this._ctx.setLineDash([]);var o=this._ctx.lineWidth;this._ctx.lineWidth=i.outlineWidth;var a=i._backColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x4c2bdd.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.strokeStyle=a,this._ctx.strokeText(t,n,r,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x4c2bdd.Middle&&(this._ctx.strokeStyle=a,this._ctx.strokeText(t,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.strokeStyle=a,this._ctx.strokeText(t,n,r,this._middleMarkBounds.width)),this._ctx.lineWidth=o}var s=i.foreColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x4c2bdd.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.fillStyle=s,this._ctx.fillText(t,n,r,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x4c2bdd.Middle&&(this.drawTextBoundsRect(i),this._ctx.fillStyle=s,this._ctx.fillText(t,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.fillStyle=s,this._ctx.fillText(t,n,r,this._middleMarkBounds.width))}},_0x22f580.prototype.drawTextBoundsRect=function(e){if(e.isShowTextBox){let t,i=this.textBounds.y-e.fontSize/2,n=this.textBounds.width,r=this.textBounds.height;switch(this._ctx.textAlign){case"center":t=this.textBounds.x-this.textBounds.width/2;break;case"right":t=this.textBounds.x-this.textBounds.width;break;case"left":t=this.textBounds.x}this._ctx.fillStyle=e.textBoxColor.toCssColorString(),this._ctx.fillRect(t,i,n,r),this._ctx.beginPath(),this._ctx.lineWidth="2",this._ctx.strokeStyle=e.textBoxLineColor.toCssColorString(),this._ctx.rect(t,i,n-1,r),this._ctx.stroke()}},_0x22f580.prototype.drawBoundingRect=function(){var e=this.selectedRectBounds.x+this.DEFAULTLINEWIDTH/2,t=this.selectedRectBounds.y+this.DEFAULTLINEWIDTH/2,i=this.selectedRectBounds.width-1.5*this.DEFAULTLINEWIDTH,n=this.selectedRectBounds.height-2*this.DEFAULTLINEWIDTH;this._ctx.beginPath(),this._ctx.rect(e,t,i,n),this._ctx.strokeStyle=this._symbolDot._billboardBoundsColor.toCssColorString(),this._ctx.lineWidth=this.DEFAULTLINEWIDTH,this._ctx.setLineDash([]),this._ctx.closePath(),this._ctx.stroke()},_0x22f580.prototype.drawBloodVolume=function(){if(this._symbolDot.bIsShowBloodVolume)for(var e=0;e<this.symbolDot.BloodVolumes.length;e++){var t=this.symbolDot.BloodVolumes[e];if(!t.bounds)return;var i=t.bounds,n=t.position,r=0,o=0,a=0,s=0;switch((this._symbolDot._showMode===_0x4e5d29.Marker||this._symbolDot._showMode===_0x4e5d29.Vector)&&(n=_0x3dc8e2.TOP),n){case _0x3dc8e2.TOP:case _0x3dc8e2.BOTTOM:r=t.width,o=t.height,a=t.width*t.volume,s=t.height;break;case _0x3dc8e2.LEFT:case _0x3dc8e2.RIGHT:r=t.height,o=t.width,a=t.height,s=t.width*t.volume}this._ctx.beginPath();var l=t.style.fillColor,u=t.style.frameColor,c=new WebGLPlot.Color(l.red,l.green,l.blue,this._symbolDot._symbolStyle._opacity),h=new WebGLPlot.Color(u.red,u.green,u.blue,this._symbolDot._symbolStyle._opacity);this._ctx.fillStyle=c.toCssColorString(),this._ctx.fillRect(i.x,i.y,a,s),this._ctx.lineWidth=.5,this._ctx.strokeStyle=h.toCssColorString(),this._ctx.rect(i.x,i.y,r,o),this._ctx.stroke(),this._ctx.closePath()}},_0x22f580.prototype.initCanvas=function(){WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas")),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._ctx.scale(this._dotGridScale,this._dotGridScale)},_0x22f580.prototype.setCanvasTextFont=function(){var e=this._symbolDot._symbolTextStyle,t=e.fontName,i=e._fontSize;e.bold?this._ctx.font="bold "+i+"px "+t:e.italic?this._ctx.font="italic "+i+"px "+t:this._ctx.font=i+"px "+t},_0x22f580.prototype.getMax_Y=function(e){for(var t=[],i=0;i<e.length;i++)for(var n=e[i],r=0;r<n.points.length;r++)t.push(n.points[r].y);return Math.max.apply({},t)},_0x22f580.prototype.computerScale=function(){var e=1;this._symbolSize=new WebGLPlot.Cartesian2(this._symbolDot._gridSymbolSize.x,this._symbolDot._gridSymbolSize.y);var t=this._symbolDot._symbolSizeInLib;if(t.x>0&&t.y>0){var i=this._symbolSize.x/t.x,n=this._symbolSize.y/t.y;e=i>n?i:n}this._dotGridScale=this._symbolDot._scale*e},_0x22f580.prototype.bIsChangHeight=function(){return this.symbolMoveToDown=!1,this.symbolMoveToUp=!1,this.symbolMoveToLR=!1,(0!==this._symbolDot._textContent.length||!_0x3f50b3(this._symbolDot._textContent))&&(this._symbolDot._textPos===_0x4c2bdd.Down||this._symbolDot._textPos===_0x4c2bdd.RightDown||this._symbolDot._textPos===_0x4c2bdd.LeftDown?(this.symbolMoveToUp=!0,!0):this._symbolDot._textPos===_0x4c2bdd.Up||this._symbolDot._textPos===_0x4c2bdd.RightUp||this._symbolDot._textPos===_0x4c2bdd.LeftUp?(this.symbolMoveToDown=!0,!0):((this._symbolDot._textPos===_0x4c2bdd.Left||this._symbolDot._textPos===_0x4c2bdd.Right)&&(this.symbolMoveToLR=!0),!1))},_0x22f580.prototype.drawDotModelTextAndBloodVolume=function(){this.getModelTextAndBloodVolumeBounds(),this.drawPicture([],!0);var e=this._canvas.toDataURL("image/png");return this._xOffset=0,e},_0x22f580.prototype.getModelTextAndBloodVolumeBounds=function(){var e=0,t=0;this._symbolDot._textContent.length>0&&(this.fontSize=this._symbolDot._symbolTextStyle._fontSize,this.setCanvasTextFont(),e=this._ctx.measureText(this._symbolDot._textContent).width,t+=this.fontSize);for(var i=0;i<this.symbolDot.BloodVolumes.length;i++){e=(r=this.symbolDot.BloodVolumes[i]).width>e?r.width:e,t+=r.height+this.DEFAULTLINEWIDTH}this.textBounds={x:e/2,y:this.fontSize/2,width:this._ctx.measureText(this._symbolDot._textContent).width,height:this.fontSize},this.setCanvasSize(e,t);var n=t;for(i=0;i<this.symbolDot.BloodVolumes.length;i++){var r,o=(e-(r=this.symbolDot.BloodVolumes[i]).width)/2;n-=r.height+this.DEFAULTLINEWIDTH,r.bounds={x:o,y:n,width:r.width,height:r.height}}};var _0x5324a7=(_0x367a85=!0,function(e,t){var i=_0x367a85?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x367a85=!1,i}),_0x1f7e8f=_0x5324a7(void 0,(function(){return _0x1f7e8f.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f7e8f).search("(((.+)+)+)+$")})),_0x367a85;function _0x404870(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._display=e._display,this.modelMatrix=_0x2d6822.computeMatrix(this._symbolDot.localPoints[0],this._symbolDot._vectorRotate),this._primitives=[]}_0x1f7e8f(),Object.defineProperties(_0x404870.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x404870.prototype.drawDotSymbolVector=function(){if(!WebGLPlot.defined(this._symbolDot))return;if(this._primitives=[],-1===this._symbolDot.vectorDefaultSize){var e=this._symbolDot._layer._scene,t=e.camera.position,i=WebGLPlot.Cartesian3.fromDegrees(this._symbolDot.localPoints[0].x,this._symbolDot.localPoints[0].y,this._symbolDot.localPoints[0].z),n=_0x2d6822.getSpaceDistanceByCartesian(t,i);if(this._symbolDot.vectorDefaultSize=n/1e3,2===e.mode){var r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(e,i),o=new WebGLPlot.Cartesian2(r.x+10,r.y),a=_0x2d6822.getPosition(e,o),s=WebGLPlot.Cartesian3.fromDegrees(a.x,a.y,a.z),l=_0x2d6822.getSpaceDistanceByCartesian(i,s);this._symbolDot.vectorDefaultSize=l/10}}var u=new WebGLPlot.Cartesian3(this._symbolDot.vectorRotate.x,this._symbolDot.vectorRotate.y,this._symbolDot.vectorRotate.z);0!==u.y&&0===u.x&&(u.x=1),this.modelMatrix=_0x2d6822.computeMatrix(this._symbolDot.localPoints[0],u,this.modelMatrix);var c=this.createGeometryInstances(),h=new WebGLPlot.PolylineColorAppearance({translucent:!0});let d=new WebGLPlot.Primitive({geometryInstances:c,appearance:h,asynchronous:!1,compressVertices:!0,show:this._symbolDot._display});return this._primitives.push(d),this._primitives},_0x404870.prototype.createGeometryInstances=function(){var e,t,i,n=this._symbolDot._innerCells,r=[],o=[],a=[],s=[],l=[],u=[];this.isHasTextCell=!1;for(var c=0;c<n.length;c++){var h,d=n[c];if(!d.surroundLineFlag||0!==this._symbolDot.symbolStyle.surroundLineType){if(h=this._symbolDot._dotGrid.computePts({cell:d,points:d.positionPoints}).points,_0x18bc2f.SYMBOL_POLYLINE!==d.type&&_0x18bc2f.SYMBOL_POLYBEZIER!==d.type&&_0x18bc2f.SYMBOL_ARC!==d.type&&_0x18bc2f.SYMBOL_TEXT!==d.type&&h.push(h[0]),_0x18bc2f.SYMBOL_TEXT===d.type){this.isHasTextCell=!0;continue}for(var f=[],p=0;p<h.length;p++){var _=new WebGLPlot.Cartesian2(h[p].x,h[p].y),m=this.localPtsToCartesian(_,this.modelMatrix);f.push(new WebGLPlot.Cartesian3(m.position.x,m.position.y,m.position.z)),s.push(h[p].x),l.push(h[p].y),a.push(m.vector.y),o.push(m.vector.z),d.surroundLineFlag||u.push(m.position)}var g=this._symbolDot.gridLineWidth,x=new WebGLPlot.PolylineGeometry({positions:f,VertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY,width:g}),v=WebGLPlot.PolylineGeometry.createGeometry(x);if(WebGLPlot.defined(v)){e=d.surroundLineFlag&&0!==this._symbolDot.symbolStyle.surroundLineType?this._symbolDot.symbolStyle.surroundLineColor:this._symbolDot.symbolStyle.lineColor,n[c].lineColorLimit&&(i=n[c].style.lineColor,e=new WebGLPlot.Color(i.red/255,i.green/255,i.blue/255,i.alpha/255)),n[c].fillLimit&&!d.surroundLineFlag&&(n[c].fillColorLimit?(i=n[c].style.fillForeColor,t=new WebGLPlot.Color(i.red/255,i.green/255,i.blue/255,i.alpha/255)):t=e,this.createFillGeomtery(h,f,t,this._symbolDot.id)),(d.type!==_0x18bc2f.SYMBOL_POLYLINE||d.type!==_0x18bc2f.SYMBOL_POLYLINE||d.type!==_0x18bc2f.SYMBOL_POLYLINE||d.type!==_0x18bc2f.SYMBOL_TEXT)&&0===this._symbolDot._symbolStyle._fillSymbolID&&!d.surroundLineFlag&&((t=this._symbolDot._symbolStyle.fillForeColor).alpha=1-this._symbolDot._symbolStyle.fillOpaqueRate/100,this.createFillGeomtery(h,f,t,this._symbolDot.id)),e=WebGLPlot.Color.fromAlpha(e,this._symbolDot._symbolStyle.opacity);var y=new WebGLPlot.GeometryInstance({geometry:v,id:this._symbolDot.id,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(e)}});r.push(y)}}}var $=Math.max.apply({},o),b=Math.min.apply({},o),T=Math.max.apply({},a),C=Math.min.apply({},a);return C<0&&(T-=C),b<0&&($-=b),this.vectorHeight=$>T?$:T,0!==this._symbolDot.vectorRotate.y||0!==this._symbolDot.vectorRotate.x?this.createTextCell2(u):this.createTextCell(s,l),r},_0x404870.prototype.createFillGeomtery=function(e,t,i,n){var r=[],o=[],a=_0x2d6822.Resolve(e);if(!a||a.length<3)return null;for(var s=0;s<a.length;s+=3){o[0]=t[a[s]],o[1]=t[a[s+1]],o[2]=t[a[s+2]];var l=this.createTrigonFillGeomterys(o,i,n);l&&r.push(l)}if(0===r.length)return null;var u=new WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),c=new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.MaterialAppearance({material:u,aboveGround:!0}),show:this._display,asynchronous:!1});c.plottingLayer=this._symbolDot._layer,this._primitives.push(c)},_0x404870.prototype.createTrigonFillGeomterys=function(e,t,i){var n=new WebGLPlot.PolygonHierarchy(e,[]),r=new WebGLPlot.PolygonGeometry({polygonHierarchy:n,perPositionHeight:!0}),o=WebGLPlot.PolygonGeometry.createGeometry(r);return o?new WebGLPlot.GeometryInstance({geometry:o,id:i}):null},_0x404870.prototype.getTextBoundPts=function(e,t,i){var n=[],r=[],o=Math.max.apply({},e),a=Math.min.apply({},e),s=Math.max.apply({},t),l=Math.min.apply({},t),u=(l<0?s-l:s)*(this._symbolDot.vectorScale*this._symbolDot.vectorDefaultSize);r.push(new WebGLPlot.Cartesian2(a,l)),r.push(new WebGLPlot.Cartesian2(o,l));var c=0;this._symbolDot._isMiddleMarkExist&&!i&&(c=l>0?l/s:l/(s-l));for(var h=[],d=[],f=0;f<r.length;f++){var p=r[f],_=this.localPtsToCartesian(p,this.modelMatrix).position;n.push(new WebGLPlot.Cartesian3(_.x,_.y,_.z)),h.push(this._symbolDot.localPoints[0].z+u),d.push(this._symbolDot.localPoints[0].z+u*c)}return{potions:n,maxExtendWallHeight:h,minExtendWallHeight:d}},_0x404870.prototype.localPtsToCartesian=function(e,t){var i=new WebGLPlot.Cartesian3,n=new WebGLPlot.Cartesian3,r=this._symbolDot.vectorScale*this._symbolDot.vectorDefaultSize;return n=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1,-e.x,e.y),r,n),{position:i=WebGLPlot.Matrix4.multiplyByPoint(t,n,i),vector:n}},_0x404870.prototype.createTextGeometry=function(e,t,i){var n=this.getTextBoundPts(e,t,i),r=new WebGLPlot.WallGeometry({positions:n.potions,maximumHeights:n.maxExtendWallHeight,minimumHeights:n.minExtendWallHeight}),o=WebGLPlot.WallGeometry.createGeometry(r);return o?new WebGLPlot.GeometryInstance({geometry:o,id:this._symbolDot.id}):null},_0x404870.prototype.createTextCell=function(e,t){if(this.isHasTextCell){var i=this._symbolDot._dotGrid.drawDotSymbolGraphic(!0),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=this.createTextGeometry(e,t,!0),o=new WebGLPlot.Primitive({geometryInstances:[r],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});o.plottingLayer=this._symbolDot._layer,this._primitives.push(o)}},_0x404870.prototype.createTextCell2=function(e){if(this.isHasTextCell){var t=this.createPolygon(e),i=this._symbolDot._dotGrid.drawDotSymbolGraphic(!0),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=new WebGLPlot.Primitive({geometryInstances:[t],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});r.plottingLayer=this._symbolDot._layer,this._primitives.push(r)}},_0x404870.prototype.createMiddleText=function(e){var t=[],i=[],n=[],r=[];t.push(new WebGLPlot.Cartesian2(e.left,e.top)),t.push(new WebGLPlot.Cartesian2(e.left,e.bottom)),t.push(new WebGLPlot.Cartesian2(e.right,e.bottom)),t.push(new WebGLPlot.Cartesian2(e.right,e.top)),t.push(new WebGLPlot.Cartesian2(e.left,e.top));for(var o=e.right-e.left,a=e.top-e.bottom,s=new WebGLPlot.Cartesian2(o/2,a/2),l=0;l<t.length;l++)i.push(t[l].x),n.push(t[l].y),r.push(this.localPtsToCartesian(t[l],this.modelMatrix).position);WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas")),this._canvas.setAttribute("width",o),this._canvas.setAttribute("height",a),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);var u=this._symbolDot._textContent,c=this._symbolDot._symbolTextStyle,h=c.fontName,d=c._fontSize;c.bold?this._ctx.font="bold "+d+"px "+h:c.italic?this._ctx.font="italic "+d+"px "+h:this._ctx.font=d+"px "+h,this._ctx.textAlign="center",this._ctx.textBaseline="middle",c._outline?(this._ctx.strokeStyle=this._symbolDot.colorToString(c._outlineColor),this._ctx.strokeText(u,s.x,s.y,o)):(this._ctx.fillStyle=this._symbolDot.colorToString(c.foreColor),this._ctx.fillText(u,s.x,s.y,o)),0!==this._symbolDot.vectorRotate.y||0!==this._symbolDot.vectorRotate.x?this.createTextContent2(r):this.createTextContent(i,n)},_0x404870.prototype.createTextContent2=function(e){var t=this.createPolygon(e),i=this._canvas.toDataURL("image/png"),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=new WebGLPlot.Primitive({geometryInstances:[t],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});r.plottingLayer=this._symbolDot._layer,this._primitives.push(r)},_0x404870.prototype.createTextContent=function(e,t){var i=this.createTextGeometry(e,t,!1),n=this._canvas.toDataURL("image/png"),r=new WebGLPlot.Material.fromType("Image",{image:n}),o=new WebGLPlot.Primitive({geometryInstances:[i],appearance:new WebGLPlot.MaterialAppearance({material:r}),show:this._display,asynchronous:!1});o.plottingLayer=this._symbolDot._layer,this._primitives.push(o)},_0x404870.prototype.createPolygon=function(e){var t=WebGLPlot.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0}),i=WebGLPlot.PolygonGeometry.createGeometry(t);return new WebGLPlot.GeometryInstance({geometry:i,id:this.id})};var _0x57a831=(_0x3b8174=!0,function(e,t){var i=_0x3b8174?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b8174=!1,i}),_0x184fed=_0x57a831(void 0,(function(){return _0x184fed.toString().search("(((.+)+)+)+$").toString().constructor(_0x184fed).search("(((.+)+)+)+$")})),_0x3b8174;function _0x54378e(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._picturePath=WebGLPlot.defaultValue(e.symbolDot._picturePath,""),this._canvas=void 0,this.initCanvas()}_0x184fed(),Object.defineProperties(_0x54378e.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x54378e.prototype.drawDotSymbolPicture=function(e){var t=this._symbolDot._billboardBoundsLineWidth,i=this._symbolDot.pictureSymbolSize.x*this._symbolDot.scale,n=this._symbolDot.pictureSymbolSize.y*this._symbolDot.scale,r=this._symbolDot.pictureSymbolSize.x*this._symbolDot.scale,o=this._symbolDot.pictureSymbolSize.y*this._symbolDot.scale,a=0;if(this.textBounds={x:0,y:0,width:0,height:0},this._symbolDot._textContent&&""!==this._symbolDot._textContent){a=this._symbolDot._symbolTextStyle._fontSize,this.setCanvasTextFont();let e=this._ctx.measureText(this._symbolDot._textContent).width;i=e>i?e:i,this.textBounds={x:i/2,y:a/2,width:e,height:a}}this._canvas.setAttribute("width",i+2*t),this._canvas.setAttribute("height",n+2*t+a),this._symbolDot._textContent&&""!==this._symbolDot._textContent&&this.drawText();var s=(this._canvas.width-r)/2;return this._ctx.drawImage(e,s,a,r,o),this._symbolDot._isSelected&&this.drawBoundingRect(t),this._canvas.toDataURL("image/png")},_0x54378e.prototype.drawText=function(){var e=this._symbolDot._textContent,t=this._symbolDot._symbolTextStyle;this.setCanvasTextFont(),this._ctx.textAlign="center",this._ctx.textBaseline="middle";var i=0,n=0;if(this._middleMarkBounds&&(i=this._middleMarkBounds.x+this._middleMarkBounds.width/2,n=this._middleMarkBounds.y+this._middleMarkBounds.height/2),t._outline){this._ctx.setLineDash([]);var r=this._ctx.lineWidth;this._ctx.lineWidth=t.outlineWidth;var o=t._outlineColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x4c2bdd.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.strokeStyle=o,this._ctx.strokeText(e,i,n,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x4c2bdd.Middle&&(this._ctx.strokeStyle=o,this._ctx.strokeText(e,this.textBounds.x,this.textBounds.y)),this._ctx.lineWidth=r}var a=t.foreColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x4c2bdd.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.fillStyle=a,this._ctx.fillText(e,i,n,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x4c2bdd.Middle&&(this.drawTextBoundsRect(t),this._ctx.fillStyle=a,this._ctx.fillText(e,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.fillStyle=a,this._ctx.fillText(e,i,n,this._middleMarkBounds.width))},_0x54378e.prototype.drawTextBoundsRect=function(e){if(e.isShowBackColor){let t,i=this.textBounds.y-e.fontSize/2,n=this.textBounds.width,r=this.textBounds.height;switch(this._ctx.textAlign){case"center":t=this.textBounds.x-this.textBounds.width/2;break;case"right":t=this.textBounds.x-this.textBounds.width;break;case"left":t=this.textBounds.x}this._ctx.fillStyle=WebGLPlot.Color.fromCssColorString(e.backColor),this._ctx.fillRect(t,i,n,r)}},_0x54378e.prototype.setCanvasTextFont=function(){var e=this._symbolDot._symbolTextStyle,t=e.fontName,i=e._fontSize;e.bold?this._ctx.font="bold "+i+"px "+t:e.italic?this._ctx.font="italic "+i+"px "+t:this._ctx.font=i+"px "+t},_0x54378e.prototype.drawBoundingRect=function(e){this._ctx.beginPath(),this._ctx.moveTo(e/2,e/2+this.textBounds.height),this._ctx.lineTo(e/2,this._canvas.height-e/2),this._ctx.lineTo(this._canvas.width-e/2,this._canvas.height-e/2),this._ctx.lineTo(this._canvas.width-e/2,e/2+this.textBounds.height),this._ctx.lineTo(e/2,e/2+this.textBounds.height),this._ctx.strokeStyle=this._symbolDot._billboardBoundsColor.toCssColorString(),this._ctx.lineWidth=e,this._ctx.closePath(),this._ctx.stroke()},_0x54378e.prototype.initCanvas=function(){WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas"),this._canvas.width=this._symbolDot.pictureSymbolSize.x,this._canvas.height=this._symbolDot.pictureSymbolSizey),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height)};var _0x4fe35f=(_0x20c16d=!0,function(e,t){var i=_0x20c16d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x20c16d=!1,i}),_0x479fea=_0x4fe35f(void 0,(function(){return _0x479fea.toString().search("(((.+)+)+)+$").toString().constructor(_0x479fea).search("(((.+)+)+)+$")})),_0x20c16d;_0x479fea();class _0x25259d extends _0x21fac2{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),WebGLPlot.defined(e.serverData)?this._getServerDataPrototype(e.serverData):(this._anchorPoint=WebGLPlot.defaultValue(e.anchorPoint,new WebGLPlot.Cartesian2(0,0)),this._gridSymbolSize=WebGLPlot.defaultValue(e.gridSymbolSize,new WebGLPlot.Cartesian2(0,0)),this._symbolSizeInLib=WebGLPlot.defaultValue(e.symbolSizeInLib,new WebGLPlot.Cartesian2(-1,-1)),this._symbolRanks=WebGLPlot.defaultValue(e.symbolRanks,[]),this._middleMarkBounds=WebGLPlot.defaultValue(e.middleMarkBounds,null),this._symbolSize=WebGLPlot.defaultValue(e.symbolSize,new WebGLPlot.Cartesian2(-1,-1)),this._innerCells=[]),this._scale=WebGLPlot.defaultValue(e.scale,.8),this._rotate=WebGLPlot.defaultValue(e.rotate,new _0x11ff81(0,0,0)),this._modelScale=WebGLPlot.defaultValue(e.modelScale,new _0x11ff81(1,1,1)),this._modelRotate=WebGLPlot.defaultValue(e.modelRotate,new _0x11ff81(0,0,0)),this._vectorRotate=WebGLPlot.defaultValue(e.vectorRotate,new _0x11ff81(0,0,0)),this._vectorScale=WebGLPlot.defaultValue(e.vectorScale,1),this._vectorDefaultSize=WebGLPlot.defaultValue(e.vectorDefaultSize,-1),this._gridLineWidth=WebGLPlot.defaultValue(e.gridLineWidth,3),this._gridSurroundLineWidth=WebGLPlot.defaultValue(e.gridSurroundLineWidth,3),this._pictureSymbolSize=WebGLPlot.defaultValue(e.pictureSymbolSize,new WebGLPlot.Cartesian2(64,64)),this._picturePath=WebGLPlot.defaultValue(e.picturePath,""),this._showMode=WebGLPlot.defaultValue(e.showMode,_0x4e5d29.Grid),this._isNegativeImage=WebGLPlot.defaultValue(e.isNegativeImage,!1),this._symbolRank=WebGLPlot.defaultValue(e.symbolRank,0),this._lineSymbolID=WebGLPlot.defaultValue(e.lineSymbolID,0),this._modelPath=WebGLPlot.defaultValue(e.modelPath,""),this._textPos=WebGLPlot.defaultValue(e.textPos,_0x4c2bdd.Up),this._hasDragLine=WebGLPlot.defaultValue(e.hasDragLine,!1),this._dragPoint=WebGLPlot.defaultValue(e.dragPoint,new _0x11ff81(-1,-1,-1)),this._textContent=WebGLPlot.defaultValue(e.textContent,""),this._canvasEle=null,this._prepicturePath=null,this._canvasSymbolData=[],this._imageResult=null,this._isFlagSymbol=!1,this._dotGrid=null,this._dotPicture=null,this._dotVector=null,this._sizeInMeters=!1,this._alwaysHasMiddelText=!1,this._bill=null,this._modelColor=new WebGLPlot.Color(1,1,1,1),this.billboard=null,this.mergeDefaultStyle(),this.bIsShowBloodVolume=WebGLPlot.defaultValue(e.bIsShowBloodVolume,!0),this.BloodVolumes=WebGLPlot.defaultValue(e.bloodVolumes,[]),this._isMiddleMarkExist=null!==this._serverData&&this._serverData.middleMarkExist,this._middleMarkBounds=null!==this._serverData&&this._serverData.middleMarkBounds,this._symbolSizeInMeters=new WebGLPlot.Cartesian2(-1,-1),this._symbolPictureSizeInMeters=new WebGLPlot.Cartesian2(-1,-1),this._BillboardScale=1,this._billboardBoundsColor=new WebGLPlot.Color(1,1,0,1),this._billboardBoundsLineWidth=3,this._modelAnimationPlay=WebGLPlot.defaultValue(e.modelAnimationPlay,!0),this._modelAnimationLoop=WebGLPlot.defaultValue(e.modelAnimationLoop,WebGLPlot.ModelAnimationLoop.REPEAT),this._modelAnimationMultiplier=WebGLPlot.defaultValue(e.modelAnimationMultiplier,1),this._modelAnimationReverse=WebGLPlot.defaultValue(e.modelAnimationReverse,!1),this.__initSymbolPointSymbolData(),this._vectorPrimitives=[]}initSymbol(e){if((!this._initialize||e)&&!(this.localPoints.length<=0||0!==this.libID&&this._innerCells.length<=0)){this._initialize=!0,this.computerBillboardScaleInMeters(),_0x38860f.removeAllAlgoLabel(this,this._layer._scene),this.__resetBillboard(),this._canvasSymbolData=[],0!==this._wholeHeight&&(this.localPoints[0].z=this._wholeHeight);var t=this.localPoints[0],i=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z);switch(null===this._dotGrid&&(this._dotGrid=new _0x22f580({symbolDot:this})),this._showMode){case _0x4e5d29.Grid:case _0x4e5d29.Picture:this._createPicture(i,e);break;case _0x4e5d29.Marker:this._createModel(i);break;case _0x4e5d29.Vector:this._createVector()}this.addTextContent(t),this.drawAnnotationArray(),_0x4e5d29.Picture!==this._showMode&&this.updateEditCtrl(e),this._initSymbolFinished.raiseEvent(this)}}createBillboard(e,t){return{id:this.id,show:this.display,position:e,image:t,pixelOffset:new WebGLPlot.Cartesian2(0,this._dotGrid._OffsetText_Down),horizontalOrigin:WebGLPlot.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot.VerticalOrigin.BOTTOM,disableDepthTestDistance:this.disableDepthTestDistance,color:WebGLPlot.Color.WHITE.withAlpha(this._symbolStyle._opacity),sizeInMeters:this._sizeInMeters,scale:this._BillboardScale}}computerBillboardScaleInMeters(){if(this._sizeInMeters&&-1===this._symbolSizeInMeters.x&&-1===this._symbolSizeInMeters.y&&this.showMode===_0x4e5d29.Grid)this._symbolSizeInMeters=_0x2d6822.pixelDisToRealDisInMeters(this._layer._scene,this._gridSymbolSize),this._BillboardScale=this._symbolSizeInMeters.x/this._gridSymbolSize.x;else if(this._sizeInMeters&&(-1!==this._symbolSizeInMeters.x||-1!==this._symbolSizeInMeters.y)&&this.showMode===_0x4e5d29.Grid){var e=this._symbolSizeInMeters.x/this._gridSymbolSize.x;this._symbolSizeInMeters.y=e*this._gridSymbolSize.y,this._BillboardScale=e}if(this._sizeInMeters&&-1===this._symbolPictureSizeInMeters.x&&-1===this._symbolPictureSizeInMeters.y&&this.showMode===_0x4e5d29.Picture)this._symbolPictureSizeInMeters=_0x2d6822.pixelDisToRealDisInMeters(this._layer._scene,this._pictureSymbolSize),this._BillboardScale=this._symbolPictureSizeInMeters.x/this._pictureSymbolSize.x;else if(this._sizeInMeters&&(-1!==this._symbolPictureSizeInMeters.x||-1!==this._symbolPictureSizeInMeters.y)&&this.showMode===_0x4e5d29.Picture){e=this._symbolPictureSizeInMeters.x/this._pictureSymbolSize.x;this._symbolPictureSizeInMeters.y=e*this._pictureSymbolSize.y,this._BillboardScale=e}}__resetBillboard(){WebGLPlot.defined(this.billboard)&&(_0x38860f.removeBillboard(this.billboard,this._layer._scene),this.billboard=void 0)}updateEditCtrl(e){if(!e&&WebGLPlot.defined(this._layer.selectedFeature)&&this.id===this._layer.selectedFeature.id&&this.display){var t=this;WebGLPlot.defined(this._model)&&this._model.readyPromise.then((function(e){_0x4e5d29.Marker===t._showMode&&t._layer._plottingEdit.drawModelEditObject(!0)})),WebGLPlot.defined(this.s3mInstance)&&this.s3mInstance._boundingSphere&&(_0x4e5d29.Marker,t._showMode),this.display,(_0x4e5d29.Grid===t._showMode||_0x4e5d29.Picture===t._showMode)&&this._layer._plottingEdit.createCtrlPoints(this),_0x4e5d29.Vector===t._showMode&&t._layer._plottingEdit.drawVectorEditObject(!0),_0x4e5d29.Marker===t._showMode&&this._layer._plottingEdit.CtrlPosition.removeAll()}}copyStyle(){for(var e=0;e<this._innerCells.length;e++){var t=this._innerCells[e],i=this.copySymbolStyle(t,this._symbolStyle);let n=null;t.textStyle?n=this.copySymbolTextStyle(t.textStyle):t.textStyle2D&&(n=this.copySymbolTextStyle(t.textStyle2D)),this._canvasSymbolData.push({positionPoints:t.positionPoints,surroundLineFlag:t.surroundLineFlag,style:i,type:t.type,textStyle:n,textContent:t.textContent})}}copySymbolTextStyle(e){let t=e.backColor;!(e.backColor instanceof WebGLPlot.Color)&&e.backColor.alpha>1?e.backColor=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha):e.backColor=new WebGLPlot.Color(t.red,t.green,t.blue,t.alpha);let i=e.foreColor;return!(e.foreColor instanceof WebGLPlot.Color)&&e.foreColor.alpha>1?e.foreColor=WebGLPlot.Color.fromBytes(i.red,i.green,i.blue,i.alpha):e.foreColor=new WebGLPlot.Color(i.red,i.green,i.blue,i.alpha),e}copySymbolStyle(e,t){var i={};if(e.surroundLineFlag)i.lineColor=t.surroundLineColor.toCssColorString(),i.lineWidth=this._gridSurroundLineWidth,i.dashArray=[];else{i.lineWidth=this._gridLineWidth;var n=t.lineColor;i.lineColor=n.toCssColorString();var r=WebGLPlot.Color.clone(t.fillForeColor);if(r.alpha=1-t.fillOpaqueRate/100,i.fillStyle=r.toCssColorString(),i.hasShade=!1,0!==t.fillGradientMode&&(i.hasShade=!0,t.fillForeColor.alpha=1-t.fillOpaqueRate/100,t.fillBackColor.alpha=1-t.fillOpaqueRate/100,i.fillForeColor=t.fillForeColor.toCssColorString(),i.fillBackColor=t.fillBackColor.toCssColorString()),i.fill=t.fillSymbolID,i.dashArray=_0xde8c3(this._lineSymbolID),e.lineColorLimit){let t=e.style.lineColor;n=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha),i.lineColor=n.toCssColorString()}if(e.lineTypeLimit&&(i.lineTypeLimit=!0),e.fillColorLimit){let t=e.style.fillForeColor;var o=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha);o.alpha=e.style.fillOpaqueRate/100,i.fillStyle=o.toCssColorString()}if(e.fillLimit&&(i.fill=e.style.fillSymbolID,i.fillLimit=!0,!e.fillColorLimit)){var a=WebGLPlot.Color.clone(n);a.alpha=e.style.fillOpaqueRate/100,i.fillStyle=a.toCssColorString()}}return i.markerSize=e.style.markerSize,i.globalAlpha=t.opacity,i}setShowMode(e){this._showMode=e}getShowMode(){return this._showMode}setScale(e){if(_0x4e5d29.Vector==this._showMode)this._scale=e;else{if(_0x4e5d29.Marker!=this._showMode)return;this._modelScale=new _0x11ff81(e,e,e)}}getScale(){return _0x4e5d29.Vector==this._showMode?this._scale:_0x4e5d29.Marker==this._showMode?this._modelScale:new _0x11ff81(1,1,1)}setRotate(e){if(_0x4e5d29.Vector==this._showMode)this._rotate=e;else{if(_0x4e5d29.Marker!=this._showMode)return;this._modelRotate=e}}getRotate(){return _0x4e5d29.Vector==this._showMode?this._rotate:_0x4e5d29.Marker==this._showMode?this._modelRotate:void 0}setSymbolSize(e){if(_0x4e5d29.Grid===this._showMode){var t=e,i=this._gridSymbolSize;if(i.x!==e.x&&i.y===e.y)t.y=i.y*e.x/i.x;else if(i.x===e.x&&i.y!==e.y)t.x=i.x*e.y/i.y;else if(i.x!==e.x&&i.y!==e.y){var n=e.x/i.x,r=e.y/i.y,o=r>n?r:n;t.x=o*i.x,t.y=o*i.y}this._gridSymbolSize=t}}getSymbolSize(){if(_0x4e5d29.Grid==this._showMode)return this._gridSymbolSize}getPicturePath(){return this._picturePath}setPicturePath(e){return 0!==e.length&&(this._picturePath=e,!0)}getSymbolName(){return this.symbolName}setModelRotate(e,t,i){if("number"==typeof e&&"number"==typeof t&&"number"==typeof i){var n=new _0x11ff81(e,t,i);this.modelRotate=n}}setVectorRotate(e,t,i){var n=new _0x11ff81(e,t,i);this.vectorRotate=n}addTextContent(e){var t=this;if(WebGLPlot.defined(t._textContent)){var i=t._textContent;if(_0x4e5d29.Marker===t._showMode&&(WebGLPlot.defined(i)&&0!==i.length&&!_0x475556(i)||this.bIsShowBloodVolume))t._model&&t._model.readyPromise.then((function(i){_0x19af91(e,i,t)}));else if(_0x4e5d29.Vector===t._showMode&&(WebGLPlot.defined(i)&&0!==i.length&&!_0x475556(i)||this.bIsShowBloodVolume)){var n=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z+this._dotVector.vectorHeight);(t.bIsShowBloodVolume&&t.BloodVolumes.length>0||!_0x475556(t._textContent))&&(t._imageResult=t._dotGrid.drawDotModelTextAndBloodVolume(),t.billboard=_0x38860f.addBillboard(t.createBillboard(n,t._imageResult),this._layer._scene),t._layer.updatePrimitive=!0)}}}addBloodVolume(e){e instanceof _0xb27609&&(this.BloodVolumes.push(e),this._initialize=!1)}_destroy(){_0x47a70a.getInstance().symbolDestroyed.raiseEvent(this.id),WebGLPlot.defined(this.billboard)&&null!==this.billboard&&(_0x38860f.removeBillboard(this.billboard,this._layer._scene),this.billboard._destroy(),this.billboard=null),this.__removeDotModelAndVector(),WebGLPlot.defined(this._geoEntity)&&(this._geoEntity.destroy(),this._geoEntity=void 0),this.removeAllGeoEffect()}_createModel(e){var t=new WebGLPlot.HeadingPitchRoll,i=Math.PI/180;t.pitch=i*this._modelRotate.x,t.roll=i*this._modelRotate.y,t.heading=i*this._modelRotate.z;var n=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("north","west"),r=WebGLPlot.Transforms.headingPitchRollToFixedFrame(e,t,WebGLPlot.Ellipsoid.WGS84,n);if(this.s3mInstance&&this.s3mInstance.modelPath===this._modelPath)this.s3mInstance.updatePosition(e),this.s3mInstance.updateColor(this._modelColor),this.s3mInstance.updateScale(new Cesium.Cartesian3(this._modelScale.x,this._modelScale.x,this._modelScale.x)),this.s3mInstance.updateRotation(t),this.s3mInstance.visible=this._display;else if(void 0===this._model||this._model.basePath!==this._modelPath||this._initializeModel){this._initializeModel=!1;let i=this.modelPath.split(".");const n=i[i.length-1];switch(n){case"s3m":case"s3mb":{let i={position:e,hpr:t,scale:new Cesium.Cartesian3(this._modelScale.x,this._modelScale.x,this._modelScale.x),color:WebGLPlot.Color.clone(this._modelColor),id:this.id,visible:this._display};if(!WebGLPlot.s3mInstanceColc)throw new WebGLPlot.DeveloperError("S3MInstanceCollection is required.");WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).add(this._modelPath,i),this.s3mInstance=WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).getInstance(this._modelPath,this.id),this.s3mInstance.SymbolType=_0x18bc2f.SYMBOL_DOT,this.s3mInstance.modelPath=this._modelPath;break}case"gltf":case"glb":case"s3mz":{const e={url:this._modelPath,modelMatrix:r,scale:this.modelScale,id:this.id,show:this._display,color:this._modelColor};if("gltf"==n||"glb"==n)this._model=WebGLPlot.Model.fromGltf(e),_0x18c6d6(this);else if("s3mz"==n){let t=this;if(i=this.modelPath.split("iserver"),i.length>1){let n=i[0]+"iserver/services/MGISDataSystemServer/rest/domainComponents/MGISDataQueryImpl/deCodeModelResult.json?";n+="arg0="+this.modelPath;let r=_0x1f38a9();r.open("GET",encodeURI(n),!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),r.onreadystatechange=function(){if(4===r.readyState&&200===r.status){var i=r.responseText;let n=JSON.parse(i);WebGLPlot.defined(n)&&WebGLPlot.defined(n.supermap)&&(e.gltfJson=n.supermap,t._model=WebGLPlot.Model.fromJson(e),_0x18c6d6(t)),r.onreadystatechange=function(){},r=null}},r.send()}}break}}}else this._model.modelMatrix=r,this._model.scale=this._modelScale.x,this._model.show=this._display,this._model.color=this._modelColor}_createPicture(e,t){if(_0x4e5d29.Grid===this._showMode||_0x475556(this._picturePath)){if(!WebGLPlot.defined(this._innerCells)||0===this._innerCells.length)return;this.copyStyle(),this._showMode=_0x4e5d29.Grid,this._imageResult=this._dotGrid.drawDotSymbolGraphic(),null===this._dotGrid&&(this._dotGrid=new _0x22f580({symbolDot:this})),this.billboard=_0x38860f.addBillboard(this.createBillboard(e,this._imageResult),this._layer._scene),this.billboard.SymbolType=_0x18bc2f.SYMBOL_DOT}else{var i=this;null===this._dotPicture&&(this._dotPicture=new _0x54378e({symbolDot:this}));var n=new Image;n.src=this._picturePath,n.setAttribute("crossOrigin","Anonymous"),n.onload=function(){i._imagePicture=i._dotPicture.drawDotSymbolPicture(n),i.__resetBillboard(),i.billboard=_0x38860f.addBillboard(i.createBillboard(e,i._imagePicture),i._layer._scene),i.billboard.SymbolType=_0x18bc2f.SYMBOL_DOT,i.updateEditCtrl(t)}}}_createVector(){if(null===this._dotVector&&(this._dotVector=new _0x404870({symbolDot:this})),WebGLPlot.defined(this._innerCells)&&0!==this._innerCells.length){this.copyStyle(),this.__removeDotModelAndVector();var e=this._dotVector.drawDotSymbolVector();for(let t=0;t<e.length;t++){let i=_0x38860f.addDotModelAndVector(e[t],this._layer._scene);i.plottingLayer=this._layer,i.SymbolType=_0x18bc2f.SYMBOL_DOT,this._vectorPrimitives.push(i)}this._middleMarkBounds&&this._isMiddleMarkExist&&this._textPos===_0x4c2bdd.Middle&&this._dotVector.createMiddleText(this._middleMarkBounds)}}clone(){var e=new _0x25259d({layer:this._layer,libID:this._libID,code:this._code,localPoints:this._localPoints,serverData:this._serverData});e._libID=JSON.parse(JSON.stringify(this._libID)),e._code=JSON.parse(JSON.stringify(this._code)),e._symbolName=JSON.parse(JSON.stringify(this._symbolName)),e._symbolType=JSON.parse(JSON.stringify(this._symbolType)),e._display=JSON.parse(JSON.stringify(this._display)),e._id=JSON.parse(JSON.stringify(this._id)),e._initialize=JSON.parse(JSON.stringify(!1)),e._isEdit=JSON.parse(JSON.stringify(this._isEdit)),e._isUseSymbolLibStyle=JSON.parse(JSON.stringify(this._isUseSymbolLibStyle)),e._markHalo=JSON.parse(JSON.stringify(this._markHalo)),e._localPoints=WebGLPlot.clonePoints(this.localPoints),e._symbolStyle=this._symbolStyle.clone(),e._symbolTextStyle=this._symbolTextStyle.clone(),e._serverData=JSON.parse(JSON.stringify(this._serverData)),e._extendProperty=JSON.parse(JSON.stringify(this._extendProperty)),e._annotationArray=JSON.parse(JSON.stringify(this._annotationArray)),e._wholeHeight=JSON.parse(JSON.stringify(this._wholeHeight)),e._showMode=JSON.parse(JSON.stringify(this._showMode)),e._scale=JSON.parse(JSON.stringify(this._scale)),e._rotate=JSON.parse(JSON.stringify(this._rotate)),e._modelScale=JSON.parse(JSON.stringify(this._modelScale)),e._modelRotate=this._modelRotate.clone(),e._middleMarkBounds=JSON.parse(JSON.stringify(this._middleMarkBounds)),e._isMiddleMarkExist=JSON.parse(JSON.stringify(this._isMiddleMarkExist)),e._vectorScale=JSON.parse(JSON.stringify(this._vectorScale)),e._vectorDefaultSize=JSON.parse(JSON.stringify(this._vectorDefaultSize)),e._vectorRotate=JSON.parse(JSON.stringify(this._vectorRotate)),e._pictureSymbolSize=JSON.parse(JSON.stringify(this._pictureSymbolSize)),e._picturePath=JSON.parse(JSON.stringify(this._picturePath)),e._isNegativeImage=JSON.parse(JSON.stringify(this._isNegativeImage)),e.symbolRank=JSON.parse(JSON.stringify(this._symbolRank)),e._lineSymbolID=JSON.parse(JSON.stringify(this._lineSymbolID)),e._modelPath=JSON.parse(JSON.stringify(this._modelPath)),e._textPos=JSON.parse(JSON.stringify(this._textPos)),e._gridSymbolSize=JSON.parse(JSON.stringify(this._gridSymbolSize)),e._symbolSize=JSON.parse(JSON.stringify(this._symbolSize)),e._hasDragLine=JSON.parse(JSON.stringify(this._hasDragLine)),e._dragPoint=JSON.parse(JSON.stringify(this._dragPoint)),e._textContent=JSON.parse(JSON.stringify(this._textContent)),e._gridSurroundLineWidth=JSON.parse(JSON.stringify(this._gridSurroundLineWidth)),e._gridLineWidth=JSON.parse(JSON.stringify(this._gridLineWidth)),e._innerCells=this._innerCells,e._symbolSizeInLib=JSON.parse(JSON.stringify(this._symbolSizeInLib)),e.bIsShowBloodVolume=JSON.parse(JSON.stringify(this.bIsShowBloodVolume)),e._disableDepthTestDistance=this._disableDepthTestDistance,e._alwaysHasMiddelText=JSON.parse(JSON.stringify(this._alwaysHasMiddelText));for(var t=0;t<this.BloodVolumes.length;t++)e.BloodVolumes.push(_0xb27609.clone(this.BloodVolumes[t]));return e._sizeInMeters=JSON.parse(JSON.stringify(this._sizeInMeters)),e._symbolSizeInMeters=JSON.parse(JSON.stringify(this._symbolSizeInMeters)),e._symbolPictureSizeInMeters=JSON.parse(JSON.stringify(this._symbolPictureSizeInMeters)),e._geoEffectArray=[],this._geoEffectArray.forEach((t=>{e._geoEffectArray.push(t.clone())})),WebGLPlot.defined(this._geoEntity)&&(e._geoEntity=this._geoEntity.clone(e)),e}_getServerDataPrototype(e){this._anchorPoint=WebGLPlot.defaultValue(e.anchorPoint,new WebGLPlot.Cartesian2(0,0)),this._gridSymbolSize=WebGLPlot.defaultValue(new WebGLPlot.Cartesian2(e.symbolSize.x,e.symbolSize.y),new WebGLPlot.Cartesian2(-1,-1)),this._symbolSizeInLib=WebGLPlot.defined(e.symbolSizeInLib)?new WebGLPlot.Cartesian2(e.symbolSizeInLib.x,e.symbolSizeInLib.y):new WebGLPlot.Cartesian2(this._gridSymbolSize.x,this._gridSymbolSize.y),this._symbolRanks=WebGLPlot.defaultValue(e.symbolRanks,[]),this._middleMarkBounds=WebGLPlot.defaultValue(e.middleMarkBounds,null),this._symbolSize=WebGLPlot.defaultValue(e.symbolSize,new WebGLPlot.Cartesian2(-1,-1)),this._innerCells=WebGLPlot.defaultValue(e.innerCells,[])}__removeDotModelAndVector(){if(this.s3mInstance&&WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID)&&(WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).removeInstance(this.s3mInstance.modelPath,this.id),this.s3mInstance=void 0),this._model&&(_0x38860f.removeDotModelAndVector(this._model,this._layer._scene),this._model=void 0),this._vectorPrimitives.length>0){for(let e=0;e<this._vectorPrimitives.length;e++){let t=this._vectorPrimitives[e];_0x38860f.removeDotModelAndVector(t,this._layer._scene),t=void 0}this._vectorPrimitives=[]}}__initSymbolPointSymbolData(){_0x5aa3d5(this)}}function _0x475556(e){return!("string"==typeof e&&e.length>0)}function _0xde8c3(e){var t;if(!WebGLPlot.defined(e)||""===e)return t=[];switch(e){case 0:t=[];break;case 1:t=[20,5];break;case 2:t=[2,2];break;case 3:t=[10,2,2,2];break;case 4:t=[10,2,2,2,2,2]}return t}function _0x19af91(e,t,i){var n=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(t._minCorner.z,t._minCorner.x,t._minCorner.y),t.scale,new WebGLPlot.Cartesian3),r=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(t._maxCorner.z,t._maxCorner.x,t._maxCorner.y),t.scale,new WebGLPlot.Cartesian3),o=n.z<=0?r.z:r.z-n.z,a=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z+o);(i.bIsShowBloodVolume&&i.BloodVolumes.length>0||!_0x475556(i._textContent))&&(i._imageResult=i._dotGrid.drawDotModelTextAndBloodVolume(),i.billboard=_0x38860f.addBillboard(i.createBillboard(a,i._imageResult),i._layer._scene),i._layer.updatePrimitive=!0)}function _0x18c6d6(e){e._model=_0x38860f.addDotModelAndVector(e._model,e._layer._scene),e._model.SymbolType=_0x18bc2f.SYMBOL_DOT,e._modelAnimationPlay&&e._model.readyPromise.then((function(t){t.activeAnimations.addAll({loop:e._modelAnimationLoop,multiplier:e._modelAnimationMultiplier,reverse:e._modelAnimationReverse})}))}function _0x1f38a9(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}function _0x5aa3d5(e){if(!e||e._code!==_0x18bc2f.SYMBOL_POINT)return;let t={fillBackColor:{red:255,green:0,blue:0,alpha:255},fillBackOpaque:!0,fillForeColor:{red:255,green:255,blue:0,alpha:255},fillGradientAngle:0,fillGradientMode:"NONE",fillGradientOffsetRatioX:0,fillGradientOffsetRatioY:0,fillOpaqueRate:100,fillSymbolID:0,lineColor:{red:255,green:255,blue:0,alpha:255},lineSymbolID:0,lineWidth:.5,markerAngle:0,markerHeight:0,markerSize:2.4,markerSymbolID:0,markerWidth:0},i={align:"MIDDLECENTER",backColor:{red:0,green:0,blue:0,alpha:255},backOpaque:!1,bold:!1,borderSpacingWidth:4,fontHeight:7,fontName:WebGLPlot.plotI18n("SongTi"),fontScale:1,fontWeight:0,fontWidth:0,foreColor:{red:0,green:0,blue:0,alpha:255},italic:!1,italicAngle:0,opaqueRate:100,outline:!1,outlineWidth:1,rotation:0,shadow:!1,sizeFixed:!0,strikeout:!1,stringAlignment:"LEFT",underline:!1};var n={fillColorLimit:!1,fillLimit:!0,fontColorLimit:!1,lineColorLimit:!1,lineTypeLimit:!1,lineWidthLimit:!1,polybezierClose:!1,positionPoints:[{x:.1,y:8},{x:8.2,y:8},{x:.1,y:16.1}],style:t,surroundLineColor:new WebGLPlot.Color(255,255,0,255),surroundLineFlag:!1,surroundLineLimit:!1,surroundLineType:0,surroundLineWidth:1,textContent:"",textStyle:i,type:31},r={fillColorLimit:!1,fillLimit:!0,fontColorLimit:!1,lineColorLimit:!1,lineTypeLimit:!1,lineWidthLimit:!1,polybezierClose:!1,positionPoints:[{x:2.571235,y:8},{x:10.671235,y:8},{x:2.571235,y:16.1}],style:t,surroundLineColor:new WebGLPlot.Color(255,255,0,255),surroundLineFlag:!0,surroundLineLimit:!1,surroundLineType:0,surroundLineWidth:1,textContent:"",textStyle:i,type:31};e._gridSymbolSize={x:32,y:32},e._anchorPoint={x:.1,y:8},e._symbolSizeInLib={x:32,y:32},e._innerCells=[n,r]}Object.defineProperties(_0x25259d.prototype,{middleMarkBounds:{get:function(){return this._middleMarkBounds},set:function(e){e!==this._middleMarkBounds&&(this._middleMarkBounds=e,this._initialize=!1)}},modelAnimationPlay:{get:function(){return this._modelAnimationPlay},set:function(e){e!==this._modelAnimationPlay&&(this._modelAnimationPlay=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationLoop:{get:function(){return this._modelAnimationLoop},set:function(e){e===this._modelAnimationLoop||!(e instanceof WebGLPlot.ModelAnimationLoop)||(this._modelAnimationLoop=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationMultiplier:{get:function(){return this._modelAnimationMultiplier},set:function(e){e!==this._modelAnimationMultiplier&&(this._modelAnimationMultiplier=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationReverse:{get:function(){return this._modelAnimationReverse},set:function(e){e!==this._modelAnimationReverse&&(this._modelAnimationReverse=e,this._initialize=!1,this._initializeModel=!0)}},symbolSize:{get:function(){return this._symbolSize},set:function(e){e===this._symbolSize||!(e instanceof WebGLPlot.Cartesian2)||(this._symbolSize=e,this._initialize=!1)}},anchorPoint:{get:function(){return this._anchorPoint},set:function(e){e===this._anchorPoint||!(e instanceof WebGLPlot.Cartesian2)||(this._anchorPoint=e,this._initialize=!1)}},scale:{get:function(){return this._scale},set:function(e){if(!(e===this._scale||"number"!=typeof e||e<=0))if(this.billboard){if(this.billboard.scale=this.billboard.scale/this._scale*e,this._scale=e,this.showMode===_0x4e5d29.Grid){var t=this._dotGrid.transformPoints();this._dotGrid.computeImageBounds(t)}this.updateEditCtrl(!1)}else this._scale=e,this._initialize=!1}},rotate:{get:function(){return this._rotate},set:function(e){e===this._rotate||!(e instanceof _0x11ff81)||(this._rotate=e,this._initialize=!1,this.__setEffectParameter({rotate:this._rotate}))}},modelScale:{get:function(){return this._modelScale.x},set:function(e){e===this._modelScale.x||"number"!=typeof e||e<0||(this.__setEffectParameter({scale:e}),this._modelScale.x=e,this._initialize=!1)}},modelRotate:{get:function(){return this._modelRotate},set:function(e){e===this._modelRotate||!(e instanceof _0x11ff81)||(this._modelRotate=e,this._initialize=!1,this.__setEffectParameter({rotate:e}))}},modelColor:{get:function(){return this._modelColor},set:function(e){e instanceof WebGLPlot.Color&&(this._modelColor=e,this._initialize=!1)}},vectorRotate:{get:function(){return this._vectorRotate},set:function(e){e===this._vectorRotate||!(e instanceof _0x11ff81)||(this._vectorRotate=e,this.__setEffectParameter({rotate:e}),this._initialize=!1)}},vectorScale:{get:function(){return this._vectorScale},set:function(e){e===this._vectorScale||"number"!=typeof e||(this._vectorScale=e,this.__setEffectParameter({scale:e}),this._initialize=!1)}},vectorDefaultSize:{get:function(){return this._vectorDefaultSize},set:function(e){e===this._vectorDefaultSize||"number"!=typeof e||(this._vectorDefaultSize=e,this._initialize=!1)}},gridLineWidth:{get:function(){return this._gridLineWidth},set:function(e){e===this._gridLineWidth||"number"!=typeof e||(this._gridLineWidth=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},gridSurroundLineWidth:{get:function(){return this._gridSurroundLineWidth},set:function(e){e===this._gridSurroundLineWidth||"number"!=typeof e||(this._gridSurroundLineWidth=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},gridSymbolSize:{get:function(){return this._gridSymbolSize},set:function(e){if(!(e instanceof WebGLPlot.Cartesian2))return!1;var t=new WebGLPlot.Cartesian2(e.x,e.y);if(t.x<=0||t.y<=0)return!1;-1===this._gridSymbolSize.x&&-1===this._gridSymbolSize.y?t=this._symbolSizeInLib:-1===this._symbolSizeInLib.x&&-1===this._symbolSizeInLib.y&&(this._symbolSizeInLib=t.clone());var i=this._gridSymbolSize,n=this._symbolSizeInLib,r=t.x/n.x,o=t.y/n.y,a=n.x/n.y;t.x!==i.x&&t.y!==i.y?r>o?t.y=t.x/a:t.x=t.y*a:t.x!==i.x&&t.y===i.y?t.y=t.x/a:t.x===i.x&&t.y!==i.y&&(t.x=t.y*a),this._gridSymbolSize=t,this._initialize=!1}},pictureSymbolSize:{get:function(){return this._pictureSymbolSize},set:function(e){if(!(e instanceof WebGLPlot.Cartesian2))return!1;this._pictureSymbolSize=e,this._initialize=!1}},showMode:{get:function(){return this._showMode},set:function(e){e===this._showMode||"number"!=typeof e||e<0||e>3||(this._showMode=e,WebGLPlot.defined(this._layer)&&WebGLPlot.defined(this._layer._plottingEdit)&&(_0x4e5d29.Grid!=e||_0x4e5d29.Picture!=e)&&this._layer._plottingEdit._ctrlPoints.removeAll(),this.__resetBillboard(),this.__removeDotModelAndVector(),this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},isNegativeImage:{get:function(){return this._isNegativeImage},set:function(e){e===this._isNegativeImage||e.constructor!==Boolean||(this._isNegativeImage=e,WebGLPlot.defined(this._layer)&&WebGLPlot.defined(this._layer._plottingEdit)&&this._layer._plottingEdit.drawSymbolExtend(this),this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},symbolRank:{get:function(){return this._symbolRank},set:function(e){var t=this;if(e!==this._symbolRank&&"number"==typeof e){t._symbolRank=e;var i=WebGLPlot.getLibManager(this.layer._scene._plottingID).serverUrl,n=WebGLPlot.getServerData(this._libID,this._code,i,this._layer._scene._plottingID);if(n){var r=n.getSymbolInfo;r.events.on({processCompleted:function(e){t._innerCells=e.result.innerCells,t._initialize=!1,_0x47a70a.getInstance().symbolModified.raiseEvent(t)},processFailed:function(e){},scope:this});var o=n.getSymbolInfoParameters;o.symbolRank=e,o.surroundLineType=1,r.processAsync(o)}}}},symbolRanks:{get:function(){return this._symbolRanks}},lineSymbolID:{get:function(){return this._lineSymbolID},set:function(e){e===this._lineSymbolID||"number"!=typeof e||(this._lineSymbolID=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},modelPath:{get:function(){return this._modelPath},set:function(e){e!==this._modelPath&&(this._modelPath=e,this.__removeDotModelAndVector(),this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},textPos:{get:function(){return this._textPos},set:function(e){e===this._textPos||!this._middleMarkExist&&e===_0x4c2bdd.Middle||(this._textPos=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},hasDragLine:{get:function(){return this._hasDragLine},set:function(e){e===this._hasDragLine||e.constructor!==Boolean||(this._hasDragLine=e,this._initialize=!1)}},dragPoint:{get:function(){return this._dragPoint},set:function(e){e===this._dragPoint||!(e instanceof _0x11ff81)||(this._dragPoint=e,this._initialize=!1)}},picturePath:{get:function(){return this._picturePath},set:function(e){e!==this._picturePath&&(this._picturePath=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},scalePoints:{get:function(){return this._scalePoints},set:function(e){e===this._scalePoints||!(e instanceof _0x11ff81)||(this._scalePoints=e,this._initialize=!1)}},scaleValues:{get:function(){return this._scaleValues},set:function(e){e===this._scaleValues||!Array.isArray(e)||(this._scaleValues=e,this._initialize=!1)}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){e===this._sizeInMeters||_0x4e5d29.Grid!==this.showMode&&_0x4e5d29.Picture!==this.showMode||(this._sizeInMeters=e,this._initialize=!1,e||(this._BillboardScale=1))}},alwaysHasMiddelText:{get:function(){return this._alwaysHasMiddelText},set:function(e){e!==this._alwaysHasMiddelText&&(this._alwaysHasMiddelText=e,this._initialize=!1)}},symbolSizeInMeters:{get:function(){return this._symbolSizeInMeters},set:function(e){if(e!==this._symbolSizeInMeters&&e instanceof WebGLPlot.Cartesian2){if(this._symbolSizeInMeters=e,this.sizeInMeters){var t=this._symbolSizeInMeters.x/this._gridSymbolSize.x;this._symbolSizeInMeters.y=t*this._gridSymbolSize.y,this._BillboardScale=t}this._initialize=!1}}},symbolPictureSizeInMeters:{get:function(){return this._symbolPictureSizeInMeters},set:function(e){if(e!==this._symbolPictureSizeInMeters&&e instanceof WebGLPlot.Cartesian2){if(this._symbolPictureSizeInMeters=e,this.sizeInMeters){var t=this._symbolPictureSizeInMeters.x/this._gridSymbolSize.x;this._symbolPictureSizeInMeters.y=t*this._gridSymbolSize.y,this._BillboardScale=t}this._initialize=!1}}},billboardBoundsColor:{get:function(){return this._billboardBoundsColor},set:function(e){e instanceof WebGLPlot.Color&&(this._billboardBoundsColor=e,this._initialize=!1)}},billboardBoundsLineWidth:{get:function(){return this._billboardBoundsLineWidth},set:function(e){e===this._billboardBoundsLineWidth||"number"!=typeof e||(this._billboardBoundsLineWidth=e,this._initialize=!1)}}});var _0x408279=(_0x2fe7d4=!0,function(e,t){var i=_0x2fe7d4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2fe7d4=!1,i}),_0x22b302=_0x408279(void 0,(function(){return _0x22b302.toString().search("(((.+)+)+)+$").toString().constructor(_0x22b302).search("(((.+)+)+)+$")})),_0x2fe7d4;function _0xebe7e9(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._textContent=WebGLPlot.defaultValue(e.textContent,""),this._localPoint=WebGLPlot.defaultValue(e.localPoint,new WebGLPlot.Cartesian3(0,0,0)),this._textStyle=WebGLPlot.defaultValue(e.textStyle,new _0x34d1aa)}_0x22b302(),Object.defineProperties(_0xebe7e9.prototype,{textContent:{get:function(){return this._textContent},set:function(e){e&&"string"==typeof e&&(this._textContent=e)}},localPoint:{get:function(){return this._localPoint},set:function(e){(e instanceof _0x11ff81||e instanceof WebGLPlot.Cartesian3)&&(this._localPoint=e)}},textStyle:{get:function(){return this._textStyle}},fontName:{get:function(){return this._textStyle._fontName}},foreColor:{get:function(){return this._textStyle._foreColor}},fontSize:{get:function(){return this._textStyle._fontSize}},outlineWidth:{get:function(){return this._textStyle._outlineWidth}},outlineColor:{get:function(){return this._textStyle._outlineColor}},outline:{get:function(){return this._textStyle._outline}}});var _0x180a44=(_0x33f8d1=!0,function(e,t){var i=_0x33f8d1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33f8d1=!1,i}),_0x31725f=_0x180a44(void 0,(function(){return _0x31725f.toString().search("(((.+)+)+)+$").toString().constructor(_0x31725f).search("(((.+)+)+)+$")})),_0x33f8d1;_0x31725f();var WebGLPlot$c=window.WebGLPlot=window.WebGLPlot||{};function _0x267b40(e,t){var i=t;if(!i)throw new WebGLPlot$c.DeveloperError("name is required to create PlottingLayer");this._waterPlanes=[],this._visibleViewport=0,this._scene=e,this._valid=!0,this._bIsUseDepthTest=!1,this._visibility=!0,this._geoGraphicObjects=[],this._isLocked=!1,this._isEditable=!0,this._isSelected=!0,this.updatePrimitive=!1,this._selectedFeature=void 0,this._name=i,this._id=-1,this._symbolAddedEvent=new WebGLPlot$c.Event,this._objsVisibleMap={}}function _0x39a17e(e){var t=new WebGLPlot$c.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,WebGLPlot$c.defined(e.red)||(t.red=1),WebGLPlot$c.defined(e.green)||(t.green=1),WebGLPlot$c.defined(e.blue)||(t.blue=1),WebGLPlot$c.defined(e.alpha)||(t.alpha=1),t}function _0x5cc39e(e,t,i){var n=parseInt(t.symbolType);if(e._symbolType=n,e._symbolName=t.symbolName,e.__dotPlotLibID=t.dotPlotLibID,e.__dotPlotCode=t.dotPlotCode,""!==t.uuid&&WebGLPlot$c.defined(t.uuid)?e._id=t.uuid:e._id=WebGLPlot$c.createGuid(),e._isEdit=!0,e._wholeHeight=WebGLPlot$c.defined(t.wholeHeight)?t.wholeHeight:0,e._display=!0,"none"===t.style.display&&(e._display=!1),t.localePoints){let i=[];for(let e=0;e<t.localePoints.length;e++){const n=t.localePoints[e];i.push(new _0x11ff81(parseFloat(n.x),parseFloat(n.y),n.z?parseFloat(n.z):0))}e._localPoints=i}if(e._surroundRatioVal=WebGLPlot$c.defined(t.surroundRatioVal)?t.surroundRatioVal:.002,t.surroundLineColor&&(e._symbolStyle._surroundLineColor=_0x39a17e(t.surroundLineColor)),e._textContent=t.textContent,e._symbolStyle._surroundLineType=t.surroundLineType,e._symbolStyle._surroundLineWidth=WebGLPlot$c.defined(t.surroundlineWidth3D)?t.surroundlineWidth3D:3,e._symbolStyle._lineColor=_0x39a17e(t.style.lineColor),e._symbolStyle._opacity=e._symbolStyle.lineColor.alpha,e._symbolStyle._fillSymbolID=t.style.fillSymbolID,e._symbolStyle._fillForeColor=_0x39a17e(t.style.fillForeColor),e._symbolStyle._fillBackColor=_0x39a17e(t.style.fillBackColor),e._symbolStyle._fillGradientMode=t.style.fillGradientMode,e._symbolStyle._fillBackOpaque=t.style.fillBackOpaque,e._symbolStyle._fillGradientAngle=t.style.fillGradientAngle,e._symbolStyle._fillOpaqueRate=100-t.style.fillOpaqueRate,e._symbolStyle._fillGradientOffsetRatioX=t.style.fillGradientOffsetRatioX,e._symbolStyle._fillGradientOffsetRatioY=t.style.fillGradientOffsetRatioY,e._symbolStyle._lineWidth=WebGLPlot$c.defined(t.style.lineWidth3D)?t.style.lineWidth3D:3,t.hasOwnProperty("extendProperty")&&(e._extendProperty=t.extendProperty),t.hasOwnProperty("annotationArray"))for(var r=t.annotationArray,o=0;o<r.length;o++)e._annotationArray.push(new _0xebe7e9({textContent:r[o]._textContent,localPoint:r[o]._localPoint,textStyle:r[o]._textStyle}));if(t.textStyle2D){e._symbolTextStyle._italicAngle=t.textStyle2D.italicAngle,e._symbolTextStyle._shadow=t.textStyle2D.shadow,e._symbolTextStyle._sizeFixed=t.textStyle2D.sizeFixed,e._symbolTextStyle._underline=t.textStyle2D.underline,e._symbolTextStyle._rotation=t.textStyle2D.rotation,e._symbolTextStyle._bold=t.textStyle2D.bold,e._symbolTextStyle._align=t.textStyle2D.align,e._symbolTextStyle._italic=t.textStyle2D.italic,e._symbolTextStyle._strikeout=t.textStyle2D.strikeout,e._symbolTextStyle._fontName=t.textStyle2D.fontName,e._symbolTextStyle._outline=t.textStyle2D.outline,e._symbolTextStyle._borderSpacingWidth=t.textStyle2D.borderSpacingWidth,e._symbolTextStyle._outlineWidth=96*t.textStyle2D.outlineWidth/25.4,e._symbolTextStyle._fontWidth=t.textStyle2D.fontWidth,e._symbolTextStyle._opaqueRate=t.textStyle2D.opaqueRate,e._symbolTextStyle._stringAlignment=t.textStyle2D.stringAlignment,e._symbolTextStyle._fontScale=t.textStyle2D.fontScale,e._symbolTextStyle._fontWeight=t.textStyle2D.fontWeight,e._symbolTextStyle._foreColor=_0x39a17e(t.textStyle2D.foreColor),WebGLPlot$c.defined(t.textStyle2D.fontStrokeColor)?e._symbolTextStyle._backColor=_0x39a17e(t.textStyle2D.fontStrokeColor):WebGLPlot$c.defined(t.textStyle2D.backColor)&&(e._symbolTextStyle._backColor=_0x39a17e(t.textStyle2D.backColor)),e._symbolTextStyle._fontHeight=t.textStyle2D.fontHeight,e._symbolTextStyle._fontSize=parseInt(96*t.textStyle2D.fontHeight/25.4);let i=WebGLPlot$c.defined(t.textStyle2D.fontBackgroundColor)?_0x39a17e(t.textStyle2D.fontBackgroundColor):new WebGLPlot$c.Color(1,0,0,.3);e._symbolTextStyle.setTextRectColor(i),e._symbolTextStyle._isShowTextBox=!!WebGLPlot$c.defined(t.textStyle2D.backOpaque)&&t.textStyle2D.backOpaque}if(t.textStyle3D,_0x18bc2f.SYMBOL_DOT===n||_0x18bc2f.SYMBOL_Model===n||_0x18bc2f.SYMBOL_PICTURE===n){if(t.anchorPoint&&(e._anchorPoint=new WebGLPlot$c.Cartesian2(t.anchorPoint.x,t.anchorPoint.y)),t.symbolSize&&-1!==t.symbolSize.x&&-1!==t.symbolSize.y&&(e._symbolSize=new WebGLPlot$c.Cartesian2(t.symbolSize.x,t.symbolSize.y)),t.gridSymbolSize&&-1!==t.gridSymbolSize.x&&-1!==t.gridSymbolSize.y?e._gridSymbolSize=new WebGLPlot$c.Cartesian2(t.gridSymbolSize.x,t.gridSymbolSize.y):t.symbolSizeInLib&&(e._gridSymbolSize=new WebGLPlot$c.Cartesian2(t.symbolSizeInLib.x,t.symbolSizeInLib.y)),t.pictureSymbolSize&&-1!==t.pictureSymbolSize.x&&-1!==t.pictureSymbolSize.y&&(e._pictureSymbolSize=new WebGLPlot$c.Cartesian2(t.pictureSymbolSize.x,t.pictureSymbolSize.y)),t.scale3D&&(WebGLPlot$c.defined(t.scale3D.x)?e._scale=t.scale3D.x:e._scale=t.scale3D),t.rotate2D?e._rotate=new _0x11ff81(t.rotate2D.x,t.rotate2D.y,t.rotate2D.z):e._rotate=new _0x11ff81(1,1,1),t.innerCells?e._innerCells=t.innerCells:_0x4ea4b3(t.libID,t.code,e,i),t.symbolRanks&&(e._symbolRanks=t.symbolRanks),WebGLPlot$c.defined(t.picturePath)&&(e._picturePath=t.picturePath),WebGLPlot$c.defined(t.modelPath)&&(e._modelPath=t.modelPath),t.modelScale&&(e._modelScale.x=t.modelScale),t.modelRotate&&(e._modelRotate=new _0x11ff81(t.modelRotate.x,t.modelRotate.y,t.modelRotate.z)),t.vectorScale&&(e._vectorScale=t.vectorScale),t.vectorRotate&&(e._vectorRotate=new _0x11ff81(t.vectorRotate.x,t.vectorRotate.y,t.vectorRotate.z)),t.vectorDefaultSize&&(e._vectorDefaultSize=t.vectorDefaultSize),WebGLPlot$c.defined(t.middleMarkExist)&&(e._isMiddleMarkExist=t.middleMarkExist),WebGLPlot$c.defined(t.middleMarkBounds)&&(e._middleMarkBounds=t.middleMarkBounds),t.symbolSizeInLib?e._symbolSizeInLib=t.symbolSizeInLib:WebGLPlot$c.defined(t.mpWidth)&&WebGLPlot$c.defined(t.mpHeight)&&(e._symbolSizeInLib=new WebGLPlot$c.Cartesian2(t.mpWidth,t.mpHeight)),t.BloodVolumes)for(o=0;o<t.BloodVolumes.length;o++)e.BloodVolumes.push(_0xb27609.clone(t.BloodVolumes[o]));t.bIsShowBloodVolume&&(e.bIsShowBloodVolume=t.bIsShowBloodVolume),WebGLPlot$c.defined(t.disableDepthTestDistance)&&("5e-324"!==t.disableDepthTestDistance?e._disableDepthTestDistance=Number.MAX_VALUE:e._disableDepthTestDistance=Number.MIN_VALUE),WebGLPlot$c.defined(t.sizeInMeters)&&(e._sizeInMeters=t.sizeInMeters),WebGLPlot$c.defined(t.symbolSizeInMeters)&&(e._symbolSizeInMeters=new WebGLPlot$c.Cartesian2(t.symbolSizeInMeters.x,t.symbolSizeInMeters.y)),WebGLPlot$c.defined(t.alwaysHasMiddelText)&&(e._alwaysHasMiddelText=t.alwaysHasMiddelText),e._isNegativeImage=t.negativeImage,e._gridLineWidth=WebGLPlot$c.defined(t.gridLineWidth3D)?4*t.gridLineWidth3D:3,e._gridSurroundLineWidth=WebGLPlot$c.defined(t.gridSurroundLineWidth3D)?4*t.gridSurroundLineWidth3D:3,e._symbolRank=t.symbolRank,e._lineSymbolID=t.style.lineSymbolID,e._middleMarkExist=t.middleMarkExist,e._textPos=WebGLPlot$c.defined(t.annotationPosition)?t.annotationPosition:0,e._showMode=WebGLPlot$c.defined(t.dotShowMode)?t.dotShowMode:_0x4e5d29.Grid}else t.subSymbols&&(e._subSymbols=t.subSymbols),t.scaleValues&&(e._scaleValues=t.scaleValues),WebGLPlot$c.defined(t.style.extendHeight)&&(e._extendWallHeight=t.style.extendHeight),WebGLPlot$c.defined(t.wallOpaqueRate)&&(t.wallOpaqueRate>1&&t.wallOpaqueRate<100?e._extendWallOpacity=(100-t.wallOpaqueRate)/100:t.wallOpaqueRate<=1&&(e._extendWallOpacity=t.wallOpaqueRate)),t.subSymbolSize&&e._updateSubSize?e._updateSubSize=!1:e._updateSubSize=!0,e._subSymbolSize=t.subSymbolSize?t.subSymbolSize:0,WebGLPlot$c.defined(t.subSymbolScaleValue)&&(e._subSymbolScaleValue=t.subSymbolScaleValue),t.hasOwnProperty("isClampToGround")&&(e._isClampToGround=t.isClampToGround),t.hasOwnProperty("arrowHeadType")&&(e._arrowHeadType=t.arrowHeadType),t.hasOwnProperty("arrowBodyType")&&(e._arrowBodyType=t.arrowBodyType),t.hasOwnProperty("arrowTailType")&&(e._arrowTailType=t.arrowTailType);return e}function _0x4ea4b3(e,t,i,n){var r=WebGLPlot$c.getServerData(e,t,void 0,n);!r||(r.getSymbolInfo.events.on({processCompleted:function(e){return i._innerCells=e.result.innerCells,i._getServerDataPrototype&&i._getServerDataPrototype(e.result),i._initialize=!1,!0},processFailed:function(){},scope:self}),r.getSymbolInfo.processAsync(r.getSymbolInfoParameters))}function _0x5995dc(e,t){!e||(e.lineColor&&(t.symbolStyle.lineColor=e.lineColor),e.lineWidth&&(t.symbolType===_0x18bc2f.SYMBOL_DOT?t.gridLineWidth=e.lineWidth:t.symbolStyle.lineWidth=e.lineWidth),e.textContent&&(t.textContent=e.textContent),e.fontSize&&(t.symbolTextStyle.fontSize=e.fontSize),e.fontColor&&(t.symbolTextStyle.foreColor=e.fontColor))}_0x267b40.prototype.createSymbol=function(e,t,i,n,r){if(!Array.isArray(i)||i.length<=0||void 0===WebGLPlot$c.getLibManager(this._scene._plottingID))throw new WebGLPlot$c.DeveloperError("PlottingLayer createSymbol points or Plotting is needed!!!");if(this.isEditable){if(0===e&&(t===_0x18bc2f.SYMBOL_PICTURE||t===_0x18bc2f.SYMBOL_Model)&&WebGLPlot$c.defined(n)&&"function"!=typeof n&&WebGLPlot$c.defined(n.url))return n.libID=e,n.code=t,n.points=i,void this.createModelAndPicture(n,r);"function"==typeof n&&!WebGLPlot$c.defined(r)&&(r=n);for(var o=this,a=[],s=WebGLPlot$c.getLibManager(this._scene._plottingID),l=0;l<i.length;l++)a.push(i[l].clone());var u=null,c=null;if(!s.useServerData){var h=s.localSymbolLibData[e][t];return u=o.createGraphicObject(o,a,h),_0x5995dc(n,u),"function"==typeof r&&r({feature:u}),!0}if(0===(c=WebGLPlot$c.getServerData(e,t,void 0,this._scene._plottingID)))return u=_0x2d6822.isSymbolDot(t)?new _0x25259d({layer:this,libID:e,code:t,localPoints:a}):new _0x4381c6({layer:this,libID:e,code:t,localPoints:a}),_0x5995dc(n,u),u._symbolType=t,this._pushGeoGraphicObjectArray(u),"function"==typeof r&&r({feature:u}),!0;if(null!==c){var d=s.getSymbolData(e,t);if(WebGLPlot$c.defined(d)&&null!==d)return u=o.createGraphicObject(o,a,d),_0x5995dc(n,u),"function"==typeof r&&r({feature:u}),!0;c.getSymbolInfo.events.on({processCompleted:function(t){var i=t.result;return-1!==i.libID&&-1!==i.code&&(s.setSymbolData(e,t.result),u=o.createGraphicObject(o,a,i),_0x5995dc(n,u),"function"==typeof r&&r({feature:u}),!0)},processFailed:function(e){return r(e)},scope:this}),c.getSymbolInfo.processAsync(c.getSymbolInfoParameters)}}},_0x267b40.prototype.createModelAndPicture=function(e,t){if(!this.isEditable||0!==e.libID||e.code!==_0x18bc2f.SYMBOL_Model&&e.code!==_0x18bc2f.SYMBOL_PICTURE)return;if(null===WebGLPlot$c.getLibManager(this._scene._plottingID))throw new WebGLPlot$c.DeveloperError("Plotting is needed initialize to get SymbolLibManager");for(var i=[],n=0;n<e.points.length;n++)i.push(e.points[n].clone());var r=null;let o=WebGLPlot$c.defined(e.modelScale)?e.modelScale:1;var a={layer:this,libID:e.libID,code:e.code,localPoints:i,modelScale:new _0x11ff81(o,o,o),pictureSymbolSize:e.pictureSymbolSize};r=new _0x25259d(a),e.code===_0x18bc2f.SYMBOL_Model?(r._showMode=_0x4e5d29.Marker,r._modelPath=e.url,r._symbolType=_0x18bc2f.SYMBOL_Model):e.code===_0x18bc2f.SYMBOL_PICTURE&&(r._showMode=_0x4e5d29.Picture,r._picturePath=e.url,r._symbolType=_0x18bc2f.SYMBOL_PICTURE),_0x5995dc(e,r),WebGLPlot$c.defined(r)&&null!==r&&this._pushGeoGraphicObjectArray(r),"function"==typeof t&&t({feature:r})},_0x267b40.prototype.createGraphicObject=function(e,t,i){var n=null;return i.symbolType===_0x18bc2f.SYMBOL_DOT?n=new _0x25259d({layer:e,libID:i.libID,code:i.code,localPoints:t,serverData:i}):i.symbolType!==_0x18bc2f.SYMBOL_DOT&&i.symbolType!==_0x18bc2f.SYMBOL_UNKNOW&&(n=new _0x4381c6({layer:e,libID:i.libID,code:i.code,localPoints:t,serverData:i})),WebGLPlot$c.defined(n)&&null!==n&&e._pushGeoGraphicObjectArray(n),n},_0x267b40.prototype.update=function(e,t,i,n){if(this._valid)for(var r=0;r<this._geoGraphicObjects.length;r++)(this._geoGraphicObjects[r]instanceof _0x25259d||this._geoGraphicObjects[r]instanceof _0x4381c6||this._geoGraphicObjects[r]instanceof _0x3a6b26)&&(this.visibility?this._geoGraphicObjects[r].update(e,t,i,n):this._geoGraphicObjects[r].setVisible(this.visibility))},_0x267b40.prototype.render=function(e,t){if(this._valid){for(var i=0;i<this._geoGraphicObjects.length;i++)!1===this._geoGraphicObjects[i]._initialize&&(this.updatePrimitive=!0),(this._geoGraphicObjects[i]instanceof _0x25259d||this._geoGraphicObjects[i]instanceof _0x4381c6||this._geoGraphicObjects[i]instanceof _0x3a6b26)&&this._geoGraphicObjects[i].initSymbol();this.updatePrimitive&&(_0x38860f.setUpdatePrimitive(!0,this._scene),this.updatePrimitive=!1)}},_0x267b40.prototype.setVisibleByID=function(e,t){!this._valid||!1===this._visibility||(this._geoGraphicObjects[e].display=t)},_0x267b40.prototype.setColorByID=function(e,t){if(this._valid&&!1!==this._visibility){if(t instanceof Array)return t=new WebGLPlot$c.Color(t[0],t[1],t[2],t[3]),void this._geoGraphicObjects[e].setColor(t);this._geoGraphicObjects[e].setColor(t)}},_0x267b40.prototype.resetColor=function(){this._valid},_0x267b40.prototype.getFeatureByUuid=function(e){if(!this._valid)return null;for(var t=0;t<this._geoGraphicObjects.length;++t){if(e===this._geoGraphicObjects[t].id)return this._geoGraphicObjects[t];if(this._geoGraphicObjects[t]instanceof _0x3a6b26&&this._geoGraphicObjects[t].getFeatureByUuid(e))return this._geoGraphicObjects[t]}},_0x267b40.prototype.findFeatureByUuid=function(e){if(!this._valid||""===e||!WebGLPlot$c.defined(e))return null;for(var t=0;t<this._geoGraphicObjects.length;++t)if(e===this._geoGraphicObjects[t].id)return{feature:this._geoGraphicObjects[t],index:t};return null},_0x267b40.prototype.addFeature=function(e){var t=e.id;if(!WebGLPlot$c.defined(t))return!1;for(var i=0;i<this._geoGraphicObjects.length;++i)if(t===this._geoGraphicObjects[i].id)return!1;return e._layer=this,this._pushGeoGraphicObjectArray(e),!0},_0x267b40.prototype.setSelectedFeature=function(e){if(this._valid&&this.isSelected)for(var t=0;t<this._geoGraphicObjects;++t)if(e===this._geoGraphicObjects[t]){this._selectedFeature=this._geoGraphicObjects[t],WebGLPlot$c.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature);break}},_0x267b40.prototype.setSelectedFeatureByIndex=function(e){!this._valid||!this.isSelected||WebGLPlot$c.defined(this._geoGraphicObjects[e])&&(this._selectedFeature=this._geoGraphicObjects[e],WebGLPlot$c.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature))},_0x267b40.prototype.setSelectedFeatureByID=function(e){if(this._valid&&this.isSelected)for(var t=0;t<this._geoGraphicObjects.length;++t)if(e===this._geoGraphicObjects[t]._id){this._selectedFeature=this._geoGraphicObjects[t],WebGLPlot$c.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature);break}},_0x267b40.prototype.releaseSelection=function(){!this._valid||((WebGLPlot$c.defined(this._selectedFeature)||null!==this._selectedFeature)&&(this._selectedFeature=void 0),WebGLPlot$c.defined(this._plottingEdit)&&this._plottingEdit.unSelection(!0))},_0x267b40.prototype.removeGeoGraphicObject=function(e,t){if(WebGLPlot$c.defined(e)&&0!==this._geoGraphicObjects.length&&this.isEditable)for(var i=0;i<this._geoGraphicObjects.length;i++)if(this._geoGraphicObjects[i].id===e.id||this._geoGraphicObjects[i]instanceof _0x3a6b26&&this._geoGraphicObjects[i].getFeatureByUuid(e.id)){let e=this._geoGraphicObjects[i].id,n=this.name;if(_0x47a70a.getInstance().symbolBeforeDeleted.raiseEvent([e],n),this._geoGraphicObjects[i]._destroy(),this._geoGraphicObjects[i]=null,this._geoGraphicObjects.splice(i,1),t&&_0x47a70a.getInstance().symbolDeleted.raiseEvent([e],n),WebGLPlot$c.defined(this._plottingEdit))this._plottingEdit.releaseSelection(),this._plottingEdit.RemoveFeatureEvent.raiseEvent();return!0}},_0x267b40.prototype.removeAll=function(e){this._removeAll(!1,e)},_0x267b40.prototype._removeAll=function(e,t){if(!(e||0!==this._geoGraphicObjects.length&&this.isEditable))return;let i=[];for(var n=0;n<this._geoGraphicObjects.length;n++)i.push(this._geoGraphicObjects[n].id);_0x47a70a.getInstance().symbolBeforeDeleted.raiseEvent(i,this.name);for(n=0;n<this._geoGraphicObjects.length;n++)this._geoGraphicObjects[n]._destroy();(t&&_0x47a70a.getInstance().symbolDeleted.raiseEvent(i,this.name),WebGLPlot$c.defined(this._plottingEdit))&&(this._plottingEdit.releaseSelection(),this._plottingEdit.RemoveFeatureEvent.raiseEvent());this._geoGraphicObjects=[]},_0x267b40.prototype.destroy=function(e){this._plottingEdit&&(this._plottingEdit.releaseSelection(),this._plottingEdit._plottingLayer=null);let t=[];for(let e=0;e<this._geoGraphicObjects.length;e++){let i=this._geoGraphicObjects[e];t.push(i.id)}_0x47a70a.getInstance().symbolBeforeDeleted.raiseEvent(t,this.name);for(let e=0;e<this._geoGraphicObjects.length;e++){let t=this._geoGraphicObjects[e];t._destroy(),t=void 0}e&&_0x47a70a.getInstance().symbolDeleted.raiseEvent(t,this.name),this._geoGraphicObjects=[],this._selectedFeature=null,this._name=null,this._projectName=null,this._waterPlanes=null,this._scene=null},_0x267b40.prototype.delete=function(){this.removeAll(),_0x2d6822.getPlotLayers(this._scene).remove(this.name,!0)},_0x267b40.prototype.removeFeatureByUuId=function(e,t){for(var i=0;i<this._geoGraphicObjects.length;++i)e===this._geoGraphicObjects[i].id&&this.removeGeoGraphicObject(this._geoGraphicObjects[i],t)},_0x267b40.prototype.setUseDepthTest=function(e){this._bIsUseDepthTest=e,_0x38860f.setUseDepthTest(e,this._scene)},_0x267b40.prototype.createGroupObject=function(e){if(!e||e.length<=1||!this.isEditable)return null;for(var t=0;t<e.length;t++)if(!WebGLPlot$c.defined(e[t])||null===this.findFeatureByUuid(e[t].id))return null;for(t=0;t<e.length;t++)this.removeGeoGraphicObject(e[t]);var i=new _0x3a6b26(e);return this._pushGeoGraphicObjectArray(i,!1),i},_0x267b40.prototype.getFeaturesFromGroupObject=function(e){var t=[];for(var i in e.subObjects)e.subObjects[i]instanceof _0x3a6b26?t=t.concat(this.getFeaturesFromGroupObject(e.subObjects[i])):t.push(e.subObjects[i]);return t},_0x267b40.prototype.unGroupObject=function(e){if(!(e instanceof _0x3a6b26&&this.isEditable))return!1;var t=e.unGroupObject();return this.removeGeoGraphicObject(e),this._geoGraphicObjects=this._geoGraphicObjects.concat(t),!0},_0x267b40.prototype.geoJsonToGeoGraphicObject=function(e,t){var i=this.findFeatureByUuid(e.uuid);i&&this.removeGeoGraphicObject(i.feature);var n=null;if(_0x18bc2f.GROUPOBJECT===parseInt(e.symbolType)){n=new _0x3a6b26(this.createGroupObjectByGeoJson(e),e.uuid)}else n=this.createSymbolByGeoJson(n,e);this._pushGeoGraphicObjectArray(n,!0),n._GeoJsonFeature=e,"function"==typeof t&&t({feature:n})},_0x267b40.prototype.createGroupObjectByGeoJson=function(e){var t=[];if(!this.isEditable)return t;var i=null,n=e.geometries;for(var r in n){if(_0x18bc2f.GROUPOBJECT===parseInt(n[r].symbolType))i=new _0x3a6b26(this.createGroupObjectByGeoJson(n[r]),n[r].id);else i=this.createSymbolByGeoJson(i,n[r]);t.push(i)}return t},_0x267b40.prototype.createSymbolByGeoJson=function(e,t){for(var i=parseInt(t.libID),n=parseInt(t.code),r=[],o=t.localePoints,a=0;a<o.length;++a){var s=o[a],l=parseFloat(s.x),u=parseFloat(s.y),c=WebGLPlot$c.defined(s.z)?parseFloat(s.z):0;r.push(new _0x11ff81(l,u,c))}return _0x5cc39e(e=parseInt(t.symbolType)===_0x18bc2f.SYMBOL_DOT||parseInt(t.symbolType)===_0x18bc2f.SYMBOL_Model||parseInt(t.symbolType)===_0x18bc2f.SYMBOL_PICTURE?new _0x25259d({layer:this,libID:i,code:n,localPoints:r,symbolSizeInLib:t.symbolSize}):new _0x4381c6({layer:this,libID:i,code:n,localPoints:r}),t,this._scene._plottingID),e},_0x267b40.prototype.setCustomClipBox=function(e){},_0x267b40.prototype.clearCustomClipBox=function(){},_0x267b40.prototype._pushGeoGraphicObjectArray=function(e,t){void 0===t&&(t=!0),e instanceof _0x21fac2&&(this._geoGraphicObjects.push(e),t&&(this._symbolAddedEvent.raiseEvent(e),_0x47a70a.getInstance().symbolAdded.raiseEvent(e,this.name)))},_0x267b40.prototype.updateGeoGraphicObjectByGeoJson=function(e){if(WebGLPlot$c.defined(e)&&WebGLPlot$c.defined(e.uuid)){let t=this.getFeatureByUuid(e.uuid);if(WebGLPlot$c.defined(t))return _0x5cc39e(t,e,this._scene._plottingID),t._initialize=!1,_0x47a70a.getInstance().symbolUpdated.raiseEvent(t),t}return null},Object.defineProperties(_0x267b40.prototype,{id:{get:function(){return this._id}},visibility:{get:function(){return this._visibility},set:function(e){if(this._visibility!==e){for(var t in this._visibility=e,this._geoGraphicObjects)if(this._geoGraphicObjects[t]instanceof _0x25259d||this._geoGraphicObjects[t]instanceof _0x4381c6||this._geoGraphicObjects[t]instanceof _0x3a6b26){if(!this._geoGraphicObjects[t].display)continue;this._geoGraphicObjects[t].setVisible(e)}!e&&this._plottingEdit&&this._plottingEdit.releaseSelection(),_0x47a70a.getInstance().layerVisibleChanged.raiseEvent(this.name,e)}}},name:{get:function(){return this._name},set:function(e){e!==this._name&&(this._name=e)}},geoGraphicObjects:{get:function(){return this._geoGraphicObjects}},selectedFeature:{get:function(){return this._selectedFeature}},isEditable:{get:function(){return this._isEditable},set:function(e){e!==this._isEditable&&(this._isEditable=e,!e&&this._plottingEdit?this._plottingEdit.releaseSelection():e&&this._plottingEdit&&this.selectedFeature&&this._plottingEdit.DoSelectObjectEdit(this.selectedFeature),_0x47a70a.getInstance().layerEditableChanged.raiseEvent(this.name,e))}},isSelected:{get:function(){return this._isSelected},set:function(e){e!==this._isSelected&&(this._isSelected=e,e?this._plottingEdit.activate():(this._plottingEdit.deactivate(),this.releaseSelection()),_0x47a70a.getInstance().layerSelectedChanged.raiseEvent(this.name,e))}},isLocked:{get:function(){return this._isLocked},set:function(e){e!==this._isLocked&&(this._isLocked=e,_0x47a70a.getInstance().layerActived.raiseEvent(this.name,e))}},symbolAddedEvent:{get:function(){return this._symbolAddedEvent}}}),_0x267b40.prototype.getSelection=function(){return[]};const _0x3851f2=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x12baa7=_0x3851f2(void 0,(function(){return _0x12baa7.toString().search("(((.+)+)+)+$").toString().constructor(_0x12baa7).search("(((.+)+)+)+$")}));_0x12baa7();var _0x5291a3=function(){this._layers=new WebGLPlot.AssociativeArray,this._layerQueue=[],this._layerIndex=3,this._selectedLayer=void 0,this.collentionLayer=void 0,this.goAnimationLayer=void 0};Object.defineProperties(_0x5291a3.prototype,{layerQueue:{get:function(){return this._layerQueue}}}),_0x5291a3.prototype.prePassesUpdate=function(e){this.render(e,null)},_0x5291a3.prototype.update=function(e,t,i,n){var r=this._layerQueue,o=this._layerQueue.length,a=0;for(a=0;a<o;a++){var s=r[a];!WebGLPlot.defined(s)||s.update(e,t,i)}WebGLPlot.defined(this.collentionLayer)&&this.collentionLayer.update(e,t,i),WebGLPlot.defined(this.goAnimationLayer)&&this.goAnimationLayer.update(e,t,i)},_0x5291a3.prototype.render=function(e,t){var i=this._layerQueue,n=this._layerQueue.length,r=0;for(r=0;r<n;r++){var o=i[r];!WebGLPlot.defined(o)||o.render(t,e)}WebGLPlot.defined(this.collentionLayer)&&this.collentionLayer.render(t,e),WebGLPlot.defined(this.goAnimationLayer)&&this.goAnimationLayer.render(t,e)},_0x5291a3.prototype.releaseSelection=function(){var e=this._layerQueue,t=this._layerQueue.length,i=0;for(i=0;i<t;i++){var n=e[i];!WebGLPlot.defined(n)||n.releaseSelection()}},_0x5291a3.prototype.find=function(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("name is required.");return this._layers.get(e)},_0x5291a3.prototype.findByIndex=function(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("index is required.");if(e>this._layerQueue.length-1)throw new WebGLPlot.DeveloperError("index is out of bounds.");return this._layerQueue[e]},_0x5291a3.prototype.add=function(e,t){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("layer is required.");var i=e._name;if(!WebGLPlot.defined(i)||""==i)throw new WebGLPlot.DeveloperError("name is required.");var n=this._layers;if(n.contains(i))throw new WebGLPlot.RuntimeError("An layer with name "+i+" already exists in this Scene.");e._id=this._layerIndex++;var r=this._layerQueue.length;n.set(i,e),t=WebGLPlot.defaultValue(t,r),e.index=t,this._layerQueue.push(e),this._layerQueue.sort((function(e,t){return e.index-t.index})),_0x47a70a.getInstance().layerAdded.raiseEvent(i)},_0x5291a3.prototype.remove=function(e,t){if(t=WebGLPlot.defaultValue(t,!0),!WebGLPlot.defined(e))return!1;var i=this.find(e);return!!i&&(!!this._layers.remove(e)&&(this._layerQueue.splice(this._layerQueue.indexOf(i),1),t&&(i.destroy(),i=void 0),_0x47a70a.getInstance().layerDeleted.raiseEvent(e),!0))},_0x5291a3.prototype.removeAll=function(e){let t=[];e=WebGLPlot.defaultValue(e,!0);for(let i=0;i<this._layerQueue.length;i++){let n=this._layerQueue[i];t.push(n.name),e&&(n.destroy(),n=void 0)}this._layers.removeAll(),this._layerQueue.length=0,_0x47a70a.getInstance().layerDeleted.raiseEvent(t)},_0x5291a3.prototype.setSelectedLayer=function(e){this._selectedLayer=e},_0x5291a3.prototype.getSelectedLayer=function(){return this._selectedLayer},_0x5291a3.prototype.getPlottingLayerByName=function(e){for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];if(i instanceof _0x267b40&&e===i.name)return i}return null},_0x5291a3.prototype.getPlottingLayerIsActived=function(){for(let e=0;e<this._layerQueue.length;e++){let t=this._layerQueue[e];if(t instanceof _0x267b40&&!t.isLocked)return t}return null},_0x5291a3.prototype.setPlottingLayerIsActived=function(e,t,i){let n=!1;if(!e||""===e)return n;for(let r=0;r<this._layerQueue.length;r++){let o=this._layerQueue[r];if(o instanceof _0x267b40&&o.name===e){o.isLocked=!1,t&&t.setPlottingLayer(o),i&&i.setPlottingLayer(o),n=!0;break}}if(n)for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];i instanceof _0x267b40&&i.name!==e&&(i._isLocked=!0)}return n},_0x5291a3.prototype.getAllPlottingLayers=function(){let e=[];for(let t=0;t<this._layerQueue.length;t++)this._layerQueue[t]instanceof _0x267b40&&e.push(this._layerQueue[t]);return e},_0x5291a3.prototype.getFeatrueByUuID=function(e){for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];if(i instanceof _0x267b40){let t=i.getFeatureByUuid(e);if(WebGLPlot.defined(t))return t}}return null},WebGLPlot.PlotLayers=_0x5291a3;var _0x13d7b9=(_0xd4c61b=!0,function(e,t){var i=_0xd4c61b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd4c61b=!1,i}),_0x4618ec=_0x13d7b9(void 0,(function(){return _0x4618ec.toString().search("(((.+)+)+)+$").toString().constructor(_0x4618ec).search("(((.+)+)+)+$")})),_0xd4c61b;_0x4618ec();class _0x32c2d4{constructor(e,t){e&&(this.key=e),t&&(this.value=t),this.CLASS_NAME="SuperMap.Plot.Property"}setKey(e){this.key=e}getKey(){return this.key}setValue(e){this.value=e}getValue(){return this.value}destroy(){this.key=null,this.value=null}clone(){return new Property(this.key,this.value)}}var _0x49f70f=(_0x39630a=!0,function(e,t){var i=_0x39630a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39630a=!1,i}),_0x5d7d06=_0x49f70f(void 0,(function(){return _0x5d7d06.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d7d06).search("(((.+)+)+)+$")})),_0x39630a;function _0x3ff6b7(e,t){this._name=e,this._features=[],this._valid=!0,this._scene=t,this._waterPlanes=[],this._visibleViewport=0,this.visibility=!0}_0x5d7d06(),_0x3ff6b7.prototype.destroy=function(){this._valid=null,this._waterPlanes=null,this._visibleViewport=null,this._features=null,this._name=null},_0x3ff6b7.prototype.addFeatures=function(e){Array.isArray(e)||(e=[e]),this._features=this._features.concat(e)},_0x3ff6b7.prototype.update=function(e,t,i,n){if(this._valid)for(var r=0;r<this._features.length;r++)!1===this._features[r]._initialize&&(this.updatePrimitive=!0),(this._features[r]instanceof _0x25259d||this._features[r]instanceof _0x4381c6)&&this._features[r].update(e,t,i,n)},_0x3ff6b7.prototype.render=function(){for(var e=0;e<this._features.length;e++)!1===this._features[e]._initialize&&(this.updatePrimitive=!0),(this._features[e]instanceof _0x25259d||this._features[e]instanceof _0x4381c6)&&this._features[e].initSymbol();this.updatePrimitive&&(_0x38860f.setUpdatePrimitive(!0,this._scene),this.updatePrimitive=!1)},_0x3ff6b7.prototype.removeFeatures=function(e){if(WebGLPlot.defined(e)&&0!==this._features.length){for(var t=[],i=0;i<this._features.length;i++){if(this._features[i]===e){1===this._features[i].symbolType&&this._features[i]._destroy();continue}t.push(this._features[i])}this._features=t}},_0x3ff6b7.prototype.releaseSelection=function(){},_0x3ff6b7.prototype.setCustomClipBox=function(e){},_0x3ff6b7.prototype.clearCustomClipBox=function(){},Object.defineProperties(_0x3ff6b7.prototype,{id:{get:function(){return this._id}}});var _0xed3fb3=(_0x288f3c=!0,function(e,t){var i=_0x288f3c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x288f3c=!1,i}),_0x29f578=_0xed3fb3(void 0,(function(){return _0x29f578.toString().search("(((.+)+)+)+$").toString().constructor(_0x29f578).search("(((.+)+)+)+$")})),_0x288f3c;_0x29f578();var _0x43e58a={PLAYFROMNOW:0,PLAYSAMELASTONE:1,PLAYAFTERLASTONE:2,UNKNOWN:3},_0x28a0bd=Object.freeze(_0x43e58a),_0x20f77b=(_0x2cce96=!0,function(e,t){var i=_0x2cce96?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2cce96=!1,i}),_0x4adade=_0x20f77b(void 0,(function(){return _0x4adade.toString().search("(((.+)+)+)+$").toString().constructor(_0x4adade).search("(((.+)+)+)+$")})),_0x2cce96;_0x4adade();class _0x2688ba{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._startTime=WebGLPlot$f.defaultValue(e.startTime,0),this._duration=WebGLPlot$f.defaultValue(e.duration,5),this._repeat=WebGLPlot$f.defaultValue(e.repeat,!1),this._name=WebGLPlot$f.defaultValue(e.name,""),this._animationState=WebGLPlot$f.defaultValue(e.animationState,_0x5140b5.UNKNOWN),this._goFeature=WebGLPlot$f.defaultValue(e.goFeature,null),this._animationGOFeature=WebGLPlot$f.defaultValue(e.animationGOFeature,null),this._innerStartTime=WebGLPlot$f.defaultValue(e.innerStartTime,0),this._lastExecute=WebGLPlot$f.defaultValue(e.lastExecute,!1),this._pauseTime=WebGLPlot$f.defaultValue(e.pauseTime,0),this._ratio=WebGLPlot$f.defaultValue(e.ratio,0),this._symbolTexts=WebGLPlot$f.defaultValue(e.symbolTexts,""),this._animationManager=null,this._animationFinish=new WebGLPlot$f.Event,this._animationBegin=new WebGLPlot$f.Event,this._isSendBegin=!0,this._playSpeed=1,this.__playPastRatio=0,this._groupIndex=WebGLPlot$f.defaultValue(e.groupIndex,void 0),this._animationPlayType=WebGLPlot$f.defaultValue(e.animationPlayType,_0x28a0bd.UNKNOWN),this.delayTime=0}destroy(){this.showAnimationFeature(!1),this.removeAnimationFeature(),this._goFeature=null,this._animationGOFeature._destroy(),this._animationGOFeature=null,this._name="",this.goFeatureLocalPts=[],this._symbolTexts="",this._animationState=_0x5140b5.UNKNOWN,this._pathFeature&&(_0x38860f.removeAllAlgoPloyline(this._pathFeature,this._scene),this._pathFeature._destroy(),this._pathFeature=null),this.dynamicScane&&(this.dynamicScane.removeScaneCylinder(),this.dynamicScane=void 0)}setGOFeature(e,t){if(null==t||null===t.layer||null===e._goAnimationLayer)return!1;this._animationManager=e,this._goFeature=t;var i=this.createAnimationGOFeature(this._goFeature);return null!==this._animationGOFeature&&(i||(this._animationGOFeature._layer=e._goAnimationLayer,e._goAnimationLayer.addFeatures(this._animationGOFeature)),this.showAnimationFeature(!1),(_0x304306.ANIMATION_GROW===this.getGOAnimationType()||_0x304306.ANIMATION_GROW_EXP===this.getGOAnimationType()||_0x304306.ANIMATION_REDUCE_EXP==this.getGOAnimationType())&&(this.goFeatureLocalPts=WebGLPlot$f.clonePoints(this._goFeature._localPoints)),!0)}play(){WebGLPlot$f.defined(this._animationGrowEXP_isFirstExecute)&&(this._animationGrowEXP_isFirstExecute=!0);let e=new Date;if(this.__playSpeedTime=e.getTime()/1e3,this.__playTime=e.getTime()/1e3,this._animationState===_0x5140b5.PAUSE){const t=e.getTime()/1e3-this._pauseTime;this._innerStartTime+=t}else this._innerStartTime=e.getTime()/1e3,WebGLPlot$f.defined(this._goFeature)&&this._goFeature.releaseSelection(),this.showAnimationFeature(!0),this.__playPastRatio=0;this._lastExecute=!1,this._animationState=_0x5140b5.PLAYING}stop(){this._animationState=_0x5140b5.STOP}pause(){if(this._animationState===_0x5140b5.PLAYING){this._animationState=_0x5140b5.PAUSE;var e=new Date;this._pauseTime=e.getTime()/1e3}}reset(){this._animationState=_0x5140b5.RESET,this.showAnimationFeature(!1)}createAnimationGOFeature(e){for(var t=0;t<this._animationManager.goAnimations.length;t++){var i=this._animationManager.goAnimations[t];if(i._goFeature.id===e.id)return this._animationGOFeature=i._animationGOFeature,this._animationGOFeature}return this._animationGOFeature=e.clone(),this._animationGOFeature._id+=this._name,this._animationGOFeature._isEdit=!0,this._animationGOFeature._valid=!1,this._animationGOFeature._isAnimationFeature=!0,null}canExecute(){if(this._animationState!==_0x5140b5.PLAYING)return!1;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this._startTime>e)return!1;var t=this.getRatioByTime();return!(t>1&&this._lastExecute||t<0)}getRatioByTime(){if(this._animationState!==_0x5140b5.PLAYING)return 0;let e=this.__computePlayRatio();return e>=1&&!this._lastExecute?(this._repeat?(e=0,this._lastExecute=!1,this._animationState=_0x5140b5.PLAYING,this._innerStartTime=(new Date).getTime()/1e3,this.__playTime=(new Date).getTime()/1e3):(e=1,this._lastExecute=!0,this._isSendBegin=!0,this._animationState=_0x5140b5.STOP,this._animationFinish.raiseEvent(this.name),_0x47a70a.getInstance().animationFinished.raiseEvent(this.name)),this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=0):this._isSendBegin&&(this._animationBegin.raiseEvent(this.name),_0x47a70a.getInstance().animationBegined.raiseEvent(this.name),this._isSendBegin=!1),e<0&&(e=0,this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=0),this._ratio=e,e}showAnimationFeature(e){null!==this._animationGOFeature&&null!==this._animationGOFeature._symbolStyle&&(this.resetAnimationFeature(e),this._animationGOFeature.display=e),null!==this._goFeature&&null!==this._goFeature._symbolStyle&&(this._goFeature.display=!e,this._goFeature._initialize=!1),e&&(this._isSendBegin=!0)}resetAnimationFeature(e){this._animationGOFeature._symbolStyle=this._goFeature._symbolStyle.clone(),this._animationGOFeature._localPoints=this._goFeature._localPoints,this._animationGOFeature._initialize=!1}setAnimationName(e){return!this._animationManager.findGOAnimationByName(e)&&(this._name=e,!0)}__setPlayRatioState(){this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=this._ratio}__computePlayRatio(){let e=0;const t=(new Date).getTime()/1e3,i=this._duration/this.playSpeed;return e=this.__playTime===this.__playSpeedTime?(t-this._innerStartTime-this._startTime)/i:(t-this.__playSpeedTime)/i,e+=this.__playPastRatio,this._innerStartTime+this._startTime>=t||e<0?0:e}removeAnimationFeature(){if(null!==this._animationGOFeature){var e=this._animationManager.goAnimations,t=!1;if(null!==e)for(var i=0;i<e.length;i++){var n=e[i];if(n!==this&&n._animationGOFeature===this._animationGOFeature){t=!0;break}}t||this._animationManager._goAnimationLayer.removeFeatures(this._animationGOFeature)}}getBaseJSONData(){var e={};return this.goFeature&&(e.goLayerUuid=this.goFeature.id),e.name=this.name,e.startTime=this.startTime,e.duration=this.duration,e.repeat=this.repeat,e.playtype=this.animationPlayType,e}fromBaseJSONData(e){this.startTime=e.startTime,this.duration=e.duration,this.repeat=e.repeat,this.animationPlayType=e.playtype}_serverColorToColor(e){var t=new WebGLPlot$f.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,t}_colorFormat(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}setStartTime(e){e<0&&(e=0),this.delayTime=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData())}getStartTime(){return this._animationManager.getAnimationDelayTime()}}Object.defineProperties(_0x2688ba.prototype,{startTime:{get:function(){return this._startTime},set:function(e){e!==this._startTime&&(this._startTime=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},repeat:{get:function(){return this._repeat},set:function(e){e!==this._repeat&&(this._repeat=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},duration:{get:function(){return this._duration},set:function(e){if(e!==this._duration){this._duration=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData())}}},name:{get:function(){return this._name},set:function(e){e!==this._name&&(this._name=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},groupName:{get:function(){return this._groupName},set:function(e){e!==this._groupName&&(this._groupName=e)}},animationState:{get:function(){return this._animationState},set:function(e){e!==this._animationState&&(this._animationState=e)}},goFeature:{get:function(){return this._goFeature},set:function(e){e!==this._goFeature&&(this._goFeature=e)}},animationGOFeature:{get:function(){return this._animationGOFeature},set:function(e){e!==this._animationGOFeature&&(this._animationGOFeature=e)}},innerStartTime:{get:function(){return this._innerStartTime},set:function(e){e!==this._innerStartTime&&(this._innerStartTime=e)}},lastExecute:{get:function(){return this._lastExecute},set:function(e){e!==this._lastExecute&&(this._lastExecute=e)}},pauseTime:{get:function(){return this._pauseTime},set:function(e){e!==this._pauseTime&&(this._pauseTime=e)}},ratio:{get:function(){return this._ratio},set:function(e){e!==this._ratio&&(this._ratio=e)}},symbolTexts:{get:function(){return this._symbolTexts},set:function(e){e!==this._symbolTexts&&(this._symbolTexts=e)}},animationBegin:{get:function(){return this._animationBegin}},animationFinish:{get:function(){return this._animationFinish}},playSpeed:{get:function(){return this._playSpeed},set:function(e){e!==this._playSpeed&&(this.__setPlayRatioState(),this._playSpeed=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},fastForwardTime:{set:function(e){if(e<0)return;let t=e/this._duration;t>1&&(t=1),this.__playPastRatio+=t,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData())}},rewindTime:{set:function(e){if(e<0)return;let t=-e/this._duration;t>0&&(t=0),this.__playPastRatio+=t,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData())}},animationPlayType:{get:function(){return this._animationPlayType},set:function(e){if(e!==this._animationPlayType){this._animationPlayType=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData())}}}});var _0x192577=(_0x4bbebc=!0,function(e,t){var i=_0x4bbebc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4bbebc=!1,i}),_0x1048c9=_0x192577(void 0,(function(){return _0x1048c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x1048c9).search("(((.+)+)+)+$")})),_0x4bbebc;_0x1048c9();var _0x1ed027={Blink_Frequency:0,Blink_Number:1},_0x448062=Object.freeze(_0x1ed027),_0x397a54=(_0x4dec18=!0,function(e,t){var i=_0x4dec18?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4dec18=!1,i}),_0x5c27ae=_0x397a54(void 0,(function(){return _0x5c27ae.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c27ae).search("(((.+)+)+)+$")})),_0x4dec18;_0x5c27ae();var _0x4e17ee={Replace_NoColor:0,Replace_Color:1},_0x41970a=Object.freeze(_0x4e17ee),_0x2829dc=(_0x288a37=!0,function(e,t){var i=_0x288a37?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x288a37=!1,i}),_0x47c34d=_0x2829dc(void 0,(function(){return _0x47c34d.toString().search("(((.+)+)+)+$").toString().constructor(_0x47c34d).search("(((.+)+)+)+$")})),_0x288a37;_0x47c34d();class _0x306baa extends _0x2688ba{constructor(e){super(e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT)),this._blinkInterval=WebGLPlot$f.defaultValue(e.blinkInterval,500),this._blinkStyle=WebGLPlot$f.defaultValue(e.blinkStyle,_0x448062.Blink_Frequency),this._blinkNumber=WebGLPlot$f.defaultValue(e.blinkNumber,0),this._replaceStyle=WebGLPlot$f.defaultValue(e.replaceStyle,_0x41970a.Replace_NoColor),this._startColor=WebGLPlot$f.defaultValue(e.startColor,new WebGLPlot$f.Color(0,0,1,1)),this._endColor=WebGLPlot$f.defaultValue(e.endColor,new WebGLPlot$f.Color(1,0,0,1))}getGOAnimationType(){return _0x304306.ANIMATION_BLINK}execute(){if(!this.canExecute())return!1===this._goFeature._display&&!1===this._animationGOFeature._display&&(this._animationGOFeature._display=!0,!0);this._goFeature.display&&(this._goFeature.display=!1);var e=(new Date).getTime()/1e3,t=this._blinkInterval/1e3;return this._blinkStyle===_0x448062.Blink_Number&&(t=this._blinkInterval=this._duration/this._blinkNumber),(e-this._innerStartTime)%t<=t/2?this._replaceStyle===_0x41970a.Replace_Color?this.setColor(this._startColor):this._animationGOFeature.display=!1:(this._animationGOFeature.display=!0,this._replaceStyle===_0x41970a.Replace_Color&&this.setColor(this._endColor)),this._lastExecute&&(this._replaceStyle===_0x41970a.Replace_Color&&(this._animationGOFeature._symbolStyle._lineColor=this._endColor),this._animationGOFeature._display=!0,this._animationGOFeature._initialize=!1),!0}getRatioByTime(){if(this._animationState!==_0x5140b5.PLAYING)return 0;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this._startTime>e)return 0;var t=(e-this._innerStartTime-this._startTime)/this._duration;return t>=1&&!this._lastExecute?this._repeat?(this._innerStartTime=(new Date).getTime()/1e3,t=0,this._lastExecute=!1,this._animationState=_0x5140b5.PLAYING):(t=1,this._lastExecute=!0,this._animationState=_0x5140b5.STOP):t<0&&(t=0),this._ratio=t,t}setColor(e){this._animationGOFeature._symbolStyle._lineColor!==e&&(this._animationGOFeature._symbolStyle._lineColor=e,this._animationGOFeature._symbolTextStyle.setTextRectColor(e),this._animationGOFeature._initialize=!1)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.blinkStyle=this.blinkStyle,e.blinkInterval=this.blinkInterval,e.blinkNumber=this.blinkNumber,e.replaceStyle=this.replaceStyle,e.startColor=this._colorFormat(this.startColor),e.endColor=this._colorFormat(this.endColor),e}fromJSONData(e){this.fromBaseJSONData(e),this.blinkStyle=e.blinkStyle,this.blinkInterval=e.blinkInterval,this.blinkNumber=e.blinkNumber,this.replaceStyle=e.replaceStyle,this.startColor=this._serverColorToColor(e.startColor),this.endColor=this._serverColorToColor(e.endColor)}}Object.defineProperties(_0x306baa.prototype,{blinkInterval:{get:function(){return this._blinkInterval},set:function(e){e!=this._blinkInterval&&(this._blinkInterval=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},blinkStyle:{get:function(){return this._blinkStyle},set:function(e){e!=this._blinkStyle&&(this._blinkStyle=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},blinkNumber:{get:function(){return this._blinkNumber},set:function(e){e!=this._blinkNumber&&(this._blinkNumber=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},replaceStyle:{get:function(){return this._replaceStyle},set:function(e){e!=this._replaceStyle&&(this._replaceStyle=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startColor:{get:function(){return this._startColor},set:function(e){e==this._startColor||!(e instanceof WebGLPlot$f.Color)||(this._startColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endColor:{get:function(){return this._endColor},set:function(e){e==this._endColor||!(e instanceof WebGLPlot$f.Color)||(this._endColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x53caac=(_0x345c90=!0,function(e,t){var i=_0x345c90?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x345c90=!1,i}),_0x336c92=_0x53caac(void 0,(function(){return _0x336c92.toString().search("(((.+)+)+)+$").toString().constructor(_0x336c92).search("(((.+)+)+)+$")})),_0x345c90;_0x336c92();class _0x43b269 extends _0x2688ba{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._showEffect=WebGLPlot.defaultValue(e.showEffect,!1),this._finalDisplay=WebGLPlot.defaultValue(e.finalDisplay,!1)}getGOAnimationType(){return _0x304306.ANIMATION_SHOW}execute(){if(!this.canExecute())return!1;var e=this._ratio;return this._showEffect&&this._animationGOFeature.showMode!==_0x4e5d29.Marker?this.executeHaveEffect(e):this.executeNoEffect(e),!0}executeNoEffect(e){this._animationGOFeature.display=1-e<.01?this._finalDisplay:!this._finalDisplay}executeHaveEffect(e){this._finalDisplay||(e=1-e);var t;t=e>1?1:e,this._animationGOFeature.display||(this._animationGOFeature.display=!0),this._animationGOFeature.showMode===_0x4e5d29.Grid||this._animationGOFeature.showMode===_0x4e5d29.Picture?this._animationGOFeature.billboard.color=new WebGLPlot.Color(1,1,1,t):(this._animationGOFeature._symbolStyle._opacity=t,this._goFeature._symbolStyle.fillOpaqueRate<=100*(1-e)&&(this._animationGOFeature._symbolStyle.fillOpaqueRate=100*(1-e)),WebGLPlot.defined(this._goFeature._extendWallOpacity)&&this._goFeature._extendWallOpacity>=e&&(this._animationGOFeature._extendWallOpacity=e),null!==this._animationGOFeature._labels&&(this._animationGOFeature._symbolTextStyle._foreColor.alpha=t),this._animationGOFeature._initialize=!1)}resetAnimationFeature(e){this._animationGOFeature._symbolStyle.fillOpaqueRate=this._goFeature._symbolStyle.fillOpaqueRate,this._animationGOFeature._extendWallOpacity=this._goFeature._extendWallOpacity,_0x2688ba.prototype.resetAnimationFeature.call(this,e)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.showEffect=this.showEffect,e.finalDisplay=this.finalDisplay,e}fromJSONData(e){this.fromBaseJSONData(e),this.showEffect=e.showEffect,this.finalDisplay=e.finalDisplay}}Object.defineProperties(_0x43b269.prototype,{showEffect:{get:function(){return this._showEffect},set:function(e){e!=this._showEffect&&(this._showEffect=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},finalDisplay:{get:function(){return this._finalDisplay},set:function(e){e!=this._finalDisplay&&(this._finalDisplay=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x2e7c63=(_0xb28cb9=!0,function(e,t){var i=_0xb28cb9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb28cb9=!1,i}),_0x571ac9=_0x2e7c63(void 0,(function(){return _0x571ac9.toString().search("(((.+)+)+)+$").toString().constructor(_0x571ac9).search("(((.+)+)+)+$")})),_0xb28cb9;_0x571ac9();var _0x3e2f53={POLYLINE:0,CURVE:1},_0x59cef0=Object.freeze(_0x3e2f53),_0x3637c0=(_0x40f476=!0,function(e,t){var i=_0x40f476?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40f476=!1,i}),_0x38dab4=_0x3637c0(void 0,(function(){return _0x38dab4.toString().search("(((.+)+)+)+$").toString().constructor(_0x38dab4).search("(((.+)+)+)+$")})),_0x40f476;_0x38dab4();var _0x2d7530={computePositions:function(e,t,i,n,r){var o,a=e,s=n+n,l=new Float64Array(3*(r?2*s:s)),u=0,c=0,h=r?3*s:0,d=r?3*(s+n):3*n;for(o=0;o<n;o++){var f=o/n*WebGLPlot.CesiumMath.TWO_PI,p=Math.cos(f),_=Math.sin(f),m=p*i,g=_*i,x=p*t,v=_*t;l[c+h]=m,l[c+h+1]=0,l[c+h+2]=g,l[c+d]=x,l[c+d+1]=a,l[c+d+2]=v,c+=3,r&&(l[u++]=m,l[u++]=0,l[u++]=g,l[u++]=x,l[u++]=a,l[u++]=v)}return l}},_0x5e446a=(_0x4c9c2a=!0,function(e,t){var i=_0x4c9c2a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c9c2a=!1,i}),_0x33a6b0=_0x5e446a(void 0,(function(){return _0x33a6b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x33a6b0).search("(((.+)+)+)+$")})),_0x4c9c2a;_0x33a6b0();var _0x8a3d6=new WebGLPlot.Cartesian2,_0xd5c6f8=new WebGLPlot.Cartesian3,_0x46c0f7=new WebGLPlot.Cartesian3,_0x3120c1=new WebGLPlot.Cartesian3,_0x49e5ad=new WebGLPlot.Cartesian3;function _0x5f15a4(e){var t=(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),o=WebGLPlot.defaultValue(e.slices,128);if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("options.length must be defined.");if(!WebGLPlot.defined(i))throw new WebGLPlot.DeveloperError("options.topRadius must be defined.");if(!WebGLPlot.defined(n))throw new WebGLPlot.DeveloperError("options.bottomRadius must be defined.");if(o<3)throw new WebGLPlot.DeveloperError("options.slices must be greater than or equal to 3.");if(WebGLPlot.defined(e.offsetAttribute)&&e.offsetAttribute===WebGLPlot.GeometryOffsetAttribute.TOP)throw new WebGLPlot.DeveloperError("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");if(!WebGLPlot.defined(e.scene))throw new WebGLPlot.DeveloperError("scene must be defined");if(!WebGLPlot.defined(e.id)||""===e.id)throw new WebGLPlot.DeveloperError("id must be defined");this._length=t,this._topRadius=i,this._bottomRadius=n,this._vertexFormat=WebGLPlot.VertexFormat.clone(r),this._slices=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPlotCylinderGeometry",this.scene=e.scene,this.rotate=WebGLPlot.defaultValue(e.rotate,new _0x11ff81(0,0,0)),this.offsetRotate=WebGLPlot.defaultValue(e.offsetRotate,new _0x11ff81(0,0,0)),this.point=WebGLPlot.defaultValue(e.point,new _0x11ff81(0,0,0)),this.id=e.id,this.cylinderColor=WebGLPlot.defaultValue(e.color,new WebGLPlot.Color(1,0,0,.4)),this.show=WebGLPlot.defaultValue(e.show,!0),this.add2Scene()}_0x5f15a4.prototype.add2Scene=function(){this.ScaneCylinderGeometry=_0x5f15a4.createGeometry(this);var e=WebGLPlot.CesiumMath.toRadians(this.rotate.z+this.offsetRotate.z),t=WebGLPlot.CesiumMath.toRadians(this.rotate.y+this.offsetRotate.y),i=WebGLPlot.CesiumMath.toRadians(this.rotate.x+this.offsetRotate.x),n=new WebGLPlot.HeadingPitchRoll(e,t,i);const r=WebGLPlot.Cartesian3.fromDegrees(this.point.x,this.point.y,this.point.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,n);var a=new WebGLPlot.GeometryInstance({geometry:this.ScaneCylinderGeometry,modelMatrix:o,id:this.id});let s=new WebGLPlot.Primitive({geometryInstances:a,appearance:new Cesium.EllipsoidSurfaceAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this.cylinderColor})}),asynchronous:!1,show:this.show});this.CylinderPrimitive=this.scene.primitives.add(s)},_0x5f15a4.prototype.remove=function(){this.CylinderPrimitive&&(this.scene.primitives.removeAndDestroy(this.CylinderPrimitive),this.CylinderPrimitive=void 0)},_0x5f15a4.prototype.update=function(e){var t=WebGLPlot.defaultValue(e.point,new _0x11ff81(0,0,0)),i=WebGLPlot.defaultValue(e.rotate,new _0x11ff81(0,0,0));if(this.CylinderPrimitive){this.remove();var n=WebGLPlot.CesiumMath.toRadians(i.z+this.offsetRotate.z),r=WebGLPlot.CesiumMath.toRadians(i.y+this.offsetRotate.y),o=WebGLPlot.CesiumMath.toRadians(i.x+this.offsetRotate.x),a=new WebGLPlot.HeadingPitchRoll(n,r,o);const e=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z),l=WebGLPlot.Transforms.headingPitchRollToFixedFrame(e,a);var s=new WebGLPlot.GeometryInstance({geometry:this.ScaneCylinderGeometry,modelMatrix:l,id:this.id});let u=new WebGLPlot.Primitive({geometryInstances:s,appearance:new Cesium.EllipsoidSurfaceAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this.cylinderColor})}),asynchronous:!1,show:this.show});this.CylinderPrimitive=this.scene.primitives.add(u)}},_0x5f15a4.prototype.setVisible=function(e){this.CylinderPrimitive&&(this.show=e,this.CylinderPrimitive.show=e)},_0x5f15a4.prototype.setColor=function(e){this.CylinderPrimitive&&e instanceof WebGLPlot.Color&&(this.cylinderColor=e,this.CylinderPrimitive.appearance.material=WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:e}))},_0x5f15a4.packedLength=WebGLPlot.VertexFormat.packedLength+5,_0x5f15a4.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.VertexFormat.pack(e._vertexFormat,t,i),i+=WebGLPlot.VertexFormat.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x18338e=new WebGLPlot.VertexFormat,_0x36af21={vertexFormat:_0x18338e,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0},_0x3a30a1;_0x5f15a4.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.VertexFormat.unpack(e,t,_0x18338e);t+=WebGLPlot.VertexFormat.packedLength;var r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return WebGLPlot.defined(i)?(i._vertexFormat=WebGLPlot.VertexFormat.clone(n,i._vertexFormat),i._length=r,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._offsetAttribute=-1===l?void 0:l,i):(_0x36af21.length=r,_0x36af21.topRadius=o,_0x36af21.bottomRadius=a,_0x36af21.slices=s,_0x36af21.offsetAttribute=-1===l?void 0:l,new _0x5f15a4(_0x36af21))},_0x5f15a4.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._vertexFormat,o=e._slices;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=o+o,l=o+s,u=s+s,c=_0x2d7530.computePositions(t,i,n,o,!0),h=r.st?new Float32Array(2*u):void 0,d=r.normal?new Float32Array(3*u):void 0,f=r.tangent?new Float32Array(3*u):void 0,p=r.bitangent?new Float32Array(3*u):void 0,_=r.normal||r.tangent||r.bitangent;if(_){var m=r.tangent||r.bitangent,g=0,x=0,v=0,y=Math.atan2(n-i,t),$=_0xd5c6f8;$.z=Math.sin(y);var b=Math.cos(y),T=_0x3120c1,C=_0x46c0f7;for(a=0;a<o;a++){var S=a/o*WebGLPlot.CesiumMath.TWO_PI,w=b*Math.cos(S),E=b*Math.sin(S);_&&($.x=w,$.y=E,m&&(T=WebGLPlot.Cartesian3.normalize(WebGLPlot.Cartesian3.cross(WebGLPlot.Cartesian3.UNIT_Z,$,T),T)),r.normal&&(d[g++]=$.x,d[g++]=$.y,d[g++]=$.z,d[g++]=$.x,d[g++]=$.y,d[g++]=$.z),r.tangent&&(f[x++]=T.x,f[x++]=T.y,f[x++]=T.z,f[x++]=T.x,f[x++]=T.y,f[x++]=T.z),r.bitangent&&(C=WebGLPlot.Cartesian3.normalize(WebGLPlot.Cartesian3.cross($,T,C),C),p[v++]=C.x,p[v++]=C.y,p[v++]=C.z,p[v++]=C.x,p[v++]=C.y,p[v++]=C.z))}for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=-1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[v++]=0,p[v++]=-1,p[v++]=0);for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[v++]=0,p[v++]=1,p[v++]=0)}var P=12*o-12,A=WebGLPlot.IndexDatatype.createTypedArray(u,P),L=0,M=0;for(a=0;a<o-1;a++)A[L++]=M,A[L++]=M+2,A[L++]=M+3,A[L++]=M,A[L++]=M+3,A[L++]=M+1,M+=2;for(A[L++]=s-2,A[L++]=0,A[L++]=1,A[L++]=s-2,A[L++]=1,A[L++]=s-1,a=1;a<o-1;a++)A[L++]=s+a+1,A[L++]=s+a,A[L++]=s;for(a=1;a<o-1;a++)A[L++]=l,A[L++]=l+a,A[L++]=l+a+1;var R=0;if(r.st){var I=Math.max(i,n);for(a=0;a<u;a++){var O=WebGLPlot.Cartesian3.fromArray(c,3*a,_0x49e5ad);h[R++]=(O.x+I)/(2*I),h[R++]=(O.y+I)/(2*I)}}var D=new WebGLPlot.GeometryAttributes;r.position&&(D.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c})),r.normal&&(D.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.tangent&&(D.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:f})),r.bitangent&&(D.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),r.st&&(D.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:h})),_0x8a3d6.x=.5*t,_0x8a3d6.y=Math.max(n,i);var B=new WebGLPlot.BoundingSphere(WebGLPlot.Cartesian3.ZERO,WebGLPlot.Cartesian2.magnitude(_0x8a3d6));if(WebGLPlot.defined(e._offsetAttribute)){t=c.length;var N=new Uint8Array(t/3),F=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(N,F),D.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:N})}return new WebGLPlot.Geometry({attributes:D,indices:A,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:B,offsetAttribute:e._offsetAttribute})}},_0x5f15a4.getUnitCylinder=function(){return WebGLPlot.defined(_0x3a30a1)||(_0x3a30a1=_0x5f15a4.createGeometry(new _0x5f15a4({topRadius:1,bottomRadius:1,length:1,vertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY}))),_0x3a30a1};const _0x5c198a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x384d7c=_0x5c198a(void 0,(function(){return _0x384d7c.toString().search("(((.+)+)+)+$").toString().constructor(_0x384d7c).search("(((.+)+)+)+$")}));function _0x4c5a2b(e){this.lineWidth=1,this.lineColor=new WebGLPlot.Color(1,0,0,1),this._scaneRegion_ShapePts=[],this.id=e.id,this.scene=e.scene}_0x384d7c(),_0x4c5a2b.prototype.createScaneCylinder=function(e){if(this.ScaneCylinder)return!1;this.point=WebGLPlot.defaultValue(e.point,new _0x11ff81(0,0,0));var t=WebGLPlot.defaultValue(e.length,100),i=WebGLPlot.defaultValue(e.radius,30),n=WebGLPlot.defaultValue(e.rotate,new _0x11ff81(0,0,0)),r=WebGLPlot.defaultValue(e.offsetRotate,new _0x11ff81(0,0,0));let o=WebGLPlot.defaultValue(e.color,new WebGLPlot.Color(1,0,0,.4));var a=WebGLPlot.defaultValue(e.showScane,!1);return this.ScaneCylinder=new _0x5f15a4({length:t,topRadius:i,bottomRadius:0,scene:this.scene,point:this.point,rotate:n,offsetRotate:r,id:this.id,show:a,color:o}),!0},_0x4c5a2b.prototype.updateScaneCylinder=function(e){this.ScaneCylinder&&this.ScaneCylinder.update(e)},_0x4c5a2b.prototype.setScaneCylinderColor=function(e){this.ScaneCylinder&&e instanceof WebGLPlot.Color&&this.ScaneCylinder.setColor(e)},_0x4c5a2b.prototype.setScaneCylinderVisible=function(e){this.ScaneCylinder&&this.ScaneCylinder.setVisible(e)},_0x4c5a2b.prototype.removeScaneCylinder=function(){this.ScaneCylinder&&(this.ScaneCylinder.remove(),this.ScaneCylinder=void 0)},_0x4c5a2b.prototype.scaneCylinder2JSONData=function(e){return this.ScaneCylinder&&(e.scaneCylinder_length=this.ScaneCylinder._length,e.scaneCylinder_radius=this.ScaneCylinder._topRadius,e.scaneCylinder_point=this.ScaneCylinder.point,e.scaneCylinder_show=this.ScaneCylinder.show,e.scaneCylinder_cylinderColor=this.ScaneCylinder.cylinderColor,e.scaneCylinder_rotate=this.ScaneCylinder.rotate,e.scaneCylinder_offsetRotate=this.ScaneCylinder.offsetRotate,e.scaneCylinder_id=this.ScaneCylinder.id),e},_0x4c5a2b.prototype.scaneCylinderFromJSONData=function(e){if(this.ScaneCylinder=void 0,e){let t=e.scaneCylinder_length,i=e.scaneCylinder_radius,n=e.scaneCylinder_rotate,r=e.scaneCylinder_offsetRotate;this.point=e.scaneCylinder_point,this.id=e.scaneCylinder_id;let o=e.scaneCylinder_cylinderColor,a=e.scaneCylinder_show;this.ScaneCylinder=new _0x5f15a4({length:t,topRadius:i,bottomRadius:0,scene:this.scene,point:this.point,rotate:n,offsetRotate:r,id:this.id,show:a,color:o})}};var _0x5c8a3f=(_0x27f2cf=!0,function(e,t){var i=_0x27f2cf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27f2cf=!1,i}),_0x438782=_0x5c8a3f(void 0,(function(){return _0x438782.toString().search("(((.+)+)+)+$").toString().constructor(_0x438782).search("(((.+)+)+)+$")})),_0x27f2cf;_0x438782();var _0x12833f={EAST:0,WEST:1,SOUTH:2,NORTH:3,EAST_NORTH:4,WEST_NORTH:5,EAST_SOUTH:6,WEST_SOUTH:7,UP:8},_0x178a11=Object.freeze(_0x12833f),_0x51504e=(_0x5b5498=!0,function(e,t){var i=_0x5b5498?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b5498=!1,i}),_0xcfd1e=_0x51504e(void 0,(function(){return _0xcfd1e.toString().search("(((.+)+)+)+$").toString().constructor(_0xcfd1e).search("(((.+)+)+)+$")})),_0x5b5498;_0xcfd1e();class _0x381298 extends _0x2688ba{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._showPath=WebGLPlot.defaultValue(e.showPath,!1),this._tangentDirection=WebGLPlot.defaultValue(e.tangentDirection,!1),this._pathWidth=WebGLPlot.defaultValue(e.pathWidth,.5),this._pathColor=WebGLPlot.defaultValue(e.pathColor,new WebGLPlot.Color(1,0,0,1)),this._currentPt=WebGLPlot.defaultValue(e.currentPt,null),this._pathType=WebGLPlot.defaultValue(e.pathType,_0x59cef0.POLYLINE),this._wayPoints=WebGLPlot.defaultValue(e.wayPoints,[]),this._shapePoints=WebGLPlot.defaultValue(e.shapePoints,[]),this._pathFeature=WebGLPlot.defaultValue(e.pathFeature,null),this._pathLength=WebGLPlot.defaultValue(e.pathLength,0),this.dynamicScane=void 0,this._showScane=!0,this._scaneColor=new WebGLPlot.Color(1,0,0,.4),this._rotateOffset=new _0x11ff81(0,0,0)}execute(){if(!_0x2d6822.isSymbolDot(this._animationGOFeature._symbolType))return null!==this._pathFeature&&0!==this._pathFeature._positions.length&&(this._pathFeature.show=!1),!1;if(!this.canExecute())return!1;this._showPath&&this._pathFeature&&!this._pathFeature._show&&(this._pathFeature.show=!0);var e=this._ratio,t=new Object;t=this._findPos(e,this._shapePoints,t),this._animationGOFeature.localPoints=[this.PtsToSpherical(t.pt)];var i=t.index;if(this._tangentDirection){t.angle;var n=this.modifyAnimationFollowPath(this._shapePoints,i,t.pt),r=57.29577951308232,o=this._animationGOFeature._showMode,a=new _0x11ff81(n.x*r,n.y*r,n.z*r);(0!==this.rotateOffset.x||0!==this.rotateOffset.y||0!==this.rotateOffset.z)&&(a.x+=this.rotateOffset.x,a.y+=this.rotateOffset.y,a.z+=this.rotateOffset.z),_0x4e5d29.Marker===o?this._animationGOFeature._modelRotate=a:_0x4e5d29.Vector===o&&(this._animationGOFeature.vectorRotate=n),this.updateScane(this.PtsToSpherical(t.pt),a)}return this.updateCameraFollow(e),!0}modifyAnimationFollowPath(e,t,i){if(this._tangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot.Cartesian3;u=WebGLPlot.Cartesian3.subtract(l[0],a,u),u=WebGLPlot.Cartesian3.normalize(u,u);var c=new WebGLPlot.Cartesian3;c=WebGLPlot.Cartesian3.subtract(s,a,c),c=WebGLPlot.Cartesian3.normalize(c,c);var h=new WebGLPlot.Cartesian3;h=WebGLPlot.Cartesian3.cross(c,u,h),h=WebGLPlot.Cartesian3.normalize(h,h);var d=new WebGLPlot.Cartesian3;d=WebGLPlot.Cartesian3.cross(h,c,d),d=WebGLPlot.Cartesian3.normalize(d,d),c=new WebGLPlot.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),h=WebGLPlot.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),c=WebGLPlot.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),d=WebGLPlot.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot.Cartesian3(p,_,m)}}FromAngleAxis(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x11ff81(r*i.x,r*i.y,r*i.z),s=new _0x11ff81;s=WebGLPlot.Cartesian3.cross(a,e,s);var l=new _0x11ff81;l=WebGLPlot.Cartesian3.cross(a,s,l);var u=new _0x11ff81(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x11ff81(2*l.x,2*l.y,2*l.z);return new _0x11ff81(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)}ToEulerAnglesXYZ(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x11ff81(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x11ff81((n=0)-Math.atan2(t.x,t.y),r,n):new _0x11ff81(Math.atan2(t.x,t.y)-(n=0),r,n)}resetAnimationFeature(e){if(_0x2688ba.prototype.resetAnimationFeature.call(this,e),this._animationGOFeature._rotate=this._goFeature._rotate,this._animationGOFeature._modelRotate=this._goFeature._modelRotate,this._animationGOFeature.vectorRotate=this._goFeature.vectorRotate,this.wayPoints.length>=2){var t=[this.wayPoints[0].clone()];this._animationGOFeature.localPoints=t}else{t=[this._goFeature.localPoints[0].clone()];this._animationGOFeature.localPoints=t}e&&(null===this._pathFeature||0===this._pathFeature._positions.length||null===this._shapePoints)&&(this._makePath(),this._pathColor,this._pathWidth),null!==this._pathFeature&&(this._pathFeature.show=!1),void 0===this.dynamicScane?this.dynamicScane=new _0x4c5a2b({id:this._animationGOFeature.id,scene:this._animationManager._scene}):(this.showScane=e,this.updateScane(this._animationGOFeature._localPoints[0],this._animationGOFeature._rotate))}_makePath(){if(null===this._wayPoints||2>this._wayPoints.length)return!1;null===this._pathFeature&&(this.compuetWayPos(),this._pathFeature=_0x38860f.addAlgoPloyline(null,this.createPathLine(this._shapePoints),this._animationManager._scene)),this._pathLength=0;for(var e=1;e<this._shapePoints.length;e++)this._pathLength+=_0x2d6822.distance(this._shapePoints[e-1],this._shapePoints[e]);return this._pathFeature}_findPos(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLength)).result)return!1;var n=i.pt;return this._tangentDirection&&(i.angle=_0x2d6822.radian(n,t[i.index])/Math.PI*180),i}PtsToSpherical(e){var t=this._animationManager._scene.globe.ellipsoid,i=new WebGLPlot.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot.CesiumMath.toDegrees(n.latitude);return new _0x11ff81(WebGLPlot.CesiumMath.toDegrees(n.longitude),r,n.height)}getGOAnimationType(){return _0x304306.ANIMATION_WAY}setShowPath(e){this._showPath=e}setWayPoints(e){if(!e||!Array.isArray(e)||2>e.length)return!1;this._wayPoints=[],this._wayPoints=e,null!==this._pathFeature&&(this.compuetWayPos(),this._pathFeature.positions=this._shapePoints)}getWayPoints(){return this._wayPoints}getCurrentPt(){return this._currentPt}setPathColor(e){!e||(this._pathColor=e,this.pathFeature&&null!==this.pathFeature&&(this.pathFeature.options.color=this.pathColor,this.pathFeature.setStyle(this.pathFeature.options)))}getPathColor(){return this._pathColor}setPathWidth(e){!e||(this.pathWidth=e,this._pathFeature&&null!==this.pathWidth&&(this._pathFeature.width=this.pathWidth))}getPathWidth(){return this._pathWidth}setPathType(e){null!=e&&this.pathType!==e&&(this.pathType=e,null!==this.pathFeature&&(this.pathFeature.destroy(),this.pathFeature=null))}getPathType(){return this._pathType}generateBeizerPointsNoCtrlPt(e){return _0x2d6822.generateBeizerPointsNoCtrlPt(e)}createPathLine(e){return this._pathWidth<=0&&(this._pathWidth=.5),{width:this._pathWidth,positions:e,material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this._pathColor}),id:this._animationGOFeature._id+"_Path",show:!1}}getPtsIndexByDistance(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x2d6822.distance(e[o],e[o+1]))>=t){var a=_0x2d6822.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x11ff81(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n}compuetWayPos(){this._pathType===_0x59cef0.POLYLINE?this._shapePoints=this._wayPoints:this._shapePoints=this.generateBeizerPointsNoCtrlPt(this._wayPoints);for(var e=[],t=0;t<this._shapePoints.length;t++){var i=this._shapePoints[t];e.push(i.x),e.push(i.y),e.push(i.z)}this._shapePoints=WebGLPlot.Cartesian3.fromDegreesArrayHeights(e)}getJSONData(){var e=this.getBaseJSONData();e.type=this.getGOAnimationType(),e.showPath=this.showPath,e.tangentDirection=this.tangentDirection,e.pathType=this.pathType,e.pathWidth=this.pathWidth,e.pathColor=this._colorFormat(this.pathColor),e.wayPoints=[];for(var t=0;t<this.wayPoints.length;t++)e.wayPoints.push({x:this.wayPoints[t].x,y:this.wayPoints[t].y,z:this.wayPoints[t].z});return this.dynamicScane&&(e=this.dynamicScane.scaneCylinder2JSONData(e)),e}fromJSONData(e){this.fromBaseJSONData(e),this.showPath=e.showPath,this.tangentDirection=e.tangentDirection,this.pathType=e.pathType,this.pathWidth=e.pathWidth,this.pathColor=this._serverColorToColor(e.pathColor);for(var t=[],i=0;i<e.wayPoints.length;i++)t.push(new _0x11ff81(e.wayPoints[i].x,e.wayPoints[i].y,e.wayPoints[i].z));this.dynamicScane&&e.scaneCylinder_id&&this.dynamicScane.scaneCylinderFromJSONData(e),this.setWayPoints(t)}createScane(e){e.showScane=this.showScane,e.point=this._animationGOFeature._localPoints[0].clone(),e.color?this.scaneColor=e.color:e.color=this.scaneColor,e.id=this._animationGOFeature.id,this.dynamicScane.createScaneCylinder(e)}updateScane(e,t){if(this.dynamicScane){var i={point:e,rotate:t};this.dynamicScane.updateScaneCylinder(i)}}setScaneVisible(e){this.dynamicScane&&this.dynamicScane.setScaneCylinderVisible(e)}setScaneColor(e){this.dynamicScane&&this.dynamicScane.setScaneCylinderColor(e)}removeScane(){this.dynamicScane&&this.dynamicScane.removeScaneCylinder()}setCameraFollow(e,t,i,n){if(this.isFollow=e,this._wayPoints.length<=0||!this.isFollow)return!1;null===this._pathFeature&&this._shapePoints.length<=0&&(this._makePath(),this._pathFeature.show=!1);const r=Math.PI/180,o=n/i,a=-Math.asin(o);let s=null;switch(this.CameraOrientation=null,t){case _0x178a11.EAST:s=new Cesium.Cartesian3(0,-1,o),this.CameraOrientation={heading:-90*r,pitch:a,roll:0};break;case _0x178a11.WEST:s=new Cesium.Cartesian3(0,1,o),this.CameraOrientation={heading:90*r,pitch:a,roll:0};break;case _0x178a11.SOUTH:s=new Cesium.Cartesian3(-1,0,o),this.CameraOrientation={heading:0,pitch:a,roll:0};break;case _0x178a11.NORTH:s=new Cesium.Cartesian3(1,0,o),this.CameraOrientation={heading:180*r,pitch:a,roll:0};break;case _0x178a11.EAST_NORTH:s=new Cesium.Cartesian3(1,-1,o),this.CameraOrientation={heading:225*r,pitch:a,roll:0};break;case _0x178a11.WEST_NORTH:s=new Cesium.Cartesian3(1,1,o),this.CameraOrientation={heading:135*r,pitch:a,roll:0};break;case _0x178a11.EAST_SOUTH:s=new Cesium.Cartesian3(-1,-1,o),this.CameraOrientation={heading:-45*r,pitch:a,roll:0};break;case _0x178a11.WEST_SOUTH:s=new Cesium.Cartesian3(-1,1,o),this.CameraOrientation={heading:45*r,pitch:a,roll:0};break;case _0x178a11.UP:s=new Cesium.Cartesian3(0,0,1),this.CameraOrientation={heading:0*r,pitch:-Math.PI/2,roll:0}}const l=this._shapePoints[0],u=_0x2d6822.computeMatrix2(l,new Cesium.Cartesian3(0,0,0));let c=_0x2d6822.localPtsToCartesian(s,u,i).position,h=new _0x11ff81(c.x-l.x,c.y-l.y,c.z-l.z);this.followShapePoints=[];for(let e=0;e<this._shapePoints.length;e++){const t=this._shapePoints[e];this.followShapePoints.push(new _0x11ff81(t.x+h.x,t.y+h.y,t.z+h.z))}}updateCameraFollow(e){if(!this.isFollow)return;let t=new Object,i=this._findPos(e,this.followShapePoints,t).pt;this._animationManager._scene.camera.setView({destination:i,orientation:this.CameraOrientation})}}Object.defineProperties(_0x381298.prototype,{showPath:{get:function(){return this._showPath},set:function(e){e!=this._showPath&&(this._showPath=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},tangentDirection:{get:function(){return this._tangentDirection},set:function(e){e!=this._tangentDirection&&(this._tangentDirection=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathType:{get:function(){return this._pathType},set:function(e){e!=this._pathType&&(this._pathType=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathWidth:{get:function(){return this._pathWidth},set:function(e){e==this._pathWidth||e<=0||(this._pathWidth=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathColor:{get:function(){return this._pathColor},set:function(e){e==this._pathColor||!(e instanceof WebGLPlot.Color)||(this._pathColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},wayPoints:{get:function(){return this._wayPoints},set:function(e){e!==this._wayPoints&&(this._wayPoints=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},showScane:{get:function(){return this._showScane},set:function(e){e!=this._showScane&&(this._showScane=e,this.dynamicScane&&this.dynamicScane.setScaneCylinderVisible(e),_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},scaneColor:{get:function(){return this._scaneColor},set:function(e){e!=this._scaneColor&&(this._scaneColor=e,this.dynamicScane&&this.dynamicScane.setScaneCylinderColor(e),_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},rotateOffset:{get:function(){return this._rotateOffset},set:function(e){e!=this._rotateOffset&&(this._rotateOffset=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x37a83a=(_0x19c762=!0,function(e,t){var i=_0x19c762?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19c762=!1,i}),_0x4b8415=_0x37a83a(void 0,(function(){return _0x4b8415.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b8415).search("(((.+)+)+)+$")})),_0x19c762;_0x4b8415();class _0x1c2b25 extends _0x2688ba{constructor(e){super(e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT)),this._showPath=WebGLPlot$f.defaultValue(e.showPath,!1),this._tangentDirection=WebGLPlot$f.defaultValue(e.tangentDirection,!1),this._pathWidth=WebGLPlot$f.defaultValue(e.pathWidth,.5),this._pathColor=WebGLPlot$f.defaultValue(e.pathColor,new WebGLPlot$f.Color(1,0,0,1)),this._currentPt=WebGLPlot$f.defaultValue(e.currentPt,null),this._pathType=WebGLPlot$f.defaultValue(e.pathType,_0x59cef0.POLYLINE),this._wayPoints=WebGLPlot$f.defaultValue(e.wayPoints,[]),this.shapePointsArray=WebGLPlot$f.defaultValue(e.shapePoints,[]),this._pathFeature=WebGLPlot$f.defaultValue(e.pathFeature,null),this._pathLength=WebGLPlot$f.defaultValue(e.pathLength,0),this._scane_ShapePts=[],this.showScane=!0,this._rotateOffset=new _0x11ff81(0,0,0)}execute(){if(!this.canExecute())return!1;if(this._showPath&&this._pathFeature&&!this._pathFeature._show&&(this._pathFeature.show=!0),this.animationGOFeatures.length>0)for(let e=0;e<this.animationGOFeatures.length;e++){const t=this.shapePointsArray[e];this.execute2(this.animationGOFeatures[e],t)}}execute2(e,t){if(!_0x2d6822.isSymbolDot(e._symbolType))return!1;var i=this._ratio,n=new Object;n=this._findPos(i,t,n),e.localPoints=[this.PtsToSpherical(n.pt)];var r=n.index;if(this._tangentDirection){n.angle;var o=this.modifyAnimationFollowPath(t,r,n.pt),a=57.29577951308232,s=e._showMode,l=new _0x11ff81(o.x*a,o.y*a,o.z*a);_0x4e5d29.Marker===s?e._modelRotate=l:_0x4e5d29.Vector===s&&(e.vectorRotate=o)}return this.updateCameraFollow(i),!0}modifyAnimationFollowPath(e,t,i){if(this._tangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot$f.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot$f.Cartesian3;u=WebGLPlot$f.Cartesian3.subtract(l[0],a,u),u=WebGLPlot$f.Cartesian3.normalize(u,u);var c=new WebGLPlot$f.Cartesian3;c=WebGLPlot$f.Cartesian3.subtract(s,a,c),c=WebGLPlot$f.Cartesian3.normalize(c,c);var h=new WebGLPlot$f.Cartesian3;h=WebGLPlot$f.Cartesian3.cross(c,u,h),h=WebGLPlot$f.Cartesian3.normalize(h,h);var d=new WebGLPlot$f.Cartesian3;d=WebGLPlot$f.Cartesian3.cross(h,c,d),d=WebGLPlot$f.Cartesian3.normalize(d,d),c=new WebGLPlot$f.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot$f.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot$f.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot$f.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot$f.Cartesian3(1,0,0)),h=WebGLPlot$f.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot$f.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot$f.Cartesian3(1,0,0)),c=WebGLPlot$f.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot$f.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot$f.Cartesian3(1,0,0)),d=WebGLPlot$f.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot$f.Cartesian3(p,_,m)}}FromAngleAxis(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x11ff81(r*i.x,r*i.y,r*i.z),s=new _0x11ff81;s=WebGLPlot$f.Cartesian3.cross(a,e,s);var l=new _0x11ff81;l=WebGLPlot$f.Cartesian3.cross(a,s,l);var u=new _0x11ff81(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x11ff81(2*l.x,2*l.y,2*l.z);return new _0x11ff81(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)}ToEulerAnglesXYZ(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x11ff81(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x11ff81((n=0)-Math.atan2(t.x,t.y),r,n):new _0x11ff81(Math.atan2(t.x,t.y)-(n=0),r,n)}_makePath(){if(null===this._wayPoints||2>this._wayPoints.length)return!1;null===this._pathFeature&&(this.compuetWayPos(),this._pathFeature=_0x38860f.addAlgoPloyline(null,this.createPathLine(this.shapePointsArray[0]))),this._pathLength=0;for(var e=1;e<this.shapePointsArray[0].length;e++)this._pathLength+=_0x2d6822.distance(this.shapePointsArray[0][e-1],this.shapePointsArray[0][e]);return this._pathFeature}_findPos(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLength)).result)return!1;var n=i.pt;return this._tangentDirection&&(i.angle=_0x2d6822.radian(n,t[i.index])/Math.PI*180),i}PtsToSpherical(e){var t=_0x1713d3.getInstance({scene:this._scene})._scene.globe.ellipsoid,i=new WebGLPlot$f.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot$f.CesiumMath.toDegrees(n.latitude);return new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(n.longitude),r,n.height)}getGOAnimationType(){return _0x304306.ANIMATION_WAY}setShowPath(e){this._showPath=e}setWayPoints(e){if(!e||!Array.isArray(e)||2>e.length)return!1;this._wayPoints=[],this._wayPoints=e,null!==this._pathFeature&&(this.compuetWayPos(),this._pathFeature._positions=this.shapePointsArray[0])}getWayPoints(){return this._wayPoints}getCurrentPt(){return this._currentPt}setPathColor(e){!e||(this._pathColor=e,this.pathFeature&&null!==this.pathFeature&&(this.pathFeature.options.color=this.pathColor,this.pathFeature.setStyle(this.pathFeature.options)))}getPathColor(){return this._pathColor}setPathWidth(e){!e||(this.pathWidth=e,this.pathFeature&&null!==this.pathWidth&&(this.pathFeature.options.weight=this.pathWidth,this.pathFeature.setStyle(this.pathFeature.options)))}getPathWidth(){return this._pathWidth}setPathType(e){null!=e&&this.pathType!==e&&(this.pathType=e,null!==this.pathFeature&&(this.pathFeature.destroy(),this.pathFeature=null))}getPathType(){return this._pathType}generateBeizerPointsNoCtrlPt(e){return _0x2d6822.generateBeizerPointsNoCtrlPt(e)}createPathLine(e){return this._pathWidth<=0&&(this._pathWidth=.5),{width:this._pathWidth,positions:e,material:WebGLPlot$f.Material.fromType(WebGLPlot$f.Material.ColorType,{color:this._pathColor}),id:this.animationGOFeatures[0]._id+"_Path",show:!1}}getPtsIndexByDistance(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x2d6822.distance(e[o],e[o+1]))>=t){var a=_0x2d6822.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x11ff81(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n}compuetWayPos(){let e=[];e=this._pathType===_0x59cef0.POLYLINE?this._wayPoints:this.generateBeizerPointsNoCtrlPt(this._wayPoints),this.shapePointsArray=[];for(let r=0;r<this.offsetPt.length;r++){const o=this.offsetPt[r];for(var t=[],i=0;i<e.length;i++){var n=e[i];t.push(n.x+o.x),t.push(n.y+o.y),t.push(n.z+o.z)}this.shapePointsArray.push(WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(t))}}getJSONData(){var e=this.getBaseJSONData();e.type=this.getGOAnimationType(),e.showPath=this.showPath,e.tangentDirection=this.tangentDirection,e.pathType=this.pathType,e.pathWidth=this.pathWidth,e.pathColor=this._colorFormat(this.pathColor),e.wayPoints=[];for(var t=0;t<this.wayPoints.length;t++)e.wayPoints.push({x:this.wayPoints[t].x,y:this.wayPoints[t].y,z:this.wayPoints[t].z});return e}fromJSONData(e){this.fromBaseJSONData(e),this.showPath=e.showPath,this.tangentDirection=e.tangentDirection,this.pathType=e.pathType,this.pathWidth=e.pathWidth,this.pathColor=this._serverColorToColor(e.pathColor);for(var t=[],i=0;i<e.wayPoints.length;i++)t.push(new _0x11ff81(e.wayPoints[i].x,e.wayPoints[i].y,e.wayPoints[i].z));this.setWayPoints(t)}createScane(e){e.showScane=this.showScane,this.dynamicScane.createScaneCone(e)}updateScane(e,t){var i={point:e,rotate:t,showScane:this.showScane};this.dynamicScane.updateScaneCone(i)}setGOFeatures(e,t){if(void 0===t||t.length<=0||null===e._goAnimationLayer)return!1;this._animationManager=e,this._goFeatures=t;const i=t[0].localPoints[0].clone();return this.offsetPt=[],this.animationGOFeatures=[],t.map((t=>{const n=t.localPoints[0].clone(),r=new _0x11ff81(n.x-i.x,n.y-i.y,n.z-i.z);this.offsetPt.push(r);let o=this.createAnimationGOFeature(t);o._layer=e._goAnimationLayer,this.animationGOFeatures.push(o)})),!(this.animationGOFeatures.length<=0)&&(e._goAnimationLayer.addFeatures(this.animationGOFeatures),this.showAnimationFeature(!1),!0)}createAnimationGOFeature(e){for(var t=0;t<this._animationManager._goAnimations.length;t++){var i=this._animationManager._goAnimations[t];if(i._goFeature.id===e.id)return i._animationGOFeature}let n=e.clone();return n._id+=this._name,n._isEdit=!0,n._valid=!1,n._isAnimationFeature=!0,n}showAnimationFeature(e){this.resetAnimationFeature(e)}resetAnimationFeature(e){if(this.animationGOFeatures.length>0&&this._goFeatures.length>0)for(let i=0;i<this._goFeatures.length;i++){let n=this._goFeatures[i];n.display=!e,n._initialize=!1;let r=this.animationGOFeatures[i];r.display=e,r._initialize=!1,r._rotate=n._rotate,r._modelRotate=n._modelRotate,r.vectorRotate=n.vectorRotate;var t=n._localPoints[0].clone();r._localPoints=[t]}e&&(null===this._pathFeature||0===this._pathFeature._positions.length||0===this.shapePointsArray.length)&&(this._makePath(),this._pathColor,this._pathWidth),null!==this._pathFeature&&(this._pathFeature.show=!1)}setCameraFollow(e,t,i,n){if(this.isFollow=e,this._wayPoints.length<=0||!this.isFollow)return!1;null===this._pathFeature&&this.shapePointsArray[0].length<=0&&(this._makePath(),this._pathFeature.show=!1);const r=Math.PI/180,o=n/i,a=-Math.asin(o);let s=null;switch(this.CameraOrientation=null,t){case _0x178a11.EAST:s=new Cesium.Cartesian3(0,-1,o),this.CameraOrientation={heading:-90*r,pitch:a,roll:0};break;case _0x178a11.WEST:s=new Cesium.Cartesian3(0,1,o),this.CameraOrientation={heading:90*r,pitch:a,roll:0};break;case _0x178a11.SOUTH:s=new Cesium.Cartesian3(-1,0,o),this.CameraOrientation={heading:0,pitch:a,roll:0};break;case _0x178a11.NORTH:s=new Cesium.Cartesian3(1,0,o),this.CameraOrientation={heading:180*r,pitch:a,roll:0};break;case _0x178a11.EAST_NORTH:s=new Cesium.Cartesian3(1,-1,o),this.CameraOrientation={heading:225*r,pitch:a,roll:0};break;case _0x178a11.WEST_NORTH:s=new Cesium.Cartesian3(1,1,o),this.CameraOrientation={heading:135*r,pitch:a,roll:0};break;case _0x178a11.EAST_SOUTH:s=new Cesium.Cartesian3(-1,-1,o),this.CameraOrientation={heading:-45*r,pitch:a,roll:0};break;case _0x178a11.WEST_SOUTH:s=new Cesium.Cartesian3(-1,1,o),this.CameraOrientation={heading:45*r,pitch:a,roll:0};break;case _0x178a11.UP:s=new Cesium.Cartesian3(0,0,1),this.CameraOrientation={heading:0*r,pitch:-Math.PI/2,roll:0}}const l=this.shapePointsArray[0][0],u=_0x2d6822.computeMatrix2(l,new Cesium.Cartesian3(0,0,0));let c=_0x2d6822.localPtsToCartesian(s,u,i).position,h=new _0x11ff81(c.x-l.x,c.y-l.y,c.z-l.z);this.followShapePoints=[];for(let e=0;e<this.shapePointsArray[0].length;e++){const t=this.shapePointsArray[0][e];this.followShapePoints.push(new _0x11ff81(t.x+h.x,t.y+h.y,t.z+h.z))}}updateCameraFollow(e){if(!this.isFollow)return;let t=new Object,i=this._findPos(e,this.followShapePoints,t).pt;this._animationManager._scene.camera.setView({destination:i,orientation:this.CameraOrientation})}}Object.defineProperties(_0x1c2b25.prototype,{showPath:{get:function(){return this._showPath},set:function(e){e!=this._showPath&&(this._showPath=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},tangentDirection:{get:function(){return this._tangentDirection},set:function(e){e!=this._tangentDirection&&(this._tangentDirection=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathType:{get:function(){return this._pathType},set:function(e){e!=this._pathType&&(this._pathType=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathWidth:{get:function(){return this._pathWidth},set:function(e){e==this._pathWidth||e<=0||(this._pathWidth=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathColor:{get:function(){return this._pathColor},set:function(e){e!=this._pathColor&&(this._pathColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},wayPoints:{get:function(){return this._wayPoints},set:function(e){e!==this._wayPoints&&(this._wayPoints=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},showScane:{get:function(){return this._showScane},set:function(e){e!=this._showScane&&(this._showScane=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},rotateOffset:{get:function(){return this._rotateOffset},set:function(e){e!=this._rotateOffset&&(this._rotateOffset=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x4ec9aa=(_0xcef365=!0,function(e,t){var i=_0xcef365?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xcef365=!1,i}),_0x4c758d=_0x4ec9aa(void 0,(function(){return _0x4c758d.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c758d).search("(((.+)+)+)+$")})),_0xcef365;_0x4c758d();class _0x45edd9 extends _0x2688ba{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._lineColorAnimation=WebGLPlot.defaultValue(e.lineColorAnimation,!1),this._startLineColor=WebGLPlot.defaultValue(e.startLineColor,new WebGLPlot.Color(1,0,0,1)),this._endLineColor=WebGLPlot.defaultValue(e.endLineColor,new WebGLPlot.Color(0,0,1,1)),this._lineWidthAnimation=WebGLPlot.defaultValue(e.lineWidthAnimation,!1),this._startLineWidth=WebGLPlot.defaultValue(e.startLineWidth,0),this._endLineWidth=WebGLPlot.defaultValue(e.endLineWidth,5),this._surroundLineColorAnimation=WebGLPlot.defaultValue(e.surroundLineColorAnimation,!1),this._startSurroundLineColor=WebGLPlot.defaultValue(e.startSurroundLineColor,new WebGLPlot.Color(1,1,0,1)),this._endSurroundLineColor=WebGLPlot.defaultValue(e.endSurroundLineColor,new WebGLPlot.Color(0,1,1,1)),this._surroundLineWidthAnimation=WebGLPlot.defaultValue(e.surroundLineWidthAnimation,!1),this._startSurroundLineWidth=WebGLPlot.defaultValue(e.startSurroundLineWidth,0),this._endSurroundLineWidth=WebGLPlot.defaultValue(e.endtSurroundLineWidth,1)}getGOAnimationType(){return _0x304306.ANIMATION_ATTRIBUTE}execute(){if(!this.canExecute())return!1;var e=this.ratio,t=this.executeLineColorAnimation(e),i=this.executeLineWidthAnimation(e),n=this.executeSurroundLineColorAnimation(e),r=this.executeSurroundLineWidthAnimation(e);return!!(t||i||n||r)&&(this._animationGOFeature._initialize=!1,!0)}executeLineColorAnimation(e){if(!this._lineColorAnimation)return!1;var t=this.startLineColor,i=this.endLineColor,n=t.red+(i.red-t.red)*e,r=t.green+(i.green-t.green)*e,o=t.blue+(i.blue-t.blue)*e,a=t.alpha+(i.alpha-t.alpha)*e;return this._animationGOFeature._symbolStyle._lineColor=new WebGLPlot.Color(n,r,o,a),!0}executeLineWidthAnimation(e){return!!this.lineWidthAnimation&&(_0x18bc2f.SYMBOL_DOT===this._animationGOFeature.symbolType?(this._animationGOFeature.gridLineWidth=this.startLineWidth+(this.endLineWidth-this.startLineWidth)*e,!0):_0x18bc2f.SYMBOL_ALGO===this._animationGOFeature.symbolType?(this._animationGOFeature._symbolStyle._lineWidth=this.startLineWidth+(this.endLineWidth-this.startLineWidth)*e,!0):void 0)}executeSurroundLineColorAnimation(e){if(!this.surroundLineColorAnimation)return!1;var t=this.startSurroundLineColor,i=this.endSurroundLineColor,n=t.red+(i.red-t.red)*e,r=t.green+(i.green-t.green)*e,o=t.blue+(i.blue-t.blue)*e,a=t.alpha+(i.alpha-t.alpha)*e;return this._animationGOFeature._symbolStyle._surroundLineColor=new WebGLPlot.Color(n,r,o,a),!0}executeSurroundLineWidthAnimation(e){return!!this.surroundLineWidthAnimation&&(_0x18bc2f.SYMBOL_DOT===this._animationGOFeature.symbolType?(this._animationGOFeature._gridSurroundLineWidth=this.startSurroundLineWidth+(this.endSurroundLineWidth-this.startSurroundLineWidth)*e,!0):_0x18bc2f.SYMBOL_ALGO===this._animationGOFeature.symbolType?(this._animationGOFeature._symbolStyle._surroundLineWidth=this.startSurroundLineWidth+(this.endSurroundLineWidth-this.startSurroundLineWidth)*e,!0):void 0)}resetAnimationFeature(e){e&&(this.lineWidthAnimation&&(this._animationGOFeature.gridLineWidth=this._goFeature.gridLineWidth),this.lineColorAnimation&&(this._animationGOFeature._symbolStyle._lineColor=this._goFeature._symbolStyle._lineColor),this.surroundLineWidthAnimation&&(this._animationGOFeature._gridSurroundLineWidth=this._goFeature._gridSurroundLineWidth),this.surroundLineColorAnimation&&(this._animationGOFeature._symbolStyle._surroundLineColor=this._goFeature._symbolStyle._surroundLineColor))}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.lineColorAnimation=this.lineColorAnimation,e.startLineColor=this._colorFormat(this.startLineColor),e.endLineColor=this._colorFormat(this.endLineColor),e.lineWidthAnimation=this.lineWidthAnimation,e.startLineWidth=this.startLineWidth,e.endLineWidth=this.endLineWidth,e.surroundLineColorAnimation=this.surroundLineColorAnimation,e.startSurroundLineColor=this._colorFormat(this.startSurroundLineColor),e.endSurroundLineColor=this._colorFormat(this.endSurroundLineColor),e.surroundLineWidthAnimation=this.surroundLineWidthAnimation,e.startSurroundLineWidth=this.startSurroundLineWidth,e.endSurroundLineWidth=this.endSurroundLineWidth,e}fromJSONData(e){this.fromBaseJSONData(e),this.lineColorAnimation=e.lineColorAnimation,this.startLineColor=this._serverColorToColor(e.startLineColor),this.endLineColor=this._serverColorToColor(e.endLineColor),this.lineWidthAnimation=e.lineWidthAnimation,this.startLineWidth=e.startLineWidth,this.endLineWidth=e.endLineWidth,this.surroundLineColorAnimation=e.surroundLineColorAnimation,this.startSurroundLineColor=this._serverColorToColor(e.startSurroundLineColor),this.endSurroundLineColor=this._serverColorToColor(e.endSurroundLineColor),this.surroundLineWidthAnimation=e.surroundLineWidthAnimation,this.startSurroundLineWidth=e.startSurroundLineWidth,this.endSurroundLineWidth=e.endSurroundLineWidth}}Object.defineProperties(_0x45edd9.prototype,{lineColorAnimation:{get:function(){return this._lineColorAnimation},set:function(e){e!==this._lineColorAnimation&&(this._lineColorAnimation=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startLineColor:{get:function(){return this._startLineColor},set:function(e){e!==this._startLineColor&&(this._startLineColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endLineColor:{get:function(){return this._endLineColor},set:function(e){e!==this._endLineColor&&(this._endLineColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},lineWidthAnimation:{get:function(){return this._lineWidthAnimation},set:function(e){e!==this._lineWidthAnimation&&(this._lineWidthAnimation=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startLineWidth:{get:function(){return this._startLineWidth},set:function(e){e!==this._startLineWidth&&(this._startLineWidth=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endLineWidth:{get:function(){return this._endLineWidth},set:function(e){e!=this._endLineWidth&&(this._endLineWidth=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},surroundLineColorAnimation:{get:function(){return this._surroundLineColorAnimation},set:function(e){e!=this._surroundLineColorAnimation&&(this._surroundLineColorAnimation=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startSurroundLineColor:{get:function(){return this._startSurroundLineColor},set:function(e){e!=this._startSurroundLineColor&&(this._startSurroundLineColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endSurroundLineColor:{get:function(){return this._endSurroundLineColor},set:function(e){e!=this._endSurroundLineColor&&(this._endSurroundLineColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},surroundLineWidthAnimation:{get:function(){return this._surroundLineWidthAnimation},set:function(e){e!=this._surroundLineWidthAnimation&&(this._surroundLineWidthAnimation=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startSurroundLineWidth:{get:function(){return this._startSurroundLineWidth},set:function(e){e!=this._startSurroundLineWidth&&(this._startSurroundLineWidth=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endSurroundLineWidth:{get:function(){return this._endSurroundLineWidth},set:function(e){e!=this._endSurroundLineWidth&&(this._endSurroundLineWidth=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x1f91d1=(_0x49eb53=!0,function(e,t){var i=_0x49eb53?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49eb53=!1,i}),_0x5ecf65=_0x1f91d1(void 0,(function(){return _0x5ecf65.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ecf65).search("(((.+)+)+)+$")})),_0x49eb53;_0x5ecf65();var _0x2a584b={ClockWise:0,AntiClockWise:1},_0x36b304=Object.freeze(_0x2a584b),_0x5ef7f8=(_0x1a44d0=!0,function(e,t){var i=_0x1a44d0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a44d0=!1,i}),_0x122207=_0x5ef7f8(void 0,(function(){return _0x122207.toString().search("(((.+)+)+)+$").toString().constructor(_0x122207).search("(((.+)+)+)+$")})),_0x1a44d0;_0x122207();class _0x1b6a94 extends _0x2688ba{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._rotateDirection=WebGLPlot.defaultValue(e.rotateDirection,_0x36b304.ClockWise),this._startAngle=WebGLPlot.defaultValue(e.startAngle,new _0x11ff81(0,0,0)),this._endAngle=WebGLPlot.defaultValue(e.endAngle,new _0x11ff81(0,0,0))}getGOAnimationType(){return _0x304306.ANIMATION_ROTATE}execute(){if(this._animationGOFeature.symbolType!==_0x18bc2f.SYMBOL_DOT||!this.canExecute())return!1;var e=this._ratio,t=this.getCurrentAngle(this.startAngle.x,this.endAngle.x,e),i=this.getCurrentAngle(this.startAngle.y,this.endAngle.y,e),n=this.getCurrentAngle(this.startAngle.z,this.endAngle.z,e),r=this._animationGOFeature._showMode;return _0x4e5d29.Vector===r?this._animationGOFeature.vectorRotate=new _0x11ff81(t,i,n):_0x4e5d29.Marker===r&&(this._animationGOFeature._modelRotate=new _0x11ff81(t,i,n)),this._animationGOFeature._initialize=!1,!0}getCurrentAngle(e,t,i){var n=0,r=t-e,o=parseInt(Math.abs(r/360));if(e!==t)if(this._rotateDirection===_0x36b304.ClockWise)r<0&&(r+=360*(2*o+1)),n=e+r*i;else{var a=0;n=e+(360-(r=0===(a=r<0?r+360*(o+1):r-360*o)?360*o:360-a+360*o)*i)}return n}resetAnimationFeature(e){this._animationGOFeature._rotate=this._goFeature._rotate,this._animationGOFeature._modelRotate=this._goFeature._modelRotate,this._animationGOFeature.vectorRotate=this._goFeature.vectorRotate,GOAnimation.prototype.resetAnimationFeature.call(this,e)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.rotateDirection=this.rotateDirection,e.startAngle=this.startAngle,e.endAngle=this.endAngle,e}fromJSONData(e){this.fromBaseJSONData(e),this.rotateDirection=e.rotateDirection,this.startAngle=e.startAngle,this.endAngle=e.endAngle}}Object.defineProperties(_0x1b6a94.prototype,{rotateDirection:{get:function(){return this._rotateDirection},set:function(e){e!=this._rotateDirection&&(this._rotateDirection=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startAngle:{get:function(){return this._startAngle},set:function(e){e!=this._startAngle&&(this._startAngle=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endAngle:{get:function(){return this._endAngle},set:function(e){e!=this._endAngle&&(this._endAngle=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x341a1e=(_0x469846=!0,function(e,t){var i=_0x469846?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x469846=!1,i}),_0xc10956=_0x341a1e(void 0,(function(){return _0xc10956.toString().search("(((.+)+)+)+$").toString().constructor(_0xc10956).search("(((.+)+)+)+$")})),_0x469846;_0xc10956();class _0x1c88c7 extends _0x2688ba{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._startScale=WebGLPlot.defaultValue(e.startScale,0),this._endScale=WebGLPlot.defaultValue(e.endScale,1),this._lastScale=WebGLPlot.defaultValue(e.lastScale,null)}getGOAnimationType(){return _0x304306.ANIMATION_SCALE}execute(){if(this._animationGOFeature._symbolType!==_0x18bc2f.SYMBOL_DOT||!this.canExecute())return!1;this._lastScale=this._animationGOFeature._scale,_0x4e5d29.Marker===this._animationGOFeature.showMode&&(this._lastScale=this._animationGOFeature._modelScale.x),_0x4e5d29.Vector===this._animationGOFeature.showMode&&(this._lastScale=this._animationGOFeature._vectorScale);var e=this._startScale;0===e&&(e=.1);var t=this._endScale;if(0===t&&(t=.1),this._animationGOFeature.sizeInMeters)this._animationGOFeature.billboard.scale=this._animationGOFeature._BillboardScale*(e+this.ratio*(t-e));else{var i=this.goFeature._scale*(e+this.ratio*(t-e));_0x4e5d29.Picture===this._animationGOFeature.showMode||_0x4e5d29.Grid===this._animationGOFeature.showMode?this._animationGOFeature.scale=i:_0x4e5d29.Marker===this._animationGOFeature.showMode?(i=this.goFeature._modelScale.x*(e+this.ratio*(t-e)),this._animationGOFeature._modelScale.x=i,this._animationGOFeature._initialize=!1):_0x4e5d29.Vector===this._animationGOFeature.showMode&&(i=this.goFeature._vectorScale*(e+this.ratio*(t-e)),this._animationGOFeature._vectorScale=i,this._animationGOFeature._initialize=!1)}return!0}resetAnimationFeature(e){this._lastScale=null,this._animationGOFeature.scale=this.goFeature.scale,_0x2688ba.prototype.resetAnimationFeature.call(this,e)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.startScale=this.startScale,e.endScale=this.endScale,e}fromJSONData(e){this.fromBaseJSONData(e),this.startScale=e.startScale,this.endScale=e.endScale}}Object.defineProperties(_0x1c88c7.prototype,{startScale:{get:function(){return this._startScale},set:function(e){e!=this._startScale&&(this._startScale=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endScale:{get:function(){return this._endScale},set:function(e){e!=this._endScale&&(this._endScale=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},lastScale:{get:function(){return this._lastScale},set:function(e){e!=this._lastScale&&(this._lastScale=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0xe61bf8=(_0x1c3197=!0,function(e,t){var i=_0x1c3197?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c3197=!1,i}),_0x155cf9=_0xe61bf8(void 0,(function(){return _0x155cf9.toString().search("(((.+)+)+)+$").toString().constructor(_0x155cf9).search("(((.+)+)+)+$")})),_0x1c3197;_0x155cf9();class _0x4a4ca0 extends _0x2688ba{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._startScale=WebGLPlot.defaultValue(e.startScale,0),this._endScale=WebGLPlot.defaultValue(e.endScale,1),this._timeSpace=WebGLPlot.defaultValue(e.timeSpace,50),this._lastDrawTime=WebGLPlot.defaultValue(e.lastDrawTime,0),this._lineLength=WebGLPlot.defaultValue(e.lineLength,0),this._controlPoints=WebGLPlot.defaultValue(e.controlPoints,[]),this.m_arrPts3D=[],this.goFeatureLocalPts=[]}getGOAnimationType(){return _0x304306.ANIMATION_GROW}execute(){if(this._animationGOFeature._localPoints.length<2){var e=this.goFeatureLocalPts;if(e.length<2)return!1;this._animationGOFeature._localPoints=e}if(!this.canExecute())return!1;var t=(new Date).getTime();if(this._lastDrawTime>0&&t-this._timeSpace<this._lastDrawTime)return!1;var i=this._startScale+this._ratio*(this._endScale-this._startScale);return i>=1&&(i=1),this._lastDrawTime=t,this._executeAnimation(i)}_executeAnimation(e){var t=!1,i=this._goFeature._code,n=this._goFeature._libID;if(0===this.m_arrPts3D.length&&(this.m_arrPts3D=WebGLPlot.clonePoints(this.goFeatureLocalPts)),0===n)switch(i){case _0x18bc2f.SYMBOL_KIDNEY:case _0x18bc2f.SYMBOL_POLYBEZIERCLOSED:case _0x18bc2f.SYMBOL_PARALLELOGRAM:case _0x18bc2f.SYMBOL_TRAPEZOID:case _0x18bc2f.SYMBOL_CIRCLECHORD:t=this._execute_Kidney(e);break;case _0x18bc2f.SYMBOL_CIRCLE:t=this._execute_Circle(e);break;case _0x18bc2f.SYMBOL_RECTANGLE:t=this._execute_Rect(e);break;case _0x18bc2f.SYMBOL_REGULARPOLYGON:t=this._execute_RegularPloygon(e);break;case _0x18bc2f.SYMBOL_ELLIPSE:t=this._execute_Ellipse(e);break;case _0x18bc2f.SYMBOL_ARBITRARYPOLYGON:t=this._execute_ArbitraryPolygon(e);break;case _0x18bc2f.SYMBOL_PARALLELLINE:t=this._execute_ParallelLine(e);break;case _0x18bc2f.SYMBOL_POLYBEZIER:t=this._execute_Polybezier(e);break;case _0x18bc2f.SYMBOL_PIE:case _0x18bc2f.SYMBOL_CHORD:case _0x18bc2f.SYMBOL_ARC:return!1;case _0x18bc2f.SYMBOL_CURVEEIGHT:t=this._execute_CurveEight(e);break;default:t=this._execute_Generalization(e)}else if(22===n)switch(i){case 1004:case 2004:case 1010:t=this._execute_1004(e);break;case 1006:case 2006:t=this._execute_1006(e);break;case 1002:case 2002:t=this._execute_1002(e);break;case 32:case 3211:t=this._execute_ArbitraryPolygon(e);break;case 390:case 3911:t=this._execute_Kidney(e);break;default:t=this._execute_Generalization(e)}else if(100===n)if(25200===i)t=this._execute_1004(e);else t=this._execute_Generalization(e);else if(421===n)switch(i){case 311:t=this._execute_1004(e);break;case 317:t=this._execute_1006(e);break;default:t=this._execute_Generalization(e)}else if(123===n)switch(i){case 60310:case 6031001:t=this._execute_1004(e);break;default:t=this._execute_Generalization(e)}else t=this._execute_Generalization(e);return t}_execute_Generalization(e){0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,this._lineLength=WebGLPlot.polylineDistance(this._controlPoints));for(var t=[],i=WebGLPlot.clonePoints(this._controlPoints),n=this._findPos(this._lineLength*e,i),r=0;r<=n.pos;r++)t.push(i[r]);return t.push(n.pts),WebGLPlot.isAccessServer(this._animationGOFeature._libID,this._animationGOFeature._code)&&this._animationGOFeature.getMinEditPts()>t.length?(this._executeAndRatioIsZero(),!0):(this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(t),this._animationGOFeature._initialize=!1,!0)}_findPos(e,t){var i,n=0,r=0;for(i=1;i<t.length&&!(n+(r=_0x2d6822.distance(t[i-1],t[i]))>=e);i++)n+=r;var o=new Object;if(i<t.length)var a=_0x2d6822.LinePnt(t[i-1],t[i],e-n);else a=t[i-1];return o.pos=i-1,o.pts=a,o}_execute_1004(e){if(0===this._lineLength){this._controlPoints=this.m_arrPts3D;var t=new _0x11ff81((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2);this._lineLength+=_0x2d6822.distance(t,this._controlPoints[2]);for(var i=3;i<this._controlPoints.length;i++)this._lineLength+=_0x2d6822.distance(this._controlPoints[i-1],this._controlPoints[i])}if(0===e)return this._executeAndRatioIsZero(),!0;var n=[],r=[];t=new _0x11ff81((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2);r.push(t);for(i=2;i<this._controlPoints.length;i++)r.push(this._controlPoints[i].clone());n.push(this._controlPoints[0]),n.push(this._controlPoints[1]);for(var o=this._findPos(this._lineLength*e,r),a=1;a<=o.pos;a++)n.push(r[a]);return n.push(o.pts),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(n),this._animationGOFeature._initialize=!1,!0}_execute_1006(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D,this._animationGOFeature.m_bIsAnimation=!0),0===e)return this._executeAndRatioIsZero(),!0;var t=this.OperateCtrlPts(this._controlPoints);if(4!==t.length)return!1;for(var i=[],n=0;n<t.length;n++){var r=WebGLPlot.Cartesian3.fromDegrees(t[n].x,t[n].y,t[n].z);i.push(r)}var o=i[0],a=i[1],s=i[2],l=i[3],u=_0x2d6822.distance(o,l),c=_0x2d6822.distance(a,s),h=_0x2d6822.LinePnt(o,l,u*e),d=_0x2d6822.LinePnt(a,s,c*e),f=[];return f.push(this.PtsToSpherical(o)),f.push(this.PtsToSpherical(a)),f.push(this.PtsToSpherical(d)),f.push(this.PtsToSpherical(h)),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(f),this._animationGOFeature._initialize=!1,!0}PtsToSpherical(e){var t=_0x1713d3.getInstance({scene:this._scene})._scene.globe.ellipsoid,i=new WebGLPlot.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot.CesiumMath.toDegrees(n.latitude);return new _0x11ff81(WebGLPlot.CesiumMath.toDegrees(n.longitude),r,n.height)}_execute_1002(e){if(0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,this._lineLength=WebGLPlot.polylineDistance(this._controlPoints)),0===e)return this._executeAndRatioIsZero(),!0;var t=this._controlPoints.length,i=Math.ceil(t/3),n=t%3==0?3:t%3;1===n&&(i-=1,n=3,this._controlPoints.pop());var r,o=[];if(3===n)for(var a=1;a<i+1;a++){var s=3*a,l=this._controlPoints[s-3],u=this._controlPoints[s-2],c=this._controlPoints[s-1];if((f=(d=_0x2d6822.distance(l,u))+_0x2d6822.distance(u,c))*e>=d)r=_0x2d6822.LinePnt(u,c,f*e-d),o.push(l),o.push(u),o.push(r);else{r=_0x2d6822.LinePnt(l,u,f*e);var h=_0x2d6822.LinePnt(l,u,d*e);o.push(l),o.push(h),o.push(r)}}else{for(a=1;a<i;a++){var d;s=3*a,l=this._controlPoints[s-3],u=this._controlPoints[s-2],c=this._controlPoints[s-1];if((f=(d=_0x2d6822.distance(l,u))+_0x2d6822.distance(u,c))*e>=d)r=_0x2d6822.LinePnt(u,c,f*e-d),o.push(l),o.push(u),o.push(r);else{r=_0x2d6822.LinePnt(l,u,f*e);h=_0x2d6822.LinePnt(l,u,d*e);o.push(l),o.push(h),o.push(r)}}l=this._controlPoints[t-2],u=this._controlPoints[t-1];var f=_0x2d6822.distance(l,u);r=_0x2d6822.LinePnt(l,u,f*e),o.push(l),o.push(r)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(o),this._animationGOFeature._initialize=!1,!0}_execute_Rect(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=new _0x11ff81((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2),i=Math.abs(this._controlPoints[0].x-this._controlPoints[1].x)/2*e,n=Math.abs(this._controlPoints[0].y-this._controlPoints[1].y)/2*e,r=new _0x11ff81(t.x-i,t.y+n,t.z),o=new _0x11ff81(t.x+i,t.y-n,t.z);return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=[r,o],this._animationGOFeature._initialize=!1,!0}_execute_Circle(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=e*_0x2d6822.distance(this._controlPoints[0],this._controlPoints[1]);if(1===e)this._animationGOFeature._localPoints=[this._controlPoints[0],this._controlPoints[1]];else{var i=new _0x11ff81(this._controlPoints[0].x+t,this._controlPoints[0].y,this._controlPoints[0].z);this._animationGOFeature._localPoints=[this._controlPoints[0],i]}return this._animationGOFeature._initialize=!1,!0}_execute_Kidney(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D),0===e)return this._executeAndRatioIsZero(),!0;var t=[],i=this._controlPoints.length,n=_0x2d6822.getPolygonCenterPt(this._controlPoints);if(null===n)return this._executeAndRatioIsZero(),!0;for(var r=0;r<i;r++){var o=_0x2d6822.distance(n,this._controlPoints[r]),a=o*e;if(a>o)return!1;var s=_0x2d6822.LinePnt(n,this._controlPoints[r],a);t.push(s)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(t),this._animationGOFeature._initialize=!1,!0}_execute_RegularPloygon(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D),this._controlPoints=_0x2d6822.clearNextSamePts(this._controlPoints),0===e)return this._executeAndRatioIsZero(),!0;var t=this._controlPoints.length,i=_0x2d6822.distance(this._controlPoints[0],this._controlPoints[t-1]),n=i*e,r=[];if(n>=i)r=this._controlPoints;else{var o=_0x2d6822.LinePnt(this._controlPoints[0],this._controlPoints[t-1],n);r.push(this._controlPoints[0]);for(var a=1;a<t-1;a++)r.push(this._controlPoints[a]);r.push(o)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(r),this._animationGOFeature._initialize=!1,!0}_execute_Ellipse(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=_0x2d6822.FindPointOnLineByRatio(e,this._controlPoints[0],this._controlPoints[1]),i=_0x2d6822.FindPointOnLineByRatio(e,this._controlPoints[0],this._controlPoints[2]);return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=[this._controlPoints[0],t,i],this._animationGOFeature._initialize=!1,!0}_execute_ArbitraryPolygon(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=this._controlPoints.length,i=_0x2d6822.getPolygonCenterPt(this._controlPoints);if(null===i)return this._executeAndRatioIsZero(),!0;for(var n=[],r=0;r<t;r++){var o=_0x2d6822.distance(i,this._controlPoints[r])*e,a=_0x2d6822.LinePnt(i,this._controlPoints[r],o);n.push(a)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(n),this._animationGOFeature._initialize=!1,!0}_execute_ParallelLine(e){if(0===this._lineLength){this._controlPoints=this.m_arrPts3D;for(var t=2;t<this._controlPoints.length;t++)this._lineLength+=_0x2d6822.distance(this._controlPoints[t-1],this._controlPoints[t])}var i=[],n=[];for(t=1;t<this._controlPoints.length;t++)n.push(this._controlPoints[t]);var r=this._findPos(this._lineLength*e,n);i.push(this._controlPoints[0]);for(t=0;t<=r.pos;t++)i.push(n[t]);return i.push(r.pts),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(i),this._animationGOFeature._initialize=!1,!0}_execute_Polybezier(e){var t=[];if(0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,t=_0x2d6822.generateBeizerPointsNoCtrlPt(this._controlPoints),this._lineLength+=WebGLPlot.polylineDistance(t)),e>=1)return this._animationGOFeature._symbolAlgo=null,this._animationGOFeature.code=590,this._animationGOFeature._localPoints=this._goFeature._localPoints,this._animationGOFeature._initialize=!1,!0;this._animationGOFeature._symbolAlgo=null,this._animationGOFeature.code=24;for(var i=[],n=0;n<this._controlPoints.length;n++)i.push(this._controlPoints[n].z);var r=Math.max.apply({},i),o=[];t=_0x2d6822.generateBeizerPointsNoCtrlPt(this._controlPoints);var a=this._findPos(this._lineLength*e,t);for(n=0;n<=a.pos;n++)o.push(new _0x11ff81(t[n].x,t[n].y,r));return o.push(new _0x11ff81(a.pts.x,a.pts.y,r)),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(o),this._animationGOFeature._initialize=!1,!0}_execute_CurveEight(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);for(var t=_0x2d6822.getPolygonCenterPt(this._controlPoints),i=[],n=0;n<this._controlPoints.length;n++){var r=_0x2d6822.distance(t,this._controlPoints[n])*e,o=_0x2d6822.LinePnt(t,this._controlPoints[n],r);i.push(o)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(i),this._animationGOFeature._initialize=!1,!0}_executeAndRatioIsZero(){this._animationGOFeature._localPoints=[]}resetAnimationFeature(e){if(_0x2688ba.prototype.resetAnimationFeature.call(this,e),this._lineLength=0,this._controlPoints=[],this.m_arrPts3D=[],this._animationGOFeature._localPoints=[],this._animationGOFeature.code=this._goFeature.code,this.goFeatureLocalPts.length>=2)for(var t=0;t<this.goFeatureLocalPts.length;t++)this._animationGOFeature._localPoints.push(this.goFeatureLocalPts[t].clone())}OperateCtrlPts(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i].clone());var n=t.length;if(3==n){var r=new _0x11ff81;(r=_0x2d6822.getPointsByTrapezoid(1,t[0].x,t[0].y,t[1].x,t[1].y,t[2].x,t[2].y,r)).z=t[2].z,t.push(r)}if(n>4&&t.splice(4,n-4),_0x2d6822.isRight(t[2],t[0],t[1])){var o=t[0].clone();t[0]=t[1].clone(),t[1]=o}if(!_0x2d6822.pointIsRightToVerticle(t[0],t[1],t[2])){o=t[2].clone();t[2]=t[3].clone(),t[3]=o}return t}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.startScale=this.startScale,e.endScale=this.endScale,e}fromJSONData(e){this.fromBaseJSONData(e),this.startScale=e.startScale,this.endScale=e.endScale}}Object.defineProperties(_0x4a4ca0.prototype,{startScale:{get:function(){return this._startScale},set:function(e){e!=this._startScale&&(this._startScale=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endScale:{get:function(){return this._endScale},set:function(e){e!=this._endScale&&(e>=1&&(e=1),this._endScale=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});const _0x2109aa=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x19f03c=_0x2109aa(void 0,(function(){return _0x19f03c.toString().search("(((.+)+)+)+$").toString().constructor(_0x19f03c).search("(((.+)+)+)+$")}));_0x19f03c();class _0xa4850 extends _0x4a4ca0{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,1),e.endScale=WebGLPlot.defaultValue(e.endScale,0);const t=e.startScale;e.startScale<e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_REDUCE_EXP}}var _0x1efc67=(_0x48c062=!0,function(e,t){var i=_0x48c062?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x48c062=!1,i}),_0x594716=_0x1efc67(void 0,(function(){return _0x594716.toString().search("(((.+)+)+)+$").toString().constructor(_0x594716).search("(((.+)+)+)+$")})),_0x48c062;_0x594716();class _0x27e0a8 extends _0x4a4ca0{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,0),e.endScale=WebGLPlot.defaultValue(e.endScale,1);const t=e.startScale;e.startScale>e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e),this._animationGrowEXP_isFirstExecute=!0}getGOAnimationType(){return _0x304306.ANIMATION_GROW_EXP}showAnimationFeature(e){null!==this._animationGOFeature&&null!==this._animationGOFeature._symbolStyle&&(this.resetAnimationFeature(e),this._animationGOFeature.display=!1),null!==this._goFeature&&null!==this._goFeature._symbolStyle&&(this._goFeature.display=!e,this._goFeature._initialize=!1),e&&(this._isSendBegin=!0)}execute(){if(this._animationGOFeature._localPoints.length<2){var e=this.goFeatureLocalPts;if(e.length<2)return!1;this._animationGOFeature._localPoints=e}if(!this.canExecute())return!1;this._animationGrowEXP_isFirstExecute&&(this._animationGOFeature.display=!0,this._animationGrowEXP_isFirstExecute=!1);var t=(new Date).getTime();if(this._lastDrawTime>0&&t-this._timeSpace<this._lastDrawTime)return!1;var i=this._startScale+this._ratio*(this._endScale-this._startScale);return i>=1&&(i=1),this._lastDrawTime=t,this._executeAnimation(i)}}var _0x57f22=(_0x11336f=!0,function(e,t){var i=_0x11336f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x11336f=!1,i}),_0x1a6071=_0x57f22(void 0,(function(){return _0x1a6071.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a6071).search("(((.+)+)+)+$")})),_0x11336f;_0x1a6071();class _0x448584 extends _0x43b269{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!0,e.showEffect=!0,e.duration=WebGLPlot.defaultValue(e.duration,3),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_MOVEIN_EXP}}var _0x215478=(_0x2a6291=!0,function(e,t){var i=_0x2a6291?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a6291=!1,i}),_0x5a285c=_0x215478(void 0,(function(){return _0x5a285c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a285c).search("(((.+)+)+)+$")})),_0x2a6291;_0x5a285c();class _0x365699 extends _0x43b269{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!1,e.showEffect=!0,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_MOVEOUT_EXP}}var _0x207b23=(_0xc83fb9=!0,function(e,t){var i=_0xc83fb9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc83fb9=!1,i}),_0x3f6a39=_0x207b23(void 0,(function(){return _0x3f6a39.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f6a39).search("(((.+)+)+)+$")})),_0xc83fb9;_0x3f6a39();class _0x4c816f extends _0x43b269{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!1,e.showEffect=!1,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_HIDE_EXP}}var _0x1ce01a=(_0x1b4f03=!0,function(e,t){var i=_0x1b4f03?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b4f03=!1,i}),_0x1575a0=_0x1ce01a(void 0,(function(){return _0x1575a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1575a0).search("(((.+)+)+)+$")})),_0x1b4f03;_0x1575a0();class _0x33f59e extends _0x43b269{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!0,e.showEffect=!1,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_SHOW_EXP}}var _0x52e52d=(_0x2a055f=!0,function(e,t){var i=_0x2a055f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a055f=!1,i}),_0x4b9c68=_0x52e52d(void 0,(function(){return _0x4b9c68.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b9c68).search("(((.+)+)+)+$")})),_0x2a055f;_0x4b9c68();class _0x426167 extends _0x381298{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x59cef0.POLYLINE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_BROKENLINE_EXP}}var _0x4954e3=(_0xc0176c=!0,function(e,t){var i=_0xc0176c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc0176c=!1,i}),_0x4680f3=_0x4954e3(void 0,(function(){return _0x4680f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x4680f3).search("(((.+)+)+)+$")})),_0xc0176c;_0x4680f3();class _0x2c9321 extends _0x381298{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x59cef0.CURVE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_CURVE_EXP}}const _0x467843=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x297814=_0x467843(void 0,(function(){return _0x297814.toString().search("(((.+)+)+)+$").toString().constructor(_0x297814).search("(((.+)+)+)+$")}));_0x297814();class _0x4f5528 extends _0x381298{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x59cef0.POLYLINE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_WAY_EXP}}Object.defineProperties(_0x4f5528.prototype,{wayPoints:{get:function(){return this._wayPoints},set:function(e){if(e instanceof _0x4381c6){let t=[];for(let i=0;i<e._symbolAlgo.components.length;i++){const n=e._symbolAlgo.components[i];t=t.concat(n.shapePts)}this._wayPoints=t}}}});var _0x1dbb12=(_0x4a680d=!0,function(e,t){var i=_0x4a680d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a680d=!1,i}),_0xdf760b=_0x1dbb12(void 0,(function(){return _0xdf760b.toString().search("(((.+)+)+)+$").toString().constructor(_0xdf760b).search("(((.+)+)+)+$")})),_0x4a680d;_0xdf760b();class _0x19c7e4 extends _0x306baa{constructor(e){(e=WebGLPlot.defaultValue(e,{})).duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_BLINK_EXP}}const _0x21ecf1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5a4ce7=_0x21ecf1(void 0,(function(){return _0x5a4ce7.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a4ce7).search("(((.+)+)+)+$")}));_0x5a4ce7();class _0x440bb3 extends _0x1c88c7{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,0),e.endScale=WebGLPlot.defaultValue(e.endScale,1);const t=e.startScale;e.startScale>e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_ZOOMIN_EXP}}const _0x396f4f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4e0283=_0x396f4f(void 0,(function(){return _0x4e0283.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e0283).search("(((.+)+)+)+$")}));_0x4e0283();class _0x443e7e extends _0x1c88c7{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,1),e.endScale=WebGLPlot.defaultValue(e.endScale,0);const t=e.startScale;e.startScale<e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_ZOOMOUT_EXP}}var _0x5f1e73=(_0x43c5c2=!0,function(e,t){var i=_0x43c5c2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43c5c2=!1,i}),_0x826355=_0x5f1e73(void 0,(function(){return _0x826355.toString().search("(((.+)+)+)+$").toString().constructor(_0x826355).search("(((.+)+)+)+$")})),_0x43c5c2;_0x826355();class GOAnimationManagerBase{constructor(e){this.goAnimations=[],this.curPlayGroup=0}preView(){if(0!==this.goAnimations.length)for(var e=this.getAllGroups(),t=0;t<e.length;t++){var i=e[t];for(let e=0;e<i.length;e++)i[e].play()}}play(e){if(0!==this.goAnimations.length){void 0!==e&&(this.curPlayGroup=this.getAnimationGroupByName(e).index),this.isPlay()&&this.curPlayGroup--;var t=this.getAllGroups();this.curPlayGroup>t.length-1&&(this.curPlayGroup=0);for(var i=t[this.curPlayGroup],n=0;n<i.length;n++){i[n].play()}this.curPlayGroup++}}stop(){if(0!==this.goAnimations.length){for(var e=0;e<this.goAnimations.length;e++)this.goAnimations[e].stop();this.curPlayGroup=0}}pause(){if(0!==this.goAnimations.length){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x5140b5.PLAYING?(e=!0,this.goAnimations[t].pause()):this.goAnimations[t].stop();e&&this.curPlayGroup>0&&this.curPlayGroup--}}reset(){if(0!==this.goAnimations.length){for(var e=0;e<this.goAnimations.length;e++)this.goAnimations[e].reset();this.curPlayGroup=0}}isPlay(){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x5140b5.PLAYING&&(e=!0);return e}isPause(){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x5140b5.PAUSE&&(e=!0);return e}getAnimationTimeLength(e,t){var i=!1,n=0,r=0;for(let u=e-1;u>=0;u--){var o=t[u],a=o.startTime+o.duration;if(a>r&&(r=a),o.animationPlayType===_0x28a0bd.PLAYAFTERLASTONE){i=!0;for(let e=u-1;e>=0;e--){var s=t[e],l=s.startTime+s.duration;l>n&&(n=l)}}}return{isExist:i,length1:n,length2:r}}getAllGroups(){var e=[];for(let n=0;n<this.goAnimations.length;n++){var t=this.goAnimations[n];if(t.animationPlayType===_0x28a0bd.PLAYFROMNOW||0===n){var i=[];i.push(t),e.push(i)}else e[e.length-1].push(t)}return e}getAnimationGroup(e){var t=null,i=0,n=this.getAllGroups();for(let o=0;o<n.length;o++){var r=n[o];for(let n=0;n<r.length;n++)if(r[n].name===e.name){t=r,i=o;break}}return{index:i,group:t}}getAnimationGroupByName(e){var t=null,i=0,n=this.getAllGroups();for(let o=0;o<n.length;o++){var r=n[o];for(let n=0;n<r.length;n++)if(r[n].name===e){t=r,i=o;break}}return{index:i,group:t}}changeAnimationTime(e){if(!e||!this.getAnimationGroup(e).group)return!1;var t=this.getAnimationGroup(e).group;this.getAnimationGroup(e).index;var i=t.indexOf(e);if(e.animationPlayType===_0x28a0bd.PLAYFROMNOW)e.startTime=e.delayTime;else if(e.animationPlayType===_0x28a0bd.PLAYSAMELASTONE||e.animationPlayType===_0x28a0bd.UNKNOWN)(n=this.getAnimationTimeLength(i,t)).isExist?e.startTime=n.length1+e.delayTime:e.startTime=e.delayTime;else if(e.animationPlayType===_0x28a0bd.PLAYAFTERLASTONE){var n=this.getAnimationTimeLength(i,t);e.startTime=n.length2+e.delayTime}}moveAnimation(e,t){if(!(t<0||t>this.goAnimations.length)){var i=this.goAnimations.indexOf(e);if(i!==t){this.goAnimations=this.move(i,t);for(var n=0;n<this.goAnimations.length;n++){e=this.goAnimations[n];this.changeAnimationTime(e)}}}}move(e,t){var i=[].concat(this.goAnimations);return i.splice(t,0,i.splice(e,1)[0]),i}getAnimationDelayTime(e){if(!e||!this.getAnimationGroup(e).group)return!1;var t=0,i=this.getAnimationGroup(e).group;this.getAnimationGroup(e).index;var n=i.indexOf(e);if(e.animationPlayType===_0x28a0bd.PLAYFROMNOW||0===n)t=e.startTime;else if(e.animationPlayType===_0x28a0bd.PLAYAFTERLASTONE){var r=this.getAnimationTimeLength(n,i);t=e.startTime-r.length2}else if(e.animationPlayType===_0x28a0bd.PLAYSAMELASTONE||e.animationPlayType===_0x28a0bd.UNKNOW){var o=-1;for(let e=n;e>=0;e--){if(i[e].animationPlayType===_0x28a0bd.PLAYAFTERLASTONE){o=e;break}}if(-1===o)t=e.startTime;else{r=this.getAnimationTimeLength(o,i);t=e.startTime-r.length2}}return t}}var _0x1f469f=(_0x41711=!0,function(e,t){var i=_0x41711?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41711=!1,i}),_0x2f4371=_0x1f469f(void 0,(function(){return _0x2f4371.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f4371).search("(((.+)+)+)+$")})),_0x41711;_0x2f4371();const _0x46d265=new Map;class _0x1713d3 extends GOAnimationManagerBase{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._serverUrl=WebGLPlot.defaultValue(e.serverUrl,""),this._scene=WebGLPlot.defaultValue(e.scene,null),this._openEvoFileCompleted=new WebGLPlot.Event,this._openEvoFileFailed=new WebGLPlot.Event,this._saveEvoFileCompleted=new WebGLPlot.Event,this._saveEvoFileFailed=new WebGLPlot.Event,this.setScene(this._scene),this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},e.options&&e.options.serviceParams&&_0x2d6822.extend(this.options,e.options)}static getInstance(e){let t;return e.scene&&(t=_0x46d265.get(e.scene._plottingID)),WebGLPlot.defined(e)&&!WebGLPlot.defined(t)&&(t=new _0x1713d3(e),_0x46d265.set(e.scene._plottingID,t)),t}createGOAnimation(e,t,i,n=!0,r=_0x28a0bd.UNKNOWN){if(e===_0x304306.ANIMATION_WAY_GROUP){Array.isArray(i)||(i=[i]);for(let e=0;e<i.length;e++)if(!_0x2d6822.isSymbolDot(i[e]._symbolType))return null;return(o=this.createGOAnimationByType(e,t)).setGOFeatures(this,i)?(this.goAnimations.push(o),r!==_0x28a0bd.UNKNOWN&&(o._animationPlayType=r),o):null}return WebGLPlot.defined(i)&&this.isCanCreateAnimation(e,i.symbolType)?null===(o=this.createGOAnimationByType(e,t))||null==i||i.symbolType===_0x18bc2f.GROUPOBJECT||null===i||!WebGLPlot.defined(i)||0===i._libID&&i._code===_0x18bc2f.SYMBOL_TEXT?null:o.setGOFeature(this,i)?(this.goAnimations.push(o),r!==_0x28a0bd.UNKNOWN&&(o._animationPlayType=r),n&&_0x47a70a.getInstance().animationCreated.raiseEvent(o),o):null:null;var o}setScene(e){this._goAnimationLayer=new _0x3ff6b7("animation",e);var t=!1;if(WebGLPlot.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot.PlotLayers)e.plotLayers.goAnimationLayer=this._goAnimationLayer,t=!0;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot.defined(r)&&r instanceof WebGLPlot.PlotLayers){r.goAnimationLayer=this._goAnimationLayer,t=!0;break}}if(!t){var o=new WebGLPlot.PlotLayers;o.goAnimationLayer=this._goAnimationLayer,e.primitives.add(o),e.plotLayers=o}}createGOAnimationByType(e,t){if(null===t||""===t||null===this._goAnimationLayer||null!==this.findGOAnimationByName(t))return null;var i=null;switch(e){case _0x304306.ANIMATION_WAY:i=new _0x381298;break;case _0x304306.ANIMATION_BLINK:i=new _0x306baa;break;case _0x304306.ANIMATION_ATTRIBUTE:i=new _0x45edd9;break;case _0x304306.ANIMATION_SHOW:i=new _0x43b269;break;case _0x304306.ANIMATION_ROTATE:i=new _0x1b6a94;break;case _0x304306.ANIMATION_SCALE:i=new _0x1c88c7;break;case _0x304306.ANIMATION_GROW:i=new _0x4a4ca0;break;case _0x304306.ANIMATION_WAY_GROUP:i=new _0x1c2b25;break;case _0x304306.ANIMATION_REDUCE_EXP:i=new _0xa4850;break;case _0x304306.ANIMATION_GROW_EXP:i=new _0x27e0a8;break;case _0x304306.ANIMATION_MOVEIN_EXP:i=new _0x448584;break;case _0x304306.ANIMATION_MOVEOUT_EXP:i=new _0x365699;break;case _0x304306.ANIMATION_HIDE_EXP:i=new _0x4c816f;break;case _0x304306.ANIMATION_SHOW_EXP:i=new _0x33f59e;break;case _0x304306.ANIMATION_BROKENLINE_EXP:i=new _0x426167;break;case _0x304306.ANIMATION_CURVE_EXP:i=new _0x2c9321;break;case _0x304306.ANIMATION_WAY_EXP:i=new _0x4f5528;break;case _0x304306.ANIMATION_BLINK_EXP:i=new _0x19c7e4;break;case _0x304306.ANIMATION_ZOOMIN_EXP:i=new _0x440bb3;break;case _0x304306.ANIMATION_ZOOMOUT_EXP:i=new _0x443e7e;break;default:return null}return null!==i&&(i._name=t,i._scene=this._scene),i}findGOAnimationByName(e){if(null===this.goAnimations||null===e||""===e)return null;for(var t=null,i=0;i<this.goAnimations.length;i++)if(this.goAnimations[i].name===e){t=this.goAnimations[i];break}return t}findGOAnimationByFeature(e){var t=[];if(0===this.goAnimations.length||null===e||!WebGLPlot.defined(e))return t;for(var i=this.goAnimations.length,n=0;n<i;n++)if(this.goAnimations[n]._goFeature._id===e._id){var r=this.goAnimations[n];t.push(r)}return t}findGOAnimationsByUuid(e){if(0===this.goAnimations.length||"undefined"===e||null===e)return[];var t=this.getFeatureByID(e);return this.findGOAnimationByFeature(t)}execute(){if(0===this.goAnimations.length)return!1;for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].execute()&&(e=!0);return e}removeGOAnimationByName(e){if(0===this.goAnimations.length||null===e||""===e)return!1;var t=this.findGOAnimationByName(e);return this.removeGOAnimation(t)}removeGOAnimationByFeature(e){if(0===this.goAnimations.length||null===e||!WebGLPlot.defined(e))return!1;let t=[];for(var i=[],n=this.goAnimations.length,r=0;r<n;r++){var o=this.goAnimations[r];if(o._goFeature&&o._goFeature._id!==e._id)i.push(o);else if(o._goFeature&&o._goFeature._id===e._id){for(var a=this.getAnimationGroup(o).group,s=this.getAnimationGroup(o).index+1;s<a.length;s++)this.changeAnimationTime(a[s]);t.push(o.name),o.destroy()}}return this.goAnimations=i,_0x47a70a.getInstance().animationDeleted.raiseEvent(t),!0}removeGOAnimation(e,t){if(0===this.goAnimations.length||null===e)return!1;void 0===t&&(t=!0);let i=e.name;for(var n=0;n<this.goAnimations.length;n++)if(this.goAnimations[n]===e){e.reset();var r=this.getAnimationGroup(e).group,o=this.getAnimationGroup(e).index;if(e.destroy(),e=null,this.goAnimations.splice(n,1),r.splice(o,1),null!==r){for(var a=o+1;a<r.length;a++){var s=r[a];this.changeAnimationTime(s)}break}}return t&&_0x47a70a.getInstance().animationDeleted.raiseEvent([i]),!0}removeAllGOAnimation(){if(0===this.goAnimations.length)return;let e=[];for(var t=0;t<this.goAnimations.length;t++)e.push(this.goAnimations[t].name),this.removeGOAnimation(this.goAnimations[t],!1);_0x47a70a.getInstance().animationDeleted.raiseEvent(e),this.goAnimations=[]}getPlottingLayers(){for(var e=[],t=this._scene,i=_0x2d6822.getPlotLayers(t),n=0;n<i._layerQueue.length;++n){var r=i.findByIndex(n);r instanceof _0x267b40&&e.push(r)}return e}getFeatureByID(e){for(var t=this.getPlottingLayers(),i=0;i<t.length;i++){var n=t[i].getFeatureByUuid(e);if(n)return n}}getAllAnimations(){return this.goAnimations}releaseSelection(){for(var e=this.getPlottingLayers(),t=0;t<e.length;t++)null!=e[t]._plottingEdit&&e[t]._plottingEdit.releaseSelection()}getJSONData(){for(var e={animations:[]},t=0;t<this.goAnimations.length;t++)e.animations.push(this.goAnimations[t].getJSONData());return e}fromJSONData(e){let t=0;if(e.AnimationGroups)for(var i=0,n=0;n<e.AnimationGroups.length;n++){for(var r=e.AnimationGroups[n],o=0,a=0;a<r.Animations.length;a++){var s=r.Animations[a],l=s.startTime+s.duration;o=l>o?l:o}this.Analysis(r.Animations,i),i+=o,t+=r.Animations.length}else t=e.animations.length,this.Analysis(e.animations,0);_0x47a70a.getInstance().animationJsonEnd.raiseEvent({animationNumber:t})}Analysis(e,t){for(var i=0;i<e.length;i++){var n=e[i],r="";n.goLayerUuid?r=n.goLayerUuid:n.goFeatureUuid&&(r=n.goFeatureUuid);var o=this.getFeatureByID(r),a=n.name,s=n.type,l=n.playType;if(o&&a&&-1!==s){var u=this.createGOAnimation(s,a,o,l);null!==u&&(n.startTime+=t,u.fromJSONData(n))}}}saveEvoFile(e,t){var i=this;function n(e){var t,n;e?i._saveEvoFileCompleted.raiseEvent(n):i._saveEvoFileFailed.raiseEvent(t)}var r=WebGLPlot.smlFileService(i._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="POST",o.sitData=this.getJSONData(),o.smlFileName=e,o.isCover=t,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}}openEvoFileOnServer(e){var t=this;var i=WebGLPlot.smlFileService(this._serverUrl,this.options.serviceParams);if(i){var n=i.editSmlFileParams;n.method="GET",n.smlFileName=e,i.smlFileService.editSMLFile(n,(function(e){var i;e.result&&e.result.succeed?(i=e.result,t.fromJSONData(i),t._openEvoFileCompleted.raiseEvent()):t._openEvoFileFailed.raiseEvent()}),this)}}buildUrl(e){var t=this._serverUrl,i=t.substr(t.length-1,1);return t+="/"===i?"smlInfos/":"/smlInfos/",t+=e+".json"}isCanCreateAnimation(e,t){return!(t===_0x18bc2f.SYMBOL_DOT&&e===_0x304306.ANIMATION_GROW||t===_0x18bc2f.SYMBOL_ALGO&&e===_0x304306.ANIMATION_SCALE)}}var _0x443c5f=(_0x36cb9a=!0,function(e,t){var i=_0x36cb9a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x36cb9a=!1,i}),_0x13af00=_0x443c5f(void 0,(function(){return _0x13af00.toString().search("(((.+)+)+)+$").toString().constructor(_0x13af00).search("(((.+)+)+)+$")})),_0x36cb9a;function _0x57693f(){}_0x13af00(),_0x57693f.extend=function(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},_0x57693f.copy=function(e,t){var i;if(e=e||{},t)for(var n in e)typeof(i=t[n])<"u"&&(e[n]=i)},_0x57693f.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"==typeof e[t]&&e[t]instanceof Array){for(var i in e[t])e[t][i].destroy&&e[t][i].destroy();e[t].length=0}else"object"==typeof e[t]&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},_0x57693f.getElement=function(){for(var e=[],t=0,i=arguments.length;t<i;t++){var n=arguments[t];if("string"==typeof n&&(n=document.getElementById(n)),1===arguments.length)return n;e.push(n)}return e},_0x57693f.isElement=function(e){return!(!e||1!==e.nodeType)},_0x57693f.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},_0x57693f.removeItem=function(e,t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1);return e},_0x57693f.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},_0x57693f.modifyDOMElement=function(e,t,i,n,r,o,a,s){t&&(e.id=t),i&&(e.style.left=i.x+"px",e.style.top=i.y+"px"),n&&(e.style.width=n.w+"px",e.style.height=n.h+"px"),r&&(e.style.position=r),o&&(e.style.border=o),a&&(e.style.overflow=a),parseFloat(s)>=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},_0x57693f.applyDefaults=function(e,t){e=e||{};var i="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!i&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!i&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},_0x57693f.getParameterString=function(e){var t=[];for(var i in e){var n=e[i];if(null!=n&&"function"!=typeof n){var r;if("object"==typeof n&&n.constructor===Array){for(var o,a=[],s=0,l=n.length;s<l;s++)o=n[s],a.push(encodeURIComponent(o??""));r=a.join(",")}else r=encodeURIComponent(n);t.push(encodeURIComponent(i)+"="+r)}}return t.join("&")},_0x57693f.urlAppend=function(e,t){var i=e;if(t){var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i},_0x57693f.DEFAULT_PRECISION=14,_0x57693f.toFloat=function(e,t){return null==t&&(t=_0x57693f.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},_0x57693f.rad=function(e){return e*Math.PI/180},_0x57693f.lastSeqID=0,_0x57693f.createUniqueID=function(e){return null==e&&(e="id_"),_0x57693f.lastSeqID+=1,e+_0x57693f.lastSeqID},_0x57693f.Browser=function(){var e,t="",i="",n="pc",r=navigator.userAgent.toLowerCase();return r.indexOf("msie")>-1||r.indexOf("trident")>-1&&r.indexOf("rv")>-1?(t="msie",e=r.match(/msie ([\d.]+)/)||r.match(/rv:([\d.]+)/)):r.indexOf("chrome")>-1?(t="chrome",e=r.match(/chrome\/([\d.]+)/)):r.indexOf("firefox")>-1?(t="firefox",e=r.match(/firefox\/([\d.]+)/)):r.indexOf("opera")>-1?(t="opera",e=r.match(/version\/([\d.]+)/)):r.indexOf("safari")>-1&&(t="safari",e=r.match(/version\/([\d.]+)/)),i=e?e[1]:"",r.indexOf("ipad")>-1||r.indexOf("ipod")>-1||r.indexOf("iphone")>-1?n="apple":r.indexOf("android")>-1&&(i=(e=r.match(/version\/([\d.]+)/))?e[1]:"",n="android"),{name:t,version:i,device:n}},_0x57693f.getBrowser=function(){var e,t="",i="",n="pc",r=navigator.userAgent.toLowerCase();return r.indexOf("msie")>-1||r.indexOf("trident")>-1&&r.indexOf("rv")>-1?(t="msie",e=r.match(/msie ([\d.]+)/)||r.match(/rv:([\d.]+)/)):r.indexOf("chrome")>-1?(t="chrome",e=r.match(/chrome\/([\d.]+)/)):r.indexOf("firefox")>-1?(t="firefox",e=r.match(/firefox\/([\d.]+)/)):r.indexOf("opera")>-1?(t="opera",e=r.match(/version\/([\d.]+)/)):r.indexOf("safari")>-1&&(t="safari",e=r.match(/version\/([\d.]+)/)),i=e?e[1]:"",r.indexOf("ipad")>-1||r.indexOf("ipod")>-1||r.indexOf("iphone")>-1?n="apple":r.indexOf("android")>-1&&(i=(e=r.match(/version\/([\d.]+)/))?e[1]:"",n="android"),{name:t,version:i,device:n}},_0x57693f.isSupportCanvas=function(){var e=!0,t=_0x57693f.getBrowser();return document.createElement("canvas").getContext?("firefox"===t.name&&parseFloat(t.version)<5&&(e=!1),"safari"===t.name&&parseFloat(t.version)<4&&(e=!1),"opera"===t.name&&parseFloat(t.version)<10&&(e=!1),"msie"===t.name&&parseFloat(t.version)<9&&(e=!1)):e=!1,e},_0x57693f.supportCanvas=function(){return _0x57693f.isSupportCanvas},_0x57693f.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l},_0x57693f.calculateDpi=function(e,t,i,n,r){if(e&&t&&i){var o,a=1e4,s=e.getWidth(),l=e.getHeight(),u=t.w,c=t.h;if(r=r||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){let e=s/u,t=l/c;o=254/(e>t?e:t)/i/(2*Math.PI*r/360)/a}else{o=254/(s/u)/i/a}return o}},_0x57693f.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var i=[],n=0,r=t.length;n<r;n++)i.push(_0x57693f.toJSON(t[n]));return"["+i.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){let e=[];for(let i=0,n=t.length;i<n;i++)e.push(_0x57693f.toJSON(t[i]));return"["+e.join(",")+"]"}let e=[];for(let i in t)"function"!=typeof t[i]&&"CLASS_NAME"!==i&&"parent"!==i&&e.push("'"+i+"':"+_0x57693f.toJSON(t[i]));return e.length>0?"{"+e.join(",")+"}":"{}"}return t.toString()}},_0x57693f.getScaleFromResolutionDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r:-1},_0x57693f.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},_0x57693f.copyAttributes=function(e,t){if(e=e||{},t)for(var i in t){var n=t[i];void 0!==n&&"CLASS_NAME"!==i&&"function"!=typeof n&&(e[i]=n)}return e},_0x57693f.copyAttributesWithClip=function(e,t,i){if(e=e||{},t)for(var n in t){var r=!1;if(i&&i.length)for(var o=0,a=i.length;o<a;o++)if(n===i[o]){r=!0;break}if(!0!==r){var s=t[n];void 0!==s&&"CLASS_NAME"!==n&&"function"!=typeof s&&(e[n]=s)}}return e},_0x57693f.cloneObject=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date){let t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.slice(0);if(e instanceof Object){let i={};for(var t in e)e.hasOwnProperty(t)&&(i[t]=_0x57693f.cloneObject(e[t]));return i}throw new Error("Unable to copy obj! Its type isn't supported.")},_0x57693f.getTextBounds=function(e,t,i){document.body.appendChild(i),i.style.width="auto",i.style.height="auto",e.fontSize&&(i.style.fontSize=e.fontSize),e.fontFamily&&(i.style.fontFamily=e.fontFamily),e.fontWeight&&(i.style.fontWeight=e.fontWeight),i.style.position="relative",i.style.visibility="hidden",i.style.display="inline-block",i.innerHTML=t;var n=i.clientWidth,r=i.clientHeight;return document.body.removeChild(i),{textWidth:n,textHeight:r}},_0x57693f.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=Util.toJSON(e[t]));var i=encodeURIComponent(e[t]);this.queryValues.push(i)}},issue:function(e){for(var t=this,i=t.getUid(),n=e.url,r=[],o=new Promise((function(e){t.supermap_callbacks[i]=function(n){delete t.supermap_callbacks[i],e(n)}})),a=n,s=0,l=t.queryKeys?t.queryKeys.length:0,u=0;u<l;u++)if(a.length+t.queryKeys[u].length+2>=t.limitLength){if(0==s)return!1;r.push(a),a=n,s=0,u--}else if(a.length+t.queryKeys[u].length+2+t.queryValues[u].length>t.limitLength)for(var c=t.queryValues[u];c.length>0;){var h=t.limitLength-a.length-t.queryKeys[u].length-2;a.indexOf("?")>-1?a+="&":a+="?";var d=c.substring(0,h);"%"===d.substring(h-1,h)?(h-=1,d=c.substring(0,h)):"%"===d.substring(h-2,h-1)&&(h-=2,d=c.substring(0,h)),a+=t.queryKeys[u]+"="+d,c=c.substring(h),d.length>0&&(r.push(a),a=n,s=0)}else s++,a.indexOf("?")>-1?a+="&":a+="?",a+=t.queryKeys[u]+"="+t.queryValues[u];return r.push(a),t.send(r,"Util.RequestJSONPPromise.supermap_callbacks["+i+"]",e&&e.proxy),o},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,i){var n=e.length;if(n>0)for(var r=(new Date).getTime(),o=0;o<n;o++){var a=e[o];a.indexOf("?")>-1?a+="&":a+="?",a+="sectionCount="+n,a+="§ionIndex="+o,a+="&jsonpUserID="+r,i&&(a=decodeURIComponent(a),a=i+encodeURIComponent(a)),fetchJsonp(a,{jsonpCallbackFunction:t,timeout:3e4})}},GET:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings(e.params),t.issue(e)},POST:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)},PUT:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)},DELETE:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)}},_0x57693f.urlPathAppend=function(e,t){let i=e;if(!t)return i;0===t.indexOf("/")&&(t=t.substring(1));const n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),i=""+n[0]+t+(n.length>1?"?"+n[1]:""),i};var _0x4f2fe2={observers:!1,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(e){return e.target||e.srcElement},isSingleTouch:function(e){return e.touches&&1===e.touches.length},isMultiTouch:function(e){return e.touches&&e.touches.length>1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var i=_0x4f2fe2.element(e);i.parentNode&&(!i.tagName||i.tagName.toUpperCase()!=t.toUpperCase());)i=i.parentNode;return i},observe:function(e,t,i,n){var r,o=(r=!0,function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}),a=o(this,(function(){return a.toString().search("(((.+)+)+)+$").toString().constructor(a).search("(((.+)+)+)+$")}));a();var s=_0x57693f.getElement(e);if(n=n||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||s.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!s._eventCacheID){var l="eventCacheID_";s.id&&(l=s.id+"_"+l),s._eventCacheID=_0x57693f.createUniqueID(l)}var u=s._eventCacheID;this.observers[u]||(this.observers[u]=[]),this.observers[u].push({element:s,name:t,observer:i,useCapture:n}),s.addEventListener?s.addEventListener(t,i,n):s.attachEvent&&s.attachEvent("on"+t,i)},stopObservingElement:function(e){var t=_0x57693f.getElement(e)._eventCacheID;this._removeElementObservers(_0x4f2fe2.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var i=e[t],n=new Array(i.element,i.name,i.observer,i.useCapture);_0x4f2fe2.stopObserving.apply(this,n)}},stopObserving:function(e,t,i,n){n=n||!1;var r=_0x57693f.getElement(e),o=r._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||r.detachEvent)&&(t="keydown");var a=!1,s=_0x4f2fe2.observers[o];if(s)for(var l=0;!a&&l<s.length;){var u=s[l];if(u.name===t&&u.observer===i&&u.useCapture===n){s.splice(l,1),0==s.length&&delete _0x4f2fe2.observers[o],a=!0;break}l++}return a&&(r.removeEventListener?r.removeEventListener(t,i,n):r&&r.detachEvent&&r.detachEvent("on"+t,i)),a},unloadCache:function(){if(_0x4f2fe2&&_0x4f2fe2.observers){for(var e in _0x4f2fe2.observers){var t=_0x4f2fe2.observers[e];_0x4f2fe2._removeElementObservers.apply(this,[t])}_0x4f2fe2.observers=!1}},CLASS_NAME:"SuperMap.PlotEvent"};_0x4f2fe2.observe(window,"unload",_0x4f2fe2.unloadCache,!1);var _0x26bdcc=(_0xfb7a6c=!0,function(e,t){var i=_0xfb7a6c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xfb7a6c=!1,i}),_0x1bca5b=_0x26bdcc(void 0,(function(){return _0x1bca5b.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bca5b).search("(((.+)+)+)+$")})),_0xfb7a6c;_0x1bca5b();class _0x3d7456{constructor(e,t,i,n,r){if(this.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"],this.listeners={},this.object=e,this.element=null,this.eventTypes=[],this.eventHandler=null,this.fallThrough=n,this.includeXY=!1,this.extensions={},this.extensionCount={},this.clearMouseListener=null,this.extend(this,r),null!=i)for(var o=0,a=i.length;o<a;o++)this.addEventType(i[o]);null!=t&&this.attachToElement(t),this.CLASS_NAME="SuperMap.Events"}destroy(){for(var e in this.extensions)"boolean"!=typeof this.extensions[e]&&this.extensions[e].destroy();this.extensions=null,this.element&&(_0x4f2fe2.stopObservingElement(this.element),this.element.hasScrollEvent&&_0x4f2fe2.stopObserving(window,"scroll",this.clearMouseListener)),this.element=null,this.listeners=null,this.object=null,this.eventTypes=null,this.fallThrough=null,this.eventHandler=null}addEventType(e){this.listeners[e]||(this.eventTypes.push(e),this.listeners[e]=[])}attachToElement(e){this.element?_0x4f2fe2.stopObservingElement(this.element):(this.eventHandler=FunctionExt.bindAsEventListener(this.handleBrowserEvent,this),this.clearMouseListener=FunctionExt.bind(this.clearMouseCache,this)),this.element=e;for(var t=0,i=this.BROWSER_EVENTS.length;t<i;t++){var n=this.BROWSER_EVENTS[t];this.addEventType(n),_0x4f2fe2.observe(e,n,this.eventHandler)}_0x4f2fe2.observe(e,"dragstart",_0x4f2fe2.stop)}on(e){for(var t in e)"scope"!==t&&void 0!==e[t]&&this.register(t,e.scope,e[t])}register(e,t,i,n){if(e in _0x3d7456&&!this.extensions[e]&&(this.extensions[e]=new _0x3d7456[e](this)),null!=i&&-1!==_0x57693f.indexOf(this.eventTypes,e)){null==t&&(t=this.object);var r=this.listeners[e];r||(r=[],this.listeners[e]=r,this.extensionCount[e]=0);var o={obj:t,func:i};n?(r.splice(this.extensionCount[e],0,o),"object"===Events_typeof(n)&&n.extension&&this.extensionCount[e]++):r.push(o)}}registerPriority(e,t,i){this.register(e,t,i,!0)}un(e){for(var t in e)"scope"!==t&&void 0!==e.type&&this.unregister(t,e.scope,e[t])}unregister(e,t,i){null==t&&(t=this.object);var n=this.listeners[e];if(null!=n)for(var r=0,o=n.length;r<o;r++)if(n[r].obj===t&&n[r].func===i){n.splice(r,1);break}}remove(e){null!=this.listeners[e]&&(this.listeners[e]=[])}triggerEvent(e,t){var i=this.listeners[e];if(i&&0!=i.length){null==t&&(t={}),t.object=this.object,t.element=this.element,t.type||(t.type=e);for(var n,r=0,o=(i=i.slice()).length;r<o;r++){var a=i[r];if(null!=(n=a.func.apply(a.obj,[t]))&&!1===n)break}return this.fallThrough||_0x4f2fe2.stop(t,!0),n}}handleBrowserEvent(e){var t=e.type,i=this.listeners[t];if(i&&0!=i.length){var n=e.touches;if(n&&n[0]){for(var r,o=0,a=0,s=n.length,l=0;l<s;++l)o+=(r=n[l]).clientX,a+=r.clientY;e.clientX=o/s,e.clientY=a/s}this.includeXY&&(e.xy=this.getMousePosition(e)),this.triggerEvent(t,e)}}clearMouseCache(){this.element.scrolls=null,this.element.lefttop=null;var e=document.body;e&&(0==e.scrollTop&&0==e.scrollLeft||!navigator.userAgent.match(/iPhone/i))&&(this.element.offsets=null)}getMousePosition(e){if(this.includeXY?this.element.hasScrollEvent||(_0x4f2fe2.observe(window,"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0):this.clearMouseCache(),!this.element.scrolls){var t=_0x57693f.getViewportElement();this.element.scrolls=[t.scrollLeft,t.scrollTop]}return this.element.lefttop||(this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0]),this.element.offsets||(this.element.offsets=_0x57693f.pagePosition(this.element)),new Pixel(e.clientX+this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],e.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1])}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x3797bf=(_0x1e6a04=!0,function(e,t){var i=_0x1e6a04?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e6a04=!1,i}),_0x5c6301=_0x3797bf(void 0,(function(){return _0x5c6301.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c6301).search("(((.+)+)+)+$")})),_0x1e6a04;_0x5c6301();class _0x5ab2f6{constructor(e,t){this.value=e||"",this.name=t||"token",this.CLASS_NAME="SuperMap.PlotCredential"}getUrlParameters(){return this.name+"="+this.value}getValue(){return this.value}destroy(){this.value=null,this.name=null}}var _0x4f9d21=(_0x5cbbd6=!0,function(e,t){var i=_0x5cbbd6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5cbbd6=!1,i}),_0x247dbb=_0x4f9d21(void 0,(function(){return _0x247dbb.toString().search("(((.+)+)+)+$").toString().constructor(_0x247dbb).search("(((.+)+)+)+$")})),_0x5cbbd6;_0x247dbb();var _0x139385={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function _0x1aa4fb(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function _0x9fbd10(e){try{delete window[e]}catch{window[e]=void 0}}function _0x37c86e(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}var _0x4c2451=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=e,n=t.timeout||_0x139385.timeout,r=t.jsonpCallback||_0x139385.jsonpCallback,o=void 0;return new Promise((function(a,s){var l=t.jsonpCallbackFunction||_0x1aa4fb(),u=r+"_"+l;window[l]=function(e){a({ok:!0,json:function(){return Promise.resolve(e)}}),o&&clearTimeout(o),_0x37c86e(u),_0x9fbd10(l)},i+=-1===i.indexOf("?")?"?":"&";var c=document.createElement("script");c.setAttribute("src",""+i+r+"="+l),t.charset&&c.setAttribute("charset",t.charset),c.id=u,document.getElementsByTagName("head")[0].appendChild(c),o=setTimeout((function(){s(new Error("JSONP request to "+e+" timed out")),_0x9fbd10(l),_0x37c86e(u),window[l]=function(){_0x9fbd10(l)}}),n),c.onerror=function(){s(new Error("JSONP request to "+e+" failed")),_0x9fbd10(l),_0x37c86e(u),o&&clearTimeout(o)}}))},_0x8a4f6d=(_0x1f4c2b=!0,function(e,t){var i=_0x1f4c2b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f4c2b=!1,i}),_0x58a0ed=_0x8a4f6d(void 0,(function(){return _0x58a0ed.toString().search("(((.+)+)+)+$").toString().constructor(_0x58a0ed).search("(((.+)+)+)+$")})),_0x1f4c2b;_0x58a0ed();const _0x35228f=window.fetch;window.setCORS=function(e){window.CORS=e};var isCORS=window.isCORS=function(){return null!=window.CORS?window.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest};window.setRequestTimeout=function(e){return window.RequestTimeout=e};var getRequestTimeout=window.getRequestTimeout=function(){return window.RequestTimeout||45e3},_0x363434={commit:function(e,t,i,n){switch(e=e&&e.toUpperCase()){case"GET":default:return this.get(t,i,n);case"POST":return this.post(t,i,n);case"PUT":return this.put(t,i,n);case"DELETE":return this.delete(t,i,n)}},supportDirectRequest:function(e,t){return!!_0x57693f.isInTheSameDomain(e)||(null!=t.crossOrigin?t.crossOrigin:isCORS()||t.proxy)},get:function(e,t,i){i=i||{};if(e=_0x57693f.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){var n={url:e=e.replace(".json",".jsonp"),data:t};return _0x57693f.RequestJSONPPromise.GET(n)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")-1),t,i):this._fetch(e,t,i,"GET")},delete:function(e,t,i){i=i||{};var n="DELETE";if(e=_0x57693f.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=DELETE",data:t};return _0x57693f.RequestJSONPPromise.DELETE(r)}return this.urlIsLong(e)?this._postSimulatie(n,e.substring(0,e.indexOf("?")-1),t,i):this._fetch(e,t,i,n)},post:function(e,t,i){if(i=i||{},!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=POST",data:t};return _0x57693f.RequestJSONPPromise.POST(n)}return this._fetch(this._processUrl(e,i),t,i,"POST")},put:function(e,t,i){if(i=i||{},e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=PUT",data:t};return _0x57693f.RequestJSONPPromise.PUT(n)}return this._fetch(e,t,i,"PUT")},urlIsLong:function(e){for(var t=0,i=null,n=0,r=e.length;n<r;n++)(i=e.charCodeAt(n))<127?t++:128<=i&&i<=2047?t+=2:2048<=i&&i<=65535&&(t+=3);return!(t<2e3)},_postSimulatie:function(e,t,i,n){var r=t.indexOf("?")>-1?"&":"?";return t+=r+"_method="+e,"string"!=typeof i&&(i=JSON.stringify(i)),this.post(t,i,n)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var i=e.split("?");2===i.length&&(e=i[0]+".json?"+i[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,i,n){return(i=i||{}).headers=i.headers||{},!i.headers["Content-Type"]&&!FormData.prototype.isPrototypeOf(t)&&(i.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),i.timeout?this._timeout(i.timeout,_0x35228f(e,{method:n,headers:i.headers,body:"PUT"===n||"POST"===n?t:void 0,credentials:this._getWithCredentials(i),mode:"cors",timeout:getRequestTimeout()}).then((function(e){return e}))):_0x35228f(e,{method:n,body:"PUT"===n||"POST"===n?t:void 0,headers:i.headers,credentials:this._getWithCredentials(i),mode:"cors",timeout:getRequestTimeout()}).then((function(e){return e}))},_getWithCredentials:function(e){return!0===e.withCredentials?"include":!1===e.withCredentials?"omit":"same-origin"},_fetchJsonp:function(e,t){return t=t||{},_0x4c2451()(e,{method:"GET",timeout:t.timeout}).then((function(e){return e}))},_timeout:function(e,t){return new Promise((function(i,n){setTimeout((function(){n(new Error("timeout"))}),e),t.then(i,n)}))},_getParameterString:function(e){var t=[];for(var i in e){var n,r=e[i];if(null!=r&&"function"!=typeof r)n=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(i)+"="+n)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}},_0x334c9a=(_0x1991b8=!0,function(e,t){var i=_0x1991b8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1991b8=!1,i}),_0x5e2691=_0x334c9a(void 0,(function(){return _0x5e2691.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e2691).search("(((.+)+)+)+$")})),_0x1991b8;function _0x1d93f7(){}_0x5e2691(),_0x1d93f7.bind=function(e,t){var i=Array.prototype.slice.apply(arguments,[2]);return function(){var n=i.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,n)}},_0x1d93f7.bindAsEventListener=function(e,t){return function(i){return e.call(t,i||window.event)}},_0x1d93f7.False=function(){return!1},_0x1d93f7.True=function(){return!0},_0x1d93f7.Void=function(){};var _0x41c393=(_0x100775=!0,function(e,t){var i=_0x100775?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x100775=!1,i}),_0x5dae2a=_0x41c393(void 0,(function(){return _0x5dae2a.toString().search("(((.+)+)+)+$").toString().constructor(_0x5dae2a).search("(((.+)+)+)+$")})),_0x100775;_0x5dae2a();class _0x398ff2{constructor(e){this.data=null,this.keepData=!1,_0x57693f.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format"}destroy(){}read(e){}write(e){}}var _0x276a38=(_0x10f0e9=!0,function(e,t){var i=_0x10f0e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x10f0e9=!1,i}),_0x4d83ca=_0x276a38(void 0,(function(){return _0x4d83ca.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d83ca).search("(((.+)+)+)+$")})),_0x10f0e9;_0x4d83ca();class _0x3ca704 extends _0x398ff2{constructor(e){super(e),this.indent=" ",this.space=" ",this.newline="\n",this.level=0,this.pretty=!1,this.nativeJSON=!(!window.JSON||"function"!=typeof JSON.parse||"function"!=typeof JSON.stringify),this.CLASS_NAME="SuperMap.Format.JSON",this.serialize={object:function(e){if(null==e)return"null";if(e.constructor===Date)return this.serialize.date.apply(this,[e]);if(e.constructor===Array)return this.serialize.array.apply(this,[e]);var t=["{"];this.level+=1;var i,n,r,o=!1;for(i in e)e.hasOwnProperty(i)&&(n=this.write.apply(this,[i,this.pretty]),r=this.write.apply(this,[e[i],this.pretty]),null!=n&&null!=r&&(o&&t.push(","),t.push(this.writeNewline(),this.writeIndent(),n,":",this.writeSpace(),r),o=!0));return this.level-=1,t.push(this.writeNewline(),this.writeIndent(),"}"),t.join("")},array:function(e){var t,i=["["];this.level+=1;for(var n=0,r=e.length;n<r;++n)null!=(t=this.write.apply(this,[e[n],this.pretty]))&&(n>0&&i.push(","),i.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,i.push(this.writeNewline(),this.writeIndent(),"]"),i.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,(function(e,i){var n=t[i];return n||(n=i.charCodeAt(),"\\u00"+Math.floor(n/16).toString(16)+(n%16).toString(16))}))+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}}}read(e,t){var i;if(this.nativeJSON)try{i=JSON.parse(e,t)}catch{}return this.keepData&&(this.data=i),i}write(e,t){this.pretty=!!t;var i=null,n=typeof e;if(this.serialize[n])try{i=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[n].apply(this,[e])}catch{}return i}writeIndent(){var e=[];if(this.pretty)for(var t=0;t<this.level;++t)e.push(this.indent);return e.join("")}writeNewline(){return this.pretty?this.newline:""}writeSpace(){return this.pretty?this.space:""}}var _0x47ccf7=(_0x34679f=!0,function(e,t){var i=_0x34679f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x34679f=!1,i}),_0xb36e6f=_0x47ccf7(void 0,(function(){return _0xb36e6f.toString().search("(((.+)+)+)+$").toString().constructor(_0xb36e6f).search("(((.+)+)+)+$")})),_0x34679f;_0xb36e6f();class _0xd9c3dd{constructor(e,t){var i=this;this.EVENT_TYPES=["processCompleted","processFailed"],this.events=null,this.eventListeners=null,this.url=null,this.urls=null,this.proxy=null,this.index=null,this.length=null,this.options=null,this.totalTimes=null,this.POLLING_TIMES=3,this._processSuccess=null,this._processFailed=null,this.isInTheSameDomain=null,this.withCredentials=!1,Array.isArray(e)?(i.urls=e,i.length=e.length,i.totalTimes=i.length,1===i.length?i.url=e[0]:(i.index=parseInt(Math.random()*i.length),i.url=e[i.index])):(i.totalTimes=1,i.url=e),Array.isArray(e)&&!i.isServiceSupportPolling()&&(i.url=e[0],i.totalTimes=1),t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,this.extend(this,t),i.isInTheSameDomain=this.isInTheSameDomainFnc(i.url),i.events=new _0x3d7456(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){var e=this;_0x57693f.isArray(e.urls)&&(e.urls=null,e.index=null,e.length=null,e.totalTimes=null),e.url=null,e.options=null,e._processSuccess=null,e._processFailed=null,e.isInTheSameDomain=null,e.EVENT_TYPES=null,e.events&&(e.events.destroy(),e.events=null),e.eventListeners&&(e.eventListeners=null)}request(e){var t=this;e.url=e.url||t.url,e.proxy=e.proxy||t.proxy,e.withCredentials=null!=e.withCredentials?e.withCredentials:t.withCredentials,e.crossOrigin=null!=e.crossOrigin?e.crossOrigin:t.crossOrigin,e.headers=e.headers||t.headers,e.isInTheSameDomain=t.isInTheSameDomain,e.url=this.appendCredential(e.url),t.calculatePollingTimes(),t._processSuccess=e.success,t._processFailed=e.failure,e.scope=t,e.success=t.getUrlCompleted,e.failure=t.getUrlFailed,t.options=e,t._commit(t.options)}getUrlCompleted(e){this._processSuccess(e)}getUrlFailed(e){var t=this;t.totalTimes>0?(t.totalTimes--,t.ajaxPolling()):t._processFailed(e)}ajaxPolling(){var e=this,t=e.options.url,i=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(i,i.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=this.isInTheSameDomainFnc(t),e._commit(e.options)}calculatePollingTimes(){var e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.times<e.totalTimes&&(e.totalTimes=e.times):e.totalTimes>e.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}isServiceSupportPolling(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}serviceProcessCompleted(e){e=_0x57693f.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){var t=(e=_0x57693f.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){if("POST"===e.method||"PUT"===e.method||"PATCH"===e.method)if(e.params&&(e.url=_0x57693f.urlAppend(e.url,_0x57693f.getParameterString(e.params||{}))),"object"==typeof e.data)try{e.params=_0x57693f.toJSON(e.data)}catch{console.log("不是json对象")}else e.params=e.data;_0x363434.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then((function(e){return e.text?e.text():e.json?e.json():e})).then((function(e){var t=e;return"string"==typeof e&&(t=(new _0x3ca704).read(e)),(!t||t.error||t.code>=300&&304!==t.code)&&(t=t&&t.error?{error:t.error}:{error:t}),t})).catch((function(e){return{error:e}})).then((function(t){t.error?(e.scope?_0x1d93f7.bind(e.failure,e.scope):e.failure)(t):(t.succeed=null==t.succeed||t.succeed,(e.scope?_0x1d93f7.bind(e.success,e.scope):e.success)(t))}))}isInTheSameDomainFnc(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}appendCredential(e){var t=e,i=this.getToken(e),n=i?new _0x5ab2f6(i,"token"):null;return n||(n=(i=this.getKey(e))?new _0x5ab2f6(i,"key"):null),n&&(t=this.urlAppend(t,n.getUrlParameters())),t}getToken(e){if(e){this.tokens=this.tokens||{};var t=this._getTokenStorageKey(e);return this.tokens[t]}}_getTokenStorageKey(e){var t=e.match(/(.*?):\/\/([^\/]+)/i);return t?t[0]:e}getKey(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;return this.keys[t]}_getUrlRestString(e){if(!e)return e;var t=e.match(/(http|https):\/\/(.*\/rest)/i);return t?t[0]:e}urlAppend(e,t){var i=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i}}var _0x1a2376=(_0x5a5fb7=!0,function(e,t){var i=_0x5a5fb7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a5fb7=!1,i}),_0x2aeeac=_0x1a2376(void 0,(function(){return _0x2aeeac.toString().search("(((.+)+)+)+$").toString().constructor(_0x2aeeac).search("(((.+)+)+)+$")})),_0x5a5fb7;_0x2aeeac();class _0x1393d7 extends _0xd9c3dd{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.PlotCommonServiceBase"}destroy(){super.destroy()}_commit(e){("POST"===e.method||"PUT"===e.method)&&(e.params&&(e.url=SuperMap.Util.urlAppend(e.url,SuperMap.Util.getParameterString(e.params||{}))),e.params=e.data),_0x363434.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then((function(e){return e.text()})).then((function(t){var i=(new _0x3ca704).read(t);(i||(i={error:t}),i.error)?(e.scope?_0x1d93f7.bind(e.failure,e.scope):e.failure)(i.error):(i.succeed=null==i.succeed||i.succeed,(e.scope?_0x1d93f7.bind(e.success,e.scope):e.success)(i))}))}}var _0xad4461=(_0x1b8362=!0,function(e,t){var i=_0x1b8362?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b8362=!1,i}),_0x2c7e7e=_0xad4461(void 0,(function(){return _0x2c7e7e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c7e7e).search("(((.+)+)+)+$")})),_0x1b8362;_0x2c7e7e();class _0x5ad32f extends _0x1393d7{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"symbolLibs.json?":"/symbolLibs.json?",this.CLASS_NAME="SuperMap.GetLibIDsService"}destroy(){super.destroy()}processAsync(){var e=this;e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x6d00eb=(_0x45038f=!0,function(e,t){var i=_0x45038f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45038f=!1,i}),_0x2a004e=_0x6d00eb(void 0,(function(){return _0x2a004e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a004e).search("(((.+)+)+)+$")})),_0x45038f;_0x2a004e();class GetLibInfoService extends _0x1393d7{constructor(e,t){super(e,t),(t=t||{})&&_0x57693f.extend(this,t);var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"symbolLibs/":"/symbolLibs/",this.CLASS_NAME="SuperMap.GetLibInfoService"}destroy(){super.destroy()}processAsync(e){var t=this;e&&null!==e.libID&&(t.libID=e.libID),t.url+=t.libID,t.url+=".json",t.request({method:"GET",data:null,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}var _0x46ae46=(_0x2d8b7f=!0,function(e,t){var i=_0x2d8b7f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d8b7f=!1,i}),_0x1cdd2c=_0x46ae46(void 0,(function(){return _0x1cdd2c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cdd2c).search("(((.+)+)+)+$")})),_0x2d8b7f;function _0xdf8675(e,t){this.options=t,this.url=e}_0x1cdd2c(),_0xdf8675.prototype.getLibIDs=function(e,t){var i=this;return t||(t=i),new _0x5ad32f(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync(),i},_0xdf8675.prototype.getLibInfo=function(e,t,i){var n=this;return i||(i=n),new GetLibInfoService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n};const _0x48a002=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1001fe=_0x48a002(void 0,(function(){return _0x1001fe.toString().search("(((.+)+)+)+$").toString().constructor(_0x1001fe).search("(((.+)+)+)+$")}));function _0x570598(e){e=e||{},this.libID=e.libID,this.code=e.code,this.inputPoints=e.inputPoints?e.inputPoints:null,this.symbolRank=e.symbolRank?e.symbolRank:0,this.negativeImage=!!e.negativeImage&&e.negativeImage,this.surroundLineType=e.surroundLineType?e.surroundLineType:0,this.subSymbols=e.subSymbols?e.subSymbols:null,this.scaleValues=e.scaleValues?e.scaleValues:null,this.scalePoints=e.scalePoints?e.scalePoints:null,this.newScalePoint=e.newScalePoint?e.newScalePoint:null,this.newScalePointIndex=e.newScalePointIndex?e.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}_0x1001fe(),_0x570598.prototype.destroy=function(){var e=this;e.libID=null,e.code=null,e.inputPoints=null,e.symbolRank=null,e.negativeImage=null,e.surroundLineType=null,e.subSymbols=null,e.scaleValues=null,e.scalePoints=null,e.newScalePoint=null,e.newScalePointIndex=null},_0x570598.toUrlParameters=function(e){if(e&&null!==e.libID&&null!==e.code){var t="libID="+encodeURIComponent(e.libID)+"&code="+encodeURIComponent(e.code);if(e.inputPoints&&null!==e.inputPoints&&0!==e.inputPoints.length){let i="[";for(let t=0;t<e.inputPoints.length;t++)t===e.inputPoints.length-1?i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"}]":i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"},";t+="&inputPoints="+encodeURIComponent(i)}if(e.scalePoints&&null!==e.scalePoints&&0!==e.scalePoints.length){let i="[";for(let t=0;t<e.scalePoints.length;t++)t===e.scalePoints.length-1?i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"}]":i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"},";t+="&scalePoints="+encodeURIComponent(i)}if(e.scaleValues&&null!==e.scaleValues&&0!==e.scaleValues.length){let i="[";for(let t=0;t<e.scaleValues.length;t++)t===e.scaleValues.length-1?i+=e.scaleValues[t]+"]":i+=e.scaleValues[t]+",";t+="&scaleValues="+encodeURIComponent(i)}if(e.subSymbols&&null!==e.subSymbols&&0!==e.subSymbols.length){let i="[";for(let t=0;t<e.subSymbols.length;t++)t===e.subSymbols.length-1?i+=e.subSymbols[t].code+"]":i+=e.subSymbols[t].code+",";t+="&subSymbols="+encodeURIComponent(i)}return e.newScalePoint&&null!==e.newScalePoint&&(t+="&newScalePoint="+encodeURIComponent('{"x":'+e.newScalePoint.x+', "y":'+e.newScalePoint.y+"}")),e.newScalePointIndex&&null!==e.newScalePointIndex&&(t+="&newScalePointIndex="+encodeURIComponent(e.newScalePointIndex)),e.symbolRank&&null!==e.symbolRank&&(t+="&symbolRank="+encodeURIComponent(e.symbolRank)),e.negativeImage&&null!==e.negativeImage&&(t+="&negativeImage="+encodeURIComponent(e.negativeImage)),e.surroundLineType&&null!==e.surroundLineType&&(t+="&surroundLineType="+encodeURIComponent(e.surroundLineType)),t}};var _0x4db32f=(_0x49f9f6=!0,function(e,t){var i=_0x49f9f6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49f9f6=!1,i}),_0x258540=_0x4db32f(void 0,(function(){return _0x258540.toString().search("(((.+)+)+)+$").toString().constructor(_0x258540).search("(((.+)+)+)+$")})),_0x49f9f6;function _0x4657e6(e){this.cachecompleted=new WebGLPlot.Event,this.cachedSymbolList={},this.needCacheList=[],this.symbolNames=null,this.symbolLibData=null,this.plottingID=e.plottingID,this.cachedSymbolOK=!1,e&&_0x57693f.extend(this,e),e&&e.url&&e.libID?(this.url=e.url,this.libID=e.libID):e&&e.symbolLibData&&(this.symbolLibData=e.symbolLibData,this.libID=this.symbolLibData.libID,this.initNeedCacheList())}_0x258540(),_0x4657e6.prototype.initNeedCacheList=function(){if(!this.symbolLibData||!this.symbolLibData.rootSymbolLibNode)return!1;this.initNeedCacheListForNode(this.symbolLibData.rootSymbolLibNode)},_0x4657e6.prototype.initNeedCacheListForNode=function(e,t){for(var i=0;i<e.childNodeCount;i++)"SYMBOL_GROUP"===e.childNodes[i].symbolNodeType?this.initNeedCacheListForNode(e.childNodes[i]):"SYMBOL_NODE"===e.childNodes[i].symbolNodeType&&this.needCacheList.push(e.childNodes[i].symbolCode)},_0x4657e6.prototype.destroy=function(){this.url=null,this.libID=null,this.symbolLibData=null},_0x4657e6.prototype.cachedSymbols=function(){var e=this;if(0!==this.needCacheList.length){for(var t=this.needCacheList.slice(),i=0,n=t.length;i<n;i++){var r=new _0x570598;r.libID=this.libID,r.code=t[i];var o=WebGLPlot.getServerData(this.libID,t[i],void 0,this.plottingID);if(!o)return;o.getSymbolInfo.events.on({processCompleted:a,processFailed:a,scope:e}),o.getSymbolInfo.processAsync(o.getSymbolInfoParameters)}this.cachedSymbolOK=!0}else this.cachecompleted.raiseEvent({success:!0});function a(t){t.result.succeed&&(e.cacheSymbolData(t.result),0===e.needCacheList.length&&e.cachecompleted.raiseEvent({success:!0}))}},_0x4657e6.prototype.cacheSymbolData=function(e){var t=_0x57693f.indexOf(this.needCacheList,e.code);-1!==t&&(this.cachedSymbolList[e.code]=SuperMapAlgoPlot.PlottingUtil.cloneObject(e),this.needCacheList.splice(t,1))},_0x4657e6.prototype.getClassFication=function(){return null===this.symbolLibData?null:this.symbolLibData.classFication},_0x4657e6.prototype.getCreateTime=function(){return null===this.symbolLibData?null:this.symbolLibData.createTime},_0x4657e6.prototype.getCreator=function(){return null===this.symbolLibData?null:this.symbolLibData.creator},_0x4657e6.prototype.getModifyTime=function(){return null===this.symbolLibData?null:this.symbolLibData.modifyTime},_0x4657e6.prototype.getRootSymbolIconUrl=function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolIconUrl},_0x4657e6.prototype.getRootSymbolInfo=function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolLibNode},_0x4657e6.prototype.getSymbolCount=function(){return null===this.symbolLibData?null:this.symbolLibData.symbolCount},_0x4657e6.prototype.getSymbolData=function(e){var t=null;return this.cachedSymbolList.hasOwnProperty(e)&&(t=SuperMapAlgoPlot.PlottingUtil.cloneObject(this.cachedSymbolList[e])),t},_0x4657e6.prototype.setSymbolData=function(e){this.cacheSymbolData(e)},_0x4657e6.prototype.getSymbolLibID=function(){return this.libID},_0x4657e6.prototype.getSymbolLibName=function(){return null===this.symbolLibData?null:this.symbolLibData.symbolLibName},_0x4657e6.prototype.getSymbolName=function(e){return null===this.symbolLibData?"":(null===this.symbolNames&&(this.symbolNames={},this.getSymbolNameFromList(this.symbolLibData.rootSymbolLibNode)),this.symbolNames[e])},_0x4657e6.prototype.getVersion=function(){return null===this.symbolLibData?null:this.symbolLibData.version},_0x4657e6.prototype.querySymbolbyKey=function(e){return this.querySymbol(e,this.getRootSymbolInfo(),this.getRootSymbolIconUrl())},_0x4657e6.prototype.querySymbol=function(e,t,i){var n=[];if("SYMBOL_GROUP"===t.symbolNodeType)for(var r=0;r<t.childNodes.length;r++)for(var o=i+"/"+t.symbolName,a=this.querySymbol(e,t.childNodes[r],o),s=0;s<a.length;s++)n.push(a[s]);else(e===t.symbolCode.toString()||-1!==t.symbolName.indexOf(e))&&(t.icon=i+"/"+t.symbolCode+".png",n.push(t));return n};var _0x2e1e36=(_0x1fee71=!0,function(e,t){var i=_0x1fee71?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fee71=!1,i}),_0x15de47=_0x2e1e36(void 0,(function(){return _0x15de47.toString().search("(((.+)+)+)+$").toString().constructor(_0x15de47).search("(((.+)+)+)+$")})),_0x1fee71;_0x15de47();class _0x23d9b2{constructor(e){e=e||{},this.libID=e.libID,this.CLASS_NAME="SuperMap.GetLibInfoParameter"}destroy(){this.libID=null}}var _0x4c34a5=(_0x295cd3=!0,function(e,t){var i=_0x295cd3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x295cd3=!1,i}),_0x496b4d=_0x4c34a5(void 0,(function(){return _0x496b4d.toString().search("(((.+)+)+)+$").toString().constructor(_0x496b4d).search("(((.+)+)+)+$")})),_0x295cd3;_0x496b4d();var _0x903beb=new Map;function _0x298073(e,t){if(this.useServerData=!0,(!WebGLPlot.defined(e)||0===e.length)&&this.useServerData)throw new WebGLPlot.DeveloperError("url is required to initialize SymbolLibManager");this.url=e,this.libIDs=null,this.symbolLibs=[],this.symbolLibJsons=[],this.isInializeOK=!1,this.initializecompleted=new WebGLPlot.Event,this.cachecompleted=new WebGLPlot.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},t&&t.serviceParams&&_0x57693f.extend(this.options,t),(!this.useServerData||!e||0===e.length)&&this.loadLocalLib()}_0x298073.getInstance=function(e,t,i){let n=_0x903beb.get(i);return!WebGLPlot.defined(n)&&WebGLPlot.defined(i)&&(n=new _0x298073(e,t),n.plottingID=i,_0x903beb.set(i,n)),n},_0x298073.prototype.loadLocalLib=function(e){var t="js/plotPanelControl/LocalLib.json";WebGLPlot.defined(e)&&""!==e&&(t=e);var i=this;if(void 0===$.getJSON())throw new WebGLPlot.DeveloperError("jQuery is needed");$.getJSON(t,(function(e){(!WebGLPlot.defined(i.localSymbolLibData)||null===i.localSymbolLibData)&&(i.localSymbolLibData={}),i.localSymbolLibData[e.libID]=e}))},_0x298073.prototype.initialize=function(e,t){this.url=e,null===this.libIDs&&(this.libIDs=[]),null===this.symbolLibs&&(this.symbolLibs=[]),null===this.symbolLibJsons&&(this.symbolLibJsons=[]),t&&_0x57693f.extend(this,t)},_0x298073.prototype.destroy=function(){this.url=null,this.libIDs=[],this.symbolLibs=[],this.symbolLibJsons=[],this.isInializeOK=!1,this.isInitialize=!1,this.localSymbolLibData={}},_0x298073.prototype.initializeAsync=function(e){this.isInitializeOK()?this.initializecompleted.raiseEvent({success:!0,libIDs:this.libIDs}):this.isInitialize||(this.isInitialize=!0,new _0xdf8675(this.url,this.options.serviceParams).getLibIDs((function(t){if(!t.result||!t.result.succeed)throw _0x298073.prototype.libIDs=[],new WebGLPlot.DeveloperError("Plotting Server is required to initialize SymbolLibManager");if(null!==this.libIDs&&0!==this.libIDs.length)for(var i=0;i<this.libIDs.length;i++){for(var n=!1,r=0;r<t.result.length;r++)if(this.libIDs[i]===t.result[r]){n=!0;break}!1===n&&this.libIDs.slice(i,1)}else this.libIDs=t.result;WebGLPlot.defined(e)||(e=!1),this.initializeSymbolLib(e)}),this))},_0x298073.prototype.initializeSymbolLib=function(e){let t=this;for(var i=this.libIDs.slice(),n=0,r=this.libIDs.length;n<r;n++){let r=this.libIDs[n];var o=new _0x23d9b2;o.libID=r,new _0xdf8675(this.url,this.options.serviceParams).getLibInfo(o,(function(n){if(n.result.succeed){var o=_0x57693f.indexOf(i,n.result.libID);if(-1!==o){i.splice(o,1);var a=t.getSymbolLibByLibId(r);WebGLPlot.defined(a)||(t.symbolLibJsons.push(n.result),(a=new _0x4657e6({symbolLibData:n.result,plottingID:t.plottingID})).url=t.url,t.symbolLibs.push(a)),e&&a.cachedSymbols()}0===i.length&&(t.isInializeOK=!0,t.initializecompleted.raiseEvent({success:!0,libIDs:t.libIDs}))}}),this)}},_0x298073.prototype.findSymbolByCode=function(e){for(var t=[],i=0;i<this.libIDs.length;i++)for(var n=this.getSymbolLibByLibId(this.libIDs[i]).querySymbolbyKey(e.toString()),r=0;r<n.length;r++)t.push(n[r]);return t},_0x298073.prototype.findSymbolByName=function(e){for(var t=[],i=0;i<this.libIDs.length;i++)for(var n=this.getSymbolLibByLibId(this.libIDs[i]).querySymbolbyKey(e),r=0;r<n.length;r++)t.push(n[r]);return t},_0x298073.prototype.getSymbolLibByIndex=function(e){return e>=this.libIDs.length?null:this.symbolLibs[e]},_0x298073.prototype.getSymbolLibByLibId=function(e){for(var t=0;t<this.symbolLibs.length;t++)if(e===this.symbolLibs[t].libID)return this.symbolLibs[t];return null},_0x298073.prototype.getSymbolLibID=function(e){return e>=this.libIDs.length?-1:this.libIDs[e]},_0x298073.prototype.getSymbolLibJSONInfo=function(e){return e>=this.libIDs.length?null:this.symbolLibJsons[e]},_0x298073.prototype.getSymbolLibNumber=function(){return this.libIDs.length},_0x298073.prototype.getSymbolName=function(e,t){var i=this.getSymbolLibByLibId(e);return null===i?"":i.getSymbolName(t)},_0x298073.prototype.getSymbolData=function(e,t){var i=this.getSymbolLibByLibId(e);return null===i?null:i.getSymbolData(t)},_0x298073.prototype.setSymbolData=function(e,t){var i=this.getSymbolLibByLibId(e);if(null!==i&&WebGLPlot.defined(t)&&null!==t)i&&i.setSymbolData(t);else{var n=new _0x23d9b2;n.libID=e;let r=this;new _0xdf8675(this.url,this.options.serviceParams).getLibInfo(n,(function(e){e.result.succeed&&-1!==e.result.libID&&(r.symbolLibJsons.push(e.result),(i=new _0x4657e6({symbolLibData:e.result,plottingID:r.plottingID})).url=r.url,i.setSymbolData(t),r.symbolLibs.push(i))}),this)}},_0x298073.prototype.isInitializeOK=function(){return this.isInializeOK},_0x298073.prototype.cacheSymbolLib=function(e){var t=this,i=this.getSymbolLibByLibId(e);i.cachecompleted.addEventListener((function(e){t.cachecompleted.raiseEvent({success:!0})})),null!==i&&i.cachedSymbols()};var _0x3f7fab=(_0x401c35=!0,function(e,t){var i=_0x401c35?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x401c35=!1,i}),_0x4ae965=_0x3f7fab(void 0,(function(){return _0x4ae965.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ae965).search("(((.+)+)+)+$")})),_0x401c35;_0x4ae965();var WebGLPlot$b=window.WebGLPlot=window.WebGLPlot||{};function _0x39fbca(e,t,i){try{SuperMapAlgoPlot}catch{throw new WebGLPlot$b.DeveloperError("need include Build/Cesium/ThirdParty/Workers/PlotAlgo/PlotAlgoInclude.js ")}this._plottingID="PlottingID"+WebGLPlot$b.createGuid(),_0x39fbca.serverUrl=e,this._scene=t,t._plottingID=this._plottingID,i&&i.serviceParams&&_0x2d6822.extend(this.options,i),this._symbolLibManager=_0x298073.getInstance(e,void 0,this._plottingID),this._sitDataManager=WebGLPlot$b.SitDataManager.getInstance({scene:this._scene,serverUrl:e,options:this.options}),this._animationManager=_0x1713d3.getInstance({serverUrl:e,scene:this._scene,options:this.options}),_0x39fbca.defaultStyle=new WebGLPlot$b.DefaultStyle,WebGLPlot$b.S3MInstanceCollection&&(this.s3mInstanceColc=new WebGLPlot$b.S3MInstanceCollection(t._context),t.primitives.add(this.s3mInstanceColc),WebGLPlot$b.s3mInstanceColc.set(this._plottingID,this.s3mInstanceColc)),_0x39fbca._AlgoSymoblPipelineDisMin=1e4,this._plotCollentionManager=_0x38860f.getInstance(t)}_0x39fbca.g_Plotting=_0x39fbca.g_Plotting||new Map,WebGLPlot$b.s3mInstanceColc=WebGLPlot$b.s3mInstanceColc||new Map,_0x39fbca.prototype.destroy=function(){this._scene.layers.remove("animation",!0),this._sitDataManager=null,this._animationManager=null,this._scene=null,_0x39fbca.g_Plotting.clear()},_0x39fbca.getInstance=function(e,t,i){let n=_0x39fbca.g_Plotting.get(t._plottingID);return WebGLPlot$b.defined(e)&&WebGLPlot$b.defined(t)&&!WebGLPlot$b.defined(n)&&(n=new _0x39fbca(e,t,i),_0x39fbca.g_Plotting.set(n._plottingID,n)),n},_0x39fbca.prototype.getSitDataManager=function(){return this._sitDataManager},_0x39fbca.prototype.getSymbolLibManager=function(){return this._symbolLibManager},_0x39fbca.prototype.getGOAnimationManager=function(){return this._animationManager},_0x39fbca.prototype.getServerUrl=function(){return _0x39fbca.serverUrl},_0x39fbca.prototype.getDefaultStyle=function(){return _0x39fbca.defaultStyle},_0x39fbca.prototype.setAlgoUseDepthTest=function(e){this._plotCollentionManager&&this._plotCollentionManager.collentionLayer.createPolylineCollention(e)},_0x39fbca.prototype.getAlgoUseDepthTest=function(){return!!this._plotCollentionManager&&this._plotCollentionManager.collentionLayer.polylineCollection._opaqueRS.depthMask},_0x39fbca.prototype.getS3MCollection=function(){return this.s3mInstanceColc},WebGLPlot$b.Plotting=_0x39fbca;const E$n=64;function d$s(e,t,i){i<2&&(i=2),this._initialWorldSize=t,this._maxDepth=i,this._octreeNodes=b$t(e,t,i,0),this._allObjects=[]}function v$m(e){return e$2b(e._boundingSphere)?e._boundingSphere:e._orientedBoundingBox}function b$t(e,t,i,n){var r=t/4,o=t/2,a=new Array([8]);let s=o$1p.add(e,new o$1p(-r,r,-r),new o$1p);a[0]=new h$n(s,o,i,n);let l=o$1p.add(e,new o$1p(r,r,-r),new o$1p);a[1]=new h$n(l,o,i,n);let u=o$1p.add(e,new o$1p(-r,r,r),new o$1p);a[2]=new h$n(u,o,i,n);let c=o$1p.add(e,new o$1p(r,r,r),new o$1p);a[3]=new h$n(c,o,i,n);let h=o$1p.add(e,new o$1p(-r,-r,-r),new o$1p);a[4]=new h$n(h,o,i,n);let d=o$1p.add(e,new o$1p(r,-r,-r),new o$1p);a[5]=new h$n(d,o,i,n);let f=o$1p.add(e,new o$1p(-r,-r,r),new o$1p);a[6]=new h$n(f,o,i,n);let p=o$1p.add(e,new o$1p(r,-r,r),new o$1p);return a[7]=new h$n(p,o,i,n),a}function I$o(e){var t=[];let i={};for(let n of e){let e=n._fileName;i[e]||(t.push(n),i[e]=1)}return t}function h$n(e,t,i,n){this._center=u$_(e,1),this._baseSize=u$_(t,1),this._depth=u$_(n,0),this._maxDepth=u$_(i,2),this._bound=new e$26(z$l(this._center,this._baseSize),x$o(this._center,this._baseSize),this._center),this._objects=[],this._children=[]}function z$l(e,t){return new o$1p(e.x-.5*t,e.y-.5*t,e.z-.5*t)}function x$o(e,t){return new o$1p(e.x+.5*t,e.y+.5*t,e.z+.5*t)}function T$k(e,t,i){let n=e.x;n=n>i.x?i.x:n,n=n<t.x?t.x:n;let r=e.y;r=r>i.y?i.y:r,r=r<t.y?t.y:r;let o=e.z;return o=o>i.z?i.z:o,o=o<t.z?t.z:o,new o$1p(n,r,o)}function V$h(e,t){let i=e.x-t.x,n=e.y-t.y,r=e.z-t.z;return i*i+n*n+r*r}function B$h(e,t){let i=t;e$2b(t.radius)||(i=new i$1c,i$1c.fromOrientedBoundingBox(t,i));var n=new o$1p;return n=T$k(i.center,e.minimum,e.maximum),V$h(i.center,n)<=i.radius*i.radius}d$s.prototype.debugObjectCounts=function(){var e=new Set;for(let t=0;t<this._octreeNodes.length;t++)this._octreeNodes[t].debugobjects(e);console.log(e.size)},d$s.prototype.addEntity=function(e){var t=v$m(e),i=!1;for(let r=0;r<this._octreeNodes.length;r++){var n=this._octreeNodes[r];i|=n.addNode(e,t)}i&&this._allObjects.push(e)},d$s.prototype.removeEntity=function(e){if(null==e)return!1;var t=!1,i=this._allObjects(e);i>-1&&(this._allObjects.splice(i,1),t=!0);for(let t=0;t<this._octreeNodes.length;t++){var n=this._octreeNodes[t];n.remove(e)}return t},d$s.prototype.getWithinFrustum=function(e){var t=[];const i=e.planes;for(let e=0,r=i.length;e<r;++e){var n=o$1m.fromCartesian4(i[e],void 0);t.push(n)}var r=[];for(let e=0;e<this._octreeNodes.length;e++){var o=this._octreeNodes[e];o.select(t,r)}return r=I$o(r)},d$s.prototype.setObjectsVisible=function(e){var t=[];const i=e.planes;for(let e=0,r=i.length;e<r;++e){var n=o$1m.fromCartesian4(i[e],void 0);t.push(n)}for(let e=0;e<this._octreeNodes.length;e++){var r=this._octreeNodes[e];r.setVisible(t,Ae$u.INTERSECTING)}},h$n.prototype.innerSplit=function(){this._children=b$t(this._center,this._baseSize,this._maxDepth,this._depth+1);for(var e=0;e<8;e++){this._children[e].addObjects(this._objects)}this._objects=[]},h$n.prototype.addNode=function(e,t){if(this._children.length>0){for(var i=!1,n=0;n<this._children.length;n++){i|=this._children[n].addNode(e,t)}return i}var r=!1;return B$h(this._bound,t)&&2*t.radius<=this._baseSize&&(this._objects.push(e),r=!0),this._depth<this._maxDepth&&this._objects.length>E$n&&this.innerSplit(),r},h$n.prototype.addObjects=function(e){for(let n=0;n<e.length;n++){var t=e[n],i=v$m(t);this.addNode(t,i)}},h$n.prototype.remove=function(e){if(this._children.length>0)for(var t=0;t<this._children.length;t++){this._children[t].remove(e)}let i=!1;var n=this._objects.indexOf(e);return n>-1&&(this._objects.splice(n,1),i=!0),i},h$n.prototype.select=function(e,t){if(this.computeVisibility(e)!==Ae$u.OUTSIDE){if(this._children.length>0){for(let n=0;n<this._children.length;n++){var i=this._children[n];i.select(e,t)}return}for(var n=0;n<this._objects.length;n++){var r=this._objects[n];r.isVisible=!0,e$2b(r._parentPagelod)&&(r._parentPagelod._isVisible=!0),t.push(r)}}},h$n.prototype.setVisible=function(e,t){var i=t;if(t===Ae$u.OUTSIDE)for(var n=0;n<this._objects.length;n++){(r=this._objects[n])._isVisible=!1}else{t===Ae$u.INTERSECTING&&(i=this.computeVisibility(e));for(n=0;n<this._objects.length;n++){var r;(r=this._objects[n])._isVisible=!0,e$2b(r._parentPagelod)&&(r._parentPagelod._isVisible=!0)}}if(this._children.length>0)for(let t=0;t<8;t++)this._children[t].setVisible(e,i)},h$n.prototype.bestFitChild=function(e){return(e.x<=this._center.x?0:1)+(e.y>=this._center.y?0:4)+(e.z<=this._center.z?0:2)},h$n.prototype.computeVisibility=function(e){const t=e;var i=!1;for(let e=0,n=t.length;e<n;++e){const n=this._bound.intersectPlane(t[e]);if(n===Ae$u.OUTSIDE)return Ae$u.OUTSIDE;n===Ae$u.INTERSECTING&&(i=!0)}return i?Ae$u.INTERSECTING:Ae$u.INSIDE},h$n.prototype.debugobjects=function(e){for(let t=0;t<this._objects.length;t++)e.add(this._objects[t]._fileName);for(let t=0;t<this._children.length;t++)this._children[t].debugobjects(e)};var x$n="uniform sampler2D u_floatTexture;\n\nvoid main()\n{\n float actual = texture2D(u_floatTexture, vec2(0.5, 0.5)).r;\n float expected = 123456.0;\n gl_FragColor = vec4(abs(actual - expected), 0.0, 0.0, 1.0);\n}\n";function f$n(e){this._context=e}var i$l,R$k=new i$_({primitiveType:W$18.TRIANGLES}),D$k=new t$X({color:new e$1U(0,0,0,0)});function M$n(e,t){return new t$W({context:e,colorTextures:[t],destroyAttachments:!1})}function Q$h(e,t,i){return r$13.fromCache({name:t,context:e,vertexShaderSource:ot$7,fragmentShaderSource:i,attributeLocations:{position:0,textureCoordinates:1}})}function F$i(e,t){return(!e$2b(i$l)||i$l.viewport.width!==e||i$l.viewport.height!==t)&&(i$l=d$1m.fromCache({viewport:new f$18(0,0,e,t)})),i$l}function r$p(e){if(!e.floatingPointTexture)return!1;var t=new f$n(e),i=new t$V({context:e,width:1,height:1,pixelFormat:V$10.RGBA}),n=new t$V({context:e,width:1,height:1,pixelFormat:V$10.RGBA,pixelDatatype:r$p._getFloatPixelType(),source:{width:1,height:1,arrayBufferView:r$p._getArray([123456,0,0,0])}}),r=new t$W({context:e,colorTextures:[i],destroyAttachments:!1}),o={framebuffer:r,x:0,y:0,width:1,height:1},a=!1,s=new t$I({name:"CheckFloatTexturePrecision",fragmentShaderSource:x$n,outputTexture:i,uniformMap:{u_floatTexture:function(){return n}},persists:!1,postExecute:function(){var t=e.readPixels(o);a=0===t[0]}});return s.execute(t),t.destroy(),r.destroy(),a}function t$h(e){this._renderTexture=new s$L(e),this._renderTexture._pixelDatatype=_$$.UNSIGNED_BYTE,this._context=e,this._isUpdate=!0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0};var t=e._gl,i=e$2b(e._currentFramebuffer)?e._currentFramebuffer._framebuffer:null;e.webgpu||t.bindFramebuffer(t.FRAMEBUFFER,i)}function a$i(e){this._context=e,this._frameBuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._upSampleWidth=Math.max(Math.pow(2,Math.ceil(Math.log(e.drawingBufferWidth)/Math.log(10))),8),this._upSampleHeight=Math.max(Math.pow(2,Math.ceil(Math.log(e.drawingBufferHeight)/Math.log(10))),8),this._upSampleViewport=new f$18(0,0,this._upSampleWidth,this._upSampleHeight)}f$n.prototype.execute=function(e){if(o$1q.defined("computeCommand",e),e$2b(e.preExecute)&&e.preExecute(e),!e$2b(e.fragmentShaderSource)&&!e$2b(e.shaderProgram))throw new t$16("computeCommand.fragmentShaderSource or computeCommand.shaderProgram is required.");o$1q.defined("computeCommand.outputTexture",e.outputTexture);var t=e.outputTexture,i=t.width,n=t.height,r=this._context,o=e$2b(e.vertexArray)?e.vertexArray:r.getViewportQuadVertexArray(),a=e$2b(e.shaderProgram)?e.shaderProgram:Q$h(r,e.name,e.fragmentShaderSource),s=M$n(r,t),l=u$_(e.renderState,F$i(i,n)),u=e.uniformMap;if(e.clear){var c=D$k;c.framebuffer=s,c.renderState=l,c.execute(r)}var h=R$k;h.vertexArray=o,h.count=void 0,h.renderState=l,h.shaderProgram=a,h.uniformMap=u,h.framebuffer=s,h.execute(r),s.destroy(),e.persists||(a.destroy(),e$2b(e.vertexArray)&&o.destroy()),e$2b(e.postExecute)&&e.postExecute(t)},f$n.prototype.isDestroyed=function(){return!1},f$n.prototype.destroy=function(){return i$10(this)},r$p._getFloatPixelType=function(){return _$$.FLOAT},r$p._getArray=function(e){return new Float32Array(e)},Object.defineProperties(t$h.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 32},set:function(e){}},frameBufferType:{get:function(){return Qe$c.CLAMP}}}),t$h.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},t$h.prototype.end=function(e){this._isUpdate=!0},t$h.prototype.update=function(e,t){},t$h.prototype.isDestroyed=function(){return!1},t$h.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)};var Q$g=new e$29,U$j=new e$29(1,1/255,1/65025,1/16581375);function C$m(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function v$l(e){e._frameBuffer=e._frameBuffer&&!e._frameBuffer.isDestroyed()&&e._frameBuffer.destroy()}function Y$d(e,t){e._depthTexture=new t$V({context:t,width:e._upSampleWidth,height:e._upSampleHeight,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE})}function q$i(e,t){C$m(e),v$l(e),Y$d(e,t),e._frameBuffer=new t$W({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function J$c(e,t){(!e$2b(e._frameBuffer)||!e$2b(e._depthTexture))&&q$i(e,t)}function K$d(e,t,i){if(!e$2b(e._copyDepthCommand)){e._copyDepthCommand=t.createViewportQuadCommand("uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = czm_packDepth(texture2D(u_texture, v_textureCoordinates).r);\n}\n",{renderState:d$1m.fromCache({viewport:e._upSampleViewport}),uniformMap:{u_texture:function(){return e._textureToCopy}},owner:e})}e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._frameBuffer,e$2b(e._clearCommand)||(e._clearCommand=new t$X({color:new e$1U(0,0,0,1),stencil:0,depth:1,owner:e})),e._clearCommand.framebuffer=e._frameBuffer}a$i.prototype.end=function(e,t,i){for(var n,r=e._context,o=r.drawingBufferWidth,a=r.drawingBufferHeight,s=this._upSampleWidth,l=this._upSampleHeight,u=Math.max(s,l),c=u*u,h=Math.floor(t/o*s),d=Math.floor(i/a*l),f=0,p=0,_=0,m=-1,g=this._frameBuffer,x=r.readPixels({x:0,y:0,width:s,height:l,framebuffer:g}),v=0,y=0;y<c;++y){if(-h<=f&&f<=h&&-d<=p&&p<=d){var $=4*((d-p)*s+f+h);if(n=e$29.unpack(x,$,Q$g),e$29.divideByScalar(n,255,n),(v=e$29.dot(n,U$j))>0&&v<1)break}if(f===p||f<0&&-f===p||f>0&&f===1-p){var b=_;_=-m,m=b}f+=_,p+=m}if(v>0&&v<1&&e._frustumCommandsList.length>0){var T=e._frustumCommandsList[0];e._context.uniformState.updateFrustum(T);var C=new o$1o(t,i);return s$Q.drawingBufferToWgs84Coordinates(e,C,v,new o$1p)}},a$i.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},a$i.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},a$i.prototype.clear=function(e,t){this._clearCommand.execute(e,t)},a$i.prototype.update=function(e,t){J$c(this,e),K$d(this,e,t)},a$i.prototype.isDestroyed=function(){return!1},a$i.prototype.destroy=function(){return C$m(this),v$l(this),this._copyDepthCommand.shaderProgram=e$2b(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy(),i$10(this)};var D$j="attribute aPosition : vec4<f32>;\nattribute textureCoordinates : vec2<f32>;\nvarying v_textureCoordinates : vec2<f32>;\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs { \n gl_Position = aPosition;\n v_textureCoordinates = textureCoordinates;\n}\n";function h$m(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}function T$j(e){const t=Object.keys(e).sort();return JSON.stringify(e,t)}function _$j(e,t){for(var i=t.derivedKeywords,n=i.length,r=0;r<n;++r){var o=i[r]+t.keyword;_$j(e,e._shaders[o])}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}function r$o(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}function i$k(e){e=u$_(e,u$_.EMPTY_OBJECT),this.color=e$2b(e.color)?e$1U.clone(e.color):e$1U.WHITE,this.intensity=u$_(e.intensity,2)}Object.defineProperties(h$m.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}}),h$m.prototype.replaceShaderProgram=function(e){return e$2b(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)},h$m.prototype.getShaderProgram=function(e){var t=e.vertexShaderSource,i=e.fragmentShaderSource,n=e.attributeLocations,r=e.varyings,o=e.bufferMode,a=u$_(e.useWGSL,!1);"string"==typeof t?t=new s$U({sources:[t],useWGSL:a}):!0===t.useWGSL&&(a=!0),"string"==typeof i?i=new s$U({sources:[i],useWGSL:a}):!0===i.useWGSL&&(a=!0);const s=t.getCacheKey(this._context),l=i.getCacheKey(this._context),u=e$2b(n)?T$j(n):"",c=`${s}:${l}:${u}`,h=this._getShaderProgramName(e,u,t,i);var d;if(e$2b(this._shaders[c]))d=this._shaders[c],delete this._shadersToRelease[c];else{const s=t.createCombinedVertexShader(this._context),l=i.createCombinedFragmentShader(this._context);var f=this._context,p=new(f.webgpu?m$Z:g$18)({context:f,gl:f._gl,logShaderCompilation:f.logShaderCompilation,debugShaders:f.debugShaders,vertexShaderSource:t,vertexShaderText:s,fragmentShaderSource:i,fragmentShaderText:l,attributeLocations:n,transformFeedbackVaryings:e.transformFeedbackVaryings,varyings:r,bufferMode:o,name:h,useWGSL:a});d={cache:this,shaderProgram:p,keyword:c,derivedKeywords:[],count:0},p._cachedShader=d,this._shaders[c]=d,++this._numberOfShaders}return++d.count,d.shaderProgram},h$m.prototype._getShaderProgramName=function(e,t,i,n){if(e$2b(e.name))return e.name;return`${i._getKeyForShaderProgramName()}:${n._getKeyForShaderProgramName()}:${t}`},h$m.prototype.replaceDerivedShaderProgram=function(e,t,i){var n=e._cachedShader,r=t+n.keyword,o=this._shaders[r];if(e$2b(o)){_$j(this,o);var a=n.derivedKeywords.indexOf(t);a>-1&&n.derivedKeywords.splice(a,1)}return this.createDerivedShaderProgram(e,t,i)},h$m.prototype.getDerivedShaderProgram=function(e,t){var i=t+e._cachedShader.keyword,n=this._shaders[i];if(e$2b(n))return n.shaderProgram},h$m.prototype.createDerivedShaderProgram=function(e,t,i){var n=e._cachedShader,r=t+n.keyword,o=i.vertexShaderSource,a=i.fragmentShaderSource,s=i.attributeLocations,l=i.varyings,u=i.bufferMode;"string"==typeof o&&(o=new s$U({sources:[o]})),"string"==typeof a&&(a=new s$U({sources:[a]}));var c=this._context,h=o.createCombinedVertexShader(c),d=a.createCombinedFragmentShader(c),f=new(c.webgpu?m$Z:g$18)({context:c,gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:o,vertexShaderText:h,fragmentShaderSource:a,fragmentShaderText:d,attributeLocations:s,transformFeedbackVaryings:i.transformFeedbackVaryings,varyings:l,bufferMode:u,name:e.name+t,useWGSL:o.useWGSL}),p={cache:this,shaderProgram:f,keyword:r,derivedKeywords:[],count:0};return n.derivedKeywords.push(t),f._cachedShader=p,this._shaders[r]=p,f},h$m.prototype.destroyReleasedShaderPrograms=function(){var e=this._shadersToRelease;for(var t in e)if(e.hasOwnProperty(t)){_$j(this,e[t]),--this._numberOfShaders}this._shadersToRelease={}},h$m.prototype.releaseShaderProgram=function(e){if(e$2b(e)){var t=e._cachedShader;t&&0==--t.count&&(this._shadersToRelease[t.keyword]=t)}},h$m.prototype.isDestroyed=function(){return!1},h$m.prototype.destroy=function(){var e=this._shaders;for(var t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return i$10(this)},Object.defineProperties(r$o.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}}),r$o.prototype.getTexture=function(e){var t=this._textures[e];if(e$2b(t))return delete this._texturesToRelease[e],++t.count,t.texture},r$o.prototype.addTexture=function(e,t){var i={texture:t,count:1};t.finalDestroy=t.destroy;var n=this;t.destroy=function(){0==--i.count&&(n._texturesToRelease[e]=i)},this._textures[e]=i,++this._numberOfTextures},r$o.prototype.destroyReleasedTextures=function(){var e=this._texturesToRelease;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];delete this._textures[t],i.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}},r$o.prototype.isDestroyed=function(){return!1},r$o.prototype.destroy=function(){var e=this._textures;for(var t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return i$10(this)};const _0x55b84b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x470ce1=_0x55b84b(void 0,(function(){return _0x470ce1.toString().search("(((.+)+)+)+$").toString().constructor(_0x470ce1).search("(((.+)+)+)+$")}));function _0x3de36a(e){var t=_0x3e2f69.call(this)||this;t._name=_0x27131a.LIGHT,t._uniformState=e,t._lightGridTableTexture=void 0,t._globalLightListTexture=void 0}_0x470ce1();const _0x562fca="uLightGridTexture",_0x43e94a="uGlobalLightListTexture";_0x3e2f69&&(_0x3de36a.__proto__=_0x3e2f69),_0x3de36a.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x3de36a.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x3de36a.prototype,{lightGridTexture:{get:function(){return this._lightGridTableTexture},set:function(e){this._lightGridTableTexture=e,this._isTextureDirty=!0}},globalLightListTexture:{get:function(){return this._globalLightListTexture},set:function(e){this._globalLightListTexture=e,this._isTextureDirty=!0}}}),_0x3de36a.prototype._initUBOStruct=function(){this._ubo.addUniform("uPointLightPositionEC",3,s$I.MaxPointLightCount),this._ubo.addUniform("uPointLightColor",3,s$I.MaxPointLightCount),this._ubo.addUniform("uPointLightDistanceAndDecay",4,s$I.MaxPointLightCount),this._ubo.addUniform("uSpotLightColorAndExponent",4,s$I.MaxSpotLightCount),this._ubo.addUniform("uSpotLightPositionEC",3,s$I.MaxSpotLightCount),this._ubo.addUniform("uSpotLightDirectionEC",3,s$I.MaxSpotLightCount),this._ubo.addUniform("uSpotLightDistanceDecayCosPenumbra",4,s$I.MaxSpotLightCount),this._ubo.addUniform("uDirectionalLightDirectionEC",3,s$I.MaxDirectionLightCount),this._ubo.addUniform("uDirectionalLightDirection",3,s$I.MaxDirectionLightCount),this._ubo.addUniform("uDirectionalLightColor",3,s$I.MaxDirectionLightCount),this._ubo.addUniform("uAmbientLightColor",4),this._ubo.addUniform("uSunLightColor",4),this._ubo.addUniform("uSunDirectionEC",3),this._ubo.addUniform("uSkyColor",3),this._ubo.addUniform("uGroundColor",3),this._ubo.addUniform("uSunLightON",1),this._ubo.addUniform("uPointLightCount",1),this._ubo.addUniform("uSpotLightCount",1),this._ubo.addUniform("uDirLightCount",1)},_0x3de36a.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):e.webgpu&&(this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1)),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},new o$1o;const _0x5a3073=new o$1o,_0x303028=new e$29;_0x3de36a.prototype.update=function(e){const t=e.context,i=e.lightSource;if(!t.webgpu&&!t.webgl2)return void this._initUniformMap(t,i);e$2b(this._ubo)||this._initUBO(t);const n=this._ubo;var r=i.ambientLightColor,o=i.sunLightColor;n.updateFloat4("uAmbientLightColor",r.red,r.green,r.blue,r.alpha),n.updateFloat4("uSunLightColor",o.red,o.green,o.blue,o.alpha),n.updateFloat("uSunLightON",i.sunLightON),_0x3e2f69.writeCartesian3ToUBO("uSunDirectionEC",this._ubo,this._uniformState.sunDirectionEC);let a=i.directionalLight.values,s=a.length;if(s=Math.min(s,s$I.MaxDirectionLightCount),s>0){const e=[],t=[],i=[];for(let n=0;n<s;n++){const r=a[n],o=r.lightColor;o$1p.pack(r.directionEC,e,3*n),o$1p.pack(r.direction,t,3*n),_0x5a3073.x=o.red,_0x5a3073.y=o.green,_0x5a3073.z=o.blue,o$1p.pack(_0x5a3073,i,3*n)}n.updateInt("uDirLightCount",s),n.updateFloatArray("uDirectionalLightDirectionEC",e),n.updateFloatArray("uDirectionalLightDirection",t),n.updateFloatArray("uDirectionalLightColor",i)}if(a=i._visibleLightList[_0x1d9df9.POINT].values,s=a.length,s=Math.min(s,s$I.MaxPointLightCount),s>0){const e=[],t=[],i=[];for(let n=0;n<s;n++){const r=a[n],o=r.lightColor;o$1p.pack(r.positionEC,e,3*n),_0x5a3073.x=o.red,_0x5a3073.y=o.green,_0x5a3073.z=o.blue,o$1p.pack(_0x5a3073,t,3*n),_0x303028.x=r.cutoffDistance,_0x303028.y=r.decay,_0x303028.z=0,_0x303028.w=0,e$29.pack(_0x303028,i,4*n)}n.updateInt("uPointLightCount",s),n.updateFloatArray("uPointLightPositionEC",e),n.updateFloatArray("uPointLightColor",t),n.updateFloatArray("uPointLightDistanceAndDecay",i)}if(a=i._visibleLightList[_0x1d9df9.SPOT].values,s=a.length,s=Math.min(s,s$I.MaxSpotLightCount),s>0){const e=[],t=[],i=[],r=[];for(let n=0;n<s;n++){const o=a[n],s=o.lightColor;o$1p.pack(o.positionEC,e,3*n),_0x303028.x=s.red,_0x303028.y=s.green,_0x303028.z=s.blue,_0x303028.w=o.exponent,e$29.pack(_0x303028,t,4*n),o$1p.pack(o.directionEC,i,3*n),_0x303028.x=o.distance,_0x303028.y=o.decay,_0x303028.z=o.angleCos,_0x303028.w=o.penumbraCos,e$29.pack(_0x303028,r,4*n)}n.updateInt("uSpotLightCount",s),n.updateFloatArray("uSpotLightPositionEC",e),n.updateFloatArray("uSpotLightColorAndExponent",t),n.updateFloatArray("uSpotLightDirectionEC",i),n.updateFloatArray("uSpotLightDistanceDecayCosPenumbra",r)}if(a=i._lightList[_0x1d9df9.HEMISPHERE].values,s=a.length,s>0){const e=a[0],t=e.skyColor,i=e.groundColor;n.updateFloat3("uSkyColor",t.red,t.green,t.blue),n.updateFloat3("uGroundColor",i.red,i.green,i.blue)}this._ubo.update(),this._isValueDirty=!1},_0x3de36a.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),this._setTextureToEffect(e,this._lightGridTableTexture,_0x562fca),this._setTextureToEffect(e,this._globalLightListTexture,_0x43e94a)},_0x3de36a.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x3de36a.prototype._initUniformMap=function(e,t){if(!e$2b(this._uniformMap)){var i=this._uniformState,n={uAmbientLightColor:function(){return t.ambientLightColor},uSunLightColor:function(){return t.sunLightColor},uSunLightON:function(){return t.sunLightON}};n.uSunLightON=function(){return t.sunLightON},n.uSunDirectionEC=function(){return i.sunDirectionEC},n.uDirLightCount=function(){let e=t.directionalLight.values.length;return Math.min(e,s$I.MaxDirectionLightCount)},n.uDirectionalLightDirectionEC=function(){let e=t.directionalLight.values,i=e.length;i=Math.min(i,s$I.MaxDirectionLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.directionEC,n,3*t)}return n},n.uDirectionalLightDirection=function(){let e=t.directionalLight.values,i=e.length;i=Math.min(i,s$I.MaxDirectionLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.direction,n,3*t)}return n},n.uDirectionalLightColor=function(){let e=t.directionalLight.values,i=e.length;i=Math.min(i,s$I.MaxDirectionLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t].lightColor;_0x5a3073.x=i.red,_0x5a3073.y=i.green,_0x5a3073.z=i.blue,o$1p.pack(_0x5a3073,n,3*t)}return n},n.uPointLightCount=function(){let e=t._visibleLightList[_0x1d9df9.POINT].values.length;return Math.min(e,s$I.MaxPointLightCount)},n.uPointLightPositionEC=function(){const e=t._visibleLightList[_0x1d9df9.POINT].values;let i=e.length;i=Math.min(i,s$I.MaxPointLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.positionEC,n,3*t)}return n},n.uPointLightColor=function(){const e=t._visibleLightList[_0x1d9df9.POINT].values;let i=e.length;i=Math.min(i,s$I.MaxPointLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t].lightColor;_0x5a3073.x=i.red,_0x5a3073.y=i.green,_0x5a3073.z=i.blue,o$1p.pack(_0x5a3073,n,3*t)}return n},n.uPointLightDistanceAndDecay=function(){const e=t._visibleLightList[_0x1d9df9.POINT].values;let i=e.length;i=Math.min(i,s$I.MaxPointLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];_0x303028.x=i.cutoffDistance,_0x303028.y=i.decay,_0x303028.z=0,_0x303028.w=0,e$29.pack(_0x303028,n,4*t)}return n},n.uSpotLightCount=function(){let e=t._visibleLightList[_0x1d9df9.SPOT].values.length;return Math.min(e,s$I.MaxSpotLightCount)},n.uSpotLightPositionEC=function(){const e=t._visibleLightList[_0x1d9df9.SPOT].values;let i=e.length;i=Math.min(i,s$I.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.positionEC,n,3*t)}return n},n.uSpotLightColorAndExponent=function(){const e=t._visibleLightList[_0x1d9df9.SPOT].values;let i=e.length;i=Math.min(i,s$I.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t],r=i.lightColor;_0x303028.x=r.red,_0x303028.y=r.green,_0x303028.z=r.blue,_0x303028.w=i.exponent,e$29.pack(_0x303028,n,4*t)}return n},n.uSpotLightDirectionEC=function(){const e=t._visibleLightList[_0x1d9df9.SPOT].values;let i=e.length;i=Math.min(i,s$I.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.directionEC,n,3*t)}return n},n.uSpotLightDistanceDecayCosPenumbra=function(){const e=t._visibleLightList[_0x1d9df9.SPOT].values;let i=e.length;i=Math.min(i,s$I.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];_0x303028.x=i.distance,_0x303028.y=i.decay,_0x303028.z=i.angleCos,_0x303028.w=i.penumbraCos,e$29.pack(_0x303028,n,4*t)}return n},n.uSkyColor=function(){const e=t._lightList[_0x1d9df9.HEMISPHERE].values;return e.length>0?e[0].skyColor:Color.WHITE},n.uGroundColor=function(){const e=t._lightList[_0x1d9df9.HEMISPHERE].values;return e.length>0?e[0].groundColor:Color.WHITE},this._uniformMap=n}},_0x3de36a.prototype.isDestroyed=function(){return!1},_0x3de36a.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};var _0x5ed29b=(_0x176e7b=!0,function(e,t){var i=_0x176e7b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x176e7b=!1,i}),_0x38aba2=_0x5ed29b(void 0,(function(){return _0x38aba2.toString().search("(((.+)+)+)+$").toString().constructor(_0x38aba2).search("(((.+)+)+)+$")})),_0x176e7b;_0x38aba2();const _0x1440ff="uBrdfLut",_0x523ae7="uSpecularEnvironmentMaps",_0x130209="uEnvironmentMap",_0x20ca3f="uHdrEnvMap";function _0x4116a0(e){var t=_0x3e2f69.call(this)||this;t._name=_0x27131a.SCENE,t._brdfLutTexture=void 0,t._specularEnvironmentMaps=void 0,t._environmentMap=void 0,t._hdrEnvMap=void 0,t._uniformState=e}function P$l(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new f$18,this._viewportCartesian4=new e$29,this._viewportDirty=!1,this._viewportOrthographicMatrix=p$1d.clone(p$1d.IDENTITY),this._viewportTransformation=p$1d.clone(p$1d.IDENTITY),this._model=p$1d.clone(p$1d.IDENTITY),this._view=p$1d.clone(p$1d.IDENTITY),this._inverseView=p$1d.clone(p$1d.IDENTITY),this._projection=p$1d.clone(p$1d.IDENTITY),this._infiniteProjection=p$1d.clone(p$1d.IDENTITY),this._entireFrustum=new o$1o,this._currentFrustum=new o$1o,this._frustumPlanes=new e$29,this._frameState=void 0,this._temeToPseudoFixed=p$1e.clone(p$1d.IDENTITY),this._view3DDirty=!0,this._view3D=new p$1d,this._inverseView3DDirty=!0,this._inverseView3D=new p$1d,this._inverseModelDirty=!0,this._inverseModel=new p$1d,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new p$1e,this._viewRotation=new p$1e,this._inverseViewRotation=new p$1e,this._viewRotation3D=new p$1e,this._inverseViewRotation3D=new p$1e,this._inverseProjectionDirty=!0,this._inverseProjection=new p$1d,this._modelViewDirty=!0,this._modelView=new p$1d,this._modelView3DDirty=!0,this._modelView3D=new p$1d,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new p$1d,this._inverseModelViewDirty=!0,this._inverseModelView=new p$1d,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new p$1d,this._viewProjectionDirty=!0,this._viewProjection=new p$1d,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new p$1d,this._modelViewProjectionDirty=!0,this._modelViewProjection=new p$1d,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new p$1d,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new p$1d,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new p$1d,this._mvpViewPortDirty=!0,this._mvpViewPort=new p$1d,this._normalDirty=!0,this._normal=new p$1e,this._normal3DDirty=!0,this._normal3D=new p$1e,this._inverseNormalDirty=!0,this._inverseNormal=new p$1e,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new p$1e,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new i$11,this._encodedOriginCameraPositionMC=new i$11,this._cameraPosition=new o$1p,this._sunPositionWC=new o$1p,this._sunPositionColumbusView=new o$1p,this._sunDirectionWC=new o$1p,this._sunDirectionEC=new o$1p,this._sunColor=new o$1p,this._moonDirectionEC=new o$1p,this._lightDirectionWC=new o$1p,this._lightDirectionEC=new o$1p,this._lightColor=new o$1p,this._lightColorHdr=new o$1p,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._cameraDirection=new o$1p,this._cameraRight=new o$1p,this._cameraUp=new o$1p,this._frustum2DWidth=0,this._eyeHeight2D=new o$1o,this._resolutionScale=1,this._pixelRatio=1,this._eyeHeight=0,this._orthographicIn3D=!1,this._backgroundColor=new e$1U,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsDimensions=new o$1o,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._invertClassificationColor=void 0,this._imagerySplitPosition=new o$1o,this._globeSplitPosition=new o$1o,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0,this._globeDepthTextureDim=new o$1o,this._silverLightingAtmosphere=void 0,this._hdrEnvMap=void 0,this._toneMappingExposure=1,this._envMapIntensity=1,this._sceneUBO=new _0x4116a0(this),this._lightUBO=new _0x3de36a(this),this._relativeOrigin=new o$1p,this.useRelativeOrigin=!0}function Q$f(e,t){p$1d.clone(t,e._view),p$1d.getRotation(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0,e._mvpViewPortDirty=!0}function X$c(e,t){p$1d.clone(t,e._inverseView),p$1d.getRotation(t,e._inverseViewRotation)}function $$h(e){var t=e._frameState;if(e$2b(t)&&t.TAAEnable&&"normal"===t._fboState.name){var i=e._projection;i[8]+=t.jitter.x,i[9]+=t.jitter.y}}function S$j(e,t){p$1d.clone(t,e._projection),$$h(e),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._mvpViewPortDirty=!0}function ii(e,t){p$1d.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}function ei(e,t){o$1p.clone(t.positionWC,e._cameraPosition),o$1p.clone(t.directionWC,e._cameraDirection),o$1p.clone(t.rightWC,e._cameraRight),o$1p.clone(t.upWC,e._cameraUp);const i=t.positionCartographic;e$2b(i)?e._eyeHeight=i.height:e._eyeHeight=-e._ellipsoid.maximumRadius,e._encodedCameraPositionMCDirty=!0}_0x3e2f69&&(_0x4116a0.__proto__=_0x3e2f69),_0x4116a0.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x4116a0.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x4116a0.prototype,{}),_0x4116a0.prototype._initUBOStruct=function(){this._ubo.addUniform("uView",16),this._ubo.addUniform("uProjection",16),this._ubo.addUniform("uViewProjection",16),this._ubo.addUniform("uInverseView",16),this._ubo.addUniform("uInverseProjection",16),this._ubo.addUniform("uInverseViewProjection",16),this._ubo.addUniform("uViewportTransformation",16),this._ubo.addUniform("uViewRotation",9),this._ubo.addUniform("uInverseViewRotation",9),this._ubo.addUniform("uTemeToPseudoFixed",9),this._ubo.addUniform("uViewport",4),this._ubo.addUniform("uFrustumPlanes",4),this._ubo.addUniform("uRelativeOrigin",3),this._ubo.addUniform("uCurrentFrustum",2),this._ubo.addUniform("uFarDepthFromNearPlusOne",1),this._ubo.addUniform("uLog2FarDepthFromNearPlusOne",1),this._ubo.addUniform("uOneOverLog2FarDepthFromNearPlusOne",1),this._ubo.addUniform("uFrameNumber",1),this._ubo.addUniform("uPixelRatio",1),this._ubo.addUniform("uResolutionScale",1),this._ubo.addUniform("uGamma",1),this._ubo.addUniform("uToneMappingExposure",1),this._ubo.addUniform("uEnvMapIntensity",1),this._ubo.addUniform("uSpecularEnvironmentMapSize",2),this._ubo.addUniform("uSpecularEnvironmentMapsMaximumLOD",1),this._ubo.addUniform("uSphericalHarmonicCoefficients",3,9)},_0x4116a0.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):e.webgpu&&(this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1)),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x4116a0.prototype.update=function(e,t){if(e.webgpu||e.webgl2){if(e$2b(this._ubo)||this._initUBO(e),_0x3e2f69.writeCartesian4ToUBO("uViewport",this._ubo,t.viewportCartesian4),_0x3e2f69.writeMatrix4ToUBO("uView",this._ubo,t.view),_0x3e2f69.writeMatrix3ToUBO("uViewRotation",this._ubo,t.viewRotation),_0x3e2f69.writeMatrix4ToUBO("uInverseView",this._ubo,t.inverseView),_0x3e2f69.writeMatrix3ToUBO("uInverseViewRotation",this._ubo,t.inverseViewRotation),_0x3e2f69.writeMatrix4ToUBO("uProjection",this._ubo,t.projection),_0x3e2f69.writeMatrix4ToUBO("uInverseProjection",this._ubo,t.inverseProjection),_0x3e2f69.writeMatrix4ToUBO("uViewProjection",this._ubo,t.viewProjection),_0x3e2f69.writeMatrix4ToUBO("uInverseViewProjection",this._ubo,t.inverseViewProjection),_0x3e2f69.writeMatrix4ToUBO("uViewportTransformation",this._ubo,t.viewportTransformation),_0x3e2f69.writeCartesian2ToUBO("uCurrentFrustum",this._ubo,t.currentFrustum),_0x3e2f69.writeCartesian4ToUBO("uFrustumPlanes",this._ubo,t.frustumPlanes),_0x3e2f69.writeCartesian3ToUBO("uRelativeOrigin",this._ubo,t.relativeOrigin),this._ubo.updateFloat("uFarDepthFromNearPlusOne",t.farDepthFromNearPlusOne),this._ubo.updateFloat("uLog2FarDepthFromNearPlusOne",t.log2FarDepthFromNearPlusOne),this._ubo.updateFloat("uOneOverLog2FarDepthFromNearPlusOne",t.oneOverLog2FarDepthFromNearPlusOne),this._ubo.updateFloat("uFrameNumber",t.frameState.frameNumber),_0x3e2f69.writeMatrix3ToUBO("uTemeToPseudoFixed",this._ubo,t.temeToPseudoFixedMatrix),this._ubo.updateFloat("uPixelRatio",t.pixelRatio),this._ubo.updateFloat("uResolutionScale",t.resolutionScale),this._ubo.updateFloat("uGamma",t.gamma),this._ubo.updateFloat("uToneMappingExposure",t.toneMappingExposure),this._ubo.updateFloat("uEnvMapIntensity",t.envMapIntensity),t.specularEnvironmentMapsDimensions&&this._ubo.updateFloat2("uSpecularEnvironmentMapSize",t.specularEnvironmentMapsDimensions.x,t.specularEnvironmentMapsDimensions.y),t.specularEnvironmentMapsMaximumLOD&&this._ubo.updateFloat("uSpecularEnvironmentMapsMaximumLOD",t.specularEnvironmentMapsMaximumLOD),t.sphericalHarmonicCoefficients){for(var i=[],n=0;n<t.sphericalHarmonicCoefficients.length;n++){var r=t.sphericalHarmonicCoefficients[n];o$1p.pack(r,i,3*n)}this._ubo.updateFloatArray("uSphericalHarmonicCoefficients",i)}this._ubo.update(),this._brdfLutTexture=t.brdfLut,this._specularEnvironmentMaps=t.specularEnvironmentMaps,this._environmentMap=t.environmentMap,this._hdrEnvMap=t.hdrEnvMap}},_0x4116a0.prototype._initUniformMap=function(e){if(!e.webgl2&&!e.webgpu){var t=this._uniformState;this._uniformMap={},this._uniformMap.uView=function(){return t.view},this._uniformMap.uProjection=function(){return t.projection},this._uniformMap.uViewProjection=function(){return t.viewProjection},this._uniformMap.uInverseView=function(){return t.inverseView},this._uniformMap.uInverseProjection=function(){return t.inverseProjection},this._uniformMap.uInverseViewProjection=function(){return t.inverseViewProjection},this._uniformMap.uViewportTransformation=function(){return t.viewportTransformation},this._uniformMap.uViewRotation=function(){return t.viewRotation},this._uniformMap.uInverseViewRotation=function(){return t.inverseViewRotation},this._uniformMap.uTemeToPseudoFixed=function(){return t.temeToPseudoFixedMatrix},this._uniformMap.uViewport=function(){return t.viewportCartesian4},this._uniformMap.uFrustumPlanes=function(){return t.frustumPlanes},this._uniformMap.uRelativeOrigin=function(){return t.relativeOrigin},this._uniformMap.uCurrentFrustum=function(){return t.currentFrustum},this._uniformMap.uFarDepthFromNearPlusOne=function(){return t.farDepthFromNearPlusOne},this._uniformMap.uLog2FarDepthFromNearPlusOne=function(){return t.log2FarDepthFromNearPlusOne},this._uniformMap.uOneOverLog2FarDepthFromNearPlusOne=function(){return t.oneOverLog2FarDepthFromNearPlusOne},this._uniformMap.uFrameNumber=function(){return t.frameNumber},this._uniformMap.uPixelRatio=function(){return t.pixelRatio},this._uniformMap.uResolutionScale=function(){return t.resolutionScale},this._uniformMap.uGamma=function(){return t.gamma},this._uniformMap.uToneMappingExposure=function(){return t.toneMappingExposure},this._uniformMap.uEnvMapIntensity=function(){return t.envMapIntensity},this._uniformMap.uSpecularEnvironmentMapSize=function(){return t.specularEnvironmentMapsDimensions},this._uniformMap.uSpecularEnvironmentMapsMaximumLOD=function(){return t.specularEnvironmentMapsMaximumLOD},this._uniformMap.uSphericalHarmonicCoefficients=function(){return t.sphericalHarmonicCoefficients}}},_0x4116a0.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),this._setTextureToEffect(e,this._brdfLutTexture,_0x1440ff),this._setTextureToEffect(e,this._specularEnvironmentMaps,_0x523ae7),this._setTextureToEffect(e,this._environmentMap,_0x130209),this._setTextureToEffect(e,this._hdrEnvMap,_0x20ca3f)},_0x4116a0.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x4116a0.prototype.isDestroyed=function(){return!1},_0x4116a0.prototype.destroy=function(){return this._ubo.dispose(),destroyObject(this)},Object.defineProperties(P$l.prototype,{eyeHeight:{get:function(){return this._eyeHeight}},toneMappingExposure:{get:function(){return this._toneMappingExposure}},envMapIntensity:{get:function(){return this._envMapIntensity}},frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!f$18.equals(e,this._viewport)){f$18.clone(e,this._viewport);var t=this._viewport,i=this._viewportCartesian4;i.x=t.x,i.y=t.y,i.z=t.width,i.w=t.height,this._viewportDirty=!0,this._mvpViewPortDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return Y$c(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return Y$c(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){p$1d.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0,this._mvpViewPortDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,p$1d.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){var e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,p$1d.getRotation(this.inverseModel,e),p$1e.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return N$d(this),this._view3D}},viewRotation:{get:function(){return N$d(this),this._viewRotation}},viewRotation3D:{get:function(){return N$d(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return G$j(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return G$j(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return si(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return li$1(this),this._modelView}},modelView3D:{get:function(){return hi$1(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return pi$2(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return ci$2(this),this._inverseModelView}},inverseModelView3D:{get:function(){return _i$2(this),this._inverseModelView3D}},viewProjection:{get:function(){return ai(this),this._viewProjection}},inverseViewProjection:{get:function(){return ui$1(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return di$1(this),this._modelViewProjection}},mvpViewPort:{get:function(){return vi$2(this),this._mvpViewPort}},inverseModelViewProjection:{get:function(){return Di$2(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return wi$2(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return gi$2(this),this._modelViewInfiniteProjection}},normal:{get:function(){return mi(this),this._normal}},normal3D:{get:function(){return yi$2(this),this._normal3D}},inverseNormal:{get:function(){return Pi$2(this),this._inverseNormal}},inverseNormal3D:{get:function(){return fi$1(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},sunColor:{get:function(){return this._sunColor}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return k$i(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return k$i(this),this._encodedCameraPositionMC.low}},encodedOriginCameraPositionMCHigh:{get:function(){return q$h(this),this._encodedOriginCameraPositionMC.high}},encodedOriginCameraPositionMCLow:{get:function(){return q$h(this),this._encodedOriginCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},resolutionScale:{get:function(){return this._resolutionScale}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsDimensions:{get:function(){return this._specularEnvironmentMapsDimensions}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},imagerySplitPosition:{get:function(){return this._imagerySplitPosition}},globeSplitPosition:{get:function(){return this._globeSplitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},globeDepthTextureDim:{get:function(){return this._globeDepthTextureDim}},sceneUBO:{get:function(){return this._sceneUBO}},relativeOrigin:{get:function(){return this._relativeOrigin}},hdrEnvMap:{get:function(){return this._hdrEnvMap}}});var j$j=new p$1e,ti=new a$18;function ni(e,t){e$2b(m$17.computeIcrfToFixedMatrix(t.time,j$j))||(j$j=m$17.computeTemeToPseudoFixedMatrix(t.time,j$j));var i=F$H.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);p$1e.multiplyByVector(j$j,i,i),o$1p.normalize(i,e._sunDirectionWC),i=p$1e.multiplyByVector(e.viewRotation3D,i,e._sunDirectionEC),o$1p.normalize(i,i),i=F$H.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),p$1e.multiplyByVector(j$j,i,i),p$1e.multiplyByVector(e.viewRotation3D,i,i),o$1p.normalize(i,i);var n=t.mapProjection,r=n.ellipsoid.cartesianToCartographic(e._sunPositionWC,ti);n.project(r,e._sunPositionColumbusView)}new o$1p;var V$g=new p$1d,M$m=new p$1d,A$p=new o$1p;P$l.prototype.updateCamera=function(e,t){var i=e.positionCartographic.height,n=e.positionWC,r=o$1p.distance(n,t.relativeOrigin),o=e$2b(this._frameState)&&this._frameState._fboState.enabled;t.enableRelativeOrigin&&!o&&i<1e4&&r>2e4&&(t.relativeOrigin=n),o$1p.clone(t.relativeOrigin,this._relativeOrigin),o$1p.subtract(n,t.relativeOrigin,A$p),p$1d.clone(e.inverseViewMatrix,M$m),p$1d.setTranslation(M$m,A$p,M$m),p$1d.inverse(M$m,V$g),e.bReflect&&(p$1d.multiply(V$g,e._reflectMatrix,V$g),p$1d.inverse(V$g,M$m),e.frustum.currentViewMatrix=p$1d.clone(V$g,e.frustum.currentViewMatrix)),Q$f(this,V$g),X$c(this,M$m),ei(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==C$13.SCENE2D&&e.frustum instanceof a$V,this._sceneUBO.update(t,this)},P$l.prototype.updateFrustum=function(e){S$j(this,e.projectionMatrix),e$2b(e.infiniteProjectionMatrix)&&ii(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=e$2a.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne,e$2b(e._offCenterFrustum)&&(e=e._offCenterFrustum),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right,e$2b(this._frameState)&&this._sceneUBO.update(this._frameState.context,this)},P$l.prototype.updatePass=function(e){this._pass=e};var U$i=new o$1p;P$l.prototype.updateLightSource=function(e){if(e$2b(e)){var t=e.pointLight.values,i=e.spotLight.values,n=e.directionalLight.values,r=e.hemisphereLight.values,o=e._visibleLightList[_0x1d9df9.POINT],a=e._visibleLightList[_0x1d9df9.SPOT];o.removeAll(),a.removeAll();var s,l,u,c,h,d=[];for(s=0,l=t.length;s<l;s++){(c=t[s]).sceneMode=this._frameState.mode;var f=o$1p.subtract(c.position,this._relativeOrigin,U$i);p$1d.multiplyByPoint(this._view,f,c._positionEC),(h=o$1p.distance(this._frameState.camera.positionWC,c.position))<e.visibleDistanceMax&&d.push([h,c])}for(d.length>e._visibleCountAllowed&&(d.sort((function(e,t){return e[0]-t[0]})),d=d.slice(0,e._visibleCountAllowed)),u=0;u<d.length;u++)c=d[u][1],o.set(c.id,c);for(d=[],s=0,l=i.length;s<l;s++){(c=i[s]).sceneMode=this._frameState.mode;f=o$1p.subtract(c.position,this._relativeOrigin,U$i);p$1d.multiplyByPoint(this._view,f,c._positionEC),p$1e.multiplyByVector(this.viewRotation,c.direction,c._directionEC),o$1p.normalize(c._directionEC,c._directionEC),h=o$1p.distance(this._frameState.camera.positionWC,c.position),c.computeVisiblityInCullingVolume(this._frameState.cullingVolume)&&h<e.visibleDistanceMax&&d.push([h,c])}for(d.length>e._visibleCountAllowed&&(d.sort((function(e,t){return e[0]-t[0]})),d=d.slice(0,e._visibleCountAllowed)),u=0;u<d.length;u++)c=d[u][1],a.set(c.id,c);for(s=0,l=n.length;s<l;s++)(c=n[s]).sceneMode=this._frameState.mode,p$1e.multiplyByVector(this.viewRotation,c.direction,c._directionEC),o$1p.normalize(c._directionEC,c._directionEC);o.length!==e._visiblePointLightCount&&(e._changedLightList.set(_0x1d9df9.POINT,{count:o.length,type:_0x1d9df9.POINT}),e._visiblePointLightCount=o.length),a.length!==e._visibleSpotLightCount&&(e._changedLightList.set(_0x1d9df9.SPOT,{count:a.length,type:_0x1d9df9.SPOT}),e._visibleSpotLightCount=a.length),n.length!==e._visibleDirectionalLightCount&&(e._changedLightList.set(_0x1d9df9.DIRECTIONAL,{count:n.length,type:_0x1d9df9.DIRECTIONAL}),e._visibleDirectionalLightCount=n.length),r.length!==e._visibleHemisphereLightCount&&(e._changedLightList.set(_0x1d9df9.HEMISPHERE,{count:r.length,type:_0x1d9df9.HEMISPHERE}),e._visibleHemisphereLightCount=r.length),e.combineUniformValue()}};var oi=[],ri=new i$k;function Y$c(e){if(e._viewportDirty){var t=e._viewport;p$1d.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),p$1d.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1,e._mvpViewPortDirty=!0}}function si(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode===C$13.SCENE2D||e._mode===C$13.MORPHING||e._orthographicIn3D?p$1d.clone(p$1d.ZERO,e._inverseProjection):p$1d.inverse(e._projection,e._inverseProjection))}P$l.prototype.update=function(e){this._frameState=e,this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,e.context._canvas,this._resolutionScale=e.pixelRatio,this._pixelRatio=e.pixelRatio;var t=e.camera;this.updateCamera(t,e.context),e.mode===C$13.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=.5*this._frustum2DWidth,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),ni(this,e);var i=u$_(e.light,ri);i instanceof i$k?(this._lightDirectionWC=o$1p.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=o$1p.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=o$1p.normalize(o$1p.negate(i.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=p$1e.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));var n=i.color,r=o$1p.fromElements(n.red,n.green,n.blue,this._lightColorHdr);r=o$1p.multiplyByScalar(r,i.intensity,r);var o=o$1p.maximumComponent(r);o>1?o$1p.divideByScalar(r,o,this._lightColor):o$1p.clone(r,this._lightColor),this._sunColor=o$1p.clone(e.sunColor,this._sunColor);var a=e.brdfLutGenerator;e$2b(a)&&a.update(e);var s=e$2b(a)?a.colorTexture:void 0;this._brdfLut=s,this._environmentMap=u$_(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=u$_(e.sphericalHarmonicCoefficients,oi),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,this._hdrEnvMap=e.hdrEnvMap,this._toneMappingExposure=e.toneMappingExposure,this._envMapIntensity=e.envMapIntensity,e$2b(this._specularEnvironmentMaps)&&o$1o.clone(this._specularEnvironmentMaps.dimensions,this._specularEnvironmentMapsDimensions),this._fogDensity=e.fog.density,this._invertClassificationColor=e.invertClassificationColor,this._temeToPseudoFixed=m$17.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._imagerySplitPosition.x=e.imagerySplitPosition.x*e.context.drawingBufferWidth,this._imagerySplitPosition.y=e.imagerySplitPosition.y*e.context.drawingBufferHeight,this._globeSplitPosition.x=e.globeSplitPosition.x*e.context.drawingBufferWidth,this._globeSplitPosition.y=e.globeSplitPosition.y*e.context.drawingBufferHeight;var l,u=t.frustum.fov,c=this._viewport;l=c.height>c.width?2*Math.tan(.5*u)/c.height:2*Math.tan(.5*u)/c.width,this._geometricToleranceOverMeter=l*e.maximumScreenSpaceError,e$1U.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1),this.updateLightSource(e.lightSource),e$2b(this.globeDepthTexture)&&(this._globeDepthTextureDim.x=this.globeDepthTexture.width,this._globeDepthTextureDim.y=this.globeDepthTexture.height),this._sceneUBO.update(e.context,this),this._lightUBO.update(e)};var E$m=new o$1p;function li$1(e){if(e._modelViewDirty){e._modelViewDirty=!1;var t=p$1d.getTranslation(e._model,E$m);e.useRelativeOrigin&&!o$1p.equals(t,o$1p.ZERO)&&(o$1p.subtract(t,e._relativeOrigin,E$m),p$1d.setTranslation(e._model,E$m,e._model)),p$1d.multiplyTransformation(e._view,e._model,e._modelView)}}function hi$1(e){if(e._modelView3DDirty){e._modelView3DDirty=!1;var t=p$1d.getTranslation(e._model,E$m);e.useRelativeOrigin&&!o$1p.equals(t,o$1p.ZERO)&&(o$1p.subtract(t,e._relativeOrigin,E$m),p$1d.setTranslation(e._model,E$m,e._model)),p$1d.multiplyTransformation(e.view3D,e._model,e._modelView3D)}}function ci$2(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,p$1d.inverse(e.modelView,e._inverseModelView))}function _i$2(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,p$1d.inverse(e.modelView3D,e._inverseModelView3D))}function ai(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,p$1d.multiply(e._projection,e._view,e._viewProjection))}function ui$1(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,p$1d.inverse(e.viewProjection,e._inverseViewProjection))}function di$1(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,p$1d.multiply(e._projection,e.modelView,e._modelViewProjection),e._mvpViewPortDirty=!0)}function vi$2(e){e._mvpViewPortDirty&&(p$1d.multiply(e.viewportTransformation,e.modelViewProjection,e._mvpViewPort),e._mvpViewPortDirty=!1)}function pi$2(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;var t=e.modelView,i=e._modelViewRelativeToEye;i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=0,i[13]=0,i[14]=0,i[15]=t[15]}}function Di$2(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,p$1d.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function wi$2(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,p$1d.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function gi$2(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,p$1d.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function mi(e){if(e._normalDirty){e._normalDirty=!1;var t=e._normal;p$1d.getRotation(e.inverseModelView,t),p$1e.transpose(t,t)}}function yi$2(e){if(e._normal3DDirty){e._normal3DDirty=!1;var t=e._normal3D;p$1d.getRotation(e.inverseModelView3D,t),p$1e.transpose(t,t)}}function Pi$2(e){e._inverseNormalDirty&&(e._inverseNormalDirty=!1,p$1d.getRotation(e.inverseModelView,e._inverseNormal))}function fi$1(e){e._inverseNormal3DDirty&&(e._inverseNormal3DDirty=!1,p$1d.getRotation(e.inverseModelView3D,e._inverseNormal3D))}var b$s=new o$1p;function k$i(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,p$1d.multiplyByPoint(e.inverseModel,e._cameraPosition,b$s),i$11.fromCartesian(b$s,e._encodedCameraPositionMC))}function q$h(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,p$1d.multiplyByPoint(e.inverseModel,e._cameraPosition,b$s),i$11.fromCartesian(b$s,e._encodedOriginCameraPositionMC))}new o$1p;var Ci$2=new o$1p,Vi$2=new o$1p,Mi$2=new o$1p,Ei$2=new o$1p,Ti$2=new a$18,ji$1=new o$1p,xi$2=new p$1d;function Oi$2(e,t,i,n,r,o,a,s){var l=Ci$2;l.x=e.y,l.y=e.z,l.z=e.x;var u=Vi$2;u.x=i.y,u.y=i.z,u.z=i.x;var c=Mi$2;c.x=n.y,c.y=n.z,c.z=n.x;var h=Ei$2;h.x=t.y,h.y=t.z,h.z=t.x,o===C$13.SCENE2D&&(l.z=.5*r);var d=a.unproject(l,Ti$2);d.longitude=e$2a.clamp(d.longitude,-Math.PI,Math.PI),d.latitude=e$2a.clamp(d.latitude,-e$2a.PI_OVER_TWO,e$2a.PI_OVER_TWO);var f=a.ellipsoid,p=f.cartographicToCartesian(d,ji$1),_=m$17.eastNorthUpToFixedFrame(p,f,xi$2);return p$1d.multiplyByPointAsVector(_,u,u),p$1d.multiplyByPointAsVector(_,c,c),p$1d.multiplyByPointAsVector(_,h,h),e$2b(s)||(s=new p$1d),s[0]=u.x,s[1]=c.x,s[2]=-h.x,s[3]=0,s[4]=u.y,s[5]=c.y,s[6]=-h.y,s[7]=0,s[8]=u.z,s[9]=c.z,s[10]=-h.z,s[11]=0,s[12]=-o$1p.dot(u,p),s[13]=-o$1p.dot(c,p),s[14]=o$1p.dot(h,p),s[15]=1,s}function N$d(e){e._view3DDirty&&(e._mode===C$13.SCENE3D?p$1d.clone(e._view,e._view3D):Oi$2(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),p$1d.getRotation(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function G$j(e){e._inverseView3DDirty&&(p$1d.inverseTransformation(e.view3D,e._inverseView3D),p$1d.getRotation(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}function i$j(e){if(this._renderTexture=new s$L(e),this._renderTexture._generateMipmap=!0,this._context=e,this.waterNormalMapUrl=n$15("Assets/Textures/waterNormalsSmall.jpg"),this._waterNormalMapUrl=void 0,this._waterNormalMap=void 0,this._reflectPlane=new o$1m(o$1p.UNIT_Z,6378137),this._isUpdate=!0,this._distinctQuality=5,this._environmentVisible={isSunVisible:!0,isMoonVisible:!0,isSkyAtmosphereVisible:!0,isSkyBoxVisible:!0,isGlobalVisible:!1,isObjectVisible:!0},this.waterNormalMapUrl!==this._waterNormalMapUrl){var t=this.waterNormalMapUrl;if(this._waterNormalMapUrl=t,e$2b(t)){var i=this;o$1l(t$T(t),(function(n){if(t===i.waterNormalMapUrl){var r=new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.LINEAR_MIPMAP_LINEAR,magnificationFilter:rt$i.LINEAR});i._waterNormalMap=i._waterNormalMap&&i._waterNormalMap.destroy(),i._waterNormalMap=new t$V({context:e,source:n,sampler:r}),i._waterNormalMap.generateMipmap()}}))}else this._waterNormalMap=this._waterNormalMap&&this._waterNormalMap.destroy()}}function s$h(e){this._renderTexture=new s$L(e),this._renderTexture._pixelDatatype=_$$.UNSIGNED_BYTE,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0}}function t$g(e){this._renderTexture=new s$L(e),this._renderTexture._pixelDatatype=_$$.FLOAT,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0}}function t$f(e){this._renderTexture=new s$L(e),this._renderTexture._passState.blendingEnabled=!1,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0}}Object.defineProperties(i$j.prototype,{distinctQuality:{set:function(e){this._distinctQuality=e},get:function(){return this._distinctQuality}},renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return Qe$c.REFLECT}}}),i$j.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=e.camera,n=t.drawingBufferWidth,r=t.drawingBufferHeight,o=this._reflectPlane;return this._renderTexture._passState.viewport.width=n,this._renderTexture._passState.viewport.height=r,i.enableReflection(o),this._oriUseLogDepth=e.useLogDepth,e.useLogDepth=!1,this._renderTexture._passState},i$j.prototype.end=function(e){(e.camera.disableReflection(),e.useLogDepth=this._oriUseLogDepth,this._context.webgl2)&&this._renderTexture._fb.getColorTexture(0).generateMipmap()},i$j.prototype.update=function(e,t){},i$j.prototype.isDestroyed=function(){return!1},i$j.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)},Object.defineProperties(s$h.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 8},set:function(e){}},frameBufferType:{get:function(){return Qe$c.NORMAL_AND_DEPTH}}}),s$h.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},s$h.prototype.end=function(e){var t=this._context.readPixels({x:e.x,y:e.y,width:e.width,height:e.height,framebuffer:this._renderTexture._fb}),i=new e$29(t[0]/255,t[1]/255,t[2]/255,t[3]/255);if(0!==i.w){var n=o$1p.divideByScalar(i,i.w,new o$1p);return o$1p.subtract(o$1p.multiplyByScalar(n,2,new o$1p),new o$1p(1,1,1),n),o$1p.normalize(n,n),n}},s$h.prototype.endAsync=function(e){return this._context.readPixelsAsync({x:e.x,y:e.y,width:e.width,height:e.height,framebuffer:this._renderTexture._fb}).then((e=>{var t=new e$29(e[0]/255,e[1]/255,e[2]/255,e[3]/255);if(0===t.w)return Promise.resolve(void 0);var i=o$1p.divideByScalar(t,t.w,new o$1p);return o$1p.subtract(o$1p.multiplyByScalar(i,2,new o$1p),new o$1p(1,1,1),i),o$1p.normalize(i,i),Promise.resolve(i)})).catch((e=>(console.log("Context.readPixels failed."),Promise.resolve(void 0))))},s$h.prototype.update=function(e,t){},s$h.prototype.isDestroyed=function(){return!1},s$h.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)},Object.defineProperties(t$g.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 16},set:function(e){}},frameBufferType:{get:function(){return Qe$c.POSTEFFECT_FILTER}}}),t$g.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},t$g.prototype.end=function(e){},t$g.prototype.update=function(e,t){},t$g.prototype.isDestroyed=function(){return!1},t$g.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)},Object.defineProperties(t$f.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return Qe$c.PICKRECT}}}),t$f.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this.beginFunc&&this.beginFunc.call(this),this._renderTexture._passState},t$f.prototype.end=function(e){},t$f.prototype.update=function(e,t){},t$f.prototype.isDestroyed=function(){return!1},t$f.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)};var J$b=1073741824;function i$i(e,t){o$1q.defined("canvas",e),this._canvas=e;var i=t&&t.monitorTable||{};this._rows=i.rows||1,this._cols=i.cols||1,this._curRow=i.curRow||0,this._curCol=i.curCol||0;var n=3840,r=1080;e$2b(t)&&(n=u$_(t.maxDrawingBufferWidth,n),r=u$_(t.maxDrawingBufferHeight,r)),e.maxWidth=n,e.maxHeight=r,(t=u$_(t=l$1g(t,!0),{})).allowTextureFilterAnisotropic=u$_(t.allowTextureFilterAnisotropic,!0),this._id=e$1Q(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new h$m(this),this._textureCache=new r$o,this._clearColor=new e$1U(0,0,0,0),this._clearDepth=1,this._clearStencil=0;var o=new P$l,a=new n$Z(this),s=d$1m.fromCache();this._defaultPassState=a,this._defaultRenderState=s,this._defaultTexture=void 0,this._defaultCubeMap=void 0,this._defaultTransparentTexture=void 0,this._us=o,this._currentRenderState=s,this._currentPassState=a,this._currentViewport=void 0,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(var l=0;l<e$1T._maximumVertexAttributes;l++)this._vertexAttribDivisors.push(0);this._pickObjects={},this._nextPickColor=new Uint32Array(1),this._pickIdObjects={},this.options=t,this.cache={},this._pickPosition=new Float64Array(3),this._pickPositionHeight=0,this.pixels=new Uint8Array(4),this.shaderPreprocess=!0,this.numNormalAndDepthObject=0,this.numPostEffectFilterObject=0,this.numClampClipPlaneLayer=0,this._sharedEDL=this.createSharedEDLFrameBuffer(),this.memorySize=0,this.memoryThreshold=4,this.currentWarnFrameNumber=-99999,this._relativeOrigin=new o$1p,this._enableRelativeOrigin=!0,this._trangleCount=0,this._quadVpShaderSource=new s$U({name:"ViewportQuadVS",sources:[ot$7]})}var $$g={};Object.defineProperties(i$i.prototype,{id:{get:function(){return this._id}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},defaultTexture:{get:function(){return void 0===this._defaultTexture&&(this._defaultTexture=new t$V({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultTransparentTexture:{get:function(){return void 0===this._defaultTransparentTexture&&(this._defaultTransparentTexture=new t$V({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0,0])},flipY:!1})),this._defaultTransparentTexture}},defaultCubeMap:{get:function(){if(void 0===this._defaultCubeMap){var e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new e$1M({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})}return this._defaultCubeMap}},defaultFramebuffer:{get:function(){return $$g}},memoryThresholdValue:{get:function(){return this.memoryThreshold*J$b}},relativeOrigin:{set:function(e){this._relativeOrigin.x=Math.floor(e.x),this._relativeOrigin.y=Math.floor(e.y),this._relativeOrigin.z=Math.floor(e.z)},get:function(){return this._relativeOrigin}},enableRelativeOrigin:{get:function(){return this._enableRelativeOrigin}}}),typeof WebGLRenderingContext<"u"&&de$x.BACK,i$i.prototype.clear=function(e,t){},i$i.prototype.draw=function(e,t,i,n){},i$i.prototype.endFrame=function(){},i$i.prototype.readPixels=function(e){};const viewportQuadAttributeLocations={aPosition:0,textureCoordinates:1};function d$r(e,t,i){this._pickObjects=e,this.key=t,this.color=i}var h$l,c$f;i$i.prototype.getViewportQuadVertexArray=function(){var e=this.cache.viewportQuad_vertexArray;if(!e$2b(e)){var t=new I$1p({attributes:{aPosition:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:W$18.TRIANGLES});e=c$12.fromGeometry({context:this,geometry:t,attributeLocations:viewportQuadAttributeLocations,bufferUsage:A$19.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e},i$i.prototype.createViewportQuadCommand=function(e,t){var i=this._quadVpShaderSource;return e$2b(t)&&e$2b(t.useWGSL)&&t.useWGSL&&(i=D$j),this.createCustomViewportQuadCommand(i,e,t)},i$i.prototype.createCustomViewportQuadCommand=function(e,t,i){return i=u$_(i,u$_.EMPTY_OBJECT),new i$_({vertexArray:this.getViewportQuadVertexArray(),primitiveType:W$18.TRIANGLES,renderState:i.renderState,shaderProgram:r$13.fromCache({name:i.shaderProgramName,useWGSL:i.useWGSL,context:this,vertexShaderSource:e,fragmentShaderSource:t,attributeLocations:viewportQuadAttributeLocations}),uniformMap:i.uniformMap,owner:i.owner,framebuffer:i.framebuffer,pass:i.pass})},i$i.prototype.createReflectFramebuffer=function(){return new i$j(this)},i$i.prototype.createNormalFramebuffer=function(){return new s$h(this)},i$i.prototype.createPostEffectFilterlFramebuffer=function(){return new t$g(this)},i$i.prototype.createClampFramebuffer=function(){return new t$h(this)},i$i.prototype.createClosedDepthFramebuffer=function(){return new a$i(this)},i$i.prototype.createPickRectFramebuffer=function(){return new t$f(this)},i$i.prototype.createSharedEDLFrameBuffer=function(){return new _0x3cffe6},i$i.prototype.getObjectByPickColor=function(e){return o$1q.defined("pickColor",e),this._pickObjects[e.toRgba()]},i$i.prototype.getObjectByPickId=function(e){return o$1q.defined("pickId",e),this._pickObjects[e]},i$i.prototype.getAllPickObjects=function(){return this._pickObjects},i$i.prototype.getPickIdByKey=function(e){return this._pickIdObjects[e]},Object.defineProperties(d$r.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}}),d$r.prototype.destroy=function(){delete this._pickObjects[this.key]},i$i.prototype.createPickId=function(e){o$1q.defined("object",e),++this._nextPickColor[0];var t=this._nextPickColor[0];if(0===t)throw new t$14("Out of unique Pick IDs.");return this._pickObjects[t]=e,new d$r(this._pickObjects,t,e$1U.fromRgba(t))},i$i.prototype.createBillboardPointIndexBuffer=function(){if(!h$l){var e=new Uint16Array(6),t=0;e[t++]=0,e[t++]=1,e[t++]=2,e[t++]=0,e[t++]=2,e[t++]=3,(h$l=t$Y.createIndexBuffer({context:this,typedArray:e,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})).vertexArrayDestroyable=!1}return h$l},i$i.prototype.createBillboardOffsetVertexBuffer=function(){if(!c$f){var e=new Float32Array([-.5,-.5,.5,-.5,.5,.5,-.5,.5]);(c$f=t$Y.createVertexBuffer({context:this,typedArray:e,usage:A$19.STATIC_DRAW})).vertexArrayDestroyable=!1}return c$f},i$i.prototype.isDestroyed=function(){return!1},i$i.prototype.destroy=function(){var e=this.cache;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];e$2b(i.destroy)&&i.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),this._defaultTransparentTexture=this._defaultTransparentTexture&&this._defaultTransparentTexture.destroy(),i$10(this)};var S$i={NONE:0,BEGIN:1,READING:2},I$n,c$e,tt$5,rt$7,et$6;function C$l(e){this._scene=e,this._startPoint=void 0,this._endPoint=void 0,this._maxHeight=100,this._farDistance=500,this._showBound=!0,this._fbo=void 0,this._readyPromise=o$1l.defer(),this._hintBoundColor=new e$1U(0,1,1,.1),this._hintBoundOutlineColor=new e$1U(1,0,0,1),this._colorCommand=void 0,this._outlineCommand=void 0,this._update=!1,this._name="",this._frameState=void 0,this._visibleViewport=4095,this._buffers=new e$1N,this._readPixelState=S$i.NONE}function k$h(e){e$2b(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),e$2b(e._outlineCommand)&&(e._outlineCommand.vertexArray=e._outlineCommand.vertexArray&&e._outlineCommand.vertexArray.destroy(),e._outlineCommand.shaderProgram=e._outlineCommand.shaderProgram&&e._outlineCommand.shaderProgram.destroy(),e._outlineCommand=void 0)}function pt$3(e){var t=e._scene.camera,i=o$1p.subtract(e._endPoint,e._startPoint,new o$1p),n=o$1p.midpoint(e._startPoint,e._endPoint,new o$1p);o$1p.normalize(i,i);var r=o$1p.normalize(n,new o$1p),o=o$1p.cross(r,i,new o$1p);o$1p.normalize(o,o),o$1p.cross(i,o,r),o$1p.normalize(r,r);var a=o$1p.multiplyByScalar(r,e._maxHeight/2,new o$1p),s=new o$1p;o$1p.clone(n,s),o$1p.add(s,a,s);var l=o$1p.distance(e._endPoint,e._startPoint),u=1,c=0;e._readPixelState=S$i.NONE;var h=e._maxHeight;l*e._scene.context.drawingBufferHeight/e._scene.context.drawingBufferWidth<e._maxHeight&&(h=l*e._scene.context.drawingBufferHeight/e._scene.context.drawingBufferWidth,u=Math.ceil(e._maxHeight/h)),e$2b(e._fbo)||(e._fbo=new t$F(e._scene.context),e._fbo.environmentVisible.isObjectVisible=!0,e._fbo.environmentVisible.isOnlyS3MObjectVisible=!0,e._fbo._useHeight=!1,e._scene.frameState._framebufferList[e._name]=e._fbo,e._frameState=e._scene._frameState),e._buffers.removeAll(),e._fbo._isUpdate=!0,e._fbo._beginFunc=function(i){if(e._readPixelState!==S$i.READING){e._readPixelState=S$i.BEGIN,e._readyPromise=o$1l.defer(),I$n=o$1p.clone(t.position),c$e=o$1p.clone(t.direction),tt$5=o$1p.clone(t.up),rt$7=t.frustum.clone(new o$15),et$6=i.useLogDepth,i.useLogDepth=!1,o$1p.clone(n,s),a=o$1p.multiplyByScalar(r,h/2+h*c,new o$1p),o$1p.add(s,a,s),t.setView({destination:s,orientation:{direction:o,up:r}});var l=new a$V,u=o$1p.distance(e._endPoint,e._startPoint);l.width=u,l.near=.01,l.far=e._farDistance,l.aspectRatio=i.context.drawingBufferWidth/i.context.drawingBufferHeight,t.frustum=l,i.context.uniformState.updateFrustum(l)}},e._fbo._endFunc=function(i){if(e._readPixelState!==S$i.READING){t.frustum=rt$7,t.setView({destination:I$n,orientation:{direction:c$e,up:tt$5}}),i.context.uniformState.updateFrustum(t.frustum),i.useLogDepth=et$6;var n=e._scene._context;n.readPixelsAsync({x:0,y:0,width:n.drawingBufferWidth,height:n.drawingBufferHeight,framebuffer:e._fbo._renderTexture._fb}).then((t=>{if(e._readPixelState=S$i.NONE,e._buffers.set(c,t),c++,0==--u){for(var r=new Uint8Array(t.length*e._buffers.length),o=0;o<e._buffers.length;o++)r.set(e._buffers.get(o),t.length*o);var a=document.createElement("canvas");a.height=n.drawingBufferHeight*e._buffers.length,a.width=n.drawingBufferWidth;var s=a.getContext("2d"),l=s.createImageData(a.width,a.height);l.data.set(r),s.putImageData(l,0,0);for(var d=o$1p.distance(e._endPoint,e._startPoint)/e._maxHeight,f=i.context.drawingBufferWidth/d,p=s.getImageData(0,0,a.width,a.height),_=e._maxHeight/h-Math.floor(e._maxHeight/h),m=(1-_)*p.height/e._buffers.length,g=0;g<p.height/2;++g)for(var x=0;x<p.width;++x){var v=4*g*p.width+4*x,y=4*(p.height-g)*p.width+4*x,$=p.data[v],b=p.data[v+1],T=p.data[v+2],C=p.data[v+3];p.data[v]=p.data[y],p.data[v+1]=p.data[y+1],p.data[v+2]=p.data[y+2],p.data[v+3]=p.data[y+3],p.data[y]=$,p.data[y+1]=b,p.data[y+2]=T,p.data[y+3]=C,1===e._buffers.length&&g<p.height/2-f/2&&(p.data[v]=0,p.data[v+1]=0,p.data[v+2]=0,p.data[v+3]=0),e._buffers.length>1&&_>0&&g<m&&(p.data[v]=0,p.data[v+1]=0,p.data[v+2]=0,p.data[v+3]=0)}s.clearRect(0,0,p.width,p.height),s.putImageData(p,0,0);var S=a.toDataURL();e._readyPromise.resolve(S),e._fbo._isUpdate=!1}})),e._readPixelState=S$i.READING}}}function ft$2(e){if(e._showBound){var t=e._scene._context,i=o$1p.subtract(e._endPoint,e._startPoint,new o$1p),n=o$1p.midpoint(e._startPoint,e._endPoint,new o$1p);o$1p.normalize(i,i);var r=o$1p.normalize(n,new o$1p),o=o$1p.multiplyByScalar(r,e._maxHeight,new o$1p),a=o$1p.cross(r,i,new o$1p);o$1p.normalize(a,a);var s=o$1p.multiplyByScalar(a,e._farDistance,new o$1p),l=new o$1p;o$1p.add(e._startPoint,s,l);var u=new o$1p;o$1p.add(e._endPoint,s,u);var c=new o$1p;o$1p.add(e._startPoint,o,c);var h=new o$1p;o$1p.add(e._endPoint,o,h);var d=new o$1p;o$1p.add(u,o,d);var f=new o$1p;o$1p.add(l,o,f);var p=m$17.eastNorthUpToFixedFrame(e._startPoint),_=p$1d.inverse(p,new p$1d);e._colorCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:p,pass:Le$s.OPAQUE,owner:e});for(var m=[e._startPoint,e._endPoint,u,l,c,h,d,f],g=S$12.createTypedArray(S$12.FLOAT,24),x=0;x<m.length;x++){var v=p$1d.multiplyByPoint(_,m[x],new o$1p);g[3*x]=v.x,g[3*x+1]=v.y,g[3*x+2]=v.z}var y=t$Y.createVertexBuffer({context:t,typedArray:g,usage:A$19.STATIC_DRAW}),$=new s$U({name:"FacadeVp",sources:["attribute vec4 aPosition;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n"]}),b=new s$U({name:"FacadeFp",sources:["uniform vec4 uColor;\nvoid main(){\n gl_FragColor = uColor;\n}\n"]}),T=r$13.fromCache({context:t,vertexShaderSource:$,fragmentShaderSource:b,attributeLocations:{aPosition:0}}),C=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),S=[];S.push({name:"aPosition",index:0,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var w=S$12.createTypedArray(S$12.UNSIGNED_SHORT,36);w[0]=0,w[1]=1,w[2]=2,w[3]=0,w[4]=2,w[5]=3,w[6]=4,w[7]=5,w[8]=6,w[9]=4,w[10]=6,w[11]=7,w[12]=0,w[13]=1,w[14]=5,w[15]=0,w[16]=5,w[17]=4,w[18]=3,w[19]=2,w[20]=6,w[21]=3,w[22]=6,w[23]=7,w[24]=3,w[25]=0,w[26]=4,w[27]=3,w[28]=4,w[29]=7,w[30]=1,w[31]=2,w[32]=6,w[33]=1,w[34]=6,w[35]=5;var E=S$12.createTypedArray(S$12.UNSIGNED_SHORT,24);E[0]=0,E[1]=1,E[2]=1,E[3]=2,E[4]=2,E[5]=3,E[6]=3,E[7]=0,E[8]=4,E[9]=5,E[10]=5,E[11]=6,E[12]=6,E[13]=7,E[14]=7,E[15]=4,E[16]=0,E[17]=4,E[18]=1,E[19]=5,E[20]=2,E[21]=6,E[22]=3,E[23]=7;var P=new c$12({context:t,attributes:S,indexBuffer:t$Y.createIndexBuffer({context:t,typedArray:w,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})});e._colorCommand.vertexArray=P,e._colorCommand.shaderProgram=T,e._colorCommand.renderState=C,e._colorCommand.uniformMap={uColor:function(){return e._hintBoundColor}},e._outlineCommand=new i$_({primitiveType:W$18.LINES,modelMatrix:p,pass:Le$s.OPAQUE,owner:e}),e._outlineCommand.shaderProgram=T;var A=new c$12({context:t,attributes:S,indexBuffer:t$Y.createIndexBuffer({context:t,typedArray:E,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})});e._outlineCommand.vertexArray=A,e._outlineCommand.renderState=C,e._outlineCommand.uniformMap={uColor:function(){return e._hintBoundOutlineColor}}}}function f$m(e){const t=(e=u$_(e,u$_.EMPTY_OBJECT)).context,i=e.width,n=e.height;o$1q.defined("options.context",t),o$1q.defined("options.width",i),o$1q.defined("options.height",n),this._width=i,this._height=n;const r=e.colorRenderbuffers,o=e.colorTextures;if(e$2b(r)!==e$2b(o))throw new t$16("Both color renderbuffer and texture attachments must be provided.");const a=e.depthStencilRenderbuffer,s=e.depthStencilTexture;if(e$2b(a)!==e$2b(s))throw new t$16("Both depth-stencil renderbuffer and texture attachments must be provided.");this._renderFramebuffer=new t$W({context:t,colorRenderbuffers:r,depthStencilRenderbuffer:a,destroyAttachments:e.destroyAttachments}),this._colorFramebuffer=new t$W({context:t,colorTextures:o,depthStencilTexture:s,destroyAttachments:e.destroyAttachments})}function s$g(e){if(e=u$_(e,u$_.EMPTY_OBJECT),this._numSamples=u$_(e.numSamples,1),this._colorAttachmentsLength=u$_(e.colorAttachmentsLength,1),this._color=u$_(e.color,!0),this._depth=u$_(e.depth,!1),this._depthStencil=u$_(e.depthStencil,!1),this._supportsDepthTexture=u$_(e.supportsDepthTexture,!1),!this._color&&!this._depth&&!this._depthStencil)throw new t$16("Must enable at least one type of framebuffer attachment.");if(this._depth&&this._depthStencil)throw new t$16("Cannot have both a depth and depth-stencil attachment.");this._createColorAttachments=u$_(e.createColorAttachments,!0),this._createDepthAttachments=u$_(e.createDepthAttachments,!0),this._pixelDatatype=e.pixelDatatype,this._pixelFormat=e.pixelFormat,this._width=void 0,this._height=void 0,this._framebuffer=void 0,this._multisampleFramebuffer=void 0,this._colorTextures=void 0,this._color&&(this._colorTextures=new Array(this._colorAttachmentsLength),this._colorRenderbuffers=new Array(this._colorAttachmentsLength)),this._colorRenderbuffer=void 0,this._depthStencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthRenderbuffer=void 0,this._depthTexture=void 0,this._attachmentsDirty=!1}function d$q(e,t){if(o$1q.defined("context",e),!(e$2b(t)&&e$2b(t.positiveX)&&e$2b(t.negativeX)&&e$2b(t.positiveY)&&e$2b(t.negativeY)&&e$2b(t.positiveZ)&&e$2b(t.negativeZ)))throw new t$16("urls is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");var i=[t$11.createIfNeeded(t.positiveX).fetchImage(),t$11.createIfNeeded(t.negativeX).fetchImage(),t$11.createIfNeeded(t.positiveY).fetchImage(),t$11.createIfNeeded(t.negativeY).fetchImage(),t$11.createIfNeeded(t.positiveZ).fetchImage(),t$11.createIfNeeded(t.negativeZ).fetchImage()];return o$1l.all(i,(function(t){return new e$1M({context:e,source:{positiveX:t[0],negativeX:t[1],positiveY:t[2],negativeY:t[3],positiveZ:t[4],negativeZ:t[5]}})}))}Object.defineProperties(C$l.prototype,{readyPromise:{get:function(){return this._readyPromise}},farDistance:{get:function(){return this._farDistance},set:function(e){this._farDistance=e,this._update=!0}},maxHeight:{get:function(){return this._maxHeight},set:function(e){this._maxHeight=e,this._update=!0}},startPoint:{get:function(){return this._startPoint},set:function(e){this._startPoint=e,this._update=!0}},endPoint:{get:function(){return this._endPoint},set:function(e){this._endPoint=e,this._update=!0}}}),C$l.prototype.clear=function(){this._startPoint=void 0,this._endPoint=void 0,k$h(this)},C$l.prototype.setVisibleInViewport=function(e){if(e>8)throw new DeveloperError("the index is 0~8");this._visibleViewport=1<<e},C$l.prototype.getVisibleInViewport=function(e){if(e>8)throw new DeveloperError("the index is 0~8");return 1<<e&this._visibleViewport},C$l.prototype.destroy=function(){return this.clear(),e$2b(this._frameState)&&(e$2b(this._fbo)&&delete this._frameState._framebufferList[this._name],this._frameState=void 0),this._fbo=this._fbo&&this._fbo.destroy(),this._scene._analyst3D.remove(this._name,!0),i$10(this)},C$l.prototype.update=function(e,t,i){!e$2b(this._startPoint)||!e$2b(this._endPoint)||(this._update&&(k$h(this),pt$3(this),ft$2(this),this._update=!1),this._showBound&&e$2b(this._colorCommand)&&e$2b(this._outlineCommand)&&!t.passes.pick&&(i.push(this._colorCommand),i.push(this._outlineCommand)))},C$l.prototype.setBoundByPoints=function(e,t){this._startPoint=e,this._endPoint=t,this._update=!0},C$l.prototype.build=function(){""===this._name&&(this._name="facade"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},f$m.prototype.getRenderFramebuffer=function(){return this._renderFramebuffer},f$m.prototype.getColorFramebuffer=function(){return this._colorFramebuffer},f$m.prototype.blitFramebuffers=function(e,t){this._renderFramebuffer.bindRead(),this._colorFramebuffer.bindDraw();const i=e._gl;let n=0;this._colorFramebuffer._colorTextures.length>0&&(n|=i.COLOR_BUFFER_BIT),e$2b(this._colorFramebuffer.depthStencilTexture)&&(n|=i.DEPTH_BUFFER_BIT|(t?i.STENCIL_BUFFER_BIT:0)),i.blitFramebuffer(0,0,this._width,this._height,0,0,this._width,this._height,n,i.NEAREST),i.bindFramebuffer(i.READ_FRAMEBUFFER,null),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,null)},f$m.prototype.isDestroyed=function(){return!1},f$m.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),i$10(this)},Object.defineProperties(s$g.prototype,{framebuffer:{get:function(){return this._numSamples>1?this._multisampleFramebuffer.getRenderFramebuffer():this._framebuffer}},numSamples:{get:function(){return this._numSamples}},status:{get:function(){return this.framebuffer.status}}}),s$g.prototype.isDirty=function(e,t,i,n,r){i=u$_(i,1);const o=this._width!==e||this._height!==t,a=this._numSamples!==i,s=e$2b(n)&&this._pixelDatatype!==n||e$2b(r)&&this._pixelFormat!==r,l=e$2b(1===i?this._framebuffer:this._multisampleFramebuffer);return this._attachmentsDirty||o||a||s||!l||this._color&&!e$2b(this._colorTextures[0])},s$g.prototype.update=function(e,t,i,n,r,o){if(!e$2b(t)||!e$2b(i))throw new t$16("width and height must be defined.");if(n=e.msaa?u$_(n,1):1,r=u$_(r,this._color?u$_(this._pixelDatatype,_$$.UNSIGNED_BYTE):void 0),o=u$_(o,this._color?u$_(this._pixelFormat,V$10.RGBA):void 0),this.isDirty(t,i,n,r,o)){if(this.destroy(),this._width=t,this._height=i,this._numSamples=n,this._pixelDatatype=r,this._pixelFormat=o,this._attachmentsDirty=!1,this._color&&this._createColorAttachments)for(let n=0;n<this._colorAttachmentsLength;++n)if(this._colorTextures[n]=new t$V({context:e,width:t,height:i,pixelFormat:o,pixelDatatype:r,sampler:e$1P.NEAREST}),this._numSamples>1){const o=M$13.getColorFormat(r);this._colorRenderbuffers[n]=new r$$({context:e,width:t,height:i,format:o,numSamples:this._numSamples})}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new t$V({context:e,width:t,height:i,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8,sampler:e$1P.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new r$$({context:e,width:t,height:i,format:M$13.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new r$$({context:e,width:t,height:i,format:M$13.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new t$V({context:e,width:t,height:i,pixelFormat:V$10.DEPTH_COMPONENT,pixelDatatype:_$$.UNSIGNED_INT,sampler:e$1P.NEAREST}):this._depthRenderbuffer=new r$$({context:e,width:t,height:i,format:M$13.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new f$m({context:e,width:this._width,height:this._height,colorTextures:this._colorTextures,colorRenderbuffers:this._colorRenderbuffers,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}):this._framebuffer=new t$W({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}},s$g.prototype.getColorTexture=function(e){if((e=u$_(e,0))>=this._colorAttachmentsLength)throw new t$16("index must be smaller than total number of color attachments.");return this._colorTextures[e]},s$g.prototype.setColorTexture=function(e,t){if(t=u$_(t,0),this._createColorAttachments)throw new t$16("createColorAttachments must be false if setColorTexture is called.");if(t>=this._colorAttachmentsLength)throw new t$16("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e},s$g.prototype.getColorRenderbuffer=function(e){if((e=u$_(e,0))>=this._colorAttachmentsLength)throw new t$16("index must be smaller than total number of color attachments.");return this._colorRenderbuffers[e]},s$g.prototype.setColorRenderbuffer=function(e,t){if(t=u$_(t,0),this._createColorAttachments)throw new t$16("createColorAttachments must be false if setColorRenderbuffer is called.");if(t>=this._colorAttachmentsLength)throw new t$16("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e},s$g.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer},s$g.prototype.setDepthRenderbuffer=function(e){if(this._createDepthAttachments)throw new t$16("createDepthAttachments must be false if setDepthRenderbuffer is called.");this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e},s$g.prototype.getDepthTexture=function(){return this._depthTexture},s$g.prototype.setDepthTexture=function(e){if(this._createDepthAttachments)throw new t$16("createDepthAttachments must be false if setDepthTexture is called.");this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e},s$g.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer},s$g.prototype.setDepthStencilRenderbuffer=function(e){if(this._createDepthAttachments)throw new t$16("createDepthAttachments must be false if setDepthStencilRenderbuffer is called.");this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e},s$g.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture},s$g.prototype.setDepthStencilTexture=function(e){if(this._createDepthAttachments)throw new t$16("createDepthAttachments must be false if setDepthStencilTexture is called.");this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e},s$g.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)},s$g.prototype.clear=function(e,t,i){const n=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,i),t.framebuffer=n},s$g.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()},s$g.prototype.destroy=function(){if(this._color){let e;const t=this._colorTextures.length;for(e=0;e<t;++e){const t=this._colorTextures[e];this._createColorAttachments&&e$2b(t)&&!t.isDestroyed()&&(this._colorTextures[e].destroy(),this._colorTextures[e]=void 0),e$2b(t)&&t.isDestroyed()&&(this._colorTextures[e]=void 0);const i=this._colorRenderbuffers[e];this._createColorAttachments&&e$2b(i)&&!i.isDestroyed()&&(this._colorRenderbuffers[e].destroy(),this._colorRenderbuffers[e]=void 0),e$2b(i)&&i.isDestroyed()&&(this._colorRenderbuffers[e]=void 0)}}this._depthStencil&&(this._createDepthAttachments&&(this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()),e$2b(this._depthStencilTexture)&&this._depthStencilTexture.isDestroyed()&&(this._depthStencilTexture=void 0),e$2b(this._depthStencilRenderbuffer)&&this._depthStencilRenderbuffer.isDestroyed()&&(this._depthStencilRenderbuffer=void 0)),this._depth&&(this._createDepthAttachments&&(this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy()),e$2b(this._depthTexture)&&this._depthTexture.isDestroyed()&&(this._depthTexture=void 0),e$2b(this._depthRenderbuffer)&&this._depthRenderbuffer.isDestroyed()&&(this._depthRenderbuffer=void 0)),this.destroyFramebuffer()};class U$h{constructor(){}parse(e){const t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},i=function(e,t,i){t=t||1024;let n=e.pos,r=-1,o=0,a="",s=String.fromCharCode.apply(null,new Uint16Array(e.subarray(n,n+128)));for(;0>(r=s.indexOf("\n"))&&o<t&&n<e.byteLength;)a+=s,o+=s.length,n+=128,s+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(n,n+128)));return-1<r&&(!1!==i&&(e.pos+=o+r+1),a+s.slice(0,r))};const n=function(){const e=new ArrayBuffer(4),t=new Float32Array(e),i=new Uint32Array(e),n=new Uint32Array(512),r=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(n[e]=0,n[256|e]=32768,r[e]=24,r[256|e]=24):t<-14?(n[e]=1024>>-t-14,n[256|e]=1024>>-t-14|32768,r[e]=-t-1,r[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,r[e]=13,r[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,r[e]=24,r[256|e]=24):(n[e]=31744,n[256|e]=64512,r[e]=13,r[256|e]=13)}const o=new Uint32Array(2048),a=new Uint32Array(64),s=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,i=0;for(;0==(8388608&t);)t<<=1,i-=8388608;t&=-8388609,i+=947912704,o[e]=t|i}for(let e=1024;e<2048;++e)o[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)a[e]=e<<23;a[31]=1199570944,a[32]=2147483648;for(let e=33;e<63;++e)a[e]=2147483648+(e-32<<23);a[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(s[e]=1024);return{floatView:t,uint32View:i,baseTable:n,shiftTable:r,mantissaTable:o,exponentTable:a,offsetTable:s}}();function r(e){Math.abs(e)>65504&&console.warn("rgbe : toHalfFloat(): Value out of range."),e=function(e,t,i){return Math.max(t,Math.min(i,e))}(e,-65504,65504),n.floatView[0]=e;const t=n.uint32View[0],i=t>>23&511;return n.baseTable[i]+((8388607&t)>>n.shiftTable[i])}const o=function(e,t,i,n){const o=e[t+3],a=Math.pow(2,o-128)/255;i[n+0]=r(Math.min(e[t+0]*a,65504)),i[n+1]=r(Math.min(e[t+1]*a,65504)),i[n+2]=r(Math.min(e[t+2]*a,65504)),i[n+3]=r(1)},a=new Uint8Array(e);a.pos=0;const s=function(e){const n=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,r=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,o=/^\s*FORMAT=(\S+)\s*$/,a=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,s={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let l,u;if(e.pos>=e.byteLength||!(l=i(e)))return t(1,"no header found");if(!(u=l.match(/^#\?(\S+)/)))return t(3,"bad initial token");for(s.valid|=1,s.programtype=u[1],s.string+=l+"\n";l=i(e),!1!==l;)if(s.string+=l+"\n","#"!==l.charAt(0)){if((u=l.match(n))&&(s.gamma=parseFloat(u[1])),(u=l.match(r))&&(s.exposure=parseFloat(u[1])),(u=l.match(o))&&(s.valid|=2,s.format=u[1]),(u=l.match(a))&&(s.valid|=4,s.height=parseInt(u[1],10),s.width=parseInt(u[2],10)),2&s.valid&&4&s.valid)break}else s.comments+=l+"\n";return 2&s.valid?4&s.valid?s:t(3,"missing image size specifier"):t(3,"missing format specifier")}(a);if(-1!==s){const e=s.width,i=s.height,n=function(e,i,n){const r=i;if(r<8||r>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(r!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");const o=new Uint8Array(4*i*n);if(!o.length)return t(4,"unable to allocate buffer space");let a=0,s=0;const l=4*r,u=new Uint8Array(4),c=new Uint8Array(l);let h=n;for(;h>0&&s<e.byteLength;){if(s+4>e.byteLength)return t(1);if(u[0]=e[s++],u[1]=e[s++],u[2]=e[s++],u[3]=e[s++],2!=u[0]||2!=u[1]||(u[2]<<8|u[3])!=r)return t(3,"bad rgbe scanline format");let i,n=0;for(;n<l&&s<e.byteLength;){i=e[s++];const r=i>128;if(r&&(i-=128),0===i||n+i>l)return t(3,"bad scanline data");if(r){const t=e[s++];for(let e=0;e<i;e++)c[n++]=t}else c.set(e.subarray(s,s+i),n),n+=i,s+=i}const d=r;for(let e=0;e<d;e++){let t=0;o[a]=c[e+t],t+=r,o[a+1]=c[e+t],t+=r,o[a+2]=c[e+t],t+=r,o[a+3]=c[e+t],a+=4}h--}return o}(a.subarray(a.pos),e,i);if(-1!==n){let t;const r=n.length/4,a=new Uint16Array(4*r);for(let e=0;e<r;e++)o(n,4*e,a,4*e);return t=a,{width:e,height:i,data:t,header:s.string,gamma:s.gamma,exposure:s.exposure}}}return null}}function b$r(e,t){if(o$1q.defined("context",e),!e$2b(t))throw new t$16("urls is required and must have the url of image.");this._context=e,this._size=0,this._cubeVs=void 0,this._cubeUniformMap=void 0,this._cubeRenderState=void 0,this._inputTexture=void 0,this._cubeMap=void 0,this._sourceData=void 0,this._loading=!1,this._url=t,this._rgbeLoader=new U$h,this._inputTexture=void 0,this._ready=!1,this._position=o$1p.fromDegrees(113,23,1),this._modelMatrix=m$17.eastNorthUpToFixedFrame(this._position)}function xe$5(e){let t=[],i=[],n=0;function r(e,r,o,a,s,l,u,c,h,d,f){const p=l/h,_=u/d,m=l/2,g=u/2,x=c/2,v=h+1,y=d+1;let $=0;const b=new o$1p;for(let i=0;i<y;i++){const n=i*_-g;for(let i=0;i<v;i++){const l=i*p-m;b[e]=l*a,b[r]=n*s,b[o]=x,t.push(b.x,b.y,b.z),b[e]=0,b[r]=0,b[o]=c>0?1:-1,$+=1}}for(let e=0;e<d;e++)for(let t=0;t<h;t++){const r=n+t+v*e,o=n+t+v*(e+1),a=n+(t+1)+v*(e+1),s=n+(t+1)+v*e;i.push(r,o,s),i.push(o,a,s)}n+=$}r("z","y","x",-1,-1,1,1,1,1,1),r("z","y","x",1,-1,1,1,-1,1,1),r("x","z","y",1,1,1,1,1,1,1),r("x","z","y",1,-1,1,1,-1,1,1),r("x","y","z",1,-1,1,1,1,1,1),r("x","y","z",-1,-1,1,1,-1,1,1);let o=new Uint16Array(i),a=new Float32Array(t),s=new I$1p({attributes:{position:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:a})},indices:o,primitiveType:W$18.TRIANGLES,boundingSphere:i$1c.fromVertices(a)});return c$12.fromGeometry({context:e,geometry:s,attributeLocations:{position:0},bufferUsage:A$19.STATIC_DRAW})}function ye$6(e){return r$13.fromCache({context:e,vertexShaderSource:"\n precision mediump float;\n precision mediump int;\n\n attribute vec3 position;\n uniform mat4 projectionMat4;\n\n varying vec3 vWorldDirection;\n\n void main() {\n vWorldDirection = normalize(position);\n gl_Position = czm_modelViewProjection * vec4(position, 1.0);\n }\n ",fragmentShaderSource:"\n precision mediump float;\n precision mediump int;\n\n varying vec3 vWorldDirection;\n uniform sampler2D tEquirect;\n\n #define RECIPROCAL_PI 0.3183098861837907\n #define RECIPROCAL_PI2 0.15915494309189535\n\n vec2 equirectUv( in vec3 dir ) {\n // dir is assumed to be unit length\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n }\n\n void main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n }\n",attributeLocations:{position:0}})}function ge$9(e,t){let i=t;const n=e.context;i._cubeVs=xe$5(n),i._cubeSp=ye$6(n),i._cubeUniformMap={tEquirect:function(){return i._inputTexture}},i._cubeRenderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},viewport:new f$18(0,0,i._size,i._size)}),i._cubeMap=new e$1M({context:n,width:i._size,height:i._size,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,flipY:!0});let r=p$1d.getRotation(i._modelMatrix,new p$1e),o=p$1e.getColumn(r,0,new o$1p),a=p$1e.getColumn(r,1,new o$1p),s=p$1e.getColumn(r,2,new o$1p),l=o$1p.multiplyByScalar(s,-1,new o$1p),u=o$1p.multiplyByScalar(a,-1,new o$1p),c=o$1p.multiplyByScalar(o,-1,new o$1p),h=new v$K(e.camera._scene);h.frustum.near=.1,h.frustum.aspectRatio=1,h.frustum.fov=90*e$2a.RADIANS_PER_DEGREE,i._projectionMat4=p$1d.clone(h.frustum.projectionMatrix,i._projectionMat4);let d=[o,l,a,c,s,u],f=[s,a,s,s,a,s],p=[i._cubeMap.positiveX,i._cubeMap.positiveY,i._cubeMap.positiveZ,i._cubeMap.negativeX,i._cubeMap.negativeY,i._cubeMap.negativeZ];for(let t=0;t<6;t++){let r=new t$W({context:n,colorTextures:[p[t]]}),o=new i$_({vertexArray:i._cubeVs,shaderProgram:i._cubeSp,uniformMap:i._cubeUniformMap,pass:Le$s.OPAQUE,primitiveType:W$18.TRIANGLES,renderState:i._cubeRenderState,modelMatrix:i._modelMatrix,cull:!1,owner:i,framebuffer:r,pickOnly:!0});h.setView({destination:i._position,orientation:{direction:d[t],up:f[t]}}),e.context.uniformState.updateCamera(h,e.context);let a=new n$Z(e.context);e.context.draw(o,a)}}Object.defineProperties(b$r.prototype,{cubeMap:{get:function(){return this._cubeMap}},ready:{get:function(){return this._ready}}});let be$7=/(\.hdr$)/i,ve$6=/(\.jpg$)/i;function t$e(){}function E$l(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).context,i=e.width,n=e.height,r=e.depth,o=e.mipmapLevels,a=e.is3D,s=u$_(e.pixelFormat,V$10.RGBA),l=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE),u=s,c=V$10.isCompressedFormat(u);if(s===V$10.DEPTH_STENCIL?u=de$x.DEPTH24_STENCIL8:s===V$10.DEPTH_COMPONENT&&(l===_$$.UNSIGNED_SHORT?u=de$x.DEPTH_COMPONENT16:l===_$$.UNSIGNED_INT&&(u=de$x.DEPTH_COMPONENT24)),l===_$$.FLOAT)switch(s){case V$10.RGBA:u=de$x.RGBA32F;break;case V$10.RGB:u=de$x.RGB32F;break;case V$10.RG:u=de$x.RG32F;break;case V$10.RED:u=de$x.R32F}else if(l===_$$.HALF_FLOAT)switch(s){case V$10.RGBA:u=de$x.RGBA16F;break;case V$10.RGB:u=de$x.RGB16F;break;case V$10.RG:u=de$x.RG16F;break;case V$10.RED:u=de$x.R16F}if(!e$2b(i)||!e$2b(n))throw new t$16("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(o$1q.typeOf.number.greaterThan("width",i,0),i>e$1T.maximumTextureSize)throw new t$16("Width must be less than or equal to the maximum texture size ("+e$1T.maximumTextureSize+"). Check maximumTextureSize.");if(o$1q.typeOf.number.greaterThan("height",n,0),n>e$1T.maximumTextureSize)throw new t$16("Height must be less than or equal to the maximum texture size ("+e$1T.maximumTextureSize+"). Check maximumTextureSize.");if(!V$10.validate(s))throw new t$16("Invalid options.pixelFormat.");if(!c&&!_$$.validate(l))throw new t$16("Invalid options.pixelDatatype.");if(s===V$10.DEPTH_COMPONENT&&l!==_$$.UNSIGNED_SHORT&&l!==_$$.UNSIGNED_INT)throw new t$16("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(s===V$10.DEPTH_STENCIL&&l!==_$$.UNSIGNED_INT_24_8)throw new t$16("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(l===_$$.FLOAT&&!t.floatingPointTexture)throw new t$16("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(l===_$$.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$16("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(V$10.isDepthFormat(s)&&!t.depthTexture)throw new t$16("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.");if(c){if(V$10.isDXTFormat(u)&&!t.s3tc)throw new t$16("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(V$10.isPVRTCFormat(u)&&!t.pvrtc)throw new t$16("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(V$10.isETC1Format(u)&&!t.etc1)throw new t$16("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.")}var h,d=e.preMultiplyAlpha||s===V$10.RGB||s===V$10.LUMINANCE,f=u$_(e.flipY,!0),p=t._gl,_=a?p.TEXTURE_3D:p.TEXTURE_2D_ARRAY,m=p.createTexture();p.activeTexture(p.TEXTURE0),p.bindTexture(_,m),p.texStorage3D(_,o,u,i,n,r),p.bindTexture(_,null),h=c?V$10.compressedTextureSizeInBytes(s,i,n,r):V$10.textureSizeInBytes(s,l,i,n,r),this._id=e$1Q(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=_,this._texture=m,this._pixelFormat=s,this._internalFormat=u,this._pixelDatatype=l,this._width=i,this._height=n,this._depth=r,this._dimensions=new o$1p(i,n,r),this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0,this.ignoreWEBGL2=!1,this._isCompressed=c,this.sampler=e$2b(e.sampler)?e.sampler:new e$1P,t.memorySize+=h}function L$n(e,t,i,n){if(!e$2a.isPowerOfTwo(i)||!e$2a.isPowerOfTwo(n))return!1;for(var r=e.length,o=i,a=n,s=0;;){if(s+=V$10.compressedTextureSizeInBytes(t,o,a),a>>=1,0==(o>>=1)&&0==a)break;o=Math.max(o,1),a=Math.max(a,1)}return s==r}function b$q(e,t,i){switch(e){case V$10.RGB_DXT1:case V$10.RGB_ETC1:return(t+3>>2)*(i+3>>2)*8;case V$10.RGBA_DXT5:return(t+3>>2)*(i+3>>2)*16;case V$10.RGB_PVRTC_4BPPV1:case V$10.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case V$10.RGB_PVRTC_2BPPV1:case V$10.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case de$x.RGB565:return t*i*2;case V$10.RGBA:return t*i*4;case V$10.LUMINANCE_ALPHA:return t*i*2;default:return 0}}function f$l(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).context,i=e.width,n=e.height,r=e.depth,o=e.mipmapLevels,a=e.is3D,s=u$_(e.pixelFormat,V$10.RGBA),l=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE),u=s,c=V$10.isCompressedFormat(u);if(s===V$10.DEPTH_STENCIL?u=de$x.DEPTH24_STENCIL8:s===V$10.DEPTH_COMPONENT&&(l===_$$.UNSIGNED_SHORT?u=de$x.DEPTH_COMPONENT16:l===_$$.UNSIGNED_INT&&(u=de$x.DEPTH_COMPONENT24)),l===_$$.FLOAT)switch(s){case V$10.RGBA:u=de$x.RGBA32F;break;case V$10.RGB:u=de$x.RGB32F;break;case V$10.RG:u=de$x.RG32F;break;case V$10.RED:u=de$x.R32F}else if(l===_$$.HALF_FLOAT)switch(s){case V$10.RGBA:u=de$x.RGBA16F;break;case V$10.RGB:u=de$x.RGB16F;break;case V$10.RG:u=de$x.RG16F;break;case V$10.RED:u=de$x.R16F}if(!e$2b(i)||!e$2b(n))throw new t$16("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(o$1q.typeOf.number.greaterThan("width",i,0),i>e$1T.maximumTextureSize)throw new t$16("Width must be less than or equal to the maximum texture size ("+e$1T.maximumTextureSize+"). Check maximumTextureSize.");if(o$1q.typeOf.number.greaterThan("height",n,0),n>e$1T.maximumTextureSize)throw new t$16("Height must be less than or equal to the maximum texture size ("+e$1T.maximumTextureSize+"). Check maximumTextureSize.");if(!V$10.validate(s))throw new t$16("Invalid options.pixelFormat.");if(!c&&!_$$.validate(l))throw new t$16("Invalid options.pixelDatatype.");if(s===V$10.DEPTH_COMPONENT&&l!==_$$.UNSIGNED_SHORT&&l!==_$$.UNSIGNED_INT)throw new t$16("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(s===V$10.DEPTH_STENCIL&&l!==_$$.UNSIGNED_INT_24_8)throw new t$16("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(l===_$$.FLOAT&&!t.floatingPointTexture)throw new t$16("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(l===_$$.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$16("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(V$10.isDepthFormat(s)&&!t.depthTexture)throw new t$16("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.");if(c){if(V$10.isDXTFormat(u)&&!t.s3tc)throw new t$16("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(V$10.isPVRTCFormat(u)&&!t.pvrtc)throw new t$16("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(V$10.isETC1Format(u)&&!t.etc1)throw new t$16("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.")}var h,d=e.preMultiplyAlpha||s===V$10.RGB||s===V$10.LUMINANCE,f=u$_(e.flipY,!0),p=t._gl,_=a?p.TEXTURE_3D:p.TEXTURE_2D_ARRAY,m=p.createTexture();p.activeTexture(p.TEXTURE0),p.bindTexture(_,m),p.texStorage3D(_,o,u,i,n,r),p.bindTexture(_,null),h=c?V$10.compressedTextureSizeInBytes(s,i,n,r):V$10.textureSizeInBytes(s,l,i,n,r),this._id=e$1Q(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=_,this._texture=m,this._pixelFormat=s,this._internalFormat=u,this._pixelDatatype=l,this._width=i,this._height=n,this._depth=r,this._dimensions=new o$1p(i,n,r),this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0,this.ignoreWEBGL2=!1,this._isCompressed=c,this.sampler=e$2b(e.sampler)?e.sampler:new e$1P,t.memorySize+=h}function C$k(e,t,i,n){if(!e$2a.isPowerOfTwo(i)||!e$2a.isPowerOfTwo(n))return!1;for(var r=e.length,o=i,a=n,s=0;;){if(s+=V$10.compressedTextureSizeInBytes(t,o,a),a>>=1,0==(o>>=1)&&0==a)break;o=Math.max(o,1),a=Math.max(a,1)}return s==r}function L$m(e,t,i){switch(e){case V$10.RGB_DXT1:case V$10.RGB_ETC1:return(t+3>>2)*(i+3>>2)*8;case V$10.RGBA_DXT5:return(t+3>>2)*(i+3>>2)*16;case V$10.RGB_PVRTC_4BPPV1:case V$10.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case V$10.RGB_PVRTC_2BPPV1:case V$10.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case de$x.RGB565:return t*i*2;case V$10.RGBA:return t*i*4;case V$10.LUMINANCE_ALPHA:return t*i*2;default:return 0}}function e$j(e){(e=u$_(e,u$_.EMPTY_OBJECT)).context.webgpu?this._inner=new f$l(e):this._inner=new E$l(e)}b$r.prototype.update=function(e){if(!e$2b(this._sourceData)&&!this._loading){let e=t$11.createIfNeeded(this._url);be$7.test(this._url)?e.fetchArrayBuffer().then((e=>{this._sourceData=this._rgbeLoader.parse(e)})).otherwise((e=>{this._loading=!1})):ve$6.test(this._url)&&e.fetchImage().then((e=>{this._sourceData=e})).otherwise((e=>{this._loading=!1})),this._loading=!0}if(e$2b(this._sourceData)){if(!e$2b(this._inputTexture)){let t=this._sourceData.data?{arrayBufferView:this._sourceData.data,width:this._sourceData.width,height:this._sourceData.height}:this._sourceData;this._inputTexture=new t$V({context:e.context,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,flipY:!0,source:t}),this._size=Math.min(this._sourceData.width,this._sourceData.height)}this._ready||(ge$9(e,this),this._ready=!0)}},b$r.prototype.isDestroyed=function(){return!1},b$r.prototype.destroy=function(){return this._inputTexture=this._inputTexture&&this._inputTexture.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),destroyObject(this)},t$e.drawSimplePolyline=function(e,t){var i,n=t.canvasPostions,r=u$_(t.lineWidth,1),o=u$_(t.lineColor,e$1U.WHITE),a=n.length;for(e.lineWidth=r,e.strokeStyle=o.toCssColorString(),e.beginPath(),e.moveTo(n[0].x,n[0].y),i=1;i<a;i++)e.lineTo(n[i].x,n[i].y);e.stroke()},t$e.drawPolygon=function(e,t){var i,n=t.canvasPostions,r=u$_(t.lineWidth,1),o=u$_(t.lineColor,e$1U.WHITE),a=u$_(t.fillColor,e$1U.RED),s=n.length;for(e.lineWidth=r,e.strokeStyle=o.toCssColorString(),e.fillStyle=a.toCssColorString(),e.beginPath(),e.moveTo(n[0].x,n[0].y),i=1;i<s;i++)e.lineTo(n[i].x,n[i].y);e.closePath(),e.stroke(),e.fill()},Object.defineProperties(t$e.prototype,{}),t$e.prototype.destroy=function(){return i$10(this)},Object.defineProperties(E$l.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$h.NEAREST_MIPMAP_NEAREST||t===tt$h.NEAREST_MIPMAP_LINEAR||t===tt$h.LINEAR_MIPMAP_NEAREST||t===tt$h.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;const a=this._pixelFormat;(o===_$$.FLOAT&&!r.textureFloatLinear||o===_$$.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$h.NEAREST_MIPMAP_NEAREST:tt$h.NEAREST,i=rt$i.NEAREST),r.webgl2&&V$10.isDepthFormat(a)&&(t=tt$h.NEAREST,i=rt$i.NEAREST);var s=r._gl,l=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(l,this._texture),s.texParameteri(l,s.TEXTURE_MIN_FILTER,t),s.texParameteri(l,s.TEXTURE_MAG_FILTER,i),s.texParameteri(l,s.TEXTURE_WRAP_S,e.wrapS),s.texParameteri(l,s.TEXTURE_WRAP_T,e.wrapT),e$2b(this._textureFilterAnisotropic)&&s.texParameteri(l,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),s.bindTexture(l,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),E$l.prototype.setDataBufferWithMipmap=function(e,t){var i=this._context._gl;i.activeTexture(i.TEXTURE0),i.bindTexture(this._textureTarget,this._texture);var n=this._width,r=this._height,o=L$n(t,this._internalFormat,n,r),a=0,s=0;do{var l,u=b$q(this._internalFormat,n,r);l=this._internalFormat==V$10.RGBA&&this._pixelDatatype===_$$.FLOAT?new Float32Array(t.buffer,t.byteOffset+a,u):new Uint8Array(t.buffer,t.byteOffset+a,u),this._isCompressed?i.compressedTexSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,l):i.texSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,this._pixelDatatype,l),n=Math.max(n>>1,1),r=Math.max(r>>1,1),a+=u}while(a<t.length&&o);i.bindTexture(this._textureTarget,null)},E$l.prototype.generateMipmap=function(e){if(e=u$_(e,I$1e.DONT_CARE),this._width>1&&!e$2a.isPowerOfTwo(this._width))throw new t$16("width must be a power of two to call generateMipmap().");if(this._height>1&&!e$2a.isPowerOfTwo(this._height))throw new t$16("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},E$l.prototype.isDestroyed=function(){return!1},E$l.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,i$10(this)},f$l.create=function(e){return new Texture(e)},Object.defineProperties(f$l.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$h.NEAREST_MIPMAP_NEAREST||t===tt$h.NEAREST_MIPMAP_LINEAR||t===tt$h.LINEAR_MIPMAP_NEAREST||t===tt$h.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;(o===_$$.FLOAT&&!r.textureFloatLinear||o===_$$.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$h.NEAREST_MIPMAP_NEAREST:tt$h.NEAREST,i=rt$i.NEAREST);var a=r._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.texParameteri(s,a.TEXTURE_MIN_FILTER,t),a.texParameteri(s,a.TEXTURE_MAG_FILTER,i),a.texParameteri(s,a.TEXTURE_WRAP_S,e.wrapS),a.texParameteri(s,a.TEXTURE_WRAP_T,e.wrapT),e$2b(this._textureFilterAnisotropic)&&a.texParameteri(s,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),a.bindTexture(s,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),f$l.prototype.setDataBufferWithMipmap=function(e,t){var i=this._context._gl;i.activeTexture(i.TEXTURE0),i.bindTexture(this._textureTarget,this._texture);var n=this._width,r=this._height,o=C$k(t,this._internalFormat,n,r),a=0,s=0;do{var l,u=L$m(this._internalFormat,n,r);l=this._internalFormat==V$10.RGBA&&this._pixelDatatype===_$$.FLOAT?new Float32Array(t.buffer,t.byteOffset+a,u):new Uint8Array(t.buffer,t.byteOffset+a,u),this._isCompressed?i.compressedTexSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,l):i.texSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,this._pixelDatatype,l),n=Math.max(n>>1,1),r=Math.max(r>>1,1),a+=u}while(a<t.length&&o);i.bindTexture(this._textureTarget,null)},f$l.prototype.generateMipmap=function(e){if(e=u$_(e,I$1e.DONT_CARE),this._width>1&&!e$2a.isPowerOfTwo(this._width))throw new t$16("width must be a power of two to call generateMipmap().");if(this._height>1&&!e$2a.isPowerOfTwo(this._height))throw new t$16("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},f$l.prototype.isDestroyed=function(){return!1},f$l.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,i$10(this)},e$j.create=function(e){return new Texture(e)},Object.defineProperties(e$j.prototype,{id:{set:function(e){this._inner.id=e},get:function(){return this._inner.id}},sampler:{get:function(){return this._inner.sampler},set:function(e){this._inner.sampler=e}},pixelFormat:{get:function(){return this._inner.pixelFormat}},pixelDatatype:{get:function(){return this._inner.pixelDatatype}},dimensions:{get:function(){return this._inner.dimensions}},preMultiplyAlpha:{get:function(){return this._inner.preMultiplyAlpha}},flipY:{get:function(){return this._inner.flipY}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},_target:{get:function(){return this._inner._target}}}),e$j.prototype.setDataBufferWithMipmap=function(e,t){this._inner.setDataBufferWithMipmap(e,t)},e$j.prototype.generateMipmap=function(e){this._inner.generateMipmap(e)},e$j.prototype.isDestroyed=function(){return!1},e$j.prototype.destroy=function(){return this._inner.destroy(),i$10(this)};var _0x3d7cb4=(_0xa6f4f7=!0,function(e,t){var i=_0xa6f4f7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa6f4f7=!1,i}),_0x5c6176=_0x3d7cb4(void 0,(function(){return _0x5c6176.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c6176).search("(((.+)+)+)+$")})),_0xa6f4f7;function _0x41e390(){}function _0x391f55(e){var t={},i=e.vertexAttributes;for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n].index);return t}function _0x13fe64(e,t,i){var n=t.context,r=u$_(i,e.shaderProgram),o=r.fragmentShaderSource.clone(),a=[];o.sources=o.sources.map((function(e){e=ShaderSource.replaceMain(e,"czm_Debug_main");for(var t,i=/gl_FragData\[(\d+)\]/g;null!==(t=i.exec(e));)-1===a.indexOf(t[1])&&a.push(t[1]);return e}));var s,l=a.length,u="void main() \n{ \n czm_Debug_main(); \n";if(t.debugShowCommands){e$2b(e._debugColor)||(e._debugColor=e$1U.fromRandom());var c=e._debugColor;if(l>0)for(s=0;s<l;++s)u+=" gl_FragData["+a[s]+"].rgb *= vec3("+c.red+", "+c.green+", "+c.blue+"); \n";else u+=" gl_FragColor.rgb *= vec3("+c.red+", "+c.green+", "+c.blue+"); \n"}if(t.debugShowFrustums){var h=1&e.debugOverlappingFrustums?"1.0":"0.0",d=2&e.debugOverlappingFrustums?"1.0":"0.0",f=4&e.debugOverlappingFrustums?"1.0":"0.0";if(l>0)for(s=0;s<l;++s)u+=" gl_FragData["+a[s]+"].rgb *= vec3("+h+", "+d+", "+f+"); \n";else u+=" gl_FragColor.rgb *= vec3("+h+", "+d+", "+f+"); \n"}u+="}",o.sources.push(u);var p=_0x391f55(r);return r$13.fromCache({context:n,vertexShaderSource:r.vertexShaderSource,fragmentShaderSource:o,attributeLocations:p})}_0x5c6176(),_0x41e390.debugShowBoundingVolume=function(e,t,i,n){var r=t._frameState,o=r.context,a=e.boundingVolume;e$2b(t._debugVolume)&&t._debugVolume.destroy();var s,l=o$1p.clone(a.center);if(r.mode!==SceneMode.SCENE3D){l=p$1d.multiplyByPoint(_0x23166d,l,l);var u=r.mapProjection,c=u.unproject(l);l=u.ellipsoid.cartographicToCartesian(c)}if(e$2b(a.radius)){var h=a.radius;s=GeometryPipeline.toWireframe(EllipsoidGeometry.createGeometry(new EllipsoidGeometry({radii:new o$1p(h,h,h),vertexFormat:PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Primitive({geometryInstances:new GeometryInstance({geometry:s,modelMatrix:p$1d.fromTranslation(l),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)}}),appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1}),asynchronous:!1})}else{var d=a.halfAxes;s=GeometryPipeline.toWireframe(BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new o$1p(2,2,2),vertexFormat:PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Primitive({geometryInstances:new GeometryInstance({geometry:s,modelMatrix:p$1d.fromRotationTranslation(d,l,new p$1d),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)}}),appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1}),asynchronous:!1})}var f,p=r.commandList,_=r.commandList=[];(t._debugVolume.update(r),e=_[0],r.useLogDepth)&&(e=DerivedCommand.createLogDepthCommand(e,o).command);e$2b(n)&&(f=i.framebuffer,i.framebuffer=n),e.execute(o,i),e$2b(f)&&(i.framebuffer=f),r.commandList=p},_0x41e390.executeDebugCommand=function(e,t,i){var n=i$_.shallowClone(e);n.shaderProgram=_0x13fe64(e,t),n.execute(t.context,i),n.shaderProgram.destroy()};var _0x23166d=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);_0x23166d=p$1d.inverseTransformation(_0x23166d,_0x23166d),_0x41e390.prototype.isDestroyed=function(){return!1},_0x41e390.prototype.destroy=function(){};var _0x455703=(_0x141da9=!0,function(e,t){var i=_0x141da9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x141da9=!1,i}),_0x244d60=_0x455703(void 0,(function(){return _0x244d60.toString().search("(((.+)+)+)+$").toString().constructor(_0x244d60).search("(((.+)+)+)+$")})),_0x141da9;function _0x3cc8e0(){this.lightCount=new Uint16Array(_0x1d9df9.MAX_FORWARD_PLUS_LIGHTS),this.objCount=new Uint16Array(2)}_0x244d60(),Object.defineProperties(_0x3cc8e0.prototype,{width:{get:function(){return this._width}},height:{get:function(){return this._height}},zEnd:{get:function(){return this._zEnd}}}),_0x3cc8e0.prototype.reset=function(){for(var e=0,t=this.lightCount.length;e<t;e++)this.lightCount[e]=0;for(e=0,t=this.objCount.length;e<t;e++)this.objCount[e]=0};var _0x1a36d1=(_0x472869=!0,function(e,t){var i=_0x472869?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x472869=!1,i}),_0x34867b=_0x1a36d1(void 0,(function(){return _0x34867b.toString().search("(((.+)+)+)+$").toString().constructor(_0x34867b).search("(((.+)+)+)+$")})),_0x472869;_0x34867b();const _0x105495=4;function _0x4681ea(){this.globalLightBatchTable=null,this.gridBatchTable=null}function _0x40e0e7(){this.camera=null,this.lastPos=new o$1p,this.lastRot=new o$1p,this.reflection=!1,this.aspectRatio=1,this.visibilityMask=null,this.shadowNode=null,this.lastFrame=0,this.currentBufIdx=-1,this.gridBuffers=null}function _0x25bdb2(e,t,i){this.width=u$_(e,0),this.height=u$_(t,0),this.zEnd=u$_(i,0)}function _0x205de2(e,t,i,n,r,o,a){this._scene=a,this._cachedGrid=[],this._currentLightList=[],this._forwardPlusNumFloat4PerLight=_0x105495,this._globalLightBatchTableStep=new e$29,this._globalLightBatchTableDimensions=new o$1o,this._lastTotalLightCount=-1,this._scene=a,this._width=e,this._height=t,this._numSlices=i,this._lightsPerCell=n+3,this._minDistance=r,this._maxDistance=o,this._tableSize=this._width*this._height*this._lightsPerCell,this._invMaxDistance=1/this._maxDistance;var s=e,l=t;this._resolutionAtSlice=[];for(var u=0;u<i;++u)this._resolutionAtSlice.push(new _0x25bdb2(s,l,this.getDepthAtSlice(u+1))),s*=2,l*=2;this._resolutionAtSlice[i-1].zEnd=99999999999999;var c=-(1-(1<<(i<<1)))/3*e*t;this._lightCountInCell=[];for(u=0;u<c;u++)this._lightCountInCell.push(new _0x3cc8e0);this.initLightGridBatchTable()}Object.defineProperties(_0x205de2.prototype,{});var _0x480071=new o$1o;_0x205de2.prototype.getGlobalLightTableSize=function(e){var t=Math.floor(1024/_0x105495),i=e,n=Math.min(i,t),r=_0x105495*n,o=Math.ceil(i/n);return o=e$2a.nextPowerOfTwo(o),_0x480071.x=r,_0x480071.y=o,_0x480071},_0x205de2.prototype.initGlobalLightTable=function(e){var t=1/e.x,i=.5*t,n=1/e.y,r=.5*n;this._globalLightBatchTableDimensions=new o$1o(e.x,e.y),this._globalLightBatchTableStep=new e$29(t,i,n,r)};var _0x8a6b6b=new p$1e;function _0x136a83(e,t){return e.lightType!=t.lightType?e.lightType<t.lightType:e.distanceToCamera<t.distanceToCamera}_0x205de2.prototype.fillGlobalLightListBuffer=function(e,t,i){if(this._currentLightList.length){var n=e.viewMatrix;p$1d.getRotation(n,_0x8a6b6b);for(var r=0,o=0,a=this._currentLightList.length;o<a;o++){var s=this._currentLightList[o];s.lightType==_0x1d9df9.POINT?(i[r++]=s.positionEC.x,i[r++]=s.positionEC.y,i[r++]=s.positionEC.z,i[r++]=s.lightType,i[r++]=s.lightColor.red,i[r++]=s.lightColor.green,i[r++]=s.lightColor.blue,i[r++]=0,i[r++]=s.cutoffDistance,i[r++]=s.decay,i[r++]=0,i[r++]=0,r+=4):s.lightType==_0x1d9df9.SPOT&&(i[r++]=s.positionEC.x,i[r++]=s.positionEC.y,i[r++]=s.positionEC.z,i[r++]=s.lightType,i[r++]=s.directionEC.x,i[r++]=s.directionEC.y,i[r++]=s.directionEC.z,i[r++]=0,i[r++]=s.lightColor.red,i[r++]=s.lightColor.green,i[r++]=s.lightColor.blue,i[r++]=s.exponent,i[r++]=s.distance,i[r++]=s.decay,i[r++]=s.angleCos,i[r++]=s.penumbraCos)}t.copyFrom({width:this._globalLightBatchTableDimensions.x,height:this._globalLightBatchTableDimensions.y,arrayBufferView:i},0,0)}},_0x205de2.prototype.getCachedGridFor=function(e){for(var t=this._scene._frameState.frameNumber,i=0;i<this._cachedGrid.length;i++){var n=this._cachedGrid[i];if(n.camera==e&&n.reflection==e.bReflect&&Math.abs(n.aspectRatio-e.frustum.aspectRatio)<e$2a.EPSILON7){var r=n.lastFrame==t;return n.lastFrame=t,r?(!o$1p.equals(n.lastPos,e.position)||!o$1p.equals(n.lastRot,e.direction))&&(n.currentBufIdx++,n.currentBufIdx>=n.gridBuffers.length&&n.gridBuffers.push(new _0x4681ea),r=!1):n.currentBufIdx=0,o$1p.clone(e.position,n.lastPos),o$1p.clone(e.direction,n.lastRot),{upToDate:r,cacheGrid:n}}}var o=new _0x40e0e7;return o.camera=e,o$1p.clone(e.position,o.lastPos),o$1p.clone(e.direction,o.lastRot),o.reflection=e.bReflect,o.aspectRatio=e.frustum.aspectRatio,o.lastFrame=t,o.currentBufIdx=0,o.gridBuffers=[new _0x4681ea],this._cachedGrid.push(o),{upToDate:!1,cacheGrid:o}},_0x205de2.prototype.deleteOldGridBuffers=function(){for(var e=this._scene._frameState.frameNumber,t=this._cachedGrid.length,i=0;i<t;){var n=this._cachedGrid[i];if(n.lastFrame+3<e){for(var r=0;r<n.gridBuffers.length;r++){var o=n.gridBuffers[r];o.gridBatchTable&&(o.gridBatchTable.destroy(),o.gridBatchTable=null),o.globalLightBatchTable&&(o.globalLightBatchTable.destroy(),o.globalLightBatchTable=null)}var a=this._cachedGrid[this._cachedGrid.length-1];this._cachedGrid[i]=a,this._cachedGrid.pop(),i++,t=this._cachedGrid.length}else i++}},_0x205de2.prototype.initParamterForLightUBO=function(e){e.addUniform("uLightGridTextureStep",4),e.addUniform("uLightGridTextureDimension",2),e.addUniform("uGlobalLightTextureStep",4),e.addUniform("uGlobalLightTextureDimension",2),e.addUniform("uLightMinDistance",1),e.addUniform("uLightInvMaxDistance",1),e.addUniform("uLightGridNumSilces",1),e.addUniform("uLightGridTableSize",1),e.addUniform("uF3dViewportOffset",4),e.addUniform("uF3dGridHWW",4,this._numSlices)},_0x205de2.prototype.fillLightUBO=function(e){var t=this._lightGridBatchTableStep,i=this._lightGridBatchTableDimensions;e.updateFloat4("uLightGridTextureStep",t.x,t.y,t.z,t.w),e.updateFloat2("uLightGridTextureDimension",i.x,i.y),t=this._globalLightBatchTableStep,i=this._globalLightBatchTableDimensions,e.updateFloat4("uGlobalLightTextureStep",t.x,t.y,t.z,t.w),e.updateFloat2("uGlobalLightTextureDimension",i.x,i.y),e.updateFloat("uLightMinDistance",this._minDistance),e.updateFloat("uLightInvMaxDistance",this._invMaxDistance),e.updateFloat("uLightGridNumSilces",this._numSlices-1),e.updateFloat("uLightGridTableSize",this._tableSize);var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;e.updateFloat4("uF3dViewportOffset",0,0,0,0);for(var o=new Float32Array(4*this._numSlices),a=0,s=0;s<this._numSlices;++s)o[a++]=this._resolutionAtSlice[s].width/n,o[a++]=this._resolutionAtSlice[s].height/r,o[a++]=this._resolutionAtSlice[s].width*this._lightsPerCell,o[a++]=s<1?this._lightsPerCell:r;e.updateFloatArray("uF3dGridHWW",o)},_0x205de2.prototype.createLightUniformMap=function(e){var t=this;(e={}).uLightGridTextureStep=function(){return t._lightGridBatchTableStep},e.uLightGridTextureDimension=function(){return t._lightGridBatchTableDimensions},e.uGlobalLightTextureStep=function(){return t._globalLightBatchTableStep},e.uGlobalLightTextureDimension=function(){return t._globalLightBatchTableDimensions},e.uLightMinDistance=function(){return t._minDistance},e.uLightInvMaxDistance=function(){return t._invMaxDistance},e.uLightGridNumSilces=function(){return t._numSlices-1},e.uLightGridTableSize=function(){return t._tableSize};for(var i=this._scene._context.drawingBufferWidth,n=this._scene._context.drawingBufferHeight,r=[],o=0;o<this._numSlices;++o){var a=new e$29;a.x=this._resolutionAtSlice[o].width/i,a.y=this._resolutionAtSlice[o].height/n,a.z=this._resolutionAtSlice[o].width*this._lightsPerCell,a.w=o<1?this._lightsPerCell:n,r.push(a)}return e.uF3dGridHWW=function(){return r},e.uLightGridTexture=function(){return e$2b(t._ubo.lightGridTexture)?t._ubo.lightGridTexture:t._scene._context.defaultTexture},e.uGlobalLightListTexture=function(){return e$2b(t._ubo.globalLightListTexture)?t._ubo.globalLightListTexture:t._scene._context.defaultTexture},e},_0x205de2.prototype.initLightGridBatchTable=function(){var e=Math.floor(1024/this._lightsPerCell),t=-(1-(1<<(this._numSlices<<1)))/3*this._width*this._height,i=Math.min(t,e),n=this._lightsPerCell*i,r=Math.ceil(t/i),o=1/n,a=.5*o,s=1/(r=e$2a.nextPowerOfTwo(r)),l=.5*s;this._lightGridBatchTableDimensions=new o$1o(n,r),this._lightGridBatchTableStep=new e$29(o,a,s,l)},_0x205de2.prototype.getDepthAtSlice=function(e){return-(e/(this._numSlices-1)*this._maxDistance-this._minDistance)},_0x205de2.prototype.getSliceAtDepth=function(e){var t=e$2a.clamp((-e+this._minDistance)*this._invMaxDistance,0,1);return Math.floor(t*(this._numSlices-1))},_0x205de2.prototype.projectionSpaceToGridSpace=function(e,t){var i=this._resolutionAtSlice[t],n=e$2a.clamp(e.x,0,1)*i.width,r=e$2a.clamp(e.y,0,1)*i.height;return{outX:Math.min(Math.floor(n),i.width-1),outY:Math.min(Math.floor(r),i.height-1)}};var _0x17cda4=new e$29,_0x37b81e=new Float32Array(256),_0x332b1d,_0x286f70,_0x13c530=[new o$1p,new o$1p],_0xf70ded=[new o$1p,new o$1p],_0x2e2d10=new o$1p,_0x1f624b=new o$1p,_0x486655=new o$1o,_0x38a894=new o$1o,_0x96cda3=[new e$29,new e$29],_0x160f55=[new e$29,new e$29],_0x18fae7=new p$1d,_0x2b626f=new e$26;_0x205de2.prototype.collectLights=function(){var e=this._scene,t=e._frameState.passes,i=this._scene.context;if(this._ubo.textureDirty=!1,!t.pick&&!t.depth){var n,r=e.camera,o=this.getCachedGridFor(r);if(!o.upToDate){n=o.cacheGrid;var a=e._frameState.lightSource,s=a.pointLight.length+a.spotLight.length;if(0==s&&s==this._lastTotalLightCount)return;this._lastTotalLightCount=s,this._currentLightList=[];for(var l=a._visibleLightList[_0x1d9df9.POINT].values,u=a._visibleLightList[_0x1d9df9.SPOT].values,c=0;c<l.length;c++)this._currentLightList.push(l[c]);for(c=0;c<u.length;c++)this._currentLightList.push(u[c]);var h=this._currentLightList.length;m$H(this._currentLightList,_0x136a83);var d=n.gridBuffers[n.currentBufIdx];if(!d.gridBatchTable){var f=-(1-(1<<(this._numSlices<<1)))/3;_0x286f70=new Float32Array(this._lightGridBatchTableDimensions.x*this._lightGridBatchTableDimensions.y),d.gridBatchTable=new t$V({context:i,pixelFormat:i.webgpu?V$10.RED:V$10.LUMINANCE,pixelDatatype:_$$.FLOAT,width:this._lightGridBatchTableDimensions.x,height:this._lightGridBatchTableDimensions.y,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),flipY:!1}),this._ubo.lightGridTexture=d.gridBatchTable}var p=Math.max(h,this._lightsPerCell-3),_=this.getGlobalLightTableSize(p);(!d.globalLightBatchTable||d.globalLightBatchTable.height<_.y)&&(d.globalLightBatchTable&&(d.globalLightBatchTable.destroy(),d.globalLightBatchTable=null),this.initGlobalLightTable(_),_0x332b1d=new Float32Array(this._globalLightBatchTableDimensions.x*this._globalLightBatchTableDimensions.y*4),d.globalLightBatchTable=new t$V({context:i,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT,width:this._globalLightBatchTableDimensions.x,height:this._globalLightBatchTableDimensions.y,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),flipY:!1}),this._ubo.globalLightListTexture=d.globalLightBatchTable),this.fillGlobalLightListBuffer(r,d.globalLightBatchTable,_0x332b1d),this._lightCountInCell.map((function(e){e.reset()}));var m=r.viewMatrix,g=r.frustum.projectionMatrix,x=r.frustum.near,v=r.frustum.far;0==v&&(v=99999999999999);for(c=0;c<this._numSlices-1;++c)_0x17cda4.x=0,_0x17cda4.y=0,_0x17cda4.z=e$2a.clamp(this._resolutionAtSlice[c].zEnd,-v,-x),_0x17cda4.w=1,p$1d.multiplyByVector(g,_0x17cda4,_0x17cda4),_0x37b81e[c]=_0x17cda4.z/_0x17cda4.w;_0x37b81e[this._numSlices-1]=1;for(c=0;c<h;++c){var y=this._currentLightList[c],$=p$1d.IDENTITY;p$1d.multiply(m,$,_0x18fae7),e$26.transform(y.aabb,_0x18fae7,_0x2b626f);var b=_0x2b626f.minimum,T=_0x2b626f.maximum,C=b.z;b.z=T.z,T.z=C,b.z=e$2a.clamp(b.z,-v,-x),T.z=e$2a.clamp(T.z,-v,-x),_0x96cda3[0].x=b.x,_0x96cda3[0].y=b.y,_0x96cda3[0].z=b.z,_0x96cda3[0].w=1,_0x96cda3[1].x=b.x,_0x96cda3[1].y=b.y,_0x96cda3[1].z=b.z,_0x96cda3[1].w=1,_0x160f55[0].x=T.x,_0x160f55[0].y=T.y,_0x160f55[0].z=T.z,_0x160f55[0].w=1,_0x160f55[1].x=T.x,_0x160f55[1].y=T.y,_0x160f55[1].z=T.z,_0x160f55[1].w=1,_0x160f55[0].z=b.z,_0x96cda3[1].z=T.z;for(var S=0;S<2;++S){p$1d.multiplyByVector(g,_0x96cda3[S],_0x96cda3[S]),p$1d.multiplyByVector(g,_0x160f55[S],_0x160f55[S]);var w=1/_0x96cda3[S].w,E=1/_0x160f55[S].w;_0x13c530[S].x=_0x96cda3[S].x*w*.5+.5,_0x13c530[S].y=_0x96cda3[S].y*w*.5+.5,_0x13c530[S].z=_0x96cda3[S].z*w,_0xf70ded[S].x=_0x160f55[S].x*E*.5+.5,_0xf70ded[S].y=_0x160f55[S].y*E*.5+.5,_0xf70ded[S].z=_0x160f55[S].z*E}var P=_0x13c530[0].z,A=_0x13c530[1].z,L=this.getSliceAtDepth(b.z),M=this.getSliceAtDepth(T.z),R=1/(A-P),I=[],O=[];I.push(_0x13c530[0]),O.push(_0xf70ded[0]);for(var D=(f=-(1-(1<<(L<<1)))/3)*this._tableSize,B=f*this._width*this._height,N=y.lightType,F=L;F<=M;++F){var U=(Math.min(A,_0x37b81e[F])-P)*R;o$1p.lerp(_0x13c530[0],_0x13c530[1],U,_0x2e2d10),o$1p.lerp(_0xf70ded[0],_0xf70ded[1],U,_0x1f624b),I.push(_0x2e2d10),O.push(_0x1f624b),_0x486655.x=Math.min(I[0].x,I[1].x),_0x486655.y=Math.min(I[0].y,I[1].y),_0x38a894.x=Math.max(O[0].x,O[1].x),_0x38a894.y=Math.max(O[0].y,O[1].y);var z,G,V,k,W=this.projectionSpaceToGridSpace(_0x486655,F);z=W.outX,G=W.outY,V=(W=this.projectionSpaceToGridSpace(_0x38a894,F)).outX,k=W.outY;for(var H=this._resolutionAtSlice[F],q=G;q<=k;++q)for(var j=z;j<=V;++j){var Y=this._lightCountInCell[B+q*H.width+j];if(Y.lightCount[0]<this._lightsPerCell-3){var X=D+(q*H.width+j)*this._lightsPerCell+(Y.lightCount[0]+3);_0x286f70[X]=c*this._forwardPlusNumFloat4PerLight,++Y.lightCount[0],++Y.lightCount[N]}}o$1p.clone(I[1],I[0]),o$1p.clone(O[1],O[0]),D+=H.width*H.height*this._lightsPerCell,B+=H.width*H.height}}var K=this._lightsPerCell,Q=0;for(c=0;c<this._lightCountInCell.length;c++){var Z=this._lightCountInCell[c],J=Z.lightCount[_0x1d9df9.POINT];_0x286f70[Q+0]=J,J+=Z.lightCount[_0x1d9df9.SPOT],_0x286f70[Q+1]=J,Q+=K}d.gridBatchTable.copyFrom({width:this._lightGridBatchTableDimensions.x,height:this._lightGridBatchTableDimensions.y,arrayBufferView:_0x286f70},0,0),this.deleteOldGridBuffers()}}},_0x205de2.prototype.isDestroyed=function(){return!1},_0x205de2.prototype.destroy=function(){return i$10(this)};var _0x4d1430=(_0x164615=!0,function(e,t){var i=_0x164615?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x164615=!1,i}),_0x7b172a=_0x4d1430(void 0,(function(){return _0x7b172a.toString().search("(((.+)+)+)+$").toString().constructor(_0x7b172a).search("(((.+)+)+)+$")})),_0x164615;function _0x4e6a4d(e){this._context=e,this._enabled=!1;var t=e.colorBufferFloat&&e.depthTexture;this._support=e.drawBuffers&&t,this._fbo=void 0,this._positionTexture=void 0,this._normalTexture=void 0,this._reflectivityTexture=void 0,this._depthStencilTexture=void 0,this._mrtClearCommand=new t$X({color:new e$1U(0,0,0,0),owner:this})}function _0x172f18(e){e._positionTexture=e._positionTexture&&!e._positionTexture.isDestroyed()&&e._positionTexture.destroy(),e._normalTexture=e._normalTexture&&!e._normalTexture.isDestroyed()&&e._normalTexture.destroy(),e._reflectivityTexture=e._reflectivityTexture&&!e._reflectivityTexture.isDestroyed()&&e._reflectivityTexture.destroy()}_0x7b172a(),Object.defineProperties(_0x4e6a4d.prototype,{enable:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(e||this._releaseResource()),this._enable=e}},support:{get:function(){return this._support}},positionTexture:{get:function(){return this._positionTexture}},normalTexture:{get:function(){return this._normalTexture}},reflectivityTexture:{get:function(){return this._reflectivityTexture}},framebuffer:{get:function(){return this._fbo}}}),_0x4e6a4d.prototype.update=function(e){this._depthStencilTexture=e.depthStencilTexture;var t=this._depthStencilTexture.width,i=this._depthStencilTexture.height,n=this._positionTexture;(!e$2b(n)||n.width!==t||n.height!==i)&&(this._releaseResource(),this._createResource(t,i))},_0x4e6a4d.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._fbo,this._mrtClearCommand.execute(e,t),t.framebuffer=n},_0x4e6a4d.prototype._createResource=function(e,t){var i=this._context;this._positionTexture=new t$V({context:i,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,width:e,height:t,flipY:!1}),this._normalTexture=new t$V({context:i,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,width:e,height:t,flipY:!1}),this._reflectivityTexture=new t$V({context:i,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,width:e,height:t,flipY:!1}),this._fbo=new t$W({context:i,colorTextures:[this._positionTexture,this._normalTexture,this._reflectivityTexture],depthStencilTexture:this._depthStencilTexture,destroyAttachments:!1})},_0x4e6a4d.prototype.getPrepassShaderProgram=function(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"PREPASS");if(!e$2b(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();o.defines=e$2b(o.defines)?o.defines.slice(0):[],o.defines.push("PREPASS"),i=e.shaderCache.createDerivedShaderProgram(t,"PREPASS",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i},_0x4e6a4d.prototype._releaseResource=function(){this._fbo=this._fbo&&!this._fbo.isDestroyed()&&this._fbo.destroy(),_0x172f18(this)},_0x4e6a4d.prototype.destroy=function(){this._releaseResource()};var j$i="uniform sampler2D colorTexture;\nuniform sampler2D colorTexture2;\n\nuniform vec2 center;\nuniform float radius;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color0 = texture2D(colorTexture, v_textureCoordinates);\n vec4 color1 = texture2D(colorTexture2, v_textureCoordinates);\n\n float x = length(gl_FragCoord.xy - center) / radius;\n float t = smoothstep(0.5, 0.8, x);\n gl_FragColor = mix(color0 + color1, color1, t);\n}\n",E$k='uniform sampler2D colorTexture;\n\nuniform float avgLuminance;\nuniform float threshold;\nuniform float offset;\n\nvarying vec2 v_textureCoordinates;\n\nfloat key(float avg)\n{\n float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));\n return max(0.0, guess) + 0.1;\n}\n\n// See section 9. "The bright-pass filter" of Realtime HDR Rendering\n// http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf\n\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n vec3 xyz = czm_RGBToXYZ(color.rgb);\n float luminance = xyz.r;\n\n float scaledLum = key(avgLuminance) * luminance / avgLuminance;\n float brightLum = max(scaledLum - threshold, 0.0);\n float brightness = brightLum / (offset + brightLum);\n\n xyz.r = brightness;\n gl_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);\n}\n',ie$6="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n gl_FragColor = texture2D(colorTexture, v_textureCoordinates);\n}\n",e$i={NEAREST:0,LINEAR:1};function p$h(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).fragmentShader,i=u$_(e.textureScale,1),n=u$_(e.pixelFormat,V$10.RGBA),r=e.prepassRenderer;if(o$1q.typeOf.string("options.fragmentShader",t),o$1q.typeOf.number.greaterThan("options.textureScale",i,0),o$1q.typeOf.number.lessThanOrEquals("options.textureScale",i,1),!V$10.isColorFormat(n))throw new t$16("options.pixelFormat must be a color format.");this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=i,this._forcePowerOfTwo=u$_(e.forcePowerOfTwo,!1),this._sampleMode=u$_(e.sampleMode,e$i.NEAREST),this._blendingState=e.blendingState,this._pixelFormat=n,this._pixelDatatype=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE),this._clearColor=u$_(e.clearColor,e$1U.BLACK),this._useWGSL=u$_(e.useWGSL,!1),this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._prepassRenderer=r,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0;var o=new n$Z;o.scissorTest={enabled:!0,rectangle:e$2b(e.scissorRectangle)?f$18.clone(e.scissorRectangle):new f$18},this._passState=o,this._ready=!1;var a=e.name;e$2b(a)||(a=e$1Q()),this._name=a,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(p$h.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(e$2b(this._textureCache)){var e=this._textureCache.getFramebuffer(this._name);if(e$2b(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var z$k=/uniform\s+sampler2D\s+depthTexture/g;function H$r(e,t,i){var n=t[i];return("string"==typeof n||n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof HTMLVideoElement||n instanceof ImageData)&&e._dirtyUniforms.push(i),{get:function(){return t[i]},set:function(n){var r=t[i];t[i]=n;var o=e._actualUniforms,a=o[i];e$2b(a)&&a!==r&&a instanceof t$V&&!e$2b(e._textureCache.getStageByName(i))&&(e._texturesToRelease.push(a),delete o[i],delete o[i+"Dimensions"]),r instanceof t$V&&e._texturesToRelease.push(r),"string"==typeof n||n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof HTMLVideoElement||n instanceof ImageData?e._dirtyUniforms.push(i):o[i]=n}}}function V$f(e,t){return function(){var i=e._actualUniforms[t];return"function"==typeof i?i():i}}function W$l(e,t){return function(){var i=e[t]();if(e$2b(i))return i.dimensions}}function k$g(e){if(!e$2b(e._uniformMap)){var t={},i={},n=e._uniforms,r=e._actualUniforms;for(var o in n)if(n.hasOwnProperty(o)){"function"!=typeof n[o]?(t[o]=V$f(e,o),i[o]=H$r(e,n,o)):(t[o]=n[o],i[o]=n[o]),r[o]=n[o];var a=t[o]();("string"==typeof a||a instanceof t$V||a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement)&&(t[o+"Dimensions"]=W$l(t,o))}e._uniforms={},Object.defineProperties(e._uniforms,i),e._uniformMap=p$19(t,{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions},depthTexture:function(){return e._depthTexture},depthTextureDimensions:function(){return e._depthTexture.dimensions},czm_idTexture:function(){return e._idTexture},czm_selectedIdTexture:function(){return e._selectedIdTexture},czm_selectedIdTextureStep:function(){return 1/e._selectedIdTexture.width},reflectivitySampler:function(){return e._prepassRenderer.reflectivityTexture},normalSampler:function(){return e._prepassRenderer.normalTexture},positionSampler:function(){return e._prepassRenderer.positionTexture}})}}function Y$b(e,t){if(!e$2b(e._command)||e._logDepthChanged||e._selectedDirty){var i=e._fragmentShader;if(e$2b(e._selectedIdTexture))i="#define CZM_SELECTED_FEATURE \nuniform sampler2D czm_idTexture; \nuniform sampler2D czm_selectedIdTexture; \nuniform float czm_selectedIdTextureStep; \nvarying vec2 v_textureCoordinates; \nbool czm_selected(vec2 offset) \n{ \n bool selected = false;\n vec4 id = texture2D(czm_idTexture, v_textureCoordinates + offset); \n for (int i = 0; i < "+e._selectedIdTexture.width+"; ++i) \n { \n vec4 selectedId = texture2D(czm_selectedIdTexture, vec2(float(i) * czm_selectedIdTextureStep, 0.5)); \n if (all(equal(id, selectedId))) \n { \n return true; \n } \n } \n return false; \n} \n\nbool czm_selected() \n{ \n return czm_selected(vec2(0.0)); \n} \n\n"+(i=i.replace(/varying\s+vec2\s+v_textureCoordinates;/g,""));var n=new s$U({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[i],useWGSL:e._useWGSL});e._command=t.createViewportQuadCommand(n,{uniformMap:e._uniformMap,owner:e,shaderProgramName:e._name,useWGSL:e._useWGSL})}}function q$g(e){var t,i;e._sampleMode===e$i.LINEAR?(t=tt$h.LINEAR,i=rt$i.LINEAR):(t=tt$h.NEAREST,i=rt$i.NEAREST);var n=e._sampler;(!e$2b(n)||n.minificationFilter!==t||n.magnificationFilter!==i)&&(e._sampler=new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:t,magnificationFilter:i}))}function j$h(e,t){return function(i){e._texturesToCreate.push({name:t,source:i})}}function J$a(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function K$c(e,t){var i,n,r,o=e._texturesToRelease,a=o.length;for(i=0;i<a;++i)n=(n=o[i])&&n.destroy();o.length=0;var s=e._texturesToCreate;for(a=s.length,i=0;i<a;++i){var l=s[i];r=l.name;var u=l.source;e._actualUniforms[r]=new t$V({context:t,source:u})}s.length=0;var c=e._dirtyUniforms;if(0!==c.length||e$2b(e._texturePromise)){if(0!==c.length&&!e$2b(e._texturePromise)){a=c.length;var h=e._uniforms,d=[];for(i=0;i<a;++i){var f=h[r=c[i]];if(e$2b(e._textureCache.getStageByName(f)))e._actualUniforms[r]=J$a(e,f);else if("string"==typeof f){var p=new t$11({url:f});d.push(p.fetchImage().then(j$h(e,r)))}else e._texturesToCreate.push({name:r,source:f})}c.length=0,d.length>0?(e._ready=!1,e._texturePromise=o$1l.all(d).then((function(){e._ready=!0,e._texturePromise=void 0}))):e._ready=!0}}else e._ready=!0}function I$m(e){e$2b(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();var t=e._textureCache;if(e$2b(t)){var i=e._uniforms,n=e._actualUniforms;for(var r in n)n.hasOwnProperty(r)&&n[r]instanceof t$V&&(e$2b(t.getStageByName(i[r]))||n[r].destroy(),e._dirtyUniforms.push(r))}}function Q$e(e){var t=e$2b(e._selected)?e._selected.length:0,i=e$2b(e._parentSelected)?e._parentSelected:0,n=e._selected!==e._selectedShadow||t!==e._selectedLength;if(n=n||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength,e$2b(e._selected)&&e$2b(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):e$2b(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!n&&e$2b(e._combinedSelected)){if(!e$2b(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var r=0;r<t;++r)if(e._combinedSelected[r]!==e._combinedSelectedShadow[r])return!0}return n}function Z$h(e,t){if(e._selectedDirty){e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;var i=e._combinedSelected;if(e$2b(i)){var n,r,o=0,a=i.length;for(n=0;n<a;++n)e$2b((r=i[n]).pickIds)?o+=r.pickIds.length:e$2b(r.pickId)&&++o;if(0===a||0===o){var s=new Uint8Array(4);return s[0]=255,s[1]=255,s[2]=255,s[3]=255,void(e._selectedIdTexture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,source:{arrayBufferView:s,width:1,height:1},sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}))}var l,u=0,c=new Uint8Array(4*o);for(n=0;n<a;++n)if(e$2b((r=i[n]).pickIds))for(var h=r.pickIds,d=h.length,f=0;f<d;++f)l=h[f].color,c[u]=e$1U.floatToByte(l.red),c[u+1]=e$1U.floatToByte(l.green),c[u+2]=e$1U.floatToByte(l.blue),c[u+3]=e$1U.floatToByte(l.alpha),u+=4;else e$2b(r.pickId)&&(l=r.pickId.color,c[u]=e$1U.floatToByte(l.red),c[u+1]=e$1U.floatToByte(l.green),c[u+2]=e$1U.floatToByte(l.blue),c[u+3]=e$1U.floatToByte(l.alpha),u+=4);e._selectedIdTexture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,source:{arrayBufferView:c,width:o,height:1},sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})}}}function s$f(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.stages",e.stages),o$1q.typeOf.number.greaterThan("options.stages.length",e.stages.length,0),this._stages=e.stages,this._inputPreviousStageTexture=u$_(e.inputPreviousStageTexture,!0);var t=e.name;e$2b(t)||(t=e$1Q()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}function u$j(e){var t=e$2b(e._selected)?e._selected.length:0,i=e$2b(e._parentSelected)?e._parentSelected:0,n=e._selected!==e._selectedShadow||t!==e._selectedLength;if(n=n||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength,e$2b(e._selected)&&e$2b(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):e$2b(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!n&&e$2b(e._combinedSelected)){if(!e$2b(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var r=0;r<t;++r)if(e._combinedSelected[r]!==e._combinedSelectedShadow[r])return!0}return n}function g$q(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function m$k(e){for(;e$2b(e.length);)e=e.get(e.length-1);return e.name}function w$j(e,t,i,n,r){if(!n.enabled||!n._isSupported(t))return r;var o=i[n.name]={};e$2b(r)&&(o[m$k(e.getStageByName(r))]=!0);var a=n.uniforms;if(e$2b(a))for(var s=Object.getOwnPropertyNames(a),l=s.length,u=0;u<l;++u){var c=a[s[u]];if("string"==typeof c){var h=e.getStageByName(c);e$2b(h)&&(o[m$k(h)]=!0)}}return n.name}function v$k(e,t,i,n,r){if(e$2b(n.enabled)&&!n.enabled||e$2b(n._isSupported)&&!n._isSupported(t))return r;for(var o=r,a=!e$2b(n.inputPreviousStageTexture)||n.inputPreviousStageTexture,s=r,l=n.length,u=0;u<l;++u){var c=n.get(u);s=e$2b(c.length)?v$k(e,t,i,c,r):w$j(e,t,i,c,r),a&&(r=s)}var h,d;if(a)for(h=1;h<l;++h)e$2b(i[d=m$k(n.get(h))])||(i[d]={}),i[d][o]=!0;else for(h=1;h<l;++h)for(var f=i[d=m$k(n.get(h))],p=0;p<h;++p)f[m$k(n.get(p))]=!0;return s}function B$g(e,t){var i={};if(e$2b(e.ambientOcclusion)){var n=e._outline,r=e.ambientOcclusion,o=e.bloom,a=e._tonemapping,s=e.fxaa,l=e.fog,u=e.rain,c=e.snow,h=e.screenSpaceReflection,d=v$k(e,t,i,n,void 0);d=w$j(e,t,i,l,d),d=w$j(e,t,i,c,d),d=v$k(e,t,i,r,d=w$j(e,t,i,u,d)),d=v$k(e,t,i,o,d),d=v$k(e,t,i,e,d=w$j(e,t,i,a,d)),w$j(e,t,i,s,d=v$k(e,t,i,h,d))}else v$k(e,t,i,e,void 0);return i}function E$j(e,t,i){var n,r,o=e._collection.getStageByName(t),a=o._textureScale,s=o._forcePowerOfTwo,l=o._pixelFormat,u=o._pixelDatatype,c=o._clearColor,h=e._framebuffers,d=h.length;for(n=0;n<d;++n)if(a===(r=h[n]).textureScale&&s===r.forcePowerOfTwo&&l===r.pixelFormat&&u===r.pixelDatatype&&e$1U.equals(c,r.clearColor)){for(var f=r.stages,p=f.length,_=!1,m=0;m<p;++m)if(i[f[m]]){_=!0;break}if(!_)break}return e$2b(r)&&n<d?(r.stages.push(t),r):(r={textureScale:a,forcePowerOfTwo:s,pixelFormat:l,pixelDatatype:u,clearColor:c,stages:[t],buffer:void 0,clear:void 0},h.push(r),r)}function M$l(e,t){var i=B$g(e._collection,t);for(var n in i)i.hasOwnProperty(n)&&(e._stageNameToFramebuffer[n]=E$j(e,n,i[n]))}function y$l(e){for(var t=e._framebuffers,i=t.length,n=0;n<i;++n){var r=t[n];r.buffer=r.buffer&&r.buffer.destroy(),r.buffer=void 0}}function R$j(e,t){for(var i=e._width,n=e._height,r=e._framebuffers,o=r.length,a=0;a<o;++a){var s=r[a],l=s.textureScale,u=Math.ceil(i*l),c=Math.ceil(n*l),h=Math.min(u,c);s.forcePowerOfTwo&&(e$2a.isPowerOfTwo(h)||(h=e$2a.nextPowerOfTwo(h)),u=h,c=h),s.buffer=new t$W({context:t,colorTextures:[new t$V({context:t,width:u,height:c,pixelFormat:s.pixelFormat,pixelDatatype:s.pixelDatatype})]}),s.clear=new t$X({color:s.clearColor,framebuffer:s.buffer})}}function n$i(){this._colorTexture=void 0,this._idTexture=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._framebuffer=void 0,this._idFramebuffer=void 0,this._idClearColor=new e$1U(0,0,0,0),this._useHdr=void 0,this._clearCommand=new t$X({color:new e$1U(0,0,0,0),depth:1,owner:this})}function S$h(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._idFramebuffer=e._idFramebuffer&&e._idFramebuffer.destroy(),e._colorTexture=e._colorTexture&&e._colorTexture.destroy(),e._idTexture=e._idTexture&&e._idTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&e._depthStencilRenderbuffer.destroy(),e._depthStencilIdTexture=e._depthStencilIdTexture&&e._depthStencilIdTexture.destroy(),e._depthStencilIdRenderbuffer=e._depthStencilIdRenderbuffer&&e._depthStencilIdRenderbuffer.destroy(),e._framebuffer=void 0,e._idFramebuffer=void 0,e._colorTexture=void 0,e._idTexture=void 0,e._depthStencilTexture=void 0,e._depthStencilRenderbuffer=void 0,e._depthStencilIdTexture=void 0,e._depthStencilIdRenderbuffer=void 0}function s$e(){this._sceneFramebuffer=new n$i,this._stMatrix3=p$1e.clone(p$1e.IDENTITY),this._isMultiViewport=!1;var e=.125,t=new Array(6);t[0]=new p$h({name:"SunPostProcessStage0",fragmentShader:ie$6,textureScale:e,forcePowerOfTwo:!0,sampleMode:e$i.LINEAR});var i=t[1]=new p$h({name:"SunPostProcessStage1",fragmentShader:E$k,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),n=this;this._delta=1,this._sigma=2,this._blurStep=new o$1o,t[2]=new p$h({name:"SunPostProcessStage2",fragmentShader:y$M,uniforms:{step:function(){return n._blurStep.x=n._blurStep.y=1/i.outputTexture.width,n._blurStep},delta:function(){return n._delta},sigma:function(){return n._sigma},direction:0},textureScale:e,forcePowerOfTwo:!0}),t[3]=new p$h({name:"SunPostProcessStage3",fragmentShader:y$M,uniforms:{step:function(){return n._blurStep.x=n._blurStep.y=1/i.outputTexture.width,n._blurStep},delta:function(){return n._delta},sigma:function(){return n._sigma},direction:1},textureScale:e,forcePowerOfTwo:!0}),t[4]=new p$h({name:"SunPostProcessStage4",fragmentShader:ie$6,sampleMode:e$i.LINEAR}),this._uCenter=new o$1o,this._uRadius=void 0,t[5]=new p$h({name:"SunPostProcessStage5",fragmentShader:j$i,uniforms:{center:function(){return n._uCenter},radius:function(){return n._uRadius},colorTexture2:function(){return n._sceneFramebuffer.getFramebuffer().getColorTexture(0)}}}),this._stages=new s$f({stages:t});for(var r=new g$q(this),o=t.length,a=0;a<o;++a)t[a]._textureCache=r;this._textureCache=r,this.length=t.length}p$h.prototype._isSupported=function(e){return!z$k.test(this._fragmentShader)||e.depthTexture},p$h.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&I$m(this),this._enabled=this.enabled,this._enabled&&(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=Q$e(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=e$2b(this._selected)?this._selected.length:0,this._parentSelectedLength=e$2b(this._parentSelected)?this._parentSelected.length:0,Z$h(this,e),k$g(this),K$c(this,e),Y$b(this,e),q$g(this),this._selectedDirty=!1,this._ready)){var i=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=i,e$2b(i)){var n,r=i.getColorTexture(0);(r.width!==e.drawingBufferWidth||r.height!==e.drawingBufferHeight||e$2b(this._blendingState))&&((!e$2b(n=this._renderState)||r.width!==n.viewport.width||r.height!==n.viewport.height)&&(this._renderState=d$1m.fromCache({viewport:new f$18(0,0,r.width,r.height),blending:this._blendingState}))),this._command.renderState=n}}},p$h.prototype.execute=function(e,t,i,n){if(e$2b(this._command)&&e$2b(this._command.framebuffer)&&this._ready&&this._enabled){this._colorTexture=t,this._depthTexture=i,this._idTexture=n,e$1P.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.ignoreWEBGL2=!0,this._colorTexture.sampler=this._sampler);var r=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;e$2b(r)&&(r.context=e),this._command.execute(e,r)}},p$h.prototype.isDestroyed=function(){return!1},p$h.prototype.destroy=function(){return I$m(this),i$10(this)},Object.defineProperties(s$f.prototype,{ready:{get:function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)if(!e[i].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){for(var t=this._stages,i=t.length,n=0;n<i;++n)t[n].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}}),s$f.prototype._isSupported=function(e){for(var t=this._stages,i=t.length,n=0;n<i;++n)if(!t[n]._isSupported(e))return!1;return!0},s$f.prototype.get=function(e){return o$1q.typeOf.number.greaterThanOrEquals("index",e,0),o$1q.typeOf.number.lessThan("index",e,this.length),this._stages[e]},s$f.prototype.update=function(e,t){this._selectedDirty=u$j(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=e$2b(this._selected)?this._selected.length:0,this._parentSelectedLength=e$2b(this._parentSelected)?this._parentSelected.length:0;for(var i=this._stages,n=i.length,r=0;r<n;++r){var o=i[r];this._selectedDirty&&(o.parentSelected=this._combinedSelected),o.update(e,t)}},s$f.prototype.isDestroyed=function(){return!1},s$f.prototype.destroy=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)e[i].destroy();return i$10(this)},g$q.prototype.updateDependencies=function(){this._updateDependencies=!0},g$q.prototype.update=function(e){var t=this._collection,i=this._updateDependencies,n=e$2b(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),r=e$2b(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),o=e$2b(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),a=e$2b(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),s=e$2b(t.screenSpaceReflection)&&t.screenSpaceReflection.enabled,l=e$2b(t.outline)&&t.outline.enabled,u=e$2b(t.snow)&&t.snow.enabled,c=!e$2b(t._activeStages)||t._activeStages.length>0||n||r||o||a||s||l||u;if((i||!c&&this._framebuffers.length>0)&&(y$l(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),i||c){0===this._framebuffers.length&&M$l(this,e);var h=e.drawingBufferWidth,d=e.drawingBufferHeight,f=this._width!==h||this._height!==d;!i&&!f||(this._width=h,this._height=d,this._updateDependencies=!1,y$l(this),R$j(this,e))}},g$q.prototype.clear=function(e){for(var t=this._framebuffers,i=t.length,n=0;n<i;++n)t[n].clear.execute(e)},g$q.prototype.getStageByName=function(e){return this._collection.getStageByName(e)},g$q.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)},g$q.prototype.getFramebuffer=function(e){var t=this._stageNameToFramebuffer[e];if(e$2b(t))return t.buffer},g$q.prototype.isDestroyed=function(){return!1},g$q.prototype.destroy=function(){return y$l(this),i$10(this)},n$i.prototype.update=function(e,t,i){var n=t.width,r=t.height,o=this._colorTexture;if(!e$2b(o)||o.width!==n||o.height!==r||i!==this._useHdr){S$h(this),this._useHdr=i;var a=i?e.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT:_$$.UNSIGNED_BYTE;this._colorTexture=new t$V({context:e,width:n,height:r,pixelFormat:V$10.RGBA,pixelDatatype:a,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),this._idTexture=new t$V({context:e,width:n,height:r,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),e.depthTexture?(this._depthStencilTexture=new t$V({context:e,width:n,height:r,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),this._depthStencilIdTexture=new t$V({context:e,width:n,height:r,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})):(this._depthStencilRenderbuffer=new r$$({context:e,width:n,height:r,format:M$13.DEPTH_STENCIL}),this._depthStencilIdRenderbuffer=new r$$({context:e,width:n,height:r,format:M$13.DEPTH_STENCIL})),this._framebuffer=new t$W({context:e,colorTextures:[this._colorTexture],depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}),this._idFramebuffer=new t$W({context:e,colorTextures:[this._idTexture],depthStencilTexture:this._depthStencilIdTexture,depthStencilRenderbuffer:this._depthStencilIdRenderbuffer,destroyAttachments:!1})}},n$i.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._framebuffer,e$1U.clone(i,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=this._idFramebuffer,e$1U.clone(this._idClearColor,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=n},n$i.prototype.getFramebuffer=function(){return this._framebuffer},n$i.prototype.getIdFramebuffer=function(){return this._idFramebuffer},n$i.prototype.isDestroyed=function(){return!1},n$i.prototype.destroy=function(){return S$h(this),i$10(this)},s$e.prototype.get=function(e){return this._stages.get(e)},s$e.prototype.getStageByName=function(e){for(var t=this._stages.length,i=0;i<t;++i){var n=this._stages.get(i);if(n.name===e)return n}};var z$j=new e$29,F$h=new o$1o,H$q=new o$1o,B$f=new p$1d;function Y$a(e,t,i){var n=t.uniformState,r=n.sunPositionWC,o=n.view,a=n.viewProjection,s=n.projection,l=p$1d.computeViewportTransformation(i,0,1,B$f),u=p$1d.multiplyByPoint(o,r,z$j),c=m$17.pointToGLWindowCoordinates(a,l,r,F$h);u.x+=e$2a.SOLAR_RADIUS;var h=m$17.pointToGLWindowCoordinates(s,l,u,u),d=30*o$1o.magnitude(o$1o.subtract(h,c,h))*2,f=H$q;f.x=d,f.y=d,e._uCenter=o$1o.clone(c,e._uCenter),e._uRadius=.15*Math.max(f.x,f.y);var p=t.drawingBufferWidth,_=t.drawingBufferHeight,m=e._stages.get(0),g=m.outputTexture.width,x=m.outputTexture.height,v=new f$18;v.width=g,v.height=x,l=p$1d.computeViewportTransformation(v,0,1,B$f),c=m$17.pointToGLWindowCoordinates(a,l,r,F$h),f.x*=g/p,f.y*=x/_}s$e.prototype.clear=function(e,t,i){this._sceneFramebuffer.clear(e,t,i),this._textureCache.clear(e)},s$e.prototype.update=function(e){var t=e.context,i=e.viewport,n=this._sceneFramebuffer;n.update(t,i);var r=n.getFramebuffer();return this._textureCache.update(t),this._stages.update(t,!1),Y$a(this,t,i),r},s$e.prototype.execute=function(e){var t=this._sceneFramebuffer.getFramebuffer().getColorTexture(0),i=this._stages,n=i.length;i.get(0).execute(e,t);for(var r=1;r<n;++r)i.get(r).execute(e,i.get(r-1).outputTexture)};const Q$d=new p$1e(1,0,-.5,0,1,-.5,0,0,1);s$e.prototype.copy=function(e,t,i){if(e$2b(i)&&e$2b(i.viewport)){this._isMultiViewport=!0;var n=i.viewport,r=e.drawingBufferWidth,o=e.drawingBufferHeight,a=[n.width/r,0,(n.x+.5*n.width)/r,0,n.height/o,(n.y+.5*n.height)/o,0,0,1];p$1e.fromRowMajorArray(a,this._stMatrix3),p$1e.multiply(this._stMatrix3,Q$d,this._stMatrix3)}if(!e$2b(this._copyColorCommand)){var s=this;const t="\n uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n uniform mat3 stMatrix3;\n void main(){\n vec3 st = stMatrix3 * vec3(v_textureCoordinates, 1.0);\n gl_FragColor = texture2D(colorTexture, st.xy);\n }\n ";this._copyColorCommand=e.createViewportQuadCommand(t,{uniformMap:{colorTexture:function(){return s._stages.get(s._stages.length-1).outputTexture},stMatrix3:function(){return s._isMultiViewport?s._stMatrix3:p$1e.IDENTITY}},owner:this,shaderProgramName:"CustomPassThrough"})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e,i),this._isMultiViewport=!1},s$e.prototype.isDestroyed=function(){return!1},s$e.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),i$10(this)};var I$l={NONE:0,HORIZONTAL:1,VERTICAL:2,QUAD:3,TRIPLE:4,VerticalTrisection:5,FIVE_DIVISIONS:6,SIX_DIVISIONS:7,SEVEN_DIVISIONS:8,EIGHT_DIVISIONS:9,NINE_DIVISIONS:10},B$e=Object.freeze(I$l),_0x5addc2=(_0x4d8b9d=!0,function(e,t){var i=_0x4d8b9d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d8b9d=!1,i}),_0xac112f=_0x5addc2(void 0,(function(){return _0xac112f.toString().search("(((.+)+)+)+$").toString().constructor(_0xac112f).search("(((.+)+)+)+$")})),_0x4d8b9d;_0xac112f();var _0x4f516a={BeforeExecuteCommands:0,BeforeExecuteCommandsForOnePass:1,PostExecuteCommandsForOnePass:2},k$f=Object.freeze(_0x4f516a),_0x2cbb8c=(_0x5e6745=!0,function(e,t){var i=_0x5e6745?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e6745=!1,i}),_0x3fa33e=_0x2cbb8c(void 0,(function(){return _0x3fa33e.toString().search("(((.+)+)+)+$").toString().constructor(_0x3fa33e).search("(((.+)+)+)+$")})),_0x5e6745;function _0x485985(e){this._scene=e,this._prepassRenderer=new _0x4e6a4d(e.context),this._clearColorCommand=new t$X({color:new e$1U,stencil:0,owner:this}),this._depthClearCommand=new t$X({depth:1,owner:this}),this._stencilClearCommand=new t$X({stencil:0}),this._classificationStencilClearCommand=new t$X({stencil:0,renderState:d$1m.fromCache({stencilMask:u$N.CLASSIFICATION_MASK})}),this._beforeExecuteCommandsEvent=new o$1h,this._beforeExecuteCommandsForOnePass=new o$1h,this._postExecuteCommandsForOnePass=new o$1h}_0x3fa33e(),Object.defineProperties(_0x485985.prototype,{}),_0x485985.prototype.executeCommands=function(e){var t=this._scene,i=t.camera,n=t.context;n.uniformState.updateCamera(i,n),this._beforeExecuteCommandsEvent.raiseEvent(this);var r=_0xa2141a(i);this.executeCommandsForEnvironment(e,r);var o=t._environmentState,a=t._frameState.passes;o.usePrepass&&!a.pick&&!a.depth&&!a.fbo&&(a.prepass=!0,this.executeCommandsForeground(e,r),a.prepass=!1),this.executeCommandsForeground(e,r)},_0x485985.prototype.executeCommandsForeground=function(e,t){var i=this._scene,n=i._frameState.passes,r=i._environmentState,o=i._view,a=i._environmentVisible,s=i.camera,l=i.context,u=l.uniformState,c=r.clearGlobeDepth,h=this._depthClearCommand,d=this._clearColorCommand,f=this._stencilClearCommand,p=s.position.z,_=o.frustumCommandsList,m=_.length;0===m&&e$2b(o.globeDepth)&&r.useGlobeDepthFramebuffer&&o.globeDepth.executeCopyDepth(l,e);for(var g=0;g<m;++g){var x=m-g-1,v=_[x];i.mode===C$13.SCENE2D?(s.position.z=p-v.near+1,t.far=Math.max(1,v.far-v.near),t.near=1,u.update(i.frameState),u.updateFrustum(t)):((!n.fbo||!l.depthTexture)&&(t.near=0!==x?v.near*i.opaqueFrustumNearOffset:v.near,t.far=v.far),i.logarithmicDepthBuffer&&s._positionCartographic.height>1e5&&t.near<10&&(t.near*=1e4),u.updateFrustum(t));var y=i.debugShowGlobeDepth?_0x33387c(i,x):o.globeDepth;if(i.debugShowGlobeDepth&&e$2b(y)&&r.useGlobeDepthFramebuffer&&(y.update(l,e,o.viewport,i._msaaSamples,i._hdr),y.clear(l,e,this._clearColorCommand.color),e.framebuffer=y.framebuffer),h.execute(l,e),n.depth&&!l.depthTexture&&d.execute(l,e),l.stencilBuffer&&f.execute(l,e),this.executeCommandsForGlobe(e,y,v),this.executeCommandsFor3DTiles(e,y,v),a.isObjectVisible){for(var $=Le$s.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW+1,b=Le$s.Particle,T=$;T<=b;++T)!this.isPassVisible(T,t)||(length=v.indices[T],this.isUpdateGlobeDepthBeforPassRender(T,length)&&e$2b(y)&&r.useGlobeDepthFramebuffer&&y.executeUpdateDepth(l,e,c),this.executeCommandsForPass(e,v,T),this.isUpdateGlobeDepthPostPassRender(T,length)&&e$2b(y)&&r.useGlobeDepthFramebuffer&&y.executeUpdateDepth(l,e,c));this.executeCommandsForTransparent(t,x,e,y,v),this.executeCommandsForPass(e,v,Le$s.ANALYSIS)}_0x56b7ff(i,e,x)}},_0x485985.prototype.isPassVisible=function(e,t){var i=this._scene,n=i._environmentVisible,r=i._frameState.passes,o=r.pick,a=r.depth,s=r.normal;switch(e){case Le$s.ProjectionImage:return!o&&!a;case Le$s.TRANSLUCENT:return o&&s||!n.isOnlyS3MObjectVisible||"sqResultTexture"===frameState._fboState.name;case Le$s.ClampObject:return!t.reflect;case Le$s.Label_Billboard:return n.isBillboardVisible&&!(o&&a);default:return!n.isOnlyS3MObjectVisible||!(e<Le$s.S3MTiles&&e>Le$s.S3MTilesClampObjectColor)}},_0x485985.prototype.isUpdateGlobeDepthBeforPassRender=function(e,t){switch(e){case Le$s.ProjectionImage:case Le$s.S3MTilesClampObjectColor:return t>0;default:return!1}},_0x485985.prototype.isUpdateGlobeDepthPostPassRender=function(e,t){switch(e){case Le$s.OPAQUE:return!0;case Le$s.NonClampObject:return t>0;default:return!1}},_0x485985.prototype.executeCommandsForGlobe=function(e,t,i){var n=this._scene,r=n.context;const o=r.uniformState;if(!n._environmentVisible.isGlobalVisible)return;var a=n._environmentState,s=a.clearGlobeDepth,l=a.useDepthPlane,u=this._depthClearCommand,c=n._depthPlane;const h=n._globeTranslucencyState,d=h.translucent,f=n._view.globeTranslucencyFramebuffer;if(d?h.executeGlobeCommands(i,_0x1a01b5,f,n,e):this.executeCommandsForPass(e,i,Le$s.GLOBE),e$2b(t)&&a.useGlobeDepthFramebuffer&&t.executeCopyDepth(r,e),!a.renderTranslucentDepthForPick){o.updatePass(Le$s.TERRAIN_CLASSIFICATION);var p=i.commands[Le$s.TERRAIN_CLASSIFICATION],_=i.indices[Le$s.TERRAIN_CLASSIFICATION];if(d)h.executeGlobeClassificationCommands(i,_0x1a01b5,f,n,e);else for(let t=0;t<_;++t)_0x1a01b5(p[t],n,r,e)}s&&(u.execute(r,e),l&&c.execute(r,e))},_0x485985.prototype.executeCommandsFor3DTiles=function(e,t,i){var n=this._scene,r=n.context,o=n._frameState.passes.pick,a=n._environmentState,s=(r=n.context,a.clearGlobeDepth),l=this._stencilClearCommand,u=0;if(!a.useInvertClassification||o)this.executeCommandsForPass(e,i,Le$s.CESIUM_3D_TILE),(u=i.indices[Le$s.CESIUM_3D_TILE])>0&&(e$2b(t)&&a.useGlobeDepthFramebuffer&&(t.prepareColorTextures(r,s),t.executeUpdateDepth(r,e,s)),this.executeCommandsForPass(e,i,Le$s.CESIUM_3D_TILE_CLASSIFICATION));else{n._invertClassification.clear(r,e);var c=e.framebuffer;e.framebuffer=n._invertClassification._fbo,this.executeCommandsForPass(e,i,Le$s.CESIUM_3D_TILE),e$2b(t)&&a.useGlobeDepthFramebuffer&&t.executeUpdateDepth(r,e,s),this.executeCommandsForPass(e,i,Le$s.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),e.framebuffer=c,n._invertClassification.executeClassified(r,e),1===n.frameState.invertClassificationColor.alpha&&n._invertClassification.executeUnclassified(r,e),u>0&&r.stencilBuffer&&clearClassificationStencil.execute(r,e),this.executeCommandsForPass(e,i,Le$s.CESIUM_3D_TILE_CLASSIFICATION)}u>0&&r.stencilBuffer&&l.execute(r,e)},_0x485985.prototype.executeCommandsForTransparent=function(e,t,i,n,r){var o,a=this._scene,s=a.context.uniformState,l=a._frameState,u=a._environmentVisible,c=a._environmentState,h=(a.context,a._frameState.passes),d=h.pick,f=_0x56123a(a);if(0!==t&&a.mode!==C$13.SCENE2D&&(e.near=r.near,s.updateFrustum(e)),!d&&c.useInvertClassification&&a.frameState.invertClassificationColor.alpha<1&&(o=a._invertClassification),h.pick&&h.normal||!u.isOnlyS3MObjectVisible||"sqResultTexture"===l._fboState.name){s.updatePass(Le$s.TRANSLUCENT);var p=r.commands[Le$s.TRANSLUCENT];p.length=r.indices[Le$s.TRANSLUCENT],"sqResultTexture"===l._fboState.name&&(p=p.filter((function(e){return"sqResultTexture"===e.owner}))),this._beforeExecuteCommandsForOnePass.raiseEvent(Le$s.TRANSLUCENT,this),f(a,_0x1a01b5,i,p,o),this._postExecuteCommandsForOnePass.raiseEvent(Le$s.TRANSLUCENT,this)}},_0x485985.prototype.executeCommandsForPass=function(e,t,i){this._beforeExecuteCommandsForOnePass.raiseEvent(i,this);var n=this._scene,r=n.context;r.uniformState.updatePass(i);for(var o=t.commands[i],a=t.indices[i],s=0;s<a;++s)_0x1a01b5(o[s],n,r,e);this._postExecuteCommandsForOnePass.raiseEvent(i,this)},_0x485985.prototype.updateAndExecuteCommands=function(e,t){var i=this._scene,n=i._context,r=n.uniformState,o=e.viewport;o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight;var a=i._frameState,s=a.camera,l=a.mode,u=(h=a.passes).pick;if(i._useWebVR&&l!==C$13.SCENE2D)_0x4843a3(i,e,t,this);else if(a._fboState.enabled||i._multiViewportMode===B$e.NONE)this.updateAndClearFramebuffers(e,t),l!==C$13.SCENE2D||i._mapMode2D===Rr$2.ROTATE?this.executeCommandsInViewport(!0,e):this.execute2DViewportCommands(e);else{this.updateAndClearFramebuffers(e,t);for(var c=0;c<i._multiViewportInfo.length;c++)if(!u||i._frameState.multiViewportIndex===c){u=(h=i._frameState.passes).pick;var h,d=h.fbo,f=i._environmentState.useWebVR;i._environmentState.isSunVisible&&i.sunBloom&&!f&&!d&&(e.framebuffer=i._sunPostProcess._sceneFramebuffer.getFramebuffer());var p=i._multiViewportInfo[c];o.x=n.drawingBufferWidth*p.x,o.y=n.drawingBufferHeight*p.y,o.width=n.drawingBufferWidth*p.width,o.height=n.drawingBufferHeight*p.height,s.frustum.aspectRatio=o.width/o.height,u&&(o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight),r.update(a),i._frameState.multiViewportIndex=c,a.cullingVolume=a.camera.frustum.computeCullingVolume(a.camera.positionWC,a.camera.directionWC,a.camera.upWC),this.executeCommandsInViewport(0==c||u,e),n.webgpu&&n.engine.flushFramebuffer()}}},_0x485985.prototype.updateAndExecuteCommandsForPostEffect=function(e,t){var i=this._scene._context,n=e.viewport;n.x=0,n.y=0,n.width=i.drawingBufferWidth,n.height=i.drawingBufferHeight;var r=t,o=this._clearColorCommand;e$1U.clone(r,o.color),o.execute(i,e),this.executeCommandsInViewport(!0,e)},_0x485985.prototype.executeOverlayCommands=function(e){var t=this._scene,i=t.context.uniformState;i.updatePass(Le$s.OVERLAY);var n=t.context,r=t._frameState,o=t._view.viewport;if(o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight,e.viewport=f$18.clone(o,e.viewport),t._multiViewportMode===B$e.NONE)_0x104cb8(this,t,e);else{for(var a=0;a<t._multiViewportInfo.length;a++)if(!r.passes.pick||t._frameState.multiViewportIndex===a){r.multiViewportIndex=a;var s=t._multiViewportInfo[a];o.x=n.drawingBufferWidth*s.x,o.y=n.drawingBufferHeight*s.y,o.width=n.drawingBufferWidth*s.width,o.height=n.drawingBufferHeight*s.height,r.camera.frustum.aspectRatio=o.width/o.height,r.passes.pick&&(o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight),e.viewport=f$18.clone(o),i.update(r),_0x104cb8(this,t,e)}o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight,e.viewport=f$18.clone(o)}};var _0x425b5f=new f$18;function _0x104cb8(e,t,i){var n=t.context,r=t._frameState.passes,o=t._view.globeDepth,a=t._environmentState,s=a.renderTranslucentDepthForPick,l=t._logDepthOverlayCommandList,u=l.length;if(u>0)for(var c=0;c<u;++c){var h=l[c];(r=t._frameState.passes).pick||r.depth?_0x1a01b5(l[c],t,n,i):(h=h.derivedCommands.logDepth.command).execute(n,i)}u=(l=t._overlayCommandList).length;for(c=0;c<u;++c){h=l[c];(r=t._frameState.passes).pick||r.depth?_0x1a01b5(l[c],t,n,i):h.execute(n,i)}if(!r.fbo&&n.depthTexture&&t.useDepthPicking&&(a.useGlobeDepthFramebuffer||s)){var d=s?i.framebuffer.depthStencilTexture:o.depthStencilTexture;e$2b(d)||(d=o.depthStencilTexture);var f=t._picking.getPickDepth(t,0);f.update(n,d),f.executeCopyDepth(n,i)}if((u=(l=t._overlayAgainstDepthCommandList).length)>0){e._depthClearCommand.execute(t._context,i);for(c=0;c<u;++c)if(t.frameState.passes.pick){(h=t._hdr&&t.logarithmicDepthBuffer?l[c].derivedCommands.logDepth.command.derivedCommands.picking.pickCommand:l[c].derivedCommands.picking.pickCommand).execute(t._context,i)}else l[c].execute(n,i)}}_0x485985.prototype.resolveFramebuffers=function(e){var t=this._scene,i=t._context,n=t._frameState,r=t._environmentState,o=t._view;const a=o.globeDepth;e$2b(a)&&a.prepareColorTextures(i);var s=t.voxelGridPostRender,l=t.particlePostRender,u=t.particleTrailsPostRenderer,c=n.passes.pick,h=r.useOIT,d=e$2b(s)&&s.enable,f=r.useGlobeDepthFramebuffer,p=r.usePostProcess;r.usePostEffect,n._fboState.frameBufferType,Qe$c.NORMAL_AND_DEPTH;var _=r.originalFramebuffer,m=f?o.globeDepth.framebufferWithTexture:void 0,g=o.sceneFramebuffer.getFramebuffer(),x=o.sceneFramebuffer.getIdFramebuffer();if(e$2b(u)&&!c&&u.execute(i,e),e$2b(s)){if(e.framebuffer=p?g:_,h){var v=s.getOutputFramebuffer();e$2b(v)&&(e.framebuffer=v,o.oit.setOpaqueTexture(v.getColorTexture(0)))}s.execute(i,e)}if(h&&(e.framebuffer=p?g:_,o.oit.execute(i,e)),e$2b(l)&&l.execute(i,e),p){var y=g;f&&!h&&!d&&(y=m),t.compositor.outputFbo=y;var $=t.postProcessStages,b=y.getColorTexture(0),T=x.getColorTexture(0),C=u$_(m,g).depthStencilTexture;$.execute(i,b,C,T),$.copy(i,_,n.useLogDepth),t.compositor.outputFbo=void 0}!h&&!p&&f&&(e.framebuffer=_,f$18.clone(e.viewport,_0x425b5f),e.viewport.x=0,e.viewport.y=0,e.viewport.width=i.drawingBufferWidth,e.viewport.height=i.drawingBufferHeight,o.globeDepth.executeCopyColor(i,e),f$18.clone(_0x425b5f,e.viewport));var S=n.useLogDepth;t.debugShowGlobeDepth&&f&&_0x33387c(t,t.debugShowDepthFrustum-1).executeDebugGlobeDepth(i,e,S);t.debugShowPickDepth&&f&&t._picking.getPickDepth(t,t.debugShowDepthFrustum-1).executeDebugPickDepth(i,e,S)},_0x485985.prototype.updateShadowMaps=function(){var e=this._scene,t=e._frameState,i=t.shadowMaps,n=i.length,r=n>0&&!t.passes.pick&&e.mode===C$13.SCENE3D;if(r!==t.shadowState.shadowsEnabled&&(++t.shadowState.lastDirtyTime,t.shadowState.shadowsEnabled=r),t.shadowState.lightShadowsEnabled=!1,r){for(var o=0;o<n;++o)if(i[o]!==t.shadowState.shadowMaps[o]){++t.shadowState.lastDirtyTime;break}t.shadowState.shadowMaps.length=0,t.shadowState.lightShadowMaps.length=0;for(var a=0;a<n;++a){var s=i[a];s.update(t),t.shadowState.shadowMaps.push(s),s.fromLightSource&&(t.shadowState.lightShadowMaps.push(s),t.shadowState.lightShadowsEnabled=!0),s.dirty&&(++t.shadowState.lastDirtyTime,s.dirty=!1)}}},_0x485985.prototype.updateAndRenderPrimitives=function(e){var t=this._scene,i=t._frameState,n=t._context,r=i.commandList;t._groundPrimitives.update(i),t._primitives.update(i),_0x180a9c(t),e&&this.updateShadowMaps();var o=t.layers.update(n,i,r,!0);if(i.rasterLayerIds=o,t._globe){for(var a in t._vectorTileSource._hash){(s=t._vectorTileSource.get(a))instanceof I$10&&s.resetVisible()}t._globe.render(i)}for(var a in i.rasterLayerIds=void 0,t.layers.update(n,i,r),t.layers.updateTextVisible(n,i),t._analyst3D.update(n,i,r),t._vectorTileMaps.update(n,i,r),t._plotLayers.update(i,n,r),t._vectorTileSource._hash){var s;(s=t._vectorTileSource.get(a)).update(n,i,r)}},_0x485985.prototype.updateAndClearFramebuffers=function(e,t){var i=this._scene,n=i._context,r=i._frameState,o=i._environmentState,a=i._view,s=i._frameState.passes,l=s.pick,u=s.fbo,c=o.useWebVR;o.originalFramebuffer=e.framebuffer,e$2b(i.sun)&&i.sunBloom!==i._sunBloom?(i.sunBloom&&!c?i._sunPostProcess=new s$e:e$2b(i._sunPostProcess)&&(i._sunPostProcess=i._sunPostProcess.destroy()),i._sunBloom=i.sunBloom):!e$2b(i.sun)&&e$2b(i._sunPostProcess)&&(i._sunPostProcess=i._sunPostProcess.destroy(),i._sunBloom=!1);var h=this._clearColorCommand;e$1U.clone(t,h.color),h.execute(n,e);var d=o.useGlobeDepthFramebuffer=(i._enableCompositor||l)&&e$2b(a.globeDepth);d&&(a.globeDepth.update(n,e,a.viewport,i._msaaSamples,i._hdr||i._pickPointEnabled),a.globeDepth.clear(n,e,t));var f=a.oit,p=o.useOIT=i._enableCompositor&&!u&&!l&&e$2b(f)&&f.isSupported();p&&(f.update(n,e,a.globeDepth.framebufferWithTexture,i._msaaSamples,i._hdr||i._pickPointEnabled),f.clear(n,e,t),o.useOIT=f.isSupported()),e$2b(i.voxelGridPostRender)&&n.depthTexture&&(i.voxelGridPostRender.update(r,a.globeDepth.framebufferWithTexture,i._hdr),i.voxelGridPostRender.clear(n,e)),e$2b(i.particlePostRender)&&(i.particlePostRender.update(r,i._hdr),i.particlePostRender.clear(n,e)),e$2b(i.particleTrailsPostRenderer)&&!l&&_0x3fd0ff(i,e);var _=i.postProcessStages,m=_.screenSpaceReflection;if((o.usePrepass=m.enabled)&&!l){var g=this._prepassRenderer;g.update(a.globeDepth.framebufferWithTexture),g.clear(n,e,t)}var x,v=o.usePostProcess=i._enableCompositor&&!u&&!l&&(i._hdr||_.length>0||_.ambientOcclusion.enabled||_.fxaa.enabled||_.bloom.enabled||_.smaa.enabled);(o.usePostProcessSelected=!1,v)&&(a.sceneFramebuffer.update(n,a.viewport,i._hdr),a.sceneFramebuffer.clear(n,e,t),_.update(n,r.useLogDepth,i._hdr,i),_.clear(n),v=o.usePostProcess=_.ready,o.usePostProcessSelected=v&&_.hasSelected,(o.usePostEffect=e$2b(i.compositor)&&i.compositor.isEnable())&&(i.compositor.update(n,e,i,r),i.compositor.clear(n,t),_.compositor=i.compositor));if(o.isSunVisible&&i.sunBloom&&!c&&!u?(e.framebuffer=i._sunPostProcess.update(e),i._sunPostProcess.clear(n,e,t)):d?r._fboState.frameBufferType!==Qe$c.CLAMP&&(e.framebuffer=a.globeDepth.framebuffer):v&&(e.framebuffer=a.sceneFramebuffer.getFramebuffer()),e$2b(e.framebuffer)&&h.execute(n,e),o.useInvertClassification=!l&&e$2b(e.framebuffer)&&i.invertClassification)if(1===i.frameState.invertClassificationColor.alpha&&o.useGlobeDepthFramebuffer&&(x=a.globeDepth.framebuffer),e$2b(x)||n.depthTexture){if(i._invertClassification.previousFramebuffer=x,i._invertClassification.update(n),i._invertClassification.clear(n,e),i.frameState.invertClassificationColor.alpha<1&&p){var y=i._invertClassification.unclassifiedCommand,$=y.derivedCommands;$.oit=f.createDerivedCommands(y,n,$.oit)}}else o.useInvertClassification=!1;i._globeTranslucencyState.translucent&&a.globeTranslucencyFramebuffer.updateAndClear(i._hdr,a.viewport,n,e)};var _0x1532f9=new a$18(Math.PI,e$2a.PI_OVER_TWO),_0x2cd88c=new o$1p,_0x22cd48=new o$1p,_0x12c9d0=new p$1d,_0x26d0c3=new p$1d,_0x38e62a=new o$1p,_0x20feff=new o$1p,_0xdfcc9d=new f$18;function _0x56b7ff(e,t,i){if(!e._frameState.passes.fbo){var n=e.context,r=e._environmentState,o=e._view.globeDepth;if(n.depthTexture&&e.useDepthPicking&&r.useGlobeDepthFramebuffer){if(s=e$2b(t.framebuffer)&&e$2b(t.framebuffer.depthStencilTexture)?t.framebuffer.depthStencilTexture:o.depthStencilTexture,!e$2b(s))return;(a=e._picking.getPickDepth(e,i)).update(n,s),a.executeCopyDepth(n,t)}else if(e$2b(t.framebuffer)&&e$2b(t.framebuffer.getColorTexture(0))){var a,s=t.framebuffer.getColorTexture(0);(a=e._picking.getPickDepth(e,i)).update(n,s),a.executeCopyDepth(n,t)}}}function _0x1a01b5(e,t,i,n){var r=t._frameState,o=r.passes;if(e.debugShowBoundingVolume&&e$2b(e.boundingVolume)&&_0x41e390.debugShowBoundingVolume(e,t,n,debugFramebuffer),r.useLogDepth&&e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command),!o.pick&&t._hdr&&e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),!o.pick&&t.maskEnabled&&e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.mask)&&(e=e.derivedCommands.mask.command),o.pick&&o.normal){if(!e$2b(e.derivedCommands))return;(e=e.derivedCommands.normal.command).execute(i,n)}else{if(o.prepass){if(!e$2b(e.derivedCommands)||!e$2b(e.derivedCommands.prepass))return;return(e=e.derivedCommands.prepass.command).framebuffer=t._renderPipeline._prepassRenderer.framebuffer,void e.execute(i,n)}if(o.pick||o.depth){if(!e$2b(e.derivedCommands))return;if(o.pick&&!o.depth&&e$2b(e.derivedCommands.picking))return void(e=e.derivedCommands.picking.pickCommand).execute(i,n);if(o.depth&&e$2b(e.derivedCommands.depth)){if(e.pass===Le$s.ANALYSIS||!e.renderState.depthTest.enabled)return;return void(e=e.derivedCommands.depth.depthOnlyCommand).execute(i,n)}}t.debugShowCommands||t.debugShowFrustums?_0x41e390.executeDebugCommand(e,t,n):r.shadowState.lightShadowsEnabled&&e.receiveShadows&&e$2b(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(i,n):e.execute(i,n)}}function _0xd5fd9a(e,t,i,n){var r=t._frameState,o=e.derivedCommands;!e$2b(o)||(r.useLogDepth&&e$2b(o.logDepth)&&(e=o.logDepth.command),e$2b((o=e.derivedCommands).picking)?(e=o.picking.pickCommand).execute(i,n):e$2b(o.depth)&&(e=o.depth.depthOnlyCommand).execute(i,n))}function _0x2e7e4a(e,t,i){return t.boundingVolume.distanceSquaredTo(i)-e.boundingVolume.distanceSquaredTo(i)}function _0x36ac6e(e,t,i){return e.boundingVolume.distanceSquaredTo(i)-t.boundingVolume.distanceSquaredTo(i)+e$2a.EPSILON12}function _0x357cfb(e,t,i,n,r){var o=e.context;m$H(n,_0x2e7e4a,e.camera.positionWC),e$2b(r)&&t(r.unclassifiedCommand,e,o,i);for(var a=n.length,s=0;s<a;++s)t(n[s],e,o,i)}function _0x245171(e,t,i,n,r){var o=e.context;m$H(n,_0x36ac6e,e.camera.positionWC),e$2b(r)&&t(r.unclassifiedCommand,e,o,i);for(var a=n.length,s=e.frameState.passes,l=0;l<a;++l)s.pick&&!e$2b(n[l].pickId)&&!s.depth||t(n[l],e,o,i)}function _0x56123a(e){var t,i=e._frameState.passes,n=e.context,r=e._environmentState,o=e._view;return r.useOIT?(e$2b(e._executeOITFunction)||(e._executeOITFunction=function(e,t,i,r,a){o.globeDepth.prepareColorTextures(n),o.oit.executeCommands(e,t,i,r,a)}),t=e._executeOITFunction):t=i.render?_0x357cfb:_0x245171,t}function _0x4657fb(e,t,i){for(var n=i.shadowMapCullingVolume,r=i.isPointLight,o=i.passes,a=o.length,s=t.length,l=0;l<s;++l){var u=t[l];if(e.updateDerivedCommands(u),u.castShadows&&(u.pass===Le$s.GLOBE||u.pass===Le$s.CESIUM_3D_TILE||u.pass>=Le$s.S3MTiles&&u.pass<=Le$s.TRANSLUCENT)&&e.isVisible(u,n))if(r)for(var c=0;c<a;++c)o[c].commandList.push(u);else if(1===a)o[0].commandList.push(u);else for(var h=!1,d=a-1;d>=0;--d){var f=o[d].cullingVolume;if(e.isVisible(u,f))o[d].commandList.push(u),h=!0;else if(h)break}}}function _0x9c02b6(e){var t=e.frameState,i=t.shadowState.shadowMaps,n=i.length;if(t.shadowState.shadowsEnabled)for(var r=e.context,o=r.uniformState,a=0;a<n;++a){var s=i[a];if(!s.outOfView){var l,u=s.passes,c=u.length;for(l=0;l<c;++l)u[l].commandList.length=0;for(_0x4657fb(e,e.frameState.commandList,s),l=0;l<c;++l){var h=s.passes[l];h.camera._scene=e,o.updateCamera(h.camera,r),s.updatePass(r,l);for(var d=h.commandList.length,f=0;f<d;++f){var p=h.commandList[f];o.updatePass(p.pass),_0x1a01b5(p.derivedCommands.shadows.castCommands[a],e,r,h.passState)}r.webgpu&&r.engine.flushFramebuffer()}}}}function _0x1128c1(e){e.context.uniformState.updatePass(Le$s.COMPUTE);var t=e._environmentState.sunComputeCommand;e$2b(t)&&t.execute(e._computeEngine);for(var i=e._computeCommandList,n=i.length,r=0;r<n;++r)i[r].execute(e._computeEngine)}_0x485985.prototype.execute2DViewportCommands=function(e){var t=this._scene,i=t.context,n=t.frameState,r=t.camera,o=e.viewport,a=f$18.clone(o,_0xdfcc9d);e.viewport=a;var s=_0x1532f9,l=_0x2cd88c;t.mapProjection.project(s,l);var u=o$1p.clone(r.position,_0x22cd48),c=p$1d.clone(r.transform,_0x26d0c3),h=r.frustum.clone();r._setTransform(p$1d.IDENTITY);var d=p$1d.computeViewportTransformation(a,0,1,_0x12c9d0),f=r.frustum.projectionMatrix,p=r.positionWC.y,_=o$1p.fromElements(e$2a.sign(p)*l.x-p,0,-r.positionWC.x,_0x38e62a),m=m$17.pointToGLWindowCoordinates(f,d,_,_0x20feff);m.x=Math.floor(m.x);var g=a.x,x=a.width;if(0===p||m.x<=g||m.x>=g+x)this.executeCommandsInViewport(!0,e);else if(Math.abs(g+.5*x-m.x)<1)a.width=m.x-a.x,r.position.x*=e$2a.sign(r.position.x),r.frustum.right=0,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!0,e),a.x=m.x,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=0,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!1,e);else if(m.x>g+.5*x){a.width=m.x-g;var v=r.frustum.right;r.frustum.right=l.x-p,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!0,e),a.x=m.x,a.width=g+x-m.x,r.position.x=-r.position.x,r.frustum.left=-r.frustum.right,r.frustum.right=v-2*r.frustum.right,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!1,e)}else{a.x=m.x,a.width=g+x-m.x;var y=r.frustum.left;r.frustum.left=-l.x-p,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!0,e),a.x=g,a.width=m.x-g,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=y-2*r.frustum.left,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!1,e)}r._setTransform(c),o$1p.clone(u,r.position),r.frustum=h.clone(),e.viewport=o},_0x485985.prototype.executeCommandsInViewport=function(e,t,i){var n=this._scene,r=n._environmentState,o=n._view,a=r.renderTranslucentDepthForPick;!e&&!a&&(n.frameState.commandList.length=0),(!a||n._frameState.multiViewportIndex>-1)&&this.updateAndRenderPrimitives(e),o.createPotentiallyVisibleSet(n),e&&(e$2b(i)&&this.updateAndClearFramebuffers(t,i),a||(_0x1128c1(n),_0x9c02b6(n))),this.executeCommands(t)},_0x485985.prototype.executeIdCommands=function(e,t,i){var n=this._scene,r=n._view,o=n._environmentState,a=o.clearGlobeDepth,s=o.useDepthPlane,l=this._depthClearCommand,u=n._depthPlane,c=n.context,h=c.uniformState,d=e.framebuffer;e.framebuffer=r.sceneFramebuffer.getIdFramebuffer(),t.near=0!==index?i.near*n.opaqueFrustumNearOffset:i.near,t.far=i.far,h.updateFrustum(t),h.updatePass(Le$s.GLOBE);var f=i.commands[Le$s.GLOBE],p=i.indices[Le$s.GLOBE];for(j=0;j<p;++j)_0xd5fd9a(f[j],n,c,e);for(a&&(l.framebuffer=e.framebuffer,l.execute(c,e),l.framebuffer=void 0),a&&s&&u.execute(c,e),h.updatePass(Le$s.CESIUM_3D_TILE),f=i.commands[Le$s.CESIUM_3D_TILE],p=i.indices[Le$s.CESIUM_3D_TILE],j=0;j<p;++j)_0xd5fd9a(f[j],n,c,e);for(h.updatePass(Le$s.OPAQUE),f=i.commands[Le$s.OPAQUE],p=i.indices[Le$s.OPAQUE],j=0;j<p;++j)_0xd5fd9a(f[j],n,c,e);for(h.updatePass(Le$s.TRANSLUCENT),f=i.commands[Le$s.TRANSLUCENT],p=i.indices[Le$s.TRANSLUCENT],j=0;j<p;++j)_0xd5fd9a(f[j],n,c,e);e.framebuffer=d},_0x485985.prototype.executeCommandsForEnvironment=function(e,t){var i=this._scene,n=i.camera,r=i.context,o=r.uniformState,a=i._frameState.passes;if(!a.pick){t.near=n.frustum.near,t.far=n.frustum.far;var s=t.reflect;t.reflect=!1,o.updateFrustum(t);var l=i._environmentState,u=i._environmentVisible,c=l.skyBoxCommand,h=l.useWebVR,d=i._view;if(o.updatePass(Le$s.ENVIRONMENT),e$2b(c)&&u.isSkyBoxVisible&&_0x1a01b5(c,i,r,e),l.isSkyAtmosphereVisible&&u.isSkyAtmosphereVisible&&_0x1a01b5(l.skyAtmosphereCommand,i,r,e),l.isUnderGlobeVisible&&u.isUnderGlobeVisible&&l.underGlobeCommand.execute(r,e),l.isSunVisible&&u.isSunVisible&&!a.fbo&&(l.sunDrawCommand.execute(r,e),i.sunBloom&&!h)){var f;f=l.useGlobeDepthFramebuffer?d.globeDepth.framebuffer:l.usePostProcess?d.sceneFramebuffer.getFramebuffer():l.originalFramebuffer;var p=i._multiViewportMode!==B$e.NONE;i._sunPostProcess.execute(r),i._sunPostProcess.copy(r,f,p?e:void 0),e.framebuffer=f}l.isMoonVisible&&u.isMoonVisible&&l.moonCommand.execute(r,e),t.reflect=s}};var _0x445c70=new o$15,_0x17ab3f=new l$11,_0x8a404=new a$V,_0x4931bc=new l$12;function _0xa2141a(e){return e$2b(e.frustum.fov)?e.frustum.clone(_0x445c70):e$2b(e.frustum.infiniteProjectionMatrix)?e.frustum.clone(_0x17ab3f):e$2b(e.frustum.width)?e.frustum.clone(_0x8a404):e.frustum.clone(_0x4931bc)}function _0x3fd0ff(e,t){for(var i=e._context,n=e._frameState,r=e._view.camera,o=0,a=e._layers.layerQueue.length;o<a;o++){var s=e._layers.layerQueue[o];if("FieldLayer3D"===s._type)(c=s._particleVelocityFieldEffect)._showParticleTrails&&e$2b(c._lastParticleStateTexture)&&(c.clearLastParticleStateTexture(r,e._hdr,i,t),e.particleTrailsPostRenderer._particleStateTexture=c._lastParticleStateTexture,e.particleTrailsPostRenderer.update(n))}for(var l=0,u=e._primitives.length;l<u;l++){var c,h=e._primitives._primitives[l];if("FieldLayer3D"==h.type)(c=h._particleVelocityFieldEffect)._showParticleTrails&&e$2b(c._lastParticleStateTexture)&&(c.clearLastParticleStateTexture(r,e._hdr,i,t),e.particleTrailsPostRenderer._particleStateTexture=c._lastParticleStateTexture,e.particleTrailsPostRenderer.update(n))}}function _0x180a9c(e){var t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new p$U({camera:e.camera,updateOnChange:!1}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),e$2b(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function _0x33387c(e,t){var i=e._view.debugGlobeDepths,n=i[t];return!e$2b(n)&&e.context.depthTexture&&(n=new GlobeDepth,i[t]=n),n}function _0x4843a3(e,t,i,n){var r=e._view,o=r.camera,a=e._environmentState.renderTranslucentDepthForPick;n.updateAndClearFramebuffers(t,i),a||n.updateAndRenderPrimitives(e),r.createPotentiallyVisibleSet(e),a||(_0x1128c1(e),_0x9c02b6(e));var s=t.viewport;s.x=0,s.y=0,s.width=.5*s.width;var l=v$K.clone(o,e._cameraVR);l.frustum=o.frustum;var u=o.frustum.near,c=u*u$_(e.focalLength,5),h=u$_(e.eyeSeparation,c/30),d=o$1p.multiplyByScalar(l.right,.5*h,new o$1p(0,0,0));o.frustum.aspectRatio=s.width/s.height;var f=.5*h*u/c;o$1p.add(l.position,d,o.position),o.frustum.xOffset=f,n.executeCommands(t),s.x=s.width,o$1p.subtract(l.position,d,o.position),o.frustum.xOffset=-f,n.executeCommands(t),v$K.clone(l,o)}_0x485985.prototype._listenerTypeToEvent=function(e){var t=null;switch(e){case k$f.BeforeExecuteCommands:t=this._beforeExecuteCommandsEvent;break;case k$f.BeforeExecuteCommandsForOnePass:t=this._beforeExecuteCommandsForOnePass;break;case k$f.PostExecuteCommandsForOnePass:t=this._postExecuteCommandsForOnePass}return t},_0x485985.prototype.addEventListener=function(e,t,i){this._listenerTypeToEvent(e).addEventListener(t,i)},_0x485985.prototype.removeEventListener=function(e,t,i){this._listenerTypeToEvent(e).removeEventListener(t,i)},_0x485985.prototype.isDestroyed=function(){return!1},_0x485985.prototype.destroy=function(){return i$10(this)};var _0x46fa0f=(_0x5ec05a=!0,function(e,t){var i=_0x5ec05a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ec05a=!1,i}),_0xe634f6=_0x46fa0f(void 0,(function(){return _0xe634f6.toString().search("(((.+)+)+)+$").toString().constructor(_0xe634f6).search("(((.+)+)+)+$")})),_0x5ec05a;function _0x408f08(){}_0xe634f6(),_0x408f08.maxVBOSize=0;var _0x5552fd=0,_0x5842d5=0,_0x14430d=1048576,_0x2fc42d={},_0x10f6e1=new e$1N;_0x408f08.createVertexBuffer=function(e,t){var i;if(e$2b(_0x2fc42d[e.id])){i=_0x2fc42d[e.id];for(var n,r=t.byteLength,o=Object.keys(i._hash),a=!1,s=0,l=o.length;s<l;s++)if((n=Number(o[s]))>=r&&n<r+1024){a=!0;break}var u;if(a){var c=i.get(n);(u=c.pop()).isCached=!1,u.copyFromArrayView(t,0),_0x5552fd-=n,c.length<1&&i.remove(n)}return u}},_0x408f08.createIndexBuffer=function(e,t){var i;if(e$2b(_0x10f6e1[e.id])){i=_0x10f6e1[e.id];for(var n,r=t.byteLength,o=Object.keys(i._hash),a=!1,s=0,l=o.length;s<l;s++)if((n=Number(o[s]))===r){a=!0;break}var u;if(a){var c=i.get(n);(u=c.pop()).isCached=!1,u.copyFromArrayView(t,0),_0x5842d5-=n,c.length<1&&i.remove(n)}return u}},_0x408f08.deleteBuffer=function(e){if(e$2b(_0x2fc42d[e.id])){var t,i,n,r,o=_0x2fc42d[e.id],a=_0x14430d*_0x408f08.maxVBOSize*.9;if(_0x5552fd>a*_0x14430d){var s=a*_0x14430d;for(i=(t=Object.keys(o._hash)).length,n=0;n<i&&_0x5552fd>s;){r=t[n];for(var l=o.get(r);l.length&&_0x5552fd>s;){l.pop().destroy(),_0x5552fd-=r}l.length<1&&o.remove(r),++n}}if(e$2b(_0x10f6e1[e.id])){var u=_0x10f6e1[e.id],c=_0x14430d*_0x408f08.maxVBOSize*.1;if(_0x5842d5>c*_0x14430d){var h=c*_0x14430d;for(i=(t=Object.keys(u._hash)).length,n=0;n<i&&_0x5842d5>h;){r=t[n];for(var d=u.get(r);d.length&&_0x5842d5>h;){d.pop().destroy(),_0x5842d5-=r}d.length<1&&u.remove(r),++n}}}}},_0x408f08.deleteVertexArray=function(e,t){var i,n;e$2b(_0x2fc42d[e.id])||(_0x2fc42d[e.id]=new e$1N),i=_0x2fc42d[e.id];for(var r=t._attributes,o=.9*_0x408f08.maxVBOSize,a=0;a<r.length;++a){var s=r[a].vertexBuffer;if(!(_0x5552fd>=o||s.isCached||s.vertexArrayDestroyable)){var l=s.sizeInBytes;i.contains(l)?i.get(l).push(s):i.set(l,[s]),s.isCached=!0,_0x5552fd+=l}}e$2b(_0x10f6e1[e.id])||(_0x10f6e1[e.id]=new e$1N),n=_0x10f6e1[e.id];var u=t._indexBuffer;return.1*_0x408f08.maxVBOSize>_0x5842d5&&e$2b(u)&&!u.isCached&&!u.vertexArrayDestroyable&&(n.contains(u.sizeInBytes)?n.get(u.sizeInBytes).push(u):n.set(u.sizeInBytes,[u]),u.isCached=!0,_0x5842d5+=u.sizeInBytes),t.destroy()};var _0x332748=(_0x30bcef=!0,function(e,t){var i=_0x30bcef?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30bcef=!1,i}),_0x4f9ca0=_0x332748(void 0,(function(){return _0x4f9ca0.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f9ca0).search("(((.+)+)+)+$")})),_0x30bcef;function _0x2b82d9(e){this._longitude=u$_(e.longitude,0),this._latitude=u$_(e.latitude,0),this._altitude=u$_(e.altitude,0),this._scale=u$_(e.scale,new o$1p(1,1,1)),this._color=u$_(e.color,e$1U.WHITE),this._heading=u$_(e.heading,Math.PI/2),this._pitch=u$_(e.pitch,0),this._roll=u$_(e.roll,0),this._startDirection=u$_(e.startDirection,0),this._offset=u$_(e.offset,new o$1p),this._timeStamp=u$_(e.timeStamp,-1),this._id=u$_(e.id,e$1Q()),this._description=e.description,this._lockOrientation=u$_(e.lockOrientation,!1)}_0x4f9ca0(),Object.defineProperties(_0x2b82d9.prototype,{longitude:{get:function(){return this._longitude},set:function(e){this._longitude=e}},latitude:{get:function(){return this._latitude},set:function(e){this._latitude=e}},altitude:{get:function(){return this._altitude},set:function(e){this._altitude=e}},scale:{get:function(){return this._scale},set:function(e){this._scale=e}},color:{get:function(){return this._color},set:function(e){this._color=e}},heading:{get:function(){return this._heading},set:function(e){this._heading=e}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e}},roll:{get:function(){return this._roll},set:function(e){this._roll=e}},startDirection:{get:function(){return this._startDirection},set:function(e){this._startDirection=e}},offset:{get:function(){return this._offset},set:function(e){this._offset=e}},timeStamp:{get:function(){return this._timeStamp},set:function(e){this._timeStamp=e}},id:{get:function(){return this._id},set:function(e){this._id=e}},description:{get:function(){return this._description},set:function(e){this._description=e}},lockOrientation:{get:function(){return this._lockOrientation},set:function(e){this._lockOrientation=e}}}),_0x2b82d9.clone=function(e){return new _0x2b82d9({longitude:e._longitude,latitude:e._latitude,altitude:e._altitude,scale:e._scale,color:e._color,heading:e._heading,pitch:e._pitch,roll:e._roll,startDirection:e._startDirection,offset:e._offset,lockOrientation:e._lockOrientation})};var _0x550a58=(_0x44029e=!0,function(e,t){var i=_0x44029e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x44029e=!1,i}),_0x50afb7=_0x550a58(void 0,(function(){return _0x50afb7.toString().search("(((.+)+)+)+$").toString().constructor(_0x50afb7).search("(((.+)+)+)+$")})),_0x44029e;_0x50afb7();var _0x46b7bc="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TEXTURE\nattribute vec4 aTexCoord0;\n#endif\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\nattribute vec4 aPreHxyzLx;\nattribute vec4 aPreLyzNextHxy;\nattribute vec4 aNextHzLxyz;\nattribute vec4 aPreOrientation;\nattribute vec4 aNextOrientation;\nattribute vec4 aColorAndPickColor;\nattribute vec3 aPreHpr;\nattribute vec3 aNextHpr;\nattribute vec3 aScale;\n#include <SceneUboDecl>\nuniform vec3 uOffset;\nuniform mat4 uGeoMatrix;\nuniform float uInterval;\nuniform float uFilterMode;\nuniform float uMaxVisibleDistance;\nuniform float uFilterPixel;\nuniform float uRadius;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying vec3 vNormalEC;\nvarying mat4 vModelMatrix;\n\nvec4 vertexColor = vec4(1.0);\nvec4 quaternionfromAxisAngle(vec3 axis, float angle)\n{\n float halfAngle = angle * 0.5;\n float s = sin(halfAngle);\n vec3 fromAxis = normalize(axis);\n return vec4(fromAxis * s, cos(halfAngle));\n}\nvec4 quaternionMultiply(vec4 left, vec4 right)\n{\n float x = left.w * right.x + left.x * right.w + left.y * right.z - left.z * right.y;\n float y = left.w * right.y - left.x * right.z + left.y * right.w + left.z * right.x;\n float z = left.w * right.z + left.x * right.y - left.y * right.x + left.z * right.w;\n float w = left.w * right.w - left.x * right.x - left.y * right.y - left.z * right.z;\n return vec4(x, y, z, w);\n}\nmat4 rotationFromQuaternion(vec4 q)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvec4 lerp(vec4 start, vec4 end, float t)\n{\n vec4 tmp = end * t;\n vec4 result = start * (1.0 - t);\n return result + tmp;\n}\nvec4 slerp(vec4 start, vec4 end, float t)\n{\n float adot = dot(start, end);\n vec4 r = end;\n if(adot < 0.0){\n adot = -adot;\n r = end * -1.0;\n }\n if(1.0 - adot < 0.000001){\n return mix(start, r, t);\n }\n float theta = acos(adot);\n float angle = (1.0 - t) * theta;\n vec4 scaledP = start * sin(angle);\n vec4 scaledR = r * (sin(t * theta));\n vec4 result = scaledP + scaledR;\n return result * (1.0 / sin(theta));\n}\nfloat filterTest(vec3 rte, float radius)\n{\n if(uFilterMode > 0.0)\n {\n float distance = length(rte);\n float theta = czm_piOverFour * 0.5;\n float screenPix = max(czm_globeDepthTextureDim.x, czm_globeDepthTextureDim.y) * 0.5;\n float lamat = screenPix / tan(theta);\n return lamat * radius / distance > uFilterPixel ? 1.0 : 0.0;\n }\n return length(rte) < uMaxVisibleDistance ? 1.0 : 0.0;\n}\n\nvec4 translateRelativeToEye(vec3 high,vec3 low) {\n vec3 highDifference = high - czm_encodedOriginCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedOriginCameraPositionMCLow;\n return vec4(highDifference + lowDifference, 1.0);\n}\n\nvoid main()\n{\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n vec3 prePosHigh = aPreHxyzLx.xyz;\n vec3 prePosLow = vec3(aPreHxyzLx.w, aPreLyzNextHxy.xy);\n vec3 nextPosHigh = vec3(aPreLyzNextHxy.zw, aNextHzLxyz.x);\n vec3 nextPosLow = aNextHzLxyz.yzw;\n#ifdef TEXTURE\n vTexCoord = aTexCoord0.xy;\n#endif\n vec4 vertexPos = aPosition - vec4(uOffset.xyz,0.0);\n //vertexPos.xyz *= aScale;\n vec4 positionMC = uGeoMatrix * vertexPos;\n vec4 preRte = translateRelativeToEye(prePosHigh,prePosLow);\n vec4 nextRte = translateRelativeToEye(nextPosHigh,nextPosLow);\n vec4 rte = mix(preRte, nextRte, uInterval);\n float show = filterTest(rte.xyz, uRadius * aScale.x);\n vec3 hpr = mix(aPreHpr, aNextHpr, uInterval);\n vec4 rollQuaternion = quaternionfromAxisAngle(vec3(1.0, 0.0, 0.0), hpr.z);\n vec4 pitchQuaternion = quaternionfromAxisAngle(vec3(0.0, 1.0, 0.0), -hpr.y);\n vec4 headingQuaternion = quaternionfromAxisAngle(vec3(0.0, 0.0, 1.0), -hpr.x);\n vec4 q = quaternionMultiply(rollQuaternion, pitchQuaternion);\n q = quaternionMultiply(headingQuaternion, q);\n mat4 rotationMat = rotationFromQuaternion(q);\n vec4 orientation = slerp(aPreOrientation, aNextOrientation, uInterval);\n mat3 velocityMat = mat3(rotationFromQuaternion(orientation));\n mat3 rotationMatrix = velocityMat * mat3(rotationMat);\n mat4 scaleMatrix = mat4(aScale.x, 0, 0, 0, 0, aScale.y, 0, 0, 0, 0, aScale.z, 0, 0, 0, 0, 1);\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMatrix[0], 0.0);\n worldMatrix[1] = vec4(rotationMatrix[1], 0.0);\n worldMatrix[2] = vec4(rotationMatrix[2], 0.0);\n worldMatrix[3] = vec4(rte.xyz, 1.0);\n mat4 modelMatrix = worldMatrix * scaleMatrix;\n vModelMatrix = modelMatrix * uGeoMatrix;\n vertexPos = modelMatrix * positionMC;\n vertexPos.w = 1.0;\n vPositionMC.xyz = rotationMatrix * positionMC.xyz;\n vPositionMC.w = 0.0;\n vPositionEC = (czm_modelViewRelativeToEye * vec4(vPositionMC.xyz, 1.0)).xyz;\n gl_Position = show * czm_modelViewProjectionRelativeToEye * vertexPos;\n vec4 color, pickColor;\n color.xy = czm_decompressTextureCoordinates(aColorAndPickColor.x);\n color.zw = czm_decompressTextureCoordinates(aColorAndPickColor.y);\n pickColor.xy = czm_decompressTextureCoordinates(aColorAndPickColor.z);\n pickColor.zw = czm_decompressTextureCoordinates(aColorAndPickColor.w);\n vColor = vertexColor * color;\n#ifdef HAS_NORMAL\n if(length(aNormal) > 0.8)\n {\n vec3 normal = rotationMatrix * aNormal;\n mat4 realModelViewMatrix4 = czm_view * vModelMatrix;\n realModelViewMatrix4 = czm_inverseMatrix(realModelViewMatrix4);\n mat3 realModelViewMatrix3 = mat3(realModelViewMatrix4);\n realModelViewMatrix3 = czm_transpose(realModelViewMatrix3);\n vNormalEC = normalize(realModelViewMatrix3 * aNormal);\n vPositionMC.w = 1.0;\n }\n#endif\n vPickColor = pickColor;\n}",_0x407996=(_0x5cc700=!0,function(e,t){var i=_0x5cc700?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5cc700=!1,i}),_0x495901=_0x407996(void 0,(function(){return _0x495901.toString().search("(((.+)+)+)+$").toString().constructor(_0x495901).search("(((.+)+)+)+$")})),_0x5cc700;_0x495901();var _0x484b3b=34,_0x1083e3=new e$1U(.7,.7,1,1),_0x12dfba={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,READY:4,FAILED:5};function _0x75f8b5(e,t){LicenseChecker.LICENSECHECKER.verify("DynamicLayer3D"),o$1q.defined("context",e),o$1q.defined("context",t),Array.isArray(t)||(t=[t]),this._context=e,this._gl=e._gl,this._updateInterval=1e3,this._xmlParser=new s$S,this._visible=!0,this._type=bt$5.INSTANCED_LAYER,this._group={};for(var i=0,n=t.length;i<n;i++){var r=t[i];o$1q.typeOf.string("url",r),this._group[r]={url:r,ready:!1,visible:!0,pickEnable:!0,cullEnabled:!1,polygonOffset:{enabled:!1,factor:0,units:0},cullFace:G$17.BACK,loadState:_0x12dfba.UNLOAD,buffer:void 0,offset:new o$1p,radius:0,instanceCount:0,stateList:new e$1N,instanceList:new e$1N,removedList:new e$1N,renderEntities:[],boundingSphere:new i$1c,beginTime:-1,interval:0}}this._maxVisibleAltitude=Number.MAX_VALUE,this._maxVisibleDistance=Number.MAX_VALUE,this._filterMode=_0x2056d1.DISTANCE_FROM_EYE_POINT,this._filterPixel=0,this._enableLocalOffset=!0,this._visibleViewport=4095,null!==e.s3tc?this._supportCompressType=1:null!==e.pvrtc?this._supportCompressType=2:null!==e.etc1&&(this._supportCompressType=3),this._shadowType=_0x381f49.NONE,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:new o$1p,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}}}function _0x390edd(e){return e._shadowType==_0x381f49.SELECTION||e._shadowType==_0x381f49.ALL}function _0x5dcc75(e){e._times.length>3&&(e._times.splice(0,1),e._values.splice(0,e._packedLength))}function _0x5073bd(e,t,i){for(var n=0;n<e._times.length;n++){var r=a$15.addSeconds(t,n*i,new a$15);e._times[n]=r}}function _0x553650(e,t){for(var i=a$15.now(),n=0,r=e.stateList.length;n<r;n++){var o=e.stateList.values[n];_0x5073bd(o.position._property,i,t),_0x5073bd(o.heading,i,t),_0x5073bd(o.pitch,i,t),_0x5073bd(o.roll,i,t),_0x5073bd(o.scale,i,t),_0x5073bd(o.color,i,t)}}function _0x5102e5(e){var t={};return e$2b(e.a_position)&&(t.aPosition=e.a_position.index),e$2b(e.a_normal)&&(t.aNormal=e.a_normal.index),e$2b(e.a_vertexColor)&&(t.aColor=e.a_vertexColor.index),e$2b(e.a_texcoord_0)&&(t.aTexCoord0=e.a_texcoord_0.index),e$2b(e.a_texcoord0)&&(t.aTexCoord0=e.a_texcoord0.index),t}function _0x3d3dd5(e,t,i,n){var r=t.buffer;if(!e$2b(r)){var o=0===t.instanceCount?1:t.instanceCount,a=4*_0x484b3b*o;(r=t$Y.createVertexBuffer({context:e,sizeInBytes:a,usage:A$19.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,t.buffer=r}_0x147b34(r,i,n,Object.keys(i).length)}Object.defineProperties(_0x75f8b5.prototype,{updateInterval:{get:function(){return this._updateInterval},set:function(e){this._updateInterval=e}},group:{get:function(){return this._group}},visible:{get:function(){return this._visible},set:function(e){this._visible=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){!e$2b(e)||(this._maxVisibleAltitude=e)}},type:{get:function(){return this._type}},enableLocalOffset:{get:function(){return this._enableLocalOffset},set:function(e){this._enableLocalOffset=e}},maxVisibleDistance:{get:function(){return this._maxVisibleDistance},set:function(e){o$1q.typeOf.number("maxVisibleDistance",e),this._maxVisibleDistance=e}},filterMode:{get:function(){return this._filterMode},set:function(e){o$1q.typeOf.number("filterMode",e),this._filterMode=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){o$1q.typeOf.number("filterPixel",e),this._filterPixel=e}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}}}),_0x75f8b5.prototype.setPolygonOffset=function(e,t,i){o$1q.typeOf.string("dynamicLayer setPolygonoffset url",e),o$1q.typeOf.number("dynamicLayer setPolygonoffset factor",t),o$1q.typeOf.number("dynamicLayer setPolygonoffset units",i);var n=this._group[e];if(e$2b(n)&&(n.polygonOffset.factor!==t||n.polygonOffset.units!==i)&&(n.polygonOffset={enabled:!0,factor:u$_(t,0),units:u$_(i,0)},n.ready))for(var r=0,o=n.renderEntities.length;r<o;r++){var a=n.renderEntities[r].command,s=d$1m.getState(a.renderState);s.polygonOffset={enabled:!0,factor:u$_(t,0),units:u$_(i,0)},a.renderState=d$1m.fromCache(s)}},_0x75f8b5.prototype.update=function(e){if((LicenseChecker.LICENSECHECKER.verify("DynamicLayer3D"),this._visible)&&e._fboState.frameBufferType!==Qe$c.NORMAL_AND_DEPTH){var t=!0;if(e.multiViewportIndex>-1)t=this.getVisibleInViewport(e.multiViewportIndex);this._frameState=e,this._picking=e.passes.pick;var i=e.camera.positionCartographic.height<this._maxVisibleAltitude;for(var n in this._group)if(this._group.hasOwnProperty(n)){var r=this._group[n];if(r.ready){if(!r.visible||(this._picking||(_0x552ce8(e,this,r),_0x767c58(r,e)),r.instanceCount<1)||!i||!t)continue;for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s.meshUBO.update(this._context),s.materialUBO.update(this._context);var l=s.command;l.instanceCount=r.instanceCount,l.boundingVolume=r.boundingSphere,e.commandList.push(l)}}else _0x21c36f(e,this,n)}}},_0x75f8b5.prototype.setCullEnabled=function(e,t){o$1q.typeOf.string("dynamicLayer setCullEnabled url",e),t=u$_(t,G$17.BACK);var i=this._group[e];if(e$2b(i)&&(!i.cullEnabled||i.cullFace!==t)&&(i.cullEnabled=!0,i.cullFace=t,i.ready))for(var n=0,r=i.renderEntities.length;n<r;n++){var o=i.renderEntities[n].command,a=d$1m.getState(o.renderState);a.cull.enabled=!0,a.cull.face=t,o.renderState=d$1m.fromCache(a)}},_0x75f8b5.prototype.getCullEnabled=function(e){o$1q.typeOf.string("dynamicLayer getCullEnabled url",e);var t=this._group[e];if(e$2b(t))return t.cullEnabled},_0x75f8b5.prototype.clear=function(e,t){t$12("DynamicLayer3D.prototype.clear","clear() will be deprecated, please use clearState()"),this.clearState(e,t)},_0x75f8b5.prototype.clearAll=function(){t$12("DynamicLayer3D.prototype.clearAll","clearAll() will be deprecated, please use clearAllState()"),this.clearAllState()},_0x75f8b5.prototype.clearAllState=function(){for(var e in this._group)this._group.hasOwnProperty(e)&&(this._group[e].stateList.removeAll(),this._group[e].instanceList.removeAll(),_0x2f5575(this,this._group[e]))},_0x75f8b5.prototype.clearState=function(e,t){o$1q.typeOf.string("dynamicLayer3D.clear url",e),o$1q.defined("dynamicLayer3D.clear ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(e$2b(i)){var n=i.stateList,r=i.instanceList;if(e$2b(n)&&e$2b(r)){for(var o,a=0,s=t.length;a<s;a++)o=t[a],n.contains(o)&&n.remove(o),r.contains(o)&&r.remove(o);_0x2f5575(this,i)}}},_0x75f8b5.prototype.deleteObjects=function(e,t){o$1q.typeOf.string("dynamicLayer3D.delete url",e),o$1q.defined("dynamicLayer3D.delete ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(e$2b(i)){var n=i.instanceList,r=i.removedList,o=i.stateList;if(e$2b(n)&&e$2b(r)&&e$2b(o)){for(var a,s=0,l=t.length;s<l;s++)a=t[s],o.remove(a),n.contains(a)&&(n.remove(a),r.set(a,!0));_0x2f5575(this,i)}}},_0x75f8b5.prototype.deleteAllObjects=function(){for(var e in this._group)if(this._group.hasOwnProperty(e)){for(var t=this._group[e],i=t.instanceList,n=Object.keys(i._hash),r=n.length;r--;)t.removedList.set(n[r],!0);i.removeAll(),t.stateList.removeAll(),_0x2f5575(this,t)}},_0x75f8b5.prototype._updateShadow=function(e){var t=_0x390edd(e),i=e._group;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s.command.castShadows=t,s.command.receiveShadows=t}}},_0x75f8b5.prototype.setVisibleByUrl=function(e,t){var i=this._group[e];e$2b(i)&&(i.visible=t)},_0x75f8b5.prototype.setPickEnable=function(e,t){this._group[e].pickEnable=t},_0x75f8b5.prototype.updateObjectWithModel=function(e,t){if(o$1q.typeOf.string("url",e),Array.isArray(t)){var i=this._group[e];if(e$2b(i)){e$2b(i.stateList)||(i.stateList=new e$1N);for(var n,r=0,o=t.length;r<o;r++)if((n=t[r])instanceof _0x2b82d9){var a=n.id;if(i.removedList.contains(a))continue;var s=i.stateList.get(a);e$2b(s)||(i.offset=o$1p.clone(n.offset,i.offset),i.stateList.set(a,{position:new o$y,scale:new g$x(o$1p),heading:new g$x(Number),pitch:new g$x(Number),roll:new g$x(Number),color:new g$x(e$1U),offset:n.offset,description:n.description,lockOrientation:n.lockOrientation,id:a}),(s=i.stateList.get(a)).position.setInterpolationOptions({interpolationDegree:10}),s.position.backwardExtrapolationType=_0x346789.HOLD,s.position.forwardExtrapolationType=_0x346789.HOLD,s.scale.backwardExtrapolationType=_0x346789.HOLD,s.scale.forwardExtrapolationType=_0x346789.HOLD,s.heading.backwardExtrapolationType=_0x346789.HOLD,s.heading.forwardExtrapolationType=_0x346789.HOLD,s.pitch.backwardExtrapolationType=_0x346789.HOLD,s.pitch.forwardExtrapolationType=_0x346789.HOLD,s.roll.backwardExtrapolationType=_0x346789.HOLD,s.roll.forwardExtrapolationType=_0x346789.HOLD,s.color.backwardExtrapolationType=_0x346789.HOLD,s.color.forwardExtrapolationType=_0x346789.HOLD,s.startDirection=n.startDirection);var l=a$15.now(),u=o$1p.fromDegrees(n.longitude,n.latitude,n.altitude);_0x5dcc75(s.position._property),_0x5dcc75(s.heading),_0x5dcc75(s.pitch),_0x5dcc75(s.roll),_0x5dcc75(s.scale),_0x5dcc75(s.color),s.position.addSample(l,u),s.heading.addSample(l,n.heading),s.pitch.addSample(l,n.pitch),s.roll.addSample(l,n.roll),s.scale.addSample(l,n.scale),s.color.addSample(l,n.color),s.lockOrientation=n.lockOrientation}}}},_0x75f8b5.prototype.setUnSelected=function(){var e=this._group;if(e$2b(e))for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];if(!e$2b(i.instanceList)||i.instanceCount<1||!i.pickEnable)continue;for(var n=i.instanceList,r=0;r<n.length;r++){var o=n.values[r];e$2b(o)&&o.setUnSelected()}}},_0x75f8b5.prototype.getVisibleInViewport=function(e){return!(e>8)&&1<<e&this._visibleViewport},_0x75f8b5.prototype.setVisibleInViewport=function(e,t){e>8||(this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport)};var _0x195f0c=new e$29(1,1,1,1);function _0x5d04ef(e,t,i){i.localMatrix=i.modelMatrix.clone();var n=i.uniformMap,r={uInterval:function(){return e.interval},uAmbientColor:function(){return _0x195f0c},uDiffuseColor:function(){return _0x195f0c},uSpecularColor:function(){return _0x195f0c},uShininess:function(){return 1},uPicking:function(){return t._picking},uGeoMatrix:function(){return i.localMatrix},uFilterMode:function(){return t.filterMode},uMaxVisibleDistance:function(){return t.maxVisibleDistance},uFilterPixel:function(){return t.filterPixel},uRadius:function(){return i.boundingVolume.radius},uOffset:function(){return e.offset}};return e$2b(n.u_baseColorTexture)?r.uTexture=n.u_baseColorTexture:e$2b(n.u_diffuse)&&(r.uTexture=n.u_diffuse),e$2b(n.u_specular)&&(r.uSpecularColor=n.u_specular),e$2b(n.u_shininess)&&(r.uShininess=n.u_shininess),r}function _0x767c58(e,t){if(e$2b(e.model)){e.boundingSphere=e.boundingSphere.clone(),e.model.updateAnimation(t);for(var i=e.model._nodeCommands,n=i.length,r=0;r<n;++r){var o=i[r].command;o.localMatrix=o.modelMatrix,o.modelMatrix=p$1d.IDENTITY.clone()}}}function _0x42891b(e,t){for(var i=t._context,n=e.model._nodeCommands,r=n.length,o=[],a=0;a<r;++a){var s=n[a].command;t._shadowType==_0x381f49.ALL||t._shadowType==_0x381f49.SELECTION?(s.castShadows=!0,s.receiveShadows=!0):(s.castShadows=!1,s.receiveShadows=!1),s.pickId="vPickColor",s.instanceCount=e.instanceCount,s.pass=Le$s.S3MTiles+2,s.renderState=_0x262914(e);var l=s.vertexArray,u=l._attributes,c=l.indexBuffer;if(u.length<9){var h=_0x5102e5(s.shaderProgram.vertexAttributes);_0x3d3dd5(i,e,h,u),s.vertexArray=new c$12({context:i,attributes:u,indexBuffer:c})}var d=new s$U({name:"DynamicLayerVertex",sources:[_0x46b7bc]}),f=new s$U({name:"S3ModelFP",sources:[_0x451393]});e$2b(h.aColor)&&d.defines.push("VertexColor"),e$2b(h.aNormal)&&(d.defines.push(Y$H.HAS_NORMAL),f.defines.push(Y$H.HAS_NORMAL)),e$2b(h.aTexCoord0)&&(d.defines.push("TEXTURE"),f.defines.push("TEXTURE"));const r=t._frameState.lightSource;if(e$2b(r))f.defines.push("MAX_POINT_LIGHT_COUNT "+s$I.MaxPointLightCount),f.defines.push("MAX_SPOT_LIGHT_COUNT "+s$I.MaxSpotLightCount),f.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$I.MaxDirectionLightCount),r.directionalLight.length>0&&f.defines.push(Y$H.HAS_DIR_LIGHTS),r._visibleLightList[_0x1d9df9.POINT].length>0&&f.defines.push(Y$H.HAS_POINT_LIGHTS),r._visibleLightList[_0x1d9df9.SPOT].length>0&&f.defines.push(Y$H.HAS_SPOT_LIGHTS),r.hemisphereLight.length>0&&f.defines.push(Y$H.HAS_HEMISPHERE_LIGHTS);s.shaderProgram=r$13.fromCache({context:i,vertexShaderSource:d,fragmentShaderSource:f,attributeLocations:h});var p=_0x5d04ef(e,t,s);p=p$19(p,t._frameState.lightSource.createUniformMap()),s.uniformMap=p,s.modelMatrix=p$1d.IDENTITY.clone(),e.renderEntities.push({command:s,attributes:u,indexBuffer:c}),o.push(s.boundingVolume)}var _=new i$1c;i$1c.fromBoundingSpheres(o,_),e.oriBoundingSphere=_}function _0x21c36f(e,t,i){var n=t._group[i],r=n.loadState;if(i.indexOf(".gltf")>0||i.indexOf(".glb")>0)_0x12dfba.UNLOAD==r&&(e$2b(n.model)||(n.model=F$C.fromGltf({url:i,incrementallyLoadTextures:!1})),n.model.update(e),n.model.ready&&(n.ready=!0,n.loadState=_0x12dfba.READY,_0x553650(n,t.updateInterval/1e3),_0x42891b(n,t),n.model.activeAnimations.addAll({loop:_0x157d80.REPEAT})));else{var o=i.indexOf(".s3mb")>-1;if(_0x12dfba.UNLOAD==r){var a=o$N(i,(function(e){return o$10(e)}));e$2b(a)?(n.loadState=_0x12dfba.LOADING,a.then((function(e){n.loadState=_0x12dfba.LOADED,n.contentBuffer=e}),(function(e){e$2b(e)?n.loadState=_0x12dfba.FAILED:n.loadState=_0x12dfba.UNLOAD}))):n.loadState=_0x12dfba.UNLOAD}_0x12dfba.LOADED===r&&(o?_0x2aca63(t,n):_0x93dec5(t,n))}}function _0x552ce8(e,t,i){if(!(i.stateList.length<1)){var n=t._context,r=!1;i.beginTime<0&&(r=!0,i.beginTime=window.performance.now());var o=Et$a()-i.beginTime,a=t._updateInterval;if(i.interval=o/a,i.interval=e$2a.clamp(i.interval,0,1),r||o>=a){i.interval=0;var s=a$15.now();o=a$15.addSeconds(s,-t._updateInterval/1e3,new a$15);i.beginTime=window.performance.now();for(var l,u=i.stateList,c=[],h=0;h<u.length;h++){var d=u.values[h];l=d.id;var f=i.instanceList.get(l);if(i.removedList.contains(l))return;e$2b(f)||(i.instanceList.set(l,new _0x40158e(n,d,i,l)),f=i.instanceList.get(l)),f.update(e,d,o,c)}if(c.length>0){var p=i$1c.fromBoundingSpheres(c,new i$1c);i$1c.clone(p,i.boundingSphere)}i.instanceCount=c.length,_0x2f5575(t,i)}}}function _0x2f5575(e,t){var i=t.instanceCount;if(!(i<1)){var n=_0x484b3b*i,r=t.buffer,o=e._context,a=S$12.getSizeInBytes(S$12.FLOAT);if(r.sizeInBytes/(a*_0x484b3b)<i){t.buffer&&t.buffer.destroy(),(r=t$Y.createVertexBuffer({context:o,sizeInBytes:n*a,usage:A$19.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,t.buffer=r;for(var s=0,l=t.renderEntities.length;s<l;s++){var u=t.renderEntities[s],c=u.command;if(e$2b(c)){c.vertexArray.isDestroyed()||c.vertexArray.destroy();for(var h=0;h<u.attributes.length;h++){var d=u.attributes[h];e$2b(d.instanceDivisor)&&d.instanceDivisor>0&&(d.vertexBuffer=t.buffer)}c.vertexArray=new c$12({context:o,attributes:u.attributes,indexBuffer:u.indexBuffer})}}}var f=new Float32Array(n),p=t.instanceList,_=0;for(s=0,l=p.length;s<l;s++){var m=p.values[s];if(e$2b(m)&&m._ready){m._index=_;var g=i$11.fromCartesian(m._prePosition),x=g.high,v=g.low,y=i$11.fromCartesian(m._nextPosition),$=y.high,b=y.low,T=m._preOrientation,C=m._nextOrientation,S=m._pickColor,w=m._color,E=m._scale,P=m._preHpr,A=m._nextHpr,L=new e$1U;L.red=t$10.compressTextureCoordinates({x:w.red,y:w.green}),L.green=t$10.compressTextureCoordinates({x:w.blue,y:w.alpha}),L.blue=t$10.compressTextureCoordinates({x:S.red,y:S.green}),L.alpha=t$10.compressTextureCoordinates({x:S.blue,y:S.alpha}),_0x5194c2(f,_,x,v,$,b,T,C,L,P,A,E),_++}}r.copyFromArrayView(f,0)}}function _0x5194c2(e,t,i,n,r,o,a,s,l,u,c,h){var d=0;e[(t*=_0x484b3b)+d++]=i.x,e[t+d++]=i.y,e[t+d++]=i.z,e[t+d++]=n.x,e[t+d++]=n.y,e[t+d++]=n.z,e[t+d++]=r.x,e[t+d++]=r.y,e[t+d++]=r.z,e[t+d++]=o.x,e[t+d++]=o.y,e[t+d++]=o.z,e[t+d++]=a.x,e[t+d++]=a.y,e[t+d++]=a.z,e[t+d++]=a.w,e[t+d++]=s.x,e[t+d++]=s.y,e[t+d++]=s.z,e[t+d++]=s.w,e[t+d++]=l.red,e[t+d++]=l.green,e[t+d++]=l.blue,e[t+d++]=l.alpha,e[t+d++]=u.heading,e[t+d++]=u.pitch,e[t+d++]=u.roll,e[t+d++]=c.heading,e[t+d++]=c.pitch,e[t+d++]=c.roll,e[t+d++]=h.x,e[t+d++]=h.y,e[t+d++]=h.z}var _0x16620d=new n$13,_0x1000d7=new o$1p;function _0x40158e(e,t,i,n){this.type=bt$5.INSTANCED_OBJECT,this._ownerGroup=i,this._id=n,this._index=-1,this._description=t.description;var r=t.position.getValue(0);e$2b(r)||(r=new o$1p),this._scale=o$1p.clone(t.scale.getValue(0));var o=o$1p.maximumComponent(this._scale);this._offset=t.offset,this._lockOrientation=t.lockOrientation,this._preOrientation=new n$13,this._nextOrientation=new n$13,this._orientation=void 0,this._velocityOrientation=new e$v(t.position);var a=m$17.headingPitchRollToFixedFrame(r,new i$15(t.startDirection,0,0),t$13.WGS84,m$17.eastNorthUpToFixedFrame,new p$1d),s=p$1d.getRotation(a,new p$1e),l=n$13.fromRotationMatrix(s);n$13.clone(l,this._preOrientation),n$13.clone(this._preOrientation,this._nextOrientation);var u=o$1p.multiplyByScalar(this._offset,o,new o$1p);this._prePosition=p$1d.multiplyByPoint(a,u,new o$1p),this._nextPosition=o$1p.clone(this._prePosition);var c=t.heading.getValue(0),h=t.pitch.getValue(0),d=t.roll.getValue(0);this._preHpr=new i$15(c,h,d),this._nextHpr=i$15.clone(this._preHpr),this._dynamicColor=t.color.getValue(0);var f=i.oriBoundingSphere.radius*o;this._boundingSphere=new i$1c(this._prePosition,f);var p={id:n,primitive:this},_=e.createPickId(p);this._pickColor=_.color,this._selColor=new e$1U,this._color=e$1U.multiply(this._dynamicColor,this._selColor,new e$1U),this._isSelected=!1,this._ready=!1}function _0x93dec5(e,t){var i=t.contentBuffer;if(e$2b(i)){var n={buffer:i,supportCompressType:e._supportCompressType},r=_0x46a73d.S3MTaskProcessor.scheduleTask(n,[i]);e$2b(r)?(t.contentBuffer=void 0,t._loadState=_0x12dfba.PARSING,r.then((function(i){if(i.result){e._gl;for(var n=e._xmlParser.read(i.xmlDoc).firstChild,r=n.namespaceURI,o=s$S.queryFirstNode(n,"Material3Ds",r),a=s$S.queryChildNodes(o,"material",r),s={},l=e._context,u=0,c=a.length;u<c;u++){var h=a[u],d=s$S.queryStringValue(h,"name",r),f=new _0x21d1b1({});s[d]=f;var p=s$S.queryFirstNode(h,"Ambient",r),_=s$S.queryNumericValue(p,"AmbientR",r),m=s$S.queryNumericValue(p,"AmbientG",r),g=s$S.queryNumericValue(p,"AmbientB",r),x=s$S.queryNumericValue(p,"AmbientA",r);f._ambientColor=new e$1U(_,m,g,x);var v=s$S.queryFirstNode(h,"Diffuse",r);_=s$S.queryNumericValue(v,"DiffuseR",r),m=s$S.queryNumericValue(v,"DiffuseG",r),g=s$S.queryNumericValue(v,"DiffuseB",r),x=s$S.queryNumericValue(v,"DiffuseA",r),f._diffuseColor=new e$1U(_,m,g,x);var y=s$S.queryFirstNode(h,"Specular",r);_=s$S.queryNumericValue(y,"SpecularR",r),m=s$S.queryNumericValue(y,"SpecularG",r),g=s$S.queryNumericValue(y,"SpecularB",r),x=s$S.queryNumericValue(y,"SpecularA",r),f._specularColor=new e$1U(_,m,g,x);var $=s$S.queryNumericValue(h,"Shininess",r);f._shininess=$,s$S.queryFirstNode(h,"TransparentSorting",r),f._bTransparentSorting=s$S.queryBooleanValue(h,"TransparentSorting",r);var b=s$S.queryFirstNode(h,"texture",r),T=s$S.queryStringValue(b,"name",r),C=s$S.queryFirstNode(b,"AddressMode",r),S=s$S.queryStringValue(C,"u",r),w=s$S.queryStringValue(C,"v",r);S="TAM_WRAP"===S?q$19.REPEAT:q$19.CLAMP_TO_EDGE,w="TAM_WRAP"===w?q$19.REPEAT:q$19.CLAMP_TO_EDGE;var E=i.texturePackage[T];if(e$2b(E)){var P=Se$d.CreateTexture(T,l,E.width,E.height,E.nFormat,E.compressType,E.imageBuffer,!1,S,w);f._textures.push(P),0===E.compressType&&(e._supportCompressType=0)}}var A=s$S.queryFirstNode(n,"PageLods",r),L=s$S.queryNodes(A,"Geode",r);for(u=0,c=L.length;u<c;u++){for(var M=L[u],R=s$S.queryStringValue(M,"GeoDeModMatrix",r).split(","),I=0;I<16;I++)R[I]=parseFloat(R[I]);if(R=p$1d.unpack(R,0),t.enableOffset){var O=p$1d.fromTranslation(new o$1p(0,0,-690));R=p$1d.multiplyTransformation(R,O,new p$1d)}for(var D=s$S.queryNodes(M,"GeoName",r),B=[],N=0,F=D.length;N<F;N++){var U=D[N].textContent.trim();B.push(U)}for(var z=[],G=new i$1c,V=0;V<B.length;V++){var k=_0x4c228b(H=(W=i.geoPackage[B[V]]).vertexPackage,R);z.push(k)}z.length>0&&(i$1c.fromBoundingSpheres(z,G),t.oriBoundingSphere=G,z.length=0);for(F=0;F<B.length;F++){var W,H=(W=i.geoPackage[B[F]]).vertexPackage,q=W.arrIndexPackage,j={};for(var Y in q){var X=q[Y];if(e$2b(X)){f=s[d=X.materialCode];j[d]=f}}e.enableLocalOffset||(R=p$1d.IDENTITY),_0x6322c6(e,t,H,q,G,j,R)}t.boundingSphere=i$1c.clone(G)}t.ready=!0,t.loadState=_0x12dfba.READY,_0x553650(t,e.updateInterval/1e3)}else t._loadState=_0x12dfba.UNLOAD}))):t._loadState=_0x12dfba.LOADED}else t._loadState=_0x12dfba.FAILED}function _0x2aca63(e,t){var i=t.contentBuffer;if(e$2b(i)){if(_0x46a73d.init||_0x46a73d.initWebAssembly(),_0x46a73d.taskProcessorReady){var n=_0x46a73d.S3MBTaskProcessor.scheduleTask({buffer:i,supportCompressType:e._supportCompressType},[i]);if(!e$2b(n))return void(t._loadState=_0x12dfba.LOADED);t.contentBuffer=void 0,t._loadState=_0x12dfba.PARSING,n.then((function(i){if(i.result){for(var n=e._context,r={},o=0,a=i.matrials.material.length;o<a;o++){var s=i.matrials.material[o].material,l=s.id,u=new _0x21d1b1({});r[l]=u,u.createCommonParamter(s),u.createPBRParamter(s);for(var c=s.textureunitstates,h=0;h<c.length;h++){var d=c[h].textureunitstate,f=d.id,p=0===d.addressmode.u?q$19.REPEAT:q$19.CLAMP_TO_EDGE,_=0===d.addressmode.v?q$19.REPEAT:q$19.CLAMP_TO_EDGE;u._texMatrix=p$1d.unpack(d.texmodmatrix);var m=i.texturePackage[f];if(e$2b(m)&&m.width>0&&m.height>0&&m.imageBuffer.length>0){var g=Se$d.CreateTexture(f,n,m.width,m.height,m.nFormat,m.compressType,m.imageBuffer,!1,p,_),x=f.indexOf("PBRMaterialParam")>-1,v=u._emissiveTextureIndex===h,y=u._normalTextureIndex===h,$=u._metallicRoughnessTextureIndex===h,b=u._occlusionTextureIndex===h;x?(u._usePBRTextureBatch=!0,u.pbrParamTexture=g):v?u.emissiveTexture=g:y?u.normalTexture=g:$?u.metallicRoughnessTexture=g:b?u.occlusionTexture=g:u._textures.push(g),0===m.compressType&&(e._supportCompressType=0)}}}var T=i.groupNode.pageLods;if(e$2b(T))for(o=0,a=T.length;o<a;o++){for(var C=T[o].geodes[0],S=C.matrix,w=0;w<16;w++)S[w]=parseFloat(S[w]);if(S=p$1d.unpack(S,0),t.enableOffset){var E=p$1d.fromTranslation(new o$1p(0,0,-690));S=p$1d.multiplyTransformation(S,E,new p$1d)}for(var P=C.skeletonNames,A=[],L=0,M=P.length;L<M;L++){var R=P[L].trim();A.push(R)}var I=[],O=new i$1c;for(h=0;h<A.length;h++){var D=_0x4c228b(N=(B=i.geoPackage[A[h]]).vertexPackage,S);I.push(D)}I.length>0&&(i$1c.fromBoundingSpheres(I,O),t.oriBoundingSphere=O,I.length=0);for(L=0,M=A.length;L<M;L++){R=A[L];var B,N=(B=i.geoPackage[R]).vertexPackage,F=B.arrIndexPackage,U=F[0];if(e$2b(U)){var z={};u=r[l=U.materialCode];z[l]=u,e.enableLocalOffset||(S=p$1d.IDENTITY),_0x6322c6(e,t,N,F,O,z,S)}}t.boundingSphere=i$1c.clone(O)}t.ready=!0,t.loadState=_0x12dfba.READY,_0x553650(t,e.updateInterval/1e3)}else t._loadState=_0x12dfba.UNLOAD}))}}else t._loadState=_0x12dfba.FAILED}function _0x4c228b(e,t){for(var i=[],n=new i$1c,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1c.fromPoints(i,n),i.length=0,i$1c.transform(n,t,n),n}function _0x262914(e){return d$1m.fromCache({cull:{enabled:e.cullEnabled,face:e.cullFace},polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND})}function _0x5af9d1(e,t,i){for(var n=i.vertexAttributes,r=0,o=n.length;r<o;r++){var a=n[r];!e$2b(a.typedArray)||(a.vertexBuffer=t$Y.createVertexBuffer({context:t,typedArray:a.typedArray,usage:A$19.STATIC_DRAW}),a.vertexBuffer.vertexArrayDestroyable=!1,a.typedArray=null,delete a.typedArray)}var s=i.attrLocation,l=Object.keys(s).length,u=e.buffer;if(!e$2b(u)){var c=0===e.instanceCount?1:e.instanceCount,h=4*_0x484b3b*c;(u=t$Y.createVertexBuffer({context:t,sizeInBytes:h,usage:A$19.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,e.buffer=u}for(var d in _0x147b34(u,s,n,l),s){n[l=s[d]].name=d}return{attributes:n,attrLocation:s}}function _0x147b34(e,t,i,n){var r=n,o=0,a=S$12.getSizeInBytes(S$12.FLOAT);t.aPreHxyzLx=r++,i.push({index:t.aPreHxyzLx,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=4*a,t.aPreLyzNextHxy=r++,i.push({index:t.aPreLyzNextHxy,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=4*a,t.aNextHzLxyz=r++,i.push({index:t.aNextHzLxyz,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=4*a,t.aPreOrientation=r++,i.push({index:t.aPreOrientation,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=4*a,t.aNextOrientation=r++,i.push({index:t.aNextOrientation,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=4*a,t.aColorAndPickColor=r++,i.push({index:t.aColorAndPickColor,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=4*a,t.aPreHpr=r++,i.push({index:t.aPreHpr,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=3*a,t.aNextHpr=r++,i.push({index:t.aNextHpr,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=3*a,t.aScale=r++,i.push({index:t.aScale,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=3*a}function _0x6322c6(e,t,i,n,r,o,a){var s=e._context,l=_0x5af9d1(t,s,i),u=l.attributes,c=l.attrLocation,h=Le$s.S3MTiles+2,d=_0x262914(t),f=i.verticesCount,p=n[0];if(!e$2b(p))return;var _=ce$x.UNSIGNED_SHORT;(1===p.indexType||f>=e$2a.SIXTY_FOUR_KILOBYTES)&&s.elementIndexUint&&(_=ce$x.UNSIGNED_INT);var m=t$Y.createIndexBuffer({context:s,typedArray:p.indicesTypedArray,usage:A$19.STATIC_DRAW,indexDatatype:_});m.vertexArrayDestroyable=!1;var g=o[p.materialCode]||_0x21d1b1.Default,x=new i$_({primitiveType:W$18.TRIANGLES,boundingVolume:r,pass:h,owner:e});e._shadowType===_0x381f49.ALL||e._shadowType===_0x381f49.SELECTION?(x.castShadows=!0,x.receiveShadows=!0):(x.castShadows=!1,x.receiveShadows=!1),x.pickId="vPickColor",x.instanceCount=t.instanceCount,x.vertexArray=new c$12({context:s,attributes:u,indexBuffer:m});var v=new s$U({name:"DynamicLayerVertex",sources:[_0x46b7bc]}),y=new s$U({name:"S3ModelFP",sources:[_0x451393]}),$=e$2b(c.aTexCoord0)&&g._textures.length>0;0===e._supportCompressType&&y.defines.push("FLIP_Y"),e$2b(c.aColor)&&v.defines.push("VertexColor"),e$2b(c.aNormal)&&(v.defines.push(Y$H.HAS_NORMAL),y.defines.push(Y$H.HAS_NORMAL)),$&&(v.defines.push("TEXTURE"),y.defines.push("TEXTURE"));const b=e._frameState.lightSource;e$2b(b)&&(y.defines.push("MAX_POINT_LIGHT_COUNT "+s$I.MaxPointLightCount),y.defines.push("MAX_SPOT_LIGHT_COUNT "+s$I.MaxSpotLightCount),y.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$I.MaxDirectionLightCount),b.directionalLight.length>0&&y.defines.push(Y$H.HAS_DIR_LIGHTS),b._visibleLightList[_0x1d9df9.POINT].length>0&&y.defines.push(Y$H.HAS_POINT_LIGHTS),b._visibleLightList[_0x1d9df9.SPOT].length>0&&y.defines.push(Y$H.HAS_SPOT_LIGHTS),b.hemisphereLight.length>0&&y.defines.push(Y$H.HAS_HEMISPHERE_LIGHTS));var T=t.url;(g._usePBR||e$2b(e._PBRMaterialParams[T])&&e._PBRMaterialParams[T].roughness>0)&&(y.defines.push(Y$H.BRDF),(g.baseColorTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T].baseColorTextureIndex>-1&&e$2b(e._PBRMaterialParams[T].baseTexture))&&y.defines.push(Y$H.HAS_BASE_TEXTURE),(g.uNormalTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T].normalTextureIndex>-1&&e$2b(e._PBRMaterialParams[T].normalTexture))&&y.defines.push(Y$H.HAS_NORMAL_TEXTURE),(g.emissiveTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T].emissionTextureIndex>-1)&&y.defines.push(Y$H.HAS_EMISSIVE_TEXTURE),(g.metallicRoughnessTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T]._metallicRoughnessTextureIndex>-1)&&y.defines.push(Y$H.HAS_MetallicRoughness_TEXTURE),(g.occlusionTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T]._occlusionTextureIndex>-1)&&y.defines.push(Y$H.HAS_OCCLUSION_TEXTURE),(e$2b(e._frameState.specularEnvironmentMaps)||e$2b(e._frameState.hdrEnvMap))&&(y.defines.push(Y$H.IBL),e$2b(e._frameState.specularEnvironmentMaps)&&y.defines.push(Y$H.KtxEnvMap)),e$2b(g._alphaMode)&&g._alphaMode===_0x5f0e97.MASK&&y.defines.push(Y$H.MASK)),g.appendPBRMacroToShader(v,y),x.shaderProgram=r$13.fromCache({context:s,vertexShaderSource:v,fragmentShaderSource:y,attributeLocations:c});var C=g._diffuseColor,S=g._diffuseColor,w=g._specularColor,E=g._shininess,P=e$2b(c.aNormal),A=r.radius,L={uTexture:function(){return g._textures[0]},uInterval:function(){return t.interval},uAmbientColor:function(){return C},uDiffuseColor:function(){return S},uSpecularColor:function(){return w},uShininess:function(){return E},uPicking:function(){return e._picking},uHasNormal:function(){return P},uGeoMatrix:function(){return a},uFilterMode:function(){return e.filterMode},uMaxVisibleDistance:function(){return e.maxVisibleDistance},uFilterPixel:function(){return e.filterPixel},uRadius:function(){return A},uOffset:function(){return t.offset},uBaseColorFactor:function(){return e$2b(g._baseColor)?g._baseColor:e._PBRMaterialParams[T].baseColorFactor},uBaseColorTextureIndex:function(){return g._baseColorTextureIndex>-1?g._baseColorTextureIndex:e._PBRMaterialParams[T].baseColorTextureIndex},uMetallicFactor:function(){return e$2b(g._metallicFactor)?g._metallicFactor:e._PBRMaterialParams[T].metallic},uRoughnessFactor:function(){return e$2b(g._roughnessFactor)?g._roughnessFactor:e._PBRMaterialParams[T].roughness},uEmissiveFactor:function(){return e$2b(g._emissiveFactor)?g._emissiveFactor:e._PBRMaterialParams[T].emissionFactor},uEmissionTexture:function(){return e$2b(g.emissiveTexture)&&g._emissiveTextureIndex>-1?g.emissiveTexture:e._PBRMaterialParams[T].emissiveTexture},uEmissiveUVOffsetAndTiling:function(){var e=g._emissiveTextureMotion,t=new e$29,i=performance.now()/1e3;if(e._offsetPeriod>0){var n=i%e._offsetPeriod;t.x=n*e._offsetSpeedU,t.y=n*e._offsetSpeedV}else t.x=0,t.y=0;if(e._tilingPeriod>0){var r=i%e._tilingPeriod;t.z=1+r*e._tilingSpeedU,t.w=1+r*e._tilingSpeedV}else t.z=1,t.w=1;return t},uBaseTexture:function(){return e$2b(g.baseColorTexture)&&g._baseColorTextureIndex>-1?g.baseColorTexture:e._PBRMaterialParams[T].baseTexture},uNormalTexture:function(){return e$2b(g.normalTexture)&&g._normalTextureIndex>-1?g.normalTexture:e._PBRMaterialParams[T].normalTexture},uMetallicRoughnessTexture:function(){return e$2b(g.metallicRoughnessTexture)&&g._metallicRoughnessTextureIndex>-1?g.metallicRoughnessTexture:e._PBRMaterialParams[T].metallicRoughnessTexture},uOcclusionTexture:function(){return e$2b(g.occlusionTexture)&&g._occlusionTextureIndex>-1?g.occlusionTexture:e._PBRMaterialParams[T].occlusionTexture}};L=p$19(L,g.createPBRUniformMap()),L=p$19(L,e._frameState.lightSource.createUniformMap()),x.uniformMap=L,x.renderState=d;var M={command:x,attributes:u,indexBuffer:m};M._layer=e;var R=new _0x4db383(M),I=new _0xfa6ee5(M,g,e);M.meshUBO=R,M.materialUBO=I,x.addUniformBuffer(s.uniformState._sceneUBO),x.addUniformBuffer(s.uniformState._lightUBO),x.addUniformBuffer(R),x.addUniformBuffer(I),t.renderEntities.push(M)}_0x40158e.prototype.setSelected=function(){var e=this._index;if(e$2b(e)&&this._ownerGroup.pickEnable&&!(e<0)&&(o$1q.typeOf.number.greaterThanOrEquals("offset",e,0),!e$1U.equals(this._selColor,_0x1083e3))){this._selColor=e$1U.clone(_0x1083e3),this._color=e$1U.multiply(this._selColor,this._dynamicColor,this._color);var t=new e$1U;t.red=t$10.compressTextureCoordinates({x:this._color.red,y:this._color.green}),t.green=t$10.compressTextureCoordinates({x:this._color.blue,y:this._color.alpha}),t.blue=t$10.compressTextureCoordinates({x:this._pickColor.red,y:this._pickColor.green}),t.alpha=t$10.compressTextureCoordinates({x:this._pickColor.blue,y:this._pickColor.alpha});var i=this._ownerGroup.renderEntities;if(e$2b(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n].command,a=o.shaderProgram.vertexAttributes.aColorAndPickColor.index,s=o.vertexArray.getAttribute(a),l=e*s.strideInBytes+s.offsetInBytes,u=S$12.createTypedArray(s.componentDatatype,s.componentsPerAttribute);u[0]=t.red,u[1]=t.green,u[2]=t.blue,u[3]=t.alpha,s.vertexBuffer.copyFromArrayView(u,l)}this._isSelected=!0}}},_0x40158e.prototype.setUnSelected=function(){var e=this._index;if(e$2b(e)&&this._ownerGroup.pickEnable&&!(e<0)&&this._isSelected){this._isSelected=!1,this._selColor=e$1U.WHITE,this._color=e$1U.clone(this._dynamicColor);var t=new e$1U;t.red=t$10.compressTextureCoordinates({x:this._color.red,y:this._color.green}),t.green=t$10.compressTextureCoordinates({x:this._color.blue,y:this._color.alpha}),t.blue=t$10.compressTextureCoordinates({x:this._pickColor.red,y:this._pickColor.green}),t.alpha=t$10.compressTextureCoordinates({x:this._pickColor.blue,y:this._pickColor.alpha});var i=this._ownerGroup.renderEntities;if(e$2b(i)&&!(i.length<1))for(var n=0,r=i.length;n<r;n++){var o=i[n].command,a=o.shaderProgram.vertexAttributes.aColorAndPickColor.index,s=o.vertexArray.getAttribute(a),l=e*s.strideInBytes+s.offsetInBytes,u=S$12.createTypedArray(s.componentDatatype,s.componentsPerAttribute);u[0]=t.red,u[1]=t.green,u[2]=t.blue,u[3]=t.alpha,s.vertexBuffer.copyFromArrayView(u,l)}}},_0x40158e.prototype.update=function(e,t,i,n){var r=t.position,o=r$Z.getValueOrUndefined(r,i,_0x1000d7);if(e$2b(o)){var a=o$1p.equalsEpsilon(o,this._nextPosition,e$2a.EPSILON8)||o$1p.distance(o,this._nextPosition)<.5;this._scale=o$1p.clone(t.scale.getValue(i),this._scale);var s=o$1p.maximumComponent(t.scale.getValue(i)),l=o$1p.multiplyByScalar(this._offset,s,new o$1p),u=m$17.headingPitchRollToFixedFrame(o,new i$15,t$13.WGS84,m$17.eastNorthUpToFixedFrame,new p$1d);if(this._prePosition=o$1p.clone(this._nextPosition,this._prePosition),p$1d.multiplyByPoint(u,l,this._nextPosition),i$15.clone(this._nextHpr,this._preHpr),this._nextHpr.heading=t.heading.getValue(i),this._nextHpr.pitch=t.pitch.getValue(i),this._nextHpr.roll=t.roll.getValue(i),this._lockOrientation=t.lockOrientation,n$13.clone(this._nextOrientation,this._preOrientation),!this._lockOrientation)if(e$2b(h=a?void 0:r$Z.getValueOrUndefined(this._velocityOrientation,i,_0x16620d)))this._orientation=n$13.clone(h),n$13.clone(this._orientation,this._nextOrientation);else if(e$2b(this._orientation))n$13.clone(this._orientation,this._nextOrientation);else{var c=p$1d.getRotation(u,new p$1e);n$13.fromRotationMatrix(c,this._nextOrientation);u=m$17.headingPitchRollToFixedFrame(o,new i$15(t.startDirection,0,0),t$13.WGS84,m$17.eastNorthUpToFixedFrame,new p$1d),c=p$1d.getRotation(u,new p$1e);var h=n$13.fromRotationMatrix(c);this._preOrientation=h,this._nextOrientation=h}var d=t.color.getValue(i);this._dynamicColor=e$1U.clone(d),this._color=e$1U.multiply(this._dynamicColor,this._selColor,this._color),o$1p.clone(this._nextPosition,this._boundingSphere.center),this._boundingSphere.radius=this._ownerGroup.oriBoundingSphere.radius*s;var f=e.cullingVolume.computeVisibility(this._boundingSphere)!==Ae$u.OUTSIDE;f&&n.push(this._boundingSphere),this._ready=f}else this._ready=!1},_0x75f8b5.prototype.isDestroyed=function(){return!1},_0x75f8b5.prototype.destroy=function(){for(var e in this._group){var t=this._group[e];if(t.ready){for(var i=0,n=t.renderEntities.length;i<n;i++){var r=t.renderEntities[i].command;r.vertexArray=r.vertexArray&&!r.vertexArray.isDestroyed()&&r.vertexArray.destroy(),r.shaderProgram=r.shaderProgram&&r.shaderProgram.destroy()}t.renderEntities.length=0,e$2b(t.stateList)&&t.stateList.removeAll()}}return this._group=void 0,i$10(this)};var _0x1d23d6=(_0x4a71af=!0,function(e,t){var i=_0x4a71af?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a71af=!1,i}),_0x4ee301=_0x1d23d6(void 0,(function(){return _0x4ee301.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ee301).search("(((.+)+)+)+$")})),_0x4a71af;_0x4ee301();var _0x5e4746={UnLoad:0,Loading:1,Loaded:2,Parsing:3,Ready:4,LoadedFailed:5,ParseFailed:6},_0x49d3c9=Object.freeze(_0x5e4746),_0x2aff60=(_0xca592a=!0,function(e,t){var i=_0xca592a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xca592a=!1,i}),_0x8107d9=_0x2aff60(void 0,(function(){return _0x8107d9.toString().search("(((.+)+)+)+$").toString().constructor(_0x8107d9).search("(((.+)+)+)+$")})),_0xca592a;function _0x4c199e(e){this.url=e,this._isGlTF=!0,this.model=void 0,this.state=_0x49d3c9.UnLoad,this.ready=!1}_0x8107d9(),_0x4c199e.prototype.isDestroyed=function(){return!1},_0x4c199e.prototype.destroy=function(){return e$2b(this.model)&&!this.model.isDestroyed()&&this.model.destroy(),i$10(this)};var _0x54536e=(_0x4e96b0=!0,function(e,t){var i=_0x4e96b0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e96b0=!1,i}),_0xc9b12c=_0x54536e(void 0,(function(){return _0xc9b12c.toString().search("(((.+)+)+)+$").toString().constructor(_0xc9b12c).search("(((.+)+)+)+$")})),_0x4e96b0;function _0x5bf1b0(){}_0xc9b12c(),_0x5bf1b0.load=function(e,t){if(e$2b(t.model)||(t.model=F$C.fromGltf({url:t.url,incrementallyLoadTextures:!1})),t.model.update(e._frameState),t.model.ready){t.state=_0x49d3c9.Ready,t.ready=!0;for(var i=e._skeletonTileMap.get(t.url),n=0,r=i.length;n<r;n++)i[n].dirty=!0}},_0x5bf1b0.parse=function(e,t){};var _0x520666=(_0x3966d9=!0,function(e,t){var i=_0x3966d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3966d9=!1,i}),_0x35f067=_0x520666(void 0,(function(){return _0x35f067.toString().search("(((.+)+)+)+$").toString().constructor(_0x35f067).search("(((.+)+)+)+$")})),_0x3966d9;function _0x588b14(e,t,i,n){this.url=t,this.id=n,this.index=-1,this.type=bt$5.INSTANCED_OBJECT,this.position=o$1p.clone(i.position),this.geoPosition=a$18.fromCartesian(this.position),this.offset=u$_(i.offset,new o$1p(0,0,0)),this.color=u$_(i.color,new e$1U),this.scale=u$_(i.scale,new o$1p(1,1,1));var r=u$_(i.hpr,new i$15);this.hpr=r,this.quaternion=n$13.fromHeadingPitchRoll(r),this.feature=u$_(i.feature,u$_.EMPTY_OBJECT),this.isSelected=!1,this.selectedColor=new e$1U,this.preColor=e$1U.clone(this.color),this.tile=void 0,this.instanceInfo=void 0,this.layer=void 0;var o={id:n,primitive:this},a=e.createPickId(o).color,s=new e$1U;s.x=e$1U.floatToByte(a.red),s.y=e$1U.floatToByte(a.green),s.z=e$1U.floatToByte(a.blue),s.w=e$1U.floatToByte(a.alpha),this.pickColor=s}_0x35f067(),_0x588b14.prototype.setSelected=function(){if(e$2b(this.layer)&&this.layer.pickEnable){var e=this.index;if(e$2b(e)&&!(e<0)&&!e$1U.equals(this.color,this.selectedColor)){this.color=e$1U.clone(this.selectedColor,new e$1U);var t=e$1U.multiply(this.color,this.preColor,new e$1U),i=this.instanceInfo;if(e$2b(i)&&e$2b(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aColor2];if(e$2b(r)){var o=e*r.strideInBytes+r.offsetInBytes,a=S$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=t.red,a[1]=t.green,a[2]=t.blue,a[3]=t.alpha,i.instanceBuffer.copyFromArrayView(a,o),this.isSelected=!0}}}}},_0x588b14.prototype.setUnSelected=function(){var e=this.index;if(e$2b(e)&&!(e<0)&&this.isSelected){this.isSelected=!1,this.color=e$1U.clone(this.preColor,this.color);var t=this.instanceInfo;if(e$2b(t)&&e$2b(t.instanceBuffer)){var i=t.attributeLocation,n=t.attributes[i.aColor2];if(e$2b(n)){var r=e*n.strideInBytes+n.offsetInBytes,o=S$12.createTypedArray(n.componentDatatype,n.componentsPerAttribute);o[0]=this.preColor.red,o[1]=this.preColor.green,o[2]=this.preColor.blue,o[3]=this.preColor.alpha,t.instanceBuffer.copyFromArrayView(o,r)}}}},_0x588b14.prototype.updateOffsetPosition=function(e){if(e$2b(e)){var t=this.index;this.offset=o$1p.clone(e,this.offset);var i=this.instanceInfo;if(e$2b(i)&&e$2b(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aOffsetPosition];if(e$2b(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.offset.x,a[1]=this.offset.y,a[2]=this.offset.z,i.instanceBuffer.copyFromArrayView(a,o)}}}},_0x588b14.prototype.updatePosition=function(e){if(e$2b(e)){var t=this.index;if(this.position=o$1p.clone(e,this.position),this.geoPosition=a$18.fromCartesian(this.position),e$2b(this.tile)&&e$2b(this.tile.inverseTransform)){this.offset=p$1d.multiplyByPoint(this.tile.inverseTransform,this.position,this.offset);var i=this.instanceInfo;if(e$2b(i)&&e$2b(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aOffsetPosition];if(e$2b(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.offset.x,a[1]=this.offset.y,a[2]=this.offset.z,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x588b14.prototype.updateRotation=function(e){if(e$2b(e)){var t=this.index;if(!i$15.equals(this.hpr,e)){this.hpr=i$15.clone(e,this.hpr),this.quaternion=n$13.fromHeadingPitchRoll(e,this.quaternion);var i=this.instanceInfo;if(e$2b(i)&&e$2b(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aQuaternion];if(e$2b(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.quaternion.x,a[1]=this.quaternion.y,a[2]=this.quaternion.z,a[3]=this.quaternion.w,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x588b14.prototype.updateColor=function(e){if(e$2b(e)){var t=this.index;if(!e$1U.equals(this.color,e)){this.color=e$1U.clone(e,this.color),this.preColor=e$1U.clone(e,this.preColor);var i=this.instanceInfo;if(e$2b(i)&&e$2b(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aColor2];if(e$2b(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.color.red,a[1]=this.color.green,a[2]=this.color.blue,a[3]=this.color.alpha,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x588b14.prototype.updateScale=function(e){if(e$2b(e)){var t=this.index;if(!o$1p.equals(this.scale,e)){o$1p.clone(e,this.scale);var i=this.instanceInfo;if(e$2b(i)&&e$2b(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aScale];if(e$2b(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=e.x,a[1]=e.y,a[2]=e.z,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x588b14.prototype.updateModelMatrix=function(e){var t=p$1d.getScale(e,new o$1p);this.updateScale(t);var i=p$1d.setScale(e,new o$1p(1,1,1),new p$1d),n=p$1d.getRotation(i,new p$1e);n$13.fromRotationMatrix(n,this.quaternion);var r=i$15.fromQuaternion(this.quaternion,new i$15);this.updateRotation(r);var o=p$1d.getTranslation(e,new o$1p);o$1p.add(this.offset,o,this.offset),this.updateOffsetPosition(this.offset)},_0x588b14.prototype.write=function(e,t){var i=this.offset,n=this.quaternion,r=this.scale,o=this.color,a=this.pickColor,s=0;e[t+s++]=i.x,e[t+s++]=i.y,e[t+s++]=i.z,e[t+s++]=n.x,e[t+s++]=n.y,e[t+s++]=n.z,e[t+s++]=n.w,e[t+s++]=r.x,e[t+s++]=r.y,e[t+s++]=r.z,e[t+s++]=o.red,e[t+s++]=o.green,e[t+s++]=o.blue,e[t+s++]=o.alpha,e[t+s++]=a.x,e[t+s++]=a.y,e[t+s++]=a.z,e[t+s++]=a.w},_0x588b14.prototype.isDestroyed=function(){return!1},_0x588b14.prototype.destroy=function(){i$10(this)};var _0x3c59bb=(_0x55dd83=!0,function(e,t){var i=_0x55dd83?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55dd83=!1,i}),_0x39c890=_0x3c59bb(void 0,(function(){return _0x39c890.toString().search("(((.+)+)+)+$").toString().constructor(_0x39c890).search("(((.+)+)+)+$")})),_0x55dd83;function _0x377331(e,t){this.url=e,this.stride=t,this.instances=[],this.instanceBuffer=void 0,this.attributes=void 0,this.attributeLocation=void 0,this.inverseTransform=void 0,this.dirty=!1}function _0x16517a(e,t){for(var i=e.length,n=new Float32Array(i*t),r=0;r<i;r++){var o=e[r];o.index=r;var a=r*t;o.write(n,a)}return n}function _0x5450ac(e,t,i){var n=_0x16517a(t,i),r=t$Y.createVertexBuffer({context:e,typedArray:n,usage:A$19.STATIC_DRAW});return r.vertexArrayDestroyable=!1,r}function _0x1e5b7a(e,t){var i=S$12.getSizeInBytes(S$12.FLOAT),n=0,r=[],o=0,a={};return a.aOffsetPosition=o++,r.push({name:"aOffsetPosition",index:a.aOffsetPosition,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:n,strideInBytes:i*t,instanceDivisor:1}),n+=3,a.aQuaternion=o++,r.push({name:"aQuaternion",index:a.aQuaternion,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,a.aScale=o++,r.push({name:"aScale",index:a.aScale,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=3,a.aColor2=o++,r.push({name:"aColor2",index:a.aColor2,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,a.aPickColor=o++,r.push({name:"aPickColor",index:a.aPickColor,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,{attributes:r,attributeLocation:a}}_0x39c890(),_0x377331.prototype.getHeightRange=function(){for(var e=Number.MAX_VALUE,t=Number.MIN_VALUE,i=this.instances.length,n=0;n<i;n++){var r=this.instances[n];e=Math.min(e,r.geoPosition.height),t=Math.max(t,r.geoPosition.height)}return{minHeight:e,maxHeight:t}},_0x377331.prototype.update=function(e){if(e$2b(this.instanceBuffer)&&(this.instanceBuffer=this.instanceBuffer.destroy()),this.instances.length>0)if(this.instanceBuffer=_0x5450ac(e,this.instances,this.stride),e$2b(this.attributes))for(var t=0,i=this.attributes.length;t<i;t++){this.attributes[t].vertexBuffer=this.instanceBuffer}else{var n=_0x1e5b7a(this.instanceBuffer,this.stride);this.attributes=n.attributes,this.attributeLocation=n.attributeLocation}this.dirty=!1},_0x377331.prototype.isDestroyed=function(){return!1},_0x377331.prototype.destroy=function(){this.instanceBuffer=this.instanceBuffer&&!this.instanceBuffer.isDestroyed()&&this.instanceBuffer.destroy(),this.instances=null,this.attributes=null,this.attributeLocation=null,this.inverseTransform=null,i$10(this)};var _0x7beab5=(_0x4a257c=!0,function(e,t){var i=_0x4a257c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a257c=!1,i}),_0x162e6f=_0x7beab5(void 0,(function(){return _0x162e6f.toString().search("(((.+)+)+)+$").toString().constructor(_0x162e6f).search("(((.+)+)+)+$")})),_0x4a257c;_0x162e6f();var _0x1525ff="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\nattribute vec4 aTexCoord0;\n#ifdef VertexColor\n #ifdef WEBGPU\n attribute uvec4 aColor;\n #else\n attribute vec4 aColor;\n #endif\n#endif\nattribute vec3 aOffsetPosition;\nattribute vec4 aQuaternion;\nattribute vec3 aScale;\nattribute vec4 aColor2;\nattribute vec4 aPickColor;\n#ifdef LocalTransform\nattribute vec4 aLocalTranslation;\nattribute vec4 aLocalQuaternion;\n#endif\nuniform mat4 uGeoMat;\n\n#ifdef COMPRESS_VERTEX\n uniform float gltf_u_dec_position_normConstant;\n uniform vec3 gltf_u_dec_position_min;\n#endif\n#ifdef COMPRESS_NORMAL\n uniform float gltf_u_dec_normal_rangeConstant;\n#endif\n#ifdef COMPRESS_TEXCOORD\n uniform float gltf_u_dec_texcoord_0_normConstant;\n uniform vec2 gltf_u_dec_texcoord_0_min;\n#endif\n\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec3 vNormalEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying mat4 vModelMatrix;\nmat4 transfromFromQuaternion(vec4 q, vec4 translation)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, translation.x, translation.y, translation.z, 1.0);\n}\n\n#ifdef COMPRESS_VERTEX\n vec3 gltf_decoded_POSITION(vec4 position) {\n return gltf_u_dec_position_min + position.xyz * gltf_u_dec_position_normConstant;\n }\n#endif\n#ifdef COMPRESS_TEXCOORD\n vec2 gltf_decoded_TEXCOORD_0(vec2 texcoord){\n return gltf_u_dec_texcoord_0_min + texcoord * gltf_u_dec_texcoord_0_normConstant;\n }\n#endif\n\nvoid main()\n{\n vec4 vertexPos = vec4(aPosition.xyz, 1.0);\n #ifdef COMPRESS_VERTEX\n vec3 compressPosition = gltf_decoded_POSITION(aPosition);\n vertexPos = vec4(compressPosition.xyz, 1.0);\n #endif\n \n vec4 positionMC = uGeoMat * vertexPos;\n vTexCoord = aTexCoord0.xy;\n #ifdef COMPRESS_TEXCOORD\n vTexCoord = gltf_decoded_TEXCOORD_0(aTexCoord0.xy);\n #endif\n mat3 rotationMat = mat3(transfromFromQuaternion(aQuaternion, vec4(0.0)));\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMat[0], 0.0);\n worldMatrix[1] = vec4(rotationMat[1], 0.0);\n worldMatrix[2] = vec4(rotationMat[2], 0.0);\n worldMatrix[3] = vec4(aOffsetPosition, 1.0);\n mat4 scaleMatrix;\n vec3 scale = aScale.xyz;\n scaleMatrix[0] = vec4(scale.x,0,0,0.0);\n scaleMatrix[1] = vec4(0,scale.y,0,0.0);\n scaleMatrix[2] = vec4(0,0,scale.z,0.0);\n scaleMatrix[3] = vec4(0,0,0,1.0);\n mat4 modelMatrix = worldMatrix;\n#ifdef LocalTransform\n mat4 localTransformMat = transfromFromQuaternion(aLocalQuaternion, aLocalTranslation);\n modelMatrix *= localTransformMat;\n#endif\n modelMatrix *= scaleMatrix;\n mat3 rotationMatrix = mat3(modelMatrix);\n vModelMatrix = modelMatrix * uGeoMat;\n positionMC = modelMatrix * vec4(positionMC.xyz, 1.0);\n positionMC.w = 1.0;\n gl_Position = czm_modelViewProjection * positionMC;\n vPositionMC.xyz = positionMC.xyz;\n vPositionMC.w = 0.0;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = aColor / 255.0;\n #endif\n#endif\n vColor = vertexColor * aColor2;\n vPickColor = aPickColor / 255.0;\n#ifdef HAS_NORMAL\n vec3 vertexNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n vertexNormal = czm_octDecode(aNormal.xy, gltf_u_dec_normal_rangeConstant).zxy;\n #endif\n if(length(vertexNormal) > 0.8)\n {\n vec3 normal = rotationMatrix * vertexNormal;\n mat4 realModelViewMatrix4 = czm_modelView * vModelMatrix;\n realModelViewMatrix4 = czm_inverseMatrix(realModelViewMatrix4);\n mat3 realModelViewMatrix3 = mat3(realModelViewMatrix4);\n realModelViewMatrix3 = czm_transpose(realModelViewMatrix3);\n vNormalEC = realModelViewMatrix3 * vertexNormal;\n vPositionMC.w = 1.0;\n vPositionEC = (czm_modelView * vPositionMC).xyz;\n }\n#endif\n}\n",_0x28fee2=(_0x4e57f2=!0,function(e,t){var i=_0x4e57f2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e57f2=!1,i}),_0x777d28=_0x28fee2(void 0,(function(){return _0x777d28.toString().search("(((.+)+)+)+$").toString().constructor(_0x777d28).search("(((.+)+)+)+$")})),_0x4e57f2;function _0x4f9ecb(e){this.ready=!1,this.state=_0x49d3c9.UnLoad,this.url=e,this.subSkeletons=[]}function _0xcd441e(e,t){this.attributes=void 0,this.attributeLocation=void 0,this.indexBuffer=void 0,this.sp=void 0,this.colorCommand=void 0,this.boundingVolume=void 0,this._materialUBO=new _0xfa6ee5(this,t,e)}function _0x339419(e,t,i){var n=ce$x.UNSIGNED_SHORT;(1===t.indexType||i>=e$2a.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(n=ce$x.UNSIGNED_INT);var r=t$Y.createIndexBuffer({context:e,typedArray:t.indicesTypedArray,usage:A$19.STATIC_DRAW,indexDatatype:n});return r.vertexArrayDestroyable=!1,r}function _0x4bfa26(e,t){for(var i=t.vertexAttributes,n=0,r=i.length;n<r;n++){var o=i[n];!e$2b(o.typedArray)||(o.vertexBuffer=t$Y.createVertexBuffer({context:e,typedArray:o.typedArray,usage:A$19.STATIC_DRAW}),o.vertexBuffer.vertexArrayDestroyable=!1,o.typedArray=null,delete o.typedArray)}return i}function _0x3e5f3f(e,t,i){var n=t.hasTexture,r=t.hasNormal,o=t.hasVertexColor,a=t.flipY,s=t.attributeLocation,l=new s$U({name:"S3MInstanceCollectionVertex",sources:[_0x1525ff]}),u=new s$U({name:"S3ModelFP",sources:[_0x451393]});a&&u.defines.push("FLIP_Y"),n&&u.defines.push("TEXTURE"),r&&(l.defines.push(Y$H.HAS_NORMAL),u.defines.push(Y$H.HAS_NORMAL)),o&&l.defines.push("VertexColor");const c=e._frameState.lightSource;e$2b(c)&&(u.defines.push("MAX_POINT_LIGHT_COUNT "+s$I.MaxPointLightCount),u.defines.push("MAX_SPOT_LIGHT_COUNT "+s$I.MaxSpotLightCount),u.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$I.MaxDirectionLightCount),c.directionalLight.length>0&&u.defines.push(Y$H.HAS_DIR_LIGHTS),c._visibleLightList[_0x1d9df9.POINT].length>0&&u.defines.push(Y$H.HAS_POINT_LIGHTS),c._visibleLightList[_0x1d9df9.SPOT].length>0&&u.defines.push(Y$H.HAS_SPOT_LIGHTS),c.hemisphereLight.length>0&&u.defines.push(Y$H.HAS_HEMISPHERE_LIGHTS));return i._usePBR&&(u.defines.push(Y$H.BRDF),i.baseColorTexture&&u.defines.push(Y$H.HAS_BASE_TEXTURE),i.uNormalTexture&&u.defines.push(Y$H.HAS_NORMAL_TEXTURE),i.emissiveTexture&&u.defines.push(Y$H.HAS_EMISSIVE_TEXTURE),i.metallicRoughnessTexture&&u.defines.push(Y$H.HAS_MetallicRoughness_TEXTURE),i.occlusionTexture&&u.defines.push(Y$H.HAS_OCCLUSION_TEXTURE),(e$2b(e._frameState.specularEnvironmentMaps)||e$2b(e._frameState.hdrEnvMap))&&(u.defines.push(Y$H.IBL),e$2b(e._frameState.specularEnvironmentMaps)&&u.defines.push(Y$H.KtxEnvMap)),e$2b(i._alphaMode)&&i._alphaMode===_0x5f0e97.MASK&&u.defines.push(Y$H.MASK)),r$13.fromCache({context:e._context,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:s})}function _0x7d70b7(e,t,i,n){var r=new i$_({primitiveType:W$18.TRIANGLES,boundingVolume:n,modelMatrix:t,pass:i._bTransparentSorting?Le$s.TRANSLUCENT:Le$s.OPAQUE,cull:!0});e._shadowType===_0x381f49.ALL||e._shadowType===_0x381f49.SELECTION?(r.castShadows=!0,r.receiveShadows=!0):(r.castShadows=!1,r.receiveShadows=!1),r.pickId="vPickColor";var o=i._textures[0],a={uTexture:function(){return o},uGeoMat:function(){return t}};return i._usePBR&&(a.uBaseTexture=function(){return e$2b(i._baseColorTextureIndex)&&i._baseColorTextureIndex>-1?i.baseColorTexture:e._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture},a.uNormalTexture=function(){return e$2b(i._normalTextureIndex)&&i._normalTextureIndex>-1?i.normalTexture?i.normalTexture:i._textures[i._normalTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.normalTexture},a.uEmissionTexture=function(){if(e$2b(i.emissiveTexture))return i.emissiveTexture;var t=i._emissiveTextureIndex;return t>-1&&e$2b(i._textures[t])?i._textures[t]:e._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},a.uMetallicRoughnessTexture=function(){return e$2b(i._metallicRoughnessTextureIndex)&&i._metallicRoughnessTextureIndex>-1?e$2b(i.metallicRoughnessTexture)?i.metallicRoughnessTexture:i._textures[i._metallicRoughnessTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},a.uOcclusionTexture=function(){return e$2b(i._occlusionTextureIndex)&&i._occlusionTextureIndex>-1?i.occlusionTexture?i.occlusionTexture:e$2b(i._textures[i._occlusionTextureIndex])?i._textures[i._occlusionTextureIndex]:e._context.defaultTexture:e._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},i._usePBRTextureBatch&&(a.uPBRTexture=function(){return i.pbrParamTexture})),r.uniformMap=a,r.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),r}_0x777d28(),_0xcd441e.prototype.isDestroyed=function(){return!1},_0xcd441e.prototype.destroy=function(){this.sp=this.sp&&!this.sp.isDestroyed()&&this.sp.destroy(),this.indexBuffer=this.indexBuffer&&!this.indexBuffer.isDestroyed()&&this.indexBuffer.destroy();for(var e=0,t=this.attributes.length;e<t;e++)this.attributes[e].vertexBuffer.destroy();return this.attributes.length=0,this.colorCommand=void 0,i$10(this)},_0x4f9ecb.prototype.updateShaderProgram=function(e,t){e.context;for(let e=0,i=this.subSkeletons.length;e<i;e++){const i=this.subSkeletons[e];!e$2b(i.colorCommand)||!e$2b(i.sp)||!i.material._usePBR||(i.sp=i.sp.destroy(),i.sp=_0x3e5f3f(t,{hasTexture:e$2b(i.attributeLocation.aTexCoord0)&&i.material._textures.length>0,hasNormal:e$2b(i.attributeLocation.aNormal),hasVertexColor:e$2b(i.attributeLocation.aColor),flipY:0===t._supportCompressType,attributeLocation:i.attributeLocation},i.material),i.colorCommand.shaderProgram=i.sp)}},_0x4f9ecb.prototype.createSubSkeleton=function(e,t,i,n,r,o){var a=e._context,s=new _0xcd441e(e,i,n);s._materialUBO.update(a),s.attributes=_0x4bfa26(a,n),s.indexBuffer=_0x339419(a,r,n.verticesCount),s.attributeLocation=n.attrLocation,s.material=i,s.sp=_0x3e5f3f(e,{hasTexture:e$2b(s.attributeLocation.aTexCoord0)&&i._textures.length>0,hasNormal:e$2b(s.attributeLocation.aNormal),hasVertexColor:e$2b(s.attributeLocation.aColor),flipY:0===e._supportCompressType,attributeLocation:s.attributeLocation},i),s.colorCommand=_0x7d70b7(e,t,i,o);const l=a.uniformState;s.colorCommand.addUniformBuffer(l._sceneUBO),s.colorCommand.addUniformBuffer(l._lightUBO),s.colorCommand.addUniformBuffer(s._materialUBO),s.boundingVolume=i$1c.clone(o),this.subSkeletons.push(s)},_0x4f9ecb.prototype.isDestroyed=function(){return!1},_0x4f9ecb.prototype.destroy=function(){for(var e=0,t=this.subSkeletons.length;e<t;e++)this.subSkeletons[e].destroy();i$10(this)};var _0x35240d=(_0x587a79=!0,function(e,t){var i=_0x587a79?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x587a79=!1,i}),_0x563756=_0x35240d(void 0,(function(){return _0x563756.toString().search("(((.+)+)+)+$").toString().constructor(_0x563756).search("(((.+)+)+)+$")})),_0x587a79;function _0xbc2054(e,t,i){this.tileX=e,this.tileY=t,this.level=i,this.rectangle=void 0,this.boundingVolume=void 0,this.transform=void 0,this.inverseTransform=void 0,this.tileBoundingRegion=void 0,this.distanceToCamera=0,this.instanceGroup=new e$1N,this.skeletonGroup=new e$1N,this.commandGroup=new e$1N,this.dirty=!1}function _0x354f2e(e,t){var i={},n=0;for(var r in e)e.hasOwnProperty(r)&&(i[r]=e[r],++n);for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]+n);return i}function _0x4d5f0c(e,t){for(var i=e.length,n=e.slice(0),r=0,o=t.length;r<o;r++)t[r].index=i+r,n.push(t[r]);return n}function _0x15dac0(e,t,i,n){var r=n.instances[0],o=o$1p.maximumComponent(r.scale);e$2b(l=e.commandGroup.get(n.url))||(l=new Array(t.subSkeletons.length),e.commandGroup.set(n.url,l));for(var a=0,s=t.subSkeletons.length;a<s;a++){var l,u=t.subSkeletons[a],c=(l=e.commandGroup.get(n.url))[a];e$2b(c)||((c=i$_.shallowClone(u.colorCommand)).modelMatrix=p$1d.clone(u.colorCommand.modelMatrix),c._relativeModelMatrix=p$1d.clone(u.colorCommand._relativeModelMatrix),l[a]=c),e$2b(c.vertexArray)&&!c.vertexArray.isDestroyed()&&c.vertexArray.destroy();var h=_0x4d5f0c(u.attributes,n.attributes),d=_0x354f2e(u.attributeLocation,n.attributeLocation);for(var f in d){h[d[f]].name=f}c.vertexArray=new c$12({context:i,attributes:h,indexBuffer:u.indexBuffer}),c.shaderProgram=r$13.fromCache({context:i,shaderProgram:u.sp,vertexShaderSource:u.sp.vertexShaderSource,fragmentShaderSource:u.sp.fragmentShaderSource,attributeLocations:d}),p$1d.clone(e.transform,c.modelMatrix),c.instanceCount=n.instances.length,c.radius=u.boundingVolume.radius*o,c.boundingVolume=e.boundingVolume}}function _0x2b221f(e,t,i,n){var r=e.layer,o=t.model._nodeCommands,a=o.length,s=t.model._dequantizeInShader,l=n.instances[0],u=o$1p.maximumComponent(l.scale),c=e.commandGroup.get(n.url);e$2b(c)||(c=new Array(a),e.commandGroup.set(n.url,c));for(var h=0;h<a;++h){var d=o[h],f=i$_.shallowClone(d.command);c[h]=f,f._isGltfCommand=!0,f.castShadows=!1,f.receiveShadows=!1,f.pickId="vPickColor",f.instanceCount=n.instances.length,f.pass=Le$s.OPAQUE,f.cull=!1;var p=_0x4435a6(f.shaderProgram.vertexAttributes);i.webgpu&&_0x1aa413(f.vertexArray),p=_0x354f2e(p,n.attributeLocation);var _=f.vertexArray._inner,m=_._attributes,g=_.indexBuffer;m=_0x4d5f0c(m,n.attributes),f.vertexArray=new c$12({context:i,attributes:m,indexBuffer:g});var x=new s$U({name:"InstanceTilesLayerVS",sources:[_0x1525ff]}),v=new s$U({name:"S3ModelFP",sources:[_0x451393]});v.defines.push("BRDF"),e$2b(r._frameState.specularEnvironmentMaps)&&v.defines.push(Y$H.IBL);const t=r._frameState.lightSource;if(e$2b(t))v.defines.push("MAX_POINT_LIGHT_COUNT "+s$I.MaxPointLightCount),v.defines.push("MAX_SPOT_LIGHT_COUNT "+s$I.MaxSpotLightCount),v.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$I.MaxDirectionLightCount),t.directionalLight.length>0&&v.defines.push(Y$H.HAS_DIR_LIGHTS),t._visibleLightList[_0x1d9df9.POINT].length>0&&v.defines.push(Y$H.HAS_POINT_LIGHTS),t._visibleLightList[_0x1d9df9.SPOT].length>0&&v.defines.push(Y$H.HAS_SPOT_LIGHTS),t.hemisphereLight.length>0&&v.defines.push(Y$H.HAS_HEMISPHERE_LIGHTS);e$2b(p.aColor)&&x.defines.push("VertexColor"),e$2b(p.aNormal)&&(x.defines.push(Y$H.HAS_NORMAL),v.defines.push(Y$H.HAS_NORMAL)),e$2b(p.aTexCoord0)&&(e$2b(f.uniformMap.u_baseColorTexture)||e$2b(f.uniformMap.u_diffuse))&&(x.defines.push("TEXTURE"),v.defines.push("TEXTURE")),s&&(x.defines.push(Y$H.COMPRESS_VERTEX),e$2b(p.aTexCoord0)&&x.defines.push(Y$H.COMPRESS_TEXCOORD),e$2b(p.aNormal)&&x.defines.push(Y$H.COMPRESS_NORMAL)),e$2b(f.uniformMap.u_metallicRoughnessTexture)&&v.defines.push("HAS_MetallicRoughness_TEXTURE"),e$2b(f.uniformMap.u_normalTexture)&&v.defines.push("HAS_NORMAL_TEXTURE"),e$2b(f.uniformMap.u_emissiveTexture)&&v.defines.push("HAS_EMISSIVE_TEXTURE"),e$2b(f.uniformMap.u_occlusionTexture)&&v.defines.push("HAS_OCCLUSION_TEXTURE"),f.shaderProgram=r$13.fromCache({context:i,vertexShaderSource:x,fragmentShaderSource:v,attributeLocations:p});var y=f.uniformMap;const a=new _0x21d1b1;a._usePBR=!0,a._baseColor=new e$29(1,1,1,1),a._emissiveFactor=new o$1p,a._roughnessFactor=1,a._metallicFactor=0,e$2b(y.u_baseColorFactor)&&(a._baseColor=y.u_baseColorFactor()),e$2b(y.u_emissiveFactor)&&(a._emissiveFactor=y.u_emissiveFactor()),e$2b(y.u_roughnessFactor)&&(a._roughnessFactor=y.u_roughnessFactor()),e$2b(y.u_metallicFactor)&&(a._metallicFactor=y.u_metallicFactor());const l=new _0xfa6ee5({},a,r),b=i.uniformState;l.update(i),f.addUniformBuffer(b._sceneUBO),f.addUniformBuffer(b._lightUBO),f.addUniformBuffer(l);var $={uGeoMat:function(e){return function(){return c[e].localMatrix}}(h)};e$2b(y.u_baseColorTexture)?$.uTexture=y.u_baseColorTexture:e$2b(y.u_diffuse)&&($.uTexture=y.u_diffuse),e$2b(y.u_metallicRoughnessTexture)&&($.uMetallicRoughnessTexture=y.u_metallicRoughnessTexture),e$2b(y.u_normalTexture)&&($.uNormalTexture=y.u_normalTexture),e$2b(y.u_emissiveTexture)&&($.uEmissionTexture=y.u_emissiveTexture),e$2b(y.u_occlusionTexture)&&($.uOcclusionTexture=y.u_occlusionTexture),$=p$19($,y),f.uniformMap=$,f.localMatrix=p$1d.IDENTITY.clone(),f._transformMatrix=p$1d.IDENTITY.clone(),f.modelMatrix=p$1d.clone(p$1d.IDENTITY,new p$1d),f.radius=f.boundingVolume.radius*u,f.boundingVolume=y$Z.clone(e.boundingVolume,new y$Z)}}function _0x4435a6(e){var t={};return e$2b(e.a_position)&&(t.aPosition=e.a_position.index),e$2b(e.a_normal)&&(t.aNormal=e.a_normal.index),e$2b(e.a_vertexColor)&&(t.aColor=e.a_vertexColor.index),e$2b(e.a_texcoord_0)&&(t.aTexCoord0=e.a_texcoord_0.index),e$2b(e.a_texcoord0)&&(t.aTexCoord0=e.a_texcoord0.index),t}function _0x1aa413(e){var t=e._inner._babylonVertexBuffers;e$2b(t.a_position)&&(t.aPosition=t.a_position),e$2b(t.a_normal)&&(t.aNormal=t.a_normal),e$2b(t.a_vertexColor)&&(t.aColor=t.a_vertexColor),e$2b(t.a_texcoord_0)&&(t.aTexCoord0=t.a_texcoord_0),e$2b(t.a_texcoord1)&&(t.aTexCoord1=t.a_texcoord1);for(var i=0;i<e._inner._attributes.length;i++){var n=e._inner._attributes[i].name;"a_position"==n&&(e._inner._attributes[i].name="aPosition"),"a_normal"==n&&(e._inner._attributes[i].name="aNormal"),"a_vertexColor"==n&&(e._inner._attributes[i].name="aColor"),"a_texcoord_0"==n&&(e._inner._attributes[i].name="aTexCoord0"),"a_texcoord1"==n&&(e._inner._attributes[i].name="aTexCoord1")}}_0x563756(),_0xbc2054.prototype.updateDrawCommand=function(e,t){var i=this.skeletonGroup.get(t.url);e$2b(i)&&i.ready&&(!e$2b(t.instances[0])||(i._isGlTF?(i.transformed=!0,_0x2b221f(this,i,e,t),i.model.activeAnimations.addAll({loop:_0x157d80.REPEAT})):_0x15dac0(this,i,e,t)))},new e$29(1,1,1,1),_0xbc2054.prototype.updateBoundingVolume=function(e,t){this.boundingVolume=y$Z.fromRectangle(this.rectangle,e,t)},_0xbc2054.prototype.remove=function(e){var t=this.instanceGroup.get(e);e$2b(t)&&(t.destroy(),this.instanceGroup.remove(e)),this.skeletonGroup.remove(e);var i=this.commandGroup.get(e);if(e$2b(i)){for(var n=0,r=i.length;n<r;n++){var o=i[n];o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy()}this.commandGroup.remove(e)}},_0xbc2054.prototype.updateShaderProgram=function(){for(var e in this.instanceGroup._hash)if(this.instanceGroup._hash.hasOwnProperty(e)){var t=this.instanceGroup.get(e),i=this.skeletonGroup.get(t.url),n=this.commandGroup.get(t.url);if(!e$2b(n))continue;for(var r=0,o=i.subSkeletons.length;r<o;r++){var a=i.subSkeletons[r];if(e$2b(a.material)&&a.material._usePBR)n[r].shaderProgram=a.sp}}},_0xbc2054.prototype.update=function(e){this.dirty=!1;var t=Number.MAX_VALUE,i=Number.MIN_VALUE;for(var n in this.instanceGroup._hash)if(this.instanceGroup._hash.hasOwnProperty(n)){var r=this.instanceGroup.get(n);r.dirty&&r.update(e);var o=r.getHeightRange();t=Math.min(t,o.minHeight),i=Math.max(i,o.maxHeight),this.updateDrawCommand(e,r)}this.updateBoundingVolume(t,i)},_0xbc2054.prototype.isDestroyed=function(){return!1},_0xbc2054.prototype.destroy=function(){var e,t,i,n;for(e=0,t=this.instanceGroup.length;e<t;e++){this.instanceGroup.values[e].destroy()}for(this.instanceGroup.removeAll(),this.skeletonGroup.removeAll(),e=0,t=this.commandGroup.length;e<t;e++){var r=this.commandGroup.values[e];for(i=0,n=r.length;i<n;i++){var o=r[i];o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy()}}this.commandGroup.removeAll(),i$10(this)};var _0x156053=(_0x1a3c38=!0,function(e,t){var i=_0x1a3c38?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a3c38=!1,i}),_0x12f717=_0x156053(void 0,(function(){return _0x12f717.toString().search("(((.+)+)+)+$").toString().constructor(_0x12f717).search("(((.+)+)+)+$")})),_0x1a3c38;function _0x1c7703(){}function _0x4f873a(e,t){for(var i=[],n=new i$1c,r=new o$1p,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1c.fromPoints(i,n),i.length=0,i$1c.transform(n,t,n),n}_0x12f717(),_0x1c7703.load=function(e,t){var i=t$11.fetchArrayBuffer({url:t.url});e$2b(i)||(t.state=_0x49d3c9.UnLoad),t.state=_0x49d3c9.Loading,i.then((function(e){t.state=_0x49d3c9.Loaded,t.skeletonBuffer=e}),(function(e){t.state=_0x49d3c9.Failed}))},_0x1c7703.parse=function(e,t){if(_0x46a73d.init||_0x46a73d.initWebAssembly(),_0x46a73d.taskProcessorReady){var i=_0x46a73d.S3MBTaskProcessor.scheduleTask({buffer:t.skeletonBuffer,supportCompressType:e._supportCompressType},[t.skeletonBuffer]);if(!e$2b(i))return void(t.state=_0x49d3c9.Loaded);t.skeletonBuffer=void 0,t.state=_0x49d3c9.Parsing,i.then((function(i){if(i.result){for(var n=e._context,r={},o=0,a=i.matrials.material.length;o<a;o++){var s=i.matrials.material[o].material,l=s.id,u=new _0x21d1b1({});r[l]=u,u.createCommonParamter(s),u.createPBRParamter(s);for(var c=s.textureunitstates,h=0;h<c.length;h++){var d=c[h].textureunitstate,f=d.id,p=0===d.addressmode.u?q$19.REPEAT:q$19.CLAMP_TO_EDGE,_=0===d.addressmode.v?q$19.REPEAT:q$19.CLAMP_TO_EDGE;u._texMatrix=p$1d.unpack(d.texmodmatrix);var m=i.texturePackage[f];if(e$2b(m)){var g=Se$d.CreateTexture(f,n,m.width,m.height,m.nFormat,m.compressType,m.imageBuffer,!1,p,_);u._textures.push(g),0===m.compressType&&(e._supportCompressType=0)}}}var x=i.groupNode.pageLods;if(e$2b(x))for(o=0,a=x.length;o<a;o++){for(var v=x[o].geodes[0],y=v.matrix,$=0;$<16;$++)y[$]=parseFloat(y[$]);y=p$1d.unpack(y,0);for(var b=v.skeletonNames,T=[],C=0,S=b.length;C<S;C++){var w=b[C].trim();T.push(w);var E=i.geoPackage[w],P=E.vertexPackage,A=_0x4f873a(P,y),L=E.arrIndexPackage[0];if(e$2b(L)){u=r[l=L.materialCode];t.createSubSkeleton(e,y,u,P,L,A)}}}t.ready=!0,t.state=_0x49d3c9.Ready;var M=e._skeletonTileMap.get(t.url);for(o=0,a=M.length;o<a;o++)M[o].dirty=!0;e._skeletonTileMap.remove(t.url)}else t.state=_0x49d3c9.Failed})).otherwise((function(e){console.log(e)}))}};var _0x2f87e1=(_0x461105=!0,function(e,t){var i=_0x461105?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x461105=!1,i}),_0x3f6519=_0x2f87e1(void 0,(function(){return _0x3f6519.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f6519).search("(((.+)+)+)+$")})),_0x461105;function _0x5ba273(){}_0x3f6519();var _0x33fae4=new s$S;function _0x2434d4(e,t){for(var i=[],n=new i$1c,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1c.fromPoints(i,n),i.length=0,i$1c.transform(n,t,n),n}_0x5ba273.load=function(e,t){var i=t$11.fetchArrayBuffer({url:t.url});e$2b(i)||(t.state=_0x49d3c9.UnLoad),t.state=_0x49d3c9.Loading,i.then((function(e){t.state=_0x49d3c9.Loaded,t.skeletonBuffer=e}),(function(e){t.state=_0x49d3c9.Failed}))},_0x5ba273.parse=function(e,t){var i=_0x46a73d.S3MTaskProcessor.scheduleTask({buffer:t.skeletonBuffer,supportCompressType:e._supportCompressType},[t.skeletonBuffer]);e$2b(i)?(t.skeletonBuffer=void 0,t.state=_0x49d3c9.Parsing,i.then((function(i){if(i.result){e._gl;for(var n=e._context,r=_0x33fae4.read(i.xmlDoc).firstChild,o=r.namespaceURI,a=s$S.queryFirstNode(r,"Material3Ds",o),s=s$S.queryChildNodes(a,"material",o),l={},u=0,c=s.length;u<c;u++){var h=s[u],d=s$S.queryStringValue(h,"name",o),f=new _0x21d1b1({});l[d]=f;var p=s$S.queryFirstNode(h,"Ambient",o),_=s$S.queryNumericValue(p,"AmbientR",o),m=s$S.queryNumericValue(p,"AmbientG",o),g=s$S.queryNumericValue(p,"AmbientB",o),x=s$S.queryNumericValue(p,"AmbientA",o);f._ambientColor=new e$1U(_,m,g,x);var v=s$S.queryFirstNode(h,"Diffuse",o);_=s$S.queryNumericValue(v,"DiffuseR",o),m=s$S.queryNumericValue(v,"DiffuseG",o),g=s$S.queryNumericValue(v,"DiffuseB",o),x=s$S.queryNumericValue(v,"DiffuseA",o),f._diffuseColor=new e$1U(_,m,g,x);var y=s$S.queryFirstNode(h,"Specular",o);_=s$S.queryNumericValue(y,"SpecularR",o),m=s$S.queryNumericValue(y,"SpecularG",o),g=s$S.queryNumericValue(y,"SpecularB",o),x=s$S.queryNumericValue(y,"SpecularA",o),f._specularColor=new e$1U(_,m,g,x);var $=s$S.queryNumericValue(h,"Shininess",o);f._shininess=$,s$S.queryFirstNode(h,"TransparentSorting",o),f._bTransparentSorting=s$S.queryBooleanValue(h,"TransparentSorting",o)||f._diffuseColor.alpha<1;var b=s$S.queryFirstNode(h,"texture",o),T=s$S.queryStringValue(b,"name",o),C=s$S.queryFirstNode(b,"AddressMode",o),S=s$S.queryStringValue(C,"u",o),w=s$S.queryStringValue(C,"v",o);S="TAM_WRAP"===S?q$19.REPEAT:q$19.CLAMP_TO_EDGE,w="TAM_WRAP"===w?q$19.REPEAT:q$19.CLAMP_TO_EDGE;var E=i.texturePackage[T];if(e$2b(E)){var P=Se$d.CreateTexture(T,n,E.width,E.height,E.nFormat,E.compressType,E.imageBuffer,!1,S,w);f._textures.push(P),0===E.compressType&&(e._supportCompressType=0)}}var A=s$S.queryFirstNode(r,"PageLods",o),L=s$S.queryNodes(A,"Geode",o);for(u=0,c=L.length;u<c;u++){for(var M=L[u],R=s$S.queryStringValue(M,"GeoDeModMatrix",o).split(","),I=0;I<16;I++)R[I]=parseFloat(R[I]);R=p$1d.unpack(R,0);for(var O=s$S.queryNodes(M,"GeoName",o),D=[],B=0,N=O.length;B<N;B++){var F=O[B].textContent.trim();D.push(F);var U=i.geoPackage[F],z=_0x2434d4(G=U.vertexPackage,R),G=U.vertexPackage,V=U.arrIndexPackage[0];if(e$2b(V)){f=l[d=V.materialCode];t.createSubSkeleton(e,R,f,G,V,z)}}}t.ready=!0,t.state=_0x49d3c9.Ready;var k=e._skeletonTileMap.get(t.url);for(u=0,c=k.length;u<c;u++)k[u].dirty=!0;e._skeletonTileMap.remove(t.url)}else t.state=_0x49d3c9.Failed})).otherwise((function(e){console.log(e)}))):t.state=_0x49d3c9.Loaded};var _0x43a052=(_0x5da4e1=!0,function(e,t){var i=_0x5da4e1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5da4e1=!1,i}),_0x51cc2e=_0x43a052(void 0,(function(){return _0x51cc2e.toString().search("(((.+)+)+)+$").toString().constructor(_0x51cc2e).search("(((.+)+)+)+$")})),_0x5da4e1;function _0x344064(){}_0x51cc2e(),_0x344064.load=function(e,t){t._isGlTF?_0x5bf1b0.load(e,t):_0x5ba273.load(e,t)},_0x344064.parse=function(e,t){t.url.endsWith("s3mb")?_0x1c7703.parse(e,t):_0x5ba273.parse(e,t)};var _0x212f08=(_0x4b3261=!0,function(e,t){var i=_0x4b3261?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4b3261=!1,i}),_0xe5ddfe=_0x212f08(void 0,(function(){return _0xe5ddfe.toString().search("(((.+)+)+)+$").toString().constructor(_0xe5ddfe).search("(((.+)+)+)+$")})),_0x4b3261;function _0x2c3aba(e){this._context=e,this._gl=e._gl,this.type=bt$5.INSTANCED_LAYER,this._tilingScheme=new g$13,this._modelSkeletons=new e$1N,this._tiles=new e$1N,this._instances=new e$1N,this._skeletonTileMap=new e$1N,this._tileWidth=1e3,this._maxSSE=2,this._level=10,this._maxGeometricError=0,this._level=this.computeLevel(this._tileWidth),this._minVisibleAltitude=0,this._maxVisibleAltitude=Number.MAX_VALUE,this._filterMode=_0x2056d1.PIXEL_SIZE_ON_SCREEN,this._filterDistance=Number.MAX_VALUE,this._filterPixel=0,this._selectedColor=new e$1U(.7,.7,1,1),this._pickEnable=!0,this._visibleViewport=4095,this._supportCompressType=e$2b(e.s3tc)?1:e$2b(e.pvrtc)?2:3,this._shadowType=_0x381f49.NONE,this._specularEnvironmentMaps=void 0,this._hdrEnvMap=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:new o$1p,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}}}function _0x5f1281(e,t,i){var n=e.camera,r=e.context.drawingBufferWidth,o=e.context.drawingBufferHeight,a=Math.max(r,o),s=.5*n.frustum.fov,l=.5*a/Math.tan(s);return Math.ceil(l*t/i)}function _0x1c75fb(e,t,i){if(!e$2b(i.boundingVolume))return!1;if(!(e.cullingVolume.computeVisibility(i.boundingVolume)!==Ae$u.OUTSIDE))return!1;var n=i.tileBoundingRegion.distanceToCamera(e);if(i.distanceToCamera=n,e.fog.enabled&&e$2a.fog(n,e.fog.density)>=1)return!1;var r=e.context.drawingBufferHeight,o=e.camera.frustum.sseDenominator,a=t._maxGeometricError*r/(n*o);return e.fog.enabled&&(a-=e$2a.fog(n,e.fog.density)*e.fog.sse),!(a<t._maxSSE)}function _0x632a6b(e,t){t.state===_0x49d3c9.UnLoad&&_0x344064.load(e,t),t.state===_0x49d3c9.Loaded&&_0x344064.parse(e,t)}function _0x50a106(e,t,i){for(var n=0;n<i.commandGroup.length;n++)for(var r=i.commandGroup.values[n],o=0;o<r.length;o++){var a=r[o];if(t._filterMode===_0x2056d1.PIXEL_SIZE_ON_SCREEN){if(_0x5f1281(e,a.radius,i.distanceToCamera)<t.filterPixel)continue}else if(i.distanceToCamera>t.filterDistance)continue;e.commandList.push(a)}}_0xe5ddfe(),Object.defineProperties(_0x2c3aba.prototype,{minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){o$1q.typeOf.number("InstanceLayer minVisibleAltitude",e),this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){o$1q.typeOf.number("InstanceLayer maxVisibleAltitude",e),this._maxVisibleAltitude=e}},filterMode:{get:function(){return this._filterMode},set:function(e){o$1q.typeOf.number("InstanceLayer filterMode",e),this._filterMode=e}},filterDistance:{get:function(){return this._filterDistance},set:function(e){o$1q.typeOf.number("InstanceLayer filterPixel",e),this._filterDistance=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){o$1q.typeOf.number("InstanceLayer filterPixel",e),this._filterPixel=e}},selectedColor:{get:function(){return this._selectedColor},set:function(e){o$1q.typeOf.object("InstanceLayer selectedColor",e),this._selectedColor=e$1U.clone(e,this._selectedColor)}},pickEnable:{get:function(){return this._pickEnable},set:function(e){o$1q.typeOf.bool("InstanceLayer pickEnable",e),this._pickEnable=e}},tileWidth:{get:function(){return this._tileWidth},set:function(e){o$1q.typeOf.number("InstanceLayer tileWidth",e),this._tileWidth=e;var t=this.computeLevel(e);t!==this._level&&(this._level=t,this.updateTiles())}},maxSSE:{get:function(){return this._maxSSE},set:function(e){this._maxSSE=e}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}}});var _0x554329=78271.51696402048;function _0x13a37a(e){return e._shadowType==_0x381f49.SELECTION||e._shadowType==_0x381f49.ALL}_0x2c3aba.prototype.computeLevel=function(e){var t=10,i=this._tilingScheme.tileXYToRectangle(0,0,10),n=this._tilingScheme._projection,r=h$18.southwest(i),o=h$18.northeast(i);r=n.project(r);var a=(o=n.project(o)).x-r.x;for(o.y,r.y;a>e;)++t,a*=.5;return t-=1,this._maxGeometricError=_0x554329/(1<<t),t},_0x2c3aba.prototype.updateTiles=function(){var e,t,i,n;for(e=0,t=this._tiles.length;e<t;e++)this._tiles.values[e].destroy();this._tiles.removeAll(),this._skeletonTileMap.removeAll();var r=this._tilingScheme;for(e=0,t=this._instances.length;e<t;e++){var o=this._instances.values[e];for(i=0,n=o.length;i<n;i++){var a=o.values[i];a.tile=void 0,a.instanceInfo=void 0;var s=a.url,l=r.positionToTileXY(a.geoPosition,this._level),u=l.x+"_"+l.y;if(!e$2b(p=this._tiles.get(u))){(p=new _0xbc2054(l.x,l.y)).layer=this;var c=r.tileXYToRectangle(l.x,l.y,this._level);p.rectangle=h$18.clone(c),p.boundingVolume=y$Z.fromRectangle(c,0,0),p.transform=m$17.eastNorthUpToFixedFrame(p.boundingVolume.center,void 0,new p$1d),p.inverseTransform=p$1d.inverse(p.transform,new p$1d),p.tileBoundingRegion=new y$K({computeBoundingVolumes:!1,rectangle:c,ellipsoid:r.ellipsoid,minimumHeight:0,maximumHeight:0}),this._tiles.set(u,p)}a.offset=p$1d.multiplyByPoint(p.inverseTransform,a.position,a.offset),p.dirty=!0;var h=this._skeletonTileMap.get(s);e$2b(h)||(h=[],this._skeletonTileMap.set(s,h)),h.push(p);var d=p.instanceGroup.get(s);e$2b(d)||(d=new _0x377331(s,_0x2c3aba.STRIDE),p.instanceGroup.set(s,d)),d.instances.push(a),a.instanceInfo=d,a.tile=p,d.dirty=!0;var f=p.skeletonGroup.get(s);e$2b(f)||(f=this._modelSkeletons.get(s),p.skeletonGroup.set(s,f))}}for(e=0,t=this._tiles.length;e<t;e++){var p;(p=this._tiles.values[e]).dirty&&p.update(this._context)}},_0x2c3aba.prototype.add=function(e,t,i){if(o$1q.typeOf.string("url",e),o$1q.defined("attrs",t),Array.isArray(t)||(t=[t]),!this._modelSkeletons.contains(e)){var n=!1;(e.indexOf(".gltf")>0||e.indexOf(".glb")>0)&&(n=!0),e$2b(i)&&(n="gltf"===i),n?this._modelSkeletons.set(e,new _0x4c199e(e)):this._modelSkeletons.set(e,new _0x4f9ecb(e))}for(var r=this._tilingScheme,o=0,a=t.length;o<a;o++){var s=t[o],l=u$_(s.id,e$1Q()),u=new _0x588b14(this._context,e,s,l),c=r.positionToTileXY(u.geoPosition,this._level),h=c.x+"_"+c.y;if(!e$2b(g=this._tiles.get(h))){(g=new _0xbc2054(c.x,c.y)).layer=this;var d=this._tilingScheme.tileXYToRectangle(c.x,c.y,this._level);g.rectangle=h$18.clone(d),g.boundingVolume=y$Z.fromRectangle(d,0,0),g.transform=m$17.eastNorthUpToFixedFrame(g.boundingVolume.center,void 0,new p$1d),g.inverseTransform=p$1d.inverse(g.transform,new p$1d),g.tileBoundingRegion=new y$K({computeBoundingVolumes:!1,rectangle:d,ellipsoid:r.ellipsoid,minimumHeight:0,maximumHeight:0}),this._tiles.set(h,g)}u.offset=p$1d.multiplyByPoint(g.inverseTransform,u.position,u.offset),u.selectedColor=e$1U.clone(this._selectedColor,u.selectedColor),g.dirty=!0;var f=this._skeletonTileMap.get(e);e$2b(f)||(f=[],this._skeletonTileMap.set(e,f)),f.push(g);var p=g.instanceGroup.get(u.url);e$2b(p)||(p=new _0x377331(u.url,_0x2c3aba.STRIDE),g.instanceGroup.set(u.url,p)),p.instances.push(u),u.instanceInfo=p,u.tile=g,u.layer=this,p.dirty=!0;var _=g.skeletonGroup.get(u.url);e$2b(_)||(_=this._modelSkeletons.get(u.url),g.skeletonGroup.set(u.url,_));var m=this._instances.get(e);e$2b(m)||(m=new e$1N,this._instances.set(e,m)),m.set(l,u)}for(o=0,a=this._tiles.length;o<a;o++){var g;(g=this._tiles.values[o]).dirty&&g.update(this._context)}},_0x2c3aba.prototype.getInstance=function(e,t){o$1q.defined("InstanceLayer getInstance url",e),o$1q.defined("InstanceLayer getInstance id",t);var i=this._instances.get(e);if(e$2b(i))return i.get(t)},_0x2c3aba.prototype._updateShadow=function(e){var t=_0x13a37a(e),i=e._modelSkeletons._hash;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.subSkeletons.length;o<a;o++){var s=r.subSkeletons[o];s.colorCommand.castShadows=t,s.colorCommand.receiveShadows=t}}},_0x2c3aba.prototype.removeInstance=function(e,t){o$1q.defined("InstanceLayer removeInstance url",e),o$1q.defined("InstanceLayer removeInstance ids",t),Array.isArray(t)||(t=[t]);for(var i=0,n=t.length;i<n;i++){var r=t[i],o=this.getInstance(e,r);if(e$2b(o)&&e$2b(o.tile)){var a=o.tile;a.dirty=!0;var s=a.instanceGroup.get(e);if(e$2b(s)){s.dirty=!0;var l=s.instances.indexOf(o);s.instances.splice(l,1),this._instances.get(e).remove(o.id)}}}0===this._instances.get(e).length&&this.removeAll(e)},_0x2c3aba.prototype.removeAll=function(e){var t,i;if(e$2b(e)){if(!this._modelSkeletons.contains(e))return;for(this._modelSkeletons.get(e).destroy(),this._modelSkeletons.remove(e),this._instances.remove(e),this._skeletonTileMap.remove(e),t=0,i=this._tiles.length;t<i;t++){var n=this._tiles.values[t];n.remove(e),n.dirty=!0}}else{for(t=0,i=this._modelSkeletons.length;t<i;t++){var r=this._modelSkeletons.values[t];r._isGlTF?!r.model.isDestroyed()&&r.model.destroy():this._modelSkeletons.values[t].destroy()}for(this._modelSkeletons.removeAll(),t=0,i=this._tiles.length;t<i;t++)this._tiles.values[t].destroy();this._tiles.removeAll(),this._instances.removeAll(),this._skeletonTileMap.removeAll()}},_0x2c3aba.prototype.setUnSelected=function(){var e=this._instances;if(e$2b(e)&&!(e.length<1))for(var t=0,i=e.length;t<i;t++)for(var n=e.values[t],r=0,o=n.length;r<o;r++){n.values[r].setUnSelected()}},_0x2c3aba.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x2c3aba.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},_0x2c3aba.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;var t=e.camera;if(!(t.positionCartographic.height>this._maxVisibleAltitude||t.positionCartographic.height<this._minVisibleAltitude)&&(!e.passes.pick||this._pickEnable)){var i=!1;for(var n in(this._specularEnvironmentMaps!==e.specularEnvironmentMaps||this._hdrEnvMap!==e.hdrEnvMap)&&(i=!0,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._hdrEnvMap=e.hdrEnvMap),this._frameState=e,this._modelSkeletons._hash)if(this._modelSkeletons._hash.hasOwnProperty(n)){var r=this._modelSkeletons.get(n);r.ready?i&&r.updateShaderProgram(e,this):_0x632a6b(this,r),r._isGlTF&&r.transformed&&r.model.updateAnimation(e)}for(var o=0,a=this._tiles.length;o<a;o++){var s=this._tiles.values[o];if(i&&s.updateShaderProgram(),_0x1c75fb(e,this,s)){for(var n in s.dirty&&s.update(this._context),s.commandGroup._hash){var l=this._modelSkeletons.get(n).model;if(e$2b(l))for(var u=l._nodeCommands,c=s.commandGroup.get(n),h=0,d=c.length;h<d;h++){var f=c[h],p=u[h].command;p$1d.clone(p.modelMatrix,f.localMatrix),p$1d.clone(s.transform,f.modelMatrix),y$Z.clone(s.boundingVolume,f.boundingVolume)}}_0x50a106(e,this,s)}}}},_0x2c3aba.STRIDE=18,_0x2c3aba.prototype.isDestroyed=function(){return!1},_0x2c3aba.prototype.destroy=function(){this.removeAll(),i$10(this)};var _0x5829a7=(_0x2a7d47=!0,function(e,t){var i=_0x2a7d47?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a7d47=!1,i}),_0x305113=_0x5829a7(void 0,(function(){return _0x305113.toString().search("(((.+)+)+)+$").toString().constructor(_0x305113).search("(((.+)+)+)+$")})),_0x2a7d47;function _0x5868f1(e,t){this.id=e,this.buffer=t}_0x305113();var _0x322406=(_0x5163bf=!0,function(e,t){var i=_0x5163bf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5163bf=!1,i}),_0x4d3a76=_0x322406(void 0,(function(){return _0x4d3a76.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d3a76).search("(((.+)+)+)+$")})),_0x5163bf,_0x269f2d;function _0x2424eb(){}function _0x158cc3(e,t){for(var i=e.num_points(),n=e.num_faces(),r=new _0x269f2d.DracoInt32Array,o=3*n,a=ce$x.createTypedArray(i,o),s=0,l=0;l<n;++l)t.GetFaceFromMesh(e,l,r),a[s+0]=r.GetValue(0),a[s+1]=r.GetValue(1),a[s+2]=r.GetValue(2),s+=3;var u=ce$x.UNSIGNED_SHORT;return a instanceof Uint32Array&&(u=ce$x.UNSIGNED_INT),_0x269f2d.destroy(r),{typedArray:a,numberOfIndices:o,indexDataType:u}}function _0x2dd4d4(e,t,i,n,r){var o,a;n.quantizationBits<=8?(a=new _0x269f2d.DracoUInt8Array,o=new Uint8Array(r),t.GetAttributeUInt8ForAllPoints(e,i,a)):(a=new _0x269f2d.DracoUInt16Array,o=new Uint16Array(r),t.GetAttributeUInt16ForAllPoints(e,i,a));for(var s=0;s<r;++s)o[s]=a.GetValue(s);return _0x269f2d.destroy(a),o}function _0x51ba58(e,t,i,n){var r,o;switch(i.data_type()){case 1:case 11:o=new _0x269f2d.DracoInt8Array,r=new Int8Array(n),t.GetAttributeInt8ForAllPoints(e,i,o);break;case 2:o=new _0x269f2d.DracoUInt8Array,r=new Uint8Array(n),t.GetAttributeUInt8ForAllPoints(e,i,o);break;case 3:o=new _0x269f2d.DracoInt16Array,r=new Int16Array(n),t.GetAttributeInt16ForAllPoints(e,i,o);break;case 4:o=new _0x269f2d.DracoUInt16Array,r=new Uint16Array(n),t.GetAttributeUInt16ForAllPoints(e,i,o);break;case 5:case 7:o=new _0x269f2d.DracoInt32Array,r=new Int32Array(n),t.GetAttributeInt32ForAllPoints(e,i,o);break;case 6:case 8:o=new _0x269f2d.DracoUInt32Array,r=new Uint32Array(n),t.GetAttributeUInt32ForAllPoints(e,i,o);break;case 9:case 10:o=new _0x269f2d.DracoFloat32Array,r=new Float32Array(n),t.GetAttributeFloatForAllPoints(e,i,o)}for(var a=0;a<n;++a)r[a]=o.GetValue(a);return _0x269f2d.destroy(o),r}function _0x1983de(e,t,i){var n,r=e.num_points(),o=i.num_components(),a=new _0x269f2d.AttributeQuantizationTransform;if(a.InitFromAttribute(i)){for(var s=new Array(o),l=0;l<o;++l)s[l]=a.min_value(l);n={quantizationBits:a.quantization_bits(),minValues:s,range:a.range(),octEncoded:!1}}_0x269f2d.destroy(a),(a=new _0x269f2d.AttributeOctahedronTransform).InitFromAttribute(i)&&(n={quantizationBits:a.quantization_bits(),octEncoded:!0}),_0x269f2d.destroy(a);var u,c=r*o;u=e$2b(n)?_0x2dd4d4(e,t,i,n,c):_0x51ba58(e,t,i,c);var h=S$12.fromTypedArray(u);if(S$12.getSizeInBytes(h)*o%4!=0){var d=_0x1bd81f(u,o,h);u=d.vertexArray,o=d.numComponents}return{array:u,data:{componentsPerAttribute:o,componentDatatype:h,byteOffset:i.byte_offset(),byteStride:S$12.getSizeInBytes(h)*o,normalized:i.normalized(),quantization:n}}}function _0x1bd81f(e,t,i){var n,r=S$12.getSizeInBytes(i),o=r*t;n=t+(4*Math.ceil(o/4)-o)/r;var a,s=e.length/t,l=s*n;e instanceof Uint16Array?a=new Uint16Array(l):e instanceof Int16Array?a=new Int16Array(l):e instanceof Uint8Array?a=new Uint8Array(l):console.log("convertArrayToMutiple4Array dont support array type.");var u,c=0;for(c=0;c<s;c++)for(u=0;u<n;u++)a[c*n+u]=u<t?e[c*t+u]:0;return{numComponents:n,vertexArray:a}}_0x4d3a76();var _0x400c90=new o$1p(40680631590769,40680631590769,40408299984661.445),_0x507c29=new o$1p,_0x219793=new o$1p;function _0x23da9d(e,t,i,n){var r=Math.cos(t);_0x507c29.x=r*Math.cos(e),_0x507c29.y=r*Math.sin(e),_0x507c29.z=Math.sin(t),_0x507c29=o$1p.normalize(_0x507c29,_0x507c29),o$1p.multiplyComponents(_0x400c90,_0x507c29,_0x219793);var o=Math.sqrt(o$1p.dot(_0x507c29,_0x219793));return _0x219793=o$1p.divideByScalar(_0x219793,o,_0x219793),_0x507c29=o$1p.multiplyByScalar(_0x507c29,i,_0x507c29),e$2b(n)||(n=new o$1p),o$1p.add(_0x219793,_0x507c29,n)}var _0xd2abfc=new p$1d,_0x25770c=new p$1d,_0x4f8652=new o$1p,_0x45ff22=new a$18;function _0x2d97c8(e,t,i,n,r,o,a,s){var l=void 0,u=void 0,c=void 0,h=void 0,d=i.vertexAttributes,f=i.attrLocation;if(i.nCompressOptions=0,e$2b(n.posUniqueID)&&n.posUniqueID>=0){e$2b(s)||(i.nCompressOptions|=_0x35ed09.SVC_Vertex);var p=t.GetAttribute(e,n.posUniqueID),_=_0x1983de(e,t,p),m=_.data.componentsPerAttribute;i.verticesCount=_.array.length/m,i.vertCompressConstant=_.data.quantization.range/(1<<_.data.quantization.quantizationBits);var g=_.data.quantization.minValues;i.minVerticesValue=new e$29(g[0],g[1],g[2],1),m>3&&(i.minVerticesValue.w=g[3]);var x=i.verticesCount;if(o&&(l=new a$18,u=new a$18,c=new Float32Array(2*x),h=new Float64Array(2*x)),e$2b(s)){var v=_.array,y=3===m?o$1p.unpackArray(v):e$29.unpackArray(v);for(let e=0,t=y.length;e<t;e++){let t=y[e];o$1p.multiplyByScalar(t,i.vertCompressConstant,t),o$1p.add(t,i.minVerticesValue,t)}var $=p$1d.multiply(s.sphereMatrix,s.geoMatrix,_0xd2abfc),b=p$1d.multiply(s.ellipsoidMatrix,s.geoMatrix,_0x25770c);p$1d.inverse(b,b);var T=new t$13(6378137,6378137,6378137);for(let e=0,t=y.length;e<t;e++){let t=y[e];p$1d.multiplyByPoint($,t,_0x4f8652);let i=T.cartesianToCartographic(_0x4f8652,_0x45ff22);o&&(h[2*e]=i.longitude,h[2*e+1]=i.latitude,0===e?(l.longitude=i.longitude,l.latitude=i.latitude,u.longitude=i.longitude,u.latitude=i.latitude):(l.longitude=Math.max(i.longitude,l.longitude),l.latitude=Math.max(i.latitude,l.latitude),u.longitude=Math.min(i.longitude,u.longitude),u.latitude=Math.min(i.latitude,u.latitude)));let n=_0x23da9d(i.longitude,i.latitude,i.height,_0x4f8652);p$1d.multiplyByPoint(b,n,t)}var C=new Array(3*y.length);3===m?o$1p.packArray(y,C):e$29.packArray(y,C),_.array=new Float32Array(C),_.data.componentDatatype=S$12.FLOAT,_.data.byteStride=4*m}if(f.aPosition=d.length,d.push({index:f.aPosition,typedArray:_.array,componentsPerAttribute:m,componentDatatype:_.data.componentDatatype,offsetInBytes:_.data.byteOffset,strideInBytes:_.data.byteStride,normalize:_.data.normalized}),!e$2b(s)&&o)for(var S=new o$1p,w=new o$1p,E=new a$18,P=0;P<x;P++)p$1d.multiplyByPoint(r,o$1p.fromElements(_.array[3*P]*i.vertCompressConstant+g[0],_.array[3*P+1]*i.vertCompressConstant+g[1],_.array[3*P+2]*i.vertCompressConstant+g[2],S),w),E=a$18.fromCartesian(w),h[2*P]=E.longitude,h[2*P+1]=E.latitude,0===P?(l.longitude=E.longitude,l.latitude=E.latitude,u.longitude=E.longitude,u.latitude=E.latitude):(l.longitude=Math.max(E.longitude,l.longitude),l.latitude=Math.max(E.latitude,l.latitude),u.longitude=Math.min(E.longitude,u.longitude),u.latitude=Math.min(E.latitude,u.latitude));if(o){for(P=0;P<x;P++)c[2*P]=h[2*P]-u.longitude,c[2*P+1]=h[2*P+1]-u.latitude;f.img=d.length,d.push({index:f.img,typedArray:c,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),a.max=l,a.min=u}}if(e$2b(n.normalUniqueID)&&n.normalUniqueID>=0){i.nCompressOptions|=_0x35ed09.SVC_Normal;var A=t.GetAttribute(e,n.normalUniqueID),L=_0x1983de(e,t,A),M=L.data.quantization;i.normalRangeConstant=(1<<M.quantizationBits)-1,f.aNormal=d.length,d.push({index:f.aNormal,typedArray:L.array,componentsPerAttribute:L.data.componentsPerAttribute,componentDatatype:L.data.componentDatatype,offsetInBytes:L.data.byteOffset,strideInBytes:L.data.byteStride,normalize:L.data.normalized})}if(e$2b(n.colorUniqueID)&&n.colorUniqueID>=0){i.nCompressOptions|=_0x35ed09.SVC_VertexColor;var R=t.GetAttribute(e,n.colorUniqueID),I=_0x1983de(e,t,R);f.aColor=d.length,d.push({index:f.aColor,typedArray:I.array,componentsPerAttribute:I.data.componentsPerAttribute,componentDatatype:I.data.componentDatatype,offsetInBytes:I.data.byteOffset,strideInBytes:I.data.byteStride,normalize:I.data.normalized})}for(P=0;P<n.texCoordUniqueIDs.length;P++){i.texCoordCompressConstant=[],i.minTexCoordValue=[];var O=n.texCoordUniqueIDs[P];if(!(O<0)){var D=t.GetAttribute(e,O),B=_0x1983de(e,t,D);if(e$2b(B.data.quantization)){i.nCompressOptions|=_0x35ed09.SVC_TexutreCoord,i.texCoordCompressConstant.push(B.data.quantization.range/(1<<B.data.quantization.quantizationBits));g=B.data.quantization.minValues;i.minTexCoordValue.push(new o$1o(g[0],g[1]))}var N="aTexCoord"+P;f[N]=d.length,d.push({index:f[N],typedArray:B.array,componentsPerAttribute:B.data.componentsPerAttribute,componentDatatype:B.data.componentDatatype,offsetInBytes:B.data.byteOffset,strideInBytes:B.data.byteStride,normalize:B.data.normalized}),i.textureCoordIsW=!0}}for(P=0;P<n.vertexAttrUniqueIDs.length;P++){var F=n.vertexAttrUniqueIDs[P];if(!(F<0)){var U=t.GetAttribute(e,F),z=_0x1983de(e,t,U);f.aVertexWeight=d.length,d.push({index:f.aVertexWeight,typedArray:z.array,componentsPerAttribute:z.data.componentsPerAttribute,componentDatatype:z.data.componentDatatype,offsetInBytes:z.data.byteOffset,strideInBytes:z.data.byteStride,normalize:z.data.normalized}),i.customVertexAttribute={VertexWeight:0}}}}_0x2424eb.dracoDecodePointCloud=function(e,t,i,n,r){for(var o=new(_0x269f2d=e).Decoder,a=["POSITION","NORMAL","COLOR"],s=0;s<a.length;++s)o.SkipAttributeTransform(_0x269f2d[a[s]]);var l=new _0x269f2d.DecoderBuffer;if(l.Init(t,i),o.GetEncodedGeometryType(l)!==_0x269f2d.POINT_CLOUD)throw new t$14("Draco geometry type must be POINT_CLOUD.");var u=new _0x269f2d.PointCloud,c=o.DecodeBufferToPointCloud(l,u);if(!c.ok()||0===u.ptr)throw new t$14("Error decoding draco point cloud: "+c.error_msg());_0x269f2d.destroy(l),_0x2d97c8(u,o,n,r),_0x269f2d.destroy(u),_0x269f2d.destroy(o)},_0x2424eb.dracoDecodeMesh=function(e,t,i,n,r,o,a,s,l,u){for(var c=new(_0x269f2d=e).Decoder,h=["POSITION","NORMAL","COLOR","TEX_COORD"],d=0;d<h.length;++d)c.SkipAttributeTransform(_0x269f2d[h[d]]);var f=new _0x269f2d.DecoderBuffer;if(f.Init(t,i),c.GetEncodedGeometryType(f)!==_0x269f2d.TRIANGULAR_MESH)throw new t$14("Unsupported draco mesh geometry type.");var p=new _0x269f2d.Mesh;if(!c.DecodeBufferToMesh(f,p).ok()||0===p.ptr)return!1;_0x269f2d.destroy(f),_0x2d97c8(p,c,n,o,a,s,l,u);var _=_0x158cc3(p,c);r.indicesTypedArray=_.typedArray,r.indicesCount=_.numberOfIndices,r.indexType=_.indexDataType,r.primitiveType=W$18.TRIANGLES,_0x269f2d.destroy(p),_0x269f2d.destroy(c)};var _0x164781=(_0x38428d=!0,function(e,t){var i=_0x38428d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38428d=!1,i}),_0x321f96=_0x164781(void 0,(function(){return _0x321f96.toString().search("(((.+)+)+)+$").toString().constructor(_0x321f96).search("(((.+)+)+)+$")})),_0x38428d;function _0x2f6556(){this._cache={},this._cacheHeap=new o$1g({comparator:sortComparator}),this._cacheHeap.maximumLength=100}_0x321f96(),_0x2f6556.prototype.set=function(e,t){var i={id:e,buffer:t,priority:Et$a()};this._cache[e]=i;var n=this._cacheHeap.insert(i);e$2b(n)&&delete this._cache[n.id]},_0x2f6556.prototype.get=function(e){var t=this._cache[e];if(e$2b(t))return t},_0x2f6556.prototype.contains=function(e){return e$2b(this._cache[e])};var _0x136478=(_0x51d378=!0,function(e,t){var i=_0x51d378?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51d378=!1,i}),_0x17de0d=_0x136478(void 0,(function(){return _0x17de0d.toString().search("(((.+)+)+)+$").toString().constructor(_0x17de0d).search("(((.+)+)+)+$")})),_0x51d378;_0x17de0d();var _0x1af06e={SCENE:"Scene",LIGHT:"Light",MESH:"Mesh",MATERIAL:"Material",LAYER:"Layer",SHADOW:"Shadow"},UBONames=Object.freeze(_0x1af06e);function u$i(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).missingImageUrl))throw new t$16("options.missingImageUrl is required.");if(!e$2b(e.pixelsToCheck))throw new t$16("options.pixelsToCheck is required.");this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;var t=t$11.createIfNeeded(e.missingImageUrl),i=this;t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then((function(t){e$2b(t.blob)&&(i._missingImageByteLength=t.blob.size);var n=d$13(t);if(e.disableCheckIfAllPixelsAreTransparent){for(var r=!0,o=t.width,a=e.pixelsToCheck,s=0,l=a.length;r&&s<l;++s){var u=a[s];n[4*u.x+u.y*o+3]>0&&(r=!1)}r&&(n=void 0)}i._missingImagePixels=n,i._isReady=!0})).otherwise((function(){i._missingImagePixels=void 0,i._isReady=!0}))}function o$q(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}function e$h(){this.defaultAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,t$16.throwInstantiationError()}u$i.prototype.isReady=function(){return this._isReady},u$i.prototype.shouldDiscardImage=function(e){if(!this._isReady)throw new t$16("shouldDiscardImage must not be called before the discard policy is ready.");var t=this._pixelsToCheck,i=this._missingImagePixels;if(!e$2b(i)||e$2b(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;for(var n=d$13(e),r=e.width,o=0,a=t.length;o<a;++o)for(var s=t[o],l=4*s.x+s.y*r,u=0;u<4;++u){var c=l+u;if(n[c]!==i[c])return!1}return!0},o$q.prototype.configureNameFromProperties=function(e){var t,i=10;for(var n in e)if(e.hasOwnProperty(n)&&e[n]){var r=n.toLowerCase();i>1&&"name"===r?(i=1,t=n):i>2&&"title"===r?(i=2,t=n):i>3&&/name/i.test(n)?(i=3,t=n):i>4&&/title/i.test(n)&&(i=4,t=n)}e$2b(t)&&(this.name=e[t])},o$q.prototype.configureDescriptionFromProperties=function(e){this.description=function e(t){var i='<table class="supermap3d-infoBox-defaultTable">';for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];e$2b(r)&&(i+="object"==typeof r?"<tr><td>"+n+"</td><td>"+e(r)+"</td></tr>":"<tr><td>"+n+"</td><td>"+r+"</td></tr>")}return i+="</table>"}(e)},Object.defineProperties(e$h.prototype,{ready:{get:t$16.throwInstantiationError},readyPromise:{get:t$16.throwInstantiationError},rectangle:{get:t$16.throwInstantiationError},tileWidth:{get:t$16.throwInstantiationError},tileHeight:{get:t$16.throwInstantiationError},maximumLevel:{get:t$16.throwInstantiationError},minimumLevel:{get:t$16.throwInstantiationError},tilingScheme:{get:t$16.throwInstantiationError},tileDiscardPolicy:{get:t$16.throwInstantiationError},errorEvent:{get:t$16.throwInstantiationError},credit:{get:t$16.throwInstantiationError},proxy:{get:t$16.throwInstantiationError},hasAlphaChannel:{get:t$16.throwInstantiationError}}),e$h.prototype.getTileCredits=t$16.throwInstantiationError,e$h.prototype.requestImage=t$16.throwInstantiationError,e$h.prototype.pickFeatures=t$16.throwInstantiationError;var m$j=/\.ktx$/i,p$g=/\.crn$/i,c$d=/\.dxtz$/i;function b$p(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url))throw new t$16("options.url is required.");this._baseUrl=e.url;var t=t$11.createIfNeeded(e.url);t.appendForwardSlash(),e$2b(e.token)&&t.setQueryParameters({token:e.token}),this._resource=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=u$_(e.tilingScheme,new g$13({ellipsoid:e.ellipsoid})),this._useTiles=u$_(e.usePreCachedTilesIfAvailable,!0),this._rectangle=u$_(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers;var i=e.credit;"string"==typeof i&&(i=new r$T(i)),this._credit=i,this.enablePickFeatures=u$_(e.enablePickFeatures,!0),this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var n,r=this,o=e.url;function a(t){var i=t.tileInfo;if(e$2b(i)){if(r._tileWidth=i.rows,r._tileHeight=i.cols,102100===i.spatialReference.wkid||102113===i.spatialReference.wkid)r._tilingScheme=new c$R({ellipsoid:e.ellipsoid});else{if(4326!==t.tileInfo.spatialReference.wkid){var o="Tile spatial reference WKID "+t.tileInfo.spatialReference.wkid+" is not supported.";return void(n=l$W.handleError(n,r,r._errorEvent,o,void 0,void 0,void 0,l))}r._tilingScheme=new g$13({ellipsoid:e.ellipsoid})}if(r._maximumLevel=t.tileInfo.lods.length-1,e$2b(t.fullExtent)){if(e$2b(t.fullExtent.spatialReference)&&e$2b(t.fullExtent.spatialReference.wkid))if(102100===t.fullExtent.spatialReference.wkid||102113===t.fullExtent.spatialReference.wkid){var a=new t$O,s=t.fullExtent,u=a.unproject(new o$1p(Math.max(s.xmin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(s.ymin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),c=a.unproject(new o$1p(Math.min(s.xmax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(s.ymax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));r._rectangle=new h$18(u.longitude,u.latitude,c.longitude,c.latitude)}else{if(4326!==t.fullExtent.spatialReference.wkid){var h="fullExtent.spatialReference WKID "+t.fullExtent.spatialReference.wkid+" is not supported.";return void(n=l$W.handleError(n,r,r._errorEvent,h,void 0,void 0,void 0,l))}r._rectangle=h$18.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax)}}else r._rectangle=r._tilingScheme.rectangle;e$2b(r._tileDiscardPolicy)||(r._tileDiscardPolicy=new u$i({missingImageUrl:A$o(r,0,0,r._maximumLevel).url,pixelsToCheck:[new o$1o(0,0),new o$1o(200,20),new o$1o(20,200),new o$1o(80,110),new o$1o(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),r._useTiles=!0}else r._useTiles=!1;e$2b(t.copyrightText)&&t.copyrightText.length>0&&(r._credit=new r$T(t.copyrightText)),r._ready=!0,r._readyPromise.resolve(!0),l$W.handleSuccess(n)}function s(e){var t="An error occurred while accessing "+r._resource.url+".";n=l$W.handleError(n,r,r._errorEvent,t,void 0,void 0,void 0,l),r._readyPromise.reject(new t$14(t))}function l(){o$1l(r._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJsonp(),a,s)}r.tablename=e.url,new l$15({name:o}).then((function(e){e.checkObjectStoreExit(r.tablename)?r._indexedDBScheduler=e:e.createObjectStore(r.tablename).then((function(){r._indexedDBScheduler=e}))})),r._indexedDBSetting={isOpen:!1,clear:function(){r._indexedDBScheduler.clear(r.tablename)},cache:[]},this._useTiles?l():(this._ready=!0,this._readyPromise.resolve(!0))}function A$o(e,t,i,n,r){var o;if(e._useTiles)o=e._resource.getDerivedResource({url:"tile/"+n+"/"+i+"/"+t,request:r});else{var a=e._tilingScheme.tileXYToNativeRectangle(t,i,n),s={bbox:a.west+","+a.south+","+a.east+","+a.north,size:e._tileWidth+","+e._tileHeight,format:"png",transparent:!0,f:"image"};e._tilingScheme.projection instanceof n$1b?(s.bboxSR=4326,s.imageSR=4326):(s.bboxSR=3857,s.imageSR=3857),e.layers&&(s.layers="show:"+e.layers),o=e._resource.getDerivedResource({url:"export",request:r,queryParameters:s})}return o}function Y$9(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function a$h(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=void 0,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new o$1o,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}function v$j(e){var t=e._framebuffers;if(e$2b(t)){for(var i=t.length,n=0;n<i;++n)t[n].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}}function D$i(e,t){v$j(e);for(var i=e._width,n=e._height,r=V$10.RGBA,o=t.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT,a=new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),s=Math.ceil(Math.log(Math.max(i,n))/Math.log(3)),l=new Array(s),u=0;u<s;++u)i=Math.max(Math.ceil(i/3),1),n=Math.max(Math.ceil(n/3),1),l[u]=new t$W({context:t,colorTextures:[new t$V({context:t,width:i,height:n,pixelFormat:r,pixelDatatype:o,sampler:a})]});var c=l[s-1].getColorTexture(0);e._previousLuminance=new t$W({context:t,colorTextures:[new t$V({context:t,width:c.width,height:c.height,pixelFormat:r,pixelDatatype:o,sampler:a})]}),e._framebuffers=l}function x$m(e){var t=e._commands;if(e$2b(t)){for(var i=t.length,n=0;n<i;++n)t[n].shaderProgram.destroy();e._commands=void 0}}function F$g(e,t){var i;if(0===t)i={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{var n=e._framebuffers[t-1].getColorTexture(0);i={colorTexture:function(){return n},colorTextureDimensions:function(){return n.dimensions}}}return i.minMaxLuminance=function(){return e._minMaxLuminance},i.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},i}function S$g(e,t){var i="uniform sampler2D colorTexture; \nvarying vec2 v_textureCoordinates; \nfloat sampleTexture(vec2 offset) { \n";return i+=0===e?" vec4 color = texture2D(colorTexture, v_textureCoordinates + offset); \n return czm_luminance(color.rgb); \n":" return texture2D(colorTexture, v_textureCoordinates + offset).r; \n",i+="}\n\n",i+="uniform vec2 colorTextureDimensions; \nuniform vec2 minMaxLuminance; \nuniform sampler2D previousLuminance; \nvoid main() { \n float color = 0.0; \n float xStep = 1.0 / colorTextureDimensions.x; \n float yStep = 1.0 / colorTextureDimensions.y; \n int count = 0; \n for (int i = 0; i < 3; ++i) { \n for (int j = 0; j < 3; ++j) { \n vec2 offset; \n offset.x = -xStep + float(i) * xStep; \n offset.y = -yStep + float(j) * yStep; \n if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) { \n continue; \n } \n color += sampleTexture(offset); \n ++count; \n } \n } \n if (count > 0) { \n color /= float(count); \n } \n",e===t-1&&(i+=" float previous = texture2D(previousLuminance, vec2(0.5)).r; \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n color = previous + (color - previous) / (60.0 * 1.5); \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n"),i+=" gl_FragColor = vec4(color); \n} \n"}function A$n(e,t){x$m(e);for(var i=e._framebuffers,n=i.length,r=new Array(n),o=0;o<n;++o)r[o]=t.createViewportQuadCommand(S$g(o,n),{framebuffer:i[o],uniformMap:F$g(e,o)});e._commands=r}e$h.loadImage=function(e,t,i){o$1q.defined("url",t);var n=t$11.createIfNeeded(t);return e$2b(i)?n.fetchArrayBuffer():m$j.test(n.url)?k$V(n):p$g.test(n.url)?a$P(n):c$d.test(n.url)?(e.flipY=!0,B$M(n)):e$2b(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(e$2b(e._customRequestHeaders)&&(n.headers=p$19(n.headers,e._customRequestHeaders)),n.fetchBlob())},Object.defineProperties(b$p.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),b$p.prototype.getTileCredits=function(e,t,i){},b$p.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=A$o(this,e,t,i,n);if(e$2b(a$O.CREDENTIAL)&&(e$2b(a$O.CREDENTIAL._keymap[this._baseUrl])?r.url=a$O.addTokenWithKey(this._baseUrl,r.url):r.url=a$O.addToken(r.url)),n.quadKey=Y$9(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(e$2b(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2b(o)?o$1l(o,(function(e){return e$2b(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$h.loadImage(this,r)}return e$h.loadImage(this,r)}return e$h.loadImage(this,r)},b$p.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$16("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures){var o,a,s,l=this._tilingScheme.tileXYToNativeRectangle(e,t,i);if(this._tilingScheme.projection instanceof n$1b)o=e$2a.toDegrees(n),a=e$2a.toDegrees(r),s="4326";else{var u=this._tilingScheme.projection.project(new a$18(n,r,0));o=u.x,a=u.y,s="3857"}var c="visible";e$2b(this._layers)&&(c+=":"+this._layers);var h={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:o+","+a,mapExtent:l.west+","+l.south+","+l.east+","+l.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:s,layers:c};return this._resource.getDerivedResource({url:"identify",queryParameters:h}).fetchJson().then((function(e){var t=[],i=e.results;if(!e$2b(i))return t;for(var n=0;n<i.length;++n){var r=i[n],o=new o$q;if(o.data=r,o.name=r.value,o.properties=r.attributes,o.configureDescriptionFromProperties(r.attributes),"esriGeometryPoint"===r.geometryType&&r.geometry){var a=r.geometry.spatialReference&&r.geometry.spatialReference.wkid?r.geometry.spatialReference.wkid:4326;if(4326===a||4283===a)o.position=a$18.fromDegrees(r.geometry.x,r.geometry.y,r.geometry.z);else if(102100===a||900913===a||3857===a){var s=new t$O;o.position=s.unproject(new o$1p(r.geometry.x,r.geometry.y,r.geometry.z))}}t.push(o)}return t}))}},Object.defineProperties(a$h.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){var e=this._framebuffers;if(e$2b(e))return e[e.length-1].getColorTexture(0)}}}),a$h.prototype.clear=function(e){var t=this._framebuffers;if(e$2b(t)){var i=this._clearCommand;e$2b(i)||(i=this._clearCommand=new t$X({color:new e$1U(0,0,0,0),framebuffer:void 0}));for(var n=t.length,r=0;r<n;++r)i.framebuffer=t[r],i.execute(e)}},a$h.prototype.update=function(e){var t=e.drawingBufferWidth,i=e.drawingBufferHeight;(t!==this._width||i!==this._height)&&(this._width=t,this._height=i,D$i(this,e),A$n(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;var n=this._framebuffers,r=n[n.length-1];n[n.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance,this._previousLuminance=r},a$h.prototype.execute=function(e,t){this._colorTexture=t;var i=this._commands;if(e$2b(i))for(var n=i.length,r=0;r<n;++r)i[r].execute(e)},a$h.prototype.isDestroyed=function(){return!1},a$h.prototype.destroy=function(){return v$j(this),x$m(this),i$10(this)};var A$m={AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"},I$k=Object.freeze(A$m),e$g;function A$l(e){}function o$p(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url))throw new t$16("options.url is required.");this._key=e$11.getKey(e.key),this._resource=t$11.createIfNeeded(e.url),this._resource.appendForwardSlash(),this._tileProtocol=e.tileProtocol,this._mapStyle=u$_(e.mapStyle,I$k.AERIAL),this._culture=u$_(e.culture,""),this._tileDiscardPolicy=e.tileDiscardPolicy,e$2b(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new A$l),this._proxy=e.proxy,this._credit=new r$T('<a href="http://www.bing.com"><img src="'+o$p.logoUrl+'" title="Bing Imagery"/></a>'),this.defaultGamma=1,this._tilingScheme=new c$R({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=u$_(e.maximumLevel,void 0),this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var t=this._tileProtocol;e$2b(t)?t.length>0&&":"===t[t.length-1]&&(t=t.substr(0,t.length-1)):t="http:"===document.location.protocol?"http":"https";var i,n=this._resource.getDerivedResource({url:"REST/v1/Imagery/Metadata/"+this._mapStyle,queryParameters:{incl:"ImageryProviders",key:this._key,uriScheme:t}}),r=this;function o(e){if(1===e.resourceSets.length){var t=e.resourceSets[0].resources[0];r._tileWidth=t.imageWidth,r._tileHeight=t.imageHeight,r._maximumLevel=e$2b(r._maximumLevel)?r._maximumLevel:t.zoomMax-1,r._imageUrlSubdomains=t.imageUrlSubdomains,r._imageUrlTemplate=t.imageUrl;var n=r._attributionList=t.imageryProviders;n||(n=r._attributionList=[]);for(var o=0,s=n.length;o<s;++o){var l=n[o];if(l.credit instanceof r$T)break;l.credit=new r$T(l.attribution);for(var u=l.coverageAreas,c=0,h=l.coverageAreas.length;c<h;++c){var d=u[c],f=d.bbox;d.bbox=new h$18(e$2a.toRadians(f[1]),e$2a.toRadians(f[0]),e$2a.toRadians(f[3]),e$2a.toRadians(f[2]))}}r._ready=!0,r._readyPromise.resolve(!0),l$W.handleSuccess(i)}else a()}function a(e){var t="An error occurred while accessing "+n.url+".";i=l$W.handleError(i,r,r._errorEvent,t,void 0,void 0,void 0,l),r._readyPromise.reject(new t$14(t))}var s=n.url;function l(){var e=n.fetchJsonp("jsonp");o$p._metadataCache[s]=e,e.then(o).otherwise(a)}var u=o$p._metadataCache[s];e$2b(u)?u.then(o).otherwise(a):l()}A$l.prototype.isReady=function(){return!0},A$l.prototype.shouldDiscardImage=function(e){return A$l.EMPTY_IMAGE===e},Object.defineProperties(A$l,{EMPTY_IMAGE:{get:function(){return e$2b(e$g)||((e$g=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),e$g}}}),Object.defineProperties(o$p.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});var z$i=new h$18;function B$d(e,t,i,n,r){var o=e._imageUrlTemplate,a=e._imageUrlSubdomains,s=(t+i+n)%a.length;return e._resource.getDerivedResource({url:o,request:r,templateValues:{quadkey:o$p.tileXYToQuadKey(t,i,n),subdomain:a[s],culture:e._culture},queryParameters:{n:"z"}})}o$p.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$16("getTileCredits must not be called before the imagery provider is ready.");var n=this._tilingScheme.tileXYToRectangle(e,t,i,z$i);return O$g(this._attributionList,i,n)},o$p.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=e$h.loadImage(this,B$d(this,e,t,i,n));if(e$2b(r))return r.otherwise((function(e){return e$2b(e.blob)&&0===e.blob.size?A$l.EMPTY_IMAGE:o$1l.reject(e)}))},o$p.prototype.pickFeatures=function(e,t,i,n,r){},o$p.tileXYToQuadKey=function(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;0!=(e&o)&&(a|=1),0!=(t&o)&&(a|=2),n+=a}return n},o$p.quadKeyToTileXY=function(e){for(var t=0,i=0,n=e.length-1,r=n;r>=0;--r){var o=1<<r,a=+e[n-r];0!=(1&a)&&(t|=o),0!=(2&a)&&(i|=o)}return{x:t,y:i,level:n}},o$p._logoUrl=void 0,Object.defineProperties(o$p,{logoUrl:{get:function(){return e$2b(o$p._logoUrl)||(o$p._logoUrl=n$15("Assets/Images/bing_maps_credit.png")),o$p._logoUrl},set:function(e){o$1q.defined("value",e),o$p._logoUrl=e}}});var K$b=new h$18;function O$g(e,t,i){++t;for(var n=[],r=0,o=e.length;r<o;++r){for(var a=e[r],s=a.coverageAreas,l=!1,u=0,c=a.coverageAreas.length;!l&&u<c;++u){var h=s[u];if(t>=h.zoomMin&&t<=h.zoomMax)e$2b(h$18.intersection(i,h.bbox,K$b))&&(l=!0)}l&&n.push(a.credit)}return n}o$p._metadataCache={};var $$f="uniform sampler2D u_MainTex;\nuniform vec2 u_MainTex_TexelSize;\nuniform float u_Threshold;\nuniform float u_Params;\nvarying vec2 v_textureCoordinates;\nconst vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);\n// Better, temporally stable box filtering\n// [Jimenez14] http://goo.gl/eomGso\n// . . . . . . .\n// . A . B . C .\n// . . D . E . .\n// . F . G . H .\n// . . I . J . .\n// . K . L . M .\n// . . . . . . .\n#define inline\nvec4 DownsampleBox13Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\n vec4 A = texture2D(samplerTex, uv + texelSize * vec2(-1.0, -1.0));\n vec4 B = texture2D(samplerTex, uv + texelSize * vec2( 0.0, -1.0));\n vec4 C = texture2D(samplerTex, uv + texelSize * vec2( 1.0, -1.0));\n vec4 D = texture2D(samplerTex, uv + texelSize * vec2(-0.5, -0.5));\n vec4 E = texture2D(samplerTex, uv + texelSize * vec2( 0.5, -0.5));\n vec4 F = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 0.0));\n vec4 G = texture2D(samplerTex, uv );\n vec4 H = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 0.0));\n vec4 I = texture2D(samplerTex, uv + texelSize * vec2(-0.5, 0.5));\n vec4 J = texture2D(samplerTex, uv + texelSize * vec2( 0.5, 0.5));\n vec4 K = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 1.0));\n vec4 L = texture2D(samplerTex, uv + texelSize * vec2( 0.0, 1.0));\n vec4 M = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 1.0));\n vec2 div = (1.0 / 4.0) * vec2(0.5, 0.125);\n vec4 o = (D + E + I + J) * div.x;\n o += (A + B + G + F) * div.y;\n o += (B + C + H + G) * div.y;\n o += (F + G + L + K) * div.y;\n o += (G + H + M + L) * div.y;\n return o;\n}\n\n// Quadratic color thresholding\n// curve = (threshold - knee, knee * 2, 0.25 / knee)\nvec4 QuadraticThreshold(vec4 color, float threshold, vec3 curve)\n{\n // Pixel brightness\n float br = max(max(color.r, color.g), color.b);\n // Under-threshold part: quadratic curve\n float rq = clamp(br - curve.x, 0.0, curve.y);\n rq = curve.z * rq * rq;\n // Combine and apply the brightness response curve.\n color *= max(rq, br - threshold) / max(br, 1.0e-4);\n return color;\n}\n\nvec4 Prefilter(vec4 color, vec2 uv)\n{\n float br = max(max(color.r, color.g), color.b);\n if(br < u_Threshold)\n {\n color = vec4(0.0);\n }\n return color;\n}\n\nvec4 SafeHDR(vec4 c)\n{\n return min(c, 65504.0);\n}\n\nvoid main()\n{\n vec4 color = DownsampleBox13Tap(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy);\n gl_FragColor = Prefilter(SafeHDR(color), v_textureCoordinates);\n}\n",tt$4="uniform sampler2D u_MainTex;\nuniform vec2 u_MainTex_TexelSize;\nvarying vec2 v_textureCoordinates;\n#define inline\nvec4 DownsampleBox13Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\n vec4 A = texture2D(samplerTex, uv + texelSize * vec2(-1.0, -1.0));\n vec4 B = texture2D(samplerTex, uv + texelSize * vec2( 0.0, -1.0));\n vec4 C = texture2D(samplerTex, uv + texelSize * vec2( 1.0, -1.0));\n vec4 D = texture2D(samplerTex, uv + texelSize * vec2(-0.5, -0.5));\n vec4 E = texture2D(samplerTex, uv + texelSize * vec2( 0.5, -0.5));\n vec4 F = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 0.0));\n vec4 G = texture2D(samplerTex, uv );\n vec4 H = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 0.0));\n vec4 I = texture2D(samplerTex, uv + texelSize * vec2(-0.5, 0.5));\n vec4 J = texture2D(samplerTex, uv + texelSize * vec2( 0.5, 0.5));\n vec4 K = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 1.0));\n vec4 L = texture2D(samplerTex, uv + texelSize * vec2( 0.0, 1.0));\n vec4 M = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 1.0));\n vec2 div = (1.0 / 4.0) * vec2(0.5, 0.125);\n vec4 o = (D + E + I + J) * div.x;\n o += (A + B + G + F) * div.y;\n o += (B + C + H + G) * div.y;\n o += (F + G + L + K) * div.y;\n o += (G + H + M + L) * div.y;\n return o;\n}\n// Standard box filtering\n#define inline\nvec4 DownsampleBox4Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\n vec4 d = texelSize.xyxy * vec4(-1.0, -1.0, 1.0, 1.0);\n vec4 s;\n s = texture2D(samplerTex, uv + d.xy);\n s += texture2D(samplerTex, uv + d.zy);\n s += texture2D(samplerTex, uv + d.xw);\n s += texture2D(samplerTex, uv + d.zw);\n return s * (1.0 / 4.0);\n}\nvoid main()\n{\n vec4 color = DownsampleBox13Tap(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy);\n gl_FragColor = color;\n}\n",et$5="uniform sampler2D u_MainTex;\nuniform sampler2D u_BloomTex;\nuniform vec2 u_MainTex_TexelSize;\nuniform float u_SampleScale;\nvarying vec2 v_textureCoordinates;\n\nvec4 Combine(vec4 bloom, vec2 uv)\n{\n vec4 color = texture2D(u_BloomTex, uv);\n return bloom + color;\n}\n\n// 9-tap bilinear upsampler (tent filter)\n#define inline\nvec4 UpsampleTent(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\n vec4 d = texelSize.xyxy * vec4(1.0, 1.0, -1.0, 0.0) * sampleScale;\n vec4 s;\n s = texture2D(samplerTex, uv - d.xy);\n s += texture2D(samplerTex, uv - d.wy) * 2.0;\n s += texture2D(samplerTex, uv - d.zy);\n s += texture2D(samplerTex, uv + d.zw) * 2.0;\n s += texture2D(samplerTex, uv ) * 4.0;\n s += texture2D(samplerTex, uv + d.xw) * 2.0;\n s += texture2D(samplerTex, uv + d.zy);\n s += texture2D(samplerTex, uv + d.wy) * 2.0;\n s += texture2D(samplerTex, uv + d.xy);\n return s * (1.0 / 16.0);\n}\n\n// Standard box filtering\nvec4 UpsampleBox(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\n vec4 d = texelSize.xyxy * vec4(-1.0, -1.0, 1.0, 1.0) * (sampleScale * 0.5);\n vec4 s;\n s = texture2D(samplerTex, uv + d.xy);\n s += texture2D(samplerTex, uv + d.zy);\n s += texture2D(samplerTex, uv + d.xw);\n s += texture2D(samplerTex, uv + d.zw);\n return s * (1.0 / 4.0);\n}\n\nvoid main()\n{\n vec4 bloom = UpsampleTent(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy, vec4(u_SampleScale));\n gl_FragColor = Combine(bloom, v_textureCoordinates);\n}",E$i=16;function e$f(){this._fbo=void 0,this._downSamplePassState=new n$Z,this._upSamplePassState=new n$Z,this._show=!1,this._context=void 0,this.anamorphicRatio=0,this.diffusion=7,this._iterations=0,this._sampleScale=1,this._dirtTileOffset=new e$29(1,1,0,0),this._shaderSettings=new o$1p,this._bloomColor=new o$1p(1,1,1),this._threshold=0,this._softKnee=.5,this._clamp=65472,this._params=1,this._intensity=1.34,this._dirtIntensity=0,this._dirtTexUrl=n$15("Assets/Textures/NoiseAndGrain.png"),this._dirtTexture=void 0,this._lastUpFBO=void 0,this._Pyramid=[];for(var e=0;e<E$i;e++){this._Pyramid.push({})}this._clearCommand=new t$X({color:new e$1U})}Object.defineProperties(e$f.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(e$2b(this._owner)&&this._owner.bloomShowChange(e),this._show=e)}},bloomIntensity:{get:function(){return this._intensity},set:function(e){this._intensity=e}},bloomDirtTexIntensity:{get:function(){return this._dirtIntensity},set:function(e){this._dirtIntensity=e}},threshold:{get:function(){return this._threshold},set:function(e){this._threshold=e}}}),e$f.prototype.clear=function(e,t){for(var i=0;i<this._iterations;i++){var n=this._clearCommand;n.framebuffer=this._Pyramid[i].downSampleFBO,e$1U.clone(u$_(t,e$1U.BLACK),n.color),n.execute(e),n.framebuffer=this._Pyramid[i].upSampleFBO,e$1U.clone(u$_(t,e$1U.BLACK),n.color),n.execute(e)}};var h$k=new o$1o;e$f.prototype.execute=function(e,t){var i=this,n=this._fbo;e$2b(this._context)&&this._context.numPostEffectFilterObject>0&&(n=this._scene._postEffectFilterFramebuffer.renderTexture._fb);for(var r=0;r<this._iterations;r++){var o=this._Pyramid[r].downCommand;h$k.x=1/n.getColorTexture(0).width,h$k.y=1/n.getColorTexture(0).height,o.uniformMap.u_MainTex=function(){return n.getColorTexture(0)},o.uniformMap.u_MainTex_TexelSize=function(){return h$k},o.uniformMap.u_Threshold=function(){return i._threshold},o.uniformMap.u_Params=function(){return i._params},o.execute(e,this._downSamplePassState),n=this._Pyramid[r].downSampleFBO}var a=this._Pyramid[this._iterations-1].downSampleFBO;for(r=this._iterations-2;r>=0;r--){var s=this._Pyramid[r].downSampleFBO,l=this._Pyramid[r].upSampleFBO,u=this._Pyramid[r].upCommand;h$k.x=1/a.getColorTexture(0).width,h$k.y=1/a.getColorTexture(0).height,u.uniformMap.u_BloomTex=function(){return s.getColorTexture(0)},u.uniformMap.u_MainTex=function(){return a.getColorTexture(0)},u.uniformMap.u_MainTex_TexelSize=function(){return h$k},u.uniformMap.u_SampleScale=function(){return i._sampleScale},u.execute(e,this._downSamplePassState),a=l}this._lastUpFBO=a};var rt$6=new f$18;e$f.prototype.update=function(e,t,i){this._context=t.context,this._downSamplePassState.context=t.context,this._upSamplePassState.context=t.context,this._scene=i;var n=e.drawingBufferWidth,r=e.drawingBufferHeight,o=this;e$2b(this._dirtTexture)||o$1l(t$T(o._dirtTexUrl),(function(t){o._dirtTexture=new t$V({context:e,source:t,pixelFormat:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE})}));var a=e$2a.clamp(this.anamorphicRatio,-1,1),s=a<0?-a:0,l=a>0?a:0,u=Math.floor(n/(2-s)),c=Math.floor(r/(2-l)),h=Math.max(u,c),d=Math.log(h)/Math.log(2)+Math.min(this.diffusion,10)-10,f=Math.floor(d),p=e$2a.clamp(f,1,E$i),_=!1;p!=this._iterations&&(this._iterations=p,_=!0),this._sampleScale=.5+d-f;var m=1;e$2b(this._dirtTexture)&&(m=this._dirtTexture.width/this._dirtTexture.height);var g=e.drawingBufferWidth/e.drawingBufferHeight;m>g?(this._dirtTileOffset.x=g/m,this._dirtTileOffset.z=.5*(1-this._dirtTileOffset.x)):g>m&&(this._dirtTileOffset.y=m/g,this._dirtTileOffset.w=.5*(1-this._dirtTileOffset.y));var x=Math.exp(this._intensity/10*.6931471805599453)-1;this._shaderSettings.x=this._sampleScale,this._shaderSettings.y=x,this._shaderSettings.z=this._dirtIntensity;var v=this._Pyramid[0].downSampleFBO,y=e$2b(v)&&v.getColorTexture(0)||void 0;if(!e$2b(y)||y.width!==u||y.height!==c||_){this.destroyFBO();for(var $=0;$<this._iterations;$++){var b,T={};b=0==$?e.createViewportQuadCommand($$f,{shaderProgramName:"BloomPrefilter",uniformMap:T,owner:this}):e.createViewportQuadCommand(tt$4,{shaderProgramName:"BloomDownsample",uniformMap:T,owner:this});var C=e.createViewportQuadCommand(et$5,{shaderProgramName:"BloomUpsample",uniformMap:T,owner:this});this._Pyramid[$].downCommand=b,this._Pyramid[$].upCommand=C;var S=rt$6;S.width=u,S.height=c;var w=d$1m.fromCache({viewport:S});b.renderState=w,C.renderState=w;var E=e.colorBufferHalfFloat?_$$.HALF_FLOAT:_$$.FLOAT,P=new t$W({context:e,colorTextures:[new t$V({context:e,width:u,height:c,pixelDatatype:E})]}),A=new t$W({context:e,colorTextures:[new t$V({context:e,width:u,height:c,pixelDatatype:E})]});this._Pyramid[$].downSampleFBO=P,this._Pyramid[$].upSampleFBO=A,b.framebuffer=P,C.framebuffer=A,u/=2,u=Math.max(u,1),c=Math.max(c/2,1)}}},e$f.prototype.gammaToLinearSpace=function(e){return e*(e*(.305306011*e+.682171111)+.012522878)},e$f.prototype.setInputFBO=function(e){this._fbo=e},e$f.prototype.getBloomTexture=function(){return this._lastUpFBO.getColorTexture(0)},e$f.prototype.getBloomDirtTexture=function(){return e$2b(this._dirtTexture)?this._dirtTexture:this._context.defaultTexture},e$f.prototype.getBloomTextureTexelSize=function(){return h$k.x=1/this._lastUpFBO.getColorTexture(0).width,h$k.y=1/this._lastUpFBO.getColorTexture(0).height,h$k},e$f.prototype.getDirtTileOffset=function(){return this._dirtTileOffset},e$f.prototype.getBloomSettings=function(){return this._shaderSettings},e$f.prototype.getBloomColor=function(){return this._bloomColor},e$f.prototype.isDestroyed=function(){return!1},e$f.prototype.destroyFBO=function(){for(var e=0;e<this._iterations;e++)if(e$2b(this._Pyramid[e].downSampleFBO)){var t=this._Pyramid[e].downSampleFBO,i=this._Pyramid[e].upSampleFBO;t.destroy(),i.destroy()}},e$f.prototype.destroy=function(){this.destroyFBO();for(var e=0;e<this._iterations;e++){var t=this._Pyramid[e].downCommand,i=this._Pyramid[e].upCommand;t.shaderProgram.destroy(),i.shaderProgram.destroy()}return i$10(this)};var w$i="varying vec2 v_textureCoordinates;\nconst float M_PI = 3.141592653589793;\n\nfloat vdcRadicalInverse(int i)\n{\n float r;\n float base = 2.0;\n float value = 0.0;\n float invBase = 1.0 / base;\n float invBi = invBase;\n for (int x = 0; x < 100; x++)\n {\n if (i <= 0)\n {\n break;\n }\n r = mod(float(i), base);\n value += r * invBi;\n invBi *= invBase;\n i = int(float(i) * invBase);\n }\n return value;\n}\n\nvec2 hammersley2D(int i, int N)\n{\n return vec2(float(i) / float(N), vdcRadicalInverse(i));\n}\n\nvec3 importanceSampleGGX(vec2 xi, float roughness, vec3 N)\n{\n float a = roughness * roughness;\n float phi = 2.0 * M_PI * xi.x;\n float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\n float sinTheta = sqrt(1.0 - cosTheta * cosTheta);\n vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\n vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\n vec3 tangentX = normalize(cross(upVector, N));\n vec3 tangentY = cross(N, tangentX);\n return tangentX * H.x + tangentY * H.y + N * H.z;\n}\n\nfloat G1_Smith(float NdotV, float k)\n{\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\nfloat G_Smith(float roughness, float NdotV, float NdotL)\n{\n float k = roughness * roughness / 2.0;\n return G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\n\nvec2 integrateBrdf(float roughness, float NdotV)\n{\n vec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\n float A = 0.0;\n float B = 0.0;\n const int NumSamples = 1024;\n for (int i = 0; i < NumSamples; i++)\n {\n vec2 xi = hammersley2D(i, NumSamples);\n vec3 H = importanceSampleGGX(xi, roughness, vec3(0.0, 0.0, 1.0));\n vec3 L = 2.0 * dot(V, H) * H - V;\n float NdotL = clamp(L.z, 0.0, 1.0);\n float NdotH = clamp(H.z, 0.0, 1.0);\n float VdotH = clamp(dot(V, H), 0.0, 1.0);\n if (NdotL > 0.0)\n {\n float G = G_Smith(roughness, NdotV, NdotL);\n float G_Vis = G * VdotH / (NdotH * NdotV);\n float Fc = pow(1.0 - VdotH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n return vec2(A, B) / float(NumSamples);\n}\n\nvoid main()\n{\n gl_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n",x$l="varying v_textureCoordinates : vec2<f32>;\nconst M_PI = 3.141592653589793;\n\nfn vdcRadicalInverse(inputI : i32) -> f32\n{\n var i = inputI;\n var r : f32;\n var base = 2.0;\n var value = 0.0;\n var invBase = 1.0 / base;\n var invBi = invBase;\n for (var x = 0; x < 100; x++)\n {\n if (i <= 0)\n {\n break;\n }\n r = (f32(i) - (base * floor((f32(i) / base))));\n //r = mod(f32(i), base);\n value += r * invBi;\n invBi *= invBase;\n i = i32(f32(i) * invBase);\n }\n return value;\n}\n\nfn hammersley2D(i : i32, N : i32) -> vec2<f32>\n{\n return vec2(f32(i) / f32(N), vdcRadicalInverse(i));\n}\n\nfn importanceSampleGGX(xi : vec2<f32>, roughness : f32, N : vec3<f32>) -> vec3<f32>\n{\n var a = roughness * roughness;\n var phi = 2.0 * M_PI * xi.x;\n var cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\n var sinTheta = sqrt(1.0 - cosTheta * cosTheta);\n var H = vec3<f32>(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\n var upVector : vec3<f32>;\n if(abs(N.z) < 0.999){\n upVector = vec3<f32>(0.0, 0.0, 1.0);\n }\n else{\n upVector = vec3<f32>(1.0, 0.0, 0.0);\n }\n var tangentX = normalize(cross(upVector, N));\n var tangentY = cross(N, tangentX);\n return tangentX * H.x + tangentY * H.y + N * H.z;\n}\n\nfn G1_Smith(NdotV : f32, k : f32) -> f32\n{\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\nfn G_Smith(roughness : f32, NdotV : f32, NdotL : f32) -> f32\n{\n var k = roughness * roughness / 2.0;\n return G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\n\nfn integrateBrdf(roughness : f32, NdotV : f32) -> vec2<f32>\n{\n var V = vec3<f32>(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\n var A = 0.0;\n var B = 0.0;\n const NumSamples = 1024;\n for (var i = 0; i < NumSamples; i++)\n {\n var xi = hammersley2D(i, NumSamples);\n var H = importanceSampleGGX(xi, roughness, vec3<f32>(0.0, 0.0, 1.0));\n var L = 2.0 * dot(V, H) * H - V;\n var NdotL = clamp(L.z, 0.0, 1.0);\n var NdotH = clamp(H.z, 0.0, 1.0);\n var VdotH = clamp(dot(V, H), 0.0, 1.0);\n if (NdotL > 0.0)\n {\n var G = G_Smith(roughness, NdotV, NdotL);\n var G_Vis = G * VdotH / (NdotH * NdotV);\n var Fc = pow(1.0 - VdotH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n return vec2<f32>(A, B) / f32(NumSamples);\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n gl_FragColor = vec4<f32>(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n";function t$d(){this._framebuffer=void 0,this._colorTexture=void 0,this._drawCommand=void 0}function b$o(e,t){var i=e._framebuffer,n=t.webgpu?x$l:w$i,r=t.createViewportQuadCommand(n,{framebuffer:i,renderState:d$1m.fromCache({viewport:new f$18(0,0,256,256)}),shaderProgramName:"BrdfLut",useWGSL:t.webgpu});e._drawCommand=r}function y$k(e,t){var i=new t$V({context:t,width:256,height:256,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})});e._colorTexture=i;var n=new t$W({context:t,colorTextures:[i],destroyAttachments:!1});e._framebuffer=n}Object.defineProperties(t$d.prototype,{colorTexture:{get:function(){return this._colorTexture}}}),t$d.prototype.update=function(e){if(!e$2b(this._colorTexture)){var t=e.context;y$k(this,t),b$o(this,t),this._drawCommand.execute(t),this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}},t$d.prototype.isDestroyed=function(){return!1},t$d.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),i$10(this)};var e$e={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4},Q$c=Object.freeze(e$e);function d$p(e,t){var i=e;return e$2b(t)&&(i+="+"+t),i}function S$f(e,t){o$1o.clone(e.distance.startPosition,t.distance.startPosition),o$1o.clone(e.distance.endPosition,t.distance.endPosition),o$1o.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),o$1o.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function A$k(e,t,i){var n=d$p(Q$c.PINCH,t),r=e._update,o=e._isDown,a=e._eventStartPosition,s=e._pressTime,l=e._releaseTime;r[n]=!0,o[n]=!1,a[n]=new o$1o;var u=e._movement[n];e$2b(u)||(u=e._movement[n]={}),u.distance={startPosition:new o$1o,endPosition:new o$1o},u.angleAndHeight={startPosition:new o$1o,endPosition:new o$1o},u.prevAngle=0,e._eventHandler.setInputAction((function(t){e._buttonsDown++,o[n]=!0,s[n]=new Date,o$1o.lerp(t.position1,t.position2,.5,a[n])}),G$I.PINCH_START,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),o[n]=!1,l[n]=new Date}),G$I.PINCH_END,t),e._eventHandler.setInputAction((function(e){if(o[n]){r[n]?(S$f(e,u),r[n]=!1,u.prevAngle=u.angleAndHeight.startPosition.x):(o$1o.clone(e.distance.endPosition,u.distance.endPosition),o$1o.clone(e.angleAndHeight.endPosition,u.angleAndHeight.endPosition));for(var t=u.angleAndHeight.endPosition.x,a=u.prevAngle,s=2*Math.PI;t>=a+Math.PI;)t-=s;for(;t<a-Math.PI;)t+=s;u.angleAndHeight.endPosition.x=-t*i.clientWidth/12,u.angleAndHeight.startPosition.x=-a*i.clientWidth/12}}),G$I.PINCH_MOVE,t)}function M$k(e,t){var i=d$p(Q$c.WHEEL,t),n=e._update;n[i]=!0;var r=e._movement[i];e$2b(r)||(r=e._movement[i]={}),r.startPosition=new o$1o,r.endPosition=new o$1o,e._eventHandler.setInputAction((function(e){var t=15*e$2a.toRadians(e);n[i]?(o$1o.clone(o$1o.ZERO,r.startPosition),r.endPosition.x=0,r.endPosition.y=t,n[i]=!1):r.endPosition.y=r.endPosition.y+t}),G$I.WHEEL,t)}function H$p(e,t,i){var n=d$p(i,t),r=e._isDown,o=e._eventStartPosition,a=e._pressTime,s=e._releaseTime;r[n]=!1,o[n]=new o$1o;var l,u,c=e._lastMovement[n];e$2b(c)||(c=e._lastMovement[n]={startPosition:new o$1o,endPosition:new o$1o,valid:!1}),i===Q$c.LEFT_DRAG?(l=G$I.LEFT_DOWN,u=G$I.LEFT_UP):i===Q$c.RIGHT_DRAG?(l=G$I.RIGHT_DOWN,u=G$I.RIGHT_UP):i===Q$c.MIDDLE_DRAG&&(l=G$I.MIDDLE_DOWN,u=G$I.MIDDLE_UP),e._eventHandler.setInputAction((function(t){e._buttonsDown++,c.valid=!1,r[n]=!0,a[n]=new Date,o$1o.clone(t.position,o[n])}),l,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[n]=!1,s[n]=new Date}),u,t)}function T$i(e,t){o$1o.clone(e.startPosition,t.startPosition),o$1o.clone(e.endPosition,t.endPosition)}function y$j(e,t){var i=e._update,n=e._movement,r=e._lastMovement,o=e._isDown;for(var a in Q$c)if(Q$c.hasOwnProperty(a)){var s=Q$c[a];if(e$2b(s)){var l=d$p(s,t);i[l]=!0,e$2b(e._lastMovement[l])||(e._lastMovement[l]={startPosition:new o$1o,endPosition:new o$1o,valid:!1}),e$2b(e._movement[l])||(e._movement[l]={startPosition:new o$1o,endPosition:new o$1o})}}e._eventHandler.setInputAction((function(a){for(var s in Q$c)if(Q$c.hasOwnProperty(s)){var l=Q$c[s];if(e$2b(l)){var u=d$p(l,t);o[u]&&(i[u]?(T$i(n[u],r[u]),r[u].valid=!0,T$i(a,n[u]),i[u]=!1):o$1o.clone(a.endPosition,n[u].endPosition))}}o$1o.clone(a.endPosition,e._currentMousePosition)}),G$I.MOUSE_MOVE,t)}function L$l(e){switch(e){case"W".charCodeAt(0):return"moveForward";case"S".charCodeAt(0):return"moveBackward";case"D".charCodeAt(0):return"moveRight";case"A".charCodeAt(0):return"moveLeft";default:return}}function G$i(e){document.addEventListener("keydown",(function(t){var i=L$l(t.keyCode);typeof i<"u"&&(e._flags[i]=!0)}),!1)}function W$k(e){document.addEventListener("keyup",(function(t){var i=L$l(t.keyCode);typeof i<"u"&&(e._flags[i]=!1)}),!1)}function l$l(e){if(!e$2b(e))throw new t$16("canvas is required.");for(var t in this._eventHandler=new g$J(e,!0),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new o$1o,M$k(this,void 0),A$k(this,void 0,e),H$p(this,void 0,Q$c.LEFT_DRAG),H$p(this,void 0,Q$c.RIGHT_DRAG),H$p(this,void 0,Q$c.MIDDLE_DRAG),y$j(this,void 0),Aa$1)if(Aa$1.hasOwnProperty(t)){var i=Aa$1[t];e$2b(i)&&(M$k(this,i),A$k(this,i,e),H$p(this,i,Q$c.LEFT_DRAG),H$p(this,i,Q$c.RIGHT_DRAG),H$p(this,i,Q$c.MIDDLE_DRAG),y$j(this,i))}this._flags={looking:!1,moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1},G$i(this),W$k(this)}function r$n(e,t,i,n,r){this.featurePropertiesDirty=!1}function a$g(e){o$1q.typeOf.object("options",e),o$1q.typeOf.number("options.pass",e.pass),this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}function h$j(){}Object.defineProperties(l$l.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){var e=!(this._update[d$p(Q$c.WHEEL)]&&this._update[d$p(Q$c.WHEEL,Aa$1.SHIFT)]&&this._update[d$p(Q$c.WHEEL,Aa$1.CTRL)]&&this._update[d$p(Q$c.WHEEL,Aa$1.ALT)]);return this._buttonsDown>0||e}}}),l$l.prototype.isMoving=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=d$p(e,t);return!this._update[i]},l$l.prototype.getMovement=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=d$p(e,t);return this._movement[i]},l$l.prototype.getLastMovement=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=d$p(e,t),n=this._lastMovement[i];if(n.valid)return n},l$l.prototype.isButtonDown=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=d$p(e,t);return this._isDown[i]},l$l.prototype.getStartMousePosition=function(e,t){if(!e$2b(e))throw new t$16("type is required.");if(e===Q$c.WHEEL)return this._currentMousePosition;var i=d$p(e,t);return this._eventStartPosition[i]},l$l.prototype.getButtonPressTime=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=d$p(e,t);return this._pressTime[i]},l$l.prototype.getButtonReleaseTime=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=d$p(e,t);return this._releaseTime[i]},l$l.prototype.reset=function(){for(var e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)},l$l.prototype.isDestroyed=function(){return!1},l$l.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),i$10(this)},Object.defineProperties(r$n.prototype,{featuresLength:{get:function(){t$16.throwInstantiationError()}},pointsLength:{get:function(){t$16.throwInstantiationError()}},trianglesLength:{get:function(){t$16.throwInstantiationError()}},geometryByteLength:{get:function(){t$16.throwInstantiationError()}},texturesByteLength:{get:function(){t$16.throwInstantiationError()}},batchTableByteLength:{get:function(){t$16.throwInstantiationError()}},innerContents:{get:function(){t$16.throwInstantiationError()}},readyPromise:{get:function(){t$16.throwInstantiationError()}},tileset:{get:function(){t$16.throwInstantiationError()}},tile:{get:function(){t$16.throwInstantiationError()}},url:{get:function(){t$16.throwInstantiationError()}},batchTable:{get:function(){t$16.throwInstantiationError()}}}),r$n.prototype.hasProperty=function(e,t){t$16.throwInstantiationError()},r$n.prototype.getFeature=function(e){t$16.throwInstantiationError()},r$n.prototype.applyDebugSettings=function(e,t){t$16.throwInstantiationError()},r$n.prototype.applyStyle=function(e){t$16.throwInstantiationError()},r$n.prototype.update=function(e,t){t$16.throwInstantiationError()},r$n.prototype.isDestroyed=function(){t$16.throwInstantiationError()},r$n.prototype.destroy=function(){t$16.throwInstantiationError()};var o$o={stack:new r$R,stackMaximumLength:0};function d$o(e){return e._visible&&e._inRequestVolume}function m$i(e){return e.hasEmptyContent||e.hasTilesetContent}function v$i(e){return!m$i(e)&&e.contentUnloaded}function T$h(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:(t.hasEmptyContent,!0))}function g$p(e,t,i,n){for(var r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];s.updateVisibility(n),d$o(s)&&i.push(s)}}function y$i(e,t){(v$i(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function C$j(e,t){e._cache.touch(t)}function x$k(e){++e.statistics.visited}function _$i(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==Ae$u.OUTSIDE&&e._selectedTiles.push(t)}function u$h(e,t){this._conditionsExpression=l$1g(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,g$o(this,t)}function l$k(e,t){this.condition=e,this.expression=t}function g$o(e,t){var i=[],n=e._conditions;if(e$2b(n)){for(var r=n.length,o=0;o<r;++o){var a=n[o],s=String(a[0]),l=String(a[1]);i.push(new l$k(new L$E(s,t),new L$E(l,t)))}e._runtimeConditions=i}}function d$n(e){var t;(this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._pbrMaterialIndex=void 0,this._meta=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,"string"==typeof e||e instanceof t$11)?t=t$11.createIfNeeded(e).fetchJson(e):t=o$1l.resolve(e);var i=this;this._readyPromise=t.then((function(e){return m$h(i,e),i}))}function m$h(e,t){t=u$_(l$1g(t,!0),e._style),e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin,e.pbrMaterialIndex=t.pbrMaterialIndex;var i={};if(e$2b(t.meta)){var n=t.defines,r=u$_(t.meta,u$_.EMPTY_OBJECT);for(var o in r)r.hasOwnProperty(o)&&(i[o]=new L$E(r[o],n))}e._meta=i,e._ready=!0}function n$h(e,t){var i=u$_(e._style,u$_.EMPTY_OBJECT).defines;if(e$2b(t))return"boolean"==typeof t||"number"==typeof t?new L$E(String(t)):"string"==typeof t?new L$E(t,i):e$2b(t.conditions)?new u$h(t,i):t}function r$m(e){if(e$2b(e))return e$2b(e.expression)?e.expression:e$2b(e.conditionsExpression)?l$1g(e.conditionsExpression,!0):e}function D$h(e){if(!e$2b((e=u$_(e,{})).url))throw new t$16("options.url is required.");this._baseUrl=e.url;var t=t$11.createIfNeeded(e.url);if(t.appendForwardSlash(),e$2b(e.token))t.setQueryParameters({token:e.token});else if(e$2b(a$O.CREDENTIAL))if(e$2b(a$O.CREDENTIAL._keymap[this._baseUrl])){var i=a$O.CREDENTIAL._keymap[this._baseUrl].type,n=a$O.CREDENTIAL._keymap[this._baseUrl].value,r='{"tokenName": "value"}'.replace("tokenName",i).replace("value",n),o=JSON.parse(r);t.setQueryParameters(o)}else{(r={})[a$O.CREDENTIAL.name]=a$O.CREDENTIAL.value,t.setQueryParameters(r)}this._resource=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=u$_(e.tilingScheme,new m$L({ellipsoid:e.ellipsoid})),this._tilingSchemeCustomized=e$2b(e.tilingScheme),this._useTiles=u$_(e.usePreCachedTilesIfAvailable,!0),this._rectangle=u$_(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers,this._zoomOffset=e.zoomOffset,this._coordUnit="DEGREE",this._beginLevel=u$_(e.beginLevel,0);var a=e.credit;"string"==typeof a&&(a=new r$T(a)),this._credit=a,this.enablePickFeatures=u$_(e.enablePickFeatures,!0),this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var s,l=this,u=e.url;function c(t){l._tilingScheme instanceof m$L&&"esriMeters"===t.units&&(l._coordUnit="METER");var i=t.tileInfo;if(l.wkid=t.spatialReference.wkid,l._tilingSchemeCustomized&&l._tilingScheme instanceof m$L&&e$2b(i)&&(l._tilingScheme=new m$L({tileInfo:{origin:{x:i.origin.x,y:i.origin.y},cols:i.cols,rows:i.rows},resolutions:i.lods.map((function(e){return e.resolution})),dataBounds:{west:t.fullExtent.xmin,south:t.fullExtent.ymin,east:t.fullExtent.xmax,north:t.fullExtent.ymax}})),e$2b(i)){if(l._tileWidth=i.rows,l._tileHeight=i.cols,!l._tilingSchemeCustomized||!e$2b(l.wkid))if(102100===i.spatialReference.wkid||102113===i.spatialReference.wkid)l._tilingScheme=new c$R({ellipsoid:e.ellipsoid});else if(4326===t.tileInfo.spatialReference.wkid)l._tilingScheme=new m$L({ellipsoid:e.ellipsoid});else if(4490===t.tileInfo.spatialReference.wkid){if(e$2b(e.suggest)&&e.suggest){var n=Math.ceil((t.fullExtent.xmax-t.fullExtent.xmin)/(t.tileInfo.lods[0].resolution*t.tileInfo.cols)),r=Math.ceil((t.fullExtent.ymax-t.fullExtent.ymin)/(t.tileInfo.lods[0].resolution*t.tileInfo.rows));l._tilingScheme=new m$L({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo,rectangle:new h$18(e$2a.toRadians(t.fullExtent.xmin),e$2a.toRadians(t.fullExtent.ymin),e$2a.toRadians(t.fullExtent.xmax),e$2a.toRadians(t.fullExtent.ymax)),origin:new o$1o(e$2a.toRadians(t.tileInfo.origin.x),e$2a.toRadians(t.tileInfo.origin.y)),numberOfLevelZeroTilesX:n,numberOfLevelZeroTilesY:r}),l._tilingScheme._suggest=!0}else l._tilingScheme=new m$L({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo});l._tilingScheme._beginLevel=l._beginLevel}else{var o=[];if(e$2b(i.lods))for(var a=0;a<i.lods.length;a++)o.push(i.lods[a].resolution);l._tilingScheme=new m$L({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo,origin:new o$1o(t.tileInfo.origin.x,t.tileInfo.origin.y),dataBounds:new h$18(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax),resolutions:o}),l._rectangle=new h$18(t.fullExtent.xmin/6378137,t.fullExtent.ymin/6378137,t.fullExtent.xmax/6378137,t.fullExtent.ymax/6378137)}if(l._zoomOffset?l._maximumLevel=20:l._maximumLevel=t.tileInfo.lods.length-1,e$2b(l._tilingScheme._resolutions)&&(l._minimumLevel=l._tilingScheme._beginLevel,l._maximumLevel=l._minimumLevel+l._tilingScheme._resolutions.length-1),e$2b(t.fullExtent)){if(e$2b(t.fullExtent.spatialReference)&&e$2b(t.fullExtent.spatialReference.wkid))if(102100===t.fullExtent.spatialReference.wkid||102113===t.fullExtent.spatialReference.wkid){var u=new t$O,c=t.fullExtent,h=u.unproject(new o$1p(Math.max(c.xmin,-l._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(c.ymin,-l._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),f=u.unproject(new o$1p(Math.min(c.xmax,l._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(c.ymax,l._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));l._rectangle=new h$18(h.longitude,h.latitude,f.longitude,f.latitude)}else{if(4326!==t.fullExtent.spatialReference.wkid&&4490!==t.fullExtent.spatialReference.wkid){var p="fullExtent.spatialReference WKID "+t.fullExtent.spatialReference.wkid+" is not supported.";return void(s=l$W.handleError(s,l,l._errorEvent,p,void 0,void 0,void 0,d))}l._rectangle=h$18.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax)}}else l._rectangle=l._tilingScheme.rectangle;e$2b(l._tileDiscardPolicy)||(l._tileDiscardPolicy=new u$i({missingImageUrl:W$j(l,0,0,l._maximumLevel).url,pixelsToCheck:[new o$1o(0,0),new o$1o(200,20),new o$1o(20,200),new o$1o(80,110),new o$1o(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),l._useTiles=!0}else l._useTiles=!1;e$2b(t.copyrightText)&&t.copyrightText.length>0&&(l._credit=new r$T(t.copyrightText)),l._ready=!0,l._readyPromise.resolve(!0),l$W.handleSuccess(s)}function h(e){var t="An error occurred while accessing "+l._resource.url+".";s=l$W.handleError(s,l,l._errorEvent,t,void 0,void 0,void 0,d),l._readyPromise.reject(new t$14(t))}function d(){o$1l(l._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJson(),c,h)}l.tablename=e.url,new l$15({name:u}).then((function(e){e.checkObjectStoreExit(l.tablename)?l._indexedDBScheduler=e:e.createObjectStore(l.tablename).then((function(){l._indexedDBScheduler=e}))})),l._indexedDBSetting={isOpen:!1,clear:function(){l._indexedDBScheduler.clear(l.tablename)},cache:[]},this._useTiles?d():(this._ready=!0,this._readyPromise.resolve(!0))}function W$j(e,t,i,n,r){var o;if(e$2b(e._tilingScheme._resolutions)&&(n-=e._tilingScheme._beginLevel),e._useTiles)e.zoomOffset&&(n-=parseInt(e.zoomOffset)),o=e._resource.getDerivedResource({url:"tile/"+n+"/"+i+"/"+t,request:r});else{var a=e._tilingScheme.tileXYToNativeRectangle(t,i,n);if("METER"===e._coordUnit){var s=e._tilingScheme._projection._semimajorAxis;a.west=s*e$2a.toRadians(a.west),a.south=s*e$2a.toRadians(a.south),a.east=s*e$2a.toRadians(a.east),a.north=s*e$2a.toRadians(a.north)}var l={bbox:a.west+","+a.south+","+a.east+","+a.north,size:e._tileWidth+","+e._tileHeight,format:"png",transparent:!0,f:"image"};e.wkid&&(l.imageSR=l.bboxSR=e.wkid),e.layers&&(l.layers="show:"+e.layers),e.layerDefs&&(l.layerDefs=e.layerDefs),e.time&&(l.time=e.time),o=e._resource.getDerivedResource({url:"export",request:r,queryParameters:l})}return o||null}function Z$g(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function t$c(e){LicenseChecker.LICENSECHECKER.verify("CloudBox"),this._angle=0,this._url=e.url,this._scene=void 0,this._ellipsoidGeometry=new b$P({radii:new o$1p(6578137,6578137,6578137),vertexFormat:t$i.vertexFormat}),this._cloudBall=new y$S({geometryInstances:new d$1o({geometry:this._ellipsoidGeometry,attributes:{distanceDisplayCondition:new t$B(2e6,Number.MAX_VALUE)}}),appearance:new t$i({material:new r$X({fabric:{type:"Image",uniforms:{image:this._url,color:new e$1U(1,1,1,.99)}}}),aboveGround:!0})}),this._originalModelMatrix=p$1d.clone(this._cloudBall.modelMatrix)}function o$n(e){this._show=!1,this._brightness=1,this._contrast=1,this._saturation=1,this._hue=0,this.context=e}h$j.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e._hasMixedContent=!1;var i=!0,n=e.root;if(n.updateVisibility(t),!d$o(n))return i;var r=o$o.stack;for(r.push(e.root);r.length>0;){o$o.stackMaximumLength=Math.max(o$o.stackMaximumLength,r.length);var o=r.pop(),a=o.refine===f$D.ADD,s=o.refine===f$D.REPLACE,l=T$h(e,o);l&&g$p(e,o,r,t),(a||s&&!l)&&(y$i(e,o),_$i(e,o,t),!m$i(o)&&!o.contentAvailable&&(i=!1)),x$k(e),C$j(e,o)}return o$o.stack.trim(o$o.stackMaximumLength),i},Object.defineProperties(u$h.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}}),u$h.prototype.evaluate=function(e,t){var i=this._runtimeConditions;if(e$2b(i))for(var n=i.length,r=0;r<n;++r){var o=i[r];if(o.condition.evaluate(e))return o.expression.evaluate(e,t)}},u$h.prototype.evaluateColor=function(e,t){var i=this._runtimeConditions;if(e$2b(i))for(var n=i.length,r=0;r<n;++r){var o=i[r];if(o.condition.evaluate(e))return o.expression.evaluateColor(e,t)}},u$h.prototype.getShaderFunction=function(e,t,i,n){var r=this._runtimeConditions;if(e$2b(r)&&0!==r.length){for(var o="",a=r.length,s=0;s<a;++s){var l=r[s];o+=" "+(0===s?"if":"else if")+" ("+l.condition.getShaderExpression(t,i)+") \n { \n return "+l.expression.getShaderExpression(t,i)+"; \n } \n"}return o=n+" "+e+"() \n{ \n"+o+" return "+n+"(1.0); \n} \n"}},Object.defineProperties(d$n.prototype,{style:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._style}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},show:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._show},set:function(e){this._show=n$h(this,e),this._style.show=r$m(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._color},set:function(e){this._color=n$h(this,e),this._style.color=r$m(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointSize},set:function(e){this._pointSize=n$h(this,e),this._style.pointSize=r$m(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointOutlineColor},set:function(e){this._pointOutlineColor=n$h(this,e),this._style.pointOutlineColor=r$m(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=n$h(this,e),this._style.pointOutlineWidth=r$m(this._pointOutlineWidth)}},labelColor:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelColor},set:function(e){this._labelColor=n$h(this,e),this._style.labelColor=r$m(this._labelColor)}},labelOutlineColor:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelOutlineColor},set:function(e){this._labelOutlineColor=n$h(this,e),this._style.labelOutlineColor=r$m(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=n$h(this,e),this._style.labelOutlineWidth=r$m(this._labelOutlineWidth)}},font:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._font},set:function(e){this._font=n$h(this,e),this._style.font=r$m(this._font)}},labelStyle:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelStyle},set:function(e){this._labelStyle=n$h(this,e),this._style.labelStyle=r$m(this._labelStyle)}},labelText:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelText},set:function(e){this._labelText=n$h(this,e),this._style.labelText=r$m(this._labelText)}},backgroundColor:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundColor},set:function(e){this._backgroundColor=n$h(this,e),this._style.backgroundColor=r$m(this._backgroundColor)}},backgroundPadding:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundPadding},set:function(e){this._backgroundPadding=n$h(this,e),this._style.backgroundPadding=r$m(this._backgroundPadding)}},backgroundEnabled:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundEnabled},set:function(e){this._backgroundEnabled=n$h(this,e),this._style.backgroundEnabled=r$m(this._backgroundEnabled)}},scaleByDistance:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._scaleByDistance},set:function(e){this._scaleByDistance=n$h(this,e),this._style.scaleByDistance=r$m(this._scaleByDistance)}},translucencyByDistance:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._translucencyByDistance},set:function(e){this._translucencyByDistance=n$h(this,e),this._style.translucencyByDistance=r$m(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=n$h(this,e),this._style.distanceDisplayCondition=r$m(this._distanceDisplayCondition)}},heightOffset:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._heightOffset},set:function(e){this._heightOffset=n$h(this,e),this._style.heightOffset=r$m(this._heightOffset)}},anchorLineEnabled:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=n$h(this,e),this._style.anchorLineEnabled=r$m(this._anchorLineEnabled)}},anchorLineColor:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._anchorLineColor},set:function(e){this._anchorLineColor=n$h(this,e),this._style.anchorLineColor=r$m(this._anchorLineColor)}},image:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._image},set:function(e){this._image=n$h(this,e),this._style.image=r$m(this._image)}},disableDepthTestDistance:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=n$h(this,e),this._style.disableDepthTestDistance=r$m(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._horizontalOrigin},set:function(e){this._horizontalOrigin=n$h(this,e),this._style.horizontalOrigin=r$m(this._horizontalOrigin)}},verticalOrigin:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._verticalOrigin},set:function(e){this._verticalOrigin=n$h(this,e),this._style.verticalOrigin=r$m(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=n$h(this,e),this._style.labelHorizontalOrigin=r$m(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=n$h(this,e),this._style.labelVerticalOrigin=r$m(this._labelVerticalOrigin)}},pbrMaterialIndex:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pbrMaterialIndex},set:function(e){this._pbrMaterialIndex=n$h(this,e),this._style.pbrMaterialIndex=r$m(this._pbrMaterialIndex)}},meta:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._meta},set:function(e){this._meta=e}}}),d$n.prototype.getColorShaderFunction=function(e,t,i){return this._colorShaderFunctionReady?(i.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,this._colorShaderFunction=e$2b(this.color)?this.color.getShaderFunction(e,t,i,"vec4"):void 0,this._colorShaderTranslucent=i.translucent,this._colorShaderFunction)},d$n.prototype.getShowShaderFunction=function(e,t,i){return this._showShaderFunctionReady||(this._showShaderFunctionReady=!0,this._showShaderFunction=e$2b(this.show)?this.show.getShaderFunction(e,t,i,"bool"):void 0),this._showShaderFunction},d$n.prototype.getPointSizeShaderFunction=function(e,t,i){return this._pointSizeShaderFunctionReady||(this._pointSizeShaderFunctionReady=!0,this._pointSizeShaderFunction=e$2b(this.pointSize)?this.pointSize.getShaderFunction(e,t,i,"float"):void 0),this._pointSizeShaderFunction},Object.defineProperties(D$h.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return e$2b(this._minimumLevel)?this._minimumLevel:0}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}},zoomOffset:{get:function(){return this._zoomOffset}}}),D$h.prototype.getTileCredits=function(e,t,i){},D$h.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=W$j(this,e,t,i,n);if(n.quadKey=Z$g(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(e$2b(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2b(o)?o$1l(o,(function(e){return e$2b(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$h.loadImage(this,r)}return e$h.loadImage(this,r)}return e$h.loadImage(this,r)},D$h.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$16("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures){var o,a,s,l=this._tilingScheme.tileXYToNativeRectangle(e,t,i);if(this._tilingScheme.projection instanceof n$1b)o=e$2a.toDegrees(n),a=e$2a.toDegrees(r),s="4326";else{var u=this._tilingScheme.projection.project(new a$18(n,r,0));o=u.x,a=u.y,s="3857"}var c="visible";e$2b(this._layers)&&(c+=":"+this._layers);var h={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:o+","+a,mapExtent:l.west+","+l.south+","+l.east+","+l.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:s,layers:c};return this._resource.getDerivedResource({url:"identify",queryParameters:h}).fetchJson().then((function(e){var t=[],i=e.results;if(!e$2b(i))return t;for(var n=0;n<i.length;++n){var r=i[n],o=new o$q;if(o.data=r,o.name=r.value,o.properties=r.attributes,o.configureDescriptionFromProperties(r.attributes),"esriGeometryPoint"===r.geometryType&&r.geometry){var a=r.geometry.spatialReference&&r.geometry.spatialReference.wkid?r.geometry.spatialReference.wkid:4326;if(4326===a||4283===a)o.position=a$18.fromDegrees(r.geometry.x,r.geometry.y,r.geometry.z);else if(102100===a||900913===a||3857===a){var s=new t$O;o.position=s.unproject(new o$1p(r.geometry.x,r.geometry.y,r.geometry.z))}}t.push(o)}return t}))}},Object.defineProperties(t$c.prototype,{url:{get:function(){return this._url},set:function(e){this._url!==e&&(this._cloudBall.appearance.material.uniforms.image=e,this._url=e)}}}),t$c.prototype.update=function(e){LicenseChecker.LICENSECHECKER.verify("CloudBox"),this._scene=e.camera._scene,e$2b(this._cloudBall)&&!this._scene.primitives.contains(this._cloudBall)&&this._scene.primitives.add(this._cloudBall),e.mode===C$13.SCENE3D&&this.animation(),e.mode===C$13.COLUMBUS_VIEW&&(this._cloudBall.modelMatrix=p$1d.clone(this._originalModelMatrix))},t$c.prototype.animation=function(){this._angle+=.05,this._angle=this._angle%360;var e=e$2a.toRadians(this._angle);e=-e;var t=p$1e.fromRotationZ(e);p$1d.multiplyByMatrix3(this._originalModelMatrix,t,this._cloudBall.modelMatrix)},t$c.prototype.isDestroyed=function(){return!1},t$c.prototype.remove=function(){if(this._scene.primitives.contains(this._cloudBall)){var e=this._scene._primitives._primitives.indexOf(this._cloudBall);-1!==e&&(this._scene._primitives._primitives.splice(e,1),delete this._cloudBall._external._composites[this._scene._primitives._guid])}},t$c.prototype.destroy=function(){this.remove(),this._cloudBall=void 0},Object.defineProperties(o$n.prototype,{show:{get:function(){return this._show},set:function(e){this.context._colorBufferFloat||this.context._colorBufferHalfFloat?e!==this._show&&(e$2b(this._owner)&&this._owner.colorCorrectionShowChange(e),this._show=e):console.warn("Color correction is not currently supported on the mobile.")}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness=e}},contrast:{get:function(){return this._contrast},set:function(e){this._contrast=e}},saturation:{get:function(){return this._saturation},set:function(e){this._saturation=e}},hue:{get:function(){return this._hue},set:function(e){this._hue=e}}}),o$n.prototype.isDestroyed=function(){return!1},o$n.prototype.destroy=function(){return i$10(this)};var v$h="uniform sampler2D u_texture0;\n#ifdef BLOOM\nuniform vec2 u_BloomTex_TexelSize;\nuniform vec4 u_Bloom_DirtTileOffset;\nuniform vec3 u_Bloom_Settings;\nuniform vec3 u_Bloom_Color;\nuniform sampler2D u_BloomTexture;\nuniform sampler2D u_Bloom_DirtTex;\n#endif\n#ifdef COLOR_CORRECTION\nuniform float u_brightness;\nuniform float u_contrast;\nuniform float u_saturation;\nuniform float u_hue;\n#endif\n#ifdef SSAO\nuniform sampler2D u_AmbientOcclusionTexture;\n#endif\n#ifdef TONEMAPPING\nuniform float u_exposure;\nuniform float u_toneMappingWhitePoint;\n#endif\nvarying vec2 v_textureCoordinates;\n// 9-tap bilinear upsampler (tent filter)\n#define inline\nvec4 UpsampleTent(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\n vec4 d = texelSize.xyxy * vec4(1.0, 1.0, -1.0, 0.0) * sampleScale;\n vec4 s;\n s = texture2D(samplerTex, uv - d.xy);\n s += texture2D(samplerTex, uv - d.wy) * 2.0;\n s += texture2D(samplerTex, uv - d.zy);\n s += texture2D(samplerTex, uv + d.zw) * 2.0;\n s += texture2D(samplerTex, uv ) * 4.0;\n s += texture2D(samplerTex, uv + d.xw) * 2.0;\n s += texture2D(samplerTex, uv + d.zy);\n s += texture2D(samplerTex, uv + d.wy) * 2.0;\n s += texture2D(samplerTex, uv + d.xy);\n return s * (1.0 / 16.0);\n}\n\n#ifdef TONEMAPPING\nvec3 ACESTonemapping(vec3 inputColor)\n{\n return clamp((inputColor * (2.51 * inputColor + 0.03)) / (inputColor * (2.43 * inputColor + 0.59) + 0.14), 0.0, 1.0);\n}\n\nvec3 FilmicTonemappingFunction(vec3 x)\n{\n float A = 0.22;\n float B = 0.3;\n float C = 0.1;\n float D = 0.2;\n float E = 0.01;\n float F = 0.3;\n return ((x * (A * x + C * B) + D * E) / (x * (A * x + B) + D * F)) - E / F;\n}\nvec3 FilmicTonemapping(vec3 x)\n{\n vec3 WHITE = vec3(u_toneMappingWhitePoint);\n return FilmicTonemappingFunction(1.6 * x) / FilmicTonemappingFunction(WHITE);\n}\n\nvec3 inverseGamma(vec3 color)\n{\n return pow(color, vec3(1.0 / 2.2));\n}\n\nvec3 sRGBToLinear(vec3 value)\n{\n return vec3(mix(pow(value.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), value.rgb * 0.0773993808, vec3(lessThanEqual(value.rgb, vec3(0.04045)))));\n}\n\nvec3 linearTosRGB(vec3 value)\n{\n return vec3(mix(pow(value.rgb, vec3(0.41666)) * 1.055 - vec3(0.055), value.rgb * 12.92, vec3(lessThanEqual(value.rgb, vec3(0.0031308)))));\n}\n#endif\n\nvoid main()\n{\n vec4 color0 = texture2D(u_texture0, v_textureCoordinates);\n gl_FragColor = color0;\n#ifdef BLOOM\n vec4 bloom = UpsampleTent(u_BloomTexture, v_textureCoordinates, u_BloomTex_TexelSize.xy, vec4(u_Bloom_Settings.x));\n\tvec4 dirt = vec4(texture2D(u_Bloom_DirtTex, v_textureCoordinates * u_Bloom_DirtTileOffset.xy + u_Bloom_DirtTileOffset.zw).rgb, 0.0);\n\tbloom *= u_Bloom_Settings.y;\n\tdirt *= u_Bloom_Settings.z;\n\tgl_FragColor += bloom * vec4(u_Bloom_Color, 1.0);\n\tgl_FragColor += dirt * bloom;\n#endif\n#ifdef SSAO\n vec3 ao = texture2D(u_AmbientOcclusionTexture, v_textureCoordinates).rgb;\n gl_FragColor.rgb *= ao;\n#endif\n#ifdef TONEMAPPING\n vec3 linearColor = sRGBToLinear(gl_FragColor.rgb);\n vec3 toneMappingColor = ACESTonemapping(linearColor * u_exposure);\n gl_FragColor.rgb = linearTosRGB(toneMappingColor);\n#endif\n#ifdef COLOR_CORRECTION\n gl_FragColor.rgb = mix(vec3(0.0), gl_FragColor.rgb, u_brightness);\n gl_FragColor.rgb = mix(vec3(0.5), gl_FragColor.rgb, u_contrast);\n gl_FragColor.rgb = czm_hue(gl_FragColor.rgb, u_hue);\n gl_FragColor.rgb = czm_saturation(gl_FragColor.rgb, u_saturation);\n#endif\n}",I$j="uniform sampler2D u_texture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main() \n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",b$n="uniform float focalDistance;\nuniform float focalRange; \nuniform float focalLength; \nuniform float fstop; \nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n vec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\n viewPos /= viewPos.w;\n float dist = abs(viewPos.z);\n float aperture = focalLength / fstop;\n float coc;\n float uppper = focalDistance + focalRange;\n float lower = focalDistance - focalRange;\n if (dist <= uppper && dist >= lower)\n {\n coc = 0.5;\n coc = coc * 0.5 + 0.5;\n }\n else\n {\n float focalAdjusted = dist > uppper ? uppper : lower;\n coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\n coc = clamp(coc, 0.0, 2.0) / 2.00001;\n if (dist < lower)\n {\n coc = -coc;\n }\n coc = coc * 0.5 + 0.5;\n }\n gl_FragColor = czm_packDepth(coc);\n}",x$j="uniform sampler2D u_texture;\nuniform sampler2D coc;\nvarying vec2 v_textureCoordinates;\nuniform float blurRadius;\nuniform vec2 textureSize;\nuniform vec2 poissonKernel[16];\nconst float percent = 0.01;\n\nfloat nrand(in vec2 n)\n{\n return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec2 offset = blurRadius / textureSize;\n float rnd = 6.28318 * nrand(v_textureCoordinates + 0.07 * percent );\n float cosa = cos(rnd);\n float sina = sin(rnd);\n vec4 basis = vec4(cosa, -sina, sina, cosa);\n offset *= abs(czm_unpackDepth(texture2D(coc, v_textureCoordinates)) * 2.0 - 1.0);\n vec4 color = vec4(0.0);\n float weightSum = 0.0;\n for (int i = 0; i < 16; i++)\n {\n vec2 ofs = poissonKernel[i];\n ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\n vec2 uv = v_textureCoordinates + ofs * offset;\n vec4 texel = texture2D(u_texture, uv);\n float w = 1.0;\n float fCoc = czm_unpackDepth(texture2D(coc, uv)) * 2.0 - 1.0;\n w *= abs(fCoc);\n texel.rgb *= texel.a;\n color += texel * w;\n weightSum += w;\n }\n color /= weightSum;\n color.rgb /= (color.a + 0.0001);\n gl_FragColor = color;\n}",S$e="uniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D coc;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 blurredColor = texture2D(blurred, v_textureCoordinates);\n vec4 originalColor = texture2D(original, v_textureCoordinates);\n float fCoc = czm_unpackDepth(texture2D(coc, v_textureCoordinates));\n fCoc = abs(fCoc * 2.0 - 1.0);\n float weight = smoothstep(0.0, 1.0, fCoc);\n gl_FragColor = mix(originalColor, blurredColor, weight);\n}";function n$g(){this._cocFBO=void 0,this._blurFBO=void 0,this._compositeBlurFBO=void 0,this._cocCommand=void 0,this._blurCommand=void 0,this._compositeCommand=void 0,this._upSamplePassState=new n$Z,this._scene=void 0,this._show=!1,this._useLogDepth=!0,this._focalDistance=50,this._focalRange=20,this._focalLength=30,this._fstop=2.8,this._blurRadius=10,this._textureSize=new o$1o(512,512),this._poissonKernel=T$g(),this._dofBlurKernel=[],this._dofBlurKernelSize=16;for(var e=0;e<this._dofBlurKernelSize;e++)this._dofBlurKernel.push(this._poissonKernel[e])}Object.defineProperties(n$g.prototype,{show:{get:function(){return this._show},set:function(e){this._show=e}},focalDistance:{get:function(){return this._focalDistance},set:function(e){this._focalDistance=e}},focalRange:{get:function(){return this._focalRange},set:function(e){this._focalRange=e}},fStop:{get:function(){return this._fstop},set:function(e){this._fstop=e}},blurRadius:{get:function(){return this._blurRadius},set:function(e){this._blurRadius=e}}}),n$g.prototype.execute=function(e){this._cocCommand.execute(e,this._upSamplePassState),this._blurCommand.execute(e,this._upSamplePassState),this._compositeCommand.execute(e,this._upSamplePassState)};var y$h=new f$18;function P$k(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function v$g(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function T$g(){var e=[];return e.push(new o$1o(0,0)),e.push(new o$1o(-.321585265978,-.154972575841)),e.push(new o$1o(.458126042375,.188473391593)),e.push(new o$1o(.842080129861,.527766490688)),e.push(new o$1o(.147304551086,-.659453822776)),e.push(new o$1o(-.331943915203,-.940619700594)),e.push(new o$1o(.0479226680259,.54812163202)),e.push(new o$1o(.701581552186,-.709825561388)),e.push(new o$1o(-.295436780218,.940589268233)),e.push(new o$1o(-.901489676764,.237713156085)),e.push(new o$1o(.973570876096,-.109899459384)),e.push(new o$1o(-.866792314779,-.451805525005)),e.push(new o$1o(.330975007087,.800048655954)),e.push(new o$1o(-.344275183665,.381779221166)),e.push(new o$1o(-.386139432542,-.437418421534)),e.push(new o$1o(-.576478634965,-.0148463392551)),e.push(new o$1o(.385798197415,-.262426961053)),e.push(new o$1o(-.666302061145,.682427250835)),e.push(new o$1o(-.628010632582,-.732836215494)),e.push(new o$1o(.10163141741,-.987658134403)),e.push(new o$1o(.711995289051,-.320024291314)),e.push(new o$1o(.0296005138058,.950296523438)),e.push(new o$1o(.0130612307608,-.351024443122)),e.push(new o$1o(-.879596633704,-.10478487883)),e.push(new o$1o(.435712737232,.504254490347)),e.push(new o$1o(.779203817497,.206477676721)),e.push(new o$1o(.388264289969,-.896736162545)),e.push(new o$1o(-.153106280781,-.629203242522)),e.push(new o$1o(-.245517550697,.657969239148)),e.push(new o$1o(.126830499058,.26862328493)),e.push(new o$1o(-.634888119007,-.302301223431)),e.push(new o$1o(.617074219636,.779817204925)),e}n$g.prototype.update=function(e,t,i,n){var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight;this._scene=i,e$2b(this._cocCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),e$2b(this._cocCommand)||this.createCommand(e);var a=this._blurFBO,s=e$2b(a)&&a.getColorTexture(0)||void 0;if(!e$2b(s)||this._textureSize.x!==r||this._textureSize.y!==o){this._textureSize.x=r,this._textureSize.y=o,this.createFBO(r,o,e);var l=y$h;l.width=r,l.height=o;var u=d$1m.fromCache({viewport:l});this._cocCommand.renderState=u,this._blurCommand.renderState=u,this._compositeCommand.renderState=u}this._upSamplePassState.context=e},n$g.prototype.createFBO=function(e,t,i){this._cocFBO=this._cocFBO&&this._cocFBO.destroy(),this._blurFBO=this._blurFBO&&this._blurFBO.destroy(),this._compositeBlurFBO=this._compositeBlurFBO&&this._compositeBlurFBO.destroy(),this._cocFBO=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t})]}),this._blurFBO=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t,pixelFormat:V$10.RGBA,pixelDatatype:i.webgpu?_$$.UNSIGNED_BYTE:_$$.FLOAT})]}),this._compositeBlurFBO=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t})]}),e$2b(this._cocCommand)&&e$2b(this._blurCommand)&&e$2b(this._compositeCommand)&&(this._cocCommand.framebuffer=this._cocFBO,this._blurCommand.framebuffer=this._blurFBO,this._compositeCommand.framebuffer=this._compositeBlurFBO)},n$g.prototype.createCommand=function(e){var t={},i=new s$U({name:"DOFCoc",sources:[b$n]});this._useLogDepth&&i.defines.push("LOG_DEPTH"),this._cocCommand=e.createViewportQuadCommand(i,{shaderProgramName:"DepthOfFieldCoc",uniformMap:t,owner:this}),this._blurCommand=e.createViewportQuadCommand(x$j,{shaderProgramName:"DepthOfFieldBlur",uniformMap:t,owner:this}),this._compositeCommand=e.createViewportQuadCommand(S$e,{shaderProgramName:"DepthOfFieldComposite",uniformMap:t,owner:this}),this.createUniformMap()},n$g.prototype.createUniformMap=function(){if(e$2b(this._cocCommand)&&e$2b(this._blurCommand)&&e$2b(this._compositeCommand)){var e=this;this._cocCommand.uniformMap.focalDistance=function(){return e._focalDistance},this._cocCommand.uniformMap.focalRange=function(){return e._focalRange},this._cocCommand.uniformMap.focalLength=function(){return e._focalLength},this._cocCommand.uniformMap.fstop=function(){return e._fstop},this._blurCommand.uniformMap.u_texture=function(){return e._fbo.getColorTexture(0)},this._blurCommand.uniformMap.coc=function(){return e._cocFBO.getColorTexture(0)},this._blurCommand.uniformMap.blurRadius=function(){return e._blurRadius},this._blurCommand.uniformMap.textureSize=function(){return e._textureSize},this._blurCommand.uniformMap.poissonKernel=function(){return e._dofBlurKernel},this._compositeCommand.uniformMap.original=function(){return e._fbo.getColorTexture(0)},this._compositeCommand.uniformMap.blurred=function(){return e._blurFBO.getColorTexture(0)},this._compositeCommand.uniformMap.coc=function(){return e._cocFBO.getColorTexture(0)}}},n$g.prototype.setInputFBO=function(e){this._fbo=e},n$g.prototype.getDOFTexture=function(){return this._compositeBlurFBO.getColorTexture(0)},n$g.prototype.isDestroyed=function(){return!1},n$g.prototype.destroy=function(){return this._cocFBO=this._cocFBO&&this._cocFBO.destroy(),this._blurFBO=this._blurFBO&&this._blurFBO.destroy(),this._compositeBlurFBO=this._compositeBlurFBO&&this._compositeBlurFBO.destroy(),this._cocCommand=this._cocCommand&&this._cocCommand.shaderProgram&&this._cocCommand.shaderProgram.destroy(),this._blurCommand=this._blurCommand&&this._blurCommand.shaderProgram&&this._blurCommand.shaderProgram.destroy(),this._compositeCommand=this._compositeCommand&&this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy(),i$10(this)},n$g.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2b(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?P$k(n,t):v$g(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}};var z$h="uniform sampler2D randomTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\n\nvarying vec2 v_textureCoordinates;\n\nvec4 clipToEye(vec2 uv, float depth)\n{\n vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\n vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\n posEC = posEC / posEC.w;\n return posEC;\n}\nfloat getDepth(in vec4 depth)\n{\n\tfloat z_window = czm_unpackDepth(depth);\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\n\n//Reconstruct Normal Without Edge Removation\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\n vec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\n vec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\n vec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\n vec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\n\n vec3 up = posInCamera.xyz - posInCameraUp.xyz;\n vec3 down = posInCameraDown.xyz - posInCamera.xyz;\n vec3 left = posInCamera.xyz - posInCameraLeft.xyz;\n vec3 right = posInCameraRight.xyz - posInCamera.xyz;\n\n vec3 DX = length(left) < length(right) ? left : right;\n vec3 DY = length(up) < length(down) ? up : down;\n\n return normalize(cross(DY, DX));\n}\n\nvoid main(void)\n{\n float depth = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n vec4 posInCamera = clipToEye(v_textureCoordinates, depth);\n\n if (posInCamera.z > frustumLength)\n {\n gl_FragColor = vec4(1.0);\n return;\n }\n\n vec2 pixelSize = 1.0 / czm_viewport.zw;\n float depthU = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates- vec2(0.0, pixelSize.y)));\n float depthD = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates+ vec2(0.0, pixelSize.y)));\n float depthL = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates- vec2(pixelSize.x, 0.0)));\n float depthR = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates+ vec2(pixelSize.x, 0.0)));\n vec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\n\n float ao = 0.0;\n vec2 sampleDirection = vec2(1.0, 0.0);\n float gapAngle = 90.0 * czm_radiansPerDegree;\n\n // RandomNoise\n float randomVal = getDepth(texture2D(randomTexture, v_textureCoordinates));\n\n float inverseViewportWidth = 1.0 / czm_viewport.z;\n float inverseViewportHeight = 1.0 / czm_viewport.w;\n\n //Loop for each direction\n for (int i = 0; i < 4; i++)\n {\n float newGapAngle = gapAngle * (float(i) + randomVal);\n float cosVal = cos(newGapAngle);\n float sinVal = sin(newGapAngle);\n\n //Rotate Sampling Direction\n vec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\n float localAO = 0.0;\n float localStepSize = stepSize;\n\n //Loop for each step\n for (int j = 0; j < 6; j++)\n {\n vec2 directionWithStep = vec2(rotatedSampleDirection.x * localStepSize * inverseViewportWidth, rotatedSampleDirection.y * localStepSize * inverseViewportHeight);\n vec2 newCoords = directionWithStep + v_textureCoordinates;\n\n //Exception Handling\n if(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n {\n break;\n }\n\n float stepDepthInfo = getDepth(texture2D(czm_globeDepthTexture, newCoords));\n vec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\n vec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\n float len = length(diffVec);\n\n if (len > lengthCap)\n {\n break;\n }\n\n float dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\n float weight = len / lengthCap;\n weight = 1.0 - weight * weight;\n\n if (dotVal < bias)\n {\n dotVal = 0.0;\n }\n\n localAO = max(localAO, dotVal * weight);\n localStepSize += stepSize;\n }\n ao += localAO;\n }\n\n ao /= 4.0;\n ao = 1.0 - clamp(ao, 0.0, 1.0);\n ao = pow(ao, intensity);\n gl_FragColor = vec4(vec3(ao), 1.0);\n}",F$f="uniform float u_delta;\nuniform float u_sigma;\nuniform float direction;\nuniform sampler2D u_texture;\nuniform vec2 u_step;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec2 st = v_textureCoordinates;\n vec2 dir = vec2(1.0 - direction, direction);\n vec2 off = u_step * dir;\n vec3 g;\n g.x = 1.0 / (sqrt(czm_twoPi) * u_sigma);\n g.y = exp((-0.5 * u_delta * u_delta) / (u_sigma * u_sigma));\n g.z = g.y * g.y;\n vec4 result = texture2D(u_texture, st) * g.x;\n for (int i = 1; i < 8; ++i)\n {\n g.xy *= g.yz;\n vec2 offset = float(i) * dir * u_step;\n result += texture2D(u_texture, st - offset) * g.x;\n result += texture2D(u_texture, st + offset) * g.x;\n }\n gl_FragColor = result;\n}\n";function a$f(){this._fbo=void 0,this._scene=void 0,this._downSampleFBO1=void 0,this._downSampleFBO2=void 0,this._clearFBO1Command=void 0,this._clearFBO2Command=void 0,this._ambientOcclusionGenerateCommand=void 0,this._blurXCommand=void 0,this._blurYCommand=void 0,this._downSamplePassState=new n$Z,this._upSamplePassState=new n$Z,this._blurStep=new o$1o,this._intensity=3,this._bias=.1,this._lengthCap=.26,this._stepSize=1.95,this._frustumLength=1e3,this._randomTexture=void 0,this._show=!1,this._useLogDepth=!0,this._context=void 0}Object.defineProperties(a$f.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(e$2b(this._owner)&&this._owner.ssaoShowChange(e),this._show=e)}},intensity:{get:function(){return this._intensity},set:function(e){this._intensity=e}},lengthCap:{get:function(){return this._lengthCap},set:function(e){this._lengthCap=e}},bias:{get:function(){return this._bias},set:function(e){this._bias=e}},stepSize:{get:function(){return this._stepSize},set:function(e){this._stepSize=e}},frustumLength:{get:function(){return this._frustumLength},set:function(e){this._frustumLength=e}}}),a$f.prototype.clear=function(e,t){var i=this._clearFBO1Command;e$1U.clone(u$_(t,e$1U.BLACK),i.color),i.execute(e),i=this._clearFBO2Command,e$1U.clone(u$_(t,e$1U.BLACK),i.color),i.execute(e)},a$f.prototype.isPrepared=function(){return e$2b(this._scene)&&this._scene._pickDepths.length>0},a$f.prototype.execute=function(e,t){this._ambientOcclusionGenerateCommand.execute(e,this._downSamplePassState),this._blurXCommand.execute(e,this._downSamplePassState),this._blurYCommand.execute(e,this._downSamplePassState)},a$f.prototype.createRandomTexture=function(e){for(var t=196608,i=new Uint8Array(t),n=0;n<t;n+=3)i[n]=Math.floor(255*Math.random());this._randomTexture=new t$V({context:e,pixelFormat:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE,source:{arrayBufferView:i,width:256,height:256},sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})},new f$18;var k$e=new f$18;function H$o(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function N$c(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}a$f.prototype.update=function(e,t,i,n){this._scene=i,this._context=t.context;var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight,a=this;if(e$2b(this._randomTexture)||this.createRandomTexture(e),e$2b(this._ambientOcclusionGenerateCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),!e$2b(this._ambientOcclusionGenerateCommand)){this._clearFBO1Command=new t$X({color:new e$1U}),this._clearFBO2Command=new t$X({color:new e$1U});var s={randomTexture:function(){return a._randomTexture},intensity:function(){return a._intensity},bias:function(){return a._bias},lengthCap:function(){return a._lengthCap},stepSize:function(){return a._stepSize},frustumLength:function(){return a._frustumLength}},l=new s$U({name:"ambientOcclusion",sources:[z$h]});this._useLogDepth&&l.defines.push("LOG_DEPTH"),this._ambientOcclusionGenerateCommand=e.createViewportQuadCommand(l,{uniformMap:s,owner:this}),s={direction:function(){return 0}},this._blurXCommand=e.createViewportQuadCommand(F$f,{uniformMap:s,owner:this}),s={direction:function(){return 1}},this._blurYCommand=e.createViewportQuadCommand(F$f,{uniformMap:s,owner:this})}var u=Math.pow(2,Math.ceil(Math.log(r)/Math.log(2))-2),c=Math.pow(2,Math.ceil(Math.log(o)/Math.log(2))-2),h=Math.max(1,u,c),d=k$e;d.width=h,d.height=h;var f=this._downSampleFBO1,p=e$2b(f)&&f.getColorTexture(0)||void 0;if(!e$2b(p)||p.width!==h||p.height!==h){this._downSampleFBO1=this._downSampleFBO1&&this._downSampleFBO1.destroy(),this._downSampleFBO2=this._downSampleFBO2&&this._downSampleFBO2.destroy(),this._blurStep.x=this._blurStep.y=2/h;this._downSampleFBO1=new t$W({context:e,colorTextures:[new t$V({context:e,width:h,height:h})]}),this._downSampleFBO2=new t$W({context:e,colorTextures:[new t$V({context:e,width:h,height:h})]}),this._clearFBO1Command.framebuffer=this._downSampleFBO1,this._clearFBO2Command.framebuffer=this._downSampleFBO2,this._ambientOcclusionGenerateCommand.framebuffer=this._downSampleFBO1,this._blurXCommand.framebuffer=this._downSampleFBO2,this._blurYCommand.framebuffer=this._downSampleFBO1;var _=d$1m.fromCache({viewport:d});this._ambientOcclusionGenerateCommand.uniformMap.depthTexture=function(){return a._scene._pickDepths.length>0&&e$2b(a._scene._pickDepths[0]._depthTexture)?a._scene._pickDepths[0]._depthTexture:a._context.defaultTexture},this._ambientOcclusionGenerateCommand.renderState=_,this._blurXCommand.uniformMap.u_texture=function(){return a._downSampleFBO1.getColorTexture(0)},this._blurXCommand.uniformMap.u_step=function(){return a._blurStep},this._blurXCommand.uniformMap.u_delta=function(){return 1},this._blurXCommand.uniformMap.u_sigma=function(){return 2},this._blurXCommand.renderState=_,this._blurYCommand.uniformMap.u_texture=function(){return a._downSampleFBO2.getColorTexture(0)},this._blurYCommand.uniformMap.u_step=function(){return a._blurStep},this._blurYCommand.uniformMap.u_delta=function(){return 1},this._blurYCommand.uniformMap.u_sigma=function(){return 2},this._blurYCommand.renderState=_}this._downSamplePassState.context=e,this._upSamplePassState.context=e},a$f.prototype.setInputFBO=function(e){this._fbo=e},a$f.prototype.getAmbientOcclusionTexture=function(){return this._downSampleFBO1.getColorTexture(0)},a$f.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2b(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?H$o(n,t):N$c(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}},a$f.prototype.isDestroyed=function(){return!1},a$f.prototype.destroy=function(){return this._downSampleFBO1=this._downSampleFBO1&&this._downSampleFBO1.destroy(),this._downSampleFBO2=this._downSampleFBO2&&this._downSampleFBO2.destroy(),this._ambientOcclusionGenerateCommand=this._ambientOcclusionGenerateCommand&&this._ambientOcclusionGenerateCommand.shaderProgram&&this._ambientOcclusionGenerateCommand.shaderProgram.destroy(),this._blurXCommand=this._blurXCommand&&this._blurXCommand.shaderProgram&&this._blurXCommand.shaderProgram.destroy(),this._blurYCommand=this._blurYCommand&&this._blurYCommand.shaderProgram&&this._blurYCommand.shaderProgram.destroy(),i$10(this)};var k$d="uniform sampler2D u_colorTexture;\nuniform sampler2D u_appendTexture;\nuniform vec4 u_scanViewCenterArr[COUNT];\nuniform vec4 u_scanViewPlaneArr[COUNT];\nuniform float u_radiusArr[COUNT];\nuniform vec3 u_scanLineDirArr[COUNT];\nuniform vec3 u_scanLineMoveViewDirArr[COUNT];\nuniform vec3 u_scanLinePtArr[COUNT];\nuniform float u_lineWidth;\nuniform vec4 u_ScanColor;\nvarying vec2 v_textureCoordinates;\n\nvec3 pointProjectPlane(vec3 planeNormal, vec3 pointOnPlane, vec3 point1)\n{\n\tvec3 v01 = point1 - pointOnPlane;\n\tv01 = normalize(v01);\n\tvec3 normalizeVector = normalize(planeNormal);\n\tif (v01 == normalizeVector)\n\t{\n\t\treturn pointOnPlane;\n\t}\n\tfloat d = (planeNormal.x * (point1.x - pointOnPlane.x) + planeNormal.y * (point1.y - pointOnPlane.y) + planeNormal.z * (point1.z - pointOnPlane.z)) / dot(planeNormal, planeNormal);\n\tvec3 res;\n\tres = point1 - planeNormal * d;\n\treturn res;\n}\n\nfloat distancePointToLine(vec3 ptOnLine, vec3 vectorLine, vec3 testPt)\n{\n\tvec3 v = vectorLine;\n\tvec3 w = testPt - ptOnLine;\n\tfloat c1 = dot(w, v);\n\tfloat c2 = dot(v, v);\n\tfloat b = c1 / c2;\n\tvec3 Pb = ptOnLine + b * v;\n\treturn length(testPt - Pb);\n}\n\nvoid main()\n{\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n#ifdef LOG_DEPTH\n float scale = logDepthOrDepth;\n#else\n float scale = pow(logDepthOrDepth * 0.5 + 0.5, 8.0);\n#endif\n\tvec4 sceneColor = texture2D(u_colorTexture, v_textureCoordinates);\n\tfloat useSceneColor = 0.0;\n#if defined(WEBGL2) || defined(WEBGPU)\n\tif(scale < 0.000001)\n\t{\n\t\tuseSceneColor = 1.0;\n\t}\n#else\n\tif(scale > 0.999999)\n\t{\n\t\tuseSceneColor = 1.0;\n\t}\n#endif\n\tvec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\n\tviewPos /= viewPos.w;\n\tvec4 scanColor = vec4(1.0);\n\tfloat scanValue = 0.0;\n\tvec4 appendColor = vec4(0.0);\n\tfor(int i = 0;i < COUNT;i++)\n\t{\n\t\tvec3 scanViewPlane = u_scanViewPlaneArr[i].xyz;\n\t\tvec3 scanViewCenter = u_scanViewCenterArr[i].xyz;\n\t\tfloat radius = u_radiusArr[i];\n\t\tvec3 scanLinePt = u_scanLinePtArr[i];\n\t\tvec3 scanLineDir = u_scanLineDirArr[i];\n\t\tvec3 scanLineMoveViewDir = u_scanLineMoveViewDirArr[i];\n\t\tfloat lineWidth = u_lineWidth;\n\t\tvec3 prjOnPlane = pointProjectPlane(scanViewPlane, scanViewCenter, viewPos.xyz);\n\t\tvec2 appendTexCoord = vec2(0.0);\n\t#ifdef CIRCLE\n\t\tvec3 relativePos = prjOnPlane - scanViewCenter;\n\t\tfloat dis = length(relativePos);\n\t#ifdef APPEND_TEXTURE\n\t if(dis < radius)\n\t {\n\t vec3 zAxis = scanViewPlane;\n vec3 temp = vec3(1.0, 0.0, 0.0);\n vec3 xAxis = normalize(cross(temp, zAxis));\n vec3 yAxis = normalize(cross(zAxis, xAxis));\n float cosTheta = dot(normalize(relativePos), xAxis);\n float cosTheta2 = dot(normalize(relativePos), yAxis);\n appendTexCoord.x = (dis * cosTheta / radius + 1.0) * 0.5;\n appendTexCoord.y = (dis * cosTheta2 / radius + 1.0) * 0.5;\n\t }\n\t\tappendColor += texture2D(u_appendTexture, appendTexCoord);\n appendColor.rgb = appendColor.rgb * u_ScanColor.rgb;\n\t#else\n\t\tif(dis < radius)\n\t\t{\n\t\t\tfloat f = 1.0 - abs(radius - dis) / radius;\n\t\t\tf = pow(f, 8.0);\n\t\t\tscanValue = f;\n\t\t\tscanColor *= u_ScanColor;\n\t\t}\n\t#endif\n\t#else\n\t#ifdef APPEND_TEXTURE\n\t\tvec3 relativePos = prjOnPlane - scanLinePt;\n\t\tfloat cosTheta = dot(scanLineDir, normalize(relativePos));\n\t\tfloat cosTheta2 = dot(scanLineMoveViewDir, normalize(relativePos));\n\t\tfloat disToLineCenter = length(relativePos);\n\t\tappendTexCoord.x = (disToLineCenter * cosTheta / lineWidth + 1.0) * 0.5;\n\t\tappendTexCoord.y = (disToLineCenter * cosTheta2 / lineWidth + 1.0) * 0.5;\n\t\tappendColor += texture2D(u_appendTexture, appendTexCoord);\n\t\tappendColor.rgb = appendColor.rgb * u_ScanColor.rgb;\n\t#else\n\t\tfloat disToLine = distancePointToLine(scanLinePt, scanLineDir, prjOnPlane);\n\t\tif(disToLine < lineWidth)\n\t\t{\n\t\t\tfloat f = abs(lineWidth - disToLine) / lineWidth;\n\t\t\tf = pow(f, 8.0);\n\t\t\tscanValue += f;\n\t\t\tscanColor = u_ScanColor;\n\t\t}\n\t#endif\n\t#endif\n\t}\n#ifdef APPEND_TEXTURE\n\tgl_FragColor.rgb = sceneColor.rgb + appendColor.rgb * scanColor.rgb;\n#else\n\tgl_FragColor = mix(sceneColor, scanColor, scanValue);\n#endif\n\tgl_FragColor = mix(gl_FragColor, sceneColor, useSceneColor);\n}",e$d={CIRCLE:{programDefines:"CIRCLE"},LINE:{programDefines:"LINE"}},A$j=Object.freeze(e$d);function h$i(){this._fbo=void 0,this._inputFbo=void 0,this._scanCommand=void 0,this._upSamplePassState=new n$Z,this._scene=void 0,this._mode=A$j.LINE,this._scanViewCenterArr=[],this._scanPlaneArr=[],this._scanCenterArr=[],this._scanLineMoveDirArr=[],this._scanLineMoveViewDirArr=[],this._scanLineDirArr=[],this._scanLinePtArr=[],this._radiusArr=[],this._lineWidth=1e3,this._color=new e$1U(1,1,1,1),this._period=1e3,this._speed=1e3,this._show=!1,this._appendTexUrl=void 0,this._appendTexture=void 0,this._textureChanged=!1,this._useLogDepth=!0}Object.defineProperties(h$i.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(e$2b(this._owner)&&this._owner.scanShowChange(e),this._show=e)}},mode:{get:function(){return this._mode},set:function(e){this.changeProgramDefine(!1,this._mode.programDefines),this._mode=e,this.changeProgramDefine(!0,this._mode.programDefines)}},color:{get:function(){return this._color},set:function(e){this._color=e}},count:{get:function(){return this._scanCenterArr.length}},centerPostion:{get:function(){var e=this._scanCenterArr.length;return this._scanCenterArr[e-1]},set:function(e){this._scanCenterArr[0]=e,0===this._scanLineMoveDirArr.length&&(this._scanViewCenterArr[0]=new o$1p,this.computeDefaultMoveDir(0))}},period:{get:function(){return this._period/1e3},set:function(e){this._period=1e3*e}},speed:{get:function(){return this._speed},set:function(e){this._speed=e}},lineMoveDirection:{get:function(){var e=this._scanLineMoveDirArr.length;return this._scanLineMoveDirArr[e-1]},set:function(e){var t=this._scanLineMoveDirArr.length,i=o$1p.normalize(e,new o$1p);this._scanLineMoveDirArr[t-1]=i}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e}},textureUrl:{get:function(){return this._appendTexUrl},set:function(e){this._textureChanged=!0,this._appendTexUrl=e,(!e$2b(e)||""===e)&&this.changeProgramDefine(!1,"APPEND_TEXTURE")}}}),h$i.prototype.isPrepared=function(){return e$2b(this._scene)&&this._scene._pickDepths.length>0},h$i.prototype.execute=function(e){this._scanCommand.execute(e,this._upSamplePassState)};var G$h=new f$18,x$i=new e$29(0,0,0,1),v$f=new e$29(0,0,0,1),o$m=new e$29,d$m=new e$29,_$h=new o$1p,H$n=new o$1m(new o$1p(0,0,1),10);function j$g(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function Q$b(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}h$i.prototype.computeDefaultMoveDir=function(e){var t=new o$1p,i=this._scanCenterArr[e];t=o$1p.cross(new o$1p(0,0,1),i,t),t=o$1p.normalize(t,t),this._scanLineMoveDirArr[e]=t},h$i.prototype.computeScanPlane=function(e,t){var i=this._scanCenterArr[t],n=this._scanViewCenterArr[t],r=this._scanPlaneArr[t];e$2b(r)||(r=this._scanPlaneArr[t]=new e$29);var o=e._frameState.camera;e.mode===C$13.SCENE2D&&(v$f.x=i.x,v$f.y=i.y,v$f.z=i.z-1e3),x$i=p$1d.multiplyByVector(o.viewMatrix,v$f,x$i),d$m=e$29.subtract(n,x$i,d$m),_$h.x=d$m.x,_$h.y=d$m.y,_$h.z=d$m.z,_$h=o$1p.normalize(_$h,_$h);var a=o$1m.fromPointNormal(new o$1p(n.x,n.y,n.z),_$h,H$n);r.x=a.normal.x,r.y=a.normal.y,r.z=a.normal.z,r.w=a.distance},h$i.prototype.updateScanParameters=function(e){for(var t=e._frameState.camera,i=0,n=this._scanCenterArr.length;i<n;i++){var r=this._scanCenterArr[i];o$m.x=r.x,o$m.y=r.y,o$m.z=r.z,o$m.w=1,p$1d.multiplyByVector(t.viewMatrix,o$m,this._scanViewCenterArr[i]),this.computeScanPlane(e,i);var o=performance.now()%this._period;0==o&&(o=this._period);var a=this._speed*o/1e3;this._mode===A$j.CIRCLE?this._radiusArr[i]=a:this._mode===A$j.LINE&&(this.computeScanLineDir(e,i),this.computeScanLinePt(e,a,i))}},h$i.prototype.computeScanLineDir=function(e,t){var i=e._frameState.camera,n=this._scanLineDirArr[t];e$2b(n)||(n=this._scanLineDirArr[t]=new o$1p);var r=this._scanLineMoveDirArr[t];e$2b(r)||(r=this._scanLineMoveDirArr[t]=new o$1p);var o=this._scanCenterArr[t],a=this._scanViewCenterArr[t];n=e.mode===C$13.SCENE2D?o$1p.cross(r,new o$1p(0,0,1),n):o$1p.cross(r,o,n),o$1p.normalize(n,n);var s=new o$1p;s=o$1p.multiplyByScalar(n,10,s),s=o$1p.add(o,s,s),o$m.x=s.x,o$m.y=s.y,o$m.z=s.z,o$m.w=1,o$m=p$1d.multiplyByVector(i.viewMatrix,o$m,o$m),n.x=o$m.x-a.x,n.y=o$m.y-a.y,n.z=o$m.z-a.z,o$1p.normalize(n,n)},h$i.prototype.computeScanLinePt=function(e,t,i){var n=e._frameState.camera,r=this._scanLinePtArr[i];e$2b(r)||(r=this._scanLinePtArr[i]=new o$1p);var o=this._scanLineMoveDirArr[i],a=this._scanCenterArr[i],s=this._scanViewCenterArr[i],l=this._scanLineMoveViewDirArr[i];e$2b(l)||(l=this._scanLineMoveViewDirArr[i]=new o$1p),r=o$1p.multiplyByScalar(o,t,r),r=o$1p.add(a,r,r),o$m.x=r.x,o$m.y=r.y,o$m.z=r.z,o$m.w=1,o$m=p$1d.multiplyByVector(n.viewMatrix,o$m,o$m),r.x=o$m.x,r.y=o$m.y,r.z=o$m.z,l.x=o$m.x-s.x,l.y=o$m.y-s.y,l.z=o$m.z-s.z,o$1p.normalize(l,l)},h$i.prototype.update=function(e,t,i,n){this._context=t.context;var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight;this._scene=i,this.updateScanParameters(i);var a=this;if(this._textureChanged&&(e$2b(this._appendTexUrl)&&""!==this._appendTexUrl&&o$1l(t$T(a._appendTexUrl),(function(t){e$2b(a._appendTexture)&&a._appendTexture.destroy(),a._appendTexture=new t$V({context:e,source:t,pixelFormat:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE}),a.changeProgramDefine(!0,"APPEND_TEXTURE")})),this._textureChanged=!1),e$2b(this._scanCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),!e$2b(this._scanCommand)){var s=new s$U({name:"Scan",sources:[k$d]});s.defines.push(this._mode.programDefines),s.defines.push("COUNT "+this._scanCenterArr.length),n&&s.defines.push("LOG_DEPTH"),this._scanCommand=e.createViewportQuadCommand(s,{shaderProgramName:"scanEffect",uniformMap:{},owner:this}),this._scanCommand.uniformMap.u_depthTex=function(){return a._scene._pickDepths[0]._depthTexture},this._scanCommand.uniformMap.u_colorTexture=function(){return a._inputFbo.getColorTexture(0)},this._scanCommand.uniformMap.u_appendTexture=function(){return e$2b(a._appendTexture)?a._appendTexture:a._context.defaultTexture},this._scanCommand.uniformMap.u_scanViewCenterArr=function(){return a._scanViewCenterArr},this._scanCommand.uniformMap.u_radiusArr=function(){return a._radiusArr},this._scanCommand.uniformMap.u_scanViewPlaneArr=function(){return a._scanPlaneArr},this._scanCommand.uniformMap.u_scanLineDirArr=function(){return a._scanLineDirArr},this._scanCommand.uniformMap.u_scanLineMoveViewDirArr=function(){return a._scanLineMoveViewDirArr},this._scanCommand.uniformMap.u_scanLinePtArr=function(){return a._scanLinePtArr},this._scanCommand.uniformMap.u_lineWidth=function(){return a._lineWidth},this._scanCommand.uniformMap.u_ScanColor=function(){return a._color}}var l=this._fbo,u=e$2b(l)&&l.getColorTexture(0)||void 0;if(!e$2b(u)||u.width!==r||u.height!==o){this._fbo=this._fbo&&this._fbo.destroy(),this._fbo=new t$W({context:e,colorTextures:[new t$V({context:e,width:r,height:o})]}),this._scanCommand.framebuffer=this._fbo;var c=G$h;c.width=r,c.height=o;var h=d$1m.fromCache({viewport:c});this._scanCommand.renderState=h}this._upSamplePassState.context=e},h$i.prototype.setInputFBO=function(e){this._inputFbo=e},h$i.prototype.getScanTexture=function(){return this._fbo.getColorTexture(0)},h$i.prototype.getScanFBO=function(){return this._fbo},h$i.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2b(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?j$g(n,t):Q$b(n,t),i.shaderProgram.destroy(),i.shaderProgram=r$13.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}},h$i.prototype.add=function(e){if(e$2b(e))return 0===this._scanCenterArr.length?void(this.centerPosition=o$1p.clone(e)):(this.changeProgramDefine(!1,"COUNT "+this._scanCenterArr.length),this._scanCenterArr.push(e),this._scanViewCenterArr.push(new o$1p),this.changeProgramDefine(!0,"COUNT "+this._scanCenterArr.length),this.computeDefaultMoveDir(this._scanCenterArr.length-1),this._scanCenterArr.length-1)},h$i.prototype.remove=function(e){e>=this._scanCenterArr.length||1===this._scanCenterArr.length||(this.changeProgramDefine(!1,"COUNT "+this._scanCenterArr.length),this._scanCenterArr.splice(e,1),this._scanViewCenterArr.splice(e,1),this._scanLineMoveDirArr.splice(e,1),this.changeProgramDefine(!0,"COUNT "+this._scanCenterArr.length))},h$i.prototype.isDestroyed=function(){return!1},h$i.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._scanCommand=this._scanCommand&&this._scanCommand.shaderProgram&&this._scanCommand.shaderProgram.destroy(),e$2b(this._appendTexture)&&(this._appendTexture.destroy(),this._appendTexture=null),i$10(this)};var I$i="#define AA_SAMPLES 9\n#define AA_CLAMP 1\n#define AA_CLIP 0\n#define SHARPEN 1\nuniform sampler2D u_currentTexture;\nuniform sampler2D u_historyTexture;\nuniform mat4 u_transformMatrix;\nuniform vec2 u_jitter;\nuniform float u_sampleSpatialWeight[AA_SAMPLES];\nuniform vec2 u_offsets3x3[AA_SAMPLES];\nvarying vec2 v_textureCoordinates;\n\nvec3 RGB2YCoCgR(vec3 rgbColor){\n float Y = dot(rgbColor, vec3(1.0, 2.0, 1.0));\n float Co = dot(rgbColor, vec3(2.0, 0.0, -2.0));\n float Cg = dot(rgbColor, vec3(-1.0, 2.0, -1.0));\n vec3 YCoCgRColor = vec3(Y, Co, Cg);\n return YCoCgRColor;\n}\n\nvec3 YCoCgR2RGB(vec3 YCoCgRColor){\n float Y = YCoCgRColor.x * 0.25;\n float Co = YCoCgRColor.y * 0.25;\n float Cg = YCoCgRColor.z * 0.25;\n float R = Y + Co - Cg;\n float G = Y + Cg;\n float B = Y - Co - Cg;\n vec3 rgbColor = vec3(R, G, B);\n return rgbColor;\n}\n\nfloat Luminance(vec3 color){\n return color.r;\n}\n\nvec3 ToneMap(vec3 color){\n return color / (1.0 + Luminance(color));\n}\n\nvec3 UnToneMap(vec3 color){\n return color / (1.0 - Luminance(color));\n}\n\nvec3 GetNeighorhoodSamp(vec2 offset, vec2 uv){\n float fx = offset.x;\n float fy = offset.y;\n vec2 sampleOffset = vec2(fx / czm_viewport.z, fy / czm_viewport.w);\n vec2 sampleUV = uv + sampleOffset;\n sampleUV = clamp(sampleUV, 0.0, 1.0);\n vec3 neighorhoodSamp = texture2D(u_currentTexture, sampleUV).rgb;\n neighorhoodSamp = max(neighorhoodSamp, 0.0);\n neighorhoodSamp = ToneMap(neighorhoodSamp);\n neighorhoodSamp = RGB2YCoCgR(neighorhoodSamp);\n return neighorhoodSamp;\n}\nfloat HdrWeightY(float Color){\n float exposure = 1.0;\n return 1.0 / (Color * exposure + 4.0);\n}\n// Get the Luma4 of the sceneColor\nfloat GetSceneColorLuma4(vec3 SceneColor){\n // AA_YCOCG\n return SceneColor.x;\n}\n// Get the HDR weight of the transform scene color.\nfloat GetSceneColorHdrWeight(vec3 SceneColor)\n{\n //#if AA_YCOCG\n return HdrWeightY(SceneColor.x);\n}\nvec2 WeightedLerpFactors(float WeightA, float WeightB, float Blend)\n{\n float BlendA = (1.0 - Blend) * WeightA;\n float BlendB = Blend * WeightB;\n float RcpBlend = 1.0 / (BlendA + BlendB);\n BlendA *= RcpBlend;\n BlendB *= RcpBlend;\n return vec2(BlendA, BlendB);\n}\n// Compute the neighborhood bounding box used to reject history.\nvoid ComputeNeighborhoodBoundingbox(in vec3 Neighbors[AA_SAMPLES], out vec3 OutNeighborMin, out vec3 OutNeighborMax)\n{\n vec3 NeighborMin;\n vec3 NeighborMax;\n NeighborMin = min( min(Neighbors[1], Neighbors[3]), Neighbors[4] );\n NeighborMin = min( min(NeighborMin, Neighbors[5]), Neighbors[7] );\n NeighborMax = max( max(Neighbors[1], Neighbors[3]), Neighbors[4] );\n NeighborMax = max( max(NeighborMax, Neighbors[5]), Neighbors[7] );\n\tvec3 NeighborMinPlus = NeighborMin;\n vec3 NeighborMaxPlus = NeighborMax;\n NeighborMin = min( min(NeighborMin, Neighbors[0]), Neighbors[2] );\n NeighborMin = min( min(NeighborMin, Neighbors[6]), Neighbors[8] );\n NeighborMax = max( max(NeighborMax, Neighbors[0]), Neighbors[2] );\n NeighborMax = max( max(NeighborMax, Neighbors[6]), Neighbors[8] );\n //if( AA_ROUND )\n// {\n// NeighborMin = NeighborMin * 0.5 + NeighborMinPlus * 0.5;\n// NeighborMax = NeighborMax * 0.5 + NeighborMaxPlus * 0.5;\n// }\n OutNeighborMin = NeighborMin;\n OutNeighborMax = NeighborMax;\n}\n// Intersect ray with AABB, knowing there is an intersection.\n// Dir = Ray direction.\n// Org = Start of the ray.\n// Box = Box is at {0,0,0} with this size.\n// Returns distance on line segment.\nfloat IntersectAABB(vec3 Dir, vec3 Org, vec3 Box){\n vec3 RcpDir = vec3(1.0 / Dir.x, 1.0 / Dir.y, 1.0 / Dir.z);\n vec3 TNeg = ( Box - Org) * RcpDir;\n vec3 TPos = ((-Box) - Org) * RcpDir;\n return max(max(min(TNeg.x, TPos.x), min(TNeg.y, TPos.y)), min(TNeg.z, TPos.z));\n}\nfloat HistoryClip(vec3 History, vec3 Filtered, vec3 NeighborMin, vec3 NeighborMax){\n#if 0\n vec3 Min = min(Filtered, min(NeighborMin, NeighborMax));\n vec3 Max = max(Filtered, max(NeighborMin, NeighborMax));\n vec3 Avg2 = Max + Min;\n vec3 Dir = Filtered - History;\n vec3 Org = History - Avg2 * 0.5;\n vec3 Scale = Max - Avg2 * 0.5;\n return clamp(IntersectAABB(Dir, Org, Scale), 0.0, 1.0);\n#else\n vec3 BoxMin = NeighborMin;\n vec3 BoxMax = NeighborMax;\n vec3 RayOrigin = History;\n vec3 RayDir = Filtered - History;\n RayDir = all(lessThanEqual(abs(RayDir), vec3(1.0/65536.0))) ? vec3(1.0/65536.0) : RayDir;\n vec3 InvRayDir = vec3( 1.0 / RayDir.x, 1.0 / RayDir.y, 1.0 / RayDir.z );\n vec3 MinIntersect = (BoxMin - RayOrigin) * InvRayDir;\n vec3 MaxIntersect = (BoxMax - RayOrigin) * InvRayDir;\n vec3 EnterIntersect = min( MinIntersect, MaxIntersect );\n return max( max(EnterIntersect.x, EnterIntersect.y), EnterIntersect.z );\n#endif\n}\n// Clamp history.\nvec3 ClampHistory(vec3 Filtered, vec3 History, vec3 NeighborMin, vec3 NeighborMax)\n{\n#if !AA_CLAMP\n return History;\n#elif AA_CLIP\n // Clip history, this uses color AABB intersection for tighter fit.\n vec3 TargetColor = Filtered;\n vec3 HistoryColor = History;\n float ClipBlend = HistoryClip( HistoryColor.rgb, TargetColor.rgb, NeighborMin.rgb, NeighborMax.rgb );\n //float DistToClamp = saturate(-ClipBlend) / ( saturate(-ClipBlend) + 1 );\n //float DistToClamp = abs( ClipBlend ) / ( 1 - ClipBlend );\n ClipBlend = clamp( ClipBlend, 0.0, 1.0 );\n HistoryColor = mix( HistoryColor, TargetColor, ClipBlend );\n return HistoryColor;\n#else //!AA_CLIP \n History = clamp(History, NeighborMin, NeighborMax);\n return History;\n#endif\n}\n\n// Filter input pixels.\nvec3 FilterCurrentFrameInputSamples(in vec2 uv, inout vec3 neighborhood[AA_SAMPLES]){\n for(int i = 0; i < AA_SAMPLES; i++){\n neighborhood[i] = GetNeighorhoodSamp(u_offsets3x3[i], uv);\n }\n float totalWeight = 0.0;\n vec3 sum = vec3(0.0);\n for(int i = 0; i < AA_SAMPLES; i++){\n float neighborhoodHdrWeight = GetSceneColorHdrWeight(neighborhood[i]);\n float neighborhoodFinalWeight = neighborhoodHdrWeight * u_sampleSpatialWeight[i];\n //float neighborhoodFinalWeight = neighborhoodHdrWeight;\n totalWeight += neighborhoodFinalWeight;\n sum += neighborhood[i] * neighborhoodFinalWeight;\n }\n vec3 filtered = sum / totalWeight;\n return filtered;\n}\nvoid main()\n{\n float HistoryBlur = 0.0;\n vec2 jitteredUV = v_textureCoordinates + u_jitter;\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n vec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\n viewPos /= viewPos.w;\n vec4 histroyUV = u_transformMatrix * viewPos;\n histroyUV = histroyUV / histroyUV.w;\n histroyUV.xy = histroyUV.xy * 0.5 + 0.5;\n histroyUV.xy = histroyUV.xy + u_jitter;\n vec3 prevColor = texture2D(u_historyTexture, histroyUV.xy).rgb;\n prevColor = ToneMap(prevColor);\n prevColor = RGB2YCoCgR(prevColor);\n vec3 neighborhood[AA_SAMPLES];\n vec3 filtered = FilterCurrentFrameInputSamples(jitteredUV, neighborhood);\n // Compute neighborhood bounding box.\n vec3 NeighborMin;\n vec3 NeighborMax;\n ComputeNeighborhoodBoundingbox(neighborhood, NeighborMin, NeighborMax);\n // Save off luma of history before the clamp.\n float LumaMin = GetSceneColorLuma4(NeighborMin);\n float LumaMax = GetSceneColorLuma4(NeighborMax);\n float LumaHistory = GetSceneColorLuma4(prevColor);\n prevColor = ClampHistory(filtered, prevColor, NeighborMin, NeighborMax);\n float BlendFinal = 0.04;\n // DO FINAL BLEND BETWEEN HISTORY AND FILTERED COLOR\n // -------------------------------------------------\n // Luma weighted blend\n float FilterWeight = GetSceneColorHdrWeight(filtered);\n float HistoryWeight = GetSceneColorHdrWeight(prevColor);\n vec2 Weights = WeightedLerpFactors(HistoryWeight, FilterWeight, BlendFinal);\n vec3 color = prevColor * Weights.x + filtered * Weights.y;\n color = YCoCgR2RGB(color);\n color = UnToneMap(color);\n gl_FragColor.rgb = color;\n gl_FragColor.a = 1.0;\n}",C$i=8,D$g=[0,-.5,.5,-3/4,1/4,-1/4,3/4,-7/8],W$i=[-1/3,1/3,-7/9,-1/9,5/9,-5/9,1/9,7/9],g$n=[new o$1o(-1,-1),new o$1o(0,-1),new o$1o(1,-1),new o$1o(-1,0),new o$1o(0,0),new o$1o(1,0),new o$1o(-1,1),new o$1o(0,1),new o$1o(1,1)];function a$e(){this._compositeCommand=void 0,this._histroyFBO=[],this._upSamplePassState=new n$Z,this._show=!1,this._fbo=void 0,this._fboIndex=0,this._uniformState=void 0,this._prevViewProjectionMatrx=new p$1d,this._transformMatrix=new p$1d,this._frameIndex=0,this._jitterPixel=new o$1o,this._jitterUVOffset=new o$1o,this._sampleWeights=[],this._plusWeights=[]}Object.defineProperties(a$e.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e)}}}),a$e.prototype.execute=function(e,t){!e$2b(e.uniformState)||!e$2b(e.uniformState.globeDepthTexture)||(this._compositeCommand.framebuffer=this._histroyFBO[this._fboIndex],this._compositeCommand.execute(e,this._upSamplePassState),this._frameIndex++,this._frameIndex===C$i&&(this._frameIndex=0))};var L$k=new f$18;a$e.prototype.update=function(e,t,i,n){var r=n.useLogDepth,o=(e=t.context).uniformState;this._uniformState=o,o.viewProjection.clone(this._prevViewProjectionMatrx);var a=e.drawingBufferWidth,s=e.drawingBufferHeight;this._scene=i,e$2b(this._compositeCommand)&&r!==this._useLogDepth&&(this._useLogDepth=r,this.changeProgramDefine(r,"LOG_DEPTH")),e$2b(this._compositeCommand)||this.createCommand(e);var l=!1;if(0==this._histroyFBO.length)l=!0;else{var u=this._histroyFBO[0],c=e$2b(u)&&u.getColorTexture(0)||void 0;(!e$2b(c)||c.width!==a||c.height!==s)&&(l=!0)}if(l){this.createFBO(a,s,e);var h=L$k;h.width=a,h.height=s;var d=d$1m.fromCache({viewport:h});this._compositeCommand.renderState=d}this._upSamplePassState.context=e,this._fboIndex=(this._fboIndex+1)%2,n.jitterIndex=this._frameIndex,V$e(this,n,a,s),U$g(this)};var l$j=new o$1o;function V$e(e,t,i,n){var r=e._frameIndex%C$i,o=D$g[r],a=W$i[r],s=.47,l=Math.exp(-.565866908103214),u=2*Math.PI*a,c=s*Math.sqrt(-2*Math.log((1-o)*l+o)),h=c*Math.cos(u),d=c*Math.sin(u);e._jitterPixel.x=h,e._jitterPixel.y=d;var f=e._jitterPixel.x/i,p=e._jitterPixel.y/n;l$j.x=f,l$j.y=p,t.jitter=l$j,e._jitterUVOffset.x=-f/2,e._jitterUVOffset.y=-p/2}function U$g(e){var t,i,n=[],r=[],o=0;for(i=0;i<9;i++){var a=g$n[i].x-e._jitterPixel.x,s=g$n[i].y-e._jitterPixel.y;n[i]=Math.exp(-2.29*(a*a+s*s)),o+=n[i]}for(r[0]=n[1],r[1]=n[3],r[2]=n[4],r[3]=n[5],r[4]=n[7],t=n[1]+n[3]+n[4]+n[5]+n[7],i=0;i<9;i++)n[i]=n[i]/o;for(i=0;i<5;i++)r[i]=r[i]/t;e._sampleWeights=n,e._plusWeights=r}function H$m(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function R$i(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}a$e.prototype.createFBO=function(e,t,i){var n,r=_$$.FLOAT;for(n=0;n<this._histroyFBO.length;n++)this._histroyFBO[n].destroy();for(this._histroyFBO=[],n=0;n<2;n++){var o=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t,pixelDatatype:r})]});this._histroyFBO.push(o)}},a$e.prototype.createCommand=function(e){var t=new s$U({name:"TAAComposite",sources:[I$i]});this._useLogDepth&&t.defines.push("LOG_DEPTH"),this._compositeCommand=e.createViewportQuadCommand(t,{uniformMap:{},owner:this}),this.createUniformMap()},a$e.prototype.createUniformMap=function(){if(e$2b(this._compositeCommand)){var e=this;this._compositeCommand.uniformMap.u_currentTexture=function(){return e._fbo.getColorTexture(0)},this._compositeCommand.uniformMap.u_historyTexture=function(){var t=(e._fboIndex+1)%2;return e._histroyFBO[t].getColorTexture(0)},this._compositeCommand.uniformMap.u_transformMatrix=function(){var t=e._uniformState.inverseView3D;return p$1d.multiply(e._prevViewProjectionMatrx,t,e._transformMatrix),e._transformMatrix},this._compositeCommand.uniformMap.u_jitter=function(){return e._jitterUVOffset},this._compositeCommand.uniformMap.u_sampleSpatialWeight=function(){return e._sampleWeights},this._compositeCommand.uniformMap.u_offsets3x3=function(){return g$n}}},a$e.prototype.setInputFBO=function(e){this._fbo=e},a$e.prototype.getTAATexture=function(){return this._histroyFBO[this._fboIndex].getColorTexture(0)},a$e.prototype.getOutputFBO=function(){return this._histroyFBO[this._fboIndex]},a$e.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2b(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?H$m(n,t):R$i(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n})}},a$e.prototype.isDestroyed=function(){return!1},a$e.prototype.destroy=function(){for(var e=0;e<this._histroyFBO.length;e++)this._histroyFBO[e].destroy();return this._compositeCommand=this._compositeCommand&&this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy(),i$10(this)};var u$g={BLOOM:"BLOOM",COLOR_CORRECTION:"COLOR_CORRECTION",SCAN:"SCAN",SSAO:"SSAO",TONEMAPPING:"TONEMAPPING",ACES_TONEMAPPING:"ACES_TONEMAPPING",FILMIC_TONEMAPPING:"FILMIC_TONEMAPPING"};function o$l(e){this._fbo=void 0,this._blendCommand=void 0,this._fullScreenCommand=void 0,this._upSamplePassState=new n$Z,this.bloomEffect=void 0,this.colorCorrection=void 0,this.context=e,this.show=!1,this.bloomEffect=new e$f,this.colorCorrection=new o$n(e),this.depthOfFieldEffect=new n$g,this.SSAOEffect=new a$f,this.scanEffect=new h$i,this.temporalAA=new a$e,this.bloomEffect._owner=this,this.colorCorrection._owner=this,this.scanEffect._owner=this,this.SSAOEffect._owner=this,this.exposure=1,this.toneMappingWhitePoint=11.2,this._toneMappingEnabled=!1,this.inputTexture=void 0,this._outputFbo=void 0}Object.defineProperties(o$l.prototype,{toneMappingEnabled:{get:function(){return this._toneMappingEnabled},set:function(e){e!==this._toneMappingEnabled&&(this.toneMappingEnabledChange(e),this._toneMappingEnabled=e)}},outputFbo:{get:function(){return this._outputFbo},set:function(e){this._outputFbo=e}}}),o$l.prototype.isEnable=function(){return this.isTAAEnable()||this.isBloomEnable()||this.isColorCorrectionEnable()||this.isDOFEnable()||this.isScanEnable()||this.isSSAOEnable()||this._toneMappingEnabled},o$l.prototype.isBloomEnable=function(){return e$2b(this.bloomEffect)&&this.bloomEffect.show},o$l.prototype.isColorCorrectionEnable=function(){return e$2b(this.colorCorrection)&&this.colorCorrection.show},o$l.prototype.isDOFEnable=function(){return e$2b(this.depthOfFieldEffect)&&this.depthOfFieldEffect.show},o$l.prototype.isSSAOEnable=function(){return e$2b(this.SSAOEffect)&&this.SSAOEffect.show},o$l.prototype.isScanEnable=function(){return e$2b(this.scanEffect)&&this.scanEffect.show},o$l.prototype.isTAAEnable=function(){return e$2b(this.temporalAA)&&this.temporalAA.show},o$l.prototype.clear=function(e,t){this.isBloomEnable()&&this.bloomEffect.clear(e,t)},o$l.prototype.copy=function(e,t){this.inputTexture=t,this._fullScreenCommand.framebuffer=this._fbo,this._fullScreenCommand.execute(e),this.inputTexture=void 0},o$l.prototype.execute=function(e,t){this.isTAAEnable()&&this.temporalAA.execute(e),this.isDOFEnable()&&this.depthOfFieldEffect.execute(e),this.isScanEnable()&&this.scanEffect.execute(e),this.isBloomEnable()&&this.bloomEffect.execute(e,t),this.isSSAOEnable()&&this.SSAOEffect.execute(e,t),this.isEnable()&&(this._fullScreenCommand.framebuffer=t,this._blendCommand.framebuffer=t,this._fullScreenCommand.execute(e),this._blendCommand.execute(e,this._upSamplePassState))};var j$f=new f$18;function k$c(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function z$g(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function a$d(e,t){var i,n=t.terrainProvider,r=t.mapProjection,o=r.ellipsoid,a=t.camera.getRectangleCameraCoordinates(e);return i=t.mode===C$13.SCENE3D?o.cartesianToCartographic(a):r.unproject(a),e$2b(n)?n.readyPromise.then((function(){if(!e$2b(n.availability)||t.mode===C$13.SCENE2D)return i;var r=[h$18.center(e),h$18.southeast(e),h$18.southwest(e),h$18.northeast(e),h$18.northwest(e)];return a$d._sampleTerrainMostDetailed(n,r).then((function(e){var t=e.reduce((function(e,t){return Math.max(t.height,e)}),-Number.MAX_VALUE),n=i;return n.height+=isNaN(t)?0:t,n}))})):o$1l.resolve(i)}o$l.prototype.update=function(e,t,i,n){var r=n.useLogDepth;this.isTAAEnable()&&this.temporalAA.update(e,t,i,n),this.isDOFEnable()&&this.depthOfFieldEffect.update(e,t,i,r),this.isScanEnable()&&this.scanEffect.update(e,t,i,r),this.isBloomEnable()&&this.bloomEffect.update(e,t,i),this.isSSAOEnable()&&this.SSAOEffect.update(e,t,i,r);var o=(e=t.context).drawingBufferWidth,a=e.drawingBufferHeight;if(!e$2b(this._blendCommand)){var s=new s$U({name:"CompositorFP",sources:[v$h]});this.isScanEnable()&&s.defines.push(u$g.SCAN),this.isBloomEnable()&&s.defines.push(u$g.BLOOM),this.isColorCorrectionEnable()&&s.defines.push(u$g.COLOR_CORRECTION),this.isSSAOEnable()&&s.defines.push(u$g.SSAO),this._toneMappingEnabled&&s.defines.push(u$g.TONEMAPPING);var l={};this._blendCommand=e.createViewportQuadCommand(s,{shaderProgramName:"compositorBlend",uniformMap:l,owner:this}),l={},this._fullScreenCommand=e.createViewportQuadCommand(I$j,{shaderProgramName:"compositorFullScreen",uniformMap:l,owner:this})}var u=this._fbo,c=e$2b(u)&&u.getColorTexture(0)||void 0;if(!e$2b(c)||c.width!==o||c.height!==a){u=u&&u.destroy();var h=[new t$V({context:e,width:o,height:a,pixelDatatype:e.colorBufferHalfFloat?_$$.HALF_FLOAT:_$$.FLOAT})];u=e.depthTexture?this._fbo=new t$W({context:e,colorTextures:h,depthTexture:new t$V({context:e,width:o,height:a,pixelFormat:V$10.DEPTH_COMPONENT,pixelDatatype:_$$.UNSIGNED_SHORT})}):this._fbo=new t$W({context:e,colorTextures:h,depthRenderbuffer:new r$$({context:e,format:M$13.DEPTH_COMPONENT16})});var d=j$f;d.width=o,d.height=a;var f=d$1m.fromCache({viewport:d}),p=this;this._blendCommand.uniformMap.u_texture0=function(){return p.isTAAEnable()?p.temporalAA.getTAATexture():p.isDOFEnable()?p.depthOfFieldEffect.getDOFTexture():p.isScanEnable()?p.scanEffect.getScanTexture():u.getColorTexture(0)},this._blendCommand.uniformMap.u_ScanColor=function(){return p.scanEffect.color},this._blendCommand.uniformMap.u_BloomTexture=function(){return p.bloomEffect.getBloomTexture()},this._blendCommand.uniformMap.u_Bloom_DirtTex=function(){return p.bloomEffect.getBloomDirtTexture()},this._blendCommand.uniformMap.u_BloomTex_TexelSize=function(){return p.bloomEffect.getBloomTextureTexelSize()},this._blendCommand.uniformMap.u_Bloom_DirtTileOffset=function(){return p.bloomEffect.getDirtTileOffset()},this._blendCommand.uniformMap.u_Bloom_Settings=function(){return p.bloomEffect.getBloomSettings()},this._blendCommand.uniformMap.u_Bloom_Color=function(){return p.bloomEffect.getBloomColor()},this._blendCommand.uniformMap.u_AmbientOcclusionTexture=function(){return p.SSAOEffect.getAmbientOcclusionTexture()},this._blendCommand.uniformMap.u_brightness=function(){return p.colorCorrection.brightness},this._blendCommand.uniformMap.u_contrast=function(){return p.colorCorrection.contrast},this._blendCommand.uniformMap.u_saturation=function(){return p.colorCorrection.saturation},this._blendCommand.uniformMap.u_hue=function(){return p.colorCorrection.hue},this._blendCommand.uniformMap.u_exposure=function(){return p.exposure},this._blendCommand.uniformMap.u_toneMappingWhitePoint=function(){return p.toneMappingWhitePoint},this._blendCommand.renderState=f,this._fullScreenCommand.uniformMap.u_texture=function(){return u$_(p.inputTexture,u.getColorTexture(0))},this._fullScreenCommand.renderState=f}return this.temporalAA.setInputFBO(u),this.isTAAEnable()&&(u=this.temporalAA.getOutputFBO()),this.depthOfFieldEffect.setInputFBO(u),this.SSAOEffect.setInputFBO(u),this.bloomEffect.setInputFBO(u),this.scanEffect.setInputFBO(u),this._upSamplePassState.context=e,this._fbo},o$l.prototype.getColorFramebuffer=function(){return this._fbo},o$l.prototype.isDestroyed=function(){return!1},o$l.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._blendCommand=this._blendCommand&&this._blendCommand.shaderProgram&&this._blendCommand.shaderProgram.destroy(),this._fullScreenCommand=this._fullScreenCommand&&this._fullScreenCommand.shaderProgram&&this._fullScreenCommand.shaderProgram.destroy(),e$2b(this.bloomEffect)&&(this.bloomEffect.destroy(),this.bloomEffect=null),e$2b(this.colorCorrection)&&(this.colorCorrection.destroy(),this.colorCorrection=null),e$2b(this.SSAOEffect)&&(this.SSAOEffect.destroy(),this.SSAOEffect=null),e$2b(this.DepthOfFieldEffect)&&(this.DepthOfFieldEffect.destroy(),this.DepthOfFieldEffect=null),e$2b(this.ScanEffect)&&(this.ScanEffect.destroy(),this.ScanEffect=null),e$2b(this.temporalAA)&&(this.temporalAA.destroy(),this.temporalAA=null),i$10(this)},o$l.prototype.scanShowChange=function(e){this.changeProgramDefine(e,u$g.SCAN)},o$l.prototype.bloomShowChange=function(e){this.changeProgramDefine(e,u$g.BLOOM)},o$l.prototype.colorCorrectionShowChange=function(e){this.changeProgramDefine(e,u$g.COLOR_CORRECTION)},o$l.prototype.ssaoShowChange=function(e){this.changeProgramDefine(e,u$g.SSAO)},o$l.prototype.toneMappingEnabledChange=function(e){this.changeProgramDefine(e,u$g.TONEMAPPING)},o$l.prototype.changeProgramDefine=function(e,t){var i=this._blendCommand;if(e$2b(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?k$c(n,t):z$g(n,t),i.shaderProgram.destroy(),i.shaderProgram=r$13.fromCache({context:this.context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}},a$d._sampleTerrainMostDetailed=y$B;var e$c={DESIGN:0,NORMAL:1},vi$1=Object.freeze(e$c),W$h=/{[^}]+}/g,X$b={x:Q$a,y:ee$8,z:ie$5,s:ne$a,reverseX:$$e,reverseY:te$6,reverseZ:re$8,westDegrees:ae$7,southDegrees:oe$7,eastDegrees:ue$8,northDegrees:se$5,westProjected:ce$a,southProjected:le$b,eastProjected:he$7,northProjected:de$6,width:fe$5,height:me$9},J$9=p$19(X$b,{i:ge$8,j:ve$5,reverseI:_e$6,reverseJ:ye$5,longitudeDegrees:we$4,latitudeDegrees:pe$8,longitudeProjected:Te$5,latitudeProjected:Se$5,format:De$7});function _$g(e){if(!e$2b(e))throw new t$16("options is required.");if(!o$1l.isPromise(e)&&!e$2b(e.url))throw new t$16("options is required.");this._errorEvent=new o$1h,this._resource=void 0,this._urlSchemeZeroPadding=void 0,this._pickFeaturesResource=void 0,this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._minimumLevel=void 0,this._tilingScheme=void 0,this._rectangle=void 0,this._tileDiscardPolicy=void 0,this._credit=void 0,this._hasAlphaChannel=void 0,this._readyPromise=void 0,this._tags=void 0,this._pickFeaturesTags=void 0,this.enablePickFeatures=!0,this.reinitialize(e)}function K$a(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(_$g.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this.ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this.ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this.ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this.ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){if(!this.ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this.ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this.ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return e$2b(this._resource)}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){if(!this.ready)throw new t$16("credit must not be called before the imagery provider is ready.");return this._credit}},hasAlphaChannel:{get:function(){if(!this.ready)throw new t$16("hasAlphaChannel must not be called before the imagery provider is ready.");return this._hasAlphaChannel}}}),_$g.prototype.reinitialize=function(e){var t=this;t._readyPromise=o$1l(e).then((function(i){if(!e$2b(i))throw new t$16("options is required.");if(!e$2b(i.url))throw new t$16("options.url is required.");t._baseUrl=e.baseUrl;var n=i.customTags,r=p$19(X$b,n),o=p$19(J$9,n),a=t$11.createIfNeeded(i.url),s=t$11.createIfNeeded(i.pickFeaturesUrl);t.enablePickFeatures=u$_(i.enablePickFeatures,t.enablePickFeatures),t._urlSchemeZeroPadding=u$_(i.urlSchemeZeroPadding,t.urlSchemeZeroPadding),t._tileDiscardPolicy=i.tileDiscardPolicy,t._getFeatureInfoFormats=i.getFeatureInfoFormats,t._subdomains=i.subdomains,Array.isArray(t._subdomains)?t._subdomains=t._subdomains.slice():e$2b(t._subdomains)&&t._subdomains.length>0?t._subdomains=t._subdomains.split(""):t._subdomains=["a","b","c"],t._tileWidth=u$_(i.tileWidth,256),t._tileHeight=u$_(i.tileHeight,256),t._minimumLevel=u$_(i.minimumLevel,0),t._maximumLevel=i.maximumLevel,t._tilingScheme=u$_(i.tilingScheme,new c$R({ellipsoid:i.ellipsoid})),t._rectangle=u$_(i.rectangle,t._tilingScheme.rectangle),t._rectangle=h$18.intersection(t._rectangle,t._tilingScheme.rectangle),t._hasAlphaChannel=u$_(i.hasAlphaChannel,!0);var l=i.credit;"string"==typeof l&&(l=new r$T(l)),t._credit=l,t._resource=a,t._tags=r,t._pickFeaturesResource=s,t._pickFeaturesTags=o;var u=i.url;return t.tablename=i.url,new l$15({name:u}).then((function(e){e.checkObjectStoreExit(t.tablename)?t._indexedDBScheduler=e:e.createObjectStore(t.tablename).then((function(){t._indexedDBScheduler=e}))})),t._indexedDBSetting={isOpen:!1,clear:function(){t._indexedDBScheduler.clear(t.tablename)},cache:[]},!0}))},_$g.prototype.getTileCredits=function(e,t,i){if(!this.ready)throw new t$16("getTileCredits must not be called before the imagery provider is ready.")},_$g.prototype.requestImage=function(e,t,i,n){if(!this.ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=M$j(this,e,t,i,n);if(e$2b(a$O.CREDENTIAL)&&(e$2b(a$O.CREDENTIAL._keymap[this._baseUrl])?r.url=a$O.addTokenWithKey(this._baseUrl,r.url):r.url=a$O.addToken(r.url)),e$2b(this._customRequestHeaders)&&(r.headers=p$19(r.headers,this._customRequestHeaders)),n.quadKey=K$a(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(e$2b(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2b(o)?o$1l(o,(function(e){return e$2b(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$h.loadImage(this,r)}return e$h.loadImage(this,r)}return e$h.loadImage(this,r)},_$g.prototype.pickFeatures=function(e,t,i,n,r){if(!this.ready)throw new t$16("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures&&e$2b(this._pickFeaturesResource)&&0!==this._getFeatureInfoFormats.length){var o=0,a=this;return function l(){if(o>=a._getFeatureInfoFormats.length)return o$1l([]);var u=a._getFeatureInfoFormats[o],c=G$g(a,e,t,i,n,r,u.format);return++o,"json"===u.type?c.fetchJson().then(u.callback).otherwise(l):"xml"===u.type?c.fetchXML().then(u.callback).otherwise(l):"text"===u.type||"html"===u.type?c.fetchText().then(u.callback).otherwise(l):c.fetch({responseType:u.format}).then(s.bind(void 0,u)).otherwise(l)}()}function s(e,t){return e.callback(t)}};var P$j=!1,f$k=new h$18,F$e=!1,p$f=new h$18;function M$j(e,t,i,n,r){P$j=!1,F$e=!1;var o=e._resource,a=o.getUrlComponent(!0),s=e._tags,l={},u=a.match(W$h);return e$2b(u)&&u.forEach((function(r){var o=r.substring(1,r.length-1);e$2b(s[o])&&(l[o]=s[o](e,t,i,n))})),o.getDerivedResource({request:r,templateValues:l})}var E$h=!1,y$g=new o$1o,Z$f=!1;function G$g(e,t,i,n,r,o,a){P$j=!1,F$e=!1,E$h=!1,Z$f=!1;var s=e._pickFeaturesResource,l=s.getUrlComponent(!0),u=e._pickFeaturesTags,c={},h=l.match(W$h);return e$2b(h)&&h.forEach((function(s){var l=s.substring(1,s.length-1);e$2b(u[l])&&(c[l]=u[l](e,t,i,n,r,o,a))})),s.getDerivedResource({templateValues:c})}function b$m(e,t,i){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){var n=e.urlSchemeZeroPadding[t];if("string"==typeof n){var r=n.length;r>1&&(i=i.length>=r?i:new Array(r-i.toString().length+1).join("0")+i)}}return i}function Q$a(e,t,i,n){return b$m(e,"{x}",t)}function $$e(e,t,i,n){var r=e.tilingScheme.getNumberOfXTilesAtLevel(n)-t-1;return b$m(e,"{reverseX}",r)}function ee$8(e,t,i,n){return b$m(e,"{y}",i)}function te$6(e,t,i,n){var r=e.tilingScheme.getNumberOfYTilesAtLevel(n)-i-1;return b$m(e,"{reverseY}",r)}function re$8(e,t,i,n){var r=e.maximumLevel;return b$m(e,"{reverseZ}",e$2b(r)&&n<r?r-n-1:n)}function ie$5(e,t,i,n){return b$m(e,"{z}",n)}function ne$a(e,t,i,n){var r=(t+i+n)%e._subdomains.length;return e._subdomains[r]}function j$e(e,t,i,n){P$j||(e.tilingScheme.tileXYToRectangle(t,i,n,f$k),f$k.west=e$2a.toDegrees(f$k.west),f$k.south=e$2a.toDegrees(f$k.south),f$k.east=e$2a.toDegrees(f$k.east),f$k.north=e$2a.toDegrees(f$k.north),P$j=!0)}function ae$7(e,t,i,n){return j$e(e,t,i,n),f$k.west}function oe$7(e,t,i,n){return j$e(e,t,i,n),f$k.south}function ue$8(e,t,i,n){return j$e(e,t,i,n),f$k.east}function se$5(e,t,i,n){return j$e(e,t,i,n),f$k.north}function k$b(e,t,i,n){F$e||(e.tilingScheme.tileXYToNativeRectangle(t,i,n,p$f),F$e=!0)}function ce$a(e,t,i,n){return k$b(e,t,i,n),p$f.west}function le$b(e,t,i,n){return k$b(e,t,i,n),p$f.south}function he$7(e,t,i,n){return k$b(e,t,i,n),p$f.east}function de$6(e,t,i,n){return k$b(e,t,i,n),p$f.north}function fe$5(e,t,i,n){return e.tileWidth}function me$9(e,t,i,n){return e.tileHeight}function ge$8(e,t,i,n,r,o,a){return I$h(e,t,i,n,r,o),y$g.x}function ve$5(e,t,i,n,r,o,a){return I$h(e,t,i,n,r,o),y$g.y}function _e$6(e,t,i,n,r,o,a){return I$h(e,t,i,n,r,o),e.tileWidth-y$g.x-1}function ye$5(e,t,i,n,r,o,a){return I$h(e,t,i,n,r,o),e.tileHeight-y$g.y-1}var be$6=new h$18,w$h=new o$1p;function I$h(e,t,i,n,r,o,a){if(!E$h){A$i(e,t,i,n,r,o);var s=w$h,l=e.tilingScheme.tileXYToNativeRectangle(t,i,n,be$6);y$g.x=e.tileWidth*(s.x-l.west)/l.width|0,y$g.y=e.tileHeight*(l.north-s.y)/l.height|0,E$h=!0}}function we$4(e,t,i,n,r,o,a){return e$2a.toDegrees(r)}function pe$8(e,t,i,n,r,o,a){return e$2a.toDegrees(o)}function Te$5(e,t,i,n,r,o,a){return A$i(e,t,i,n,r,o),w$h.x}function Se$5(e,t,i,n,r,o,a){return A$i(e,t,i,n,r,o),w$h.y}var xe$4=new a$18;function A$i(e,t,i,n,r,o,a){if(!Z$f){if(e.tilingScheme instanceof c$R){var s=xe$4;s.longitude=r,s.latitude=o,e.tilingScheme.projection.project(s,w$h)}else w$h.x=e$2a.toDegrees(r),w$h.y=e$2a.toDegrees(o);Z$f=!0}}function De$7(e,t,i,n,r,o,a){return a}var y$f=new r$T("MapQuest, Open Street Map and contributors, CC-BY-SA");function L$j(e){e=u$_(e,{});var t=u$_(e.url,"https://a.tile.openstreetmap.org/");t=n$18(t),t+="{z}/{x}/{y}."+u$_(e.fileExtension,"png");var i=t$11.createIfNeeded(t),n=new c$R({ellipsoid:e.ellipsoid}),r=u$_(e.minimumLevel,0),o=e.maximumLevel,a=u$_(e.rectangle,n.rectangle),s=n.positionToTileXY(h$18.southwest(a),r),l=n.positionToTileXY(h$18.northeast(a),r),u=(Math.abs(l.x-s.x)+1)*(Math.abs(l.y-s.y)+1);if(u>4)throw new t$16("The rectangle and minimumLevel indicate that there are "+u+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");var c=u$_(e.credit,y$f);return"string"==typeof c&&(c=new r$T(c)),new _$g({url:i,credit:c,tilingScheme:n,tileWidth:256,tileHeight:256,minimumLevel:r,maximumLevel:o,rectangle:a})}function y$e(e){var t=[],i=(e=u$_(e,u$_.EMPTY_OBJECT)).geometry;if(!e$2b(i))throw new t$16("options.geometry is required.");(!e$2b(i.attributes)||!e$2b(i.primitiveType))&&(i=i.constructor.createGeometry(i));var n=i.attributes,r=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),o=u$_(e.length,1e4);if(e$2b(n.normal)&&t.push(new d$1o({geometry:k$13.createLineSegmentsForVectors(i,"normal",o),attributes:{color:new o$16(1,0,0,1)},modelMatrix:r})),e$2b(n.tangent)&&t.push(new d$1o({geometry:k$13.createLineSegmentsForVectors(i,"tangent",o),attributes:{color:new o$16(0,1,0,1)},modelMatrix:r})),e$2b(n.bitangent)&&t.push(new d$1o({geometry:k$13.createLineSegmentsForVectors(i,"bitangent",o),attributes:{color:new o$16(0,0,1,1)},modelMatrix:r})),t.length>0)return new y$S({asynchronous:!1,geometryInstances:t,appearance:new t$R({flat:!0,translucent:!1})})}function te$5(e){if(!e$2b((e=u$_(e,{})).url))throw new t$16("options.url is required.");var t,i,n,r=o$1l.defer(),o=new _$g(r.promise);function a(a){for(var s,u,c,h=/tileformat/i,d=/tileset/i,f=/tilesets/i,p=/boundingbox/i,_=[],m=a.childNodes[0].childNodes,g=0;g<m.length;g++)if(h.test(m.item(g).nodeName))s=m.item(g);else if(f.test(m.item(g).nodeName)){c=m.item(g);for(var x=m.item(g).childNodes,v=0;v<x.length;v++)d.test(x.item(v).nodeName)&&_.push(x.item(v))}else p.test(m.item(g).nodeName)&&(u=m.item(g));var y;if(!e$2b(c)||!e$2b(u))return y="Unable to find expected tilesets or bbox attributes in "+n.url+".",void((t=l$W.handleError(t,o,o.errorEvent,y,void 0,void 0,void 0,l)).retry||r.reject(new t$14(y)));var $=u$_(e.fileExtension,s.getAttribute("extension")),b=u$_(e.tileWidth,parseInt(s.getAttribute("width"),10)),T=u$_(e.tileHeight,parseInt(s.getAttribute("height"),10)),C=u$_(e.minimumLevel,parseInt(_[0].getAttribute("order"),10)),S=u$_(e.maximumLevel,parseInt(_[_.length-1].getAttribute("order"),10)),w=c.getAttribute("profile"),E=e.tilingScheme;if(!e$2b(E))if("geodetic"===w||"global-geodetic"===w)E=new g$13({ellipsoid:e.ellipsoid});else{if("mercator"!==w&&"global-mercator"!==w)return y=n.url+"specifies an unsupported profile attribute, "+w+".",void((t=l$W.handleError(t,o,o.errorEvent,y,void 0,void 0,void 0,l)).retry||r.reject(new t$14(y)));E=new c$R({ellipsoid:e.ellipsoid})}var P=h$18.clone(e.rectangle);if(!e$2b(P)){var A,L,M,R;u$_(e.flipXY,!1)?(M=new o$1o(parseFloat(u.getAttribute("miny")),parseFloat(u.getAttribute("minx"))),R=new o$1o(parseFloat(u.getAttribute("maxy")),parseFloat(u.getAttribute("maxx")))):(M=new o$1o(parseFloat(u.getAttribute("minx")),parseFloat(u.getAttribute("miny"))),R=new o$1o(parseFloat(u.getAttribute("maxx")),parseFloat(u.getAttribute("maxy"))));var I="geodetic"===w||"mercator"===w;if(E.projection instanceof n$1b||I)A=a$18.fromDegrees(M.x,M.y),L=a$18.fromDegrees(R.x,R.y);else{var O=E.projection;A=O.unproject(M),L=O.unproject(R)}P=new h$18(A.longitude,A.latitude,L.longitude,L.latitude)}P.west<E.rectangle.west&&(P.west=E.rectangle.west),P.east>E.rectangle.east&&(P.east=E.rectangle.east),P.south<E.rectangle.south&&(P.south=E.rectangle.south),P.north>E.rectangle.north&&(P.north=E.rectangle.north);var D=E.positionToTileXY(h$18.southwest(P),C),B=E.positionToTileXY(h$18.northeast(P),C);(Math.abs(B.x-D.x)+1)*(Math.abs(B.y-D.y)+1)>4&&(C=0);var N=i.getDerivedResource({url:"{z}/{x}/{reverseY}."+$});r.resolve({url:N,tilingScheme:E,rectangle:P,tileWidth:b,tileHeight:T,minimumLevel:C,maximumLevel:S,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit})}function s(t){var n=u$_(e.fileExtension,"png"),o=u$_(e.tileWidth,256),a=u$_(e.tileHeight,256),s=u$_(e.minimumLevel,0),l=e.maximumLevel,u=e$2b(e.tilingScheme)?e.tilingScheme:new c$R({ellipsoid:e.ellipsoid}),c=u$_(e.rectangle,u.rectangle),h=i.getDerivedResource({url:"{z}/{x}/{reverseY}."+n});r.resolve({url:h,tilingScheme:u,rectangle:c,tileWidth:o,tileHeight:a,minimumLevel:s,maximumLevel:l,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit})}function l(){n.fetchXML().then(a).otherwise(s)}return o$1l(e.url).then((function(e){(i=t$11.createIfNeeded(e)).appendForwardSlash(),n=i.getDerivedResource({url:"tilemapresource.xml"}),l()})).otherwise((function(e){r.reject(e)})),o}function g$m(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url))throw new t$16("options.url is required.");var t=o$1l.defer();_$g.call(this,t.promise),this._tmsResource=void 0,this._xmlResource=void 0,this._options=e,this._deferred=t,this._metadataError=void 0,this._metadataSuccess=this._metadataSuccess.bind(this),this._metadataFailure=this._metadataFailure.bind(this),this._requestMetadata=this._requestMetadata.bind(this);var i,n=this;o$1l(e.url).then((function(e){(i=t$11.createIfNeeded(e)).appendForwardSlash(),n._tmsResource=i,n._xmlResource=i.getDerivedResource({url:"tilemapresource.xml"}),n._requestMetadata()})).otherwise((function(e){t.reject(e)}))}function n$f(e){if(!e$2b((e=u$_(e,{})).url))throw new t$16("options.url is required.");if(!e$2b(e.channel))throw new t$16("options.channel is required.");var t=e.url,i=u$_(e.path,"/default_map"),n=t$11.createIfNeeded(t).getDerivedResource({url:"/"===i[0]?i.substring(1):i});n.appendForwardSlash(),this._resource=n,this._url=t,this._path=i,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new r$T('<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="'+n$f.logoUrl+'" title="Google Imagery"/></a>'),this.defaultGamma=1.9,this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var r,o=n.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),a=this;function s(t){var i,n;try{i=JSON.parse(t)}catch{i=JSON.parse(t.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}for(var o,s=0;s<i.layers.length;s++)if(i.layers[s].id===a._channel){o=i.layers[s];break}if(!e$2b(o))throw n="Could not find layer with channel (id) of "+a._channel+".",r=l$W.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$14(n);if(!e$2b(o.version))throw n="Could not find a version in channel (id) "+a._channel+".",r=l$W.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$14(n);if(a._version=o.version,e$2b(i.projection)&&"flat"===i.projection)a._tilingScheme=new g$13({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new h$18(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:e.ellipsoid});else{if(e$2b(i.projection)&&"mercator"!==i.projection)throw n="Unsupported projection "+i.projection+".",r=l$W.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$14(n);a._tilingScheme=new c$R({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid})}a._ready=!0,a._readyPromise.resolve(!0),l$W.handleSuccess(r)}function l(e){var t="An error occurred while accessing "+o.url+".";r=l$W.handleError(r,a,a._errorEvent,t,void 0,void 0,void 0,u),a._readyPromise.reject(new t$14(t))}function u(){o$1l(o.fetchText(),s,l)}u()}e$2b(Object.create)&&(g$m.prototype=Object.create(_$g.prototype),g$m.prototype.constructor=g$m),g$m.prototype._requestMetadata=function(){this._xmlResource.fetchXML().then(this._metadataSuccess).otherwise(this._metadataFailure)},g$m.prototype._metadataSuccess=function(e){for(var t,i,n,r=/tileformat/i,o=/tileset/i,a=/tilesets/i,s=/boundingbox/i,l=[],u=this._xmlResource,c=this._metadataError,h=this._deferred,d=this._requestMetadata,f=e.childNodes[0].childNodes,p=0;p<f.length;p++)if(r.test(f.item(p).nodeName))t=f.item(p);else if(a.test(f.item(p).nodeName)){n=f.item(p);for(var _=f.item(p).childNodes,m=0;m<_.length;m++)o.test(_.item(m).nodeName)&&l.push(_.item(m))}else s.test(f.item(p).nodeName)&&(i=f.item(p));var g;if(!e$2b(n)||!e$2b(i))return g="Unable to find expected tilesets or bbox attributes in "+u.url+".",(c=l$W.handleError(c,this,this.errorEvent,g,void 0,void 0,void 0,d)).retry||h.reject(new t$14(g)),void(this._metadataError=c);var x=this._options,v=u$_(x.fileExtension,t.getAttribute("extension")),y=u$_(x.tileWidth,parseInt(t.getAttribute("width"),10)),$=u$_(x.tileHeight,parseInt(t.getAttribute("height"),10)),b=u$_(x.minimumLevel,parseInt(l[0].getAttribute("order"),10)),T=u$_(x.maximumLevel,parseInt(l[l.length-1].getAttribute("order"),10)),C=n.getAttribute("profile"),S=x.tilingScheme;if(!e$2b(S))if("geodetic"===C||"global-geodetic"===C)S=new g$13({ellipsoid:x.ellipsoid});else{if("mercator"!==C&&"global-mercator"!==C)return g=u.url+"specifies an unsupported profile attribute, "+C+".",(c=l$W.handleError(c,this,this.errorEvent,g,void 0,void 0,void 0,d)).retry||h.reject(new t$14(g)),void(this._metadataError=c);S=new c$R({ellipsoid:x.ellipsoid})}var w=h$18.clone(x.rectangle);if(!e$2b(w)){var E,P,A,L;u$_(x.flipXY,!1)?(A=new o$1o(parseFloat(i.getAttribute("miny")),parseFloat(i.getAttribute("minx"))),L=new o$1o(parseFloat(i.getAttribute("maxy")),parseFloat(i.getAttribute("maxx")))):(A=new o$1o(parseFloat(i.getAttribute("minx")),parseFloat(i.getAttribute("miny"))),L=new o$1o(parseFloat(i.getAttribute("maxx")),parseFloat(i.getAttribute("maxy"))));var M="geodetic"===C||"mercator"===C;if(S.projection instanceof n$1b||M)E=a$18.fromDegrees(A.x,A.y),P=a$18.fromDegrees(L.x,L.y);else{var R=S.projection;E=R.unproject(A),P=R.unproject(L)}w=new h$18(E.longitude,E.latitude,P.longitude,P.latitude)}w.west<S.rectangle.west&&(w.west=S.rectangle.west),w.east>S.rectangle.east&&(w.east=S.rectangle.east),w.south<S.rectangle.south&&(w.south=S.rectangle.south),w.north>S.rectangle.north&&(w.north=S.rectangle.north);var I=S.positionToTileXY(h$18.southwest(w),b),O=S.positionToTileXY(h$18.northeast(w),b);(Math.abs(O.x-I.x)+1)*(Math.abs(O.y-I.y)+1)>4&&(b=0);var D=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+v});h.resolve({url:D,tilingScheme:S,rectangle:w,tileWidth:y,tileHeight:$,minimumLevel:b,maximumLevel:T,tileDiscardPolicy:x.tileDiscardPolicy,credit:x.credit})},g$m.prototype._metadataFailure=function(e){var t=this._options,i=u$_(t.fileExtension,"png"),n=u$_(t.tileWidth,256),r=u$_(t.tileHeight,256),o=u$_(t.minimumLevel,0),a=t.maximumLevel,s=e$2b(t.tilingScheme)?t.tilingScheme:new c$R({ellipsoid:t.ellipsoid}),l=u$_(t.rectangle,s.rectangle),u=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+i});this._deferred.resolve({url:u,tilingScheme:s,rectangle:l,tileWidth:n,tileHeight:r,minimumLevel:o,maximumLevel:a,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit})},Object.defineProperties(n$f.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},version:{get:function(){if(!this._ready)throw new t$16("version must not be called before the imagery provider is ready.");return this._version}},requestType:{get:function(){if(!this._ready)throw new t$16("requestType must not be called before the imagery provider is ready.");return this._requestType}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),n$f.prototype.getTileCredits=function(e,t,i){},n$f.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=this._resource.getDerivedResource({url:"query",request:n,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:i+1}});return e$h.loadImage(this,r)},n$f.prototype.pickFeatures=function(e,t,i,n,r){},n$f._logoUrl=void 0,Object.defineProperties(n$f,{logoUrl:{get:function(){return e$2b(n$f._logoUrl)||(n$f._logoUrl=n$15("Assets/Images/google_earth_credit.png")),n$f._logoUrl},set:function(e){o$1q.defined("value",e),n$f._logoUrl=e}}});var p$e=/\/$/,g$l=new r$T('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function m$g(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).mapId;if(!e$2b(t))throw new t$16("options.mapId is required.");var i=t$11.createIfNeeded(u$_(e.url,"https://{s}.tiles.mapbox.com/v4/")),n=e$T.getAccessToken(e.accessToken);this._mapId=t,this._accessToken=n,this._accessTokenErrorCredit=r$T.clone(e$T.getErrorCredit(e.accessToken));var r=u$_(e.format,"png");/\./.test(r)||(r="."+r),this._format=r;var o,a=i.getUrlComponent();p$e.test(a)||(a+="/"),a+=t+"/{z}/{x}/{y}"+this._format,i.url=a,i.setQueryParameters({access_token:n}),e$2b(e.credit)?"string"==typeof(o=e.credit)&&(o=new r$T(o)):o=g$l,this._resource=i,this._imageryProvider=new _$g({url:i,credit:o,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function u$f(e){if(!e$2b((e=u$_(e,{})).url))throw new t$16("options.url is required.");var t=t$11.createIfNeeded(e.url),i=new g$13({rectangle:u$_(e.rectangle,h$18.MAX_VALUE),numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=i,this._resource=t,this._image=void 0,this._texture=void 0,this._tileWidth=0,this._tileHeight=0,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var n=e.credit;"string"==typeof n&&(n=new r$T(n)),this._credit=n;var r,o=this;function a(e){o._image=e,o._tileWidth=e.width,o._tileHeight=e.height,o._ready=!0,o._readyPromise.resolve(!0),l$W.handleSuccess(o._errorEvent)}function s(e){var i="Failed to load image "+t.url+".";r=l$W.handleError(r,o,o._errorEvent,i,0,0,0,l,e),o._readyPromise.reject(new t$14(i))}function l(){o$1l(t.fetchImage(),a,s)}l()}function R$h(e,t,i){if(!e$2b(e))throw new t$16("type is required.");if(this.type=e,!e$2b(t))if("json"===e)t="application/json";else if("xml"===e)t="text/xml";else if("html"===e)t="text/html";else{if("text"!==e)throw new t$16('format is required when type is not "json", "xml", "html", or "text".');t="text/plain"}if(this.format=t,!e$2b(i))if("json"===e)i=L$i;else if("xml"===e)i=M$i;else if("html"===e)i=S$d;else{if("text"!==e)throw new t$16('callback is required when type is not "json", "xml", "html", or "text".');i=S$d}this.callback=i}function L$i(e){for(var t=[],i=e.features,n=0;n<i.length;++n){var r=i[n],o=new o$q;if(o.data=r,o.properties=r.properties,o.configureNameFromProperties(r.properties),o.configureDescriptionFromProperties(r.properties),e$2b(r.geometry)&&"Point"===r.geometry.type){var a=r.geometry.coordinates[0],s=r.geometry.coordinates[1];o.position=a$18.fromDegrees(a,s)}t.push(o)}return t}Object.defineProperties(m$g.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),m$g.prototype.getTileCredits=function(e,t,i){if(e$2b(this._accessTokenErrorCredit))return[this._accessTokenErrorCredit]},m$g.prototype.requestImage=function(e,t,i,n){return this._imageryProvider.requestImage(e,t,i,n)},m$g.prototype.pickFeatures=function(e,t,i,n,r){return this._imageryProvider.pickFeatures(e,t,i,n,r)},m$g._defaultCredit=g$l,Object.defineProperties(u$f.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return 0}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.")}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),u$f.prototype.getTileCredits=function(e,t,i){},u$f.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");return this._image},u$f.prototype.pickFeatures=function(e,t,i,n,r){};var d$l="http://www.mapinfo.com/mxp",D$f="http://www.esri.com/wms",P$i="http://www.opengis.net/wfs",C$h="http://www.opengis.net/gml";function M$i(e){var t=e.documentElement;if("MultiFeatureCollection"===t.localName&&t.namespaceURI===d$l)return B$c(e);if("FeatureInfoResponse"===t.localName&&t.namespaceURI===D$f)return x$h(e);if("FeatureCollection"===t.localName&&t.namespaceURI===P$i)return j$d(e);if("ServiceExceptionReport"===t.localName)throw new t$14((new XMLSerializer).serializeToString(t));return"msGMLOutput"===t.localName?O$f(e):X$a(e)}function B$c(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(d$l,"Feature"),n=0;n<i.length;++n){for(var r=i[n],o={},a=r.getElementsByTagNameNS(d$l,"Val"),s=0;s<a.length;++s){var l=a[s];if(l.hasAttribute("ref")){var u=l.getAttribute("ref"),c=l.textContent.trim();o[u]=c}}var h=new o$q;h.data=r,h.properties=o,h.configureNameFromProperties(o),h.configureDescriptionFromProperties(o),t.push(h)}return t}function x$h(e){var t,i=e.documentElement,n=[],r=i.getElementsByTagNameNS("*","FIELDS");if(r.length>0)for(var o=0;o<r.length;++o){var a=r[o];t={};for(var s=a.attributes,l=0;l<s.length;++l){var u=s[l];t[u.name]=u.value}n.push(p$d(a,t))}else for(var c=i.getElementsByTagNameNS("*","FeatureInfo"),h=0;h<c.length;++h){var d=c[h];t={};for(var f=d.childNodes,p=0;p<f.length;++p){var _=f[p];_.nodeType===Node.ELEMENT_NODE&&(t[_.localName]=_.textContent)}n.push(p$d(d,t))}return n}function j$d(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(C$h,"featureMember"),n=0;n<i.length;++n){var r=i[n],o={};E$g(r,o),t.push(p$d(r,o))}return t}function O$f(e){for(var t,i=[],n=e.documentElement.childNodes,r=0;r<n.length;r++)if(n[r].nodeType===Node.ELEMENT_NODE){t=n[r];break}if(!e$2b(t))throw new t$14("Unable to find first child of the feature info xml document");for(var o=t.childNodes,a=0;a<o.length;++a){var s=o[a];if(s.nodeType===Node.ELEMENT_NODE){var l={};E$g(s,l),i.push(p$d(s,l))}}return i}function E$g(e,t){for(var i=!0,n=0;n<e.childNodes.length;++n){var r=e.childNodes[n];r.nodeType===Node.ELEMENT_NODE&&(i=!1),"Point"!==r.localName&&"LineString"!==r.localName&&"Polygon"!==r.localName&&"boundedBy"!==r.localName&&r.hasChildNodes()&&E$g(r,t)&&(t[r.localName]=r.textContent)}return i}function p$d(e,t){var i=new o$q;return i.data=e,i.properties=t,i.configureNameFromProperties(t),i.configureDescriptionFromProperties(t),i}function X$a(e){var t=(new XMLSerializer).serializeToString(e),i=document.createElement("div"),n=document.createElement("pre");n.textContent=t,i.appendChild(n);var r=new o$q;return r.data=e,r.description=i.innerHTML,[r]}var z$f=/<body>\s*<\/body>/im,G$f=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,U$f=/<title>([\s\S]*)<\/title>/im;function S$d(e){if(!z$f.test(e)&&!G$f.test(e)){var t,i=U$f.exec(e);i&&i.length>1&&(t=i[1]);var n=new o$q;return n.name=t,n.description=e,n.data=e,[n]}}const j$c=[3034,3035,3042,3043,3044],w$g=[4471,4559];function m$f(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url))throw new t$16("options.url is required.");if(!e$2b(e.layers))throw new t$16("options.layers is required.");if(e$2b(e.times)&&!e$2b(e.clock))throw new t$16("options.times was specified, so options.clock is required.");this._baseUrl=e.url;var t=t$11.createIfNeeded(e.url),i=t.clone();t.setQueryParameters(m$f.DefaultParameters,!0),i.setQueryParameters(m$f.GetFeatureInfoDefaultParameters,!0),e$2b(e.parameters)&&t.setQueryParameters(v$e(e.parameters)),e$2b(e.getFeatureInfoParameters)&&i.setQueryParameters(v$e(e.getFeatureInfoParameters));var n=this;n._indexedDBSetting={isOpen:!1,clear:function(){n._indexedDBScheduler.clear(n.tablename)},cache:[]},this._reload=void 0,e$2b(e.times)&&(this._timeDynamicImagery=new f$P({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,r,o){return g$k(n,e,t,i,r,o)},reloadFunction:function(){e$2b(n._reload)&&n._reload()}}));var r={};if(r.layers=e.layers,r.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",r.width="{width}",r.height="{height}",parseFloat(t.queryParameters.version)>=1.3){r.crs=u$_(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof t$O?"EPSG:3857":"CRS:84");const t=r.crs.split(":");if("EPSG"===t[0]&&2===t.length){const e=Number(t[1]);(e>=4e3&&e<5e3&&!w$g.includes(e)||j$c.includes(e))&&(r.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else r.srs=u$_(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof t$O?"EPSG:3857":"EPSG:4326");e.tilingScheme instanceof c$R&&e.tilingScheme.projection instanceof n$1b&&(r.srs="EPSG:0"),t.setQueryParameters(r,!0),i.setQueryParameters(r,!0);var o={query_layers:e.layers,x:"{i}",y:"{j}",info_format:"{format}"};i.setQueryParameters(o,!0),this._resource=t,this._pickFeaturesResource=i,this._layers=e.layers,this._tileProvider=new _$g({url:t,pickFeaturesUrl:i,tilingScheme:u$_(e.tilingScheme,new g$13({ellipsoid:e.ellipsoid})),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:u$_(e.getFeatureInfoFormats,m$f.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures,baseUrl:this._baseUrl}),this._tileProvider._indexedDBSetting=this._indexedDBSetting,this._customRequestHeaders=e.customRequestHeaders,this._tileProvider._customRequestHeaders=e.customRequestHeaders,this._tilingScheme=this._tileProvider._tilingScheme,this._readyPromise=this._tileProvider._readyPromise}function g$k(e,t,i,n,r,o){var a=e$2b(o)?o.data:void 0,s=e._tileProvider;return e$2b(a)&&s._resource.setQueryParameters(a),s.requestImage(t,i,n,r)}function x$g(e,t,i,n,r,o,a){var s=e$2b(a)?a.data:void 0,l=e._tileProvider;return e$2b(s)&&l._pickFeaturesResource.setQueryParameters(s),l.pickFeatures(t,i,n,r,o)}function v$e(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i.toLowerCase()]=e[i]);return t}function a$c(e){return function(t){return new e(t)}}Object.defineProperties(m$f.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},ready:{get:function(){return this._tileProvider.ready}},readyPromise:{get:function(){return this._tileProvider.readyPromise}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}}}),m$f.prototype.getTileCredits=function(e,t,i){return this._tileProvider.getTileCredits(e,t,i)},m$f.prototype.requestImage=function(e,t,i,n){var r,o,a=this._timeDynamicImagery;return e$2b(a)&&(o=a.currentInterval,r=a.getFromCache(e,t,i,n)),e$2b(r)||(r=g$k(this,e,t,i,n,o)),e$2b(r)&&e$2b(a)&&a.checkApproachingInterval(e,t,i,n),r},m$f.prototype.pickFeatures=function(e,t,i,n,r){var o=this._timeDynamicImagery;return x$g(this,e,t,i,n,r,e$2b(o)?o.currentInterval:void 0)},m$f.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"}),m$f.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"}),m$f.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new R$h("json","application/json")),Object.freeze(new R$h("xml","text/xml")),Object.freeze(new R$h("text","text/html"))]);var A$h={ARCGIS_MAPSERVER:a$c(b$p),BING:a$c(o$p),GOOGLE_EARTH:a$c(n$f),MAPBOX:a$c(m$g),SINGLE_TILE:a$c(u$f),TMS:a$c(g$m),URL_TEMPLATE:a$c(_$g),WMS:a$c(m$f),WMTS:a$c(v$E)};function o$k(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).assetId;o$1q.typeOf.number("options.assetId",t),this.defaultAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._ready=!1,this._tileCredits=void 0,this._errorEvent=new o$1h;var i=this,n=n$y._createEndpointResource(t,e),r=e.assetId.toString()+e.accessToken+e.server,o=o$k._endpointCache[r];e$2b(o)||(o=n.fetchJson(),o$k._endpointCache[r]=o),this._readyPromise=o.then((function(e){if("IMAGERY"!==e.type)return o$1l.reject(new t$14("SuperMap3D ion asset "+t+" is not an imagery asset."));var r,o=e.externalType;if(e$2b(o)){var a=A$h[o];if(!e$2b(a))return o$1l.reject(new t$14("Unrecognized SuperMap3D ion imagery type: "+o));r=a(e.options)}else r=new g$m({url:new n$y(e,n)});return i._tileCredits=n$y.getCreditsFromEndpoint(e,n),r.errorEvent.addEventListener((function(e){e.provider=i,i._errorEvent.raiseEvent(e)})),i._imageryProvider=r,r.readyPromise.then((function(){return i._ready=!0,!0}))}))}Object.defineProperties(o$k.prototype,{ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._imageryProvider.rectangle}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._imageryProvider.tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this._ready)throw new t$16("credit must not be called before the imagery provider is ready.");return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){if(!this._ready)throw new t$16("hasAlphaChannel must not be called before the imagery provider is ready.");return this._imageryProvider.hasAlphaChannel}}}),o$k.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$16("getTileCredits must not be called before the imagery provider is ready.");var n=this._imageryProvider.getTileCredits(e,t,i);return e$2b(n)?this._tileCredits.concat(n):this._tileCredits},o$k.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");return this._imageryProvider.requestImage(e,t,i,n)},o$k.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$16("pickFeatures must not be called before the imagery provider is ready.");return this._imageryProvider.pickFeatures(e,t,i,n,r)},o$k._endpointCache={};var e$b={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4},n$e=Object.freeze(e$b);function o$j(e){return e=u$_(e,u$_.EMPTY_OBJECT),new o$k({assetId:u$_(e.style,n$e.AERIAL)})}var L$h=576,A$g=100,g$j="#ffffff",_$f="#48b";function I$g(e,t){for(var i=e.length,n=0;n<i;n++){var r=e[n];if(r$T.equals(r,t))return!0}return!1}function O$e(e){var t=e._previousCredit,i=e._currentCredit;r$T.equals(i,t)||(e$2b(t)&&e._CreditContainer.removeChild(t.element),e$2b(i)&&e._CreditContainer.appendChild(i.element),e._previousCredit=i)}var k$a="supermap3d-credit-delimiter",v$d;function E$f(e){var t=document.createElement("span");return t.textContent=e,t.className=k$a,t}function N$b(e,t){if(e$2b(t)){var i=document.createElement(t);i._creditId=e._creditId,i.appendChild(e),e=i}return e}function F$d(e,t,i,n){for(var r=e.childNodes,o=-1,a=0;a<t.length;++a){var s=t[a];if(e$2b(s)){if(o=a,e$2b(i)&&(o*=2,a>0)){var l=o-1;if(r.length<=l)e.appendChild(E$f(i));else{var u=r[l];u.className!==k$a&&e.replaceChild(E$f(i),u)}}var c=s.element;if(r.length<=o)e.appendChild(N$b(c,n));else{var h=r[o];h._creditId!==s._id&&e.replaceChild(N$b(c,n),h)}}}for(++o;o<r.length;)e.removeChild(r[o])}function q$f(e){var t=e._lightboxCredits,i=e.viewport.clientWidth,n=e.viewport.clientHeight;i!==e._lastViewportWidth&&(i<L$h?(t.className="supermap3d-credit-lightbox supermap3d-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="supermap3d-credit-lightbox supermap3d-credit-lightbox-expanded",t.style.marginTop=Math.floor(.5*(n-t.clientHeight))+"px"),e._lastViewportWidth=i),i>=L$h&&n!==e._lastViewportHeight&&(t.style.marginTop=Math.floor(.5*(n-t.clientHeight))+"px",e._lastViewportHeight=n)}function a$b(e,t){var i=e+" {";for(var n in t)t.hasOwnProperty(n)&&(i+=n+": "+t[n]+"; ");return i+=" }\n"}function S$c(){var e="";e+=a$b(".supermap3d-credit-lightbox-overlay",{display:"none","z-index":"1",position:"absolute",top:"0",left:"0",width:"100%",height:"100%","background-color":"rgba(80, 80, 80, 0.8)"}),e+=a$b(".supermap3d-credit-lightbox",{"background-color":"#303336",color:g$j,position:"relative","min-height":A$g+"px",margin:"auto"}),e+=a$b(".supermap3d-credit-lightbox > ul > li a, .supermap3d-credit-lightbox > ul > li a:visited",{color:g$j}),e+=a$b(".supermap3d-credit-lightbox > ul > li a:hover",{color:_$f}),e+=a$b(".supermap3d-credit-lightbox.supermap3d-credit-lightbox-expanded",{border:"1px solid #444","border-radius":"5px","max-width":"370px"}),e+=a$b(".supermap3d-credit-lightbox.supermap3d-credit-lightbox-mobile",{height:"100%",width:"100%"}),e+=a$b(".supermap3d-credit-lightbox-title",{padding:"20px 20px 0 20px"}),e+=a$b(".supermap3d-credit-lightbox-close",{"font-size":"18pt",cursor:"pointer",position:"absolute",top:"0",right:"6px",color:g$j}),e+=a$b(".supermap3d-credit-lightbox-close:hover",{color:_$f}),e+=a$b(".supermap3d-credit-lightbox > ul",{margin:"0",padding:"12px 20px 12px 40px","font-size":"13px"}),e+=a$b(".supermap3d-credit-lightbox > ul > li",{"padding-bottom":"6px"}),e+=a$b(".supermap3d-credit-lightbox > ul > li *",{padding:"0",margin:"0"}),e+=a$b(".supermap3d-credit-expand-link",{"padding-left":"5px",cursor:"pointer","text-decoration":"underline",color:g$j}),e+=a$b(".supermap3d-credit-expand-link:hover",{color:_$f}),e+=a$b(".supermap3d-credit-text",{color:g$j}),e+=a$b(".supermap3d-credit-textContainer *, .supermap3d-credit-logoContainer *",{display:"inline"});var t=document.head,i=document.createElement("style");i.innerHTML=e,t.insertBefore(i,t.firstChild)}function r$l(e,t,i){o$1q.defined("container",e);var n=this;i=u$_(i,document.body);var r=document.createElement("div");r.className="supermap3d-credit-lightbox-overlay",i.appendChild(r);var o=document.createElement("div");function a(e){o.contains(e.target)||n.hideLightbox()}o.className="supermap3d-credit-lightbox",r.appendChild(o),r.addEventListener("click",a,!1);var s=document.createElement("div");s.className="supermap3d-credit-lightbox-title",s.textContent="Data provided by:",o.appendChild(s);var l=document.createElement("a");l.onclick=this.hideLightbox.bind(this),l.innerHTML="×",l.className="supermap3d-credit-lightbox-close",o.appendChild(l);var u=document.createElement("ul");o.appendChild(u);var c=document.createElement("div");c.className="supermap3d-credit-logoContainer",c.style.display="inline",e.appendChild(c);var h=document.createElement("div");h.className="supermap3d-credit-textContainer",h.style.display="inline",e.appendChild(h);var d=document.createElement("a");d.className="supermap3d-credit-expand-link",d.onclick=this.showLightbox.bind(this),d.textContent="Data attribution",e.appendChild(d),S$c();var f=r$T.clone(r$l.credit);this._delimiter=u$_(t," • "),this._screenContainer=h,this._CreditContainer=c,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=o,this._creditList=u,this._lightbox=r,this._hideLightbox=a,this._expandLink=d,this._expanded=!1,this._defaultCredits=[],this._credit=f,this._previousCredit=void 0,this._currentcredit=f,this._currentFrameCredits={screenCredits:new e$1N,lightboxCredits:new e$1N},this._defaultCredit=void 0,this.viewport=i,this.container=e}function H$l(){if(!e$2b(v$d)){var e=n$15("Assets/Images/logo.png");v$d=new r$T('<a href="http://www.supermap.com" target="_blank"><img src="'+e+'" title="SuperMap"/></a>',!0)}return r$l._CreditInitialized||(r$l._credit=v$d,r$l._CreditInitialized=!0),v$d}function r$k(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._sceneDepthBuffer=void 0,this._cameraDepthBuffer=void 0,this._boundingSphere=new i$1c,this._qureyRegion=[],this._waterHeight=0,this._polygonTexture=null,this._damBreakPosition=[0,0,0],this._frameState=void 0,this._update=!0,this._name="",this._sceneName="",this._cameraName="",this._checking=!1}function h$h(e){e$2b(e._polygonTexture)&&(e._polygonTexture=e._polygonTexture&&e._polygonTexture.destroy(),e._polygonTexture=null)}function i$h(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).attributeName,i=e.perInstanceAttribute;if(!e$2b(t))throw new t$16("options.attributeName is required.");e$2b(i)||(i=!1);var n,r=u$_(e.glslDatatype,"vec3"),o="v_"+t;if("normal"===t||"tangent"===t||"bitangent"===t)n="vec4 getColor() { return vec4(("+o+" + vec3(1.0)) * 0.5, 1.0); }\n";else switch("st"===t&&(r="vec2"),r){case"float":n="vec4 getColor() { return vec4(vec3("+o+"), 1.0); }\n";break;case"vec2":n="vec4 getColor() { return vec4("+o+", 0.0, 1.0); }\n";break;case"vec3":n="vec4 getColor() { return vec4("+o+", 1.0); }\n";break;case"vec4":n="vec4 getColor() { return "+o+"; }\n";break;default:throw new t$16("options.glslDatatype must be float, vec2, vec3, or vec4.")}var a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n"+(i?"":"attribute "+r+" "+t+";\n")+"varying "+r+" "+o+";\nvoid main()\n{\nvec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);\n"+(i?o+" = czm_batchTable_"+t+"(batchId);\n":o+" = "+t+";\n")+"gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}",s="varying "+r+" "+o+";\n"+n+"\nvoid main()\n{\ngl_FragColor = getColor();\n}";this.material=void 0,this.translucent=u$_(e.translucent,!1),this._vertexShaderSource=u$_(e.vertexShaderSource,a),this._fragmentShaderSource=u$_(e.fragmentShaderSource,s),this._renderState=a$S.getDefaultRenderState(!1,!1,e.renderState),this._closed=u$_(e.closed,!1),this._attributeName=t,this._glslDatatype=r}function s$d(e){e=u$_(e,u$_.EMPTY_OBJECT),this.length=u$_(e.length,1e7),this._length=void 0,this.width=u$_(e.width,2),this._width=void 0,this.show=u$_(e.show,!0),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=new p$1d,this.id=e.id,this._id=void 0,this._primitive=void 0}r$l.prototype.addCredit=function(e){if(o$1q.defined("credit",e),e._isIon)return e$2b(this._defaultCredit)||(this._defaultCredit=r$T.clone(H$l())),void(this._currentCredit=this._defaultCredit);e.showOnScreen?this._currentFrameCredits.screenCredits.set(e.id,e):this._currentFrameCredits.lightboxCredits.set(e.id,e)},r$l.prototype.addDefaultCredit=function(e){o$1q.defined("credit",e);var t=this._defaultCredits;I$g(t,e)||t.push(e)},r$l.prototype.removeDefaultCredit=function(e){o$1q.defined("credit",e);var t=this._defaultCredits,i=t.indexOf(e);-1!==i&&t.splice(i,1)},r$l.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0},r$l.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1},r$l.prototype.update=function(){this._expanded&&q$f(this)},r$l.prototype.beginFrame=function(){var e=this._currentFrameCredits,t=e.screenCredits;t.removeAll();for(var i=this._defaultCredits,n=0;n<i.length;++n){var r=i[n];t.set(r.id,r)}e.lightboxCredits.removeAll(),r$T.equals(r$l.credit,this._credit)||(this._credit=r$T.clone(r$l.credit)),this._currentCredit=this._credit},r$l.prototype.endFrame=function(){var e=this._currentFrameCredits.screenCredits.values;F$d(this._screenContainer,e,this._delimiter,void 0);var t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",F$d(this._creditList,t,void 0,"li"),O$e(this)},r$l.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._CreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),i$10(this)},r$l.prototype.isDestroyed=function(){return!1},r$l._credit=void 0,r$l._CreditInitialized=!1,Object.defineProperties(r$l,{credit:{get:function(){return H$l(),r$l._credit},set:function(e){r$l._credit=e,r$l._CreditInitialized=!0}}}),Object.defineProperties(r$k.prototype,{damBreakPosition:{get:function(){return this._damBreakPosition},set:function(e){this._damBreakPosition=e,this._update=!0}},waterHeight:{get:function(){return this._waterHeight},set:function(e){this._waterHeight=e,this._update=!0}}}),r$k.prototype.destroy=function(){return h$h(this),i$10(this)},r$k.prototype.build=function(){""!==this._name||this._checking||(this._name="damBreakAnalysis"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},r$k.prototype.qureyRegion=function(e){if(!e$2b(e)||!e$2b(e.position))throw new t$16("the options is required");this._qureyRegion=e.position,this._update=!0},r$k.prototype.setTerrainBlock=function(e){},r$k.prototype.update=function(e,t,i){if("water"!==t._fboState.name&&!t.passes.pick){if(t._fboState.enabled&&(t._fboState.name===this._sceneName||t._fboState.name===this._cameraName))return void(t._fboState.name===this._sceneName&&e$2b(this._stencilCommand)&&i.push(this._stencilCommand));var n=t.camera;n.bReflect||(p$1d.multiply(this._viewProjMatrix,n.inverseViewMatrix,this._renderTextureMatrix),this._update&&(this._frameState=t,e$2b(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new s$T(e),this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),this._update=!1,h$h(this),updateCamera(this,e,t),updateViewShed(this,e,t)),e$2b(this._cameraDepthBuffer.framebuffer)&&i.push(correct))}},Object.defineProperties(i$h.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}}),i$h.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,i$h.prototype.isTranslucent=a$S.prototype.isTranslucent,i$h.prototype.getRenderState=a$S.prototype.getRenderState,s$d.prototype.update=function(e){if(this.show){if(!e$2b(this._primitive)||!p$1d.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=p$1d.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,e$2b(this._primitive)&&this._primitive.destroy(),0===this.modelMatrix[12]&&0===this.modelMatrix[13]&&0===this.modelMatrix[14]&&(this.modelMatrix[14]=.01);var t=new d$1o({geometry:new R$A({positions:[o$1p.ZERO,o$1p.UNIT_X],width:this.width,vertexFormat:e$1C.VERTEX_FORMAT,colors:[e$1U.RED,e$1U.RED],arcType:m$1f.NONE}),modelMatrix:p$1d.multiplyByUniformScale(this.modelMatrix,this.length,new p$1d),id:this.id,pickPrimitive:this}),i=new d$1o({geometry:new R$A({positions:[o$1p.ZERO,o$1p.UNIT_Y],width:this.width,vertexFormat:e$1C.VERTEX_FORMAT,colors:[e$1U.GREEN,e$1U.GREEN],arcType:m$1f.NONE}),modelMatrix:p$1d.multiplyByUniformScale(this.modelMatrix,this.length,new p$1d),id:this.id,pickPrimitive:this}),n=new d$1o({geometry:new R$A({positions:[o$1p.ZERO,o$1p.UNIT_Z],width:this.width,vertexFormat:e$1C.VERTEX_FORMAT,colors:[e$1U.BLUE,e$1U.BLUE],arcType:m$1f.NONE}),modelMatrix:p$1d.multiplyByUniformScale(this.modelMatrix,this.length,new p$1d),id:this.id,pickPrimitive:this});this._primitive=new y$S({geometryInstances:[t,i,n],appearance:new e$1C,asynchronous:!1})}this._primitive.update(e)}},s$d.prototype.isDestroyed=function(){return!1},s$d.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$10(this)};var N$a="varying vec4 positionEC;\n\nvoid main()\n{\n vec3 direction = normalize(positionEC.xyz);\n czm_ray ray = czm_ray(vec3(0.0), direction);\n\n vec3 ellipsoid_center = czm_view[3].xyz;\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\n if (!czm_isEmpty(intersection))\n {\n gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n }\n else\n {\n discard;\n }\n\n czm_writeLogDepth();\n}\n",V$d="attribute vec4 position;\n\nvarying vec4 positionEC;\n\nvoid main()\n{\n positionEC = czm_modelView * position;\n gl_Position = czm_projection * positionEC;\n\n czm_vertexLogDepth();\n}\n";function c$c(){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1}var f$j=s$Y.supportsTypedArrays()?new Float32Array(12):[],L$g=new o$1p,P$h=new o$1p,C$g=new o$1p,n$d=new o$1p;function Q$9(e,t){var i=e.radii,n=t.camera.positionWC,r=o$1p.multiplyComponents(e.oneOverRadii,n,L$g),o=o$1p.magnitude(r),a=o$1p.normalize(r,P$h),s=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,r,C$g),C$g),l=o$1p.normalize(o$1p.cross(a,s,n$d),n$d),u=Math.sqrt(o$1p.magnitudeSquared(r)-1),c=o$1p.multiplyByScalar(a,1/o,L$g),h=u/o,d=o$1p.multiplyByScalar(s,h,P$h),f=o$1p.multiplyByScalar(l,h,C$g),p=o$1p.add(c,f,n$d);o$1p.subtract(p,d,p),o$1p.multiplyComponents(i,p,p),o$1p.pack(p,f$j,0);var _=o$1p.subtract(c,f,n$d);o$1p.subtract(_,d,_),o$1p.multiplyComponents(i,_,_),o$1p.pack(_,f$j,3);var m=o$1p.add(c,f,n$d);o$1p.add(m,d,m),o$1p.multiplyComponents(i,m,m),o$1p.pack(m,f$j,6);var g=o$1p.subtract(c,f,n$d);return o$1p.add(g,d,g),o$1p.multiplyComponents(i,g,g),o$1p.pack(g,f$j,9),f$j}function l$i(){}c$c.prototype.update=function(e){if(this._mode=e.mode,e.mode===C$13.SCENE3D){var t=e.context,i=e.mapProjection.ellipsoid,n=e.useLogDepth;if(e$2b(this._command)||(this._rs=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new i$_({renderState:this._rs,boundingVolume:new i$1c(o$1p.ZERO,i.maximumRadius),pass:Le$s.OPAQUE,owner:this})),!e$2b(this._sp)||this._useLogDepth!==n){this._useLogDepth=n;var r=new s$U({name:"DepthPlaneVS",sources:[V$d]}),o=new s$U({name:"DepthPlaneFS",sources:[N$a]});if(n){o.sources.push("#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),o.defines.push("LOG_DEPTH"),r.defines.push("LOG_DEPTH")}this._sp=r$13.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}var a=Q$9(i,e);if(e$2b(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(a);else{var s=new I$1p({attributes:{position:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:a})},indices:[0,1,2,2,1,3],primitiveType:W$18.TRIANGLES});this._va=c$12.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:A$19.DYNAMIC_DRAW}),this._command.vertexArray=this._va}}},c$c.prototype.execute=function(e,t){this._mode===C$13.SCENE3D&&this._command.execute(e,t)},c$c.prototype.isDestroyed=function(){return!1},c$c.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var b$l=/\bgl_FragDepthEXT\b/,z$e=/\bdiscard\b/;function T$f(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(!e$2b(i)){var n=t._attributeLocations,r=t.fragmentShaderSource,o=!1;r.useWGSL&&(o=!0);var a=!1,s=r.sources,l=s.length;for(f=0;f<l;++f)if(b$l.test(s[f])||z$e.test(s[f])){a=!0;break}var u=!1,c=r.defines;for(l=c.length,f=0;f<l;++f)if("LOG_DEPTH"===c[f]){u=!0;break}if(e.depthTexture){var h=o?k$Y:"";a||u?!a&&u&&(r=new s$U({defines:["LOG_DEPTH"],sources:[o?"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n gl_FragColor = vec4<f32>(1.0f); \n czm_writeLogDepth(v_depthFromNearPlusOne); \n} \n":"#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\nvoid main() \n{ \n gl_FragColor = vec4(1.0); \n czm_writeLogDepth(); \n} \n"],preSources:[h],useWGSL:o})):r=new s$U({sources:[o?"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n gl_FragColor = vec4<f32>(1.0f); \n} \n":"void main() \n{ \n gl_FragColor = vec4(1.0); \n} \n"],preSources:[h],useWGSL:o})}else if(a||u)if(!a&&u)r=new s$U({defines:["LOG_DEPTH"],sources:["#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\nvoid main() \n{ \n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n czm_writeLogDepth(); \n} \n"]});else{l=s.length;for(var d=new Array(l+1),f=0;f<l;++f)d[f]=s$U.replaceMain(s[f],"pick_depth_old_main");var p="void main() \n{ \n pick_depth_old_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = "+(u?"czm_packDepth(gl_FragDepthEXT)":"czm_packDepth(gl_FragCoord.z)")+";\n} \n";d[l]=p;for(var _=[],m=0;m<c.length;m++){var g=r.defines[m];_.push(g)}r=new s$U({sources:d,defines:_})}else r=new s$U({sources:["void main() \n{ \n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n} \n"]});i=e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function E$e(e,t,i){var n=e._depthOnlyRenderStateCache,r=n[t.id];if(!e$2b(r)){var o=d$1m.getState(t);o.depthMask=!0,e._context.depthTexture&&(o.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),e$2b(i)&&(o.viewport=void 0),r=d$1m.fromCache(o),n[t.id]=r}return r}l$i.createDepthOnlyDerivedCommand=function(e,t,i,n){var r,o;return e$2b(n)||(n={}),e$2b(n.depthOnlyCommand)&&(r=n.depthOnlyCommand.shaderProgram,o=n.depthOnlyCommand.renderState),n.depthOnlyCommand=i$_.shallowClone(t,n.depthOnlyCommand),e$2b(r)&&n.shaderProgramId===t.shaderProgram.id?(n.depthOnlyCommand.shaderProgram=r,n.depthOnlyCommand.renderState=o):(n.depthOnlyCommand.shaderProgram=T$f(i,t.shaderProgram),n.depthOnlyCommand.renderState=E$e(e,t.renderState,n.depthOnlyCommand._pointCloudEyeDomeLighting),n.shaderProgramId=t.shaderProgram.id),n.depthOnlyCommand._pointCloudEyeDomeLighting&&(n.depthOnlyCommand.framebuffer=void 0),n};var I$f=/\s+czm_writeLogDepth\(|\s+writeLogDepth\(/,u$e=/\s+czm_vertexLogDepth\(|\s+vertexLogDepth\(/,R$g=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;function w$f(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!e$2b(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone(),a=!1;o.useWGSL&&(a=!0),r.defines=e$2b(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),o.defines=e$2b(o.defines)?o.defines.slice(0):[],o.defines.push("LOG_DEPTH");var s,l,u=!1,c=r.sources,h=c.length;for(s=0;s<h;++s)if(u$e.test(c[s])){u=!0;break}if(!u){for(s=0;s<h;++s)c[s]=s$U.replaceMain(c[s],"czm_log_depth_main",a);l=a?"#include <SceneUboDecl> \n@vertex \nfn main(input : VertexInputs) -> FragmentInputs \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n":"\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n",c.push(l)}var d=!0;for(u=!1,h=(c=o.sources).length,s=0;s<h;++s)I$f.test(c[s])&&(u=!0),R$g.test(c[s])&&(d=!1);var f="";if(d&&!e.webgpu&&(f+="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),!u){for(s=0;s<h;s++)c[s]=s$U.replaceMain(c[s],"czm_log_depth_main",a);f+=a?"@fragment \nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(v_depthFromNearPlusOne); \n} \n":"\nvoid main() \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(); \n} \n"}c.push(f),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n,transformFeedbackVaryings:t._transformFeedbackVaryings})}return i}function H$k(e,t,i){var n=e.shaderCache.getDerivedShaderProgram(t,"pick");if(!e$2b(n)){var r=t._attributeLocations,o=t.fragmentShaderSource,a=!1;o.useWGSL&&(a=!0);var s,l=o.sources,u=l.length,c="";if(a){c="@fragment \nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a < Layer.uTransparentFilter) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n",s=new Array(u+1);for(var h=0;h<u;++h)s[h]=s$U.replaceMain(l[h],"czm_non_pick_main",a);s[u]=c}else{c="vSecondColor"===i?"void main() \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a < uTransparentFilter) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n":"void main() \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n",s=new Array(u+1);for(h=0;h<u;++h)s[h]=s$U.replaceMain(l[h],"czm_non_pick_main");s[u]=c}o=new s$U({sources:s,preSources:o.preSources,defines:o.defines,useWGSL:a}),n=e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:r})}return n}function X$9(e,t){var i=e._pickRenderStateCache,n=i[t.id];if(!e$2b(n)){var r=d$1m.getState(t);r.blending.enabled=!1,r.depthMask=!0,n=d$1m.fromCache(r),i[t.id]=n}return n}function N$9(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(!e$2b(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();r.defines=e$2b(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),o.defines=e$2b(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),i=e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n,transformFeedbackVaryings:t._transformFeedbackVaryings})}return i}function M$h(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"NORMAL");if(!e$2b(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();o.defines=e$2b(o.defines)?o.defines.slice(0):[],o.defines.push("NORMAL"),i=e.shaderCache.createDerivedShaderProgram(t,"NORMAL",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i}function A$f(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"mask");if(!e$2b(i)){var n=t._attributeLocations,r=t.fragmentShaderSource,o=!1;r.useWGSL&&(o=!0);var a,s=r.sources,l=s.length;for(a=0;a<l&&(!b$l.test(s[a])&&!z$e.test(s[a]));++a);var u=r.defines;for(l=u.length,a=0;a<l&&"LOG_DEPTH"!==u[a];++a);var c=o?k$Y:"";r=new s$U({defines:["LOG_DEPTH"],sources:[o?["#include <SceneUboDecl>","varying vColor : vec4<f32>;","varying fSelected : f32;","@fragment","fn main(input : FragmentInputs) -> FragmentOutputs {"," if(vColor.a < 0.1 || fSelected < 0.1){discard;}","\tgl_FragColor = vec4<f32>(0.0, 0.0, 1.0, 1.0);"," czm_writeLogDepth(v_depthFromNearPlusOne);","}"].join("\n"):["#ifdef GL_EXT_frag_depth","#extension GL_EXT_frag_depth : enable","#endif","varying vec4 vColor;","varying vec2 fSelected;","void main() {"," if(vColor.a < 0.1 || fSelected.x < 0.1){discard;}","\tfloat depth = czm_unpackDepth(texture2D(czm_nonSelDepthTexture, gl_FragCoord.xy / czm_viewport.zw));"," depth = czm_reverseLogDepth(depth);"," vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);"," if(-positionEC.z > 10000.0){discard;}"," float near = czm_currentFrustum.x;"," float far = czm_currentFrustum.y;"," float viewZ = -( near * far ) / ( ( far - near ) * depth - far );"," float depthTest = (-positionEC.z > viewZ) && (depth > 0.00001) ? 1.0 : 0.0;","\tgl_FragColor = vec4(0.0, depthTest, 1.0, 1.0);"," czm_writeLogDepth();","}"].join("\n")],preSources:[c],useWGSL:o}),i=e.shaderCache.createDerivedShaderProgram(t,"mask",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function h$g(e){if(!e$2b(e))throw new t$16("scene is required.");this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;var t=this;function i(e){var i=e.alpha;if(!e$2b(i))return t._alpha=void 0,t._beta=void 0,void(t._gamma=void 0);t._alpha=e$2a.toRadians(i),t._beta=e$2a.toRadians(e.beta),t._gamma=e$2a.toRadians(e.gamma)}window.addEventListener("deviceorientation",i,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",i,!1)}}l$i.createLogDepthCommand=function(e,t,i){var n;return e$2b(i)||(i={}),e$2b(i.command)&&(n=i.command.shaderProgram),i.command=i$_.shallowClone(e,i.command),e$2b(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=w$f(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},l$i.createPickDerivedCommand=function(e,t,i,n){var r,o;return e$2b(n)||(n={}),e$2b(n.pickCommand)&&(r=n.pickCommand.shaderProgram,o=n.pickCommand.renderState),n.pickCommand=i$_.shallowClone(t,n.pickCommand),e$2b(r)&&n.shaderProgramId===t.shaderProgram.id?(n.pickCommand.shaderProgram=r,n.pickCommand.renderState=o):(n.pickCommand.shaderProgram=H$k(i,t.shaderProgram,t.pickId),n.pickCommand.renderState=X$9(e,t.renderState),n.shaderProgramId=t.shaderProgram.id),e.pickPointEnabled&&t.pass===Le$s.S3MTiles&&(n.pickCommand.primitiveType=W$18.POINTS),n},l$i.createHdrCommand=function(e,t,i){var n;return e$2b(i)||(i={}),e$2b(i.command)&&(n=i.command.shaderProgram),i.command=i$_.shallowClone(e,i.command),e$2b(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=N$9(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},l$i.createPrepassDerivedCommand=function(e,t,i,n){var r;return e$2b(n)||(n={}),e$2b(n.command)&&(r=n.command.shaderProgram),n.command=i$_.shallowClone(t,n.command),e$2b(r)&&n.shaderProgramId===t.shaderProgram.id?n.command.shaderProgram=r:(n.command.shaderProgram=e._renderPipeline._prepassRenderer.getPrepassShaderProgram(i,t.shaderProgram),n.shaderProgramId=t.shaderProgram.id),n},l$i.createNormalDerivedCommand=function(e,t,i){var n;return e$2b(i)||(i={}),e$2b(i.command)&&(n=i.command.shaderProgram),i.command=i$_.shallowClone(e,i.command),e$2b(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=M$h(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},l$i.createMaskCommand=function(e,t,i){var n;return e$2b(i)||(i={}),e$2b(i.command)&&(n=i.command.shaderProgram),i.command=i$_.shallowClone(e,i.command),e$2b(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=A$f(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i};var b$k=new n$13,f$i=new n$13,A$e=new p$1e;function w$e(e,t,i,n){var r=e.direction,o=e.right,a=e.up,s=n$13.fromAxisAngle(r,i,f$i),l=n$13.fromAxisAngle(o,n,b$k),u=n$13.multiply(l,s,l),c=n$13.fromAxisAngle(a,t,f$i);n$13.multiply(c,u,u);var h=p$1e.fromQuaternion(u,A$e);p$1e.multiplyByVector(h,o,o),p$1e.multiplyByVector(h,a,a),p$1e.multiplyByVector(h,r,r)}function r$j(e){this.blobSize=u$_(e,0)}h$g.prototype.update=function(){if(e$2b(this._alpha)){e$2b(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);var e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,i=this._lastGamma-this._gamma;w$e(this._scene.camera,-e,t,i),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma}},h$g.prototype.isDestroyed=function(){return!1},h$g.prototype.destroy=function(){return this._removeListener(),i$10(this)},r$j.prototype.isReady=function(){return!0},new e$29,r$j.prototype.shouldDiscardImage=function(e){return e.blob.size===this.blobSize};var I$e="#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#endif\n\nuniform vec3 u_radii;\nuniform vec3 u_oneOverEllipsoidRadiiSquared;\n\nvarying vec3 v_positionEC;\n\nvec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)\n{\n vec3 positionEC = czm_pointAlongRay(ray, intersection);\n vec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;\n vec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));\n vec3 sphericalNormal = normalize(positionMC / u_radii);\n vec3 normalMC = geodeticNormal * side; // normalized surface normal (always facing the viewer) in model coordinates\n vec3 normalEC = normalize(czm_normal * normalMC); // normalized surface normal in eye coordiantes\n\n vec2 st = czm_ellipsoidWgs84TextureCoordinates(sphericalNormal);\n vec3 positionToEyeEC = -positionEC;\n\n czm_materialInput materialInput;\n materialInput.s = st.s;\n materialInput.st = st;\n materialInput.str = (positionMC + u_radii) / u_radii;\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n\n// #ifdef ONLY_SUN_LIGHTING\n //return czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);\n// #else\n return czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n// #endif\n}\n\nvoid main()\n{\n // PERFORMANCE_TODO: When dynamic branching is available, compute ratio of maximum and minimum radii\n // in the vertex shader. Only when it is larger than some constant, march along the ray.\n // Otherwise perform one intersection test which will be the common case.\n\n // Test if the ray intersects a sphere with the ellipsoid's maximum radius.\n // For very oblate ellipsoids, using the ellipsoid's radii for an intersection test\n // may cause false negatives. This will discard fragments before marching the ray forward.\n float maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;\n vec3 direction = normalize(v_positionEC);\n vec3 ellipsoidCenter = czm_modelView[3].xyz;\n\n float t1 = -1.0;\n float t2 = -1.0;\n\n float b = -2.0 * dot(direction, ellipsoidCenter);\n float c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;\n\n float discriminant = b * b - 4.0 * c;\n if (discriminant >= 0.0) {\n t1 = (-b - sqrt(discriminant)) * 0.5;\n t2 = (-b + sqrt(discriminant)) * 0.5;\n }\n\n if (t1 < 0.0 && t2 < 0.0) {\n discard;\n }\n\n float t = min(t1, t2);\n if (t < 0.0) {\n t = 0.0;\n }\n\n // March ray forward to intersection with larger sphere and find\n czm_ray ray = czm_ray(t * direction, direction);\n\n vec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);\n\n if (czm_isEmpty(intersection))\n {\n discard;\n }\n\n // If the viewer is outside, compute outsideFaceColor, with normals facing outward.\n vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);\n\n // If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.\n vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);\n\n gl_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);\n gl_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);\n\n#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\n t = (intersection.start != 0.0) ? intersection.start : intersection.stop;\n vec3 positionEC = czm_pointAlongRay(ray, t);\n vec4 positionCC = czm_projection * vec4(positionEC, 1.0);\n#ifdef LOG_DEPTH\n czm_writeLogDepth(1.0 + positionCC.w);\n#else\n float z = positionCC.z / positionCC.w;\n\n float n = czm_depthRange.near;\n float f = czm_depthRange.far;\n\n gl_FragDepthEXT = (z * (f - n) + f + n) * 0.5;\n#endif\n#endif\n#endif\n}\n",O$d="attribute vec3 position;\n\nuniform vec3 u_radii;\n\nvarying vec3 v_positionEC;\n\nvoid main()\n{\n // In the vertex data, the cube goes from (-1.0, -1.0, -1.0) to (1.0, 1.0, 1.0) in model coordinates.\n // Scale to consider the radii. We could also do this once on the CPU when using the BoxGeometry,\n // but doing it here allows us to change the radii without rewriting the vertex data, and\n // allows all ellipsoids to reuse the same vertex data.\n vec4 p = vec4(u_radii * position, 1.0);\n\n v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates\n gl_Position = czm_modelViewProjection * p; // position in clip coordinates\n\n // With multi-frustum, when the ellipsoid primitive is positioned on the intersection of two frustums\n // and close to terrain, the terrain (writes depth) in the closest frustum can overwrite part of the\n // ellipsoid (does not write depth) that was rendered in the farther frustum.\n //\n // Here, we clamp the depth in the vertex shader to avoid being overwritten; however, this creates\n // artifacts since some fragments can be alpha blended twice. This is solved by only rendering\n // the ellipsoid in the closest frustum to the viewer.\n gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);\n\n czm_vertexLogDepth();\n}\n",S$b={position:0};function p$c(e){e=u$_(e,u$_.EMPTY_OBJECT),this.center=o$1p.clone(u$_(e.center,o$1p.ZERO)),this._center=new o$1p,this.radii=o$1p.clone(e.radii),this._radii=new o$1p,this._oneOverEllipsoidRadiiSquared=new o$1p,this._boundingSphere=new i$1c,this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=new p$1d,this._computedModelMatrix=new p$1d,this.show=u$_(e.show,!0),this.material=u$_(e.material,r$X.fromType(r$X.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.onlySunLighting=u$_(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=u$_(e.depthTestEnabled,!0),this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new i$_({owner:u$_(e._owner,this)}),this._pickCommand=new i$_({owner:u$_(e._owner,this),pickOnly:!0});var t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function q$e(e){var t=e.cache.ellipsoidPrimitive_vertexArray;if(e$2b(t))return t;var i=O$y.createGeometry(O$y.fromDimensions({dimensions:new o$1p(2,2,2),vertexFormat:n$11.POSITION_ONLY}));return t=c$12.fromGeometry({context:e,geometry:i,attributeLocations:S$b,bufferUsage:A$19.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}var C$f="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n";p$c.prototype.update=function(e){if(this.show&&e.mode===C$13.SCENE3D&&e$2b(this.center)&&e$2b(this.radii)){if(!e$2b(this.material))throw new t$16("this.material must be defined.");var t=e.context,i=this.material.isTranslucent(),n=this._translucent!==i;(!e$2b(this._rs)||n)&&(this._translucent=i,this._rs=d$1m.fromCache({cull:{enabled:!0,face:G$17.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!i&&t.fragmentDepth,blending:i?Ee$r.ALPHA_BLEND:void 0})),e$2b(this._va)||(this._va=q$e(t));var r=!1,o=this.radii;if(!o$1p.equals(this._radii,o)){o$1p.clone(o,this._radii);var a=this._oneOverEllipsoidRadiiSquared;a.x=1/(o.x*o.x),a.y=1/(o.y*o.y),a.z=1/(o.z*o.z),r=!0}(!p$1d.equals(this.modelMatrix,this._modelMatrix)||!o$1p.equals(this.center,this._center))&&(p$1d.clone(this.modelMatrix,this._modelMatrix),o$1p.clone(this.center,this._center),p$1d.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),r=!0),r&&(o$1p.clone(o$1p.ZERO,this._boundingSphere.center),this._boundingSphere.radius=o$1p.maximumComponent(o),i$1c.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));var s=this._material!==this.material;this._material=this.material,this._material.update(t);var l=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;var u=e.useLogDepth,c=this._useLogDepth!==u;this._useLogDepth=u;var h,d,f=this._colorCommand;(s||l||n||c)&&(h=new s$U({name:"EllipsoidVS",sources:[O$d]}),d=new s$U({name:"EllipsoidFS",sources:[this.material.shaderSource,I$e]}),this.onlySunLighting&&d.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&d.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),d.defines.push("LOG_DEPTH"),d.sources.push(C$f)),this._sp=r$13.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:S$b}),f.vertexArray=this._va,f.renderState=this._rs,f.shaderProgram=this._sp,f.uniformMap=p$19(this._uniforms,this.material._uniforms),f.executeInClosestFrustum=i);var p=e.commandList,_=e.passes;if(_.render&&(f.boundingVolume=this._boundingSphere,f.debugShowBoundingVolume=this.debugShowBoundingVolume,f.modelMatrix=this._computedModelMatrix,f.pass=i?Le$s.TRANSLUCENT:Le$s.OPAQUE,p.push(f)),_.pick){var m=this._pickCommand;(!e$2b(this._pickId)||this._id!==this.id)&&(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(s||l||!e$2b(this._pickSP)||c)&&(h=new s$U({sources:[O$d]}),d=new s$U({sources:[this.material.shaderSource,I$e],pickColorQualifier:"uniform"}),this.onlySunLighting&&d.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&d.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),d.defines.push("LOG_DEPTH"),d.sources.push(C$f)),this._pickSP=r$13.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:S$b}),m.vertexArray=this._va,m.renderState=this._rs,m.shaderProgram=this._pickSP,m.uniformMap=p$19(p$19(this._uniforms,this._pickUniforms),this.material._uniforms),m.executeInClosestFrustum=i),m.boundingVolume=this._boundingSphere,m.modelMatrix=this._computedModelMatrix,m.pass=i?Le$s.TRANSLUCENT:Le$s.OPAQUE,p.push(m)}}},p$c.prototype.isDestroyed=function(){return!1},p$c.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),i$10(this)};var te$4="layout(location=0) in vec3 pos;\nlayout(location=2) in vec2 lonLat;\nlayout(location=3) in vec2 life;\nlayout(location=4) in vec2 texCoord;\nuniform float pointSize;\nuniform float uFieldTextureSize;\nuniform float uMaxFilterValue;\nuniform float uMinFilterValue;\nuniform vec4 particleColor;\nuniform sampler2D velocityTexture;\nuniform sampler2D colorTable;\nuniform float uHasColorTable;\nuniform float uCeil;\nuniform float uFloor;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 lonlatRange;\nout vec4 velocityColor;\nout vec2 outTexCoord;\nfloat computerOnePixelLength(vec3 inPos)\n{\nvec4 viewPos = czm_view * vec4(inPos, 1.0);\nvec4 winPos = czm_projection * viewPos;\nfloat dwidth = czm_metersPerPixel(viewPos);\nwinPos.x = winPos.x - 2.0 * dwidth;\nvec4 newViewPos = czm_inverseProjection * winPos;\nreturn length(viewPos - newViewPos);\n}\nvec4 computePos(vec3 v3Normal, vec3 inPos)\n{\nvec4 viewPos = czm_view * vec4(inPos, 1.0);\n#ifdef SIZEFIXED\nviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength(inPos) * uFieldTextureSize;\n#else\nviewPos.xyz = viewPos.xyz + v3Normal * uFieldTextureSize;\n#endif\nviewPos.xyz = viewPos.xyz * 0.9;\nreturn czm_projection * viewPos;\n}\nvoid main()\n{\nvec3 relativeOriginPos = pos - czm_relativeOrigin;\nvec2 lonLatTexCoord;\n#ifdef TEXTUREEFFECT\nlonLatTexCoord.x = (lonLat.x + czm_pi) / czm_twoPi;\nlonLatTexCoord.y = (lonLat.y + czm_piOverTwo) / czm_pi;\n#else\nlonLatTexCoord.x = (lonLat.x - lonlatRange.x) / (lonlatRange.z - lonlatRange.x);\nlonLatTexCoord.y = (lonLat.y - lonlatRange.y) / (lonlatRange.w - lonlatRange.y);\n#endif\nvec2 velocity = texture(velocityTexture, lonLatTexCoord).xy;\nfloat velocitySize = length(velocity);\nfloat threshold = abs(uCeil - uFloor);\nfloat contourRate = (velocitySize - uFloor) / threshold;\nfloat finalCoord = clamp(contourRate, 0.0, 1.0);\nvelocityColor = mix(particleColor, texture(colorTable, vec2(0.0, finalCoord)).rgba, uHasColorTable);\noutTexCoord= texCoord;\nvec3 upAxis = normalize(relativeOriginPos);\nvec3 eastAxis = cross(vec3(0.0, 0.0, 1.0), upAxis);\neastAxis = normalize(eastAxis);\nvec3 northAxis = cross(upAxis, eastAxis);\nnorthAxis = normalize(northAxis);\n#ifdef FILTER\nif(velocitySize > uMaxFilterValue || velocitySize < uMinFilterValue){\nvelocityColor.a = 0.0;\n}\n#endif\n#ifdef TEXTUREEFFECT\nvec3 nestPos = relativeOriginPos + northAxis * velocity.y * deltaTime * velocityScale + eastAxis * velocity.x * deltaTime * velocityScale;\nvec4 nextPrjPos = czm_viewProjection * vec4(nestPos, 1.0);\nvec4 curPrjPos = czm_viewProjection * vec4(relativeOriginPos, 1.0);\nvec2 direction = normalize(nextPrjPos.xy - curPrjPos.xy);\nfloat cosx = dot(direction, vec2(1.0, 0.0));\nfloat cosy = dot(direction, vec2(0.0, 1.0));\nfloat sinx = sqrt(1.0- cosx*cosx);\nfloat cosYBiggerThan0 = sign(cosy);\nmat2 mat = mat2(cosx, sinx * cosYBiggerThan0, -sinx * cosYBiggerThan0, cosx);\nvec2 realNormal = mat * texCoord.xy;\ngl_Position = computePos(vec3(realNormal.xy, 0.0), relativeOriginPos);\n#else\ngl_PointSize = pointSize;\ngl_Position = czm_viewProjection * vec4(relativeOriginPos, 1);\n#endif\n}\n\n",re$7="layout(location=0) in vec3 pos;\nlayout(location=3) in vec2 texCoord;\nuniform float pointSize;\nuniform float uFieldTextureSize;\nuniform float uMaxFilterValue;\nuniform float uMinFilterValue;\nuniform vec4 particleColor;\nuniform sampler2D velocityTexture;\nuniform sampler2D colorTable;\nuniform float uHasColorTable;\nuniform float uCeil;\nuniform float uFloor;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 uXYBounds;\nuniform vec2 uZBounds;\nuniform float uTextureDepth;\nout vec4 velocityColor;\nout vec2 outTexCoord;\n\nfloat computerOnePixelLength()\n{\n vec4 viewPos = czm_modelView * vec4(pos, 1.0);\n vec4 winPos = czm_projection * viewPos;\n float dwidth = czm_metersPerPixel(viewPos);\n winPos.x = winPos.x - 2.0 * dwidth;\n vec4 newViewPos = czm_inverseProjection * winPos;\n return length(viewPos - newViewPos);\n}\n\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = czm_modelView * vec4(pos, 1.0);\n#ifdef SIZEFIXED\n viewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength() * uFieldTextureSize;\n#else\n viewPos.xyz = viewPos.xyz + v3Normal * uFieldTextureSize;\n#endif\n viewPos.xyz = viewPos.xyz * 0.9;\n return czm_projection * viewPos;\n}\n\nvoid main()\n{\n vec2 velocityTexCoord;\n velocityTexCoord.x = (pos.x - uXYBounds.x) / (uXYBounds.z - uXYBounds.x);\n velocityTexCoord.y = (pos.y - uXYBounds.y) / (uXYBounds.w - uXYBounds.y);\n float texCoordZ = pos.z / (uZBounds.y - uZBounds.x);\n float texCoordStep = 1.0 / uTextureDepth;\n float timesZ = floor(texCoordZ / texCoordStep);\n velocityTexCoord.x /= uTextureDepth;\n velocityTexCoord.x += texCoordStep * timesZ;\n vec3 velocity = texture(velocityTexture, velocityTexCoord).xyz;\n float velocitySize = length(velocity);\n float threshold = abs(uCeil - uFloor);\n float contourRate = (velocitySize - uFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n velocityColor = mix(particleColor, texture(colorTable, vec2(0.0, finalCoord)).rgba, uHasColorTable);\n outTexCoord= texCoord;\n#ifdef FILTER\n if(velocitySize > uMaxFilterValue || velocitySize < uMinFilterValue)\n {\n velocityColor.a = 0.0;\n }\n#endif\n if(pos.x > uXYBounds.z || pos.x < uXYBounds.x || pos.y > uXYBounds.w || pos.y < uXYBounds.y || pos.z < uZBounds.x || pos.z > uZBounds.y)\n {\n velocityColor.a = 0.0;\n }\n#ifdef TEXTUREEFFECT\n vec3 nextPos = pos.xyz + velocity.xyz * deltaTime * velocityScale;\n vec4 nextPrjPos = czm_modelViewProjection * vec4(nextPos, 1.0);\n vec4 curPrjPos = czm_modelViewProjection * vec4(pos, 1.0);\n vec2 direction = normalize(nextPrjPos.xy - curPrjPos.xy);\n float cosx = dot(direction, vec2(1.0, 0.0));\n float cosy = dot(direction, vec2(0.0, 1.0));\n float sinx = sqrt(1.0- cosx*cosx);\n float cosYBiggerThan0 = sign(cosy);\n mat2 mat = mat2(cosx, sinx * cosYBiggerThan0, -sinx * cosYBiggerThan0, cosx);\n vec2 realNormal = mat * texCoord.xy;\n gl_Position = computePos(vec3(realNormal.xy, 0.0));\n#else\n gl_PointSize = pointSize;\n gl_Position = czm_modelViewProjection * vec4(pos, 1);\n#endif\n}",ie$4="precision mediump float;\nin vec4 velocityColor;\nin vec2 outTexCoord;\nout vec4 FragColor;\nuniform sampler2D uFieldTexture;\nvoid main()\n{\nFragColor = velocityColor;\n#ifdef TEXTUREEFFECT\nFragColor = texture(uFieldTexture, outTexCoord) * velocityColor;\n#endif\n}\n",ae$6="precision highp float;\nlayout(location=0) in vec3 pos;\nlayout(location=1) in vec3 oriPos;\nlayout(location=2) in vec2 lonLat;\nlayout(location=3) in vec2 life;\nout vec3 tf_pos;\nout vec3 tf_oriPos;\nout vec2 tf_lonLat;\nout vec2 tf_life;\nuniform sampler2D velocityTexture;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec2 velocityTexRes;\nuniform vec4 lonlatRange;\n\nfloat fastAtan2(float y, float x)\n{\n float ax = abs(x);\n float ay = abs(y);\n float a = min(ax, ay) / (max(ax, ay) + 1e-18);\n //float s = a * a;\n float r = ((-0.0464964749 * a * a + 0.15931422) * a * a - 0.327622764) * a * a * a + a;\n if(ay > ax){\n r = 1.57079637 - r;\n }\n if(x < 0.0){\n r = 3.14159274 - r;\n }\n if(y < 0.0){\n r = -r;\n }\n return r;\n}\n\nvec3 ComputeLatLonFromPos(vec3 pos)\n{\n float rho = sqrt(pos.x * pos.x + pos.y * pos.y + pos.z * pos.z);\n if (rho < 0.00001)\n {\n return vec3(0.0);\n }\n float longitude = fastAtan2(pos.y, pos.x);\n float latitude = asin(pos.z / rho);\n return vec3(longitude,latitude,rho);\n}\n\nvec2 lookup_wind(const vec2 uv)\n{\n vec2 px = 1.0 / velocityTexRes;\n vec2 vc = (floor(uv * velocityTexRes)) * px;\n vec2 f = fract(uv * velocityTexRes);\n vec2 tl = texture(velocityTexture, vc).rg;\n vec2 tr = texture(velocityTexture, vc + vec2(px.x, 0)).rg;\n vec2 bl = texture(velocityTexture, vc + vec2(0, px.y)).rg;\n vec2 br = texture(velocityTexture, vc + px).rg;\n return mix(mix(tl, tr, f.x), mix(bl, br, f.x), f.y);\n}\n\nvoid main()\n{\n vec2 lonLatTexCoord;\n#ifdef TEXTUREEFFECT\n lonLatTexCoord.x = (lonLat.x + czm_pi) / czm_twoPi;\n lonLatTexCoord.y = (lonLat.y + czm_piOverTwo) / czm_pi;\n#else\n lonLatTexCoord.x = (lonLat.x - lonlatRange.x) / (lonlatRange.z - lonlatRange.x);\n lonLatTexCoord.y = (lonLat.y - lonlatRange.y) / (lonlatRange.w - lonlatRange.y);\n#endif\n vec2 velocity = lookup_wind(lonLatTexCoord);\n vec3 upAxis = normalize(pos);\n vec3 eastAxis = cross(vec3(0.0, 0.0, 1.0), upAxis);\n eastAxis = normalize(eastAxis);\n vec3 northAxis = cross(upAxis, eastAxis);\n northAxis = normalize(northAxis);\n if(life.x > life.y)\n {\n tf_pos = oriPos;\n tf_life.x = 0.0;\n tf_life.y = life.y;\n }\n else\n {\n tf_pos = pos + northAxis * velocity.y * deltaTime * velocityScale + eastAxis * velocity.x * deltaTime * velocityScale;\n tf_life.x += life.x + deltaTime;\n tf_life.y = life.y;\n }\n tf_oriPos = oriPos;\n tf_lonLat = ComputeLatLonFromPos(tf_pos).xy;\n#ifndef TEXTUREEFFECT\n vec2 s = step(lonlatRange.xy, tf_lonLat);\n vec2 t = step(tf_lonLat, lonlatRange.zw);\n if (s.x * s.y * t.x * t.y < 1.0) {\n tf_life.x = life.y + 1.0;\n }\n#endif\n}\n\n\n",oe$6="precision highp float;\nlayout(location=0) in vec3 pos;\nlayout(location=1) in vec3 oriPos;\nlayout(location=2) in vec2 life;\nout vec3 tf_pos;\nout vec3 tf_oriPos;\nout vec2 tf_life;\nuniform sampler2D velocityTexture;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 uXYBounds;\nuniform vec2 uZBounds;\nuniform float uTextureDepth;\n\nvoid main()\n{\n vec2 velocityTexCoord;\n velocityTexCoord.x = (pos.x - uXYBounds.x) / (uXYBounds.z - uXYBounds.x);\n velocityTexCoord.y = (pos.y - uXYBounds.y) / (uXYBounds.w - uXYBounds.y);\n float texCoordZ = pos.z / (uZBounds.y - uZBounds.x);\n float texCoordStep = 1.0 / uTextureDepth;\n float timesZ = floor(texCoordZ / texCoordStep);\n velocityTexCoord.x /= uTextureDepth;\n velocityTexCoord.x += texCoordStep * timesZ;\n vec3 velocity = texture(velocityTexture, velocityTexCoord).xyz;\n if(life.x > life.y)\n {\n tf_pos = oriPos;\n tf_life.x = 0.0;\n tf_life.y = life.y;\n }\n else\n {\n tf_pos.xyz = pos.xyz + velocity.xyz * deltaTime * velocityScale;\n tf_life.x += life.x + deltaTime;\n tf_life.y = life.y;\n }\n tf_oriPos = oriPos;\n}",ne$9="precision highp float;\nout vec4 FragColor;\nvoid main() {}\n",le$a="uniform sampler2D u_lastColorTexture;\nuniform sampler2D u_colorTexture;\nuniform float u_opacity;\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color = texture2D(u_colorTexture, v_textureCoordinates);\n vec4 lastColor = texture2D(u_lastColorTexture, v_textureCoordinates);\n vec4 outColor = color*color.a + lastColor * (1.0 - color.a);\n float alpha = outColor.a * u_opacity;\n gl_FragColor = vec4(outColor.rgb, alpha < 0.1 ? 0.0 : alpha);\n}\n";function P$g(e){if(!e._webgl2)throw new t$16("webgl2 is not supported.");this._context=e,this._show=!0,this._filter=!1,this._MaxFilterValue=Number.MAX_VALUE,this._MinFilterValue=Number.MIN_VALUE,this._paricleCountPerDegree=1,this._lifeRange=[5e3,1e4],this._particleColor=new e$1U(1,1,0,1),this._particleSize=5,this._velocityScale=1,this._velocityTexRes=new o$1o(0,0),this._velocityField=void 0,this._dictColorTable=void 0,this._floor=0,this._ceil=10,this._hasColorTable=0,this._hypsometricTexture=void 0,this._dataBounds=h$18.MAX_VALUE,this._zBounds=new o$1o(0,1),this._transformFeedback=void 0,this._normalShaderProgram=void 0,this._feedbackShaderProgram=void 0,this._currentTime=0,this._deltaTime=0,this._transformFeedbackInitialized=!1,this._fieldInitialized=!1,this._fieldDataIndices=void 0,this._textureEffect=!1,this._textureEffectUrl=n$15("Assets/Textures/arrow.png"),this._fieldTexture=void 0,this._fieldTextureSize=30,this._sizeFixed=!0,this._sceneMode=C$13.SCENE3D,this._showParticleTrails=!0,this._fadeOpacity=.98,this._curParticleStateTexture=void 0,this._lastParticleStateTexture=void 0,this._tmpParticleStateTexture=void 0,this._curParticleTextureBuffer=void 0,this._lastParticleTextureBuffer=void 0,this._tmpParticleTextureBuffer=void 0,this._clearCommand=void 0,this._copyColorCommand=void 0,this._copyLastColorCommand=void 0,this._hdrEnable=!1}var de$5=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);Object.defineProperties(P$g.prototype,{fieldTextureSize:{get:function(){return this._fieldTextureSize},set:function(e){this._fieldTextureSize=e}},sizeFixed:{get:function(){return this._sizeFixed},set:function(e){this._sizeFixed=e,this._transformFeedbackInitialized=!1}},textureEffect:{get:function(){return this._textureEffect},set:function(e){this._textureEffect=e,this._transformFeedbackInitialized=!1}},textureEffectUrl:{get:function(){return this._textureEffectUrl},set:function(e){this._textureEffectUrl=e,this._fieldTexture=void 0}},show:{get:function(){return this._show},set:function(e){this._show=e}},filter:{get:function(){return this._filter},set:function(e){this._filter=e,this._transformFeedbackInitialized=!1}},MaxFilterValue:{get:function(){return this._MaxFilterValue},set:function(e){this._MaxFilterValue=e}},MinFilterValue:{get:function(){return this._MinFilterValue},set:function(e){this._MinFilterValue=e}},paricleCountPerDegree:{get:function(){return this._paricleCountPerDegree},set:function(e){this._paricleCountPerDegree=e,this._transformFeedbackInitialized=!1}},particleLifeRange:{get:function(){return this._lifeRange},set:function(e){this._lifeRange=e,this._transformFeedbackInitialized=!1}},particleColor:{get:function(){return this._particleColor},set:function(e){this._particleColor=e}},particleSize:{get:function(){return this._particleSize},set:function(e){this._particleSize=e}},velocityScale:{get:function(){return this._velocityScale},set:function(e){this._velocityScale=e}},colorTable:{get:function(){return this._dictColorTable},set:function(e){if(!e$2b(e))return e$2b(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),void(this._hasColorTable=0);this._dictColorTable=i$S.clone(e,this._dictColorTable);var t=this._dictColorTable.count();if(t<1)this._hasColorTable=0;else{e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:this._context,width:1024,height:64,pixelFormat:V$10.RGBA})),e$2b(this._dictColorTable)&&(this._dictColorTable.generateBuffer(),e$2b(this._hypsometricTexture)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._dictColorTable._imageBuffer}));var i=0,n=0,r=this._dictColorTable.getItem(0);e$2b(r)&&e$2b(r.altitude)&&(i=parseFloat(r.altitude)),e$2b(r=this._dictColorTable.getItem(t-1))&&e$2b(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n),this._hasColorTable=1}}}}),P$g.prototype.update=function(e){if(this._show&&e$2b(this._velocityField)){if(this._sceneMode!==e.camera._mode&&(this._sceneMode=e.camera._mode,this._transformFeedbackInitialized=!1),this._textureEffect&&e$2b(this._textureEffectUrl)&&!e$2b(this._fieldTexture)){var t=this;o$1l(t$T(this._textureEffectUrl),(function(e){t._fieldTexture=new t$V({context:t._context,source:e,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT})}),t._transformFeedbackInitialized=!1}))}this._fieldInitialized||(this._createVectorFieldTexture(this._context,this._velocityField),this._fieldInitialized=!0),this._transformFeedbackInitialized||(this._createTransformFeedback(this._context,e),this._transformFeedbackInitialized=!0),e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:this._context,width:1,height:1024,pixelFormat:V$10.RGBA}));var i=(new Date).getTime(),n=i-this._currentTime;this._currentTime=i,this._deltaTime=n,e$2b(this._transformFeedback)&&e.commandList.push(this._transformFeedback)}},P$g.prototype._setVelocityField=function(e){this._velocityField=e,this._fieldInitialized=!1},P$g.prototype._setDataBounds=function(e){this._dataBounds=e,this._transformFeedbackInitialized=!1},P$g.prototype._setZBounds=function(e){this._zBounds=e,this._transformFeedbackInitialized=!1};var ce$9=/\s+czm_writeLogDepth\(/,_e$5=/\s+czm_vertexLogDepth\(/,me$8=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;function pe$7(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!e$2b(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();r.defines=e$2b(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),o.defines=e$2b(o.defines)?o.defines.slice(0):[],o.defines.push("LOG_DEPTH");var a,s=!1,l=r.sources,u=l.length;for(a=0;a<u;++a)if(_e$5.test(l[a])){s=!0;break}if(!s){for(a=0;a<u;++a)l[a]=s$U.replaceMain(l[a],"czm_log_depth_main");"\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n",l.push("\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n")}for(s=!1,u=(l=o.sources).length,a=0;a<u;++a)ce$9.test(l[a])&&(s=!0),me$8.test(l[a]);var c="";if(!s){for(a=0;a<u;a++)l[a]=s$U.replaceMain(l[a],"czm_log_depth_main");c+="\nvoid main() \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(); \n} \n"}l.push(c),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i}P$g.prototype._createTransformFeedback=function(e,t){e$2b(this._transformFeedback)&&this._transformFeedback.destroy();var i,n,r=[];this._sceneMode!==C$13.SCENE3D?(i=new s$U({sources:[oe$6]}),n=new s$U({sources:[re$7]}),r=["tf_pos","tf_oriPos","tf_life"]):(i=new s$U({sources:[ae$6]}),n=new s$U({sources:[te$4]}),r=["tf_pos","tf_oriPos","tf_lonLat","tf_life"]);var o,a=new s$U({sources:[ie$4]});this._textureEffect&&(i.defines.push("TEXTUREEFFECT"),n.defines.push("TEXTUREEFFECT"),a.defines.push("TEXTUREEFFECT")),this._filter&&n.defines.push("FILTER"),this._sizeFixed&&n.defines.push("SIZEFIXED"),this._normalShaderProgram=r$13.fromCache({context:e,vertexShaderSource:n,fragmentShaderSource:a}),t.useLogDepth&&(this._normalShaderProgram=pe$7(e,this._normalShaderProgram)),this._feedbackShaderProgram=r$13.fromCache({context:e,vertexShaderSource:i,fragmentShaderSource:ne$9,transformFeedbackVaryings:r,bufferMode:de$x.SEPARATE_ATTRIBS}),o=this._textureEffect?this._sceneMode!==C$13.SCENE3D?this._createLocalTextureVertexAttributes():this._createGlobalTextureVertexAttributes():this._sceneMode!==C$13.SCENE3D?this._createLocalVertexAttributes():this._createGlobalVertexAttributes();var s=this._createFeedbackShaderUniformMap(),l=this._createNormalShaderUniformMap(),u=d$1m.fromCache({depthTest:{enabled:!0},depthMask:!1,blending:Ee$r.ALPHA_BLEND}),c=this._computeTotalParticleCount();this._transformFeedback=new s$i({pointCount:c,indices:this._fieldDataIndices,textureEffect:this._textureEffect,attributes:o,primitiveMode:this._textureEffect?de$x.TRIANGLES:de$x.POINTS,renderState:u,feedbackShader:this._feedbackShaderProgram,normalShader:this._normalShaderProgram,normalShaderUniformMap:l,feedbackShaderUniformMap:s,modelMatrix:this._sceneMode===C$13.SCENE3D?p$1d.IDENTITY:de$5,fadeOpacity:this._fadeOpacity}),this._transformFeedback._drawEvent.addEventListener(this.drawParticleTrails,this)},P$g.prototype._createGlobalVertexAttributes=function(){var e,t,i,n,r,o,a,s,l;e=e$2a.toDegrees(this._dataBounds.width),t=e$2a.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x,n=e$2a.toDegrees(this._dataBounds.west),r=e$2a.toDegrees(this._dataBounds.south),o=this._zBounds.x;for(var u=(a=Math.ceil(this._paricleCountPerDegree*e))*(s=Math.ceil(this._paricleCountPerDegree*t))*(l=Math.ceil(this._paricleCountPerDegree*i)),c=new Float32Array(3*u),h=new Float32Array(3*u),d=new Float32Array(2*u),f=new Float32Array(2*u),p=0,_=0;_<s;_++)for(var m=0;m<a;m++)for(var g=0;g<l;g++,p++){var x=n+m*(e/a),v=r+_*(t/s),y=o+g*(i/l),$=new o$1p.fromDegrees(x,v,y);c[3*p]=$.x,c[3*p+1]=$.y,c[3*p+2]=$.z,h[3*p]=$.x,h[3*p+1]=$.y,h[3*p+2]=$.z,d[2*p]=e$2a.toRadians(x),d[2*p+1]=e$2a.toRadians(v);var b=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];f[2*p]=0,f[2*p+1]=b}this.lonlatRange=new e$29(d[0],d[1],d[d.length-2],d[d.length-1]);var T=[];return T.push({index:0,componentsPerAttribute:3,data:c}),T.push({index:1,componentsPerAttribute:3,data:h}),T.push({index:2,componentsPerAttribute:2,data:d}),T.push({index:3,componentsPerAttribute:2,data:f}),T},P$g.prototype._createLocalVertexAttributes=function(){var e,t,i,n,r,o,a,s,l;e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x,n=this._dataBounds.west,r=this._dataBounds.south,o=this._zBounds.x;for(var u=(a=Math.ceil(this._paricleCountPerDegree*e))*(s=Math.ceil(this._paricleCountPerDegree*t))*(l=Math.ceil(this._paricleCountPerDegree*i)),c=new Float32Array(3*u),h=new Float32Array(3*u),d=new Float32Array(2*u),f=0,p=0;p<s;p++)for(var _=0;_<a;_++)for(var m=0;m<l;m++,f++){var g=n+_*(e/(a-1)),x=r+p*(t/(s-1)),v=o+m*(i/l);c[3*f]=g,c[3*f+1]=x,c[3*f+2]=v,h[3*f]=g,h[3*f+1]=x,h[3*f+2]=v;var y=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];d[2*f]=0,d[2*f+1]=y}var $=[];return $.push({index:0,componentsPerAttribute:3,data:c}),$.push({index:1,componentsPerAttribute:3,data:h}),$.push({index:2,componentsPerAttribute:2,data:d}),$},P$g.prototype._createGlobalTextureVertexAttributes=function(){for(var e=e$2a.toDegrees(this._dataBounds.width),t=e$2a.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x,n=e$2a.toDegrees(this._dataBounds.west),r=e$2a.toDegrees(this._dataBounds.south),o=this._zBounds.x,a=Math.ceil(this._paricleCountPerDegree*t),s=Math.ceil(this._paricleCountPerDegree*e),l=Math.ceil(this._paricleCountPerDegree*i),u=a*s*l*4,c=new Uint32Array(u/4*6),h=new Float32Array(2*u),d=new Float32Array(3*u),f=new Float32Array(3*u),p=new Float32Array(2*u),_=new Float32Array(2*u),m=0,g=0;g<a;g++)for(var x=0;x<s;x++)for(var v=0;v<l;v++,m++){for(var y=n+x*(e/(s-1)),$=r+g*(t/(a-1)),b=o+v*(i/l),T=new o$1p.fromDegrees(y,$,b),C=0;C<12;C+=3)d[12*m+C]=T.x,d[12*m+C+1]=T.y,d[12*m+ +C+2]=T.z;for(C=0;C<12;C+=3)f[12*m+C]=T.x,f[12*m+C+1]=T.y,f[12*m+ +C+2]=T.z;for(C=0;C<8;C+=2)p[8*m+C]=e$2a.toRadians(y),p[8*m+C+1]=e$2a.toRadians($);var S=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];_[8*m]=0,_[8*m+1]=S,_[8*m+2]=0,_[8*m+3]=S,_[8*m+4]=0,_[8*m+5]=S,_[8*m+6]=0,_[8*m+7]=S}for(x=0;x<c.length;x++)c[6*x]=4*x,c[6*x+1]=4*x+1,c[6*x+2]=4*x+2,c[6*x+3]=4*x,c[6*x+4]=4*x+2,c[6*x+5]=4*x+3;this._fieldDataIndices=c;for(m=0,v=0;v<h.length;v+=8,m++)h[8*m]=0,h[8*m+1]=0,h[8*m+2]=0,h[8*m+3]=1,h[8*m+4]=1,h[8*m+5]=1,h[8*m+6]=1,h[8*m+7]=0;var w=[];return w.push({index:0,componentsPerAttribute:3,data:d}),w.push({index:1,componentsPerAttribute:3,data:f}),w.push({index:2,componentsPerAttribute:2,data:p}),w.push({index:3,componentsPerAttribute:2,data:_}),w.push({index:4,componentsPerAttribute:2,data:h}),w},P$g.prototype._createLocalTextureVertexAttributes=function(){for(var e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x,n=this._dataBounds.west,r=this._dataBounds.south,o=this._zBounds.x,a=Math.ceil(this._paricleCountPerDegree*e),s=Math.ceil(this._paricleCountPerDegree*t),l=Math.ceil(this._paricleCountPerDegree*i),u=s*a*l*4,c=new Uint32Array(u/4*6),h=new Float32Array(2*u),d=new Float32Array(3*u),f=new Float32Array(3*u),p=new Float32Array(2*u),_=0,m=0;m<s;m++)for(var g=0;g<a;g++)for(var x=0;x<l;x++,_++){for(var v=n+g*(e/(a-1)),y=r+m*(t/(s-1)),$=o+x*(i/l),b=0;b<12;b+=3)d[12*_+b]=v,d[12*_+b+1]=y,d[12*_+ +b+2]=$;for(b=0;b<12;b+=3)f[12*_+b]=v,f[12*_+b+1]=y,f[12*_+ +b+2]=$;var T=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];p[8*_]=0,p[8*_+1]=T,p[8*_+2]=0,p[8*_+3]=T,p[8*_+4]=0,p[8*_+5]=T,p[8*_+6]=0,p[8*_+7]=T}for(g=0;g<c.length;g++)c[6*g]=4*g,c[6*g+1]=4*g+1,c[6*g+2]=4*g+2,c[6*g+3]=4*g,c[6*g+4]=4*g+2,c[6*g+5]=4*g+3;this._fieldDataIndices=c;for(_=0,x=0;x<h.length;x+=8,_++)h[8*_]=0,h[8*_+1]=0,h[8*_+2]=0,h[8*_+3]=1,h[8*_+4]=1,h[8*_+5]=1,h[8*_+6]=1,h[8*_+7]=0;var C=[];return C.push({index:0,componentsPerAttribute:3,data:d}),C.push({index:1,componentsPerAttribute:3,data:f}),C.push({index:2,componentsPerAttribute:2,data:p}),C.push({index:3,componentsPerAttribute:2,data:h}),C},P$g.prototype._computeTotalParticleCount=function(){if(this._sceneMode!==C$13.SCENE3D){var e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x;return Math.ceil(this._paricleCountPerDegree*e)*Math.ceil(this._paricleCountPerDegree*t)*Math.ceil(this._paricleCountPerDegree*i)}e=e$2a.toDegrees(this._dataBounds.width),t=e$2a.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x;return Math.ceil(this._paricleCountPerDegree*e)*Math.ceil(this._paricleCountPerDegree*t)*Math.ceil(this._paricleCountPerDegree*i)};var B$b=new e$29;function i$g(e){o$1q.defined("context",e),this._context=e,this._fieldData=void 0,this._NetCDFData=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._layerBounds=h$18.MAX_VALUE,this._visible=!0,this._type="FieldLayer3D",this._particleVelocityFieldEffect=new P$g(e)}P$g.prototype._createFeedbackShaderUniformMap=function(){var e=this;return{velocityTexture:function(){return e._vectorFieldTexture},velocityScale:function(){return e._velocityScale},velocityTexRes:function(){return e._velocityTexRes},deltaTime:function(){return e._deltaTime},uXYBounds:function(){return B$b.x=e._dataBounds.west,B$b.y=e._dataBounds.south,B$b.z=e._dataBounds.east,B$b.w=e._dataBounds.north,B$b},uZBounds:function(){return e._zBounds},uTextureDepth:function(){return e._texZDepth},lonlatRange:function(){return e.lonlatRange}}},P$g.prototype._createNormalShaderUniformMap=function(){var e=this;return{particleColor:function(){return e._particleColor},pointSize:function(){return e._particleSize},uMaxFilterValue:function(){return e._MaxFilterValue},uMinFilterValue:function(){return e._MinFilterValue},uFieldTexture:function(){return e$2b(e._fieldTexture)?e._fieldTexture:new t$V({context:e._context,width:1,height:1})},uFieldTextureSize:function(){return e._fieldTextureSize},velocityTexture:function(){return e._vectorFieldTexture},colorTable:function(){return e._hypsometricTexture},lonlatRange:function(){return e.lonlatRange},uFloor:function(){return e._floor},uCeil:function(){return e._ceiling},uHasColorTable:function(){return e._hasColorTable},velocityScale:function(){return e._velocityScale},deltaTime:function(){return e._deltaTime},uXYBounds:function(){return B$b.x=e._dataBounds.west,B$b.y=e._dataBounds.south,B$b.z=e._dataBounds.east,B$b.w=e._dataBounds.north,B$b},uZBounds:function(){return e._zBounds},uTextureDepth:function(){return e._texZDepth}}},P$g.prototype._createVectorFieldTexture=function(e,t){e$2b(this._vectorFieldTexture)&&this._vectorFieldTexture.destroy();var i,n=0,r=0;if(t instanceof Array&&(n=(i=this._createCanvasFromDataMatrix(t)).width,r=i.height,!i))return!1;this._velocityTexRes.x=n,this._velocityTexRes.y=r,this._vectorFieldTexture=new t$V({context:e,width:n,height:r,pixelFormat:V$10.RGB,pixelDatatype:_$$.FLOAT}),this._vectorFieldTexture.copyFrom({width:n,height:r,arrayBufferView:i.imageData})},P$g.prototype._createCanvasFromDataMatrix=function(e){var t=e.length;if(!(e[0]instanceof Array))return null;var i,n,r,o,a,s,l,u=e[0].length;if(!(e[0][0]instanceof Array))return null;if(e[0][0][0]instanceof Array){var c=u,h=t,d=e[0][0].length;for(this._texZDepth=d,s=new Float32Array(h*c*d*3),o=0,i=0;i<c;i++)for(n=0;n<d;n++)for(r=0;r<h;r++){var f=null==(l=e[r][i][n]).x?l[0]:l.x,p=null==l.y?l[1]:l.y,_=null==l.z?l[2]:l.z;s[o++]=f,s[o++]=p,s[o++]=_}a={height:c,width:d*h,imageData:s}}else{for(s=new Float32Array(t*u*3),o=0,n=0;n<t;n++)for(i=0;i<u;i++){var m=null==(l=e[n][i]).x?l[0]:l.x,g=null==l.y?l[1]:l.y;s[o++]=m,s[o++]=g,s[o++]=0}a={height:t,width:u,imageData:s}}return a},P$g.prototype.createParticleTrailsResources=function(e,t){if(this._showParticleTrails&&(!e$2b(this._lastParticleStateTexture)||this._lastParticleStateTexture.width!==e.drawingBufferWidth||this._lastParticleStateTexture.height!==e.drawingBufferHeight)){e$2b(this._lastParticleStateTexture)&&(this._lastParticleStateTexture.width!==e.drawingBufferWidth||this._lastParticleStateTexture.height!==e.drawingBufferHeight)&&this.destroyParticleTrailsResources();var i=_$$.UNSIGNED_BYTE;this._hdrEnable&&(i=_$$.FLOAT),this._curParticleStateTexture=new t$V({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:V$10.RGBA}),this._lastParticleStateTexture=new t$V({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:V$10.RGBA}),this._tmpParticleStateTexture=new t$V({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:V$10.RGBA});var n=u$_(this._transformFeedback._framebuffer,t.framebuffer);this._curParticleTextureBuffer=new t$W({context:e,colorTextures:[this._curParticleStateTexture],depthStencilTexture:n.depthStencilTexture,destroyAttachments:!1}),this._lastParticleTextureBuffer=new t$W({context:e,colorTextures:[this._lastParticleStateTexture],destroyAttachments:!1}),this._tmpParticleTextureBuffer=new t$W({context:e,colorTextures:[this._tmpParticleStateTexture],destroyAttachments:!1}),this._clearCommand=new t$X({color:new e$1U(0,0,0,0),renderState:d$1m.fromCache()});var r=this._lastParticleStateTexture,o=this._tmpParticleTextureBuffer;this._copyLastColorCommand=e.createViewportQuadCommand(ie$6,{uniformMap:{colorTexture:function(){return r}},framebuffer:o});var a=this._tmpParticleStateTexture,s=this._curParticleStateTexture,l=this._lastParticleTextureBuffer,u=this._fadeOpacity;this._copyColorCommand=e.createViewportQuadCommand(le$a,{uniformMap:{u_lastColorTexture:function(){return a},u_colorTexture:function(){return s},u_opacity:function(){return u}},framebuffer:l})}},P$g.prototype.destroyParticleTrailsResources=function(){e$2b(this._curParticleStateTexture)&&(this._curParticleStateTexture.destroy(),this._curParticleStateTexture=void 0),e$2b(this._lastParticleStateTexture)&&(this._lastParticleStateTexture.destroy(),this._lastParticleStateTexture=void 0),e$2b(this._tmpParticleStateTexture)&&(this._tmpParticleStateTexture.destroy(),this._tmpParticleStateTexture=void 0),e$2b(this._curParticleTextureBuffer)&&(this._curParticleTextureBuffer.destroy(),this._curParticleTextureBuffer=void 0),e$2b(this._lastParticleTextureBuffer)&&(this._lastParticleTextureBuffer.destroy(),this._lastParticleTextureBuffer=void 0),e$2b(this._tmpParticleTextureBuffer)&&(this._tmpParticleTextureBuffer.destroy(),this._tmpParticleTextureBuffer=void 0),this._clearCommand=void 0,this._copyColorCommand=void 0,this._copyLastColorCommand=void 0},P$g.prototype.drawParticleTrails=function(e,t){!this._showParticleTrails||(this.createParticleTrailsResources(e,t),e$2b(this._copyLastColorCommand)&&this._copyLastColorCommand.execute(e,t),e$2b(this._copyColorCommand)&&this._copyColorCommand.execute(e,t),this._clearCommand.framebuffer=this._curParticleTextureBuffer,this._clearCommand.execute(e,t),this._transformFeedback.beginDraw(e,this._curParticleTextureBuffer,this._transformFeedback,t),this._transformFeedback._drawNormal(e,t))},P$g.prototype.clearLastParticleStateTexture=function(e,t,i,n){if(e$2b(t)&&this._hdrEnable!==t)return this._hdrEnable=t,this.destroyParticleTrailsResources(),void this.createParticleTrailsResources(t,i,n);!e._stateChanged||this.clearLastParticleBuffer(i,n)},P$g.prototype.clearLastParticleBuffer=function(e,t){this._clearCommand.framebuffer=this._lastParticleTextureBuffer,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._curParticleTextureBuffer,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._tmpParticleTextureBuffer,this._clearCommand.execute(e,t)},P$g.prototype.isDestroyed=function(){return!1},P$g.prototype.destroy=function(){return e$2b(this._vectorFieldTexture)&&(this._vectorFieldTexture.destroy(),this._vectorFieldTexture=void 0),e$2b(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),e$2b(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),e$2b(this._transformFeedback)&&(this._transformFeedback.destroy(),this._transformFeedback=void 0),e$2b(this._fieldTexture)&&(this._fieldTexture.destroy(),this._fieldTexture=void 0),this.destroyParticleTrailsResources(),i$10(this)},Object.defineProperties(i$g.prototype,{visible:{get:function(){return this._visible},set:function(e){this._visible=e}},type:{get:function(){return this._type}},fieldData:{get:function(){return this._fieldData},set:function(e){this._fieldData=e,e$2b(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setVelocityField(e)}},NetCDFData:{get:function(){return this._NetCDFData},set:function(e){if(!e$2b(e.longitude)||!e$2b(e.latitude))throw new t$16("coordinates are required.");if(!e$2b(e.uwnd)||!e$2b(e.vwnd))throw new t$16("uwnd or vwnd is required.");if(e.timeOrder=u$_(e.timeOrder,0),e$2b(this._NetCDFBuffer)){for(var t=this._NetCDFBuffer,i=t.getDataVariable(e.longitude),n=t.getDataVariable(e.latitude),r=t.getDataVariable(e.uwnd),o=t.getDataVariable(e.vwnd),a=0,s=[],l=0;l<n.length;l++){s[l]=[];for(var u=0;u<i.length;u++,a++){var c=n.length*i.length*e.timeOrder;s[l][u]=[r[a+c],o[a+c]]}}this._NetCDFData=s,e$2b(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setVelocityField(s)}}},NetCDFInfo:{get:function(){return this._NetCDFInfo},set:function(e){this._NetCDFInfo=e}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e,e$2b(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setDataBounds(e)}},zBounds:{get:function(){return this._zBounds},set:function(e){this._zBounds=e,e$2b(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setZBounds(e)}},particleVelocityFieldEffect:{get:function(){return this._particleVelocityFieldEffect}}}),i$g.prototype.update=function(e){this._visible?e$2b(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect.update(e):e$2b(this._particleVelocityFieldEffect)&&e$2b(this._particleVelocityFieldEffect._transformFeedback)&&this._particleVelocityFieldEffect.clearLastParticleBuffer(this._context,e)},i$g.prototype.isDestroyed=function(){return!1},i$g.prototype.destroy=function(){return e$2b(this._particleVelocityFieldEffect)&&(this._particleVelocityFieldEffect.destroy(),this._particleVelocityFieldEffect=void 0),i$10(this)};var ge$7="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nuniform float uWaterHeight;\n//水面相关\nvarying vec2 vNoiseCoord;\nvarying vec3 vProjectionCoord;\nvarying vec3 vEyeDir;\nvarying vec3 vNormal;\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\n\nvoid initialWaterParam(vec4 oPos)\n{\n float uTimeVal = 0.05;\n float uScale = 80.0;\n float uScroll = 1.0;\n float uNoise = 1.0;\n vec2 uBumpSpeed = vec2(3.0 -3.0);\n\tmat4 scalemat = mat4(0.5, 0.0, 0.0, 0.0,\n\t\t\t0.0, 0.5, 0.0, 0.0,\n\t\t\t0.0, 0.0, 0.5, 0.0,\n\t\t\t0.5, 0.5, 0.5, 1.0);\n\tvec4 proj = scalemat * oPos;\n\tvProjectionCoord = proj.xyw;\n\tvNoiseCoord.xy = aTexCoord0.xy * uScale + uBumpSpeed * uTimeVal;\n\tvec4 cameraPos = czm_inverseModel * vec4(czm_cameraPositionWC, 1.0);\n\tvEyeDir = aPosition.xyz - cameraPos.xyz;\n\tvNormal = vec3(0.0,0.0,1.0);\n}\nvoid main()\n{\n vec4 newPos = vec4(aPosition.xyz, 1.0);\n newPos.z = newPos.z + uWaterHeight;\n vec4 pos = czm_modelViewProjection * newPos;\n gl_Position = depthClampFarPlane(pos);\n vTexCoord = aTexCoord0.xy;\n initialWaterParam(pos);\n clip_vertex = czm_modelView * newPos;\n}",ce$8="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uPolygonTexture;\n//水面参数\nuniform sampler2D uReflectMap;\nuniform sampler2D uNoiseMap;\nvarying vec2 vNoiseCoord;\nvarying vec3 vProjectionCoord;\nvarying vec3 vEyeDir;\nvarying vec3 vNormal;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvec4 AdjSaturation(in vec4 inputColor, in float saturation)\n{\n\tvec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721);\n\tvec3 intensity = vec3(dot(inputColor.rgb, lumCoeff));\n\tvec3 tempColor = mix(intensity, inputColor.rgb, saturation);\n\treturn vec4(tempColor, 1.0);\n}\nvec4 GetWaterColor()\n{\n vec4 uTintColour = vec4(0,0.05,0.05,1);\n vec4 uWaterColour = vec4(0.1804,0.2706,0.3294,1);\n float uNoiseScale = 0.05;\n float uMinFresnel = 0.3;\n float uMaxFresnel = 0.7;\n float uFresnelPower = 1.8;\n float uWaterBrightness = 0.95;\n vec2 final = vProjectionCoord.xy / vProjectionCoord.z;\n vec3 noiseNormal = (texture2D(uNoiseMap, (vNoiseCoord.xy / 5.0)).rgb - 0.5).rbg * uNoiseScale;\n final += noiseNormal.xz;\n float realMinFresnel, realMaxFresnel;\n if(uMinFresnel < uMaxFresnel)\n {\n realMinFresnel = uMinFresnel;\n realMaxFresnel = uMaxFresnel;\n }\n else\n {\n realMinFresnel = uMaxFresnel;\n realMaxFresnel = uMinFresnel;\n }\n float fresnelBias = realMinFresnel;\n float fresnelScale = (realMaxFresnel - realMinFresnel) / 1.0;\n float fresnel = fresnelBias + fresnelScale * pow(1.0 + dot(normalize(vEyeDir), vNormal), uFresnelPower);\n fresnel = clamp(fresnel, 0.05, 0.95);\n vec4 reflectionColour = texture2D(uReflectMap, final);\n vec4 refractionColour = reflectionColour + uTintColour;\n vec4 resultColour = mix(uWaterColour, reflectionColour, fresnel);\n resultColour = AdjSaturation(resultColour, 1.0);\n resultColour = resultColour * uWaterBrightness;\n resultColour.a = uWaterColour.a;\n return resultColour;\n}\n\nvoid main()\n{\n#if defined(GL_EXT_frag_depth) || defined(WEBGL2)\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec2 texCoord = vTexCoord.xy;\n vec4 waterColor = GetWaterColor();\n vec4 texHeight = texture2D(uPolygonTexture, texCoord.xy);\n if(texHeight.x < 0.5)\n {\n discard;\n }\n else\n {\n gl_FragColor = waterColor;\n }\n}",fe$4="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uHeightTexture;\nuniform sampler2D uAssisTexture;\nuniform float uWaterHeight;\nuniform float uTextureWidth;\nuniform float uTextureHeight;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n float dStepX = 1.0 / uTextureWidth;\n float dStepY = 1.0 / uTextureHeight;\n vec2 texCoord = vTexCoord;\n vec4 texHeight = texture2D(uHeightTexture, texCoord);\n if(texHeight.r > uWaterHeight || texHeight.r < -90000.0)\n {\n gl_FragColor = vec4(0.0,0.0,0.0,1.0);\n return;\n }\n vec4 texCenter = texture2D(uAssisTexture, texCoord);\n if(texCenter.x > 0.5)\n {\n gl_FragColor = vec4(1.0,0.0,0.0,1.0);\n return;\n }\n vec4 texRight = texture2D(uAssisTexture, vec2(dStepX + texCoord.x, texCoord.y));//右\n vec4 texTop = texture2D(uAssisTexture, vec2( texCoord.x, dStepY + texCoord.y));//上\n vec4 texLeft = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y));//左\n vec4 texBottom = texture2D(uAssisTexture, vec2(texCoord.x, texCoord.y - dStepY));//下\n vec4 texLeftBottom = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y - dStepY));//下\n vec4 texRightBottom = texture2D(uAssisTexture, vec2(texCoord.x + dStepX, texCoord.y - dStepY));//下\n vec4 texLeftTop = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y + dStepY));//下\n vec4 texRightTop = texture2D(uAssisTexture, vec2(texCoord.x + dStepX, texCoord.y + dStepY));//下\n if(texCenter.x < 0.5 && texRight.x < 0.5 && texTop.x < 0.5 && texLeft.x < 0.5 && texBottom.x < 0.5 && texLeftBottom.x < 0.5 && texRightBottom.x < 0.5 && texLeftTop.x < 0.5 && texRightTop.x < 0.5)\n {\n discard;\n }\n gl_FragColor = vec4(1.0,0.0,0.0,1.0);\n}",e$a={Clamp:0,Absolute:1},K$9=Object.freeze(e$a);function I$d(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._floodCommand=void 0,this._boundingSphere=new i$1c,this._qureyRegion=[],this._waterHeight=0,this._polygonTexture=null,this._floodPosition=[0,0,0],this._worldMatrix=p$1d.IDENTITY.clone(),this._bound=[],this._terrainBlock=void 0,this._terrainBlockURL="",this._points=[],this._datasetInfo=void 0,this._frameState=void 0,this._updateFlagTexture=!1,this._updateHeightTexture=!1,this._name="",this._sceneName="",this._initialize=!1,this._waterMode=K$9.Clamp,this._assistTexture=null,this._heightTexture=null,this._flagCommand=void 0,this._regionGeometry=null,this._textureWidth=1024,this._textureHeight=1024,this._loaded=!1,this._layer=null}function Z$e(e){e$2b(e._floodCommand)&&(e._floodCommand.vertexArray=e._floodCommand.vertexArray&&e._floodCommand.vertexArray.destroy(),e._floodCommand.shaderProgram=e._floodCommand.shaderProgram&&e._floodCommand.shaderProgram.destroy(),e._floodCommand=void 0),e$2b(e._flagCommand)&&(e._flagCommand.vertexArray=e._flagCommand.vertexArray&&e._flagCommand.vertexArray.destroy(),e._flagCommand.shaderProgram=e._flagCommand.shaderProgram&&e._flagCommand.shaderProgram.destroy(),e._flagCommand=void 0)}function z$d(e){e$2b(e._polygonTexture)&&(e._polygonTexture=e._polygonTexture&&e._polygonTexture.destroy(),e._polygonTexture=null),e$2b(e._assistTexture)&&(e._assistTexture=e._assistTexture&&e._assistTexture.destroy(),e._assistTexture=null),e$2b(e._heightTexture)&&(e._heightTexture=e._heightTexture&&e._heightTexture.destroy(),e._heightTexture=null)}function $$d(e){if(null!==e._polygonTexture&&null!==e._assistTexture){var t=e._textureWidth,i=e._textureHeight,n=0,r=0;if(e._layer==e._scene.globe){var o=(e._bound[2]-e._bound[0])/t,a=(e._bound[3]-e._bound[1])/i,s=e._floodPosition;n=Math.floor((s.x-e._bound[0])/o),r=Math.floor((s.y-e._bound[1])/a)}else{var l=e._regionGeometry.rect,u=(o=(l.z-l.x)/t,a=(l.w-l.y)/i,s=o$1p.fromDegrees(e._floodPosition.x,e._floodPosition.y,0),new p$1d);p$1d.inverse(e._worldMatrix,u),p$1d.multiplyByPoint(u,s,s),n=Math.floor((s.x-l.x)/o),r=Math.floor((s.y-l.y)/a)}var c=new Uint8Array(t*i*4);c[4*(r*t+n)]=255,e._polygonTexture.copyFrom({width:t,height:i,arrayBufferView:c});var h=new Uint8Array(t*i*4);h[4*(r*t+n)]=255,e._assistTexture.copyFrom({width:t,height:i,arrayBufferView:h})}}function we$3(e,t,i){e._initialize||(l$h(e),e._regionGeometry=ie$3(e),ue$7(e,t),Ee$8(e,t),ne$8(e,t,e._regionGeometry,e._polygonTexture),D$e(e,e._terrainBlockURL,e._bound),e._initialize=!0),e._updateHeightTexture&&e._loaded&&null!=e._terrainBlock&&null!=e._datasetInfo&&re$6(e),e._updateFlagTexture&&te$3(e,t),e$2b(e._floodCommand)&&null!=e._terrainBlock&&null!=e._datasetInfo&&i.push(e._floodCommand)}function be$5(e,t){e._initialize||(e._initialize=!0,l$h(e),e._regionGeometry=ie$3(e),ue$7(e,t),Be$5(e),ne$8(e,t,e._regionGeometry,e._polygonTexture),D$e(e,e._terrainBlockURL,e._bound)),e._updateHeightTexture&&e._loaded&&null!=e._terrainBlock&&null!=e._datasetInfo&&re$6(e),e._updateFlagTexture&&te$3(e,t)}function l$h(e){Re$5(e);var t=e._bound[0],i=e._bound[1],n=e._bound[2],r=e._bound[3],o=o$1p.fromDegrees(.5*(n+t),.5*(r+i),0),a=new i$15(0,0,0);m$17.headingPitchRollToFixedFrame(o,a,t$13.WGS84,m$17.eastNorthUpToFixedFrame,e._worldMatrix)}function Re$5(e){if(0!==e._points.length){for(var t=Number.MAX_VALUE,i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=-Number.MAX_VALUE,o=0;o<e._points.length;o++)t=Math.min(e._points[o].x,t),i=Math.min(e._points[o].y,i),n=Math.max(e._points[o].x,n),r=Math.max(e._points[o].y,r);e._bound.length=0,e._bound.push(t),e._bound.push(i),e._bound.push(n),e._bound.push(r)}}function Ee$8(e,t){if(0!=e._points.length){var i=e._points.length,n=S$12.createTypedArray(S$12.FLOAT,3*i),r=S$12.createTypedArray(S$12.FLOAT,2*i),o=new p$1d;p$1d.inverse(e._worldMatrix,o);for(var a=[],s=0;s<e._qureyRegion.length/3;s++)a[3*s]=e._qureyRegion[3*s],a[3*s+1]=e._qureyRegion[3*s+1],a[3*s+2]=e._qureyRegion[3*s+2];var l=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(a)}}),u=z$_.createGeometry(l);f$X.updateGeometry(u,a,o),e._boundingSphere=u.boundingSphere;for(s=0;s<u.attributes.position.values.length/3;s++)n[3*s]=u.attributes.position.values[3*s],n[3*s+1]=u.attributes.position.values[3*s+1],n[3*s+2]=u.attributes.position.values[3*s+2],r[2*s]=u.attributes.st.values[2*s],r[2*s+1]=u.attributes.st.values[2*s+1];var c=null,h=ce$x.UNSIGNED_SHORT;i<65535?c=S$12.createTypedArray(S$12.UNSIGNED_SHORT,u.indices.length):(c=S$12.createTypedArray(S$12.UNSIGNED_INT,u.indices.length),h=ce$x.UNSIGNED_INT);for(s=0;s<u.indices.length;s++)c[s]=u.indices[s];Se$4(e,t,n,r,c,h)}}function Se$4(e,t,i,n,r,o){Z$e(e);var a=t$Y.createVertexBuffer({context:t,typedArray:i,usage:A$19.STATIC_DRAW}),s=t$Y.createVertexBuffer({context:t,typedArray:n,usage:A$19.STATIC_DRAW}),l=[],u={aPosition:0,aTexCoord0:1};l.push({index:u.aPosition,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),l.push({index:u.aTexCoord0,vertexBuffer:s,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var c=t$Y.createIndexBuffer({context:t,typedArray:r,usage:A$19.STATIC_DRAW,indexDatatype:o});e._floodCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!0}),e._floodCommand.vertexArray=new c$12({context:t,attributes:l,indexBuffer:c});var h=new s$U({sources:[ge$7]});e._floodCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:ce$8,attributeLocations:u}),e._floodCommand.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0}}),e._floodCommand.uniformMap={uWaterHeight:function(){return e._waterHeight},uPolygonTexture:function(){return e._polygonTexture},uReflectMap:function(){return e._frameState._framebufferList.water.renderTexture._fb.getColorTexture(0)},uNoiseMap:function(){return e._frameState._framebufferList.water._waterNormalMap}}}function D$e(e,t,i){""!=t&&4==i.length&&d$1f(t+".xml").then((function(n){var r=n.getElementsByTagName("leftBottom"),o=r[0].children[0].textContent,a=r[0].children[1].textContent,s=n.getElementsByTagName("rightTop"),l=s[0].children[0].textContent,u=s[0].children[1].textContent,c=n.getElementsByTagName("height")[0].textContent,h=n.getElementsByTagName("width")[0].textContent;e._datasetInfo={width:h,height:c,left:o,right:l,top:u,bottom:a,xRatio:(l-o)/h,yRatio:(u-a)/c};for(var d=[],f=0;f<e._datasetInfo.width;f++){for(var p=[],_=0;_<e._datasetInfo.height;_++)p.push(-99999);d.push(p)}ee$7(e,t,i,d)}))}function ee$7(e,t,i,n){u$Q(t+'/gridValues.json?bounds={"leftBottom":{"x":'+i[0]+',"y":'+i[1]+'},"rightTop":{"x":'+i[2]+',"y":'+i[3]+"}}").then((function(t){for(var i=t.values,r=0;r<i.length;r++)for(var o=i[r],a=0,s=o.length;a<s;a++){var l=o[a];n[l.column][l.row]=l.value}e._terrainBlock=n;var u=(e._floodPosition.x-e._datasetInfo.left)/e._datasetInfo.xRatio,c=(e._datasetInfo.top-e._floodPosition.y)/e._datasetInfo.yRatio;u=Math.ceil(u),c=Math.ceil(c),n[u][c]>-9e4&&(e._loaded=!0),e._updateHeightTexture=!0}),(function(r){if(400==r.statusCode)for(var o=0;o<2;o++)for(var a=(i[2]-i[0])/2,s=i[0]+a*o,l=s+a,u=0;u<2;u++){var c=(i[3]-i[1])/2,h=i[1]+c*u,d=h+c,f=[];f[0]=s,f[1]=h,f[2]=l,f[3]=d,ee$7(e,t,f,n)}}))}function te$3(e,t){if(null!=e._terrainBlock&&null!=e._datasetInfo){e._flagCommand.execute(t);var i=t.readPixels({x:0,y:0,width:e._textureWidth,height:e._textureHeight,framebuffer:e._flagCommand.framebuffer});e._assistTexture.copyFrom({width:e._textureWidth,height:e._textureHeight,arrayBufferView:i})}}function re$6(e,t){if(null!=e._terrainBlock&&null!=e._datasetInfo){var i=new Float32Array(e._textureWidth*e._textureHeight);if(e._layer==e._scene.globe)for(var n=(e._bound[2]-e._bound[0])/e._textureWidth,r=(e._bound[3]-e._bound[1])/e._textureHeight,o=0;o<e._textureWidth;o++)for(var a=e._bound[0]+n*o,s=0;s<e._textureHeight;s++){-99999!=(f=q$d(e,a,e._bound[1]+r*s))&&(i[s*e._textureWidth+o]=f,e._minHeight=Math.min(f,e._minHeight))}else{var l=e._regionGeometry.rect,u=(l.z-l.x)/e._textureWidth,c=(l.w-l.y)/e._textureHeight;for(o=0;o<e._textureWidth;o++){var h=l.x+u*o;for(s=0;s<e._textureHeight;s++){var d=new o$1p(h,l.y+c*s,0);p$1d.multiplyByPoint(e._worldMatrix,d,d);var f,p=SuperMap3D.Cartographic.fromCartesian(d);-99999!=(f=q$d(e,SuperMap3D.Math.toDegrees(p.longitude),SuperMap3D.Math.toDegrees(p.latitude)))&&(i[s*e._textureWidth+o]=f,e._minHeight=Math.min(f,e._minHeight))}}}e._heightTexture.copyFrom({width:e._textureWidth,height:e._textureHeight,arrayBufferView:i}),e._updateFlagTexture=!0,e._updateHeightTexture=!1}}function q$d(e,t,i){if(t<e._datasetInfo.left||t>e._datasetInfo.right||i<e._datasetInfo.bottom||i>e._datasetInfo.top)return-99999;var n=(t-e._datasetInfo.left)/e._datasetInfo.xRatio,r=(e._datasetInfo.top-i)/e._datasetInfo.yRatio;return n=Math.ceil(n),r=Math.ceil(r),e._terrainBlock[n][r]}function ue$7(e,t){var i=e._textureWidth,n=e._textureHeight;z$d(e),null===e._polygonTexture&&(e._polygonTexture=new t$V({context:t,width:e._textureWidth,height:e._textureHeight,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),flipY:!1})),null===e._assistTexture&&(e._assistTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),flipY:!1})),$$d(e),null===e._heightTexture&&(e._heightTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.LUMINANCE,pixelDatatype:_$$.FLOAT,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR}),flipY:!1}))}function ie$3(e,t){for(var i=[],n=0;n<e._qureyRegion.length/3;n++)i[3*n]=e._qureyRegion[3*n],i[3*n+1]=e._qureyRegion[3*n+1],i[3*n+2]=e._qureyRegion[3*n+2];var r=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),o=0,a=z$_.createGeometry(r),s=a.attributes.position.values;S$12.createTypedArray(S$12.FLOAT,s.length);var l=S$12.createTypedArray(S$12.FLOAT,s.length/3*2),u=new e$29(e._bound[0]*e$2a.RADIANS_PER_DEGREE,e._bound[1]*e$2a.RADIANS_PER_DEGREE,e._bound[2]*e$2a.RADIANS_PER_DEGREE,e._bound[3]*e$2a.RADIANS_PER_DEGREE);if(e._layer==e._scene.globe){var c=e._bound[2]-e._bound[0],h=e._bound[3]-e._bound[1];for(n=0;n<s.length;n+=3){var d=new o$1p(s[n],s[n+1],s[n+2]),f=SuperMap3D.Cartographic.fromCartesian(d),p=SuperMap3D.Math.toDegrees(f.longitude),_=SuperMap3D.Math.toDegrees(f.latitude);l[o++]=(p-e._bound[0])/c,l[o++]=(_-e._bound[1])/h}var m=new p$1d;p$1d.inverse(e._worldMatrix,m),f$X.updateGeometry(a,i,m)}else{m=new p$1d;p$1d.inverse(e._worldMatrix,m),f$X.updateGeometry(a,i,m);for(c=(u=f$X.updateGeoBounds(a)).z-u.x,h=u.w-u.y,n=0;n<s.length;n+=3)l[o++]=(s[n]-u.x)/c,l[o++]=(s[n+1]-u.y)/h}return{vertices:a.attributes.position.values,texcoords:l,indices:a.indices,rect:u}}function ne$8(e,t,i,n){if(e$2b(i)){var r=new i$_({primitiveType:W$18.TRIANGLES}),o=t$Y.createVertexBuffer({context:t,typedArray:i.vertices,usage:A$19.STATIC_DRAW}),a=t$Y.createVertexBuffer({context:t,typedArray:i.texcoords,usage:A$19.STATIC_DRAW}),s=[],l={aPosition:0,aTexCoord0:1};s.push({index:l.aPosition,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({index:l.aTexCoord0,vertexBuffer:a,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var u=t$Y.createIndexBuffer({context:t,typedArray:i.indices,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});r.vertexArray=new c$12({context:t,attributes:s,indexBuffer:u});var c=new s$U({sources:["attribute vec4 position;\nattribute vec4 aTexCoord0;\nvarying vec2 vTexCoord;\nvoid main()\n{\n vTexCoord = vec2(aTexCoord0.xy);\n vec2 vPos = aTexCoord0.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos, 0.1, 1.0);\n}\n"]}),h=new s$U({sources:[fe$4]});r.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:c,fragmentShaderSource:h,attributeLocations:l}),r.framebuffer=new t$W({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=d$1m.fromCache({cull:{enabled:!1}}),r.uniformMap={uTextureWidth:function(){return e._textureWidth},uTextureHeight:function(){return e._textureHeight},uWaterHeight:function(){return e._waterHeight},uHeightTexture:function(){return e._heightTexture},uAssisTexture:function(){return e._assistTexture}},e._flagCommand=r}}function _e$4(e){e._loaded=!1,e._initialize=!1,e._updateFlagTexture=!1,e._updateHeightTexture=!1}function Be$5(e){var t=new e$29(e._bound[0]*e$2a.RADIANS_PER_DEGREE,e._bound[1]*e$2a.RADIANS_PER_DEGREE,e._bound[2]*e$2a.RADIANS_PER_DEGREE,e._bound[3]*e$2a.RADIANS_PER_DEGREE);e._layer!==e._scene.globe&&(t=e._regionGeometry.rect),e._layer._setFloodTexture(e._polygonTexture,t,e._worldMatrix)}function Ie$4(e){e._layer._removeFloodTexture()}function g$i(){this.enabled=!0,this.density=2e-4,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}Object.defineProperties(I$d.prototype,{floodPosition:{get:function(){return this._floodPosition},set:function(e){this._floodPosition=e,this._updateFlagTexture=!0,$$d(this)}},waterHeight:{get:function(){return this._waterHeight},set:function(e){this._waterHeight=e,this._updateFlagTexture=!0,$$d(this)}},waterMode:{get:function(){return this._waterMode},set:function(e){this._waterMode=e,this._updateFlagTexture=!0}},layer:{get:function(){return this._layer},set:function(e){this._layer=e,Z$e(this),z$d(this),_e$4(this)}}}),I$d.prototype.destroy=function(){return this._scene._analyst3D.remove(this._name,!0),null!==this._scene&&this._waterMode===K$9.Clamp&&Ie$4(this),Z$e(this),z$d(this),i$10(this)},I$d.prototype.build=function(){""===this._name&&(this._name="floodAnalysis3D"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},I$d.prototype.qureyRegion=function(e){if(!e$2b(e)||!e$2b(e.position))throw new t$16("the options is required");this._qureyRegion=e.position,this._points.length=0;for(var t=this._qureyRegion.length/3,i=0;i<t;i++){var n=new o$1p(this._qureyRegion[3*i],this._qureyRegion[3*i+1],this._qureyRegion[3*i+2]);this._points.push(n)}_e$4(this)},I$d.prototype.terrainURL=function(e){this._terrainBlockURL=e},I$d.prototype.update=function(e,t,i){this._frameState=t,this._textureWidth=e.drawingBufferWidth,this._textureHeight=e.drawingBufferHeight,this._waterMode===K$9.Absolute?we$3(this,e,i):be$5(this,e)};for(var l$g=[359.393,800.749,1275.6501,2151.1192,3141.7763,4777.5198,6281.2493,12364.307,15900.765,49889.0549,78026.8259,99260.7344,120036.3873,151011.0158,156091.1953,203849.3112,274866.9803,319916.3149,493552.0528,628733.5874],t$b=[2e-5,2e-4,1e-4,7e-5,5e-5,4e-5,3e-5,19e-6,1e-5,85e-7,62e-7,58e-7,53e-7,52e-7,51e-7,42e-7,4e-6,34e-7,26e-7,22e-7],v$c=0;v$c<t$b.length;++v$c)t$b[v$c]*=1e6;for(var b$j=t$b[1],u$d=t$b[t$b.length-1],d$k=0;d$k<t$b.length;++d$k)t$b[d$k]=(t$b[d$k]-u$d)/(b$j-u$d);var r$i=0;function x$f(e){var t,i=l$g,n=i.length;if(e<i[0])return r$i=0;if(e>i[n-1])return r$i=n-2;if(e>=i[r$i]){if(r$i+1<n&&e<i[r$i+1])return r$i;if(r$i+2<n&&e<i[r$i+2])return++r$i}else if(r$i-1>=0&&e>=i[r$i-1])return--r$i;for(t=0;t<n-2&&!(e>=i[t]&&e<i[t+1]);++t);return r$i=t}var B$a=new o$1p;function i$f(e){if(!e$2b(e)||!e$2b(e.scene))throw new t$16("options.scene is required.");this._scene=e.scene,this.samplingWindow=u$_(e.samplingWindow,i$f.defaultSettings.samplingWindow),this.quietPeriod=u$_(e.quietPeriod,i$f.defaultSettings.quietPeriod),this.warmupPeriod=u$_(e.warmupPeriod,i$f.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=u$_(e.minimumFrameRateDuringWarmup,i$f.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=u$_(e.minimumFrameRateAfterWarmup,i$f.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new o$1h,this._nominalFrameRate=new o$1h,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;var t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener((function(e,i){l$f(t)})),this._hiddenPropertyName=void 0!==document.hidden?"hidden":void 0!==document.mozHidden?"mozHidden":void 0!==document.msHidden?"msHidden":void 0!==document.webkitHidden?"webkitHidden":void 0;var i=void 0!==document.hidden?"visibilitychange":void 0!==document.mozHidden?"mozvisibilitychange":void 0!==document.msHidden?"msvisibilitychange":void 0!==document.webkitHidden?"webkitvisibilitychange":void 0;function n(){o$i(t)}this._visibilityChangeRemoveListener=void 0,e$2b(i)&&(document.addEventListener(i,n,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(i,n,!1)})}function l$f(e,t){if(!(e._pauseCount>0)){var i=Et$a();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=i+e.quietPeriod/h$17.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/h$17.SECONDS_PER_MILLISECOND;else if(i>=e._quietPeriodEndTime){e._frameTimes.push(i);var n=i-e.samplingWindow/h$17.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=n){for(;e._frameTimes.length>=2&&e._frameTimes[1]<n;)e._frameTimes.shift();var r=(i-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/r,r>1e3/(i>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup)?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}}function o$i(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}function h$f(e,t,i){this.context=e,this.commandList=[],this.commandListRealtimeRaster=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=C$13.SCENE3D,this.morphTime=C$13.getMorphTime(C$13.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=i,this.mapProjection=void 0,this.camera=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,depth:!1,postProcess:!1,offscreen:!1,asynchronous:!1,fbo:!1,normal:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,density:void 0,sse:void 0,minimumBrightness:void 0},this.terrainExaggeration=1,this._framebufferList=[],this.shadowState={shadowsEnabled:!0,lightShadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.imagerySplitPosition=new o$1o,this.globeSplitPosition=new o$1o,this.frustumSplits=[],this.backgroundColor=void 0,this.sunColor=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this._fboState={name:"normal",enabled:!1,frameBufferType:Qe$c.NORMAL},this.useType=0,this.frustumIndex=0,this.multiViewportIndex=-1,this.globeBottomLevel=0,this.minTerrainHeight=0,this.maxTerrainHeight=0,this.TAAEnable=!1,this.rasterLineWidth=1,this.pickIDColor=new e$1U,this.tilesetPassState=void 0,this.requests=[],this.rasterPerFrame=!1,this.pbrMaterialsArr=[]}function i$e(e,t){this.near=u$_(e,0),this.far=u$_(t,0);for(var i=Le$s.NUMBER_OF_PASSES,n=new Array(i),r=new Array(i),o=0;o<i;++o)n[o]=[],r[o]=0;this.commands=n,this.indices=r}g$i.prototype.update=function(e){if(e.fog.enabled=this.enabled){var t=e.camera,i=t.positionCartographic;if(e.context.webgpu){if(e.mode!==C$13.SCENE3D)return void(e.fog.enabled=!1)}else if(!e$2b(i)||i.height>8e5||e.mode!==C$13.SCENE3D)return void(e.fog.enabled=!1);var n=i.height,r=x$f(n),o=e$2a.clamp((n-l$g[r])/(l$g[r+1]-l$g[r]),0,1),a=e$2a.lerp(t$b[r],t$b[r+1],o),s=1e6*this.density;a=a*(s-s/b$j*u$d)*1e-6;var l=o$1p.normalize(t.positionWC,B$a);a*=1-Math.abs(o$1p.dot(t.directionWC,l)),e.fog.density=a,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness}},i$f.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8},i$f.fromScene=function(e){if(!e$2b(e))throw new t$16("scene is required.");return(!e$2b(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new i$f({scene:e})),e._frameRateMonitor},Object.defineProperties(i$f.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}}),i$f.prototype.pause=function(){++this._pauseCount,1===this._pauseCount&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)},i$f.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)},i$f.prototype.isDestroyed=function(){return!1},i$f.prototype.destroy=function(){return this._preUpdateRemoveListener(),e$2b(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),i$10(this)};var De$6="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\nuniform vec4 u_initialColor;\nuniform float uParentMixDirection;\nuniform vec3 u_sunLightColor;\nuniform vec3 u_ambientLightColor;\n\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\n#ifdef WEBGPU\nuniform TileUBO {\n uniform mat4 u_modifiedModelView;\n uniform mat4 u_modifiedModelViewProjection;\n uniform vec4 u_dayTextureTranslationAndScale[16];\n uniform vec4 u_dayTextureSize[16];\n uniform vec4 u_dayTextureTexCoordsRectangle[16];\n uniform bool u_dayTextureUseWebMercatorT[16];\n uniform bool u_dayTextureFlipY[16];\n uniform vec4 u_normalTextureTranslationAndScale;\n uniform vec4 uTileBounds;\n uniform vec4 u_tileRectangle;\n uniform vec3 u_center3D;\n uniform vec2 u_southAndNorthLatitude;\n uniform vec2 u_southMercatorYAndOneOverHeight;\n uniform float u_useNormalTexture;\n};\n#else\n uniform vec4 uTileBounds;\n #if TEXTURE_UNITS > 0\n uniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\n uniform vec4 u_dayTextureSize[TEXTURE_UNITS];\n uniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n uniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\n uniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n #endif\n uniform vec4 u_normalTextureTranslationAndScale;\n uniform float u_useNormalTexture;\n#endif\n\n#if GRIDTEXTURE_UNITS > 0\nuniform sampler2D u_gridTextures[GRIDTEXTURE_UNITS];\nuniform bool u_gridTextureUseWebMercatorT[GRIDTEXTURE_UNITS];\nuniform vec4 u_gridTextureTexCoordsRectangle[GRIDTEXTURE_UNITS];\n#endif\n#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\n#endif\n\n#ifdef SHOW_OCEAN_WAVES\nuniform sampler2D u_oceanNormalMap;\n#endif\n\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nuniform vec2 u_lightingFadeDistance;\n#endif\n\n#ifdef TILE_LIMIT_RECTANGLE\nuniform vec4 u_cartographicLimitRectangle;\n#endif\n\n#ifdef GROUND_ATMOSPHERE\nuniform vec2 u_nightFadeDistance;\n#endif\n\n#ifdef TRANSLUCENT\nuniform vec4 u_frontFaceAlphaByDistance;\nuniform vec4 u_backFaceAlphaByDistance;\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\nuniform sampler2D u_clippingPlanes;\nuniform mat4 u_clippingPlanesMatrix;\nuniform vec4 u_clippingPlanesEdgeStyle;\n#endif\n\n#if defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nuniform float u_minimumBrightness;\n#endif\n\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift; // Hue, saturation, brightness\n#endif\n\nuniform sampler2D u_normalTexture;\nvarying vec3 vertNorm;\n\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n#include <globeOcean>\n#endif\n\n#ifdef APPLY_MATERIAL\nvarying float v_height;\nvarying float v_slope;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nvarying float v_distance;\nvarying vec3 v_fogRayleighColor;\nvarying vec3 v_fogMieColor;\n#endif\n\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nfloat interpolateByDistance(vec4 nearFarScalar, float distance)\n{\n float startDistance = nearFarScalar.x;\n float startValue = nearFarScalar.y;\n float endDistance = nearFarScalar.z;\n float endValue = nearFarScalar.w;\n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\n return mix(startValue, endValue, t);\n}\n#endif\n\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)\n{\n return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\n}\n#endif\n\nvarying float v_height2;\n#if defined(Excavate_Region) || defined(Excavate_Outer) || defined(Apply_ImageryClip) || (defined(SLOPE_ANALYSIS) && defined(SlopeRegion)) || defined(HYPSOMETRIC_REGION)\nuniform sampler2D uModifyRasterTexture;\n#endif\n\n#include <globeAnalysis>\n\nvec3 colorCorrect(vec3 rgb) {\n#ifdef COLOR_CORRECT\n // Convert rgb color to hsb\n vec3 hsb = czm_RGBToHSB(rgb);\n // Perform hsb shift\n hsb.x += u_hsbShift.x; // hue\n hsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0); // saturation\n hsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0; // brightness\n // Convert shifted hsb back to rgb\n rgb = czm_HSBToRGB(hsb);\n#endif\n return rgb;\n}\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);\n\nvec4 sRGBToLinear( in vec4 value ) {\n#ifndef HDR\n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n#else\n return value;\n#endif\n}\nvec4 LinearTosRGB( in vec4 value ) {\n#ifndef HDR\n return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n#else\n return value;\n#endif\n}\n\nvec3 getNormalFromNormalTexture(){\n vec2 normalTextureTranslation = u_normalTextureTranslationAndScale.xy;\n vec2 normalTextureScale = u_normalTextureTranslationAndScale.zw;\n vec2 normalTextureCoordinates = v_textureCoordinates.xy * normalTextureScale + normalTextureTranslation;\n vec3 normalTC = texture2D(u_normalTexture, normalTextureCoordinates.xy).xyz;\n normalTC = (normalTC - 0.5) * 2.0;\n return normalTC;\n}\n\nvec3 tranformNormalFromTagentToEC(vec3 normalInTagent){\n vec3 zAxis = normalize(vertNorm);\n vec3 xAxis = normalize(vec3(-vertNorm.y, vertNorm.x, 0));\n vec3 yAxis = normalize(cross(zAxis, xAxis));\n mat3 matrix = mat3(xAxis, yAxis, zAxis);\n return czm_normal3D * matrix * normalInTagent;\n}\n\nvec4 lightShading(vec3 normalEC, vec4 color){\n float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_sunDirectionEC, normalize(normalEC)) * 0.9 + 0.3, 0.0, 1.0);\n return vec4(color.rgb * u_sunLightColor.rgb * diffuseIntensity + u_ambientLightColor.rgb * 0.25, color.a);\n}\n\nvoid main()\n{\n#ifdef APPLY_GLOBESPLIT\n vec2 splitPosition = czm_globeSplitPosition;\n if (u_GlobeSplitDirection.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\n discard;\n }\n else if (u_GlobeSplitDirection.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\n discard;\n }\n if(u_GlobeSplitDirection.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\n discard;\n }\n else if(u_GlobeSplitDirection.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\n discard;\n }\n#endif\n\n#ifdef APPLY_GLOBESWIPE\n if (gl_FragCoord.x < u_GlobeSwipeRegion.x || gl_FragCoord.y > u_GlobeSwipeRegion.y) {\n discard;\n }\n else if (gl_FragCoord.x > u_GlobeSwipeRegion.z || gl_FragCoord.y < u_GlobeSwipeRegion.w) {\n discard;\n }\n#endif\n\n#ifdef Excavate_Region\n if(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w > 0.5)\n {\n discard;\n }\n#endif\n\n#ifdef Excavate_Outer\n if(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n {\n discard;\n }\n#endif\n\n#ifdef TILE_LIMIT_RECTANGLE\n if (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||\n v_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)\n {\n discard;\n }\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\n float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);\n#endif\n\n // The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0\n // where the fragment shader sees textures coordinates < 0.0 and > 1.0 for the\n // fragments on the edges of tiles even though the vertex shader is outputting\n // coordinates strictly in the 0-1 range.\n vec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0));\n\n#ifdef SHOW_TILE_BOUNDARIES\n if (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||\n v_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))\n {\n color = vec4(1.0, 0.0, 0.0, 1.0);\n }\n#endif\n\n#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)\n vec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)); // normalized surface normal in model coordinates\n vec3 normalEC = czm_normal3D * normalMC; // normalized surface normal in eye coordiantes\n#endif\n\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\n float cameraDist;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n cameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;\n }\n else if (czm_sceneMode == czm_sceneModeColumbusView)\n {\n cameraDist = -czm_view[3].z;\n }\n else\n {\n cameraDist = length(czm_view[3]);\n }\n float fadeOutDist = u_lightingFadeDistance.x;\n float fadeInDist = u_lightingFadeDistance.y;\n if (czm_sceneMode != czm_sceneMode3D) {\n vec3 radii = czm_getWgs84EllipsoidEC().radii;\n float maxRadii = max(radii.x, max(radii.y, radii.z));\n fadeOutDist -= maxRadii;\n fadeInDist -= maxRadii;\n }\n float fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#else\n float fade = 0.0;\n#endif\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n color = getOceanColor(color, v_positionEC, v_positionMC, normalEC, normalMC, fade);\n#endif\n\n#ifdef APPLY_MATERIAL\n czm_materialInput materialInput;\n materialInput.st = v_textureCoordinates.st;\n materialInput.normalEC = normalize(v_normalEC);\n materialInput.slope = v_slope;\n materialInput.height = v_height;\n czm_material material = czm_getMaterial(materialInput);\n color.xyz = mix(color.xyz, material.diffuse, material.alpha);\n#endif\n\n vec3 realNormal = vec3(0.0, 0.0, 1.0);\n if(u_useNormalTexture > 0.5) {\n realNormal = getNormalFromNormalTexture();\n }\n\n#ifdef ENABLE_LIGHTING\n vec4 finalColor;\n vec3 lightingNormalEC;\n #ifdef ENABLE_VERTEX_LIGHTING\n lightingNormalEC = v_normalEC;\n #else\n if(u_useNormalTexture > 0.5) {\n lightingNormalEC = tranformNormalFromTagentToEC(realNormal);\n }\n else {\n lightingNormalEC = normalEC;\n }\n #endif\n finalColor = lightShading(lightingNormalEC, color);\n#else\n vec4 finalColor = color;\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\n vec4 clippingPlanesEdgeColor = vec4(1.0);\n clippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;\n float clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;\n\n if (clipDistance < clippingPlanesEdgeWidth)\n {\n finalColor = clippingPlanesEdgeColor;\n }\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\n vec3 fogColor = colorCorrect(v_fogMieColor) + finalColor.rgb * colorCorrect(v_fogRayleighColor);\n#ifndef HDR\n const float fExposure = 2.0;\n fogColor = vec3(1.0) - exp(-fExposure * fogColor);\n#endif\n#endif\n\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)\n vec3 atmosphereLightDirection = czm_sunDirectionWC;\n#else\n vec3 atmosphereLightDirection = czm_lightDirectionWC;\n#endif\n\n#ifdef FOG\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\n float darken = clamp(dot(normalize(czm_viewerPositionECEF), atmosphereLightDirection), u_minimumBrightness, 1.0);\n fogColor *= darken;\n#endif\n\n#ifdef HDR\n const float modifier = 0.15;\n finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor, modifier), finalColor.a);\n#else\n finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor), finalColor.a);\n#endif\n#endif\n\n#ifdef HYPSOMETRIC_ANALYSIS\n finalColor = getHypsometricAnalysisColor(finalColor, v_textureCoordinates.xy);\n#endif\n\n#ifdef SLOPE_ANALYSIS\n finalColor = getSlopeAnalysisColor(finalColor, v_textureCoordinates.xy, realNormal);\n#endif\n\n#ifdef GROUND_ATMOSPHERE\n if (czm_sceneMode != czm_sceneMode3D)\n {\n gl_FragColor = finalColor;\n #ifdef Height_Map\n gl_FragColor = czm_packValue(v_height2);\n #endif\n return;\n }\n\n#if defined(PER_FRAGMENT_GROUND_ATMOSPHERE) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))\n float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);\n vec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);\n xy *= czm_viewport.zw * mpp * 0.5;\n\n vec3 direction = normalize(vec3(xy, -czm_currentFrustum.x));\n czm_ray ray = czm_ray(vec3(0.0), direction);\n\n vec3 ellipsoid_center = czm_view[3].xyz;\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\n\n vec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);\n ellipsoidPosition = (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;\n AtmosphereColor atmosColor = computeGroundAtmosphereFromSpace(ellipsoidPosition, true, atmosphereLightDirection);\n\n vec3 groundAtmosphereColor = colorCorrect(atmosColor.mie) + finalColor.rgb * colorCorrect(atmosColor.rayleigh);\n#ifndef HDR\n groundAtmosphereColor = vec3(1.0) - exp(-fExposure * groundAtmosphereColor);\n#endif\n\n fadeInDist = u_nightFadeDistance.x;\n fadeOutDist = u_nightFadeDistance.y;\n\n float sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n\n#ifdef HDR\n // Some tweaking to make HDR look better\n sunlitAtmosphereIntensity = max(sunlitAtmosphereIntensity * sunlitAtmosphereIntensity, 0.03);\n#endif\n\n groundAtmosphereColor = mix(groundAtmosphereColor, fogColor, sunlitAtmosphereIntensity);\n#else\n vec3 groundAtmosphereColor = fogColor;\n#endif\n\n#ifdef HDR\n // Some tweaking to make HDR look better\n groundAtmosphereColor = czm_saturation(groundAtmosphereColor, 1.6);\n#endif\n\n finalColor = vec4(mix(finalColor.rgb, groundAtmosphereColor, fade), finalColor.a);\n#endif\n\n#ifdef TRANSLUCENT\n vec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;\n finalColor.a *= interpolateByDistance(alphaByDistance, v_distance);\n#endif\n\n if (finalColor.a == 0.0) {\n discard;\n }\n gl_FragColor = finalColor;\n#ifdef Height_Map\n\tgl_FragColor = czm_packValue(v_height2);\n#endif\n#ifdef FLOOD_ANALYSIS\n gl_FragColor = getFloodAnalysisColor(gl_FragColor, v_textureCoordinates);\n#endif\n}\n",Ne$5="#ifdef QUANTIZATION_BITS12\nattribute vec4 compressed0;\nattribute float compressed1;\n#else\nattribute vec4 position3DAndHeight;\nattribute vec4 textureCoordAndEncodedNormals;\n\n#ifdef WEBGPU\nuniform TileUBO {\n uniform mat4 u_modifiedModelView;\n uniform mat4 u_modifiedModelViewProjection;\n uniform vec4 u_dayTextureTranslationAndScale[16];\n uniform vec4 u_dayTextureSize[16];\n uniform vec4 u_dayTextureTexCoordsRectangle[16];\n uniform bool u_dayTextureUseWebMercatorT[16];\n uniform bool u_dayTextureFlipY[16];\n uniform vec4 u_normalTextureTranslationAndScale;\n uniform vec4 uTileBounds;\n uniform vec4 u_tileRectangle;\n uniform vec3 u_center3D;\n uniform vec2 u_southAndNorthLatitude;\n uniform vec2 u_southMercatorYAndOneOverHeight;\n uniform float u_useNormalTexture;\n};\n#else\n uniform vec3 u_center3D;\n uniform mat4 u_modifiedModelView;\n uniform mat4 u_modifiedModelViewProjection;\n uniform vec4 u_normalTextureTranslationAndScale;\n uniform float u_useNormalTexture;\n uniform vec4 u_tileRectangle;\n // Uniforms for 2D Mercator projection\n uniform vec2 u_southAndNorthLatitude;\n uniform vec2 u_southMercatorYAndOneOverHeight;\n#endif\n\n#endif\n\nvarying float v_height2;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\n\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n\n#ifdef APPLY_MATERIAL\nvarying float v_slope;\nvarying float v_height;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(TRANSLUCENT)\nvarying float v_distance;\nvarying vec3 v_fogMieColor;\nvarying vec3 v_fogRayleighColor;\n#endif\n\nvarying vec3 vertNorm;\n\n#ifdef BRDF\n uniform sampler2D u_normalTexture;\n#endif\n\n#ifdef SLOPE_ANALYSIS\nuniform float uTopLevel;\nuniform float uLevel;\nvarying vec2 texCoordRotate;\n#endif\n\n#ifdef APPLY_MODIFY\nuniform sampler2D uModifyRasterTexture;\n#endif\n\nvarying vec4 clip_vertex;\n\n// These functions are generated at runtime.\nvec4 getPosition(vec3 position, float height, vec2 textureCoordinates);\nfloat get2DYPositionFraction(vec2 textureCoordinates);\n\nvec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return u_modifiedModelViewProjection * vec4(position, 1.0);\n}\n\nfloat get2DMercatorYPositionFraction(vec2 textureCoordinates)\n{\n // The width of a tile at level 11, in radians and assuming a single root tile, is\n // 2.0 * czm_pi / pow(2.0, 11.0)\n // We want to just linearly interpolate the 2D position from the texture coordinates\n // when we're at this level or higher. The constant below is the expression\n // above evaluated and then rounded up at the 4th significant digit.\n const float maxTileWidth = 0.003068;\n float positionFraction = textureCoordinates.y;\n float southLatitude = u_southAndNorthLatitude.x;\n float northLatitude = u_southAndNorthLatitude.y;\n if (northLatitude - southLatitude > maxTileWidth)\n {\n float southMercatorY = u_southMercatorYAndOneOverHeight.x;\n float oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;\n\n float currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);\n currentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);\n positionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);\n }\n return positionFraction;\n}\n\nfloat get2DGeographicYPositionFraction(vec2 textureCoordinates)\n{\n return textureCoordinates.y;\n}\n\nvec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)\n{\n float yPositionFraction = get2DYPositionFraction(textureCoordinates);\n vec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\n return u_modifiedModelViewProjection * rtcPosition2D;\n}\n\nvec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return getPositionPlanarEarth(position, 0.0, textureCoordinates);\n}\n\nvec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return getPositionPlanarEarth(position, height, textureCoordinates);\n}\n\nvec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)\n{\n // We do not do RTC while morphing, so there is potential for jitter.\n // This is unlikely to be noticeable, though.\n vec3 position3DWC = position + u_center3D;\n float yPositionFraction = get2DYPositionFraction(textureCoordinates);\n vec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\n vec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);\n return czm_modelViewProjection * morphPosition;\n}\n\n#ifdef QUANTIZATION_BITS12\nuniform vec2 u_minMaxHeight;\nuniform mat4 u_scaleAndBias;\n#endif\n\nvoid main()\n{\n#ifdef QUANTIZATION_BITS12\n vec2 xy = czm_decompressTextureCoordinates(compressed0.x);\n vec2 zh = czm_decompressTextureCoordinates(compressed0.y);\n vec3 position = vec3(xy, zh.x);\n float height = zh.y;\n vec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);\n\n height = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;\n v_height2 = height;\n position = (u_scaleAndBias * vec4(position, 1.0)).xyz;\n\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\n float encodedNormal = compressed1;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\n float encodedNormal = 0.0;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = compressed0.w;\n#else\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = 0.0;\n#endif\n\n#else\n // A single float per element\n vec3 position = position3DAndHeight.xyz;\n float height = position3DAndHeight.w;\n v_height2 = height;\n vec2 textureCoordinates = textureCoordAndEncodedNormals.xy;\n\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = textureCoordAndEncodedNormals.z;\n float encodedNormal = textureCoordAndEncodedNormals.w;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = textureCoordAndEncodedNormals.z;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = textureCoordAndEncodedNormals.z;\n float encodedNormal = 0.0;\n#else\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = 0.0;\n#endif\n\n#endif\n\n vec3 position3DWC = position + u_center3D;\n gl_Position = getPosition(position, height, textureCoordinates);\n#ifdef APPLY_MODIFY\n vec4 packHeight = texture2D(uModifyRasterTexture, textureCoordinates);\n if(packHeight.w > 0.5)\n {\n vec3 modifyPosition = normalize(position3DWC);\n gl_Position = getPosition(modifyPosition - u_center3D, height, textureCoordinates);\n }\n#endif\n #ifdef WEBGPU\n // 因为globeVS中的main函数不是代码文本中最后一个函数,所以引擎处理时追加的yFactor__不起作用\n gl_Position.y *= yFactor__;\n #endif\n\n v_textureCoordinates = vec3(textureCoordinates, webMercatorT);\n\n#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\n v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\n v_positionMC = position3DWC; // position in model coordinates\n vec3 normalMC = czm_octDecode(encodedNormal);\n v_normalMC = normalMC;\n v_normalEC = czm_normal3D * v_normalMC;\n#elif defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(GENERATE_POSITION) || defined(HDR)\n v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\n v_positionMC = position3DWC; // position in model coordinates\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(TRANSLUCENT)\n AtmosphereColor atmosFogColor = computeGroundAtmosphereFromSpace(position3DWC, false, vec3(0.0));\n v_fogMieColor = atmosFogColor.mie;\n v_fogRayleighColor = atmosFogColor.rayleigh;\n v_distance = length((czm_modelView3D * vec4(position3DWC - czm_relativeOrigin, 1.0)).xyz);\n#endif\n#ifdef APPLY_MATERIAL\n vec3 finalNormal = normalMC;\n vec3 ellipsoidNormal = normalize(position3DWC.xyz);\n v_slope = abs(dot(ellipsoidNormal, finalNormal));\n v_height = height;\n#endif\n clip_vertex = czm_inverseProjection * gl_Position;\n\n if(u_useNormalTexture > 0.5){\n v_positionEC = (u_modifiedModelView * vec4(position.xyz, 1.0)).xyz;\n vertNorm = normalize(position3DWC);\n #ifdef BRDF\n vec2 normalTextureTranslation = u_normalTextureTranslationAndScale.xy;\n vec2 normalTextureScale = u_normalTextureTranslationAndScale.zw;\n vec2 normalTextureCoordinates = v_textureCoordinates.xy * normalTextureScale + normalTextureTranslation;\n vec3 realNormal = texture2D(u_normalTexture, normalTextureCoordinates.xy).xyz;\n realNormal = (realNormal - 0.5) * 2.0;\n vec3 zAxis = normalize(vertNorm);\n vec3 xAxis = normalize(vec3(-vertNorm.y, vertNorm.x, 0));\n vec3 yAxis = normalize(cross(zAxis, xAxis));\n mat3 matrix = mat3(xAxis, yAxis, zAxis);\n vec3 vNormal = czm_normal3D * matrix * realNormal;\n v_normalEC = normalize(vNormal);\n #endif\n }\n\n#ifdef SLOPE_ANALYSIS\n float levelSpan = min(uLevel - uTopLevel, 2.0);\n float arrowTextureScale = pow(2.0,levelSpan);\n texCoordRotate = v_textureCoordinates.xy * arrowTextureScale;\n#endif\n}\n",le$9="/*!\n * Atmosphere code:\n *\n * Copyright (c) 2000-2005, Sean O'Neil \n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n * * Neither the name of the project nor the names of its contributors may be\n * used to endorse or promote products derived from this software without\n * specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Modifications made by Analytical Graphics, Inc.\n */\n\n // Atmosphere:\n // Code: \n // GPU Gems 2 Article: \n\nconst float fInnerRadius = 6378137.0;\nconst float fOuterRadius = 6378137.0 * 1.025;\nconst float fOuterRadius2 = fOuterRadius * fOuterRadius;\n\nconst float Kr = 0.0025;\nconst float Km = 0.0015;\nconst float ESun = 15.0;\n\nconst float fKrESun = Kr * ESun;\nconst float fKmESun = Km * ESun;\nconst float fKr4PI = Kr * 4.0 * czm_pi;\nconst float fKm4PI = Km * 4.0 * czm_pi;\n\nconst float fScale = 1.0 / (fOuterRadius - fInnerRadius);\nconst float fScaleDepth = 0.25;\nconst float fScaleOverScaleDepth = fScale / fScaleDepth;\n\nstruct AtmosphereColor\n{\n vec3 mie;\n vec3 rayleigh;\n};\n\nconst int nSamples = 2;\nconst float fSamples = 2.0;\n\nfloat scale(float fCos)\n{\n float x = 1.0 - fCos;\n return fScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\n\nAtmosphereColor computeGroundAtmosphereFromSpace(vec3 v3Pos, bool dynamicLighting, vec3 lightDirectionWC)\n{\n\tvec3 v3InvWavelength = vec3(1.0 / pow(0.650, 4.0), 1.0 / pow(0.570, 4.0), 1.0 / pow(0.475, 4.0));\n\n // Get the ray from the camera to the vertex and its length (which is the far point of the ray passing through the atmosphere)\n vec3 v3Ray = v3Pos - czm_viewerPositionECEF;\n float fFar = length(v3Ray);\n v3Ray /= fFar;\n\n float fCameraHeight = length(czm_viewerPositionECEF);\n float fCameraHeight2 = fCameraHeight * fCameraHeight;\n\n // This next line is an ANGLE workaround. It is equivalent to B = 2.0 * dot(czm_viewerPositionECEF, v3Ray),\n // which is what it should be, but there are problems at the poles.\n float B = 2.0 * length(czm_viewerPositionECEF) * dot(normalize(czm_viewerPositionECEF), v3Ray);\n float C = fCameraHeight2 - fOuterRadius2;\n float fDet = max(0.0, B*B - 4.0 * C);\n float fNear = 0.5 * (-B - sqrt(fDet));\n\n // Calculate the ray's starting position, then calculate its scattering offset\n vec3 v3Start = czm_viewerPositionECEF + v3Ray * fNear;\n fFar -= fNear;\n float fDepth = exp((fInnerRadius - fOuterRadius) / fScaleDepth);\n\n // The light angle based on the scene's light source would be:\n // dot(lightDirectionWC, v3Pos) / length(v3Pos);\n // When we want the atmosphere to be uniform over the globe so it is set to 1.0.\n\n float fLightAngle = czm_branchFreeTernary(dynamicLighting, dot(lightDirectionWC, v3Pos) / length(v3Pos), 1.0);\n float fCameraAngle = dot(-v3Ray, v3Pos) / length(v3Pos);\n float fCameraScale = scale(fCameraAngle);\n float fLightScale = scale(fLightAngle);\n float fCameraOffset = fDepth*fCameraScale;\n float fTemp = (fLightScale + fCameraScale);\n\n // Initialize the scattering loop variables\n float fSampleLength = fFar / fSamples;\n float fScaledLength = fSampleLength * fScale;\n vec3 v3SampleRay = v3Ray * fSampleLength;\n vec3 v3SamplePoint = v3Start + v3SampleRay * 0.5;\n\n // Now loop through the sample rays\n vec3 v3FrontColor = vec3(0.0);\n vec3 v3Attenuate = vec3(0.0);\n for(int i=0; i<nSamples; i++)\n {\n float fHeight = length(v3SamplePoint);\n float fDepth = exp(fScaleOverScaleDepth * (fInnerRadius - fHeight));\n float fScatter = fDepth*fTemp - fCameraOffset;\n v3Attenuate = exp(-fScatter * (v3InvWavelength * fKr4PI + fKm4PI));\n v3FrontColor += v3Attenuate * (fDepth * fScaledLength);\n v3SamplePoint += v3SampleRay;\n }\n\n AtmosphereColor color;\n color.mie = v3FrontColor * (v3InvWavelength * fKrESun + fKmESun);\n color.rayleigh = v3Attenuate; // Calculate the attenuation factor for the ground\n\n return color;\n}\n\n";function Ee$7(e,t,i,n,r,o,a,s){this.numberOfDayTextures=e,this.flags=t,this.material=i,this.shaderProgram=n,this.clippingShaderState=r,this.mvtTextureObj=o,this.numberOfGridTextures=a,this.gridUpdate=s}function H$j(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function Pe$4(e){var t;switch(e){case C$13.SCENE3D:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }";break;case C$13.SCENE2D:case C$13.COLUMBUS_VIEW:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }";break;case C$13.MORPHING:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }"}return t}function Le$6(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}function he$6(e,t){if(!e$2b(e)||!e$2b(t))return!1;if(e===t)return!0;if(e.length!=t.length)return!1;for(var i=e.length,n=0;n<i;n++)if(e[n].textureIndex!==t[n].textureIndex||e[n].selectColor!==t[n].selectColor)return!1;return!0}H$j.prototype.getShaderProgram=function(e){var t=e.frameState,i=e.surfaceTile,n=e.numberOfDayTextures,r=e.applyBrightness,o=e.applyContrast,a=e.applyHue,s=e.applySaturation,l=e.applyGamma,u=e.applyAlpha,c=e.applySplit,h=e.applySwipe,d=e.applyGlobeSwipe,f=e.showReflectiveOcean,p=e.showOceanWaves,_=e.enableLighting,m=e.dynamicAtmosphereLighting,g=e.dynamicAtmosphereLightingFromSun,x=e.showGroundAtmosphere,v=e.perFragmentGroundAtmosphere,y=e.hasVertexNormals,$=e.hasRoughness,b=e.useWebMercatorProjection,T=e.enableFog,C=e.enableClippingPlanes,S=e.clippingPlanes,w=e.clippedByBoundaries,E=e.hasImageryLayerCutout,P=e.colorCorrect,A=e.isHeight,L=e.isColor,M=e.hasNormalMap,R=e.hasHypsometricSetting,I=e.hasFlood,O=e.hasSlopeAnalysis,D=e.applyGlobeSplit;e.highlightFillTile,e.colorToAlpha;var B=e.mvtTextureObj,N=e.numberOfGridTextures,F=e.gridUpdate,U=e.applyPolygonOffset,z=e.applyModify,G=e.applyExtract,V=e.excavationRegion,k=e.excavationOuter,W=e.applyImageryClip,H=e.hasHypsometricRegion,q=e.applySlopeRegion;const j=e.translucent;var Y=0,X="",K=i.renderedMesh.encoding;K.quantization===me$p.BITS12&&(Y=1,X="QUANTIZATION_BITS12");var Q=0;e$2b(i.terrainData)&&i.terrainData._createdByUpsampling&&(Q=1);var Z=0,J="";w&&(Z=1,J="TILE_LIMIT_RECTANGLE");var ee=0,te="";E&&(ee=1,te="APPLY_IMAGERY_CUTOUT");var ie=t.mode,ne=ie|r<<2|o<<3|a<<4|s<<5|l<<6|u<<7|f<<8|p<<9|_<<10|x<<11|v<<12|y<<13|b<<14|T<<15|Y<<16|c<<17|C<<18|Q<<19|Z<<20|ee<<21|P<<22|A<<23|L<<24|M<<25|O<<26|D<<27|z<<28|V<<29|k<<30|$<<31;ne=ne+"_"+(D|R<<1|h<<2|d<<3|U<<4|I<<5|W<<6|H<<7|q<<8|j<<9);var re=0;e$2b(S)&&S.length>0&&(re=C?S.clippingPlanesState:0);var oe=i.surfaceShader;if(e$2b(oe)&&oe.numberOfDayTextures===n&&oe.flags===ne&&oe.material===this.material&&oe.clippingShaderState===re&&he$6(oe.mvtTextureObj,B)&&oe.numberOfGridTextures===N&&oe.gridUpdate===F)return oe.shaderProgram;var ae=this._shadersByTexturesFlags[n+N];if(e$2b(ae)||(ae=this._shadersByTexturesFlags[n+N]={}),!e$2b(oe=ae[ne])||oe.material!==this.material||oe.clippingShaderState!==re||!he$6(oe.mvtTextureObj,B)||F||oe.numberOfGridTextures!=N){var se=this.baseVertexShaderSource.clone(),le=this.baseFragmentShaderSource.clone();0!==re&&le.sources.unshift(f$G(S,t.context)),se.defines.push(X,""),le.defines.push("TEXTURE_UNITS "+n,J,te),le.defines.push("GRIDTEXTURE_UNITS "+N,J,te),r&&le.defines.push("APPLY_BRIGHTNESS"),o&&le.defines.push("APPLY_CONTRAST"),a&&le.defines.push("APPLY_HUE"),s&&le.defines.push("APPLY_SATURATION"),l&&le.defines.push("APPLY_GAMMA"),u&&le.defines.push("APPLY_ALPHA"),f&&(le.defines.push("SHOW_REFLECTIVE_OCEAN"),se.defines.push("SHOW_REFLECTIVE_OCEAN")),p&&le.defines.push("SHOW_OCEAN_WAVES"),U&&le.defines.push("POLYGON_OFFSET"),_&&(se.defines.push("ENABLE_LIGHTING"),le.defines.push("ENABLE_LIGHTING"),y?(se.defines.push("ENABLE_VERTEX_LIGHTING"),le.defines.push("ENABLE_VERTEX_LIGHTING")):(se.defines.push("ENABLE_DAYNIGHT_SHADING"),le.defines.push("ENABLE_DAYNIGHT_SHADING"))),($&&M||_&&y)&&(se.defines.push(Y$H.BRDF),le.defines.push(Y$H.BRDF),e$2b(t.specularEnvironmentMaps)&&le.defines.push(Y$H.IBL)),m&&(le.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),g&&le.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN")),x&&(se.defines.push("GROUND_ATMOSPHERE"),le.defines.push("GROUND_ATMOSPHERE"),!t.context.webgpu&&v&&le.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE")),se.defines.push("INCLUDE_WEB_MERCATOR_Y"),le.defines.push("INCLUDE_WEB_MERCATOR_Y"),T&&(se.defines.push("FOG"),le.defines.push("FOG")),c&&le.defines.push("APPLY_SPLIT"),h&&le.defines.push("APPLY_SWIPE"),D&&le.defines.push("APPLY_GLOBESPLIT"),d&&le.defines.push("APPLY_GLOBESWIPE"),C&&le.defines.push("ENABLE_CLIPPING_PLANES"),P&&le.defines.push("COLOR_CORRECT"),A&&(se.defines.push("Height_Map"),le.defines.push("Height_Map")),L&&se.defines.push("Color_Map"),z&&!G&&se.defines.push("APPLY_MODIFY"),V&&le.defines.push("Excavate_Region"),k&&le.defines.push("Excavate_Outer"),W&&le.defines.push("Apply_ImageryClip"),R&&le.defines.push("HYPSOMETRIC_ANALYSIS"),H&&le.defines.push("HYPSOMETRIC_REGION"),I&&(le.defines.push("FLOOD_ANALYSIS"),se.defines.push("FLOOD_ANALYSIS")),O&&M&&(le.defines.push("SLOPE_ANALYSIS"),se.defines.push("SLOPE_ANALYSIS")),O&&q&&M&&le.defines.push("SlopeRegion"),j&&(se.defines.push("TRANSLUCENT"),le.defines.push("TRANSLUCENT"));var ue="vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\n vec4 color = initialColor;\n";ue+=" vec2 realTextureCoord;\n vec4 currentTextureColor;\n",E&&(ue+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(var ce=0;ce<n;++ce)ue+="realTextureCoord = computeTextureCoord(\n",ue+="u_dayTextureUseWebMercatorT["+ce+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTranslationAndScale["+ce+"],\nu_dayTextureSize["+ce+"],\nu_dayTextureFlipY["+ce+"]);\ncurrentTextureColor = texture2D(u_dayTextures["+ce+"], realTextureCoord);\n\n",ue+=E?"cutoutAndColorResult = u_dayTextureCutoutRectangles["+ce+"];\ntexelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\ncutoutAndColorResult = czm_sampleAndBlend(\n":"color = czm_sampleAndBlend(\n",ue+=" currentTextureColor,\n color,\n u_dayTextureUseWebMercatorT["+ce+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+ce+"],\n u_transparentBackColor["+ce+"],\n u_imageryClipEnable["+ce+"],\n "+(u?"u_dayTextureAlpha["+ce+"]":"1.0")+",\n "+(r?"u_dayTextureBrightness["+ce+"]":"0.0")+",\n "+(o?"u_dayTextureContrast["+ce+"]":"0.0")+",\n "+(a?"u_dayTextureHue["+ce+"]":"0.0")+",\n "+(s?"u_dayTextureSaturation["+ce+"]":"0.0")+",\n "+(l?"u_dayTextureOneOverGamma["+ce+"]":"0.0")+",\n "+(c?"u_dayTextureSplit["+ce+"]":"vec2(0.0,0.0)")+",\n "+(h?"u_dayTextureSwipeRegion["+ce+"]":"vec4(0.0,0.0,0.0,0.0)")+"\n);\n",E&&(ue+="color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n");for(ce=0;ce<N;++ce)ue+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+ce+"],\n u_gridTextureUseWebMercatorT["+ce+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_gridTextureTexCoordsRectangle["+ce+"],\n u_gridTextureTranslationAndScale["+ce+"]);\n";ue+=" return color;\n}",le.sources.push(ue),se.sources.push(Pe$4(ie)),se.sources.push(Le$6(b)),se.name="globeVS"+ie,le.name="globeFS"+ie;var he=r$13.fromCache({context:t.context,vertexShaderSource:se,fragmentShaderSource:le,attributeLocations:K.getAttributeLocations()});oe=ae[ne]=new Ee$7(n,ne,this.material,he,re,B,N,F)}return i.surfaceShader=oe,oe.shaderProgram},H$j.prototype.destroy=function(){var e,t,i=this._shadersByTexturesFlags;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];if(!e$2b(r))continue;for(e in r)r.hasOwnProperty(e)&&(e$2b(t=r[e])&&t.shaderProgram.destroy())}return i$10(this)};var E$d={FAILED:0,UNLOADED:1,TRANSITIONING:2,RECEIVED:3,TEXTURE_LODED:4,READY:5,UPDATE:6},_$e=Object.freeze(E$d);function n$c(e,t,i,n,r){if(this.gridLayer=e,this.x=t,this.y=i,this.level=n,this.request=void 0,0!==n){var o=t/2|0,a=i/2|0,s=n-1;this.parent=e._getGridFromCache(o,a,s)}(this.state=_$e.UNLOADED,this.gridBuffer=void 0,this.gridUrl=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!e$2b(r)&&e.gridProvider.ready)&&(r=e.gridProvider.tilingScheme.tileXYToRectangle(t,i,n));this.rectangle=r,this.needUpdate=!1}function d$j(e,t,i){this.readyGrid=void 0,this.loadingGrid=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i}function p$b(e,t){this._gridProvider=e,t=u$_(t,{}),this._context=t.context,this._show=!0,this.show=!0,this._rectangle=u$_(t.rectangle,h$18.MAX_VALUE),this._gridCache=[],e$2b(t.maxCategory)?this._MaxCategory=t.maxCategory:e.ready?this._MaxCategory=e.maxCategory:this._isNeedUpdate=!0,this._isNeedUpdate=!1,this._isUpdate=!0,e$2b(t.minCategory)?this._MinCategory=t.minCategory:e.ready?this._MinCategory=e.minCategory:this._isNeedUpdate=!0,this._hypsometricSetting=void 0,e$2b(t.hypsometricSetting)&&D$d(this,t),this._filterMode=k$Q.FilterMode.LINEAR}function b$i(e,t,i,n,r){var o=n+1,a=e._gridProvider;if(e$2b(a)&&!(a.maxLevel<o))for(var s=Object.keys(e._gridCache),l=0;l<2;l++)for(var u=2*t+l,c=0;c<2;c++){var h=2*i+c,d=w$d(u,h,o);for(l=0;l<s.length;l++)if(d==s[l]){var f=e._gridCache[d];if(R$f(f,r)){var p=b$i(e,u,h,o);return e$2b(p)&&p.state==_$e.READY?p:f.state==_$e.READY?f:void 0}}}}function R$f(e,t){return!!e$2b(e)&&h$18.contains(e.rectangle,t)}n$c.prototype.addReference=function(){++this.referenceCount},n$c.prototype.releaseReference=function(){return--this.referenceCount,0===this.referenceCount?(this.gridLayer._removeGridFromCache(this),e$2b(this.parent)&&this.parent.releaseReference(),e$2b(this.girlBuffer)&&e$2b(this.girlBuffer.destroy)&&this.girlBuffer.destroy(),e$2b(this.texture)&&this.texture.destroy(),e$2b(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),i$10(this),0):this.referenceCount},n$c.prototype._processStateMachine=function(e,t,i){return this.state===_$e.UNLOADED&&!i&&(this.state=_$e.TRANSITIONING,this.gridLayer._requestGridTile(this)),(this.state===_$e.RECEIVED||this.state===_$e.UPDATE)&&(this.state=_$e.TRANSITIONING,this.gridLayer._createTexture(e.context,this)),!0},d$j.prototype.freeResources=function(){e$2b(this.readyImagery)&&this.readyImagery.releaseReference(),e$2b(this.loadingImagery)&&this.loadingImagery.releaseReference()},d$j.prototype._processStateMachine=function(e,t,i){var n=this.loadingGrid;if(null==n){if(!e$2b(this.readyGrid)||this.readyGrid.state!=_$e.UPDATE)return!1;this.loadingGrid=this.readyGrid,this.readyGrid=void 0,n=this.loadingGrid}var r=n.gridLayer;return n._processStateMachine(t,!this.useWebMercatorT,i),n.state===_$e.READY&&(e$2b(this.readyGrid)&&this.readyGrid.releaseReference(),this.readyGrid=this.loadingGrid,this.loadingGrid=void 0,this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this),!0)},Object.defineProperties(p$b.prototype,{gridProvider:{get:function(){return this._gridProvider}},rectangle:{get:function(){return this._rectangle}},dataMaxValue:{get:function(){if(!this._isNeedUpdate)return this._MaxCategory;if(!this._gridProvider.ready)throw new DeveloperError("dataMaxValue must not be called before the grid provider is ready");this._MaxCategory=this._gridProvider.maxCategory,this._isNeedUpdate=!1}},dataMinValue:{get:function(){if(!this._isNeedUpdate)return this._MinCategory;if(!this._gridProvider.ready)throw new DeveloperError("dataMinValue must not be called before the grid provider is ready");this._MinCategory=this._gridProvider.minCategory,this._isNeedUpdate=!1}},hypsometricSetting:{get:function(){return{hypsometricSetting:this._hypsometricSetting,analysisMode:this._hypAnalysisMode}},set:function(e){D$d(this,e),this._isUpdate=!0}}}),p$b.prototype.destroy=function(){return i$10(this)},p$b.prototype.cancelReprojections=function(){},p$b.prototype.queueReprojectionCommands=function(e){},p$b.prototype.getViewableRectangle=function(){var e=this._gridProvider,t=this._rectangle;return e.readyPromise.then((function(){return h$18.intersection(e.rectangle,t)}))},p$b.prototype._getGridFromCache=function(e,t,i,n){var r=w$d(e,t,i),o=(this._gridCache.length,this._gridCache[r]);return e$2b(o)||(o=new n$c(this,e,t,i,n),this._gridCache[r]=o),o.addReference(),o},p$b.prototype.getGridValue=function(e){for(var t=Object.values(this._gridCache),i=void 0,n=0;n<t.length;n++){var r=t[n];if(r.state==_$e.READY)if(R$f(r,e)){var o=b$i(this,r.x,r.y,r.level,e);i=e$2b(o)?o:r;break}}if(!e$2b(i))return-1;var a=(e.longitude-i.rectangle.west)/i.rectangle.width,s=(i.rectangle.north-e.latitude)/i.rectangle.height;a=Math.max(Math.floor(a*this._gridProvider.cellWidth),0),s=Math.max(Math.floor(s*this._gridProvider.cellHeight),0);var l=i.gridBuffer;return G$e(this._gridProvider,l,a,s,this._filterMode)},p$b.prototype._removeGridFromCache=function(e){var t=w$d(e.x,e.y,e.level);delete this._gridCache[t]},p$b.prototype._requestGridTile=function(e){var t=this._gridProvider;function i(t){if(!e$2b(t))return n();e.gridBuffer=t,e.state=_$e.RECEIVED}function n(){if(e.request.state===W$1c.CANCELLED)return e.gridBuffer=void 0,e.state=_$e.UNLOADED,void(e.request=void 0);e.state=_$e.FAILED,e.request=void 0}!function(){var r=new r$1b({throttle:!1,throttleByServer:!0,type:V$15.TERRAIN});e.request=r;var o=t._requestGridTile(e.x,e.y,e.level,r);e$2b(o)?(e.state=_$e.RECEIVING,o$1l(o,i,n)):(e.state=_$e.UNLOADED,e.request=void 0)}()},p$b.prototype._createTexture=function(e,t){var i=this._gridProvider,n=t.gridBuffer;if(null==n||null==i||!i.ready)return!1;this._isNeedUpdate&&this._gridProvider.ready&&(this._MinCategory=this._gridProvider.minCategory,this._MaxCategory=this._gridProvider.maxCategory,this._isNeedUpdate=!1),this._context=e,null==this._hypsometricSetting&&Q$8(this),null==t.texture&&(t.texture=new t$V({context:this._context,width:i.cellWidth,height:i.cellHeight,pixelFormat:V$10.RGBA,flipY:!1}));for(var r=i.cellWidth*i.cellHeight,o=new Uint8Array(4*r),a=0;a<i.cellHeight;a++)for(var s=0;s<i.cellWidth;s++){var l=(i.cellHeight-1-a)*i.cellWidth+s,u=G$e(i,n,s,a,this._filterMode);if(u<this._hypsometricSetting.MinVisibleValue||u>this._hypsometricSetting.MaxVisibleValue||u<this._hypsometricSetting.ColorTableMinKey||u>this._hypsometricSetting.ColorTableMaxKey)o[4*l+0]=0,o[4*l+1]=0,o[4*l+2]=0,o[4*l+3]=0;else{var c=this._hypsometricSetting.ColorTable.getColor(u);if(!e$2b(c)){o[4*l+0]=0,o[4*l+1]=0,o[4*l+2]=0,o[4*l+3]=0;continue}o[4*l+0]=255*c.red,o[4*l+1]=255*c.green,o[4*l+2]=255*c.blue,o[4*l+3]=255*c.alpha}}t.texture.copyFrom({width:i.cellWidth,height:i.cellHeight,arrayBufferView:o}),t.state=_$e.READY};var E$c=new h$18,J$8=new h$18,M$g=new h$18,A$d=new h$18;function Z$d(e,t,i,n,r,o){var a,s=t.rectangle.width/512,l=t.rectangle.height/512,u=e.tilingScheme,c=h$18.clone(t.rectangle,A$d),h=u.tileXYToRectangle(i.northwestTileCoordinates.x,i.northwestTileCoordinates.y,o),d=h$18.intersection(h,n,M$g);return r?(u.rectangleToNativeRectangle(c,c),u.rectangleToNativeRectangle(h,h),u.rectangleToNativeRectangle(d,d),u.rectangleToNativeRectangle(n,n),a=u.tileXYToNativeRectangle.bind(u),s=c.width/512,l=c.height/512):a=u.tileXYToRectangle.bind(u),{veryCloseX:s,veryCloseY:l,terrainRectangle:c,gridRectangle:h,clippedGridRectangle:d,gridTileXYToRectangle:a}}function z$c(e,t,i,n,r,o,a,s){var l,u,c=0,h=1;Math.abs(i.clippedGridRectangle.west-i.terrainRectangle.west)>=i.veryCloseX&&(c=Math.min(1,(i.clippedGridRectangle.west-i.terrainRectangle.west)/i.terrainRectangle.width)),Math.abs(i.clippedGridRectangle.north-i.terrainRectangle.north)>=i.veryCloseY&&(h=Math.max(0,(i.clippedGridRectangle.north-i.terrainRectangle.south)/i.terrainRectangle.height));for(var d=h,f=n.northwestTileCoordinates.x;f<=n.southeastTileCoordinates.x;f++)if(l=c,i.gridRectangle=i.gridTileXYToRectangle(f,n.northwestTileCoordinates.y,o),i.clippedGridRectangle=h$18.simpleIntersection(i.gridRectangle,r,M$g),e$2b(i.clippedGridRectangle)){c=Math.min(1,(i.clippedGridRectangle.east-i.terrainRectangle.west)/i.terrainRectangle.width),f===n.southeastTileCoordinates.x&&Math.abs(i.clippedGridRectangle.east-i.terrainRectangle.east)<i.veryCloseX&&(c=1),h=d;for(var p=n.northwestTileCoordinates.y;p<=n.southeastTileCoordinates.y;p++)if(u=h,i.gridRectangle=i.gridTileXYToRectangle(f,p,o),i.clippedGridRectangle=h$18.simpleIntersection(i.gridRectangle,r,M$g),e$2b(i.clippedGridRectangle)){h=Math.max(0,(i.clippedGridRectangle.south-i.terrainRectangle.south)/i.terrainRectangle.height),p===n.southeastTileCoordinates.y&&Math.abs(i.clippedGridRectangle.south-i.terrainRectangle.south)<i.veryCloseY&&(h=0);var _=new e$29(l,h,c,u),m=e._getGridFromCache(f,p,o);t.gridImagery.splice(s,0,new d$j(m,_,a)),++s}}}function D$d(e,t){if(e$2b(t)&&e$2b(t.hypsometricSetting))e$2b(e._hypsometricSetting)&&e._hypsometricSetting.destroy(),e._hypsometricSetting=t.hypsometricSetting,e._hypsometricSetting._emissionTextureChanged=!0,e._filterMode=e._hypsometricSetting.filterMode,e$2b(e._hypsometricSetting.ColorTable)&&e._hypsometricSetting.ColorTable.generateBuffer();else if(e$2b(e._hypsometricSetting._hypsometricSetting))return e._hypsometricSetting.destroy(),void(e._hypsometricSetting=void 0);$$c(e)}function Q$8(e){if(e._isNeedUpdate&&e._gridProvider.ready&&(e._MinCategory=e._gridProvider.minCategory,e._MaxCategory=e._gridProvider.maxCategory,e._isNeedUpdate=!1),null==e._hypsometricSetting){var t=new i$S;e._hypsometricSetting=new u$M,e._hypsometricSetting.MaxVisibleValue=0;for(var i=[e$1U.fromCssColorString("#AAF0E9"),e$1U.fromCssColorString("#B0F2D3"),e$1U.fromCssColorString("#B0F4BC"),e$1U.fromCssColorString("#BFF8B2"),e$1U.fromCssColorString("#DAFBB2"),e$1U.fromCssColorString("#EDF9AD"),e$1U.fromCssColorString("#DCEC91"),e$1U.fromCssColorString("#A0D567"),e$1U.fromCssColorString("#60BD42"),e$1U.fromCssColorString("#2CA432"),e$1U.fromCssColorString("#148E35"),e$1U.fromCssColorString("#20853D"),e$1U.fromCssColorString("#559037"),e$1U.fromCssColorString("#819D2F"),e$1U.fromCssColorString("#ABA826"),e$1U.fromCssColorString("#D7B117"),e$1U.fromCssColorString("#EBA509"),e$1U.fromCssColorString("#E18302"),e$1U.fromCssColorString("#CB5902"),e$1U.fromCssColorString("#C53602"),e$1U.fromCssColorString("#9D1901"),e$1U.fromCssColorString("#820C01"),e$1U.fromCssColorString("#760F03"),e$1U.fromCssColorString("#721906"),e$1U.fromCssColorString("#702007"),e$1U.fromCssColorString("#6E280A"),e$1U.fromCssColorString("#6A2D0C"),e$1U.fromCssColorString("#733C1B"),e$1U.fromCssColorString("#815032"),e$1U.fromCssColorString("#8E664D"),e$1U.fromCssColorString("#997C6C"),e$1U.fromCssColorString("#A69992")],n=(e._MaxCategory-e._MinCategory)/31,r=0;r<32;r++)t.insert(e._MinCategory+n*r,i[r]);e._hypsometricSetting.ColorTable=t,e._hypsometricSetting.DisplayMode=k$Q.DisplayMode.FACE_AND_LINE,e._hypsometricSetting.Opacity=.618,e._hypsometricSetting.ColorTableMaxKey=e._MaxCategory,e._hypsometricSetting.ColorTableMinKey=e._MinCategory,e._hypsometricSetting.MaxVisibleValue=e._MaxCategory,e._hypsometricSetting.MinVisibleValue=e._MinCategory,e._hypsometricSetting.ColorTable.generateBuffer()}}function w$d(e,t,i){return JSON.stringify([e,t,i])}function $$c(e){for(var t=Object.values(e._gridCache),i=0;i<t.length;i++){var n=t[i];n.state==_$e.READY&&(n.state=_$e.UPDATE,n.needUpdate=!0)}}function P$f(e,t,i,n){var r=0;i.south>0?r=i.south:i.north<0&&(r=i.north);var o=e._gridProvider,a=I$c(e,1*t.getLevelMaximumGeometricError(n),r,e$2b(o.resolution)?o.resolution:1,t.tilingScheme._tileWidth);a=Math.max(0,a);var s=o.maxLevel;if(a>s&&(a=s),e$2b(o.minLevel)){var l=o.minLevel;a<l&&(a=l)}return a}function I$c(e,t,i,n,r){var o=e._gridProvider,a=o.tilingScheme,s=a.ellipsoid,l=o.tilingScheme.projection instanceof n$1b?1:Math.cos(i),u=a.rectangle,c=s.maximumRadius*u.width*l/(o.cellWidth*a.getNumberOfXTilesAtLevel(0)/n)/t*(o.cellWidth/r),h=Math.log(c)/Math.log(2);return 0|Math.round(h)}function L$f(e,t,i,n){var r=e.tilingScheme,o=r.positionToTileXY(h$18.northwest(t),i),a=r.positionToTileXY(h$18.southeast(t),i),s=n.width/512,l=n.height/512,u=r.tileXYToRectangle(o.x,o.y,i);Math.abs(u.south-n.north)<l&&o.y<a.y&&++o.y,Math.abs(u.east-n.west)<s&&o.x<a.x&&++o.x;var c=r.tileXYToRectangle(a.x,a.y,i);return Math.abs(c.north-n.south)<l&&a.y>o.y&&--a.y,Math.abs(c.west-n.east)<s&&a.x>o.x&&--a.x,{northwestTileCoordinates:o,southeastTileCoordinates:a}}function G$e(e,t,i,n,r){if(!e$2b(e))throw new DeveloperError("getValue must not be called before the grid provider is ready");if(r==k$Q.FilterMode.NEAREST)return t[n*e.cellWidth+i];for(var o=0,a=0,s=0;s<2;s++)for(var l=0;l<2;l++){var u=i+s;u=Math.min(u,e.cellWidth-1);var c=n+l;o+=t[(c=Math.min(c,e.cellHeight-1))*e.cellWidth+u],a++}return a<=0?-99999:o/=a}function n$b(){this._layers=[],this.layerAdded=new o$1h,this.layerRemoved=new o$1h,this.layerMoved=new o$1h,this.layerShownOrHidden=new o$1h,this.layerUpdate=new o$1h}function g$h(e,t){if(!e$2b(t))throw new t$16("layer is required.");var i=e.indexOf(t);if(-1===i)throw new t$16("layer is not in this collection.");return i}function b$h(e,t,i){var n=e._layers;if((t=e$2a.clamp(t,0,n.length-1))!==(i=e$2a.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t)}}p$b.prototype._createTileImagerySkeletons=function(e,t,i){var n=e.data,r=this._gridProvider;if(!this.show||!r.ready)return!1;e$2b(i)||(i=n.gridImagery.length);var o=r.tilingScheme.projection instanceof t$O&&e.rectangle.north<t$O.MaximumLatitude&&e.rectangle.south>-t$O.MaximumLatitude,a=h$18.intersection(r.rectangle,this._rectangle,E$c),s=h$18.intersection(e.rectangle,a,J$8);if(null==s)return!1;var l=P$f(this,t,s,e.level),u=L$f(r,s,l,e.rectangle);return e.rectangle.width,e.rectangle.height,z$c(this,n,Z$d(r,e,u,a,o,l),u,a,l,o,i),!0},p$b.prototype._calculateTextureTranslationAndScale=function(e,t){var i=t.readyGrid.rectangle,n=e.rectangle;if(t.useWebMercatorT){var r=t.girdLayer.gridProvider.tilingScheme;i=r.rectangleToNativeRectangle(i,E$c),n=r.rectangleToNativeRectangle(n,A$d)}var o=n.width,a=n.height,s=o/i.width,l=a/i.height;return new e$29(s*(n.west-i.west)/o,l*(n.south-i.south)/a,s,l)},Object.defineProperties(n$b.prototype,{length:{get:function(){return this._layers.length}}}),n$b.prototype.add=function(e,t){var i=e$2b(t);if(!e$2b(e))throw new t$16("layer is required.");if(i){if(t<0)throw new t$16("index must be greater than or equal to zero.");if(t>this._layers.length)throw new t$16("index must be less than or equal to the number of layers.")}i?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t)},n$b.prototype.addImageryProvider=function(e,t){if(!e$2b(e))throw new t$16("imageryProvider is required.");var i=new h$Q(e);return i._imageryLayers=this,this.add(i,t),i},n$b.prototype.addVectorTileProvider=function(e,t){if(!e$2b(e))throw new t$16("imageryProvider is required.");var i=new h$Q(e,{minimumTerrainLevel:e.minimumTerrainLevel,maximumTerrainLevel:e.maximumTerrainLevel,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter});return this.add(i,t),i},n$b.prototype.addGridProvider=function(e,t){if(!e$2b(e))throw new t$16("gridProvider is required.");var i=new p$b(e);return this.add(i,t),i},n$b.prototype.remove=function(e,t,i){t=u$_(t,!0);i=u$_(i,!1);var n=this._layers.indexOf(e);return-1!==n&&(e._imageryProvider&&e._imageryProvider instanceof I$10&&!i?void 0:(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0))},n$b.prototype.removeAll=function(e){e=u$_(e,!0);for(var t=this._layers,i=0,n=t.length;i<n;i++){var r=t[i];this.layerRemoved.raiseEvent(r,i),e&&r.destroy()}this._layers=[]},n$b.prototype.contains=function(e){return-1!==this.indexOf(e)},n$b.prototype.indexOf=function(e){return this._layers.indexOf(e)},n$b.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.","index");return this._layers[e]},n$b.prototype.raise=function(e){var t=g$h(this._layers,e);b$h(this,t,t+1)},n$b.prototype.lower=function(e){var t=g$h(this._layers,e);b$h(this,t,t-1)},n$b.prototype.raiseToTop=function(e){var t=g$h(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},n$b.prototype.lowerToBottom=function(e){var t=g$h(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var H$i=new h$18;function r$h(e,t){this._terrainProvider=e}function o$h(){this._layers=[],this.layerAdded=new o$1h,this.layerRemoved=new o$1h,this.layerMoved=new o$1h,this.layerShownOrHidden=new o$1h,this._globe=void 0}function f$h(e,t){if(!e$2b(t))throw new t$16("layer is required.");var i=e.indexOf(t);if(-1===i)throw new t$16("layer is not in this collection.");return i}function p$a(e,t,i){var n=e._layers;if((t=e$2a.clamp(t,0,n.length-1))!==(i=e$2a.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t)}}function e$9(e){this._ellipsoid=new s$G(e.ellipsoid,o$1p.ZERO)}function h$e(e){if(!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.x))throw new t$16("options.x is required.");if(!e$2b(e.y))throw new t$16("options.y is required.");if(e.x<0||e.y<0)throw new t$16("options.x and options.y must be greater than or equal to zero.");if(!e$2b(e.level))throw new t$16("options.level is required and must be greater than or equal to zero.");if(!e$2b(e.tilingScheme))throw new t$16("options.tilingScheme is required.");this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=D$J.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=re$z.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0,this._rasterTextureSize=void 0,this._rasterFBO=void 0,this._rasterTexture=void 0,this._rasterized=!1,this._clearCommand=new t$X({color:new e$1U(0,0,0,0),depth:1}),this._2DRasterized=!1,this._2DRasterTexture=void 0,this._mvtLoaded=!1,this._clipRasterTexture=void 0,this._clipRasterFbo=void 0,this._clipRegionsCount=0,this._clipRegionRasterized=!1,this.isModified=!1,0===this._level?this.showInvalid=!1:this.showInvalid=e.parent.showInvalid,this.zoomLevel=-1,this._renderThisFrame=!1,this._useParentImage=!1}function I$b(e){e$2b(e)&&e.freeResources()}n$b.prototype.pickImageryLayerFeatures=function(e,t){var i=t.globe.pick(e,t);if(e$2b(i)){for(var n,r=t.globe.ellipsoid.cartesianToCartographic(i),o=t.globe._surface._tilesToRender,a=0;!e$2b(n)&&a<o.length;++a){var s=o[a];h$18.contains(s.rectangle,r)&&(n=s)}if(e$2b(n)){for(var l=n.data.imagery,u=[],c=[],h=l.length-1;h>=0;--h){var d=l[h],f=d.readyImagery;if(e$2b(f)){var p=f.imageryLayer.imageryProvider;if(e$2b(p.pickFeatures)&&h$18.contains(f.rectangle,r)){var _=H$i,m=1/1024;if(_.west=e$2a.lerp(n.rectangle.west,n.rectangle.east,d.textureCoordinateRectangle.x-m),_.east=e$2a.lerp(n.rectangle.west,n.rectangle.east,d.textureCoordinateRectangle.z+m),_.south=e$2a.lerp(n.rectangle.south,n.rectangle.north,d.textureCoordinateRectangle.y-m),_.north=e$2a.lerp(n.rectangle.south,n.rectangle.north,d.textureCoordinateRectangle.w+m),h$18.contains(_,r)){var g=p.pickFeatures(f.x,f.y,f.level,r.longitude,r.latitude);!e$2b(g)||(u.push(g),c.push(f.imageryLayer))}}}}if(0!==u.length)return o$1l.all(u,(function(e){for(var t=[],i=0;i<e.length;++i){var n=e[i],o=c[i];if(e$2b(n)&&n.length>0)for(var a=0;a<n.length;++a){var s=n[a];s.imageryLayer=o,e$2b(s.position)||(s.position=r),t.push(s)}}return t}))}}},n$b.prototype.queueReprojectionCommands=function(e){for(var t=this._layers,i=0,n=t.length;i<n;++i)t[i].queueReprojectionCommands(e)},n$b.prototype.cancelReprojections=function(){for(var e=this._layers,t=0,i=e.length;t<i;++t)e[t].cancelReprojections()},n$b.prototype.isDestroyed=function(){return!1},n$b.prototype.destroy=function(){return this.removeAll(!0),i$10(this)},n$b.prototype._update=function(){var e,t,i,n,r=!0,o=this._layers;for(i=0,n=o.length;i<n;++i)(t=o[i])._layerIndex=i,e$2b(t._imageryProvider)&&(t._imageryProvider._id=t._layerIndex),t.show?(t._isBaseLayer=r,r=!1):t._isBaseLayer=!1,t.show!==t._show&&(e$2b(t._show)&&(e$2b(e)||(e=[]),e.push(t)),t._show=t.show),e$2b(t.gridProvider)&&t._isUpdate&&this.layerUpdate.raiseEvent(t,t._layerIndex);if(e$2b(e))for(i=0,n=e.length;i<n;++i)t=e[i],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},n$b.prototype._maxDetailLevelOffset=function(){for(var e=0,t=this._layers,i=0,n=t.length;i<n;++i){var r=t[i]._detailLevelOffset;t[i].featherEdgesEnabled&&r<1&&(r=1),e=Math.max(r,e)}return e},n$b.prototype.saveLocalCache=function(){for(var e=0,t=this._layers.length;e<t;e++)this._layers[e]instanceof h$Q&&this._layers[e].saveLocalCache()},Object.defineProperties(r$h.prototype,{terrainProvider:{get:function(){return this._terrainProvider}}}),r$h.prototype.isDestroyed=function(){return!1},r$h.prototype.destroy=function(){return i$10(this)},Object.defineProperties(o$h.prototype,{length:{get:function(){return this._layers.length}}}),o$h.prototype.add=function(e,t){var i=e$2b(t);if(!e$2b(e))throw new t$16("layer is required.");if(i){if(t<0)throw new t$16("index must be greater than or equal to zero.");if(t>this._layers.length)throw new t$16("index must be less than or equal to the number of layers.")}i?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),e$2b(this._globe)&&e$2b(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerAdded.raiseEvent(e,t)},o$h.prototype.addTerrainProvider=function(e,t){if(!e$2b(e))throw new t$16("terrainProvider is required.");var i=new r$h(e);return this.add(i,t),e$2b(this._globe)&&e$2b(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),i},o$h.prototype.remove=function(e,t){t=u$_(t,!0);var i=this._layers.indexOf(e);return-1!==i&&(this._layers.splice(i,1),this._update(),this.layerRemoved.raiseEvent(e,i),t&&e.destroy(),e$2b(this._globe)&&e$2b(this._globe._surface)&&(0===this._layers.length&&(this._globe.terrainProvider=new t$A({ellipsoid:this._globe.ellipsoid})),this._globe._surface.invalidateAllTiles()),!0)},o$h.prototype.removeAll=function(e){e=u$_(e,!0);for(var t=this._layers,i=0,n=t.length;i<n;i++){var r=t[i];this.layerRemoved.raiseEvent(r,i),e&&r.destroy()}e$2b(this._globe)&&e$2b(this._globe._surface)&&(this._globe.terrainProvider=new t$A({ellipsoid:this._globe.ellipsoid}),this._globe._surface.invalidateAllTiles()),this._layers=[]},o$h.prototype.contains=function(e){return-1!==this.indexOf(e)},o$h.prototype.indexOf=function(e){return this._layers.indexOf(e)},o$h.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.","index");return this._layers[e]},o$h.prototype.raise=function(e){var t=f$h(this._layers,e);p$a(this,t,t+1),e$2b(this._globe)&&e$2b(this._globe._surface)&&this._globe._surface.invalidateAllTiles()},o$h.prototype.lower=function(e){var t=f$h(this._layers,e);p$a(this,t,t-1),e$2b(this._globe)&&e$2b(this._globe._surface)&&this._globe._surface.invalidateAllTiles()},o$h.prototype.raiseToTop=function(e){var t=f$h(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),e$2b(this._globe)&&e$2b(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},o$h.prototype.lowerToBottom=function(e){var t=f$h(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),e$2b(this._globe)&&e$2b(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerMoved.raiseEvent(e,0,t))},o$h.prototype.isDestroyed=function(){return!1},o$h.prototype.destroy=function(){return this.removeAll(!0),i$10(this)},o$h.prototype._update=function(){var e,t,i,n,r=!0,o=this._layers;for(i=0,n=o.length;i<n;++i)(t=o[i])._layerIndex=i,e$2b(t._terrainProvider)&&(t._terrainProvider._id=t._layerIndex),t.show?(t._isBaseLayer=r,r=!1):t._isBaseLayer=!1,t.show!==t._show&&(e$2b(t._show)&&(e$2b(e)||(e=[]),e.push(t)),t._show=t.show);if(e$2b(e))for(i=0,n=e.length;i<n;++i)t=e[i],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},Object.defineProperties(e$9.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),h$e.createLevelZeroTiles=function(e){if(!e$2b(e))throw new t$16("tilingScheme is required.");for(var t=e.getNumberOfXTilesAtLevel(0),i=e.getNumberOfYTilesAtLevel(0),n=new Array(t*i),r=0,o=0;o<i;++o)for(var a=0;a<t;++a)n[r++]=new h$e({tilingScheme:e,x:a,y:o,level:0});return n},h$e.prototype._updateCustomData=function(e,t,i){var n,r,o,a=this.customData;if(e$2b(t)&&e$2b(i)){for(a=a.filter((function(e){return-1===i.indexOf(e)})),this._customData=a,o=this._rectangle,n=0;n<t.length;++n)r=t[n],h$18.contains(o,r.positionCartographic)&&a.push(r);this._frameUpdated=e}else{var s=this._parent;if(e$2b(s)&&this._frameUpdated!==s._frameUpdated){a.length=0,o=this._rectangle;var l=s.customData;for(n=0;n<l.length;++n)r=l[n],h$18.contains(o,r.positionCartographic)&&a.push(r);this._frameUpdated=s._frameUpdated}}},Object.defineProperties(h$e.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return e$2b(this._southwestChild)||(this._southwestChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return e$2b(this._southeastChild)||(this._southeastChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return e$2b(this._northwestChild)||(this._northwestChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return e$2b(this._northeastChild)||(this._northeastChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<re$z.DONE}},eligibleForUnloading:{get:function(){var e=!0;return e$2b(this.data)&&(e$2b(e=this.data.eligibleForUnloading)||(e=!0)),e}}}),h$e.prototype.findLevelZeroTile=function(e,t,i){var n=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=n:t>=n&&(t-=n),!(i<0||i>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter((function(e){return e.x===t&&e.y===i}))[0]},h$e.prototype.findTileToWest=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;var i=t.findTileToWest(e);return void 0!==i?t.southwestChild===this?i.southeastChild:i.northeastChild:void 0},h$e.prototype.findTileToEast=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;var i=t.findTileToEast(e);return void 0!==i?t.southeastChild===this?i.southwestChild:i.northwestChild:void 0},h$e.prototype.findTileToSouth=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;var i=t.findTileToSouth(e);return void 0!==i?t.southwestChild===this?i.northwestChild:i.northeastChild:void 0},h$e.prototype.findTileToNorth=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;var i=t.findTileToNorth(e);return void 0!==i?t.northwestChild===this?i.southwestChild:i.southeastChild:void 0},h$e.prototype.freeResources=function(){this.state=re$z.START,this.renderable=!1,this.upsampledFromParent=!1,e$2b(this.data)&&e$2b(this.data.freeResources)&&this.data.freeResources(),I$b(this._southwestChild),this._southwestChild=void 0,I$b(this._southeastChild),this._southeastChild=void 0,I$b(this._northwestChild),this._northwestChild=void 0,I$b(this._northeastChild),this._northeastChild=void 0,this._rasterTexture=this._rasterTexture&&!this._rasterTexture.isDestroyed()&&this._rasterTexture.destroy(),this._rasterFBO=this._rasterFBO&&!this._rasterFBO.isDestroyed()&&this._rasterFBO.destroy(),this._rasterFBO=void 0,this._rasterized=!1,this._2DRasterTexture=this._2DRasterTexture&&!this._2DRasterTexture.isDestroyed()&&this._2DRasterTexture.destroy(),this._2DRasterized=!1,this._mvtLoaded=!1,this._clipRasterTexture=this._clipRasterTexture&&!this._clipRasterTexture.isDestroyed()&&this._clipRasterTexture.destroy(),this._clipRasterFbo=this._clipRasterFbo&&!this._clipRasterFbo.isDestroyed()&&this._clipRasterFbo.destroy(),this._clipRegionsCount=0,this._clipRegionRasterized=!1,this.isModified=!1};var Y$8=new h$18,m$e=new f$18;h$e.prototype.createRealtimeRasterFBO=function(e){this._rasterTexture=new t$V({context:e.context,width:this._rasterTextureSize,height:this._rasterTextureSize,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}),this._rasterFBO=new t$W({context:e.context,colorTextures:[this._rasterTexture],destroyAttachments:!1})};var H$h=new p$1d;function Z$c(e,t){var i=f$18.clone(t.context.uniformState._viewport),n=e$2a.toDegrees(e._rectangle.west),r=e$2a.toDegrees(e._rectangle.east),o=e$2a.toDegrees(e._rectangle.north),a=e$2a.toDegrees(e._rectangle.south),s=t.camera,l=s.frustum.clipPlane,u=s.heading,c=s.pitch,h=s.roll,d=new o$1p;1===t._fboState.frameBufferType&&s.disableReflection(),o$1p.clone(s._positionWC,d),p$1d.clone(s.transform,H$h),s._setTransform(p$1d.IDENTITY);var f=new a$V({width:r-n,aspectRatio:1,near:1,far:100}),p=new o$1p(.5*(n+r),.5*(o+a),50),_=new o$1p(0,0,-1),m=new o$1p(0,1,0);r=o$1p.cross(_,m,new o$1p);return p$1d.computeView(p,_,m,r,t.context.uniformState.view),t.context.uniformState.updateFrustum(f),{position:d,viewport:i,waterPlane:l,heading:u,pitch:c,roll:h}}function C$e(e){if(!e$2b(e)||!e$2b(e.tileProvider))throw new t$16("options.tileProvider is required.");if(e$2b(e.tileProvider.quadtree))throw new t$16("A QuadtreeTileProvider can only be used with a single QuadtreePrimitive");this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};var t=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new i$L,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=u$_(e.maximumScreenSpaceError,2),this.tileCacheSize=u$_(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!0,this._occluders=new e$9({ellipsoid:t}),this._tileLoadProgressEvent=new o$1h,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0,this._tilesToRenderOld=[],this._levelZeroTilesOld=[],this._zeroTileReady=!1,this._freeAllBakTiles=!1,this._visible=!0,this._delicateImagerylength=16}function Ce$4(e){if(e._zeroTileReady){e._tilesToRenderOld.length=0;for(var t=e._levelZeroTilesOld,i=0;i<t.length;++i){for(var n=t[i],r=n.customData,o=r.length,a=0;a<o;++a){var s=r[a];s.level=0,e._addHeightCallbacks.push(s)}n.freeResources()}e._levelZeroTilesOld.length=0}}function be$4(e){var t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,le$8(e);var i=e._levelZeroTiles;if(e$2b(i))if(e._zeroTileReady){e._tilesToRenderOld.length=0;for(var n=0;n<i.length;++n){for(var r=i[n].customData,o=r.length,a=0;a<o;++a){var s=r[a];s.level=0,e._addHeightCallbacks.push(s)}i[n].freeResources()}}else e._tilesToRenderOld=e._tilesToRender.slice(0),e._levelZeroTilesOld=e._levelZeroTiles.slice(0);e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}function le$8(e){var t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}function Pe$3(e,t){var i=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;(i!==e._lastTileLoadQueueLength||e._tilesInvalidated)&&(t.afterRender.push(o$1h.prototype.raiseEvent.bind(e._tileLoadProgressEvent,i)),e._lastTileLoadQueueLength=i);var n=e._debug;n.enableDebugOutput&&!n.suspendLodUpdate&&(n.maxDepth=e._tilesToRender.reduce((function(e,t){return Math.max(e,t.level)}),-1),n.tilesRendered=e._tilesToRender.length,(n.tilesVisited!==n.lastTilesVisited||n.tilesRendered!==n.lastTilesRendered||n.tilesCulled!==n.lastTilesCulled||n.maxDepth!==n.lastMaxDepth||n.tilesWaitingForChildren!==n.lastTilesWaitingForChildren||n.maxDepthVisited!==n.lastMaxDepthVisited)&&(console.log("Visited "+n.tilesVisited+", Rendered: "+n.tilesRendered+", Culled: "+n.tilesCulled+", Max Depth Rendered: "+n.maxDepth+", Max Depth Visited: "+n.maxDepthVisited+", Waiting for children: "+n.tilesWaitingForChildren),n.lastTilesVisited=n.tilesVisited,n.lastTilesRendered=n.tilesRendered,n.lastTilesCulled=n.tilesCulled,n.lastMaxDepth=n.maxDepth,n.lastTilesWaitingForChildren=n.tilesWaitingForChildren,n.lastMaxDepthVisited=n.maxDepthVisited))}h$e.prototype.resetCamera=function(e,t){var i=e.camera;1===e._fboState.frameBufferType&&t.waterPlane&&i.enableReflection(t.waterPlane),i._setTransform(H$h),i.setView({destination:t.position,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},convert:!1}),e.context.uniformState.update(e),e.context.uniformState.updateFrustum(i.frustum),e.context.uniformState.viewport=t.viewport},h$e.prototype.realtimeRasterVectors=function(e,t){if(!(this.level<2||(e.rasterPerFrame&&e.camera.zoomLevel!==this.zoomLevel&&(this._rasterized=!1),this._rasterized))){this.zoomLevel=e.camera.zoomLevel;var i=0;2===this._level&&(i=1),t._rasterCurrentFBOIdx=i,this._rasterTextureSize=t._rasterTextureSizes[i],this._rasterized=!0,m$e.width=this._rasterTextureSize,m$e.height=this._rasterTextureSize;for(var n=e.commandListRealtimeRaster,r=[],o=[],a=0;a<n.length;a++){var s=!1;if(e$2b(n[a]._globeIndex))if(this._level>=n[a]._globeIndex.level){var l=Math.pow(2,this._level-n[a]._globeIndex.level),u=Math.floor(this.y/l),c=Math.floor(this.x/l);u===n[a]._globeIndex.row&&c===n[a]._globeIndex.col&&(s=!0)}else{l=Math.pow(2,n[a]._globeIndex.level-this._level),u=Math.floor(n[a]._globeIndex.row/l),c=Math.floor(n[a]._globeIndex.col/l);u===this.y&&c===this.x&&(s=!0)}else{var h,d=new h$18((h=n[a]._boundingVolume instanceof i$1c?n[a]._boundingVolume:i$1c.fromOrientedBoundingBox(n[a]._boundingVolume)).center.x-h.radius,h.center.y-h.radius,h.center.x+h.radius,h.center.y+h.radius);d.west=e$2a.toRadians(d.west),d.north=e$2a.toRadians(d.north),d.east=e$2a.toRadians(d.east),d.south=e$2a.toRadians(d.south),e$2b(h$18.intersection(d,this._rectangle,Y$8))&&(s=!0)}s&&(n[a]._primitiveType===W$18.TRIANGLES?r.push(n[a]):o.push(n[a]))}if(0===r.length&&0===o.length)return void(e$2b(this._rasterFBO)&&(this._clearCommand.framebuffer=this._rasterFBO,this._clearCommand.execute(e.context)));e$2b(this._rasterTexture)||this.createRealtimeRasterFBO(e);var f=!1,p=t._rasterLineFBOs[i],_=t._rasterAAFBOs[i];e.rasterLineWidth>1&&o.length>0&&(f=!0,this._clearCommand.framebuffer=p,this._clearCommand.execute(e.context)),this._clearCommand.framebuffer=_,this._clearCommand.execute(e.context),this._clearCommand.framebuffer=this._rasterFBO,this._clearCommand.execute(e.context);var m=Z$c(this,e),g={},x={};for(a=0;a<r.length;a++){e$2b(g[v=r[a].layerId])?g[v].push(r[a]):g[v]=[r[a]]}for(a=0;a<o.length;a++){var v;e$2b(x[v=o[a].layerId])?x[v].push(o[a]):x[v]=[o[a]]}if(e$2b(e.rasterLayerIds))for(var y=0;y<e.rasterLayerIds.length;y++){var $=e.rasterLayerIds[y],b=g[$],T=x[$];if(e$2b(b))for(a=0;a<b.length;a++)e$2b(b[a].shaderProgram)&&(b[a].renderState=d$1m.fromCache({viewport:m$e,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),b[a].framebuffer=_,b[a].execute(e.context));if(e$2b(T))for(a=0;a<T.length;a++)e$2b(T[a].shaderProgram)&&(T[a].renderState=d$1m.fromCache({viewport:m$e}),T[a].framebuffer=f?p:_,T[a].execute(e.context))}e.context.webgpu&&e.context.engine.flushFramebuffer(),this.resetCamera(e,m),f&&(t._lineExpandCommand.framebuffer=_,t._lineExpandCommand.renderState=d$1m.fromCache({viewport:m$e}),t._lineExpandCommand.execute(e.context)),t._lineFXAACommand.framebuffer=this._rasterFBO,t._lineFXAACommand.renderState=d$1m.fromCache({viewport:m$e}),t._lineFXAACommand.execute(e.context)}},h$e.prototype.renderVectorBy2DCanvas=function(e,t){var i=e.rasterVectorCollection,n=i.bounds;if(e$2b(n)){var r=!1;if(e$2b(h$18.intersection(n,this._rectangle,Y$8))&&(r=!0),r&&!this._2DRasterized){this._2DRasterized=!0,e$2b(this._2DRasterTexture)||(this._2DRasterTexture=new t$V({context:e.context,width:i.canvasWidth,height:i.canvasHeight,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}));var o=i.draw(this._rectangle);this._2DRasterTexture.copyFrom(o),this._2DRasterTexture.textureAlpha=i.alpha}}},h$e.prototype.rasterClipRegion=function(e,t){if(!(e._fboState.name.indexOf("_excavationGlobeHeight")>-1||this._level<2)){var i=[].concat(t._excavateRegions.values).concat(t._modifyRegions.values).concat(t._imageryClipRegions.values).concat(t._extractRegions.values);e$2b(t._slopeRegion)&&i.push(t._slopeRegion),e$2b(t._hypsometricRegion)&&i.push(t._hypsometricRegion);var n=i.length;if(!(n<1||e.camera.frustum instanceof a$V||this._clipRegionsCount===n)){e$2b(this._clipRasterFbo)||(this._clipRasterTexture=new t$V({context:e.context,width:256,height:256,pixelFormat:V$10.RGBA}),this._clipRasterFbo=new t$W({context:e.context,colorTextures:[this._clipRasterTexture],destroyAttachments:!1})),this._clearCommand.framebuffer=this._clipRasterFbo,this._clearCommand.execute(e.context),m$e.width=256,m$e.height=256;for(var r=Z$c(this,e),o=!1,a=0;a<n;a++){var s=i[a];if(e$2b(h$18.intersection(s.rectangle,this._rectangle))){var l=s.command;!e$2b(s.command)||(o=!0,l.renderState=d$1m.fromCache({viewport:m$e,cull:{enabled:!1}}),l.framebuffer=this._clipRasterFbo,l.execute(e.context))}}if(this.resetCamera(e,r),(o=o||t.clippingType===R$J.KeepInside)&&(this._clipRegionsCount=n),this._clipRegionRasterized=o,o){var u=this._level+" "+this._x+" "+this._y;t._clipRasterTilesMap[u]=this}}}},h$e.prototype.setRasterValidTerrainCamera=function(e,t){var i=f$18.clone(t.context.uniformState._viewport),n=t.camera;o$1p.clone(n.position,oldPosition),o$1p.clone(n.direction,oldDirection),o$1p.clone(n.up,oldUp),n.setView({destination:new o$1p(16383.5,16383.5,5e4),orientation:{direction:new o$1p(0,0,-1),up:new o$1p(0,1,0)},convert:!1});var r=new a$V({width:32767,aspectRatio:1,near:1,far:1e5});return t.context.uniformState.update(t),t.context.uniformState.updateFrustum(r),{position:oldPosition,direction:oldDirection,upDirection:oldUp,viewport:i}},h$e.prototype.setShowInvalid=function(e){this.showInvalid!==e&&(this.showInvalid=e,e$2b(this.data)&&this.data.setShowInvalid(e))},Object.defineProperties(C$e.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}}),C$e.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0,this._zeroTileReady=!1},C$e.prototype.forEachLoadedTile=function(e){for(var t=this._tileReplacementQueue.head;e$2b(t);)t.state!==re$z.START&&e(t),t=t.replacementNext},C$e.prototype.forEachRenderedTile=function(e){for(var t=this._tilesToRender,i=0,n=t.length;i<n;++i)e(t[i])},C$e.prototype.updateHeight=function(e,t,i){var n=this,r={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t,scene:i,removeFunc:function(){for(var e=n._addHeightCallbacks,t=e.length,i=0;i<t;++i)if(e[i]===r){e.splice(i,1);break}n._removeHeightCallbacks.push(r)}};return n._addHeightCallbacks.push(r),r.removeFunc},C$e.prototype.update=function(e){e$2b(this._tileProvider.update)&&this._tileProvider.update(e)},C$e.prototype.beginFrame=function(e){!e.passes.render||(this._tilesInvalidated&&(be$4(this),this._tilesInvalidated=!1),this._freeAllBakTiles&&(Ce$4(this),this._freeAllBakTiles=!1),this._tileProvider.initialize(e),le$8(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())},C$e.prototype.render=function(e){var t=e.passes,i=this._tileProvider;t.render&&(i.beginUpdate(e),ye$4(this,e),Ve$5(this,e),i.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&i.updateForPick(e)},C$e.prototype.showInvalid=function(e){var t,i,n,r=[];for(t=0,i=this._levelZeroTiles.length;t<i;++t)r.push(this._levelZeroTiles[t]);for(;n=r.pop();)n.setShowInvalid(e),e$2b(n._southeastChild)&&r.push(n._southeastChild),e$2b(n._southwestChild)&&r.push(n._southwestChild),e$2b(n._northeastChild)&&r.push(n._northeastChild),e$2b(n._northwestChild)&&r.push(n._northwestChild)},C$e.prototype.endFrame=function(e){if(e.passes.render&&e.mode!==C$13.MORPHING){if(e.camera._scene._mvtVisibleControl)for(var t=e.camera._scene._mvtVisibleLevel,i=this._tileReplacementQueue.head;e$2b(i);){if(!1===i._mvtLoaded&&i._level>e.camera._endLevel-t&&e$2b(i.data)&&e$2b(i.data.imagery))for(var n=i.data.imagery,r=0;r<n.length;r++)if(e$2b(n[r].loadingImagery)){n[r].loadingImagery.imageryLayer._imageryProvider instanceof I$10&&(i._mvtLoaded=n[r].processStateMachine(i,e))}i=i.replacementNext}!0===this.tileProvider.terrainProvider._needRefresh&&(this.invalidateAllTiles(),this.tileProvider.terrainProvider._needRefresh=!1),we$2(this,e),Ae$6(this,e),Pe$3(this,e)}},C$e.prototype.isDestroyed=function(){return!1},C$e.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var w$c,ae$5=new a$18;function me$7(e,t){var i=h$18.center(e.rectangle,ae$5),n=i.longitude-w$c.longitude,r=i.latitude-w$c.latitude,o=(i=h$18.center(t.rectangle,ae$5)).longitude-w$c.longitude,a=i.latitude-w$c.latitude;return n*n+r*r-(o*o+a*a)}var pe$6=new o$1p,O$c=[];function Ee$6(e,t,i){if(t>5){for(var n=[],r=0;r<e.length;++r)e[r].level===t&&n.push(e[r]);if(n.length<i)for(r=0;r<n.length;++r)n[r]._useParentImage=!0}}function ye$4(e,t){var i=e._debug;if(!i.suspendLodUpdate){var n=e._tilesToRender;n.length=0;for(var r=e._tileReplacementQueue.head;r!==e._tileReplacementQueue.tail;)r._renderThisFrame=!1,r._useParentImage=!1,r=r.replacementNext;var o,a=e._tileProvider;if(!e$2b(e._levelZeroTiles)){if(!a.ready)return;var s=a.tilingScheme;e._levelZeroTiles=h$e.createLevelZeroTiles(s);var l=e._levelZeroTiles.length;if(O$c.length<l)for(O$c=new Array(l),o=0;o<l;++o)void 0===O$c[o]&&(O$c[o]=new H$g)}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;var u=e._levelZeroTiles,c=u.length>1?e._occluders:void 0;w$c=t.camera.positionCartographic,u.sort(me$7);var h,d=e._addHeightCallbacks,f=e._removeHeightCallbacks,p=t.frameNumber;if(d.length>0||f.length>0){for(o=0,h=u.length;o<h;++o)(r=u[o])._updateCustomData(p,d,f);d.length=0,f.length=0}var _=t.camera;e._cameraPositionCartographic=_.positionCartographic;var m=p$1d.getTranslation(_.transform,pe$6);for(e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(m,e._cameraReferenceFrameOriginCartographic),o=0,h=u.length;o<h;++o)r=u[o],e._tileReplacementQueue.markTileRendered(r),r.renderable?R$e(e,r,a,t,c,!1,O$c[o]):(P$e(e,e._tileLoadQueueHigh,r,t),++i.tilesWaitingForChildren);for(var g=0,x=22,v=0;v<n.length;++v)g=Math.max(n[v].level,g),x=Math.min(n[v].level,x);t.camera._endLevel=g,g-x>3&&Ee$6(n,g,e._delicateImagerylength),e._zeroTileReady||(e._tilesToRenderOld.length>0?n.length>2&&(e._zeroTileReady=!0,e._freeAllBakTiles=!0):e._zeroTileReady=!0),e._lastSelectionFrameNumber=p}}function P$e(e,t,i,n){!i.needsLoading||(void 0!==e.tileProvider.computeTileLoadPriority&&(i._loadPriority=e.tileProvider.computeTileLoadPriority(i,n)),t.push(i))}function H$g(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function ne$7(){this.southwest=new H$g,this.southeast=new H$g,this.northwest=new H$g,this.northeast=new H$g}ne$7.prototype.combine=function(e){var t=this.southwest,i=this.southeast,n=this.northwest,r=this.northeast;e.allAreRenderable=t.allAreRenderable&&i.allAreRenderable&&n.allAreRenderable&&r.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||r.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+i.notYetRenderableCount+n.notYetRenderableCount+r.notYetRenderableCount};for(var U$e=new Array(30),G$d=0;G$d<U$e.length;++G$d)U$e[G$d]=new ne$7;function De$5(e,t,i,n,r){var o=e._debug;++o.tilesVisited,e._tileReplacementQueue.markTileRendered(i),i._updateCustomData(t.frameNumber),i.level>o.maxDepthVisited&&(o.maxDepthVisited=i.level);var a=Ne$4(e,t,i)<e.maximumScreenSpaceError;if(e._tileProvider._terrainProvider._enablePrjArea&&a){var s=i._level+2,l=4*i._x,u=4*i._y;for(let t=0;t<e._tilesToRender.length;t++){const i=e._tilesToRender[t];if(i._level==s&&(i._x==l-1&&i._y==u||i._x==l&&i._y==u-1||i._x==l+3&&i._y==u-1||i._x==l+4&&i._y==u||i._x==l+4&&i._y==u+3||i._x==l+3&&i._y==u+4||i._x==l&&i._y==u+4||i._x==l-1&&i._y==u+3)){a=!1;break}}}var c=i.southwestChild,h=i.southeastChild,d=i.northwestChild,f=i.northeastChild,p=e._lastSelectionFrameNumber,_=i._lastSelectionResultFrame===p?i._lastSelectionResult:D$J.NONE,m=e.tileProvider;if(a||n){var g=D$J.originalResult(_)===D$J.RENDERED,x=D$J.originalResult(_)===D$J.CULLED||_===D$J.NONE,v=i.state===re$z.DONE,y=g||x||v;if(y||e$2b(m.canRenderWithoutLosingDetail)&&(y=m.canRenderWithoutLosingDetail(i)),y)return a&&P$e(e,e._tileLoadQueueMedium,i,t),B$9(e,i),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$J.RENDERED,r.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.RENDERED,void(r.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));n=!0,a&&P$e(e,e._tileLoadQueueHigh,i,t)}if(m.canRefine(i)){if(c.upsampledFromParent&&h.upsampledFromParent&&d.upsampledFromParent&&f.upsampledFromParent)return B$9(e,i),P$e(e,e._tileLoadQueueMedium,i,t),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(h),e._tileReplacementQueue.markTileRendered(d),e._tileReplacementQueue.markTileRendered(f),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$J.RENDERED,r.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.RENDERED,void(r.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.REFINED;var $=e._tilesToRender.length,b=e._tileLoadQueueLow.length,T=e._tileLoadQueueMedium.length,C=e._tileLoadQueueHigh.length,S=e._tileToUpdateHeights.length;if(Fe$5(e,c,h,d,f,t,n,r),$!==e._tilesToRender.length){var w=r.allAreRenderable,E=r.anyWereRenderedLastFrame,P=r.notYetRenderableCount,A=!1;if(!w&&!E){for(var L=e._tilesToRender,M=$;M<L.length;++M)for(var R=L[M];void 0!==R&&R._lastSelectionResult!==D$J.KICKED&&R!==i;)R._lastSelectionResult=D$J.kick(R._lastSelectionResult),R=R.parent;e._tilesToRender.length=$,e._tileToUpdateHeights.length=S,B$9(e,i),i._lastSelectionResult=D$J.RENDERED;var I=_===D$J.RENDERED;!I&&P>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=b,e._tileLoadQueueMedium.length=T,e._tileLoadQueueHigh.length=C,P$e(e,e._tileLoadQueueMedium,i,t),r.notYetRenderableCount=i.renderable?0:1,A=!0),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=I,I||e._tileToUpdateHeights.push(i),++o.tilesWaitingForChildren}e.preloadAncestors&&!A&&P$e(e,e._tileLoadQueueLow,i,t)}}else i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.RENDERED,B$9(e,i),P$e(e,e._tileLoadQueueHigh,i,t),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$J.RENDERED,r.notYetRenderableCount=i.renderable?0:1}function Fe$5(e,t,i,n,r,o,a,s){if(!(t.level>=U$e.length)){var l=o.camera.positionCartographic,u=e._tileProvider,c=e._occluders,h=U$e[t.level],d=h.southwest,f=h.southeast,p=h.northwest,_=h.northeast;l.longitude<t.rectangle.east?l.latitude<t.rectangle.north?(R$e(e,t,u,o,c,a,d),R$e(e,i,u,o,c,a,f),R$e(e,n,u,o,c,a,p),R$e(e,r,u,o,c,a,_)):(R$e(e,n,u,o,c,a,p),R$e(e,t,u,o,c,a,d),R$e(e,r,u,o,c,a,_),R$e(e,i,u,o,c,a,f)):l.latitude<t.rectangle.north?(R$e(e,i,u,o,c,a,f),R$e(e,t,u,o,c,a,d),R$e(e,r,u,o,c,a,_),R$e(e,n,u,o,c,a,p)):(R$e(e,r,u,o,c,a,_),R$e(e,n,u,o,c,a,p),R$e(e,i,u,o,c,a,f),R$e(e,t,u,o,c,a,d)),h.combine(s)}}function Qe$3(e,t){var i=t.rectangle;return e$2b(e._cameraPositionCartographic)&&h$18.contains(i,e._cameraPositionCartographic)||e$2b(e._cameraReferenceFrameOriginCartographic)&&h$18.contains(i,e._cameraReferenceFrameOriginCartographic)}function R$e(e,t,i,n,r,o,a){if(i.computeTileVisibility(t,n,r)!==fe$n.NONE)return De$5(e,n,t,o,a);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),a.allAreRenderable=!0,a.anyWereRenderedLastFrame=!1,a.notYetRenderableCount=0,Qe$3(e,t)){(!e$2b(t.data)||!e$2b(t.data.vertexArray))&&P$e(e,e._tileLoadQueueMedium,t,n);var s=e._lastSelectionFrameNumber,l=t._lastSelectionResultFrame===s?t._lastSelectionResult:D$J.NONE;l!==D$J.CULLED_BUT_NEEDED&&l!==D$J.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=D$J.CULLED_BUT_NEEDED}else e.preloadSiblings||0===t.level?(P$e(e,e._tileLoadQueueLow,t,n),t._lastSelectionResult=D$J.CULLED):t._lastSelectionResult=D$J.CULLED;t._lastSelectionResultFrame=n.frameNumber}function Ne$4(e,t,i){if(t.mode===C$13.SCENE2D||t.camera.frustum instanceof a$V||t.camera.frustum instanceof l$12)return xe$3(e,t,i);if(i.isModified&&i.level>18)return 0;var n,r=i._distance;if(e._tileProvider._terrainProvider._enablePrjArea){var o=i.data.tileBoundingRegion._orientedBoundingBox.calculateBoxArea(t.camera.positionWC,t.mode,r,t.camera.frustum.sseDenominator,t.context.drawingBufferHeight,-1,t.context.uniformState.mvpViewPort,t.mapProjection);n=Math.sqrt(o/e$2a.PI_OVER_FOUR)/288}else{n=e._tileProvider.getLevelMaximumGeometricError(i.level)*t.context.drawingBufferHeight/(r*t.camera.frustum.sseDenominator)}return 0==e._tileProvider._terrainProvider._enablePrjArea&&t.fog.enabled&&(n-=e$2a.fog(r,t.fog.density)*t.fog.sse),n}function xe$3(e,t,i){var n=t.camera.frustum;e$2b(n._offCenterFrustum)&&(n=n._offCenterFrustum);var r=t.context,o=r.drawingBufferWidth,a=r.drawingBufferHeight,s=e._tileProvider.getLevelMaximumGeometricError(i.level)/(Math.max(n.top-n.bottom,n.right-n.left)/Math.max(o,a));return t.fog.enabled&&t.mode!==C$13.SCENE2D&&(s-=e$2a.fog(i._distance,t.fog.density)*t.fog.sse),s}function B$9(e,t){t._renderThisFrame=!0,e._tilesToRender.push(t)}function we$2(e,t){var i=e._tileLoadQueueHigh,n=e._tileLoadQueueMedium,r=e._tileLoadQueueLow;if(0!==i.length||0!==n.length||0!==r.length){e._tileReplacementQueue.trimTiles(e.tileCacheSize,e.tileCacheSizeForMVT);var o=Et$a()+e._loadQueueTimeSlice,a=e._tileProvider,s=q$c(e,t,a,o,i,!1);s=q$c(e,t,a,o,n,s),q$c(e,t,a,o,r,s)}}function Oe$5(e,t){return e._loadPriority-t._loadPriority}function q$c(e,t,i,n,r,o){void 0!==i.computeTileLoadPriority&&r.sort(Oe$5);for(var a=0,s=r.length;a<s&&(Et$a()<n||!o);++a){var l=r[a];e._tileReplacementQueue.markTileRendered(l),i.loadTile(t,l),o=!0}return o}var Q$7=new f$17,K$8=new a$18,D$c=new o$1p,He$2=[];function Ae$6(e,t){if(!e.tileProvider.ready)return;const i=He$2;i.length=0;const n=e._tileToUpdateHeights,r=Et$a()+e._updateHeightsTimeSlice,o=t.mode,a=t.mapProjection,s=e.tileProvider.tilingScheme.ellipsoid;let l;for(;n.length>0;){const t=n[0];if(!e$2b(t.data)||!e$2b(t.data.mesh)){const r=t._lastSelectionResultFrame===e._lastSelectionFrameNumber?t._lastSelectionResult:D$J.NONE;(r===D$J.RENDERED||r===D$J.CULLED_BUT_NEEDED)&&i.push(t),n.shift(),e._lastTileIndex=0;continue}const u=t.customData,c=u.length;let h=!1;for(l=e._lastTileIndex;l<c;++l){const e=u[l],i=t.data.terrainData;if(e$2b(i)&&i.wasCreatedByUpsampling(),t.level>e.level){if(e$2b(e.positionOnEllipsoidSurface)||(e.positionOnEllipsoidSurface=o$1p.fromRadians(e.positionCartographic.longitude,e.positionCartographic.latitude,0,s)),o===C$13.SCENE3D){const i=s.geodeticSurfaceNormal(e.positionOnEllipsoidSurface,Q$7.direction);if(!e$2b(s.getSurfaceNormalIntersectionWithZAxis(e.positionOnEllipsoidSurface,11500,Q$7.origin))){let n=0;e$2b(t.data.tileBoundingRegion)&&(n=t.data.tileBoundingRegion.minimumHeight);const r=Math.min(n,-11500),o=o$1p.multiplyByScalar(i,Math.abs(r)+1,D$c);o$1p.subtract(e.positionOnEllipsoidSurface,o,Q$7.origin)}}else a$18.clone(e.positionCartographic,K$8),K$8.height=-11500,a.project(K$8,D$c),o$1p.fromElements(D$c.z,D$c.x,D$c.y,D$c),o$1p.clone(D$c,Q$7.origin),o$1p.clone(o$1p.UNIT_X,Q$7.direction);const i=t.data.pick(Q$7,o,a,!1,D$c);e$2b(i)&&(e$2b(e.callback)&&e.callback(i),e.level=t.level)}if(Et$a()>=r){h=!0;break}}if(h){e._lastTileIndex=l;break}e._lastTileIndex=0,n.shift()}for(l=0;l<i.length;l++)n.push(i[l])}function Ve$5(e,t){for(var i=e._tileProvider,n=e._zeroTileReady?e._tilesToRender:e._tilesToRenderOld,r=0,o=n.length;r<o;++r){var a=n[r];i.showTileThisFrame(a,t)}}function p$9(e){this._bounds=void 0;var t=512;this._canvas=document.createElement("canvas"),this._canvas.height=t,this._canvas.width=t,this._pickCanvas=document.createElement("canvas"),this._pickCanvas.height=t,this._pickCanvas.width=t,this._polygons=new e$1N,this._polygonHoles=new e$1N,this._polylines=new e$1N,this._quadtreePrimitive=e,this._alpha=1}Object.defineProperties(p$9.prototype,{bounds:{get:function(){return this._bounds}},canvasWidth:{get:function(){return this._canvas.width}},canvasHeight:{get:function(){return this._canvas.height}},alpha:{get:function(){return this._alpha},set:function(e){this._alpha=e}}});var T$e=new h$18;function f$g(e,t){if(e$2b(t)){var i=e._rectangle;e$2b(h$18.intersection(t,i,T$e))&&(e._2DRasterized=!1),e$2b(e._southwestChild)&&f$g(e._southwestChild,t),e$2b(e._southeastChild)&&f$g(e._southeastChild,t),e$2b(e._northwestChild)&&f$g(e._northwestChild,t),e$2b(e._northeastChild)&&f$g(e._northeastChild,t)}}function Z$b(e){var t,i,n=e._polygons,r=n.values.length;for(t=0;t<r;t++)i=n.values[t].bounds,e$2b(e._bounds)?e._bounds=h$18.union(i,e._bounds):e._bounds=i;for(r=(n=e._polygonHoles).values.length,t=0;t<r;t++)i=n.values[t].bounds,e$2b(e._bounds)?e._bounds=h$18.union(i,e._bounds):e._bounds=i;for(r=(n=e._polylines).values.length,t=0;t<r;t++)i=n.values[t].bounds,e$2b(e._bounds)?e._bounds=h$18.union(i,e._bounds):e._bounds=i}function x$e(e,t,i,n){for(var r=e.length,o=[],a=i/t.width,s=n/t.height,l=0;l<r;l++){var u=e[l],c=new o$1o;c.x=(u.longitude-t.west)*a,c.y=(t.north-u.latitude)*s,c.x=Math.floor(c.x+.5),c.y=Math.floor(c.y+.5),o.push(c)}return o}function O$b(e,t,i,n,r,o){var a,s=t.values.length;for(a=0;a<s;a++){var l=t.values[a];if(e$2b(h$18.intersection(l.bounds,i,T$e))){var u;u=e$2b(l.selected)&&l.selected?e$1U.BLUE:o?new e$1U(0,0,0,1):l.fillColor;var c=x$e(l.positions,i,n,r);t$e.drawPolygon(e,{canvasPostions:c,fillColor:u,lineColor:l.lineColor,lineWidth:l.lineWidth})}}}function M$f(e,t,i,n,r){var o,a=t.values.length;for(o=0;o<a;o++){var s=t.values[o];if(e$2b(h$18.intersection(s.bounds,i,T$e))){var l=x$e(s.positions,i,n,r);t$e.drawSimplePolyline(e,{canvasPostions:l,lineColor:s.lineColor,lineWidth:s.lineWidth})}}}function W$g(e,t){var i=Math.floor(e/65536),n=e-65536*i,r=Math.floor(n/256),o=n-256*r,a=1;return e$2b(t)&&(a=t/256),new e$1U(o/256,r/256,i/256,a)}p$9.prototype.add=function(e){var t=e.name,i=e.positions,n=new h$18,r=u$_(e.geometryType,C$q.POLYGON),o=u$_(e.pickId,0);h$18.fromCartographicArray(i,n);var a={pickId:o,positions:i,bounds:n,fillColor:e.fillColor,lineColor:e.lineColor,lineWidth:e.lineWidth};r==C$q.POLYLINE?this._polylines.set(t,a):r==C$q.POLYGON?this._polygons.set(t,a):r==C$q.POLYGON_HOLE&&this._polygonHoles.set(t,a),Z$b(this),f$g(this._quadtreePrimitive._levelZeroTiles[0],n),f$g(this._quadtreePrimitive._levelZeroTiles[1],n)},p$9.prototype.remove=function(e){var t;if(this._polygons.contains(e)){var i=this._polygons.get(e);e$2b(i)&&(t=i.bounds),this._polygons.remove(e)}if(this._polygonHoles.contains(e)){var n=this._polygonHoles.get(e);e$2b(n)&&(t=n.bounds),this._polygonHoles.remove(e)}if(this._polylines.contains(e)){var r=this._polylines.get(e);e$2b(r)&&(t=r.bounds),this._polylines.remove(e)}f$g(this._quadtreePrimitive._levelZeroTiles[0],t),f$g(this._quadtreePrimitive._levelZeroTiles[1],t)},p$9.prototype.removeAll=function(){this._polylines.removeAll(),this._polygons.removeAll(),this._polygonHoles.removeAll(),f$g(this._quadtreePrimitive._levelZeroTiles[0],this._bounds),f$g(this._quadtreePrimitive._levelZeroTiles[1],this._bounds)},p$9.prototype.draw=function(e){var t=this._canvas.getContext("2d");return t.clearRect(0,0,this._canvas.width,this._canvas.height),O$b(t,this._polygons,e,this._canvas.width,this._canvas.height,!1),O$b(t,this._polygonHoles,e,this._canvas.width,this._canvas.height,!0),M$f(t,this._polylines,e,this._canvas.width,this._canvas.height),this._canvas};var c$b=new h$18;function i$d(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=h$18.clone(h$18.MAX_VALUE)}function h$d(e){var t=new t$A({ellipsoid:e=u$_(e,t$13.WGS84)}),i=new n$b,n=new o$h;this._ellipsoid=e,this._imageryLayerCollection=i,this._terrainLayerCollection=n,this._surfaceShaderSet=new H$j,this._material=void 0,this._surface=new C$e({tileProvider:new A$S({terrainProvider:t,imageryLayers:i,terrainLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainLayerCollection._globe=this,this._rasterVectorCollection=new p$9(this._surface),this._terrainProvider=t,this._defaultTerrainProvider=t,this._terrainProviderChanged=new o$1h,K$7(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new t$11({url:n$15("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.tileCacheSizeForMVT=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!0,this.fillHighlightColor=void 0,this.enableLighting=!1,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!0,this.lightingFadeOutDistance=1e7,this.lightingFadeInDistance=2e7,this.nightFadeOutDistance=1e7,this.nightFadeInDistance=5e7,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!0,this.shadows=W$W.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this._globeAlpha=1,this._splitDirection=new o$1o(0,0),this._sceneMode=C$13.SCENE3D,this.clippingType=R$J.KeepOutside,this.showExcavationSide=!0,this._scene=void 0,this._excavationNormalTextureUrl=n$15("Assets/Textures/excavationregion_top_Normal.jpg"),this._excavationSideNormalTextureUrl=n$15("Assets/Textures/excavationregion_side_Normal.jpg"),this._floodFlagTexture=void 0,this._floodRect=new e$29,this._translucency=new i$d}function K$7(e){var t=[],i=e$2b(e._material)&&(e._material.shaderSource.match(/slope/)||e._material.shaderSource.match("normalEC")),n=[le$9];!e$2b(e._material)||i&&!e._terrainProvider.requestVertexNormals?e._surface._tileProvider.uniformMap=void 0:(n.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.uniformMap=e._material._uniforms),n.push(De$6),e._surfaceShaderSet.baseVertexShaderSource=new s$U({sources:[le$9,Ne$5],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new s$U({sources:n,defines:t}),e._surfaceShaderSet.material=e._material}function Ze$4(e){return function(t,i){return i$1c.distanceSquaredTo(t.pickBoundingSphere,e)-i$1c.distanceSquaredTo(i.pickBoundingSphere,e)}}p$9.prototype.getPickID=function(e){var t,i=this._polygons,n=i.values.length,r=[],o=0;for(t=0;t<n;t++){var a=i.values[t].bounds;h$18.contains(a,e)&&(0==o?h$18.clone(a,c$b):c$b=h$18.union(a,c$b),o++,r.push(i.values[t]))}if(0==o)return-1;var s=this._pickCanvas.getContext("2d");for(n=r.length,t=0;t<n;t++){var l=r[t],u=x$e(l.positions,c$b,this._pickCanvas.width,this._pickCanvas.height),c=W$g(l.pickId);t$e.drawPolygon(s,{canvasPostions:u,fillColor:c,lineColor:c})}var h=(e.longitude-c$b.west)/c$b.width*this._pickCanvas.width,d=(c$b.north-e.latitude)/c$b.height*this._pickCanvas.height;h=Math.floor(h+.5);var f=4*((d=Math.floor(d+.5))*this._pickCanvas.width+h),p=s.getImageData(0,0,this._pickCanvas.width,this._pickCanvas.height),_=p.data[f],m=p.data[f+1],g=p.data[f+2];return p.data[f+3],_+256*m+256*g*256},p$9.prototype.setSelection=function(e){var t,i=this._polygons,n=i.values.length,r=0,o=!1;for(t=0;t<n;t++){var a=i.values[t],s=a.pickId,l=a.bounds;o=!1,s===e?(a.selected=!0,o=!0):(e$2b(a.selected)&&a.selected&&(o=!0),a.selected=!1),o&&(0==r?h$18.clone(l,c$b):c$b=h$18.union(l,c$b),r++)}f$g(this._quadtreePrimitive._levelZeroTiles[0],c$b),f$g(this._quadtreePrimitive._levelZeroTiles[1],c$b)},p$9.prototype.isDestroyed=function(){return!1},p$9.prototype.destroy=function(){return i$10(this)},Object.defineProperties(i$d.prototype,{enabled:{get:function(){return this._enabled},set:function(e){o$1q.typeOf.bool("enabled",e),this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("frontFaceAlpha",e,0),o$1q.typeOf.number.lessThanOrEquals("frontFaceAlpha",e,1),this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){if(e$2b(e)&&e.far<e.near)throw new t$16("far distance must be greater than near distance.");this._frontFaceAlphaByDistance=o$Y.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("backFaceAlpha",e,0),o$1q.typeOf.number.lessThanOrEquals("backFaceAlpha",e,1),this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){if(e$2b(e)&&e.far<e.near)throw new t$16("far distance must be greater than near distance.");this._backFaceAlphaByDistance=o$Y.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){e$2b(e)||(e=h$18.clone(h$18.MAX_VALUE)),h$18.clone(e,this._rectangle)}}}),new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Object.defineProperties(h$d.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},terrainLayers:{get:function(){return this._terrainLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tileLoadedEvent:{get:function(){return this._surface.tileProvider.tileLoadedEvent}},tilesLoaded:{get:function(){return!e$2b(this._surface)||this._surface.tileProvider.ready&&0===this._surface._tileLoadQueueHigh.length&&0===this._surface._tileLoadQueueMedium.length&&0===this._surface._tileLoadQueueLow.length}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){e$2b(e)||(e=h$18.clone(h$18.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),e$2b(this._material)&&K$7(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,K$7(this))}},globeAlpha:{get:function(){return this._globeAlpha},set:function(e){e$2b(e)&&e>=0&&e<=1&&(this._globeAlpha=e,this._translucency.enabled=e<1,this._translucency.frontFaceAlpha=e,this._translucency.backFaceAlpha=e,this._surface.tileProvider.globeAlpha=e)}},cullEnabled:{get:function(){return this._surface._tileProvider._cullEnabled},set:function(e){if(o$1q.typeOf.bool("cullEnabled",e),e$2b(e)&&(this._surface._tileProvider._cullEnabled=e,e$2b(this._surface._tileProvider._renderState))){var t=d$1m.getState(this._surface._tileProvider._renderState);t.cull.enabled=e,this._surface._tileProvider._renderState=d$1m.fromCache(t)}}},HypsometricSetting:{get:function(){return{hypsometricSetting:this._surface._tileProvider._hypsometricSetting,analysisMode:this._surface._tileProvider._hypAnalysisMode,altitudeMode:this._surface._tileProvider._style3D._altitudeMode}},set:function(e){if(this.removeRasterRegions(),this._surface._tileProvider._bUseHypColorTable=!1,this._surface._tileProvider._hypsometricRegionUpdate=!0,e$2b(this._surface._tileProvider._hypsometricRegion)&&(e$2b(this._surface._tileProvider._hypsometricRegion.command)&&(this._surface._tileProvider._hypsometricRegion.command.vertexArray.destroy(),this._surface._tileProvider._hypsometricRegion.command.shaderProgram.destroy()),this._surface._tileProvider._hypsometricRegion=null),e$2b(e)&&e$2b(e.hypsometricSetting)){if(this._surface._tileProvider._hypAnalysisMode=e.analysisMode||this._surface._tileProvider._hypAnalysisMode,this._surface._tileProvider._hypsometricSetting=u$M.clone(e.hypsometricSetting,this._surface._tileProvider._hypsometricSetting),this._surface._tileProvider._hypsometricSetting.ColorTable.generateBuffer(),e$2b(this._surface._tileProvider._hypsometricTexture)&&this._surface._tileProvider._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._surface._tileProvider._hypsometricSetting.ColorTable._imageBuffer}),this._surface._tileProvider._hypAnalysisMode!=k$Q.AnalysisRegionMode.ARM_NONE&&(this._surface._tileProvider._bUseHypColorTable=!0),this._surface._tileProvider._hypsometricSetting.UpdatePolygonRegion&&this._surface._tileProvider._hypAnalysisMode==k$Q.AnalysisRegionMode.ARM_REGION&&this._surface._tileProvider._hypsometricSetting.CoverageArea.length>0){var t=this._surface._tileProvider._hypsometricSetting.CoverageArea,i=o$1p.fromDegreesArrayHeights(t),n=h$18.fromCartesianArray(i),r=z$_.createGeometry(new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(t)}}));this._surface._tileProvider._hypsometricRegion={rectangle:n,worldGeometry:r,modelMatrix:p$1d.fromTranslation(new o$1p(t[0],t[1],0),new p$1d),command:void 0}}}else e$2b(this._surface._tileProvider._hypsometricSetting)&&(this._surface._tileProvider._hypsometricSetting.destroy(),this._surface._tileProvider._hypsometricSetting=void 0)}},SlopeSetting:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Globe_SlopeSetting"),{slopeSetting:this._surface._tileProvider._slopeSetting,analysisMode:this._surface._tileProvider._slopeAnalysisMode,altitudeMode:this._surface._tileProvider._style3D._altitudeMode}},set:function(e){if(LicenseChecker.LICENSECHECKER.verify("Globe_SlopeSetting"),this.removeRasterRegions(),this._surface._tileProvider._bUseSlopeColorTable=!1,this._surface._tileProvider._slopeRegionUpdate=!0,e$2b(this._surface._tileProvider._slopeRegion)&&(e$2b(this._surface._tileProvider._slopeRegion.command)&&(this._surface._tileProvider._slopeRegion.command.vertexArray.destroy(),this._surface._tileProvider._slopeRegion.command.shaderProgram.destroy()),this._surface._tileProvider._slopeRegion=null),e$2b(e)&&e$2b(e.slopeSetting)){if(this._surface._tileProvider._slopeAnalysisMode=e.analysisMode,this._surface._tileProvider._slopeSetting=l$K.clone(e.slopeSetting,this._surface._tileProvider._slopeSetting),this._surface._tileProvider._slopeSetting.ColorTable.generateBuffer(),e$2b(this._surface._tileProvider._slopeColorTexture)&&this._surface._tileProvider._slopeColorTexture.copyFrom({width:1024,height:64,arrayBufferView:this._surface._tileProvider._slopeSetting.ColorTable._imageBuffer}),this._surface._tileProvider._slopeAnalysisMode!=k$Q.AnalysisRegionMode.ARM_NONE&&(this._surface._tileProvider._bUseSlopeColorTable=!0),this._surface._tileProvider._slopeSetting.UpdatePolygonRegion&&this._surface._tileProvider._slopeAnalysisMode==k$Q.AnalysisRegionMode.ARM_REGION&&this._surface._tileProvider._slopeSetting.CoverageArea.length>0){var t=this._surface._tileProvider._slopeSetting.CoverageArea,i=o$1p.fromDegreesArrayHeights(t),n=h$18.fromCartesianArray(i),r=z$_.createGeometry(new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(t)}}));this._surface._tileProvider._slopeRegion={rectangle:n,worldGeometry:r,modelMatrix:p$1d.fromTranslation(new o$1p(t[0],t[1],0),new p$1d),command:void 0}}}else e$2b(this._surface._tileProvider._slopeSetting)&&(this._surface._tileProvider._slopeSetting.destroy(),this._surface._tileProvider._slopeSetting=void 0)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){o$1o.clone(e,this._splitDirection),o$1o.clone(e,this._surface._tileProvider._splitDirection)}},swipeRegion:{get:function(){var e=this._surface._tileProvider._swipeRegion;return new f$18(e.x,e.y,e.z-e.x,e.w-e.y)},set:function(e){if(e$2b(e)){if(!(e instanceof f$18))throw new t$16("swipeRegion must be a instance of BoundingRectangle.");e$29.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._surface._tileProvider._swipeRegion)}}},swipeEnabled:{get:function(){return this._surface._tileProvider._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?this.splitDirection=new o$1o(0,0):e$29.fromElements(0,0,1,1,this._surface._tileProvider._swipeRegion),this._surface._tileProvider._swipeEnabled=e)}},imageryLodTolerance:{get:function(){return this._surface._delicateImagerylength},set:function(e){"number"==typeof e&&(this._surface._delicateImagerylength=e)}},excavationSideTextureUrl:{get:function(){return this._surface.tileProvider._excavationSideTextureUrl},set:function(e){this._surface.tileProvider._excavationSideTextureUrl=e}},excavationBottomTextureUrl:{get:function(){return this._surface.tileProvider._excavationBottomTextureUrl},set:function(e){this._surface.tileProvider._excavationBottomTextureUrl=e}},translucency:{get:function(){return this._translucency}}});var Qe$2=[],Ye$2={start:0,stop:0};h$d.prototype.pickWorldCoordinates=function(e,t,i){if(!e$2b(e))throw new t$16("ray is required");if(!e$2b(t))throw new t$16("scene is required");var n=t.mode,r=t.mapProjection,o=Qe$2;o.length=0;var a,s,l,u=this._surface._tilesToRender,c=u.length;for(s=0;s<c;++s){var h=(a=u[s]).data;if(e$2b(h)){var d=h.pickBoundingSphere;if(n!==C$13.SCENE3D)h.pickBoundingSphere=d=i$1c.fromRectangleWithHeights2D(a.rectangle,r,h.tileBoundingRegion.minimumHeight,h.tileBoundingRegion.maximumHeight,d),o$1p.fromElements(d.center.z,d.center.x,d.center.y,d.center);else{if(!e$2b(h.renderedMesh))continue;i$1c.clone(h.renderedMesh.boundingSphere3D,d)}e$2b(g$1h.raySphere(e,d,Ye$2))&&o.push(h)}}for(o.sort(Ze$4(e.origin)),c=o.length,s=0;s<c&&!e$2b(l=o[s].pick(e,t.mode,t.mapProjection,!0,i));++s);return l};var J$7=new o$1p,$$b=new o$1p,ee$6=new o$1p;h$d.prototype.computeSurfaceArea=function(e,t,i){var n,r=e._polygonHierarchy.positions;if(!e$2b(i)){for(var o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0;u<r.length;u++){var c=a$18.fromCartesian(r[u]);o=Math.min(c.longitude,o),a=Math.max(c.longitude,a),s=Math.min(c.latitude,s),l=Math.max(c.latitude,l)}var h=a$18.toCartesian(new a$18(o,s,0)),d=a$18.toCartesian(new a$18(a,l,0));n=o$1p.angleBetween(h,d)}for(var f=z$_.fromPositions({positions:r,granularity:e$2b(i)?i:n/32}),p=z$_.createGeometry(f),_=0,m={},g=0;g<p.indices.length;g+=3){var x,v,y,$=p.indices[g];if(e$2b(m[$]))x=m[$];else{x=new o$1p(p.attributes.position.values[3*$],p.attributes.position.values[3*$+1],p.attributes.position.values[3*$+2]);var b=a$18.fromCartesian(x),T=this.getHeight(b);if(!e$2b(T))continue;b=a$18.fromRadians(b.longitude,b.latitude,T),x=a$18.toCartesian(b,t),m[$]=o$1p.clone(x)}var C=p.indices[g+1];if(e$2b(m[C]))v=m[C];else{v=new o$1p(p.attributes.position.values[3*C],p.attributes.position.values[3*C+1],p.attributes.position.values[3*C+2]);var S=a$18.fromCartesian(v),w=this.getHeight(S);if(!e$2b(w))continue;S=a$18.fromRadians(S.longitude,S.latitude,w),v=a$18.toCartesian(S,t),m[C]=o$1p.clone(v)}var E=p.indices[g+2];if(e$2b(m[E]))y=m[E];else{y=new o$1p(p.attributes.position.values[3*E],p.attributes.position.values[3*E+1],p.attributes.position.values[3*E+2]);var P=a$18.fromCartesian(y),A=this.getHeight(P);if(!e$2b(A))continue;P=a$18.fromRadians(P.longitude,P.latitude,A),y=a$18.toCartesian(P,t),m[E]=o$1p.clone(y)}J$7=o$1p.subtract(v,x,J$7),$$b=o$1p.subtract(y,x,$$b),ee$6=o$1p.cross(J$7,$$b,ee$6),_+=.5*o$1p.magnitude(ee$6)}return _},h$d.prototype.getVisibleTiles=function(){for(var e=[],t=this._surface._tilesToRender,i=0;i<t.length;i++)e.push({x:t[i].x,y:t[i].y,level:t[i].level});return e},h$d.prototype.computeSurfaceDistance=function(e,t){for(var i=e._positions,n=0,r=[],o=i.length-1,a=0;a<o;a++)for(var s=i[a],l=i[a+1],u=o$1p.angleBetween(s,l)/64,c=e$2a.chordLength(u,6378137),h=y$_.subdivideLine(s,l,c,r),d=o$1p.unpackArray(h),f=d.length-1,p=0;p<f;p++){var _=d[p],m=a$18.fromCartesian(_),g=this.getHeight(m);if(e$2b(g)){m=a$18.fromRadians(m.longitude,m.latitude,g);var x=a$18.toCartesian(m),v=d[p+1];if(m=a$18.fromCartesian(v),e$2b(g=this.getHeight(m))){m=a$18.fromRadians(m.longitude,m.latitude,g);var y=a$18.toCartesian(m);n+=o$1p.distance(x,y)}}}return n};var Ke$2=new a$18;h$d.prototype.pick=function(e,t,i){if(this.show){if(e$2b(i=this.pickWorldCoordinates(e,t,i))&&t.mode!==C$13.SCENE3D){i=o$1p.fromElements(i.y,i.z,i.x,i);var n=t.mapProjection.unproject(i,Ke$2);i=t.globe.ellipsoid.cartographicToCartesian(n,i)}return i}};var Je$2=new o$1p,ue$6=new o$1p,$e$2=new a$18,er=new f$17;function F$c(e,t){return h$18.contains(e.rectangle,t)?e:void 0}function me$6(e){for(var t=Number.MAX_VALUE,i=-Number.MAX_VALUE,n=2,r=e.length;n<r;n+=3){var o=e[n];t=Math.min(t,o),i=Math.max(i,o)}return{min:t,max:i}}function rr(e,t,i){var n=h$18.center(t,new o$1p);n.height=i,n=a$18.toCartesian(n);var r=o$1p.distance(e[0],e[1])/90,o=[];for(let t=0;t<e.length;t++){var a=new o$1p,s=o$1p.subtract(e[t],n,new o$1p);o$1p.normalize(s,s),o$1p.multiplyComponents(s,new o$1p(r,r,r),a),o$1p.subtract(e[t],a,a);var l=a$18.fromCartesian(a),u=e$2a.toDegrees(l.longitude),c=e$2a.toDegrees(l.latitude);o.push(u),o.push(c),o.push(l.height)}return o}function tr$1(e,t){var i=e.mapProjection,n=i.ellipsoid,r=new o$1p,o=new a$18;return n.cartesianToCartographic(t,o),i.project(o,r),o$1p.fromElements(r.z,r.x,r.y)}function he$5(e,t){if(!e$2b(t._surface)||!e$2b(t._surface._tileProvider))return!1;var i=t._surface._tileProvider;if(e$2b(t._slopeSetting)&&i._modifyRegions.values.length>0)return!1;var n=t._surface._levelZeroTiles;if(!e$2b(n))return!1;var r,o,a=n.length;for(o=0;o<a&&(r=n[o],!h$18.contains(r.rectangle,e));++o);if(o>=a)return!1;for(;r._lastSelectionResult===D$J.REFINED;)r=F$c(r.southwestChild,e)||F$c(r.southeastChild,e)||F$c(r.northwestChild,e)||r.northeastChild;for(var s=r.data,l=s.normalTexture,u=s.terrainData.normalTexture;!(u||(r=r.parent,u=r.data.terrainData.normalTexture,l=r.data.normalTexture,r.level<10)););if(!e$2b(u)||!e$2b(l))return!1;var c=parseInt((e.longitude-r.rectangle.west)/(r.rectangle.east-r.rectangle.west)*l.width)+parseInt((r.rectangle.north-e.latitude)/(r.rectangle.north-r.rectangle.south)*l.height)*l.width,h=new o$1p;return h.x=2*(u[3*c]/255-.5),h.y=2*(u[3*c+1]/255-.5),h.z=2*(u[3*c+2]/255-.5),o$1p.normalize(h,h),h}function a$a(){this._colorTexture=void 0,this._depthStencilTexture=void 0,this._globeDepthTexture=void 0,this._tempGlobeDepthTexture=void 0,this._tempCopyDepthTexture=void 0,this._colorRenderBuffer=void 0,this._depthStencilRenderbuffer=void 0,this._copyDepthFramebuffer=void 0,this._tempCopyDepthFramebuffer=void 0,this._updateDepthFramebuffer=void 0,this._framebufferWithTexture=void 0,this._framebufferWithRenderbuffer=void 0,this._isMSAA=!1,this._clearColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._viewport=new f$18,this._rs=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useLogDepth=void 0,this._useHdr=void 0,this._debugGlobeDepthViewportCommand=void 0,this._numSamples=1}function O$a(e,t,i,n){if(!e$2b(e._debugGlobeDepthViewportCommand)||n!==e._useLogDepth){var r=new s$U({defines:[n?"LOG_DEPTH":""],sources:["uniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float z_window = czm_unpackDepth(texture2D(u_depthTexture, v_textureCoordinates));\n z_window = czm_reverseLogDepth(z_window); \n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]});e._debugGlobeDepthViewportCommand=t.createViewportQuadCommand(r,{shaderProgramName:"debugGlobeDepth",uniformMap:{u_depthTexture:function(){return e._globeDepthTexture}},owner:e}),e._useLogDepth=n}e._debugGlobeDepthViewportCommand.execute(t,i)}function M$e(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&!e._depthStencilTexture.isDestroyed()&&e._depthStencilTexture.destroy(),e._globeDepthTexture=e._globeDepthTexture&&!e._globeDepthTexture.isDestroyed()&&e._globeDepthTexture.destroy()}function U$d(e){e._colorRenderBuffer=e._colorRenderBuffer&&!e._colorRenderBuffer.isDestroyed()&&e._colorRenderBuffer.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&!e._depthStencilRenderbuffer.isDestroyed()&&e._depthStencilRenderbuffer.destroy()}function N$8(e){e._framebufferWithTexture=e._framebufferWithTexture&&!e._framebufferWithTexture.isDestroyed()&&e._framebufferWithTexture.destroy(),e._framebufferWithRenderbuffer=e._framebufferWithRenderbuffer&&!e._framebufferWithRenderbuffer.isDestroyed()&&e._framebufferWithRenderbuffer.destroy(),e._copyDepthFramebuffer=e._copyDepthFramebuffer&&!e._copyDepthFramebuffer.isDestroyed()&&e._copyDepthFramebuffer.destroy()}function l$e(e){e._tempCopyDepthFramebuffer=e._tempCopyDepthFramebuffer&&!e._tempCopyDepthFramebuffer.isDestroyed()&&e._tempCopyDepthFramebuffer.destroy(),e._updateDepthFramebuffer=e._updateDepthFramebuffer&&!e._updateDepthFramebuffer.isDestroyed()&&e._updateDepthFramebuffer.destroy(),e._tempGlobeDepthTexture=e._tempGlobeDepthTexture&&!e._tempGlobeDepthTexture.isDestroyed()&&e._tempGlobeDepthTexture.destroy()}function W$f(e,t,i,n,r){e._tempGlobeDepthTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),e._tempCopyDepthFramebuffer=new t$W({context:t,colorTextures:[e._tempGlobeDepthTexture],destroyAttachments:!1}),r.framebuffer.depthStencilTexture,e._isMSAA&&e._depthStencilTexture,e._updateDepthFramebuffer=new t$W({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}function z$b(e,t,i,n,r,o){var a=o?t.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT:_$$.UNSIGNED_BYTE;e._colorTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:a,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),samples:r}),e._depthStencilTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8,samples:r}),e._globeDepthTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})}function I$a(e,t,i,n,r,o){if(!e._isMSAA)return;var a=o?t.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT:_$$.UNSIGNED_BYTE;const s=M$13.getColorFormat(a);e._colorRenderBuffer=new r$$({context:t,width:i,height:n,pixelDatatype:a,format:s,samples:r}),e._depthStencilRenderbuffer=new r$$({context:t,width:i,height:n,format:M$13.DEPTH_STENCIL,samples:r})}function V$c(e,t){e._isMSAA&&(e._framebufferWithRenderbuffer=new t$W({context:t,colorRenderbuffers:[e._colorRenderBuffer],depthStencilRenderbuffer:e._depthStencilRenderbuffer,destroyAttachments:!1})),e._framebufferWithTexture=new t$W({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._copyDepthFramebuffer=new t$W({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}function H$f(e,t,i,n,r,o){!t.webgpu&&r>1&&(e._isMSAA=!0);var a=e._colorTexture,s=!e$2b(a)||a.width!==i||a.height!==n||o!==e._useHdr||r!==e._numSamples;(!e$2b(e._framebufferWithTexture)||s)&&(M$e(e),N$8(e),z$b(e,t,i,n,r,o),I$a(e,t,i,n,r,o),V$c(e,t))}function w$b(e,t,i,n,r){e._viewport.width=i,e._viewport.height=n;var o=!f$18.equals(e._viewport,r.viewport),a=o!==e._useScissorTest;e._useScissorTest=o,f$18.equals(e._scissorRectangle,r.viewport)||(e._scissorRectangle=f$18.clone(r.viewport,e._scissorRectangle),a=!0),(!e$2b(e._rs)||!f$18.equals(e._viewport,e._rs.viewport)||a)&&(e._rs=d$1m.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsUpdate=d$1m.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!1,frontFunction:m$X.EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.KEEP},backFunction:m$X.NEVER,reference:u$N.CESIUM_3D_TILE_MASK,mask:u$N.CESIUM_3D_TILE_MASK}})),e$2b(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(t.webgpu?C$14:v$O,{shaderProgramName:"copyDepthGlobeDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e._depthStencilTexture}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer,e._copyDepthCommand.renderState=e._rs,e$2b(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(ie$6,{shaderProgramName:"copyColorGlobeDepth",uniformMap:{colorTexture:function(){return e._colorTexture}},owner:e})),e$2b(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(t.webgpu?C$14:v$O,{shaderProgramName:"tempCopyDepthGlobeDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer,e._tempCopyDepthCommand.renderState=e._rs,e$2b(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(ie$6,{shaderProgramName:"updateDepthGlobeDepth",uniformMap:{colorTexture:function(){return e._tempGlobeDepthTexture}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer,e._updateDepthCommand.renderState=e._rsUpdate,e$2b(e._clearColorCommand)||(e._clearColorCommand=new t$X({color:new e$1U(0,0,0,0),stencil:0,owner:e})),e._isMSAA?e._clearColorCommand.framebuffer=e._framebufferWithRenderbuffer:e._clearColorCommand.framebuffer=e._framebufferWithTexture}function p$8(){this._framebuffer=new s$g({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new s$g,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new f$18,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}function C$d(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function S$a(e,t,i,n,r){const o=r?t.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT:_$$.UNSIGNED_BYTE;e._framebuffer.update(t,i,n,1,o),e._packedDepthFramebuffer.update(t,i,n)}function k$9(e,t,i,n,r){e._viewport.width=i,e._viewport.height=n;const o=!f$18.equals(e._viewport,r.viewport);let a=o!==e._useScissorTest;e._useScissorTest=o,f$18.equals(e._scissorRectangle,r.viewport)||(e._scissorRectangle=f$18.clone(r.viewport,e._scissorRectangle),a=!0),(!e$2b(e._renderState)||!f$18.equals(e._viewport,e._renderState.viewport)||a)&&(e._renderState=d$1m.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),e$2b(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(t.webgpu?C$14:v$O,{shaderProgramName:"globeTranslucency_packedDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),e$2b(e._clearCommand)||(e._clearCommand=new t$X({color:new e$1U(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer.framebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e.classificationFramebuffer,e._clearCommand.renderState=e._renderState}h$d.prototype.getHeight=function(e){if(!e$2b(e))throw new t$16("cartographic is required");var t=this._surface._levelZeroTiles;if(e$2b(t)){var i,n,r=t.length;for(n=0;n<r&&(i=t[n],!h$18.contains(i.rectangle,e));++n);if(!(n>=r)){for(;i._lastSelectionResult===D$J.REFINED;)i=F$c(i.southwestChild,e)||F$c(i.southeastChild,e)||F$c(i.northwestChild,e)||i.northeastChild;if(e$2b(i.data)&&e$2b(i.data.renderedMesh)){var o=this._surface._tileProvider.tilingScheme.ellipsoid,a=o$1p.fromRadians(e.longitude,e.latitude,0,o,Je$2),s=er,l=o.geodeticSurfaceNormal(a,s.direction);if(!e$2b(o.getSurfaceNormalIntersectionWithZAxis(a,11500,s.origin))){var u=Math.min(u$_(i.data.minimumHeight,0),-11500),c=o$1p.multiplyByScalar(l,Math.abs(u)+1,ue$6);o$1p.subtract(a,c,s.origin)}if(e$2b(i.data.terrainData)&&i.data.terrainData instanceof p$O)return i.data.terrainData.interpolateHeight(i.rectangle,e.longitude,e.latitude);var h=i.data.pick(s,void 0,void 0,!1,ue$6);if(e$2b(h))return o.cartesianToCartographic(h,$e$2).height}}}},h$d.prototype.update=function(e){!this.show||(e.passes.render&&this._surface.update(e),e.rasterVectorCollection=this._rasterVectorCollection,this.computeGlobeBottomLevel(e))},h$d.prototype.computeGlobeBottomLevel=function(e){for(var t=e.camera.frustum.fov,i=512/Math.tan(.5*t),n=e.camera.position,r=new a$18.fromCartesian(n),o=new o$1p.fromRadians(r.longitude,r.latitude,0),a=i/o$1p.distance(n,o),s=0,l=0;l<22;l++){var u=1<<l,c=Math.PI/u,h=o$1p.fromRadians(r.longitude+.5*c,r.latitude+.5*c),d=o$1p.fromRadians(r.longitude+.5*c,r.latitude-.5*c),f=o$1p.fromRadians(r.longitude-.5*c,r.latitude-.5*c),p=o$1p.fromRadians(r.longitude-.5*c,r.latitude+.5*c),_=o$1p.distance(h,d),m=o$1p.distance(d,f),g=o$1p.distance(f,p),x=o$1p.distance(p,h);if(Math.max(Math.max(Math.max(_,m),g),x)/8*a<32||21==l){s=l;break}}e.globeBottomLevel=s},h$d.prototype.beginFrame=function(e){var t=this._surface,i=t.tileProvider,n=this.terrainProvider,r=this.showWaterEffect&&n.ready&&n.hasWaterMask;if(this._sceneMode=e.mode,r&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;var o=this._oceanNormalMapResource,a=o.url;if(e$2b(a)){var s=this;o$1l(o.fetchImage(),(function(t){a===s._oceanNormalMapResource.url&&(s._oceanNormalMap=s._oceanNormalMap&&s._oceanNormalMap.destroy(),s._oceanNormalMap=new t$V({context:e.context,source:t}))}))}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}var l=e.passes,u=e.mode;l.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,t.tileCacheSizeForMVT=this.tileCacheSizeForMVT,t.loadingDescendantLimit=this.loadingDescendantLimit,t.preloadAncestors=this.preloadAncestors,t.preloadSiblings=this.preloadSiblings,i.terrainProvider=this.terrainProvider,i.lightingFadeOutDistance=this.lightingFadeOutDistance,i.lightingFadeInDistance=this.lightingFadeInDistance,i.nightFadeOutDistance=this.nightFadeOutDistance,i.nightFadeInDistance=this.nightFadeInDistance,i.zoomedOutOceanSpecularIntensity=u===C$13.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,i.hasWaterMask=r,i.oceanNormalMap=this._oceanNormalMap,i.enableLighting=this.enableLighting,i.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,i.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,i.showGroundAtmosphere=this.showGroundAtmosphere,i.shadows=this.shadows,i.hueShift=this.atmosphereHueShift,i.saturationShift=this.atmosphereSaturationShift,i.brightnessShift=this.atmosphereBrightnessShift,i.fillHighlightColor=this.fillHighlightColor,i.showSkirts=this.showSkirts,i.backFaceCulling=this.backFaceCulling,i.clippingType=this.clippingType,i.showExcavationSide=this.showExcavationSide,i.excavationNormalTextureUrl=this._excavationNormalTextureUrl,i.excavationSideNormalTextureUrl=this._excavationSideNormalTextureUrl,t.beginFrame(e))},h$d.prototype.render=function(e){if(this.show){e$2b(this._material)&&this._material.update(e.context);var t=this._surface,i=e.passes;i.render&&t.render(e),i.pick&&t.render(e)}},h$d.prototype.endFrame=function(e){!this.show||e.passes.render&&this._surface.endFrame(e)},h$d.prototype.isDestroyed=function(){return!1},h$d.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),i$10(this)},h$d.prototype.addModifyRegion=function(e){var t=e.name,i=e.position;if(!e$2b(t)||!e$2b(i))return!1;var n=this._surface._tileProvider;if(n._modifyRegions.contains(t))return!1;var r=me$6(i),o=r.min,a=r.max,s=o$1p.fromDegreesArrayHeights(i),l=z$_.createGeometry(new z$_({polygonHierarchy:{positions:s},extrudedHeight:Math.min(-1e3,o),perPositionHeight:!0})),u=z$_.createGeometry(new z$_({polygonHierarchy:{positions:s},perPositionHeight:!0})),c=h$18.fromCartesianArray(s),h={geometry:l,worldGeometry:u,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),rectangle:c,minimumHeight:Math.min(-1e3,o),maximumHeight:a,command:void 0};return n._modifyRegions.set(t,h),n._modifyRegionUpdate=!0,!0},h$d.prototype.removeModifyRegion=function(e){var t=this._surface._tileProvider,i=t._modifyRegions;if(i.contains(e)){var n=i.get(e);e$2b(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),n.command=void 0,t._modifyRegions.remove(e),t._modifyRegionUpdate=!0}},h$d.prototype.removeAllModifyRegion=function(){for(var e=this._surface._tileProvider,t=Object.keys(e._modifyRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeModifyRegion(r)}e._modifyRegions.removeAll()},h$d.prototype.addExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(!e$2b(t)||!e$2b(i)||!e$2b(n))return!1;var r=this._surface._tileProvider;if(r._excavateRegions.contains(t))return!1;var o=i.length;i.length/3%2!=0&&(i.push(i[o-1-2]),i.push(i[o-1-1]),i.push(i[o-1]));for(var a=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),s=Number.MAX_VALUE,l=0,u=i.length;l<u;l+=3)s=Math.min(s,i[l+2]);var c=z$_.createGeometry(a),h=z$_.createGeometry(a),d=z$_.createGeometry(a),f=o$1p.fromDegreesArrayHeights(i),p={rectangle:h$18.fromCartesianArray(f),geometry:c,worldGeometry:h,colorGeometry:d,positions:i,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),command:void 0,name:t,height:s-n};return r._excavateRegions.set(t,p),r._excavateRegionUpdate=!0,r._excavateTransparent=u$_(e.transparent,!0),r._excavateTextureWrap=u$_(e.textureWrap,q$19.REPEAT),r._excavateExtendHeight=n,!0},h$d.prototype.removeExcavationRegion=function(e){var t=this._surface._tileProvider,i=t._excavateRegions;if(i.contains(e)){t._removeExcavationCommands(e);var n=i.get(e);e$2b(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),e$2b(n.removeListenerFunc)&&n.removeListenerFunc(),n.command=void 0,i.remove(e),0===i.length&&(t._onceExcavateRegionsEmpty=!0),t._excavateRegionUpdate=!0}},h$d.prototype.removeAllExcavationRegion=function(){var e=this._surface._tileProvider;e._removeAllExcavationCommands();for(var t=Object.keys(e._excavateRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeExcavationRegion(r)}e._excavateRegions.removeAll()},h$d.prototype.addExtractRegion=function(e){var t=e.name,i=e.position,n=e.height,r=u$_(e.extractHeight,100),o=u$_(e.granularity,1);if(!e$2b(t)||!e$2b(i)||!e$2b(n))return!1;var a=this._surface._tileProvider;if(a._extractRegions.contains(t))return!1;var s=1,l=[],u=o$1p.fromDegreesArrayHeights(i);let c=[...u,u[0]];for(let e=1;e<c.length;e++){s+=o$1p.distance(c[e-1],c[e]),l.push(s)}var h=i.length;i.length/3%2!=0&&(i.push(i[h-1-2]),i.push(i[h-1-1]),i.push(i[h-1]));var d=me$6(i),f=d.min,p=d.max;p+=r;var _=o$1p.fromDegreesArrayHeights(i),m=h$18.fromCartesianArray(_),g=Math.PI/Math.pow(2,11);g=g/64*o;var x=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)},granularity:g});i=rr(_,m,p);var v=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),y={rectangle:m,geometry:z$_.createGeometry(v),geometry_extract:z$_.createGeometry(x),colorGeometry:z$_.createGeometry(v),worldGeometry:z$_.createGeometry(v),positions:i,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),command:void 0,name:t,height:f-n,minimumHeight:Math.min(0,f),maximumHeight:p,sideLengths:l,round:s};return a._extractRegions.set(t,y),a._extractRegionsUpdate=!0,a._extractTransparent=u$_(e.transparent,!0),a._extractTextureWrap=u$_(e.textureWrap,q$19.REPEAT),a._extractExtendHeight=r,a._excavateTransparent=u$_(e.transparent,!0),a._excavateTextureWrap=u$_(e.textureWrap,q$19.REPEAT),!0},h$d.prototype.removeExtractRegion=function(e){var t=this._surface._tileProvider,i=t._extractRegions;if(i.contains(e)){t._removeExtractCommands(e);var n=i.get(e);e$2b(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),n.command=void 0,i.remove(e),0===i.length&&(t._onceExcavateRegionsEmpty=!0),t._extractRegionsUpdate=!0,n.command=void 0,t._modifyRegions.remove(e),t._modifyRegionUpdate=!0,t._extractExtendHeight=void 0}},h$d.prototype.removeAllExtractRegion=function(){var e=this._surface._tileProvider;e._removeAllExtractCommands();for(var t=Object.keys(e._extractRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeExtractRegion(r)}e._extractRegions.removeAll(),e._extractExtendHeight=void 0},h$d.prototype.addImageryClipRegions=function(e){var t=e.name,i=e.position;if(e$2b(t)&&e$2b(i)&&e$2b(e.layers)){var n=this._surface._tileProvider;if(n._imageryClipRegions.contains(t))return!1;for(var r=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),o=z$_.createGeometry(r),a=z$_.createGeometry(r),s=o$1p.fromDegreesArrayHeights(i),l={rectangle:h$18.fromCartesianArray(s),geometry:o,worldGeometry:a,positions:i,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),command:void 0,name:t},u=0,c=e.layers.length;u<c;u++)e.layers[u].enableImageryClip=!0;n._imageryClipRegions.set(t,l),n._imageryClipRegionUpate=!0}},h$d.prototype.removeImageryClipRegion=function(e,t){var i=this._surface._tileProvider,n=i._imageryClipRegions;if(n.contains(e)){var r=n.get(e);if(e$2b(r.command)&&(r.command.vertexArray=r.command.vertexArray&&!r.command.vertexArray.isDestroyed()&&r.command.vertexArray.destroy(),r.command.shaderProgram=r.command.shaderProgram&&!r.command.shaderProgram.isDestroyed()&&r.command.shaderProgram.destroy()),r.command=void 0,n.remove(e),0===n.length){for(var o=0,a=t.length;o<a;o++)t[o].enableImageryClip=!1;i._onceImageryClipRegionsEmpty=!0}i._imageryClipRegionUpate=!0}},h$d.prototype.clearCustomClipBox=function(){this.clippingPlanes=void 0},h$d.prototype.setCustomClipBox=function(e){if(!(e.dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$16("globe box clip, position and dimensions is required!");if(e.dimensions){var t,i=e.position,n=new i$15(e$2b(e.heading)?e.heading:0,e$2b(e.pitch)?e.pitch:0,e$2b(e.roll)?e.roll:0);if(this._sceneMode===C$13.SCENE3D)t=m$17.headingPitchRollToFixedFrame(i,n,t$13.WGS84,m$17.eastNorthUpToFixedFrame,new p$1d);else{var r=tr$1(this._scene,i);t=p$1d.setTranslation(p$1d.clone(p$1d.IDENTITY),r,new p$1d)}var o=-.5*e.dimensions.x,a=-.5*e.dimensions.y,s=-.5*e.dimensions.z;e$2b(e.clipLineColor)?e.clipLineColor:e$1U.WHITE;var l=[new a$I(new o$1p(1,0,0),o),new a$I(new o$1p(-1,0,0),o),new a$I(new o$1p(0,1,0),a),new a$I(new o$1p(0,-1,0),a),new a$I(new o$1p(0,0,1),s),new a$I(new o$1p(0,0,-1),s)]}else{l=[];for(var u=0;u<e.planePos.length;u++){var c=e.planePos[u],h=e.planeNormal[u],d=-o$1p.dot(h,c);l.push(new a$I(h,d))}}return this.clippingPlanes=new h$K({modelMatrix:t,planes:l,edgeWidth:1,edgeColor:e$1U.WHITE,unionClippingRegions:!e$2b(e.dimensions),enabled:!0}),!0},h$d.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._surface._tileProvider._polygonOffset.enabled=!0,o$1o.fromElements(e,t,this._surface._tileProvider._polygonOffset.value)):(this._surface._tileProvider._polygonOffset.enabled=!1,o$1o.fromElements(0,0,this._surface._tileProvider._polygonOffset.value))},h$d.prototype.hasTerrainAnalysis=function(){if(!e$2b(this._surface)||!e$2b(this._surface._tileProvider))return!1;var e=this._surface._tileProvider;return!!(e$2b(e._excavateRegions)&&e._excavateRegions.values.length>0||e$2b(e._modifyRegions)&&e._modifyRegions.values.length>0||e$2b(e._hypsometricSetting)&&e._hypsometricSetting.CoverageArea.length>0||e$2b(e._slopeSetting)&&e._slopeSetting.CoverageArea.length>0)},h$d.prototype.getSlopeValue=function(e){var t=he$5(e,this);return t?Math.acos(Math.abs(t.z))*e$2a.DEGREES_PER_RADIAN:0},h$d.prototype.getSlopeDirectionValue=function(e){var t=he$5(e,this);if(!t)return 0;t.z=0;var i=o$1p.angleBetween(t,o$1p.UNIT_Y);return i=i/e$2a.PI*180,i=o$1p.dot(t,o$1p.UNIT_X)<0?360-i:i},h$d.prototype.setPBRMaterialFromJSON=function(e){if(LicenseChecker.LICENSECHECKER.verify("Globe_setPBRMaterial"),this._surface.tileProvider._pbrParameter===je$g.NONE){var t=this;u$Q(e).then((function(e){var i=e.material,n=i.pbrMetallicRoughness;i.textureunitstates,t._surface.tileProvider._PBRMaterialParams.baseColorFactor=e$2b(n.baseColor)?e$29.fromElements(n.baseColor.x,n.baseColor.y,n.baseColor.z,n.baseColor.w):t._surface.tileProvider._PBRMaterialParams.baseColorFactor,t._surface.tileProvider._PBRMaterialParams.baseColorTextureIndex=e$2b(n.baseColorTextureIndex)?n.baseColorTextureIndex:t._surface.tileProvider._PBRMaterialParams.baseColorTextureIndex,t._surface.tileProvider._PBRMaterialParams.emissionFactor=e$2b(n.emissiveFactor)?o$1p.fromElements(n.emissiveFactor.x,n.emissiveFactor.y,n.emissiveFactor.z):t._surface.tileProvider._PBRMaterialParams.emissionFactor,t._surface.tileProvider._PBRMaterialParams.emissionTextureIndex=e$2b(n.emissiveTextureIndex)?n.emissiveTextureIndex:-1,t._surface.tileProvider._PBRMaterialParams.metallic=e$2b(n.metallicFactor)?n.metallicFactor:t._surface.tileProvider._PBRMaterialParams.metallic,t._surface.tileProvider._PBRMaterialParams.roughness=e$2b(n.roughnessFactor)?n.roughnessFactor:t._surface.tileProvider._PBRMaterialParams.roughness,t._surface.tileProvider._PBRMaterialParams.occlusionTextureIndex=e$2b(n.occlusionTextureIndex)?n.occlusionTextureIndex:-1,t._surface.tileProvider._PBRMaterialParams.normalTextureIndex=e$2b(n.normalTextureIndex)?n.normalTextureIndex:-1}))}},h$d.prototype.removePBRMaterial=function(){this._surface.tileProvider._PBRMaterialParams={metallic:0,roughness:0,baseColorFactor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissionFactor:o$1p.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1}},h$d.prototype._setFloodTexture=function(e,t){this._floodFlagTexture=e,this._floodRect=t},h$d.prototype._removeFloodTexture=function(){this._floodFlagTexture=void 0,this._floodRect=void 0},h$d.prototype.removeRasterRegions=function(){var e=this._surface._tileProvider,t=e._clipRasterTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1}e._clipRasterTilesMap={}},Object.defineProperties(a$a.prototype,{framebuffer:{get:function(){return this._isMSAA?this._framebufferWithRenderbuffer:this._framebufferWithTexture}},framebufferWithTexture:{get:function(){return this._framebufferWithTexture}},depthStencilTexture:{get:function(){return this._depthStencilTexture}}}),a$a.prototype.executeDebugGlobeDepth=function(e,t,i){O$a(this,e,t,i)},a$a.prototype.update=function(e,t,i,n,r){var o=i.width,a=i.height;H$f(this,e,o,a,n,r),w$b(this,e,o,a,t),e.uniformState.globeDepthTexture=void 0,this._numSamples=n,this._useHdr=r},a$a.prototype.executeCopyDepth=function(e,t){e$2b(this._copyDepthCommand)&&(this.prepareColorTextures(e,!1),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture)},a$a.prototype.executeUpdateDepth=function(e,t,i){var n=t.framebuffer.depthStencilTexture;if(!e$2b(n)||!i&&n===this._depthStencilTexture)if(this._isMSAA&&i){if(e$2b(this._updateDepthCommand)){if(!e$2b(this._updateDepthFramebuffer)||this._updateDepthFramebuffer.getColorTexture(0)!==this._globeDepthTexture){r=this._globeDepthTexture.width,o=this._globeDepthTexture.height;l$e(this),W$f(this,e,r,o,t),w$b(this,e,r,o,t)}this.prepareColorTextures(e,!1),this._tempCopyDepthTexture=this._depthStencilTexture,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture}}else e$2b(this._copyDepthCommand)&&(this.prepareColorTextures(e,!1),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture);else if(e$2b(this._updateDepthCommand)){if(!e$2b(this._updateDepthFramebuffer)||this._updateDepthFramebuffer.getColorTexture(0)!==this._globeDepthTexture){var r=this._globeDepthTexture.width,o=this._globeDepthTexture.height;l$e(this),W$f(this,e,r,o,t),w$b(this,e,r,o,t)}this._tempCopyDepthTexture=n,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture}},a$a.prototype.executeCopyColor=function(e,t){e$2b(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)},a$a.prototype.prepareColorTextures=function(e,t){this._numSamples>1&&t$W.blitFramebuffers(e,this._framebufferWithRenderbuffer,this._framebufferWithTexture,t)},a$a.prototype.clear=function(e,t,i){var n=this._clearColorCommand;e$2b(n)&&(e$1U.clone(i,n.color),n.execute(e,t))},a$a.prototype.isDestroyed=function(){return!1},a$a.prototype.destroy=function(){M$e(this),U$d(this),N$8(this),l$e(this),e$2b(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),e$2b(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy());var e=this._debugGlobeDepthViewportCommand;return e$2b(e)&&(e.shaderProgram=e.shaderProgram.destroy()),i$10(this)},Object.defineProperties(p$8.prototype,{classificationTexture:{get:function(){return this._framebuffer.getColorTexture()}},classificationFramebuffer:{get:function(){return this._framebuffer.framebuffer}},packedDepthFramebuffer:{get:function(){return this._packedDepthFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._framebuffer.getDepthStencilTexture()}},depthStencilRenderbuffer:{get:function(){return this._framebuffer.getDepthStencilRenderbuffer()}},packedDepthTexture:{get:function(){return this._packedDepthFramebuffer.getColorTexture()}}}),p$8.prototype.updateAndClear=function(e,t,i,n){const r=t.width,o=t.height;S$a(this,i,r,o,e),k$9(this,i,r,o,n),this._useHdr=e},p$8.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)},p$8.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture},p$8.prototype.isDestroyed=function(){return!1},p$8.prototype.destroy=function(){return C$d(this),i$10(this)};const u$c={OPAQUE_FRONT_FACE:0,OPAQUE_BACK_FACE:1,DEPTH_ONLY_FRONT_FACE:2,DEPTH_ONLY_BACK_FACE:3,DEPTH_ONLY_FRONT_AND_BACK_FACE:4,TRANSLUCENT_FRONT_FACE:5,TRANSLUCENT_BACK_FACE:6,TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:7,TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:8,PICK_FRONT_FACE:9,PICK_BACK_FACE:10,DERIVED_COMMANDS_MAXIMUM_LENGTH:11},p$7=u$c.DERIVED_COMMANDS_MAXIMUM_LENGTH,q$b=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function F$b(){this._frontFaceAlphaByDistance=new o$Y(0,1,0,1),this._backFaceAlphaByDistance=new o$Y(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=h$18.clone(h$18.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(p$7),this._derivedBlendCommandTypes=new Array(p$7),this._derivedPickCommandTypes=new Array(p$7),this._derivedCommandTypesToUpdate=new Array(p$7),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}function z$a(e,t,i,n){return e?e$2b(i)?(o$Y.clone(i,n),n.nearValue*=t,n.farValue*=t,n):(n.nearValue=t,n.farValue=t,n):(n.nearValue=1,n.farValue=1,n)}function Y$7(e,t,i){return e&&(i.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function se$4(e,t){const i=e._frontFaceTranslucent,n=e._backFaceTranslucent;return i&&(t.cameraUnderground||n)}function le$7(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function ue$5(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function me$5(e,t,i){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!i.depthTestAgainstTerrain&&t.mode!==C$13.SCENE2D&&t.context.depthTexture}function fe$3(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function he$4(e,t){e._derivedCommandsLength=U$c(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=U$c(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=U$c(e,t,!1,!0,e._derivedPickCommandTypes);let i,n=0;for(i=0;i<e._derivedCommandsLength;++i)n|=1<<e._derivedCommandTypes[i];for(i=0;i<e._derivedBlendCommandsLength;++i)n|=1<<e._derivedBlendCommandTypes[i];for(i=0;i<e._derivedPickCommandsLength;++i)n|=1<<e._derivedPickCommandTypes[i];let r=0;for(i=0;i<p$7;++i)(n&1<<i)>0&&(e._derivedCommandTypesToUpdate[r++]=i);e._derivedCommandsToUpdateLength=r;const o=n!==e._derivedCommandKey;e._derivedCommandKey=n,e._derivedCommandsDirty=o,!e$2b(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=Se$3())}function U$c(e,t,i,n,r){let o=0;const a=e._frontFaceTranslucent,s=e._backFaceTranslucent;if(!a)return o;const l=t.cameraUnderground,u=e._requiresManualDepthTest,c=n?u$c.PICK_FRONT_FACE:u?u$c.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:u$c.TRANSLUCENT_FRONT_FACE,h=n?u$c.PICK_BACK_FACE:u?u$c.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:u$c.TRANSLUCENT_BACK_FACE;return t.mode===C$13.SCENE2D?(r[o++]=u$c.DEPTH_ONLY_FRONT_FACE,r[o++]=c,o):(s?(i||(r[o++]=u$c.DEPTH_ONLY_FRONT_AND_BACK_FACE),l?(r[o++]=c,r[o++]=h):(r[o++]=h,r[o++]=c)):l?(i||(r[o++]=u$c.DEPTH_ONLY_BACK_FACE),r[o++]=u$c.OPAQUE_FRONT_FACE,r[o++]=h):(i||(r[o++]=u$c.DEPTH_ONLY_FRONT_FACE),r[o++]=u$c.OPAQUE_BACK_FACE,r[o++]=c),o)}function h$c(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}function Q$6(e,t){return e.indexOf(t)>-1}function _e$3(e,t){h$c(e.defines,"TRANSLUCENT"),h$c(t.defines,"TRANSLUCENT")}function Te$4(e,t){h$c(e.defines,"GROUND_ATMOSPHERE"),h$c(t.defines,"GROUND_ATMOSPHERE"),h$c(e.defines,"FOG"),h$c(t.defines,"FOG"),h$c(e.defines,"TRANSLUCENT"),h$c(t.defines,"TRANSLUCENT")}function M$d(e,t){if(Q$6(t.defines,"TILE_LIMIT_RECTANGLE")||Q$6(t.defines,"ENABLE_CLIPPING_PLANES"))return;t.sources=["void main() \n{ \n gl_FragColor = vec4(1.0); \n} \n"]}function B$8(e,t){const i=t.sources,n=i.length;for(let e=0;e<n;++e)i[e]=s$U.replaceMain(i[e],"czm_globe_translucency_main");i.push("\n\nuniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n#ifdef MANUAL_DEPTH_TEST \n float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st)); \n if (logDepthOrDepth != 0.0) \n { \n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); \n float depthEC = eyeCoordinate.z / eyeCoordinate.w; \n if (v_positionEC.z < depthEC) \n { \n discard; \n } \n } \n#endif \n czm_globe_translucency_main(); \n vec4 classificationColor = texture(u_classificationTexture, st); \n if (classificationColor.a > 0.0) \n { \n // Reverse premultiplication process to get the correct composited result of the classification primitives \n classificationColor.rgb /= classificationColor.a; \n } \n gl_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + gl_FragColor * (1.0 - classificationColor.a); \n} \n")}function X$8(e,t){B$8(e,t),h$c(e.defines,"GROUND_ATMOSPHERE"),h$c(t.defines,"GROUND_ATMOSPHERE"),h$c(e.defines,"FOG"),h$c(t.defines,"FOG")}function Ce$3(e,t){B$8(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function ge$6(e,t){X$8(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function j$b(e,t){t.sources=["uniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n vec4 pickColor = texture(u_classificationTexture, st); \n if (pickColor == vec4(0.0)) \n { \n discard; \n } \n gl_FragColor = pickColor; \n} \n"]}function pe$5(e,t,i,n,r,o){if(!e$2b(r))return t;if(!n&&e$2b(i))return i;let a=e.shaderCache.getDerivedShaderProgram(t,o);if(!e$2b(a)){const i=t._attributeLocations,n=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();n.defines=e$2b(n.defines)?n.defines.slice(0):[],s.defines=e$2b(s.defines)?s.defines.slice(0):[],r(n,s),a=e.shaderCache.createDerivedShaderProgram(t,o,{vertexShaderSource:n,fragmentShaderSource:s,attributeLocations:i})}return a}function Fe$4(e){e.cull.face=G$17.BACK,e.cull.enabled=!0}function Ae$5(e){e.cull.face=G$17.FRONT,e.cull.enabled=!0}function De$4(e){e.cull.face=G$17.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function Ee$5(e){e.cull.face=G$17.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function ye$3(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function J$6(e){e.cull.face=G$17.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=Ee$r.ALPHA_BLEND}function W$e(e){e.cull.face=G$17.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=Ee$r.ALPHA_BLEND}function ve$4(e){e.cull.face=G$17.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function Ne$3(e){e.cull.face=G$17.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function Oe$4(e,t,i,n,r){if(!e$2b(n))return e;if(!i&&e$2b(t))return t;let o=r[e.id];if(!e$2b(o)){const t=d$1m.getState(e);n(t),o=d$1m.fromCache(t),r[e.id]=o}return o}function E$b(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function be$3(e,t,i,n,r){return e$2b(r)?!n&&e$2b(i)?i:p$19(t,r(e),!1):t}function _$d(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function Se$3(){return[new _$d({pass:Le$s.GLOBE,pickOnly:!1,getShaderProgramFunction:_e$3,getRenderStateFunction:Fe$4,getUniformMapFunction:void 0}),new _$d({pass:Le$s.GLOBE,pickOnly:!1,getShaderProgramFunction:Te$4,getRenderStateFunction:Ae$5,getUniformMapFunction:void 0}),new _$d({pass:Le$s.GLOBE,pickOnly:!1,getShaderProgramFunction:M$d,getRenderStateFunction:De$4,getUniformMapFunction:void 0}),new _$d({pass:Le$s.GLOBE,pickOnly:!1,getShaderProgramFunction:M$d,getRenderStateFunction:Ee$5,getUniformMapFunction:void 0}),new _$d({pass:Le$s.GLOBE,pickOnly:!1,getShaderProgramFunction:M$d,getRenderStateFunction:ye$3,getUniformMapFunction:void 0}),new _$d({pass:Le$s.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:B$8,getRenderStateFunction:J$6,getUniformMapFunction:E$b}),new _$d({pass:Le$s.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:X$8,getRenderStateFunction:W$e,getUniformMapFunction:E$b}),new _$d({pass:Le$s.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Ce$3,getRenderStateFunction:J$6,getUniformMapFunction:E$b}),new _$d({pass:Le$s.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:ge$6,getRenderStateFunction:W$e,getUniformMapFunction:E$b}),new _$d({pass:Le$s.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:j$b,getRenderStateFunction:ve$4,getUniformMapFunction:E$b}),new _$d({pass:Le$s.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:j$b,getRenderStateFunction:Ne$3,getUniformMapFunction:E$b})]}Object.defineProperties(F$b.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}}),F$b.prototype.update=function(e){const t=e.globe;if(!e$2b(t)||!t.show)return this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,void(this._useDepthPlane=!1);this._frontFaceAlphaByDistance=z$a(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=z$a(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=Y$7(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=Y$7(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=me$5(this,e,t),this._sunVisibleThroughGlobe=se$4(this,e),this._environmentVisible=le$7(this,e),this._useDepthPlane=ue$5(this,e),this._numberOfTextureUniforms=fe$3(this),this._rectangle=h$18.clone(t.translucency.rectangle,this._rectangle),he$4(this,e)};const Z$a=new Array(p$7),$$a=new Array(p$7);function Pe$2(e,t,i,n,r,o,a){let s=t.derivedCommands.globeTranslucency;const l=e._derivedCommandsDirty;if(t.dirty||!e$2b(s)||l){t.dirty=!1,e$2b(s)||(s={},t.derivedCommands.globeTranslucency=s);const l=a.frameNumber,u=u$_(s.uniformMapDirtyFrame,0),c=u$_(s.shaderProgramDirtyFrame,0),h=u$_(s.renderStateDirtyFrame,0),d=s.uniformMap!==t.uniformMap,f=s.shaderProgramId!==t.shaderProgram.id,p=s.renderStateId!==t.renderState.id;d&&(s.uniformMapDirtyFrame=l),f&&(s.shaderProgramDirtyFrame=l),p&&(s.renderStateDirtyFrame=l),s.uniformMap=t.uniformMap,s.shaderProgramId=t.shaderProgram.id,s.renderStateId=t.renderState.id;for(let _=0;_<i;++_){const i=o[_],m=n[_],g=r[_];let x,v,y,$=s[g];e$2b($)?(x=$.uniformMap,v=$.shaderProgram,y=$.renderState):(x=void 0,v=void 0,y=void 0),$=i$_.shallowClone(t,$),s[g]=$;const b=u$_($.derivedCommands.uniformMapDirtyFrame,0),T=u$_($.derivedCommands.shaderProgramDirtyFrame,0),C=u$_($.derivedCommands.renderStateDirtyFrame,0),S=d||b<u,w=f||T<c,E=p||C<h;S&&($.derivedCommands.uniformMapDirtyFrame=l),w&&($.derivedCommands.shaderProgramDirtyFrame=l),E&&($.derivedCommands.renderStateDirtyFrame=l),$.derivedCommands.type=m,$.pass=i.pass,$.pickOnly=i.pickOnly,$.uniformMap=be$3(e,t.uniformMap,x,S,i.getUniformMapFunction),$.shaderProgram=pe$5(a.context,t.shaderProgram,v,w,i.getShaderProgramFunction,g),$.renderState=Oe$4(t.renderState,y,E,i.getRenderStateFunction,i.renderStateCache)}}}function ee$5(e,t,i,n,r,o,a){for(let s=0;s<t;++s){const t=e[s],l=t.derivedCommands.type;(!e$2b(a)||a.indexOf(l)>-1)&&i(t,n,r,o)}}function ne$6(e,t,i,n,r,o){for(let a=0;a<t;++a)i(e[a],n,r,o)}F$b.prototype.updateDerivedCommands=function(e,t){const i=this._derivedCommandTypesToUpdate,n=this._derivedCommandsToUpdateLength;if(0!==n){for(let e=0;e<n;++e)$$a[e]=this._derivedCommandPacks[i[e]],Z$a[e]=q$b[i[e]];Pe$2(this,e,n,i,Z$a,$$a,t)}},F$b.prototype.pushDerivedCommands=function(e,t,i){const n=i.passes.pick;if(n&&t)return;let r=this._derivedCommandTypes,o=this._derivedCommandsLength;if(n?(r=this._derivedPickCommandTypes,o=this._derivedPickCommandsLength):t&&(r=this._derivedBlendCommandTypes,o=this._derivedBlendCommandsLength),0===o)return void i.commandList.push(e);const a=e.derivedCommands.globeTranslucency;for(let e=0;e<o;++e){const t=q$b[r[e]];i.commandList.push(a[t])}};const Le$5=[u$c.OPAQUE_FRONT_FACE,u$c.OPAQUE_BACK_FACE],Re$4=[u$c.DEPTH_ONLY_FRONT_FACE,u$c.DEPTH_ONLY_BACK_FACE,u$c.DEPTH_ONLY_FRONT_AND_BACK_FACE];function v$b(){this._image=new Image}function h$b(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url)&&!e$2b(e.metadata))throw new t$16("options.url or options.metadata is required.");var t;if(e$2b(e.metadata))t=e.metadata;else{var i=t$11.createIfNeeded(e.url);t=new c$F(i)}this._metadata=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new g$13({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new h$18(-e$2a.PI,-e$2a.PI,e$2a.PI,e$2a.PI),ellipsoid:e.ellipsoid});var n=e.credit;"string"==typeof n&&(n=new r$T(n)),this._credit=n,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,e$2b(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new v$b),this._errorEvent=new o$1h,this._ready=!1;var r,o=this;this._readyPromise=t.readyPromise.then((function(e){if(!t.imageryPresent){var i=new t$14("The server "+t.url+" doesn't have imagery");return r=l$W.handleError(r,o,o._errorEvent,i.message,void 0,void 0,void 0,i),o$1l.reject(i)}return l$W.handleSuccess(r),o._ready=e,e})).otherwise((function(e){return r=l$W.handleError(r,o,o._errorEvent,e.message,void 0,void 0,void 0,e),o$1l.reject(e)}))}function j$a(e,t,i,n,r,o){var a=c$F.tileXYToQuadKey(i,n,r),s=t.imageryVersion;return s=e$2b(s)&&s>0?s:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1-0"+a+"-i."+s.toString(),request:o})}function x$d(e){var t="JFIF";if(e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3))return"image/jpeg";var i="PNG";return e[1]===i.charCodeAt(0)&&e[2]===i.charCodeAt(1)&&e[3]===i.charCodeAt(2)?"image/png":void 0}function F$a(e){for(var t=R$B.Reader.create(e),i=t.len,n={};t.pos<i;){var r=t.uint32();switch(r>>>3){case 1:n.imageType=t.uint32();break;case 2:n.imageData=t.bytes();break;case 3:n.alphaType=t.uint32();break;case 4:n.imageAlpha=t.bytes();break;case 5:var o=n.copyrightIds;if(e$2b(o)||(o=n.copyrightIds=[]),2==(7&r))for(var a=t.uint32()+t.pos;t.pos<a;)o.push(t.uint32());else o.push(t.uint32());break;default:t.skipType(7&r)}}var s=n.imageType;if(e$2b(s))switch(s){case 0:n.imageType="image/jpeg";break;case 4:n.imageType="image/png";break;default:throw new t$14("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}var l=n.alphaType;return e$2b(l)&&0!==l&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete n.alphaType,delete n.imageAlpha),n}F$b.prototype.executeGlobeCommands=function(e,t,i,n,r){const o=n.context,a=e.commands[Le$s.GLOBE],s=e.indices[Le$s.GLOBE];0!==s&&(this._globeTranslucencyFramebuffer=i,i.clearClassification(o,r),ee$5(a,s,t,n,o,r,Le$5))},F$b.prototype.executeGlobeClassificationCommands=function(e,t,i,n,r){const o=n.context,a=e.commands[Le$s.GLOBE],s=e.indices[Le$s.GLOBE],l=e.commands[Le$s.TERRAIN_CLASSIFICATION],u=e.indices[Le$s.TERRAIN_CLASSIFICATION];if(0===s||0===u)return;const c=this._frontFaceTranslucent,h=this._backFaceTranslucent;if((!c||!h)&&ne$6(l,u,t,n,o,r),!c&&!h)return;this._globeTranslucencyFramebuffer=i;const d=o.uniformState.globeDepthTexture,f=r.framebuffer;if(r.framebuffer=i.classificationFramebuffer,ee$5(a,s,t,n,o,r,Re$4),o.depthTexture){const e=i.packDepth(o,r);o.uniformState.globeDepthTexture=e}ne$6(l,u,t,n,o,r),o.uniformState.globeDepthTexture=d,r.framebuffer=f},v$b.prototype.isReady=function(){return!0},v$b.prototype.shouldDiscardImage=function(e){return e===this._image},Object.defineProperties(h$b.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}}),h$b.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$16("getTileCredits must not be called before the imagery provider is ready.");var n=this._metadata,r=n.getTileInformation(e,t,i);if(e$2b(r)){var o=n.providers[r.imageryProvider];if(e$2b(o))return[o]}},h$b.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=this._tileDiscardPolicy._image,o=this._metadata,a=c$F.tileXYToQuadKey(e,t,i),s=o.getTileInformation(e,t,i);if(!e$2b(s)){if(o.isValid(a)){var l=new r$1b({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction});return void o.populateSubtree(e,t,i,l)}return r}if(!s.hasImagery())return r;var u=j$a(this,s,e,t,i,n).fetchArrayBuffer();return e$2b(u)?u.then((function(e){f$L(o.key,e);var t,i=new Uint8Array(e),n=o.protoImagery;if((!e$2b(n)||!n)&&(t=x$d(i)),!e$2b(t)&&(!e$2b(n)||n)){var a=F$a(i);t=a.imageType,i=a.imageData}return e$2b(t)&&e$2b(i)?w$Q({uint8Array:i,format:t,flipY:!0}):r})):void 0},h$b.prototype.pickFeatures=function(e,t,i,n,r){};var f$f=new e$1U(1,1,1,.4),m$d=new e$1U(0,1,0,.05),v$a=new e$1U(0,.5,0,.2);function o$g(e){e=u$_(e,u$_.EMPTY_OBJECT),this._tilingScheme=e$2b(e.tilingScheme)?e.tilingScheme:new g$13({ellipsoid:e.ellipsoid}),this._cells=u$_(e.cells,8),this._color=u$_(e.color,f$f),this._glowColor=u$_(e.glowColor,m$d),this._glowWidth=u$_(e.glowWidth,6),this._backgroundColor=u$_(e.backgroundColor,v$a),this._errorEvent=new o$1h,this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._canvasSize=u$_(e.canvasSize,256),this._canvas=this._createGridCanvas(),this._readyPromise=o$1l.resolve(!0)}Object.defineProperties(o$g.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),o$g.prototype._drawGrid=function(e){for(var t=this._canvasSize,i=0;i<=this._cells;++i){var n=1+i/this._cells*(t-1);e.moveTo(n,0),e.lineTo(n,t),e.moveTo(0,n),e.lineTo(t,n)}e.stroke()},o$g.prototype._createGridCanvas=function(){var e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;var t=this._canvasSize,i=e.getContext("2d"),n=this._backgroundColor.toCssColorString();i.fillStyle=n,i.fillRect(0,0,t,t);var r=this._glowColor.toCssColorString();i.strokeStyle=r,i.lineWidth=this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i),i.lineWidth=.5*this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i);var o=this._color.toCssColorString();return i.strokeStyle=o,i.lineWidth=2,i.strokeRect(0,0,t,t),i.lineWidth=1,this._drawGrid(i),e},o$g.prototype.getTileCredits=function(e,t,i){},o$g.prototype.requestImage=function(e,t,i,n){return this._canvas},o$g.prototype.pickFeatures=function(e,t,i,n,r){};var y$d={None:0,Attribute:1,Slope:2,Aspect:3};function w$a(e){e=u$_(e,{}),this._url=e.url+"/",this._useConfigFile=u$_(e.useConfigFile,!0),this._compressType="NONE",this._tilingScheme=void 0,this._rectangle=void 0,this._levels=[],this._maxCategory=90,this._minCategory=0,this._dataType=y$d.NONE;var t=e.credit;"string"==typeof t&&(t=new Credit(t)),this._credit=t,this._ready=!1,this._readyPromise=o$1l.defer();var i,n=u$_(e.ellipsoid,t$13.WGS84),r=this;function o(e){r._compressType=e.getElementsByTagName("sml:CompressType")[0].textContent;var t=e.getElementsByTagName("sml:Type")[0].textContent;"Slope"==t?r._dataType=y$d.Slope:"Aspect"==t?r._dataType=y$d.Aspect:"Attribute"==t&&(r._dataType=y$d.Attribute),r._cellWidth=parseInt(e.getElementsByTagName("sml:CellWidth")[0].textContent),r._cellHeight=parseInt(e.getElementsByTagName("sml:CellHeight")[0].textContent),r._maxCategory=parseInt(e.getElementsByTagName("sml:MaxHeight")[0].textContent),r._minCategory=parseInt(e.getElementsByTagName("sml:MinHeight")[0].textContent),r._tilingScheme=new g$13({ellipsoid:n}),r._tilingScheme.isSct=!0;var i=e.getElementsByTagName("sml:Bounds")[0],o=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Left")[0].textContent)),a=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Bottom")[0].textContent)),s=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Right")[0].textContent)),l=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Top")[0].textContent));r._rectangle=new h$18(o,a,s,l);for(var u=e.getElementsByTagName("sml:Levels")[0].getElementsByTagName("sml:Level"),c=0;c<u.length;++c){var h=u[c];r._levels.push(parseInt(h.textContent))}r._ready=!0,r._readyPromise.resolve(!0)}function a(e){var t=u$_(e,"An error occurred while accessing "+r._url+".");i=TileProviderError.handleError(i,r,r._errorEvent,t,void 0,void 0,void 0,s),r._readyPromise.reject(new RuntimeError(t))}function s(){if(!e$2b(e.rectangle)||!e$2b(e.levels))throw new t$16("options.rectangles,options.levels is required.");r._compressType=u$_(e.compressType,"ZIP"),r._attType=y$d.SLOPE,r._cellWidth=u$_(e._cellWidth,32),r._cellHeight=u$_(e._cellHeight,32),r._maxCategory=u$_(e.maxCategory,90),r._minCategory=u$_(e.minCategory,0),r._tilingScheme=new g$13({ellipsoid:n}),r._rectangle=e.rectangle,r._levels=e.levels}this._useConfigFile?o$1l(d$1f(r._url+"config"),o,a):s(),this._styleEngine=new e$1r}Object.defineProperties(w$a.prototype,{url:{get:function(){return this._url}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$16("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},cellWidth:{get:function(){return this._cellWidth}},cellHeight:{get:function(){return this._cellHeight}},minLevel:{get:function(){return this._levels.length>0?Math.min(this._levels[0],this._levels[this._levels.length-1]):-1}},maxLevel:{get:function(){return this._levels.length>0?Math.max(this._levels[0],this._levels[this._levels.length-1]):-1}},minCategory:{get:function(){if(!this._ready)throw new t$16("minCategory must not be called before the grid provider is ready");return this._minCategory}},maxCategory:{get:function(){if(!this._ready)throw new t$16("maxCategory must not be called before the grid provider is ready");return this._maxCategory}}}),w$a.prototype.getTileCredits=function(e,t,i){};var W$d=new h$18;function R$d(e,t){var n,r;if(2===(n="ZIP"===e._compressType?nt$9.inflate(t).buffer:t[i]).byteLength/(e._cellWidth*e._cellHeight)){var o=new Int16Array(n,0,e._cellWidth*e._cellHeight);r=[];for(var a=0;a<o.length;a++)r.push(parseFloat(o[a]))}else r=new Float32Array(n,0,e._cellWidth*e._cellHeight);return r}function o$f(e){e=u$_(e,{}),this._height=this._width=u$_(e.quality,2048);var t=u$_(e.intensityRange,new o$1o(0,1));this._minIntensity=t.x,this._maxIntensity=t.y,this._context=e.context,this._bounds=e.bounds,this._fbIntensity=void 0,this._intensityCommand=void 0,this._heatMapCommand=void 0,this._sp=void 0,this._va=void 0,this._vertexSize=8,this._maxPointCount=1e4,this._pointCount=0,this._bufferIndex=0,this._vertexBufferData=new Float32Array(this._maxPointCount*this._vertexSize*6),this._vertexBufferViews=[];for(var i=this._maxPointCount,n=0;n<i;n++)this._vertexBufferViews.push(new Float32Array(this._vertexBufferData.buffer,0,n*this._vertexSize*6));this._clearCommand=new t$X({color:new e$1U(0,0,0,0)}),this._data=void 0,this._dataIndex=0,this._fbHeatMap=x$c(this._context,this._width,this._height,_$$.UNSIGNED_BYTE),this._clearCommand.framebuffer=this._fbHeatMap,this._clearCommand.execute(this._context),this._maxPerFrameDrawCount=5e3}function x$c(e,t,i,n){return new t$W({context:e,colorTextures:[new t$V({context:e,width:t,height:i,pixelDatatype:n})]})}function R$c(e,t){if(!e$2b(t._sp)){var i=new s$U({sources:[["attribute vec4 aPosition;","attribute vec4 aIntensity;","varying vec2 vOff;","varying vec2 vDim;","varying float vIntensity;","uniform vec4 uBounds;","void main()","{","vDim = abs(aPosition.zw);","vOff = aPosition.zw;","vec2 pos = aPosition.xy + aPosition.zw;","vIntensity = aIntensity.x;","gl_Position = vec4(((pos - uBounds.xy) / uBounds.zw) * 2.0 - 1.0, 0.0, 1.0);","}"].join("\n")]}),n=new s$U({sources:[["varying vec2 vOff;","varying vec2 vDim;","varying float vIntensity;","void main()","{","float falloff = (1.0 - smoothstep(0.0, 1.0, length(vOff/vDim)));","float intensity = falloff*vIntensity;","gl_FragColor = vec4(intensity);","}"].join("\n")]});t._sp=r$13.fromCache({context:e,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:{aPosition:0,aIntensity:1}})}}function T$d(e,t){if(!e$2b(t._va)){var i=t._vertexBufferViews[t._pointCount],n=t$Y.createVertexBuffer({context:e,typedArray:i,usage:A$19.STREAM_DRAW}),r=[{index:0,vertexBuffer:n,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:32,normalize:!1},{index:1,vertexBuffer:n,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,offsetInBytes:16,strideInBytes:32,normalize:!1}];t._va=new c$12({context:e,attributes:r})}}function S$9(e,t){var i=new i$_({primitiveType:W$18.TRIANGLES,count:6*t._pointCount});T$d(e,t),R$c(e,t),i.vertexArray=t._va,i.shaderProgram=t._sp,i.renderState=d$1m.fromCache({depthTest:{enabled:!1},viewport:new f$18(0,0,t._width,t._height),blending:{enabled:!0,functionDestinationRgb:de$x.ONE,functionDestinationAlpha:de$x.ONE}});var n=new e$29(t.bounds.x,t.bounds.y,t.bounds.width,t.bounds.height);return i.uniformMap={uBounds:function(){return n}},i.framebuffer=t._fbIntensity,i}function V$b(e,t){var i=["uniform sampler2D uIntensityTexture;","varying vec2 v_textureCoordinates;","float linstep(float low, float high, float value) {","return clamp((value-low)/(high-low), 0.0, 1.0);","}","float fade(float low, float high, float value){","float mid = (low+high)*0.5;","float range = (high-low)*0.5;","float x = 1.0 - clamp(abs(mid-value)/range, 0.0, 1.0);","return smoothstep(0.0, 1.0, x);","}","vec3 getColor(float intensity){","vec3 blue = vec3(0.0, 0.0, 1.0);","vec3 cyan = vec3(0.0, 1.0, 1.0);","vec3 green = vec3(0.0, 1.0, 0.0);","vec3 yellow = vec3(1.0, 1.0, 0.0);","vec3 red = vec3(1.0, 0.0, 0.0);","vec3 color = fade(-0.25, 0.25, intensity)*blue + fade(0.0, 0.5, intensity)*cyan + fade(0.25, 0.75, intensity)*green + fade(0.5, 1.0, intensity)*yellow + smoothstep(0.75, 1.0, intensity)*red;","return color;","}","vec4 alphaFun(vec3 color, float intensity){","float alpha = smoothstep(0.0, 1.0, intensity);","return vec4(color*alpha, alpha);","}","void main(){","float intensity = smoothstep(0.0, 1.0, texture2D(uIntensityTexture, v_textureCoordinates).r);","vec3 color = getColor(intensity);","gl_FragColor = alphaFun(color, intensity);","}"].join("\n"),n=e.createViewportQuadCommand(i,{uniformMap:{uIntensityTexture:function(){return t._fbIntensity.getColorTexture(0)}},renderState:d$1m.fromCache({viewport:new f$18(0,0,t._width,t._height),blending:{enabled:!0,functionDestinationRgb:de$x.ONE,functionDestinationAlpha:de$x.ONE}}),owner:t});return n.framebuffer=t._fbHeatMap,n}function H$e(e){if(e$2b(e._va)){var t=e._va.getAttribute(0).vertexBuffer,i=t._getBuffer(),n=t._gl;n.bindBuffer(de$x.ARRAY_BUFFER,i),n.bufferData(de$x.ARRAY_BUFFER,e._vertexBufferViews[e._pointCount],A$19.STREAM_DRAW),n.bindBuffer(de$x.ARRAY_BUFFER,null)}}function t$a(){this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._texture=void 0,this._classifiedTexture=void 0,this._depthStencilTexture=void 0,this._fbo=void 0,this._fboClassified=void 0,this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new t$X({color:new e$1U(0,0,0,0),owner:this}),this._clearCommand=new t$X({color:new e$1U(0,0,0,0),depth:1,stencil:0});var e=this;this._uniformMap={colorTexture:function(){return e._texture},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._classifiedTexture}}}w$a.prototype._requestGridTile=function(e,t,i,n){if(!this.ready)throw new t$16("requestTileGrid must not be called before ready returns true.");var r=[],o=this._tilingScheme.tileXYToRectangle(e,t,i),a=this;if(this._levels[this._levels.length-1],e$2b(h$18.intersection(this._rectangle,o,W$d))){var s=this._levels[0],l=i;if(l<=this._levels[this._levels.length-1]&&l>=s){var u=i+"_"+e+"_"+t,c=a._url+"data/index/"+t+"/"+e+".bil?level="+l,h=o$10(c);e$2b(h)&&(h.id=u,h.url=c,r.push(h))}}return o$1l.all(r,(function(e){for(var t=0;t<e.length;t++){return R$d(a,e[t])}}),(function(e){return o$1l.reject(e)}))},Object.defineProperties(o$f.prototype,{texture:{get:function(){return this._fbHeatMap.getColorTexture(0)}},bounds:{set:function(e){this._bounds=e},get:function(){return this._bounds}},maxPerFrameDrawCount:{set:function(e){this._maxPerFrameDrawCount=e},get:function(){return this._maxPerFrameDrawCount}}}),o$f.prototype.addVertex=function(e,t,i,n,r){this._vertexBufferData[this._bufferIndex++]=e,this._vertexBufferData[this._bufferIndex++]=t,this._vertexBufferData[this._bufferIndex++]=i,this._vertexBufferData[this._bufferIndex++]=n,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r},o$f.prototype.addPoint=function(e,t,i,n){this._pointCount>=this._maxPointCount-1&&this.draw(this._context),n=u$_(n,50),i=u$_(i,.2);var r=.5*n;this.addVertex(e,t,-r,-r,i),this.addVertex(e,t,+r,-r,i),this.addVertex(e,t,-r,+r,i),this.addVertex(e,t,-r,+r,i),this.addVertex(e,t,+r,-r,i),this.addVertex(e,t,+r,+r,i),this._pointCount++},o$f.prototype.setData=function(e){this._data=e},o$f.prototype.drawIntensity=function(e){e$2b(this._fbIntensity)||(this._fbIntensity=x$c(e,this._width,this._height,_$$.HALF_FLOAT)),e$2b(this._intensityCommand)||(this._intensityCommand=S$9(e,this)),this._intensityCommand.count=6*this._pointCount,H$e(this),this._intensityCommand.execute(e)},o$f.prototype.drawHeatMap=function(e){this._clearCommand.framebuffer=this._fbHeatMap,this._clearCommand.execute(e),e$2b(this._heatMapCommand)||(this._heatMapCommand=V$b(e,this)),this._heatMapCommand.execute(e)},o$f.prototype.draw=function(e){this.drawIntensity(e),this.drawHeatMap(e),this._bufferIndex=0,this._pointCount=0},o$f.prototype.update=function(e){if(this._context=e.context,e$2b(this._data)){for(var t=Math.min(this._data.length,this._dataIndex+this._maxPerFrameDrawCount),i=.002*this._bounds.width,n=this._dataIndex;n<t;n++){var r=this._data[n];r.x,r.y;var o=u$_(r.intensity,.1);o=(o-this._minIntensity)/this._maxIntensity,this.addPoint(r.x,r.y,o,i)}this._dataIndex=t,this._dataIndex>=this._data.length&&(this._data=void 0,this._dataIndex=0)}this._pointCount<1||this.draw(e.context)},o$f.prototype.destroy=function(){return this._fbIntensity=this._fbIntensity&&this._fbIntensity.destroy(),this._fbHeatMap=this._fbHeatMap&&this._fbHeatMap.destroy(),this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy(),this._vertexBufferData=void 0,this._vertexBufferViews=void 0,this._data=void 0,i$10(this)},Object.defineProperties(t$a.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}}),t$a.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var I$9={depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$X.EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.KEEP},backFunction:m$X.NEVER,reference:0,mask:u$N.CLASSIFICATION_MASK},blending:Ee$r.ALPHA_BLEND},L$e={depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$X.NOT_EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.KEEP},backFunction:m$X.NEVER,reference:0,mask:u$N.CLASSIFICATION_MASK},blending:Ee$r.ALPHA_BLEND},N$7={depthMask:!0,depthTest:{enabled:!0},stencilTest:u$N.setCesium3DTileBit(),stencilMask:u$N.CESIUM_3D_TILE_MASK,blending:Ee$r.ALPHA_BLEND},M$c="#extension GL_EXT_frag_depth : enable\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform sampler2D classifiedTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n bool isClassified = all(equal(texture2D(classifiedTexture, v_textureCoordinates), vec4(0.0)));\n#ifdef UNCLASSIFIED\n vec4 highlightColor = czm_invertClassificationColor;\n if (isClassified)\n {\n discard;\n }\n#else\n vec4 highlightColor = vec4(1.0);\n if (!isClassified)\n {\n discard;\n }\n#endif\n gl_FragColor = color * highlightColor;\n gl_FragDepthEXT = texture2D(depthTexture, v_textureCoordinates).r;\n}\n",U$b="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n#ifdef UNCLASSIFIED\n gl_FragColor = color * czm_invertClassificationColor;\n#else\n gl_FragColor = color;\n#endif\n}\n";function n$a(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}function o$e(e){if(e$2b(e)&&e.length!==i$Q.NUMBER_OF_JOB_TYPES)throw new t$16("A budget must be specified for each job type; budgets.length should equal JobType.NUMBER_OF_JOB_TYPES.");var t=new Array(i$Q.NUMBER_OF_JOB_TYPES);t[i$Q.TEXTURE]=new n$a(e$2b(e)?e[i$Q.TEXTURE]:10),t[i$Q.PROGRAM]=new n$a(e$2b(e)?e[i$Q.PROGRAM]:10),t[i$Q.BUFFER]=new n$a(e$2b(e)?e[i$Q.BUFFER]:30);var i,n=t.length,r=0;for(i=0;i<n;++i)r+=t[i].total;var o=new Array(n);for(i=0;i<n;++i)o[i]=!1;this._totalBudget=r,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=o}function r$g(){}t$a.prototype.update=function(e){var t=this._texture,i=!e$2b(t)||this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;var n,r,o=e.drawingBufferWidth,a=e.drawingBufferHeight,s=!e$2b(t)||t.width!==o||t.height!==a;((s||i)&&(this._texture=this._texture&&this._texture.destroy(),this._classifiedTexture=this._classifiedTexture&&this._classifiedTexture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._texture=new t$V({context:e,width:o,height:a,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}),e$2b(this._previousFramebuffer)||(this._classifiedTexture=new t$V({context:e,width:o,height:a,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}),this._depthStencilTexture=new t$V({context:e,width:o,height:a,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8}))),!e$2b(this._fbo)||s||i)&&(this._fbo=this._fbo&&this._fbo.destroy(),this._fboClassified=this._fboClassified&&this._fboClassified.destroy(),e$2b(this._previousFramebuffer)?(n=this._previousFramebuffer.depthStencilTexture,r=this._previousFramebuffer.depthStencilRenderbuffer):n=this._depthStencilTexture,this._fbo=new t$W({context:e,colorTextures:[this._texture],depthStencilTexture:n,depthStencilRenderbuffer:r,destroyAttachments:!1}),e$2b(this._previousFramebuffer)||(this._fboClassified=new t$W({context:e,colorTextures:[this._classifiedTexture],depthStencilTexture:n,destroyAttachments:!1})));if(e$2b(this._rsUnclassified)||(this._rsUnclassified=d$1m.fromCache(I$9),this._rsClassified=d$1m.fromCache(L$e),this._rsDefault=d$1m.fromCache(N$7)),!e$2b(this._unclassifiedCommand)||i){e$2b(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());var l=e$2b(this._previousFramebuffer)?U$b:M$c,u=new s$U({defines:["UNCLASSIFIED"],sources:[l]}),c=new s$U({sources:[l]});this._unclassifiedCommand=e.createViewportQuadCommand(u,{renderState:e$2b(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(c,{renderState:e$2b(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),e$2b(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),e$2b(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(ie$6,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}},t$a.prototype.clear=function(e,t){var i=t.framebuffer;e$2b(this._previousFramebuffer)?(t.framebuffer=this._fbo,this._clearColorCommand.execute(e,t)):(t.framebuffer=this._fbo,this._clearCommand.execute(e,t),t.framebuffer=this._fboClassified,this._clearCommand.execute(e,t)),t.framebuffer=i},t$a.prototype.executeClassified=function(e,t){if(!e$2b(this._previousFramebuffer)){var i=t.framebuffer;t.framebuffer=this._fboClassified,this._translucentCommand.execute(e,t),t.framebuffer=i}this._classifiedCommand.execute(e,t)},t$a.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)},t$a.prototype.isDestroyed=function(){return!1},t$a.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._texture=this._texture&&this._texture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),e$2b(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),i$10(this)},Object.defineProperties(n$a.prototype,{total:{get:function(){return this._total}}}),o$e.getTimestamp=Et$a,Object.defineProperties(o$e.prototype,{totalBudget:{get:function(){return this._totalBudget}}}),o$e.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget},o$e.prototype.resetBudgets=function(){for(var e=this._budgets,t=e.length,i=0;i<t;++i){var n=e[i];n.starvedLastFrame=n.starvedThisFrame,n.starvedThisFrame=!1,n.usedThisFrame=0,n.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0},o$e.prototype.execute=function(e,t){var i,n=this._budgets,r=n[t],o=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&o)return r.starvedThisFrame=!0,!1;if(r.usedThisFrame+r.stolenFromMeThisFrame>=r.total){var a,s=n.length;for(a=0;a<s&&(!((i=n[a]).usedThisFrame+i.stolenFromMeThisFrame<i.total)||i.starvedLastFrame);++a);if(a===s&&o)return!1;o&&(r.starvedThisFrame=!0)}var l=o$e.getTimestamp();e.execute();var u=o$e.getTimestamp()-l;return this._totalUsedThisFrame+=u,i?i.stolenFromMeThisFrame+=u:r.usedThisFrame+=u,this._executedThisFrame[t]=!0,!0},Object.defineProperties(r$g.prototype,{color:{get:t$16.throwInstantiationError},intensity:{get:t$16.throwInstantiationError}});var e$8={SUN_LIGHT:0,LIGHT_GROUP1:1},Ze$3=Object.freeze(e$8),p$6=/\/$/,d$i=new r$T('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function o$d(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).styleId;if(!e$2b(t))throw new t$16("options.styleId is required.");var i=t$11.createIfNeeded(u$_(e.url,"https://api.mapbox.com/styles/v1/")),n=e$T.getAccessToken(e.accessToken);this._styleId=t,this._accessToken=n,this._accessTokenErrorCredit=r$T.clone(e$T.getErrorCredit(e.accessToken));var r=u$_(e.tilesize,512);this._tilesize=r;var o=u$_(e.username,"mapbox");this._username=o;var a,s=e$2b(e.scaleFactor)?"@2x":"",l=i.getUrlComponent();p$6.test(l)||(l+="/"),l+=this._username+"/"+t+"/tiles/"+this._tilesize+"/{z}/{x}/{y}"+s,i.url=l,i.setQueryParameters({access_token:n}),e$2b(e.credit)?"string"==typeof(a=e.credit)&&(a=new r$T(a)):a=d$i,this._resource=i,this._imageryProvider=new _$g({url:i,credit:a,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function n$9(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).textureUrl;e$2b(t)||(t=n$15("Assets/Textures/moonSmall.jpg")),this.show=u$_(e.show,!0),this.textureUrl=t,this._ellipsoid=u$_(e.ellipsoid,t$13.MOON),this.onlySunLighting=u$_(e.onlySunLighting,!0),this._ellipsoidPrimitive=new p$c({radii:this.ellipsoid.radii,material:r$X.fromType(r$X.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new h$I}function x$b(){}function y$c(e,t,i,n,r,o,a){var s=e.xDimName,l=e.yDimName,u=e.zDimName,c=e.timeDimName,h=e.dimensions,d=e.dimensionIndices,f=e.buffer,p=h[d[t]];if(0==p.size&&t<d.length-1)y$c(e,t+1,i,n,r,o,a);else for(var _=p.name===s,m=p.name===l,g=p.name===u,x=e$2b(c)&&p.name===c,v=0;v<p.size;v++)if(_?i=v:m?n=v:g?r=v:x&&(o=v),t==d.length-1){var y=f.readFloat32();a.maxValue=Math.max(a.maxValue,y),a.minValue=Math.min(a.minValue,y);var $=r*e.xDimSize*e.yDimSize+n*e.xDimSize+i;a.array[o][$]=y}else y$c(e,t+1,i,n,r,o,a)}function E$a(e,t,i,n){var r=t.offset;t.size,t.type;var o=t.dimensions,a=e.recordDimension;n.seek(r),e.buffer=n,e.dimensions=i,e.dimensionIndices=o;var s=e.xDimName,l=e.yDimName,u=e.zDimName,c=e.timeDimName;e.xDimSize=0,e.yDimSize=0,e.zDimSize=0;for(var h=1,d=0;d<i.length;d++)i[d].name==s?e.xDimSize=i[d].size:i[d].name==l?e.yDimSize=i[d].size:i[d].name==u?e.zDimSize=i[d].size:e$2b(c)&&i[d].name==c&&(h=i[d].size);a.length>0&&(h=a.length,e.timeDimName=null);var f={array:[]},p=0;for(p=0;p<h;p++)f.array[p]=[];if(f.maxValue=Number.MIN_VALUE,f.minValue=Number.MAX_VALUE,f.xDimSize=e.xDimSize,f.yDimSize=e.yDimSize,f.zDimSize=e.zDimSize,f.timeDimSize=h,a.length>0)for(p=0;p<h;p++)n.seek(r+a.recordStep*p),y$c(e,0,0,0,0,p,f);else y$c(e,0,0,0,0,0,f);return f}function e$7(e){}Object.defineProperties(o$d.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),o$d.prototype.getTileCredits=function(e,t,i){if(e$2b(this._accessTokenErrorCredit))return[this._accessTokenErrorCredit]},o$d.prototype.requestImage=function(e,t,i,n){return this._imageryProvider.requestImage(e,t,i,n)},o$d.prototype.pickFeatures=function(e,t,i,n,r){return this._imageryProvider.pickFeatures(e,t,i,n,r)},o$d._defaultCredit=d$i,Object.defineProperties(n$9.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),new p$1e,new p$1e,new o$1p,n$9.prototype.update=function(e){},n$9.prototype.isDestroyed=function(){return!1},n$9.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),i$10(this)},x$b.loadData=function(e,t){var i=e.header,n=e.buffer,r=i.dimensions;i.globalAttributes;var o=i.variables;t.recordDimension=i.recordDimension;for(var a=0,s=0;s<o.length;s++)if(o[s].name==t.variableName){a=s;break}return E$a(t,o[a],r,n)},e$7.prototype.isReady=function(){return!0},e$7.prototype.shouldDiscardImage=function(e){return!1};var y$b="#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\n\nuniform vec4 u_bgColor;\nuniform sampler2D u_depthTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n if (texture2D(u_depthTexture, v_textureCoordinates).r < 1.0)\n {\n#ifdef MRT\n gl_FragData[0] = u_bgColor;\n gl_FragData[1] = vec4(u_bgColor.a);\n#else\n gl_FragColor = u_bgColor;\n#endif\n return;\n }\n \n discard;\n}\n",L$d="\nuniform u_bgColor : vec4<f32>;\n\nvar u_depthTexture : texture_depth_2d;\nvar u_depthTextureSampler : sampler;\n\nvarying v_textureCoordinates : vec2<f32>;\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n if (textureSample(u_depthTexture, u_depthTextureSampler, v_textureCoordinates) >= 1.0)\n {\n discard;\n }\n gl_FragData0 = uniforms.u_bgColor;\n gl_FragData1 = vec4(uniforms.u_bgColor.a);\n}\n",N$6="/**\n * Compositing for Weighted Blended Order-Independent Transparency. See:\n */\n\nuniform sampler2D u_opaque;\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 opaque = texture2D(u_opaque, v_textureCoordinates);\n vec4 accum = texture2D(u_accumulation, v_textureCoordinates);\n float r = texture2D(u_revealage, v_textureCoordinates).r;\n\n#ifdef MRT\n vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n#else\n vec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);\n#endif\n\n gl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\n\n if (opaque != czm_backgroundColor)\n {\n gl_FragColor.a = 1.0;\n }\n}\n";function C$c(e){this._numSamples=1,this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;var t=e.colorBufferFloat&&e.depthTexture&&e.floatBlend;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._useWebGPU=e.webgpu,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=void 0,this._alphaFBO=void 0,this._adjustTranslucentFBO=void 0,this._adjustAlphaFBO=void 0,this._opaqueClearCommand=new t$X({color:new e$1U(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new t$X({color:new e$1U(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new t$X({color:new e$1U(0,0,0,0),owner:this}),this._alphaClearCommand=new t$X({color:new e$1U(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new f$18,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function P$d(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function x$a(e){e._translucentFBO=e._translucentFBO&&!e._translucentFBO.isDestroyed()&&e._translucentFBO.destroy(),e._alphaFBO=e._alphaFBO&&!e._alphaFBO.isDestroyed()&&e._alphaFBO.destroy(),e._adjustTranslucentFBO=e._adjustTranslucentFBO&&!e._adjustTranslucentFBO.isDestroyed()&&e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO=e._adjustAlphaFBO&&!e._adjustAlphaFBO.isDestroyed()&&e._adjustAlphaFBO.destroy()}function z$9(e){P$d(e),x$a(e)}function I$8(e,t,i,n){P$d(e),e._accumulationTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:t.webgpu?_$$.HALF_FLOAT:_$$.FLOAT});var r=new Float32Array(i*n*4);e._revealageTexture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:t.webgpu?_$$.HALF_FLOAT:_$$.FLOAT,source:{arrayBufferView:r,width:i,height:n},flipY:!1})}function W$c(e,t){x$a(e);var i=de$x.FRAMEBUFFER_COMPLETE,n=!0;if(e._translucentMRTSupport&&(e._translucentFBO=new t$W({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new t$W({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1}),(e._translucentFBO.status!==i||e._adjustTranslucentFBO.status!==i)&&(x$a(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO=new t$W({context:t,colorTextures:[e._accumulationTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._alphaFBO=new t$W({context:t,colorTextures:[e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new t$W({context:t,colorTextures:[e._accumulationTexture],destroyAttachments:!1}),e._adjustAlphaFBO=new t$W({context:t,colorTextures:[e._revealageTexture],destroyAttachments:!1});var r=e._translucentFBO.status===i,o=e._alphaFBO.status===i,a=e._adjustTranslucentFBO.status===i,s=e._adjustAlphaFBO.status===i;(!r||!o||!a||!s)&&(z$9(e),e._translucentMultipassSupport=!1,n=!1)}return n}C$c.prototype.update=function(e,t,i,n,r){if(!this.isSupported())return;this._opaqueFBO=i,this._opaqueTexture=i.getColorTexture(0),this._depthStencilTexture=i.depthStencilTexture;var o=this._opaqueTexture.width,a=this._opaqueTexture.height,s=this._accumulationTexture,l=!e$2b(s)||s.width!==o||s.height!==a||n!==this._useHDR;const u=this._numSamples!==r;if((l||u)&&(this._numSamples=r,I$8(this,e,o,a)),e$2b(this._translucentFBO)&&!l&&!u||W$c(this,e)){this._useHDR=n;var c,h,d=this;e$2b(this._compositeCommand)||(c=new s$U({sources:[N$6]}),this._translucentMRTSupport&&c.defines.push("MRT"),h={u_opaque:function(){return d._opaqueTexture},u_accumulation:function(){return d._accumulationTexture},u_revealage:function(){return d._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(c,{shaderProgramName:"CompositeOITFS",uniformMap:h,owner:this})),e$2b(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(c=new s$U({defines:["MRT"],sources:[e.webgpu?L$d:y$b],useWGSL:e.webgpu}),h={u_bgColor:function(){return d._translucentMRTClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(c,{shaderProgramName:"AdjustTranslucentOIT",useWGSL:e.webgpu,uniformMap:h,owner:this})):this._translucentMultipassSupport&&(c=new s$U({sources:[y$b]}),h={u_bgColor:function(){return d._translucentMultipassClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(c,{uniformMap:h,owner:this}),h={u_bgColor:function(){return d._alphaClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(c,{uniformMap:h,owner:this}))),this._viewport.width=o,this._viewport.height=a;var f=!f$18.equals(this._viewport,t.viewport),p=f!==this._useScissorTest;this._useScissorTest=f,f$18.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=f$18.clone(t.viewport,this._scissorRectangle),p=!0),(!e$2b(this._rs)||!f$18.equals(this._viewport,this._rs.viewport)||p)&&(this._rs=d$1m.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),e$2b(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),e$2b(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)}};var G$c={enabled:!0,color:new e$1U(0,0,0,0),equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.ONE,functionDestinationRgb:l$14.ONE,functionSourceAlpha:l$14.ZERO,functionDestinationAlpha:l$14.ONE_MINUS_SOURCE_ALPHA},H$d={enabled:!0,color:new e$1U(0,0,0,0),equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.ONE,functionDestinationRgb:l$14.ONE,functionSourceAlpha:l$14.ONE,functionDestinationAlpha:l$14.ONE},U$a={enabled:!0,color:new e$1U(0,0,0,0),equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.ZERO,functionDestinationRgb:l$14.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:l$14.ZERO,functionDestinationAlpha:l$14.ONE_MINUS_SOURCE_ALPHA};function R$b(e,t,i,n){var r=i[n.id];if(!e$2b(r)){var o=d$1m.getState(n);o.depthMask=!1,o.blending=t,r=d$1m.fromCache(o),i[n.id]=r}return r}function V$a(e,t,i){return R$b(t,G$c,e._translucentRenderStateCache,i)}function Q$5(e,t,i){return R$b(t,H$d,e._translucentRenderStateCache,i)}function Z$9(e,t,i){return R$b(t,U$a,e._alphaRenderStateCache,i)}var X$7=" vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n",Y$6=" var Ci : vec3<f32> = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n var ai = czm_gl_FragColor.a;\n var wzi = czm_alphaWeight(ai);\n gl_FragData0 = vec4<f32>(Ci * wzi, ai);\n gl_FragData1 = vec4<f32>(ai * wzi);\n",k$8=" vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragColor = vec4(Ci, ai) * wzi;\n",J$5=" float ai = czm_gl_FragColor.a;\n gl_FragColor = vec4(ai);\n";function D$b(e,t,i,n){var r=e.shaderCache.getDerivedShaderProgram(t,i);if(!e$2b(r)){var o=t._attributeLocations,a=t.fragmentShaderSource.clone(),s=a.useWGSL;if(a.sources=a.sources.map((function(e){return e=(e=(e=(e=s$U.replaceMain(e,"czm_translucent_main",s)).replace(/gl_FragColor/g,"czm_gl_FragColor")).replace(/\bdiscard\b/g,"czm_discard = true")).replace(/czm_phong/g,"czm_translucentPhong")})),s)a.sources.splice(0,0,"var<private> czm_gl_FragColor : vec4<f32>;\nvar<private> czm_discard : bool = false;\n"),a.sources.push("@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n"+n+"}\n");else{var l="";e.webgpu&&(l="#ifdef WEBGPU \n layout(location = 0) out vec4 glFragData[2]; \n#endif \n"),a.sources.splice(0,0,(-1!==n.indexOf("gl_FragData")?"#extension GL_EXT_draw_buffers : enable \n"+l:"")+"vec4 czm_gl_FragColor;\nbool czm_discard = false;\n"),a.sources.push("void main()\n{\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n"+n+"}\n")}r=e.shaderCache.createDerivedShaderProgram(t,i,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:o})}return r}function K$6(e,t){return D$b(e,t,"translucentMRT",t.fragmentShaderSource.useWGSL?Y$6:X$7)}function $$9(e,t){return D$b(e,t,"translucentMultipass",k$8)}function ee$4(e,t){return D$b(e,t,"alphaMultipass",J$5)}function ae$4(e,t,i,n,r,o){var a,s,l=t.context,u=t.frameState.useLogDepth,c=t._hdr,h=n.framebuffer,d=r.length,f=t.frameState.shadowState.lightShadowsEnabled;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(l,n),n.framebuffer=e._adjustAlphaFBO,e._adjustAlphaCommand.execute(l,n);var p=e._opaqueFBO;for(n.framebuffer=e._translucentFBO,s=0;s<d;++s)a=r[s],a=u?a.derivedCommands.logDepth.command:a,a=c?a.derivedCommands.hdr.command:a,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.translucentCommand:a.derivedCommands.oit.translucentCommand,t,l,n,p);for(e$2b(o)&&(a=o.unclassifiedCommand,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.translucentCommand:a.derivedCommands.oit.translucentCommand,t,l,n,p)),n.framebuffer=e._alphaFBO,s=0;s<d;++s)a=r[s],a=u?a.derivedCommands.logDepth.command:a,a=c?a.derivedCommands.hdr.command:a,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.alphaCommand:a.derivedCommands.oit.alphaCommand,t,l,n,p);e$2b(o)&&(a=o.unclassifiedCommand,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.alphaCommand:a.derivedCommands.oit.alphaCommand,t,l,n,p)),n.framebuffer=h}function re$5(e,t,i,n,r,o){var a=t.context,s=t.frameState.useLogDepth,l=t._hdr,u=n.framebuffer,c=r.length,h=t.frameState.shadowState.lightShadowsEnabled;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(a,n);var d=e._opaqueFBO;n.framebuffer=e._translucentFBO;for(var f,p=0;p<c;++p)f=r[p],f=s?f.derivedCommands.logDepth.command:f,f=l?f.derivedCommands.hdr.command:f,i(h&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,t,a,n,d);e$2b(o)&&(f=o.unclassifiedCommand,i(h&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,t,a,n,d)),n.framebuffer=u}C$c.prototype.createDerivedCommands=function(e,t,i){var n,r,o,a,s,l;(e$2b(i)||(i={}),this._translucentMRTSupport)?(e$2b(i.translucentCommand)&&(n=i.translucentCommand.shaderProgram,r=i.translucentCommand.renderState),i.translucentCommand=i$_.shallowClone(e,i.translucentCommand),e$2b(n)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=n,i.translucentCommand.renderState=r):(i.translucentCommand.shaderProgram=K$6(t,e.shaderProgram),i.translucentCommand.renderState=V$a(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id)):(e$2b(i.translucentCommand)&&(o=i.translucentCommand.shaderProgram,a=i.translucentCommand.renderState,s=i.alphaCommand.shaderProgram,l=i.alphaCommand.renderState),i.translucentCommand=i$_.shallowClone(e,i.translucentCommand),i.alphaCommand=i$_.shallowClone(e,i.alphaCommand),e$2b(o)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=o,i.translucentCommand.renderState=a,i.alphaCommand.shaderProgram=s,i.alphaCommand.renderState=l):(i.translucentCommand.shaderProgram=$$9(t,e.shaderProgram),i.translucentCommand.renderState=Q$5(this,t,e.renderState),i.alphaCommand.shaderProgram=ee$4(t,e.shaderProgram),i.alphaCommand.renderState=Z$9(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id));return i},C$c.prototype.executeCommands=function(e,t,i,n,r){this._translucentMRTSupport?re$5(this,e,t,i,n,r):ae$4(this,e,t,i,n,r)},C$c.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)},C$c.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._opaqueFBO,e$1U.clone(i,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO,this._alphaClearCommand.execute(e,t)),t.framebuffer=n},C$c.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport},C$c.prototype.setOpaqueTexture=function(e){this._opaqueTexture=e},C$c.prototype.isDestroyed=function(){return!1},C$c.prototype.destroy=function(){return z$9(this),e$2b(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),e$2b(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),e$2b(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),i$10(this)};var x$9=new r$T("MapQuest, Open Street Map and contributors, CC-BY-SA");function a$9(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=t$11.createIfNeeded(u$_(e.url,"https://a.tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+="{z}/{x}/{y}."+u$_(e.fileExtension,"png");var i=new c$R({ellipsoid:e.ellipsoid}),n=u$_(e.minimumLevel,0),r=e.maximumLevel,o=u$_(e.rectangle,i.rectangle),a=i.positionToTileXY(h$18.southwest(o),n),s=i.positionToTileXY(h$18.northeast(o),n),l=(Math.abs(s.x-a.x)+1)*(Math.abs(s.y-a.y)+1);if(l>4)throw new t$16("The rectangle and minimumLevel indicate that there are "+l+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");var u=u$_(e.credit,x$9);"string"==typeof u&&(u=new r$T(u)),_$g.call(this,{url:t,credit:u,tilingScheme:i,tileWidth:256,tileHeight:256,minimumLevel:n,maximumLevel:r,rectangle:o})}function m$c(e){e=u$_(e,u$_.EMPTY_OBJECT),this.time=u$_(e.time,0),this.minimum=u$_(e.minimum,0),this.maximum=u$_(e.maximum,50),this._complete=!1}function e$6(e){throw new t$16("This type should not be instantiated directly. Instead, use BoxEmitter, CircleEmitter, ConeEmitter or SphereEmitter.")}e$2b(Object.create)&&(a$9.prototype=Object.create(_$g.prototype),a$9.prototype.constructor=a$9),Object.defineProperties(m$c.prototype,{complete:{get:function(){return this._complete}}}),e$6.prototype.emit=function(e){t$16.throwInstantiationError()};var N$5="uniform sampler2D u_colorTexture;\nuniform sampler2D u_transitionAndCountTexture;\nvarying vec2 v_textureCoordinates;\nfloat erf(float x){\n if (abs(x) > 2.629639){\n return sign(x);\n }\n else {\n float z = 0.289226 * x * x - 1.0;\n return ((((((0.0145688 * z - 0.0348595) * z + 0.0503913) * z - 0.0897001) * z + 0.156097) * z - 0.249431) * z + 0.533201) * x;\n }\n}\nfloat VDMTransmission(vec2 transition, float depth){\n float variance = max(transition.y - transition.x * transition.x, 0.0);\n return clamp(0.5 * (1.0 + erf((depth - transition.x) / sqrt(variance * 2.0))), 0.0, 1.0);\n}\nvoid main()\n{\n vec4 color = texture2D(u_colorTexture, v_textureCoordinates);\n if(color.a < 0.01){\n discard;\n }\n float scene_depth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n if(scene_depth > 0.0){\n vec3 transitionAndCount = texture2D(u_transitionAndCountTexture, v_textureCoordinates).xyz;\n float count = transitionAndCount.z;\n vec2 transition = transitionAndCount.xy;\n transition /= count;\n float vdmAlpha = VDMTransmission(transition, scene_depth);\n color.a = min(color.a, vdmAlpha);\n }\n gl_FragColor = color;\n}";function u$b(){this._colorFBO=void 0,this._transitionFBO=void 0,this._colorTexture=void 0,this._transitionTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._passType=Le$s.OPAQUE,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},this.quality=.25,this.enable=!1,this._useLogDepth=!1,this._particleSp=void 0,this._useHdr=!1,this.useHdr=this._useHdr}var G$b={enabled:!0,color:new e$1U(0,0,0,0),equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.SOURCE_ALPHA,functionDestinationRgb:l$14.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:l$14.ONE,functionDestinationAlpha:l$14.ONE},f$e=new f$18;function q$a(e,t){var i=e[t.id];if(!e$2b(i)||i.viewport.width!=f$e.width||i.viewport.height!=f$e.height){var n=d$1m.getState(t);n.viewport=f$e,i=d$1m.fromCache(n),e[t.id]=i}return i}function S$8(){return new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}function y$a(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._transitionTexture=e._transitionTexture&&!e._transitionTexture.isDestroyed()&&e._transitionTexture.destroy(),e._colorFBO=e._colorFBO&&!e._colorFBO.isDestroyed()&&e._colorFBO.destroy(),e._transitionFBO=e._transitionFBO&&!e._transitionFBO.isDestroyed()&&e._transitionFBO.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}function U$9(e,t){var i=e._screenWidth,n=e._screenHeight;e._colorTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:S$8()}),e._transitionTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT,sampler:S$8()}),e._colorFBO=new t$W({context:t,colorTextures:[e._colorTexture],destroyAttachments:!1}),e._transitionFBO=new t$W({context:t,colorTextures:[e._transitionTexture],destroyAttachments:!1})}function I$7(e,t){var i=[];e._useLogDepth&&i.push("LOG_DEPTH");var n=new s$U({sources:[N$5],defines:i}),r={u_colorTexture:function(){return e._colorTexture},u_transitionAndCountTexture:function(){return e._transitionTexture}},o=d$1m.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:G$b});e._drawCommand=t.createViewportQuadCommand(n,{uniformMap:r,renderState:o,pass:e._passType,owner:e}),e._clearCommand=new t$X({color:new e$1U(0,0,0,0),depth:1,renderState:d$1m.fromCache(),pass:e._passType,owner:e})}function V$9(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._colorTexture,o=!1,a=e$2b(r)&&(r.width!==i||r.height!==n);return(!e$2b(r)||a)&&(y$a(e),U$9(e,t),I$7(e,t),o=!0),o}function D$a(e){return e.drawBuffers&&e.fragmentDepth}function r$f(){this._drawCommand=void 0,this.enable=!1,this._particleStateTexture=void 0,this._initialized=!1}function a$8(e){e._drawCommand=void 0,e._clearCommand=void 0}function h$a(e,t){var i=new s$U({sources:[ie$6]}),n={colorTexture:function(){return e._particleStateTexture}},r=d$1m.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Ee$r.ALPHA_BLEND});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:e._passType,owner:e})}function c$a(e,t){var i=!1;return e._initialized||(a$8(e),h$a(e,t),i=!0,e._initialized=!0),i}function d$h(e){return e.drawBuffers&&e.fragmentDepth}function i$c(e){if("string"==typeof e){var t=document.getElementById(e);if(null===t)throw new t$16('Element with id "'+e+'" does not exist in the document.');e=t}return e}function o$c(e){var t=i$c((e=u$_(e,u$_.EMPTY_OBJECT)).container);if(!e$2b(t))throw new t$16("container is required");this._container=t;var i=document.createElement("div");i.className="supermap3d-performanceDisplay";var n=document.createElement("div");n.className="supermap3d-performanceDisplay-fps",this._fpsText=document.createTextNode(""),n.appendChild(this._fpsText);var r=document.createElement("div");r.className="supermap3d-performanceDisplay-ms",this._msText=document.createTextNode(""),r.appendChild(this._msText),i.appendChild(r),i.appendChild(n),this._container.appendChild(i),this._lastFpsSampleTime=Et$a(),this._lastMsSampleTime=Et$a(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;var o=document.createElement("div");o.className="supermap3d-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),o.appendChild(this._throttledText),i.appendChild(o);var a=document.createElement("div");a.className="supermap3d-performanceDisplay-ms",this._trangleCountText=document.createTextNode(""),a.appendChild(this._trangleCountText),i.appendChild(a)}u$b.isSupported=D$a,u$b.prototype.update=function(e,t){if(D$a(e.context)&&this.enable){var i=e.context;this._screenWidth=Math.floor(i.drawingBufferWidth*this.quality),this._screenHeight=Math.floor(i.drawingBufferHeight*this.quality),f$e.width=this._screenWidth,f$e.height=this._screenHeight,this._useLogDepth=e.useLogDepth,this._useHdr=t,V$9(this,i)}},u$b.prototype.execute=function(e,t){!e$2b(this._drawCommand)||!this.enable||!e$2b(e.uniformState)||!e$2b(e.uniformState.globeDepthTexture)||this._drawCommand.execute(e,t)},u$b.prototype.executeCommand=function(e,t,i,n,r){if(0!=r){var o,a,s=e.context,l=e.frameState.useLogDepth,u=e._hdr,c=i.framebuffer;for(i.framebuffer=this._colorFBO,a=0;a<r;++a)o=n[a],o=l?o.derivedCommands.logDepth.command:o,t(o=u?o.derivedCommands.hdr.command:o,e,s,i);for(i.framebuffer=this._transitionFBO,a=0;a<r;++a){if(o=n[a],o=l?o.derivedCommands.logDepth.command:o,o=u?o.derivedCommands.hdr.command:o,!e$2b(this._particleSp)||this._useHdr!==this.useHdr){this.useHdr=this._useHdr;var h=o.shaderProgram.fragmentShaderSource.clone(),d=o.shaderProgram.vertexShaderSource.clone();h.defines.push("PARTICLESYSTEM"),this._particleSp=r$13.fromCache({context:s,vertexShaderSource:d,fragmentShaderSource:h})}var f=o.shaderProgram;o._shaderProgram=this._particleSp,t(o,e,s,i),o._shaderProgram=f}i.framebuffer=c}},u$b.prototype.clear=function(e,t){!e$2b(this._clearCommand)||!this.enable||(this._clearCommand.framebuffer=this._colorFBO,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._transitionFBO,this._clearCommand.execute(e,t))},u$b.prototype.createDerivedCommands=function(e){!e$2b(e)||(this.enable=!0,e$2b(this._colorFBO)&&(e.renderState=q$a(this._renderStateCache,e.renderState)))},u$b.prototype.isDestroyed=function(){return!1},u$b.prototype.destroy=function(){return y$a(this),i$10(this)},r$f.isSupported=d$h,r$f.prototype.update=function(e){if(this.enable=!0,d$h(e.context)&&this.enable)c$a(this,e.context)},r$f.prototype.execute=function(e,t){!e$2b(this._drawCommand)||!this.enable||!e$2b(e.uniformState)||!e$2b(e.uniformState.globeDepthTexture)||this._drawCommand.execute(e,t)},r$f.prototype.isDestroyed=function(){return!1},r$f.prototype.destroy=function(){return a$8(this),i$10(this)},Object.defineProperties(o$c.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(this._throttledText.nodeValue=e?"(throttled)":"",this._throttled=e)}},trangleCount:{set:function(e){this._trangleCount!==e&&(this._trangleCount=e,this._trangleCountText.nodeValue=e)}}}),o$c.prototype.update=function(e){var t=Et$a(),i=u$_(e,!0);this._fpsFrameCount++;var n=t-this._lastFpsSampleTime;if(n>1e3){var r="N/A";i&&(r=1e3*this._fpsFrameCount/n|0),this._fpsText.nodeValue=r+" FPS",this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;var o=t-this._lastMsSampleTime;if(o>200){var a="N/A";i&&(a=(o/this._msFrameCount).toFixed(2)),this._msText.nodeValue=a+" MS",this._lastMsSampleTime=t,this._msFrameCount=0}},o$c.prototype.destroy=function(){return i$10(this)};var P$c="varying v_textureCoordinates : vec2<f32>;\nvar u_depthTexture : texture_depth_multisampled_2d;\nvar u_depthTextureSampler : sampler;\nfn packDepth(depth : f32) -> vec4<f32> {\n var enc : vec4<f32> = (vec4<f32>(1.0, 255.0, 65025.0, 16581375.0) * depth);\n enc = fract(enc);\n enc = (enc - (vec4<f32>(enc.y, enc.z, enc.w, enc.w) * vec4<f32>(0.003921569, 0.003921569, 0.003921569, 0.0)));\n return enc;\n}\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var sampleCount = i32(textureNumSamples(u_depthTexture));\n var sampleCoord = vec2<i32>(v_textureCoordinates * vec2<f32>(textureDimensions(u_depthTexture)));\n var accumValue : f32;\n for(var i = 0i; i < sampleCount; i += 1i){\n accumValue += textureLoad(u_depthTexture, sampleCoord, i);\n }\n var depth = accumValue / f32(sampleCount);\n gl_FragColor = packDepth(depth);\n}\n";function f$d(){this._framebuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._useLogDepth=void 0,this._debugPickDepthViewportCommand=void 0}function w$9(e,t,i,n){if(!e$2b(e._debugPickDepthViewportCommand)||n!==e._useLogDepth){var r=new s$U({defines:[n?"LOG_DEPTH":""],sources:["uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float z_window = czm_unpackDepth(texture2D(u_texture, v_textureCoordinates));\n z_window = czm_reverseLogDepth(z_window); \n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]});e._debugPickDepthViewportCommand=t.createViewportQuadCommand(r,{shaderProgramName:"spDebugPickDepth",uniformMap:{u_texture:function(){return e._depthTexture}},owner:e}),e._useLogDepth=n}e._debugPickDepthViewportCommand.execute(t,i)}function s$c(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function h$9(e){e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy()}function b$g(e,t,i,n){e._depthTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE})}function T$c(e,t,i,n){s$c(e),h$9(e),b$g(e,t,i,n),e._framebuffer=new t$W({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function D$9(e,t,i){var n=i.width,r=i.height,o=e._depthTexture,a=!e$2b(o)||o.width!==n||o.height!==r;(!e$2b(e._framebuffer)||a)&&T$c(e,t,n,r)}function S$7(e,t,i){if(t.depthTexture){if(!e$2b(e._copyDepthCommand)){var n=t.webgpu?i._inner._samples>1?P$c:C$14:v$O;e._copyDepthCommand=t.createViewportQuadCommand(n,{shaderProgramName:"spCopyDepthPickDepth",useWGSL:t.webgpu,renderState:d$1m.fromCache(),uniformMap:{u_depthTexture:function(){return e._textureToCopy}},owner:e})}}else if(!e$2b(e._copyDepthCommand)){n="uniform sampler2D u_depthStencilTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = texture2D(u_depthStencilTexture, v_textureCoordinates).rgba;\n}\n";e._copyDepthCommand=t.createViewportQuadCommand(n,{shaderProgramName:"spCopyDepthPickDepth",renderState:d$1m.fromCache(),uniformMap:{u_depthStencilTexture:function(){return e._textureToCopy}},owner:e})}e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._framebuffer}f$d.prototype.executeDebugPickDepth=function(e,t,i){w$9(this,e,t,i)},f$d.prototype.update=function(e,t){D$9(this,e,t),S$7(this,e,t)},new e$29;var z$8=new e$29(1,1/255,1/65025,1/16581375);function _$c(e){var t=[];e$29.unpackArray(e,t);for(var i=Number.POSITIVE_INFINITY,n=0;n<t.length;n++){var r=t[n];e$29.divideByScalar(r,255,r),i=Math.min(i,e$29.dot(r,z$8))}return i}function s$b(){this._depthStencilTexture=void 0,this._colorTexture=void 0,this._framebuffer=void 0,this._passState=void 0}function l$d(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy(),e._colorTexture=e._colorTexture&&e._colorTexture.destroy()}function w$8(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight;t.depthTexture?(e._depthStencilTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8}),e._colorTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE}),e._framebuffer=new t$W({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1})):(e._depthStencilTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE}),e._framebuffer=new t$W({context:t,colorTextures:[e._depthStencilTexture],depthStencilRenderbuffer:new r$$({context:t,width:i,height:n,format:M$13.DEPTH_STENCIL}),destroyAttachments:!1}));var r=new n$Z(t);r.blendingEnabled=!1,r.scissorTest={enabled:!0,rectangle:new f$18},r.viewport=new f$18,e._passState=r}function f$c(e){var t=new n$Z(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new f$18},t.viewport=new f$18,this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}function w$7(e,t,i,n){for(var r=Math.max(e,t),o=r*r,a=Math.floor(.5*e),s=Math.floor(.5*t),l=0,u=0,c=0,h=-1,d=0;d<o;++d){if(-a<=l&&l<=a&&-s<=u&&u<=s){var f=4*((s-u)*e+l+a),p=e$1U.byteToRgba(n[f],n[f+1],n[f+2],n[f+3]),_=i.getObjectByPickId(p);if(e$2b(_))return _}if(l===u||l<0&&-l===u||l>0&&l===1-u){var m=c;c=-h,h=m}l+=c,u+=h}}function a$7(e){var t=new n$Z(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new f$18},t.viewport=new f$18,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isOnlyS3MObjectVisible:!0,isUnderGlobeVisible:!1},this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}function L$c(e,t,i){var n,r,o=e.context,a=[],s=t.frustum.near,l=t.frustum.far,u=e.logarithmicDepthBuffer?e.logarithmicDepthFarToNearRatio:e.farToNearRatio;Y$5(s,l,u,Math.ceil(Math.log(l/s)/Math.log(u)),e.logarithmicDepthBuffer,a,!1,void 0),o.depthTexture&&(n=new a$a),e._useOIT&&o.depthTexture&&(r=new C$c(o));var c=new n$Z(o);c.viewport=f$18.clone(i),this.camera=t,this._cameraClone=v$K.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=i,this.passState=c,this.pickFramebuffer=new f$c(o),this.pickPointFramebuffer=new a$7(o),this.pickDepthFramebuffer=new s$b,this.sceneFramebuffer=new n$i,this.normalFramebuffer=new s$h(o),this.globeDepth=n,this.globeTranslucencyFramebuffer=new p$8,this.oit=r,this.pickDepths=[],this.debugGlobeDepths=[],this.frustumCommandsList=a,this.debugFrustumStatistics=void 0,this.updateFrustums=!1}f$d.prototype.getDepth=function(e,t,i,n){var r=1;return e$2b(n)&&(r+=n),t-=Math.floor(.5*r),i-=Math.floor(.5*r),_$c(e.readPixels({x:t,y:i,width:r,height:r,framebuffer:this._framebuffer}))},f$d.prototype.getDepthPromise=function(e,t,i,n){var r=1;return e$2b(n)&&(r+=n),t-=Math.floor(.5*r),i-=Math.floor(.5*r),e.readPixelsAsync({x:t,y:i,width:r,height:r,framebuffer:this._framebuffer}).then((e=>{var t=_$c(e);return Promise.resolve(t)})).catch((e=>(console.log("PickDepth.prototype.getDepth readPixelsAsync failed."),Promise.resolve(void 0))))},f$d.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},f$d.prototype.isDestroyed=function(){return!1},f$d.prototype.destroy=function(){return s$c(this),h$9(this),this._copyDepthCommand.shaderProgram=e$2b(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy(),i$10(this)},s$b.prototype.update=function(e,t,i){var n=i.width,r=i.height;(!e$2b(this._framebuffer)||n!==this._depthStencilTexture.width||r!==this._depthStencilTexture.height)&&(l$d(this),w$8(this,e));var o=this._framebuffer,a=this._passState;return a.framebuffer=o,a.viewport.width=n,a.viewport.height=r,a.scissorTest.rectangle.x=t.x,a.scissorTest.rectangle.y=r-t.y,a.scissorTest.rectangle.width=1,a.scissorTest.rectangle.height=1,a},s$b.prototype.isDestroyed=function(){return!1},s$b.prototype.destroy=function(){return l$d(this),i$10(this)},f$c.prototype.begin=function(e,t,i){var n=this._context,r=t.width,o=t.height;return f$18.clone(e,this._passState.scissorTest.rectangle),this._passState.scissorTest.enabled=!i,(!e$2b(this._fb)||this._width!==r||this._height!==o)&&(this._width=r,this._height=o,this._fb=this._fb&&this._fb.destroy(),this._fb=new t$W({context:n,colorTextures:[new t$V({context:n,width:r,height:o})],depthStencilTexture:new t$V({context:n,width:r,height:o,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=r,this._passState.viewport.height=o,this._passState},f$c.prototype.endAsync=function(e){var t=u$_(e.width,1),i=u$_(e.height,1),n=this._context;return n.readPixelsAsync({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb}).then((e=>(n.pixels=e,Promise.resolve(w$7(t,i,n,e))))).catch((e=>(console.log("Context.readPixels failed."),Promise.resolve(void 0))))},f$c.prototype.end=function(e){var t=u$_(e.width,1),i=u$_(e.height,1),n=this._context,r=n.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb});return n.pixels=r,w$7(t,i,n,r)},f$c.prototype.isDestroyed=function(){return!1},f$c.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),i$10(this)},a$7.prototype.begin=function(e,t){var i=this._context,n=t.width,r=t.height;return f$18.clone(e,this._passState.scissorTest.rectangle),(!e$2b(this._fb)||this._width!==n||this._height!==r)&&(this._width=n,this._height=r,this._fb=this._fb&&this._fb.destroy(),this._fb=new t$W({context:i,colorTextures:[new t$V({context:i,width:n,height:r,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT})],depthStencilRenderbuffer:new r$$({context:i,width:n,height:r,format:M$13.DEPTH_STENCIL})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=n,this._passState.viewport.height=r,this._passState},a$7.prototype.end=function(e){var t=u$_(e.width,1),i=u$_(e.height,1),n=this._context,r=n.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb});n.pixels=r;for(var o=Math.max(t,i),a=o*o,s=Math.floor(.5*t),l=Math.floor(.5*i),u=0,c=0,h=0,d=-1,f=0;f<a;++f){if(-s<=u&&u<=s&&-l<=c&&c<=l){var p=4*((l-c)*t+u+s),_=new e$29(r[p],r[p+1],r[p+2],1);if(_.z<-e$2a.EPSILON10)return _}if(u===c||u<0&&-u===c||u>0&&u===1-c){var m=h;h=-d,d=m}u+=h,c+=d}},a$7.prototype.isDestroyed=function(){return!1},a$7.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),i$10(this)};var z$7=new o$1p,W$b=new o$1p;function vt$1(e,t){var i=Math.max(Math.abs(e.x),Math.abs(t.x)),n=Math.max(Math.abs(e.y),Math.abs(t.y)),r=Math.max(Math.abs(e.z),Math.abs(t.z));return Math.max(Math.max(i,n),r)}function dt$3(e,t,i){var n=1/Math.max(1,vt$1(e.position,t.position));return o$1p.multiplyByScalar(e.position,n,z$7),o$1p.multiplyByScalar(t.position,n,W$b),o$1p.equalsEpsilon(z$7,W$b,i)&&o$1p.equalsEpsilon(e.direction,t.direction,i)&&o$1p.equalsEpsilon(e.up,t.up,i)&&o$1p.equalsEpsilon(e.right,t.right,i)&&p$1d.equalsEpsilon(e.transform,t.transform,i)&&e.frustum.equalsEpsilon(t.frustum,i)}function Y$5(e,t,i,n,r,o,a,s){o.length=n;for(var l=0;l<n;++l){var u,c;a?(u=Math.min(t-s,e+l*s),c=Math.min(t,u+s)):(c=i*(u=Math.max(e,Math.pow(i,l)*e)),r||(c=Math.min(t,c)));var h=o[l];e$2b(h)?(h.near=u,h.far=c):h=o[l]=new i$e(u,c)}}function bt$1(e,t,i,n){e.debugShowFrustums&&(i.debugOverlappingFrustums=0);for(var r=t.frustumCommandsList,o=r.length,a=0;a<o;++a){var s=r[a],l=s.near,u=s.far;if(!(n.start>u)){if(n.stop<l)break;var c=i.pass,h=s.indices[c]++;if(s.commands[c][h]=i,e.debugShowFrustums&&(i.debugOverlappingFrustums|=1<<a),i.executeInClosestFrustum)break}}if(e.debugShowFrustums){var d=t.debugFrustumStatistics.commandsInFrustums;d[i.debugOverlappingFrustums]=e$2b(d[i.debugOverlappingFrustums])?d[i.debugOverlappingFrustums]+1:1,++t.debugFrustumStatistics.totalCommands}e.updateDerivedCommands(i)}L$c.prototype.checkForCameraUpdates=function(e){var t=this.camera,i=this._cameraClone;return dt$3(t,i,e$2a.EPSILON6)?(this._cameraStartFired&&Et$a()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=Et$a(),v$K.clone(t,i),!0)};var H$c=new i$W,o$b=new o$1n;L$c.prototype.createPotentiallyVisibleSet=function(e){var t=e.frameState,i=t.camera,n=i.directionWC,r=i.positionWC,o=e._computeCommandList,a=e._overlayCommandList,s=e._logDepthOverlayCommandList,l=e._overlayAgainstDepthCommandList,u=t.commandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});for(var c=this.frustumCommandsList,h=c.length,d=Le$s.NUMBER_OF_PASSES,f=0;f<h;++f)for(var p=0;p<d;++p)c[f].indices[p]=0;o.length=0,a.length=0,s.length=0,l.length=0;for(var _=Number.MAX_VALUE,m=-Number.MAX_VALUE,g=!1,x=t.shadowState.shadowsEnabled,v=Number.MAX_VALUE,y=-Number.MAX_VALUE,$=Number.MAX_VALUE,b=t.mode===C$13.SCENE3D?t.occluder:void 0,T=t.cullingVolume,C=H$c.planes,S=0;S<5;++S)C[S]=T.planes[S];T=H$c;for(var w=u.length,E=0;E<w;++E){var P=u[E];if(e.terrainProvider.isShowGlobe||!0!==P.invalid){var A=P.pass;if(A===Le$s.COMPUTE)o.push(P);else if(A===Le$s.LOG_DEPTH_OVERLAY)s.push(P),e.updateDerivedCommands(P);else if(A===Le$s.OVERLAY)a.push(P),e.updateDerivedCommands(P);else if(A===Le$s.OVERLAY_AGAINST_DEPTH)l.push(P),e.updateDerivedCommands(P);else{var L=P.boundingVolume;if(e$2b(L)){if(!e.isVisible(P,T,b))continue;if(o$b=L.computePlaneDistances(r,n,o$b),_=Math.min(_,o$b.start),m=Math.max(m,o$b.stop),x&&P.receiveShadows&&o$b.start<C$Y.MAXIMUM_DISTANCE&&!(A===Le$s.GLOBE&&o$b.start<-100&&o$b.stop>100)){var M=o$b.stop-o$b.start;A!==Le$s.GLOBE&&o$b.start<100&&($=Math.min($,M));var R=Math.max(o$b.start,C$Y.NEAR_PLANE);v=Math.min(v,R),y=Math.max(y,o$b.stop)}}else o$b.start=i.frustum.near,o$b.stop=i.frustum.far,g=!(P instanceof t$X);bt$1(e,this,P,o$b)}}}g?(_=i.frustum.near,m=i.frustum.far):(_=Math.min(Math.max(_,i.frustum.near),i.frustum.far),_=t.useLogDepth?_:Math.max(_,1),m=Math.max(Math.min(m,i.frustum.far),_),x&&(v=Math.min(Math.max(v,i.frustum.near),i.frustum.far),y=Math.max(Math.min(y,i.frustum.far),v+1))),x&&!t.passes.pick&&(t.shadowState.nearPlane=Math.max(v,.1),t.shadowState.farPlane=y,t.shadowState.closestObjectSize=$);var I,O=e.mode===C$13.SCENE2D,D=t.useLogDepth,B=D?e.logarithmicDepthFarToNearRatio:e.farToNearRatio;!t.useLogDepth&&t.context.depthTexture&&(t.passes.fbo||t._isDepth||e.compositor.isScanEnable())&&(B=e.logarithmicDepthFarToNearRatio,_=Math.max(_,1)),O?(m=Math.min(m,i.position.z+e.nearToFarDistance2D),_=Math.min(_,m),I=Math.ceil(Math.max(1,m-_)/e.nearToFarDistance2D)):I=Math.ceil(Math.log(m/_)/Math.log(B)),(this.updateFrustums||_!==Number.MAX_VALUE&&(I!==h||0!==c.length&&(_<c[0].near||m>c[h-1].far&&(D||!e$2a.equalsEpsilon(m,c[h-1].far,e$2a.EPSILON8)))))&&(this.updateFrustums=!1,Y$5(_,m,B,I,D,c,O,e.nearToFarDistance2D),this.createPotentiallyVisibleSet(e));var N=t.frustumSplits;N.length=I+1;for(var F=0;F<I;++F)N[F]=c[F].near,F===I-1&&(N[F+1]=c[F].far)},L$c.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickPointFramebuffer=this.pickPointFramebuffer&&this.pickPointFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.normalFramebuffer=this.normalFramebuffer&&this.normalFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy(),this.globeTranslucencyFramebuffer=this.globeTranslucencyFramebuffer&&this.globeTranslucencyFramebuffer.destroy();var e,t,i=this.pickDepths,n=this.debugGlobeDepths;for(t=i.length,e=0;e<t;++e)i[e].destroy();for(t=n.length,e=0;e<t;++e)n[e].destroy()};var J$4=.1,wt$2=new a$g({pass:ue$d.MOST_DETAILED_PRELOAD}),yt$1=new a$g({pass:ue$d.MOST_DETAILED_PICK}),b$f=new a$g({pass:ue$d.PICK});function d$g(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;var t=new f$18(0,0,1,1),i=new v$K(e);i.frustum=new a$V({width:J$4,aspectRatio:1,near:.1}),this._pickOffscreenView=new L$c(e,i,t)}d$g.prototype.update=function(){this._pickPositionCacheDirty=!0},d$g.prototype.getPickDepth=function(e,t){var i=e.view.pickDepths,n=i[t];return e$2b(n)||(n=new f$d,i[t]=n),n};var kt$1=new l$12,Ct$2=new o$1p,M$b=new o$1p,Pt$1=new o$1o,Dt$1=new p$1d;function St(e,t,i,n,r){var o=e.camera,a=o.frustum;e$2b(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2*(t.x-r.x)/r.width-1;s*=.5*(a.right-a.left);var l=2*(r.height-t.y-r.y)/r.height-1;l*=.5*(a.top-a.bottom);var u=p$1d.clone(o.transform,Dt$1);o._setTransform(p$1d.IDENTITY);var c=o$1p.clone(o.position,Ct$2);o$1p.multiplyByScalar(o.right,s,M$b),o$1p.add(M$b,c,c),o$1p.multiplyByScalar(o.up,l,M$b),o$1p.add(M$b,c,c),o._setTransform(u),e.mode===C$13.SCENE2D&&o$1p.fromElements(c.z,c.x,c.y,c);var h=a.getPixelDimensions(r.width,r.height,1,1,Pt$1),d=kt$1;return d.right=.5*h.x,d.left=-d.right,d.top=.5*h.y,d.bottom=-d.top,d.near=a.near,d.far=a.far,d.computeCullingVolume(c,o.directionWC,o.upWC)}var Ft$2=new l$11,Rt$3=new o$1o;function Ot$1(e,t,i,n,r){var o=e.camera,a=o.frustum,s=a.near,l=Math.tan(.5*a.fovy),u=a.aspectRatio*l,c=(2*(t.x-r.x)/r.width-1)*s*u,h=(2*(r.height-t.y-r.y)/r.height-1)*s*l,d=a.getPixelDimensions(r.width,r.height,1,1,Rt$3),f=d.x*i*.5,p=d.y*n*.5,_=Ft$2;return _.top=h+p,_.bottom=h-p,_.right=c+f,_.left=c-f,_.near=s,_.far=a.far,_.computeCullingVolume(o.positionWC,o.directionWC,o.upWC)}function Q$4(e,t,i,n,r){var o=e.camera.frustum;return o instanceof a$V||o instanceof l$12?St(e,t,i,n,r):Ot$1(e,t,i,n,r)}var R$a=3,V$8=3,P$b=new f$18(0,0,R$a,V$8),$$8=new o$1o,G$a=new e$1U(0,0,0,0);function Ht$1(e,t){var i=e.context,n=e.frameState,r=e.environmentState,o=e.defaultView;e.view=o;var a=o.viewport;a.x=0,a.y=0,a.width=i.drawingBufferWidth,a.height=i.drawingBufferHeight;var s=o.passState;s.viewport=f$18.clone(a,s.viewport),e.clearPasses(n.passes),n.passes.pick=!0,n.passes.depth=!0,n.cullingVolume=Q$4(e,t,1,1,a),n.tilesetPassState=b$f,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,s=o.pickDepthFramebuffer.update(i,t,a),e.updateAndExecuteCommands(s,G$a),e.resolveFramebuffers(s),i.endFrame()}d$g.prototype.pick=function(e,t,i,n){if(!e$2b(t))throw new t$16("windowPosition is undefined.");R$a=u$_(i,3),V$8=u$_(n,R$a);var r=e.context,o=r.uniformState,a=e.frameState,s=e.defaultView;e.view=s;var l=s.viewport;l.x=0,l.y=0,l.width=r.drawingBufferWidth,l.height=r.drawingBufferHeight;var u=s.passState;u.viewport=f$18.clone(l,u.viewport);var c=s$Q.transformWindowToDrawingBuffer(e,t,$$8);e.jobScheduler.disableThisFrame(),e.updateFrameState(),a.cullingVolume=Q$4(e,c,R$a,V$8,l),a.invertClassification=!1,a.passes.pick=!0,a.tilesetPassState=b$f,o.update(a),e.updateEnvironment(),P$b.x=c.x-.5*(R$a-1),P$b.y=e.drawingBufferHeight-c.y-.5*(V$8-1),P$b.width=R$a,P$b.height=V$8,u=s.pickFramebuffer.begin(P$b,s.viewport),e.updateAndExecuteCommands(u,G$a),e.resolveFramebuffers(u);var h=s.pickFramebuffer.end(P$b);return r.endFrame(),h};var xt$2=new o$15,_t$2=new l$11,Vt$2=new a$V,Mt$2=new l$12;d$g.prototype.pickPositionWorldCoordinates=function(e,t,i){if(e.useDepthPicking){if(!e$2b(t))throw new t$16("windowPosition is undefined.");if(!e.context.depthTexture)throw new t$16("Picking from the depth buffer is not supported. Check pickPositionSupported.");var n=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n))return o$1p.clone(this._pickPositionCache[n],i);var r=e.frameState,o=e.context,a=o.uniformState,s=e.defaultView;e.view=s;var l=s$Q.transformWindowToDrawingBuffer(e,t,$$8);e.pickTranslucentDepth?Ht$1(e,l):(e.updateFrameState(),a.update(r),e.updateEnvironment()),l.y=e.drawingBufferHeight-l.y;var u,c=e.camera;u=e$2b(c.frustum.fov)?c.frustum.clone(xt$2):e$2b(c.frustum.infiniteProjectionMatrix)?c.frustum.clone(_t$2):e$2b(c.frustum.width)?c.frustum.clone(Vt$2):c.frustum.clone(Mt$2);for(var h=s.frustumCommandsList,d=h.length,f=0;f<d;++f){var p=this.getPickDepth(e,f).getDepth(o,l.x,l.y);if(p>0&&p<1){var _,m=h[f];return e.mode===C$13.SCENE2D?(_=c.position.z,c.position.z=_-m.near+1,u.far=Math.max(1,m.far-m.near),u.near=1,a.update(r),a.updateFrustum(u)):(u.near=m.near*(0!==f?e.opaqueFrustumNearOffset:1),u.far=m.far,a.updateFrustum(u)),i=s$Q.drawingBufferToWgs84Coordinates(e,l,p,i),e.mode===C$13.SCENE2D&&(c.position.z=_,a.update(r)),this._pickPositionCache[n]=o$1p.clone(i),i}}this._pickPositionCache[n]=void 0}};var Nt$2=new a$18;function j$9(e,t){var i,n,r=[],o=[],a=[],s=[];e$2b(e)||(e=Number.MAX_VALUE);for(var l=t();e$2b(l);){var u=l.object,c=l.position,h=l.exclude;if(e$2b(c)&&!e$2b(u)){r.push(l);break}if(!e$2b(u)||!e$2b(u.primitive)||!h&&(r.push(l),0>=--e))break;var d=u.primitive,f=!1;"function"==typeof d.getGeometryInstanceAttributes&&e$2b(u.id)&&(e$2b(n=d.getGeometryInstanceAttributes(u.id))&&e$2b(n.show)&&(f=!0,n.show=e$1F.toValue(!1,n.show),a.push(n))),u instanceof e$L&&(f=!0,u.show=!1,s.push(u)),f||(d.show=!1,o.push(d)),l=t()}for(i=0;i<o.length;++i)o[i].show=!0;for(i=0;i<a.length;++i)(n=a[i]).show=e$1F.toValue(!0,n.show);for(i=0;i<s.length;++i)s[i].show=!0;return r}d$g.prototype.pickPosition=function(e,t,i){if(e$2b(i=this.pickPositionWorldCoordinates(e,t,i))&&e.mode!==C$13.SCENE3D){o$1p.fromElements(i.y,i.z,i.x,i);var n=e.mapProjection,r=n.ellipsoid,o=n.unproject(i,Nt$2);r.cartographicToCartesian(o,i)}return i},d$g.prototype.drillPick=function(e,t,i,n,r){var o=this,a=j$9(i,(function(){var i=o.pick(e,t,n,r);if(e$2b(i))return{object:i,position:void 0,exclude:!1}}));return a.map((function(e){return e.object}))};var tt$3=new o$1p,Wt$2=new o$1p;function Et$2(e,t,i){this.ray=e,this.width=t,this.tilesets=i,this.ready=!1,this.deferred=o$1l.defer(),this.promise=this.deferred.promise}function rt$5(e,t,i,n){var r=t.direction,o=o$1p.mostOrthogonalAxis(r,tt$3),a=o$1p.cross(r,o,tt$3),s=o$1p.cross(r,a,Wt$2);return n.position=t.origin,n.direction=r,n.up=s,n.right=a,n.frustum.width=u$_(i,J$4),n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC)}function Tt$3(e,t,i){var n=t.frameState,r=i.ray,o=i.width,a=i.tilesets,s=e._pickOffscreenView.camera,l=rt$5(e,r,o,s),u=wt$2;u.camera=s,u.cullingVolume=l;for(var c=!0,h=a.length,d=0;d<h;++d){var f=a[d];f.show&&t.primitives.contains(f)&&(f.updateForPass(n,u),c=c&&u.ready)}return c&&i.deferred.resolve(),c}function et$4(e,t,i){for(var n=e.length,r=0;r<n;++r){var o=e.get(r);o.show&&(e$2b(o.isCesium3DTileset)?(!e$2b(t)||-1===t.indexOf(o))&&i.push(o):o instanceof o$x&&et$4(o,t,i))}}function N$4(e,t,i,n,r,o){var a=[];if(et$4(t.primitives,n,a),0===a.length)return o$1l.resolve(o());var s=new Et$2(i,r,a);return e._mostDetailedRayPicks.push(s),s.promise.then((function(){return o()}))}function At$1(e,t){return!(!e$2b(e)||!e$2b(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function It$2(e,t,i,n,r,o,a){var s=t.context,l=s.uniformState,u=t.frameState,c=e._pickOffscreenView;t.view=c,rt$5(e,i,r,c.camera),P$b=f$18.clone(c.viewport,P$b);var h=c.pickFramebuffer.begin(P$b,c.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),u.invertClassification=!1,u.passes.pick=!0,u.passes.offscreen=!0,c.updateFrustums=!0,u.tilesetPassState=a?yt$1:b$f,l.update(u),t.updateEnvironment(),t.updateAndExecuteCommands(h,G$a),t.resolveFramebuffers(h);var d,f=c.pickFramebuffer.end(s);if(t.context.depthTexture)for(var p=c.frustumCommandsList.length,_=0;_<p;++_){var m=e.getPickDepth(t,_).getDepth(s,0,0);if(m>0&&m<1){var g=c.frustumCommandsList[_],x=g.near*(0!==_?t.opaqueFrustumNearOffset:1),v=x+m*(g.far-x);d=f$17.getPoint(i,v);break}}if(t.view=t.defaultView,s.endFrame(),e$2b(f)||e$2b(d))return{object:f,position:d,exclude:!e$2b(d)&&o||At$1(f,n)}}function it$3(e,t,i,n,r,o,a,s){return j$9(n,(function(){return It$2(e,t,i,r,o,a,s)}))}function O$9(e,t,i,n,r,o,a){var s=it$3(e,t,i,1,n,r,o,a);if(s.length>0)return s[0]}function at$5(e,t,i,n,r,o,a,s){return it$3(e,t,i,n,r,o,a,s)}function W$a(e,t){var i=o$1l.defer();return t.then((function(t){var n=e.postRender.addEventListener((function(){i.resolve(t),n()}));e.requestRender()})).otherwise((function(e){i.reject(e)})),i.promise}d$g.prototype.updateMostDetailedRayPicks=function(e){for(var t=this._mostDetailedRayPicks,i=0;i<t.length;++i)Tt$3(this,e,t[i])&&t.splice(i--,1)},d$g.prototype.pickFromRay=function(e,t,i,n){if(o$1q.defined("ray",t),e.mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");return O$9(this,e,t,i,n,!1,!1)},d$g.prototype.drillPickFromRay=function(e,t,i,n,r){if(o$1q.defined("ray",t),e.mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");return at$5(this,e,t,i,n,r,!1,!1)},d$g.prototype.pickFromRayMostDetailed=function(e,t,i,n){if(o$1q.defined("ray",t),e.mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");var r=this;return t=f$17.clone(t),i=e$2b(i)?i.slice():i,W$a(e,N$4(r,e,t,i,n,(function(){return O$9(r,e,t,i,n,!1,!0)})))},d$g.prototype.drillPickFromRayMostDetailed=function(e,t,i,n,r){if(o$1q.defined("ray",t),e.mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");var o=this;return t=f$17.clone(t),n=e$2b(n)?n.slice():n,W$a(e,N$4(o,e,t,n,r,(function(){return at$5(o,e,t,i,n,r,!1,!0)})))};var Bt$3=new o$1p,Lt$1=new o$1p,zt$1=new f$17,ot$3=new a$18;function K$5(e,t){var i=e.globe,n=e$2b(i)?i.ellipsoid:e.mapProjection.ellipsoid,r=e$1E._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,Lt$1),a=a$18.toCartesian(t,n,Bt$3),s=zt$1;s.origin=a,s.direction=o;var l=new f$17;return f$17.getPoint(s,r,l.origin),o$1p.negate(o,l.direction),l}function nt$4(e,t){var i=e.globe,n=e$2b(i)?i.ellipsoid:e.mapProjection.ellipsoid;return K$5(e,a$18.fromCartesian(t,n,ot$3))}function ft$1(e,t){var i=e.globe,n=e$2b(i)?i.ellipsoid:e.mapProjection.ellipsoid;return a$18.fromCartesian(t,n,ot$3).height}function qt$2(e,t,i,n,r){var o=K$5(t,i);return N$4(e,t,o,n,r,(function(){var i=O$9(e,t,o,n,r,!0,!0);if(e$2b(i))return ft$1(t,i.position)}))}function bt(e,t,i,n,r,o){var a=nt$4(t,i);return N$4(e,t,a,n,r,(function(){var i=O$9(e,t,a,n,r,!0,!0);if(e$2b(i))return o$1p.clone(i.position,o)}))}function M$a(e){if(this._positions=u$_(e,[new o$1p,new o$1p,new o$1p]),this.boundingSphere=i$1c.fromPoints(e),e$2b(e)){var t=z$_.fromPositions({positions:e,perPositionHeight:!0});this._geometry=z$_.createGeometry(t),this._triangleArrayByWeight=S$6(this)}this._density=1}d$g.prototype.sampleHeight=function(e,t,i,n){if(o$1q.defined("position",t),e.mode!==C$13.SCENE3D)throw new t$16("sampleHeight is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new t$16("sampleHeight requires depth texture support. Check sampleHeightSupported.");var r=O$9(this,e,K$5(e,t),i,n,!0,!1);if(e$2b(r))return ft$1(e,r.position)},d$g.prototype.clampToHeight=function(e,t,i,n,r){if(o$1q.defined("cartesian",t),e.mode!==C$13.SCENE3D)throw new t$16("clampToHeight is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new t$16("clampToHeight requires depth texture support. Check clampToHeightSupported.");var o=O$9(this,e,nt$4(e,t),i,n,!0,!1);if(e$2b(o))return o$1p.clone(o.position,r)},d$g.prototype.sampleHeightMostDetailed=function(e,t,i,n){if(o$1q.defined("positions",t),e.mode!==C$13.SCENE3D)throw new t$16("sampleHeightMostDetailed is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new t$16("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");i=e$2b(i)?i.slice():i;for(var r=t.length,o=new Array(r),a=0;a<r;++a)o[a]=qt$2(this,e,t[a],i,n);return W$a(e,o$1l.all(o).then((function(e){for(var i=e.length,n=0;n<i;++n)t[n].height=e[n];return t})))},d$g.prototype.clampToHeightMostDetailed=function(e,t,i,n){if(o$1q.defined("cartesians",t),e.mode!==C$13.SCENE3D)throw new t$16("clampToHeightMostDetailed is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new t$16("clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported.");i=e$2b(i)?i.slice():i;for(var r=t.length,o=new Array(r),a=0;a<r;++a)o[a]=bt(this,e,t[a],i,n,t[a]);return W$a(e,o$1l.all(o).then((function(e){for(var i=e.length,n=0;n<i;++n)t[n]=e[n];return t})))},d$g.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()},Object.defineProperties(M$a.prototype,{type:{get:function(){return"Polygon"}},positions:{get:function(){return this._positions},set:function(e){if(e$2b(e)){this._positions=e;var t=z$_.fromPositions({positions:this._positions,perPositionHeight:!0});this._geometry=z$_.createGeometry(t),this._triangleArrayByWeight=S$6(this),this.boundingSphere=i$1c.fromPoints(e),e$2b(this.owner)&&(this.owner._updateParticlePool=!0)}}},density:{set:function(e){e!==this._density&&(this._density=e,e$2b(this.owner)&&(this.owner._updateParticlePool=!0))},get:function(){return this._density}},areaFactor:{get:function(){return this._density*this._area/100|0}}});var l$c=new o$1p,_$b=new o$1p,x$8=new o$1p;function S$6(e){var t,i,n=e._geometry,r=n.indices,o=r.length/3,a=n.attributes.position.values,s=[],l=0;for(t=0;t<o;t++){var u=r[3*t],c=r[3*t+1],h=r[3*t+2];l$c.x=a[3*u],l$c.y=a[3*u+1],l$c.z=a[3*u+2],_$b.x=a[3*c],_$b.y=a[3*c+1],_$b.z=a[3*c+2],x$8.x=a[3*h],x$8.y=a[3*h+1],x$8.z=a[3*h+2];var d=j$8(l$c,_$b,x$8);l+=d,s.push(d)}e._area=l;var f=Math.max(100,10*o),p=[];for(t=0;t<o;t++){var _=Math.floor(s[t]/l*f);for(_=Math.max(1,_),i=0;i<_;i++)p.push(t)}return p}var b$e=new o$1p,W$9=new o$1p,z$6=new o$1p;function j$8(e,t,i){return b$e=o$1p.subtract(t,e,b$e),W$9=o$1p.subtract(i,e,W$9),z$6=o$1p.cross(b$e,W$9,z$6),.5*o$1p.magnitude(z$6)}function C$b(e,t,i,n,r){return(1-Math.sqrt(e))*i+Math.sqrt(e)*(1-t)*n+Math.sqrt(e)*t*r}M$a.prototype.emit=function(e){if(e$2b(this._geometry)){var t=Math.floor(e$2a.randomBetween(0,this._triangleArrayByWeight.length)),i=this._triangleArrayByWeight[t],n=this._geometry.indices[3*i],r=this._geometry.indices[3*i+1],o=this._geometry.indices[3*i+2],a=this._geometry.attributes.position.values,s=a[3*n],l=a[3*n+1],u=a[3*n+2],c=a[3*r],h=a[3*r+1],d=a[3*r+2],f=a[3*o],p=a[3*o+1],_=a[3*o+2],m=e$2a.randomBetween(0,1),g=e$2a.randomBetween(0,1),x=C$b(m,g,s,c,f),v=C$b(m,g,l,h,p),y=C$b(m,g,u,d,_);e.position=o$1p.fromElements(x,v,y,e.position),e.velocity=o$1p.normalize(e.position,e.velocity)}};var b$d="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See:\n\nvoid main()\n{\n vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n\n#ifdef AUTO_EXPOSURE\n color /= texture2D(autoExposure, vec2(0.5)).r;\n#endif\n float g = 0.985;\n\n float a = 0.065;\n float b = 0.0001;\n float c = 0.433;\n float d = 0.238;\n\n color = (color * (color + a) - b) / (color * (g * color + c) + d);\n\n color = clamp(color, 0.0, 1.0);\n color = czm_inverseGamma(color);\n gl_FragColor = vec4(color, fragmentColor.a);\n}\n",A$c="uniform sampler2D randomTexture;\nuniform sampler2D depthTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\n\nvarying vec2 v_textureCoordinates;\n\nvec4 clipToEye(vec2 uv, float depth)\n{\n vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\n vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\n posEC = posEC / posEC.w;\n return posEC;\n}\n\n//Reconstruct Normal Without Edge Removation\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\n vec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\n vec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\n vec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\n vec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\n\n vec3 up = posInCamera.xyz - posInCameraUp.xyz;\n vec3 down = posInCameraDown.xyz - posInCamera.xyz;\n vec3 left = posInCamera.xyz - posInCameraLeft.xyz;\n vec3 right = posInCameraRight.xyz - posInCamera.xyz;\n\n vec3 DX = length(left) < length(right) ? left : right;\n vec3 DY = length(up) < length(down) ? up : down;\n\n return normalize(cross(DY, DX));\n}\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 posInCamera = clipToEye(v_textureCoordinates, depth);\n\n if (posInCamera.z > frustumLength)\n {\n gl_FragColor = vec4(1.0);\n return;\n }\n\n vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\n float depthU = czm_readDepth(depthTexture, v_textureCoordinates - vec2(0.0, pixelSize.y));\n float depthD = czm_readDepth(depthTexture, v_textureCoordinates + vec2(0.0, pixelSize.y));\n float depthL = czm_readDepth(depthTexture, v_textureCoordinates - vec2(pixelSize.x, 0.0));\n float depthR = czm_readDepth(depthTexture, v_textureCoordinates + vec2(pixelSize.x, 0.0));\n vec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\n\n float ao = 0.0;\n vec2 sampleDirection = vec2(1.0, 0.0);\n float gapAngle = 90.0 * czm_radiansPerDegree;\n\n // RandomNoise\n float randomVal = texture2D(randomTexture, v_textureCoordinates).x;\n\n //Loop for each direction\n for (int i = 0; i < 4; i++)\n {\n float newGapAngle = gapAngle * (float(i) + randomVal);\n float cosVal = cos(newGapAngle);\n float sinVal = sin(newGapAngle);\n\n //Rotate Sampling Direction\n vec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\n float localAO = 0.0;\n float localStepSize = stepSize;\n\n //Loop for each step\n for (int j = 0; j < 6; j++)\n {\n vec2 newCoords = v_textureCoordinates + rotatedSampleDirection * localStepSize * pixelSize;\n\n //Exception Handling\n if(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n {\n break;\n }\n\n float stepDepthInfo = czm_readDepth(depthTexture, newCoords);\n vec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\n vec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\n float len = length(diffVec);\n\n if (len > lengthCap)\n {\n break;\n }\n\n float dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\n float weight = len / lengthCap;\n weight = 1.0 - weight * weight;\n\n if (dotVal < bias)\n {\n dotVal = 0.0;\n }\n\n localAO = max(localAO, dotVal * weight);\n localStepSize += stepSize;\n }\n ao += localAO;\n }\n\n ao /= 4.0;\n ao = 1.0 - clamp(ao, 0.0, 1.0);\n ao = pow(ao, intensity);\n gl_FragColor = vec4(vec3(ao), 1.0);\n}\n",T$b="uniform sampler2D colorTexture;\nuniform sampler2D ambientOcclusionTexture;\nuniform bool ambientOcclusionOnly;\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 color = texture2D(colorTexture, v_textureCoordinates).rgb;\n vec3 ao = texture2D(ambientOcclusionTexture, v_textureCoordinates).rgb;\n gl_FragColor.rgb = ambientOcclusionOnly ? ao : ao * color;\n}\n",w$6="uniform sampler2D colorTexture;\nuniform float gradations;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n#ifdef CZM_SELECTED_FEATURE\n if (czm_selected()) {\n gl_FragColor = vec4(rgb, 1.0);\n return;\n }\n#endif\n float luminance = czm_luminance(rgb);\n float darkness = luminance * gradations;\n darkness = (darkness - fract(darkness)) / gradations;\n gl_FragColor = vec4(vec3(darkness), 1.0);\n}\n",z$5="uniform sampler2D colorTexture;\nuniform sampler2D bloomTexture;\nuniform bool glowOnly;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n\n#ifdef CZM_SELECTED_FEATURE\n if (czm_selected()) {\n gl_FragColor = color;\n return;\n }\n#endif\n\n vec4 bloom = texture2D(bloomTexture, v_textureCoordinates);\n gl_FragColor = glowOnly ? bloom : bloom + color;\n}\n",E$9="uniform sampler2D colorTexture;\nuniform float brightness;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n vec3 target = vec3(0.0);\n gl_FragColor = vec4(mix(target, rgb, brightness), 1.0);\n}\n",C$a="uniform sampler2D colorTexture;\nuniform float contrast;\nuniform float brightness;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 sceneColor = texture2D(colorTexture, v_textureCoordinates).xyz;\n sceneColor = czm_RGBToHSB(sceneColor);\n sceneColor.z += brightness;\n sceneColor = czm_HSBToRGB(sceneColor);\n\n float factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));\n sceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);\n gl_FragColor = vec4(sceneColor, 1.0);\n}\n",F$9="uniform sampler2D colorTexture;\nuniform sampler2D blurTexture;\nuniform sampler2D depthTexture;\nuniform float focalDistance;\n\nvarying vec2 v_textureCoordinates;\n\nvec4 toEye(vec2 uv, float depth)\n{\n vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\n vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera = posInCamera / posInCamera.w;\n return posInCamera;\n}\n\nfloat computeDepthBlur(float depth)\n{\n float f;\n if (depth < focalDistance)\n {\n f = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);\n }\n else\n {\n f = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);\n f = pow(f, 0.1);\n }\n f *= f;\n f = clamp(f, 0.0, 1.0);\n return pow(f, 0.5);\n}\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 posInCamera = toEye(v_textureCoordinates, depth);\n float d = computeDepthBlur(-posInCamera.z);\n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), texture2D(blurTexture, v_textureCoordinates), d);\n}\n",R$9="uniform sampler2D depthTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n gl_FragColor = vec4(vec3(depth), 1.0);\n}\n",P$a="uniform sampler2D depthTexture;\nuniform float length;\nuniform vec4 color;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n float directions[3];\n directions[0] = -1.0;\n directions[1] = 0.0;\n directions[2] = 1.0;\n\n float scalars[3];\n scalars[0] = 3.0;\n scalars[1] = 10.0;\n scalars[2] = 3.0;\n\n float padx = czm_pixelRatio / czm_viewport.z;\n float pady = czm_pixelRatio / czm_viewport.w;\n\n#ifdef CZM_SELECTED_FEATURE\n bool selected = false;\n for (int i = 0; i < 3; ++i)\n {\n float dir = directions[i];\n selected = selected || czm_selected(vec2(-padx, dir * pady));\n selected = selected || czm_selected(vec2(padx, dir * pady));\n selected = selected || czm_selected(vec2(dir * padx, -pady));\n selected = selected || czm_selected(vec2(dir * padx, pady));\n if (selected)\n {\n break;\n }\n }\n if (!selected)\n {\n gl_FragColor = vec4(color.rgb, 0.0);\n return;\n }\n#endif\n\n float horizEdge = 0.0;\n float vertEdge = 0.0;\n\n for (int i = 0; i < 3; ++i)\n {\n float dir = directions[i];\n float scale = scalars[i];\n\n horizEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;\n horizEdge += texture2D(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;\n\n vertEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;\n vertEdge += texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;\n }\n\n float len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);\n gl_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);\n}\n",O$8="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See slides 142 and 143:\n// http://www.gdcvault.com/play/1012459/Uncharted_2__HDR_Lighting\n\nvoid main()\n{\n vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n\n#ifdef AUTO_EXPOSURE\n float exposure = texture2D(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n\n\tconst float A = 0.22; // shoulder strength\n\tconst float B = 0.30; // linear strength\n\tconst float C = 0.10; // linear angle\n\tconst float D = 0.20; // toe strength\n\tconst float E = 0.01; // toe numerator\n\tconst float F = 0.30; // toe denominator\n\n\tconst float white = 11.2; // linear white point value\n\n\tvec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;\n\tfloat w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;\n\n\tc = czm_inverseGamma(c / w);\n\tgl_FragColor = vec4(c, fragmentColor.a);\n}\n",D$8="varying vec2 v_textureCoordinates;\n\nuniform sampler2D colorTexture;\n\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\n\nvoid main()\n{\n vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\n vec4 color = FxaaPixelShader(\n v_textureCoordinates,\n colorTexture,\n fxaaQualityRcpFrame,\n fxaaQualitySubpix,\n fxaaQualityEdgeThreshold,\n fxaaQualityEdgeThresholdMin);\n float alpha = texture2D(colorTexture, v_textureCoordinates).a;\n gl_FragColor = vec4(color.rgb, alpha);\n}",U$8="uniform sampler2D colorTexture;\nuniform sampler2D dirtTexture;\nuniform sampler2D starTexture;\nuniform vec2 dirtTextureDimensions;\nuniform float distortion;\nuniform float ghostDispersal;\nuniform float haloWidth;\nuniform float dirtAmount;\nuniform float earthRadius;\nuniform float intensity;\n\nvarying vec2 v_textureCoordinates;\n\n// whether it is in space or not\n// 6500000.0 is empirical value\n#define DISTANCE_TO_SPACE 6500000.0\n\n// return ndc from world coordinate biased earthRadius\nvec4 getNDCFromWC(vec3 WC, float earthRadius)\n{\n vec4 positionEC = czm_view * vec4(WC, 1.0);\n positionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);\n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n return czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n}\n\n// Check if current pixel is included Earth\n// if then mask it gradually\nfloat isInEarth(vec2 texcoord, vec2 sceneSize)\n{\n vec2 NDC = texcoord * 2.0 - 1.0;\n vec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);\n vec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);\n NDC.xy -= earthPosSC.xy;\n\n float X = abs(NDC.x) * sceneSize.x;\n float Y = abs(NDC.y) * sceneSize.y;\n\n return clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));\n}\n\n// For Chromatic effect\nvec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)\n{\n vec2 sceneSize = czm_viewport.zw;\n vec3 color;\n if(isSpace)\n {\n color.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture2D(tex, texcoord + direction * distortion.r).r;\n color.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture2D(tex, texcoord + direction * distortion.g).g;\n color.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture2D(tex, texcoord + direction * distortion.b).b;\n }\n else\n {\n color.r = texture2D(tex, texcoord + direction * distortion.r).r;\n color.g = texture2D(tex, texcoord + direction * distortion.g).g;\n color.b = texture2D(tex, texcoord + direction * distortion.b).b;\n }\n return vec4(clamp(color, 0.0, 1.0), 0.0);\n}\n\nvoid main(void)\n{\n vec4 originalColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 rgb = originalColor.rgb;\n bool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;\n\n // Sun position\n vec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);\n vec4 sunPositionEC = czm_view * sunPos;\n vec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);\n sunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);\n\n // If sun is not in the screen space, use original color.\n if(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))\n {\n // Lens flare is disabled when not in space until #5932 is fixed.\n gl_FragColor = originalColor;\n return;\n }\n\n vec2 texcoord = vec2(1.0) - v_textureCoordinates;\n vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\n vec2 invPixelSize = 1.0 / pixelSize;\n vec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);\n\n // ghost vector to image centre:\n vec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;\n vec3 direction = normalize(vec3(ghostVec, 0.0));\n\n // sample ghosts:\n vec4 result = vec4(0.0);\n vec4 ghost = vec4(0.0);\n for (int i = 0; i < 4; ++i)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n // Only bright spots from the centre of the source image\n ghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);\n }\n result += ghost;\n\n // sample halo\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n float weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weightForHalo = pow(1.0 - weightForHalo, 5.0);\n\n result += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;\n\n // dirt on lens\n vec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;\n if (dirtTexCoords.x > 1.0)\n {\n dirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);\n }\n if (dirtTexCoords.y > 1.0)\n {\n dirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);\n }\n result += dirtAmount * texture2D(dirtTexture, dirtTexCoords);\n\n // Rotating starburst texture's coordinate\n // dot(czm_view[0].xyz, vec3(0.0, 0.0, 1.0)) + dot(czm_view[1].xyz, vec3(0.0, 1.0, 0.0))\n float camrot = czm_view[0].z + czm_view[1].y;\n float cosValue = cos(camrot);\n float sinValue = sin(camrot);\n mat3 rotation = mat3(\n cosValue, -sinValue, 0.0,\n sinValue, cosValue, 0.0,\n 0.0, 0.0, 1.0\n );\n\n vec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);\n vec3 st2 = vec3((rotation * st1).xy, 1.0);\n vec3 st3 = st2 * 0.5 + vec3(0.5);\n vec2 lensStarTexcoord = st3.xy;\n float weightForLensFlare = length(vec3(sunPos.xy, 0.0));\n float oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);\n\n if (!isSpace)\n {\n result *= oneMinusWeightForLensFlare * intensity * 0.2;\n }\n else\n {\n result *= oneMinusWeightForLensFlare * intensity;\n result *= texture2D(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;\n }\n\n result += texture2D(colorTexture, v_textureCoordinates);\n\n gl_FragColor = result;\n}\n",I$6="uniform sampler2D colorTexture;\nuniform vec3 white;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See equation 4:\n// http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf\n\nvoid main()\n{\n vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\n float exposure = texture2D(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n color = (color * (1.0 + color / white)) / (1.0 + color);\n color = czm_inverseGamma(color);\n gl_FragColor = vec4(color, fragmentColor.a);\n}\n",X$6="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n float noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;\n vec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n vec3 green = vec3(0.0, 1.0, 0.0);\n gl_FragColor = vec4((noiseValue + rgb) * green, 1.0);\n}\n",Y$4="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See equation 3:\n// http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf\n\nvoid main()\n{\n vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\n float exposure = texture2D(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n color = color / (1.0 + color);\n color = czm_inverseGamma(color);\n gl_FragColor = vec4(color, fragmentColor.a);\n}\n",M$9="uniform sampler2D colorTexture;\nuniform sampler2D silhouetteTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 silhouetteColor = texture2D(silhouetteTexture, v_textureCoordinates);\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n gl_FragColor = mix(color, silhouetteColor, silhouetteColor.a);\n}\n",G$9="uniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nuniform float scale;\n\nvoid main ()\n{\n vec4 oriColor = texture2D(colorTexture, v_textureCoordinates);\n vec4 fogColor = vec4(0.8, 0.8, 0.8, 0.5);\n float depth = texture2D(depthTexture, v_textureCoordinates).r;\n float f = (depth - 0.7) * min(1.0, max(scale, 0.0)) / 0.2;\n gl_FragColor = mix(oriColor, fogColor, clamp(f, 0.0, 1.0));\n}",j$7="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nuniform float speed;\nuniform float angle;\n\nfloat hash(float x){\n return fract(sin(x * 133.3) * 13.13);\n}\n\nvoid main(void){\n float time = czm_frameNumber / 60.0;\n vec2 resolution = czm_viewport.zw;\n vec2 uv = (gl_FragCoord.xy * 2.0 - resolution.xy) / min(resolution.x, resolution.y);\n vec3 c = vec3(0.6, 0.7, 0.8);\n float a = angle;\n float si = sin(a);\n float co = cos(a);\n uv *= mat2(co, -si, si, co);\n uv *= length(uv + vec2(0.0, 4.9)) * 0.3 + 1.0;\n float v = 1.0 - sin(hash(floor(uv.x * 100.0)) * 2.0);\n float b = clamp(abs(sin(speed * time * v + uv.y * (5.0 / (2.0 + v)))) - 0.95, 0.0, 1.0) * 20.0;\n c *= v * b;\n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c, 1.0), speed < 0.00001 ? 0.0 : 0.15);\n}",V$7="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nuniform int density;\nuniform float speed;\nuniform float angle;\n\nfloat snow(vec2 uv, float scale)\n{\n float time = czm_frameNumber / 60.0;\n float w = smoothstep(1.0 , 0.0, -uv.y * (scale / 10.0));\n if(w < 0.1) return 0.0; // 雪花消失\n uv += time / scale; // 随时间移动\n uv.y += time * cos(angle) * speed / scale;\n uv.x += sin(uv.y + time * sin(angle) * speed) / scale; // 左右摇摆\n uv *= scale;\n vec2 s = floor(uv);\n vec2 f = fract(uv);\n vec2 p;\n float k = 3.0;\n float d;\n p = 0.5 + 0.35 * sin(11.0 * fract(sin((s + p + scale) * mat2(7, 3, 6, 5)) * 5.0)) - f;\n d = length(p);\n k = min(d, k);\n k = smoothstep(0.0, k, sin(f.x + f.y) * 0.01);\n return k * w * clamp(float(density) / 5.0, 1.0, 5.0);\n}\n\n\nvoid main(void){\n vec2 resolution = czm_viewport.zw;\n vec2 uv = (gl_FragCoord.xy * 2.0 - resolution.xy) / min(resolution.x, resolution.y);\n vec3 finalColor = vec3(0);\n float c = 0.0;\n for (int i = 2; i < 5; i++) {\n if (density < i) {\n break;\n }\n c += snow(uv, float(i));\n }\n for (int i = 6; i < 10; i+= 2) {\n if (density < i) {\n break;\n }\n c += snow(uv, float(i));\n }\n for (int i = 15; i < 30; i+= 5) {\n if (density < i) {\n break;\n }\n c += snow(uv, float(i));\n }\n finalColor = vec3(c);\n if(c > 0.8)\n {\n finalColor = vec3(max(5.0, c));\n }\n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor, 1.0), 0.15);\n}",W$8="#define SMOOTH_STEPS 5\n#define REFLECTION_SAMPLES 64\n#define RIGHT_HANDED_SCENE\nuniform sampler2D colorTexture;\nuniform sampler2D reflectivitySampler;\nuniform sampler2D normalSampler;\nuniform sampler2D positionSampler;\nuniform float stepSize;\nuniform float strength;\nuniform float threshold;\nuniform float roughnessFactor;\nuniform float reflectionSpecularFalloffExponent;\nvarying vec2 v_textureCoordinates;\n\n// Structs\nstruct ReflectionInfo {\n vec3 color;\n vec4 coords;\n};\n// According to specular, see https://en.wikipedia.org/wiki/Schlick%27s_approximation\nvec3 fresnelSchlick(float cosTheta, vec3 F0)\n{\n return F0 + (1.0 - F0) * pow(1.0 - cosTheta, 5.0);\n}\n// Once the pixel's coordinates has been found, let's adjust (smooth) a little bit by sampling multiple reflection pixels.\nReflectionInfo smoothReflectionInfo(vec3 dir, vec3 hitCoord)\n{\n ReflectionInfo info;\n info.color = vec3(0.0);\n vec4 projectedCoord;\n float sampledDepth;\n for(int i = 0; i < SMOOTH_STEPS; i++)\n {\n projectedCoord = czm_projection * vec4(hitCoord, 1.0);\n projectedCoord.xy /= projectedCoord.w;\n projectedCoord.xy = 0.5 * projectedCoord.xy + vec2(0.5);\n sampledDepth = (czm_view * texture2D(positionSampler, projectedCoord.xy)).z;\n float depth = sampledDepth - hitCoord.z;\n dir *= 0.5;\n if(depth > 0.0)\n hitCoord -= dir;\n else\n hitCoord += dir;\n info.color += texture2D(colorTexture, projectedCoord.xy).rgb;\n }\n projectedCoord = czm_projection * vec4(hitCoord, 1.0);\n projectedCoord.xy /= projectedCoord.w;\n projectedCoord.xy = 0.5 * projectedCoord.xy + vec2(0.5);\n // Merge colors\n info.coords = vec4(projectedCoord.xy, sampledDepth, 1.0);\n info.color += texture2D(colorTexture, projectedCoord.xy).rgb;\n info.color /= float(SMOOTH_STEPS + 1);\n return info;\n}\n\n//Tests the given world position (hitCoord) according to the given reflection vector (dir)\n// until it finds a collision (means that depth is enough close to say it‘s the pixel to sample!).\nReflectionInfo getReflectionInfo(vec3 dir, vec3 hitCoord)\n{\n vec3 endPos = hitCoord + dir;\n vec4 projetedEndPos = czm_projection * vec4(endPos, 1.0);\n projetedEndPos/= projetedEndPos.w;\n projetedEndPos.xyz = 0.5 * projetedEndPos.xyz + vec3(0.5);\n vec4 projectedStartPos = czm_projection * vec4(hitCoord, 1.0);\n projectedStartPos /= projectedStartPos.w;\n projectedStartPos.xyz = 0.5 * projectedStartPos.xyz + vec3(0.5);\n vec4 projectedDir = projetedEndPos - projectedStartPos;\n float step = 1.0 / length(projectedDir.xyz);\n ReflectionInfo info;\n vec4 projectedCoord;\n float sampledDepth;\n float stepOffset = (v_textureCoordinates * czm_viewport.zw, 1.0) * step;\n dir *= stepOffset * stepSize;\n bool found = false;\n for(int i = 0; i < REFLECTION_SAMPLES; i++)\n {\n hitCoord += dir;\n projectedCoord = czm_projection * vec4(hitCoord, 1.0);\n projectedCoord.xy /= projectedCoord.w;\n projectedCoord.xy = 0.5 * projectedCoord.xy + vec2(0.5);\n sampledDepth = texture2D(positionSampler, projectedCoord.xy).z;\n float depth = sampledDepth - hitCoord.z;\n#ifdef RIGHT_HANDED_SCENE\n depth *= -1.0;\n#endif\n\n vec3 curColor = texture2D(colorTexture, vec2(projectedCoord.x, projectedCoord.y)).rgb;\n vec4 curCoords = vec4(projectedCoord.xy, sampledDepth, 0.0);\n if(((depth - dir.z) < threshold) && depth <= 0.0 && !found)\n {\n info.color = curColor;\n info.coords = curCoords;\n found = true;\n }\n }\n\n vec3 lastColor = texture2D(colorTexture, vec2(projectedCoord.x, projectedCoord.y)).rgb;\n vec4 lastCoords = vec4(projectedCoord.xy, sampledDepth, 0.0);\n if(!found){\n info.color = lastColor;\n info.coords = lastCoords;\n }\n return info;\n}\n\nvec3 hash(vec3 a)\n{\n a = fract(a * 0.8);\n a += dot(a, a.yxz + 19.19);\n return fract((a.xxy + a.yxx) * a.zyx);\n}\nvoid main(void){\n // Intensity\n vec4 albedoFull = texture2D(colorTexture, v_textureCoordinates);\n vec3 albedo = albedoFull.rgb;\n float spec = texture2D(reflectivitySampler, v_textureCoordinates).r;\n float isSpecValid = 1.0;\n if (spec == 0.0) {\n isSpecValid = 0.0;\n }\n\n // Get coordinates of the pixel to pick according to the pixel's position and normal.\n vec3 normal = (texture2D(normalSampler, v_textureCoordinates)).xyz;\n vec3 position = texture2D(positionSampler, v_textureCoordinates).xyz;\n vec3 reflected = normalize(reflect(normalize(position), normalize(normal)));\n\n float roughness = 1.0 - texture2D(reflectivitySampler, v_textureCoordinates).a;\n vec3 jitt = mix(vec3(0.0), hash(position), roughness) * roughnessFactor;\n\n ReflectionInfo info = getReflectionInfo(jitt + reflected, position);\n //ReflectionInfo info = getReflectionInfo(reflected, position); // For debug: no roughness\n\n vec2 dCoords = smoothstep(0.2, 0.6, abs(vec2(0.5, 0.5) - info.coords.xy));\n float screenEdgefactor = clamp(1.0 - (dCoords.x + dCoords.y), 0.0, 1.0);\n\n // Fresnel\n vec3 F0 = vec3(0.04);\n F0 = mix(F0, albedo, spec);\n vec3 fresnel = fresnelSchlick(max(dot(normalize(normal), normalize(position)), 0.0), F0);\n\n#ifdef RIGHT_HANDED_SCENE\n reflected.z *= -1.0;\n#endif\n // Apply\n float reflectionMultiplier = clamp(pow(spec * strength, reflectionSpecularFalloffExponent) * screenEdgefactor * reflected.z, 0.0, 0.9);\n float albedoMultiplier = 1.0 - reflectionMultiplier;\n vec3 SSR = info.color * fresnel;\n\n //gl_FragColor = vec4(SSR, reflectionMultiplier);\n gl_FragColor = vec4((albedo * albedoMultiplier) + (SSR.xyz * reflectionMultiplier), 1.0);\n}",H$b="uniform sampler2D screenSpaceReflectionTexture;\nuniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 albedoFull = texture2D(colorTexture, v_textureCoordinates);\n vec3 albedo = albedoFull.rgb;\n vec4 SSR = texture2D(screenSpaceReflectionTexture, v_textureCoordinates);\n float reflectionMultiplier = SSR.a;\n float albedoMultiplier = 1.0 - reflectionMultiplier;\n gl_FragColor = vec4((albedo * albedoMultiplier) + (SSR.xyz * reflectionMultiplier), albedoFull.a);\n}",i$b={};function S$5(e){var t="#define USE_STEP_SIZE\n"+y$M,i=new p$h({name:e+"_x_direction",fragmentShader:t,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:e$i.LINEAR}),n=new p$h({name:e+"_y_direction",fragmentShader:t,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:e$i.LINEAR}),r={};return Object.defineProperties(r,{delta:{get:function(){return i.uniforms.delta},set:function(e){var t=i.uniforms,r=n.uniforms;t.delta=r.delta=e}},sigma:{get:function(){return i.uniforms.sigma},set:function(e){var t=i.uniforms,r=n.uniforms;t.sigma=r.sigma=e}},stepSize:{get:function(){return i.uniforms.stepSize},set:function(e){var t=i.uniforms,r=n.uniforms;t.stepSize=r.stepSize=e}}}),new s$f({name:e,stages:[i,n],uniforms:r})}function K$4(e){if(!e$2b(e))return i$b.createEdgeDetectionStage();for(var t=new s$f({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),i={},n="",r="",o=0;o<e.length;++o)n+="uniform sampler2D edgeTexture"+o+"; \n",r+=" vec4 edge"+o+" = texture2D(edgeTexture"+o+", v_textureCoordinates); \n if (edge"+o+".a > 0.0) \n { \n color = edge"+o+"; \n break; \n } \n",i["edgeTexture"+o]=e[o].name;return new s$f({name:"czm_edge_detection_composite",stages:[t,new p$h({name:"czm_edge_detection_combine",fragmentShader:n+"varying vec2 v_textureCoordinates; \nvoid main() { \n vec4 color = vec4(0.0); \n for (int i = 0; i < "+e.length+"; i++) \n { \n"+r+" } \n gl_FragColor = color; \n} \n",uniforms:i})]})}i$b.createBlurStage=function(){return S$5("czm_blur")},i$b.createDepthOfFieldStage=function(){var e=S$5("czm_depth_of_field_blur"),t=new p$h({name:"czm_depth_of_field_composite",fragmentShader:F$9,uniforms:{focalDistance:5,blurTexture:e.name}}),i={};return Object.defineProperties(i,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(e){t.uniforms.focalDistance=e}},delta:{get:function(){return e.uniforms.delta},set:function(t){e.uniforms.delta=t}},sigma:{get:function(){return e.uniforms.sigma},set:function(t){e.uniforms.sigma=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}}}),new s$f({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:i})},i$b.isDepthOfFieldSupported=function(e){return e.context.depthTexture},i$b.createEdgeDetectionStage=function(){return new p$h({name:"czm_edge_detection_"+e$1Q(),fragmentShader:P$a,uniforms:{length:.25,color:e$1U.clone(e$1U.BLACK)}})},i$b.isEdgeDetectionSupported=function(e){return e.context.depthTexture},i$b.createSilhouetteStage=function(e){var t=K$4(e);return new s$f({name:"czm_silhouette",stages:[t,new p$h({name:"czm_silhouette_color_edges",fragmentShader:M$9,uniforms:{silhouetteTexture:t.name}})],inputPreviousStageTexture:!1,uniforms:t.uniforms})},i$b.isSilhouetteSupported=function(e){return e.context.depthTexture},i$b.createBloomStage=function(){var e=new p$h({name:"czm_bloom_contrast_bias",fragmentShader:C$a,uniforms:{contrast:128,brightness:-.3}}),t=S$5("czm_bloom_blur"),i=new s$f({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),n=new p$h({name:"czm_bloom_generate_composite",fragmentShader:z$5,uniforms:{glowOnly:!1,bloomTexture:i.name}}),r={};return Object.defineProperties(r,{glowOnly:{get:function(){return n.uniforms.glowOnly},set:function(e){n.uniforms.glowOnly=e}},contrast:{get:function(){return e.uniforms.contrast},set:function(t){e.uniforms.contrast=t}},brightness:{get:function(){return e.uniforms.brightness},set:function(t){e.uniforms.brightness=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}}}),new s$f({name:"czm_bloom",stages:[i,n],inputPreviousStageTexture:!1,uniforms:r})},i$b.createAmbientOcclusionStage=function(){var e=new p$h({name:"czm_ambient_occlusion_generate",fragmentShader:A$c,uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=S$5("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;var i=new s$f({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),n=new p$h({name:"czm_ambient_occlusion_composite",fragmentShader:T$b,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:i.name}}),r={};return Object.defineProperties(r,{intensity:{get:function(){return e.uniforms.intensity},set:function(t){e.uniforms.intensity=t}},bias:{get:function(){return e.uniforms.bias},set:function(t){e.uniforms.bias=t}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(t){e.uniforms.lengthCap=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}},frustumLength:{get:function(){return e.uniforms.frustumLength},set:function(t){e.uniforms.frustumLength=t}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(t){e.uniforms.randomTexture=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},blurStepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}},ambientOcclusionOnly:{get:function(){return n.uniforms.ambientOcclusionOnly},set:function(e){n.uniforms.ambientOcclusionOnly=e}}}),new s$f({name:"czm_ambient_occlusion",stages:[i,n],inputPreviousStageTexture:!1,uniforms:r})},i$b.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var Z$8="#define FXAA_QUALITY_PRESET 39 \n#define FXAA_QUALITY_PS 12 \n#define FXAA_QUALITY_P0 1.0 \n#define FXAA_QUALITY_P1 1.0 \n#define FXAA_QUALITY_P2 1.0 \n#define FXAA_QUALITY_P3 1.0 \n#define FXAA_QUALITY_P4 1.0 \n#define FXAA_QUALITY_P5 1.5 \n#define FXAA_QUALITY_P6 2.0 \n#define FXAA_QUALITY_P7 2.0 \n#define FXAA_QUALITY_P8 2.0 \n#define FXAA_QUALITY_P9 2.0 \n#define FXAA_QUALITY_P10 4.0 \n#define FXAA_QUALITY_P11 8.0 \n"+k$I+"\n"+D$8,q$9=L$T;i$b.createFXAAStage=function(e){return new p$h({name:"czm_FXAA",fragmentShader:e.webgpu?q$9:Z$8,sampleMode:e$i.LINEAR})},i$b.createSnowStage=function(){return new p$h({name:"czm_SnowEffect",fragmentShader:V$7,uniforms:{density:5,angle:.1,speed:2},sampleMode:e$i.LINEAR})},i$b.createRainStage=function(){return new p$h({name:"czm_RainEffect",fragmentShader:j$7,uniforms:{speed:20,angle:-.4},sampleMode:e$i.LINEAR})},i$b.createFogStage=function(){return new p$h({name:"czm_FogEffect",fragmentShader:G$9,uniforms:{scale:1},sampleMode:e$i.LINEAR})},i$b.createAcesTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_aces",fragmentShader:t+=b$d,uniforms:{autoExposure:void 0}})},i$b.createFilmicTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_filmic",fragmentShader:t+=O$8,uniforms:{autoExposure:void 0}})},i$b.createReinhardTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_reinhard",fragmentShader:t+=Y$4,uniforms:{autoExposure:void 0}})},i$b.createModifiedReinhardTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_modified_reinhard",fragmentShader:t+=I$6,uniforms:{white:e$1U.WHITE,autoExposure:void 0}})},i$b.createAutoExposureStage=function(){return new a$h},i$b.createBlackAndWhiteStage=function(){return new p$h({name:"czm_black_and_white",fragmentShader:w$6,uniforms:{gradations:5}})},i$b.createBrightnessStage=function(){return new p$h({name:"czm_brightness",fragmentShader:E$9,uniforms:{brightness:.5}})},i$b.createNightVisionStage=function(){return new p$h({name:"czm_night_vision",fragmentShader:X$6})},i$b.createDepthViewStage=function(){return new p$h({name:"czm_depth_view",fragmentShader:R$9})},i$b.createLensFlareStage=function(){return new p$h({name:"czm_lens_flare",fragmentShader:U$8,uniforms:{dirtTexture:n$15("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:n$15("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,earthRadius:t$13.WGS84.maximumRadius}})},i$b.createOutlineStage=function(){var e=new p$h({name:"outline_copy",fragmentShader:ie$6}),t=new p$h({name:"outline_downSample",fragmentShader:["varying vec2 v_textureCoordinates;","void main()","{","gl_FragColor = texture2D(czm_maskTexture, v_textureCoordinates);","}"].join("\n"),textureScale:.5}),i=new p$h({name:"outline_edgeDetection",fragmentShader:["varying vec2 v_textureCoordinates;","uniform sampler2D colorTexture;","uniform vec2 colorTextureDimensions;","uniform vec3 visibleEdgeColor;","uniform vec3 hiddenEdgeColor;","void main() {","vec2 invSize = 1.0 / vec2(colorTextureDimensions.x, colorTextureDimensions.y);","vec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize);","vec4 c1 = texture2D( colorTexture, v_textureCoordinates + uvOffset.xy);","vec4 c2 = texture2D( colorTexture, v_textureCoordinates - uvOffset.xy);","vec4 c3 = texture2D( colorTexture, v_textureCoordinates + uvOffset.yw);","vec4 c4 = texture2D( colorTexture, v_textureCoordinates - uvOffset.yw);","float diff1 = (c1.r - c2.r)*0.5;","float diff2 = (c3.r - c4.r)*0.5;","float d = length( vec2(diff1, diff2) );","float a1 = min(c1.g, c2.g);","float a2 = min(c3.g, c4.g);","float visibilityFactor = min(a1, a2);","vec3 edgeColor = 1.0 - visibilityFactor > 0.001 ? visibleEdgeColor : hiddenEdgeColor;","gl_FragColor = vec4(edgeColor,1.0) * vec4(d);","}"].join("\n"),textureScale:.5,uniforms:{visibleEdgeColor:new e$1U(1,1,1),hiddenEdgeColor:new e$1U(.1,.04,.02)},sampleMode:e$i.LINEAR});i.visibleEdgeColor=new e$1U,i.hiddenEdgeColor=new e$1U;var n=["varying vec2 v_textureCoordinates;","uniform sampler2D colorTexture;","uniform vec2 colorTextureDimensions;","uniform vec2 direction;","uniform float kernelRadius;","float gaussianPdf(in float x, in float sigma) {","return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;","}","void main() {","vec2 invSize = 1.0 / colorTextureDimensions;","float weightSum = gaussianPdf(0.0, kernelRadius);","vec3 diffuseSum = texture2D( colorTexture, v_textureCoordinates).rgb * weightSum;","vec2 delta = direction * invSize * kernelRadius/float(4);","vec2 uvOffset = delta;","for( int i = 1; i <= 4; i ++ ) {","float w = gaussianPdf(uvOffset.x, kernelRadius);","vec3 sample1 = texture2D( colorTexture, v_textureCoordinates + uvOffset).rgb;","vec3 sample2 = texture2D( colorTexture, v_textureCoordinates - uvOffset).rgb;","diffuseSum += ((sample1 + sample2) * w);","weightSum += (2.0 * w);","uvOffset += delta;","}","gl_FragColor = vec4(diffuseSum/weightSum, 1.0);","}"].join("\n"),r=new p$h({name:"outline_blurHalf_X",fragmentShader:n,textureScale:.5,uniforms:{direction:{x:1,y:0},kernelRadius:1},sampleMode:e$i.LINEAR}),o=new p$h({name:"outline_blurHalf_Y",fragmentShader:n,textureScale:.5,uniforms:{direction:{x:0,y:1},kernelRadius:1},sampleMode:e$i.LINEAR}),a=new p$h({name:"outline_blurQuarter_X",fragmentShader:n,textureScale:.25,uniforms:{direction:{x:1,y:0},kernelRadius:4},sampleMode:e$i.LINEAR}),s=new p$h({name:"outline_blurQuarter_Y",fragmentShader:n,textureScale:.25,uniforms:{direction:{x:0,y:1},kernelRadius:4},sampleMode:e$i.LINEAR}),l=new p$h({name:"outline_overlayStage",fragmentShader:["varying vec2 v_textureCoordinates;","uniform sampler2D edgeTexture1;","uniform sampler2D edgeTexture2;","uniform float edgeStrength;","uniform float edgeGlow;","void main() {","vec4 edgeValue1 = texture2D(edgeTexture1, v_textureCoordinates);","vec4 edgeValue2 = texture2D(edgeTexture2, v_textureCoordinates);","vec4 maskColor = texture2D(czm_maskTexture, v_textureCoordinates);","vec4 edgeValue = edgeValue1 + edgeValue2 * edgeGlow;","vec4 finalColor = edgeStrength * maskColor.r * edgeValue;","gl_FragColor = finalColor;","}"].join("\n"),uniforms:{edgeStrength:3,edgeGlow:0,edgeTexture1:"outline_blurHalf_Y",edgeTexture2:"outline_blurQuarter_Y"},blendingState:Ee$r.ADDITIVE_BLEND,sampleMode:e$i.LINEAR}),u={};return Object.defineProperties(u,{visibleEdgeColor:{get:function(){return i.uniforms.visibleEdgeColor},set:function(e){i.uniforms.visibleEdgeColor=e$1U.clone(e)}},hiddenEdgeColor:{get:function(){return i.hiddenEdgeColor},set:function(e){i.uniforms.hiddenEdgeColor=e$1U.clone(e)}},edgeStrength:{get:function(){return l.uniforms.edgeStrength},set:function(e){l.uniforms.edgeStrength=e}},edgeGlow:{get:function(){return l.uniforms.edgeGlow},set:function(e){l.uniforms.edgeGlow=e}},edgeThickness:{get:function(){return r.uniforms.kernelRadius},set:function(e){r.uniforms.kernelRadius=e,o.uniforms.kernelRadius=e}}}),new s$f({name:"outline_overlay",stages:[e,t,i,r,o,a,s,l],inputPreviousStageTexture:!0,uniforms:u})},i$b.createScreenSpaceReflectionStage=function(e){var t=new p$h({name:"czm_Screen_Space_Reflection_Stage",fragmentShader:W$8,uniforms:{stepSize:1,strength:1,threshold:1.2,roughnessFactor:.2,reflectionSpecularFalloffExponent:3},sampleMode:e$i.LINEAR,prepassRenderer:e}),i=S$5("czm_Screen_Space_Reflection_blur");i.uniforms.stepSize=.35;var n=new s$f({name:"czm_Screen_Space_Reflection_Generate_blur",stages:[t,i]});new p$h({name:"czm_Screen_Space_Reflection_composite",fragmentShader:H$b,uniforms:{screenSpaceReflectionTexture:n.name},sampleMode:e$i.LINEAR,prepassRenderer:e});var r={};return Object.defineProperties(r,{stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}},strength:{get:function(){return t.uniforms.strength},set:function(e){t.uniforms.strength=e}},threshold:{get:function(){return t.uniforms.threshold},set:function(e){t.uniforms.threshold=e}},roughnessFactor:{get:function(){return t.uniforms.roughnessFactor},set:function(e){t.uniforms.roughnessFactor=e}},reflectionSpecularFalloffExponent:{get:function(){return t.uniforms.reflectionSpecularFalloffExponent},set:function(e){t.uniforms.reflectionSpecularFalloffExponent=e}}}),new s$f({name:"czm_Screen_Space_Reflection",stages:[t],inputPreviousStageTexture:!1,uniforms:r})};var I$5={REINHARD:0,MODIFIED_REINHARD:1,FILMIC:2,ACES:3,validate:function(e){return e===I$5.REINHARD||e===I$5.MODIFIED_REINHARD||e===I$5.FILMIC||e===I$5.ACES}},M$8=Object.freeze(I$5),T$a="precision highp float;\nprecision highp int;\nattribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvoid SMAAEdgeDetectionVS(vec2 texcoord) {\n fOffset[0] = texcoord.xyxy + u_resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );\n fOffset[1] = texcoord.xyxy + u_resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );\n fOffset[2] = texcoord.xyxy + u_resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 );\n}\nvoid main()\n{\n gl_Position = aPosition;\n v_textureCoordinates = textureCoordinates;\n SMAAEdgeDetectionVS(textureCoordinates);\n}",z$4="precision highp float;\nprecision highp int;\n#define SMAA_THRESHOLD 0.05\n#define SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR 2\n#define SMAA_USE_COLOR_EDGE_DETECTION 1\nuniform sampler2D inputColorTexture;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3]) {\n vec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );\n vec4 delta;\n vec3 C = texture2D( inputColorTexture, texcoord ).rgb;\n vec3 Cleft = texture2D( inputColorTexture, offset[0].xy ).rgb;\n vec3 t = abs( C - Cleft );\n delta.x = max( max( t.r, t.g ), t.b );\n vec3 Ctop = texture2D( inputColorTexture, offset[0].zw ).rgb;\n t = abs( C - Ctop );\n delta.y = max( max( t.r, t.g ), t.b );\n vec2 edges = step( threshold, delta.xy );\n vec3 Cright = texture2D( inputColorTexture, offset[1].xy ).rgb;\n vec3 Cbottom = texture2D( inputColorTexture, offset[1].zw ).rgb;\n vec3 Cleftleft = texture2D( inputColorTexture, offset[2].xy ).rgb;\n vec3 Ctoptop = texture2D( inputColorTexture, offset[2].zw ).rgb;\n \n if ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )\n discard;\n t = abs( C - Cright );\n delta.z = max( max( t.r, t.g ), t.b );\n \n t = abs( C - Cbottom );\n delta.w = max( max( t.r, t.g ), t.b );\n float maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );\n \n t = abs( C - Cleftleft );\n delta.z = max( max( t.r, t.g ), t.b );\n \n t = abs( C - Ctoptop );\n delta.w = max( max( t.r, t.g ), t.b );\n maxDelta = max( max( maxDelta, delta.z ), delta.w );\n edges.xy *= step( maxDelta, float(SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR) * delta.xy );\n return vec4( edges, 0.0, 0.0 );\n}\nvoid main()\n{\n gl_FragColor = SMAAColorEdgeDetectionPS( v_textureCoordinates, fOffset);\n}",F$8="precision highp float;\nprecision highp int;\n#define SMAA_MAX_SEARCH_STEPS 8\nattribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvarying vec2 fPixCoord;\nvoid SMAABlendingWeightCalculationVS( vec2 texcoord ) {\n fPixCoord = texcoord / u_resolution;\n fOffset[ 0 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 );\n fOffset[ 1 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 );\n fOffset[ 2 ] = vec4( fOffset[ 0 ].xz, fOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * u_resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );\n}\nvoid main()\n{\n gl_Position = aPosition;\n v_textureCoordinates = textureCoordinates;\n SMAABlendingWeightCalculationVS( textureCoordinates );\n}",C$9="precision highp float;\nprecision highp int;\n#define SMAA_MAX_SEARCH_STEPS 8\n#define SMAA_AREATEX_MAX_DISTANCE 16\n#define SMAA_AREATEX_PIXEL_SIZE ( 1.0 / vec2( 160.0, 560.0 ) )\n#define SMAA_AREATEX_SUBTEX_SIZE ( 1.0 / 7.0 )\nuniform sampler2D tEdges;\nuniform sampler2D tArea;\nuniform sampler2D tSearch;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvarying vec2 fPixCoord;\nvec4 SMAASampleLevelZeroOffset(vec2 coord, ivec2 offset ){\n return texture2D( tEdges, coord + float( offset ) * u_resolution, 0.0 );\n}\n\nvec2 myRound( vec2 x ) {\n return sign( x ) * floor( abs( x ) + 0.5 );\n}\n\nfloat SMAASearchLength(vec2 e, float bias, float scale ) {\n e.r = bias + e.r * scale;\n return 255.0 * texture2D( tSearch, e, 0.0 ).r;\n}\nfloat SMAASearchXLeft(vec2 texcoord, float end ) {\n vec2 e = vec2( 0.0, 1.0 );\n bool found = false;\n for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\n vec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\n if(!found){\n texcoord -= vec2( 2.0, 0.0 ) * u_resolution;\n e = pixel;\n }\n if(!found && ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 )){\n found = true;\n }\n }\n texcoord.x += 0.25 * u_resolution.x;\n texcoord.x += u_resolution.x;\n texcoord.x += 2.0 * u_resolution.x;\n texcoord.x -= u_resolution.x * SMAASearchLength(e, 0.0, 0.5);\n return texcoord.x;\n}\nfloat SMAASearchXRight(vec2 texcoord, float end ) {\n vec2 e = vec2( 0.0, 1.0 );\n bool found = false;\n for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\n vec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\n if(!found){\n texcoord += vec2( 2.0, 0.0 ) * u_resolution;\n e = pixel;\n }\n \n if (!found && ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) )\n {\n found = true;\n }\n }\n texcoord.x -= 0.25 * u_resolution.x;\n texcoord.x -= u_resolution.x;\n texcoord.x -= 2.0 * u_resolution.x;\n texcoord.x += u_resolution.x * SMAASearchLength(e, 0.5, 0.5 );\n return texcoord.x;\n}\nfloat SMAASearchYUp(vec2 texcoord, float end ) {\n vec2 e = vec2( 1.0, 0.0 );\n bool found = false;\n for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\n vec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\n if(!found){\n texcoord += vec2( 0.0, 2.0 ) * u_resolution;\n e = pixel;\n }\n \n if (!found && ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ){\n found = true;\n }\n }\n texcoord.y -= 0.25 * u_resolution.y;\n texcoord.y -= u_resolution.y;\n texcoord.y -= 2.0 * u_resolution.y;\n texcoord.y += u_resolution.y * SMAASearchLength(e.gr, 0.0, 0.5 );\n return texcoord.y;\n}\nfloat SMAASearchYDown(vec2 texcoord, float end ) {\n vec2 e = vec2( 1.0, 0.0 );\n bool found = false;\n for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\n vec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\n if(!found){\n texcoord -= vec2( 0.0, 2.0 ) * u_resolution;\n e = pixel;\n }\n \n if (!found && ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) {\n found = true;\n }\n }\n texcoord.y += 0.25 * u_resolution.y;\n texcoord.y += u_resolution.y;\n texcoord.y += 2.0 * u_resolution.y;\n texcoord.y -= u_resolution.y * SMAASearchLength(e.gr, 0.5, 0.5 );\n return texcoord.y;\n}\nvec2 SMAAArea(vec2 dist, float e1, float e2, float offset ) {\n vec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * myRound( 4.0 * vec2( e1, e2 ) ) + dist;\n texcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );\n texcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;\n return texture2D( tArea, texcoord, 0.0 ).rg;\n}\nvec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], ivec4 subsampleIndices ) {\n vec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );\n vec2 e = texture2D( tEdges, texcoord ).rg;\n vec2 weightRG = vec2(0.0, 0.0);\n vec2 weightBA = vec2(0.0, 0.0);\n {\n vec2 d;\n vec2 coords;\n coords.x = SMAASearchXLeft(offset[ 0 ].xy, offset[ 2 ].x );\n coords.y = offset[ 1 ].y;\n d.x = coords.x;\n float e1 = texture2D( tEdges, coords, 0.0 ).r;\n coords.x = SMAASearchXRight( offset[ 0 ].zw, offset[ 2 ].y );\n d.y = coords.x;\n d = d / u_resolution.x - pixcoord.x;\n vec2 sqrt_d = sqrt( abs( d ) );\n coords.y -= 1.0 * u_resolution.y;\n float e2 = SMAASampleLevelZeroOffset( coords, ivec2( 1, 0 ) ).r;\n weightRG = SMAAArea(sqrt_d, e1, e2, float( subsampleIndices.y ) );\n }\n\n {\n vec2 d;\n vec2 coords;\n coords.y = SMAASearchYUp(offset[ 1 ].xy, offset[ 2 ].z );\n coords.x = offset[ 0 ].x;\n d.x = coords.y;\n float e1 = texture2D( tEdges, coords, 0.0 ).g;\n coords.y = SMAASearchYDown(offset[ 1 ].zw, offset[ 2 ].w );\n d.y = coords.y;\n d = d / u_resolution.y - pixcoord.y;\n vec2 sqrt_d = sqrt( abs( d ) );\n coords.y -= 1.0 * u_resolution.y;\n float e2 = SMAASampleLevelZeroOffset( coords, ivec2( 0, 1 ) ).g;\n weightBA = SMAAArea(sqrt_d, e1, e2, float( subsampleIndices.x ) );\n }\n\n if ( e.g > 0.0 ) {\n weights.rg = weightRG;\n }\n if ( e.r > 0.0 ) {\n weights.ba = weightBA;\n }\n return weights;\n}\nvoid main()\n{\n gl_FragColor = SMAABlendingWeightCalculationPS(v_textureCoordinates, fPixCoord, fOffset, ivec4(0.0));\n}",P$9="precision highp float;\nprecision highp int;\nattribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[2];\nvoid SMAANeighborhoodBlendingVS( vec2 texcoord ) {\n fOffset[ 0 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );\n fOffset[ 1 ] = texcoord.xyxy + u_resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );\n}\nvoid main()\n{\n gl_Position = aPosition;\n v_textureCoordinates = textureCoordinates;\n SMAANeighborhoodBlendingVS(textureCoordinates);\n}",W$7="precision highp float;\nprecision highp int;\n#define SMAA_DEBUG_SPLIT_VIEW 0\nuniform vec2 u_resolution;\nuniform sampler2D tBlendWeights;\nuniform sampler2D tColor;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[2];\nvec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 inOffset[ 2 ] ) {\n vec4 a;\n a.xz = texture2D( tBlendWeights, texcoord ).xz;\n a.y = texture2D( tBlendWeights, inOffset[ 1 ].zw ).g;\n a.w = texture2D( tBlendWeights, inOffset[ 1 ].xy ).a;\n vec4 currentColor = texture2D( tColor, texcoord, 0.0 );\n\n vec2 offset;\n offset.x = a.a > a.b ? a.a : -a.b;\n offset.y = a.g > a.r ? -a.g : a.r;\n if ( abs( offset.x ) > abs( offset.y )) {\n offset.y = 0.0;\n } else {\n offset.x = 0.0;\n }\n vec4 C = currentColor;\n texcoord += sign( offset ) * u_resolution;\n vec4 Cop = texture2D( tColor, texcoord, 0.0 );\n float s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );\n C.xyz = pow(C.xyz, vec3(2.2));\n Cop.xyz = pow(Cop.xyz, vec3(2.2));\n vec4 mixed = mix(C, Cop, s);\n mixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));\n\n if ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {\n return currentColor;\n } else {\n return mixed;\n }\n}\nvoid main()\n{\n gl_FragColor = SMAANeighborhoodBlendingPS( v_textureCoordinates, fOffset);\n}";function i$a(){this._edgeDetectionCommand=void 0,this._weightCalculationCommand=void 0,this._neighborhoodBlendingCommand=void 0,this._upSamplePassState=new n$Z,this.enabled=!1,this.ready=!0,this._inputTexture=void 0,this._edgeDetectionFBO=void 0,this._weightFBO=void 0,this._blendingFBO=void 0,this._searchTexture=void 0,this._areaTexture=void 0,this._clearCommand=new t$X({color:new e$1U(0,0,0,0)}),this._resolution=new o$1o}function j$6(){return new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}function H$a(){return new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}Object.defineProperties(i$a.prototype,{}),i$a.prototype.execute=function(e){var t=this._clearCommand;t.framebuffer=this._edgeDetectionFBO,t.execute(e),t.framebuffer=this._weightFBO,t.execute(e),t.framebuffer=this._blendingFBO,t.execute(e),this._edgeDetectionCommand.framebuffer=this._edgeDetectionFBO,this._edgeDetectionCommand.execute(e,this._upSamplePassState),this._weightCalculationCommand.framebuffer=this._weightFBO,this._weightCalculationCommand.execute(e,this._upSamplePassState),this._neighborhoodBlendingCommand.framebuffer=this._blendingFBO,this._neighborhoodBlendingCommand.execute(e,this._upSamplePassState)};var f$b=new f$18;i$a.prototype.update=function(e){if(this.enabled){this._context=e;var t=e.drawingBufferWidth,i=e.drawingBufferHeight;this._resolution.x=1/t,this._resolution.y=1/i;var n=this;if(!e$2b(this._searchTexture)){var r=new Image;r.src=this.getSearchTexture(),r.onload=function(){n._searchTexture=new t$V({context:e,source:this,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,flipY:!1,sampler:j$6()})}}if(!e$2b(this._areaTexture)){var o=new Image;o.src=this.getAreaTexture(),o.onload=function(){n._areaTexture=new t$V({context:e,source:this,pixelFormat:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE,flipY:!1,sampler:H$a()})}}e$2b(this._edgeDetectionCommand)||this.createCommand(e);var a=this._edgeDetectionFBO,s=e$2b(a)&&a.getColorTexture(0)||void 0;if(!e$2b(s)||s.width!==t||s.height!==i){this.createFBO(t,i,e),f$b.width=t,f$b.height=i;var l=d$1m.fromCache({viewport:f$b});this._edgeDetectionCommand.renderState=l,this._weightCalculationCommand.renderState=l,this._neighborhoodBlendingCommand.renderState=l}this._upSamplePassState.context=e}},i$a.prototype.createCommand=function(e){this._edgeDetectionCommand=e.createCustomViewportQuadCommand(T$a,z$4,{shaderProgramName:"SMAAEdgeDetection",uniformMap:{},owner:this});var t=new s$U({name:"blendingWeightCalculationFS",sources:[C$9]});e.webgl2&&t.defines.push("WEBGL2"),this._weightCalculationCommand=e.createCustomViewportQuadCommand(F$8,t,{shaderProgramName:"SMAABlendingWeightCalculation",uniformMap:{},owner:this}),this._neighborhoodBlendingCommand=e.createCustomViewportQuadCommand(P$9,W$7,{shaderProgramName:"SMAANeighborhoodBlending",uniformMap:{},owner:this}),this.createUniformMap()},i$a.prototype.createUniformMap=function(){if(e$2b(this._edgeDetectionCommand)){var e=this;this._edgeDetectionCommand.uniformMap.inputColorTexture=function(){return e._inputTexture},this._edgeDetectionCommand.uniformMap.u_resolution=function(){return e._resolution},this._weightCalculationCommand.uniformMap.tEdges=function(){return e._edgeDetectionFBO.getColorTexture(0)},this._weightCalculationCommand.uniformMap.tArea=function(){return e$2b(e._areaTexture)?e._areaTexture:e._context.defaultTexture},this._weightCalculationCommand.uniformMap.tSearch=function(){return e$2b(e._searchTexture)?e._searchTexture:e._context.defaultTexture},this._weightCalculationCommand.uniformMap.u_resolution=function(){return e._resolution},this._neighborhoodBlendingCommand.uniformMap.tColor=function(){return e._inputTexture},this._neighborhoodBlendingCommand.uniformMap.tBlendWeights=function(){return e._weightFBO.getColorTexture(0)},this._neighborhoodBlendingCommand.uniformMap.u_resolution=function(){return e._resolution}}},i$a.prototype.createFBO=function(e,t,i){e$2b(this._edgeDetectionFBO)||this.destroyFBO();var n=_$$.UNSIGNED_BYTE;this._edgeDetectionFBO=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:V$10.RGBA})]}),this._weightFBO=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:V$10.RGBA})]}),this._blendingFBO=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:V$10.RGBA})]})},i$a.prototype.setInputTexture=function(e){this._inputTexture=e},i$a.prototype.getSMAATexture=function(){return this._blendingFBO.getColorTexture(0)},i$a.prototype.isDestroyed=function(){return!1},i$a.prototype.destroyFBO=function(){this._edgeDetectionFBO=this._edgeDetectionFBO&&!this._edgeDetectionFBO.isDestroyed()&&this._edgeDetectionFBO.destroy(),this._weightFBO=this._weightFBO&&!this._weightFBO.isDestroyed()&&this._weightFBO.destroy(),this._blendingFBO=this._blendingFBO&&!this._blendingFBO.isDestroyed()&&this._blendingFBO.destroy()},i$a.prototype.destroy=function(){return this.destroyFBO(),this._edgeDetectionCommand=this._edgeDetectionCommand&&this._edgeDetectionCommand.shaderProgram&&this._edgeDetectionCommand.shaderProgram.destroy(),this._weightCalculationCommand=this._weightCalculationCommand&&this._weightCalculationCommand.shaderProgram&&this._weightCalculationCommand.shaderProgram.destroy(),this._neighborhoodBlendingCommand=this._neighborhoodBlendingCommand&&this._neighborhoodBlendingCommand.shaderProgram&&this._neighborhoodBlendingCommand.shaderProgram.destroy(),i$10(this)},i$a.prototype.getAreaTexture=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAIAAACOVPcQAACBeklEQVR42u39W4xlWXrnh/3WWvuciIzMrKxrV8/0rWbY0+SQFKcb4owIkSIFCjY9AC1BT/LYBozRi+EX+cV+8IMsYAaCwRcBwjzMiw2jAWtgwC8WR5Q8mDFHZLNHTarZGrLJJllt1W2qKrsumZWZcTvn7L3W54e1vrXX3vuciLPPORFR1XE2EomorB0nVuz//r71re/y/1eMvb4Cb3N11xV/PP/2v4UBAwJG/7H8urx6/25/Gf8O5hypMQ0EEEQwAqLfoN/Z+97f/SW+/NvcgQk4sGBJK6H7N4PFVL+K+e0N11yNfkKvwUdwdlUAXPHHL38oa15f/i/46Ih6SuMSPmLAYAwyRKn7dfMGH97jaMFBYCJUgotIC2YAdu+LyW9vvubxAP8kAL8H/koAuOKP3+q6+xGnd5kdYCeECnGIJViwGJMAkQKfDvB3WZxjLKGh8VSCCzhwEWBpMc5/kBbjawT4HnwJfhr+pPBIu7uu+OOTo9vsmtQcniMBGkKFd4jDWMSCRUpLjJYNJkM+IRzQ+PQvIeAMTrBS2LEiaiR9b/5PuT6Ap/AcfAFO4Y3dA3DFH7/VS+M8k4baEAQfMI4QfbVDDGIRg7GKaIY52qAjTAgTvGBAPGIIghOCYAUrGFNgzA7Q3QhgCwfwAnwe5vDejgG44o/fbm1C5ZlYQvQDARPAIQGxCWBM+wWl37ZQESb4gImexGMDouhGLx1Cst0Saa4b4AqO4Hk4gxo+3DHAV/nx27p3JziPM2pVgoiia5MdEzCGULprIN7gEEeQ5IQxEBBBQnxhsDb5auGmAAYcHMA9eAAz8PBol8/xij9+C4Djlim4gJjWcwZBhCBgMIIYxGAVIkH3ZtcBuLdtRFMWsPGoY9rN+HoBji9VBYdwD2ZQg4cnO7OSq/z4rU5KKdwVbFAjNojCQzTlCLPFSxtamwh2jMUcEgg2Wm/6XgErIBhBckQtGN3CzbVacERgCnfgLswhnvqf7QyAq/z4rRZm1YglYE3affGITaZsdIe2FmMIpnOCap25I6jt2kCwCW0D1uAD9sZctNGXcQIHCkINDQgc78aCr+zjtw3BU/ijdpw3zhCwcaONwBvdeS2YZKkJNJsMPf2JKEvC28RXxxI0ASJyzQCjCEQrO4Q7sFArEzjZhaFc4cdv+/JFdKULM4px0DfUBI2hIsy06BqLhGTQEVdbfAIZXYMPesq6VoCHICzUyjwInO4Y411//LYLs6TDa9wvg2CC2rElgAnpTBziThxaL22MYhzfkghz6GAs2VHbbdM91VZu1MEEpupMMwKyVTb5ij9+u4VJG/5EgEMMmFF01cFai3isRbKbzb+YaU/MQbAm2XSMoUPAmvZzbuKYRIFApbtlrfFuUGd6vq2hXNnH78ZLh/iFhsQG3T4D1ib7k5CC6vY0DCbtrohgLEIClXiGtl10zc0CnEGIhhatLBva7NP58Tvw0qE8yWhARLQ8h4+AhQSP+I4F5xoU+VilGRJs6wnS7ruti/4KvAY/CfdgqjsMy4pf8fodQO8/gnuX3f/3xi3om1/h7THr+co3x93PP9+FBUfbNUjcjEmhcrkT+8K7ml7V10Jo05mpIEFy1NmCJWx9SIKKt+EjAL4Ez8EBVOB6havuT/rByPvHXK+9zUcfcbb254+9fydJknYnRr1oGfdaiAgpxu1Rx/Rek8KISftx3L+DfsLWAANn8Hvw0/AFeAGO9DFV3c6D+CcWbL8Dj9e7f+T1k8AZv/d7+PXWM/Z+VvdCrIvuAKO09RpEEQJM0Ci6+B4xhTWr4cZNOvhktabw0ta0rSJmqz3Yw5/AKXwenod7cAhTmBSPKf6JBdvH8IP17h95pXqw50/+BFnj88fev4NchyaK47OPhhtI8RFSvAfDSNh0Ck0p2gLxGkib5NJj/JWCr90EWQJvwBzO4AHcgztwAFN1evHPUVGwfXON+0debT1YeGON9Yy9/63X+OguiwmhIhQhD7l4sMqlG3D86Suc3qWZ4rWjI1X7u0Ytw6x3rIMeIOPDprfe2XzNgyj6PahhBjO4C3e6puDgXrdg+/5l948vF3bqwZetZ+z9Rx9zdIY5pInPK4Nk0t+l52xdK2B45Qd87nM8fsD5EfUhIcJcERw4RdqqH7Yde5V7m1vhNmtedkz6EDzUMF/2jJYWbC+4fzzA/Y+/8PPH3j9dcBAPIRP8JLXd5BpAu03aziOL3VVHZzz3CXWDPWd+SH2AnxIqQoTZpo9Ckc6HIrFbAbzNmlcg8Ag8NFDDAhbJvTBZXbC94P7t68EXfv6o+21gUtPETU7bbkLxvNKRFG2+KXzvtObonPP4rBvsgmaKj404DlshFole1Glfh02fE7bYR7dZ82oTewIBGn1Md6CG6YUF26X376oevOLzx95vhUmgblI6LBZwTCDY7vMq0op5WVXgsObOXJ+1x3qaBl9j1FeLxbhU9w1F+Wiba6s1X/TBz1LnUfuYDi4r2C69f1f14BWfP+p+W2GFKuC9phcELMYRRLur9DEZTUdEH+iEqWdaM7X4WOoPGI+ZYD2+wcQ+y+ioHUZ9dTDbArzxmi/bJI9BND0Ynd6lBdve/butBw8+f/T9D3ABa3AG8W3VPX4hBin+bj8dMMmSpp5pg7fJ6xrBFE2WQQEWnV8Qg3FbAWzYfM1rREEnmvkN2o1+acG2d/9u68GDzx91v3mAjb1zkpqT21OipPKO0b9TO5W0nTdOmAQm0TObts3aBKgwARtoPDiCT0gHgwnbArzxmtcLc08HgF1asN0C4Ms/fvD5I+7PhfqyXE/b7RbbrGyRQRT9ARZcwAUmgdoz0ehJ9Fn7QAhUjhDAQSw0bV3T3WbNa59jzmiP6GsWbGXDX2ytjy8+f9T97fiBPq9YeLdBmyuizZHaqXITnXiMUEEVcJ7K4j3BFPurtB4bixW8wTpweL8DC95szWMOqucFYGsWbGU7p3TxxxefP+r+oTVktxY0v5hbq3KiOKYnY8ddJVSBxuMMVffNbxwIOERShst73HZ78DZrHpmJmH3K6sGz0fe3UUj0eyRrSCGTTc+rjVNoGzNSv05srAxUBh8IhqChiQgVNIIBH3AVPnrsnXQZbLTm8ammv8eVXn/vWpaTem5IXRlt+U/LA21zhSb9cye6jcOfCnOwhIAYXAMVTUNV0QhVha9xjgA27ODJbLbmitt3tRN80lqG6N/khgot4ZVlOyO4WNg3OIMzhIZQpUEHieg2im6F91hB3I2tubql6BYNN9Hj5S7G0G2tahslBWKDnOiIvuAEDzakDQKDNFQT6gbn8E2y4BBubM230YIpBnDbMa+y3dx0n1S0BtuG62lCCXwcY0F72T1VRR3t2ONcsmDjbmzNt9RFs2LO2hQNyb022JisaI8rAWuw4HI3FuAIhZdOGIcdjLJvvObqlpqvWTJnnQbyi/1M9O8UxWhBs//H42I0q1Yb/XPGONzcmm+ri172mHKvZBpHkJaNJz6v9jxqiklDj3U4CA2ugpAaYMWqNXsdXbmJNd9egCnJEsphXNM+MnK3m0FCJ5S1kmJpa3DgPVbnQnPGWIDspW9ozbcO4K/9LkfaQO2KHuqlfFXSbdNzcEcwoqNEFE9zcIXu9/6n/ym/BC/C3aJLzEKPuYVlbFnfhZ8kcWxV3dbv4bKl28566wD+8C53aw49lTABp9PWbsB+knfc/Li3eVizf5vv/xmvnPKg5ihwKEwlrcHqucuVcVOxEv8aH37E3ZqpZypUulrHEtIWKUr+txHg+ojZDGlwnqmkGlzcVi1dLiNSJiHjfbRNOPwKpx9TVdTn3K05DBx4psIk4Ei8aCkJahRgffk4YnEXe07T4H2RR1u27E6wfQsBDofUgjFUFnwC2AiVtA+05J2zpiDK2Oa0c5fmAecN1iJzmpqFZxqYBCYhFTCsUNEmUnIcZ6aEA5rQVhEywG6w7HSW02XfOoBlQmjwulOFQAg66SvJblrTEX1YtJ3uG15T/BH1OfOQeuR8g/c0gdpT5fx2SKbs9EfHTKdM8A1GaJRHLVIwhcGyydZsbifAFVKl5EMKNU2Hryo+06BeTgqnxzYjThVySDikbtJPieco75lYfKAJOMEZBTjoITuWHXXZVhcUDIS2hpiXHV9Ku4u44bN5OYLDOkJo8w+xJSMbhBRHEdEs9JZUCkQrPMAvaHyLkxgkEHxiNkx/x2YB0mGsQ8EUWj/stW5YLhtS5SMu+/YBbNPDCkGTUybN8krRLBGPlZkVOA0j+a1+rkyQKWGaPHPLZOkJhioQYnVZ2hS3zVxMtgC46KuRwbJNd9nV2PHgb36F194ecf/Yeu2vAFe5nm/bRBFrnY4BauE8ERmZRFUn0k8hbftiVYSKMEme2dJCJSCGYAlNqh87bXOPdUkGy24P6d1ll21MBqqx48Fvv8ZHH8HZFY7j/uAq1xMJUFqCSUlJPmNbIiNsmwuMs/q9CMtsZsFO6SprzCS1Z7QL8xCQClEelpjTduDMsmWD8S1PT152BtvmIGvUeDA/yRn83u/x0/4qxoPHjx+PXY9pqX9bgMvh/Nz9kpP4pOe1/fYf3axUiMdHLlPpZCNjgtNFAhcHEDxTumNONhHrBduW+vOyY++70WWnPXj98eA4kOt/mj/5E05l9+O4o8ePx67HFqyC+qSSnyselqjZGaVK2TadbFLPWAQ4NBhHqDCCV7OTpo34AlSSylPtIdd2AJZlyzYQrDJ5lcWGNceD80CunPLGGzsfD+7wRb95NevJI5docQ3tgCyr5bGnyaPRlmwNsFELViOOx9loebGNq2moDOKpHLVP5al2cymWHbkfzGXL7kfRl44H9wZy33tvt+PB/Xnf93e+nh5ZlU18wCiRUa9m7kib9LYuOk+hudQNbxwm0AQqbfloimaB2lM5fChex+ylMwuTbfmXQtmWlenZljbdXTLuOxjI/fDDHY4Hjx8/Hrse0zXfPFxbUN1kKqSCCSk50m0Ajtx3ub9XHBKHXESb8iO6E+qGytF4nO0OG3SXzbJlhxBnKtKyl0NwybjvYCD30aMdjgePHz8eu56SVTBbgxJMliQ3Oauwg0QHxXE2Ez/EIReLdQj42Gzb4CLS0YJD9xUx7bsi0vJi5mUbW1QzL0h0PFk17rtiIPfJk52MB48fPx67npJJwyrBa2RCCQRTbGZSPCxTPOiND4G2pYyOQ4h4jINIJh5wFU1NFZt+IsZ59LSnDqBjZ2awbOku+yInunLcd8VA7rNnOxkPHj9+PGY9B0MWJJNozOJmlglvDMXDEozdhQWbgs/U6oBanGzLrdSNNnZFjOkmbi5bNt1lX7JLLhn3vXAg9/h4y/Hg8ePHI9dzQMEkWCgdRfYykYKnkP7D4rIujsujaKPBsB54vE2TS00ccvFY/Tth7JXeq1hz+qgVy04sAJawTsvOknHfCwdyT062HA8eP348Zj0vdoXF4pilKa2BROed+9fyw9rWRXeTFXESMOanvDZfJuJaSXouQdMdDJZtekZcLLvEeK04d8m474UDuaenW44Hjx8/Xns9YYqZpszGWB3AN/4VHw+k7WSFtJ3Qicuqb/NlVmgXWsxh570xg2UwxUw3WfO6B5nOuO8aA7lnZxuPB48fPx6znm1i4bsfcbaptF3zNT78eFPtwi1OaCNOqp1x3zUGcs/PN++AGD1+fMXrSVm2baTtPhPahbPhA71wIHd2bXzRa69nG+3CraTtPivahV/55tXWg8fyRY/9AdsY8VbSdp8V7cKrrgdfM//z6ILQFtJ2nxHtwmuoB4/kf74+gLeRtvvMaBdeSz34+vifx0YG20jbfTa0C6+tHrwe//NmOG0L8EbSdp8R7cLrrQe/996O+ai3ujQOskpTNULa7jOjXXj99eCd8lHvoFiwsbTdZ0a78PrrwTvlo966pLuRtB2fFe3Cm6oHP9kNH/W2FryxtN1nTLvwRurBO+Kj3pWXHidtx2dFu/Bm68Fb81HvykuPlrb7LGkX3mw9eGs+6h1Y8MbSdjegXcguQLjmevDpTQLMxtJ2N6NdyBZu9AbrwVvwUW+LbteULUpCdqm0HTelXbhNPe8G68Gb8lFvVfYfSNuxvrTdTWoXbozAzdaDZzfkorOj1oxVxlIMlpSIlpLrt8D4hrQL17z+c3h6hU/wv4Q/utps4+bm+6P/hIcf0JwQ5oQGPBL0eKPTYEXTW+eL/2DKn73J9BTXYANG57hz1cEMviVf/4tf5b/6C5pTQkMIWoAq7hTpOJjtAM4pxKu5vg5vXeUrtI09/Mo/5H+4z+Mp5xULh7cEm2QbRP2tFIKR7WM3fPf/jZ3SWCqLM2l4NxID5zB72HQXv3jj/8mLR5xXNA5v8EbFQEz7PpRfl1+MB/hlAN65qgDn3wTgH13hK7T59bmP+NIx1SHHU84nLOITt3iVz8mNO+lPrjGAnBFqmioNn1mTyk1ta47R6d4MrX7tjrnjYUpdUbv2rVr6YpVfsGG58AG8Ah9eyUN8CX4WfgV+G8LVWPDGb+Zd4cU584CtqSbMKxauxTg+dyn/LkVgA+IR8KHtejeFKRtTmLLpxN6mYVLjYxwXf5x2VofiZcp/lwKk4wGOpYDnoIZPdg/AAbwMfx0+ge9dgZvYjuqKe4HnGnykYo5TvJbG0Vj12JagRhwKa44H95ShkZa5RyLGGdfYvG7aw1TsF6iapPAS29mNS3NmsTQZCmgTzFwgL3upCTgtBTRwvGMAKrgLn4evwin8+afJRcff+8izUGUM63GOOuAs3tJkw7J4kyoNreqrpO6cYLQeFUd7TTpr5YOTLc9RUUogUOVJQ1GYJaFLAW0oTmKyYS46ZooP4S4EON3xQ5zC8/CX4CnM4c1PE8ApexpoYuzqlP3d4S3OJP8ZDK7cKWNaTlqmgDiiHwl1YsE41w1zT4iRTm3DBqxvOUsbMKKDa/EHxagtnta072ejc3DOIh5ojvh8l3tk1JF/AV6FU6jh3U8HwEazLgdCLYSQ+MYiAI2ltomkzttUb0gGHdSUUgsIYjTzLG3mObX4FBRaYtpDVNZrih9TgTeYOBxsEnN1gOCTM8Bsw/ieMc75w9kuAT6A+/AiHGvN/+Gn4KRkiuzpNNDYhDGFndWRpE6SVfm8U5bxnSgVV2jrg6JCKmneqey8VMFgq2+AM/i4L4RUbfSi27lNXZ7R7W9RTcq/q9fk4Xw3AMQd4I5ifAZz8FcVtm9SAom/dyN4lczJQW/kC42ZrHgcCoIf1oVMKkVItmMBi9cOeNHGLqOZk+QqQmrbc5YmYgxELUUN35z2iohstgfLIFmcMV7s4CFmI74L9+EFmGsi+tGnAOD4Yk9gIpo01Y4cA43BWGygMdr4YZekG3OBIUXXNukvJS8tqa06e+lSDCtnqqMFu6hWHXCF+WaYt64m9QBmNxi7Ioy7D+fa1yHw+FMAcPt7SysFLtoG4PXAk7JOA3aAxBRqUiAdU9Yp5lK3HLSRFtOim0sa8euEt08xvKjYjzeJ2GU7YawexrnKI9tmobInjFXCewpwriY9+RR4aaezFhMhGCppKwom0ChrgFlKzyPKkGlTW1YQrE9HJqu8hKGgMc6hVi5QRq0PZxNfrYNgE64utmRv6KKHRpxf6VDUaOvNP5jCEx5q185My/7RKz69UQu2im5k4/eownpxZxNLwiZ1AZTO2ZjWjkU9uaB2HFn6Q3u0JcsSx/qV9hTEApRzeBLDJQXxYmTnq7bdLa3+uqFrxLJ5w1TehnNHx5ECvCh2g2c3hHH5YsfdaSKddztfjQ6imKFGSyFwlLzxEGPp6r5IevVjk1AMx3wMqi1NxDVjLBiPs9tbsCkIY5we5/ML22zrCScFxnNtzsr9Wcc3CnD+pYO+4VXXiDE0oc/vQQ/fDK3oPESJMYXNmJa/DuloJZkcTpcYE8lIH8Dz8DJMiynNC86Mb2lNaaqP/+L7f2fcE/yP7/Lde8xfgSOdMxvOixZf/9p3+M4hT1+F+zApxg9XfUvYjc8qX2lfOOpK2gNRtB4flpFu9FTKCp2XJRgXnX6olp1zyYjTKJSkGmLE2NjUr1bxFM4AeAAHBUFIeSLqXR+NvH/M9fOnfHzOD2vCSyQJKzfgsCh+yi/Mmc35F2fUrw7miW33W9hBD1vpuUojFphIyvg7aTeoymDkIkeW3XLHmguMzbIAJejN6B5MDrhipE2y6SoFRO/AK/AcHHZHNIfiWrEe/C6cr3f/yOvrQKB+zMM55/GQdLDsR+ifr5Fiuu+/y+M78LzOE5dsNuXC3PYvYWd8NXvphLSkJIasrlD2/HOqQ+RjcRdjKTGWYhhVUm4yxlyiGPuMsZR7sMCHUBeTuNWA7if+ifXgc/hovftHXs/DV+Fvwe+f8shzMiMcweFgBly3//vwJfg5AN4450fn1Hd1Rm1aBLu22Dy3y3H2+OqMemkbGZ4jozcDjJf6596xOLpC0eMTHbKnxLxH27uZ/bMTGs2jOaMOY4m87CfQwF0dw53oa1k80JRuz/XgS+8fX3N9Af4qPIMfzKgCp4H5TDGe9GGeFPzSsZz80SlPTxXjgwJmC45njzgt2vbQ4b4OAdUK4/vWhO8d8v6EE8fMUsfakXbPpFJeLs2ubM/qdm/la3WP91uWhxXHjoWhyRUq2iJ/+5mA73zwIIo+LoZ/SgvIRjAd1IMvvn98PfgOvAJfhhm8scAKVWDuaRaK8aQ9f7vuPDH6Bj47ZXau7rqYJ66mTDwEDU6lLbCjCK0qTXyl5mnDoeNRxanj3FJbaksTk0faXxHxLrssgPkWB9LnA/MFleXcJozzjwsUvUG0X/QCve51qkMDXp9mtcyOy3rwBfdvVJK7D6/ACSzg3RoruIq5UDeESfEmVclDxnniU82vxMLtceD0hGZWzBNPMM/jSPne2OVatiTKUpY5vY7gc0LdUAWeWM5tH+O2I66AOWw9xT2BuyRVLGdoDHUsVRXOo/c+ZdRXvFfnxWyIV4upFLCl9eAL7h8Zv0QH8Ry8pA2cHzQpGesctVA37ZtklBTgHjyvdSeKY/RZw/kJMk0Y25cSNRWSigQtlULPTw+kzuJPeYEkXjQRpoGZobYsLF79pyd1dMRHInbgFTZqNLhDqiIsTNpoex2WLcy0/X6rHcdMMQvFSd5dWA++4P7xv89deACnmr36uGlL69bRCL6BSZsS6c0TU2TKK5gtWCzgAOOwQcurqk9j8whvziZSMLcq5hbuwBEsYjopUBkqw1yYBGpLA97SRElEmx5MCInBY5vgLk94iKqSWmhIGmkJ4Bi9m4L645J68LyY4wsFYBfUg5feP/6gWWm58IEmKQM89hq7KsZNaKtP5TxxrUZZVkNmMJtjbKrGxLNEbHPJxhqy7lAmbC32ZqeF6lTaknRWcYaFpfLUBh/rwaQycCCJmW15Kstv6jRHyJFry2C1ahkkIW0LO75s61+owxK1y3XqweX9m5YLM2DPFeOjn/iiqCKJ+yKXF8t5Yl/kNsqaSCryxPq5xWTFIaP8KSW0RYxqupaUf0RcTNSSdJZGcKYdYA6kdtrtmyBckfKXwqk0pHpUHlwWaffjNRBYFPUDWa8e3Lt/o0R0CdisKDM89cX0pvRHEfM8ca4t0s2Xx4kgo91MPQJ/0c9MQYq0co8MBh7bz1fio0UUHLR4aAIOvOmoYO6kwlEVODSSTliWtOtH6sPkrtctF9ZtJ9GIerBskvhdVS5cFNv9s1BU0AbdUgdK4FG+dRnjFmDTzniRMdZO1QhzMK355vigbdkpz9P6qjUGE5J2qAcXmwJ20cZUiAD0z+pGMx6xkzJkmEf40Hr4qZfVg2XzF9YOyoV5BjzVkUJngKf8lgNYwKECEHrCNDrWZzMlflS3yBhr/InyoUgBc/lKT4pxVrrC6g1YwcceK3BmNxZcAtz3j5EIpqguh9H6wc011YN75cKDLpFDxuwkrPQmUwW4KTbj9mZTwBwLq4aQMUZbHm1rylJ46dzR0dua2n3RYCWZsiHROeywyJGR7mXKlpryyCiouY56sFkBWEnkEB/raeh/Sw4162KeuAxMQpEkzy5alMY5wamMsWKKrtW2WpEWNnReZWONKWjrdsKZarpFjqCslq773PLmEhM448Pc3+FKr1+94vv/rfw4tEcu+lKTBe4kZSdijBrykwv9vbCMPcLQTygBjzVckSLPRVGslqdunwJ4oegtFOYb4SwxNgWLCmD7T9kVjTv5YDgpo0XBmN34Z/rEHp0sgyz7lngsrm4lvMm2Mr1zNOJYJ5cuxuQxwMGJq/TP5emlb8fsQBZviK4t8hFL+zbhtlpwaRSxQRWfeETjuauPsdGxsBVdO7nmP4xvzSoT29pRl7kGqz+k26B3Oy0YNV+SXbbQas1ctC/GarskRdFpKczVAF1ZXnLcpaMuzVe6lZ2g/1ndcvOVgRG3sdUAY1bKD6achijMPdMxV4muKVorSpiDHituH7rSTs7n/4y5DhRXo4FVBN4vO/zbAcxhENzGbHCzU/98Mcx5e7a31kWjw9FCe/zNeYyQjZsWb1uc7U33pN4Mji6hCLhivqfa9Ss6xLg031AgfesA/l99m9fgvnaF9JoE6bYKmkGNK3aPbHB96w3+DnxFm4hs0drLsk7U8kf/N/CvwQNtllna0rjq61sH8L80HAuvwH1tvBy2ChqWSCaYTaGN19sTvlfzFD6n+iKTbvtayfrfe9ueWh6GJFoxLdr7V72a5ZpvHcCPDzma0wTO4EgbLyedxstO81n57LYBOBzyfsOhUKsW1J1BB5vr/tz8RyqOFylQP9Tvst2JALsC5lsH8PyQ40DV4ANzYa4dedNiKNR1s+x2wwbR7q4/4cTxqEk4LWDebfisuo36JXLiWFjOtLrlNWh3K1rRS4xvHcDNlFnNmWBBAl5SWaL3oPOfnvbr5pdjVnEaeBJSYjuLEkyLLsWhKccadmOphZkOPgVdalj2QpSmfOsADhMWE2ZBu4+EEJI4wKTAuCoC4xwQbWXBltpxbjkXJtKxxabo9e7tyhlgb6gNlSbUpMh+l/FaqzVwewGu8BW1Zx7pTpQDJUjb8tsUTW6+GDXbMn3mLbXlXJiGdggxFAoUrtPS3wE4Nk02UZG2OOzlk7fRs7i95QCLo3E0jtrjnM7SR3uS1p4qtS2nJ5OwtQVHgOvArLBFijZUV9QtSl8dAY5d0E0hM0w3HS2DpIeB6m/A1+HfhJcGUq4sOxH+x3f5+VO+Ds9rYNI7zPXOYWPrtf8bYMx6fuOAX5jzNR0PdsuON+X1f7EERxMJJoU6GkTEWBvVolVlb5lh3tKCg6Wx1IbaMDdJ+9sUCc5KC46hKGCk3IVOS4TCqdBNfUs7Kd4iXf2RjnT/LLysJy3XDcHLh/vde3x8DoGvwgsa67vBk91G5Pe/HbOe7xwym0NXbtiuuDkGO2IJDh9oQvJ4cY4vdoqLDuoH9Zl2F/ofsekn8lkuhIlhQcffUtSjytFyp++p6NiE7Rqx/lodgKVoceEp/CP4FfjrquZaTtj2AvH5K/ywpn7M34K/SsoYDAdIN448I1/0/wveW289T1/lX5xBzc8N5IaHr0XMOQdHsIkDuJFifj20pBm5jzwUv9e2FhwRsvhAbalCIuIw3bhJihY3p6nTFFIZgiSYjfTf3aXuOjmeGn4bPoGvwl+CFzTRczBIuHBEeImHc37/lGfwZR0cXzVDOvaKfNHvwe+suZ771K/y/XcBlsoN996JpBhoE2toYxOznNEOS5TJc6Id5GEXLjrWo+LEWGNpPDU4WAwsIRROu+1vM+0oW37z/MBN9kqHnSArwPfgFJ7Cq/Ai3Ie7g7ncmI09v8sjzw9mzOAEXoIHxURueaAce5V80f/DOuuZwHM8vsMb5wBzOFWM7wymTXPAEvm4vcFpZ2ut0VZRjkiP2MlmLd6DIpbGSiHOjdnUHN90hRYmhTnmvhzp1iKDNj+b7t5hi79lWGwQ+HN9RsfFMy0FXbEwhfuczKgCbyxYwBmcFhhvo/7a44v+i3XWcwDP86PzpGQYdWh7csP5dBvZ1jNzdxC8pBGuxqSW5vw40nBpj5JhMwvOzN0RWqERHMr4Lv1kWX84xLR830G3j6yqZ1a8UstTlW+qJPOZ+sZ7xZPKTJLhiNOAFd6tk+jrTH31ncLOxid8+nzRb128HhUcru/y0Wn6iT254YPC6FtVSIMoW2sk727AhvTtrWKZTvgsmckfXYZWeNRXx/3YQ2OUxLDrbHtN11IwrgXT6c8dATDwLniYwxzO4RzuQqTKSC5gAofMZ1QBK3zQ4JWobFbcvJm87FK+6JXrKahLn54m3p+McXzzYtP8VF/QpJuh1OwieElEoI1pRxPS09FBrkq2tWCU59+HdhNtTIqKm8EBrw2RTOEDpG3IKo2Y7mFdLm3ZeVjYwVw11o/oznceMve4CgMfNym/utA/d/ILMR7gpXzRy9eDsgLcgbs8O2Va1L0zzIdwGGemTBuwROHeoMShkUc7P+ISY3KH5ZZeWqO8mFTxQYeXTNuzvvK5FGPdQfuu00DwYFY9dyhctEt+OJDdnucfpmyhzUJzfsJjr29l8S0bXBfwRS9ZT26tmMIdZucch5ZboMz3Nio3nIOsYHCGoDT4kUA9MiXEp9Xsui1S8th/kbWIrMBxDGLodWUQIWcvnXy+9M23xPiSMOiRPqM+YMXkUN3gXFrZJwXGzUaMpJfyRS9ZT0lPe8TpScuRlbMHeUmlaKDoNuy62iWNTWNFYjoxFzuJs8oR+RhRx7O4SVNSXpa0ZJQ0K1LAHDQ+D9IepkMXpcsq5EVCvClBUIzDhDoyKwDw1Lc59GbTeORivugw1IcuaEOaGWdNm+Ps5fQ7/tm0DjMegq3yM3vb5j12qUId5UZD2oxDSEWOZMSqFl/W+5oynWDa/aI04tJRQ2eTXusg86SQVu/nwSYwpW6wLjlqIzwLuxGIvoAvul0PS+ZNz0/akp/pniO/8JDnGyaCkzbhl6YcqmK/69prxPqtpx2+Km9al9sjL+rwMgHw4jE/C8/HQ3m1vBuL1fldbzd8mOueVJ92syqdEY4KJjSCde3mcRw2TA6szxedn+zwhZMps0XrqEsiUjnC1hw0TELC2Ek7uAAdzcheXv1BYLagspxpzSAoZZUsIzIq35MnFQ9DOrlNB30jq3L4pkhccKUAA8/ocvN1Rzx9QyOtERs4CVsJRK/DF71kPYrxYsGsm6RMh4cps5g1DOmM54Ly1ii0Hd3Y/BMk8VWFgBVmhqrkJCPBHAolwZaWzLR9Vb7bcWdX9NyUYE+uB2BKfuaeBUcjDljbYVY4DdtsVWvzRZdWnyUzDpjNl1Du3aloAjVJTNDpcIOVVhrHFF66lLfJL1zJr9PQ2nFJSBaKoDe+sAvLufZVHVzYh7W0h/c6AAZ+7Tvj6q9j68G/cTCS/3n1vLKHZwNi+P+pS0WkZNMBMUl+LDLuiE4omZy71r3UFMwNJV+VJ/GC5ixVUkBStsT4gGKh0Gm4Oy3qvq7Lbmq24nPdDuDR9deR11XzP4vFu3TYzfnIyiSVmgizUYGqkIXNdKTY9pgb9D2Ix5t0+NHkVzCdU03suWkkVZAoCONCn0T35gAeW38de43mf97sMOpSvj4aa1KYUm58USI7Wxxes03bAZdRzk6UtbzMaCQ6IxO0dy7X+XsjoD16hpsBeGz9dfzHj+R/Hp8nCxZRqkEDTaCKCSywjiaoMJ1TITE9eg7Jqnq8HL6gDwiZb0u0V0Rr/rmvqjxKuaLCX7ZWXTvAY+uvm3z8CP7nzVpngqrJpZKwWnCUjIviYVlirlGOzPLI3SMVyp/elvBUjjDkNhrtufFFErQ8pmdSlbK16toBHlt/HV8uHMX/vEGALkV3RJREiSlopxwdMXOZPLZ+ix+kAHpMKIk8UtE1ygtquttwxNhphrIZ1IBzjGF3IIGxGcBj6q8bHJBG8T9vdsoWrTFEuebEZuVxhhClH6P5Zo89OG9fwHNjtNQTpD0TG9PJLEYqvEY6Rlxy+ZZGfL0Aj62/bnQCXp//eeM4KzfQVJbgMQbUjlMFIm6TpcfWlZje7NBSV6IsEVmumWIbjiloUzQX9OzYdo8L1wjw2PrrpimONfmfNyzKklrgnEkSzT5QWYQW40YShyzqsRmMXbvVxKtGuYyMKaU1ugenLDm5Ily4iT14fP11Mx+xJv+zZ3MvnfdFqxU3a1W/FTB4m3Qfsyc1XUcdVhDeUDZXSFHHLQj/Y5jtC7ZqM0CXGwB4bP11i3LhOvzPGygYtiUBiwQV/4wFO0majijGsafHyRLu0yG6q35cL1rOpVxr2s5cM2jJYMCdc10Aj6q/blRpWJ//+dmm5psMl0KA2+AFRx9jMe2WbC4jQxnikd4DU8TwUjRVacgdlhmr3bpddzuJ9zXqr2xnxJfzP29RexdtjDVZqzkqa6PyvcojGrfkXiJ8SEtml/nYskicv0ivlxbqjemwUjMw5evdg8fUX9nOiC/lf94Q2i7MURk9nW1MSj5j8eAyV6y5CN2S6qbnw3vdA1Iwq+XOSCl663udN3IzLnrt+us25cI1+Z83SXQUldqQq0b5XOT17bGpLd6ssN1VMPf8c+jG8L3NeCnMdF+Ra3fRa9dft39/LuZ/3vwHoHrqGmQFafmiQw6eyzMxS05K4bL9uA+SKUQzCnSDkqOGokXyJvbgJ/BHI+qvY69//4rl20NsmK2ou2dTsyIALv/91/8n3P2Aao71WFGi8KKv1fRC5+J67Q/507/E/SOshqN5TsmYIjVt+kcjAx98iz/4SaojbIV1rexE7/C29HcYD/DX4a0rBOF5VTu7omsb11L/AWcVlcVZHSsqGuXLLp9ha8I//w3Mv+T4Ew7nTBsmgapoCrNFObIcN4pf/Ob/mrvHTGqqgAupL8qWjWPS9m/31jAe4DjA+4+uCoQoT/zOzlrNd3qd4SdphFxsUvYwGWbTWtISc3wNOWH+kHBMfc6kpmpwPgHWwqaSUG2ZWWheYOGQGaHB+eQ/kn6b3pOgLV+ODSn94wDvr8Bvb70/LLuiPPEr8OGVWfDmr45PZyccEmsVXZGe1pRNX9SU5+AVQkNTIVPCHF/jGmyDC9j4R9LfWcQvfiETmgMMUCMN1uNCakkweZsowdYobiMSlnKA93u7NzTXlSfe+SVbfnPQXmg9LpYAQxpwEtONyEyaueWM4FPjjyjG3uOaFmBTWDNgBXGEiQpsaWhnAqIijB07Dlsy3fUGeP989xbWkyf+FF2SNEtT1E0f4DYYVlxFlbaSMPIRMk/3iMU5pME2SIWJvjckciebkQuIRRyhUvkHg/iUljG5kzVog5hV7vIlCuBrmlhvgPfNHQM8lCf+FEGsYbMIBC0qC9a0uuy2wLXVbLBaP5kjHokCRxapkQyzI4QEcwgYHRZBp+XEFTqXFuNVzMtjXLJgX4gAid24Hjwc4N3dtVSe+NNiwTrzH4WVUOlDobUqr1FuAgYllc8pmzoVrELRHSIW8ViPxNy4xwjBpyR55I6J220qQTZYR4guvUICJiSpr9gFFle4RcF/OMB7BRiX8sSfhpNSO3lvEZCQfLUVTKT78Ek1LRLhWN+yLyTnp8qWUZ46b6vxdRGXfHVqx3eI75YaLa4iNNiK4NOW7wPW6lhbSOF9/M9qw8e/aoB3d156qTzxp8pXx5BKAsYSTOIIiPkp68GmTq7sZtvyzBQaRLNxIZ+paozHWoLFeExIhRBrWitHCAHrCF7/thhD8JhYz84wg93QRV88wLuLY8zF8sQ36qF1J455bOlgnELfshKVxYOXKVuKx0jaj22sczTQqPqtV/XDgpswmGTWWMSDw3ssyUunLLrVPGjYRsH5ggHeHSWiV8kT33ycFSfMgkoOK8apCye0J6VW6GOYvffgU9RWsukEi2kUV2nl4dOYUzRik9p7bcA4ggdJ53LxKcEe17B1R8eqAd7dOepV8sTXf5lhejoL85hUdhDdknPtKHFhljOT+bdq0hxbm35p2nc8+Ja1Iw+tJykgp0EWuAAZYwMVwac5KzYMslhvgHdHRrxKnvhTYcfKsxTxtTETkjHO7rr3zjoV25lAQHrqpV7bTiy2aXMmUhTBnKS91jhtR3GEoF0oLnWhWNnYgtcc4N0FxlcgT7yz3TgNIKkscx9jtV1ZKpWW+Ub1tc1eOv5ucdgpx+FJy9pgbLE7xDyXb/f+hLHVGeitHOi6A7ybo3sF8sS7w7cgdk0nJaOn3hLj3uyD0Zp5pazFIUXUpuTTU18d1EPkDoX8SkmWTnVIozEdbTcZjoqxhNHf1JrSS/AcvHjZ/SMHhL/7i5z+POsTUh/8BvNfYMTA8n+yU/MlTZxSJDRStqvEuLQKWwDctMTQogUDyQRoTQG5Kc6oQRE1yV1jCA7ri7jdZyK0sYTRjCR0Hnnd+y7nHxNgTULqw+8wj0mQKxpYvhjm9uSUxg+TTy7s2GtLUGcywhXSKZN275GsqlclX90J6bRI1aouxmgL7Q0Nen5ziM80SqMIo8cSOo+8XplT/5DHNWsSUr/6lLN/QQ3rDyzLruEW5enpf7KqZoShEduuSFOV7DLX7Ye+GmXb6/hnNNqKsVXuMDFpb9Y9eH3C6NGEzuOuI3gpMH/I6e+zDiH1fXi15t3vA1czsLws0TGEtmPEJdiiFPwlwKbgLHAFk4P6ZyPdymYYHGE0dutsChQBl2JcBFlrEkY/N5bQeXQ18gjunuMfMfsBlxJSx3niO485fwO4fGD5T/+3fPQqkneWVdwnw/3bMPkW9Wbqg+iC765Zk+xcT98ibKZc2EdgHcLoF8cSOo/Oc8fS+OyEULF4g4sJqXVcmfMfsc7A8v1/yfGXmL9I6Fn5pRwZhsPv0TxFNlAfZCvG+Oohi82UC5f/2IsJo0cTOm9YrDoKhFPEUr/LBYTUNht9zelHXDqwfPCIw4owp3mOcIQcLttWXFe3VZ/j5H3cIc0G6oPbCR+6Y2xF2EC5cGUm6wKC5tGEzhsWqw5hNidUiKX5gFWE1GXh4/Qplw4sVzOmx9QxU78g3EF6wnZlEN4FzJ1QPSLEZz1KfXC7vd8ssGdIbNUYpVx4UapyFUHzJoTOo1McSkeNn1M5MDQfs4qQuhhX5vQZFw8suwWTcyYTgioISk2YdmkhehG4PkE7w51inyAGGaU+uCXADabGzJR1fn3lwkty0asIo8cROm9Vy1g0yDxxtPvHDAmpu+PKnM8Ix1wwsGw91YJqhteaWgjYBmmQiebmSpwKKzE19hx7jkzSWOm66oPbzZ8Yj6kxVSpYjVAuvLzYMCRo3oTQecOOjjgi3NQ4l9K5/hOGhNTdcWVOTrlgYNkEXINbpCkBRyqhp+LdRB3g0OU6rMfW2HPCFFMV9nSp+uB2woepdbLBuJQyaw/ZFysXrlXwHxI0b0LovEkiOpXGA1Ijagf+KUNC6rKNa9bQnLFqYNkEnMc1uJrg2u64ELPBHpkgWbmwKpJoDhMwNbbGzAp7Yg31wS2T5rGtzit59PrKhesWG550CZpHEzpv2NGRaxlNjbMqpmEIzygJqQfjypycs2pg2cS2RY9r8HUqkqdEgKTWtWTKoRvOBPDYBltja2SO0RGjy9UHtxwRjA11ujbKF+ti5cIR9eCnxUg6owidtyoU5tK4NLji5Q3HCtiyF2IqLGYsHViOXTXOYxucDqG0HyttqYAKqYo3KTY1ekyDXRAm2AWh9JmsVh/ccg9WJ2E8YjG201sPq5ULxxX8n3XLXuMInbft2mk80rRGjCGctJ8/GFdmEQ9Ug4FlE1ll1Y7jtiraqm5Fe04VV8lvSVBL8hiPrfFVd8+7QH3Qbu2ipTVi8cvSGivc9cj8yvH11YMHdNSERtuOslM97feYFOPKzGcsI4zW0YGAbTAOaxCnxdfiYUmVWslxiIblCeAYr9VYR1gM7GmoPrilunSxxeT3DN/2eBQ9H11+nk1adn6VK71+5+Jfct4/el10/7KBZfNryUunWSCPxPECk1rdOv1WVSrQmpC+Tl46YD3ikQYcpunSQgzVB2VHFhxHVGKDgMEY5GLlQnP7FMDzw7IacAWnO6sBr12u+XanW2AO0wQ8pknnFhsL7KYIqhkEPmEXFkwaN5KQphbkUmG72wgw7WSm9RiL9QT925hkjiVIIhphFS9HKI6/8QAjlpXqg9W2C0apyaVDwKQwrwLY3j6ADR13ZyUNByQXHQu6RY09Hu6zMqXRaNZGS/KEJs0cJEe9VH1QdvBSJv9h09eiRmy0V2uJcqHcShcdvbSNg5fxkenkVprXM9rDVnX24/y9MVtncvbKY706anNl3ASll9a43UiacVquXGhvq4s2FP62NGKfQLIQYu9q1WmdMfmUrDGt8eDS0cXozH/fjmUH6Jruvm50hBDSaEU/2Ru2LEN/dl006TSc/g7tfJERxGMsgDUEr104pfWH9lQaN+M4KWQjwZbVc2rZVNHsyHal23wZtIs2JJqtIc/WLXXRFCpJkfE9jvWlfFbsNQ9pP5ZBS0zKh4R0aMFj1IjTcTnvi0Zz2rt7NdvQb2mgbju1plsH8MmbnEk7KbK0b+wC2iy3aX3szW8xeZvDwET6hWZYwqTXSSG+wMETKum0Dq/q+x62gt2ua2ppAo309TRk9TPazfV3qL9H8z7uhGqGqxNVg/FKx0HBl9OVUORn8Q8Jx9gFttGQUDr3tzcXX9xGgN0EpzN9mdZ3GATtPhL+CjxFDmkeEU6x56kqZRusLzALXVqkCN7zMEcqwjmywDQ6OhyUe0Xao1Qpyncrg6wKp9XfWDsaZplElvQ/b3sdweeghorwBDlHzgk1JmMc/wiERICVy2VJFdMjFuLQSp3S0W3+sngt2njwNgLssFGVQdJ0tu0KH4ky1LW4yrbkuaA6Iy9oz/qEMMXMMDWyIHhsAyFZc2peV9hc7kiKvfULxCl9iddfRK1f8kk9qvbdOoBtOg7ZkOZ5MsGrSHsokgLXUp9y88smniwWyuFSIRVmjplga3yD8Uij5QS1ZiM4U3Qw5QlSm2bXjFe6jzzBFtpg+/YBbLAWG7OPynNjlCw65fukGNdkJRf7yM1fOxVzbxOJVocFoYIaGwH22mIQkrvu1E2nGuebxIgW9U9TSiukPGU+Lt++c3DJPKhyhEEbXCQLUpae2exiKy6tMPe9mDRBFCEMTWrtwxN8qvuGnt6MoihKWS5NSyBhbH8StXoAz8PLOrRgLtOT/+4vcu+7vDLnqNvztOq7fmd8sMmY9Xzn1zj8Dq8+XVdu2Nv0IIySgEdQo3xVHps3Q5i3fLFsV4aiqzAiBhbgMDEd1uh8qZZ+lwhjkgokkOIv4xNJmyncdfUUzgB4oFMBtiu71Xumpz/P+cfUP+SlwFExwWW62r7b+LSPxqxn/gvMZ5z9C16t15UbNlq+jbGJtco7p8wbYlL4alSyfWdeuu0j7JA3JFNuVAwtst7F7FhWBbPFNKIUORndWtLraFLmMu7KFVDDOzqkeaiN33YAW/r76wR4XDN/yN1z7hejPau06EddkS/6XThfcz1fI/4K736fO48vlxt2PXJYFaeUkFS8U15XE3428xdtn2kc8GQlf1vkIaNRRnOMvLTWrZbElEHeLWi1o0dlKPAh1MVgbbVquPJ5+Cr8LU5/H/+I2QlHIU2ClXM9G8v7Rr7oc/hozfUUgsPnb3D+I+7WF8kNO92GY0SNvuxiE+2Bt8prVJTkzE64sfOstxuwfxUUoyk8VjcTlsqe2qITSFoSj6Epd4KsT6BZOWmtgE3hBfir8IzZDwgV4ZTZvD8VvPHERo8v+vL1DASHTz/i9OlKueHDjK5Rnx/JB1Vb1ioXdBra16dmt7dgik10yA/FwJSVY6XjA3oy4SqM2frqDPPSRMex9qs3XQtoWxMj7/Er8GWYsXgjaVz4OYumP2+9kbxvny/6kvWsEBw+fcb5bInc8APdhpOSs01tEqIkoiZjbAqKMruLbJYddHuHFRIyJcbdEdbl2sVLaySygunutBg96Y2/JjKRCdyHV+AEFtTvIpbKIXOamknYSiB6KV/0JetZITgcjjk5ZdaskBtWO86UF0ap6ozGXJk2WNiRUlCPFir66lzdm/SLSuK7EUdPz8f1z29Skq6F1fXg8+5UVR6bszncP4Tn4KUkkdJ8UFCY1zR1i8RmL/qQL3rlei4THG7OODlnKko4oI01kd3CaM08Ia18kC3GNoVaO9iDh+hWxSyTXFABXoau7Q6q9OxYg/OVEMw6jdbtSrJ9cBcewGmaZmg+bvkUnUUaGr+ZfnMH45Ivevl61hMcXsxYLFTu1hTm2zViCp7u0o5l+2PSUh9bDj6FgYypufBDhqK2+oXkiuHFHR3zfj+9PtA8oR0xnqX8qn+sx3bFODSbbF0X8EUvWQ8jBIcjo5bRmLOljDNtcqNtOe756h3l0VhKa9hDd2l1eqmsnh0MNMT/Cqnx6BInumhLT8luljzQ53RiJeA/0dxe5NK0o2fA1+GLXr6eNQWHNUOJssQaTRlGpLHKL9fD+IrQzTOMZS9fNQD4AnRNVxvTdjC+fJdcDDWQcyB00B0t9BDwTxXgaAfzDZ/DBXzRnfWMFRwuNqocOmX6OKNkY63h5n/fFcB28McVHqnXZVI27K0i4rDLNE9lDKV/rT+udVbD8dFFu2GGZ8mOt0kAXcoX3ZkIWVtw+MNf5NjR2FbivROHmhV1/pj2egv/fMGIOWTIWrV3Av8N9imV9IWml36H6cUjqEWNv9aNc+veb2sH46PRaHSuMBxvtW+twxctq0z+QsHhux8Q7rCY4Ct8lqsx7c6Sy0dl5T89rIeEuZKoVctIk1hNpfavER6yyH1Vvm3MbsUHy4ab4hWr/OZPcsRBphnaV65/ZcdYPNNwsjN/djlf9NqCw9U5ExCPcdhKxUgLSmfROpLp4WSUr8ojdwbncbvCf+a/YzRaEc6QOvXcGO256TXc5Lab9POvB+AWY7PigWYjzhifbovuunzRawsO24ZqQQAqguBtmpmPB7ysXJfyDDaV/aPGillgz1MdQg4u5MYaEtBNNHFjkRlSpd65lp4hd2AVPTfbV7FGpyIOfmNc/XVsPfg7vzaS/3nkvLL593ANLvMuRMGpQIhiF7kUEW9QDpAUbTWYBcbp4WpacHHY1aacqQyjGZS9HI3yCBT9kUZJhVOD+zUDvEH9ddR11fzPcTDQ5TlgB0KwqdXSavk9BC0pKp0WmcuowSw07VXmXC5guzSa4p0UvRw2lbDiYUx0ExJJRzWzi6Gm8cnEkfXXsdcG/M/jAJa0+bmCgdmQ9CYlNlSYZOKixmRsgiFxkrmW4l3KdFKv1DM8tk6WxPYJZhUUzcd8Kdtgrw/gkfXXDT7+avmfVak32qhtkg6NVdUS5wgkru1YzIkSduTW1FDwVWV3JQVJVuieTc0y4iDpFwc7/BvSalvKdQM8sv662cevz/+8sQVnjVAT0W2wLllw1JiMhJRxgDjCjLQsOzSFSgZqx7lAW1JW0e03yAD3asC+GD3NbQhbe+mN5GXH1F83KDOM4n/e5JIuH4NpdQARrFPBVptUNcjj4cVMcFSRTE2NpR1LEYbYMmfWpXgP9KejaPsLUhuvLCsVXznAG9dfx9SR1ud/3hZdCLHb1GMdPqRJgqDmm76mHbvOXDtiO2QPUcKo/TWkQ0i2JFXpBoo7vij1i1Lp3ADAo+qvG3V0rM//vFnnTE4hxd5Ka/Cor5YEdsLVJyKtDgVoHgtW11pWSjolPNMnrlrVj9Fv2Qn60twMwKPqr+N/wvr8z5tZcDsDrv06tkqyzESM85Ycv6XBWA2birlNCXrI6VbD2lx2L0vQO0QVTVVLH4SE67fgsfVXv8n7sz7/85Z7cMtbE6f088wSaR4kCkCm10s6pKbJhfqiUNGLq+0gLWC6eUAZFPnLjwqtKd8EwGvWX59t7iPW4X/eAN1svgRVSY990YZg06BD1ohLMtyFTI4pKTJsS9xREq9EOaPWiO2gpms7397x6nQJkbh+Fz2q/rqRROX6/M8bJrqlVW4l6JEptKeUFuMYUbtCQ7CIttpGc6MY93x1r1vgAnRXvY5cvwWPqb9uWQm+lP95QxdNMeWhOq1x0Db55C7GcUv2ZUuN6n8iKzsvOxibC//Yfs9Na8r2Rlz02vXXDT57FP/zJi66/EJSmsJKa8QxnoqW3VLQ+jZVUtJwJ8PNX1NQCwfNgdhhHD9on7PdRdrdGPF28rJr1F+3LBdeyv+8yYfLoMYet1vX4upNAjVvwOUWnlNXJXlkzk5Il6kqeoiL0C07qno+/CYBXq/+utlnsz7/Mzvy0tmI4zm4ag23PRN3t/CWryoUVJGm+5+K8RJ0V8Hc88/XHUX/HfiAq7t+BH+x6v8t438enWmdJwFA6ZINriLGKv/95f8lT9/FnyA1NMVEvQyaXuu+gz36f/DD73E4pwqpLcvm/o0Vle78n//+L/NPvoefp1pTJye6e4A/D082FERa5/opeH9zpvh13cNm19/4v/LDe5xMWTi8I0Ta0qKlK27AS/v3/r+/x/2GO9K2c7kVMonDpq7//jc5PKCxeNPpFVzaRr01wF8C4Pu76hXuX18H4LduTr79guuFD3n5BHfI+ZRFhY8w29TYhbbLi/bvBdqKE4fUgg1pBKnV3FEaCWOWyA+m3WpORZr/j+9TKJtW8yBTF2/ZEODI9/QavHkVdGFp/Pjn4Q+u5hXapsP5sOH+OXXA1LiKuqJxiMNbhTkbdJTCy4llEt6NnqRT4dhg1V3nbdrm6dYMecA1yTOL4PWTE9L5VzPFlLBCvlG58AhehnN4uHsAYinyJ+AZ/NkVvELbfOBUuOO5syBIEtiqHU1k9XeISX5bsimrkUUhnGDxourN8SgUsCZVtKyGbyGzHXdjOhsAvOAswSRyIBddRdEZWP6GZhNK/yjwew9ehBo+3jEADu7Ay2n8mDc+TS7awUHg0OMzR0LABhqLD4hJEh/BEGyBdGlSJoXYXtr+3HS4ijzVpgi0paWXtdruGTknXBz+11qT1Q2inxaTzQCO46P3lfLpyS4fou2PH/PupwZgCxNhGlj4IvUuWEsTkqMWm6i4xCSMc9N1RDQoCVcuGItJ/MRWefais+3synowi/dESgJjkilnWnBTGvRWmaw8oR15257t7CHmCf8HOn7cwI8+NQBXMBEmAa8PMRemrNCEhLGEhDQKcGZWS319BX9PFBEwGTbRBhLbDcaV3drFcDqk5kCTd2JF1Wp0HraqBx8U0wwBTnbpCadwBA/gTH/CDrcCs93LV8E0YlmmcyQRQnjBa8JESmGUfIjK/7fkaDJpmD2QptFNVJU1bbtIAjjWQizepOKptRjbzR9Kag6xZmMLLjHOtcLT3Tx9o/0EcTT1XN3E45u24AiwEypDJXihKjQxjLprEwcmRKclaDNZCVqr/V8mYWyFADbusiY5hvgFoU2vio49RgJLn5OsReRFN6tabeetiiy0V7KFHT3HyZLx491u95sn4K1QQSPKM9hNT0wMVvAWbzDSVdrKw4zRjZMyJIHkfq1VAVCDl/bUhNKlGq0zGr05+YAceXVPCttVk0oqjVwMPt+BBefx4yPtGVkUsqY3CHDPiCM5ngupUwCdbkpd8kbPrCWHhkmtIKLEetF2499eS1jZlIPGYnlcPXeM2KD9vLS0bW3ktYNqUllpKLn5ZrsxlIzxvDu5eHxzGLctkZLEY4PgSOg2IUVVcUONzUDBEpRaMoXNmUc0tFZrTZquiLyKxrSm3DvIW9Fil+AkhXu5PhEPx9mUNwqypDvZWdKlhIJQY7vn2OsnmBeOWnYZ0m1iwbbw1U60by5om47iHRV6fOgzjMf/DAZrlP40Z7syxpLK0lJ0gqaAK1c2KQKu7tabTXkLFz0sCftuwX++MyNeNn68k5Buq23YQhUh0SNTJa1ioQ0p4nUG2y0XilF1JqODqdImloPS4Bp111DEWT0jJjVv95uX9BBV7eB3bUWcu0acSVM23YZdd8R8UbQUxJ9wdu3oMuhdt929ME+mh6JXJ8di2RxbTi6TbrDquqV4aUKR2iwT6aZbyOwEXN3DUsWr8Hn4EhwNyHuXHh7/pdaUjtR7vnDh/d8c9xD/s5f501eQ1+CuDiCvGhk1AN/4Tf74RfxPwD3toLarR0zNtsnPzmS64KIRk861dMWCU8ArasG9T9H0ZBpsDGnjtAOM2+/LuIb2iIUGXNgl5ZmKD/Tw8TlaAuihaFP5yrw18v4x1898zIdP+DDAX1bM3GAMvPgRP/cJn3zCW013nrhHkrITyvYuwOUkcHuKlRSW5C6rzIdY4ppnF7J8aAJbQepgbJYBjCY9usGXDKQxq7RZfh9eg5d1UHMVATRaD/4BHK93/1iAgYZ/+jqPn8Dn4UExmWrpa3+ZOK6MvM3bjwfzxNWA2dhs8+51XHSPJiaAhGSpWevEs5xHLXcEGFXYiCONySH3fPWq93JIsBiSWvWyc3CAN+EcXoT7rCSANloPPoa31rt/5PUA/gp8Q/jDD3hyrjzlR8VkanfOvB1XPubt17vzxAfdSVbD1pzAnfgyF3ycadOTOTXhpEUoLC1HZyNGW3dtmjeXgr2r56JNmRwdNNWaQVBddd6rh4MhviEB9EFRD/7RGvePvCbwAL4Mx/D6M541hHO4D3e7g6PafdcZVw689z7NGTwo5om7A8sPhccT6qKcl9NJl9aM/9kX+e59Hh1yPqGuCCZxuITcsmNaJ5F7d0q6J3H48TO1/+M57085q2icdu2U+W36Ldllz9Agiv4YGljoEN908EzvDOrBF98/vtJwCC/BF2AG75xxEmjmMIcjxbjoaxqOK3/4hPOZzhMPBpYPG44CM0dTVm1LjLtUWWVz1Bcf8tEx0zs8O2A2YVHRxKYOiy/aOVoAaMu0i7ubu43njjmd4ibMHU1sIDHaQNKrZND/FZYdk54oCXetjq7E7IVl9eAL7t+oHnwXXtLx44czzoRFHBztYVwtH1d+NOMkupZ5MTM+gUmq90X+Bh9zjRlmaQ+m7YMqUL/veemcecAtOJ0yq1JnVlN27di2E0+Klp1tAJ4KRw1eMI7aJjsO3R8kPSI3fUFXnIOfdQe86sIIVtWDL7h//Ok6vj8vwDk08NEcI8zz7OhBy+WwalzZeZ4+0XniRfst9pAJqQHDGLzVQ2pheZnnv1OWhwO43/AgcvAEXEVVpa4db9sGvNK8wjaENHkfFQ4Ci5i7dqnQlPoLQrHXZDvO3BIXZbJOBrOaEbML6sFL798I4FhKihjHMsPjBUZYCMFr6nvaArxqXPn4lCa+cHfSa2cP27g3Z3ziYTRrcbQNGLQmGF3F3cBdzzzX7AILx0IB9rbwn9kx2G1FW3Inic+ZLIsVvKR8Zwfj0l1fkqo8LWY1M3IX14OX3r9RKTIO+d9XzAI8qRPGPn/4NC2n6o4rN8XJ82TOIvuVA8zLKUHRFgBCetlDZlqR1gLKjS39xoE7Bt8UvA6BxuEDjU3tFsEijgA+615tmZkXKqiEENrh41iLDDZNq4pKTWR3LZfnos81LOuNa15cD956vLMsJd1rqYp51gDUQqMYm2XsxnUhD2jg1DM7SeuJxxgrmpfISSXVIJIS5qJJSvJPEQ49DQTVIbYWJ9QWa/E2+c/oPK1drmC7WSfJRNKBO5Yjvcp7Gc3dmmI/Xh1kDTEuiSnWqQf37h+fTMhGnDf6dsS8SQfQWlqqwXXGlc/PEZ/SC5mtzIV0nAshlQdM/LvUtYutrEZ/Y+EAFtq1k28zQhOwLr1AIeANzhF8t9qzTdZf2qRKO6MWE9ohBYwibbOmrFtNmg3mcS+tB28xv2uKd/agYCvOP+GkSc+0lr7RXzyufL7QbkUpjLjEWFLqOIkAGu2B0tNlO9Eau2W1qcOUvVRgKzypKIQZ5KI3q0MLzqTNRYqiZOqmtqloIRlmkBHVpHmRYV6/HixbO6UC47KOFJnoMrVyr7wYz+SlW6GUaghYbY1I6kkxA2W1fSJokUdSh2LQ1GAimRGm0MT+uu57H5l7QgOWxERpO9moLRPgTtquWCfFlGlIjQaRly9odmzMOWY+IBO5tB4sW/0+VWGUh32qYk79EidWKrjWuiLpiVNGFWFRJVktyeXWmbgBBzVl8anPuXyNJlBJOlKLTgAbi/EYHVHxWiDaVR06GnHQNpJcWcK2jJtiCfG2sEHLzuI66sGrMK47nPIInPnu799935aOK2cvmvubrE38ZzZjrELCmXM2hM7UcpXD2oC3+ECVp7xtIuxptJ0jUr3sBmBS47TVxlvJ1Sqb/E0uLdvLj0lLr29ypdd/eMX3f6lrxGlKwKQxEGvw0qHbkbwrF3uHKwVENbIV2wZ13kNEF6zD+x24aLNMfDTCbDPnEikZFyTNttxWBXDaBuM8KtI2rmaMdUY7cXcUPstqTGvBGSrFWIpNMfbdea990bvAOC1YX0qbc6smDS1mPxSJoW4fwEXvjMmhlijDRq6qale6aJEuFGoppYDoBELQzLBuh/mZNx7jkinv0EtnUp50lO9hbNK57lZaMAWuWR5Yo9/kYwcYI0t4gWM47Umnl3YmpeBPqSyNp3K7s2DSAS/39KRuEN2bS4xvowV3dFRMx/VFcp2Yp8w2nTO9hCXtHG1kF1L4KlrJr2wKfyq77R7MKpFKzWlY9UkhYxyHWW6nBWPaudvEAl3CGcNpSXPZ6R9BbBtIl6cHL3gIBi+42CYXqCx1gfGWe7Ap0h3luyXdt1MKy4YUT9xSF01G16YEdWsouW9mgDHd3veyA97H+Ya47ZmEbqMY72oPztCGvK0onL44AvgC49saZKkWRz4veWljE1FHjbRJaWv6ZKKtl875h4CziFCZhG5rx7tefsl0aRT1bMHZjm8dwL/6u7wCRysaQblQoG5yAQN5zpatMNY/+yf8z+GLcH/Qn0iX2W2oEfXP4GvwQHuIL9AYGnaO3zqAX6946nkgqZNnUhx43DIdQtMFeOPrgy/y3Yd85HlJWwjLFkU3kFwq28xPnuPhMWeS+tDLV9Otllq7pQCf3uXJDN9wFDiUTgefHaiYbdfi3b3u8+iY6TnzhgehI1LTe8lcd7s1wJSzKbahCRxKKztTLXstGAiu3a6rPuQs5pk9TWAan5f0BZmGf7Ylxzzk/A7PAs4QPPPAHeFQ2hbFHszlgZuKZsJcUmbDC40sEU403cEjczstOEypa+YxevL4QBC8oRYqWdK6b7sK25tfE+oDZgtOQ2Jg8T41HGcBE6fTWHn4JtHcu9S7uYgU5KSCkl/mcnq+5/YBXOEr6lCUCwOTOM1taOI8mSxx1NsCXBEmLKbMAg5MkwbLmpBaFOPrNSlO2HnLiEqW3tHEwd8AeiQLmn+2gxjC3k6AxREqvKcJbTEzlpLiw4rNZK6oJdidbMMGX9FULKr0AkW+2qDEPBNNm5QAt2Ik2nftNWHetubosHLo2nG4vQA7GkcVCgVCgaDixHqo9UUn1A6OshapaNR/LPRYFV8siT1cCtJE0k/3WtaNSuUZYKPnsVIW0xXWnMUxq5+En4Kvw/MqQmVXnAXj9Z+9zM98zM/Agy7F/qqj2Nh67b8HjFnPP3iBn/tkpdzwEJX/whIcQUXOaikeliCRGUk7tiwF0rItwMEhjkZ309hikFoRAmLTpEXWuHS6y+am/KB/fM50aLEhGnSMwkpxzOov4H0AvgovwJ1iGzDLtJn/9BU+fAINfwUe6FHSLhu83viV/+/HrOePX+STT2B9uWGbrMHHLldRBlhS/CJQmcRxJFqZica01XixAZsYiH1uolZxLrR/SgxVIJjkpQP4PE9sE59LKLr7kltSBogS5tyszzH8Fvw8/AS8rNOg0xUS9fIaHwb+6et8Q/gyvKRjf5OusOzGx8evA/BP4IP11uN/grca5O0lcsPLJ5YjwI4QkJBOHa0WdMZYGxPbh2W2nR9v3WxEWqgp/G3+6VZbRLSAAZ3BhdhAaUL33VUSw9yjEsvbaQ9u4A/gGXwZXoEHOuU1GSj2chf+Mo+f8IcfcAxfIKVmyunRbYQVnoevwgfw3TXXcw++xNuP4fhyueEUNttEduRVaDttddoP0eSxLe2LENk6itYxlrxBNBYrNNKSQmeaLcm9c8UsaB5WyO6675yyQIAWSDpBVoA/gxmcwEvwoDv0m58UE7gHn+fJOa8/Ywan8EKRfjsopF83eCglX/Sfr7OeaRoQfvt1CGvIDccH5BCvw1sWIzRGC/66t0VTcLZQZtm6PlAasbOJ9iwWtUo7biktTSIPxnR24jxP1ZKaqq+2RcXM9OrBAm/AAs7hDJ5bNmGb+KIfwCs8a3jnjBrOFeMjHSCdbKr+2uOLfnOd9eiA8Hvvwwq54VbP2OqwkB48Ytc4YEOiH2vTXqodabfWEOzso4qxdbqD5L6tbtNPECqbhnA708DZH4QOJUXqScmUlks7Ot6FBuZw3n2mEbaUX7kDzxHOOQk8nKWMzAzu6ZZ8sOFw4RK+6PcuXo9tB4SbMz58ApfKDXf3szjNIIbGpD5TKTRxGkEMLjLl+K3wlWXBsCUxIDU+jbOiysESqAy1MGUJpXgwbTWzNOVEziIXZrJ+VIztl1PUBxTSo0dwn2bOmfDRPD3TRTGlfbCJvO9KvuhL1hMHhB9wPuPRLGHcdOWG2xc0U+5bQtAJT0nRTewXL1pgk2+rZAdeWmz3jxAqfNQQdzTlbF8uJ5ecEIWvTkevAHpwz7w78QujlD/Lr491bD8/1vhM2yrUQRrWXNQY4fGilfctMWYjL72UL/qS9eiA8EmN88nbNdour+PBbbAjOjIa4iBhfFg6rxeKdEGcL6p3EWR1Qq2Qkhs2DrnkRnmN9tG2EAqmgPw6hoL7Oza7B+3SCrR9tRftko+Lsf2F/mkTndN2LmzuMcKTuj/mX2+4Va3ki16+nnJY+S7MefpkidxwnV+4wkXH8TKnX0tsYzYp29DOOoSW1nf7nTh2akYiWmcJOuTidSaqESrTYpwjJJNVGQr+rLI7WsqerHW6Kp/oM2pKuV7T1QY9gjqlZp41/WfKpl56FV/0kvXQFRyeQ83xaTu5E8p5dNP3dUF34ihyI3GSpeCsywSh22ZJdWto9winhqifb7VRvgktxp13vyjrS0EjvrRfZ62uyqddSWaWYlwTPAtJZ2oZ3j/Sgi/mi+6vpzesfAcWNA0n8xVyw90GVFGuZjTXEQy+6GfLGLMLL523f5E0OmxVjDoOuRiH91RKU+vtoCtH7TgmvBLvtFXWLW15H9GTdVw8ow4IlRLeHECN9ym1e9K0I+Cbnhgv4Yu+aD2HaQJ80XDqOzSGAV4+4yCqBxrsJAX6ZTIoX36QnvzhhzzMfFW2dZVLOJfo0zbce5OvwXMFaZ81mOnlTVXpDZsQNuoYWveketKb5+6JOOsgX+NTm7H49fUTlx+WLuWL7qxnOFh4BxpmJx0p2gDzA/BUARuS6phR+pUsY7MMboAHx5xNsSVfVZcYSwqCKrqon7zM+8ecCkeS4nm3rINuaWvVNnMRI1IRpxTqx8PZUZ0Br/UEduo3B3hNvmgZfs9gQPj8vIOxd2kndir3awvJ6BLvoUuOfFWNYB0LR1OQJoUySKb9IlOBx74q1+ADC2G6rOdmFdJcD8BkfualA+BdjOOzP9uUhGUEX/TwhZsUduwRr8wNuXKurCixLBgpQI0mDbJr9dIqUuV+92ngkJZ7xduCk2yZKbfWrH1VBiTg9VdzsgRjW3CVXCvAwDd+c1z9dWw9+B+8MJL/eY15ZQ/HqvTwVdsZn5WQsgRRnMaWaecu3jFvMBEmgg+FJFZsnSl0zjB9OqPYaBD7qmoVyImFvzi41usesV0julaAR9dfR15Xzv9sEruRDyk1nb+QaLU67T885GTls6YgcY+UiMa25M/pwGrbCfzkvR3e0jjtuaFtnwuagHTSb5y7boBH119HXhvwP487jJLsLJ4XnUkHX5sLbS61dpiAXRoZSCrFJ+EjpeU3puVfitngYNo6PJrAigKktmwjyQdZpfq30mmtulaAx9Zfx15Xzv+cyeuiBFUs9zq8Kq+XB9a4PVvph3GV4E3y8HENJrN55H1X2p8VyqSKwVusJDKzXOZzplWdzBUFK9e+B4+uv468xvI/b5xtSAkBHQaPvtqWzllVvEOxPbuiE6+j2pvjcKsbvI7txnRErgfH7LdXqjq0IokKzga14GzQ23SSbCQvO6r+Or7SMIr/efOkkqSdMnj9mBx2DRsiY29Uj6+qK9ZrssCKaptR6HKURdwUYeUWA2kPzVKQO8ku2nU3Anhs/XWkBx3F/7wJtCTTTIKftthue1ty9xvNYLY/zo5KSbIuKbXpbEdSyeRyYdAIwKY2neyoc3+k1XUaufYga3T9daMUx/r8z1s10ITknIO0kuoMt+TB8jK0lpayqqjsJ2qtXAYwBU932zinimgmd6mTRDnQfr88q36NAI+tv24E8Pr8zxtasBqx0+xHH9HhlrwsxxNUfKOHQaZBITNf0uccj8GXiVmXAuPEAKSdN/4GLHhs/XWj92dN/uetNuBMnVR+XWDc25JLjo5Mg5IZIq226tmCsip2zZliL213YrTlL2hcFjpCduyim3M7/eB16q/blQsv5X/esDRbtJeabLIosWy3ycavwLhtxdWzbMmHiBTiVjJo6lCLjXZsi7p9PEPnsq6X6wd4bP11i0rD5fzPm/0A6brrIsllenZs0lCJlU4abakR59enZKrKe3BZihbTxlyZ2zl1+g0wvgmA166/bhwDrcn/7Ddz0eWZuJvfSESug6NzZsox3Z04FIxz0mUjMwVOOVTq1CQ0AhdbBGVdjG/CgsfUX7esJl3K/7ytWHRv683praW/8iDOCqWLLhpljDY1ZpzK75QiaZoOTpLKl60auHS/97oBXrv+umU9+FL+5+NtLFgjqVLCdbmj7pY5zPCPLOHNCwXGOcLquOhi8CmCWvbcuO73XmMUPab+ug3A6/A/78Bwe0bcS2+tgHn4J5pyS2WbOck0F51Vq3LcjhLvZ67p1ABbaL2H67bg78BfjKi/jr3+T/ABV3ilLmNXTI2SpvxWBtt6/Z//D0z/FXaGbSBgylzlsEGp+5//xrd4/ae4d8DUUjlslfIYS3t06HZpvfQtvv0N7AHWqtjP2pW08QD/FLy//da38vo8PNlKHf5y37Dxdfe/oj4kVIgFq3koLReSR76W/bx//n9k8jonZxzWTANVwEniDsg87sOSd/z7//PvMp3jQiptGVWFX2caezzAXwfgtzYUvbr0iozs32c3Uge7varH+CNE6cvEYmzbPZ9hMaYDdjK4V2iecf6EcEbdUDVUARda2KzO/JtCuDbNQB/iTeL0EG1JSO1jbXS+nLxtPMDPw1fh5+EPrgSEKE/8Gry5A73ui87AmxwdatyMEBCPNOCSKUeRZ2P6Myb5MRvgCHmA9ywsMifU+AYXcB6Xa5GibUC5TSyerxyh0j6QgLVpdyhfArRTTLqQjwe4HOD9s92D4Ap54odXAPBWLAwB02igG5Kkc+piN4lvODIFGAZgT+EO4Si1s7fjSR7vcQETUkRm9O+MXyo9OYhfe4xt9STQ2pcZRLayCV90b4D3jR0DYAfyxJ+eywg2IL7NTMXna7S/RpQ63JhWEM8U41ZyQGjwsVS0QBrEKLu8xwZsbi4wLcCT+OGidPIOCe1PiSc9Qt+go+vYqB7cG+B9d8cAD+WJPz0Am2gxXgU9IneOqDpAAXOsOltVuMzpdakJXrdPCzXiNVUpCeOos5cxnpQT39G+XVLhs1osQVvJKPZyNq8HDwd4d7pNDuWJPxVX7MSzqUDU6gfadKiNlUFTzLeFHHDlzO4kpa7aiKhBPGKwOqxsBAmYkOIpipyXcQSPlRTf+Tii0U3EJGaZsDER2qoB3h2hu0qe+NNwUooYU8y5mILbJe6OuX+2FTKy7bieTDAemaQyQ0CPthljSWO+xmFDIYiESjM5xKd6Ik5lvLq5GrQ3aCMLvmCA9wowLuWJb9xF59hVVP6O0CrBi3ZjZSNOvRy+I6klNVRJYRBaEzdN+imiUXQ8iVF8fsp+W4JXw7WISW7fDh7lptWkCwZ4d7QTXyBPfJMYK7SijjFppGnlIVJBJBYj7eUwtiP1IBXGI1XCsjNpbjENVpSAJ2hq2LTywEly3hUYazt31J8w2+aiLx3g3fohXixPfOMYm6zCGs9LVo9MoW3MCJE7R5u/WsOIjrqBoHUO0bJE9vxBpbhsd3+Nb4/vtPCZ4oZYCitNeYuC/8UDvDvy0qvkiW/cgqNqRyzqSZa/s0mqNGjtKOoTm14zZpUauiQgVfqtQiZjq7Q27JNaSK5ExRcrGCXO1FJYh6jR6CFqK7bZdQZ4t8g0rSlPfP1RdBtqaa9diqtzJkQ9duSryi2brQXbxDwbRUpFMBHjRj8+Nt7GDKgvph9okW7LX47gu0SpGnnFQ1S1lYldOsC7hYteR574ZuKs7Ei1lBsfdz7IZoxzzCVmmVqaSySzQbBVAWDek+N4jh9E/4VqZrJjPwiv9BC1XcvOWgO8275CVyBPvAtTVlDJfZkaZGU7NpqBogAj/xEHkeAuJihWYCxGN6e8+9JtSegFXF1TrhhLGP1fak3pebgPz192/8gB4d/6WT7+GdYnpH7hH/DJzzFiYPn/vjW0SgNpTNuPIZoAEZv8tlGw4+RLxy+ZjnKa5NdFoC7UaW0aduoYse6+bXg1DLg6UfRYwmhGEjqPvF75U558SANrElK/+MdpXvmqBpaXOa/MTZaa1DOcSiLaw9j0NNNst3c+63c7EKTpkvKHzu6bPbP0RkuHAVcbRY8ijP46MIbQeeT1mhA+5PV/inyDdQipf8LTvMXbwvoDy7IruDNVZKTfV4CTSRUYdybUCnGU7KUTDxLgCknqUm5aAW6/1p6eMsOYsphLzsHrE0Y/P5bQedx1F/4yPHnMB3/IOoTU9+BL8PhtjuFKBpZXnYNJxTuv+2XqolKR2UQgHhS5novuxVySJhBNRF3SoKK1XZbbXjVwWNyOjlqWJjrWJIy+P5bQedyldNScP+HZ61xKSK3jyrz+NiHG1hcOLL/+P+PDF2gOkekKGiNWKgJ+8Z/x8Iv4DdQHzcpZyF4v19I27w9/yPGDFQvmEpKtqv/TLiWMfn4sofMm9eAH8Ao0zzh7h4sJqYtxZd5/D7hkYPneDzl5idlzNHcIB0jVlQ+8ULzw/nc5/ojzl2juE0apD7LRnJxe04dMz2iOCFNtGFpTuXA5AhcTRo8mdN4kz30nVjEC4YTZQy4gpC7GlTlrePKhGsKKgeXpCYeO0MAd/GH7yKQUlXPLOasOH3FnSphjHuDvEu4gB8g66oNbtr6eMbFIA4fIBJkgayoXriw2XEDQPJrQeROAlY6aeYOcMf+IVYTU3XFlZufMHinGywaW3YLpObVBAsbjF4QJMsVUSayjk4voPsHJOQfPWDhCgDnmDl6XIRerD24HsGtw86RMHOLvVSHrKBdeVE26gKB5NKHzaIwLOmrqBWJYZDLhASG16c0Tn+CdRhWDgWXnqRZUTnPIHuMJTfLVpkoYy5CzylHVTGZMTwkGAo2HBlkQplrJX6U+uF1wZz2uwS1SQ12IqWaPuO4baZaEFBdukksJmkcTOm+YJSvoqPFzxFA/YUhIvWxcmSdPWTWwbAKVp6rxTtPFUZfKIwpzm4IoMfaYQLWgmlG5FME2gdBgm+J7J+rtS/XBbaVLsR7bpPQnpMFlo2doWaVceHk9+MkyguZNCJ1He+kuHTWyQAzNM5YSUg/GlTk9ZunAsg1qELVOhUSAK0LABIJHLKbqaEbHZLL1VA3VgqoiOKXYiS+HRyaEKgsfIqX64HYWbLRXy/qWoylIV9gudL1OWBNgBgTNmxA6b4txDT4gi3Ri7xFSLxtXpmmYnzAcWDZgY8d503LFogz5sbonDgkKcxGsWsE1OI+rcQtlgBBCSOKD1mtqYpIU8cTvBmAT0yZe+zUzeY92fYjTtGipXLhuR0ePoHk0ofNWBX+lo8Z7pAZDk8mEw5L7dVyZZoE/pTewbI6SNbiAL5xeygW4xPRuLCGbhcO4RIeTMFYHEJkYyEO9HmJfXMDEj/LaH781wHHZEtqSQ/69UnGpzH7LKIAZEDSPJnTesJTUa+rwTepI9dLJEawYV+ZkRn9g+QirD8vF8Mq0jFQ29js6kCS3E1+jZIhgPNanHdHFqFvPJLHqFwQqbIA4jhDxcNsOCCQLDomaL/dr5lyJaJU6FxPFjO3JOh3kVMcROo8u+C+jo05GjMF3P3/FuDLn5x2M04xXULPwaS6hBYki+MrMdZJSgPHlcB7nCR5bJ9Kr5ACUn9jk5kivdd8tk95SOGrtqu9lr2IhK65ZtEl7ZKrp7DrqwZfRUSN1el7+7NJxZbywOC8neNKTch5vsTEMNsoCCqHBCqIPRjIPkm0BjvFODGtto99rCl+d3wmHkW0FPdpZtC7MMcVtGFQjJLX5bdQ2+x9ypdc313uj8xlsrfuLgWXz1cRhZvJYX0iNVBRcVcmCXZs6aEf3RQF2WI/TcCbKmGU3IOoDJGDdDub0+hYckt6PlGu2BcxmhbTdj/klhccLGJMcqRjMJP1jW2ETqLSWJ/29MAoORluJ+6LPffBZbi5gqi5h6catQpmOT7/OFf5UorRpLzCqcMltBLhwd1are3kztrSzXO0LUbXRQcdLh/RdSZ+swRm819REDrtqzC4es6Gw4JCKlSnjYVpo0xeq33PrADbFLL3RuCmObVmPN+24kfa+AojDuM4umKe2QwCf6EN906HwjujaitDs5o0s1y+k3lgbT2W2i7FJdnwbLXhJUBq/9liTctSmFC/0OqUinb0QddTWamtjbHRFuWJJ6NpqZ8vO3fZJ37Db+2GkaPYLGHs7XTTdiFQJ68SkVJFVmY6McR5UycflNCsccHFaV9FNbR4NttLxw4pQ7wJd066Z0ohVbzihaxHVExd/ay04oxUKWt+AsdiQ9OUyZ2krzN19IZIwafSTFgIBnMV73ADj7V/K8u1MaY2sJp2HWm0f41tqwajEvdHWOJs510MaAqN4aoSiPCXtN2KSi46dUxHdaMquar82O1x5jqhDGvqmoE9LfxcY3zqA7/x3HA67r9ZG4O6Cuxu12/+TP+eLP+I+HErqDDCDVmBDO4larujNe7x8om2rMug0MX0rL1+IWwdwfR+p1TNTyNmVJ85ljWzbWuGv8/C7HD/izjkHNZNYlhZcUOKVzKFUxsxxN/kax+8zPWPSFKw80rJr9Tizyj3o1gEsdwgWGoxPezDdZ1TSENE1dLdNvuKL+I84nxKesZgxXVA1VA1OcL49dFlpFV5yJMhzyCmNQ+a4BqusPJ2bB+xo8V9u3x48VVIEPS/mc3DvAbXyoYr6VgDfh5do5hhHOCXMqBZUPhWYbWZECwVJljLgMUWOCB4MUuMaxGNUQDVI50TQ+S3kFgIcu2qKkNSHVoM0SHsgoZxP2d5HH8B9woOk4x5bPkKtAHucZsdykjxuIpbUrSILgrT8G7G5oCW+K0990o7E3T6AdW4TilH5kDjds+H64kS0mz24grtwlzDHBJqI8YJQExotPvoC4JBq0lEjjQkyBZ8oH2LnRsQ4Hu1QsgDTJbO8fQDnllitkxuVskoiKbRF9VwzMDvxHAdwB7mD9yCplhHFEyUWHx3WtwCbSMMTCUCcEmSGlg4gTXkHpZXWQ7kpznK3EmCHiXInqndkQjunG5kxTKEeGye7jWz9cyMR2mGiFQ15ENRBTbCp+Gh86vAyASdgmJq2MC6hoADQ3GosP0QHbnMHjyBQvQqfhy/BUbeHd5WY/G/9LK/8Ka8Jd7UFeNWEZvzPb458Dn8DGLOe3/wGL/4xP+HXlRt+M1PE2iLhR8t+lfgxsuh7AfO2AOf+owWhSZRYQbd622hbpKWKuU+XuvNzP0OseRDa+mObgDHJUSc/pKx31QdKffQ5OIJpt8GWjlgTwMc/w5MPCR/yl1XC2a2Yut54SvOtMev55Of45BOat9aWG27p2ZVORRvnEk1hqWMVUmqa7S2YtvlIpspuF1pt0syuZS2NV14mUidCSfzQzg+KqvIYCMljIx2YK2AO34fX4GWdu5xcIAb8MzTw+j/lyWM+Dw/gjs4GD6ehNgA48kX/AI7XXM/XAN4WHr+9ntywqoCakCqmKP0rmQrJJEErG2Upg1JObr01lKQy4jskWalKYfJ/EDLMpjNSHFEUAde2fltaDgmrNaWQ9+AAb8I5vKjz3L1n1LriB/BXkG/wwR9y/oRX4LlioHA4LzP2inzRx/DWmutRweFjeP3tNeSGlaE1Fde0OS11yOpmbIp2u/jF1n2RRZviJM0yBT3IZl2HWImKjQOxIyeU325b/qWyU9Moj1o07tS0G7qJDoGHg5m8yeCxMoEH8GU45tnrNM84D2l297DQ9t1YP7jki/7RmutRweEA77/HWXOh3HCxkRgldDQkAjNTMl2Iloc1qN5JfJeeTlyTRzxURTdn1Ixv2uKjs12AbdEWlBtmVdk2k7FFwj07PCZ9XAwW3dG+8xKzNFr4EnwBZpy9Qzhh3jDXebBpYcpuo4fQ44u+fD1dweEnHzI7v0xuuOALRUV8rXpFyfSTQYkhd7IHm07jpyhlkCmI0ALYqPTpUxXS+z4jgDj1Pflvmz5ecuItpIBxyTHpSTGWd9g1ApfD/bvwUhL4nT1EzqgX7cxfCcNmb3mPL/qi9SwTHJ49oj5ZLjccbTG3pRmlYi6JCG0mQrAt1+i2UXTZ2dv9IlQpN5naMYtviaXlTrFpoMsl3bOAFEa8sqPj2WCMrx3Yjx99qFwO59Aw/wgx+HlqNz8oZvA3exRDvuhL1jMQHPaOJ0+XyA3fp1OfM3qObEVdhxjvynxNMXQV4+GJyvOEFqeQBaIbbO7i63rpxCltdZShPFxkjM2FPVkn3TG+Rp9pO3l2RzFegGfxGDHIAh8SteR0C4HopXzRF61nheDw6TFN05Ebvq8M3VKKpGjjO6r7nhudTEGMtYM92HTDaR1FDMXJ1eThsbKfywyoWwrzRSXkc51flG3vIid62h29bIcFbTGhfV+faaB+ohj7dPN0C2e2lC96+XouFByen9AsunLDJZ9z7NExiUc0OuoYW6UZkIyx2YUR2z6/TiRjyKMx5GbbjLHvHuf7YmtKghf34LJfx63Yg8vrvN2zC7lY0x0tvKezo4HmGYDU+Gab6dFL+KI761lDcNifcjLrrr9LWZJctG1FfU1uwhoQE22ObjdfkSzY63CbU5hzs21WeTddH2BaL11Gi7lVdlxP1nkxqhnKhVY6knS3EPgVGg1JpN5cP/hivujOelhXcPj8HC/LyI6MkteVjlolBdMmF3a3DbsuAYhL44dxzthWSN065xxUd55Lmf0wRbOYOqH09/o9WbO2VtFdaMb4qBgtFJoT1SqoN8wPXMoXLb3p1PUEhxfnnLzGzBI0Ku7FxrKsNJj/8bn/H8fPIVOd3rfrklUB/DOeO+nkghgSPzrlPxluCMtOnDL4Yml6dK1r3vsgMxgtPOrMFUZbEUbTdIzii5beq72G4PD0DKnwjmBULUVFmy8t+k7fZ3pKc0Q4UC6jpVRqS9Umv8bxw35flZVOU1X7qkjnhZlsMbk24qQ6Hz7QcuL6sDC0iHHki96Uh2UdvmgZnjIvExy2TeJdMDZNSbdZyAHe/Yd1xsQhHiKzjh7GxQ4yqMPaywPkjMamvqrYpmO7Knad+ZQC5msCuAPWUoxrxVhrGv7a+KLXFhyONdTMrZ7ke23qiO40ZJUyzgYyX5XyL0mV7NiUzEs9mjtbMN0dERqwyAJpigad0B3/zRV7s4PIfXSu6YV/MK7+OrYe/JvfGMn/PHJe2fyUdtnFrKRNpXV0Y2559aWPt/G4BlvjTMtXlVIWCnNyA3YQBDmYIodFz41PvXPSa6rq9lWZawZ4dP115HXV/M/tnFkkrBOdzg6aP4pID+MZnTJ1SuuB6iZlyiox4HT2y3YBtkUKWooacBQUDTpjwaDt5poBHl1/HXltwP887lKKXxNUEyPqpGTyA699UqY/lt9yGdlUKra0fFWS+36iylVWrAyd7Uw0CZM0z7xKTOduznLIjG2Hx8cDPLb+OvK6Bv7n1DYci4CxUuRxrjBc0bb4vD3rN5Zz36ntLb83eVJIB8LiIzCmn6SMPjlX+yNlTjvIGjs+QzHPf60Aj62/jrzG8j9vYMFtm1VoRWCJdmw7z9N0t+c8cxZpPeK4aTRicS25QhrVtUp7U578chk4q04Wx4YoQSjFryUlpcQ1AbxZ/XVMknIU//OGl7Q6z9Zpxi0+3yFhSkjUDpnCIUhLWVX23KQ+L9vKvFKI0ZWFQgkDLvBoylrHNVmaw10zwCPrr5tlodfnf94EWnQ0lFRWy8pW9LbkLsyUVDc2NSTHGDtnD1uMtchjbCeb1mpxFP0YbcClhzdLu6lfO8Bj6q+bdT2sz/+8SZCV7VIxtt0DUn9L7r4cLYWDSXnseEpOGFuty0qbOVlS7NNzs5FOGJUqQpl2Q64/yBpZf90sxbE+//PGdZ02HSipCbmD6NItmQ4Lk5XUrGpDMkhbMm2ZVheNYV+VbUWTcv99+2NyX1VoafSuC+AN6q9bFIMv5X/eagNWXZxEa9JjlMwNWb00akGUkSoepp1/yRuuqHGbUn3UdBSTxBU6SEVklzWRUkPndVvw2PrrpjvxOvzPmwHc0hpmq82npi7GRro8dXp0KXnUQmhZbRL7NEVp1uuZmO45vuzKsHrktS3GLWXODVjw+vXXLYx4Hf7njRPd0i3aoAGX6W29GnaV5YdyDj9TFkakje7GHYzDoObfddHtOSpoi2SmzJHrB3hM/XUDDEbxP2/oosszcRlehWXUvzHv4TpBVktHqwenFo8uLVmy4DKLa5d3RtLrmrM3aMFr1183E4sewf+85VWeg1c5ag276NZrM9IJVNcmLEvDNaV62aq+14IAOGFsBt973Ra8Xv11YzXwNfmft7Jg2oS+XOyoC8/cwzi66Dhmgk38kUmP1CUiYWOX1bpD2zWXt2FCp7uq8703APAa9dfNdscR/M/bZLIyouVxqJfeWvG9Je+JVckHQ9+CI9NWxz+blX/KYYvO5n2tAP/vrlZ7+8/h9y+9qeB/Hnt967e5mevX10rALDWK//FaAT5MXdBXdP0C/BAes792c40H+AiAp1e1oH8HgH94g/Lttx1gp63op1eyoM/Bvw5/G/7xFbqJPcCXnmBiwDPb/YKO4FX4OjyCb289db2/Noqicw4i7N6TVtoz8tNwDH+8x/i6Ae7lmaQVENzJFb3Di/BFeAwz+Is9SjeQySpPqbLFlNmyz47z5a/AF+AYFvDmHqibSXTEzoT4Gc3OALaqAP4KPFUJ6n+1x+rGAM6Zd78bgJ0a8QN4GU614vxwD9e1Amy6CcskNrczLx1JIp6HE5UZD/DBHrFr2oNlgG4Odv226BodoryjGJ9q2T/AR3vQrsOCS0ctXZi3ruLlhpFDJYl4HmYtjQCP9rhdn4suySLKDt6wLcC52h8xPlcjju1fn+yhuw4LZsAGUuo2b4Fx2UwQu77uqRHXGtg92aN3tQCbFexc0uk93vhTXbct6y7MulLycoUljx8ngDMBg1tvJjAazpEmOtxlzclvj1vQf1Tx7QlPDpGpqgtdSKz/d9/hdy1vTfFHSmC9dGDZbLiezz7Ac801HirGZsWjydfZyPvHXL/Y8Mjzg8BxTZiuwKz4Eb8sBE9zznszmjvFwHKPIWUnwhqfVRcd4Ck0K6ate48m1oOfrX3/yOtvAsJ8zsPAM89sjnddmuLuDPjX9Bu/L7x7xpMzFk6nWtyQfPg278Gn4Aekz2ZgOmU9eJ37R14vwE/BL8G3aibCiWMWWDQ0ZtkPMnlcGeAu/Ag+8ZyecU5BPuy2ILD+sQqyZhAKmn7XZd+jIMTN9eBL7x95xVLSX4On8EcNlXDqmBlqS13jG4LpmGbkF/0CnOi3H8ETOIXzmnmtb0a16Tzxj1sUvQCBiXZGDtmB3KAefPH94xcUa/6vwRn80GOFyjEXFpba4A1e8KQfFF+259tx5XS4egYn8fQsLGrqGrHbztr+uByTahWuL1NUGbDpsnrwBfePPwHHIf9X4RnM4Z2ABWdxUBlqQ2PwhuDxoS0vvqB1JzS0P4h2nA/QgTrsJFn+Y3AOjs9JFC07CGWX1oNX3T/yHOzgDjwPn1PM3g9Jk9lZrMEpxnlPmBbjyo2+KFXRU52TJM/2ALcY57RUzjObbjqxVw++4P6RAOf58pcVsw9Daje3htriYrpDOonre3CudSe6bfkTEgHBHuDiyu5MCsc7BHhYDx7ePxLjqigXZsw+ijMHFhuwBmtoTPtOxOrTvYJDnC75dnUbhfwu/ZW9AgYd+peL68HD+0emKquiXHhWjJg/UrkJYzuiaL3E9aI/ytrCvAd4GcYZMCkSQxfUg3v3j8c4e90j5ZTPdvmJJGHnOCI2nHS8081X013pHuBlV1gB2MX1YNmWLHqqGN/TWmG0y6clJWthxNUl48q38Bi8vtMKyzzpFdSDhxZ5WBA5ZLt8Jv3895DduBlgbPYAj8C4B8hO68FDkoh5lydC4FiWvBOVqjYdqjiLv92t8yPDjrDaiHdUD15qkSURSGmXJwOMSxWAXYwr3zaAufJ66l+94vv3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/wHuD9tQd4f+0B3l97gPfXHuD9tQd4f+0B3l97gG8LwP8G/AL8O/A5OCq0Ys2KIdv/qOIXG/4mvFAMF16gZD+2Xvu/B8as5+8bfllWyg0zaNO5bfXj6vfhhwD86/Aq3NfRS9t9WPnhfnvCIw/CT8GLcFTMnpntdF/z9V+PWc/vWoIH+FL3Znv57PitcdGP4R/C34avw5fgRVUInCwbsn1yyA8C8zm/BH8NXoXnVE6wVPjdeCI38kX/3+Ct9dbz1pTmHFRu+Hm4O9Ch3clr99negxfwj+ER/DR8EV6B5+DuQOnTgUw5rnkY+FbNU3gNXh0o/JYTuWOvyBf9FvzX663HH/HejO8LwAl8Hl5YLTd8q7sqA3wbjuExfAFegQdwfyDoSkWY8swzEf6o4Qyewefg+cHNbqMQruSL/u/WWc+E5g7vnnEXgDmcDeSGb/F4cBcCgT+GGRzDU3hZYburAt9TEtHgbM6JoxJ+6NMzzTcf6c2bycv2+KK/f+l6LBzw5IwfqZJhA3M472pWT/ajKxnjv4AFnMEpnBTPND6s2J7qHbPAqcMK74T2mZ4VGB9uJA465It+/eL1WKhYOD7xHOkr1ajK7d0C4+ke4Hy9qXZwpgLr+Znm/uNFw8xQOSy8H9IzjUrd9+BIfenYaylf9FsXr8fBAadnPIEDna8IBcwlxnuA0/Wv6GAWPd7dDIKjMdSWueAsBj4M7TOd06qBbwDwKr7oleuxMOEcTuEZTHWvDYUO7aHqAe0Bbq+HEFRzOz7WVoTDQkVds7A4sIIxfCQdCefFRoIOF/NFL1mPab/nvOakSL/Q1aFtNpUb/nFOVX6gzyg/1nISyDfUhsokIzaBR9Kxm80s5mK+6P56il1jXic7nhQxsxSm3OwBHl4fFdLqi64nDQZvqE2at7cWAp/IVvrN6/BFL1mPhYrGMBfOi4PyjuSGf6wBBh7p/FZTghCNWGgMzlBbrNJoPJX2mW5mwZfyRffXo7OFi5pZcS4qZUrlViptrXtw+GQoyhDPS+ANjcGBNRiLCQDPZPMHuiZfdFpPSTcQwwKYdRNqpkjm7AFeeT0pJzALgo7g8YYGrMHS0iocy+YTm2vyRUvvpXCIpQ5pe666TJrcygnScUf/p0NDs/iAI/nqDHC8TmQT8x3NF91l76oDdQGwu61Z6E0ABv7uO1dbf/37Zlv+Zw/Pbh8f1s4Avur6657/+YYBvur6657/+YYBvur6657/+YYBvur6657/+aYBvuL6657/+VMA8FXWX/f8zzcN8BXXX/f8zzcNMFdbf93zP38KLPiK6697/uebtuArrr/u+Z9vGmCusP6653/+1FjwVdZf9/zPN7oHX339dc//fNMu+irrr3v+50+Bi+Zq6697/uebA/jz8Pudf9ht/fWv517J/XUzAP8C/BAeX9WCDrUpZ3/dEMBxgPcfbtTVvsYV5Yn32u03B3Ac4P3b8I+vxNBKeeL9dRMAlwO83959qGO78sT769oB7g3w/vGVYFzKE++v6wV4OMD7F7tckFkmT7y/rhHgpQO8b+4Y46XyxPvrugBeNcB7BRiX8sT767oAvmCA9woAHsoT76+rBJjLBnh3txOvkifeX1dswZcO8G6N7sXyxPvr6i340gHe3TnqVfLE++uKAb50gHcXLnrX8sR7gNdPRqwzwLu7Y/FO5Yn3AK9jXCMGeHdgxDuVJ75VAI8ljP7PAb3/RfjcZfePHBB+79dpfpH1CanN30d+mT1h9GqAxxJGM5LQeeQ1+Tb+EQJrElLb38VHQ94TRq900aMIo8cSOo+8Dp8QfsB8zpqE1NO3OI9Zrj1h9EV78PqE0WMJnUdeU6E+Jjyk/hbrEFIfeWbvId8H9oTRFwdZaxJGvziW0Hn0gqYB/wyZ0PwRlxJST+BOw9m77Amj14ii1yGM/txYQudN0qDzGe4EqfA/5GJCagsHcPaEPWH0esekSwmjRxM6b5JEcZ4ww50ilvAOFxBSx4yLW+A/YU8YvfY5+ALC6NGEzhtmyZoFZoarwBLeZxUhtY4rc3bKnjB6TKJjFUHzJoTOozF2YBpsjcyxDgzhQ1YRUse8+J4wenwmaylB82hC5w0zoRXUNXaRBmSMQUqiWSWkLsaVqc/ZE0aPTFUuJWgeTei8SfLZQeMxNaZSIzbII4aE1Nmr13P2hNHjc9E9guYNCZ032YlNwESMLcZiLQHkE4aE1BFg0yAR4z1h9AiAGRA0jyZ03tyIxWMajMPWBIsxYJCnlITU5ShiHYdZ94TR4wCmSxg9jtB5KyPGYzymAYexWEMwAPIsAdYdV6aObmNPGD0aYLoEzaMJnTc0Ygs+YDw0GAtqxBjkuP38bMRWCHn73xNGjz75P73WenCEJnhwyVe3AEe8TtKdJcYhBl97wuhNAObK66lvD/9J9NS75v17wuitAN5fe4D31x7g/bUHeH/tAd5fe4D3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/w/toDvAd4f/24ABzZ8o+KLsSLS+Pv/TqTb3P4hKlQrTGh+fbIBT0Axqznnb+L/V2mb3HkN5Mb/nEHeK7d4IcDld6lmDW/iH9E+AH1MdOw/Jlu2T1xNmY98sv4wHnD7D3uNHu54WUuOsBTbQuvBsPT/UfzNxGYzwkP8c+Yz3C+r/i6DcyRL/rZ+utRwWH5PmfvcvYEt9jLDS/bg0/B64DWKrQM8AL8FPwS9beQCe6EMKNZYJol37jBMy35otdaz0Bw2H/C2Smc7+WGB0HWDELBmOByA3r5QONo4V+DpzR/hFS4U8wMW1PXNB4TOqYz9urxRV++ntWCw/U59Ty9ebdWbrgfRS9AYKKN63ZokZVygr8GZ/gfIhZXIXPsAlNjPOLBby5c1eOLvmQ9lwkOy5x6QV1j5TYqpS05JtUgUHUp5toHGsVfn4NX4RnMCe+AxTpwmApTYxqMxwfCeJGjpXzRF61nbcHhUBPqWze9svwcHJ+S6NPscKrEjug78Dx8Lj3T8D4YxGIdxmJcwhi34fzZUr7olevZCw5vkOhoClq5zBPZAnygD/Tl9EzDh6kl3VhsHYcDEb+hCtJSvuiV69kLDm+WycrOTArHmB5/VYyP6jOVjwgGawk2zQOaTcc1L+aLXrKeveDwZqlKrw8U9Y1p66uK8dEzdYwBeUQAY7DbyYNezBfdWQ97weEtAKYQg2xJIkuveAT3dYeLGH+ShrWNwZgN0b2YL7qznr3g8JYAo5bQBziPjx7BPZ0d9RCQp4UZbnFdzBddor4XHN4KYMrB2qHFRIzzcLAHQZ5the5ovui94PCWAPefaYnxIdzRwdHCbuR4B+tbiy96Lzi8E4D7z7S0mEPd+eqO3cT53Z0Y8SV80XvB4Z0ADJi/f7X113f+7p7/+UYBvur6657/+YYBvur6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+VMA8FXWX/f8z58OgK+y/rrnf75RgLna+uue//lTA/CV1V/3/M837aKvvv6653++UQvmauuve/7nTwfAV1N/3fM/fzr24Cuuv+75nz8FFnxl9dc9//MOr/8/glixwRuUfM4AAAAASUVORK5CYII="},i$a.prototype.getSearchTexture=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII="};var q$8=[];function _$a(e){this._prepassRenderer=e._prepassRenderer;var t=i$b.createFXAAStage(e._scene.context),i=i$b.createAmbientOcclusionStage(),n=i$b.createBloomStage(),r=i$b.createOutlineStage(),o=i$b.createFogStage(),a=i$b.createRainStage(),s=i$b.createSnowStage(),l=i$b.createScreenSpaceReflectionStage(this._prepassRenderer);this._autoExposureEnabled=!1,this._autoExposure=i$b.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=M$8.ACES;var u=this._tonemapping;i.enabled=!1,n.enabled=!1,u.enabled=!1,o.enabled=!1,a.enabled=!1,s.enabled=!1,l.enabled=!1,t.enabled=!1;var c=new g$q(this),h={},d=q$8;for(d.push(t,i,n,u,r,o,s,a,l);d.length>0;){var f=d.pop();h[f.name]=f,f._textureCache=c;var p=f.length;if(e$2b(p))for(var _=0;_<p;++_)d.push(f.get(_))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;var m=this;i.uniforms.randomTexture=function(){return m._randomTexture},this._ao=i,this._bloom=n,this._fxaa=t,this._smaa=new i$a,this._smaa.enabled=!0,this._outline=r,this._fog=o,this._rain=a,this._snow=s,this._screenSpaceReflection=l,this._lastLength=void 0,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._smaaEnabled=void 0,this._ssrEnabled=void 0,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=h,this._textureCache=c}function U$7(e){if(e._stagesRemoved){e._stagesRemoved=!1;for(var t=[],i=e._stages,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._stages=t}}function y$9(e){for(;e$2b(e.length);)e=e.get(e.length-1);return e.outputTexture}function m$b(e,t,i,n,r){if(e$2b(e.execute))e.execute(t,i,n,r);else{var o,a=e.length;if(e.inputPreviousStageTexture)for(m$b(e.get(0),t,i,n,r),o=1;o<a;++o)m$b(e.get(o),t,y$9(e.get(o-1)),n,r);else for(o=0;o<a;++o)m$b(e.get(o),t,i,n,r)}}Object.defineProperties(_$a.prototype,{ready:{get:function(){for(var e=!1,t=this._stages,i=t.length-1;i>=0;--i){var n=t[i];e=e||n.ready&&n.enabled}var r=this._fxaa,o=this._smaa,a=this._ao,s=this._bloom,l=this._tonemapping,u=this._screenSpaceReflection;return e=(e=(e=(e=(e=(e=e||r.ready&&r.enabled)||o.ready&&o.enabled)||a.ready&&a.enabled)||s.ready&&s.enabled)||l.ready&&l.enabled)||u.ready&&u.enabled}},fxaa:{get:function(){return this._fxaa}},smaa:{get:function(){return this._smaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},outline:{get:function(){return this._outline}},rain:{get:function(){return this._rain}},snow:{get:function(){return this._snow}},screenSpaceReflection:{get:function(){return this._screenSpaceReflection}},fog:{get:function(){return this._fog}},length:{get:function(){return U$7(this),this._stages.length}},outputTexture:{get:function(){var e=this._smaa;if(e.enabled)return e.getSMAATexture();var t=this._fxaa;if(t.enabled&&t.ready)return this.getOutputTexture(t.name);for(var i=this._stages,n=i.length-1;n>=0;--n){var r=i[n];if(e$2b(r)&&r.ready&&r.enabled)return this.getOutputTexture(r.name)}var o=this._tonemapping;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);var a=this._screenSpaceReflection;if(a.screenSpaceReflection&&a.ready)return this.getOutputTexture(a.name);var s=this._bloom;if(s.enabled&&s.ready)return this.getOutputTexture(s.name);var l=this._ao;return l.enabled&&l.ready?this.getOutputTexture(l.name):void 0}},hasSelected:{get:function(){for(var e=l$R(this._stages);e.length>0;){var t=e.pop();if(e$2b(t)){if(e$2b(t.selected))return!0;var i=t.length;if(e$2b(i))for(var n=0;n<i;++n)e.push(t.get(n))}}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper!==e){if(!M$8.validate(e))throw new t$16("tonemapper was set to an invalid value.");e$2b(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());var t,i=this._autoExposureEnabled;switch(e){case M$8.REINHARD:t=i$b.createReinhardTonemappingStage(i);break;case M$8.MODIFIED_REINHARD:t=i$b.createModifiedReinhardTonemappingStage(i);break;case M$8.FILMIC:t=i$b.createFilmicTonemappingStage(i);break;default:t=i$b.createAcesTonemappingStage(i)}if(i){var n=this._autoExposure;t.uniforms.autoExposure=function(){return n.outputTexture}}this._tonemapper=e,this._tonemapping=t,e$2b(this._stageNames)&&(this._stageNames[t.name]=t,t._textureCache=this._textureCache),this._textureCacheDirty=!0}}}}),_$a.prototype.add=function(e){o$1q.typeOf.object("stage",e);var t=this._stageNames,i=q$8;for(i.push(e);i.length>0;){var n=i.pop();if(e$2b(t[n.name]))throw new t$16(n.name+" has already been added to the collection or does not have a unique name.");t[n.name]=n,n._textureCache=this._textureCache;var r=n.length;if(e$2b(r))for(var o=0;o<r;++o)i.push(n.get(o))}var a=this._stages;return e._index=a.length,a.push(e),this._textureCacheDirty=!0,e},_$a.prototype.remove=function(e){if(!this.contains(e))return!1;var t=this._stageNames,i=q$8;for(i.push(e);i.length>0;){var n=i.pop();delete t[n.name];var r=n.length;if(e$2b(r))for(var o=0;o<r;++o)i.push(n.get(o))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0},_$a.prototype.contains=function(e){return e$2b(e)&&e$2b(e._index)&&e._textureCache===this._textureCache},_$a.prototype.get=function(e){U$7(this);var t=this._stages,i=t.length;return o$1q.typeOf.number.greaterThanOrEquals("stages length",i,0),o$1q.typeOf.number.greaterThanOrEquals("index",e,0),o$1q.typeOf.number.lessThan("index",e,i),t[e]},_$a.prototype.removeAll=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)this.remove(e[i]);e.length=0},_$a.prototype.getStageByName=function(e){return this._stageNames[e]},new e$1U,new e$1U,_$a.prototype.update=function(e,t,i,n){U$7(this);var r=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=r;var a,s,l=this._stages,u=o.length=l.length,c=0;for(a=0;a<u;++a)(s=l[a]).ready&&s.enabled&&s._isSupported(e)&&(o[c++]=s);o.length=c;var h=c!==r.length;if(!h)for(a=0;a<c;++a)if(o[a]!==r[a]){h=!0;break}var d=this._ao,f=this._bloom,p=this._autoExposure,_=this._tonemapping,m=this._fxaa,g=this._smaa,x=this._outline,v=this._fog,y=this._rain,$=this._snow,b=this._screenSpaceReflection;_.enabled=i;var T=d.enabled&&d._isSupported(e),C=f.enabled&&f._isSupported(e),S=_.enabled&&_._isSupported(e),w=m.enabled&&m._isSupported(e),E=g.enabled,P=v.enabled,A=y.enabled,L=$.enabled,M=x.enabled,R=b.enabled;if((h||this._textureCacheDirty||c!==this._lastLength||T!==this._aoEnabled||P!==this._fogEnabled||A!==this._rainEnabled||L!==this._snowEnabled||C!==this._bloomEnabled||S!==this._tonemappingEnabled||w!==this._fxaaEnabled||E!==this._smaaEnabled||R!==this._ssrEnabled)&&(this._textureCache.updateDependencies(),this._lastLength=c,this._aoEnabled=T,this._fogEnabled=P,this._rainEnabled=A,this._snowEnabled=L,this._bloomEnabled=C,this._tonemappingEnabled=S,this._fxaaEnabled=w,this._smaaEnabled=E,this._ssrEnabled=R,this._textureCacheDirty=!1),e$2b(this._randomTexture)&&!T&&(this._randomTexture.destroy(),this._randomTexture=void 0),M){var I=n._layers.getSelectedLayer();e$2b(I)&&(I._selectColorType===Zr$2.SILHOUETTE_EDGE?x.uniforms.visibleEdgeColor=e$1U.clone(I._selectedLineColor):x.uniforms.visibleEdgeColor=e$1U.WHITE)}if(!e$2b(this._randomTexture)&&T){u=196608;var O=new Uint8Array(u);for(a=0;a<u;a+=3)O[a]=Math.floor(255*Math.random());this._randomTexture=new t$V({context:e,pixelFormat:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE,source:{arrayBufferView:O,width:256,height:256},sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})}for(this._textureCache.update(e),m.update(e,t),g.update(e,t),d.update(e,t),f.update(e,t),_.update(e,t),x.update(e,t),v.update(e,t),y.update(e,t),$.update(e,t),b.update(e,t),this._autoExposureEnabled&&p.update(e,t),u=l.length,a=0;a<u;++a)l[a].update(e,t)},_$a.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)},_$a.prototype.getOutputTexture=function(e){var t=this.getStageByName(e);if(e$2b(t))return y$9(t)},_$a.prototype.execute=function(e,t,i,n){var r=this._activeStages,o=r.length,a=this._fxaa,s=this._smaa,l=this._ao,u=this._bloom,c=this._autoExposure,h=this._tonemapping,d=this._outline,f=this.compositor,p=this._fog,_=this._rain,m=this._snow,g=this._screenSpaceReflection,x=l.enabled&&l._isSupported(e),v=u.enabled&&u._isSupported(e),y=this._autoExposureEnabled,$=h.enabled&&h._isSupported(e),b=a.enabled&&a._isSupported(e),T=s.enabled,C=d.enabled,S=p.enabled,w=_.enabled,E=m.enabled,P=g.enabled;if(S||w||E||P||C||T||b||x||v||$||0!==o){var A=t;C&&d.ready&&e$2b(e.uniformState.maskTexture)&&(m$b(d,e,A,i,n),A=y$9(d)),e$2b(f)&&f.isEnable()&&(f.copy(e,A),f.execute(e,f.outputFbo),A=f.outputFbo.getColorTexture(0)),x&&l.ready&&(m$b(l,e,A,i,n),A=y$9(l)),v&&u.ready&&(m$b(u,e,A,i,n),A=y$9(u)),y&&c.ready&&m$b(c,e,A,i,n),$&&h.ready&&(m$b(h,e,A,i,n),A=y$9(h));var L=A;if(o>0){m$b(r[0],e,A,i,n);for(var M=1;M<o;++M)m$b(r[M],e,y$9(r[M-1]),i,n);L=y$9(r[o-1])}S&&(m$b(p,e,L,i,n),L=y$9(p)),P&&g.ready&&(m$b(g,e,L,i,n),L=y$9(g)),E&&(m$b(m,e,L,i,n),L=y$9(m)),w&&(m$b(_,e,L,i,n),L=y$9(_)),b&&a.ready&&m$b(a,e,L,i,n),T&&(s.setInputTexture(L),s.execute(e))}};var S$4=new f$18;function v$9(e){this._url=e,this._rgbeLoader=new U$h,this._sourceData=void 0,this._loading=!1,this._width=1,this._height=1,this._inputTexture=void 0,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._outputTexture=void 0,this._pingPongTexture=void 0,this._ready=!1}_$a.prototype.copy=function(e,t,i){if(e.webgpu?(S$4.x=0,S$4.y=0,S$4.width=e.drawingBufferWidth,S$4.height=e.drawingBufferHeight):(S$4.x=0,S$4.y=0,S$4.width=e.realDrawingBufferWidth,S$4.height=e.realDrawingBufferHeight,S$4.x+=-e._curCol/e._cols*e.realDrawingBufferWidth,S$4.y+=-(e._rows-e._curRow-1)/e._rows*e.realDrawingBufferHeight),!e$2b(this._copyColorCommand)){var n,r=this;i&&!e.webgpu&&e.fragmentDepth&&e.depthTexture&&!e.webglOptions.preserveDrawingBuffer?n=new s$U({sources:[n=["#extension GL_EXT_frag_depth : enable","#extension GL_OES_standard_derivatives : enable","uniform sampler2D colorTexture;","varying vec2 v_textureCoordinates;","void main()","{","float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));","gl_FragDepthEXT = logDepthOrDepth;","gl_FragColor = texture2D(colorTexture, v_textureCoordinates);","}"].join("\n")],defines:i?["LOG_DEPTH"]:[]}):n=ie$6,this._copyColorCommand=e.createViewportQuadCommand(n,{shaderProgramName:"postPorcessCopyColor",uniformMap:{colorTexture:function(){return r.outputTexture}},owner:this})}var o=d$1m.fromCache({viewport:S$4,depthTest:{enabled:!e.webglOptions.preserveDrawingBuffer&&!e.webgpu}});this._copyColorCommand.renderState=o,this._copyColorCommand.framebuffer=t,(e.fragmentDepth&&e$2b(e.uniformState.globeDepthTexture)||!e.fragmentDepth||!e.depthTexture)&&this._copyColorCommand.execute(e)},_$a.prototype.isDestroyed=function(){return!1},_$a.prototype.destroy=function(){return this._fxaa.destroy(),this._smaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),i$10(this)},Object.defineProperties(v$9.prototype,{ready:{get:function(){return this._ready}},texture:{get:function(){return this._outputTexture}}});const Y$3="\n precision mediump float;\n precision mediump int;\n\n attribute vec4 position;\n attribute vec2 uv;\n attribute float faceIndex;\n\n varying vec3 vOutputDirection;\n\n // RH coordinate system; PMREM face-indexing convention\n vec3 getDirection( vec2 uv, float face ) {\n\n uv = 2.0 * uv - 1.0;\n\n vec3 direction = vec3( uv, 1.0 );\n\n if ( face == 0.0 ) {\n\n direction = direction.zyx; // ( 1, v, u ) pos x\n\n } else if ( face == 1.0 ) {\n\n direction = direction.xzy;\n direction.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n } else if ( face == 2.0 ) {\n\n direction.x *= -1.0; // ( -u, v, 1 ) pos z\n\n } else if ( face == 3.0 ) {\n\n direction = direction.zyx;\n direction.xz *= -1.0; // ( -1, v, -u ) neg x\n\n } else if ( face == 4.0 ) {\n\n direction = direction.xzy;\n direction.xy *= -1.0; // ( -u, -1, v ) neg y\n\n } else if ( face == 5.0 ) {\n\n direction.z *= -1.0; // ( u, v, -1 ) neg z\n\n }\n\n return direction;\n\n }\n\n void main() {\n\n vOutputDirection = getDirection( uv, faceIndex );\n gl_Position = vec4( position.xyz, 1.0 );\n\n }\n",ie$2="\n precision mediump float;\n precision mediump int;\n\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n\n #define RECIPROCAL_PI 0.3183098861837907\n #define RECIPROCAL_PI2 0.15915494309189535\n\n vec2 equirectUv( in vec3 dir ) {\n\n // dir is assumed to be unit length\n \n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n \n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n \n return vec2( u, v );\n \n }\n\n void main() {\n\n vec3 outputDirection = normalize( vOutputDirection );\n vec2 uv = equirectUv( outputDirection );\n\n gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n }\n",oe$5="\n precision mediump float;\n precision mediump int;\n #extension GL_EXT_shader_texture_lod : enable\n #define ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\t#define n 20\n\t#define CUBEUV_TEXEL_WIDTH 0.0013020833333333333\n\t#define CUBEUV_TEXEL_HEIGHT 0.0009765625\n\t#define CUBEUV_MAX_MIP 8.0\n\t\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n uniform int samples;\n uniform float weights[ n ];\n uniform bool latitudinal;\n uniform float dTheta;\n uniform float mipInt;\n uniform vec3 poleAxis;\n\n float getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\t\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\t\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\n\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t}\n\n vec3 getSample( float theta, vec3 axis ) {\n\n float cosTheta = cos( theta );\n // Rodrigues' axis-angle rotation\n vec3 sampleDirection = vOutputDirection * cosTheta\n + cross( axis, vOutputDirection ) * sin( theta )\n + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n return bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n }\n\n void main() {\n\n vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n if ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n }\n\n axis = normalize( axis );\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n for ( int i = 1; i < n; i++ ) {\n\n if ( i >= samples ) {\n\n break;\n\n }\n\n float theta = dTheta * float( i );\n gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n }\n \n }\n",g$g=(1+Math.sqrt(5))/2,D$7=1/g$g,E$8=20,k$7=[new o$1p(1,1,1),new o$1p(-1,1,1),new o$1p(1,1,-1),new o$1p(-1,1,-1),new o$1p(0,g$g,D$7),new o$1p(0,g$g,-D$7),new o$1p(D$7,0,g$g),new o$1p(-D$7,0,g$g),new o$1p(g$g,D$7,0),new o$1p(-g$g,D$7,0)],A$b=4,J$3=[.125,.215,.35,.446,.526,.582];function ne$5(e,t){const i=[],n=[],r=[];let o=t;const a=t-A$b+1+J$3.length;for(let s=0;s<a;s++){const a=Math.pow(2,o);n.push(a);let l=1/a;s>t-A$b?l=J$3[s-t+A$b-1]:0===s&&(l=0),r.push(l);const u=1/(a-2),c=-u,h=1+u,d=[c,c,h,c,h,h,c,c,h,h,c,h],f=6,p=6,_=3,m=2,g=1,x=new Float32Array(_*p*f),v=new Float32Array(m*p*f),y=new Float32Array(g*p*f);for(let e=0;e<f;e++){const t=e%3*2/3-1,i=e>2?0:-1,n=[t,i,0,t+2/3,i,0,t+2/3,i+1,0,t,i,0,t+2/3,i+1,0,t,i+1,0];x.set(n,_*p*e),v.set(d,m*p*e);const r=[e,e,e,e,e,e];y.set(r,g*p*e)}const $=t$Y.createVertexBuffer({context:e,typedArray:x,usage:A$19.STATIC_DRAW}),b=t$Y.createVertexBuffer({context:e,typedArray:v,usage:A$19.STATIC_DRAW}),T=t$Y.createVertexBuffer({context:e,typedArray:y,usage:A$19.STATIC_DRAW}),C=new c$12({context:e,attributes:[{name:"position",index:0,vertexBuffer:$,componentsPerAttribute:3,componentDatatype:S$12.FLOAT},{name:"uv",index:1,vertexBuffer:b,componentsPerAttribute:2,componentDatatype:S$12.FLOAT},{name:"faceIndex",index:2,vertexBuffer:T,componentsPerAttribute:1,componentDatatype:S$12.FLOAT}]});i.push(C),o>A$b&&o--}return{lodPlanes:i,sizeLods:n,sigmas:r}}function re$4(e,t){const i=e.context,n=r$13.fromCache({context:i,vertexShaderSource:Y$3,fragmentShaderSource:ie$2,attributeLocations:{position:0,uv:1,faceIndex:2}}),r=t._lodPlanes[0],o={envMap:function(){return t._inputTexture}},a=new t$V({context:i,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,width:t._width,height:t._height}),s=new t$I({name:"Prefilter",vertexArray:r,shaderProgram:n,uniformMap:o,outputTexture:a,persists:!0,renderState:d$1m.fromCache({viewport:new f$18(0,0,3*t._cubeSize,2*t._cubeSize)}),owner:t});t._outputTexture=a,e.commandList.push(s)}v$9.prototype._halfBlur=function(e,t,i,n,r,o,a,s){const l=this._sizeLods[n]-1,u=isFinite(o)?Math.PI/(2*l):2*Math.PI/(2*E$8-1),c=o/u,h=isFinite(o)?1+Math.floor(3*c):E$8,d=[];let f=0;for(let e=0;e<E$8;++e){const t=e/c,i=Math.exp(-t*t/2);d.push(i),0===e?f+=i:e<h&&(f+=2*i)}for(let e=0;e<d.length;e++)d[e]=d[e]/f;const{_lodMax:p}=this,_=this._sizeLods[r],m=3*_*(r>p-A$b?r-p+A$b:0),g=4*(this._cubeSize-_),x=this._lodPlanes[r],v=this._blurSP,y={envMap:function(){return this.properties.envMap},samples:function(){return this.properties.samples},weights:function(){return this.properties.weights},latitudinal:function(){return this.properties.latitudinal},dTheta:function(){return this.properties.dTheta},mipInt:function(){return this.properties.mipInt},poleAxis:function(){return this.properties.poleAxis},properties:{envMap:null,samples:1,weights:new Float32Array(E$8),latitudinal:!1,dTheta:0,mipInt:0,poleAxis:new o$1p(0,1,0)}};y.properties.envMap=t,y.properties.samples=h,y.properties.weights=d,y.properties.latitudinal="latitudinal"===a,s&&(y.properties.poleAxis=s),y.properties.dTheta=u,y.properties.mipInt=p-n;const $=new t$I({name:"PrefilterHalfBlur",vertexArray:x,shaderProgram:v,uniformMap:y,outputTexture:i,persists:!0,renderState:d$1m.fromCache({viewport:new f$18(m,g,3*_,2*_)}),clear:!1,owner:this});e.commandList.push($)},v$9.prototype._blur=function(e,t,i,n,r,o){const a=this._pingPongTexture;this._halfBlur(e,t,a,i,n,r,"latitudinal",o),this._halfBlur(e,a,t,n,n,r,"longitudinal",o)},v$9.prototype.update=function(e){const t=e.context;e$2b(this._sourceData)||this._loading||(t$11.createIfNeeded(this._url).fetchArrayBuffer().then((e=>{this._sourceData=this._rgbeLoader.parse(e),this._loading=!1})).otherwise((e=>{this._loading=!1})),this._loading=!0);if(e$2b(this._sourceData)){if(!e$2b(this._inputTexture)){this._inputTexture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,flipY:!0,source:{arrayBufferView:this._sourceData.data,width:this._sourceData.width,height:this._sourceData.height}}),this._lodMax=Math.floor(Math.log2(this._inputTexture.width/4)),this._cubeSize=Math.pow(2,this._lodMax),this._width=3*Math.max(this._cubeSize,112),this._height=4*this._cubeSize;const{_lodMax:e}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=ne$5(t,e)),this._blurSP=r$13.fromCache({context:t,vertexShaderSource:Y$3,fragmentShaderSource:oe$5,attributeLocations:{position:0,uv:1,faceIndex:2}}),this._pingPongTexture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,width:this._width,height:this._height})}if(!this._ready){re$4(e,this);for(let t=1;t<this._lodPlanes.length;t++){const i=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),n=k$7[(t-1)%k$7.length];this._blur(e,this._outputTexture,t-1,t,i,n)}this._ready=!0}}},v$9.prototype.isDestroyed=function(){return!1},v$9.prototype.destroy=function(){return this._inputTexture=this._inputTexture&&this._inputTexture.destroy(),this._pingPongTexture=this._pingPongTexture&&this._pingPongTexture.destroy(),this._outputTexture=this._outputTexture&&this._outputTexture.destroy(),this._blurSP=this._blurSP&&this._blurSP.destroy(),i$10(this)};var d$f=2e4;function h$8(e){this._positionArray=e,this.type="PLANE",this.planeWidth=1,this.planeHeight=1,this._center=new o$1p,this.init(),this._volBounds=void 0}h$8.prototype.createVertices=function(e){var t=S$12.createTypedArray(S$12.FLOAT,12),i=0;return t[i++]=this._topPoint1.x-e.x,t[i++]=this._topPoint1.y-e.y,t[i++]=this._topPoint1.z-e.z,t[i++]=this._topPoint2.x-e.x,t[i++]=this._topPoint2.y-e.y,t[i++]=this._topPoint2.z-e.z,t[i++]=this._bottomPoint1.x-e.x,t[i++]=this._bottomPoint1.y-e.y,t[i++]=this._bottomPoint1.z-e.z,t[i++]=this._bottomPoint2.x-e.x,t[i++]=this._bottomPoint2.y-e.y,t[i++]=this._bottomPoint2.z-e.z,t},h$8.prototype.createTexCoords=function(){var e=S$12.createTypedArray(S$12.FLOAT,8);return e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=0,e[5]=1,e[6]=1,e[7]=1,e},h$8.prototype.createNormals=function(){return S$12.createTypedArray(S$12.FLOAT,12)},h$8.prototype.init=function(){this._topPoint1=this._positionArray[0],this._topPoint2=this._positionArray[1];var e=a$18.fromCartesian(this._positionArray[0]),t=a$18.fromCartesian(this._positionArray[1]),i=a$18.clone(e),n=a$18.clone(t);e.height+=.5*d$f,t.height+=.5*d$f,i.height-=d$f,n.height-=d$f,this._topPoint1=a$18.toCartesian(e),this._topPoint2=a$18.toCartesian(t),this._bottomPoint1=a$18.toCartesian(i),this._bottomPoint2=a$18.toCartesian(n),this.planeWidth=o$1p.distance(this._topPoint1,this._topPoint2),this.planeHeight=d$f;var r=[];r.push(this._topPoint1),r.push(this._topPoint2),r.push(this._bottomPoint1),r.push(this._bottomPoint2),this.boundingSphere=i$1c.fromPoints(r);var o=r.length,a=this;r.map((function(e){a._center.x+=e.x/o,a._center.y+=e.y/o,a._center.z+=e.z/o}));var s={};p$1d.fromRotationTranslation(p$1e.IDENTITY,this._center,s),this.modelMatrix=s},h$8.prototype.getVertexArray=function(e){var t=this.createVertices(this._center),i=t$Y.createVertexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW}),n=this.createNormals(this._center),r=t$Y.createVertexBuffer({context:e,typedArray:n,usage:A$19.STATIC_DRAW}),o=this.createTexCoords(),a=t$Y.createVertexBuffer({context:e,typedArray:o,usage:A$19.STATIC_DRAW}),s=[];if(s.push({name:"aPosition",index:0,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({name:"aNormal",index:1,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({name:"aTexCoord",index:2,vertexBuffer:a,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),e$2b(this._volBounds)){for(var l=S$12.createTypedArray(S$12.FLOAT,12),u=[this._topPoint1,this._topPoint2,this._bottomPoint1,this._bottomPoint2],c=0;c<4;c++){var h=a$18.fromCartesian(u[c]),d=e$2a.toDegrees(h.longitude),f=e$2a.toDegrees(h.latitude),p=h.height,_=(d-this._volBounds.left)/(this._volBounds.right-this._volBounds.left),m=(f-this._volBounds.bottom)/(this._volBounds.top-this._volBounds.bottom),g=(p-this._volBounds.minHeight)/(this._volBounds.maxHeight-this._volBounds.minHeight);l[3*c]=_,l[3*c+1]=m,l[3*c+2]=g}var x=t$Y.createVertexBuffer({context:e,typedArray:l,usage:A$19.STATIC_DRAW});s.push({index:3,vertexBuffer:x,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}var v=S$12.createTypedArray(S$12.UNSIGNED_SHORT,6);return v[0]=0,v[1]=1,v[2]=3,v[3]=0,v[4]=3,v[5]=2,new c$12({context:e,attributes:s,indexBuffer:t$Y.createIndexBuffer({context:e,typedArray:v,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})})},h$8.prototype.destroy=function(){return i$10(this)};var _0x27b395=(_0xddea8f=!0,function(e,t){var i=_0xddea8f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xddea8f=!1,i}),_0x203b9e=_0x27b395(void 0,(function(){return _0x203b9e.toString().search("(((.+)+)+)+$").toString().constructor(_0x203b9e).search("(((.+)+)+)+$")})),_0xddea8f;_0x203b9e();var V$6="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uClampIDTexture;\nuniform sampler2D uClampColorTexture;\nuniform sampler2D uModelTexture;\nuniform vec4 uModelTextureRect;\nuniform vec4 uModelColor;\nuniform vec3 uHasModelTextureAndPixelLength;\nuniform vec3 uModelTextureTiling;\nuniform vec4 uModelIDColor;\nuniform vec4 uProfilePickColor;\nuniform bool uPicking;\nuniform vec4 uHighLightColor;\nuniform float uUseOriModelTex;\nuniform float uClippingType;\nvarying vec2 v_texCoord;\nvarying float v_face;\n#ifdef Volume2\nvarying vec3 vecRotioCoord;\n#endif\nvoid main()\n{\nvec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\nvec4 idColor = texture2D(uClampIDTexture, texCoord) * 255.0;\nif((gl_FrontFacing && uClippingType < 1.5) || idColor.r != uModelIDColor.r || idColor.g != uModelIDColor.g || idColor.b != uModelIDColor.b)\n{\n discard;\n}\nif(uPicking){\n gl_FragColor = uProfilePickColor;\n return;\n}\nvec4 color = texture2D(uClampColorTexture, texCoord);\ntexCoord = mod(v_texCoord * uModelTextureTiling.xy, vec2(1.0));\n#ifdef GEOBOX\n if(v_face > -0.1 && v_face < 0.1)\n {\n texCoord = mod(v_texCoord * uModelTextureTiling.xy, vec2(1.0));\n }\n else if(v_face > 0.5)\n {\n texCoord = mod(v_texCoord * vec2(uModelTextureTiling.zy), vec2(1.0));\n }\n else if(v_face < -0.5)\n {\n texCoord = mod(v_texCoord * vec2(uModelTextureTiling.zx), vec2(1.0));\n }\n#endif\nvec2 pixelSize = uHasModelTextureAndPixelLength.yz;\ntexCoord = clamp(texCoord, pixelSize, 1.0 - pixelSize);\nvec2 modelTexCoord = uUseOriModelTex > 0.5 ? v_texCoord : mix(uModelTextureRect.xy, uModelTextureRect.zw, texCoord);\nvec4 texColor = texture2D(uModelTexture, modelTexCoord);\ngl_FragColor = uUseOriModelTex > 0.5 ? texColor * color * uHighLightColor : mix(uModelColor, texColor, uHasModelTextureAndPixelLength.x) * uHighLightColor * color;\n#ifdef Volume\n#ifdef Volume2\n if((vecRotioCoord.x < 1.0 && vecRotioCoord.x >0.0) && (vecRotioCoord.y < 1.0 && vecRotioCoord.y >0.0) && (vecRotioCoord.z < 1.0 && vecRotioCoord.z >0.0))\n {\n gl_FragColor = czm_getVolumeValue(vecRotioCoord);\n }\n#else\n float wValue = 0.0;\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, wValue);\n#endif\n#endif\n}";function f$a(e,t,i,n){this._scene=e._scene,this._attributeLocations={aPosition:0,aNormal:1,aTexCoord:2},this._geometry=n,this._drawCommandInClampTexture=null,this._drawCommandInScene=null,this._drawCommandNormal=null,this._drawCommandInScenePreModel={},this._clampFramebuffer=null,this._name="solidModelsProfile_"+e._name+"_"+t.toString(),this._textureAtlas=e._textureAtlas,this._modelInfo=i,this._picking=!1,this._owner=e,this._clippingType=R$J.KeepInside,this._volume=void 0,this._width=1,this._height=1,this._start=!1}f$a.prototype.createCommand=function(e){var t=p$1d.clone(this._geometry.modelMatrix),i=this._geometry.boundingSphere,n=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:t,pass:Le$s.OPAQUE,cull:!1,boundingVolume:i});n.vertexArray=this._geometry.getVertexArray(e);var r=new s$U({name:"ClipPlaneVp",sources:[R$K]}),o=new s$U({name:"SolidProfileFp",sources:[V$6]});r.defines.push("HAS_TEXTURECOORD"),this._geometry.type==P$U.GEOCYLINDER?(r.defines.push("GEOCYLINDER"),o.defines.push("GEOCYLINDER")):this._geometry.type==P$U.GEOBOX&&(r.defines.push("GEOBOX"),o.defines.push("GEOBOX")),e$2b(this._volume)&&(r.defines.push("Volume"),o.defines.push("Volume"),this._volume.hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(r.defines.push("Volume2"),o.defines.push("Volume2"))),p$1d.equals(t,p$1d.IDENTITY)&&r.defines.push("USE_RelativeOrigin"),n.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),n.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:{enabled:!0},blending:Ee$r.ALPHA_BLEND});for(var a in this._drawCommandInScene=n,this._modelInfo)this.copyCommandForSingleModel(a,this._modelInfo[a],this._drawCommandInScene,e);this.createCommandInClampTexture(n,e),this.createNormalCommand(this._drawCommandInClampTexture,e)};var C$8=new o$1p,g$f=new e$29,l$b=new o$1p,v$8=new o$1p,m$a=new e$1U;function L$b(e){e$2b(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}function r$e(){t$16.throwInstantiationError()}f$a.prototype.copyCommandForSingleModel=function(e,t,i,n){var r=i$_.shallowClone(i),o=this;r.uniformMap={uClampIDTexture:function(){var e=o._clampFramebuffer;return e$2b(e)?e.renderTexture._fb.getColorTexture(0):n.defaultTexture},uClampColorTexture:function(){var e=o._clampFramebuffer;return e$2b(e)&&2===e.renderTexture._fb.numberOfColorAttachments?e.renderTexture._fb.getColorTexture(1):n.defaultTexture},uModelColor:function(){return t.color},uHasModelTextureAndPixelLength:function(){if(v$8.x=t.textureAtlasID>=0?1:0,e$2b(o._textureAtlas)){var e=o._textureAtlas.texture.width,i=o._textureAtlas.texture.height,n=o._textureAtlas.textureCoordinates[t.textureAtlasID];if(e$2b(n)){var r=n.width*e,a=n.height*i;v$8.y=1/r,v$8.z=1/a}}return v$8},uUseOriModelTex:function(){return!e$2b(o._textureAtlas)&&e$2b(t.texture)},uModelTexture:function(){return e$2b(o._textureAtlas)?o._textureAtlas.texture:e$2b(t.texture)?t.texture:n.defaultTexture},uModelTextureRect:function(){if(e$2b(o._textureAtlas)){var e=o._textureAtlas.textureCoordinates[t.textureAtlasID];e$2b(e)&&(g$f.x=e.x,g$f.y=e.y,g$f.z=e.x+e.width,g$f.w=e.y+e.height)}return g$f},uModelTextureTiling:function(){return"PLANE"==o._geometry.type?(l$b.x=o._geometry.planeWidth/t.textureTilingU,l$b.y=o._geometry.planeHeight/t.textureTilingV):o._geometry.type==P$U.GEOCYLINDER?(l$b.x=2*Math.PI*o._geometry.geoTopRadius/t.textureTilingU,l$b.y=o._geometry.geoHeight/t.textureTilingV):o._geometry.type==P$U.GEOREGION3D?(l$b.x=o._geometry.width/t.textureTilingU,l$b.y=o._geometry.height/t.textureTilingV):o._geometry.type==P$U.GEOBOX&&(l$b.x=o._geometry.geoWidth/t.textureTilingU,l$b.y=o._geometry.geoHeight/t.textureTilingV,l$b.z=o._geometry.geoLength/t.textureTilingU),l$b},uClippingType:function(){return o._clippingType},uGeometryHeight:function(){return o._geometry.type==P$U.GEOCYLINDER?o._geometry.geoHeight:1},uModelIDColor:function(){return C$8.x=t.pickColor.x,C$8.y=t.pickColor.y,C$8.z=t.pickColor.z,C$8},uProfilePickColor:function(){return t.profilePickId.color},uPicking:function(){return o._picking},uHighLightColor:function(){var e=o._owner._selectedProfileIDs;if(0==e.length)m$a.red=1,m$a.green=1,m$a.blue=1;else{var i=!1;e.map((function(e){t.id==e&&(i=!0)})),i?(m$a.red=.7,m$a.green=.7,m$a.blue=1):(m$a.red=1,m$a.green=1,m$a.blue=1)}return m$a},uVolumeTexture:function(){return o._volume._volTexture},width:function(){return o._volume._volImageBuffer.nWidth},height:function(){return o._volume._volImageBuffer.nHeight},depth:function(){return o._volume._volImageBuffer.nDepth},sideBlockCount:function(){return o._volume._volImageBuffer.nSideBlockCount},blockLength:function(){return o._volume._volImageBuffer.nBlockLength},texLength:function(){return o._volume._volImageBuffer.nLength},uFilterMode:function(){var e=0;return e$2b(o._volume.hypsometricSetting)&&o._volume.hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(e=1),e},uMixColorType:function(){return 0},uDataFloor:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMinKey:0},uDataCeil:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMaxKey:0},uVolumeType:function(){return e$2b(o._volume.hypsometricSetting)&&o._volume.hypsometricSetting.filterMode===k$Q.FilterMode.LINEAR?0:1},uHypOpacity:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.Opacity:1},uHypContourInterval:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.LineInterval:100},uHypLineColor:function(){var e=new e$29(0,1,1,1);return e$2b(o._volume.hypsometricSetting)&&(e.x=o._volume.hypsometricSetting.LineColor.red,e.y=o._volume.hypsometricSetting.LineColor.green,e.z=o._volume.hypsometricSetting.LineColor.blue,e.w=o._volume.hypsometricSetting.LineColor.alpha),e},uHypContourFillMode:function(){var e=1;if(e$2b(o._volume.hypsometricSetting))switch(o._volume.hypsometricSetting.DisplayMode){case k$Q.DisplayMode.NONE:e=0;break;case k$Q.DisplayMode.FACE:e=1;break;case k$Q.DisplayMode.LINE:e=2;break;case k$Q.DisplayMode.FACE_AND_LINE:e=3}return e},uHypFloor:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMaxKey:0},uHypMaxVisibleValue:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.MaxVisibleValue:0},uHypMinVisibleValue:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.MinVisibleValue:0},uNoValueColor:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.noValueColor:e$1U.WHITE},uHypsometricVisible:function(){return 1},uHypHasAnalysisRegion:function(){return 0},uHypsometricRenderTexture:function(){return 0},uHypsometricTexture:function(){return o._volume._hypsometricTexture}},this._drawCommandInScenePreModel[e]=r},f$a.prototype.createCommandInClampTexture=function(e,t){var i=i$_.shallowClone(e);i.pass=Le$s.OPAQUE;var n={enabled:!1};this._geometry.type===P$U.GEOREGION3D&&this._clippingType===R$J.KeepOutside&&(n.enabled=!0,n.face=de$x.FRONT),i.renderState=d$1m.fromCache({cull:n,depthTest:{enabled:!0},depthMask:!0,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:_0x187e60.createReceiveClampObjectStencilTest(!0)}),i.uniformMap={uDiffuseColor:function(){return e$1U.WHITE}};var r=new s$U({name:"CommonNoLigthNoTextureVp",sources:[Ht$7]});p$1d.equals(e._modelMatrix,p$1d.IDENTITY)&&r.defines.push("USE_RelativeOrigin"),i.shaderProgram=r$13.fromCache({name:"ProfileRenderClampTexture",context:t,vertexShaderSource:r,fragmentShaderSource:Yt$8,attributeLocations:this._attributeLocations}),this._drawCommandInClampTexture=i},f$a.prototype.createNormalCommand=function(e){this._drawCommandNormal=i$_.shallowClone(e),this._drawCommandNormal.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,colorMask:{red:!0,green:!0,blue:!0,alpha:!0},stencilTest:!1})},f$a.prototype.createClampFrameBuffer=function(e,t){e$2b(this._clampFramebuffer)||(this._frameState=t,e$2b(t._framebufferList[this._name])?this._clampFramebuffer=t._framebufferList[this._name]:(this._clampFramebuffer=e.createClampFramebuffer(),this._clampFramebuffer.renderTexture.mrt=!0,this._clampFramebuffer.isUpdate=this._start,t._framebufferList[this._name]=this._clampFramebuffer))},f$a.prototype._build=function(){this._start=!0,this._clampFramebuffer&&(this._clampFramebuffer.isUpdate=!0)},f$a.prototype.update=function(e,t,i,n){this._picking=t.passes.pick,this._frameState=t;var r=e.drawingBufferWidth,o=e.drawingBufferHeight;if((this._width!==r||this._height!==o)&&(this._width=r,this._height=o,e$2b(this._clampFramebuffer)&&(this._clampFramebuffer.renderTexture._mrt=!1)),(!e$2b(this._drawCommandInScene)||this._geometry._isGeometryDirty)&&(this.createCommand(e,t),this.createClampFrameBuffer(e,t)),t._fboState.frameBufferType==Qe$c.CLAMP)t._fboState.name==this._name&&i.push(this._drawCommandInClampTexture);else for(var a in this._geometry.type==P$U.GEOCYLINDER&&(e.webgpu&&(this._drawCommandNormal.pass=Le$s.OPAQUE-1),i.push(this._drawCommandNormal)),this._drawCommandInScenePreModel){var s=this._modelInfo[a];if(!o$1p.equals(s.pickColor,o$1p.ZERO)){var l=this._drawCommandInScenePreModel[a];i.push(l)}}},f$a.prototype.destroy=function(){return L$b(this._drawCommandInClampTexture),this._drawCommandInClampTexture=void 0,L$b(this._drawCommandInScene),this._drawCommandInScene=void 0,this._drawCommandNormal=void 0,this._drawCommandInScenePreModel={},e$2b(this._clampFramebuffer)&&(this._clampFramebuffer.destroy(),this._frameState._framebufferList[this._name]=void 0),e$2b(this._geometry)&&(this._geometry=null),i$10(this)},r$e.computeDefaultLevelZeroMaximumGeometricError=function(e){return 2*e.ellipsoid.maximumRadius*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))},Object.defineProperties(r$e.prototype,{quadtree:{get:t$16.throwInstantiationError,set:t$16.throwInstantiationError},ready:{get:t$16.throwInstantiationError},tilingScheme:{get:t$16.throwInstantiationError},errorEvent:{get:t$16.throwInstantiationError}}),r$e.prototype.update=t$16.throwInstantiationError,r$e.prototype.beginUpdate=t$16.throwInstantiationError,r$e.prototype.endUpdate=t$16.throwInstantiationError,r$e.prototype.getLevelMaximumGeometricError=t$16.throwInstantiationError,r$e.prototype.loadTile=t$16.throwInstantiationError,r$e.prototype.computeTileVisibility=t$16.throwInstantiationError,r$e.prototype.showTileThisFrame=t$16.throwInstantiationError,r$e.prototype.computeDistanceToTile=t$16.throwInstantiationError,r$e.prototype.isDestroyed=t$16.throwInstantiationError,r$e.prototype.destroy=t$16.throwInstantiationError;var e$5={LOW:1024,MEDIUM:2048,HIGH:4096},Quality=Object.freeze(e$5);function R$8(e){o$1q.typeOf.object("scene",e),this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}R$8.prototype.completeMorph=function(){e$2b(this._completeMorph)&&this._completeMorph()},R$8.prototype.morphTo2D=function(e,t){e$2b(this._completeMorph)&&this._completeMorph();var i=this._scene;this._previousMode=i.mode,this._morphToOrthographic=i.camera.frustum instanceof a$V,this._previousMode!==C$13.SCENE2D&&this._previousMode!==C$13.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,C$13.SCENE2D,!0),i._mode=C$13.MORPHING,i.camera._setTransform(p$1d.IDENTITY),this._previousMode===C$13.COLUMBUS_VIEW?be$2(this,e):Ze$2(this,e,t),0===e&&e$2b(this._completeMorph)&&this._completeMorph())};var ce$7=new o$1p,ae$3=new o$1p,se$3=new o$1p,pe$4=new o$1p,ue$4=new o$1p,me$4=new o$1p,he$3=new o$1p,fe$2=new a$18,de$4=new p$1d,ve$3=new o$15,le$6=new a$V,_e$2={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};R$8.prototype.morphToColumbusView=function(e,t){e$2b(this._completeMorph)&&this._completeMorph();var i=this._scene;if(this._previousMode=i.mode,this._previousMode!==C$13.COLUMBUS_VIEW&&this._previousMode!==C$13.MORPHING){this._scene.morphStart.raiseEvent(this,this._previousMode,C$13.COLUMBUS_VIEW,!0),i.camera._setTransform(p$1d.IDENTITY);var n,r=ce$7,o=ae$3,a=se$3;if(e>0)r.x=0,r.y=-1,r.z=1,r=o$1p.multiplyByScalar(o$1p.normalize(r,r),5*t.maximumRadius,r),o$1p.negate(o$1p.normalize(r,o),o),o$1p.cross(o$1p.UNIT_X,o,a);else{var s=i.camera;if(this._previousMode===C$13.SCENE2D)o$1p.clone(s.position,r),r.z=s.frustum.right-s.frustum.left,o$1p.negate(o$1p.UNIT_Z,o),o$1p.clone(o$1p.UNIT_Y,a);else{o$1p.clone(s.positionWC,r),o$1p.clone(s.directionWC,o),o$1p.clone(s.upWC,a);var l=t.scaleToGeodeticSurface(r,he$3),u=m$17.eastNorthUpToFixedFrame(l,t,de$4);p$1d.inverseTransformation(u,u),i.mapProjection.project(t.cartesianToCartographic(r,fe$2),r),p$1d.multiplyByPointAsVector(u,o,o),p$1d.multiplyByPointAsVector(u,a,a)}}this._morphToOrthographic?((n=le$6).width=i.camera.frustum.right-i.camera.frustum.left,n.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight):((n=ve$3).aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,n.fov=e$2a.toRadians(60));var c=_e$2;c.position=r,c.direction=o,c.up=a,c.frustum=n;var h=Ye$1(c);V$5(this,h),this._previousMode===C$13.SCENE2D?Qe$1(this,e,c,h):(c.position2D=p$1d.multiplyByPoint(v$K.TRANSFORM_2D,r,pe$4),c.direction2D=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o,ue$4),c.up2D=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,a,me$4),i._mode=C$13.MORPHING,K$3(this,e,c,h)),0===e&&e$2b(this._completeMorph)&&this._completeMorph()}};var A$a={position:new o$1p,direction:new o$1p,up:new o$1p,frustum:void 0},G$8=new o$15;function V$5(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new g$J(e._scene.canvas);var i=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=i,e._morphHandler.setInputAction(i,G$I.LEFT_DOWN),e._morphHandler.setInputAction(i,G$I.MIDDLE_DOWN),e._morphHandler.setInputAction(i,G$I.RIGHT_DOWN),e._morphHandler.setInputAction(i,G$I.WHEEL)}}function P$8(e){for(var t=e._currentTweens,i=0;i<t.length;++i)t[i].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}R$8.prototype.morphTo3D=function(e,t){e$2b(this._completeMorph)&&this._completeMorph();var i=this._scene;if(this._previousMode=i.mode,this._previousMode!==C$13.SCENE3D&&this._previousMode!==C$13.MORPHING){if(this._scene.morphStart.raiseEvent(this,this._previousMode,C$13.SCENE3D,!0),i._mode=C$13.MORPHING,i.camera._setTransform(p$1d.IDENTITY),this._previousMode===C$13.SCENE2D)Se$2(this,e,t);else{var n;e>0?(n=A$a,o$1p.fromDegrees(0,0,5*t.maximumRadius,t,n.position),o$1p.negate(n.position,n.direction),o$1p.normalize(n.direction,n.direction),o$1p.clone(o$1p.UNIT_Z,n.up)):n=x$7(this,t);var r,o=i.camera;o.frustum instanceof a$V?r=o.frustum.clone():((r=G$8).aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,r.fov=e$2a.toRadians(60)),n.frustum=r;var a=ee$3(n);V$5(this,a),B$7(this,e,n,a)}0===e&&e$2b(this._completeMorph)&&this._completeMorph()}},R$8.prototype.isDestroyed=function(){return!1},R$8.prototype.destroy=function(){return P$8(this),i$10(this)};var Te$3=new a$18,De$3=new o$1p,ge$5=new p$1d;function x$7(e,t){var i=e._scene,n=i.camera,r=A$a,o=r.position,a=r.direction,s=r.up,l=i.mapProjection.unproject(n.position,Te$3);t.cartographicToCartesian(l,o);var u=t.scaleToGeodeticSurface(o,De$3),c=m$17.eastNorthUpToFixedFrame(u,t,ge$5);return p$1d.multiplyByPointAsVector(c,n.direction,a),p$1d.multiplyByPointAsVector(c,n.up,s),r}var we$1=new o$1p,Ce$2=new o$1p,Me$6=new o$1p,Ee$4=new o$1p,Re$3=new o$1p,Oe$3=new o$1p;function B$7(e,t,i,n){t*=.5;var r=e._scene,o=r.camera,a=o$1p.clone(o.position,we$1),s=o$1p.clone(o.direction,Ce$2),l=o$1p.clone(o.up,Me$6),u=p$1d.multiplyByPoint(v$K.TRANSFORM_2D_INVERSE,i.position,Ee$4),c=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D_INVERSE,i.direction,Re$3),h=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D_INVERSE,i.up,Oe$3);var d=r.tweens.add({duration:t,easingFunction:m$W.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$5(a,u,e.time,o.position),w$5(s,c,e.time,o.direction),w$5(l,h,e.time,o.up),o$1p.cross(o.direction,o.up,o.right),o$1p.normalize(o.right,o.right)},complete:function(){$$7(e,r,0,1,t,n)}});e._currentTweens.push(d)}var Ve$4=new a$V,L$a=new o$1p,Z$7=new o$1p,Q$3=new o$1p,H$9=new o$1p,Y$2=new o$1p,k$6=new o$1p;function Se$2(e,t,i){t/=3;var n,r,o=e._scene,a=o.camera;t>0?(n=A$a,o$1p.fromDegrees(0,0,5*i.maximumRadius,i,n.position),o$1p.negate(n.position,n.direction),o$1p.normalize(n.direction,n.direction),o$1p.clone(o$1p.UNIT_Z,n.up)):(a.position.z=a.frustum.right-a.frustum.left,n=x$7(e,i)),e._morphToOrthographic?((r=Ve$4).aspectRatio=o.drawingBufferWidth/o.drawingBufferHeight,r.width=a.frustum.right-a.frustum.left):((r=G$8).aspectRatio=o.drawingBufferWidth/o.drawingBufferHeight,r.fov=e$2a.toRadians(60)),n.frustum=r;var s,l=ee$3(n);V$5(e,l),s=e._morphToOrthographic?function(){B$7(e,t,n,l)}:function(){J$2(e,t,n,(function(){B$7(e,t,n,l)}))},t>0?(o._mode=C$13.SCENE2D,a.flyTo({duration:t,destination:o$1p.fromDegrees(0,0,5*i.maximumRadius,i,H$9),complete:function(){o._mode=C$13.MORPHING,s()}})):s()}function w$5(e,t,i,n){return o$1p.lerp(e,t,i,n)}function X$5(e,t,i,n,r){var o=e._scene,a=o.camera;if(!(a.frustum instanceof a$V)){var s=a.frustum.fov,l=.5*e$2a.RADIANS_PER_DEGREE,u=i.position.z*Math.tan(.5*s);a.frustum.far=u/Math.tan(.5*l)+1e7;var c=o.tweens.add({duration:t,easingFunction:m$W.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){a.frustum.fov=e$2a.lerp(s,l,e.time);var t=u/Math.tan(.5*a.frustum.fov);n(a,t)},complete:function(){a.frustum=i.frustum.clone(),r(e)}});e._currentTweens.push(c)}}var Ne$2=new o$1p,Pe$1=new o$1p,Ue$2=new o$1p,b$c=new o$1p,Ie$3=new o$1p,ye$2=new o$1p,Fe$3=new l$12,Ae$4=new f$17,Be$4=new o$1p,He$1={position:void 0,direction:void 0,up:void 0,frustum:void 0};function be$2(e,t){t*=.5;var i=e._scene,n=i.camera,r=o$1p.clone(n.position,Ne$2),o=o$1p.clone(n.direction,Pe$1),a=o$1p.clone(n.up,Ue$2),s=o$1p.negate(o$1p.UNIT_Z,Ie$3),l=o$1p.clone(o$1p.UNIT_Y,ye$2),u=b$c;if(t>0)o$1p.clone(o$1p.ZERO,b$c),u.z=5*i.mapProjection.ellipsoid.maximumRadius;else{o$1p.clone(r,b$c);var c=Ae$4;p$1d.multiplyByPoint(v$K.TRANSFORM_2D,r,c.origin),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o,c.direction);var h=i.globe;if(e$2b(h)){var d=h.pickWorldCoordinates(c,i,Be$4);e$2b(d)&&(p$1d.multiplyByPoint(v$K.TRANSFORM_2D_INVERSE,d,u),u.z+=o$1p.distance(r,u))}}var f=Fe$3;f.right=.5*u.z,f.left=-f.right,f.top=f.right*(i.drawingBufferHeight/i.drawingBufferWidth),f.bottom=-f.top;var p=He$1;p.position=u,p.direction=s,p.up=l,p.frustum=f;var _=te$2(p);function m(e,t){e.position.z=t}V$5(e,_);var g=i.tweens.add({duration:t,easingFunction:m$W.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$5(r,u,e.time,n.position),w$5(o,s,e.time,n.direction),w$5(a,l,e.time,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right),n._adjustOrthographicFrustum(!0)},complete:function(){X$5(e,t,p,m,_)}});e._currentTweens.push(g)}var q$7=new a$18,je$2={position:new o$1p,direction:new o$1p,up:new o$1p,position2D:new o$1p,direction2D:new o$1p,up2D:new o$1p,frustum:new l$12},ze$3={position:new o$1p,direction:new o$1p,up:new o$1p,frustum:void 0},We$2=new o$1p,Ge$2=new f$17,xe$2=new p$1d,Le$4=new o$1p;function Ze$2(e,t,i){t*=.5;var n=e._scene,r=n.camera,o=je$2;if(t>0)o$1p.clone(o$1p.ZERO,o.position),o.position.z=5*i.maximumRadius,o$1p.negate(o$1p.UNIT_Z,o.direction),o$1p.clone(o$1p.UNIT_Y,o.up);else{i.cartesianToCartographic(r.positionWC,q$7),n.mapProjection.project(q$7,o.position),o$1p.negate(o$1p.UNIT_Z,o.direction),o$1p.clone(o$1p.UNIT_Y,o.up);var a=Ge$2;o$1p.clone(o.position2D,a.origin);var s=o$1p.clone(r.directionWC,a.direction),l=i.scaleToGeodeticSurface(r.positionWC,Le$4),u=m$17.eastNorthUpToFixedFrame(l,i,xe$2);p$1d.inverseTransformation(u,u),p$1d.multiplyByPointAsVector(u,s,s),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,s,s);var c=n.globe;if(e$2b(c)){var h=c.pickWorldCoordinates(a,n,We$2);if(e$2b(h)){var d=o$1p.distance(o.position2D,h);h.x+=d,o$1p.clone(h,o.position2D)}}}function f(e,t){e.position.x=t}p$1d.multiplyByPoint(v$K.TRANSFORM_2D,o.position,o.position2D),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o.direction,o.direction2D),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o.up,o.up2D);var p=o.frustum;p.right=.5*o.position.z,p.left=-p.right,p.top=p.right*(n.drawingBufferHeight/n.drawingBufferWidth),p.bottom=-p.top;var _=ze$3;p$1d.multiplyByPoint(v$K.TRANSFORM_2D_INVERSE,o.position2D,_.position),o$1p.clone(o.direction,_.direction),o$1p.clone(o.up,_.up),_.frustum=p;var m=te$2(_);V$5(e,m),K$3(e,t,o,(function(){X$5(e,t,o,f,m)}))}function J$2(e,t,i,n){var r=e._scene,o=r.camera,a=o.frustum.right-o.frustum.left;o.frustum=i.frustum.clone();var s=o.frustum.fov,l=.5*e$2a.RADIANS_PER_DEGREE,u=a*Math.tan(.5*s);o.frustum.far=u/Math.tan(.5*l)+1e7,o.frustum.fov=l;var c=r.tweens.add({duration:t,easingFunction:m$W.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){o.frustum.fov=e$2a.lerp(l,s,e.time),o.position.z=u/Math.tan(.5*o.frustum.fov)},complete:function(){n(e)}});e._currentTweens.push(c)}function Qe$1(e,t,i,n){t*=.5;var r=e._scene,o=r.camera,a=o$1p.clone(i.position,H$9),s=o$1p.clone(i.direction,Y$2),l=o$1p.clone(i.up,k$6);function u(){o.frustum=i.frustum.clone();var u=o$1p.clone(o.position,L$a),c=o$1p.clone(o.direction,Z$7),h=o$1p.clone(o.up,Q$3);u.z=a.z;var d=r.tweens.add({duration:t,easingFunction:m$W.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$5(u,a,e.time,o.position),w$5(c,s,e.time,o.direction),w$5(h,l,e.time,o.up),o$1p.cross(o.direction,o.up,o.right),o$1p.normalize(o.right,o.right)},complete:function(){n(e)}});e._currentTweens.push(d)}r._mode=C$13.MORPHING,e._morphToOrthographic?u():J$2(e,0,i,u)}function K$3(e,t,i,n){var r=e._scene,o=r.camera,a=o$1p.clone(o.position,L$a),s=o$1p.clone(o.direction,Z$7),l=o$1p.clone(o.up,Q$3),u=o$1p.clone(i.position2D,H$9),c=o$1p.clone(i.direction2D,Y$2),h=o$1p.clone(i.up2D,k$6);var d=r.tweens.add({duration:t,easingFunction:m$W.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$5(a,u,e.time,o.position),w$5(s,c,e.time,o.direction),w$5(l,h,e.time,o.up),o$1p.cross(o.direction,o.up,o.right),o$1p.normalize(o.right,o.right),o._adjustOrthographicFrustum(!0)},complete:function(){$$7(e,r,1,0,t,n)}});e._currentTweens.push(d)}function $$7(e,t,i,n,r,o){var a={object:t,property:"morphTime",startValue:i,stopValue:n,duration:r,easingFunction:m$W.QUARTIC_OUT};e$2b(o)&&(a.complete=function(){o(e)});var s=t.tweens.addProperty(a);e._currentTweens.push(s)}function ee$3(e){return function(t){var i=t._scene;i._mode=C$13.SCENE3D,i.morphTime=C$13.getMorphTime(C$13.SCENE3D),P$8(t);var n=i.camera;(t._previousMode!==C$13.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,o$1p.clone(e.position,n.position),o$1p.clone(e.direction,n.direction),o$1p.clone(e.up,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right),n.frustum=e.frustum.clone());var r=n.frustum;i.frameState.useLogDepth&&(r.near=.1,r.far=1e10);var o=e$2b(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,C$13.SCENE3D,o)}}function te$2(e){return function(t){var i=t._scene;i._mode=C$13.SCENE2D,i.morphTime=C$13.getMorphTime(C$13.SCENE2D),P$8(t);var n=i.camera;o$1p.clone(e.position,n.position),n.position.z=2*i.mapProjection.ellipsoid.maximumRadius,o$1p.clone(e.direction,n.direction),o$1p.clone(e.up,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right),n.frustum=e.frustum.clone();var r=e$2b(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,C$13.SCENE2D,r)}}function Ye$1(e){return function(t){var i=t._scene;i._mode=C$13.COLUMBUS_VIEW,i.morphTime=C$13.getMorphTime(C$13.COLUMBUS_VIEW),P$8(t);var n=i.camera;(t._previousModeMode!==C$13.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,o$1p.clone(e.position,n.position),o$1p.clone(e.direction,n.direction),o$1p.clone(e.up,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right));var r=n.frustum;i.frameState.useLogDepth&&(r.near=.1,r.far=1e10);var o=e$2b(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,C$13.COLUMBUS_VIEW,o)}}function d$e(e,t,i,n,r,o,a,s,l,u){this._tweens=e,this._tweenjs=t,this._startObject=l$1g(i),this._stopObject=l$1g(n),this._duration=r,this._delay=o,this._easingFunction=a,this._update=s,this._complete=l,this.cancel=u,this.needsStart=!0}function s$a(){this._tweens=[]}function _a(e){if(!e$2b(e))throw new t$16("scene is required.");this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.enableWalk=!1,this.walkParameters={speed:1,height:2},this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.translateEventTypes=Q$c.LEFT_DRAG,this.zoomEventTypes=[Q$c.RIGHT_DRAG,Q$c.WHEEL,Q$c.PINCH],this.rotateEventTypes=Q$c.LEFT_DRAG,this.tiltEventTypes=[Q$c.MIDDLE_DRAG,Q$c.PINCH,{eventType:Q$c.LEFT_DRAG,modifier:Aa$1.CTRL},{eventType:Q$c.RIGHT_DRAG,modifier:Aa$1.CTRL}],this.lookEventTypes={eventType:Q$c.LEFT_DRAG,modifier:Aa$1.SHIFT},this.minimumPickingTerrainHeight=15e4,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumCollisionTerrainHeight=15e4,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=75e5,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this._enableIndoorColliDetection=!1,this.minimumDetectDistance=.5,this.minimumWalkingDetectDistance=2,this._scene=e,this._globe=void 0,this._ellipsoid=void 0,this._aggregator=new l$l(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new s$a,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new o$1o(-1,-1),this._tiltCenter=new o$1p,this._rotateMousePosition=new o$1o(-1,-1),this._rotateStartPosition=new o$1p,this._strafeStartPosition=new o$1p,this._zoomMouseStart=new o$1o(-1,-1),this._zoomWorldPosition=new o$1p,this._useZoomWorldPosition=!1,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._rotatingZoom=!1;var t=e.mapProjection;this._maxCoord=t.project(new a$18(Math.PI,e$2a.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=.618,this._minimumRotateRate=.5,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._cloneCamera=void 0,this._isAroundScreenCenter=!1,this.autoTiltHeight=0,this._controlMode=vi$1.NORMAL,this._enableFusion=!1,this.panOffset={x:0,y:0},this.zoomDirty=!1,this.panDirty=!1,this.minFov=e$2a.toRadians(20),this.maxFov=e$2a.toRadians(70)}Object.defineProperties(d$e.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}}),d$e.prototype.cancelTween=function(){this._tweens.remove(this)},Object.defineProperties(s$a.prototype,{length:{get:function(){return this._tweens.length}}}),s$a.prototype.add=function(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).startObject)||!e$2b(e.stopObject))throw new t$16("options.startObject and options.stopObject are required.");if(!e$2b(e.duration)||e.duration<0)throw new t$16("options.duration is required and must be positive.");if(0===e.duration)return e$2b(e.complete)&&e.complete(),new d$e(this);var t=e.duration/h$17.SECONDS_PER_MILLISECOND,i=u$_(e.delay,0),n=i/h$17.SECONDS_PER_MILLISECOND,r=u$_(e.easingFunction,m$W.LINEAR_NONE),o=e.startObject,a=new f$V.Tween(o);a.to(l$1g(e.stopObject),t),a.delay(n),a.easing(r),e$2b(e.update)&&a.onUpdate((function(){e.update(o)})),a.onComplete(u$_(e.complete,null)),a.repeat(u$_(e._repeat,0));var s=new d$e(this,a,e.startObject,e.stopObject,e.duration,i,r,e.update,e.complete,e.cancel);return this._tweens.push(s),s},s$a.prototype.addProperty=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).object,i=e.property,n=e.startValue,r=e.stopValue;if(!e$2b(t)||!e$2b(e.property))throw new t$16("options.object and options.property are required.");if(!e$2b(t[i]))throw new t$16("options.object must have the specified property.");if(!e$2b(n)||!e$2b(r))throw new t$16("options.startValue and options.stopValue are required.");return this.add({startObject:{value:n},stopObject:{value:r},duration:u$_(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){t[i]=e.value},complete:e.complete,cancel:e.cancel,_repeat:e._repeat})},s$a.prototype.addAlpha=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).material;if(!e$2b(t))throw new t$16("options.material is required.");var i=[];for(var n in t.uniforms)t.uniforms.hasOwnProperty(n)&&e$2b(t.uniforms[n])&&e$2b(t.uniforms[n].alpha)&&i.push(n);if(0===i.length)throw new t$16("material has no properties with alpha components.");return this.add({startObject:{alpha:u$_(e.startValue,0)},stopObject:{alpha:u$_(e.stopValue,1)},duration:u$_(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){for(var n=i.length,r=0;r<n;++r)t.uniforms[i[r]].alpha=e.alpha},complete:e.complete,cancel:e.cancel})},s$a.prototype.addOffsetIncrement=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).material;if(!e$2b(t))throw new t$16("material is required.");if(!e$2b(t.uniforms.offset))throw new t$16("material.uniforms must have an offset property.");var i=t.uniforms;return this.addProperty({object:i,property:"offset",startValue:i.offset,stopValue:i.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})},s$a.prototype.remove=function(e){if(!e$2b(e))return!1;var t=this._tweens.indexOf(e);return-1!==t&&(e.tweenjs.stop(),e$2b(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0)},s$a.prototype.removeAll=function(){for(var e=this._tweens,t=0;t<e.length;++t){var i=e[t];i.tweenjs.stop(),e$2b(i.cancel)&&i.cancel()}e.length=0},s$a.prototype.contains=function(e){return e$2b(e)&&-1!==this._tweens.indexOf(e)},s$a.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return this._tweens[e]},s$a.prototype.update=function(e){var t=this._tweens,i=0;for(e=e$2b(e)?e/h$17.SECONDS_PER_MILLISECOND:Et$a();i<t.length;){var n=t[i],r=n.tweenjs;n.needsStart?(n.needsStart=!1,r.start(e)):r.update(e)?i++:(r.stop(),t.splice(i,1))}};var Za=0;function ne$4(e,t){if(e<0)return 0;var i=25*(1-t);return Math.exp(-i*e)}function re$3(e){return o$1o.equalsEpsilon(e.startPosition,e.endPosition,e$2a.EPSILON14)}Object.defineProperties(_a.prototype,{enableIndoorColliDetection:{get:function(){return this._enableIndoorColliDetection},set:function(e){this._enableIndoorColliDetection=e,this._scene.camera._enableIndoorColliDetection=e}},zoomFactor:{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e}},previousHeight:{set:function(e){Za=e}},controlMode:{get:function(){return this._controlMode},set:function(e){o$1q.typeOf.number.lessThanOrEquals("controlMode",e,1),o$1q.typeOf.number.greaterThanOrEquals("controlMode",e,0),this._controlMode=e}},enableFusion:{get:function(){return this._enableFusion},set:function(e){e!==this._enableFusion&&(this._enableFusion=e,this.panOffset={x:0,y:0})}}});var se$2=.4;function oe$4(e,t,i,n,r,o,a){let s=o[a];e$2b(s)||(s=o[a]={startPosition:new o$1o,endPosition:new o$1o,motion:new o$1o,inertiaEnabled:!0});const l=e.getButtonPressTime(t,i),u=e.getButtonReleaseTime(t,i),c=l&&u&&(u.getTime()-l.getTime())/1e3,h=new Date,d=u&&(h.getTime()-u.getTime())/1e3;if(l&&u&&c<se$2){const a=ne$4(d,n),l=e.getLastMovement(t,i);if(!e$2b(l)||re$3(l)||!s.inertiaEnabled||(s.motion.x=.5*(l.endPosition.x-l.startPosition.x),s.motion.y=.5*(l.endPosition.y-l.startPosition.y),s.startPosition=o$1o.clone(l.startPosition,s.startPosition),s.endPosition=o$1o.multiplyByScalar(s.motion,a,s.endPosition),s.endPosition=o$1o.add(s.startPosition,s.endPosition,s.endPosition),isNaN(s.endPosition.x)||isNaN(s.endPosition.y)||o$1o.distance(s.startPosition,s.endPosition)<.5))return;if(!e.isButtonDown(t,i)){r(o,e.getStartMousePosition(t,i),s)}}}function ve$2(e,t){if(e$2b(t)){let i=e[t];e$2b(i)&&(i.inertiaEnabled=!0);const n=e._inertiaDisablers[t];if(e$2b(n)){const t=n.length;for(let r=0;r<t;++r)i=e[n[r]],e$2b(i)&&(i.inertiaEnabled=!1)}}}var di=[];function b$b(e,t,i,n,r,o){if(e._scene.mode===C$13.COLUMBUS_VIEW&&e._controlMode===vi$1.DESIGN?e._isAroundScreenCenter=!0:e._isAroundScreenCenter=!1,e$2b(i)){var a=e._aggregator;e$2b(e.tiltEventTypes)&&!Array.isArray(e.tiltEventTypes)&&(e.tiltEventTypes=[e.tiltEventTypes]),Array.isArray(i)||(di[0]=i,i=di);for(var s=i.length,l=0;l<s;++l){var u=i[l],c=e$2b(u.eventType)?u.eventType:u,h=u.modifier,d=a.isMoving(c,h)&&a.getMovement(c,h),f=a.getStartMousePosition(c,h);if(e._isAroundScreenCenter){var p=e._scene.getViewport({x:10,y:10});f={x:p.width/2,y:p.height/2}}e.enableInputs&&t&&(d?(n(e,f,d),ve$2(e,o)):r<1&&"_lastInertiaTiltMovement"!=o&&"_lastInertiaZoomMovement"!=o?oe$4(a,c,h,r,n,e,o):("_lastInertiaZoomMovement"===o||"_lastInertiaTiltMovement"===o)&&a._isDown[c]&&(e._isAroundScreenCenter||(f=a.getStartMousePosition(c,void 0)),e._scene.mode===C$13.SCENE3D&&"_lastInertiaTiltMovement"===o&&e.tiltEventTypes.indexOf(c)>-1?n(e,f,a._lastMovement[c],!0):"_lastInertiaZoomMovement"==o&&a._lastMovement[c].valid&&n(e,f,a._lastMovement[c])))}}}var Ca=new f$17,me$3=new o$1p,de$3=new o$1o,fe$1=new o$1p,ue$3=new o$1o;new o$1p;var _e$1=new o$1p,he$2=new o$1p,ge$4=new o$1p,pe$3=new o$1p,ce$6=new o$1p,ye$1=new o$1p,we=new o$1p,Ce$1=new o$1p,le$5=new o$1p,Te$2=new o$1p,Pe=new o$1p,Re$2=new o$1p,Ee$3=new o$1p,Ie$2=new o$1p,q$6=new o$1p,fi=new o$1p,ui=new o$1p,Fa={orientation:new i$15};async function ha$1(e,t,i,n,r,o){var a=1;e$2b(o)&&(a=e$2a.clamp(Math.abs(o),.25,1));var s=e._scene,l=s.camera,u=s.mode;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(s.camera)),v$K.clone(e._scene.camera,e._cloneCamera),l=e._cloneCamera);var c=e.minimumZoomDistance*a,h=e.maximumZoomDistance,d=n*(r-c);d=e$2a.clamp(d,e._minimumZoomRate,e._maximumZoomRate);var f=(i.endPosition.y-i.startPosition.y)/e._scene.canvas.clientHeight,p=d*(f=Math.min(f,e.maximumMovementRatio));if(e$2b(e.thetaWindowRatio)&&Math.abs(f)<Math.abs(e.thetaWindowRatio))e.thetaWindowRatio=0;else if(e$2b(e.phiWindowRatio)&&Math.abs(f)<Math.abs(e.phiWindowRatio))e.phiWindowRatio=0;else if(!(e.enableIndoorColliDetection&&p>0&&Math.abs(r-c)<1||e.enableIndoorColliDetection&&p<0&&Math.abs(r-h)<1)){r-p<c?p=r-c-1:r-p>h&&(p=r-h);var _=Fa.orientation;if(_.heading=l.heading,_.pitch=l.pitch,_.roll=l.roll,l.frustum instanceof a$V)return void(Math.abs(p)>0&&(l.zoomIn(p),e.enableIndoorColliDetection&&$$6(e),l._adjustOrthographicFrustum()));var m=o$1o.equals(t,e._zoomMouseStart);e._isAroundScreenCenter&&(m=!1,e._useZoomWorldPosition=!1);var g,x,v=e._zoomingOnVector,y=e._rotatingZoom;if(!m&&!e._isAroundScreenCenter){if(e._zoomMouseStart=o$1o.clone(t,e._zoomMouseStart),e$2b(e._globe)&&u===C$13.SCENE2D)g=l.getPickRay(t,Ca).origin,g=o$1p.fromElements(g.y,g.z,g.x);else if(e$2b(e._globe)){var $=ea$2(e,t,me$3);$.then((e=>{g=e})),await $}e$2b(g)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=o$1p.clone(g,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,v=e._zoomingOnVector=!1,y=e._rotatingZoom=!1}if(!e._useZoomWorldPosition)return l.zoomIn(p),p<0&&(x=3),void(e.enableIndoorColliDetection&&$$6(e,x));var b=u===C$13.COLUMBUS_VIEW;if(l.positionCartographic.height<2e6&&(y=!0),!m||y){if(u===C$13.SCENE2D){var T=e._zoomWorldPosition,C=l.position;if(!o$1p.equals(T,C)&&l.positionCartographic.height<2*e._maxCoord.x){var S=l.position.x,w=o$1p.subtract(T,C,fe$1);o$1p.normalize(w,w);var E=o$1p.distance(T,C)*p/(.5*l.getMagnitude());l.move(w,.5*E),(l.position.x<0&&S>0||l.position.x>0&&S<0)&&(g=l.getPickRay(t,Ca).origin,e._zoomWorldPosition=o$1p.clone(g,e._zoomWorldPosition))}}else if(u===C$13.SCENE3D){var P=o$1p.normalize(l.position,pe$3);if(l.positionCartographic.height<3e3&&Math.abs(o$1p.dot(l.direction,P))<.6)b=!0;else{var A=s.canvas,L=ue$3;L.x=A.clientWidth/2,L.y=A.clientHeight/2;var M=void 0;if(e$2b(M)&&l.positionCartographic.height<1e6){var R=ye$1;o$1p.clone(l.position,R);var I=e._zoomWorldPosition,O=ce$6;if(O=o$1p.normalize(I,O),o$1p.dot(O,P)<0)return;var D=Ie$2,B=le$5;o$1p.clone(l.direction,B),o$1p.add(R,o$1p.multiplyByScalar(B,1e3,q$6),D);var N=Te$2,F=Pe;o$1p.subtract(I,R,N),o$1p.normalize(N,F);var U=o$1p.dot(P,F);if(U>=0)return void(e._zoomMouseStart.x=-1);var z=Math.acos(-U),G=o$1p.magnitude(R),V=o$1p.magnitude(I),k=G-p,W=o$1p.magnitude(N),H=Math.asin(e$2a.clamp(W/V*Math.sin(z),-1,1))-Math.asin(e$2a.clamp(k/V*Math.sin(z),-1,1))+z,q=we;o$1p.normalize(R,q);var j=Ce$1;j=o$1p.cross(F,q,j),j=o$1p.normalize(j,j),o$1p.normalize(o$1p.cross(q,j,q$6),B),o$1p.multiplyByScalar(o$1p.normalize(D,q$6),o$1p.magnitude(D)-p,D),o$1p.normalize(R,R),o$1p.multiplyByScalar(R,k,R);var Y=Re$2;o$1p.multiplyByScalar(o$1p.add(o$1p.multiplyByScalar(q,Math.cos(H)-1,fi),o$1p.multiplyByScalar(B,Math.sin(H),ui),q$6),k,Y),o$1p.add(R,Y,R),o$1p.normalize(D,q),o$1p.normalize(o$1p.cross(q,j,q$6),B);var X=Ee$3;return o$1p.multiplyByScalar(o$1p.add(o$1p.multiplyByScalar(q,Math.cos(H)-1,fi),o$1p.multiplyByScalar(B,Math.sin(H),ui),q$6),o$1p.magnitude(D),X),o$1p.add(D,X,D),o$1p.clone(R,l.position),o$1p.normalize(o$1p.subtract(D,R,q$6),l.direction),o$1p.clone(l.direction,l.direction),o$1p.cross(l.direction,l.up,l.right),o$1p.cross(l.right,l.direction,l.up),l.setView(Fa),void(e.enableIndoorColliDetection&&$$6(e))}if(e$2b(M)){var K=o$1p.normalize(M,_e$1),Q=o$1p.normalize(e._zoomWorldPosition,he$2),Z=o$1p.dot(Q,K);if(Z>0&&Z<1){var J=e$2a.acosClamped(Z),ee=o$1p.cross(Q,K,ge$4),te=p/(Math.abs(J)>e$2a.toRadians(20)?.75*l.positionCartographic.height:l.positionCartographic.height-p);l.rotate(ee,J*te)}}else b=!0}}e._rotatingZoom=!b}if(!m&&b||v){var ie=s$Q.wgs84ToWindowCoordinates(s,e._zoomWorldPosition,de$3),ne=(u!==C$13.COLUMBUS_VIEW&&o$1o.equals(t,e._zoomMouseStart)&&e$2b(ie)?l.getPickRay(ie,Ca):l.getPickRay(t,Ca)).direction;u===C$13.COLUMBUS_VIEW&&o$1p.fromElements(ne.y,ne.z,ne.x,ne),l.move(ne,p),e._zoomingOnVector=!0}else l.zoomIn(p);l.setView(Fa),e.enableIndoorColliDetection&&$$6(e)}}function xe$1(e,t,i,n,r,o){e._ellipsoid;var a=e._scene,s=a.camera;if(a.canvas,e._globe,e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(a.camera)),v$K.clone(a.camera,e._cloneCamera),s=e._cloneCamera),!(Math.abs(i.endPosition.y-i.startPosition.y)<1)){var l=i.endPosition.y-i.startPosition.y>0?1:-1;e._aggregator._isDown[1]&&(l=i.endPosition.y-t.y>0?.2:-.2,e._isAroundScreenCenter&&(l=i.endPosition.y-i.startPosition.y>0?.2:-.2));var u=e.maximumZoomDistance,c=l*n*7e-4*48;if(e$2b(o)){var h=o$1p.distance(s.position,o),d=1*e.minimumZoomDistance,f=n*(h-d);f=e$2a.clamp(f,e._minimumZoomRate,e._maximumZoomRate);var p=l/e._scene.canvas.clientHeight,_=f*(p=Math.min(p,e.maximumMovementRatio));if(e.enableIndoorColliDetection&&_>0&&Math.abs(h-d)<.1)return}if(!(r>u&&l<0)){o$1o.equals(t,e._zoomMouseStart)||(e._zoomMouseStart=o$1o.clone(t,e._zoomMouseStart)),e.zoomActive=!0,s.position;var m=r*c;if(!e$2b(o))return void s.zoomIn(m);var g=new o$1p;o$1p.subtract(o,s.position,g);var x=new o$1p;x=o$1p.clone(s.right,x);var v=o$1p.dot(g,x),y=new o$1p;y=o$1p.multiplyByScalar(x,v,y);var $=new o$1p;$=o$1p.subtract(g,y,$);var b=new o$1p;b=o$1p.normalize($,b),new o$1p,s.move(b,m);var T=new o$1p;T=o$1p.normalize(o,T);var C=o$1p.magnitude(o),S=xi$1;S.x=S.y=S.z=C;var w=t$13.fromCartesian3(S,Di$1),E=s.pickEllipsoid(t,w,Qa);if(e$2b(E)&&!isNaN(E.x)&&!isNaN(E.y)&&!isNaN(E.z)){E=o$1p.normalize(E,E);var P=o$1p.angleBetween(T,E);if(!e$2a.equalsEpsilon(P,0,e$2a.EPSILON10)){var A=new o$1p;A=o$1p.cross(T,E,A),s.rotate(A,P),e.enableIndoorColliDetection&&$$6(e,1)}}}}}var De$2=new f$17,Me$5=new f$17,Se$1=new o$1p;function ze$2(e,t,i){var n=e._scene.camera,r=n.getPickRay(i.startPosition,De$2).origin,o=n.getPickRay(i.endPosition,Me$5).origin,a=o$1p.subtract(r,o,Se$1),s=o$1p.magnitude(a);s>0&&(o$1p.normalize(a,a),n.move(a,s))}function _i$1(e,t,i){e$2b(i.distance)&&(i=i.distance);var n=e._scene.camera;ha$1(e,t,i,e._zoomFactor,n.getMagnitude())}var ke$1=new o$1o,be$1=new o$1o;function hi(e,t,i){if(e$2b(i.angleAndHeight))Ne$1(e,t,i.angleAndHeight);else{var n=e._scene,r=n.camera,o=n.canvas,a=o.clientWidth,s=o.clientHeight,l=ke$1;l.x=2/a*i.startPosition.x-1,l.y=2/s*(s-i.startPosition.y)-1,l=o$1o.normalize(l,l);var u=be$1;u.x=2/a*i.endPosition.x-1,u.y=2/s*(s-i.endPosition.y)-1,u=o$1o.normalize(u,u);var c=e$2a.acosClamped(l.x);l.y<0&&(c=e$2a.TWO_PI-c);var h=e$2a.acosClamped(u.x);u.y<0&&(h=e$2a.TWO_PI-h);var d=h-c;r.twistRight(d)}}function Ne$1(e,t,i){var n=e._rotateFactor*e._rotateRateRangeAdjustment;n>e._maximumRotateRate&&(n=e._maximumRotateRate),n<e._minimumRotateRate&&(n=e._minimumRotateRate);var r=e._scene,o=r.camera,a=r.canvas,s=(i.endPosition.x-i.startPosition.x)/a.clientWidth,l=n*(s=Math.min(s,e.maximumMovementRatio))*Math.PI*4;o.twistRight(l)}function Oe$2(e){var t=e._scene.mapMode2D===Rr$2.ROTATE;p$1d.equals(p$1d.IDENTITY,e._scene.camera.transform)?(b$b(e,e.enableTranslate,e.translateEventTypes,ze$2,e.inertiaTranslate,"_lastInertiaTranslateMovement"),b$b(e,e.enableZoom,e.zoomEventTypes,_i$1,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&b$b(e,e.enableRotate,e.tiltEventTypes,hi,e.inertiaSpin,"_lastInertiaTiltMovement")):(b$b(e,e.enableZoom,e.zoomEventTypes,_i$1,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&b$b(e,e.enableRotate,e.translateEventTypes,hi,e.inertiaSpin,"_lastInertiaSpinMovement"))}var gi$1=new f$17,We$1=new o$1p,la$1=new o$1p,ga=new o$1o;function pi$1(e,t){if(e._mode!==C$13.SCENE3D||e._multiViewportMode==B$e.NONE)return t;o$1o.clone(t,ga);for(var i=e._context,n=new f$18(t.x,i.drawingBufferHeight-t.y),r=new f$18,o=0;o<e._multiViewportInfo.length;o++){var a=e._multiViewportInfo[o];if(r.x=i.drawingBufferWidth*a.x,r.y=i.drawingBufferHeight*a.y,r.width=i.drawingBufferWidth*a.width,r.height=i.drawingBufferHeight*a.height,r.intersect(n)===Ae$u.INTERSECTING){var s=(n.x-r.x)/r.width,l=(n.y-r.y)/r.height;return ga.x=s*i.drawingBufferWidth,ga.y=i.drawingBufferHeight-l*i.drawingBufferHeight,ga}}return ga}function ea$2(e,t,i){var n=e._scene,r=e._globe,o=n.camera;return e$2b(r)&&n.pickPositionSupported?n.pickPositionWorldCoordinatesAsync(t,We$1,!0).then((a=>{var s,l=o.getPickRay(pi$1(e._scene,t),gi$1),u=r.pick(l,n,la$1);if((e$2b(a)?o$1p.distance(a,o.positionWC):Number.POSITIVE_INFINITY)<(e$2b(u)?o$1p.distance(u,o.positionWC):Number.POSITIVE_INFINITY))return Promise.resolve(o$1p.clone(a,i));if(e$2b(u))return Promise.resolve(o$1p.clone(u,i));if(n._environmentState.isUnderGlobeVisible&&o._positionCartographic.height<1&&e$2b(s=g$1h.rayEllipsoid(l,n._underGlobe.ellipsoid))){var c=s.start>0?s.start:s.stop;return c=Math.min(c,100),Promise.resolve(f$17.getPoint(l,c,i))}return Promise.resolve(void 0)})):Promise.resolve(void 0)}var Ve$3=new f$17,Ae$3=new f$17,ci$1=new o$1p,He=new o$1p,Ze$1=new o$1p,Fe$2=new o$1p,Be$3=new o$1m(o$1p.UNIT_X,0),Ue$1=new o$1o,Le$3=new o$1o;function Ba(e,t,i,n,r,o,a){var s=o$1m.fromPointNormal(o,a,Be$3),l=t.getPickRay(r.startPosition,Ve$3),u=g$1h.rayPlane(l,s,ci$1),c=t.getPickRay(n,Ae$3),h=g$1h.rayPlane(c,s,He);if(!e$2b(u)||!e$2b(h))return e._looking=!0,F$7(e,i,r),void o$1o.clone(i,e._translateMousePosition);var d=o$1p.subtract(u,h,Ze$1),f=d.x;d.x=d.y,d.y=d.z,d.z=f;var p=o$1p.magnitude(d);p>e$2a.EPSILON6&&(o$1p.normalize(d,d),t.move(d,p),e.enableIndoorColliDetection&&$$6(e))}function qe(e,t,i){if(o$1p.equals(t,e._translateMousePosition)||(e._looking=!1),o$1p.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking||e.enableWalk)F$7(e,t,i);else if(!e._strafing||e._isAroundScreenCenter){var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(n.camera)),v$K.clone(n.camera,e._cloneCamera),r=e._cloneCamera);var o=o$1o.clone(i.startPosition,Ue$1),a=o$1o.clone(i.endPosition,Le$3),s=o$1p.clone(o$1p.ZERO,Fe$2),l=o$1p.UNIT_X;r.position.z<e._minimumPickingTerrainHeight&&(n._context.webgpu||ea$2(e,o,ci$1).then((n=>{if(s.x>r.position.z&&e$2b(n)&&!e._isAroundScreenCenter)return o$1p.clone(n,e._strafeStartPosition),e._strafing=!0,Pa(e,t,i),void(e._strafeMousePosition=o$1o.clone(t,e._strafeMousePosition))}))),Ba(e,r,t,a,i,s,l)}else Pa(e,t,i)}var yi$1=new o$1o,Ua=new f$17,Ta=new o$1p,Ge$1=new o$1p,wi$1=new p$1d,Ye=new p$1d,Qe=new o$1p,Xe$2=new o$1m(o$1p.UNIT_X,0),La=new o$1p,qa=new a$18,Ci$1=new p$1d,Ke$1=new n$13,Je$1=new p$1e,$e$1=new o$1p;function je$1(e,t,i){if(e$2b(i.angleAndHeight)&&(i=i.angleAndHeight),(!o$1o.equals(t,e._tiltCenterMousePosition)||e._isAroundScreenCenter)&&(e._tiltCVOffMap=!1,e._looking=!1),e._looking)F$7(e,t,i);else{var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(n.camera)),v$K.clone(n.camera,e._cloneCamera),r=e._cloneCamera);var o=e._maxCoord,a=Math.abs(r.position.x)-o.x<0&&Math.abs(r.position.y)-o.y<0;(e._tiltCVOffMap||!a||r.position.z>e._minimumPickingTerrainHeight)&&(e._tiltCVOffMap=!0,li(e,t,i)),n._context.webgpu?Ri$1(e,t,i):n.pickPositionWorldCoordinatesAsync(t).then((n=>{e$2b(n)?Ri$1(e,t,i):(e._tiltCVOffMap=!0,li(e,t,i))})),e.enableIndoorColliDetection&&$$6(e)}}function li(e,t,i){var n=e._scene,r=n.camera,o=n.canvas,a=yi$1;a.x=o.clientWidth/2,a.y=o.clientHeight/2;var s,l=r.getPickRay(a,Ua),u=o$1p.UNIT_X,c=l.origin,h=l.direction,d=o$1p.dot(u,h);if(Math.abs(d)>e$2a.EPSILON6&&(s=-o$1p.dot(u,c)/d),!e$2b(s)||s<=0)return e._looking=!0,F$7(e,t,i),void o$1o.clone(t,e._tiltCenterMousePosition);var f=o$1p.multiplyByScalar(h,s,Ta);o$1p.add(c,f,f);var p=n.mapProjection,_=p.ellipsoid;o$1p.fromElements(f.y,f.z,f.x,f);var m=p.unproject(f,qa);_.cartographicToCartesian(m,f);var g=m$17.eastNorthUpToFixedFrame(f,_,wi$1),x=e._globe,v=e._ellipsoid;e._globe=void 0,e._ellipsoid=t$13.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var y=p$1d.clone(r.transform,Ci$1);r._setTransform(g),X$4(e,t,i,o$1p.UNIT_Z),r._setTransform(y),e._globe=x,e._ellipsoid=v;var $=v.maximumRadius;e._rotateFactor=1/$,e._rotateRateRangeAdjustment=$}function Ti$1(e,t,i,n,r){if(e$2b(i)){var o=e._scene,a=o.canvas,s=o.camera,l=yi$1;l.x=a.clientWidth/2,l.y=e._tiltCenterMousePosition.y;var u=s.getPickRay(l,Ua),c=o$1p.clone(o$1p.ZERO,Qe);c.x=i.x;var h=o$1m.fromPointNormal(c,t,Xe$2),d=g$1h.rayPlane(u,h,Ge$1),f=s._projection,p=f.ellipsoid;o$1p.fromElements(i.y,i.z,i.x,i);var _=f.unproject(i,qa);p.cartographicToCartesian(_,i);var m,g=m$17.eastNorthUpToFixedFrame(i,p,wi$1);e$2b(d)?(o$1p.fromElements(d.y,d.z,d.x,d),_=f.unproject(d,qa),p.cartographicToCartesian(_,d),m=m$17.eastNorthUpToFixedFrame(d,p,Ye)):m=g;var x=e._globe,v=e._ellipsoid;e._globe=void 0,e._ellipsoid=t$13.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var y=o$1p.UNIT_Z,$=p$1d.clone(s.transform,Ci$1);s._setTransform(g);var b=o$1p.cross(o$1p.UNIT_Z,o$1p.normalize(s.position,La),La),T=o$1p.dot(s.right,b);if(X$4(e,r,n,y,!1,!0),s._setTransform(m),T<0){n.startPosition.y>n.endPosition.y&&(y=void 0);var C=s.constrainedAxis;s.constrainedAxis=void 0,X$4(e,r,n,y,!0,!1),s.constrainedAxis=C}else X$4(e,r,n,y,!0,!1);if(e$2b(s.constrainedAxis)){var S=o$1p.cross(s.direction,s.constrainedAxis,$e$1);o$1p.equalsEpsilon(S,o$1p.ZERO,e$2a.EPSILON6)||(o$1p.dot(S,s.right)<0&&o$1p.negate(S,S),o$1p.cross(S,s.direction,s.up),o$1p.cross(s.direction,s.up,s.right),o$1p.normalize(s.up,s.up),o$1p.normalize(s.right,s.right))}s._setTransform($),e._globe=x,e._ellipsoid=v;var w=v.maximumRadius;e._rotateFactor=1/w,e._rotateRateRangeAdjustment=w;var E=o$1p.clone(s.positionWC,La);if(s._adjustHeightForTerrain(),!o$1p.equals(s.positionWC,E)){s._setTransform(m),s.worldToCameraCoordinatesPoint(E,E);var P=o$1p.magnitudeSquared(E);o$1p.magnitudeSquared(s.position)>P&&(o$1p.normalize(s.position,s.position),o$1p.multiplyByScalar(s.position,Math.sqrt(P),s.position));var A=o$1p.angleBetween(E,s.position),L=o$1p.cross(E,s.position,E);o$1p.normalize(L,L);var M=n$13.fromAxisAngle(L,A,Ke$1),R=p$1e.fromQuaternion(M,Je$1);p$1e.multiplyByVector(R,s.direction,s.direction),p$1e.multiplyByVector(R,s.up,s.up),o$1p.cross(s.direction,s.up,s.right),o$1p.cross(s.right,s.direction,s.up),s._setTransform($)}}}function Pi$1(e,t,i,n,r){var o=e._scene.camera;if(!e$2b(t)){var a,s=o.getPickRay(r,Ua),l=s.origin,u=s.direction,c=o$1p.dot(n,u);if(Math.abs(c)>e$2a.EPSILON6&&(a=-o$1p.dot(n,l)/c),!e$2b(a)||a<=0)return e._looking=!0,F$7(e,r,i),void o$1o.clone(r,e._tiltCenterMousePosition);t=o$1p.multiplyByScalar(u,a,Ta),o$1p.add(l,t,t)}if(o$1o.clone(r,e._tiltCenterMousePosition),e._isAroundScreenCenter){var h=new o$1p;o$1p.clone(t,h),e._tiltCenter=h}else o$1p.clone(t,e._tiltCenter)}function Ri$1(e,t,i){var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(n.camera)),r=e._cloneCamera);var o,a=o$1p.UNIT_X;o$1o.equals(t,e._tiltCenterMousePosition)&&!e._isAroundScreenCenter?o=o$1p.clone(e._tiltCenter,Ta):r.position.z<e._minimumPickingTerrainHeight?ea$2(e,t,Ta).then((n=>{Pi$1(e,o=n,i,a,t),Ti$1(e,a,o,i,t)})):Pi$1(e,o,i,a,t),Ti$1(e,a,o,i,t)}var at$4=new o$1o,it$2=new f$17,Ga=new o$1p;function Ei$1(e){var t=o$1p.UNIT_X,i=e.origin,n=e.direction;return-o$1p.dot(t,i)/o$1p.dot(t,n)}function et$3(e,t,i){e$2b(i.distance)&&(i=i.distance);var n=e._scene,r=n.camera,o=n.canvas,a=at$4;a.x=o.clientWidth/2,a.y=o.clientHeight/2;var s,l=r.getPickRay(a,it$2);if(r.position.z<e._minimumPickingTerrainHeight)ea$2(e,t,Ga).then((o=>{if(e$2b(o))n.pickPositionWorldCoordinatesAsync(t,Ga,!0).then((n=>{if(e$2b(n))s=o$1p.distance(l.origin,o);else{var a=r._projection.unproject(r.position),u=a$18.toCartesian(a);s=o$1p.distance(u,o)}Ea(e,i);var c=o$1p.normalize(r.position,Ra);ha$1(e,t,i,e._zoomFactor,s,o$1p.dot(c,r.direction))}));else{s=Ei$1(l),Ea(e,i);var a=o$1p.normalize(r.position,Ra);ha$1(e,t,i,e._zoomFactor,s,o$1p.dot(a,r.direction))}}));else{s=Ei$1(l),Ea(e,i);var u=o$1p.normalize(r.position,Ra);ha$1(e,t,i,e._zoomFactor,s,o$1p.dot(u,r.direction))}}function tt$2(e){var t=e._scene.camera;if(p$1d.equals(p$1d.IDENTITY,t.transform)){var i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),b$b(e,e.enableTilt,e.tiltEventTypes,je$1,e.inertiaSpin,"_lastInertiaTiltMovement"),b$b(e,e.enableTranslate,e.translateEventTypes,qe,e.inertiaTranslate,"_lastInertiaTranslateMovement"),b$b(e,e.enableZoom,e.zoomEventTypes,et$3,e.inertiaZoom,"_lastInertiaZoomMovement"),b$b(e,e.enableLook,e.lookEventTypes,F$7),!(e._aggregator.anyButtonDown||e$2b(e._lastInertiaZoomMovement)&&e._lastInertiaZoomMovement.active||e$2b(e._lastInertiaTranslateMovement)&&e._lastInertiaTranslateMovement.active||i.contains(e._tween))){var n=t.createCorrectPositionTween(e.bounceAnimationTime);e$2b(n)&&(e._tween=i.add(n))}i.update()}else b$b(e,e.enableRotate,e.rotateEventTypes,X$4,e.inertiaSpin,"_lastInertiaSpinMovement"),b$b(e,e.enableZoom,e.zoomEventTypes,zi$1,e.inertiaZoom,"_lastInertiaZoomMovement")}new f$17;var nt$3=new o$1m(o$1p.UNIT_X,0);new o$1p,new o$1p;var Ya=new o$1p;function Pa(e,t,i){var n=e._scene.camera,r=e._strafeStartPosition,o=e.operPlane;if(e$2b(r)&&e$2b(o)){t=i.startPosition;var a=o$1o.clone(i.endPosition,new o$1o);if(e.flipY){var s=a.y-t.y;a.y=t.y-s}var l=n.getPickRay(t,new f$17),u=n.getPickRay(a,new f$17),c=g$1h.rayPlane(l,o,new o$1p),h=g$1h.rayPlane(u,o,new o$1p);if(e$2b(c)&&e$2b(h)){var d=o$1p.normalize(c,new o$1p),f=o$1p.normalize(h,new o$1p),p=o$1p.angleBetween(d,f);if(0!=p){var _=o$1p.cross(d,f,new o$1p);n.rotate(_,p),n._adjustHeightForTerrain()}}}}var Ii$1=new o$1p,oa$1=new a$18,xi$1=new o$1p,Di$1=new t$13,rt$4=new o$1p;function Mi$1(e,t,i,n){var r=e._scene,o=r.camera,a=o$1p.magnitude(n);if(o$1p.magnitude(o.position)<a){o$1p.clone(n,e._strafeStartPosition);var s=new o$1p;e.flipY=!0,s=o$1p.add(o.direction,o.up,s),o$1p.normalize(s,s);var l=o$1m.fromPointNormal(n,s,nt$3);e.operPlane=l,e._strafing=!0,Pa(e,t,i)}else{var u=xi$1;u.x=u.y=u.z=a;var c=t$13.fromCartesian3(u,Di$1);e.operEllipsoid=c,!r.undergroundMode&&r.globe.show&&(e._limitObject=mt(e,c)),Xa(e,t,i,c),o$1p.clone(n,e._rotateStartPosition)}}function st$2(e,t,i){var n=e._scene,r=n.camera;if(p$1d.equals(r.transform,p$1d.IDENTITY)){var o=e._ellipsoid.geodeticSurfaceNormal(r.position,rt$4),a=e._ellipsoid.cartesianToCartographic(r.positionWC,oa$1).height,s=e._globe;if(o$1o.equals(t,e._rotateMousePosition))e._looking?F$7(e,t,i,o):e._rotating?X$4(e,t,i):e._strafing?Pa(e,t,i,e.operPlane):Xa(e,t,i,e.operEllipsoid);else{if(e._looking=!1,e._rotating=!1,e._strafing=!1,e.enableWalk)return e._limitObject=void 0,e._looking=!0,void F$7(e,t,i,o);e$2b(s)&&a<e._minimumPickingTerrainHeight?ea$2(e,t,Ya).then((o=>{if(!e$2b(o)){var a=new f$17(r.position,r.direction),l=s.pick(a,n,la$1);if(e$2b(l)){var u=s$Q.wgs84ToWindowCoordinates(n,l,new o$1p);ea$2(e,new o$1o(t.x,u.y+100),Ya).then((n=>{!e$2b(n)||Mi$1(e,t,i,n)}))}else if(!e$2b(o=r.pickEllipsoid(t,s.ellipsoid,Ya)))return}Mi$1(e,t,i,o)})):e$2b(r.pickEllipsoid(i.startPosition,e._ellipsoid,Ii$1))?(e._limitObject=void 0,Xa(e,t,i,e._ellipsoid),o$1p.clone(Ii$1,e._rotateStartPosition)):a>e._minimumTrackBallHeight?(e._limitObject=void 0,e._rotating=!0,X$4(e,t,i)):(e._limitObject=void 0,e._looking=!0,F$7(e,t,i,o)),o$1o.clone(t,e._rotateMousePosition)}}else X$4(e,t,i)}function X$4(e,t,i,n,r,o){r=u$_(r,!1),o=u$_(o,!1);var a=e._scene,s=a.camera;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(a.camera)),s=e._cloneCamera);var l=a.canvas,u=s.constrainedAxis;e$2b(n)&&(s.constrainedAxis=n);var c=o$1p.magnitude(s.position),h=e._rotateFactor*(c-e._rotateRateRangeAdjustment);h>e._maximumRotateRate&&(h=e._maximumRotateRate),h<e._minimumRotateRate&&(h=e._minimumRotateRate);var d=(i.startPosition.x-i.endPosition.x)/l.clientWidth,f=(i.startPosition.y-i.endPosition.y)/l.clientHeight;d=Math.min(d,e.maximumMovementRatio),f=Math.min(f,e.maximumMovementRatio);var p=Math.abs(d)<Math.abs(f),_=h*d*Math.PI*2,m=h*f*Math.PI;if("ontouchstart"in window&&(m*=2),e.deltaTheta=-m,e.thetaWindowRatio=f,e.phiWindowRatio=d,!r&&!p&&s.rotateRight(_),!o&&p){var g=Math.abs(s.pitch-m),x=s.positionCartographic.height,v=e.minimumZoomDistance+1;if(!(g>-e$2a.PI_OVER_TWO&&g<e$2a.PI_OVER_TWO)||x<v&&m<0)return void(s.constrainedAxis=u);s.rotate(s.right,m)}s.constrainedAxis=u}var Qa=e$29.clone(e$29.UNIT_W),Si$1=e$29.clone(e$29.UNIT_W);new o$1p,new o$1p,new o$1p,new o$1p;var ot$2=new o$1o,vt=new o$1o;function mt(e,t){var i=e._scene,n=i.camera,r=i.globe,o=.5*Math.PI,a=new f$17(n.position,n.direction),s=r.pick(a,i,la$1);if(e$2b(s)){var l=o$1p.subtract(n.position,s,new o$1p);o=o$1p.angleBetween(s,l)}var u=e$2a.toDegrees(o);o=e$2a.toRadians(82-u);var c=n$13.fromAxisAngle(n.right,o,Oi$1),h=p$1e.fromQuaternion(c,Ia),d=new o$1p;p$1e.multiplyByVector(h,n.direction,d),o$1p.normalize(d,d);var f=new o$1p;n$13.multiplyByVec(c,n.direction,f),o$1p.normalize(f,f);var p=new f$17(n.position,d),_=g$1h.rayEllipsoid(p,t);if(e$2b(_)){var m=_.start>0?_.start:_.stop,g=f$17.getPoint(p,m,new o$1p),x=new o$1o;if(e$2b(g)){s$Q.wgs84ToWindowCoordinates(i,g,x);var v=new o$1o(x.x,x.y-2),y=n.getPickRay(v,gi$1),$=g$1h.rayEllipsoid(y,t);if(e$2b($)){var b=$.start>0?$.start:$.stop,T=f$17.getPoint(y,b,new o$1p);if(e$2b(T))return{angle:.5*o$1p.angleBetween(T,g),division:x.y}}}}}function dt$2(e,t,i,n,r,o,a){var s=e._scene,l=s.camera,u=e._limitObject.division,c=e._limitObject.angle;if(t.y<u){var h=c,d=(n.y-i.y)*h*.5,f=(n.x-i.x)*h*.2,p=n$13.fromAxisAngle(l.right,d,new n$13);n$13.normalize(p,p);var _=p$1e.fromQuaternion(p,Ia);p$1e.multiplyByVector(_,r,o);var m=n$13.fromAxisAngle(l.direction,f,new n$13);n$13.normalize(m,m);var g=p$1e.fromQuaternion(m,Ia);return p$1e.multiplyByVector(g,o,o),!0}if(i.y>u&&n.y>u)return!1;if(i.y<u&&n.y>u)return!!e$2b(e._lastPosition)&&(r=l.pickEllipsoid(e._lastPosition,a),!0);var x=new o$1p,v=0;if(i.y<u&&n.y<u){v=(n.y-i.y)*c;var y=e$2b(e._lastPosition)?e._lastPosition:i;l.pickEllipsoid(y,a,r),x=o$1p.clone(r)}else if(i.y>u&&n.y<u){var $=new o$1o;$.y=u,$.x=($.y-i.y)/(n.y-i.y)*(n.x-i.x)+i.x,x=l.pickEllipsoid($,a),v=(n.y-$.y)*c}var b=new o$1p,T=n$13.fromAxisAngle(l.right,v,Oi$1),C=p$1e.fromQuaternion(T,Ia);p$1e.multiplyByVector(C,x,b);var S=new o$1o;s$Q.wgs84ToWindowCoordinates(s,b,S);var w=new o$1o(n.x,S.y),E=l.pickEllipsoid(w,a);return o$1p.clone(E,o),e._lastPosition=o$1o.clone(w),!0}function Xa(e,t,i,n){var r=e._scene,o=r.camera;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(r.camera)),v$K.clone(r.camera,e._cloneCamera),o=e._cloneCamera);var a=o$1o.clone(i.startPosition,ot$2),s=o$1o.clone(i.endPosition,vt),l=o.pickEllipsoid(a,n,Qa),u=o.pickEllipsoid(s,n,Si$1);if(!e$2b(l)||!e$2b(u)||isNaN(l.x)||isNaN(u.x)){var c=new f$17(o.position,o.direction),h=r.globe.pick(c,r,la$1);if(e$2b(h)){var d=s$Q.wgs84ToWindowCoordinates(r,h,new o$1p);if(!e$2b(d))return;var f=s.y-a.y,p=new o$1o(a.x,d.y),_=new o$1o(s.x,d.y+f);l=o.pickEllipsoid(p,n,Qa),u=o.pickEllipsoid(_,n,Si$1)}}if(e$2b(l)&&e$2b(u)&&!isNaN(l.x)&&!isNaN(u.x)&&(e$2b(e._limitObject)&&dt$2(e,t,a,s,l,u,n),e$2b(l)&&e$2b(u)&&!isNaN(l.x)&&!isNaN(u.x))){l=o.worldToCameraCoordinates(l,l),u=o.worldToCameraCoordinates(u,u);var m=o$1p.angleBetween(l,u),g=new o$1p;o$1p.cross(l,u,g),o$1p.magnitudeSquared(g)<1e-20&&(g=o$1p.cross(l,o$1p.UNIT_X,g),o$1p.magnitudeSquared(g)<1e-20&&(g=o$1p.cross(l,o$1p.UNIT_Y,g))),o$1p.normalize(g,g),o.rotate(g,m),e._enableFusion&&(e.panOffset.x+=i.endPosition.x-i.startPosition.x,e.panOffset.y+=i.endPosition.y-i.startPosition.y,e.panDirty=!0),e.enableIndoorColliDetection&&$$6(e),o._adjustHeightForTerrain()}}var Ra=new o$1p,ft=new a$18;function Ea(e,t){var i=e._scene,n=i.globe;if(!(e.autoTiltHeight<1)&&e$2b(n)){var r=i.camera,o=r.positionCartographic;if(o.height-n.getHeight(o)<e.autoTiltHeight){var a=t.endPosition.y-t.startPosition.y>0?1:-1,s=r.pitch+e$2a.toRadians(3)*a;s=Math.min(s,-.01),s=Math.max(s,.5*-Math.PI),r.setView({orientation:{heading:r.heading,pitch:s}})}}}function zi$1(e,t,i){var n=e._ellipsoid,r=e._scene,o=r.camera;if(e$2b(i.distance)&&(i=i.distance),e._enableFusion){var a=i.endPosition.y-i.startPosition.y;e.zoomDirty=!0;var s=e$2a.toRadians(1);a>=0?(o.frustum.fov-=s,o.frustum.fov<e.minFov&&(o.frustum.fov=e.minFov,e.zoomDirty=!1)):(o.frustum.fov+=s,o.frustum.fov>e.maxFov&&(o.frustum.fov=e.maxFov,e.zoomDirty=!1))}else{var l=n.cartesianToCartographic(o.position,ft).height;if(!(l<=e.minimumZoomHeight&&i.endPosition.y-i.startPosition.y>0||l>=e.maximumZoomHeight&&i.endPosition.y-i.startPosition.y<0)){var u=t;if(e.isAroundScreenCenter){var c=e._scene.getViewport({x:10,y:10});u={x:c.width/2,y:c.height/2}}ea$2(e,u,Ga).then((n=>{var a;if(a=e$2b(n)?o$1p.distance(o.position,n):l,"ontouchstart"in window){var s=o$1p.normalize(o.position,Ra);ha$1(e,t,i,e._zoomFactor,a,o$1p.dot(s,o.direction))}else xe$1(e,pi$1(r,t),i,e._zoomFactor,a,n);Ea(e,i),o._adjustHeightForTerrain()}))}}}var ut$4=new o$1o,ki$1=new f$17,pa=new o$1p;new o$1p;var bi$1=new p$1d;new p$1d;var Ni$1=new p$1d,Oi$1=new n$13,Ia=new p$1e,Wi$1=new a$18,Vi$1=new o$1p;function _t$1(e,t,i,n){var r=e._scene.camera;if(p$1d.equals(r.transform,p$1d.IDENTITY)){if(e$2b(i.angleAndHeight)&&(i=i.angleAndHeight),o$1o.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e.enableWalk||e._looking){var o=e._ellipsoid.geodeticSurfaceNormal(r.position,Vi$1);return void F$7(e,t,i,o)}var a=e._ellipsoid.cartesianToCartographic(r.position,Wi$1);e._tiltOnEllipsoid||a.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,gt$2(e,t,i,n)):pt$2(e,t,i,n)}}var ht$1=new a$18;function gt$2(e,t,i,n){var r=e._ellipsoid,o=e._scene,a=o.camera,s=.25*e.minimumZoomDistance,l=r.cartesianToCartographic(a.positionWC,ht$1).height;if(!(l-s-1<e$2a.EPSILON3&&i.endPosition.y-i.startPosition.y<0)){var u=o.canvas,c=ut$4;c.x=u.clientWidth/2,c.y=u.clientHeight/2;var h,d=a.getPickRay(c,ki$1),f=g$1h.rayEllipsoid(d,r);if(e$2b(f))h=f$17.getPoint(d,f.start,pa);else{if(!(l>e._minimumTrackBallHeight)){e._looking=!0;var p=e._ellipsoid.geodeticSurfaceNormal(a.position,Vi$1);return F$7(e,t,i,p),void o$1o.clone(t,e._tiltCenterMousePosition)}var _=g$1h.grazingAltitudeLocation(d,r);if(!e$2b(_))return;var m=r.cartesianToCartographic(_,Wi$1);m.height=0,h=r.cartographicToCartesian(m,pa)}if(o$1p.clone(h,e._tiltCenter),!n){var g=m$17.eastNorthUpToFixedFrame(h,r,bi$1),x=e._globe,v=e._ellipsoid;e._globe=void 0,e._ellipsoid=t$13.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var y=p$1d.clone(a.transform,Ni$1);a._setTransform(g),X$4(e,t,i,o$1p.UNIT_Z),a._setTransform(y),e._globe=x,e._ellipsoid=v;var $=v.maximumRadius;e._rotateFactor=1/$,e._rotateRateRangeAdjustment=$}}}var Ai$1=new o$1p;function $$6(e,t){var i=e._scene,n=i.camera,r=e._cloneCamera,o=n.position,a=r.position;if(!o$1p.equals(a,o)){var s=o$1p.subtract(a,o,Ai$1);o$1p.normalize(s,s);var l=i.collideDetection(s);if(e$2b(l)){i.mode===C$13.COLUMBUS_VIEW&&(l=o$1p.fromElements(l.y,l.z,l.x));var u=o$1p.distance(o,l);if(t=u$_(t,e.minimumDetectDistance),u<=o$1p.distance(o,a)||u<t)return}}v$K.clone(r,i.camera)}function Hi$1(e,t,i,n,r){var o=t._ellipsoid,a=t._scene.camera;if(!r){var s=m$17.eastNorthUpToFixedFrame(e,o,bi$1),l=t._globe,u=t._ellipsoid;t._globe=void 0,t._ellipsoid=t$13.UNIT_SPHERE,t._rotateFactor=1,t._rotateRateRangeAdjustment=1;var c=o$1p.UNIT_Z,h=p$1d.clone(a.transform,Ni$1);a._setTransform(s),X$4(t,n,i,c),a._setTransform(h),t._globe=l,t._ellipsoid=u;var d=u.maximumRadius;t._rotateFactor=1/d,t._rotateRateRangeAdjustment=d,t.enableIndoorColliDetection&&$$6(t,1),a._suspendTerrainAdjustment=!1,a._adjustHeightForTerrain()}}function pt$2(e,t,i,n){var r,o,a,s=e._ellipsoid,l=e._scene,u=l.camera;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(l.camera)),v$K.clone(l.camera,e._cloneCamera),u=e._cloneCamera),o$1o.equals(t,e._tiltCenterMousePosition)&&!e._isAroundScreenCenter?Hi$1(r=o$1p.clone(e._tiltCenter,pa),e,i,t,n):ea$2(e,t,pa).then((l=>{if(!e$2b(r=l)){if(o=u.getPickRay(t,ki$1),!e$2b(a=g$1h.rayEllipsoid(o,s)))return;r=f$17.getPoint(o,a.start,pa)}o$1o.clone(t,e._tiltCenterMousePosition),e._tiltCenter=o$1p.clone(r,e._tiltCenter),Hi$1(r,e,i,t,n)}))}var ct$2=new o$1o,yt=new o$1o,Ka=new f$17,Ja=new f$17,wt$1=new o$1p,Ct$1=new o$1p;function F$7(e,t,i,n){var r=e._scene.camera,o=ct$2;o.x=i.startPosition.x,o.y=0;var a=yt;a.x=i.endPosition.x,a.y=0;var s,l,u=r.getPickRay(o,Ka),c=r.getPickRay(a,Ja),h=0;r.frustum instanceof a$V?(s=u.origin,l=c.origin,o$1p.add(r.direction,s,s),o$1p.add(r.direction,l,l),o$1p.subtract(s,r.position,s),o$1p.subtract(l,r.position,l),o$1p.normalize(s,s),o$1p.normalize(l,l)):(s=u.direction,l=c.direction);var d=o$1p.dot(s,l);d<1&&(h=Math.acos(d)),h=i.startPosition.x>i.endPosition.x?-h:h;var f=e._horizontalRotationAxis;if(e$2b(n)?r.look(n,-h):e$2b(f)?r.look(f,-h):r.lookLeft(h),o.x=0,o.y=i.startPosition.y,a.x=0,a.y=i.endPosition.y,s=r.getPickRay(o,Ka).direction,l=r.getPickRay(a,Ja).direction,u=r.getPickRay(o,Ka),c=r.getPickRay(a,Ja),h=0,r.frustum instanceof a$V?(s=u.origin,l=c.origin,o$1p.add(r.direction,s,s),o$1p.add(r.direction,l,l),o$1p.subtract(s,r.position,s),o$1p.subtract(l,r.position,l),o$1p.normalize(s,s),o$1p.normalize(l,l)):(s=u.direction,l=c.direction),(d=o$1p.dot(s,l))<1&&(h=Math.acos(d)),h=i.startPosition.y>i.endPosition.y?-h:h,e$2b(n=u$_(n,f))){var p=r.direction,_=o$1p.negate(n,wt$1),m=o$1p.equalsEpsilon(p,n,e$2a.EPSILON2),g=o$1p.equalsEpsilon(p,_,e$2a.EPSILON2);if(m||g)(m&&h<0||g&&h>0)&&r.look(r.right,-h);else{d=o$1p.dot(p,n);var x=e$2a.acosClamped(d);h>0&&h>x&&(h=x-e$2a.EPSILON4),d=o$1p.dot(p,_),x=e$2a.acosClamped(d),h<0&&-h>x&&(h=-x+e$2a.EPSILON4);var v=o$1p.cross(n,p,Ct$1);r.look(v,h)}}else r.lookUp(h)}var M$7=new o$1p,Zi$1=new o$1p;function xa(e,t){var i=new f$14(t);M$7=o$1p.multiplyByScalar(e,.1,M$7),o$1p.add(t,M$7,M$7);var n=i.projectPointOntoPlane(M$7),r=i.projectPointOntoEllipsoid(n),o=i.projectPointOntoPlane(t),a=i.projectPointOntoEllipsoid(o),s=o$1p.subtract(r,a,Zi$1);return o$1p.normalize(s,s),s}function Da(e,t){var i=o$1m.ORIGIN_XY_PLANE;M$7=o$1p.multiplyByScalar(e,.1,M$7),o$1p.add(t,M$7,M$7);var n=o$1m.projectPointOntoPlane(i,M$7),r=o$1m.projectPointOntoPlane(i,t),o=o$1p.subtract(n,r,Zi$1);return o$1p.normalize(o,o),o}var $a=new f$17,oa$1=new a$18,q$6=new o$1p;function lt(e,t){var i=t.positionCartographic;oa$1.longitude=i.longitude,oa$1.latitude=i.latitude,oa$1.height=i.height>0?0:i.height-10,a$18.toCartesian(oa$1,void 0,q$6);var n=o$1p.subtract(q$6,t.position,q$6);o$1p.normalize(n,n),$a.origin=t.position,$a.direction=n;var r=e.pickFromRay($a);if(e$2b(r)&&e$2b(r.position)){var o=r.position;return a$18.fromCartesian(o,void 0,oa$1).height}}function Tt$2(e,t,i){var n=t.positionCartographic,r=lt(e,t);if(!e$2b(r)||Math.abs(n.height-r-i)<1)return t.position;n.height=r-Za>2?i+1.8:r+i,Za=n.height;var o=a$18.toCartesian(n);return e$2b(o)?o:t.position}var Ma=new o$1p,Sa=new o$1p;function Pt(e){var t=e._scene,i=t.camera,n=e._aggregator._flags,r=i.position,o=5*e.walkParameters.speed,a=e.walkParameters.height;n.moveForward&&za(e,xa(i.direction,r),o),n.moveBackward&&(Ma.x=-i.direction.x,Ma.y=-i.direction.y,Ma.z=-i.direction.z,za(e,xa(Ma,r),o)),n.moveLeft&&(Sa.x=-i.right.x,Sa.y=-i.right.y,Sa.z=-i.right.z,za(e,xa(Sa,r),.1*o)),n.moveRight&&za(e,xa(i.right,r),.1*o),i.position=Tt$2(t,i,a)}function za(e,t,i){var n=e._scene,r=n.camera.position;o$1p.multiplyByScalar(t,i,M$7),o$1p.add(r,M$7,M$7);var o=!0;if(!o$1p.equals(M$7,r)){var a=o$1p.subtract(M$7,r,Ai$1);o$1p.normalize(a,a);var s=n.collideDetection(a);if(e$2b(s))o$1p.distance(M$7,r)-o$1p.distance(r,s)>-e.minimumDetectDistance*Math.abs(i)&&(o=!1)}(o||!e.enableIndoorColliDetection)&&o$1p.clone(M$7,r)}function Rt$2(e){var t,i=e._scene.camera,n=e._aggregator._flags,r=i.position,o=5*e.walkParameters.speed;n.moveForward&&(t=Da(i.direction,r),i.move(t,o)),n.moveBackward&&(t=Da(i.direction,r),i.move(t,-o)),n.moveLeft&&(t=Da(i.right,r),i.move(t,-o)),n.moveRight&&(t=Da(i.right,r),i.move(t,o))}function Et$1(e){b$b(e,e.enableRotate,e.rotateEventTypes,st$2,e.inertiaSpin,"_lastInertiaSpinMovement"),b$b(e,e.enableZoom,e.zoomEventTypes,zi$1,e.inertiaZoom,"_lastInertiaZoomMovement"),b$b(e,e.enableTilt,e.tiltEventTypes,_t$1,e.inertiaSpin,"_lastInertiaTiltMovement"),b$b(e,e.enableLook,e.lookEventTypes,F$7)}_a.prototype.update=function(){p$1d.equals(this._scene.camera.transform,p$1d.IDENTITY)?(this._globe=this._scene.globe,this._ellipsoid=e$2b(this._globe)?this._globe.ellipsoid:this._scene.mapProjection.ellipsoid):(this._globe=void 0,this._ellipsoid=t$13.UNIT_SPHERE),this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight*this._scene.terrainExaggeration,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight*this._scene.terrainExaggeration,this._minimumTrackBallHeight=this.minimumTrackBallHeight*this._scene.terrainExaggeration;var e=this._ellipsoid.maximumRadius;this._rotateFactor=1/e,this._rotateRateRangeAdjustment=e;var t=this._scene.mode;t===C$13.SCENE2D?Oe$2(this):t===C$13.COLUMBUS_VIEW?(this._horizontalRotationAxis=o$1p.UNIT_Z,tt$2(this),this.enableWalk&&Rt$2(this)):t===C$13.SCENE3D&&(this._horizontalRotationAxis=void 0,Et$1(this),this.enableWalk&&Pt(this)),this._aggregator.reset()},_a.prototype.isDestroyed=function(){return!1},_a.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),i$10(this)};var k$5={},U$6=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function m$9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var E$7=8192,g$e=[],I$4=function(){function e(t,i){m$9(this,e),i=i||{},void 0===t&&(t=E$7),"number"==typeof t&&(t=new ArrayBuffer(t));var n=t.byteLength,r=i.offset?i.offset>>>0:0;t.buffer&&(n=t.byteLength-r,t=t.byteLength!==t.buffer.byteLength?t.buffer.slice(t.byteOffset+r,t.byteOffset+t.byteLength):r?t.buffer.slice(r):t.buffer),this.buffer=t,this.length=n,this.byteLength=n,this.byteOffset=0,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer),this._increment=n||E$7,this._mark=0}return U$6(e,[{key:"available",value:function(e){return void 0===e&&(e=1),this.offset+e<=this.length}},{key:"isLittleEndian",value:function(){return this.littleEndian}},{key:"setLittleEndian",value:function(){this.littleEndian=!0}},{key:"isBigEndian",value:function(){return!this.littleEndian}},{key:"setBigEndian",value:function(){this.littleEndian=!1}},{key:"skip",value:function(e){void 0===e&&(e=1),this.offset+=e}},{key:"seek",value:function(e){this.offset=e}},{key:"mark",value:function(){this._mark=this.offset}},{key:"reset",value:function(){this.offset=this._mark}},{key:"rewind",value:function(){this.offset=0}},{key:"ensureAvailable",value:function(e){if(void 0===e&&(e=1),!this.available(e)){var t=this._increment+this._increment;this._increment=t;var i=this.length+t,n=new Uint8Array(i);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=i,this._data=new DataView(this.buffer)}}},{key:"readBoolean",value:function(){return 0!==this.readUint8()}},{key:"readInt8",value:function(){return this._data.getInt8(this.offset++)}},{key:"readUint8",value:function(){return this._data.getUint8(this.offset++)}},{key:"readByte",value:function(){return this.readUint8()}},{key:"readBytes",value:function(e){void 0===e&&(e=1);for(var t=new Uint8Array(e),i=0;i<e;i++)t[i]=this.readByte();return t}},{key:"readInt16",value:function(){var e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}},{key:"readUint16",value:function(){var e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}},{key:"readInt32",value:function(){var e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readUint32",value:function(){var e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readFloat32",value:function(){var e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readFloat64",value:function(){var e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}},{key:"readChar",value:function(){return String.fromCharCode(this.readInt8())}},{key:"readChars",value:function(e){void 0===e&&(e=1),g$e.length=e;for(var t=0;t<e;t++)g$e[t]=this.readChar();return g$e.join("")}},{key:"writeBoolean",value:function(e){this.writeUint8(e?255:0)}},{key:"writeInt8",value:function(e){this.ensureAvailable(1),this._data.setInt8(this.offset++,e)}},{key:"writeUint8",value:function(e){this.ensureAvailable(1),this._data.setUint8(this.offset++,e)}},{key:"writeByte",value:function(e){this.writeUint8(e)}},{key:"writeBytes",value:function(e){this.ensureAvailable(e.length);for(var t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t])}},{key:"writeInt16",value:function(e){this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2}},{key:"writeUint16",value:function(e){this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2}},{key:"writeInt32",value:function(e){this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeUint32",value:function(e){this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeFloat32",value:function(e){this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeFloat64",value:function(e){this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8}},{key:"writeChar",value:function(e){this.writeUint8(e.charCodeAt(0))}},{key:"writeChars",value:function(e){for(var t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t))}},{key:"toArray",value:function(){return new Uint8Array(this.buffer,0,this.offset)}}]),e}(),s$9={};function A$9(e,t){if(e)throw new TypeError("Not a valid NetCDF v3.x file: "+t)}function b$a(e){e.offset%4!=0&&e.skip(4-e.offset%4)}function T$9(e){var t=e.readUint32(),i=e.readChars(t);return b$a(e),i}s$9.notNetcdf=A$9,s$9.padding=b$a,s$9.readName=T$9;var a$6={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6};function N$3(e){switch(Number(e)){case a$6.BYTE:return"byte";case a$6.CHAR:return"char";case a$6.SHORT:return"short";case a$6.INT:return"int";case a$6.FLOAT:return"float";case a$6.DOUBLE:return"double";default:return"undefined"}}function v$7(e,t){if(1!==e){for(var i=new Array(e),n=0;n<e;n++)i[n]=t();return i}return t()}function F$6(e,t,i){switch(t){case a$6.BYTE:return e.readBytes(i);case a$6.CHAR:return L$9(e.readChars(i));case a$6.SHORT:return v$7(i,e.readInt16.bind(e));case a$6.INT:return v$7(i,e.readInt32.bind(e));case a$6.FLOAT:return v$7(i,e.readFloat32.bind(e));case a$6.DOUBLE:return v$7(i,e.readFloat64.bind(e));default:return void A$9(!0,"non valid type "+t)}}function L$9(e){return 0===e.charCodeAt(e.length-1)?e.substring(0,e.length-1):e}var d$d=0,D$6=10,O$7=11,p$5=12;function R$7(e){var t={recordDimension:{length:e.readUint32()}},i=S$3(e);t.recordDimension.id=i.recordId,t.recordDimension.name=i.recordName,t.dimensions=i.dimensions,t.globalAttributes=B$6(e);var n=H$8(e,i.recordId);return t.variables=n.variables,t.recordDimension.recordStep=n.recordStep,t}function S$3(e){var t,i,n=e.readUint32();if(n===d$d)return s$9.notNetcdf(e.readUint32()!==d$d,"wrong empty tag for list of dimensions"),[];s$9.notNetcdf(n!==D$6,"wrong tag for list of dimensions");for(var r=e.readUint32(),o=new Array(r),a=0;a<r;a++){var s=s$9.readName(e),l=e.readUint32();0===l&&(t=a,i=s),o[a]={name:s,size:l}}return{dimensions:o,recordId:t,recordName:i}}function B$6(e){var t=e.readUint32();if(t===d$d)return s$9.notNetcdf(e.readUint32()!==d$d,"wrong empty tag for list of attributes"),[];s$9.notNetcdf(t!==p$5,"wrong tag for list of attributes");for(var i=e.readUint32(),n=new Array(i),r=0;r<i;r++){var o=s$9.readName(e),a=e.readUint32();s$9.notNetcdf(a<1||a>6,"non valid type "+a);var s=e.readUint32(),l=F$6(e,a,s);s$9.padding(e),n[r]={name:o,type:N$3(a),value:l}}return n}function H$8(e,t){var i=e.readUint32(),n=0;if(i===d$d)return s$9.notNetcdf(e.readUint32()!==d$d,"wrong empty tag for list of variables"),[];s$9.notNetcdf(i!==O$7,"wrong tag for list of variables");for(var r=e.readUint32(),o=new Array(r),a=0;a<r;a++){for(var s=s$9.readName(e),l=e.readUint32(),u=new Array(l),c=0;c<l;c++)u[c]=e.readUint32();var h=B$6(e),d=e.readUint32();s$9.notNetcdf(d<1&&d>6,"non valid type "+d);var f=e.readUint32(),p=e.readUint32();u[0]===t&&(n+=f),o[a]={name:s,dimensions:u,attributes:h,type:N$3(d),size:f,offset:p,record:u[0]===t}}return{variables:o,recordStep:n}}!function(){function e(t){m$9(this,e);var i=new I$4(t);i.setBigEndian(),s$9.notNetcdf("CDF"!==i.readChars(3),"should start with CDF");var n=i.readByte();s$9.notNetcdf(2===n,"64-bit offset format not supported yet"),s$9.notNetcdf(1!==n,"unknown version"),this.header=R$7(i),this.header.version=n,this.buffer=i}U$6(e,[{key:"getDataVariable",value:function(e){var t;return t="string"==typeof e?this.header.variables.find((function(t){return t.name===e})):e,s$9.notNetcdf(void 0===t,"variable not found"),this.buffer.seek(t.offset),t.record?data.record(this.buffer,t,this.header.recordDimension):data.nonRecord(this.buffer,t)}},{key:"version",get:function(){return 1===this.header.version?"classic format":"64-bit offset format"}},{key:"recordDimension",get:function(){return this.header.recordDimension}},{key:"dimensions",get:function(){return this.header.dimensions}},{key:"globalAttributes",get:function(){return this.header.globalAttributes}},{key:"variables",get:function(){return this.header.variables}}]),k$5.NetCDFReader=e}();var e$4={VolumeRendering:0,Slice:1,ContourValue:2},gt$1=Object.freeze(e$4),Ft$1="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nvarying vec4 vTexCoord;\nvarying vec4 vNearTexCoord;\n#ifdef HAS_LIGHT\nvarying vec4 vPositionMC;\n#endif\nuniform vec3 u_volumeBoxSize;\nuniform vec3 scale;\nuniform vec3 uOffset;\n\nvoid main()\n{\n vTexCoord = vec4(aTexCoord0.xyz, 1.0);\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n",Rt$1="varying vec4 vTexCoord;\nvarying vec4 vNearTexCoord;\nuniform sampler2D u_colorTable;\nuniform vec4 u_minMaxValueAndFiltration;\nuniform vec3 u_maxVisibleTextureCoord;\nuniform vec3 u_minVisibleTextureCoord;\n// opacity and color textures\nuniform sampler2D u_opacityTexture;\nuniform sampler2D u_colorTexture;\nvec4 getColorForValue(float tValue)\n{\n float texCoord = tValue;\n\ttexCoord = clamp(texCoord, 0.0, 1.0);\n vec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\n tColor.a = texture2D(u_opacityTexture, vec2(texCoord, 0.5)).r;\n return tColor;\n}\n\nvec4 getSampleValue(vec3 pos)\n{\n\tif(vTexCoord.x > u_maxVisibleTextureCoord.x || vTexCoord.x < u_minVisibleTextureCoord.x\n\t|| vTexCoord.y > u_maxVisibleTextureCoord.y || vTexCoord.y < u_minVisibleTextureCoord.y\n\t|| vTexCoord.z > u_maxVisibleTextureCoord.z || vTexCoord.z < u_minVisibleTextureCoord.z)\n\t{\n\t\tdiscard;\n\t}\n\n float noValue;\n float value = czm_getVolumeValue(pos, noValue);\n\tvec4 color = getColorForValue(value);\n\treturn color;\n}\nvoid main()\n{\n vec3 texcood = vTexCoord.xyz;\n if(uFilterMode > 0.5)\n {\n texcood = vNearTexCoord.xyz;\n }\n\tgl_FragColor = getSampleValue(texcood);\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x3e8eee=(_0x319485=!0,function(e,t){var i=_0x319485?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x319485=!1,i}),_0x8b3a3=_0x3e8eee(void 0,(function(){return _0x8b3a3.toString().search("(((.+)+)+)+$").toString().constructor(_0x8b3a3).search("(((.+)+)+)+$")})),_0x319485;_0x8b3a3();var Mt$1="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nvarying vec3 positionEC;\nvarying vec3 vTexCoord;\nvoid main()\n{\n positionEC = (czm_modelView * aPosition).xyz;\n vTexCoord = aTexCoord0.xyz;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",_0x193d54=(_0x126734=!0,function(e,t){var i=_0x126734?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x126734=!1,i}),_0x44fe4e=_0x193d54(void 0,(function(){return _0x44fe4e.toString().search("(((.+)+)+)+$").toString().constructor(_0x44fe4e).search("(((.+)+)+)+$")})),_0x126734;_0x44fe4e();var Nt$1="uniform vec3 u_camTexCoord;\nuniform vec4 u_minMaxValueAndFiltration;\n// opacity and color textures\nuniform sampler2D u_opacityTexture;\nuniform sampler2D u_colorTexture;\nuniform float u_sampleDistance;\nuniform vec4 u_gradientOpacityInfo;\n#ifdef CLIP_PLANE\nuniform vec4 u_clip_planes[6];\nuniform int u_clip_planes_count;\n#endif\n#ifdef APPLY_LIGHTING\n uniform vec3 uDiffuse;\n uniform vec3 uSpecular;\n uniform vec3 uAmbient;\n uniform float uShiness;\n#endif\n\nvarying vec3 positionEC;\nvarying vec3 vTexCoord;\n\nfloat realValueToScalarValue(float value){\n float minValue = u_minMaxValueAndFiltration.z;\n float maxValue = u_minMaxValueAndFiltration.w;\n return (value - minValue) / (maxValue - minValue);\n}\nfloat scalarValueToReaValue(float value){\n float minValue = u_minMaxValueAndFiltration.x;\n float maxValue = u_minMaxValueAndFiltration.y;\n return minValue + value * (maxValue - minValue);\n}\nfloat getTextureValue(vec3 pos)\n{\n float noValue;\n #ifdef MultiResolution\n float value = czm_getVolumeValueMultiResolution(pos, noValue);\n #else\n float value = czm_getVolumeValue(pos, noValue);\n #endif\n value = scalarValueToReaValue(value);\n return value;\n}\n\n// Given a normal compute the gradient opacity factors\nfloat computeGradientOpacityFactor(vec4 normal, float goscale, float goshift, float gomin, float gomax)\n{\n#ifdef GRADIENT_OPACITY\n return clamp(normal.a*goscale + goshift, gomin, gomax);\n#else\n return 1.0;\n#endif\n}\n\n// compute the normal and gradient magnitude for a position\nvec4 computeNormal(vec3 pos, float scalar, vec3 tstep)\n{\n vec4 result;\n result.x = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)) - scalar;\n result.y = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)) - scalar;\n result.z = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)) - scalar;\n // divide by spacing\n vec3 vSpacing = vec3(1.0);\n result.xyz /= vSpacing;\n result.w = length(result.xyz);\n // rotate to View Coords\n //result.xyz = result.x * vPlaneNormal0 + result.y * vPlaneNormal2 + result.z * vPlaneNormal4;\n if (result.w > 0.0)\n {\n result.xyz /= result.w;\n }\n return result;\n}\n\n#ifdef APPLY_LIGHTING\nvoid applyLighting(inout vec4 tColor, vec3 normal)\n{\n vec3 diffuse = uDiffuse;\n vec3 specular = uSpecular;\n vec3 ambient = uAmbient;\n float shiness = uShiness;\n vec3 normalEC = normalize(czm_normal * normal);\n float ndot = max( dot( normalEC, czm_sunDirectionEC ), 0.0 );\n ndot = ndot * 0.5 + 0.5;\n diffuse = diffuse * ndot;\n specular = specular * czm_getSpecular(czm_sunDirectionEC, normalize(-positionEC), normalEC, shiness);\n tColor.rgb = tColor.rgb*(diffuse + ambient) + specular;\n}\n#endif\n\nvec4 getColorForValue(vec3 posIS, vec3 stepIS, float tValue)\n{\n vec4 goFactor = vec4(1.0,1.0,1.0,1.0);\n#if defined(GRADIENT_OPACITY) || defined(APPLY_LIGHTING)\n vec4 normal0 = computeNormal(posIS, tValue, stepIS);\n#endif\n#ifdef GRADIENT_OPACITY\n float goscale = u_gradientOpacityInfo.z;\n float goshift = u_gradientOpacityInfo.w;\n float gomin = u_gradientOpacityInfo.x;\n float gomax = u_gradientOpacityInfo.y;\n goFactor.x = computeGradientOpacityFactor(normal0, goscale, goshift, gomin, gomax);\n#endif\n float texCoord = realValueToScalarValue(tValue);\n\ttexCoord = clamp(texCoord, 0.0, 1.0);\n vec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\n tColor.a = goFactor.x * texture2D(u_opacityTexture, vec2(texCoord, 0.5)).r;\n#ifdef APPLY_LIGHTING\n applyLighting(tColor, normal0.xyz);\n#endif\n return tColor;\n}\n\nvec4 applyBlend(vec3 posIS, vec3 endIS, vec3 stepIS, float texSampleDist)\n{\n float raySteps = 1.0 / texSampleDist;\n float jitter = 0.1;\n float stepsTraveled = jitter;\n // local vars for the loop\n vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n float tValue;\n vec4 tColor;\n // Perform initial step at the volume boundary\n // compute the scalar\n tValue = getTextureValue(posIS);\n // now map through opacity and color\n tColor = getColorForValue(posIS, stepIS, tValue);\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps);\n return tColor;\n }\n\n tColor.a = 1.0 - pow(1.0 - tColor.a, jitter);\n color = vec4(tColor.rgb * tColor.a, tColor.a);\n posIS += (jitter * stepIS);\n\n bool find = false;\n\n for (int i = 0; i < 5000 ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n // compute the scalar\n tValue = getTextureValue(posIS);\n // now map through opacity and color\n tColor = getColorForValue(posIS, stepIS, tValue);\n float mix = (1.0 - color.a);\n if(!find){\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n }\n stepsTraveled++;\n posIS += stepIS;\n if(posIS.x > 1.0 || posIS.x < 0.0 || posIS.y > 1.0 || posIS.y < 0.0 || posIS.z > 1.0 || posIS.z < 0.0){\n find = true;\n#ifndef WEBGPU\n break;\n#endif \n }\n if (color.a > 0.99) { \n color.a = 1.0;\n find = true;\n#ifndef WEBGPU\n break;\n#endif \n }\n }\n\n return vec4(color.rgb/color.a, color.a);\n}\n\nvec2 intersectBox(vec3 texel_zero, vec3 texel_dir_norm)\n{\n vec3 minV = vec3(0.0);\n vec3 maxV = vec3(1.0);\n float t1,t2;\n t1=(minV.x-texel_zero.x)/texel_dir_norm.x;\n t2=(maxV.x-texel_zero.x)/texel_dir_norm.x;\n float tminX=min(t1,t2);\n float tmaxX=max(t1,t2);\n t1=(minV.y-texel_zero.y)/texel_dir_norm.y;\n t2=(maxV.y-texel_zero.y)/texel_dir_norm.y;\n float tminY=min(t1,t2);\n float tmaxY=max(t1,t2);\n t1=(minV.z-texel_zero.z)/texel_dir_norm.z;\n t2=(maxV.z-texel_zero.z)/texel_dir_norm.z;\n float tminZ=min(t1,t2);\n float tmaxZ=max(t1,t2);\n float largest_tmin = max(max(tminX, tminY), max(tminX, tminZ));\n float smallest_tmax = min(min(tmaxX, tmaxY), min(tmaxX, tmaxZ));\n vec2 dists = vec2(largest_tmin,smallest_tmax);\n \n#ifdef CLIP_PLANE\n for(int i = 0; i < 6; i++){\n if(i == u_clip_planes_count){\n break;\n }\n float rayDirRatio = dot(texel_dir_norm, u_clip_planes[i].xyz);\n float equationResult = dot(texel_zero.xyz, u_clip_planes[i].xyz) + u_clip_planes[i].w;\n if (rayDirRatio == 0.0){\n if (equationResult < 0.0){\n dists.x = dists.y;\n }\n continue;\n }\n float result = -1.0 * equationResult / rayDirRatio;\n if (rayDirRatio < 0.0){\n dists.y = min(dists.y, result);\n }\n else {\n dists.x = max(dists.x, result);\n }\n }\n#endif\n return dists;\n}\nvoid main()\n{\n vec3 cameraDir = normalize(positionEC.xyz);\n vec3 localZero = u_camTexCoord;\n vec3 localOne = vTexCoord.xyz;\n vec3 texel_dir_norm = normalize(localOne.xyz - localZero.xyz);\n\n vec3 texel_zero = localZero.xyz;\n vec2 nearFar = intersectBox(texel_zero, texel_dir_norm);\n // 采样间隔受相机与物体之间的距离控制\n float texSampleDist = u_sampleDistance;\n vec3 texel_step = texSampleDist * texel_dir_norm;\n float tstep = length(texel_step);\n float tnear = max(nearFar.x, 0.0) + tstep;\n float tfar = nearFar.y - tstep;\n vec3 coord;\n if(tnear > tfar){\n discard;\n }\n else{\n coord = texel_zero + texel_dir_norm * tnear;\n }\n gl_FragColor = applyBlend(coord, texel_zero + texel_dir_norm * tfar, texel_step, texSampleDist);\n}",_0xe73feb=(_0x2e5f40=!0,function(e,t){var i=_0x2e5f40?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e5f40=!1,i}),_0x31346f=_0xe73feb(void 0,(function(){return _0x31346f.toString().search("(((.+)+)+)+$").toString().constructor(_0x31346f).search("(((.+)+)+)+$")})),_0x2e5f40;_0x31346f();var _0x377458=[[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,9,1,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,11,2,0,9,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,3,8,2,8,11,11,8,9,-1,-1,-1,-1,-1,-1,-1],[3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,8,0,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,2,10,1,10,9,9,10,8,-1,-1,-1,-1,-1,-1,-1],[3,1,11,10,3,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,11,0,11,8,8,11,10,-1,-1,-1,-1,-1,-1,-1],[3,0,9,3,9,10,10,9,11,-1,-1,-1,-1,-1,-1,-1],[9,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,7,4,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,9,1,4,1,7,7,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,7,4,3,4,0,1,11,2,-1,-1,-1,-1,-1,-1,-1],[9,11,2,9,2,0,8,7,4,-1,-1,-1,-1,-1,-1,-1],[2,9,11,2,7,9,2,3,7,7,4,9,-1,-1,-1,-1],[8,7,4,3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,7,4,10,4,2,2,4,0,-1,-1,-1,-1,-1,-1,-1],[9,1,0,8,7,4,2,10,3,-1,-1,-1,-1,-1,-1,-1],[4,10,7,9,10,4,9,2,10,9,1,2,-1,-1,-1,-1],[3,1,11,3,11,10,7,4,8,-1,-1,-1,-1,-1,-1,-1],[1,11,10,1,10,4,1,4,0,7,4,10,-1,-1,-1,-1],[4,8,7,9,10,0,9,11,10,10,3,0,-1,-1,-1,-1],[4,10,7,4,9,10,9,11,10,-1,-1,-1,-1,-1,-1,-1],[9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,4,5,1,0,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,4,5,8,5,3,3,5,1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,11,2,4,5,9,-1,-1,-1,-1,-1,-1,-1],[5,11,2,5,2,4,4,2,0,-1,-1,-1,-1,-1,-1,-1],[2,5,11,3,5,2,3,4,5,3,8,4,-1,-1,-1,-1],[9,4,5,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,0,10,8,4,5,9,-1,-1,-1,-1,-1,-1,-1],[0,4,5,0,5,1,2,10,3,-1,-1,-1,-1,-1,-1,-1],[2,5,1,2,8,5,2,10,8,4,5,8,-1,-1,-1,-1],[11,10,3,11,3,1,9,4,5,-1,-1,-1,-1,-1,-1,-1],[4,5,9,0,1,8,8,1,11,8,11,10,-1,-1,-1,-1],[5,0,4,5,10,0,5,11,10,10,3,0,-1,-1,-1,-1],[5,8,4,5,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1],[9,8,7,5,9,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,0,3,9,3,5,5,3,7,-1,-1,-1,-1,-1,-1,-1],[0,8,7,0,7,1,1,7,5,-1,-1,-1,-1,-1,-1,-1],[1,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,7,9,7,5,11,2,1,-1,-1,-1,-1,-1,-1,-1],[11,2,1,9,0,5,5,0,3,5,3,7,-1,-1,-1,-1],[8,2,0,8,5,2,8,7,5,11,2,5,-1,-1,-1,-1],[2,5,11,2,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1],[7,5,9,7,9,8,3,2,10,-1,-1,-1,-1,-1,-1,-1],[9,7,5,9,2,7,9,0,2,2,10,7,-1,-1,-1,-1],[2,10,3,0,8,1,1,8,7,1,7,5,-1,-1,-1,-1],[10,1,2,10,7,1,7,5,1,-1,-1,-1,-1,-1,-1,-1],[9,8,5,8,7,5,11,3,1,11,10,3,-1,-1,-1,-1],[5,0,7,5,9,0,7,0,10,1,11,0,10,0,11,-1],[10,0,11,10,3,0,11,0,5,8,7,0,5,0,7,-1],[10,5,11,7,5,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,1,0,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,1,8,9,5,6,11,-1,-1,-1,-1,-1,-1,-1],[1,5,6,2,1,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,5,6,1,6,2,3,8,0,-1,-1,-1,-1,-1,-1,-1],[9,5,6,9,6,0,0,6,2,-1,-1,-1,-1,-1,-1,-1],[5,8,9,5,2,8,5,6,2,3,8,2,-1,-1,-1,-1],[2,10,3,11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,8,0,10,0,2,11,5,6,-1,-1,-1,-1,-1,-1,-1],[0,9,1,2,10,3,5,6,11,-1,-1,-1,-1,-1,-1,-1],[5,6,11,1,2,9,9,2,10,9,10,8,-1,-1,-1,-1],[6,10,3,6,3,5,5,3,1,-1,-1,-1,-1,-1,-1,-1],[0,10,8,0,5,10,0,1,5,5,6,10,-1,-1,-1,-1],[3,6,10,0,6,3,0,5,6,0,9,5,-1,-1,-1,-1],[6,9,5,6,10,9,10,8,9,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,4,3,7,6,11,5,-1,-1,-1,-1,-1,-1,-1],[1,0,9,5,6,11,8,7,4,-1,-1,-1,-1,-1,-1,-1],[11,5,6,1,7,9,1,3,7,7,4,9,-1,-1,-1,-1],[6,2,1,6,1,5,4,8,7,-1,-1,-1,-1,-1,-1,-1],[1,5,2,5,6,2,3,4,0,3,7,4,-1,-1,-1,-1],[8,7,4,9,5,0,0,5,6,0,6,2,-1,-1,-1,-1],[7,9,3,7,4,9,3,9,2,5,6,9,2,9,6,-1],[3,2,10,7,4,8,11,5,6,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,2,7,4,0,2,2,10,7,-1,-1,-1,-1],[0,9,1,4,8,7,2,10,3,5,6,11,-1,-1,-1,-1],[9,1,2,9,2,10,9,10,4,7,4,10,5,6,11,-1],[8,7,4,3,5,10,3,1,5,5,6,10,-1,-1,-1,-1],[5,10,1,5,6,10,1,10,0,7,4,10,0,10,4,-1],[0,9,5,0,5,6,0,6,3,10,3,6,8,7,4,-1],[6,9,5,6,10,9,4,9,7,7,9,10,-1,-1,-1,-1],[11,9,4,6,11,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,6,11,4,11,9,0,3,8,-1,-1,-1,-1,-1,-1,-1],[11,1,0,11,0,6,6,0,4,-1,-1,-1,-1,-1,-1,-1],[8,1,3,8,6,1,8,4,6,6,11,1,-1,-1,-1,-1],[1,9,4,1,4,2,2,4,6,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,9,2,2,9,4,2,4,6,-1,-1,-1,-1],[0,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,2,3,8,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1],[11,9,4,11,4,6,10,3,2,-1,-1,-1,-1,-1,-1,-1],[0,2,8,2,10,8,4,11,9,4,6,11,-1,-1,-1,-1],[3,2,10,0,6,1,0,4,6,6,11,1,-1,-1,-1,-1],[6,1,4,6,11,1,4,1,8,2,10,1,8,1,10,-1],[9,4,6,9,6,3,9,3,1,10,3,6,-1,-1,-1,-1],[8,1,10,8,0,1,10,1,6,9,4,1,6,1,4,-1],[3,6,10,3,0,6,0,4,6,-1,-1,-1,-1,-1,-1,-1],[6,8,4,10,8,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,6,11,7,11,8,8,11,9,-1,-1,-1,-1,-1,-1,-1],[0,3,7,0,7,11,0,11,9,6,11,7,-1,-1,-1,-1],[11,7,6,1,7,11,1,8,7,1,0,8,-1,-1,-1,-1],[11,7,6,11,1,7,1,3,7,-1,-1,-1,-1,-1,-1,-1],[1,6,2,1,8,6,1,9,8,8,7,6,-1,-1,-1,-1],[2,9,6,2,1,9,6,9,7,0,3,9,7,9,3,-1],[7,0,8,7,6,0,6,2,0,-1,-1,-1,-1,-1,-1,-1],[7,2,3,6,2,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,10,3,11,8,6,11,9,8,8,7,6,-1,-1,-1,-1],[2,7,0,2,10,7,0,7,9,6,11,7,9,7,11,-1],[1,0,8,1,8,7,1,7,11,6,11,7,2,10,3,-1],[10,1,2,10,7,1,11,1,6,6,1,7,-1,-1,-1,-1],[8,6,9,8,7,6,9,6,1,10,3,6,1,6,3,-1],[0,1,9,10,7,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,0,8,7,6,0,3,0,10,10,0,6,-1,-1,-1,-1],[7,6,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,9,1,8,1,3,10,6,7,-1,-1,-1,-1,-1,-1,-1],[11,2,1,6,7,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,8,0,6,7,10,-1,-1,-1,-1,-1,-1,-1],[2,0,9,2,9,11,6,7,10,-1,-1,-1,-1,-1,-1,-1],[6,7,10,2,3,11,11,3,8,11,8,9,-1,-1,-1,-1],[7,3,2,6,7,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,8,0,7,0,6,6,0,2,-1,-1,-1,-1,-1,-1,-1],[2,6,7,2,7,3,0,9,1,-1,-1,-1,-1,-1,-1,-1],[1,2,6,1,6,8,1,8,9,8,6,7,-1,-1,-1,-1],[11,6,7,11,7,1,1,7,3,-1,-1,-1,-1,-1,-1,-1],[11,6,7,1,11,7,1,7,8,1,8,0,-1,-1,-1,-1],[0,7,3,0,11,7,0,9,11,6,7,11,-1,-1,-1,-1],[7,11,6,7,8,11,8,9,11,-1,-1,-1,-1,-1,-1,-1],[6,4,8,10,6,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,6,3,6,0,0,6,4,-1,-1,-1,-1,-1,-1,-1],[8,10,6,8,6,4,9,1,0,-1,-1,-1,-1,-1,-1,-1],[9,6,4,9,3,6,9,1,3,10,6,3,-1,-1,-1,-1],[6,4,8,6,8,10,2,1,11,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,10,0,0,10,6,0,6,4,-1,-1,-1,-1],[4,8,10,4,10,6,0,9,2,2,9,11,-1,-1,-1,-1],[11,3,9,11,2,3,9,3,4,10,6,3,4,3,6,-1],[8,3,2,8,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1],[0,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,4,3,2,6,4,4,8,3,-1,-1,-1,-1],[1,4,9,1,2,4,2,6,4,-1,-1,-1,-1,-1,-1,-1],[8,3,1,8,1,6,8,6,4,6,1,11,-1,-1,-1,-1],[11,0,1,11,6,0,6,4,0,-1,-1,-1,-1,-1,-1,-1],[4,3,6,4,8,3,6,3,11,0,9,3,11,3,9,-1],[11,4,9,6,4,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,5,9,7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,5,9,10,6,7,-1,-1,-1,-1,-1,-1,-1],[5,1,0,5,0,4,7,10,6,-1,-1,-1,-1,-1,-1,-1],[10,6,7,8,4,3,3,4,5,3,5,1,-1,-1,-1,-1],[9,4,5,11,2,1,7,10,6,-1,-1,-1,-1,-1,-1,-1],[6,7,10,1,11,2,0,3,8,4,5,9,-1,-1,-1,-1],[7,10,6,5,11,4,4,11,2,4,2,0,-1,-1,-1,-1],[3,8,4,3,4,5,3,5,2,11,2,5,10,6,7,-1],[7,3,2,7,2,6,5,9,4,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,6,8,0,2,6,6,7,8,-1,-1,-1,-1],[3,2,6,3,6,7,1,0,5,5,0,4,-1,-1,-1,-1],[6,8,2,6,7,8,2,8,1,4,5,8,1,8,5,-1],[9,4,5,11,6,1,1,6,7,1,7,3,-1,-1,-1,-1],[1,11,6,1,6,7,1,7,0,8,0,7,9,4,5,-1],[4,11,0,4,5,11,0,11,3,6,7,11,3,11,7,-1],[7,11,6,7,8,11,5,11,4,4,11,8,-1,-1,-1,-1],[6,5,9,6,9,10,10,9,8,-1,-1,-1,-1,-1,-1,-1],[3,10,6,0,3,6,0,6,5,0,5,9,-1,-1,-1,-1],[0,8,10,0,10,5,0,5,1,5,10,6,-1,-1,-1,-1],[6,3,10,6,5,3,5,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,10,5,9,8,10,10,6,5,-1,-1,-1,-1],[0,3,10,0,10,6,0,6,9,5,9,6,1,11,2,-1],[10,5,8,10,6,5,8,5,0,11,2,5,0,5,2,-1],[6,3,10,6,5,3,2,3,11,11,3,5,-1,-1,-1,-1],[5,9,8,5,8,2,5,2,6,3,2,8,-1,-1,-1,-1],[9,6,5,9,0,6,0,2,6,-1,-1,-1,-1,-1,-1,-1],[1,8,5,1,0,8,5,8,6,3,2,8,6,8,2,-1],[1,6,5,2,6,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,6,3,1,11,6,3,6,8,5,9,6,8,6,9,-1],[11,0,1,11,6,0,9,0,5,5,0,6,-1,-1,-1,-1],[0,8,3,5,11,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,6,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,7,10,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,10,5,7,8,0,3,-1,-1,-1,-1,-1,-1,-1],[5,7,10,5,10,11,1,0,9,-1,-1,-1,-1,-1,-1,-1],[11,5,7,11,7,10,9,1,8,8,1,3,-1,-1,-1,-1],[10,2,1,10,1,7,7,1,5,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,7,2,1,5,7,7,10,2,-1,-1,-1,-1],[9,5,7,9,7,2,9,2,0,2,7,10,-1,-1,-1,-1],[7,2,5,7,10,2,5,2,9,3,8,2,9,2,8,-1],[2,11,5,2,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1],[8,0,2,8,2,5,8,5,7,11,5,2,-1,-1,-1,-1],[9,1,0,5,3,11,5,7,3,3,2,11,-1,-1,-1,-1],[9,2,8,9,1,2,8,2,7,11,5,2,7,2,5,-1],[1,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,7,8,0,1,7,1,5,7,-1,-1,-1,-1,-1,-1,-1],[9,3,0,9,5,3,5,7,3,-1,-1,-1,-1,-1,-1,-1],[9,7,8,5,7,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[5,4,8,5,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1],[5,4,0,5,0,10,5,10,11,10,0,3,-1,-1,-1,-1],[0,9,1,8,11,4,8,10,11,11,5,4,-1,-1,-1,-1],[11,4,10,11,5,4,10,4,3,9,1,4,3,4,1,-1],[2,1,5,2,5,8,2,8,10,4,8,5,-1,-1,-1,-1],[0,10,4,0,3,10,4,10,5,2,1,10,5,10,1,-1],[0,5,2,0,9,5,2,5,10,4,8,5,10,5,8,-1],[9,5,4,2,3,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,11,5,3,2,5,3,5,4,3,4,8,-1,-1,-1,-1],[5,2,11,5,4,2,4,0,2,-1,-1,-1,-1,-1,-1,-1],[3,2,11,3,11,5,3,5,8,4,8,5,0,9,1,-1],[5,2,11,5,4,2,1,2,9,9,2,4,-1,-1,-1,-1],[8,5,4,8,3,5,3,1,5,-1,-1,-1,-1,-1,-1,-1],[0,5,4,1,5,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,5,4,8,3,5,9,5,0,0,5,3,-1,-1,-1,-1],[9,5,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,10,4,10,9,9,10,11,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,7,9,9,7,10,9,10,11,-1,-1,-1,-1],[1,10,11,1,4,10,1,0,4,7,10,4,-1,-1,-1,-1],[3,4,1,3,8,4,1,4,11,7,10,4,11,4,10,-1],[4,7,10,9,4,10,9,10,2,9,2,1,-1,-1,-1,-1],[9,4,7,9,7,10,9,10,1,2,1,10,0,3,8,-1],[10,4,7,10,2,4,2,0,4,-1,-1,-1,-1,-1,-1,-1],[10,4,7,10,2,4,8,4,3,3,4,2,-1,-1,-1,-1],[2,11,9,2,9,7,2,7,3,7,9,4,-1,-1,-1,-1],[9,7,11,9,4,7,11,7,2,8,0,7,2,7,0,-1],[3,11,7,3,2,11,7,11,4,1,0,11,4,11,0,-1],[1,2,11,8,4,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,7,3,1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,0,1,8,8,1,7,-1,-1,-1,-1],[4,3,0,7,3,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,10,11,9,-1,-1,-1,-1,-1,-1,-1],[0,11,1,0,8,11,8,10,11,-1,-1,-1,-1,-1,-1,-1],[3,11,1,10,11,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,10,2,1,9,10,9,8,10,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,1,9,2,2,9,10,-1,-1,-1,-1],[0,10,2,8,10,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,11,9,8,-1,-1,-1,-1,-1,-1,-1],[9,2,11,0,2,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,0,8,1,1,8,11,-1,-1,-1,-1],[1,2,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,8,3,9,8,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,8,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]],_0x4ff82e=[[0,1],[1,3],[2,3],[0,2],[4,5],[5,7],[6,7],[4,6],[0,4],[1,5],[2,6],[3,7]];function _0x37e5cc(e){return _0x377458[e]}function _0x595f8e(e){return _0x4ff82e[e]}var _0x5a8f1b={getCase:_0x37e5cc,getEdge:_0x595f8e},_0x2103cd=(_0x5d520b=!0,function(e,t){var i=_0x5d520b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d520b=!1,i}),_0x245b22=_0x2103cd(void 0,(function(){return _0x245b22.toString().search("(((.+)+)+)+$").toString().constructor(_0x245b22).search("(((.+)+)+)+$")})),_0x5d520b;function _0x3aace6(){this._ids=[],this._voxelScalars=[],this._voxelGradients=[],this._voxelPts=[],this._edgeMap={},this.computeNormals=!0,this.mergePoints=!1,this.contourValue=0}_0x245b22(),_0x3aace6.prototype.getVoxelScalars=function(e,t,i,n,r,o,a,s){var l=this._ids,u=this._voxelScalars;l[0]=i*n+t*r[0]+e,l[1]=l[0]+1,l[2]=l[0]+r[0],l[3]=l[2]+1,l[4]=l[0]+n,l[5]=l[4]+1,l[6]=l[4]+r[0],l[7]=l[6]+1;for(let e=0;e<8;++e)u[e]=s[l[e]]},_0x3aace6.prototype.getVoxelPoints=function(e,t,i,n,r,o){var a=this._voxelPts;a[0]=r[0]+e*o[0],a[1]=r[1]+t*o[1],a[2]=r[2]+i*o[2],a[3]=a[0]+o[0],a[4]=a[1],a[5]=a[2],a[6]=a[0],a[7]=a[1]+o[1],a[8]=a[2],a[9]=a[3],a[10]=a[7],a[11]=a[2],a[12]=a[0],a[13]=a[1],a[14]=a[2]+o[2],a[15]=a[3],a[16]=a[1],a[17]=a[14],a[18]=a[0],a[19]=a[7],a[20]=a[14],a[21]=a[3],a[22]=a[7],a[23]=a[14]},_0x3aace6.prototype.getPointGradient=function(e,t,i,n,r,o,a,s){let l,u;0===e?(l=a[e+1+t*n[0]+i*r],u=a[e+t*n[0]+i*r],s[0]=(u-l)/o[0]):e===n[0]-1?(l=a[e+t*n[0]+i*r],u=a[e-1+t*n[0]+i*r],s[0]=(u-l)/o[0]):(l=a[e+1+t*n[0]+i*r],u=a[e-1+t*n[0]+i*r],s[0]=.5*(u-l)/o[0]),0===t?(l=a[e+(t+1)*n[0]+i*r],u=a[e+t*n[0]+i*r],s[1]=(u-l)/o[1]):t===n[1]-1?(l=a[e+t*n[0]+i*r],u=a[e+(t-1)*n[0]+i*r],s[1]=(u-l)/o[1]):(l=a[e+(t+1)*n[0]+i*r],u=a[e+(t-1)*n[0]+i*r],s[1]=.5*(u-l)/o[1]),0===i?(l=a[e+t*n[0]+(i+1)*r],u=a[e+t*n[0]+i*r],s[2]=(u-l)/o[2]):i===n[2]-1?(l=a[e+t*n[0]+i*r],u=a[e+t*n[0]+(i-1)*r],s[2]=(u-l)/o[2]):(l=a[e+t*n[0]+(i+1)*r],u=a[e+t*n[0]+(i-1)*r],s[2]=.5*(u-l)/o[2])},_0x3aace6.prototype.getVoxelGradients=function(e,t,i,n,r,o,a){var s=this._voxelGradients,l=[];this.getPointGradient(e,t,i,n,r,o,a,l),s[0]=l[0],s[1]=l[1],s[2]=l[2],this.getPointGradient(e+1,t,i,n,r,o,a,l),s[3]=l[0],s[4]=l[1],s[5]=l[2],this.getPointGradient(e,t+1,i,n,r,o,a,l),s[6]=l[0],s[7]=l[1],s[8]=l[2],this.getPointGradient(e+1,t+1,i,n,r,o,a,l),s[9]=l[0],s[10]=l[1],s[11]=l[2],this.getPointGradient(e,t,i+1,n,r,o,a,l),s[12]=l[0],s[13]=l[1],s[14]=l[2],this.getPointGradient(e+1,t,i+1,n,r,o,a,l),s[15]=l[0],s[16]=l[1],s[17]=l[2],this.getPointGradient(e,t+1,i+1,n,r,o,a,l),s[18]=l[0],s[19]=l[1],s[20]=l[2],this.getPointGradient(e+1,t+1,i+1,n,r,o,a,l),s[21]=l[0],s[22]=l[1],s[23]=l[2]},_0x3aace6.prototype.produceTriangles=function(e,t,i,n,r,o,a,s,l,u,c,h){var d,f,p=[1,2,4,8,16,32,64,128],_=[0,1,3,2,4,5,7,6],m=[],g=[],x=[];this.getVoxelScalars(t,i,n,r,o,a,s,l);for(var v=0,y=0;y<8;y++)this._voxelScalars[_[y]]>=e&&(v|=p[y]);var $=_0x5a8f1b.getCase(v);if(!($[0]<0)){this.getVoxelPoints(t,i,n,o,a,s),this.computeNormals&&this.getVoxelGradients(t,i,n,o,r,s,l);var b=new o$1p;for(y=0;$[y]>=0;y+=3){c.push(3);for(var T=0;T<3;T++){var C=_0x5a8f1b.getEdge($[y+T]);if(d=void 0,this.mergePoints&&(x[0]=this._ids[C[0]],x[1]=this._ids[C[1]],x[0]>x[1]&&(f=x[0],x[0]=x[1],x[1]=f),d=this._edgeMap[x]),void 0===d){var S=(e-this._voxelScalars[C[0]])/(this._voxelScalars[C[1]]-this._voxelScalars[C[0]]),w=this._voxelPts.slice(3*C[0],3*(C[0]+1)),E=this._voxelPts.slice(3*C[1],3*(C[1]+1));if(m[0]=w[0]+S*(E[0]-w[0]),m[1]=w[1]+S*(E[1]-w[1]),m[2]=w[2]+S*(E[2]-w[2]),d=u.length/3,u.push(m[0],m[1],m[2]),this.computeNormals){var P=this._voxelGradients.slice(3*C[0],3*(C[0]+1)),A=this._voxelGradients.slice(3*C[1],3*(C[1]+1));g[0]=P[0]+S*(A[0]-P[0]),g[1]=P[1]+S*(A[1]-P[1]),g[2]=P[2]+S*(A[2]-P[2]),o$1p.unpack(g,0,b),o$1p.equals(o$1p.ZERO,b)||o$1p.normalize(b,b),h.push(b.x,b.y,b.z)}this.mergePoints&&(x[0]=this._ids[C[0]],x[1]=this._ids[C[1]],x[0]>x[1]&&(f=x[0],x[0]=x[1],x[1]=f),this._edgeMap[x]=d)}c.push(d)}}}},_0x3aace6.prototype.compute=function(e){for(var t=e.xDimSize,i=e.yDimSize,n=e.zDimSize,r=(e.timeDimSize,[0,0,0]),o=[1/t,1/i,1/n],a=[t,i,n],s=e.array[0],l=[],u=[],c=[],h=a[0]*a[1],d=0;d<a[2]-1;++d)for(var f=0;f<a[1]-1;++f)for(var p=0;p<a[0]-1;++p)this.produceTriangles(this.contourValue,p,f,d,h,a,r,o,s,l,u,c);return{pBuffer:l,tBuffer:u,nBuffer:c}};var Wt$1="attribute vec4 aPosition;\nattribute vec4 aNormal;\nvarying vec3 vNormal;\nvarying vec3 positionEC;\nvoid main()\n{\n vNormal = aNormal.xyz;\n positionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",Ut$1="varying vec3 vNormal;\nvarying vec3 positionEC;\nuniform float uContourValue;\nuniform sampler2D u_colorTexture;\n#ifdef APPLY_LIGHTING\n uniform vec3 uDiffuse;\n uniform vec3 uSpecular;\n uniform vec3 uAmbient;\n uniform float uShiness;\n#endif\nvec4 getColorForValue(float tValue)\n{\n float texCoord = tValue;\n\ttexCoord = clamp(texCoord, 0.0, 1.0);\n vec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\n return tColor;\n}\n\n#ifdef APPLY_LIGHTING\nvoid applyLighting(inout vec4 tColor, vec3 normal)\n{\n vec3 diffuse = uDiffuse;\n vec3 specular = uSpecular;\n vec3 ambient = uAmbient;\n float shiness = uShiness;\n vec3 normalEC = normalize(czm_normal * normal);\n float ndot = max( dot( normalEC, czm_sunDirectionEC ), 0.0 );\n ndot = ndot * 0.5 + 0.5;\n diffuse = diffuse * ndot;\n specular = specular * czm_getSpecular(czm_sunDirectionEC, normalize(-positionEC), normalEC, shiness);\n tColor.rgb = tColor.rgb*(diffuse + ambient) + specular;\n}\n#endif\nvoid main()\n{\n vec4 color = getColorForValue(uContourValue);\n#ifdef APPLY_LIGHTING\n applyLighting(color, vNormal);\n#endif\n gl_FragColor = color;\n}\n";function Qt$1(e){for(var t=1;t<e;)t<<=1;return t}function qt$1(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function _$9(e,t){this._context=e,this._floor=0,this._ceil=1,this._dataBounds=h$18.MAX_VALUE,this._zBounds=new o$1o(0,1),this._nSideBlockCount=0,this._nBlockLength=0,this._nLength=0,this._nWidth=0,this._nHeight=0,this._nDepth=0,this._volTextures=[],this._dWidth=0,this._dHeight=0,this._dDepth=0,this._matLocalView=void 0,this._boundingSphere=void 0,this._timeDimension=1,this._timeIndex=0,this._xSliceCommand=void 0,this._ySliceCommand=void 0,this._zSliceCommand=void 0,this._initialized=!1,this._layer=t,this._attributeLocations={},this._visibleBoundingBox=new O$y({minimum:o$1p.ZERO,maximum:new o$1p(1,1,1)}),this.m_vScale=new o$1p(1,1,1),this._volumeBoxCommand=void 0,this.marchingCubes=new _0x3aace6,this.outlineCommand=void 0,this._mode=C$13.SCENE3D}function Jt(e,t){var i=[];return i.push("Volume"),e._timeDimension>1&&i.push("TIME_ORDER"),e$2b(t._hypsometricTexture)&&i.push("HAS_COLORTABLE"),t._useGradientOpacity&&i.push("GRADIENT_OPACITY"),t._clipPlanes.length>0&&i.push("CLIP_PLANE"),t.enableLighting&&i.push("APPLY_LIGHTING"),(0!=e._visibleBoundingBox._minimum.x||0!=e._visibleBoundingBox._minimum.y||0!=e._visibleBoundingBox._minimum.z||1!=e._visibleBoundingBox._maximum.x||1!=e._visibleBoundingBox._maximum.y||1!=e._visibleBoundingBox._maximum.z)&&i.push("TEXTURECOORD_CLIP"),i}Object.defineProperties(_$9.prototype,{maxValue:{get:function(){return this._ceil}},minValue:{get:function(){return this._floor}},visibleBoundingBox:{get:function(){return this._visibleBoundingBox},set:function(e){this._visibleBoundingBox=e}}}),_$9.prototype._encodeImageData=function(e,t,i,n){for(var r=this._nLength*this._nLength*4,o=new Array(r),a=i-t,s=t,l=0;l<e.zDimSize;l++)for(var u=parseInt(l/this._nSideBlockCount)*this._nBlockLength,c=l%this._nSideBlockCount*this._nBlockLength,h=0;h<this._nBlockLength-2;h++)for(var d=0;d<this._nBlockLength-2;d++){var f=Math.min(d,e.xDimSize-1),p=Math.min(h,e.yDimSize-1),_=l*e.yDimSize*e.xDimSize+(e.yDimSize-1-p)*e.xDimSize+f,m=n[_],g=new e$29(0,0,0,0);if(-9999!=m){m<t||m>i?m=s:s=m;var x=qt$1(m=(m-t)/a);g.x=x.x,g.y=x.y,g.z=x.z,g.w=1}var v=255*g.x,y=255*g.y,$=255*g.z,b=255*g.w;o[4*(_=(u+h)*this._nLength+c+d)]=parseInt(v),o[4*_+1]=parseInt(y),o[4*_+2]=parseInt($),o[4*_+3]=parseInt(b)}return new Uint8Array(o,0,r)},_$9.prototype._loadData=function(e,t){var i=x$b.loadData(e,t);this.output=i,this._timeDimension=i.timeDimSize,this._floor=i.minValue,this._ceil=i.maxValue,this._nWidth=i.xDimSize,this._nHeight=i.yDimSize,this._nDepth=i.zDimSize;var n=i.array;this._nSideBlockCount=Math.ceil(Math.sqrt(i.zDimSize)),this._nBlockLength=Math.max(i.xDimSize,i.yDimSize)+2,this._nLength=Qt$1(this._nBlockLength*this._nSideBlockCount-2);for(var r=[],o=0;o<this._timeDimension;o++)r.push(this._encodeImageData(i,i.minValue,i.maxValue,n[o]));return r},_$9.prototype._loadVolume=function(e,t){},_$9.prototype._loadTexture=function(e){var t=e.length,i=tt$h.LINEAR,n=rt$i.LINEAR;this._layer._filterMode===k$Q.FilterMode.NEAREST&&(i=tt$h.NEAREST,n=rt$i.NEAREST);for(var r=0;r<t;r++){var o=new t$V({context:this._context,width:this._nLength,height:this._nLength,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n})});o.copyFrom({width:this._nLength,height:this._nLength,arrayBufferView:e[r]}),this._volTextures.push(o)}},_$9.prototype._computePosition=function(){var e=this._mode,t=new o$1p(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);this._matLocalView=new p$1d,this._matInverseLocalView=new p$1d;var i=[];if(e===C$13.COLUMBUS_VIEW)this._vecCenter=new o$1p(t.z,t.x,t.y),p$1d.fromTranslation(this._vecCenter,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.south),i[1]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.south),i[2]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.north),i[3]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.north),i[4]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.south),i[5]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.south),i[6]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.north),i[7]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.north);else{this._vecCenter=o$1p.fromDegrees(t.x,t.y,t.z);var n=new i$15;m$17.headingPitchRollToFixedFrame(this._vecCenter,n,t$13.WGS84,m$17.eastNorthUpToFixedFrame,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.x),i[1]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.x),i[2]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.x),i[3]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.x),i[4]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.y),i[5]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.y),i[6]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.y),i[7]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.y)}this._dWidth=o$1p.distance(i[1],i[0]),this._dHeight=o$1p.distance(i[3],i[0]),this._dDepth=o$1p.distance(i[4],i[0]),this._boundingSphere=new i$1c,p$1d.multiplyByPoint(this._matLocalView,o$1p.ZERO,this._boundingSphere.center),this._boundingSphere.radius=.5*Math.sqrt(this._dWidth*this._dWidth+this._dHeight*this._dHeight+this._dDepth*this._dDepth)},_$9.prototype._createSliceCommand=function(){this._context;var e=this._mode===C$13.COLUMBUS_VIEW,t=this.GetRealBoundTop(),i=this.GetRealBoundBottom(),n=this.GetRealBoundRight(),r=this.GetRealBoundLeft();this._dWidth,this._dHeight;var o,a,s=this._layer._layerBounds.width,l=this._layer._layerBounds.height,u=this._layer._sliceCoordinate,c=Math.min(u.x,1),h=c*s,d=(c=Math.min(u.y,1))*l,f=n-r,p=t-i;e?o=a=5:(o=Math.ceil(this._dataBounds.north-this._dataBounds.south),a=Math.ceil(this._dataBounds.east-this._dataBounds.west));for(var _=a+1,m=o+1,g=(t-i)/o,x=(n-r)/a,v=_*m,y=2*_,$=2*m,b=new Float32Array(3*y),T=new Float32Array(3*y),C=new Float32Array(3*$),S=new Float32Array(3*$),w=new Float32Array(3*v),E=new Float32Array(3*v),P=this.GetRealTop(),A=this.GetRealBottom(),L=P-A,M=(c=Math.min(u.z,1))*L,R=0,I=new o$1p,O=A+M,D=(O-A)/L,B=0;B<m;B++)for(var N=i+B*g,F=0;F<_;F++){var U=r+F*x,z=e?new o$1p(O,U,N):o$1p.fromDegrees(U,N,O);p$1d.multiplyByPoint(this._matInverseLocalView,z,I),w[3*R]=I.x,w[3*R+1]=I.y,w[3*R+2]=I.z,E[3*R]=(U-r)/f,E[3*R+1]=(N-i)/p,E[3*R+2]=D,R++}R=0;var G=(t-d-i)/p;for(F=0;F<_;F++){U=r+F*x;var V=e?new o$1p(P,U,t-d):o$1p.fromDegrees(U,t-d,P);p$1d.multiplyByPoint(this._matInverseLocalView,V,I),b[6*R]=I.x,b[6*R+1]=I.y,b[6*R+2]=I.z,T[6*R]=(U-r)/f,T[6*R+1]=G,T[6*R+2]=1;var k=e?new o$1p(this._zBounds.x,U,t-d):o$1p.fromDegrees(U,t-d,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,k,I),b[6*R+3]=I.x,b[6*R+4]=I.y,b[6*R+5]=I.z,T[6*R+3]=(U-r)/f,T[6*R+4]=G,T[6*R+5]=0,R++}R=0;var W=h/f;for(B=0;B<m;B++){N=i+B*g;var H=e?new o$1p(P,r+h,N):o$1p.fromDegrees(r+h,N,P);p$1d.multiplyByPoint(this._matInverseLocalView,H,I),C[6*R]=I.x,C[6*R+1]=I.y,C[6*R+2]=I.z,S[6*R]=W,S[6*R+1]=(N-i)/p,S[6*R+2]=1;var q=e?new o$1p(this._zBounds.x,r+h,N):o$1p.fromDegrees(r+h,N,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,q,I),C[6*R+3]=I.x,C[6*R+4]=I.y,C[6*R+5]=I.z,S[6*R+3]=W,S[6*R+4]=(N-i)/p,S[6*R+5]=0,R++}for(var j=new Uint16Array(a*o*2*3),Y=0,X=0;X<o;X++)for(var K=0;K<a;K++){var Q=K+_*X,Z=K+_*(X+1),J=K+1+_*(X+1),ee=K+1+_*X;j[Y++]=Q,j[Y++]=Z,j[Y++]=ee,j[Y++]=Z,j[Y++]=J,j[Y++]=ee}for(var te=2*o*3,ie=new Uint16Array(2*a*3),ne=new Uint16Array(te),re=0,oe=0;oe<o;oe++){Q=X=2*oe,Z=X+1,J=X+2,ee=X+3;ne[re++]=Q,ne[re++]=J,ne[re++]=Z,ne[re++]=Z,ne[re++]=J,ne[re++]=ee}var ae=0;for(oe=0;oe<a;oe++){Q=K=2*oe,Z=K+1,J=K+2,ee=K+3;ie[ae++]=Q,ie[ae++]=J,ie[ae++]=Z,ie[ae++]=Z,ie[ae++]=J,ie[ae++]=ee}var se=t$Y.createVertexBuffer({context:this._context,typedArray:C,usage:A$19.STATIC_DRAW}),le=t$Y.createVertexBuffer({context:this._context,typedArray:S,usage:A$19.STATIC_DRAW}),ue=t$Y.createVertexBuffer({context:this._context,typedArray:b,usage:A$19.STATIC_DRAW}),ce=t$Y.createVertexBuffer({context:this._context,typedArray:T,usage:A$19.STATIC_DRAW}),he=t$Y.createVertexBuffer({context:this._context,typedArray:w,usage:A$19.STATIC_DRAW}),de=t$Y.createVertexBuffer({context:this._context,typedArray:E,usage:A$19.STATIC_DRAW}),fe=[],pe=[],_e=[],me=this._attributeLocations;me.aPosition=0,fe.push({name:"aPosition",index:me.aPosition,vertexBuffer:se,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),pe.push({name:"aPosition",index:me.aPosition,vertexBuffer:ue,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),_e.push({name:"aPosition",index:me.aPosition,vertexBuffer:he,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),me.aTexCoord0=1,fe.push({name:"aTexCoord0",index:me.aTexCoord0,vertexBuffer:le,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),pe.push({name:"aTexCoord0",index:me.aTexCoord0,vertexBuffer:ce,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),_e.push({name:"aTexCoord0",index:me.aTexCoord0,vertexBuffer:de,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var ge=t$Y.createIndexBuffer({context:this._context,typedArray:ne,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),xe=t$Y.createIndexBuffer({context:this._context,typedArray:ie,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),ve=t$Y.createIndexBuffer({context:this._context,typedArray:j,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),ye=new s$U({name:"VolumeRenderingVp",sources:[Ft$1]}),$e=new s$U({name:"VolumeRenderingFp",sources:[Rt$1]});ye.defines.push("Volume"),$e.defines.push("Volume"),this._timeDimension>1&&$e.defines.push("TIME_ORDER"),this._xSliceCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$s.OPAQUE,cull:!0}),this._ySliceCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$s.OPAQUE,cull:!0}),this._zSliceCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$s.OPAQUE,cull:!0}),this._xSliceCommand.vertexArray=new c$12({context:this._context,attributes:fe,indexBuffer:ge}),this._ySliceCommand.vertexArray=new c$12({context:this._context,attributes:pe,indexBuffer:xe}),this._zSliceCommand.vertexArray=new c$12({context:this._context,attributes:_e,indexBuffer:ve}),this._xSliceCommand.shaderProgram=r$13.fromCache({context:this._context,vertexShaderSource:ye,fragmentShaderSource:$e,attributeLocations:me}),this._ySliceCommand.shaderProgram=this._xSliceCommand.shaderProgram,this._zSliceCommand.shaderProgram=this._xSliceCommand.shaderProgram,this._xSliceCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:{enabled:!0}}),this._ySliceCommand.renderState=this._xSliceCommand.renderState,this._zSliceCommand.renderState=this._xSliceCommand.renderState},_$9.prototype._createContourCommand=function(e,t,i){var n=this._context,r=this._layer,o=e.length;if(!(o<3)){for(var a=new Float32Array(o),s=new Float32Array(i),l=this._dataBounds.west,u=this._dataBounds.south,c=this._zBounds.x,h=this._dataBounds.width,d=this._dataBounds.height,f=this._zBounds.y-this._zBounds.x,p=new o$1p,_=this._mode===C$13.COLUMBUS_VIEW,m=0;m<o;m+=3){var g=l+h*e[m],x=u+d*e[m+1],v=c+f*e[m+2],y=_?new o$1p(v,g,x):o$1p.fromDegrees(g,x,v);p$1d.multiplyByPoint(this._matInverseLocalView,y,p),a[m]=p.x,a[m+1]=p.y,a[m+2]=p.z}var $=t$Y.createVertexBuffer({context:this._context,typedArray:a,usage:A$19.STATIC_DRAW}),b=t$Y.createVertexBuffer({context:this._context,typedArray:s,usage:A$19.STATIC_DRAW}),T=[],C={aPosition:0};T.push({name:"aPosition",index:C.aPosition,vertexBuffer:$,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),C.aNormal=1,T.push({name:"aNormal",index:C.aNormal,vertexBuffer:b,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var S=new s$U({name:"VolumeContourVS",sources:[Wt$1]}),w=new s$U({name:"VolumeContourFS",sources:[Ut$1]});S.defines.push("Volume"),w.defines.push("Volume"),r.enableLighting&&w.defines.push("APPLY_LIGHTING"),this._contourCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$s.OPAQUE,count:o/3,cull:!0}),this._contourCommand.vertexArray=new c$12({context:this._context,attributes:T}),this._contourCommand.shaderProgram=r$13.fromCache({context:this._context,vertexShaderSource:S,fragmentShaderSource:w,attributeLocations:C}),this._contourCommand.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var E=this,P={u_colorTexture:function(){return e$2b(r._colorTexture)?r._colorTexture:n.defaultTexture},uVolumeTexture:function(){return E._volTextures[0]},width:function(){return E._nWidth},height:function(){return E._nHeight},depth:function(){return E._nDepth},sideBlockCount:function(){return E._nSideBlockCount},blockLength:function(){return E._nBlockLength},texLength:function(){return E._nLength},uFilterMode:function(){return r._filterMode},uContourValue:function(){return(r.contourValue-r.minValue)/(r.maxValue-r.minValue)},uDiffuse:function(){return r.material.diffuse},uAmbient:function(){return r.material.ambient},uSpecular:function(){return r.material.specular},uShiness:function(){return r.material.shiness}};this._contourCommand.uniformMap=P}},_$9.prototype.GetRealTop=function(){return this._zBounds.x+(this._zBounds.y-this._zBounds.x)*this._layer.scale.z},_$9.prototype.GetRealBottom=function(){return this._zBounds.x},_$9.prototype.GetRealBoundLeft=function(){return.5*(this._dataBounds.east+this._dataBounds.west)-.5*(this._dataBounds.east-this._dataBounds.west)*this._layer.scale.x},_$9.prototype.GetRealBoundRight=function(){return.5*(this._dataBounds.east+this._dataBounds.west)+.5*(this._dataBounds.east-this._dataBounds.west)*this._layer.scale.x},_$9.prototype.GetRealBoundTop=function(){return.5*(this._dataBounds.north+this._dataBounds.south)+.5*(this._dataBounds.north-this._dataBounds.south)*this._layer.scale.y},_$9.prototype.GetRealBoundBottom=function(){return.5*(this._dataBounds.north+this._dataBounds.south)-.5*(this._dataBounds.north-this._dataBounds.south)*this._layer.scale.y};var Xe$1=new o$1p;_$9.prototype._createVolumeBoxDrawCommand=function(e){this._context,new o$1p(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);var t,i,n=this._mode===C$13.COLUMBUS_VIEW,r=this.GetRealBoundTop(),o=this.GetRealBoundBottom(),a=this.GetRealBoundRight(),s=this.GetRealBoundLeft(),l=a-s,u=r-o;n?t=i=5:(t=Math.ceil(this._dataBounds.north-this._dataBounds.south),i=Math.ceil(this._dataBounds.east-this._dataBounds.west));for(var c=i+1,h=t+1,d=(r-o)/t,f=(a-s)/i,p=c*h,_=2*c,m=2*h,g=new Float32Array(3*_),x=new Float32Array(3*_),v=new Float32Array(3*_),y=new Float32Array(3*_),$=new Float32Array(3*m),b=new Float32Array(3*m),T=new Float32Array(3*m),C=new Float32Array(3*m),S=new Float32Array(3*p),w=new Float32Array(3*p),E=new Float32Array(3*p),P=new Float32Array(3*p),A=this.GetRealTop(),L=0,M=new o$1p,R=0;R<h;R++)for(var I=o+R*d,O=0;O<c;O++){var D=s+O*f,B=n?new o$1p(A,D,I):o$1p.fromDegrees(D,I,A);p$1d.multiplyByPoint(this._matInverseLocalView,B,M),S[3*L]=M.x,S[3*L+1]=M.y,S[3*L+2]=M.z,w[3*L]=(D-s)/l,w[3*L+1]=(I-o)/u,w[3*L+2]=1;var N=n?new o$1p(this._zBounds.x,D,I):o$1p.fromDegrees(D,I,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,N,M),E[3*L]=M.x,E[3*L+1]=M.y,E[3*L+2]=M.z,P[3*L]=(D-s)/l,P[3*L+1]=(I-o)/u,P[3*L+2]=0,L++}L=0;for(O=0;O<c;O++){D=s+O*f;var F=n?new o$1p(A,D,r):o$1p.fromDegrees(D,r,A);p$1d.multiplyByPoint(this._matInverseLocalView,F,M),g[6*L]=M.x,g[6*L+1]=M.y,g[6*L+2]=M.z,x[6*L]=(D-s)/l,x[6*L+1]=1,x[6*L+2]=1;var U=n?new o$1p(this._zBounds.x,D,r):o$1p.fromDegrees(D,r,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,U,M),g[6*L+3]=M.x,g[6*L+4]=M.y,g[6*L+5]=M.z,x[6*L+3]=(D-s)/l,x[6*L+4]=1,x[6*L+5]=0;var z=n?new o$1p(A,D,o):o$1p.fromDegrees(D,o,A);p$1d.multiplyByPoint(this._matInverseLocalView,z,M),v[6*L]=M.x,v[6*L+1]=M.y,v[6*L+2]=M.z,y[6*L]=(D-s)/l,y[6*L+1]=0,y[6*L+2]=1;var G=n?new o$1p(this._zBounds.x,D,o):o$1p.fromDegrees(D,o,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,G,M),v[6*L+3]=M.x,v[6*L+4]=M.y,v[6*L+5]=M.z,y[6*L+3]=(D-s)/l,y[6*L+4]=0,y[6*L+5]=0,L++}L=0;for(R=0;R<h;R++){I=o+R*d;var V=n?new o$1p(A,s,I):o$1p.fromDegrees(s,I,A);p$1d.multiplyByPoint(this._matInverseLocalView,V,M),$[6*L]=M.x,$[6*L+1]=M.y,$[6*L+2]=M.z,b[6*L]=0,b[6*L+1]=(I-o)/u,b[6*L+2]=1;var k=n?new o$1p(this._zBounds.x,s,I):o$1p.fromDegrees(s,I,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,k,M),$[6*L+3]=M.x,$[6*L+4]=M.y,$[6*L+5]=M.z,b[6*L+3]=0,b[6*L+4]=(I-o)/u,b[6*L+5]=0;var W=n?new o$1p(A,a,I):o$1p.fromDegrees(a,I,A);p$1d.multiplyByPoint(this._matInverseLocalView,W,M),T[6*L]=M.x,T[6*L+1]=M.y,T[6*L+2]=M.z,C[6*L]=1,C[6*L+1]=(I-o)/u,C[6*L+2]=1;var H=n?new o$1p(this._zBounds.x,a,I):o$1p.fromDegrees(a,I,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,H,M),T[6*L+3]=M.x,T[6*L+4]=M.y,T[6*L+5]=M.z,C[6*L+3]=1,C[6*L+4]=(I-o)/u,C[6*L+5]=0,L++}for(var q=i*t*2*3,j=new Uint16Array(q),Y=new Uint16Array(q),X=0,K=0,Q=0;Q<t;Q++)for(var Z=0;Z<i;Z++){var J=Z+c*Q,ee=Z+c*(Q+1),te=Z+1+c*(Q+1),ie=Z+1+c*Q;j[X++]=ie,j[X++]=ee,j[X++]=J,j[X++]=ie,j[X++]=te,j[X++]=ee,Y[K++]=J,Y[K++]=ee,Y[K++]=ie,Y[K++]=ee,Y[K++]=te,Y[K++]=ie}for(var ne=2*i*3,re=2*t*3,oe=new Uint16Array(ne),ae=new Uint16Array(ne),se=new Uint16Array(re),le=new Uint16Array(re),ue=0,ce=0,he=0;he<t;he++){J=Q=2*he,ee=Q+1,te=Q+2,ie=Q+3;se[ue++]=J,se[ue++]=te,se[ue++]=ee,se[ue++]=ee,se[ue++]=te,se[ue++]=ie,le[ce++]=ee,le[ce++]=te,le[ce++]=J,le[ce++]=ie,le[ce++]=te,le[ce++]=ee}var de=0,fe=0;for(he=0;he<i;he++){J=Z=2*he,ee=Z+1,te=Z+2,ie=Z+3;oe[de++]=J,oe[de++]=te,oe[de++]=ee,oe[de++]=ee,oe[de++]=te,oe[de++]=ie,ae[fe++]=ee,ae[fe++]=te,ae[fe++]=J,ae[fe++]=ie,ae[fe++]=te,ae[fe++]=ee}var pe=2*p+2*_+2*m,_e=new Float32Array(3*pe),me=new Float32Array(3*pe),ge=new Uint16Array(2*q+2*re+2*ne),xe=[],ve=[],ye=[];xe.push(g),xe.push(v),xe.push($),xe.push(T),xe.push(S),xe.push(E),ve.push(x),ve.push(y),ve.push(b),ve.push(C),ve.push(w),ve.push(P),ye.push(oe),ye.push(ae),ye.push(se),ye.push(le),ye.push(j),ye.push(Y);for(var $e=xe.length,be=0,Te=0,Ce=0,Se=0,we=0;we<$e;we++){for(var Ee=xe[we],Pe=ve[we],Ae=ye[we],Le=0;Le<Ee.length;Le++)_e[Te++]=Ee[Le],me[Ce++]=Pe[Le];for(Le=0;Le<Ae.length;Le++)ge[Se++]=Ae[Le]+be;be+=Ee.length/3}var Me=t$Y.createVertexBuffer({context:this._context,typedArray:_e,usage:A$19.STATIC_DRAW}),Re=t$Y.createVertexBuffer({context:this._context,typedArray:me,usage:A$19.STATIC_DRAW}),Ie=[],Oe={aPosition:0};Ie.push({name:"aPosition",index:Oe.aPosition,vertexBuffer:Me,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),Oe.aTexCoord0=1,Ie.push({name:"aTexCoord0",index:Oe.aTexCoord0,vertexBuffer:Re,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var De=t$Y.createIndexBuffer({context:this._context,typedArray:ge,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),Be=new s$U({name:"VolumeBoxVp",sources:[Mt$1]}),Ne=new s$U({name:"VolumeBoxFp",sources:[Nt$1]}),Fe=Jt(this,e);Be.defines=Fe,Ne.defines=Fe,this._volumeBoxCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$s.OPAQUE,cull:!0}),this._volumeBoxCommand.vertexArray=new c$12({context:this._context,attributes:Ie,indexBuffer:De}),this._volumeBoxCommand.shaderProgram=r$13.fromCache({context:this._context,vertexShaderSource:Be,fragmentShaderSource:Ne,attributeLocations:Oe}),this._volumeBoxCommand.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},depthMask:{enabled:!0},blending:Ee$r.ALPHA_BLEND})};for(var Ze=new o$1p,Me$4=new e$29,Ne=new e$29,Ie$1=[],pt$1=0;pt$1<6;pt$1++)Ie$1.push(new e$29);function xt$1(e,t){var i=!1,n=t.split(" ");if(n.length>1){var r=n[0],o=n[1];for(var a in e.defines)if(-1!==e.defines[a].indexOf(r))return void(e.defines[a]=r+" "+o)}else{for(var a in e.defines)if(e.defines[a]===t){i=!0;break}i||e.defines.push(t)}}function Bt$2(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function $$5(e){e$2b(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}function o$a(e,t){_$9.call(this,e,t),this._orientedBoundingBox=void 0,this._level=0,this._x=0,this._y=0,this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._isVisible=!1,this._disFromCamera=0,this._rangeList=256,this._isLessLodDis=!1,this._pix=0,this._s3mLoadState=N$P.UNLOAD,this._isRootTile=!1,this._rootTile=void 0,this._maxValue=void 0,this._minValue=void 0,this._multiTextures=[]}function G$7(e){for(var t=1;t<e;)t<<=1;return t}function H$7(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function q$5(e,t,i){var n=i.radius,r=i.center,o=o$1p.distance(e.positionWC,r);e._mode===C$13.SCENE2D&&(o=e.positionCartographic.height);var a=t.drawingBufferHeight,s=.5*e$2a.PI_OVER_FOUR,l=.5*a/Math.tan(s)*n/o;return Math.ceil(l)}_$9.prototype._createOutlineCommand=function(e){var t=new i$p(this._dWidth,this._dHeight,this._dDepth),i=(this._zBounds.y-this._zBounds.x)/2,n=o$1p.fromArray([0,0,i]),r=p$1d.fromTranslation(n),o=new p$1d;p$1d.multiply(this._matLocalView,r,o);var a=new i$_({primitiveType:W$18.LINES,modelMatrix:o,boundingVolume:this._boundingSphere,pass:Le$s.OPAQUE,cull:!0,owner:e});a.vertexArray=t.getOutlineVertexArray(this._context),a.shaderProgram=r$13.fromCache({name:"VoxelGridTileOutline",context:this._context,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:{aPosition:0}}),a.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0}}),e._outlineCommand=a,this._outlineCommand=a},_$9.prototype._createUniformMap=function(e){var t=this,i={width:function(){return t._nWidth},height:function(){return t._nHeight},depth:function(){return t._nDepth},sideBlockCount:function(){return t._nSideBlockCount},blockLength:function(){return t._nBlockLength},texLength:function(){return t._nLength},u_maxVisibleTextureCoord:function(){return t._visibleBoundingBox._maximum},u_minVisibleTextureCoord:function(){return t._visibleBoundingBox._minimum},u_minMaxValueAndFiltration:function(){return Me$4.x=t._floor,Me$4.y=t._ceil,Me$4.z=e._minFiltration,Me$4.w=e._maxFiltration,Me$4},uVolumeTexture:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return t._volTextures[i]},uNextVolumeTexture:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,t._volTextures[i]},uTimeRatio:function(){return e._timeRatio},u_colorTable:function(){return e$2b(e._hypsometricTexture)?e._hypsometricTexture:t._context.defaultTexture},u_volumeBoxSize:function(){return Ze.x=t._dWidth,Ze.y=t._dHeight,Ze.z=t._dDepth,Ze},uFilterMode:function(){return e._filterMode},u_opacityTexture:function(){return e$2b(e._opacityTexture)?e._opacityTexture:t._context.defaultTexture},u_colorTexture:function(){return e$2b(e._colorTexture)?e._colorTexture:t._context.defaultTexture},u_jitterTexture:function(){return e$2b(t._jitterTexture)?t._jitterTexture:t._context.defaultTexture},u_gradientOpacityInfo:function(){if(e._useGradientOpacity){var t=e._gradientOpacityMinOpacity,i=e._gradientOpacityMaxOpacity,n=[e._gradientOpacityMinValue,e._gradientOpacityMaxValue],r=(i-t)/(n[1]-n[0]),o=-n[0]*(i-t)/(n[1]-n[0])+t;Ne.x=t,Ne.y=i,Ne.z=r,Ne.w=o}return Ne},u_clip_planes:function(){for(var t=e._clipPlanes.length,i=0;i<t;i++)Ie$1[i].x=e._clipPlanes[i].normal.x,Ie$1[i].y=e._clipPlanes[i].normal.y,Ie$1[i].z=e._clipPlanes[i].normal.z,Ie$1[i].w=e._clipPlanes[i].distance;return Ie$1},u_clip_planes_count:function(){return e._clipPlanes.length},uDiffuse:function(){return e.material.diffuse},uAmbient:function(){return e.material.ambient},uSpecular:function(){return e.material.specular},uShiness:function(){return e.material.shiness}},n={uOffset:function(){return new o$1p(e._sliceCoordinate.x,0,0)}},r={uOffset:function(){return new o$1p(0,e._sliceCoordinate.y,0)}},o={uOffset:function(){return new o$1p(0,0,e._sliceCoordinate.z)}};if(e$2b(this._xSliceCommand)&&(this._xSliceCommand.uniformMap=p$19(i,n),this._ySliceCommand.uniformMap=p$19(i,r),this._zSliceCommand.uniformMap=p$19(i,o)),e$2b(this._volumeBoxCommand)){var a={u_camTexCoord:function(){var e,i,n=t.frameState.camera.positionCartographic;if(t._mode===C$13.COLUMBUS_VIEW){var r=a$18.toCartesian(n),o=m$17.convertToColumbusCartesian(r);i=o.y,e=o.z}else i=e$2a.toDegrees(n.longitude),e=e$2a.toDegrees(n.latitude);var a=n.height,s=t.GetRealTop()-t._zBounds.x,l=t.GetRealBoundLeft(),u=t.GetRealBoundRight(),c=t.GetRealBoundBottom(),h=t.GetRealBoundTop();return Xe$1.x=(i-l)/(u-l),Xe$1.y=(e-c)/(h-c),Xe$1.z=(a-t._zBounds.x)/s,Xe$1},u_sampleDistance:function(){return t._layer._sampleDistance||.005}};this._volumeBoxCommand.uniformMap=p$19(i,a)}if(e$2b(this._outlineCommand)){var s={uDiffuseColor:function(){return e._outlineColor}};this._outlineCommand.uniformMap=p$19(i,s)}},_$9.prototype._initJitterTexture=function(){if(!e$2b(this._jitterTexture)){for(var e=new Uint8Array(1024),t=0;t<1024;++t)e[t]=255*Math.random();this._jitterTexture=new t$V({context:this._context,width:32,height:32,pixelFormat:this._context.webgpu||this._context.webgl2?V$10.RED:V$10.LUMINANCE,pixelDatatype:_$$.UNSIGNED_BYTE,flipY:!1}),this._jitterTexture.copyFrom({width:32,height:32,arrayBufferView:e})}},_$9.prototype._initialize=function(e,t,i){if(this.frameState=t,this._mode=t.mode,this._initialized){for(var n=this._volTextures.length,r=0;r<n;r++)this._volTextures[r].destroy();this._volTextures=[],e$2b(this._volumeBoxCommand)&&($$5(this._volumeBoxCommand),this._volumeBoxCommand=void 0),e$2b(this._outlineCommand)&&($$5(this._outlineCommand),this._outlineCommand=void 0),this._initialized=!1}this._initJitterTexture(),this._loadTexture(i),this._computePosition(),this._createVolumeBoxDrawCommand(e),this._createOutlineCommand(e),this._createSliceCommand(),this._createUniformMap(e),this._initialized=!0},_$9.prototype.update=function(e,t){if(this._mode=t.mode,(e._scaleDirty||e._sliceCoordDirty)&&(e._scaleDirty&&($$5(this._volumeBoxCommand),this._volumeBoxCommand=void 0),$$5(this._xSliceCommand),this._xSliceCommand=void 0,$$5(this._ySliceCommand),this._ySliceCommand=void 0,$$5(this._zSliceCommand),this._zSliceCommand=void 0,$$5(this._outlineCommand),this._outlineCommand=void 0,this._createVolumeBoxDrawCommand(e),this._createOutlineCommand(e),this._createSliceCommand(),this._createUniformMap(e),e._scaleDirty=!1,e._sliceCoordDirty=!1),e._contourValueDirty){if($$5(this._contourCommand),this._contourCommand=void 0,this.marchingCubes.contourValue=e.contourValue,e$2b(this.output)){var i=this.marchingCubes.compute(this.output);this._createContourCommand(i.pBuffer,i.tBuffer,i.nBuffer)}e._contourValueDirty=!1}e._volumeRenderMode===gt$1.Slice?(e$2b(this._xSliceCommand)&&t.commandList.push(this._xSliceCommand),e$2b(this._ySliceCommand)&&t.commandList.push(this._ySliceCommand),e$2b(this._zSliceCommand)&&t.commandList.push(this._zSliceCommand)):e._volumeRenderMode===gt$1.VolumeRendering?(e$2b(this._volumeBoxCommand)&&e._fillStyle!==fr$2.WireFrame&&t.commandList.push(this._volumeBoxCommand),e$2b(this._outlineCommand)&&e._fillStyle!==fr$2.Fill&&t.commandList.push(this._outlineCommand)):e._volumeRenderMode===gt$1.ContourValue&&e$2b(this._contourCommand)&&t.commandList.push(this._contourCommand),this.updateTimeDimension(e)},_$9.prototype.updateTimeDimension=function(e){this._timeDimension>1?(e._timeIndexChange&&this._timeIndex++,this._timeIndex==this._timeDimension&&(this._timeIndex=0)):this._timeIndex=0},_$9.prototype._setDataBounds=function(e){this._dataBounds=e},_$9.prototype._useGradientOpacityChanged=function(e){e?this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"GRADIENT_OPACITY"):this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"GRADIENT_OPACITY")},_$9.prototype._enableLightingChange=function(e){e?(this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"APPLY_LIGHTING"),this._appendProgramDefineForCommand(this._contourCommand,!1,!0,"APPLY_LIGHTING")):(this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"APPLY_LIGHTING"),this._removeProgramDefineForCommand(this._contourCommand,!1,!0,"APPLY_LIGHTING"))},_$9.prototype._clipPlaneChanged=function(e){e._clipPlanes.length>0?this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"CLIP_PLANE"):this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"CLIP_PLANE")},_$9.prototype._setZBounds=function(e){this._zBounds=e},_$9.prototype._appendProgramDefineForCommand=function(e,t,i,n){if(e$2b(e)){var r=this._context,o=e.shaderProgram.fragmentShaderSource,a=e.shaderProgram.vertexShaderSource;t&&xt$1(a,n),i&&xt$1(o,n),e.shaderProgram.destroy(),e.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}},_$9.prototype._removeProgramDefineForCommand=function(e,t,i,n){if(e$2b(e)){var r=this._context,o=e.shaderProgram.fragmentShaderSource,a=e.shaderProgram.vertexShaderSource;t&&Bt$2(a,n),i&&Bt$2(o,n),e.shaderProgram.destroy(),e.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}},_$9.prototype.isDestroyed=function(){return!1},_$9.prototype.destroy=function(){for(var e=this._volTextures.length,t=0;t<e;t++)this._volTextures[t].destroy();return e$2b(this._volumeBoxCommand)&&($$5(this._volumeBoxCommand),this._volumeBoxCommand=void 0),e$2b(this._outlineCommand)&&($$5(this._outlineCommand),this._outlineCommand=void 0),e$2b(this._xSliceCommand)&&($$5(this._xSliceCommand),this._xSliceCommand=void 0),e$2b(this._ySliceCommand)&&($$5(this._ySliceCommand),this._ySliceCommand=void 0),e$2b(this._zSliceCommand)&&($$5(this._zSliceCommand),this._zSliceCommand=void 0),e$2b(this._contourCommand)&&($$5(this._contourCommand),this._contourCommand=void 0),e$2b(this._jitterTexture)&&this._jitterTexture.destroy(),this.output=void 0,this.marchingCubes=void 0,i$10(this)},o$a.prototype=new _$9,o$a.prototype.constructor=o$a,o$a.prototype.parent=_$9.prototype,Object.defineProperties(o$a.prototype,{}),o$a.prototype._encodeImageData=function(e,t,i,n){for(var r=this._nLength*this._nLength*4,o=new Array(r),a=i-t,s=t,l=0;l<e.zDimSize;l++)for(var u=parseInt(l/this._nSideBlockCount)*this._nBlockLength,c=l%this._nSideBlockCount*this._nBlockLength,h=-1;h<this._nBlockLength-1;h++)for(var d=-1;d<this._nBlockLength-1;d++){var f=Math.min(d,e.xValidSize-1),p=Math.min(h,e.yValidSize-1);f=Math.max(0,f),p=Math.max(0,p);var _=l*e.yDimSize*e.xDimSize+(e.yValidSize-1-p)*e.xDimSize+f;if(!(_<0)){var m=n[_],g=new e$29(0,0,0,0);if(-9999!=m){m<t||m>i?m=s:s=m;var x=H$7(m=(m-t)/a);g.x=x.x,g.y=x.y,g.z=x.z,g.w=1}var v=255*g.x,y=255*g.y,$=255*g.z,b=255*g.w;o[4*(_=(u+h)*this._nLength+c+d)]=parseInt(v),o[4*_+1]=parseInt(y),o[4*_+2]=parseInt($),o[4*_+3]=parseInt(b)}}return new Uint8Array(o,0,r)},o$a.prototype._loadVolume=function(e,t){this._maxValue=t.maxValue,this._minValue=t.minValue,this._timeDimension=t.time,this._ceil=t.maxValue,this._floor=t.minValue,this._nWidth=t.xValidSize,this._nHeight=t.yValidSize,this._nDepth=t.zValidSize;var i=e.slice(36,e.byteLength),n=4*t.xDimSize*t.yDimSize*t.zDimSize;this._nSideBlockCount=Math.ceil(Math.sqrt(t.zDimSize)),this._nBlockLength=Math.max(t.xDimSize,t.yDimSize)+2,this._nLength=G$7(this._nBlockLength*this._nSideBlockCount-2);t.xValidSize,t.yValidSize,t.zValidSize;for(var r=[],o=0;o<this._timeDimension;o++){var a=new Float32Array(i.slice(o*n,(o+1)*n));r.push(this._encodeImageData(t,t.minValue,t.maxValue,a))}return r},o$a.prototype.updateTimeDimension=function(e){this._isRootTile?this._timeDimension>1?(e._timeIndexChange&&this._timeIndex++,this._timeIndex==this._timeDimension&&(this._timeIndex=0)):this._timeIndex=0:this._timeIndex=this._rootTile._timeIndex},o$a.prototype._computePosition=function(){var e=this._mode,t=new o$1p(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);this._matLocalView=new p$1d,this._matInverseLocalView=new p$1d;var i=[];if(e===C$13.COLUMBUS_VIEW)this._vecCenter=new o$1p(t.z,t.x,t.y),p$1d.fromTranslation(this._vecCenter,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.south),i[1]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.south),i[2]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.north),i[3]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.north),i[4]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.south),i[5]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.south),i[6]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.north),i[7]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.north);else{this._vecCenter=o$1p.fromDegrees(t.x,t.y,t.z);var n=new i$15;m$17.headingPitchRollToFixedFrame(this._vecCenter,n,t$13.WGS84,m$17.eastNorthUpToFixedFrame,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.x),i[1]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.x),i[2]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.x),i[3]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.x),i[4]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.y),i[5]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.y),i[6]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.y),i[7]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.y)}this._dWidth=o$1p.distance(i[1],i[0]),this._dHeight=o$1p.distance(i[3],i[0]),this._dDepth=o$1p.distance(i[4],i[0]),this._orientedBoundingBox=y$Z.fromPoints(i,this._orientedBoundingBox),this._boundingSphere=new i$1c,p$1d.multiplyByPoint(this._matLocalView,o$1p.ZERO,this._boundingSphere.center),this._boundingSphere.radius=.5*Math.sqrt(this._dWidth*this._dWidth+this._dHeight*this._dHeight+this._dDepth*this._dDepth)},o$a.prototype.calcPixFromCam=function(e,t,i){if(this._boundingSphere){var n=e.positionWC,r=o$1p.clone(this._boundingSphere.center),o=o$1p.distance(r,n);e._mode==C$13.SCENE2D&&(o=e.positionCartographic.height),this._disFromCamera=o-this._boundingSphere.radius;var a;a=2*q$5(e,t,this._boundingSphere),this._isLessLodDis=a<=this._rangeList*i,this._pix=a}},o$a.prototype.load=function(e){var t,i,n=this._s3mLoadState,r=this;N$P.UNLOAD===n&&(r._s3mLoadState=N$P.LOADING,t=r._x<10?"000"+r._x:r._x<100?"00"+r._x:r._x<1e3?"0"+r._x:r._x,i=r._y<10?"000"+r._y:r._y<100?"00"+r._y:r._y<1e3?"0"+r._y:r._y,o$1l(o$10(e._url+"/"+r._level+"/"+i+"/"+t+"/"+i+"_"+t+".vol"),(function(e){r._s3mLoadState=N$P.LOADED,r._arrayBuffer=e})).otherwise((function(e){throw new DeveloperError("Not a valid NetCDF file!")})))};var C$7=new p$1d;o$a.prototype._createUniformMap=function(e){this.parent._createUniformMap.call(this,e);var t=this,i={uMultiResolutionPara1:function(){return e$2b(t._multiTextures[0])?t._multiTextures[0].multiResolutionPara:C$7},uMultiResolutionPara2:function(){return e$2b(t._multiTextures[1])?t._multiTextures[1].multiResolutionPara:C$7},uMultiResolutionPara3:function(){return e$2b(t._multiTextures[2])?t._multiTextures[2].multiResolutionPara:C$7},uVolumeTexture1:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return e$2b(t._multiTextures[0])?t._multiTextures[0]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture1:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,e$2b(t._multiTextures[0])?t._multiTextures[0]._volTextures[i]:t._volTextures[i]},uVolumeTexture2:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return e$2b(t._multiTextures[1])?t._multiTextures[1]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture2:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,e$2b(t._multiTextures[1])?t._multiTextures[1]._volTextures[i]:t._volTextures[i]},uVolumeTexture3:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return e$2b(t._multiTextures[2])?t._multiTextures[2]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture3:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,e$2b(t._multiTextures[2])?t._multiTextures[2]._volTextures[i]:t._volTextures[i]}};e$2b(this._xSliceCommand)&&(this._xSliceCommand.uniformMap=p$19(i,this._xSliceCommand.uniformMap),this._ySliceCommand.uniformMap=p$19(i,this._ySliceCommand.uniformMap),this._zSliceCommand.uniformMap=p$19(i,this._zSliceCommand.uniformMap)),e$2b(this._volumeBoxCommand)&&(this._volumeBoxCommand.uniformMap=p$19(i,this._volumeBoxCommand.uniformMap)),e$2b(this._outlineCommand)&&(this._outlineCommand.uniformMap=p$19(i,this._outlineCommand.uniformMap))},o$a.prototype._createShaderPreDefines=function(e,t){var i=this.parent._createShaderPreDefines.call(this,e,t);return i.push("MultiResolution"),i};var _0x3684a0=(_0x371d61=!0,function(e,t){var i=_0x371d61?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x371d61=!1,i}),_0x513b17=_0x3684a0(void 0,(function(){return _0x513b17.toString().search("(((.+)+)+)+$").toString().constructor(_0x513b17).search("(((.+)+)+)+$")})),_0x371d61;function _0x52c5cf(){this.model={clamping:!0,allowDuplicateScalars:!1,range:[0,0]},this.model.nodes=[]}_0x513b17(),_0x52c5cf.prototype.getSize=function(){return this.model.nodes.length},_0x52c5cf.prototype.getType=function(){var e,t=0,i=0;this.model.nodes.length>0&&(t=this.model.nodes[0].y);for(var n=1;n<this.model.nodes.length;n++){if((e=this.model.nodes[n].y)!==t)if(e>t)switch(i){case 0:case 1:i=1;break;default:i=3}else switch(i){case 0:case 2:i=2;break;default:i=3}if(t=e,3===i)break}switch(i){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:return"Varied"}},_0x52c5cf.prototype.getDataPointer=function(){var e=this.model.nodes.length;if(this.model.function=null,e>0){this.model.function=[];for(var t=0;t<e;t++)this.model.function[2*t]=this.model.nodes[t].x,this.model.function[2*t+1]=this.model.nodes[t].y}return this.model.function},_0x52c5cf.prototype.getFirstNonZeroValue=function(){if(0===this.model.nodes.length)return 0;for(var e=1,t=0;t<this.model.nodes.length;t++)if(0!==this.model.nodes[t].y){e=0;break}return e?Number.MAX_VALUE:t>0?this.model.nodes[t-1].x:this.model.clamping?-Number.MAX_VALUE:this.model.nodes[0].x},_0x52c5cf.prototype.getNodeValue=function(e,t){var i=this.model.nodes.length;return e<0||e>=i?-1:(t[0]=this.model.nodes[e].x,t[1]=this.model.nodes[e].y,t[2]=this.model.nodes[e].midpoint,t[3]=this.model.nodes[e].sharpness,1)},_0x52c5cf.prototype.setNodeValue=function(e,t){var i=this.model.nodes.length;if(e<0||e>=i)return-1;var n=this.model.nodes[e].x;return this.model.nodes[e].x=t[0],this.model.nodes[e].y=t[1],this.model.nodes[e].midpoint=t[2],this.model.nodes[e].sharpness=t[3],n!==t[0]?this.sortAndUpdateRange():this.modified(),1},_0x52c5cf.prototype.addPoint=function(e,t){this.addPointLong(e,t,.5,0)},_0x52c5cf.prototype.addPointLong=function(e,t,i,n){if(i<0||i>1||n<0||n>1)return-1;this.model.allowDuplicateScalars||this.removePoint(e);var r,o={x:e,y:t,midpoint:i,sharpness:n};for(this.model.nodes.push(o),this.sortAndUpdateRange(),r=0;r<this.model.nodes.length&&this.model.nodes[r].x!==e;r++);return r<this.model.nodes.length?r:-1},_0x52c5cf.prototype.setNodes=function(e){this.model.nodes!==e&&(this.model.nodes=e,this.sortAndUpdateRange())},_0x52c5cf.prototype.getRange=function(){return this.model.range},_0x52c5cf.prototype.updateRange=function(){var e=this.model.range.slice(),t=this.model.nodes.length;return t?(this.model.range[0]=this.model.nodes[0].x,this.model.range[1]=this.model.nodes[t-1].x):(this.model.range[0]=0,this.model.range[1]=0),(e[0]!==this.model.range[0]||e[1]!==this.model.range[1])&&(this.modified(),!0)},_0x52c5cf.prototype.sortAndUpdateRange=function(e){this.model.nodes.sort((function(e,t){return e.x-t.x})),this.updateRange()||this.modified()},_0x52c5cf.prototype.removePoint=function(e){var t;for(t=0;t<this.model.nodes.length&&this.model.nodes[t].x!==e;t++);if(t>=this.model.nodes.length)return-1;var i=t,n=!1;return this.model.nodes.splice(t,1),(0===t||t===this.model.nodes.length)&&(n=this.updateRange()),n||this.modified(),i},_0x52c5cf.prototype.removeAllPoints=function(){this.model.nodes=[],this.sortAndUpdateRange()},_0x52c5cf.prototype.addSegment=function(e,t,i,n){this.sortAndUpdateRange();for(var r=0;r<this.model.nodes.length;)this.model.nodes[r].x>=e&&this.model.nodes[r].x<=i?this.model.nodes.splice(r,1):r++;this.addPoint(e,t,.5,0),this.addPoint(i,n,.5,0)},_0x52c5cf.prototype.getValue=function(e){var t=[];return this.getTable(e,e,1,t),t[0]},_0x52c5cf.prototype.adjustRange=function(e){if(e.length<2)return 0;var t=this.getRange();t[0]<e[0]?this.addPoint(e[0],this.getValue(e[0])):this.addPoint(e[0],this.getValue(t[0])),t[1]>e[1]?this.addPoint(e[1],this.getValue(e[1])):this.addPoint(e[1],this.getValue(t[1])),this.sortAndUpdateRange();for(var i=0;i<this.model.nodes.length;)this.model.nodes[i].x>=e[0]&&this.model.nodes[i].x<=e[1]?this.model.nodes.splice(i,1):++i;return this.sortAndUpdateRange(),1},_0x52c5cf.prototype.estimateMinNumberOfSamples=function(e,t){var i=this.findMinimumXDistance();return Math.ceil((t-e)/i)},_0x52c5cf.prototype.findMinimumXDistance=function(){var e=this.model.nodes.length;if(e<2)return-1;for(var t=this.model.nodes[1].x-this.model.nodes[0].x,i=0;i<e-1;i++){var n=this.model.nodes[i+1].x-this.model.nodes[i].x;n<t&&(t=n)}return t},_0x52c5cf.prototype.getTable=function(e,t,i,n,r){e$2b(r)||(r=1);var o,a=0,s=this.model.nodes.length,l=0;0!==s&&(l=this.model.nodes[s-1].y);var u=0,c=0,h=0,d=0,f=0,p=0,_=0;for(o=0;o<i;o++){var m=r*o;for(u=i>1?e+o/(i-1)*(t-e):.5*(e+t);a<s&&u>this.model.nodes[a].x;)++a<s&&(c=this.model.nodes[a-1].x,h=this.model.nodes[a].x,d=this.model.nodes[a-1].y,f=this.model.nodes[a].y,p=this.model.nodes[a-1].midpoint,_=this.model.nodes[a-1].sharpness,p<1e-5&&(p=1e-5),p>.99999&&(p=.99999));if(a>=s)n[m]=this.model.clamping?l:0;else if(0===a)n[m]=this.model.clamping?this.model.nodes[0].y:0;else{var g=(u-c)/(h-c);if(g=g<p?.5*g/p:.5+.5*(g-p)/(1-p),_>.99){if(g<.5){n[m]=d;continue}n[m]=f;continue}if(_<.01){n[m]=(1-g)*d+g*f;continue}g<.5?g=.5*(2*g)**(1+10*_):g>.5&&(g=1-.5*(2*(1-g))**(1+10*_));var x=g*g,v=x*g,y=2*v-3*x+1,$=-2*v+3*x,b=v-2*x+g,T=v-x,C=(1-_)*(f-d);n[m]=y*d+$*f+b*C+T*C;var S=d<f?d:f,w=d>f?d:f;n[m]=n[m]<S?S:n[m],n[m]=n[m]>w?w:n[m]}}},_0x52c5cf.prototype.modified=function(){},_0x52c5cf.clone=function(e,t){if(e$2b(e)){var i;for(e$2b(t)||(t=new _0x52c5cf),i=0;i<e.model.nodes.length;i++){var n=e.model.nodes[i];t.model.nodes.push({x:n.x,y:n.y,midpoint:n.midpoint,sharpness:n.sharpness})}return t.sortAndUpdateRange(),t}};var _0x342a4a=(_0x1a9e07=!0,function(e,t){var i=_0x1a9e07?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a9e07=!1,i}),_0x2f8ec3=_0x342a4a(void 0,(function(){return _0x2f8ec3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f8ec3).search("(((.+)+)+)+$")})),_0x1a9e07;_0x2f8ec3();var _0x5da5e9={RGB:0,HSV:1,LAB:2,DIVERGING:3},_0x1e715d={LINEAR:0,LOG10:1};function _0x2aec26(e,t){var i=e[0],n=e[1],r=e[2],o=Math.sqrt(i*i+n*n+r*r),a=o>.001?Math.acos(i/o):0,s=a>.001?Math.atan2(r,n):0;t[0]=o,t[1]=a,t[2]=s}function _0x1371e7(e,t){var i=e[0],n=e[1],r=e[2];t[0]=i*Math.cos(n),t[1]=i*Math.sin(n)*Math.cos(r),t[2]=i*Math.sin(n)*Math.sin(r)}function _0x18d9b2(e,t){if(e[0]>=t-.1)return e[2];var i=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+i:e[2]-i}function _0x8741a4(e,t){var i=e-t;for(i<0&&(i=-i);i>=2*Math.PI;)i-=2*Math.PI;return i>Math.PI&&(i=2*Math.PI-i),i}function _0x5889b4(e,t,i,n){var r=[],o=[];_0x5c9f6b(t,r),_0x5c9f6b(i,o);var a=[],s=[];_0x2aec26(r,a),_0x2aec26(o,s);var l=e;if(a[1]>.05&&s[1]>.05&&_0x8741a4(a[2],s[2])>.33*Math.PI){var u=Math.max(a[0],s[0]);u=Math.max(88,u),e<.5?(s[0]=u,s[1]=0,s[2]=0,l*=2):(a[0]=u,a[1]=0,a[2]=0,l=2*l-1)}a[1]<.05&&s[1]>.05?a[2]=_0x18d9b2(s,a[0]):s[1]<.05&&a[1]>.05&&(s[2]=_0x18d9b2(a,s[0]));var c=[];c[0]=(1-l)*a[0]+l*s[0],c[1]=(1-l)*a[1]+l*s[1],c[2]=(1-l)*a[2]+l*s[2];var h=[];_0x1371e7(c,h),_0x57b93b(h,n)}function _0x40204d(){this.model={clamping:!0,colorSpace:_0x5da5e9.RGB,hSVWrap:!0,scale:_0x1e715d.LINEAR,nanColor:null,belowRangeColor:null,aboveRangeColor:null,useAboveRangeColor:!1,useBelowRangeColor:!1,allowDuplicateScalars:!1,table:null,tableSize:0,buildTime:null,nodes:null,discretize:!1,numberOfValues:256,range:[0,1],mappingRange:[0,1]},this.model.table=[],this.model.nodes=[],this.model.nanColor=[.5,0,0,1],this.model.belowRangeColor=[0,0,0,1],this.model.aboveRangeColor=[1,1,1,1],this.model.buildTime={}}function _0x5ea91d(e,t){var i,n,r=e[0],o=e[1],a=e[2],s=1/6,l=r,u=r;o>l?l=o:o<u&&(u=o),a>l?l=a:a<u&&(u=a);const c=l;(n=c>0?(l-u)/l:0)>0?(i=r===l?s*(o-a)/(l-u):o===l?1/3+s*(a-r)/(l-u):2/3+s*(r-o)/(l-u))<0&&(i+=1):i=0,t[0]=i,t[1]=n,t[2]=c}function _0x1bc1da(e,t){var i,n,r,o=e[0],a=e[1],s=e[2],l=1/3,u=1/6,c=2/3,h=5/6;o>u&&o<=l?(n=1,i=(l-o)/u,r=0):o>l&&o<=.5?(n=1,r=(o-l)/u,i=0):o>.5&&o<=c?(r=1,n=(c-o)/u,i=0):o>c&&o<=h?(r=1,i=(o-c)/u,n=0):o>h&&o<=1?(i=1,r=(1-o)/u,n=0):(i=1,n=o/u,r=0),i=a*i+(1-a),n=a*n+(1-a),r=a*r+(1-a),i*=s,n*=s,r*=s,t[0]=i,t[1]=n,t[2]=r}function _0x4049cb(e,t){var i=(e[0]+16)/116,n=e[1]/500+i,r=i-e[2]/200;i**3>.008856?i**=3:i=(i-16/116)/7.787,n**3>.008856?n**=3:n=(n-16/116)/7.787,r**3>.008856?r**=3:r=(r-16/116)/7.787;t[0]=.9505*n,t[1]=1*i,t[2]=1.089*r}function _0x4347d9(e,t){var i=e[0]/.9505,n=e[1]/1,r=e[2]/1.089;i>.008856?i**=1/3:i=7.787*i+16/116,n>.008856?n**=1/3:n=7.787*n+16/116,r>.008856?r**=1/3:r=7.787*r+16/116,t[0]=116*n-16,t[1]=500*(i-n),t[2]=200*(n-r)}function _0x2dd559(e,t){var i=e[0],n=e[1],r=e[2],o=3.2406*i+-1.5372*n+-.4986*r,a=-.9689*i+1.8758*n+.0415*r,s=.0557*i+-.204*n+1.057*r;o>.0031308?o=1.055*o**(1/2.4)-.055:o*=12.92,a>.0031308?a=1.055*a**(1/2.4)-.055:a*=12.92,s>.0031308?s=1.055*s**(1/2.4)-.055:s*=12.92;var l=o;l<a&&(l=a),l<s&&(l=s),l>1&&(o/=l,a/=l,s/=l),o<0&&(o=0),a<0&&(a=0),s<0&&(s=0),t[0]=o,t[1]=a,t[2]=s}function _0x322826(e,t){var i=e[0],n=e[1],r=e[2];i>.04045?i=((i+.055)/1.055)**2.4:i/=12.92,n>.04045?n=((n+.055)/1.055)**2.4:n/=12.92,r>.04045?r=((r+.055)/1.055)**2.4:r/=12.92,t[0]=.4124*i+.3576*n+.1805*r,t[1]=.2126*i+.7152*n+.0722*r,t[2]=.0193*i+.1192*n+.9505*r}function _0x5c9f6b(e,t){var i=[0,0,0];_0x322826(e,i),_0x4347d9(i,t)}function _0x57b93b(e,t){var i=[0,0,0];_0x4049cb(e,i),_0x2dd559(i,t)}function g$d(e){o$1q.defined("context",e),this._context=e,this._NetCDFData=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._dictColorTable=void 0,this._hasColorTable=0,this._hypsometricTexture=void 0,this._filterMode=k$Q.FilterMode.LINEAR,this._volumeRenderMode=gt$1.VolumeRendering,this._scale=new o$1p(1,1,1),this._scaleDirty=!1,this._sliceCoordDirty=!1,this._transparency=0,this._sliceCoordinate=new o$1p(.5,.5,.5),this._floor=Number.MAX_VALUE,this._ceil=Number.MIN_VALUE,this._maxFiltration=Number.MAX_VALUE,this._minFiltration=Number.MIN_VALUE,this._visible=!0,this._type="VoxelGridLayer3D",this._name=void 0,this._url=void 0,this._voxelGridTile=void 0,this._zBounds=void 0,this._layerBounds=void 0,this._version=1,this._width=0,this._height=0,this._depth=0,this._time=0,this._cellWidth=0,this._cellHeight=0,this._cellDepth=0,this._cellTime=0,this._levels=0,this._availableNode=void 0,this._volumeBuffer=void 0,this._multiTextures=[],this._textureLevelLoaded=!0,this._period=500,this._prevTime=0,this._timeRatio=0,this._timeIndexChange=!1,this._duration=1,this._startRender=!1,this._frameIndex=-1,this._useGradientOpacity=!1,this._gradientOpacityMinOpacity=0,this._gradientOpacityMaxOpacity=1,this._gradientOpacityMinValue=0,this._gradientOpacityMaxValue=1,this._clipPlanes=[],this._contourValue=0,this._contourValueDirty=!1,this._enableLighting=!1,this._material={diffuse:new e$1U(.9,.9,.9),specular:new e$1U(.2,.2,.2),ambient:new e$1U(.1,.1,.1),shiness:10},this._fillStyle=fr$2.Fill,this._outlineColor=new e$1U(1,1,1,1)}_0x40204d.clone=function(e,t){if(e$2b(e)){var i;for(e$2b(t)||(t=new _0x40204d),i=0;i<e.model.nodes.length;i++){var n=e.model.nodes[i];t.model.nodes.push({x:n.x,r:n.r,g:n.g,b:n.b,midpoint:n.midpoint,sharpness:n.sharpness})}return t.sortAndUpdateRange(),t.model.mappingRange[0]=e.model.mappingRange[0],t.model.mappingRange[1]=e.model.mappingRange[1],t}},_0x40204d.prototype.getSize=function(){return this.model.nodes.length},_0x40204d.prototype.addRGBPoint=function(e,t,i,n){this.addRGBPointLong(e,t,i,n,.5,0)},_0x40204d.prototype.addRGBPointLong=function(e,t,i,n,r,o){var a=u$_(r,.5),s=u$_(o,0);if(a<0||a>1||s<0||s>1)return-1;this.model.allowDuplicateScalars||this.removePoint(e);var l={x:e,r:t,g:i,b:n,midpoint:a,sharpness:s};this.model.nodes.push(l),this.sortAndUpdateRange();for(var u=0;u<this.model.nodes.length&&this.model.nodes[u].x!==e;u++);return u<this.model.nodes.length?u:-1},_0x40204d.prototype.addHSVPoint=function(e,t,i,n){this.addHSVPointLong(e,t,i,n,.5,0)},_0x40204d.prototype.addHSVPointLong=function(e,t,i,n,r,o){var a=u$_(r,.5),s=u$_(o,0),l=[];return _0x1bc1da([t,i,n],l),this.addRGBPoint(e,l[0],l[1],l[2],a,s)},_0x40204d.prototype.setNodes=function(e){this.model.nodes!==e&&(this.model.nodes=e,this.sortAndUpdateRange())},_0x40204d.prototype.sortAndUpdateRange=function(){this.model.nodes.sort((function(e,t){return e.x-t.x})),this.updateRange()||this.modified()},_0x40204d.prototype.getRange=function(){return this.model.mappingRange},_0x40204d.prototype.updateRange=function(){var e=[2];e[0]=this.model.mappingRange[0],e[1]=this.model.mappingRange[1];var t=this.model.nodes.length;return t?(this.model.mappingRange[0]=this.model.nodes[0].x,this.model.mappingRange[1]=this.model.nodes[t-1].x):(this.model.mappingRange[0]=0,this.model.mappingRange[1]=0),(e[0]!==this.model.mappingRange[0]||e[1]!==this.model.mappingRange[1])&&(this.modified(),!0)},_0x40204d.prototype.removePoint=function(e){for(var t=0;t<this.model.nodes.length&&this.model.nodes[t].x!==e;t++);var i=t;if(t>=this.model.nodes.length)return-1;var n=!1;return this.model.nodes.splice(t,1),(0===t||t===this.model.nodes.length)&&(n=this.updateRange()),n||this.modified(),i},_0x40204d.prototype.movePoint=function(e,t){if(e!==t){this.removePoint(t);for(var i=0;i<this.model.nodes.length;i++)if(this.model.nodes[i].x===e){this.model.nodes[i].x=t,this.sortAndUpdateRange();break}}},_0x40204d.prototype.removeAllPoints=function(){this.model.nodes=[],this.sortAndUpdateRange()},_0x40204d.prototype.addRGBSegment=function(e,t,i,n,r,o,a,s){this.sortAndUpdateRange();for(var l=0;l<this.model.nodes.length;)this.model.nodes[l].x>=e&&this.model.nodes[l].x<=r?this.model.nodes.splice(l,1):l++;this.addRGBPointLong(e,t,i,n,.5,0),this.addRGBPointLong(r,o,a,s,.5,0),this.modified()},_0x40204d.prototype.addHSVSegment=function(e,t,i,n,r,o,a,s){var l=[o,a,s],u=[],c=[];_0x1bc1da([t,i,n],u),_0x1bc1da(l,c),this.addRGBSegment(e,u[0],u[1],u[2],r,c[0],c[1],c[2])},_0x40204d.prototype.mapValue=function(e){var t=[];return this.getColor(e,t),[Math.floor(255*t[0]+.5),Math.floor(255*t[1]+.5),Math.floor(255*t[2]+.5),255]},_0x40204d.prototype.getColor=function(e,t){if(this.model.indexedLookup){var i=this.getSize(),n=this.getAnnotatedValueIndexInternal(e);if(n<0||0===i)this.getNanColor(t);else{var r=[];this.getNodeValue(n%i,r),t[0]=r.r,t[1]=r.g,t[2]=r.b}}else this.getTable(e,e,1,t)},_0x40204d.prototype.getRedValue=function(e){var t=[];return this.getColor(e,t),t[0]},_0x40204d.prototype.getGreenValue=function(e){var t=[];return this.getColor(e,t),t[1]},_0x40204d.prototype.getBlueValue=function(e){var t=[];return this.getColor(e,t),t[2]},_0x40204d.prototype.getTable=function(e,t,i,n){if(isNaN(e)||isNaN(t))for(var r=0;r<i;r++)n[3*r+0]=this.model.nanColor[0],n[3*r+1]=this.model.nanColor[1],n[3*r+2]=this.model.nanColor[2];else{var o=0,a=this.model.nodes.length,s=0,l=0,u=0;0!==a&&(s=this.model.nodes[a-1].r,l=this.model.nodes[a-1].g,u=this.model.nodes[a-1].b);var c=0,h=0,d=0,f=[0,0,0],p=[0,0,0],_=0,m=0,g=[],x=this.model.scale===_0x1e715d.LOG10;x&&(x=this.model.mappingRange[0]>0);var v=0,y=0,$=0;x&&(v=Math.log10(e),y=Math.log10(t));for(r=0;r<i;r++){var b=3*r;if(i>1?x?c=10**($=v+r/(i-1)*(y-v)):c=e+r/(i-1)*(t-e):x?c=10**($=.5*(v+y)):c=.5*(e+t),this.model.discretize){var T=this.model.mappingRange;if(c>=T[0]&&c<=T[1]){var C=this.model.numberOfValues,S=T[1]-T[0];if(C<=1)c=T[0]+S/2;else{var w=(c-T[0])/S,E=Math.floor(C*w);c=T[0]+E/(C-1)*S}}}for(;o<a&&c>this.model.nodes[o].x;)++o<a&&(h=this.model.nodes[o-1].x,d=this.model.nodes[o].x,x&&(h=Math.log10(h),d=Math.log10(d)),f[0]=this.model.nodes[o-1].r,p[0]=this.model.nodes[o].r,f[1]=this.model.nodes[o-1].g,p[1]=this.model.nodes[o].g,f[2]=this.model.nodes[o-1].b,p[2]=this.model.nodes[o].b,_=this.model.nodes[o-1].midpoint,m=this.model.nodes[o-1].sharpness,_<1e-5&&(_=1e-5),_>.99999&&(_=.99999));if(c>this.model.mappingRange[1])n[b]=0,n[b+1]=0,n[b+2]=0,this.model.clamping&&(this.getUseAboveRangeColor()?(n[b]=this.model.aboveRangeColor[0],n[b+1]=this.model.aboveRangeColor[1],n[b+2]=this.model.aboveRangeColor[2]):(n[b]=s,n[b+1]=l,n[b+2]=u));else if(c<this.model.mappingRange[0]||!Number.isFinite(c)&&c<0)n[b]=0,n[b+1]=0,n[b+2]=0,this.model.clamping&&(this.getUseBelowRangeColor()?(n[b]=this.model.belowRangeColor[0],n[b+1]=this.model.belowRangeColor[1],n[b+2]=this.model.belowRangeColor[2]):a>0&&(n[b]=this.model.nodes[0].r,n[b+1]=this.model.nodes[0].g,n[b+2]=this.model.nodes[0].b));else if(0===o&&(Math.abs(c-e)<1e-6||this.model.discretize))a>0?(n[b]=this.model.nodes[0].r,n[b+1]=this.model.nodes[0].g,n[b+2]=this.model.nodes[0].b):(n[b]=0,n[b+1]=0,n[b+2]=0);else{var P=0;if(P=(P=x?($-h)/(d-h):(c-h)/(d-h))<_?.5*P/_:.5+.5*(P-_)/(1-_),m>.99){if(P<.5){n[b]=f[0],n[b+1]=f[1],n[b+2]=f[2];continue}n[b]=p[0],n[b+1]=p[1],n[b+2]=p[2];continue}if(m<.01){if(this.model.colorSpace===_0x5da5e9.RGB)n[b]=(1-P)*f[0]+P*p[0],n[b+1]=(1-P)*f[1]+P*p[1],n[b+2]=(1-P)*f[2]+P*p[2];else if(this.model.colorSpace===_0x5da5e9.HSV){var A=[];_0x5ea91d(f,U=[]),_0x5ea91d(p,A),this.model.hSVWrap&&(U[0]-A[0]>.5||A[0]-U[0]>.5)&&(U[0]>A[0]?U[0]-=1:A[0]-=1),(z=[])[0]=(1-P)*U[0]+P*A[0],z[0]<0&&(z[0]+=1),z[1]=(1-P)*U[1]+P*A[1],z[2]=(1-P)*U[2]+P*A[2],_0x1bc1da(z,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else if(this.model.colorSpace===_0x5da5e9.LAB){var L=[];_0x5c9f6b(f,G=[]),_0x5c9f6b(p,L),(V=[])[0]=(1-P)*G[0]+P*L[0],V[1]=(1-P)*G[1]+P*L[1],V[2]=(1-P)*G[2]+P*L[2],_0x57b93b(V,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else this.model.colorSpace===_0x5da5e9.DIVERGING&&(_0x5889b4(P,f,p,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]);continue}P<.5?P=.5*(2*P)**(1+10*m):P>.5&&(P=1-.5*(2*(1-P))**(1+10*m));var M,R=P*P,I=R*P,O=2*I-3*R+1,D=-2*I+3*R,B=I-2*R+P,N=I-R;if(this.model.colorSpace===_0x5da5e9.RGB)for(var F=0;F<3;F++)M=(1-m)*(p[F]-f[F]),n[b+F]=O*f[F]+D*p[F]+B*M+N*M;else if(this.model.colorSpace===_0x5da5e9.HSV){var U;A=[];_0x5ea91d(f,U=[]),_0x5ea91d(p,A),this.model.hSVWrap&&(U[0]-A[0]>.5||A[0]-U[0]>.5)&&(U[0]>A[0]?U[0]-=1:A[0]-=1);var z=[];for(F=0;F<3;F++)M=(1-m)*(A[F]-U[F]),z[F]=O*U[F]+D*A[F]+B*M+N*M,0===F&&z[F]<0&&(z[F]+=1);_0x1bc1da(z,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else if(this.model.colorSpace===_0x5da5e9.LAB){var G;L=[];_0x5c9f6b(f,G=[]),_0x5c9f6b(p,L);var V=[];for(F=0;F<3;F++)M=(1-m)*(L[F]-G[F]),V[F]=O*G[F]+D*L[F]+B*M+N*M;_0x57b93b(V,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else this.model.colorSpace===_0x5da5e9.DIVERGING&&(_0x5889b4(P,f,p,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]);for(F=0;F<3;F++)n[b+F]=n[b+F]<0?0:n[b+F],n[b+F]=n[b+F]>1?1:n[b+F]}}}},_0x40204d.prototype.getUint8Table=function(e,t,i,n){if(n=u$_(n,!1),this.model.tableSize===i&&this.model.tableWithAlpha!==n)return this.model.table;if(0===this.model.nodes.length)return this.model.table;var r=n?4:3;(this.model.tableSize!==i||this.model.tableWithAlpha!==n)&&(this.model.table=new Uint8Array(i*r),this.model.tableSize=i,this.model.tableWithAlpha=n);var o=[];this.getTable(e,t,i,o);for(var a=0;a<i;a++)this.model.table[a*r+0]=Math.floor(255*o[3*a+0]+.5),this.model.table[a*r+1]=Math.floor(255*o[3*a+1]+.5),this.model.table[a*r+2]=Math.floor(255*o[3*a+2]+.5),n&&(this.model.table[a*r+3]=255);return this.model.buildTime.modified(),this.model.table},_0x40204d.prototype.buildFunctionFromTable=function(e,t,i,n){var r=0;this.removeAllPoints(),i>1&&(r=(t-e)/(i-1));for(var o=0;o<i;o++){var a={x:e+r*o,r:n[3*o],g:n[3*o+1],b:n[3*o+2],sharpness:0,midpoint:.5};this.model.nodes.push(a)}this.sortAndUpdateRange()},_0x40204d.prototype.getNodeValue=function(e,t){return e<0||e>=this.model.nodes.length?-1:(t[0]=this.model.nodes[e].x,t[1]=this.model.nodes[e].r,t[2]=this.model.nodes[e].g,t[3]=this.model.nodes[e].b,t[4]=this.model.nodes[e].midpoint,t[5]=this.model.nodes[e].sharpness,1)},_0x40204d.prototype.setNodeValue=function(e,t){if(e<0||e>=this.model.nodes.length)return-1;var i=this.model.nodes[e].x;return this.model.nodes[e].x=t[0],this.model.nodes[e].r=t[1],this.model.nodes[e].g=t[2],this.model.nodes[e].b=t[3],this.model.nodes[e].midpoint=t[4],this.model.nodes[e].sharpness=t[5],i!==t[0]?this.sortAndUpdateRange():this.modified(),1},_0x40204d.prototype.getNumberOfAvailableColors=function(){return this.model.indexedLookup&&this.getSize()?this.getSize():this.model.tableSize?this.model.tableSize:16777216},_0x40204d.prototype.getIndexedColor=function(e,t){var i=this.getSize();if(i>0&&e>=0){var n=[];this.getNodeValue(e%i,n);for(var r=0;r<3;++r)t[r]=n[r+1];t[3]=1}else this.getNanColor(t),t[3]=1},_0x40204d.prototype.fillFromDataPointer=function(e,t){if(!(e<=0)&&t){this.removeAllPoints();for(var i=0;i<e;i++)this.addRGBPoint(t[4*i],t[4*i+1],t[4*i+2],t[4*i+3])}},_0x40204d.prototype.setMappingRange=function(e,t){var i=[e,t],n=this.getRange();if((n[1]!==i[1]||n[0]!==i[0])&&i[1]!==i[0]){for(var r=(i[1]-i[0])/(n[1]-n[0]),o=i[0]-n[0]*r,a=0;a<this.model.nodes.length;++a)this.model.nodes[a].x=this.model.nodes[a].x*r+o;this.model.mappingRange[0]=i[0],this.model.mappingRange[1]=i[1],this.modified()}},_0x40204d.prototype.adjustRange=function(e){var t=this.getRange(),i=[];t[0]<e[0]?(this.getColor(e[0],i),this.addRGBPoint(e[0],i[0],i[1],i[2])):(this.getColor(t[0],i),this.addRGBPoint(e[0],i[0],i[1],i[2])),t[1]>e[1]?(this.getColor(e[1],i),this.addRGBPoint(e[1],i[0],i[1],i[2])):(this.getColor(t[1],i),this.addRGBPoint(e[1],i[0],i[1],i[2])),this.sortAndUpdateRange();for(var n=0;n<this.model.nodes.length;)this.model.nodes[n].x>=e[0]&&this.model.nodes[n].x<=e[1]?this.model.nodes.splice(n,1):++n;return 1},_0x40204d.prototype.estimateMinNumberOfSamples=function(e,t){var i=this.findMinimumXDistance();return Math.ceil((t-e)/i)},_0x40204d.prototype.findMinimumXDistance=function(){if(this.model.nodes.length<2)return-1;for(var e=Number.MAX_VALUE,t=0;t<this.model.nodes.length-1;t++){var i=this.model.nodes[t+1].x-this.model.nodes[t].x;i<e&&(e=i)}return e},_0x40204d.prototype.mapScalarsThroughTable=function(e,t,i,n){0!==this.getSize()&&(this.model.indexedLookup?this.mapDataIndexed(e,t,i,n):this.mapData(e,t,i,n))},_0x40204d.prototype.mapData=function(e,t,i,n){if(0!==this.getSize()){var r=Math.floor(255*this.getAlpha()+.5),o=e.getNumberOfTuples(),a=e.getNumberOfComponents(),s=t.getData(),l=e.getData(),u=[];if(i===ScalarMappingTarget.RGBA)for(var c=0;c<o;c++){var h=l[c*a+n];this.getColor(h,u),s[4*c]=Math.floor(255*u[0]+.5),s[4*c+1]=Math.floor(255*u[1]+.5),s[4*c+2]=Math.floor(255*u[2]+.5),s[4*c+3]=r}if(i===ScalarMappingTarget.RGB)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[3*c]=Math.floor(255*u[0]+.5),s[3*c+1]=Math.floor(255*u[1]+.5),s[3*c+2]=Math.floor(255*u[2]+.5)}if(i===ScalarMappingTarget.LUMINANCE)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[c]=Math.floor(76.5*u[0]+150.45*u[1]+28.05*u[2]+.5)}if(i===ScalarMappingTarget.LUMINANCE_ALPHA)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[2*c]=Math.floor(76.5*u[0]+150.45*u[1]+28.05*u[2]+.5),s[2*c+1]=r}}},_0x40204d.prototype.applyColorMap=function(e){if(e.ColorSpace&&(this.model.colorSpace=_0x5da5e9[e.ColorSpace.toUpperCase()],void 0===this.model.colorSpace&&(this.model.colorSpace=_0x5da5e9.RGB)),e.NanColor)for(this.model.nanColor=[].concat(e.NanColor);this.model.nanColor.length<4;)this.model.nanColor.push(1);if(e.RGBPoints){var t=e.RGBPoints.length;this.model.nodes=[];for(var i=0;i<t;i+=4)this.model.nodes.push({x:e.RGBPoints[i],r:e.RGBPoints[i+1],g:e.RGBPoints[i+2],b:e.RGBPoints[i+3],midpoint:.5,sharpness:0})}this.sortAndUpdateRange()},_0x40204d.prototype.modified=function(){},Object.defineProperties(g$d.prototype,{visible:{get:function(){return this._visible},set:function(e){this._visible=e}},type:{get:function(){return this._type}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e}},zBounds:{get:function(){return this._zBounds},set:function(e){this._zBounds=e}},name:{get:function(){return this._name}},NetCDFInfo:{get:function(){return this._NetCDFInfo}},maxFiltration:{get:function(){return this._maxFiltration},set:function(e){this._maxFiltration=e}},minFiltration:{get:function(){return this._minFiltration},set:function(e){this._minFiltration=e}},duration:{get:function(){return this._duration},set:function(e){o$1q.typeOf.number.greaterThan("duration",e,0),o$1q.typeOf.number.greaterThan("this._time",this._time,0),this._duration=e,this._period=1e3*this._duration/this._time}},opaqueRate:{get:function(){return this._transparency},set:function(e){this._transparency!==e&&(this._transparency=e)}},filterMode:{get:function(){return this._filterMode},set:function(e){this._filterMode!==e&&(this._filterMode=e)}},maxValue:{get:function(){return this._voxelGridTile.maxValue}},minValue:{get:function(){return this._voxelGridTile.minValue}},visibleBoundingBox:{get:function(){return this._voxelGridTile.visibleBoundingBox},set:function(e){this._voxelGridTile.visibleBoundingBox=e}},scale:{get:function(){return this._scale},set:function(e){o$1p.equals(e,this._scale)||(this._scale=o$1p.clone(e,this._scale),this._scaleDirty=!0)}},volumeRenderMode:{get:function(){return this._volumeRenderMode},set:function(e){this._volumeRenderMode=e}},sliceCoordinate:{get:function(){return this._sliceCoordinate},set:function(e){this._sliceCoordinate=e,this._sliceCoordDirty=!0}},frameIndex:{get:function(){return this._frameIndex},set:function(e){"number"!=typeof e||isNaN(e)||(this._frameIndex=e)}},colorTable:{get:function(){return this._dictColorTable},set:function(e){if(!e$2b(e))return e$2b(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),void(this._hasColorTable=0);this._dictColorTable=i$S.clone(e,this._dictColorTable),this._dictColorTable.count()<1?this._hasColorTable=0:(this._dictColorTable.generateBuffer(),e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:this._context,width:1024,height:64,pixelFormat:V$10.RGBA,flipY:!1})),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._dictColorTable._imageBuffer}),this._hasColorTable=1)}},colorTransferFunction:{get:function(){return this._colorTransferFunction},set:function(e){if(e$2b(e)){this._colorTransferFunction=_0x40204d.clone(e,this._colorTransferFunction);for(var t=1024,i=new Uint8Array(6144),n=new Float32Array(3*t),r=0;r<1;++r){var o=e.getRange();e.getTable(o[0],o[1],t,n,1);for(var a=0;a<3*t;++a)i[r*t*6+a]=255*n[a],i[r*t*6+a+3*t]=255*n[a]}e$2b(this._colorTexture)||(this._colorTexture=new t$V({context:this._context,width:t,height:2,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,flipY:!1}));var s=new Uint8Array(8192);for(a=0;a<2048;a++)s[4*a]=i[3*a],s[4*a+1]=i[3*a+1],s[4*a+2]=i[3*a+2],s[4*a+3]=255;this._colorTexture.copyFrom({width:t,height:2,arrayBufferView:s})}else e$2b(this._colorTransferFunction)&&(this._colorTransferFunction.destroy(),this._colorTransferFunction=null)}},opacityTransferFunction:{get:function(){return this._opacityTransferFunction},set:function(e){if(e$2b(e)){this._opacityTransferFunction=_0x52c5cf.clone(e,this._opacityTransferFunction);for(var t=1024,i=new Float32Array(2048),n=new Float32Array(t),r=0;r<1;++r){var o=e.getRange();e.getTable(o[0],o[1],t,n,1);for(var a=0;a<t;++a)i[r*t*2+a]=1-(1-n[a]),i[r*t*2+a+t]=i[r*t*2+a]}e$2b(this._opacityTexture)||(this._opacityTexture=new t$V({context:this._context,width:t,height:2,pixelFormat:this._context.webgl2||this._context.webgpu?V$10.RED:V$10.LUMINANCE,pixelDatatype:_$$.FLOAT,flipY:!1})),this._opacityTexture.copyFrom({width:t,height:2,arrayBufferView:i})}else e$2b(this._opacityTransferFunction)&&(this._opacityTransferFunction.destroy(),this._opacityTransferFunction=null)}},useGradientOpacity:{get:function(){return this._useGradientOpacity},set:function(e){e$2b(this._voxelGridTile)&&e!=this._useGradientOpacity&&this._voxelGridTile._useGradientOpacityChanged(e),this._useGradientOpacity=e}},gradientOpacityMinOpacity:{get:function(){return this._gradientOpacityMinOpacity},set:function(e){this._gradientOpacityMinOpacity=e}},gradientOpacityMaxOpacity:{get:function(){return this._gradientOpacityMaxOpacity},set:function(e){this._gradientOpacityMaxOpacity=e}},gradientOpacityMinValue:{get:function(){return this._gradientOpacityMinValue},set:function(e){this._gradientOpacityMinValue=e}},gradientOpacityMaxValue:{get:function(){return this._gradientOpacityMaxValue},set:function(e){this._gradientOpacityMaxValue=e}},contourValue:{get:function(){return this._contourValue},set:function(e){e!==this._contourValue&&(this._contourValue=Math.min(e,this.maxValue),this._contourValue=Math.max(e,this.minValue),this._contourValueDirty=!0)}},enableLighting:{get:function(){return this._enableLighting},set:function(e){e!==this._enableLighting&&(this._enableLighting=e,this._voxelGridTile._enableLightingChange(e))}},material:{get:function(){return this._material}},outlineColor:{get:function(){return this._outlineColor},set:function(e){this._outlineColor=e}},fillStyle:{get:function(){return this._fillStyle},set:function(e){this._fillStyle=e}},sampleDistance:{set:function(e){this._sampleDistance!==e&&(this._sampleDistance=e)}}}),g$d.prototype.update=function(e,t){if(this._frameState=t,this._visible&&this._startRender){this._timeIndexChange=!1;var i=performance.now(),n=i-this._prevTime;this._timeRatio=n/this._period,n>this._period&&(this._prevTime=i,this._timeRatio=0,this._timeIndexChange=!0),e$2b(this._voxelGridTile)&&(this._voxelGridTile instanceof o$a&&this.updateMultiResolution(e,t),this._voxelGridTile.update(this,t))}},g$d.prototype.setIsMultiResolution=function(e){e$2b(this._voxelGridTile)||(e?(this._voxelGridTile=new o$a(this._context,this),this._voxelGridTile._isRootTile=!0):this._voxelGridTile=new _$9(this._context,this))};var Vt$1=new i$V("loadVol");g$d.prototype.updateMultiResolution=function(e,t){var i=t.camera,n=t.cullingVolume,r=e._gl,o=t.requests,a=this;if(this._voxelGridTile._isVisible=n.computeVisibility(this._voxelGridTile._orientedBoundingBox)!==Ae$u.OUTSIDE,this._voxelGridTile._isVisible){if(!this._voxelGridTile._initialized)return void o.push({entity:this._voxelGridTile,priority:0,owner:this});this._voxelGridTile.calcPixFromCam(i,r,1),this._updateQueue=[[this._voxelGridTile]];for(var s,l,u,c,h,d,f=[this._voxelGridTile],p=1;p<this._levels;p++){for(var _={},m=0;m<f.length;m++){if(!(b=f[m])._isLessLodDis){if(u=this._availableNode[p].resolution.x,c=this._availableNode[p].resolution.y,e$2b(b._southwestChild))_[JSON.stringify([b._southwestChild._x,b._southwestChild._y,b._southwestChild._level])]=b._southwestChild;else if(h=2*b._x,d=2*b._y+1,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._southwestChild=new o$a(this._context,this),b._southwestChild._mode=t.mode,b._southwestChild._level=b._level+1,b._southwestChild._x=h,b._southwestChild._y=d,b._southwestChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;var g=this._layerBounds.north-d*c*this._cellHeight;b._southwestChild._dataBounds=new h$18(b._dataBounds.west,g-l,b._dataBounds.west+s,g),b._southwestChild._computePosition(),b._southwestChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._southwestChild._x,b._southwestChild._y,b._southwestChild._level])]=b._southwestChild}if(e$2b(b._southeastChild))_[JSON.stringify([b._southeastChild._x,b._southeastChild._y,b._southeastChild._level])]=b._southeastChild;else if(h=2*b._x+1,d=2*b._y+1,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._southeastChild=new o$a(this._context,this),b._southeastChild._mode=t.mode,b._southeastChild._level=b._level+1,b._southeastChild._x=h,b._southeastChild._y=d,b._southeastChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;g=this._layerBounds.north-d*c*this._cellHeight;var x=this._layerBounds.west+h*u*this._cellWidth;b._southeastChild._dataBounds=new h$18(x,g-l,x+s,g),b._southeastChild._computePosition(),b._southeastChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._southeastChild._x,b._southeastChild._y,b._southeastChild._level])]=b._southeastChild}if(e$2b(b._northwestChild)?_[JSON.stringify([b._northwestChild._x,b._northwestChild._y,b._northwestChild._level])]=b._northwestChild:(h=2*b._x,d=2*b._y,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow&&(b._northwestChild=new o$a(this._context,this),b._northwestChild._mode=t.mode,b._northwestChild._level=b._level+1,b._northwestChild._x=h,b._northwestChild._y=d,b._northwestChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c,b._northwestChild._dataBounds=new h$18(b._dataBounds.west,b._dataBounds.north-l,b._dataBounds.west+s,b._dataBounds.north),b._northwestChild._computePosition(),b._northwestChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._northwestChild._x,b._northwestChild._y,b._northwestChild._level])]=b._northwestChild)),e$2b(b._northeastChild))_[JSON.stringify([b._northeastChild._x,b._northeastChild._y,b._northeastChild._level])]=b._northeastChild;else if(h=2*b._x+1,d=2*b._y,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._northeastChild=new o$a(this._context,this),b._northeastChild._mode=t.mode,b._northeastChild._level=b._level+1,b._northeastChild._x=h,b._northeastChild._y=d,b._northeastChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;x=this._layerBounds.west+h*u*this._cellWidth;b._northeastChild._dataBounds=new h$18(x,b._dataBounds.north-l,x+s,b._dataBounds.north),b._northeastChild._computePosition(),b._northeastChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._northeastChild._x,b._northeastChild._y,b._northeastChild._level])]=b._northeastChild}}}f=[];var v=0,y=void 0;for(var $ in _){var b;(b=_[$])._isVisible=n.computeVisibility(b._orientedBoundingBox)!==Ae$u.OUTSIDE,b._isVisible&&(b.calcPixFromCam(i,r,1),b._pix>v&&(v=b._pix,y=b))}if(v=0,e$2b(y)){var T=_[JSON.stringify([y._x-1,y._y,y._level])],C=_[JSON.stringify([y._x+1,y._y,y._level])],S=_[JSON.stringify([y._x,y._y-1,y._level])],w=_[JSON.stringify([y._x,y._y+1,y._level])],E=_[JSON.stringify([y._x+1,y._y-1,y._level])];e$2b(E)&&E._isVisible&&e$2b(C)&&e$2b(S)&&C._isVisible&&S._isVisible&&(v=E._pix+C._pix+S._pix,f=[S,E,y,C]);var P=_[JSON.stringify([y._x+1,y._y+1,y._level])];if(e$2b(P)&&P._isVisible&&e$2b(C)&&e$2b(w)&&C._isVisible&&w._isVisible)(L=P._pix+C._pix+w._pix)>v&&(v=L,f=[y,C,w,P]);var A=_[JSON.stringify([y._x-1,y._y+1,y._level])];if(e$2b(A)&&A._isVisible&&e$2b(T)&&e$2b(w)&&T._isVisible&&w._isVisible)(L=A._pix+T._pix+w._pix)>v&&(v=L,f=[T,y,A,w]);var L,M=_[JSON.stringify([y._x-1,y._y-1,y._level])];if(e$2b(M)&&M._isVisible&&e$2b(T)&&e$2b(S)&&T._isVisible&&S._isVisible)(L=M._pix+T._pix+S._pix)>v&&(v=L,f=[M,S,T,y]);0==f.length&&(e$2b(T)&&T._isVisible&&(v=T._pix,f=[T,y]),e$2b(C)&&C._isVisible&&C._pix>v&&(v=C._pix,f=[y,C]),e$2b(S)&&S._isVisible&&S._pix>v&&(v=S._pix,f=[S,y]),e$2b(w)&&w._isVisible&&w._pix>v&&(v=w._pix,f=[y,w]),0==f.length&&(f=[y]))}if(!(f.length>0))break;this._updateQueue.push(f);for(m=0;m<f.length;m++)f[m]._s3mLoadState===N$P.UNLOAD&&o.push({entity:f[m],priority:0,owner:this})}if(this._textureLevelLoaded){this._multiTextures.length>this._updateQueue.length-1&&(this._multiTextures.length=this._updateQueue.length-1);var R=void 0,I=void 0,O=void 0;for(p=1;p<this._updateQueue.length;p++){var D=this._updateQueue[p],B=D.length;if(0===B)break;var N=!0;for(m=0;m<D.length;m++)if(D[m]._s3mLoadState!=N$P.LOADED&&D[m]._s3mLoadState!=N$P.TRANSFORMED){N=!1;break}if(!N)break;if(this._multiTextures.length<p){var F;R={textureLevel:F={}},I=D,O=this._multiTextures.length;break}if(O=p-1,!e$2b(F=this._multiTextures[O])||D[0]._x<F.startCol||D[0]._y<F.startRow||D[B-1]._x>F.endCol||D[B-1]._y>F.endRow){R={textureLevel:{}},I=D;break}}if(e$2b(R)){R._cellWidth=this._cellWidth,R._cellHeight=this._cellHeight,R._cellDepth=this._cellDepth,R._availableNode=this._availableNode[I[0]._level],R._time=this._time,R._layerBounds=this._layerBounds,R._minFiltration=this._floor,R._maxFiltration=this._ceil;var U=[];for(p=0;p<I.length;p++){var z={_x:I[p]._x,_y:I[p]._y,_level:I[p]._level,_dataBounds:I[p]._dataBounds,_s3mLoadState:I[p]._s3mLoadState,_arrayBuffer:I[p]._arrayBuffer};U.push(z)}R.arrayWork=U;var G=Vt$1.scheduleTask(R);if(!e$2b(G))return;this._textureLevelLoaded=!1;a=this;o$1l(G,(function(e){var t;if(O<a._multiTextures.length){if(e$2b(!(t=a._multiTextures[O])._volTextures))t._volTextures=[];else{for(var i=t._volTextures.length,n=0;n<i;n++)t._volTextures[n].destroy();t._volTextures=[]}t.bounds=e.textureLevel.bounds,t.cellDepth=e.textureLevel.cellDepth,t.cellHeight=e.textureLevel.cellHeight,t.cellWidth=e.textureLevel.cellWidth,t.endCol=e.textureLevel.endCol,t.endRow=e.textureLevel.endRow,t.multiResolutionTranslation=e.textureLevel.multiResolutionTranslation,t.startCol=e.textureLevel.startCol,t.startRow=e.textureLevel.startRow,t.validHeight=e.textureLevel.validHeight,t.validWidth=e.textureLevel.validWidth,t.xSpan=e.textureLevel.xSpan,t._nBlockLength=e.textureLevel._nBlockLength,t._nLength=e.textureLevel._nLength,t._nSideBlockCount=e.textureLevel._nSideBlockCount}else e$2b(!(t=e.textureLevel)._volTextures)&&(t._volTextures=[]),a._multiTextures.push(t);t.multiResolutionPara=new p$1d(t.multiResolutionTranslation.x,0,t.validWidth,t._nLength,t.multiResolutionTranslation.y,0,t.validHeight,0,t.multiResolutionTranslation.z,0,t._nSideBlockCount,0,t.multiResolutionTranslation.w,0,t._nBlockLength,0);var r=tt$h.LINEAR,o=rt$i.LINEAR;a._filterMode===k$Q.FilterMode.NEAREST&&(r=tt$h.NEAREST,o=rt$i.NEAREST);for(i=e.imageDatas.length,n=0;n<i;n++){var s=new t$V({context:a._context,width:t._nLength,height:t._nLength,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:r,magnificationFilter:o})});s.copyFrom({width:t._nLength,height:t._nLength,arrayBufferView:e.imageDatas[n]}),t._volTextures.push(s)}a._textureLevelLoaded=!0;for(n=0;n<e.unzipTile.length;n++){var l=e.unzipTile[n].index,u=e.unzipTile[n].buffer;I[l]._arrayBuffer=u,I[l]._s3mLoadState=N$P.TRANSFORMED}for(n=0;n<I.length;n++)I[n]._s3mLoadState=N$P.TRANSFORMED}))}}var V=[];for(p=0;p<this._multiTextures.length;p++)V.push(this._multiTextures[p]);p=0;for(V.length>3&&(p=V.length-3),this._voxelGridTile._multiTextures=[];p<V.length;p++)this._voxelGridTile._multiTextures.push(V[p])}},g$d.prototype.loadEntity=function(e){e.load(this)},g$d.prototype.addClipPlane=function(e){this._clipPlanes.length>=6?console.log("at most 6 clipping planes can be specified"):(this._clipPlanes.push(e),e$2b(this._voxelGridTile)&&this._voxelGridTile._clipPlaneChanged(this))},g$d.prototype.removeAllClipPlanes=function(){var e=this._clipPlanes.length;this._clipPlanes.length=0,e$2b(this._voxelGridTile)&&e>0&&this._voxelGridTile._clipPlaneChanged(this)},g$d.prototype.removeClipPlane=function(e){e<0||e>=6||(this._clipPlanes.splice(e,1),e$2b(this._voxelGridTile)&&this._voxelGridTile._clipPlaneChanged(this))},g$d.prototype.getNumberOfClipPlanes=function(){return this._clipPlanes.length},g$d.prototype.startRender=function(e){if(this._startRender=!0,e$2b(this._voxelGridTile)){var t;if(this._voxelGridTile._setDataBounds(this._layerBounds),this._voxelGridTile._setZBounds(this._zBounds),e$2b(this._NetCDFBuffer))t=this._voxelGridTile._loadData(this._NetCDFBuffer,e),this._minFiltration==Number.MIN_VALUE&&(this._minFiltration=this._voxelGridTile._floor),this._maxFiltration==Number.MAX_VALUE&&(this._maxFiltration=this._voxelGridTile._ceil);else if(e$2b(this._volumeBuffer)){var i=this._cellWidth,n=this._cellHeight,r=this._availableNode[this._voxelGridTile._level];r.EndCol-1==this._voxelGridTile._x&&(i=r.Width-this._voxelGridTile._x*i),r.EndRow-1==this._voxelGridTile._y&&(n=r.Height-this._voxelGridTile._y*n),t=this._voxelGridTile._loadVolume(this._volumeBuffer,{maxValue:this._ceil,minValue:this._floor,time:this._time,xDimSize:this._cellWidth,yDimSize:this._cellHeight,zDimSize:this._cellDepth,xValidSize:i,yValidSize:n,zValidSize:this._cellDepth})}this._voxelGridTile._initialize(this,this._frameState,t)}},g$d.prototype.render=function(e,t){},g$d.prototype.releaseSelection=function(e,t){},g$d.prototype.isDestroyed=function(){return!1},g$d.prototype.destroy=function(){return e$2b(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),e$2b(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),e$2b(this._voxelGridTile)&&(this._voxelGridTile.destroy(),this._voxelGridTile=void 0),this._NetCDFInfo=void 0,this._NetCDFData=void 0,this._NetCDFBuffer=void 0,i$10(this)};var R$6="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\nuniform sampler2D u_opaque;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 opaque = texture2D(u_opaque, v_textureCoordinates);\n vec4 accum = texture2D(u_accumulation, v_textureCoordinates);\n float r = texture2D(u_revealage, v_textureCoordinates).r;\n vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n gl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\n}";function a$5(e){this._framebuffer=void 0,this._outputFramebuffer=void 0,this._accumulationTexture=void 0,this._revealageTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._passType=Le$s.OPAQUE,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},this.billboardQuality=.5,this.enable=!1}Object.defineProperties(a$5.prototype,{});var B$5={enabled:!0,color:new e$1U(0,0,0,0),equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.ONE,functionDestinationRgb:l$14.ONE,functionSourceAlpha:l$14.ZERO,functionDestinationAlpha:l$14.ONE_MINUS_SOURCE_ALPHA},o$9=new f$18;function E$6(e,t){var i=e[t.id];if(!e$2b(i)||i.viewport.width!=o$9.width||i.viewport.height!=o$9.height){var n=d$1m.getState(t);n.depthMask=!1,n.blending=B$5,n.viewport=o$9,i=d$1m.fromCache(n),e[t.id]=i}return i}function T$8(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy(),e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy(),e._outputFramebuffer=e._outputFramebuffer&&!e._outputFramebuffer.isDestroyed()&&e._outputFramebuffer.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}function O$6(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._hdr?t.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT:_$$.UNSIGNED_BYTE;e._outputFramebuffer=new t$W({context:t,colorTextures:[new t$V({context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:V$10.RGBA,pixelDatatype:r})],destroyAttachments:!0}),e._accumulationTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT});var o=new Float32Array(i*n*4);e._revealageTexture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT,source:{arrayBufferView:o,width:i,height:n},flipY:!1}),e._framebuffer=new t$W({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1})}function H$6(e,t){var i=new s$U({sources:[R$6]}),n={u_accumulation:function(){return e._accumulationTexture},u_revealage:function(){return e._revealageTexture},u_opaque:function(){return e._opaqueTexture}},r=d$1m.fromCache({});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:e._passType,owner:e}),e._clearCommand=new t$X({framebuffer:e._framebuffer,color:new e$1U(0,0,0,1),depth:1,renderState:d$1m.fromCache(),pass:e._passType,owner:e})}function M$6(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._accumulationTexture,o=!1,a=e$2b(r)&&(r.width!==i||r.height!==n);return(!e$2b(r)||a)&&(T$8(e),O$6(e,t),H$6(e,t),o=!0),o}function w$4(e){return e.drawBuffers&&e.fragmentDepth}function _$8(e){if(!e$2b(e.provider))throw new t$16("options.provder and options.viewer is required.");this._provider=e.provider,this._inner=e.layer,this._imagelayerCollection=e.imagelayerCollection,this._name=e.name,this._billboardCollection=new w$N({ignoreShow:!0,scene:e.scene}),this._imageIconBillboard={},this._textBillboard={},this._imageCanvas={},this.kmlLayer=new U$m({camera:e.scene.camera,canvas:e.scene.canvas}),this.kmlLayer.clustering.enabled=!0,this.kmlLayer.clustering.pixelRange=10,e$2b(e.viewer)&&e.viewer.dataSources.add(this.kmlLayer),this.kmlLayer.clustering.clusterEvent.addEventListener((function(e,t){if(e.length>0&&e[0].billboard){var i=e[0].billboard;t.billboard.position=e[0].position.getValue(0),t.billboard.image=i.image.getValue(),t.billboard.scale=i.scale.getValue(),t.billboard.heightReference=i.heightReference.getValue(),t.billboard.scaleByDistance=i.scaleByDistance.getValue(),t.billboard.pixelOffset=i.pixelOffset.getValue()}if(e.length>0&&e[0].label){var n=e[0].label;t.label.position=e[0].position.getValue(0),t.label.text=n.text.getValue(),t.label.font=n.font.getValue(),t.label.verticalOrigin=n.verticalOrigin.getValue(),t.label.horizontalOrigin=n.horizontalOrigin.getValue(),t.label.heightReference=n.heightReference.getValue(),t.label.pixelOffset=n.pixelOffset.getValue(),t.label.scaleByDistance=n.scaleByDistance.getValue(),e$2b(n.style)&&(t.label.style=n.style.getValue()),t.label.fillColor=n.fillColor.getValue()}}))}function E$5(e,t){return t.level-e.level}a$5.isSupported=w$4,a$5.prototype.getOutputFramebuffer=function(){return this._outputFramebuffer},a$5.prototype.update=function(e,t,i){if(w$4(e.context)&&this.enable){var n=e.context;this._screenWidth=Math.floor(n.drawingBufferWidth*this.billboardQuality),this._screenHeight=Math.floor(n.drawingBufferHeight*this.billboardQuality),o$9.width=this._screenWidth,o$9.height=this._screenHeight,this._opaqueTexture=t.getColorTexture(0),this._hdr=i,M$6(this,n)}},a$5.prototype.execute=function(e,t){!e$2b(this._drawCommand)||!this.enable||this._drawCommand.execute(e,t)},a$5.prototype.clear=function(e,t){!e$2b(this._clearCommand)||!this.enable||this._clearCommand.execute(e,t)},a$5.prototype.createDerivedCommands=function(e){!e$2b(e)||(this.enable=!0,e.framebuffer=this._framebuffer,e.renderState=E$6(this._renderStateCache,e.renderState))},a$5.prototype.isDestroyed=function(){return!1},a$5.prototype.destroy=function(){return T$8(this),i$10(this)},Object.defineProperties(_$8.prototype,{tileWidth:{get:function(){return this._provider._tileWidth}},tileHeight:{get:function(){return this._provider._tileHeight}},maximumLevel:{get:function(){return this._provider._ready?this._provider._maximumLevel:-1}},minimumLevel:{get:function(){return this._provider._ready?this._provider._minimumLevel:-1}},tilingScheme:{get:function(){return this._provider._tilingScheme}},rectangle:{get:function(){return this._provider._ready?this._provider._rectangle:null}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._provider._errorEvent}},ready:{get:function(){return this._provider._ready}},readyPromise:{get:function(){return this._provider.readyPromise}},hasAlphaChannel:{get:function(){return!0}},show:{get:function(){return this._inner.show},set:function(e){this._inner.show=e}},mapboxStyle:{get:function(){return this._provider.mapboxStyle},set:function(e){this._provider.mapboxStyle=e}},alpha:{get:function(){return this._inner.alpha},set:function(e){this._inner.alpha=e}},selectColor:{get:function(){return this._inner._selectColor},set:function(e){this._inner._selectColor=e}},name:{get:function(){return this._name},set:function(e){this._name=e}},pausing:{get:function(){return this._inner._pausing},set:function(e){this._inner._pausing=e,this._provider._pausing=e}},indexedDBSetting:{get:function(){return this._provider._indexedDBSetting},set:function(e){e$2b(e)&&"boolean"==typeof e.isOpen&&(this._provider._indexedDBSetting.isOpen=e.isOpen)}}});var b$9=new o$1o,T$7=new o$1p,d$c=new o$Y;function D$5(e){return Array.isArray(e)?"rgb("+e[0]+","+e[1]+","+e[2]+")":""}function y$8(e,t,i,n){var r=t.getGeometry().getFlatCoordinates(),o=r[0],a=r[1],s=i[0]*o+i[2]*a+i[4],l=i[1]*o+i[3]*a+i[5],u=s/e._canvasWidth,c=l/e._canvasWidth,h=n.west+n.width*u,d=n.south+n.height*(1-c);return o$1p.fromRadians(h,d,0,t$13.WGS84,T$7),T$7}function G$6(e){var t=e.getId();return t-=16777216*Math.floor(t/16777216)}_$8.prototype.createIconImageBillboard=function(e){if(e$2b(e.iconImageObjects))for(var t=e.rectangle,i=e.transform,n=0,r=e.iconImageObjects.length;n<r;n++){var o=e.iconImageObjects[n],a=o.feature,s=a.index;if(e$2b(this._imageIconBillboard[s])){var l=this._imageIconBillboard[s];e.level>l.level&&(l.position=y$8(this._provider,a,i,t),l.level=e.level)}else{var u,c=o.style.layout;if(e$2b(c)&&e$2b(c["icon-image"])){var h=c["icon-image"],d=u$_(c["icon-size"],1);if(e$2b(this._imageCanvas[h]))u=this._imageCanvas[h];else{var f=this._provider._subSpriteImage[h];if(!e$2b(f))continue;(u=document.createElement("canvas")).width=f.width,u.height=f.height,u.getContext("2d").putImageData(f,0,0),this._imageCanvas[h]=u}}b$9.x=0,b$9.y=-u.height/2,d$c.near=1500,d$c.nearValue=1.5,d$c.far=8e6,d$c.farValue=0;var p=this._billboardCollection.add({image:u,scale:d,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:k$P.CLAMP_TO_GROUND,pixelOffset:b$9,scaleByDistance:d$c,id:G$6(a)});p.position=y$8(this._provider,a,i,t),p.level=e.level,this._imageIconBillboard[s]=p}}},_$8.prototype.createTextBillboard=function(e){if(e$2b(e.textObjects))for(var t=e.rectangle,i=e.transform,n=0;n<e.textObjects.length;n++){var r=e.textObjects[n],o=r.feature,a=o.index;if(e$2b(this._textBillboard[a])){var s=this._textBillboard[a];e.level>s.level&&(s.position=y$8(this._provider,o,i,t),s.level=e.level)}else{var l=r.style,u=l.getText(),c=l.textSize,h=u.getText(),d=u.getFont(d),f=u.getTextAlign(),p=document.createElement("canvas"),_=p.getContext("2d"),m=c+"px "+d;_.font=m,_.textBaseline="top",_.textAlign=f;var g=_.measureText(h).width+2;p.width=g,p.height=c+1,_.font=m;var x=u.getFill(),v=u.getStroke();e$2b(v)&&(_.strokeStyle=D$5(v.getColor()),_.lineWidth=v.getWidth(),_.strokeText(h,0,c-3)),e$2b(x)&&(_.fillStyle=D$5(x.getColor()),_.fillText(h,0,c-3)),b$9.x=0,b$9.y=-p.height/2,d$c.near=1500,d$c.nearValue=2,d$c.far=1e6,d$c.farValue=0;var y=this._billboardCollection.add({image:p,imageId:h,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:k$P.CLAMP_TO_GROUND,pixelOffset:b$9,scaleByDistance:d$c,verticalOrigin:S$O.TOP,horizontalOrigin:j$T.LEFT});y.position=y$8(this._provider,o,i,t),y.level=e.level,this._textBillboard[a]=y}}},_$8.prototype.update=function(e,t){if(e$2b(this._billboardCollection)){var i=this._inner._imageryCache,n=[];for(var r in i)n.push(i[r]);n.sort(E$5);for(var o=0;o<n.length;o++){var a=n[o];!a.isMvtTexture||a.isRendered||(a.isRendered=!0)}this._billboardCollection.update(t)}},_$8.prototype.getProperty=function(e){return this._provider.getProperty(e)},_$8.prototype.refresh=function(){e$2b(this._billboardCollection)&&this._billboardCollection.removeAll();var e=this._inner._imageryCache;for(var t in e)e[t].isRendered=!1;this._imageIconBillboard={},this._textBillboard={},this._imagelayerCollection.remove(this._inner),this._inner=this._imagelayerCollection.addImageryProvider(this._provider)},_$8.prototype.isDestroyed=function(){return!1},_$8.prototype.destroy=function(){return this._imagelayerCollection.remove(this._inner),e$2b(this._billboardCollection)&&(this._billboardCollection.destroy(),this._billboardCollection=null),i$10(this)};var e$3={NONE:0,ByKeyboard:1},Ct=Object.freeze(e$3);function r$d(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._context=e._context,this._s3mInstanceCollection=new _0x448857(e._context),this._s3mInstanceCollection._profile=!0,this._s3mInstanceCollection.minVisibleAltitude=-9e3,e.primitives.add(this._s3mInstanceCollection),this._textureAtlas=null,this._profileRenders=[],this._spatialQueryList=[],this._section=!0,this._name="solidModelsProfile"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this),this._modelInfo={},this._dataIndex=0,this._selectedProfileIDs=[],this._clippingType=R$J.KeepInside,this._visibleViewport=4095;var t=this,i=0;this._modelCount=0,this._modelPosition=[],this._addedEvent=new o$1h,this._s3mInstanceCollection.addedEvent.addEventListener((function(){++i===t._modelCount&&t._addedEvent.raiseEvent({modelPosition:t._modelPosition})})),this._volume=void 0}function K$2(e,t){var i=t._group;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=i[n];if(!e$2b(o)||0===o.renderEntities.length)continue;var a=o.renderEntities[0];r.texture=a._texture}}function H$5(e){this.pickColor=new o$1p,this.id=u$_(e.id,0),e$2b(e.color)?this.color=e$1U.clone(e.color):this.color=e$1U.fromRandom({alpha:1}),this.textureAtlasID=-1,e$2b(e.textureMapParameter)?(this.textureTilingU=u$_(e.textureMapParameter.UTiling,1),this.textureTilingV=u$_(e.textureMapParameter.VTiling,1)):(this.textureTilingU=1,this.textureTilingV=1)}function S$2(e){return e===R$J.KeepOutside?j$X.Disjoint:j$X.Intersects}Object.defineProperties(r$d.prototype,{selectedModelIDs:{get:function(){return this._selectedProfileIDs}},clippingType:{get:function(){return this._clippingType},set:function(e){if(e!==this._clippingType){this._clippingType=e;for(var t=0;t<this._spatialQueryList.length;t++)this._spatialQueryList[t].positionMode=S$2(this._clippingType);for(t=0;t<this._profileRenders.length;t++)this._profileRenders[t]._clippingType=e}}},addedEvent:{get:function(){return this._addedEvent}},volume:{get:function(){return this._volume},set:function(e){this._volume=e,this._s3mInstanceCollection._volume=e}},mixColorType:{get:function(){return this._s3mInstanceCollection._mixColorType},set:function(e){this._s3mInstanceCollection._mixColorType!==e&&(this._s3mInstanceCollection._mixColorType=e)}}}),r$d.prototype.addProfileGeometry=function(e){if(e$2b(e)){var t=e;Array.isArray(e)&&(t=new h$8(e),e$2b(this._volume)&&(t._volBounds=this._volume._volBounds));var i=new f$a(this,this._profileRenders.length,this._modelInfo,t);i._clippingType=this._clippingType,e$2b(this._volume)&&(i._attributeLocations.aRatio=3,i._volume=this._volume),this._profileRenders.push(i)}},r$d.prototype.clearProfile=function(){this._profileRenders.map((function(e){e.destroy()})),this._profileRenders=[],this._s3mInstanceCollection._profile=!1,this._s3mInstanceCollection._spatialQueryEnable=!1,this._s3mInstanceCollection.clampToObject=!1},r$d.prototype.addProfilePlane=function(e){},r$d.prototype.addProfileCylinder=function(e){},r$d.prototype.setClipGeometry=function(e){if(e.geoType!==P$U.GEOREGION3D&&e.geoType!==P$U.GEOCYLINDER&&e.geoType!==P$U.GEOBOX&&e.geoType!==P$U.GEOMODEL3D&&!(e instanceof N$y))return!1;var t=new _0x4d0d03(this._scene);t.geometry=e,t.positionMode=S$2(this._clippingType),this._s3mInstanceCollection._profileMode=1,t._beQueryCollection=this._s3mInstanceCollection,this._s3mInstanceCollection._spatialQueryEnable=!0,t._profile=!0,0==this._spatialQueryList.length&&this._scene._renderPipeline.addEventListener(k$f.BeforeExecuteCommands,r$d.prototype._updateTextures,this),this._spatialQueryList.push(t)},r$d.prototype.addModels=function(e){var t=this;e.map((function(e){var i=new H$5(e),n={id:i.id,primitive:t};i.profilePickId=t._context.createPickId(n),t._modelInfo[e.model]=i,t.requestImage(e.model,e.texture),t.requestModel(e.model,e.color,e.id),t._modelCount++}))},r$d.prototype.requestImage=function(e,t){if(e$2b(t)){var i=this;e$2b(this._textureAtlas)||(this._textureAtlas=new v$I({context:this._scene._context})),this._textureAtlas.addImage(t,t).then((function(t){i._modelInfo[e].textureAtlasID=t}))}},r$d.prototype.requestModel=function(e,t,i){var n=u$_(i,(o=this)._dataIndex);if(e$2b(e)){var r=e.replace(/\?returnContent=.*$/,"");if(".json"===(r=r.substring(r.length-5).toLowerCase()))if(e.indexOf("spatialAnalysis-")>-1){var o=this;p$_({url:e,responseType:"arraybuffer",method:"POST",data:JSON.stringify({sourceDatasetFilter:{attributeFilter:""},isLonlat:!0,returnStream:!0}),headers:{"Content-type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then((function(i){var r=new DataView(i),a=0,s=r.getInt32(a,!0);a+=4;var l=a$K(new Uint8Array(i,a,s)),u=JSON.parse(l);a+=s;var c=r.getInt32(a,!0);a+=4;var h,d,f=[];for(h=0;h<c;h++)d=r.getInt32(a,!0),f.push(d),a+=4;var p=[];for(h=0;h<c;h++){if(0===(d=f[h]))p.push(null);else{var _=new Uint8Array(i,a,d);p.push(new Uint8Array(_).buffer)}a+=d}var m=u.geometries[0],g={};g.id=n,g.position=m.position,o._modelPosition.push(g),o._s3mInstanceCollection.add(e,{position:o$1p.fromDegrees(m.position.x,m.position.y,m.position.z),color:t,id:n,scale:new o$1p(m.scaleX,m.scaleY,m.scaleZ)},p[0],!1);var x=o._s3mInstanceCollection.getInstance(e,n),v=o._modelInfo[e].pickColor;v.x=x._pickColor.x,v.y=x._pickColor.y,v.z=x._pickColor.z,o._dataIndex++}))}else u$Q(e).then((function(i){if(null!=i.geometry){var r=new Uint8Array(i.geometry.model),a={};a.id=n,a.position=i.geometry.position,o._modelPosition.push(a),o._s3mInstanceCollection.add(e,{position:o$1p.fromDegrees(i.geometry.position.x,i.geometry.position.y,i.geometry.position.z),color:t,id:n,scale:new o$1p(i.geometry.scaleX,i.geometry.scaleY,i.geometry.scaleZ),hpr:i$15.fromDegrees(-i.geometry.rotationZ,i.geometry.rotationX,i.geometry.rotationY)},r.buffer);var s=o._s3mInstanceCollection.getInstance(e,n),l=o._modelInfo[e].pickColor;l.x=s._pickColor.x,l.y=s._pickColor.y,l.z=s._pickColor.z,o._dataIndex++}}));else o$10(e).then((function(i){var r=new DataView(i),a=0,s=r.getInt32(a,!0);a+=4;var l=a$K(new Uint8Array(i,a,s)),u=JSON.parse(l).geometry;if(null!=u){var c={};c.id=n,c.position=u.position,o._modelPosition.push(c),a+=s;var h=r.getInt32(a,!0);a+=4;var d,f,p=[];for(d=0;d<h;d++)f=r.getInt32(a,!0),p.push(f),a+=4;var _=[];for(d=0;d<h;d++){if(0===(f=p[d]))_.push(null);else{var m=new Uint8Array(i,a,f);_.push(new Uint8Array(m).buffer)}a+=f}o._s3mInstanceCollection.add(e,{position:o$1p.fromDegrees(u.position.x,u.position.y,u.position.z),color:t,id:n,scale:new o$1p(u.scaleX,u.scaleY,u.scaleZ),hpr:i$15.fromDegrees(-u.rotationZ,u.rotationX,u.rotationY)},_[0],!1);var g=o._s3mInstanceCollection.getInstance(e,n);o._modelInfo[e].color=g._color;var x=o._modelInfo[e].pickColor;x.x=g._pickColor.x,x.y=g._pickColor.y,x.z=g._pickColor.z,o._dataIndex++}}))}},r$d.prototype.build=function(){this._s3mInstanceCollection._profile=!0,this._s3mInstanceCollection.clampToObject=!0;for(var e=0;e<this._profileRenders.length;e++){this._profileRenders[e]._build()}},r$d.prototype.setSelected=function(e){this._selectedProfileIDs=[],this._selectedProfileIDs.push(e)},r$d.prototype.releaseSelection=function(){this._selectedProfileIDs=[]},r$d.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},r$d.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},r$d.prototype.clear=function(){for(var e in e$2b(this._textureAtlas)&&(this._textureAtlas.destroy(),this._textureAtlas=null),this._profileRenders.map((function(e){e.destroy()})),this._profileRenders=[],this._s3mInstanceCollection._spatialQueryEnable=!1,this._spatialQueryList.map((function(e){e.destroy()})),this._spatialQueryList=[],this._scene._renderPipeline.removeEventListener(k$f.BeforeExecuteCommands,r$d.prototype._updateTextures,this),this._modelInfo)this._s3mInstanceCollection.removeCollection(e);this._s3mInstanceCollection.clampToObject=!1,this._modelInfo={},this._dataIndex=0},r$d.prototype.destroy=function(){return this.clear(),this._scene._analyst3D.remove(this._name,!0),this._scene.primitives.remove(this._s3mInstanceCollection),this._s3mInstanceCollection.destroy(),i$10(this)},r$d.prototype.update=function(e,t,i){this._spatialQueryList.map((function(n){n.update(e,t,i)}));var n=this._s3mInstanceCollection.clampToObject;K$2(this._modelInfo,this._s3mInstanceCollection),this._profileRenders.map((function(r){r.update(e,t,i,n)}))},r$d.prototype._updateTextures=function(){var e=this._scene._frameState,t=this;this._spatialQueryList.map((function(i){i._updateTextures(t._context,e)}))};var h$7=81;function G$5(){this.powers=new Array(h$7)}var _$7=[[.0014,0,.0065],[.0022,1e-4,.0105],[.0042,1e-4,.0201],[.0076,2e-4,.0362],[.0143,4e-4,.0679],[.0232,6e-4,.1102],[.0435,.0012,.2074],[.0776,.0022,.3713],[.1344,.004,.6456],[.2148,.0073,1.0391],[.2839,.0116,1.3856],[.3285,.0168,1.623],[.3483,.023,1.7471],[.3481,.0298,1.7826],[.3362,.038,1.7721],[.3187,.048,1.7441],[.2908,.06,1.6692],[.2511,.0739,1.5281],[.1954,.091,1.2876],[.1421,.1126,1.0419],[.0956,.139,.813],[.058,.1693,.6162],[.032,.208,.4652],[.0147,.2586,.3533],[.0049,.323,.272],[.0024,.4073,.2123],[.0093,.503,.1582],[.0291,.6082,.1117],[.0633,.71,.0782],[.1096,.7932,.0573],[.1655,.862,.0422],[.2257,.9149,.0298],[.2904,.954,.0203],[.3597,.9803,.0134],[.4334,.995,.0087],[.5121,1,.0057],[.5945,.995,.0039],[.6784,.9786,.0027],[.7621,.952,.0021],[.8425,.9154,.0018],[.9163,.87,.0017],[.9786,.8163,.0014],[1.0263,.757,.0011],[1.0567,.6949,.001],[1.0622,.631,8e-4],[1.0456,.5668,6e-4],[1.0026,.503,3e-4],[.9384,.4412,2e-4],[.8544,.381,2e-4],[.7514,.321,1e-4],[.6424,.265,0],[.5419,.217,0],[.4479,.175,0],[.3608,.1382,0],[.2835,.107,0],[.2187,.0816,0],[.1649,.061,0],[.1212,.0446,0],[.0874,.032,0],[.0636,.0232,0],[.0468,.017,0],[.0329,.0119,0],[.0227,.0082,0],[.0158,.0057,0],[.0114,.0041,0],[.0081,.0029,0],[.0058,.0021,0],[.0041,.0015,0],[.0029,.001,0],[.002,7e-4,0],[.0014,5e-4,0],[.001,4e-4,0],[7e-4,2e-4,0],[5e-4,2e-4,0],[3e-4,1e-4,0],[2e-4,1e-4,0],[2e-4,1e-4,0],[1e-4,0,0],[1e-4,0,0],[1e-4,0,0],[0,0,0]];G$5.prototype.toXYZ=function(){for(var e=new o$1p(0,0,0),t=1;t<h$7;t++){var i=t+0;i>h$7-1&&(i=h$7-1),i<1&&(i=1),e.x+=this.powers[i]*_$7[t][0],e.y+=this.powers[i]*_$7[t][1],e.z+=this.powers[i]*_$7[t][2]}return e};var t0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,.003,.004,.006,.007,.009,.011,.014,.017,.021,.025,.03,.035,.04,.044,.048,.055,.063,.071,.075,.08,.085,.091,.12,.12,.12,.12,.12,.12,.12,.119,.12,.12,.12,.1,.09,.09,.085,.08,.075,.07,.07,.065,.06,.055,.05,.045,.04,.035,.028,.25,.023,.02,.018,.016,.012,.012,.012,.012,.01,.01,.01,.008,.007,.006,.005,.003,0],L$8=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.15,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0],n$8=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.075,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.016,.015,.014,.013,.0125,1.8,2.3,2.5,2.3,1.8,.061,.003,8e-4,1e-4,1e-5,1e-5,1e-4,3e-4,6e-4];G$5.prototype.applyAtmosphericTransmittance=function(e,t,i,n,r,o){var a=.04608*i-.04586,s=e$2a.toDegrees(e);if(s<90){var l=1;l=1/(t+.50572*Math.pow(96.07995-s,-1.6364));l*=1;l*=Math.exp(-n/8435);for(var u=1.003454/Math.sqrt(t*t+.006908),c=Math.log(.35),h=c*(1.459+c*(.1595+.4129*c)),d=c*(.0783+c*(-.3824-.5874*c)),f=1-.5*Math.exp((h+d/1.8)/1.8),p=1-.5*Math.exp((h+d*t)*t),_=0;_<h$7;_++){var m,g=.38+.005*_,x=Math.exp(-l/(Math.pow(g,4)*(115.6406-1.3366/(g*g))));m=g<.5?1.0274:1.206;var v=a*Math.pow(2*g,-m),y=Math.exp(-v*l),$=2.5*n$8[_]*l,b=Math.exp(-.2385*$/Math.pow(1+20.07*$,.45)),T=Math.exp(.35*-t0[_]*u),C=Math.exp(-1.41*L$8[_]*l/Math.pow(1+118.3*L$8[_]*l,.45)),S=Math.log(g/.4),w=.945*Math.exp(-.095*S*S),E=Math.exp(-w*v*l),P=Math.exp((w-1)*v*l),A=Math.exp(-1.8/(g*g*g*g)*(115.6406-1.3366/(g*g))),L=Math.exp(-.4293*n$8[_]*2.5/Math.pow(1+36.126*n$8[_]*2.5,.45)),M=Math.exp(-2.538*L$8[_]/Math.pow(1+212.94*L$8[_],.45)),R=Math.exp(-w*v*1.8),I=Math.exp((w-1)*v*1.8),O=x*y*b*T*C;r.powers[_]=this.powers[_]*O;var D=this.powers[_]*T*b*C*t*P,B=1;g<=.45&&(B=Math.pow(g+.55,1.8));var N=L*M*I*(.5*(1-A)+(1-f)*A*(1-R)),F=D*(1-Math.pow(x,.95))/2,U=D*Math.pow(x,1.5)*(1-E)*p,z=.3*(r.powers[_]*t+F+U)*N/(1-.3*N);o.powers[_]=(F+U+z)*B,o.powers[_]<0&&(o.powers[_]=0)}}else for(_=0;_<h$7;_++)r.powers[_]=0,o.powers[_]=0};var a$4=[[.3,.305,.31,.315,.32,.325,.33,.335,.34,.345,.35,.36,.37,.38,.39,.4,.41,.42,.43,.44,.45,.46,.47,.48,.49,.5,.51,.52,.53,.54,.55,.57,.593,.61,.63,.656,.6676,.69,.71,.718,.7244,.74,.7525,.7575,.7625,.7675,.78,.8,.816,.8237,.8315,.84,.86,.88,.905,.915,.925,.93,.937,.948,.965,.98,.9935,1.04,1.07,1.1,1.12,1.13,1.145,1.161,1.17,1.2,1.24,1.27,1.29,1.32,1.35,1.395,1.4425,1.4625,1.477,1.497,1.52,1.539,1.558,1.578,1.592,1.61,1.63,1.646,1.678,1.74,1.8,1.86,1.92,1.96,1.985,2.005,2.035,2.065,2.1,2.148,2.198,2.27,2.36,2.45,2.5,2.6,2.7,2.8,2.9,3,3.1,3.2,3.3,3.4,3.5,3.6,3.7,3.8,3.9,4],[535.9,558.3,622,692.7,715.1,832.9,961.9,931.9,900.6,911.3,975.5,975.9,1119.9,1103.8,1033.8,1479.1,1701.3,1740.4,1587.2,1837,2005,2043,1987,2027,1896,1909,1927,1831,1891,1898,1892,1840,1768,1728,1658,1524,1531,1420,1399,1374,1373,1298,1269,1245,1223,1205,1183,1148,1091,1062,1038,1022,998.7,947.2,893.2,868.2,829.7,830.3,814,786.9,768.3,767,757.6,688.1,640.7,606.2,585.9,570.2,564.1,544.2,533.4,501.6,477.5,442.7,440,416.8,391.4,358.9,327.5,317.5,307.3,300.4,292.8,275.5,272.1,259.3,246.9,244,243.5,234.8,220.5,190.8,171.1,144.5,135.7,123,123.8,113,108.5,97.5,92.4,82.4,74.6,68.3,63.8,49.5,48.5,38.6,36.6,32,28.1,24.8,22.1,19.6,17.5,15.7,14.1,12.7,11.5,10.4,9.5,8.6]],i$9=81,p$4=5;function o$8(){G$5.call(this);for(var e=a$4[1].length,t=1,i=.38,n=0;n<i$9;n++){for(var r=i+.001*p$4;t<e-1&&a$4[0][t]<=r;)t++;this.powers[n]=a$4[1][t],i+=.001*p$4}}function a$3(){}function u$a(e){var t,i=Math.log(e);return t=i<=-3.94?-2.86:i>=-1.44?i-.395:Math.pow(.405*i+1.6,2.18)-2.86,Math.exp(t)}function n$7(e){var t,i=Math.log(e);return t=i<=-2.6?-.72:i>=1.9?i-1.255:Math.pow(.249*i+.65,2.7)-.72,Math.exp(t)}o$8.prototype=Object.create(G$5.prototype),o$8.prototype.constructor=G$5,a$3.Ldmax=100,a$3.LsavgC=100,a$3.LsavgR=100,a$3.k=1,a$3.mR=1,a$3.mC=1,a$3.disableToneMapping=!1,a$3.setSceneLogAvg=function(e,t){e<0&&(e=0),t<0&&(t=0),a$3.LsavgR=e/.8,a$3.LsavgC=t/.8,a$3.computeScaleFactors()},a$3.durandMapperXYZ=function(e){var t=a$3.k,i=a$3.mR,n=a$3.Ldmax,r=a$3.mC,o=-.702*e.x+1.039*e.y+.433*e.z;o<0&&(o=0);var a=new o$1p(.3*o,.3*o,.4*o),s=o$1p.multiplyByScalar(e,(1-t)*r,new o$1p),l=o$1p.multiplyByScalar(a,t*i,new o$1p),u=o$1p.add(s,l,new o$1p);e=o$1p.multiplyByScalar(u,1/n,e)},a$3.computeScaleFactors=function(){var e,t,i;a$3.Ldmax=100,e=a$3.Ldmax,t=a$3.LsavgR,i=a$3.LsavgC;var n=n$7(e);a$3.mR=n/u$a(t),a$3.mC=n/n$7(i);a$3.k=(100-.25*t)/(100+t),a$3.k<0&&(a$3.k=0)};var P$7=new p$1e(2.37067,-.90004,-.470634,-.513885,1.4253,.0885814,.00529818,-.0146949,1.0094);function l$a(){this._oneOverGammaHosek=1/2.4,this._T=3,this._lastSunT=0,this._lastSunZenith=0,this._lastMoonT=0,this._lastMoonZenith=0,this._lastMoonPhase=0,this._ephemeris=void 0,this._perezBlend=0,this._isothermalEffect=0,this._sunAboveHorizon=!1,this._sunSpectrum=new o$8,this._sunTransmittedLuminance=void 0,this._sunScatteredLuminance=void 0,this._sunTransmittedLuminanceSeaLevel=void 0,this._sunScatteredLuminanceSeaLevel=void 0,this._lunarSpectrum=new o$8,this._moonTransmittedLuminance=void 0,this._moonScatteredLuminance=void 0,this._moonTransmittedLuminanceSeaLevel=void 0,this._moonScatteredLuminanceSeaLevel=void 0,this._maxSkylightLuminance=1,this._monochromeAmbient=!0,this._lightPollution=0,this._nightSkyScale=1,this._skyLight=new e$1U,this._twilightLuminance=[],k$4(this),this._lightingChanged=!1}function k$4(e){e._twilightLuminance={},e._twilightLuminance[5]=2200,e._twilightLuminance[4]=1800,e._twilightLuminance[3]=1400,e._twilightLuminance[2]=1200,e._twilightLuminance[1]=710,e._twilightLuminance[0]=400,e._twilightLuminance[-1]=190,e._twilightLuminance[-2]=77,e._twilightLuminance[-3]=28,e._twilightLuminance[-4]=9.4,e._twilightLuminance[-5]=2.9,e._twilightLuminance[-6]=.9,e._twilightLuminance[-7]=.3,e._twilightLuminance[-8]=.11,e._twilightLuminance[-9]=.047,e._twilightLuminance[-10]=.021,e._twilightLuminance[-11]=.0092,e._twilightLuminance[-12]=.0031,e._twilightLuminance[-13]=.0022,e._twilightLuminance[-14]=.0019,e._twilightLuminance[-15]=.0018,e._twilightLuminance[-16]=.0018;for(var t in e._twilightLuminance){var i=e._twilightLuminance[t];e._twilightLuminance[t]=i/Math.PI*.1}}var p$3=new o$1p;l$a.prototype.getToneMappedSkyLight=function(){return this._skyLight};var O$5=new o$1p;function e$2(){this.year=0,this.month=0,this.day=0,this.hours=0,this.minutes=0,this.seconds=0,this.observingDST=!0,this.zoneCorrection=8}function i$8(){this._latitude=0,this._longitude=0,this._altitude=0}function a$2(){this._time=void 0,this._lastTime=new e$2,this._lastLocation=new i$8,this._T=0,this._tuncorr=0,this._epochDays=0,this._sunEclipticLongitude=0,this._sunEcl=new o$1p,this._moonEcl=new o$1p,this._sunEq=new o$1p,this._moonEq=new o$1p,this._eclipticToEquatorial=new p$1e,this._equatorialToGeographic=new p$1e,this._sunGeo=new o$1p,this._moonGeo=new o$1p,this._sunHoriz=new o$1p,this._moonHoriz=new o$1p,this._eclipticToHorizon=new p$1e,this._equatorialToHorizon=new p$1e,this._geographicToEquatorial=new p$1e,this._horizonToEquatorial=new p$1e,this._horizonToGeographic=new p$1e,this._geographicToHorizon=new p$1e,this._horizonToEcliptic=new p$1e,this._moonPhase=void 0,this._moonPhaseAngle=void 0,this._moonDistance=void 0,this._precession=new p$1e,this._forceSunHoriz=!1,this._forceMoonHoriz=!1,this._geoZUp=!0,this._primeMeridianZ=!1}function m$8(e,t,i){var n=new o$1p;return n.x=e*Math.cos(i)*Math.cos(t),n.y=e*Math.sin(i)*Math.cos(t),n.z=e*Math.sin(t),n}function T$6(e){for(;e>2*Math.PI;)e-=2*Math.PI;for(;e<0;)e+=2*Math.PI;return e}function E$4(e){var t=new o$1p;return t.x=e.y,t.y=e.z,t.z=e.x,t}function z$3(e){var t=new o$1p;return t.x=e.z,t.y=e.x,t.z=e.y,t}function q$4(e){var t,i;if(e>e$2a.toRadians(85))t=0;else{if(i=Math.tan(e),e>=e$2a.toRadians(5))t=58.1/i-.07/Math.pow(i,3)+86e-6/Math.pow(i,5);else if(e>=e$2a.toRadians(-.575)){var n=e$2a.toDegrees(e);t=1735+n*(n*(103.4+n*(.711*n-12.79))-518.2)}else t=-20.774/i;t/=3600}return e+e$2a.toRadians(t)}l$a.prototype._computeSun=function(e){var t=this._ephemeris.getSunPositionHorizon(),i=(t=o$1p.normalize(t,O$5)).y;if(this._lastSunT!==this._T||this._lastSunZenith!==i){this._lastSunT=this._T,this._lastSunZenith=i;var n=e$2a.toDegrees(Math.asin(t.y));n+=0,this._perezBlend=n>1?0:n<0?1:1-n;var r=Math.acos(i)-e$2a.toRadians(0),o=e$2a.toRadians(1),a=new G$5,s=new G$5,l=new G$5,u=new G$5;if(.5*Math.PI-r>o){this._sunAboveHorizon=!0,this._sunSpectrum.applyAtmosphericTransmittance(r,i,this._T,e,a,s),this._sunTransmittedLuminance=a.toXYZ(),this._sunScatteredLuminance=s.toXYZ(),e<1e3?(this._sunTransmittedLuminanceSeaLevel=this._sunTransmittedLuminance,this._sunScatteredLuminanceSeaLevel=this._sunScatteredLuminance):(this._sunSpectrum.applyAtmosphericTransmittance(r,i,this._T,0,l,u),this._sunTransmittedLuminanceSeaLevel=l.toXYZ(),this._sunScatteredLuminanceSeaLevel=u.toXYZ());for(var c=r/(.5*Math.PI),h=0;h<6;h++)c*=c;this._sunScatteredLuminance.x*=1+0*c,this._sunScatteredLuminance.y*=1+0*c,this._sunScatteredLuminance.z*=1+0*c,this._sunScatteredLuminanceSeaLevel.x*=1+0*c,this._sunScatteredLuminanceSeaLevel.y*=1+0*c,this._sunScatteredLuminanceSeaLevel.z*=1+0*c}else{this._sunAboveHorizon=!1;var d=Math.floor(n),f=Math.ceil(n);c=n-d;e$2b(this._twilightLuminance[d])||(this._twilightLuminance[d]=0),e$2b(this._twilightLuminance[f])||(this._twilightLuminance[f]=0);var p=this._twilightLuminance[d],_=this._twilightLuminance[f];r=.5*Math.PI-o;this._sunSpectrum.applyAtmosphericTransmittance(r,Math.cos(r),this._T,e,a,s),this._sunTransmittedLuminance=a.toXYZ(),this._sunScatteredLuminance=s.toXYZ(),e<1e3?(this._sunTransmittedLuminanceSeaLevel=this._sunTransmittedLuminance,this._sunScatteredLuminanceSeaLevel=this._sunScatteredLuminance):(this._sunSpectrum.applyAtmosphericTransmittance(r,Math.cos(r),this._T,0,l,u),this._sunTransmittedLuminanceSeaLevel=l.toXYZ(),this._sunScatteredLuminanceSeaLevel=u.toXYZ());var m=(1-c)*p+c*_,g=.25,x=m/g*.25,v=m/g*.5;(c=-n/2)>1&&(c=1),c<0&&(c=0);var y=0*m*(c*=c)+(1-c);o$1p.multiplyByScalar(this._sunTransmittedLuminance,y,this._sunTransmittedLuminance),this._sunScatteredLuminance.x=x*c+this._sunScatteredLuminance.x*(1-c),this._sunScatteredLuminance.y=m*c+this._sunScatteredLuminance.y*(1-c),this._sunScatteredLuminance.z=v*c+this._sunScatteredLuminance.z*(1-c),y=0*m*c+(1-c),o$1p.multiplyByScalar(this._sunScatteredLuminanceSeaLevel,y,this._sunScatteredLuminanceSeaLevel),this._sunScatteredLuminanceSeaLevel.x=x*c+this._sunScatteredLuminanceSeaLevel.x*(1-c),this._sunScatteredLuminanceSeaLevel.y=m*c+this._sunScatteredLuminanceSeaLevel.y*(1-c),this._sunScatteredLuminanceSeaLevel.z=v*c+this._sunScatteredLuminanceSeaLevel.z*(1-c),this._sunScatteredLuminance.x*=1,this._sunScatteredLuminance.y*=1,this._sunScatteredLuminance.z*=1,this._sunScatteredLuminanceSeaLevel.x*=1,this._sunScatteredLuminanceSeaLevel.y*=1,this._sunScatteredLuminanceSeaLevel.z*=1}}},l$a.prototype._moonLuminance=function(){var e=this._ephemeris.getMoonPositionHorizon();o$1p.clone(e,p$3),o$1p.normalize(p$3,p$3);var t=e$2a.toDegrees(Math.asin(p$3.z)),i=1738100,n=1e3*this._ephemeris.getMoonDistanceKM(),r=.001,o=this._ephemeris.getMoonPhaseAngle();o<r&&(o=r);for(var a=Math.PI-o;a<0;)a+=2*Math.PI;a<r&&(a=r);var s=683*(.144*i*i/(3*n*n)*(.095*(1-Math.sin(o/2)*Math.tan(o/2)*Math.log(1/Math.tan(o/4)))+1905*(1-Math.sin(a/2)*Math.tan(a/2)*Math.log(1/Math.tan(a/4)))))/3.14;return s*=.001,t<0&&(s*=Math.exp(1.1247*t)),s},l$a.prototype._computeMoon=function(e){var t=this._ephemeris.getMoonPositionHorizon();o$1p.clone(t,p$3),o$1p.normalize(p$3,p$3);var i=p$3.z,n=Math.acos(i),r=this._ephemeris.getMoonPhase();if(this._lastMoonT!==this._T||this._lastMoonZenith!==n||this._lastMoonPhase!==r){this._lastMoonT=this._T,this._lastMoonZenith=n,this._lastMoonPhase=r,this._lightingChanged=!0;var o=new G$5,a=new G$5;this._lunarSpectrum.applyAtmosphericTransmittance(n,i,this._T,e,o,a);var s=this._moonLuminance();this._moonTransmittedLuminance=o$1p.multiplyByScalar(o.toXYZ(),s,new o$1p),this._moonScatteredLuminance=o$1p.multiplyByScalar(a.toXYZ(),s,new o$1p);var l=new G$5,u=new G$5;this._lunarSpectrum.applyAtmosphericTransmittance(n,i,this._T,0,l,u),this._moonTransmittedLuminance=o$1p.multiplyByScalar(o.toXYZ(),s,new o$1p),this._moonScatteredLuminance=o$1p.multiplyByScalar(a.toXYZ(),s,new o$1p),this._moonTransmittedLuminanceSeaLevel=o$1p.multiplyByScalar(l.toXYZ(),s,new o$1p),this._moonScatteredLuminanceSeaLevel=o$1p.multiplyByScalar(u.toXYZ(),s,new o$1p)}},l$a.prototype.getSunColor=function(){var e=o$1p.multiplyByScalar(this._sunTransmittedLuminance,1,new o$1p);a$3.durandMapperXYZ(e);var t=p$1e.multiplyByVector(P$7,e,new o$1p);return this._applyGamma(t),new e$1U(t.x,t.y,t.z)},l$a.prototype._updateZenith=function(e){var t=this._ephemeris.getSunPositionHorizon();o$1p.normalize(t,t),new o$1p(0,1,0);this._isothermalEffect=Math.exp(-e/8435),this._isothermalEffect<0&&(this._isothermalEffect=0),this._isothermalEffect>1&&(this._isothermalEffect=1)},l$a.prototype._nightSkyLuminance=function(){return 683*(this._lightPollution+2e-6+12e-8+3e-8+51e-9+9.1e-9+9.1e-10)/3.14*this._isothermalEffect*.001*this._nightSkyScale},l$a.prototype._applyGamma=function(e){var t=0;e.x<t&&(t=e.x),e.y<t&&(t=e.y),e.z<t&&(t=e.z),t=-t,e.x=e.x+t,e.y=e.y+t,e.z=e.z+t;var i=e.x;e.y>i&&(i=e.y),e.z>i&&(i=e.z),i>1&&(e.x/=i,e.y/=i,e.z/=i);var n=this._oneOverGammaHosek;e.x>0&&(e.x=Math.pow(e.x,n)),e.y>0&&(e.y=Math.pow(e.y,n)),e.z>0&&(e.z=Math.pow(e.z,n))},l$a.prototype._computeLogAvg=function(){var e,t,i=new o$1p;o$1p.add(this._sunScatteredLuminance,this._moonScatteredLuminance,i),o$1p.add(i,this._moonTransmittedLuminance,i),i.y+=1e3*this._nightSkyLuminance(),e=i.y,t=-.702*i.x+1.039*i.y+.433*i.z,a$3.setSceneLogAvg(t,e)},l$a.prototype._computeToneMappedSkyLight=function(){var e=o$1p.multiplyByScalar(this._sunScatteredLuminance,.5,new o$1p);e.y+=1e3*this._nightSkyLuminance();var t=o$1p.multiplyByScalar(this._moonScatteredLuminance,.5,new o$1p),i=o$1p.multiplyByScalar(this._sunScatteredLuminanceSeaLevel,.5,new o$1p);i.y+=1e3*this._nightSkyLuminance();var n=o$1p.multiplyByScalar(this._moonScatteredLuminanceSeaLevel,.5,new o$1p);a$3.durandMapperXYZ(e),a$3.durandMapperXYZ(t),a$3.durandMapperXYZ(i),a$3.durandMapperXYZ(n);var r=o$1p.add(e,t,new o$1p);r.x>this._maxSkylightLuminance&&(r.x=this._maxSkylightLuminance),r.y>this._maxSkylightLuminance&&(r.y=this._maxSkylightLuminance),r.z>this._maxSkylightLuminance&&(r.z=this._maxSkylightLuminance);var o=p$1e.multiplyByVector(P$7,r,new o$1p);this._monochromeAmbient&&(o.x=o.z=o.y),this._applyGamma(o),this._skyLight=new e$1U(o.x,o.y,o.z),(r=o$1p.add(i,n,r)).x>this._maxSkylightLuminance&&(r.x=this._maxSkylightLuminance),r.y>this._maxSkylightLuminance&&(r.y=this._maxSkylightLuminance),r.z>this._maxSkylightLuminance&&(r.z=this._maxSkylightLuminance),o=p$1e.multiplyByVector(P$7,r,new o$1p),this._monochromeAmbient&&(o.x=o.z=o.y),this._applyGamma(o),this._skyLightSeaLevel=new e$1U(o.x,o.y,o.z)},l$a.prototype.setEphemeris=function(e,t){this._ephemeris=e,this._lightingChanged=!1,this._computeSun(t),this._computeMoon(t),this._updateZenith(t),this._computeLogAvg(),this._computeToneMappedSkyLight()},e$2.prototype.setTimeZone=function(e){e>=-12&&e<=12&&(this.zoneCorrection=e)},e$2.prototype.getEpoch2000Centuries=function(e){var t,i,n,r,o=this.hours+(this.minutes+this.seconds/60)/60;this.observingDST&&(o-=1),o-=this.zoneCorrection,n=this.day+o/24,this.month<3?(t=this.year-1,i=this.month+12):(t=this.year,i=this.month),r=1720996.5-Math.floor(t/100)+Math.floor(t/400)+Math.floor(365.25*t)+Math.floor(30.6001*(i+1));var a=(r-=2451545)+n;return e&&(a+=65/60/60/24),a/=36525},e$2.prototype.getEpoch1990Days=function(e){var t,i,n,r,o=this.hours+(this.minutes+this.seconds/60)/60;this.observingDST&&(o-=1),o-=this.zoneCorrection,r=this.day+o/24,this.month<3?(t=this.year-1,i=this.month+12):(t=this.year,i=this.month),n=1720996.5-Math.floor(t/100)+Math.floor(t/400)+Math.floor(365.25*t)+Math.floor(30.6001*(i+1));var a=(n-=2447891.5)+r;return e&&(a+=65/60/60/24),a},e$2.prototype.clone=function(e){return e.year=this.year,e.month=this.month,e.day=this.day,e.hours=this.hours,e.minutes=this.minutes,e.seconds=this.seconds,e},Object.defineProperties(i$8.prototype,{longitude:{get:function(){return this._longitude},set:function(e){e>=-180&&e<=180&&(this._longitude=e)}},latitude:{get:function(){return this._latitude},set:function(e){e>=-90&&e<=90&&(this._latitude=e)}},altitude:{get:function(){return this._altitude},set:function(e){this._altitude=e}}}),i$8.prototype.clone=function(e){return e._latitude=this.latitude,e._longitude=this.longitude,e._altitude=this.altitude,e},a$2.prototype.getSunPositionGeographic=function(){return this._sunGeo},a$2.prototype.getSunPositionHorizon=function(){return this._sunHoriz},a$2.prototype.computeMoonPosition=function(){var e=this._T,t=6.23+628.3019*e,i=1.628+8433.4663*e,n=2.3554+8328.6911*e,r=5.1985+7771.3772*e,o=3.8104+8399.7091*e+.1098*Math.sin(n)+.0222*Math.sin(2*r-n)+.0115*Math.sin(2*r)+.0037*Math.sin(2*n)-.0032*Math.sin(t)-.002*Math.sin(2*i)+.001*Math.sin(2*r-2*n)+.001*Math.sin(2*r-t-n)+9e-4*Math.sin(2*r+n)+8e-4*Math.sin(2*r-t)+7e-4*Math.sin(n-t)-6e-4*Math.sin(r)-5e-4*Math.sin(t+n),a=.0895*Math.sin(i)+.0049*Math.sin(n+i)+.0048*Math.sin(n-i)+.003*Math.sin(2*r-i)+.001*Math.sin(2*r+i-n)+8e-4*Math.sin(2*r-i-n)+6e-4*Math.sin(2*r+i),s=1/(.016593+904e-6*Math.cos(n)+166e-6*Math.cos(2*r-n)+137e-6*Math.cos(2*r)+49e-6*Math.cos(2*n)+15e-6*Math.cos(2*r+n)+9e-6*Math.cos(2*r-t));this._moonEcl=m$8(s,a,o),this._moonEq=p$1e.multiplyByVector(this._eclipticToEquatorial,this._moonEcl,this._moonEq),this._moonGeo=p$1e.multiplyByVector(this._equatorialToGeographic,this._moonEq,this._moonGeo),this._moonHoriz=p$1e.multiplyByVector(this._eclipticToHorizon,this._moonEcl,new o$1p),this._moonDistance=6378.137*o$1p.distance(this._moonHoriz,new o$1p(1,0,0)),o=T$6(o),this._sunEclipticLongitude=T$6(this._sunEclipticLongitude),this._moonPhaseAngle=o-this._sunEclipticLongitude,this._moonPhaseAngle=T$6(this._moonPhaseAngle),this._moonPhase=.5*(1-Math.cos(this._moonPhaseAngle))};var u$9=new o$1p;function G$4(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=1,t[3]=0,t[6]=0,t[1]=0,t[4]=n,t[7]=i,t[2]=0,t[5]=-i,t[8]=n}function v$6(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=n,t[3]=0,t[6]=-i,t[1]=0,t[4]=1,t[7]=0,t[2]=i,t[5]=0,t[8]=n}function f$9(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=n,t[3]=i,t[6]=0,t[1]=-i,t[4]=n,t[7]=0,t[2]=0,t[5]=0,t[8]=1}a$2.prototype.computeSunPosition=function(){var e=this._T,t=6.24+628.302*e,i=4.895048+628.331951*e+(.033417-84e-6*e)*Math.sin(t)+351e-6*Math.sin(2*t),n=1.00014-(.016708-42e-6*e)*Math.cos(t)-141e-6*Math.cos(2*t);if(this._sunEclipticLongitude=i,this._sunEcl=m$8(n,0,i),this._sunEq=p$1e.multiplyByVector(this._eclipticToEquatorial,this._sunEcl,this._sunEq),u$9=p$1e.multiplyByVector(this._equatorialToGeographic,this._sunEq,u$9),this._geoZUp?(this._sunGeo.x=u$9.x,this._sunGeo.y=u$9.y,this._sunGeo.z=u$9.z):this._primeMeridianZ?(this._sunGeo.x=u$9.y,this._sunGeo.y=u$9.z,this._sunGeo.z=u$9.x):(this._sunGeo.x=u$9.x,this._sunGeo.y=u$9.z,this._sunGeo.z=-u$9.y),this._forceSunHoriz)this._sunHoriz.x=sin(forcedSunAzimuth)*cos(forcedSunAltitude),this._sunHoriz.z=-cos(forcedSunAzimuth)*cos(forcedSunAltitude),this._sunHoriz.y=sin(forcedSunAltitude),this._sunHoriz.Normalize(),this._geoZUp?this._sunGeo=horizonToGeographic*z$3(sunHoriz):this._sunGeo=E$4(horizonToGeographic*z$3(sunHoriz)),this._sunEcl=horizonToEcliptic*z$3(sunHoriz),this._sunEq=horizonToEquatorial*z$3(sunHoriz);else{var r=new o$1p;r=p$1e.multiplyByVector(this._eclipticToHorizon,this._sunEcl,r),this._sunHoriz=E$4(r)}var o=o$1p.normalize(this._sunHoriz,new o$1p),a=o$1p.distance(this._sunHoriz,o$1p.ZERO),s=Math.asin(o.y);s=q$4(s),this._sunHoriz.y=a*Math.sin(s)},a$2.prototype.getSunPositionHorizon=function(){return this._sunHoriz},a$2.prototype.getMoonPositionHorizon=function(){return this._moonHoriz},a$2.prototype.getMoonPhase=function(){return this._moonPhase},a$2.prototype.getMoonDistanceKM=function(){return this._moonDistance},a$2.prototype.getMoonPhaseAngle=function(){return this._moonPhaseAngle};var M$5=new p$1e,g$c=new p$1e,y$7=new p$1e;function n$6(){this._ambientColor=new e$1U,this._sunColor=new e$1U,this._sky=new l$a,this._ephemeris=new a$2,this._localTime=new e$2,this._location=new i$8,this._atmosphereHeight=1e5,this._renderError=new o$1h,this._basis3=new p$1e,this._invBasis3=new p$1e,this._upVector=new o$1p(0,0,1),this._rightVector=new o$1p(-1,0,0),this._sceneMode=C$13.SCENE3D}a$2.prototype.update=function(e,t){var i=!1;if(e!==this._lastTime&&(i=!0,this._lastTime=e.clone(this._lastTime)),t!==this._lastLocation&&(i=!0,this._lastLocation=t.clone(this._lastLocation)),i){var n=this._T=e.getEpoch2000Centuries(!0);this._tuncorr=e.getEpoch2000Centuries(!1),this._epochDays=e.getEpoch1990Days(!1),f$9(.01118*n,M$5),v$6(-.00972*n,g$c),f$9(.01118*n,y$7);var r=p$1e.multiply(M$5,g$c,new p$1e);this._precession=p$1e.multiply(r,y$7,this._precession);var o=4.894961+230121.675315*this._tuncorr,a=o+e$2a.toRadians(t.longitude),s=e$2a.toRadians(t.latitude),l=.409093-227e-6*this._T;v$6(s-Math.PI/2,g$c),f$9(-a,y$7),G$4(l,M$5),r=p$1e.multiply(g$c,y$7,r),p$1e.multiply(r,this._precession,this._equatorialToHorizon),p$1e.multiply(r,M$5,this._eclipticToHorizon),p$1e.clone(M$5,this._eclipticToEquatorial),f$9(-o,this._equatorialToGeographic),p$1e.transpose(this._equatorialToGeographic,this._geographicToEquatorial),p$1e.transpose(this._equatorialToHorizon,this._horizonToEquatorial),p$1e.multiply(this._equatorialToGeographic,this._horizonToEquatorial,this._horizonToGeographic),p$1e.multiply(this._equatorialToHorizon,this._geographicToEquatorial,this._geographicToHorizon),p$1e.inverse(this._eclipticToHorizon,this._horizonToEcliptic),this.computeSunPosition(),this.computeMoonPosition()}};var T$5=new e$1U(1,.96,.94,1);function u$8(e){var t=0;e.red<t&&(t=e.red),e.green<t&&(t=e.green),e.blue<t&&(t=e.blue),t=-t,e.red+=t,e.green+=t,e.blue+=t;var i=e.red;e.green>i&&(i=e.green),e.blue>i&&(i=e.blue),i>1&&(e.red/=i,e.green/=i,e.blue/=i),e.red<0&&(e.red=0),e.green<0&&(e.green=0),e.blue<0&&(e.blue=0),e.a<0&&(e.a=0)}n$6.prototype._interpolate=function(e,t){var i=(this._atmosphereHeight+.5*this._atmosphereHeight-this._location.altitude)/(.5*this._atmosphereHeight);return i>1&&(i=1),i<0&&(i=0),e$1U.lerp(e,t,i,new e$1U)},n$6.prototype.getAmbientColor=function(){var e=this._sky.getToneMappedSkyLight();return u$8(e),this._location.altitude>this._atmosphereHeight&&(e=this._interpolate(new e$1U(0,0,0,1),e)),e},n$6.prototype.getSunColor=function(){var e=this._sky.getSunColor();return u$8(e),this._location.altitude>this._atmosphereHeight&&(e=this._interpolate(T$5,e)),e},n$6.prototype.getSunPosition=function(){if(this._sceneMode==C$13.SCENE3D)return this.getSunPositionGeographic();var e=new o$1p;return e=o$1p.clone(this._ephemeris.getSunPositionHorizon(),e),o$1p.normalize(e,e),p$1e.multiplyByVector(this._basis3,e,e),e},n$6.prototype.getSunPositionGeographic=function(){return this._ephemeris.getSunPositionGeographic()},n$6.prototype._computeLocalTime=function(e){var t=a$15.toGregorianDate(e);this._localTime.year=t.year,this._localTime.month=t.month,this._localTime.day=t.day,this._localTime.hours=t.hour,this._localTime.minutes=t.minute,this._localTime.seconds=t.second,this._localTime.setTimeZone(0)},n$6.prototype.setLocation=function(e){this._location.longitude=e$2a.toDegrees(e.longitude),this._location.latitude=e$2a.toDegrees(e.latitude),this._location.altitude=e.height};var _$6=new o$1p,g$b=new o$1p,l$9=new o$1p,C$6;n$6.prototype.updateBasis=function(){this.getXYZ(_$6,g$b,l$9,this._upVector,this._rightVector,!0),this.getBases(this._basis3,this._invBasis3,_$6,g$b,l$9)},n$6.prototype.getXYZ=function(e,t,i,n,r){i=o$1p.cross(r,n,i),o$1p.normalize(i,i),e=o$1p.cross(n,i,e),o$1p.normalize(e,e),t=o$1p.cross(i,e,t),o$1p.normalize(t,t)},n$6.prototype.getBases=function(e,t,i,n,r){e[0]=i.x,e[3]=i.y,e[6]=i.z,e[1]=n.x,e[4]=n.y,e[7]=n.z,e[2]=r.x,e[5]=r.y,e[8]=r.z,t[0]=i.x,t[3]=n.x,t[6]=r.x,t[1]=i.y,t[4]=n.y,t[7]=r.y,t[2]=i.z,t[5]=n.z,t[8]=r.z},n$6.prototype.update=function(e,t){try{this._sceneMode=t,this._sceneMode==C$13.SCENE3D||this.updateBasis(),this.setLocation(e.camera.positionCartographic),this._computeLocalTime(e.time),this._ephemeris.update(this._localTime,this._location),this._sky.setEphemeris(this._ephemeris,this._location.altitude)}catch(e){this._renderError.raiseEvent(this,e)}};class F$5{constructor(e){this.context=e;const t=e._gl;this.maxBindingPoints=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS),this._uniformBuffers=new Array}createUniformBuffer(e){const t=this.context._gl,i=t.createBuffer();return t.bindBuffer(t.UNIFORM_BUFFER,i),e instanceof Float32Array?t.bufferData(t.UNIFORM_BUFFER,e,t.STATIC_DRAW):t.bufferData(t.UNIFORM_BUFFER,new Float32Array(e),t.STATIC_DRAW),t.bindBuffer(t.UNIFORM_BUFFER,null),i}updateUniformBuffer(e,t,i,n){const r=this.context._gl;r.bindBuffer(r.UNIFORM_BUFFER,e),void 0===i&&(i=0),void 0===n?t instanceof Float32Array?r.bufferSubData(r.UNIFORM_BUFFER,i,t):r.bufferSubData(r.UNIFORM_BUFFER,i,new Float32Array(t)):t instanceof Float32Array?r.bufferSubData(r.UNIFORM_BUFFER,0,t.subarray(i,i+n)):r.bufferSubData(r.UNIFORM_BUFFER,0,new Float32Array(t).subarray(i,i+n)),r.bindBuffer(r.UNIFORM_BUFFER,null)}bindUniformBufferBase(e,t,i){const n=this.context._gl;n.bindBufferBase(n.UNIFORM_BUFFER,t,e||null)}bindUniformBlock(e,t,i){const n=this.context._gl;var r=n.getUniformBlockIndex(e,t);4294967295!==r&&n.uniformBlockBinding(e,r,i)}_releaseBuffer(e){return this.context._gl.deleteBuffer(e),!0}}function ue$2(e,t){var i="WebGL Error: ";switch(t){case e.INVALID_ENUM:i+="INVALID_ENUM";break;case e.INVALID_VALUE:i+="INVALID_VALUE";break;case e.INVALID_OPERATION:i+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:i+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:i+="CONTEXT_LOST_WEBGL lost";break;default:i+="Unknown ("+t+")"}return i}function le$4(e,t,i,n){for(var r=ue$2(e,n)+": "+t.name+"(",o=0;o<i.length;++o)0!==o&&(r+=", "),r+=i[o];return r+=");"}function de$2(e,t,i){var n=e.getError();if(n!==e.NO_ERROR)throw new t$14(le$4(e,t,i,n))}function he$1(e,t,i){return{get:function(){var n=e[t];return i(e,"get: "+t,n),e[t]},set:function(n){e[t]=n,i(e,"set: "+t,n)}}}function ce$5(e,t){if(!e$2b(t))return e;function i(i){return function(){var n=i.apply(e,arguments);return t(e,i,arguments),n}}var n={};for(var r in e){var o=e[r];o instanceof Function?n[r]=i(o):Object.defineProperty(n,r,he$1(e,r,t))}return n}function u$7(e,t){for(var i=t.length,n=0;n<i;++n){var r=e.getExtension(t[n]);if(r)return r}}function g$a(e,t){var i=i$i.call(this,e,t)||this;if(typeof WebGLRenderingContext>"u")throw new t$14("The browser does not support WebGL.");var n=e.width*i._cols,r=e.height*i._rows;e.width=300,e.height=150,(t=u$_(t=l$1g(t,!0),{})).allowTextureFilterAnisotropic=u$_(t.allowTextureFilterAnisotropic,!0);var o=u$_(t.webgl,{});o.alpha=u$_(o.alpha,!1),o.stencil=u$_(o.stencil,!0),o.antialias=u$_(o.antialias,!0);var a,s=u$_(t.contextType,De$h.Webgl2)!==De$h.Webgl1&&typeof WebGL2RenderingContext<"u",l=!1,u=t.getWebGLStub;if(e$2b(u))a=u(e,o);else if(s&&(e$2b(a=e.getContext("webgl2",o)||e.getContext("experimental-webgl2",o)||void 0)&&(l=!0)),e$2b(a)||(a=e.getContext("webgl",o)||e.getContext("experimental-webgl",o)||void 0),!e$2b(a))throw new t$14("The browser supports WebGL, but initialization failed.");i.webglOptions=o,e.width=n,e.height=r,i._originalGLContext=a,i._gl=a,i._webgl2=l,i.validateFramebuffer=!1,i.validateShaderProgram=!1,i.logShaderCompilation=!1,i._throwOnWebGLError=!1;var c=a;i._stencilBits=c.getParameter(c.STENCIL_BITS),e$1T._maximumCombinedTextureImageUnits=c.getParameter(c.MAX_COMBINED_TEXTURE_IMAGE_UNITS),e$1T._maximumCubeMapSize=c.getParameter(c.MAX_CUBE_MAP_TEXTURE_SIZE),e$1T._maximumFragmentUniformVectors=c.getParameter(c.MAX_FRAGMENT_UNIFORM_VECTORS),e$1T._maximumTextureImageUnits=c.getParameter(c.MAX_TEXTURE_IMAGE_UNITS),e$1T._maximumRenderbufferSize=c.getParameter(c.MAX_RENDERBUFFER_SIZE),e$1T._maximumTextureSize=c.getParameter(c.MAX_TEXTURE_SIZE),e$1T._maximumVaryingVectors=c.getParameter(c.MAX_VARYING_VECTORS),e$1T._maximumVertexAttributes=c.getParameter(c.MAX_VERTEX_ATTRIBS),e$1T._maximumVertexTextureImageUnits=c.getParameter(c.MAX_VERTEX_TEXTURE_IMAGE_UNITS),e$1T._maximumVertexUniformVectors=c.getParameter(c.MAX_VERTEX_UNIFORM_VECTORS);var h=c.getParameter(c.ALIASED_LINE_WIDTH_RANGE);e$1T._minimumAliasedLineWidth=h[0],e$1T._maximumAliasedLineWidth=h[1];var d=c.getParameter(c.ALIASED_POINT_SIZE_RANGE);e$1T._minimumAliasedPointSize=d[0],e$1T._maximumAliasedPointSize=d[1];var f=c.getParameter(c.MAX_VIEWPORT_DIMS);e$1T._maximumViewportWidth=f[0],e$1T._maximumViewportHeight=f[1];var p=c.getShaderPrecisionFormat(c.FRAGMENT_SHADER,c.HIGH_FLOAT);e$1T._highpFloatSupported=0!==p.precision;var _=c.getShaderPrecisionFormat(c.FRAGMENT_SHADER,c.HIGH_INT);e$1T._highpIntSupported=0!==_.rangeMax,l&&(e$1T._uniformBufferOffsetAlignment=c.getParameter(c.UNIFORM_BUFFER_OFFSET_ALIGNMENT),e$1T._maxUniformBufferBinding=c.getParameter(c.MAX_UNIFORM_BUFFER_BINDINGS),e$1T._maxArrayTextureLayers=c.getParameter(c.MAX_ARRAY_TEXTURE_LAYERS)),i._antialias=c.getContextAttributes().antialias,i._standardDerivatives=l||!!u$7(c,["OES_standard_derivatives"]),i._blendMinmax=!!u$7(c,["EXT_blend_minmax"]),i._elementIndexUint=!!u$7(c,["OES_element_index_uint"]),i._depthTexture=!!u$7(c,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),i._fragDepth=l||!!u$7(c,["EXT_frag_depth"]),i._debugShaders=u$7(c,["WEBGL_debug_shaders"]);var m=u$7(c,["EXT_shader_texture_lod"]);i._textureFloat=!!u$7(c,["OES_texture_float"]),i._textureHalfFloat=!!u$7(c,["OES_texture_half_float"]),i._textureFloatLinear=!!u$7(c,["OES_texture_float_linear"]),i._textureHalfFloatLinear=!!u$7(c,["OES_texture_half_float_linear"]),i._sysShaderDefines=[],e$2b(i._fragDepth)&&i._fragDepth&&i._sysShaderDefines.push("GL_EXT_frag_depth"),e$2b(m)&&i._sysShaderDefines.push("GL_EXT_shader_texture_lod"),l?(i._sysShaderDefines.push("WEBGL2"),i._sysShaderDefines.push("OUTPUT_DECLARATION")):e$2b(i._standardDerivatives)&&i._standardDerivatives&&i._sysShaderDefines.push("GL_OES_standard_derivatives"),i._colorBufferFloat=!!u$7(c,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),i._floatBlend=!!u$7(c,["EXT_float_blend"]),i._colorBufferHalfFloat=!!u$7(c,["EXT_color_buffer_half_float"]),i._s3tc=!!u$7(c,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),i._pvrtc=!!u$7(c,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),i._etc1=!!u$7(c,["WEBGL_compressed_texture_etc1"]),i._astc=!!u$7(c,["WEBGL_compressed_texture_astc"]),i._etc=!!u$7(c,["WEBG_compressed_texture_etc"]),i._bc7=!!u$7(c,["EXT_texture_compression_bptc"]),f$S.setKTX2SupportedFormats(i._s3tc,i._pvrtc,i._astc,i._etc,i._etc1,i._bc7);var g,x,v,y,$,b,T,C,S,w,E=t.allowTextureFilterAnisotropic?u$7(c,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;if(i._textureFilterAnisotropic=E,e$1T._maximumTextureFilterAnisotropy=e$2b(E)?c.getParameter(E.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1,l){var P=i;g=function(){return P._gl.createVertexArray()},x=function(e){P._gl.bindVertexArray(e)},v=function(e){P._gl.deleteVertexArray(e)},y=function(e,t,i,n,r){c.drawElementsInstanced(e,t,i,n,r)},$=function(e,t,i,n){c.drawArraysInstanced(e,t,i,n)},b=function(e,t){c.vertexAttribDivisor(e,t)},T=function(e){c.drawBuffers(e)}}else e$2b(C=u$7(c,["OES_vertex_array_object"]))&&(g=function(){return C.createVertexArrayOES()},x=function(e){C.bindVertexArrayOES(e)},v=function(e){C.deleteVertexArrayOES(e)}),e$2b(S=u$7(c,["ANGLE_instanced_arrays"]))&&(y=function(e,t,i,n,r){S.drawElementsInstancedANGLE(e,t,i,n,r)},$=function(e,t,i,n){S.drawArraysInstancedANGLE(e,t,i,n)},b=function(e,t){S.vertexAttribDivisorANGLE(e,t)}),e$2b(w=u$7(c,["WEBGL_draw_buffers"]))&&(T=function(e){w.drawBuffersWEBGL(e)});i.glCreateVertexArray=g,i.glBindVertexArray=x,i.glDeleteVertexArray=v,i.glDrawElementsInstanced=y,i.glDrawArraysInstanced=$,i.glVertexAttribDivisor=b,i.glDrawBuffers=T,i._vertexArrayObject=!!C,i._instancedArrays=!!S,i._drawBuffers=!!w,e$1T._maximumDrawBuffers=i.drawBuffers?c.getParameter(de$x.MAX_DRAW_BUFFERS):1,e$1T._maximumColorAttachments=i.drawBuffers?c.getParameter(de$x.MAX_COLOR_ATTACHMENTS):1,e$1T._maximumSamples=i._webgl2?c.getParameter(c.MAX_SAMPLES):1,d$1m.apply(c,i._defaultRenderState,i._defaultPassState);const A=c.getExtension("WEBGL_debug_renderer_info");if(A){var L=c.getParameter(A.UNMASKED_RENDERER_WEBGL);ti$3._autoSetMaxMemory(L)}i._floatTexSixPlaces=r$p(i),l&&(i._uniformBufferEngine=new F$5(i))}function me$2(e){if(e.validateFramebuffer){var t=e._gl,i=t.checkFramebufferStatus(t.FRAMEBUFFER);if(i!==t.FRAMEBUFFER_COMPLETE){var n;switch(i){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:n="Framebuffer is not complete. Incomplete attachment: at least one attachment point with a renderbuffer or texture attached has its attached object no longer in existence or has an attached image with a width or height of zero, or the color attachment point has a non-color-renderable image attached, or the depth attachment point has a non-depth-renderable image attached, or the stencil attachment point has a non-stencil-renderable image attached. Color-renderable formats include GL_RGBA4, GL_RGB5_A1, and GL_RGB565. GL_DEPTH_COMPONENT16 is the only depth-renderable format. GL_STENCIL_INDEX8 is the only stencil-renderable format.";break;case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:n="Framebuffer is not complete. Incomplete dimensions: not all attached images have the same width and height.";break;case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:n="Framebuffer is not complete. Missing attachment: no images are attached to the framebuffer.";break;case t.FRAMEBUFFER_UNSUPPORTED:n="Framebuffer is not complete. Unsupported: the combination of internal formats of the attached images violates an implementation-dependent set of restrictions."}throw new t$16(n)}}}function Z$6(e,t,i,n){var r=e._currentRenderState,o=e._currentPassState,a=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,d$1m.partialApply(e._gl,r,t,o,i,a,i.viewport,n)}function X$3(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;var i=C$6;if(e$2b(t))t._bind(),me$2(e),i=t._getActiveColorAttachments();else{var n=e._gl;n.bindFramebuffer(n.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(i)}}i$i&&(g$a.__proto__=i$i),g$a.prototype=Object.create(i$i&&i$i.prototype),g$a.prototype.constructor=i$i,Object.defineProperties(g$a.prototype,{webgl2:{get:function(){return this._webgl2}},webgpu:{get:function(){return!1}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return this._stencilBits>=8}},antialias:{get:function(){return this._antialias}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},floatTextureSixPlaces:{get:function(){return this._floatTexSixPlaces}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},etc1:{get:function(){return this._etc1}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=ce$5(this._originalGLContext,e?de$2:void 0)}},drawingBufferHeight:{get:function(){return Math.floor(this._gl.drawingBufferHeight)}},drawingBufferWidth:{get:function(){return Math.floor(this._gl.drawingBufferWidth)}},realDrawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight*this._rows}},realDrawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth*this._cols}}}),typeof WebGLRenderingContext<"u"&&(C$6=[de$x.BACK]);var ge$3=new t$X;function Ee$2(e,t,i,n,r){if(e$2b(t)&&r.depthTest&&r.depthTest.enabled&&!t.hasDepthAttachment)throw new t$16("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");X$3(e,t),Z$6(e,r,i,!1),n._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,n.maximumTextureUnitIndex)}function pe$2(e,t,i,n){var r=t._primitiveType,o=t._vertexArray,a=t._offset,s=t._count,l=t.instanceCount;if(!W$18.validate(r))throw new t$16("drawCommand.primitiveType is required and must be valid.");if(o$1q.defined("drawCommand.vertexArray",o),o$1q.typeOf.number.greaterThanOrEquals("drawCommand.offset",a,0),e$2b(s)&&o$1q.typeOf.number.greaterThanOrEquals("drawCommand.count",s,0),o$1q.typeOf.number.greaterThanOrEquals("drawCommand.instanceCount",l,0),l>0&&!e.instancedArrays)throw new t$16("Instanced arrays extension is not supported");e._us.model=u$_(t._modelMatrix,p$1d.IDENTITY),e._us.useRelativeOrigin=t.useRelativeOrigin,i._setUniforms(n,e._us,e.validateShaderProgram,t),o._bind(),e$2b(t._transformFeedback)&&t._transformFeedback.begin();var u=o.indexBuffer;e$2b(u)?(a*=u.bytesPerIndex,s=u$_(s,u.numberOfIndices),0===l?(r===W$18.TRIANGLES&&(e._trangleCount+=s/3),e._gl.drawElements(r,s,u.indexDatatype,a)):(r===W$18.TRIANGLES&&(e._trangleCount+=s/3*l),e.glDrawElementsInstanced(r,s,u.indexDatatype,a,l))):(s=u$_(s,o.numberOfVertices),0===l?e._gl.drawArrays(r,a,s):e.glDrawArraysInstanced(r,a,s,l)),e$2b(t._transformFeedback)&&t._transformFeedback.end(),o._unBind()}g$a.prototype.clear=function(e,t){e=u$_(e,ge$3),t=u$_(t,this._defaultPassState);var i=this._gl,n=0,r=e.color,o=e.depth,a=e.stencil;e$2b(r)&&(e$1U.equals(this._clearColor,r)||(e$1U.clone(r,this._clearColor),i.clearColor(r.red,r.green,r.blue,r.alpha)),n|=i.COLOR_BUFFER_BIT),e$2b(o)&&(o!==this._clearDepth&&(this._clearDepth=o,i.clearDepth(o)),n|=i.DEPTH_BUFFER_BIT),e$2b(a)&&(a!==this._clearStencil&&(this._clearStencil=a,i.clearStencil(a)),n|=i.STENCIL_BUFFER_BIT),Z$6(this,u$_(e.renderState,this._defaultRenderState),t,!0),X$3(this,u$_(e.framebuffer,t.framebuffer)),i.clear(n)},g$a.prototype.draw=function(e,t,i,n){o$1q.defined("drawCommand",e),o$1q.defined("drawCommand.shaderProgram",e._shaderProgram),t=u$_(t,this._defaultPassState);var r=u$_(e._framebuffer,t.framebuffer),o=u$_(e._renderState,this._defaultRenderState);i=u$_(i,e._shaderProgram),n=u$_(n,e._uniformMap),Ee$2(this,r,t,i,o),pe$2(this,e,i,n)},g$a.prototype.endFrame=function(){var e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);var t=C$6;this.drawBuffers&&this.glDrawBuffers(t);var i=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(var n=0;n<i;++n)e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)},g$a.prototype.readPixels=function(e){var t=this._gl;e=u$_(e,u$_.EMPTY_OBJECT);var i=Math.max(u$_(e.x,0),0),n=Math.max(u$_(e.y,0),0),r=u$_(e.width,t.drawingBufferWidth),o=u$_(e.height,t.drawingBufferHeight),a=e.framebuffer;o$1q.typeOf.number.greaterThan("readState.width",r,0),o$1q.typeOf.number.greaterThan("readState.height",o,0);var s=_$$.UNSIGNED_BYTE;e$2b(a)&&a.numberOfColorAttachments>0&&(s=a.getColorTexture(0).pixelDatatype);var l=V$10.createTypedArray(V$10.RGBA,s,r,o);return X$3(this,a),t.readPixels(i,n,r,o,V$10.RGBA,s,l),l},g$a.prototype.readPixelsAsync=function(e){var t=this.readPixels(e);return Promise.resolve(t)},g$a.prototype.resize=function(){},g$a.prototype.isDestroyed=function(){return!1},g$a.prototype.destroy=function(){return i$i.prototype.destroy.call(this),i$10(this)};var _0x4ba59a=(_0x344892=!0,function(e,t){var i=_0x344892?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x344892=!1,i}),_0x13fcd7=_0x4ba59a(void 0,(function(){return _0x13fcd7.toString().search("(((.+)+)+)+$").toString().constructor(_0x13fcd7).search("(((.+)+)+)+$")})),_0x344892;_0x13fcd7();var A$8="\nattribute vec4 aPosition;\n//varying vec3 v_position;\n\nuniform Mesh {\n uniform mat4 uModelMatrix;\n};\n\nvoid main()\n{\n //v_position = aPosition.xyz + vec3(0.5);\n gl_Position = czm_viewProjection * uModelMatrix * vec4(aPosition.xyz, 1.0);\n czm_vertexLogDepth();\n}",_0x59817b=(_0x162ecd=!0,function(e,t){var i=_0x162ecd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x162ecd=!1,i}),_0x342139=_0x59817b(void 0,(function(){return _0x342139.toString().search("(((.+)+)+)+$").toString().constructor(_0x342139).search("(((.+)+)+)+$")})),_0x162ecd;_0x342139();var g$9="\n//varying vec3 v_position;\n\nvoid main()\n{\n gl_FragColor = vec4(1.0);\n czm_writeLogDepth();\n}";function t$9(e){this._context=e,this._showDebugOcclusionMesh=!0,this._prepareResources()}t$9.prototype.initDrawCommand=function(e){e.shaderProgram=this._shaderProgram,e.vertexArray=this._vertexArray,e.renderState=this._renderState},t$9.prototype._prepareResources=function(){for(var e=O$y.getUnitBox(),t=e.attributes.position.values,i=new Float32Array(t.length),n=0;n<t.length;n++)i[n]=t[n];var r=t$Y.createVertexBuffer({context:this._context,typedArray:i,usage:A$19.STATIC_DRAW}),o=[],a={aPosition:0};o.push({name:"aPosition",index:a.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var s=t$Y.createIndexBuffer({context:this._context,typedArray:e.indices,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});this._vertexArray=new c$12({context:this._context,attributes:o,indexBuffer:s});var l=new s$U({name:"OcclusionVp",sources:[A$8]});l.defines.push("LOG_DEPTH");var u=new s$U({name:"OcclusionFp",sources:[g$9]});u.defines.push("LOG_DEPTH"),this._shaderProgram=r$13.fromCache({name:"OcclusionMesh",context:this._context,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:a}),this._renderState=d$1m.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND,cull:{enabled:!0}})},t$9.prototype.dispose=function(){this._vertexArray&&!this._vertexArray.isDestroyed()&&this._vertexArray.destroy()};var _0x5dd3db=(_0x421768=!0,function(e,t){var i=_0x421768?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x421768=!1,i}),_0x3323af=_0x5dd3db(void 0,(function(){return _0x3323af.toString().search("(((.+)+)+)+$").toString().constructor(_0x3323af).search("(((.+)+)+)+$")})),_0x421768;_0x3323af(),_0xb82ccc.prototype.setAlphaConstants=function(e,t,i,n){this._alphaState.setAlphaBlendConstants(e,t,i,n)},_0xb82ccc.prototype.setAlphaMode=function(e,t){if(void 0===t&&(t=!1),this._alphaMode!==e){switch(e){case _0x354cf8.ALPHA_DISABLE:this._alphaState.alphaBlend=!1;break;case _0x354cf8.ALPHA_PREMULTIPLIED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_PREMULTIPLIED_PORTERDUFF:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_COMBINE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ADD:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_SUBTRACT:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ZERO,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_MULTIPLY:this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_COLOR,this._gl.ZERO,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_MAXIMIZED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_INTERPOLATE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.CONSTANT_COLOR,this._gl.ONE_MINUS_CONSTANT_COLOR,this._gl.CONSTANT_ALPHA,this._gl.ONE_MINUS_CONSTANT_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_SCREENMODE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ONEONE_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ALPHATOCOLOR:this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_ALPHA,this._gl.ONE,this._gl.ZERO,this._gl.ZERO),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_REVERSEONEMINUS:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE_MINUS_DST_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_SRC_DSTONEMINUSSRCALPHA:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ONEONE_ONEZERO:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ONE,this._gl.ZERO),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_EXCLUSION:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_LAYER_ACCUMULATE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0}!t&&(this.depthCullingState.depthMask=e===_0x354cf8.ALPHA_DISABLE),this._alphaMode=e}},_0xb82ccc.prototype.getAlphaMode=function(){return this._alphaMode},_0xb82ccc.prototype.setAlphaEquation=function(e){if(this._alphaEquation!==e){switch(e){case _0x354cf8.ALPHA_EQUATION_ADD:this._alphaState.setAlphaEquationParameters(_0x354cf8.GL_ALPHA_EQUATION_ADD,_0x354cf8.GL_ALPHA_EQUATION_ADD);break;case _0x354cf8.ALPHA_EQUATION_SUBSTRACT:this._alphaState.setAlphaEquationParameters(_0x354cf8.GL_ALPHA_EQUATION_SUBTRACT,_0x354cf8.GL_ALPHA_EQUATION_SUBTRACT);break;case _0x354cf8.ALPHA_EQUATION_REVERSE_SUBTRACT:this._alphaState.setAlphaEquationParameters(_0x354cf8.GL_ALPHA_EQUATION_REVERSE_SUBTRACT,_0x354cf8.GL_ALPHA_EQUATION_REVERSE_SUBTRACT);break;case _0x354cf8.ALPHA_EQUATION_MAX:this._alphaState.setAlphaEquationParameters(_0x354cf8.GL_ALPHA_EQUATION_MAX,_0x354cf8.GL_ALPHA_EQUATION_MAX);break;case _0x354cf8.ALPHA_EQUATION_MIN:this._alphaState.setAlphaEquationParameters(_0x354cf8.GL_ALPHA_EQUATION_MIN,_0x354cf8.GL_ALPHA_EQUATION_MIN);break;case _0x354cf8.ALPHA_EQUATION_DARKEN:this._alphaState.setAlphaEquationParameters(_0x354cf8.GL_ALPHA_EQUATION_MIN,_0x354cf8.GL_ALPHA_EQUATION_ADD)}this._alphaEquation=e}},_0xb82ccc.prototype.getAlphaEquation=function(){return this._alphaEquation};var _0x153e3c=(_0x2a39f2=!0,function(e,t){var i=_0x2a39f2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a39f2=!1,i}),_0x3c58d5=_0x153e3c(void 0,(function(){return _0x3c58d5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c58d5).search("(((.+)+)+)+$")})),_0x2a39f2;_0x3c58d5(),_0x58fcf.prototype.setAlphaMode=function(e,t){if(void 0===t&&(t=!1),this._alphaMode!==e||!(e===_0x354cf8.ALPHA_DISABLE&&!this._alphaState.alphaBlend||e!==_0x354cf8.ALPHA_DISABLE&&this._alphaState.alphaBlend)){switch(e){case _0x354cf8.ALPHA_DISABLE:this._alphaState.alphaBlend=!1;break;case _0x354cf8.ALPHA_PREMULTIPLIED:this._alphaState.setAlphaBlendFunctionParameters(1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_PREMULTIPLIED_PORTERDUFF:this._alphaState.setAlphaBlendFunctionParameters(1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_COMBINE:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(1,1,0,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ADD:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA,1,0,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_SUBTRACT:this._alphaState.setAlphaBlendFunctionParameters(0,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,1,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_MULTIPLY:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_DST_COLOR,0,1,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_MAXIMIZED:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,1,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_INTERPOLATE:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_CONSTANT_COLOR,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR,_0x354cf8.GL_ALPHA_FUNCTION_CONSTANT_ALPHA,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_SCREENMODE:this._alphaState.setAlphaBlendFunctionParameters(1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ONEONE_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(1,1,1,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ALPHATOCOLOR:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_DST_ALPHA,1,0,0),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_REVERSEONEMINUS:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_SRC_DSTONEMINUSSRCALPHA:this._alphaState.setAlphaBlendFunctionParameters(1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ONEONE_ONEZERO:this._alphaState.setAlphaBlendFunctionParameters(1,1,1,0),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_EXCLUSION:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,0,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_LAYER_ACCUMULATE:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0}!t&&(this.setDepthWrite(e===_0x402caf.ALPHA_DISABLE),this._cacheRenderPipeline.setDepthWriteEnabled(e===_0x402caf.ALPHA_DISABLE)),this._alphaMode=e,this._cacheRenderPipeline.setAlphaBlendEnabled(this._alphaState.alphaBlend),this._cacheRenderPipeline.setAlphaBlendFactors(this._alphaState._blendFunctionParameters,this._alphaState._blendEquationParameters)}},_0x58fcf.prototype.setAlphaEquation=function(e){_0x402caf.prototype.setAlphaEquation.call(this,e),this._cacheRenderPipeline.setAlphaBlendFactors(this._alphaState._blendFunctionParameters,this._alphaState._blendEquationParameters)};var _0x6a04e3=(_0x609f40=!0,function(e,t){var i=_0x609f40?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x609f40=!1,i}),_0x3c4ccc=_0x6a04e3(void 0,(function(){return _0x3c4ccc.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c4ccc).search("(((.+)+)+)+$")})),_0x609f40;_0x3c4ccc(),_0x58fcf.prototype._createDepthStencilCubeTexture=function(e,t){var i=new InternalTexture(this,InternalTextureSource.DepthStencil);i.isCube=!0;var n=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,samples:1},t);return i.format=n.generateStencil?_0x354cf8.TEXTUREFORMAT_DEPTH24_STENCIL8:_0x354cf8.TEXTUREFORMAT_DEPTH32_FLOAT,this._setupDepthStencilTexture(i,e,n.generateStencil,n.bilinearFiltering,n.comparisonFunction,n.samples),this._textureHelper.createGPUTextureForInternalTexture(i),this._internalTexturesCache.push(i),i},_0x58fcf.prototype.createCubeTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=this;return void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=null),void 0===l&&(l=!1),void 0===u&&(u=0),void 0===c&&(c=0),void 0===h&&(h=null),void 0===d&&(d=!1),this.createCubeTextureBase(e,t,i,!!n,r,o,a,s,l,u,c,h,null,(function(e,t){var i=t,o=i[0].width,s=o;f._setCubeMapTextureParams(e,!n),e.format=null!=a?a:-1;var l=f._textureHelper.createGPUTextureForInternalTexture(e,o,s);f._textureHelper.updateCubeTextures(i,l.underlyingResource,o,s,l.format,!1,!1,0,0),!n&&f._generateMipmaps(e,f._uploadEncoder),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),r&&r()}),!!d)},_0x58fcf.prototype._setCubeMapTextureParams=function(e,t,i){e.samplingMode=t?_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE:_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE,e._cachedWrapU=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,e._cachedWrapV=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,i&&(e._maxLodLevel=i)};var _0x40806d=(_0x55371f=!0,function(e,t){var i=_0x55371f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55371f=!1,i}),_0xf43843=_0x40806d(void 0,(function(){return _0xf43843.toString().search("(((.+)+)+)+$").toString().constructor(_0xf43843).search("(((.+)+)+)+$")})),_0x55371f;_0xf43843(),_0x58fcf.prototype._debugPushGroup=function(e,t){this._options.enableGPUDebugMarkers&&(0===t||1===t?(0===t?this._renderEncoder:this._renderTargetEncoder).pushDebugGroup(e):this._currentRenderPass?this._currentRenderPass.pushDebugGroup(e):this._pendingDebugCommands.push(["push",e]))},_0x58fcf.prototype._debugPopGroup=function(e){this._options.enableGPUDebugMarkers&&(0===e||1===e?(0===e?this._renderEncoder:this._renderTargetEncoder).popDebugGroup():this._currentRenderPass?this._currentRenderPass.popDebugGroup():this._pendingDebugCommands.push(["pop",null]))},_0x58fcf.prototype._debugInsertMarker=function(e,t){this._options.enableGPUDebugMarkers&&(0===t||1===t?(0===t?this._renderEncoder:this._renderTargetEncoder).insertDebugMarker(e):this._currentRenderPass?this._currentRenderPass.insertDebugMarker(e):this._pendingDebugCommands.push(["insert",e]))},_0x58fcf.prototype._debugFlushPendingCommands=function(){for(var e=0;e<this._pendingDebugCommands.length;++e){var t=this._pendingDebugCommands[e],i=t[0],n=t[1];switch(i){case"push":this._debugPushGroup(n);break;case"pop":this._debugPopGroup();break;case"insert":this._debugInsertMarker(n)}}this._pendingDebugCommands.length=0};var _0x4a05bf=(_0x19bdf5=!0,function(e,t){var i=_0x19bdf5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19bdf5=!1,i}),_0x2102a7=_0x4a05bf(void 0,(function(){return _0x2102a7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2102a7).search("(((.+)+)+)+$")})),_0x19bdf5;_0x2102a7(),_0x58fcf.prototype.updateDynamicIndexBuffer=function(e,t,i){void 0===i&&(i=0);var n,r=e;n=e.is32Bits?t instanceof Uint32Array?t:new Uint32Array(t):t instanceof Uint16Array?t:new Uint16Array(t),this._bufferManager.setSubData(r,i,n)},_0x58fcf.prototype.updateDynamicVertexBuffer=function(e,t,i,n){var r,o=e;void 0===i&&(i=0),void 0===n?n=(r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t).byteLength:r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t,this._bufferManager.setSubData(o,i,r,0,n)};var _0x1d189d=(_0x1b8b95=!0,function(e,t){var i=_0x1b8b95?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b8b95=!1,i}),_0x59aba7=_0x1d189d(void 0,(function(){return _0x59aba7.toString().search("(((.+)+)+)+$").toString().constructor(_0x59aba7).search("(((.+)+)+)+$")})),_0x1b8b95;_0x59aba7(),_0x58fcf.prototype.createDynamicTexture=function(e,t,i,n){var r=new InternalTexture(this,InternalTextureSource.Dynamic);return r.baseWidth=e,r.baseHeight=t,i&&(e=this.needPOTTextures?_0xb82ccc.GetExponentOfTwo(e,this._caps.maxTextureSize):e,t=this.needPOTTextures?_0xb82ccc.GetExponentOfTwo(t,this._caps.maxTextureSize):t),r.width=e,r.height=t,r.isReady=!1,r.generateMipMaps=i,r.samplingMode=n,this.updateTextureSamplingMode(n,r),this._internalTexturesCache.push(r),r},_0x58fcf.prototype.updateDynamicTexture=function(e,t,i,n,r,o,a){var s;if(void 0===n&&(n=!1),e){var l=t.width,u=t.height,c=e._hardwareTexture;!(null===(s=e._hardwareTexture)||void 0===s?void 0:s.underlyingResource)&&(c=this._textureHelper.createGPUTextureForInternalTexture(e,l,u)),this._textureHelper.updateTexture(t,e,l,u,e.depth,c.format,0,0,i,n,0,0,a),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder),e.isReady=!0}};var _0x480777=(_0x64722b=!0,function(e,t){var i=_0x64722b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x64722b=!1,i}),_0x3c285f=_0x480777(void 0,(function(){return _0x3c285f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c285f).search("(((.+)+)+)+$")})),_0x64722b;function _0x43c9ac(e){return _0x5e1b10.call(this,e)||this}_0x3c285f(),_0x5e1b10&&(_0x43c9ac.__proto__=_0x5e1b10),_0x43c9ac.prototype=Object.create(_0x5e1b10&&_0x5e1b10.prototype),_0x43c9ac.prototype.constructor=_0x5e1b10;var _0xf6567b=(_0x1fe00c=!0,function(e,t){var i=_0x1fe00c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fe00c=!1,i}),_0xeb9394=_0xf6567b(void 0,(function(){return _0xeb9394.toString().search("(((.+)+)+)+$").toString().constructor(_0xeb9394).search("(((.+)+)+)+$")})),_0x1fe00c;_0xeb9394(),_0x58fcf.prototype.createExternalTexture=function(e){return new _0x43c9ac(e)},_0x58fcf.prototype.setExternalTexture=function(e,t){t?this._setInternalTexture(e,t):this._currentMaterialContext.setTexture(e,null)};var _0x167142=(_0x89435=!0,function(e,t){var i=_0x89435?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x89435=!1,i}),_0x2ab31a=_0x167142(void 0,(function(){return _0x2ab31a.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ab31a).search("(((.+)+)+)+$")})),_0x89435;_0x2ab31a(),_0x58fcf.prototype.unBindMultiColorAttachmentFramebuffer=function(e,t,i){void 0===t&&(t=!1),i&&i();var n=e._attachments.length;this._currentRenderPass&&this._currentRenderPass!==this._mainRenderPassWrapper.renderPass&&this._endRenderTargetRenderPass();for(var r=0;r<n;r++){var o=e.textures[r];o.generateMipMaps&&!t&&!o.isCube&&this._generateMipmaps(o)}this._currentRenderTarget=null,this._mrtAttachments=[],this._cacheRenderPipeline.setMRT([]),this._cacheRenderPipeline.setMRTAttachments(this._mrtAttachments),this._currentRenderPass=this._mainRenderPassWrapper.renderPass,this._setDepthTextureFormat(this._mainRenderPassWrapper),this._setColorFormat(this._mainRenderPassWrapper)},_0x58fcf.prototype.createMultipleRenderTarget=function(e,t,i){var n,r=!1,o=!0,a=!1,s=!1,l=_0x354cf8.TEXTUREFORMAT_DEPTH16,u=1,c=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,h=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE,d=new Array,f=new Array,p=new Array,_=this._createHardwareRenderTargetWrapper(!0,!1,e);void 0!==t&&(r=void 0!==t.generateMipMaps&&t.generateMipMaps,o=void 0===t.generateDepthBuffer||t.generateDepthBuffer,a=void 0!==t.generateStencilBuffer&&t.generateStencilBuffer,s=void 0!==t.generateDepthTexture&&t.generateDepthTexture,u=t.textureCount||1,l=null!==(n=t.depthTextureFormat)&&void 0!==n?n:_0x354cf8.TEXTUREFORMAT_DEPTH16,t.types&&(d=t.types),t.samplingModes&&(f=t.samplingModes),t.useSRGBBuffers&&(p=t.useSRGBBuffers));var m=e.width||e,g=e.height||e,x=null;(o||a||s)&&(x=_.createDepthStencilTexture(0,!1,a,1,l));var v=[],y=[],$=[];_._generateDepthBuffer=o,_._generateStencilBuffer=a,_._attachments=y,_._defaultAttachments=$;for(var b=0;b<u;b++){var T=f[b]||h,C=d[b]||c,S=p[b]||false;C!==_0x354cf8.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?C===_0x354cf8.TEXTURETYPE_HALF_FLOAT&&!this._caps.textureHalfFloatLinearFiltering&&(T=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE):T=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,C===_0x354cf8.TEXTURETYPE_FLOAT&&!this._caps.textureFloat&&(C=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,_Misc_logger__WEBPACK_IMPORTED_MODULE_1__.Logger.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type"));var w=new InternalTexture(this,InternalTextureSource.MultiRenderTarget);v.push(w),y.push(b+1),$.push(i?b+1:0===b?1:0),w.baseWidth=m,w.baseHeight=g,w.width=m,w.height=g,w.isReady=!0,w.samples=1,w.generateMipMaps=r,w.samplingMode=T,w.type=C,w._cachedWrapU=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,w._cachedWrapV=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,w._useSRGBBuffer=S,this._internalTexturesCache.push(w),this._textureHelper.createGPUTextureForInternalTexture(w)}return x&&(x.incrementReferences(),v.push(x),this._internalTexturesCache.push(x)),_.setTextures(v),_},_0x58fcf.prototype.updateMultipleRenderTargetTextureSampleCount=function(e,t){if(!e||!e.textures||e.textures[0].samples===t)return t;var i=e.textures.length;if(0===i)return 1;t=Math.min(t,this.getCaps().maxMSAASamples);for(var n=0;n<i;++n){var r=e.textures[n];this._textureHelper.createMSAATexture(r,t),r.samples=t}return e._depthStencilTexture&&e._depthStencilTexture!==e.textures[e.textures.length-1]&&(this._textureHelper.createMSAATexture(e._depthStencilTexture,t),e._depthStencilTexture.samples=t),t},_0x58fcf.prototype.bindAttachments=function(e){0!==e.length&&this._currentRenderTarget&&(this._mrtAttachments=e,this._currentRenderPass&&this._cacheRenderPipeline.setMRTAttachments(e))},_0x58fcf.prototype.buildTextureLayout=function(e){for(var t=[],i=0;i<e.length;i++)e[i]?t.push(i+1):t.push(0);return t},_0x58fcf.prototype.restoreSingleAttachment=function(){},_0x58fcf.prototype.restoreSingleAttachmentForRenderTarget=function(){};var _0x421850=(_0x4a42c2=!0,function(e,t){var i=_0x4a42c2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a42c2=!1,i}),_0x443a5e=_0x421850(void 0,(function(){return _0x443a5e.toString().search("(((.+)+)+)+$").toString().constructor(_0x443a5e).search("(((.+)+)+)+$")})),_0x4a42c2;_0x443a5e(),_0x58fcf.prototype.getGPUFrameTimeCounter=function(){return this._timestampQuery.gpuFrameTimeCounter},_0x58fcf.prototype.captureGPUFrameTime=function(e){this._timestampQuery.enable=e&&!!this._caps.timerQuery},_0x58fcf.prototype.createQuery=function(){return this._occlusionQuery.createQuery()},_0x58fcf.prototype.deleteQuery=function(e){return this._occlusionQuery.deleteQuery(e),this},_0x58fcf.prototype.isQueryResultAvailable=function(e){return this._occlusionQuery.isQueryResultAvailable(e)},_0x58fcf.prototype.getQueryResult=function(e){return this._occlusionQuery.getQueryResult(e)},_0x58fcf.prototype.getQueryResultFrameID=function(e){return this._occlusionQuery.getQueryResultFrameID()},_0x58fcf.prototype.beginOcclusionQuery=function(e,t){var i;return this.compatibilityMode?!!this._occlusionQuery.canBeginQuery&&(null===(i=this._currentRenderPass)||void 0===i||i.beginOcclusionQuery(t),!0):((0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget).addItem(new WebGPURenderItemBeginOcclusionQuery(t)),!0)},_0x58fcf.prototype.endOcclusionQuery=function(){var e;this.compatibilityMode?null===(e=this._currentRenderPass)||void 0===e||e.endOcclusionQuery():(0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget).addItem(new WebGPURenderItemEndOcclusionQuery);return this};var _0x218e61=(_0x31bd7c=!0,function(e,t){var i=_0x31bd7c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31bd7c=!1,i}),_0x4cd55f=_0x218e61(void 0,(function(){return _0x4cd55f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4cd55f).search("(((.+)+)+)+$")})),_0x31bd7c;function _0x131cdc(e,t,i,n){var r,o=1;n===_0x354cf8.TEXTURETYPE_FLOAT?r=new Float32Array(t*i*4):n===_0x354cf8.TEXTURETYPE_HALF_FLOAT?(r=new Uint16Array(t*i*4),o=15360):r=n===_0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER?new Uint32Array(t*i*4):new Uint8Array(t*i*4);for(var a=0;a<t;a++)for(var s=0;s<i;s++){var l=3*(s*t+a),u=4*(s*t+a);r[u+0]=e[l+0],r[u+1]=e[l+1],r[u+2]=e[l+2],r[u+3]=o}return r}_0x4cd55f(),_0x58fcf.prototype.createRawTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d){void 0===s&&(s=null),void 0===l&&(l=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),void 0===u&&(u=0),void 0===c&&(c=!1),void 0===h&&(h=1),void 0===d&&(d=1);var f=new InternalTexture(this,InternalTextureSource.Raw);return f.baseWidth=t,f.baseHeight=i,f.width=t,f.height=i,f.format=n,f.generateMipMaps=r,f.mipmapCount=h,f.samples=d,f.samplingMode=a,f.invertY=o,f._compression=s,f.type=l,f._useSRGBBuffer=c,!this._doNotHandleContextLost&&(f._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(f,t,i,void 0,u),this.updateRawTexture(f,e,n,o,s,l,c),this._internalTexturesCache.push(f),f},_0x58fcf.prototype.updateRawTexture=function(e,t,i,n,r,o,a,s){if(void 0===r&&(r=null),void 0===o&&(o=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),void 0===s&&(s=0),e){if(!this._doNotHandleContextLost&&(e._bufferView=t,e.invertY=n,e._compression=r,e._useSRGBBuffer=a),t){var l=e._hardwareTexture;i===_0x354cf8.TEXTUREFORMAT_RGB&&(t=_0x131cdc(t,e.width,e.height,o));var u=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(u,e,e.width,e.height,e.depth,l.format,0,s,n,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0}},_0x58fcf.prototype.updateSubRawTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){if(void 0===r&&(r=null),void 0===o&&(o=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),void 0===h&&(h=0),e){if(!this._doNotHandleContextLost&&(e._bufferView=t,e.invertY=n,e._compression=r,e._useSRGBBuffer=a),t){var d=e._hardwareTexture;i===_0x354cf8.TEXTUREFORMAT_RGB&&(t=_0x131cdc(t,s,l,o));var f=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(f,e,s,l,e.depth,d.format,0,h,n,!1,u,c),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0}},_0x58fcf.prototype.createRawCubeTexture=function(e,t,i,n,r,o,a,s){void 0===s&&(s=null);var l=new InternalTexture(this,InternalTextureSource.CubeRaw);return n!==_0x354cf8.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?n!==_0x354cf8.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering?n!==_0x354cf8.TEXTURETYPE_FLOAT||this._caps.textureFloatRender?n===_0x354cf8.TEXTURETYPE_HALF_FLOAT&&!this._caps.colorBufferFloat&&(r=!1,_0x41154e.Warn("Render to half float textures is not supported. Mipmap generation forced to false.")):(r=!1,_0x41154e.Warn("Render to float textures is not supported. Mipmap generation forced to false.")):(r=!1,a=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,_0x41154e.Warn("Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")):(r=!1,a=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,_0x41154e.Warn("Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")),l.isCube=!0,l.format=i===_0x354cf8.TEXTUREFORMAT_RGB?_0x354cf8.TEXTUREFORMAT_RGBA:i,l.type=n,l.generateMipMaps=r,l.width=t,l.height=t,l.samplingMode=a,!this._doNotHandleContextLost&&(l._bufferViewArray=e),l._cachedWrapU=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,l._cachedWrapV=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,this._textureHelper.createGPUTextureForInternalTexture(l),e&&this.updateRawCubeTexture(l,e,i,n,o,s),l},_0x58fcf.prototype.updateRawCubeTexture=function(e,t,i,n,r,o){void 0===o&&(o=null),e._bufferViewArray=t,e.invertY=r,e._compression=o;for(var a=e._hardwareTexture,s=i===_0x354cf8.TEXTUREFORMAT_RGB,l=[],u=0;u<t.length;++u){var c=t[u];s&&(c=_0x131cdc(t[u],e.width,e.height,n)),l.push(new Uint8Array(c.buffer,c.byteOffset,c.byteLength))}this._textureHelper.updateCubeTextures(l,a.underlyingResource,e.width,e.height,a.format,r,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder),e.isReady=!0},_0x58fcf.prototype.createRawCubeTextureFromUrl=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this;void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===h&&(h=!1);var f=this.createRawCubeTexture(null,i,n,r,!o,h,c,null);null==t||t._addPendingData(f),f.url=e,this._internalTexturesCache.push(f);return this._loadFile(e,(function(e){!function(e){var i=f.width,o=a(e);if(o){var u=[0,2,4,1,3,5];if(s)for(var c=n===_0x354cf8.TEXTUREFORMAT_RGB,p=s(o),_=f._hardwareTexture,m=[0,1,2,3,4,5],g=0;g<p.length;g++){for(var x=i>>g,v=[],y=0;y<6;y++){var $=p[g][m[y]];c&&($=_0x131cdc($,x,x,r)),v.push(new Uint8Array($.buffer,$.byteOffset,$.byteLength))}d._textureHelper.updateCubeTextures(v,_.underlyingResource,x,x,_.format,h,!1,0,0)}else{for(v=[],y=0;y<6;y++)v.push(o[u[y]]);d.updateRawCubeTexture(f,v,n,r,h)}f.isReady=!0,null==t||t._removePendingData(f),l&&l()}}(e)}),void 0,null==t?void 0:t.offlineProvider,!0,(function(e,i){null==t||t._removePendingData(f),u&&e&&u(e.status+" "+e.statusText,i)})),f},_0x58fcf.prototype.createRawTexture3D=function(e,t,i,n,r,o,a,s,l,u,c){void 0===l&&(l=null),void 0===u&&(u=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=0);var h=new InternalTexture(this,InternalTextureSource.Raw3D);return h.baseWidth=t,h.baseHeight=i,h.baseDepth=n,h.width=t,h.height=i,h.depth=n,h.format=r,h.type=u,h.generateMipMaps=o,h.samplingMode=s,h.is3D=!0,!this._doNotHandleContextLost&&(h._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(h,t,i,void 0,c),this.updateRawTexture3D(h,e,r,a,l,u),this._internalTexturesCache.push(h),h},_0x58fcf.prototype.updateRawTexture3D=function(e,t,i,n,r,o){if(void 0===r&&(r=null),void 0===o&&(o=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),!this._doNotHandleContextLost&&(e._bufferView=t,e.format=i,e.invertY=n,e._compression=r),t){var a=e._hardwareTexture;i===_0x354cf8.TEXTUREFORMAT_RGB&&(t=_0x131cdc(t,e.width,e.height,o));var s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(s,e,e.width,e.height,e.depth,a.format,0,0,n,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0},_0x58fcf.prototype.createRawTexture2DArray=function(e,t,i,n,r,o,a,s,l,u,c){void 0===l&&(l=null),void 0===u&&(u=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=0);var h=new InternalTexture(this,InternalTextureSource.Raw2DArray);return h.baseWidth=t,h.baseHeight=i,h.baseDepth=n,h.width=t,h.height=i,h.depth=n,h.format=r,h.type=u,h.generateMipMaps=o,h.samplingMode=s,h.is2DArray=!0,!this._doNotHandleContextLost&&(h._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(h,t,i,n,c),this.updateRawTexture2DArray(h,e,r,a,l,u),this._internalTexturesCache.push(h),h},_0x58fcf.prototype.updateRawTexture2DArray=function(e,t,i,n,r,o){if(void 0===r&&(r=null),void 0===o&&(o=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),!this._doNotHandleContextLost&&(e._bufferView=t,e.format=i,e.invertY=n,e._compression=r),t){var a=e._hardwareTexture;i===_0x354cf8.TEXTUREFORMAT_RGB&&(t=_0x131cdc(t,e.width,e.height,o));var s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(s,e,e.width,e.height,e.depth,a.format,0,0,n,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0};var _0x53c271=(_0x43ce33=!0,function(e,t){var i=_0x43ce33?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43ce33=!1,i}),_0x1b2c38=_0x53c271(void 0,(function(){return _0x1b2c38.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b2c38).search("(((.+)+)+)+$")})),_0x43ce33;_0x1b2c38(),_0x58fcf.prototype._readTexturePixels=function(e,t,i,n,r,o,a,s,l,u){void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===l&&(l=0),void 0===u&&(u=0);var c=e._hardwareTexture;return a&&this.flushFramebuffer(),this._textureHelper.readPixels(c.underlyingResource,l,u,t,i,c.format,n,r,o,s)},_0x58fcf.prototype._readTexturePixelsSync=function(){throw"_readTexturePixelsSync is unsupported in WebGPU!"};var _0xeb5e84=(_0xaf157c=!0,function(e,t){var i=_0xaf157c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xaf157c=!1,i}),_0x225739=_0xeb5e84(void 0,(function(){return _0x225739.toString().search("(((.+)+)+)+$").toString().constructor(_0x225739).search("(((.+)+)+)+$")})),_0xaf157c;function _0x2081e5(){var e=_0x34d578.call(this,arguments)||this;return e}_0x225739(),_0x34d578&&(_0x2081e5.__proto__=_0x34d578),_0x2081e5.prototype=Object.create(_0x34d578&&_0x34d578.prototype),_0x2081e5.prototype.constructor=_0x34d578;var _0x8e9ac4=(_0x2a1d70=!0,function(e,t){var i=_0x2a1d70?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a1d70=!1,i}),_0x1df769=_0x8e9ac4(void 0,(function(){return _0x1df769.toString().search("(((.+)+)+)+$").toString().constructor(_0x1df769).search("(((.+)+)+)+$")})),_0x2a1d70;_0x1df769(),_0x58fcf.prototype._createHardwareRenderTargetWrapper=function(e,t,i){var n=new _0x2081e5(e,t,i,this);return this._renderTargetWrapperCache.push(n),n},_0x58fcf.prototype.createRenderTargetTexture=function(e,t){var i,n=this._createHardwareRenderTargetWrapper(!1,!1,e),r={};void 0!==t&&"object"==typeof t?(r.generateMipMaps=t.generateMipMaps,r.generateDepthBuffer=void 0===t.generateDepthBuffer||t.generateDepthBuffer,r.generateStencilBuffer=r.generateDepthBuffer&&t.generateStencilBuffer,r.samplingMode=void 0===t.samplingMode?_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,r.creationFlags=null!==(i=t.creationFlags)&&void 0!==i?i:0,r.noColorTarget=!!t.noColorTarget):(r.generateMipMaps=t,r.generateDepthBuffer=!0,r.generateStencilBuffer=!1,r.samplingMode=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE,r.creationFlags=0,r.noColorTarget=!1);var o=r.noColorTarget?null:this._createInternalTexture(e,t,!0,InternalTextureSource.RenderTarget);return n._generateDepthBuffer=r.generateDepthBuffer,n._generateStencilBuffer=!!r.generateStencilBuffer,n.setTextures(o),(n._generateDepthBuffer||n._generateStencilBuffer)&&n.createDepthStencilTexture(0,void 0===r.samplingMode||r.samplingMode===_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE||r.samplingMode===_0x354cf8.TEXTURE_LINEAR_LINEAR||r.samplingMode===_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE||r.samplingMode===_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR||r.samplingMode===_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPNEAREST||r.samplingMode===_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPLINEAR||r.samplingMode===_0x354cf8.TEXTURE_NEAREST_LINEAR||r.samplingMode===_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST,n._generateStencilBuffer,n.samples),o&&(void 0!==t&&"object"==typeof t&&t.createMipMaps&&!r.generateMipMaps&&(o.generateMipMaps=!0),this._textureHelper.createGPUTextureForInternalTexture(o,void 0,void 0,void 0,r.creationFlags),void 0!==t&&"object"==typeof t&&t.createMipMaps&&!r.generateMipMaps&&(o.generateMipMaps=!1)),n},_0x58fcf.prototype._createDepthStencilTexture=function(e,t){var i=new InternalTexture(this,InternalTextureSource.DepthStencil),n=t.samples?t.samples:1,r=!t.generateStencil||t.generateStencil,o=!!t.bilinearFiltering&&t.bilinearFiltering,a=t.depthTextureFormat?t.depthTextureFormat:r?_0x354cf8.TEXTUREFORMAT_DEPTH24_STENCIL8:_0x354cf8.TEXTUREFORMAT_DEPTH32_FLOAT,s=t.comparisonFunction?t.comparisonFunction:0,l={};return l.comparisonFunction=s,l.generateStencil=r,l.bilinearFiltering=o,l.samples=n,l.depthTextureFormat=a,i.format=l.depthTextureFormat,this._setupDepthStencilTexture(i,e,l.generateStencil,l.bilinearFiltering,l.comparisonFunction,l.samples),this._textureHelper.createGPUTextureForInternalTexture(i),this._internalTexturesCache.push(i),i},_0x58fcf.prototype._setupDepthStencilTexture=function(e,t,i,n,r,o){void 0===o&&(o=1);var a=t.width||t,s=t.height||t,l=t.layers||0;e.baseWidth=a,e.baseHeight=s,e.width=a,e.height=s,e.is2DArray=l>0,e.depth=l,e.isReady=!0,e.samples=o,e.generateMipMaps=!1,e.samplingMode=n?_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE:_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,e.type=_0x354cf8.TEXTURETYPE_FLOAT,e._comparisonFunction=r,e._cachedWrapU=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,e._cachedWrapV=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE},_0x58fcf.prototype.updateRenderTargetTextureSampleCount=function(e,t){return e&&e.texture&&e.samples!==t?(t=Math.min(t,this.getCaps().maxMSAASamples),this._textureHelper.createMSAATexture(e.texture,t),e._depthStencilTexture&&(this._textureHelper.createMSAATexture(e._depthStencilTexture,t),e._depthStencilTexture.samples=t),e.texture.samples=t,t):t};var _0x5714a9=(_0x350f87=!0,function(e,t){var i=_0x350f87?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x350f87=!1,i}),_0x28556b=_0x5714a9(void 0,(function(){return _0x28556b.toString().search("(((.+)+)+)+$").toString().constructor(_0x28556b).search("(((.+)+)+)+$")})),_0x350f87;_0x28556b(),_0x58fcf.prototype.createRenderTargetCubeTexture=function(e,t){var i=this._createHardwareRenderTargetWrapper(!1,!0,e),n=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:_constants__WEBPACK_IMPORTED_MODULE_2__.Constants.TEXTURETYPE_UNSIGNED_INT,samplingMode:_constants__WEBPACK_IMPORTED_MODULE_2__.Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,format:_constants__WEBPACK_IMPORTED_MODULE_2__.Constants.TEXTUREFORMAT_RGBA,samples:1},t);n.generateStencilBuffer=n.generateDepthBuffer&&n.generateStencilBuffer,i._generateDepthBuffer=n.generateDepthBuffer,i._generateStencilBuffer=n.generateStencilBuffer;var r=new InternalTexture(this,InternalTextureSource.RenderTarget);return r.width=e,r.height=e,r.depth=0,r.isReady=!0,r.isCube=!0,r.samples=n.samples,r.generateMipMaps=n.generateMipMaps,r.samplingMode=n.samplingMode,r.type=n.type,r.format=n.format,this._internalTexturesCache.push(r),i.setTextures(r),(i._generateDepthBuffer||i._generateStencilBuffer)&&i.createDepthStencilTexture(0,void 0===n.samplingMode||n.samplingMode===_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE||n.samplingMode===_0x354cf8.TEXTURE_LINEAR_LINEAR||n.samplingMode===_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE||n.samplingMode===_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR||n.samplingMode===_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPNEAREST||n.samplingMode===_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPLINEAR||n.samplingMode===_0x354cf8.TEXTURE_NEAREST_LINEAR||n.samplingMode===_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST,i._generateStencilBuffer,i.samples),t&&t.createMipMaps&&!n.generateMipMaps&&(r.generateMipMaps=!0),this._textureHelper.createGPUTextureForInternalTexture(r),t&&t.createMipMaps&&!n.generateMipMaps&&(r.generateMipMaps=!1),i};var _0x143307=(_0x3dee1e=!0,function(e,t){var i=_0x3dee1e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3dee1e=!1,i}),_0x4c8602=_0x143307(void 0,(function(){return _0x4c8602.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c8602).search("(((.+)+)+)+$")})),_0x3dee1e;_0x4c8602(),_0x58fcf.prototype.setTextureSampler=function(e,t){var i;null===(i=this._currentMaterialContext)||void 0===i||i.setSampler(e,t)};var _0x90dfbd=(_0x510759=!0,function(e,t){var i=_0x510759?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x510759=!1,i}),_0xa73a62=_0x90dfbd(void 0,(function(){return _0xa73a62.toString().search("(((.+)+)+)+$").toString().constructor(_0xa73a62).search("(((.+)+)+)+$")})),_0x510759;_0xa73a62(),_0x3a7b63.prototype.setStorageBuffer=function(e,t){this._engine.setStorageBuffer(e,t)},_0x58fcf.prototype.createStorageBuffer=function(e,t){return this._createBuffer(e,t|_0x354cf8.BUFFER_CREATIONFLAG_STORAGE)},_0x58fcf.prototype.updateStorageBuffer=function(e,t,i,n){var r,o=e;void 0===i&&(i=0),void 0===n?n=(r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t).byteLength:r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t,this._bufferManager.setSubData(o,i,r,0,n)},_0x58fcf.prototype.readFromStorageBuffer=function(e,t,i,n){var r=this;i=i||e.capacity;var o=this._bufferManager.createRawBuffer(i,_0x572d87.BufferUsage.MapRead|_0x572d87.BufferUsage.CopyDst);return this._renderTargetEncoder.copyBufferToBuffer(e.underlyingResource,null!=t?t:0,o,0,i),new Promise((function(e,t){r.onEndFrameObservable.addOnce((function(){o.mapAsync(_0x572d87.MapMode.Read,0,i).then((function(){var t=o.getMappedRange(0,i),a=n;if(void 0===a)(a=new Uint8Array(i)).set(new Uint8Array(t));else{var s=a.constructor;(a=new s(a.buffer)).set(new s(t))}o.unmap(),r._bufferManager.releaseBuffer(o),e(a)}),(function(e){return t(e)}))}))}))},_0x58fcf.prototype.setStorageBuffer=function(e,t){var i,n;null===(i=this._currentDrawContext)||void 0===i||i.setBuffer(e,null!==(n=null==t?void 0:t.getBuffer())&&void 0!==n?n:null)};var _0x1997c0=(_0x52faae=!0,function(e,t){var i=_0x52faae?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x52faae=!1,i}),_0x46abd2=_0x1997c0(void 0,(function(){return _0x46abd2.toString().search("(((.+)+)+)+$").toString().constructor(_0x46abd2).search("(((.+)+)+)+$")})),_0x52faae;_0x46abd2(),_0x58fcf.prototype.createUniformBuffer=function(e){var t;return t=e instanceof Array?new Float32Array(e):e,this._bufferManager.createBuffer(t,_0x572d87.BufferUsage.Uniform|_0x572d87.BufferUsage.CopyDst)},_0x58fcf.prototype.createDynamicUniformBuffer=function(e){return this.createUniformBuffer(e)},_0x58fcf.prototype.updateUniformBuffer=function(e,t,i,n){void 0===i&&(i=0);var r,o=e;void 0===n?n=(r=t instanceof Float32Array?t:new Float32Array(t)).byteLength:r=t instanceof Float32Array?t:new Float32Array(t),this._bufferManager.setSubData(o,i,r,0,n)},_0x58fcf.prototype.bindUniformBufferBase=function(e,t,i){this._currentDrawContext.setBuffer(i,e)},_0x58fcf.prototype.bindUniformBlock=function(){};var _0xf092a3=(_0x39aefe=!0,function(e,t){var i=_0x39aefe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39aefe=!1,i}),_0x398c23=_0xf092a3(void 0,(function(){return _0x398c23.toString().search("(((.+)+)+)+$").toString().constructor(_0x398c23).search("(((.+)+)+)+$")})),_0x39aefe;function _0x1a6f0d(e){return!(!e||void 0===e.underlyingResource)}function f$8(e,t,i){var n=i$i.call(this,e,t)||this;n._engine=i;var r=i.caps;n._drawBuffers=r.drawBuffersExtension,e$1T._maximumCombinedTextureImageUnits=r.maxCombinedTexturesImageUnits,e$1T._maximumCubeMapSize=u$_(r.maxCubemapTextureSize,8192),e$1T._maximumFragmentUniformVectors=r.maxFragmentUniformVectors,e$1T._maximumTextureImageUnits=u$_(r.maxTexturesImageUnits,16),e$1T._maximumRenderbufferSize=u$_(r.maxRenderTextureSize,4096),e$1T._maximumTextureSize=u$_(r.maxTextureSize,4096),e$1T._maximumVaryingVectors=u$_(r.maxVaryingVectors,16),e$1T._maximumVertexAttributes=u$_(r.maxVertexAttribs,16),e$1T._maximumVertexTextureImageUnits=u$_(r.maxVertexTextureImageUnits,16),e$1T._maximumVertexUniformVectors=u$_(r.maxVertexUniformVectors,256),e$1T._minimumAliasedLineWidth=1,e$1T._maximumAliasedLineWidth=1,e$1T._minimumAliasedPointSize=1,e$1T._maximumAliasedPointSize=1,e$1T._maximumViewportWidth=32767,e$1T._maximumViewportHeight=32767,e$1T._highpFloatSupported=r.highPrecisionShaderSupported,e$1T._highpIntSupported=r.highPrecisionShaderSupported,e$1T._maximumTextureFilterAnisotropy=r.maxAnisotropy,e$1T._maximumDrawBuffers=n.drawBuffers?16:1,e$1T._maximumColorAttachments=n.drawBuffers?16:1,e$1T._maximumSamples=r.maxMSAASamples,n._antialias=!0,n._standardDerivatives=r.standardDerivatives,n._blendMinmax=r.blendMinMax,n._elementIndexUint=!0,n._depthTexture=r.depthTextureExtension,n._fragDepth=r.fragmentDepthSupported,n._debugShaders=!1;var o=r.textureLOD;n._textureFloat=r.textureFloat,n._textureHalfFloat=r.textureHalfFloat,n._textureFloatLinear=r.textureFloatLinearFiltering,n._textureHalfFloatLinear=r.textureHalfFloatLinearFiltering,n._sysShaderDefines=[],e$2b(n._standardDerivatives)&&n._standardDerivatives&&n._sysShaderDefines.push("GL_OES_standard_derivatives"),e$2b(n._fragDepth)&&n._fragDepth&&n._sysShaderDefines.push("GL_EXT_frag_depth"),e$2b(o)&&n._sysShaderDefines.push("GL_EXT_shader_texture_lod"),n._sysShaderDefines.push("WEBGPU"),n._colorBufferFloat=r.colorBufferFloat,n._floatBlend=!0,n._colorBufferHalfFloat=r.textureHalfFloat,n._s3tc=r.s3tc,n._pvrtc=r.pvrtc,n._etc1=r.etc1,n._astc=r.astc,n._etc=r.etc1,n._bc7=r.bptc,f$S.setKTX2SupportedFormats(n._s3tc,n._pvrtc,n._astc,n._etc,n._etc1,n._bc7),n.webglOptions={},i.saveCompiledShaderInIndexDB=!1,p$1d.halfZRange=!0}function B$4(e,t,i,n,r,o,a){var s=e._currentRenderState,l=e._currentPassState,u=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,d$1m.partialApply(e._engine,s,t,l,i,u,i.viewport,n,r,o,a)}function b$8(e,t){t!==e._currentFramebuffer&&(e._currentFramebuffer=t,e$2b(t)?t._bind():e.engine.restoreDefaultFramebuffer())}_0x398c23(),_0x58fcf.prototype.updateVideoTexture=function(e,t,i){var n,r=this;if(e&&!e._isDisabled){void 0===this._videoTextureSupported&&(this._videoTextureSupported=!0);var o=e._hardwareTexture;!(null===(n=e._hardwareTexture)||void 0===n?void 0:n.underlyingResource)&&(o=this._textureHelper.createGPUTextureForInternalTexture(e)),_0x1a6f0d(t)?(this._textureHelper.copyVideoToTexture(t,e,o.format,!i),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder),e.isReady=!0):t&&this.createImageBitmap(t).then((function(t){r._textureHelper.updateTexture(t,e,e.width,e.height,e.depth,o.format,0,0,!i,!1,0,0),e.generateMipMaps&&r._generateMipmaps(e,r._uploadEncoder),e.isReady=!0})).catch((function(){e.isReady=!0}))}},i$i&&(f$8.__proto__=i$i),f$8.prototype=Object.create(i$i&&i$i.prototype),f$8.prototype.constructor=i$i,Object.defineProperties(f$8.prototype,{webgl2:{get:function(){return null}},webgpu:{get:function(){return!0}},engine:{get:function(){return this._engine}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return!0}},antialias:{get:function(){return this._antialias}},standardDerivatives:{get:function(){return!0}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},floatTextureSixPlaces:{get:function(){return!0}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},etc1:{get:function(){return this._etc1}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=wrapGL(this._originalGLContext,e?throwOnError:void 0)}},drawingBufferHeight:{get:function(){return this._engine.getRenderHeight(!0)}},drawingBufferWidth:{get:function(){return this._engine.getRenderWidth(!0)}},realDrawingBufferHeight:{get:function(){return this._engine.getRenderHeight(!0)}},realDrawingBufferWidth:{get:function(){return this._engine.getRenderWidth(!0)}}});var P$6=new t$X;function R$5(e,t,i,n,r){b$8(e,t);var o=e.drawingBufferWidth,a=e.drawingBufferHeight;e$2b(t)&&(o=t.textureSize.width,a=t.textureSize.height),B$4(e,r,i,!1,o,a,t),n._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,n.maximumTextureUnitIndex)}function A$7(e,t,i,n){var r=t._primitiveType,o=t._vertexArray,a=t._offset,s=t.instanceCount,l=e._engine;e._us.model=u$_(t._modelMatrix,p$1d.IDENTITY),e._us.useRelativeOrigin=t.useRelativeOrigin,i._setUniforms(n,e._us,e.validateShaderProgram,t),o._bind();var u=R$$.toFillMode(r),c=t.occlusionQueryID;const h=e._engine.currentRenderPassId;c&&(void 0===e._renderPassIdForOcclusionQuery&&(e._renderPassIdForOcclusionQuery=l.createRenderPassId("Render pass for occlusion query")),l.currentRenderPassId=e._renderPassIdForOcclusionQuery,l._getCurrentRenderPass(),l.beginOcclusionQuery(null,c));var d=o.indexBuffer;if(e$2b(d)){const i=t._count||d.numberOfIndices;e._trangleCount+=i/3,l.drawElementsType(u,a,i,s,t)}else{const e=t._count||o.numberOfVertices;l.drawArraysType(u,a,e,s,t)}c&&(l.endOcclusionQuery(),l.currentRenderPassId=h)}f$8.prototype.clear=function(e,t){e=u$_(e,P$6),t=u$_(t,this._defaultPassState);var i=e.color,n=e.depth,r=e.stencil,o=null;e$2b(i)&&((o={}).r=i.red,o.g=i.green,o.b=i.blue,o.a=i.alpha);var a=!1;e$2b(n)&&(n!==this._clearDepth&&(this._clearDepth=n),a=!0);var s=!1;e$2b(r)&&(r!==this._clearStencil&&(this._clearStencil=r),s=!0);var l=u$_(e.framebuffer,t.framebuffer);b$8(this,l);var u=this.drawingBufferWidth,c=this.drawingBufferHeight;B$4(this,u$_(e.renderState,this._defaultRenderState),t,!0,u,c,l);this._engine.clear(o,!0,a,s),this._engine.flushFramebuffer()},f$8.prototype.draw=function(e,t,i,n){t=u$_(t,this._defaultPassState);var r=u$_(e._framebuffer,t.framebuffer),o=u$_(e._renderState,this._defaultRenderState);i=u$_(i,e._shaderProgram),n=u$_(n,e._uniformMap),i._isReady()||i._createEffect(),e$2b(r)?e.setActiveFrameBufferID(r._inner.id):e.setActiveFrameBufferID(0),R$5(this,r,t,i,o),A$7(this,e,i,n)},f$8.prototype.endFrame=function(){this._engine.beginFrame(),this._engine.endFrame()};var g$8=new Array;f$8.prototype.readPixels=function(e){return console.log("webgpu use readPixelsAsync instead."),g$8[0]=0,g$8[1]=0,g$8[2]=0,g$8[3]=0,g$8},f$8.prototype.readPixelsAsync=function(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=Math.max(u$_(e.x,0),0),i=Math.max(u$_(e.y,0),0),n=u$_(e.width,this.drawingBufferWidth),r=u$_(e.height,this.drawingBufferHeight),o=e.framebuffer;if(o$1q.typeOf.number.greaterThan("readState.width",n,0),o$1q.typeOf.number.greaterThan("readState.height",r,0),e$2b(o)){var a=o.getColorTexture(0)._inner.internalTexture._hardwareTexture;return this._engine.flushFramebuffer(),this._engine._textureHelper.readPixels(a.underlyingResource,t,i,n,r,a.format,0,0,null,!1)}return b$8(this,o),this._engine.readPixels(t,i,n,r)},f$8.prototype.resize=function(){this._engine.resize(!0)},f$8.prototype.isDestroyed=function(){return!1},f$8.prototype.destroy=function(){return i$i.prototype.destroy.call(this),i$10(this)};var ke=new r$T("MapQuest, SuperMap iServer Imagery"),Z$5=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652,.007089059829027304,.014178119658054609,.028356239316109217,.056712478632218434,.11342495726443687,.2684991452887374],ne$3=[1.690163571602655e-9,3.38026990562e-9,6.76053981124e-9,1.352107962249e-8,2.704215924497e-8,5.408431848995e-8,1.0816863697989e-7,2.1633727395979e-7,4.3267454791958e-7,8.6534909583916e-7,173069819167831e-20,346139638335662e-20,692279276671324e-20,1384558553342649e-20,2769117106685297e-20,5538234213370595e-20,.0001107646842674119,.0002215293685348238,.0004430587370696476,.0008861174741392952,.0017722349482785903,.0035444698965571807,.007088939793114361],H$4=function(e){if(!e$2b((e=u$_(e,{})).url))throw new t$16("options.url is required.");this._baseUrl=e.url;var t=(n=e.url).substring(0,n.indexOf("/datas"));this.tablename=n.substring(n.indexOf("datas/")+6,n.length);var i=this;new l$15({name:t+this.tablename}).then((function(e){e.checkObjectStoreExit(i.tablename)?i._indexedDBScheduler=e:e.createObjectStore(i.tablename).then((function(){i._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){i._indexedDBScheduler.clear(i.tablename)},cache:[]},this.isSci3D=!1,this.isTileMap=u$_(e.isTileMap,!1);var n=n$18(e.url);if(this._packingRequest=e.packingRequest,n.indexOf("rest/maps")>-1?(this.isTileMap=!0,this.layersID=e.layersID):n.indexOf("rest/realspace")>-1&&(this.isSci3D=!0),this._url=n,this._resource=t$11.createIfNeeded(n),this._resolution=e$2b(e.highResolution)?2:1,this._transparent=u$_(e.transparent,!0),this._name=e.name||"",this._urlTemplate=void 0,this._errorEvent=new o$1h,this._fileExtension="png",this._tileWidth=256,this._tileHeight=256,this._tileFormat=e.tileFormat||"png",this._scales=Z$5,this._rasterfunction=u$_(e.rasterfunction,void 0),this._regions=e.regions,this._cache=u$_(e._cache,!0),this._isBlock=!1,this._blockCache={},this._blockCacheQueue=new r$Q,this._blockCacheSize=100,this._blockScale=0,this._tileversion=u$_(e.tileversion,""),this._minimumLevel=u$_(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=void 0,this._tilingScheme=e.tilingScheme,this._subdomains=e.subdomains,e$2b(e.tilingScheme)&&e$2b(e.tilingScheme._scaleDenominators)){this._scales=[];for(var r=0;r<e.tilingScheme._scaleDenominators.length;r++)this._scales[r]=1/e.tilingScheme._scaleDenominators[r]}this._flipY=!1,this._tileDiscardPolicy=e.tileDiscardPolicy,this._fRatio=u$_(e.ratio,e$2a.DEGREES_PER_RADIAN/t$13.WGS84.maximumRadius),this._coordUnit="DEGREE",this._customRequestHeaders=e.customRequestHeaders;var o=u$_(e.credit,ke);this._cacheKey=u$_(e.cacheKey,""),this._cacheEnabled=u$_(e.cacheEnabled,!0),"string"==typeof o&&(o=new r$T(o)),this._credit=o,this._ready=!1,this._readyPromise=o$1l.defer();i=this;e$2b(this._subdomains)&&(n=n.replace(/({.*?})/g,(function(e,t){if(!e$2b(i._subdomains.length))throw new t$16("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?i._subdomains[0]:e}))),this._layerStatusParameters=u$_(e.layerStatusParameters,void 0),this._layerStatusParametersID=void 0;var a,s=!0;function l(){if(i.isTileMap){var e=n.slice(0,-1)+".json";e$2b(a$O.CREDENTIAL)&&(e=e$2b(a$O.CREDENTIAL._keymap[i._baseUrl])?a$O.addTokenWithKey(i._baseUrl,e):a$O.addToken(e)),LicenseChecker.LICENSECHECKER.getLicense(e).then((function(e){LicenseChecker.LICENSECHECKER.check(e)}));var t=u$Q(e,i.customRequestHeaders);o$1l.all([t,s]).then(c,h)}else{var r=n+"config";e$2b(a$O.CREDENTIAL)&&(r=e$2b(a$O.CREDENTIAL._keymap[i._baseUrl])?a$O.addTokenWithKey(i._baseUrl,r):a$O.addToken(r)),LicenseChecker.LICENSECHECKER.getLicense(r).then((function(e){LicenseChecker.LICENSECHECKER.check(e)})),o$1l.all([u$R(r,i._customRequestHeaders),s]).then(u,h)}}function u(t){var n=function(e){var t=(e=d.parseFromString(e,"application/xml")).childNodes[0],n="http://www.supermap.com/SuperMapCache/sci3d",r=u$_(Ke(t,"xmlns:sml"),n);P$5(t,"Version",r);var o=je(F$4(t,"StoreType",r),"BlockScale");"number"==typeof o&&(i._isBlock=!0,i._blockScale=o);for(var a=Ae$2(F$4(t,"Levels",r),"Level",r),s=[],l=0,u=a.length;l<u;l++)s.push(parseInt(a[l].textContent,10));var c=F$4(t,"Bounds",r),h=P$5(c,"Left",r),f=P$5(c,"Right",r),p=P$5(c,"Top",r),_=P$5(c,"Bottom",r),m=ue$1(t,"FileExtentName",r),g=P$5(t,"CellWidth",r),x=P$5(t,"CellHeight",r),v=ue$1(t,"CacheName",r);return i._name||(i._name=v||""),{left:h,right:f,top:p,bottom:_,fileExtentName:m,levels:s,imageSizeWidth:g,imageSizeHeight:x}}(t[0]);i._fileExtension=u$_(n.fileExtentName,"png"),i._tileWidth=u$_(n.imageSizeWidth,256),i._tileHeight=u$_(n.imageSizeHeight,256);var r=n.levels,o=r.length;i._minimumLevel=u$_(r[0],0),i._maximumLevel=u$_(i._maximumLevel,r[o-1]),e$2b(i._tilingScheme)||(i._tilingScheme=new g$13({ellipsoid:e.ellipsoid}));var a,s,l,u,c=i._tilingScheme;e$2b(i._rectangle)||e$2b(n.left)&&e$2b(n.right)&&e$2b(n.top)&&e$2b(n.bottom)&&(a=e$2a.toRadians(n.left),l=e$2a.toRadians(n.right),s=e$2a.toRadians(n.bottom),u=e$2a.toRadians(n.top),a>Math.PI&&(o$1p.globalOffset.x=Math.floor(a/Math.PI)*Math.PI,a-=o$1p.globalOffset.x,l-=o$1p.globalOffset.x,o$1p.globalOffset.x*=6378137),u>.5*Math.PI&&(o$1p.globalOffset.y=Math.floor((u+.5*Math.PI)/Math.PI)*Math.PI,u-=o$1p.globalOffset.y,s-=o$1p.globalOffset.y,o$1p.globalOffset.y*=6378137),i._rectangle=new h$18(a,s,l,u));i._rectangle.west<c.rectangle.west&&(i._rectangle.west=c.rectangle.west),i._rectangle.east>c.rectangle.east&&(i._rectangle.east=c.rectangle.east),i._rectangle.south<c.rectangle.south&&(i._rectangle.south=c.rectangle.south),i._rectangle.north>c.rectangle.north&&(i._rectangle.north=c.rectangle.north);var h=c.positionToTileXY(h$18.southwest(i._rectangle),i._minimumLevel),f=c.positionToTileXY(h$18.northeast(i._rectangle),i._minimumLevel);(Math.abs(f.x-h.x)+1)*(Math.abs(f.y-h.y)+1)>4&&(i._minimumLevel=0),i._tilingScheme=c,i._urlTemplate=i._url+"data/index/{y}/{x}.{fileExtension}?level={level}",i._ready=!0,i._readyPromise.resolve(!0)}function c(t){var n=t[0],r=n.prjCoordSys.coordUnit;i._coordUnit=r;var o=n.prjCoordSys.epsgCode,a=n.bounds,s=n.visibleScales;if(i.customScales=s&&s.length>0,"DEGREE"==r){var l=3857==o?85:90,u=i._resolution;if(i._tilingScheme=new g$13({numberOfLevelZeroTilesX:2*u,numberOfLevelZeroTilesY:u}),a.left=e$2a.clamp(a.left,-180,180),a.bottom=e$2a.clamp(a.bottom,-l,l),a.right=e$2a.clamp(a.right,-180,180),a.top=e$2a.clamp(a.top,-l,l),e$2a.equalsEpsilon(a.left,a.right,e$2a.EPSILON7)&&(a.right+=e$2a.EPSILON5),e$2a.equalsEpsilon(a.top,a.bottom,e$2a.EPSILON7)&&(a.top+=e$2a.EPSILON5),i._rectangle=h$18.fromDegrees(a.left,a.bottom,a.right,a.top),i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-180,"y":90}{tileversion}',(s=u$_(e.scales,s)).length>0){var c=[];for(var h=i.customScales?0:u;h<s.length;h++)c.push(1/s[h]);i._tilingScheme._scaleDenominators=c,n.dpi&&(i._tilingScheme._customDPI=new o$1o(n.dpi,n.dpi)),i._tilingScheme._rectangle=i._rectangle,i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":'+a.left+',"y":'+a.top+"}{tileversion}",i._maximumLevel=c.length}}else{var d=new o$1p(a.left,a.bottom,0);d.x>20037508.342789244&&(o$1p.globalOffset.x=20037508.342789244*Math.floor(d.x/20037508.342789244),d.x=d.x-o$1p.globalOffset.x),d.y>10018754.171394622&&(o$1p.globalOffset.y=20037508.342789244*Math.floor((d.y+10018754.171394622)/20037508.342789244),d.y=d.y-o$1p.globalOffset.y);var f=new o$1p(a.right,a.top,0);if(f.x=Math.min(20037508.342789244,f.x-o$1p.globalOffset.x),f.y=Math.min(20037508.342789244,f.y-o$1p.globalOffset.y),e$2b(i._tilingScheme)){c=[];if(i._tilingScheme._scaleDenominators)c=i._tilingScheme._scaleDenominators;else for(h=0;h<s.length;h++)c.push(1/s[h]);i._tilingScheme._scaleDenominators=c,n.dpi&&(i._tilingScheme._customDPI=new o$1o(n.dpi,n.dpi)),i._tilingScheme._rectangleNortheastInMeters=f,i._tilingScheme._rectangleSouthwestInMeters=d;var p=i._tilingScheme._projection.unproject(d),_=i._tilingScheme._projection.unproject(f);if(i._tilingScheme._rectangle=new h$18(p.longitude,p.latitude,_.longitude,_.latitude),s.length>0){var m=s[0];u=.0254/(n.dpi*m);i._tilingScheme._numberOfLevelZeroTilesX=Math.ceil((f.x-d.x)/u/n.viewer.width),i._tilingScheme._numberOfLevelZeroTilesY=Math.ceil((f.y-d.y)/u/n.viewer.height)}}else{var g,x,v=e$2b(n.prjCoordSys)&&(3857==n.prjCoordSys.epsgCode||e$2b(n.prjCoordSys.projection)&&("PRJ_SPHERE_MERCATOR"===n.prjCoordSys.projection.type||"PRJ_TRANSVERSE_MERCATOR"===n.prjCoordSys.projection.type)),y=v?new t$O:new n$1b;c=[];if(!v){for(h=0;h<s.length;h++)c.push(1/s[h]);if(s.length>0){n.viewBounds.rightTop,n.viewBounds.leftBottom;m=s[0],u=.0254/(n.dpi*m);g=Math.ceil((f.x-d.x)/u/n.viewer.width),x=Math.ceil((f.y-d.y)/u/n.viewer.height)}}!v&&s.length>0?i._tilingScheme=new c$R({numberOfLevelZeroTilesX:g,numberOfLevelZeroTilesY:x,projection:y,rectangleSouthwestInMeters:d,rectangleNortheastInMeters:f,customDPI:new o$1o(n.dpi,n.dpi),scaleDenominators:c}):i._tilingScheme=new c$R({projection:y})}p=i._tilingScheme._projection.unproject(d),_=i._tilingScheme._projection.unproject(f);i._rectangle=new h$18(p.longitude,p.latitude,_.longitude,_.latitude),!v&&(s.length>0||c.length>0)?i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":'+a.left+',"y":'+a.top+"}{tileversion}":i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-20037508.342789248 ,"y":20037508.342789095}{tileversion}'}if(e$2b(s)&&Array.isArray(s)&&s.length>1)if(i._tilingScheme.projection instanceof n$1b)i._scales=s,i._maximumLevel=s.length-1-i._resolution;else{var $=s[s.length-1];i._maximumLevel=Le$2(i,$),e$2b(n.prjCoordSys.name)&&n.prjCoordSys.name.indexOf("Beijing")>-1&&n.prjCoordSys.name.indexOf("1954")>-1&&(i._scales=ne$3)}else e$2b(i._maximumLevel)||(i._maximumLevel=i._scales.length-1);"GCS_Beijing_1954"===n.prjCoordSys.name&&(!e$2b(s)||0==s.length)&&(i._scales=ne$3),i._urlTemplate=i._urlTemplate.replace("{transparent}",i._transparent),i._urlTemplate=i._urlTemplate.replace("{_cache}",i._cache),e$2b(i._rasterfunction)&&(i._urlTemplate=i._urlTemplate+"&rasterfunction={rasterfunction}"),i.layersID&&(i._urlTemplate=i._urlTemplate+"&layersID="+i.layersID),e$2b(i._regions)&&(i._urlTemplate=i._urlTemplate+"®ions="+i._regions),i._rectangle||(i._rectangle=u$_(e.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._readyPromise.resolve(!0)}function h(e){var t="An error occurred while accessing "+i._url+".";a=l$W.handleError(a,i,i._errorEvent,t,void 0,void 0,void 0,l),i._readyPromise.reject(new t$14(t))}this._layerStatusParameters&&(s=le$3(this)),l();var d=new DOMParser};function le$3(e){var t=o$1l.defer(),i=new r$1b,n=e._url+"tempLayersSet.jsonp";return e$2b(a$O.CREDENTIAL)&&(n=a$O.addToken(n)),d$V(n,{parameters:{_method:"POST",requestEntity:null,sectionCount:1,sectionIndex:0,jsonpUserID:Date.now()}},i),i.deferred.then((function(i){for(var n=[],r=0;r<e._layerStatusParameters.length;r++){var o=e._layerStatusParameters[r];n.push({type:"UGC",name:o.layerName,visible:!!o.isVisible,displayFilter:o.displayFilter||""})}var a=e._url.slice(0,-1),s=a.lastIndexOf("/"),l=e._baseUrl+i.newResourceLocation.substring(i.newResourceLocation.indexOf("/tempLayersSet"));e$2b(a$O.CREDENTIAL)&&(l=a$O.addToken(l));var u=t$11.createIfNeeded(l),c=[{type:"UGC",visible:!0,subLayers:{layers:n},name:a.slice(s+1)}];u.put(JSON.stringify(c)).then((function(){e._layerStatusParametersID=i.newResourceID,t.resolve(e._layerStatusParametersID)})).otherwise((function(){t.resolve(void 0)}))})),t.promise}function Le$2(e,t){for(var i=e._scales.length;i--;)if(e._scales[i]<=t)return i}function $$4(e,t,i,n,r){var o;if(e.isTileMap){var a,s=""===e._tileversion?"":"&tileversion="+e._tileversion;if("DEGREE"===e._coordUnit)if(1===e.packingRequest)o=e._urlTemplate.replace("&x={x}&y={y}&scale={scale}","").replace("{tileversion}",s).replace("tileImage","tileImages").replace("&_cache=true","");else{let r=e.customScales?0:e.resolution;a=e._scales[n+r]||Z$5[n],o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{scale}",a.toString()).replace("{tileversion}",s)}else"METER"===e._coordUnit&&(1===e.packingRequest?o=e._urlTemplate.replace("&x={x}&y={y}&scale={scale}","").replace("{tileversion}",s).replace("tileImage","tileImages").replace("&_cache=true",""):(a=e._scales[n],o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{scale}",a.toString()).replace("{tileversion}",s)))}else o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{level}",n).replace("{fileExtension}",e._fileExtension);if(e$2b(e._subdomains)){var l=e._subdomains,u=l[(t+i+n)%l.length];o=o.replace(Oe$1,(function(e,t){return"{s}"===t?u:e}))}return e$2b(a$O.CREDENTIAL)&&(o=a$O.addToken(o)),o}function U$5(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function se$1(e,t,i,n){var r=e._blockScale,o=Math.pow(2,r),a=Math.floor(t/o),s=t%o,l=Math.floor(i/o),u=i%o;return{x:a,y:l,url:$$4(e,a,l,n),col:s,row:u,level:n,blockSize:o}}Object.defineProperties(H$4.prototype,{url:{get:function(){return this._url}},name:{get:function(){return this._name},set:function(e){this._name=e}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},tileFormat:{get:function(){return this._tileFormat}},tileversion:{get:function(){return this._tileversion}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return 1===this.resolution?this._maximumLevel:this._maximumLevel-1}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},ratio:{get:function(){return this._fRatio},set:function(e){this._fRatio=e}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},resolution:{get:function(){return this._resolution}},flipY:{get:function(){return this._flipY},set:function(e){this._flipY=e}},packingRequest:{get:function(){return this._packingRequest}},isBlock:{get:function(){return this._isBlock}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2b(e)&&!e$2b(e.length))throw new t$16("Excepted SuperMapImageryProvider.subdomains to be type of Array.");this._subdomains=e}},layerStatusParameters:{get:function(){return this._layerStatusParameters}}}),H$4.prototype.setLayerStatusParameters=function(e){if(!e$2b(e))throw new t$16("Parameter is required.");if(!e$2b(e.length))throw new t$16("Expected parameter to be type of Array.");return this._layerStatusParameters=e,le$3(this)},H$4.prototype.getTileCredits=function(e,t,i){};var Oe$1=/({.*?})/g;H$4.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=$$4(this,e,t,i);if(this.isSci3D){var o=1<<i;r=$$4(this,e+o$1p.globalOffset.x/(6378137*Math.PI)*o,t+o$1p.globalOffset.y/(6378137*Math.PI)*o,i)}e$2b(this._layerStatusParametersID)&&(r+="&layersID="+this._layerStatusParametersID),e$2b(a$O.CREDENTIAL)&&e$2b(a$O.CREDENTIAL._keymap[this._baseUrl])&&(r=a$O.addTokenWithKey(this._baseUrl,r));var a=this,s={};e$2b(this._rasterfunction)&&(s.rasterfunction=JSON.stringify(this._rasterfunction));var l=this._resource.getDerivedResource({url:r,request:n,templateValues:s});if(n.quadKey=U$5(e,t,i),this._packingRequest===X$N.QuadKey&&this._isBlock){n.type=V$15.BLOCKPACK,n.throttle=!0;var u=se$1(this,e,t,i);if(l.url=u.url,n.blockInfo=u,n.quadKey=U$5(u.x,u.y,u.level),n.providerName=this.url,e$2b(h=this.blockCache[n.quadKey]))return this.blockCacheQueue.touch(h),h.data}else if(this._packingRequest===X$N.QuadKey){if(n.type=V$15.PACK,this.isTileMap){var c=this._scales[i+this.resolution]||Z$5[i];n.quadKey=c+":"+e+":"+t}else n.quadKey=U$5(e,t,i);n.providerName=this.url,n.throttle=!0}else if(this._isBlock){n.type=V$15.BLOCK;var h;u=se$1(this,e,t,i);if(l.url=u.url,n.blockInfo=u,n.quadKey=U$5(u.x,u.y,u.level),n.providerName=this.url,e$2b(h=this.blockCache[n.quadKey])&&e$2b(h.data))return this.blockCacheQueue.touch(h),h.data;if(!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){var d,f=o$1l.defer();return e$2b(this._indexedDBScheduler)&&e$2b(d=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey))?(o$1l(d,(function(e){e$2b(e)?f.resolve(e):f.resolve("cacheError")}),(function(e){f.resolve("cacheError")})),f):p(a,l)}}if(!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable)return e$2b(this._indexedDBScheduler)&&e$2b(d=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey))?o$1l(d,(function(e){return e$2b(e)?e:"cacheError"}),(function(e){return"cacheError"})):p(a,l);function p(e,t){if(e._isBlock){var i=e.blockCache[n.quadKey];if(e$2b(i))return i.promise;var r=ce$4(e,t);return e$2b(r)?(i=new e$1b(e,n.quadKey),e.blockCache[n.quadKey]=i,i.promise=r,i.promise):void 0}return ce$4(e,t)}return p(a,l)};var Me$3=/\.ktx$/i,Be$2=/\.crn$/i,oe$3=/\.dxtz/i;function ce$4(e,t){o$1q.defined("url",t);var i=t$11.createIfNeeded(t);return e.isBlock||e.packingRequest===X$N.QuadKey?(oe$3.test(i.url)&&(e.flipY=!0),i.fetchArrayBuffer()):Me$3.test(i.url)?k$V(i):Be$2.test(i.url)?a$P(i):oe$3.test(i.url)?(e.flipY=!0,B$M(i)):e$2b(e.tileDiscardPolicy)?i.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(e$2b(e._customRequestHeaders)&&(i.headers=p$19(i.headers,e._customRequestHeaders)),e._cacheKey.length>0?i.fetchArrayBuffer():i.fetchBlob())}function je(e,t){if(e$2b(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function Ke(e,t){if(e$2b(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function F$4(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function Ae$2(e,t,i){if(e$2b(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function P$5(e,t,i){var n=F$4(e,t,i);if(e$2b(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function ue$1(e,t,i){var n=F$4(e,t,i);if(e$2b(n))return n.textContent.trim()}H$4.prototype.pickFeatures=function(){};var tr=function(e){var t,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,r=Math.ceil,o=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",l=1e14,u=14,c=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,f=1e9;function p(e){var t=0|e;return e>0||e===t?t:t-1}function _(e){for(var t,i,n=1,r=e.length,o=e[0]+"";n<r;){for(t=e[n++]+"",i=u-t.length;i--;t="0"+t);o+=t}for(r=o.length;48===o.charCodeAt(--r););return o.slice(0,r+1||1)}function m(e,t){var i,n,r=e.c,o=t.c,a=e.s,s=t.s,l=e.e,u=t.e;if(!a||!s)return null;if(i=r&&!r[0],n=o&&!o[0],i||n)return i?n?0:-s:a;if(a!=s)return a;if(i=a<0,n=l==u,!r||!o)return n?0:!r^i?1:-1;if(!n)return l>u^i?1:-1;for(s=(l=r.length)<(u=o.length)?l:u,a=0;a<s;a++)if(r[a]!=o[a])return r[a]>o[a]^i?1:-1;return l==u?0:l>u^i?1:-1}function g(e,t,i,n){if(e<t||e>i||e!==o(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<t||e>i?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function x(e){var t=e.c.length-1;return p(e.e/u)==t&&e.c[t]%2!=0}function v(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function y(e,t,i){var n,r;if(t<0){for(r=i+".";++t;r+=i);e=r+e}else if(++t>(n=e.length)){for(r=i,t-=n;--t;r+=i);e+=r}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}return t=function e(t){var $,b,T,C=N.prototype={constructor:N,toString:null,valueOf:null},S=new N(1),w=20,E=4,P=-7,A=21,L=-1e7,M=1e7,R=!1,I=1,O=0,D={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},B="0123456789abcdefghijklmnopqrstuvwxyz";function N(e,t){var n,r,a,l,h,d,f,p,_=this;if(!(_ instanceof N))return new N(e,t);if(null==t){if(e&&!0===e._isBigNumber)return _.s=e.s,void(!e.c||e.e>M?_.c=_.e=null:e.e<L?_.c=[_.e=0]:(_.e=e.e,_.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(_.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,h=e;h>=10;h/=10,l++);return void(l>M?_.c=_.e=null:(_.e=l,_.c=[e]))}p=String(e)}else{if(!i.test(p=String(e)))return T(_,p,d);_.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(l=p.indexOf("."))>-1&&(p=p.replace(".","")),(h=p.search(/e/i))>0?(l<0&&(l=h),l+=+p.slice(h+1),p=p.substring(0,h)):l<0&&(l=p.length)}else{if(g(t,2,B.length,"Base"),10==t)return G(_=new N(e),w+_.e+1,E);if(p=String(e),d="number"==typeof e){if(0*e!=0)return T(_,p,d,t);if(_.s=1/e<0?(p=p.slice(1),-1):1,N.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else _.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(n=B.slice(0,t),l=h=0,f=p.length;h<f;h++)if(n.indexOf(r=p.charAt(h))<0){if("."==r){if(h>l){l=f;continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,h=-1,l=0;continue}return T(_,String(e),d,t)}d=!1,(l=(p=b(p,t,10,_.s)).indexOf("."))>-1?p=p.replace(".",""):l=p.length}for(h=0;48===p.charCodeAt(h);h++);for(f=p.length;48===p.charCodeAt(--f););if(p=p.slice(h,++f)){if(f-=h,d&&N.DEBUG&&f>15&&(e>c||e!==o(e)))throw Error(s+_.s*e);if((l=l-h-1)>M)_.c=_.e=null;else if(l<L)_.c=[_.e=0];else{if(_.e=l,_.c=[],h=(l+1)%u,l<0&&(h+=u),h<f){for(h&&_.c.push(+p.slice(0,h)),f-=u;h<f;)_.c.push(+p.slice(h,h+=u));h=u-(p=p.slice(h)).length}else h-=f;for(;h--;p+="0");_.c.push(+p)}}else _.c=[_.e=0]}function F(e,t,i,n){var r,o,a,s,l;if(null==i?i=E:g(i,0,8),!e.c)return e.toString();if(r=e.c[0],a=e.e,null==t)l=_(e.c),l=1==n||2==n&&(a<=P||a>=A)?v(l,a):y(l,a,"0");else if(o=(e=G(new N(e),t,i)).e,s=(l=_(e.c)).length,1==n||2==n&&(t<=o||o<=P)){for(;s<t;l+="0",s++);l=v(l,o)}else if(t-=a,l=y(l,o,"0"),o+1>s){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-s)>0)for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&r?"-"+l:l}function U(e,t){for(var i,n=1,r=new N(e[0]);n<e.length;n++){if(!(i=new N(e[n])).s){r=i;break}t.call(r,i)&&(r=i)}return r}function z(e,t,i){for(var n=1,r=t.length;!t[--r];t.pop());for(r=t[0];r>=10;r/=10,n++);return(i=n+i*u-1)>M?e.c=e.e=null:i<L?e.c=[e.e=0]:(e.e=i,e.c=t),e}function G(e,t,i,n){var a,s,c,d,f,p,_,m=e.c,g=h;if(m){e:{for(a=1,d=m[0];d>=10;d/=10,a++);if((s=t-a)<0)s+=u,c=t,_=(f=m[p=0])/g[a-c-1]%10|0;else if((p=r((s+1)/u))>=m.length){if(!n)break e;for(;m.length<=p;m.push(0));f=_=0,a=1,c=(s%=u)-u+1}else{for(f=d=m[p],a=1;d>=10;d/=10,a++);_=(c=(s%=u)-u+a)<0?0:f/g[a-c-1]%10|0}if(n=n||t<0||null!=m[p+1]||(c<0?f:f%g[a-c-1]),n=i<4?(_||n)&&(0==i||i==(e.s<0?3:2)):_>5||5==_&&(4==i||n||6==i&&(s>0?c>0?f/g[a-c]:0:m[p-1])%10&1||i==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=g[(u-t%u)%u],e.e=-t||0):m[0]=e.e=0,e;if(0==s?(m.length=p,d=1,p--):(m.length=p+1,d=g[u-s],m[p]=c>0?o(f/g[a-c]%g[c])*d:0),n)for(;;){if(0==p){for(s=1,c=m[0];c>=10;c/=10,s++);for(c=m[0]+=d,d=1;c>=10;c/=10,d++);s!=d&&(e.e++,m[0]==l&&(m[0]=1));break}if(m[p]+=d,m[p]!=l)break;m[p--]=0,d=1}for(s=m.length;0===m[--s];m.pop());}e.e>M?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}function V(e){var t,i=e.e;return null===i?e.toString():(t=_(e.c),t=i<=P||i>=A?v(t,i):y(t,i,"0"),e.s<0?"-"+t:t)}return N.clone=e,N.ROUND_UP=0,N.ROUND_DOWN=1,N.ROUND_CEIL=2,N.ROUND_FLOOR=3,N.ROUND_HALF_UP=4,N.ROUND_HALF_DOWN=5,N.ROUND_HALF_EVEN=6,N.ROUND_HALF_CEIL=7,N.ROUND_HALF_FLOOR=8,N.EUCLID=9,N.config=N.set=function(e){var t,i;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(g(i=e[t],0,f,t),w=i),e.hasOwnProperty(t="ROUNDING_MODE")&&(g(i=e[t],0,8,t),E=i),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((i=e[t])&&i.pop?(g(i[0],-f,0,t),g(i[1],0,f,t),P=i[0],A=i[1]):(g(i,-f,f,t),P=-(A=i<0?-i:i))),e.hasOwnProperty(t="RANGE"))if((i=e[t])&&i.pop)g(i[0],-f,-1,t),g(i[1],1,f,t),L=i[0],M=i[1];else{if(g(i,-f,f,t),!i)throw Error(a+t+" cannot be zero: "+i);L=-(M=i<0?-i:i)}if(e.hasOwnProperty(t="CRYPTO")){if((i=e[t])!==!!i)throw Error(a+t+" not true or false: "+i);if(i){if(!(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes)))throw R=!i,Error(a+"crypto unavailable");R=i}else R=i}if(e.hasOwnProperty(t="MODULO_MODE")&&(g(i=e[t],0,9,t),I=i),e.hasOwnProperty(t="POW_PRECISION")&&(g(i=e[t],0,f,t),O=i),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(i=e[t]))throw Error(a+t+" not an object: "+i);D=i}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(i=e[t])||/^.$|[+-.\s]|(.).*\1/.test(i))throw Error(a+t+" invalid: "+i);B=i}}return{DECIMAL_PLACES:w,ROUNDING_MODE:E,EXPONENTIAL_AT:[P,A],RANGE:[L,M],CRYPTO:R,MODULO_MODE:I,POW_PRECISION:O,FORMAT:D,ALPHABET:B}},N.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!N.DEBUG)return!0;var t,i,n=e.c,r=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&r>=-f&&r<=f&&r===o(r)){if(0===n[0]){if(0===r&&1===n.length)return!0;break e}if((t=(r+1)%u)<1&&(t+=u),String(n[0]).length==t){for(t=0;t<n.length;t++)if((i=n[t])<0||i>=l||i!==o(i))break e;if(0!==i)return!0}}}else if(null===n&&null===r&&(null===s||1===s||-1===s))return!0;throw Error(a+"Invalid BigNumber: "+e)},N.maximum=N.max=function(){return U(arguments,C.lt)},N.minimum=N.min=function(){return U(arguments,C.gt)},N.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return o(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var i,n,s,l,c,d=0,p=[],_=new N(S);if(null==e?e=w:g(e,0,f),l=r(e/u),R)if(crypto.getRandomValues){for(i=crypto.getRandomValues(new Uint32Array(l*=2));d<l;)(c=131072*i[d]+(i[d+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),i[d]=n[0],i[d+1]=n[1]):(p.push(c%1e14),d+=2);d=l/2}else{if(!crypto.randomBytes)throw R=!1,Error(a+"crypto unavailable");for(i=crypto.randomBytes(l*=7);d<l;)(c=281474976710656*(31&i[d])+1099511627776*i[d+1]+4294967296*i[d+2]+16777216*i[d+3]+(i[d+4]<<16)+(i[d+5]<<8)+i[d+6])>=9e15?crypto.randomBytes(7).copy(i,d):(p.push(c%1e14),d+=7);d=l/7}if(!R)for(;d<l;)(c=t())<9e15&&(p[d++]=c%1e14);for(l=p[--d],e%=u,l&&e&&(c=h[u-e],p[d]=o(l/c)*c);0===p[d];p.pop(),d--);if(d<0)p=[s=0];else{for(s=-1;0===p[0];p.splice(0,1),s-=u);for(d=1,c=p[0];c>=10;c/=10,d++);d<u&&(s-=u-d)}return _.e=s,_.c=p,_}}(),N.sum=function(){for(var e=1,t=arguments,i=new N(t[0]);e<t.length;)i=i.plus(t[e++]);return i},b=function(){var e="0123456789";function t(e,t,i,n){for(var r,o,a=[0],s=0,l=e.length;s<l;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),r=0;r<a.length;r++)a[r]>i-1&&(null==a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/i|0,a[r]%=i)}return a.reverse()}return function(i,n,r,o,a){var s,l,u,c,h,d,f,p,m=i.indexOf("."),g=w,x=E;for(m>=0&&(c=O,O=0,i=i.replace(".",""),d=(p=new N(n)).pow(i.length-m),O=c,p.c=t(y(_(d.c),d.e,"0"),10,r,e),p.e=p.c.length),u=c=(f=t(i,n,r,a?(s=B,e):(s=e,B))).length;0==f[--c];f.pop());if(!f[0])return s.charAt(0);if(m<0?--u:(d.c=f,d.e=u,d.s=o,f=(d=$(d,p,g,x,r)).c,h=d.r,u=d.e),m=f[l=u+g+1],c=r/2,h=h||l<0||null!=f[l+1],h=x<4?(null!=m||h)&&(0==x||x==(d.s<0?3:2)):m>c||m==c&&(4==x||h||6==x&&1&f[l-1]||x==(d.s<0?8:7)),l<1||!f[0])i=h?y(s.charAt(1),-g,s.charAt(0)):s.charAt(0);else{if(f.length=l,h)for(--r;++f[--l]>r;)f[l]=0,l||(++u,f=[1].concat(f));for(c=f.length;!f[--c];);for(m=0,i="";m<=c;i+=s.charAt(f[m++]));i=y(i,u,s.charAt(0))}return i}}(),$=function(){function e(e,t,i){var n,r,o,a,s=0,l=e.length,u=t%d,c=t/d|0;for(e=e.slice();l--;)s=((r=u*(o=e[l]%d)+(n=c*o+(a=e[l]/d|0)*u)%d*d+s)/i|0)+(n/d|0)+c*a,e[l]=r%i;return s&&(e=[s].concat(e)),e}function t(e,t,i,n){var r,o;if(i!=n)o=i>n?1:-1;else for(r=o=0;r<i;r++)if(e[r]!=t[r]){o=e[r]>t[r]?1:-1;break}return o}function i(e,t,i,n){for(var r=0;i--;)e[i]-=r,r=e[i]<t[i]?1:0,e[i]=r*n+e[i]-t[i];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,r,a,s,c){var h,d,f,_,m,g,x,v,y,$,b,T,C,S,w,E,P,A=n.s==r.s?1:-1,L=n.c,M=r.c;if(!(L&&L[0]&&M&&M[0]))return new N(n.s&&r.s&&(L?!M||L[0]!=M[0]:M)?L&&0==L[0]||!M?0*A:A/0:NaN);for(y=(v=new N(A)).c=[],A=a+(d=n.e-r.e)+1,c||(c=l,d=p(n.e/u)-p(r.e/u),A=A/u|0),f=0;M[f]==(L[f]||0);f++);if(M[f]>(L[f]||0)&&d--,A<0)y.push(1),_=!0;else{for(S=L.length,E=M.length,f=0,A+=2,(m=o(c/(M[0]+1)))>1&&(M=e(M,m,c),L=e(L,m,c),E=M.length,S=L.length),C=E,b=($=L.slice(0,E)).length;b<E;$[b++]=0);P=M.slice(),P=[0].concat(P),w=M[0],M[1]>=c/2&&w++;do{if(m=0,(h=t(M,$,E,b))<0){if(T=$[0],E!=b&&(T=T*c+($[1]||0)),(m=o(T/w))>1)for(m>=c&&(m=c-1),x=(g=e(M,m,c)).length,b=$.length;1==t(g,$,x,b);)m--,i(g,E<x?P:M,x,c),x=g.length,h=1;else 0==m&&(h=m=1),x=(g=M.slice()).length;if(x<b&&(g=[0].concat(g)),i($,g,b,c),b=$.length,-1==h)for(;t(M,$,E,b)<1;)m++,i($,E<b?P:M,b,c),b=$.length}else 0===h&&(m++,$=[0]);y[f++]=m,$[0]?$[b++]=L[C]||0:($=[L[C]],b=1)}while((C++<S||null!=$[0])&&A--);_=null!=$[0],y[0]||y.splice(0,1)}if(c==l){for(f=1,A=y[0];A>=10;A/=10,f++);G(v,a+(v.e=f+d*u-1)+1,s,_)}else v.e=d,v.r=+_;return v}}(),T=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,i=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,r=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,s,l,u){var c,h=l?s:s.replace(r,"");if(n.test(h))o.s=isNaN(h)?null:h<0?-1:1;else{if(!l&&(h=h.replace(e,(function(e,t,i){return c="x"==(i=i.toLowerCase())?16:"b"==i?2:8,u&&u!=c?e:t})),u&&(c=u,h=h.replace(t,"$1").replace(i,"0.$1")),s!=h))return new N(h,c);if(N.DEBUG)throw Error(a+"Not a"+(u?" base "+u:"")+" number: "+s);o.s=null}o.c=o.e=null}}(),C.absoluteValue=C.abs=function(){var e=new N(this);return e.s<0&&(e.s=1),e},C.comparedTo=function(e,t){return m(this,new N(e,t))},C.decimalPlaces=C.dp=function(e,t){var i,n,r,o=this;if(null!=e)return g(e,0,f),null==t?t=E:g(t,0,8),G(new N(o),e+o.e+1,t);if(!(i=o.c))return null;if(n=((r=i.length-1)-p(this.e/u))*u,r=i[r])for(;r%10==0;r/=10,n--);return n<0&&(n=0),n},C.dividedBy=C.div=function(e,t){return $(this,new N(e,t),w,E)},C.dividedToIntegerBy=C.idiv=function(e,t){return $(this,new N(e,t),0,1)},C.exponentiatedBy=C.pow=function(e,t){var i,n,s,l,c,h,d,f,p=this;if((e=new N(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+V(e));if(null!=t&&(t=new N(t)),c=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return f=new N(Math.pow(+V(p),c?2-x(e):+V(e))),t?f.mod(t):f;if(h=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new N(NaN);(n=!h&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||c&&p.c[1]>=24e7:p.c[0]<8e13||c&&p.c[0]<=9999975e7)))return l=p.s<0&&x(e)?-0:0,p.e>-1&&(l=1/l),new N(h?1/l:l);O&&(l=r(O/u+2))}for(c?(i=new N(.5),h&&(e.s=1),d=x(e)):d=(s=Math.abs(+V(e)))%2,f=new N(S);;){if(d){if(!(f=f.times(p)).c)break;l?f.c.length>l&&(f.c.length=l):n&&(f=f.mod(t))}if(s){if(0===(s=o(s/2)))break;d=s%2}else if(G(e=e.times(i),e.e+1,1),e.e>14)d=x(e);else{if(0===(s=+V(e)))break;d=s%2}p=p.times(p),l?p.c&&p.c.length>l&&(p.c.length=l):n&&(p=p.mod(t))}return n?f:(h&&(f=S.div(f)),t?f.mod(t):l?G(f,O,E,undefined):f)},C.integerValue=function(e){var t=new N(this);return null==e?e=E:g(e,0,8),G(t,t.e+1,e)},C.isEqualTo=C.eq=function(e,t){return 0===m(this,new N(e,t))},C.isFinite=function(){return!!this.c},C.isGreaterThan=C.gt=function(e,t){return m(this,new N(e,t))>0},C.isGreaterThanOrEqualTo=C.gte=function(e,t){return 1===(t=m(this,new N(e,t)))||0===t},C.isInteger=function(){return!!this.c&&p(this.e/u)>this.c.length-2},C.isLessThan=C.lt=function(e,t){return m(this,new N(e,t))<0},C.isLessThanOrEqualTo=C.lte=function(e,t){return-1===(t=m(this,new N(e,t)))||0===t},C.isNaN=function(){return!this.s},C.isNegative=function(){return this.s<0},C.isPositive=function(){return this.s>0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.minus=function(e,t){var i,n,r,o,a=this,s=a.s;if(t=(e=new N(e,t)).s,!s||!t)return new N(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/u,h=e.e/u,d=a.c,f=e.c;if(!c||!h){if(!d||!f)return d?(e.s=-t,e):new N(f?a:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new N(d[0]?a:3==E?-0:0)}if(c=p(c),h=p(h),d=d.slice(),s=c-h){for((o=s<0)?(s=-s,r=d):(h=c,r=f),r.reverse(),t=s;t--;r.push(0));r.reverse()}else for(n=(o=(s=d.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(d[t]!=f[t]){o=d[t]<f[t];break}if(o&&(r=d,d=f,f=r,e.s=-e.s),(t=(n=f.length)-(i=d.length))>0)for(;t--;d[i++]=0);for(t=l-1;n>s;){if(d[--n]<f[n]){for(i=n;i&&!d[--i];d[i]=t);--d[i],d[n]+=l}d[n]-=f[n]}for(;0==d[0];d.splice(0,1),--h);return d[0]?z(e,d,h):(e.s=3==E?-1:1,e.c=[e.e=0],e)},C.modulo=C.mod=function(e,t){var i,n,r=this;return e=new N(e,t),!r.c||!e.s||e.c&&!e.c[0]?new N(NaN):!e.c||r.c&&!r.c[0]?new N(r):(9==I?(n=e.s,e.s=1,i=$(r,e,0,3),e.s=n,i.s*=n):i=$(r,e,0,I),!(e=r.minus(i.times(e))).c[0]&&1==I&&(e.s=r.s),e)},C.multipliedBy=C.times=function(e,t){var i,n,r,o,a,s,c,h,f,_,m,g,x,v,y,$=this,b=$.c,T=(e=new N(e,t)).c;if(!(b&&T&&b[0]&&T[0]))return!$.s||!e.s||b&&!b[0]&&!T||T&&!T[0]&&!b?e.c=e.e=e.s=null:(e.s*=$.s,b&&T?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=p($.e/u)+p(e.e/u),e.s*=$.s,(c=b.length)<(_=T.length)&&(x=b,b=T,T=x,r=c,c=_,_=r),r=c+_,x=[];r--;x.push(0));for(v=l,y=d,r=_;--r>=0;){for(i=0,m=T[r]%y,g=T[r]/y|0,o=r+(a=c);o>r;)i=((h=m*(h=b[--a]%y)+(s=g*h+(f=b[a]/y|0)*m)%y*y+x[o]+i)/v|0)+(s/y|0)+g*f,x[o--]=h%v;x[o]=i}return i?++n:x.splice(0,1),z(e,x,n)},C.negated=function(){var e=new N(this);return e.s=-e.s||null,e},C.plus=function(e,t){var i,n=this,r=n.s;if(t=(e=new N(e,t)).s,!r||!t)return new N(NaN);if(r!=t)return e.s=-t,n.minus(e);var o=n.e/u,a=e.e/u,s=n.c,c=e.c;if(!o||!a){if(!s||!c)return new N(r/0);if(!s[0]||!c[0])return c[0]?e:new N(s[0]?n:0*r)}if(o=p(o),a=p(a),s=s.slice(),r=o-a){for(r>0?(a=o,i=c):(r=-r,i=s),i.reverse();r--;i.push(0));i.reverse()}for((r=s.length)-(t=c.length)<0&&(i=c,c=s,s=i,t=r),r=0;t;)r=(s[--t]=s[t]+c[t]+r)/l|0,s[t]=l===s[t]?0:s[t]%l;return r&&(s=[r].concat(s),++a),z(e,s,a)},C.precision=C.sd=function(e,t){var i,n,r,o=this;if(null!=e&&e!==!!e)return g(e,1,f),null==t?t=E:g(t,0,8),G(new N(o),e,t);if(!(i=o.c))return null;if(n=(r=i.length-1)*u+1,r=i[r]){for(;r%10==0;r/=10,n--);for(r=i[0];r>=10;r/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},C.shiftedBy=function(e){return g(e,-c,c),this.times("1e"+e)},C.squareRoot=C.sqrt=function(){var e,t,i,n,r,o=this,a=o.c,s=o.s,l=o.e,u=w+4,c=new N("0.5");if(1!==s||!a||!a[0])return new N(!s||s<0&&(!a||a[0])?NaN:a?o:1/0);if(0==(s=Math.sqrt(+V(o)))||s==1/0?(((t=_(a)).length+l)%2==0&&(t+="0"),s=Math.sqrt(+t),l=p((l+1)/2)-(l<0||l%2),s==1/0?t="1e"+l:t=(t=s.toExponential()).slice(0,t.indexOf("e")+1)+l,i=new N(t)):i=new N(s+""),i.c[0])for((s=(l=i.e)+u)<3&&(s=0);;)if(r=i,i=c.times(r.plus($(o,r,u,1))),_(r.c).slice(0,s)===(t=_(i.c)).slice(0,s)){if(i.e<l&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(n||"4999"!=t)){(!+t||!+t.slice(1)&&"5"==t.charAt(0))&&(G(i,i.e+w+2,1),e=!i.times(i).eq(o));break}if(!n&&(G(r,r.e+w+2,0),r.times(r).eq(o))){i=r;break}u+=4,s+=4,n=1}return G(i,i.e+w+1,E,e)},C.toExponential=function(e,t){return null!=e&&(g(e,0,f),e++),F(this,e,t,1)},C.toFixed=function(e,t){return null!=e&&(g(e,0,f),e=e+this.e+1),F(this,e,t)},C.toFormat=function(e,t,i){var n,r=this;if(null==i)null!=e&&t&&"object"==typeof t?(i=t,t=null):e&&"object"==typeof e?(i=e,e=t=null):i=D;else if("object"!=typeof i)throw Error(a+"Argument not an object: "+i);if(n=r.toFixed(e,t),r.c){var o,s=n.split("."),l=+i.groupSize,u=+i.secondaryGroupSize,c=i.groupSeparator||"",h=s[0],d=s[1],f=r.s<0,p=f?h.slice(1):h,_=p.length;if(u&&(o=l,l=u,u=o,_-=o),l>0&&_>0){for(o=_%l||l,h=p.substr(0,o);o<_;o+=l)h+=c+p.substr(o,l);u>0&&(h+=c+p.slice(o)),f&&(h="-"+h)}n=d?h+(i.decimalSeparator||"")+((u=+i.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):d):h}return(i.prefix||"")+n+(i.suffix||"")},C.toFraction=function(e){var t,i,n,r,o,s,l,c,d,f,p,m,g=this,x=g.c;if(null!=e&&(!(l=new N(e)).isInteger()&&(l.c||1!==l.s)||l.lt(S)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+V(l));if(!x)return new N(g);for(t=new N(S),d=i=new N(S),n=c=new N(S),m=_(x),o=t.e=m.length-g.e-1,t.c[0]=h[(s=o%u)<0?u+s:s],e=!e||l.comparedTo(t)>0?o>0?t:d:l,s=M,M=1/0,l=new N(m),c.c[0]=0;f=$(l,t,0,1),1!=(r=i.plus(f.times(n))).comparedTo(e);)i=n,n=r,d=c.plus(f.times(r=d)),c=r,t=l.minus(f.times(r=t)),l=r;return r=$(e.minus(i),n,0,1),c=c.plus(r.times(d)),i=i.plus(r.times(n)),c.s=d.s=g.s,p=$(d,n,o*=2,E).minus(g).abs().comparedTo($(c,i,o,E).minus(g).abs())<1?[d,n]:[c,i],M=s,p},C.toNumber=function(){return+V(this)},C.toPrecision=function(e,t){return null!=e&&g(e,1,f),F(this,e,t,2)},C.toString=function(e){var t,i=this,n=i.s,r=i.e;return null===r?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=r<=P||r>=A?v(_(i.c),r):y(_(i.c),r,"0"):10===e?t=y(_((i=G(new N(i),w+r+1,E)).c),i.e,"0"):(g(e,2,B.length,"Base"),t=b(y(_(i.c),r,"0"),10,e,n,!0)),n<0&&i.c[0]&&(t="-"+t)),t},C.valueOf=C.toJSON=function(){return V(this)},C._isBigNumber=!0,n&&(C[Symbol.toStringTag]="BigNumber",C[Symbol.for("nodejs.util.inspect.custom")]=C.valueOf),null!=t&&N.set(t),N}(),t.default=t.BigNumber=t,"function"==typeof define&&define.amd?define((function(){return t})):typeof module<"u"&&module.exports?module.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t),t}(),ee$2={},Me$2={iServer:0,oss:1};function De$1(e,t){this.RSAAuthenticationStatus={},this._customRequestHeaders=e.customRequestHeaders,this._scene=t,this.camera=t.camera}function xr(e){var t={},i=e.firstChild,n=s$S.queryStringValue(i,"Version");t.version=n;var r=s$S.queryStringValue(i,"FileType");t.fileType=r;var o=s$S.queryFirstNode(i,"WaterEffect"),a=s$S.queryNumericValue(o,"AverageHeight");t.averageHeight=a;var s=s$S.queryNodes(o,"GpuProgramParameters");t.gpuProgramParameters=[];for(var l=0,u=s.length;l<u;l++){var c={gpuConstants:[],atuoConstants:[]},h=s[l],d=s$S.queryFirstNode(h,"GpuConstants");if(d)for(var f=s$S.queryNodes(d,"GpuConstantDefinition"),p=0,_=f.length;p<_;p++){var m={},g=f[p],x=s$S.queryNumericValue(g,"ConstType");m.constType=x;var v=s$S.queryNumericValue(g,"Index");m.index=v;var y=s$S.queryStringValue(g,"Name");m.name=y;var $=s$S.queryNumericValue(g,"ArraySize");m.arraySize=$;var b=s$S.queryNumericValue(g,"Multiple");m.multiple=b;var T=s$S.queryFirstNode(g,"ArrayFloat");if(m.arrayFloat=[],T)for(var C=s$S.queryNodes(T,"Float"),S=0;S<$;){var w=parseFloat(C[S].textContent);m.arrayFloat.push(w),S++}c.gpuConstants.push(m)}var E=s$S.queryFirstNode(h,"AutoConstants");if(E){var P=s$S.queryNodes(E,"AutoConstantEntry");for(p=0,_=P.length;p<_;p++){m={};var A=P[p],L=s$S.queryNumericValue(A,"ParamType");m.paramType=L;y=s$S.queryStringValue(A,"Name");m.name=y;var M=s$S.queryNumericValue(A,"PhysicalIndex");m.physicalIndex=M;var R=s$S.queryNumericValue(A,"ElementCount");m.elementCount=R;var I=s$S.queryNumericValue(A,"Data");m.data=I;var O=s$S.queryNumericValue(A,"FData");m.fData=O;var D=s$S.queryBooleanValue(A,"IsReal");m.isReal=D,c.atuoConstants.push(m)}}t.gpuProgramParameters.push(c)}return t}function Xr(e,t,i,n){var r=o$1l.defer(),o=e.toString()+"indexData.dat";if(e$2b(a$O.CREDENTIAL)&&(o=a$O.addToken(o)),i===Tr$3.KEY_VALUE){var a=m$1a(n.split("?")[1]),s={suffix:"dat"},l=m$1b(s=Object.assign(s,a),!0),u=n.match(/(\S*)\/config/);u.length>0&&(o=u[0]+"?"+l)}return o$1l(d$1f(o,t),(function(e){for(var t=new e$1N,i=e.firstChild,n=i.namespace,o=s$S.queryFirstNode(i,"FieldDefines",n),a=s$S.queryChildNodes(o,"FieldDefine",n),s=0;s<a.length;s++){var l=s$S.queryStringAttribute(a[s],"Name"),u=s$S.queryStringAttribute(a[s],"Type"),c=s$S.queryStringAttribute(a[s],"Size");t.set(l,{type:u,size:c})}r.resolve(t)}),(function(){r.reject()})),r.promise}function Kr(e,t,i,n){var r=o$1l.defer();if(e$2b(i)){var o,a=e.toString();if(n===Tr$3.KEY_VALUE){var s=m$1a(a.split("?")[1]),l={suffix:"attribute.json"},u=m$1b(l=Object.assign(l,s),!0),c=a.match(/(\S*)\/config/);c.length>0&&(o=c[0]+"?"+u)}else{var h=a.substring(0,a.indexOf("/realspace")+10);o=a+"attribute.json",e$2b(a$O.CREDENTIAL)&&(o=e$2b(a$O.CREDENTIAL._keymap[h])?a$O.addTokenWithKey(h,o):a$O.addToken(o))}o$1l(u$Q(o,t),(function(e){if(e.layerInfos){for(var t=e.layerInfos[0].fieldInfos,i=new e$1N,n=0;n<t.length;n++)i.set(t[n].name,{type:t[n].type,size:t[n].size});var o,a=void 0;if(e$2b(e.indexInfos)){o={},a={};n=0;for(var s=e.indexInfos.length;n<s;n++){var l=e.indexInfos[n],u=f$O(l.rootNodePath);o[u=u.replace(".s3mb","")]=l.indexInfo,a[l.rootNodePath.replace(".s3mb","")]=l.indexInfo}}r.resolve({fieldsInfo:i,indexInfoMap:o,indexInfoAttributeMap:a})}else r.reject()}),(function(){r.reject()}))}else r.reject();return r.promise}function Gr(e,t,i){if(e&&t){var n=e.firstChild;if(n){var r=n.namespaceURI,o=s$S.queryFirstNode(n,"AttachFiles",r);if(o){for(var a=s$S.queryNodes(o,"AttachFile",r),s=[],l=0,u=a.length;l<u;l++){var c=a[l].textContent;if(c.indexOf("water")>0){var h=t+c;s.push(d$1f(h,i))}}if(!s.length)return;var d=o$1l.defer();return o$1l.all(s,(function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];if(!r)break;var o=xr(r);t.push(o)}d.resolve(t)}),(function(){})),d.promise}}}}function Yr(e,t,i){if(e&&t){var n=e.extensions;if(e$2b(n)&&e$2b(n.attachFiles)){for(var r=n.attachFiles,o=[],a=0,s=r.length;a<s;a++){var l=r[a].attachFile;if(l.indexOf(".water")>0){var u=t+l;e$2b(a$O.CREDENTIAL)&&(u=a$O.addToken(u)),o.push(d$1f(u,i))}}if(o.length){var c=o$1l.defer();return o$1l.all(o,(function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];if(!r)break;var o=xr(r);t.push(o)}c.resolve(t)}),(function(){})),c.promise}}}}function Zr(e,t,i){var n=e.firstChild,r=n.namespace;if("Spatial3DModel"===n.localName){s$S.queryStringValue(n,"Asset",r),s$S.queryStringValue(n,"Version",r);var o=s$S.queryStringValue(n,"DataType",r);s$S.queryStringValue(n,"PyramidSplitType",r),s$S.queryStringValue(n,"LodType",r);var a=s$S.queryFirstNode(n,"Position",r),s=s$S.queryNumericValue(a,"X",r),l=s$S.queryNumericValue(a,"Y",r),u=s$S.queryNumericValue(a,"Z",r);if(e$2b(ie=s$S.queryFirstNode(n,"GeoBounds",r))){var c=s$S.queryNumericValue(ie,"Left",r),h=s$S.queryNumericValue(ie,"Top",r),d=s$S.queryNumericValue(ie,"Right",r),f=s$S.queryNumericValue(ie,"Bottom",r);Z=h$18.fromDegrees(c,f,d,h)}var p=s$S.queryFirstNode(n,"HeightRange",r),_=s$S.queryNumericValue(p,"Min",r),m=s$S.queryNumericValue(p,"Max",r),g=s$S.queryFirstNode(n,"CategoryRange",r),x=s$S.queryNumericValue(g,"MaxCategory",r),v=s$S.queryNumericValue(g,"MinCategory",r),y=s$S.queryFirstNode(n,"WDescript",r),$=s$S.queryFirstNode(y,"Range",r),b=s$S.queryNumericValue($,"Min",r),T=s$S.queryNumericValue($,"Max",r);x=x||T,v=v||b;var C=s$S.queryFirstNode(n,"Extensions",r),S=s$S.queryStringValue(C,"FileType",r);s$S.queryStringValue(C,"TileSplitType",r);var w=s$S.queryBooleanValue(C,"TextureSharing",r),E=s$S.queryBooleanValue(C,"TransparencyOptimization",r),P=s$S.queryStringValue(C,"VertexWeightMode",r),A=s$S.queryStringValue(C,"ProcessType",r),L={};(Ce=t.split("?")).length>1&&(L=m$1a(Ce[1]),t=Ce[0]);for(var M=new h$16(i===Me$2.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),R=[],I=/\\+/g,O=s$S.queryFirstNode(n,"Tiles",r),D=!1,B=0,N=(Se=s$S.queryNodes(O,"Tile",r)).length;B<N;B++){var F=Se[B],U=(Oe=s$S.queryStringValue(F,"Url",r)).lastIndexOf(".");".s3mbz"===Oe.substring(U,Oe.length)&&(D=!0);var z=i$1a(Oe=(Oe=Oe.replace(I,"/")).replace(/(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,"")),G=f$O(Oe);(De={}).relativePath=new h$16(z),De.name=G;var V=s$S.queryFirstNode(F,"Boundingbox",r);if(e$2b(V)){var k=s$S.queryFirstNode(V,"Min",r),W=s$S.queryFirstNode(V,"Max",r),H=s$S.queryNumericValue(k,"X",r),q=s$S.queryNumericValue(k,"Y",r),j=s$S.queryNumericValue(k,"Z",r),Y=s$S.queryNumericValue(W,"X",r),X=s$S.queryNumericValue(W,"Y",r),K=s$S.queryNumericValue(W,"Z",r),Q=new i$1c;i$1c.fromCornerPoints(new o$1p(H,q,j),new o$1p(Y,X,K),Q),De.bSphere=Q}R.push(De)}return{position:{lon:s,lat:l,height:u},fileType:S,maxInstensity:0,minInstensity:0,maxHeight:m,minHeight:_,maxCategory:x,minCategory:v,layerBounds:Z,baseUri:M,rootEntities:R,isTextureShare:w,urlArguments:L,isS3MB:!0,isS3MZ:D,processType:A,dataType:o,isTransparencyOptimization:E,vertexWeightMode:P}}S=s$S.queryStringValue(n,"FileType",r),w=s$S.queryBooleanValue(n,"TextureSharing",r),E=s$S.queryBooleanValue(n,"TransparencyOptimization",r),P=s$S.queryStringValue(n,"VertexWeightMode",r);var Z,J=s$S.queryFirstNode(n,"InstensityRange",r),ee=s$S.queryNumericValue(J,"MinInstensity",r),te=s$S.queryNumericValue(J,"MaxInstensity",r),ie=(p=s$S.queryFirstNode(n,"HeightRange",r),_=s$S.queryNumericValue(p,"MinHeight",r),m=s$S.queryNumericValue(p,"MaxHeight",r),g=s$S.queryFirstNode(n,"CategoryRange",r),x=s$S.queryNumericValue(g,"MaxCategory",r),v=s$S.queryNumericValue(g,"MinCategory",r),A=s$S.queryStringValue(n,"ProcessType",r),a=s$S.queryFirstNode(n,"Position",r),s=s$S.queryNumericValue(a,"X",r),l=s$S.queryNumericValue(a,"Y",r),u=s$S.queryNumericValue(a,"Z",r),s$S.queryFirstNode(n,"Bounds",r)),ne=s$S.queryFirstNode(n,"BoundingBox",r),re=s$S.queryStringValue(n,"IDFieldName",r),oe=s$S.queryStringValue(n,"AttributeExtentName",r);if(e$2b(ie)){c=s$S.queryNumericValue(ie,"Left",r),h=s$S.queryNumericValue(ie,"Top",r),d=s$S.queryNumericValue(ie,"Right",r),f=s$S.queryNumericValue(ie,"Bottom",r);Z=h$18.fromDegrees(c,f,d,h)}else if(e$2b(ne)){var ae=s$S.queryNumericValue(ne,"MinX",r),se=s$S.queryNumericValue(ne,"MinY",r);s$S.queryNumericValue(ne,"MinZ",r);var le=s$S.queryNumericValue(ne,"MaxX",r),ue=s$S.queryNumericValue(ne,"MaxY",r);s$S.queryNumericValue(ne,"MaxZ",r),ae=180*Math.abs(ae)/(6378137*Math.PI),se=180*Math.abs(se)/(6378137*Math.PI),le=180*Math.abs(le)/(6378137*Math.PI),ue=180*Math.abs(ue)/(6378137*Math.PI),Z=h$18.fromDegrees(s-ae,l-se,s+le,l+ue)}else Z=h$18.fromDegrees(s-1e-5,l-1e-5,s+1e-5,l+1e-5);var ce=void 0,he=s$S.queryNodes(n,"Vol",r);if(e$2b(he)&&he.length>0){var de=[],fe=[],pe=[],_e=[];for(B=0,N=he.length;B<N;B++){var me=he[B],ge=s$S.queryStringValue(me,"Name",r);de.push(ge);var xe=s$S.queryStringValue(me,"AttachFileExt",r);_e.push(xe);var ve=s$S.queryFirstNode(me,"VolumeValueRange",r);if(e$2b(ve)){var ye=s$S.queryNumericValue(ve,"MinValue",r),$e=s$S.queryNumericValue(ve,"MaxValue",r);fe.push($e),pe.push(ye)}}ce={bVolume:!0,strVolumeExts:_e,volNames:de,maxValues:fe,minValues:pe}}var be=s$S.queryFirstNode(n,"VolumeValueRange",r);if(e$2b(be)){ye=s$S.queryNumericValue(be,"MinValue",r),$e=s$S.queryNumericValue(be,"MaxValue",r);var Te=s$S.queryStringValue(n,"AttachFileExt",r);e$2b(ce)?(ce.volNames.push(""),ce.maxValues.push($e),ce.minValues.push(ye)):ce={bVolume:!0,strVolumeExts:[Te],volNames:[""],maxValues:[$e],minValues:[ye]}}var Ce;L={};(Ce=t.split("?")).length>1&&(L=m$1a(Ce[1]),t=Ce[0]);M=new h$16(i===Me$2.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),R=[],I=/\\+/g,O=s$S.queryFirstNode(n,"OSGFiles",r);var Se,we=!1;if((Se=s$S.queryNodes(O,"Files",r)).length>0)for(B=0,N=Se.length;B<N;B++){F=Se[B];(Oe=s$S.queryStringValue(F,"FileName",r)).endsWith(".osgb")&&(we=!0);z=i$1a(Oe=(Oe=Oe.replace(I,"/")).replace(/(\.s3m)|(\.osgb)/gi,"")),G=f$O(Oe);(De={}).relativePath=new h$16(z),De.name=G;var Ee=s$S.queryFirstNode(F,"BoundingSphere",r);if(e$2b(Ee)&&Ee.childNodes.length){var Pe=s$S.queryNumericValue(Ee,"CenterX",r),Ae=s$S.queryNumericValue(Ee,"CenterY",r),Le=s$S.queryNumericValue(Ee,"CenterZ",r),Me=s$S.queryNumericValue(Ee,"Radius",r),Re=new o$1p(Pe,Ae,Le);De.bSphere=new i$1c(Re,Me)}R.push(De)}else{var Ie=s$S.queryNodes(O,"FileName",r);for(B=0,N=Ie.length;B<N;B++){var Oe;(Oe=Ie[B].textContent).endsWith(".osgb")&&(we=!0);var De;z=i$1a(Oe=(Oe=Oe.replace(I,"/")).replace(/(\.s3m)|(\.osgb)/gi,"")),G=f$O(Oe);(De={}).relativePath=new h$16(z),De.name=G,R.push(De)}}var Be=void 0,Ne=s$S.queryFirstNode(n,"Levels",r);if(e$2b(Ne)){var Fe=s$S.queryNodes(Ne,"Level",r);e$2b(Fe)&&Fe.length>0&&(Be=parseInt(Fe[0].textContent))}return{position:{lon:s,lat:l,height:u},fileType:S,maxInstensity:te,minInstensity:ee,maxHeight:m,minHeight:_,maxCategory:x,minCategory:v,processType:A,layerBounds:Z,volumeObj:ce,baseUri:M,rootEntities:R,urlArguments:L,isTextureShare:w,isS3MB:!1,isOSGB:we,isTransparencyOptimization:E,vertexWeightMode:P,level:Be,idFieldName:re,attributeExtentName:oe}}function wr(e,t,i){e.asset,e.version;var n=e.dataType;e.pyramidSplitType,e.lodType;var r,o,a,s,l=e.position.x,u=e.position.y,c=e.position.z,h=e.position.units;if(e$2b(e.geoBounds)){var d=e.geoBounds.left,f=e.geoBounds.top,p=e.geoBounds.right,_=e.geoBounds.bottom;d>180||_>180||p>180||f>180?(d>20037508.342789244&&(d-=20037508.342789244*Math.floor(d/20037508.342789244)),p>20037508.342789244&&(p-=20037508.342789244*Math.floor(p/20037508.342789244)),f>10018754.171394622&&(f-=20037508.342789244*Math.floor((f+10018754.171394622)/20037508.342789244)),_>10018754.171394622&&(_-=20037508.342789244*Math.floor((_+10018754.171394622)/20037508.342789244)),V=new h$18(d/=6378137,_/=6378137,p/=6378137,f/=6378137)):V=h$18.fromDegrees(d,_,p,f)}if(e$2b(e.heightRange)&&(r=e.heightRange.min,o=e.heightRange.max),e$2b(e.wDescript)){var m=e.wDescript.range;a=m.min,s=m.max}else if(e$2b(e.vertexAttributeDescript))for(let t=0;t<e.vertexAttributeDescript.length;t++){var g=e.vertexAttributeDescript[t];if("VertexWeight"==g.category){a=g.range.min[0],s=g.range.max[0];break}}var x,v,y,$,b,T,C,S,w,E,P,A,L,M,R=e.extensions,I=!0,O=-1;if(R.hasOwnProperty("s3m:FileType")&&(x=R["s3m:FileType"]),R.hasOwnProperty("s3m:TileSplitType")&&R["s3m:TileSplitType"],R.hasOwnProperty("s3m:ProcessType")&&(T=R["s3m:ProcessType"]),R.hasOwnProperty("IDFieldName")&&(C=R.IDFieldName),R.hasOwnProperty("textureLOD")&&(I="TRUE"===R.textureLOD),R.hasOwnProperty("s3m:MaterialType")&&(w=R["s3m:MaterialType"]),R.hasOwnProperty("globeType")&&(A=R.globeType),R.hasOwnProperty("temporalCount")&&(O=parseInt(R.temporalCount)),R.hasOwnProperty("levels"))for(var D=0,B=R.levels.length;D<B;D++){L=R.levels[D].level;break}R.hasOwnProperty("sml:Level")&&(L=parseInt(R["sml:Level"])),R.hasOwnProperty("s3m:TextureSharing")&&(v="TRUE"===R["s3m:TextureSharing"]),R.hasOwnProperty("s3m:TransparencyOptimization")&&(y="TRUE"===R["s3m:TransparencyOptimization"]),R.hasOwnProperty("s3m:VertexCompressionType")&&($=R["s3m:VertexCompressionType"]),R.hasOwnProperty("s3m:VertexWeightMode")&&(b=R["s3m:VertexWeightMode"]),R.hasOwnProperty("s3m:AttributeExtentName")&&(S=R["s3m:AttributeExtentName"]),R.hasOwnProperty("associateMaterialUrl")&&(E=R.associateMaterialUrl),R.hasOwnProperty("hasAttributeIndex")&&(P="TRUE"==R.hasAttributeIndex),R.hasOwnProperty("historicalRecord")&&(M=R.historicalRecord);var N=[],F=new e$1N;if(R.hasOwnProperty("pointCloudLayers"))for(D=0,B=R.pointCloudLayers.length;D<B;D++){var U=R.pointCloudLayers[D].layerName;if(e$2b(U)){var z=R.pointCloudLayers[D].layerBounds;N.push(U),F.set(U,z)}else{var G=R.pointCloudLayers[D].layer,V=new h$18;F.set(G,V),N.push(G)}}var k=void 0,W=e.extensions.vol;if(e$2b(W)&&W.length>0)for(var H=[],q=[],j=[],Y=[],X=(D=0,W.length);D<X;D++){var K=W[D],Q=K.volName;H.push(Q);var Z=K.volType;Y.push(Z);var J=K.volRangeMin,ee=K.volRangeMax;q.push(ee),j.push(J),k={bVolume:!0,strVolumeExts:Y,volNames:H,maxValues:q,minValues:j}}var te=void 0,ie=e.extensions.map;if(e$2b(ie)&&ie.length>0){var ne=[],re=[];for(D=0,X=ie.length;D<X;D++){var oe=ie[D];Q=oe.mapName;ne.push(Q);Z=oe.dataType;re.push(Z),te={mapExts:re,mapNames:ne}}}var ae={},se=t.split("?");se.length>1&&(ae=m$1a(se[1]),t=se[0]);var le=new h$16(i===Me$2.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),ue=[],ce=/\\+/g,he=!1,de=!1,fe=!1,pe=e.tiles||e.rootTiles;for(D=0,B=pe.length;D<B;D++)if(e$2b(pe[D])){var _e=pe[D].url,me=_e.lastIndexOf("."),ge=_e.substring(me,_e.length);".s3mbz"===ge?he=!0:".s3mblock"===ge?de=!0:".osgb"===ge&&(fe=!0);var xe=i$1a(_e=(_e=_e.replace(ce,"/")).replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,"")),ve=f$O(_e),ye={};if(ye.relativePath=new h$16(xe),ye.name=ve,e$2b(pe[D].boundingbox))if(e$2b(pe[D].boundingbox.center))ye.obb=pe[D].boundingbox;else{var $e=pe[D].boundingbox.min.x,be=pe[D].boundingbox.min.y,Te=pe[D].boundingbox.min.z,Ce=pe[D].boundingbox.max.x,Se=pe[D].boundingbox.max.y,we=pe[D].boundingbox.max.z;ye.min=new o$1p($e,be,Te),ye.max=new o$1p(Ce,Se,we);var Ee=new i$1c;i$1c.fromCornerPoints(ye.min,ye.max,Ee),ye.bSphere=Ee}ue.push(ye)}return{position:{lon:l,lat:u,height:c,units:h},fileType:x,maxInstensity:0,minInstensity:0,maxHeight:o,minHeight:r,maxCategory:s,minCategory:a,layerBounds:V,volumeObj:k,maps:te,baseUri:le,rootEntities:ue,isTextureShare:v,urlArguments:ae,isS3MB:!0,isS3MZ:he,isS3MBlock:de,isOSGB:fe,dataType:n,isTransparencyOptimization:y,vertexCompressionType:$,vertexWeightMode:b,level:L,pointCloudLayerNames:N,processType:T,groupNameBounds:F,idFieldName:C,attributeExtentName:S,materialType:w,textureLod:I,associateMaterialUrl:E,globeType:A,temporalCount:O,hasAttributeIndex:P,historicalRecord:M}}function Mr(e,t,i,n,r,o,a){a=u$_(a,!1),o$1l(e,(function(e){if(n.fieldsInfo=e.fieldsInfo,n.indexInfoMap=e.indexInfoMap,n.indexInfoAttributeMap=e.indexInfoAttributeMap,e$2b(o.isFlyMode)&&!0===o.isFlyMode&&e$2b(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x22e933(n);a||t._layers.add(e,r),e$2b(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}),1e3)}});else{var s=new _0x22e933(n);a||t._layers.add(s,r),e$2b(t._clipRegions)&&s._setServerClipRegions(t._clipRegions,1),i.resolve(s)}}),(function(){if(!0===o.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x22e933(n);a||t._layers.add(e,r),e$2b(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}});else{var e=new _0x22e933(n);a||t._layers.add(e,r),e$2b(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}function ir(e,t,i,n,r,o,a,s){if(n.useWebsocket){var l=new i$V("websocketTaskProcessor");l.scheduleTask({data:"init",scpUrl:e});var u=e.substring(e.indexOf("datas")+6,e.indexOf("/data/path"))+".scp";l.scheduleTask({dataType:"json",data:"/"+u}).then((function(u){var c=wr(u,e,n.serverType);c.context=t.context,c.gl=t.context._gl,c.name=r,c.supportCompressType=t._supportCompressType,c.urlType=n.urlType,c.cullEnabled=n.cullEnabled,c.horizontalLine=n.horizontalLine,c.style3D=n.style3D,c.selectEnable=n.selectable,c.isVisible=n.isVisible,c.minVisibleAltitude=n.minVisibleAltitude,c.maxVisibleAltitude=n.maxVisibleAltitude,c.minVisibleDistance=n.minVisibleDistance,c.maxVisibleDistance=n.maxVisibleDistance,c.shadowType=n.shadowType,c.heading=n.heading,c.lodRangeScale=n.lodRangeScale,c.polygonOffset=n.polygonOffset,c.brightness=n.brightness,c.constrast=n.constrast,c.hue=n.hue,c.saturation=n.saturation,c.gamma=n.gamma,c.effect=n.effect,c.ignoreNormal=u$_(n.ignoreNormal,!1),c.groupName=u$_(n.groupName,""),c.cacheKey=u$_(n.cacheKey,""),c._isJson=!0,c.sceneMode=t.mode,c.scene=t,c.useMercatorProject=n.useMercatorProject,c.scpUrl=a,c.queryFieldNames=n.queryFieldNames,c.subdomainConfig=n.subdomainConfig,c.customRequestHeaders=n.customRequestHeaders,c.LoadingPriority=n.LoadingPriority,c.cullMode=n.cullMode;var h=new _0x22e933(c);h._wstTaskProcessor=l,s||t._layers.add(h,o),e$2b(t._clipRegions)&&h._setServerClipRegions(t._clipRegions,1),i.resolve(h)}))}else d$1f(e,n.customRequestHeaders).then((function(l){var u=Zr(l,e,n.serverType);u.context=t.context,u.gl=t.context._gl,u.name=r,u.supportCompressType=t._supportCompressType,u.urlType=n.urlType,u.cullEnabled=n.cullEnabled,u.horizontalLine=n.horizontalLine,u.style3D=n.style3D,u.selectEnable=n.selectable,u.isVisible=n.isVisible,u.minVisibleAltitude=n.minVisibleAltitude,u.maxVisibleAltitude=n.maxVisibleAltitude,u.minVisibleDistance=n.minVisibleDistance,u.maxVisibleDistance=n.maxVisibleDistance,u.shadowType=n.shadowType,u.heading=n.heading,u.lodRangeScale=n.lodRangeScale,u.polygonOffset=n.polygonOffset,u.brightness=n.brightness,u.constrast=n.constrast,u.hue=n.hue,u.saturation=n.saturation,u.gamma=n.gamma,u.effect=n.effect,u.ignoreNormal=u$_(n.ignoreNormal,!1),u.groupName=u$_(n.groupName,""),u.cacheKey=u$_(n.cacheKey,""),u.customRequestHeaders=n.customRequestHeaders,u.sceneMode=t.mode,u.loadVolumeData=u$_(n.loadVolumeData,!0),u.scene=t,u.useMercatorProject=n.useMercatorProject,u.scpUrl=a,u.queryFieldNames=n.queryFieldNames,u.subdomainConfig=n.subdomainConfig,u.useMercatorProject=n.useMercatorProject,u.cullMode=n.cullMode;var c=Xr(u.baseUri,n.customRequestHeaders,n.urlType,u.scpUrl);o$1l(Gr(l,u.baseUri,n.customRequestHeaders),(function(e){u.waterEffectSet=e,o$1l(c,(function(e){if(u.fieldsInfo=e,e$2b(n.isFlyMode)&&!0===n.isFlyMode&&e$2b(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x22e933(u);t._layers.add(e,o),i.resolve(e)}),1e3)}});else{var r=new _0x22e933(u);s||t._layers.add(r,o),e$2b(t._clipRegions)&&r._setServerClipRegions(t._clipRegions,1),i.resolve(r)}}),(function(){if(!0===n.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x22e933(u);t._layers.add(e,o),i.resolve(e)}});else{var e=new _0x22e933(u);s||t._layers.add(e,o),e$2b(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}),(function(){o$1l(c,(function(e){if(u.fieldsInfo=e,e$2b(n.isFlyMode)&&!0===n.isFlyMode&&e$2b(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x22e933(u);s||t._layers.add(e,o),i.resolve(e)}),1e3)}});else{var r=new _0x22e933(u);s||t._layers.add(r,o),e$2b(t._clipRegions)&&r._setServerClipRegions(t._clipRegions,1),i.resolve(r)}}),(function(){if(!0===n.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x22e933(u);t._layers.add(e,o),i.resolve(e)}});else{var e=new _0x22e933(u);s||t._layers.add(e,o),e$2b(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}))}),(function(l){u$Q(e,n.customRequestHeaders).then((function(l){var u=wr(l,e,n.serverType);u.context=t.context,u.gl=t.context._gl,u.name=r,u.supportCompressType=t._supportCompressType,u.urlType=n.urlType,u.cullEnabled=n.cullEnabled,u.horizontalLine=n.horizontalLine,u.style3D=n.style3D,u.selectEnable=n.selectable,u.isVisible=n.isVisible,u.minVisibleAltitude=n.minVisibleAltitude,u.maxVisibleAltitude=n.maxVisibleAltitude,u.minVisibleDistance=n.minVisibleDistance,u.maxVisibleDistance=n.maxVisibleDistance,u.shadowType=n.shadowType,u.heading=n.heading,u.lodRangeScale=n.lodRangeScale,u.polygonOffset=n.polygonOffset,u.brightness=n.brightness,u.constrast=n.constrast,u.hue=n.hue,u.saturation=n.saturation,u.gamma=n.gamma,u.effect=n.effect,u.ignoreNormal=u$_(n.ignoreNormal,!1),u.groupName=u$_(n.groupName,""),u.cacheKey=u$_(n.cacheKey,""),u._isJson=!0,u.sceneMode=t.mode,u.scene=t,u.useMercatorProject=n.useMercatorProject,u.scpUrl=a,u.queryFieldNames=n.queryFieldNames,u.subdomainConfig=n.subdomainConfig,u.customRequestHeaders=n.customRequestHeaders,u.useMercatorProject=n.useMercatorProject,u.cullMode=n.cullMode;var c=Kr(u.baseUri,n.customRequestHeaders,u.attributeExtentName,u.urlType);o$1l(Yr(l,u.baseUri,n.customRequestHeaders),(function(e){u.waterEffectSet=e,Mr(c,t,i,u,o,n,s)}),(function(){Mr(c,t,i,u,o,n,s)}))}),(function(e){i.reject("add s3m layer failed,"+e)}))})).otherwise((function(e){i.reject("add s3m layer failed,"+e)}))}function Er(e,t,i){var n=i&&i.lexicographical,r=i&&i.zeroExtend,o=e.split("."),a=t.split(".");function s(e){return(n?/^\d+[A-Za-z]*$/:/^\d+$/).test(e)}if(!o.every(s)||!a.every(s))return NaN;if(r){for(;o.length<a.length;)o.push("0");for(;a.length<o.length;)a.push("0")}n||(o=o.map(Number),a=a.map(Number));for(var l=0;l<o.length;++l){if(a.length==l)return 1;if(o[l]!=a[l])return o[l]>a[l]?1:-1}}function Ur(e,t,i){return u$Q(e,i).then((function(i){if(!(i.length<1)){var n=void 0;if(e$2b(t)){for(var r=0;r<i.length;r++){var o=i[r];if(o.name===t){n=o;break}}if(!e$2b(n))return void console.error("no named scene was found!")}else n=i[0];var a=new h$16(e);return a.path=new h$16(n.path).path,{name:n.name,path:a.toString()}}}))}function $r(e,t,i){var n=e+"/layers.json";return e$2b(a$O.CREDENTIAL)&&(n=e$2b(a$O.CREDENTIAL._keymap[i])?a$O.addTokenWithKey(i,n):a$O.addToken(n)),u$Q(n,t).then((function(e){for(var t={s3m:[],imagery:[],s3mGroup:[],terrain:void 0},i=0,n=e.length;i<n;i++){var r=e[i],o=r.layer3DType;"OSGBLayer"==o?t.s3m.push(r):"ImageFileLayer"==o?t.imagery.push(r):"TerrainFileLayer"==o?t.terrain=r:"OSGBGroup"==o&&t.s3mGroup.push(r)}return t}))}Object.defineProperties(De$1.prototype,{}),De$1.prototype.open=function(e,t,i){i=u$_(i,{});var n=/({.*?})/g;if(e.indexOf("?token")>-1&&e.indexOf("realspace")>-1){var r=new h$16(e),o=m$1a(r.query);r.query=void 0,e=r.toString();var a={};if(e$2b(i.subdomains))for(let t=0;t<i.subdomains.length;t++){var s=e.replace(/({.*?})/g,i.subdomains[t]);a={rooturl:s,type:"token",value:o.token},e$2b(a$O.CREDENTIAL)?s in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([a]):a$O.CREDENTIAL=new a$O([a])}else{if(n.test(e))throw new t$16("detected subdomain url scheme, but no subdomain provided.");a={rooturl:e,type:"token",value:o.token},e$2b(a$O.CREDENTIAL)?e in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([a]):a$O.CREDENTIAL=new a$O([a])}}if("realspace"!=e.slice(-9))throw new t$16("open scene url error!");i=u$_(i,{}),this.customRequestHeaders=u$_(this.customRequestHeaders,i.customRequestHeaders);var l=u$_(i.useMercatorProject,!1),u=u$_(i.autoSetView,!0),c=e,h=i.subdomains;if(e$2b(h))e=e.replace(n,(function(e,t){if(!e$2b(h.length))throw new t$16("detected subdomain url scheme, but no subdomain provided.");if("{s}"===t)return h[0]}));else if(n.test(e))throw new t$16("detected subdomain url scheme, but no subdomain provided.");var d=e+"/scenes.json";e$2b(a$O.CREDENTIAL)&&(d=e$2b(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,d):a$O.addToken(d));var f=this,p=this._scene,_=this.camera,m=o$1l.defer();return Ur(d,t,f._customRequestHeaders).then((function(t){if(e$2b(t)){var n=t.path.indexOf("?");-1!==n&&(t.path=t.path.substring(0,n));var r=t.path+".json";e$2b(a$O.CREDENTIAL)&&(r=e$2b(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,r):a$O.addToken(r)),ea$1(r,f._customRequestHeaders).then((function(t){try{var i,n;if(e$2b(t.clipRegions)){for(var r=[],o=0;o<t.clipRegions.length;o++){for(var a=[],s=0;s<t.clipRegions[o].points.length;s++)a.push(t.clipRegions[o].points[s].x),a.push(t.clipRegions[o].points[s].y),a.push(t.clipRegions[o].points[s].z||0);r.push(a)}p._clipRegions=r}n=-1!==e.indexOf("/iserver")?e.substring(0,e.indexOf("/iserver")+8)+"/_setup.json":e.substring(0,e.indexOf("/realspace")+10)+"/_setup.json",e$2b(a$O.CREDENTIAL)&&(n=e$2b(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,n):a$O.addToken(n)),"NONEARTHFLAT"===t.sceneType?u$Q(n,f._customRequestHeaders).then((function(e){if(p.mode=C$13.COLUMBUS_VIEW,!e$2b(e.systemUGOVersion)||Er("11.1.0.22305",e.systemUGOVersion)>0?t.camera.tilt-=Math.PI:t.camera.tilt-=Math.PI/2,i=new o$1p(t.camera.longitude,t.camera.latitude,t.camera.altitude),l){var n=(new t$O).unproject(i);i=p.camera._projection.project(n)}var r=i.x,o=i.y;r>20037508.342789244&&(r-=20037508.342789244*Math.floor(r/20037508.342789244)),o>10018754.171394622&&(o-=20037508.342789244*Math.floor((o+10018754.171394622)/20037508.342789244)),i.x=r,i.y=o,u&&_.setView({destination:i,orientation:{heading:t.camera.heading,pitch:t.camera.tilt,roll:0},convert:!1})})).otherwise((function(){if(p.mode=C$13.COLUMBUS_VIEW,t.camera.tilt-=Math.PI/2,i=new o$1p(t.camera.longitude,t.camera.latitude,t.camera.altitude),l){var e=(new t$O).unproject(i);i=p.camera._projection.project(e)}var n=i.x,r=i.y;n>20037508.342789244&&(n-=20037508.342789244*Math.floor(n/20037508.342789244)),r>10018754.171394622&&(r-=20037508.342789244*Math.floor((r+10018754.171394622)/20037508.342789244)),i.x=n,i.y=r,u&&_.setView({destination:i,orientation:{heading:t.camera.heading,pitch:t.camera.tilt,roll:0},convert:!1})})):(t.camera.tilt-=90,i=o$1p.fromDegrees(t.camera.longitude,t.camera.latitude,t.camera.altitude),u&&_.setView({destination:i,orientation:{heading:e$2a.toRadians(t.camera.heading),pitch:e$2a.toRadians(t.camera.tilt),roll:0},convert:!1}),u$Q(n,f._customRequestHeaders).then((function(e){if((!e$2b(e.systemUGOVersion)||Er("10.1.0.18325",e.systemUGOVersion)>0)&&-90!==t.camera.tilt){var n=new f$17(i,_.direction),r=g$1h.rayEllipsoid(n,t$13.WGS84);if(r){var o=o$1p.normalize(i,new o$1p);o$1p.negate(o,o);var a=new f$17(i,o),s=g$1h.rayEllipsoid(a,t$13.WGS84);if(s){var l=r.start>0?r.start:r.stop,u=f$17.getPoint(n,l,new o$1p),c=s.start>0?s.start:s.stop,h=f$17.getPoint(a,c,new o$1p),d=o$1p.cross(u,h,new o$1p),f=o$1p.angleBetween(u,h);_.rotate(d,-f)}}}})))}catch(e){m.reject("camera set view failed,"+e)}})).otherwise((function(e){m.reject("get scene config failed,"+e)})),$r(t.path,f._customRequestHeaders,e).then((function(n){for(var r=n.s3m,o=n.imagery,a=n.terrain,s=n.s3mGroup,u=t.path+"/layers/",d=[],_=r.length-1,g=_;g>=0;g--){var x=r[g],v=u+encodeURIComponent(x.name)+"/extendxml.xml";e$2b(a$O.CREDENTIAL)&&(v=e$2b(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,v):a$O.addToken(v)),function(t){t=p.layers._s3mLayerAddedIndex;var i=sr(v,f._customRequestHeaders).then((function(i){try{var n=e+"/datas/"+encodeURIComponent(i.name)+"/config";if(i.customRequestHeaders=f._customRequestHeaders,i.useMercatorProject=l,i.subdomainConfig={subdomains:h,urlScheme:c},!e$2b(i.groupName)||""===i.groupName)return f.addS3MTilesLayerByScp(n,i,t);var r=p.layers.find(i.groupName),o=!r;if(!r){var a={scene:p,name:i.groupName};r=new _0x40a7a7(a),p.layers.add(r)}if(i.index=t,i.ready=!1,r._layerConfigs.set(n,i),r._s3mURLs[t]=n,o)return r}catch(e){m.reject("add S3M layer"+i.name+" failed,"+e)}})).otherwise((function(e){m.reject("get S3M layer config failed,"+e+",layer name is "+x.name)}));p.layers._s3mLayerAddedIndex++,e$2b(i)&&d.push(i)}(_-g)}for(g=s.length-1;g>=0;g--){x=s[g],v=u+encodeURIComponent(x.name)+"/extendxml.xml";e$2b(a$O.CREDENTIAL)&&(v=e$2b(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,v):a$O.addToken(v)),function(t){var i=sr(v,f._customRequestHeaders).then((function(i){try{var n=e+"/datas/"+encodeURIComponent(i.name)+"/config";return f.addS3MGroupLayer(n,i,t)}catch(e){m.reject("add S3MGroup layer"+i.name+" failed,"+e)}})).otherwise((function(e){m.reject("get S3MGroup layer config failed,"+e+",layer name is "+x.name)}));d.push(i)}(s.length-1-g)}for(g=o.length-1;g>=0;g--){var y=c+"/datas/"+encodeURIComponent(o[g].name),$=new H$4({url:y,subdomains:h,customRequestHeaders:f._customRequestHeaders});try{var b=p.imageryLayers.addImageryProvider($);o[g].maxVisibleAltitude>0&&(b.maxHeight=o[g].maxVisibleAltitude,b.minHeight=o[g].minVisibleAltitude),d.push(b)}catch(e){m.reject("add imagery layer "+o[g].name+" failed,"+e)}}if(e$2b(a)){var T=c+"/datas/"+encodeURIComponent(a.name);try{p.terrainProvider=new ne$x({url:T,isSct:!0,subdomains:h,customRequestHeaders:f._customRequestHeaders,invisibility:u$_(i.invisibility,!1)}),d.push(p.terrainProvider)}catch(e){m.reject("add terrain layer "+a.name+" failed,"+e)}}o$1l.all(d,(function(e){for(var t=[],i=0;i<e.length;i++)e$2b(e[i])&&t.push(e[i]);m.resolve(t)}),(function(e){m.reject("add all layers failed,"+e)}))})).otherwise((function(e){m.reject("get layer list failed,"+e)}))}else m.reject("scene list response null!")})).otherwise((function(e){m.reject("get scene list failed,"+e)})),m.promise},De$1.prototype.addS3MTilesLayerByScp=function(e,t,i,n){t=u$_(t,{});var r=/({.*?})/g;if(e.indexOf("?token")>-1){var o=new h$16(e),a=m$1a(o.query);o.query=void 0,e=o.toString();var s={};if(e$2b(t.subdomains))for(let i=0;i<t.subdomains.length;i++){var l=e.replace(/({.*?})/g,t.subdomains[i]);s={rooturl:l,type:"token",value:a.token},e$2b(a$O.CREDENTIAL)?l in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([s]):a$O.CREDENTIAL=new a$O([s])}else{if(r.test(e))throw new t$16("detected subdomain url scheme, but no subdomain provided.");s={rooturl:e,type:"token",value:a.token},e$2b(a$O.CREDENTIAL)?e in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([s]):a$O.CREDENTIAL=new a$O([s])}}if(!e$2b(e))throw new t$16("add s3m tiles layer,url is required.");if(e$2b(t.subdomains))e=e.replace(r,(function(e,i){if(!e$2b(t.subdomains.length))throw new t$16("detected subdomain url scheme, but no subdomain provided.");if("{s}"===i)return t.subdomains[0]}));else if(r.test(e))throw new t$16("detected subdomain url scheme, but no subdomain provided.");t=t||{};var u=o$1l.defer();n=u$_(n,!1);var c,h,d=e,f=u$_(t.name,f$O(d)),p=this,_=this._scene;if((-1!==e.indexOf("ws://")||-1!==e.indexOf("wss://"))&&(t.useWebsocket=!0),t.useWebsocket)return ir(d,_,u,t,f,i,m,n),u.promise;(c=-1!==e.indexOf("aliyuncs")||-1!==e.indexOf("oss-cn")?Me$2.oss:Me$2.iServer)===Me$2.iServer&&(h=1===t.urlType?e+"&authentication=login":e.substring(0,e.indexOf("rest/realspace")+14));var m=e;return e$2b(a$O.CREDENTIAL)&&(d=e$2b(a$O.CREDENTIAL._keymap[d])?a$O.addTokenWithKey(d,d):a$O.addToken(d)),LicenseChecker.LICENSECHECKER.getLicense(d).then((function(e){LicenseChecker.LICENSECHECKER.check(e)})),c===Me$2.iServer?(t.serverType=Me$2.iServer,e$2b(this.RSAAuthenticationStatus[h])?(0===this.RSAAuthenticationStatus[h]&&(e$2b(ee$2[h])||(ee$2[h]={}),e$2b(ee$2[h][d])||(ee$2[h][d]={scene:_,deferred:u,options:t,layerName:f,index:i})),1===this.RSAAuthenticationStatus[h]&&ir(d,_,u,t,f,i,m,n),2===this.RSAAuthenticationStatus[h]&&u.reject("add s3m layer failed,"+d)):(this.RSAAuthenticationStatus[h]=0,ra$1(h,t.urlType,t.customRequestHeaders,d).then((function(){if(p.RSAAuthenticationStatus[h]=1,ir(d,_,u,t,f,i,m,n),e$2b(ee$2[h]))for(var e in ee$2[h]){var r=u$_(ee$2[h][e].options.groupName,n);ir(e,ee$2[h][e].scene,ee$2[h][e].deferred,ee$2[h][e].options,ee$2[h][e].layerName,ee$2[h][e].index,void 0,r),delete ee$2[h][e]}}),(function(e){p.RSAAuthenticationStatus[h]=2,delete ee$2[h],u.reject("add s3m layer failed,"+e.url)})).otherwise((function(e){p.RSAAuthenticationStatus[h]=2,delete ee$2[h],u.reject("add s3m layer failed,"&e.url)})))):(t.serverType=Me$2.oss,ir(d,_,u,t,f,i,m,n)),u.promise},De$1.prototype.addS3MGroupLayer=function(e,t,i){if(!e$2b(e))throw new t$16("add S3MGroup layer,url is required.");t=t||{};var n=e;e$2b(a$O.CREDENTIAL)&&(n=a$O.addToken(n));var r=u$_(t.name,f$O(n)),o=this,a=o$1l.defer();return u$Q(n).then((function(e){var t={name:r,url:n,layerBounds:e.geobounds,layers:e.layers,scene:o},a=new _0x40a7a7(t);o._layers.add(a,i)})).otherwise((function(e){a.reject("add S3MGroup layer failed,"+e)})),a.promise},De$1.prototype.addLayerService=function(e,t,i){if(!e$2b(e)||!e$2b(t)||!e$2b(i))throw new t$16("url and sceneName and layerName is required!");if("realspace"!=e.slice(-9))throw new t$16("open scene url error!");var n=this,r=e+"/scenes/"+encodeURIComponent(t)+"/layers/"+encodeURIComponent(i)+"/extendxml.xml";e$2b(a$O.CREDENTIAL)&&(r=a$O.addToken(r));var o=o$1l.defer();return sr(r,n._customRequestHeaders).then((function(t){try{var i=e+"/datas/"+encodeURIComponent(t.name)+"/config";t.customRequestHeaders=n._customRequestHeaders;var r=n.addS3MTilesLayerByScp(i,t);o.resolve(r)}catch(e){o.reject("add S3M layer"+t.name+" failed,"+e)}})).otherwise((function(e){o.reject("get S3M layer config failed,"+e+",layer name is "+i)})),o.promise};var Jr=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,Ir=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)\)$/i;function sr(e,t,i){return e$2b(i)||(i=o$1l.defer()),d$1f(e,t).then((function(n){try{var r=Qr(n);i.resolve(r)}catch{sr(e,t,i)}})).otherwise((function(){sr(e,t,i)})),i.promise}function Qr(e){if(!e$2b(e))throw new t$16("get s3m layer config failed,xml document undefined.");var t,i=e.firstChild,n=i.namespaceURI,r=s$S.queryStringValue(i,"LayerName",n),o=s$S.queryFirstNode(i,"GeoBounds",n);if(e$2b(o)){var a=s$S.queryNumericValue(o,"bottom",n),s=s$S.queryNumericValue(o,"left",n),l=s$S.queryNumericValue(o,"top",n),u=s$S.queryNumericValue(o,"right",n);s>180||a>180||u>180||l>180?(s>20037508.342789244&&(s-=20037508.342789244*Math.floor(s/20037508.342789244)),u>20037508.342789244&&(u-=20037508.342789244*Math.floor(u/20037508.342789244)),l>10018754.171394622&&(l-=20037508.342789244*Math.floor((l+10018754.171394622)/20037508.342789244)),a>10018754.171394622&&(a-=20037508.342789244*Math.floor((a+10018754.171394622)/20037508.342789244)),t=new h$18(s/=6378137,a/=6378137,u/=6378137,l/=6378137)):t=h$18.fromDegrees(s,a,u,l)}var c=s$S.queryFirstNode(i,"Options",n),h=s$S.queryStringValue(i,"WithinLayer3DGroup",n),d=s$S.queryBooleanValue(c,"Selectable",n),f=s$S.queryBooleanValue(c,"Visible",n),p=s$S.queryNumericValue(c,"VisibleAltitudeMin",n),_=s$S.queryNumericValue(c,"VisibleAltitudeMax",n);_=0==_?Number.MAX_VALUE:_;var m=s$S.queryNumericValue(c,"VisibleDistanceMin",n),g=s$S.queryNumericValue(c,"VisibleDistanceMax",n),x=s$S.queryStringValue(c,"ShadowType",n),v=0;"SELECTION"==x?v=1:"ALL"==x&&(v=2);var y=!1;"S3MB"==s$S.queryStringValue(i,"CacheFileType",n)&&(y=!0);var $=s$S.queryFirstNode(i,"Style",n);if(!e$2b($)){var b=s$S.queryFirstNode(i,"LayerStyle",n);if(e$2b(b)&&!e$2b($=s$S.queryFirstNode(b,"Style",n)))throw new t$16("get s3m layer config failed,extendxml.xml foamat error,layer name is "+r)}var T=s$S.queryNumericValue($,"LineWidth",n),C=s$S.queryStringValue($,"FillForeColor",n),S=Jr.exec(C),w=new e$1U;if(null!==S){var E=parseFloat(S[1]);E=189==E?255:E;var P=parseFloat(S[2]);P=235==P?255:P,w.red=e$2a.clamp(E/255,0,1),w.green=e$2a.clamp(P/255,0,1),w.blue=e$2a.clamp(parseFloat(S[3])%256/255,0,1),w.alpha=e$2a.clamp(parseFloat(S[3])%65536/256/255,0,1)}var A=s$S.queryFirstNode($,"Style3D",n),L=new e$1s;if(e$2b(A)){var M=s$S.queryStringValue(A,"Fill3DMode",n),R=fr$2.Fill;"FILL_LINE"==M?R=fr$2.WireFrame:"FILL_FACEANDLINE"==M&&(R=fr$2.Fill_And_WireFrame);var I=s$S.queryNumericValue(A,"PointSize",n),O=s$S.queryStringValue(A,"LineColor",n),D=(S=Ir.exec(O),new e$1U);null!==S&&(D.red=e$2a.clamp(parseFloat(S[1]),0,1),D.green=e$2a.clamp(parseFloat(S[2]),0,1),D.blue=e$2a.clamp(parseFloat(S[3]),0,1),D.alpha=e$2a.clamp(parseFloat(S[4]),0,1));var B=s$S.queryNumericValue($,"MarkerSize",n)||0;B*=2,I=Math.max(I,B);var N=s$S.queryStringValue(A,"ColorPoint",n);S=Ir.exec(N);var F=new e$1U;null!==S&&(F.red=e$2a.clamp(parseFloat(S[1]),0,1),F.green=e$2a.clamp(parseFloat(S[2]),0,1),F.blue=e$2a.clamp(parseFloat(S[3]),0,1),F.alpha=e$2a.clamp(parseFloat(S[4]),0,1));var U=s$S.queryNumericValue(A,"BottomAltitude",n);s$S.queryStringValue(A,"AltitudeMode",n);var z=s$S.queryStringValue(A,"BillboardMode",n),G=s$S.queryBooleanValue(A,"FixedPixelSize",n);z="AUTO_Z_AXIAL"==z?yr$1.FixedZ:"FIXED_ANGLE"==z?yr$1.FixedXYZ:yr$1.None;var V=e$2a.toRadians(s$S.queryNumericValue(A,"RotateX",n)),k=e$2a.toRadians(s$S.queryNumericValue(A,"RotateY",n)),W=e$2a.toRadians(s$S.queryNumericValue(A,"RotateZ",n));new i$15(V,k,W),L.fillForeColor=w,L.bottomAltitude=U,L.lineWidth=T,L.lineColor=D,L.pointSize=I,L.pointColor=F,L.fillStyle=R,L.billboardMode=z,L.fixedPixelSize=G}var H=void 0,q=s$S.queryFirstNode(i,"Effect",n);if(e$2b(q)){var j=s$S.queryStringValue(q,"EffectType",n);if("Region"===j){H=new _0x14c08b;var Y=s$S.queryNumericValue(q,"Type",n);H.setValue("RegionType",Y);var X=s$S.queryNumericValue(q,"ForeColor",n),K=e$1U.fromRgba(X);H.setValue("ForeColor",K);var Q=s$S.queryNumericValue(q,"BackColor",n),Z=e$1U.fromRgba(Q);H.setValue("BackColor",Z);var J=s$S.queryNumericValue(q,"WidthX",n);H.setValue("WidthX",J);var ee=s$S.queryNumericValue(q,"WidthY",n);H.setValue("WidthY",ee);var te=s$S.queryNumericValue(q,"OffsetX",n);H.setValue("OffsetX",te);var ie=s$S.queryNumericValue(q,"OffsetY",n);H.setValue("OffsetY",ie);var ne=s$S.queryNumericValue(q,"RepeatX",n);H.setValue("RepeatX",ne);var re=s$S.queryNumericValue(q,"RepeatY",n);H.setValue("RepeatY",re);var oe=s$S.queryNumericValue(q,"RotationAngle",n);H.setValue("RotationAngle",oe)}else if("Polyline"===j){H=new _0x2f60f9;Y=s$S.queryNumericValue(q,"Type",n);H.setValue("PolylineType",Y);var ae=s$S.queryNumericValue(q,"Color",n),se=e$1U.fromRgba(ae);H.setValue("Color",se);var le=s$S.queryNumericValue(q,"Width",n);H.setValue("Width",le);var ue=s$S.queryBooleanValue(q,"IsArrow",n);H.setValue("IsArrow",ue);var ce=s$S.queryNumericValue(q,"GapColor",n),he=e$1U.fromRgba(ce);H.setValue("GapColor",he);var de=s$S.queryNumericValue(q,"DashLength",n);H.setValue("DashLength",de);var fe=s$S.queryNumericValue(q,"DashPattern",n);H.setValue("DashPattern",fe);var pe=s$S.queryBooleanValue(q,"IsMove",n);H.setValue("IsMove",pe);var _e=s$S.queryNumericValue(q,"GlowPower",n);H.setValue("GlowPower",_e);var me=s$S.queryNumericValue(q,"OutlineColor",n),ge=e$1U.fromRgba(me);H.setValue("OutlineColor",ge);var xe=s$S.queryNumericValue(q,"OutlineWidth",n);H.setValue("OutlineWidth",xe)}}var ve=s$S.queryNumericValue(i,"LODRangeScale",n),ye=s$S.queryFirstNode(i,"PolygonOffset",n),$e=s$S.queryNumericValue(ye,"Constant",n),be=s$S.queryNumericValue(ye,"SlopeScale",n),Te=0!==$e&&0!==be,Ce=s$S.queryFirstNode(i,"ColorParams",n);return{name:r,groupName:h,layerBounds:t,isS3MB:y,style3D:L,selectEnable:d,isVisible:f,minVisibleAltitude:p,maxVisibleAltitude:_,minVisibleDistance:m,maxVisibleDistance:g,shadowType:v,heading:W,lodRangeScale:ve,polygonOffset:{enabled:Te,units:$e,factor:be},brightness:s$S.queryNumericValue(Ce,"Brightness",n),constrast:s$S.queryNumericValue(Ce,"Constrast",n),hue:s$S.queryNumericValue(Ce,"Hue",n),saturation:s$S.queryNumericValue(Ce,"Saturation",n),gamma:s$S.queryNumericValue(Ce,"Gamma",n),effect:H,cullMode:s$S.queryStringValue(i,"RenderCullMode",n)}}function ea$1(e,t){return u$Q(e,t).then((function(e){return e}))}function ra$1(e,t,i,n){var r,o,a=o$1l.defer();return 1===t?(r=e,o=e):(r=e+"/login.json",o=e+"/login.json"),e$2b(a$O.CREDENTIAL)&&(n=n.substring(0,n.indexOf("?")),e$2b(a$O.CREDENTIAL._keymap[n])?(r=a$O.addTokenWithKey(n,r),o=a$O.addTokenWithKey(n,o)):(r=a$O.addToken(r),o=a$O.addToken(o))),u$Q(r,i).then((function(t){var n=Number(t.jsessionID),r=aa$1(Number(t.random),397245148883021,0x8f461e7bf61d5),s={jsessionID:n.toString(),random:r.toString()},l=new XMLHttpRequest;if(u$X.contains(e)&&(l.withCredentials=!0),l.open("POST",o,!0),l.onreadystatechange=function(){if(4===l.readyState)if(200===l.status||201===l.status){var e={};try{e=JSON.parse(l.response)}catch{-1!==(l.response||l.responseText).toString().indexOf("isSucceed : true")&&(e.succeed=!0)}!0===e.succeed?a.resolve(!0):a.reject(!1)}else a.reject(!1)},e$2b(i))for(var u in i)i.hasOwnProperty(u)&&l.setRequestHeader(u,i[u]);l.send(JSON.stringify(s))}),(function(e){a.reject({status:!1,url:n})})).otherwise((function(){a.reject({status:!1,url:n})})),a.promise}function aa$1(e,t,i){for(var n=new tr(e),r=new tr(t),o=new tr(1),a=new tr(2),s=new tr(1);r.toNumber()>0;)0===r.mod(a).toNumber()?(r=r.dividedBy(a),n=n.multipliedBy(n).mod(i)):(r=r.minus(s),o=o.multipliedBy(n).mod(i));return o.toNumber()}De$1.prototype.isDestroyed=function(){return!1},De$1.prototype.destroy=function(){return i$10(this)};var Te$1=function(e){return function(){e.frameState.afterRender.push((function(){e.requestRender()}))}};function pi(e,t,i){this.ray=e,this.width=t,this.primitives=i,this.ready=!1,this.deferred=o$1l.defer(),this.promise=this.deferred.promise}function w$3(e){var t,i=(e=u$_(e,u$_.EMPTY_OBJECT)).canvas,n=e.contextOptions,r=e.creditContainer,o=e.creditViewport;if(!e$2b(i))throw new t$16("options and options.canvas are required.");t=e$2b(e.contextOptions)&&e.contextOptions.contextType===De$h.WebGPU?new f$8(i,n,e.engine):new g$a(i,n);var a=e$2b(r);a||((r=document.createElement("div")).style.position="absolute",r.style.bottom="0",r.style["text-shadow"]="0 0 2px #000000",r.style.color="#ffffff",r.style["font-size"]="10px",r.style["padding-right"]="5px",i.parentNode.appendChild(r)),e$2b(o)||(o=i.parentNode),this._id=e$1Q(),this._jobScheduler=new o$e,this._frameState=new h$f(t,new r$l(r,"_",o),this._jobScheduler),this._frameState.scene3DOnly=u$_(e.scene3DOnly,!1),this._removeCreditContainer=!a,this._creditContainer=r;var s=new n$Z(t);s.viewport=new f$18,s.viewport.x=0,s.viewport.y=0,s.viewport.width=t.drawingBufferWidth,s.viewport.height=t.drawingBufferHeight,this._passState=s,this._canvas=i,this._context=t,this._computeEngine=new f$n(t),this._globe=void 0,this._globeTranslucencyState=new F$b,this._globeHeight=void 0,this._cameraUnderground=!1,this._primitives=new o$x,this._groundPrimitives=new o$x,this._asyncRayPicks=[],this._logDepthBuffer=t.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new s$a,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._overlayAgainstDepthCommandList=[],this._logDepthOverlayCommandList=[],this._useOIT=u$_(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new c$c,this._clearColorCommand=new t$X({color:new e$1U,stencil:0,owner:this}),this._depthOnlyRenderStateCache={},this._pickRenderStateCache={},this._transitioner=new R$8(this),this._preUpdate=new o$1h,this._postUpdate=new o$1h,this._renderError=new o$1h,this._preRender=new o$1h,this._postRender=new o$1h,this._pickPositionCache={},this._pickPositionCacheDirty=!1,this._minimumDisableDepthTestDistance=0,this.frustumTolerance=0,this._msaaSamples=e.contextOptions?u$_(e.contextOptions.msaaLevel,1):1,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new o$1h,this.morphComplete=new o$1h,this.skyBox=void 0,this._cloudBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=e$1U.clone(e$1U.BLACK),this._mode=C$13.SCENE3D,this._mapProjection=e$2b(e.mapProjection)?e.mapProjection:new n$1b,this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e11,this.nearToFarDistance2D=175e4,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowGlobeDepth=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.fog=new g$i,this._sunCamera=new v$K(this),this.shadowMap=new C$Y({context:t,lightCamera:this._sunCamera,enabled:u$_(e.shadows,!1),pcss:u$_(e.pcss,!0),shadowQuality:u$_(e.shadowQuality,0)}),this._analysisShadowMap=void 0,this.invertClassification=!1,this.invertClassificationColor=e$1U.clone(e$1U.WHITE),this._actualInvertClassificationColor=e$1U.clone(this._invertClassificationColor),this._invertClassification=new t$a,this.focalLength=void 0,this.eyeSeparation=void 0,this._brdfLutGenerator=new t$d,this._terrainExaggeration=u$_(e.terrainExaggeration,1),this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new _a(this),this._mapMode2D=u$_(e.mapMode2D,Rr$2.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostEffect:!1,usePostProcessSelected:!1,useWebVR:!1,usePrepass:!1},this._environmentVisible={isSunVisible:!0,isMoonVisible:!0,isSkyAtmosphereVisible:!0,isSkyBoxVisible:!0,isGlobalVisible:!0,isObjectVisible:!0,isOnlyS3MObjectVisible:!1,isBillboardVisible:!0},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=u$_(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=u$_(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=r$1a.requestCompletedEvent.addEventListener(Te$1(this)),this._removeTaskProcessorListenerCallback=i$V.taskCompletedEvent.addEventListener(Te$1(this)),this._removeGlobeCallbacks=[];var l=new f$18(0,0,t.drawingBufferWidth,t.drawingBufferHeight),u=new v$K(this);this._logDepthBuffer&&(u.frustum.near=.1,u.frustum.far=1e10),this.preloadFlightCamera=new v$K(this),this.preloadFlightCullingVolume=void 0,this._picking=new d$g(this);var c=new f$18(0,0,1,1),h=new v$K(this);h.frustum=new a$V({width:.1,aspectRatio:1,near:.1}),this._view=new L$c(this,u,l),this._pickOffscreenView=new L$c(this,h,c),this.pickOffscreenDefaultWidth=.1,this._defaultView=new L$c(this,u,l),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this._sunColor=new o$1p(1.8,1.85,2),this._lightGroup=Ze$3.SUN_LIGHT,this._presetLightSource=[],this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentMapAtlas=void 0,this._supportCompressType=0,t.s3tc?this._supportCompressType=1:t.pvrtc?this._supportCompressType=2:t.etc1&&(this._supportCompressType=3),this._plotLayers=new _0x5291a3,this._layers=new u$k,ti$3._attachLayers(this._layers),this._undergroundMode=!1,this._undergroundDepth=1e4,this._analyst3D=new u$k,this._vectorTileMaps=new u$k,this._vectorTileSource=new e$1N,this._multiViewportMode=B$e.NONE,this._multiViewportInfo=[],this._renderPipeline=new _0x485985(this),this.postProcessStages=new _$a(this._renderPipeline),this._lightSource=new s$I(t),this.compositor=new o$l(t),kt(this,0,a$15.now()),W$6(this),this.initializeFrame(),this._pickPointEnabled=!1,this._pickPointInterval=200,this._pos=void 0,this._pickPointTolerance=3,this._pickTolerance=3,this._pickDepthTolerance=0,this._rasterPickTexture=void 0,this._rasterPickFBO=void 0,this.voxelGridPostRender=new a$5({}),this.particlePostRender=new u$b({}),this.particleTrailsPostRenderer=new r$f({}),this._pickResult={pickFrameNumber:-1,pickObject:void 0},this._walkingMode=Ct.NONE,this._pickRect=void 0,this._isUpdatePickCommand=!1,this._pickRectFramebuffer=void 0,this._mvtVisibleControl=!1,this._mvtVisibleLevel=0,this._maskEnabled=!1,this._enableCompositor=!0,this._overlapDisplayedThreshold=0,this._overlapDisplayOptions={allowIconWithTextDisplay:!0},this._pbrMaterlParameters=[],this._saveLocalCachePerformance=!0,this._toneMappingExposure=1,this._envMapIntensity=1,this._sceneConfigLoader=new De$1(e,this),this._silverLightingAtmosphere=new n$6,t.uniformState._silverLightingAtmosphere=this._silverLightingAtmosphere,t.uniformState._sceneUBO._initUniformMap(t),o$15.isNDCHalfZRange=t.webgpu,this._waterReflectionDistinctQuality=5}function ci(e,t){for(var i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;var n=[];e$2b(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(Te$1(e))),n.push(t.terrainProviderChanged.addEventListener(Te$1(e)))),e._removeGlobeCallbacks=n}function vi(e,t){e.enableVertexCapture(t)}function _i(e,t){e.disableVertexCapture(t)}function Dt(e,t,i){var n=e._frameState,r=e._context,o=e._view.oit,a=n.shadowState.lightShadowMaps,s=n.shadowState.lightShadowsEnabled,l=e._environmentState.usePrepass,u=t.derivedCommands;e$2b(t.pickId)&&(u.picking=l$i.createPickDerivedCommand(e,t,r,u.picking)),!t.pickOnly&&t.pass!==Le$s.TERRAIN_CLASSIFICATION&&t.pass!==Le$s.ClampObject&&(u.depth=l$i.createDepthOnlyDerivedCommand(e,t,r,u.depth)),n.passes.normal&&(u.normal=l$i.createNormalDerivedCommand(t,r)),u.originalCommand=t,e._hdr&&(u.hdr=l$i.createHdrCommand(t,r,u.hdr),u=(t=u.hdr.command).derivedCommands),l&&t.pass==Le$s.S3MTiles&&(u.prepass=l$i.createPrepassDerivedCommand(e,t,r,u.prepass)),s&&t.receiveShadows&&(u.shadows=C$Y.createReceiveDerivedCommand(a,t,i,r,u.shadows)),t.pass===Le$s.TRANSLUCENT&&e$2b(o)&&o.isSupported()&&(s&&t.receiveShadows?(u.oit=e$2b(u.oit)?u.oit:{},u.oit.shadows=o.createDerivedCommands(u.shadows.receiveCommand,r,u.oit.shadows)):u.oit=o.createDerivedCommands(t,r,u.oit)),t.pass===Le$s.Voxel_Billboard&&e$2b(e.voxelGridPostRender)&&e.voxelGridPostRender.createDerivedCommands(t),t.pass===Le$s.Particle&&e$2b(e.particlePostRender)&&e.particlePostRender.createDerivedCommands(t),e._maskEnabled&&(u.mask=l$i.createMaskCommand(t,r,u.mask))}Object.defineProperties(w$3.prototype,{waterReflectionDistinctQuality:{get:function(){return this._waterReflectionDistinctQuality},set:function(e){this._waterReflectionDistinctQuality=Math.min(Math.floor(e),5)}},toneMappingExposure:{get:function(){return this._toneMappingExposure},set:function(e){this._toneMappingExposure=e}},envMapIntensity:{get:function(){return this._envMapIntensity},set:function(e){this._envMapIntensity=e}},canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},maximumAliasedLineWidth:{get:function(){return e$1T.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return e$1T.maximumCubeMapSize}},pickPositionSupported:{get:function(){return!0}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return u$B.isSupported(this._context)}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,ci(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(e$2b(this.globe))return this.globe.imageryLayers}},terrainLayers:{get:function(){if(e$2b(this.globe))return this.globe.terrainLayers}},terrainProvider:{get:function(){if(e$2b(this.globe))return this.globe.terrainProvider},set:function(e){e$2b(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(e$2b(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},customRequestHeaders:{get:function(){return this._sceneConfigLoader._customRequestHeaders},set:function(e){this._sceneConfigLoader._customRequestHeaders=e}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){if(this.scene3DOnly&&e!==C$13.SCENE3D)throw new t$16("Only SceneMode.SCENE3D is valid when scene3DOnly is true.");if(e===C$13.SCENE2D)this.morphTo2D(0);else if(e===C$13.SCENE3D)this.morphTo3D(0);else{if(e!==C$13.COLUMBUS_VIEW)throw new t$16("value must be a valid SceneMode enumeration.");this.morphToColumbusView(0)}this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},terrainExaggeration:{get:function(){return this._terrainExaggeration},set:function(e){this._terrainExaggeration!==e&&e$2b(this.globe)&&this.globe._surface.invalidateAllTiles(),this._terrainExaggeration=e}},useWebVR:{get:function(){return this._useWebVR},set:function(e){if(this.camera.frustum instanceof a$V)throw new t$16("VR is unsupported with an orthographic projection.");this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new v$K(this),e$2b(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new h$g(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},imagerySplitPosition:{get:function(){return this._frameState.imagerySplitPosition},set:function(e){this._frameState.imagerySplitPosition=e}},globeSplitPosition:{get:function(){return this._frameState.globeSplitPosition},set:function(e){this._frameState.globeSplitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){if(!e$2b(e)||e<0)throw new t$16("minimumDisableDepthTestDistance must be greater than or equal to 0.0.");this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0,this._defaultView.updateFrustums=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){var t=this._context,i=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=i!==this._hdr,this._hdr=i}},highDynamicRangeSupported:{get:function(){var e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},sunColor:{get:function(){return this._sunColor},set:function(e){this._sunColor=e}},opaqueFrustumNearOffset:{get:function(){return this._frameState.useLogDepth?.9:.9999}},layers:{get:function(){return this._layers}},plotLayers:{get:function(){return this._plotLayers}},multiViewportMode:{get:function(){return this._multiViewportMode},set:function(e){switch(this._multiViewportInfo.length=0,e){case B$e.NONE:this._frameState.multiViewportIndex=-1;break;case B$e.HORIZONTAL:this._multiViewportInfo[0]=new f$18(0,0,.5,1),this._multiViewportInfo[1]=new f$18(.5,0,.5,1);break;case B$e.VERTICAL:this._multiViewportInfo[0]=new f$18(0,.5,1,.5),this._multiViewportInfo[1]=new f$18(0,0,1,.5);break;case B$e.QUAD:this._multiViewportInfo[0]=new f$18(0,.5,.5,.5),this._multiViewportInfo[1]=new f$18(.5,.5,.5,.5),this._multiViewportInfo[2]=new f$18(.5,0,.5,.5),this._multiViewportInfo[3]=new f$18(0,0,.5,.5);break;case B$e.TRIPLE:this._multiViewportInfo[2]=new f$18(0,.5,.5,.5),this._multiViewportInfo[1]=new f$18(.5,.5,.5,.5),this._multiViewportInfo[0]=new f$18(0,0,1,.5);break;case B$e.VerticalTrisection:this._multiViewportInfo[2]=new f$18(2/3,0,1/3,1),this._multiViewportInfo[1]=new f$18(1/3,0,1/3,1),this._multiViewportInfo[0]=new f$18(0,0,1/3,1);break;case B$e.FIVE_DIVISIONS:this._multiViewportInfo[4]=new f$18(0,0,.5,.5),this._multiViewportInfo[3]=new f$18(0,.5,.5,.5),this._multiViewportInfo[2]=new f$18(.5,0,.5,1/3),this._multiViewportInfo[1]=new f$18(.5,1/3,.5,1/3),this._multiViewportInfo[0]=new f$18(.5,2/3,.5,1/3);break;case B$e.SIX_DIVISIONS:this._multiViewportInfo[5]=new f$18(2/3,0,1/3,1/3),this._multiViewportInfo[4]=new f$18(2/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new f$18(2/3,2/3,1/3,1/3),this._multiViewportInfo[2]=new f$18(1/3,0,1/3,1/3),this._multiViewportInfo[1]=new f$18(0,0,1/3,1/3),this._multiViewportInfo[0]=new f$18(0,1/3,2/3,2/3);break;case B$e.SEVEN_DIVISIONS:this._multiViewportInfo[6]=new f$18(0,0,.3,.5),this._multiViewportInfo[5]=new f$18(.3,0,.4,1/3),this._multiViewportInfo[4]=new f$18(.7,0,.3,.5),this._multiViewportInfo[3]=new f$18(.7,.5,.3,.5),this._multiViewportInfo[2]=new f$18(.3,2/3,.4,1/3),this._multiViewportInfo[1]=new f$18(0,.5,.3,.5),this._multiViewportInfo[0]=new f$18(.3,1/3,.4,1/3);break;case B$e.EIGHT_DIVISIONS:this._multiViewportInfo[0]=new f$18(.5,0,.5,1/3),this._multiViewportInfo[1]=new f$18(0,0,.5,1/3),this._multiViewportInfo[2]=new f$18(2/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new f$18(1/3,1/3,1/3,1/3),this._multiViewportInfo[4]=new f$18(0,1/3,1/3,1/3),this._multiViewportInfo[5]=new f$18(2/3,2/3,1/3,1/3),this._multiViewportInfo[6]=new f$18(1/3,2/3,1/3,1/3),this._multiViewportInfo[7]=new f$18(0,2/3,1/3,1/3);break;case B$e.NINE_DIVISIONS:this._multiViewportInfo[8]=new f$18(2/3,0,1/3,1/3),this._multiViewportInfo[7]=new f$18(1/3,0,1/3,1/3),this._multiViewportInfo[6]=new f$18(0,0,1/3,1/3),this._multiViewportInfo[5]=new f$18(2/3,1/3,1/3,1/3),this._multiViewportInfo[4]=new f$18(1/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new f$18(0,1/3,1/3,1/3),this._multiViewportInfo[2]=new f$18(2/3,2/3,1/3,1/3),this._multiViewportInfo[1]=new f$18(1/3,2/3,1/3,1/3),this._multiViewportInfo[0]=new f$18(0,2/3,1/3,1/3);break;default:throw new t$16("the mode is error")}e!==B$e.NONE&&this._multiViewportMode===B$e.NONE?(this._frameState.creditDisplay.container.style.visibility="hidden",!e$2b(this._deviceOrientationCameraController)&&this._useWebVR&&(this._deviceOrientationCameraController=new h$g(this),this._aspectRatioVR=this._camera.frustum.aspectRatio)):e===B$e.NONE&&this._multiViewportMode!==B$e.NONE&&(this._frameState.creditDisplay.container.style.visibility="visible",this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this.drawingBufferWidth/this.drawingBufferHeight),this._multiViewportMode=e}},undergroundMode:{get:function(){return this._undergroundMode},set:function(e){e$2b(e)&&(this._undergroundMode=e)}},undergroundDepth:{get:function(){return this._undergroundDepth},set:function(e){this._undergroundDepth=e}},lightSource:{get:function(){return this._lightSource}},cloudBox:{get:function(){return this._cloudBox},set:function(e){e$2b(e)||e$2b(this._cloudBox)&&this.cloudBox.remove(),this._cloudBox=e}},enableOcclude:{get:function(){return this._enableOcclude},set:function(e){this._enableOcclude=e}},bloomEffect:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Scene_bloomEffect"),this.compositor.bloomEffect}},scanEffect:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Scene_scanEffect"),this.compositor.scanEffect}},depthOfFieldEffect:{get:function(){return this.compositor.depthOfFieldEffect}},ssaoEffect:{get:function(){return this.compositor.SSAOEffect}},colorCorrection:{get:function(){return this.compositor.colorCorrection}},hdrEnabled:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Scene_hdrEnabled"),this._hdr},set:function(e){LicenseChecker.LICENSECHECKER.verify("Scene_hdrEnabled");var t=this._context,i=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=i!==this._hdr,this._hdr=i}},toneMappingEnabled:{get:function(){return this.compositor.toneMappingEnabled},set:function(e){return this.compositor.toneMappingEnabled=e}},pickPoint:{get:function(){return this._pos}},pickPointEnabled:{get:function(){return this._pickPointEnabled},set:function(e){this._pickPointEnabled=e;for(var t=0;t<this._layers._layerQueue.length;t++){var i={};i.layer=this._layers._layerQueue[t],i.layer instanceof _0x22e933&&(e?i.layer.traverseRenderEntity(i,vi):i.layer.traverseRenderEntity(i,_i))}}},pickPointInterval:{get:function(){return this._pickPointInterval},set:function(e){this._pickPointInterval=e}},pickPointTolerance:{get:function(){return this._pickPointTolerance},set:function(e){this._pickPointTolerance=e}},pickDepthTolerance:{get:function(){return this._pickDepthTolerance},set:function(e){this._pickDepthTolerance=e}},rasterVectorCollection:{get:function(){return this.globe._rasterVectorCollection}},walkingMode:{get:function(){return this._walkingMode},set:function(e){if(e!==this._walkingMode){this._walkingMode=e;var t=this._screenSpaceCameraController;t.previousHeight=void 0,e===Ct.ByKeyboard?(t.enableWalk=!0,t.enableLook=!1,this.mode===C$13.SCENE3D?t.enableTranslate=!1:this.mode===C$13.COLUMBUS_VIEW&&(t.enableTranslate=!0)):(t.enableWalk=!1,t.enableTranslate=!0,t.enableZoom=!0,t.enableTilt=!0,t.enableLook=!0)}}},enableOutline:{get:function(){var e=this.layers.getSelectedLayer();return!(!e$2b(e)||e.getSelection().length<1)&&e.selectColorType===Zr$2.SILHOUETTE_EDGE}},maskEnabled:{get:function(){return this._maskEnabled}},lightGroup:{get:function(){return this._lightGroup},set:function(e){e!==this._lightGroup&&(this._lightGroup=e,Ci(this,e))}},enableCompositor:{get:function(){return this._enableCompositor},set:function(e){o$1q.typeOf.bool("Scene.enableCompositor",e),this._enableCompositor=e}},overlapDisplayedThreshold:{get:function(){return this._overlapDisplayedThreshold},set:function(e){o$1q.typeOf.number("Scene.clusterRange",e),this._overlapDisplayedThreshold=e}},overlapDisplayOptions:{get:function(){return this._overlapDisplayOptions},set:function(e){o$1q.typeOf.object("Scene.overlapDisplayOptions",e),this._overlapDisplayOptions=e}},cameraUnderground:{get:function(){return this._cameraUnderground}}}),w$3.prototype.setVectorTilesLayersControl=function(e,t){this._mvtVisibleControl=e,this._mvtVisibleLevel=t},w$3.prototype.getCompressedTextureFormatSupported=function(e){var t=this.context;return("WEBGL_compressed_texture_s3tc"===e||"s3tc"===e)&&t.s3tc||("WEBGL_compressed_texture_pvrtc"===e||"pvrtc"===e)&&t.pvrtc||("WEBGL_compressed_texture_etc1"===e||"etc1"===e)&&t.etc1},w$3.prototype.updateDerivedCommands=function(e){if(e$2b(e.derivedCommands)){var t=this._frameState,i=this._context,n=!1,r=t.shadowState.lastDirtyTime;e.lastDirtyTime!==r&&(e.lastDirtyTime=r,e.dirty=!0,n=!0);var o=t.useLogDepth,a=this._hdr,s=this._environmentState.usePrepass,l=t.passes.normal,u=this._maskEnabled,c=e.derivedCommands,h=e$2b(c.logDepth),d=e$2b(c.hdr),f=e$2b(c.normal),p=e$2b(c.mask),_=e$2b(c.prepass),m=e$2b(c.originalCommand),g=o&&!h,x=a&&!d,v=s&&!_,y=l&&!f,$=u&&!p,b=!(o&&a||m);if(e.dirty=e.dirty||this._logDepthBufferDirty||this._hdrDirty||this._maskEnabled||g||x||b||$||y||v,e.dirty){e.dirty=!1;var T=t.shadowState.shadowMaps;t.shadowState.shadowsEnabled&&e.castShadows&&(c.shadows=C$Y.createCastDerivedCommand(T,e,n,i,c.shadows)),(h||g)&&(c.logDepth=l$i.createLogDepthCommand(e,i,c.logDepth),Dt(this,c.logDepth.command,n)),(m||b)&&Dt(this,e,n)}}};var gi=new a$g({pass:ue$d.RENDER}),Je=new a$g({pass:ue$d.PRELOAD}),Xe=new a$g({pass:ue$d.PRELOAD_FLIGHT}),wi=new a$g({pass:ue$d.REQUEST_RENDER_MODE_DEFER_CHECK});new a$g({pass:ue$d.MOST_DETAILED_PRELOAD});var yi=new a$g({pass:ue$d.MOST_DETAILED_PICK}),$e=new a$g({pass:ue$d.PICK}),xt=new i$1c,et$2;function bi(e){var t=e.globe;if(e._mode===C$13.SCENE3D&&e$2b(t)&&t.show&&!e._cameraUnderground&&!e._globeTranslucencyState.translucent){var i=t.ellipsoid;return xt.radius=i.minimumRadius,et$2=d$U.fromBoundingSphere(xt,e.camera.positionWC,et$2)}}function tt$1(e){e.render=!1,e.pick=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1,e.asynchronous=!1,e.fbo=!1,e.normal=!1}function kt(e,t,i){var n=e._frameState;n.frameNumber=t,n.time=a$15.clone(i,n.time)}function Ci(e,t){for(var i=0;i<e._presetLightSource.length;i++)e.removeLightSource(e._presetLightSource[i]);if(e._presetLightSource.length=0,t===Ze$3.SUN_LIGHT)e.hdrEnabled=!1,e.sun.show=!0,e._lightSource.ambientLightColor=new e$1U(.76,.76,.76,1);else if(t===Ze$3.LIGHT_GROUP1){e.hdrEnabled=!1,e.sun.show=!1,e._lightSource.ambientLightColor=new e$1U(.5,.5,.5,1);var n=new c$h(new o$1p.fromDegrees(116.191153,40.147532,450),{targetPosition:new o$1p.fromDegrees(116.19106,40.147858,430),color:new e$1U(.9,.9,.9,1),intensity:.78});e.addLightSource(n),e._presetLightSource.push(n);var r=new c$h(new o$1p.fromDegrees(116.192153,40.147432,490),{targetPosition:new o$1p.fromDegrees(116.19106,40.147858,430),color:new e$1U(.9,.9,.9,1),intensity:.25});e.addLightSource(r),e._presetLightSource.push(r)}}function W$6(e){var t=e.camera,i=e._frameState;i.commandList.length=0,i.shadowMaps.length=0,i.brdfLutGenerator=e._brdfLutGenerator,i.environmentMap=e.skyBox&&e.skyBox._cubeMap,i.mode=e._mode,i.morphTime=e.morphTime,i.mapProjection=e.mapProjection,i.camera=t,i.cullingVolume=t.frustum.computeCullingVolume(t.positionWC,t.directionWC,t.upWC,e.frustumTolerance),i.cullingVolume.enableFusion=e$2b(e.context.curFusionViewMatrix),i.occluder=bi(e),i.terrainExaggeration=e._terrainExaggeration,i.minimumDisableDepthTestDistance=e._minimumDisableDepthTestDistance,i.invertClassification=e.invertClassification,i.useLogDepth=e._logDepthBuffer&&!(e.camera.frustum instanceof a$V||e.camera.frustum instanceof l$12),i.sunColor=e._sunColor,e._lightSource.sunLightON=e$2b(e.sun)&&e.sun.show,i.lightSource=e._lightSource,i.shadowDarkness=e.shadowMap.darkness,i.toneMappingExposure=e.toneMappingExposure,i.envMapIntensity=e.envMapIntensity,e$2b(e._specularEnvironmentMapAtlas)&&e._specularEnvironmentMapAtlas.ready?(i.specularEnvironmentMaps=e._specularEnvironmentMapAtlas.texture,i.specularEnvironmentMapsMaximumLOD=e._specularEnvironmentMapAtlas.maximumMipmapLevel):(i.specularEnvironmentMaps=void 0,i.specularEnvironmentMapsMaximumLOD=void 0),e$2b(e._pmremGenerator)&&e._pmremGenerator.ready?i.hdrEnvMap=e._pmremGenerator.texture:i.hdrEnvMap=void 0,i.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,e._actualInvertClassificationColor=e$1U.clone(e.invertClassificationColor,e._actualInvertClassificationColor),t$a.isTranslucencySupported(e._context)||(e._actualInvertClassificationColor.alpha=1),i.invertClassificationColor=e._actualInvertClassificationColor,e$2b(e.globe)?i.maximumScreenSpaceError=e.globe.maximumScreenSpaceError:i.maximumScreenSpaceError=2,tt$1(i.passes),i.tilesetPassState=void 0,i.pbrMaterialsArr=e._pbrMaterlParameters,e.context._trangleCount=0,i.cameraUnderground=e._cameraUnderground,i.globeTranslucencyState=e._globeTranslucencyState}w$3.prototype.updateFrameState=function(){return W$6(this)};var Vt=new i$W;w$3.prototype.isVisible=function(e,t,i){return e$2b(e)&&(!e$2b(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==Ae$u.OUTSIDE&&(!e$2b(i)||!(e.occlude&&!this._undergroundMode)||!e.boundingVolume.isOccluded(i)))};var Ee$1=new o$15,Fe$1=new l$11,Re$1=new a$V,Le$1=new l$12;w$3.prototype.updateAndExecuteCommands=function(e,t,i){this._renderPipeline.updateAndExecuteCommands(e,t)};var Si=/(\.hdr$)/i;function G$3(e){var t=e._frameState,i=e._view,n=e._environmentState,r=t.passes.render,o=t.passes.offscreen,a=e.skyAtmosphere,s=e.globe;const l=e._globeTranslucencyState;if(!r||e._mode!==C$13.SCENE2D&&i.camera.frustum instanceof a$V||!l.environmentVisible)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{e$2b(a)&&e$2b(s)&&(a.setDynamicAtmosphereColor(s.enableLighting),n.isReadyForAtmosphere=n.isReadyForAtmosphere||s._surface._tilesToRender.length>0),n.skyAtmosphereCommand=e$2b(a)?a.update(t):void 0,n.skyBoxCommand=e$2b(e.skyBox)?e.skyBox.update(t,e._hdr):void 0;var u=e$2b(e.sun)?e.sun.update(t,i.passState,e._hdr):void 0;n.sunDrawCommand=e$2b(u)?u.drawCommand:void 0,n.sunComputeCommand=e$2b(u)?u.computeCommand:void 0,n.moonCommand=e$2b(e.moon)?e.moon.update(t):void 0,e$2b(e.cloudBox)&&e.cloudBox.update(t)}var c=n.clearGlobeDepth=e$2b(s)&&(!s.depthTestAgainstTerrain||e.mode===C$13.SCENE2D);(n.useDepthPlane=c&&e.mode===C$13.SCENE3D&&l.useDepthPlane)&&e._depthPlane.update(t),n.renderTranslucentDepthForPick=!1,n.useWebVR=e._useWebVR&&e.mode!==C$13.SCENE2D&&!o;for(var h=t.mode!==C$13.SCENE3D||l.sunVisibleThroughGlobe?void 0:t.occluder,d=t.cullingVolume,f=Vt.planes,p=0;p<5;++p)f[p]=d.planes[p];d=Vt,n.isSkyAtmosphereVisible=e$2b(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=e.isVisible(n.sunDrawCommand,d,h),n.isMoonVisible=e.isVisible(n.moonCommand,d,h);var _=e.specularEnvironmentMaps,m=e._specularEnvironmentMapAtlas;e$2b(_)?Si.test(_)?e$2b(e._pmremGenerator)||(e._pmremGenerator=new v$9(_)):(!e$2b(m)||m.url!==_)&&(m=m&&m.destroy(),e._specularEnvironmentMapAtlas=new u$B(_)):e$2b(m)?(m.destroy(),e._specularEnvironmentMapAtlas=void 0):e$2b(e._pmremGenerator)&&(e._pmremGenerator=e._pmremGenerator.destroy()),e$2b(e._specularEnvironmentMapAtlas)&&e._specularEnvironmentMapAtlas.update(t),e$2b(e._pmremGenerator)&&e._pmremGenerator.update(t)}function Tt$1(e){for(var t=e._frameState.afterRender,i=0,n=t.length;i<n;++i)t[i](),e.requestRender();t.length=0}function Pi(e){const t=e._globe,i=e.camera.positionCartographic;if(e$2b(t)&&t.show&&e$2b(i))return t.getHeight(i)}function Di(e){const t=e.camera,i=e._mode,n=e.globe;e._screenSpaceCameraController;const r=t.positionCartographic;if(!e$2b(r))return!1;if(r.height<0)return!0;if(!e$2b(n)||!n.show||i===C$13.SCENE2D||i===C$13.MORPHING)return!1;const o=e._globeHeight;return e$2b(o)&&r.height<o}function xi(e,t){if(e.debugShowFramesPerSecond){if(!e$2b(e._performanceDisplay)){var i=document.createElement("div");i.className="supermap3d-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(i);var n=new o$c({container:i});e._performanceDisplay=n,e._performanceContainer=i}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.trangleCount=e.context._trangleCount,e._performanceDisplay.update(t)}else e$2b(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function ki(e){e._jobScheduler.resetBudgets();var t=e._frameState;e.primitives.prePassesUpdate(t),e$2b(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function Vi(e){var t=e._frameState;e.primitives.postPassesUpdate(t),r$1a.update()}function Ti(e){var t=e._frameState;e$2b(e.globe)&&e.globe.update(t),t.creditDisplay.update()}w$3.prototype.updateEnvironment=function(){return G$3(this)},w$3.prototype.resolveFramebuffers=function(e){this._renderPipeline.resolveFramebuffers(e)},w$3.prototype.initializeFrame=function(){1e4==this._shaderFrameCount++&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeight=Pi(this),this._cameraUnderground=Di(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),e$2b(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};var Ei=new e$1U,Et=0,rt$3=0;const Fi=50,Ft=100;function Ri(){var e=performance.now(),t=!1;return e-Et<Fi?++rt$3>Ft&&(t=!0):rt$3=0,Et=e,t}var Rt=!1,it$1=0;function Li(){return Rt?it$1++:it$1=0,it$1>Ft}function Bi(e){e._pickPositionCacheDirty=!0;var t=e.context,i=t.uniformState,n=e._frameState,r=e._defaultView;e._view=r,W$6(e),n.passes.render=!0,n.passes.postProcess=e.postProcessStages.hasSelected,n.tilesetPassState=gi;var o=u$_(e.backgroundColor,e$1U.BLACK);e._hdr&&((o=e$1U.clone(o,Ei)).red=Math.pow(o.red,e.gamma),o.green=Math.pow(o.green,e.gamma),o.blue=Math.pow(o.blue,e.gamma)),n.backgroundColor=o,n.creditDisplay.beginFrame(),e.fog.update(n),i.update(n);var a=e.shadowMap;e$2b(a)&&a.enabled&&(o$1p.negate(i.sunDirectionWC,e._sunCamera.direction),n.shadowMaps.push(a),e$2b(e._analysisShadowMap)&&n.shadowMaps.push(e._analysisShadowMap)),e._computeCommandList.length=0,e._logDepthOverlayCommandList.length=0,e._overlayCommandList.length=0,e._overlayAgainstDepthCommandList.length=0;var s=r.viewport;s.x=0,s.y=0,s.width=t.drawingBufferWidth,s.height=t.drawingBufferHeight;var l=r.passState;if(l.framebuffer=void 0,l.blendingEnabled=void 0,l.scissorTest=void 0,l.viewport=f$18.clone(s,l.viewport),e$2b(e.globe)&&e.globe.beginFrame(n),e$2b(e.terrainProvider)){var u=e.terrainProvider;e$2b(u._minHeight)&&e$2b(u._maxHeight)&&(n.minTerrainHeight=u._minHeight,n.maxTerrainHeight=u._maxHeight)}na(e),sa(e),ua(e),fa(e),st$1(e),ma(e),ut$3(e),G$3(e);var c=e._layers;n=e._frameState;c.render(t,n),e._plotLayers.render(n,t),e._renderPipeline.updateAndExecuteCommands(l,o),e._renderPipeline.resolveFramebuffers(l),l.framebuffer=void 0,e._renderPipeline.executeOverlayCommands(l),jt(e),e.layers.endFrame(n),e$2b(e.globe)&&(e.globe.endFrame(n),e.globe.tilesLoaded||(e._renderRequested=!0),e.camera._computeSensitivePosition()),Mi(e,n),e._lightSource.resetChange(),n.creditDisplay.endFrame(),t.endFrame(),(!e._saveLocalCachePerformance||Ri()&&Li())&&(e.layers.saveLocalCache(),e.imageryLayers.saveLocalCache(),e.terrainProvider instanceof ne$x&&e.terrainProvider.saveLocalCache())}function Mi(e,t){for(var i=e.layers._layerQueue.length,n=0;n<i;n++){var r=e.layers._layerQueue[n];e$2b(r._imageryLayer)&&e$2b(r._layerScheduler)&&r._layerScheduler.loadImagery(r,t)}}function re$2(e,t){try{t(e)}catch(t){if(e._renderError.raiseEvent(e,t),e.rethrowRenderErrors)throw t}}function Oi(e){return e._picking.updateMostDetailedRayPicks(e)}function Ni(e){var t=e._frameState;Je.camera=t.camera,Je.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,Je)}function Ii(e){e.primitives.updateForPass(e._frameState,wi)}w$3.prototype.render=function(e){if(this.terrainLayers._layers.length>0&&e$2b(this._globe)){var t=this.terrainLayers._layers.length-1;this._globe._terrainProvider=this._globe._terrainLayerCollection._layers[t]._terrainProvider}if(e$2b(this._globe._terrainProvider._visible)&&this._globe._surface._visible!==this._globe._terrainProvider._visible){var i=this._globe._terrainProvider._visible;this._globe._surface.showInvalid(!i),this._globe._surface._visible=i}e$2b(e)||(e=a$15.now());var n=this._frameState;n.newFrame=!1,this._jobScheduler.resetBudgets();var r=this._view.checkForCameraUpdates(this),o=!this.requestRenderMode||this._renderRequested||r||this._logDepthBufferDirty||this._hdrDirty||this.mode===C$13.MORPHING;if(!o&&e$2b(this.maximumRenderTimeChange)&&e$2b(this._lastRenderTime)){var a=Math.abs(a$15.secondsDifference(this._lastRenderTime,e));o=o||a>this.maximumRenderTimeChange}o&&(this._lastRenderTime=a$15.clone(e,this._lastRenderTime),this._renderRequested=!1,kt(this,e$2a.incrementWrap(n.frameNumber,15e6,1),e),n.newFrame=!0,this.mode===C$13.SCENE3D&&(this._silverLightingAtmosphere.update(n,this.mode),this._lightSource._enableAmbientLightColor||e$1U.clone(this._silverLightingAtmosphere.getAmbientColor(),this._lightSource._ambientLightColor),this._lightSource._enableSunLightColor||e$1U.clone(this._silverLightingAtmosphere.getSunColor(),this._lightSource._sunLightColor)));this._preUpdate.raiseEvent(this,e),re$2(this,Ti),re$2(this,ki),this.primitives.show&&(re$2(this,Oi),re$2(this,Ni),re$2(this,Zi),o||re$2(this,Ii)),this._postUpdate.raiseEvent(this,e),o&&(this._preRender.raiseEvent(this,e),re$2(this,Bi)),xi(this,o),re$2(this,Vi),Rt=0==r$1a.activeRequestLength,Tt$1(this),o&&this._postRender.raiseEvent(this,e),this._logDepthBufferDirty=!1,this._hdrDirty=!1},w$3.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)},w$3.prototype.requestRender=function(){this._renderRequested=!0},w$3.prototype.clampLineWidth=function(e){return Math.max(e$1T.minimumAliasedLineWidth,Math.min(e,e$1T.maximumAliasedLineWidth))};var Hi=new l$12,Ai=new o$1p,Be$1=new o$1p,Wi=new o$1o,Gi=new p$1d;function Ui(e,t,i,n,r){var o=e.camera,a=o.frustum;e$2b(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2*(t.x-r.x)/r.width-1;s*=.5*(a.right-a.left);var l=2*(r.height-t.y-r.y)/r.height-1;l*=.5*(a.top-a.bottom);var u=p$1d.clone(o.transform,Gi);o._setTransform(p$1d.IDENTITY);var c=o$1p.clone(o.position,Ai);o$1p.multiplyByScalar(o.right,s,Be$1),o$1p.add(Be$1,c,c),o$1p.multiplyByScalar(o.up,l,Be$1),o$1p.add(Be$1,c,c),o._setTransform(u),e.mode===C$13.SCENE2D&&o$1p.fromElements(c.z,c.x,c.y,c);var h=a.getPixelDimensions(r.width,r.height,1,1,Wi),d=Hi;return d.right=.5*h.x,d.left=-d.right,d.top=.5*h.y,d.bottom=-d.top,d.near=a.near,d.far=a.far,d.computeCullingVolume(c,o.directionWC,o.upWC)}var qi=new l$11,zi=new o$1o;function Qi(e,t,i,n,r){var o=e.camera,a=o.frustum,s=a.near,l=Math.tan(.5*a.fovy),u=a.aspectRatio*l,c=(2*(t.x-r.x)/r.width-1)*s*u,h=(2*(r.height-t.y-r.y)/r.height-1)*s*l,d=a.getPixelDimensions(r.width,r.height,1,1,zi),f=d.x*i*.5,p=d.y*n*.5,_=qi;return _.top=h+p,_.bottom=h-p,_.right=c+f,_.left=c-f,_.near=s,_.far=a.far,_.computeCullingVolume(o.positionWC,o.directionWC,o.upWC)}function pe$1(e,t,i,n,r){var o=e.camera.frustum;return o instanceof a$V||o instanceof l$12?Ui(e,t,i,n,r):Qi(e,t,i,n,r)}var N$2=3,I$3=3,F$3=new f$18(0,0,N$2,I$3),ie$1=new e$1U(0,0,0,0),ce$3=new o$1o,ve$1=new o$1p;function Lt(e,t,i,n,r){N$2=u$_(i,e._pickTolerance),I$3=u$_(n,N$2);var o=e._context,a=o.uniformState,s=e._frameState,l=e._defaultView;e._view=l;var u=l.viewport;u.x=0,u.y=0,u.width=o.drawingBufferWidth,u.height=o.drawingBufferHeight;var c=l.passState;c.viewport=f$18.clone(u,c.viewport);var h=s$Q.transformWindowToDrawingBuffer(e,t,ce$3);if(e._multiViewportMode!==B$e.NONE){var d=le$2(e,h);if(h.y=o.drawingBufferHeight-h.y,d>-1){s.multiViewportIndex=d;var f=e._multiViewportInfo[d];x$6.x=o.drawingBufferWidth*f.x,x$6.y=o.drawingBufferHeight*f.y,x$6.width=o.drawingBufferWidth*f.width,x$6.height=o.drawingBufferHeight*f.height;var p=(h.x-x$6.x)/x$6.width,_=(h.y-x$6.y)/x$6.height;h.x=p*o.drawingBufferWidth,h.y=(1-_)*o.drawingBufferHeight}}for(var m=l.frustumCommandsList.length,g=[],x=0;x<m;++x){var v=e._picking.getPickDepth(e,x).getDepthPromise(o,h.x,h.y);g.push(v)}Promise.all(g).then((t=>{for(var i=0;i<t.length;i++){var n=t[i];n>0&&n<1&&(ve$1=s$Q.drawingBufferToWgs84Coordinates(e,h,n,ve$1))}o._pickPosition[0]=ve$1.x,o._pickPosition[1]=ve$1.y,o._pickPosition[2]=ve$1.z;var r=a$18.fromCartesian(ve$1);e$2b(r)&&(o._pickPositionHeight=r.height)})),e._jobScheduler.disableThisFrame(),W$6(e),s.cullingVolume=pe$1(e,h,N$2,I$3,u),s.invertClassification=!1,s.passes.pick=!0,s.tilesetPassState=$e,a.update(s),G$3(e);var y=!1,$=e.particlePostRender,b=e.particleTrailsPostRenderer;($.enable||b.enable)&&(y=!0),F$3.x=e$2a.clamp(h.x-.5*(N$2-1),0,e.drawingBufferWidth-N$2),F$3.y=e$2a.clamp(e.drawingBufferHeight-h.y-.5*(I$3-1),0,e.drawingBufferHeight-I$3),F$3.width=N$2,F$3.height=I$3,c=l.pickFramebuffer.begin(F$3,l.viewport,y),e._renderPipeline.updateAndExecuteCommands(c,ie$1),e._renderPipeline.executeOverlayCommands(c),e._renderPipeline.resolveFramebuffers(c)}function Bt$1(e,t,i){for(var n=0,r=e._primitives.length;n<r;n++){var o=e._primitives._primitives[n];o.type==bt$5.INSTANCED_LAYER&&o.setUnSelected()}var a=e._analyst3D.layerQueue;for(n=0,r=a.length;n<r;n++){var s=a[n];s instanceof r$d&&s.releaseSelection()}if(e$2b(t)&&e$2b(t.primitive)&&(t.primitive.type===bt$5.INSTANCED_OBJECT||t.primitive instanceof r$d)&&t.primitive.setSelected(t.id),e$2b(t)&&e$2b(t.primitive)&&t.primitive instanceof _0x30a010){var l=t.id.split("_");2==l.length&&t.primitive.setPolygonOffset(l[1])}else{var u=e$2b(t)&&e$2b(t.primitive)&&t.primitive instanceof _0x22e933;u?(e._layers._setSelection(t),e$2b(t.primitive)&&!1===t.primitive.selectEnabled&&(t=void 0)):e._layers.releaseSelection()}var c={isS3MTilesLayerSel:!1,pickedObject:void 0};return e$2b(t)||(c=e.pickRasterData(i)),!u&&c.isS3MTilesLayerSel?(e._frameState.commandListRealtimeRaster.length=0,c.pickedObject):(e$2b(t)&&e$2b(t.collection)&&(e$2b(t.collection._isS3MTileLabels)&&t.collection._isS3MTileLabels||t.collection._isMVT)&&e$2b(t.collection.setSelection)&&t.collection.setSelection(t.id),e._pickResult.pickFrameNumber=e._frameState.frameNumber,e._pickResult.pickObject=t,e._pickResult.pickObject)}w$3.prototype.pick=function(e,t,i,n){if(!e$2b(e))throw new t$16("windowPosition is undefined.");if(!this.requestRenderMode&&Math.abs(this._frameState.frameNumber-this._pickResult.pickFrameNumber)<5&&!e$2b(n))return this._pickResult.pickObject;var r=this._defaultView,o=this._context;Lt(this,e,t,i);var a=r.pickFramebuffer.end(F$3);return o.endFrame(),Bt$1(this,a,e),a},w$3.prototype.pickAsync=function(e,t,i,n){if(!e$2b(e))throw new t$16("windowPosition is undefined.");if(!this.requestRenderMode&&Math.abs(this._frameState.frameNumber-this._pickResult.pickFrameNumber)<5&&!e$2b(n))return Promise.resolve(this._pickResult.pickObject);var r=this._defaultView;this._context,Lt(this,e,t,i);var o=this;return r.pickFramebuffer.endAsync(F$3).then((t=>(t=Bt$1(o,t,e),Promise.resolve(t))))};var ae$2=new h$18,Mt=new o$1p,Ot=new o$1p,Nt=new o$1p,Me$1=new o$1p,Ki=new o$1p(0,0,-1),ji=new o$1p(0,1,0),Yi=new f$18(0,0,1,1),K$1=new o$1o;function at$3(e,t){var i=e._context,n=e._frameState,r=e._environmentState,o=e.globe.depthTestAgainstTerrain;e.globe.depthTestAgainstTerrain=!0;var a=e._defaultView;e._view=a;var s=a.viewport;s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;var l=a.passState;l.viewport=f$18.clone(s,l.viewport),tt$1(n.passes),n.passes.pick=!0,n.passes.depth=!0,n.cullingVolume=pe$1(e,t,1,1,s),G$3(e),r.renderTranslucentDepthForPick=!0,l=a.pickDepthFramebuffer.update(i,t,s),e._renderPipeline.updateAndExecuteCommands(l,ie$1),e._renderPipeline.resolveFramebuffers(l),e.globe.depthTestAgainstTerrain=o,i.endFrame()}function le$2(e,t){if(e._mode===C$13.SCENE2D||e._multiViewportMode==B$e.NONE)return-1;for(var i=e._context,n=new f$18(t.x,i.drawingBufferHeight-t.y),r=new f$18,o=-1,a=0;a<e._multiViewportInfo.length;a++){var s=e._multiViewportInfo[a];if(r.x=i.drawingBufferWidth*s.x,r.y=i.drawingBufferHeight*s.y,r.width=i.drawingBufferWidth*s.width,r.height=i.drawingBufferHeight*s.height,r.intersect(n)===Ae$u.INTERSECTING){o=a;break}}return o}w$3.prototype.pickRasterData=function(e,t,i){if(!e$2b(e))throw new t$16("windowPosition is undefined.");var n=this._frameState,r=n.commandListRealtimeRaster;if(0===r.length)return{isS3MTilesLayerSel:!1,pickedObject:void 0};var o=this.pickPosition(e),a=a$18.fromCartesian(o),s=e$2a.toDegrees(a.longitude),l=e$2a.toDegrees(a.latitude);K$1.x=e.x,K$1.y=e.y+1;var u=this.pickPosition(K$1),c=a$18.fromCartesian(u),h=e$2a.toDegrees(c.latitude);K$1.x=e.x,K$1.y=e.y-1,u=this.pickPosition(K$1),c=a$18.fromCartesian(u);var d=e$2a.toDegrees(c.latitude);K$1.x=e.x-1,K$1.y=e.y,u=this.pickPosition(K$1),c=a$18.fromCartesian(u);var f=e$2a.toDegrees(c.longitude);K$1.x=e.x+1,K$1.y=e.y,u=this.pickPosition(K$1),c=a$18.fromCartesian(u);for(var p=e$2a.toDegrees(c.longitude),_=Math.abs(p-f),m=Math.abs(d-h),g=[],x=0;x<r.length;x++)ae$2.west=r[x]._boundingVolume.center.x-r[x]._boundingVolume.radius,ae$2.south=r[x]._boundingVolume.center.y-r[x]._boundingVolume.radius,ae$2.east=r[x]._boundingVolume.center.x+r[x]._boundingVolume.radius,ae$2.north=r[x]._boundingVolume.center.y+r[x]._boundingVolume.radius,s<ae$2.east&&s>ae$2.west&&l<ae$2.north&&l>ae$2.south&&g.push(r[x]);if(0===g.length)return{isS3MTilesLayerSel:!1,pickedObject:void 0};e$2b(this._rasterPickTexture)||(this._rasterPickTexture=new t$V({context:n.context,width:1,height:1,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}),this._rasterPickFBO=new t$W({context:n.context,colorTextures:[this._rasterPickTexture],destroyAttachments:!1}));var v=this._clearColorCommand.framebuffer;this._clearColorCommand.framebuffer=this._rasterPickFBO,this._clearColorCommand.execute(n.context);var y=n.camera;o$1p.clone(y.position,Mt),o$1p.clone(y.direction,Ot),o$1p.clone(y.up,Nt);var $=s-_,b=s+_,T=l+m,C=l-m;Me$1.x=.5*($+b),Me$1.y=.5*(T+C),Me$1.z=5,y.setView({destination:Me$1,orientation:{direction:Ki,up:ji},convert:!1});var S=new a$V({width:b-$,aspectRatio:1,near:1,far:10});n.context.uniformState.update(n),n.context.uniformState.updateFrustum(S);for(x=0;x<g.length;x++){g[x].renderState=d$1m.fromCache({viewport:Yi}),g[x].framebuffer=this._rasterPickFBO;var w=g[x].derivedCommands;w.picking=l$i.createPickDerivedCommand(this,g[x],n.context,w.picking),g[x].derivedCommands.picking.pickCommand.execute(n.context)}y.setView({destination:Mt,orientation:{direction:Ot,up:Nt},convert:!1}),n.context.uniformState.update(n),n.context.uniformState.updateFrustum(y.frustum);var E=n.context.readPixels({x:0,y:0,width:1,height:1,framebuffer:this._rasterPickFBO});n.context.pixels=E;var P=e$1U.byteToRgba(E[0],E[1],E[2],E[3]),A=n.context.getObjectByPickId(P),L=e$2b(A)&&e$2b(A.primitive)&&A.primitive instanceof _0x22e933;return L?this._layers._setSelection(A):this._layers.releaseSelection(),this._clearColorCommand.execute(n.context),this._clearColorCommand.framebuffer=v,{isS3MTilesLayerSel:L,pickedObject:A}},w$3.prototype.pickRasterData2D=function(e,t,i){var n=this.pickPosition(e),r=a$18.fromCartesian(n),o=this._frameState.rasterVectorCollection,a=o.getPickID(r);o.setSelection(a)},w$3.prototype.pointPick=function(e){if(!e$2b(e))throw new t$16("windowPosition is undefined.");var t=this._pickPointTolerance,i=t;N$2=u$_(t,3),I$3=u$_(i,N$2);var n=this._context,r=n.uniformState,o=this._frameState,a=this._defaultView;this._view=a;var s=a.viewport;s.x=0,s.y=0,s.width=n.drawingBufferWidth,s.height=n.drawingBufferHeight;var l=a.passState;l.viewport=f$18.clone(s,l.viewport);var u=s$Q.transformWindowToDrawingBuffer(this,e,m);if(this._multiViewportMode!==B$e.NONE){var c=le$2(this,u);if(u.y=n.drawingBufferHeight-u.y,c>-1){o.multiViewportIndex=c;var h=this._multiViewportInfo[c];x$6.x=n.drawingBufferWidth*h.x,x$6.y=n.drawingBufferHeight*h.y,x$6.width=n.drawingBufferWidth*h.width,x$6.height=n.drawingBufferHeight*h.height;var d=(u.x-x$6.x)/x$6.width,f=(u.y-x$6.y)/x$6.height;u.x=d*n.drawingBufferWidth,u.y=f*n.drawingBufferHeight,u.y=n.drawingBufferHeight-H$3.y}}this._jobScheduler.disableThisFrame(),W$6(this),o.cullingVolume=pe$1(this,u,N$2,I$3,s),o.invertClassification=!1,o.passes.pick=!0;var p=this._environmentVisible;this._environmentVisible=a.pickPointFramebuffer._environmentVisible,r.update(o),G$3(this),F$3.x=u.x-.5*(N$2-1),F$3.y=this.drawingBufferHeight-u.y-.5*(I$3-1),F$3.width=N$2,F$3.height=I$3,l=a.pickPointFramebuffer.begin(F$3,a.viewport),this._renderPipeline.updateAndExecuteCommands(l,ie$1),this._renderPipeline.resolveFramebuffers(l);var _=a.pickPointFramebuffer.end(F$3);if(n.endFrame(),this._environmentVisible=p,e$2b(_))if(_.z>-e$2a.EPSILON10)this._pos=void 0;else{var m=new e$29,g=o$1p.magnitude(_);p$1d.multiplyByVector(o.camera.inverseViewMatrix,_,m);var x=s$Q.wgs84ToWindowCoordinates(this,m,new o$1o),v=this.pickPosition(x,new o$1p);if(e$2b(v)&&!(g>o$1p.distance(v,o.camera.position)+5))return this._pos=new e$29,e$29.clone(m,this._pos),this._pos;this._pos=void 0}else this._pos=void 0},w$3.prototype.pickNormal=function(e){if(!e$2b(e))throw new t$16("windowPosition is undefined.");N$2=1,I$3=1;var t=this._context,i=t.uniformState,n=this._frameState,r=this._defaultView;this._view=r;var o=r.viewport;o.x=0,o.y=0,o.width=t.drawingBufferWidth,o.height=t.drawingBufferHeight;var a=r.passState;a.viewport=f$18.clone(o,a.viewport);var s=s$Q.transformWindowToDrawingBuffer(this,e,ce$3);if(this._multiViewportMode!==B$e.NONE){var l=le$2(this,s);if(s.y=t.drawingBufferHeight-s.y,l>-1){n.multiViewportIndex=l;var u=this._multiViewportInfo[l];x$6.x=t.drawingBufferWidth*u.x,x$6.y=t.drawingBufferHeight*u.y,x$6.width=t.drawingBufferWidth*u.width,x$6.height=t.drawingBufferHeight*u.height;var c=(s.x-x$6.x)/x$6.width,h=(s.y-x$6.y)/x$6.height;s.x=c*t.drawingBufferWidth,s.y=h*t.drawingBufferHeight,s.y=t.drawingBufferHeight-H$3.y}}this._jobScheduler.disableThisFrame(),W$6(this),n.cullingVolume=pe$1(this,s,N$2,I$3,o),n.invertClassification=!1,n.passes.pick=!0,n.passes.normal=!0;var d=this._environmentVisible;this._environmentVisible=r.normalFramebuffer._environmentVisible,i.update(n),G$3(this),F$3.x=s.x-.5*(N$2-1),F$3.y=this.drawingBufferHeight-s.y-.5*(I$3-1),F$3.width=N$2,F$3.height=I$3,a=r.normalFramebuffer.begin(F$3,r.viewport),this._renderPipeline.updateAndExecuteCommands(a,ie$1),this._renderPipeline.resolveFramebuffers(a);var f=r.normalFramebuffer.end(F$3);if(t.endFrame(),n.passes.pick=!1,n.passes.normal=!1,this._environmentVisible=d,e$2b(f))return f},w$3.prototype.pickNormalAsync=function(e){if(!e$2b(e))throw new t$16("windowPosition is undefined.");N$2=1,I$3=1;var t=this._context,i=t.uniformState,n=this._frameState,r=this._defaultView;this._view=r;var o=r.viewport;o.x=0,o.y=0,o.width=t.drawingBufferWidth,o.height=t.drawingBufferHeight;var a=r.passState;a.viewport=f$18.clone(o,a.viewport);var s=s$Q.transformWindowToDrawingBuffer(this,e,ce$3);if(this._multiViewportMode!==B$e.NONE){var l=le$2(this,s);if(s.y=t.drawingBufferHeight-s.y,l>-1){n.multiViewportIndex=l;var u=this._multiViewportInfo[l];x$6.x=t.drawingBufferWidth*u.x,x$6.y=t.drawingBufferHeight*u.y,x$6.width=t.drawingBufferWidth*u.width,x$6.height=t.drawingBufferHeight*u.height;var c=(s.x-x$6.x)/x$6.width,h=(s.y-x$6.y)/x$6.height;s.x=c*t.drawingBufferWidth,s.y=h*t.drawingBufferHeight,s.y=t.drawingBufferHeight-H$3.y}}this._jobScheduler.disableThisFrame(),W$6(this),n.cullingVolume=pe$1(this,s,N$2,I$3,o),n.invertClassification=!1,n.passes.pick=!0,n.passes.normal=!0;var d=this._environmentVisible;return this._environmentVisible=r.normalFramebuffer._environmentVisible,i.update(n),G$3(this),F$3.x=s.x-.5*(N$2-1),F$3.y=this.drawingBufferHeight-s.y-.5*(I$3-1),F$3.width=N$2,F$3.height=I$3,a=r.normalFramebuffer.begin(F$3,r.viewport),this._renderPipeline.updateAndExecuteCommands(a,ie$1),this._renderPipeline.resolveFramebuffers(a),r.normalFramebuffer.endAsync(F$3).then((e=>(t.endFrame(),n.passes.pick=!1,n.passes.normal=!1,this._environmentVisible=d,e$2b(e)?Promise.resolve(e):Promise.resolve(void 0))))};var x$6=new f$18,H$3=new o$1o,_e=new o$1o;function It$1(e,t,i,n){var r=e._multiViewportInfo[n];x$6.x=i.drawingBufferWidth*r.x,x$6.y=i.drawingBufferHeight*r.y,x$6.width=i.drawingBufferWidth*r.width,x$6.height=i.drawingBufferHeight*r.height;var o=(H$3.x-x$6.x)/x$6.width,a=(H$3.y-x$6.y)/x$6.height;H$3.x=o*i.drawingBufferWidth,H$3.y=a*i.drawingBufferHeight,_e.x=H$3.x,_e.y=i.drawingBufferHeight-H$3.y}w$3.prototype.pickPositionWorldCoordinates=function(e,t,i){if(this.useDepthPicking){if(!e$2b(e))throw new t$16("windowPosition is undefined.");var n=e.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n))return o$1p.clone(this._pickPositionCache[n],t);var r=this._frameState,o=this._context,a=o.uniformState,s=this._defaultView;this._view=s;var l=s$Q.transformWindowToDrawingBuffer(this,e,ce$3);if(o$1o.clone(l,_e),this.pickTranslucentDepth){if(this._multiViewportMode!==B$e.NONE){var u=le$2(this,l);o$1o.clone(l,H$3),H$3.y=o.drawingBufferHeight-H$3.y,u>-1&&(r.multiViewportIndex=u,It$1(this,r,o,u),W$6(this,r.frameNumber,r.time),r.tilesetPassState=$e)}at$3(this,_e)}else W$6(this,r.frameNumber,r.time),a.update(r),G$3(this);this._multiViewportMode!==B$e.NONE?l=H$3:l.y=this.drawingBufferHeight-l.y;var c,h=this.camera;c=e$2b(h.frustum.fov)?h.frustum.clone(Ee$1):e$2b(h.frustum.infiniteProjectionMatrix)?h.frustum.clone(Fe$1):e$2b(h.frustum.width)?h.frustum.clone(Re$1):h.frustum.clone(Le$1);for(var d=s.frustumCommandsList,f=d.length,p=0;p<f;++p){var _=this._picking.getPickDepth(this,p).getDepth(o,l.x,l.y,e$2b(i)&&i?this._pickDepthTolerance:0);if(_>0&&_<1){var m,g=d[p];return this.mode===C$13.SCENE2D?(m=h.position.z,h.position.z=m-g.near+1,c.far=Math.max(1,g.far-g.near),c.near=1,a.update(r),a.updateFrustum(c)):(c.near=g.near*(0!==p?this.opaqueFrustumNearOffset:1),c.far=g.far,a.updateFrustum(c)),t=s$Q.drawingBufferToWgs84Coordinates(this,l,_,t),this.mode===C$13.SCENE2D&&(h.position.z=m,a.update(r)),this._pickPositionCache[n]=o$1p.clone(t),t}}this._pickPositionCache[n]=void 0}},w$3.prototype.pickPositionWorldCoordinatesAsync=function(e,t,i){if(!this.useDepthPicking)return Promise.resolve(void 0);if(!e$2b(e))throw new t$16("windowPosition is undefined.");var n=e.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n)){var r=o$1p.clone(this._pickPositionCache[n],t);return Promise.resolve(r)}var o=this._frameState,a=this._context,s=a.uniformState,l=this._defaultView;this._view=l;var u=s$Q.transformWindowToDrawingBuffer(this,e,ce$3);if(o$1o.clone(u,_e),this.pickTranslucentDepth){if(this._multiViewportMode!==B$e.NONE){var c=le$2(this,u);o$1o.clone(u,H$3),H$3.y=a.drawingBufferHeight-H$3.y,c>-1&&(o.multiViewportIndex=c,It$1(this,o,a,c),W$6(this,o.frameNumber,o.time))}at$3(this,_e)}else W$6(this,o.frameNumber,o.time),s.update(o),G$3(this);this._multiViewportMode!==B$e.NONE?u=H$3:u.y=this.drawingBufferHeight-u.y;var h,d=this.camera;h=e$2b(d.frustum.fov)?d.frustum.clone(Ee$1):e$2b(d.frustum.infiniteProjectionMatrix)?d.frustum.clone(Fe$1):e$2b(d.frustum.width)?d.frustum.clone(Re$1):d.frustum.clone(Le$1);for(var f=l.frustumCommandsList,p=f.length,_=[],m=0;m<p;++m){var g=this._picking.getPickDepth(this,m).getDepthPromise(a,u.x,u.y,e$2b(i)&&i?this._pickDepthTolerance:0);_.push(g)}var x=this;return Promise.all(_).then((e=>{for(var i=0;i<e.length;i++){var r=e[i];if(!(r<=0||r>=1)){var a,l=f[i];return x.mode===C$13.SCENE2D?(a=d.position.z,d.position.z=a-l.near+1,h.far=Math.max(1,l.far-l.near),h.near=1,s.update(o),s.updateFrustum(h)):(h.near=l.near*(0!==i?x.opaqueFrustumNearOffset:1),h.far=l.far,s.updateFrustum(h)),t=s$Q.drawingBufferToWgs84Coordinates(x,u,r,t),x.mode===C$13.SCENE2D&&(d.position.z=a,s.update(o)),x._pickPositionCache[n]=o$1p.clone(t),Promise.resolve(t)}}return x._pickPositionCache[n]=void 0,Promise.resolve(void 0)}))};var Ht=new a$18;function At(e,t){var i,n,r=[],o=[],a=[],s=[],l=Object.create(null);e$2b(e)||(e=Number.MAX_VALUE);for(var u=t();e$2b(u);){var c=u.object,h=u.position,d=u.exclude;if(e$2b(h)&&!e$2b(c)){r.push(u);break}if(!e$2b(c)||!e$2b(c.primitive)||!d&&(r.push(u),0>=--e))break;var f=c.primitive,p=!1;if("function"==typeof f.getGeometryInstanceAttributes&&e$2b(c.id)&&(e$2b(n=f.getGeometryInstanceAttributes(c.id))&&e$2b(n.show)&&(p=!0,n.show=e$1F.toValue(!1,n.show),a.push(n))),c instanceof e$L&&(p=!0,c.show=!1,s.push(c)),f instanceof _0x22e933){p=!0,f.setOnlyObjsVisible([c.id],!1);var _=f.id;(l[_]=l[_]||{}).layer=f,(l[_].ids=l[_].ids||[]).push(c.id)}p||(f.show=!1,o.push(f)),u=t()}for(i=0;i<o.length;++i)o[i].show=!0,o[i]instanceof _0x331f36&&o[i].setSelected();for(var m in l){var g=l[m];g.layer.setOnlyObjsVisible(g.ids,!0)}for(i=0;i<a.length;++i)(n=a[i]).show=e$1F.toValue(!0,n.show);for(i=0;i<s.length;++i)s[i].show=!0;return r}function Zi(e){var t=e._frameState;t.camera.canPreloadFlight()&&(Xe.camera=e.preloadFlightCamera,Xe.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,Xe))}w$3.prototype.pickPosition=function(e,t){if(e$2b(t=this.pickPositionWorldCoordinates(e,t))&&this.mode!==C$13.SCENE3D){o$1p.fromElements(t.y,t.z,t.x,t);var i=this.mapProjection,n=i.ellipsoid,r=i.unproject(t,Ht);n.cartographicToCartesian(r,t)}return t},w$3.prototype.pickPositionAsync=function(e,t){var i=this;return this.pickPositionWorldCoordinatesAsync(e,t).then((e=>{if(e$2b(t=e)&&i.mode!==C$13.SCENE3D){o$1p.fromElements(t.y,t.z,t.x,t);var n=i.mapProjection,r=n.ellipsoid,o=n.unproject(t,Ht);r.cartographicToCartesian(o,t)}return Promise.resolve(t)}))},w$3.prototype.pickPosition2D=function(e,t){if(e$2b(t=this.pickPositionWorldCoordinates(e,t)))return e$2b(t)&&this.mode!==C$13.SCENE3D&&o$1p.fromElements(t.y,t.z,t.x,t),t.x+=o$1p.globalOffset.x,t.y+=o$1p.globalOffset.y,t.z+=o$1p.globalOffset.z,t},w$3.prototype.pickPosition2DAsync=function(e,t){var i=this;return this.pickPositionWorldCoordinatesAsync(e,t).then((e=>{if(e$2b(t=e))return e$2b(t)&&i.mode!==C$13.SCENE3D&&o$1p.fromElements(t.y,t.z,t.x,t),t.x+=o$1p.globalOffset.x,t.y+=o$1p.globalOffset.y,t.z+=o$1p.globalOffset.z,Promise.resolve(t)}))},w$3.prototype.pickTileCoordinate=function(e){function t(e,t){return h$18.contains(e.rectangle,t)?e:void 0}if(!e$2b(e))throw new t$16("windowPosition is required");var i=this.globe._surface._levelZeroTiles;if(e$2b(i)){var n,r;try{n=this.pickPosition(e,new o$1p),r=a$18.fromCartesian(n)}catch{return}for(var o=r.longitude,a=r.latitude,s=t(i[0],r)||t(i[1],r);s._lastSelectionResult===D$J.REFINED;)s=t(s.southwestChild,r)||t(s.southeastChild,r)||t(s.northwestChild,r)||s.northeastChild;var l=s.rectangle,u=(o-l.west)/l.width,c=(l.north-a)/l.height;return{x:s.x,y:s.y,level:s.level,xRatio:u,yRatio:c}}},w$3.prototype.drillPick=function(e,t,i,n){var r=this,o=At(t,(function(){var t=r.pick(e,i,n,!0);if(e$2b(t))return{object:t,position:void 0,exclude:!1}}));return o.map((function(e){return e.object}))};var Wt=new o$1p,Ji=new o$1p;function Gt(e,t,i,n){var r=t.direction,o=o$1p.mostOrthogonalAxis(r,Wt),a=o$1p.cross(r,o,Wt),s=o$1p.cross(r,a,Ji);n.position=t.origin,n.direction=r,n.up=s,n.right=a,n.frustum.width=u$_(i,e.pickOffscreenDefaultWidth)}function ot$1(e,t,i,n,r){for(var o=[],a=e.primitives,s=a.length,l=0;l<s;++l){var u=a.get(l);u instanceof p$u&&u.show&&(!e$2b(i)||-1===i.indexOf(u))&&o.push(u)}if(0===o.length)return o$1l.resolve(r());var c=new pi(t,n,o);return e._asyncRayPicks.push(c),c.promise.then((function(){return r()}))}function $i(e,t){return!(!e$2b(e)||!e$2b(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function ea(e,t,i,n,r,o,a){var s=e._context,l=s.uniformState,u=e._frameState,c=e._pickOffscreenView;e._view=c,Gt(e,t,n,c.camera),F$3=f$18.clone(c.viewport,F$3);var h=c.pickFramebuffer.begin(F$3,c.viewport);e._jobScheduler.disableThisFrame(),e$2b(e.camera.frustum.left)&&(u.cullingVolume=pe$1(e,{x:0,y:0},1,1,c.viewport)),W$6(e),u.invertClassification=!1,u.passes.pick=!0,u.passes.offscreen=!0,u.passes.asynchronous=o,c.updateFrustums=!0,u.tilesetPassState=a?yi:$e,l.update(u),G$3(e),e._renderPipeline.updateAndExecuteCommands(h,ie$1),e._renderPipeline.resolveFramebuffers(h);var d,f=c.pickFramebuffer.end(s);if(e._context.depthTexture)for(var p=c.frustumCommandsList.length,_=0;_<p;++_){var m=e._picking.getPickDepth(e,_).getDepth(s,0,0);if(m>0&&m<1){var g=c.frustumCommandsList[_],x=g.near*(0!==_?e.opaqueFrustumNearOffset:1),v=x+m*(g.far-x);d=f$17.getPoint(t,v);break}}if(e._view=e._defaultView,s.endFrame(),u.passes.pick=!1,u.passes.offscreen=!1,e$2b(f)||e$2b(d))return{object:f,position:d,exclude:!e$2b(d)&&r||$i(f,i)}}function Ut(e,t,i,n,r,o,a,s){return At(i,(function(){return ea(e,t,n,r,o,a,s)}))}function ge$2(e,t,i,n,r,o){var a=Ut(e,t,1,i,n,r,o,!1);if(a.length>0)return a[0]}function qt(e,t,i,n,r,o,a){return Ut(e,t,i,n,r,o,a,!0)}w$3.prototype.pickFromRay=function(e,t,i){if(o$1q.defined("ray",e),this._mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");return ge$2(this,e,t,i,!1,!1)},w$3.prototype.drillPickFromRay=function(e,t,i,n){if(o$1q.defined("ray",e),this._mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");return qt(this,e,t,i,n,!1,!1)},w$3.prototype.pickFromRayMostDetailed=function(e,t,i){if(o$1q.defined("ray",e),this._mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");var n=this;return e=f$17.clone(e),t=e$2b(t)?t.slice():t,ot$1(this,e,t,i,(function(){return ge$2(n,e,t,i,!1,!0)}))},w$3.prototype.drillPickFromRayMostDetailed=function(e,t,i,n){if(o$1q.defined("ray",e),this._mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");var r=this;return e=f$17.clone(e),i=e$2b(i)?i.slice():i,ot$1(this,e,i,n,(function(){return qt(r,e,t,i,n,!1,!0)}))};var ta=new o$1p,ra=new o$1p,ia=new f$17,zt=new a$18;function nt$2(e,t){var i=e.globe,n=e$2b(i)?i.ellipsoid:e.mapProjection.ellipsoid,r=e$1E._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,ra),a=a$18.toCartesian(t,n,ta),s=ia;s.origin=a,s.direction=o;var l=new f$17;return f$17.getPoint(s,r,l.origin),o$1p.negate(o,l.direction),l}function Qt(e,t){var i=e.globe,n=e$2b(i)?i.ellipsoid:e.mapProjection.ellipsoid;return nt$2(e,a$18.fromCartesian(t,n,zt))}function Kt(e,t){var i=e.globe,n=e$2b(i)?i.ellipsoid:e.mapProjection.ellipsoid;return a$18.fromCartesian(t,n,zt).height}function aa(e,t,i,n){var r=nt$2(e,t);return ot$1(e,r,i,n,(function(){var t=ge$2(e,r,i,n,!0,!0);if(e$2b(t))return Kt(e,t.position)}))}w$3.prototype.sampleHeight=function(e,t,i){if(o$1q.defined("position",e),this._mode!==C$13.SCENE3D)throw new t$16("sampleHeight is only supported in 3D mode.");if(!this.sampleHeightSupported)throw new t$16("sampleHeight requires depth texture support. Check sampleHeightSupported.");var n=ge$2(this,nt$2(this,e),t,i,!0,!1);if(e$2b(n))return Kt(this,n.position)},w$3.prototype.clampToHeight=function(e,t,i,n){if(o$1q.defined("cartesian",e),this._mode!==C$13.SCENE3D)throw new t$16("sampleHeight is only supported in 3D mode.");if(!this.clampToHeightSupported)throw new t$16("clampToHeight requires depth texture support. Check clampToHeightSupported.");i instanceof o$1p&&(n=i,i=void 0,t$12("clampToHeight-parameter-change","clampToHeight now takes an optional width argument before the result argument in SuperMap3D. The previous function definition will no longer work in 1.56."));var r=ge$2(this,Qt(this,e),t,i,!0,!1);if(e$2b(r))return o$1p.clone(r.position,n)},w$3.prototype.sampleHeightMostDetailed=function(e,t,i){if(o$1q.defined("positions",e),this._mode!==C$13.SCENE3D)throw new t$16("sampleHeightMostDetailed is only supported in 3D mode.");if(!this.sampleHeightSupported)throw new t$16("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");t=e$2b(t)?t.slice():t;for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=aa(this,e[o],t,i);return o$1l.all(r).then((function(t){for(var i=t.length,n=0;n<i;++n)e[n].height=t[n];return e}))},w$3.prototype.clampToHeightMostDetailed=function(e,t,i){return this._picking.clampToHeightMostDetailed(this,e,t,i)},w$3.prototype.cartesianToCanvasCoordinates=function(e,t){return s$Q.wgs84ToWindowCoordinates(this,e,t)},w$3.prototype.completeMorph=function(){this._transitioner.completeMorph()},w$3.prototype.morphTo2D=function(e){var t,i=this.globe;t=e$2b(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=u$_(e,2),this._transitioner.morphTo2D(e,t)},w$3.prototype.morphToColumbusView=function(e){var t,i=this.globe;t=e$2b(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=u$_(e,2),this._transitioner.morphToColumbusView(e,t)},w$3.prototype.morphTo3D=function(e){var t,i=this.globe;t=e$2b(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=u$_(e,2),this._transitioner.morphTo3D(e,t)},w$3.prototype.getViewport=function(e){if(this._multiViewportMode!==B$e.NONE){var t=le$2(this,s$Q.transformWindowToDrawingBuffer(this,e,ce$3));if(t>-1){var i=this._context,n=new f$18,r=this._multiViewportInfo[t];return n.x=i.drawingBufferWidth*r.x,n.y=i.drawingBufferHeight*r.y,n.width=i.drawingBufferWidth*r.width,n.height=i.drawingBufferHeight*r.height,n}}return(n=new f$18).x=0,n.y=0,n.width=this._canvas.clientWidth,n.height=this._canvas.clientHeight,n},w$3.prototype.addS3MTilesLayerByScp=function(e,t,i,n){return this._sceneConfigLoader.addS3MTilesLayerByScp(e,t,i,n)},w$3.prototype.addS3MGroupLayer=function(e,t,i){return this._sceneConfigLoader.addS3MGroupLayer(e,t,i)},w$3.prototype.open=function(e,t,i){return this._sceneConfigLoader.open(e,t,i)},w$3.prototype.addVectorTilesLayer=function(e){return e.renderer="canvas",this.addVectorTilesMap(e)},w$3.prototype.getVectorTilesLayer=function(e){return this.getVectorTilesMap(e)},w$3.prototype.removeVectorTilesLayer=function(e){return this.removeVectorTilesMap(e)},w$3.prototype.addVectorTilesMap=function(e){if(!e$2b(e.url))throw new t$16("url is required!");var t=e.name||e$1Q();e.name=t;var i=this._vectorTileSource.get(t);if(e$2b(i))return this._vectorTileMaps.find(e.name);i=new I$10(this._context,e),this._vectorTileSource.set(t,i);var n=this.imageryLayers.addVectorTileProvider(i);i.innerLayer=n,e$2b(this._frameState.mvtLayerCount)?this._frameState.mvtLayerCount++:this._frameState.mvtLayerCount=1;var r=new i$O({provider:i,layer:i.innerLayer,imagelayerCollection:this.imageryLayers,scene:this,viewer:e.viewer,name:e.name||e$1Q(),layerConfig:e.layerConfig,swipeEnabled:u$_(e.swipeEnabled,!1),swipeRegion:u$_(e.swipeRegion,new f$18(0,0,1,1)),enableMorphing:e.enableMorphing,realtime:e.realtime,billboardMode:e.billboardMode,customRequestHeaders:e.customRequestHeaders,labelDepthTestEnabled:e.labelDepthTestEnabled,lineAntialiasing:e.lineAntialiasing});return e.isTdt&&(i._ready=!0,r._isTdt=!0),i.innerLayer.kmlLayer=r.kmlLayer,i._owner=r,this._vectorTileMaps.add(r),r},w$3.prototype.getVectorTilesMap=function(e){if(!e$2b(e))throw new t$16("name is required!");return this._vectorTileMaps.find(e)},w$3.prototype.removeVectorTilesMap=function(e){var t=this._vectorTileMaps.find(e);return!!e$2b(t)&&(this._removeCoverImageryLayer(t),this._vectorTileMaps.remove(e),this._vectorTileSource.remove(e),!0)},w$3.prototype._removeCoverImageryLayer=function(e){for(var t=0;t<this._layers.layerQueue.length;t++){var i=this._layers.layerQueue[t];i._imageryLayer===e&&i._removeCoverImageryLayer()}},w$3.prototype.addLayerService=function(e,t,i){return this._sceneConfigLoader.addLayerService(e,t,i)},w$3.prototype.addS3MInstanceCollection=function(e,t){var i=new S3MInstanceCollection({url:e,instanceAttrs:t,gl:this._context._gl,context:this._context});return this.primitives.add(i),i};var oa=new o$1p;function na(e){var t=e._context;t.uniformState;var i=e._frameState,n=i.camera,r=n.positionWC,o=i.cullingVolume,a=i.mode===C$13.SCENE3D?i.occluder:void 0;if(e$2b(e._reflectFramebuffer)||(e._reflectFramebuffer=t.createReflectFramebuffer(),i._framebufferList.water=e._reflectFramebuffer),e._reflectFramebuffer.distinctQuality=e._waterReflectionDistinctQuality,e.postProcessStages.screenSpaceReflection.enabled)e._reflectFramebuffer.isUpdate=!1;else{for(var s=6378137,l=0,u=0;u<e.layers._layerQueue.length;u++){var c=e.layers._layerQueue[u];if(e$2b(c._waterPlanes)){var h=c._waterPlanes;for(var d in h._hash){var f=h.get(d);if(!(o.computeVisibility(f.boundingVolume)==Ae$u.OUTSIDE||e$2b(a)&&f.boundingVolume.isOccluded(a)))(_=(_=e$2b(f.boundingVolume.radius)?o$1p.distance(f.boundingVolume.center,r)-f.boundingVolume.radius:Math.sqrt(y$Z.distanceSquaredTo(f.boundingVolume,r)))<.01?.01:_)<s&&(s=_,l=f.distance),e._reflectFramebuffer.isUpdate=!0}}}var p=e._analyst3D.layerQueue.length;for(u=0;u<p;u++){if(-1!=e._analyst3D.layerQueue[u]._name.search("floodAnalysis3D")){var _,m=e._analyst3D.layerQueue[u];(_=(_=o$1p.distance(m._boundingSphere.center,r)-m._boundingSphere.radius)<.01?.01:_)<s&&(s=_,l=m._waterHeight),e._reflectFramebuffer.isUpdate=!0}}if(!e._reflectFramebuffer.isUpdate||s>5e4)e._reflectFramebuffer.isUpdate=!1;else{if(e.mode==C$13.SCENE3D){l+=o$1p.magnitude(n.positionWC)-n.positionCartographic.height,e._reflectFramebuffer._reflectPlane.normal=o$1p.normalize(r,oa);var g=new o$1p;e._reflectFramebuffer._reflectPlane.normal.clone(g),o$1p.multiplyByScalar(g,l,g),o$1p.subtract(g,t._relativeOrigin,g),e._reflectFramebuffer._reflectPlane.distance=-o$1p.dot(g,e._reflectFramebuffer._reflectPlane.normal)}else e._reflectFramebuffer._reflectPlane.normal=o$1p.UNIT_X,e._reflectFramebuffer._reflectPlane.distance=-l;e._reflectFramebuffer.isUpdate=!0}}}function sa(e){var t=e._context;t.uniformState;var i=e._frameState;t.numNormalAndDepthObject>0?(e$2b(e._normalFramebuffer)||(e._normalFramebuffer=t.createNormalFramebuffer(),i._framebufferList.normalAndDepth=e._normalFramebuffer),e._normalFramebuffer.isUpdate=!0):e$2b(e._normalFramebuffer)&&(e._normalFramebuffer.isUpdate=!1)}function ua(e){var t=e._context;t.uniformState;var i=e._frameState;t.numPostEffectFilterObject>0?(e$2b(e._postEffectFilterFramebuffer)||(e._postEffectFilterFramebuffer=t.createPostEffectFilterlFramebuffer(),i._framebufferList.postEffectFilter=e._postEffectFilterFramebuffer),e._postEffectFilterFramebuffer.isUpdate=!0):e$2b(e._postEffectFilterFramebuffer)&&(e._postEffectFilterFramebuffer.isUpdate=!1)}function fa(e){var t=e._context;t.uniformState;var i=e._frameState;t.numClampClipPlaneLayer>0?(e$2b(e._clampFramebuffer)||(e._clampFramebuffer=t.createClampFramebuffer(),i._framebufferList.clampTexture=e._clampFramebuffer),e._clampFramebuffer.isUpdate=!0):e$2b(e._clampFramebuffer)&&(e._clampFramebuffer.isUpdate=!1)}function st$1(e){var t=e._context;t.uniformState;var i=e._frameState;e._isUpdatePickCommand?(e$2b(e._pickRectFramebuffer)||(e._pickRectFramebuffer=t.createPickRectFramebuffer(),i._framebufferList.pickRectTexture=e._pickRectFramebuffer,e._pickRectFramebuffer.beginFunc=function(){this._renderTexture._passState.scissorTest={enabled:!0,rectangle:{x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}}}),e._pickRectFramebuffer.isUpdate=!0,e._isUpdatePickCommand=!1):e$2b(e._pickRectFramebuffer)&&(e._pickRectFramebuffer.isUpdate=!1)}function jt(e){if(e$2b(e._pickRectFramebuffer)&&e._pickRectFramebuffer.isUpdate){for(var t=e._context,i=e._pickRectFramebuffer.renderTexture._width,n=e._pickRectFramebuffer.renderTexture._height,r=t.readPixels({framebuffer:e._pickRectFramebuffer.renderTexture._fb,x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}),o=[],a=[],s=[],l=e._layers.layerQueue,u=0;u<l.length;u++){s[g=Oe(_=l[u].id)]=u,o.push(g),a[g]=[]}r.length;for(var c=0;c<i;c++)for(var h=0;h<n;h++){var d=4*(h*i+c);if(0!==r[d]||0!==r[d+1]||0!==r[d+2]){var f=e$1U.byteToRgba(r[d],r[d+1],r[d+2],r[d+3]),p=t.getObjectByPickId(f);if(e$2b(p)){var _=p.primitive.id,m=p.id,g=Oe(_),x=o.indexOf(g);if(x>=0){var v=l[s[g]];if(0==a[g].length)(b=[]).push(m),a[g]=b;else(x=a[g].indexOf(m))<0&&a[g].push(m)}}}}for(var y=Object.keys(a),$=0;$<y.length;$++){var b;v=l[u=s[y[$]]];(b=a[y[$]]).length>0&&v.setSelection(b)}}}function la(e){if(!e$2b(e._pickRectFramebuffer)||!e._pickRectFramebuffer.isUpdate)return Promise.resolve();var t=e._context,i=e._pickRectFramebuffer.renderTexture._width,n=e._pickRectFramebuffer.renderTexture._height;return t.readPixelsAsync({framebuffer:e._pickRectFramebuffer.renderTexture._fb,x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}).then((r=>{for(var o=[],a=[],s=[],l=e._layers.layerQueue,u=0;u<l.length;u++){s[g=Oe(_=l[u].id)]=u,o.push(g),a[g]=[]}r.length;for(var c=0;c<i;c++)for(var h=0;h<n;h++){var d=4*(h*i+c);if(0!==r[d]||0!==r[d+1]||0!==r[d+2]){var f=e$1U.byteToRgba(r[d],r[d+1],r[d+2],r[d+3]),p=t.getObjectByPickId(f);if(e$2b(p)){var _=p.primitive.id,m=p.id,g=Oe(_),x=o.indexOf(g);if(x>=0){var v=l[s[g]];if(0==a[g].length)(b=[]).push(m),a[g]=b;else(x=a[g].indexOf(m))<0&&a[g].push(m)}}}}for(var y=Object.keys(a),$=0;$<y.length;$++){var b;v=l[u=s[y[$]]];(b=a[y[$]]).length>0&&v.setSelection(b)}return Promise.resolve()}))}function Oe(e){return"id_"+e}function ha(e,t,i){var n=e._context,r=e._frameState,o=t.begin(r),a=e._environmentVisible;e._environmentVisible=t.environmentVisible;var s=r.useType,l=r._isDepth;if(r.useType=t.useType,r._isDepth=!1,e._multiViewportMode!==B$e.NONE)for(var u=0;u<4;u++)if(1<<u&t._visibleViewport){r.multiViewportIndex=u;break}e._renderPipeline.updateAndExecuteCommandsForPostEffect(o,u$_(e.backgroundColor,e$1U.BLACK)),r.multiViewportIndex=-1,t.update(o,e._pickDepths),e._environmentState,r.commandList.length=0,n.endFrame(),t.end(r),r._isDepth=l,r.useType=s,e._environmentVisible=a}function ut$3(e){var t=e._context,i=t.uniformState,n=e._frameState,r=n.camera,o=n._framebufferList;n.passes.fbo=!0;var a=e.enableCompositor;for(var s in e.enableCompositor=!0,o){var l=o[s];if(e$2b(l)&&l.isUpdate&&(!l.isDestroyed||!l.isDestroyed())){var u=n.useType,c=n._isDepth,h=n._fboState.name,d=n._fboState.enabled,f=n._fboState.frameBufferType,p=e._sunCamera.direction;if(n._fboState.name=s,n._fboState.enabled=!0,n._fboState.frameBufferType=l.frameBufferType,l.frameBufferType===Qe$c.POSTEFFECT_FILTER)ha(e,l);else{var _=r.frustum.near;l.frameBufferType===Qe$c.REFLECT&&(r.frustum.near=1);var m=l.begin(n),g=e._environmentVisible;e._environmentVisible=l.environmentVisible,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.update(n);var x=e.shadowMap;e$2b(x)&&x.enabled&&o$1p.negate(i.sunDirectionWC,e._sunCamera.direction);var v=n.shadowState.nearPlane,y=n.shadowState.farPlane,$=n.shadowState.closestObjectSize;if(n.useType=l.useType,n._isDepth=(6&l.useType)>0||1&l.useType&&l.isManualDepth,e._multiViewportMode!==B$e.NONE)for(var b=0;b<4;b++)if(1<<b&l._visibleViewport){n.multiViewportIndex=b;break}G$3(e),e._renderPipeline.updateAndExecuteCommands(m,u$_(e.backgroundColor,e$1U.BLACK)),n.multiViewportIndex=-1;var T=e._environmentState;if(!t.webgpu&&e._msaaSamples>1&&T.useGlobeDepthFramebuffer){var C=e._view.globeDepth;l.update(t,m,C.framebufferWithTexture)}else l.update(t,m,m.framebuffer);n._fboState.frameBufferType!==Qe$c.CLAMP&&e._renderPipeline.resolveFramebuffers(m),n.commandList.length=0,t.endFrame(),Tt$1(e),l.end(n),e$2b(x)&&x.enabled&&-1!==n._fboState.name.indexOf("ShadowQueryPoints")&&(e._sunCamera.direction=p),"water"==n._fboState.name&&(r.frustum.near=_),e._environmentVisible=g,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.update(n),e$2b(x)&&x.enabled&&o$1p.negate(i.sunDirectionWC,e._sunCamera.direction),n.shadowState.nearPlane=v,n.shadowState.farPlane=y,n.shadowState.closestObjectSize=$}n._fboState.name=h,n._fboState.enabled=d,n._fboState.frameBufferType=f,n._isDepth=c,n.useType=u}}n.passes.fbo=!1,e.enableCompositor=a}function Yt(e,t){var i=e._context,n=i.uniformState,r=e._frameState,o=r.camera,a=e.shadowMap.enabled,s=r.shadowState.shadowsEnabled;r.passes.fbo=!0,e.shadowMap.enabled=!1,r.shadowState.shadowsEnabled=!1;var l=r.useType,u=r._isDepth,c=r._fboState.name,h=r._fboState.enabled,d=r._fboState.frameBufferType;r._fboState.enabled=!0,r._fboState.frameBufferType=t.frameBufferType;var f=t.begin(r),p=e._environmentVisible;e._environmentVisible=t.environmentVisible,r.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.update(r),r.useType=t.useType,r._isDepth=(6&t.useType)>0||1&t.useType&&t.isManualDepth,G$3(e),e._renderPipeline.updateAndExecuteCommands(f,u$_(e.backgroundColor,e$1U.BLACK));var _=e._environmentState;if(!i.webgpu&&e._msaaSamples>1&&_.useGlobeDepthFramebuffer){var m=e._view.globeDepth;t.update(i,f,m.framebufferWithTexture)}else t.update(i,f,f.framebuffer);e._renderPipeline.resolveFramebuffers(f),r.commandList.length=0,i.endFrame(),t.end(r),e._environmentVisible=p,r.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.update(r),r._fboState.name=c,r._fboState.enabled=h,r._fboState.frameBufferType=d,r._isDepth=u,r.useType=l,r.passes.fbo=!1,e.shadowMap.enabled=a,r.shadowState.shadowsEnabled=s}function ma(e){var t=e._context.uniformState;if(!e.enableOutline||e.camera._positionCartographic.height>2e3)return t.nonSelDepthTexture=void 0,void(t.maskTexture=void 0);var i=e.nonSelDepthbuffer;e$2b(i)||((i=e.nonSelDepthbuffer=new s$T(e.context)).environmentVisible.isObjectVisible=!0,i.environmentVisible.isGlobalVisible=!0,i.isUpdate=!0,i._beginFunc=function(t){t.passes.pick=!0,t.passes.depth=!0,e.layers.getSelectedLayer().selectedColor.alpha=0},i._endFunc=function(t){t.passes.pick=!1,t.passes.depth=!1,e.layers.getSelectedLayer().selectedColor.alpha=1}),Yt(e,i),t.nonSelDepthTexture=i.depthTexture;var n=e.selMaskBuffer;e$2b(n)||((n=e.selMaskBuffer=new t$F(e.context))._useHeight=!1,n.environmentVisible.isObjectVisible=!0,n.environmentVisible.isOnlyS3MObjectVisible=!0,n.environmentVisible.isGlobalVisible=!1,n.isUpdate=!0),e._maskEnabled=!0;var r=e.backgroundColor;e.backgroundColor=e$1U.clone(e$1U.WHITE),Yt(e,n),e.backgroundColor=r,e._maskEnabled=!1,t.maskTexture=n.renderTexture._fb.getColorTexture(0)}w$3.prototype.addFieldLayer=function(e){if(!e$2b(e))throw new t$16("url is required!");var t=this;if(e.indexOf(".nc")>-1){var i=o$1l.defer();return o$1l(o$10(e),(function(e){var n=new k$5(e),r=new i$g(t._context);r._NetCDFBuffer=n,r.NetCDFInfo=n.header,t._layers.add(r),i.resolve(r)})).otherwise((function(e){throw i.reject(e.message),new t$16("Not a valid NetCDF file!")})),i.promise}},w$3.prototype.addVoxelGridLayer=function(e,t){if(!e$2b(e))throw new t$16("url is required!");var i=this,n=o$1l.defer();return e.indexOf(".nc")>-1?(o$1l(o$10(e),(function(e){var r=new k$5.NetCDFReader(e),o=new g$d(i._context);o._NetCDFBuffer=r,o._NetCDFInfo=r.header,o._name=t,i._layers.add(o),n.resolve(o)})).otherwise((function(e){throw new t$16("Not a valid NetCDF file!")})),n.promise):(o$1l(u$R(e),(function(t){for(var r=(t=(new DOMParser).parseFromString(t,"application/xml")).childNodes[0],o=u$_(s$S.queryStringAttribute(r,"xmlns:sml"),"http://www.supermap.com/SuperMapCache/scvo"),a=s$S.queryNumericValue(r,"Version",o),s=s$S.queryStringValue(r,"CacheName",o),l=(s$S.queryStringValue(r,"StoreType",o),s$S.queryStringValue(r,"FileExtentName",o),s$S.queryStringValue(r,"Type",o),s$S.queryStringValue(r,"VolumeType",o),s$S.queryNumericValue(r,"Width",o)),u=s$S.queryNumericValue(r,"Height",o),c=s$S.queryNumericValue(r,"Depth",o),h=s$S.queryNumericValue(r,"Time",o),d=s$S.queryNumericValue(r,"CellWidth",o),f=s$S.queryNumericValue(r,"CellHeight",o),p=s$S.queryNumericValue(r,"CellDepth",o),_=s$S.queryNumericValue(r,"CellTime",o),m=s$S.queryFirstNode(r,"Bounds",o),g=s$S.queryNumericValue(m,"Left",o),x=s$S.queryNumericValue(m,"Right",o),v=s$S.queryNumericValue(m,"Top",o),y=s$S.queryNumericValue(m,"Bottom",o),$=s$S.queryNumericValue(r,"MaxAltitude",o),b=s$S.queryNumericValue(r,"MinAltitude",o),T=s$S.queryNumericValue(r,"MaxValue",o),C=s$S.queryNumericValue(r,"MinValue",o),S=s$S.queryNumericValue(r,"Levels",o),w=s$S.queryFirstNode(r,"Available",o),E=s$S.queryNodes(w,"TilesBounds",o),P=[],A=0,L=E.length;A<L;A++){var M=s$S.queryNumericAttribute(E[A],"level",o),R=s$S.queryNodes(E[A],"TileBounds",o),I=s$S.queryNumericValue(R[0],"StartCol",o),O=s$S.queryNumericValue(R[0],"StartRow",o),D=s$S.queryNumericValue(R[0],"EndCol",o),B=s$S.queryNumericValue(R[0],"EndRow",o);P[M]={StartCol:I,StartRow:O,EndCol:D,EndRow:B}}var N=new g$d(i._context);N.setIsMultiResolution(!0);var F=e.lastIndexOf("/");N._url=e.slice(0,F),N._name=s,N._version=a,N._width=l,N._height=u,N._zBounds=new o$1o(b,$),N._layerBounds=new h$18(g,y,x,v);var U=N._layerBounds.width/l,z=N._layerBounds.height/u;for(A=P.length-1;A>=0;A--)P[A].Width=l,P[A].Height=u,l=Math.floor(.5*l),u=Math.floor(.5*u),P[A].resolution=new o$1o(U,z),U*=2,z*=2;N._depth=c,N._time=h,N._levels=S,N._cellWidth=d,N._cellHeight=f,N._cellDepth=p,N._cellTime=_,N._maxFiltration=T,N._minFiltration=C,N._floor=C,N._ceil=T,N._availableNode=P,o$1l(o$10(N._url+"/0/0000/0000/0000_0000.vol"),(function(e){var t=e.slice(16,e.byteLength);N._volumeBuffer=nt$9.inflate(t).buffer,i._layers.add(N),n.resolve(N)})).otherwise((function(e){throw new t$16("Not load root file!")}))})).otherwise((function(e){throw new t$16("Not a valid SCVO file!")})),n.promise)},w$3.prototype.renderIds=function(e){var t=this._context,i=this._defaultView;this._view=i;var n=i.viewport;n.x=0,n.y=0,n.width=t.drawingBufferWidth,n.height=t.drawingBufferHeight,F$3.x=0,F$3.y=0,F$3.width=t.drawingBufferWidth,F$3.height=t.drawingBufferHeight;var r=t.uniformState,o=this._frameState;W$6(this),o.invertClassification=!1,o.passes.pick=!0,r.update(o);var a=i.pickFramebuffer.begin(F$3,n),s=this._environmentVisible.isGlobalVisible;this._environmentVisible.isGlobalVisible=!1,this._environmentVisible.isOnlyS3MObjectVisible=!0;var l=this.camera,u=o$1p.clone(l.position),c=l.heading,h=l.pitch,d=l.roll;this.camera.setView(e),G$3(this),this._renderPipeline.updateAndExecuteCommands(a,ie$1),this._renderPipeline.resolveFramebuffers(a),t.endFrame(),this._environmentVisible.isGlobalVisible=s,this._environmentVisible.isOnlyS3MObjectVisible=!1,l.setView({destination:u,orientation:{heading:c,pitch:h,roll:d}})},w$3.prototype.pickRect=function(e,t){var i=e$2a.clamp(this._context.drawingBufferHeight-e.y,0,this._context.drawingBufferHeight),n=e$2a.clamp(this._context.drawingBufferHeight-t.y,0,this._context.drawingBufferHeight),r=Math.min(e.x,t.x),o=Math.min(i,n),a=Math.max(e.x,t.x),s=Math.max(i,n),l=new e$29;l.x=r/this._context.drawingBufferWidth,l.y=o/this._context.drawingBufferHeight,l.z=a/this._context.drawingBufferWidth,l.w=s/this._context.drawingBufferHeight,this._isUpdatePickCommand=!0,this._pickRect=new e$29(r,o,a,s);for(var u=0,c=this._layers.layerQueue.length;u<c;u++){this._layers.layerQueue[u].selectBound=l}},w$3.prototype.getPickRectIDs=function(){for(var e=new e$1N,t=this._layers.layerQueue,i={},n=!1,r=0;r<t.length;r++){i[(_=t[r]).id]=Object.keys(_._objsVisibleMap),n=!!_._objsVisibleMap[i[_.id][0]]}for(var o=0;o<10;o++){this._isUpdatePickCommand=!0,this.initializeFrame(),this._renderForQuery();var a=!1;for(r=0;r<t.length;r++){var s=(_=t[r]).getSelection();if(!(s.length<=0)){if(e.contains(_.id)){var l;l=s.concat(e.get(_.id).ids),s=l}for(var u=[],c=(o=0,s.length);o<c;o++){var h=s[o],d=i[_.id].indexOf(h);(n&&d>-1||!n&&-1===d)&&u.push(h)}var f={layerName:_.name,layerIndex:r,ids:u};e.set(_.id,f),a=!0,_.releaseSelection(),_.setObjsVisible(s,!1)}}if(!a)break}var p=[];this._isUpdatePickCommand=!1;for(o=0;o<e.values.length;o++){var _;(_=t[e.values[o].layerIndex]).setObjsVisible([],!1),n||_.setOnlyObjsVisible(i[_.id],n);var m={layerName:e.values[o].layerName,ids:e.values[o].ids};p.push(m)}return p},w$3.prototype.getPickRectIDsAsync=function(){var e=new Promise(((e,t)=>{for(var i=new e$1N,n=this._layers.layerQueue,r={},o=!1,a=0;a<n.length;a++){var s=n[a];r[s.id]=Object.keys(s._objsVisibleMap),o=!!s._objsVisibleMap[r[s.id][0]]}for(var l=0,u=0;u<10;u++)this._isUpdatePickCommand=!0,this.initializeFrame(),this._renderForQueryAsync().then((()=>{l++;for(var t=0;t<n.length;t++){var a=(m=n[t]).getSelection();if(!(a.length<=0)){if(i.contains(m.id)){var s;s=a.concat(i.get(m.id).ids),a=s}for(var u=[],c=0,h=a.length;c<h;c++){var d=a[c],f=r[m.id].indexOf(d);(o&&f>-1||!o&&-1===f)&&u.push(d)}var p={layerName:m.name,layerIndex:t,ids:u};i.set(m.id,p),m.releaseSelection()}}if(10===l){var _=[];this._isUpdatePickCommand=!1;for(c=0;c<i.values.length;c++){var m=n[i.values[c].layerIndex];o||m.setOnlyObjsVisible(r[m.id],o);var g={layerName:i.values[c].layerName,ids:i.values[c].ids};_.push(g)}e(_)}}))}));return e},w$3.prototype._renderForQuery=function(){var e=this.context,t=e.uniformState,i=this._frameState,n=this._defaultView;this._view=n,W$6(this),i.passes.render=!0,i.passes.postProcess=this.postProcessStages.hasSelected,i.backgroundColor=u$_(this.backgroundColor,e$1U.BLACK),t.update(i);var r=n.viewport;r.x=0,r.y=0,r.width=e.drawingBufferWidth,r.height=e.drawingBufferHeight;var o=n.passState;o.framebuffer=void 0,o.blendingEnabled=void 0,o.scissorTest=void 0,o.viewport=f$18.clone(r,o.viewport),st$1(this),ut$3(this),G$3(this),this._renderPipeline.resolveFramebuffers(o),o.framebuffer=void 0,jt(this),e.endFrame()},w$3.prototype._renderForQueryAsync=function(){var e=this.context,t=e.uniformState,i=this._frameState,n=this._defaultView;this._view=n,W$6(this),i.passes.render=!0,i.passes.postProcess=this.postProcessStages.hasSelected,i.backgroundColor=u$_(this.backgroundColor,e$1U.BLACK),t.update(i);var r=n.viewport;r.x=0,r.y=0,r.width=e.drawingBufferWidth,r.height=e.drawingBufferHeight;var o=n.passState;return o.framebuffer=void 0,o.blendingEnabled=void 0,o.scissorTest=void 0,o.viewport=f$18.clone(r,o.viewport),st$1(this),ut$3(this),G$3(this),this._renderPipeline.resolveFramebuffers(o),o.framebuffer=void 0,la(this).then((()=>(e.endFrame(),Promise.resolve())))},w$3.prototype.getHeight=function(e,t){var i=this._context,n=i.uniformState,r=this._frameState;this._environmentState;var o=this._defaultView;this._view=o;var a=o.viewport;a.x=0,a.y=0,a.width=i.drawingBufferWidth,a.height=i.drawingBufferHeight;var s=new o$1o(.5*i.drawingBufferWidth,.5*i.drawingBufferHeight),l=o.passState;l.viewport=f$18.clone(a,l.viewport),tt$1(r.passes),r.passes.pick=!0,r.passes.depth=!0,G$3(this),l=o.pickDepthFramebuffer.update(i,s,a);var u,c=this.camera,h=o$1p.clone(c.positionWC),d=o$1p.clone(c.direction),f=o$1p.clone(c.up);c.setView({destination:o$1p.fromDegrees(e,t,9e3)}),this._renderPipeline.updateAndExecuteCommands(l,ie$1),this._renderPipeline.resolveFramebuffers(l),i.endFrame(),u=e$2b(c.frustum.fov)?c.frustum.clone(Ee$1):e$2b(c.frustum.infiniteProjectionMatrix)?c.frustum.clone(Fe$1):e$2b(c.frustum.width)?c.frustum.clone(Re$1):c.frustum.clone(Le$1);for(var p,_=o.frustumCommandsList,m=_.length,g=new o$1p,x=0;x<m;++x){var v=this._picking.getPickDepth(this,x).getDepth(i,s.x,s.y);if(v>0&&v<1){var y=_[x];u.near=y.near*(0!==x?this.opaqueFrustumNearOffset:1),u.far=y.far,n.updateFrustum(u),g=s$Q.drawingBufferToWgs84Coordinates(this,s,v,g),p=a$18.fromCartesian(g).height;break}}return c.setView({destination:h,orientation:{direction:d,up:f}}),p},w$3.prototype.addLightSource=function(e){LicenseChecker.LICENSECHECKER.verify("Scene_addLightSource"),e$2b(e)&&this._lightSource.addLightSource(e)},w$3.prototype.removeLightSource=function(e){!e$2b(e)||this._lightSource.removeLightSource(e)},w$3.prototype.outputSceneToFile=function(){var e=this,t=o$1l.defer(),i=!1;return this.postRender.addEventListener((function(){i||(i=!0,e.context.readPixelsAsync({}).then((i=>{var n=document.createElement("canvas");n.height=e.context.drawingBufferHeight,n.width=e.context.drawingBufferWidth;var r=n.getContext("2d"),o=r.createImageData(n.width,n.height);o.data.set(i),r.putImageData(o,0,0);var a=r.getImageData(0,0,n.width,n.height);if(e.context.webgpu)for(var s=0;s<a.height;++s)for(var l=0;l<a.width;++l){var u=s*a.width+l,c=a.data[4*u],h=a.data[4*u+2];a.data[4*u]=h,a.data[4*u+2]=c}else for(s=0;s<a.height/2;++s)for(l=0;l<a.width;++l){var d=4*s*a.width+4*l,f=4*(a.height-s)*a.width+4*l,p=(c=a.data[d],a.data[d+1]),_=(h=a.data[d+2],a.data[d+3]);a.data[d]=a.data[f],a.data[d+1]=a.data[f+1],a.data[d+2]=a.data[f+2],a.data[d+3]=a.data[f+3],a.data[f]=c,a.data[f+1]=p,a.data[f+2]=h,a.data[f+3]=_}r.clearRect(0,0,a.width,a.height),r.putImageData(a,0,0);var m=n.toDataURL();t.resolve(m)})))})),t.promise},w$3.prototype.collideDetection=function(e){if(this.mode===C$13.SCENE3D||this.mode===C$13.COLUMBUS_VIEW){var t=this._context,i=this._defaultView;this._view=i;var n=this.camera,r=t.uniformState,o=o$1p.clone(n.direction),a=o$1p.clone(n.up),s=o$1p.cross(e,n.right,new o$1p);n.setView({destination:n.position,orientation:{direction:e,up:s},convert:n._mode!==C$13.COLUMBUS_VIEW});var l,u=new o$1o(.5*t.drawingBufferWidth,.5*t.drawingBufferHeight);at$3(this,u),this.camera.setView({destination:this.camera.position,orientation:{direction:o,up:a},convert:n._mode!==C$13.COLUMBUS_VIEW}),l=e$2b(n.frustum.fov)?n.frustum.clone(Ee$1):e$2b(n.frustum.infiniteProjectionMatrix)?n.frustum.clone(Fe$1):e$2b(n.frustum.width)?n.frustum.clone(Re$1):n.frustum.clone(Le$1);for(var c=i.frustumCommandsList,h=c.length,d=new o$1p,f=0;f<h;++f){var p=this._picking.getPickDepth(this,f).getDepth(t,u.x,u.y);if(p>0&&p<1){var _=c[f];return l.near=_.near*(0!==f?this.opaqueFrustumNearOffset:1),l.far=_.far,r.updateFrustum(l),s$Q.drawingBufferToWgs84Coordinates(this,u,p,d)}}}},w$3.prototype.parsePBRFromJson=function(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(t$11.createIfNeeded(e[i]).fetchJson());var r=this;o$1l.all(t,(function(e){for(var t=0,i=e.length;t<i;t++){var n=e[t].material,o=new p$1d,a=n.pbrMetallicRoughness;n.textureunitstates,o[0]=a.roughnessFactor,o[1]=a.metallicFactor,o[2]=a.baseColor.x,o[3]=a.baseColor.y,o[4]=a.baseColor.z,o[5]=a.baseColor.w,r._pbrMaterlParameters.push(o)}}))},w$3.prototype.isDestroyed=function(){return!1},w$3.prototype.destroy=function(){this.layers.removeAll(),this.layers.endFrame(this._frameState),this._analyst3D.removeAll(),this._vectorTileMaps.removeAll(),this._plotLayers.removeAll(),this.compositor.destroy(),this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.cloudBox=this.cloudBox&&this.cloudBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),e$2b(this._reflectFramebuffer)&&(this._reflectFramebuffer.destroy(),this._frameState._framebufferList.water=void 0),e$2b(this._normalFramebuffer)&&(this._normalFramebuffer.destroy(),this._frameState._framebufferList.normalAndDepth=void 0),e$2b(this._postEffectFilterFramebuffer)&&(this._postEffectFilterFramebuffer.destroy(),this._frameState._framebufferList.postEffectFilter=void 0),e$2b(this._clampFramebuffer)&&(this._clampFramebuffer.destroy(),this._frameState._framebufferList.clampTexture=void 0),e$2b(this._pickRectFramebuffer)&&(this._pickRectFramebuffer.destroy(),this._frameState._framebufferList.pickRectTexture=void 0),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),e$2b(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(var e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,this._rasterPickTexture=this._rasterPickTexture&&!this._rasterPickTexture.isDestroyed()&&this._rasterPickTexture.destroy(),this._rasterPickFBO=this._rasterPickFBO&&!this._rasterPickFBO.isDestroyed()&&this._rasterPickFBO.destroy(),e$2b(this.voxelGridPostRender)&&this.voxelGridPostRender.destroy(),this.voxelGridPostRender=void 0,e$2b(this.particlePostRender)&&this.particlePostRender.destroy(),this.particlePostRender=void 0,e$2b(this.particleTrailsPostRenderer)&&this.particleTrailsPostRenderer.destroy(),this.particleTrailsPostRenderer=void 0,e$2b(this.nonSelDepthbuffer)&&this.nonSelDepthbuffer.destroy(),e$2b(this.selMaskBuffer)&&this.selMaskBuffer.destroy(),e$2b(this._renderPipeline)&&this._renderPipeline.destroy(),i$10(this)};var g$7="uniform vec3 u_radiiAndDynamicAtmosphereColor;\n\nuniform float u_atmosphereLightIntensity;\nuniform float u_atmosphereRayleighScaleHeight;\nuniform float u_atmosphereMieScaleHeight;\nuniform float u_atmosphereMieAnisotropy;\nuniform vec3 u_atmosphereRayleighCoefficient;\nuniform vec3 u_atmosphereMieCoefficient;\n\nconst float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.\nconst int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.\nconst int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.\n\n/**\n * Rational approximation to tanh(x)\n*/\nfloat approximateTanh(float x) {\n float x2 = x * x;\n return max(-1.0, min(+1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));\n}\n\n/**\n * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as\n * the transmittance value for the ray.\n *\n * @param {czm_ray} primaryRay The ray from the camera to the position.\n * @param {float} primaryRayLength The length of the primary ray.\n * @param {vec3} lightDirection The direction of the light to calculate the scattering from.\n * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.\n * @param {vec3} mieColor The variable the Mie scattering will be written to.\n * @param {float} opacity The variable the transmittance will be written to.\n * @glslFunction\n */\nvoid computeScattering(\n czm_ray primaryRay,\n float primaryRayLength,\n vec3 lightDirection,\n float atmosphereInnerRadius,\n out vec3 rayleighColor,\n out vec3 mieColor,\n out float opacity\n) {\n\n // Initialize the default scattering amounts to 0.\n rayleighColor = vec3(0.0);\n mieColor = vec3(0.0);\n opacity = 0.0;\n\n float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\n\n vec3 origin = vec3(0.0);\n\n // Calculate intersection from the camera to the outer ring of the atmosphere.\n czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);\n\n // Return empty colors if no intersection with the atmosphere geometry.\n if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {\n return;\n }\n\n // To deal with smaller values of PRIMARY_STEPS (e.g. 4)\n // we implement a split strategy: sky or horizon.\n // For performance reasons, instead of a if/else branch\n // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0\n float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);\n // Value close to 0.0: close to the horizon\n // Value close to 1.0: above in the sky\n float w_stop_gt_lprl = 0.5 * (1.0 + approximateTanh(x));\n \n // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.\n float start_0 = primaryRayAtmosphereIntersect.start;\n primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);\n // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.\n primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));\n\n // For the number of ray steps, distinguish inside or outside atmosphere (outer space)\n // (1) from outer space we have to use more ray steps to get a realistic rendering\n // (2) within atmosphere we need fewer steps for faster rendering\n float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters\n float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + approximateTanh(x_o_a));\n int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.\n int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.\n\n // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.\n float rayPositionLength = primaryRayAtmosphereIntersect.start;\n // (1) Outside the atmosphere: constant rayStepLength\n // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps\n float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;\n float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));\n float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));\n\n vec3 rayleighAccumulation = vec3(0.0);\n vec3 mieAccumulation = vec3(0.0);\n vec2 opticalDepth = vec2(0.0);\n vec2 heightScale = vec2(u_atmosphereRayleighScaleHeight, u_atmosphereMieScaleHeight);\n\n // Sample positions on the primary ray.\n for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {\n\n // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to break early instead\n if (i >= PRIMARY_STEPS) {\n break;\n }\n\n // Calculate sample position along viewpoint ray.\n vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);\n\n // Calculate height of sample position above ellipsoid.\n float sampleHeight = length(samplePosition) - atmosphereInnerRadius;\n\n // Calculate and accumulate density of particles at the sample position.\n vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;\n opticalDepth += sampleDensity;\n\n // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.\n czm_ray lightRay = czm_ray(samplePosition, lightDirection);\n czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);\n\n float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);\n float lightPositionLength = 0.0;\n\n vec2 lightOpticalDepth = vec2(0.0);\n\n // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.\n for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {\n\n // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to break early instead\n if (j >= LIGHT_STEPS) {\n break;\n }\n\n // Calculate sample position along light ray.\n vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);\n\n // Calculate height of the light sample position above ellipsoid.\n float lightHeight = length(lightPosition) - atmosphereInnerRadius;\n\n // Calculate density of photons at the light sample position.\n lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;\n\n // Increment distance on light ray.\n lightPositionLength += lightStepLength;\n }\n\n // Compute attenuation via the primary ray and the light ray.\n vec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));\n\n // Accumulate the scattering.\n rayleighAccumulation += sampleDensity.x * attenuation;\n mieAccumulation += sampleDensity.y * attenuation;\n\n // Increment distance on primary ray.\n rayPositionLength += (rayStepLength += rayStepLengthIncrease);\n }\n\n // Compute the scattering amount.\n rayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation;\n mieColor = u_atmosphereMieCoefficient * mieAccumulation;\n\n // Compute the transmittance i.e. how much light is passing through the atmosphere.\n opacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x))));\n}\n\nvec4 computeAtmosphereColor(\n vec3 positionWC,\n vec3 lightDirection,\n vec3 rayleighColor,\n vec3 mieColor,\n float opacity\n) {\n // Setup the primary ray: from the camera position to the vertex position.\n vec3 cameraToPositionWC = positionWC - czm_viewerPositionECEF;\n vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\n\n float cosAngle = dot(cameraToPositionWCDirection, lightDirection);\n float cosAngleSq = cosAngle * cosAngle;\n\n float G = u_atmosphereMieAnisotropy;\n float GSq = G * G;\n\n // The Rayleigh phase function.\n float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);\n // The Mie phase function.\n float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));\n\n // The final color is generated by combining the effects of the Rayleigh and Mie scattering.\n vec3 rayleigh = rayleighPhase * rayleighColor;\n vec3 mie = miePhase * mieColor;\n\n vec3 color = (rayleigh + mie) * u_atmosphereLightIntensity;\n\n return vec4(color, opacity);\n}\n",x$5="float interpolateByDistance(vec4 nearFarScalar, float distance)\n{\n float startDistance = nearFarScalar.x;\n float startValue = nearFarScalar.y;\n float endDistance = nearFarScalar.z;\n float endValue = nearFarScalar.w;\n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\n return mix(startValue, endValue, t);\n}\n\nvec3 getLightDirection(vec3 positionWC)\n{\n float lightEnum = u_radiiAndDynamicAtmosphereColor.z;\n vec3 lightDirection =\n positionWC * float(lightEnum == 0.0) +\n czm_lightDirectionWC * float(lightEnum == 1.0) +\n czm_sunDirectionWC * float(lightEnum == 2.0);\n return normalize(lightDirection);\n}\n\nvoid computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity, out float underTranslucentGlobe)\n{\n float ellipsoidRadiiDifference = czm_ellipsoidRadii.x - czm_ellipsoidRadii.z;\n\n // Adjustment to the atmosphere radius applied based on the camera height.\n float distanceAdjustMin = czm_ellipsoidRadii.x / 4.0;\n float distanceAdjustMax = czm_ellipsoidRadii.x;\n float distanceAdjustModifier = ellipsoidRadiiDifference / 2.0;\n float distanceAdjust = distanceAdjustModifier * clamp((czm_eyeHeight - distanceAdjustMin) / (distanceAdjustMax - distanceAdjustMin), 0.0, 1.0);\n\n // Since atmosphere scattering assumes the atmosphere is a spherical shell, we compute an inner radius of the atmosphere best fit \n // for the position on the ellipsoid.\n float radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust;\n float atmosphereInnerRadius = (length(czm_viewerPositionECEF) - czm_eyeHeight) - radiusAdjust;\n\n // Setup the primary ray: from the camera position to the vertex position.\n vec3 cameraToPositionWC = positionWC - czm_viewerPositionECEF;\n vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\n czm_ray primaryRay = czm_ray(czm_viewerPositionECEF, cameraToPositionWCDirection);\n\n underTranslucentGlobe = 0.0;\n\n // Brighten the sky atmosphere under the Earth's atmosphere when translucency is enabled.\n #if defined(GLOBE_TRANSLUCENT)\n\n // Check for intersection with the inner radius of the atmopshere.\n czm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust);\n if (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) {\n \n // Compute position on globe.\n vec3 direction = normalize(positionWC);\n czm_ray ellipsoidRay = czm_ray(positionWC, -direction);\n czm_raySegment ellipsoidIntersection = czm_rayEllipsoidIntersectionInterval(ellipsoidRay, vec3(0.0), czm_ellipsoidInverseRadii);\n vec3 onEarth = positionWC - (direction * ellipsoidIntersection.start);\n\n // Control the color using the camera angle.\n float angle = dot(normalize(czm_viewerPositionECEF), normalize(onEarth));\n\n // Control the opacity using the distance from Earth.\n opacity = interpolateByDistance(vec4(0.0, 1.0, czm_ellipsoidRadii.x, 0.0), length(czm_viewerPositionECEF - onEarth));\n vec3 horizonColor = vec3(0.1, 0.2, 0.3);\n vec3 nearColor = vec3(0.0);\n\n rayleighColor = mix(nearColor, horizonColor, exp(-angle) * opacity);\n \n // Set the traslucent flag to avoid alpha adjustment in computeFinalColor funciton.\n underTranslucentGlobe = 1.0;\n return;\n }\n #endif\n\n computeScattering(\n primaryRay,\n length(cameraToPositionWC),\n lightDirection,\n atmosphereInnerRadius,\n rayleighColor,\n mieColor,\n opacity\n );\n\n // Alter the opacity based on how close the viewer is to the ground.\n // (0.0 = At edge of atmosphere, 1.0 = On ground)\n float cameraHeight = czm_eyeHeight + atmosphereInnerRadius;\n float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\n opacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0);\n\n // Alter alpha based on time of day (0.0 = night , 1.0 = day)\n float nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;\n opacity *= pow(nightAlpha, 0.5);\n}\n",B$3="varying vec3 v_outerPositionWC;\n\nuniform vec3 u_hsbShift;\n\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\nvarying float v_opacity;\nvarying float v_translucent;\n#endif\n\nvoid main (void)\n{\n vec3 lightDirection = getLightDirection(v_outerPositionWC);\n \n vec3 mieColor;\n vec3 rayleighColor;\n float opacity;\n float translucent;\n\n #ifdef PER_FRAGMENT_ATMOSPHERE\n computeAtmosphereScattering(\n v_outerPositionWC,\n lightDirection,\n rayleighColor,\n mieColor,\n opacity,\n translucent\n );\n #else\n mieColor = v_mieColor;\n rayleighColor = v_rayleighColor;\n opacity = v_opacity;\n translucent = v_translucent;\n #endif\n\n vec4 color = computeAtmosphereColor(v_outerPositionWC, lightDirection, rayleighColor, mieColor, opacity);\n\n #ifndef HDR\n color.rgb = czm_acesTonemapping(color.rgb);\n color.rgb = czm_inverseGamma(color.rgb);\n #endif\n\n #ifdef COLOR_CORRECT\n // Convert rgb color to hsb\n vec3 hsb = czm_RGBToHSB(color.rgb);\n // Perform hsb shift\n hsb.x += u_hsbShift.x; // hue\n hsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0); // saturation\n hsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0; // brightness\n // Convert shifted hsb back to rgb\n color.rgb = czm_HSBToRGB(hsb);\n #endif\n\n // For the parts of the sky atmosphere that are not behind a translucent globe,\n // we mix in the default opacity so that the sky atmosphere still appears at distance.\n // This is needed because the opacity in the sky atmosphere is initially adjusted based\n // on the camera height.\n if (translucent == 0.0) {\n color.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime);\n }\n\n gl_FragColor = color;\n}\n",I$2="attribute vec4 position;\n\nvarying vec3 v_outerPositionWC;\n\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\nvarying float v_opacity;\nvarying float v_translucent;\n#endif\n\nvoid main(void)\n{\n vec4 positionWC = czm_model * position;\n vec3 lightDirection = getLightDirection(positionWC.xyz);\n\n #ifndef PER_FRAGMENT_ATMOSPHERE\n computeAtmosphereScattering(\n positionWC.xyz,\n lightDirection,\n v_rayleighColor,\n v_mieColor,\n v_opacity,\n v_translucent\n );\n #endif\n \n v_outerPositionWC = positionWC.xyz;\n vec4 realPosition = czm_model * position;\n realPosition.xyz -= czm_relativeOrigin;\n gl_Position = czm_viewProjection * realPosition;\n}\n";function h$6(e){e=u$_(e,t$13.WGS84),this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;const t=o$1p.multiplyByScalar(e.radii,1.025,new o$1p);this._scaleMatrix=p$1d.fromScale(t),this._modelMatrix=new p$1d,this._command=new i$_({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new o$1p(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new o$1p(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new o$1p;const i=new o$1p;i.x=1.025*e.maximumRadius,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;const n=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return n._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return n._hueSaturationBrightness.x=n.hueShift,n._hueSaturationBrightness.y=n.saturationShift,n._hueSaturationBrightness.z=n.brightnessShift,n._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return n.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return n.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return n.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return n.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return n.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return n.atmosphereMieAnisotropy}}}Object.defineProperties(h$6.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),h$6.prototype.setDynamicAtmosphereColor=function(e,t){const i=e?t?2:1:0;this._radiiAndDynamicAtmosphereColor.z=i};const u$6=new p$1d;function V$4(e){return!(e$2a.equalsEpsilon(e.hueShift,0,e$2a.EPSILON7)&&e$2a.equalsEpsilon(e.saturationShift,0,e$2a.EPSILON7)&&e$2a.equalsEpsilon(e.brightnessShift,0,e$2a.EPSILON7))}h$6.prototype.update=function(e,t){if(!this.show)return;const i=e.mode;if(i!==C$13.SCENE3D&&i!==C$13.MORPHING||!e.passes.render)return;const n=p$1d.fromRotationTranslation(e.context.uniformState.inverseViewRotation,o$1p.ZERO,u$6),r=p$1d.multiplyTransformation(n,v$y.Y_UP_TO_Z_UP,u$6),o=p$1d.multiply(this._scaleMatrix,r,u$6);p$1d.clone(o,this._modelMatrix);const a=e.context,s=V$4(this),l=e.globeTranslucencyState.translucent,u=this.perFragmentAtmosphere||l||!e$2b(t)||!t.show,c=this._command;if(!e$2b(c.vertexArray)){const e=b$P.createGeometry(new b$P({radii:new o$1p(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:n$11.POSITION_ONLY}));this._attributeLocations=k$13.createAttributeLocations(e),c.vertexArray=c$12.fromGeometry({context:a,geometry:e,attributeLocations:this._attributeLocations,bufferUsage:A$19.STATIC_DRAW}),c.renderState=d$1m.fromCache({cull:{enabled:!0,face:G$17.FRONT},blending:Ee$r.ALPHA_BLEND,depthMask:!1})}const h=s|u<<2|l<<3;if(h!==this._flags){this._flags=h;const e=[];s&&e.push("COLOR_CORRECT"),u&&e.push("PER_FRAGMENT_ATMOSPHERE"),l&&e.push("GLOBE_TRANSLUCENT");const t=new s$U({name:"SkyAtmosphereVS",defines:e,sources:[g$7,x$5,I$2]}),i=new s$U({name:"SkyAtmosphereFS",defines:e,sources:[g$7,x$5,B$3]});this._spSkyAtmosphere=r$13.fromCache({context:a,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:this._attributeLocations}),c.shaderProgram=this._spSkyAtmosphere}return c},h$6.prototype.isDestroyed=function(){return!1},h$6.prototype.destroy=function(){const e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),i$10(this)};var J$1="uniform samplerCube u_cubeMap;\nuniform float u_alpha;\nvarying vec3 v_texCoord;\n\nvoid main()\n{\n vec4 color = textureCube(u_cubeMap, normalize(v_texCoord));\n float alpha = czm_sceneMode == czm_sceneModeColumbusView ? u_alpha : u_alpha * czm_morphTime;\n gl_FragColor = vec4(czm_gammaCorrect(color).rgb, alpha);\n}\n",$$3="attribute vec3 position;\nuniform mat3 u_rotateMatrix;\nvarying vec3 v_texCoord;\n\nvoid main()\n{\n if (czm_sceneMode == czm_sceneModeColumbusView) {\n vec3 worldPosition = czm_entireFrustum.y * position;\n gl_Position = czm_modelViewProjection * vec4(worldPosition, 1.0);\n vec3 texCoord = normalize(worldPosition);\n v_texCoord = texCoord.zxy;\n }\n else{\n vec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position.xyz;\n }\n}\n";function h$5(e){LicenseChecker.LICENSECHECKER.verify("SkyBox"),this.sources=e.sources,this._sources=void 0,this.show=u$_(e.show,!0),this._command=new i$_({modelMatrix:p$1d.clone(p$1d.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0,this.alpha=1,this._uSpeed=0,this._vSpeed=0,this._wSpeed=0,this._horizontalRotationAngle=0,this._axisChanged=!0,this.imageUrl=e.imageUrl,this._imageUrl=void 0,this._PreprocessCubeMap=void 0}function oe$2(e){return!(0!==e._horizontalRotationAngle||0!==e._wSpeed||0!==e._uSpeed||0!==e._vSpeed)}Object.defineProperties(h$5.prototype,{USpeed:{get:function(){return this._uSpeed},set:function(e){o$1q.typeOf.number("SkyBox.uSpeed",e),this._uSpeed=e,this._axisChanged=!0}},VSpeed:{get:function(){return this._vSpeed},set:function(e){o$1q.typeOf.number("SkyBox.vSpeed",e),this._vSpeed=e,this._axisChanged=!0}},WSpeed:{get:function(){return this._wSpeed},set:function(e){o$1q.typeOf.number("SkyBox.wSpeed",e),this._wSpeed=e,this._axisChanged=!0}},horizontalRotationAngle:{get:function(){return this._horizontalRotationAngle},set:function(e){o$1q.typeOf.number("SkyBox.horizontalRotationAngle",e),this._horizontalRotationAngle=e,this._axisChanged=!0}}});var ae$1=new o$1p,S$1=new o$1p,w$2=new o$1p,C$5=new o$1p,ne$2=new o$1p(1,1,1),A$6=new n$13,d$b=new o$1p,P$4=0,R$4=p$1d.IDENTITY.clone(new p$1d);function t$8(){}h$5.prototype.update=function(e,t){oe$2(this)||LicenseChecker.LICENSECHECKER.verify("SkyBox");var i=this;if(this.show&&(e.mode===C$13.SCENE3D||e.mode===C$13.COLUMBUS_VIEW||e.mode===C$13.MORPHING)&&e.passes.render){var n=e.context;if(this._sources!==this.sources){this._sources=this.sources;var r=this.sources;if(!(e$2b(r.positiveX)&&e$2b(r.negativeX)&&e$2b(r.positiveY)&&e$2b(r.negativeY)&&e$2b(r.positiveZ)&&e$2b(r.negativeZ)))throw new t$16("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof r.positiveX!=typeof r.negativeX||typeof r.positiveX!=typeof r.positiveY||typeof r.positiveX!=typeof r.negativeY||typeof r.positiveX!=typeof r.positiveZ||typeof r.positiveX!=typeof r.negativeZ)throw new t$16("this.sources properties must all be the same type.");"string"==typeof r.positiveX?d$q(n,this._sources).then((function(e){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=e})):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new e$1M({context:n,source:r}))}this._imageUrl!==this.imageUrl&&!this._sources&&(this._imageUrl=this.imageUrl,this._PreprocessCubeMap=new b$r(n,this._imageUrl)),e$2b(this._PreprocessCubeMap)&&(this._PreprocessCubeMap.update(e),this._PreprocessCubeMap.ready&&(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=this._PreprocessCubeMap.cubeMap,this._PreprocessCubeMap=void 0));var o=this._command;if(e.mode===C$13.COLUMBUS_VIEW?o.modelMatrix=e.camera._actualInvTransform:o.modelMatrix=m$17.eastNorthUpToFixedFrame(e.camera._positionWC),o.removeAllFastBundleAndBindGroups(),this._axisChanged){var a=p$1d.multiplyByPoint(o.modelMatrix,o$1p.ZERO,ae$1),s=p$1d.multiplyByPoint(o.modelMatrix,o$1p.UNIT_X,S$1),l=p$1d.multiplyByPoint(o.modelMatrix,o$1p.UNIT_Y,w$2),u=p$1d.multiplyByPoint(o.modelMatrix,o$1p.UNIT_Z,C$5),c=o$1p.subtract(s,a,S$1),h=o$1p.subtract(l,a,w$2),d=o$1p.subtract(u,a,C$5),f=n$13.fromAxisAngle(c,this._uSpeed*performance.now()/1e5),p=n$13.fromAxisAngle(h,this._vSpeed*performance.now()/1e5),_=n$13.fromAxisAngle(d,this._wSpeed*performance.now()/1e5);this._horizontalRotationAngle&&(_=n$13.fromAxisAngle(d,this._horizontalRotationAngle));var m=n$13.multiply(f,n$13.multiply(p,_,A$6),A$6);d$b=n$13.computeAxis(m,d$b),P$4=Math.max(Math.max(Math.abs(this._uSpeed),Math.abs(this._vSpeed)),Math.abs(this._wSpeed)),this._axisChanged=!1}var g=p$1d.IDENTITY.clone(R$4);if(!o$1p.equals(d$b,o$1p.ZERO)&&!e.camera.bReflect){var x=P$4*performance.now()/1e5;this._horizontalRotationAngle&&(x=this._horizontalRotationAngle),g=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,n$13.fromAxisAngle(d$b,x),ne$2,R$4),p$1d.multiply(g,o.modelMatrix,o.modelMatrix)}if(!e$2b(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return i._cubeMap},u_rotateMatrix:function(){return p$1d.getRotation(o.modelMatrix,new p$1e)},u_alpha:function(){return i.alpha}};var v=O$y.createGeometry(O$y.fromDimensions({dimensions:new o$1p(2,2,2),vertexFormat:n$11.POSITION_ONLY})),y=this._attributeLocations=k$13.createAttributeLocations(v);o.vertexArray=c$12.fromGeometry({context:n,geometry:v,attributeLocations:y,bufferUsage:A$19.STATIC_DRAW}),o.renderState=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND})}if(!e$2b(o.shaderProgram)||this._useHdr!==t){var $=new s$U({defines:[t?"HDR":""],sources:[J$1]});o.shaderProgram=r$13.fromCache({name:"spSkyBox",context:n,vertexShaderSource:$$3,fragmentShaderSource:$,attributeLocations:this._attributeLocations}),this._useHdr=t}if(e$2b(this._cubeMap))return o}},h$5.prototype.isDestroyed=function(){return!1},h$5.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),i$10(this)},t$8.prototype.evaluate=function(e,t){t$16.throwInstantiationError()},t$8.prototype.evaluateColor=function(e,t){t$16.throwInstantiationError()},t$8.prototype.getShaderFunction=function(e,t,i,n){t$16.throwInstantiationError()};var rt$2="uniform sampler2D u_texture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color = texture2D(u_texture, v_textureCoordinates);\n gl_FragColor = czm_gammaCorrect(color);\n}\n",et$1="uniform float u_radiusTS;\n\nvarying vec2 v_textureCoordinates;\n\nvec2 rotate(vec2 p, vec2 direction)\n{\n return vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);\n}\n\nvec4 addBurst(vec2 position, vec2 direction, float lengthScalar)\n{\n vec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);\n float radius = length(rotatedPosition) * lengthScalar;\n float burst = 1.0 - smoothstep(0.0, 0.55, radius);\n return vec4(burst);\n}\n\nvoid main()\n{\n float lengthScalar = 2.0 / sqrt(2.0);\n vec2 position = v_textureCoordinates - vec2(0.5);\n float radius = length(position) * lengthScalar;\n float surface = step(radius, u_radiusTS);\n vec4 color = vec4(vec2(1.0), surface + 0.2, surface);\n\n float glow = 1.0 - smoothstep(0.0, 0.55, radius);\n color.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;\n\n vec4 burst = vec4(0.0);\n\n // The following loop has been manually unrolled for speed, to\n // avoid sin() and cos().\n //\n //for (float i = 0.4; i < 3.2; i += 1.047) {\n // vec2 direction = vec2(sin(i), cos(i));\n // burst += 0.4 * addBurst(position, direction, lengthScalar);\n //\n // direction = vec2(sin(i - 0.08), cos(i - 0.08));\n // burst += 0.3 * addBurst(position, direction, lengthScalar);\n //}\n\n burst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar); // angle == 0.4\n burst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar); // angle == 0.4 + 1.047\n burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar); // angle == 0.4 + 1.047 * 2.0\n\n burst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar); // angle == 0.4 - 0.08\n burst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar); // angle == 0.4 + 1.047 - 0.08\n burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar); // angle == 0.4 + 1.047 * 2.0 - 0.08\n\n // End of manual loop unrolling.\n\n color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;\n\n gl_FragColor = clamp(color, vec4(0.0), vec4(1.0));\n}\n",it="attribute vec2 direction;\n\nuniform float u_size;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main() \n{\n vec4 position;\n if (czm_morphTime == 1.0)\n {\n position = vec4(czm_sunPositionWC, 1.0);\n }\n else\n {\n position = vec4(czm_sunPositionColumbusView.zxy, 1.0);\n }\n \n vec4 positionEC = czm_view * position;\n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n \n vec2 halfSize = vec2(u_size * 0.5);\n halfSize *= ((direction * 2.0) - 1.0);\n \n gl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);\n \n v_textureCoordinates = direction;\n}\n",nt$1="attribute direction : vec2<f32>;\n\nuniform u_size : f32;\n\nvarying v_textureCoordinates : vec2<f32>;\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs { \n var position : vec4<f32>;\n if (uniforms.czm_morphTime == 1.0)\n {\n position = vec4<f32>(uniforms.czm_sunPositionWC, 1.0);\n }\n else\n {\n position = vec4<f32>(uniforms.czm_sunPositionColumbusView.zxy, 1.0);\n }\n \n var positionEC = uniforms.czm_view * position;\n var positionWC = czm_eyeToWindowCoordinates(positionEC);\n \n var halfSize = vec2<f32>(uniforms.u_size * 0.5);\n halfSize *= ((direction * 2.0) - 1.0);\n \n gl_Position = uniforms.czm_viewportOrthographic * vec4<f32>(positionWC.xy + halfSize, -positionWC.z, 1.0);\n \n v_textureCoordinates = direction;\n}\n",at$2="\nvar u_texture : texture_2d<f32>;\nvar u_textureSampler : sampler;\n\nvarying v_textureCoordinates : vec2<f32>;\n\nfn gammaCorrect(color : vec4<f32>) -> vec4<f32>\n{\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3(uniforms.czm_gamma));\n#endif\n return color;\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var color = textureSample(u_texture, u_textureSampler, v_textureCoordinates);\n gl_FragColor = gammaCorrect(color);\n}\n";function u$5(){this.show=!0,this._drawCommand=new i$_({primitiveType:W$18.TRIANGLES,boundingVolume:new i$1c,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new i$1c,this._boundingVolume2D=new i$1c,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;var e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(u$5.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var ut$2=new o$1o,st=new o$1o,dt$1=new e$29,s$8=new e$29;u$5.prototype.update=function(e,t,i){if(this.show){var n=e.mode;if(n!==C$13.SCENE2D&&n!==C$13.MORPHING&&e.passes.render){var r=e.context,o=t.viewport.width,a=t.viewport.height;if(!e$2b(this._texture)||o!==this._drawingBufferWidth||a!==this._drawingBufferHeight||this._glowFactorDirty||i!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=o,this._drawingBufferHeight=a,this._glowFactorDirty=!1,this._useHdr=i;var s=Math.max(o,a);s=Math.pow(2,Math.ceil(Math.log(s)/Math.log(2))-2),s=Math.max(1,s);var l=i?r.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT:_$$.UNSIGNED_BYTE;this._texture=new t$V({context:r,width:s,height:s,pixelFormat:V$10.RGBA,pixelDatatype:l}),this._glowLengthTS=5*this._glowFactor,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;var u=this,c={u_radiusTS:function(){return u._radiusTS}},h=r$13.fromCache({name:"SunTextureSP",context:r,vertexShaderSource:ot$7,fragmentShaderSource:et$1,attributeLocations:{aPosition:0,textureCoordinates:1}});this._commands.computeCommand=new t$I({name:"Sun",shaderProgram:h,outputTexture:this._texture,uniformMap:c,persists:!1,owner:this,postExecute:function(){u._commands.computeCommand.shaderProgram._isReady()&&(u._commands.computeCommand=void 0)}})}var d=this._drawCommand;if(!e$2b(d.vertexArray)){var f={direction:0},p=new Float32Array(8);p[0]=0,p[1]=0,p[2]=255,p[3]=0,p[4]=255,p[5]=255,p[6]=0,p[7]=255;var _=t$Y.createVertexBuffer({context:r,typedArray:p,usage:A$19.STATIC_DRAW}),m=[{name:"direction",index:f.direction,vertexBuffer:_,componentsPerAttribute:2,normalize:!0,componentDatatype:S$12.FLOAT}],g=t$Y.createIndexBuffer({context:r,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});d.vertexArray=new c$12({context:r,attributes:m,indexBuffer:g}),d.shaderProgram=r$13.fromCache({name:"spSun",context:r,vertexShaderSource:r.webgpu?nt$1:it,fragmentShaderSource:r.webgpu?at$2:rt$2,attributeLocations:f,useWGSL:r.webgpu}),d.renderState=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND}),d.uniformMap=this._uniformMap}var x=r.uniformState.sunPositionWC,v=r.uniformState.sunPositionColumbusView,y=this._boundingVolume,$=this._boundingVolume2D;o$1p.clone(x,y.center),$.center.x=v.z,$.center.y=v.x,$.center.z=v.y,y.radius=e$2a.SOLAR_RADIUS+e$2a.SOLAR_RADIUS*this._glowLengthTS,$.radius=y.radius,n===C$13.SCENE3D?i$1c.clone(y,d.boundingVolume):n===C$13.COLUMBUS_VIEW&&i$1c.clone($,d.boundingVolume);var b=s$Q.computeActualWgs84Position(e,x,s$8),T=o$1p.magnitude(o$1p.subtract(b,e.camera.position,s$8)),C=r.uniformState.projection,S=dt$1;S.x=0,S.y=0,S.z=-T,S.w=1;var w=p$1d.multiplyByVector(C,S,s$8),E=s$Q.clipToGLWindowCoordinates(t.viewport,w,ut$2);S.x=e$2a.SOLAR_RADIUS;var P=p$1d.multiplyByVector(C,S,s$8),A=s$Q.clipToGLWindowCoordinates(t.viewport,P,st);return this._size=o$1o.magnitude(o$1o.subtract(A,E,s$8)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands}}},u$5.prototype.isDestroyed=function(){return!1},u$5.prototype.destroy=function(){var e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),i$10(this)};var L$7=null;try{L$7=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function s$7(e,t,i){this.low=0|e,this.high=0|t,this.unsigned=!!i}function l$8(e){return!0===(e&&e.__isLong__)}s$7.prototype.__isLong__,Object.defineProperty(s$7.prototype,"__isLong__",{value:!0}),s$7.isLong=l$8;var M$4={},R$3={};function d$a(e,t){var i,n,r;return t?(r=0<=(e>>>=0)&&e<256)&&(n=R$3[e])?n:(i=e$1(e,(0|e)<0?-1:0,!0),r&&(R$3[e]=i),i):(r=-128<=(e|=0)&&e<128)&&(n=M$4[e])?n:(i=e$1(e,e<0?-1:0,!1),r&&(M$4[e]=i),i)}function v$5(e,t){if(isNaN(e))return t?U$4:q$3;if(t){if(e<0)return U$4;if(e>=Z$4)return H$2}else{if(e<=-P$3)return c$9;if(e+1>=P$3)return D$4}return e<0?v$5(-e,t).neg():e$1(e%T$4|0,e/T$4|0,t)}function e$1(e,t,i){return new s$7(e,t,i)}s$7.fromInt=d$a,s$7.fromNumber=v$5,s$7.fromBits=e$1;var x$4=Math.pow;function I$1(e,t,i){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return q$3;if("number"==typeof t?(i=t,t=!1):t=!!t,(i=i||10)<2||36<i)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return I$1(e.substring(1),t,i).neg();for(var r=v$5(x$4(i,8)),o=q$3,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),l=parseInt(e.substring(a,a+s),i);if(s<8){var u=v$5(x$4(i,s));o=o.mul(u).add(v$5(l))}else o=(o=o.mul(r)).add(v$5(l))}return o.unsigned=t,o}function O$4(e,t){return"number"==typeof e?v$5(e,t):"string"==typeof e?I$1(e,t):e$1(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}s$7.fromString=I$1,s$7.fromValue=O$4;var W$5=65536,C$4=1<<24,T$4=W$5*W$5,Z$4=T$4*T$4,P$3=Z$4/2,S=d$a(C$4),q$3=d$a(0);s$7.ZERO=q$3;var U$4=d$a(0,!0);s$7.UZERO=U$4;var b$7=d$a(1);s$7.ONE=b$7;var V$3=d$a(1,!0);s$7.UONE=V$3;var A$5=d$a(-1);s$7.NEG_ONE=A$5;var D$4=e$1(-1,2147483647,!1);s$7.MAX_VALUE=D$4;var H$2=e$1(-1,-1,!0);s$7.MAX_UNSIGNED_VALUE=H$2;var c$9=e$1(0,-2147483648,!1);s$7.MIN_VALUE=c$9;var h$4=s$7.prototype;h$4.toInt=function(){return this.unsigned?this.low>>>0:this.low},h$4.toNumber=function(){return this.unsigned?(this.high>>>0)*T$4+(this.low>>>0):this.high*T$4+(this.low>>>0)},h$4.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(c$9)){var t=v$5(e),i=this.div(t),n=i.mul(t).sub(this);return i.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var r=v$5(x$4(e,6),this.unsigned),o=this,a="";;){var s=o.div(r),l=(o.sub(s.mul(r)).toInt()>>>0).toString(e);if((o=s).isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},h$4.getHighBits=function(){return this.high},h$4.getHighBitsUnsigned=function(){return this.high>>>0},h$4.getLowBits=function(){return this.low},h$4.getLowBitsUnsigned=function(){return this.low>>>0},h$4.getNumBitsAbs=function(){if(this.isNegative())return this.eq(c$9)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},h$4.isZero=function(){return 0===this.high&&0===this.low},h$4.eqz=h$4.isZero,h$4.isNegative=function(){return!this.unsigned&&this.high<0},h$4.isPositive=function(){return this.unsigned||this.high>=0},h$4.isOdd=function(){return 1==(1&this.low)},h$4.isEven=function(){return 0==(1&this.low)},h$4.equals=function(e){return l$8(e)||(e=O$4(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},h$4.eq=h$4.equals,h$4.notEquals=function(e){return!this.eq(e)},h$4.neq=h$4.notEquals,h$4.ne=h$4.notEquals,h$4.lessThan=function(e){return this.comp(e)<0},h$4.lt=h$4.lessThan,h$4.lessThanOrEqual=function(e){return this.comp(e)<=0},h$4.lte=h$4.lessThanOrEqual,h$4.le=h$4.lessThanOrEqual,h$4.greaterThan=function(e){return this.comp(e)>0},h$4.gt=h$4.greaterThan,h$4.greaterThanOrEqual=function(e){return this.comp(e)>=0},h$4.gte=h$4.greaterThanOrEqual,h$4.ge=h$4.greaterThanOrEqual,h$4.compare=function(e){if(l$8(e)||(e=O$4(e)),this.eq(e))return 0;var t=this.isNegative(),i=e.isNegative();return t&&!i?-1:!t&&i?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},h$4.comp=h$4.compare,h$4.negate=function(){return!this.unsigned&&this.eq(c$9)?c$9:this.not().add(b$7)},h$4.neg=h$4.negate,h$4.add=function(e){l$8(e)||(e=O$4(e));var t=this.high>>>16,i=65535&this.high,n=this.low>>>16,r=65535&this.low,o=e.high>>>16,a=65535&e.high,s=e.low>>>16,l=0,u=0,c=0,h=0;return c+=(h+=r+(65535&e.low))>>>16,u+=(c+=n+s)>>>16,l+=(u+=i+a)>>>16,l+=t+o,e$1((c&=65535)<<16|(h&=65535),(l&=65535)<<16|(u&=65535),this.unsigned)},h$4.subtract=function(e){return l$8(e)||(e=O$4(e)),this.add(e.neg())},h$4.sub=h$4.subtract,h$4.multiply=function(e){if(this.isZero())return q$3;if(l$8(e)||(e=O$4(e)),L$7)return e$1(L$7.mul(this.low,this.high,e.low,e.high),L$7.get_high(),this.unsigned);if(e.isZero())return q$3;if(this.eq(c$9))return e.isOdd()?c$9:q$3;if(e.eq(c$9))return this.isOdd()?c$9:q$3;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(S)&&e.lt(S))return v$5(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,i=65535&this.high,n=this.low>>>16,r=65535&this.low,o=e.high>>>16,a=65535&e.high,s=e.low>>>16,l=65535&e.low,u=0,c=0,h=0,d=0;return h+=(d+=r*l)>>>16,c+=(h+=n*l)>>>16,h&=65535,c+=(h+=r*s)>>>16,u+=(c+=i*l)>>>16,c&=65535,u+=(c+=n*s)>>>16,c&=65535,u+=(c+=r*a)>>>16,u+=t*l+i*s+n*a+r*o,e$1((h&=65535)<<16|(d&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},h$4.mul=h$4.multiply,h$4.divide=function(e){if(l$8(e)||(e=O$4(e)),e.isZero())throw Error("division by zero");var t,i,n;if(L$7)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?e$1((this.unsigned?L$7.div_u:L$7.div_s)(this.low,this.high,e.low,e.high),L$7.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?U$4:q$3;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return U$4;if(e.gt(this.shru(1)))return V$3;n=U$4}else{if(this.eq(c$9))return e.eq(b$7)||e.eq(A$5)?c$9:e.eq(c$9)?b$7:(t=this.shr(1).div(e).shl(1)).eq(q$3)?e.isNegative()?b$7:A$5:(i=this.sub(e.mul(t)),n=t.add(i.div(e)));if(e.eq(c$9))return this.unsigned?U$4:q$3;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=q$3}for(i=this;i.gte(e);){t=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var r=Math.ceil(Math.log(t)/Math.LN2),o=r<=48?1:x$4(2,r-48),a=v$5(t),s=a.mul(e);s.isNegative()||s.gt(i);)s=(a=v$5(t-=o,this.unsigned)).mul(e);a.isZero()&&(a=b$7),n=n.add(a),i=i.sub(s)}return n},h$4.div=h$4.divide,h$4.modulo=function(e){return l$8(e)||(e=O$4(e)),L$7?e$1((this.unsigned?L$7.rem_u:L$7.rem_s)(this.low,this.high,e.low,e.high),L$7.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},h$4.mod=h$4.modulo,h$4.rem=h$4.modulo,h$4.not=function(){return e$1(~this.low,~this.high,this.unsigned)},h$4.and=function(e){return l$8(e)||(e=O$4(e)),e$1(this.low&e.low,this.high&e.high,this.unsigned)},h$4.or=function(e){return l$8(e)||(e=O$4(e)),e$1(this.low|e.low,this.high|e.high,this.unsigned)},h$4.xor=function(e){return l$8(e)||(e=O$4(e)),e$1(this.low^e.low,this.high^e.high,this.unsigned)},h$4.shiftLeft=function(e){return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$1(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):e$1(0,this.low<<e-32,this.unsigned)},h$4.shl=h$4.shiftLeft,h$4.shiftRight=function(e){return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$1(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):e$1(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},h$4.shr=h$4.shiftRight,h$4.shiftRightUnsigned=function(e){return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$1(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):e$1(32===e?this.high:this.high>>>e-32,0,this.unsigned)},h$4.shru=h$4.shiftRightUnsigned,h$4.shr_u=h$4.shiftRightUnsigned,h$4.rotateLeft=function(e){var t;return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?e$1(this.high,this.low,this.unsigned):e<32?(t=32-e,e$1(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),e$1(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},h$4.rotl=h$4.rotateLeft,h$4.rotateRight=function(e){var t;return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?e$1(this.high,this.low,this.unsigned):e<32?(t=32-e,e$1(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),e$1(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},h$4.rotr=h$4.rotateRight,h$4.toSigned=function(){return this.unsigned?e$1(this.low,this.high,!1):this},h$4.toUnsigned=function(){return this.unsigned?this:e$1(this.low,this.high,!0)},h$4.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},h$4.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},h$4.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},s$7.fromBytes=function(e,t,i){return i?s$7.fromBytesLE(e,t):s$7.fromBytesBE(e,t)},s$7.fromBytesLE=function(e,t){return new s$7(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},s$7.fromBytesBE=function(e,t){return new s$7(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var u$4=function(e,t,i){if(typeof e>"u"&&(e=u$4.DEFAULT_CAPACITY),typeof t>"u"&&(t=u$4.DEFAULT_ENDIAN),typeof i>"u"&&(i=u$4.DEFAULT_NOASSERT),!i){if((e|=0)<0)throw RangeError("Illegal capacity");t=!!t,i=!!i}this.buffer=0===e?x$3:new ArrayBuffer(e),this.view=0===e?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=e,this.littleEndian=t,this.noAssert=i};u$4.VERSION="5.0.1",u$4.LITTLE_ENDIAN=!0,u$4.BIG_ENDIAN=!1,u$4.DEFAULT_CAPACITY=16,u$4.DEFAULT_ENDIAN=u$4.BIG_ENDIAN,u$4.DEFAULT_NOASSERT=!1,u$4.Long=s$7||null;var l$7=u$4.prototype;l$7.__isByteBuffer__,Object.defineProperty(l$7,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var x$3=new ArrayBuffer(0),I=String.fromCharCode;function c$8(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function d$9(){var e=[],t=[];return function(){if(0===arguments.length)return t.join("")+I.apply(String,e);e.length+arguments.length>1024&&(t.push(I.apply(String,e)),e.length=0),Array.prototype.push.apply(e,arguments)}}function E$3(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)}function m$7(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_}u$4.accessor=function(){return Uint8Array},u$4.allocate=function(e,t,i){return new u$4(e,t,i)},u$4.concat=function(e,t,i,n){("boolean"==typeof t||"string"!=typeof t)&&(n=i,i=t,t=void 0);for(var r,o=0,a=0,s=e.length;a<s;++a)u$4.isByteBuffer(e[a])||(e[a]=u$4.wrap(e[a],t)),(r=e[a].limit-e[a].offset)>0&&(o+=r);if(0===o)return new u$4(0,i,n);var l,u=new u$4(o,i,n);for(a=0;a<s;)!((r=(l=e[a++]).limit-l.offset)<=0)&&(u.view.set(l.view.subarray(l.offset,l.limit),u.offset),u.offset+=r);return u.limit=u.offset,u.offset=0,u},u$4.isByteBuffer=function(e){return!0===(e&&e.__isByteBuffer__)},u$4.type=function(){return ArrayBuffer},u$4.wrap=function(e,t,i,n){if("string"!=typeof t&&(n=i,i=t,t=void 0),"string"==typeof e)switch(typeof t>"u"&&(t="utf8"),t){case"base64":return u$4.fromBase64(e,i);case"hex":return u$4.fromHex(e,i);case"binary":return u$4.fromBinary(e,i);case"utf8":return u$4.fromUTF8(e,i);case"debug":return u$4.fromDebug(e,i);default:throw Error("Unsupported encoding: "+t)}if(null===e||"object"!=typeof e)throw TypeError("Illegal buffer");var r;if(u$4.isByteBuffer(e))return(r=l$7.clone.call(e)).markedOffset=-1,r;if(e instanceof Uint8Array)r=new u$4(0,i,n),e.length>0&&(r.buffer=e.buffer,r.offset=e.byteOffset,r.limit=e.byteOffset+e.byteLength,r.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)r=new u$4(0,i,n),e.byteLength>0&&(r.buffer=e,r.offset=0,r.limit=e.byteLength,r.view=e.byteLength>0?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");(r=new u$4(e.length,i,n)).limit=e.length;for(var o=0;o<e.length;++o)r.view[o]=e[o]}return r},l$7.writeBitSet=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t,o=e.length,a=o>>3,s=0;for(t+=this.writeVarint32(o,t);a--;)n=1&!!e[s++]|(1&!!e[s++])<<1|(1&!!e[s++])<<2|(1&!!e[s++])<<3|(1&!!e[s++])<<4|(1&!!e[s++])<<5|(1&!!e[s++])<<6|(1&!!e[s++])<<7,this.writeByte(n,t++);if(s<o){var l=0;for(n=0;s<o;)n|=(1&!!e[s++])<<l++;this.writeByte(n,t++)}return i?(this.offset=t,this):t-r},l$7.readBitSet=function(e){var t=typeof e>"u";t&&(e=this.offset);var i,n=this.readVarint32(e),r=n.value,o=r>>3,a=0,s=[];for(e+=n.length;o--;)i=this.readByte(e++),s[a++]=!!(1&i),s[a++]=!!(2&i),s[a++]=!!(4&i),s[a++]=!!(8&i),s[a++]=!!(16&i),s[a++]=!!(32&i),s[a++]=!!(64&i),s[a++]=!!(128&i);if(a<r){var l=0;for(i=this.readByte(e++);a<r;)s[a++]=!!(i>>l++&1)}return t&&(this.offset=e),s},l$7.readBytes=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}var n=this.slice(t,t+e);return i&&(this.offset+=e),n},l$7.writeBytes=l$7.append,l$7.writeInt8=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=1,this.view[t]=e,i&&(this.offset+=1),this},l$7.writeByte=l$7.writeInt8,l$7.readInt8=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=this.view[e];return 128==(128&i)&&(i=-(255-i+1)),t&&(this.offset+=1),i},l$7.readByte=l$7.readInt8,l$7.writeUint8=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=1,this.view[t]=e,i&&(this.offset+=1),this},l$7.writeUInt8=l$7.writeUint8,l$7.readUint8=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=this.view[e];return t&&(this.offset+=1),i},l$7.readUInt8=l$7.readUint8,l$7.writeInt16=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),i&&(this.offset+=2),this},l$7.writeShort=l$7.writeInt16,l$7.readInt16=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e],i|=this.view[e+1]<<8):(i=this.view[e]<<8,i|=this.view[e+1]),32768==(32768&i)&&(i=-(65535-i+1)),t&&(this.offset+=2),i},l$7.readShort=l$7.readInt16,l$7.writeUint16=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),i&&(this.offset+=2),this},l$7.writeUInt16=l$7.writeUint16,l$7.readUint16=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e],i|=this.view[e+1]<<8):(i=this.view[e]<<8,i|=this.view[e+1]),t&&(this.offset+=2),i},l$7.readUInt16=l$7.readUint16,l$7.writeInt32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),i&&(this.offset+=4),this},l$7.writeInt=l$7.writeInt32,l$7.readInt32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0),i|=0,t&&(this.offset+=4),i},l$7.readInt=l$7.readInt32,l$7.writeUint32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),i&&(this.offset+=4),this},l$7.writeUInt32=l$7.writeUint32,l$7.readUint32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0),t&&(this.offset+=4),i},l$7.readUInt32=l$7.readUint32,s$7&&(l$7.writeInt64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s$7.fromNumber(e);else if("string"==typeof e)e=s$7.fromString(e);else if(!(e&&e instanceof s$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s$7.fromNumber(e):"string"==typeof e&&(e=s$7.fromString(e)),t+=8;var n=this.buffer.byteLength;t>n&&this.resize((n*=2)>t?n:t),t-=8;var r=e.low,o=e.high;return this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=o>>>24&255,this.view[t+2]=o>>>16&255,this.view[t+1]=o>>>8&255,this.view[t]=255&o):(this.view[t]=o>>>24&255,this.view[t+1]=o>>>16&255,this.view[t+2]=o>>>8&255,this.view[t+3]=255&o,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),i&&(this.offset+=8),this},l$7.writeLong=l$7.writeInt64,l$7.readInt64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=0,n=0;this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0);var r=new s$7(i,n,!1);return t&&(this.offset+=8),r},l$7.readLong=l$7.readInt64,l$7.writeUint64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s$7.fromNumber(e);else if("string"==typeof e)e=s$7.fromString(e);else if(!(e&&e instanceof s$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s$7.fromNumber(e):"string"==typeof e&&(e=s$7.fromString(e)),t+=8;var n=this.buffer.byteLength;t>n&&this.resize((n*=2)>t?n:t),t-=8;var r=e.low,o=e.high;return this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=o>>>24&255,this.view[t+2]=o>>>16&255,this.view[t+1]=o>>>8&255,this.view[t]=255&o):(this.view[t]=o>>>24&255,this.view[t+1]=o>>>16&255,this.view[t+2]=o>>>8&255,this.view[t+3]=255&o,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),i&&(this.offset+=8),this},l$7.writeUInt64=l$7.writeUint64,l$7.readUint64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=0,n=0;this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0);var r=new s$7(i,n,!0);return t&&(this.offset+=8),r},l$7.readUInt64=l$7.readUint64),l$7.writeFloat32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,m$7(this.view,e,t,this.littleEndian,23,4),i&&(this.offset+=4),this},l$7.writeFloat=l$7.writeFloat32,l$7.readFloat32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=E$3(this.view,e,this.littleEndian,23,4);return t&&(this.offset+=4),i},l$7.readFloat=l$7.readFloat32,l$7.writeFloat64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=8,m$7(this.view,e,t,this.littleEndian,52,8),i&&(this.offset+=8),this},l$7.writeDouble=l$7.writeFloat64,l$7.readFloat64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=E$3(this.view,e,this.littleEndian,52,8);return t&&(this.offset+=8),i},l$7.readDouble=l$7.readFloat64,u$4.MAX_VARINT32_BYTES=5,u$4.calculateVarint32=function(e){return(e>>>=0)<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},u$4.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},u$4.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},l$7.writeVarint32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=u$4.calculateVarint32(e);t+=r;var o=this.buffer.byteLength;for(t>o&&this.resize((o*=2)>t?o:t),t-=r,e>>>=0;e>=128;)n=127&e|128,this.view[t++]=n,e>>>=7;return this.view[t++]=e,i?(this.offset=t,this):r},l$7.writeVarint32ZigZag=function(e,t){return this.writeVarint32(u$4.zigZagEncode32(e),t)},l$7.readVarint32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,n=0,r=0;do{if(!this.noAssert&&e>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}i=this.view[e++],n<5&&(r|=(127&i)<<7*n),++n}while(0!=(128&i));return r|=0,t?(this.offset=e,r):{value:r,length:n}},l$7.readVarint32ZigZag=function(e){var t=this.readVarint32(e);return"object"==typeof t?t.value=u$4.zigZagDecode32(t.value):t=u$4.zigZagDecode32(t),t},s$7&&(u$4.MAX_VARINT64_BYTES=10,u$4.calculateVarint64=function(e){"number"==typeof e?e=s$7.fromNumber(e):"string"==typeof e&&(e=s$7.fromString(e));var t=e.toInt()>>>0,i=e.shiftRightUnsigned(28).toInt()>>>0,n=e.shiftRightUnsigned(56).toInt()>>>0;return 0==n?0==i?t<16384?t<128?1:2:t<1<<21?3:4:i<16384?i<128?5:6:i<1<<21?7:8:n<128?9:10},u$4.zigZagEncode64=function(e){return"number"==typeof e?e=s$7.fromNumber(e,!1):"string"==typeof e?e=s$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},u$4.zigZagDecode64=function(e){return"number"==typeof e?e=s$7.fromNumber(e,!1):"string"==typeof e?e=s$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(s$7.ONE).toSigned().negate()).toSigned()},l$7.writeVarint64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s$7.fromNumber(e);else if("string"==typeof e)e=s$7.fromString(e);else if(!(e&&e instanceof s$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s$7.fromNumber(e,!1):"string"==typeof e?e=s$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned());var n=u$4.calculateVarint64(e),r=e.toInt()>>>0,o=e.shiftRightUnsigned(28).toInt()>>>0,a=e.shiftRightUnsigned(56).toInt()>>>0;t+=n;var s=this.buffer.byteLength;switch(t>s&&this.resize((s*=2)>t?s:t),t-=n,n){case 10:this.view[t+9]=a>>>7&1;case 9:this.view[t+8]=9!==n?128|a:127&a;case 8:this.view[t+7]=8!==n?o>>>21|128:o>>>21&127;case 7:this.view[t+6]=7!==n?o>>>14|128:o>>>14&127;case 6:this.view[t+5]=6!==n?o>>>7|128:o>>>7&127;case 5:this.view[t+4]=5!==n?128|o:127&o;case 4:this.view[t+3]=4!==n?r>>>21|128:r>>>21&127;case 3:this.view[t+2]=3!==n?r>>>14|128:r>>>14&127;case 2:this.view[t+1]=2!==n?r>>>7|128:r>>>7&127;case 1:this.view[t]=1!==n?128|r:127&r}return i?(this.offset+=n,this):n},l$7.writeVarint64ZigZag=function(e,t){return this.writeVarint64(u$4.zigZagEncode64(e),t)},l$7.readVarint64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=e,n=0,r=0,o=0,a=0;if(n=127&(a=this.view[e++]),128&a&&(n|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&typeof a>"u")&&(n|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&typeof a>"u")&&(n|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&typeof a>"u")&&(r=127&(a=this.view[e++]),(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&typeof a>"u")&&(o=127&(a=this.view[e++]),(128&a||this.noAssert&&typeof a>"u")&&(o|=(127&(a=this.view[e++]))<<7,128&a||this.noAssert&&typeof a>"u"))))))))))throw Error("Buffer overrun");var s=s$7.fromBits(n|r<<28,r>>>4|o<<24,!1);return t?(this.offset=e,s):{value:s,length:e-i}},l$7.readVarint64ZigZag=function(e){var t=this.readVarint64(e);return t&&t.value instanceof s$7?t.value=u$4.zigZagDecode64(t.value):t=u$4.zigZagDecode64(t),t}),l$7.writeCString=function(e,t){var i=typeof t>"u";i&&(t=this.offset);var n,r=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(n=0;n<r;++n)if(0===e.charCodeAt(n))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}r=b$6.calculateUTF16asUTF8(c$8(e))[1],t+=r+1;var o=this.buffer.byteLength;return t>o&&this.resize((o*=2)>t?o:t),t-=r+1,b$6.encodeUTF16toUTF8(c$8(e),function(e){this.view[t++]=e}.bind(this)),this.view[t++]=0,i?(this.offset=t,this):r},l$7.readCString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,n=e,r=-1;return b$6.decodeUTF8toUTF16(function(){if(0===r)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return 0===(r=this.view[e++])?null:r}.bind(this),i=d$9(),!0),t?(this.offset=e,i()):{string:i(),length:e-n}},l$7.writeIString=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t;n=b$6.calculateUTF16asUTF8(c$8(e),this.noAssert)[1],t+=4+n;var o=this.buffer.byteLength;if(t>o&&this.resize((o*=2)>t?o:t),t-=4+n,this.littleEndian?(this.view[t+3]=n>>>24&255,this.view[t+2]=n>>>16&255,this.view[t+1]=n>>>8&255,this.view[t]=255&n):(this.view[t]=n>>>24&255,this.view[t+1]=n>>>16&255,this.view[t+2]=n>>>8&255,this.view[t+3]=255&n),t+=4,b$6.encodeUTF16toUTF8(c$8(e),function(e){this.view[t++]=e}.bind(this)),t!==r+4+n)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+n));return i?(this.offset=t,this):t-r},l$7.readIString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=e,n=this.readUint32(e),r=this.readUTF8String(n,u$4.METRICS_BYTES,e+=4);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-i}},u$4.METRICS_CHARS="c",u$4.METRICS_BYTES="b",l$7.writeUTF8String=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t;n=b$6.calculateUTF16asUTF8(c$8(e))[1],t+=n;var o=this.buffer.byteLength;return t>o&&this.resize((o*=2)>t?o:t),t-=n,b$6.encodeUTF16toUTF8(c$8(e),function(e){this.view[t++]=e}.bind(this)),i?(this.offset=t,this):t-r},l$7.writeString=l$7.writeUTF8String,u$4.calculateUTF8Chars=function(e){return b$6.calculateUTF16asUTF8(c$8(e))[0]},u$4.calculateUTF8Bytes=function(e){return b$6.calculateUTF16asUTF8(c$8(e))[1]},u$4.calculateString=u$4.calculateUTF8Bytes,l$7.readUTF8String=function(e,t,i){"number"==typeof t&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),typeof t>"u"&&(t=u$4.METRICS_CHARS),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var r,o=0,a=i;if(t===u$4.METRICS_CHARS){if(r=d$9(),b$6.decodeUTF8(function(){return o<e&&i<this.limit?this.view[i++]:null}.bind(this),(function(e){++o,b$6.UTF8toUTF16(e,r)})),o!==e)throw RangeError("Illegal range: Truncated data, "+o+" == "+e);return n?(this.offset=i,r()):{string:r(),length:i-a}}if(t===u$4.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+"+e+") <= "+this.buffer.byteLength)}var s=i+e;if(b$6.decodeUTF8toUTF16(function(){return i<s?this.view[i++]:null}.bind(this),r=d$9(),this.noAssert),i!==s)throw RangeError("Illegal range: Truncated data, "+i+" == "+s);return n?(this.offset=i,r()):{string:r(),length:i-a}}throw TypeError("Unsupported metrics: "+t)},l$7.readString=l$7.readUTF8String,l$7.writeVString=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r,o=t;n=b$6.calculateUTF16asUTF8(c$8(e),this.noAssert)[1],r=u$4.calculateVarint32(n),t+=r+n;var a=this.buffer.byteLength;if(t>a&&this.resize((a*=2)>t?a:t),t-=r+n,t+=this.writeVarint32(n,t),b$6.encodeUTF16toUTF8(c$8(e),function(e){this.view[t++]=e}.bind(this)),t!==o+n+r)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+n+r));return i?(this.offset=t,this):t-o},l$7.readVString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=e,n=this.readVarint32(e),r=this.readUTF8String(n.value,u$4.METRICS_BYTES,e+=n.length);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-i}},l$7.append=function(e,t,i){("number"==typeof t||"string"!=typeof t)&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}e instanceof u$4||(e=u$4.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;i+=r;var o=this.buffer.byteLength;return i>o&&this.resize((o*=2)>i?o:i),i-=r,this.view.set(e.view.subarray(e.offset,e.limit),i),e.offset+=r,n&&(this.offset+=r),this},l$7.appendTo=function(e,t){return e.append(this,t),this},l$7.assert=function(e){return this.noAssert=!e,this},l$7.capacity=function(){return this.buffer.byteLength},l$7.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},l$7.clone=function(e){var t=new u$4(0,this.littleEndian,this.noAssert);return e?(t.buffer=new ArrayBuffer(this.buffer.byteLength),t.view=new Uint8Array(t.buffer)):(t.buffer=this.buffer,t.view=this.view),t.offset=this.offset,t.markedOffset=this.markedOffset,t.limit=this.limit,t},l$7.compact=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var i=t-e;if(0===i)return this.buffer=x$3,this.view=null,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(i),r=new Uint8Array(n);return r.set(this.view.subarray(e,t)),this.buffer=n,this.view=r,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=i,this},l$7.copy=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(e===t)return new u$4(0,this.littleEndian,this.noAssert);var i=t-e,n=new u$4(i,this.littleEndian,this.noAssert);return n.offset=0,n.limit=i,n.markedOffset>=0&&(n.markedOffset-=e),this.copyTo(n,0,e,t),n},l$7.copyTo=function(e,t,i,n){var r,o;if(!this.noAssert&&!u$4.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(t=(o=typeof t>"u")?e.offset:0|t,i=(r=typeof i>"u")?this.offset:0|i,n=typeof n>"u"?this.limit:0|n,t<0||t>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+t+" <= "+e.buffer.byteLength);if(i<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+i+" <= "+this.buffer.byteLength);var a=n-i;return 0===a?e:(e.ensureCapacity(t+a),e.view.set(this.view.subarray(i,n),t),r&&(this.offset+=a),o&&(e.offset+=a),this)},l$7.ensureCapacity=function(e){var t=this.buffer.byteLength;return t<e?this.resize((t*=2)>e?t:e):this},l$7.fill=function(e,t,i){var n=typeof t>"u";if(n&&(t=this.offset),"string"==typeof e&&e.length>0&&(e=e.charCodeAt(0)),typeof t>"u"&&(t=this.offset),typeof i>"u"&&(i=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(t>=i)return this;for(;t<i;)this.view[t++]=e;return n&&(this.offset=t),this},l$7.flip=function(){return this.limit=this.offset,this.offset=0,this},l$7.mark=function(e){if(e=typeof e>"u"?this.offset:e,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},l$7.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},l$7.LE=function(e){return this.littleEndian=!(typeof e<"u")||!!e,this},l$7.BE=function(e){return this.littleEndian=typeof e<"u"&&!e,this},l$7.prepend=function(e,t,i){("number"==typeof t||"string"!=typeof t)&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}e instanceof u$4||(e=u$4.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;var o=r-i;if(o>0){var a=new ArrayBuffer(this.buffer.byteLength+o),s=new Uint8Array(a);s.set(this.view.subarray(i,this.buffer.byteLength),r),this.buffer=a,this.view=s,this.offset+=o,this.markedOffset>=0&&(this.markedOffset+=o),this.limit+=o,i+=o}else new Uint8Array(this.buffer);return this.view.set(e.view.subarray(e.offset,e.limit),i-r),e.offset=e.limit,n&&(this.offset-=r),this},l$7.prependTo=function(e,t){return e.prepend(this,t),this},l$7.printDebug=function(e){"function"!=typeof e&&(e=console.log.bind(console)),e(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},l$7.remaining=function(){return this.limit-this.offset},l$7.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},l$7.resize=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal capacity: "+e+" (not an integer)");if((e|=0)<0)throw RangeError("Illegal capacity: 0 <= "+e)}if(this.buffer.byteLength<e){var t=new ArrayBuffer(e),i=new Uint8Array(t);i.set(this.view),this.buffer=t,this.view=i}return this},l$7.reverse=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t||Array.prototype.reverse.call(this.view.subarray(e,t)),this},l$7.skip=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},l$7.slice=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i=this.clone();return i.offset=e,i.limit=t,i},l$7.toBuffer=function(e){var t=this.offset,i=this.limit;if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal limit: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(!e&&0===t&&i===this.buffer.byteLength)return this.buffer;if(t===i)return x$3;var n=new ArrayBuffer(i-t);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(t,i),0),n},l$7.toArrayBuffer=l$7.toBuffer,l$7.toString=function(e,t,i){if(typeof e>"u")return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof e&&(i=t=e="utf8"),e){case"utf8":return this.toUTF8(t,i);case"base64":return this.toBase64(t,i);case"hex":return this.toHex(t,i);case"binary":return this.toBinary(t,i);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var T$3=function(){for(var e={},t=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],i=[],n=0,r=t.length;n<r;++n)i[t[n]]=n;return e.encode=function(e,i){for(var n,r;null!==(n=e());)i(t[n>>2&63]),r=(3&n)<<4,null!==(n=e())?(i(t[63&((r|=n>>4&15)|n>>4&15)]),r=(15&n)<<2,null!==(n=e())?(i(t[63&(r|n>>6&3)]),i(t[63&n])):(i(t[63&r]),i(61))):(i(t[63&r]),i(61),i(61))},e.decode=function(e,t){var n,r,o;function a(e){throw Error("Illegal character code: "+e)}for(;null!==(n=e());)if(typeof(r=i[n])>"u"&&a(n),null!==(n=e())&&(typeof(o=i[n])>"u"&&a(n),t(r<<2>>>0|(48&o)>>4),null!==(n=e()))){if(typeof(r=i[n])>"u"){if(61===n)break;a(n)}if(t((15&o)<<4>>>0|(60&r)>>2),null!==(n=e())){if(typeof(o=i[n])>"u"){if(61===n)break;a(n)}t((3&r)<<6>>>0|o)}}},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},e}();l$7.toBase64=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity||e>t)throw RangeError("begin, end");var i;return T$3.encode(function(){return e<t?this.view[e++]:null}.bind(this),i=d$9()),i()},u$4.fromBase64=function(e,t){if("string"!=typeof e)throw TypeError("str");var i=new u$4(e.length/4*3,t),n=0;return T$3.decode(c$8(e),(function(e){i.view[n++]=e})),i.limit=n,i},u$4.btoa=function(e){return u$4.fromBinary(e).toBase64()},u$4.atob=function(e){return u$4.fromBase64(e).toBinary()},l$7.toBinary=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity()||e>t)throw RangeError("begin, end");if(e===t)return"";for(var i=[],n=[];e<t;)i.push(this.view[e++]),i.length>=1024&&(n.push(String.fromCharCode.apply(String,i)),i=[]);return n.join("")+String.fromCharCode.apply(String,i)},u$4.fromBinary=function(e,t){if("string"!=typeof e)throw TypeError("str");for(var i,n=0,r=e.length,o=new u$4(r,t);n<r;){if((i=e.charCodeAt(n))>255)throw RangeError("illegal char code: "+i);o.view[n++]=i}return o.limit=r,o},l$7.toDebug=function(e){for(var t,i=-1,n=this.buffer.byteLength,r="",o="",a="";i<n;){if(-1!==i&&(r+=(t=this.view[i])<16?"0"+t.toString(16).toUpperCase():t.toString(16).toUpperCase(),e&&(o+=t>32&&t<127?String.fromCharCode(t):".")),++i,e&&i>0&&i%16==0&&i!==n){for(;r.length<51;)r+=" ";a+=r+o+"\n",r=o=""}i===this.offset&&i===this.limit?r+=i===this.markedOffset?"!":"|":i===this.offset?r+=i===this.markedOffset?"[":"<":i===this.limit?r+=i===this.markedOffset?"]":">":r+=i===this.markedOffset?"'":e||0!==i&&i!==n?" ":""}if(e&&" "!==r){for(;r.length<51;)r+=" ";a+=r+o+"\n"}return e?a:r},u$4.fromDebug=function(e,t,i){for(var n,r,o=e.length,a=new u$4((o+1)/3|0,t,i),s=0,l=0,u=!1,c=!1,h=!1,d=!1,f=!1;s<o;){switch(n=e.charAt(s++)){case"!":if(!i){if(c||h||d){f=!0;break}c=h=d=!0}a.offset=a.markedOffset=a.limit=l,u=!1;break;case"|":if(!i){if(c||d){f=!0;break}c=d=!0}a.offset=a.limit=l,u=!1;break;case"[":if(!i){if(c||h){f=!0;break}c=h=!0}a.offset=a.markedOffset=l,u=!1;break;case"<":if(!i){if(c){f=!0;break}c=!0}a.offset=l,u=!1;break;case"]":if(!i){if(d||h){f=!0;break}d=h=!0}a.limit=a.markedOffset=l,u=!1;break;case">":if(!i){if(d){f=!0;break}d=!0}a.limit=l,u=!1;break;case"'":if(!i){if(h){f=!0;break}h=!0}a.markedOffset=l,u=!1;break;case" ":u=!1;break;default:if(!i&&u){f=!0;break}if(r=parseInt(n+e.charAt(s++),16),!i&&(isNaN(r)||r<0||r>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[l++]=r,u=!0}if(f)throw TypeError("Illegal str: Invalid symbol at "+s)}if(!i){if(!c||!d)throw TypeError("Illegal str: Missing offset or limit");if(l<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+l+" < "+o)}return a},l$7.toHex=function(e,t){if(e=typeof e>"u"?this.offset:e,t=typeof t>"u"?this.limit:t,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var i,n=new Array(t-e);e<t;)(i=this.view[e++])<16?n.push("0",i.toString(16)):n.push(i.toString(16));return n.join("")},u$4.fromHex=function(e,t,i){if(!i){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if(e.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var n,r=e.length,o=new u$4(r/2|0,t),a=0,s=0;a<r;a+=2){if(n=parseInt(e.substring(a,a+2),16),!i&&(!isFinite(n)||n<0||n>255))throw TypeError("Illegal str: Contains non-hex characters");o.view[s++]=n}return o.limit=s,o};var b$6=function(){var e={MAX_CODEPOINT:1114111,encodeUTF8:function(e,t){var i=null;for("number"==typeof e&&(i=e,e=function(){return null});null!==i||null!==(i=e());)i<128?t(127&i):i<2048?(t(i>>6&31|192),t(63&i|128)):i<65536?(t(i>>12&15|224),t(i>>6&63|128),t(63&i|128)):(t(i>>18&7|240),t(i>>12&63|128),t(i>>6&63|128),t(63&i|128)),i=null},decodeUTF8:function(e,t){for(var i,n,r,o,a=function(e){e=e.slice(0,e.indexOf(null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(i=e());)if(0==(128&i))t(i);else if(192==(224&i))null===(n=e())&&a([i,n]),t((31&i)<<6|63&n);else if(224==(240&i))(null===(n=e())||null===(r=e()))&&a([i,n,r]),t((15&i)<<12|(63&n)<<6|63&r);else{if(240!=(248&i))throw RangeError("Illegal starting byte: "+i);(null===(n=e())||null===(r=e())||null===(o=e()))&&a([i,n,r,o]),t((7&i)<<18|(63&n)<<12|(63&r)<<6|63&o)}},UTF16toUTF8:function(e,t){for(var i,n=null;null!==(i=null!==n?n:e());)i>=55296&&i<=57343&&null!==(n=e())&&n>=56320&&n<=57343?(t(1024*(i-55296)+n-56320+65536),n=null):t(i);null!==n&&t(n)},UTF8toUTF16:function(e,t){var i=null;for("number"==typeof e&&(i=e,e=function(){return null});null!==i||null!==(i=e());)i<=65535?t(i):(t(55296+((i-=65536)>>10)),t(i%1024+56320)),i=null},encodeUTF16toUTF8:function(t,i){e.UTF16toUTF8(t,(function(t){e.encodeUTF8(t,i)}))},decodeUTF8toUTF16:function(t,i){e.decodeUTF8(t,(function(t){e.UTF8toUTF16(t,i)}))},calculateCodePoint:function(e){return e<128?1:e<2048?2:e<65536?3:4},calculateUTF8:function(e){for(var t,i=0;null!==(t=e());)i+=t<128?1:t<2048?2:t<65536?3:4;return i},calculateUTF16asUTF8:function(t){var i=0,n=0;return e.UTF16toUTF8(t,(function(e){++i,n+=e<128?1:e<2048?2:e<65536?3:4})),[i,n]}};return e}();l$7.toUTF8=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i;try{b$6.decodeUTF8toUTF16(function(){return e<t?this.view[e++]:null}.bind(this),i=d$9())}catch{if(e!==t)throw RangeError("Illegal range: Truncated data, "+e+" != "+t)}return i()},u$4.fromUTF8=function(e,t,i){if(!i&&"string"!=typeof e)throw TypeError("Illegal str: Not a string");var n=new u$4(b$6.calculateUTF16asUTF8(c$8(e),!0)[1],t,i),r=0;return b$6.encodeUTF16toUTF8(c$8(e),(function(e){n.view[r++]=e})),n.limit=r,n};var f$7={};function h$3(e){e=u$_(e,u$_.EMPTY_OBJECT),this.proxy=e.proxy,this.viewer=e.viewer,this.url=e.url,this.metadata=u$_(e.metadata,{boundBox:{minX:-180,minY:-90,maxX:180,maxY:90},minLevel:1,maxLevel:20}),this.roadMetadata=e.roadMetadata,this.roadUrl=e.roadUrl,this.labelGraphics=e.labelGraphics?e.labelGraphics:{},this.billboardGraphics=e.billboardGraphics?e.billboardGraphics:{},this.aotuCollide=u$_(e.aotuCollide,!0),this.collisionPadding=e.collisionPadding?e.collisionPadding:[3,5,3,5],this.serverFirstStyle=u$_(e.serverFirstStyle,!0),this.subdomains=e.subdomains,Array.isArray(this.subdomains)?this.subdomains=this.subdomains.slice():e$2b(this.subdomains)&&0<this.subdomains.length?this.subdomains=this.subdomains.split(""):this.subdomains=["t0","t1","t2","t3","t4","t5","t6","t7"],this.token=e.token,this.depthTestOptimization=u$_(e.depthTestOptimization,!1),this.dTOElevation=u$_(e.dTOElevation,2e4),this.dTOPitch=u$_(e.dTOPitch,-1.22),this.tileCache=[],this.labelCache=[],this._isInitial=!1,this._latelyGrid=[],this._latelyRefreshStamp=0,this._latelyCollisionStamp=0;var t=e$1Q();this._UUID="TDT_WTFS_LABEL_"+t,this._UUIDRoad="TDT_WTFS_LABEL_ROAD_"+t,this._isDTP=!1,this.viewer.camera.percentageChanged=.18,this.bindEvent()}function G$2(e,t){return t.minX>=e.minX&&t.minX<=e.maxX&&t.minY>=e.minY&&t.minY<=e.maxY||t.maxX>=e.minX&&t.maxX<=e.maxX&&t.maxY>=e.minY&&t.maxY<=e.maxY||t.minX>=e.minX&&t.minX<=e.maxX&&t.maxY>=e.minY&&t.maxY<=e.maxY||t.maxX>=e.minX&&t.maxX<=e.maxX&&t.minY>=e.minY&&t.minY<=e.maxY}function F$2(e){return e.coord.x}function q$2(e){return e.coord.y}function A$4(e){return{x:e.anno.collisionBox.x,y:e.anno.collisionBox.y,width:e.anno.collisionBox.width,height:e.anno.collisionBox.height}}function V$2(e,t,i,n,r,o,a,s){a.anno;var l=s,u={x:i,y:n,width:r-i,height:o-n},c=l.x,h=l.y,d=u.x,f=u.y;return!(c>d+u.width||c+l.width<d||h+l.height<f||h>f+u.height)}f$7.ByteBuffer=u$4,f$7.Long=u$4.Long||null,f$7.VERSION="5.0.3",f$7.WIRE_TYPES={},f$7.WIRE_TYPES.VARINT=0,f$7.WIRE_TYPES.BITS64=1,f$7.WIRE_TYPES.LDELIM=2,f$7.WIRE_TYPES.STARTGROUP=3,f$7.WIRE_TYPES.ENDGROUP=4,f$7.WIRE_TYPES.BITS32=5,f$7.PACKABLE_WIRE_TYPES=[f$7.WIRE_TYPES.VARINT,f$7.WIRE_TYPES.BITS64,f$7.WIRE_TYPES.BITS32],f$7.TYPES={int32:{name:"int32",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},uint32:{name:"uint32",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},sint32:{name:"sint32",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},int64:{name:"int64",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:f$7.Long?f$7.Long.ZERO:void 0},uint64:{name:"uint64",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:f$7.Long?f$7.Long.UZERO:void 0},sint64:{name:"sint64",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:f$7.Long?f$7.Long.ZERO:void 0},bool:{name:"bool",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:!1},double:{name:"double",wireType:f$7.WIRE_TYPES.BITS64,defaultValue:0},string:{name:"string",wireType:f$7.WIRE_TYPES.LDELIM,defaultValue:""},bytes:{name:"bytes",wireType:f$7.WIRE_TYPES.LDELIM,defaultValue:null},fixed32:{name:"fixed32",wireType:f$7.WIRE_TYPES.BITS32,defaultValue:0},sfixed32:{name:"sfixed32",wireType:f$7.WIRE_TYPES.BITS32,defaultValue:0},fixed64:{name:"fixed64",wireType:f$7.WIRE_TYPES.BITS64,defaultValue:f$7.Long?f$7.Long.UZERO:void 0},sfixed64:{name:"sfixed64",wireType:f$7.WIRE_TYPES.BITS64,defaultValue:f$7.Long?f$7.Long.ZERO:void 0},float:{name:"float",wireType:f$7.WIRE_TYPES.BITS32,defaultValue:0},enum:{name:"enum",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},message:{name:"message",wireType:f$7.WIRE_TYPES.LDELIM,defaultValue:null},group:{name:"group",wireType:f$7.WIRE_TYPES.STARTGROUP,defaultValue:null}},f$7.MAP_KEY_TYPES=[f$7.TYPES.int32,f$7.TYPES.sint32,f$7.TYPES.sfixed32,f$7.TYPES.uint32,f$7.TYPES.fixed32,f$7.TYPES.int64,f$7.TYPES.sint64,f$7.TYPES.sfixed64,f$7.TYPES.uint64,f$7.TYPES.fixed64,f$7.TYPES.bool,f$7.TYPES.string,f$7.TYPES.bytes],f$7.ID_MIN=1,f$7.ID_MAX=536870911,f$7.convertFieldsToCamelCase=!1,f$7.populateAccessors=!0,f$7.populateDefaults=!0,f$7.Util=function(){var e={};return e.IS_NODE="object"==typeof process&&process+""=="[object process]"&&!process.browser,e.XHR=function(){for(var e=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],t=null,i=0;i<e.length;i++){try{t=e[i]()}catch{continue}break}if(!t)throw Error("XMLHttpRequest is not supported");return t},e.fetch=function(t,i){if(i&&"function"!=typeof i&&(i=null),e.IS_NODE){var n=require("fs");if(i)n.readFile(t,(function(e,t){i(e?null:""+t)}));else try{return n.readFileSync(t)}catch{return null}}else{var r=e.XHR();if(r.open("GET",t,!!i),r.setRequestHeader("Accept","text/plain"),"function"==typeof r.overrideMimeType&&r.overrideMimeType("text/plain"),!i)return r.send(null),200==r.status||0==r.status&&"string"==typeof r.responseText?r.responseText:null;if(r.onreadystatechange=function(){4==r.readyState&&(200==r.status||0==r.status&&"string"==typeof r.responseText?i(r.responseText):i(null))},4==r.readyState)return;r.send(null)}},e.toCamelCase=function(e){return e.replace(/_([a-zA-Z])/g,(function(e,t){return t.toUpperCase()}))},e}(),f$7.Lang={DELIM:/[\s\{\}=;:\[\],'"\(\)<>]/g,RULE:/^(?:required|optional|repeated|map)$/,TYPE:/^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,NAME:/^[a-zA-Z_][a-zA-Z_0-9]*$/,TYPEDEF:/^[a-zA-Z][a-zA-Z_0-9]*$/,TYPEREF:/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,FQTYPEREF:/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/,NUMBER:/^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,NUMBER_DEC:/^(?:[1-9][0-9]*|0)$/,NUMBER_HEX:/^0[xX][0-9a-fA-F]+$/,NUMBER_OCT:/^0[0-7]+$/,NUMBER_FLT:/^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,BOOL:/^(?:true|false)$/i,ID:/^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,NEGID:/^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,WHITESPACE:/\s/,STRING:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,STRING_DQ:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,STRING_SQ:/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},f$7.DotProto=function(e,t){var i={},n=function(e){this.source=e+"",this.index=0,this.line=1,this.stack=[],this._stringOpen=null},r=n.prototype;r._readString=function(){var e='"'===this._stringOpen?t.STRING_DQ:t.STRING_SQ;e.lastIndex=this.index-1;var i=e.exec(this.source);if(!i)throw Error("unterminated string");return this.index=e.lastIndex,this.stack.push(this._stringOpen),this._stringOpen=null,i[1]},r.next=function(){if(this.stack.length>0)return this.stack.shift();if(this.index>=this.source.length)return null;if(null!==this._stringOpen)return this._readString();var e,i,n;do{for(e=!1;t.WHITESPACE.test(n=this.source.charAt(this.index));)if("\n"===n&&++this.line,++this.index===this.source.length)return null;if("/"===this.source.charAt(this.index))if(++this.index,"/"===this.source.charAt(this.index)){for(;"\n"!==this.source.charAt(++this.index);)if(this.index==this.source.length)return null;++this.index,++this.line,e=!0}else{if("*"!==(n=this.source.charAt(this.index)))return"/";do{if("\n"===n&&++this.line,++this.index===this.source.length)return null;i=n,n=this.source.charAt(this.index)}while("*"!==i||"/"!==n);++this.index,e=!0}}while(e);if(this.index===this.source.length)return null;var r=this.index;if(t.DELIM.lastIndex=0,!t.DELIM.test(this.source.charAt(r++)))for(;r<this.source.length&&!t.DELIM.test(this.source.charAt(r));)++r;var o=this.source.substring(this.index,this.index=r);return('"'===o||"'"===o)&&(this._stringOpen=o),o},r.peek=function(){if(0===this.stack.length){var e=this.next();if(null===e)return null;this.stack.push(e)}return this.stack[0]},r.skip=function(e){var t=this.next();if(t!==e)throw Error("illegal '"+t+"', '"+e+"' expected")},r.omit=function(e){return this.peek()===e&&(this.next(),!0)},r.toString=function(){return"Tokenizer ("+this.index+"/"+this.source.length+" at line "+this.line+")"},i.Tokenizer=n;var o=function(e){this.tn=new n(e),this.proto3=!1},a=o.prototype;function s(e,i){var n=-1,r=1;if("-"==e.charAt(0)&&(r=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))n=parseInt(e);else if(t.NUMBER_HEX.test(e))n=parseInt(e.substring(2),16);else{if(!t.NUMBER_OCT.test(e))throw Error("illegal id value: "+(r<0?"-":"")+e);n=parseInt(e.substring(1),8)}if(n=r*n|0,!i&&n<0)throw Error("illegal id value: "+(r<0?"-":"")+e);return n}function l(e){var i=1;if("-"==e.charAt(0)&&(i=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))return i*parseInt(e,10);if(t.NUMBER_HEX.test(e))return i*parseInt(e.substring(2),16);if(t.NUMBER_OCT.test(e))return i*parseInt(e.substring(1),8);if("inf"===e)return i*(1/0);if("nan"===e)return NaN;if(t.NUMBER_FLT.test(e))return i*parseFloat(e);throw Error("illegal number value: "+(i<0?"-":"")+e)}function u(e,t,i){typeof e[t]>"u"?e[t]=i:(Array.isArray(e[t])||(e[t]=[e[t]]),e[t].push(i))}return a.parse=function(){var e,i,n={name:"[ROOT]",package:null,messages:[],enums:[],imports:[],options:{},services:[]},r=!0;try{for(;e=this.tn.next();)switch(e){case"package":if(!r||null!==n.package)throw Error("unexpected 'package'");if(e=this.tn.next(),!t.TYPEREF.test(e))throw Error("illegal package name: "+e);this.tn.skip(";"),n.package=e;break;case"import":if(!r)throw Error("unexpected 'import'");("public"===(e=this.tn.peek())||(i="weak"===e))&&this.tn.next(),e=this._readString(),this.tn.skip(";"),i||n.imports.push(e);break;case"syntax":if(!r)throw Error("unexpected 'syntax'");this.tn.skip("="),"proto3"===(n.syntax=this._readString())&&(this.proto3=!0),this.tn.skip(";");break;case"message":this._parseMessage(n,null),r=!1;break;case"enum":this._parseEnum(n),r=!1;break;case"option":this._parseOption(n);break;case"service":this._parseService(n);break;case"extend":this._parseExtend(n);break;default:throw Error("unexpected '"+e+"'")}}catch(e){throw e.message="Parse error at line "+this.tn.line+": "+e.message,e}return delete n.name,n},o.parse=function(e){return new o(e).parse()},a._readString=function(){var e,t,i="";do{if("'"!==(t=this.tn.next())&&'"'!==t)throw Error("illegal string delimiter: "+t);i+=this.tn.next(),this.tn.skip(t),e=this.tn.peek()}while('"'===e||'"'===e);return i},a._readValue=function(e){var i=this.tn.peek();if('"'===i||"'"===i)return this._readString();if(this.tn.next(),t.NUMBER.test(i))return l(i);if(t.BOOL.test(i))return"true"===i.toLowerCase();if(e&&t.TYPEREF.test(i))return i;throw Error("illegal value: "+i)},a._parseOption=function(e,i){var n=this.tn.next(),r=!1;if("("===n&&(r=!0,n=this.tn.next()),!t.TYPEREF.test(n))throw Error("illegal option name: "+n);var o=n;r&&(this.tn.skip(")"),o="("+o+")",n=this.tn.peek(),t.FQTYPEREF.test(n)&&(o+=n,this.tn.next())),this.tn.skip("="),this._parseOptionValue(e,o),i||this.tn.skip(";")},a._parseOptionValue=function(e,i){var n=this.tn.peek();if("{"!==n)u(e.options,i,this._readValue(!0));else for(this.tn.skip("{");"}"!==(n=this.tn.next());){if(!t.NAME.test(n))throw Error("illegal option name: "+i+"."+n);this.tn.omit(":")?u(e.options,i+"."+n,this._readValue(!0)):this._parseOptionValue(e,i+"."+n)}},a._parseService=function(e){var i=this.tn.next();if(!t.NAME.test(i))throw Error("illegal service name at line "+this.tn.line+": "+i);var n={name:i,rpc:{},options:{}};for(this.tn.skip("{");"}"!==(i=this.tn.next());)if("option"===i)this._parseOption(n);else{if("rpc"!==i)throw Error("illegal service token: "+i);this._parseServiceRPC(n)}this.tn.omit(";"),e.services.push(n)},a._parseServiceRPC=function(e){var i="rpc",n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal rpc service method name: "+n);var r=n,o={request:null,response:null,request_stream:!1,response_stream:!1,options:{}};if(this.tn.skip("("),"stream"===(n=this.tn.next()).toLowerCase()&&(o.request_stream=!0,n=this.tn.next()),!t.TYPEREF.test(n))throw Error("illegal rpc service request type: "+n);if(o.request=n,this.tn.skip(")"),"returns"!==(n=this.tn.next()).toLowerCase())throw Error("illegal rpc service request type delimiter: "+n);if(this.tn.skip("("),"stream"===(n=this.tn.next()).toLowerCase()&&(o.response_stream=!0,n=this.tn.next()),o.response=n,this.tn.skip(")"),"{"===(n=this.tn.peek())){for(this.tn.next();"}"!==(n=this.tn.next());){if("option"!==n)throw Error("illegal rpc service token: "+n);this._parseOption(o)}this.tn.omit(";")}else this.tn.skip(";");typeof e[i]>"u"&&(e[i]={}),e[i][r]=o},a._parseMessage=function(e,i){var n=!!i,r=this.tn.next(),o={name:"",fields:[],enums:[],messages:[],options:{},services:[],oneofs:{}};if(!t.NAME.test(r))throw Error("illegal "+(n?"group":"message")+" name: "+r);for(o.name=r,n&&(this.tn.skip("="),i.id=s(this.tn.next()),o.isGroup=!0),"["===(r=this.tn.peek())&&i&&this._parseFieldOptions(i),this.tn.skip("{");"}"!==(r=this.tn.next());)if(t.RULE.test(r))this._parseMessageField(o,r);else if("oneof"===r)this._parseMessageOneOf(o);else if("enum"===r)this._parseEnum(o);else if("message"===r)this._parseMessage(o);else if("option"===r)this._parseOption(o);else if("service"===r)this._parseService(o);else if("extensions"===r)o.hasOwnProperty("extensions")?o.extensions=o.extensions.concat(this._parseExtensionRanges()):o.extensions=this._parseExtensionRanges();else if("reserved"===r)this._parseIgnored();else if("extend"===r)this._parseExtend(o);else{if(!t.TYPEREF.test(r))throw Error("illegal message token: "+r);if(!this.proto3)throw Error("illegal field rule: "+r);this._parseMessageField(o,"optional",r)}return this.tn.omit(";"),e.messages.push(o),o},a._parseIgnored=function(){for(;";"!==this.tn.peek();)this.tn.next();this.tn.skip(";")},a._parseMessageField=function(e,i,n){if(!t.RULE.test(i))throw Error("illegal message field rule: "+i);var r,o={rule:i,type:"",name:"",options:{},id:0};if("map"===i){if(n)throw Error("illegal type: "+n);if(this.tn.skip("<"),r=this.tn.next(),!t.TYPE.test(r)&&!t.TYPEREF.test(r))throw Error("illegal message field type: "+r);if(o.keytype=r,this.tn.skip(","),r=this.tn.next(),!t.TYPE.test(r)&&!t.TYPEREF.test(r))throw Error("illegal message field: "+r);if(o.type=r,this.tn.skip(">"),r=this.tn.next(),!t.NAME.test(r))throw Error("illegal message field name: "+r);o.name=r,this.tn.skip("="),o.id=s(this.tn.next()),"["===(r=this.tn.peek())&&this._parseFieldOptions(o),this.tn.skip(";")}else if("group"===(n=typeof n<"u"?n:this.tn.next())){var a=this._parseMessage(e,o);if(!/^[A-Z]/.test(a.name))throw Error("illegal group name: "+a.name);o.type=a.name,o.name=a.name.toLowerCase(),this.tn.omit(";")}else{if(!t.TYPE.test(n)&&!t.TYPEREF.test(n))throw Error("illegal message field type: "+n);if(o.type=n,r=this.tn.next(),!t.NAME.test(r))throw Error("illegal message field name: "+r);o.name=r,this.tn.skip("="),o.id=s(this.tn.next()),"["===(r=this.tn.peek())&&this._parseFieldOptions(o),this.tn.skip(";")}return e.fields.push(o),o},a._parseMessageOneOf=function(e){var i=this.tn.next();if(!t.NAME.test(i))throw Error("illegal oneof name: "+i);var n,r=i,o=[];for(this.tn.skip("{");"}"!==(i=this.tn.next());)(n=this._parseMessageField(e,"optional",i)).oneof=r,o.push(n.id);this.tn.omit(";"),e.oneofs[r]=o},a._parseFieldOptions=function(e){this.tn.skip("[");for(var t=!0;"]"!==this.tn.peek();)t||this.tn.skip(","),this._parseOption(e,!0),t=!1;this.tn.next()},a._parseEnum=function(e){var i={name:"",values:[],options:{}},n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal name: "+n);for(i.name=n,this.tn.skip("{");"}"!==(n=this.tn.next());)if("option"===n)this._parseOption(i);else{if(!t.NAME.test(n))throw Error("illegal name: "+n);this.tn.skip("=");var r={name:n,id:s(this.tn.next(),!0)};"["===(n=this.tn.peek())&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),i.values.push(r)}this.tn.omit(";"),e.enums.push(i)},a._parseExtensionRanges=function(){var t,i,n,r=[];do{for(i=[];;){switch(t=this.tn.next()){case"min":n=e.ID_MIN;break;case"max":n=e.ID_MAX;break;default:n=l(t)}if(i.push(n),2===i.length)break;if("to"!==this.tn.peek()){i.push(n);break}this.tn.next()}r.push(i)}while(this.tn.omit(","));return this.tn.skip(";"),r},a._parseExtend=function(e){var i=this.tn.next();if(!t.TYPEREF.test(i))throw Error("illegal extend reference: "+i);var n={ref:i,fields:[]};for(this.tn.skip("{");"}"!==(i=this.tn.next());)if(t.RULE.test(i))this._parseMessageField(n,i);else{if(!t.TYPEREF.test(i))throw Error("illegal extend token: "+i);if(!this.proto3)throw Error("illegal field rule: "+i);this._parseMessageField(n,"optional",i)}return this.tn.omit(";"),e.messages.push(n),n},a.toString=function(){return"Parser at line "+this.tn.line},i.Parser=o,i}(f$7,f$7.Lang),f$7.Reflect=function(e){var t={},i=function(e,t,i){this.builder=e,this.parent=t,this.name=i,this.className},n=i.prototype;n.fqn=function(){for(var e=this.name,t=this;;){if(null==(t=t.parent))break;e=t.name+"."+e}return e},n.toString=function(e){return(e?this.className+" ":"")+this.fqn()},n.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},t.T=i;var r=function(e,t,n,r,o){i.call(this,e,t,n),this.className="Namespace",this.children=[],this.options=r||{},this.syntax=o||"proto2"},o=r.prototype=Object.create(i.prototype);o.getChildren=function(e){if(null==(e=e||null))return this.children.slice();for(var t=[],i=0,n=this.children.length;i<n;++i)this.children[i]instanceof e&&t.push(this.children[i]);return t},o.addChild=function(e){var t;if(t=this.getChild(e.name))if(t instanceof u.Field&&t.name!==t.originalName&&null===this.getChild(t.originalName))t.name=t.originalName;else{if(!(e instanceof u.Field&&e.name!==e.originalName&&null===this.getChild(e.originalName)))throw Error("Duplicate name in namespace "+this.toString(!0)+": "+e.name);e.name=e.originalName}this.children.push(e)},o.getChild=function(e){for(var t="number"==typeof e?"id":"name",i=0,n=this.children.length;i<n;++i)if(this.children[i][t]===e)return this.children[i];return null},o.resolve=function(e,i){var n,r="string"==typeof e?e.split("."):e,o=this,a=0;if(""===r[a]){for(;null!==o.parent;)o=o.parent;a++}do{do{if(!(o instanceof t.Namespace)){o=null;break}if(!(n=o.getChild(r[a]))||!(n instanceof t.T)||i&&!(n instanceof t.Namespace)){o=null;break}o=n,a++}while(a<r.length);if(null!=o)break;if(null!==this.parent)return this.parent.resolve(e,i)}while(null!=o);return o},o.qn=function(e){var i=[],n=e;do{i.unshift(n.name),n=n.parent}while(null!==n);for(var r=1;r<=i.length;r++){var o=i.slice(i.length-r);if(e===this.resolve(o,e instanceof t.Namespace))return o.join(".")}return e.fqn()},o.build=function(){for(var e,t={},i=this.children,n=0,o=i.length;n<o;++n)(e=i[n])instanceof r&&(t[e.name]=e.build());return Object.defineProperty&&Object.defineProperty(t,"$options",{value:this.buildOpt()}),t},o.buildOpt=function(){for(var e={},t=Object.keys(this.options),i=0,n=t.length;i<n;++i){var r=t[i],o=this.options[t[i]];e[r]=o}return e},o.getOption=function(e){return typeof e>"u"?this.options:typeof this.options[e]<"u"?this.options[e]:null},t.Namespace=r;var a=function(t,i,n,r,o){if(this.type=t,this.resolvedType=i,this.isMapKey=n,this.syntax=r,this.name=o,n&&e.MAP_KEY_TYPES.indexOf(t)<0)throw Error("Invalid map key type: "+t.name)},s=a.prototype;function l(t,i){if(t&&"number"==typeof t.low&&"number"==typeof t.high&&"boolean"==typeof t.unsigned&&t.low==t.low&&t.high==t.high)return new e.Long(t.low,t.high,typeof i>"u"?t.unsigned:i);if("string"==typeof t)return e.Long.fromString(t,i||!1,10);if("number"==typeof t)return e.Long.fromNumber(t,i||!1);throw Error("not convertible to Long")}a.defaultFieldValue=function(t){if("string"==typeof t&&(t=e.TYPES[t]),typeof t.defaultValue>"u")throw Error("default value for type "+t.name+" is not supported");return t==e.TYPES.bytes?new u$4(0):t.defaultValue},s.toString=function(){return(this.name||"")+(this.isMapKey?"map":"value")+" element"},s.verifyValue=function(t){var i=this;function n(e,t){throw Error("Illegal value for "+i.toString(!0)+" of type "+i.type.name+": "+e+" ("+t+")")}switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),t>4294967295?0|t:t;case e.TYPES.uint32:case e.TYPES.fixed32:return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),t<0?t>>>0:t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:if(e.Long)try{return l(t,!1)}catch(e){n(typeof t,e.message)}else n(typeof t,"requires Long.js");case e.TYPES.uint64:case e.TYPES.fixed64:if(e.Long)try{return l(t,!0)}catch(e){n(typeof t,e.message)}else n(typeof t,"requires Long.js");case e.TYPES.bool:return"boolean"!=typeof t&&n(typeof t,"not a boolean"),t;case e.TYPES.float:case e.TYPES.double:return"number"!=typeof t&&n(typeof t,"not a number"),t;case e.TYPES.string:return"string"!=typeof t&&!(t&&t instanceof String)&&n(typeof t,"not a string"),""+t;case e.TYPES.bytes:return u$4.isByteBuffer(t)?t:u$4.wrap(t,"base64");case e.TYPES.enum:var r=this.resolvedType.getChildren(e.Reflect.Enum.Value);for(a=0;a<r.length;a++){if(r[a].name==t)return r[a].id;if(r[a].id==t)return r[a].id}if("proto3"===this.syntax)return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),(t>4294967295||t<0)&&n(typeof t,"not in range for uint32"),t;n(t,"not a valid enum value");case e.TYPES.group:case e.TYPES.message:if((!t||"object"!=typeof t)&&n(typeof t,"object expected"),t instanceof this.resolvedType.clazz)return t;if(t instanceof e.Builder.Message){var o={};for(var a in t)t.hasOwnProperty(a)&&(o[a]=t[a]);t=o}return new this.resolvedType.clazz(t)}throw Error("[INTERNAL] Illegal value for "+this.toString(!0)+": "+t+" (undefined type "+this.type+")")},s.calculateLength=function(t,i){if(null===i)return 0;var n;switch(this.type){case e.TYPES.int32:return i<0?u$4.calculateVarint64(i):u$4.calculateVarint32(i);case e.TYPES.uint32:return u$4.calculateVarint32(i);case e.TYPES.sint32:return u$4.calculateVarint32(u$4.zigZagEncode32(i));case e.TYPES.fixed32:case e.TYPES.sfixed32:case e.TYPES.float:return 4;case e.TYPES.int64:case e.TYPES.uint64:return u$4.calculateVarint64(i);case e.TYPES.sint64:return u$4.calculateVarint64(u$4.zigZagEncode64(i));case e.TYPES.fixed64:case e.TYPES.sfixed64:return 8;case e.TYPES.bool:return 1;case e.TYPES.enum:return u$4.calculateVarint32(i);case e.TYPES.double:return 8;case e.TYPES.string:return n=u$4.calculateUTF8Bytes(i),u$4.calculateVarint32(n)+n;case e.TYPES.bytes:if(i.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+i.remaining()+" bytes remaining");return u$4.calculateVarint32(i.remaining())+i.remaining();case e.TYPES.message:return n=this.resolvedType.calculate(i),u$4.calculateVarint32(n)+n;case e.TYPES.group:return(n=this.resolvedType.calculate(i))+u$4.calculateVarint32(t<<3|e.WIRE_TYPES.ENDGROUP)}throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+i+" (unknown type)")},s.encodeValue=function(t,i,n){if(null===i)return n;switch(this.type){case e.TYPES.int32:i<0?n.writeVarint64(i):n.writeVarint32(i);break;case e.TYPES.uint32:n.writeVarint32(i);break;case e.TYPES.sint32:n.writeVarint32ZigZag(i);break;case e.TYPES.fixed32:n.writeUint32(i);break;case e.TYPES.sfixed32:n.writeInt32(i);break;case e.TYPES.int64:case e.TYPES.uint64:n.writeVarint64(i);break;case e.TYPES.sint64:n.writeVarint64ZigZag(i);break;case e.TYPES.fixed64:n.writeUint64(i);break;case e.TYPES.sfixed64:n.writeInt64(i);break;case e.TYPES.bool:"string"==typeof i?n.writeVarint32("false"===i.toLowerCase()?0:!!i):n.writeVarint32(i?1:0);break;case e.TYPES.enum:n.writeVarint32(i);break;case e.TYPES.float:n.writeFloat32(i);break;case e.TYPES.double:n.writeFloat64(i);break;case e.TYPES.string:n.writeVString(i);break;case e.TYPES.bytes:if(i.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+i.remaining()+" bytes remaining");var r=i.offset;n.writeVarint32(i.remaining()),n.append(i),i.offset=r;break;case e.TYPES.message:var o=(new u$4).LE();this.resolvedType.encode(i,o),n.writeVarint32(o.offset),n.append(o.flip());break;case e.TYPES.group:this.resolvedType.encode(i,n),n.writeVarint32(t<<3|e.WIRE_TYPES.ENDGROUP);break;default:throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+i+" (unknown type)")}return n},s.decode=function(t,i,n){if(i!=this.type.wireType)throw Error("Unexpected wire type for element");var r,o;switch(this.type){case e.TYPES.int32:return 0|t.readVarint32();case e.TYPES.uint32:return t.readVarint32()>>>0;case e.TYPES.sint32:return 0|t.readVarint32ZigZag();case e.TYPES.fixed32:return t.readUint32()>>>0;case e.TYPES.sfixed32:return 0|t.readInt32();case e.TYPES.int64:return t.readVarint64();case e.TYPES.uint64:return t.readVarint64().toUnsigned();case e.TYPES.sint64:return t.readVarint64ZigZag();case e.TYPES.fixed64:return t.readUint64();case e.TYPES.sfixed64:return t.readInt64();case e.TYPES.bool:return!!t.readVarint32();case e.TYPES.enum:return t.readVarint32();case e.TYPES.float:return t.readFloat();case e.TYPES.double:return t.readDouble();case e.TYPES.string:return t.readVString();case e.TYPES.bytes:if(o=t.readVarint32(),t.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+t.remaining());return(r=t.clone()).limit=r.offset+o,t.offset+=o,r;case e.TYPES.message:return o=t.readVarint32(),this.resolvedType.decode(t,o);case e.TYPES.group:return this.resolvedType.decode(t,-1,n)}throw Error("[INTERNAL] Illegal decode type")},s.valueFromString=function(t){if(!this.isMapKey)throw Error("valueFromString() called on non-map-key element");switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return this.verifyValue(parseInt(t));case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return this.verifyValue(t);case e.TYPES.bool:return"true"===t;case e.TYPES.string:return this.verifyValue(t);case e.TYPES.bytes:return u$4.fromBinary(t)}},s.valueToString=function(t){if(!this.isMapKey)throw Error("valueToString() called on non-map-key element");return this.type===e.TYPES.bytes?t.toString("binary"):t.toString()},t.Element=a;var u=function(e,t,i,n,o,a){r.call(this,e,t,i,n,a),this.className="Message",this.extensions=void 0,this.clazz=null,this.isGroup=!!o,this._fields=null,this._fieldsById=null,this._fieldsByName=null},c=u.prototype=Object.create(r.prototype);function h(t,i){var n=i.readVarint32(),r=7&n,o=n>>>3;switch(r){case e.WIRE_TYPES.VARINT:do{n=i.readUint8()}while(128==(128&n));break;case e.WIRE_TYPES.BITS64:i.offset+=8;break;case e.WIRE_TYPES.LDELIM:n=i.readVarint32(),i.offset+=n;break;case e.WIRE_TYPES.STARTGROUP:h(o,i);break;case e.WIRE_TYPES.ENDGROUP:if(o===t)return!1;throw Error("Illegal GROUPEND after unknown group: "+o+" ("+t+" expected)");case e.WIRE_TYPES.BITS32:i.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+t+": "+r)}return!0}c.build=function(t){if(this.clazz&&!t)return this.clazz;var i=function(e,t){var i=t.getChildren(e.Reflect.Message.Field),n=t.getChildren(e.Reflect.Message.OneOf),r=function(o,a){e.Builder.Message.call(this);for(var s=0,l=n.length;s<l;++s)this[n[s].name]=null;for(s=0,l=i.length;s<l;++s){var u=i[s];this[u.name]=u.repeated?[]:u.map?new e.Map(u):null,(u.required||"proto3"===t.syntax)&&null!==u.defaultValue&&(this[u.name]=u.defaultValue)}var c;if(arguments.length>0)if(1!==arguments.length||null===o||"object"!=typeof o||!("function"!=typeof o.encode||o instanceof r)||Array.isArray(o)||o instanceof e.Map||u$4.isByteBuffer(o)||o instanceof ArrayBuffer||e.Long&&o instanceof e.Long)for(s=0,l=arguments.length;s<l;++s)typeof(c=arguments[s])<"u"&&this.$set(i[s].name,c);else this.$set(o)},o=r.prototype=Object.create(e.Builder.Message.prototype);o.add=function(i,n,r){var o=t._fieldsByName[i];if(!r){if(!o)throw Error(this+"#"+i+" is undefined");if(!(o instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+o.toString(!0));if(!o.repeated)throw Error(this+"#"+i+" is not a repeated field");n=o.verifyValue(n,!0)}return null===this[i]&&(this[i]=[]),this[i].push(n),this},o.$add=o.add,o.set=function(i,n,r){if(i&&"object"==typeof i){for(var o in r=n,i)i.hasOwnProperty(o)&&typeof(n=i[o])<"u"&&void 0===t._oneofsByName[o]&&this.$set(o,n,r);return this}var a=t._fieldsByName[i];if(r)this[i]=n;else{if(!a)throw Error(this+"#"+i+" is not a field: undefined");if(!(a instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+a.toString(!0));this[a.name]=n=a.verifyValue(n)}if(a&&a.oneof){var s=this[a.oneof.name];null!==n?(null!==s&&s!==a.name&&(this[s]=null),this[a.oneof.name]=a.name):s===i&&(this[a.oneof.name]=null)}return this},o.$set=o.set,o.get=function(i,n){if(n)return this[i];var r=t._fieldsByName[i];if(!(r&&r instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: undefined");if(!(r instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+r.toString(!0));return this[r.name]},o.$get=o.get;for(var a=0;a<i.length;a++){var s=i[a];s instanceof e.Reflect.Message.ExtensionField||t.builder.options.populateAccessors&&function(e){var i=e.originalName.replace(/(_[a-zA-Z])/g,(function(e){return e.toUpperCase().replace("_","")}));i=i.substring(0,1).toUpperCase()+i.substring(1);var n=e.originalName.replace(/([A-Z])/g,(function(e){return"_"+e})),r=function(t,i){return this[e.name]=i?t:e.verifyValue(t),this},a=function(){return this[e.name]};null===t.getChild("set"+i)&&(o["set"+i]=r),null===t.getChild("set_"+n)&&(o["set_"+n]=r),null===t.getChild("get"+i)&&(o["get"+i]=a),null===t.getChild("get_"+n)&&(o["get_"+n]=a)}(s)}function l(t,i,n,r){if(null===t||"object"!=typeof t){if(r&&r instanceof e.Reflect.Enum){var o=e.Reflect.Enum.getName(r.object,t);if(null!==o)return o}return t}if(u$4.isByteBuffer(t))return i?t.toBase64():t.toBuffer();if(e.Long.isLong(t))return n?t.toString():e.Long.fromValue(t);var a;if(Array.isArray(t))return a=[],t.forEach((function(e,t){a[t]=l(e,i,n,r)})),a;if(a={},t instanceof e.Map){for(var s=t.entries(),u=s.next();!u.done;u=s.next())a[t.keyElem.valueToString(u.value[0])]=l(u.value[1],i,n,t.valueElem.resolvedType);return a}var c=t.$type,h=void 0;for(var d in t)t.hasOwnProperty(d)&&(c&&(h=c.getChild(d))?a[d]=l(t[d],i,n,h.resolvedType):a[d]=l(t[d],i,n));return a}return o.encode=function(e,i){"boolean"==typeof e&&(i=e,e=void 0);var n=!1;e||(e=new u$4,n=!0);var r=e.littleEndian;try{return t.encode(this,e.LE(),i),(n?e.flip():e).LE(r)}catch(t){throw e.LE(r),t}},r.encode=function(e,t,i){return new r(e).encode(t,i)},o.calculate=function(){return t.calculate(this)},o.encodeDelimited=function(e,i){var n=!1;e||(e=new u$4,n=!0);var r=(new u$4).LE();return t.encode(this,r,i).flip(),e.writeVarint32(r.remaining()),e.append(r),n?e.flip():e},o.encodeAB=function(){try{return this.encode().toArrayBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toArrayBuffer()),e}},o.toArrayBuffer=o.encodeAB,o.encodeNB=function(){try{return this.encode().toBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBuffer()),e}},o.toBuffer=o.encodeNB,o.encode64=function(){try{return this.encode().toBase64()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBase64()),e}},o.toBase64=o.encode64,o.encodeHex=function(){try{return this.encode().toHex()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toHex()),e}},o.toHex=o.encodeHex,o.toRaw=function(e,t){return l(this,!!e,!!t,this.$type)},o.encodeJSON=function(){return JSON.stringify(l(this,!0,!0,this.$type))},r.decode=function(e,i,n){"string"==typeof i&&(n=i,i=-1),"string"==typeof e?e=u$4.wrap(e,n||"base64"):u$4.isByteBuffer(e)||(e=u$4.wrap(e));var r=e.littleEndian;try{var o=t.decode(e.LE(),i);return e.LE(r),o}catch(t){throw e.LE(r),t}},r.decodeDelimited=function(e,i){if("string"==typeof e?e=u$4.wrap(e,i||"base64"):u$4.isByteBuffer(e)||(e=u$4.wrap(e)),e.remaining()<1)return null;var n=e.offset,r=e.readVarint32();if(e.remaining()<r)return e.offset=n,null;try{var o=t.decode(e.slice(e.offset,e.offset+r).LE());return e.offset+=r,o}catch(t){throw e.offset+=r,t}},r.decode64=function(e){return r.decode(e,"base64")},r.decodeHex=function(e){return r.decode(e,"hex")},r.decodeJSON=function(e){return new r(JSON.parse(e))},o.toString=function(){return t.toString()},Object.defineProperty&&(Object.defineProperty(r,"$options",{value:t.buildOpt()}),Object.defineProperty(o,"$options",{value:r.$options}),Object.defineProperty(r,"$type",{value:t}),Object.defineProperty(o,"$type",{value:t})),r}(e,this);this._fields=[],this._fieldsById={},this._fieldsByName={},this._oneofsByName={};for(var n,r=0,o=this.children.length;r<o;r++)if((n=this.children[r])instanceof _||n instanceof u||n instanceof x){if(i.hasOwnProperty(n.name))throw Error("Illegal reflect child of "+this.toString(!0)+": "+n.toString(!0)+" cannot override static property '"+n.name+"'");i[n.name]=n.build()}else if(n instanceof u.Field)n.build(),this._fields.push(n),this._fieldsById[n.id]=n,this._fieldsByName[n.name]=n;else if(n instanceof u.OneOf)this._oneofsByName[n.name]=n;else if(!(n instanceof u.OneOf||n instanceof g))throw Error("Illegal reflect child of "+this.toString(!0)+": "+this.children[r].toString(!0));return this.clazz=i},c.encode=function(e,t,i){for(var n,r,o=null,a=0,s=this._fields.length;a<s;++a)r=e[(n=this._fields[a]).name],n.required&&null===r?null===o&&(o=n):n.encode(i?r:n.verifyValue(r),t,e);if(null!==o){var l=Error("Missing at least one required field for "+this.toString(!0)+": "+o);throw l.encoded=t,l}return t},c.calculate=function(e){for(var t,i,n=0,r=0,o=this._fields.length;r<o;++r){if(i=e[(t=this._fields[r]).name],t.required&&null===i)throw Error("Missing at least one required field for "+this.toString(!0)+": "+t);n+=t.calculate(i,e)}return n},c.decode=function(t,i,n){"number"!=typeof i&&(i=-1);for(var r,o,a,s,l=t.offset,u=new this.clazz;t.offset<l+i||-1===i&&t.remaining()>0;){if(a=(r=t.readVarint32())>>>3,(o=7&r)===e.WIRE_TYPES.ENDGROUP){if(a!==n)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+a+" ("+(n?n+" expected":"not a group")+")");break}if(s=this._fieldsById[a]){if(s.repeated&&!s.options.packed)u[s.name].push(s.decode(o,t));else if(s.map){var c=s.decode(o,t);u[s.name].set(c[0],c[1])}else if(u[s.name]=s.decode(o,t),s.oneof){var d=u[s.oneof.name];null!==d&&d!==s.name&&(u[d]=null),u[s.oneof.name]=s.name}}else switch(o){case e.WIRE_TYPES.VARINT:t.readVarint32();break;case e.WIRE_TYPES.BITS32:t.offset+=4;break;case e.WIRE_TYPES.BITS64:t.offset+=8;break;case e.WIRE_TYPES.LDELIM:var f=t.readVarint32();t.offset+=f;break;case e.WIRE_TYPES.STARTGROUP:for(;h(a,t););break;default:throw Error("Illegal wire type for unknown field "+a+" in "+this.toString(!0)+"#decode: "+o)}}for(var p=0,_=this._fields.length;p<_;++p)if(null===u[(s=this._fields[p]).name])if("proto3"===this.syntax)u[s.name]=s.defaultValue;else{if(s.required){var m=Error("Missing at least one required field for "+this.toString(!0)+": "+s.name);throw m.decoded=u,m}e.populateDefaults&&null!==s.defaultValue&&(u[s.name]=s.defaultValue)}return u},t.Message=u;var d=function(t,n,r,o,a,s,l,c,h,d){i.call(this,t,n,s),this.className="Message.Field",this.required="required"===r,this.repeated="repeated"===r,this.map="map"===r,this.keyType=o||null,this.type=a,this.resolvedType=null,this.id=l,this.options=c||{},this.defaultValue=null,this.oneof=h||null,this.syntax=d||"proto2",this.originalName=this.name,this.element=null,this.keyElement=null,this.builder.options.convertFieldsToCamelCase&&!(this instanceof u.ExtensionField)&&(this.name=e.Util.toCamelCase(this.name))},f=d.prototype=Object.create(i.prototype);f.build=function(){this.element=new a(this.type,this.resolvedType,!1,this.syntax,this.name),this.map&&(this.keyElement=new a(this.keyType,void 0,!0,this.syntax,this.name)),"proto3"!==this.syntax||this.repeated||this.map?typeof this.options.default<"u"&&(this.defaultValue=this.verifyValue(this.options.default)):this.defaultValue=a.defaultFieldValue(this.type)},f.verifyValue=function(t,i){i=i||!1;var n,r=this;function o(e,t){throw Error("Illegal value for "+r.toString(!0)+" of type "+r.type.name+": "+e+" ("+t+")")}if(null===t)return this.required&&o(typeof t,"required"),"proto3"===this.syntax&&this.type!==e.TYPES.message&&o(typeof t,"proto3 field without field presence cannot be null"),null;if(this.repeated&&!i){Array.isArray(t)||(t=[t]);var a=[];for(n=0;n<t.length;n++)a.push(this.element.verifyValue(t[n]));return a}return this.map&&!i?t instanceof e.Map?t:(t instanceof Object||o(typeof t,"expected ProtoBuf.Map or raw object for map field"),new e.Map(this,t)):(!this.repeated&&Array.isArray(t)&&o(typeof t,"no array expected"),this.element.verifyValue(t))},f.hasWirePresence=function(t,i){if("proto3"!==this.syntax)return null!==t;if(this.oneof&&i[this.oneof.name]===this.name)return!0;switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return 0!==t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return 0!==t.low||0!==t.high;case e.TYPES.bool:return t;case e.TYPES.float:case e.TYPES.double:return 0!==t;case e.TYPES.string:return t.length>0;case e.TYPES.bytes:return t.remaining()>0;case e.TYPES.enum:return 0!==t;case e.TYPES.message:return null!==t;default:return!0}},f.encode=function(t,i,n){if(null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===t||this.repeated&&0==t.length)return i;try{var r;if(this.repeated)if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){i.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),i.ensureCapacity(i.offset+=1);var o=i.offset;for(r=0;r<t.length;r++)this.element.encodeValue(this.id,t[r],i);var a=i.offset-o,s=u$4.calculateVarint32(a);if(s>1){var l=i.slice(o,i.offset);o+=s-1,i.offset=o,i.append(l)}i.writeVarint32(a,o-s)}else for(r=0;r<t.length;r++)i.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,t[r],i);else this.map?t.forEach((function(t,n,r){var o=u$4.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,n)+u$4.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,t);i.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),i.writeVarint32(o),i.writeVarint32(8|this.keyType.wireType),this.keyElement.encodeValue(1,n,i),i.writeVarint32(16|this.type.wireType),this.element.encodeValue(2,t,i)}),this):this.hasWirePresence(t,n)&&(i.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,t,i))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+t+" ("+e+")")}return i},f.calculate=function(t,i){if(t=this.verifyValue(t),null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===t||this.repeated&&0==t.length)return 0;var n=0;try{var r,o;if(this.repeated)if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){for(n+=u$4.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),o=0,r=0;r<t.length;r++)o+=this.element.calculateLength(this.id,t[r]);n+=u$4.calculateVarint32(o),n+=o}else for(r=0;r<t.length;r++)n+=u$4.calculateVarint32(this.id<<3|this.type.wireType),n+=this.element.calculateLength(this.id,t[r]);else this.map?t.forEach((function(t,i,r){var o=u$4.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,i)+u$4.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,t);n+=u$4.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),n+=u$4.calculateVarint32(o),n+=o}),this):this.hasWirePresence(t,i)&&(n+=u$4.calculateVarint32(this.id<<3|this.type.wireType),n+=this.element.calculateLength(this.id,t))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+t+" ("+e+")")}return n},f.decode=function(t,i,n){var r,o;if(!(!this.map&&t==this.type.wireType||!n&&this.repeated&&this.options.packed&&t==e.WIRE_TYPES.LDELIM||this.map&&t==e.WIRE_TYPES.LDELIM))throw Error("Illegal wire type for field "+this.toString(!0)+": "+t+" ("+this.type.wireType+" expected)");if(t==e.WIRE_TYPES.LDELIM&&this.repeated&&this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0&&!n){o=i.readVarint32(),o=i.offset+o;for(var s=[];i.offset<o;)s.push(this.decode(this.type.wireType,i,!0));return s}if(this.map){var l=a.defaultFieldValue(this.keyType);if(r=a.defaultFieldValue(this.type),o=i.readVarint32(),i.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+i.remaining());var u=i.clone();for(u.limit=u.offset+o,i.offset+=o;u.remaining()>0;){var c=u.readVarint32();t=7&c;var h=c>>>3;if(1===h)l=this.keyElement.decode(u,t,h);else{if(2!==h)throw Error("Unexpected tag in map field key/value submessage");r=this.element.decode(u,t,h)}}return[l,r]}return this.element.decode(i,t,this.id)},t.Message.Field=d;var p=function(e,t,i,n,r,o,a){d.call(this,e,t,i,null,n,r,o,a),this.extension};p.prototype=Object.create(d.prototype),t.Message.ExtensionField=p;t.Message.OneOf=function(e,t,n){i.call(this,e,t,n),this.fields=[]};var _=function(e,t,i,n,o){r.call(this,e,t,i,n,o),this.className="Enum",this.object=null};_.getName=function(e,t){for(var i,n=Object.keys(e),r=0;r<n.length;++r)if(e[i=n[r]]===t)return i;return null},(_.prototype=Object.create(r.prototype)).build=function(t){if(this.object&&!t)return this.object;for(var i=new e.Builder.Enum,n=this.getChildren(_.Value),r=0,o=n.length;r<o;++r)i[n[r].name]=n[r].id;return Object.defineProperty&&Object.defineProperty(i,"$options",{value:this.buildOpt(),enumerable:!1}),this.object=i},t.Enum=_;var m=function(e,t,n,r){i.call(this,e,t,n),this.className="Enum.Value",this.id=r};m.prototype=Object.create(i.prototype),t.Enum.Value=m;var g=function(e,t,n,r){i.call(this,e,t,n),this.field=r};g.prototype=Object.create(i.prototype),t.Extension=g;var x=function(e,t,i,n){r.call(this,e,t,i,n),this.className="Service",this.clazz=null};(x.prototype=Object.create(r.prototype)).build=function(t){return this.clazz&&!t?this.clazz:this.clazz=function(e,t){for(var i=function(t){e.Builder.Service.call(this),this.rpcImpl=t||function(e,t,i){setTimeout(i.bind(this,Error("Not implemented")),0)}},n=i.prototype=Object.create(e.Builder.Service.prototype),r=t.getChildren(e.Reflect.Service.RPCMethod),o=0;o<r.length;o++)!function(e){n[e.name]=function(i,n){try{try{i=e.resolvedRequestType.clazz.decode(u$4.wrap(i))}catch(e){if(!(e instanceof TypeError))throw e}if(null===i||"object"!=typeof i)throw Error("Illegal arguments");i instanceof e.resolvedRequestType.clazz||(i=new e.resolvedRequestType.clazz(i)),this.rpcImpl(e.fqn(),i,(function(i,r){if(i)n(i);else{null===r&&(r="");try{r=e.resolvedResponseType.clazz.decode(r)}catch{}r&&r instanceof e.resolvedResponseType.clazz?n(null,r):n(Error("Illegal response type received in service method "+t.name+"#"+e.name))}}))}catch(e){setTimeout(n.bind(this,e),0)}},i[e.name]=function(t,n,r){new i(t)[e.name](n,r)},Object.defineProperty&&(Object.defineProperty(i[e.name],"$options",{value:e.buildOpt()}),Object.defineProperty(n[e.name],"$options",{value:i[e.name].$options}))}(r[o]);return Object.defineProperty&&(Object.defineProperty(i,"$options",{value:t.buildOpt()}),Object.defineProperty(n,"$options",{value:i.$options}),Object.defineProperty(i,"$type",{value:t}),Object.defineProperty(n,"$type",{value:t})),i}(e,this)},t.Service=x;var v=function(e,t,n,r){i.call(this,e,t,n),this.className="Service.Method",this.options=r||{}};(v.prototype=Object.create(i.prototype)).buildOpt=o.buildOpt,t.Service.Method=v;var y=function(e,t,i,n,r,o,a,s){v.call(this,e,t,i,s),this.className="Service.RPCMethod",this.requestName=n,this.responseName=r,this.requestStream=o,this.responseStream=a,this.resolvedRequestType=null,this.resolvedResponseType=null};return y.prototype=Object.create(v.prototype),t.Service.RPCMethod=y,t}(f$7),f$7.Builder=function(e,t,i){var n=function(e){this.ns=new i.Namespace(this,null,""),this.ptr=this.ns,this.resolved=!1,this.result=null,this.files={},this.importRoot=null,this.options=e||{}},r=n.prototype;function o(e){e.messages&&e.messages.forEach((function(t){t.syntax=e.syntax,o(t)})),e.enums&&e.enums.forEach((function(t){t.syntax=e.syntax}))}return n.isMessage=function(e){return!("string"!=typeof e.name||typeof e.values<"u"||typeof e.rpc<"u")},n.isMessageField=function(e){return!("string"!=typeof e.rule||"string"!=typeof e.name||"string"!=typeof e.type||typeof e.id>"u")},n.isEnum=function(e){return!("string"!=typeof e.name||typeof e.values>"u"||!Array.isArray(e.values)||0===e.values.length)},n.isService=function(e){return!("string"!=typeof e.name||"object"!=typeof e.rpc||!e.rpc)},n.isExtend=function(e){return"string"==typeof e.ref},r.reset=function(){return this.ptr=this.ns,this},r.define=function(e){if("string"!=typeof e||!t.TYPEREF.test(e))throw Error("illegal namespace: "+e);return e.split(".").forEach((function(e){var t=this.ptr.getChild(e);null===t&&this.ptr.addChild(t=new i.Namespace(this,this.ptr,e)),this.ptr=t}),this),this},r.create=function(t){if(!t)return this;if(Array.isArray(t)){if(0===t.length)return this;t=t.slice()}else t=[t];for(var r=[t];r.length>0;){if(t=r.pop(),!Array.isArray(t))throw Error("not a valid namespace: "+JSON.stringify(t));for(;t.length>0;){var o=t.shift();if(n.isMessage(o)){var a=new i.Message(this,this.ptr,o.name,o.options,o.isGroup,o.syntax),s={};o.oneofs&&Object.keys(o.oneofs).forEach((function(e){a.addChild(s[e]=new i.Message.OneOf(this,a,e))}),this),o.fields&&o.fields.forEach((function(e){if(null!==a.getChild(0|e.id))throw Error("duplicate or invalid field id in "+a.name+": "+e.id);if(e.options&&"object"!=typeof e.options)throw Error("illegal field options in "+a.name+"#"+e.name);var t=null;if("string"==typeof e.oneof&&!(t=s[e.oneof]))throw Error("illegal oneof in "+a.name+"#"+e.name+": "+e.oneof);e=new i.Message.Field(this,a,e.rule,e.keytype,e.type,e.name,e.id,e.options,t,o.syntax),t&&t.fields.push(e),a.addChild(e)}),this);var l=[];if(o.enums&&o.enums.forEach((function(e){l.push(e)})),o.messages&&o.messages.forEach((function(e){l.push(e)})),o.services&&o.services.forEach((function(e){l.push(e)})),o.extensions&&("number"==typeof o.extensions[0]?a.extensions=[o.extensions]:a.extensions=o.extensions),this.ptr.addChild(a),l.length>0){r.push(t),t=l,l=null,this.ptr=a,a=null;continue}l=null}else if(n.isEnum(o))a=new i.Enum(this,this.ptr,o.name,o.options,o.syntax),o.values.forEach((function(e){a.addChild(new i.Enum.Value(this,a,e.name,e.id))}),this),this.ptr.addChild(a);else if(n.isService(o))a=new i.Service(this,this.ptr,o.name,o.options),Object.keys(o.rpc).forEach((function(e){var t=o.rpc[e];a.addChild(new i.Service.RPCMethod(this,a,e,t.request,t.response,!!t.request_stream,!!t.response_stream,t.options))}),this),this.ptr.addChild(a);else{if(!n.isExtend(o))throw Error("not a valid definition: "+JSON.stringify(o));if(a=this.ptr.resolve(o.ref,!0))o.fields.forEach((function(t){if(null!==a.getChild(0|t.id))throw Error("duplicate extended field id in "+a.name+": "+t.id);if(a.extensions){var n=!1;if(a.extensions.forEach((function(e){t.id>=e[0]&&t.id<=e[1]&&(n=!0)})),!n)throw Error("illegal extended field id in "+a.name+": "+t.id+" (not within valid ranges)")}var r=t.name;this.options.convertFieldsToCamelCase&&(r=e.Util.toCamelCase(r));var o=new i.Message.ExtensionField(this,a,t.rule,t.type,this.ptr.fqn()+"."+r,t.id,t.options),s=new i.Extension(this,this.ptr,t.name,o);o.extension=s,this.ptr.addChild(s),a.addChild(o)}),this);else if(!/\.?google\.protobuf\./.test(o.ref))throw Error("extended message "+o.ref+" is not defined")}o=null,a=null}t=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},r.import=function(t,i){var n="/";if("string"==typeof i){if(e.Util.IS_NODE&&(i=require("path").resolve(i)),!0===this.files[i])return this.reset();this.files[i]=!0}else if("object"==typeof i){var r,a=i.root;if(e.Util.IS_NODE&&(a=require("path").resolve(a)),(a.indexOf("\\")>=0||i.file.indexOf("\\")>=0)&&(n="\\"),r=e.Util.IS_NODE?require("path").join(a,i.file):a+n+i.file,!0===this.files[r])return this.reset();this.files[r]=!0}if(t.imports&&t.imports.length>0){var s,l=!1;"object"==typeof i?(this.importRoot=i.root,l=!0,s=this.importRoot,i=i.file,(s.indexOf("\\")>=0||i.indexOf("\\")>=0)&&(n="\\")):"string"==typeof i?this.importRoot?s=this.importRoot:i.indexOf("/")>=0?""===(s=i.replace(/\/[^\/]*$/,""))&&(s="/"):i.indexOf("\\")>=0?(s=i.replace(/\\[^\\]*$/,""),n="\\"):s=".":s=null;for(var u=0;u<t.imports.length;u++)if("string"==typeof t.imports[u]){if(!s)throw Error("cannot determine import root");var c=t.imports[u];if("google/protobuf/descriptor.proto"===c||(c=e.Util.IS_NODE?require("path").join(s,c):s+n+c,!0===this.files[c]))continue;/\.proto$/i.test(c)&&!e.DotProto&&(c=c.replace(/\.proto$/,".json"));var h=e.Util.fetch(c);if(null===h)throw Error("failed to import '"+c+"' in '"+i+"': file not found");/\.json$/i.test(c)?this.import(JSON.parse(h+""),c):this.import(e.DotProto.Parser.parse(h),c)}else i?/\.(\w+)$/.test(i)?this.import(t.imports[u],i.replace(/^(.+)\.(\w+)$/,(function(e,t,i){return t+"_import"+u+"."+i}))):this.import(t.imports[u],i+"_import"+u):this.import(t.imports[u]);l&&(this.importRoot=null)}t.package&&this.define(t.package),t.syntax&&o(t);var d=this.ptr;return t.options&&Object.keys(t.options).forEach((function(e){d.options[e]=t.options[e]})),t.messages&&(this.create(t.messages),this.ptr=d),t.enums&&(this.create(t.enums),this.ptr=d),t.services&&(this.create(t.services),this.ptr=d),t.extends&&this.create(t.extends),this.reset()},r.resolveAll=function(){var n;if(null==this.ptr||"object"==typeof this.ptr.type)return this;if(this.ptr instanceof i.Namespace)this.ptr.children.forEach((function(e){this.ptr=e,this.resolveAll()}),this);else if(this.ptr instanceof i.Message.Field){if(t.TYPE.test(this.ptr.type))this.ptr.type=e.TYPES[this.ptr.type];else{if(!t.TYPEREF.test(this.ptr.type))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(!(n=(this.ptr instanceof i.Message.ExtensionField?this.ptr.extension.parent:this.ptr.parent).resolve(this.ptr.type,!0)))throw Error("unresolvable type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(this.ptr.resolvedType=n,n instanceof i.Enum){if(this.ptr.type=e.TYPES.enum,"proto3"===this.ptr.syntax&&"proto3"!==n.syntax)throw Error("proto3 message cannot reference proto2 enum")}else{if(!(n instanceof i.Message))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);this.ptr.type=n.isGroup?e.TYPES.group:e.TYPES.message}}if(this.ptr.map){if(!t.TYPE.test(this.ptr.keyType))throw Error("illegal key type for map field in "+this.ptr.toString(!0)+": "+this.ptr.keyType);this.ptr.keyType=e.TYPES[this.ptr.keyType]}"proto3"===this.ptr.syntax&&this.ptr.repeated&&void 0===this.ptr.options.packed&&-1!==e.PACKABLE_WIRE_TYPES.indexOf(this.ptr.type.wireType)&&(this.ptr.options.packed=!0)}else if(this.ptr instanceof e.Reflect.Service.Method){if(!(this.ptr instanceof e.Reflect.Service.RPCMethod))throw Error("illegal service type in "+this.ptr.toString(!0));if(!((n=this.ptr.parent.resolve(this.ptr.requestName,!0))&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.requestName);if(this.ptr.resolvedRequestType=n,!((n=this.ptr.parent.resolve(this.ptr.responseName,!0))&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.responseName);this.ptr.resolvedResponseType=n}else if(!(this.ptr instanceof e.Reflect.Message.OneOf||this.ptr instanceof e.Reflect.Extension||this.ptr instanceof e.Reflect.Enum.Value))throw Error("illegal object in namespace: "+typeof this.ptr+": "+this.ptr);return this.reset()},r.build=function(e){if(this.reset(),this.resolved||(this.resolveAll(),this.resolved=!0,this.result=null),null===this.result&&(this.result=this.ns.build()),!e)return this.result;for(var t="string"==typeof e?e.split("."):e,i=this.result,n=0;n<t.length;n++){if(!i[t[n]]){i=null;break}i=i[t[n]]}return i},r.lookup=function(e,t){return e?this.ns.resolve(e,t):this.ns},r.toString=function(){return"Builder"},n.Message=function(){},n.Enum=function(){},n.Service=function(){},n}(f$7,f$7.Lang,f$7.Reflect),f$7.Map=function(e,t){var i=function(e,i){if(!e.map)throw Error("field is not a map");if(this.field=e,this.keyElem=new t.Element(e.keyType,null,!0,e.syntax),this.valueElem=new t.Element(e.type,e.resolvedType,!1,e.syntax),this.map={},Object.defineProperty(this,"size",{get:function(){return Object.keys(this.map).length}}),i)for(var n=Object.keys(i),r=0;r<n.length;r++){var o=this.keyElem.valueFromString(n[r]),a=this.valueElem.verifyValue(i[n[r]]);this.map[this.keyElem.valueToString(o)]={key:o,value:a}}},n=i.prototype;function r(e){var t=0;return{next:function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}}return n.clear=function(){this.map={}},n.delete=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e)),i=t in this.map;return delete this.map[t],i},n.entries=function(){for(var e,t=[],i=Object.keys(this.map),n=0;n<i.length;n++)t.push([(e=this.map[i[n]]).key,e.value]);return r(t)},n.keys=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].key);return r(e)},n.values=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].value);return r(e)},n.forEach=function(e,t){for(var i,n=Object.keys(this.map),r=0;r<n.length;r++)e.call(t,(i=this.map[n[r]]).value,i.key,this)},n.set=function(e,t){var i=this.keyElem.verifyValue(e),n=this.valueElem.verifyValue(t);return this.map[this.keyElem.valueToString(i)]={key:i,value:n},this},n.get=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e));if(t in this.map)return this.map[t].value},n.has=function(e){return this.keyElem.valueToString(this.keyElem.verifyValue(e))in this.map},i}(0,f$7.Reflect),f$7.loadProto=function(e,t,i){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(i=t,t=void 0),f$7.loadJson(f$7.DotProto.Parser.parse(e),t,i)},f$7.protoFromString=f$7.loadProto,f$7.loadProtoFile=function(e,t,i){if(t&&"object"==typeof t?(i=t,t=null):(!t||"function"!=typeof t)&&(t=null),t)return f$7.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,(function(n){if(null!==n)try{t(null,f$7.loadProto(n,i,e))}catch(e){t(e)}else t(Error("Failed to fetch file"))}));var n=f$7.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===n?null:f$7.loadProto(n,i,e)},f$7.protoFromFile=f$7.loadProtoFile,f$7.newBuilder=function(e){return typeof(e=e||{}).convertFieldsToCamelCase>"u"&&(e.convertFieldsToCamelCase=f$7.convertFieldsToCamelCase),typeof e.populateAccessors>"u"&&(e.populateAccessors=f$7.populateAccessors),new f$7.Builder(e)},f$7.loadJson=function(e,t,i){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(i=t,t=null),(!t||"object"!=typeof t)&&(t=f$7.newBuilder()),"string"==typeof e&&(e=JSON.parse(e)),t.import(e,i),t.resolveAll(),t},f$7.loadJsonFile=function(e,t,i){if(t&&"object"==typeof t?(i=t,t=null):(!t||"function"!=typeof t)&&(t=null),t)return f$7.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,(function(n){if(null!==n)try{t(null,f$7.loadJson(JSON.parse(n),i,e))}catch(e){t(e)}else t(Error("Failed to fetch file"))}));var n=f$7.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===n?null:f$7.loadJson(JSON.parse(n),i,e)},h$3.prototype.getCacheTile=function(e,t,i,n){for(var r=0;r<this.tileCache.length;r++)if(this.tileCache[r].x===e&&this.tileCache[r].y===t&&this.tileCache[r].z===i&&this.tileCache[r].t===n)return this.tileCache[r];return null},h$3.prototype.addCacheTile=function(e){this.tileCache.length>999&&this.tileCache.splice(0,500),this.removeCacheTile(e.x,e.y,e.z,e.t),this.tileCache.push(e)},h$3.prototype.removeCacheTile=function(e,t,i,n){for(var r=0;r<this.tileCache.length;r++)if(this.tileCache[r].x===e&&this.tileCache[r].y===t&&this.tileCache[r].z===i&&this.tileCache[r].t===n){this.tileCache.splice(r,1);break}},h$3.prototype.getCacheLabel=function(e){for(var t=0;t<this.labelCache.length;t++)if(this.labelCache[t].name===this._UUID&&this.labelCache[t].oid===e)return this.labelCache[t];return null},h$3.prototype.addCacheLabel=function(e){this.labelCache.length>999&&this.labelCache.splice(0,250),this.removeCacheLabel(e.oid),e.timestamp=(new Date).getTime(),this.labelCache.push(e)},h$3.prototype.removeCacheLabel=function(e){for(var t=0;t<this.labelCache.length;t++)if(this.labelCache[t].name===this._UUID&&this.labelCache[t].oid===e){this.labelCache.splice(t,1);break}},h$3.prototype.getTileUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.url+"/GetTiles?lxys={z},{x},{y}"+(this.token?"&tk="+this.token:"")},h$3.prototype.getIcoUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.url+"/GetIcon?id={id}"+(this.token?"&tk="+this.token:"")},h$3.prototype.getRoadTileUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.roadUrl},h$3.prototype._cluster=function(e){if(!(e$2b(e)&&e<.05)){var t=this;clearTimeout(this._timer);var i=this.viewer.scene.globe._surface;if(i._tilesToRender.length<8||0<i._tileLoadQueueHigh.length)this._timer=setTimeout((function(){t._cluster()}),100);else{var n=this.getTilesToRender();if(this.compareArray(n,this._latelyGrid))return;this._queueCall(n),t.delaySynchronous()}}},h$3.prototype._changed=function(e){if(!(e$2b(e)&&e<.05)){var t=(new Date).getTime(),i=t-this._latelyRefreshStamp,n=t-this._latelyCollisionStamp;if(i>300&&this._cluster(),n>150&&this.aotuCollide&&this.collisionDetection(),this.depthTestOptimization){var r=this.viewer.scene,o=r.globe,a=r.camera,s=a.positionCartographic.height,l=a.pitch,u=this.dTOElevation,c=this.dTOPitch;this._isDTP=o.depthTestAgainstTerrain=s<u&&c<l}}},h$3.prototype._queueCall=function(e){var t=this;t._latelyGrid=e,t._latelyRefreshStamp=(new Date).getTime(),e.forEach((function(e,i,n){if(t.metadata&&G$2(t.metadata.boundBox,e.boundBox)){if(t.metadata.minLevel>e.level+1||t.metadata.maxLevel<e.level+1)return;var r=t.getCacheTile(e.x,e.y,e.level+1,0);if(r)t.addLabelAndIco(r);else{var o=t.getTileUrl().replace("{z}",e.level+1).replace("{y}",e.y).replace("{x}",e.x).replace("{s}",t.subdomains[(e.x+e.y+e.level)%t.subdomains.length]);(a=new XMLHttpRequest).open("GET",o,!0),a.responseType="arraybuffer",a.onload=function(){if(!(a.status<200||300<=a.status)){var e=t.CutString(a.response);if(e)(i=H$1(e)).x=this.tile.x,i.y=this.tile.y,i.z=this.tile.z,i.t=0,t.addCacheTile(i),t.addLabelAndIco(i);else{var i={x:this.tile.x,y:this.tile.y,z:this.tile.z,t:0};t.addCacheTile(i),t.delaySynchronous()}}},a.onerror=function(e){console.error(e)},a.send(),a.tile={x:e.x,y:e.y,z:e.level+1}}}if(t.roadMetadata&&G$2(t.roadMetadata.boundBox,e.boundBox)){if(t.roadMetadata.minLevel>e.level+1||t.roadMetadata.maxLevel<e.level+1)return;if(b=t.getCacheTile(e.x,e.y,e.level+1,1))t.addLabelAndIco(b);else{var a,s=t.getRoadTileUrl().replace("{z}",e.level+1).replace("{y}",e.y).replace("{x}",e.x);(a=new XMLHttpRequest).open("GET",s,!0),a.responseType="json",a.onload=function(){if(!(a.status<200||300<=a.status)){var e=a.response;if(e){var i={pois:e.map((function(e,t,i){return{oid:e.LabelPoint.X+"_"+e.LabelPoint.Y,name:e.Feature.properties.Name,coordinate:[e.LabelPoint.X,e.LabelPoint.Y,e.LabelPoint.Z?e.LabelPoint.Z:0]}})),x:this.tile.x,y:this.tile.y,z:this.tile.z,t:1};t.addCacheTile(i),t.addLabelAndIco(i)}else i={x:this.tile.x,y:this.tile.y,z:this.tile.z,t:1};t.addCacheTile(i),t.delaySynchronous()}},a.onerror=function(e){console.error(e)},a.send(),a.tile={x:e.x,y:e.y,z:e.level+1}}}}))},h$3.prototype.getTilesToRender=function(){var e=this.viewer.scene.globe._surface._tilesToRender.map((function(e){return{x:e.x,y:e.y,level:e.level,boundBox:{minX:e$2a.toDegrees(e.rectangle.west),minY:e$2a.toDegrees(e.rectangle.south),maxX:e$2a.toDegrees(e.rectangle.east),maxY:e$2a.toDegrees(e.rectangle.north)}}})).sort((function(e,t){return t.level-e.level}));return e},h$3.prototype.addLabelAndIco=function(e){if(e.pois)for(var t=0;t<e.pois.length;t++){var i=this.getCacheLabel(e.pois[t].oid);i=i||this.createLabel(e.pois[t],e),this.addCacheLabel(i)}this.delaySynchronous()},h$3.prototype.delaySynchronous=function(){var e=this;clearTimeout(this._timer2),e._timer2=setTimeout((function(){e.synchronousLabel()}),100)},h$3.prototype.synchronousLabel=function(){for(var e=0;e<this.labelCache.length;e++)this.labelCache[e].timestamp>=this._latelyRefreshStamp&&!this.viewer.entities.contains(this.labelCache[e])&&(this._isInitial&&this.aotuCollide&&(this.labelCache[e].show=!1),this.viewer.entities.add(this.labelCache[e]));if(!this._isInitial){for(e=0;e<this.viewer.entities.values.length;e++)!this.viewer.entities.values[e].name||this.viewer.entities.values[e].name!==this._UUID&&this.viewer.entities.values[e].name!==this._UUIDRoad||this.viewer.entities.values[e].timestamp<this._latelyRefreshStamp&&(this.viewer.entities.remove(this.viewer.entities.values[e]),e--);this.aotuCollide&&this.collisionDetection()}},h$3.prototype.createLabel=function(e,t){if(e$2b(e)){var i={show:!0,position:o$1p.fromDegrees(e.coordinate[0],e.coordinate[1],e.coordinate[2]),label:{text:e.name}};this.serverFirstStyle?(i.label.font=e.fontSize+"px "+t.stringTable[e.fontNameIndex],i.label.style=R$Q.FILL_AND_OUTLINE,i.label.scale=u$_(e.scale,1),i.label.showBackground=u$_(e.showBackground,!1),i.label.backgroundColor=e.backgroundColor,i.label.backgroundPadding=e.backgroundPadding,i.label.pixelOffset=u$_(e.pixelOffset,new o$1o(0,0)),i.label.eyeOffset=e.eyeOffset,i.label.horizontalOrigin=e.horizontalOrigin,i.label.verticalOrigin=e.verticalOrigin,i.label.heightReference=k$P.NONE,i.label.fillColor=e$1U.fromCssColorString(this.HexadecimalConversion(e.fontColor)),i.label.outlineColor=e$1U.fromCssColorString(this.HexadecimalConversion(e.shiningColor)),i.label.outlineWidth=e.shiningSize,i.label.translucencyByDistance=void 0,i.label.pixelOffsetScaleByDistance=void 0,i.label.scaleByDistance=void 0,i.label.distanceDisplayCondition=void 0,i.label.disableDepthTestDistance=Number.POSITIVE_INFINITY):(i.label.font=this.labelGraphics.font,i.label.style=this.labelGraphics.style,i.label.scale=this.labelGraphics.scale,i.label.showBackground=this.labelGraphics.showBackground,i.label.backgroundColor=this.labelGraphics.backgroundColor,i.label.backgroundPadding=this.labelGraphics.backgroundPadding,i.label.pixelOffset=this.labelGraphics.pixelOffset,i.label.eyeOffset=this.labelGraphics.eyeOffset,i.label.horizontalOrigin=this.labelGraphics.horizontalOrigin,i.label.verticalOrigin=this.labelGraphics.verticalOrigin,i.label.heightReference=this.labelGraphics.heightReference,i.label.fillColor=this.labelGraphics.fillColor,i.label.outlineColor=this.labelGraphics.outlineColor,i.label.outlineWidth=this.labelGraphics.outlineWidth,i.label.translucencyByDistance=void 0,i.label.pixelOffsetScaleByDistance=void 0,i.label.scaleByDistance=this.labelGraphics.scaleByDistance,i.label.distanceDisplayCondition=void 0,i.label.disableDepthTestDistance=Number.POSITIVE_INFINITY);var n=new h$V(i);return n.name=t.t?this._UUIDRoad:this._UUID,n.oid=e.oid,n.priority=e.priority?e.priority:0,n.xyz=t.x+"_"+t.y+"_"+(t.z-1),n}},h$3.prototype.collisionDetection=function(){var e=this.viewer.scene._view.viewport,t=e.x,i=e.x+e.width,n=e.y,r=e.y+e.height,o=[],a=this,s=this.viewer.entities.values;s.sort((function(e,t){return e.priority-t.priority})),s.map((function(e){if(e.name&&(e.name===a._UUID||e.name===a._UUIDRoad)){var s=s$Q.wgs84ToDrawingBufferCoordinates(a.viewer.scene,e.position.getValue(0));if(e$2b(s)){e._screenSpacePosition=s;var l=a.getLabelReact({point:s,entity:e});e.collisionBox=l,s.x>=t&&s.x<=i&&s.y>=n&&s.y<=r?(e.show=!0,o.push({anno:e,clustered:!0,coord:s})):e.show=!1}else e.show=!1}}));for(var l=O$B(o,F$2,q$2,64,Int32Array),u=o.length,c=0;c<u;c++){for(var h=o[c],d=h.anno.collisionBox,f=l.intersect(d.x,d.y,d.x+d.width,d.y+d.height,o,A$4,V$2),p=f.length,_=0,m=0;m<p;m++){var g=f[m],x=o[g];c!==g&&!x.clustered&&++_}_<1?h.clustered=!1:h.anno.show=!1}},h$3.prototype.bindEvent=function(){this.viewer.scene.camera.moveEnd.addEventListener(this._cluster,this),this.viewer.scene.camera.changed.addEventListener(this._changed,this);this.viewer.scene.terrainProvider.readyPromise.then(this._cluster.bind(this))},h$3.prototype.unbindEvent=function(){this.viewer.scene.camera.moveEnd.removeEventListener(this._cluster,this),this.viewer.scene.camera.changed.removeEventListener(this._changed,this)},h$3.prototype.activate=function(){this._latelyGrid=[],this._cluster()},h$3.prototype.destroy=function(){for(var e=0;e<this.viewer.entities.values.length;e++)!this.viewer.entities.values[e].name||this.viewer.entities.values[e].name!==this._UUID&&this.viewer.entities.values[e].name!==this._UUIDRoad||(this.viewer.entities.remove(this.viewer.entities.values[e]),e--);this.viewer.camera.percentageChanged=.5,this.unbindEvent(),this.handler=this.handler&&this.handler.destroy(),this.proxy=void 0,this.viewer=void 0,this.url=void 0,this.labelGraphics=void 0,this.billboardGraphics=void 0,this.aotuCollide=void 0,this.collisionPadding=void 0,this.tileCache=void 0,this.labelCache=void 0,this._latelyGrid=void 0,this._latelyRefreshStamp=void 0,this._roadTileset=void 0},h$3.prototype.compareArray=function(e,t){for(var i=!1,n=0;n<e.length;n++){for(var r=!1,o=0;o<t.length;o++)if(e[n].x===t[o].x&&e[n].y===t[o].y&&e[n].level===t[o].level){r=!0;break}if(!r){i=!0;break}}return!i},h$3.prototype.getLabelReact=function(e){var t=parseInt(e.entity.label.font);t=t>0?t:15;for(var i=e.entity.label.text.getValue(0).split("\n"),n=0,r=i.length,o=0;o<i.length;o++){var a=M$3(i[o])/2;n<a&&(n=a)}var s=e.entity.billboard?e.entity.billboard.width.getValue(0)*e.entity.billboard.scale.getValue(0):1,l=e.entity.billboard?e.entity.billboard.height.getValue(0)*e.entity.billboard.scale.getValue(0):1,u=e.entity.label.pixelOffset,c=u.getValue(0).x;c<0&&(c=0);var h=u.getValue(0).y;return h<0&&(h=0),{x:(e.point?e.point.x:-999)-s/2-this.collisionPadding[3],y:(e.point?e.point.y:-999)-l/2-this.collisionPadding[0],width:t*e.entity.label.scale.getValue(0)*n+c+s+this.collisionPadding[1],height:t*e.entity.label.scale.getValue(0)*(r+.5*(r-1))+h+l/2+this.collisionPadding[2]}},h$3.prototype.CutString=function(e){if(!e)return"";var t=e.byteLength;return t<=28?"":e.slice(19,t-9)},h$3.prototype.HexadecimalConversion=function(e){if(4278190080===e)return"#000000";var t=4278190080|parseInt(-Number(e));if(e="",(t=t.toString(16).substring(1)).length<6)for(var i=6-t.length,n=0;n<i;n++)e+="0";return"#"+e+t},h$3.prototype.getLabelVisibility=function(e){if(!e)return!1;var t=this.viewer.canvas.getBoundingClientRect();return!(e.x<-10||e.x>t.right+10||e.y<-10||e.y>t.bottom+10)};var M$3=function(e){for(var t=0,i=0;i<e.length;i++)null!=e.charAt(i).match(/[^\x00-\xff]/gi)?t+=2:t+=1;return t},H$1=function(e){var t={stringTable:[],pois:[],enumGeometryType:[{ePoint:0},{eMultiLineString:1},{ePolygon:2}],enumZCoordType:[{eCloseGround:0},{eCloseSeaSurface:1},{eRelativelyGround:2},{eAbsolute:3}]},i=function(){if(!f$7)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return f$7.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;} ;message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Interate = 5;optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI.proto").build("GEOPOI").PBPOITile}(),n=function(){if(!f$7)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return f$7.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;};enum enumZCoordType {eCloseGround = 0;eCloseSeaSurface = 1;eRelativelyGround = 2;eAbsolute = 3;};message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Interate = 5;optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];optional enumZCoordType ZCoordType = 16 [default = eAbsolute];};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI2.proto").build("GEOPOI").PBPOITile}(),r=function(){if(!f$7)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return f$7.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;};enum enumZCoordType {eCloseGround = 0;eCloseSeaSurface = 1;eRelativelyGround = 2;eAbsolute = 3;};message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Priority = 5;repeated int32 Interates =6 [packed=true];optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];optional enumZCoordType ZCoordType = 16 [default = eAbsolute];optional int32 FontStyle=17;optional int32 ShiningSize=18;};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI3.proto").build("GEOPOI").PBPOITile}();t.pois.length=0;var o,a=e;try{o=r.decode(a)}catch{console.log("message")}if(!o)try{results=n.decode(a)}catch{console.log("message"),results=i.decode(a)}t.version=parseInt(o.Version.toString()),t.titleKey=parseInt(o.TileKey.toString()),t.stringTable=[];for(var s=o.StringTable.s.length,l=0;l<s;l++)t.stringTable.push(o.StringTable.s[l].toString());return o.POIS.forEach((function(e){var i={};i.oid=parseInt(e.OID.toString())+"_"+t.titleKey,i.name=e.Name.toString(),i.symbolID=parseInt(e.SymbolID.toString()),i.displayHeight=e.DisplayHeight,i.shiningColor=e.ShiningColor,i.fontNameIndex=e.FontNameIndex,i.fontSize=e.FontSize,i.fontColor=e.FontColor,e.ZCoordType&&(i.zCoordType=e.ZCoordType),i.geometryType=e.GeometryType,i.coordinate=e.Coordinates,i.priority=void 0===e.Priority?null:e.Priority,i.interates=void 0===e.Interates?null:e.Interates,i.fontStyle=void 0===e.FontStyle?null:e.FontStyle,i.shiningSize=void 0===e.ShiningSize?null:e.ShiningSize,t.pois.push(i)})),t},_$5={IMG_W:"img_w",IMG_C:"img_c",CIA_W:"cia_w",CIA_C:"cia_c",VEC_W:"vec_w",VEC_C:"vec_c",TER_W:"ter_w",TER_C:"ter_c",CVA_W:"cva_w",CVA_C:"cva_c",CTA_W:"cta_w",CTA_C:"cta_c",IBO_W:"ibo_w",IBO_C:"ibo_c",EIA_W:"eia_w",EIA_C:"eia_c",EVA_W:"eva_w",EVA_C:"eva_c"},t$7=Object.freeze(_$5);function f$6(e){e=u$_(e,{}),this._mapStyle=u$_(e.mapStyle,t$7.IMG_W),this._url=u$_(e.url,_$4[this._mapStyle]),this._token=e.token,this._layer=u$_(e.layer,r$c[this._mapStyle]),this._style=u$_(e.style,"default"),this._tileMatrixSetID=u$_(e.tileMatrixSetID,a$1[this._mapStyle]),this._tileMatrixLabels=u$_(e.tileMatrixLabels,i$7[this._mapStyle]),this._format=u$_(e.format,n$5[this._mapStyle]),this._epsgCode=s$6[this._mapStyle],this._tilingScheme=u$_(e.tilingScheme,new c$R({})),"4490"==this._epsgCode&&(this._tilingScheme=new g$13),this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._minimumLevel=u$_(e.minimumLevel,0),this._maximumLevel=u$_(e.maximumLevel,i$7[this._mapStyle].length),this._rectangle=u$_(e.rectangle,this._tilingScheme.rectangle),this._readyPromise=o$1l.resolve(!0),this._errorEvent=new o$1h;var t=e.credit;this._credit="string"==typeof t?new r$T(t):t,this._subdomains=u$_(e.subdomains,["t0","t1","t2","t3","t4","t5","t6","t7"]),this._tileDiscardPolicy=e.tileDiscardPolicy;var i=this,n=this._url;i.tablename=this._url,new l$15({name:n}).then((function(e){e.checkObjectStoreExit(i.tablename)?i._indexedDBScheduler=e:e.createObjectStore(i.tablename).then((function(){i._indexedDBScheduler=e}))})),i._indexedDBSetting={isOpen:!1,clear:function(){i._indexedDBScheduler.clear(i.tablename)},cache:[]}}function B$2(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(f$6.prototype,{url:{get:function(){return this._url}},mapStyle:{get:function(){return this._mapStyle}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}}}),f$6.prototype.requestImage=function(e,t,i,n){var r=D$3(this,e,t,i),o=B$2(e,t,i);if(n.quadKey=o,!0===this._indexedDBSetting.isOpen&&n.cacheEnable){if(e$2b(this._indexedDBScheduler)){var a=this._indexedDBScheduler.getElementFromDB(this.tablename,o);return e$2b(a)?o$1l(a,(function(e){return e$2b(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$h.loadImage(this,r)}return e$h.loadImage(this,r)}return e$h.loadImage(this,r)};var L$6=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function D$3(e,t,i,n){"900913"==e._epsgCode&&(n-=1);var r=e._tileMatrixLabels,o=e$2b(r)?r[n]:n.toString(),a=e._subdomains,s=e._url.replace("[subdomain]",a[(t+i+n)%a.length]),l=new h$16(s),u=m$1a(u$_(l.query,""));(u=p$19(L$6,u)).tilematrix=o,u.layer=e._layer,u.style=e._style,u.tilerow=i,u.tilecol=t,u.tilematrixset=e._tileMatrixSetID,u.format=e._format,l.query=m$1b(u),s=l.toString();var c=e._proxy;return e$2b(c)&&(s=c.getURL(s)),e$2b(e._token)&&(s+="&tk="+e._token),s}f$6.prototype.pickFeatures=function(){};var _$4={};_$4[t$7.IMG_W]="https://[subdomain].tianditu.gov.cn/img_w/wmts",_$4[t$7.IMG_C]="https://[subdomain].tianditu.gov.cn/img_c/wmts",_$4[t$7.CIA_W]="https://[subdomain].tianditu.gov.cn/cia_w/wmts",_$4[t$7.CIA_C]="https://[subdomain].tianditu.gov.cn/cia_c/wmts",_$4[t$7.VEC_W]="https://[subdomain].tianditu.gov.cn/vec_w/wmts",_$4[t$7.VEC_C]="https://[subdomain].tianditu.gov.cn/vec_c/wmts",_$4[t$7.TER_W]="https://[subdomain].tianditu.gov.cn/ter_w/wmts",_$4[t$7.TER_C]="https://[subdomain].tianditu.gov.cn/ter_c/wmts",_$4[t$7.CVA_W]="https://[subdomain].tianditu.gov.cn/cva_w/wmts",_$4[t$7.CVA_C]="https://[subdomain].tianditu.gov.cn/cva_c/wmts",_$4[t$7.CTA_W]="https://[subdomain].tianditu.gov.cn/cta_w/wmts",_$4[t$7.CTA_C]="https://[subdomain].tianditu.gov.cn/cta_c/wmts",_$4[t$7.EIA_W]="https://[subdomain].tianditu.gov.cn/eia_w/wmts",_$4[t$7.EIA_C]="https://[subdomain].tianditu.gov.cn/eia_c/wmts",_$4[t$7.EVA_W]="https://[subdomain].tianditu.gov.cn/eva_w/wmts",_$4[t$7.EVA_C]="https://[subdomain].tianditu.gov.cn/eva_c/wmts",_$4[t$7.IBO_W]="https://[subdomain].tianditu.gov.cn/ibo_w/wmts",_$4[t$7.IBO_C]="https://[subdomain].tianditu.gov.cn/ibo_c/wmts";var r$c={};r$c[t$7.IMG_W]="img",r$c[t$7.IMG_C]="img",r$c[t$7.IBO_W]="ibo",r$c[t$7.IBO_C]="ibo",r$c[t$7.CIA_W]="cia",r$c[t$7.CIA_C]="cia",r$c[t$7.VEC_W]="vec",r$c[t$7.VEC_C]="vec",r$c[t$7.TER_W]="ter",r$c[t$7.TER_C]="ter",r$c[t$7.CVA_W]="cva",r$c[t$7.CVA_C]="cva",r$c[t$7.CTA_W]="cta",r$c[t$7.CTA_C]="cta",r$c[t$7.EIA_W]="eia",r$c[t$7.EIA_C]="eia",r$c[t$7.EVA_W]="eva",r$c[t$7.EVA_C]="eva";var a$1={};a$1[t$7.IMG_W]="w",a$1[t$7.IMG_C]="c",a$1[t$7.IBO_W]="w",a$1[t$7.IBO_C]="c",a$1[t$7.CIA_W]="w",a$1[t$7.CIA_C]="c",a$1[t$7.VEC_W]="w",a$1[t$7.VEC_C]="c",a$1[t$7.TER_W]="w",a$1[t$7.TER_C]="c",a$1[t$7.CVA_W]="w",a$1[t$7.CVA_C]="c",a$1[t$7.CTA_W]="w",a$1[t$7.CTA_C]="c",a$1[t$7.EIA_W]="w",a$1[t$7.EIA_C]="c",a$1[t$7.EVA_W]="w",a$1[t$7.EVA_C]="c";var n$5={};n$5[t$7.IMG_W]="tiles",n$5[t$7.IMG_C]="tiles",n$5[t$7.IBO_W]="tiles",n$5[t$7.IBO_C]="tiles",n$5[t$7.CIA_W]="tiles",n$5[t$7.CIA_C]="tiles",n$5[t$7.VEC_W]="tiles",n$5[t$7.VEC_C]="tiles",n$5[t$7.TER_W]="tiles",n$5[t$7.TER_C]="tiles",n$5[t$7.CVA_W]="tiles",n$5[t$7.CVA_C]="tiles",n$5[t$7.CTA_W]="tiles",n$5[t$7.CTA_C]="tiles",n$5[t$7.EIA_W]="tiles",n$5[t$7.EIA_C]="tiles",n$5[t$7.EVA_W]="tiles",n$5[t$7.EVA_C]="tiles";var s$6={};s$6[t$7.IMG_W]="900913",s$6[t$7.IMG_C]="4490",s$6[t$7.IBO_W]="900913",s$6[t$7.IBO_C]="4490",s$6[t$7.CIA_W]="900913",s$6[t$7.CIA_C]="4490",s$6[t$7.VEC_W]="900913",s$6[t$7.VEC_C]="4490",s$6[t$7.TER_W]="900913",s$6[t$7.TER_C]="4490",s$6[t$7.CVA_W]="900913",s$6[t$7.CVA_C]="4490",s$6[t$7.CTA_W]="900913",s$6[t$7.CTA_C]="4490",s$6[t$7.EIA_W]="900913",s$6[t$7.EIA_C]="4490",s$6[t$7.EVA_W]="900913",s$6[t$7.EVA_C]="4490";var i$7={};function d$8(e){if(!e$2b(e)||!e$2b(e.token))throw new t$16("options.token is required.");this._urls=["https://t0.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t1.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t2.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t3.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t4.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t5.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t6.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t7.tianditu.gov.cn/mapservice/swdx?T=elv_c"];for(var t=0;t<this._urls.length;t++)this._urls[t]+="&tk="+e.token;this._dataType=u$_(e.dataType,"int"),this._errorEvent=new o$1h,this._ready=!0,this._readyPromise=o$1l.resolve(!0),this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0};var i=e.credit;"string"==typeof i&&(i=new r$T(i)),this._credit=i;var n=u$_(e.ellipsoid,t$13.WGS84);this._tilingScheme=new g$13({ellipsoid:n}),this._heightmapWidth=64,this._heightmapHeight=64,this._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(n,Math.min(this._heightmapWidth,this._heightmapHeight),this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._minimumLevel=u$_(e.minimumLevel,5),this._maximumLevel=u$_(e.maximumLevel,25),this._hasWaterMask=!1,this._hasVertexNormals=!1}function B$1(e,t){return(t=e$2b(t)?t:new r$1b({url:e})).requestFunction=function(){var t=new XMLHttpRequest;t.open("get",e,!0),t.responseType="arraybuffer",t.async=!1,t.send(null);var i=o$1l.defer();return t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status&&e$2b(t.response)){for(var e=new DataView(t.response),n=e.byteLength,r=new Uint8Array(n),o=0;o<n;o++)r[o]=e.getUint8(o,!0);if(n>1e3){var a=nt$9.inflate(r).buffer;e$2b(a)?i.resolve(new Uint8Array(a)):i.reject(!1)}else i.reject(!1)}else(t.status>=400||0===t.status)&&i.reject(!1)},i.promise},r$1a.request(t)}function o$7(){}function n$4(e){e=u$_(e,u$_.EMPTY_OBJECT),this._tilingScheme=e$2b(e.tilingScheme)?e.tilingScheme:new g$13({ellipsoid:e.ellipsoid}),this._color=u$_(e.color,e$1U.YELLOW),this._errorEvent=new o$1h,this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._readyPromise=o$1l.resolve(!0)}function r$b(e){t$16.throwInstantiationError()}i$7[t$7.IMG_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.IMG_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.IBO_W]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.IBO_C]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.CIA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.CIA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.VEC_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.VEC_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.TER_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],i$7[t$7.TER_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],i$7[t$7.CVA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.CVA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.CTA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.CTA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.EIA_W]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.EIA_C]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.EVA_W]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.EVA_C]=["1","2","3","4","5","6","7","8","9","10"],Object.defineProperties(d$8.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),d$8.prototype.requestTileGeometry=function(e,t,i,n){if(i<this._maximumLevel&&i>=this._minimumLevel){var r=this._urls[(e+t+i)%this._urls.length],o=-1===r.indexOf("?")?"?":"&",a=B$1(r+o+"x="+e+"&y="+t+"&l="+(i+1));if(!e$2b(a))return;var s=this;return o$1l(a,(function(e){var t=s.transformBuffer(e);return e$2b(t)?new T$J({buffer:t,width:s._heightmapWidth,height:s._heightmapHeight,childTileMask:void 0,structure:s._terrainDataStructure}):new T$J({buffer:s.getvHeightBuffer(),width:s._heightmapWidth,height:s._heightmapHeight,childTileMask:void 0,structure:s._terrainDataStructure})}))}if(i<this._minimumLevel)return new T$J({buffer:this.getvHeightBuffer(),width:this._heightmapWidth,height:this._heightmapHeight,childTileMask:void 0,structure:this._terrainDataStructure})},d$8.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},d$8.prototype.getTileDataAvailable=function(e,t,i){return i<25},d$8.prototype.getvHeightBuffer=function(){var e=this._vHeightBuffer;if(!e$2b(e)){e=this._vHeightBuffer=new Uint8ClampedArray(this._heightmapWidth*this._heightmapHeight*4);for(var t=this._heightmapWidth*this._heightmapHeight*4,i=0;i<t;)e[i++]=15,e[i++]=66,e[i++]=64,e[i++]=255}return e},d$8.prototype.transformBuffer=function(e){var t=2;"int"===this._dataType?t=2:"float"===this._dataType&&(t=4);var i,n,r,o,a,s,l,u=new ArrayBuffer(t),c=new DataView(u),h=this._heightmapWidth,d=this._heightmapHeight,f=new Uint8Array(h*d*4);for(i=0;i<d;i++)for(n=0;n<h;n++){r=parseInt(149*i/(d-1)),o=parseInt(149*n/(h-1)),4===t?(a=t*(150*r+o),c.setInt8(0,e[a]),c.setInt8(0,e[a+1]),c.setInt8(0,e[a+2]),c.setInt8(0,e[a+3]),l=c.getFloat32(0,!0)):l=e[a=t*(150*r+o)]+256*e[a+1],(l>1e4||l<-2e3)&&(l=0);var p=(l+1e3)/.001;f[s=4*(i*h+n)]=p/65536,f[s+1]=(p-256*f[s]*256)/256,f[s+2]=p-256*f[s]*256-256*f[s+1],f[s+3]=256}return f},o$7.prototype.boundingVolume=void 0,o$7.prototype.boundingSphere=void 0,o$7.prototype.distanceToCamera=function(e){t$16.throwInstantiationError()},o$7.prototype.intersectPlane=function(e){t$16.throwInstantiationError()},o$7.prototype.createDebugVolume=function(e){t$16.throwInstantiationError()},Object.defineProperties(n$4.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),n$4.prototype.getTileCredits=function(e,t,i){},n$4.prototype.requestImage=function(e,t,i,n){var r=document.createElement("canvas");r.width=256,r.height=256;var o=r.getContext("2d"),a=this._color.toCssColorString();return o.strokeStyle=a,o.lineWidth=2,o.strokeRect(1,1,255,255),o.font="bold 25px Arial",o.textAlign="center",o.fillStyle=a,o.fillText("L: "+i,124,86),o.fillText("X: "+e,124,136),o.fillText("Y: "+t,124,186),r},n$4.prototype.pickFeatures=function(e,t,i,n,r){},r$b.prototype.isReady=t$16.throwInstantiationError,r$b.prototype.shouldDiscardImage=t$16.throwInstantiationError;var e={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},TileState=Object.freeze(e);function g$6(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.typeOf.object("options.clock",e.clock),o$1q.typeOf.object("options.intervals",e.intervals),this.show=u$_(e.show,!0),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this.shadows=u$_(e.shadows,W$W.ENABLED),this.maximumMemoryUsage=u$_(e.maximumMemoryUsage,256),this.shading=new o$Z(e.shading),this.style=e.style,this.frameFailed=new o$1h,this.frameChanged=new o$1h,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new m$U,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._readyPromise=o$1l.defer(),this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=d$1s(new Array(5),0),this._runningAverage=0}function W$4(e){return"uniform vec4 czm_pickColor;\n"+e}function X$2(e){return function(t){return p$19(t,{czm_pickColor:function(){return e._pickId.color}})}}function Z$3(){return"czm_pickColor"}Object.defineProperties(g$6.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){h$K.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(e$2b(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}},readyPromise:{get:function(){return this._readyPromise.promise}}}),g$6.prototype.makeStyleDirty=function(){this._styleDirty=!0},g$6.prototype._getAverageLoadTime=function(){return 0===this._runningLength?.05:this._runningAverage};var $$2=new a$15;function k$3(e){var t=e._clock,i=t.canAnimate&&t.shouldAnimate,n=t.multiplier;return i?n:0}function p$2(e,t){return e._intervals.indexOf(t.start)}function ee$1(e,t){var i=e._intervals,n=e._clock,r=k$3(e);if(0!==r){var o=e._getAverageLoadTime(),a=a$15.addSeconds(n.currentTime,o*r,$$2),s=i.indexOf(a);return s===p$2(e,t)&&(r>=0?++s:--s),i.get(s)}}function ie(e){var t=e._intervals,i=e._clock.currentTime,n=t.indexOf(i);return t.get(n)}function ne$1(e,t,i){var n=k$3(e),r=p$2(e,t),o=p$2(e,i);return n>=0?r>=o:r<=o}function re$1(e,t){return function(i){var n=e$2b(i.message)?i.message:i.toString();e.frameFailed.numberOfListeners>0?e.frameFailed.raiseEvent({uri:t,message:n}):(console.log("A frame failed to load: "+t),console.log("Error: "+n))}}function te$1(e,t,i){var n=p$2(e,t),r=e._frames,o=r[n];if(!e$2b(o)){var a=t.data.transform,s=e$2b(a)?p$1d.fromArray(a):void 0,l=t.data.uri;o={pointCloud:void 0,transform:s,timestamp:Et$a(),sequential:!0,ready:!1,touchedFrameNumber:i.frameNumber},r[n]=o,t$11.fetchArrayBuffer({url:l}).then((function(t){return o.pointCloud=new ie$g({arrayBuffer:t,cull:!0,fragmentShaderLoaded:W$4,uniformMapLoaded:X$2(e),pickIdLoaded:Z$3}),o.pointCloud.readyPromise})).otherwise(re$1(e,l))}return o}function ae(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function se(e,t,i,n){t.touchedFrameNumber<n.frameNumber-1&&(t.sequential=!1);var r=t.pointCloud;if(e$2b(r)&&!t.ready){var o=n.commandList,a=o.length;if(A$3(e,t,i,n),r.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=r.geometryByteLength,o.length=a,t.sequential))ae(e,(Et$a()-t.timestamp)/1e3)}t.touchedFrameNumber=n.frameNumber}var oe$1=new p$1d;function le$1(e,t){var i=e.shading;return e$2b(i)&&e$2b(i.baseResolution)?i.baseResolution:e$2b(t.boundingSphere)?e$2a.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function ue(e){var t=e.shading;return e$2b(t)&&e$2b(t.maximumAttenuation)?t.maximumAttenuation:10}var de$1=new o$Z;function A$3(e,t,i,n){var r=u$_(e.shading,de$1),o=t.pointCloud,a=u$_(t.transform,p$1d.IDENTITY);o.modelMatrix=p$1d.multiplyTransformation(e.modelMatrix,a,oe$1),o.style=e.style,o.time=i.timeSinceLoad,o.shadows=e.shadows,o.clippingPlanes=e._clippingPlanes,o.isClipped=i.isClipped,o.attenuation=r.attenuation,o.backFaceCulling=r.backFaceCulling,o.normalShading=r.normalShading,o.geometricError=le$1(e,o),o.geometricErrorScale=r.geometricErrorScale,o.maximumAttenuation=ue(e),o.update(n),t.touchedFrameNumber=n.frameNumber}function L$5(e,t,i,n){se(e,te$1(e,t,n),i,n)}function me$1(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function T$2(e,t){for(var i=e._frames,n=i.length,r=0;r<n;++r){var o=i[r];if(e$2b(o)&&(!e$2b(t)||t(o))){var a=o.pointCloud;o.ready&&(e._totalMemoryUsageInBytes-=a.geometryByteLength),e$2b(a)&&a.destroy(),o===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),i[r]=void 0}}}function ce$2(e,t){var i=p$2(e,t),n=e._frames[i];if(e$2b(n)&&n.ready)return n}function E$2(e,t,i,n,r){return!!e$2b(i)&&(!!i.ready||(L$5(e,t,n,r),i.ready))}function fe(e,t,i,n,r){var o,a,s=e._intervals,l=e._frames,u=p$2(e,i),c=p$2(e,t);if(u>=c){for(o=u;o>=c;--o)if(E$2(e,a=s.get(o),l[o],n,r))return a}else for(o=u;o<=c;++o)if(E$2(e,a=s.get(o),l[o],n,r))return a;return t}function ge$1(e,t,i){for(var n=e._frames,r=n.length,o=0;o<r;++o){var a=n[o];e$2b(a)&&e$2b(a.pointCloud)&&(a.pointCloud.clippingPlanesDirty=t,a.pointCloud.styleDirty=i)}}var y$6={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};function t$6(e,t){this._show=u$_(t,!0),this._command=new i$_({owner:this}),this._radius=6378137-e,this._ellipsoid=t$13.fromCartesian3(new o$1p(this._radius,this._radius,this._radius)),this._baseColor=new e$1U(0,0,0,1)}g$6.prototype.update=function(e){if(e.mode!==C$13.MORPHING&&this.show){e$2b(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),e$2b(this._loadTimestamp)||(this._loadTimestamp=a$15.clone(e.time));var t=Math.max(1e3*a$15.secondsDifference(e.time,this._loadTimestamp),0),i=this._clippingPlanes,n=0,r=!1,o=e$2b(i)&&i.enabled;o&&(i.update(e),n=i.clippingPlanesState),this._clippingPlanesState!==n&&(this._clippingPlanesState=n,r=!0);var a=this._styleDirty;this._styleDirty=!1,(r||a)&&ge$1(this,r,a),y$6.timeSinceLoad=t,y$6.isClipped=o;var s=this.shading,l=this._pointCloudEyeDomeLighting,u=e.commandList,c=u.length,h=this._previousInterval,d=this._nextInterval,f=ie(this);if(e$2b(f)){var p=!1,_=k$3(this),m=0===_;_!==this._clockMultiplier&&(p=!0,this._clockMultiplier=_),(!e$2b(h)||m)&&(h=f),(!e$2b(d)||p||ne$1(this,f,d))&&(d=ee$1(this,f));var g=ce$2(this,h=fe(this,h,f,y$6,e));e$2b(g)||(L$5(this,h,y$6,e),g=this._lastRenderedFrame),e$2b(g)&&A$3(this,g,y$6,e),e$2b(d)&&L$5(this,d,y$6,e);var x=this;e$2b(g)&&!e$2b(this._lastRenderedFrame)&&e.afterRender.push((function(){x._readyPromise.resolve(x)})),e$2b(g)&&g!==this._lastRenderedFrame&&x.frameChanged.numberOfListeners>0&&e.afterRender.push((function(){x.frameChanged.raiseEvent(x)})),this._previousInterval=h,this._nextInterval=d,this._lastRenderedFrame=g,this._totalMemoryUsageInBytes>1024*this.maximumMemoryUsage*1024&&T$2(this,me$1(e));var v=u.length-c;e$2b(s)&&s.attenuation&&s.eyeDomeLighting&&v>0&&l.update(e,c,s)}}},g$6.prototype.isDestroyed=function(){return!1},g$6.prototype.destroy=function(){return T$2(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),i$10(this)},Object.defineProperties(t$6.prototype,{show:{get:function(){return this._show},set:function(e){o$1q.defined("UnderGlobe show",e),this._show=e}},radius:{get:function(){return this._radius},set:function(e){if(o$1q.defined("UnderGlobe radius",e),this._radius!==e){var t=this._command;e$2b(t)&&(t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),this._ellipsoid=t$13.fromCartesian3(new o$1p(this._radius,this._radius,this._radius))}this._radius=e}},ellipsoid:{get:function(){return this._ellipsoid}},baseColor:{get:function(){return this._baseColor},set:function(e){o$1q.defined("UnderGlobe baseColor",e),this._baseColor=e}}});var O$3="attribute vec4 position;\nvoid main(void)\n{\ngl_Position = czm_modelViewProjection * vec4(position.xyz - czm_relativeOrigin, 1.0);\n}",U$3="uniform vec4 uBaseColor;\nvoid main (void)\n{\ngl_FragColor = uBaseColor;\n}";t$6.prototype.update=function(e){var t=e.camera.positionCartographic.height;if(this._show&&e.passes.render&&!(t>1e4)){var i=e.mode;if(i===C$13.SCENE3D||i===C$13.MORPHING){var n=this._command,r=this;if(!e$2b(n.vertexArray)){var o=e.context,a=b$P.createGeometry(new b$P({radii:new o$1p(this._radius,this._radius,this._radius),slicePartitions:256,stackPartitions:256,vertexFormat:n$11.POSITION_ONLY})),s=k$13.createAttributeLocations(a);n.vertexArray=c$12.fromGeometry({context:o,geometry:a,attributeLocations:s,bufferUsage:A$19.STATIC_DRAW}),n.renderState=d$1m.fromCache({cull:{enabled:!0}}),n.uniformMap={uBaseColor:function(){return r._baseColor}};var l=new s$U({sources:[O$3]}),u=new s$U({sources:[U$3]});n.shaderProgram=r$13.fromCache({context:o,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:s})}return n}}},t$6.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),i$10(this)};var _$3="\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n czm_materialInput materialInput;\n \n materialInput.s = v_textureCoordinates.s;\n materialInput.st = v_textureCoordinates;\n materialInput.str = vec3(v_textureCoordinates, 0.0);\n materialInput.normalEC = vec3(0.0, 0.0, -1.0);\n \n czm_material material = czm_getMaterial(materialInput);\n\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n}\n";function o$6(e,t){this.show=!0,e$2b(e)||(e=new f$18),this.rectangle=f$18.clone(e),e$2b(t)||(t=r$X.fromType(r$X.ColorType,{color:new e$1U(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}function A$2(e){this._url=e.url,this._hypsometricTexture=void 0,this.hypsometricSetting=e.hypsometricSetting,this._ready=!1,this._volBounds=void 0,this._volImageBuffer=void 0,this._volTexture=void 0,this._dataBuffer=void 0,this.loadData(this._url)}function pt(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a=r[o],s=4*o;if(a<0||a>1)e[s+0]=255,e[s+1]=255,e[s+2]=255,e[s+3]=255;else{a=a*(t._ceiling-t._floor)+t._floor,i&&(a=Math.round(a));var l=t._dictColorTable.getColor(a);e[s+0]=255*l.red,e[s+1]=255*l.green,e[s+2]=255*l.blue,e[s+3]=255*l.alpha}}return new Uint8Array(e.buffer,0,e.length)}function gt(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function ut$1(e){for(var t=e.length/4,i=new Float32Array(e.buffer,e.byteOffset,t),n=0;n<i.length;n++){var r,o,a,s,l=i[n],u=4*n,c=new e$29(0,0,0,0);if(l>=0&&l<=1){l<e$2a.EPSILON9?l=e$2a.EPSILON9:1-l<e$2a.EPSILON9&&(l=1-e$2a.EPSILON9);var h=gt(l);c.x=h.x,c.y=h.y,c.z=h.z,c.w=1}r=255*c.x,o=255*c.y,a=255*c.z,s=255*c.w,e[u+0]=parseInt(r),e[u+1]=parseInt(o),e[u+2]=parseInt(a),e[u+3]=parseInt(s)}return new Uint8Array(e.buffer,0,e.length)}o$6.prototype.update=function(e){if(this.show){if(!e$2b(this.material))throw new t$16("this.material must be defined.");if(!e$2b(this.rectangle))throw new t$16("this.rectangle must be defined.");var t=this._rs;if((!e$2b(t)||!f$18.equals(t.viewport,this.rectangle))&&(this._rs=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render){var i=e.context;if(this._material!==this.material||!e$2b(this._overlayCommand)){this._material=this.material,e$2b(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();var n=new s$U({sources:[this._material.shaderSource,_$3]});this._overlayCommand=i.createViewportQuadCommand(n,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Le$s.OVERLAY}this._material.update(i),this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}}},o$6.prototype.isDestroyed=function(){return!1},o$6.prototype.destroy=function(){return e$2b(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),i$10(this)},Object.defineProperties(A$2.prototype,{hypsometricSetting:{get:function(){return this._hypsometricSetting},set:function(e){this._hypsometricSetting=e}}});var d$7=-9999,ct$1=new DOMParser;function _t(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t)return a}}A$2.prototype.loadData=function(e){var t=this;t._ready=!1;var i=u$R(e+"/config");!e$2b(i)||i.then((function(i){var n=_t((i=ct$1.parseFromString(i,"application/xml")).childNodes[0],"sml:Bounds").textContent.split("\n"),r=Number(n[1]),o=Number(n[2]),a=Number(n[3]),s=Number(n[4]),l='/data/index/1/1.stream?bounds={"leftBottom":{"x":xLeft,"y":yBottom},"rightTop":{"x":xRight,"y":yTop}}';l=l.replace("xLeft",r).replace("yBottom",s).replace("xRight",a).replace("yTop",o);var u=o$10(e+l);!e$2b(u)||u.then((function(e){var i=new Uint8Array(e,8),n=nt$9.inflate(i).buffer,r=new Float64Array(n,0,1),o=new Uint32Array(n,48,1);if(0===r[0]||3200===o[0]||3201===o[0]){var a=0;0===r[0]&&(a=8);var s=new Float64Array(n,a,6),l={left:s[0],top:s[1],right:s[2],bottom:s[3],minHeight:s[4]<s[5]?s[4]:s[5],maxHeight:s[4]>s[5]?s[4]:s[5]},u=new Uint32Array(n,48+a,7),c=u[0],h=u[1],d=u[2],f=u[3],p=u[4],_=u[5],m=u[6],g=new Uint8Array(n,76+a,f*f*4),x=new Float32Array(n,76+a,f*f),v=!1;Math.abs(t._hypsometricSetting._ceiling-Math.round(t._hypsometricSetting._ceiling))<e$2a.EPSILON6&&Math.abs(t._hypsometricSetting._floor-Math.round(t._hypsometricSetting._floor))<e$2a.EPSILON6&&(v=!0),t._dataBuffer=new Float32Array(p*_*m);for(var y=0;y<m;y++)for(var $=Math.floor(y/h),b=y%h,T=0;T<_;T++)for(var C=d*$+T,S=0;S<p;S++){var w=C*f+(d*b+S);if(x[w]<0||x[w]>1)t._dataBuffer[y*_*p+T*p+S]=d$7;else{var E=x[w]*(t._hypsometricSetting._ceiling-t._hypsometricSetting._floor)+t._hypsometricSetting._floor;v&&(E=Math.round(E)),t._dataBuffer[y*_*p+T*p+S]=E}}t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST?pt(g,t.hypsometricSetting,v):ut$1(g);var P={nFormat:c,nSideBlockCount:h,nBlockLength:d,nLength:f,nWidth:p,nHeight:_,nDepth:m,imageArray:g};t._volBounds=l,t._volImageBuffer=P,t._ready=!0}e=null})).otherwise((function(e){}))})).otherwise((function(e){}))},A$2.prototype.loadTexture=function(e){if(!e$2b(this._volTexture)){var t=tt$h.NEAREST,i=rt$i.NEAREST;if(this._hypsometricSetting.filterMode!==k$Q.FilterMode.NEAREST)t=tt$h.LINEAR,i=rt$i.LINEAR;this._volTexture=new t$V({context:e,width:this._volImageBuffer.nLength,height:this._volImageBuffer.nLength,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({minificationFilter:t,magnificationFilter:i})}),this._volTexture.copyFrom({width:this._volImageBuffer.nLength,height:this._volImageBuffer.nLength,arrayBufferView:this._volImageBuffer.imageArray}),this._volImageBuffer.imageArray=null}e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:e,width:1024,height:64,pixelFormat:V$10.RGBA,flipY:!1}),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer}))},A$2.prototype.getPixel=function(e,t,i){var n=i*this._volImageBuffer.nWidth*this._volImageBuffer.nHeight+t*this._volImageBuffer.nWidth+e;return this._dataBuffer[n]},A$2.prototype.getValue=function(e){var t=SuperMap3D.Cartographic.fromCartesian(e),i=SuperMap3D.Math.toDegrees(t.longitude),n=SuperMap3D.Math.toDegrees(t.latitude),r=t.height,o=(i-this._volBounds.left)/(this._volBounds.right-this._volBounds.left);if(!(o>1||o<0)){var a=(n-this._volBounds.bottom)/(this._volBounds.top-this._volBounds.bottom);if(!(a>1||a<0)){var s=(r-this._volBounds.minHeight)/(this._volBounds.maxHeight-this._volBounds.minHeight);if(!(s>1||s<0)){var l=o*this._volImageBuffer.nWidth-.5,u=a*this._volImageBuffer.nHeight-.5,c=s*(this._volImageBuffer.nDepth-1),h=Math.floor(l),d=Math.ceil(l),f=Math.floor(u),p=Math.ceil(u),_=Math.floor(c),m=Math.ceil(c);if(h=e$2a.clamp(h,0,this._volImageBuffer.nWidth-1),d=e$2a.clamp(d,0,this._volImageBuffer.nWidth-1),f=e$2a.clamp(f,0,this._volImageBuffer.nHeight-1),p=e$2a.clamp(p,0,this._volImageBuffer.nHeight-1),_=e$2a.clamp(_,0,this._volImageBuffer.nDepth-1),m=e$2a.clamp(m,0,this._volImageBuffer.nDepth-1),this._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST)return l=l-h>.5?d:h,u=u-f>.5?p:f,c=c-_>.5?m:_,M=this.getPixel(l,u,c);var g=this.getPixel(h,f,_),x=this.getPixel(d,f,_);g==d$7&&(g=0),x==d$7&&(x=0);var v=g;h!=d&&(v=x*(l-h)+g*(d-l));var y=this.getPixel(h,p,_),$=this.getPixel(d,p,_);y==d$7&&(y=0),$==d$7&&($=0);var b=y;h!=d&&(b=$*(l-h)+y*(d-l));var T=b;if(f!=p)T=b*(u-f)+v*(p-u);var C=this.getPixel(h,f,m),S=this.getPixel(d,f,m);C==d$7&&(C=0),S==d$7&&(S=0);var w=C;h!=d&&(w=S*(l-h)+C*(d-l));var E=this.getPixel(h,p,m),P=this.getPixel(d,p,m);E==d$7&&(E=0),P==d$7&&(P=0);var A=E;h!=d&&(A=P*(l-h)+E*(d-l));var L=A;if(f!=p)L=A*(u-f)+w*(p-u);var M=L;if(_!=m)M=L*(c-_)+T*(m-c);return M}}}};var ve="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nuniform vec4 u_tileRangeAndImageSize;\nattribute vec4 volTexCoord;\nvarying vec4 v_volTexCoord;\nvarying vec2 v_textureCoordinates;\n\nfloat getGlobeDepth(vec4 positionEC){\n vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n if (globeDepth == 0.0){\n return 0.0; // not on the globe\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction)\n{\n vec2 halfSize = imageSize * scale * czm_resolutionScale * 0.5;\n halfSize *= ((direction * 2.0) - 1.0);\n positionEC.xy += halfSize;\n return positionEC;\n}\n\nvoid main()\n{\n vec3 positionHigh = positionHighAndScale.xyz;\n vec3 positionLow = positionLowAndRotation.xyz;\n float scale = positionHighAndScale.w;\n vec2 textureCoordinates = direction;\n vec2 imageSize = u_tileRangeAndImageSize.zw;\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n float depthsilon = 10.0;\n float globeDepth = getGlobeDepth(positionEC);\n if (globeDepth != 0.0 && positionEC.z + depthsilon < globeDepth)\n {\n positionEC.xyz = vec3(0.0);\n }\n else{\n positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction);\n }\n gl_Position = czm_projection * positionEC;\n v_textureCoordinates = textureCoordinates;\n#ifdef LOG_DEPTH\n czm_vertexLogDepth();\n#endif\n v_volTexCoord = volTexCoord;\n vec2 halfSize = imageSize * scale * czm_resolutionScale * 0.5 / u_tileRangeAndImageSize.xy;\n halfSize *= ((direction * 2.0) - 1.0);\n v_volTexCoord.xy += halfSize;\n}",pe="#extension GL_EXT_draw_buffers : enable\nuniform sampler2D u_atlas;\nuniform vec4 u_voxelGridLayerColor;\nuniform sampler2D u_colorTable;\nuniform vec4 u_minMaxValueAndFiltration;\nuniform vec3 u_maxVisibleTextureCoord;\nuniform vec3 u_minVisibleTextureCoord;\nvarying vec4 v_volTexCoord;\nvarying vec2 v_textureCoordinates;\nbool getSampleValueForVolume(float volumeValue, out vec4 colorFromColorTable)\n{\n float minValue = u_minMaxValueAndFiltration.x;\n float maxValue = u_minMaxValueAndFiltration.y;\n float minFiltration = u_minMaxValueAndFiltration.z;\n float maxFiltration = u_minMaxValueAndFiltration.w;\n colorFromColorTable = vec4(1.0);\n float realValue = minValue + volumeValue * (maxValue - minValue);\n if(realValue > maxFiltration || realValue < minFiltration)\n {\n return false;\n }\n#ifdef HAS_COLORTABLE\n colorFromColorTable = texture2D(u_colorTable, vec2(0.0, 1.0 - realValue)).rgba;\n#endif\n return true;\n}\nvoid main()\n{\n vec4 color = texture2D(u_atlas, v_textureCoordinates);\n color = czm_gammaCorrect(color);\n if (color.a < 0.005)\n {\n discard;\n }\n#ifdef TEXTURECOORD_CLIP\n if(v_volTexCoord.x > u_maxVisibleTextureCoord.x || v_volTexCoord.x < u_minVisibleTextureCoord.x\n\t|| v_volTexCoord.y > u_maxVisibleTextureCoord.y || v_volTexCoord.y < u_minVisibleTextureCoord.y\n\t|| v_volTexCoord.z > u_maxVisibleTextureCoord.z || v_volTexCoord.z < u_minVisibleTextureCoord.z)\n\t{\n\t\tdiscard;\n\t}\n#endif\n vec4 volumeColor = vec4(1.0);\n float noValue;\n float volumeValue = czm_getVolumeValue(v_volTexCoord.xyz, noValue);\n vec4 colorFromColorTable = vec4(1.0);\n if(!getSampleValueForVolume(volumeValue, colorFromColorTable))\n {\n discard;\n }\n #ifdef HAS_COLORTABLE\n volumeColor = colorFromColorTable;\n #else\n float power = volumeValue * 40.0 - 30.0;\n vec3 hdrColor = u_voxelGridLayerColor.rgb * pow(2.0, power);\n volumeColor.rgb = hdrColor;\n #endif\n color.rgb *= volumeColor.rgb;\n czm_writeLogDepth();\n#ifdef OIT\n vec3 Ci = color.rgb * color.a;\n float ai = color.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n#else\n gl_FragColor = color;\n#endif\n}",me=n$I.POSITION_INDEX,ee=n$I.NUMBER_OF_PROPERTIES,m$6,Ae$1={positionHighAndScale:0,positionLowAndRotation:1,volTexCoord:3},ge={direction:0,positionHighAndScale:1,positionLowAndRotation:2,volTexCoord:3},z$2;function c$7(e){e=u$_(e,u$_.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(ee),this._maxScale=1,this._allSizedInMeters=!0,this._baseVolume=new i$1c,this._baseVolumeWC=new i$1c,this._baseVolume2D=new i$1c,this._boundingVolume=new i$1c,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.volumeShaderPredefine=u$_(e.volumeShaderPredefine,[]),this._volumeShaderPredefine=void 0,this._mode=C$13.SCENE3D,this._highlightColor=e$1U.clone(e$1U.WHITE);var t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture}};var i=this._scene;e$2b(i)&&e$2b(i.terrainProviderChanged)&&(this._removeCallbackFunc=i.terrainProviderChanged.addEventListener((function(){for(var e=this._billboards,t=e.length,i=0;i<t;++i)e[i]._updateClamping()}),this)),this.transparent=u$_(e.OIT,!0),this._transparent=void 0,this._postRender=e.postRender}function te(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function W$3(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;for(var t=[],i=e._billboards,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._billboards=t}}function ye(e){var t=e.cache.billboardCollection_indexBufferBatched;if(e$2b(t))return t;for(var i=new Uint16Array(98298),n=0,r=0;n<98298;n+=6,r+=4)i[n]=r,i[n+1]=r+1,i[n+2]=r+2,i[n+3]=r+0,i[n+4]=r+2,i[n+5]=r+3;return(t=t$Y.createIndexBuffer({context:e,typedArray:i,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=t,t}function Te(e){var t=e.cache.billboardCollection_indexBufferInstanced;return e$2b(t)||((t=t$Y.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function Ie(e){var t=e.cache.billboardCollection_vertexBufferInstanced;return e$2b(t)||((t=t$Y.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:A$19.STATIC_DRAW})).vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}function Se(e,t,i,n){var r=[{index:m$6.positionHighAndScale,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:A$19.STATIC_DRAW},{index:m$6.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:A$19.STATIC_DRAW},{index:m$6.volTexCoord,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:A$19.STATIC_DRAW}];return i&&r.push({index:m$6.direction,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,vertexBuffer:Ie(e)}),e$2b(n)&&r.push({index:m$6.a_batchId,componentsPerAttribute:1,componentDatatyps:S$12.FLOAT,bufferUsage:A$19.STATIC_DRAW}),new v$F(e,r,i?t:4*t,i)}Object.defineProperties(c$7.prototype,{length:{get:function(){return W$3(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}}}),c$7.prototype.add=function(e){var t=new n$I(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t},c$7.prototype.remove=function(e){return!!this.contains(e)&&(this._billboards[e._index]=null,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},c$7.prototype.removeAll=function(){te(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},c$7.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},c$7.prototype.contains=function(e){return e$2b(e)&&e._billboardCollection===this},c$7.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return W$3(this),this._billboards[e]};var H=new i$11;function re(e,t,i,n,r){var o,a=n[m$6.positionHighAndScale],s=n[m$6.positionLowAndRotation],l=r._getActualPosition();e._mode===C$13.SCENE3D&&(i$1c.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),i$11.fromCartesian(l,H);var u=r.scale,c=r.rotation;0!==c&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,u);var h=H.high,d=H.low;e._instanced?(a(o=r._index,h.x,h.y,h.z,u),s(o,d.x,d.y,d.z,c)):(a((o=4*r._index)+0,h.x,h.y,h.z,u),a(o+1,h.x,h.y,h.z,u),a(o+2,h.x,h.y,h.z,u),a(o+3,h.x,h.y,h.z,u),s(o+0,d.x,d.y,d.z,c),s(o+1,d.x,d.y,d.z,c),s(o+2,d.x,d.y,d.z,c),s(o+3,d.x,d.y,d.z,c))}function De(e,t,i,n,r){var o,a=n[m$6.volTexCoord],s=0,l=0,u=0;e$2b(r._volTexCoord)&&(s=r._volTexCoord.x,l=r._volTexCoord.y,u=r._volTexCoord.z),e._instanced?a(o=r._index,s,l,u,0):(a((o=4*r._index)+0,s,l,u,0),a(o+1,s,l,u,0),a(o+2,s,l,u,0),a(o+3,s,l,u,0))}function be(e,t,i,n,r){re(e,t,i,n,r),De(e,t,i,n,r)}function G$1(e,t,i,n,r,o){var a;n.mode===C$13.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=n$I._computeActualPosition(u,c,n,r);e$2b(h)&&(u._setActualPosition(h),o?s.push(h):i$1c.expand(a,h,a))}o&&i$1c.fromPoints(s,a)}function Ce(e,t){var i=t.mode,n=e._billboards,r=e._billboardsToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==C$13.SCENE3D&&!p$1d.equals(o,e.modelMatrix)?(e._mode=i,p$1d.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===C$13.SCENE3D||i===C$13.SCENE2D||i===C$13.COLUMBUS_VIEW)&&G$1(e,n,n.length,t,o,!0)):i===C$13.MORPHING?G$1(e,n,n.length,t,o,!0):(i===C$13.SCENE2D||i===C$13.COLUMBUS_VIEW)&&G$1(e,r,e._billboardsToUpdateIndex,t,o,!1)}function Ve$2(e){var t=e._volumeShaderPredefine,i=e.volumeShaderPredefine;if(!e$2b(t)||t.length!==i.length)return!0;for(var n=0;n<i.length;n++)if(t[n]!=i[n])return!0;return!1}var Ee=[],Module;c$7.prototype.update=function(e){W$3(this);var t=this._billboards,i=t.length,n=e.context;this._instanced=n.instancedArrays,m$6=this._instanced?ge:Ae$1,z$2=this._instanced?Te:ye;var r=this._textureAtlas;if(!e$2b(r)){r=this._textureAtlas=new v$I({context:n});for(var o=0;o<i;++o)t[o]._loadImage()}var a=r.textureCoordinates;if(0!==a.length){Ce(this,e),i=(t=this._billboards).length;var s=this._billboardsToUpdate,l=this._billboardsToUpdateIndex,u=this._propertiesChanged,c=r.guid,h=this._createVertexArray||this._textureAtlasGUID!==c;this._textureAtlasGUID=c;var d,f=e.passes;if(f.pick,h){this._createVertexArray=!1;for(var p=0;p<ee;++p)u[p]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),i>0){this._vaf=Se(n,i,this._instanced,this._batchTable),d=this._vaf.writers;for(var _=0;_<i;++_){var m=this._billboards[_];m._dirty=!1,be(this,n,a,d,m)}this._vaf.commit(z$2(n))}this._billboardsToUpdateIndex=0}else if(l>0){var g=Ee;g.length=0,u[me]&&g.push(re);var x=g.length;if(d=this._vaf.writers,l/i>.1){for(var v=0;v<l;++v){var y=s[v];y._dirty=!1;for(var $=0;$<x;++$)g[$](this,n,a,d,y)}this._vaf.commit(z$2(n))}else{for(var b=0;b<l;++b){var T=s[b];T._dirty=!1;for(var C=0;C<x;++C)g[C](this,n,a,d,T);this._instanced?this._vaf.subCommit(T._index,1):this._vaf.subCommit(4*T._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(l>1.5*i&&(s.length=i),e$2b(this._vaf)&&e$2b(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,i$1c.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var S,w=p$1d.IDENTITY;e.mode===C$13.SCENE3D?(w=this.modelMatrix,S=i$1c.clone(this._baseVolumeWC,this._boundingVolume)):S=i$1c.clone(this._baseVolume2D,this._boundingVolume);var E=this._transparent!==this.transparent;this._transparent=this.transparent;var P,A,L=Ve$2(this);if(this._volumeShaderPredefine=this.volumeShaderPredefine,E&&(this._rsTranslucent=d$1m.fromCache({depthTest:{enabled:!1,func:de$x.LESS},depthMask:!this._transparent,blending:Ee$r.ALPHA_BLEND})),E||L)P=new s$U({defines:this._volumeShaderPredefine,sources:[ve]}),this._instanced&&P.defines.push("INSTANCED"),A=new s$U({defines:this._volumeShaderPredefine,sources:[pe]}),this._transparent&&A.defines.push("OIT"),this._sp=r$13.replaceCache({context:n,shaderProgram:this._sp,vertexShaderSource:P,fragmentShaderSource:A,attributeLocations:m$6});var M=e.commandList;if(f.render||f.pick){var R=this._colorCommands,I=this._vaf.va,O=I.length,D=this._uniforms;R.length=O;for(var B=0;B<O;++B){var N=R[B];e$2b(N)||(N=R[B]=new i$_),N.pass=Le$s.Voxel_Billboard,N.boundingVolume=S,N.modelMatrix=w,N.count=I[B].indicesCount,N.shaderProgram=this._sp,N.uniformMap=D,N.vertexArray=I[B].va,N.renderState=this._rsTranslucent,N.debugShowBoundingVolume=this.debugShowBoundingVolume,this._instanced&&(N.count=6,N.instanceCount=i),M.push(N)}}}}},c$7.prototype.isDestroyed=function(){return!1},c$7.prototype.destroy=function(){return e$2b(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),te(this._billboards),i$10(this)},Module||(Module=(typeof Module<"u"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1,nodeFS,nodePath;if(Module.ENVIRONMENT)if("WEB"===Module.ENVIRONMENT)ENVIRONMENT_IS_WEB=!0;else if("WORKER"===Module.ENVIRONMENT)ENVIRONMENT_IS_WORKER=!0;else if("NODE"===Module.ENVIRONMENT)ENVIRONMENT_IS_NODE=!0;else{if("SHELL"!==Module.ENVIRONMENT)throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");ENVIRONMENT_IS_SHELL=!0}else ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"function"==typeof require&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE)Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn),Module.read=function(e,t){nodeFS||(nodeFS=require("fs")),nodePath||(nodePath=require("path")),e=nodePath.normalize(e);var i=nodeFS.readFileSync(e);return t?i:i.toString()},Module.readBinary=function(e){var t=Module.read(e,!0);return t.buffer||(t=new Uint8Array(t)),assert(t.buffer),t},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),process.on("uncaughtException",(function(e){if(!(e instanceof ExitStatus))throw e})),Module.inspect=function(){return"[Emscripten Module object]"};else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<"u"&&(Module.printErr=printErr),typeof read<"u"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(e){if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));var t=read(e,"binary");return assert("object"==typeof t),t},typeof scriptArgs<"u"?Module.arguments=scriptArgs:typeof arguments<"u"&&(Module.arguments=arguments),"function"==typeof quit&&(Module.quit=function(e,t){quit(e)});else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw"Unknown runtime environment. Where are we?";if(Module.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),Module.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},typeof arguments<"u"&&(Module.arguments=arguments),typeof console<"u")Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<"u"?function(e){dump(e)}:function(e){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>"u"&&(Module.setWindowTitle=function(e){document.title=e})}function globalEval(e){eval.call(null,e)}for(var key in!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(e,t){throw t}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[],moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(e){return tempRet0=e,e},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(e){STACKTOP=e},getNativeTypeSize:function(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":case"float":return 4;case"i64":case"double":return 8;default:if("*"===e[e.length-1])return Runtime.QUANTUM_SIZE;if("i"===e[0]){var t=parseInt(e.substr(1));return assert(t%8==0),t/8}return 0}},getNativeFieldSize:function(e){return Math.max(Runtime.getNativeTypeSize(e),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(e,t){return"double"===t||"i64"===t?7&e&&(assert(4==(7&e)),e+=4):assert(0==(3&e)),e},getAlignSize:function(e,t,i){return i||"i64"!=e&&"double"!=e?e?Math.min(t||(e?Runtime.getNativeFieldSize(e):0),Runtime.QUANTUM_SIZE):Math.min(t,8):8},dynCall:function(e,t,i){return i&&i.length?Module["dynCall_"+e].apply(null,[t].concat(i)):Module["dynCall_"+e].call(null,t)},functionPointers:[],addFunction:function(e){for(var t=0;t<Runtime.functionPointers.length;t++)if(!Runtime.functionPointers[t])return Runtime.functionPointers[t]=e,2*(1+t);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},removeFunction:function(e){Runtime.functionPointers[(e-2)/2]=null},warnOnce:function(e){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[e]||(Runtime.warnOnce.shown[e]=1,Module.printErr(e))},funcWrappers:{},getFuncWrapper:function(e,t){assert(t),Runtime.funcWrappers[t]||(Runtime.funcWrappers[t]={});var i=Runtime.funcWrappers[t];return i[e]||(1===t.length?i[e]=function(){return Runtime.dynCall(t,e)}:2===t.length?i[e]=function(i){return Runtime.dynCall(t,e,[i])}:i[e]=function(){return Runtime.dynCall(t,e,Array.prototype.slice.call(arguments))}),i[e]},getCompilerSetting:function(e){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},stackAlloc:function(e){var t=STACKTOP;return STACKTOP=(STACKTOP=STACKTOP+e|0)+15&-16,t},staticAlloc:function(e){var t=STATICTOP;return STATICTOP=(STATICTOP=STATICTOP+e|0)+15&-16,t},dynamicAlloc:function(e){var t=HEAP32[DYNAMICTOP_PTR>>2],i=-16&(t+e+15|0);if((HEAP32[DYNAMICTOP_PTR>>2]=i,i>=TOTAL_MEMORY)&&!enlargeMemory())return HEAP32[DYNAMICTOP_PTR>>2]=t,0;return t},alignMemory:function(e,t){return e=Math.ceil(e/(t||16))*(t||16)},makeBigInt:function(e,t,i){return i?+(e>>>0)+4294967296*+(t>>>0):+(e>>>0)+4294967296*+(0|t)},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,cwrap,ccall;function assert(e,t){e||abort("Assertion failed: "+t)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(e){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}function setValue(e,t,i,n){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":HEAP8[e>>0]=t;break;case"i16":HEAP16[e>>1]=t;break;case"i32":HEAP32[e>>2]=t;break;case"i64":tempI64=[t>>>0,(tempDouble=t,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=t;break;case"double":HEAPF64[e>>3]=t;break;default:abort("invalid type for setValue: "+i)}}function getValue(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return HEAP8[e>>0];case"i16":return HEAP16[e>>1];case"i32":case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];default:abort("invalid type for setValue: "+t)}return null}(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(e){var t=Runtime.stackAlloc(e.length);return writeArrayToMemory(e,t),t},stringToC:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);stringToUTF8(e,t=Runtime.stackAlloc(i),i)}return t}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,t,i,n,r){var o=getCFunc(e),a=[],s=0;if(n)for(var l=0;l<n.length;l++){var u=toC[i[l]];u?(0===s&&(s=Runtime.stackSave()),a[l]=u(n[l])):a[l]=n[l]}var c=o.apply(null,a);if("string"===t&&(c=Pointer_stringify(c)),0!==s){if(r&&r.async)return void EmterpreterAsync.asyncFinalizers.push((function(){Runtime.stackRestore(s)}));Runtime.stackRestore(s)}return c};var sourceRegex=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(e){var t=e.toString().match(sourceRegex).slice(1);return{arguments:t[0],body:t[1],returnValue:t[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource)for(var e in JSsource={},JSfuncs)JSfuncs.hasOwnProperty(e)&&(JSsource[e]=parseJSFunc(JSfuncs[e]))}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every((function(e){return"number"===e})),numericRet="string"!==returnType;if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map((function(e,t){return"$"+t})),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if("number"!==type){var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";",funcstr+=convertCode.body+";",funcstr+=arg+"=("+convertCode.returnValue+");"}}}var cfuncname=parseJSFunc((function(){return cfunc})).returnValue;if(funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");",!numericRet){var strgfy=parseJSFunc((function(){return Pointer_stringify})).returnValue;funcstr+="ret = "+strgfy+"(ret);"}return numericArgs||(ensureJSsource(),funcstr+=JSsource.stackRestore.body.replace("()","(stack)")+";"),funcstr+="return ret})",eval(funcstr)}})(),Module.ccall=ccall,Module.cwrap=cwrap,Module.setValue=setValue,Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;function allocate(e,t,i,n){var r,o;"number"==typeof e?(r=!0,o=e):(r=!1,o=e.length);var a,s="string"==typeof t?t:null;if(a=i==ALLOC_NONE?n:["function"==typeof _malloc?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][void 0===i?ALLOC_STATIC:i](Math.max(o,s?1:t.length)),r){var l;n=a;for(assert(0==(3&a)),l=a+(-4&o);n<l;n+=4)HEAP32[n>>2]=0;for(l=a+o;n<l;)HEAP8[n++>>0]=0;return a}if("i8"===s)return e.subarray||e.slice?HEAPU8.set(e,a):HEAPU8.set(new Uint8Array(e),a),a;for(var u,c,h,d=0;d<o;){var f=e[d];("function"==typeof f&&(f=Runtime.getFunctionIndex(f)),0!==(u=s||t[d]))?("i64"==u&&(u="i32"),setValue(a+d,f,u),h!==u&&(c=Runtime.getNativeTypeSize(u),h=u),d+=c):d++}return a}function getMemory(e){return staticSealed?runtimeInitialized?_malloc(e):Runtime.dynamicAlloc(e):Runtime.staticAlloc(e)}function Pointer_stringify(e,t){if(0===t||!e)return"";for(var i,n=0,r=0;n|=i=HEAPU8[e+r>>0],(0!=i||t)&&(r++,!t||r!=t););t||(t=r);var o="";if(n<128){for(var a,s=1024;t>0;)a=String.fromCharCode.apply(String,HEAPU8.subarray(e,e+Math.min(t,s))),o=o?o+a:a,e+=s,t-=s;return o}return Module.UTF8ToString(e)}function AsciiToString(e){for(var t="";;){var i=HEAP8[e++>>0];if(!i)return t;t+=String.fromCharCode(i)}}function stringToAscii(e,t){return writeAsciiToMemory(e,t,!1)}Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE,Module.allocate=allocate,Module.getMemory=getMemory,Module.Pointer_stringify=Pointer_stringify,Module.AsciiToString=AsciiToString,Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(e,t){for(var i=t;e[i];)++i;if(i-t>16&&e.subarray&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,i));for(var n,r,o,a,s,l="";;){if(!(n=e[t++]))return l;if(128&n)if(r=63&e[t++],192!=(224&n))if(o=63&e[t++],224==(240&n)?n=(15&n)<<12|r<<6|o:(a=63&e[t++],240==(248&n)?n=(7&n)<<18|r<<12|o<<6|a:(s=63&e[t++],248==(252&n)?n=(3&n)<<24|r<<18|o<<12|a<<6|s:n=(1&n)<<30|r<<24|o<<18|a<<12|s<<6|63&e[t++])),n<65536)l+=String.fromCharCode(n);else{var u=n-65536;l+=String.fromCharCode(55296|u>>10,56320|1023&u)}else l+=String.fromCharCode((31&n)<<6|r);else l+=String.fromCharCode(n)}}function UTF8ToString(e){return UTF8ArrayToString(HEAPU8,e)}function stringToUTF8Array(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else if(s<=2097151){if(i+3>=o)break;t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}else if(s<=67108863){if(i+4>=o)break;t[i++]=248|s>>24,t[i++]=128|s>>18&63,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+5>=o)break;t[i++]=252|s>>30,t[i++]=128|s>>24&63,t[i++]=128|s>>18&63,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r}function stringToUTF8(e,t,i){return stringToUTF8Array(e,HEAPU8,t,i)}function lengthBytesUTF8(e){for(var t=0,i=0;i<e.length;++i){var n=e.charCodeAt(i);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++i)),n<=127?++t:t+=n<=2047?2:n<=65535?3:n<=2097151?4:n<=67108863?5:6}return t}function demangle(e){var t=Module.___cxa_demangle||Module.__cxa_demangle;if(t){try{var i=e.substr(1),n=lengthBytesUTF8(i)+1,r=_malloc(n);stringToUTF8(i,r,n);var o=_malloc(4),a=t(r,0,0,o);if(0===getValue(o,"i32")&&a)return Pointer_stringify(a)}catch{}finally{r&&_free(r),o&&_free(o),a&&_free(a)}return e}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function demangleAll(e){return e.replace(/__Z[\w\d_]+/g,(function(e){var t=demangle(e);return e===t?e:e+" ["+t+"]"}))}function jsStackTrace(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function stackTrace(){var e=jsStackTrace();return Module.extraStackTrace&&(e+="\n"+Module.extraStackTrace()),demangleAll(e)}Module.UTF8ArrayToString=UTF8ArrayToString,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8Array=stringToUTF8Array,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,typeof TextDecoder<"u"&&new TextDecoder("utf-16le"),Module.stackTrace=stackTrace;var WASM_PAGE_SIZE=65536,ASMJS_PAGE_SIZE=16777216,MIN_TOTAL_MEMORY=16777216,HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR,byteLength;function alignUp(e,t){return e%t>0&&(e+=t-e%t),e}function updateGlobalBuffer(e){Module.buffer=buffer=e}function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){var e=Module.usingWasm?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE,t=2147483648-e;if(HEAP32[DYNAMICTOP_PTR>>2]>t)return!1;var i=TOTAL_MEMORY;for(TOTAL_MEMORY=Math.max(TOTAL_MEMORY,MIN_TOTAL_MEMORY);TOTAL_MEMORY<HEAP32[DYNAMICTOP_PTR>>2];)TOTAL_MEMORY=TOTAL_MEMORY<=536870912?alignUp(2*TOTAL_MEMORY,e):Math.min(alignUp((3*TOTAL_MEMORY+2147483648)/4,e),t);var n=Module.reallocBuffer(TOTAL_MEMORY);return n&&n.byteLength==TOTAL_MEMORY?(updateGlobalBuffer(n),updateGlobalBufferViews(),!0):(TOTAL_MEMORY=i,!1)}STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1,Module.reallocBuffer||(Module.reallocBuffer=function(e){var t;try{if(ArrayBuffer.transfer)t=ArrayBuffer.transfer(buffer,e);else{var i=HEAP8;t=new ArrayBuffer(e),new Int8Array(t).set(i)}}catch{return!1}return!!_emscripten_replace_memory(t)&&t});try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get),byteLength(new ArrayBuffer(4))}catch(d){byteLength=function(e){return e.byteLength}}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216;function getTotalMemory(){return TOTAL_MEMORY}if(TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),buffer=Module.buffer?Module.buffer:new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews(),HEAP32[0]=1668509029,HEAP16[1]=25459,115!==HEAPU8[2]||99!==HEAPU8[3])throw"Runtime error: expected the system to be little-endian!";function callRuntimeCallbacks(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?Module.dynCall_v(i):Module.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}}Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__)}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPreMain(e){__ATMAIN__.unshift(e)}function addOnExit(e){__ATEXIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}function intArrayFromString(e,t,i){var n=i>0?i:lengthBytesUTF8(e)+1,r=new Array(n),o=stringToUTF8Array(e,r,0,r.length);return t&&(r.length=o),r}function intArrayToString(e){for(var t=[],i=0;i<e.length;i++){var n=e[i];n>255&&(n&=255),t.push(String.fromCharCode(n))}return t.join("")}function writeStringToMemory(e,t,i){var n,r;Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!"),i&&(r=t+lengthBytesUTF8(e),n=HEAP8[r]),stringToUTF8(e,t,1/0),i&&(HEAP8[r]=n)}function writeArrayToMemory(e,t){HEAP8.set(e,t)}function writeAsciiToMemory(e,t,i){for(var n=0;n<e.length;++n)HEAP8[t++>>0]=e.charCodeAt(n);i||(HEAP8[t>>0]=0)}Module.addOnPreRun=addOnPreRun,Module.addOnInit=addOnInit,Module.addOnPreMain=addOnPreMain,Module.addOnExit=addOnExit,Module.addOnPostRun=addOnPostRun,Module.intArrayFromString=intArrayFromString,Module.intArrayToString=intArrayToString,Module.writeStringToMemory=writeStringToMemory,Module.writeArrayToMemory=writeArrayToMemory,Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||-5!==Math.imul(4294967295,5))&&(Math.imul=function(e,t){var i=65535&e,n=65535&t;return i*n+((e>>>16)*n+i*(t>>>16)<<16)|0}),Math.imul=Math.imul,Math.clz32||(Math.clz32=function(e){e>>>=0;for(var t=0;t<32;t++)if(e&1<<31-t)return t;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_min=Math.min,runDependencies=0,dependenciesFulfilled=null;function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={},STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+6192,__ATINIT__.push(),allocate([228,2,0,0,81,16,0,0,12,3,0,0,177,16,0,0,32,0,0,0,0,0,0,0,12,3,0,0,94,16,0,0,48,0,0,0,0,0,0,0,228,2,0,0,127,16,0,0,12,3,0,0,140,16,0,0,16,0,0,0,0,0,0,0,12,3,0,0,183,17,0,0,32,0,0,0,0,0,0,0,12,3,0,0,147,17,0,0,72,0,0,0,0,0,0,0,108,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,32,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,1,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,40,20,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,16,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,56,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,37,115,40,37,117,41,58,32,65,115,115,101,114,116,105,111,110,32,102,97,105,108,117,114,101,58,32,34,37,115,34,10,0,109,95,115,105,122,101,32,60,61,32,109,95,99,97,112,97,99,105,116,121,0,46,47,105,110,99,92,99,114,110,95,100,101,99,111,109,112,46,104,0,109,105,110,95,110,101,119,95,99,97,112,97,99,105,116,121,32,60,32,40,48,120,55,70,70,70,48,48,48,48,85,32,47,32,101,108,101,109,101,110,116,95,115,105,122,101,41,0,110,101,119,95,99,97,112,97,99,105,116,121,32,38,38,32,40,110,101,119,95,99,97,112,97,99,105,116,121,32,62,32,109,95,99,97,112,97,99,105,116,121,41,0,110,117,109,95,99,111,100,101,115,91,99,93,0,115,111,114,116,101,100,95,112,111,115,32,60,32,116,111,116,97,108,95,117,115,101,100,95,115,121,109,115,0,112,67,111,100,101,115,105,122,101,115,91,115,121,109,95,105,110,100,101,120,93,32,61,61,32,99,111,100,101,115,105,122,101,0,116,32,60,32,40,49,85,32,60,60,32,116,97,98,108,101,95,98,105,116,115,41,0,109,95,108,111,111,107,117,112,91,116,93,32,61,61,32,99,85,73,78,84,51,50,95,77,65,88,0,99,114,110,100,95,109,97,108,108,111,99,58,32,115,105,122,101,32,116,111,111,32,98,105,103,0,99,114,110,100,95,109,97,108,108,111,99,58,32,111,117,116,32,111,102,32,109,101,109,111,114,121,0,40,40,117,105,110,116,51,50,41,112,95,110,101,119,32,38,32,40,67,82,78,68,95,77,73,78,95,65,76,76,79,67,95,65,76,73,71,78,77,69,78,84,32,45,32,49,41,41,32,61,61,32,48,0,99,114,110,100,95,114,101,97,108,108,111,99,58,32,98,97,100,32,112,116,114,0,99,114,110,100,95,102,114,101,101,58,32,98,97,100,32,112,116,114,0,102,97,108,115,101,0,40,116,111,116,97,108,95,115,121,109,115,32,62,61,32,49,41,32,38,38,32,40,116,111,116,97,108,95,115,121,109,115,32,60,61,32,112,114,101,102,105,120,95,99,111,100,105,110,103,58,58,99,77,97,120,83,117,112,112,111,114,116,101,100,83,121,109,115,41,0,17,18,19,20,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,16,48,0,110,117,109,95,98,105,116,115,32,60,61,32,51,50,85,0,109,95,98,105,116,95,99,111,117,110,116,32,60,61,32,99,66,105,116,66,117,102,83,105,122,101,0,116,32,33,61,32,99,85,73,78,84,51,50,95,77,65,88,0,109,111,100,101,108,46,109,95,99,111,100,101,95,115,105,122,101,115,91,115,121,109,93,32,61,61,32,108,101,110,0,0,2,3,1,0,2,3,4,5,6,7,1,40,108,101,110,32,62,61,32,49,41,32,38,38,32,40,108,101,110,32,60,61,32,99,77,97,120,69,120,112,101,99,116,101,100,67,111,100,101,83,105,122,101,41,0,105,32,60,32,109,95,115,105,122,101,0,110,101,120,116,95,108,101,118,101,108,95,111,102,115,32,62,32,99,117,114,95,108,101,118,101,108,95,111,102,115,0,1,2,2,3,3,3,3,4,0,0,0,0,0,0,1,1,0,1,0,1,0,0,1,2,1,2,0,0,0,1,0,2,1,0,2,0,0,1,2,3,110,117,109,32,38,38,32,40,110,117,109,32,61,61,32,126,110,117,109,95,99,104,101,99,107,41,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,83,116,57,101,120,99,101,112,116,105,111,110,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,83,116,57,116,121,112,101,95,105,110,102,111,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;function _abort(){Module.abort()}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}STATICTOP+=16;var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function(e){if(!e||EXCEPTIONS.infos[e])return e;for(var t in EXCEPTIONS.infos){if(EXCEPTIONS.infos[t].adjusted===e)return t}return e},addRef:function(e){e&&EXCEPTIONS.infos[e].refcount++},decRef:function(e){if(e){var t=EXCEPTIONS.infos[e];assert(t.refcount>0),t.refcount--,0===t.refcount&&!t.rethrown&&(t.destructor&&Module.dynCall_vi(t.destructor,e),delete EXCEPTIONS.infos[e],___cxa_free_exception(e))}},clearRef:function(e){e&&(EXCEPTIONS.infos[e].refcount=0)}};function ___cxa_begin_catch(e){var t=EXCEPTIONS.infos[e];return t&&!t.caught&&(t.caught=!0,__ZSt18uncaught_exceptionv.uncaught_exception--),t&&(t.rethrown=!1),EXCEPTIONS.caught.push(e),EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(e)),e}function _pthread_once(e,t){_pthread_once.seen||(_pthread_once.seen={}),!(e in _pthread_once.seen)&&(Module.dynCall_v(t),_pthread_once.seen[e]=1)}function _emscripten_memcpy_big(e,t,i){return HEAPU8.set(HEAPU8.subarray(t,t+i),e),e}var SYSCALLS={varargs:0,get:function(e){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(){return Pointer_stringify(SYSCALLS.get())},get64:function(){var e=SYSCALLS.get(),t=SYSCALLS.get();return assert(e>=0?0===t:-1===t),e},getZero:function(){assert(0===SYSCALLS.get())}};function ___syscall6(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.getStreamFromFD();return FS.close(i),0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC),PTHREAD_SPECIFIC={};function _pthread_getspecific(e){return PTHREAD_SPECIFIC[e]||0}function ___setErrNo(e){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=e),e}var PTHREAD_SPECIFIC_NEXT_KEY=1,ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _pthread_key_create(e,t){return 0==e?ERRNO_CODES.EINVAL:(HEAP32[e>>2]=PTHREAD_SPECIFIC_NEXT_KEY,PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0,PTHREAD_SPECIFIC_NEXT_KEY++,0)}function ___resumeException(e){throw EXCEPTIONS.last||(EXCEPTIONS.last=e),e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var e=EXCEPTIONS.last;if(!e)return Runtime.setTempRet0(0),0;var t=EXCEPTIONS.infos[e],i=t.type;if(!i)return Runtime.setTempRet0(0),0|e;var n=Array.prototype.slice.call(arguments);Module.___cxa_is_pointer_type(i),___cxa_find_matching_catch.buffer||(___cxa_find_matching_catch.buffer=_malloc(4)),HEAP32[___cxa_find_matching_catch.buffer>>2]=e,e=___cxa_find_matching_catch.buffer;for(var r=0;r<n.length;r++)if(n[r]&&Module.___cxa_can_catch(n[r],i,e))return e=HEAP32[e>>2],t.adjusted=e,Runtime.setTempRet0(n[r]),0|e;return e=HEAP32[e>>2],Runtime.setTempRet0(i),0|e}function ___gxx_personality_v0(){}function _pthread_setspecific(e,t){return e in PTHREAD_SPECIFIC?(PTHREAD_SPECIFIC[e]=t,0):ERRNO_CODES.EINVAL}function ___syscall140(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.getStreamFromFD(),n=(SYSCALLS.get(),SYSCALLS.get()),r=SYSCALLS.get(),o=SYSCALLS.get(),a=n;return FS.llseek(i,a,o),HEAP32[r>>2]=i.position,i.getdents&&0===a&&0===o&&(i.getdents=null),0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function ___syscall146(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.get(),n=SYSCALLS.get(),r=SYSCALLS.get(),o=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(e,t){var i=___syscall146.buffers[e];assert(i),0===t||10===t?((1===e?Module.print:Module.printErr)(UTF8ArrayToString(i,0)),i.length=0):i.push(t)});for(var a=0;a<r;a++){for(var s=HEAP32[n+8*a>>2],l=HEAP32[n+(8*a+4)>>2],u=0;u<l;u++)___syscall146.printChar(i,HEAPU8[s+u]);o+=l}return o}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function ___syscall54(e,t){SYSCALLS.varargs=t;try{return 0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function invoke_iiii(e,t,i,n){try{return Module.dynCall_iiii(e,t,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiiii(e,t,i,n,r,o){try{Module.dynCall_viiiii(e,t,i,n,r,o)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_vi(e,t){try{Module.dynCall_vi(e,t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_ii(e,t){try{return Module.dynCall_ii(e,t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viii(e,t,i,n){try{Module.dynCall_viii(e,t,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_v(e){try{Module.dynCall_v(e)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiiiii(e,t,i,n,r,o,a){try{Module.dynCall_viiiiii(e,t,i,n,r,o,a)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiii(e,t,i,n,r){try{Module.dynCall_viiii(e,t,i,n,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}__ATEXIT__.push((function(){var e=Module._fflush;e&&e(0);var t=___syscall146.printChar;if(t){var i=___syscall146.buffers;i[1].length&&t(1,10),i[2].length&&t(2,10)}})),DYNAMICTOP_PTR=allocate(1,"i32",ALLOC_STATIC),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX),HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE,staticSealed=!0,Module.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:1/0,byteLength:byteLength},Module.asmLibraryArg={abort:abort,assert:assert,enlargeMemory:enlargeMemory,getTotalMemory:getTotalMemory,abortOnCannotGrowMemory:abortOnCannotGrowMemory,invoke_iiii:invoke_iiii,invoke_viiiii:invoke_viiiii,invoke_vi:invoke_vi,invoke_ii:invoke_ii,invoke_viii:invoke_viii,invoke_v:invoke_v,invoke_viiiiii:invoke_viiiiii,invoke_viiii:invoke_viiii,_pthread_getspecific:_pthread_getspecific,___syscall54:___syscall54,_pthread_setspecific:_pthread_setspecific,___gxx_personality_v0:___gxx_personality_v0,___syscall6:___syscall6,___setErrNo:___setErrNo,_abort:_abort,___cxa_begin_catch:___cxa_begin_catch,_pthread_once:_pthread_once,_emscripten_memcpy_big:_emscripten_memcpy_big,_pthread_key_create:_pthread_key_create,___syscall140:___syscall140,___resumeException:___resumeException,___cxa_find_matching_catch:___cxa_find_matching_catch,___syscall146:___syscall146,__ZSt18uncaught_exceptionv:__ZSt18uncaught_exceptionv,DYNAMICTOP_PTR:DYNAMICTOP_PTR,tempDoublePtr:tempDoublePtr,ABORT:ABORT,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX,cttz_i8:cttz_i8};var asm=function(e,t,i){var n=e.Int8Array,r=new n(i),o=e.Int16Array,a=new o(i),s=e.Int32Array,l=new s(i),u=e.Uint8Array,c=new u(i),h=e.Uint16Array,d=new h(i),f=e.Uint32Array;new f(i);var p=e.Float32Array;new p(i);var _=e.Float64Array,m=new _(i),g=e.byteLength,x=0|t.DYNAMICTOP_PTR,v=0|t.tempDoublePtr;t.ABORT;var y=0|t.STACKTOP;t.STACK_MAX;var $=0|t.cttz_i8;e.NaN,e.Infinity;var b=0;e.Math.floor,e.Math.abs,e.Math.sqrt,e.Math.pow,e.Math.cos,e.Math.sin,e.Math.tan,e.Math.acos,e.Math.asin,e.Math.atan,e.Math.atan2,e.Math.exp,e.Math.log,e.Math.ceil;var T=e.Math.imul;e.Math.min,e.Math.max;var C=e.Math.clz32,S=t.abort;t.assert;var w=t.enlargeMemory,E=t.getTotalMemory,P=t.abortOnCannotGrowMemory;t.invoke_iiii,t.invoke_viiiii,t.invoke_vi,t.invoke_ii,t.invoke_viii,t.invoke_v,t.invoke_viiiiii,t.invoke_viiii;var A=t._pthread_getspecific,L=t.___syscall54,M=t._pthread_setspecific;t.___gxx_personality_v0;var R=t.___syscall6,I=t.___setErrNo,O=t._abort;t.___cxa_begin_catch;var D=t._pthread_once,B=t._emscripten_memcpy_big,N=t._pthread_key_create,F=t.___syscall140;t.___resumeException,t.___cxa_find_matching_catch;var U=t.___syscall146;function z(e){e|=0;var t,i=0,n=0,r=0,o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,v=0,$=0,b=0,T=0;t=y,y=y+16|0,p=t;do{if(e>>>0<245){if(e=(h=e>>>0<11?16:e+11&-8)>>>3,3&(n=(f=0|l[1144])>>>e)|0)return r=0|l[(n=(e=4616+((i=(1&n^1)+e|0)<<1<<2)|0)+8|0)>>2],(0|e)==(0|(a=0|l[(o=r+8|0)>>2]))?l[1144]=f&~(1<<i):(l[a+12>>2]=e,l[n>>2]=a),T=i<<3,l[r+4>>2]=3|T,l[(T=r+T+4|0)>>2]=1|l[T>>2],y=t,0|(T=o);if(h>>>0>(d=0|l[1146])>>>0){if(0|n)return i=((i=n<<e&((i=2<<e)|0-i))&0-i)-1|0,o=0|l[(e=(i=4616+((r=((n=(i>>>=s=i>>>12&16)>>>5&8)|s|(o=(i>>>=n)>>>2&4)|(e=(i>>>=o)>>>1&2)|(r=(i>>>=e)>>>1&1))+(i>>>r)|0)<<1<<2)|0)+8|0)>>2],(0|i)==(0|(n=0|l[(s=o+8|0)>>2]))?(e=f&~(1<<r),l[1144]=e):(l[n+12>>2]=i,l[e>>2]=n,e=f),a=(r<<3)-h|0,l[o+4>>2]=3|h,l[(r=o+h|0)+4>>2]=1|a,l[r+a>>2]=a,0|d&&(o=0|l[1149],n=4616+((i=d>>>3)<<1<<2)|0,e&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=o,l[i+12>>2]=o,l[o+8>>2]=i,l[o+12>>2]=n),l[1146]=a,l[1149]=r,y=t,0|(T=s);if(u=0|l[1145]){if(n=(u&0-u)-1|0,e=0|l[4880+(((a=(n>>>=s=n>>>12&16)>>>5&8)|s|(c=(n>>>=a)>>>2&4)|(r=(n>>>=c)>>>1&2)|(e=(n>>>=r)>>>1&1))+(n>>>e)<<2)>>2],n=(-8&l[e+4>>2])-h|0,r=0|l[e+16+((0==(0|l[e+16>>2])&1)<<2)>>2]){do{n=(c=(s=(-8&l[r+4>>2])-h|0)>>>0<n>>>0)?s:n,e=c?r:e,r=0|l[r+16+((0==(0|l[r+16>>2])&1)<<2)>>2]}while(0!=(0|r));c=e,a=n}else c=e,a=n;if(c>>>0<(s=c+h|0)>>>0){o=0|l[c+24>>2],i=0|l[c+12>>2];do{if((0|i)==(0|c)){if(!(i=0|l[(e=c+20|0)>>2])&&!(i=0|l[(e=c+16|0)>>2])){n=0;break}for(;;)if(0|(r=0|l[(n=i+20|0)>>2]))i=r,e=n;else{if(!(r=0|l[(n=i+16|0)>>2]))break;i=r,e=n}l[e>>2]=0,n=i}else n=0|l[c+8>>2],l[n+12>>2]=i,l[i+8>>2]=n,n=i}while(0);do{if(0|o){if(i=0|l[c+28>>2],(0|c)==(0|l[(e=4880+(i<<2)|0)>>2])){if(l[e>>2]=n,!n){l[1145]=u&~(1<<i);break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|c)&1)<<2)>>2]=n,!n)break;l[n+24>>2]=o,0|(i=0|l[c+16>>2])&&(l[n+16>>2]=i,l[i+24>>2]=n),0|(i=0|l[c+20>>2])&&(l[n+20>>2]=i,l[i+24>>2]=n)}}while(0);return a>>>0<16?(T=a+h|0,l[c+4>>2]=3|T,l[(T=c+T+4|0)>>2]=1|l[T>>2]):(l[c+4>>2]=3|h,l[s+4>>2]=1|a,l[s+a>>2]=a,0|d&&(r=0|l[1149],n=4616+((i=d>>>3)<<1<<2)|0,f&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=f|i,i=n,e=n+8|0),l[e>>2]=r,l[i+12>>2]=r,l[r+8>>2]=i,l[r+12>>2]=n),l[1146]=a,l[1149]=s),y=t,0|(T=c+8|0)}f=h}else f=h}else f=h}else if(e>>>0<=4294967231)if(h=-8&(e=e+11|0),c=0|l[1145]){r=0-h|0,(e>>>=8)?h>>>0>16777215?u=31:u=h>>>((u=14-((d=((b=e<<(f=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|f|(u=((b<<=d)+245760|0)>>>16&2))+(b<<u>>>15)|0)+7|0)&1|u<<1:u=0,n=0|l[4880+(u<<2)>>2];e:do{if(n)for(e=0,s=h<<(31==(0|u)?0:25-(u>>>1)|0),a=0;;){if((o=(-8&l[n+4>>2])-h|0)>>>0<r>>>0){if(!o){e=n,r=0,o=n,b=61;break e}e=n,r=o}if(a=0==(0|(o=0|l[n+20>>2]))|(0|o)==(0|(n=0|l[n+16+(s>>>31<<2)>>2]))?a:o,o=0==(0|n)){n=a,b=57;break}s<<=1&(1^o)}else n=0,e=0,b=57}while(0);if(57==(0|b)){if(0==(0|n)&0==(0|e)){if(!(e=c&((e=2<<u)|0-e))){f=h;break}f=(e&0-e)-1|0,e=0,n=0|l[4880+(((a=(f>>>=s=f>>>12&16)>>>5&8)|s|(u=(f>>>=a)>>>2&4)|(d=(f>>>=u)>>>1&2)|(n=(f>>>=d)>>>1&1))+(f>>>n)<<2)>>2]}n?(o=n,b=61):(u=e,s=r)}if(61==(0|b))for(;;){if(b=0,n=(f=(n=(-8&l[o+4>>2])-h|0)>>>0<r>>>0)?n:r,e=f?o:e,!(o=0|l[o+16+((0==(0|l[o+16>>2])&1)<<2)>>2])){u=e,s=n;break}r=n,b=61}if(0!=(0|u)&&s>>>0<((0|l[1146])-h|0)>>>0){if(u>>>0>=(a=u+h|0)>>>0)return y=t,0|(T=0);o=0|l[u+24>>2],i=0|l[u+12>>2];do{if((0|i)==(0|u)){if(!(i=0|l[(e=u+20|0)>>2])&&!(i=0|l[(e=u+16|0)>>2])){i=0;break}for(;;)if(0|(r=0|l[(n=i+20|0)>>2]))i=r,e=n;else{if(!(r=0|l[(n=i+16|0)>>2]))break;i=r,e=n}l[e>>2]=0}else T=0|l[u+8>>2],l[T+12>>2]=i,l[i+8>>2]=T}while(0);do{if(o){if(e=0|l[u+28>>2],(0|u)==(0|l[(n=4880+(e<<2)|0)>>2])){if(l[n>>2]=i,!i){r=c&~(1<<e),l[1145]=r;break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|u)&1)<<2)>>2]=i,!i){r=c;break}l[i+24>>2]=o,0|(e=0|l[u+16>>2])&&(l[i+16>>2]=e,l[e+24>>2]=i),(e=0|l[u+20>>2])&&(l[i+20>>2]=e,l[e+24>>2]=i),r=c}else r=c}while(0);do{if(s>>>0>=16){if(l[u+4>>2]=3|h,l[a+4>>2]=1|s,l[a+s>>2]=s,i=s>>>3,s>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=a,l[i+12>>2]=a,l[a+8>>2]=i,l[a+12>>2]=n;break}if((i=s>>>8)?s>>>0>16777215?i=31:i=s>>>((i=14-(($=((T=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(i=((T<<=$)+245760|0)>>>16&2))+(T<<i>>>15)|0)+7|0)&1|i<<1:i=0,n=4880+(i<<2)|0,l[a+28>>2]=i,l[(e=a+16|0)+4>>2]=0,l[e>>2]=0,!(r&(e=1<<i))){l[1145]=r|e,l[n>>2]=a,l[a+24>>2]=n,l[a+12>>2]=a,l[a+8>>2]=a;break}for(e=s<<(31==(0|i)?0:25-(i>>>1)|0),n=0|l[n>>2];;){if((-8&l[n+4>>2]|0)==(0|s)){b=97;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=96;break}e<<=1,n=i}if(96==(0|b)){l[r>>2]=a,l[a+24>>2]=n,l[a+12>>2]=a,l[a+8>>2]=a;break}if(97==(0|b)){T=0|l[(b=n+8|0)>>2],l[T+12>>2]=a,l[b>>2]=a,l[a+8>>2]=T,l[a+12>>2]=n,l[a+24>>2]=0;break}}else T=s+h|0,l[u+4>>2]=3|T,l[(T=u+T+4|0)>>2]=1|l[T>>2]}while(0);return y=t,0|(T=u+8|0)}f=h}else f=h;else f=-1}while(0);if((n=0|l[1146])>>>0>=f>>>0)return i=n-f|0,e=0|l[1149],i>>>0>15?(T=e+f|0,l[1149]=T,l[1146]=i,l[T+4>>2]=1|i,l[T+i>>2]=i,l[e+4>>2]=3|f):(l[1146]=0,l[1149]=0,l[e+4>>2]=3|n,l[(T=e+n+4|0)>>2]=1|l[T>>2]),y=t,0|(T=e+8|0);if((s=0|l[1147])>>>0>f>>>0)return $=s-f|0,l[1147]=$,b=(T=0|l[1150])+f|0,l[1150]=b,l[b+4>>2]=1|$,l[T+4>>2]=3|f,y=t,0|(T=T+8|0);if(0|l[1262]?e=0|l[1264]:(l[1264]=4096,l[1263]=4096,l[1265]=-1,l[1266]=-1,l[1267]=0,l[1255]=0,e=-16&p^1431655768,l[p>>2]=e,l[1262]=e,e=4096),u=f+48|0,(h=(a=e+(c=f+47|0)|0)&(o=0-e|0))>>>0<=f>>>0||0|(e=0|l[1254])&&(p=(d=0|l[1252])+h|0)>>>0<=d>>>0|p>>>0>e>>>0)return y=t,0|(T=0);e:do{if(4&l[1255])i=0,b=133;else{n=0|l[1150];t:do{if(n){for(r=5024;!((e=0|l[r>>2])>>>0<=n>>>0&&(g=r+4|0,(e+(0|l[g>>2])|0)>>>0>n>>>0));){if(!(e=0|l[r+8>>2])){b=118;break t}r=e}if((i=a-s&o)>>>0<2147483647)if((0|(e=0|Se(0|i)))==((0|l[r>>2])+(0|l[g>>2])|0)){if(-1!=(0|e)){s=i,a=e,b=135;break e}}else r=e,b=126;else i=0}else b=118}while(0);do{if(118==(0|b))if(-1!=(0|(n=0|Se(0)))&&(i=n,m=(i=(0==((m=(_=0|l[1263])+-1|0)&i|0)?0:(m+i&0-_)-i|0)+h|0)+(_=0|l[1252])|0,i>>>0>f>>>0&i>>>0<2147483647)){if(0|(g=0|l[1254])&&m>>>0<=_>>>0|m>>>0>g>>>0){i=0;break}if((0|(e=0|Se(0|i)))==(0|n)){s=i,a=n,b=135;break e}r=e,b=126}else i=0}while(0);do{if(126==(0|b)){if(n=0-i|0,!(u>>>0>i>>>0&i>>>0<2147483647&-1!=(0|r))){if(-1==(0|r)){i=0;break}s=i,a=r,b=135;break e}if((e=c-i+(e=0|l[1264])&0-e)>>>0>=2147483647){s=i,a=r,b=135;break e}if(-1==(0|Se(0|e))){Se(0|n),i=0;break}s=e+i|0,a=r,b=135;break e}}while(0);l[1255]=4|l[1255],b=133}}while(0);if(133==(0|b)&&h>>>0<2147483647&&!(-1==(0|($=0|Se(0|h)))|1^(v=(x=(g=0|Se(0))-$|0)>>>0>(f+40|0)>>>0)|$>>>0<g>>>0&-1!=(0|$)&-1!=(0|g)^1)&&(s=v?x:i,a=$,b=135),135==(0|b)){i=(0|l[1252])+s|0,l[1252]=i,i>>>0>(0|l[1253])>>>0&&(l[1253]=i),c=0|l[1150];do{if(c){for(i=5024;;){if((0|a)==((e=0|l[i>>2])+(r=0|l[(n=i+4|0)>>2])|0)){b=145;break}if(!(o=0|l[i+8>>2]))break;i=o}if(145==(0|b)&&0==(8&l[i+12>>2]|0)&&c>>>0<a>>>0&c>>>0>=e>>>0){l[n>>2]=r+s,b=c+(T=0==(7&(T=c+8|0)|0)?0:0-T&7)|0,T=(0|l[1147])+(s-T)|0,l[1150]=b,l[1147]=T,l[b+4>>2]=1|T,l[b+T+4>>2]=40,l[1151]=l[1266];break}for(a>>>0<(0|l[1148])>>>0&&(l[1148]=a),n=a+s|0,i=5024;;){if((0|l[i>>2])==(0|n)){b=153;break}if(!(e=0|l[i+8>>2]))break;i=e}if(153==(0|b)&&0==(8&l[i+12>>2]|0)){l[i>>2]=a,l[(d=i+4|0)>>2]=(0|l[d>>2])+s,h=(d=a+(0==(7&(d=a+8|0)|0)?0:0-d&7)|0)+f|0,u=(i=n+(0==(7&(i=n+8|0)|0)?0:0-i&7)|0)-d-f|0,l[d+4>>2]=3|f;do{if((0|i)!=(0|c)){if((0|i)==(0|l[1149])){T=(0|l[1146])+u|0,l[1146]=T,l[1149]=h,l[h+4>>2]=1|T,l[h+T>>2]=T;break}if(1==(3&(e=0|l[i+4>>2])|0)){s=-8&e,r=e>>>3;e:do{if(e>>>0<256){if(e=0|l[i+8>>2],(0|(n=0|l[i+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<r);break}l[e+12>>2]=n,l[n+8>>2]=e;break}a=0|l[i+24>>2],e=0|l[i+12>>2];do{if((0|e)==(0|i)){if(!(e=0|l[(n=(r=i+16|0)+4|0)>>2])){if(!(e=0|l[r>>2])){e=0;break}n=r}for(;;)if(0|(o=0|l[(r=e+20|0)>>2]))e=o,n=r;else{if(!(o=0|l[(r=e+16|0)>>2]))break;e=o,n=r}l[n>>2]=0}else T=0|l[i+8>>2],l[T+12>>2]=e,l[e+8>>2]=T}while(0);if(!a)break;r=4880+((n=0|l[i+28>>2])<<2)|0;do{if((0|i)==(0|l[r>>2])){if(l[r>>2]=e,0|e)break;l[1145]=l[1145]&~(1<<n);break e}if(l[a+16+(((0|l[a+16>>2])!=(0|i)&1)<<2)>>2]=e,!e)break e}while(0);if(l[e+24>>2]=a,0|(r=0|l[(n=i+16|0)>>2])&&(l[e+16>>2]=r,l[r+24>>2]=e),!(n=0|l[n+4>>2]))break;l[e+20>>2]=n,l[n+24>>2]=e}while(0);i=i+s|0,o=s+u|0}else o=u;if(l[(i=i+4|0)>>2]=-2&l[i>>2],l[h+4>>2]=1|o,l[h+o>>2]=o,i=o>>>3,o>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=h,l[i+12>>2]=h,l[h+8>>2]=i,l[h+12>>2]=n;break}i=o>>>8;do{if(i){if(o>>>0>16777215){i=31;break}i=o>>>((i=14-(($=((T=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(i=((T<<=$)+245760|0)>>>16&2))+(T<<i>>>15)|0)+7|0)&1|i<<1}else i=0}while(0);if(r=4880+(i<<2)|0,l[h+28>>2]=i,l[(e=h+16|0)+4>>2]=0,l[e>>2]=0,!((e=0|l[1145])&(n=1<<i))){l[1145]=e|n,l[r>>2]=h,l[h+24>>2]=r,l[h+12>>2]=h,l[h+8>>2]=h;break}for(e=o<<(31==(0|i)?0:25-(i>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|o)){b=194;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=193;break}e<<=1,n=i}if(193==(0|b)){l[r>>2]=h,l[h+24>>2]=n,l[h+12>>2]=h,l[h+8>>2]=h;break}if(194==(0|b)){T=0|l[(b=n+8|0)>>2],l[T+12>>2]=h,l[b>>2]=h,l[h+8>>2]=T,l[h+12>>2]=n,l[h+24>>2]=0;break}}else T=(0|l[1147])+u|0,l[1147]=T,l[1150]=h,l[h+4>>2]=1|T}while(0);return y=t,0|(T=d+8|0)}for(i=5024;!((e=0|l[i>>2])>>>0<=c>>>0&&(T=e+(0|l[i+4>>2])|0,T>>>0>c>>>0));)i=0|l[i+8>>2];i=(e=(e=(o=T+-47|0)+(0==(7&(e=o+8|0)|0)?0:0-e&7)|0)>>>0<(o=c+16|0)>>>0?c:e)+8|0,b=a+(n=0==(7&(n=a+8|0)|0)?0:0-n&7)|0,n=s+-40-n|0,l[1150]=b,l[1147]=n,l[b+4>>2]=1|n,l[b+n+4>>2]=40,l[1151]=l[1266],l[(n=e+4|0)>>2]=27,l[i>>2]=l[1256],l[i+4>>2]=l[1257],l[i+8>>2]=l[1258],l[i+12>>2]=l[1259],l[1256]=a,l[1257]=s,l[1259]=0,l[1258]=i,i=e+24|0;do{b=i,l[(i=i+4|0)>>2]=7}while((b+8|0)>>>0<T>>>0);if((0|e)!=(0|c)){if(a=e-c|0,l[n>>2]=-2&l[n>>2],l[c+4>>2]=1|a,l[e>>2]=a,i=a>>>3,a>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=c,l[i+12>>2]=c,l[c+8>>2]=i,l[c+12>>2]=n;break}if((i=a>>>8)?a>>>0>16777215?n=31:n=a>>>((n=14-(($=((T=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(n=((T<<=$)+245760|0)>>>16&2))+(T<<n>>>15)|0)+7|0)&1|n<<1:n=0,r=4880+(n<<2)|0,l[c+28>>2]=n,l[c+20>>2]=0,l[o>>2]=0,!((i=0|l[1145])&(e=1<<n))){l[1145]=i|e,l[r>>2]=c,l[c+24>>2]=r,l[c+12>>2]=c,l[c+8>>2]=c;break}for(e=a<<(31==(0|n)?0:25-(n>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|a)){b=216;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=215;break}e<<=1,n=i}if(215==(0|b)){l[r>>2]=c,l[c+24>>2]=n,l[c+12>>2]=c,l[c+8>>2]=c;break}if(216==(0|b)){T=0|l[(b=n+8|0)>>2],l[T+12>>2]=c,l[b>>2]=c,l[c+8>>2]=T,l[c+12>>2]=n,l[c+24>>2]=0;break}}}else{0==(0|(T=0|l[1148]))|a>>>0<T>>>0&&(l[1148]=a),l[1256]=a,l[1257]=s,l[1259]=0,l[1153]=l[1262],l[1152]=-1,i=0;do{l[(T=4616+(i<<1<<2)|0)+12>>2]=T,l[T+8>>2]=T,i=i+1|0}while(32!=(0|i));b=a+(T=0==(7&(T=a+8|0)|0)?0:0-T&7)|0,T=s+-40-T|0,l[1150]=b,l[1147]=T,l[b+4>>2]=1|T,l[b+T+4>>2]=40,l[1151]=l[1266]}}while(0);if((i=0|l[1147])>>>0>f>>>0)return $=i-f|0,l[1147]=$,b=(T=0|l[1150])+f|0,l[1150]=b,l[b+4>>2]=1|$,l[T+4>>2]=3|f,y=t,0|(T=T+8|0)}return T=0|tt(),l[T>>2]=12,y=t,0|(T=0)}function G(e,t,i,n,o,a){e|=0,t=+t,i|=0,n|=0,o|=0,a|=0;var s,u=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,v=0,$=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,I=0,O=0;s=y,y=y+560|0,d=s+8|0,I=O=s+524|0,f=s+512|0,l[($=s)>>2]=0,R=f+12|0,Fe(t),(0|b)<0?(t=-t,L=1,A=2087):(L=0!=(2049&o|0)&1,A=0==(2048&o|0)?0==(1&o|0)?2088:2093:2090),Fe(t),M=2146435072&b;do{if(M>>>0<2146435072|2146435072==(0|M)&!1){if((u=0!=(g=2*+et(t,$)))&&(l[$>>2]=(0|l[$>>2])-1),97==(0|(S=32|a))){m=0==(0|(x=32&a))?A:A+9|0,_=2|L,u=12-n|0;do{if(!(n>>>0>11|0==(0|u))){t=8;do{u=u+-1|0,t*=16}while(0!=(0|u));if(45==(0|r[m>>0])){t=-(t+(-g-t));break}t=g+t-t;break}t=g}while(0);(0|(u=0|xe(u=(0|(h=0|l[$>>2]))<0?0-h|0:h,((0|u)<0)<<31>>31,R)))==(0|R)&&(r[(u=f+11|0)>>0]=48),r[u+-1>>0]=43+(h>>31&2),r[(p=u+-2|0)>>0]=a+15,f=(0|n)<1,d=0==(8&o|0),u=O;do{M=~~t,h=u+1|0,r[u>>0]=c[2122+M>>0]|x,t=16*(t-+(0|M)),1!=(h-I|0)||d&f&0==t?u=h:(r[h>>0]=46,u=u+2|0)}while(0!=t);M=u-I|0,be(e,32,i,u=(I=R-p|0)+_+(R=0!=(0|n)&(M+-2|0)<(0|n)?n+2|0:M)|0,o),Ve(e,m,_),be(e,48,i,u,65536^o),Ve(e,O,M),be(e,48,R-M|0,0,0),Ve(e,p,I),be(e,32,i,u,8192^o);break}h=(0|n)<0?6:n,u?(u=(0|l[$>>2])-28|0,l[$>>2]=u,t=268435456*g):(t=g,u=0|l[$>>2]),d=M=(0|u)<0?d:d+288|0;do{E=~~t>>>0,l[d>>2]=E,d=d+4|0,t=1e9*(t-+(E>>>0))}while(0!=t);if((0|u)>0)for(f=M,_=d;;){if(p=(0|u)<29?u:29,(u=_+-4|0)>>>0>=f>>>0){d=0;do{C=0|Me(0|(w=0|Ue(0|(w=0|Oe(0|l[u>>2],0,0|p)),0|b,0|d,0)),0|(E=b),1e9,0),l[u>>2]=C,d=0|je(0|w,0|E,1e9,0),u=u+-4|0}while(u>>>0>=f>>>0);d&&(l[(f=f+-4|0)>>2]=d)}for(d=_;!(d>>>0<=f>>>0)&&!(0|l[(u=d+-4|0)>>2]);)d=u;if(u=(0|l[$>>2])-p|0,l[$>>2]=u,!((0|u)>0))break;_=d}else f=M;if((0|u)<0){n=1+((h+25|0)/9|0)|0,v=102==(0|S);do{if(x=(0|(x=0-u|0))<9?x:9,f>>>0<d>>>0){p=(1<<x)-1|0,_=1e9>>>x,m=0,u=f;do{E=0|l[u>>2],l[u>>2]=(E>>>x)+m,m=0|T(E&p,_),u=u+4|0}while(u>>>0<d>>>0);u=0==(0|l[f>>2])?f+4|0:f,m?(l[d>>2]=m,f=u,u=d+4|0):(f=u,u=d)}else f=0==(0|l[f>>2])?f+4|0:f,u=d;d=(u-(d=v?M:f)>>2|0)>(0|n)?d+(n<<2)|0:u,u=(0|l[$>>2])+x|0,l[$>>2]=u}while((0|u)<0);u=f,n=d}else u=f,n=d;if(E=M,u>>>0<n>>>0){if(d=9*(E-u>>2)|0,(p=0|l[u>>2])>>>0>=10){f=10;do{f=10*f|0,d=d+1|0}while(p>>>0>=f>>>0)}}else d=0;if((0|(f=h-(102!=(0|S)?d:0)+(((C=0!=(0|h))&(v=103==(0|S)))<<31>>31)|0))<((9*(n-E>>2)|0)-9|0)){if(x=M+4+(((0|(f=f+9216|0))/9|0)-1024<<2)|0,(0|(f=1+((0|f)%9|0)|0))<9){p=10;do{p=10*p|0,f=f+1|0}while(9!=(0|f))}else p=10;if((f=(x+4|0)==(0|n))&0==(0|(m=((_=0|l[x>>2])>>>0)%(p>>>0)|0)))f=x;else if(g=0==(1&((_>>>0)/(p>>>0)|0)|0)?9007199254740992:9007199254740994,t=m>>>0<(w=(0|p)/2|0)>>>0?.5:f&(0|m)==(0|w)?1:1.5,L&&(t=(w=45==(0|r[A>>0]))?-t:t,g=w?-g:g),f=_-m|0,l[x>>2]=f,g+t!=g){if(w=f+p|0,l[x>>2]=w,w>>>0>999999999)for(d=x;f=d+-4|0,l[d>>2]=0,f>>>0<u>>>0&&(l[(u=u+-4|0)>>2]=0),w=1+(0|l[f>>2])|0,l[f>>2]=w,w>>>0>999999999;)d=f;else f=x;if(d=9*(E-u>>2)|0,(_=0|l[u>>2])>>>0>=10){p=10;do{p=10*p|0,d=d+1|0}while(_>>>0>=p>>>0)}}else f=x;f=n>>>0>(f=f+4|0)>>>0?f:n,w=u}else f=n,w=u;for(S=f;;){if(S>>>0<=w>>>0){$=0;break}if(0|l[(u=S+-4|0)>>2]){$=1;break}S=u}n=0-d|0;do{if(v){if((0|(u=(1&(1^C))+h|0))>(0|d)&(0|d)>-5?(p=a+-1|0,h=u+-1-d|0):(p=a+-2|0,h=u+-1|0),!(u=8&o)){if($&&0!=(0|(P=0|l[S+-4>>2])))if((P>>>0)%10|0)f=0;else{f=0,u=10;do{u=10*u|0,f=f+1|0}while(!(0|(P>>>0)%(u>>>0)))}else f=9;if(u=(9*(S-E>>2)|0)-9|0,102==(32|p)){h=(0|h)<(0|(x=(0|(x=u-f|0))>0?x:0))?h:x,x=0;break}h=(0|h)<(0|(x=(0|(x=u+d-f|0))>0?x:0))?h:x,x=0;break}x=u}else p=a,x=8&o}while(0);if(_=0!=(0|(v=h|x))&1,m=102==(32|p))C=0,u=(0|d)>0?d:0;else{if(((f=R)-(u=0|xe(u=(0|d)<0?n:d,((0|u)<0)<<31>>31,R))|0)<2)do{r[(u=u+-1|0)>>0]=48}while((f-u|0)<2);r[u+-1>>0]=43+(d>>31&2),r[(u=u+-2|0)>>0]=p,C=u,u=f-u|0}if(be(e,32,i,u=L+1+h+_+u|0,o),Ve(e,A,L),be(e,48,i,u,65536^o),m){_=x=O+9|0,m=O+8|0,f=p=w>>>0>M>>>0?M:w;do{if(d=0|xe(0|l[f>>2],0,x),(0|f)==(0|p))(0|d)==(0|x)&&(r[m>>0]=48,d=m);else if(d>>>0>O>>>0){de(0|O,48,d-I|0);do{d=d+-1|0}while(d>>>0>O>>>0)}Ve(e,d,_-d|0),f=f+4|0}while(f>>>0<=M>>>0);if(0|v&&Ve(e,2138,1),f>>>0<S>>>0&(0|h)>0)for(;;){if((d=0|xe(0|l[f>>2],0,x))>>>0>O>>>0){de(0|O,48,d-I|0);do{d=d+-1|0}while(d>>>0>O>>>0)}if(Ve(e,d,(0|h)<9?h:9),d=h+-9|0,!((f=f+4|0)>>>0<S>>>0&(0|h)>9)){h=d;break}h=d}be(e,48,h+9|0,9,0)}else{if(v=$?S:w+4|0,(0|h)>-1){x=0==(0|x),n=$=O+9|0,_=0-I|0,m=O+8|0,p=w;do{(0|(d=0|xe(0|l[p>>2],0,$)))==(0|$)&&(r[m>>0]=48,d=m);do{if((0|p)==(0|w)){if(f=d+1|0,Ve(e,d,1),x&(0|h)<1){d=f;break}Ve(e,2138,1),d=f}else{if(d>>>0<=O>>>0)break;de(0|O,48,d+_|0);do{d=d+-1|0}while(d>>>0>O>>>0)}}while(0);Ve(e,d,(0|h)>(0|(I=n-d|0))?I:h),h=h-I|0,p=p+4|0}while(p>>>0<v>>>0&(0|h)>-1)}be(e,48,h+18|0,18,0),Ve(e,C,R-C|0)}be(e,32,i,u,8192^o)}else O=0!=(32&a|0),be(e,32,i,u=L+3|0,-65537&o),Ve(e,A,L),Ve(e,t!=t|!1?O?2114:2118:O?2106:2110,3),be(e,32,i,u,8192^o)}while(0);return y=s,0|((0|u)<(0|i)?i:u)}function V(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0,o|=0;var s,u,c,h,d,f,p,_,g,x=0,v=0,$=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,I=0;g=y,y=y+64|0,f=g,I=g+24|0,p=g+8|0,_=g+20|0,l[(d=g+16|0)>>2]=t,s=0!=(0|e),c=u=I+40|0,I=I+39|0,h=p+4|0,v=0,x=0,S=0;e:for(;;){do{if((0|x)>-1){if((0|v)>(2147483647-x|0)){x=0|tt(),l[x>>2]=75,x=-1;break}x=v+x|0;break}}while(0);if(!((v=0|r[t>>0])<<24>>24)){R=87;break}$=t;t:for(;;){switch(v<<24>>24){case 37:v=$,R=9;break t;case 0:v=$;break t}M=$+1|0,l[d>>2]=M,v=0|r[M>>0],$=M}t:do{if(9==(0|R))for(;;){if(R=0,37!=(0|r[$+1>>0]))break t;if(v=v+1|0,$=$+2|0,l[d>>2]=$,37!=(0|r[$>>0]))break;R=9}}while(0);if(v=v-t|0,s&&Ve(e,t,v),0|v)t=$;else{(v=(0|r[(T=$+1|0)>>0])-48|0)>>>0<10?(L=(M=36==(0|r[$+2>>0]))?v:-1,S=M?1:S,T=M?$+3|0:T):L=-1,l[d>>2]=T,$=((v=0|r[T>>0])<<24>>24)-32|0;t:do{if($>>>0<32)for(C=0,w=v;;){if(!(75913&(v=1<<$))){v=w;break t}if(C|=v,T=T+1|0,l[d>>2]=T,($=((v=0|r[T>>0])<<24>>24)-32|0)>>>0>=32)break;w=v}else C=0}while(0);if(v<<24>>24==42){if((v=(0|r[($=T+1|0)>>0])-48|0)>>>0<10&&36==(0|r[T+2>>0]))l[o+(v<<2)>>2]=10,v=0|l[n+((0|r[$>>0])-48<<3)>>2],S=1,T=T+3|0;else{if(0|S){x=-1;break}s?(S=3+(0|l[i>>2])&-4,v=0|l[S>>2],l[i>>2]=S+4,S=0,T=$):(v=0,S=0,T=$)}l[d>>2]=T,v=(M=(0|v)<0)?0-v|0:v,C=M?8192|C:C}else{if((0|(v=0|we(d)))<0){x=-1;break}T=0|l[d>>2]}do{if(46==(0|r[T>>0])){if(42!=(0|r[T+1>>0])){l[d>>2]=T+1,$=0|we(d),T=0|l[d>>2];break}if(($=(0|r[(w=T+2|0)>>0])-48|0)>>>0<10&&36==(0|r[T+3>>0])){l[o+($<<2)>>2]=10,$=0|l[n+((0|r[w>>0])-48<<3)>>2],T=T+4|0,l[d>>2]=T;break}if(0|S){x=-1;break e}s?(M=3+(0|l[i>>2])&-4,$=0|l[M>>2],l[i>>2]=M+4):$=0,l[d>>2]=w,T=w}else $=-1}while(0);for(A=0;;){if(((0|r[T>>0])-65|0)>>>0>57){x=-1;break e}if(M=T+1|0,l[d>>2]=M,!(((E=255&(w=0|r[(0|r[T>>0])-65+(1606+(58*A|0))>>0]))+-1|0)>>>0<8))break;A=E,T=M}if(!(w<<24>>24)){x=-1;break}P=(0|L)>-1;do{if(w<<24>>24==19){if(P){x=-1;break e}R=49}else{if(P){l[o+(L<<2)>>2]=E,L=0|l[(P=n+(L<<3)|0)+4>>2],l[(R=f)>>2]=l[P>>2],l[R+4>>2]=L,R=49;break}if(!s){x=0;break e}K(f,E,i)}}while(0);if(49!=(0|R)||(R=0,s)){T=0!=(0|A)&3==(15&(T=0|r[T>>0])|0)?-33&T:T,P=-65537&C,L=0==(8192&C|0)?C:P;t:do{switch(0|T){case 110:switch((255&A)<<24>>24){case 0:case 1:case 6:l[l[f>>2]>>2]=x,v=0,t=M;continue e;case 2:case 7:v=0|l[f>>2],l[v>>2]=x,l[v+4>>2]=((0|x)<0)<<31>>31,v=0,t=M;continue e;case 3:a[l[f>>2]>>1]=x,v=0,t=M;continue e;case 4:r[l[f>>2]>>0]=x,v=0,t=M;continue e;default:v=0,t=M;continue e}case 112:T=120,$=$>>>0>8?$:8,t=8|L,R=61;break;case 88:case 120:t=L,R=61;break;case 111:C=0,w=2070,$=0==(8&L|0)|(0|$)>(0|(P=c-(E=0|Le(t=0|l[(T=f)>>2],T=0|l[T+4>>2],u))|0))?$:P+1|0,P=L,R=67;break;case 105:case 100:if(t=0|l[(T=f)>>2],(0|(T=0|l[T+4>>2]))<0){t=0|Ne(0,0,0|t,0|T),T=b,l[(C=f)>>2]=t,l[C+4>>2]=T,C=1,w=2070,R=66;break t}C=0!=(2049&L|0)&1,w=0==(2048&L|0)?0==(1&L|0)?2070:2072:2071,R=66;break t;case 117:C=0,w=2070,t=0|l[(T=f)>>2],T=0|l[T+4>>2],R=66;break;case 99:r[I>>0]=l[f>>2],t=I,C=0,w=2070,E=u,T=1,$=P;break;case 109:T=0|tt(),T=0|ke(0|l[T>>2]),R=71;break;case 115:T=0|(T=0|l[f>>2])?T:2080,R=71;break;case 67:l[p>>2]=l[f>>2],l[h>>2]=0,l[f>>2]=p,E=-1,T=p,R=75;break;case 83:t=0|l[f>>2],$?(E=$,T=t,R=75):(be(e,32,v,0,L),t=0,R=84);break;case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:v=0|G(e,+m[f>>3],v,$,L,T),t=M;continue e;default:C=0,w=2070,E=u,T=$,$=L}}while(0);t:do{if(61==(0|R))L=f,A=0|l[L>>2],L=0|l[L+4>>2],E=0|Ee(A,L,u,32&T),w=0==(8&t|0)|0==(0|A)&0==(0|L),C=w?0:2,w=w?2070:2070+(T>>4)|0,P=t,t=A,T=L,R=67;else if(66==(0|R))E=0|xe(t,T,u),P=L,R=67;else if(71==(0|R))R=0,L=0|se(T,0,$),A=0==(0|L),t=T,C=0,w=2070,E=A?T+$|0:L,T=A?$:L-T|0,$=P;else if(75==(0|R)){for(R=0,w=T,t=0,$=0;(C=0|l[w>>2])&&!((0|($=0|We(_,C)))<0|$>>>0>(E-t|0)>>>0)&&E>>>0>(t=$+t|0)>>>0;)w=w+4|0;if((0|$)<0){x=-1;break e}if(be(e,32,v,t,L),t)for(C=0;;){if(!($=0|l[T>>2])){R=84;break t}if((0|(C=($=0|We(_,$))+C|0))>(0|t)){R=84;break t}if(Ve(e,_,$),C>>>0>=t>>>0){R=84;break}T=T+4|0}else t=0,R=84}}while(0);if(67==(0|R))R=0,L=0!=(0|$)|(T=0!=(0|t)|0!=(0|T)),T=c-E+(1&(1^T))|0,t=L?E:u,E=u,T=L?(0|$)>(0|T)?$:T:$,$=(0|$)>-1?-65537&P:P;else if(84==(0|R)){R=0,be(e,32,v,t,8192^L),v=(0|v)>(0|t)?v:t,t=M;continue}be(e,32,v=(0|v)<(0|(L=(P=(0|T)<(0|(A=E-t|0))?A:T)+C|0))?L:v,L,$),Ve(e,w,C),be(e,48,v,L,65536^$),be(e,48,P,A,0),Ve(e,t,A),be(e,32,v,L,8192^$),t=M}else v=0,t=M}}e:do{if(87==(0|R)&&!e)if(S){for(x=1;t=0|l[o+(x<<2)>>2];)if(K(n+(x<<3)|0,t,i),(0|(x=x+1|0))>=10){x=1;break e}for(;;){if(0|l[o+(x<<2)>>2]){x=-1;break e}if((0|(x=x+1|0))>=10){x=1;break}}}else x=0}while(0);return y=g,0|x}function k(e,t){t|=0;var i,n,o,a,s,u,h,d,f,p,_,m,g,x,v,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0;if(v=y,y=y+704|0,g=v+144|0,m=v+128|0,_=v+112|0,p=v+96|0,f=v+80|0,d=v+64|0,h=v+48|0,x=v+32|0,i=v+16|0,w=v,o=v+184|0,L=v+160|0,a=0|function(e,t){e|=0;var i=0,n=0,r=0,o=0,a=0,s=0,u=0,h=0;if(h=y,y=y+528|0,a=h,o=h+16|0,!(t|=0))return y=h,0|(u=0);if(t>>>0<=16)return u=0|ae(e,t),y=h,0|u;if(s=0|ae(e,t+-16|0),(0|(t=0|l[(u=e+20|0)>>2]))<16){n=e+4|0,r=e+8|0,i=e+16|0;do{(0|(e=0|l[n>>2]))==(0|l[r>>2])?e=0:(l[n>>2]=e+1,e=0|c[e>>0]),t=t+8|0,l[u>>2]=t,(0|t)>=33&&(l[a>>2]=866,l[a+4>>2]=3208,l[a+8>>2]=1366,Ie(o,812,a),$e(o),t=0|l[u>>2]),e=e<<32-t|l[i>>2],l[i>>2]=e}while((0|t)<16)}else i=e=e+16|0,e=0|l[e>>2];return l[i>>2]=e<<16,l[u>>2]=t+-16,y=h,0|(u=e>>>16|s<<16)}(e|=0,14),!a)return function(e){var t=0,i=0,n=0,o=0,a=0,s=0;if(s=y,y=y+544|0,a=s+16|0,n=s,o=s+32|0,l[(e|=0)>>2]=0,0|(i=0|l[(t=e+4|0)>>2])&&(7&i?(l[n>>2]=866,l[n+4>>2]=2506,l[n+8>>2]=1232,Ie(o,812,n),$e(o)):_e(i,0,0,1,0),l[t>>2]=0,l[e+8>>2]=0,l[e+12>>2]=0),r[e+16>>0]=0,!(t=0|l[(e=e+20|0)>>2]))return void(y=s);re(t),7&t?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1232,Ie(o,812,a),$e(o)):_e(t,0,0,1,0),l[e>>2]=0,y=s}(t),y=v,0|(L=1);if(s=t+4|0,(0|($=0|l[(u=t+8|0)>>2]))!=(0|a)){if($>>>0<=a>>>0){do{if((0|l[t+12>>2])>>>0<a>>>0){if(0|Q(s,a,($+1|0)==(0|a),1,0)){$=0|l[u>>2];break}return r[t+16>>0]=1,y=v,0|(L=0)}}while(0);de((0|l[s>>2])+$|0,0,a-$|0)}l[u>>2]=a}if(de(0|l[s>>2],0,0|a),(0|($=0|l[(n=e+20|0)>>2]))<5){C=e+4|0,S=e+8|0,T=e+16|0;do{(0|(b=0|l[C>>2]))==(0|l[S>>2])?b=0:(l[C>>2]=b+1,b=0|c[b>>0]),$=$+8|0,l[n>>2]=$,(0|$)>=33&&(l[w>>2]=866,l[w+4>>2]=3208,l[w+8>>2]=1366,Ie(o,812,w),$e(o),$=0|l[n>>2]),b=b<<32-$|l[T>>2],l[T>>2]=b}while((0|$)<5)}else T=b=e+16|0,b=0|l[b>>2];if(P=b>>>27,l[T>>2]=b<<5,l[n>>2]=$+-5,(P+-1|0)>>>0>20)return y=v,0|(L=0);l[L+20>>2]=0,l[L>>2]=0,l[L+4>>2]=0,l[L+8>>2]=0,l[L+12>>2]=0,r[L+16>>0]=0,$=L+4|0,b=L+8|0;e:do{if(0|Q($,21,0,1,0)){C=0|l[b>>2],de((E=0|l[$>>2])+C|0,0,21-C|0),l[b>>2]=21,C=e+4|0,S=e+8|0,w=e+16|0,T=0;do{if((0|($=0|l[n>>2]))<3)do{(0|(b=0|l[C>>2]))==(0|l[S>>2])?b=0:(l[C>>2]=b+1,b=0|c[b>>0]),$=$+8|0,l[n>>2]=$,(0|$)>=33&&(l[i>>2]=866,l[i+4>>2]=3208,l[i+8>>2]=1366,Ie(o,812,i),$e(o),$=0|l[n>>2]),b=b<<32-$|l[w>>2],l[w>>2]=b}while((0|$)<3);else b=0|l[w>>2];l[w>>2]=b<<3,l[n>>2]=$+-3,r[E+(0|c[1327+T>>0])>>0]=b>>>29,T=T+1|0}while((0|T)!=(0|P));if(0|ne(L)){w=e+4|0,E=e+8|0,P=e+16|0,$=0;t:do{S=a-$|0,T=0|Y(e,L);i:do{if(T>>>0<17)(0|l[u>>2])>>>0<=$>>>0&&(l[x>>2]=866,l[x+4>>2]=910,l[x+8>>2]=1497,Ie(o,812,x),$e(o)),r[(0|l[s>>2])+$>>0]=T,$=$+1|0;else switch(0|T){case 17:if((0|(b=0|l[n>>2]))<3)do{(0|(T=0|l[w>>2]))==(0|l[E>>2])?T=0:(l[w>>2]=T+1,T=0|c[T>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[h>>2]=866,l[h+4>>2]=3208,l[h+8>>2]=1366,Ie(o,812,h),$e(o),b=0|l[n>>2]),T=T<<32-b|l[P>>2],l[P>>2]=T}while((0|b)<3);else T=0|l[P>>2];if(l[P>>2]=T<<3,l[n>>2]=b+-3,b=(T=3+(T>>>29)|0)>>>0>S>>>0){$=0;break e}$=(b?0:T)+$|0;break i;case 18:if((0|(b=0|l[n>>2]))<7)do{(0|(T=0|l[w>>2]))==(0|l[E>>2])?T=0:(l[w>>2]=T+1,T=0|c[T>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[d>>2]=866,l[d+4>>2]=3208,l[d+8>>2]=1366,Ie(o,812,d),$e(o),b=0|l[n>>2]),T=T<<32-b|l[P>>2],l[P>>2]=T}while((0|b)<7);else T=0|l[P>>2];if(l[P>>2]=T<<7,l[n>>2]=b+-7,b=(T=11+(T>>>25)|0)>>>0>S>>>0){$=0;break e}$=(b?0:T)+$|0;break i;default:if((T+-19|0)>>>0>=2){A=81;break t}if(b=0|l[n>>2],19==(0|T)){if((0|b)<2)for(T=b;(0|(b=0|l[w>>2]))==(0|l[E>>2])?C=0:(l[w>>2]=b+1,C=0|c[b>>0]),b=T+8|0,l[n>>2]=b,(0|b)>=33&&(l[f>>2]=866,l[f+4>>2]=3208,l[f+8>>2]=1366,Ie(o,812,f),$e(o),b=0|l[n>>2]),T=C<<32-b|l[P>>2],l[P>>2]=T,(0|b)<2;)T=b;else T=0|l[P>>2];l[P>>2]=T<<2,T>>>=30,C=3,b=b+-2|0}else{if((0|b)<6)do{(0|(T=0|l[w>>2]))==(0|l[E>>2])?T=0:(l[w>>2]=T+1,T=0|c[T>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[p>>2]=866,l[p+4>>2]=3208,l[p+8>>2]=1366,Ie(o,812,p),$e(o),b=0|l[n>>2]),T=T<<32-b|l[P>>2],l[P>>2]=T}while((0|b)<6);else T=0|l[P>>2];l[P>>2]=T<<6,T>>>=26,C=7,b=b+-6|0}if(l[n>>2]=b,0==(0|$)|(T=T+C|0)>>>0>S>>>0){$=0;break e}if(b=$+-1|0,(0|l[u>>2])>>>0<=b>>>0&&(l[_>>2]=866,l[_+4>>2]=910,l[_+8>>2]=1497,Ie(o,812,_),$e(o)),!((C=0|r[(0|l[s>>2])+b>>0])<<24>>24)){$=0;break e}if($>>>0>=(b=T+$|0)>>>0)break i;do{(0|l[u>>2])>>>0<=$>>>0&&(l[m>>2]=866,l[m+4>>2]=910,l[m+8>>2]=1497,Ie(o,812,m),$e(o)),r[(0|l[s>>2])+$>>0]=C,$=$+1|0}while((0|$)!=(0|b));$=b}}while(0)}while(a>>>0>$>>>0);if(81==(0|A)){l[g>>2]=866,l[g+4>>2]=3149,l[g+8>>2]=1348,Ie(o,812,g),$e(o),$=0;break}$=(0|a)==(0|$)?0|ne(t):0}else $=0}else r[L+16>>0]=1,$=0}while(0);return ce(L),y=v,0|(L=$)}function W(e,t,i,n){i|=0;var o,s,u,h,f,p,_=0,m=0,g=0,x=0,v=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,I=0,O=0,D=0,B=0,N=0;if(p=y,y=y+880|0,B=p+144|0,f=p+128|0,h=p+112|0,u=p+96|0,O=p+80|0,A=p+64|0,E=p+48|0,P=p+32|0,T=p+16|0,b=p,o=p+360|0,s=p+296|0,N=p+224|0,w=p+156|0,0==(0|(t|=0))|(n|=0)>>>0>11)return y=p,0|(N=0);l[(e|=0)>>2]=t,m=(_=N)+68|0;do{l[_>>2]=0,_=_+4|0}while((0|_)<(0|m));_=0;do{m=N+((255&(D=0|r[i+_>>0]))<<2)|0,D<<24>>24&&(l[m>>2]=1+(0|l[m>>2])),_=_+1|0}while((0|_)!=(0|t));for(m=0,g=0,x=0,v=-1,$=1;(_=0|l[N+($<<2)>>2])?(l[s+((C=$+-1|0)<<2)>>2]=m,m=_+m|0,D=16-$|0,l[e+28+(C<<2)>>2]=1+(m+-1<<D|(1<<D)-1),l[e+96+(C<<2)>>2]=g,l[w+($<<2)>>2]=g,C=_+g|0,x=x>>>0>$>>>0?x:$,v=v>>>0<$>>>0?v:$):(l[e+28+($+-1<<2)>>2]=0,C=g),17!=(0|($=$+1|0));)m<<=1,g=C;l[e+4>>2]=C,m=e+172|0;do{if(C>>>0>(0|l[m>>2])>>>0){(_=C+-1|0)&C?(_|=_>>>16,_|=_>>>8,_|=_>>>4,_=(_=1+((_|=_>>>2)>>>1|_)|0)>>>0>t>>>0?t:_):_=C,l[m>>2]=_,_=0|l[(g=e+176|0)>>2];do{if(0|_){if(D=0|l[_+-4>>2],_=_+-8|0,0!=(0|D)&&(0|D)==(0|~l[_>>2])||(l[b>>2]=866,l[b+4>>2]=651,l[b+8>>2]=1579,Ie(o,812,b),$e(o)),7&_){l[T>>2]=866,l[T+4>>2]=2506,l[T+8>>2]=1232,Ie(o,812,T),$e(o);break}_e(_,0,0,1,0);break}}while(0);if(m=0|he(8+((_=0|(_=0|l[m>>2])?_:1)<<1)|0,0)){l[m+4>>2]=_,l[m>>2]=~_,l[g>>2]=m+8,S=24;break}l[g>>2]=0,n=0;break}S=24}while(0);e:do{if(24==(0|S)){r[(D=e+24|0)>>0]=v,r[e+25>>0]=x,g=e+176|0,m=0;do{_=255&(I=0|r[i+m>>0]),I<<24>>24&&(0|l[N+(_<<2)>>2]||(l[P>>2]=866,l[P+4>>2]=2276,l[P+8>>2]=977,Ie(o,812,P),$e(o)),_=0|l[(I=w+(_<<2)|0)>>2],l[I>>2]=_+1,_>>>0>=C>>>0&&(l[E>>2]=866,l[E+4>>2]=2280,l[E+8>>2]=990,Ie(o,812,E),$e(o)),a[(0|l[g>>2])+(_<<1)>>1]=m),m=m+1|0}while((0|m)!=(0|t));if(R=(0|c[D>>0])>>>0<n>>>0?n:0,l[(I=e+8|0)>>2]=R,M=0!=(0|R)){L=1<<R,_=e+164|0;do{if(L>>>0>(0|l[_>>2])>>>0){l[_>>2]=L,_=0|l[(g=e+168|0)>>2];do{if(0|_){if(P=0|l[_+-4>>2],_=_+-8|0,0!=(0|P)&&(0|P)==(0|~l[_>>2])||(l[A>>2]=866,l[A+4>>2]=651,l[A+8>>2]=1579,Ie(o,812,A),$e(o)),7&_){l[O>>2]=866,l[O+4>>2]=2506,l[O+8>>2]=1232,Ie(o,812,O),$e(o);break}_e(_,0,0,1,0);break}}while(0);if(m=0|he((_=L<<2)+8|0,0)){O=m+8|0,l[m+4>>2]=L,l[m>>2]=~L,l[g>>2]=O,m=O;break}l[g>>2]=0,n=0;break e}_=L<<2,g=m=e+168|0,m=0|l[m>>2]}while(0);de(0|m,-1,0|_),E=e+176|0,w=1;do{if(0|l[N+(w<<2)>>2]&&(A=1<<(P=R-w|0),m=0|l[s+((_=w+-1|0)<<2)>>2],_>>>0>=16&&(l[u>>2]=866,l[u+4>>2]=1960,l[u+8>>2]=1453,Ie(o,812,u),$e(o)),m>>>0<=(t=0==(0|(t=0|l[e+28+(_<<2)>>2]))?-1:(t+-1|0)>>>(16-w|0))>>>0)){C=(0|l[e+96+(_<<2)>>2])-m|0,S=w<<16;do{_=0|d[(0|l[E>>2])+(C+m<<1)>>1],(0|c[i+_>>0])!=(0|w)&&(l[h>>2]=866,l[h+4>>2]=2322,l[h+8>>2]=1019,Ie(o,812,h),$e(o)),T=m<<P,$=_|S,v=0;do{(b=v+T|0)>>>0>=L>>>0&&(l[f>>2]=866,l[f+4>>2]=2328,l[f+8>>2]=1053,Ie(o,812,f),$e(o)),_=0|l[g>>2],-1!=(0|l[_+(b<<2)>>2])&&(l[B>>2]=866,l[B+4>>2]=2330,l[B+8>>2]=1076,Ie(o,812,B),$e(o),_=0|l[g>>2]),l[_+(b<<2)>>2]=$,v=v+1|0}while(v>>>0<A>>>0);m=m+1|0}while(m>>>0<=t>>>0)}w=w+1|0}while(R>>>0>=w>>>0)}l[(_=e+96|0)>>2]=(0|l[_>>2])-(0|l[s>>2]),l[(_=e+100|0)>>2]=(0|l[_>>2])-(0|l[s+4>>2]),l[(_=e+104|0)>>2]=(0|l[_>>2])-(0|l[s+8>>2]),l[(_=e+108|0)>>2]=(0|l[_>>2])-(0|l[s+12>>2]),l[(_=e+112|0)>>2]=(0|l[_>>2])-(0|l[s+16>>2]),l[(_=e+116|0)>>2]=(0|l[_>>2])-(0|l[s+20>>2]),l[(_=e+120|0)>>2]=(0|l[_>>2])-(0|l[s+24>>2]),l[(_=e+124|0)>>2]=(0|l[_>>2])-(0|l[s+28>>2]),l[(_=e+128|0)>>2]=(0|l[_>>2])-(0|l[s+32>>2]),l[(_=e+132|0)>>2]=(0|l[_>>2])-(0|l[s+36>>2]),l[(_=e+136|0)>>2]=(0|l[_>>2])-(0|l[s+40>>2]),l[(_=e+140|0)>>2]=(0|l[_>>2])-(0|l[s+44>>2]),l[(_=e+144|0)>>2]=(0|l[_>>2])-(0|l[s+48>>2]),l[(_=e+148|0)>>2]=(0|l[_>>2])-(0|l[s+52>>2]),l[(_=e+152|0)>>2]=(0|l[_>>2])-(0|l[s+56>>2]),l[(_=e+156|0)>>2]=(0|l[_>>2])-(0|l[s+60>>2]),l[(_=e+16|0)>>2]=0,l[(m=e+20|0)>>2]=c[D>>0];t:do{if(M){do{if(!n)break t;B=n,n=n+-1|0}while(!(0|l[N+(B<<2)>>2]));if(l[_>>2]=l[e+28+(n<<2)>>2],n=R+1|0,l[m>>2]=n,n>>>0<=x>>>0){for(;!(0|l[N+(n<<2)>>2]);)if((n=n+1|0)>>>0>x>>>0)break t;l[m>>2]=n}}}while(0);l[e+92>>2]=-1,l[e+160>>2]=1048575,l[e+12>>2]=32-(0|l[I>>2]),n=1}}while(0);return y=p,0|(N=n)}function H(e){var t=0,i=0,n=0,r=0,o=0,a=0,s=0,u=0;if(e|=0){i=e+-8|0,r=0|l[1148],u=i+(t=-8&(e=0|l[e+-4>>2]))|0;do{if(1&e)s=i,a=i;else{if(n=0|l[i>>2],!(3&e)||(o=n+t|0,(a=i+(0-n)|0)>>>0<r>>>0))return;if((0|a)==(0|l[1149])){if(3!=(3&(t=0|l[(e=u+4|0)>>2])|0)){s=a,t=o;break}return l[1146]=o,l[e>>2]=-2&t,l[a+4>>2]=1|o,void(l[a+o>>2]=o)}if(i=n>>>3,n>>>0<256){if(e=0|l[a+8>>2],(0|(t=0|l[a+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<i),s=a,t=o;break}l[e+12>>2]=t,l[t+8>>2]=e,s=a,t=o;break}r=0|l[a+24>>2],e=0|l[a+12>>2];do{if((0|e)==(0|a)){if(!(e=0|l[(t=(i=a+16|0)+4|0)>>2])){if(!(e=0|l[i>>2])){e=0;break}t=i}for(;;)if(0|(n=0|l[(i=e+20|0)>>2]))e=n,t=i;else{if(!(n=0|l[(i=e+16|0)>>2]))break;e=n,t=i}l[t>>2]=0}else s=0|l[a+8>>2],l[s+12>>2]=e,l[e+8>>2]=s}while(0);if(r){if(t=0|l[a+28>>2],(0|a)==(0|l[(i=4880+(t<<2)|0)>>2])){if(l[i>>2]=e,!e){l[1145]=l[1145]&~(1<<t),s=a,t=o;break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|a)&1)<<2)>>2]=e,!e){s=a,t=o;break}l[e+24>>2]=r,0|(i=0|l[(t=a+16|0)>>2])&&(l[e+16>>2]=i,l[i+24>>2]=e),(t=0|l[t+4>>2])?(l[e+20>>2]=t,l[t+24>>2]=e,s=a,t=o):(s=a,t=o)}else s=a,t=o}}while(0);if(!(a>>>0>=u>>>0)&&1&(n=0|l[(e=u+4|0)>>2])){if(2&n)l[e>>2]=-2&n,l[s+4>>2]=1|t,l[a+t>>2]=t,r=t;else{if(e=0|l[1149],(0|u)==(0|l[1150])){if(u=(0|l[1147])+t|0,l[1147]=u,l[1150]=s,l[s+4>>2]=1|u,(0|s)!=(0|e))return;return l[1149]=0,void(l[1146]=0)}if((0|u)==(0|e))return u=(0|l[1146])+t|0,l[1146]=u,l[1149]=a,l[s+4>>2]=1|u,void(l[a+u>>2]=u);r=(-8&n)+t|0,i=n>>>3;do{if(n>>>0<256){if(t=0|l[u+8>>2],(0|(e=0|l[u+12>>2]))==(0|t)){l[1144]=l[1144]&~(1<<i);break}l[t+12>>2]=e,l[e+8>>2]=t;break}o=0|l[u+24>>2],e=0|l[u+12>>2];do{if((0|e)==(0|u)){if(!(e=0|l[(t=(i=u+16|0)+4|0)>>2])){if(!(e=0|l[i>>2])){i=0;break}t=i}for(;;)if(0|(n=0|l[(i=e+20|0)>>2]))e=n,t=i;else{if(!(n=0|l[(i=e+16|0)>>2]))break;e=n,t=i}l[t>>2]=0,i=e}else i=0|l[u+8>>2],l[i+12>>2]=e,l[e+8>>2]=i,i=e}while(0);if(0|o){if(e=0|l[u+28>>2],(0|u)==(0|l[(t=4880+(e<<2)|0)>>2])){if(l[t>>2]=i,!i){l[1145]=l[1145]&~(1<<e);break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|u)&1)<<2)>>2]=i,!i)break;l[i+24>>2]=o,0|(t=0|l[(e=u+16|0)>>2])&&(l[i+16>>2]=t,l[t+24>>2]=i),0|(e=0|l[e+4>>2])&&(l[i+20>>2]=e,l[e+24>>2]=i)}}while(0);if(l[s+4>>2]=1|r,l[a+r>>2]=r,(0|s)==(0|l[1149]))return void(l[1146]=r)}if(e=r>>>3,r>>>0<256)return i=4616+(e<<1<<2)|0,(t=0|l[1144])&(e=1<<e)?e=0|l[(t=i+8|0)>>2]:(l[1144]=t|e,e=i,t=i+8|0),l[t>>2]=s,l[e+12>>2]=s,l[s+8>>2]=e,void(l[s+12>>2]=i);(e=r>>>8)?r>>>0>16777215?e=31:e=r>>>((e=14-((o=((u=e<<(a=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(e=((u<<=o)+245760|0)>>>16&2))+(u<<e>>>15)|0)+7|0)&1|e<<1:e=0,n=4880+(e<<2)|0,l[s+28>>2]=e,l[s+20>>2]=0,l[s+16>>2]=0,t=0|l[1145],i=1<<e;do{if(t&i){for(t=r<<(31==(0|e)?0:25-(e>>>1)|0),i=0|l[n>>2];;){if((-8&l[i+4>>2]|0)==(0|r)){e=73;break}if(!(e=0|l[(n=i+16+(t>>>31<<2)|0)>>2])){e=72;break}t<<=1,i=e}if(72==(0|e)){l[n>>2]=s,l[s+24>>2]=i,l[s+12>>2]=s,l[s+8>>2]=s;break}if(73==(0|e)){u=0|l[(a=i+8|0)>>2],l[u+12>>2]=s,l[a>>2]=s,l[s+8>>2]=u,l[s+12>>2]=i,l[s+24>>2]=0;break}}else l[1145]=t|i,l[n>>2]=s,l[s+24>>2]=n,l[s+12>>2]=s,l[s+8>>2]=s}while(0);if(u=(0|l[1152])-1|0,l[1152]=u,u)return;for(e=5032;e=0|l[e>>2];)e=e+8|0;l[1152]=-1}}}function q(e,t){var i=0,n=0,r=0,o=0,a=0,s=0,u=0;u=(e|=0)+(t|=0)|0,i=0|l[e+4>>2];do{if(1&i)s=e,i=t;else{if(n=0|l[e>>2],!(3&i))return;if(a=n+t|0,(0|(o=e+(0-n)|0))==(0|l[1149])){if(3!=(3&(i=0|l[(e=u+4|0)>>2])|0)){s=o,i=a;break}return l[1146]=a,l[e>>2]=-2&i,l[o+4>>2]=1|a,void(l[o+a>>2]=a)}if(t=n>>>3,n>>>0<256){if(e=0|l[o+8>>2],(0|(i=0|l[o+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<t),s=o,i=a;break}l[e+12>>2]=i,l[i+8>>2]=e,s=o,i=a;break}r=0|l[o+24>>2],e=0|l[o+12>>2];do{if((0|e)==(0|o)){if(!(e=0|l[(i=(t=o+16|0)+4|0)>>2])){if(!(e=0|l[t>>2])){e=0;break}i=t}for(;;)if(0|(n=0|l[(t=e+20|0)>>2]))e=n,i=t;else{if(!(n=0|l[(t=e+16|0)>>2]))break;e=n,i=t}l[i>>2]=0}else s=0|l[o+8>>2],l[s+12>>2]=e,l[e+8>>2]=s}while(0);if(r){if(i=0|l[o+28>>2],(0|o)==(0|l[(t=4880+(i<<2)|0)>>2])){if(l[t>>2]=e,!e){l[1145]=l[1145]&~(1<<i),s=o,i=a;break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|o)&1)<<2)>>2]=e,!e){s=o,i=a;break}l[e+24>>2]=r,0|(t=0|l[(i=o+16|0)>>2])&&(l[e+16>>2]=t,l[t+24>>2]=e),(i=0|l[i+4>>2])?(l[e+20>>2]=i,l[i+24>>2]=e,s=o,i=a):(s=o,i=a)}else s=o,i=a}}while(0);if(2&(n=0|l[(e=u+4|0)>>2]))l[e>>2]=-2&n,l[s+4>>2]=1|i,l[s+i>>2]=i;else{if(e=0|l[1149],(0|u)==(0|l[1150])){if(u=(0|l[1147])+i|0,l[1147]=u,l[1150]=s,l[s+4>>2]=1|u,(0|s)!=(0|e))return;return l[1149]=0,void(l[1146]=0)}if((0|u)==(0|e))return u=(0|l[1146])+i|0,l[1146]=u,l[1149]=s,l[s+4>>2]=1|u,void(l[s+u>>2]=u);o=(-8&n)+i|0,t=n>>>3;do{if(n>>>0<256){if(i=0|l[u+8>>2],(0|(e=0|l[u+12>>2]))==(0|i)){l[1144]=l[1144]&~(1<<t);break}l[i+12>>2]=e,l[e+8>>2]=i;break}r=0|l[u+24>>2],e=0|l[u+12>>2];do{if((0|e)==(0|u)){if(!(e=0|l[(i=(t=u+16|0)+4|0)>>2])){if(!(e=0|l[t>>2])){t=0;break}i=t}for(;;)if(0|(n=0|l[(t=e+20|0)>>2]))e=n,i=t;else{if(!(n=0|l[(t=e+16|0)>>2]))break;e=n,i=t}l[i>>2]=0,t=e}else t=0|l[u+8>>2],l[t+12>>2]=e,l[e+8>>2]=t,t=e}while(0);if(0|r){if(e=0|l[u+28>>2],(0|u)==(0|l[(i=4880+(e<<2)|0)>>2])){if(l[i>>2]=t,!t){l[1145]=l[1145]&~(1<<e);break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|u)&1)<<2)>>2]=t,!t)break;l[t+24>>2]=r,0|(i=0|l[(e=u+16|0)>>2])&&(l[t+16>>2]=i,l[i+24>>2]=t),0|(e=0|l[e+4>>2])&&(l[t+20>>2]=e,l[e+24>>2]=t)}}while(0);if(l[s+4>>2]=1|o,l[s+o>>2]=o,(0|s)==(0|l[1149]))return void(l[1146]=o);i=o}if(e=i>>>3,i>>>0<256)return t=4616+(e<<1<<2)|0,(i=0|l[1144])&(e=1<<e)?e=0|l[(i=t+8|0)>>2]:(l[1144]=i|e,e=t,i=t+8|0),l[i>>2]=s,l[e+12>>2]=s,l[s+8>>2]=e,void(l[s+12>>2]=t);if((e=i>>>8)?i>>>0>16777215?e=31:e=i>>>((e=14-((o=((u=e<<(a=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(e=((u<<=o)+245760|0)>>>16&2))+(u<<e>>>15)|0)+7|0)&1|e<<1:e=0,r=4880+(e<<2)|0,l[s+28>>2]=e,l[s+20>>2]=0,l[s+16>>2]=0,!((t=0|l[1145])&(n=1<<e)))return l[1145]=t|n,l[r>>2]=s,l[s+24>>2]=r,l[s+12>>2]=s,void(l[s+8>>2]=s);for(t=i<<(31==(0|e)?0:25-(e>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|i)){e=69;break}if(!(e=0|l[(r=n+16+(t>>>31<<2)|0)>>2])){e=68;break}t<<=1,n=e}return 68==(0|e)?(l[r>>2]=s,l[s+24>>2]=n,l[s+12>>2]=s,void(l[s+8>>2]=s)):69==(0|e)?(u=0|l[(a=n+8|0)>>2],l[u+12>>2]=s,l[a>>2]=s,l[s+8>>2]=u,l[s+12>>2]=n,void(l[s+24>>2]=0)):void 0}function j(e,t,i,n,r){r|=0;var o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0,_=0;if(h=e|=0,a=i|=0,s=f=n|=0,!(c=u=t|=0))return o=0!=(0|r),s?o?(l[r>>2]=0|e,l[r+4>>2]=0&t,b=f=0,0|(r=0)):(b=f=0,0|(r=0)):(o&&(l[r>>2]=(h>>>0)%(a>>>0),l[r+4>>2]=0),b=f=0,0|(r=(h>>>0)/(a>>>0)>>>0));o=0==(0|s);do{if(a){if(!o){if((o=(0|C(0|s))-(0|C(0|c))|0)>>>0<=31){a=d=o+1|0,e=h>>>(d>>>0)&(t=o-31>>31)|c<<(s=31-o|0),t&=c>>>(d>>>0),o=0,s=h<<s;break}return r?(l[r>>2]=0|e,l[r+4>>2]=u|0&t,b=f=0,0|(r=0)):(b=f=0,0|(r=0))}if((o=a-1|0)&a|0){a=s=33+(0|C(0|a))-(0|C(0|c))|0,e=(d=32-s|0)-1>>31&c>>>((p=s-32|0)>>>0)|(c<<d|h>>>(s>>>0))&(t=p>>31),t&=c>>>(s>>>0),o=h<<(_=64-s|0)&(u=d>>31),s=(c<<_|h>>>(p>>>0))&u|h<<d&s-33>>31;break}return 0|r&&(l[r>>2]=o&h,l[r+4>>2]=0),1==(0|a)?(b=p=u|0&t,0|(_=0|e)):(_=0|Pe(0|a),b=p=c>>>(_>>>0)|0,0|(_=c<<32-_|h>>>(_>>>0)|0))}if(o)return 0|r&&(l[r>>2]=(c>>>0)%(a>>>0),l[r+4>>2]=0),b=p=0,0|(_=(c>>>0)/(a>>>0)>>>0);if(!h)return 0|r&&(l[r>>2]=0,l[r+4>>2]=(c>>>0)%(s>>>0)),b=p=0,0|(_=(c>>>0)/(s>>>0)>>>0);if(!((o=s-1|0)&s))return 0|r&&(l[r>>2]=0|e,l[r+4>>2]=o&c|0&t),p=0,_=c>>>((0|Pe(0|s))>>>0),b=p,0|_;if((o=(0|C(0|s))-(0|C(0|c))|0)>>>0<=30){a=t=o+1|0,e=c<<(s=31-o|0)|h>>>(t>>>0),t=c>>>(t>>>0),o=0,s=h<<s;break}return r?(l[r>>2]=0|e,l[r+4>>2]=u|0&t,b=p=0,0|(_=0)):(b=p=0,0|(_=0))}while(0);if(a){c=0|Ue(0|(d=0|i),0|(h=f|0&n),-1,-1),i=b,u=s,s=0;do{n=u,u=o>>>31|u<<1,o=s|o<<1,Ne(0|c,0|i,0|(n=e<<1|n>>>31|0),0|(f=e>>>31|t<<1|0)),s=1&(p=(_=b)>>31|((0|_)<0?-1:0)<<1),e=0|Ne(0|n,0|f,p&d|0,(((0|_)<0?-1:0)>>31|((0|_)<0?-1:0)<<1)&h|0),t=b,a=a-1|0}while(0!=(0|a));c=u,u=0}else c=s,u=0,s=0;return a=0,0|r&&(l[r>>2]=e,l[r+4>>2]=t),b=p=(0|o)>>>31|(c|a)<<1|0&(a<<1|o>>>31)|u,0|(_=-2&(o<<1|0)|s)}function Y(e,t){e|=0;var i,n,r,o,a,s,u,h,f=0,p=0,_=0,m=0,g=0,x=0;h=y,y=y+576|0,r=h+48|0,a=h+32|0,o=h+16|0,n=h,u=h+64|0,s=0|l[(t|=0)+20>>2],(0|(i=0|l[(x=e+20|0)>>2]))<24?(p=(f=0|l[(g=e+4|0)>>2])>>>0<(_=0|l[e+8>>2])>>>0,(0|i)<16?(p?(m=(0|c[f>>0])<<8,f=f+1|0):m=0,f>>>0<_>>>0?(_=0|c[f>>0],f=f+1|0):_=0,l[g>>2]=f,l[x>>2]=i+16,p=16,f=_|m):(p?(l[g>>2]=f+1,f=0|c[f>>0]):f=0,l[x>>2]=i+8,p=24),_=l[(g=e+16|0)>>2]|f<<p-i,l[g>>2]=_):(g=_=e+16|0,_=0|l[_>>2]),m=1+(_>>>16)|0;do{if(!(m>>>0<=(0|l[s+16>>2])>>>0)){for(p=0|l[s+20>>2];m>>>0>(0|l[s+28+((f=p+-1|0)<<2)>>2])>>>0;)p=p+1|0;if((f=(_>>>(32-p|0))+(0|l[s+96+(f<<2)>>2])|0)>>>0<(0|l[t>>2])>>>0){f=0|d[(0|l[s+176>>2])+(f<<1)>>1];break}return l[r>>2]=866,l[r+4>>2]=3275,l[r+8>>2]=1348,Ie(u,812,r),$e(u),y=h,0|(x=0)}-1==(0|(p=0|l[(0|l[s+168>>2])+(_>>>(32-(0|l[s+8>>2])|0)<<2)>>2]))&&(l[n>>2]=866,l[n+4>>2]=3253,l[n+8>>2]=1393,Ie(u,812,n),$e(u)),f=65535&p,p>>>=16,(0|l[t+8>>2])>>>0<=f>>>0&&(l[o>>2]=866,l[o+4>>2]=909,l[o+8>>2]=1497,Ie(u,812,o),$e(u)),(0|c[(0|l[t+4>>2])+f>>0])!=(0|p)&&(l[a>>2]=866,l[a+4>>2]=3257,l[a+8>>2]=1410,Ie(u,812,a),$e(u))}while(0);return l[g>>2]=l[g>>2]<<p,l[x>>2]=(0|l[x>>2])-p,y=h,0|(x=f)}function X(e){var t,i,n,o,a,s=0,u=0,c=0;if(a=y,y=y+576|0,c=a+48|0,n=a+32|0,i=a+16|0,t=a,o=a+64|0,l[(e|=0)>>2]=0,0|(u=0|l[(s=e+284|0)>>2])&&(7&u?(l[t>>2]=866,l[t+4>>2]=2506,l[t+8>>2]=1232,Ie(o,812,t),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+288>>2]=0,l[e+292>>2]=0),r[e+296>>0]=0,0|(u=0|l[(s=e+268|0)>>2])&&(7&u?(l[i>>2]=866,l[i+4>>2]=2506,l[i+8>>2]=1232,Ie(o,812,i),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+272>>2]=0,l[e+276>>2]=0),r[e+280>>0]=0,0|(u=0|l[(s=e+252|0)>>2])&&(7&u?(l[n>>2]=866,l[n+4>>2]=2506,l[n+8>>2]=1232,Ie(o,812,n),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+256>>2]=0,l[e+260>>2]=0),r[e+264>>0]=0,!(u=0|l[(s=e+236|0)>>2]))return r[(c=e+248|0)>>0]=0,ce(c=e+212|0),ce(c=e+188|0),ce(c=e+164|0),ce(c=e+140|0),ce(c=e+116|0),void(y=a);7&u?(l[c>>2]=866,l[c+4>>2]=2506,l[c+8>>2]=1232,Ie(o,812,c),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+240>>2]=0,l[e+244>>2]=0,r[(c=e+248|0)>>0]=0,ce(c=e+212|0),ce(c=e+188|0),ce(c=e+164|0),ce(c=e+140|0),ce(c=e+116|0),y=a}function K(e,t,i){e|=0,t|=0,i|=0;var n=0,r=0,o=0;e:do{if(t>>>0<=20){switch(0|t){case 9:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[e>>2]=t;break e;case 10:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[(n=e)>>2]=t,l[n+4>>2]=((0|t)<0)<<31>>31;break e;case 11:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[(n=e)>>2]=t,l[n+4>>2]=0;break e;case 12:n=7+(0|l[i>>2])&-8,r=0|l[(t=n)>>2],t=0|l[t+4>>2],l[i>>2]=n+8,l[(n=e)>>2]=r,l[n+4>>2]=t;break e;case 13:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,n=(65535&n)<<16>>16,l[(r=e)>>2]=n,l[r+4>>2]=((0|n)<0)<<31>>31;break e;case 14:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,l[(r=e)>>2]=65535&n,l[r+4>>2]=0;break e;case 15:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,n=(255&n)<<24>>24,l[(r=e)>>2]=n,l[r+4>>2]=((0|n)<0)<<31>>31;break e;case 16:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,l[(r=e)>>2]=255&n,l[r+4>>2]=0;break e;case 17:case 18:r=7+(0|l[i>>2])&-8,o=+m[r>>3],l[i>>2]=r+8,m[e>>3]=o;break e;default:break e}}}while(0)}function Q(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0;var o,a,s,u,c,h,d=0,f=0,p=0,_=0;if(h=y,y=y+576|0,u=h+48|0,o=h+32|0,f=h+16|0,d=h,s=h+64|0,c=h+60|0,_=(e|=0)+8|0,(0|l[(a=e+4|0)>>2])>>>0>(0|l[_>>2])>>>0&&(l[d>>2]=866,l[d+4>>2]=2123,l[d+8>>2]=845,Ie(s,812,d),$e(s)),(2147418112/(n>>>0)|0)>>>0<=t>>>0&&(l[f>>2]=866,l[f+4>>2]=2124,l[f+8>>2]=885,Ie(s,812,f),$e(s)),(d=0|l[_>>2])>>>0>=t>>>0)return y=h,0|(_=1);if(i&&0!=((p=t+-1|0)&t|0)?(t=p>>>16|p,t|=t>>>8,t|=t>>>4,(t=1+((t|=t>>>2)>>>1|t)|0)?i=9:(t=0,i=10)):i=9,9==(0|i)&&t>>>0<=d>>>0&&(i=10),10==(0|i)&&(l[o>>2]=866,l[o+4>>2]=2133,l[o+8>>2]=933,Ie(s,812,o),$e(s)),p=0|T(t,n),r)if(f=0|he(p,c)){ct[0&r](f,0|l[e>>2],0|l[a>>2]),d=0|l[e>>2];do{if(0|d){if(7&d){l[u>>2]=866,l[u+4>>2]=2506,l[u+8>>2]=1232,Ie(s,812,u),$e(s);break}_e(d,0,0,1,0);break}}while(0);l[e>>2]=f,i=20}else t=0;else d=0|function(e,t,i,n){t|=0,i|=0,n|=0;var r=0,o=0,a=0,s=0,u=0,c=0;return c=y,y=y+560|0,u=c+32|0,o=c+16|0,r=c,a=c+48|0,s=c+44|0,7&(e|=0)|0?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1210,Ie(a,812,r),$e(a),y=c,0|(u=0)):t>>>0>2147418112?(l[o>>2]=866,l[o+4>>2]=2506,l[o+8>>2]=1103,Ie(a,812,o),$e(a),y=c,0|(u=0)):(l[s>>2]=t,e=0|_e(e,t,s,n,0),0|i&&(l[i>>2]=l[s>>2]),7&e|0&&(l[u>>2]=866,l[u+4>>2]=2558,l[u+8>>2]=1156,Ie(a,812,u),$e(a)),y=c,0|(u=e))}(0|l[e>>2],p,c,1),d?(l[e>>2]=d,i=20):t=0;return 20==(0|i)&&((d=0|l[c>>2])>>>0>p>>>0&&(t=(d>>>0)/(n>>>0)|0),l[_>>2]=t,t=1),y=h,0|(_=t)}function Z(e,t,i,n,o,a,s){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0;var u=0,h=0,f=0,p=0;if(p=0|l[(e|=0)+88>>2],h=(((h=(c[p+12>>0]<<8|c[p+13>>0])>>>s)>>>0>1?h:1)+3|0)>>>2,f=(((f=(c[p+14>>0]<<8|c[p+15>>0])>>>s)>>>0>1?f:1)+3|0)>>>2,s=0|r[(p=p+18|0)>>0],s=0|T(h,s<<24>>24==0|s<<24>>24==9?8:16),a){if(!(0==(3&a|0)&s>>>0<=a>>>0))return 0|(o=0);s=a}if((0|T(s,f))>>>0>o>>>0||(a=(h+1|0)>>>1,u=(f+1|0)>>>1,!i))return 0|(o=0);switch(l[e+92>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,0|r[p>>0]){case 0:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,d,f,p,_,m,g,x,v,$,b,C,S,w,E,P,A,L,M,R,I,O,D,B,N,F,U,z,G,V,k,W,H=0,q=0,j=0,X=0,K=0,Q=0,Z=0,J=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0;if(W=y,y=y+656|0,V=W+112|0,z=W+96|0,U=W+80|0,F=W+64|0,N=W+48|0,k=W+32|0,G=W+16|0,B=W,O=W+144|0,D=W+128|0,w=0|l[(S=240+(e|=0)|0)>>2],P=0|l[(E=e+256|0)>>2],A=255&(se=0|r[17+(0|l[e+88>>2])>>0]),!(se<<24>>24))return y=W,1;M=0==(0|u),I=(R=s+-1|0)<<4,se=u+-1|0,g=0!=(1&a|0),x=n<<1,v=e+92|0,$=e+116|0,b=e+140|0,C=e+236|0,m=0!=(1&o|0),_=e+188|0,h=e+252|0,d=1+(L=n>>>2)|0,f=L+2|0,p=L+3|0,ae=0,a=0,i=0,o=1;do{if(!M)for(re=0|l[t+(ae<<2)>>2],oe=0;;){if(q=0==(0|(ie=1&oe)),te=(ie<<5^32)-16|0,ie=(ie<<1^2)-1|0,ne=g&(e=(0|oe)==(0|se)),(0|(H=q?0:R))!=(0|(ee=q?s:-1)))for(J=g&e^1,Z=q?re:re+I|0;;){1==(0|o)&&(o=512|Y(v,$)),Q=7&o,o>>>=3,q=0|c[1539+Q>>0],e=0;do{i=(K=(X=(j=(0|Y(v,b))+i|0)-w|0)>>31)&j|X&~K,(0|l[S>>2])>>>0<=i>>>0&&(l[B>>2]=866,l[B+4>>2]=910,l[B+8>>2]=1497,Ie(O,812,B),$e(O)),l[D+(e<<2)>>2]=l[(0|l[C>>2])+(i<<2)>>2],e=e+1|0}while(e>>>0<q>>>0);if(ne|(K=m&(0|H)==(0|R))){X=0;do{e=Z+(0|T(X,n))|0,j=0==(0|X)|J,q=X<<1,a=(a=(le=(ue=(0|Y(v,_))+a|0)-P|0)>>31)&ue|le&~a;do{if(K){if(!j){a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a;break}l[e>>2]=l[D+((0|c[1547+(Q<<2)+q>>0])<<2)>>2],(0|l[E>>2])>>>0<=a>>>0&&(l[z>>2]=866,l[z+4>>2]=910,l[z+8>>2]=1497,Ie(O,812,z),$e(O)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2],a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a}else j&&(l[e>>2]=l[D+((0|c[1547+(Q<<2)+q>>0])<<2)>>2],(0|l[E>>2])>>>0<=a>>>0&&(l[U>>2]=866,l[U+4>>2]=910,l[U+8>>2]=1497,Ie(O,812,U),$e(O)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2]),e=e+8|0,a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a,j&&(l[e>>2]=l[D+((0|c[1547+(Q<<2)+(1|q)>>0])<<2)>>2],(0|l[E>>2])>>>0<=a>>>0&&(l[V>>2]=866,l[V+4>>2]=910,l[V+8>>2]=1497,Ie(O,812,V),$e(O)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2])}while(0);X=X+1|0}while(2!=(0|X))}else l[Z>>2]=l[D+((0|c[1547+(Q<<2)>>0])<<2)>>2],a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[G>>2]=866,l[G+4>>2]=910,l[G+8>>2]=1497,Ie(O,812,G),$e(O)),l[Z+4>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[Z+8>>2]=l[D+((0|c[1547+(Q<<2)+1>>0])<<2)>>2],a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[k>>2]=866,l[k+4>>2]=910,l[k+8>>2]=1497,Ie(O,812,k),$e(O)),l[Z+12>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[Z+(L<<2)>>2]=l[D+((0|c[1547+(Q<<2)+2>>0])<<2)>>2],a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[N>>2]=866,l[N+4>>2]=910,l[N+8>>2]=1497,Ie(O,812,N),$e(O)),l[Z+(d<<2)>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[Z+(f<<2)>>2]=l[D+((0|c[1547+(Q<<2)+3>>0])<<2)>>2],a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[F>>2]=866,l[F+4>>2]=910,l[F+8>>2]=1497,Ie(O,812,F),$e(O)),l[Z+(p<<2)>>2]=l[(0|l[h>>2])+(a<<2)>>2];if((0|(H=ie+H|0))==(0|ee))break;Z=Z+te|0}if((0|(oe=oe+1|0))==(0|u))break;re=re+x|0}ae=ae+1|0}while((0|ae)!=(0|A));return y=W,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 4:case 6:case 5:case 3:case 2:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,g,x,v,$,b,T,C,S,w,E,P,A,L,M,R,I,O,D,B,N,F,U,z,G,V,k,W,H,q,j,X=0,K=0,Q=0,Z=0,J=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0,ce=0,he=0,de=0,fe=0,pe=0,_e=0,me=0;if(j=y,y=y+640|0,W=j+80|0,k=j+64|0,V=j+48|0,q=j+32|0,H=j+16|0,G=j,U=j+128|0,z=j+112|0,g=j+96|0,v=0|l[(x=240+(e|=0)|0)>>2],b=0|l[($=e+256|0)>>2],C=0|l[(T=e+272|0)>>2],me=0|l[e+88>>2],S=(0|c[me+63>>0])<<8|0|c[me+64>>0],w=255&(me=0|r[me+17>>0]),!(me<<24>>24))return y=j,1;E=0==(0|u),A=(P=s+-1|0)<<5,L=u+-1|0,M=n<<1,R=e+92|0,I=e+116|0,O=e+164|0,D=e+268|0,B=e+140|0,N=e+236|0,F=e+212|0,me=e+188|0,m=0==(1&o|0),_=0==(1&a|0),f=e+288|0,p=e+284|0,h=e+252|0,_e=0,e=0,a=0,o=0,i=0,X=1;do{if(!E)for(fe=0|l[t+(_e<<2)>>2],pe=0;;){if(Q=0==(0|(de=1&pe)),he=(de<<6^64)-32|0,de=(de<<1^2)-1|0,(0|(K=Q?0:P))!=(0|(ue=Q?s:-1)))for(ce=_|(0|pe)!=(0|L),le=Q?fe:fe+A|0;;){1==(0|X)&&(X=512|Y(R,I)),se=7&X,X>>>=3,Z=0|c[1539+se>>0],Q=0;do{a=(ae=(oe=(re=(0|Y(R,O))+a|0)-C|0)>>31)&re|oe&~ae,(0|l[T>>2])>>>0<=a>>>0&&(l[G>>2]=866,l[G+4>>2]=910,l[G+8>>2]=1497,Ie(U,812,G),$e(U)),l[g+(Q<<2)>>2]=d[(0|l[D>>2])+(a<<1)>>1],Q=Q+1|0}while(Q>>>0<Z>>>0);Q=0;do{i=(ae=(oe=(re=(0|Y(R,B))+i|0)-v|0)>>31)&re|oe&~ae,(0|l[x>>2])>>>0<=i>>>0&&(l[H>>2]=866,l[H+4>>2]=910,l[H+8>>2]=1497,Ie(U,812,H),$e(U)),l[z+(Q<<2)>>2]=l[(0|l[N>>2])+(i<<2)>>2],Q=Q+1|0}while(Q>>>0<Z>>>0);for(ae=m|(0|K)!=(0|P),re=0,oe=le;;){if(te=ce|0==(0|re),ie=re<<1,ae)for(J=0,ee=oe;e=(e=(Z=(ne=(0|Y(R,F))+e|0)-S|0)>>31)&ne|Z&~e,o=(o=(ne=(Z=(0|Y(R,me))+o|0)-b|0)>>31)&Z|ne&~o,te&&(Q=0|c[J+ie+(1547+(se<<2))>>0],Z=3*e|0,(0|l[f>>2])>>>0<=Z>>>0&&(l[q>>2]=866,l[q+4>>2]=910,l[q+8>>2]=1497,Ie(U,812,q),$e(U)),ne=(0|l[p>>2])+(Z<<1)|0,l[ee>>2]=(0|d[ne>>1])<<16|l[g+(Q<<2)>>2],l[ee+4>>2]=(0|d[ne+4>>1])<<16|0|d[ne+2>>1],l[ee+8>>2]=l[z+(Q<<2)>>2],(0|l[$>>2])>>>0<=o>>>0&&(l[V>>2]=866,l[V+4>>2]=910,l[V+8>>2]=1497,Ie(U,812,V),$e(U)),l[ee+12>>2]=l[(0|l[h>>2])+(o<<2)>>2]),2!=(0|(J=J+1|0));)ee=ee+16|0;else for(ne=1^te,te=1547+(se<<2)+ie|0,J=0,ee=oe;e=(e=(Z=(ie=(0|Y(R,F))+e|0)-S|0)>>31)&ie|Z&~e,o=(o=(ie=(Z=(0|Y(R,me))+o|0)-b|0)>>31)&Z|ie&~o,0!=(0|J)|ne||(Q=0|c[te>>0],Z=3*e|0,(0|l[f>>2])>>>0<=Z>>>0&&(l[k>>2]=866,l[k+4>>2]=910,l[k+8>>2]=1497,Ie(U,812,k),$e(U)),ie=(0|l[p>>2])+(Z<<1)|0,l[ee>>2]=(0|d[ie>>1])<<16|l[g+(Q<<2)>>2],l[ee+4>>2]=(0|d[ie+4>>1])<<16|0|d[ie+2>>1],l[ee+8>>2]=l[z+(Q<<2)>>2],(0|l[$>>2])>>>0<=o>>>0&&(l[W>>2]=866,l[W+4>>2]=910,l[W+8>>2]=1497,Ie(U,812,W),$e(U)),l[ee+12>>2]=l[(0|l[h>>2])+(o<<2)>>2]),2!=(0|(J=J+1|0));)ee=ee+16|0;if(2==(0|(re=re+1|0)))break;oe=oe+n|0}if((0|(K=de+K|0))==(0|ue))break;le=le+he|0}if((0|(pe=pe+1|0))==(0|u))break;fe=fe+M|0}_e=_e+1|0}while((0|_e)!=(0|w));return y=j,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 9:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,g,x,v,$,b,T,C,S,w,E,P,A,L,M,R,I,O,D,B,N=0,F=0,U=0,z=0,G=0,V=0,k=0,W=0,H=0,q=0,j=0,X=0,K=0,Q=0,Z=0,J=0,ee=0,te=0;if(B=y,y=y+592|0,I=B+48|0,D=B+32|0,O=B+16|0,R=B,L=B+80|0,M=B+64|0,g=0|l[(m=272+(e|=0)|0)>>2],te=0|l[e+88>>2],x=(0|c[te+63>>0])<<8|0|c[te+64>>0],v=255&(te=0|r[te+17>>0]),!(te<<24>>24))return y=B,1;$=0==(0|u),T=(b=s+-1|0)<<4,C=u+-1|0,S=n<<1,w=e+92|0,E=e+116|0,P=e+164|0,A=e+268|0,te=e+212|0,_=0==(1&o|0),p=0==(1&a|0),f=e+288|0,h=e+284|0,ee=0,o=0,i=0,a=1;do{if(!$)for(Z=0|l[t+(ee<<2)>>2],J=0;;){if(N=0==(0|(Q=1&J)),K=(Q<<5^32)-16|0,Q=(Q<<1^2)-1|0,(0|(e=N?0:b))!=(0|(j=N?s:-1)))for(X=p|(0|J)!=(0|C),q=N?Z:Z+T|0;;){1==(0|a)&&(a=512|Y(w,E)),H=7&a,a>>>=3,F=0|c[1539+H>>0],N=0;do{i=(W=(k=(V=(0|Y(w,P))+i|0)-g|0)>>31)&V|k&~W,(0|l[m>>2])>>>0<=i>>>0&&(l[R>>2]=866,l[R+4>>2]=910,l[R+8>>2]=1497,Ie(L,812,R),$e(L)),l[M+(N<<2)>>2]=d[(0|l[A>>2])+(i<<1)>>1],N=N+1|0}while(N>>>0<F>>>0);for(W=_|(0|e)!=(0|b),V=0,k=q;G=X|0==(0|V),F=V<<1,z=(z=(U=(N=(0|Y(w,te))+o|0)-x|0)>>31)&N|U&~z,W?(G&&(o=0|c[1547+(H<<2)+F>>0],N=3*z|0,(0|l[f>>2])>>>0<=N>>>0&&(l[O>>2]=866,l[O+4>>2]=910,l[O+8>>2]=1497,Ie(L,812,O),$e(L)),U=(0|l[h>>2])+(N<<1)|0,l[k>>2]=(0|d[U>>1])<<16|l[M+(o<<2)>>2],l[k+4>>2]=(0|d[U+4>>1])<<16|0|d[U+2>>1]),U=k+8|0,o=(o=(z=(N=(0|Y(w,te))+z|0)-x|0)>>31)&N|z&~o,G&&(N=0|c[1547+(H<<2)+(1|F)>>0],F=3*o|0,(0|l[f>>2])>>>0<=F>>>0&&(l[I>>2]=866,l[I+4>>2]=910,l[I+8>>2]=1497,Ie(L,812,I),$e(L)),G=(0|l[h>>2])+(F<<1)|0,l[U>>2]=(0|d[G>>1])<<16|l[M+(N<<2)>>2],l[k+12>>2]=(0|d[G+4>>1])<<16|0|d[G+2>>1])):(G&&(o=0|c[1547+(H<<2)+F>>0],N=3*z|0,(0|l[f>>2])>>>0<=N>>>0&&(l[D>>2]=866,l[D+4>>2]=910,l[D+8>>2]=1497,Ie(L,812,D),$e(L)),G=(0|l[h>>2])+(N<<1)|0,l[k>>2]=(0|d[G>>1])<<16|l[M+(o<<2)>>2],l[k+4>>2]=(0|d[G+4>>1])<<16|0|d[G+2>>1]),o=(o=(G=(z=(0|Y(w,te))+z|0)-x|0)>>31)&z|G&~o),2!=(0|(V=V+1|0));)k=k+n|0;if((0|(e=Q+e|0))==(0|j))break;q=q+K|0}if((0|(J=J+1|0))==(0|u))break;Z=Z+S|0}ee=ee+1|0}while((0|ee)!=(0|v));return y=B,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 8:case 7:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,g,x,v,$,b,T,C,S,w,E,P,A,L,M,R,I,O,D,B,N,F,U,z=0,G=0,V=0,k=0,W=0,H=0,q=0,j=0,X=0,K=0,Q=0,Z=0,J=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0,ce=0,he=0;if(U=y,y=y+640|0,B=U+80|0,D=U+64|0,O=U+48|0,F=U+32|0,N=U+16|0,I=U,M=U+128|0,R=U+112|0,m=U+96|0,x=0|l[(g=272+(e|=0)|0)>>2],he=0|l[e+88>>2],v=(0|c[he+63>>0])<<8|0|c[he+64>>0],$=255&(he=0|r[he+17>>0]),!(he<<24>>24))return y=U,1;b=0==(0|u),C=(T=s+-1|0)<<5,S=u+-1|0,w=n<<1,E=e+92|0,P=e+116|0,A=e+164|0,L=e+268|0,he=e+212|0,_=0==(1&o|0),p=0==(1&a|0),f=e+288|0,h=e+284|0,ce=0,e=0,a=0,o=0,i=0,z=1;do{if(!b)for(le=0|l[t+(ce<<2)>>2],ue=0;;){if(V=0==(0|(se=1&ue)),ae=(se<<6^64)-32|0,se=(se<<1^2)-1|0,(0|(G=V?0:T))!=(0|(re=V?s:-1)))for(oe=p|(0|ue)!=(0|S),ne=V?le:le+C|0;;){1==(0|z)&&(z=512|Y(E,P)),ie=7&z,z>>>=3,k=0|c[1539+ie>>0],V=0;do{i=(te=(ee=(J=(0|Y(E,A))+i|0)-x|0)>>31)&J|ee&~te,(0|l[g>>2])>>>0<=i>>>0&&(l[I>>2]=866,l[I+4>>2]=910,l[I+8>>2]=1497,Ie(M,812,I),$e(M)),l[R+(V<<2)>>2]=d[(0|l[L>>2])+(i<<1)>>1],V=V+1|0}while(V>>>0<k>>>0);V=0;do{a=(te=(ee=(J=(0|Y(E,A))+a|0)-x|0)>>31)&J|ee&~te,(0|l[g>>2])>>>0<=a>>>0&&(l[N>>2]=866,l[N+4>>2]=910,l[N+8>>2]=1497,Ie(M,812,N),$e(M)),l[m+(V<<2)>>2]=d[(0|l[L>>2])+(a<<1)>>1],V=V+1|0}while(V>>>0<k>>>0);for(te=_|(0|G)!=(0|T),J=0,ee=ne;;){if(K=oe|0==(0|J),Q=J<<1,te)for(j=0,X=ee;o=(o=(q=(Z=(0|Y(E,he))+o|0)-v|0)>>31)&Z|q&~o,e=(e=(Z=(q=(0|Y(E,he))+e|0)-v|0)>>31)&q|Z&~e,K&&(q=0|c[j+Q+(1547+(ie<<2))>>0],k=3*o|0,(V=0|l[f>>2])>>>0<=k>>>0&&(l[F>>2]=866,l[F+4>>2]=910,l[F+8>>2]=1497,Ie(M,812,F),$e(M),V=0|l[f>>2]),k=(W=0|l[h>>2])+(k<<1)|0,V>>>0>(H=3*e|0)>>>0?V=W:(l[O>>2]=866,l[O+4>>2]=910,l[O+8>>2]=1497,Ie(M,812,O),$e(M),V=0|l[h>>2]),Z=V+(H<<1)|0,l[X>>2]=(0|d[k>>1])<<16|l[R+(q<<2)>>2],l[X+4>>2]=(0|d[k+4>>1])<<16|0|d[k+2>>1],l[X+8>>2]=(0|d[Z>>1])<<16|l[m+(q<<2)>>2],l[X+12>>2]=(0|d[Z+4>>1])<<16|0|d[Z+2>>1]),2!=(0|(j=j+1|0));)X=X+16|0;else for(Z=1^K,K=1547+(ie<<2)+Q|0,j=0,X=ee;o=(o=(q=(Q=(0|Y(E,he))+o|0)-v|0)>>31)&Q|q&~o,e=(e=(Q=(q=(0|Y(E,he))+e|0)-v|0)>>31)&q|Q&~e,0!=(0|j)|Z||(q=0|c[K>>0],k=3*o|0,(V=0|l[f>>2])>>>0<=k>>>0&&(l[D>>2]=866,l[D+4>>2]=910,l[D+8>>2]=1497,Ie(M,812,D),$e(M),V=0|l[f>>2]),k=(W=0|l[h>>2])+(k<<1)|0,V>>>0>(H=3*e|0)>>>0?V=W:(l[B>>2]=866,l[B+4>>2]=910,l[B+8>>2]=1497,Ie(M,812,B),$e(M),V=0|l[h>>2]),Q=V+(H<<1)|0,l[X>>2]=(0|d[k>>1])<<16|l[R+(q<<2)>>2],l[X+4>>2]=(0|d[k+4>>1])<<16|0|d[k+2>>1],l[X+8>>2]=(0|d[Q>>1])<<16|l[m+(q<<2)>>2],l[X+12>>2]=(0|d[Q+4>>1])<<16|0|d[Q+2>>1]),2!=(0|(j=j+1|0));)X=X+16|0;if(2==(0|(J=J+1|0)))break;ee=ee+n|0}if((0|(G=se+G|0))==(0|re))break;ne=ne+ae|0}if((0|(ue=ue+1|0))==(0|u))break;le=le+w|0}ce=ce+1|0}while((0|ce)!=(0|$));return y=U,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;default:return 0|(o=0)}return 0|(o=1)}function J(e,t,i){e|=0,t|=0;var n,o,a=0;if((0|(i|=0))>=8192)return 0|B(0|e,0|t,0|i);if(o=0|e,n=e+i|0,(3&e)==(3&t)){for(;3&e;){if(!i)return 0|o;r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0,i=i-1|0}for(a=(i=-4&n|0)-64|0;(0|e)<=(0|a);)l[e>>2]=l[t>>2],l[e+4>>2]=l[t+4>>2],l[e+8>>2]=l[t+8>>2],l[e+12>>2]=l[t+12>>2],l[e+16>>2]=l[t+16>>2],l[e+20>>2]=l[t+20>>2],l[e+24>>2]=l[t+24>>2],l[e+28>>2]=l[t+28>>2],l[e+32>>2]=l[t+32>>2],l[e+36>>2]=l[t+36>>2],l[e+40>>2]=l[t+40>>2],l[e+44>>2]=l[t+44>>2],l[e+48>>2]=l[t+48>>2],l[e+52>>2]=l[t+52>>2],l[e+56>>2]=l[t+56>>2],l[e+60>>2]=l[t+60>>2],e=e+64|0,t=t+64|0;for(;(0|e)<(0|i);)l[e>>2]=l[t>>2],e=e+4|0,t=t+4|0}else for(i=n-4|0;(0|e)<(0|i);)r[e>>0]=0|r[t>>0],r[e+1>>0]=0|r[t+1>>0],r[e+2>>0]=0|r[t+2>>0],r[e+3>>0]=0|r[t+3>>0],e=e+4|0,t=t+4|0;for(;(0|e)<(0|n);)r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0;return 0|o}function ee(e,t,i){t|=0,i|=0;var n,r,o,a,s,u=0,c=0,h=0,d=0,f=0,p=0;s=y,y=y+48|0,a=s+16|0,h=s,c=s+32|0,u=0|l[(r=(e|=0)+28|0)>>2],l[c>>2]=u,u=(0|l[(o=e+20|0)>>2])-u|0,l[c+4>>2]=u,l[c+8>>2]=t,l[c+12>>2]=i,u=u+i|0,n=e+60|0,l[h>>2]=l[n>>2],l[h+4>>2]=c,l[h+8>>2]=2,h=0|ze(0|U(146,0|h));e:do{if((0|u)!=(0|h)){for(t=2;!((0|h)<0);)if(u=u-h|0,t=((f=h>>>0>(p=0|l[c+4>>2])>>>0)<<31>>31)+t|0,p=h-(f?p:0)|0,l[(c=f?c+8|0:c)>>2]=(0|l[c>>2])+p,l[(f=c+4|0)>>2]=(0|l[f>>2])-p,l[a>>2]=l[n>>2],l[a+4>>2]=c,l[a+8>>2]=t,(0|u)==(0|(h=0|ze(0|U(146,0|a))))){d=3;break e}l[e+16>>2]=0,l[r>>2]=0,l[o>>2]=0,l[e>>2]=32|l[e>>2],i=2==(0|t)?0:i-(0|l[c+4>>2])|0}else d=3}while(0);return 3==(0|d)&&(p=0|l[e+44>>2],l[e+16>>2]=p+(0|l[e+48>>2]),l[r>>2]=p,l[o>>2]=p),y=s,0|i}function te(e,t,i){e|=0,t|=0,i|=0;var n,o,a,s,u,c=0,h=0,d=0,f=0,p=0,_=0,m=0;u=y,y=y+224|0,n=u+120|0,a=u,s=u+136|0,h=(c=o=u+80|0)+40|0;do{l[c>>2]=0,c=c+4|0}while((0|c)<(0|h));return l[n>>2]=l[i>>2],(0|V(0,t,n,a,o))<0?i=-1:(l[e+76>>2],m=32&(i=0|l[e>>2]),(0|r[e+74>>0])<1&&(l[e>>2]=-33&i),0|l[(c=e+48|0)>>2]?i=0|V(e,t,n,a,o):(d=0|l[(h=e+44|0)>>2],l[h>>2]=s,l[(f=e+28|0)>>2]=s,l[(p=e+20|0)>>2]=s,l[c>>2]=80,l[(_=e+16|0)>>2]=s+80,i=0|V(e,t,n,a,o),d&&(at[7&l[e+36>>2]](e,0,0),i=0==(0|l[p>>2])?-1:i,l[h>>2]=d,l[c>>2]=0,l[_>>2]=0,l[f>>2]=0,l[p>>2]=0)),c=0|l[e>>2],l[e>>2]=c|m,i=0==(32&c|0)?i:-1),y=u,0|i}function ie(e,t,i,n){t|=0,i|=0,n|=0;var o,s,u,c,h,d,f,p=0,_=0;f=y,y=y+64|0,h=f,_=0|l[(e|=0)>>2],d=e+(0|l[_+-8>>2])|0,_=0|l[_+-4>>2],l[h>>2]=i,l[h+4>>2]=e,l[h+8>>2]=t,l[h+12>>2]=n,t=h+20|0,n=h+24|0,o=h+28|0,s=h+32|0,u=h+40|0,c=(p=e=h+16|0)+36|0;do{l[p>>2]=0,p=p+4|0}while((0|p)<(0|c));a[e+36>>1]=0,r[e+38>>0]=0;e:do{if(0|He(_,i))l[h+48>>2]=1,dt[3&l[20+(0|l[_>>2])>>2]](_,h,d,d,1,0),e=1==(0|l[n>>2])?d:0;else{switch(st[3&l[24+(0|l[_>>2])>>2]](_,h,d,1,0),0|l[h+36>>2]){case 0:e=1==(0|l[u>>2])&1==(0|l[o>>2])&1==(0|l[s>>2])?0|l[t>>2]:0;break e;case 1:break;default:e=0;break e}if(1!=(0|l[n>>2])&&!(0==(0|l[u>>2])&1==(0|l[o>>2])&1==(0|l[s>>2]))){e=0;break}e=0|l[e>>2]}}while(0);return y=f,0|e}function ne(e){var t,i=0,n=0,r=0,o=0,a=0,s=0,u=0;if(t=y,y=y+544|0,s=t+16|0,i=t,o=t+32|0,((n=0|l[(a=(e|=0)+8|0)>>2])+-1|0)>>>0>=8192&&(l[i>>2]=866,l[i+4>>2]=3006,l[i+8>>2]=1257,Ie(o,812,i),$e(o)),l[e>>2]=n,(i=0|l[(r=e+20|0)>>2])?u=n:((i=0|he(180,0))?(l[(u=i+164|0)>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0):i=0,l[r>>2]=i,u=0|l[e>>2]),0|l[a>>2]?s=u:(l[s>>2]=866,l[s+4>>2]=910,l[s+8>>2]=1497,Ie(o,812,s),$e(o),s=0|l[e>>2]),o=0|l[e+4>>2],!(s>>>0>16))return e=0|W(i,u,o,e=0),y=t,0|e;for(n=s,r=0;a=r+1|0,n>>>0>3;)n>>>=1,r=a;return e=0|W(i,u,o,e=255&((e=r+2+(32!=(0|a)&1<<a>>>0<s>>>0&1)|0)>>>0<11?e:11)),y=t,0|e}function re(e){var t,i,n,r,o,a,s=0,u=0;a=y,y=y+576|0,r=a+48|0,o=a+32|0,i=a+16|0,t=a,n=a+64|0,s=0|l[(e|=0)+168>>2];do{if(0|s){if(u=0|l[s+-4>>2],s=s+-8|0,0!=(0|u)&&(0|u)==(0|~l[s>>2])||(l[t>>2]=866,l[t+4>>2]=651,l[t+8>>2]=1579,Ie(n,812,t),$e(n)),7&s){l[i>>2]=866,l[i+4>>2]=2506,l[i+8>>2]=1232,Ie(n,812,i),$e(n);break}_e(s,0,0,1,0);break}}while(0);if(s=0|l[e+176>>2])return u=0|l[s+-4>>2],s=s+-8|0,0!=(0|u)&&(0|u)==(0|~l[s>>2])||(l[o>>2]=866,l[o+4>>2]=651,l[o+8>>2]=1579,Ie(n,812,o),$e(n)),7&s?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1232,Ie(n,812,r),$e(n),void(y=a)):(_e(s,0,0,1,0),void(y=a));y=a}function oe(e,t,i){var n=0;return!(0!=(0|(e|=0))&(t|=0)>>>0>73&0!=(0|(i|=0)))||40!=(0|l[i>>2])||18552!=((0|c[e>>0])<<8|0|c[e+1>>0]|0)||((0|c[e+2>>0])<<8|0|c[e+3>>0])>>>0<74||((0|c[e+7>>0])<<16|(0|c[e+6>>0])<<24|(0|c[e+8>>0])<<8|0|c[e+9>>0])>>>0>t>>>0?0|(i=0):(l[i+4>>2]=(0|c[e+12>>0])<<8|0|c[e+13>>0],l[i+8>>2]=(0|c[e+14>>0])<<8|0|c[e+15>>0],l[i+12>>2]=c[e+16>>0],l[i+16>>2]=c[e+17>>0],t=e+18|0,l[(n=i+32|0)>>2]=c[t>>0],l[n+4>>2]=0,t=0|r[t>>0],l[i+20>>2]=t<<24>>24==0|t<<24>>24==9?8:16,l[i+24>>2]=(0|c[e+26>>0])<<16|(0|c[e+25>>0])<<24|(0|c[e+27>>0])<<8|0|c[e+28>>0],l[i+28>>2]=(0|c[e+30>>0])<<16|(0|c[e+29>>0])<<24|(0|c[e+31>>0])<<8|0|c[e+32>>0],0|(i=1))}function ae(e,t){e|=0;var i,n,r,o=0,a=0,s=0,u=0,h=0;if(r=y,y=y+544|0,h=r+16|0,o=r,u=r+32|0,(t|=0)>>>0>=33&&(l[o>>2]=866,l[o+4>>2]=3199,l[o+8>>2]=1350,Ie(u,812,o),$e(u)),(0|(o=0|l[(n=e+20|0)>>2]))>=(0|t))return s=a=e+16|0,u=o,h=(a=0|l[a>>2])>>>(h=32-t|0),a<<=t,l[s>>2]=a,t=u-t|0,l[n>>2]=t,y=r,0|h;a=e+4|0,s=e+8|0,i=e+16|0;do{(0|(e=0|l[a>>2]))==(0|l[s>>2])?e=0:(l[a>>2]=e+1,e=0|c[e>>0]),o=o+8|0,l[n>>2]=o,(0|o)>=33&&(l[h>>2]=866,l[h+4>>2]=3208,l[h+8>>2]=1366,Ie(u,812,h),$e(u),o=0|l[n>>2]),e=e<<32-o|l[i>>2],l[i>>2]=e}while((0|o)<(0|t));return h=e>>>(h=32-t|0),u=e<<t,l[i>>2]=u,t=o-t|0,l[n>>2]=t,y=r,0|h}function se(e,t,i){e|=0;var n=0,o=0,a=0,s=0;a=255&(t|=0),n=0!=(0|(i|=0));e:do{if(n&0!=(3&e|0))for(o=255&t;;){if((0|r[e>>0])==o<<24>>24){s=6;break e}if(!((n=0!=(0|(i=i+-1|0)))&0!=(3&(e=e+1|0)|0))){s=5;break}}else s=5}while(0);5==(0|s)&&(n?s=6:i=0);e:do{if(6==(0|s)&&(o=255&t,(0|r[e>>0])!=o<<24>>24)){n=0|T(a,16843009);t:do{if(i>>>0>3){for(;!((-2139062144&(a=l[e>>2]^n)^-2139062144)&a+-16843009|0);)if(e=e+4|0,(i=i+-4|0)>>>0<=3){s=11;break t}}else s=11}while(0);if(11==(0|s)&&!i){i=0;break}for(;;){if((0|r[e>>0])==o<<24>>24)break e;if(e=e+1|0,!(i=i+-1|0)){i=0;break}}}}while(0);return 0|(0|i?e:0)}function le(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0;var o,a,s,u=0,h=0,d=0;return s=y,y=y+528|0,d=s,h=s+16|0,o=0|l[(e|=0)+88>>2],a=(0|c[o+70+(r<<2)+1>>0])<<16|(0|c[o+70+(r<<2)>>0])<<24|(0|c[o+70+(r<<2)+2>>0])<<8|0|c[o+70+(r<<2)+3>>0],(u=(u=r+1|0)>>>0<(0|c[o+16>>0])>>>0?(0|c[o+70+(u<<2)+1>>0])<<16|(0|c[o+70+(u<<2)>>0])<<24|(0|c[o+70+(u<<2)+2>>0])<<8|0|c[o+70+(u<<2)+3>>0]:0|l[e+8>>2])>>>0>a>>>0?(d=0|Z(e,h=(h=0|l[(h=e+4|0)>>2])+a|0,d=u-a|0,t,i,n,r),y=s,0|d):(l[d>>2]=866,l[d+4>>2]=3694,l[d+8>>2]=1508,Ie(h,812,d),$e(h),d=0|Z(e,h=(h=0|l[(h=e+4|0)>>2])+a|0,d=u-a|0,t,i,n,r),y=s,0|d)}function ue(e,t,i){e|=0,t|=0;var n=0,o=0,a=0,s=0,u=0;(o=0|l[(n=(i|=0)+16|0)>>2])?a=5:0|Te(i)?n=0:(o=0|l[n>>2],a=5);e:do{if(5==(0|a)){if(n=s=0|l[(u=i+20|0)>>2],(o-s|0)>>>0<t>>>0){n=0|at[7&l[i+36>>2]](i,e,t);break}t:do{if((0|r[i+75>>0])>-1){for(s=t;;){if(!s){a=0,o=e;break t}if(10==(0|r[e+(o=s+-1|0)>>0]))break;s=o}if((n=0|at[7&l[i+36>>2]](i,e,s))>>>0<s>>>0)break e;a=s,o=e+s|0,t=t-s|0,n=0|l[u>>2]}else a=0,o=e}while(0);J(0|n,0|o,0|t),l[u>>2]=(0|l[u>>2])+t,n=a+t|0}}while(0);return 0|n}function ce(e){var t,i,n=0,o=0,a=0;i=y,y=y+544|0,a=i+16|0,o=i,t=i+32|0,n=0|l[(e|=0)+20>>2];do{if(0|n){if(re(n),7&n){l[o>>2]=866,l[o+4>>2]=2506,l[o+8>>2]=1232,Ie(t,812,o),$e(t);break}_e(n,0,0,1,0);break}}while(0);if(!(o=0|l[(n=e+4|0)>>2]))return r[(a=e+16|0)>>0]=0,void(y=i);7&o?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1232,Ie(t,812,a),$e(t)):_e(o,0,0,1,0),l[n>>2]=0,l[e+8>>2]=0,l[e+12>>2]=0,r[(a=e+16|0)>>0]=0,y=i}function he(e,t){t|=0;var i,n,r,o,a=0,s=0,u=0;return o=y,y=y+560|0,u=o+32|0,r=o+16|0,a=o,n=o+48|0,i=o+44|0,(s=0|(s=(e|=0)+3&-4)?s:4)>>>0>2147418112?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1103,Ie(n,812,a),$e(n),y=o,0|(u=0)):(l[i>>2]=s,e=0|_e(0,s,i,1,0),a=0|l[i>>2],0|t&&(l[t>>2]=a),0==(0|e)|a>>>0<s>>>0?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1129,Ie(n,812,r),$e(n),e=0):7&e&&(l[u>>2]=866,l[u+4>>2]=2533,l[u+8>>2]=1156,Ie(n,812,u),$e(n)),y=o,0|(u=e))}function de(e,t,i){t|=0;var n,o=0,a=0,s=0;if(n=(e|=0)+(i|=0)|0,t&=255,(0|i)>=67){for(;3&e;)r[e>>0]=t,e=e+1|0;for(a=(o=-4&n|0)-64|0,s=t|t<<8|t<<16|t<<24;(0|e)<=(0|a);)l[e>>2]=s,l[e+4>>2]=s,l[e+8>>2]=s,l[e+12>>2]=s,l[e+16>>2]=s,l[e+20>>2]=s,l[e+24>>2]=s,l[e+28>>2]=s,l[e+32>>2]=s,l[e+36>>2]=s,l[e+40>>2]=s,l[e+44>>2]=s,l[e+48>>2]=s,l[e+52>>2]=s,l[e+56>>2]=s,l[e+60>>2]=s,e=e+64|0;for(;(0|e)<(0|o);)l[e>>2]=s,e=e+4|0}for(;(0|e)<(0|n);)r[e>>0]=t,e=e+1|0;return n-i|0}function fe(e,t,i,n,o){e|=0,i|=0,n|=0,o|=0;var a=0,s=0,u=0,c=0;r[(t|=0)+53>>0]=1;do{if((0|l[t+4>>2])==(0|n)){if(r[t+52>>0]=1,u=t+54|0,c=t+48|0,s=t+24|0,e=t+36|0,!(a=0|l[(n=t+16|0)>>2])){if(l[n>>2]=i,l[s>>2]=o,l[e>>2]=1,!(1==(0|l[c>>2])&1==(0|o)))break;r[u>>0]=1;break}if((0|a)!=(0|i)){l[e>>2]=1+(0|l[e>>2]),r[u>>0]=1;break}2==(0|(e=0|l[s>>2]))&&(l[s>>2]=o,e=o),1==(0|l[c>>2])&1==(0|e)&&(r[u>>0]=1)}}while(0)}function pe(e,t){e|=0;var i,n,o,a=0,s=0,u=0,h=0;o=y,y=y+16|0,n=255&(t|=0),r[(i=o)>>0]=n,(u=0|l[(s=e+16|0)>>2])?h=4:0|Te(e)?a=-1:(u=0|l[s>>2],h=4);do{if(4==(0|h)){if((s=0|l[(h=e+20|0)>>2])>>>0<u>>>0&&(0|(a=255&t))!=(0|r[e+75>>0])){l[h>>2]=s+1,r[s>>0]=n;break}a=1==(0|at[7&l[e+36>>2]](e,i,1))?0|c[i>>0]:-1}}while(0);return y=o,0|a}function _e(e,t,i,n,r){e|=0,t|=0,i|=0,n|=0,r|=0;do{if(e){if(!t){if(H(e),!i){t=0;break}l[i>>2]=0,t=0;break}n?e=0==(0|(t=0|ve(e,t)))?e:t:t=0,i&&(r=0|Re(e),l[i>>2]=r)}else t=0|z(t),i&&(e=t?0|Re(t):0,l[i>>2]=e)}while(0);return 0|t}function me(e,t){e=+e,t|=0;var i,n,r=0;switch(m[v>>3]=e,2047&(n=0|De(0|(r=0|l[v>>2]),0|(i=0|l[v+4>>2]),52))){case 0:0!=e?(e=+me(0x10000000000000000*e,t),r=(0|l[t>>2])-64|0):r=0,l[t>>2]=r;break;case 2047:break;default:l[t>>2]=(2047&n)-1022,l[v>>2]=r,l[v+4>>2]=-2146435073&i|1071644672,e=+m[v>>3]}return+e}function ge(e,t){e|=0,t|=0;var i=0,n=0;for(n=0;;){if((0|c[2140+n>>0])==(0|e)){e=2;break}if(87==(0|(i=n+1|0))){i=2228,n=87,e=5;break}n=i}if(2==(0|e)&&(n?(i=2228,e=5):i=2228),5==(0|e))for(;;){do{e=i,i=i+1|0}while(0!=(0|r[e>>0]));if(!(n=n+-1|0))break;e=5}return 0|function(e,t){return 0|function(e,t){return e|=0,t=(t|=0)?0|function(e,t,i){t|=0,i|=0;var n,o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0;n=1794895138+(0|l[(e|=0)>>2])|0,s=0|qe(0|l[e+8>>2],n),o=0|qe(0|l[e+12>>2],n),a=0|qe(0|l[e+16>>2],n);e:do{if(s>>>0<t>>>2>>>0&&(p=t-(s<<2)|0,o>>>0<p>>>0&a>>>0<p>>>0)&&0==(3&(a|o)|0)){for(p=o>>>2,f=a>>>2,d=0;;){if(o=0|qe(0|l[e+((a=(u=(h=d+(c=s>>>1)|0)<<1)+p|0)<<2)>>2],n),!((a=0|qe(0|l[e+(a+1<<2)>>2],n))>>>0<t>>>0&o>>>0<(t-a|0)>>>0)){o=0;break e}if(0|r[e+(a+o)>>0]){o=0;break e}if(!(o=0|Ce(i,e+a|0)))break;if(o=(0|o)<0,1==(0|s)){o=0;break e}d=o?d:h,s=o?c:s-c|0}a=0|qe(0|l[e+((o=u+f|0)<<2)>>2],n),o=(o=0|qe(0|l[e+(o+1<<2)>>2],n))>>>0<t>>>0&a>>>0<(t-o|0)>>>0&&0==(0|r[e+(o+a)>>0])?e+o|0:0}else o=0}while(0);return 0|o}(0|l[t>>2],0|l[t+4>>2],e):0,0|(0|t?t:e)}(e|=0,t|=0)}(i,0|l[t+20>>2])}function xe(e,t,i){i|=0;var n=0;if((t|=0)>>>0>0|0==(0|t)&(e|=0)>>>0>4294967295){for(;n=0|Me(0|e,0|t,10,0),r[(i=i+-1|0)>>0]=255&n|48,n=e,e=0|je(0|e,0|t,10,0),t>>>0>9|9==(0|t)&n>>>0>4294967295;)t=b;t=e}else t=e;if(t)for(;r[(i=i+-1|0)>>0]=48|(t>>>0)%10,!(t>>>0<10);)t=(t>>>0)/10|0;return 0|i}function ve(e,t){t|=0;var i=0,n=0;return(e|=0)?t>>>0>4294967231?(t=0|tt(),l[t>>2]=12,0|(t=0)):(i=0|function(e,t){t|=0;var i,n=0,r=0,o=0,a=0,s=0,u=0,c=0,h=0,d=0;if(i=(e|=0)+(n=-8&(h=0|l[(d=e+4|0)>>2]))|0,!(3&h))return t>>>0<256?0|(e=0):(n>>>0>=(t+4|0)>>>0&&(n-t|0)>>>0<=l[1264]<<1>>>0||(e=0),0|e);if(n>>>0>=t>>>0)return(n=n-t|0)>>>0<=15||(c=e+t|0,l[d>>2]=1&h|t|2,l[c+4>>2]=3|n,l[(d=c+n+4|0)>>2]=1|l[d>>2],q(c,n)),0|e;if((0|i)==(0|l[1150]))return n=(c=(0|l[1147])+n|0)-t|0,r=e+t|0,c>>>0<=t>>>0?0|(e=0):(l[d>>2]=1&h|t|2,l[r+4>>2]=1|n,l[1150]=r,l[1147]=n,0|e);if((0|i)==(0|l[1149]))return(o=(0|l[1146])+n|0)>>>0<t>>>0?0|(e=0):(r=1&h,(n=o-t|0)>>>0>15?(c=(h=e+t|0)+n|0,l[d>>2]=r|t|2,l[h+4>>2]=1|n,l[c>>2]=n,l[(r=c+4|0)>>2]=-2&l[r>>2],r=h):(l[d>>2]=r|o|2,l[(r=e+o+4|0)>>2]=1|l[r>>2],r=0,n=0),l[1146]=n,l[1149]=r,0|e);if(2&(r=0|l[i+4>>2])|0||(u=(-8&r)+n|0)>>>0<t>>>0)return 0;c=u-t|0,o=r>>>3;do{if(r>>>0<256){if(r=0|l[i+8>>2],(0|(n=0|l[i+12>>2]))==(0|r)){l[1144]=l[1144]&~(1<<o);break}l[r+12>>2]=n,l[n+8>>2]=r;break}s=0|l[i+24>>2],n=0|l[i+12>>2];do{if((0|n)==(0|i)){if(n=0|l[(r=4+(o=i+16|0)|0)>>2])a=r;else{if(!(n=0|l[o>>2])){o=0;break}a=o}for(;;)if(0|(r=0|l[(o=n+20|0)>>2]))n=r,a=o;else{if(!(o=0|l[(r=n+16|0)>>2]))break;n=o,a=r}l[a>>2]=0,o=n}else o=0|l[i+8>>2],l[o+12>>2]=n,l[n+8>>2]=o,o=n}while(0);if(0|s){if(n=0|l[i+28>>2],(0|i)==(0|l[(r=4880+(n<<2)|0)>>2])){if(l[r>>2]=o,!o){l[1145]=l[1145]&~(1<<n);break}}else if(l[s+16+(((0|l[s+16>>2])!=(0|i)&1)<<2)>>2]=o,!o)break;l[o+24>>2]=s,0|(r=0|l[(n=i+16|0)>>2])&&(l[o+16>>2]=r,l[r+24>>2]=o),0|(n=0|l[n+4>>2])&&(l[o+20>>2]=n,l[n+24>>2]=o)}}while(0);return n=1&h,c>>>0<16?(l[d>>2]=u|n|2,l[(d=e+u+4|0)>>2]=1|l[d>>2],0|e):(h=e+t|0,l[d>>2]=n|t|2,l[h+4>>2]=3|c,l[(d=h+c+4|0)>>2]=1|l[d>>2],q(h,c),0|e)}(e+-8|0,t>>>0<11?16:t+11&-8),0|i?0|(t=i+8|0):(i=0|z(t))?(J(0|i,0|e,0|((n=(-8&(n=0|l[e+-4>>2]))-(0==(3&n|0)?8:4)|0)>>>0<t>>>0?n:t)),H(e),0|(t=i)):0|(t=0)):0|(t=0|z(t))}function ye(e,t,i,n){e|=0,i|=0,n|=0;var o,a,s;o=0|l[(e=(t|=0)+16|0)>>2],a=t+36|0,s=t+24|0;do{if(o){if((0|o)!=(0|i)){l[a>>2]=1+(0|l[a>>2]),l[s>>2]=2,r[t+54>>0]=1;break}2==(0|l[s>>2])&&(l[s>>2]=n)}else l[e>>2]=i,l[s>>2]=n,l[a>>2]=1}while(0)}function $e(e){e|=0;var t,i=0,n=0;t=0|l[119],l[t+76>>2];do{if((0|Ge(e,t))<0)e=1;else{if(10!=(0|r[t+75>>0])&&(n=0|l[(i=t+20|0)>>2])>>>0<(0|l[t+16>>2])>>>0){l[i>>2]=n+1,r[n>>0]=10,e=0;break}e=(0|pe(t,10))<0}}while(0);return e<<31>>31|0}function be(e,t,i,n,r){e|=0,t|=0;var o,a;if(a=y,y=y+256|0,o=a,(0|(i|=0))>(0|(n|=0))&0==(73728&(r|=0)|0)){if(de(0|o,0|t,0|((r=i-n|0)>>>0<256?r:256)),r>>>0>255){t=i-n|0;do{Ve(e,o,256),r=r+-256|0}while(r>>>0>255);r=255&t}Ve(e,o,r)}y=a}function Te(e){var t=0,i=0;return i=0|r[(t=(e|=0)+74|0)>>0],r[t>>0]=i+255|i,8&(t=0|l[e>>2])?(l[e>>2]=32|t,e=-1):(l[e+8>>2]=0,l[e+4>>2]=0,i=0|l[e+44>>2],l[e+28>>2]=i,l[e+20>>2]=i,l[e+16>>2]=i+(0|l[e+48>>2]),e=0),0|e}function Ce(e,t){t|=0;var i=0,n=0;if(i=0|r[(e|=0)>>0],n=0|r[t>>0],i<<24>>24==0||i<<24>>24!=n<<24>>24)e=n;else{do{t=t+1|0,i=0|r[(e=e+1|0)>>0],n=0|r[t>>0]}while(i<<24>>24!=0&&i<<24>>24==n<<24>>24);e=n}return(255&i)-(255&e)|0}function Se(e){var t,i;return(0|(i=(e|=0)+15&-16|0))>0&(0|(e=(t=0|l[x>>2])+i|0))<(0|t)|(0|e)<0?(P(),I(12),-1):(l[x>>2]=e,(0|e)>(0|E())&&0==(0|w())?(l[x>>2]=t,I(12),-1):0|t)}function we(e){var t=0,i=0,n=0;if(i=0|l[(e|=0)>>2],(n=(0|r[i>>0])-48|0)>>>0<10){t=0;do{t=n+(10*t|0)|0,i=i+1|0,l[e>>2]=i,n=(0|r[i>>0])-48|0}while(n>>>0<10)}else t=0;return 0|t}function Ee(e,t,i,n){if(i|=0,n|=0,!(0==(0|(e|=0))&0==(0|(t|=0))))do{r[(i=i+-1|0)>>0]=0|c[2122+(15&e)>>0]|n,e=0|De(0|e,0|t,4),t=b}while(!(0==(0|e)&0==(0|t)));return 0|i}function Pe(e){var t=0;return(0|(t=0|r[$+(255&(e|=0))>>0]))<8?0|t:(0|(t=0|r[$+(e>>8&255)>>0]))<8?t+8|0:(0|(t=0|r[$+(e>>16&255)>>0]))<8?t+16|0:24+(0|r[$+(e>>>24)>>0])|0}function Ae(e,t,i,n){i|=0,n|=0;var r=0;(0|l[(t|=0)+4>>2])==(0|i)&&1!=(0|l[(r=t+28|0)>>2])&&(l[r>>2]=n)}function Le(e,t,i){if(i|=0,!(0==(0|(e|=0))&0==(0|(t|=0))))do{r[(i=i+-1|0)>>0]=7&e|48,e=0|De(0|e,0|t,3),t=b}while(!(0==(0|e)&0==(0|t)));return 0|i}function Me(e,t,i,n){var r,o;return o=y,y=y+16|0,j(e|=0,t|=0,i|=0,n|=0,r=0|o),y=o,b=0|l[r+4>>2],0|l[r>>2]}function Re(e){var t=0;return(e|=0)?0|(1==(0|(e=3&(t=0|l[e+-4>>2])))?0:(-8&t)-(0==(0|e)?8:4)|0):0}function Ie(e,t,i){e|=0,t|=0,i|=0;var n,o;return n=y,y=y+16|0,l[(o=n)>>2]=i,i=0|function(e,t,i){return 0|function(e,t,i,n){e|=0,t|=0,i|=0,n|=0;var o,a,s=0,u=0,c=0,h=0,d=0;a=y,y=y+128|0,s=a+124|0,c=604,o=(u=d=a)+124|0;do{l[u>>2]=l[c>>2],u=u+4|0,c=c+4|0}while((0|u)<(0|o));return(t+-1|0)>>>0>2147483646?t?(t=0|tt(),l[t>>2]=75,t=-1):(e=s,t=1,h=4):h=4,4==(0|h)&&(h=t>>>0>(h=-2-e|0)>>>0?h:t,l[d+48>>2]=h,l[(s=d+20|0)>>2]=e,l[d+44>>2]=e,t=e+h|0,l[(e=d+16|0)>>2]=t,l[d+28>>2]=t,t=0|te(d,i,n),h&&(d=0|l[s>>2],r[d+(((0|d)==(0|l[e>>2]))<<31>>31)>>0]=0)),y=a,0|t}(e|=0,2147483647,t|=0,i|=0)}(e,t,o),y=n,0|i}function Oe(e,t,i){return e|=0,t|=0,(0|(i|=0))<32?(b=t<<i|(e&(1<<i)-1<<32-i)>>>32-i,e<<i):(b=e<<i-32,0)}function De(e,t,i){return e|=0,t|=0,(0|(i|=0))<32?(b=t>>>i,e>>>i|(t&(1<<i)-1)<<32-i):(b=0,t>>>i-32|0)}function Be(e,t){e|=0,t|=0;var i;i=y,y=y+16|0,l[i>>2]=t,te(t=0|l[26],e,i),function(e,t){var i,n=0,o=0,a=0,s=0;i=255&(e|=0),n=255&e,l[76+(t|=0)>>2],s=3;do{if(3==(0|s)){if((0|n)!=(0|r[t+75>>0])&&(a=0|l[(o=t+20|0)>>2])>>>0<(0|l[t+16>>2])>>>0){l[o>>2]=a+1,r[a>>0]=i;break}n=0|pe(t,e)}}while(0)}(10,t),O()}function Ne(e,t,i,n){return b=n=(t|=0)-(n|=0)-((i|=0)>>>0>(e|=0)>>>0|0)>>>0,0|e-i>>>0}function Fe(e){e=+e;var t;return m[v>>3]=e,t=0|l[v>>2],b=0|l[v+4>>2],0|t}function Ue(e,t,i,n){return b=(t|=0)+(n|=0)+((i=(e|=0)+(i|=0)>>>0)>>>0<e>>>0|0)>>>0,0|i}function ze(e){var t=0;return(e|=0)>>>0>4294963200&&(t=0|tt(),l[t>>2]=0-e,e=-1),0|e}function Ge(e,t){t|=0;var i;return i=0|function(e){var t,i=0,n=0;t=e|=0;e:do{if(3&t)for(i=t;;){if(!(0|r[e>>0])){e=i;break e}if(!(3&(i=e=e+1|0))){n=4;break}}else n=4}while(0);if(4==(0|n)){for(;!((-2139062144&(i=0|l[e>>2])^-2139062144)&i+-16843009);)e=e+4|0;if((255&i)<<24>>24)do{e=e+1|0}while(0!=(0|r[e>>0]))}return e-t|0}(e|=0),((0|function(e,t,i,n){var r;return e|=0,n|=0,r=0|T(i|=0,t|=0),i=0==(0|t)?0:i,(0|(e=(l[n+76>>2],0|ue(e,r,n))))!=(0|r)&&(i=(e>>>0)/(t>>>0)|0),0|i}(e,1,i,t))!=(0|i))<<31>>31|0}function Ve(e,t,i){t|=0,i|=0,32&l[(e|=0)>>2]||ue(t,i,e)}function ke(e){e|=0;var t;return t=188+(0|it())|0,0|ge(e,0|l[t>>2])}function We(e,t){return t|=0,e=(e|=0)?0|function(e,t,i){e|=0,t|=0,i|=0;do{if(e){if(t>>>0<128){r[e>>0]=t,e=1;break}if(i=188+(0|it())|0,!(0|l[l[i>>2]>>2])){if(57216==(-128&t|0)){r[e>>0]=t,e=1;break}e=0|tt(),l[e>>2]=84,e=-1;break}if(t>>>0<2048){r[e>>0]=t>>>6|192,r[e+1>>0]=63&t|128,e=2;break}if(t>>>0<55296|57344==(-8192&t|0)){r[e>>0]=t>>>12|224,r[e+1>>0]=t>>>6&63|128,r[e+2>>0]=63&t|128,e=3;break}if((t+-65536|0)>>>0<1048576){r[e>>0]=t>>>18|240,r[e+1>>0]=t>>>12&63|128,r[e+2>>0]=t>>>6&63|128,r[e+3>>0]=63&t|128,e=4;break}e=0|tt(),l[e>>2]=84,e=-1;break}e=1}while(0);return 0|e}(e,t,0):0,0|e}function He(e,t,i){return(0|(e|=0))==(0|(t|=0))|0}function qe(e,t){t|=0;var i;return i=0|Ye(0|(e|=0)),0|(0==(0|t)?e:i)}function je(e,t,i,n){return 0|j(e|=0,t|=0,i|=0,n|=0,0)}function Ye(e){return(255&(e|=0))<<24|(e>>8&255)<<16|(e>>16&255)<<8|e>>>24|0}function Xe(e,t,i,n,r,o){S(6)}function Ke(e,t,i,n,r){S(1)}function Qe(e){(function(e){H(e|=0)})(e|=0)}function Ze(e,t,i,n){S(7)}function Je(e,t,i){return S(0),0}function et(e,t){return+ +me(e=+e,t|=0)}function tt(){return 64+(0|it())|0}function it(){return 232}function nt(e){}function rt(e){S(2)}function ot(){S(5)}t.__ZSt18uncaught_exceptionv;var at=[Je,ee,function(e,t,i){var n,r,o;return e|=0,t|=0,i|=0,r=y,y=y+32|0,n=r+20|0,l[(o=r)>>2]=l[e+60>>2],l[o+4>>2]=0,l[o+8>>2]=t,l[o+12>>2]=n,l[o+16>>2]=i,(0|ze(0|F(140,0|o)))<0?(l[n>>2]=-1,e=-1):e=0|l[n>>2],y=r,0|e},function(e,t,i){t|=0,i|=0;var n,o=0;return n=y,y=y+32|0,o=n,l[(e|=0)+36>>2]=1,0==(64&l[e>>2]|0)&&(l[o>>2]=l[e+60>>2],l[o+4>>2]=21523,l[o+8>>2]=n+16,0|L(54,0|o))&&(r[e+75>>0]=-1),o=0|ee(e,t,i),y=n,0|o},function(e,t,i){var n,r;return t|=0,i|=0,J(0|(r=0|l[(n=(e|=0)+20|0)>>2]),0|t,0|(e=(e=(0|l[e+16>>2])-r|0)>>>0>i>>>0?i:e)),l[n>>2]=(0|l[n>>2])+e,0|i},function(e,t,i){i|=0;var n,r,o=0,a=0;if(r=y,y=y+64|0,n=r,0|He(e|=0,t|=0))t=1;else if(0!=(0|t)&&0!=(0|(a=0|ie(t,32,16,0)))){o=(t=n+4|0)+52|0;do{l[t>>2]=0,t=t+4|0}while((0|t)<(0|o));l[n>>2]=a,l[n+8>>2]=e,l[n+12>>2]=-1,l[n+48>>2]=1,ft[3&l[28+(0|l[a>>2])>>2]](a,n,0|l[i>>2],1),1==(0|l[n+24>>2])?(l[i>>2]=l[n+16>>2],t=1):t=0}else t=0;return y=r,0|t},Je,Je],st=[Ke,function(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0;var a=0;do{if(0|He(e,0|l[t+8>>2]))Ae(0,t,i,n);else if(0|He(e,0|l[t>>2])){if(e=t+32|0,(0|l[t+16>>2])!=(0|i)&&(0|l[(a=t+20|0)>>2])!=(0|i)){l[e>>2]=n,l[a>>2]=i,l[(n=t+40|0)>>2]=1+(0|l[n>>2]),1==(0|l[t+36>>2])&&2==(0|l[t+24>>2])&&(r[t+54>>0]=1),l[t+44>>2]=4;break}1==(0|n)&&(l[e>>2]=1)}}while(0)},function(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0,o|=0;var a=0,s=0,u=0,c=0;do{if(0|He(e,0|l[t+8>>2]))Ae(0,t,i,n);else{if(a=e+8|0,!(0|He(e,0|l[t>>2]))){u=0|l[a>>2],st[3&l[24+(0|l[u>>2])>>2]](u,t,i,n,o);break}if(e=t+32|0,(0|l[t+16>>2])!=(0|i)&&(0|l[(s=t+20|0)>>2])!=(0|i)){if(l[e>>2]=n,4==(0|l[(n=t+44|0)>>2]))break;r[(e=t+52|0)>>0]=0,r[(c=t+53|0)>>0]=0,a=0|l[a>>2],dt[3&l[20+(0|l[a>>2])>>2]](a,t,i,i,1,o),0|r[c>>0]?0|r[e>>0]?e=3:(e=3,u=11):(e=4,u=11),11==(0|u)&&(l[s>>2]=i,l[(c=t+40|0)>>2]=1+(0|l[c>>2]),1==(0|l[t+36>>2])&&2==(0|l[t+24>>2])&&(r[t+54>>0]=1)),l[n>>2]=e;break}1==(0|n)&&(l[e>>2]=1)}}while(0)},Ke],lt=[rt,nt,Qe,nt,nt,Qe,function(e){var t;t=y,y=y+16|0,H(e|=0),0|M(0|l[1285],0)?Be(4406,t):y=t},rt],ut=[function(e){return S(3),0},function(e){var t,i;return t=y,y=y+16|0,i=t,e=0|function(e){return 0|(e|=0)}(0|l[(e|=0)+60>>2]),l[i>>2]=e,e=0|ze(0|R(6,0|i)),y=t,0|e}],ct=[function(e,t,i){S(4)}],ht=[ot,function(){var e,t,i,n=0,r=0,o=0,a=0,s=0;a=y,y=y+48|0,i=a+32|0,e=a+24|0,s=a+16|0,t=a,a=a+36|0,n=0|function(){var e=0,t=0;if(e=y,y=y+16|0,!(0|D(5136,2)))return t=0|A(0|l[1285]),y=e,0|t;Be(4307,e);return 0}(),0|n&&0|(o=0|l[n>>2])&&(1126902528==(-256&(r=0|l[(n=o+48|0)>>2])|0)&1129074247==(0|(n=0|l[n+4>>2]))||(l[e>>2]=4168,Be(4118,e)),n=1126902529==(0|r)&1129074247==(0|n)?0|l[o+44>>2]:o+80|0,l[a>>2]=n,o=0|l[o>>2],n=0|l[o+4>>2],0|at[7&l[16+(0|l[2])>>2]](8,o,a)?(s=0|l[a>>2],s=0|ut[1&l[8+(0|l[s>>2])>>2]](s),l[t>>2]=4168,l[t+4>>2]=n,l[t+8>>2]=s,Be(4032,t)):(l[s>>2]=4168,l[s+4>>2]=n,Be(4077,s))),Be(4156,i)},function(){var e;e=y,y=y+16|0,0|N(5140,6)?Be(4356,e):y=e},ot],dt=[Xe,function(e,t,i,n,r,o){i|=0,n|=0,r|=0,0|He(e|=0,0|l[(t|=0)+8>>2])&&fe(0,t,i,n,r)},function(e,t,i,n,r,o){i|=0,n|=0,r|=0,o|=0,0|He(e|=0,0|l[(t|=0)+8>>2])?fe(0,t,i,n,r):(e=0|l[e+8>>2],dt[3&l[20+(0|l[e>>2])>>2]](e,t,i,n,r,o))},Xe],ft=[Ze,function(e,t,i,n){i|=0,n|=0,0|He(e|=0,0|l[(t|=0)+8>>2])&&ye(0,t,i,n)},function(e,t,i,n){i|=0,n|=0,0|He(e|=0,0|l[(t|=0)+8>>2])?ye(0,t,i,n):(e=0|l[e+8>>2],ft[3&l[28+(0|l[e>>2])>>2]](e,t,i,n))},Ze];return{stackSave:function(){return 0|y},_i64Subtract:Ne,_crn_get_bytes_per_block:function(e,t){e|=0,t|=0;var i,n,r,o=0;switch(r=y,y=y+576|0,n=r+40|0,i=r+56|0,l[(o=r)>>2]=40,oe(e,t,o),e=0|l[(t=o+32|0)+4>>2],0|l[t>>2]){case 0:case 9:case 10:if(!e)return y=r,0|(o=8);e=14;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:e=e?14:13;break;default:e=14}return 13==(0|e)?(y=r,0|(o=16)):14==(0|e)?(l[n>>2]=866,l[n+4>>2]=2672,l[n+8>>2]=1251,Ie(i,812,n),$e(i),y=r,0|(o=0)):0},setThrew:function(e,t){},dynCall_viii:function(e,t,i,n){t|=0,i|=0,n|=0,ct[0&(e|=0)](0|t,0|i,0|n)},_bitshift64Lshr:De,_bitshift64Shl:Oe,dynCall_viiii:function(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0,ft[3&(e|=0)](0|t,0|i,0|n,0|r)},setTempRet0:function(e){b=e|=0},_crn_decompress:function(e,t,i,n,o,s){e|=0,t|=0,i|=0,n|=0,o|=0,s|=0;var u,h,d,f,p=0,_=0,m=0,g=0,x=0;switch(f=y,y=y+592|0,d=f+56|0,m=f+40|0,u=f+72|0,h=f+68|0,l[(x=f)>>2]=40,oe(e,t,x),p=(0|l[x+4>>2])>>>o,_=(0|l[x+8>>2])>>>o,n=0|l[(x=x+32|0)+4>>2],0|l[x>>2]){case 0:case 9:case 10:n?g=14:x=8;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:g=n?14:13;break;default:g=14}13==(0|g)?x=16:14==(0|g)&&(l[m>>2]=866,l[m+4>>2]=2672,l[m+8>>2]=1251,Ie(u,812,m),$e(u),x=0),l[h>>2]=i,g=0|function(e,t){var i=0,n=0,o=0,s=0,u=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0;if(m=y,y=y+528|0,p=m,h=m+16|0,0==(0|(e|=0))|(t|=0)>>>0<62||!(d=0|he(300,0)))return y=m,0|(g=0);l[d>>2]=519686845,l[d+4>>2]=0,l[d+8>>2]=0,f=d+88|0,i=d+136|0,n=d+160|0,o=d+184|0,s=d+208|0,u=d+232|0,l[(_=d+252|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,l[(_=d+268|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,l[(_=d+284|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,g=(_=f)+44|0;do{l[_>>2]=0,_=_+4|0}while((0|_)<(0|g));return r[f+44>>0]=0,l[i>>2]=0,l[i+4>>2]=0,l[i+8>>2]=0,l[i+12>>2]=0,l[i+16>>2]=0,r[i+20>>0]=0,l[n>>2]=0,l[n+4>>2]=0,l[n+8>>2]=0,l[n+12>>2]=0,l[n+16>>2]=0,r[n+20>>0]=0,l[o>>2]=0,l[o+4>>2]=0,l[o+8>>2]=0,l[o+12>>2]=0,l[o+16>>2]=0,r[o+20>>0]=0,l[s>>2]=0,l[s+4>>2]=0,l[s+8>>2]=0,l[s+12>>2]=0,l[s+16>>2]=0,r[s+20>>0]=0,l[u>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0,r[u+16>>0]=0,0|function(e,t,i){e|=0;var n=0,o=0;return!(0==(0|(t|=0))|(i|=0)>>>0<74)&&18552==((0|c[t>>0])<<8|0|c[t+1>>0]|0)&&((0|c[t+2>>0])<<8|0|c[t+3>>0])>>>0>=74&&((0|c[t+7>>0])<<16|(0|c[t+6>>0])<<24|(0|c[t+8>>0])<<8|0|c[t+9>>0])>>>0<=i>>>0?(l[(n=e+88|0)>>2]=t,l[e+4>>2]=t,l[e+8>>2]=i,0|function(e){var t=0,i=0,n=0,r=0;if(r=92+(e|=0)|0,i=0|l[(n=e+88|0)>>2],t=(0|l[e+4>>2])+((0|c[i+68>>0])<<8|(0|c[i+67>>0])<<16|0|c[i+69>>0])|0,!((i=(0|c[i+65>>0])<<8|0|c[i+66>>0])&&(l[r>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,0|k(r,e+116|0))))return 0|(r=0);t=0|l[n>>2];do{if((0|c[t+39>>0])<<8|0|c[t+40>>0]){if(!(0|k(r,e+140|0)))return 0|(r=0);if(0|k(r,e+188|0)){t=0|l[n>>2];break}return 0|(r=0)}if(!((0|c[t+55>>0])<<8|0|c[t+56>>0]))return 0|(r=0)}while(0);return!((0|c[t+55>>0])<<8|0|c[t+56>>0]|0)||0|k(r,e+164|0)&&0|k(r,e+212|0)?0|(r=1):0|(r=0)}(e)?(t=0|l[n>>2],(0|c[t+39>>0])<<8|0|c[t+40>>0]?0|function(e){var t=0,i=0,n=0,o=0,a=0,s=0,u=0,h=0,d=0,f=0,p=0,_=0,m=0;if(m=y,y=y+576|0,s=m,o=m+64|0,_=m+16|0,t=0|l[(n=88+(e|=0)|0)>>2],p=(0|c[t+39>>0])<<8|0|c[t+40>>0],d=e+236|0,(0|(i=0|l[(a=e+240|0)>>2]))!=(0|p)){if(i>>>0<=p>>>0){do{if((0|l[e+244>>2])>>>0<p>>>0){if(0|Q(d,p,(i+1|0)==(0|p),4,0)){t=0|l[a>>2];break}return r[e+248>>0]=1,y=m,0|(_=0)}t=i}while(0);de((0|l[d>>2])+(t<<2)|0,0,p-t<<2|0),t=0|l[n>>2]}l[a>>2]=p}if(f=e+92|0,i=(0|l[e+4>>2])+((0|c[t+34>>0])<<8|(0|c[t+33>>0])<<16|0|c[t+35>>0])|0,!(t=(0|c[t+37>>0])<<8|(0|c[t+36>>0])<<16|0|c[t+38>>0]))return y=m,0|(_=0);if(l[f>>2]=i,l[e+96>>2]=i,l[e+104>>2]=t,l[e+100>>2]=i+t,l[e+108>>2]=0,l[e+112>>2]=0,u=_+20|0,l[_>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,l[_+12>>2]=0,r[_+16>>0]=0,h=_+24|0,l[_+44>>2]=0,l[u>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0,l[u+16>>2]=0,r[u+20>>0]=0,0|k(f,_)&&0|k(f,h))if(0|l[a>>2]||(l[s>>2]=866,l[s+4>>2]=910,l[s+8>>2]=1497,Ie(o,812,s),$e(o)),p)for(s=0,u=0,i=0|l[d>>2],n=0,e=0,t=0,o=0,a=0;;){if(s=(0|Y(f,_))+s&31,a=(0|Y(f,h))+a&63,o=(0|Y(f,_))+o&31,t=(0|Y(f,_))+t|0,e=(0|Y(f,h))+e&63,n=(0|Y(f,_))+n&31,l[i>>2]=a<<5|s<<11|o|t<<27|e<<21|n<<16,(u=u+1|0)>>>0>=p>>>0){t=1;break}i=i+4|0,t&=31}else t=1;else t=0;return ce(_+24|0),ce(_),y=m,0|(_=t)}(e)&&0|function(e){var t,i,n,o,a,s,u=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,v=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,I=0,O=0,D=0,B=0,N=0,F=0,U=0,z=0,G=0,V=0,W=0;if(s=y,y=y+1008|0,_=s,p=s+496|0,A=s+472|0,n=s+276|0,o=s+80|0,a=s+16|0,h=0|l[88+(e|=0)>>2],t=(0|c[h+47>>0])<<8|0|c[h+48>>0],i=e+92|0,u=(0|l[e+4>>2])+((0|c[h+42>>0])<<8|(0|c[h+41>>0])<<16|0|c[h+43>>0])|0,!(h=(0|c[h+45>>0])<<8|(0|c[h+44>>0])<<16|0|c[h+46>>0]))return y=s,0;if(l[i>>2]=u,l[e+96>>2]=u,l[e+104>>2]=h,l[e+100>>2]=u+h,l[e+108>>2]=0,l[e+112>>2]=0,l[A+20>>2]=0,l[A>>2]=0,l[A+4>>2]=0,l[A+8>>2]=0,l[A+12>>2]=0,r[A+16>>0]=0,0|k(i,A)){for(u=0,h=-3,d=-3;l[n+(u<<2)>>2]=d,l[o+(u<<2)>>2]=h,f=(0|d)>2,49!=(0|(u=u+1|0));)h=(1&f)+h|0,d=f?-3:d+1|0;h=(u=a)+64|0;do{l[u>>2]=0,u=u+4|0}while((0|u)<(0|h));d=e+252|0,u=0|l[(h=e+256|0)>>2];e:do{if((0|u)==(0|t))m=13;else{if(u>>>0<=t>>>0){do{if((0|l[e+260>>2])>>>0<t>>>0){if(0|Q(d,t,(u+1|0)==(0|t),4,0)){u=0|l[h>>2];break}r[e+264>>0]=1,u=0;break e}}while(0);de((0|l[d>>2])+(u<<2)|0,0,t-u<<2|0)}l[h>>2]=t,m=13}}while(0);do{if(13==(0|m)){if(!t){l[_>>2]=866,l[_+4>>2]=910,l[_+8>>2]=1497,Ie(p,812,_),$e(p),u=1;break}for(e=a+4|0,p=a+8|0,_=a+12|0,m=a+16|0,g=a+20|0,x=a+24|0,v=a+28|0,$=a+32|0,b=a+36|0,T=a+40|0,C=a+44|0,S=a+48|0,w=a+52|0,E=a+56|0,P=a+60|0,f=0,u=0|l[d>>2],h=0|l[e>>2],d=0|l[a>>2];V=0|Y(i,A),d=d+(0|l[n+(V<<2)>>2])&3,h=h+(0|l[o+(V<<2)>>2])&3,V=0|Y(i,A),W=(0|l[p>>2])+(0|l[n+(V<<2)>>2])&3,l[p>>2]=W,V=(0|l[_>>2])+(0|l[o+(V<<2)>>2])&3,l[_>>2]=V,z=0|Y(i,A),G=(0|l[m>>2])+(0|l[n+(z<<2)>>2])&3,l[m>>2]=G,z=(0|l[g>>2])+(0|l[o+(z<<2)>>2])&3,l[g>>2]=z,F=0|Y(i,A),U=(0|l[x>>2])+(0|l[n+(F<<2)>>2])&3,l[x>>2]=U,F=(0|l[v>>2])+(0|l[o+(F<<2)>>2])&3,l[v>>2]=F,B=0|Y(i,A),N=(0|l[$>>2])+(0|l[n+(B<<2)>>2])&3,l[$>>2]=N,B=(0|l[b>>2])+(0|l[o+(B<<2)>>2])&3,l[b>>2]=B,O=0|Y(i,A),D=(0|l[T>>2])+(0|l[n+(O<<2)>>2])&3,l[T>>2]=D,O=(0|l[C>>2])+(0|l[o+(O<<2)>>2])&3,l[C>>2]=O,R=0|Y(i,A),I=(0|l[S>>2])+(0|l[n+(R<<2)>>2])&3,l[S>>2]=I,R=(0|l[w>>2])+(0|l[o+(R<<2)>>2])&3,l[w>>2]=R,L=0|Y(i,A),M=(0|l[E>>2])+(0|l[n+(L<<2)>>2])&3,l[E>>2]=M,L=(0|l[P>>2])+(0|l[o+(L<<2)>>2])&3,l[P>>2]=L,l[u>>2]=(0|c[1441+h>>0])<<2|0|c[1441+d>>0]|(0|c[1441+W>>0])<<4|(0|c[1441+V>>0])<<6|(0|c[1441+G>>0])<<8|(0|c[1441+z>>0])<<10|(0|c[1441+U>>0])<<12|(0|c[1441+F>>0])<<14|(0|c[1441+N>>0])<<16|(0|c[1441+B>>0])<<18|(0|c[1441+D>>0])<<20|(0|c[1441+O>>0])<<22|(0|c[1441+I>>0])<<24|(0|c[1441+R>>0])<<26|(0|c[1441+M>>0])<<28|(0|c[1441+L>>0])<<30,!((f=f+1|0)>>>0>=t>>>0);)u=u+4|0;l[a>>2]=d,l[e>>2]=h,u=1}}while(0)}else u=0;return ce(A),y=s,0|u}(e)&&(t=0|l[n>>2],o=11):o=11,11!=(0|o)||(0|c[t+55>>0])<<8|0|c[t+56>>0]&&!(0|function(e){var t=0,i=0,n=0,o=0,s=0,u=0,h=0,d=0,f=0;if(f=y,y=y+560|0,o=f,n=f+40|0,d=f+16|0,i=0|l[88+(e|=0)>>2],u=(0|c[i+55>>0])<<8|0|c[i+56>>0],h=e+92|0,t=(0|l[e+4>>2])+((0|c[i+50>>0])<<8|(0|c[i+49>>0])<<16|0|c[i+51>>0])|0,!(i=(0|c[i+53>>0])<<8|(0|c[i+52>>0])<<16|0|c[i+54>>0]))return y=f,0|(d=0);l[h>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,l[d+20>>2]=0,l[d>>2]=0,l[d+4>>2]=0,l[d+8>>2]=0,l[d+12>>2]=0,r[d+16>>0]=0;e:do{if(0|k(h,d)){if(s=e+268|0,(0|(t=0|l[(i=e+272|0)>>2]))!=(0|u)){if(t>>>0<=u>>>0){do{if((0|l[e+276>>2])>>>0<u>>>0){if(0|Q(s,u,(t+1|0)==(0|u),2,0)){t=0|l[i>>2];break}r[e+280>>0]=1,t=0;break e}}while(0);de((0|l[s>>2])+(t<<1)|0,0,u-t<<1|0)}l[i>>2]=u}if(!u){l[o>>2]=866,l[o+4>>2]=910,l[o+8>>2]=1497,Ie(n,812,o),$e(n),t=1;break}for(i=0,e=0,n=0,t=0|l[s>>2];;){if(n=(s=0|Y(h,d))+n&255,e=(0|Y(h,d))+e&255,a[t>>1]=e<<8|n,(i=i+1|0)>>>0>=u>>>0){t=1;break}t=t+2|0}}else t=0}while(0);return ce(d),y=f,0|(d=t)}(e)&&0|function(e){var t,i,n,o,s,u,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,v=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,I=0,O=0,D=0,B=0,N=0,F=0,U=0,z=0,G=0,V=0,W=0,H=0,q=0,j=0;if(u=y,y=y+2416|0,m=u,_=u+1904|0,H=u+1880|0,n=u+980|0,o=u+80|0,s=u+16|0,d=0|l[88+(e|=0)>>2],t=(0|c[d+63>>0])<<8|0|c[d+64>>0],i=e+92|0,h=(0|l[e+4>>2])+((0|c[d+58>>0])<<8|(0|c[d+57>>0])<<16|0|c[d+59>>0])|0,!(d=(0|c[d+61>>0])<<8|(0|c[d+60>>0])<<16|0|c[d+62>>0]))return y=u,0;if(l[i>>2]=h,l[e+96>>2]=h,l[e+104>>2]=d,l[e+100>>2]=h+d,l[e+108>>2]=0,l[e+112>>2]=0,l[H+20>>2]=0,l[H>>2]=0,l[H+4>>2]=0,l[H+8>>2]=0,l[H+12>>2]=0,r[H+16>>0]=0,0|k(i,H)){for(h=0,d=-7,f=-7;l[n+(h<<2)>>2]=f,l[o+(h<<2)>>2]=d,p=(0|f)>6,225!=(0|(h=h+1|0));)d=(1&p)+d|0,f=p?-7:f+1|0;d=(h=s)+64|0;do{l[h>>2]=0,h=h+4|0}while((0|h)<(0|d));p=e+284|0,d=3*t|0,h=0|l[(f=e+288|0)>>2];e:do{if((0|h)==(0|d))g=13;else{if(h>>>0<=d>>>0){do{if((0|l[e+292>>2])>>>0<d>>>0){if(0|Q(p,d,(h+1|0)==(0|d),2,0)){h=0|l[f>>2];break}r[e+296>>0]=1,h=0;break e}}while(0);de((0|l[p>>2])+(h<<1)|0,0,d-h<<1|0)}l[f>>2]=d,g=13}}while(0);do{if(13==(0|g)){if(!t){l[m>>2]=866,l[m+4>>2]=910,l[m+8>>2]=1497,Ie(_,812,m),$e(_),h=1;break}for(A=s+4|0,L=s+8|0,M=s+12|0,R=s+16|0,I=s+20|0,O=s+24|0,D=s+28|0,B=s+32|0,N=s+36|0,F=s+40|0,U=s+44|0,z=s+48|0,G=s+52|0,V=s+56|0,W=s+60|0,P=0,h=0|l[p>>2],d=0|l[s>>2],f=0|l[A>>2],p=0|l[L>>2],e=0|l[M>>2],_=0|l[R>>2],m=0|l[I>>2],g=0|l[O>>2],x=0|l[D>>2],v=0|l[B>>2],$=0|l[N>>2],b=0|l[F>>2],T=0|l[U>>2],C=0,S=0,w=0,E=0;j=0|Y(i,H),d=d+(0|l[n+(j<<2)>>2])&7,f=f+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),p=p+(0|l[n+(j<<2)>>2])&7,e=e+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),_=_+(0|l[n+(j<<2)>>2])&7,m=m+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),g=g+(0|l[n+(j<<2)>>2])&7,x=x+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),v=v+(0|l[n+(j<<2)>>2])&7,$=$+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),b=b+(0|l[n+(j<<2)>>2])&7,T=T+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),C=C+(0|l[n+(j<<2)>>2])&7,S=S+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),w=w+(0|l[n+(j<<2)>>2])&7,E=E+(0|l[o+(j<<2)>>2])&7,j=0|c[1445+m>>0],a[h>>1]=(0|c[1445+f>>0])<<3|0|c[1445+d>>0]|(0|c[1445+p>>0])<<6|(0|c[1445+e>>0])<<9|(0|c[1445+_>>0])<<12|j<<15,q=0|c[1445+b>>0],a[h+2>>1]=(0|c[1445+g>>0])<<2|j>>>1|(0|c[1445+x>>0])<<5|(0|c[1445+v>>0])<<8|(0|c[1445+$>>0])<<11|q<<14,a[h+4>>1]=(0|c[1445+T>>0])<<1|q>>>2|(0|c[1445+C>>0])<<4|(0|c[1445+S>>0])<<7|(0|c[1445+w>>0])<<10|(0|c[1445+E>>0])<<13,!((P=P+1|0)>>>0>=t>>>0);)h=h+6|0;l[s>>2]=d,l[A>>2]=f,l[L>>2]=p,l[M>>2]=e,l[R>>2]=_,l[I>>2]=m,l[O>>2]=g,l[D>>2]=x,l[B>>2]=v,l[N>>2]=$,l[F>>2]=b,l[U>>2]=T,l[z>>2]=C,l[G>>2]=S,l[V>>2]=w,l[W>>2]=E,h=1}}while(0)}else h=0;return ce(H),y=u,0|h}(e))?0|(o=0):0|(o=1)):0|(o=0)):(l[e+88>>2]=0,0|(o=0))}(d,e,t)?(y=m,0|(g=d)):(X(d),7&d?(l[p>>2]=866,l[p+4>>2]=2506,l[p+8>>2]=1232,Ie(h,812,p),$e(h),y=m,0|(g=0)):(_e(d,0,0,1,0),y=m,0|(g=0)))}(e,t),t=s+o|0;do{if(t>>>0>o>>>0){if(!g){for(n=i;n=n+(0|T(0|T((p+3|0)>>>2,x),(_+3|0)>>>2))|0,(0|(o=o+1|0))!=(0|t);)_>>>=1,p>>>=1;l[h>>2]=n;break}for(e=_,n=i;_=0|T((p+3|0)>>>2,x),!(o>>>0>15|(m=0|T(_,(e+3|0)>>>2))>>>0<8)&&519686845==(0|l[g>>2])&&(le(g,h,m,_,o),n=0|l[h>>2]),n=n+m|0,l[h>>2]=n,(0|(o=o+1|0))!=(0|t);)e>>>=1,p>>>=1}}while(0);if(g){if(519686845==(0|l[g>>2]))return X(g),7&g?(l[d>>2]=866,l[d+4>>2]=2506,l[d+8>>2]=1232,Ie(u,812,d),$e(u),void(y=f)):(_e(g,0,0,1,0),void(y=f));y=f}else y=f},_memset:de,_sbrk:Se,_memcpy:J,stackAlloc:function(e){var t;return t=y,y=(y=y+(e|=0)|0)+15&-16,0|t},_crn_get_height:function(e,t){var i,n;return e|=0,t|=0,n=y,y=y+48|0,l[(i=n)>>2]=40,oe(e,t,i),y=n,0|l[i+8>>2]},dynCall_vi:function(e,t){t|=0,lt[7&(e|=0)](0|t)},getTempRet0:function(){return 0|b},_crn_get_levels:function(e,t){var i,n;return e|=0,t|=0,n=y,y=y+48|0,l[(i=n)>>2]=40,oe(e,t,i),y=n,0|l[i+12>>2]},_crn_get_uncompressed_size:function(e,t,i){e|=0,t|=0,i|=0;var n,r,o,a,s=0,u=0;switch(a=y,y=y+576|0,o=a+40|0,r=a+56|0,l[(u=a)>>2]=40,oe(e,t,u),n=(3+((0|l[u+4>>2])>>>i)|0)>>>2,t=(3+((0|l[u+8>>2])>>>i)|0)>>>2,e=0|l[(i=u+32|0)+4>>2],0|l[i>>2]){case 0:case 9:case 10:e?s=14:e=8;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:s=e?14:13;break;default:s=14}return 13==(0|s)?e=16:14==(0|s)&&(l[o>>2]=866,l[o+4>>2]=2672,l[o+8>>2]=1251,Ie(r,812,o),$e(r),e=0),u=0|T(0|T(t,n),e),y=a,0|u},_i64Add:Ue,dynCall_iiii:function(e,t,i,n){return t|=0,i|=0,n|=0,0|at[7&(e|=0)](0|t,0|i,0|n)},_emscripten_get_global_libc:function(){return 5072},dynCall_ii:function(e,t){return t|=0,0|ut[1&(e|=0)](0|t)},___udivdi3:je,_llvm_bswap_i32:Ye,dynCall_viiiii:function(e,t,i,n,r,o){t|=0,i|=0,n|=0,r|=0,o|=0,st[3&(e|=0)](0|t,0|i,0|n,0|r,0|o)},___cxa_can_catch:function(e,t,i){var n,r;return e|=0,t|=0,i|=0,r=y,y=y+16|0,l[(n=r)>>2]=l[i>>2],(e=0|at[7&l[16+(0|l[e>>2])>>2]](e,t,n))&&(l[i>>2]=l[n>>2]),y=r,1&e|0},_free:H,runPostSets:function(){},dynCall_viiiiii:function(e,t,i,n,r,o,a){t|=0,i|=0,n|=0,r|=0,o|=0,a|=0,dt[3&(e|=0)](0|t,0|i,0|n,0|r,0|o,0|a)},establishStackSpace:function(e,t){y=e|=0},___uremdi3:Me,___cxa_is_pointer_type:function(e){return 1&(e=(e|=0)?0!=(0|ie(e,32,88,0)):0)|0},stackRestore:function(e){y=e|=0},_malloc:z,_emscripten_replace_memory:function(e){return!(16777215&g(e)||g(e)<=16777215||g(e)>2147483648)&&(r=new n(e),a=new o(e),l=new s(e),c=new u(e),d=new h(e),new f(e),new p(e),m=new _(e),i=e,!0)},dynCall_v:function(e){ht[3&(e|=0)]()},_crn_get_width:function(e,t){var i,n;return e|=0,t|=0,n=y,y=y+48|0,l[(i=n)>>2]=40,oe(e,t,i),y=n,0|l[i+4>>2]},_crn_get_dxt_format:function(e,t){var i,n;return e|=0,t|=0,n=y,y=y+48|0,l[(i=n)>>2]=40,oe(e,t,i),y=n,0|l[i+32>>2]}}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer);Module.stackSave=asm.stackSave,Module.getTempRet0=asm.getTempRet0,Module._memset=asm._memset,Module.setThrew=asm.setThrew,Module._bitshift64Lshr=asm._bitshift64Lshr,Module._bitshift64Shl=asm._bitshift64Shl,Module.setTempRet0=asm.setTempRet0,Module._crn_decompress=asm._crn_decompress,Module._crn_get_bytes_per_block=asm._crn_get_bytes_per_block,Module._sbrk=asm._sbrk,Module._memcpy=asm._memcpy,Module.stackAlloc=asm.stackAlloc,Module._crn_get_height=asm._crn_get_height,Module._i64Subtract=asm._i64Subtract,Module._crn_get_levels=asm._crn_get_levels,Module._crn_get_uncompressed_size=asm._crn_get_uncompressed_size,Module._i64Add=asm._i64Add,Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,Module.___udivdi3=asm.___udivdi3,Module._llvm_bswap_i32=asm._llvm_bswap_i32,Module.___cxa_can_catch=asm.___cxa_can_catch;var _free=Module._free=asm._free;Module.runPostSets=asm.runPostSets,Module.establishStackSpace=asm.establishStackSpace,Module.___uremdi3=asm.___uremdi3,Module.___cxa_is_pointer_type=asm.___cxa_is_pointer_type,Module.stackRestore=asm.stackRestore;var _malloc=Module._malloc=asm._malloc,_emscripten_replace_memory=Module._emscripten_replace_memory=asm._emscripten_replace_memory,initialStackTop;function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function run(e){function t(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(e),postRun()))}e=e||Module.arguments,runDependencies>0||(preRun(),runDependencies>0)||Module.calledRun||(Module.setStatus?(Module.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module.setStatus("")}),1),t()}),1)):t())}function exit(e,t){t&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(e)),ENVIRONMENT_IS_NODE&&process.exit(e),Module.quit(e,new ExitStatus(e)))}Module._crn_get_width=asm._crn_get_width,Module._crn_get_dxt_format=asm._crn_get_dxt_format,Module.dynCall_iiii=asm.dynCall_iiii,Module.dynCall_viiiii=asm.dynCall_viiiii,Module.dynCall_vi=asm.dynCall_vi,Module.dynCall_ii=asm.dynCall_ii,Module.dynCall_viii=asm.dynCall_viii,Module.dynCall_v=asm.dynCall_v,Module.dynCall_viiiiii=asm.dynCall_viiiiii,Module.dynCall_viiii=asm.dynCall_viiii,Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm,ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus,dependenciesFulfilled=function e(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=e)},Module.callMain=Module.callMain=function(e){e=e||[],ensureInitRuntime();var t=e.length+1;function i(){for(var e=0;e<3;e++)n.push(0)}var n=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];i();for(var r=0;r<t-1;r+=1)n.push(allocate(intArrayFromString(e[r]),"i8",ALLOC_NORMAL)),i();n.push(0),n=allocate(n,"i32",ALLOC_NORMAL);try{exit(Module._main(t,n,0),!0)}catch(e){if(e instanceof ExitStatus)return;if("SimulateInfiniteLoop"==e)return void(Module.noExitRuntime=!0);var o=e;e&&"object"==typeof e&&e.stack&&(o=[e,e.stack]),Module.printErr("exception thrown: "+o),Module.quit(1,e)}},Module.run=Module.run=run,Module.exit=Module.exit=exit;var abortDecorators=[];function abort(e){Module.onAbort&&Module.onAbort(e),void 0!==e?(Module.print(e),Module.printErr(e),e=JSON.stringify(e)):e="",ABORT=!0;var t="abort("+e+") at "+stackTrace()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw abortDecorators&&abortDecorators.forEach((function(i){t=i(t,e)})),t}if(Module.abort=Module.abort=abort,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),Module.noExitRuntime=!0,run();var Module$1=Module,G;typeof ko<"u"&&(G=ko),function(e){var t=this||(0,eval)("this"),i=t.document,n=t.navigator,r=t.jQuery,o=t.JSON;r||typeof jQuery>"u"||(r=jQuery),function(a,s){function l(e,t){return(null===e||typeof e in _)&&e===t}function u(t,i){var n;return function(){n||(n=p.a.setTimeout((function(){n=e,t()}),i))}}function c(e,t){var i;return function(){clearTimeout(i),i=p.a.setTimeout(e,t)}}function h(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function d(e,t){null!==t&&t.s&&t.s()}function f(e,t){var i=this.qd,n=i[y];n.ra||(this.Qb&&this.mb[t]?(i.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):n.I[t]||i.uc(t,e,n.J?{da:e}:i.$c(e)),e.Ja&&e.gd())}var p=typeof a<"u"?a:{};p.b=function(e,t){for(var i=e.split("."),n=p,r=0;r<i.length-1;r++)n=n[i[r]];n[i[i.length-1]]=t},p.L=function(e,t,i){e[t]=i},p.version="3.5.1",p.b("version",p.version),p.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},p.a=function(){function a(e,t){for(var i in e)c.call(e,i)&&t(i,e[i])}function s(e,t){if(t)for(var i in t)c.call(t,i)&&(e[i]=t[i]);return e}function l(e,t){return e.__proto__=t,e}function u(e,t,i,n){var r=e[t].match(v)||[];p.a.D(i.match(v),(function(e){p.a.Na(r,e,n)})),e[t]=r.join(" ")}var c=Object.prototype.hasOwnProperty,h={__proto__:[]}instanceof Array,d="function"==typeof Symbol,f={},_={};f[n&&/Firefox\/2/i.test(n.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],f.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),a(f,(function(e,t){if(t.length)for(var i=0,n=t.length;i<n;i++)_[t[i]]=e}));var m,g={propertychange:!0},x=i&&function(){for(var t=3,n=i.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e",r[0];);return 4<t?t:e}(),v=/\S+/g;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(e,t,i){for(var n=0,r=e.length;n<r;n++)t.call(i,e[n],n,e)},A:"function"==typeof Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t)}:function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},Lb:function(t,i,n){for(var r=0,o=t.length;r<o;r++)if(i.call(n,t[r],r,t))return t[r];return e},Pa:function(e,t){var i=p.a.A(e,t);0<i?e.splice(i,1):0===i&&e.shift()},wc:function(e){var t=[];return e&&p.a.D(e,(function(e){0>p.a.A(t,e)&&t.push(e)})),t},Mb:function(e,t,i){var n=[];if(e)for(var r=0,o=e.length;r<o;r++)n.push(t.call(i,e[r],r));return n},jb:function(e,t,i){var n=[];if(e)for(var r=0,o=e.length;r<o;r++)t.call(i,e[r],r)&&n.push(e[r]);return n},Nb:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var i=0,n=t.length;i<n;i++)e.push(t[i]);return e},Na:function(e,t,i){var n=p.a.A(p.a.bc(e),t);0>n?i&&e.push(t):i||e.splice(n,1)},Ba:h,extend:s,setPrototypeOf:l,Ab:h?l:s,P:a,Ga:function(e,t,i){if(!e)return e;var n,r={};for(n in e)c.call(e,n)&&(r[n]=t.call(i,e[n],n,e));return r},Tb:function(e){for(;e.firstChild;)p.removeNode(e.firstChild)},Yb:function(e){for(var t=((e=p.a.la(e))[0]&&e[0].ownerDocument||i).createElement("div"),n=0,r=e.length;n<r;n++)t.appendChild(p.oa(e[n]));return t},Ca:function(e,t){for(var i=0,n=e.length,r=[];i<n;i++){var o=e[i].cloneNode(!0);r.push(t?p.oa(o):o)}return r},va:function(e,t){if(p.a.Tb(e),t)for(var i=0,n=t.length;i<n;i++)e.appendChild(t[i])},Xc:function(e,t){var i=e.nodeType?[e]:e;if(0<i.length){for(var n=i[0],r=n.parentNode,o=0,a=t.length;o<a;o++)r.insertBefore(t[o],n);for(o=0,a=i.length;o<a;o++)p.removeNode(i[o])}},Ua:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.splice(0,1);for(;1<e.length&&e[e.length-1].parentNode!==t;)e.length--;if(1<e.length){var i=e[0],n=e[e.length-1];for(e.length=0;i!==n;)e.push(i),i=i.nextSibling;e.push(n)}}return e},Zc:function(e,t){7>x?e.setAttribute("selected",t):e.selected=t},Db:function(t){return null===t||t===e?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},vd:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(1!==e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Sb:function(e){return p.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!p.a.Lb(e,p.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return p.onError?function(){try{return e.apply(this,arguments)}catch(e){throw p.onError&&p.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(p.a.Ac(e),t)},Gc:function(e){setTimeout((function(){throw p.onError&&p.onError(e),e}),0)},B:function(e,t,i){var n=p.a.Ac(i);if(i=g[t],p.options.useOnlyNativeEvents||i||!r)if(i||"function"!=typeof e.addEventListener){if(!(typeof e.attachEvent<"u"))throw Error("Browser doesn't support addEventListener or attachEvent");var o=function(t){n.call(e,t)},a="on"+t;e.attachEvent(a,o),p.a.K.za(e,(function(){e.detachEvent(a,o)}))}else e.addEventListener(t,n,!1);else m||(m="function"==typeof r(e).on?"on":"bind"),r(e)[m](t,n)},Fb:function(e,n){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var o;if(o=!("input"!==p.a.R(e)||!e.type||"click"!=n.toLowerCase()||"checkbox"!=(o=e.type)&&"radio"!=o),p.options.useOnlyNativeEvents||!r||o)if("function"==typeof i.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(o=i.createEvent(_[n]||"HTMLEvents")).initEvent(n,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(o)}else if(o&&e.click)e.click();else{if(!(typeof e.fireEvent<"u"))throw Error("Browser doesn't support triggering events");e.fireEvent("on"+n)}else r(e).trigger(n)},f:function(e){return p.O(e)?e():e},bc:function(e){return p.O(e)?e.v():e},Eb:function(e,t,i){var n;t&&("object"==typeof e.classList?(n=e.classList[i?"add":"remove"],p.a.D(t.match(v),(function(t){n.call(e.classList,t)}))):"string"==typeof e.className.baseVal?u(e.className,"baseVal",t,i):u(e,"className",t,i))},Bb:function(t,i){var n=p.a.f(i);(null===n||n===e)&&(n="");var r=p.h.firstChild(t);!r||3!=r.nodeType||p.h.nextSibling(r)?p.h.va(t,[t.ownerDocument.createTextNode(n)]):r.data=n,p.a.Ad(t)},Yc:function(e,t){if(e.name=t,7>=x)try{var n=e.name.replace(/[&<>'"]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}));e.mergeAttributes(i.createElement("<input name='"+n+"'/>"),!1)}catch{}},Ad:function(e){9<=x&&(e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom)},wd:function(e){if(x){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=p.a.f(e),t=p.a.f(t);for(var i=[],n=e;n<=t;n++)i.push(n);return i},la:function(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(e[i]);return t},Da:function(e){return d?Symbol(e):e},Zd:6===x,$d:7===x,W:x,Lc:function(e,t){for(var i=p.a.la(e.getElementsByTagName("input")).concat(p.a.la(e.getElementsByTagName("textarea"))),n="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},r=[],o=i.length-1;0<=o;o--)n(i[o])&&r.push(i[o]);return r},Nd:function(e){return"string"==typeof e&&(e=p.a.Db(e))?o&&o.parse?o.parse(e):new Function("return "+e)():null},hc:function(e,t,i){if(!o||!o.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js.");return o.stringify(p.a.f(e),t,i)},Od:function(e,t,n){var r=(n=n||{}).params||{},o=n.includeFields||this.Jc,s=e;if("object"==typeof e&&"form"===p.a.R(e)){s=e.action;for(var l=o.length-1;0<=l;l--)for(var u=p.a.Lc(e,o[l]),c=u.length-1;0<=c;c--)r[u[c].name]=u[c].value}t=p.a.f(t);var h=i.createElement("form");for(var d in h.style.display="none",h.action=s,h.method="post",t)(e=i.createElement("input")).type="hidden",e.name=d,e.value=p.a.hc(p.a.f(t[d])),h.appendChild(e);a(r,(function(e,t){var n=i.createElement("input");n.type="hidden",n.name=e,n.value=t,h.appendChild(n)})),i.body.appendChild(h),n.submitter?n.submitter(h):h.submit(),setTimeout((function(){h.parentNode.removeChild(h)}),0)}}}(),p.b("utils",p.a),p.b("utils.arrayForEach",p.a.D),p.b("utils.arrayFirst",p.a.Lb),p.b("utils.arrayFilter",p.a.jb),p.b("utils.arrayGetDistinctValues",p.a.wc),p.b("utils.arrayIndexOf",p.a.A),p.b("utils.arrayMap",p.a.Mb),p.b("utils.arrayPushAll",p.a.Nb),p.b("utils.arrayRemoveItem",p.a.Pa),p.b("utils.cloneNodes",p.a.Ca),p.b("utils.createSymbolOrString",p.a.Da),p.b("utils.extend",p.a.extend),p.b("utils.fieldsIncludedWithJsonPost",p.a.Jc),p.b("utils.getFormFields",p.a.Lc),p.b("utils.objectMap",p.a.Ga),p.b("utils.peekObservable",p.a.bc),p.b("utils.postJson",p.a.Od),p.b("utils.parseJson",p.a.Nd),p.b("utils.registerEventHandler",p.a.B),p.b("utils.stringifyJson",p.a.hc),p.b("utils.range",p.a.Pd),p.b("utils.toggleDomNodeCssClass",p.a.Eb),p.b("utils.triggerEvent",p.a.Fb),p.b("utils.unwrapObservable",p.a.f),p.b("utils.objectForEach",p.a.P),p.b("utils.addOrRemoveItem",p.a.Na),p.b("utils.setTextContent",p.a.Bb),p.b("unwrap",p.a.f),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(1===arguments.length)return function(){return t.apply(e,arguments)};var i=Array.prototype.slice.call(arguments,1);return function(){var n=i.slice(0);return n.push.apply(n,arguments),t.apply(e,n)}}),p.a.g=new function(){var t,i,n=0,r="__ko__"+(new Date).getTime(),o={};return p.a.W?(t=function(t,i){var a=t[r];if(!a||"null"===a||!o[a]){if(!i)return e;a=t[r]="ko"+n++,o[a]={}}return o[a]},i=function(e){var t=e[r];return!!t&&(delete o[t],e[r]=null,!0)}):(t=function(e,t){var i=e[r];return!i&&t&&(i=e[r]={}),i},i=function(e){return!!e[r]&&(delete e[r],!0)}),{get:function(e,i){var n=t(e,!1);return n&&n[i]},set:function(i,n,r){(i=t(i,r!==e))&&(i[n]=r)},Ub:function(e,i,n){return(e=t(e,!0))[i]||(e[i]=n)},clear:i,Z:function(){return n+++r}}},p.b("utils.domData",p.a.g),p.b("utils.domData.clear",p.a.g.clear),p.a.K=new function(){function t(t,i){var n=p.a.g.get(t,o);return n===e&&i&&(n=[],p.a.g.set(t,o,n)),n}function i(e){if(i=t(e,!1))for(var i=i.slice(0),r=0;r<i.length;r++)i[r](e);p.a.g.clear(e),p.a.K.cleanExternalData(e),s[e.nodeType]&&n(e.childNodes,!0)}function n(e,t){for(var n,r=[],o=0;o<e.length;o++)if((!t||8===e[o].nodeType)&&(i(r[r.length]=n=e[o]),e[o]!==n))for(;o--&&-1==p.a.A(r,e[o]););}var o=p.a.g.Z(),a={1:!0,8:!0,9:!0},s={1:!0,9:!0};return{za:function(e,i){if("function"!=typeof i)throw Error("Callback must be a function");t(e,!0).push(i)},yb:function(i,n){var r=t(i,!1);r&&(p.a.Pa(r,n),0==r.length&&p.a.g.set(i,o,e))},oa:function(e){return p.u.G((function(){a[e.nodeType]&&(i(e),s[e.nodeType]&&n(e.getElementsByTagName("*")))})),e},removeNode:function(e){p.oa(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){r&&"function"==typeof r.cleanData&&r.cleanData([e])}}},p.oa=p.a.K.oa,p.removeNode=p.a.K.removeNode,p.b("cleanNode",p.oa),p.b("removeNode",p.removeNode),p.b("utils.domNodeDisposal",p.a.K),p.b("utils.domNodeDisposal.addDisposeCallback",p.a.K.za),p.b("utils.domNodeDisposal.removeDisposeCallback",p.a.K.yb),function(){var n=[0,"",""],o=[1,"<table>","</table>"],a=[3,"<table><tbody><tr>","</tr></tbody></table>"],s=[1,"<select multiple='multiple'>","</select>"],l={thead:o,tbody:o,tfoot:o,tr:[2,"<table><tbody>","</tbody></table>"],td:a,th:a,option:s,optgroup:s},u=8>=p.a.W;p.a.ua=function(e,o){var a;if(r){if(r.parseHTML)a=r.parseHTML(e,o)||[];else if((a=r.clean([e],o))&&a[0]){for(var s=a[0];s.parentNode&&11!==s.parentNode.nodeType;)s=s.parentNode;s.parentNode&&s.parentNode.removeChild(s)}}else{(a=o)||(a=i),s=a.parentWindow||a.defaultView||t;var c,h=p.a.Db(e).toLowerCase(),d=a.createElement("div");for(c=(h=h.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&l[h[1]]||n,h=c[0],c="ignored<div>"+c[1]+e+c[2]+"</div>","function"==typeof s.innerShiv?d.appendChild(s.innerShiv(c)):(u&&a.body.appendChild(d),d.innerHTML=c,u&&d.parentNode.removeChild(d));h--;)d=d.lastChild;a=p.a.la(d.lastChild.childNodes)}return a},p.a.Md=function(e,t){var i=p.a.ua(e,t);return i.length&&i[0].parentElement||p.a.Yb(i)},p.a.fc=function(t,i){if(p.a.Tb(t),null!==(i=p.a.f(i))&&i!==e)if("string"!=typeof i&&(i=i.toString()),r)r(t).html(i);else for(var n=p.a.ua(i,t.ownerDocument),o=0;o<n.length;o++)t.appendChild(n[o])}}(),p.b("utils.parseHtmlFragment",p.a.ua),p.b("utils.setHtml",p.a.fc),p.aa=function(){function t(e,i){if(e)if(8==e.nodeType)null!=(n=p.aa.Uc(e.nodeValue))&&i.push({ud:e,Kd:n});else if(1==e.nodeType)for(var n=0,r=e.childNodes,o=r.length;n<o;n++)t(r[n],i)}var i={};return{Xb:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var t=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return i[t]=e,"\x3c!--[ko_memo:"+t+"]--\x3e"},bd:function(t,n){var r=i[t];if(r===e)throw Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized.");try{return r.apply(null,n||[]),!0}finally{delete i[t]}},cd:function(e,i){var n=[];t(e,n);for(var r=0,o=n.length;r<o;r++){var a=n[r].ud,s=[a];i&&p.a.Nb(s,i),p.aa.bd(n[r].Kd,s),a.nodeValue="",a.parentNode&&a.parentNode.removeChild(a)}},Uc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),p.b("memoization",p.aa),p.b("memoization.memoize",p.aa.Xb),p.b("memoization.unmemoize",p.aa.bd),p.b("memoization.parseMemoText",p.aa.Uc),p.b("memoization.unmemoizeDomNodeAndDescendants",p.aa.cd),p.na=function(){function e(){if(a)for(var e,t=a,i=0;l<a;)if(e=o[l++]){if(l>t){if(5e3<=++i){l=a,p.a.Gc(Error("'Too much recursion' after processing "+i+" task groups."));break}t=a}try{e()}catch(e){p.a.Gc(e)}}}function n(){e(),l=a=o.length=0}var r,o=[],a=0,s=1,l=0;return r=t.MutationObserver?function(e){var t=i.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(n):i&&"onreadystatechange"in i.createElement("script")?function(e){var t=i.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,i.documentElement.removeChild(t),t=null,e()},i.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},{scheduler:r,zb:function(e){return a||p.na.scheduler(n),o[a++]=e,s++},cancel:function(e){(e-=s-a)>=l&&e<a&&(o[e]=null)},resetForTesting:function(){var e=a-l;return l=a=o.length=0,e},Sd:e}}(),p.b("tasks",p.na),p.b("tasks.schedule",p.na.zb),p.b("tasks.runEarly",p.na.Sd),p.Ta={throttle:function(e,t){e.throttleEvaluation=t;var i=null;return p.$({read:e,write:function(n){clearTimeout(i),i=p.a.setTimeout((function(){e(n)}),t)}})},rateLimit:function(e,t){var i,n,r;"number"==typeof t?i=t:(i=t.timeout,n=t.method),e.Hb=!1,r="function"==typeof n?n:"notifyWhenChangesStop"==n?c:u,e.ub((function(e){return r(e,i,t)}))},deferred:function(t,i){if(!0!==i)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");t.Hb||(t.Hb=!0,t.ub((function(i){var n,r=!1;return function(){if(!r){p.na.cancel(n),n=p.na.zb(i);try{r=!0,t.notifySubscribers(e,"dirty")}finally{r=!1}}}})))},notify:function(e,t){e.equalityComparer="always"==t?null:l}};var _={undefined:1,boolean:1,number:1,string:1};p.b("extenders",p.Ta),p.ic=function(e,t,i){this.da=e,this.lc=t,this.mc=i,this.Ib=!1,this.fb=this.Jb=null,p.L(this,"dispose",this.s),p.L(this,"disposeWhenNodeIsRemoved",this.l)},p.ic.prototype.s=function(){this.Ib||(this.fb&&p.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},p.ic.prototype.l=function(e){this.Jb=e,p.a.K.za(e,this.fb=this.s.bind(this))},p.T=function(){p.a.Ab(this,m),m.qb(this)};var m={qb:function(e){e.U={change:[]},e.sc=1},subscribe:function(e,t,i){var n=this;i=i||"change";var r=new p.ic(n,t?e.bind(t):e,(function(){p.a.Pa(n.U[i],r),n.hb&&n.hb(i)}));return n.Qa&&n.Qa(i),n.U[i]||(n.U[i]=[]),n.U[i].push(r),r},notifySubscribers:function(e,t){if("change"===(t=t||"change")&&this.Gb(),this.Wa(t)){var i="change"===t&&this.ed||this.U[t].slice(0);try{p.u.xc();for(var n,r=0;n=i[r];++r)n.Ib||n.lc(e)}finally{p.u.end()}}},ob:function(){return this.sc},Dd:function(e){return this.ob()!==e},Gb:function(){++this.sc},ub:function(e){var t,i,n,r,o,a=this,s=p.O(a);a.gb||(a.gb=a.notifySubscribers,a.notifySubscribers=h);var l=e((function(){a.Ja=!1,s&&r===a&&(r=a.nc?a.nc():a());var e=i||o&&a.sb(n,r);o=i=t=!1,e&&a.gb(n=r)}));a.qc=function(e,i){i&&a.Ja||(o=!i),a.ed=a.U.change.slice(0),a.Ja=t=!0,r=e,l()},a.pc=function(e){t||(n=e,a.gb(e,"beforeChange"))},a.rc=function(){o=!0},a.gd=function(){a.sb(n,a.v(!0))&&(i=!0)}},Wa:function(e){return this.U[e]&&this.U[e].length},Bd:function(e){if(e)return this.U[e]&&this.U[e].length||0;var t=0;return p.a.P(this.U,(function(e,i){"dirty"!==e&&(t+=i.length)})),t},sb:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},toString:function(){return"[object Object]"},extend:function(e){var t=this;return e&&p.a.P(e,(function(e,i){var n=p.Ta[e];"function"==typeof n&&(t=n(t,i)||t)})),t}};p.L(m,"init",m.qb),p.L(m,"subscribe",m.subscribe),p.L(m,"extend",m.extend),p.L(m,"getSubscriptionsCount",m.Bd),p.a.Ba&&p.a.setPrototypeOf(m,Function.prototype),p.T.fn=m,p.Qc=function(e){return null!=e&&"function"==typeof e.subscribe&&"function"==typeof e.notifySubscribers},p.b("subscribable",p.T),p.b("isSubscribable",p.Qc),p.S=p.u=function(){function e(e){n.push(i),i=e}function t(){i=n.pop()}var i,n=[],r=0;return{xc:e,end:t,cc:function(e){if(i){if(!p.Qc(e))throw Error("Only subscribable things can act as dependencies");i.od.call(i.pd,e,e.fd||(e.fd=++r))}},G:function(i,n,r){try{return e(),i.apply(n,r||[])}finally{t()}},qa:function(){if(i)return i.o.qa()},Va:function(){if(i)return i.o.Va()},Ya:function(){if(i)return i.Ya},o:function(){if(i)return i.o}}}(),p.b("computedContext",p.S),p.b("computedContext.getDependenciesCount",p.S.qa),p.b("computedContext.getDependencies",p.S.Va),p.b("computedContext.isInitial",p.S.Ya),p.b("computedContext.registerDependency",p.S.cc),p.b("ignoreDependencies",p.Yd=p.u.G);var g=p.a.Da("_latestValue");p.ta=function(e){function t(){return 0<arguments.length?(t.sb(t[g],arguments[0])&&(t.ya(),t[g]=arguments[0],t.xa()),this):(p.u.cc(t),t[g])}return t[g]=e,p.a.Ba||p.a.extend(t,p.T.fn),p.T.fn.qb(t),p.a.Ab(t,x),p.options.deferUpdates&&p.Ta.deferred(t,!0),t};var x={equalityComparer:l,v:function(){return this[g]},xa:function(){this.notifySubscribers(this[g],"spectate"),this.notifySubscribers(this[g])},ya:function(){this.notifySubscribers(this[g],"beforeChange")}};p.a.Ba&&p.a.setPrototypeOf(x,p.T.fn);var v=p.ta.Ma="__ko_proto__";x[v]=p.ta,p.O=function(e){if((e="function"==typeof e&&e[v])&&e!==x[v]&&e!==p.o.fn[v])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e},p.Za=function(e){return"function"==typeof e&&(e[v]===x[v]||e[v]===p.o.fn[v]&&e.Nc)},p.b("observable",p.ta),p.b("isObservable",p.O),p.b("isWriteableObservable",p.Za),p.b("isWritableObservable",p.Za),p.b("observable.fn",x),p.L(x,"peek",x.v),p.L(x,"valueHasMutated",x.xa),p.L(x,"valueWillMutate",x.ya),p.Ha=function(e){if("object"!=typeof(e=e||[])||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=p.ta(e),p.a.Ab(e,p.Ha.fn),e.extend({trackArrayChanges:!0})},p.Ha.fn={remove:function(e){for(var t=this.v(),i=[],n="function"!=typeof e||p.O(e)?function(t){return t===e}:e,r=0;r<t.length;r++){var o=t[r];if(n(o)){if(0===i.length&&this.ya(),t[r]!==o)throw Error("Array modified during remove; cannot remove item");i.push(o),t.splice(r,1),r--}}return i.length&&this.xa(),i},removeAll:function(t){if(t===e){var i=this.v(),n=i.slice(0);return this.ya(),i.splice(0,i.length),this.xa(),n}return t?this.remove((function(e){return 0<=p.a.A(t,e)})):[]},destroy:function(e){var t=this.v(),i="function"!=typeof e||p.O(e)?function(t){return t===e}:e;this.ya();for(var n=t.length-1;0<=n;n--){var r=t[n];i(r)&&(r._destroy=!0)}this.xa()},destroyAll:function(t){return t===e?this.destroy((function(){return!0})):t?this.destroy((function(e){return 0<=p.a.A(t,e)})):[]},indexOf:function(e){var t=this();return p.a.A(t,e)},replace:function(e,t){var i=this.indexOf(e);0<=i&&(this.ya(),this.v()[i]=t,this.xa())},sorted:function(e){var t=this().slice(0);return e?t.sort(e):t.sort()},reversed:function(){return this().slice(0).reverse()}},p.a.Ba&&p.a.setPrototypeOf(p.Ha.fn,p.ta.fn),p.a.D("pop push reverse shift sort splice unshift".split(" "),(function(e){p.Ha.fn[e]=function(){var t=this.v();this.ya(),this.zc(t,e,arguments);var i=t[e].apply(t,arguments);return this.xa(),i===t?this:i}})),p.a.D(["slice"],(function(e){p.Ha.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}})),p.Pc=function(e){return p.O(e)&&"function"==typeof e.remove&&"function"==typeof e.push},p.b("observableArray",p.Ha),p.b("isObservableArray",p.Pc),p.Ta.trackArrayChanges=function(t,i){function n(){function e(){if(u){var e,i=[].concat(t.v()||[]);t.Wa("arrayChange")&&((!l||1<u)&&(l=p.a.Pb(a,i,t.Ob)),e=l),a=i,l=null,u=0,e&&e.length&&t.notifySubscribers(e,"arrayChange")}}s?e():(s=!0,o=t.subscribe((function(){++u}),null,"spectate"),a=[].concat(t.v()||[]),l=null,r=t.subscribe(e))}if(t.Ob={},i&&"object"==typeof i&&p.a.extend(t.Ob,i),t.Ob.sparse=!0,!t.zc){var r,o,a,s=!1,l=null,u=0,c=t.Qa,h=t.hb;t.Qa=function(e){c&&c.call(t,e),"arrayChange"===e&&n()},t.hb=function(i){h&&h.call(t,i),"arrayChange"!==i||t.Wa("arrayChange")||(r&&r.s(),o&&o.s(),o=r=null,s=!1,a=e)},t.zc=function(e,t,i){function n(e,t,i){return r[r.length]={status:e,value:t,index:i}}if(s&&!u){var r=[],o=e.length,a=i.length,c=0;switch(t){case"push":c=o;case"unshift":for(t=0;t<a;t++)n("added",i[t],c+t);break;case"pop":c=o-1;case"shift":o&&n("deleted",e[c],c);break;case"splice":t=Math.min(Math.max(0,0>i[0]?o+i[0]:i[0]),o),o=1===a?o:Math.min(t+(i[1]||0),o),a=t+a-2,c=Math.max(o,a);for(var h=[],d=[],f=2;t<c;++t,++f)t<o&&d.push(n("deleted",e[t],t)),t<a&&h.push(n("added",i[f],t));p.a.Kc(d,h);break;default:return}l=r}}}};var y=p.a.Da("_state");p.o=p.$=function(t,i,n){function r(){if(0<arguments.length){if("function"!=typeof o)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return o.apply(a.nb,arguments),this}return a.ra||p.u.cc(r),(a.ka||a.J&&r.Xa())&&r.ha(),a.X}if("object"==typeof t?n=t:(n=n||{},t&&(n.read=t)),"function"!=typeof n.read)throw Error("Pass a function that returns the value of the ko.computed");var o=n.write,a={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:n.read,nb:i||n.owner,l:n.disposeWhenNodeIsRemoved||n.l||null,Sa:n.disposeWhen||n.Sa,Rb:null,I:{},V:0,Ic:null};return r[y]=a,r.Nc="function"==typeof o,p.a.Ba||p.a.extend(r,p.T.fn),p.T.fn.qb(r),p.a.Ab(r,$),n.pure?(a.wb=!0,a.J=!0,p.a.extend(r,b)):n.deferEvaluation&&p.a.extend(r,T),p.options.deferUpdates&&p.Ta.deferred(r,!0),a.l&&(a.jc=!0,a.l.nodeType||(a.l=null)),a.J||n.deferEvaluation||r.ha(),a.l&&r.ja()&&p.a.K.za(a.l,a.Rb=function(){r.s()}),r};var $={equalityComparer:l,qa:function(){return this[y].V},Va:function(){var e=[];return p.a.P(this[y].I,(function(t,i){e[i.Ka]=i.da})),e},Vb:function(e){if(!this[y].V)return!1;var t=this.Va();return-1!==p.a.A(t,e)||!!p.a.Lb(t,(function(t){return t.Vb&&t.Vb(e)}))},uc:function(e,t,i){if(this[y].wb&&t===this)throw Error("A 'pure' computed must not be called recursively");this[y].I[e]=i,i.Ka=this[y].V++,i.La=t.ob()},Xa:function(){var e,t,i=this[y].I;for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)&&(t=i[e],this.Ia&&t.da.Ja||t.da.Dd(t.La)))return!0},Jd:function(){this.Ia&&!this[y].rb&&this.Ia(!1)},ja:function(){var e=this[y];return e.ka||0<e.V},Rd:function(){this.Ja?this[y].ka&&(this[y].sa=!0):this.Hc()},$c:function(e){if(e.Hb){var t=e.subscribe(this.Jd,this,"dirty"),i=e.subscribe(this.Rd,this);return{da:e,s:function(){t.s(),i.s()}}}return e.subscribe(this.Hc,this)},Hc:function(){var e=this,t=e.throttleEvaluation;t&&0<=t?(clearTimeout(this[y].Ic),this[y].Ic=p.a.setTimeout((function(){e.ha(!0)}),t)):e.Ia?e.Ia(!0):e.ha(!0)},ha:function(e){var t=this[y],i=t.Sa,n=!1;if(!t.rb&&!t.ra){if(t.l&&!p.a.Sb(t.l)||i&&i()){if(!t.jc)return void this.s()}else t.jc=!1;t.rb=!0;try{n=this.zd(e)}finally{t.rb=!1}return n}},zd:function(t){var i=this[y],n=!1,r=i.wb?e:!i.V;n={qd:this,mb:i.I,Qb:i.V},p.u.xc({pd:n,od:f,o:this,Ya:r}),i.I={},i.V=0;var o=this.yd(i,n);return i.V?n=this.sb(i.X,o):(this.s(),n=!0),n&&(i.J?this.Gb():this.notifySubscribers(i.X,"beforeChange"),i.X=o,this.notifySubscribers(i.X,"spectate"),!i.J&&t&&this.notifySubscribers(i.X),this.rc&&this.rc()),r&&this.notifySubscribers(i.X,"awake"),n},yd:function(e,t){try{var i=e.Wc;return e.nb?i.call(e.nb):i()}finally{p.u.end(),t.Qb&&!e.J&&p.a.P(t.mb,d),e.sa=e.ka=!1}},v:function(e){var t=this[y];return(t.ka&&(e||!t.V)||t.J&&this.Xa())&&this.ha(),t.X},ub:function(e){p.T.fn.ub.call(this,e),this.nc=function(){return this[y].J||(this[y].sa?this.ha():this[y].ka=!1),this[y].X},this.Ia=function(e){this.pc(this[y].X),this[y].ka=!0,e&&(this[y].sa=!0),this.qc(this,!e)}},s:function(){var t=this[y];!t.J&&t.I&&p.a.P(t.I,(function(e,t){t.s&&t.s()})),t.l&&t.Rb&&p.a.K.yb(t.l,t.Rb),t.I=e,t.V=0,t.ra=!0,t.sa=!1,t.ka=!1,t.J=!1,t.l=e,t.Sa=e,t.Wc=e,this.Nc||(t.nb=e)}},b={Qa:function(e){var t=this,i=t[y];if(!i.ra&&i.J&&"change"==e){if(i.J=!1,i.sa||t.Xa())i.I=null,i.V=0,t.ha()&&t.Gb();else{var n=[];p.a.P(i.I,(function(e,t){n[t.Ka]=e})),p.a.D(n,(function(e,n){var r=i.I[e],o=t.$c(r.da);o.Ka=n,o.La=r.La,i.I[e]=o})),t.Xa()&&t.ha()&&t.Gb()}i.ra||t.notifySubscribers(i.X,"awake")}},hb:function(t){var i=this[y];i.ra||"change"!=t||this.Wa("change")||(p.a.P(i.I,(function(e,t){t.s&&(i.I[e]={da:t.da,Ka:t.Ka,La:t.La},t.s())})),i.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var e=this[y];return e.J&&(e.sa||this.Xa())&&this.ha(),p.T.fn.ob.call(this)}},T={Qa:function(e){"change"!=e&&"beforeChange"!=e||this.v()}};p.a.Ba&&p.a.setPrototypeOf($,p.T.fn);var C=p.ta.Ma;$[C]=p.o,p.Oc=function(e){return"function"==typeof e&&e[C]===$[C]},p.Fd=function(e){return p.Oc(e)&&e[y]&&e[y].wb},p.b("computed",p.o),p.b("dependentObservable",p.o),p.b("isComputed",p.Oc),p.b("isPureComputed",p.Fd),p.b("computed.fn",$),p.L($,"peek",$.v),p.L($,"dispose",$.s),p.L($,"isActive",$.ja),p.L($,"getDependenciesCount",$.qa),p.L($,"getDependencies",$.Va),p.xb=function(e,t){return"function"==typeof e?p.o(e,t,{pure:!0}):((e=p.a.extend({},e)).pure=!0,p.o(e,t))},p.b("pureComputed",p.xb),function(){function t(r,o,a){if(a=a||new n,"object"!=typeof(r=o(r))||null===r||r===e||r instanceof RegExp||r instanceof Date||r instanceof String||r instanceof Number||r instanceof Boolean)return r;var s=r instanceof Array?[]:{};return a.save(r,s),i(r,(function(i){var n=o(r[i]);switch(typeof n){case"boolean":case"number":case"string":case"function":s[i]=n;break;case"object":case"undefined":var l=a.get(n);s[i]=l!==e?l:t(n,o,a)}})),s}function i(e,t){if(e instanceof Array){for(var i=0;i<e.length;i++)t(i);"function"==typeof e.toJSON&&t("toJSON")}else for(i in e)t(i)}function n(){this.keys=[],this.values=[]}p.ad=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return t(e,(function(e){for(var t=0;p.O(e)&&10>t;t++)e=e();return e}))},p.toJSON=function(e,t,i){return e=p.ad(e),p.a.hc(e,t,i)},n.prototype={constructor:n,save:function(e,t){var i=p.a.A(this.keys,e);0<=i?this.values[i]=t:(this.keys.push(e),this.values.push(t))},get:function(t){return 0<=(t=p.a.A(this.keys,t))?this.values[t]:e}}}(),p.b("toJS",p.ad),p.b("toJSON",p.toJSON),p.Wd=function(e,t,i){function n(t){var n=p.xb(e,i).extend({ma:"always"}),r=n.subscribe((function(e){e&&(r.s(),t(e))}));return n.notifySubscribers(n.v()),r}return"function"!=typeof Promise||t?n(t.bind(i)):new Promise(n)},p.b("when",p.Wd),p.w={M:function(t){switch(p.a.R(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?p.a.g.get(t,p.c.options.$b):7>=p.a.W?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?p.w.M(t.options[t.selectedIndex]):e;default:return t.value}},cb:function(t,i,n){switch(p.a.R(t)){case"option":"string"==typeof i?(p.a.g.set(t,p.c.options.$b,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i):(p.a.g.set(t,p.c.options.$b,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:"");break;case"select":(""===i||null===i)&&(i=e);for(var r,o=-1,a=0,s=t.options.length;a<s;++a)if((r=p.w.M(t.options[a]))==i||""===r&&i===e){o=a;break}(n||0<=o||i===e&&1<t.size)&&(t.selectedIndex=o,6===p.a.W&&p.a.setTimeout((function(){t.selectedIndex=o}),0));break;default:(null===i||i===e)&&(i=""),t.value=i}}},p.b("selectExtensions",p.w),p.b("selectExtensions.readValue",p.w.M),p.b("selectExtensions.writeValue",p.w.cb),p.m=function(){function e(e){123===(e=p.a.Db(e)).charCodeAt(0)&&(e=e.slice(1,-1));var t,i=[],a=(e+="\n,").match(n),s=[],l=0;if(1<a.length){for(var u,c=0;u=a[c];++c){var h=u.charCodeAt(0);if(44===h){if(0>=l){i.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=l=0,s=[];continue}}else if(58===h){if(!l&&!t&&1===s.length){t=s.pop();continue}}else{if(47===h&&1<u.length&&(47===u.charCodeAt(1)||42===u.charCodeAt(1)))continue;47===h&&c&&1<u.length?(h=a[c-1].match(r))&&!o[h[0]]&&(a=(e=e.substr(e.indexOf(u)+1)).match(n),c=-1,u="/"):40===h||123===h||91===h?++l:41===h||125===h||93===h?--l:t||s.length||34!==h&&39!==h||(u=u.slice(1,-1))}s.push(u)}if(0<l)throw Error("Unbalanced parentheses, braces, or brackets")}return i}var t=["true","false","null","undefined"],i=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,n=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),r=/[\])"'A-Za-z0-9_$]+$/,o={in:1,return:1,typeof:1},a={};return{Ra:[],wa:a,ac:e,vb:function(n,r){function o(e,n){var r;if(!c){var h=p.getBindingHandler(e);if(h&&h.preprocess&&!(n=h.preprocess(n,e,o)))return;(h=a[e])&&(r=n,0<=p.a.A(t,r)?r=!1:(h=r.match(i),r=null!==h&&(h[1]?"Object("+h[1]+")"+h[2]:r)),h=r),h&&l.push("'"+("string"==typeof a[e]?a[e]:e)+"':function(_z){"+r+"=_z}")}u&&(n="function(){return "+n+" }"),s.push("'"+e+"':"+n)}var s=[],l=[],u=(r=r||{}).valueAccessors,c=r.bindingParams,h="string"==typeof n?e(n):n;return p.a.D(h,(function(e){o(e.key||e.unknown,e.value)})),l.length&&o("_ko_property_writers","{"+l.join(",")+" }"),s.join(",")},Id:function(e,t){for(var i=0;i<e.length;i++)if(e[i].key==t)return!0;return!1},eb:function(e,t,i,n,r){e&&p.O(e)?!p.Za(e)||r&&e.v()===n||e(n):(e=t.get("_ko_property_writers"))&&e[i]&&e[i](n)}}}(),p.b("expressionRewriting",p.m),p.b("expressionRewriting.bindingRewriteValidators",p.m.Ra),p.b("expressionRewriting.parseObjectLiteral",p.m.ac),p.b("expressionRewriting.preProcessBindings",p.m.vb),p.b("expressionRewriting._twoWayBindings",p.m.wa),p.b("jsonExpressionRewriting",p.m),p.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",p.m.vb),function(){function e(e){return 8==e.nodeType&&a.test(o?e.text:e.nodeValue)}function t(e){return 8==e.nodeType&&s.test(o?e.text:e.nodeValue)}function n(i,n){for(var r=i,o=1,a=[];r=r.nextSibling;){if(t(r)&&(p.a.g.set(r,u,!0),0==--o))return a;a.push(r),e(r)&&o++}if(!n)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function r(e,t){var i=n(e,t);return i?0<i.length?i[i.length-1].nextSibling:e.nextSibling:null}var o=i&&"\x3c!--test--\x3e"===i.createComment("test").text,a=o?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,s=o?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0},u="__ko_matchedEndComment__";p.h={ea:{},childNodes:function(t){return e(t)?n(t):t.childNodes},Ea:function(t){if(e(t))for(var i=0,n=(t=p.h.childNodes(t)).length;i<n;i++)p.removeNode(t[i]);else p.a.Tb(t)},va:function(t,i){if(e(t)){p.h.Ea(t);for(var n=t.nextSibling,r=0,o=i.length;r<o;r++)n.parentNode.insertBefore(i[r],n)}else p.a.va(t,i)},Vc:function(t,i){var n;e(t)?(n=t.nextSibling,t=t.parentNode):n=t.firstChild,n?i!==n&&t.insertBefore(i,n):t.appendChild(i)},Wb:function(t,i,n){n?(n=n.nextSibling,e(t)&&(t=t.parentNode),n?i!==n&&t.insertBefore(i,n):t.appendChild(i)):p.h.Vc(t,i)},firstChild:function(i){if(e(i))return!i.nextSibling||t(i.nextSibling)?null:i.nextSibling;if(i.firstChild&&t(i.firstChild))throw Error("Found invalid end comment, as the first child of "+i);return i.firstChild},nextSibling:function(i){if(e(i)&&(i=r(i)),i.nextSibling&&t(i.nextSibling)){var n=i.nextSibling;if(t(n)&&!p.a.g.get(n,u))throw Error("Found end comment without a matching opening comment, as child of "+i);return null}return i.nextSibling},Cd:e,Vd:function(e){return(e=(o?e.text:e.nodeValue).match(a))?e[1]:null},Sc:function(i){if(l[p.a.R(i)]){var n=i.firstChild;if(n)do{if(1===n.nodeType){var o,a=null;if(o=n.firstChild)do{if(a)a.push(o);else if(e(o)){var s=r(o,!0);s?o=s:a=[o]}else t(o)&&(a=[o])}while(o=o.nextSibling);if(o=a)for(a=n.nextSibling,s=0;s<o.length;s++)a?i.insertBefore(o[s],a):i.appendChild(o[s])}}while(n=n.nextSibling)}}}}(),p.b("virtualElements",p.h),p.b("virtualElements.allowedBindings",p.h.ea),p.b("virtualElements.emptyNode",p.h.Ea),p.b("virtualElements.insertAfter",p.h.Wb),p.b("virtualElements.prepend",p.h.Vc),p.b("virtualElements.setDomNodeChildren",p.h.va),p.ga=function(){this.nd={}},p.a.extend(p.ga.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||p.j.getComponentNameForNode(e);case 8:return p.h.Cd(e);default:return!1}},getBindings:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e):null;return p.j.tc(i,e,t,!1)},getBindingAccessors:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e,{valueAccessors:!0}):null;return p.j.tc(i,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return p.h.Vd(e);default:return null}},parseBindingsString:function(e,t,i,n){try{var r,o=this.nd,a=e+(n&&n.valueAccessors||"");if(!(r=o[a])){var s,l="with($context){with($data||{}){return{"+p.m.vb(e,n)+"}}}";s=new Function("$context","$element",l),r=o[a]=s}return r(t,i)}catch(t){throw t.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+t.message,t}}}),p.ga.instance=new p.ga,p.b("bindingProvider",p.ga),function(){function n(e){var t=(e=p.a.g.get(e,b))&&e.N;t&&(e.N=null,t.Tc())}function o(e,t,i){this.node=e,this.yc=t,this.kb=[],this.H=!1,t.N||p.a.K.za(e,n),i&&i.N&&(i.N.kb.push(e),this.Kb=i)}function a(e){return function(){return e}}function s(e){return e()}function l(e){return p.a.Ga(p.u.G(e),(function(t,i){return function(){return e()[i]}}))}function u(e,t,i){return"function"==typeof e?l(e.bind(null,t,i)):p.a.Ga(e,a)}function c(e,t){return l(this.getBindings.bind(this,e,t))}function h(e,t){var i=p.h.firstChild(t);if(i){var n,r=p.ga.instance,o=r.preprocessNode;if(o){for(;n=i;)i=p.h.nextSibling(n),o.call(r,n);i=p.h.firstChild(t)}for(;n=i;)i=p.h.nextSibling(n),d(e,n)}p.i.ma(t,p.i.H)}function d(e,t){var i=e,n=1===t.nodeType;n&&p.h.Sc(t),(n||p.ga.instance.nodeHasBindings(t))&&(i=_(t,null,e).bindingContextForDescendants),i&&!y[p.a.R(t)]&&h(i,t)}function f(e){var t=[],i={},n=[];return p.a.P(e,(function r(o){if(!i[o]){var a=p.getBindingHandler(o);a&&(a.after&&(n.push(o),p.a.D(a.after,(function(t){if(e[t]){if(-1!==p.a.A(n,t))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+n.join(", "));r(t)}})),n.length--),t.push({key:o,Mc:a})),i[o]=!0}})),t}function _(t,i,n){var r,o=p.a.g.Ub(t,b,{}),a=o.hd;if(!i){if(a)throw Error("You cannot apply bindings multiple times to the same element.");o.hd=!0}if(a||(o.context=n),o.Zb||(o.Zb={}),i&&"function"!=typeof i)r=i;else{var l=p.ga.instance,u=l.getBindingAccessors||c,h=p.$((function(){return(r=i?i(n,t):u.call(l,t,n))&&(n[g]&&n[g](),n[v]&&n[v]()),r}),null,{l:t});r&&h.ja()||(h=null)}var d,_=n;if(r){var m=function(){return p.a.Ga(h?h():r,s)},x=h?function(e){return function(){return s(h()[e])}}:function(e){return r[e]};m.get=function(e){return r[e]&&s(x(e))},m.has=function(e){return e in r},p.i.H in r&&p.i.subscribe(t,p.i.H,(function(){var e=(0,r[p.i.H])();if(e){var i=p.h.childNodes(t);i.length&&e(i,p.Ec(i[0]))}})),p.i.pa in r&&(_=p.i.Cb(t,n),p.i.subscribe(t,p.i.pa,(function(){var e=(0,r[p.i.pa])();e&&p.h.firstChild(t)&&e(t)}))),o=f(r),p.a.D(o,(function(i){var n=i.Mc.init,o=i.Mc.update,a=i.key;if(8===t.nodeType&&!p.h.ea[a])throw Error("The binding '"+a+"' cannot be used with virtual elements");try{"function"==typeof n&&p.u.G((function(){var i=n(t,x(a),m,_.$data,_);if(i&&i.controlsDescendantBindings){if(d!==e)throw Error("Multiple bindings ("+d+" and "+a+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");d=a}})),"function"==typeof o&&p.$((function(){o(t,x(a),m,_.$data,_)}),null,{l:t})}catch(e){throw e.message='Unable to process binding "'+a+": "+r[a]+'"\nMessage: '+e.message,e}}))}return{shouldBindDescendants:o=d===e,bindingContextForDescendants:o&&_}}function m(t,i){return t&&t instanceof p.fa?t:new p.fa(t,e,e,i)}var g=p.a.Da("_subscribable"),x=p.a.Da("_ancestorBindingInfo"),v=p.a.Da("_dataDependency");p.c={};var y={script:!0,textarea:!0,template:!0};p.getBindingHandler=function(e){return p.c[e]};var $={};p.fa=function(t,i,n,r,o){function a(){var e=h?c():c,t=p.a.f(e);return i?(p.a.extend(l,i),x in i&&(l[x]=i[x])):(l.$parents=[],l.$root=t,l.ko=p),l[g]=s,u?t=l.$data:(l.$rawData=e,l.$data=t),n&&(l[n]=t),r&&r(l,i,t),i&&i[g]&&!p.S.o().Vb(i[g])&&i[g](),d&&(l[v]=d),l.$data}var s,l=this,u=t===$,c=u?e:t,h="function"==typeof c&&!p.O(c),d=o&&o.dataDependency;o&&o.exportDependencies?a():((s=p.xb(a)).v(),s.ja()?s.equalityComparer=null:l[g]=e)},p.fa.prototype.createChildContext=function(e,t,i,n){if(!n&&t&&"object"==typeof t&&(t=(n=t).as,i=n.extend),t&&n&&n.noChildContext){var r="function"==typeof e&&!p.O(e);return new p.fa($,this,null,(function(n){i&&i(n),n[t]=r?e():e}),n)}return new p.fa(e,this,t,(function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),i&&i(e)}),n)},p.fa.prototype.extend=function(e,t){return new p.fa($,this,null,(function(t){p.a.extend(t,"function"==typeof e?e(t):e)}),t)};var b=p.a.g.Z();o.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},o.prototype.sd=function(e){p.a.Pa(this.kb,e),!this.kb.length&&this.H&&this.Cc()},o.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,p.a.K.yb(this.node,n),p.i.ma(this.node,p.i.pa),this.Tc())},p.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(e,t,i,n,r){var o=p.a.g.Ub(e,b,{});return o.Fa||(o.Fa=new p.T),r&&r.notifyImmediately&&o.Zb[t]&&p.u.G(i,n,[e]),o.Fa.subscribe(i,n,t)},ma:function(t,i){var n=p.a.g.get(t,b);if(n&&(n.Zb[i]=!0,n.Fa&&n.Fa.notifySubscribers(t,i),i==p.i.H))if(n.N)n.N.Cc();else if(n.N===e&&n.Fa&&n.Fa.Wa(p.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")},Cb:function(e,t){var i=p.a.g.Ub(e,b,{});return i.N||(i.N=new o(e,i,t[x])),t[x]==i?t:t.extend((function(e){e[x]=i}))}},p.Td=function(e){return(e=p.a.g.get(e,b))&&e.context},p.ib=function(e,t,i){return 1===e.nodeType&&p.h.Sc(e),_(e,t,m(i))},p.ld=function(e,t,i){return i=m(i),p.ib(e,u(t,i,e),i)},p.Oa=function(e,t){1!==t.nodeType&&8!==t.nodeType||h(m(e),t)},p.vc=function(e,n,o){if(!r&&t.jQuery&&(r=t.jQuery),2>arguments.length){if(!(n=i.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!n||1!==n.nodeType&&8!==n.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");d(m(e,o),n)},p.Dc=function(t){return!t||1!==t.nodeType&&8!==t.nodeType?e:p.Td(t)},p.Ec=function(t){return(t=p.Dc(t))?t.$data:e},p.b("bindingHandlers",p.c),p.b("bindingEvent",p.i),p.b("bindingEvent.subscribe",p.i.subscribe),p.b("bindingEvent.startPossiblyAsyncContentBinding",p.i.Cb),p.b("applyBindings",p.vc),p.b("applyBindingsToDescendants",p.Oa),p.b("applyBindingAccessorsToNode",p.ib),p.b("applyBindingsToNode",p.ld),p.b("contextFor",p.Dc),p.b("dataFor",p.Ec)}(),function(e){function t(t,n){var a,s=Object.prototype.hasOwnProperty.call(r,t)?r[t]:e;s?s.subscribe(n):((s=r[t]=new p.T).subscribe(n),i(t,(function(e,i){var n=!(!i||!i.synchronous);o[t]={definition:e,Gd:n},delete r[t],a||n?s.notifySubscribers(e):p.na.zb((function(){s.notifySubscribers(e)}))})),a=!0)}function i(e,t){n("getConfig",[e],(function(i){i?n("loadComponent",[e,i],(function(e){t(e,i)})):t(null,null)}))}function n(t,i,r,o){o||(o=p.j.loaders.slice(0));var a=o.shift();if(a){var s=a[t];if(s){var l=!1;if(s.apply(a,i.concat((function(e){l?r(null):null!==e?r(e):n(t,i,r,o)})))!==e&&(l=!0,!a.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else n(t,i,r,o)}else r(null)}var r={},o={};p.j={get:function(i,n){var r=Object.prototype.hasOwnProperty.call(o,i)?o[i]:e;r?r.Gd?p.u.G((function(){n(r.definition)})):p.na.zb((function(){n(r.definition)})):t(i,n)},Bc:function(e){delete o[e]},oc:n},p.j.loaders=[],p.b("components",p.j),p.b("components.get",p.j.get),p.b("components.clearCachedDefinition",p.j.Bc)}(),function(){function e(e,t,i,n){function r(){0==--s&&n(o)}var o={},s=2,l=i.template;i=i.viewModel,l?a(t,l,(function(t){p.j.oc("loadTemplate",[e,t],(function(e){o.template=e,r()}))})):r(),i?a(t,i,(function(t){p.j.oc("loadViewModel",[e,t],(function(e){o[c]=e,r()}))})):r()}function n(e,t,i){if("function"==typeof t)i((function(e){return new t(e)}));else if("function"==typeof t[c])i(t[c]);else if("instance"in t){var r=t.instance;i((function(){return r}))}else"viewModel"in t?n(e,t.viewModel,i):e("Unknown viewModel value: "+t)}function r(e){switch(p.a.R(e)){case"script":return p.a.ua(e.text);case"textarea":return p.a.ua(e.value);case"template":if(o(e.content))return p.a.Ca(e.content.childNodes)}return p.a.Ca(e.childNodes)}function o(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function a(e,i,n){"string"==typeof i.require?s||t.require?(s||t.require)([i.require],(function(e){e&&"object"==typeof e&&e.Xd&&e.default&&(e=e.default),n(e)})):e("Uses require, but no AMD loader is present"):n(i)}function l(e){return function(t){throw Error("Component '"+e+"': "+t)}}var u={};p.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(p.j.tb(e))throw Error("Component "+e+" is already registered");u[e]=t},p.j.tb=function(e){return Object.prototype.hasOwnProperty.call(u,e)},p.j.unregister=function(e){delete u[e],p.j.Bc(e)},p.j.Fc={getConfig:function(e,t){t(p.j.tb(e)?u[e]:null)},loadComponent:function(t,i,n){var r=l(t);a(r,i,(function(i){e(t,r,i,n)}))},loadTemplate:function(e,n,a){if(e=l(e),"string"==typeof n)a(p.a.ua(n));else if(n instanceof Array)a(n);else if(o(n))a(p.a.la(n.childNodes));else if(n.element)if(n=n.element,t.HTMLElement?n instanceof HTMLElement:n&&n.tagName&&1===n.nodeType)a(r(n));else if("string"==typeof n){var s=i.getElementById(n);s?a(r(s)):e("Cannot find element with ID "+n)}else e("Unknown element type: "+n);else e("Unknown template value: "+n)},loadViewModel:function(e,t,i){n(l(e),t,i)}};var c="createViewModel";p.b("components.register",p.j.register),p.b("components.isRegistered",p.j.tb),p.b("components.unregister",p.j.unregister),p.b("components.defaultLoader",p.j.Fc),p.j.loaders.push(p.j.Fc),p.j.dd=u}(),function(){function e(e,i){if(n=e.getAttribute("params")){var n=t.parseBindingsString(n,i,e,{valueAccessors:!0,bindingParams:!0}),r=(n=p.a.Ga(n,(function(t){return p.o(t,null,{l:e})})),p.a.Ga(n,(function(t){var i=t.v();return t.ja()?p.o({read:function(){return p.a.f(t())},write:p.Za(i)&&function(e){t()(e)},l:e}):i})));return Object.prototype.hasOwnProperty.call(r,"$raw")||(r.$raw=n),r}return{$raw:{}}}p.j.getComponentNameForNode=function(e){var t=p.a.R(e);if(p.j.tb(t)&&(-1!=t.indexOf("-")||""+e=="[object HTMLUnknownElement]"||8>=p.a.W&&e.tagName===t))return t},p.j.tc=function(t,i,n,r){if(1===i.nodeType){var o=p.j.getComponentNameForNode(i);if(o){if((t=t||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var a={name:o,params:e(i,n)};t.component=r?function(){return a}:a}}return t};var t=new p.ga;9>p.a.W&&(p.j.register=function(e){return function(t){return e.apply(this,arguments)}}(p.j.register),i.createDocumentFragment=function(e){return function(){var t=e();return p.j.dd,t}}(i.createDocumentFragment))}(),function(){function e(e,t,i){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=p.a.Ca(t),p.h.va(i,e)}function t(e,t,i){var n=e.createViewModel;return n?n.call(e,t,i):t}var i=0;p.c.component={init:function(n,r,o,a,s){function l(){var e=u&&u.dispose;"function"==typeof e&&e.call(u),h&&h.s(),c=u=h=null}var u,c,h,d=p.a.la(p.h.childNodes(n));return p.h.Ea(n),p.a.K.za(n,l),p.o((function(){var o,a,f=p.a.f(r());if("string"==typeof f?o=f:(o=p.a.f(f.name),a=p.a.f(f.params)),!o)throw Error("No component name specified");var _=p.i.Cb(n,s),m=c=++i;p.j.get(o,(function(i){if(c===m){if(l(),!i)throw Error("Unknown component '"+o+"'");e(o,i,n);var r=t(i,a,{element:n,templateNodes:d});i=_.createChildContext(r,{extend:function(e){e.$component=r,e.$componentTemplateNodes=d}}),r&&r.koDescendantsComplete&&(h=p.i.subscribe(n,p.i.pa,r.koDescendantsComplete,r)),u=r,p.Oa(i,n)}}))}),null,{l:n}),{controlsDescendantBindings:!0}}},p.h.ea.component=!0}();var S={class:"className",for:"htmlFor"};p.c.attr={update:function(t,i){var n=p.a.f(i())||{};p.a.P(n,(function(i,n){n=p.a.f(n);var r=i.indexOf(":"),o=(r="lookupNamespaceURI"in t&&0<r&&t.lookupNamespaceURI(i.substr(0,r)),!1===n||null===n||n===e);o?r?t.removeAttributeNS(r,i):t.removeAttribute(i):n=n.toString(),8>=p.a.W&&i in S?(i=S[i],o?t.removeAttribute(i):t[i]=n):o||(r?t.setAttributeNS(r,i,n):t.setAttribute(i,n)),"name"===i&&p.a.Yc(t,o?"":n)}))}},p.c.checked={after:["value","attr"],init:function(t,i,n){function r(){var r=t.checked,o=a();if(!p.S.Ya()&&(r||!l&&!p.S.qa())){var u=p.u.G(i);if(c){var d=h?u.v():u,_=f;f=o,_!==o?r&&(p.a.Na(d,o,!0),p.a.Na(d,_,!1)):p.a.Na(d,o,r),h&&p.Za(u)&&u(d)}else s&&(o===e?o=r:r||(o=e)),p.m.eb(u,n,"checked",o,!0)}}function o(){var n=p.a.f(i()),r=a();c?(t.checked=0<=p.a.A(n,r),f=r):t.checked=s&&r===e?!!n:a()===n}var a=p.xb((function(){return n.has("checkedValue")?p.a.f(n.get("checkedValue")):d?n.has("value")?p.a.f(n.get("value")):t.value:void 0})),s="checkbox"==t.type,l="radio"==t.type;if(s||l){var u=i(),c=s&&p.a.f(u)instanceof Array,h=!(c&&u.push&&u.splice),d=l||c,f=c?a():e;l&&!t.name&&p.c.uniqueName.init(t,(function(){return!0})),p.o(r,null,{l:t}),p.a.B(t,"click",r),p.o(o,null,{l:t}),u=e}}},p.m.wa.checked=!0,p.c.checkedValue={update:function(e,t){e.value=p.a.f(t())}},p.c.class={update:function(e,t){var i=p.a.Db(p.a.f(t()));p.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=i,p.a.Eb(e,i,!0)}},p.c.css={update:function(e,t){var i=p.a.f(t());null!==i&&"object"==typeof i?p.a.P(i,(function(t,i){i=p.a.f(i),p.a.Eb(e,t,i)})):p.c.class.update(e,t)}},p.c.enable={update:function(e,t){var i=p.a.f(t());i&&e.disabled?e.removeAttribute("disabled"):i||e.disabled||(e.disabled=!0)}},p.c.disable={update:function(e,t){p.c.enable.update(e,(function(){return!p.a.f(t())}))}},p.c.event={init:function(e,t,i,n,r){var o=t()||{};p.a.P(o,(function(o){"string"==typeof o&&p.a.B(e,o,(function(e){var a,s=t()[o];if(s){try{var l=p.a.la(arguments);n=r.$data,l.unshift(n),a=s.apply(n,l)}finally{!0!==a&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===i.get(o+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}}))}))}},p.c.foreach={Rc:function(e){return function(){var t=e(),i=p.a.bc(t);return i&&"number"!=typeof i.length?(p.a.f(t),{foreach:i.data,as:i.as,noChildContext:i.noChildContext,includeDestroyed:i.includeDestroyed,afterAdd:i.afterAdd,beforeRemove:i.beforeRemove,afterRender:i.afterRender,beforeMove:i.beforeMove,afterMove:i.afterMove,templateEngine:p.ba.Ma}):{foreach:t,templateEngine:p.ba.Ma}}},init:function(e,t){return p.c.template.init(e,p.c.foreach.Rc(t))},update:function(e,t,i,n,r){return p.c.template.update(e,p.c.foreach.Rc(t),i,n,r)}},p.m.Ra.foreach=!1,p.h.ea.foreach=!0,p.c.hasfocus={init:function(e,t,i){function n(n){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var o;try{o=r.activeElement}catch{o=r.body}n=o===e}r=t(),p.m.eb(r,i,"hasfocus",n,!0),e.__ko_hasfocusLastValue=n,e.__ko_hasfocusUpdating=!1}var r=n.bind(null,!0),o=n.bind(null,!1);p.a.B(e,"focus",r),p.a.B(e,"focusin",r),p.a.B(e,"blur",o),p.a.B(e,"focusout",o),e.__ko_hasfocusLastValue=!1},update:function(e,t){var i=!!p.a.f(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===i||(i?e.focus():e.blur(),!i&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),p.u.G(p.a.Fb,null,[e,i?"focusin":"focusout"]))}},p.m.wa.hasfocus=!0,p.c.hasFocus=p.c.hasfocus,p.m.wa.hasFocus="hasfocus",p.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){p.a.fc(e,t())}},function(){function e(e,t,i){p.c[e]={init:function(e,n,r,o,a){var s,l,u,c,h,d={};if(t){o=r.get("as");var f=r.get("noChildContext");d={as:o,noChildContext:f,exportDependencies:h=!(o&&f)}}return c=(u="render"==r.get("completeOn"))||r.has(p.i.pa),p.o((function(){var r,o=p.a.f(n()),f=!i!=!o,_=!l;(h||f!==s)&&(c&&(a=p.i.Cb(e,a)),f&&((!t||h)&&(d.dataDependency=p.S.o()),r=t?a.createChildContext("function"==typeof o?o:n,d):p.S.qa()?a.extend(null,d):a),_&&p.S.qa()&&(l=p.a.Ca(p.h.childNodes(e),!0)),f?(_||p.h.va(e,p.a.Ca(l)),p.Oa(r,e)):(p.h.Ea(e),u||p.i.ma(e,p.i.H)),s=f)}),null,{l:e}),{controlsDescendantBindings:!0}}},p.m.Ra[e]=!1,p.h.ea[e]=!0}e("if"),e("ifnot",!1,!0),e("with",!0)}(),p.c.let={init:function(e,t,i,n,r){return t=r.extend(t),p.Oa(t,e),{controlsDescendantBindings:!0}}},p.h.ea.let=!0;var w={};p.c.options={init:function(e){if("select"!==p.a.R(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,n){function r(){return p.a.jb(t.options,(function(e){return e.selected}))}function o(e,t,i){var n=typeof t;return"function"==n?t(e):"string"==n?e[t]:i}function a(e,i){if(_&&c)p.i.ma(t,p.i.H);else if(f.length){var n=0<=p.a.A(f,p.w.M(i[0]));p.a.Zc(i[0],n),_&&!n&&p.u.G(p.a.Fb,null,[t,"change"])}}var s=t.multiple,l=0!=t.length&&s?t.scrollTop:null,u=p.a.f(i()),c=n.get("valueAllowUnset")&&n.has("value"),h=n.get("optionsIncludeDestroyed");i={};var d,f=[];c||(s?f=p.a.Mb(r(),p.w.M):0<=t.selectedIndex&&f.push(p.w.M(t.options[t.selectedIndex]))),u&&(typeof u.length>"u"&&(u=[u]),d=p.a.jb(u,(function(t){return h||t===e||null===t||!p.a.f(t._destroy)})),n.has("optionsCaption")&&null!==(u=p.a.f(n.get("optionsCaption")))&&u!==e&&d.unshift(w));var _=!1;i.beforeRemove=function(e){t.removeChild(e)},u=a,n.has("optionsAfterRender")&&"function"==typeof n.get("optionsAfterRender")&&(u=function(t,i){a(0,i),p.u.G(n.get("optionsAfterRender"),null,[i[0],t!==w?t:e])}),p.a.ec(t,d,(function(i,r,a){return a.length&&(f=!c&&a[0].selected?[p.w.M(a[0])]:[],_=!0),r=t.ownerDocument.createElement("option"),i===w?(p.a.Bb(r,n.get("optionsCaption")),p.w.cb(r,e)):(a=o(i,n.get("optionsValue"),i),p.w.cb(r,p.a.f(a)),i=o(i,n.get("optionsText"),a),p.a.Bb(r,i)),[r]}),i,u),c||(s?f.length&&r().length<f.length:f.length&&0<=t.selectedIndex?p.w.M(t.options[t.selectedIndex])!==f[0]:f.length||0<=t.selectedIndex)&&p.u.G(p.a.Fb,null,[t,"change"]),(c||p.S.Ya())&&p.i.ma(t,p.i.H),p.a.wd(t),l&&20<Math.abs(l-t.scrollTop)&&(t.scrollTop=l)}},p.c.options.$b=p.a.g.Z(),p.c.selectedOptions={init:function(e,t,i){function n(){var n=t(),r=[];p.a.D(e.getElementsByTagName("option"),(function(e){e.selected&&r.push(p.w.M(e))})),p.m.eb(n,i,"selectedOptions",r)}function r(){var i=p.a.f(t()),n=e.scrollTop;i&&"number"==typeof i.length&&p.a.D(e.getElementsByTagName("option"),(function(e){var t=0<=p.a.A(i,p.w.M(e));e.selected!=t&&p.a.Zc(e,t)})),e.scrollTop=n}if("select"!=p.a.R(e))throw Error("selectedOptions binding applies only to SELECT elements");var o;p.i.subscribe(e,p.i.H,(function(){o?n():(p.a.B(e,"change",n),o=p.o(r,null,{l:e}))}),null,{notifyImmediately:!0})},update:function(){}},p.m.wa.selectedOptions=!0,p.c.style={update:function(t,i){var n=p.a.f(i()||{});p.a.P(n,(function(i,n){if((null===(n=p.a.f(n))||n===e||!1===n)&&(n=""),r)r(t).css(i,n);else if(/^--/.test(i))t.style.setProperty(i,n);else{i=i.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));var o=t.style[i];t.style[i]=n,n===o||t.style[i]!=o||isNaN(n)||(t.style[i]=n+"px")}}))}},p.c.submit={init:function(e,t,i,n,r){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");p.a.B(e,"submit",(function(i){var n,o=t();try{n=o.call(r.$data,e)}finally{!0!==n&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}}))}},p.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){p.a.Bb(e,t())}},p.h.ea.text=!0,function(){if(t&&t.navigator){var i,n,r,o,a,s=function(e){if(e)return parseFloat(e[1])},l=t.navigator.userAgent;(i=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(a=s(l.match(/Edge\/([^ ]+)$/)))||s(l.match(/Chrome\/([^ ]+)/))||(n=s(l.match(/Version\/([^ ]+) Safari/)))||(r=s(l.match(/Firefox\/([^ ]+)/)))||(o=p.a.W||s(l.match(/MSIE ([^ ]+)/)))||(o=s(l.match(/rv:([^ )]+)/)))}if(8<=o&&10>o)var u=p.a.g.Z(),c=p.a.g.Z(),h=function(e){var t=this.activeElement;(t=t&&p.a.g.get(t,c))&&t(e)},d=function(e,t){var i=e.ownerDocument;p.a.g.get(i,u)||(p.a.g.set(i,u,!0),p.a.B(i,"selectionchange",h)),p.a.g.set(e,c,t)};p.c.textInput={init:function(t,s,l){function u(e,i){p.a.B(t,e,i)}function c(){var i=p.a.f(s());(null===i||i===e)&&(i=""),m!==e&&i===m?p.a.setTimeout(c,4):t.value!==i&&(v=!0,t.value=i,v=!1,g=t.value)}function h(){_||(m=t.value,_=p.a.setTimeout(f,4))}function f(){clearTimeout(_),m=_=e;var i=t.value;g!==i&&(g=i,p.m.eb(s(),l,"textInput",i))}var _,m,g=t.value,x=9==p.a.W?h:f,v=!1;o&&u("keypress",f),11>o&&u("propertychange",(function(e){v||"value"!==e.propertyName||x()})),8==o&&(u("keyup",f),u("keydown",f)),d&&(d(t,x),u("dragend",h)),(!o||9<=o)&&u("input",x),5>n&&"textarea"===p.a.R(t)?(u("keydown",h),u("paste",h),u("cut",h)):11>i?u("keydown",h):4>r?(u("DOMAutoComplete",f),u("dragdrop",f),u("drop",f)):a&&"number"===t.type&&u("keydown",h),u("change",f),u("blur",f),p.o(c,null,{l:t})}},p.m.wa.textInput=!0,p.c.textinput={preprocess:function(e,t,i){i("textInput",e)}}}(),p.c.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++p.c.uniqueName.rd;p.a.Yc(e,i)}}},p.c.uniqueName.rd=0,p.c.using={init:function(e,t,i,n,r){var o;return i.has("as")&&(o={as:i.get("as"),noChildContext:i.get("noChildContext")}),t=r.createChildContext(t,o),p.Oa(t,e),{controlsDescendantBindings:!0}}},p.h.ea.using=!0,p.c.value={init:function(t,i,n){var r=p.a.R(t),o="input"==r;if(!o||"checkbox"!=t.type&&"radio"!=t.type){var a=[],s=n.get("valueUpdate"),l=!1,u=null;s&&(a="string"==typeof s?[s]:p.a.wc(s),p.a.Pa(a,"change"));var c,h,d=function(){u=null,l=!1;var e=i(),r=p.w.M(t);p.m.eb(e,n,"value",r)};!p.a.W||!o||"text"!=t.type||"off"==t.autocomplete||t.form&&"off"==t.form.autocomplete||-1!=p.a.A(a,"propertychange")||(p.a.B(t,"propertychange",(function(){l=!0})),p.a.B(t,"focus",(function(){l=!1})),p.a.B(t,"blur",(function(){l&&d()}))),p.a.D(a,(function(e){var i=d;p.a.Ud(e,"after")&&(i=function(){u=p.w.M(t),p.a.setTimeout(d,0)},e=e.substring(5)),p.a.B(t,e,i)})),c=o&&"file"==t.type?function(){var n=p.a.f(i());null===n||n===e||""===n?t.value="":p.u.G(d)}:function(){var o=p.a.f(i()),a=p.w.M(t);null!==u&&o===u?p.a.setTimeout(c,0):(o!==a||a===e)&&("select"===r?(a=n.get("valueAllowUnset"),p.w.cb(t,o,a),a||o===p.w.M(t)||p.u.G(d)):p.w.cb(t,o))},"select"===r?p.i.subscribe(t,p.i.H,(function(){h?n.get("valueAllowUnset")?c():d():(p.a.B(t,"change",d),h=p.o(c,null,{l:t}))}),null,{notifyImmediately:!0}):(p.a.B(t,"change",d),p.o(c,null,{l:t}))}else p.ib(t,{checkedValue:i})},update:function(){}},p.m.wa.value=!0,p.c.visible={update:function(e,t){var i=p.a.f(t()),n="none"!=e.style.display;i&&!n?e.style.display="":!i&&n&&(e.style.display="none")}},p.c.hidden={update:function(e,t){p.c.visible.update(e,(function(){return!p.a.f(t())}))}},function(e){p.c[e]={init:function(t,i,n,r,o){return p.c.event.init.call(this,t,(function(){var t={};return t[e]=i(),t}),n,r,o)}}}("click"),p.ca=function(){},p.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},p.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},p.ca.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){var n=(t=t||i).getElementById(e);if(!n)throw Error("Cannot find template with ID "+e);return new p.C.F(n)}if(1==e.nodeType||8==e.nodeType)return new p.C.ia(e);throw Error("Unknown template type: "+e)},p.ca.prototype.renderTemplate=function(e,t,i,n){return e=this.makeTemplateSource(e,n),this.renderTemplateSource(e,t,i,n)},p.ca.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},p.ca.prototype.rewriteTemplate=function(e,t,i){t=t((e=this.makeTemplateSource(e,i)).text()),e.text(t),e.data("isRewritten",!0)},p.b("templateEngine",p.ca),p.kc=function(){function e(e,t,i,n){e=p.m.ac(e);for(var r=p.m.Ra,o=0;o<e.length;o++){var a=e[o].key;if(Object.prototype.hasOwnProperty.call(r,a)){var s=r[a];if("function"==typeof s){if(a=s(e[o].value))throw Error(a)}else if(!s)throw Error("This template engine does not support the '"+a+"' binding within its templates")}}return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+p.m.vb(e,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",n.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(e,t,i){t.isTemplateRewritten(e,i)||t.rewriteTemplate(e,(function(e){return p.kc.Ld(e,t)}),i)},Ld:function(n,r){return n.replace(t,(function(t,i,n,o,a){return e(a,i,n,r)})).replace(i,(function(t,i){return e(i,"\x3c!-- ko --\x3e","#comment",r)}))},md:function(e,t){return p.aa.Xb((function(i,n){var r=i.nextSibling;r&&r.nodeName.toLowerCase()===t&&p.ib(r,e,n)}))}}}(),p.b("__tr_ambtns",p.kc.md),function(){p.C={},p.C.F=function(e){if(this.F=e){var t=p.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},p.C.F.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[e];var t=arguments[0];"innerHTML"===e?p.a.fc(this.F,t):this.F[e]=t};var t=p.a.g.Z()+"_";p.C.F.prototype.data=function(e){if(1===arguments.length)return p.a.g.get(this.F,t+e);p.a.g.set(this.F,t+e,arguments[1])};var i=p.a.g.Z();p.C.F.prototype.nodes=function(){var t=this.F;if(0==arguments.length){var n=p.a.g.get(t,i)||{},r=n.lb||(3===this.ab?t.content:4===this.ab?t:e);if(!r||n.jd){var o=this.text();o&&o!==n.bb&&(r=p.a.Md(o,t.ownerDocument),p.a.g.set(t,i,{lb:r,bb:o,jd:!0}))}return r}n=arguments[0],this.ab!==e&&this.text(""),p.a.g.set(t,i,{lb:n})},p.C.ia=function(e){this.F=e},p.C.ia.prototype=new p.C.F,p.C.ia.prototype.constructor=p.C.ia,p.C.ia.prototype.text=function(){if(0==arguments.length){var t=p.a.g.get(this.F,i)||{};return t.bb===e&&t.lb&&(t.bb=t.lb.innerHTML),t.bb}p.a.g.set(this.F,i,{bb:arguments[0]})},p.b("templateSources",p.C),p.b("templateSources.domElement",p.C.F),p.b("templateSources.anonymousTemplate",p.C.ia)}(),function(){function t(e,t,i){var n;for(t=p.h.nextSibling(t);e&&(n=e)!==t;)i(n,e=p.h.nextSibling(n))}function i(e,i){if(e.length){var n=e[0],r=e[e.length-1],o=n.parentNode,a=p.ga.instance,s=a.preprocessNode;if(s){if(t(n,r,(function(e,t){var i=e.previousSibling,o=s.call(a,e);o&&(e===n&&(n=o[0]||t),e===r&&(r=o[o.length-1]||i))})),e.length=0,!n)return;n===r?e.push(n):(e.push(n,r),p.a.Ua(e,o))}t(n,r,(function(e){1!==e.nodeType&&8!==e.nodeType||p.vc(i,e)})),t(n,r,(function(e){1!==e.nodeType&&8!==e.nodeType||p.aa.cd(e,[i])})),p.a.Ua(e,o)}}function n(e){return e.nodeType?e:0<e.length?e[0]:null}function r(e,t,r,o,s){s=s||{};var l=(e&&n(e)||r||{}).ownerDocument,u=s.templateEngine||a;if(p.kc.xd(r,u,l),"number"!=typeof(r=u.renderTemplate(r,o,s,l)).length||0<r.length&&"number"!=typeof r[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(l=!1,t){case"replaceChildren":p.h.va(e,r),l=!0;break;case"replaceNode":p.a.Xc(e,r),l=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t)}return l&&(i(r,o),s.afterRender&&p.u.G(s.afterRender,null,[r,o[s.as||"$data"]]),"replaceChildren"==t&&p.i.ma(e,p.i.H)),r}function o(e,t,i){return p.O(e)?e():"function"==typeof e?e(t,i):e}var a;p.gc=function(t){if(t!=e&&!(t instanceof p.ca))throw Error("templateEngine must inherit from ko.templateEngine");a=t},p.dc=function(t,i,s,l,u){if(((s=s||{}).templateEngine||a)==e)throw Error("Set a template engine before calling renderTemplate");if(u=u||"replaceChildren",l){var c=n(l);return p.$((function(){var e=i&&i instanceof p.fa?i:new p.fa(i,null,null,null,{exportDependencies:!0}),a=o(t,e.$data,e);e=r(l,u,a,e,s),"replaceNode"==u&&(c=n(l=e))}),null,{Sa:function(){return!c||!p.a.Sb(c)},l:c&&"replaceNode"==u?c.parentNode:c})}return p.aa.Xb((function(e){p.dc(t,i,s,e,"replaceNode")}))},p.Qd=function(t,n,a,s,l){function u(e,t){p.u.G(p.a.ec,null,[s,e,h,a,c,t]),p.i.ma(s,p.i.H)}function c(e,t){i(t,d),a.afterRender&&a.afterRender(t,e),d=null}function h(e,i){d=l.createChildContext(e,{as:f,noChildContext:a.noChildContext,extend:function(e){e.$index=i,f&&(e[f+"Index"]=i)}});var n=o(t,e,d);return r(s,"ignoreTargetNode",n,d,a)}var d,f=a.as,_=!1===a.includeDestroyed||p.options.foreachHidesDestroyed&&!a.includeDestroyed;if(_||a.beforeRemove||!p.Pc(n))return p.$((function(){var t=p.a.f(n)||[];typeof t.length>"u"&&(t=[t]),_&&(t=p.a.jb(t,(function(t){return t===e||null===t||!p.a.f(t._destroy)}))),u(t)}),null,{l:s});u(n.v());var m=n.subscribe((function(e){u(n(),e)}),null,"arrayChange");return m.l(s),m};var s=p.a.g.Z(),l=p.a.g.Z();p.c.template={init:function(e,t){var i=p.a.f(t());if("string"==typeof i||"name"in i)p.h.Ea(e);else if("nodes"in i){if(i=i.nodes||[],p.O(i))throw Error('The "nodes" option must be a plain, non-observable array.');var n=i[0]&&i[0].parentNode;n&&p.a.g.get(n,l)||(n=p.a.Yb(i),p.a.g.set(n,l,!0)),new p.C.ia(e).nodes(n)}else{if(!(0<(i=p.h.childNodes(e)).length))throw Error("Anonymous template defined, but no template content was provided");n=p.a.Yb(i),new p.C.ia(e).nodes(n)}return{controlsDescendantBindings:!0}},update:function(t,i,n,r,o){var a=i();n=!0,r=null,"string"==typeof(i=p.a.f(a))?i={}:(a="name"in i?i.name:t,"if"in i&&(n=p.a.f(i.if)),n&&"ifnot"in i&&(n=!p.a.f(i.ifnot)),n&&!a&&(n=!1)),"foreach"in i?r=p.Qd(a,n&&i.foreach||[],i,t,o):n?(n=o,"data"in i&&(n=o.createChildContext(i.data,{as:i.as,noChildContext:i.noChildContext,exportDependencies:!0})),r=p.dc(a,n,i,t)):p.h.Ea(t),o=r,(i=p.a.g.get(t,s))&&"function"==typeof i.s&&i.s(),p.a.g.set(t,s,!o||o.ja&&!o.ja()?e:o)}},p.m.Ra.template=function(e){return 1==(e=p.m.ac(e)).length&&e[0].unknown||p.m.Id(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"},p.h.ea.template=!0}(),p.b("setTemplateEngine",p.gc),p.b("renderTemplate",p.dc),p.a.Kc=function(e,t,i){var n,r,o,a,s;if(e.length&&t.length)for(n=r=0;(!i||n<i)&&(a=e[r]);++r){for(o=0;s=t[o];++o)if(a.value===s.value){a.moved=s.index,s.moved=a.index,t.splice(o,1),n=o=0;break}n+=o}},p.a.Pb=function(){function e(e,t,i,n,r){var o,a,s,l,u,c=Math.min,h=Math.max,d=[],f=e.length,_=t.length,m=_-f||1,g=f+_+1;for(o=0;o<=f;o++)for(l=s,d.push(s=[]),u=c(_,o+m),a=h(0,o-1);a<=u;a++)s[a]=a?o?e[o-1]===t[a-1]?l[a-1]:c(l[a]||g,s[a-1]||g)+1:a+1:o+1;for(c=[],h=[],m=[],o=f,a=_;o||a;)_=d[o][a]-1,a&&_===d[o][a-1]?h.push(c[c.length]={status:i,value:t[--a],index:a}):o&&_===d[o-1][a]?m.push(c[c.length]={status:n,value:e[--o],index:o}):(--a,--o,r.sparse||c.push({status:"retained",value:t[a]}));return p.a.Kc(m,h,!r.dontLimitMoves&&10*f),c.reverse()}return function(t,i,n){return n="boolean"==typeof n?{dontLimitMoves:n}:n||{},i=i||[],(t=t||[]).length<i.length?e(t,i,"added","deleted",n):e(i,t,"deleted","added",n)}}(),p.b("utils.compareArrays",p.a.Pb),function(){function t(t,i,n,r,o){var a=[],s=p.$((function(){var e=i(n,o,p.a.Ua(a,t))||[];0<a.length&&(p.a.Xc(a,e),r&&p.u.G(r,null,[n,e,o])),a.length=0,p.a.Nb(a,e)}),null,{l:t,Sa:function(){return!p.a.kd(a)}});return{Y:a,$:s.ja()?s:e}}var i=p.a.g.Z(),n=p.a.g.Z();p.a.ec=function(r,o,a,s,l,u){function c(e){f={Aa:e,pb:p.ta(b++)},y.push(f),v||E.push(f)}function h(e){f=x[e],b!==f.pb.v()&&w.push(f),f.pb(b++),p.a.Ua(f.Y,r),y.push(f)}function d(e,t){if(e)for(var i=0,n=t.length;i<n;i++)p.a.D(t[i].Y,(function(n){e(n,i,t[i].Aa)}))}typeof(o=o||[]).length>"u"&&(o=[o]),s=s||{};var f,_,m,g,x=p.a.g.get(r,i),v=!x,y=[],$=0,b=0,T=[],C=[],S=[],w=[],E=[],P=0;if(v)p.a.D(o,c);else{if(!u||x&&x._countWaitingForRemove){var A=p.a.Mb(x,(function(e){return e.Aa}));u=p.a.Pb(A,o,{dontLimitMoves:s.dontLimitMoves,sparse:!0})}var L,M,R;for(A=0;L=u[A];A++)switch(M=L.moved,R=L.index,L.status){case"deleted":for(;$<R;)h($++);M===e&&((f=x[$]).$&&(f.$.s(),f.$=e),p.a.Ua(f.Y,r).length&&(s.beforeRemove&&(y.push(f),P++,f.Aa===n?f=null:S.push(f)),f&&T.push.apply(T,f.Y))),$++;break;case"added":for(;b<R;)h($++);M!==e?(C.push(y.length),h(M)):c(L.value)}for(;b<o.length;)h($++);y._countWaitingForRemove=P}p.a.g.set(r,i,y),d(s.beforeMove,w),p.a.D(T,s.beforeRemove?p.oa:p.removeNode);try{g=r.ownerDocument.activeElement}catch{}if(C.length)for(;(A=C.shift())!=e;){for(f=y[A],_=e;A;)if((m=y[--A].Y)&&m.length){_=m[m.length-1];break}for(o=0;$=f.Y[o];_=$,o++)p.h.Wb(r,$,_)}for(A=0;f=y[A];A++){for(f.Y||p.a.extend(f,t(r,a,f.Aa,l,f.pb)),o=0;$=f.Y[o];_=$,o++)p.h.Wb(r,$,_);!f.Ed&&l&&(l(f.Aa,f.Y,f.pb),f.Ed=!0,_=f.Y[f.Y.length-1])}for(g&&r.ownerDocument.activeElement!=g&&g.focus(),d(s.beforeRemove,S),A=0;A<S.length;++A)S[A].Aa=n;d(s.afterMove,w),d(s.afterAdd,E)}}(),p.b("utils.setDomNodeChildrenFromArrayMapping",p.a.ec),p.ba=function(){this.allowTemplateRewriting=!1},p.ba.prototype=new p.ca,p.ba.prototype.constructor=p.ba,p.ba.prototype.renderTemplateSource=function(e,t,i,n){return(t=9>p.a.W||!e.nodes?null:e.nodes())?p.a.la(t.cloneNode(!0).childNodes):(e=e.text(),p.a.ua(e,n))},p.ba.Ma=new p.ba,p.gc(p.ba.Ma),p.b("nativeTemplateEngine",p.ba),function(){p.$a=function(){var e=this.Hd=function(){if(!r||!r.tmpl)return 0;try{if(0<=r.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch{}return 1}();this.renderTemplateSource=function(t,n,o,a){if(a=a||i,o=o||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=t.data("precompiled");return s||(s=t.text()||"",s=r.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),t.data("precompiled",s)),t=[n.$data],n=r.extend({koBindingContext:n},o.templateOptions),(n=r.tmpl(s,t,n)).appendTo(a.createElement("div")),r.fragments={},n},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){i.write("<script type='text/html' id='"+e+"'>"+t+"<\/script>")},0<e&&(r.tmpl.tag.ko_code={open:"__.push($1 || '');"},r.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},p.$a.prototype=new p.ca,p.$a.prototype.constructor=p.$a;var e=new p.$a;0<e.Hd&&p.gc(e),p.b("jqueryTmplTemplateEngine",p.$a)}()}(t.ko={})}();var ce$1=ko;typeof window<"u"?(ko=window.ko,typeof G<"u"?window.ko=G:delete window.ko):(ko=global.ko,typeof G<"u"?global.ko=G:delete global.ko);var s$5="__knockoutObservables",o$5="__knockoutSubscribable";function f$5(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var i=this,n=c$6(e,!0);return(t=t||Object.getOwnPropertyNames(e)).forEach((function(t){if(t!==s$5&&t!==o$5&&!(t in n)){var r=e[t],o=r instanceof Array,a=i.isObservable(r)?r:o?i.observableArray(r):i.observable(r);Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:a,set:i.isWriteableObservable(a)?a:void 0}),n[t]=a,o&&d$6(i,a)}})),e}function c$6(e,t){var i=e[s$5];return!i&&t&&(i={},Object.defineProperty(e,s$5,{value:i})),i}function v$4(e,t,i){var n={owner:e,deferEvaluation:!0};if("function"==typeof i)n.read=i;else{if("value"in i)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof i.get)throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');n.read=i.get,n.write=i.set}return e[t]=this.computed(n),f$5.call(this,e,[t]),e}function d$6(e,t){var i=null;e.computed((function(){i&&(i.dispose(),i=null);var n=t();n instanceof Array&&(i=h$2(e,t,n))}))}function h$2(e,t,i){return y$5(e,i).subscribe(t)}function y$5(e,t){var i=t[o$5];if(!i){i=new e.subscribable,Object.defineProperty(t,o$5,{value:i});var n={};p$1(t,i,n),A$1(e,t,i,n)}return i}function p$1(e,t,i){["pop","push","reverse","shift","sort","splice","unshift"].forEach((function(n){var r=e[n];e[n]=function(){var e=r.apply(this,arguments);return!0!==i.pause&&t.notifySubscribers(this),e}}))}function A$1(e,t,i,n){["remove","removeAll","destroy","destroyAll","replace"].forEach((function(r){Object.defineProperty(t,r,{enumerable:!1,value:function(){var o;n.pause=!0;try{o=e.observableArray.fn[r].apply(e.observableArray(t),arguments)}finally{n.pause=!1}return i.notifySubscribers(t),o}})}))}function b$5(e,t){if(!e)return null;var i=c$6(e,!1);return i&&i[t]||null}function g$5(e,t){var i=b$5(e,t);i&&i.valueHasMutated()}function w$1(e){e.track=f$5,e.getObservable=b$5,e.valueHasMutated=g$5,e.defineProperty=v$4}var t$5={attachToKo:w$1},d$5="http://www.w3.org/2000/svg",v$3="supermap3d-svgPath-svg",g$4={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,i){var n=document.createElementNS(d$5,"svg:svg");n.setAttribute("class",v$3);var r=document.createElementNS(d$5,"path");return n.appendChild(r),e.virtualElements.setDomNodeChildren(t,[n]),e.computed({read:function(){var t=e.unwrap(i());r.setAttribute("d",e.unwrap(t.path));var o=e.unwrap(t.width),a=e.unwrap(t.height);n.setAttribute("width",o),n.setAttribute("height",a),n.setAttribute("viewBox","0 0 "+o+" "+a),t.css&&n.setAttribute("class",v$3+" "+e.unwrap(t.css))},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}};t$5.attachToKo(ce$1),g$4.register(ce$1);var j$5={};!function(){var e=function(){var e={defaultNoDataValue:-34027999387901484e22,decode:function(o,a){var s=(a=a||{}).encodedMaskData||null===a.encodedMaskData,l=r(o,a.inputOffset||0,s),u=null!==a.noDataValue?a.noDataValue:e.defaultNoDataValue,c=t(l,a.pixelType||Float32Array,a.encodedMaskData,u,a.returnMask),h={width:l.width,height:l.height,pixelData:c.resultPixels,minValue:c.minValue,maxValue:l.pixels.maxValue,noDataValue:u};return c.resultMask&&(h.maskData=c.resultMask),a.returnEncodedMask&&l.mask&&(h.encodedMaskData=l.mask.bitset?l.mask.bitset:null),a.returnFileInfo&&(h.fileInfo=i(l),a.computeUsedBitDepths&&(h.fileInfo.bitDepths=n(l))),h}},t=function(e,t,i,n,r){var a,s,l,u=0,c=e.pixels.numBlocksX,h=e.pixels.numBlocksY,d=Math.floor(e.width/c),f=Math.floor(e.height/h),p=2*e.maxZError,_=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),s=new t(e.width*e.height),r&&i&&(l=new Uint8Array(e.width*e.height));for(var m,g,x=new Float32Array(d*f),v=0;v<=h;v++){var y=v!==h?f:e.height%h;if(0!==y)for(var $=0;$<=c;$++){var b=$!==c?d:e.width%c;if(0!==b){var T,C,S,w,E=v*e.width*f+$*d,P=e.width-b,A=e.pixels.blocks[u];if(A.encoding<2?(0===A.encoding?T=A.rawData:(o(A.stuffedData,A.bitsPerPixel,A.numValidPixels,A.offset,p,x,e.pixels.maxValue),T=x),C=0):S=2===A.encoding?0:A.offset,i)for(g=0;g<y;g++){for(7&E&&(w=i[E>>3],w<<=7&E),m=0;m<b;m++)7&E||(w=i[E>>3]),128&w?(l&&(l[E]=1),_=_>(a=A.encoding<2?T[C++]:S)?a:_,s[E++]=a):(l&&(l[E]=0),s[E++]=n),w<<=1;E+=P}else if(A.encoding<2)for(g=0;g<y;g++){for(m=0;m<b;m++)_=_>(a=T[C++])?a:_,s[E++]=a;E+=P}else for(_=_>S?S:_,g=0;g<y;g++){for(m=0;m<b;m++)s[E++]=S;E+=P}if(1===A.encoding&&C!==A.numValidPixels)throw"Block and Mask do not match";u++}}}return{resultPixels:s,resultMask:l,minValue:_}},i=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},n=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,i={},n=0;n<t;n++){var r=e.pixels.blocks[n];0===r.encoding?i.float32=!0:1===r.encoding?i[r.bitsPerPixel]=!0:i[0]=!0}return Object.keys(i)},r=function(e,t,i){var n={},r=new Uint8Array(e,t,10);if(n.fileIdentifierString=String.fromCharCode.apply(null,r),"CntZImage"!==n.fileIdentifierString.trim())throw"Unexpected file identifier string: "+n.fileIdentifierString;t+=10;var o=new DataView(e,t,24);if(n.fileVersion=o.getInt32(0,!0),n.imageType=o.getInt32(4,!0),n.height=o.getUint32(8,!0),n.width=o.getUint32(12,!0),n.maxZError=o.getFloat64(16,!0),t+=24,!i)if(o=new DataView(e,t,16),n.mask={},n.mask.numBlocksY=o.getUint32(0,!0),n.mask.numBlocksX=o.getUint32(4,!0),n.mask.numBytes=o.getUint32(8,!0),n.mask.maxValue=o.getFloat32(12,!0),t+=16,n.mask.numBytes>0){var a=new Uint8Array(Math.ceil(n.width*n.height/8)),s=(o=new DataView(e,t,n.mask.numBytes)).getInt16(0,!0),l=2,u=0;do{if(s>0)for(;s--;)a[u++]=o.getUint8(l++);else{var c=o.getUint8(l++);for(s=-s;s--;)a[u++]=c}s=o.getInt16(l,!0),l+=2}while(l<n.mask.numBytes);if(-32768!==s||u<a.length)throw"Unexpected end of mask RLE encoding";n.mask.bitset=a,t+=n.mask.numBytes}else 0==(n.mask.numBytes|n.mask.numBlocksY|n.mask.maxValue)&&(n.mask.bitset=new Uint8Array(Math.ceil(n.width*n.height/8)));o=new DataView(e,t,16),n.pixels={},n.pixels.numBlocksY=o.getUint32(0,!0),n.pixels.numBlocksX=o.getUint32(4,!0),n.pixels.numBytes=o.getUint32(8,!0),n.pixels.maxValue=o.getFloat32(12,!0),t+=16;var h=n.pixels.numBlocksX,d=n.pixels.numBlocksY,f=h+(n.width%h>0?1:0),p=d+(n.height%d>0?1:0);n.pixels.blocks=new Array(f*p);for(var _=0,m=0;m<p;m++)for(var g=0;g<f;g++){var x=0,v=e.byteLength-t;o=new DataView(e,t,Math.min(10,v));var y={};n.pixels.blocks[_++]=y;var $=o.getUint8(0);if(x++,y.encoding=63&$,y.encoding>3)throw"Invalid block encoding ("+y.encoding+")";if(2!==y.encoding){if(0!==$&&2!==$){if($>>=6,y.offsetType=$,2===$)y.offset=o.getInt8(1),x++;else if(1===$)y.offset=o.getInt16(1,!0),x+=2;else{if(0!==$)throw"Invalid block offset type";y.offset=o.getFloat32(1,!0),x+=4}if(1===y.encoding)if($=o.getUint8(x),x++,y.bitsPerPixel=63&$,$>>=6,y.numValidPixelsType=$,2===$)y.numValidPixels=o.getUint8(x),x++;else if(1===$)y.numValidPixels=o.getUint16(x,!0),x+=2;else{if(0!==$)throw"Invalid valid pixel count type";y.numValidPixels=o.getUint32(x,!0),x+=4}}var b;if(t+=x,3!==y.encoding)if(0===y.encoding){var T=(n.pixels.numBytes-1)/4;if(T!==Math.floor(T))throw"uncompressed block has invalid length";b=new ArrayBuffer(4*T),new Uint8Array(b).set(new Uint8Array(e,t,4*T));var C=new Float32Array(b);y.rawData=C,t+=4*T}else if(1===y.encoding){var S=Math.ceil(y.numValidPixels*y.bitsPerPixel/8),w=Math.ceil(S/4);b=new ArrayBuffer(4*w),new Uint8Array(b).set(new Uint8Array(e,t,S)),y.stuffedData=new Uint32Array(b),t+=S}}else t++}return n.eofOffset=t,n},o=function(e,t,i,n,r,o,a){var s,l,u,c=(1<<t)-1,h=0,d=0,f=Math.ceil((a-n)/r),p=4*e.length-Math.ceil(t*i/8);for(e[e.length-1]<<=8*p,s=0;s<i;s++){if(0===d&&(u=e[h++],d=32),d>=t)l=u>>>d-t&c,d-=t;else{var _=t-d;l=(u&c)<<_&c,l+=(u=e[h++])>>>(d=32-_)}o[s]=l<f?n+l*r:a}return o};return e}(),t=function(){var e=function(e,t,i,n,r,o,a,s){var l,u,c,h,d,f=(1<<i)-1,p=0,_=0,m=4*e.length-Math.ceil(i*n/8);if(e[e.length-1]<<=8*m,r)for(l=0;l<n;l++)0===_&&(c=e[p++],_=32),_>=i?(u=c>>>_-i&f,_-=i):(u=(c&f)<<(h=i-_)&f,u+=(c=e[p++])>>>(_=32-h)),t[l]=r[u];else for(d=Math.ceil((s-o)/a),l=0;l<n;l++)0===_&&(c=e[p++],_=32),_>=i?(u=c>>>_-i&f,_-=i):(u=(c&f)<<(h=i-_)&f,u+=(c=e[p++])>>>(_=32-h)),t[l]=u<d?o+u*a:s},t=function(e,t,i,n,r,o){var a,s=(1<<t)-1,l=0,u=0,c=0,h=0,d=0,f=[],p=4*e.length-Math.ceil(t*i/8);e[e.length-1]<<=8*p;var _=Math.ceil((o-n)/r);for(u=0;u<i;u++)0===h&&(a=e[l++],h=32),h>=t?(d=a>>>h-t&s,h-=t):(d=(a&s)<<(c=t-h)&s,d+=(a=e[l++])>>>(h=32-c)),f[u]=d<_?n+d*r:o;return f.unshift(n),f},i=function(e,t,i,n,r,o,a,s){var l,u,c,h,d=(1<<i)-1,f=0,p=0,_=0;if(r)for(l=0;l<n;l++)0===p&&(c=e[f++],p=32,_=0),p>=i?(u=c>>>_&d,p-=i,_+=i):(u=c>>>_&d,p=32-(h=i-p),u|=((c=e[f++])&(1<<h)-1)<<i-h,_=h),t[l]=r[u];else{var m=Math.ceil((s-o)/a);for(l=0;l<n;l++)0===p&&(c=e[f++],p=32,_=0),p>=i?(u=c>>>_&d,p-=i,_+=i):(u=c>>>_&d,p=32-(h=i-p),u|=((c=e[f++])&(1<<h)-1)<<i-h,_=h),t[l]=u<m?o+u*a:s}return t},n=function(e,t,i,n,r,o){var a,s=(1<<t)-1,l=0,u=0,c=0,h=0,d=0,f=0,p=[],_=Math.ceil((o-n)/r);for(u=0;u<i;u++)0===h&&(a=e[l++],h=32,f=0),h>=t?(d=a>>>f&s,h-=t,f+=t):(d=a>>>f&s,h=32-(c=t-h),d|=((a=e[l++])&(1<<c)-1)<<t-c,f=c),p[u]=d<_?n+d*r:o;return p.unshift(n),p},r=function(e,t,i,n){var r,o,a,s,l=(1<<i)-1,u=0,c=0,h=4*e.length-Math.ceil(i*n/8);for(e[e.length-1]<<=8*h,r=0;r<n;r++)0===c&&(a=e[u++],c=32),c>=i?(o=a>>>c-i&l,c-=i):(o=(a&l)<<(s=i-c)&l,o+=(a=e[u++])>>>(c=32-s)),t[r]=o;return t},o=function(e,t,i,n){var r,o,a,s,l=(1<<i)-1,u=0,c=0,h=0;for(r=0;r<n;r++)0===c&&(a=e[u++],c=32,h=0),c>=i?(o=a>>>h&l,c-=i,h+=i):(o=a>>>h&l,c=32-(s=i-c),o|=((a=e[u++])&(1<<s)-1)<<i-s,h=s),t[r]=o;return t},a={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,i=65535,n=e.length,r=Math.floor(n/2),o=0;r;){var a=r>=359?359:r;r-=a;do{t+=e[o++]<<8,i+=t+=e[o++]}while(--a);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&n&&(i+=t+=e[o]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,n=new Uint8Array(e,i,6),r={};if(r.fileIdentifierString=String.fromCharCode.apply(null,n),0!==r.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+r.fileIdentifierString;i+=6;var o,a=new DataView(e,i,8),s=a.getInt32(0,!0);if(r.fileVersion=s,i+=4,s>=3&&(r.checksum=a.getUint32(4,!0),i+=4),a=new DataView(e,i,12),r.height=a.getUint32(0,!0),r.width=a.getUint32(4,!0),i+=8,s>=4?(r.numDims=a.getUint32(8,!0),i+=4):r.numDims=1,a=new DataView(e,i,40),r.numValidPixel=a.getUint32(0,!0),r.microBlockSize=a.getInt32(4,!0),r.blobSize=a.getInt32(8,!0),r.imageType=a.getInt32(12,!0),r.maxZError=a.getFloat64(16,!0),r.zMin=a.getFloat64(24,!0),r.zMax=a.getFloat64(32,!0),i+=40,t.headerInfo=r,t.ptr=i,s>=3&&(o=s>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-o,r.blobSize-14))!==r.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,n=this.getDataTypeArray(i.imageType),r=i.numDims*this.getDataTypeSize(i.imageType),o=this.readSubArray(e,t.ptr,n,r),a=this.readSubArray(e,t.ptr+r,n,r);t.ptr+=2*r;var s,l=!0;for(s=0;s<i.numDims;s++)if(o[s]!==a[s]){l=!1;break}return i.minValues=o,i.maxValues=a,l},readSubArray:function(e,t,i,n){var r;if(i===Uint8Array)r=new Uint8Array(e,t,n);else{var o=new ArrayBuffer(n);new Uint8Array(o).set(new Uint8Array(e,t,n)),r=new i(o)}return r},readMask:function(e,t){var i,n,r=t.ptr,o=t.headerInfo,a=o.width*o.height,s=o.numValidPixel,l=new DataView(e,r,4),u={};if(u.numBytes=l.getUint32(0,!0),r+=4,(0===s||a===s)&&0!==u.numBytes)throw"invalid mask";if(0===s)i=new Uint8Array(Math.ceil(a/8)),u.bitset=i,n=new Uint8Array(a),t.pixels.resultMask=n,r+=u.numBytes;else if(u.numBytes>0){i=new Uint8Array(Math.ceil(a/8));var c=(l=new DataView(e,r,u.numBytes)).getInt16(0,!0),h=2,d=0,f=0;do{if(c>0)for(;c--;)i[d++]=l.getUint8(h++);else for(f=l.getUint8(h++),c=-c;c--;)i[d++]=f;c=l.getInt16(h,!0),h+=2}while(h<u.numBytes);if(-32768!==c||d<i.length)throw"Unexpected end of mask RLE encoding";n=new Uint8Array(a);var p=0,_=0;for(_=0;_<a;_++)7&_?(p=i[_>>3],p<<=7&_):p=i[_>>3],128&p&&(n[_]=1);t.pixels.resultMask=n,u.bitset=i,r+=u.numBytes}return t.ptr=r,t.mask=u,!0},readDataOneSweep:function(e,t,i){var n,r=t.ptr,o=t.headerInfo,s=o.numDims,l=o.width*o.height,u=o.imageType,c=o.numValidPixel*a.getDataTypeSize(u)*s,h=t.pixels.resultMask;if(i===Uint8Array)n=new Uint8Array(e,r,c);else{var d=new ArrayBuffer(c);new Uint8Array(d).set(new Uint8Array(e,r,c)),n=new i(d)}if(n.length===l*s)t.pixels.resultPixels=n;else{t.pixels.resultPixels=new i(l*s);var f=0,p=0,_=0,m=0;if(s>1)for(_=0;_<s;_++)for(m=_*l,p=0;p<l;p++)h[p]&&(t.pixels.resultPixels[m+p]=n[f++]);else for(p=0;p<l;p++)h[p]&&(t.pixels.resultPixels[p]=n[f++])}return r+=c,t.ptr=r,!0},readHuffmanTree:function(e,t){var i=this.HUFFMAN_LUT_BITS_MAX,n=new DataView(e,t.ptr,16);if(t.ptr+=16,n.getInt32(0,!0)<2)throw"unsupported Huffman version";var r=n.getInt32(4,!0),o=n.getInt32(8,!0),l=n.getInt32(12,!0);if(o>=l)return!1;var u=new Uint32Array(l-o);a.decodeBits(e,t,u);var c,h,d,f,p=[];for(c=o;c<l;c++)p[h=c-(c<r?0:r)]={first:u[c-o],second:null};var _=e.byteLength-t.ptr,m=Math.ceil(_/4),g=new ArrayBuffer(4*m);new Uint8Array(g).set(new Uint8Array(e,t.ptr,_));var x,v=new Uint32Array(g),y=0,$=0;for(x=v[0],c=o;c<l;c++)(f=p[h=c-(c<r?0:r)].first)>0&&(p[h].second=x<<y>>>32-f,32-y>=f?32===(y+=f)&&(y=0,x=v[++$]):(y+=f-32,x=v[++$],p[h].second|=x>>>32-y));var b=0,T=0,C=new s;for(c=0;c<p.length;c++)void 0!==p[c]&&(b=Math.max(b,p[c].first));T=b>=i?i:b,b>=30&&console.log("WARning, large NUM LUT BITS IS "+b);var S,w,E,P,A,L=[];for(c=o;c<l;c++)if((f=p[h=c-(c<r?0:r)].first)>0)if(S=[f,h],f<=T)for(w=p[h].second<<T-f,E=1<<T-f,d=0;d<E;d++)L[w|d]=S;else for(w=p[h].second,A=C,P=f-1;P>=0;P--)w>>>P&1?(A.right||(A.right=new s),A=A.right):(A.left||(A.left=new s),A=A.left),0===P&&!A.val&&(A.val=S[1]);return{decodeLut:L,numBitsLUTQick:T,numBitsLUT:b,tree:C,stuffedData:v,srcPtr:$,bitPos:y}},readHuffman:function(e,t,i){var n,r,o,a,s,l,u,c,h,d=t.headerInfo,f=d.numDims,p=t.headerInfo.height,_=t.headerInfo.width,m=_*p,g=this.readHuffmanTree(e,t),x=g.decodeLut,v=g.tree,y=g.stuffedData,$=g.srcPtr,b=g.bitPos,T=g.numBitsLUTQick,C=g.numBitsLUT,S=0===t.headerInfo.imageType?128:0,w=t.pixels.resultMask,E=0;b>0&&($++,b=0);var P,A=y[$],L=1===t.encodeMode,M=new i(m*f),R=M;for(P=0;P<d.numDims;P++){if(f>1&&(R=new i(M.buffer,m*P,m),E=0),t.headerInfo.numValidPixel===_*p)for(c=0,l=0;l<p;l++)for(u=0;u<_;u++,c++){if(r=0,s=a=A<<b>>>32-T,32-b<T&&(s=a|=y[$+1]>>>64-b-T),x[s])r=x[s][1],b+=x[s][0];else for(s=a=A<<b>>>32-C,32-b<C&&(s=a|=y[$+1]>>>64-b-C),n=v,h=0;h<C;h++)if(!(n=a>>>C-h-1&1?n.right:n.left).left&&!n.right){r=n.val,b=b+h+1;break}b>=32&&(b-=32,A=y[++$]),o=r-S,L?(o+=u>0?E:l>0?R[c-_]:E,o&=255,R[c]=o,E=o):R[c]=o}else for(c=0,l=0;l<p;l++)for(u=0;u<_;u++,c++)if(w[c]){if(r=0,s=a=A<<b>>>32-T,32-b<T&&(s=a|=y[$+1]>>>64-b-T),x[s])r=x[s][1],b+=x[s][0];else for(s=a=A<<b>>>32-C,32-b<C&&(s=a|=y[$+1]>>>64-b-C),n=v,h=0;h<C;h++)if(!(n=a>>>C-h-1&1?n.right:n.left).left&&!n.right){r=n.val,b=b+h+1;break}b>=32&&(b-=32,A=y[++$]),o=r-S,L?(u>0&&w[c-1]?o+=E:l>0&&w[c-_]?o+=R[c-_]:o+=E,o&=255,R[c]=o,E=o):R[c]=o}t.ptr=t.ptr+4*($+1)+(b>0?4:0)}t.pixels.resultPixels=M},decodeBits:function(a,s,l,u,c){var h=s.headerInfo,d=h.fileVersion,f=0,p=a.byteLength-s.ptr>=5?5:a.byteLength-s.ptr,_=new DataView(a,s.ptr,p),m=_.getUint8(0);f++;var g=m>>6,x=0===g?4:3-g,v=(32&m)>0,y=31&m,$=0;if(1===x)$=_.getUint8(f),f++;else if(2===x)$=_.getUint16(f,!0),f+=2;else{if(4!==x)throw"Invalid valid pixel count type";$=_.getUint32(f,!0),f+=4}var b,T,C,S,w,E,P,A,L,M=2*h.maxZError,R=h.numDims>1?h.maxValues[c]:h.zMax;if(v){for(s.counter.lut++,A=_.getUint8(f),f++,S=Math.ceil((A-1)*y/8),w=Math.ceil(S/4),T=new ArrayBuffer(4*w),C=new Uint8Array(T),s.ptr+=f,C.set(new Uint8Array(a,s.ptr,S)),P=new Uint32Array(T),s.ptr+=S,L=0;A-1>>>L;)L++;S=Math.ceil($*L/8),w=Math.ceil(S/4),T=new ArrayBuffer(4*w),(C=new Uint8Array(T)).set(new Uint8Array(a,s.ptr,S)),b=new Uint32Array(T),s.ptr+=S,E=d>=3?n(P,y,A-1,u,M,R):t(P,y,A-1,u,M,R),d>=3?i(b,l,L,$,E):e(b,l,L,$,E)}else s.counter.bitstuffer++,L=y,s.ptr+=f,L>0&&(S=Math.ceil($*L/8),w=Math.ceil(S/4),T=new ArrayBuffer(4*w),(C=new Uint8Array(T)).set(new Uint8Array(a,s.ptr,S)),b=new Uint32Array(T),s.ptr+=S,d>=3?null===u?o(b,l,L,$):i(b,l,L,$,!1,u,M,R):null===u?r(b,l,L,$):e(b,l,L,$,!1,u,M,R))},readTiles:function(e,t,i){var n=t.headerInfo,r=n.width,o=n.height,s=n.microBlockSize,l=n.imageType,u=a.getDataTypeSize(l),c=Math.ceil(r/s),h=Math.ceil(o/s);t.pixels.numBlocksY=h,t.pixels.numBlocksX=c,t.pixels.ptr=0;var d,f,p,_,m,g,x,v,y=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,I=0,O=0,D=new i(s*s),B=o%s||s,N=r%s||s,F=n.numDims,U=t.pixels.resultMask,z=t.pixels.resultPixels;for(b=0;b<h;b++)for(C=b!==h-1?s:B,T=0;T<c;T++)for(A=b*r*s+T*s,L=r-(S=T!==c-1?s:N),v=0;v<F;v++){if(F>1&&(z=new i(t.pixels.resultPixels.buffer,r*o*v*u,r*o)),w=e.byteLength-t.ptr,f={},O=0,O++,P=(E=(d=new DataView(e,t.ptr,Math.min(10,w))).getUint8(0))>>6&255,(E>>2&15)!==(T*s>>3&15))throw"integrity issue";if((m=3&E)>3)throw t.ptr+=O,"Invalid block encoding ("+m+")";if(2!==m)if(0===m){if(t.counter.uncompressed++,t.ptr+=O,M=(M=C*S*u)<(R=e.byteLength-t.ptr)?M:R,p=new ArrayBuffer(M%u==0?M:M+u-M%u),new Uint8Array(p).set(new Uint8Array(e,t.ptr,M)),_=new i(p),I=0,U)for(y=0;y<C;y++){for($=0;$<S;$++)U[A]&&(z[A]=_[I++]),A++;A+=L}else for(y=0;y<C;y++){for($=0;$<S;$++)z[A++]=_[I++];A+=L}t.ptr+=I*u}else if(g=a.getDataTypeUsed(l,P),x=a.getOnePixel(f,O,g,d),O+=a.getDataTypeSize(g),3===m)if(t.ptr+=O,t.counter.constantoffset++,U)for(y=0;y<C;y++){for($=0;$<S;$++)U[A]&&(z[A]=x),A++;A+=L}else for(y=0;y<C;y++){for($=0;$<S;$++)z[A++]=x;A+=L}else if(t.ptr+=O,a.decodeBits(e,t,D,x,v),O=0,U)for(y=0;y<C;y++){for($=0;$<S;$++)U[A]&&(z[A]=D[O++]),A++;A+=L}else for(y=0;y<C;y++){for($=0;$<S;$++)z[A++]=D[O++];A+=L}else t.counter.constant++,t.ptr+=O}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:a.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t=e.headerInfo.zMax,i=e.headerInfo.numDims,n=e.headerInfo.height*e.headerInfo.width,r=n*i,o=0,a=0,s=0,l=e.pixels.resultMask;if(l)if(i>1)for(o=0;o<i;o++)for(s=o*n,a=0;a<n;a++)l[a]&&(e.pixels.resultPixels[s+a]=t);else for(a=0;a<n;a++)l[a]&&(e.pixels.resultPixels[a]=t);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(t);else for(a=0;a<r;a++)e.pixels.resultPixels[a]=t},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:default:t=Float32Array;break;case 7:t=Float64Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:default:t="F32";break;case 7:t="F64"}return t},isValidPixelValue:function(e,t){if(null===t)return!1;var i;switch(e){case 0:i=t>=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,n){var r=0;switch(i){case 0:r=n.getInt8(t);break;case 1:r=n.getUint8(t);break;case 2:r=n.getInt16(t,!0);break;case 3:r=n.getUint16(t,!0);break;case 4:r=n.getInt32(t,!0);break;case 5:r=n.getUInt32(t,!0);break;case 6:r=n.getFloat32(t,!0);break;case 7:r=n.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return r}},s=function(e,t,i){this.val=e,this.left=t,this.right=i},l={decode:function(e,t){var i=(t=t||{}).noDataValue,n=0,r={};if(r.ptr=t.inputOffset||0,r.pixels={},a.readHeaderInfo(e,r)){var o=r.headerInfo,s=o.fileVersion,l=a.getDataTypeArray(o.imageType);a.readMask(e,r),o.numValidPixel!==o.width*o.height&&!r.pixels.resultMask&&(r.pixels.resultMask=t.maskData);var u,c=o.width*o.height;if(r.pixels.resultPixels=new l(c*o.numDims),r.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==o.numValidPixel)if(o.zMax===o.zMin)a.constructConstantSurface(r);else if(s>=4&&a.checkMinMaxRanges(e,r))a.constructConstantSurface(r);else{var h=new DataView(e,r.ptr,2),d=h.getUint8(0);if(r.ptr++,d)a.readDataOneSweep(e,r,l);else if(s>1&&o.imageType<=1&&Math.abs(o.maxZError-.5)<1e-5){var f=h.getUint8(1);if(r.ptr++,r.encodeMode=f,f>2||s<4&&f>1)throw"Invalid Huffman flag "+f;f?a.readHuffman(e,r,l):a.readTiles(e,r,l)}else a.readTiles(e,r,l)}r.eofOffset=r.ptr,t.inputOffset?(u=r.headerInfo.blobSize+t.inputOffset-r.ptr,Math.abs(u)>=1&&(r.eofOffset=t.inputOffset+r.headerInfo.blobSize)):(u=r.headerInfo.blobSize-r.ptr,Math.abs(u)>=1&&(r.eofOffset=r.headerInfo.blobSize));var p={width:o.width,height:o.height,pixelData:r.pixels.resultPixels,minValue:o.zMin,maxValue:o.zMax,validPixelCount:o.numValidPixel,dimCount:o.numDims,dimStats:{minValues:o.minValues,maxValues:o.maxValues},maskData:r.pixels.resultMask};if(r.pixels.resultMask&&a.isValidPixelValue(o.imageType,i)){var _=r.pixels.resultMask;for(n=0;n<c;n++)_[n]||(p.pixelData[n]=i);p.noDataValue=i}return r.noDataValue=i,t.returnFileInfo&&(p.fileInfo=a.formatFileInfo(r)),p}},getBandCount:function(e){for(var t=0,i=0,n={ptr:0,pixels:{}};i<e.byteLength-58;)a.readHeaderInfo(e,n),i+=n.headerInfo.blobSize,t++,n.ptr=i;return t}};return l}(),i=function(){var e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]}(),n={decode:function(n,r){if(!i)throw"Big endian system is not supported.";var o,a,s,l,u,c=(r=r||{}).inputOffset||0,h=new Uint8Array(n,c,10),d=String.fromCharCode.apply(null,h);if("CntZImage"===d.trim())o=e,a=1;else{if("Lerc2"!==d.substring(0,5))throw"Unexpected file identifier string: "+d;o=t,a=2}for(var f,p,_,m=0,g=n.byteLength-10,x=[],v={width:0,height:0,pixels:[],pixelType:r.pixelType,mask:null,statistics:[]};c<g;){var y=o.decode(n,{inputOffset:c,encodedMaskData:f,maskData:_,returnMask:0===m,returnEncodedMask:0===m,returnFileInfo:!0,pixelType:r.pixelType||null,noDataValue:r.noDataValue||null});c=y.fileInfo.eofOffset,0===m&&(f=y.encodedMaskData,_=y.maskData,v.width=y.width,v.height=y.height,v.dimCount=y.dimCount||1,v.pixelType=y.pixelType||y.fileInfo.pixelType,v.mask=y.maskData),a>1&&y.fileInfo.mask&&y.fileInfo.mask.numBytes>0&&x.push(y.maskData),m++,v.pixels.push(y.pixelData),v.statistics.push({minValue:y.minValue,maxValue:y.maxValue,noDataValue:y.noDataValue,dimStats:y.dimStats})}if(a>1&&x.length>1){for(u=v.width*v.height,v.bandMasks=x,(_=new Uint8Array(u)).set(x[0]),s=1;s<x.length;s++)for(p=x[s],l=0;l<u;l++)_[l]=_[l]&p[l];v.maskData=_}return v}};j$5.Lerc=n}();var LercDecode=j$5.Lerc,V$1=function(){var e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if("object"!=typeof WebAssembly)return{supported:!1};var i="B9h79tEBBBE8fV9gBB9gVUUUUUEU9gIUUUB9gEUEU9gIUUUEUIKQBEEEDDDILLLVE9wEEEVIEBEOWEUEC+Q/IEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBEy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBDe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBIl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBLk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBOL79iv9rBRQ+x8yQDBK/qMEZU8jJJJJBCJ/EB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rADZ1JJJBHWCJ/ABAD9uC/wfBgGOCJDAOCJD6eHdAICEFHLCBHQDNINAQAE9PMEAdAEAQ9rAQAdFAE6eHKDNDNADtMBAKCSFGOC9wgHXAOCL4CIFCD4HMAWCJDFHpCBHSALHZINDNARAZ9rAM9PMBCBHLXIKAZAMFHLDNAXtMBCBHhCBHIINDNARAL9rCk9PMBCBHLXVKAWCJ/CBFAIFHODNDNDNDNDNAZAICO4FrBBAhCOg4CIgpLBEDIBKAO9CB83IBAOCWF9CB83IBXIKAOALrBLALrBBGoCO4GaAaCIsGae86BBAOCEFALCLFAaFGarBBAoCL4CIgGcAcCIsGce86BBAOCDFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCIFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCLFAaAoFGarBBALrBEGoCO4GcAcCIsGce86BBAOCVFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCOFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCRFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCWFAaAoFGarBBALrBDGoCO4GcAcCIsGce86BBAOCdFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCQFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCKFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCXFAaAoFGorBBALrBIGLCO4GaAaCIsGae86BBAOCMFAoAaFGorBBALCL4CIgGaAaCIsGae86BBAOCpFAoAaFGorBBALCD4CIgGaAaCIsGae86BBAOCSFAoAaFGOrBBALCIgGLALCIsGLe86BBAOALFHLXDKAOALrBWALrBBGoCL4GaAaCSsGae86BBAOCEFALCWFAaFGarBBAoCSgGoAoCSsGoe86BBAOCDFAaAoFGorBBALrBEGaCL4GcAcCSsGce86BBAOCIFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCLFAoAaFGorBBALrBDGaCL4GcAcCSsGce86BBAOCVFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCOFAoAaFGorBBALrBIGaCL4GcAcCSsGce86BBAOCRFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCWFAoAaFGorBBALrBLGaCL4GcAcCSsGce86BBAOCdFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCQFAoAaFGorBBALrBVGaCL4GcAcCSsGce86BBAOCKFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCXFAoAaFGorBBALrBOGaCL4GcAcCSsGce86BBAOCMFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCpFAoAaFGorBBALrBRGLCL4GaAaCSsGae86BBAOCSFAoAaFGOrBBALCSgGLALCSsGLe86BBAOALFHLXEKAOAL8pBB83BBAOCWFALCWF8pBB83BBALCZFHLKAhCDFHhAICZFGIAX6MBKKDNALMBCBHLXIKDNAKtMBAWASFrBBHhCBHOApHIINAIAWCJ/CBFAOFrBBGZCE4CBAZCEg9r7AhFGh86BBAIADFHIAOCEFGOAK9HMBKKApCEFHpALHZASCEFGSAD9HMBKKABAQAD2FAWCJDFAKAD2Z1JJJB8aAWAWCJDFAKCUFAD2FADZ1JJJB8aKAKCBALeAQFHQALMBKC9+HOXEKCBC99ARAL9rADCAADCA0eseHOKAVCJ/EBF8kJJJJBAOK+OoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJEZ+JJJJB8aAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK+lVOEUE99DUD99EUD99DNDNADCL9HMBAEtMEINDNDNjBBBzjBBB+/ABCDFGD8sBB+yAB8sBBGI+yGL+L+TABCEFGV8sBBGO+yGR+L+TGWjBBBB9gGdeAWjBB/+9CAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI86BBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD86BBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD86BBABCLFHBAECUFGEMBXDKKAEtMBINDNDNjBBBzjBBB+/ABCLFGD8uEB+yAB8uEBGI+yGL+L+TABCDFGV8uEBGO+yGR+L+TGWjBBBB9gGdeAWjB/+fsAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI87EBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD87EBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD87EBABCWFHBAECUFGEMBKKK/SILIUI99IUE99DNAEtMBCBHIABHLINDNDNj/zL81zALCOF8uEBGVCIv+y+VGOAL8uEB+ynGRjB/+fsnjBBBzjBBB+/ARjBBBB9gemGW+LjBBB9P9dtMBAW+oHdXEKCJJJJ94HdKALCLF8uEBHQALCDF8uEBHKABAVCEFCIgAIvCETFAd87EBDNDNAOAK+ynGWjB/+fsnjBBBzjBBB+/AWjBBBB9gemGX+LjBBB9P9dtMBAX+oHKXEKCJJJJ94HKKABAVCDFCIgAIvCETFAK87EBDNDNAOAQ+ynGOjB/+fsnjBBBzjBBB+/AOjBBBB9gemGX+LjBBB9P9dtMBAX+oHQXEKCJJJJ94HQKABAVCUFCIgAIvCETFAQ87EBDNDNjBBJzARARn+TAWAWn+TAOAOn+TGRjBBBBARjBBBB9ge+RjB/+fsnjBBBzmGR+LjBBB9P9dtMBAR+oHQXEKCJJJJ94HQKABAVCIgAIvCETFAQ87EBALCWFHLAICLFHIAECUFGEMBKKK6BDNADCD4AE2GEtMBINABABYDBGDCWTCW91+yADCk91ClTCJJJ/8IF++nuDBABCLFHBAECUFGEMBKKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABKKKEBCJWKLZ9kBB";WebAssembly.validate(e)&&(i="B9h79tEBBBE5V9gBB9gVUUUUUEU9gIUUUB9gDUUB9gEUEUIMXBBEBEEDIDIDLLVE9wEEEVIEBEOWEUEC+Q/aEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBDy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBLe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBOk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBWl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBQL79iv9rBKQ/j6XLBZIK9+EVU8jJJJJBCZ9rHBCBHEINCBHDCBHIINABCWFADFAICJUAEAD4CEgGLe86BBAIALFHIADCEFGDCW9HMBKAEC+Q+YJJBFAI86BBAECITC+Q1JJBFAB8pIW83IBAECEFGECJD9HMBKK1HLSUD97EUO978jJJJJBCJ/KB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rAD/8QBBCJ/ABAD9uC/wfBgGOCJDAOCJD6eHWAICEFHOCBHdDNINAdAE9PMEAWAEAd9rAdAWFAE6eHQDNDNADtMBAQCSFGLC9wgGKCI2HXAKCETHMALCL4CIFCD4HpCBHSINAOHZCBHhDNINDNARAZ9rAp9PMBCBHOXVKAVCJ/CBFAhAK2FHoAZApFHOCBHIDNAKC/AB6MBARAO9rC/gB6MBCBHLINAoALFHIDNDNDNDNDNAZALCO4FrBBGaCIgpLBEDIBKAICBPhPKLBXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLBAOCZFHOKDNDNDNDNDNAaCD4CIgpLBEDIBKAICBPhPKLZXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLZAOCZFHOKDNDNDNDNDNAaCL4CIgpLBEDIBKAICBPhPKLAXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLAAOCZFHOKDNDNDNDNDNAaCO4pLBEDIBKAICBPhPKL8wXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCLFAlPqBFAaC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCWFAlPqBFAaC+Q+YJJBFrBBFHOXEKAIAOPBBBPKL8wAOCZFHOKALC/ABFHIALCJEFAK0MEAIHLARAO9rC/fB0MBKKDNAIAK9PMBAICI4HLINDNARAO9rCk9PMBCBHOXRKAoAIFHaDNDNDNDNDNAZAICO4FrBBALCOg4CIgpLBEDIBKAaCBPhPKLBXIKAaAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAaAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAaAOPBBBPKLBAOCZFHOKALCDFHLAICZFGIAK6MBKKDNAOtMBAOHZAhCEFGhCLsMDXEKKCBHOXIKDNAKtMBAVCJDFASFHIAVASFPBDBHlCBHaINAIAVCJ/CBFAaFGLPBLBGxCEP9tAxCEPSGcP9OP9hP9RGxALAKFPBLBGkCEP9tAkAcP9OP9hP9RGkPMBZEhDoIaLcVxOqRlGyALAMFPBLBG8aCEP9tA8aAcP9OP9hP9RG8aALAXFPBLBGeCEP9tAeAcP9OP9hP9RGePMBZEhDoIaLcVxOqRlG3PMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIAlP9uGlPeBbDBAIADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAyA3PMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWkdyQ8aKeX3M5p8eS8fGxA8aAePMWkdyQ8aKeX3M5p8eS8fGkPMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFHIAaCZFGaAK6MBKKASCLFGSAD6MBKKABAdAD2FAVCJDFAQAD2/8QBBAVAVCJDFAQCUFAD2FAD/8QBBKAQCBAOeAdFHdAOMBKC9+HOXEKCBC99ARAO9rADCAADCA0eseHOKAVCJ/KBF8kJJJJBAOKWBZ+BJJJBK+KoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJE/8KBAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK/xVDIUO978jJJJJBCA9rGI8kJJJJBDNDNADCL9HMBDNAEC98gGLtMBABHDCBHVINADADPBBBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKBBADCZFHDAVCLFGVAL6MBKKALAE9PMEAIAECIgGVCDTGDvCBCZAD9r/8KBAIABALCDTFGLAD/8QBBDNAVtMBAIAIPBLBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKLBKALAIAD/8QBBXEKABAEC98gGDZ+HJJJBADAE9PMBAIAECIgGLCITGVFCBCAAV9r/8KBAIABADCITFGDAV/8QBBAIALZ+HJJJBADAIAV/8QBBKAICAF8kJJJJBK+yIDDUR97DNAEtMBCBHDINABCZFGIAIPBBBGLCBPhGVCJJ98P3ECJJ98P3IGOP9OABPBBBGRALPMLVORXMpScxql358e8fCffEPhP9OP/6EARALPMBEDIWdQKZhoaky8aeGLCZP+sEP/6EGWP/gEALCZP+rECZP+sEP/6EGdP/gEP/kEP/lEGLjB/+fsPaAdALAVP+2EGVAdCJJJJ94PhGQP9OP9RP/kEGdAdP/mEALALP/mEAWAVAWAQP9OP9RP/kEGLALP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGVP/kECZP+rEAdAWP/mEAVP/kECffIPhP9OP9QGdALAWP/mEAVP/kECUPSCBPlDCBPlICBPlOCBPlRCBPlQCBPlKCBPlpCBPlSP9OGLPMWdkyQK8aeXM35pS8e8fP9QPKBBABARAOP9OAdALPMBEZhDIoaLVcxORqlP9QPKBBABCAFHBADCLFGDAE6MBKKK94EIU8jJJJJBCA9rGI8kJJJJBABAEC98gGLZ+JJJJBDNALAE9PMBAIAECIgGVCITGEFCBCAAE9r/8KBAIABALCITFGBAE/8QBBAIAVZ+JJJJBABAIAE/8QBBKAICAF8kJJJJBK/hILDUE97EUV978jJJJJBCZ9rHDDNAEtMBCBHIINADABPBBBGLABCZFGVPBBBGOPMLVORXMpScxql358e8fGRCZP+sEGWCLP+rEPKLBABjBBJzPaj/zL81zPaAWCIPhP9QP/6EP/nEGWALAOPMBEDIWdQKZhoaky8aeGLCZP+rECZP+sEP/6EP/mEGOAOP/mEAWALCZP+sEP/6EP/mEGdAdP/mEAWARCZP+rECZP+sEP/6EP/mEGRARP/mEP/kEP/kEP/lECBPhP+4EP/jEjB/+fsPaGWP/mEjBBN0PaGLP/kECffIPhGQP9OAdAWP/mEALP/kECZP+rEP9QGdARAWP/mEALP/kECZP+rEAOAWP/mEALP/kEAQP9OP9QGWPMBEZhDIoaLVcxORqlGLP5BADPBLBPeB+t+J83IBABCWFALP5EADPBLBPeE+t+J83IBAVAdAWPMWdkyQK8aeXM35pS8e8fGWP5BADPBLBPeD+t+J83IBABCkFAWP5EADPBLBPeI+t+J83IBABCAFHBAICLFGIAE6MBKKK/3EDIUE978jJJJJBC/AB9rHIDNADCD4AE2GLC98gGVtMBCBHDABHEINAEAEPBBBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKBBAECZFHEADCLFGDAV6MBKKDNAVAL9PMBAIALCIgGDCDTGEvCBC/ABAE9r/8KBAIABAVCDTFGVAE/8QBBDNADtMBAIAIPBLBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKLBKAVAIAE/8QBBKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIKKKEBCJWKLZ9tBB");var n,r=WebAssembly.instantiate(function(e){for(var i=new Uint8Array(e.length),n=0;n<e.length;++n){var r=e.charCodeAt(n);i[n]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}var o=0;for(n=0;n<e.length;++n)i[o++]=i[n]<60?t[i[n]]:64*(i[n]-60)+i[++n];return i.buffer.slice(0,o)}(i),{}).then((function(e){(n=e.instance).exports.__wasm_call_ctors()}));function o(e,t,i,r,o,a){var s=n.exports.sbrk,l=i+3&-4,u=s(l*r),c=s(o.length),h=new Uint8Array(n.exports.memory.buffer);h.set(o,c);var d=e(u,i,r,c,o.length);if(0==d&&a&&a(u,l,r),t.set(h.subarray(u,u+i*r)),s(u-s(0)),0!=d)throw new Error("Malformed buffer data: "+d)}var a={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},s={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return{ready:r,supported:!0,decodeVertexBuffer:function(e,t,i,r,s){o(n.exports.meshopt_decodeVertexBuffer,e,t,i,r,n.exports[a[s]])},decodeIndexBuffer:function(e,t,i,r){o(n.exports.meshopt_decodeIndexBuffer,e,t,i,r)},decodeIndexSequence:function(e,t,i,r){o(n.exports.meshopt_decodeIndexSequence,e,t,i,r)},decodeGltfBuffer:function(e,t,i,r,l,u){o(n.exports[s[l]],e,t,i,r,n.exports[a[u]])}}}(),C$3={};C$3.NoSleep=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=i(1),a=o.webm,s=o.mp4,l=typeof navigator<"u"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,u=function(){function e(){var t=this;r(this,e),l?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("muted",""),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",a),this._addSourceToVideo(this.noSleepVideo,"mp4",s),this.noSleepVideo.addEventListener("loadedmetadata",(function(){t.noSleepVideo.duration<=1?t.noSleepVideo.setAttribute("loop",""):t.noSleepVideo.addEventListener("timeupdate",(function(){t.noSleepVideo.currentTime>.5&&(t.noSleepVideo.currentTime=Math.random())}))})))}return n(e,[{key:"_addSourceToVideo",value:function(e,t,i){var n=document.createElement("source");n.src=i,n.type="video/"+t,e.appendChild(n)}},{key:"enable",value:function(){l?(this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n .\n "),this.noSleepTimer=window.setInterval((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3)):this.noSleepVideo.play()}},{key:"disable",value:function(){l?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),e}();e.exports=u},function(e,t,i){e.exports={webm:"data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA=",mp4:"data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}}]);var b$4=C$3.NoSleep;function t$4(){}t$4.array={},t$4.array.binarySearch=function(e,t,i){for(var n,r,o=i||t$4.array.numberSafeCompareFunction,a=0,s=e.length,l=!1;a<s;)(r=+o(e[n=a+(s-a>>1)],t))<0?a=n+1:(s=n,l=!r);return l?a:~a},t$4.array.numberSafeCompareFunction=function(e,t){return e>t?1:e<t?-1:0},t$4.array.includes=function(e,t){return e.indexOf(t)>=0},t$4.array.linearFindNearest=function(e,t,i){var n,r=e.length;if(e[0]<=t)return 0;if(t<=e[r-1])return r-1;if(i>0){for(n=1;n<r;++n)if(e[n]<t)return n-1}else if(i<0){for(n=1;n<r;++n)if(e[n]<=t)return n}else for(n=1;n<r;++n){if(e[n]==t)return n;if(e[n]<t)return e[n-1]-t<t-e[n]?n-1:n}return r-1},t$4.array.reverseSubArray=function(e,t,i){for(;t<i;){var n=e[t];e[t]=e[i],e[i]=n,++t,--i}},t$4.array.extend=function(e,t){var i,n=Array.isArray(t)?t:[t],r=n.length;for(i=0;i<r;i++)e[e.length]=n[i]},t$4.array.remove=function(e,t){var i=e.indexOf(t),n=i>-1;return n&&e.splice(i,1),n},t$4.array.find=function(e,t){for(var i,n=e.length>>>0,r=0;r<n;r++)if(t(i=e[r],r,e))return i;return null},t$4.array.equals=function(e,t){var i=e.length;if(i!==t.length)return!1;for(var n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0},t$4.array.stableSort=function(e,t){var i,n=e.length,r=Array(e.length);for(i=0;i<n;i++)r[i]={index:i,value:e[i]};for(r.sort((function(e,i){return t(e.value,i.value)||e.index-i.index})),i=0;i<e.length;i++)e[i]=r[i].value},t$4.array.findIndex=function(e,t){var i,n=!e.every((function(n,r){return i=r,!t(n,r,e)}));return n?i:-1},t$4.array.isSorted=function(e,t,i){var n=t||t$4.array.numberSafeCompareFunction;return e.every((function(t,r){if(0===r)return!0;var o=n(e[r-1],t);return!(o>0||i&&0===o)}))},t$4.ASSUME_TOUCH=!1,t$4.DEFAULT_MAX_ZOOM=42,t$4.DEFAULT_MIN_ZOOM=0,t$4.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD=.5,t$4.DEFAULT_TILE_SIZE=256,t$4.DEFAULT_WMS_VERSION="1.3.0",t$4.ENABLE_CANVAS=!0,t$4.ENABLE_PROJ4JS=!0,t$4.ENABLE_RASTER_REPROJECTION=!0,t$4.ENABLE_WEBGL=!0,t$4.DEBUG_WEBGL=!0,t$4.INITIAL_ATLAS_SIZE=256,t$4.MAX_ATLAS_SIZE=-1,t$4.MOUSEWHEELZOOM_MAXDELTA=1,t$4.OVERVIEWMAP_MAX_RATIO=.75,t$4.OVERVIEWMAP_MIN_RATIO=.1,t$4.RASTER_REPROJECTION_MAX_SOURCE_TILES=100,t$4.RASTER_REPROJECTION_MAX_SUBDIVISION=10,t$4.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH=.25,t$4.SIMPLIFY_TOLERANCE=.5,t$4.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK=1024,t$4.VERSION="",t$4.inherits=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},t$4.nullFunction=function(){},t$4.getUid=function(e){return e.ol_uid||(e.ol_uid=++t$4.uidCounter_)},t$4.asserts={},t$4.asserts.assert=function(e,t){},t$4.has={};var U$2=typeof navigator<"u"?navigator.userAgent.toLowerCase():"";function r$a(e){e$2b(e)||(e=new u$I),this._clock=e,this._eventHelper=new n$x,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=ce$1.observable(a$15.now()),this.systemTime.equalityComparer=a$15.equals,this.startTime=ce$1.observable(e.startTime),this.startTime.equalityComparer=a$15.equals,this.startTime.subscribe((function(t){e.startTime=t,this.synchronize()}),this),this.stopTime=ce$1.observable(e.stopTime),this.stopTime.equalityComparer=a$15.equals,this.stopTime.subscribe((function(t){e.stopTime=t,this.synchronize()}),this),this.currentTime=ce$1.observable(e.currentTime),this.currentTime.equalityComparer=a$15.equals,this.currentTime.subscribe((function(t){e.currentTime=t,this.synchronize()}),this),this.multiplier=ce$1.observable(e.multiplier),this.multiplier.subscribe((function(t){e.multiplier=t,this.synchronize()}),this),this.clockStep=ce$1.observable(e.clockStep),this.clockStep.subscribe((function(t){e.clockStep=t,this.synchronize()}),this),this.clockRange=ce$1.observable(e.clockRange),this.clockRange.subscribe((function(t){e.clockRange=t,this.synchronize()}),this),this.canAnimate=ce$1.observable(e.canAnimate),this.canAnimate.subscribe((function(t){e.canAnimate=t,this.synchronize()}),this),this.shouldAnimate=ce$1.observable(e.shouldAnimate),this.shouldAnimate.subscribe((function(t){e.shouldAnimate=t,this.synchronize()}),this),ce$1.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}function t$3(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,t$16.throwInstantiationError()}function s$4(e,t){if(!e$2b(e))throw new t$16("func is required.");t=u$_(t,!0);var i=new o$1h,n=new o$1h;function r(){if(!r.canExecute)throw new t$16("Cannot execute command, canExecute is false.");var t,o={args:arguments,cancel:!1};return i.raiseEvent(o),o.cancel||(t=e.apply(null,arguments),n.raiseEvent(t)),t}return r.canExecute=t,ce$1.track(r,["canExecute"]),Object.defineProperties(r,{beforeExecute:{value:i},afterExecute:{value:n}}),r}t$4.has.FIREFOX=-1!==U$2.indexOf("firefox"),t$4.has.SAFARI=-1!==U$2.indexOf("safari")&&-1==U$2.indexOf("chrom"),t$4.has.WEBKIT=-1!==U$2.indexOf("webkit")&&-1==U$2.indexOf("edge"),t$4.has.MAC=-1!==U$2.indexOf("macintosh"),t$4.has.DEVICE_PIXEL_RATIO=1,t$4.has.CANVAS_LINE_DASH=!0,t$4.structs={},t$4.CollectionEventType={ADD:"add",REMOVE:"remove"},t$4.ObjectEventType={PROPERTYCHANGE:"propertychange"},t$4.events={},t$4.events.bindListener_=function(e){var t=function(t){var i=e.listener,n=e.bindTo||e.target;return e.callOnce&&t$4.events.unlistenByKey(e),i.call(n,t)};return e.boundListener=t,t},t$4.events.findListener_=function(e,t,i,n){for(var r,o=0,a=e.length;o<a;++o)if((r=e[o]).listener===t&&r.bindTo===i)return n&&(r.deleteIndex=o),r},t$4.events.getListeners=function(e,t){var i=e.ol_lm;return i?i[t]:void 0},t$4.events.getListenerMap_=function(e){var t=e.ol_lm;return t||(t=e.ol_lm={}),t},t$4.events.removeListeners_=function(e,t){var i=t$4.events.getListeners(e,t);if(i){for(var n=0,r=i.length;n<r;++n)e.removeEventListener(t,i[n].boundListener),t$4.obj.clear(i[n]);i.length=0;var o=e.ol_lm;o&&(delete o[t],0===Object.keys(o).length&&delete e.ol_lm)}},t$4.events.listen=function(e,t,i,n,r){var o=t$4.events.getListenerMap_(e),a=o[t];a||(a=o[t]=[]);var s=t$4.events.findListener_(a,i,n,!1);return s?r||(s.callOnce=!1):(s={bindTo:n,callOnce:!!r,listener:i,target:e,type:t},e.addEventListener(t,t$4.events.bindListener_(s)),a.push(s)),s},t$4.events.listenOnce=function(e,t,i,n){return t$4.events.listen(e,t,i,n,!0)},t$4.events.unlisten=function(e,t,i,n){var r=t$4.events.getListeners(e,t);if(r){var o=t$4.events.findListener_(r,i,n,!0);o&&t$4.events.unlistenByKey(o)}},t$4.events.unlistenByKey=function(e){if(e&&e.target){e.target.removeEventListener(e.type,e.boundListener);var t=t$4.events.getListeners(e.target,e.type);if(t){var i="deleteIndex"in e?e.deleteIndex:t.indexOf(e);-1!==i&&t.splice(i,1),0===t.length&&t$4.events.removeListeners_(e.target,e.type)}t$4.obj.clear(e)}},t$4.events.unlistenAll=function(e){var t=t$4.events.getListenerMap_(e);for(var i in t)t$4.events.removeListeners_(e,i)},t$4.Disposable=function(){},t$4.Disposable.prototype.disposed_=!1,t$4.Disposable.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())},t$4.Disposable.prototype.disposeInternal=t$4.nullFunction,t$4.events.Event={},t$4.events.Event=function(e){this.propagationStopped,this.type=e,this.target=null},t$4.events.Event.prototype.preventDefault=t$4.events.Event.prototype.stopPropagation=function(){this.propagationStopped=!0},t$4.events.Event.stopPropagation=function(e){e.stopPropagation()},t$4.events.Event.preventDefault=function(e){e.preventDefault()},t$4.events.EventTarget={},t$4.events.EventTarget=function(){t$4.Disposable.call(this),this.pendingRemovals_={},this.dispatching_={},this.listeners_={}},t$4.inherits(t$4.events.EventTarget,t$4.Disposable),t$4.events.EventTarget.prototype.addEventListener=function(e,t){var i=this.listeners_[e];i||(i=this.listeners_[e]=[]),-1===i.indexOf(t)&&i.push(t)},t$4.events.EventTarget.prototype.dispatchEvent=function(e){var t="string"==typeof e?new t$4.events.Event(e):e,i=t.type;t.target=this;var n,r=this.listeners_[i];if(r){i in this.dispatching_||(this.dispatching_[i]=0,this.pendingRemovals_[i]=0),++this.dispatching_[i];for(var o=0,a=r.length;o<a;++o)if(!1===r[o].call(this,t)||t.propagationStopped){n=!1;break}if(--this.dispatching_[i],0===this.dispatching_[i]){var s=this.pendingRemovals_[i];for(delete this.pendingRemovals_[i];s--;)this.removeEventListener(i,t$4.nullFunction);delete this.dispatching_[i]}return n}},t$4.events.EventTarget.prototype.disposeInternal=function(){t$4.events.unlistenAll(this)},t$4.events.EventTarget.prototype.getListeners=function(e){return this.listeners_[e]},t$4.events.EventTarget.prototype.hasListener=function(e){return e?e in this.listeners_:Object.keys(this.listeners_).length>0},t$4.events.EventTarget.prototype.removeEventListener=function(e,t){var i=this.listeners_[e];if(i){var n=i.indexOf(t);e in this.pendingRemovals_?(i[n]=t$4.nullFunction,++this.pendingRemovals_[e]):(i.splice(n,1),0===i.length&&delete this.listeners_[e])}},t$4.events.EventType={CHANGE:"change",CLEAR:"clear",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",ERROR:"error",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",MOUSEDOWN:"mousedown",MOUSEMOVE:"mousemove",MOUSEOUT:"mouseout",MOUSEUP:"mouseup",MOUSEWHEEL:"mousewheel",MSPOINTERDOWN:"MSPointerDown",RESIZE:"resize",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",WHEEL:"wheel"},t$4.Observable=function(){this.revision_=0},t$4.inherits(t$4.Observable,t$4.events.EventTarget),t$4.Observable.unByKey=function(e){if(Array.isArray(e))for(var t=0,i=e.length;t<i;++t)t$4.events.unlistenByKey(e[t]);else t$4.events.unlistenByKey(e)},t$4.Observable.prototype.changed=function(){++this.revision_},t$4.Observable.prototype.dispatchEvent,t$4.Observable.prototype.getRevision=function(){return this.revision_},t$4.Observable.prototype.on=function(e,t,i){if(Array.isArray(e)){for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=t$4.events.listen(this,e[o],t,i);return r}return t$4.events.listen(this,e,t,i)},t$4.Observable.prototype.once=function(e,t,i){if(Array.isArray(e)){for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=t$4.events.listenOnce(this,e[o],t,i);return r}return t$4.events.listenOnce(this,e,t,i)},t$4.Observable.prototype.un=function(e,t,i){if(Array.isArray(e))for(var n=0,r=e.length;n<r;++n)t$4.events.unlisten(this,e[n],t,i);else t$4.events.unlisten(this,e,t,i)},t$4.uidCounter_=0,t$4.Object=function(e){t$4.Observable.call(this),t$4.getUid(this),this.values_={},void 0!==e&&this.setProperties(e)},t$4.inherits(t$4.Object,t$4.Observable),t$4.Object.changeEventTypeCache_={},t$4.Object.getChangeEventType=function(e){return t$4.Object.changeEventTypeCache_.hasOwnProperty(e)?t$4.Object.changeEventTypeCache_[e]:t$4.Object.changeEventTypeCache_[e]="change:"+e},t$4.Object.prototype.get=function(e){var t;return this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t},t$4.Object.prototype.getKeys=function(){return Object.keys(this.values_)},t$4.Object.prototype.getProperties=function(){return t$4.obj.assign({},this.values_)},t$4.Object.prototype.notify=function(e,t){},t$4.Object.prototype.set=function(e,t,i){if(i)this.values_[e]=t;else{var n=this.values_[e];this.values_[e]=t,n!==t&&this.notify(e,n)}},t$4.Object.prototype.setProperties=function(e,t){var i;for(i in e)this.set(i,e[i],t)},t$4.Object.prototype.unset=function(e,t){if(e in this.values_){var i=this.values_[e];delete this.values_[e],t||this.notify(e,i)}},t$4.Object.Event=function(e,t,i){t$4.events.Event.call(this,e),this.key=t,this.oldValue=i},t$4.inherits(t$4.Object.Event,t$4.events.Event),t$4.functions={},t$4.functions.TRUE=function(){return!0},t$4.functions.FALSE=function(){return!1},t$4.math={},t$4.math.clamp=function(e,t,i){return Math.min(Math.max(e,t),i)},t$4.math.cosh=function(){var e;return e="cosh"in Math?Math.cosh:function(e){var t=Math.exp(e);return(t+1/t)/2},e}(),t$4.math.roundUpToPowerOfTwo=function(e){return t$4.asserts.assert(0<e,29),Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},t$4.math.squaredSegmentDistance=function(e,t,i,n,r,o){var a=r-i,s=o-n;if(0!==a||0!==s){var l=((e-i)*a+(t-n)*s)/(a*a+s*s);l>1?(i=r,n=o):l>0&&(i+=a*l,n+=s*l)}return t$4.math.squaredDistance(e,t,i,n)},t$4.math.squaredDistance=function(e,t,i,n){var r=i-e,o=n-t;return r*r+o*o},t$4.math.solveLinearSystem=function(e){for(var t=e.length,i=0;i<t;i++){for(var n=i,r=Math.abs(e[i][i]),o=i+1;o<t;o++){var a=Math.abs(e[o][i]);a>r&&(r=a,n=o)}if(0===r)return null;var s=e[n];e[n]=e[i],e[i]=s;for(var l=i+1;l<t;l++)for(var u=-e[l][i]/e[i][i],c=i;c<t+1;c++)i==c?e[l][c]=0:e[l][c]+=u*e[i][c]}for(var h=new Array(t),d=t-1;d>=0;d--){h[d]=e[d][t]/e[d][d];for(var f=d-1;f>=0;f--)e[f][t]-=e[f][d]*h[d]}return h},t$4.math.toDegrees=function(e){return 180*e/Math.PI},t$4.math.toRadians=function(e){return e*Math.PI/180},t$4.math.modulo=function(e,t){var i=e%t;return i*t<0?i+t:i},t$4.math.lerp=function(e,t,i){return e+i*(t-e)},t$4.ImageState={IDLE:0,LOADING:1,LOADED:2,ERROR:3},t$4.color={},t$4.color.HEX_COLOR_RE_=/^#(?:[0-9a-f]{3,4}){1,2}$/i,t$4.color.NAMED_COLOR_RE_=/^([a-z]*)$/i,t$4.color.asArray=function(e){return Array.isArray(e)?e:t$4.color.fromString(e)},t$4.color.asString=function(e){return"string"==typeof e?e:t$4.color.toString(e)},t$4.color.fromNamed=function(e){var t=document.createElement("div");t.style.color=e,document.body.appendChild(t);var i=getComputedStyle(t).color;return document.body.removeChild(t),i},t$4.color.fromString=function(){var e={},t=0;return function(i){var n;if(e.hasOwnProperty(i))n=e[i];else{if(t>=1024){var r,o=0;for(r in e)0==(3&o++)&&(delete e[r],--t)}n=t$4.color.fromStringInternal_(i),e[i]=n,++t}return n}}(),t$4.color.fromStringInternal_=function(e){var t,i,n,r,o,a;if(t$4.color.NAMED_COLOR_RE_.exec(e)&&(e=t$4.color.fromNamed(e)),t$4.color.HEX_COLOR_RE_.exec(e)){var s,l=e.length-1;s=l<=4?1:2;var u=4===l||8===l;t=parseInt(e.substr(1+0*s,s),16),i=parseInt(e.substr(1+1*s,s),16),n=parseInt(e.substr(1+2*s,s),16),r=u?parseInt(e.substr(1+3*s,s),16):255,1==s&&(t=(t<<4)+t,i=(i<<4)+i,n=(n<<4)+n,u&&(r=(r<<4)+r)),o=[t,i,n,r/255]}else 0==e.indexOf("rgba(")?(a=e.slice(5,-1).split(",").map(Number),o=t$4.color.normalize(a)):0==e.indexOf("rgb(")?((a=e.slice(4,-1).split(",").map(Number)).push(1),o=t$4.color.normalize(a)):t$4.asserts.assert(!1,14);return o},t$4.color.normalize=function(e,t){var i=t||[];return i[0]=t$4.math.clamp(e[0]+.5|0,0,255),i[1]=t$4.math.clamp(e[1]+.5|0,0,255),i[2]=t$4.math.clamp(e[2]+.5|0,0,255),i[3]=t$4.math.clamp(e[3],0,1),i},t$4.color.toString=function(e){var t=e[0];t!=(0|t)&&(t=t+.5|0);var i=e[1];i!=(0|i)&&(i=i+.5|0);var n=e[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+t+","+i+","+n+","+(void 0===e[3]?1:e[3])+")"},t$4.colorlike={},t$4.colorlike.asColorLike=function(e){return t$4.colorlike.isColorLike(e)?e:t$4.color.asString(e)},t$4.colorlike.isColorLike=function(e){return"string"==typeof e||e instanceof CanvasPattern||e instanceof CanvasGradient},t$4.css={},t$4.css.CLASS_HIDDEN="ol-hidden",t$4.css.CLASS_SELECTABLE="ol-selectable",t$4.css.CLASS_UNSELECTABLE="ol-unselectable",t$4.css.CLASS_UNSUPPORTED="ol-unsupported",t$4.css.CLASS_CONTROL="ol-control",t$4.css.getFontFamilies=function(){var e,t={};return function(i){if(e||(e=document.createElement("div").style),!(i in t)){e.font=i;var n=e.fontFamily;if(e.font="",!n)return null;t[i]=n.split(/,\s?/)}return t[i]}}(),t$4.dom={},t$4.dom.createCanvasContext2D=function(e,t){return(e&&t?new OffscreenCanvas(e,t):new OffscreenCanvas(1,1)).getContext("2d")},t$4.dom.outerWidth=function(e){var t=e.offsetWidth,i=getComputedStyle(e);return t+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)},t$4.dom.outerHeight=function(e){var t=e.offsetHeight,i=getComputedStyle(e);return t+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)},t$4.dom.replaceNode=function(e,t){var i=t.parentNode;i&&i.replaceChild(e,t)},t$4.dom.removeNode=function(e){return e&&e.parentNode?e.parentNode.removeChild(e):null},t$4.dom.removeChildren=function(e){for(;e.lastChild;)e.removeChild(e.lastChild)},t$4.extent={},t$4.extent.Corner={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},t$4.extent.Relationship={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16},t$4.extent.boundingExtent=function(e){for(var t=t$4.extent.createEmpty(),i=0,n=e.length;i<n;++i)t$4.extent.extendCoordinate(t,e[i]);return t},t$4.extent.boundingExtentXYs_=function(e,t,i){var n=Math.min.apply(null,e),r=Math.min.apply(null,t),o=Math.max.apply(null,e),a=Math.max.apply(null,t);return t$4.extent.createOrUpdate(n,r,o,a,i)},t$4.extent.buffer=function(e,t,i){return i?(i[0]=e[0]-t,i[1]=e[1]-t,i[2]=e[2]+t,i[3]=e[3]+t,i):[e[0]-t,e[1]-t,e[2]+t,e[3]+t]},t$4.extent.clone=function(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e.slice()},t$4.extent.closestSquaredDistanceXY=function(e,t,i){var n,r;return(n=t<e[0]?e[0]-t:e[2]<t?t-e[2]:0)*n+(r=i<e[1]?e[1]-i:e[3]<i?i-e[3]:0)*r},t$4.extent.containsCoordinate=function(e,t){return t$4.extent.containsXY(e,t[0],t[1])},t$4.extent.containsExtent=function(e,t){return e[0]<=t[0]&&t[2]<=e[2]&&e[1]<=t[1]&&t[3]<=e[3]},t$4.extent.containsXY=function(e,t,i){return e[0]<=t&&t<=e[2]&&e[1]<=i&&i<=e[3]},t$4.extent.coordinateRelationship=function(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t$4.extent.Relationship.UNKNOWN;return a<i?l|=t$4.extent.Relationship.LEFT:a>r&&(l|=t$4.extent.Relationship.RIGHT),s<n?l|=t$4.extent.Relationship.BELOW:s>o&&(l|=t$4.extent.Relationship.ABOVE),l===t$4.extent.Relationship.UNKNOWN&&(l=t$4.extent.Relationship.INTERSECTING),l},t$4.extent.createEmpty=function(){return[1/0,1/0,-1/0,-1/0]},t$4.extent.createOrUpdate=function(e,t,i,n,r){return r?(r[0]=e,r[1]=t,r[2]=i,r[3]=n,r):[e,t,i,n]},t$4.extent.createOrUpdateEmpty=function(e){return t$4.extent.createOrUpdate(1/0,1/0,-1/0,-1/0,e)},t$4.extent.createOrUpdateFromCoordinate=function(e,t){var i=e[0],n=e[1];return t$4.extent.createOrUpdate(i,n,i,n,t)},t$4.extent.createOrUpdateFromCoordinates=function(e,t){var i=t$4.extent.createOrUpdateEmpty(t);return t$4.extent.extendCoordinates(i,e)},t$4.extent.createOrUpdateFromFlatCoordinates=function(e,t,i,n,r){var o=t$4.extent.createOrUpdateEmpty(r);return t$4.extent.extendFlatCoordinates(o,e,t,i,n)},t$4.extent.createOrUpdateFromRings=function(e,t){var i=t$4.extent.createOrUpdateEmpty(t);return t$4.extent.extendRings(i,e)},t$4.extent.equals=function(e,t){return e[0]==t[0]&&e[2]==t[2]&&e[1]==t[1]&&e[3]==t[3]},t$4.extent.extend=function(e,t){return t[0]<e[0]&&(e[0]=t[0]),t[2]>e[2]&&(e[2]=t[2]),t[1]<e[1]&&(e[1]=t[1]),t[3]>e[3]&&(e[3]=t[3]),e},t$4.extent.extendCoordinate=function(e,t){t[0]<e[0]&&(e[0]=t[0]),t[0]>e[2]&&(e[2]=t[0]),t[1]<e[1]&&(e[1]=t[1]),t[1]>e[3]&&(e[3]=t[1])},t$4.extent.extendCoordinates=function(e,t){var i,n;for(i=0,n=t.length;i<n;++i)t$4.extent.extendCoordinate(e,t[i]);return e},t$4.extent.extendFlatCoordinates=function(e,t,i,n,r){for(;i<n;i+=r)t$4.extent.extendXY(e,t[i],t[i+1]);return e},t$4.extent.extendRings=function(e,t){var i,n;for(i=0,n=t.length;i<n;++i)t$4.extent.extendCoordinates(e,t[i]);return e},t$4.extent.extendXY=function(e,t,i){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],i),e[2]=Math.max(e[2],t),e[3]=Math.max(e[3],i)},t$4.extent.forEachCorner=function(e,t,i){var n;return!!((n=t.call(i,t$4.extent.getBottomLeft(e)))||(n=t.call(i,t$4.extent.getBottomRight(e)),n)||(n=t.call(i,t$4.extent.getTopRight(e)),n)||(n=t.call(i,t$4.extent.getTopLeft(e)),n))&&n},t$4.extent.getArea=function(e){var t=0;return t$4.extent.isEmpty(e)||(t=t$4.extent.getWidth(e)*t$4.extent.getHeight(e)),t},t$4.extent.getBottomLeft=function(e){return[e[0],e[1]]},t$4.extent.getBottomRight=function(e){return[e[2],e[1]]},t$4.extent.getCenter=function(e){return[(e[0]+e[2])/2,(e[1]+e[3])/2]},t$4.extent.getCorner=function(e,t){var i;return t===t$4.extent.Corner.BOTTOM_LEFT?i=t$4.extent.getBottomLeft(e):t===t$4.extent.Corner.BOTTOM_RIGHT?i=t$4.extent.getBottomRight(e):t===t$4.extent.Corner.TOP_LEFT?i=t$4.extent.getTopLeft(e):t===t$4.extent.Corner.TOP_RIGHT?i=t$4.extent.getTopRight(e):t$4.asserts.assert(!1,13),i},t$4.extent.getEnlargedArea=function(e,t){var i=Math.min(e[0],t[0]),n=Math.min(e[1],t[1]);return(Math.max(e[2],t[2])-i)*(Math.max(e[3],t[3])-n)},t$4.extent.getForViewAndSize=function(e,t,i,n,r){var o=t*n[0]/2,a=t*n[1]/2,s=Math.cos(i),l=Math.sin(i),u=o*s,c=o*l,h=a*s,d=a*l,f=e[0],p=e[1],_=f-u+d,m=f-u-d,g=f+u-d,x=f+u+d,v=p-c-h,y=p-c+h,$=p+c+h,b=p+c-h;return t$4.extent.createOrUpdate(Math.min(_,m,g,x),Math.min(v,y,$,b),Math.max(_,m,g,x),Math.max(v,y,$,b),r)},t$4.extent.getHeight=function(e){return e[3]-e[1]},t$4.extent.getIntersectionArea=function(e,t){var i=t$4.extent.getIntersection(e,t);return t$4.extent.getArea(i)},t$4.extent.getIntersection=function(e,t,i){var n=i||t$4.extent.createEmpty();return t$4.extent.intersects(e,t)&&(e[0]>t[0]?n[0]=e[0]:n[0]=t[0],e[1]>t[1]?n[1]=e[1]:n[1]=t[1],e[2]<t[2]?n[2]=e[2]:n[2]=t[2],e[3]<t[3]?n[3]=e[3]:n[3]=t[3]),n},t$4.extent.getMargin=function(e){return t$4.extent.getWidth(e)+t$4.extent.getHeight(e)},t$4.extent.getSize=function(e){return[e[2]-e[0],e[3]-e[1]]},t$4.extent.getTopLeft=function(e){return[e[0],e[3]]},t$4.extent.getTopRight=function(e){return[e[2],e[3]]},t$4.extent.getWidth=function(e){return e[2]-e[0]},t$4.extent.intersects=function(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]},t$4.extent.isEmpty=function(e){return e[2]<e[0]||e[3]<e[1]},t$4.extent.returnOrUpdate=function(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e},t$4.extent.scaleFromCenter=function(e,t){var i=(e[2]-e[0])/2*(t-1),n=(e[3]-e[1])/2*(t-1);e[0]-=i,e[2]+=i,e[1]-=n,e[3]+=n},t$4.extent.intersectsSegment=function(e,t,i){var n=!1,r=t$4.extent.coordinateRelationship(e,t),o=t$4.extent.coordinateRelationship(e,i);if(r===t$4.extent.Relationship.INTERSECTING||o===t$4.extent.Relationship.INTERSECTING)n=!0;else{var a,s,l=e[0],u=e[1],c=e[2],h=e[3],d=t[0],f=t[1],p=i[0],_=i[1],m=(_-f)/(p-d);!!(o&t$4.extent.Relationship.ABOVE)&&!(r&t$4.extent.Relationship.ABOVE)&&(n=(a=p-(_-h)/m)>=l&&a<=c),!n&&!!(o&t$4.extent.Relationship.RIGHT)&&!(r&t$4.extent.Relationship.RIGHT)&&(n=(s=_-(p-c)*m)>=u&&s<=h),!n&&!!(o&t$4.extent.Relationship.BELOW)&&!(r&t$4.extent.Relationship.BELOW)&&(n=(a=p-(_-u)/m)>=l&&a<=c),!n&&o&t$4.extent.Relationship.LEFT&&!(r&t$4.extent.Relationship.LEFT)&&(n=(s=_-(p-l)*m)>=u&&s<=h)}return n},t$4.extent.applyTransform=function(e,t,i){var n=[e[0],e[1],e[0],e[3],e[2],e[1],e[2],e[3]];t(n,n,2);var r=[n[0],n[2],n[4],n[6]],o=[n[1],n[3],n[5],n[7]];return t$4.extent.boundingExtentXYs_(r,o,i)},t$4.obj={},t$4.obj.assign="function"==typeof Object.assign?Object.assign:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(e),n=1,r=arguments.length;n<r;++n){var o=arguments[n];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(i[a]=o[a])}return i},t$4.obj.clear=function(e){for(var t in e)delete e[t]},t$4.obj.getValues=function(e){var t=[];for(var i in e)t.push(e[i]);return t},t$4.obj.isEmpty=function(e){var t;for(t in e)return!1;return!t},t$4.transform={},t$4.transform.tmp_=new Array(6),t$4.transform.create=function(){return[1,0,0,1,0,0]},t$4.transform.reset=function(e){return t$4.transform.set(e,1,0,0,1,0,0)},t$4.transform.multiply=function(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],u=t[1],c=t[2],h=t[3],d=t[4],f=t[5];return e[0]=i*l+r*u,e[1]=n*l+o*u,e[2]=i*c+r*h,e[3]=n*c+o*h,e[4]=i*d+r*f+a,e[5]=n*d+o*f+s,e},t$4.transform.set=function(e,t,i,n,r,o,a){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e},t$4.transform.setFromArray=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},t$4.transform.apply=function(e,t){var i=t[0],n=t[1];return t[0]=e[0]*i+e[2]*n+e[4],t[1]=e[1]*i+e[3]*n+e[5],t},t$4.transform.rotate=function(e,t){var i=Math.cos(t),n=Math.sin(t);return t$4.transform.multiply(e,t$4.transform.set(t$4.transform.tmp_,i,n,-n,i,0,0))},t$4.transform.scale=function(e,t,i){return t$4.transform.multiply(e,t$4.transform.set(t$4.transform.tmp_,t,0,0,i,0,0))},t$4.transform.translate=function(e,t,i){return t$4.transform.multiply(e,t$4.transform.set(t$4.transform.tmp_,1,0,0,1,t,i))},t$4.transform.compose=function(e,t,i,n,r,o,a,s){var l=Math.sin(o),u=Math.cos(o);return e[0]=n*u,e[1]=r*l,e[2]=-n*l,e[3]=r*u,e[4]=a*n*u-s*n*l+t,e[5]=a*r*l+s*r*u+i,e},t$4.transform.invert=function(e){var t=t$4.transform.determinant(e),i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5];return e[0]=o/t,e[1]=-n/t,e[2]=-r/t,e[3]=i/t,e[4]=(r*s-o*a)/t,e[5]=-(i*s-n*a)/t,e},t$4.transform.determinant=function(e){return e[0]*e[3]-e[1]*e[2]},t$4.geom={},t$4.geom.flat={},t$4.geom.flat.center={},t$4.geom.flat.reverse={},t$4.geom.flat.orient={},t$4.geom.flat.transform={},t$4.geom.flat.transform.transform2D=function(e,t,i,n,r,o){var a,s=o||[],l=0;for(a=t;a<i;a+=n){var u=e[a],c=e[a+1];s[l++]=r[0]*u+r[2]*c+r[4],s[l++]=r[1]*u+r[3]*c+r[5]}return o&&s.length!=l&&(s.length=l),s},t$4.geom.flat.transform.rotate=function(e,t,i,n,r,o,a){for(var s=a||[],l=Math.cos(r),u=Math.sin(r),c=o[0],h=o[1],d=0,f=t;f<i;f+=n){var p=e[f]-c,_=e[f+1]-h;s[d++]=c+p*l-_*u,s[d++]=h+p*u+_*l;for(var m=f+2;m<f+n;++m)s[d++]=e[m]}return a&&s.length!=d&&(s.length=d),s},t$4.geom.flat.transform.scale=function(e,t,i,n,r,o,a,s){for(var l=s||[],u=a[0],c=a[1],h=0,d=t;d<i;d+=n){var f=e[d]-u,p=e[d+1]-c;l[h++]=u+r*f,l[h++]=c+o*p;for(var _=d+2;_<d+n;++_)l[h++]=e[_]}return s&&l.length!=h&&(l.length=h),l},t$4.geom.GeometryLayout={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"},t$4.geom.flat.reverse.coordinates=function(e,t,i,n){for(;t<i-n;){var r;for(r=0;r<n;++r){var o=e[t+r];e[t+r]=e[i-n+r],e[i-n+r]=o}t+=n,i-=n}},t$4.geom.flat.orient.linearRingIsClockwise=function(e,t,i,n){for(var r=0,o=e[i-n],a=e[i-n+1];t<i;t+=n){var s=e[t],l=e[t+1];r+=(s-o)*(l+a),o=s,a=l}return r>0},t$4.geom.flat.orient.linearRingsAreOriented=function(e,t,i,n,r){var o,a,s=void 0!==r&&r;for(o=0,a=i.length;o<a;++o){var l=i[o],u=t$4.geom.flat.orient.linearRingIsClockwise(e,t,l,n);if(0===o){if(s&&u||!s&&!u)return!1}else if(s&&!u||!s&&u)return!1;t=l}return!0},t$4.geom.flat.orient.linearRingssAreOriented=function(e,t,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o)if(!t$4.geom.flat.orient.linearRingsAreOriented(e,t,i[o],n,r))return!1;return!0},t$4.geom.flat.orient.orientLinearRings=function(e,t,i,n,r){var o,a,s=void 0!==r&&r;for(o=0,a=i.length;o<a;++o){var l=i[o],u=t$4.geom.flat.orient.linearRingIsClockwise(e,t,l,n);(0===o?s&&u||!s&&!u:s&&!u||!s&&u)&&t$4.geom.flat.reverse.coordinates(e,t,l,n),t=l}return t},t$4.geom.flat.orient.orientLinearRingss=function(e,t,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o)t=t$4.geom.flat.orient.orientLinearRings(e,t,i[o],n,r);return t},t$4.geom.flat.simplify={},t$4.geom.flat.simplify.lineString=function(e,t,i,n,r,o,a){var s=void 0!==a?a:[];return o||(i=t$4.geom.flat.simplify.radialDistance(e,t,i,n,r,s,0),e=s,t=0,n=2),s.length=t$4.geom.flat.simplify.douglasPeucker(e,t,i,n,r,s,0),s},t$4.geom.flat.simplify.douglasPeucker=function(e,t,i,n,r,o,a){var s=(i-t)/n;if(s<3){for(;t<i;t+=n)o[a++]=e[t],o[a++]=e[t+1];return a}var l=new Array(s);l[0]=1,l[s-1]=1;for(var u,c=[t,i-n],h=0;c.length>0;){var d=c.pop(),f=c.pop(),p=0,_=e[f],m=e[f+1],g=e[d],x=e[d+1];for(u=f+n;u<d;u+=n){var v=e[u],y=e[u+1],$=t$4.math.squaredSegmentDistance(v,y,_,m,g,x);$>p&&(h=u,p=$)}p>r&&(l[(h-t)/n]=1,f+n<h&&c.push(f,h),h+n<d&&c.push(h,d))}for(u=0;u<s;++u)l[u]&&(o[a++]=e[t+u*n],o[a++]=e[t+u*n+1]);return a},t$4.geom.flat.simplify.douglasPeuckers=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l];a=t$4.geom.flat.simplify.douglasPeucker(e,t,c,n,r,o,a),s.push(a),t=c}return a},t$4.geom.flat.simplify.douglasPeuckerss=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l],h=[];a=t$4.geom.flat.simplify.douglasPeuckers(e,t,c,n,r,o,a,h),s.push(h),t=c[c.length-1]}return a},t$4.geom.flat.simplify.radialDistance=function(e,t,i,n,r,o,a){if(i<=t+n){for(;t<i;t+=n)o[a++]=e[t],o[a++]=e[t+1];return a}var s=e[t],l=e[t+1];o[a++]=s,o[a++]=l;var u=s,c=l;for(t+=n;t<i;t+=n)u=e[t],c=e[t+1],t$4.math.squaredDistance(s,l,u,c)>r&&(o[a++]=u,o[a++]=c,s=u,l=c);return(u!=s||c!=l)&&(o[a++]=u,o[a++]=c),a},t$4.geom.flat.simplify.snap=function(e,t){return t*Math.round(e/t)},t$4.geom.flat.simplify.quantize=function(e,t,i,n,r,o,a){if(t==i)return a;var s,l,u=t$4.geom.flat.simplify.snap(e[t],r),c=t$4.geom.flat.simplify.snap(e[t+1],r);t+=n,o[a++]=u,o[a++]=c;do{if(s=t$4.geom.flat.simplify.snap(e[t],r),l=t$4.geom.flat.simplify.snap(e[t+1],r),(t+=n)==i)return o[a++]=s,o[a++]=l,a}while(s==u&&l==c);for(;t<i;){var h,d;if(h=t$4.geom.flat.simplify.snap(e[t],r),d=t$4.geom.flat.simplify.snap(e[t+1],r),t+=n,h!=s||d!=l){var f=s-u,p=l-c,_=h-u,m=d-c;if(f*m==p*_&&(f<0&&_<f||f==_||f>0&&_>f)&&(p<0&&m<p||p==m||p>0&&m>p)){s=h,l=d;continue}o[a++]=s,o[a++]=l,u=s,c=l,s=h,l=d}}return o[a++]=s,o[a++]=l,a},t$4.geom.flat.simplify.quantizes=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l];a=t$4.geom.flat.simplify.quantize(e,t,c,n,r,o,a),s.push(a),t=c}return a},t$4.geom.flat.simplify.quantizess=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l],h=[];a=t$4.geom.flat.simplify.quantizes(e,t,c,n,r,o,a,h),s.push(h),t=c[c.length-1]}return a},t$4.geom.GeometryType={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},t$4.geom.Geometry=function(){t$4.Object.call(this),this.extent_=t$4.extent.createEmpty(),this.extentRevision_=-1,this.simplifiedGeometryCache={},this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.tmpTransform_=t$4.transform.create()},t$4.inherits(t$4.geom.Geometry,t$4.Object),t$4.geom.Geometry.prototype.clone=function(){},t$4.geom.Geometry.prototype.closestPointXY=function(e,t,i,n){},t$4.geom.Geometry.prototype.getClosestPoint=function(e,t){var i=t||[NaN,NaN];return this.closestPointXY(e[0],e[1],i,1/0),i},t$4.geom.Geometry.prototype.intersectsCoordinate=function(e){return this.containsXY(e[0],e[1])},t$4.geom.Geometry.prototype.computeExtent=function(e){},t$4.geom.Geometry.prototype.containsXY=t$4.functions.FALSE,t$4.geom.Geometry.prototype.getExtent=function(e){return this.extentRevision_!=this.getRevision()&&(this.extent_=this.computeExtent(this.extent_),this.extentRevision_=this.getRevision()),t$4.extent.returnOrUpdate(this.extent_,e)},t$4.geom.Geometry.prototype.rotate=function(e,t){},t$4.geom.Geometry.prototype.scale=function(e,t,i){},t$4.geom.Geometry.prototype.simplify=function(e){return this.getSimplifiedGeometry(e*e)},t$4.geom.Geometry.prototype.getSimplifiedGeometry=function(e){},t$4.geom.Geometry.prototype.getType=function(){},t$4.geom.Geometry.prototype.applyTransform=function(e){},t$4.geom.Geometry.prototype.intersectsExtent=function(e){},t$4.geom.Geometry.prototype.translate=function(e,t){},t$4.geom.Geometry.prototype.transform=function(e,t){var i=this.tmpTransform_,n=(e=t$4.proj.get(e)).getUnits()==t$4.proj.Units.TILE_PIXELS?function(n,r,o){var a=e.getExtent(),s=e.getWorldExtent(),l=t$4.extent.getHeight(s)/t$4.extent.getHeight(a);return t$4.transform.compose(i,s[0],s[3],l,-l,0,0,0),t$4.geom.flat.transform.transform2D(n,0,n.length,o,i,r),t$4.proj.getTransform(e,t)(n,r,o)}:t$4.proj.getTransform(e,t);return this.applyTransform(n),this},t$4.geom.SimpleGeometry=function(){t$4.geom.Geometry.call(this),this.layout=t$4.geom.GeometryLayout.XY,this.stride=2,this.flatCoordinates=null},t$4.inherits(t$4.geom.SimpleGeometry,t$4.geom.Geometry),t$4.geom.SimpleGeometry.getLayoutForStride_=function(e){var t;return 2==e?t=t$4.geom.GeometryLayout.XY:3==e?t=t$4.geom.GeometryLayout.XYZ:4==e&&(t=t$4.geom.GeometryLayout.XYZM),t},t$4.geom.SimpleGeometry.getStrideForLayout=function(e){var t;return e==t$4.geom.GeometryLayout.XY?t=2:e==t$4.geom.GeometryLayout.XYZ||e==t$4.geom.GeometryLayout.XYM?t=3:e==t$4.geom.GeometryLayout.XYZM&&(t=4),t},t$4.geom.SimpleGeometry.prototype.containsXY=t$4.functions.FALSE,t$4.geom.SimpleGeometry.prototype.computeExtent=function(e){return t$4.extent.createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t$4.geom.SimpleGeometry.prototype.getCoordinates=function(){},t$4.geom.SimpleGeometry.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},t$4.geom.SimpleGeometry.prototype.getFlatCoordinates=function(){return this.flatCoordinates},t$4.geom.SimpleGeometry.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},t$4.geom.SimpleGeometry.prototype.getLayout=function(){return this.layout},t$4.geom.SimpleGeometry.prototype.getSimplifiedGeometry=function(e){if(this.simplifiedGeometryRevision!=this.getRevision()&&(t$4.obj.clear(this.simplifiedGeometryCache),this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var t=e.toString();if(this.simplifiedGeometryCache.hasOwnProperty(t))return this.simplifiedGeometryCache[t];var i=this.getSimplifiedGeometryInternal(e);return i.getFlatCoordinates().length<this.flatCoordinates.length?(this.simplifiedGeometryCache[t]=i,i):(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)},t$4.geom.SimpleGeometry.prototype.getSimplifiedGeometryInternal=function(e){return this},t$4.geom.SimpleGeometry.prototype.getStride=function(){return this.stride},t$4.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal=function(e,t){this.stride=t$4.geom.SimpleGeometry.getStrideForLayout(e),this.layout=e,this.flatCoordinates=t},t$4.geom.SimpleGeometry.prototype.setCoordinates=function(e,t){},t$4.geom.SimpleGeometry.prototype.setLayout=function(e,t,i){var n;if(e)n=t$4.geom.SimpleGeometry.getStrideForLayout(e);else{var r;for(r=0;r<i;++r){if(0===t.length)return this.layout=t$4.geom.GeometryLayout.XY,void(this.stride=2);t=t[0]}n=t.length,e=t$4.geom.SimpleGeometry.getLayoutForStride_(n)}this.layout=e,this.stride=n},t$4.geom.SimpleGeometry.prototype.applyTransform=function(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},t$4.geom.SimpleGeometry.prototype.rotate=function(e,t){var i=this.getFlatCoordinates();if(i){var n=this.getStride();t$4.geom.flat.transform.rotate(i,0,i.length,n,e,t,i),this.changed()}},t$4.geom.SimpleGeometry.prototype.scale=function(e,t,i){var n=t;void 0===n&&(n=e);var r=i;r||(r=t$4.extent.getCenter(this.getExtent()));var o=this.getFlatCoordinates();if(o){var a=this.getStride();t$4.geom.flat.transform.scale(o,0,o.length,a,e,n,r,o),this.changed()}},t$4.geom.SimpleGeometry.prototype.translate=function(e,t){var i=this.getFlatCoordinates();if(i){var n=this.getStride();t$4.geom.flat.transform.translate(i,0,i.length,n,e,t,i),this.changed()}},t$4.geom.SimpleGeometry.transform2D=function(e,t,i){var n=e.getFlatCoordinates();if(n){var r=e.getStride();return t$4.geom.flat.transform.transform2D(n,0,n.length,r,t,i)}return null},t$4.geom.Polygon=function(e,t){t$4.geom.SimpleGeometry.call(this),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.Polygon,t$4.geom.SimpleGeometry),t$4.geom.Polygon.prototype.appendLinearRing=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},t$4.geom.Polygon.prototype.clone=function(){var e=new t$4.geom.Polygon(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice()),e},t$4.geom.Polygon.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,i,n))},t$4.geom.Polygon.prototype.containsXY=function(e,t){return t$4.geom.flat.contains.linearRingsContainsXY(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)},t$4.geom.Polygon.prototype.getArea=function(){return t$4.geom.flat.area.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},t$4.geom.Polygon.prototype.getCoordinates=function(e){var t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),t$4.geom.flat.orient.orientLinearRings(t,0,this.ends_,this.stride,e)):t=this.flatCoordinates,t$4.geom.flat.inflate.coordinatess(t,0,this.ends_,this.stride)},t$4.geom.Polygon.prototype.getEnds=function(){return this.ends_},t$4.geom.Polygon.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var e=t$4.extent.getCenter(this.getExtent());this.flatInteriorPoint_=t$4.geom.flat.interiorpoint.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},t$4.geom.Polygon.prototype.getInteriorPoint=function(){return new t$4.geom.Point(this.getFlatInteriorPoint(),t$4.geom.GeometryLayout.XYM)},t$4.geom.Polygon.prototype.getLinearRingCount=function(){return this.ends_.length},t$4.geom.Polygon.prototype.getLinearRing=function(e){if(e<0||this.ends_.length<=e)return null;var t=new t$4.geom.LinearRing(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e])),t},t$4.geom.Polygon.prototype.getLinearRings=function(){var e,t,i=this.layout,n=this.flatCoordinates,r=this.ends_,o=[],a=0;for(e=0,t=r.length;e<t;++e){var s=r[e],l=new t$4.geom.LinearRing(null);l.setFlatCoordinates(i,n.slice(a,s)),o.push(l),a=s}return o},t$4.geom.Polygon.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;t$4.geom.flat.orient.linearRingsAreOriented(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=t$4.geom.flat.orient.orientLinearRings(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t$4.geom.Polygon.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$4.geom.flat.simplify.quantizes(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,i);var n=new t$4.geom.Polygon(null);return n.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t,i),n},t$4.geom.Polygon.prototype.getType=function(){return t$4.geom.GeometryType.POLYGON},t$4.geom.Polygon.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)},t$4.geom.Polygon.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$4.geom.flat.deflate.coordinatess(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1]}else this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null,this.ends_)},t$4.geom.Polygon.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.ends_=i},t$4.geom.Polygon.circular=function(e,t,i,n){var r,o=n||32,a=[];for(r=0;r<o;++r)t$4.array.extend(a,e.offset(t,i,2*Math.PI*r/o));a.push(a[0],a[1]);var s=new t$4.geom.Polygon(null);return s.setFlatCoordinates(t$4.geom.GeometryLayout.XY,a,[a.length]),s},t$4.geom.Polygon.fromExtent=function(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=[t,i,t,r,n,r,n,i,t,i],a=new t$4.geom.Polygon(null);return a.setFlatCoordinates(t$4.geom.GeometryLayout.XY,o,[o.length]),a},t$4.geom.Polygon.fromCircle=function(e,t,i){for(var n=t||32,r=e.getStride(),o=e.getLayout(),a=new t$4.geom.Polygon(null,o),s=r*(n+1),l=new Array(s),u=0;u<s;u++)l[u]=0;var c=[l.length];return a.setFlatCoordinates(o,l,c),t$4.geom.Polygon.makeRegular(a,e.getCenter(),e.getRadius(),i),a},t$4.geom.Polygon.makeRegular=function(e,t,i,n){for(var r,o,a=e.getFlatCoordinates(),s=e.getLayout(),l=e.getStride(),u=e.getEnds(),c=a.length/l-1,h=n||0,d=0;d<=c;++d)o=d*l,r=h+2*t$4.math.modulo(d,c)*Math.PI/c,a[o]=t[0]+i*Math.cos(r),a[o+1]=t[1]+i*Math.sin(r);e.setFlatCoordinates(s,a,u)},t$4.geom.LineString=function(e,t){t$4.geom.SimpleGeometry.call(this),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.LineString,t$4.geom.SimpleGeometry),t$4.geom.LineString.prototype.appendCoordinate=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()},t$4.geom.LineString.prototype.clone=function(){var e=new t$4.geom.LineString(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$4.geom.LineString.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getMaxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,i,n))},t$4.geom.LineString.prototype.forEachSegment=function(e,t){return t$4.geom.flat.segments.forEach(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t)},t$4.geom.LineString.prototype.getCoordinateAtM=function(e,t){if(this.layout!=t$4.geom.GeometryLayout.XYM&&this.layout!=t$4.geom.GeometryLayout.XYZM)return null;var i=void 0!==t&&t;return t$4.geom.flat.interpolate.lineStringCoordinateAtM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,i)},t$4.geom.LineString.prototype.getCoordinates=function(){return t$4.geom.flat.inflate.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$4.geom.LineString.prototype.getCoordinateAt=function(e,t){return t$4.geom.flat.interpolate.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t)},t$4.geom.LineString.prototype.getLength=function(){return t$4.geom.flat.length.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$4.geom.LineString.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},t$4.geom.LineString.prototype.getSimplifiedGeometryInternal=function(e){var t=[];t.length=t$4.geom.flat.simplify.douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0);var i=new t$4.geom.LineString(null);return i.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t),i},t$4.geom.LineString.prototype.getType=function(){return t$4.geom.GeometryType.LINE_STRING},t$4.geom.LineString.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t$4.geom.LineString.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$4.geom.flat.deflate.coordinates(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null)},t$4.geom.LineString.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$4.geom.Point=function(e,t){t$4.geom.SimpleGeometry.call(this),this.setCoordinates(e,t)},t$4.inherits(t$4.geom.Point,t$4.geom.SimpleGeometry),t$4.geom.Point.prototype.clone=function(){var e=new t$4.geom.Point(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$4.geom.Point.prototype.closestPointXY=function(e,t,i,n){var r=this.flatCoordinates,o=t$4.math.squaredDistance(e,t,r[0],r[1]);if(o<n){var a,s=this.stride;for(a=0;a<s;++a)i[a]=r[a];return i.length=s,o}return n},t$4.geom.Point.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},t$4.geom.Point.prototype.computeExtent=function(e){return t$4.extent.createOrUpdateFromCoordinate(this.flatCoordinates,e)},t$4.geom.Point.prototype.getType=function(){return t$4.geom.GeometryType.POINT},t$4.geom.Point.prototype.intersectsExtent=function(e){return t$4.extent.containsXY(e,this.flatCoordinates[0],this.flatCoordinates[1])},t$4.geom.Point.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$4.geom.flat.deflate.coordinate(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null)},t$4.geom.Point.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$4.geom.MultiLineString=function(e,t){t$4.geom.SimpleGeometry.call(this),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.MultiLineString,t$4.geom.SimpleGeometry),t$4.geom.MultiLineString.prototype.appendLineString=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates().slice()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},t$4.geom.MultiLineString.prototype.clone=function(){var e=new t$4.geom.MultiLineString(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice()),e},t$4.geom.MultiLineString.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,i,n))},t$4.geom.MultiLineString.prototype.getCoordinateAtM=function(e,t,i){if(this.layout!=t$4.geom.GeometryLayout.XYM&&this.layout!=t$4.geom.GeometryLayout.XYZM||0===this.flatCoordinates.length)return null;var n=void 0!==t&&t,r=void 0!==i&&i;return t$4.geom.flat.interpolate.lineStringsCoordinateAtM(this.flatCoordinates,0,this.ends_,this.stride,e,n,r)},t$4.geom.MultiLineString.prototype.getCoordinates=function(){return t$4.geom.flat.inflate.coordinatess(this.flatCoordinates,0,this.ends_,this.stride)},t$4.geom.MultiLineString.prototype.getEnds=function(){return this.ends_},t$4.geom.MultiLineString.prototype.getLineString=function(e){if(e<0||this.ends_.length<=e)return null;var t=new t$4.geom.LineString(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e])),t},t$4.geom.MultiLineString.prototype.getLineStrings=function(){var e,t,i=this.flatCoordinates,n=this.ends_,r=this.layout,o=[],a=0;for(e=0,t=n.length;e<t;++e){var s=n[e],l=new t$4.geom.LineString(null);l.setFlatCoordinates(r,i.slice(a,s)),o.push(l),a=s}return o},t$4.geom.MultiLineString.prototype.getFlatMidpoints=function(){var e,t,i=[],n=this.flatCoordinates,r=0,o=this.ends_,a=this.stride;for(e=0,t=o.length;e<t;++e){var s=o[e],l=t$4.geom.flat.interpolate.lineString(n,r,s,a,.5);t$4.array.extend(i,l),r=s}return i},t$4.geom.MultiLineString.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$4.geom.flat.simplify.douglasPeuckers(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,i);var n=new t$4.geom.MultiLineString(null);return n.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t,i),n},t$4.geom.MultiLineString.prototype.getType=function(){return t$4.geom.GeometryType.MULTI_LINE_STRING},t$4.geom.MultiLineString.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.lineStrings(this.flatCoordinates,0,this.ends_,this.stride,e)},t$4.geom.MultiLineString.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$4.geom.flat.deflate.coordinatess(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}else this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null,this.ends_)},t$4.geom.MultiLineString.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.ends_=i,this.changed()},t$4.geom.MultiLineString.prototype.setLineStrings=function(e){var t,i,n=this.getLayout(),r=[],o=[];for(t=0,i=e.length;t<i;++t){var a=e[t];0===t&&(n=a.getLayout()),t$4.array.extend(r,a.getFlatCoordinates()),o.push(r.length)}this.setFlatCoordinates(n,r,o)},t$4.geom.MultiPoint=function(e,t){t$4.geom.SimpleGeometry.call(this),this.setCoordinates(e,t)},t$4.inherits(t$4.geom.MultiPoint,t$4.geom.SimpleGeometry),t$4.geom.MultiPoint.prototype.appendPoint=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()},t$4.geom.MultiPoint.prototype.clone=function(){var e=new t$4.geom.MultiPoint(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$4.geom.MultiPoint.prototype.closestPointXY=function(e,t,i,n){if(n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t))return n;var r,o,a,s=this.flatCoordinates,l=this.stride;for(r=0,o=s.length;r<o;r+=l){var u=t$4.math.squaredDistance(e,t,s[r],s[r+1]);if(u<n){for(n=u,a=0;a<l;++a)i[a]=s[r+a];i.length=l}}return n},t$4.geom.MultiPoint.prototype.getCoordinates=function(){return t$4.geom.flat.inflate.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$4.geom.MultiPoint.prototype.getPoint=function(e){var t=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;if(e<0||t<=e)return null;var i=new t$4.geom.Point(null);return i.setFlatCoordinates(this.layout,this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride)),i},t$4.geom.MultiPoint.prototype.getPoints=function(){var e,t,i=this.flatCoordinates,n=this.layout,r=this.stride,o=[];for(e=0,t=i.length;e<t;e+=r){var a=new t$4.geom.Point(null);a.setFlatCoordinates(n,i.slice(e,e+r)),o.push(a)}return o},t$4.geom.MultiPoint.prototype.getType=function(){return t$4.geom.GeometryType.MULTI_POINT},t$4.geom.MultiPoint.prototype.intersectsExtent=function(e){var t,i,n,r,o=this.flatCoordinates,a=this.stride;for(t=0,i=o.length;t<i;t+=a)if(n=o[t],r=o[t+1],t$4.extent.containsXY(e,n,r))return!0;return!1},t$4.geom.MultiPoint.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$4.geom.flat.deflate.coordinates(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null)},t$4.geom.MultiPoint.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$4.geom.flat.center.linearRingss={},t$4.geom.flat.center.linearRingss=function(e,t,i,n){var r,o,a=[],s=t$4.extent.createEmpty();for(r=0,o=i.length;r<o;++r){var l=i[r];s=t$4.extent.createOrUpdateFromFlatCoordinates(e,t,l[0],n),a.push((s[0]+s[2])/2,(s[1]+s[3])/2),t=l[l.length-1]}return a},t$4.geom.MultiPolygon=function(e,t){t$4.geom.SimpleGeometry.call(this),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.MultiPolygon,t$4.geom.SimpleGeometry),t$4.geom.MultiPolygon.prototype.appendPolygon=function(e){var t;if(this.flatCoordinates){var i,n,r=this.flatCoordinates.length;for(t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates()),i=0,n=(t=e.getEnds().slice()).length;i<n;++i)t[i]+=r}else this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();this.endss_.push(t),this.changed()},t$4.geom.MultiPolygon.prototype.clone=function(){for(var e=new t$4.geom.MultiPolygon(null),t=this.endss_.length,i=new Array(t),n=0;n<t;++n)i[n]=this.endss_[n].slice();return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),i),e},t$4.geom.MultiPolygon.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getssMaxSquaredDelta(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getssClosestPoint(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,t,i,n))},t$4.geom.MultiPolygon.prototype.containsXY=function(e,t){return t$4.geom.flat.contains.linearRingssContainsXY(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)},t$4.geom.MultiPolygon.prototype.getArea=function(){return t$4.geom.flat.area.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},t$4.geom.MultiPolygon.prototype.getCoordinates=function(e){var t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),t$4.geom.flat.orient.orientLinearRingss(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,t$4.geom.flat.inflate.coordinatesss(t,0,this.endss_,this.stride)},t$4.geom.MultiPolygon.prototype.getEndss=function(){return this.endss_},t$4.geom.MultiPolygon.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var e=t$4.geom.flat.center.linearRingss(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=t$4.geom.flat.interiorpoint.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},t$4.geom.MultiPolygon.prototype.getInteriorPoints=function(){var e=new t$4.geom.MultiPoint(null);return e.setFlatCoordinates(t$4.geom.GeometryLayout.XYM,this.getFlatInteriorPoints().slice()),e},t$4.geom.MultiPolygon.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;t$4.geom.flat.orient.linearRingssAreOriented(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=t$4.geom.flat.orient.orientLinearRingss(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t$4.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$4.geom.flat.simplify.quantizess(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,i);var n=new t$4.geom.MultiPolygon(null);return n.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t,i),n},t$4.geom.MultiPolygon.prototype.getPolygon=function(e){if(e<0||this.endss_.length<=e)return null;var t;if(0===e)t=0;else{var i=this.endss_[e-1];t=i[i.length-1]}var n,r,o=this.endss_[e].slice(),a=o[o.length-1];if(0!==t)for(n=0,r=o.length;n<r;++n)o[n]-=t;var s=new t$4.geom.Polygon(null);return s.setFlatCoordinates(this.layout,this.flatCoordinates.slice(t,a),o),s},t$4.geom.MultiPolygon.prototype.getPolygons=function(){var e,t,i,n,r=this.layout,o=this.flatCoordinates,a=this.endss_,s=[],l=0;for(e=0,t=a.length;e<t;++e){var u=a[e].slice(),c=u[u.length-1];if(0!==l)for(i=0,n=u.length;i<n;++i)u[i]-=l;var h=new t$4.geom.Polygon(null);h.setFlatCoordinates(r,o.slice(l,c),u),s.push(h),l=c}return s},t$4.geom.MultiPolygon.prototype.getType=function(){return t$4.geom.GeometryType.MULTI_POLYGON},t$4.geom.MultiPolygon.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)},t$4.geom.MultiPolygon.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$4.geom.flat.deflate.coordinatesss(this.flatCoordinates,0,e,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{var n=i[i.length-1];this.flatCoordinates.length=0===n.length?0:n[n.length-1]}this.changed()}else this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null,this.endss_)},t$4.geom.MultiPolygon.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.endss_=i,this.changed()},t$4.geom.MultiPolygon.prototype.setPolygons=function(e){var t,i,n,r=this.getLayout(),o=[],a=[];for(t=0,i=e.length;t<i;++t){var s=e[t];0===t&&(r=s.getLayout());var l,u,c=o.length;for(l=0,u=(n=s.getEnds()).length;l<u;++l)n[l]+=c;t$4.array.extend(o,s.getFlatCoordinates()),a.push(n)}this.setFlatCoordinates(r,o,a)},t$4.Feature=function(e){if(t$4.Object.call(this),this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,void 0!==e)if(e instanceof t$4.geom.Geometry||!e){var t=e;this.setGeometry(t)}else{var i=e;this.setProperties(i)}},t$4.inherits(t$4.Feature,t$4.Object),t$4.Feature.prototype.clone=function(){var e=new t$4.Feature(this.getProperties());e.setGeometryName(this.getGeometryName());var t=this.getGeometry();t&&e.setGeometry(t.clone());var i=this.getStyle();return i&&e.setStyle(i),e},t$4.Feature.prototype.getGeometry=function(){return this.get(this.geometryName_)},t$4.Feature.prototype.getId=function(){return this.id_},t$4.Feature.prototype.getGeometryName=function(){return this.geometryName_},t$4.Feature.prototype.getStyle=function(){return this.style_},t$4.Feature.prototype.getStyleFunction=function(){return this.styleFunction_},t$4.Feature.prototype.handleGeometryChange_=function(){this.changed()},t$4.Feature.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(t$4.events.unlistenByKey(this.geometryChangeKey_),this.geometryChangeKey_=null);var e=this.getGeometry();e&&(this.geometryChangeKey_=t$4.events.listen(e,t$4.events.EventType.CHANGE,this.handleGeometryChange_,this)),this.changed()},t$4.Feature.prototype.setGeometry=function(e){this.set(this.geometryName_,e)},t$4.Feature.prototype.setStyle=function(e){this.style_=e,this.styleFunction_=e?t$4.Feature.createStyleFunction(e):void 0,this.changed()},t$4.Feature.prototype.setId=function(e){this.id_=e,this.changed()},t$4.Feature.prototype.setGeometryName=function(e){t$4.events.unlisten(this,t$4.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this),this.geometryName_=e,t$4.events.listen(this,t$4.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this),this.handleGeometryChanged_()},t$4.Feature.createStyleFunction=function(e){var t,i;"function"==typeof e?t=2==e.length?function(t){return e(this,t)}:e:(Array.isArray(e)?i=e:(t$4.asserts.assert(e instanceof t$4.style.Style,41),i=[e]),t=function(){return i});return t},t$4.format={},t$4.format.Feature=function(){this.defaultDataProjection=null,this.defaultFeatureProjection=null},t$4.format.Feature.prototype.getReadOptions=function(e,t){var i;return t&&(i={dataProjection:t.dataProjection?t.dataProjection:this.readProjection(e),featureProjection:t.featureProjection}),this.adaptOptions(i)},t$4.format.Feature.prototype.adaptOptions=function(e){return t$4.obj.assign({dataProjection:this.defaultDataProjection,featureProjection:this.defaultFeatureProjection},e)},t$4.format.Feature.prototype.getLastExtent=function(){return null},t$4.format.Feature.prototype.getType=function(){},t$4.format.Feature.prototype.readFeature=function(e,t){},t$4.format.Feature.prototype.readFeatures=function(e,t){},t$4.format.Feature.prototype.readGeometry=function(e,t){},t$4.format.Feature.prototype.readProjection=function(e){},t$4.format.Feature.prototype.writeFeature=function(e,t){},t$4.format.Feature.prototype.writeFeatures=function(e,t){},t$4.format.Feature.prototype.writeGeometry=function(e,t){},t$4.format.Feature.transformWithOptions=function(e,t,i){var n;if(n=e,t&&i&&void 0!==i.decimals){var r=Math.pow(10,i.decimals);n===e&&(n=n.clone()),n.applyTransform((function(e){for(var t=0,i=e.length;t<i;++t)e[t]=Math.round(e[t]*r)/r;return e}))}return n},t$4.format.MVT=function(e){t$4.format.Feature.call(this);var t=e||{};this.featureClass_=t.featureClass?t.featureClass:t$4.render.Feature,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.extent_=null},t$4.inherits(t$4.format.MVT,t$4.format.Feature),t$4.format.MVT.pbfReaders_={layers:function(e,t,i){if(3===e){var n={keys:[],values:[],features:[]},r=i.readVarint()+i.pos;i.readFields(t$4.format.MVT.pbfReaders_.layer,n,r),n.length=n.features.length,n.length&&(t[n.name]=n)}},layer:function(e,t,i){if(15===e)t.version=i.readVarint();else if(1===e)t.name=i.readString();else if(5===e)t.extent=i.readVarint();else if(2===e)t.features.push(i.pos);else if(3===e)t.keys.push(i.readString());else if(4===e){for(var n=null,r=i.readVarint()+i.pos;i.pos<r;)n=1===(e=i.readVarint()>>3)?i.readString():2===e?i.readFloat():3===e?i.readDouble():4===e?i.readVarint64():5===e?i.readVarint():6===e?i.readSVarint():7===e?i.readBoolean():null;t.values.push(n)}},feature:function(e,t,i){if(1==e)t.id=i.readVarint();else if(2==e)for(var n=i.readVarint()+i.pos;i.pos<n;){var r=t.layer.keys[i.readVarint()],o=t.layer.values[i.readVarint()];t.properties[r]=o}else 3==e?t.type=i.readVarint():4==e&&(t.geometry=i.pos)}},t$4.format.MVT.readRawFeature_=function(e,t,i){e.pos=t.features[i];var n=e.readVarint()+e.pos,r={layer:t,type:0,properties:{}};return e.readFields(t$4.format.MVT.pbfReaders_.feature,r,n),r},t$4.format.MVT.readRawGeometry_=function(e,t,i,n){e.pos=t.geometry;for(var r=e.readVarint()+e.pos,o=1,a=0,s=0,l=0,u=0,c=0;e.pos<r;){if(!a){var h=e.readVarint();o=7&h,a=h>>3}a--,1===o||2===o?(s+=e.readSVarint(),l+=e.readSVarint(),1===o&&u>c&&(n.push(u),c=u),i.push(s,l),u+=2):7===o?u>c&&(i.push(i[c],i[c+1]),u+=2):t$4.asserts.assert(!1,59)}u>c&&(n.push(u),c=u)},t$4.format.MVT.getGeometryType_=function(e,t){var i;return 1===e?i=1===t?t$4.geom.GeometryType.POINT:t$4.geom.GeometryType.MULTI_POINT:2===e?i=1===t?t$4.geom.GeometryType.LINE_STRING:t$4.geom.GeometryType.MULTI_LINE_STRING:3===e&&(i=t$4.geom.GeometryType.POLYGON),i},t$4.format.MVT.prototype.createFeature_=function(e,t,i){var n=t.type;if(0===n)return null;var r,o=t.id,a=t.properties;a[this.layerName_]=t.layer.name;var s=[],l=[];t$4.format.MVT.readRawGeometry_(e,t,s,l);var u,c=t$4.format.MVT.getGeometryType_(n,l.length);if(c==t$4.geom.GeometryType.POLYGON){for(var h=[],d=0,f=0,p=0,_=l.length;p<_;++p){var m=l[p];t$4.geom.flat.orient.linearRingIsClockwise(s,d,m,2)||(h.push(l.slice(f,p+1)),f=p+1),d=m}h.length>1?(l=h,u=new t$4.geom.MultiPolygon(null)):u=new t$4.geom.Polygon(null)}else u=c===t$4.geom.GeometryType.POINT?new t$4.geom.Point(null):c===t$4.geom.GeometryType.LINE_STRING?new t$4.geom.LineString(null):c===t$4.geom.GeometryType.POLYGON?new t$4.geom.Polygon(null):c===t$4.geom.GeometryType.MULTI_POINT?new t$4.geom.MultiPoint(null):c===t$4.geom.GeometryType.MULTI_LINE_STRING?new t$4.geom.MultiLineString(null):null;u.setFlatCoordinates(t$4.geom.GeometryLayout.XY,s,l),r=new this.featureClass_,this.geometryName_&&r.setGeometryName(this.geometryName_);var g=t$4.format.Feature.transformWithOptions(u,!1,this.adaptOptions(i));return r.setGeometry(g),r.setId(o),r.setProperties(a),r},t$4.format.MVT.prototype.readFeatures=function(e,t){var i,n=this.layers_,r=new h$U(e),o=r.readFields(t$4.format.MVT.pbfReaders_.layers,{}),a=[];for(var s in o)if(!n||-1!=n.indexOf(s)){if(void 0!==t){var l=t.needSourceLayerNames;if(void 0!==l&&void 0===l[s])continue}for(var u,c=0,h=(i=o[s]).length;c<h;++c)u=t$4.format.MVT.readRawFeature_(r,i,c),a.push(this.createFeature_(r,u));this.extent_=i?[0,0,i.extent,i.extent]:null}return a},t$4.style={},t$4.style.IconImageCache=function(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32},t$4.style.IconImageCache.getKey=function(e,t,i){return t+":"+e+":"+(i?t$4.color.asString(i):"null")},t$4.style.IconImageCache.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t$4.style.IconImageCache.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){var e,t,i=0;for(e in this.cache_)t=this.cache_[e],0==(3&i++)&&!t.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}},t$4.style.IconImageCache.prototype.get=function(e,t,i){var n=t$4.style.IconImageCache.getKey(e,t,i);return n in this.cache_?this.cache_[n]:null},t$4.style.IconImageCache.prototype.set=function(e,t,i,n){var r=t$4.style.IconImageCache.getKey(e,t,i);this.cache_[r]=n,++this.cacheSize_},t$4.style.IconImageCache.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},t$4.style.iconImageCache=new t$4.style.IconImageCache,t$4.style.Image=function(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.snapToPixel_=e.snapToPixel},t$4.style.Image.prototype.getOpacity=function(){return this.opacity_},t$4.style.Image.prototype.getRotateWithView=function(){return this.rotateWithView_},t$4.style.Image.prototype.getRotation=function(){return this.rotation_},t$4.style.Image.prototype.getScale=function(){return this.scale_},t$4.style.Image.prototype.getSnapToPixel=function(){return this.snapToPixel_},t$4.style.Image.prototype.getAnchor=function(){},t$4.style.Image.prototype.getImage=function(e){},t$4.style.Image.prototype.getHitDetectionImage=function(e){},t$4.style.Image.prototype.getImageState=function(){},t$4.style.Image.prototype.getImageSize=function(){},t$4.style.Image.prototype.getHitDetectionImageSize=function(){},t$4.style.Image.prototype.getOrigin=function(){},t$4.style.Image.prototype.getSize=function(){},t$4.style.Image.prototype.setOpacity=function(e){this.opacity_=e},t$4.style.Image.prototype.setRotateWithView=function(e){this.rotateWithView_=e},t$4.style.Image.prototype.setRotation=function(e){this.rotation_=e},t$4.style.Image.prototype.setScale=function(e){this.scale_=e},t$4.style.Image.prototype.setSnapToPixel=function(e){this.snapToPixel_=e},t$4.style.Image.prototype.listenImageChange=function(e,t){},t$4.style.Image.prototype.load=function(){},t$4.style.Image.prototype.unlistenImageChange=function(e,t){},t$4.style.RegularShape=function(e){this.checksums_=null,this.canvas_=null,this.hitDetectionCanvas_=null,this.fill_=void 0!==e.fill?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=void 0!==e.radius?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=void 0!==e.angle?e.angle:0,this.stroke_=void 0!==e.stroke?e.stroke:null,this.anchor_=null,this.size_=null,this.imageSize_=null,this.hitDetectionImageSize_=null,this.atlasManager_=e.atlasManager,this.render_(this.atlasManager_);var t=void 0===e.snapToPixel||e.snapToPixel,i=void 0!==e.rotateWithView&&e.rotateWithView;t$4.style.Image.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:1,snapToPixel:t})},t$4.inherits(t$4.style.RegularShape,t$4.style.Image),t$4.style.RegularShape.prototype.clone=function(){var e=new t$4.style.RegularShape({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),snapToPixel:this.getSnapToPixel(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),atlasManager:this.atlasManager_});return e.setOpacity(this.getOpacity()),e.setScale(this.getScale()),e},t$4.style.RegularShape.prototype.getAnchor=function(){return this.anchor_},t$4.style.RegularShape.prototype.getAngle=function(){return this.angle_},t$4.style.RegularShape.prototype.getFill=function(){return this.fill_},t$4.style.RegularShape.prototype.getHitDetectionImage=function(e){return this.hitDetectionCanvas_},t$4.style.RegularShape.prototype.getImage=function(e){return this.canvas_},t$4.style.RegularShape.prototype.getImageSize=function(){return this.imageSize_},t$4.style.RegularShape.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},t$4.style.RegularShape.prototype.getImageState=function(){return t$4.ImageState.LOADED},t$4.style.RegularShape.prototype.getOrigin=function(){return this.origin_},t$4.style.RegularShape.prototype.getPoints=function(){return this.points_},t$4.style.RegularShape.prototype.getRadius=function(){return this.radius_},t$4.style.RegularShape.prototype.getRadius2=function(){return this.radius2_},t$4.style.RegularShape.prototype.getSize=function(){return this.size_},t$4.style.RegularShape.prototype.getStroke=function(){return this.stroke_},t$4.style.RegularShape.prototype.listenImageChange=function(e,t){},t$4.style.RegularShape.prototype.load=function(){},t$4.style.RegularShape.prototype.unlistenImageChange=function(e,t){},t$4.style.RegularShape.prototype.render_=function(e){var t,i,n="",r="",o=0,a=null,s=0,l=0;this.stroke_&&(null===(i=this.stroke_.getColor())&&(i=t$4.render.canvas.defaultStrokeStyle),i=t$4.colorlike.asColorLike(i),void 0===(l=this.stroke_.getWidth())&&(l=t$4.render.canvas.defaultLineWidth),a=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset(),t$4.has.CANVAS_LINE_DASH||(a=null,s=0),void 0===(r=this.stroke_.getLineJoin())&&(r=t$4.render.canvas.defaultLineJoin),void 0===(n=this.stroke_.getLineCap())&&(n=t$4.render.canvas.defaultLineCap),void 0===(o=this.stroke_.getMiterLimit())&&(o=t$4.render.canvas.defaultMiterLimit));var u=2*(this.radius_+l)+1,c={strokeStyle:i,strokeWidth:l,size:u,lineCap:n,lineDash:a,lineDashOffset:s,lineJoin:r,miterLimit:o};if(void 0===e){var h=t$4.dom.createCanvasContext2D(u,u);this.canvas_=h.canvas,t=u=this.canvas_.width,this.draw_(c,h,0,0),this.createHitDetectionCanvas_(c)}else{u=Math.round(u);var d,f=!this.fill_;f&&(d=this.drawHitDetectionCanvas_.bind(this,c));var p=this.getChecksum(),_=e.add(p,u,u,this.draw_.bind(this,c),d);this.canvas_=_.image,this.origin_=[_.offsetX,_.offsetY],t=_.image.width,f?(this.hitDetectionCanvas_=_.hitImage,this.hitDetectionImageSize_=[_.hitImage.width,_.hitImage.height]):(this.hitDetectionCanvas_=this.canvas_,this.hitDetectionImageSize_=[t,t])}this.anchor_=[u/2,u/2],this.size_=[u,u],this.imageSize_=[t,t]},t$4.style.RegularShape.prototype.draw_=function(e,t,i,n){var r,o,a;t.setTransform(1,0,0,1,0,0),t.translate(i,n),t.beginPath();var s=this.points_;if(s===1/0)t.arc(e.size/2,e.size/2,this.radius_,0,2*Math.PI,!0);else{var l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(s*=2),r=0;r<=s;r++)o=2*r*Math.PI/s-Math.PI/2+this.angle_,a=r%2==0?this.radius_:l,t.lineTo(e.size/2+a*Math.cos(o),e.size/2+a*Math.sin(o))}if(this.fill_){var u=this.fill_.getColor();null===u&&(u=t$4.render.canvas.defaultFillStyle),t.fillStyle=t$4.colorlike.asColorLike(u),t.fill()}this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke()),t.closePath()},t$4.style.RegularShape.prototype.createHitDetectionCanvas_=function(e){if(this.hitDetectionImageSize_=[e.size,e.size],this.fill_)this.hitDetectionCanvas_=this.canvas_;else{var t=t$4.dom.createCanvasContext2D(e.size,e.size);this.hitDetectionCanvas_=t.canvas,this.drawHitDetectionCanvas_(e,t,0,0)}},t$4.style.RegularShape.prototype.drawHitDetectionCanvas_=function(e,t,i,n){t.setTransform(1,0,0,1,0,0),t.translate(i,n),t.beginPath();var r=this.points_;if(r===1/0)t.arc(e.size/2,e.size/2,this.radius_,0,2*Math.PI,!0);else{var o,a,s,l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(r*=2),o=0;o<=r;o++)s=2*o*Math.PI/r-Math.PI/2+this.angle_,a=o%2==0?this.radius_:l,t.lineTo(e.size/2+a*Math.cos(s),e.size/2+a*Math.sin(s))}t.fillStyle=t$4.render.canvas.defaultFillStyle,t.fill(),this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.stroke()),t.closePath()},t$4.style.RegularShape.prototype.getChecksum=function(){var e=this.stroke_?this.stroke_.getChecksum():"-",t=this.fill_?this.fill_.getChecksum():"-";if(!this.checksums_||e!=this.checksums_[1]||t!=this.checksums_[2]||this.radius_!=this.checksums_[3]||this.radius2_!=this.checksums_[4]||this.angle_!=this.checksums_[5]||this.points_!=this.checksums_[6]){var i="r"+e+t+(void 0!==this.radius_?this.radius_.toString():"-")+(void 0!==this.radius2_?this.radius2_.toString():"-")+(void 0!==this.angle_?this.angle_.toString():"-")+(void 0!==this.points_?this.points_.toString():"-");this.checksums_=[i,e,t,this.radius_,this.radius2_,this.angle_,this.points_]}return this.checksums_[0]},t$4.style.Circle=function(e){var t=e||{};t$4.style.RegularShape.call(this,{points:1/0,fill:t.fill,radius:t.radius,snapToPixel:t.snapToPixel,stroke:t.stroke,atlasManager:t.atlasManager})},t$4.inherits(t$4.style.Circle,t$4.style.RegularShape),t$4.style.Circle.prototype.clone=function(){var e=new t$4.style.Circle({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),snapToPixel:this.getSnapToPixel(),atlasManager:this.atlasManager_});return e.setOpacity(this.getOpacity()),e.setScale(this.getScale()),e},t$4.style.Circle.prototype.setRadius=function(e){this.radius_=e,this.render_(this.atlasManager_)},t$4.style.Fill=function(e){var t=e||{};this.color_=void 0!==t.color?t.color:null,this.checksum_=void 0},t$4.style.Fill.prototype.clone=function(){var e=this.getColor();return new t$4.style.Fill({color:e&&e.slice?e.slice():e||void 0})},t$4.style.Fill.prototype.getColor=function(){return this.color_},t$4.style.Fill.prototype.setColor=function(e){this.color_=e,this.checksum_=void 0},t$4.style.Fill.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.color_ instanceof CanvasPattern||this.color_ instanceof CanvasGradient?this.checksum_=t$4.getUid(this.color_).toString():this.checksum_="f"+(this.color_?t$4.color.asString(this.color_):"-")),this.checksum_},t$4.style.Stroke=function(e){var t=e||{};this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width,this.checksum_=void 0},t$4.style.Stroke.prototype.clone=function(){var e=this.getColor();return new t$4.style.Stroke({color:e&&e.slice?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t$4.style.Stroke.prototype.getColor=function(){return this.color_},t$4.style.Stroke.prototype.getLineCap=function(){return this.lineCap_},t$4.style.Stroke.prototype.getLineDash=function(){return this.lineDash_},t$4.style.Stroke.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t$4.style.Stroke.prototype.getLineJoin=function(){return this.lineJoin_},t$4.style.Stroke.prototype.getMiterLimit=function(){return this.miterLimit_},t$4.style.Stroke.prototype.getWidth=function(){return this.width_},t$4.style.Stroke.prototype.setColor=function(e){this.color_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineCap=function(e){this.lineCap_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineDash=function(e){this.lineDash_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineDashOffset=function(e){this.lineDashOffset_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineJoin=function(e){this.lineJoin_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setMiterLimit=function(e){this.miterLimit_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setWidth=function(e){this.width_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.checksum_="s",this.color_?"string"==typeof this.color_?this.checksum_+=this.color_:this.checksum_+=t$4.getUid(this.color_).toString():this.checksum_+="-",this.checksum_+=","+(void 0!==this.lineCap_?this.lineCap_.toString():"-")+","+(this.lineDash_?this.lineDash_.toString():"-")+","+(void 0!==this.lineDashOffset_?this.lineDashOffset_:"-")+","+(void 0!==this.lineJoin_?this.lineJoin_:"-")+","+(void 0!==this.miterLimit_?this.miterLimit_.toString():"-")+","+(void 0!==this.width_?this.width_.toString():"-")),this.checksum_},t$4.style.IconAnchorUnits={FRACTION:"fraction",PIXELS:"pixels"},t$4.style.IconImage=function(e,t,i,n,r,o){t$4.events.EventTarget.call(this),this.hitDetectionImage_=null,this.image_=e||new Image,null!==n&&(this.image_.crossOrigin=n),this.canvas_=o?document.createElement("CANVAS"):null,this.color_=o,this.imageListenerKeys_=null,this.imageState_=r,this.size_=i,this.src_=t,this.tainting_=!1,this.imageState_==t$4.ImageState.LOADED&&this.determineTainting_()},t$4.inherits(t$4.style.IconImage,t$4.events.EventTarget),t$4.style.IconImage.get=function(e,t,i,n,r,o){var a=t$4.style.iconImageCache,s=a.get(t,n,o);return s||(s=new t$4.style.IconImage(e,t,i,n,r,o),a.set(t,n,o,s)),s},t$4.style.IconImage.prototype.determineTainting_=function(){var e=t$4.dom.createCanvasContext2D(1,1);try{e.drawImage(this.image_,0,0),e.getImageData(0,0,1,1)}catch{this.tainting_=!0}},t$4.style.IconImage.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(t$4.events.EventType.CHANGE)},t$4.style.IconImage.prototype.handleImageError_=function(){this.imageState_=t$4.ImageState.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},t$4.style.IconImage.prototype.handleImageLoad_=function(){this.imageState_=t$4.ImageState.LOADED,this.size_&&(this.image_.width=this.size_[0],this.image_.height=this.size_[1]),this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.determineTainting_(),this.replaceColor_(),this.dispatchChangeEvent_()},t$4.style.IconImage.prototype.getImage=function(e){return this.canvas_?this.canvas_:this.image_},t$4.style.IconImage.prototype.getImageState=function(){return this.imageState_},t$4.style.IconImage.prototype.getHitDetectionImage=function(e){if(!this.hitDetectionImage_)if(this.tainting_){var t=this.size_[0],i=this.size_[1],n=t$4.dom.createCanvasContext2D(t,i);n.fillRect(0,0,t,i),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},t$4.style.IconImage.prototype.getSize=function(){return this.size_},t$4.style.IconImage.prototype.getSrc=function(){return this.src_},t$4.style.IconImage.prototype.load=function(){if(this.imageState_==t$4.ImageState.IDLE){this.imageState_=t$4.ImageState.LOADING,this.imageListenerKeys_=[t$4.events.listenOnce(this.image_,t$4.events.EventType.ERROR,this.handleImageError_,this),t$4.events.listenOnce(this.image_,t$4.events.EventType.LOAD,this.handleImageLoad_,this)];try{this.image_.src=this.src_}catch{this.handleImageError_()}}},t$4.style.IconImage.prototype.replaceColor_=function(){if(!this.tainting_&&null!==this.color_){this.canvas_.width=this.image_.width,this.canvas_.height=this.image_.height;var e=this.canvas_.getContext("2d");e.drawImage(this.image_,0,0);for(var t=e.getImageData(0,0,this.image_.width,this.image_.height),i=t.data,n=this.color_[0]/255,r=this.color_[1]/255,o=this.color_[2]/255,a=0,s=i.length;a<s;a+=4)i[a]*=n,i[a+1]*=r,i[a+2]*=o;e.putImageData(t,0,0)}},t$4.style.IconImage.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(t$4.events.unlistenByKey),this.imageListenerKeys_=null},t$4.style.IconOrigin={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},t$4.style.Icon=function(e){var t=e||{};this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:t$4.style.IconOrigin.TOP_LEFT,this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:t$4.style.IconAnchorUnits.FRACTION,this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:t$4.style.IconAnchorUnits.FRACTION,this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;var i=void 0!==t.img?t.img:null,n=void 0!==t.imgSize?t.imgSize:null,r=t.src;(void 0===r||0===r.length)&&i&&(r=i.src||t$4.getUid(i).toString());var o=void 0!==t.src?t$4.ImageState.IDLE:t$4.ImageState.LOADED;this.color_=void 0!==t.color?t$4.color.asArray(t.color):null,this.iconImage_=t$4.style.IconImage.get(i,r,n,this.crossOrigin_,o,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:t$4.style.IconOrigin.TOP_LEFT,this.origin_=null,this.size_=void 0!==t.size?t.size:null;var a=void 0!==t.opacity?t.opacity:1,s=void 0!==t.rotateWithView&&t.rotateWithView,l=void 0!==t.rotation?t.rotation:0,u=void 0!==t.scale?t.scale:1,c=void 0===t.snapToPixel||t.snapToPixel;t$4.style.Image.call(this,{opacity:a,rotation:l,scale:u,snapToPixel:c,rotateWithView:s})},t$4.inherits(t$4.style.Icon,t$4.style.Image),t$4.style.Icon.prototype.clone=function(){return new t$4.style.Icon({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:this.getScale(),snapToPixel:this.getSnapToPixel(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},t$4.style.Icon.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var e=this.anchor_,t=this.getSize();if(this.anchorXUnits_==t$4.style.IconAnchorUnits.FRACTION||this.anchorYUnits_==t$4.style.IconAnchorUnits.FRACTION){if(!t)return null;e=this.anchor_.slice(),this.anchorXUnits_==t$4.style.IconAnchorUnits.FRACTION&&(e[0]*=t[0]),this.anchorYUnits_==t$4.style.IconAnchorUnits.FRACTION&&(e[1]*=t[1])}if(this.anchorOrigin_!=t$4.style.IconOrigin.TOP_LEFT){if(!t)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_==t$4.style.IconOrigin.TOP_RIGHT||this.anchorOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[0]=-e[0]+t[0]),(this.anchorOrigin_==t$4.style.IconOrigin.BOTTOM_LEFT||this.anchorOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[1]=-e[1]+t[1])}return this.normalizedAnchor_=e,this.normalizedAnchor_},t$4.style.Icon.prototype.getColor=function(){return this.color_},t$4.style.Icon.prototype.getImage=function(e){return this.iconImage_.getImage(e)},t$4.style.Icon.prototype.getImageSize=function(){return this.iconImage_.getSize()},t$4.style.Icon.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},t$4.style.Icon.prototype.getImageState=function(){return this.iconImage_.getImageState()},t$4.style.Icon.prototype.getHitDetectionImage=function(e){return this.iconImage_.getHitDetectionImage(e)},t$4.style.Icon.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var e=this.offset_;if(this.offsetOrigin_!=t$4.style.IconOrigin.TOP_LEFT){var t=this.getSize(),i=this.iconImage_.getSize();if(!t||!i)return null;e=e.slice(),(this.offsetOrigin_==t$4.style.IconOrigin.TOP_RIGHT||this.offsetOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[0]=i[0]-t[0]-e[0]),(this.offsetOrigin_==t$4.style.IconOrigin.BOTTOM_LEFT||this.offsetOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[1]=i[1]-t[1]-e[1])}return this.origin_=e,this.origin_},t$4.style.Icon.prototype.getSrc=function(){return this.iconImage_.getSrc()},t$4.style.Icon.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},t$4.style.Icon.prototype.listenImageChange=function(e,t){return t$4.events.listen(this.iconImage_,t$4.events.EventType.CHANGE,e,t)},t$4.style.Icon.prototype.load=function(){this.iconImage_.load()},t$4.style.Icon.prototype.unlistenImageChange=function(e,t){t$4.events.unlisten(this.iconImage_,t$4.events.EventType.CHANGE,e,t)},t$4.style.Text=function(e){var t=e||{};this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.text_=t.text,this.textAlign_=t.textAlign,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new t$4.style.Fill({color:t$4.style.Text.DEFAULT_FILL_COLOR_}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:t$4.style.TextPlacement.POINT;var i=void 0===t.overflow?t.exceedLength:t.overflow;this.overflow_=void 0!==i&&i,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding},t$4.style.Text.DEFAULT_FILL_COLOR_="#333",t$4.style.Text.prototype.clone=function(){return new t$4.style.Text({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:this.getScale(),text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY()})},t$4.style.Text.prototype.getOverflow=function(){return this.overflow_},t$4.style.Text.prototype.getFont=function(){return this.font_},t$4.style.Text.prototype.getMaxAngle=function(){return this.maxAngle_},t$4.style.Text.prototype.getPlacement=function(){return this.placement_},t$4.style.Text.prototype.getOffsetX=function(){return this.offsetX_},t$4.style.Text.prototype.getOffsetY=function(){return this.offsetY_},t$4.style.Text.prototype.getFill=function(){return this.fill_},t$4.style.Text.prototype.getRotateWithView=function(){return this.rotateWithView_},t$4.style.Text.prototype.getRotation=function(){return this.rotation_},t$4.style.Text.prototype.getScale=function(){return this.scale_},t$4.style.Text.prototype.getStroke=function(){return this.stroke_},t$4.style.Text.prototype.getText=function(){return this.text_},t$4.style.Text.prototype.getTextAlign=function(){return this.textAlign_},t$4.style.Text.prototype.getTextBaseline=function(){return this.textBaseline_},t$4.style.Text.prototype.getBackgroundFill=function(){return this.backgroundFill_},t$4.style.Text.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t$4.style.Text.prototype.getPadding=function(){return this.padding_},t$4.style.Text.prototype.setOverflow=function(e){this.overflow_=e},t$4.style.Text.prototype.setFont=function(e){this.font_=e},t$4.style.Text.prototype.setMaxAngle=function(e){this.maxAngle_=e},t$4.style.Text.prototype.setOffsetX=function(e){this.offsetX_=e},t$4.style.Text.prototype.setOffsetY=function(e){this.offsetY_=e},t$4.style.Text.prototype.setPlacement=function(e){this.placement_=e},t$4.style.Text.prototype.setFill=function(e){this.fill_=e},t$4.style.Text.prototype.setRotation=function(e){this.rotation_=e},t$4.style.Text.prototype.setScale=function(e){this.scale_=e},t$4.style.Text.prototype.setStroke=function(e){this.stroke_=e},t$4.style.Text.prototype.setText=function(e){this.text_=e},t$4.style.Text.prototype.setTextAlign=function(e){this.textAlign_=e},t$4.style.Text.prototype.setTextBaseline=function(e){this.textBaseline_=e},t$4.style.Text.prototype.setBackgroundFill=function(e){this.backgroundFill_=e},t$4.style.Text.prototype.setBackgroundStroke=function(e){this.backgroundStroke_=e},t$4.style.Text.prototype.setPadding=function(e){this.padding_=e},t$4.style.Style=function(e){var t=e||{};this.geometry_=null,this.geometryFunction_=t$4.style.Style.defaultGeometryFunction,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex},t$4.style.Style.prototype.clone=function(){var e=this.getGeometry();return e&&e.clone&&(e=e.clone()),new t$4.style.Style({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t$4.style.Style.prototype.getRenderer=function(){return this.renderer_},t$4.style.Style.prototype.setRenderer=function(e){this.renderer_=e},t$4.style.Style.prototype.getGeometry=function(){return this.geometry_},t$4.style.Style.prototype.getGeometryFunction=function(){return this.geometryFunction_},t$4.style.Style.prototype.getFill=function(){return this.fill_},t$4.style.Style.prototype.setFill=function(e){this.fill_=e},t$4.style.Style.prototype.getImage=function(){return this.image_},t$4.style.Style.prototype.setImage=function(e){this.image_=e},t$4.style.Style.prototype.getStroke=function(){return this.stroke_},t$4.style.Style.prototype.setStroke=function(e){this.stroke_=e},t$4.style.Style.prototype.getText=function(){return this.text_},t$4.style.Style.prototype.setText=function(e){this.text_=e},t$4.style.Style.prototype.getZIndex=function(){return this.zIndex_},t$4.style.Style.prototype.setGeometry=function(e){"function"==typeof e?this.geometryFunction_=e:"string"==typeof e?this.geometryFunction_=function(t){return t.get(e)}:e?void 0!==e&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=t$4.style.Style.defaultGeometryFunction,this.geometry_=e},t$4.style.Style.prototype.setZIndex=function(e){this.zIndex_=e},t$4.style.Style.createFunction=function(e){var t,i;"function"==typeof e?t=e:(Array.isArray(e)?i=e:(t$4.asserts.assert(e instanceof t$4.style.Style,41),i=[e]),t=function(){return i});return t},t$4.style.Style.default_=null,t$4.style.Style.defaultFunction=function(e,t){if(!t$4.style.Style.default_){var i=new t$4.style.Fill({color:"rgba(255,255,255,0.4)"}),n=new t$4.style.Stroke({color:"#3399CC",width:1.25});t$4.style.Style.default_=[new t$4.style.Style({image:new t$4.style.Circle({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return t$4.style.Style.default_},t$4.style.Style.createDefaultEditing=function(){var e={},t=[255,255,255,1],i=[0,153,255,1];return e[t$4.geom.GeometryType.POLYGON]=[new t$4.style.Style({fill:new t$4.style.Fill({color:[255,255,255,.5]})})],e[t$4.geom.GeometryType.MULTI_POLYGON]=e[t$4.geom.GeometryType.POLYGON],e[t$4.geom.GeometryType.LINE_STRING]=[new t$4.style.Style({stroke:new t$4.style.Stroke({color:t,width:5})}),new t$4.style.Style({stroke:new t$4.style.Stroke({color:i,width:3})})],e[t$4.geom.GeometryType.MULTI_LINE_STRING]=e[t$4.geom.GeometryType.LINE_STRING],e[t$4.geom.GeometryType.CIRCLE]=e[t$4.geom.GeometryType.POLYGON].concat(e[t$4.geom.GeometryType.LINE_STRING]),e[t$4.geom.GeometryType.POINT]=[new t$4.style.Style({image:new t$4.style.Circle({radius:6,fill:new t$4.style.Fill({color:i}),stroke:new t$4.style.Stroke({color:t,width:1.5})}),zIndex:1/0})],e[t$4.geom.GeometryType.MULTI_POINT]=e[t$4.geom.GeometryType.POINT],e[t$4.geom.GeometryType.GEOMETRY_COLLECTION]=e[t$4.geom.GeometryType.POLYGON].concat(e[t$4.geom.GeometryType.LINE_STRING],e[t$4.geom.GeometryType.POINT]),e},t$4.style.Style.defaultGeometryFunction=function(e){return e.getGeometry()},t$4.ext={},t$4.ext.rbush=function(){},function(){!function(e){var t=n,i=n;function n(e,t,i,n,o){r(e,t,i||0,n||e.length-1,o||a)}function r(e,t,i,n,a){for(;n>i;){if(n-i>600){var s=n-i+1,l=t-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);r(e,t,Math.max(i,Math.floor(t-l*c/s+h)),Math.min(n,Math.floor(t+(s-l)*c/s+h)),a)}var d=e[t],f=i,p=n;for(o(e,i,t),a(e[n],d)>0&&o(e,i,n);f<p;){for(o(e,f,p),f++,p--;a(e[f],d)<0;)f++;for(;a(e[p],d)>0;)p--}0===a(e[i],d)?o(e,i,p):o(e,++p,n),p<=t&&(i=p+1),t<=p&&(n=p-1)}}function o(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function a(e,t){return e<t?-1:e>t?1:0}t.default=i;var s=l;function l(e,t){if(!(this instanceof l))return new l(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function u(e,t,i){if(!i)return t.indexOf(e);for(var n=0;n<t.length;n++)if(i(e,t[n]))return n;return-1}function c(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,n,r){r||(r=$(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=t;a<i;a++)o=e.children[a],d(r,e.leaf?n(o):o);return r}function d(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function f(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function _(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function x(e,t){var i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}function v(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function $(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(e,i,n,r,o){for(var a,s=[i,n];s.length;)!((n=s.pop())-(i=s.pop())<=r)&&(a=i+Math.ceil((n-i)/r/2)*r,t(e,a,i,n,o),s.push(i,a,a,n))}l.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,i=[],n=this.toBBox;if(!y(e,t))return i;for(var r,o,a,s,l=[];t;){for(r=0,o=t.children.length;r<o;r++)a=t.children[r],y(e,s=t.leaf?n(a):a)&&(t.leaf?i.push(a):v(e,s)?this._all(a,i):l.push(a));t=l.pop()}return i},collides:function(e){var t=this.data,i=this.toBBox;if(!y(e,t))return!1;for(var n,r,o,a,s=[];t;){for(n=0,r=t.children.length;n<r;n++)if(o=t.children[n],y(e,a=t.leaf?i(o):o)){if(t.leaf||v(e,a))return!0;s.push(o)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=$([]),this},remove:function(e,t){if(!e)return this;for(var i,n,r,o,a=this.data,s=this.toBBox(e),l=[],c=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=c.pop(),o=!0),a.leaf&&-1!==(r=u(e,a.children,t)))return a.children.splice(r,1),l.push(a),this._condense(l),this;o||a.leaf||!v(a,s)?n?(i++,a=n.children[i],o=!1):a=null:(l.push(a),c.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:f,compareMinY:p,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},_build:function(e,t,i,n){var r,o=i-t+1,a=this._maxEntries;if(o<=a)return c(r=$(e.slice(t,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=$([])).leaf=!1,r.height=n;var s,l,u,h,d=Math.ceil(o/a),f=d*Math.ceil(Math.sqrt(a));for(b(e,t,i,f,this.compareMinX),s=t;s<=i;s+=f)for(b(e,s,u=Math.min(s+f-1,i),d,this.compareMinY),l=s;l<=u;l+=d)h=Math.min(l+d-1,u),r.children.push(this._build(e,l,h,n-1));return c(r,this.toBBox),r},_chooseSubtree:function(e,t,i,n){for(var r,o,a,s,l,u,c,h;n.push(t),!t.leaf&&n.length-1!==i;){for(c=h=1/0,r=0,o=t.children.length;r<o;r++)l=_(a=t.children[r]),(u=g(e,a)-l)<h?(h=u,c=l<c?l:c,s=a):u===h&&l<c&&(c=l,s=a);t=s||t.children[0]}return t},_insert:function(e,t,i){var n=this.toBBox,r=i?e:n(e),o=[],a=this._chooseSubtree(r,this.data,t,o);for(a.children.push(e),d(a,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},_split:function(e,t){var i=e[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=$(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,c(i,this.toBBox),c(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(e,t){this.data=$([e,t]),this.data.height=e.height+1,this.data.leaf=!1,c(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,i){var n,r,o,a,s,l,u,c;for(l=u=1/0,n=t;n<=i-t;n++)a=x(r=h(e,0,n,this.toBBox),o=h(e,n,i,this.toBBox)),s=_(r)+_(o),a<l?(l=a,c=n,u=s<u?s:u):a===l&&s<u&&(u=s,c=n);return c},_chooseSplitAxis:function(e,t,i){var n=e.leaf?this.compareMinX:f,r=e.leaf?this.compareMinY:p;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)},_allDistMargin:function(e,t,i,n){e.children.sort(n);var r,o,a=this.toBBox,s=h(e,0,t,a),l=h(e,i-t,i,a),u=m(s)+m(l);for(r=t;r<i-t;r++)o=e.children[r],d(s,e.leaf?a(o):o),u+=m(s);for(r=i-t-1;r>=t;r--)o=e.children[r],d(l,e.leaf?a(o):o),u+=m(l);return u},_adjustParentBBoxes:function(e,t,i){for(var n=i;n>=0;n--)d(t[n],e)},_condense:function(e){for(var t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children).splice(t.indexOf(e[i]),1):this.clear():c(e[i],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}},e.default=s}(this.rbush=this.rbush||{})}.call(t$4.ext),t$4.ext.rbush=t$4.ext.rbush.default,t$4.render={},t$4.render.VectorContext=function(){},t$4.render.VectorContext.prototype.drawCustom=function(e,t,i){},t$4.render.VectorContext.prototype.drawGeometry=function(e){},t$4.render.VectorContext.prototype.setStyle=function(e){},t$4.render.VectorContext.prototype.drawCircle=function(e,t){},t$4.render.VectorContext.prototype.drawFeature=function(e,t){},t$4.render.VectorContext.prototype.drawGeometryCollection=function(e,t){},t$4.render.VectorContext.prototype.drawLineString=function(e,t){},t$4.render.VectorContext.prototype.drawMultiLineString=function(e,t){},t$4.render.VectorContext.prototype.drawMultiPoint=function(e,t){},t$4.render.VectorContext.prototype.drawMultiPolygon=function(e,t){},t$4.render.VectorContext.prototype.drawPoint=function(e,t){},t$4.render.VectorContext.prototype.drawPolygon=function(e,t){},t$4.render.VectorContext.prototype.drawText=function(e,t){},t$4.render.VectorContext.prototype.setFillStrokeStyle=function(e,t){},t$4.render.VectorContext.prototype.setImageStyle=function(e,t){},t$4.render.VectorContext.prototype.setTextStyle=function(e,t){},t$4.render.ReplayGroup={},t$4.render.ReplayGroup=function(){},t$4.render.ReplayGroup.prototype.getReplay=function(e,t){},t$4.render.ReplayGroup.prototype.isEmpty=function(){},t$4.render.ReplayType={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"},t$4.geom.flat.length={},t$4.geom.flat.length.lineString=function(e,t,i,n){var r,o=e[t],a=e[t+1],s=0;for(r=t+n;r<i;r+=n){var l=e[r],u=e[r+1];s+=Math.sqrt((l-o)*(l-o)+(u-a)*(u-a)),o=l,a=u}return s},t$4.geom.flat.length.linearRing=function(e,t,i,n){var r=t$4.geom.flat.length.lineString(e,t,i,n),o=e[i-n]-e[t],a=e[i-n+1]-e[t+1];return r+=Math.sqrt(o*o+a*a)},t$4.geom.flat.textpath={},t$4.geom.flat.textpath.lineString=function(e,t,i,n,r,o,a,s){for(var l,u,c,h=[],d=e[t]>e[i-n],f=r.length,p=e[t],_=e[t+1],m=e[t+=n],g=e[t+1],x=0,v=Math.sqrt(Math.pow(m-p,2)+Math.pow(g-_,2)),y="",$=0,b=0;b<f;++b){u=d?f-b-1:b;var T=r.charAt(u),C=o(y=d?T+y:y+T)-$;$+=C;for(var S=a+C/2;t<i-n&&x+v<S;)p=m,_=g,m=e[t+=n],g=e[t+1],x+=v,v=Math.sqrt(Math.pow(m-p,2)+Math.pow(g-_,2));var w=S-x,E=Math.atan2(g-_,m-p);if(d&&(E+=E>0?-Math.PI:Math.PI),void 0!==c){var P=E-c;if(P+=P>Math.PI?-2*Math.PI:P<-Math.PI?2*Math.PI:0,Math.abs(P)>s)return null}var A=w/v,L=t$4.math.lerp(p,m,A),M=t$4.math.lerp(_,g,A);c==E?(d&&(l[0]=L,l[1]=M,l[2]=C/2),l[4]=y):($=C,l=[L,M,C/2,E,y=T],d?h.unshift(l):h.push(l),c=E),a+=C}return h},t$4.structs.LRUCache=function(e){t$4.events.EventTarget.call(this),this.highWaterMark=void 0!==e?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t$4.inherits(t$4.structs.LRUCache,t$4.events.EventTarget),t$4.structs.LRUCache.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark},t$4.structs.LRUCache.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null,this.dispatchEvent(t$4.events.EventType.CLEAR)},t$4.structs.LRUCache.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},t$4.structs.LRUCache.prototype.forEach=function(e,t){for(var i=this.oldest_;i;)e.call(t,i.value_,i.key_,this),i=i.newer},t$4.structs.LRUCache.prototype.get=function(e){var t=this.entries_[e];return t$4.asserts.assert(void 0!==t,15),t===this.newest_||(t===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(t.newer.older=t.older,t.older.newer=t.newer),t.newer=null,t.older=this.newest_,this.newest_.newer=t,this.newest_=t),t.value_},t$4.structs.LRUCache.prototype.remove=function(e){var t=this.entries_[e];return t$4.asserts.assert(void 0!==t,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_},t$4.structs.LRUCache.prototype.getCount=function(){return this.count_},t$4.structs.LRUCache.prototype.getKeys=function(){var e,t=new Array(this.count_),i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t},t$4.structs.LRUCache.prototype.getValues=function(){var e,t=new Array(this.count_),i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t},t$4.structs.LRUCache.prototype.peekLast=function(){return this.oldest_.value_},t$4.structs.LRUCache.prototype.peekLastKey=function(){return this.oldest_.key_},t$4.structs.LRUCache.prototype.peekFirstKey=function(){return this.newest_.key_},t$4.structs.LRUCache.prototype.pop=function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_},t$4.structs.LRUCache.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},t$4.structs.LRUCache.prototype.set=function(e,t){t$4.asserts.assert(!(e in this.entries_),16);var i={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_},t$4.structs.LRUCache.prototype.prune=function(){for(;this.canExpireCache();)this.pop()},t$4.render.canvas={},t$4.render.canvas.defaultFont="10px sans-serif",t$4.render.canvas.defaultFillStyle=[0,0,0,1],t$4.render.canvas.defaultLineCap="round",t$4.render.canvas.defaultLineDash=[],t$4.render.canvas.defaultLineDashOffset=0,t$4.render.canvas.defaultLineJoin="round",t$4.render.canvas.defaultMiterLimit=10,t$4.render.canvas.defaultStrokeStyle=[0,0,0,1],t$4.render.canvas.defaultTextAlign="center",t$4.render.canvas.defaultTextBaseline="middle",t$4.render.canvas.defaultPadding=[0,0,0,0],t$4.render.canvas.defaultLineWidth=1,t$4.render.canvas.labelCache=new t$4.structs.LRUCache,t$4.render.canvas.checkedFonts_={},t$4.render.canvas.measureContext_=null,t$4.render.canvas.textHeights_={},t$4.render.canvas.checkFont=function(){var e,t,i=t$4.render.canvas.checkedFonts_,n=t$4.render.canvas.labelCache,r="wmytzilWMYTZIL@#/&?$%10";function o(e){var i=t$4.render.canvas.getMeasureContext();i.font="32px monospace",t=i.measureText(r).width;var n=!0;"monospace"!=e&&(i.font="32px "+e+",monospace",n=i.measureText(r).width!=t);return n}function a(){var t=!0;for(var r in i)i[r]<60&&(o(r)?(i[r]=60,t$4.obj.clear(t$4.render.canvas.textHeights_),t$4.render.canvas.measureContext_=null,n.clear()):(++i[r],t=!1));t&&(window.clearInterval(e),e=void 0)}return function(t){var n=t$4.css.getFontFamilies(t);if(n)for(var r=0,s=n.length;r<s;++r){var l=n[r];l in i||(i[l]=60,o(l)||(i[l]=0,void 0===e&&(e=window.setInterval(a,32))))}}}(),t$4.render.canvas.getMeasureContext=function(){var e=t$4.render.canvas.measureContext_;return e||(e=t$4.render.canvas.measureContext_=t$4.dom.createCanvasContext2D(1,1)),e},t$4.render.canvas.measureTextHeight=function(){var e=t$4.render.canvas.textHeights_;return function(t){var i=e[t];return null==i&&(i=e[t]=19),i}}(),t$4.render.canvas.measureTextWidth=function(e,t){var i=t$4.render.canvas.getMeasureContext();return e!=i.font&&(i.font=e),i.measureText(t).width},t$4.render.canvas.rotateAtOffset=function(e,t,i,n){0!==t&&(e.translate(i,n),e.rotate(t),e.translate(-i,-n))},t$4.render.canvas.resetTransform_=t$4.transform.create(),t$4.render.canvas.drawImage=function(e,t,i,n,r,o,a,s,l,u,c){var h;1!=i&&(h=e.globalAlpha,e.globalAlpha=h*i),t&&e.setTransform.apply(e,t),e.drawImage(n,r,o,a,s,l,u,a*c,s*c),h&&(e.globalAlpha=h),t&&e.setTransform.apply(e,t$4.render.canvas.resetTransform_)},t$4.render.canvas.Instruction={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},t$4.render.replay={},t$4.render.replay.ORDER=[t$4.render.ReplayType.POLYGON,t$4.render.ReplayType.CIRCLE,t$4.render.ReplayType.LINE_STRING,t$4.render.ReplayType.IMAGE,t$4.render.ReplayType.TEXT,t$4.render.ReplayType.DEFAULT],t$4.render.replay.TEXT_ALIGN={},t$4.render.replay.TEXT_ALIGN.left=0,t$4.render.replay.TEXT_ALIGN.end=0,t$4.render.replay.TEXT_ALIGN.center=.5,t$4.render.replay.TEXT_ALIGN.right=1,t$4.render.replay.TEXT_ALIGN.start=1,t$4.render.replay.TEXT_ALIGN.top=0,t$4.render.replay.TEXT_ALIGN.middle=.5,t$4.render.replay.TEXT_ALIGN.hanging=.2,t$4.render.replay.TEXT_ALIGN.alphabetic=.8,t$4.render.replay.TEXT_ALIGN.ideographic=.8,t$4.render.replay.TEXT_ALIGN.bottom=1,t$4.render.canvas.Replay=function(e,t,i,n,r,o){t$4.render.VectorContext.call(this),this.declutterTree=o,this.tmpExtent_=t$4.extent.createEmpty(),this.tolerance=e,this.maxExtent=t,this.overlaps=r,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.fillOrigin_,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.coordinateCache_={},this.renderedTransform_=t$4.transform.create(),this.hitDetectionInstructions=[],this.pixelCoordinates_=null,this.state={},this.viewRotation_=0,this.tmpLocalTransform_=t$4.transform.create(),this.resetTransform_=t$4.transform.create()},t$4.inherits(t$4.render.canvas.Replay,t$4.render.VectorContext),t$4.render.canvas.Replay.prototype.replayTextBackground_=function(e,t,i,n,r,o,a){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,i),e.lineTo.apply(e,n),e.lineTo.apply(e,r),e.lineTo.apply(e,t),o&&(this.fillOrigin_=o[2],this.fill_(e)),a&&(this.setStrokeStyle_(e,a),e.stroke())},t$4.render.canvas.Replay.prototype.replayImage_=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g){var x=m||g,v=this.tmpLocalTransform_;t-=r*=d,i-=o*=d,f&&(t=Math.round(t),i=Math.round(i));var y,$,b,T,C=p+u>n.width?n.width-u:p,S=s+c>n.height?n.height-c:s,w=this.tmpExtent_,E=_[3]+C*d+_[1],P=_[0]+S*d+_[2],A=t-_[3],L=i-_[0];(x||0!==h)&&(y=[A,L],$=[A+E,L],b=[A+E,L+P],T=[A,L+P]);var M=null;if(0!==h){var R=t+r,I=i+o;M=t$4.transform.compose(v,R,I,1,1,h,-R,-I),t$4.extent.createOrUpdateEmpty(w),t$4.extent.extendCoordinate(w,t$4.transform.apply(v,y)),t$4.extent.extendCoordinate(w,t$4.transform.apply(v,$)),t$4.extent.extendCoordinate(w,t$4.transform.apply(v,b)),t$4.extent.extendCoordinate(w,t$4.transform.apply(v,T))}else t$4.extent.createOrUpdate(A,L,A+E,L+P,w);var O=e.canvas,D=w[0]<=O.width&&w[2]>=0&&w[1]<=O.height&&w[3]>=0;if(a){if(!D&&1==a[4])return;t$4.extent.extend(a,w);var B=D?[e,M?M.slice(0):null,l,n,u,c,C,S,t,i,d]:null;B&&x&&B.push(m,g,y,$,b,T),a.push(B)}else D&&(x&&this.replayTextBackground_(e,y,$,b,T,m,g),t$4.render.canvas.drawImage(e,M,l,n,u,c,C,S,t,i,d))},t$4.render.canvas.Replay.prototype.applyPixelRatio=function(e){var t=this.pixelRatio;return 1==t?e:e.map((function(e){return e*t}))},t$4.render.canvas.Replay.prototype.appendFlatCoordinates=function(e,t,i,n,r,o){var a=this.coordinates.length,s=this.getBufferedMaxExtent();o&&(t+=n);var l,u,c,h=[e[t],e[t+1]],d=[NaN,NaN],f=!0;for(l=t+n;l<i;l+=n)d[0]=e[l],d[1]=e[l+1],(c=t$4.extent.coordinateRelationship(s,d))!==u?(f&&(this.coordinates[a++]=h[0],this.coordinates[a++]=h[1]),this.coordinates[a++]=d[0],this.coordinates[a++]=d[1],f=!1):c===t$4.extent.Relationship.INTERSECTING?(this.coordinates[a++]=d[0],this.coordinates[a++]=d[1],f=!1):f=!0,h[0]=d[0],h[1]=d[1],u=c;return(r&&f||l===t+n)&&(this.coordinates[a++]=h[0],this.coordinates[a++]=h[1]),a},t$4.render.canvas.Replay.prototype.drawCustomCoordinates_=function(e,t,i,n,r){for(var o=0,a=i.length;o<a;++o){var s=i[o],l=this.appendFlatCoordinates(e,t,s,n,!1,!1);r.push(l),t=s}return t},t$4.render.canvas.Replay.prototype.drawCustom=function(e,t,i){this.beginGeometry(e,t);var n,r,o,a,s,l=e.getType(),u=e.getStride(),c=this.coordinates.length;if(l==t$4.geom.GeometryType.MULTI_POLYGON){n=(e=e).getOrientedFlatCoordinates(),a=[];var h=e.getEndss();s=0;for(var d=0,f=h.length;d<f;++d){var p=[];s=this.drawCustomCoordinates_(n,s,h[d],u,p),a.push(p)}this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,a,e,i,t$4.geom.flat.inflate.coordinatesss])}else l==t$4.geom.GeometryType.POLYGON||l==t$4.geom.GeometryType.MULTI_LINE_STRING?(o=[],n=l==t$4.geom.GeometryType.POLYGON?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),s=this.drawCustomCoordinates_(n,0,e.getEnds(),u,o),this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,o,e,i,t$4.geom.flat.inflate.coordinatess])):l==t$4.geom.GeometryType.LINE_STRING||l==t$4.geom.GeometryType.MULTI_POINT?(n=e.getFlatCoordinates(),r=this.appendFlatCoordinates(n,0,n.length,u,!1,!1),this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,r,e,i,t$4.geom.flat.inflate.coordinates])):l==t$4.geom.GeometryType.POINT&&(n=e.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),r=this.coordinates.length,this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,r,e,i]));this.endGeometry(e,t)},t$4.render.canvas.Replay.prototype.beginGeometry=function(e,t){this.beginGeometryInstruction1_=[t$4.render.canvas.Instruction.BEGIN_GEOMETRY,t,0],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[t$4.render.canvas.Instruction.BEGIN_GEOMETRY,t,0],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},t$4.render.canvas.Replay.prototype.fill_=function(e){if(this.fillOrigin_){var t=t$4.transform.apply(this.renderedTransform_,this.fillOrigin_.slice());e.translate(t[0],t[1]),e.rotate(this.viewRotation_)}e.fill(),this.fillOrigin_&&e.setTransform.apply(e,t$4.render.canvas.resetTransform_)},t$4.render.canvas.Replay.prototype.setStrokeStyle_=function(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],t$4.has.CANVAS_LINE_DASH&&(e.lineDashOffset=t[7],e.setLineDash(t[6]))},t$4.render.canvas.Replay.prototype.renderDeclutter_=function(e,t){if(e&&e.length>5){var i=e[4];if(1==i||i==e.length-5){var n={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};if(!this.declutterTree.collides(n)){this.declutterTree.insert(n);for(var r=t$4.render.canvas.drawImage,o=5,a=e.length;o<a;++o){var s=e[o];s&&(s.length>11&&this.replayTextBackground_(s[0],s[13],s[14],s[15],s[16],s[11],s[12]),r.apply(void 0,s))}}e.length=5,t$4.extent.createOrUpdateEmpty(e)}}},t$4.render.canvas.Replay.prototype.replay_=function(e,t,i,n,r,o){var a;this.pixelCoordinates_&&t$4.array.equals(t,this.renderedTransform_)?a=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),a=t$4.geom.flat.transform.transform2D(this.coordinates,0,this.coordinates.length,2,t,this.pixelCoordinates_),t$4.transform.setFromArray(this.renderedTransform_,t));for(var s,l,u,c,h,d,f,p,_,m=!t$4.obj.isEmpty(i),g=0,x=n.length,v=0,y=0,$=0,b=null,T=null,C=this.coordinateCache_,S=this.viewRotation_,w={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:S},E=this.instructions!=n||this.overlaps?0:200;g<x;){var P,A,L,M=n[g];switch(M[0]){case t$4.render.canvas.Instruction.BEGIN_GEOMETRY:P=M[1],m&&i[t$4.getUid(P).toString()]||!P.getGeometry()?g=M[2]:void 0===o||t$4.extent.intersects(o,P.getGeometry().getExtent())?++g:g=M[2]+1;break;case t$4.render.canvas.Instruction.BEGIN_PATH:y>E&&(this.fill_(e),y=0),$>E&&(e.stroke(),$=0),!y&&!$&&(e.beginPath(),c=h=NaN),++g;break;case t$4.render.canvas.Instruction.CIRCLE:var R=a[v=M[1]],I=a[v+1],O=a[v+2]-R,D=a[v+3]-I,B=Math.sqrt(O*O+D*D);e.moveTo(R+B,I),e.arc(R,I,B,0,2*Math.PI,!0),++g;break;case t$4.render.canvas.Instruction.CLOSE_PATH:e.closePath(),++g;break;case t$4.render.canvas.Instruction.CUSTOM:v=M[1],s=M[2];var N=M[3],F=M[4],U=6==M.length?M[5]:void 0;w.geometry=N,w.feature=P,g in C||(C[g]=[]);var z=C[g];U?U(a,v,s,2,z):(z[0]=a[v],z[1]=a[v+1],z.length=2),F(z,w),++g;break;case t$4.render.canvas.Instruction.DRAW_IMAGE:v=M[1],s=M[2],_=M[3],l=M[4],u=M[5],p=r?null:M[6];var G,V,k,W=M[7],H=M[8],q=M[9],j=M[10],Y=M[11],X=M[12],K=M[13],Q=M[14],Z=M[15];for(M.length>16?(G=M[16],V=M[17],k=M[18]):(G=t$4.render.canvas.defaultPadding,V=k=!1),Y&&(X+=S);v<s;v+=2)this.replayImage_(e,a[v],a[v+1],_,l,u,p,W,H,q,j,X,K,Q,Z,G,V?b:null,k?T:null);this.renderDeclutter_(p,P),++g;break;case t$4.render.canvas.Instruction.DRAW_CHARS:var J=M[1],ee=M[2],te=M[3];p=r?null:M[4];var ie=M[5],ne=M[6],re=M[7],oe=M[8],ae=M[9],se=M[10],le=M[11],ue=M[12],ce=M[13],he=M[14],de=t$4.geom.flat.length.lineString(a,J,ee,2),fe=oe(ue);if(ie||fe<=de){var pe=this.textStates[ce].textAlign,_e=(de-fe)*t$4.render.replay.TEXT_ALIGN[pe],me=t$4.geom.flat.textpath.lineString(a,J,ee,2,ue,oe,_e,re);if(me){var ge,xe,ve,ye,$e;if(se)for(ge=0,xe=me.length;ge<xe;++ge)ve=($e=me[ge])[4],ye=this.getImage(ve,ce,"",se),l=$e[2]+le,u=te*ye.height+2*(.5-te)*le-ae,this.replayImage_(e,$e[0],$e[1],ye,l,u,p,ye.height,1,0,0,$e[3],he,!1,ye.width,t$4.render.canvas.defaultPadding,null,null);if(ne)for(ge=0,xe=me.length;ge<xe;++ge)ve=($e=me[ge])[4],ye=this.getImage(ve,ce,ne,""),l=$e[2],u=te*ye.height-ae,this.replayImage_(e,$e[0],$e[1],ye,l,u,p,ye.height,1,0,0,$e[3],he,!1,ye.width,t$4.render.canvas.defaultPadding,null,null)}}this.renderDeclutter_(p,P),++g;break;case t$4.render.canvas.Instruction.END_GEOMETRY:if(void 0!==r){var be=r(P=M[1]);if(be)return be}++g;break;case t$4.render.canvas.Instruction.FILL:E?y++:this.fill_(e),++g;break;case t$4.render.canvas.Instruction.MOVE_TO_LINE_TO:for(v=M[1],s=M[2],A=a[v],f=(L=a[v+1])+.5|0,((d=A+.5|0)!==c||f!==h)&&(e.moveTo(A,L),c=d,h=f),v+=2;v<s;v+=2)d=(A=a[v])+.5|0,f=(L=a[v+1])+.5|0,(v==s-2||d!==c||f!==h)&&(e.lineTo(A,L),c=d,h=f);++g;break;case t$4.render.canvas.Instruction.SET_FILL_STYLE:b=M,this.fillOrigin_=M[2],y&&(this.fill_(e),y=0,$&&(e.stroke(),$=0)),e.fillStyle=M[1],++g;break;case t$4.render.canvas.Instruction.SET_STROKE_STYLE:T=M,$&&(e.stroke(),$=0),this.setStrokeStyle_(e,M),++g;break;case t$4.render.canvas.Instruction.STROKE:E?$++:e.stroke(),++g;break;default:++g}}y&&this.fill_(e),$&&e.stroke()},t$4.render.canvas.Replay.prototype.replay=function(e,t,i,n){this.viewRotation_=i,this.replay_(e,t,n,this.instructions,void 0,void 0)},t$4.render.canvas.Replay.prototype.replayHitDetection=function(e,t,i,n,r,o){return this.viewRotation_=i,this.replay_(e,t,n,this.hitDetectionInstructions,r,o)},t$4.render.canvas.Replay.prototype.reverseHitDetectionInstructions=function(){var e=this.hitDetectionInstructions;e.reverse();var t,i,n,r=e.length,o=-1;for(t=0;t<r;++t)(n=(i=e[t])[0])==t$4.render.canvas.Instruction.END_GEOMETRY?o=t:n==t$4.render.canvas.Instruction.BEGIN_GEOMETRY&&(i[2]=t,t$4.array.reverseSubArray(this.hitDetectionInstructions,o,t),o=-1)},t$4.render.canvas.Replay.prototype.setFillStrokeStyle=function(e,t){var i=this.state;if(e){var n=e.getColor();i.fillStyle=t$4.colorlike.asColorLike(n||t$4.render.canvas.defaultFillStyle)}else i.fillStyle=void 0;if(t){var r=t.getColor();i.strokeStyle=t$4.colorlike.asColorLike(r||t$4.render.canvas.defaultStrokeStyle);var o=t.getLineCap();i.lineCap=void 0!==o?o:t$4.render.canvas.defaultLineCap;var a=t.getLineDash();i.lineDash=a?a.slice():t$4.render.canvas.defaultLineDash;var s=t.getLineDashOffset();i.lineDashOffset=s||t$4.render.canvas.defaultLineDashOffset;var l=t.getLineJoin();i.lineJoin=void 0!==l?l:t$4.render.canvas.defaultLineJoin;var u=t.getWidth();i.lineWidth=void 0!==u?u:t$4.render.canvas.defaultLineWidth;var c=t.getMiterLimit();i.miterLimit=void 0!==c?c:t$4.render.canvas.defaultMiterLimit,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},t$4.render.canvas.Replay.prototype.applyFill=function(e,t){var i=e.fillStyle,n=[t$4.render.canvas.Instruction.SET_FILL_STYLE,i];if("string"!=typeof i){var r=t.getExtent();n.push([r[0],r[3]])}this.instructions.push(n)},t$4.render.canvas.Replay.prototype.applyStroke=function(e){this.instructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio])},t$4.render.canvas.Replay.prototype.updateFillStyle=function(e,t,i){var n=e.fillStyle;("string"!=typeof n||e.currentFillStyle!=n)&&(t.call(this,e,i),e.currentFillStyle=n)},t$4.render.canvas.Replay.prototype.updateStrokeStyle=function(e,t){var i=e.strokeStyle,n=e.lineCap,r=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,s=e.lineWidth,l=e.miterLimit;(e.currentStrokeStyle!=i||e.currentLineCap!=n||r!=e.currentLineDash&&!t$4.array.equals(e.currentLineDash,r)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=s||e.currentMiterLimit!=l)&&(t.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=n,e.currentLineDash=r,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=s,e.currentMiterLimit=l)},t$4.render.canvas.Replay.prototype.endGeometry=function(e,t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var i=[t$4.render.canvas.Instruction.END_GEOMETRY,t];this.instructions.push(i),this.hitDetectionInstructions.push(i)},t$4.render.canvas.Replay.prototype.finish=t$4.nullFunction,t$4.render.canvas.Replay.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=t$4.extent.clone(this.maxExtent),this.maxLineWidth>0)){var e=this.resolution*(this.maxLineWidth+1)/2;t$4.extent.buffer(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},t$4.render.canvas.ImageReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o),this.declutterGroup_=null,this.hitDetectionImage_=null,this.image_=null,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.snapToPixel_=void 0,this.width_=void 0},t$4.inherits(t$4.render.canvas.ImageReplay,t$4.render.canvas.Replay),t$4.render.canvas.ImageReplay.prototype.drawCoordinates_=function(e,t,i,n){return this.appendFlatCoordinates(e,t,i,n,!1,!1)},t$4.render.canvas.ImageReplay.prototype.drawPoint=function(e,t){if(this.image_){this.beginGeometry(e,t);var i=e.getFlatCoordinates(),n=e.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]),this.endGeometry(e,t)}},t$4.render.canvas.ImageReplay.prototype.drawMultiPoint=function(e,t){if(this.image_){this.beginGeometry(e,t);var i=e.getFlatCoordinates(),n=e.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]),this.endGeometry(e,t)}},t$4.render.canvas.ImageReplay.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.snapToPixel_=void 0,this.width_=void 0},t$4.render.canvas.ImageReplay.prototype.setImageStyle=function(e,t){var i=e.getAnchor(),n=e.getSize(),r=e.getHitDetectionImage(1),o=e.getImage(1),a=e.getOrigin();this.anchorX_=i[0],this.anchorY_=i[1],this.declutterGroup_=t,this.hitDetectionImage_=r,this.image_=o,this.height_=n[1],this.opacity_=e.getOpacity(),this.originX_=a[0],this.originY_=a[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScale(),this.snapToPixel_=e.getSnapToPixel(),this.width_=n[0]},t$4.render.canvas.LineStringReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o)},t$4.inherits(t$4.render.canvas.LineStringReplay,t$4.render.canvas.Replay),t$4.render.canvas.LineStringReplay.prototype.drawFlatCoordinates_=function(e,t,i,n){var r=this.coordinates.length,o=this.appendFlatCoordinates(e,t,i,n,!1,!1),a=[t$4.render.canvas.Instruction.MOVE_TO_LINE_TO,r,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i},t$4.render.canvas.LineStringReplay.prototype.drawLineString=function(e,t){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],[t$4.render.canvas.Instruction.BEGIN_PATH]);var o=e.getFlatCoordinates(),a=e.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.STROKE]),this.endGeometry(e,t)}},t$4.render.canvas.LineStringReplay.prototype.drawMultiLineString=function(e,t){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],[t$4.render.canvas.Instruction.BEGIN_PATH]);var o,a,s=e.getEnds(),l=e.getFlatCoordinates(),u=e.getStride(),c=0;for(o=0,a=s.length;o<a;++o)c=this.drawFlatCoordinates_(l,c,s[o],u);this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.STROKE]),this.endGeometry(e,t)}},t$4.render.canvas.LineStringReplay.prototype.finish=function(){var e=this.state;null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push([t$4.render.canvas.Instruction.STROKE]),this.reverseHitDetectionInstructions(),this.state=null},t$4.render.canvas.LineStringReplay.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push([t$4.render.canvas.Instruction.STROKE]),e.lastStroke=this.coordinates.length),e.lastStroke=0,t$4.render.canvas.Replay.prototype.applyStroke.call(this,e),this.instructions.push([t$4.render.canvas.Instruction.BEGIN_PATH])},t$4.render.canvas.PolygonReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o)},t$4.inherits(t$4.render.canvas.PolygonReplay,t$4.render.canvas.Replay),t$4.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_=function(e,t,i,n){var r=this.state,o=void 0!==r.fillStyle,a=null!=r.strokeStyle,s=i.length,l=[t$4.render.canvas.Instruction.BEGIN_PATH];this.instructions.push(l),this.hitDetectionInstructions.push(l);for(var u=0;u<s;++u){var c=i[u],h=this.coordinates.length,d=this.appendFlatCoordinates(e,t,c,n,!0,!a),f=[t$4.render.canvas.Instruction.MOVE_TO_LINE_TO,h,d];if(this.instructions.push(f),this.hitDetectionInstructions.push(f),a){var p=[t$4.render.canvas.Instruction.CLOSE_PATH];this.instructions.push(p),this.hitDetectionInstructions.push(p)}t=c}var _=[t$4.render.canvas.Instruction.FILL];if(this.hitDetectionInstructions.push(_),o&&this.instructions.push(_),a){var m=[t$4.render.canvas.Instruction.STROKE];this.instructions.push(m),this.hitDetectionInstructions.push(m)}return t},t$4.render.canvas.PolygonReplay.prototype.drawCircle=function(e,t){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_FILL_STYLE,t$4.color.asString(t$4.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=e.getFlatCoordinates(),a=e.getStride(),s=this.coordinates.length;this.appendFlatCoordinates(o,0,o.length,a,!1,!1);var l=[t$4.render.canvas.Instruction.BEGIN_PATH],u=[t$4.render.canvas.Instruction.CIRCLE,s];this.instructions.push(l,u),this.hitDetectionInstructions.push(l,u);var c=[t$4.render.canvas.Instruction.FILL];if(this.hitDetectionInstructions.push(c),void 0!==i.fillStyle&&this.instructions.push(c),void 0!==i.strokeStyle){var h=[t$4.render.canvas.Instruction.STROKE];this.instructions.push(h),this.hitDetectionInstructions.push(h)}this.endGeometry(e,t)}},t$4.render.canvas.PolygonReplay.prototype.drawPolygon=function(e,t){var i=this.state;this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_FILL_STYLE,t$4.color.asString(t$4.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var n=e.getEnds(),r=e.getOrientedFlatCoordinates(),o=e.getStride();this.drawFlatCoordinatess_(r,0,n,o),this.endGeometry(e,t)},t$4.render.canvas.PolygonReplay.prototype.drawMultiPolygon=function(e,t){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_FILL_STYLE,t$4.color.asString(t$4.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o,a,s=e.getEndss(),l=e.getOrientedFlatCoordinates(),u=e.getStride(),c=0;for(o=0,a=s.length;o<a;++o)c=this.drawFlatCoordinatess_(l,c,s[o],u);this.endGeometry(e,t)}},t$4.render.canvas.PolygonReplay.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e){var t,i,n=this.coordinates;for(t=0,i=n.length;t<i;++t)n[t]=t$4.geom.flat.simplify.snap(n[t],e)}},t$4.render.canvas.PolygonReplay.prototype.setFillStrokeStyles_=function(e){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.applyFill,e),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},t$4.geom.flat.straightchunk={},t$4.geom.flat.straightchunk.lineString=function(e,t,i,n,r){var o,a,s,l,u,c,h,d,f,p=i,_=i,m=0,g=0,x=i;for(o=i;o<n;o+=r){var v=t[o],y=t[o+1];void 0!==l&&(d=v-l,f=y-u,s=Math.sqrt(d*d+f*f),void 0!==c&&(g+=a,Math.acos((c*d+h*f)/(a*s))>e&&(g>m&&(m=g,p=x,_=o),g=0,x=o-r)),a=s,c=d,h=f),l=v,u=y}return(g+=s)>m?[x,o]:[p,_]},t$4.style.TextPlacement={POINT:"point",LINE:"line"},t$4.render.canvas.TextReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o),this.declutterGroup_,this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.widths_={},t$4.render.canvas.labelCache.prune()},t$4.inherits(t$4.render.canvas.TextReplay,t$4.render.canvas.Replay),t$4.render.canvas.TextReplay.measureTextWidths=function(e,t,i){var n,r,o=t.length,a=0;for(r=0;r<o;++r)n=t$4.render.canvas.measureTextWidth(e,t[r]),a=Math.max(a,n),i.push(n);return a},t$4.render.canvas.TextReplay.prototype.drawText=function(e,t){var i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(i||n)){var o,a,s=this.coordinates.length,l=e.getType(),u=null,c=2,h=2;if(r.placement===t$4.style.TextPlacement.LINE){if(!t$4.extent.intersects(this.getBufferedMaxExtent(),e.getExtent()))return;var d;if(u=e.getFlatCoordinates(),h=e.getStride(),l==t$4.geom.GeometryType.LINE_STRING)d=[u.length];else if(l==t$4.geom.GeometryType.MULTI_LINE_STRING)d=e.getEnds();else if(l==t$4.geom.GeometryType.POLYGON)d=e.getEnds().slice(0,1);else if(l==t$4.geom.GeometryType.MULTI_POLYGON){var f=e.getEndss();for(d=[],o=0,a=f.length;o<a;++o)d.push(f[o][0])}this.beginGeometry(e,t);for(var p,_=r.textAlign,m=0,g=0,x=d.length;g<x;++g){if(null==_){var v=t$4.geom.flat.straightchunk.lineString(r.maxAngle,u,m,d[g],h);m=v[0],p=v[1]}else p=d[g];for(o=m;o<p;o+=h)this.coordinates.push(u[o],u[o+1]);c=this.coordinates.length,m=d[g],this.drawChars_(s,c,this.declutterGroup_),s=c}this.endGeometry(e,t)}else{var y=this.getImage(this.text_,this.textKey_,this.fillKey_,this.strokeKey_),$=y.width/this.pixelRatio;switch(l){case t$4.geom.GeometryType.POINT:case t$4.geom.GeometryType.MULTI_POINT:c=(u=e.getFlatCoordinates()).length;break;case t$4.geom.GeometryType.LINE_STRING:u=e.getFlatMidpoint();break;case t$4.geom.GeometryType.CIRCLE:u=e.getCenter();break;case t$4.geom.GeometryType.MULTI_LINE_STRING:c=(u=e.getFlatMidpoints()).length;break;case t$4.geom.GeometryType.POLYGON:if(u=e.getFlatInteriorPoint(),!r.overflow&&u[2]/this.resolution<$)return;h=3;break;case t$4.geom.GeometryType.MULTI_POLYGON:var b=e.getFlatInteriorPoints();for(u=[],o=0,a=b.length;o<a;o+=3)(r.overflow||b[o+2]/this.resolution>=$)&&u.push(b[o],b[o+1]);if(0==(c=u.length))return}c=this.appendFlatCoordinates(u,0,c,h,!1,!1),this.beginGeometry(e,t),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),this.updateFillStyle(this.state,this.applyFill,e),this.updateStrokeStyle(this.state,this.applyStroke)),this.drawTextImage_(y,s,c),this.endGeometry(e,t)}}},t$4.render.canvas.TextReplay.prototype.getImage=function(e,t,i,n){var r,o=n+t+e+i+this.pixelRatio,a=t$4.render.canvas.labelCache;if(!a.containsKey(o)){var s=n?this.strokeStates[n]||this.textStrokeState_:null,l=i?this.fillStates[i]||this.textFillState_:null,u=this.textStates[t]||this.textState_,c=this.pixelRatio,h=u.scale*c,d=t$4.render.replay.TEXT_ALIGN[u.textAlign||t$4.render.canvas.defaultTextAlign],f=n&&s.lineWidth?s.lineWidth:0,p=e.split("\n"),_=p.length,m=[],g=t$4.render.canvas.TextReplay.measureTextWidths(u.font,p,m),x=t$4.render.canvas.measureTextHeight(u.font),v=x*_,y=g+f,$=t$4.dom.createCanvasContext2D(Math.ceil(y*h),Math.ceil((v+f)*h));r=$.canvas,a.set(o,r),1!=h&&$.scale(h,h),$.font=u.font,n&&($.strokeStyle=s.strokeStyle,$.lineWidth=f*(t$4.has.SAFARI?h:1),$.lineCap=s.lineCap,$.lineJoin=s.lineJoin,$.miterLimit=s.miterLimit,t$4.has.CANVAS_LINE_DASH&&s.lineDash.length&&($.setLineDash(s.lineDash),$.lineDashOffset=s.lineDashOffset)),i&&($.fillStyle=l.fillStyle),$.textBaseline="middle",$.textAlign="center";var b,T=.5-d,C=d*r.width/h+T*f;if(n)for(b=0;b<_;++b)$.strokeText(p[b],C+T*m[b],.5*(f+x)+b*x);if(i)for(b=0;b<_;++b)$.fillText(p[b],C+T*m[b],.5*(f+x)+b*x)}return a.get(o)},t$4.render.canvas.TextReplay.prototype.drawTextImage_=function(e,t,i){var n=this.textState_,r=this.textStrokeState_,o=this.pixelRatio,a=t$4.render.replay.TEXT_ALIGN[n.textAlign||t$4.render.canvas.defaultTextAlign],s=t$4.render.replay.TEXT_ALIGN[n.textBaseline],l=r&&r.lineWidth?r.lineWidth:0,u=a*e.width/o+2*(.5-a)*l,c=s*e.height/o+2*(.5-s)*l;this.instructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,t,i,e,(u-this.textOffsetX_)*o,(c-this.textOffsetY_)*o,this.declutterGroup_,e.height,1,0,0,this.textRotateWithView_,this.textRotation_,1,!0,e.width,n.padding==t$4.render.canvas.defaultPadding?t$4.render.canvas.defaultPadding:n.padding.map((function(e){return e*o})),!!n.backgroundFill,!!n.backgroundStroke]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,t,i,e,(u-this.textOffsetX_)*o,(c-this.textOffsetY_)*o,this.declutterGroup_,e.height,1,0,0,this.textRotateWithView_,this.textRotation_,1/o,!0,e.width,n.padding,!!n.backgroundFill,!!n.backgroundStroke])},t$4.render.canvas.TextReplay.prototype.drawChars_=function(e,t,i){var n=this.textStrokeState_,r=this.textState_,o=this.textFillState_,a=this.strokeKey_;n&&(a in this.strokeStates||(this.strokeStates[a]={strokeStyle:n.strokeStyle,lineCap:n.lineCap,lineDashOffset:n.lineDashOffset,lineWidth:n.lineWidth,lineJoin:n.lineJoin,miterLimit:n.miterLimit,lineDash:n.lineDash}));var s=this.textKey_;this.textKey_ in this.textStates||(this.textStates[this.textKey_]={font:r.font,textAlign:r.textAlign||t$4.render.canvas.defaultTextAlign,scale:r.scale});var l=this.fillKey_;o&&(l in this.fillStates||(this.fillStates[l]={fillStyle:o.fillStyle}));var u=this.pixelRatio,c=t$4.render.replay.TEXT_ALIGN[r.textBaseline],h=this.textOffsetY_*u,d=this.text_,f=r.font,p=r.scale,_=n?n.lineWidth*p/2:0,m=this.widths_[f];m||(this.widths_[f]=m={}),this.instructions.push([t$4.render.canvas.Instruction.DRAW_CHARS,e,t,c,i,r.overflow,l,r.maxAngle,function(e){var t=m[e];return t||(t=m[e]=t$4.render.canvas.measureTextWidth(f,e)),t*p*u},h,a,_*u,d,s,1]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_CHARS,e,t,c,i,r.overflow,l,r.maxAngle,function(e){var t=m[e];return t||(t=m[e]=t$4.render.canvas.measureTextWidth(f,e)),t*p},h,a,_,d,s,1/u])},t$4.render.canvas.TextReplay.prototype.setTextStyle=function(e,t){var i,n,r;if(e){this.declutterGroup_=t;var o=e.getFill();o?((n=this.textFillState_)||(n=this.textFillState_={}),n.fillStyle=t$4.colorlike.asColorLike(o.getColor()||t$4.render.canvas.defaultFillStyle)):n=this.textFillState_=null;var a=e.getStroke();if(a){(r=this.textStrokeState_)||(r=this.textStrokeState_={});var s=a.getLineDash(),l=a.getLineDashOffset(),u=a.getWidth(),c=a.getMiterLimit();r.lineCap=a.getLineCap()||t$4.render.canvas.defaultLineCap,r.lineDash=s?s.slice():t$4.render.canvas.defaultLineDash,r.lineDashOffset=void 0===l?t$4.render.canvas.defaultLineDashOffset:l,r.lineJoin=a.getLineJoin()||t$4.render.canvas.defaultLineJoin,r.lineWidth=void 0===u?t$4.render.canvas.defaultLineWidth:u,r.miterLimit=void 0===c?t$4.render.canvas.defaultMiterLimit:c,r.strokeStyle=t$4.colorlike.asColorLike(a.getColor()||t$4.render.canvas.defaultStrokeStyle)}else r=this.textStrokeState_=null;i=this.textState_;var h=e.getFont()||t$4.render.canvas.defaultFont,d=e.getScale();i.overflow=e.getOverflow(),i.font=h,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.textBaseline=e.getTextBaseline()||t$4.render.canvas.defaultTextBaseline,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||t$4.render.canvas.defaultPadding,i.scale=void 0===d?1:d;var f=e.getOffsetX(),p=e.getOffsetY(),_=e.getRotateWithView(),m=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===p?0:p,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0===m?0:m,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:t$4.getUid(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+t$4.getUid(n.fillStyle):""}else this.text_=""},t$4.render.canvas.ReplayGroup=function(e,t,i,n,r,o,a){t$4.render.ReplayGroup.call(this),this.declutterTree_=o,this.declutterGroup_=null,this.tolerance_=e,this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=i,this.renderBuffer_=a,this.replaysByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=t$4.transform.create()},t$4.inherits(t$4.render.canvas.ReplayGroup,t$4.render.ReplayGroup),t$4.render.canvas.ReplayGroup.circleArrayCache_={0:[[!0]]},t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_=function(e,t,i){var n,r=Math.floor(e.length/2);if(t>=r)for(n=r;n<t;n++)e[n][i]=!0;else if(t<r)for(n=t+1;n<r;n++)e[n][i]=!0},t$4.render.canvas.ReplayGroup.getCircleArray_=function(e){if(void 0!==t$4.render.canvas.ReplayGroup.circleArrayCache_[e])return t$4.render.canvas.ReplayGroup.circleArrayCache_[e];for(var t=2*e+1,i=new Array(t),n=0;n<t;n++)i[n]=new Array(t);for(var r=e,o=0,a=0;r>=o;)t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+r,e+o),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+o,e+r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-o,e+r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-r,e+o),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-r,e-o),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-o,e-r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+o,e-r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+r,e-o),2*((a+=1+2*++o)-r)+1>0&&(a+=1-2*(r-=1));return t$4.render.canvas.ReplayGroup.circleArrayCache_[e]=i,i},t$4.render.canvas.ReplayGroup.replayDeclutter=function(e,t,i){for(var n=Object.keys(e).map(Number).sort(t$4.array.numberSafeCompareFunction),r={},o=0,a=n.length;o<a;++o)for(var s=e[n[o].toString()],l=0,u=s.length;l<u;){var c=s[l++],h=s[l++];c.replay(t,h,i,r)}},t$4.render.canvas.ReplayGroup.prototype.addDeclutter=function(e){var t=null;return this.declutterTree_&&(e?(t=this.declutterGroup_)[4]++:(t=this.declutterGroup_=t$4.extent.createEmpty()).push(1)),t},t$4.render.canvas.ReplayGroup.prototype.clip=function(e,t){var i=this.getClipCoords(t);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()},t$4.render.canvas.ReplayGroup.prototype.hasReplays=function(e){for(var t in this.replaysByZIndex_)for(var i=this.replaysByZIndex_[t],n=0,r=e.length;n<r;++n)if(e[n]in i)return!0;return!1},t$4.render.canvas.ReplayGroup.prototype.finish=function(){var e;for(e in this.replaysByZIndex_){var t,i=this.replaysByZIndex_[e];for(t in i)i[t].finish()}},t$4.render.canvas.ReplayGroup.prototype.forEachFeatureAtCoordinate=function(e,t,i,n,r,o,a){var s,l=2*(n=Math.round(n))+1,u=t$4.transform.compose(this.hitDetectionTransform_,n+.5,n+.5,1/t,-1/t,-i,-e[0],-e[1]),c=this.hitDetectionContext_;c.canvas.width!==l||c.canvas.height!==l?(c.canvas.width=l,c.canvas.height=l):c.clearRect(0,0,l,l),void 0!==this.renderBuffer_&&(s=t$4.extent.createEmpty(),t$4.extent.extendCoordinate(s,e),t$4.extent.buffer(s,t*(this.renderBuffer_+n),s));var h,d,f=t$4.render.canvas.ReplayGroup.getCircleArray_(n);function p(e){for(var t=c.getImageData(0,0,l,l).data,i=0;i<l;i++)for(var n=0;n<l;n++)if(f[i][n]&&t[4*(n*l+i)+3]>0){var r;return(!(h&&(d==t$4.render.ReplayType.IMAGE||d==t$4.render.ReplayType.TEXT))||-1!==h.indexOf(e))&&(r=o(e)),r?r:void c.clearRect(0,0,l,l)}}this.declutterTree_&&(h=this.declutterTree_.all().map((function(e){return e.value})));var _,m,g,x,v,y=Object.keys(this.replaysByZIndex_).map(Number);for(y.sort(t$4.array.numberSafeCompareFunction),_=y.length-1;_>=0;--_){var $=y[_].toString();for(g=this.replaysByZIndex_[$],m=t$4.render.replay.ORDER.length-1;m>=0;--m)if(void 0!==(x=g[d=t$4.render.replay.ORDER[m]]))if(!a||d!=t$4.render.ReplayType.IMAGE&&d!=t$4.render.ReplayType.TEXT){if(v=x.replayHitDetection(c,u,i,r,p,s))return v}else{var b=a[$];b?b.push(x,u.slice(0)):a[$]=[x,u.slice(0)]}}},t$4.render.canvas.ReplayGroup.prototype.getClipCoords=function(e){var t=this.maxExtent_,i=t[0],n=t[1],r=t[2],o=t[3],a=[i,n,i,o,r,o,r,n];return t$4.geom.flat.transform.transform2D(a,0,8,2,e,a),a},t$4.render.canvas.ReplayGroup.prototype.getReplay=function(e,t){var i=void 0!==e?e.toString():"0",n=this.replaysByZIndex_[i];void 0===n&&(n={},this.replaysByZIndex_[i]=n);var r=n[t];void 0===r&&(r=new(0,t$4.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_[t])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_),n[t]=r);return r},t$4.render.canvas.ReplayGroup.prototype.getReplays=function(){return this.replaysByZIndex_},t$4.render.canvas.ReplayGroup.prototype.isEmpty=function(){return t$4.obj.isEmpty(this.replaysByZIndex_)},t$4.render.canvas.ReplayGroup.prototype.replay=function(e,t,i,n,r,o){var a=Object.keys(this.replaysByZIndex_).map(Number);a.sort(t$4.array.numberSafeCompareFunction),e.save(),this.clip(e,t);var s,l,u,c,h,d,f=r||t$4.render.replay.ORDER;for(s=0,l=a.length;s<l;++s){var p=a[s].toString();for(h=this.replaysByZIndex_[p],u=0,c=f.length;u<c;++u){var _=f[u];if(void 0!==(d=h[_]))if(!o||_!=t$4.render.ReplayType.IMAGE&&_!=t$4.render.ReplayType.TEXT)d.replay(e,t,i,n);else{var m=o[p];m?m.push(d,t.slice(0)):o[p]=[d,t.slice(0)]}}}e.restore()},t$4.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_={Circle:t$4.render.canvas.PolygonReplay,Default:t$4.render.canvas.Replay,Image:t$4.render.canvas.ImageReplay,LineString:t$4.render.canvas.LineStringReplay,Polygon:t$4.render.canvas.PolygonReplay,Text:t$4.render.canvas.TextReplay},t$4.renderer={},t$4.renderer.vector={},t$4.renderer.vector.defaultOrder=function(e,t){return t$4.getUid(e)-t$4.getUid(t)},t$4.renderer.vector.getSquaredTolerance=function(e,t){var i=t$4.renderer.vector.getTolerance(e,t);return i*i},t$4.renderer.vector.getTolerance=function(e,t){return t$4.SIMPLIFY_TOLERANCE*e/t},t$4.renderer.vector.renderCircleGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var a=e.getReplay(i.getZIndex(),t$4.render.ReplayType.CIRCLE);a.setFillStrokeStyle(r,o),a.drawCircle(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$4.renderer.vector.renderFeature=function(e,t,i,n,r,o){var a,s,l=!1;return(a=i.getImage())&&((s=a.getImageState())==t$4.ImageState.LOADED||s==t$4.ImageState.ERROR?a.unlistenImageChange(r,o):(s==t$4.ImageState.IDLE&&a.load(),s=a.getImageState(),a.listenImageChange(r,o),l=!0)),t$4.renderer.vector.renderFeature_(e,t,i,n),l},t$4.renderer.vector.renderFeature_=function(e,t,i,n){var r=i.getGeometryFunction()(t);if(r){var o=r.getSimplifiedGeometry(n);if(i.getRenderer())t$4.renderer.vector.renderGeometry_(e,o,i,t);else(0,t$4.renderer.vector.GEOMETRY_RENDERERS_[o.getType()])(e,o,i,t)}},t$4.renderer.vector.renderGeometry_=function(e,t,i,n){if(t.getType()!=t$4.geom.GeometryType.GEOMETRY_COLLECTION)e.getReplay(i.getZIndex(),t$4.render.ReplayType.DEFAULT).drawCustom(t,n,i.getRenderer());else for(var r=t.getGeometries(),o=0,a=r.length;o<a;++o)t$4.renderer.vector.renderGeometry_(e,r[o],i,n)},t$4.renderer.vector.renderGeometryCollectionGeometry_=function(e,t,i,n){var r,o,a=t.getGeometriesArray();for(r=0,o=a.length;r<o;++r){(0,t$4.renderer.vector.GEOMETRY_RENDERERS_[a[r].getType()])(e,a[r],i,n)}},t$4.renderer.vector.renderLineStringGeometry_=function(e,t,i,n){var r=i.getStroke();if(r){var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.LINE_STRING);o.setFillStrokeStyle(null,r),o.drawLineString(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!1)),s.drawText(t,n)}},t$4.renderer.vector.renderMultiLineStringGeometry_=function(e,t,i,n){var r=i.getStroke();if(r){var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.LINE_STRING);o.setFillStrokeStyle(null,r),o.drawMultiLineString(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!1)),s.drawText(t,n)}},t$4.renderer.vector.renderMultiPolygonGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(o||r){var a=e.getReplay(i.getZIndex(),t$4.render.ReplayType.POLYGON);a.setFillStrokeStyle(r,o),a.drawMultiPolygon(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$4.renderer.vector.renderPointGeometry_=function(e,t,i,n){var r=i.getImage();if(r){if(r.getImageState()!=t$4.ImageState.LOADED)return;var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.IMAGE);o.setImageStyle(r,e.addDeclutter(!1)),o.drawPoint(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!!r)),s.drawText(t,n)}},t$4.renderer.vector.renderMultiPointGeometry_=function(e,t,i,n){var r=i.getImage();if(r){if(r.getImageState()!=t$4.ImageState.LOADED)return;var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.IMAGE);o.setImageStyle(r,e.addDeclutter(!1)),o.drawMultiPoint(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!!r)),s.drawText(t,n)}},t$4.renderer.vector.renderPolygonGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var a=e.getReplay(i.getZIndex(),t$4.render.ReplayType.POLYGON);a.setFillStrokeStyle(r,o),a.drawPolygon(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$4.renderer.vector.GEOMETRY_RENDERERS_={Point:t$4.renderer.vector.renderPointGeometry_,LineString:t$4.renderer.vector.renderLineStringGeometry_,Polygon:t$4.renderer.vector.renderPolygonGeometry_,MultiPoint:t$4.renderer.vector.renderMultiPointGeometry_,MultiLineString:t$4.renderer.vector.renderMultiLineStringGeometry_,MultiPolygon:t$4.renderer.vector.renderMultiPolygonGeometry_,GeometryCollection:t$4.renderer.vector.renderGeometryCollectionGeometry_,Circle:t$4.renderer.vector.renderCircleGeometry_},Object.defineProperties(r$a.prototype,{clock:{get:function(){return this._clock}}}),r$a.prototype.synchronize=function(){var e=this._clock;this.systemTime=a$15.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate},r$a.prototype.isDestroyed=function(){return!1},r$a.prototype.destroy=function(){this._eventHelper.removeAll(),i$10(this)};var o$4={};function c$5(e,t,i,n,r){return i.call(n,e[t]),ce$1.getObservable(e,t).subscribe(i,n,r)}function r$9(e,t){if(!e$2b(e))throw new t$16("command is required.");this._command=e,t=u$_(t,u$_.EMPTY_OBJECT),this.toggled=u$_(t.toggled,!1),this.tooltip=u$_(t.tooltip,""),ce$1.track(this,["toggled","tooltip"])}o$4.createCheckbox=function(e,t,i){o$1q.typeOf.string("labelText",e),o$1q.typeOf.string("checkedBinding",t);var n=document.createElement("div"),r=document.createElement("label"),o=document.createElement("input");o.type="checkbox";var a="checked: "+t;return e$2b(i)&&(a+=", enable: "+i),o.setAttribute("data-bind",a),r.appendChild(o),r.appendChild(document.createTextNode(e)),n.appendChild(r),n},o$4.createSection=function(e,t,i,n){o$1q.defined("panel",e),o$1q.typeOf.string("headerText",t),o$1q.typeOf.string("sectionVisibleBinding",i),o$1q.typeOf.string("toggleSectionVisibilityBinding",n);var r=document.createElement("div");r.className="supermap3d-cesiumInspector-section",r.setAttribute("data-bind",'css: { "supermap3d-cesiumInspector-section-collapsed": !'+i+" }"),e.appendChild(r);var o=document.createElement("h3");o.className="supermap3d-cesiumInspector-sectionHeader",o.appendChild(document.createTextNode(t)),o.setAttribute("data-bind","click: "+n),r.appendChild(o);var a=document.createElement("div");return a.className="supermap3d-cesiumInspector-sectionContent",r.appendChild(a),a},Object.defineProperties(r$9.prototype,{command:{get:function(){return this._command}}});var _0xa87f4e=(_0x3731f8=!0,function(e,t){var i=_0x3731f8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3731f8=!1,i}),_0x583bcd=_0xa87f4e(void 0,(function(){return _0x583bcd.toString().search("(((.+)+)+)+$").toString().constructor(_0x583bcd).search("(((.+)+)+)+$")})),_0x3731f8;function _0xb93137(e){this.clampMode=0,this.handlerDis=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.Distance,this.clampMode),this.handlerArea=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.Area,this.clampMode),this.handlerHeight=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.DVH)}_0x583bcd(),_0xb93137.prototype.calDistance=function(){this.handlerDis.measureEvt.addEventListener(function(e){var t=Number(e.distance),i=t>1e3?(t/1e3).toFixed(2)+"km":t.toFixed(2)+"m";this.handlerDis.disLabel.text=WebGLPlot.plotI18n("Distance")+":"+i}.bind(this)),this.deactiveAll(),this.handlerDis&&this.handlerDis.activate()},_0xb93137.prototype.calArea=function(){this.handlerArea.measureEvt.addEventListener(function(e){var t=Number(e.area),i=t>1e6?(t/1e6).toFixed(2)+"km²":t.toFixed(2)+"㎡";this.handlerArea.areaLabel.text=WebGLPlot.plotI18n("Area")+":"+i}.bind(this)),this.deactiveAll(),this.handlerArea&&this.handlerArea.activate()},_0xb93137.prototype.calHeight=function(){this.handlerHeight.measureEvt.addEventListener((e=>{var t=e.distance>1e3?(e.distance/1e3).toFixed(2)+"km":e.distance+"m",i=e.verticalHeight>1e3?(e.verticalHeight/1e3).toFixed(2)+"km":e.verticalHeight+"m",n=e.horizontalDistance>1e3?(e.horizontalDistance/1e3).toFixed(2)+"km":e.horizontalDistance+"m";this.handlerHeight.disLabel.text=WebGLPlot.plotI18n("SpaceDistance")+":"+t,this.handlerHeight.vLabel.text=WebGLPlot.plotI18n("VerticalHeight")+":"+i,this.handlerHeight.hLabel.text=WebGLPlot.plotI18n("LevelDistance")+":"+n})),this.handlerHeight.clear(),this.deactiveAll(),this.handlerHeight&&this.handlerHeight.activate()},_0xb93137.prototype.clear=function(){this.deactiveAll(),this.handlerDis&&this.handlerDis.clear(),this.handlerArea&&this.handlerArea.clear(),this.handlerHeight&&this.handlerHeight.clear()},_0xb93137.prototype.deactiveAll=function(){this.handlerDis&&this.handlerDis.deactivate(),this.handlerArea&&this.handlerArea.deactivate(),this.handlerHeight&&this.handlerHeight.deactivate()};var _0x54732d=(_0x251f19=!0,function(e,t){var i=_0x251f19?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x251f19=!1,i}),_0x35bb96=_0x54732d(void 0,(function(){return _0x35bb96.toString().search("(((.+)+)+)+$").toString().constructor(_0x35bb96).search("(((.+)+)+)+$")})),_0x251f19;_0x35bb96();var _0x587d2b=null,_0xa2eedc=null;function _0x3d592b(e){this.sightline=new WebGLPlot.Sightline(e.scene),this.handlerPoint=new WebGLPlot.DrawHandler(e,WebGLPlot.DrawMode.Point),this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.scene.canvas),this.sightline.lineWidth=5,this.sightline.build(),this.num=0,this.viewer=e,_0x587d2b=this.sightline,_0xa2eedc=this.num}function _0x40d728(e){_0xa2eedc+=1;var t=_0x28b2e6(e),i="point"+_0xa2eedc;_0x587d2b.addTargetPoint({position:t,name:i})}function _0x28b2e6(e){var t=WebGLPlot.Cartographic.fromCartesian(e);return[WebGLPlot.CesiumMath.toDegrees(t.longitude),WebGLPlot.CesiumMath.toDegrees(t.latitude),t.height]}_0x3d592b.prototype.activate=function(){var e=!0;if(this.sightline.removeAllTargetPoint(),this.handlerPoint.clear(),this.num=0,!this.handlerPoint.active){var t=null;this.handlerPoint.activate(),this.handlerPoint.drawEvt.addEventListener(function(i){var n=_0x28b2e6(i.object.position);this.sightline.viewPosition=n,e=!1,t=i}.bind(this)),this.handler.setInputAction(function(i){e||t||_0x40d728(this.viewer.scene.pickPosition(i.position));t=null}.bind(this),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction(function(t){if(!e){var i=this.viewer.scene.pickPosition(t.endPosition);if(this.num>0){this.sightline.removeAllTargetPoint("point0");var n=Cartesian2toDegress(i);sightline.addTargetPoint({position:n,name:"point0"})}}}.bind(this),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(){e||(this.viewer.enableCursorStyle=!0,this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK))}.bind(this),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}},_0x3d592b.prototype.clear=function(){this.handlerPoint.deactivate(),this.handlerPoint.clear(),this.num=0,this.viewer.entities.removeAll(),this.sightline.removeAllTargetPoint()},_0x3d592b.prototype.deactivate=function(){this.handlerPoint.deactivate()};var _0x2d4119=(_0x37b7b7=!0,function(e,t){var i=_0x37b7b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37b7b7=!1,i}),_0x499d96=_0x2d4119(void 0,(function(){return _0x499d96.toString().search("(((.+)+)+)+$").toString().constructor(_0x499d96).search("(((.+)+)+)+$")})),_0x37b7b7;function _0x2178ea(e){(WebGLPlot.ViewShed3D||WebGLPlot.DrawHandler)&&(this.pointHandler=new WebGLPlot.DrawHandler(e,WebGLPlot.DrawMode.Point),this.viewshed3D=new WebGLPlot.ViewShed3D(e.scene)),this.viewer=e,this.handler=new WebGLPlot.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.viewer.scene.ViewFlag=!0,this.viewPosition=null}_0x499d96(),_0x2178ea.prototype.activate=function(){this.pointHandler.active||(this.viewshed3D.distance=.1,this.viewer.scene.ViewFlag=!0,this.pointHandler.activate(),this.handler.setInputAction(function(e){if(!this.viewer.scene.ViewFlag){var t=e.endPosition,i=this.viewer.scene.pickPosition(t);if(WebGLPlot.Cartesian3.distance(this.viewPosition,i)>0){var n=WebGLPlot.Cartographic.fromCartesian(i),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=n.height;this.viewshed3D.setDistDirByPoint([r,o,a])}}}.bind(this),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(e){this.viewer.scene.ViewFlag=!0}.bind(this),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this.handler.setInputAction(function(e){!this.viewer.scene.ViewFlag&&.1!==this.viewshed3D.distance&&(this.viewer.scene.ViewFlag=!0)}.bind(this),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.pointHandler.drawEvt.addEventListener(function(e){var t=e.object,i=t.position;this.viewPosition=i;var n=WebGLPlot.Cartographic.fromCartesian(i),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=n.height+1.8;t.position=WebGLPlot.Cartesian3.fromDegrees(r,o,a),this.viewer.scene.ViewFlag&&(this.viewshed3D.viewPosition=[r,o,a],this.viewshed3D.build(),this.viewer.scene.ViewFlag=!1)}.bind(this)))},_0x2178ea.prototype.clear=function(){this.viewer.entities.removeAll(),this.viewshed3D.distance=.1,this.viewer.scene.ViewFlag=!0,this.pointHandler.clear()},_0x2178ea.prototype.deactivate=function(){this.pointHandler.deactivate(),this.viewer.scene.ViewFlag=!0};var _0x364c4d=(_0x6852f8=!0,function(e,t){var i=_0x6852f8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6852f8=!1,i}),_0x268409=_0x364c4d(void 0,(function(){return _0x268409.toString().search("(((.+)+)+)+$").toString().constructor(_0x268409).search("(((.+)+)+)+$")})),_0x6852f8;function _0x56988a(e){if(!WebGLPlot.DrawHandler&&!WebGLPlot.SlopeSetting)throw new WebGLPlot.DeveloperError("SuperMap_DrawHandler SlopeSetting is required.");this.viewer=e,this.handlerPolygon=new WebGLPlot.DrawHandler(this.viewer,WebGLPlot.DrawMode.Polygon,1),this.slope=new WebGLPlot.SlopeSetting;var t=_0x3f4cb8(this.viewer._element);this.handlerPolygon.activeEvt.addEventListener(function(e){1==e?(this.viewer.enableCursorStyle=!1,this.viewer._element.style.cursor="crosshair"):(this.viewer.enableCursorStyle=!0,this.viewer._element.style.cursor="")}.bind(this)),this.handlerPolygon.movingEvt.addEventListener((function(e){e.x<200&&e.y<150&&t.setVisible(!1)})),this.handlerPolygon.drawEvt.addEventListener(function(e){if(e.object.positions){var i=[].concat(e.object.positions);t.setVisible(!1);for(var n=[],r=0,o=i.length;r<o;r++){var a=WebGLPlot.Cartographic.fromCartesian(i[r]),s=WebGLPlot.CesiumMath.toDegrees(a.longitude),l=WebGLPlot.CesiumMath.toDegrees(a.latitude),u=a.height;-1==n.indexOf(s)&&-1==n.indexOf(l)&&(n.push(s),n.push(l),n.push(u))}this.slope.CoverageArea=n;var c=WebGLPlot.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION;this.viewer.scene.globe.SlopeSetting={slopeSetting:this.slope,analysisMode:c},this.handlerPolygon.polygon.show=!1,this.handlerPolygon.polyline.show=!0,this.handlerPolygon.deactivate(),this.handlerPolygon.activate()}else this.clear()}.bind(this))}function _0x3f4cb8(e){var t=function(e){var t=document.createElement("DIV");t.className="twipsy right";var i=document.createElement("DIV");i.className="twipsy-arrow",t.appendChild(i);var n=document.createElement("DIV");n.className="twipsy-inner",t.appendChild(n),this._div=t,this._title=n,this.message="",e.appendChild(t);var r=this;t.onmousemove=function(e){r.showAt({x:e.clientX,y:e.clientY},r.message)}};return t.prototype.setVisible=function(e){this._div.style.display=e?"block":"none"},t.prototype.showAt=function(e,t){e&&t&&(this.setVisible(!0),this._title.innerHTML=t,this._div.style.left=e.x+10+"px",this._div.style.top=e.y-this._div.clientHeight/2+"px",this.message=t)},new t(e)}_0x268409(),_0x56988a.prototype.activate=function(){if(this.slope){this.slope.DisplayMode=WebGLPlot.SlopeSettingEnum.DisplayMode.FACE_AND_ARROW,this.slope.MaxVisibleValue=78,this.slope.MinVisibleValue=0;var e=new WebGLPlot.ColorTable;e.insert(80,new WebGLPlot.Color(1,0,0)),e.insert(50,new WebGLPlot.Color(221/255,224/255,7/255)),e.insert(30,new WebGLPlot.Color(20/255,187/255,18/255)),e.insert(20,new WebGLPlot.Color(0,161/255,1)),e.insert(0,new WebGLPlot.Color(9/255,9/255,1)),this.slope.ColorTable=e,this.slope.Opacity=.5,this.handlerPolygon.activate()}},_0x56988a.prototype.deactivate=function(){this.handlerPolygon.deactivate()},_0x56988a.prototype.clear=function(){!this.slope||(this.slope.CoverageArea=[],null!=this.viewer.scene.globe.SlopeSetting.slopeSetting&&(this.viewer.scene.globe.SlopeSetting={slopeSetting:this.slope,analysisMode:WebGLPlot.HypsometricSettingEnum.AnalysisRegionMode.ARM_NONE},this.handlerPolygon.clear(),this.handlerPolygon.deactivate()))};var _0x1d1ba6=(_0xe6c09c=!0,function(e,t){var i=_0xe6c09c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe6c09c=!1,i}),_0x19a35e=_0x1d1ba6(void 0,(function(){return _0x19a35e.toString().search("(((.+)+)+)+$").toString().constructor(_0x19a35e).search("(((.+)+)+)+$")})),_0xe6c09c;function _0x9a5fe0(e){null!=e&&(this.measurementTool=new _0xb93137(e),this.sightLineTool=new _0x3d592b(e),this.viewshedTool=new _0x2178ea(e),this.terrainSlopeTool=new _0x56988a(e))}_0x19a35e(),_0x9a5fe0.prototype.activeDisMeasure=function(){this.measurementTool.calDistance()},_0x9a5fe0.prototype.activeAreaMeasure=function(){this.measurementTool.calArea()},_0x9a5fe0.prototype.activeHeightMeasure=function(){this.measurementTool.calHeight()},_0x9a5fe0.prototype.activeSightLine=function(){this.sightLineTool.activate()},_0x9a5fe0.prototype.activeViewShed=function(){this.viewshedTool.activate()},_0x9a5fe0.prototype.activeTerrainSlope=function(){this.terrainSlopeTool.activate()},_0x9a5fe0.prototype.clear=function(){this.measurementTool.clear(),this.sightLineTool.clear(),this.viewshedTool.clear(),this.terrainSlopeTool.clear()},_0x9a5fe0.prototype.deactivate=function(){this.measurementTool.deactiveAll(),this.sightLineTool.deactivate(),this.viewshedTool.deactivate(),this.terrainSlopeTool.deactivate()};var _0x1445f0=(_0x4549f1=!0,function(e,t){var i=_0x4549f1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4549f1=!1,i}),_0x50ac08=_0x1445f0(void 0,(function(){return _0x50ac08.toString().search("(((.+)+)+)+$").toString().constructor(_0x50ac08).search("(((.+)+)+)+$")})),_0x4549f1;function _0x202b10(){this._code=_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,this._symbolName=WebGLPlot.plotI18n("polygon"),this._minEditPts=3,this._maxEditPts=9999}_0x50ac08(),_0x202b10.prototype.getMinEditPts=function(){return this._minEditPts},_0x202b10.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x202b10.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;for(var i=[],n=0;n<t.length;++n)i.push(t[n].clone());return i.push(t[0].clone()),new _0x526be0({symbolType:this._symbolType,points:i})},_0x202b10.prototype.getSymbolName=function(){return this._symbolName};var _0x16bb63=(_0x4239c3=!0,function(e,t){var i=_0x4239c3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4239c3=!1,i}),_0x575a36=_0x16bb63(void 0,(function(){return _0x575a36.toString().search("(((.+)+)+)+$").toString().constructor(_0x575a36).search("(((.+)+)+)+$")})),_0x4239c3;function _0x3f02c6(){this._code=_0x18bc2f.SYMBOL_BRACE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_BRACE,this._symbolName=WebGLPlot.plotI18n("brace"),this._minEditPts=2,this._maxEditPts=2,this._scaleValues=[],this._scaleValues.push(.1),this._scaleValues.push(.1),this._scalePoints=[]}_0x575a36(),_0x3f02c6.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x3f02c6.prototype.getMinEditPts=function(){return this._minEditPts},_0x3f02c6.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2===t.length&&_0x2d6822.isSamePt(t[0],t[1]))return null;for(var i=[],n=0;n<t.length;++n)i.push(t[n].clone());i.length;var r=i[0],o=i[1],a=_0x2d6822.distance(r,o);this._scaleValues.length<2&&(this._scaleValues=[],this._scaleValues.push(.1),this._scaleValues.push(.1));var s=this._scaleValues[0],l=this._scaleValues[1],u=new WebGLPlot.Cartesian3(a*s,a*s,0),c=new WebGLPlot.Cartesian3(a*(.5-l/2),0,0),h=new WebGLPlot.Cartesian3(.5*a,-a*l,0),d=new WebGLPlot.Cartesian3(a*(.5+l/2),0,0),f=new WebGLPlot.Cartesian3(a*(1-s),a*s,0),p=[],_=180*Math.PI/180,m=270*Math.PI/180,g=3*Math.PI/180;for(n=_;n<=m;n+=g){var x=new WebGLPlot.Cartesian3(u.x+a*s,u.y,0);x=_0x2d6822.rotateAngle(u,n,x),p.push(x)}p.push(c),p.push(h),p.push(d),_=270*Math.PI/180,m=360*Math.PI/180;for(n=_;n<=m;n+=g){x=new WebGLPlot.Cartesian3(f.x+a*s,f.y,0);x=_0x2d6822.rotateAngle(f,n,x),p.push(x)}for(var v=_0x2d6822.radian(r,o),y=[],$=0;$<p.length;$++){var b=new WebGLPlot.Cartesian3(p[$].x+r.x,p[$].y+r.y,0);b=_0x2d6822.rotateAngle(r,v,b),y.push(b)}var T=new _0x526be0({points:y,symbolType:_0x18bc2f.SYMBOL_POLYLINE}),C=new WebGLPlot.Cartesian3(a*s,0,0),S=new WebGLPlot.Cartesian3(C.x+r.x,C.y+r.y,0);S=_0x2d6822.rotateAngle(r,v,S),this._scalePoints.push(S);var w=new WebGLPlot.Cartesian3(h.x+r.x,h.y+r.y,0);return w=_0x2d6822.rotateAngle(r,v,w),this._scalePoints.push(w),T},_0x3f02c6.prototype.modifyScalePoint=function(e,t,i){var n=e.points,r=_0x2d6822.distance(n[0],n[1]);if(0===t){var o=_0x2d6822.distance(n[0],i)/r;o>0&&o<.4&&(this._scaleValues[0]=o)}else if(1===t){var a=new WebGLPlot.Cartesian3((n[0].x+n[1].x)/2,(n[0].y+n[1].y)/2,0);new WebGLPlot.Cartesian3(i.x,a.y,0);var s=_0x2d6822.distance(i,a)/r;0<s&&.2>s&&(this._scaleValues[1]=s)}return this.calculateParts({points:n})},_0x3f02c6.prototype.getSymbolName=function(){return this._symbolName};var _0x26d173=(_0x2be1da=!0,function(e,t){var i=_0x2be1da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2be1da=!1,i}),_0x31902d=_0x26d173(void 0,(function(){return _0x31902d.toString().search("(((.+)+)+)+$").toString().constructor(_0x31902d).search("(((.+)+)+)+$")})),_0x2be1da;function _0xc18e25(){this._code=_0x18bc2f.SYMBOL_CONCENTRICCIRCLE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_CONCENTRICCIRCLE,this._symbolName=WebGLPlot.plotI18n("concentricCircle"),this._startAngle=0,this._endAngle=360,this._minEditPts=3,this._maxEditPts=3}_0x31902d(),_0xc18e25.prototype.getMaxEditPts=function(){return this._maxEditPts},_0xc18e25.prototype.getMinEditPts=function(){return this._minEditPts},_0xc18e25.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;for(var t=[],i=0;i<e.points.length;++i)t.push(e.points[i].clone());if(t.length<this._minEditPts||2===t.length&&_0x2d6822.isSamePt(t[0],t[1]))return null;for(2===t.length&&t.push(t[1].clone());this._startAngle>360;)this._startAngle-=360;for(;this._startAngle<0;)this._startAngle+=360;for(;this._endAngle>360;)this._endAngle-=360;for(;this._endAngle<0;)this._endAngle+=360;for(;this._endAngle<this._startAngle;)this._endAngle+=360;for(var n=_0x2d6822.distance(t[0],t[1]),r=_0x2d6822.distance(t[0],t[2]),o=[],a=[],s=[],l=Math.PI/180,u=(this._endAngle-this._startAngle)/72,c=this._startAngle;c<this._endAngle+u/2;c+=u){var h=t[0].x+n*Math.cos(c*l),d=t[0].y+n*Math.sin(c*l),f=t[0].x+r*Math.cos(c*l),p=t[0].y+r*Math.sin(c*l);o.push(new WebGLPlot.Cartesian3(h,d,0)),a.push(new WebGLPlot.Cartesian3(f,p,0))}o.push(o[0].clone()),a.push(a[0].clone());var _=new _0x526be0({points:o,symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON});s.push(_);var m=new _0x526be0({points:a,symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON});return s.push(m),s},_0xc18e25.prototype.getSymbolName=function(){return this._symbolName};var _0x3ec0bf=(_0x1b716c=!0,function(e,t){var i=_0x1b716c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b716c=!1,i}),_0x1071d0=_0x3ec0bf(void 0,(function(){return _0x1071d0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1071d0).search("(((.+)+)+)+$")})),_0x1b716c;function _0x33d4e9(){this._code=_0x18bc2f.SYMBOL_CURVEEIGHT,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_CURVEEIGHT,this._symbolName=WebGLPlot.plotI18n("curveEight"),this._minEditPts=2,this._maxEditPts=3}_0x1071d0(),_0x33d4e9.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x33d4e9.prototype.getMinEditPts=function(){return this._minEditPts},_0x33d4e9.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2==t.length&&_0x2d6822.isSamePt(t[0],t[1]))return null;var i,n,r,o,a=[];if(2===t.length){var s=t[0].clone(),l=t[1].clone(),u=_0x2d6822.distance(s,l)/2,c=180*_0x2d6822.radian(s,l)/Math.PI,h=new WebGLPlot.Cartesian3((s.x+l.x)/2,(s.y+l.y)/2,0);i=_0x2d6822.circlePoint(h,u,u,c+90);a=[];var d=new _0x526be0({points:r=_0x2d6822.calcCirclePts(u,i),symbolType:_0x18bc2f.SYMBOL_CIRCLE});a.push(d),n=_0x2d6822.circlePoint(h,3*u,3*u,c+90);var f=new _0x526be0({points:o=_0x2d6822.calcCirclePts(u,n),symbolType:_0x18bc2f.SYMBOL_CIRCLE});a.push(f)}else{s=t[0],l=t[1];var p=t[2];c=0;c=_0x2d6822.isRight(p,s,l)?180*_0x2d6822.radian(l,s)/Math.PI+90:180*_0x2d6822.radian(s,l)/Math.PI+90;u=_0x2d6822.distance(s,l)/2,h=new WebGLPlot.Cartesian3((s.x+l.x)/2,(s.y+l.y)/2,0);i=_0x2d6822.circlePoint(h,u,u,c);var _=_0x2d6822.plumbLineLen(p,s,l);if(_<=4*u)n=_0x2d6822.circlePoint(h,3*u,3*u,c),r=_0x2d6822.calcCirclePts(u,i),a.push(new _0x526be0({points:r,symbolType:_0x18bc2f.SYMBOL_SYMBOL_ARBITRARYPOLYGON})),o=_0x2d6822.calcCirclePts(u,n),a.push(new _0x526be0({points:o,symbolType:_0x18bc2f.SYMBOL_SYMBOL_ARBITRARYPOLYGON}));else{n=_0x2d6822.circlePoint(h,_-u,_-u,c);for(var m=180*Math.acos(u/(_-2*u))/Math.PI,g=c-m,x=c-180+m,v=c-180-m+360,y=[],$=c+m-360;$<=g;$+=4){var b=_0x2d6822.circlePoint(i,u,u,$);y.push(b)}var T=_0x2d6822.circlePoint(i,u,u,g);y.push(T);var C=[];for($=x;$<v;$+=4){b=_0x2d6822.circlePoint(n,u,u,$);C.push(b)}var S=_0x2d6822.circlePoint(n,u,u,v);C.push(S);var w=[];w=w.concat(y);for($=C.length-1;$>=0;$--)w.push(C[$]);w.push(w[0].clone()),a.push(new _0x526be0({points:w,symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON}))}}return a},_0x33d4e9.prototype.getSymbolName=function(){return this._symbolName};var _0x17eb78=(_0x2a8509=!0,function(e,t){var i=_0x2a8509?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a8509=!1,i}),_0xb70f84=_0x17eb78(void 0,(function(){return _0xb70f84.toString().search("(((.+)+)+)+$").toString().constructor(_0xb70f84).search("(((.+)+)+)+$")})),_0x2a8509;function _0xab1d32(){this._code=_0x18bc2f.SYMBOL_KIDNEY,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_KIDNEY,this._symbolName=WebGLPlot.plotI18n("kidney"),this._minEditPts=2,this._maxEditPts=3}_0xb70f84(),_0xab1d32.prototype.getMaxEditPts=function(){return this._maxEditPts},_0xab1d32.prototype.getMinEditPts=function(){return this._minEditPts},_0xab1d32.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;return 2==t.length&&_0x2d6822.isSamePt(t[0],t[1])||t.length<this._minEditPts?null:new _0x526be0({points:_0x2d6822.generateKidneyShapePts(t),symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON})},_0xab1d32.prototype.getSymbolName=function(){return this._symbolName};var _0x2953e3=(_0x4bb7a5=!0,function(e,t){var i=_0x4bb7a5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4bb7a5=!1,i}),_0x661f53=_0x2953e3(void 0,(function(){return _0x661f53.toString().search("(((.+)+)+)+$").toString().constructor(_0x661f53).search("(((.+)+)+)+$")})),_0x4bb7a5;function _0x20f603(){this._code=_0x18bc2f.SYMBOL_PIE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_PIE,this._symbolName=WebGLPlot.plotI18n("sector"),this._maxEditPts=3,this._minEditPts=3}_0x661f53(),_0x20f603.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i,n=_0x2d6822.innerAngle(t[0],t[1],t[2]),r=_0x2d6822.distance(t[0],t[1]),o=_0x2d6822.radian(t[0],t[1]),a=_0x2d6822.radian(t[0],t[2]),s=[];return s.push(t[0]),(s=s.concat(_0x2d6822.generateArcSpatialData(t[0],r,r,n,o,a))).push(t[0]),0!==s.length&&(i=new _0x526be0({symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,points:s})),i},_0x20f603.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x20f603.prototype.getMinEditPts=function(){return this._minEditPts},_0x20f603.prototype.getSymbolName=function(){return this._symbolName};var _0x794b24=(_0x40eb33=!0,function(e,t){var i=_0x40eb33?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40eb33=!1,i}),_0xab1b36=_0x794b24(void 0,(function(){return _0xab1b36.toString().search("(((.+)+)+)+$").toString().constructor(_0xab1b36).search("(((.+)+)+)+$")})),_0x40eb33;function _0x5178a6(){this._code=_0x18bc2f.SYMBOL_POLYBEZIERCLOSED,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_POLYBEZIERCLOSED,this._symbolName=WebGLPlot.plotI18n("closedBesselCurve"),this._minEditPts=3,this._maxEditPts=9999}_0xab1b36(),_0x5178a6.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points,i=t.length;if(2==i&&_0x2d6822.isSamePt(t[0],t[1])||i<this._minEditPts)return null;for(var n=[],r=0;r<i;++r)n.push(t[r].clone());n.push(t[0].clone());var o=_0x2d6822.generateBezierCtrlPts(n),a=_0x2d6822.generateBezierPointsWithCtrlPts(o);return new _0x526be0({points:a=_0x2d6822.clearNextSamePts(a),symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON})},_0x5178a6.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5178a6.prototype.getMinEditPts=function(){return this._minEditPts},_0x5178a6.prototype.getSymbolName=function(){return this._symbolName};var _0x2cf3c4=(_0x17f683=!0,function(e,t){var i=_0x17f683?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17f683=!1,i}),_0x34001e=_0x2cf3c4(void 0,(function(){return _0x34001e.toString().search("(((.+)+)+)+$").toString().constructor(_0x34001e).search("(((.+)+)+)+$")})),_0x17f683;function _0x43c7a1(){this._code=_0x18bc2f.SYMBOL_POLYLINE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_POLYLINE,this._symbolName=WebGLPlot.plotI18n("polyLine"),this._minEditPts=2,this._maxEditPts=9999}_0x34001e(),_0x43c7a1.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;return null===t||t.length<this._minEditPts||t.length<this._minEditPts?null:new _0x526be0({symbolType:this._symbolType,points:t})},_0x43c7a1.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x43c7a1.prototype.getMinEditPts=function(){return this._minEditPts},_0x43c7a1.prototype.getSymbolName=function(){return this._symbolName};var _0x54c94d=(_0x35ff7d=!0,function(e,t){var i=_0x35ff7d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x35ff7d=!1,i}),_0x1637b9=_0x54c94d(void 0,(function(){return _0x1637b9.toString().search("(((.+)+)+)+$").toString().constructor(_0x1637b9).search("(((.+)+)+)+$")})),_0x35ff7d;function _0x3966c2(){this._code=_0x18bc2f.SYMBOL_REGULARPOLYGON,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_REGULARPOLYGON,this._symbolName=WebGLPlot.plotI18n("regularPolygon"),this._minEditPts=2,this._maxEditPts=9999}_0x1637b9(),_0x3966c2.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(null===t||t.length<this._minEditPts)return null;var i=[],n=t.length,r=2*Math.PI/(n+1),o=Math.PI/2,a=_0x2d6822.distance(t[0],t[n-1]),s=new WebGLPlot.Cartesian3(t[0].x+a,t[0].y,t[0].z).clone();s=_0x2d6822.rotateAngle(t[0],o,s),i.push(s.clone());for(var l=1;l<n+1;++l)s=_0x2d6822.rotateAngle(t[0],r,s),i.push(s.clone());return i.push(i[0]),new _0x526be0({symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,points:i})},_0x3966c2.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x3966c2.prototype.getMinEditPts=function(){return this._minEditPts},_0x3966c2.prototype.getSymbolName=function(){return this._symbolName};var _0x50e520=(_0xcb67d0=!0,function(e,t){var i=_0xcb67d0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xcb67d0=!1,i}),_0x571ce3=_0x50e520(void 0,(function(){return _0x571ce3.toString().search("(((.+)+)+)+$").toString().constructor(_0x571ce3).search("(((.+)+)+)+$")})),_0xcb67d0;function _0x575907(){this._code=_0x18bc2f.SYMBOL_RUNWAY,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_RUNWAY,this._symbolName=WebGLPlot.plotI18n("runway"),this._scalePoints=[],this._scaleValues=[],this._scaleValues.push(.2),this._minEditPts=2,this._maxEditPts=2}_0x571ce3(),_0x575907.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x575907.prototype.getMinEditPts=function(){return this._minEditPts},_0x575907.prototype.getSymbolName=function(){return this._symbolName},_0x575907.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2===t.length&&_0x2d6822.isSamePt(t[0],t[1]))return null;for(var i=t[0].clone(),n=t[1].clone(),r=_0x2d6822.distance(i,n)*this._scaleValues[0],o=_0x2d6822.parallel(t,r/2),a=_0x2d6822.parallel(t,-r/2),s=180*_0x2d6822.radian(i,n)/Math.PI,l=[],u=s+90;u<=s+270;u+=10){var c=_0x2d6822.circlePoint(i,r/2,r/2,u);l.push(c)}for(var h=[],d=s-90;d<=s+90;d+=10){c=_0x2d6822.circlePoint(n,r/2,r/2,d);h.push(c)}var f=[];f=(f=(f=(f=f.concat(l)).concat(a)).concat(h)).concat(o);var p=new _0x526be0({points:f=_0x2d6822.clearNextSamePts(f),symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON}),_=new WebGLPlot.Cartesian3(l[0].x,l[0].y,l[0].z);return this._scalePoints.push(_),p},_0x575907.prototype.modifyScalePoint=function(e,t,i){if(0==t){var n=_0x2d6822.distance(i,e.points[0]),r=_0x2d6822.distance(e.points[0],e.points[1]);this._scalePoints[0]=2*n/r}};var _0x321a03=(_0x53a191=!0,function(e,t){var i=_0x53a191?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53a191=!1,i}),_0x3f11a3=_0x321a03(void 0,(function(){return _0x3f11a3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f11a3).search("(((.+)+)+)+$")})),_0x53a191;function _0x1a7236(){this._code=_0x18bc2f.SYMBOL_TRAPEZOID,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_TRAPEZOID,this._symbolName=WebGLPlot.plotI18n("trapezoid"),this._minEditPts=3,this._maxEditPts=3}_0x3f11a3(),_0x1a7236.prototype.calculateParts=function(e){if(!defined(e)||!defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;t.length;var i=[],n=t[0].clone(),r=t[1].clone(),o=t[2].clone(),a=new WebGLPlot.Cartesian3(0,0,0);_0x2d6822.getTrapezoidPoints(1,o,r,n,a),i.push(n),i.push(r),i.push(o),i.push(a);var s,l=_0x2d6822.intersectLines(n,r,o,a),u=l.intersectPoint;return l.isIntersectLines&&(u.x>n.x&&u.x<r.x||u.y>n.y&&u.y<r.y||u.x<n.x&&u.x>r.x||u.y<n.y&&u.y>r.y)&&(i[0]=a,i[3]=n),4===i.length&&(i.push(i[0].clone()),s=new _0x526be0({symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,points:i})),s},_0x1a7236.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x1a7236.prototype.getMinEditPts=function(){return this._minEditPts},_0x1a7236.prototype.getSymbolName=function(){return this._symbolName};var _0x5bb3f2=(_0x58d644=!0,function(e,t){var i=_0x58d644?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x58d644=!1,i}),_0x220936=_0x5bb3f2(void 0,(function(){return _0x220936.toString().search("(((.+)+)+)+$").toString().constructor(_0x220936).search("(((.+)+)+)+$")})),_0x58d644;function _0x2004fc(){}_0x220936(),_0x2004fc.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%2525")).replace(/&/g,"%26");case Array:for(var i=[],n=0,r=t.length;n<r;n++)i.push(this.toJSON(t[n]));return"["+i.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){for(i=[],n=0,r=t.length;n<r;n++)i.push(this.toJSON(t[n]));return"["+i.join(",")+"]"}i=[];for(var o in t)"function"!=typeof t[o]&&"CLASS_NAME"!==o&&"parent"!==o&&i.push('"'+o+'":'+this.toJSON(t[o]));return i.length>0?"{"+i.join(",")+"}":"{}"}return t.toString()}},_0x2004fc.geoGraphicObjectToSmlFeature=function(e,t){return WebGLPlot.defined(e)?e.getSymbolData():null},_0x2004fc.smlFeatureToGeoGraphicObject=function(e,t){t.geoJsonToGeoGraphicObject(e)};var _0x21dba7=(_0x12c4c3=!0,function(e,t){var i=_0x12c4c3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12c4c3=!1,i}),_0x25c20c=_0x21dba7(void 0,(function(){return _0x25c20c.toString().search("(((.+)+)+)+$").toString().constructor(_0x25c20c).search("(((.+)+)+)+$")})),_0x12c4c3;function _0x3a5bf8(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.layerName=WebGLPlot.defaultValue(e.layerName,""),this.spatialAnalystUrl=WebGLPlot.defaultValue(e.spatialAnalystUrl,null),this.useCanvas2=WebGLPlot.defaultValue(e.useCanvas2,!1),this.useCanvas=WebGLPlot.defaultValue(e.useCanvas,!1),this.features=WebGLPlot.defaultValue(e.features,[])}_0x25c20c();var _0x36e36d=(_0x417ad4=!0,function(e,t){var i=_0x417ad4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x417ad4=!1,i}),_0x26b4a0=_0x36e36d(void 0,(function(){return _0x26b4a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x26b4a0).search("(((.+)+)+)+$")})),_0x417ad4;function _0x2293fb(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),WebGLPlot.Check.defined("options.url",e.url);var t=e.url,i=e.responseType,n=WebGLPlot.defaultValue(e.method,"GET"),r=e.data,o=e.headers,a=e.overrideMimeType;t=WebGLPlot.defaultValue(t,e.url);var s=WebGLPlot.defined(e.request)?e.request:new WebGLPlot.Request;return s.url=t,s.requestFunction=function(e){var l=WebGLPlot.when.defer(),u=_0x2293fb.load(WebGLPlot.defaultValue(e,t),i,n,r,o,l,a);return WebGLPlot.defined(u)&&WebGLPlot.defined(u.abort)&&(s.cancelFunction=function(){u.abort()}),l.promise},WebGLPlot.RequestScheduler.request(s)}_0x26b4a0();var _0x1a822c=/^data:(.*?)(;base64)?,(.*)$/;function _0x15d9d3(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function _0x1c6ff2(e,t){for(var i=_0x15d9d3(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return n}function _0x3eff49(e,t){t=WebGLPlot.defaultValue(t,"");var i=e[1],n=!!e[2],r=e[3];switch(t){case"":case"text":return _0x15d9d3(n,r);case"arraybuffer":return _0x1c6ff2(n,r);case"blob":var o=_0x1c6ff2(n,r);return new Blob([o],{type:i});case"document":return(new DOMParser).parseFromString(_0x15d9d3(n,r),i);case"json":return JSON.parse(_0x15d9d3(n,r));default:throw new WebGLPlot.DeveloperError("Unhandled responseType: "+t)}}_0x2293fb.load=function(e,t,i,n,r,o,a){var s=_0x1a822c.exec(e);if(null===s){var l=new XMLHttpRequest;if(WebGLPlot.TrustedServers.contains(e)&&(l.withCredentials=!0),WebGLPlot.defined(a)&&WebGLPlot.defined(l.overrideMimeType)&&l.overrideMimeType(a),l.open(i,e,!0),WebGLPlot.defined(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);WebGLPlot.defined(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,i=l.responseType;if(!WebGLPlot.defined(e)||WebGLPlot.defined(t)&&i!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===i||"document"===i)&&WebGLPlot.defined(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==i&&"text"!==i||!WebGLPlot.defined(l.responseText)?o.reject(new WebGLPlot.RuntimeError("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new WebGLPlot.RequestErrorEvent(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new WebGLPlot.RequestErrorEvent)},l.send(n),l}o.resolve(_0x3eff49(s,t))},_0x2293fb.defaultLoad=_0x2293fb.load;var _0x185da5=(_0x454349=!0,function(e,t){var i=_0x454349?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x454349=!1,i}),_0x5f4ed5=_0x185da5(void 0,(function(){return _0x5f4ed5.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f4ed5).search("(((.+)+)+)+$")})),_0x454349;function _0xdbaebe(e,t,i){return _0x2293fb({url:e,headers:t,request:i})}_0x5f4ed5();var _0x450b7f=(_0x3eedfe=!0,function(e,t){var i=_0x3eedfe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3eedfe=!1,i}),_0x10b7a0=_0x450b7f(void 0,(function(){return _0x10b7a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x10b7a0).search("(((.+)+)+)+$")})),_0x3eedfe;_0x10b7a0();var _0x2c1efb={Accept:"application/json,*/*;q=0.01"};function _0x2bb4f4(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("url is required.");WebGLPlot.defined(t)?WebGLPlot.defined(t.Accept)||((t=WebGLPlot.clone(t)).Accept=_0x2c1efb.Accept):t=_0x2c1efb;var n=_0xdbaebe(e,t,i);if(WebGLPlot.defined(n))return n.then((function(e){return JSON.parse(e)}))}var _0x278140=(_0x5b42c9=!0,function(e,t){var i=_0x5b42c9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b42c9=!1,i}),_0x5eb968=_0x278140(void 0,(function(){return _0x5eb968.toString().search("(((.+)+)+)+$").toString().constructor(_0x5eb968).search("(((.+)+)+)+$")})),_0x5b42c9;function _0x19562b(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.smlInfo=WebGLPlot.defaultValue(e.smlInfo,void 0),this.mapInfo=WebGLPlot.defaultValue(e.mapInfo,""),this.layerDatas=WebGLPlot.defaultValue(e.layerDatas,void 0)}_0x5eb968(),_0x19562b.prototype.destory=function(){this.smlInfo=null,this.mapInfo=null,this.layerDatas=null};var _0x401a25=(_0x2063ea=!0,function(e,t){var i=_0x2063ea?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2063ea=!1,i}),_0x1d25b0=_0x401a25(void 0,(function(){return _0x1d25b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d25b0).search("(((.+)+)+)+$")})),_0x2063ea;function _0x24c268(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.smlName=WebGLPlot.defaultValue(e.smlName,""),this.smlDesc=WebGLPlot.defaultValue(e.smlDesc,""),this.smlSeclevel=WebGLPlot.defaultValue(e.smlSeclevel,""),this.smlDepat=WebGLPlot.defaultValue(e.smlDepat,""),this.smlAuthor=WebGLPlot.defaultValue(e.smlAuthor,""),this.smlTime=WebGLPlot.defaultValue(e.smlTime,"")}_0x1d25b0(),_0x24c268.prototype.fromJSON=function(e){this.smlName=e.SMLName,this.smlDesc=e.SMLDesc,this.smlSeclevel=e.SMLSeclevel,this.smlDepat=e.SMLDepat,this.smlAuthor=e.SMLAuthor,this.smlTime=e.SMLTime},_0x24c268.prototype.toJSON=function(){return'{"SMLName":'+WebGLPlot.toJSON(this.smlName)+',"SMLDesc":'+WebGLPlot.toJSON(this.smlDesc)+',"SMLSeclevel":'+WebGLPlot.toJSON(this.smlSeclevel)+',"SMLDepat":'+WebGLPlot.toJSON(this.smlDepat)+',"SMLAuthor":'+WebGLPlot.toJSON(this.smlAuthor)+',"SMLTime":'+WebGLPlot.toJSON(this.smlTime)+"}"},_0x24c268.prototype.destroy=function(){this.smlName="",this.smlDesc="",this.smlAuthor="",this.smlSeclevel="",this.smlDepat="",this.smlTime=""};var _0x468ed3=(_0x4e2566=!0,function(e,t){var i=_0x4e2566?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e2566=!1,i}),_0x220aa6=_0x468ed3(void 0,(function(){return _0x220aa6.toString().search("(((.+)+)+)+$").toString().constructor(_0x220aa6).search("(((.+)+)+)+$")})),_0x4e2566;_0x220aa6();var WebGLPlot$a=window.WebGLPlot=window.WebGLPlot||{},_0x23bb64=new Map;function _0x29db2d(e){e=WebGLPlot$a.defaultValue(e,WebGLPlot$a.defaultValue.EMPTY_OBJECT),this._scene=WebGLPlot$a.defaultValue(e.scene,void 0),this._serverUrl=WebGLPlot$a.defaultValue(e.serverUrl,""),this._smlInfo=WebGLPlot$a.defaultValue(e.smlInfo,new _0x24c268),this._smlFileName=WebGLPlot$a.defaultValue(e.smlFileName,"situationMap"),this._sitData=WebGLPlot$a.defaultValue(e.sitData,new _0x19562b),this._openSmlFileCompleted=new WebGLPlot$a.Event,this._openSmlFileFailed=new WebGLPlot$a.Event,this._saveSmlFileCompleted=new WebGLPlot$a.Event,this._saveSmlFileFailed=new WebGLPlot$a.Event,this._getSmlInfosCompleted=new WebGLPlot$a.Event,this._getSmlInfosFailed=new WebGLPlot$a.Event,this._getSmlInfoCompleted=new WebGLPlot$a.Event,this._getSmlInfoFailed=new WebGLPlot$a.Event,this._deleteSmlFileCompleted=new WebGLPlot$a.Event,this._deleteSmlFileFailed=new WebGLPlot$a.Event,this._openLocalSmlFileCompleted=new WebGLPlot$a.Event,this._openLocalSmlFileFailed=new WebGLPlot$a.Event,this._addSmlFileCompleted=new WebGLPlot$a.Event,this._addSmlFileFailed=new WebGLPlot$a.Event,this._addSmlFileToLayerCompleted=new WebGLPlot$a.Event,this._addSmlFileToLayerFailed=new WebGLPlot$a.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},e.options&&e.options.serviceParams&&_0x2d6822.extend(this.options,e.options)}_0x29db2d.getInstance=function(e){let t;return e.scene&&(t=_0x23bb64.get(e.scene._plottingID)),WebGLPlot$a.defined(e)&&!WebGLPlot$a.defined(t)&&(t=new WebGLPlot$a.SitDataManager(e),_0x23bb64.set(e.scene._plottingID,t)),t},_0x29db2d.prototype.openJsonSitData=function(e,t){!WebGLPlot$a.defined(e)||null===e||((!WebGLPlot$a.defined(t)||""===t)&&(t="situationMap"),this._getCompletedInit(e,t))},_0x29db2d.prototype.openAndUploadLocalSmlFile=function(e){var t=this;this.uploadSmlFile((function(i){i.success?t.openSmlFileOnServer(i.smlFileName,e):t._openSmlFileFailed.raiseEvent()}))},_0x29db2d.prototype.openLocalSmlFile=function(){if(!window.FileReader)return;let e=document.createElement("input");e.setAttribute("type","file"),e.click(),e.onchange=function(){if(!e.files||0===e.files.length)return;let t=e.files[0].name;var i=new FileReader;i.readAsText(e.files[0]),i.onloadstart=function(e){(e.total>=5242880||e.total<=0)&&_self._openLocalSmlFileFailed.raiseEvent()},i.onerror=function(e){_self._openLocalSmlFileFailed.raiseEvent()},i.onloadend=function(){_self._openLocalSmlFileCompleted.raiseEvent()},i.onload=function(i){self._getCompletedInit(JSON.parse(i.target.result),t),e.remove()}}},_0x29db2d.prototype.addLocalSmlFile=function(e){var t=this;this.uploadSmlFile((function(i){if(!i.success)throw new WebGLPlot$a.DeveloperError("uploadSmlFile failed!!!");t.addSmlFileOnServer(i.smlFileName,e)}))},_0x29db2d.prototype.uploadSmlFile=function(e){if(!window.FileReader)return;let t=document.createElement("input");t.setAttribute("type","file"),t.click();var i=this;t.onchange=function(){if(!t.files||0===t.files.length)return;const n=t.files[0].name.split(".")[0];var r=new FileReader;r.readAsText(t.files[0]),r.onload=function(r){var o=WebGLPlot$a.smlFileService(i._serverUrl,i.options.serviceParams);if(!o)return;let a=JSON.parse(r.target.result);var s=o.editSmlFileParams;s.method="POST",s.sitData=a,s.smlFileName=n,s.isCover=!0,o.smlFileService.editSMLFile(s,(function(t){t.result.succeed&&"function"==typeof e?e({success:!0,smlFileName:n,message:"success"}):"function"==typeof e&&e({success:!1,message:"failed"})}),i),t.remove()}}},_0x29db2d.prototype.addSmlFileToLayer=function(e){var t=this;this.uploadSmlFile((function(i){i.success?t.addSmlFileToLayerOnServer(i.smlFileName,e):t._addSmlFileToLayerFailed.raiseEvent()}))},_0x29db2d.prototype.addSmlFileOnServer=function(e,t){var i=this,n=this._scene;var r=WebGLPlot$a.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?function(e){if(WebGLPlot$a.defined(e)){for(var r=e.layerDatas,o=null,a=0;a<r.length;++a)if(null!==r[a].layerName){var s=_0x2d6822.getPlotLayers(n);if(null===s)return;o=s.find(r[a].layerName),t&&!WebGLPlot$a.defined(o)&&(o=new _0x267b40(n,r[a].layerName),s.add(o)),WebGLPlot$a.defined(o)&&i._load(r[a],o)}null!==o?i._addSmlFileCompleted.raiseEvent():i._addSmlFileFailed.raiseEvent()}}(e.result):i._addSmlFileFailed.raiseEvent()}),this)}},_0x29db2d.prototype.addSmlFileToLayerOnServer=function(e,t){var i=this,n=this._scene;var r=WebGLPlot$a.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?function(e){if(WebGLPlot$a.defined(e)){var r,o=e.layerDatas,a=_0x2d6822.getPlotLayers(n);r=a.find(t),WebGLPlot$a.defined(r)||(r=new _0x267b40(n,t),a.add(r));for(var s=0;s<o.length;++s)i._load(o[s],r);i._addSmlFileToLayerCompleted.raiseEvent()}}(e.result):i._addSmlFileToLayerFailed.raiseEvent()}),this)}},_0x29db2d.prototype.downloadSmlFileUrl=function(e){return"smlFileDownload/"+e+".sml"},_0x29db2d.prototype.openSmlFileOnServer=function(e,t){var i=this;var n=WebGLPlot$a.smlFileService(this._serverUrl,this.options.serviceParams);if(n){var r=n.editSmlFileParams;r.method="GET",r.smlFileName=e,n.smlFileService.editSMLFile(r,(function(n){var r;n.result&&n.result.succeed?(r=n.result,i._getCompletedInit(r,e),"function"==typeof t&&t({success:!0,smlFileName:e,sitDataLayers:i.getPlottingLayers()})):(i._openSmlFileFailed.raiseEvent(),"function"==typeof t&&t({success:!1,message:"Open failed"}))}),this)}},_0x29db2d.prototype.deleteSmlFileOnServer=function(e){var t=this;var i={smlFileName:e},n=this.buildUrl(i);n+="?isCover=false";var r=WebGLPlot$a.EditSmlFile(n,this.options.serviceParams);if(r){var o=r.editSmlFile;o.events.on({processCompleted:function(e){t._deleteSmlFileCompleted.raiseEvent()},processFailed:function(e){t._deleteSmlFileFailed.raiseEvent()},scope:this});var a=r.editSmlFileParams;a.method="DELETE",a.smlFileName=e,o.processAsync(a)}},_0x29db2d.prototype.updateLayerData=function(e){if(WebGLPlot$a.defined(this._sitData)&&WebGLPlot$a.defined(this._sitData.layerDatas))for(var t=0;t<this._sitData.layerDatas.length;++t)if(e._name==this._sitData.layerDatas[t].layerName){for(var i=this._sitData.layerDatas[t],n=[],r=e.geoGraphicObjects,o=0;o<r.length;++o){var a,s=r[o];a=_0x2004fc.geoGraphicObjectToSmlFeature(s,s.feature),n.push(a)}i.features=n,i.isEditable=e.isEditable,i.isLocked=e.isLocked,i.isSelected=e.isSelected,i.vivibility=e.visibility}},_0x29db2d.prototype.getSmlInfos=function(e,t){var i=this;var n=e*t,r=t,o=i._serverUrl,a=o.substr(o.length-1,1);o+="/"===a?"smlInfos":"/smlInfos",o+=".json",_0x2bb4f4(o+="?start="+n+"&count="+r).then((function(e){var t;t=e,i._getSmlInfosCompleted.raiseEvent(t)}),(function(e){var t;t=e,i._getSmlInfosFailed.raiseEvent(t)}))},_0x29db2d.prototype.getSmlInfo=function(e){this._scene;var t={smlFileName:e};_0x2bb4f4(this.buildUrl(t)).then((function(e){!function(e){this._getSmlInfoCompleted.raiseEvent(e.smlInfo)}(e)}),(function(e){!function(e){this._getSmlInfoFailed.raiseEvent(null)}()}))},_0x29db2d.prototype.saveAsSmlFile=function(e){this._save(e,!0)},_0x29db2d.prototype.newSmlFile=function(){this._smlFileName="",this._smlInfo.destroy();for(var e,t=_0x2d6822.getPlotLayers(this._scene),i=0;i<t._layerQueue.length;++i)(e=t.findByIndex(i))instanceof _0x267b40&&t.remove(e._name);_0x38860f.removeAll(this._scene)},_0x29db2d.prototype._getCompletedInit=function(e,t){this._smlFileName=t,this.openSitDataFromJson(e)},_0x29db2d.prototype.openSitDataFromJson=function(e){this._smlInfo.fromJSON(e.smlInfo),e.mapInfo&&(this._sitData.mapInfo=e.mapInfo),this._sitData.layerDatas=e.layerDatas;var t=e.layerDatas,i=this._scene,n=_0x2d6822.getPlotLayers(i);if(null!==n){for(var r,o=n._layerQueue.length,a=0;a<o;){var s=n.findByIndex(a);s instanceof _0x267b40?(s._removeAll(!0),n.remove(s._name),o--):a++}for(var l=0;l<t.length;++l)r=new _0x267b40(i,t[l].layerName),n.add(r),this._load(t[l],r),void 0!==t[l].isEditable&&null!==t[l].isEditable&&(r._isEditable=t[l].isEditable),void 0!==t[l].isSelected&&null!==t[l].isSelected&&(r._isSelected=t[l].isSelected),void 0!==t[l].isLocked&&null!==t[l].isLocked&&(r.isLocked=t[l].isLocked),void 0!==t[l].visibility&&null!==t[l].visibility&&(r.visibility=t[l].visibility),WebGLPlot$a.defined(t[l]._bIsUseDepthTest)&&r.setUseDepthTest(t[l]._bIsUseDepthTest);this._openSmlFileCompleted.raiseEvent(e)}},_0x29db2d.prototype._load=function(e,t){for(var i=0,n=e.features.length;i<n;++i){var r=e.features[i];null!==r&&(r.hasOwnProperty("isEdit")||(r.isEdit=!0),_0x2004fc.smlFeatureToGeoGraphicObject(r,t))}},_0x29db2d.prototype.saveSmlFile=function(e,t){WebGLPlot$a.defined(e)||(e=this.smlFileName),WebGLPlot$a.defined(t)||(t=!0),this._save(e,t)},_0x29db2d.prototype._save=function(e,t){_0x1713d3.getInstance({scene:this._scene}).reset();var i=this;function n(e){var t,n;e?(n=e,i._saveSmlFileCompleted.raiseEvent(n)):i._saveSmlFileFailed.raiseEvent(t)}var r=i._serverUrl,o=WebGLPlot$a.smlFileService(r,this.options.serviceParams);if(o){var a=o.editSmlFileParams;a.method="POST",a.sitData=this.saveSitData(),a.smlFileName=e,a.isCover=t,o.smlFileService.editSMLFile(a,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}},_0x29db2d.prototype.saveSitData=function(){var e=this._scene,t=new _0x19562b;t.smlInfo=this._smlInfo,this._sitData.mapInfo?t.mapInfo=this._sitData.mapInfo:t.mapInfo={zoom:4,centerX:112.5,centerY:36.5},t.layerDatas=[];var i=_0x2d6822.getPlotLayers(e);if(null===i)return t;for(var n,r,o=0;o<i._layerQueue.length;++o)if((n=i.findByIndex(o))instanceof _0x267b40){(r=new _0x3a5bf8).layerName=n._name,r.spatialAnalystUrl=WebGLPlot$a.defaultValue(n.spatialAnalystUrl,null),r.useCanvas=!0,r.isEditable=n.isEditable,r.isLocked=n.isLocked,r.isSelected=n.isSelected,r.visibility=n.visibility,r._bIsUseDepthTest=n._bIsUseDepthTest;for(var a=0;a<n.geoGraphicObjects.length;++a){var s=_0x2004fc.geoGraphicObjectToSmlFeature(n.geoGraphicObjects[a]);r.features.push(s)}t.layerDatas.push(r)}return t},_0x29db2d.prototype.getPlottingLayers=function(){for(var e=[],t=this._scene,i=_0x2d6822.getPlotLayers(t),n=0;n<i._layerQueue.length;++n){var r=i.findByIndex(n);r instanceof _0x267b40&&e.push(r)}return e},_0x29db2d.prototype.buildUrl=function(e){var t=this._serverUrl,i=t.substr(t.length-1,1);t+="/"===i?"smlInfos/":"/smlInfos/";var n=e.smlFileName,r=RegExp(/./);return n.match(r)&&(n=n.split(".")[0]),t+=n+".json"},Object.defineProperties(_0x29db2d.prototype,{scene:{get:function(){return this._scene}},serverUrl:{get:function(){return this._serverUrl}},smlInfo:{get:function(){return this._smlInfo},set:function(e){e!==this._smlInfo&&(this._smlInfo=e)}},smlFileName:{get:function(){return this._smlFileName},set:function(e){e!==this._smlFileName&&(this._smlFileName=e)}},openSmlFileCompleted:{get:function(){return this._openSmlFileCompleted}},openSmlFileFailed:{get:function(){return this._openSmlFileFailed}},saveSmlFileFailed:{get:function(){return this._saveSmlFileFailed}},saveSmlFileCompleted:{get:function(){return this._saveSmlFileCompleted}},getSmlInfosCompleted:{get:function(){return this._getSmlInfosCompleted}},getSmlInfosFailed:{get:function(){return this._getSmlInfosFailed}},getSmlInfoCompleted:{get:function(){return this._getSmlInfoCompleted}},getSmlInfoFailed:{get:function(){return this._getSmlInfoFailed}},openLocalSmlFileCompleted:{get:function(){return this._openLocalSmlFileCompleted}},openLocalSmlFileFailed:{get:function(){return this._openLocalSmlFileFailed}},addSmlFileToLayerCompleted:{get:function(){return this._addSmlFileToLayerCompleted}},addSmlFileToLayerFailed:{get:function(){return this._addSmlFileToLayerFailed}},addSmlFileCompleted:{get:function(){return this._addSmlFileCompleted}},addSmlFileFailed:{get:function(){return this._addSmlFileFailed}},deleteSmlFileCompleted:{get:function(){return this._deleteSmlFileCompleted}},deleteSmlFileFailed:{get:function(){return this._deleteSmlFileFailed}}}),WebGLPlot$a.SitDataManager=_0x29db2d;var _0x7a8e7a=(_0x359dfe=!0,function(e,t){var i=_0x359dfe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x359dfe=!1,i}),_0x5b4078=_0x7a8e7a(void 0,(function(){return _0x5b4078.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b4078).search("(((.+)+)+)+$")})),_0x359dfe;function _0x256ea7(e){this.style=this.getDefaultStyle(),this.viewer=e,this.rainStage=null,this.snowStage=null}_0x5b4078(),_0x256ea7.prototype.smoke=function(e,t){var i=this.createSmokeSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x256ea7.prototype.flame=function(e,t){var i=this.createFlameSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x256ea7.prototype.blast=function(e,t){var i=this.createBlastSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x256ea7.prototype.removeEfficiency=function(e){this.viewer.scene.primitives.remove(e)},_0x256ea7.prototype.startRain=function(){this.rain()},_0x256ea7.prototype.stopRain=function(){null!==this.rainStage&&(this.viewer.scene.postProcessStages.remove(this.rainStage),this.rainStage=null)},_0x256ea7.prototype.startSnow=function(){this.snow()},_0x256ea7.prototype.stopSnow=function(){null!==this.snowStage&&(this.viewer.scene.postProcessStages.remove(this.snowStage),this.snowStage=null)},_0x256ea7.prototype.rain=function(){if(null===this.rainStage){var e=new Cesium.PostProcessStage({name:"czm_rain",fragmentShader:"uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n \n float hash(float x){\n return fract(sin(x*133.3)*13.13);\n }\n \n void main(void){\n \n float time = czm_frameNumber / 60.0;\n vec2 resolution = czm_viewport.zw;\n \n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 c=vec3(.6,.7,.8);\n \n float a=-.4;\n float si=sin(a),co=cos(a);\n uv*=mat2(co,-si,si,co);\n uv*=length(uv+vec2(0,4.9))*.3+1.;\n \n float v=1.-sin(hash(floor(uv.x*100.))*100.);\n float b=clamp(abs(sin(15.*time*v+uv.y*(10./(2.+v))))-.95,0.,1.)*4.;\n c*=v*b; \n \n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c,1), 0.5); \n }\n"});this.viewer.scene.postProcessStages.add(e),this.rainStage=e}},_0x256ea7.prototype.snow=function(){if(null===this.snowStage){var e=new Cesium.PostProcessStage({name:"czm_snow",fragmentShader:"uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n \n float snow(vec2 uv,float scale)\n {\n float time = czm_frameNumber / 60.0;\n float w=smoothstep(1.,0.,-uv.y*(scale/10.));if(w<.1)return 0.;\n uv+=time/scale;uv.y+=time*2./scale;uv.x+=sin(uv.y+time*.5)/scale;\n uv*=scale;vec2 s=floor(uv),f=fract(uv),p;float k=3.,d;\n p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;d=length(p);k=min(d,k);\n k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\n return k*w;\n }\n \n void main(void){\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 finalColor=vec3(0);\n float c = 0.0;\n c+=snow(uv,30.)*.0;\n c+=snow(uv,20.)*.0;\n c+=snow(uv,15.)*.0;\n c+=snow(uv,10.);\n c+=snow(uv,8.);\n c+=snow(uv,6.);\n c+=snow(uv,5.);\n finalColor=(vec3(c)); \n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.5); \n \n }\n "});this.viewer.scene.postProcessStages.add(e),this.snowStage=e}},_0x256ea7.prototype.createSmokeSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:new WebGLPlot.Color(0,0,0,.6),endColor:new WebGLPlot.Color(0,0,0,0),startScale:this.style.startScale,endScale:this.style.endScale,minimumParticleLife:this.style.minimumParticleLife,maximumParticleLife:this.style.maximumParticleLife,minimumSpeed:this.style.minimumSpeed,maximumSpeed:this.style.maximumSpeed,imageSize:new WebGLPlot.Cartesian2(this.style.particleSize,this.style.particleSize),emissionRate:this.style.emissionRate,lifetime:16,emitter:new WebGLPlot.CircleEmitter(5),sizeInMeters:!0,performance:!1,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x256ea7.prototype.createFlameSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:new WebGLPlot.Color(1,1,1,1),endColor:new WebGLPlot.Color(.5,0,0,0),startScale:this.style.startScale,endScale:1.5,minimumParticleLife:this.style.minimumParticleLife,maximumParticleLife:this.style.maximumParticleLife,minimumSpeed:this.style.minimumSpeed,maximumSpeed:this.style.maximumSpeed,imageSize:new WebGLPlot.Cartesian2(2,2),emissionRate:this.style.emissionRate,lifetime:16,loop:!0,emitter:new WebGLPlot.ConeEmitter(.785398185),sizeInMeters:!0,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x256ea7.prototype.createBlastSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:WebGLPlot.Color.RED.withAlpha(.7),endColor:WebGLPlot.Color.YELLOW.withAlpha(.3),startScale:1,endScale:2,particleLife:1,speed:5,imageSize:new WebGLPlot.Cartesian2(2,2),emissionRate:50,lifetime:5,loop:!0,emitter:new WebGLPlot.BoxEmitter(new WebGLPlot.Cartesian3(1,1,1)),sizeInMeters:!0,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x256ea7.prototype.getDefaultStyle=function(e){return{fireImage:e,startScale:0,endScale:1.5,minimumParticleLife:1.5,maximumParticleLife:1.8,minimumSpeed:7,maximumSpeed:9,particleSize:2,emissionRate:200}},_0x256ea7.prototype.computeModelMatrix=function(e,t){var i=WebGLPlot.Property.getValueOrUndefined(e.position,t,new WebGLPlot.Cartesian3);if(WebGLPlot.defined(i)){var n=WebGLPlot.Property.getValueOrUndefined(e.orientation,t,new WebGLPlot.Quaternion);if(WebGLPlot.defined(n))r=WebGLPlot.Matrix4.fromRotationTranslation(WebGLPlot.Matrix3.fromQuaternion(n,new WebGLPlot.Matrix3),i,new WebGLPlot.Matrix4);else var r=WebGLPlot.Transforms.eastNorthUpToFixedFrame(i,void 0,new WebGLPlot.Matrix4);return r}},_0x256ea7.prototype.computeEmitterModelMatrix=function(){var e=WebGLPlot.HeadingPitchRoll.fromDegrees(0,0,0,new WebGLPlot.HeadingPitchRoll),t=new WebGLPlot.TranslationRotationScale;return t.translation=WebGLPlot.Cartesian3.fromElements(2.5,4,1,new WebGLPlot.Cartesian3),t.rotation=WebGLPlot.Quaternion.fromHeadingPitchRoll(e,new WebGLPlot.Quaternion),WebGLPlot.Matrix4.fromTranslationRotationScale(t,new WebGLPlot.Matrix4)};var _0x19442c=(_0x3fa410=!0,function(e,t){var i=_0x3fa410?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3fa410=!1,i}),_0x176e21=_0x19442c(void 0,(function(){return _0x176e21.toString().search("(((.+)+)+)+$").toString().constructor(_0x176e21).search("(((.+)+)+)+$")})),_0x3fa410;_0x176e21();var _0x5c92f4={u_globeMinimumAltitude:function(){return 55e3}};function _0x4dfaf3(e){var t=(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)).appearance,i=e.geometryInstances;if(!WebGLPlot.defined(t)&&WebGLPlot.defined(i))for(var n=Array.isArray(i)?i:[i],r=n.length,o=0;o<r;o++){var a=n[o].attributes;if(WebGLPlot.defined(a)&&WebGLPlot.defined(a.color)){t=new WebGLPlot.PerInstanceColorAppearance({flat:!0});break}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=WebGLPlot.defaultValue(e.show,!0),this.classificationType=WebGLPlot.defaultValue(e.classificationType,WebGLPlot.ClassificationType.BOTH),this.debugShowBoundingVolume=WebGLPlot.defaultValue(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=WebGLPlot.defaultValue(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._readyPromise=WebGLPlot.when.defer(),this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=WebGLPlot.defaultValue(e.maxTerrainHeight,WebGLPlot.ApproximateTerrainHeights._defaultMaxTerrainHeight),this._minTerrainHeight=WebGLPlot.defaultValue(e.minTerrainHeight,WebGLPlot.ApproximateTerrainHeights._defaultMinTerrainHeight),this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:WebGLPlot.defaultValue(e.vertexCacheOptimize,!1),interleave:WebGLPlot.defaultValue(e.interleave,!1),releaseGeometryInstances:WebGLPlot.defaultValue(e.releaseGeometryInstances,!0),allowPicking:WebGLPlot.defaultValue(e.allowPicking,!0),asynchronous:WebGLPlot.defaultValue(e.asynchronous,!0),compressVertices:WebGLPlot.defaultValue(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:_0x5c92f4,classificationType:this.classificationType}}function _0x4e9e6d(e){return function(t,i){return e._maxTerrainHeight}}function _0x5b0842(e){return function(t,i){return e._minHeight}}Object.defineProperties(_0x4dfaf3.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),_0x4dfaf3.isSupported=WebGLPlot.ClassificationPrimitive.isSupported;var _0x56d11e=new WebGLPlot.Cartesian3,_0x34b49f=new WebGLPlot.Cartesian3,_0x1cfd4f=new WebGLPlot.Cartesian3,_0x454209=new WebGLPlot.Cartographic,_0x3630ee=new WebGLPlot.Rectangle;function _0x1796e9(e,t){var i=e.mapProjection.ellipsoid;if(!WebGLPlot.defined(t.attributes)||!WebGLPlot.defined(t.attributes.position3DHigh))return WebGLPlot.defined(t.rectangle)?t.rectangle:void 0;for(var n=t.attributes.position3DHigh.values,r=t.attributes.position3DLow.values,o=n.length,a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=0;c<o;c+=3){var h=WebGLPlot.Cartesian3.unpack(n,c,_0x56d11e),d=WebGLPlot.Cartesian3.unpack(r,c,_0x34b49f),f=WebGLPlot.Cartesian3.add(h,d,_0x1cfd4f),p=i.cartesianToCartographic(f,_0x454209),_=p.latitude,m=p.longitude;a=Math.min(a,_),s=Math.min(s,m),l=Math.max(l,_),u=Math.max(u,m)}var g=_0x3630ee;return g.north=l,g.south=a,g.east=u,g.west=s,g}function _0x1272f7(e,t,i){var n=t.mapProjection.ellipsoid,r=_0x1796e9(t,i);if(e.geometryInstances){var o=Number.MIN_VALUE,a=Number.MAX_VALUE,s=!1;for(let t=0;t<e.geometryInstances.length>0;t++){var l=e.geometryInstances[t].geometry._groundBottomAltitude,u=e.geometryInstances[t].geometry._groundExtrudedHeight;if(WebGLPlot.defined(l)&&WebGLPlot.defined(u)){var c=l+u;o=Math.max(o,c),a=Math.min(a,l),s=!0}}e._maxHeight=s?o:e._maxHeight,e._minHeight=s?a:e._minHeight}var h=(Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances])[0].geometry._granularity,d=WebGLPlot.OrientedBoundingBox.fromRectangle(r,_0x5b0842(e)(h,n),_0x4e9e6d(e)(h,n),n);if(e._boundingVolumes.push(d),!t.scene3DOnly){var f=t.mapProjection,p=WebGLPlot.BoundingSphere.fromRectangleWithHeights2D(r,f,e._maxHeight,e._minHeight);WebGLPlot.Cartesian3.fromElements(p.center.z,p.center.x,p.center.y,p.center),e._boundingVolumes2D.push(p)}}function _0x5acee9(e,t){return Math.floor(e%t/3)}function _0xc93c13(e,t,i,n,r,o,a){var s=e._primitive;i.mode!==WebGLPlot.SceneMode.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&t.derivedCommands&&t.derivedCommands.appearance2D&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t)}function _0x48b9ec(e,t,i,n,r,o){var a=e._primitive;i.mode!==WebGLPlot.SceneMode.SCENE3D&&t.shaderProgram===a._spPick&&a._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,i.commandList.push(t)}function _0xf85250(e,t,i,n,r,o,a,s){var l;l=t.mode===WebGLPlot.SceneMode.SCENE3D?e._boundingVolumes:e._boundingVolumes2D;var u,c,h=e.classificationType,d=h!==WebGLPlot.ClassificationType.CESIUM_3D_TILE&&h!==WebGLPlot.ClassificationType.S3M_TILE,f=h!==WebGLPlot.ClassificationType.TERRAIN&&h!==WebGLPlot.ClassificationType.S3M_TILE,p=h!==WebGLPlot.ClassificationType.TERRAIN&&h!==WebGLPlot.ClassificationType.CESIUM_3D_TILE,_=t.passes,m=e._primitive;if(_.render){var g=i.length;for(u=0;u<g;++u)c=l[_0x5acee9(u,g)],d&&_0xc93c13(e,i[u],t,r,o,c,a),f&&_0xc93c13(e,i[u].derivedCommands.tileset,t,r,o,c,a),p&&_0xc93c13(e,i[u].derivedCommands.s3mtiles,t,r,o,c,a);if(t.invertClassification){var x=m._commandsIgnoreShow,v=x.length;for(u=0;u<v;++u)c=l[Math.floor(u/2)],_0xc93c13(e,x[u],t,r,o,c,a)}}if(_.pick){var y,$=n.length;for(e._useFragmentCulling||(y=m._primitive._pickOffsets),u=0;u<$;++u){if(c=l[_0x5acee9(u,$)],!e._useFragmentCulling)c=l[y[_0x5acee9(u,$)].index];d&&_0x48b9ec(e,n[u],t,r,o,c),f&&_0x48b9ec(e,n[u].derivedCommands.tileset,t,r,o,c),p&&_0xc93c13(e,n[u].derivedCommands.s3mtiles,t,r,o,c,a)}}}_0x4dfaf3.initializeTerrainHeights=function(){return WebGLPlot.ApproximateTerrainHeights.initialize()},_0x4dfaf3.prototype.update=function(e){if(WebGLPlot.defined(this._primitive)||WebGLPlot.defined(this.geometryInstances)){if(!WebGLPlot.ApproximateTerrainHeights.initialized){if(!this.asynchronous)throw new WebGLPlot.DeveloperError("For synchronous GroundPrimitives, you must call PlotGroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");return void _0x4dfaf3.initializeTerrainHeights()}var t=this,i=this._classificationPrimitiveOptions;if(!WebGLPlot.defined(this._primitive)){var n,r,o,a,s,l=e.mapProjection.ellipsoid,u=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=u.length,h=new Array(c);for(a=0;a<c;++a){var d=_0x1796e9(e,r=(n=u[a]).geometry);WebGLPlot.defined(s)?WebGLPlot.defined(d)&&WebGLPlot.Rectangle.union(s,d,s):s=WebGLPlot.Rectangle.clone(d);var f=n.id;if(WebGLPlot.defined(f)&&WebGLPlot.defined(d)){var p=WebGLPlot.ApproximateTerrainHeights.getBoundingSphere(d,l);this._boundingSpheresKeys.push(f),this._boundingSpheres.push(p)}if(o=r.constructor,!WebGLPlot.defined(o)||!WebGLPlot.defined(o.createShadowVolume))throw new WebGLPlot.DeveloperError("Not all of the geometry instances have PlotGroundPrimitive support.")}var _=e.terrainExaggeration;this._minHeight=this._minTerrainHeight*_,this._maxHeight=this._maxTerrainHeight*_;var m=_0x4dfaf3._supportsMaterials(e.context);if(this._useFragmentCulling=m,m){var g,x=!0;for(a=0;a<c;++a)if(s=_0x1796e9(e,r=(n=u[a]).geometry),WebGLPlot.ShadowVolumeAppearance.shouldUseSphericalCoordinates(s)){x=!1;break}for(a=0;a<c;++a){o=(r=(n=u[a]).geometry).constructor;var v=_0x1796e9(e,r),y=r.textureCoordinateRotationPoints,$=e.context.floatTextureSixPlaces;g=x?WebGLPlot.ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes(v,y,l,e.mapProjection,$,this._maxHeight):WebGLPlot.ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes(v,y,l,e.mapProjection,$);var b=n.attributes;for(var T in b)b.hasOwnProperty(T)&&(g[T]=b[T]);n.created?h[a]=new WebGLPlot.GeometryInstance({geometry:n._groundGeometry,attributes:g,id:n.id}):(h[a]=new WebGLPlot.GeometryInstance({geometry:o.createShadowVolume(r,_0x5b0842(this),_0x4e9e6d(this)),attributes:g,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0)}}else for(a=0;a<c;++a)o=(r=(n=u[a]).geometry).constructor,n.created?h[a]=new WebGLPlot.GeometryInstance({geometry:r,attributes:n.attributes,id:n.id}):(h[a]=new WebGLPlot.GeometryInstance({geometry:o.createShadowVolume(r,_0x5b0842(this),_0x4e9e6d(this)),attributes:n.attributes,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0);i.geometryInstances=h,i.appearance=this.appearance,i._createBoundingVolumeFunction=function(e,i){_0x1272f7(t,e,i)},i._updateAndQueueCommandsFunction=function(e,i,n,r,o,a,s,l){_0xf85250(t,i,n,r,o,a,s)},this._primitive=new WebGLPlot.ClassificationPrimitive(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0);var i=e._error;WebGLPlot.defined(i)?t._readyPromise.reject(i):t._readyPromise.resolve(t)}))}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},_0x4dfaf3.prototype.getBoundingSphere=function(e){var t=this._boundingSpheresKeys.indexOf(e);if(-1!==t)return this._boundingSpheres[t]},_0x4dfaf3.prototype.getGeometryInstanceAttributes=function(e){if(!WebGLPlot.defined(this._primitive))throw new WebGLPlot.DeveloperError("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},_0x4dfaf3.prototype.isDestroyed=function(){return!1},_0x4dfaf3.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),WebGLPlot.destroyObject(this)},_0x4dfaf3._supportsMaterials=function(e){return e.depthTexture},_0x4dfaf3.supportsMaterials=function(e){return WebGLPlot.Check.typeOf.object("scene",e),_0x4dfaf3._supportsMaterials(e.frameState.context)};var _0x21eb33=(_0x1d3cf6=!0,function(e,t){var i=_0x1d3cf6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d3cf6=!1,i}),_0x3fd717=_0x21eb33(void 0,(function(){return _0x3fd717.toString().search("(((.+)+)+)+$").toString().constructor(_0x3fd717).search("(((.+)+)+)+$")})),_0x1d3cf6;function _0x3a2d15(e){if(!e||!e.scene)throw new WebGLPlot.defined("GroundEffect scene is required.");this._scene=e.scene,this._show=WebGLPlot.defaultValue(e.show,!0),this._positions=WebGLPlot.defaultValue(e.positions,!0),this._color=WebGLPlot.defaultValue(e.color,WebGLPlot.Color.BLACK.withAlpha(.8)),this._maxTerrainHeight=WebGLPlot.defaultValue(e.maxTerrainHeight,void 0),this._minTerrainHeight=WebGLPlot.defaultValue(e.minTerrainHeight,void 0),this._id=WebGLPlot.defaultValue(e.id,WebGLPlot.createGuid()),this.initialize()}_0x3fd717(),_0x3a2d15.prototype.initialize=function(){if(Array.isArray(this._positions)&&!(this._positions.length<3)){this._primitive&&this.destroy();var e=WebGLPlot.Cartesian3.fromDegreesArray(this._positions),t=new WebGLPlot.PolygonHierarchy(e),i=new WebGLPlot.PolygonGeometry({polygonHierarchy:t}),n={show:new WebGLPlot.ShowGeometryInstanceAttribute(this._show),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(this._color)},r=new WebGLPlot.GeometryInstance({geometry:i,attributes:n,id:this._id}),o=new _0x4dfaf3({show:this._show,asynchronous:!0,geometryInstances:r,classificationType:3,appearance:new WebGLPlot.PerInstanceColorAppearance,maxTerrainHeight:this._maxTerrainHeight,minTerrainHeight:this._minTerrainHeight});this._primitive=this._scene.primitives.add(o)}},_0x3a2d15.prototype.destroy=function(){this._scene&&this._primitive&&(this._scene.primitives.removeAndDestroy(this._primitive),this._primitive=void 0)},_0x3a2d15.prototype._update=function(){this.destroy(),this.initialize()},Object.defineProperties(_0x3a2d15.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._primitive&&(this._primitive.show=e))}},positions:{get:function(){return this._positions},set:function(e){Array.isArray(e)&&e.length>=3&&(this._positions=e,this._update())}},color:{get:function(){return this._color},set:function(e){WebGLPlot.Color.equals(e,this._color)||(this._color=e,this._update())}},maxTerrainHeight:{get:function(){return this._maxTerrainHeight},set:function(e){this._maxTerrainHeight!==e&&(this._maxTerrainHeight=e,this._update())}},minTerrainHeight:{get:function(){return this._minTerrainHeight},set:function(e){this._minTerrainHeight!==e&&(this._minTerrainHeight=e,this._update())}}});const _0x5ed8e3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x417853=_0x5ed8e3(void 0,(function(){return _0x417853.toString().search("(((.+)+)+)+$").toString().constructor(_0x417853).search("(((.+)+)+)+$")}));function _0x539867(e){if(!e)throw new WebGLPlot.DeveloperError("CameraMoveHandler is required to initialize viewer");this._cameraMoveRate=100;let t=e.scene.globe.ellipsoid;_0x539867.flags={looking:!1,moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1};let i=this;e.clock.onTick.addEventListener((function(n){const r=e.camera,o=t.cartesianToCartographic(r.position).height/i._cameraMoveRate;_0x539867.flags.moveForward&&r.moveForward(o),_0x539867.flags.moveBackward&&r.moveBackward(o),_0x539867.flags.moveUp&&r.moveUp(o),_0x539867.flags.moveDown&&r.moveDown(o),_0x539867.flags.moveLeft&&r.moveLeft(o),_0x539867.flags.moveRight&&r.moveRight(o)}))}function _0x286152(e){switch(e){case"Z".charCodeAt(0):return"moveForward";case"X".charCodeAt(0):return"moveBackward";case"W".charCodeAt(0):return"moveUp";case"S".charCodeAt(0):return"moveDown";case"D".charCodeAt(0):return"moveRight";case"A".charCodeAt(0):case 37:return"moveLeft";case 38:return"moveUp";case 39:return"moveRight";case 40:return"moveDown";default:return}}_0x417853(),_0x539867.prototype.activate=function(){document.addEventListener("keydown",this.keydown,!1),document.addEventListener("keyup",this.keyup,!1)},_0x539867.prototype.deActivate=function(){document.removeEventListener("keydown",this.keydown),document.removeEventListener("keyup",this.keyup)},_0x539867.prototype.keydown=function(e){const t=_0x286152(e.keyCode);typeof t<"u"&&(_0x539867.flags[t]=!0)},_0x539867.prototype.keyup=function(e){const t=_0x286152(e.keyCode);typeof t<"u"&&(_0x539867.flags[t]=!1)},Object.defineProperties(_0x539867.prototype,{cameraMoveRate:{get:function(){return this._cameraMoveRate},set:function(e){if(e===this._cameraMoveRate||"number"!=typeof e)return!1;this._cameraMoveRate=e}}});var _0x5e1a6f=(_0x3f3033=!0,function(e,t){var i=_0x3f3033?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f3033=!1,i}),_0x49b83e=_0x5e1a6f(void 0,(function(){return _0x49b83e.toString().search("(((.+)+)+)+$").toString().constructor(_0x49b83e).search("(((.+)+)+)+$")})),_0x3f3033;function _0x4b4567(e){e=e||{},this.method=e.method?e.method:"POST",this.sitData=e.sitData?e.sitData:null,this.smlFileName=e.smlFileName?e.smlFileName:"",this.isCover=!!e.isCover&&e.isCover,this.CLASS_NAME="SuperMap.EditSmlFileParameters"}_0x49b83e(),_0x4b4567.prototype.destroy=function(){var e=this;e.method="POST",e.sitData=null,e.isCover=!1,e.smlFileName=""},_0x4b4567.toJsonParameters=function(e){if(e)return WebGLPlot.toJSON(e.sitData)};var _0x159071=(_0x5798c9=!0,function(e,t){var i=_0x5798c9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5798c9=!1,i}),_0x1bdaa0=_0x159071(void 0,(function(){return _0x1bdaa0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bdaa0).search("(((.+)+)+)+$")})),_0x5798c9;_0x1bdaa0();class _0x13c545 extends _0x1393d7{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i=this;i.events=new _0x3d7456(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),this.CLASS_NAME="SuperMap.EditSmlFileService"}destroy(){super.destroy()}processAsync(e){if(e){var t=this,i=e.method,n=t.url.substr(t.url.length-1,1);t.url+="/"==n?"smlInfos/":"/smlInfos/",t.url+=e.smlFileName+".json",t.url+="?isCover="+e.isCover;var r=null;e.method&&"POST"===e.method&&(r=_0x4b4567.toJsonParameters(e)),t.request({method:i,data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}const _0x2bc2ee=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1fb252=_0x2bc2ee(void 0,(function(){return _0x1fb252.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fb252).search("(((.+)+)+)+$")}));function _0x2bed72(e){e=e||{},this.libID=e.libID,this.code=e.code,this.inputPoints=e.inputPoints?e.inputPoints:null,this.symbolRank=e.symbolRank?e.symbolRank:0,this.negativeImage=!!e.negativeImage&&e.negativeImage,this.surroundLineType=e.surroundLineType?e.surroundLineType:0,this.subSymbols=e.subSymbols?e.subSymbols:null,this.scaleValues=e.scaleValues?e.scaleValues:null,this.scalePoints=e.scalePoints?e.scalePoints:null,this.newScalePoint=e.newScalePoint?e.newScalePoint:null,this.newScalePointIndex=e.newScalePointIndex?e.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}_0x1fb252(),_0x2bed72.prototype.destroy=function(){var e=this;e.libID=null,e.code=null,e.inputPoints=null,e.symbolRank=null,e.negativeImage=null,e.surroundLineType=null,e.subSymbols=null,e.scaleValues=null,e.scalePoints=null,e.newScalePoint=null,e.newScalePointIndex=null},_0x2bed72.toUrlParameters=function(e){if(e&&null!==e.libID&&null!==e.code){var t="libID="+encodeURIComponent(e.libID)+"&code="+encodeURIComponent(e.code);if(e.inputPoints&&null!==e.inputPoints&&0!==e.inputPoints.length){let i="[";for(let t=0;t<e.inputPoints.length;t++)t===e.inputPoints.length-1?i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"}]":i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"},";t+="&inputPoints="+encodeURIComponent(i)}if(e.scalePoints&&null!==e.scalePoints&&0!==e.scalePoints.length){let i="[";for(let t=0;t<e.scalePoints.length;t++)t===e.scalePoints.length-1?i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"}]":i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"},";t+="&scalePoints="+encodeURIComponent(i)}if(e.scaleValues&&null!==e.scaleValues&&0!==e.scaleValues.length){let i="[";for(let t=0;t<e.scaleValues.length;t++)t===e.scaleValues.length-1?i+=e.scaleValues[t]+"]":i+=e.scaleValues[t]+",";t+="&scaleValues="+encodeURIComponent(i)}if(e.subSymbols&&null!==e.subSymbols&&0!==e.subSymbols.length){let i="[";for(let t=0;t<e.subSymbols.length;t++)t===e.subSymbols.length-1?i+=e.subSymbols[t].code+"]":i+=e.subSymbols[t].code+",";t+="&subSymbols="+encodeURIComponent(i)}return e.newScalePoint&&null!==e.newScalePoint&&(t+="&newScalePoint="+encodeURIComponent('{"x":'+e.newScalePoint.x+', "y":'+e.newScalePoint.y+"}")),e.newScalePointIndex&&null!==e.newScalePointIndex&&(t+="&newScalePointIndex="+encodeURIComponent(e.newScalePointIndex)),e.symbolRank&&null!==e.symbolRank&&(t+="&symbolRank="+encodeURIComponent(e.symbolRank)),e.negativeImage&&null!==e.negativeImage&&(t+="&negativeImage="+encodeURIComponent(e.negativeImage)),e.surroundLineType&&null!==e.surroundLineType&&(t+="&surroundLineType="+encodeURIComponent(e.surroundLineType)),t}};var _0x3eec3f=(_0x2a8d30=!0,function(e,t){var i=_0x2a8d30?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a8d30=!1,i}),_0xe509ce=_0x3eec3f(void 0,(function(){return _0xe509ce.toString().search("(((.+)+)+)+$").toString().constructor(_0xe509ce).search("(((.+)+)+)+$")})),_0x2a8d30;_0xe509ce();class _0x1e0300 extends _0x1393d7{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i,n=this;n.events=new _0x3d7456(n,null,n.EVENT_TYPES,!0),n.eventListeners instanceof Object&&n.events.on(n.eventListeners),i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"smlInfos":"/smlInfos",n.url+=".json",this.CLASS_NAME="SuperMap.GetSMLInfosService"}destroy(){super.destroy()}processAsync(e){if(e){var t=this;t.url+=_0x2bed72.toUrlParameters(e),t.request({method:"GET",data:null,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x3eb96c=(_0x2d9050=!0,function(e,t){var i=_0x2d9050?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d9050=!1,i}),_0x207e5b=_0x3eb96c(void 0,(function(){return _0x207e5b.toString().search("(((.+)+)+)+$").toString().constructor(_0x207e5b).search("(((.+)+)+)+$")})),_0x2d9050;function _0x46b1b9(e,t){this.url=e,this.options=t}_0x207e5b(),_0x46b1b9.prototype.getSMLInfos=function(e,t,i){var n=this;return i||(i=n),new _0x1e0300(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n},_0x46b1b9.prototype.editSMLFile=function(e,t,i){var n=this;return i||(i=n),new _0x13c545(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n};var _0x413be5=(_0x2c65eb=!0,function(e,t){var i=_0x2c65eb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c65eb=!1,i}),_0x418954=_0x413be5(void 0,(function(){return _0x418954.toString().search("(((.+)+)+)+$").toString().constructor(_0x418954).search("(((.+)+)+)+$")})),_0x2c65eb;_0x418954();class _0x460259 extends _0x1393d7{constructor(e,t){super(e,t=t||{});var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"graphicObject.json?":"/graphicObject.json?",this.CLASS_NAME="SuperMap.GetSymbolInfoService"}destroy(){super.destroy()}processAsync(e){if(e){var t,i=this;t=_0x570598.toUrlParameters(e),i.url+=t,e.dynamicToken&&(i.url+="&dynamicToken="+e.dynamicToken),navigator.userAgent.toUpperCase().includes("MSIE")&&(i.url=encodeURI(i.url)),i.request({method:"GET",params:null,scope:i,success:i.myServiceProcessCompleted,failure:i.serviceProcessFailed})}}myServiceProcessCompleted(e){null!=(e=this.transformResult(e))&&null!=e.textStyle2D&&null!=e.textStyle2D.fontHeight&&(e.textStyle2D.fontHeight=3),this.events.triggerEvent("processCompleted",{result:e})}transformResult(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e}}var _0x24d344=(_0x5242d1=!0,function(e,t){var i=_0x5242d1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5242d1=!1,i}),_0x559a86=_0x24d344(void 0,(function(){return _0x559a86.toString().search("(((.+)+)+)+$").toString().constructor(_0x559a86).search("(((.+)+)+)+$")})),_0x5242d1;_0x559a86();var WebGLPlot$9=window.WebGLPlot=window.WebGLPlot||{};function _0x3eee05(){}var createAlgo=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoSymbol({libID:e.libID,code:e.code}):void 0},getDefaultStyle=function(e){return void 0!==SuperMapAlgoPlot?_0x39fbca.defaultStyle:void 0},getSpatialData=function(e,t){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.Primitives.getSpatialData(e,t):void 0},getServerData=function(e,t,i,n){if(void 0===i&&(i=_0x39fbca.serverUrl),void 0===SuperMap||0===e||WebGLPlot$9.getLibManager(n).getSymbolLibByLibId(this.libID))return 0===e?e:null;var r=new _0x570598;return r.libID=e,r.code=t,r.surroundLineType=1,{getSymbolInfoParameters:r,getSymbolInfo:new _0x460259(i,WebGLPlot$9.getLibManager(n).options.serviceParams)}},toJSON=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.toJSON(e):""},clonePoints=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.clonePoints(e):[]},EditSmlFile=function(e,t){return void 0!==SuperMap?{editSmlFile:new _0x13c545(e,t),editSmlFileParams:new _0x4b4567}:void 0},smlFileService=function(e,t){return{smlFileService:new _0x46b1b9(e,t),editSmlFileParams:new _0x4b4567}},isAccessServer=function(e,t){return void 0!==SuperMapAlgoPlot&&SuperMapAlgoPlot.AlgoSymbolFactory.isAccessServer(e,t)},polylineDistance=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.polylineDistance(e):0},analysisSymbolCells=function(e){if(void 0!==SuperMapAlgoPlot)return SuperMapAlgoPlot.AnalysisSymbol.analysisSymbolCells(e)},rotateAngle=function(e,t,i){void 0!==SuperMapAlgoPlot&&SuperMapAlgoPlot.PlottingUtil.rotateAngle(e,t,i)},plotI18n=function(e){if(void 0!==SuperMapAlgoPlot)return SuperMapAlgoPlot.plotI18n(e)},getLibManager=function(e){let t=WebGLPlot$9.Plotting.g_Plotting.get(e);if(t)return t.getSymbolLibManager()},createProperty=function(e,t){return new _0x32c2d4(e,t)};WebGLPlot$9.createAlgo=createAlgo,WebGLPlot$9.getDefaultStyle=getDefaultStyle,WebGLPlot$9.getSpatialData=getSpatialData,WebGLPlot$9.getServerData=getServerData,WebGLPlot$9.toJSON=toJSON,WebGLPlot$9.EditSmlFile=EditSmlFile,WebGLPlot$9.clonePoints=clonePoints,WebGLPlot$9.isAccessServer=isAccessServer,WebGLPlot$9.polylineDistance=polylineDistance,WebGLPlot$9.analysisSymbolCells=analysisSymbolCells,WebGLPlot$9.rotateAngle=rotateAngle,WebGLPlot$9.plotI18n=plotI18n,WebGLPlot$9.getLibManager=getLibManager,WebGLPlot$9.createProperty=createProperty,WebGLPlot$9.smlFileService=smlFileService,function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));(n(),"object"==typeof exports&&typeof module<"u")?module.exports=e():"function"==typeof define&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).html2canvas=e()}((function(){return function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){(function(e){!function(n){var r="object"==typeof i&&i&&!i.nodeType&&i,o="object"==typeof t&&t&&!t.nodeType&&t,a="object"==typeof e&&e;(a.global===a||a.window===a||a.self===a)&&(n=a);var s,l,u=2147483647,c=36,h=/^xn--/,d=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=Math.floor,m=String.fromCharCode;function g(e){throw new RangeError(p[e])}function x(e,t){for(var i=e.length,n=[];i--;)n[i]=t(e[i]);return n}function v(e,t){var i=e.split("@"),n="";return i.length>1&&(n=i[0]+"@",e=i[1]),n+x((e=e.replace(f,".")).split("."),t).join(".")}function y(e){for(var t,i,n=[],r=0,o=e.length;r<o;)(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<o?56320==(64512&(i=e.charCodeAt(r++)))?n.push(((1023&t)<<10)+(1023&i)+65536):(n.push(t),r--):n.push(t);return n}function $(e){return x(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,i){var n=0;for(e=i?_(e/700):e>>1,e+=_(e/t);e>455;n+=c)e=_(e/35);return _(n+36*e/(e+38))}function C(e){var t,i,n,r,o,a,s,l,h,d,f,p=[],m=e.length,x=0,v=128,y=72;for((i=e.lastIndexOf("-"))<0&&(i=0),n=0;n<i;++n)e.charCodeAt(n)>=128&&g("not-basic"),p.push(e.charCodeAt(n));for(r=i>0?i+1:0;r<m;){for(o=x,a=1,s=c;r>=m&&g("invalid-input"),((l=(f=e.charCodeAt(r++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:c)>=c||l>_((u-x)/a))&&g("overflow"),x+=l*a,!(l<(h=s<=y?1:s>=y+26?26:s-y));s+=c)a>_(u/(d=c-h))&&g("overflow"),a*=d;y=T(x-o,t=p.length+1,0==o),_(x/t)>u-v&&g("overflow"),v+=_(x/t),x%=t,p.splice(x++,0,v)}return $(p)}function S(e){var t,i,n,r,o,a,s,l,h,d,f,p,x,v,$,C=[];for(p=(e=y(e)).length,t=128,i=0,o=72,a=0;a<p;++a)(f=e[a])<128&&C.push(m(f));for(n=r=C.length,r&&C.push("-");n<p;){for(s=u,a=0;a<p;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>_((u-i)/(x=n+1))&&g("overflow"),i+=(s-t)*x,t=s,a=0;a<p;++a)if((f=e[a])<t&&++i>u&&g("overflow"),f==t){for(l=i,h=c;!(l<(d=h<=o?1:h>=o+26?26:h-o));h+=c)$=l-d,v=c-d,C.push(m(b(d+$%v,0))),l=_($/v);C.push(m(b(l,0))),o=T(i,x,n==r),i=0,++n}++i,++t}return C.join("")}if(s={version:"1.4.1",ucs2:{decode:y,encode:$},decode:C,encode:S,toASCII:function(e){return v(e,(function(e){return d.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return v(e,(function(e){return h.test(e)?C(e.slice(4).toLowerCase()):e}))}},r&&o)if(t.exports==r)o.exports=s;else for(l in s)s.hasOwnProperty(l)&&(r[l]=s[l]);else n.punycode=s}(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,i){var n=e("./log");function r(e,t){for(var i=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),o=e.firstChild;o;)(!0===t||1!==o.nodeType||"SCRIPT"!==o.nodeName)&&i.appendChild(r(o,t)),o=o.nextSibling;return 1===e.nodeType&&(i._scrollTop=e.scrollTop,i._scrollLeft=e.scrollLeft,"CANVAS"===e.nodeName?function(e,t){try{t&&(t.width=e.width,t.height=e.height,t.getContext("2d").putImageData(e.getContext("2d").getImageData(0,0,e.width,e.height),0,0))}catch(t){n("Unable to copy canvas content from",e,t)}}(e,i):("TEXTAREA"===e.nodeName||"SELECT"===e.nodeName)&&(i.value=e.value)),i}function o(e){if(1===e.nodeType){e.scrollTop=e._scrollTop,e.scrollLeft=e._scrollLeft;for(var t=e.firstChild;t;)o(t),t=t.nextSibling}}t.exports=function(e,t,i,n,a,s,l){var u=r(e.documentElement,a.javascriptEnabled),c=t.createElement("iframe");return c.className="html2canvas-container",c.style.visibility="hidden",c.style.position="fixed",c.style.left="-10000px",c.style.top="0px",c.style.border="0",c.width=i,c.height=n,c.scrolling="no",t.body.appendChild(c),new Promise((function(t){var i,n,r,h=c.contentWindow.document;c.contentWindow.onload=c.onload=function(){var e=setInterval((function(){h.body.childNodes.length>0&&(o(h.documentElement),clearInterval(e),"view"===a.type&&(c.contentWindow.scrollTo(s,l),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(c.contentWindow.scrollY!==l||c.contentWindow.scrollX!==s)&&(h.documentElement.style.top=-l+"px",h.documentElement.style.left=-s+"px",h.documentElement.style.position="absolute")),t(c))}),50)},h.open(),h.write("<!DOCTYPE html><html></html>"),n=s,r=l,(i=e).defaultView&&(n!==i.defaultView.pageXOffset||r!==i.defaultView.pageYOffset)&&i.defaultView.scrollTo(n,r),h.replaceChild(h.adoptNode(u),h.documentElement),h.close()}))}},{"./log":13}],3:[function(e,t,i){function n(e){this.r=0,this.g=0,this.b=0,this.a=null,this.fromArray(e)||this.namedColor(e)||this.rgb(e)||this.rgba(e)||this.hex6(e)||this.hex3(e)}n.prototype.darken=function(e){var t=1-e;return new n([Math.round(this.r*t),Math.round(this.g*t),Math.round(this.b*t),this.a])},n.prototype.isTransparent=function(){return 0===this.a},n.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},n.prototype.fromArray=function(e){return Array.isArray(e)&&(this.r=Math.min(e[0],255),this.g=Math.min(e[1],255),this.b=Math.min(e[2],255),e.length>3&&(this.a=e[3])),Array.isArray(e)};var r=/^#([a-f0-9]{3})$/i;n.prototype.hex3=function(e){var t;return null!==(t=e.match(r))&&(this.r=parseInt(t[1][0]+t[1][0],16),this.g=parseInt(t[1][1]+t[1][1],16),this.b=parseInt(t[1][2]+t[1][2],16)),null!==t};var o=/^#([a-f0-9]{6})$/i;n.prototype.hex6=function(e){var t=null;return null!==(t=e.match(o))&&(this.r=parseInt(t[1].substring(0,2),16),this.g=parseInt(t[1].substring(2,4),16),this.b=parseInt(t[1].substring(4,6),16)),null!==t};var a=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;n.prototype.rgb=function(e){var t;return null!==(t=e.match(a))&&(this.r=Number(t[1]),this.g=Number(t[2]),this.b=Number(t[3])),null!==t};var s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;n.prototype.rgba=function(e){var t;return null!==(t=e.match(s))&&(this.r=Number(t[1]),this.g=Number(t[2]),this.b=Number(t[3]),this.a=Number(t[4])),null!==t},n.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},n.prototype.namedColor=function(e){e=e.toLowerCase();var t=l[e];if(t)this.r=t[0],this.g=t[1],this.b=t[2];else if("transparent"===e)return this.r=this.g=this.b=this.a=0,!0;return!!t},n.prototype.isColor=!0;var l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};t.exports=n},{}],4:[function(e,t,i){var n=e("./support"),r=e("./renderers/canvas"),o=e("./imageloader"),a=e("./nodeparser"),s=e("./nodecontainer"),l=e("./log"),u=e("./utils"),c=e("./clone"),h=e("./proxy").loadUrlDocument,d=u.getBounds,f="data-html2canvas-node",p=0;function _(e,t){var i,n,o=p++;if((t=t||{}).logging&&(l.options.logging=!0,l.options.start=Date.now()),t.async=typeof t.async>"u"||t.async,t.allowTaint=!(typeof t.allowTaint>"u")&&t.allowTaint,t.removeContainer=typeof t.removeContainer>"u"||t.removeContainer,t.javascriptEnabled=!(typeof t.javascriptEnabled>"u")&&t.javascriptEnabled,t.imageTimeout=typeof t.imageTimeout>"u"?1e4:t.imageTimeout,t.renderer="function"==typeof t.renderer?t.renderer:r,t.strict=!!t.strict,"string"==typeof e){if("string"!=typeof t.proxy)return Promise.reject("Proxy must be used when rendering url");var a=null!=t.width?t.width:window.innerWidth,s=null!=t.height?t.height:window.innerHeight;return h((i=e,n=document.createElement("a"),n.href=i,n.href=n.href,n),t.proxy,document,a,s,t).then((function(e){return g(e.contentWindow.document.documentElement,e,t,a,s)}))}var u,d,_,m,x,v=(void 0===e?[document.documentElement]:e.length?e:[e])[0];return v.setAttribute(f+o,o),(u=v.ownerDocument,d=t,_=v.ownerDocument.defaultView.innerWidth,m=v.ownerDocument.defaultView.innerHeight,x=o,c(u,u,_,m,d,u.defaultView.pageXOffset,u.defaultView.pageYOffset).then((function(e){l("Document cloned");var t=f+x,i="["+t+"='"+x+"']";u.querySelector(i).removeAttribute(t);var n=e.contentWindow,r=n.document.querySelector(i);return("function"==typeof d.onclone?Promise.resolve(d.onclone(n.document)):Promise.resolve(!0)).then((function(){return g(r,e,d,_,m)}))}))).then((function(e){return"function"==typeof t.onrendered&&(l("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),t.onrendered(e)),e}))}_.CanvasRenderer=r,_.NodeContainer=s,_.log=l,_.utils=u;var m=typeof document>"u"||"function"!=typeof Object.create||"function"!=typeof document.createElement("canvas").getContext?function(){return Promise.reject("No canvas support")}:_;function g(e,t,i,r,s){var u=t.contentWindow,c=new n(u.document),h=new o(i,c),f=d(e),p="view"===i.type?r:f.right+1,_="view"===i.type?s:f.bottom+1,m=new i.renderer(p,_,h,i,document);return new a(e,m,c,h,i).ready.then((function(){var n,r;if(l("Finished rendering"),"view"===i.type)n=x(m.canvas,{width:m.canvas.width,height:m.canvas.height,top:0,left:0,x:0,y:0});else if(e===u.document.body||e===u.document.documentElement||null!=i.canvas)n=m.canvas;else if(i.scale){var o={width:null!=i.width?i.width:f.width,height:null!=i.height?i.height:f.height,top:f.top,left:f.left,x:0,y:0},a={};for(var s in o)o.hasOwnProperty(s)&&(a[s]=o[s]*i.scale);(n=x(m.canvas,a)).style.width=o.width+"px",n.style.height=o.height+"px"}else n=x(m.canvas,{width:null!=i.width?i.width:f.width,height:null!=i.height?i.height:f.height,top:f.top,left:f.left,x:0,y:0});return r=t,i.removeContainer&&(r.parentNode.removeChild(r),l("Cleaned up container")),n}))}function x(e,t){var i=document.createElement("canvas"),n=Math.min(e.width-1,Math.max(0,t.left)),r=Math.min(e.width,Math.max(1,t.left+t.width)),o=Math.min(e.height-1,Math.max(0,t.top)),a=Math.min(e.height,Math.max(1,t.top+t.height));i.width=t.width,i.height=t.height;var s=r-n,u=a-o;return l("Cropping canvas at:","left:",t.left,"top:",t.top,"width:",s,"height:",u),l("Resulting crop with width",t.width,"and height",t.height,"with x",n,"and y",o),i.getContext("2d").drawImage(e,n,o,s,u,t.x,t.y,s,u),i}t.exports=m},{"./clone":2,"./imageloader":11,"./log":13,"./nodecontainer":14,"./nodeparser":15,"./proxy":16,"./renderers/canvas":20,"./support":22,"./utils":26}],5:[function(e,t,i){var n=e("./log"),r=e("./utils").smallImage;t.exports=function e(t){if(this.src=t,n("DummyImageContainer for",t),!this.promise||!this.image){n("Initiating DummyImageContainer"),e.prototype.image=new Image;var i=this.image;e.prototype.promise=new Promise((function(e,t){i.onload=e,i.onerror=t,i.src=r(),!0===i.complete&&e(i)}))}}},{"./log":13,"./utils":26}],6:[function(e,t,i){var n=e("./utils").smallImage;t.exports=function(e,t){var i,r,o=document.createElement("div"),a=document.createElement("img"),s=document.createElement("span"),l="Hidden Text";o.style.visibility="hidden",o.style.fontFamily=e,o.style.fontSize=t,o.style.margin=0,o.style.padding=0,document.body.appendChild(o),a.src=n(),a.width=1,a.height=1,a.style.margin=0,a.style.padding=0,a.style.verticalAlign="baseline",s.style.fontFamily=e,s.style.fontSize=t,s.style.margin=0,s.style.padding=0,s.appendChild(document.createTextNode(l)),o.appendChild(s),o.appendChild(a),i=a.offsetTop-s.offsetTop+1,o.removeChild(s),o.appendChild(document.createTextNode(l)),o.style.lineHeight="normal",a.style.verticalAlign="super",r=a.offsetTop-o.offsetTop+1,document.body.removeChild(o),this.baseline=i,this.lineWidth=1,this.middle=r}},{"./utils":26}],7:[function(e,t,i){var n=e("./font");function r(){this.data={}}r.prototype.getMetrics=function(e,t){return void 0===this.data[e+"-"+t]&&(this.data[e+"-"+t]=new n(e,t)),this.data[e+"-"+t]},t.exports=r},{"./font":6}],8:[function(e,t,i){var n=e("./utils").getBounds,r=e("./proxy").loadUrlDocument;function o(t,i,r){this.image=null,this.src=t;var o=this,a=n(t);this.promise=(i?new Promise((function(e){"about:blank"===t.contentWindow.document.URL||null==t.contentWindow.document.documentElement?t.contentWindow.onload=t.onload=function(){e(t)}:e(t)})):this.proxyLoad(r.proxy,a,r)).then((function(t){return e("./core")(t.contentWindow.document.documentElement,{type:"view",width:t.width,height:t.height,proxy:r.proxy,javascriptEnabled:r.javascriptEnabled,removeContainer:r.removeContainer,allowTaint:r.allowTaint,imageTimeout:r.imageTimeout/2})})).then((function(e){return o.image=e}))}o.prototype.proxyLoad=function(e,t,i){var n=this.src;return r(n.src,e,n.ownerDocument,t.width,t.height,i)},t.exports=o},{"./core":4,"./proxy":16,"./utils":26}],9:[function(e,t,i){function n(e){this.src=e.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=Promise.resolve(!0)}n.TYPES={LINEAR:1,RADIAL:2},n.REGEXP_COLORSTOP=/^\s*(rgba?\(\s*\d{1,3},\s*\d{1,3},\s*\d{1,3}(?:,\s*[0-9\.]+)?\s*\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\s+(\d{1,3}(?:\.\d+)?)(%|px)?)?(?:\s|$)/i,t.exports=n},{}],10:[function(e,t,i){t.exports=function(e,t){this.src=e,this.image=new Image;var i=this;this.tainted=null,this.promise=new Promise((function(n,r){i.image.onload=n,i.image.onerror=r,t&&(i.image.crossOrigin="anonymous"),i.image.src=e,!0===i.image.complete&&n(i.image)}))}},{}],11:[function(e,t,i){var n=e("./log"),r=e("./imagecontainer"),o=e("./dummyimagecontainer"),a=e("./proxyimagecontainer"),s=e("./framecontainer"),l=e("./svgcontainer"),u=e("./svgnodecontainer"),c=e("./lineargradientcontainer"),h=e("./webkitgradientcontainer"),d=e("./utils").bind;function f(e,t){this.link=null,this.options=e,this.support=t,this.origin=this.getOrigin(window.location.href)}f.prototype.findImages=function(e){var t=[];return e.reduce((function(e,t){switch(t.node.nodeName){case"IMG":return e.concat([{args:[t.node.src],method:"url"}]);case"svg":case"IFRAME":return e.concat([{args:[t.node],method:t.node.nodeName}])}return e}),[]).forEach(this.addImage(t,this.loadImage),this),t},f.prototype.findBackgroundImage=function(e,t){return t.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(e,this.loadImage),this),e},f.prototype.addImage=function(e,t){return function(i){i.args.forEach((function(r){this.imageExists(e,r)||(e.splice(0,0,t.call(this,i)),n("Added image #"+e.length,"string"==typeof r?r.substring(0,100):r))}),this)}},f.prototype.hasImageBackground=function(e){return"none"!==e.method},f.prototype.loadImage=function(e){if("url"===e.method){var t=e.args[0];return!this.isSVG(t)||this.support.svg||this.options.allowTaint?t.match(/data:image\/.*;base64,/i)?new r(t.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(t)||!0===this.options.allowTaint||this.isSVG(t)?new r(t,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new r(t,!0):this.options.proxy?new a(t,this.options.proxy):new o(t):new l(t)}return"linear-gradient"===e.method?new c(e):"gradient"===e.method?new h(e):"svg"===e.method?new u(e.args[0],this.support.svg):"IFRAME"===e.method?new s(e.args[0],this.isSameOrigin(e.args[0].src),this.options):new o(e)},f.prototype.isSVG=function(e){return"svg"===e.substring(e.length-3).toLowerCase()||l.prototype.isInline(e)},f.prototype.imageExists=function(e,t){return e.some((function(e){return e.src===t}))},f.prototype.isSameOrigin=function(e){return this.getOrigin(e)===this.origin},f.prototype.getOrigin=function(e){var t=this.link||(this.link=document.createElement("a"));return t.href=e,t.href=t.href,t.protocol+t.hostname+t.port},f.prototype.getPromise=function(e){return this.timeout(e,this.options.imageTimeout).catch((function(){return new o(e.src).promise.then((function(t){e.image=t}))}))},f.prototype.get=function(e){var t=null;return this.images.some((function(i){return(t=i).src===e}))?t:null},f.prototype.fetch=function(e){return this.images=e.reduce(d(this.findBackgroundImage,this),this.findImages(e)),this.images.forEach((function(e,t){e.promise.then((function(){n("Succesfully loaded image #"+(t+1),e)}),(function(i){n("Failed loading image #"+(t+1),e,i)}))})),this.ready=Promise.all(this.images.map(this.getPromise,this)),n("Finished searching images"),this},f.prototype.timeout=function(e,t){var i,r=Promise.race([e.promise,new Promise((function(r,o){i=setTimeout((function(){n("Timed out loading image",e),o(e)}),t)}))]).then((function(e){return clearTimeout(i),e}));return r.catch((function(){clearTimeout(i)})),r},t.exports=f},{"./dummyimagecontainer":5,"./framecontainer":8,"./imagecontainer":10,"./lineargradientcontainer":12,"./log":13,"./proxyimagecontainer":17,"./svgcontainer":23,"./svgnodecontainer":24,"./utils":26,"./webkitgradientcontainer":27}],12:[function(e,t,i){var n=e("./gradientcontainer"),r=e("./color");function o(e){n.apply(this,arguments),this.type=n.TYPES.LINEAR;var t=o.REGEXP_DIRECTION.test(e.args[0])||!n.REGEXP_COLORSTOP.test(e.args[0]);t?e.args[0].split(/\s+/).reverse().forEach((function(e,t){switch(e){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var i=this.y0,n=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=n,this.y1=i;break;case"center":break;default:var r=.01*parseFloat(e,10);if(isNaN(r))break;0===t?(this.y0=r,this.y1=1-this.y0):(this.x0=r,this.x1=1-this.x0)}}),this):(this.y0=0,this.y1=1),this.colorStops=e.args.slice(t?1:0).map((function(e){var t=e.match(n.REGEXP_COLORSTOP),i=+t[2],o=0===i?"%":t[3];return{color:new r(t[1]),stop:"%"===o?i/100:null}})),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach((function(e,t){null===e.stop&&this.colorStops.slice(t).some((function(i,n){return null!==i.stop&&(e.stop=(i.stop-this.colorStops[t-1].stop)/(n+1)+this.colorStops[t-1].stop,!0)}),this)}),this)}o.prototype=Object.create(n.prototype),o.REGEXP_DIRECTION=/^\s*(?:to|left|right|top|bottom|center|\d{1,3}(?:\.\d+)?%?)(?:\s|$)/i,t.exports=o},{"./color":3,"./gradientcontainer":9}],13:[function(e,t,i){var n=function(){n.options.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-n.options.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))};n.options={logging:!1},t.exports=n},{}],14:[function(e,t,i){var n=e("./color"),r=e("./utils"),o=r.getBounds,a=r.parseBackgrounds,s=r.offsetBounds;function l(e,t){this.node=e,this.parent=t,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function u(e){return-1!==e.toString().indexOf("%")}function c(e){return e.replace("px","")}function h(e){return parseFloat(e)}l.prototype.cloneTo=function(e){e.visible=this.visible,e.borders=this.borders,e.bounds=this.bounds,e.clip=this.clip,e.backgroundClip=this.backgroundClip,e.computedStyles=this.computedStyles,e.styles=this.styles,e.backgroundImages=this.backgroundImages,e.opacity=this.opacity},l.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat("opacity"):this.opacity},l.prototype.assignStack=function(e){this.stack=e,e.children.push(this)},l.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},l.prototype.css=function(e){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[e]||(this.styles[e]=this.computedStyles[e])},l.prototype.prefixedCss=function(e){var t=this.css(e);return void 0===t&&["webkit","moz","ms","o"].some((function(i){return void 0!==(t=this.css(i+e.substr(0,1).toUpperCase()+e.substr(1)))}),this),void 0===t?null:t},l.prototype.computedStyle=function(e){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,e)},l.prototype.cssInt=function(e){var t=parseInt(this.css(e),10);return isNaN(t)?0:t},l.prototype.color=function(e){return this.colors[e]||(this.colors[e]=new n(this.css(e)))},l.prototype.cssFloat=function(e){var t=parseFloat(this.css(e));return isNaN(t)?0:t},l.prototype.fontWeight=function(){var e=this.css("fontWeight");switch(parseInt(e,10)){case 401:e="bold";break;case 400:e="normal"}return e},l.prototype.parseClip=function(){var e=this.css("clip").match(this.CLIP);return e?{top:parseInt(e[1],10),right:parseInt(e[2],10),bottom:parseInt(e[3],10),left:parseInt(e[4],10)}:null},l.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=a(this.css("backgroundImage")))},l.prototype.cssList=function(e,t){var i=(this.css(e)||"").split(",");return 1===(i=(i=i[t||0]||i[0]||"auto").trim().split(" ")).length&&(i=[i[0],u(i[0])?"auto":i[0]]),i},l.prototype.parseBackgroundSize=function(e,t,i){var n,r,o=this.cssList("backgroundSize",i);if(u(o[0]))n=e.width*parseFloat(o[0])/100;else{if(/contain|cover/.test(o[0])){var a=e.width/e.height,s=t.width/t.height;return a<s^"contain"===o[0]?{width:e.height*s,height:e.height}:{width:e.width,height:e.width/s}}n=parseInt(o[0],10)}return r="auto"===o[0]&&"auto"===o[1]?t.height:"auto"===o[1]?n/t.width*t.height:u(o[1])?e.height*parseFloat(o[1])/100:parseInt(o[1],10),"auto"===o[0]&&(n=r/t.height*t.width),{width:n,height:r}},l.prototype.parseBackgroundPosition=function(e,t,i,n){var r,o,a=this.cssList("backgroundPosition",i);return r=u(a[0])?(e.width-(n||t).width)*(parseFloat(a[0])/100):parseInt(a[0],10),o="auto"===a[1]?r/t.width*t.height:u(a[1])?(e.height-(n||t).height)*parseFloat(a[1])/100:parseInt(a[1],10),"auto"===a[0]&&(r=o/t.height*t.width),{left:r,top:o}},l.prototype.parseBackgroundRepeat=function(e){return this.cssList("backgroundRepeat",e)[0]},l.prototype.parseTextShadows=function(){var e=this.css("textShadow"),t=[];if(e&&"none"!==e)for(var i=e.match(this.TEXT_SHADOW_PROPERTY),r=0;i&&r<i.length;r++){var o=i[r].match(this.TEXT_SHADOW_VALUES);t.push({color:new n(o[0]),offsetX:o[1]?parseFloat(o[1].replace("px","")):0,offsetY:o[2]?parseFloat(o[2].replace("px","")):0,blur:o[3]?o[3].replace("px",""):0})}return t},l.prototype.parseTransform=function(){if(!this.transformData)if(this.hasTransform()){var e=this.parseBounds(),t=this.prefixedCss("transformOrigin").split(" ").map(c).map(h);t[0]+=e.left,t[1]+=e.top,this.transformData={origin:t,matrix:this.parseTransformMatrix()}}else this.transformData={origin:[0,0],matrix:[1,0,0,1,0,0]};return this.transformData},l.prototype.parseTransformMatrix=function(){if(!this.transformMatrix){var e=this.prefixedCss("transform"),t=e?function(e){if(e&&"matrix"===e[1])return e[2].split(",").map((function(e){return parseFloat(e.trim())}));if(e&&"matrix3d"===e[1]){var t=e[2].split(",").map((function(e){return parseFloat(e.trim())}));return[t[0],t[1],t[4],t[5],t[12],t[13]]}}(e.match(this.MATRIX_PROPERTY)):null;this.transformMatrix=t||[1,0,0,1,0,0]}return this.transformMatrix},l.prototype.inverseTransform=function(){var e,t,i,n,r,o,a,s,l,u=this.parseTransform();return{origin:u.origin,matrix:(e=u.matrix,t=e[0],i=e[2],n=e[4],r=e[1],o=e[3],a=e[5],s=t*o-i*r,l=[o,-r,-i,t,i*a-n*o,n*r-t*a].map((function(e){return e/s})),l)}},l.prototype.parseBounds=function(){return this.bounds||(this.bounds=this.hasTransform()?s(this.node):o(this.node))},l.prototype.hasTransform=function(){return"1,0,0,1,0,0"!==this.parseTransformMatrix().join(",")||this.parent&&this.parent.hasTransform()},l.prototype.getValue=function(){var e,t,i=this.node.value||"";return"SELECT"===this.node.tagName?(e=this.node,i=(t=e.options[e.selectedIndex||0])&&t.text||""):"password"===this.node.type&&(i=Array(i.length+1).join("•")),0===i.length?this.node.placeholder||"":i},l.prototype.MATRIX_PROPERTY=/(matrix|matrix3d)\((.+)\)/,l.prototype.TEXT_SHADOW_PROPERTY=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,l.prototype.TEXT_SHADOW_VALUES=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g,l.prototype.CLIP=/^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/,t.exports=l},{"./color":3,"./utils":26}],15:[function(e,t,i){var n=e("./log"),r=e("punycode"),o=e("./nodecontainer"),a=e("./textcontainer"),s=e("./pseudoelementcontainer"),l=e("./fontmetrics"),u=e("./color"),c=e("./stackingcontext"),h=e("./utils"),d=h.bind,f=h.getBounds,p=h.parseBackgrounds,_=h.offsetBounds;function m(e,t,i,r,a){n("Starting NodeParser"),this.renderer=t,this.options=a,this.range=null,this.support=i,this.renderQueue=[],this.stack=new c(!0,1,e.ownerDocument,null);var s=new o(e,null);if(a.background&&t.rectangle(0,0,t.width,t.height,new u(a.background)),e===e.ownerDocument.documentElement){var h=new o(s.color("backgroundColor").isTransparent()?e.ownerDocument.body:e.ownerDocument.documentElement,null);t.rectangle(0,0,t.width,t.height,h.color("backgroundColor"))}s.visibile=s.isElementVisible(),this.createPseudoHideStyles(e.ownerDocument),this.disableAnimations(e.ownerDocument),this.nodes=k([s].concat(this.getChildren(s)).filter((function(e){return e.visible=e.isElementVisible()})).map(this.getPseudoElements,this)),this.fontMetrics=new l,n("Fetched nodes, total:",this.nodes.length),n("Calculate overflow clips"),this.calculateOverflowClips(),n("Start fetching images"),this.images=r.fetch(this.nodes.filter(N)),this.ready=this.images.ready.then(d((function(){return n("Images loaded, starting parsing"),n("Creating stacking contexts"),this.createStackingContexts(),n("Sorting stacking contexts"),this.sortStackingContexts(this.stack),this.parse(this.stack),n("Render queue created with "+this.renderQueue.length+" items"),new Promise(d((function(e){a.async?"function"==typeof a.async?a.async.call(this,this.renderQueue,e):this.renderQueue.length>0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,e)):e():(this.renderQueue.forEach(this.paint,this),e())}),this))}),this))}function g(e){return e.parent&&e.parent.clip.length}function x(){}m.prototype.calculateOverflowClips=function(){this.nodes.forEach((function(e){if(N(e)){F(e)&&e.appendToDOM(),e.borders=this.parseBorders(e);var t="hidden"===e.css("overflow")?[e.borders.clip]:[],i=e.parseClip();i&&-1!==["absolute","fixed"].indexOf(e.css("position"))&&t.push([["rect",e.bounds.left+i.left,e.bounds.top+i.top,i.right-i.left,i.bottom-i.top]]),e.clip=g(e)?e.parent.clip.concat(t):t,e.backgroundClip="hidden"!==e.css("overflow")?e.clip.concat([e.borders.clip]):e.clip,F(e)&&e.cleanDOM()}else U(e)&&(e.clip=g(e)?e.parent.clip:[]);F(e)||(e.bounds=null)}),this)},m.prototype.asyncRenderer=function(e,t,i){i=i||Date.now(),this.paint(e[this.renderIndex++]),e.length===this.renderIndex?t():i+20>Date.now()?this.asyncRenderer(e,t,i):setTimeout(d((function(){this.asyncRenderer(e,t)}),this),0)},m.prototype.createPseudoHideStyles=function(e){this.createStyles(e,"."+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},m.prototype.disableAnimations=function(e){this.createStyles(e,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},m.prototype.createStyles=function(e,t){var i=e.createElement("style");i.innerHTML=t,e.body.appendChild(i)},m.prototype.getPseudoElements=function(e){var t=[[e]];if(e.node.nodeType===Node.ELEMENT_NODE){var i=this.getPseudoElement(e,":before"),n=this.getPseudoElement(e,":after");i&&t.push(i),n&&t.push(n)}return k(t)},m.prototype.getPseudoElement=function(e,t){var i,n,r=e.computedStyle(t);if(!r||!r.content||"none"===r.content||"-moz-alt-content"===r.content||"none"===r.display)return null;for(var o=(i=r.content,n=void 0,(n=i.substr(0,1))===i.substr(i.length-1)&&n.match(/'|"/)?i.substr(1,i.length-2):i),l="url"===o.substr(0,3),u=document.createElement(l?"img":"html2canvaspseudoelement"),c=new s(u,e,t),h=r.length-1;h>=0;h--){var d=r.item(h).replace(/(\-[a-z])/g,(function(e){return e.toUpperCase().replace("-","")}));u.style[d]=r[d]}if(u.className=s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,l)return u.src=p(o)[0].args[0],[c];var f=document.createTextNode(o);return u.appendChild(f),[c,new a(f,c)]},m.prototype.getChildren=function(e){return k([].filter.call(e.node.childNodes,I).map((function(t){var i=[t.nodeType===Node.TEXT_NODE?new a(t,e):new o(t,e)].filter(V);return t.nodeType===Node.ELEMENT_NODE&&i.length&&"TEXTAREA"!==t.tagName?i[0].isElementVisible()?i.concat(this.getChildren(i[0])):[]:i}),this))},m.prototype.newStackingContext=function(e,t){var i=new c(t,e.getOpacity(),e.node,e.parent);e.cloneTo(i),(t?i.getParentStack(this):i.parent.stack).contexts.push(i),e.stack=i},m.prototype.createStackingContexts=function(){this.nodes.forEach((function(e){var t,i;N(e)&&(this.isRootElement(e)||e.getOpacity()<1||(i=(t=e).css("position"),"auto"!==(-1!==["absolute","relative","fixed"].indexOf(i)?t.css("zIndex"):"auto"))||this.isBodyWithTransparentRoot(e)||e.hasTransform())?this.newStackingContext(e,!0):N(e)&&(O(e)&&A(e)||-1!==["inline-block","inline-table"].indexOf(e.css("display"))||D(e))?this.newStackingContext(e,!1):e.assignStack(e.parent.stack)}),this)},m.prototype.isBodyWithTransparentRoot=function(e){return"BODY"===e.node.nodeName&&e.parent.color("backgroundColor").isTransparent()},m.prototype.isRootElement=function(e){return null===e.parent},m.prototype.sortStackingContexts=function(e){var t;e.contexts.sort((t=e.contexts.slice(0),function(e,i){return e.cssInt("zIndex")+t.indexOf(e)/t.length-(i.cssInt("zIndex")+t.indexOf(i)/t.length)})),e.contexts.forEach(this.sortStackingContexts,this)},m.prototype.parseTextBounds=function(e){return function(t,i,n){if("none"!==e.parent.css("textDecoration").substr(0,4)||0!==t.trim().length){if(this.support.rangeBounds&&!e.parent.hasTransform()){var r=n.slice(0,i).join("").length;return this.getRangeBounds(e.node,r,t.length)}if(e.node&&"string"==typeof e.node.data){var o=e.node.splitText(t.length),a=this.getWrapperBounds(e.node,e.parent.hasTransform());return e.node=o,a}}else(!this.support.rangeBounds||e.parent.hasTransform())&&(e.node=e.node.splitText(t.length));return{}}},m.prototype.getWrapperBounds=function(e,t){var i=e.ownerDocument.createElement("html2canvaswrapper"),n=e.parentNode,r=e.cloneNode(!0);i.appendChild(e.cloneNode(!0)),n.replaceChild(i,e);var o=t?_(i):f(i);return n.replaceChild(r,i),o},m.prototype.getRangeBounds=function(e,t,i){var n=this.range||(this.range=e.ownerDocument.createRange());return n.setStart(e,t),n.setEnd(e,t+i),n.getBoundingClientRect()},m.prototype.parse=function(e){var t=e.contexts.filter(E),i=e.children.filter(N),n=i.filter(B(D)),r=n.filter(B(O)).filter(B(L)),o=i.filter(B(O)).filter(D),a=n.filter(B(O)).filter(L),s=e.contexts.concat(n.filter(O)).filter(A),l=e.children.filter(U).filter(R),u=e.contexts.filter(P);t.concat(r).concat(o).concat(a).concat(s).concat(l).concat(u).forEach((function(e){this.renderQueue.push(e),M(e)&&(this.parse(e),this.renderQueue.push(new x))}),this)},m.prototype.paint=function(e){try{e instanceof x?this.renderer.ctx.restore():U(e)?(F(e.parent)&&e.parent.appendToDOM(),this.paintText(e),F(e.parent)&&e.parent.cleanDOM()):this.paintNode(e)}catch(e){if(n(e),this.options.strict)throw e}},m.prototype.paintNode=function(e){M(e)&&(this.renderer.setOpacity(e.opacity),this.renderer.ctx.save(),e.hasTransform()&&this.renderer.setTransform(e.parseTransform())),"INPUT"===e.node.nodeName&&"checkbox"===e.node.type?this.paintCheckbox(e):"INPUT"===e.node.nodeName&&"radio"===e.node.type?this.paintRadio(e):this.paintElement(e)},m.prototype.paintElement=function(e){var t=e.parseBounds();this.renderer.clip(e.backgroundClip,(function(){this.renderer.renderBackground(e,t,e.borders.borders.map(G))}),this,e),this.renderer.mask(e.backgroundClip,(function(){this.renderer.renderShadows(e,e.borders.clip)}),this,e),this.renderer.clip(e.clip,(function(){this.renderer.renderBorders(e.borders.borders)}),this,e),this.renderer.clip(e.backgroundClip,(function(){switch(e.node.nodeName){case"svg":case"IFRAME":var i=this.images.get(e.node);i?this.renderer.renderImage(e,t,e.borders,i):n("Error loading <"+e.node.nodeName+">",e.node);break;case"IMG":var r=this.images.get(e.node.src);r?this.renderer.renderImage(e,t,e.borders,r):n("Error loading <img>",e.node.src);break;case"CANVAS":this.renderer.renderImage(e,t,e.borders,{image:e.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(e)}}),this,e)},m.prototype.paintCheckbox=function(e){var t=e.parseBounds(),i=Math.min(t.width,t.height),n={width:i-1,height:i-1,top:t.top,left:t.left},r=[3,3],o=[r,r,r,r],a=[1,1,1,1].map((function(e){return{color:new u("#A5A5A5"),width:e}})),s=b(n,o,a);this.renderer.clip(e.backgroundClip,(function(){this.renderer.rectangle(n.left+1,n.top+1,n.width-2,n.height-2,new u("#DEDEDE")),this.renderer.renderBorders(y(a,n,s,o)),e.node.checked&&(this.renderer.font(new u("#424242"),"normal","normal","bold",i-3+"px","arial"),this.renderer.text("✔",n.left+i/6,n.top+i-1))}),this,e)},m.prototype.paintRadio=function(e){var t=e.parseBounds(),i=Math.min(t.width,t.height)-2;this.renderer.clip(e.backgroundClip,(function(){this.renderer.circleStroke(t.left+1,t.top+1,i,new u("#DEDEDE"),1,new u("#A5A5A5")),e.node.checked&&this.renderer.circle(Math.ceil(t.left+i/4)+1,Math.ceil(t.top+i/4)+1,Math.floor(i/2),new u("#424242"))}),this,e)},m.prototype.paintFormValue=function(e){var t=e.getValue();if(t.length>0){var i=e.node.ownerDocument,r=i.createElement("html2canvaswrapper");["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"].forEach((function(t){try{r.style[t]=e.css(t)}catch(e){n("html2canvas: Parse: Exception caught in renderFormValue: "+e.message)}}));var o=e.parseBounds();r.style.position="fixed",r.style.left=o.left+"px",r.style.top=o.top+"px",r.textContent=t,i.body.appendChild(r),this.paintText(new a(r.firstChild,e)),i.body.removeChild(r)}},m.prototype.paintText=function(e){e.applyTextTransform();var t,i=r.ucs2.decode(e.node.data),n=(!this.options.letterRendering||/^(normal|none|0px)$/.test(e.parent.css("letterSpacing")))&&(t=e.node.data,!/[^\u0000-\u00ff]/.test(t)),o=n?function(e){for(var t,i=[],n=0,o=!1;e.length;)W(e[n])===o?((t=e.splice(0,n)).length&&i.push(r.ucs2.encode(t)),o=!o,n=0):n++,n>=e.length&&(t=e.splice(0,n)).length&&i.push(r.ucs2.encode(t));return i}(i):i.map((function(e){return r.ucs2.encode([e])}));n||(e.parent.node.style.fontVariantLigatures="none");var a=e.parent.fontWeight(),s=e.parent.css("fontSize"),l=e.parent.css("fontFamily"),u=e.parent.parseTextShadows();this.renderer.font(e.parent.color("color"),e.parent.css("fontStyle"),e.parent.css("fontVariant"),a,s,l),u.length?this.renderer.fontShadow(u[0].color,u[0].offsetX,u[0].offsetY,u[0].blur):this.renderer.clearShadow(),this.renderer.clip(e.parent.clip,(function(){o.map(this.parseTextBounds(e),this).forEach((function(t,i){t&&(this.renderer.text(o[i],t.left,t.bottom),this.renderTextDecoration(e.parent,t,this.fontMetrics.getMetrics(l,s)))}),this)}),this,e.parent)},m.prototype.renderTextDecoration=function(e,t,i){switch(e.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(t.left,Math.round(t.top+i.baseline+i.lineWidth),t.width,1,e.color("color"));break;case"overline":this.renderer.rectangle(t.left,Math.round(t.top),t.width,1,e.color("color"));break;case"line-through":this.renderer.rectangle(t.left,Math.ceil(t.top+i.middle+i.lineWidth),t.width,1,e.color("color"))}};var v={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};function y(e,t,i,n){var r={top:t.top+e[0].width/2,right:t.right-e[1].width/2,bottom:t.bottom-e[2].width/2,left:t.left+e[3].width/2};return e.map((function(o,a){if(o.width>0){var s=t.left,l=t.top,u=t.width,c=t.height-e[2].width;switch(a){case 0:c=e[0].width,o.args=C({c1:[s,l],c2:[s+u,l],c3:[s+u-e[1].width,l+c],c4:[s+e[3].width,l+c]},n[0],n[1],i.topLeftOuter,i.topLeftInner,i.topRightOuter,i.topRightInner),o.pathArgs=S({c1:[r.left,r.top],c2:[r.right,r.top]},n[0],n[1],i.topLeft,i.topRight);break;case 1:s=t.left+t.width-e[1].width,u=e[1].width,o.args=C({c1:[s+u,l],c2:[s+u,l+c+e[2].width],c3:[s,l+c],c4:[s,l+e[0].width]},n[1],n[2],i.topRightOuter,i.topRightInner,i.bottomRightOuter,i.bottomRightInner),o.pathArgs=S({c1:[r.right,r.top],c2:[r.right,r.bottom]},n[1],n[2],i.topRight,i.bottomRight);break;case 2:l=l+t.height-e[2].width,c=e[2].width,o.args=C({c1:[s+u,l+c],c2:[s,l+c],c3:[s+e[3].width,l],c4:[s+u-e[3].width,l]},n[2],n[3],i.bottomRightOuter,i.bottomRightInner,i.bottomLeftOuter,i.bottomLeftInner),o.pathArgs=S({c1:[r.right,r.bottom],c2:[r.left,r.bottom]},n[2],n[3],i.bottomRight,i.bottomLeft);break;case 3:u=e[3].width,o.args=C({c1:[s,l+c+e[2].width],c2:[s,l],c3:[s+u,l+e[0].width],c4:[s+u,l+c]},n[3],n[0],i.bottomLeftOuter,i.bottomLeftInner,i.topLeftOuter,i.topLeftInner),o.pathArgs=S({c1:[r.left,r.bottom],c2:[r.left,r.top]},n[3],n[0],i.bottomLeft,i.topLeft)}}return o}))}function $(e,t,i,n){var r=(Math.sqrt(2)-1)/3*4,o=i*r,a=n*r,s=e+i,l=t+n;return{topLeft:T({x:e,y:l},{x:e,y:l-a},{x:s-o,y:t},{x:s,y:t}),topRight:T({x:e,y:t},{x:e+o,y:t},{x:s,y:l-a},{x:s,y:l}),bottomRight:T({x:s,y:t},{x:s,y:t+a},{x:e+o,y:l},{x:e,y:l}),bottomLeft:T({x:s,y:l},{x:s-o,y:l},{x:e,y:t+a},{x:e,y:t})}}function b(e,t,i){var n=e.left,r=e.top,o=e.width,a=e.height,s=t[0][0]<o/2?t[0][0]:o/2,l=t[0][1]<a/2?t[0][1]:a/2,u=t[1][0]<o/2?t[1][0]:o/2,c=t[1][1]<a/2?t[1][1]:a/2,h=t[2][0]<o/2?t[2][0]:o/2,d=t[2][1]<a/2?t[2][1]:a/2,f=t[3][0]<o/2?t[3][0]:o/2,p=t[3][1]<a/2?t[3][1]:a/2,_=o-u,m=a-d,g=o-h,x=a-p;return{topLeft:$(n+i[3].width/2,r+i[0].width/2,Math.max(0,s-i[3].width/2),Math.max(0,l-i[0].width/2)).topLeft.subdivide(.5),topRight:$(n+Math.min(_,o+i[3].width/2),r+i[0].width/2,_>o+i[3].width/2?0:u-i[3].width/2,c-i[0].width/2).topRight.subdivide(.5),bottomRight:$(n+Math.min(g,o-i[3].width/2),r+Math.min(m,a+i[0].width/2),Math.max(0,h-i[1].width/2),d-i[2].width/2).bottomRight.subdivide(.5),bottomLeft:$(n+i[3].width/2,r+x,Math.max(0,f-i[3].width/2),p-i[2].width/2).bottomLeft.subdivide(.5),topLeftOuter:$(n,r,s,l).topLeft.subdivide(.5),topLeftInner:$(n+i[3].width,r+i[0].width,Math.max(0,s-i[3].width),Math.max(0,l-i[0].width)).topLeft.subdivide(.5),topRightOuter:$(n+_,r,u,c).topRight.subdivide(.5),topRightInner:$(n+Math.min(_,o+i[3].width),r+i[0].width,_>o+i[3].width?0:u-i[3].width,c-i[0].width).topRight.subdivide(.5),bottomRightOuter:$(n+g,r+m,h,d).bottomRight.subdivide(.5),bottomRightInner:$(n+Math.min(g,o-i[3].width),r+Math.min(m,a+i[0].width),Math.max(0,h-i[1].width),d-i[2].width).bottomRight.subdivide(.5),bottomLeftOuter:$(n,r+x,f,p).bottomLeft.subdivide(.5),bottomLeftInner:$(n+i[3].width,r+x,Math.max(0,f-i[3].width),p-i[2].width).bottomLeft.subdivide(.5)}}function T(e,t,i,n){var r=function(e,t,i){return{x:e.x+(t.x-e.x)*i,y:e.y+(t.y-e.y)*i}};return{start:e,startControl:t,endControl:i,end:n,subdivide:function(o){var a=r(e,t,o),s=r(t,i,o),l=r(i,n,o),u=r(a,s,o),c=r(s,l,o),h=r(u,c,o);return[T(e,a,u,h),T(h,c,l,n)]},curveTo:function(e){e.push(["bezierCurve",t.x,t.y,i.x,i.y,n.x,n.y])},curveToReversed:function(n){n.push(["bezierCurve",i.x,i.y,t.x,t.y,e.x,e.y])}}}function C(e,t,i,n,r,o,a){var s=[];return t[0]>0||t[1]>0?(s.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(s)):s.push(["line",e.c1[0],e.c1[1]]),i[0]>0||i[1]>0?(s.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(s),s.push(["line",a[0].end.x,a[0].end.y]),a[0].curveToReversed(s)):(s.push(["line",e.c2[0],e.c2[1]]),s.push(["line",e.c3[0],e.c3[1]])),t[0]>0||t[1]>0?(s.push(["line",r[1].end.x,r[1].end.y]),r[1].curveToReversed(s)):s.push(["line",e.c4[0],e.c4[1]]),s}function S(e,t,i,n,r){var o=[];return t[0]>0||t[1]>0?(o.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(o)):o.push(["line",e.c1[0],e.c1[1]]),i[0]>0||i[1]>0?(o.push(["line",r[0].start.x,r[0].start.y]),r[0].curveTo(o)):o.push(["line",e.c2[0],e.c2[1]]),o}function w(e,t,i,n,r,o,a){t[0]>0||t[1]>0?(e.push(["line",n[0].start.x,n[0].start.y]),n[0].curveTo(e),n[1].curveTo(e)):e.push(["line",o,a]),(i[0]>0||i[1]>0)&&e.push(["line",r[0].start.x,r[0].start.y])}function E(e){return e.cssInt("zIndex")<0}function P(e){return e.cssInt("zIndex")>0}function A(e){return 0===e.cssInt("zIndex")}function L(e){return-1!==["inline","inline-block","inline-table"].indexOf(e.css("display"))}function M(e){return e instanceof c}function R(e){return e.node.data.trim().length>0}function I(e){return e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE}function O(e){return"static"!==e.css("position")}function D(e){return"none"!==e.css("float")}function B(e){var t=this;return function(){return!e.apply(t,arguments)}}function N(e){return e.node.nodeType===Node.ELEMENT_NODE}function F(e){return!0===e.isPseudoElement}function U(e){return e.node.nodeType===Node.TEXT_NODE}function z(e){return parseInt(e,10)}function G(e){return e.width}function V(e){return e.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(e.node.nodeName)}function k(e){return[].concat.apply([],e)}function W(e){return-1!==[32,13,10,9,45].indexOf(e)}m.prototype.parseBorders=function(e){var t,i=e.parseBounds(),n=(t=e,["TopLeft","TopRight","BottomRight","BottomLeft"].map((function(e){var i=t.css("border"+e+"Radius").split(" ");return i.length<=1&&(i[1]=i[0]),i.map(z)}))),r=["Top","Right","Bottom","Left"].map((function(t,i){var n=e.css("border"+t+"Style"),r=e.color("border"+t+"Color");"inset"===n&&r.isBlack()&&(r=new u([255,255,255,r.a]));var o=v[n]?v[n][i]:null;return{width:e.cssInt("border"+t+"Width"),color:o?r[o[0]](o[1]):r,style:n,pathArgs:null,args:null}})),o=b(i,n,r);return{clip:this.parseBackgroundClip(e,o,r,n,i),borders:y(r,i,o,n)}},m.prototype.parseBackgroundClip=function(e,t,i,n,r){var o=[];switch(e.css("backgroundClip")){case"content-box":case"padding-box":w(o,n[0],n[1],t.topLeftInner,t.topRightInner,r.left+i[3].width,r.top+i[0].width),w(o,n[1],n[2],t.topRightInner,t.bottomRightInner,r.left+r.width-i[1].width,r.top+i[0].width),w(o,n[2],n[3],t.bottomRightInner,t.bottomLeftInner,r.left+r.width-i[1].width,r.top+r.height-i[2].width),w(o,n[3],n[0],t.bottomLeftInner,t.topLeftInner,r.left+i[3].width,r.top+r.height-i[2].width);break;default:w(o,n[0],n[1],t.topLeftOuter,t.topRightOuter,r.left,r.top),w(o,n[1],n[2],t.topRightOuter,t.bottomRightOuter,r.left+r.width,r.top),w(o,n[2],n[3],t.bottomRightOuter,t.bottomLeftOuter,r.left+r.width,r.top+r.height),w(o,n[3],n[0],t.bottomLeftOuter,t.topLeftOuter,r.left,r.top+r.height)}return o},t.exports=m},{"./color":3,"./fontmetrics":7,"./log":13,"./nodecontainer":14,"./pseudoelementcontainer":18,"./stackingcontext":21,"./textcontainer":25,"./utils":26,punycode:1}],16:[function(e,t,i){var n=e("./xhr"),r=e("./utils"),o=e("./log"),a=e("./clone"),s=r.decode64;function l(e,t,i){var r="withCredentials"in new XMLHttpRequest;if(!t)return Promise.reject("No proxy configured");var o=h(r),a=d(t,e,o);return r?n(a):c(i,a,o).then((function(e){return s(e.content)}))}var u=0;function c(e,t,i){return new Promise((function(n,r){var o=e.createElement("script"),a=function(){delete window.html2canvas.proxy[i],e.body.removeChild(o)};window.html2canvas.proxy[i]=function(e){a(),n(e)},o.src=t,o.onerror=function(e){a(),r(e)},e.body.appendChild(o)}))}function h(e){return e?"":"html2canvas_"+Date.now()+"_"+ ++u+"_"+Math.round(1e5*Math.random())}function d(e,t,i){return e+"?url="+encodeURIComponent(t)+(i.length?"&callback=html2canvas.proxy."+i:"")}i.Proxy=l,i.ProxyURL=function(e,t,i){var n="crossOrigin"in new Image,r=h(n),o=d(t,e,r);return n?Promise.resolve(o):c(i,o,r).then((function(e){return"data:"+e.type+";base64,"+e.content}))},i.loadUrlDocument=function(e,t,i,n,r,s){return new l(e,t,window.document).then((u=e,function(e){var t,i=new DOMParser;try{t=i.parseFromString(e,"text/html")}catch{o("DOMParser not supported, falling back to createHTMLDocument"),t=document.implementation.createHTMLDocument("");try{t.open(),t.write(e),t.close()}catch{o("createHTMLDocument write not supported, falling back to document.body.innerHTML"),t.body.innerHTML=e}}var n=t.querySelector("base");if(!n||!n.href.host){var r=t.createElement("base");r.href=u,t.head.insertBefore(r,t.head.firstChild)}return t})).then((function(e){return a(e,i,n,r,s,0,0)}));var u}},{"./clone":2,"./log":13,"./utils":26,"./xhr":28}],17:[function(e,t,i){var n=e("./proxy").ProxyURL;t.exports=function(e,t){var i=document.createElement("a");i.href=e,e=i.href,this.src=e,this.image=new Image;var r=this;this.promise=new Promise((function(i,o){r.image.crossOrigin="Anonymous",r.image.onload=i,r.image.onerror=o,new n(e,t,document).then((function(e){r.image.src=e})).catch(o)}))}},{"./proxy":16}],18:[function(e,t,i){var n=e("./nodecontainer");function r(e,t,i){n.call(this,e,t),this.isPseudoElement=!0,this.before=":before"===i}r.prototype.cloneTo=function(e){r.prototype.cloneTo.call(this,e),e.isPseudoElement=!0,e.before=this.before},r.prototype=Object.create(n.prototype),r.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},r.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},r.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",t.exports=r},{"./nodecontainer":14}],19:[function(e,t,i){var n=e("./log");function r(e,t,i,n,r){this.width=e,this.height=t,this.images=i,this.options=n,this.document=r}r.prototype.renderImage=function(e,t,i,n){var r=e.cssInt("paddingLeft"),o=e.cssInt("paddingTop"),a=e.cssInt("paddingRight"),s=e.cssInt("paddingBottom"),l=i.borders,u=t.width-(l[1].width+l[3].width+r+a),c=t.height-(l[0].width+l[2].width+o+s);this.drawImage(n,0,0,n.image.width||u,n.image.height||c,t.left+r+l[3].width,t.top+o+l[0].width,u,c)},r.prototype.renderBackground=function(e,t,i){t.height>0&&t.width>0&&(this.renderBackgroundColor(e,t),this.renderBackgroundImage(e,t,i))},r.prototype.renderBackgroundColor=function(e,t){var i=e.color("backgroundColor");i.isTransparent()||this.rectangle(t.left,t.top,t.width,t.height,i)},r.prototype.renderShadows=function(e,t){var i=e.css("boxShadow");if("none"!==i){var n=i.split(/,(?![^(]*\))/);this.shadow(t,n)}},r.prototype.renderBorders=function(e){e.forEach(this.renderBorder,this)},r.prototype.renderBorder=function(e){if(!e.color.isTransparent()&&null!==e.args)if("dashed"===e.style||"dotted"===e.style){var t="dashed"===e.style?3:e.width;this.ctx.setLineDash([t]),this.path(e.pathArgs),this.ctx.strokeStyle=e.color,this.ctx.lineWidth=e.width,this.ctx.stroke()}else this.drawShape(e.args,e.color)},r.prototype.renderBackgroundImage=function(e,t,i){e.parseBackgroundImages().reverse().forEach((function(r,o,a){switch(r.method){case"url":var s=this.images.get(r.args[0]);s?this.renderBackgroundRepeating(e,t,s,a.length-(o+1),i):n("Error loading background-image",r.args[0]);break;case"linear-gradient":case"gradient":var l=this.images.get(r.value);l?this.renderBackgroundGradient(l,t,i):n("Error loading background-image",r.args[0]);break;case"none":break;default:n("Unknown background-image type",r.args[0])}}),this)},r.prototype.renderBackgroundRepeating=function(e,t,i,n,r){var o=e.parseBackgroundSize(t,i.image,n),a=e.parseBackgroundPosition(t,i.image,n,o);switch(e.parseBackgroundRepeat(n)){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(i,a,o,t,t.left+r[3],t.top+a.top+r[0],99999,o.height,r);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(i,a,o,t,t.left+a.left+r[3],t.top+r[0],o.width,99999,r);break;case"no-repeat":this.backgroundRepeatShape(i,a,o,t,t.left+a.left+r[3],t.top+a.top+r[0],o.width,o.height,r);break;default:this.renderBackgroundRepeat(i,a,o,{top:t.top,left:t.left},r[3],r[0])}},t.exports=r},{"./log":13}],20:[function(e,t,i){var n=e("../renderer"),r=e("../lineargradientcontainer"),o=e("../log");function a(e,t){n.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.options.canvas||(this.options.dpi&&(this.options.scale=this.options.dpi/96),this.options.scale?(this.canvas.style.width=e+"px",this.canvas.style.height=t+"px",this.canvas.width=Math.floor(e*this.options.scale),this.canvas.height=Math.floor(t*this.options.scale),this.ctx.scale(this.options.scale,this.options.scale)):(this.canvas.width=e,this.canvas.height=t)),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},o("Initialized CanvasRenderer with size",e,"x",t)}function s(e){return e.length>0}a.prototype=Object.create(n.prototype),a.prototype.setFillStyle=function(e){return this.ctx.fillStyle="object"==typeof e&&e.isColor?e.toString():e,this.ctx},a.prototype.rectangle=function(e,t,i,n,r){this.setFillStyle(r).fillRect(e,t,i,n)},a.prototype.circle=function(e,t,i,n){this.setFillStyle(n),this.ctx.beginPath(),this.ctx.arc(e+i/2,t+i/2,i/2,0,2*Math.PI,!0),this.ctx.closePath(),this.ctx.fill()},a.prototype.circleStroke=function(e,t,i,n,r,o){this.circle(e,t,i,n),this.ctx.strokeStyle=o.toString(),this.ctx.stroke()},a.prototype.shadow=function(e,t){var i=this.setFillStyle("white");i.save(),this.shape(e),t.forEach((function(e){var t=function(e){var t={color:/^(#|rgb|hsl|(?!(inset|initial|inherit))\D+)/i,inset:/^inset/i,px:/px$/i},i=["x","y","blur","spread"],n=e.split(/ (?![^(]*\))/),r={};for(var o in t)r[o]=n.filter(t[o].test.bind(t[o])),r[o]=0===r[o].length?null:1===r[o].length?r[o][0]:r[o];for(var a=0;a<r.px.length;a++)r[i[a]]=parseInt(r.px[a]);return r}(e);t.inset||(i.shadowOffsetX=t.x,i.shadowOffsetY=t.y,i.shadowColor=t.color,i.shadowBlur=t.blur,i.fill())}),this),i.restore()},a.prototype.drawShape=function(e,t){this.shape(e),this.setFillStyle(t).fill()},a.prototype.taints=function(e){if(null===e.tainted){this.taintCtx.drawImage(e.image,0,0);try{this.taintCtx.getImageData(0,0,1,1),e.tainted=!1}catch{this.taintCtx=document.createElement("canvas").getContext("2d"),e.tainted=!0}}return e.tainted},a.prototype.drawImage=function(e,t,i,n,r,o,a,s,l){(!this.taints(e)||this.options.allowTaint)&&this.ctx.drawImage(e.image,t,i,n,r,o,a,s,l)},a.prototype.clip=function(e,t,i,n){this.ctx.save(),n&&n.hasTransform()?(this.setTransform(n.inverseTransform()),e.filter(s).forEach((function(e){this.shape(e).clip()}),this),this.setTransform(n.parseTransform())):e.filter(s).forEach((function(e){this.shape(e).clip()}),this),t.call(i),this.ctx.restore()},a.prototype.mask=function(e,t,i,n){var r=e[e.length-1];if(r&&r.length){var o=[["rect",this.canvas.width,0,-this.canvas.width,this.canvas.height]].concat(r).concat([r[0]]);e=e.slice(0,-1).concat([o])}this.clip(e,t,i,n)},a.prototype.shape=function(e){return this.ctx.beginPath(),e.forEach((function(e,t){"rect"===e[0]?this.ctx.rect.apply(this.ctx,e.slice(1)):this.ctx[0===t?"moveTo":e[0]+"To"].apply(this.ctx,e.slice(1))}),this),this.ctx.closePath(),this.ctx},a.prototype.path=function(e){return this.ctx.beginPath(),e.forEach((function(e,t){"rect"===e[0]?this.ctx.rect.apply(this.ctx,e.slice(1)):this.ctx[0===t?"moveTo":e[0]+"To"].apply(this.ctx,e.slice(1))}),this),this.ctx},a.prototype.font=function(e,t,i,n,r,o){i=/^(normal|small-caps)$/i.test(i)?i:"",this.setFillStyle(e).font=[t,i,n,r,o].join(" ").split(",")[0]},a.prototype.fontShadow=function(e,t,i,n){this.setVariable("shadowColor",e.toString()).setVariable("shadowOffsetY",t).setVariable("shadowOffsetX",i).setVariable("shadowBlur",n)},a.prototype.clearShadow=function(){this.setVariable("shadowColor","rgba(0,0,0,0)")},a.prototype.setOpacity=function(e){this.ctx.globalAlpha=e},a.prototype.setTransform=function(e){this.ctx.translate(e.origin[0],e.origin[1]),this.ctx.transform.apply(this.ctx,e.matrix),this.ctx.translate(-e.origin[0],-e.origin[1])},a.prototype.setVariable=function(e,t){return this.variables[e]!==t&&(this.variables[e]=this.ctx[e]=t),this},a.prototype.text=function(e,t,i){this.ctx.fillText(e,t,i)},a.prototype.backgroundRepeatShape=function(e,t,i,n,r,o,a,s,l){var u=[["line",Math.round(r),Math.round(o)],["line",Math.round(r+a),Math.round(o)],["line",Math.round(r+a),Math.round(s+o)],["line",Math.round(r),Math.round(s+o)]];this.clip([u],(function(){this.renderBackgroundRepeat(e,t,i,n,l[3],l[0])}),this)},a.prototype.renderBackgroundRepeat=function(e,t,i,n,r,o){var a=Math.round(n.left+t.left+r),s=Math.round(n.top+t.top+o);this.setFillStyle(this.ctx.createPattern(this.resizeImage(e,i),"repeat")),this.ctx.translate(a,s),this.ctx.fill(),this.ctx.translate(-a,-s)},a.prototype.renderBackgroundGradient=function(e,t){if(e instanceof r){var i=this.ctx.createLinearGradient(t.left+t.width*e.x0,t.top+t.height*e.y0,t.left+t.width*e.x1,t.top+t.height*e.y1);e.colorStops.forEach((function(e){i.addColorStop(e.stop,e.color.toString())})),this.rectangle(t.left,t.top,t.width,t.height,i)}},a.prototype.resizeImage=function(e,t){var i=e.image;if(i.width===t.width&&i.height===t.height)return i;var n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(i,0,0,i.width,i.height,0,0,t.width,t.height),n},t.exports=a},{"../lineargradientcontainer":12,"../log":13,"../renderer":19}],21:[function(e,t,i){var n=e("./nodecontainer");function r(e,t,i,r){n.call(this,i,r),this.ownStacking=e,this.contexts=[],this.children=[],this.opacity=(this.parent?this.parent.stack.opacity:1)*t}r.prototype=Object.create(n.prototype),r.prototype.getParentStack=function(e){var t=this.parent?this.parent.stack:null;return t?t.ownStacking?t:t.getParentStack(e):e.stack},t.exports=r},{"./nodecontainer":14}],22:[function(e,t,i){function n(e){this.rangeBounds=this.testRangeBounds(e),this.cors=this.testCORS(),this.svg=this.testSVG()}n.prototype.testRangeBounds=function(e){var t,i,n=!1;return e.createRange&&((t=e.createRange()).getBoundingClientRect&&((i=e.createElement("boundtest")).style.height="123px",i.style.display="block",e.body.appendChild(i),t.selectNode(i),123===t.getBoundingClientRect().height&&(n=!0),e.body.removeChild(i))),n},n.prototype.testCORS=function(){return typeof(new Image).crossOrigin<"u"},n.prototype.testSVG=function(){var e=new Image,t=document.createElement("canvas"),i=t.getContext("2d");e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(e,0,0),t.toDataURL()}catch{return!1}return!0},t.exports=n},{}],23:[function(e,t,i){var n=e("./xhr"),r=e("./utils").decode64;function o(e){this.src=e,this.image=null;var t=this;this.promise=this.hasFabric().then((function(){return t.isInline(e)?Promise.resolve(t.inlineFormatting(e)):n(e)})).then((function(e){return new Promise((function(i){window.html2canvas.svg.fabric.loadSVGFromString(e,t.createCanvas.call(t,i))}))}))}o.prototype.hasFabric=function(){return window.html2canvas.svg&&window.html2canvas.svg.fabric?Promise.resolve():Promise.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},o.prototype.inlineFormatting=function(e){return/^data:image\/svg\+xml;base64,/.test(e)?this.decode64(this.removeContentType(e)):this.removeContentType(e)},o.prototype.removeContentType=function(e){return e.replace(/^data:image\/svg\+xml(;base64)?,/,"")},o.prototype.isInline=function(e){return/^data:image\/svg\+xml/i.test(e)},o.prototype.createCanvas=function(e){var t=this;return function(i,n){var r=new window.html2canvas.svg.fabric.StaticCanvas("c");t.image=r.lowerCanvasEl,r.setWidth(n.width).setHeight(n.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(i,n)).renderAll(),e(r.lowerCanvasEl)}},o.prototype.decode64=function(e){return"function"==typeof window.atob?window.atob(e):r(e)},t.exports=o},{"./utils":26,"./xhr":28}],24:[function(e,t,i){var n=e("./svgcontainer");function r(e,t){this.src=e,this.image=null;var i=this;this.promise=t?new Promise((function(t,n){i.image=new Image,i.image.onload=t,i.image.onerror=n,i.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(e),!0===i.image.complete&&t(i.image)})):this.hasFabric().then((function(){return new Promise((function(t){window.html2canvas.svg.fabric.parseSVGDocument(e,i.createCanvas.call(i,t))}))}))}r.prototype=Object.create(n.prototype),t.exports=r},{"./svgcontainer":23}],25:[function(e,t,i){var n=e("./nodecontainer");function r(e,t){n.call(this,e,t)}function o(e,t,i){if(e.length>0)return t+i.toUpperCase()}r.prototype=Object.create(n.prototype),r.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},r.prototype.transform=function(e){var t=this.node.data;switch(e){case"lowercase":return t.toLowerCase();case"capitalize":return t.replace(/(^|\s|:|-|\(|\))([a-z])/g,o);case"uppercase":return t.toUpperCase();default:return t}},t.exports=r},{"./nodecontainer":14}],26:[function(e,t,i){i.smallImage=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},i.bind=function(e,t){return function(){return e.apply(t,arguments)}},i.decode64=function(e){var t,i,n,r,o,a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=e.length,c="";for(t=0;t<u;t+=4)o=l.indexOf(e[t])<<2|(i=l.indexOf(e[t+1]))>>4,a=(15&i)<<4|(n=l.indexOf(e[t+2]))>>2,s=(3&n)<<6|(r=l.indexOf(e[t+3])),c+=64===n?String.fromCharCode(o):64===r||-1===r?String.fromCharCode(o,a):String.fromCharCode(o,a,s);return c},i.getBounds=function(e){if(e.getBoundingClientRect){var t=e.getBoundingClientRect(),i=null==e.offsetWidth?t.width:e.offsetWidth;return{top:t.top,bottom:t.bottom||t.top+t.height,right:t.left+i,left:t.left,width:i,height:null==e.offsetHeight?t.height:e.offsetHeight}}return{}},i.offsetBounds=function(e){var t=e.offsetParent?i.offsetBounds(e.offsetParent):{top:0,left:0};return{top:e.offsetTop+t.top,bottom:e.offsetTop+e.offsetHeight+t.top,right:e.offsetLeft+t.left+e.offsetWidth,left:e.offsetLeft+t.left,width:e.offsetWidth,height:e.offsetHeight}},i.parseBackgrounds=function(e){var t,i,n,r,o,a,s,l=[],u=0,c=0,h=function(){t&&('"'===i.substr(0,1)&&(i=i.substr(1,i.length-2)),i&&s.push(i),"-"===t.substr(0,1)&&(r=t.indexOf("-",1)+1)>0&&(n=t.substr(0,r),t=t.substr(r)),l.push({prefix:n,method:t.toLowerCase(),value:o,args:s,image:null})),s=[],t=n=i=o=""};return s=[],t=n=i=o="",e.split("").forEach((function(e){if(!(0===u&&" \r\n\t".indexOf(e)>-1)){switch(e){case'"':a?a===e&&(a=null):a=e;break;case"(":if(a)break;if(0===u)return u=1,void(o+=e);c++;break;case")":if(a)break;if(1===u){if(0===c)return u=0,o+=e,void h();c--}break;case",":if(a)break;if(0===u)return void h();if(1===u&&0===c&&!t.match(/^url$/i))return s.push(i),i="",void(o+=e)}o+=e,0===u?t+=e:i+=e}})),h(),l}},{}],27:[function(e,t,i){var n=e("./gradientcontainer");function r(e){n.apply(this,arguments),this.type="linear"===e.args[0]?n.TYPES.LINEAR:n.TYPES.RADIAL}r.prototype=Object.create(n.prototype),t.exports=r},{"./gradientcontainer":9}],28:[function(e,t,i){t.exports=function(e){return new Promise((function(t,i){var n=new XMLHttpRequest;n.open("GET",e),n.onload=function(){200===n.status?t(n.responseText):i(new Error(n.statusText))},n.onerror=function(){i(new Error("Network Error"))},n.send()}))}},{}]},{},[4])(4)}));var _0x269f3b=html2canvas,_0x552b5d=(_0x2ada87=!0,function(e,t){var i=_0x2ada87?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ada87=!1,i}),_0x122dd4=_0x552b5d(void 0,(function(){return _0x122dd4.toString().search("(((.+)+)+)+$").toString().constructor(_0x122dd4).search("(((.+)+)+)+$")})),_0x2ada87;_0x122dd4();class _0x702fc2{constructor(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.rotateX=WebGLPlot.defaultValue(e.rotateX,0),this.rotateY=WebGLPlot.defaultValue(e.rotateY,0),this.rotateZ=WebGLPlot.defaultValue(e.rotateZ,0),this.offsetX=WebGLPlot.defaultValue(e.offsetX,0),this.offsetY=WebGLPlot.defaultValue(e.offsetY,0),this.offsetZ=WebGLPlot.defaultValue(e.offsetZ,0)}}var _0xa0af3e=(_0x4e340f=!0,function(e,t){var i=_0x4e340f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e340f=!1,i}),_0x37e45b=_0xa0af3e(void 0,(function(){return _0x37e45b.toString().search("(((.+)+)+)+$").toString().constructor(_0x37e45b).search("(((.+)+)+)+$")})),_0x4e340f;_0x37e45b();var _0x4574a2=Object.freeze({simple:0,detail:1,notitle:2,notitle2:3,element:4}),_0x145cec=(_0x1e6d2e=!0,function(e,t){var i=_0x1e6d2e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e6d2e=!1,i}),_0x398112=_0x145cec(void 0,(function(){return _0x398112.toString().search("(((.+)+)+)+$").toString().constructor(_0x398112).search("(((.+)+)+)+$")})),_0x1e6d2e;_0x398112();var WebGLPlot$8=window.WebGLPlot=window.WebGLPlot||{};class _0x1aae83{constructor(){this.boxModelMatrix=null,this.symbol=null,this.fixedFrameTransform=WebGLPlot$8.Transforms.localFrameToFixedFrameGenerator("north","west")}static getElement(e){var t=null,i=null;return e===_0x4574a2.detail?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0),i=".popup {position: absolute;border:0.1px solid white;}.popup-content-wrapper {max-height: 200px;overflow-y: auto;text-align: left;/*border-radius: 6px;*/background-color:rgb(48, 123, 250,0.3);}.popup-content {/* margin: 5px 20px;*/color: rgb(255, 255, 255); line-height: 0.5;font-size:xx-small;font-weight:normal;}.popup-content div {text-align: center;background-color: #8585bf;}.popup-content div {line-height: 1;}.popup-content table {margin-left: 1px;margin-right: 3px;}.popup-content table tr {height: 15px;}"):e===_0x4574a2.notitle?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0),i=".popup {z-index:100;position: absolute;/*margin-left:400px;*/border:0.1px solid white;margin:1px;}.popup-content div{color: rgb(255, 255, 255);font-size:small;}.popup-content-wrapper {max-height: 200px;overflow-y: auto;/*height: 133px;padding: 1px;*/text-align: left;/*border-radius: 6px;*/background-color:rgb(67, 60, 252, 0.45);}.popup-content {color: rgb(255, 255, 255); line-height: 1;font-size:xx-small;font-weight:normal;}.popup-content div {line-height: 1;}.popup-content table {margin-left: 1px;margin-right: 3px;}.popup-content table tr {height: 15px;}"):e===_0x4574a2.notitle2?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0),i=".popup {position: absolute;border:0.05px solid white;padding:1px;}.popup-content div{color: rgb(255, 255, 255);font-size:small;}.popup-content-wrapper {height:50%;text-align: left;background-color:rgb(48, 123, 250,0.3);}.popup-content {color: rgb(255, 255, 255); line-height: 1;font-size:xx-small;font-weight:normal;}.popup-content div {line-height: 1;}.popup-content table {margin-left: 1px;margin-right: 3px;}.popup-content table tr {height: 15px;}"):e===_0x4574a2.notitle3?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div class="main"><div id="trackPopUpLink" class="popup-content"></div></div></div></div>').get(0),i=".popup {position: absolute;}.popup-content {padding:11.6px;color: rgb(255, 255, 255); line-height: 1;font-size:xx-small;font-weight:normal;}.popup-content div {line-height: 1;}.popup-content table tr {height: 15px;}.popup-content-wrapper .main{background: url('../Source/Assets/Images/overlayer.png') no-repeat;background-size: cover;}"):e===_0x4574a2.simple&&(t=$('<div id="trackPopUpContent" class="popup"></div>').get(0),i=".popup {z-index: -1;position: absolute;text-align: center;/*font-weight:bold;*/color: rgb(255, 255, 255);background-color:rgb(255,0,0,0.3);border:0.1px solid red;}"),{element:t,style:i}}static getModelHeight(e){if(void 0===e)return 0;this.symbol=e.clone();var t=e.localPoints[0].clone(),i=e._model;let n=i.modelMatrix;var r=i._boundingSphere.center;let o=r.x>r.y?r.x:r.y;o=(o>r.z?o:r.z)*i.scale;var a=_0x2d6822.getModelMinAndMaxCorner(i),s=i.scale,l=WebGLPlot$8.Cartesian3.multiplyByScalar(WebGLPlot$8.Cartesian3.fromElements(a.minCorner.z,a.minCorner.x,a.minCorner.y),s,new WebGLPlot$8.Cartesian3),u=WebGLPlot$8.Cartesian3.multiplyByScalar(WebGLPlot$8.Cartesian3.fromElements(a.maxCorner.z,a.maxCorner.x,a.maxCorner.y),s,new WebGLPlot$8.Cartesian3),c=new WebGLPlot$8.AxisAlignedBoundingBox(l,u);this.BoundingBoxCenter=c.center,this.boxModelMatrix=this.computeBoundingBoxMatrix(t,e._modelRotate,n.clone(),this.fixedFrameTransform);var h=this.getLinePts(t,u,l,this.boxModelMatrix),d=[];for(let e=0;e<h.length;e++){let t=WebGLPlot$8.Cartographic.fromCartesian(h[e]);var f=WebGLPlot$8.CesiumMath.toDegrees(t.latitude),p=WebGLPlot$8.CesiumMath.toDegrees(t.longitude);let i=t.height;d.push({x:p,y:f,z:i})}return d}static getLinePts(e,t,i,n){var r=0,o=0,a=0,s=0;return WebGLPlot$8.defined(t)&&WebGLPlot$8.defined(i)?(r=Math.abs(t.x-i.x)/2,o=Math.abs(t.y-i.y)/2,a=i.z<=0?t.z:t.z-i.z,s=r>o?o:r):(s=(this.centerMax+this.modelRadius)/2,a=1.5*this.centerMax+this.modelRadius/2),this.rotateCircleCenter=WebGLPlot$8.Cartesian3.fromDegrees(e.x,e.y,a+e.z),this.computeHeightLines(r,o,s,a,n)}static computeHeightLines(e,t,i,n,r){var o=[],a=new WebGLPlot$8.Cartesian3,s=new WebGLPlot$8.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot$8.Cartesian3.fromDegrees(this.symbol.localPoints[0].x,this.symbol.localPoints[0].y,this.symbol.localPoints[0].z),h=new WebGLPlot$8.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.symbol?h.heading=d*this.symbol._modelRotate.z:h.heading=d*this.symbol.vectorRotate.z;var f=WebGLPlot$8.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot$8.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot$8.Cartesian3.multiplyByScalar(new WebGLPlot$8.Cartesian3(l,1,u),i,s),a=WebGLPlot$8.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot$8.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot$8.Cartesian3.multiplyByScalar(new WebGLPlot$8.Cartesian3(l,1,.7*u),i,s),a=WebGLPlot$8.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot$8.Cartesian3(a.x,a.y,a.z)),o}static computeBoundingBoxMatrix(e,t,i,n){var r=WebGLPlot$8.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot$8.HeadingPitchRoll,a=Math.PI/180;return o.pitch=0,o.roll=0,o.heading=a*t.z+90*a,WebGLPlot$8.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot$8.Ellipsoid.WGS84,n,i),i}}var _0x47bda3=(_0x3df92f=!0,function(e,t){var i=_0x3df92f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3df92f=!1,i}),_0x420519=_0x47bda3(void 0,(function(){return _0x420519.toString().search("(((.+)+)+)+$").toString().constructor(_0x420519).search("(((.+)+)+)+$")})),_0x3df92f;_0x420519();var WebGLPlot$7=window.WebGLPlot=window.WebGLPlot||{};class _0x7480db extends _0x4157b2{constructor(e,t){if(!WebGLPlot$7.defined(t))throw new WebGLPlot$7.DeveloperError("OverLayerPicture viewer is required.");(e=WebGLPlot$7.defaultValue(e,WebGLPlot$7.defaultValue.EMPTY_OBJECT)).scene=t.scene,super(e),this.position=e.position.clone(),this.symbol=e.model,this.content=e.content,this.style=e.style,this.showline=e.showline,this.viewer=t,this.primitive=null,this._element=null,this._images=null,this._id=null,this._divContent=null,this._endPosition=e.position.clone(),this._bimHeight=0,this._modelHeight=0,this._lineEnd=null,this._initOverlayer(),this._initHandler()}updateEffect(e){WebGLPlot$7.defined(e.point)&&(this._getModelHeight(),e.point.z=this._modelHeight,this.setPosition(e.point)),WebGLPlot$7.defined(e.visible)&&this.setVisible(e.visible)}_initOverlayer(){if(this.style===_0x4574a2.detail){var e=_0x1aae83.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);var t="";for(var i in this.content)"title"===i?t="<div>"+this.content[i]+"</div><table><tbody>":t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=WebGLPlot$7.createGuid(),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=WebGLPlot$7.createGuid(),this._divContent=this._element}else if(this.style===_0x4574a2.notitle||this.style===_0x4574a2.notitle2||this.style===_0x4574a2.notitle3){e=_0x1aae83.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t='<div class="information">'+WebGLPlot$7.plotI18n("OVERLAYER_DETAIL")+"</div><table><tbody>";for(var i in this.content)t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=WebGLPlot$7.createGuid(),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=WebGLPlot$7.createGuid(),this._divContent=this._element}else if(this.style===_0x4574a2.simple){e=_0x1aae83.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t=this.content;this._element.id=WebGLPlot$7.createGuid(),this._element.append(t),this._divContent=this._element}else this.style===_0x4574a2.element&&(this.bpDom=document.createElement("div"),this.bpDom.style.cssText=this.content.style.cssText,this.bpDom.id=WebGLPlot$7.createGuid(),this.bpDom.appendChild(this.content),document.body.appendChild(this.bpDom),this._divContent=this.bpDom);var n=this._divContent.offsetWidth,r=this._divContent.offsetHeight,o=1.5,a=document.createElement("canvas"),s=a.getContext("2d");a.width=n*o,a.height=r*o,a.style.width=n+"px",a.style.height=r+"px",s.scale(o,o);var l={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:a,width:n,height:r,foreignObjectRendering:!0,tainTest:!1};_0x269f3b(this._divContent,l).then(function(e){let t=e.toDataURL("image/png",1);this.images=t,this._divContent.style.display="none",this._create()}.bind(this))}_create(){this._getModelHeight(),this._endPosition.x=this.position.x,this._endPosition.y=this.position.y,this._endPosition.z=this._modelHeight,this.position.z=this._endPosition.z,this._id=WebGLPlot$7.createGuid();let e={id:this._id,show:!0,position:WebGLPlot$7.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z),image:this.images,pixelOffset:new WebGLPlot$7.Cartesian2(0,0),horizontalOrigin:WebGLPlot$7.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$7.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,sizeInMeters:!1,scale:1};if(this._billboard&&(_0x38860f.removeBillboard(this._billboard,this.viewer.scene),this._billboard=void 0),this._billboard=_0x38860f.addBillboard(e,this.viewer.scene),!this._polyline){let e={show:this.showline,width:1,positions:[WebGLPlot$7.Cartesian3.fromDegrees(this.position.x,this.position.y,this.position.z),WebGLPlot$7.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z)]};this._polyline=_0x38860f.addOverLayerPolyLine(e,this.viewer.scene)}}_getModelHeight(){var e=_0x1aae83.getModelHeight(this.symbol);let t=this.viewer.scene.sampleHeight(new WebGLPlot$7.Cartographic(WebGLPlot$7.CesiumMath.toRadians(e[0].x),WebGLPlot$7.CesiumMath.toRadians(e[0].y))),i=this.viewer.scene.sampleHeight(new WebGLPlot$7.Cartographic(WebGLPlot$7.CesiumMath.toRadians(e[1].x),WebGLPlot$7.CesiumMath.toRadians(e[1].y)));e[0].z<e[1].z?(this._bimHeight=t,this._modelHeight=e[1].z):(this._bimHeight=i,this._modelHeight=e[0].z)}delete(){this._billboard&&(_0x38860f.removeBillboard(this._billboard,this.viewer.scene),this._billboard=void 0),this._polyline&&(_0x38860f.removeOverLayerPolyLine(this._polyline,this.viewer.scene),this._polyline=void 0)}setPosition(e){this._endPosition=e,this._billboard&&(this._billboard.position=WebGLPlot$7.Cartesian3.fromDegrees(e.x,e.y,e.z)),this._polyline&&(this._polyline.positions=[WebGLPlot$7.Cartesian3.fromDegrees(this.position.x,this.position.y,this.position.z),WebGLPlot$7.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z)])}setShowline(e){this._polyline&&(this.showline=e,this._polyline.show=this.showline)}_initHandler(){var e=!1,t=-1,i=new WebGLPlot$7.ScreenSpaceEventHandler(viewer.scene.canvas);i.setInputAction(function(i){var n=viewer.scene.pick(i.position);n?null===n.id||n.id!==this._id||e?(e=!1,t=-1,this.viewer.scene.canvas.style.cursor="default"):(e=!0,t=n.id,this.viewer.scene.canvas.style.cursor="move"):(e=!1,t=-1,this.viewer.scene.canvas.style.cursor="default")}.bind(this),WebGLPlot$7.ScreenSpaceEventType.LEFT_CLICK),i.setInputAction(function(i){e=!1,t=-1}.bind(this),WebGLPlot$7.ScreenSpaceEventType.RIGHT_CLICK),i.setInputAction(function(i){if(e&&-1!==t){var n=this._bimHeight,r=WebGLPlot$7.Cartesian3.fromDegrees(this.position.x,this.position.y,n),o=WebGLPlot$7.SceneTransforms.wgs84ToWindowCoordinates(scene,r),a=this._modifyModelPosition(this.position,i.endPosition);i.endPosition.y=o.y;var s=_0x2d6822.getPosition(this.viewer.scene,i.endPosition);this._endPosition={x:s.x,y:s.y,z:a.z};var l=WebGLPlot$7.Cartesian3.fromDegrees(s.x,s.y,a.z);this._billboard.position=l,this._polyline.positions=[WebGLPlot$7.Cartesian3.fromDegrees(this.position.x,this.position.y,this.position.z),WebGLPlot$7.Cartesian3.fromDegrees(s.x,s.y,a.z)]}}.bind(this),WebGLPlot$7.ScreenSpaceEventType.MOUSE_MOVE)}_modifyModelPosition(e,t){var i=1,n=this.viewer.scene,r=WebGLPlot$7.SceneTransforms.transformWindowToDrawingBuffer(n,t);r.y=n.drawingBufferHeight-r.y;var o=WebGLPlot$7.Cartesian3.fromDegrees(e.x,e.y,0),a=WebGLPlot$7.SceneTransforms.wgs84ToWindowCoordinates(n,o),s=this._getAltitudeByLogical(o,r,n);if(WebGLPlot$7.defined(s)){a.y<t.y&&(i=-1);var l=WebGLPlot$7.Cartesian3.distance(o,s)*i,u=n.globe.ellipsoid.cartesianToCartographic(s),c=WebGLPlot$7.CesiumMath.toDegrees(u.latitude);return new _0x11ff81(WebGLPlot$7.CesiumMath.toDegrees(u.longitude),c,l)}}_getAltitudeByLogical(e,t,i){var n=WebGLPlot$7.Cartographic.fromCartesian(e);n.height+=1,n=WebGLPlot$7.Cartesian3.fromRadians(n.longitude,n.latitude,n.height);var r=WebGLPlot$7.SceneTransforms.wgs84ToWindowCoordinates(i,e),o=WebGLPlot$7.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(o){var a;o.x===r.x?(-1,a=0):o.y===r.y?(0,a=-1):a=-1/((o.y-r.y)/(o.x-r.x));var s=i._view.viewport,l={left:s.x,right:s.x+s.width,bottom:s.y,top:s.y+s.height},u=_0x2d6822.intersectionOfRectByPointslopeline(t,a,l),c=u[0],h=u[1],d=new WebGLPlot$7.Cartesian3,f=new WebGLPlot$7.Cartesian3;WebGLPlot$7.SceneTransforms.drawingBufferToWgs84Coordinates(i,c,1,d),WebGLPlot$7.SceneTransforms.drawingBufferToWgs84Coordinates(i,h,1,f);var p=i.camera.position,_=new WebGLPlot$7.Cartesian3;WebGLPlot$7.Cartesian3.subtract(e,n,_);var m=new WebGLPlot$7.Cartesian3;WebGLPlot$7.Cartesian3.negate(_,m),WebGLPlot$7.Cartesian3.normalize(_,_),WebGLPlot$7.Cartesian3.normalize(m,m);var g=new WebGLPlot$7.Ray(e,_),x=new WebGLPlot$7.Ray(e,m),v=WebGLPlot$7.IntersectionTests.rayTriangleParametric(g,d,f,p);if(v)return WebGLPlot$7.Ray.getPoint(g,v);if(v=WebGLPlot$7.IntersectionTests.rayTriangleParametric(x,d,f,p))return WebGLPlot$7.Ray.getPoint(x,v)}}setVisible(e){this.setShowline(e),this._billboard&&(this._billboard.show=e)}destroy(){this.delete()}clone(){}}var _0x211722=(_0x2d6cce=!0,function(e,t){var i=_0x2d6cce?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d6cce=!1,i}),_0x1cb3ee=_0x211722(void 0,(function(){return _0x1cb3ee.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cb3ee).search("(((.+)+)+)+$")})),_0x2d6cce;_0x1cb3ee();var WebGLPlot$6=window.WebGLPlot=window.WebGLPlot||{};class _0x59b619 extends _0x4157b2{constructor(e,t){if(!WebGLPlot$6.defined(t))throw new WebGLPlot$6.DeveloperError("OverLayerPicture viewer is required.");(e=WebGLPlot$6.defaultValue(e,WebGLPlot$6.defaultValue.EMPTY_OBJECT)).scene=t.scene,super(e),this.position=e.position,this.symbol=e.model,this.content=e.content,this.style=e.style,this.viewer=t,this.primitive=null,this._element=null,this._images=null,this._width=0,this._height=0,this._divContent=null,this._offSetOptions=new _0x702fc2,this._initOverlayer()}updateEffect(e){WebGLPlot$6.defined(e.point)&&this.setOffSet(e.point,void 0),WebGLPlot$6.defined(e.visible)&&this.setVisible(e.visible)}_initOverlayer(){if(this.style===_0x4574a2.detail){var e=_0x1aae83.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.style=document.createElement("style"),this.style.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.style);var t="";for(var i in this.content)"title"===i?t="<div>"+this.content[i]+"</div><table><tbody>":t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=Math.random().toString(15).slice(2,15),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=Math.random().toString(15).slice(2,15),this._divContent=this._element}else if(this.style===_0x4574a2.simple){e=_0x1aae83.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t=this.content;this._element.id=Math.random().toString(15).slice(2,15),this._element.append(t),this._divContent=this._element}else if(this.style===_0x4574a2.element){this.bpDom=document.createElement("div"),this.bpDom.style.cssText=this.content.style.cssText;var n=Math.random().toString(15);this.bpDom.id=n.slice(2,n.length),this.bpDom.appendChild(this.content),document.body.appendChild(this.bpDom),this._divContent=this.bpDom}else if(this.style===_0x4574a2.notitle||this.style===_0x4574a2.notitle2||this.style===_0x4574a2.notitle3){e=_0x1aae83.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t='<div class="information">'+WebGLPlot$6.plotI18n("OVERLAYER_DETAIL")+"</div><table><tbody>";for(var i in this.content)t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=Math.random().toString(15).slice(2,15),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=Math.random().toString(15).slice(2,15),this._divContent=this._element}this._width=this._divContent.offsetWidth,this._height=this._divContent.offsetHeight;var r=1.5,o=document.createElement("canvas"),a=o.getContext("2d");o.width=this._width*r,o.height=this._height*r,o.style.width=this._width+"px",o.style.height=this._height+"px",o.style.background="transparent",a.scale(r,r),a.mozImageSmoothingEnabled=!1,a.webkitImageSmoothingEnabled=!1,a.msImageSmoothingEnabled=!1,a.imageSmoothingEnabled=!1,a.globalAlpha=.1,document.documentElement.scrollTop||document.body.scrollTop;var s={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:o,width:this._width,height:this._height,foreignObjectRendering:!0,tainTest:!1};_0x269f3b(this._divContent,s).then(function(e){var t=new Image;t.src=e.toDataURL("image/png",1),this._images=t,this._divContent.style.display="none",this._create()}.bind(this))}_create(){this.setOffSet(this.position,void 0)}setOffSet(e,t){if(e&&(!WebGLPlot$6.defined(t)||t instanceof _0x702fc2)){WebGLPlot$6.defined(t)&&(this._offSetOptions=t);var i=e.x,n=e.y,r=this.viewer.scene.sampleHeight(new WebGLPlot$6.Cartographic(WebGLPlot$6.CesiumMath.toRadians(this.position.x),WebGLPlot$6.CesiumMath.toRadians(this.position.y)))+.5,o=this._offSetOptions.rotateX,a=this._offSetOptions.rotateY,s=this._offSetOptions.rotateZ;i+=this._offSetOptions.offsetX,n+=this._offSetOptions.offsetY,r+=this._offSetOptions.offsetZ;var l=new WebGLPlot$6.Cartesian3(this._width/40,this._height/40,1),u=WebGLPlot$6.Cartesian3.fromDegrees(i,n,r),c=WebGLPlot$6.Transforms.eastNorthUpToFixedFrame(u),h=WebGLPlot$6.Matrix4.fromRotationTranslation(WebGLPlot$6.Matrix3.fromRotationX(WebGLPlot$6.CesiumMath.toRadians(90+o))),d=WebGLPlot$6.Matrix4.fromRotationTranslation(WebGLPlot$6.Matrix3.fromRotationY(WebGLPlot$6.CesiumMath.toRadians(180+a))),f=WebGLPlot$6.Matrix4.fromRotationTranslation(WebGLPlot$6.Matrix3.fromRotationZ(WebGLPlot$6.CesiumMath.toRadians(0+s))),p=new WebGLPlot$6.Matrix4,_=new WebGLPlot$6.Matrix4,m=new WebGLPlot$6.Matrix4,g=WebGLPlot$6.Matrix4.fromScale(l);WebGLPlot$6.Matrix4.multiply(c,h,p),WebGLPlot$6.Matrix4.multiply(p,g,p),WebGLPlot$6.Matrix4.multiply(p,d,_),WebGLPlot$6.Matrix4.multiply(_,f,m),null!==this.primitive&&this.delete();var x=new WebGLPlot$6.PlaneGeometry,v=new WebGLPlot$6.GeometryInstance({geometry:x,modelMatrix:m}),y=new WebGLPlot$6.Material({fabric:{type:"DiffuseMap",uniforms:{image:this._images}},translucent:!0});this.primitive=this.viewer.scene.primitives.add(new WebGLPlot$6.Primitive({geometryInstances:v,appearance:new WebGLPlot$6.MaterialAppearance({closed:!0,translucent:!0,material:y})}))}}setVisible(e){null!==this.primitive&&(this.primitive.show=e)}delete(){null!==this.primitive&&(this.viewer.scene.primitives.removeAndDestroy(this.primitive),this.primitive=void 0)}destroy(){this.delete()}clone(){}}var _0x53dce7=(_0x5278b9=!0,function(e,t){var i=_0x5278b9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5278b9=!1,i}),_0x231435=_0x53dce7(void 0,(function(){return _0x231435.toString().search("(((.+)+)+)+$").toString().constructor(_0x231435).search("(((.+)+)+)+$")})),_0x5278b9;_0x231435();var WebGLPlot$5=window.WebGLPlot=window.WebGLPlot||{};function _0x4cfa9e(e,t){void 0===e.showLine?this.showLine=!0:this.showLine=e.showLine,this.scene=t.scene,this.position=this.lonLatToPixel(e.position),void 0===this.position&&(this.position={x:100,y:200,z:0}),this.finalPosition=e.position,this.style=document.createElement("style"),this.style.innerHTML=".dialog{min-width:150px;min-height:100px;position:absolute; background-color: rgba(42, 69, 105,.3);border: none;display: block;left:"+this.position.x+"px;top:"+this.position.y+"px;z-index: 1;\n}\n.dialog-content{padding:4px;color:#00a7d0}\n",this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.style),this.bpDom=document.createElement("div"),this.bpDom.classList.add("dialog"),this.bpDom.style.cssText="display: block;";var i=Math.random().toString(15);this.bpDom.id=i.slice(2,i.length),this.bpDom.position=e.position,this.canvasDom=document.createElement("canvas"),this.canvasDom.id=this.bpDom.id+"c",this.canvasDom.style.cssText="position: absolute; z-index: 1",document.body.appendChild(this.canvasDom),this.contentDom=document.createElement("div"),this.contentDom.classList.add("dialog-content"),this.contentDom.appendChild(e.element),this.bpDom.appendChild(this.contentDom),document.body.appendChild(this.bpDom),this.Dragging(this.getDraggingDialog).enable(),this.self=this,this.canvas=document.getElementById(this.bpDom.id+"c"),this.lineCtx=this.canvas.getContext("2d"),this.bpDiv=document.getElementById(this.bpDom.id),this.bpPosition=this.getCordInContainer(this.bpDiv),t.camera.changed.addEventListener(function(){var t=document.getElementsByClassName("dialog");for(let e=0;e<t.length;e++){this.bpDiv=t[e],this.bpPosition=this.getCordInContainer(t[e]);var i=this.bpDiv.id,n=document.getElementById(i+"c");this.lineCtx=n.getContext("2d"),this.canvas=n,this.position=this.lonLatToPixel(this.bpDiv.position),void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx)}var r=this.lonLatToPixel(this.finalPosition),o=this.lonLatToPixel(e.position),a=null!==r&&r.x>=0&&r.y>=0&&r.x<this.scene.drawingBufferWidth&&r.y<this.scene.drawingBufferHeight,s=null!==o&&o.x>=0&&o.y>=0&&o.x<this.scene.drawingBufferWidth&&o.y<this.scene.drawingBufferHeight;if(a&&s){this.setLineVisible(!0),this.bpDiv.style.cssText="display: block;",this.pt=this.pixelToLonlat(r);var l=WebGLPlot$5.Cartesian3.fromDegrees(this.pt[0],this.pt[1]),u=new WebGLPlot$5.Cartesian2,c=this.scene.cartesianToCanvasCoordinates(l,u);WebGLPlot$5.defined(c)&&(this.bpDom.style.top=c.y+"px",this.bpDom.style.left=c.x+"px")}else this.bpDiv.style.cssText="display: none;",this.setLineVisible(!1)}.bind(this))}_0x4cfa9e.prototype.Dragging=function(e){var t=null,i=0,n=0,r=null,o=o=>{switch(o.type){case"touchstart":case"mousedown":if(null!=(t=e(o))){this.bpDiv=t,this.bpPosition=this.getCordInContainer(this.bpDiv);var a=this.bpDiv.id,s=document.getElementById(a+"c");this.lineCtx=s.getContext("2d"),this.canvas=s,this.position=this.lonLatToPixel(this.bpDiv.position)}r=o.touches?o.touches[0]:o,null!=t&&(i=r.clientX-t.offsetLeft,n=r.clientY-t.offsetTop);break;case"touchmove":case"mousemove":r=o.touches?o.touches[0]:o,null!=t&&(t.style.left=r.clientX-i+"px",t.style.top=r.clientY-n+"px",void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx));break;case"touchend":case"mouseup":t=null,i=0,n=0;var l={x:this.bpDom.offsetLeft,y:this.bpDom.offsetTop};null!==l&&l.x>=0&&l.y>=0&&l.x<this.scene.drawingBufferWidth&&l.y<this.scene.drawingBufferHeight&&(this.finalPosition=this.pixelToLonlat(l))}};return{enable:function(){document.addEventListener("mousedown",o),document.addEventListener("mousemove",o),document.addEventListener("mouseup",o),document.addEventListener("touchstart",o),document.addEventListener("touchmove",o),document.addEventListener("touchend",o)},disable:function(){document.removeEventListener("mousedown",o),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",o),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",o),document.removeEventListener("touchend",o)}}},_0x4cfa9e.prototype.getDraggingDialog=function(e){for(var t=e.target;t&&-1==t.className.indexOf("dialog");)t=t.offsetParent;return t},_0x4cfa9e.prototype.getCordInContainer=function(e){return{x:e.getBoundingClientRect().left,y:e.getBoundingClientRect().top}},_0x4cfa9e.prototype.getMinDisPoint=function(){let e={x:this.bpDiv.offsetLeft,y:this.bpDiv.offsetTop},t={x:this.bpDiv.offsetLeft,y:this.bpDiv.offsetTop+this.bpDiv.clientHeight},i={x:this.bpDiv.offsetLeft+this.bpDiv.clientWidth,y:this.bpDiv.offsetTop},n={x:this.bpDiv.offsetLeft+this.bpDiv.clientWidth,y:this.bpDiv.offsetTop+this.bpDiv.clientHeight};this.position;let r=(this.position.x-e.x)*(this.position.x-e.x)+(this.position.y-e.y)*(this.position.y-e.y),o=(this.position.x-t.x)*(this.position.x-t.x)+(this.position.y-t.y)*(this.position.y-t.y),a=(this.position.x-i.x)*(this.position.x-i.x)+(this.position.y-i.y)*(this.position.y-i.y),s=(this.position.x-n.x)*(this.position.x-n.x)+(this.position.y-n.y)*(this.position.y-n.y),l=[];l.push(r),l.push(o),l.push(a),l.push(s);let u=l[0],c=0;for(var h=1;h<l.length;h++)l[h]<u&&(u=l[h],c=h);return 0==c?e:1==c?t:2==c?i:3==c?n:null},_0x4cfa9e.prototype.drawLine=function(e,t){let i=this.getMinDisPoint();if(null==i||0==i.x&&0==i.y)return;let n=Math.abs(i.x-this.position.x),r=Math.abs(this.position.y-i.y),o=this.position.x,a=this.position.y,s=i.x,l=i.y,u=Math.min(o,s),c=Math.min(a,l);e.width=Math.abs(n),e.height=Math.abs(r),e.style.setProperty("left",u+"px",""),e.style.setProperty("top",c+"px",""),e.style.setProperty("pointer-events","none"),t.clearRect(0,0,e.width,e.height),t.beginPath(),t.moveTo(o-u,a-c),t.lineTo(s-u,l-c),t.stroke()},_0x4cfa9e.prototype.lonLatToPixel=function(e){2===e.length&&(e[2]=0);var t=WebGLPlot$5.Cartesian3.fromDegrees(e[0],e[1],e[2]);return WebGLPlot$5.SceneTransforms.wgs84ToWindowCoordinates(this.scene,t)},_0x4cfa9e.prototype.pixelToLonlat=function(e){var t=this.scene.pickPosition(e),i=Cesium.Cartographic.fromCartesian(t);return[Cesium.Math.toDegrees(i.longitude),Cesium.Math.toDegrees(i.latitude),i.height]},_0x4cfa9e.prototype.setPosition=function(e){this.position=this.lonLatToPixel(e),null!=this.position&&(this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height),this.drawLine(this.canvas,this.lineCtx))},_0x4cfa9e.prototype.setLineVisible=function(e){this.showLine=e,e?void 0!==this.position&&this.drawLine(this.canvas,this.lineCtx):this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height)},_0x4cfa9e.prototype.getPosition=function(){return this.bpDiv.position},_0x4cfa9e.prototype.setContent=function(e){this.contentDom.childNodes.forEach((e=>e.remove())),this.contentDom.appendChild(e)},_0x4cfa9e.prototype.setVisible=function(e){const t=this.bpDiv;if(t&&e){t.style.cssText="display: block;";var i=this.bpDiv.id,n=document.getElementById(i+"c");this.lineCtx=n.getContext("2d"),this.canvas=n,this.position=this.lonLatToPixel(this.bpDiv.position),void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx)}else t.style.cssText="display: none;",this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height)},_0x4cfa9e.prototype.remove=function(){document.body.removeChild(this.bpDiv),document.body.removeChild(this.canvas)},_0x4cfa9e.prototype.updateDom=function(e){this.contentDom.childNodes.forEach((e=>e.remove())),this.contentDom.appendChild(e)};var _0x4de6be=(_0x492d7b=!0,function(e,t){var i=_0x492d7b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x492d7b=!1,i}),_0x4aab4e=_0x4de6be(void 0,(function(){return _0x4aab4e.toString().search("(((.+)+)+)+$").toString().constructor(_0x4aab4e).search("(((.+)+)+)+$")})),_0x492d7b;_0x4aab4e();var _0x190d2a=new WebGLPlot.Cartesian3,_0x5e3ab0=new WebGLPlot.Cartesian3,_0x4f8b1c=new WebGLPlot.Cartesian3,_0x4aa6c8=new WebGLPlot.Cartesian3,_0x228d21=new WebGLPlot.Cartesian3;function _0x328501(e){this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),this.positions=WebGLPlot.defaultValue(e.customPts,[]),this.numThetas=WebGLPlot.defaultValue(e.slicePartitions,65),this.numPhis=WebGLPlot.defaultValue(e.stackPartitions,65),this.vertexFormat=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),this._offsetAttribute=e.offsetAttribute,this._indices=e.indices,this._workerName="createPlotCustomRadarGeometry"}function _0xbd9140(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_0x328501.createGeometry=function(e,t){if(e.numPhis<2||e.numThetas<2||e.positions.length<2)return;let i=_0xbd9140(e.positions),n=e.numThetas,r=e.numPhis;var o=e.vertexFormat,a=n*r,s=6*a,l=WebGLPlot.IndexDatatype.createTypedArray(a,s),u=o.normal?new Float32Array(3*a):void 0,c=o.tangent?new Float32Array(3*a):void 0,h=o.bitangent?new Float32Array(3*a):void 0,d=o.st?new Float32Array(2*a):void 0;if(e._indices)l=e._indices;else{var f,p;let e=0;var _,m;if(t)for(f=0;f<=r-1;f++)for(_=f*n,m=(f+1)*n,p=0;p<n-1;p++)l[e++]=m+p,l[e++]=m+p+1,l[e++]=_+p+1,l[e++]=m+p,l[e++]=_+p+1,l[e++]=_+p;else for(f=0;f<=r-1;f++)for(_=f*n,m=(f+1)*n,p=0;p<n-1;p++)0===p&&(l[e++]=0,l[e++]=_,l[e++]=m),l[e++]=m+p,l[e++]=m+p+1,l[e++]=_+p+1,l[e++]=m+p,l[e++]=_+p+1,l[e++]=_+p,p===n-2&&(l[e++]=0,l[e++]=_+p+1,l[e++]=m+p+1)}var g=new WebGLPlot.GeometryAttributes;o.position&&(g.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:i}));var x,v=0,y=0,$=0,b=0,T=WebGLPlot.Ellipsoid.fromCartesian3(e.radii);if(o.st||o.normal||o.tangent||o.bitangent){for(f=0;f<a;f++){x=T;var C=WebGLPlot.Cartesian3.fromArray(i,3*f,_0x190d2a);0===C.x&&(C.x=1e-10),0===C.y&&(C.y=1e-10),0===C.z&&(C.z=1e-10);var S=x.geodeticSurfaceNormal(C,_0x5e3ab0);if(o.st){var w=WebGLPlot.Cartesian2.negate(S,_0x228d21);d[v++]=Math.atan2(w.y,w.x)/WebGLPlot.CesiumMath.TWO_PI+.5,d[v++]=Math.asin(S.z)/WebGLPlot.CesiumMath.PI+.5}if(o.normal&&(u[y++]=S.x,u[y++]=S.y,u[y++]=S.z),o.tangent||o.bitangent){var E,P=_0x4f8b1c;if(E=!isTopOpen&&f>=0&&f<0+2*n?WebGLPlot.Cartesian3.UNIT_X:WebGLPlot.Cartesian3.UNIT_Z,WebGLPlot.Cartesian3.cross(E,S,P),WebGLPlot.Cartesian3.normalize(P,P),o.tangent&&(c[$++]=P.x,c[$++]=P.y,c[$++]=P.z),o.bitangent){var A=WebGLPlot.Cartesian3.cross(S,P,_0x4aa6c8);WebGLPlot.Cartesian3.normalize(A,A),h[b++]=A.x,h[b++]=A.y,h[b++]=A.z}}}o.st&&(g.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),o.normal&&(g.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:u})),o.tangent&&(g.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),o.bitangent&&(g.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:h}))}if(WebGLPlot.defined(e._offsetAttribute)){var L=i.length,M=new Uint8Array(L/3),R=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(M,R),g.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:M})}return new WebGLPlot.Geometry({attributes:g,indices:l,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(T),offsetAttribute:e._offsetAttribute})};var _0x1242ad=(_0x525e33=!0,function(e,t){var i=_0x525e33?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x525e33=!1,i}),_0x3be1c0=_0x1242ad(void 0,(function(){return _0x3be1c0.toString().search("(((.+)+)+)+$").toString().constructor(_0x3be1c0).search("(((.+)+)+)+$")})),_0x525e33;function _0x1ff575(e){this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),this.positions=WebGLPlot.defaultValue(e.customPts,[]),this.slicePartitions=WebGLPlot.defaultValue(e.slicePartitions,65),this.stackPartitions=WebGLPlot.defaultValue(e.stackPartitions,65),this.vertexFormat=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),this._offsetAttribute=e.offsetAttribute,this._workerName="createPlotCustomRadarOutlineGeometry"}function _0x4decdf(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_0x3be1c0(),_0x1ff575.createGeometry=function(e,t){if(e.numPhis<3||e.numThetas<3||e.positions.length<3)return;var i=WebGLPlot.Ellipsoid.fromCartesian3(e.radii);let n=_0x4decdf(e.positions),r=e.slicePartitions,o=e.stackPartitions;var a,s,l=r*o,u=4*l,c=WebGLPlot.IndexDatatype.createTypedArray(l,u);let h=0;if(t){for(a=0;a<o;a++){var d=a*r;for(s=0;s<r-1;s++)c[h++]=d+s,c[h++]=d+s+1}for(a=0;a<r-1;a++)for(s=0;s<o-1;s++)c[h++]=a+s*r,c[h++]=a+(s+1)*r}else{for(a=0;a<o;a++){d=a*r;for(s=0;s<r-1;s++)c[h++]=d+s,c[h++]=d+s+1}for(a=0;a<=r-1;a++)for(s=0;s<o-1;s++)c[h++]=a+s*r,c[h++]=a+(s+1)*r}var f=new WebGLPlot.GeometryAttributes({position:new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})});if(WebGLPlot.defined(e._offsetAttribute)){var p=n.length,_=new Uint8Array(p/3),m=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(_,m),f.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new WebGLPlot.Geometry({attributes:f,indices:c,primitiveType:WebGLPlot.PrimitiveType.LINES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(i),offsetAttribute:e._offsetAttribute})};var _0x1968f1=(_0x17c67b=!0,function(e,t){var i=_0x17c67b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17c67b=!1,i}),_0x125081=_0x1968f1(void 0,(function(){return _0x125081.toString().search("(((.+)+)+)+$").toString().constructor(_0x125081).search("(((.+)+)+)+$")})),_0x17c67b;_0x125081();var _0x22d450=new WebGLPlot.Cartesian3,_0xb504d3=new WebGLPlot.Cartesian3,_0x37b7ed=new WebGLPlot.Cartesian3,_0x581ebc=new WebGLPlot.Cartesian3,_0x3de580=new WebGLPlot.Cartesian3,_0x166094=new WebGLPlot.Cartesian3(1,1,1),_0x330915=Math.cos,_0x374034=Math.sin;function _0x436613(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT);var t=WebGLPlot.defaultValue(e.scale,1),i=WebGLPlot.defaultValue(e.radii,_0x166094),n=WebGLPlot.defaultValue(e.innerRadii,i),r=WebGLPlot.defaultValue(e._minimumClock,0),o=WebGLPlot.defaultValue(e._maximumClock,WebGLPlot.CesiumMath.TWO_PI),a=WebGLPlot.defaultValue(e._minimumCone,0),s=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),l=Math.round(WebGLPlot.defaultValue(e.stackPartitions,64)),u=Math.round(WebGLPlot.defaultValue(e.slicePartitions,64)),c=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT);if(u<3)throw new WebGLPlot.DeveloperError("options.slicePartitions cannot be less than three.");if(l<3)throw new WebGLPlot.DeveloperError("options.stackPartitions cannot be less than three.");this._radii=new WebGLPlot.Cartesian3(i.x*t,i.y*t,i.z*t),this._innerRadii=new WebGLPlot.Cartesian3(n.x*t,n.y*t,n.z*t),this._minimumClock=r,this._maximumClock=o,this._minimumCone=a,this._maximumCone=s,this._stackPartitions=l,this._slicePartitions=u,this._vertexFormat=WebGLPlot.VertexFormat.clone(c),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}_0x436613.packedLength=2*WebGLPlot.Cartesian3.packedLength+WebGLPlot.VertexFormat.packedLength+7,_0x436613.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.Cartesian3.pack(e._radii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.Cartesian3.pack(e._innerRadii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.VertexFormat.pack(e._vertexFormat,t,i),i+=WebGLPlot.VertexFormat.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x1606d4=new WebGLPlot.Cartesian3,_0x13c019=new WebGLPlot.Cartesian3,_0xa53821=new WebGLPlot.VertexFormat,_0x1871ce={radii:_0x1606d4,innerRadii:_0x13c019,vertexFormat:_0xa53821,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0},_0x2906e1;_0x436613.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.Cartesian3.unpack(e,t,_0x1606d4);t+=WebGLPlot.Cartesian3.packedLength;var r=WebGLPlot.Cartesian3.unpack(e,t,_0x13c019);t+=WebGLPlot.Cartesian3.packedLength;var o=WebGLPlot.VertexFormat.unpack(e,t,_0xa53821);t+=WebGLPlot.VertexFormat.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return WebGLPlot.defined(i)?(i._radii=WebGLPlot.Cartesian3.clone(n,i._radii),i._innerRadii=WebGLPlot.Cartesian3.clone(r,i._innerRadii),i._vertexFormat=WebGLPlot.VertexFormat.clone(o,i._vertexFormat),i._minimumClock=a,i._maximumClock=s,i._minimumCone=l,i._maximumCone=u,i._stackPartitions=c,i._slicePartitions=h,i._offsetAttribute=-1===d?void 0:d,i):(_0x1871ce.minimumClock=a,_0x1871ce.maximumClock=s,_0x1871ce.minimumCone=l,_0x1871ce.maximumCone=u,_0x1871ce.stackPartitions=c,_0x1871ce.slicePartitions=h,_0x1871ce.offsetAttribute=-1===d?void 0:d,new _0x436613(_0x1871ce))},_0x436613.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._vertexFormat,l=e._slicePartitions+1,u=e._stackPartitions+1;(l=Math.round(l*Math.abs(r-n)/WebGLPlot.CesiumMath.TWO_PI))<2&&(l=2),(u=Math.round(u*Math.abs(a-o)/WebGLPlot.CesiumMath.PI))<2&&(u=2);var c,h,d=0,f=[o],p=[n];for(c=0;c<u;c++)f.push(o+c*(a-o)/(u-1));for(f.push(a),h=0;h<l;h++)p.push(n+h*(r-n)/(l-1));p.push(r);var _=f.length,m=p.length,g=0,x=1,v=i.x!==t.x||i.y!==t.y||i.z!==t.z,y=!1,$=!1,b=!1;v&&(x=2,o>0&&(y=!0,g+=l-1),a<WebGLPlot.CesiumMath.PI&&($=!0,g+=l-1),(r-n)%WebGLPlot.CesiumMath.TWO_PI?(b=!0,g+=2*(u-1)+1):g+=1);var T=m*_*x,C=new Float64Array(3*T),S=WebGLPlot.arrayFill(new Array(T),!1),w=WebGLPlot.arrayFill(new Array(T),!1),E=l*u*x,P=6*(E+g+1-(l+u)*x),A=WebGLPlot.IndexDatatype.createTypedArray(E,P),L=s.normal?new Float32Array(3*T):void 0,M=s.tangent?new Float32Array(3*T):void 0,R=s.bitangent?new Float32Array(3*T):void 0,I=s.st?new Float32Array(2*T):void 0,O=new Array(_),D=new Array(_);for(c=0;c<_;c++)O[c]=_0x374034(f[c]),D[c]=_0x330915(f[c]);var B=new Array(m),N=new Array(m);for(h=0;h<m;h++)N[h]=_0x330915(p[h]),B[h]=_0x374034(p[h]);for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=t.x*O[c]*N[h],C[d++]=t.y*O[c]*B[h],C[d++]=t.z*D[c];var F,U,z,G,V=T/2;if(v)for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=i.x*O[c]*N[h],C[d++]=i.y*O[c]*B[h],C[d++]=i.z*D[c],S[V]=!0,c>0&&c!==_-1&&0!==h&&h!==m-1&&(w[V]=!0),V++;for(d=0,c=1;c<_-2;c++)for(F=c*m,U=(c+1)*m,h=1;h<m-2;h++)A[d++]=U+h,A[d++]=U+h+1,A[d++]=F+h+1,A[d++]=U+h,A[d++]=F+h+1,A[d++]=F+h;if(v){var k=_*m;for(c=1;c<_-2;c++)for(F=k+c*m,U=k+(c+1)*m,h=1;h<m-2;h++)A[d++]=U+h,A[d++]=F+h,A[d++]=F+h+1,A[d++]=U+h,A[d++]=F+h+1,A[d++]=U+h+1}if(v){if(y)for(G=_*m,c=1;c<m-2;c++)A[d++]=c,A[d++]=c+1,A[d++]=G+c+1,A[d++]=c,A[d++]=G+c+1,A[d++]=G+c;if($)for(z=_*m-m,G=_*m*x-m,c=1;c<m-2;c++)A[d++]=z+c+1,A[d++]=z+c,A[d++]=G+c,A[d++]=z+c+1,A[d++]=G+c,A[d++]=G+c+1}if(b){for(c=1;c<_-2;c++)G=m*_+m*c,z=m*c,A[d++]=G,A[d++]=z+m,A[d++]=z,A[d++]=G,A[d++]=G+m,A[d++]=z+m;for(c=1;c<_-2;c++)G=m*_+m*(c+1)-1,z=m*(c+1)-1,A[d++]=z+m,A[d++]=G,A[d++]=z,A[d++]=z+m,A[d++]=G+m,A[d++]=G}var W=new WebGLPlot.GeometryAttributes;s.position&&(W.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:C}));var H,q=0,j=0,Y=0,X=0,K=T/2,Q=WebGLPlot.Ellipsoid.fromCartesian3(t),Z=WebGLPlot.Ellipsoid.fromCartesian3(i);if(s.st||s.normal||s.tangent||s.bitangent){for(c=0;c<T;c++){H=S[c]?Z:Q;var J=WebGLPlot.Cartesian3.fromArray(C,3*c,_0x22d450),ee=H.geodeticSurfaceNormal(J,_0xb504d3);if(w[c]&&WebGLPlot.Cartesian3.negate(ee,ee),s.st){var te=WebGLPlot.Cartesian2.negate(ee,_0x3de580);I[q++]=Math.atan2(te.y,te.x)/WebGLPlot.CesiumMath.TWO_PI+.5,I[q++]=Math.asin(ee.z)/WebGLPlot.CesiumMath.PI+.5}if(s.normal&&(L[j++]=ee.x,L[j++]=ee.y,L[j++]=ee.z),s.tangent||s.bitangent){var ie,ne=_0x37b7ed,re=0;if(S[c]&&(re=K),ie=!y&&c>=re&&c<re+2*m?WebGLPlot.Cartesian3.UNIT_X:WebGLPlot.Cartesian3.UNIT_Z,WebGLPlot.Cartesian3.cross(ie,ee,ne),WebGLPlot.Cartesian3.normalize(ne,ne),s.tangent&&(M[Y++]=ne.x,M[Y++]=ne.y,M[Y++]=ne.z),s.bitangent){var oe=WebGLPlot.Cartesian3.cross(ee,ne,_0x581ebc);WebGLPlot.Cartesian3.normalize(oe,oe),R[X++]=oe.x,R[X++]=oe.y,R[X++]=oe.z}}}s.st&&(W.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:I})),s.normal&&(W.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),s.tangent&&(W.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:M})),s.bitangent&&(W.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R}))}if(WebGLPlot.defined(e._offsetAttribute)){var ae=C.length,se=new Uint8Array(ae/3),le=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(se,le),W.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:se})}return new WebGLPlot.Geometry({attributes:W,indices:A,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(Q),offsetAttribute:e._offsetAttribute})}}},_0x436613.getUnitEllipsoid=function(){return WebGLPlot.defined(_0x2906e1)||(_0x2906e1=_0x436613.createGeometry(new _0x436613({radii:new WebGLPlot.Cartesian3(1,1,1),vertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY}))),_0x2906e1};var _0x18e37f=(_0x4d5eb3=!0,function(e,t){var i=_0x4d5eb3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d5eb3=!1,i}),_0x5af7be=_0x18e37f(void 0,(function(){return _0x5af7be.toString().search("(((.+)+)+)+$").toString().constructor(_0x5af7be).search("(((.+)+)+)+$")})),_0x4d5eb3;_0x5af7be();var _0x5682b9=new WebGLPlot.Cartesian3(1,1,1),_0x2c545c=Math.cos,_0x41e0c1=Math.sin;function _0x377d94(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT);var t=WebGLPlot.defaultValue(e.scale,1),i=WebGLPlot.defaultValue(e.radii,_0x5682b9),n=WebGLPlot.defaultValue(e.innerRadii,i),r=WebGLPlot.defaultValue(e._minimumClock,0),o=WebGLPlot.defaultValue(e._maximumClock,WebGLPlot.CesiumMath.TWO_PI),a=WebGLPlot.defaultValue(e._minimumCone,0),s=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),l=Math.round(WebGLPlot.defaultValue(e.stackPartitions,10)),u=Math.round(WebGLPlot.defaultValue(e.slicePartitions,8)),c=Math.round(WebGLPlot.defaultValue(e.subdivisions,128));if(l<1)throw new WebGLPlot.DeveloperError("options.stackPartitions cannot be less than 1");if(u<0)throw new WebGLPlot.DeveloperError("options.slicePartitions cannot be less than 0");if(c<0)throw new WebGLPlot.DeveloperError("options.subdivisions must be greater than or equal to zero.");if(WebGLPlot.defined(e.offsetAttribute)&&e.offsetAttribute===WebGLPlot.GeometryOffsetAttribute.TOP)throw new WebGLPlot.DeveloperError("WebGLPlot.GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=new WebGLPlot.Cartesian3(i.x*t,i.y*t,i.z*t),this._innerRadii=new WebGLPlot.Cartesian3(n.x*t,n.y*t,n.z*t),this._minimumClock=r,this._maximumClock=o,this._minimumCone=a,this._maximumCone=s,this._stackPartitions=l,this._slicePartitions=u,this._subdivisions=c,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}_0x377d94.packedLength=2*WebGLPlot.Cartesian3.packedLength+8,_0x377d94.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.Cartesian3.pack(e._radii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.Cartesian3.pack(e._innerRadii,t,i),i+=WebGLPlot.Cartesian3.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i++]=e._subdivisions,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x40c115=new WebGLPlot.Cartesian3,_0x51fff0=new WebGLPlot.Cartesian3,_0x4ecf2e={radii:_0x40c115,innerRadii:_0x51fff0,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};_0x377d94.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.Cartesian3.unpack(e,t,_0x40c115);t+=WebGLPlot.Cartesian3.packedLength;var r=WebGLPlot.Cartesian3.unpack(e,t,_0x51fff0);t+=WebGLPlot.Cartesian3.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return WebGLPlot.defined(i)?(i._radii=WebGLPlot.Cartesian3.clone(n,i._radii),i._innerRadii=WebGLPlot.Cartesian3.clone(r,i._innerRadii),i._minimumClock=o,i._maximumClock=a,i._minimumCone=s,i._maximumCone=l,i._stackPartitions=u,i._slicePartitions=c,i._subdivisions=h,i._offsetAttribute=-1===d?void 0:d,i):(_0x4ecf2e.minimumClock=o,_0x4ecf2e.maximumClock=a,_0x4ecf2e.minimumCone=s,_0x4ecf2e.maximumCone=l,_0x4ecf2e.stackPartitions=u,_0x4ecf2e.slicePartitions=c,_0x4ecf2e.subdivisions=h,_0x4ecf2e.offsetAttribute=-1===d?void 0:d,new _0x377d94(_0x4ecf2e))},_0x377d94.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._subdivisions,l=WebGLPlot.Ellipsoid.fromCartesian3(t),u=e._slicePartitions+1,c=e._stackPartitions+1;(u=Math.round(u*Math.abs(r-n)/WebGLPlot.CesiumMath.TWO_PI))<2&&(u=2),(c=Math.round(c*Math.abs(a-o)/WebGLPlot.CesiumMath.PI))<2&&(c=2);var h=0,d=1,f=i.x!==t.x||i.y!==t.y||i.z!==t.z,p=!1,_=!1;f&&(d=2,o>0&&(p=!0,h+=u),a<WebGLPlot.CesiumMath.PI&&(_=!0,h+=u));var m,g,x,v,y=s*d*(c+u),$=new Float64Array(3*y),b=2*(y+h-(u+c)*d),T=WebGLPlot.IndexDatatype.createTypedArray(y,b),C=0,S=new Array(c),w=new Array(c);for(m=0;m<c;m++)v=o+m*(a-o)/(c-1),S[m]=_0x41e0c1(v),w[m]=_0x2c545c(v);var E=new Array(s),P=new Array(s);for(m=0;m<s;m++)x=n+m*(r-n)/(s-1),E[m]=_0x41e0c1(x),P[m]=_0x2c545c(x);for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(S.length=s,w.length=s,m=0;m<s;m++)v=o+m*(a-o)/(s-1),S[m]=_0x41e0c1(v),w[m]=_0x2c545c(v);for(E.length=u,P.length=u,m=0;m<u;m++)x=n+m*(r-n)/(u-1),E[m]=_0x41e0c1(x),P[m]=_0x2c545c(x);for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(C=0,m=0;m<c*d;m++){var A=m*s;for(g=0;g<s-1;g++)T[C++]=A+g,T[C++]=A+g+1}var L=c*s*d;for(m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f)for(L=c*s*d+u*s,m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f){var M=c*s*d,R=M+s*u;if(p)for(m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m;if(_)for(M+=s*u-u,R+=s*u-u,m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m}var I=new WebGLPlot.GeometryAttributes({position:new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:$})});if(WebGLPlot.defined(e._offsetAttribute)){var O=$.length,D=new Uint8Array(O/3),B=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(D,B),I.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:D})}return new WebGLPlot.Geometry({attributes:I,indices:T,primitiveType:WebGLPlot.PrimitiveType.LINES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(l),offsetAttribute:e._offsetAttribute})}}};const _0x57226a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4a5089=_0x57226a(void 0,(function(){return _0x4a5089.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a5089).search("(((.+)+)+)+$")}));_0x4a5089();var _0x3e862f=void 0;function _0x14bd84(e){if(!e)throw new WebGLPlot.DeveloperError("PlotRadarUpdater scene is required.");_0x3e862f||(this.start(50),this._primitives=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._primitives)),this.radarArray=[]}_0x14bd84.getInstance=function(e){return _0x3e862f||(_0x3e862f=new _0x14bd84(e)),_0x3e862f},_0x14bd84.prototype.add=function(e){e.PlotRadarType&&this.radarArray.push(e)},_0x14bd84.prototype.radarUpdate=function(e){for(let t=0;t<this.radarArray.length;t++)this.radarArray[t]._updated(e)},_0x14bd84.prototype.start=function(e){this.stop();let t=this;this.IntervalID=setInterval((function(){t.radarUpdate(e)}),e)},_0x14bd84.prototype.stop=function(){clearInterval(this.IntervalID),this.IntervalID=-1},_0x14bd84.prototype.destroy=function(){this.stop(),_0x3e862f=void 0,this._primitives.destroy()};const _0xb01c0d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4bb871=_0xb01c0d(void 0,(function(){return _0x4bb871.toString().search("(((.+)+)+)+$").toString().constructor(_0x4bb871).search("(((.+)+)+)+$")}));_0x4bb871();class _0x46adf9 extends _0x4157b2{constructor(e,t){super(e),this._scene=t,this._isNeedUpdate=!1,this.PlotRadarType="PlotRadarBase",e&&(this._scale=WebGLPlot$f.defaultValue(e.scale,1),this._id=WebGLPlot$f.defaultValue(e.id,WebGLPlot$f.createGuid()),this._point=WebGLPlot$f.defaultValue(e.point,new WebGLPlot$f.Cartesian3),this._offset=WebGLPlot$f.defaultValue(e.offset,new WebGLPlot$f.Cartesian3),this._customPts=WebGLPlot$f.defaultValue(e.customPts,[]),this._radii=WebGLPlot$f.defaultValue(e.radii,new WebGLPlot$f.Cartesian3(1,1,1)),this._slicePartitions=WebGLPlot$f.defaultValue(e.slicePartitions,67),this._stackPartitions=WebGLPlot$f.defaultValue(e.stackPartitions,67),this._show=WebGLPlot$f.defaultValue(e.show,!0),this._fill=WebGLPlot$f.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$f.defaultValue(e.fillColor,new WebGLPlot$f.Color(1,0,0,.5)),this._outline=WebGLPlot$f.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$f.defaultValue(e.outlineColor,new WebGLPlot$f.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$f.defaultValue(e.outlineWidth,1),e.rotate?this._rotate=new WebGLPlot$f.Cartesian3(WebGLPlot$f.CesiumMath.toRadians(e.rotate.x),WebGLPlot$f.CesiumMath.toRadians(e.rotate.y),WebGLPlot$f.CesiumMath.toRadians(e.rotate.z)):this._rotate=new WebGLPlot$f.Cartesian3(0,0,0),this.shadows=WebGLPlot$f.defaultValue(e.shadows,WebGLPlot$f.ShadowMode.DISABLED)),t&&(_0x14bd84.getInstance(t).add(this),this._primitives=_0x14bd84.getInstance()._primitives),this._primitive=void 0,this._outlinePrimitive=void 0}updateEffect(e){WebGLPlot$f.defined(e.point)&&(this.point=e.point),WebGLPlot$f.defined(e.rotate)&&(this.rotate=e.rotate),WebGLPlot$f.defined(e.visible)&&(this.show=e.visible)}_createRadarPrimitive(){var e=new WebGLPlot$f.HeadingPitchRoll(this._rotate.z,this._rotate.y,this._rotate.x);const t=WebGLPlot$f.Cartesian3.fromDegrees(this.point.x+this._offset.x,this.point.y+this._offset.y,this.point.z+this._offset.z),i=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(t,e);this.isFill&&this._addFillPrimitive(i),this.isOutline&&this._addOutlinePrimitive(i)}_addFillPrimitive(e){if(this._primitive&&this._primitives.removeAndDestroy(this._primitive),!this.show)return;let t=this._createFillPrimitive(e);this._primitive=this._primitives.add(t)}_addOutlinePrimitive(e){if(this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),!this.show)return;let t=this._createOutlinePrimitive(e);this._outlinePrimitive=this._primitives.add(t)}_createFillPrimitive(e,t){t||(t=this);var i={show:new WebGLPlot$f.ShowGeometryInstanceAttribute(t.isFill),distanceDisplayCondition:new WebGLPlot$f.DistanceDisplayConditionGeometryInstanceAttribute,color:void 0,offset:void 0},n=new WebGLPlot$f.MaterialAppearance({material:WebGLPlot$f.Material.fromType(WebGLPlot$f.Material.ColorType,{color:t.fillColor}),translucent:!0,closed:!0});let r=this._createRadarFillGeometry(t),o=new WebGLPlot$f.GeometryInstance({id:t.id,geometry:r,modelMatrix:e,attributes:i});return new WebGLPlot$f.Primitive({geometryInstances:o,appearance:n,asynchronous:!1,shadows:t.shadows})}_createOutlinePrimitive(e,t){t||(t=this);var i={show:new WebGLPlot$f.ShowGeometryInstanceAttribute(t.isOutline),distanceDisplayCondition:new WebGLPlot$f.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot$f.ColorGeometryInstanceAttribute.fromColor(t.outlineColor),offset:void 0};let n=this._createRadarOutLineGeometry(t),r=new WebGLPlot$f.GeometryInstance({id:t.id,geometry:n,modelMatrix:e,attributes:i}),o=new WebGLPlot$f.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:t.outlineWidth}});return new WebGLPlot$f.Primitive({geometryInstances:r,appearance:o,asynchronous:!1,shadows:t.shadows})}clone(e){if(!WebGLPlot$f.defined(e))throw new WebGLPlot$f.DeveloperError("PlotRadar clone result is required.");return e.PlotRadarType="PlotRadarBase",e._scene=this._scene,e._id=this.id,e._point=this.point.clone(),e._rotate=this._rotate.clone(),e._radii=this.radii.clone(),e._slicePartitions=this.slicePartitions,e._stackPartitions=this.stackPartitions,e._show=this.show,e._fill=this.isFill,e._fillColor=this.fillColor,e._outline=this.isOutline,e._outlineColor=this.outlineColor,e._outlineWidth=this._outlineWidth,e.shadows=this.shadows,e._customPts=this._customPts,e}getEffectParameter(){let e={};return e.point=this.point,e.rotate=this.rotate,e.visible=this.visible,e}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[])}toGeoJson(){return{}}fromGeoJson(e){}}Object.defineProperties(_0x46adf9.prototype,{id:{get:function(){return this._id},set:function(e){"string"==typeof e&&this._id!==e&&(this._id=e)}},point:{get:function(){return this._point},set:function(e){(e instanceof WebGLPlot$f.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._point)&&(this._point=e.clone(),this._scanArray&&this._scanArray.length>0&&this._scanArray.forEach((t=>{t.point=e})),this._isNeedUpdate=!0)}},offset:{get:function(){return this._offset},set:function(e){(e instanceof WebGLPlot$f.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._offset)&&(this._offset=e,this._scanArray&&this._scanArray.length>0&&this._scanArray.forEach((t=>{t.offset=e})),this._isNeedUpdate=!0)}},rotate:{get:function(){return new WebGLPlot$f.Cartesian3(WebGLPlot$f.CesiumMath.toDegrees(this._rotate.x),WebGLPlot$f.CesiumMath.toDegrees(this._rotate.y),WebGLPlot$f.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot$f.Cartesian3||e instanceof _0x11ff81){let t=new WebGLPlot$f.Cartesian3(WebGLPlot$f.CesiumMath.toRadians(e.x),WebGLPlot$f.CesiumMath.toRadians(e.y),WebGLPlot$f.CesiumMath.toRadians(e.z));WebGLPlot$f.Cartesian3(t,this._rotate)||(this._rotate=t,this._isNeedUpdate=!0)}}},slicePartitions:{get:function(){return this._slicePartitions},set:function(e){"number"==typeof e&&this._slicePartitions!==e&&(this._slicePartitions=e,this._isNeedUpdate=!0)}},stackPartitions:{get:function(){return this._stackPartitions}},show:{get:function(){return this._show},set:function(e){"boolean"==typeof e&&this._show!==e&&(this._show=e,this._isNeedUpdate=!0)}},isFill:{get:function(){return this._fill},set:function(e){"boolean"==typeof e&&this._fill!==e&&(this._fill=e,this._primitive&&(this._primitive.show=e))}},isOutline:{get:function(){return this._outline},set:function(e){"boolean"==typeof e&&this._outline!==e&&(this._outline=e,this._outlinePrimitive&&(this._outlinePrimitive.show=e))}},fillColor:{get:function(){return this._fillColor},set:function(e){e instanceof WebGLPlot$f.Color&&!WebGLPlot$f.Color.equals(e,this._fillColor)&&(this._fillColor=e,this._primitive&&(this._primitive.appearance.material=WebGLPlot$f.Material.fromType(WebGLPlot$f.Material.ColorType,{color:e})))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){e instanceof WebGLPlot$f.Color&&!WebGLPlot$f.Color.equals(e,this._outlineColor)&&(this._outlineColor=e,this._isNeedUpdate=!0)}},material:{get:function(){return this._fillColor},set:function(e){if(e instanceof WebGLPlot$f.Color&&!WebGLPlot$f.Color.equals(e,this._fillColor)){this.fillColor=e;let t=2*e.alpha>=1?1:2*e.alpha;this.outlineColor=new WebGLPlot$f.Color(e.red,e.green,e.blue,t)}}},radii:{get:function(){return this._radii},set:function(e){(e instanceof WebGLPlot$f.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._radii)&&(this._radii=e.clone(),this._createScan&&this._createScan(),this._isNeedUpdate=!0)}},isShowScan:{get:function(){return this._isShowScan},set:function(e){"boolean"==typeof e&&this.__isShowScan!==e&&(this._isShowScan=e)}},dScanSpeed:{get:function(){return WebGLPlot$f.CesiumMath.toDegrees(this._dScanSpeed)},set:function(e){if("number"==typeof e){let t=WebGLPlot$f.CesiumMath.toRadians(e);this._dScanSpeed=t}}},scale:{get:function(){return this._scale},set:function(e){"number"==typeof e&&this._scale!==e&&(this._scale=e,this._isNeedUpdate=!0)}}});var _0x17cb76=(_0x4eae5f=!0,function(e,t){var i=_0x4eae5f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4eae5f=!1,i}),_0x30012e=_0x17cb76(void 0,(function(){return _0x30012e.toString().search("(((.+)+)+)+$").toString().constructor(_0x30012e).search("(((.+)+)+)+$")})),_0x4eae5f;_0x30012e();var _0x11ff89={PlotMechanicalRadar:0,PlotParameterRadar:1,PlotWarningRadar:2,PlotScanRadar:3,PlotRotateRadar:4,PlotCustomRadar:5},_0x49109a=Object.freeze(_0x11ff89),_0x5ef7fb=(_0x2e089e=!0,function(e,t){var i=_0x2e089e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e089e=!1,i}),_0x35d453=_0x5ef7fb(void 0,(function(){return _0x35d453.toString().search("(((.+)+)+)+$").toString().constructor(_0x35d453).search("(((.+)+)+)+$")})),_0x2e089e;_0x35d453();class _0x45019a extends _0x46adf9{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotCustomRadar scene is required.");super(e,t),this.PlotRadarType=_0x49109a.PlotCustomRadar,this._add2Scene()}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive())}_add2Scene(){this._createRadarPrimitive()}_createRadarFillGeometry(e){return _0x328501.createGeometry(new _0x328501({customPts:e._customPts,slicePartitions:e.slicePartitions,stackPartitions:e.stackPartitions,radii:e.radii}),!0)}_createRadarOutLineGeometry(e){return _0x1ff575.createGeometry(new _0x1ff575({customPts:e._customPts,slicePartitions:e.slicePartitions,stackPartitions:e.stackPartitions,radii:e.radii}),!0)}getScanPts(e,t){var i=[];for(let r=0;r<e.length;r++){var n=[];const o=e[r];for(let e=0;e<t;e++){const t=o[e];n.push(t)}i.push(n)}return i}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e.rotate=this.rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x45019a(this,this._scene)}}Object.defineProperties(_0x45019a.prototype,{customPts:{get:function(){return this._customPts},set:function(e){Array.isArray(e)&&(this._customPts=e,this._isNeedUpdate=!0)}}});const _0x287a79=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x494dc0=_0x287a79(void 0,(function(){return _0x494dc0.toString().search("(((.+)+)+)+$").toString().constructor(_0x494dc0).search("(((.+)+)+)+$")}));_0x494dc0();class _0x2e830f extends _0x46adf9{constructor(e){super(e),this.PlotRadarType="PlotRotateRadarScan",this._slicePartitions=2,this._computeScanPts(e)}_computeScanPts(e){WebGLPlot.defined(e)&&(this.scanAngle=e.rotateAngle*(this._slicePartitions/e.slicePartitions),e._radarPts.length>3&&this._getScanPts(e._radarPts))}_getScanPts(e){this._radarPts=[];for(let i=0;i<e.length;i++){var t=[];const n=e[i];for(let e=0;e<this._slicePartitions;e++){const i=n[e];t.push(i)}this._radarPts.push(t)}}clone(e){return(!WebGLPlot.defined(e)||!(e instanceof _0x2e830f))&&(e=new _0x2e830f),(e=super.clone(e))._radarPts=this._radarPts,e.PlotRadarType=this.PlotRadarType,e._slicePartitions=this._slicePartitions,e.scanAngle=this.scanAngle,e._isNeedUpdate=!0,e}}const _0x59db20=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x8c2d4f=_0x59db20(void 0,(function(){return _0x8c2d4f.toString().search("(((.+)+)+)+$").toString().constructor(_0x8c2d4f).search("(((.+)+)+)+$")}));_0x8c2d4f();class _0x467388 extends _0x46adf9{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotRotateRadar scene is required.");super(e,t),this.PlotRadarType=_0x49109a.PlotRotateRadar,this._primitiveScnaFillArry=[],this._primitiveScnaOutLineArry=[],this._scanArray=[],this._merge(e),this._add2Scene()}getScanArray(){return this._scanArray}setScanArray(e){this.removeAllScanArray();for(let t=0;t<e.length;t++){const i=e[t];i instanceof _0x2e830f&&this._scanArray.push(i)}return this._createScanGeoArray(),this._scanArray}addScan(e){(!e||!(e instanceof _0x2e830f))&&(e=new _0x2e830f(this)),this._scanArray.push(e),this._createScanGeoArray()}removeAllScanArray(){this._removeAllScanArrayPrimitive(),this._scanArray=[]}removeScan(e){if(this._primitiveScnaFillArry.length>e){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaFillArry.splice(e,1)}if(this._primitiveScnaOutLineArry.length>e){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaOutLineArry.splice(e,1)}return this._scanArray.length>e&&(this._scanArray.splice(e,1),this._createScanGeoArray(),!0)}setScan(e,t){return e instanceof _0x2e830f&&(this.removeScan(t),this._scanArray.splice(t,0,e),this._createScanGeoArray(),!0)}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[]),this.removeAllScanArray()}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive());const t=this._dScanSpeed*e/1e3;this._updated_Scan(-t)}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScan()}_createScan(){if(this.removeAllScanArray(),!this.isShowScan||!this.show)return;const e=this.rotateAngle/this.scanCount;for(let r=0;r<this.scanCount;r++){var t=new _0x2e830f(this),i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*r);t._rotate=i,t.material=this.scanColor,this._scanArray.push(t);var n=new WebGLPlot.HeadingPitchRoll(t._rotate.z,t._rotate.y,t._rotate.x);const o=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this._offset.x,t.point.y+this._offset.y,t.point.z+this._offset.z),a=WebGLPlot.Transforms.headingPitchRollToFixedFrame(o,n);if(t.isFill){let e=this._createFillPrimitive(a,t);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(a,t);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan(e){if(this._removeAllScanArrayPrimitive(),this.isShowScan&&this.show)for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n];this.rotateAngle>=WebGLPlot.CesiumMath.TWO_PI?(t._rotate.z+=e,Math.abs(t._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(t._rotate.z=t._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(t.__bIsBack_?t._rotate.z-=e:t._rotate.z+=e,-t._rotate.z>=this.rotateAngle-this._rotate.z-t.scanAngle/2?t.__bIsBack_=!0:-t._rotate.z<=-this._rotate.z&&(t.__bIsBack_=!1));var i=new WebGLPlot.HeadingPitchRoll(t._rotate.z,t._rotate.y,t._rotate.x);const r=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this.offset.x,t.point.y+this.offset.y,t.point.z+this.offset.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,i);if(t.isFill){let e=this._createFillPrimitive(o,t);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(o,t);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_removeAllScanArrayPrimitive(){if(this._primitiveScnaFillArry.length>0){for(let e=0;e<this._primitiveScnaFillArry.length;e++){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaFillArry=[]}if(this._primitiveScnaOutLineArry.length>0){for(let e=0;e<this._primitiveScnaOutLineArry.length;e++){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaOutLineArry=[]}}_createRadarFillGeometry(e){return e||(e=this),_0x328501.createGeometry(new _0x328501({customPts:e._radarPts,slicePartitions:e.slicePartitions,stackPartitions:e._radarPts.length,radii:e.radii}),e.isClose)}_createRadarOutLineGeometry(e){return e||(e=this),_0x1ff575.createGeometry(new _0x1ff575({customPts:e._radarPts,slicePartitions:e.slicePartitions,stackPartitions:e._radarPts.length,radii:e.radii}),e.isClose)}_computerRadarPts(){if(this._customPts.length<3)throw new WebGLPlot.defined("PlotRotateRadar Property customPts.length < 3.");let e=[];for(let n=0;n<this._customPts.length;n++){const r=this._customPts[n],o=this.rotateAngle/(this.slicePartitions-1);for(var t=[],i=0;i<this.slicePartitions;i++){const e=i*o;t.push(new WebGLPlot.Cartesian3(r.x*Math.cos(e),r.x*Math.sin(e),r.y))}e.push(t)}return e}_createScanGeoArray(){const e=this.rotateAngle/this._scanArray.length;for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n],i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*n);t._rotate=i}}_merge(e){this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,.5)),e.dScanSpeed?this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),e.rotateAngle?this.rotateAngle=WebGLPlot.CesiumMath.toRadians(e.rotateAngle):this.rotateAngle=WebGLPlot.CesiumMath.toRadians(360),this.isClose=this.rotateAngle%WebGLPlot.CesiumMath.TWO_PI==0,this._radarPts=this._computerRadarPts()}}Object.defineProperties(_0x467388.prototype,{customPts:{get:function(){return this._customPts},set:function(e){Array.isArray(e)&&(this._customPts=e,this._radarPts=this._computerRadarPts())}}});const _0x177173=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x116052=_0x177173(void 0,(function(){return _0x116052.toString().search("(((.+)+)+)+$").toString().constructor(_0x116052).search("(((.+)+)+)+$")}));_0x116052();class _0x2a4b84 extends _0x467388{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotMechanicalRadar scene is required.");e.rotateAngle=360,e.scale=WebGLPlot.defaultValue(e.scale,1),e.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1e4,1e4,1e4)),e.cellAngle=WebGLPlot.defaultValue(e.cellAngle,5),e.customPts=_0x5ad840(e.radii.x/10*e.scale),e.slicePartitions=e.rotateAngle/e.cellAngle,super(e,t),this.PlotRadarType=_0x49109a.PlotMechanicalRadar}}function _0x5ad840(e){var t=[];return t.push(new WebGLPlot.Cartesian3(0,0,0)),t.push(new WebGLPlot.Cartesian3(1.10296043731977*e,.046804145634484*e,0)),t.push(new WebGLPlot.Cartesian3(2.21610390044188*e,.11759698792659*e,0)),t.push(new WebGLPlot.Cartesian3(3.23948463412258*e,.207919742367934*e,0)),t.push(new WebGLPlot.Cartesian3(4.24306826853316*e,.304605633553736*e,0)),t.push(new WebGLPlot.Cartesian3(5.07593366806073*e,.449055607644075*e,0)),t.push(new WebGLPlot.Cartesian3(6.09774013826592*e,.626275021765735*e,0)),t.push(new WebGLPlot.Cartesian3(6.82649676873021*e,.854033937659516*e,0)),t.push(new WebGLPlot.Cartesian3(7.59836360255064*e,1.13340451890574*e,0)),t.push(new WebGLPlot.Cartesian3(8.12046765798091*e,1.39526442140232*e,0)),t.push(new WebGLPlot.Cartesian3(8.77215268479149*e,1.76316819829927*e,0)),t.push(new WebGLPlot.Cartesian3(9.24420050024946*e,2.26394442518268*e,0)),t.push(new WebGLPlot.Cartesian3(9.41437066670075*e,2.78004341750028*e,0)),t.push(new WebGLPlot.Cartesian3(9.37677016147896*e,3.37826190260998*e,0)),t.push(new WebGLPlot.Cartesian3(9.02402463279236*e,4.05665157036142*e,0)),t.push(new WebGLPlot.Cartesian3(8.49067600110484*e,4.52027646588052*e,0)),t.push(new WebGLPlot.Cartesian3(7.93178024681909*e,4.83964546832953*e,0)),t.push(new WebGLPlot.Cartesian3(7.37859457443028*e,4.95818525526998*e,0)),t.push(new WebGLPlot.Cartesian3(6.73933014626123*e,4.97031713954619*e,0)),t.push(new WebGLPlot.Cartesian3(6.1144105659988*e,4.8548345993221*e,0)),t.push(new WebGLPlot.Cartesian3(5.51606295388907*e,4.68304158511523*e,0)),t.push(new WebGLPlot.Cartesian3(4.84103177562709*e,4.34900006813962*e,0)),t.push(new WebGLPlot.Cartesian3(4.09846873384157*e,3.95082720446673*e,0)),t.push(new WebGLPlot.Cartesian3(3.26846203349058*e,3.4279079135254*e,0)),t.push(new WebGLPlot.Cartesian3(2.2493811983941*e,2.68004157158963*e,0)),t.push(new WebGLPlot.Cartesian3(1.43802404023069*e,1.88816148893958*e,0)),t.push(new WebGLPlot.Cartesian3(.67580571600966*e,.925081705540024*e,0)),t.push(new WebGLPlot.Cartesian3(0,0,0)),t}Object.defineProperties(_0x2a4b84.prototype,{radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._radii)){this._radii=e.clone(),this.customPts=_0x5ad840(this._radii.x/10*this._scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e,this.customPts=_0x5ad840(this._radii.x/10*e);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}}});const _0x19f520=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4ab434=_0x19f520(void 0,(function(){return _0x4ab434.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ab434).search("(((.+)+)+)+$")}));_0x4ab434();class _0x18b408 extends _0x46adf9{constructor(e){if(super(e),this.PlotRadarType="PlotParameterRadarScan",this.scale=WebGLPlot.defaultValue(e.scale,1),this.radii=WebGLPlot.defaultValue(e.radii,0),this.innerRadii=WebGLPlot.defaultValue(e.innerRadii,0),this._minimumClock=WebGLPlot.CesiumMath.toRadians(0),this._maximumClock=WebGLPlot.CesiumMath.toRadians(5),this._minimumCone=WebGLPlot.defaultValue(e._minimumCone,0),this._maximumCone=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),this.heightReference=WebGLPlot.defaultValue(e.heightReference,void 0),this.subdivisions=WebGLPlot.defaultValue(e.subdivisions,128),this.shadows=WebGLPlot.defaultValue(e.shadows,WebGLPlot.ShadowMode.DISABLED),this.distanceDisplayCondition=WebGLPlot.defaultValue(e.distanceDisplayCondition,new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute),this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this.isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),this.__bIsBack_=void 0,this._minimumClock>this._maximumClock){let e=this._minimumClock;this._minimumClock=this._maximumClock,this._maximumClock=e}this.scanAngle=this._maximumClock-this._minimumClock,"PlotParameterRadar"===e.PlotRadarType&&(this.isOutline=!1)}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e.rotate=this.rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x18b408(this)}}const _0x1cc733=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2b5ec6=_0x1cc733(void 0,(function(){return _0x2b5ec6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b5ec6).search("(((.+)+)+)+$")}));_0x2b5ec6();class _0x2f0d40 extends _0x46adf9{constructor(e,t){super(e,t),this.PlotRadarType=_0x49109a.PlotParameterRadar,this._primitiveScnaFillArry=[],this._primitiveScnaOutLineArry=[],this._scanArray=[],this._merge(e),this._add2Scene()}getScanArray(){return this._scanArray}setScanArray(e){this.removeAllScanArray();for(let t=0;t<e.length;t++){const i=e[t];i instanceof _0x18b408&&this._scanArray.push(i)}return this._createScanGeoArray(),this._scanArray}addScan(e){(!e||!(e instanceof _0x18b408))&&(e=new _0x18b408(this)),this._scanArray.push(e),this._createScanGeoArray()}removeAllScanArray(){this._removeAllScanArrayPrimitive(),this._scanArray=[]}removeScan(e){if(this._primitiveScnaFillArry.length>e){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaFillArry.splice(e,1)}if(this._primitiveScnaOutLineArry.length>e){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaOutLineArry.splice(e,1)}return this._scanArray.length>e&&(this._scanArray.splice(e,1),this._createScanGeoArray(),!0)}setScan(e,t){return!(t>=this._scanArray.length)&&((!e||!(e instanceof _0x18b408))&&(e=new _0x18b408(this)),this.removeScan(t),this._scanArray.splice(t,0,e),this._createScanGeoArray(),!0)}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive());const t=this._dScanSpeed*e/1e3;this._updated_Scan(-t)}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScan()}_createScan(){if(this.removeAllScanArray(),!this.isShowScan||!this.show)return;const e=(this._maximumClock-this._minimumClock)/this.scanCount;for(let r=0;r<this.scanCount;r++){var t=new _0x18b408(this),i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-this._minimumClock-e*r);t._rotate=i,t.material=this.scanColor,this._scanArray.push(t);var n=new WebGLPlot.HeadingPitchRoll(t._rotate.z,t._rotate.y,t._rotate.x);const o=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this.offset.x,t.point.y+this.offset.y,t.point.z+this.offset.z),a=WebGLPlot.Transforms.headingPitchRollToFixedFrame(o,n);if(t.isFill){let e=this._createFillPrimitive(a,t);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(a,t);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan(e){if(this._removeAllScanArrayPrimitive(),this.isShowScan&&this.show)for(let i=0;i<this._scanArray.length;i++){const n=this._scanArray[i];this.radarClock>=WebGLPlot.CesiumMath.TWO_PI?(n._rotate.z+=e,Math.abs(n._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(n._rotate.z=n._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(n.__bIsBack_?n._rotate.z-=e:n._rotate.z+=e,-n._rotate.z>=this._maximumClock-this._rotate.z-n.scanAngle?n.__bIsBack_=!0:-n._rotate.z<=this._minimumClock-this._rotate.z&&(n.__bIsBack_=!1));var t=new WebGLPlot.HeadingPitchRoll(n._rotate.z,n._rotate.y,n._rotate.x);const r=WebGLPlot.Cartesian3.fromDegrees(n.point.x+this.offset.x,n.point.y+this.offset.y,n.point.z+this.offset.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,t);if(n.isFill){let e=this._createFillPrimitive(o,n);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(n.isOutline){let e=this._createOutlinePrimitive(o,n);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan2(e){if(this._primitiveScnaFillArry.length>0)for(let o=0;o<this._primitiveScnaFillArry.length;o++){let a=this._primitiveScnaFillArry[o];const s=this._scanArray[o];this.radarClock>=WebGLPlot.CesiumMath.TWO_PI?(s._rotate.z+=e,Math.abs(s._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(s._rotate.z=s._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(s.__bIsBack_?s._rotate.z-=e:s._rotate.z+=e,-s._rotate.z>=this._maximumClock-this._rotate.z-s.scanAngle?s.__bIsBack_=!0:-s._rotate.z<=this._minimumClock-this._rotate.z&&(s.__bIsBack_=!1));const l=WebGLPlot.Cartesian3.fromDegrees(s.point.x,s.point.y,s.point.z);var t=WebGLPlot.Matrix4.fromTranslation(l),i=WebGLPlot.Cartesian3.multiplyByScalar(l,-1,new WebGLPlot.Cartesian3),n=WebGLPlot.Matrix4.fromTranslation(i);let u=WebGLPlot.Matrix3.fromRotationX(s._rotate.x),c=WebGLPlot.Matrix3.fromRotationY(s._rotate.y),h=WebGLPlot.Matrix3.fromRotationZ(s._rotate.z);n=WebGLPlot.Matrix4.multiplyByMatrix3(n,u,n),n=WebGLPlot.Matrix4.multiplyByMatrix3(n,c,n),n=WebGLPlot.Matrix4.multiplyByMatrix3(n,h,n);var r=WebGLPlot.Matrix4.multiply(t,n,new WebGLPlot.Matrix4);a.modelMatrix=r}if(this._primitiveScnaOutLineArry.length>0)for(let e=0;e<this._primitiveScnaOutLineArry.length;e++)this._primitiveScnaOutLineArry[e]}_createRadarFillGeometry(e){return _0x436613.createGeometry(new _0x436613(e))}_createRadarOutLineGeometry(e){return _0x377d94.createGeometry(new _0x377d94(e))}_removeAllScanArrayPrimitive(){if(this._primitiveScnaFillArry.length>0){for(let e=0;e<this._primitiveScnaFillArry.length;e++){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaFillArry=[]}if(this._primitiveScnaOutLineArry.length>0){for(let e=0;e<this._primitiveScnaOutLineArry.length;e++){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaOutLineArry=[]}}_createScanGeoArray(){const e=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n],i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*n);t._rotate=i,t.scanAngle=t.maximumClock-t.minimumClock}}clone(e){return WebGLPlot.defined(e)?(e.PlotRadarType=this.PlotRadarType,e.id=this.id,e.point=this.point.clone(),e._rotate=this._rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this._innerRadii,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.fillColor,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x2f0d40(this)}_merge(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("PlotParameterRadar merge source is required.");if(this._innerRadii=WebGLPlot.defaultValue(e.innerRadii,0),e.minimumClock?this._minimumClock=WebGLPlot.CesiumMath.toRadians(e.minimumClock):this._minimumClock=0,e.maximumClock?this._maximumClock=WebGLPlot.CesiumMath.toRadians(e.maximumClock):this._maximumClock=WebGLPlot.CesiumMath.TWO_PI,e.minimumCone?this._minimumCone=WebGLPlot.CesiumMath.toRadians(e.minimumCone):this._minimumCone=0,e.maximumCone?this._maximumCone=WebGLPlot.CesiumMath.toRadians(e.maximumCone):this._maximumCone=WebGLPlot.CesiumMath.PI,this.heightReference=WebGLPlot.defaultValue(e.heightReference,void 0),this.distanceDisplayCondition=WebGLPlot.defaultValue(e.distanceDisplayCondition,new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute),this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),e.dScanSpeed?this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),this._minimumClock>this._maximumClock){let e=this._minimumClock;this._minimumClock=this._maximumClock,this._maximumClock=e}this.radarClock=this._maximumClock-this._minimumClock}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[]),this.removeAllScanArray()}}Object.defineProperties(_0x2f0d40.prototype,{point:{get:function(){return this._point},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._point)){this._point=e.clone();for(let t=0;t<this._scanArray.length;t++){this._scanArray[t].point=e}this._isNeedUpdate=!0}}},rotate:{get:function(){return new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toDegrees(this._rotate.x),WebGLPlot.CesiumMath.toDegrees(this._rotate.y),WebGLPlot.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81){let i=new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toRadians(e.x),WebGLPlot.CesiumMath.toRadians(e.y),WebGLPlot.CesiumMath.toRadians(e.z));if(!WebGLPlot.Cartesian3(i,this._rotate)){this._rotate=i;const e=(this._maximumClock-this._minimumClock)/this.scanCount;for(let i=0;i<this._scanArray.length;i++){const n=this._scanArray[i];var t=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*i);n._rotate=t}this._isNeedUpdate=!0}}}},innerRadii:{get:function(){return this._innerRadii.x<=1e-8||this._innerRadii.y<=1e-8||this._innerRadii.z<=1e-8?new _0x11ff81(0,0,0):this._innerRadii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._point)){(e.x<=0||e.y<=0||e.z<=0)&&(e=new _0x11ff81(1e-8,1e-8,1e-8)),this._innerRadii=e.clone(),this._innerRadii.x>this.radii.x&&(this._innerRadii=this.radii.clone());for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].innerRadii=this.innerRadii.clone()}this._isNeedUpdate=!0}}},radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._point)){this._radii=e.clone(),this._innerRadii.x>this.radii.x&&(this._innerRadii=this.radii.clone());for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].radii=this.radii.clone()}this._isNeedUpdate=!0}}},minimumClock:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._minimumClock)},set:function(e){if("number"!=typeof e||e===this.minimumClock||e>this.maximumClock)return;this._minimumClock=WebGLPlot.CesiumMath.toRadians(e),this._isNeedUpdate=!0;const t=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let e=0;e<this._scanArray.length;e++){var i=this._scanArray[e],n=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-t*e);i._rotate=n}this.radarClock=this._maximumClock-this._minimumClock}},maximumClock:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._maximumClock)},set:function(e){if("number"!=typeof e||e===this.maximumClock||e<this.minimumClock)return;this._maximumClock=WebGLPlot.CesiumMath.toRadians(e),this._isNeedUpdate=!0;const t=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let e=0;e<this._scanArray.length;e++){var i=this._scanArray[e],n=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-t*e);i._rotate=n}this.radarClock=this._maximumClock-this._minimumClock}},minimumCone:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._minimumCone)},set:function(e){if("number"==typeof e&&e!==this.minimumCone){this._minimumCone=WebGLPlot.CesiumMath.toRadians(e);for(let e=0;e<this._scanArray.length;e++){this._scanArray[e]._minimumCone=this._minimumCone}this._isNeedUpdate=!0}}},maximumCone:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._maximumCone)},set:function(e){if("number"==typeof e&&e!==this.maximumCone){this._maximumCone=WebGLPlot.CesiumMath.toRadians(e);for(let e=0;e<this._scanArray.length;e++){this._scanArray[e]._maximumCone=this._maximumCone}this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e;for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].scale=this._scale}this._isNeedUpdate=!0}}}});var _0xd7f0d1=(_0x1bb754=!0,function(e,t){var i=_0x1bb754?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1bb754=!1,i}),_0x398591=_0xd7f0d1(void 0,(function(){return _0x398591.toString().search("(((.+)+)+)+$").toString().constructor(_0x398591).search("(((.+)+)+)+$")})),_0x1bb754;_0x398591();class _0x11b373 extends _0x46adf9{constructor(e){super(e),this._slicePartitions=2,this.scaningRow=0,e._radarPts.length>3&&this._computeScanPts(e._radarPts),this.PlotRadarType="PlotScanRadarScan",e.scanConeColor&&(this._fillColor=e.scanConeColor),this.isBackIng=!1}_computeScanPts(e){const t=e[0],i=e[this.scaningRow+1],n=e[this.scaningRow+2];var r=[];r.push(new WebGLPlot.Cartesian3(t[0].x,t[0].y,t[0].z)),r.push(new WebGLPlot.Cartesian3(t[1].x,t[1].y,t[1].z));var o=[];o.push(new WebGLPlot.Cartesian3(i[0].x,i[0].y,i[0].z)),o.push(new WebGLPlot.Cartesian3(i[1].x,i[1].y,i[1].z));var a=[];a.push(new WebGLPlot.Cartesian3(n[0].x,n[0].y,n[0].z)),a.push(new WebGLPlot.Cartesian3(n[1].x,n[1].y,n[1].z));var s=[];s.push(new WebGLPlot.Cartesian3(t[0].x,t[0].y,t[0].z)),s.push(new WebGLPlot.Cartesian3(t[1].x,t[1].y,t[1].z)),this._radarPts=[r,o,a,s],this._indices=[0,3,2,0,4,5,0,2,4,0,5,3,4,2,3,3,5,4]}}const _0x12ec98=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x43891d=_0x12ec98(void 0,(function(){return _0x43891d.toString().search("(((.+)+)+)+$").toString().constructor(_0x43891d).search("(((.+)+)+)+$")}));_0x43891d();class _0x5d6ff7 extends _0x46adf9{constructor(e,t){super(e,t),this._primitiveScnaFill=void 0,this._primitiveScnaOutLine=void 0,this.PlotRadarType=_0x49109a.PlotScanRadar,e.isShowScan&&(this.scaningRow=1),this._fillPrimitives=[],this._merge(e),this._add2Scene()}_updated(e){if(this._isNeedUpdate&&(this._isNeedUpdate=!1,this._computeRadarPts2(),this._createRadarPrimitive()),this.isShowScan){const t=this.dScanSpeed*e/1e3;this._updated_Scan(-t)}}_updated_Scan(e){if(this._removeScanConePrimitive(),!this.scanCone)return;this.scaningRow%2!=0?this.scanCone.isBackIng=!1:(e*=-1,this.scanCone.isBackIng=!0),this.scanCone._rotate.z+=e,(-this.scanCone._rotate.z+this.cellAngle>=-this._rotate.z+this.scanHAngle||-this.scanCone._rotate.z<=-this._rotate.z&&this.scanCone.isBackIng)&&(this.scaningRow+=1,this.scanCone.scaningRow+=1,this.scaningRow-1>=this.scanVAngle/this.cellAngle&&(this.scanCone.scaningRow=0,this.scaningRow=1,this.scanCone._rotate.z=this._rotate.z),this._isNeedUpdate=!0,this.scanCone._computeScanPts(this._radarPts));var t=new WebGLPlot.HeadingPitchRoll(this.scanCone._rotate.z,this._rotate.y,this._rotate.x);const i=WebGLPlot.Cartesian3.fromDegrees(this.scanCone.point.x+this.offset.x,this.scanCone.point.y+this.offset.y,this.scanCone.point.z+this.offset.z),n=WebGLPlot.Transforms.headingPitchRollToFixedFrame(i,t);if(this.scanCone.isFill){let e=this._createFillPrimitive(n,this.scanCone);this._primitiveScnaFill=this._primitives.add(e[0])}if(this.scanCone.isOutline){let e=this._createOutlinePrimitive(n,this.scanCone);this._primitiveScnaOutLine=this._primitives.add(e)}}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScanCone()}_createRadarFillGeometry(e,t){return e||(e=this),t||(t=e._radarPts),_0x328501.createGeometry(new _0x328501({customPts:t,slicePartitions:e.slicePartitions,stackPartitions:t.length,radii:e.radii,indices:e._indices}),this.isClose)}_createRadarOutLineGeometry(e,t){return e||(e=this),t||(t=e._radarPts),_0x1ff575.createGeometry(new _0x1ff575({customPts:t,slicePartitions:e.slicePartitions,stackPartitions:t.length,radii:this.radii}),this.isClose)}_createScanCone(){this._removeScanConePrimitive(),this.scanCone||(this.scanCone=new _0x11b373(this)),this.scanCone.rotate=this.rotate,this.scanCone.material=this.scanConeColor;var e=new WebGLPlot.HeadingPitchRoll(this.scanCone._rotate.z,this.scanCone._rotate.y,this.scanCone._rotate.x);const t=WebGLPlot.Cartesian3.fromDegrees(this.point.x+this.offset.x,this.point.y+this.offset.y,this.point.z+this.offset.z),i=WebGLPlot.Transforms.headingPitchRollToFixedFrame(t,e);if(this.scanCone.isFill){let e=this._createFillPrimitive(i,this.scanCone);this._primitiveScnaFill=this._primitives.add(e[0])}if(this.scanCone.isOutline){let e=this._createOutlinePrimitive(i,this.scanCone);this._primitiveScnaOutLine=this._primitives.add(e)}}_removeScanConePrimitive(){this._primitiveScnaFill&&(this._primitives.removeAndDestroy(this._primitiveScnaFill),this._primitiveScnaFill=void 0),this._primitiveScnaOutLine&&(this._primitives.removeAndDestroy(this._primitiveScnaOutLine),this._primitiveScnaOutLine=void 0)}_addFillPrimitive(e){if(this._fillPrimitives.length>0){for(var t in this._fillPrimitives)this._primitives.removeAndDestroy(this._fillPrimitives[t]);this._fillPrimitives=[]}let i=this._createFillPrimitive(e);for(var t in i)this._fillPrimitives.push(this._primitives.add(i[t]))}_createFillPrimitive(e,t){t||(t=this);var i=[],n={show:new WebGLPlot.ShowGeometryInstanceAttribute(t.isFill),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:void 0,offset:void 0},r=new WebGLPlot.MaterialAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:t.fillColor}),translucent:!0,closed:!0});let o=this._createRadarFillGeometry(t,t._radarPts1),a=new WebGLPlot.GeometryInstance({id:t.id,geometry:o,modelMatrix:e,attributes:n}),s=new WebGLPlot.Primitive({geometryInstances:a,appearance:r,asynchronous:!1,shadows:t.shadows});if(i.push(s),t._radarPts2&&t._radarPts2.length>2){let r=this._createRadarFillGeometry(t,t._radarPts2),o=new WebGLPlot.GeometryInstance({id:t.id,geometry:r,modelMatrix:e,attributes:n});var l=new WebGLPlot.MaterialAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:t.scanedColor}),translucent:!0,closed:!0});let a=new WebGLPlot.Primitive({geometryInstances:o,appearance:l,asynchronous:!1,shadows:t.shadows});i.push(a)}return i}_createOutlinePrimitive(e,t){t||(t=this);var i={show:new WebGLPlot.ShowGeometryInstanceAttribute(t.isOutline),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(t.outlineColor),offset:void 0};let n=this._createRadarOutLineGeometry(t,t._radarPts),r=new WebGLPlot.GeometryInstance({id:t.id,geometry:n,modelMatrix:e,attributes:i}),o=new WebGLPlot.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:t.outlineWidth}});return new WebGLPlot.Primitive({geometryInstances:r,appearance:o,asynchronous:!1,shadows:t.shadows})}_merge(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("PlotScanRadar merge source is required.");this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),e.cellAngle?this.cellAngle=WebGLPlot.CesiumMath.toRadians(e.cellAngle):this.cellAngle=WebGLPlot.CesiumMath.toRadians(5);let t=30,i=60,n=WebGLPlot.CesiumMath.toDegrees(this.cellAngle);WebGLPlot.defined(e.scanVAngle)?t=e.scanVAngle%n!=0?e.scanVAngle+(n-e.scanVAngle%n):e.scanVAngle:t%n!=0?t+=n-t%n:t=t,WebGLPlot.defined(e.scanHAngle)?i=e.scanHAngle%n!=0?e.scanHAngle+(n-e.scanHAngle%n):e.scanHAngle:i%n!=0?i+=n-i%n:i=i,this.scanVAngle=WebGLPlot.CesiumMath.toRadians(t),this.scanHAngle=WebGLPlot.CesiumMath.toRadians(i),this._stackPartitions=t/n+1,this._slicePartitions=i/n+1,this.scanHAngle>=WebGLPlot.CesiumMath.TWO_PI&&(this.isClose=!0),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this._scanConeColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(0,1,0,.8)),this._scanedColor=WebGLPlot.defaultValue(e.scanedColor,new WebGLPlot.Color(0,1,0,.3)),e.dScanSpeed?this.dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this.dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),this._computeRadarPts(),this._computeRadarPts2()}_computeRadarPts(){const e=this.radii.x*this.scale;this._customPts=[],this._customPts.push(new WebGLPlot.Cartesian2(0,0));for(let t=0;t<=this.scanVAngle;t+=this.cellAngle){const i=Math.cos(t)*e,n=Math.sin(t)*e;this._customPts.push(new WebGLPlot.Cartesian2(i,n))}this._customPts.push(new WebGLPlot.Cartesian2(0,0));let t=[];for(let e=0;e<this._customPts.length;e++){const r=this._customPts[e];for(var i=[],n=0;n<=this.scanHAngle;n+=this.cellAngle)i.push(new WebGLPlot.Cartesian3(r.x*Math.cos(n),r.x*Math.sin(n),r.y));t.push(i)}this._radarPts=t}_computeRadarPts2(){const e=this.radii.x*this.scale;this._customPts1=[],this._customPts1.push(new WebGLPlot.Cartesian2(0,0));for(let t=this.scaningRow*this.cellAngle;t<=this.scanVAngle;t+=this.cellAngle){const i=Math.cos(t)*e,n=Math.sin(t)*e;this._customPts1.push(new WebGLPlot.Cartesian2(i,n))}if(this._customPts1.push(new WebGLPlot.Cartesian2(0,0)),this._customPts2=[],this.scaningRow>0){this._customPts2.push(new WebGLPlot.Cartesian2(0,0));for(let t=0;t<=this.scaningRow*this.cellAngle;t+=this.cellAngle){const i=Math.cos(t)*e,n=Math.sin(t)*e;this._customPts2.push(new WebGLPlot.Cartesian2(i,n))}this._customPts2.push(new WebGLPlot.Cartesian2(0,0))}let t=[];for(let e=0;e<this._customPts1.length;e++){const r=this._customPts1[e];for(var i=[],n=0;n<=this.scanHAngle;n+=this.cellAngle)i.push(new WebGLPlot.Cartesian3(r.x*Math.cos(n),r.x*Math.sin(n),r.y));t.push(i)}this._radarPts1=t;let r=[];for(let e=0;e<this._customPts2.length;e++){const t=this._customPts2[e];for(i=[],n=0;n<=this.scanHAngle;n+=this.cellAngle)i.push(new WebGLPlot.Cartesian3(t.x*Math.cos(n),t.x*Math.sin(n),t.y));r.push(i)}this._radarPts2=r}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e._rotate=this._rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x5d6ff7(this,this._scene)}destroy(){if(this._removeScanConePrimitive(),this._fillPrimitives.length>0){for(var e in this._fillPrimitives)this._primitives.removeAndDestroy(this._fillPrimitives[e]);this._fillPrimitives=[]}this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this.scanCone=void 0}}Object.defineProperties(_0x5d6ff7.prototype,{point:{get:function(){return this._point},set:function(e){(e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._point)&&(this._point=e.clone(),this.scanCone.point=e.clone(),this._isNeedUpdate=!0)}},radii:{get:function(){return this._radii},set:function(e){(e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._radii)&&(this._radii=e.clone(),this._computeRadarPts(),this._computeRadarPts2(),this.scanCone._computeScanPts(this._radarPts),this._isNeedUpdate=!0)}},scale:{get:function(){return this._scale},set:function(e){"number"==typeof e&&this._scale!==e&&(this._scale=e,this._computeRadarPts(),this._computeRadarPts2(),this.scanCone._computeScanPts(this._radarPts),this._isNeedUpdate=!0)}},rotate:{get:function(){return new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toDegrees(0),WebGLPlot.CesiumMath.toDegrees(0),WebGLPlot.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81){let t=new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toRadians(0),WebGLPlot.CesiumMath.toRadians(0),WebGLPlot.CesiumMath.toRadians(e.z));WebGLPlot.Cartesian3.equals(t,this._rotate)||(this._rotate=t,this._createScanCone(),this._isNeedUpdate=!0)}}},scanedColor:{get:function(){return this._scanedColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._scanedColor)&&(this._scanedColor=e,this._createRadarPrimitive())}},fillColor:{get:function(){return this._fillColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._fillColor)&&(this._fillColor=e,this._createRadarPrimitive())}},scanConeColor:{get:function(){return this._scanConeColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._scanConeColor)&&(this._scanConeColor=e,this._createScanCone())}}});const _0x143e2c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x564680=_0x143e2c(void 0,(function(){return _0x564680.toString().search("(((.+)+)+)+$").toString().constructor(_0x564680).search("(((.+)+)+)+$")}));_0x564680();class _0x5e75e0 extends _0x467388{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotWarningRadar scene is required.");e.rotateAngle=360,e.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1e4,1e4,1e4)),e.cellAngle=WebGLPlot.defaultValue(e.cellAngle,5),e.customPts=_0x2111f3(e.radii.x),e.slicePartitions=e.rotateAngle/e.cellAngle,super(e,t),this.PlotRadarType=_0x49109a.PlotWarningRadar}clone(e){if(!WebGLPlot.defined(e)){var t=new _0x5e75e0(this,this._scene);return t.id=WebGLPlot.createGuid(),t}return e._id=this.id,e._point=this.point.clone(),e._rotate=this.rotate.clone(),e._show=this.show,e._radii=this.radii,e._innerRadii=this.innerRadii,e._minimumClock=this.minimumClock,e._maximumClock=this.maximumClock,e._minimumCone=this.minimumCone,e._maximumCone=this.maximumCone,e._heightReference=this.heightReference,e._fill=this.fill,e._material=this.material,e._outline=this.outline,e._outlineColor=this.outlineColor,e._outlineWidth=this.outlineWidth,e._stackPartitions=this.stackPartitions,e._slicePartitions=this.slicePartitions,e._shadows=this.shadows,e._distanceDisplayCondition=this.distanceDisplayCondition,e}}function _0x2111f3(e){return[new WebGLPlot.Cartesian3(0,e/5,0),new WebGLPlot.Cartesian3(e,e/5*2,0),new WebGLPlot.Cartesian3(e,0,0),new WebGLPlot.Cartesian3(0,e/5,0)]}Object.defineProperties(_0x5e75e0.prototype,{radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._radii)){this._radii=e.clone(),this.customPts=_0x2111f3(this._radii.x*this.scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e,this.customPts=_0x2111f3(this._radii.x*this.scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}}});var _0x391965=(_0x2e9432=!0,function(e,t){var i=_0x2e9432?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e9432=!1,i}),_0x33aa66=_0x391965(void 0,(function(){return _0x33aa66.toString().search("(((.+)+)+)+$").toString().constructor(_0x33aa66).search("(((.+)+)+)+$")})),_0x2e9432;_0x33aa66();var _0x564a2c={LocationPt:0,ScalePt:1,AlgoMovePt:2,UnkownPt:4},_0x1e0288=Object.freeze(_0x564a2c),_0x4d3584=(_0x425a1f=!0,function(e,t){var i=_0x425a1f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x425a1f=!1,i}),_0x59f30e=_0x4d3584(void 0,(function(){return _0x59f30e.toString().search("(((.+)+)+)+$").toString().constructor(_0x59f30e).search("(((.+)+)+)+$")})),_0x425a1f;function _0x1f7045(e,t){this._scene=e,this._graphicObject=null,this._ctrlPoints=new WebGLPlot.BillboardCollection,this._scene.primitives.add(this._ctrlPoints),this.positionPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointWhite_Go.png"),this.scalePointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointYellow_Go.png"),this.anchorPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointRed_Go.png"),this.handle=t,this.isShiftPress=!1,this.shiftKeyDownFun=void 0,this.shiftKeyUpFun=void 0,this.editHeightMode=!1,this.ctrlPointCallBack=null}function _0x47b44d(e,t,i){e[t]=i}function _0x4c6e9e(e,t,i){for(var n=0;n<e._ctrlPoints.length;++n){var r=e._ctrlPoints.get(n);r.index===t.index&&r.type===t.type||(r.show=i)}}function _0x30eb39(e,t,i,n){if(e._graphicObject){var r=1,o=e._scene,a=WebGLPlot.SceneTransforms.transformWindowToDrawingBuffer(o,n);a.y=o.drawingBufferHeight-a.y;var s=WebGLPlot.Cartesian3.fromDegrees(e.startPoint.x,e.startPoint.y,0),l=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(o,s),u=_0x1f7045.getAltitudeByLogical(s,a,o);if(WebGLPlot.defined(u)){l.y<n.y&&(r=-1);var c=WebGLPlot.Cartesian3.distance(s,u)*r,h=new _0x11ff81(e.startPoint.x,e.startPoint.y,c);if(WebGLPlot.defined(i.index)){var d=i.index;t.localPoints[d]=h}else WebGLPlot.defined(i.annotationIndex)&&(t._localPoint=h);_0x2d6822.isSymbolDot(t.symbolType)?e._graphicObject.billboard.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z):e._graphicObject._initialize=!1,i.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z),e._graphicObject._wholeHeight=0}}}function _0x3f5100(e,t,i,n){if(WebGLPlot.defined(n)&&t._graphicObject){var r,o=i.type;t.getCtrlPt(i.type,i.index);var a=t._graphicObject;if(0===e)o===_0x1e0288.LocationPt&&t.isShiftPress&&(t.editHeightMode=!0),o===_0x1e0288.ScalePt&&(i.startScalePtn=n);else if(1===e){if(o===_0x1e0288.LocationPt&&(t.editHeightMode?_0x30eb39(t,t._graphicObject,i,n):(t._graphicObject.localPoints[i.index]=n,_0x2d6822.isSymbolDot(t._graphicObject.symbolType)?(t._graphicObject.__setEffectParameter({point:n}),t._graphicObject.billboard.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)):t._graphicObject.localPoints[0]=new WebGLPlot.Cartesian3(n.x,n.y,n.z),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z))),o===_0x1e0288.ScalePt){if(null===t._graphicObject)return;r=t.modifyDotSymbolSize(n,i.startScalePtn),a._sizeInMeters?(a.showMode===_0x4e5d29.Grid&&(a.billboard.scale=a.symbolSizeInMeters.x/a.gridSymbolSize.x*r,i.eyeOffset=new WebGLPlot.Cartesian3(i.eyeOffsetX*r,i.eyeOffsetY*r,0)),a.showMode===_0x4e5d29.Picture&&(a.billboard.scale=a.symbolPictureSizeInMeters.x/a._pictureSymbolSize.x*r,i.eyeOffset=new WebGLPlot.Cartesian3(i.eyeOffsetX*r,i.eyeOffsetY*r,0))):(i.pixelOffset=new WebGLPlot.Cartesian3(i.pixelOffsetX*r,i.pixelOffsetY*r,0),a.billboard.scale=r)}}else 2===e&&o===_0x1e0288.ScalePt&&(r=t.modifyDotSymbolSize(n,i.startScalePtn),a._sizeInMeters?(a.showMode===_0x4e5d29.Grid&&(a.symbolSizeInMeters=new WebGLPlot.Cartesian2(a.symbolSizeInMeters.x*r,a.symbolSizeInMeters.y*r)),a.showMode===_0x4e5d29.Picture&&(a.symbolPictureSizeInMeters=new WebGLPlot.Cartesian2(a.symbolPictureSizeInMeters.x*r,a.symbolPictureSizeInMeters.y*r))):(i.pixelOffsetX*=r,i.pixelOffsetY*=r,a.showMode===_0x4e5d29.Picture?(a.pictureSymbolSize.x*=r,a.pictureSymbolSize.y*=r):a.showMode===_0x4e5d29.Grid&&(a.gridSymbolSize.x*=r,a.gridSymbolSize.y*=r)),a._initialize=!1,t.createCtrlPoints(a))}}function _0x4feff0(e,t,i,n){if(WebGLPlot.defined(n)&&WebGLPlot.defined(t._graphicObject)){var r=i.type,o=i.index;if(r===_0x1e0288.LocationPt){if(t.editHeightMode)_0x30eb39(t,t._graphicObject,i,n);else{if(!(n instanceof _0x11ff81))return;var a=SuperMapAlgoPlot.PlottingUtil.clonePoints(t._graphicObject.localPoints);if(a[o]=n,(a=_0x2d6822.clearNextSamePts(a)).length!==t._graphicObject.localPoints.length)return;t._graphicObject.localPoints[o]=n,t.isogon&&0!==o&&(o=1),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)}t._graphicObject._isScalePtModify=!1}else if(r===_0x1e0288.ScalePt){if(!(n instanceof _0x11ff81))return;if(1===e){t._graphicObject._isScalePtModify=!0,t._graphicObject._modifyScalePtParams={index:o,position:n};var s=_0x41d4a9(t._graphicObject._scalePoints);i.position=s[o]}else if(2===e){var l=t._graphicObject._scalePoints[o],u=WebGLPlot.Cartesian3.fromDegrees(l.x,l.y,l.z);i.position=u,t._graphicObject._isScalePtModify=!1}}else if(r===_0x1e0288.AlgoMovePt){if(!(n instanceof _0x11ff81))return;t.getCtrlPt(r,o).position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z);for(var c=n.x-t.redPntPos.x,h=n.y-t.redPntPos.y,d=0;d<t._graphicObject.localPoints.length;++d){var f=t._graphicObject.localPoints[d];t._graphicObject.localPoints[d]=new WebGLPlot.Cartesian3(f.x+c,f.y+h,f.z)}t._graphicObject._isScalePtModify=!1,t.redPntPos.x=n.x,t.redPntPos.y=n.y}t._graphicObject._initialize=!1}}function _0x277d71(e,t,i){if(i instanceof _0x11ff81&&e._graphicObject&&e._graphicObject.annotationArray){var n=0,r=0;e._graphicObject.code;var o=e._graphicObject.symbolType;if(_0x2d6822.isSymbolDot(o)||t.type!==_0x1e0288.AlgoMovePt){if(!_0x2d6822.isSymbolDot(o)&&o!==_0x18bc2f.SYMBOL_TEXT||t.type!==_0x1e0288.LocationPt)return;n=i.x-e._graphicObject.localPoints[t.index].x,r=i.y-e._graphicObject.localPoints[t.index].y}else n=i.x-e.redPntPos.x,r=i.y-e.redPntPos.y;for(var a=0;a<e._graphicObject.annotationArray.length;a++){var s=e._graphicObject.annotationArray[a];s._localPoint.x+=n,s._localPoint.y+=r,s._localPoint.z=i.z}}}function _0x58c5f3(e,t,i,n){if(WebGLPlot.defined(n)&&t._graphicObject){if(WebGLPlot.defined(i.index)){_0x277d71(t,i,n);var r=t._graphicObject.symbolType;t._graphicObject.code,_0x2d6822.isSymbolDot(r)||r===_0x18bc2f.SYMBOL_TEXT?_0x3f5100(e,t,i,n):_0x4feff0(e,t,i,n)}else if(t._graphicObject.annotationArray.length>0){var o=t._graphicObject.annotationArray[i.annotationIndex];t.editHeightMode?_0x30eb39(t,o,i,n):n instanceof _0x11ff81&&(o._localPoint=n,i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z))}0===e&&t.isShiftPress?t.editHeightMode=!0:2===e&&(t._graphicObject._initialize=!1)}}function _0x41d4a9(e){var t=[];if(!WebGLPlot.defined(e)||0===e.length)return t;for(var i=0;i<e.length;++i){var n=e[i];t.push(n.x),t.push(n.y),t.push(0)}return WebGLPlot.Cartesian3.fromDegreesArrayHeights(t)}function _0xbe5764(e,t,i,n){if(t.editHeightMode){var r=1,o=t._scene,a=WebGLPlot.SceneTransforms.transformWindowToDrawingBuffer(o,n);a.y=o.drawingBufferHeight-a.y;var s=WebGLPlot.Cartesian3.fromDegrees(t.startPoint.x,t.startPoint.y,0),l=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(o,s),u=_0x1f7045.getAltitudeByLogical(s,a,o);if(!WebGLPlot.defined(u))return;l.y<n.y&&(r=-1);var c=WebGLPlot.Cartesian3.distance(s,u)*r,h=new _0x11ff81(t.startPoint.x,t.startPoint.y,c);t._graphicObject instanceof _0x3a6b26&&t._graphicObject.setOffset(h,!0),i.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z)}else{if(!(n instanceof _0x11ff81))return;var d=WebGLPlot.Cartographic.fromCartesian(i.position),f=new _0x11ff81(WebGLPlot.CesiumMath.toDegrees(d.longitude),WebGLPlot.CesiumMath.toDegrees(d.latitude),d.height),p=new _0x11ff81(n.x-f.x,n.y-f.y,n.z-f.z);t._graphicObject instanceof _0x3a6b26&&t._graphicObject.setOffset(p),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)}}_0x59f30e(),_0x1f7045.prototype.createCtrlPoint=function(e,t){if(WebGLPlot.defined(e)){var i=this;this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t){i.isShiftPress&&(i.editHeightMode=!0),_0x58c5f3(0,i,e,t),_0x4c6e9e(i,e,!1)},onDrag:function(e,t){_0x58c5f3(1,i,e,t)},onDragEnd:function(t,n){_0x58c5f3(2,i,t,n),i.createCtrlPoints(i._graphicObject),i.handle._featureModifiedEvent.raiseEvent(e),_0x47a70a.getInstance().symbolModified.raiseEvent(e),t.type===_0x1e0288.LocationPt&&i.handle._featureDragEvent.raiseEvent(i._graphicObject)}}},e.code;var n=e.symbolType,r=null,o=new WebGLPlot.Cartesian3(0,0,0),a=[];if(t===_0x1e0288.LocationPt)r=this.positionPointIconUrl,0===e.libID&&_0x18bc2f.SYMBOL_REGULARPOLYGON===e.code?(a.push(e.localPoints[0]),a.push(e.localPoints[e.localPoints.length-1]),this.isogon=!0):0===e.libID&&_0x18bc2f.SYMBOL_TEXT===e.code?a.push(e.localPoints[0]):a=e.localPoints;else if(t===_0x1e0288.ScalePt)r=this.scalePointIconUrl,_0x2d6822.isSymbolDot(n)?(o=i.getSaclePtOffset(e),a=e.localPoints):n!==_0x18bc2f.SYMBOL_DOT&&n!==_0x18bc2f.SYMBOL_TEXT&&(a=e._scalePoints);else if(t===_0x1e0288.AlgoMovePt){r=this.anchorPointIconUrl,a.push(i.computeRedPoint(e));var s=i.computeRedPoint(e);i.redPntPos=s}var l=Number.MIN_VALUE;this._scene.globe.depthTestAgainstTerrain&&(l=Number.MAX_VALUE);for(var u=0;u<a.length;++u){(void 0===a[u].z||isNaN(a[u].z))&&(a[u].z=0);var c={show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(a[u].x,a[u].y,a[u].z),scale:2,image:r,id:e.id,disableDepthTestDistance:l};if(e._sizeInMeters?c.eyeOffset=o:c.pixelOffset=o,(c=this._ctrlPoints.add(c)).index=u,c.type=t,c.SymbolType=_0x18bc2f.SYMBOL_UNKNOW,e._sizeInMeters)c.eyeOffsetX=o.x,c.eyeOffsetY=o.y;else{if(void 0===o)return;c.pixelOffsetX=o.x,c.pixelOffsetY=o.y}this.addCallback(c,i.ctrlPointCallBack)}}},_0x1f7045.prototype.createCtrlPoints=function(e){if(this.removeAll(),e&&this.handle._plottingLayer._isEditable){this._graphicObject=e;var t=e.symbolType;t===_0x18bc2f.SYMBOL_DOT&&e.showMode===_0x4e5d29.Marker||(this.createCtrlPoint(e,_0x1e0288.LocationPt),this.createCtrlPoint(e,_0x1e0288.ScalePt),!_0x2d6822.isSymbolDot(e.symbolType)&&t!==_0x18bc2f.SYMBOL_TEXT&&this.createCtrlPoint(e,_0x1e0288.AlgoMovePt),this.createAnnotationArrayCtrlPoints(e))}},_0x1f7045.prototype.createAnnotationArrayCtrlPoints=function(e){if(e&&e.annotationArray.length>0)for(var t=0;t<e.annotationArray.length;t++){var i=e.annotationArray[t];this.createAnnotationCtrlPoint(i,t)}},_0x1f7045.prototype.createAnnotationCtrlPoint=function(e,t){if(this._graphicObject){var i=e._localPoint,n=this._ctrlPoints.add({show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(i.x,i.y,i.z),scale:2,image:this.scalePointIconUrl,id:this._graphicObject.id,horizontalOrigin:WebGLPlot.HorizontalOrigin.LEFT});n.annotationIndex=t,n.type=_0x1e0288.LocationPt,n.SymbolType=_0x18bc2f.SYMBOL_UNKNOW,this.addCallback(n,this.ctrlPointCallBack)}},_0x1f7045.prototype.addCallback=function(e,t){var i=this;t.dragHandlers&&(_0x47b44d(e,"LEFT_DOWN",(function(n,r){function o(n,r){_0x2d6822.screenSpaceCameraController(i._scene,!1),void 0!==e.index&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(n,r),void 0!==e.annotationIndex&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(n,r)}function a(n,o){r.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x2d6822.screenSpaceCameraController(i._scene,!0),void 0!==e.index&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(n,o),void 0!==e.annotationIndex&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(n,o)}r.setInputAction((function(t){if(i._graphicObject)if(i.editHeightMode||e.type===_0x1e0288.ScalePt&&_0x2d6822.isSymbolDot(i._graphicObject.symbolType))o(e,t.endPosition);else{var n=_0x2d6822.getPosition(i._scene,t.endPosition);o(e,n)}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.setInputAction((function(t){i.editHeightMode||e.type===_0x1e0288.ScalePt&&_0x2d6822.isSymbolDot(i._graphicObject.symbolType)?a(e,t.position):a(e,_0x2d6822.getPosition(i._scene,t.position))}),WebGLPlot.ScreenSpaceEventType.LEFT_UP),void 0!==e.index&&t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(e,n),void 0!==e.annotationIndex&&t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(e,n)})),_0x47b44d(e,"mouseMove",(function(t){i.editHeightMode||(i.isShiftPress&&0===e.type?i._scene._canvas.style.cursor="n-resize":i._scene._canvas.style.cursor="default")})),_0x47b44d(e,"mouseOut",(function(e){i.editHeightMode||(i._scene._canvas.style.cursor="")})))},_0x1f7045.prototype.getSaclePtOffset=function(e){var t,i,n=e.billboardBoundsLineWidth,r=new WebGLPlot.Cartesian3(0,0,0);if(e.showMode===_0x4e5d29.Picture){let o=e._dotGrid._canvas.getContext("2d").measureText(e._textContent).width;t=(o>e.pictureSymbolSize.x?o:e.pictureSymbolSize.x)+n,i=e.pictureSymbolSize.y+n,e.sizeInMeters&&(i*=-1,t*=e.billboard.scale,i*=e.billboard.scale),r=new WebGLPlot.Cartesian3(t/2*e.scale,-i*e.scale,0)}else if(e.showMode===_0x4e5d29.Grid){if(null===e._dotGrid)return;t=e._dotGrid.selectedRectBounds.x+e._dotGrid.selectedRectBounds.width-e._dotGrid._canvas.width/2,i=e._dotGrid._canvas.height-e._dotGrid.selectedRectBounds.y,i-=e._dotGrid._OffsetText_Down,e.sizeInMeters&&(i*=-1,t*=e.billboard.scale/e.scale,i*=e.billboard.scale/e.scale),r=new WebGLPlot.Cartesian3(t,-i,0)}return r},_0x1f7045.prototype.getCtrlPt=function(e,t){for(var i=0;i<this._ctrlPoints.length;i++){var n=this._ctrlPoints.get(i);if(n.type===e&&t===n.index)return this._ctrlPoints.get(i)}return null},_0x1f7045.prototype.removeAll=function(){this._ctrlPoints.removeAll(),this._graphicObject=null},_0x1f7045.prototype.modifyDotSymbolSize=function(e,t){if(this._graphicObject){if(!WebGLPlot.defined(e))return this._graphicObject.billboard.scale;var i=this._scene,n=this._graphicObject.localPoints[0],r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)),o=_0x2d6822.distance(r,t);return _0x2d6822.distance(r,e)/o}},_0x1f7045.prototype.addListener=function(){var e=this;e.handle._featureRemoveEvent.addEventListener((function(){WebGLPlot.defined(e._ctrlPoints)&&e._ctrlPoints.removeAll()})),e.shiftKeyDownFun=function(t){72===t.keyCode&&(e.isShiftPress=!0)},e.shiftKeyUpFun=function(t){72===t.keyCode&&(e.isShiftPress=!1,e.editHeightMode=!1)},document.addEventListener("keydown",e.shiftKeyDownFun),document.addEventListener("keyup",e.shiftKeyUpFun)},_0x1f7045.prototype.removeListener=function(){document.removeEventListener("keydown",this.shiftKeyDownFun),document.removeEventListener("keyup",this.shiftKeyUpFun)},_0x1f7045.getAltitudeByLogical=function(e,t,i){var n=WebGLPlot.Cartographic.fromCartesian(e);n.height+=1,n=WebGLPlot.Cartesian3.fromRadians(n.longitude,n.latitude,n.height);var r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,e),o=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(o){var a;o.x===r.x?(-1,a=0):o.y===r.y?(0,a=-1):a=-1/((o.y-r.y)/(o.x-r.x));var s=i._view.viewport,l={left:s.x,right:s.x+s.width,bottom:s.y,top:s.y+s.height},u=_0x2d6822.intersectionOfRectByPointslopeline(t,a,l),c=u[0],h=u[1],d=new WebGLPlot.Cartesian3,f=new WebGLPlot.Cartesian3;WebGLPlot.SceneTransforms.drawingBufferToWgs84Coordinates(i,c,1,d),WebGLPlot.SceneTransforms.drawingBufferToWgs84Coordinates(i,h,1,f);var p=i.camera.position,_=new WebGLPlot.Cartesian3;WebGLPlot.Cartesian3.subtract(e,n,_);var m=new WebGLPlot.Cartesian3;WebGLPlot.Cartesian3.negate(_,m),WebGLPlot.Cartesian3.normalize(_,_),WebGLPlot.Cartesian3.normalize(m,m);var g=new WebGLPlot.Ray(e,_),x=new WebGLPlot.Ray(e,m),v=WebGLPlot.IntersectionTests.rayTriangleParametric(g,d,f,p);if(v)return WebGLPlot.Ray.getPoint(g,v);if(v=WebGLPlot.IntersectionTests.rayTriangleParametric(x,d,f,p))return WebGLPlot.Ray.getPoint(x,v)}},_0x1f7045.prototype.computeRedPoint=function(e){if(WebGLPlot.defined(e)||"function"!==e.computeBounds){var t=e.computeBounds(),i=this.pixelDisToRealDis(t,3);return new WebGLPlot.Cartesian3(t.x,t.y-i,t.z)}},_0x1f7045.prototype.pixelDisToRealDis=function(e,t){var i=this._scene,n=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(!WebGLPlot.defined(r))return 0;var o=new WebGLPlot.Cartesian3(r.x+t,r.y,0),a=_0x2d6822.getPosition(i,r),s=_0x2d6822.getPosition(i,o);return _0x2d6822.distance(a,s)},_0x1f7045.prototype.createGroupObjectCtrlPoint=function(e,t,i){if(WebGLPlot.defined(e)){this._graphicObject=e;var n=this;this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t){n.isShiftPress&&(n.editHeightMode=!0),n.handle.removeGroupObjectEditObject(),_0xbe5764(0,n,e,t)},onDrag:function(e,t){_0xbe5764(1,n,e,t)},onDragEnd:function(t,i){_0xbe5764(2,n,t,i),n.handle._featureModifiedEvent.raiseEvent(e),_0x47a70a.getInstance().symbolModified.raiseEvent(e),n.handle.drawGroupObjectEditObject(n._graphicObject,!0)}}};var r=null;i===_0x1e0288.LocationPt&&(r=this.positionPointIconUrl);var o=Number.MIN_VALUE;this._scene.globe.depthTestAgainstTerrain&&(o=Number.MAX_VALUE),(void 0===t.z||isNaN(t.z))&&(t.z=0);var a={show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z),scale:2,image:r,id:e.id,disableDepthTestDistance:o};(a=this._ctrlPoints.add(a)).index=0,a.type=i,a.SymbolType=_0x18bc2f.SYMBOL_UNKNOW,this.addCallback(a,n.ctrlPointCallBack)}};var _0x3ea87b=(_0x47e558=!0,function(e,t){var i=_0x47e558?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47e558=!1,i}),_0x5124bc=_0x3ea87b(void 0,(function(){return _0x5124bc.toString().search("(((.+)+)+)+$").toString().constructor(_0x5124bc).search("(((.+)+)+)+$")})),_0x47e558;function _0x4cf411(e,t){this._scene=e,this.handle=t,this.model=null,this.fixedFrameTransform=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("north","west"),this.initCallBack()}function _0x1fdc73(e,t,i){e[t]=i}function _0x2be103(e){e.destoryBoundsCtrl(),e.model?(e.createModelCtrl(),e.geoEdit._modelScale.x=e.model.scale):e.vector&&e.createVectorCtrl(e)}function _0x3b0fb1(e){e.scaleLeft1.show=!1,e.rotateCircle.show=!1,e.heightCtrl.show=!1,e.boxBounds.show=!1,e.moveFillCtrl.show=!1}function _0x37ac97(e,t,i,n){var r=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot.HeadingPitchRoll,a=Math.PI/180;return o.pitch=a*t.x,o.roll=a*t.y,o.heading=a*t.z,WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot.Ellipsoid.WGS84,n,i),i}function _0x7ba091(e,t,i,n){var r=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot.HeadingPitchRoll,a=Math.PI/180;return o.pitch=0,o.roll=0,o.heading=a*t.z+90*a,WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot.Ellipsoid.WGS84,n,i),i}function _0x25df49(e,t,i){if(WebGLPlot.defined(i)&&_0x451686(t)){var n=e._scene;if("heightCtrl"===t._instanceIds[0]){_0x3b0fb1(e);var r=_0x2d6822.pixelHeightToRealHeight(n,e.pixeStartPoint,i);e.geoEdit.localPoints[0].z=e.startPoint.z+r;var o=new _0x11ff81(e.geoEdit.localPoints[0].x,e.geoEdit.localPoints[0].y,e.geoEdit.localPoints[0].z);e.geoEdit.localPoints[0]=o,e.model&&_0x37ac97(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform),e.vector&&e.geoEdit.initSymbol(!0)}if("moveFillCtrl"===t._instanceIds[0]&&(_0x3b0fb1(e),e.geoEdit.localPoints[0].x=i.x,e.geoEdit.localPoints[0].y=i.y,e.model?_0x37ac97(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform):e.vector&&e.geoEdit.initSymbol(!0)),"rotateCircle"===t._instanceIds[0]){var a=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(n,e.rotateCircleCenter),s=i,l=_0x2d6822.radian(a,e.rotateStartPosition),u=_0x2d6822.radian(a,s)-l;e.model&&(e.geoEdit._modelRotate.z=e.startRotate+180*u/Math.PI,_0x37ac97(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform)),e.vector&&(e.geoEdit.vectorRotate.z=e.startRotate+180*u/Math.PI,e.geoEdit.initSymbol(!0))}if("ScaleLeft1_1"===t._instanceIds[0]){var c=e.geoEdit.localPoints[0],h=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(n,WebGLPlot.Cartesian3.fromDegrees(c.x,c.y,c.z)),d=_0x2d6822.distance(h,e.startSCalePtn),f=_0x2d6822.distance(h,i)/d;e.model&&(e.geoEdit._model.scale=e.startScale*f),e.vector&&(e.geoEdit._vectorScale=e.startScale*f,e.geoEdit.initSymbol(!0))}}}function _0x451686(e){return!!(e&&e._instanceIds&&e._instanceIds.length>0)}_0x5124bc(),_0x4cf411.prototype.initCallBack=function(){this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t,i,n){if("rotateCircle"===t._instanceIds[0]){if(!i)return;e.rotateStartPosition=n,e.startRotate=e.geoEdit._modelRotate.z}"ScaleLeft1_1"===t._instanceIds[0]&&(e.startSCalePtn=n,e.model?e.startScale=e.geoEdit._modelScale.x:e.vector&&(e.startScale=e.geoEdit.vectorScale))},onDrag:function(e,t,i){_0x25df49(e,t,i)},onDragEnd:function(e,t,i){_0x451686(t)&&"moveFillCtrl"===t._instanceIds[0]&&e.handle._featureDragEvent.raiseEvent(e.geoEdit),_0x2be103(e),e.geoEdit._initialize=!1,e.geoEdit.__setEffectParameter({point:e.geoEdit.localPoints[0],rotate:e.geoEdit.modelRotate}),e.handle._featureModifiedEvent.raiseEvent(e.geoEdit),_0x47a70a.getInstance().symbolModified.raiseEvent(e.geoEdit)}}}},_0x4cf411.prototype.addCallback=function(e,t){var i=this;t.dragHandlers&&(_0x1fdc73(e,"LEFT_DOWN",(function(n,r){function o(e,n){_0x2d6822.screenSpaceCameraController(i._scene,!1),void 0!==e.type&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(i,e,n)}if(r.setInputAction((function(t){if(_0x451686(e))if("heightCtrl"===e._instanceIds[0]||"ScaleLeft1_1"===e._instanceIds[0]||"rotateCircle"===e._instanceIds[0])o(e,t.endPosition);else{var n=_0x2d6822.getPosition(i._scene,t.endPosition);o(e,n)}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.setInputAction((function(n){var o;!_0x451686(e)||(o=_0x2d6822.getPosition(i._scene,n.position),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x2d6822.screenSpaceCameraController(i._scene,!0),void 0!==e.type&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(i,e,o))}),WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x451686(e)){if("rotateCircle"===e._instanceIds[0]||"ScaleLeft1_1"===e._instanceIds[0]){var a=_0x2d6822.getPosition(i._scene,n);t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(i,e,a,n)}if("heightCtrl"===e._instanceIds[0]){var s=i.geoEdit.localPoints[0].clone();i.startPoint=s,i.pixeStartPoint=n}}})),_0x1fdc73(e,"mouseMove",(function(t){if(i.editHeightMode||!_0x451686(e))return;i._scene._canvas.style.cursor="default";var n=null;if(n=e.getGeometryInstanceAttributes("heightCtrl"))return i._scene._canvas.style.cursor="n-resize",void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)));if(n=e.getGeometryInstanceAttributes("rotateCircle"))return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)));n=e.getGeometryInstanceAttributes("ScaleLeft1_1");let r=e.getGeometryInstanceAttributes("ScaleLeft1_2");return n&&r?(r.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)),void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)))):void 0})),_0x1fdc73(e,"mouseOut",(function(t){if(i.editHeightMode)return;i._scene._canvas.style.cursor="";var n=e.getGeometryInstanceAttributes("heightCtrl");if(n)return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,0,1,1)));if(n=e.getGeometryInstanceAttributes("rotateCircle"))return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,1,0,1)));n=e.getGeometryInstanceAttributes("ScaleLeft1_1");let r=e.getGeometryInstanceAttributes("ScaleLeft1_2");return n?(r.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,1,0,1)),void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,1,0,1)))):void 0})))},_0x4cf411.prototype.hideModeEditBouds=function(e){!WebGLPlot.defined(this.boxBounds)||null===this.boxBounds||(this.scaleLeft1.show=e,this.rotateCircle.show=e,this.heightCtrl.show=e,this.boxBounds.show=e,this.moveFillCtrl.show=e)},_0x4cf411.prototype.createModeEditBouds=function(e){e&&!WebGLPlot.defined(this.boxBounds)||e&&WebGLPlot.defined(this.boxBounds)?this.createModelCtrl():e||this.destoryBoundsCtrl()},_0x4cf411.prototype.createModelCtrl=function(){if(this.vector=null,this.handle._graphicObject){this.geoEdit=this.handle._graphicObject;var e=this.geoEdit.localPoints[0];this.model=this.geoEdit._model,this.modelMatrix=this.model.modelMatrix;var t=this.model._boundingSphere.center;this.centerMax=t.x>t.y?t.x:t.y,this.centerMax=(this.centerMax>t.z?this.centerMax:t.z)*this.model.scale,this.modelRadius=this.model._initialRadius*this.model.scale;var i=new WebGLPlot.Cartesian3(this.modelRadius+this.centerMax,this.modelRadius+this.centerMax,this.modelRadius+this.centerMax),n=new _0x11ff81(e.x,e.y,e.z),r=_0x2d6822.getModelMinAndMaxCorner(this.model),o=this.model.scale;if(0!==this.geoEdit._modelRotate.x||0!==this.geoEdit._modelRotate.y){var a=Math.abs(this.model._maxCorner.x-r.minCorner.x),s=Math.abs(this.model._maxCorner.y-r.minCorner.y),l=Math.abs(this.model._maxCorner.z-r.minCorner.z),u=a>s?a:s,c=a<s?a:s;o*=(u>l?u:l)/(c<l?c:l)}var h=Math.abs(r.minCorner.z)>Math.abs(r.minCorner.x)?r.minCorner.z:r.minCorner.x,d=Math.abs(r.maxCorner.z)>Math.abs(r.maxCorner.x)?r.maxCorner.z:r.maxCorner.x,f=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(h,h,r.minCorner.y),o,new WebGLPlot.Cartesian3),p=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(d,d,r.maxCorner.y),o,new WebGLPlot.Cartesian3),_=new WebGLPlot.AxisAlignedBoundingBox(f,p);this.BoundingBoxCenter=_.center,this.boxBounds=this.createBoxGeometry(n,i,_);var m=this.getLinePts(e,p,f,this.boxModelMatrix);if(this.moveFillCtrl=this.createFillCtrl(m.moveFillCtrl,new WebGLPlot.Color(1,1,0,.3),"moveFillCtrl"),this.scaleLeft1=this.createScaleLeft1(m.left1[0],m.left1[1]),this.rotateCircle=this.createRotateCircle(m.rotateCircle),this.heightCtrl=this.createHeightCtrl(m.heightCtrl),!this.handle._plottingLayer._isEditable)return void(this.boxBounds=this._scene._primitives.add(this.boxBounds));this.scaleLeft1=this._scene._primitives.add(this.scaleLeft1),this.rotateCircle=this._scene._primitives.add(this.rotateCircle),this.heightCtrl=this._scene._primitives.add(this.heightCtrl),this.moveFillCtrl=this._scene._primitives.add(this.moveFillCtrl),this.boxBounds=this._scene._primitives.add(this.boxBounds),this.addCallback(this.scaleLeft1,this.ctrlPointCallBack),this.addCallback(this.rotateCircle,this.ctrlPointCallBack),this.addCallback(this.heightCtrl,this.ctrlPointCallBack),this.addCallback(this.moveFillCtrl,this.ctrlPointCallBack)}},_0x4cf411.prototype.createBoxGeometry=function(e,t,i){if(null===e||null===t)return null;var n,r=[];return this.model?this.boxModelMatrix=_0x7ba091(e,this.geoEdit._modelRotate,this.modelMatrix.clone(),this.fixedFrameTransform):this.vector?this.boxModelMatrix=_0x7ba091(e,this.geoEdit.vectorRotate,this.modelMatrix.clone(),this.fixedFrameTransform):this.boxModelMatrix=_0x7ba091(e,new WebGLPlot.Cartesian3(0,0,0),new WebGLPlot.Matrix4,this.fixedFrameTransform),n=WebGLPlot.defined(i)?WebGLPlot.BoxOutlineGeometry.fromAxisAlignedBoundingBox(i):WebGLPlot.BoxOutlineGeometry.fromDimensions({dimensions:t}),r.push(new WebGLPlot.GeometryInstance({geometry:n,modelMatrix:this.boxModelMatrix,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(WebGLPlot.Color.YELLOW)}})),new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.PerInstanceColorAppearance({flat:!0,translucent:!1,renderState:{lineWidth:Math.min(3,this._scene.maximumAliasedLineWidth)}})})},_0x4cf411.prototype.createScaleLeft1=function(e,t){var i=[],n=new WebGLPlot.Color(0,1,0);return i.push(this.createLineGometryInstance(e,6,n,"ScaleLeft1_1")),i.push(this.createLineGometryInstance(t,6,n,"ScaleLeft1_2")),this.createPrimitive(i)},_0x4cf411.prototype.createRotateCircle=function(e){var t=[],i=new WebGLPlot.Color(1,1,0);return t.push(this.createLineGometryInstance(e,3,i,"rotateCircle")),this.createPrimitive(t)},_0x4cf411.prototype.createHeightCtrl=function(e){var t=[],i=new WebGLPlot.Color(0,0,1);return t.push(this.createLineGometryInstance(e,5,i,"heightCtrl")),this.createPrimitive(t)},_0x4cf411.prototype.createPrimitive=function(e){var t=WebGLPlot.Material.fromType("Color",{color:new WebGLPlot.Color(1,1,0,1),fill:!0}),i=new WebGLPlot.PolylineColorAppearance({translucent:!0,closed:!0,material:t}),n=new WebGLPlot.Primitive({geometryInstances:e,appearance:i,asynchronous:!1,compressVertices:!0,show:!0});return n.type="ModelEdit",n.SymbolType=1,n},_0x4cf411.prototype.createLineGometryInstance=function(e,t,i,n){var r=new WebGLPlot.PolylineGeometry({positions:e,width:t}),o=WebGLPlot.PolylineGeometry.createGeometry(r);return i=WebGLPlot.ColorGeometryInstanceAttribute.fromColor(i),new WebGLPlot.GeometryInstance({geometry:o,id:n,attributes:{color:i}})},_0x4cf411.prototype.getLinePts=function(e,t,i,n){var r=[],o=[],a=[],s=[],l=0,u=0,c=0,h=0;WebGLPlot.defined(t)&&WebGLPlot.defined(i)?(l=Math.abs(t.x-i.x)/2,u=Math.abs(t.y-i.y)/2,c=i.z<=0?t.z:t.z-i.z,h=l>u?u:l):(h=(this.centerMax+this.modelRadius)/2,c=1.5*this.centerMax+this.modelRadius/2),c=Math.abs(c),this.rotateCircleCenter=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,c+e.z);var d=this.computeHeightLines(l,u,h,c,n);a=a.concat(d);var f=this.computeScaleLines(l,u,h,c,n);r.push(f[0]),r.push(f[1]),r.push(f[2]),o.push(f[3]),o.push(f[4]),this.scaleLeft1Pnt=f[1],this.rotateCircle=this.computeRotateCircle(h,c,n);var p=this.computeMoveFill(h,c,n);return s.push(p[0]),s.push(p[1]),s.push(p[2]),s.push(p[3]),{left1:[r,o],rotateCircle:this.rotateCircle,heightCtrl:a,moveFillCtrl:s}},_0x4cf411.prototype.createFillCtrl=function(e,t,i){var n=WebGLPlot.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0}),r=WebGLPlot.PolygonGeometry.createGeometry(n),o=new WebGLPlot.GeometryInstance({geometry:r,id:i}),a=new WebGLPlot.Material.fromType("Color",{color:t,fill:!0}),s=new WebGLPlot.Primitive({geometryInstances:[o],appearance:new WebGLPlot.EllipsoidSurfaceAppearance({material:a,aboveGround:!0}),show:this._display,asynchronous:!1});return s.type="ModelEdit",s.SymbolType=1,s},_0x4cf411.prototype.getCartesian3ByLength=function(e,t,i,n){var r,o,a,s,l;(!WebGLPlot.defined(t)||!WebGLPlot.defined(i)||!WebGLPlot.defined(n))&&(t=0,i=0,n=0),r=Math.sqrt(e.x*e.x+e.y*e.y),o=Math.sqrt(r*r+e.z*e.z);var u=Math.acos((o*o+r*r-e.z*e.z)/(2*o*r));o+=n,l=Math.sin(u)*o;var c=Math.cos(u)*o;return a=c*e.x/r,s=c*e.y/r,new WebGLPlot.Cartesian3(a,s,l)},_0x4cf411.prototype.computeHeightLines=function(e,t,i,n,r){var o=[],a=new WebGLPlot.Cartesian3,s=new WebGLPlot.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot.Cartesian3.fromDegrees(this.geoEdit.localPoints[0].x,this.geoEdit.localPoints[0].y,this.geoEdit.localPoints[0].z),h=new WebGLPlot.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.model?h.heading=d*this.geoEdit._modelRotate.z:h.heading=d*this.geoEdit.vectorRotate.z;var f=WebGLPlot.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1*l,1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1*l,1,.7*u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),o},_0x4cf411.prototype.computeScaleLines=function(e,t,i,n,r){var o=[],a=new WebGLPlot.Cartesian3,s=new WebGLPlot.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot.Cartesian3.fromDegrees(this.geoEdit.localPoints[0].x,this.geoEdit.localPoints[0].y,this.geoEdit.localPoints[0].z),h=new WebGLPlot.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.model?h.heading=d*this.geoEdit._modelRotate.z:h.heading=d*this.geoEdit.vectorRotate.z;var f=WebGLPlot.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-.8,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.8*l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,.8*u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),o},_0x4cf411.prototype.computeMoveFill=function(e,t,i){var n=[],r=new WebGLPlot.Cartesian3,o=new WebGLPlot.Cartesian3,a=t/e;return o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.3,.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-.3,.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-.3,-.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.3,-.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),n},_0x4cf411.prototype.computeRotateCircle=function(e,t,i){for(var n=[],r=new WebGLPlot.Cartesian3,o=new WebGLPlot.Cartesian3,a=t/e,s=_0x2d6822.calcCirclePts(1,new WebGLPlot.Cartesian3(0,0,0),72),l=0;l<s.length;l++)o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.8*s[l].x,.8*s[l].y,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z));return n},_0x4cf411.prototype.createVectorEditBouds=function(e){e&&!WebGLPlot.defined(this.boxBounds)?this.createVectorCtrl(this):e&&WebGLPlot.defined(this.boxBounds)?(_0x3b0fb1(this),this.createVectorCtrl(this)):e||this.destoryBoundsCtrl()},_0x4cf411.prototype.destoryBoundsCtrl=function(){this.scaleLeft1&&(this.scaleLeft1.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.scaleLeft1),this.scaleLeft1=void 0),this.rotateCircle&&(this.rotateCircle.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.rotateCircle),this.rotateCircle=void 0),this.heightCtrl&&(this.heightCtrl.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.heightCtrl),this.heightCtrl=void 0),this.moveFillCtrl&&(this.moveFillCtrl.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.moveFillCtrl),this.moveFillCtrl=void 0),this.boxBounds&&(this.boxBounds.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.boxBounds),this.boxBounds=void 0)},_0x4cf411.prototype.createVectorCtrl=function(e){if(this.handle._graphicObject){this.model=null,this.geoEdit=this.handle._graphicObject;var t=this.geoEdit.localPoints[0];this.vector=this.geoEdit._dotVector,this.modelMatrix=this.vector.modelMatrix,this.centerMax=this.vector.vectorHeight/2,this.modelRadius=this.vector.vectorHeight/2;var i=new WebGLPlot.Cartesian3(e.modelRadius+this.centerMax,e.modelRadius+this.centerMax,e.modelRadius+this.centerMax),n=new _0x11ff81(t.x,t.y,this.centerMax+t.z);e.boxBounds=e.createBoxGeometry(n,i);var r=_0x7ba091(t,this.geoEdit.vectorRotate,this.vector.modelMatrix.clone(),this.fixedFrameTransform),o=e.getLinePts(t,void 0,void 0,r);if(e.moveFillCtrl=e.createFillCtrl(o.moveFillCtrl,new WebGLPlot.Color(1,1,0,.3),"moveFillCtrl"),e.scaleLeft1=e.createScaleLeft1(o.left1[0],o.left1[1]),e.rotateCircle=e.createRotateCircle(o.rotateCircle),e.heightCtrl=e.createHeightCtrl(o.heightCtrl),!this.handle._plottingLayer._isEditable)return void(e.boxBounds=e._scene._primitives.add(e.boxBounds));e.scaleLeft1=e._scene._primitives.add(e.scaleLeft1),e.rotateCircle=e._scene._primitives.add(e.rotateCircle),e.heightCtrl=e._scene._primitives.add(e.heightCtrl),e.moveFillCtrl=e._scene._primitives.add(e.moveFillCtrl),e.boxBounds=e._scene._primitives.add(e.boxBounds),e.addCallback(e.scaleLeft1,e.ctrlPointCallBack),e.addCallback(e.rotateCircle,e.ctrlPointCallBack),e.addCallback(e.heightCtrl,e.ctrlPointCallBack),e.addCallback(e.moveFillCtrl,e.ctrlPointCallBack)}};var _0xdd3d1b=(_0x4cf797=!0,function(e,t){var i=_0x4cf797?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4cf797=!1,i}),_0x1de628=_0xdd3d1b(void 0,(function(){return _0x1de628.toString().search("(((.+)+)+)+$").toString().constructor(_0x1de628).search("(((.+)+)+)+$")})),_0x4cf797;function _0x5bdde1(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("plottingLayer is required!");this._scene=e,this._plottingLayer=t,this._active=!1,t._plottingEdit=this,this.CtrlPosition=new _0x1f7045(e,this),this.ModelEditControl=new _0x4cf411(e,this),this.pasteGeoJson=null,this.initialize()}function _0x536a93(e,t,i,n){if(i&&i._plottingLayer&&i._plottingLayer._scene&&i._plottingLayer._isSelected&&t){if("LEFT_DOWN"!==e||WebGLPlot.defined(i._graphicObject)){var r=[],o=[];o=void 0===n?i._scene.drillPick(t,void 0,10,10):i._scene.drillPick(t,void 0,n.width,n.height);for(var a=[],s=0;s<o.length;s++)if(o[s]&&o[s].id&&null!==o[s].primitive&&WebGLPlot.defined(o[s].primitive.SymbolType)){var l=i._plottingLayer.getFeatureByUuid(o[s].id);l&&a.push(l),r.push(o[s])}if(void 0!==n)return a;for(var u=!1,c=0;c<r.length;c++)if("heightCtrl"===r[c].id){u=!0;break}for(s=0;s<r.length;s++){var h,d=r[s];if(d&&d.primitive&&d.primitive[e]){if(0===d.primitive.type&&i.CtrlPosition.isShiftPress&&(void 0!==d.primitive.index?i._graphicObject instanceof _0x3a6b26?(h=i._graphicObject._centerPt3D,WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h):(h=i._graphicObject.localPoints[d.primitive.index],WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h):void 0!==d.primitive.annotationIndex&&(h=i._graphicObject.annotationArray[d.primitive.annotationIndex].localPoint,WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h)),!u){d.primitive[e](t,i._CtrlPointhandler);break}if("heightCtrl"===d.id){d.primitive[e](t,i._CtrlPointhandler);break}}else if(d&&d.primitive&&d.id&&"LEFT_CLICK"===e){var f=i._plottingLayer.getFeatureByUuid(d.id);if(f instanceof _0x3a6b26)return i.releaseSelection(),i.drawGroupObjectEditObject(f,!0),i._graphicObject=f,i._graphicObject._isSelected=!0,i._graphicObject._isEdit=!0,i._plottingLayer.setSelectedFeatureByID(f._id),void i._featureSelectedEvent.raiseEvent(i._graphicObject);if(WebGLPlot.defined(i._graphicObject)){if(i._graphicObject.id===d.id)return;if(i.unSelection(!0),i._graphicObject=i._plottingLayer.getFeatureByUuid(d.id),!WebGLPlot.defined(i._graphicObject))return;return void i.DoSelectObjectEdit(f)}if(!f)continue;return i._graphicObject=f,void i.DoSelectObjectEdit(f)}}if("LEFT_CLICK"===e&&(!WebGLPlot.defined(r)||0===r.length)&&WebGLPlot.defined(i._graphicObject)){const e=i._graphicObject.id;i.unSelection(!0);var p=i._featureReleaseEvent;let t=i._plottingLayer.getFeatureByUuid(e);p.raiseEvent(t)}}}else i.releaseSelection()}function _0x26ca55(e){const t=_0x80fbbd(e.keyCode);let i=_self._graphicObject;if(i&&(i.showMode===_0x4e5d29.Marker||i.code===_0x18bc2f.SYMBOL_Model))switch(t){case"Z":i.modelScale*=1.1;break;case"X":i.modelScale*=.9;break;case"W":i.modelRotate.y+=1,i._initialize=!1;break;case"S":i.modelRotate.y-=1,i._initialize=!1;break;case"A":i.modelRotate.z-=1,i._initialize=!1;break;case"D":i.modelRotate.z+=1,i._initialize=!1;break;case"Q":i.modelRotate.x+=1,i._initialize=!1;break;case"E":i.modelRotate.x-=1,i._initialize=!1}}function _0x80fbbd(e){switch(e){case"Z".charCodeAt(0):return"Z";case"X".charCodeAt(0):return"X";case"W".charCodeAt(0):case 38:return"W";case"S".charCodeAt(0):case 40:return"S";case"D".charCodeAt(0):case 39:return"D";case"A".charCodeAt(0):case 37:return"A";case"Q".charCodeAt(0):return"Q";case"E".charCodeAt(0):return"E";default:return}}_0x1de628(),_0x5bdde1.prototype.initialize=function(){this._graphicObject=void 0,this._handler=new WebGLPlot.ScreenSpaceEventHandler(this._scene.canvas),this._ctrlPoints=new WebGLPlot.BillboardCollection,this._scene.primitives.add(this._ctrlPoints),this.positionPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointWhite_Go.png"),this.scalePointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointYellow_Go.png"),this.anchorPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointRed_Go.png"),this._featureSelectedEvent=new WebGLPlot.Event,this._featureModifiedEvent=new WebGLPlot.Event,this._featureReleaseEvent=new WebGLPlot.Event,this._featureRemoveEvent=new WebGLPlot.Event,this.isShiftPress=!1,this.shiftKeyDownFun=void 0,this.shiftKeyUpFun=void 0,this.editHeightMode=!1,this._CtrlPointhandler=new WebGLPlot.ScreenSpaceEventHandler(this._scene.canvas),this._featureLeftClickEvent=new WebGLPlot.Event,this._featureRightClickEvent=new WebGLPlot.Event,this._sceneLeftClickEvent=new WebGLPlot.Event,this._sceneRightClickEvent=new WebGLPlot.Event,this._featureDragEvent=new WebGLPlot.Event,this._featureDoubleClickEvent=new WebGLPlot.Event,this.CtrlPosition.addListener();let e=this;this._handler.setInputAction((function(t){!e._active||_0x536a93("LEFT_CLICK",t.position,e)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK);var t=null;this._handler.setInputAction((function(i){if(WebGLPlot.defined(e._graphicObject)&&(e._graphicObject.showMode===_0x4e5d29.Vector||e._graphicObject.showMode===_0x4e5d29.Marker)&&e._active){var n=e._scene.pick(i.endPosition);t&&(!n||t!==n.primitive)&&(!(t.isDestroyed&&t.isDestroyed())&&t.mouseOut(i.endPosition),t=null),n&&n.primitive&&((n=n.primitive).mouseOut&&(t=n),n.mouseMove&&n.mouseMove(i.endPosition))}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this._handler.setInputAction((function(t){!e._active||_0x536a93("LEFT_DOWN",t.position,e,void 0)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),this._handler28s=new WebGLPlot.ScreenSpaceEventHandler(e._scene.canvas),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),i?e._featureLeftClickEvent.raiseEvent(i,t.position):e._sceneLeftClickEvent.raiseEvent(t.position)}}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),i?e._featureRightClickEvent.raiseEvent(i,t.position):e._sceneRightClickEvent.raiseEvent(t.position)}}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),e._featureDoubleClickEvent.raiseEvent(i,t.position)}}),WebGLPlot.ScreenSpaceEventType.LEFT_DOUBLE_CLICK)},_0x5bdde1.prototype.setPlottingLayer=function(e){return!!e&&(this.releaseSelection(),this._plottingLayer=e,e._plottingEdit=this,!0)},Object.defineProperties(_0x5bdde1.prototype,{plottingLayer:{get:function(){return this._plottingLayer},set:function(e){e!==this._plottingLayer&&(this._plottingLayer=e)}},SelectedEvent:{get:function(){return this._featureSelectedEvent}},FeatureSelectedEvent:{get:function(){return this._featureSelectedEvent}},ModifiedEvent:{get:function(){return this._featureModifiedEvent}},FeatureModifiedEvent:{get:function(){return this._featureModifiedEvent}},UnSelectedEvent:{get:function(){return this._featureReleaseEvent}},RemoveFeatureEvent:{get:function(){return this._featureRemoveEvent}},FeatureRemoveEvent:{get:function(){return this._featureRemoveEvent}},FeatureLeftClickEvent:{get:function(){return this._featureLeftClickEvent}},FeatureRightClickEvent:{get:function(){return this._featureRightClickEvent}},SceneLeftClickEvent:{get:function(){return this._sceneLeftClickEvent}},SceneRightClickEvent:{get:function(){return this._sceneRightClickEvent}},FeatureDoubleClickEvent:{get:function(){return this._featureDoubleClickEvent}},FeatureDragEvent:{get:function(){return this._featureDragEvent}}}),_0x5bdde1.prototype.unSelection=function(e){WebGLPlot.defined(this._graphicObject)&&e&&_0x47a70a.getInstance().symbolUnSelected.raiseEvent(this._graphicObject.id),this.releaseSelection(!1)},_0x5bdde1.prototype.releaseSelection=function(e){WebGLPlot.defined(this._graphicObject)&&(this.clearAllEditCtrl(),e||(this._plottingLayer._selectedFeature=void 0))},_0x5bdde1.prototype.clearAllEditCtrl=function(){WebGLPlot.defined(this._graphicObject)&&null!==this._graphicObject&&(this.CtrlPosition.removeAll(),this._graphicObject._initialize=!1,this._graphicObject._isSelected=!1,this._graphicObject instanceof _0x3a6b26&&this.drawGroupObjectEditObject(this._graphicObject,!1),_0x4e5d29.Marker===this._graphicObject.showMode&&this.drawModelEditObject(!1),_0x4e5d29.Vector===this._graphicObject.showMode&&this.drawVectorEditObject(!1),this._graphicObject=null)},_0x5bdde1.prototype.activate=function(){!this._plottingLayer||!this._plottingLayer._isSelected||this.isActive()||(this._active=!0)},_0x5bdde1.prototype.pickRect=function(e,t){var i=t.x-e.x,n=t.y-e.y,r=(t.x+e.x)/2,o=(t.y+e.y)/2;return _0x536a93("LEFT_CLICK",new WebGLPlot.Cartesian2(r,o),this,{width:i,height:n})},_0x5bdde1.prototype.DoSelectObject=function(e,t=!0){this._graphicObject=e,this._graphicObject._isEdit=!0,this._graphicObject._isSelected=!0,this._plottingLayer._selectedFeature=e,this._graphicObject._initialize=!1,t&&(this._featureSelectedEvent.raiseEvent(this._graphicObject),_0x47a70a.getInstance().symbolSelected.raiseEvent(this._graphicObject))},_0x5bdde1.prototype.DoSelectObjectEdit=function(e){!e||!(e instanceof _0x21fac2)||!this._plottingLayer.isSelected||(this.releaseSelection(),this.DoSelectObject(e),this._plottingLayer._isEditable&&this.drawSymbolExtend(e))},_0x5bdde1.prototype.drawSymbolExtend=function(e){var t=e.symbolType;e.showMode,_0x18bc2f.SYMBOL_UNKNOW!==t&&(_0x18bc2f.SYMBOL_Model!==t||_0x18bc2f.SYMBOL_DOT!==t||_0x18bc2f.SYMBOL_PICTURE!==t)&&this.createCtrlPoints(e)},_0x5bdde1.prototype.addAnnotationArrayPositionPt=function(e,t){this.CtrlPosition.createAnnotationCtrlPoint(e,t)},_0x5bdde1.prototype.deactivate=function(){this.releaseSelection(),this._active=!1},_0x5bdde1.prototype.isActive=function(){return this._active},_0x5bdde1.prototype.createCtrlPoints=function(e){this.CtrlPosition.createCtrlPoints(e),this.ModelEditControl.hideModeEditBouds(!1)},_0x5bdde1.prototype.drawModelEditObject=function(e){this.CtrlPosition.removeAll(),this._graphicObject&&_0x4e5d29.Marker===this._graphicObject.showMode&&(this.ModelEditControl.destoryBoundsCtrl(),this.ModelEditControl.createModeEditBouds(e))},_0x5bdde1.prototype.drawVectorEditObject=function(e){this.CtrlPosition.removeAll(),this.ModelEditControl.destoryBoundsCtrl(),this.ModelEditControl.createVectorEditBouds(e)},_0x5bdde1.prototype.drawGroupObjectEditObject=function(e,t){if(e instanceof _0x3a6b26)if(t&&!this.groupObjectEditObject){var i=e.getBounds(),n=.5*(i.max_X+i.min_X),r=.5*(i.max_Y+i.min_Y);i.max_Z,i.min_Z;var o=new WebGLPlot.Cartesian3(i.min_X,i.max_Y,0),a=new WebGLPlot.Cartesian3(i.max_X,i.max_Y,0),s=new WebGLPlot.Cartesian3(i.min_X,i.min_Y,0),l=_0x2d6822.getSpaceDistance(o,a)+i.modelRadius,u=_0x2d6822.getSpaceDistance(o,s)+i.modelRadius,c=i.max_Z-i.min_Z;c=c>i.modelRadius?c:i.modelRadius,e._centerPt3D=new WebGLPlot.Cartesian3(n,r,i.min_Z);var h=new WebGLPlot.Cartesian3(l,u,c);h.z<0&&(h.z=0);var d=this.ModelEditControl.createBoxGeometry(new WebGLPlot.Cartesian3(n,r,i.min_Z+.5*c),h);this.groupObjectEditObject=this._scene.primitives.add(d),this.CtrlPosition._ctrlPoints.removeAll(),this.CtrlPosition.createGroupObjectCtrlPoint(e,e._centerPt3D,0)}else t||(this.CtrlPosition._ctrlPoints.removeAll(),this._scene.primitives.remove(this.groupObjectEditObject),this.groupObjectEditObject=null)},_0x5bdde1.prototype.removeGroupObjectEditObject=function(){this.groupObjectEditObject&&(this._scene.primitives.remove(this.groupObjectEditObject),this.groupObjectEditObject=null)},_0x5bdde1.prototype.cut=function(){null!==this._graphicObject&&this._plottingLayer&&this._plottingLayer._isEditable&&(this.pasteGeoJson=_0x21fac2.toGeoJson(this._graphicObject,this.pasteGeoJson),this._plottingLayer.removeGeoGraphicObject(this._graphicObject))},_0x5bdde1.prototype.copy=function(){null!==this._graphicObject&&(this.pasteGeoJson=_0x21fac2.toGeoJson(this._graphicObject,this.pasteGeoJson))},_0x5bdde1.prototype.paste=function(e){if(null!==this.pasteGeoJson&&this._plottingLayer&&this._plottingLayer._isEditable){var t=JSON.parse(this.pasteGeoJson);if(t.uuid=WebGLPlot.createGuid(),WebGLPlot.defined(e))if(parseInt(t.symbolType)===_0x18bc2f.SYMBOL_DOT||parseInt(t.symbolType)===_0x18bc2f.SYMBOL_TEXT)t.localePoints[0].x=e.x,t.localePoints[0].y=e.y,t.localePoints[0].z=e.z;else for(var i=e.x-t._CenterPosition.x,n=e.y-t._CenterPosition.y,r=0;r<t.localePoints.length;++r)t.localePoints[r].x=t.localePoints[r].x+i,t.localePoints[r].y=t.localePoints[r].y+n,t.localePoints[r].z=e.z;this._plottingLayer.geoJsonToGeoGraphicObject(t)}},_0x5bdde1.prototype.clearCopyOrCut=function(){this.pasteGeoJson=null},_0x5bdde1.prototype.activateModelShortCutEdit=function(){this.ModelScaleShortCuts_Active||document.addEventListener("keydown",_0x26ca55,!1),this.ModelScaleShortCuts_Active=!0},_0x5bdde1.prototype.deActivateModelShortCutEdit=function(){document.removeEventListener("keydown",_0x26ca55),this.ModelScaleShortCuts_Active=!1};var _0x5e6d04=(_0x16e202=!0,function(e,t){var i=_0x16e202?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16e202=!1,i}),_0x196788=_0x5e6d04(void 0,(function(){return _0x196788.toString().search("(((.+)+)+)+$").toString().constructor(_0x196788).search("(((.+)+)+)+$")})),_0x16e202;function _0x1ae927(e,t){if(!WebGLPlot.defined(t)||!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("plottingLayer || scene is required!");this._handler=new WebGLPlot.ScreenSpaceEventHandler(e.canvas),this._scene=e,this._isDrawing=!1,this._geoGraphicObject=void 0,this._layer=t,this._active=!1,this._drawFinishEvent=new WebGLPlot.Event,this._drawControlEndEvent=new WebGLPlot.Event,this._libID=-1,this._code=-1,this._Url="",this._serverUrl="";var i=this;this._handler.setInputAction((function(e){_0x4e52db(e,i)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this._handler.setInputAction((function(e){_0x384f03(e,i)}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this._handler.setInputAction((function(e){_0x636034(e,i)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),this._handler.setInputAction((function(e){_0x3cc51c(e,i)}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}function _0x4e52db(e,t){var i=t;if(i._active&&i._layer&&i&&i._active){var n=i._scene,r=_0x2d6822.getPosition(n,e.position);if(r)if(i._isDrawing){if(null===i._geoGraphicObject||void 0===i._geoGraphicObject)return void(i._isDrawing=!1);i._geoGraphicObject.localPoints.length>=i._geoGraphicObject.getMaxEditPts()?_0x3ca335(t):(r.z+=1,i._geoGraphicObject.localPoints.push(r),i._geoGraphicObject._initialize=!1)}else{i._isDrawing=!0;var o=null;if(0===i._libID){switch(i._code){case _0x18bc2f.SYMBOL_Model:case _0x18bc2f.SYMBOL_PICTURE:case _0x18bc2f.SYMBOL_POINT:o=new _0x25259d({layer:i._layer,libID:i._libID,code:i._code,localPoints:[]}),i._code===_0x18bc2f.SYMBOL_Model?(o._modelPath=i._Url,o._showMode=_0x4e5d29.Marker):i._code===_0x18bc2f.SYMBOL_PICTURE&&(o._picturePath=i._Url,o._showMode=_0x4e5d29.Picture);break;default:o=new _0x4381c6({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],isDrawing:!0,isEdit:!1})}o._symbolType=i._code}else void 0!==i._serverData&&null!==i._serverData&&i._serverData.symbolType===_0x18bc2f.SYMBOL_DOT?o=new _0x25259d({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],serverData:i._serverData}):i._serverData.symbolType===_0x18bc2f.SYMBOL_ALGO&&(o=new _0x4381c6({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],serverData:i._serverData,isDrawing:!0}));if(null===o||o._symbolType===_0x18bc2f.SYMBOL_UNKNOW)return void(i._isDrawing=!1);_0x2d6822.isSymbolDot(o._symbolType)?(i._geoGraphicObject=o,i._geoGraphicObject.localPoints.push(r),i._layer.isEditable&&i._layer._geoGraphicObjects.push(o),_0x3ca335(t)):(i._geoGraphicObject=o,i._geoGraphicObject.localPoints.push(r),i._layer.isEditable&&i._layer._geoGraphicObjects.push(o),0===i._libID&&34===i._code&&_0x3ca335(t))}}}function _0x384f03(e,t){var i=t;if(i._active&&i&&i._active&&i._isDrawing&&i._geoGraphicObject){var n=i._scene,r=_0x2d6822.getPosition(n,e.endPosition);if(r)i._geoGraphicObject.localPoints.length>=2&&i._geoGraphicObject.localPoints.pop(),i._geoGraphicObject.localPoints.push(r),i._geoGraphicObject._initialize=!1}}function _0x636034(e,t){var i=t;if(i._active){if(i._geoGraphicObject._symbolType!==_0x18bc2f.SYMBOL_DOT){var n=i._geoGraphicObject.localPoints.length;i._geoGraphicObject.localPoints.splice(n-2,2)}_0x3ca335(t)}}function _0x3cc51c(e,t){var i=t;i._active?(_0x3ca335(t),i._drawControlEndEvent.raiseEvent(t._geoGraphicObject),i._serverData=null,t._isDrawing||t.deactivate()):i._scene._canvas.style.cursor=""}function _0x3ca335(e){var t=e;if(t._isDrawing&&WebGLPlot.defined(t._geoGraphicObject)){var i=t._geoGraphicObject;if(_0x2d6822.clearSamePtsXY(i.localPoints).length<i.getMinEditPts())return t._layer.removeGeoGraphicObject(i),t._isDrawing=!1,void(t._geoGraphicObject=void 0);t._geoGraphicObject.isDrawing=!1,t._geoGraphicObject._initialize=!1,t._isDrawing=!1,t._drawFinishEvent.raiseEvent(e._geoGraphicObject),t._layer.symbolAddedEvent.raiseEvent(e._geoGraphicObject),_0x47a70a.getInstance().symbolAdded.raiseEvent(e._geoGraphicObject,t._layer.name)}}function _0x72eaeb(e){e.setDrawPrototype()}_0x196788(),_0x1ae927.prototype.activate=function(e,t,i){if(this._layer&&this._layer._scene&&this._layer.isEditable)if(WebGLPlot.defined(e)&&WebGLPlot.defined(t)){if("number"!=typeof e||"number"!=typeof t)return void console.log("PlotDrawControl activate libID or code should be number");(!WebGLPlot.defined(i)||null==i)&&(i=""),this._libID=e,this._code=t,this._Url=i,0===e?this.setDrawPrototype():this.getServerData(this._libID,this._code,_0x72eaeb(this))}else(null===this._serverData||!WebGLPlot.defined(this._serverData))&&0!==this._libID&&!WebGLPlot.getLibManager(this._scene._plottingID).useServerData&&this.getServerDataFromLocal(symbolLibManager,this._libID,this._code),this.setDrawPrototype()},_0x1ae927.prototype.setDrawPrototype=function(){-1===this._libID&&-1===this._code||(this._active=!0,this._scene._canvas.style.cursor="crosshair",_0x2d6822.screenSpaceCameraController(this._scene,!1))},_0x1ae927.prototype.setAction=function(e,t,i){if(!this._active&&((!WebGLPlot.defined(i)||null==i)&&(i=""),WebGLPlot.defined(e)&&WebGLPlot.defined(t)&&null!==e&&null!==t&&this._layer&&this._layer._scene)){if("number"!=typeof e||"number"!=typeof t)return void console.log("PlotDrawControl setAction libId or code should be number");this._libID=e,this._code=t,this._Url=i,0!==e&&this.getServerData(this._libID,this._code)}},_0x1ae927.prototype.getServerData=function(e,t,i){var n=this,r=WebGLPlot.getLibManager(this._layer._scene._plottingID),o=r.getSymbolData(e,t);if(WebGLPlot.defined(o)&&null!==o)return n._serverData=o,void(i&&i());var a=WebGLPlot.getServerData(e,t,void 0,this._layer._scene._plottingID);!a||(a.getSymbolInfo.events.on({processCompleted:function(t){return n._serverData=t.result,r.setSymbolData(e,t.result),i&&i(),!0},processFailed:function(){},scope:n}),a.getSymbolInfo.processAsync(a.getSymbolInfoParameters))},_0x1ae927.prototype.getServerDataFromLocal=function(e,t,i){var n=e.localSymbolLibData;this._serverData=n[t][i]},Object.defineProperties(_0x1ae927.prototype,{libID:{get:function(){return this._libID}},code:{get:function(){return this._code}},serverUrl:{get:function(){return this._serverUrl},set:function(e){e!==this._serverUrl&&(this._serverUrl=e)}},drawFinishEvent:{get:function(){return this._drawFinishEvent}},drawControlEndEvent:{get:function(){return this._drawControlEndEvent}},plottingLayer:{get:function(){return this._layer},set:function(e){e!==this._layer&&(this._layer=e)}}}),_0x1ae927.prototype.setPlottingLayer=function(e){return!!e&&(this._layer=e,!0)},_0x1ae927.prototype.deactivate=function(){this._active=!1,this._isDrawing=!1,this._libID=-1,this._code=-1,delete this._geoGraphicObject,this._scene._canvas.style.cursor="",_0x2d6822.screenSpaceCameraController(this._layer._scene,!0)};const _0x579dd8=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x56f9a1=_0x579dd8(void 0,(function(){return _0x56f9a1.toString().search("(((.+)+)+)+$").toString().constructor(_0x56f9a1).search("(((.+)+)+)+$")}));_0x56f9a1();class _0x1e39c8{constructor(e,t){this._isGroup=t,this._UUID=WebGLPlot$f.createGuid(),this._name=e,this._parentNode=void 0,this._childNodes=[],this._isModified=!1}_getRootNode(){let e=this;for(;!e.isRootNode();)e=e._parentNode;return e}_removeGeoEntityNode(e){let t=this.findNode(e);if(!t.isGroupNode()){let i=t._parentNode,n=i.indexOf(e);i._childNodes.splice(n,1),this._isModified=!0,this._save()}}_getParentNode(){return this._parentNode}_clear(){this._childNodes.splice(0),this._isModified=!0,this._save()}_isModify(){return!!this._isModified||(this._childNodes.forEach((e=>{if(e._isModify())return!0})),!1)}_setIsModify(e){this._isModified=e,this._childNodes.forEach((t=>{t._setIsModify(e)}))}_save(){_0x41dd10.getInstance()._saveGeoEntity(!1)}_fromJson(e,t){if(!WebGLPlot$f.defined(t))return;let i=JSON.parse(e);!WebGLPlot$f.defined(i)||(WebGLPlot$f.defined(i.isGroup)&&(this._isGroup=i.isGroup),WebGLPlot$f.defined(i.UUID)&&(this._UUID=i.UUID),WebGLPlot$f.defined(i.name)&&(this._name=i.name),WebGLPlot$f.defined(i.parentUUID)&&(this._parentNode=t.findNode(i.parentUUID)),WebGLPlot$f.defined(i.childNodes)&&(this._childNodes=[],i.childNodes.forEach((e=>{let i=new _0x1e39c8("",!1);this._childNodes.push(i),i._fromJson(e,t)}))))}_toJson(){let e={};return e.hasOwnProperty("isGroup")||(e.isGroup=this._isGroup),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),WebGLPlot$f.defined(this._parentNode)&&(e.hasOwnProperty("parentUUID")||(e.parentUUID=this._parentNode.getUUID())),e.hasOwnProperty("childNodes")||(e.childNodes=[],this._childNodes.forEach((t=>{e.childNodes.push(t._toJson())}))),JSON.stringify(e)}isRootNode(){return void 0===this._parentNode}isGroupNode(){return this._isGroup}getUUID(){return this._UUID}getName(){return this._name}setName(e){this._name=e,this._isModified=!0,this._save()}createGroupNode(e){let t;return this._isGroup&&(t=new _0x1e39c8(e,!0),t._parentNode=this,this._childNodes.push(t),this._isModified=!0,this._save()),t}createGeoEntityNode(e){let t;return this._isGroup&&(t=new _0x1e39c8(e.getName(),!1),t._UUID=e.getUUID(),t._parentNode=this,this._childNodes.push(t),this._isModified=!0,this._save()),t}getChildNodes(){return this._childNodes}findNode(e){let t;if(this._UUID===e)return this;for(let i=0;i<this._childNodes.length;i++){const n=this._childNodes[i];if(n.getUUID()===e){t=n;break}if(n._isGroup&&(t=n.findNode(e),WebGLPlot$f.defined(t)))break}return t}indexOf(e){let t=-1;for(let i=0;i<this._childNodes.length;i++)if(this._childNodes[i].getUUID()===e){t=i;break}return t}moveNodeTo(e,t,i){if(!this.isGroupNode()||!t.isGroupNode()||e>=this._childNodes.length)return!1;let n=this._childNodes.splice(e,1);if(0===n.length)return!1;let r=n[0];return r._parentNode=t,-1===i||i>=t.getChildNodes().length?t._childNodes.push(r):t._childNodes.splice(i,0,r),this._isModified=!0,this._save(),!0}moveTo(e,t){if(!e.isGroupNode())return!1;let i=this._getParentNode();if(WebGLPlot$f.defined(i)){let n=i.indexOf(this.UUID);if(i.moveNodeTo(n,e,t))return this._isModified=!0,this._save(),!0}return!1}}const _0x6ad8d3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x31c2dc=_0x6ad8d3(void 0,(function(){return _0x31c2dc.toString().search("(((.+)+)+)+$").toString().constructor(_0x31c2dc).search("(((.+)+)+)+$")}));_0x31c2dc();class _0x2887b9{constructor(){this._mapModelPathToModelSize=void 0}static cartesian3ToDegrees(e){let t=WebGLPlot$f.Cartographic.fromCartesian(e);return new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(t.longitude),WebGLPlot$f.CesiumMath.toDegrees(t.latitude),t.height)}static degreesToCartesian3(e){return WebGLPlot$f.Cartesian3.fromDegrees(e.x,e.y,e.z)}static getPositionFromModelMatrix(e){let t=WebGLPlot$f.Matrix4.getTranslation(e,new WebGLPlot$f.Cartesian3);return this.cartesian3ToDegrees(t)}static getScaleFromModelMatrix(e){let t=WebGLPlot$f.Matrix4.getScale(e,new WebGLPlot$f.Cartesian3);return this.cartesian3ToDegrees(t)}static getRotationFromModelMatrix(e){let t=WebGLPlot$f.Matrix4.getRotation(e,new WebGLPlot$f.Matrix4),i=WebGLPlot$f.Matrix4.getMatrix3(t,new WebGLPlot$f.Matrix3),n=WebGLPlot$f.Quaternion.fromRotationMatrix(i),r=WebGLPlot$f.HeadingPitchRoll.fromQuaternion(n);return new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(r.pitch),WebGLPlot$f.CesiumMath.toDegrees(r.roll),WebGLPlot$f.CesiumMath.toDegrees(r.heading))}static getHeading(e,t){let i=WebGLPlot$f.Transforms.eastNorthUpToFixedFrame(e),n=Cesium.Cartesian3.subtract(t,e,new Cesium.Cartesian3),r=WebGLPlot$f.Matrix4.multiplyByPointAsVector(WebGLPlot$f.Matrix4.inverse(i,new WebGLPlot$f.Matrix4),n,new WebGLPlot$f.Cartesian3),o=WebGLPlot$f.Cartesian3.normalize(r,new WebGLPlot$f.Cartesian3),a=Math.atan2(o.y,o.x)-WebGLPlot$f.CesiumMath.PI_OVER_TWO;return WebGLPlot$f.CesiumMath.TWO_PI-WebGLPlot$f.CesiumMath.zeroToTwoPi(a)}static getPitch(e,t){let i=WebGLPlot$f.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$f.Cartesian3.subtract(t,e,new WebGLPlot$f.Cartesian3),r=WebGLPlot$f.Matrix4.multiplyByPointAsVector(WebGLPlot$f.Matrix4.inverse(i,i),n,n);return WebGLPlot$f.Cartesian3.normalize(r,r),WebGLPlot$f.CesiumMath.PI_OVER_TWO-WebGLPlot$f.CesiumMath.acosClamped(r.z)}static getModelSize(e){WebGLPlot$f.defined(this._mapModelPathToModelSize)||(this._mapModelPathToModelSize=new Map);let t=(e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT)).modelPath,i=e.scene,n=this._mapModelPathToModelSize.get(t);if(WebGLPlot$f.defined(n))return n;if(!WebGLPlot$f.defined(i))return;const r=t.split(".");let o=r[r.length-1];if("gltf"===o||"glb"===o){let e=i.primitives.add(WebGLPlot$f.Model.fromGltf({url:t})),n=this;e.readyPromise.then((function(e){if(WebGLPlot$f.defined(e._maxCorner)&&WebGLPlot$f.defined(e._minCorner)){var r=Math.abs(e._maxCorner.x-e._minCorner.x),o=Math.abs(e._maxCorner.y-e._minCorner.y),a=Math.abs(e._maxCorner.z-e._minCorner.z);n._mapModelPathToModelSize.set(t,new _0x11ff81(r,o,a)),i.primitives.remove(e)}}))}return n}static getModelSizeSyn(e){if(!WebGLPlot$f.defined(e)||WebGLPlot$f.defined(e.modelPath))return;let t=e.modelPath,i=e.modelJson,n=this._mapModelPathToModelSize.get(t);if(WebGLPlot$f.defined(n))return n;if(WebGLPlot$f.defined(e.modelJson))return;for(var r=new WebGLPlot$f.Cartesian3,o=new WebGLPlot$f.Cartesian3,a=i.nodes,s=i.meshes,l=i.scenes[i.scene].nodes,u=l.length,c=[],h=new WebGLPlot$f.Cartesian3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),d=new WebGLPlot$f.Cartesian3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),f=0;f<u;++f){var p=a[l[f]];for(p._transformToRoot=WebGLPlot$f.ModelUtility.getTransform(p),c.push(p);c.length>0;){var _=(p=c.pop())._transformToRoot,m=p.mesh;if(WebGLPlot$f.defined(m))for(var g=s[m].primitives,x=g.length,v=0;v<x;++v){var y=g[v].attributes.POSITION;if(WebGLPlot$f.defined(y)){var $=WebGLPlot$f.ModelUtility.getAccessorMinMax(i,y),b=WebGLPlot$f.Cartesian3.fromArray($.min,0,r),T=WebGLPlot$f.Cartesian3.fromArray($.max,0,o);WebGLPlot$f.defined(h)&&WebGLPlot$f.defined(d)&&(WebGLPlot$f.Matrix4.multiplyByPoint(_,b,b),WebGLPlot$f.Matrix4.multiplyByPoint(_,T,T),WebGLPlot$f.Cartesian3.minimumByComponent(h,b,h),WebGLPlot$f.Cartesian3.maximumByComponent(d,T,d))}}var C=p.children;if(WebGLPlot$f.defined(C))for(var S=C.length,w=0;w<S;++w){var E=a[C[w]];E._transformToRoot=WebGLPlot$f.ModelUtility.getTransform(E),WebGLPlot$f.Matrix4.multiplyTransformation(_,E._transformToRoot,E._transformToRoot),c.push(E)}delete p._transformToRoot}}let P={};if(P._minCorner=h,P._maxCorner=d,WebGLPlot$f.defined(P._maxCorner)&&WebGLPlot$f.defined(P._minCorner)){var A=Math.abs(P._maxCorner.x-P._minCorner.x),L=Math.abs(P._maxCorner.y-P._minCorner.y),M=Math.abs(P._maxCorner.z-P._minCorner.z);this._mapModelPathToModelSize.set(t,new WebGLPlot$f.PlotPoint3D(A,L,M))}return n=this._mapModelPathToModelSize.get(t),n}static getPositionByDistanceOnOld(e,t,i,n){if(e.length>=2&&t>=0&&i>=0&&n>=0){if(0==t)return{index:i,point:e[i],distanceIndexOld:n};let r=n;for(let n=i;n<e.length-1;n++){let i=e[n],o=e[n+1],a=WebGLPlot$f.Cartesian3.distance(i,o);if(r+=a,r==t)return{index:n+1,point:o,distanceIndexOld:r};if(r>t){let e=(r-t)/a,s=o.x+(i.x-o.x)*e,l=o.y+(i.y-o.y)*e,u=o.z+(i.z-o.z)*e;return{index:n,point:new WebGLPlot$f.Cartesian3(s,l,u),distanceIndexOld:r-a}}}}return{index:-1,point:new WebGLPlot$f.Cartesian3}}static getPositionByDistance(e,t){if(e.length>=2&&t>=0){if(0==t)return{index:0,point:e[0],distanceIndex:0};let i=0;for(let n=0;n<e.length-1;n++){let r=e[n],o=e[n+1],a=WebGLPlot$f.Cartesian3.distance(r,o);if(i+=a,i==t)return{index:n+1,point:o,distanceIndex:i};if(i>t){let e=(i-t)/a,s=o.x+(r.x-o.x)*e,l=o.y+(r.y-o.y)*e,u=o.z+(r.z-o.z)*e;return{index:n,point:new WebGLPlot$f.Cartesian3(s,l,u),distanceIndex:i-a}}}}return{index:-1,point:new WebGLPlot$f.Cartesian3,distanceIndex:0}}static getAllDistance(e){let t=0;for(let i=0;i<e.length-1;i++){let n=e[i],r=e[i+1];t+=WebGLPlot$f.Cartesian3.distance(n,r)}return t}static calcControlPosMatrix(e,t,i){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t))return null;let n=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west"),r=null;if(e.getShowMode()!=_0x4e5d29.Marker){const t=this.degreesToCartesian3(e.getPosition());r=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(t,new WebGLPlot$f.HeadingPitchRoll,WebGLPlot$f.Ellipsoid.WGS84,n)}else{const o=e.getModelRotate(),a=WebGLPlot$f.HeadingPitchRoll.fromDegrees(o.z,o.x,o.y,new WebGLPlot$f.HeadingPitchRoll),s=this.degreesToCartesian3(e.getPosition()),l=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(s,a,WebGLPlot$f.Ellipsoid.WGS84,n),u=e.getModelScale(),c=e.getModelPath(),h=this.getModelSize({modelPath:c,scene:i});if(WebGLPlot$f.defined(h)){const e=WebGLPlot$f.Cartesian3.fromElements(h.x*t.y*u,h.y*t.x*u,h.z*t.z*u);r=WebGLPlot$f.Matrix4.multiplyByTranslation(l,e,new WebGLPlot$f.Matrix4)}}return r}static calcControlPoint(e,t,i){if(0==t.x&&0==t.y&&0==t.z)return e.getPosition();let n=this.calcControlPosMatrix(e,t,i);return WebGLPlot$f.defined(n)?this.getPositionFromModelMatrix(n):null}static colorToObject(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}static objectToColor(e){var t=new WebGLPlot$f.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,WebGLPlot$f.defined(e.red)||(t.red=1),WebGLPlot$f.defined(e.green)||(t.green=1),WebGLPlot$f.defined(e.blue)||(t.blue=1),WebGLPlot$f.defined(e.alpha)||(t.alpha=1),t}static circlePoint(e,t,i,n){n*=Math.PI/180;let r=e.x+t*Math.cos(n),o=e.y+i*Math.sin(n);return new Cesium.Cartesian2(r,o)}static calcCameraDistance(e,t){if(WebGLPlot$f.defined(e)&&WebGLPlot$f.defined(t)){let i=this.degreesToCartesian3(e);return WebGLPlot$f.Cartesian3.distance(i,t.camera.positionWC)}return null}}const _0x23a222=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2077d7=_0x23a222(void 0,(function(){return _0x2077d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2077d7).search("(((.+)+)+)+$")}));_0x2077d7();class _0x24b262{constructor(){this._symbolStyle=new _0x53d051,this._lineSymbolID=0,this._lineWidth=3,this._surroundLineWidth=3,this._gridSymbolSize=new WebGLPlot$f.Cartesian2(-1,-1),this._symbolRank=0}clone(){let e=new _0x24b262;return e._symbolStyle=this._symbolStyle.clone(),e._lineSymbolID=this._lineSymbolID,e._lineWidth=this._lineWidth,e._surroundLineWidth=this._surroundLineWidth,e._gridSymbolSize=this._gridSymbolSize,e._symbolRank=this._symbolRank,e}getSymbolStyle(){return this._symbolStyle}setSymbolStyle(e){this._symbolStyle=e}getLineSymbolID(){return this._lineSymbolID}setLineSymbolID(e){this._lineSymbolID=e}getLineWidth(){return this._lineWidth}setLineWidth(e){this._lineWidth=e}getSurroundLineWidth(){return this._surroundLineWidth}setSurroundLineWidth(e){this._surroundLineWidth=e}getGridSymbolSize(){return this._gridSymbolSize}setGridSymbolSize(e){this._gridSymbolSize=e}getSymbolRank(){return this._symbolRank}setSymbolRank(e){this._symbolRank=e}setGeoGraphicObjectStyle(e){e.symbolStyle=this._symbolStyle,e.lineSymbolID=this._lineSymbolID,e.gridLineWidth=this._lineWidth,e.gridSurroundLineWidth=this._surroundLineWidth,-1!=this._gridSymbolSize.x&&-1!=this._gridSymbolSize.y&&(e.gridSymbolSize=this._gridSymbolSize),e.symbolRank=this._symbolRank}getGeoGraphicObjectStyle(e){this._symbolStyle=e.symbolStyle,this._lineSymbolID=e.lineSymbolID,this._lineWidth=e.gridLineWidth,this._surroundLineWidth=e.gridSurroundLineWidth,this._gridSymbolSize=e.gridSymbolSize,this._symbolRank=e.symbolRank}toJson(){let e={};if(!e.hasOwnProperty("symbolStyle")){var t={};t.lineColor=_0x2887b9.colorToObject(this._symbolStyle.lineColor),t.fillSymbolID=this._symbolStyle._fillSymbolID,t.fillBackColor=_0x2887b9.colorToObject(this._symbolStyle._fillBackColor),t.fillForeColor=_0x2887b9.colorToObject(this._symbolStyle._fillForeColor),t.fillBackOpaque=this._symbolStyle._fillBackOpaque,t.fillGradientMode=this._symbolStyle._fillGradientMode,t.fillCenterOffsetX=this._symbolStyle.fillGradientOffsetRatioX,t.fillCenterOffsetY=this._symbolStyle.fillGradientOffsetRatioY,t.fillAngle=this._symbolStyle.fillGradientAngle,t.fillOpaqueRate=100-this._symbolStyle.fillOpaqueRate,t.lineWidth3D=this._symbolStyle.lineWidth,e.symbolStyle=t}return e.hasOwnProperty("lineSymbolID")||(e.lineSymbolID=this._lineSymbolID),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("surroundLineWidth")||(e.surroundLineWidth=this._surroundLineWidth),e.hasOwnProperty("gridSymbolSize")||(e.gridSymbolSize={x:this._gridSymbolSize.x,y:this._gridSymbolSize.y}),e.hasOwnProperty("symbolRank")||(e.symbolRank=this._symbolRank),JSON.stringify(e)}fromJson(e){let t=JSON.parse(e);if(WebGLPlot$f.defined(t.symbolStyle)){let e=t.symbolStyle;WebGLPlot$f.defined(e.lineColor)&&(this._symbolStyle.lineColor=_0x2887b9.objectToColor(e.lineColor),this._symbolStyle._opacity=this._symbolStyle.lineColor.alpha),WebGLPlot$f.defined(e.fillSymbolID)&&(this._symbolStyle.fillSymbolID=e.fillSymbolID),WebGLPlot$f.defined(e.fillForeColor)&&(this._symbolStyle.fillForeColor=_0x2887b9.objectToColor(e.fillForeColor)),WebGLPlot$f.defined(e.fillBackColor)&&(this._symbolStyle.fillBackColor=_0x2887b9.objectToColor(e.fillBackColor)),WebGLPlot$f.defined(e.fillGradientMode)&&(this._symbolStyle.fillGradientMode=e.fillGradientMode),WebGLPlot$f.defined(e.fillBackOpaque)&&(this._symbolStyle.fillBackOpaque=e.fillBackOpaque),WebGLPlot$f.defined(e.fillGradientAngle)&&(this._symbolStyle.fillGradientAngle=e.fillGradientAngle),WebGLPlot$f.defined(e.fillOpaqueRate)&&(this._symbolStyle.fillOpaqueRate=100-e.fillOpaqueRate),WebGLPlot$f.defined(e.fillGradientAngle)&&(this._symbolStyle.fillGradientAngle=e.fillGradientAngle),WebGLPlot$f.defined(e.fillGradientOffsetRatioX)&&(this._symbolStyle.fillGradientOffsetRatioX=e.fillGradientOffsetRatioX),WebGLPlot$f.defined(e.fillGradientOffsetRatioY)&&(this._symbolStyle.fillGradientOffsetRatioY=e.fillGradientOffsetRatioY),WebGLPlot$f.defined(e.lineWidth3D)?this._symbolStyle.lineWidth=e.lineWidth3D:this._symbolStyle.lineWidth=3}WebGLPlot$f.defined(t.lineSymbolID)&&(this._lineSymbolID=t.lineSymbolID),WebGLPlot$f.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$f.defined(t.surroundLineWidth)&&(this._surroundLineWidth=t.surroundLineWidth),WebGLPlot$f.defined(t.gridSymbolSize)&&(this._gridSymbolSize=new WebGLPlot$f.Cartesian2(t.gridSymbolSize.x,t.gridSymbolSize.y)),WebGLPlot$f.defined(t.symbolRank)&&(this._symbolRank=t.symbolRank)}}const _0x320483=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2b72a2=_0x320483(void 0,(function(){return _0x2b72a2.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b72a2).search("(((.+)+)+)+$")}));_0x2b72a2();class _0x487d97{constructor(){this._position=new _0x11ff81,this._isPositionUpdate=!1,this._modelScale=1,this._isModelScaleUpdate=!1,this._vectorScale=1,this._isVectorScaleUpdate=!1,this._modelRotate=new _0x11ff81,this._isModelRotateUpdate=!1,this._vectorRotate=new _0x11ff81,this._isVectorRotateUpdate=!1,this._modelPath="",this._isModelPathUpdate=!1,this._visible=!0,this._isVisibleUpdate=!1,this._dotPlotLibID=0,this._isDotPlotLibIDUpdate=!1,this._dotPlotCode=0,this._isDotPlotCodeUpdate=!1,this._dotPlotStyle=new _0x24b262,this._isDotPlotStyleUpdate=!1,this._pictureSymbolSize=new WebGLPlot$f.Cartesian2(0,0),this._isPictureSymbolSizeUpdate=!1,this._picturePath="",this._isPicturePathUpdate=!1,this._showMode=_0x4e5d29.Unkown,this._isShowModeUpdate=!1,this._isDistanceChangeMode=!1,this._isDistanceChangeModeUpdate=!1,this._changeModeDistance=5e3,this._isChangeModeDistanceUpdate=!1}_update(e){this._position=e._position,this._isPositionUpdate=!0,this._modelScale=e._modelScale,this._isModelScaleUpdate=!0,this._vectorScale=e._vectorScale,this._isVectorScaleUpdate=!0,this._modelRotate=e._modelRotate,this._isModelRotateUpdate=!0,this._vectorRotate=e._vectorRotate,this._isVectorRotateUpdate=!0,this._modelPath=e._modelPath,this._isModelPathUpdate=!0,this._visible=e._visible,this._isVisibleUpdate=!0,this._dotPlotLibID=e._dotPlotLibID,this._isDotPlotLibIDUpdate=!0,this._dotPlotCode=e._dotPlotCode,this._isDotPlotCodeUpdate=!0,this._dotPlotStyle=e._dotPlotStyle,this._isDotPlotStyleUpdate=!0,this._pictureSymbolSize=e._pictureSymbolSize,this._isPictureSymbolSizeUpdate=!0,this._picturePath=e._picturePath,this._isPicturePathUpdate=!0,this._showMode=e._showMode,this._isShowModeUpdate=!0,this._isDistanceChangeMode=e._isDistanceChangeMode,this._isDistanceChangeModeUpdate=!0,this._changeModeDistance=e._changeModeDistance,this._isChangeModeDistanceUpdate=!0}_merge(e){e._isPositionUpdate&&(this._position=new _0x11ff81(e._position.x,e._position.y,e._position.z),this._isPositionUpdate=!0),e._isModelScaleUpdate&&(this._modelScale=e._modelScale,this._isModelScaleUpdate=!0),e._isVectorScaleUpdate&&(this._vectorScale=e._vectorScale,this._isVectorScaleUpdate=!0),e._isModelRotateUpdate&&(this._modelRotate=new _0x11ff81(e._modelRotate.x,e._modelRotate.y,e._modelRotate.z),this._isModelRotateUpdate=!0),e._isVectorRotateUpdate&&(this._vectorRotate=new _0x11ff81(e._vectorRotate.x,e._vectorRotate.y,e._vectorRotate.z),this._isVectorRotateUpdate=!0),e._isModelPathUpdate&&(this._modelPath=e._modelPath,this._isModelPathUpdate=!0),e._isVisibleUpdate&&(this._visible=e._visible,this._isVisibleUpdate=!0),e._isDotPlotLibIDUpdate&&(this._dotPlotLibID=e._dotPlotLibID,this._isDotPlotLibIDUpdate=!0),e._isDotPlotCodeUpdate&&(this._dotPlotCode=e._dotPlotCode,this._isDotPlotCodeUpdate=!0),e._isDotPlotStyleUpdate&&(this._dotPlotStyle=e._dotPlotStyle.clone(),this._isDotPlotStyleUpdate=!0),e._isPictureSymbolSizeUpdate&&(this._pictureSymbolSize=new WebGLPlot$f.Cartesian2(e._pictureSymbolSize.x,e._pictureSymbolSize.y),this._isPictureSymbolSizeUpdate=!0),e._isPicturePathUpdate&&(this._picturePath=e._picturePath,this._isPicturePathUpdate=!0),e._isShowModeUpdate&&(this._showMode=e._showMode,this._isShowModeUpdate=!0),e._isDistanceChangeModeUpdate&&(this._isDistanceChangeMode=e._isDistanceChangeMode,this._isDistanceChangeModeUpdate=!0),e._isChangeModeDistanceUpdate&&(this._changeModeDistance=e._changeModeDistance,this._isChangeModeDistanceUpdate=!0)}_initParm(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){this._position=new _0x11ff81(e.x,e.y,e.z),this._isPositionUpdate=!1,this._modelScale=t,this._isModelScaleUpdate=!1,this._vectorScale=i,this._isVectorScaleUpdate=!1,this._modelRotate=new _0x11ff81(n.x,n.y,n.z),this._isModelRotateUpdate=!1,this._vectorRotate=new _0x11ff81(r.x,r.y,r.z),this._isVectorRotateUpdate=!1,this._modelPath=o,this._isModelPathUpdate=!1,this._visible=a,this._isVisibleUpdate=!1,this._dotPlotLibID=s,this._isDotPlotLibIDUpdate=!1,this._dotPlotCode=l,this._isDotPlotCodeUpdate=!1,this._dotPlotStyle=u,this._isDotPlotStyleUpdate=!1,this._pictureSymbolSize=new WebGLPlot$f.Cartesian2(c.x,c.y),this._isPictureSymbolSizeUpdate=!1,this._picturePath=h,this._isPicturePathUpdate=!1,this._showMode=d,this._isShowModeUpdate=!1,this._isDistanceChangeMode=f,this._isDistanceChangeModeUpdate=!1,this._changeModeDistance=p,this._isChangeModeDistanceUpdate=!1}_toJson(){let e={};return e.hasOwnProperty("position")||(e.position={x:this._position.x,y:this._position.y,z:this._position.z}),e.hasOwnProperty("isPositionUpdate")||(e.isPositionUpdate=this._isPositionUpdate),e.hasOwnProperty("modelScale")||(e.modelScale=this._modelScale),e.hasOwnProperty("isModelScaleUpdate")||(e.isModelScaleUpdate=this._isModelScaleUpdate),e.hasOwnProperty("vectorScale")||(e.vectorScale=this._vectorScale),e.hasOwnProperty("isVectorScaleUpdate")||(e.isVectorScaleUpdate=this._isVectorScaleUpdate),e.hasOwnProperty("modelRotate")||(e.modelRotate={x:this._modelRotate.x,y:this._modelRotate.y,z:this._modelRotate.z}),e.hasOwnProperty("isModelRotateUpdate")||(e.isModelRotateUpdate=this._isModelRotateUpdate),e.hasOwnProperty("vectorRotate")||(e.vectorRotate={x:this._vectorRotate.x,y:this._vectorRotate.y,z:this._vectorRotate.z}),e.hasOwnProperty("isVectorRotateUpdate")||(e.isVectorRotateUpdate=this._isVectorRotateUpdate),e.hasOwnProperty("modelPath")||(e.modelPath=this._modelPath),e.hasOwnProperty("isModelPathUpdate")||(e.isModelPathUpdate=this._isModelPathUpdate),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("isVisibleUpdate")||(e.isVisibleUpdate=this._isVisibleUpdate),e.hasOwnProperty("dotPlotLibID")||(e.dotPlotLibID=this._dotPlotLibID),e.hasOwnProperty("isDotPlotLibIDUpdate")||(e._isDotPlotLibIDUpdate=this._isDotPlotLibIDUpdate),e.hasOwnProperty("dotPlotCode")||(e.dotPlotCode=this._dotPlotCode),e.hasOwnProperty("isDotPlotCodeUpdate")||(e._isDotPlotCodeUpdate=this._isDotPlotCodeUpdate),e.hasOwnProperty("dotPlotSyle")||(e.dotPlotStyle=this._dotPlotStyle.toJson()),e.hasOwnProperty("isDotPlotStyleUpdate")||(e._isDotPlotStyleUpdate=this._isDotPlotStyleUpdate),e.hasOwnProperty("pictureSymbolSize")||(e.pictureSymbolSize={x:this._pictureSymbolSize.x,y:this._pictureSymbolSize.y}),e.hasOwnProperty("isPictureSymbolSizeUpdate")||(e.isPictureSymbolSizeUpdate=this._isPictureSymbolSizeUpdate),e.hasOwnProperty("picturePath")||(e.picturePath=this._picturePath),e.hasOwnProperty("isPicturePathUpdate")||(e.isPicturePathUpdate=this._isPicturePathUpdate),e.hasOwnProperty("showMode")||(e.showMode=this._showMode),e.hasOwnProperty("isShowModeUpdate")||(e.isShowModeUpdate=this._isShowModeUpdate),e.hasOwnProperty("isDistanceChangeMode")||(e.isDistanceChangeMode=this._isDistanceChangeMode),e.hasOwnProperty("isDistanceChangeModeUpdate")||(e.isDistanceChangeModeUpdate=this._isDistanceChangeModeUpdate),e.hasOwnProperty("changeModeDistance")||(e.changeModeDistance=this._changeModeDistance),e.hasOwnProperty("isChangeModeDistanceUpdate")||(e.isChangeModeDistanceUpdate=this._isChangeModeDistanceUpdate),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);if(WebGLPlot$f.defined(t.position)&&(this._position=new _0x11ff81(t.position.x,t.position.y,t.position.z)),WebGLPlot$f.defined(t.isPositionUpdate)&&(this._isPositionUpdate=t.isPositionUpdate),WebGLPlot$f.defined(t.modelScale)&&(this._modelScale=t.modelScale),WebGLPlot$f.defined(t.isModelScaleUpdate)&&(this._isModelScaleUpdate=t.isModelScaleUpdate),WebGLPlot$f.defined(t.vectorScale)&&(this._vectorScale=t.vectorScale),WebGLPlot$f.defined(t.isVectorScaleUpdate)&&(this._isVectorScaleUpdate=t.isVectorScaleUpdate),WebGLPlot$f.defined(t.modelRotate)&&(this._modelRotate=new _0x11ff81(t.modelRotate.x,t.modelRotate.y,t.modelRotate.z)),WebGLPlot$f.defined(t.isModelRotateUpdate)&&(this._isModelRotateUpdate=t.isModelRotateUpdate),WebGLPlot$f.defined(t.vectorRotate)&&(this._vectorRotate=new _0x11ff81(t.vectorRotate.x,t.vectorRotate.y,t.vectorRotate.z)),WebGLPlot$f.defined(t.isVectorRotateUpdate)&&(this._isVectorRotateUpdate=t.isVectorRotateUpdate),WebGLPlot$f.defined(t.modelPath)&&(this._modelPath=t.modelPath),WebGLPlot$f.defined(t.isModelRotateUpdate)&&(this._isModelPathUpdate=t.isModelPathUpdate),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.isVisibleUpdate)&&(this._isVisibleUpdate=t.isVisibleUpdate),WebGLPlot$f.defined(t.dotPlotLibID)&&(this._dotPlotLibID=t.dotPlotLibID),WebGLPlot$f.defined(t.isDotPlotParmUpdate)&&(this._isDotPlotLibIDUpdate=t.isDotPlotLibIDUpdate),WebGLPlot$f.defined(t.dotPlotCode)&&(this._dotPlotCode=t.dotPlotCode),WebGLPlot$f.defined(t.isDotPlotCodeUpdate)&&(this._isDotPlotCodeUpdate=t.isDotPlotCodeUpdate),WebGLPlot$f.defined(t.dotPlotStyle)){let e=new _0x24b262;e.fromJson(t.dotPlotStyle),this._dotPlotStyle=e}WebGLPlot$f.defined(t.isDotPlotStyleUpdate)&&(this._isDotPlotStyleUpdate=t.isDotPlotStyleUpdate),WebGLPlot$f.defined(t.pictureSymbolSize)&&(this._pictureSymbolSize=new WebGLPlot$f.Cartesian2(t.pictureSymbolSize.x,t.pictureSymbolSize.y)),WebGLPlot$f.defined(t.isPictureSymbolSizeUpdate)&&(this._isPictureSymbolSizeUpdate=t.isPictureSymbolSizeUpdate),WebGLPlot$f.defined(t.picturePath)&&(this._picturePath=t.picturePath),WebGLPlot$f.defined(t.isPicturePathUpdate)&&(this._isPicturePathUpdate=t.isPicturePathUpdate),WebGLPlot$f.defined(t.showMode)&&(this._showMode=t.showMode),WebGLPlot$f.defined(t.isShowModeUpdate)&&(this._isShowModeUpdate=t.isShowModeUpdate),WebGLPlot$f.defined(t.isDistanceChangeMode)&&(this._isDistanceChangeMode=t.isDistanceChangeMode),WebGLPlot$f.defined(t.isDistanceChangeModeUpdate)&&(this._isDistanceChangeModeUpdate=t.isDistanceChangeModeUpdate),WebGLPlot$f.defined(t.changeModeDistance)&&(this._changeModeDistance=t.changeModeDistance),WebGLPlot$f.defined(t.isChangeModeDistanceUpdate)&&(this._isChangeModeDistanceUpdate=t.isChangeModeDistanceUpdate)}clone(){let e=new _0x487d97;return e._position=new _0x11ff81(this._position.x,this._position.y,this._position.z),e._isPositionUpdate=this._isPositionUpdate,e._modelScale=this._modelScale,e._isModelScaleUpdate=this._isModelScaleUpdate,e._vectorScale=this._vectorScale,e._isVectorScaleUpdate=this._isVectorScaleUpdate,e._modelRotate=new _0x11ff81(this._modelRotate.x,this._modelRotate.y,this._modelRotate.z),e._isModelRotateUpdate=this._isModelRotateUpdate,e._vectorRotate=new _0x11ff81(this._vectorRotate.x,this._vectorRotate.y,this._vectorRotate.z),e._isVectorRotateUpdate=this._isVectorRotateUpdate,e._modelPath=this._modelPath,e._isModelPathUpdate=this._isModelPathUpdate,e._visible=this._visible,e._isVisibleUpdate=this._isVisibleUpdate,e._dotPlotLibID=this._dotPlotLibID,e._isDotPlotLibIDUpdate=this._isDotPlotLibIDUpdate,e._dotPlotCode=this._dotPlotCode,e._isDotPlotCodeUpdate=this._isDotPlotCodeUpdate,e._dotPlotStyle=this._dotPlotStyle.clone(),e._isDotPlotStyleUpdate=this._isDotPlotStyleUpdate,e._pictureSymbolSize=new WebGLPlot$f.Cartesian2(this._pictureSymbolSize.x,this._pictureSymbolSize.y),e._isPictureSymbolSizeUpdate=this._isPictureSymbolSizeUpdate,e._picturePath=this._picturePath,e._isPicturePathUpdate=this._isPicturePathUpdate,e._showMode=this._showMode,e._isShowModeUpdate=this._isShowModeUpdate,e._isDistanceChangeMode=this._isDistanceChangeMode,e._isDistanceChangeModeUpdate=this._isDistanceChangeModeUpdate,e._changeModeDistance=this._changeModeDistance,e._isChangeModeDistanceUpdate=this._isChangeModeDistanceUpdate,e}setPosition(e){this._position=e,this._isPositionUpdate=!0}getPosition(){return this._position}isPositionUpdate(){return this._isPositionUpdate}setModelScale(e){this._modelScale=e,this._isModelScaleUpdate=!0}getModelScale(){return this._modelScale}isModelScaleUpdate(){return this._isModelScaleUpdate}setVectorScale(e){this._vectorScale=e,this._isVectorScaleUpdate=!0}getVectorScale(){return this._vectorScale}isVectorScaleUpdate(){return this._isVectorScaleUpdate}setModelRotate(e){this._modelRotate=e,this._isModelRotateUpdate=!0}getModelRotate(){return this._modelRotate}isModelRotateUpdate(){return this._isModelRotateUpdate}setVectorRotate(e){this._vectorRotate=e,this._isVectorRotateUpdate=!0}getVectorRotate(){return this._vectorRotate}isVectorRotateUpdate(){return this._isVectorRotateUpdate}setModelPath(e){this._modelPath=e,this._isModelPathUpdate=!0}getModelPath(){return this._modelPath}isModelPathUpdate(){return this._isModelPathUpdate}setDotPlotLibID(e){this._dotPlotLibID=e,this._isDotPlotLibIDUpdate=!0}getDotPlotLibID(){return this._dotPlotLibID}isDotPlotLibIDUpdate(){return this._isDotPlotLibIDUpdate}setDotPlotCode(e){this._dotPlotCode=e,this._isDotPlotCodeUpdate=!0}getDotPlotCode(){return this._dotPlotCode}isDotPlotCodeUpdate(){return this._isDotPlotCodeUpdate}setDotPlotStyle(e){this._dotPlotStyle=e,this._isDotPlotStyleUpdate=!0}getDotPlotStyle(){return this._dotPlotStyle}isDotPlotStyleUpdate(){return this._isDotPlotStyleUpdate}setVisible(e){this._visible=e,this._isVisibleUpdate=!0}isVisible(){return this._visible}isVisibleUpdate(){return this._isVisibleUpdate}setPicturePath(e){this._picturePath=e,this._isPicturePathUpdate=!0}getPicturePath(){return this._picturePath}isPicturePathUpdate(){return this._isPicturePathUpdate}setPictureSymbolSize(e){this._pictureSymbolSize=e,this._isPictureSymbolSizeUpdate=!0}getPictureSymbolSize(){return this._pictureSymbolSize}isPictureSymbolSizeUpdate(){return this._isPictureSymbolSizeUpdate}setShowMode(e){this._showMode=e,this._isShowModeUpdate=!0}getShowMode(){return this._showMode}isShowModeUpdate(){return this._isShowModeUpdate}setIsDistanceChangeMode(e){this._isDistanceChangeMode=e,this._isDistanceChangeModeUpdate=!0}getIsDistanceChangeMode(){return this._isDistanceChangeMode}isDistanceChangeModeUpdate(){return this._isDistanceChangeModeUpdate}setChangeModeDistance(e){this._changeModeDistance=e,this._isChangeModeDistanceUpdate=!0}getChangeModeDistance(){return this._changeModeDistance}isChangeModeDistanceUpdate(){return this._isChangeModeDistanceUpdate}}var _0x1f1da0=(_0x2e2c59=!0,function(e,t){var i=_0x2e2c59?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e2c59=!1,i}),_0x105117=_0x1f1da0(void 0,(function(){return _0x105117.toString().search("(((.+)+)+)+$").toString().constructor(_0x105117).search("(((.+)+)+)+$")})),_0x2e2c59;_0x105117();var _0x49b975={UNKNOW:0,WAKE:1,ROTORWASH:2,FIRESMOKE:3,BURST:4,TAILFLAME:5,TAILGAS:6,RADAR:7,SCANWAVE:8,SCANCONE:9,DETECTIONCONE:10,TRACKLINE:11,ATTACKLINE:12,SIGN:13,COMMUNICATIONLINK:14,DYNAMICMODEL:15,TEXT:16,EXTENDACTION:17,AUGMENT:18,ANNULARDIFFUSION:19},_0x3b1c90=Object.freeze(_0x49b975);const _0x30ae25=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1d897c=_0x30ae25(void 0,(function(){return _0x1d897c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d897c).search("(((.+)+)+)+$")}));_0x1d897c();class _0x46eece{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._name=WebGLPlot$f.defaultValue(e.name,""),this._geoEntity=WebGLPlot$f.defaultValue(e.geoEntity,null),this._visible=WebGLPlot$f.defaultValue(e.visible,!0),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._UUID=WebGLPlot$f.createGuid(),this._type=_0x3b1c90.UNKNOW,this._geoEntityParameter=void 0,this._initialized=!1,this._scene=void 0;let t=this;this._execute=function(e,i){t._executeFunction(e),t._initialized||(t._removeEffectFromScene(e),t._visible?t._initialized=t._addEffectToScene(e):t._initialized=!0)}}getType(){return this._type}setGeoEntity(e){this._geoEntity=e}getGeoEntity(){return this._geoEntity}setVisible(e){this._visible=e,this._initialized=!1}isVisible(){return this._visible}setOffset(e){this._pntOffset=e,this._initialized=!1}getOffset(){return this._pntOffset}setChangeSizeFlowModel(e){this._bChangeSizeFlowModel=e}isChangeSizeFlowModel(){return this._bChangeSizeFlowModel}getUUID(){return this._UUID}addEffectToScene(e){this._scene=e,e.preUpdate.addEventListener(this._execute)}removeEffectFromScene(e){e.preUpdate.removeEventListener(this._execute),this._removeEffectFromScene(e),this._initialized=!1}setGeoEntityParameter(e,t){}_addEffectToScene(e){}_removeEffectFromScene(e){}_executeFunction(e){}destroy(){}toJSON(){return{}}fromJSON(e){}clone(){}getName(){return this._name}setName(e){this._name=e}}const _0x49529a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x45ed72=_0x49529a(void 0,(function(){return _0x45ed72.toString().search("(((.+)+)+)+$").toString().constructor(_0x45ed72).search("(((.+)+)+)+$")}));_0x45ed72();class _0x3c13c7 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.TAILFLAME,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectTailflame_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,-.5,.5)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._crossDiameter=WebGLPlot$f.defaultValue(e.crossDiameter,20),this._particleTailflame=void 0}setCrossDiameter(e){this._crossDiameter=e,this._initialized=!1}getCrossDiameter(){return this._crossDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._particleTailflame)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._particleTailflame.emitterModelMatrix=t)}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){if(0==this._geoEntityParameter.getModelScale()){let t=1*e.getModelScale();this._crossDiameter=t}else{let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._crossDiameter*=t}this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleTailflame=this._createTailFlameParticle(e),WebGLPlot$f.defined(this._particleTailflame)&&(e.primitives.add(this._particleTailflame),t=!0),t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._particleTailflame)&&e.primitives.contains(this._particleTailflame)&&e.primitives.remove(this._particleTailflame),this._particleTailflame=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("crossDiameter")||(e.crossDiameter=this._crossDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.crossDiameter)&&(this._crossDiameter=t.crossDiameter),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x3c13c7;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._crossDiameter=this._crossDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createTailFlameParticle(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset)||!WebGLPlot$f.defined(this._crossDiameter))return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=this._crossDiameter/1,n=1*i;n<.5&&(n=.5);let r=20*i,o=80*i;return new WebGLPlot$f.ParticleSystem({image:_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/flame.png",startColor:new WebGLPlot$f.Color(1,1,1,1),endColor:new WebGLPlot$f.Color(.5,0,0,0),startScale:1,endScale:1,minimumParticleLife:.1,maximumParticleLife:.3,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$f.Cartesian2(n,n),emissionRate:600,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$f.ConeEmitter(WebGLPlot$f.CesiumMath.toRadians(10)),sizeInMeters:!0})}_calcControlPoint(e,t,i){const n=_0x2887b9.calcControlPosMatrix(e,t,i);if(!WebGLPlot$f.defined(n))return null;const r=WebGLPlot$f.HeadingPitchRoll.fromDegrees(0,90,0,new WebGLPlot$f.HeadingPitchRoll),o=WebGLPlot$f.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$f.Matrix3);return WebGLPlot$f.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$f.Matrix4)}}const _0x2a9490=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe5c3e5=_0x2a9490(void 0,(function(){return _0xe5c3e5.toString().search("(((.+)+)+)+$").toString().constructor(_0xe5c3e5).search("(((.+)+)+)+$")}));_0xe5c3e5();class _0x1914c9 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.TAILGAS,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectTailgas_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,-.5,.5)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._crossDiameter=WebGLPlot$f.defaultValue(e.crossDiameter,20),this._particleTailgas=void 0}setCrossDiameter(e){this._crossDiameter=e,this._initialized=!1}getCrossDiameter(){return this._crossDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._particleTailgas)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._particleTailgas.emitterModelMatrix=t)}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._crossDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleTailgas=this._createTailgasParticle(e),WebGLPlot$f.defined(this._particleTailgas)&&(e.primitives.add(this._particleTailgas),t=!0),t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._particleTailgas)&&e.primitives.contains(this._particleTailgas)&&e.primitives.remove(this._particleTailgas),this._particleTailgas=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("crossDiameter")||(e.crossDiameter=this._crossDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.crossDiameter)&&(this._crossDiameter=t.crossDiameter),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x1914c9;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._crossDiameter=this._crossDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createTailgasParticle(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset)||!WebGLPlot$f.defined(this._crossDiameter))return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=this._crossDiameter/1,n=1*i;n<.5&&(n=.5);let r=5*i,o=5*i;return new WebGLPlot$f.ParticleSystem({image:_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/gas.png",startColor:new WebGLPlot$f.Color(.57,.57,.57,1),endColor:new WebGLPlot$f.Color(.57,.57,.57,0),startScale:1,endScale:1,minimumParticleLife:7,maximumParticleLife:7,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$f.Cartesian2(n,n),emissionRate:80,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$f.ConeEmitter(WebGLPlot$f.CesiumMath.toRadians(5)),sizeInMeters:!0})}_calcControlPoint(e,t,i){const n=_0x2887b9.calcControlPosMatrix(e,t,i);if(!WebGLPlot$f.defined(n))return null;const r=WebGLPlot$f.HeadingPitchRoll.fromDegrees(0,90,0,new WebGLPlot$f.HeadingPitchRoll),o=WebGLPlot$f.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$f.Matrix3);return WebGLPlot$f.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$f.Matrix4)}}const _0xe3d9d6=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x15c81c=_0xe3d9d6(void 0,(function(){return _0x15c81c.toString().search("(((.+)+)+)+$").toString().constructor(_0x15c81c).search("(((.+)+)+)+$")}));_0x15c81c();class _0x302fab extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.FIRESMOKE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectFiresmoke_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,.5)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._firesmokeDiameter=WebGLPlot$f.defaultValue(e.firesmokeDiameter,50),this._particleFiresmoke=void 0}setFiresmokeDiameter(e){this._firesmokeDiameter=e,this._initialized=!1}getFiresmokeDiameter(){return this._firesmokeDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._particleFiresmoke)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._particleFiresmoke.emitterModelMatrix=t)}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._firesmokeDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleFiresmoke=this._createFiresmokeParticle(e),WebGLPlot$f.defined(this._particleFiresmoke)&&(e.primitives.add(this._particleFiresmoke),t=!0),t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._particleFiresmoke)&&e.primitives.contains(this._particleFiresmoke)&&e.primitives.remove(this._particleFiresmoke),this._particleFiresmoke=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("firesmokeDiameter")||(e.firesmokeDiameter=this._firesmokeDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.firesmokeDiameter)&&(this._firesmokeDiameter=t.firesmokeDiameter),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x302fab;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._firesmokeDiameter=this._firesmokeDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createFiresmokeParticle(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset)||!WebGLPlot$f.defined(this._firesmokeDiameter)||this._firesmokeDiameter<=0)return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=this._firesmokeDiameter/1,n=1*i;n<.5&&(n=.5);let r=7*i,o=9*i;return new WebGLPlot$f.ParticleSystem({image:_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/fire.png",startColor:new WebGLPlot$f.Color(1,1,1,1),endColor:new WebGLPlot$f.Color(.2,0,0,0),startScale:3,endScale:3,minimumParticleLife:1.5,maximumParticleLife:1.8,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$f.Cartesian2(n,n),emissionRate:200,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$f.ConeEmitter(WebGLPlot$f.CesiumMath.toRadians(30)),sizeInMeters:!0})}_calcControlPoint(e,t,i){let n=_0x2887b9.calcControlPoint(e,t,i);return WebGLPlot$f.defined(n)?WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(_0x2887b9.degreesToCartesian3(n),new WebGLPlot$f.HeadingPitchRoll,WebGLPlot$f.Ellipsoid.WGS84,WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west")):null}}const _0x198c45=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2ca4a7=_0x198c45(void 0,(function(){return _0x2ca4a7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ca4a7).search("(((.+)+)+)+$")}));_0x2ca4a7();class _0xfa8fd4 extends _0x46eece{constructor(){super(),this._UUID="GeoEntityEffectExtend_"+WebGLPlot$f.createGuid(),this._type=_0x3b1c90.EXTENDACTION,this._name="",this._param=""}toJSON(){let e={};return e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("param")||(e.param=this._param),JSON.stringify(e)}fromJSON(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.param)&&(this._param=t.param)}_executeExtend(){_0xfa8fd4.extendCallBacks.forEach(((e,t)=>{t(e,this._name,this._param)}))}getName(){return this._name}setName(e){this._name=e}getParam(){return this._param}setParam(e){this._param=e}static addExtendCallBack(e,t){WebGLPlot$f.defined(_0xfa8fd4.extendCallBacks.get(e))||_0xfa8fd4.extendCallBacks.set(e,t)}static removeExtendCallBack(e){WebGLPlot$f.defined(_0xfa8fd4.extendCallBacks.get(e))&&_0xfa8fd4.extendCallBacks.delete(e)}}_0xfa8fd4.extendCallBacks=new Map;var _0x52ec3a=(_0x1492e9=!0,function(e,t){var i=_0x1492e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1492e9=!1,i}),_0x34a47b=_0x52ec3a(void 0,(function(){return _0x34a47b.toString().search("(((.+)+)+)+$").toString().constructor(_0x34a47b).search("(((.+)+)+)+$")})),_0x1492e9;_0x34a47b();class _0x4d608c extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new WebGLPlot$f.Cartesian3(0,0,0)),this._type=_0x3b1c90.DYNAMICMODEL,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectDynamic_"+WebGLPlot$f.createGuid(),this._dynamicModelUrl=WebGLPlot$f.defaultValue(e.dynamicModelUrl,""),this._angleTimes=WebGLPlot$f.defaultValue(e.angleTimes,[{time:3,start:{x:0,y:0,z:0},end:{x:45,y:45,z:45},isloop:!0}]),this._scaleTimes=WebGLPlot$f.defaultValue(e.scaleTimes,[{time:3,start:500,end:2e3,isloop:!0}]),this._dynamicModel=void 0,this._angleLoop=WebGLPlot$f.defaultValue(e.angleLoop,!1),this._scaleLoop=WebGLPlot$f.defaultValue(e.scaleLoop,!1),this._gapTime=WebGLPlot$f.defaultValue(e.gapTime,30),this._timer=null}setModelPath(e){this._dynamicModelUrl=e,this._initialized=!1}getModelPath(){return this._dynamicModelUrl}setAngleTimes(e){this._angleTimes=e,this._initialized=!1}getAngleTimes(){return this._angleTimes}setScaleTimes(e){this._scaleTimes=e,this._initialized=!1}getScaleTimes(){return this._scaleTimes}setAngleLoop(e){this._angleLoop=e,this._initialized=!1}getAngleLoop(){return this._angleLoop}setScaleLoop(e){this._scaleLoop=e,this._initialized=!1}getScaleLoop(){return this._scaleLoop}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._dynamicModel)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0x2887b9.calcControlPosMatrix(e,this._pntOffset,null);WebGLPlot$f.defined(t)&&(this._dynamicModel.modelMatrix=t)}e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()||this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)&&(this._initialized=!1)}this._geoEntityParameter=e}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("dynamicModelUrl")||(e.dynamicModelUrl=this._dynamicModelUrl);let t=[];if(!e.hasOwnProperty("angleTimes")){e.angleTimes=t;for(var i=0;i<this._angleTimes.length;i++)!e.angleTimes.hasOwnProperty("time")&&!e.angleTimes.hasOwnProperty("start")&&!e.angleTimes.hasOwnProperty("end")&&!e.angleTimes.hasOwnProperty("isloop")&&e.angleTimes.push({time:this._angleTimes[i].time,start:this._angleTimes[i].start,end:this._angleTimes[i].end,isloop:this._angleTimes[i].isloop})}let n=[];if(!e.hasOwnProperty("scaleTimes")){e.scaleTimes=n;for(i=0;i<this._scaleTimes.length;i++)!e.scaleTimes.hasOwnProperty("time")&&!e.scaleTimes.hasOwnProperty("start")&&!e.scaleTimes.hasOwnProperty("end")&&!e.scaleTimes.hasOwnProperty("isloop")&&e.scaleTimes.push({time:this._scaleTimes[i].time,start:this._scaleTimes[i].start,end:this._scaleTimes[i].end,isloop:this._scaleTimes[i].isloop})}return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("angleLoop")||(e.angleLoop=this._angleLoop),e.hasOwnProperty("scaleLoop")||(e.scaleLoop=this._scaleLoop),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);if(WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.angleTimes))for(var i=0;i<t.angleTimes.length;i++)WebGLPlot$f.defined(t.angleTimes[i].time),WebGLPlot$f.defined(t.angleTimes[i].start),WebGLPlot$f.defined(t.angleTimes[i].end),WebGLPlot$f.defined(t.angleTimes[i].isloop)&&this._angleTimes.push({time:t.angleTimes[i].time,start:t.angleTimes[i].start,end:t.angleTimes[i].end,isloop:t.angleTimes[i].isloop});if(WebGLPlot$f.defined(t.scaleTimes))for(i=0;i<t.scaleTimes.length;i++)WebGLPlot$f.defined(t.scaleTimes[i].time),WebGLPlot$f.defined(t.scaleTimes[i].start),WebGLPlot$f.defined(t.scaleTimes[i].end),WebGLPlot$f.defined(t.scaleTimes[i].isloop)&&this._scaleTimes.push({time:t.scaleTimes[i].time,start:t.scaleTimes[i].start,end:t.scaleTimes[i].end,isloop:t.scaleTimes[i].isloop});WebGLPlot$f.defined(t.angleLoop)&&(this._angleLoop=t.angleLoop),WebGLPlot$f.defined(t.scaleLoop)&&(this._scaleLoop=t.scaleLoop)}clone(){let e=new _0x4d608c;return e.name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._initialized=this._initialized,e._dynamicModelUrl=this._dynamicModelUrl,e._angleTimes=this._angleTimes,e._scaleTimes=this._scaleTimes,e._angleLoop=this._angleLoop,e._scaleLoop=this._scaleLoop,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e}_addEffectToScene(e){let t=!1;if(this._dynamicModel=this._createDynamicModel(e),WebGLPlot$f.defined(this._dynamicModel)){e.primitives.add(this._dynamicModel);var i=this._getdata(this._angleTimes,this._scaleTimes);this._startChange(i),t=!0}return t}_startChange(e){var t=new WebGLPlot$f.JulianDate.fromDate(new Date),i=new WebGLPlot$f.JulianDate.fromDate(new Date),n=new WebGLPlot$f.JulianDate.fromDate(new Date),r=t,o=i,a=e.angle.as[0].x,s=e.angle.as[0].y,l=e.angle.as[0].z,u=e.scale.ss[0],c=this._dynamicModel.modelMatrix,h=e.angle.at,d=e.scale.st,f=0,p=0;h.forEach((e=>{f+=e})),d.forEach((e=>{p+=e}));var _=null;_=f>p?f:p;let m=this;this._timer=setInterval((function(){var g=new WebGLPlot$f.JulianDate.fromDate(new Date),x=WebGLPlot$f.JulianDate.secondsDifference(g,r),v=WebGLPlot$f.JulianDate.secondsDifference(g,o),y=WebGLPlot$f.JulianDate.secondsDifference(g,t),$=WebGLPlot$f.JulianDate.secondsDifference(g,i),b=WebGLPlot$f.JulianDate.secondsDifference(g,n),T=m._findIndex(y,h),C=m._findIndex($,d),S=1e3*x,w=1e3*v;r=g,o=g;var E=m._dynamicModel.modelMatrix;if(y<=f){let t=S*e.angleVX[T],i=S*e.angleVY[T],n=S*e.angleVZ[T];a+=t,s+=i,l+=n;const r=WebGLPlot$f.HeadingPitchRoll.fromDegrees(l,a,s,new WebGLPlot$f.HeadingPitchRoll),o=WebGLPlot$f.Matrix4.getTranslation(E,new WebGLPlot$f.Cartesian3);let u=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west");E=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(o,r,WebGLPlot$f.Ellipsoid.WGS84,u)}if(y<=f)try{WebGLPlot$f.defined(E)&&(m._dynamicModel.modelMatrix=E)}catch(e){console.log(e)}if($<=p)try{u+=w*e.scaleVS[C],m._dynamicModel.scale=u}catch(e){console.log(e)}if(b>_){if(m._angleLoop){t=WebGLPlot$f.JulianDate.fromDate(new Date),r=t;try{m._dynamicModel.modelMatrix=c,a=e.angle.as[0].x,s=e.angle.as[0].y,l=e.angle.as[0].z}catch(e){console.log(e)}}if(m._scaleLoop){i=WebGLPlot$f.JulianDate.fromDate(new Date),o=i;try{m._dynamicModel.scale=e.scale.ss[0],u=e.scale.ss[0]}catch(e){console.log(e)}}(m._angleLoop||m._scaleLoop)&&(n=WebGLPlot$f.JulianDate.fromDate(new Date)),!m._angleLoop&&!m._scaleLoop&&clearInterval(m._timer)}}),m._gapTime)}_getdata(e,t){for(var i=[],n=[],r=[],o=[],a=[],s=[],l=[],u=[],c=0;c<e.length;c++)i.push(e[c].time),n.push(e[c].start),r.push(e[c].end),o.push(e[c].isloop);for(c=0;c<t.length;c++)a.push(t[c].time),s.push(t[c].start),l.push(t[c].end),u.push(t[c].isloop);var h=[],d=[],f=[],p=[];for(c=0;c<i.length;c++){var _=this._calspeed(i[c],n[c].x,r[c].x),m=this._calspeed(i[c],n[c].y,r[c].y),g=this._calspeed(i[c],n[c].z,r[c].z);h.push(_),d.push(m),f.push(g)}for(c=0;c<a.length;c++){var x=this._calspeed(a[c],s[c],l[c]);p.push(x)}return{angle:{at:i,as:n,ae:r,al:o},scale:{st:a,ss:s,se:l,sl:u},angleVX:h,angleVY:d,angleVZ:f,scaleVS:p}}_calspeed(e,t,i){return(i-t)/(e*=1e3)}_findIndex(e,t){for(var i=[],n=0,r=0;r<t.length;r++)n+=t[r],i.push(n);var o=0;for(r=0;r<i.length;r++)if(e<i[r]){o=r;break}return o}_removeEffectFromScene(e){WebGLPlot$f.defined(this._timer)&&clearInterval(this._timer),WebGLPlot$f.defined(this._dynamicModel)&&e.primitives.contains(this._dynamicModel)&&e.primitives.remove(this._dynamicModel),this._dynamicModel=null}_createDynamicModel(){if(!(WebGLPlot$f.defined(this._geoEntityParameter)&&WebGLPlot$f.defined(this._pntOffset)&&WebGLPlot$f.defined(this._angleTimes)&&WebGLPlot$f.defined(this._scaleTimes)))return null;var e=_0x2887b9.calcControlPosMatrix(this._geoEntityParameter,this._pntOffset,scene);return WebGLPlot$f.defined(e)?new WebGLPlot$f.Model.fromGltf({url:this._dynamicModelUrl,modelMatrix:e,allowPicking:!0}):null}}const _0x4c6403=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x23b9eb=_0x4c6403(void 0,(function(){return _0x23b9eb.toString().search("(((.+)+)+)+$").toString().constructor(_0x23b9eb).search("(((.+)+)+)+$")}));_0x23b9eb();const _0xa62790={AXES:0,STREAMER:1,WALL:2};var _0x31475a=Object.freeze(_0xa62790);const _0x37b2de=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x498bd3=_0x37b2de(void 0,(function(){return _0x498bd3.toString().search("(((.+)+)+)+$").toString().constructor(_0x498bd3).search("(((.+)+)+)+$")}));_0x498bd3();class _0x21af16 extends _0x46eece{constructor(e){super(e),e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._UUID="GeoEntityEffectTrackline"+WebGLPlot.createGuid(),this._pntOffset=WebGLPlot.defaultValue(e.pntOffset,new _0x11ff81(0,-.5,.5)),this._type=_0x3b1c90.TRACKLINE,this._name=WebGLPlot.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._trackType=_0x31475a.AXES,this._initialColor=WebGLPlot.defaultValue(e.initialColor,WebGLPlot.Color.RED),this._lineWidth=WebGLPlot.defaultValue(e.lineWidth,1),this._streamerWidth=WebGLPlot.defaultValue(e.streamerWidth,1),this._showPntCount=WebGLPlot.defaultValue(e.showPntCount,500),this._aryGradientColors=WebGLPlot.defaultValue(e.aryGradientColors,[]),this._pntsTmp=[],this._wallCollection=null,this._polylineCollection=null,this._polygonCollection=null,this._appearance=new WebGLPlot.PerInstanceColorAppearance}setTrackType(e){this._trackType!==e&&(this._trackType=e,this._initialized=!1)}getTrackType(){return this._trackType}setTrackColor(e){this._initialColor=e}getTrackColor(){return this._initialColor}setLineWidth(e){this._lineWidth!==e&&(this._lineWidth=e,this._initialized=!1)}getLineWidth(){return this._lineWidth}setStreamerWidth(e){this._streamerWidth!==e&&(this._streamerWidth=e,this._initialized=!1)}getStreamerWidth(){return this._streamerWidth}setShowPntCount(e){this._showPntCount=e}getShowPntCount(){return this._showPntCount}setGradients(e){this._aryGradientColors=e}getGradients(){return this._aryGradientColors}setGeoEntityParameter(e,t){WebGLPlot.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(e.getPosition())&&this._updateTrack(e),this._geoEntityParameter=e}_addEffectToScene(e){this._polylineCollection=new WebGLPlot.PolylineCollection,e.primitives.add(this._polylineCollection),this._wallCollection=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._wallCollection),this._polygonCollection=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._polygonCollection);let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);return WebGLPlot.defined(t)}_removeEffectFromScene(e){WebGLPlot.defined(this._polylineCollection)&&this._polylineCollection.removeAll(),WebGLPlot.defined(this._wallCollection)&&this._wallCollection.removeAll(),WebGLPlot.defined(this._polygonCollection)&&this._polygonCollection.removeAll(),this._pntsTmp=[]}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("trackType")||(e.trackType=this._trackType),e.hasOwnProperty("initialColor")||(e.initialColor=this._initialColor.toCssColorString()),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("streamerWidth")||(e.streamerWidth=this._streamerWidth),e.hasOwnProperty("showPntCount")||(e.showPntCount=this._showPntCount),e.hasOwnProperty("aryGradientColors")||(e.aryGradientColors=[],this._aryGradientColors.forEach((t=>{e.aryGradientColors.push(t.toCssColorString())}))),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),WebGLPlot.toJSON(e)}fromJSON(e){if(!WebGLPlot.defined(e))return;let t=JSON.parse(e);WebGLPlot.defined(t.type)&&(this._type=t.type),WebGLPlot.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot.defined(t.name)&&(this._name=t.name),WebGLPlot.defined(t.trackType)&&(this._trackType=t.trackType),WebGLPlot.defined(t.initialColor)&&(this._initialColor=WebGLPlot.Color.fromCssColorString(t.initialColor)),WebGLPlot.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot.defined(t.streamerWidth)&&(this._streamerWidth=t.streamerWidth),WebGLPlot.defined(t.showPntCount)&&(this._showPntCount=t.showPntCount),WebGLPlot.defined(t.aryGradientColors)&&(this._aryGradientColors=[],t.aryGradientColors.forEach((e=>{this._aryGradientColors.push(WebGLPlot.Color.fromCssColorString(e))}))),WebGLPlot.defined(t.visible)&&(this._visible=t.visible),WebGLPlot.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot.defined(t.offset)&&(WebGLPlot.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x21af16;return e._name=this._name,e._type=this._type,e._trackType=this._trackType,e._initialColor=this._initialColor.clone(),e._lineWidth=this._lineWidth,e._streamerWidth=this._streamerWidth,e._showPntCount=this._showPntCount,e._aryGradientColors=this._aryGradientColors,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_updateTrack(e){this._trackType===_0x31475a.AXES?this._updateTrackLine(e):this._trackType===_0x31475a.STREAMER?this._updateTrackStreamer(e):this._trackType===_0x31475a.WALL&&this._updateTrackWall(e)}_updateTrackLine(e){if(0==e.getModelScale())return;let t=_0x2887b9.degreesToCartesian3(_0x2887b9.calcControlPoint(e,this._pntOffset,this._scene));if(0===this._pntsTmp.length)this._pntsTmp.push(t);else if(1===this._pntsTmp.length){let e=[];e.push(this._pntsTmp[0]),e.push(t),this._polylineCollection.add({positions:e,width:this._lineWidth,material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}})}),this._pntsTmp.push(t)}else{let e=[];for(e.push(this._pntsTmp[1]),e.push(t),this._polylineCollection.add({positions:e,width:this._lineWidth,material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}})}),this._pntsTmp[1]=t;this._polylineCollection.length>this._showPntCount&&this._showPntCount>0;)this._polylineCollection.remove(this._polylineCollection.get(0));for(let e=0,t=0;e<this._polylineCollection.length;e++,t++){let i=(t+1)/this._polylineCollection.length,n=this._calcGradientColor(i),r=this._polylineCollection.get(e);null!=r&&(r.material.uniforms.color=n)}}}_updateTrackStreamer(e){let t=this._streamerWidth/2,i=new _0x11ff81(this._pntOffset.x-t,this._pntOffset.y,this._pntOffset.z),n=new _0x11ff81(this._pntOffset.x+t,this._pntOffset.y,this._pntOffset.z),r=_0x2887b9.calcControlPoint(e,i,this._scene),o=_0x2887b9.calcControlPoint(e,n,this._scene);if(!WebGLPlot.defined(r)||!WebGLPlot.defined(o))return;let a=_0x2887b9.degreesToCartesian3(r),s=_0x2887b9.degreesToCartesian3(o);if(0===this._pntsTmp.length)this._pntsTmp.push(a),this._pntsTmp.push(s);else if(2===this._pntsTmp.length){let e=[];e.push(this._pntsTmp[0]),e.push(a),e.push(s),e.push(this._pntsTmp[1]),e.push(this._pntsTmp[0]),this._polygonCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(e),perPositionHeight:!0}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp.push(a),this._pntsTmp.push(s)}else{let e=[];for(e.push(this._pntsTmp[2]),e.push(a),e.push(s),e.push(this._pntsTmp[3]),e.push(this._pntsTmp[2]),this._polygonCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(e),perPositionHeight:!0}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp[2]=a,this._pntsTmp[3]=s;this._polygonCollection.length>this._showPntCount&&this._showPntCount>0;)this._polygonCollection.remove(this._polygonCollection.get(0));for(let e=0,t=0;e<this._polygonCollection.length;e++,t++){let i=(t+1)/this._polygonCollection.length,n=this._calcGradientColor(i),r=this._polygonCollection.get(e);null!=r&&(r.appearance.material.uniforms.color=n)}}}_updateTrackWall(e){let t=_0x2887b9.degreesToCartesian3(e.getPosition());if(0===this._pntsTmp.length)this._pntsTmp.push(t);else if(1===this._pntsTmp.length){let e=[];e.push(this._pntsTmp[0]),e.push(t),this._wallCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.WallGeometry({positions:e}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp.push(t)}else{let e=[];for(e.push(this._pntsTmp[1]),e.push(t),this._wallCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.WallGeometry({positions:e}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp[1]=t;this._wallCollection.length>this._showPntCount&&this._showPntCount>0;)this._wallCollection.remove(this._wallCollection.get(0));for(let e=0,t=0;e<this._wallCollection.length;e++,t++){let i=(t+1)/this._wallCollection.length,n=this._calcGradientColor(i),r=this._wallCollection.get(e);null!=r&&(r.appearance.material.uniforms.color=n)}}}_calcGradientColor(e){let t=this._initialColor;if(this._aryGradientColors.length>0){let i=this._aryGradientColors.slice().reverse(),n=i.length-1,r=1;for(;r/n<=e&&r<n;)r++;let o=r-1,a=o/n,s=i[o],l=i[o+1];if(e===a)t=new WebGLPlot.Color(s.r,s.g,s.b,s.a);else{let i=(e-a)*n,r=s.red+(l.red-s.red)*i,o=s.green+(l.green-s.green)*i,u=s.blue+(l.blue-s.blue)*i,c=s.alpha+(l.alpha-s.alpha)*i;t=new WebGLPlot.Color(r,o,u,c)}}return t}}const _0x393901=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5d7aeb=_0x393901(void 0,(function(){return _0x5d7aeb.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d7aeb).search("(((.+)+)+)+$")}));_0x5d7aeb();class _0x2c1685 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.ATTACKLINE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAttackline"+WebGLPlot$f.createGuid(),this._visible=WebGLPlot$f.defaultValue(e.visible,!0),this._pathInfo=WebGLPlot$f.defaultValue(e.pathInfo,[{totalLengthProportion:.3,relativeHeight:200},{totalLengthProportion:.5,relativeHeight:100},{totalLengthProportion:.7,relativeHeight:300}]),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,-.5,.5)),WebGLPlot$f.defined(e.start)&&(this._start=new WebGLPlot$f.Cartesian3.fromDegrees(e.start.x,e.start.y,e.start.z)),WebGLPlot$f.defined(e.target)&&(this._target=new WebGLPlot$f.Cartesian3.fromDegrees(e.target.x,e.target.y,e.target.z)),this._attactModelPath=WebGLPlot$f.defaultValue(e.attactModelPath,""),this._attactModelScale=WebGLPlot$f.defaultValue(e.attactModelScale,40),this._during=WebGLPlot$f.defaultValue(e.during,5),this._lineWide=WebGLPlot$f.defaultValue(e.lineWide,1),this._lineColor=WebGLPlot$f.defaultValue(e.lineColor,new WebGLPlot$f.Color(0,255,0)),this._Attackline=void 0,this._modelLinePrimitice=void 0,this._ispause=!1,this._isBack=!1,this._isForward=!1,this._isRewind=!1}setPathInfo(e){this._pathInfo=e,this._initialized=!1}getPathInfo(){return this._pathInfo}setStartpoint(e){this._start=e,this._initialized=!1}getStartpoint(){return _0x2887b9.cartesian3ToDegrees(this._start)}setTargetpoint(e){this._target=e,this._initialized=!1}getTargetpoint(){return _0x2887b9.cartesian3ToDegrees(this._target)}setAttactModelPath(e){this._attactModelPath=decodeURI(e),this._initialized=!1}getAttactModelPath(){return this._attactModelPath}setAttactModelScale(e){this._attactModelScale=e,this._initialized=!1}getAttactModelScale(){return this._attactModelScale}setDuring(e){this._during=e,this._initialized=!1}getDuring(){return this._during}setLineWide(e){this._lineWide=e,this._initialized=!1}getLineWide(){return this._lineWide}setLineColor(e){this._lineColor=e,this._initialized=!1}getLineColor(){return this._lineColor}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible);let t=[];if(!e.hasOwnProperty("pathInfo")){e.pathInfo=t;for(var i=0;i<this._pathInfo.length;i++)!e.pathInfo.hasOwnProperty("totalLengthProportion")&&!e.pathInfo.hasOwnProperty("relativeHeight")&&e.pathInfo.push({totalLengthProportion:this._pathInfo[i].totalLengthProportion,relativeHeight:this._pathInfo[i].relativeHeight})}return e.hasOwnProperty("start")||(e.start=this._start),e.hasOwnProperty("target")||(e.target=this._target),e.hasOwnProperty("attactModelPath")||(e.attactModelPath=this._attactModelPath),e.hasOwnProperty("attactModelScale")||(e.attactModelScale=this._attactModelScale),e.hasOwnProperty("during")||(e.during=this._during),e.hasOwnProperty("lineWide")||(e.lineWide=this._lineWide),e.hasOwnProperty("lineColor")||(e.lineColor=_0x2887b9.colorToObject(this._lineColor)),WebGLPlot$f.toJSON(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);if(WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),this._pathInfo=[],WebGLPlot$f.defined(t.pathInfo))for(var i=0;i<t.pathInfo.length;i++)WebGLPlot$f.defined(t.pathInfo[i].totalLengthProportion),WebGLPlot$f.defined(t.pathInfo[i].relativeHeight)&&this._pathInfo.push({totalLengthProportion:t.pathInfo[i].totalLengthProportion,relativeHeight:t.pathInfo[i].relativeHeight});WebGLPlot$f.defined(t.start)&&(this._start=t.start),WebGLPlot$f.defined(t.target)&&(this._target=t.target),WebGLPlot$f.defined(t.attactModelPath)&&(this._attactModelPath=t.attactModelPath),WebGLPlot$f.defined(t.attactModelScale)&&(this._attactModelScale=t.attactModelScale),WebGLPlot$f.defined(t.during)&&(this._during=t.during),WebGLPlot$f.defined(t.lineWide)&&(this._lineWide=t.lineWide),WebGLPlot$f.defined(t.lineColor)&&(this._lineColor=_0x2887b9.objectToColor(t.lineColor))}clone(){let e=new _0x2c1685;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pathInfo=this._pathInfo,e._start=this._start,e._target=this._target,e._attactModelPath=this._attactModelPath,e._attactModelScale=this._attactModelScale,e._during=this._during,e._lineWide=this._lineWide,e._lineColor=this._lineColor.clone(),e._initialized=this._initialized,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e}_addEffectToScene(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return!1;let t=!1,i=this._createAttackline(e);if(!WebGLPlot$f.defined(i))return!1;if(this._Attackline=i,WebGLPlot$f.defined(this._Attackline)){var n=this._start,r=this._target,o=this._pathInfo,a=this._during,s=this._calPoints(n,r,o),l=this._createCurve3D(s),u=this._getAllDistance(l.curvePath3D)/(1e3*a),c=WebGLPlot$f.JulianDate.fromDate(new Date),h=0,d=new WebGLPlot$f.HeadingPitchRoll,f=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west"),p=this._lineColor,_=this._lineWide;this._modelLinePrimitice=e.primitives.add(new WebGLPlot$f.PolylineCollection);var m=l.curvePath3D[0],g=WebGLPlot$f.Cartographic.fromCartesian(m),x=WebGLPlot$f.CesiumMath.toDegrees(g.longitude),v=WebGLPlot$f.CesiumMath.toDegrees(g.latitude),y=g.height;m=[{lon:x,lat:v,height:y}];var $=this;this._ispause,this._isBack,this._isBack,this._isRewind,setInterval((function(){var e,t=WebGLPlot$f.JulianDate.fromDate(new Date),i=1e3*(t.secondsOfDay-c.secondsOfDay);if(c=t,$._ispause)return;e=$._isBack?-u:u,$._isForward&&(h+=2e3*e*1),$._isRewind&&(h-=2e3*e*1);var n=h+i*e*1;h=n;var r=_0x2887b9.getPositionByDistance(l.curvePath3D,n);let o=r.index;if(!(o>=l.curvePath3D.length||-1==o)){if(o<l.curvePath3D.length-1){var a=l.curvePath3D[o+1];const e=$._getHeading(l.curvePath3D[o],a);e&&(d.heading=e);const t=$._getPitch(l.curvePath3D[o],a);t&&(d.pitch=t)}var s=WebGLPlot$f.Cartographic.fromCartesian(r.point),g=[{lon:WebGLPlot$f.CesiumMath.toDegrees(s.longitude),lat:WebGLPlot$f.CesiumMath.toDegrees(s.latitude),height:s.height}],x=new WebGLPlot$f.Cartesian3.fromDegreesArrayHeights([m[0].lon,m[0].lat,m[0].height,g[0].lon,g[0].lat,g[0].height]),v=new WebGLPlot$f.Matrix4;WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(r.point,d,WebGLPlot$f.Ellipsoid.WGS84,f,v);var y=WebGLPlot$f.Matrix3.fromRotationZ(WebGLPlot$f.CesiumMath.toRadians(180));v=WebGLPlot$f.Matrix4.multiplyByMatrix3(v,y,new WebGLPlot$f.Matrix4),WebGLPlot$f.defined(v)&&WebGLPlot$f.defined($._Attackline)&&($._Attackline.modelMatrix=v,$._modelLinePrimitice.add({positions:x,width:_,material:new WebGLPlot$f.Material.fromType("Color",{color:p})})),m=g}}),30),t=!0}return t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._Attackline)&&WebGLPlot$f.defined(this._modelLinePrimitice)&&(e.primitives.contains(this._Attackline)&&(e.primitives.remove(this._Attackline),this._Attackline=null),e.primitives.contains(this._modelLinePrimitice)&&(e.primitives.remove(this._modelLinePrimitice),this._modelLinePrimitice=null))}setGeoEntityParameter(e,t){this._geoEntityParameter=e}_createAttackline(e){var t,i,n=this._attactModelPath,r=this._pathInfo,o=this._attactModelScale;let a=this._calcControlPoint(this._start,this._geoEntityParameter,this._pntOffset,e),s=this._calcControlPoint(this._target,this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(a)&&!WebGLPlot$f.defined(s))return null;t=_0x2887b9.getPositionFromModelMatrix(a),i=_0x2887b9.getPositionFromModelMatrix(s);var l=this._calPoints(t,i,r),u=this._createCurve3D(l),c=new WebGLPlot$f.HeadingPitchRoll;const h=this._getHeading(u.curvePath3D[0],u.curvePath3D[1]);h&&(c.heading=h);const d=this._getPitch(u.curvePath3D[0],u.curvePath3D[1]);d&&(c.pitch=d);var f=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west"),p=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(u.curvePath3D[0],c,WebGLPlot$f.Ellipsoid.WGS84,f);return viewer.scene.primitives.add(WebGLPlot$f.Model.fromGltf({url:n,scale:o,modelMatrix:p}))}_calPoints(e,t,i){var n=[];n.push(e);for(var r=e.x-t.x,o=e.y-t.y,a=e.z-t.z,s=0;s<i.length;s++){var l=i[s].totalLengthProportion,u=new WebGLPlot$f.Cartesian3(e.x-r*l,e.y-o*l,e.z-a*l+i[s].relativeHeight);n.push(u)}return n.push(t),n}_getHeading(e,t){let i=WebGLPlot$f.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$f.Cartesian3.subtract(t,e,new Cesium.Cartesian3),r=WebGLPlot$f.Matrix4.multiplyByPointAsVector(WebGLPlot$f.Matrix4.inverse(i,new WebGLPlot$f.Matrix4),n,new WebGLPlot$f.Cartesian3),o=WebGLPlot$f.Cartesian3.normalize(r,new WebGLPlot$f.Cartesian3),a=Math.atan2(o.y,o.x)-WebGLPlot$f.CesiumMath.PI_OVER_TWO;return WebGLPlot$f.CesiumMath.TWO_PI-WebGLPlot$f.CesiumMath.zeroToTwoPi(a)}_getPitch(e,t){let i=WebGLPlot$f.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$f.Cartesian3.subtract(t,e,new WebGLPlot$f.Cartesian3),r=WebGLPlot$f.Matrix4.multiplyByPointAsVector(WebGLPlot$f.Matrix4.inverse(i,i),n,n);return WebGLPlot$f.Cartesian3.normalize(r,r),WebGLPlot$f.CesiumMath.PI_OVER_TWO-WebGLPlot$f.CesiumMath.acosClamped(r.z)}_getAllDistance(e){let t=0;for(let i=0;i<e.length-1;i++){let n=e[i],r=e[i+1];t+=WebGLPlot$f.Cartesian3.distance(n,r)}return t}_createCurve3D(e){let t=this._getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$f.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new WebGLPlot$f.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_calcControlPoint(e,t,i,n){const r=t.getModelRotate(),o=WebGLPlot$f.HeadingPitchRoll.fromDegrees(r.z,r.x,r.y,new WebGLPlot$f.HeadingPitchRoll),a=_0x2887b9.degreesToCartesian3(e);let s=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west");const l=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(a,o,WebGLPlot$f.Ellipsoid.WGS84,s),u=t.getModelScale(),c=t.getModelPath(),h=_0x2887b9.getModelSize({modelPath:c,scene:n});if(!WebGLPlot$f.defined(h))return null;const d=WebGLPlot$f.Cartesian3.fromElements(h.x*i.x*u,h.y*i.y*u,h.z*i.z*u),f=WebGLPlot$f.Matrix4.multiplyByTranslation(l,d,new WebGLPlot$f.Matrix4),p=WebGLPlot$f.HeadingPitchRoll.fromDegrees(0,90,0,new WebGLPlot$f.HeadingPitchRoll),_=WebGLPlot$f.Matrix3.fromHeadingPitchRoll(p,new WebGLPlot$f.Matrix3);return WebGLPlot$f.Matrix4.multiplyByMatrix3(f,_,new WebGLPlot$f.Matrix4)}}const _0x41f0fe=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x15fc89=_0x41f0fe(void 0,(function(){return _0x15fc89.toString().search("(((.+)+)+)+$").toString().constructor(_0x15fc89).search("(((.+)+)+)+$")}));_0x15fc89();const _0x8b0bf2={ColorMode:0,TextureMode:1};var _0x4ca362=Object.freeze(_0x8b0bf2);const _0x318a1f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4a6883=_0x318a1f(void 0,(function(){return _0x4a6883.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a6883).search("(((.+)+)+)+$")}));_0x4a6883();class _0x3fbded extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._UUID="GeoEntityEffectScanWave_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new WebGLPlot$f.Cartesian3(0,.5,.5)),this._type=WebGLPlot$f.defaultValue(e.type,_0x3b1c90.SCANWAVE),this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._length=WebGLPlot$f.defaultValue(e.length,15),this._width=WebGLPlot$f.defaultValue(e.width,5),this._height=WebGLPlot$f.defaultValue(e.height,3),this._scanAngle=WebGLPlot$f.defaultValue(e.scanAngle,30),this._sectionSlices=WebGLPlot$f.defaultValue(e.sectionSlices,360),this._initRotate=WebGLPlot$f.defaultValue(e.initRotate,new WebGLPlot$f.Cartesian3(90,0,0)),this._repeatCount=WebGLPlot$f.defaultValue(e.repeatCount,8),this._flowSpeed=WebGLPlot$f.defaultValue(e.flowSpeed,3),this._scanAxis=WebGLPlot$f.defaultValue(e.scanAxis,0),this._scanSpeed=WebGLPlot$f.defaultValue(e.scanSpeed,.5),this._picturePath=WebGLPlot$f.defaultValue(e.picturePath,""),this._pictureColorScale=WebGLPlot$f.defaultValue(e.pictureColorScale,5),this._colorBack=WebGLPlot$f.defaultValue(e.colorBack,new WebGLPlot$f.Color(0,1,0,.3)),this._colorBackScale=WebGLPlot$f.defaultValue(e.colorBackScale,1),this._colorForward=WebGLPlot$f.defaultValue(e.colorForward,new WebGLPlot$f.Color(1,1,0,1)),this._colorForwardScale=WebGLPlot$f.defaultValue(e.colorForwardScale,5),this._colorForwardLengthRatio=WebGLPlot$f.defaultValue(e.colorForwardLengthRatio,.08),this._sectionAngle=WebGLPlot$f.defaultValue(e.sectionAngle,360),this._mode=WebGLPlot$f.defaultValue(e.mode,_0x4ca362.ColorMode),this._scanWavePrimitive=void 0,this._currentRotateDirection=1,this._currentRotateDirectionAngle=0}getLength(){return this._length}setLength(e){this._length=e,this._initialized=!1}getWidth(){return this._width}setWidth(e){this._width=e,this._initialized=!1}getHeight(){return this._height}setHeight(e){this._height=e,this._initialized=!1}getScanAngle(){return this._scanAngle}setScanAngle(e){this._scanAngle=e}getSectionSlices(){return this._sectionSlices}setSectionSlices(e){this._sectionSlices=e,this._initialized=!1}getInitRotate(){return this._initRotate}setInitRotate(e){this._initRotate=e,this._initialized=!1}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getFlowSpeed(){return this._flowSpeed}setFlowSpeed(e){this._flowSpeed=e,this._initialized=!1}getScanAxis(){return this._scanAxis}setScanAxis(e){this._scanAxis=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getPicturePath(){return this._picturePath}setPicturePath(e){this._picturePath=e,this._initialized=!1}getPictureColorScale(){return this._pictureColorScale}setPictureColorScale(e){this._pictureColorScale=e,this._initialized=!1}getColorBack(){return this._colorBack}setColorBack(e){this._colorBack=e,this._initialized=!1}getColorBackScale(){return this._colorBackScale}setColorBackScale(e){this._colorBackScale=e,this._initialized=!1}getColorForward(){return this._colorForward}setColorForward(e){this._colorForward=e,this._initialized=!1}getColorForwardScale(){return this._colorForwardScale}setColorForwardScale(e){this._colorForwardScale=e,this._initialized=!1}getColorForwardLengthRatio(){return this._colorForwardLengthRatio}setColorForwardLengthRatio(e){this._colorForwardLengthRatio=e,this._initialized=!1}getSectionAngle(){return this._sectionAngle}setSectionAngle(e){this._sectionAngle=e,this._initialized=!1}getMode(){return this._mode}setMode(e){this._mode=e,this._initialized=!1}_addEffectToScene(e){let t=!1;return this._scanWavePrimitive=this._createScanWavePrimitive(e),WebGLPlot$f.defined(this._scanWavePrimitive)&&(e.primitives.add(this._scanWavePrimitive),t=!0),t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._scanWavePrimitive)&&e.primitives.contains(this._scanWavePrimitive)&&e.primitives.remove(this._scanWavePrimitive),this._scanWavePrimitive=void 0}_executeFunction(e){if(!WebGLPlot$f.defined(this._scanWavePrimitive)||!this._visible||this._scanAngle<=0)return;let t=this._scanAngle/2;(this._currentRotateDirectionAngle>t||this._currentRotateDirectionAngle<-t)&&(this._currentRotateDirection=-this._currentRotateDirection);let i=this._scanSpeed*this._currentRotateDirection;this._currentRotateDirectionAngle+=i;let n=this._getRotateMatrix(i);this._scanWavePrimitive.modelMatrix=WebGLPlot$f.Matrix4.multiplyByMatrix3(this._scanWavePrimitive.modelMatrix,n,new WebGLPlot$f.Matrix4)}_getRotateMatrix(e){let t;return 0===this._scanAxis?t=WebGLPlot$f.Matrix3.fromRotationX(WebGLPlot$f.CesiumMath.toRadians(e)):1===this._scanAxis?t=WebGLPlot$f.Matrix3.fromRotationY(WebGLPlot$f.CesiumMath.toRadians(e)):2===this._scanAxis&&(t=WebGLPlot$f.Matrix3.fromRotationZ(WebGLPlot$f.CesiumMath.toRadians(e))),t}_createScanWavePrimitive(e){this._currentRotateDirection=1,this._currentRotateDirectionAngle=0;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=this._generateGeometry();if(!WebGLPlot$f.defined(i))return;let n,r="";r=this._mode===_0x4ca362.ColorMode?" uniform vec4 colorForward; uniform float colorForwardScale; uniform vec4 colorBack; uniform float colorBackScale; uniform float repeat; uniform float flowSpeed; uniform float colorForwardLengthRatio; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); float sp = 1.0 / repeat; float dis = materialInput.st.t; float m = mod(dis - fract(czm_frameNumber * 0.001 * flowSpeed), sp); if(m <= sp * colorForwardLengthRatio){ material.diffuse = colorForward.rgb * colorForwardScale; material.alpha = colorForward.a; } else { material.diffuse = colorBack.rgb * colorBackScale; material.alpha = colorBack.a; } return material; }":" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }",n=this._mode===_0x4ca362.ColorMode?new WebGLPlot$f.Material({fabric:{uniforms:{colorForward:this._colorForward,colorForwardScale:this._colorForwardScale,colorBack:this._colorBack,colorBackScale:this._colorBackScale,repeat:this._repeatCount,flowSpeed:this._flowSpeed,colorForwardLengthRatio:this._colorForwardLengthRatio},source:r},translucent:!0}):new WebGLPlot$f.Material({fabric:{uniforms:{picture:this._picturePath,pictureColorScale:this._pictureColorScale,repeat:new WebGLPlot$f.Cartesian2(1,this._repeatCount),flowSpeed:this._flowSpeed},source:r},translucent:!0});let o=e.frameState;o.scene3DOnly=!0;let a=new WebGLPlot$f.MaterialAppearance({material:n,faceForward:!1,closed:!0,frameState:o});return new WebGLPlot$f.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$f.GeometryInstance({geometry:i}),asynchronous:!1,appearance:a,modelMatrix:t})}_generateGeometry(){let e=this._sectionSlices,t=new Array(3*(e+1)),i=this._sectionAngle/e;for(let n=0;n<e+1;n++)if(0==n)t[3*n]=0,t[3*n+1]=0,t[3*n+2]=0;else{let e=_0x2887b9.circlePoint(new WebGLPlot$f.Cartesian2(0,0),this._height,this._width,i*n);t[3*n]=e.x,t[3*n+1]=e.y,t[3*n+2]=-this._length}let n=new Float64Array(t),r=WebGLPlot$f.BoundingSphere.fromVertices(t),o=new Array(3*e);for(let t=0;t<e;t++)t==e-1?(o[3*t]=0,o[3*t+1]=t+1,o[3*t+2]=1):(o[3*t]=0,o[3*t+1]=t+1,o[3*t+2]=t+2);this._sectionAngle<360&&o.splice(o.length-3,3);let a=new Uint16Array(o),s=new Array(4*(e+1));for(let t=0;t<e+1;t++)s[4*t]=1,s[4*t+1]=1,s[4*t+2]=1,s[4*t+3]=1;let l=new Array(2*(e+1));if(this._mode===_0x4ca362.ColorMode)for(let t=0;t<e+1;t++)0==t?(l[2*t]=0,l[2*t+1]=0):(l[2*t]=0,l[2*t+1]=1);else for(let t=0;t<e+1;t++)0==t?(l[2*t]=.5,l[2*t+1]=0):(l[2*t]=1/e/2+1/e*(t-1),l[2*t+1]=1);let u=new WebGLPlot$f.GeometryAttributes;return u.position=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n}),u.color=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:new Float32Array(s)}),u.st=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(l)}),new WebGLPlot$f.Geometry({attributes:u,indices:a,primitiveType:WebGLPlot$f.PrimitiveType.TRIANGLES,boundingSphere:r})}_calcModelMatrix(e,t){let i=WebGLPlot$f.Matrix3.fromRotationX(WebGLPlot$f.CesiumMath.toRadians(t.x));return e=WebGLPlot$f.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$f.Matrix4),i=WebGLPlot$f.Matrix3.fromRotationY(WebGLPlot$f.CesiumMath.toRadians(t.y)),e=WebGLPlot$f.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$f.Matrix4),i=WebGLPlot$f.Matrix3.fromRotationZ(WebGLPlot$f.CesiumMath.toRadians(t.z)),e=WebGLPlot$f.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$f.Matrix4)}_calcControlPoint(e,t,i){const n=_0x2887b9.calcControlPosMatrix(e,t,i);if(!WebGLPlot$f.defined(n))return null;const r=WebGLPlot$f.HeadingPitchRoll.fromDegrees(this._initRotate.z,this._initRotate.x,this._initRotate.y,new WebGLPlot$f.HeadingPitchRoll),o=WebGLPlot$f.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$f.Matrix3);return WebGLPlot$f.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$f.Matrix4)}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._scanWavePrimitive)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);if(WebGLPlot$f.defined(t)){let e=this._getRotateMatrix(this._currentRotateDirectionAngle);this._scanWavePrimitive.modelMatrix=WebGLPlot$f.Matrix4.multiplyByMatrix3(t,e,new WebGLPlot$f.Matrix4)}}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._length*=t,this._width*=t,this._height*=t,this._initialized=!1}}this._geoEntityParameter=e}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("length")||(e.length=this._length),e.hasOwnProperty("width")||(e.width=this._width),e.hasOwnProperty("height")||(e.height=this._height),e.hasOwnProperty("scanAngle")||(e.scanAngle=this._scanAngle),e.hasOwnProperty("sectionSlices")||(e.sectionSlices=this._sectionAngle),e.hasOwnProperty("initRotate")||(e.initRotate={x:this._initRotate.x,y:this._initRotate.y,z:this._initRotate.z}),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("flowSpeed")||(e.flowSpeed=this._flowSpeed),e.hasOwnProperty("scanAxis")||(e.scanAxis=this._scanAxis),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("picturePath")||(e._picturePath=this._picturePath),e.hasOwnProperty("pictureColorScale")||(e.pictureColorScale=this._pictureColorScale),e.hasOwnProperty("colorBack")||(e.colorBack=_0x2887b9.colorToObject(this._colorBack)),e.hasOwnProperty("colorBackScale")||(e.colorBackScale=this._colorBackScale),e.hasOwnProperty("colorForward")||(e.colorForward=_0x2887b9.colorToObject(this._colorForward)),e.hasOwnProperty("colorForwardScale")||(e.colorForwardScale=this._colorForwardScale),e.hasOwnProperty("colorForwardLengthRatio")||(e.colorForwardLengthRatio=this._colorForwardLengthRatio),e.hasOwnProperty("sectionAngle")||(e.sectionAngle=this._sectionAngle),e.hasOwnProperty("mode")||(e.mode=this._mode),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$f.defined(t.length)&&(this._length=t.length),WebGLPlot$f.defined(t.width)&&(this._width=t.width),WebGLPlot$f.defined(t.height)&&(this._height=t.height),WebGLPlot$f.defined(t.scanAngle)&&(this._scanAngle=t.scanAngle),WebGLPlot$f.defined(t.sectionSlices)&&(this._sectionSlices=t.sectionSlices),WebGLPlot$f.defined(t.initRotate)&&(this._initRotate=new WebGLPlot$f.Cartesian3(t.initRotate.x,t.initRotate.y,t.initRotate.z)),WebGLPlot$f.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$f.defined(this.flowSpeed)&&(this._flowSpeed=t.flowSpeed),WebGLPlot$f.defined(t.scanAxis)&&(this._scanAxis=t.scanAxis),WebGLPlot$f.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$f.defined(t.picturePath)&&(this._picturePath=t.picturePath),WebGLPlot$f.defined(t.pictureColorScale)&&(this._pictureColorScale=t.pictureColorScale),WebGLPlot$f.defined(t.colorBack)&&(this._colorBack=_0x2887b9.objectToColor(t.colorBack)),WebGLPlot$f.defined(t.colorBackScale)&&(this._colorBackScale=t.colorBackScale),WebGLPlot$f.defined(t.colorForward)&&(this._colorForward=_0x2887b9.objectToColor(t.colorForward)),WebGLPlot$f.defined(t.colorForwardScale)&&(this._colorForwardScale=t.colorForwardScale),WebGLPlot$f.defined(t.colorForwardLengthRatio)&&(this._colorForwardLengthRatio=t.colorForwardLengthRatio),WebGLPlot$f.defined(t.sectionAngle)&&(this._sectionAngle=t.sectionAngle),WebGLPlot$f.defined(t.mode)&&(this._mode=t.mode)}clone(){let e=new _0x3fbded;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new WebGLPlot$f.Cartesian3(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._length=this._length,e._width=this._width,e._height=this._height,e._scanAngle=this._scanAngle,e._sectionSlices=this._sectionSlices,e._initRotate=this._initRotate,e._repeatCount=this._repeatCount,e._flowSpeed=this._flowSpeed,e._scanAxis=this._scanAxis,e._scanSpeed=this._scanSpeed,e._picturePath=this._picturePath,e._pictureColorScale=this._pictureColorScale,e._colorBack=this._colorBack.clone(),e._colorBackScale=this._colorBackScale,e._colorForward=this._colorForward.clone(),e._colorForwardScale=this._colorForwardScale,e._colorForwardLengthRatio=this._colorForwardLengthRatio,e._sectionAngle=this._sectionAngle,e._mode=this._mode,e}}const _0x293b24=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5c7fbc=_0x293b24(void 0,(function(){return _0x5c7fbc.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c7fbc).search("(((.+)+)+)+$")}));_0x5c7fbc();class _0x318fc4 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.BURST,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectBurst_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,.5)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._burstDiameter=WebGLPlot$f.defaultValue(e.burstDiameter,50),this._paricleBurst=void 0}setBurstDiameter(e){this._burstDiameter=e,this._initialized=!1}getBurstDiameter(){return this._burstDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._paricleBurst)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._paricleBurst.emitterModelMatrix=t)}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._burstDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._paricleBurst=this._createBurstParticle(e),WebGLPlot$f.defined(this._paricleBurst)&&(e.primitives.add(this._paricleBurst),t=!0),t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._paricleBurst)&&e.primitives.contains(this._paricleBurst)&&e.primitives.remove(this._paricleBurst),this._paricleBurst=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("burstDiameter")||(e.burstDiameter=this._burstDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.burstDiameter)&&(this._burstDiameter=t.burstDiameter),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x318fc4;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._burstDiameter=this._burstDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createBurstParticle(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset)||!WebGLPlot$f.defined(this._burstDiameter)||this._burstDiameter<=0)return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=this._burstDiameter/1,n=1*i;n<.5&&(n=.5);let r=2*i,o=2*i;return new WebGLPlot$f.ParticleSystem({image:_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/explosion.png",startColor:new Cesium.Color(1,1,1,1),endColor:new Cesium.Color(.5,0,0,0),startScale:1,endScale:.8,minimumParticleLife:.5,maximumParticleLife:1.2,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$f.Cartesian2(n,n),emissionRate:300,lifetime:1,bursts:[{time:0,minimum:500,maximum:500},{time:1,minimum:500,maximum:500}],loop:!0,emitterModelMatrix:t,emitter:new Cesium.SphereEmitter(n),sizeInMeters:!0})}_calcControlPoint(e,t,i){let n=_0x2887b9.calcControlPoint(e,t,i);return WebGLPlot$f.defined(n)?WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(_0x2887b9.degreesToCartesian3(n),new WebGLPlot$f.HeadingPitchRoll,WebGLPlot$f.Ellipsoid.WGS84,WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west")):null}}const _0x1ff63b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5a8f8b=_0x1ff63b(void 0,(function(){return _0x5a8f8b.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a8f8b).search("(((.+)+)+)+$")}));_0x5a8f8b();class _0x457e81 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,-.5,.5)),this._type=_0x3b1c90.AUGMENT,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAugment_"+WebGLPlot$f.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._augmentPicture=WebGLPlot$f.defaultValue(e.augmentPicture,_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/AugPicture/Augment_Blue.png"),this._pictureWidth=WebGLPlot$f.defaultValue(e.pictureWidth,50),this._pictureHeight=WebGLPlot$f.defaultValue(e.pictureHeight,50),this._minDistanceDisplay=WebGLPlot$f.defaultValue(e.minDistanceDisplay,10),this._maxDistanceDisplay=WebGLPlot$f.defaultValue(e.maxDistanceDisplay,5e4),this._augmentCollection=null,this._augmentGeo=null}setAugmentPicture(e){this._augmentPicture=e,this._initialized=!1}getAugmentPicture(){return this._augmentPicture}setPictureWidth(e){this._pictureWidth=e,this._initialized=!1}getPictureWidth(){return this._pictureWidth}setPictureHeight(e){this._pictureHeight=e,this._initialized=!1}getPictureHeight(){return this._pictureHeight}setMinDistanceDisplay(e){this._minDistanceDisplay=e,this._initialized=!1}getMinDistanceDisplay(){return this._minDistanceDisplay}setMaxDistanceDisplay(e){this._maxDistanceDisplay=e,this._initialized=!1}getMaxDistanceDisplay(){return this._maxDistanceDisplay}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._augmentGeo)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())){let t=_0x2887b9.degreesToCartesian3(e.getPosition());WebGLPlot$f.defined(t)&&(this._augmentGeo.position=t)}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._pictureWidth*=t,this._pictureHeight*=t,this._initialized=!1}}this._geoEntityParameter=e}_executeFunction(e){if(!WebGLPlot$f.defined(this._augmentGeo)||!WebGLPlot$f.defined(this._geoEntityParameter)||!this._augmentGeo.show)return;let t=Math.abs(WebGLPlot$f.CesiumMath.toDegrees(e.camera.pitch))/90*this._pictureHeight;t!=this._augmentGeo.height&&(this._augmentGeo.height=t)}_addEffectToScene(e){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(this._augmentPicture))return!1;if(!WebGLPlot$f.defined(this._geoEntityParameter))return;let t=_0x2887b9.degreesToCartesian3(this._geoEntityParameter.getPosition());return this._augmentCollection=e.primitives.add(new WebGLPlot$f.BillboardCollection),this._augmentGeo=this._augmentCollection.add({position:t,image:this._augmentPicture,horizontalOrigin:WebGLPlot$f.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$f.VerticalOrigin.CENTER,distanceDisplayCondition:new WebGLPlot$f.DistanceDisplayCondition(this._minDistanceDisplay,this._maxDistanceDisplay),show:!0,width:this._pictureWidth,height:this._pictureHeight}),!!WebGLPlot$f.defined(this._augmentGeo)}_removeEffectFromScene(e){WebGLPlot$f.defined(this._augmentGeo)&&WebGLPlot$f.defined(this._augmentCollection)&&e.primitives.contains(this._augmentCollection)&&(e.primitives.remove(this._augmentCollection),this._augmentCollection=void 0,this._augmentGeo=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel),e.hasOwnProperty("augmentPicture")||(e.augmentPicture=this._augmentPicture),e.hasOwnProperty("pictureWidth")||(e.pictureWidth=this._pictureWidth),e.hasOwnProperty("pictureHeight")||(e.pictureHeight=this._pictureHeight),e.hasOwnProperty("minDistanceDisplay")||(e.minDistanceDisplay=this._minDistanceDisplay),e.hasOwnProperty("maxDistanceDisplay")||(e.maxDistanceDisplay=this._maxDistanceDisplay),e.hasOwnProperty("visible")||(e.visible=this._visible);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.augmentPicture)&&(this._augmentPicture=t.augmentPicture),WebGLPlot$f.defined(t.pictureWidth)&&(this._pictureWidth=t.pictureWidth),WebGLPlot$f.defined(t.pictureHeight)&&(this._pictureHeight=t.pictureHeight),WebGLPlot$f.defined(t.minDistanceDisplay)&&(this._minDistanceDisplay=t.minDistanceDisplay),WebGLPlot$f.defined(t.maxDistanceDisplay)&&(this._maxDistanceDisplay=t.maxDistanceDisplay),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x457e81;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._augmentPicture=this._augmentPicture,e._pictureWidth=this._pictureWidth,e._pictureHeight=this._pictureHeight,e._minDistanceDisplay=this._minDistanceDisplay,e._maxDistanceDisplay=this._maxDistanceDisplay,e}}const _0xf74ffe=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xa2a2a6=_0xf74ffe(void 0,(function(){return _0xa2a2a6.toString().search("(((.+)+)+)+$").toString().constructor(_0xa2a2a6).search("(((.+)+)+)+$")}));_0xa2a2a6();const _0x18dfff={ScanCone_ARC:0,ScanCone_FLAT:1};var _0x2bebaf=Object.freeze(_0x18dfff);const _0x193da8=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4037f2=_0x193da8(void 0,(function(){return _0x4037f2.toString().search("(((.+)+)+)+$").toString().constructor(_0x4037f2).search("(((.+)+)+)+$")}));_0x4037f2();class _0x5433aa extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,.3,.5)),this._type=_0x3b1c90.SCANCONE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectScancone_"+WebGLPlot$f.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$f.defaultValue(e.radius,15e3),this._scanHAngle=WebGLPlot$f.defaultValue(e.scanHAngle,50),this._scanVAngle=WebGLPlot$f.defaultValue(e.scanVAngle,30),this._cellAngle=WebGLPlot$f.defaultValue(e.cellAngle,5),this._isFill=WebGLPlot$f.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$f.defaultValue(e.fillColor,new WebGLPlot$f.Color(1,0,0,.3)),this._isOutline=WebGLPlot$f.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$f.defaultValue(e.outlineColor,new WebGLPlot$f.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$f.defaultValue(e.outlineWidth,1),this._scanConeType=WebGLPlot$f.defaultValue(e.scanConeType,_0x2bebaf.ScanCone_ARC),this._scanSpeed=WebGLPlot$f.defaultValue(e.scanSpeed,.5),this._pitchAngle=WebGLPlot$f.defaultValue(e.pitchAngle,0),this._scanRange=WebGLPlot$f.defaultValue(e.scanRange,30),this._linePrimitiveCone=null,this._fillPrimitiveCone=null,this._currentScanAngle=0,this._unitScanAngle=1}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._fillPrimitiveCone)||WebGLPlot$f.defined(this._linePrimitiveCone)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,new _0x11ff81(this._pitchAngle,this._currentScanAngle,0),this._scene);WebGLPlot$f.defined(t)&&(WebGLPlot$f.defined(this._fillPrimitiveCone)&&(this._fillPrimitiveCone.modelMatrix=t),WebGLPlot$f.defined(this._linePrimitiveCone)&&(this._linePrimitiveCone.modelMatrix=t))}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){this._currentScanAngle=0;let t=!1;if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return!1;let i=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,new _0x11ff81(this._pitchAngle,0,0),e);return!!WebGLPlot$f.defined(i)&&(this._isOutline&&(this._linePrimitiveCone=this._createLinePrimitiveCone(i),WebGLPlot$f.defined(this._linePrimitiveCone)&&(e.primitives.add(this._linePrimitiveCone),t=!0)),this._isFill&&(this._fillPrimitiveCone=this._createFillPrimitiveCone(i),WebGLPlot$f.defined(this._fillPrimitiveCone)&&(e.primitives.add(this._fillPrimitiveCone),t=!0)),t)}_removeEffectFromScene(e){WebGLPlot$f.defined(this._linePrimitiveCone)&&e.primitives.contains(this._linePrimitiveCone)&&e.primitives.remove(this._linePrimitiveCone),WebGLPlot$f.defined(this._fillPrimitiveCone)&&e.primitives.contains(this._fillPrimitiveCone)&&e.primitives.remove(this._fillPrimitiveCone),this._linePrimitiveCone=null,this._fillPrimitiveCone=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("radius")||(e.radius=this._radius),e.hasOwnProperty("scanHAngle")||(e.scanHAngle=this._scanHAngle),e.hasOwnProperty("scanVAngle")||(e.scanVAngle=this._scanVAngle),e.hasOwnProperty("cellAngle")||(e.cellAngle=this._cellAngle),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),e.hasOwnProperty("outlineWidth")||(e.outlineWidth=this._outlineWidth),e.hasOwnProperty("scanConeType")||(e.scanConeType=this._scanConeType),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("pitchAngle")||(e.pitchAngle=this._pitchAngle),e.hasOwnProperty("scanRange")||(e.scanRange=this._scanRange),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$f.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$f.defined(t.scanHAngle)&&(this._scanHAngle=t.scanHAngle),WebGLPlot$f.defined(t.scanVAngle)&&(this._scanVAngle=t.scanVAngle),WebGLPlot$f.defined(t.cellAngle)&&(this._cellAngle=t.cellAngle),WebGLPlot$f.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$f.defined(t.fillColor)&&(this._fillColor=WebGLPlot$f.Color.fromCssColorString(t.fillColor)),WebGLPlot$f.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$f.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$f.Color.fromCssColorString(t.outlineColor)),WebGLPlot$f.defined(t.outlineWidth)&&(this._outlineWidth=t.outlineWidth),WebGLPlot$f.defined(t.scanConeType)&&(this._scanConeType=t.scanConeType),WebGLPlot$f.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$f.defined(t.pitchAngle)&&(this._pitchAngle=t.pitchAngle),WebGLPlot$f.defined(t.scanRange)&&(this._scanRange=t.scanRange)}clone(){let e=new _0x5433aa;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._radius=this._radius,e._scanHAngle=this._scanHAngle,e._scanVAngle=this._scanVAngle,e._cellAngle=this._cellAngle,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth,e._scanConeType=this._scanConeType,e._scanSpeed=this._scanSpeed,e._pitchAngle=this._pitchAngle,e._scanRange=this._scanRange,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanHAngle(e){this._scanHAngle=e,this._initialized=!1}getScanHAngle(){return this._scanHAngle}setScanVAngle(e){this._scanVAngle=e,this._initialized=!1}getScanVAngle(){return this._scanVAngle}setCellAngle(e){this._cellAngle=e,this._initialized=!1}getCellAngle(){return this._cellAngle}setIsFill(e){this._isFill=e,this._initialized=!1}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e,this._initialized=!1}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e,this._initialized=!1}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e,this._initialized=!1}getOutlineColor(){return this._outlineColor}setOutlineWidth(e){this._outlineWidth=e,this._initialized=!1}getOutlineWidth(){return this._outlineWidth}setScanConeType(e){this._scanConeType=e,this._initialized=!1}getScanConeType(){return this._scanConeType}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setPitchAngle(e){this._pitchAngle=e,this._initialized=!1}getPitchAngle(){return this._pitchAngle}setScanRange(e){this._scanRange=e}getScanRange(){return this._scanRange}_executeFunction(e){if(!WebGLPlot$f.defined(this._linePrimitiveCone)&&!WebGLPlot$f.defined(this._fillPrimitiveCone)||!this._visible||this._scanRange<=0)return;let t=this._scanRange/2;(this._currentScanAngle>t||this._currentScanAngle<-t)&&(this._unitScanAngle=-this._unitScanAngle);let i=this._scanSpeed*this._unitScanAngle;this._currentScanAngle+=i;let n=WebGLPlot$f.Matrix3.fromRotationZ(WebGLPlot$f.CesiumMath.toRadians(i));WebGLPlot$f.defined(this._linePrimitiveCone)&&(this._linePrimitiveCone.modelMatrix=WebGLPlot$f.Matrix4.multiplyByMatrix3(this._linePrimitiveCone.modelMatrix,n,new WebGLPlot$f.Matrix4)),WebGLPlot$f.defined(this._fillPrimitiveCone)&&(this._fillPrimitiveCone.modelMatrix=WebGLPlot$f.Matrix4.multiplyByMatrix3(this._fillPrimitiveCone.modelMatrix,n,new WebGLPlot$f.Matrix4))}_createFillPrimitiveCone(e){if(!WebGLPlot$f.defined(e))return null;let t=this._createFillGeometry();if(!WebGLPlot$f.defined(t))return null;let i=new WebGLPlot$f.Material({fabric:{type:"Color",uniforms:{color:this._fillColor}},translucent:!0}),n=scene.frameState;n.scene3DOnly=!0;let r=new WebGLPlot$f.MaterialAppearance({material:i,faceForward:!1,closed:!0,frameState:n});return new WebGLPlot$f.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$f.GeometryInstance({geometry:WebGLPlot$f.GeometryPipeline.computeNormal(t)}),asynchronous:!1,modelMatrix:e,appearance:r})}_createLinePrimitiveCone(e){let t=this._outlineWidth,i=this._outlineColor;if(!WebGLPlot$f.defined(e))return null;let n=this._createLineGeometry();return WebGLPlot$f.defined(n)?new WebGLPlot$f.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$f.GeometryInstance({geometry:n,attributes:{show:new WebGLPlot$f.ShowGeometryInstanceAttribute(!0),distanceDisplayCondition:new WebGLPlot$f.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot$f.ColorGeometryInstanceAttribute.fromColor(i),offset:void 0}}),asynchronous:!1,modelMatrix:e,appearance:new WebGLPlot$f.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:t}})}):null}_createFillGeometry(){let e=this._scanConeType,t=this._radius,i=WebGLPlot$f.CesiumMath.toRadians(this._scanVAngle),n=WebGLPlot$f.CesiumMath.toRadians(this._scanHAngle),r=WebGLPlot$f.CesiumMath.toRadians(this._cellAngle);i%r!=0&&(i+=r-i%r),n%r!=0&&(n+=r-n%r);let o=0,a=[],s=0,l=n/r,u=i/r,c=new Array(l*u*6+6*u+6*l),h=[],d=l+1,f=u+1,p=-i/2;for(let i=0;i<f;i++){let n=p+r*i;const o=Math.cos(n)*t,a=Math.sin(n)*t;e==_0x2bebaf.ScanCone_ARC?h.push(new WebGLPlot$f.Cartesian2(o,a)):e==_0x2bebaf.ScanCone_FLAT&&h.push(new WebGLPlot$f.Cartesian2(t,a))}for(let t=0;t<h.length;t++){const i=h[t];let o=-n/2;for(let t=0;t<d;t++){let n=o+r*t;e==_0x2bebaf.ScanCone_ARC?a.push(new WebGLPlot$f.Cartesian3(i.x*Math.cos(n),i.x*Math.sin(n),i.y)):e==_0x2bebaf.ScanCone_FLAT&&a.push(new WebGLPlot$f.Cartesian3(i.x,i.x*Math.sin(n),i.y))}}for(let e=0;e<f-1;e++){let t=e*d;for(let e=0;e<d-1;e++)c[s++]=t+e,c[s++]=t+e+1,c[s++]=t+d+e,c[s++]=t+d+e,c[s++]=t+e+1,c[s++]=t+d+e+1}o=a.length;let _=[];for(let e=0;e<f;e++)_.push(a[e*d+d-1]);_.push(new WebGLPlot$f.Cartesian3(0,0,0));for(let e=0;e<f-1;e++)c[s++]=o+(e+1),c[s++]=o+e,c[s++]=o+_.length-1;a=a.concat(_),o=a.length;let m=[];for(let e=0;e<d;e++)m.push(a[e]);m.push(new WebGLPlot$f.Cartesian3(0,0,0));for(let e=0;e<d-1;e++)c[s++]=o+e,c[s++]=o+(e+1),c[s++]=o+m.length-1;a=a.concat(m),o=a.length;let g=[];for(let e=0;e<f;e++)g.push(a[e*d]);g.push(new WebGLPlot$f.Cartesian3(0,0,0));for(let e=0;e<f-1;e++)c[s++]=o+e,c[s++]=o+(e+1),c[s++]=o+g.length-1;a=a.concat(g),o=a.length;let x=[];for(let e=0;e<d;e++)x.push(a[e+(f-1)*d]);x.push(new WebGLPlot$f.Cartesian3(0,0,0));for(let e=0;e<d-1;e++)c[s++]=o+e,c[s++]=o+(e+1),c[s++]=o+x.length-1;a=a.concat(x);let v=this._ptsTransform([a]),y=new Uint16Array(c),$=WebGLPlot$f.BoundingSphere.fromVertices(v),b=new WebGLPlot$f.GeometryAttributes;b.position=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(v)});let T=new Array(v.length/3*2);for(let e=0;e<v.length/3;e+=2)T[e]=1,T[e+1]=1;return b.st=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(T)}),new WebGLPlot$f.Geometry({attributes:b,indices:y,primitiveType:WebGLPlot$f.PrimitiveType.TRIANGLES,boundingSphere:$})}_createLineGeometry(){let e=this._scanConeType,t=this._radius,i=WebGLPlot$f.CesiumMath.toRadians(this._scanVAngle),n=WebGLPlot$f.CesiumMath.toRadians(this._scanHAngle),r=WebGLPlot$f.CesiumMath.toRadians(this._cellAngle);i%r!=0&&(i+=r-i%r),n%r!=0&&(n+=r-n%r);let o=[],a=n/r+1,s=i/r+1,l=[],u=-i/2;for(let i=0;i<s;i++){let n=u+r*i;const o=Math.cos(n)*t,a=Math.sin(n)*t;e==_0x2bebaf.ScanCone_ARC?l.push(new WebGLPlot$f.Cartesian2(o,a)):e==_0x2bebaf.ScanCone_FLAT&&l.push(new WebGLPlot$f.Cartesian2(t,a))}for(let t=0;t<l.length;t++){const i=l[t];let s=-n/2;for(let t=0;t<a;t++){let n=s+r*t;e==_0x2bebaf.ScanCone_ARC?o.push(new WebGLPlot$f.Cartesian3(i.x*Math.cos(n),i.x*Math.sin(n),i.y)):e==_0x2bebaf.ScanCone_FLAT&&o.push(new WebGLPlot$f.Cartesian3(i.x,i.x*Math.sin(n),i.y))}}let c=this._ptsTransform([o]),h=a*s,d=WebGLPlot$f.IndexDatatype.createTypedArray(h,4*h+8),f=0,p=h;for(let e=0;e<s;e++)for(let t=0;t<a-1;t++)d[f++]=e*a+t,d[f++]=e*a+t+1;for(let e=0;e<a;e++)for(let t=0;t<s-1;t++)d[f++]=e+t*a,d[f++]=e+(t+1)*a;d[f++]=p,d[f++]=0,d[f++]=p,d[f++]=a-1,d[f++]=p,d[f++]=(s-1)*a,d[f++]=p,d[f++]=s*a-1;let _=new WebGLPlot$f.GeometryAttributes;_.position=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(c)});let m=new Array(c.length/3*2);for(let e=0;e<c.length/3;e+=2)m[e]=1,m[e+1]=1;return _.st=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(m)}),new WebGLPlot$f.Geometry({attributes:_,indices:d,primitiveType:WebGLPlot$f.PrimitiveType.LINES,boundingSphere:WebGLPlot$f.BoundingSphere.fromVertices(c)})}_ptsTransform(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_calcControlPoint(e,t,i,n){const r=_0x2887b9.calcControlPosMatrix(e,t,n);if(!WebGLPlot$f.defined(r))return null;const o=WebGLPlot$f.HeadingPitchRoll.fromDegrees(i.y,i.x,i.z,new WebGLPlot$f.HeadingPitchRoll),a=WebGLPlot$f.Matrix3.fromHeadingPitchRoll(o,new WebGLPlot$f.Matrix3);return WebGLPlot$f.Matrix4.multiplyByMatrix3(r,a,new WebGLPlot$f.Matrix4)}}const _0x23b070=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1ede90=_0x23b070(void 0,(function(){return _0x1ede90.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ede90).search("(((.+)+)+)+$")}));_0x1ede90();class _0x1232ba extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.DETECTIONCONE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectDetecttoncone"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._bottomRadius=WebGLPlot$f.defaultValue(e.bottomRadius,15e4),this._bottomPosition=e.bottomPosition,this._repeatCount=WebGLPlot$f.defaultValue(e.repeatCount,8),this._colorBack=WebGLPlot$f.defaultValue(e.colorBack,new WebGLPlot$f.Color(0,1,0,.3)),this._colorBackScale=WebGLPlot$f.defaultValue(e.colorBackScale,1),this._colorForward=WebGLPlot$f.defaultValue(e.colorForward,new WebGLPlot$f.Color(1,1,0,1)),this._colorForwardScale=WebGLPlot$f.defaultValue(e.colorForwardScale,5),this._flowSpeed=WebGLPlot$f.defaultValue(e.flowSpeed,3),this._mode=WebGLPlot$f.defaultValue(e.mdoe,_0x4ca362.ColorMode),this._picturePath=WebGLPlot$f.defaultValue(e.picturePath,""),this._pictureColorScale=WebGLPlot$f.defaultValue(e.pictureColorScale,5),this._speed=WebGLPlot$f.defaultValue(e.speed,.005),this._detecttoncone=void 0,this._currentScale=0}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getFlowSpeed(){return this._flowSpeed}setFlowSpeed(e){this._flowSpeed=e,this._initialized=!1}getPicturePath(){return this._picturePath}setPicturePath(e){this._picturePath=e,this._initialized=!1}getPictureColorScale(){return this._pictureColorScale}setPictureColorScale(e){this._pictureColorScale=e,this._initialized=!1}getColorBack(){return this._colorBack}setColorBack(e){this._colorBack=e,this._initialized=!1}getColorBackScale(){return this._colorBackScale}setColorBackScale(e){this._colorBackScale=e,this._initialized=!1}getColorForward(){return this._colorForward}setColorForward(e){this._colorForward=e,this._initialized=!1}getColorForwardScale(){return this._colorForwardScale}setColorForwardScale(e){this._colorForwardScale=e,this._initialized=!1}setRadius(e){this._bottomRadius=e,this._initialized=!1}getRadius(){return this._bottomRadius}setPosition(e){this._bottomPosition=e,this._initialized=!1}getPosition(){return this._bottomPosition}setSpeed(e){this._speed=e,this._initialized=!1}getSpeed(){return this._speed}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("bottomRadius")||(e.bottomRadius=this._bottomRadius),e.hasOwnProperty("bottomPosition")||(e.bottomPosition={x:this._bottomPosition.x,y:this._bottomPosition.y,z:this._bottomPosition.z}),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("flowSpeed")||(e.flowSpeed=this._flowSpeed),e.hasOwnProperty("picturePath")||(e.picturePath=this._picturePath),e.hasOwnProperty("pictureColorScale")||(e.pictureColorScale=this._pictureColorScale),e.hasOwnProperty("colorBack")||(e.colorBack=this._colorBack.toCssColorString()),e.hasOwnProperty("colorBackScale")||(e.colorBackScale=this._colorBackScale),e.hasOwnProperty("colorForward")||(e.colorForward=this._colorForward.toCssColorString()),e.hasOwnProperty("colorForwardScale")||(e.colorForwardScale=this._colorForwardScale),e.hasOwnProperty("mode")||(e.mode=this._mode),e.hasOwnProperty("speed")||(e.speed=this._speed),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$f.defined(t.bottomRadius)&&(this._bottomRadius=t.bottomRadius),WebGLPlot$f.defined(t.bottomPosition)&&(this._bottomPosition=new _0x11ff81(t.bottomPosition.x,t.bottomPosition.y,t.bottomPosition.z)),WebGLPlot$f.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$f.defined(this.flowSpeed)&&(this._flowSpeed=t.flowSpeed),WebGLPlot$f.defined(t.picturePath)&&(this._picturePath=t.picturePath),WebGLPlot$f.defined(t.pictureColorScale)&&(this._pictureColorScale=t.pictureColorScale),WebGLPlot$f.defined(t.colorBack)&&(this._colorBack=WebGLPlot$f.Color.fromCssColorString(t.colorBack)),WebGLPlot$f.defined(t.colorBackScale)&&(this._colorBackScale=t.colorBackScale),WebGLPlot$f.defined(t.colorForward)&&(this._colorForward=WebGLPlot$f.Color.fromCssColorString(t.colorForward)),WebGLPlot$f.defined(t.colorForwardScale)&&(this._colorForwardScale=t.colorForwardScale),WebGLPlot$f.defined(t.mode)&&(this._mode=t.mode),WebGLPlot$f.defined(t.speed)&&(this._speed=t.speed)}clone(){let e=new _0x1232ba;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bottomRadius=this._bottomRadius,e._bottomPosition=new _0x11ff81(this._bottomPosition.x,this._bottomPosition.y,this._bottomPosition.z),e._repeatCount=this._repeatCount,e._flowSpeed=this._flowSpeed,e._pictureColorScale=this._pictureColorScale,e._colorBack=this._colorBack.clone(),e._colorBackScale=this._colorBackScale,e._colorForward=this._colorForward.clone(),e._colorForwardScale=this._colorForwardScale,e._mode=this._mode,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._speed=this._speed}setGeoEntityParameter(e,t){this._geoEntityParameter=e,this._initialized=!1}_executeFunction(e){!WebGLPlot$f.defined(this._detecttoncone)||!this._visible||this._currentScale>1||(this._currentScale+=this._speed,this._detecttoncone.modelMatrix=WebGLPlot$f.Matrix4.setScale(this._detecttoncone.modelMatrix,new WebGLPlot$f.Cartesian3(this._currentScale,this._currentScale,this._currentScale),new WebGLPlot$f.Matrix4))}_addEffectToScene(e){let t=!1;return this._detecttoncone=this._createDetecttoncone(e),WebGLPlot$f.defined(this._detecttoncone)&&(e.primitives.add(this._detecttoncone),t=!0),t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._detecttoncone)&&e.primitives.contains(this._detecttoncone)&&e.primitives.remove(this._detecttoncone),this._currentScale=0,this._detecttoncone=null}_createDetecttoncone(e){let t;t=null!=this._bottomPosition?_0x2887b9.degreesToCartesian3(this._bottomPosition):WebGLPlot$f.Cartesian3.fromDegrees(this._geoEntityParameter.getPosition().x,this._geoEntityParameter.getPosition().y,0);let i=this._bottomRadius,n=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(n))return null;n=_0x2887b9.degreesToCartesian3(n);let r=WebGLPlot$f.Transforms.eastNorthUpToFixedFrame(n);if(r=WebGLPlot$f.Matrix4.setScale(r,new WebGLPlot$f.Cartesian3(.005,.005,.005),new WebGLPlot$f.Matrix4),!WebGLPlot$f.defined(r))return null;let o,a="";a=this._mode===_0x4ca362.ColorMode?" uniform vec4 colorForward; uniform float colorForwardScale; uniform vec4 colorBack; uniform float colorBackScale; uniform float repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); float sp = 1.0 / repeat; vec2 st = materialInput.st; float dis = distance(st, vec2(0.0, 0.0)); float m = mod(dis - fract(czm_frameNumber * 0.001 * flowSpeed), sp); float a = step(sp / repeat * 0.2, m); if(a == 0.0){ material.diffuse = colorForward.rgb * colorForwardScale; material.alpha = colorForward.a; } else { material.diffuse = colorBack.rgb * colorBackScale; material.alpha = colorBack.a; } return material; }":" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }",o=this._mode===_0x4ca362.ColorMode?new WebGLPlot$f.Material({fabric:{uniforms:{colorForward:this._colorForward,colorForwardScale:this._colorForwardScale,colorBack:this._colorBack,colorBackScale:this._colorBackScale,repeat:this._repeatCount,flowSpeed:this._flowSpeed},source:a},translucent:!0}):new WebGLPlot$f.Material({fabric:{uniforms:{picture:this._picturePath,pictureColorScale:this._pictureColorScale,repeat:new WebGLPlot$f.Cartesian2(1,this._repeatCount),flowSpeed:this._flowSpeed},source:a},translucent:!0});let s=e.frameState;s.scene3DOnly=!0;let l=_0x2887b9.degreesToCartesian3(this._geoEntityParameter.getPosition()),u=this._generateGeometry(t,l,i),c=new WebGLPlot$f.GeometryInstance({geometry:u});return new WebGLPlot$f.Primitive({geometryInstances:c,appearance:new WebGLPlot$f.MaterialAppearance({material:o,faceForward:!1,closed:!0,frameState:s}),releaseGeometryInstances:!1,modelMatrix:r,asynchronous:!1})}_create(e){let t=this._geoEntityParameter.getPosition(),i=this._geoEntityParameter.getModelRotate(),n=WebGLPlot$f.HeadingPitchRoll.fromDegrees(i.z,i.x,i.y,new WebGLPlot$f.HeadingPitchRoll),r=this._detecttonconeColor,o=this._geoEntityParameter.getPosition().z,a=WebGLPlot$f.Cartesian3.fromDegrees(t.x,t.y,.5*t.z),s=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west");const l=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(a,n,WebGLPlot$f.Ellipsoid.WGS84,s);let u=new WebGLPlot$f.CylinderGeometry({length:o,topRadius:0,bottomRadius:.5*o,vertexFormat:WebGLPlot$f.MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat}),c=new WebGLPlot$f.GeometryInstance({geometry:u,modelMatrix:l,id:"Detecttoncone"});const h=new WebGLPlot$f.Material({fabric:{type:"VtxfShader1",uniforms:{color:r,repeat:30,offset:0,thickness:.3},source:"uniform vec4 color;\n uniform float repeat;\n uniform float offset;\n uniform float thickness;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n float sp = 1.0 / repeat;\n vec2 st = materialInput.st;\n float dis = distance(st,vec2(0.5));\n float m = mod(dis + offset,sp);\n float a = step(sp * (1.0 - thickness), m);\n material.diffuse = color.rgb;\n material.alpha = a*color.a;\n return material;}"},translucent:!1}),d=new WebGLPlot$f.MaterialAppearance({material:h,faceForward:!1,closed:!0});return new WebGLPlot$f.Primitive({geometryInstances:[c],appearance:d})}_generateGeometry(e,t,i){let n=361,r=new Array(1086),o=WebGLPlot$f.Transforms.eastNorthUpToFixedFrame(t),a=WebGLPlot$f.Matrix4.inverse(o,new WebGLPlot$f.Matrix4);WebGLPlot$f.Matrix4.multiplyByPoint(a,t,new WebGLPlot$f.Cartesian3);let s=WebGLPlot$f.Matrix4.multiplyByPoint(a,e,new WebGLPlot$f.Cartesian3),l=this._bottomPosition.z-this._geoEntityParameter.getPosition().z;for(let e=0;e<362;e++)if(0==e)r[3*e]=0,r[3*e+1]=0,r[3*e+2]=0;else{let t=_0x2887b9.circlePoint(s,i,i,1*e);r[3*e]=t.x,r[3*e+1]=t.y,r[3*e+2]=l}let u=new Float64Array(r),c=WebGLPlot$f.BoundingSphere.fromVertices(r),h=new Array(1083);for(let e=0;e<n;e++)360==e?(h[3*e]=0,h[3*e+1]=e+1,h[3*e+2]=1):(h[3*e]=0,h[3*e+1]=e+1,h[3*e+2]=e+2);h.splice(h.length-3,3);let d=new Uint16Array(h),f=new Array(1448);for(let e=0;e<362;e++)f[4*e]=1,f[4*e+1]=1,f[4*e+2]=1,f[4*e+3]=1;let p=new Array(724);for(let e=0;e<362;e++)0==e?(p[2*e]=0,p[2*e+1]=0):(p[2*e]=1,p[2*e+1]=1);let _=new WebGLPlot$f.GeometryAttributes;return _.position=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),_.color=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:new Float32Array(f)}),_.st=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(p)}),new WebGLPlot$f.Geometry({attributes:_,indices:d,primitiveType:WebGLPlot$f.PrimitiveType.TRIANGLES,boundingSphere:c})}_getRotateMatrix(e){let t;return 0===this._scanAxis?t=WebGLPlot$f.Matrix3.fromRotationX(WebGLPlot$f.CesiumMath.toRadians(e)):1===this._scanAxis?t=WebGLPlot$f.Matrix3.fromRotationY(WebGLPlot$f.CesiumMath.toRadians(e)):2===this._scanAxis&&(t=WebGLPlot$f.Matrix3.fromRotationZ(WebGLPlot$f.CesiumMath.toRadians(e))),t}}const _0x56f3f7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x28f668=_0x56f3f7(void 0,(function(){return _0x28f668.toString().search("(((.+)+)+)+$").toString().constructor(_0x28f668).search("(((.+)+)+)+$")}));_0x28f668();const _0x3fcab2={SIMPLE:0,TITLE:1,PICTUREBACKGROUND_WHALE:2,PICTUREBACKGROUND_SCIENCE:3,PICTUREBACKGROUND_FUTURE:4};var _0x1c3666=Object.freeze(_0x3fcab2);const _0x2630d4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x459d9e=_0x2630d4(void 0,(function(){return _0x459d9e.toString().search("(((.+)+)+)+$").toString().constructor(_0x459d9e).search("(((.+)+)+)+$")}));_0x459d9e();class _0x137383 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,.5)),this._type=_0x3b1c90.SIGN,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectSign_"+WebGLPlot$f.createGuid(),this._imagePath=WebGLPlot$f.defaultValue(e.imagePath,""),this._text=WebGLPlot$f.defaultValue(e.text,"飞机"),this._billboardCollection=null,this._signType=WebGLPlot$f.defaultValue(e.signType,_0x1c3666.SIMPLE),this._scale=WebGLPlot$f.defaultValue(e.scale,1)}setImagePath(e){this._imagePath=e,this._initialized=!1}getImagePath(){return this._imagePath}setText(e){this._text=e,this._initialized=!1}getText(){return this._text}setSignType(e){this._signType=e,this._initialized=!1}getSignType(){return this._signType}setScale(e){this._scale=e,this._initialized=!1}getScale(){return this._scale}setGeoEntityParameter(e,t){if(null!=this._billboardCollection&&this._billboardCollection.length>0){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!==e.getShowMode()||e.getShowMode()===_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0x2887b9.calcControlPoint(e,this._pntOffset,null);WebGLPlot$f.defined(t)&&(t=_0x2887b9.degreesToCartesian3(t),this._billboardCollection.get(0).position=t)}e.getShowMode()===_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!==e.getModelPath()||this._geoEntityParameter.getModelScale()!==e.getModelScale())&&(this._initialized=!1)}if(WebGLPlot$f.defined(this._geoEntityParameter)){let t=this._geoEntityParameter.getModelScale();this._geoEntityParameter=e,this._bChangeSizeFlowModel||this._geoEntityParameter.setModelScale(t)}else this._geoEntityParameter=e}_addEffectToScene(e){let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);return!!WebGLPlot$f.defined(t)&&(t=_0x2887b9.degreesToCartesian3(t),this._createSign(e,function(i){if(WebGLPlot$f.defined(this._billboardCollection)||(this._billboardCollection=e.primitives.add(new WebGLPlot$f.BillboardCollection)),0===this._billboardCollection.length&&this._billboardCollection.add({show:!0,position:t,image:i,pixelOffset:new WebGLPlot$f.Cartesian2(0,0),horizontalOrigin:WebGLPlot$f.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$f.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,sizeInMeters:!1,scale:1}),WebGLPlot$f.defined(this._billboardCollection)&&this._billboardCollection.length>0)return this._initialized=!0,!0}.bind(this)),!0)}_removeEffectFromScene(e){WebGLPlot$f.defined(e)&&WebGLPlot$f.defined(this._billboardCollection)&&e.primitives.remove(this._billboardCollection),this._billboardCollection=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("imagePath")||(e.imagePath=this._imagePath),e.hasOwnProperty("text")||(e.text=this._text),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("changeSizeFlowModel")||(e.changeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.imagePath)&&(this._imagePath=t.imagePath),WebGLPlot$f.defined(t.text)&&(this._text=t.text),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.changeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.changeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x137383;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._imagePath=this._imagePath,e._text=this._text,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createSign(e,t){let i="red",n=30,r=30,o=null;if(this._signType===_0x1c3666.SIMPLE&&"string"!=typeof this._text||this._signType!==_0x1c3666.SIMPLE&&"object"!=typeof this._text)return;if(this._signType===_0x1c3666.SIMPLE){let e={element:$('<div id="simpleSign" class="simpleSign"></div>').get(0),style:".simpleSign {z-index: -1;position: absolute;text-align: center;color: rgb(255, 255, 255);background-color:rgb(255,0,0,0.5);border:2px solid red;}"},t=e.element;document.body.appendChild(t);let i=document.createElement("style");i.innerHTML=e.style,document.getElementsByTagName("head").item(0).appendChild(i),t.id=Math.random().toString(15).slice(2,15),t.append(this._text),o=t}else if(this._signType===_0x1c3666.TITLE){let e={element:$('<div id="titleSign" class="titleSign"><div class="titleSignContent-wrapper"><div id="titleSignContent" class="titleSignContent"></div></div></div>').get(0),style:".titleSign {z-index: -1;position: absolute;border:2px solid rgb(0,160,233);padding:0.1px;border-bottom: 2px solid rgb(0,255,0);}.titleSignContent-wrapper {max-height: 200px;overflow-y: auto;text-align: left;/*border-radius: 6px;*/background-color:rgb(164,255,176,0.5);padding: 5px;padding-top: 8px;}.titleSignContent {/* margin: 5px 20px;*/line-height: 0.5;font-size:xx-small;font-weight:normal;}.titleSignContent div {text-align: center;color: rgb(226, 249, 46);}.titleSignContent div {line-height: 1;}.titleSignContent table {margin-left: 2px;margin-right: 2px;color: rgb(238, 154, 78);}.titleSignContent table tr {height: 15px;}"};i="green";let t=e.element;document.body.appendChild(t);let n=document.createElement("style");n.innerHTML=e.style,document.getElementsByTagName("head").item(0).appendChild(n);let r="";for(let e in this._text)"title"===e?r="<div>"+this._text[e]+"</div><table><tbody>":r+="<tr><td>"+e+": </th><td>"+this._text[e]+"</td></tr>";r+="</tbody></table>",t.id=Math.random().toString(15).slice(2,15),$("#titleSignContent").append(r),$("#titleSignContent").get(0).id=Math.random().toString(15).slice(2,15),o=t}else if(this._signType===_0x1c3666.PICTUREBACKGROUND_WHALE||this._signType===_0x1c3666.PICTUREBACKGROUND_SCIENCE||this._signType===_0x1c3666.PICTUREBACKGROUND_FUTURE){let e=_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/鲸鱼.png",t="padding: 20px;padding-right: 45px;";i="#8b9ec6",this._signType===_0x1c3666.PICTUREBACKGROUND_SCIENCE?(e=_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/科技.png",n=36,r=20,t="padding: 20px",i="#1cd0fd"):this._signType===_0x1c3666.PICTUREBACKGROUND_FUTURE&&(e=_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/未来.png",n=45,r=0,t="padding: 20px;padding-top: 55px;padding-bottom: 55px",i="#1cd0fd");let a={element:$('<div id="pictureSign" class="pictureSign"><div class="pictureSign-wrapper"><div id="pictureSignContent" class="pictureSignContent"></div></div></div>').get(0),style:".pictureSign {z-index: -1;position: absolute;background-image: url("+e+");background-size: 100% 100%;"+t+"}.pictureSign-wrapper {max-height: 200px;overflow-y: auto;text-align: left;}.pictureSignContent {line-height: 0.5;font-size:xx-small;font-weight:normal;}.pictureSignContent div {text-align: center;color: rgb(0, 255, 0);}.pictureSignContent div {line-height: 1;}.pictureSignContent table {margin-left: 2px;margin-right: 2px;color: rgb(238, 154, 78);}.pictureSignContent table tr {height: 15px;}"},s=a.element;document.body.appendChild(s);let l=document.createElement("style");l.innerHTML=a.style,document.getElementsByTagName("head").item(0).appendChild(l);let u="";for(let e in this._text)"title"===e?u="<div>"+this._text[e]+"</div><table><tbody>":u+="<tr><td>"+e+": </th><td>"+this._text[e]+"</td></tr>";u+="</tbody></table>",s.id=Math.random().toString(15).slice(2,15),$("#pictureSignContent").append(u),$("#pictureSignContent").get(0).id=Math.random().toString(15).slice(2,15),o=s}let a=o.offsetWidth,s=o.offsetHeight+r,l=document.createElement("canvas");l.width=a*this._scale,l.height=s*this._scale,l.style.width=a+"px",l.style.height=s+"px";let u=l.getContext("2d");u.scale(this._scale,this._scale),u.beginPath(),u.moveTo(a/2,s-n),u.lineTo(a/2,s),u.strokeStyle=i,u.stroke();let c={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:l,width:a,height:s,foreignObjectRendering:!0,tainTest:!1,scale:this._scale};_0x269f3b(o,c).then((function(e){let i=new Image;i.src=e.toDataURL("image/png",1),document.body.removeChild(o),"function"==typeof t&&t(i)}))}}const _0x3fa3aa=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x577201=_0x3fa3aa(void 0,(function(){return _0x577201.toString().search("(((.+)+)+)+$").toString().constructor(_0x577201).search("(((.+)+)+)+$")}));_0x577201();class _0x367e91 extends _0x46eece{constructor(e){super(e),e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._type=_0x3b1c90.ANNULARDIFFUSION,this._name=WebGLPlot.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAnnularDiffusion_"+WebGLPlot.createGuid(),this._bChangeSizeFlowModel=WebGLPlot.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot.defaultValue(e.radius,1e3),this._scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),this._scanSpeed=WebGLPlot.defaultValue(e.scanSpeed,5),WebGLPlot.defined(e.repeat)?this.setRepeat(e.repeat):this._repeat=1,this._diffusionPrimitive=void 0}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanColor(e){this._scanColor=e,this._initialized=!1}getScanColor(){return this._scanColor}setRepeat(e){let t=parseInt(e);t<1?t=1:t>5&&(t=5),this._repeat=t,this._initialized=!1}getRepeat(){return this._repeat}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setGeoEntityParameter(e,t){if(WebGLPlot.defined(this._diffusionPrimitive)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0x2887b9.calcControlPosMatrix(e,this._pntOffset,this._scene);WebGLPlot.defined(t)&&(this._initialized=!1)}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._diffusionPrimitive=this._createAnnularDiffusion(e),WebGLPlot.defined(this._diffusionPrimitive)&&(e.primitives.add(this._diffusionPrimitive),t=!0),t}_removeEffectFromScene(e){WebGLPlot.defined(this._diffusionPrimitive)&&e.primitives.contains(this._diffusionPrimitive)&&e.primitives.remove(this._diffusionPrimitive),this._diffusionPrimitive=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("radius")||(e.radius=this._radius),e.hasOwnProperty("scanColor")||(e.scanColor=this._scanColor.toCssColorString()),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("repeat")||(e.repeat=this._repeat),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot.defined(e))return;let t=JSON.parse(e);WebGLPlot.defined(t.type)&&(this._type=t.type),WebGLPlot.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot.defined(t.name)&&(this._name=t.name),WebGLPlot.defined(t.radius)&&(this._radius=t.radius),WebGLPlot.defined(t.scanColor)&&(this._scanColor=WebGLPlot.Color.fromCssColorString(t.scanColor)),WebGLPlot.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot.defined(t.repeat)&&(this._repeat=t.repeat),WebGLPlot.defined(t.visible)&&(this._visible=t.visible),WebGLPlot.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot.defined(t.offset)&&(WebGLPlot.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x367e91;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._radius=this._radius,e._scanColor=this._scanColor.clone(),e._scanSpeed=this._scanSpeed,e._repeat=this._repeat,e}_createAnnularDiffusion(){if(!WebGLPlot.defined(this._geoEntityParameter)||!WebGLPlot.defined(this._pntOffset)||!WebGLPlot.defined(this._radius))return null;let e=_0x2887b9.calcControlPosMatrix(this._geoEntityParameter,this._pntOffset,scene);if(!WebGLPlot.defined(e))return null;let t=_0x2887b9.getPositionFromModelMatrix(e);let i=new WebGLPlot.Material({fabric:{type:"MyAnnularDiffusion",uniforms:{color:this._scanColor,speed:this._scanSpeed,count:this._repeat,gradient:.2},source:"uniform vec4 color;\n uniform float speed;\n uniform float count;\n uniform float gradient;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(czm_frameNumber * speed / 1000.0);\n vec3 str = materialInput.str;\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = 0.0;\n for(int i = 0; i <= 5; i++){\n if(float(i) <= count){\n disNum = perDis * float(i) - dis + per / count;\n if(disNum > 0.0){\n if(disNum < perDis){\n bl = 1.0 - disNum / perDis;\n } else if(disNum - perDis < perDis){\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl,(1.0 + 10.0 * (1.0 - gradient)));\n }\n }\n }\n }\n return material;\n }"}});return new WebGLPlot.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.EllipseGeometry({center:_0x2887b9.degreesToCartesian3(t),semiMajorAxis:this._radius,semiMinorAxis:this._radius,height:t.z})}),appearance:new WebGLPlot.EllipsoidSurfaceAppearance({material:i})})}}var _0x177751=(_0x1638fa=!0,function(e,t){var i=_0x1638fa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1638fa=!1,i}),_0x5a1966=_0x177751(void 0,(function(){return _0x5a1966.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a1966).search("(((.+)+)+)+$")})),_0x1638fa;_0x5a1966();var _0x227167={UNKNOW:0,BASICLINE:1,DASHLINE:2,METEORLINE:3,TUBULAR:4,ARROW:5},_0x4fea45=Object.freeze(_0x227167);const _0x1910be=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x37419f=_0x1910be(void 0,(function(){return _0x37419f.toString().search("(((.+)+)+)+$").toString().constructor(_0x37419f).search("(((.+)+)+)+$")}));_0x37419f();class _0x1eb387 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.COMMUNICATIONLINK,this._linkType=_0x4fea45.UNKNOW,this._UUID=WebGLPlot$f.createGuid(),this._bChangeSizeFlowModel=!1,this._startUUID=WebGLPlot$f.defaultValue(e.startUUID,""),this._endUUID=WebGLPlot$f.defaultValue(e.endUUID,""),this._startOffset=WebGLPlot$f.defaultValue(e.startOffset,new _0x11ff81(0,0,.5)),this._endOffset=WebGLPlot$f.defaultValue(e.endOffset,new _0x11ff81(0,0,.5)),this._maxVisibleDistance=WebGLPlot$f.defaultValue(e.maxVisibleDistance,-1),this._linkPrimitive=void 0,this._pntStart=void 0,this._pntEnd=void 0}getLinkType(){return this._linkType}setStartUUID(e){this._startUUID=e}getStartUUID(){return this._startUUID}setEndUUID(e){this._endUUID=e}getEndUUID(){return this._endUUID}setStartOffset(e){this._startOffset=e}getStartOffset(){return this._startOffset}setEndOffset(e){this._endOffset=e}getEndOffset(){return this._endOffset}setMaxVisibleDistance(e){this._maxVisibleDistance=e}getMaxVisibleDistance(){return this._maxVisibleDistance}_executeFunction(e){if(WebGLPlot$f.defined(this._pntStart)&&WebGLPlot$f.defined(this._pntEnd)&&this._visible){let t=WebGLPlot$f.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),i=WebGLPlot$f.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z),n=Math.sqrt(WebGLPlot$f.Cartesian3.distanceSquared(t,i)),r=!0;-1!=this._maxVisibleDistance&&(r=n<=this._maxVisibleDistance),r&&!WebGLPlot$f.defined(this._linkPrimitive)?this._addEffectToScene(e):!r&&WebGLPlot$f.defined(this._linkPrimitive)&&this._removeEffectFromScene(e)}}}const _0xe26ce5=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5282b0=_0xe26ce5(void 0,(function(){return _0x5282b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x5282b0).search("(((.+)+)+)+$")}));_0x5282b0();class _0xc54aac extends _0x1eb387{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._linkType=_0x4fea45.BASICLINE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="BasicLineCommunicationLink_"+WebGLPlot$f.createGuid(),this._speedV=WebGLPlot$f.defaultValue(e.speedV,5),this._lineWidth=WebGLPlot$f.defaultValue(e.lineWidth,1),this._signalLengthRatio=WebGLPlot$f.defaultValue(e.signalLengthRatio,.15),this._signalColor=WebGLPlot$f.defaultValue(e.signalColor,new WebGLPlot$f.Color(.21,1,.027,.78)),this._linkLineColor=WebGLPlot$f.defaultValue(e.linkLineColor,new WebGLPlot$f.Color(.92,.92,.92,.19)),this._bBothWay=WebGLPlot$f.defaultValue(e.bBothWay,!0),this._polylineCollection=void 0,this._linkPrimitive=void 0,this._direct=1;let t=this;this._executeAni=function(e,i){if(!WebGLPlot$f.defined(t._linkPrimitive)||!WebGLPlot$f.defined(t._polylineCollection))return;let n=.001*t._speedV,r=t._linkPrimitive.material.uniforms.start;t._bBothWay?(r<=0&&(t._direct=1),r+t._signalLengthRatio>=1&&(t._direct=-1),r+=n*t._direct):r>.8?r=0:r+=n,t._linkPrimitive.material.uniforms.start=r}}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x2887b9.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$f.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x2887b9.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$f.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$f.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x3f9f2a.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$f.defined(t)&&(this._pntStart=_0x2887b9.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x3f9f2a.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$f.defined(i)&&(this._pntEnd=_0x2887b9.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$f.defined(this._pntStart)||!WebGLPlot$f.defined(this._pntEnd))return!1;let n=new WebGLPlot$f.Material({fabric:{type:"MyBaseLineMaterial",uniforms:{color:this._signalColor,color1:this._linkLineColor,start:0,signalLengthRatio:this._signalLengthRatio},source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; \n if(st.s > start && st.s < start + signalLengthRatio){ material.diffuse = color.rgb; \n material.alpha = color.a; \n }\n else{\n material.diffuse = color1.rgb; \n material.alpha = color1.a; \n }\n return material;\n }"}});this._polylineCollection=new WebGLPlot$f.PolylineCollection;let r=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(r),width:this._lineWidth,material:n});let o=!1;return WebGLPlot$f.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),e.preUpdate.addEventListener(this._executeAni),o=!0),o}_removeEffectFromScene(e){WebGLPlot$f.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.preUpdate.removeEventListener(this._executeAni),e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("signalLengthRatio")||(e.signalLengthRatio=this._signalLengthRatio),e.hasOwnProperty("signalColor")||(e.signalColor=this._signalColor.toCssColorString()),e.hasOwnProperty("linkLineColor")||(e.linkLineColor=this._linkLineColor.toCssColorString()),e.hasOwnProperty("bBothWay")||(e.bBothWay=this._bBothWay),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$f.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$f.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$f.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$f.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$f.defined(t.signalLengthRatio)&&(this._signalLengthRatio=t.signalLengthRatio),WebGLPlot$f.defined(t.signalColor)&&(this._signalColor=WebGLPlot$f.Color.fromCssColorString(t.signalColor)),WebGLPlot$f.defined(t.linkLineColor)&&(this._linkLineColor=WebGLPlot$f.Color.fromCssColorString(t.linkLineColor)),WebGLPlot$f.defined(t.bBothWay)&&(this._bBothWay=t.bBothWay),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.startOffset)&&(WebGLPlot$f.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$f.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$f.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$f.defined(t.endOffset)&&(WebGLPlot$f.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$f.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$f.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0xc54aac;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x11ff81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x11ff81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._signalLengthRatio=this._signalLengthRatio,e._signalColor=WebGLPlot$f.Color.clone(this._signalColor),e._linkLineColor=WebGLPlot$f.Color.clone(this._linkLineColor),e._bBothWay=this._bBothWay,e}setSpeedV(e){this._speedV=e}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setSignalLengthRatio(e){this._signalLengthRatio=e,this._initialized=!1}getSignalLengthRatio(){return this._signalLengthRatio}setSignalColor(e){this._signalColor=e,this._initialized=!1}getSignalColor(){return this._signalColor}setLinkLineColor(e){this._linkLineColor=e,this._initialized=!1}getLinkLineColor(){return this._linkLineColor}setbBothWay(e){this._bBothWay=e}getbBothWay(){return this._bBothWay}}const _0x289e66=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x151881=_0x289e66(void 0,(function(){return _0x151881.toString().search("(((.+)+)+)+$").toString().constructor(_0x151881).search("(((.+)+)+)+$")}));_0x151881();class _0x412cba extends _0x1eb387{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._linkType=_0x4fea45.ARROW,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="ArrowCommunicationLink_"+WebGLPlot$f.createGuid(),this._speedV=WebGLPlot$f.defaultValue(e.speedV,1),this._lineWidth=WebGLPlot$f.defaultValue(e.lineWidth,5),this._repeatCount=WebGLPlot$f.defaultValue(e.repeatCount,50),this._arrowImage=WebGLPlot$f.defaultValue(e.arrowImage,_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/Arrow.png"),this._polylineCollection=null,this._linkPrimitive=void 0}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x2887b9.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$f.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x2887b9.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$f.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$f.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x3f9f2a.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$f.defined(t)&&(this._pntStart=_0x2887b9.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x3f9f2a.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$f.defined(i)&&(this._pntEnd=_0x2887b9.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$f.defined(this._pntStart)||!WebGLPlot$f.defined(this._pntEnd))return!1;let n=new WebGLPlot$f.Material({fabric:{type:"MyArrowImage",uniforms:{image:this._arrowImage,repeat:new WebGLPlot$f.Cartesian2(this._repeatCount,1),time:this._speedV},source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = repeat * materialInput.st;\n vec4 colorImage = texture2D(image, vec2(fract(st.s - czm_frameNumber * time * 0.005), st.t));\n material.alpha = colorImage.a;\n material.diffuse = colorImage.rgb;\n return material;\n }"}});this._polylineCollection=new WebGLPlot$f.PolylineCollection;let r=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(r),width:this._lineWidth,material:n});let o=!1;return WebGLPlot$f.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),o=!0),o}_removeEffectFromScene(e){WebGLPlot$f.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("arrowImage")||(e.arrowImage=this._arrowImage),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$f.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$f.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$f.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$f.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$f.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$f.defined(t.arrowImage)&&(this._arrowImage=t.arrowImage),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.startOffset)&&(WebGLPlot$f.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$f.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$f.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$f.defined(t.endOffset)&&(WebGLPlot$f.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$f.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$f.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x412cba;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x11ff81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x11ff81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._repeatCount=this._repeatCount,e._arrowImage=this._arrowImage,e}setSpeedV(e){this._speedV=e,this._initialized=!1}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getRepeatCount(){return this._repeatCount}setArrowImage(e){this._arrowImage=e,this._initialized=!1}getArrowImage(){return this._arrowImage}}const _0x14e255=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4ceb49=_0x14e255(void 0,(function(){return _0x4ceb49.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ceb49).search("(((.+)+)+)+$")}));_0x4ceb49();class _0x592290 extends _0x1eb387{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._linkType=_0x4fea45.TUBULAR,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="TubularCommunicationLink_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,.5)),!WebGLPlot$f.defined(e.sectionSlices)||e.sectionSlices<3||e.sectionSlices>128?this._sectionSlices=60:this._sectionSlices=e.sectionSlices,this._topRadius=WebGLPlot$f.defaultValue(e.topRadius,1e3),this._bottomRadius=WebGLPlot$f.defaultValue(e.bottomRadius,1e3),this._speedV=WebGLPlot$f.defaultValue(e.speedV,1.5),this._repeatCount=WebGLPlot$f.defaultValue(e.repeatCount,10),this._image=WebGLPlot$f.defaultValue(e.image,_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/TubularLinkSpacer.png"),this._linkPrimitive=void 0,this._linkLength=0}getSectionSlices(){return this._sectionSlices}setSectionSlices(e){!WebGLPlot$f.defined(e)||e<3||e>128||(this._sectionSlices=e,this._initialized=!1)}getTopRadius(){return this._topRadius}setTopRadius(e){this._topRadius=e,this._initialized=!1}getBottomRadius(){return this._bottomRadius}setBottomRadius(e){this._bottomRadius=e,this._initialized=!1}getSpeedV(){return this._speedV}setSpeedV(e){this._speedV=e}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e}getImage(){return this._image}setImage(e){this._image=e,this._initialized=!1}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x2887b9.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$f.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x2887b9.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$f.defined(this._pntEnd)&&(i=!0)),i){let e=this._getModelMatrix(this._pntStart,this._pntEnd),t=WebGLPlot$f.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),i=WebGLPlot$f.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z),n=WebGLPlot$f.Cartesian3.distance(t,i)/this._linkLength;this._linkPrimitive.modelMatrix=WebGLPlot$f.Matrix4.multiplyByScale(e,new WebGLPlot$f.Cartesian3(n,1,1),new WebGLPlot$f.Matrix4)}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;this._pntStart=void 0;let i=_0x3f9f2a.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$f.defined(i)&&(this._pntStart=_0x2887b9.calcControlPoint(i,this._startOffset,e)),this._pntEnd=void 0;let n=_0x3f9f2a.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$f.defined(n)&&(this._pntEnd=_0x2887b9.calcControlPoint(n,this._endOffset,e)),!WebGLPlot$f.defined(this._pntStart)||!WebGLPlot$f.defined(this._pntEnd))return!1;let r=this._getModelMatrix(this._pntStart,this._pntEnd);return!!WebGLPlot$f.defined(r)&&(this._linkPrimitive=this._createFillPrimitive(r),WebGLPlot$f.defined(this._linkPrimitive)&&(e.primitives.add(this._linkPrimitive),t=!0),t)}_removeEffectFromScene(e){WebGLPlot$f.defined(this._linkPrimitive)&&e.primitives.contains(this._linkPrimitive)&&(e.primitives.remove(this._linkPrimitive),this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("sectionSlices")||(e.sectionSlices=this._sectionSlices),e.hasOwnProperty("topRadius")||(e.topRadius=this._topRadius),e.hasOwnProperty("bottomRadius")||(e.bottomRadius=this._bottomRadius),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("image")||(e.image=this._image),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$f.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$f.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$f.defined(t.sectionSlices)&&(this._sectionSlices=t.sectionSlices),WebGLPlot$f.defined(t.topRadius)&&(this._topRadius=t.topRadius),WebGLPlot$f.defined(t.bottomRadius)&&(this._bottomRadius=t.bottomRadius),WebGLPlot$f.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$f.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$f.defined(t.image)&&(this._image=t.image),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.startOffset)&&(WebGLPlot$f.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$f.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$f.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$f.defined(t.endOffset)&&(WebGLPlot$f.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$f.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$f.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x592290;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x11ff81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x11ff81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._sectionSlices=this._sectionSlices,e._topRadius=this._topRadius,e._bottomRadius=this._bottomRadius,e._speedV=this._speedV,e._repeatCount=this._repeatCount,e._image=this._image,e}_getModelMatrix(e,t){const i=_0x2887b9.degreesToCartesian3(e),n=_0x2887b9.degreesToCartesian3(t);let r=new WebGLPlot$f.HeadingPitchRoll,o=_0x2887b9.getHeading(i,n);o&&(r.heading=o);let a=_0x2887b9.getPitch(i,n);return a&&(r.pitch=a),WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(i,r,WebGLPlot$f.Ellipsoid.WGS84,WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west"))}_createFillPrimitive(e){if(!WebGLPlot$f.defined(e))return null;let t=this._createFillGeometry();if(!WebGLPlot$f.defined(t))return null;let i=new WebGLPlot$f.Material({fabric:{type:"TubularImage",uniforms:{picture:this._image,pictureColorScale:1,repeat:new WebGLPlot$f.Cartesian2(1,this._repeatCount),flowSpeed:this._speedV},source:" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }"}}),n=scene.frameState;n.scene3DOnly=!0;let r=new WebGLPlot$f.MaterialAppearance({material:i,faceForward:!1,closed:!0,frameState:n});return new WebGLPlot$f.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$f.GeometryInstance({geometry:WebGLPlot$f.GeometryPipeline.computeNormal(t)}),asynchronous:!1,modelMatrix:e,appearance:r})}_createFillGeometry(){let e=WebGLPlot$f.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),t=WebGLPlot$f.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z);this._linkLength=WebGLPlot$f.Cartesian3.distance(e,t);let i=this._linkLength,n=this._topRadius,r=this._bottomRadius,o=this._sectionSlices,a=[],s=[],l=WebGLPlot$f.CesiumMath.toRadians(360/o);for(let e=0;e<o;e++){let t=l*e;const o=Math.cos(t)*n,u=Math.sin(t)*n;a.push(new WebGLPlot$f.Cartesian3(0,o,u));const c=Math.cos(t)*r,h=Math.sin(t)*r;s.push(new WebGLPlot$f.Cartesian3(i,c,h))}let u=[],c=s.length;u=a.concat(s);let h=this._ptsTransform([u]),d=WebGLPlot$f.BoundingSphere.fromVertices(h),f=new Array(2*c*3),p=0;for(let e=0;e<c-1;e++)f[p++]=e,f[p++]=e+1,f[p++]=c+e,f[p++]=e+1,f[p++]=c+(e+1),f[p++]=c+e;f[p++]=c-1,f[p++]=0,f[p++]=2*c-1,f[p++]=0,f[p++]=c,f[p++]=2*c-1;let _=new Uint16Array(f),m=new WebGLPlot$f.GeometryAttributes;m.position=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(h)});let g=0,x=2*u.length,v=new Array(x);for(let e=0;e<u.length;e++){let t=e,i=0;e>=c&&(t=e-c,i=1),v[g++]=1*t/c,v[g++]=i}return m.st=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(v)}),new WebGLPlot$f.Geometry({attributes:m,indices:_,primitiveType:WebGLPlot$f.PrimitiveType.TRIANGLES,boundingSphere:d})}_ptsTransform(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}}const _0x399a34=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x31c5e2=_0x399a34(void 0,(function(){return _0x31c5e2.toString().search("(((.+)+)+)+$").toString().constructor(_0x31c5e2).search("(((.+)+)+)+$")}));_0x31c5e2();class _0x115b1a extends _0x1eb387{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._linkType=_0x4fea45.METEORLINE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="MeteorCommunicationLink_"+WebGLPlot$f.createGuid(),this._color=WebGLPlot$f.defaultValue(e.color,new WebGLPlot$f.Color(1,1,.3,.8)),this._speedV=WebGLPlot$f.defaultValue(e.speedV,1),this._percent=WebGLPlot$f.defaultValue(e.percent,.1),this._gradient=WebGLPlot$f.defaultValue(e.gradient,.01),this._lineWidth=WebGLPlot$f.defaultValue(e.lineWidth,1),this._linkPrimitive=void 0,this._polylineCollection=void 0}getColor(){return this._color}setColor(e){this._color=e}getSpeedV(){return this._speedV}setSpeedV(e){this._speedV=e}getPercent(){return this._percent}setPercent(e){this._percent=e}getGradient(){return this._gradient}setGradient(e){this._gradient=e}getLineWidth(){return this._lineWidth}setLineWidth(e){this._lineWidth=e}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x2887b9.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$f.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x2887b9.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$f.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$f.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x3f9f2a.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$f.defined(t)&&(this._pntStart=_0x2887b9.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x3f9f2a.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$f.defined(i)&&(this._pntEnd=_0x2887b9.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$f.defined(this._pntStart)||!WebGLPlot$f.defined(this._pntEnd))return!1;let n=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z],r=new WebGLPlot$f.Material({fabric:{type:"MeteorLine",uniforms:{color:this._color,speedV:this._speedV,percent:this._percent,gradient:this._gradient},source:"\n uniform vec4 color;\n uniform float speedV;\n uniform float percent;\n uniform float gradient;\n \n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float t =fract(czm_frameNumber * speedV / 1000.0);\n t *= (1.0 + percent);\n float alpha = smoothstep(t- percent, t, st.s) * step(-t, -st.s);\n \n if(alpha < 1.0 && alpha > 0.0){\n material.diffuse = color.rgb;\n alpha = alpha * (pow(2.0, alpha * 5.0) / pow(2.0, 5.0));\n }else{\n material.diffuse = color.rgb;\n }\n alpha += gradient;\n material.alpha = alpha;\n \n return material;\n }\n "}});this._polylineCollection=new WebGLPlot$f.PolylineCollection,this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(n),width:this._lineWidth,material:r});let o=!1;return WebGLPlot$f.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),o=!0),o}_removeEffectFromScene(e){WebGLPlot$f.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("color")||(e.color=this._color),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("percent")||(e.percent=this._percent),e.hasOwnProperty("gradient")||(e.gradient=this._gradient),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$f.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$f.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$f.defined(t.color)&&(this._color=t.color),WebGLPlot$f.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$f.defined(t.percent)&&(this._percent=t.percent),WebGLPlot$f.defined(t.gradient)&&(this._gradient=t.gradient),WebGLPlot$f.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.startOffset)&&(WebGLPlot$f.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$f.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$f.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$f.defined(t.endOffset)&&(WebGLPlot$f.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$f.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$f.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x115b1a;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x11ff81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x11ff81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._color=WebGLPlot$f.Color.clone(this._color),e._speedV=this._speedV,e._percent=this._percent,e._gradient=this._gradient,e._wide=this._wide,e}}const _0x5e83f6=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x20929a=_0x5e83f6(void 0,(function(){return _0x20929a.toString().search("(((.+)+)+)+$").toString().constructor(_0x20929a).search("(((.+)+)+)+$")}));_0x20929a();class _0x5df5f1 extends _0x1eb387{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._linkType=_0x4fea45.DASHLINE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="DashLineCommunicationLink"+WebGLPlot$f.createGuid(),this._speedV=WebGLPlot$f.defaultValue(e.speedV,5),this._lineWidth=WebGLPlot$f.defaultValue(e.lineWidth,1),this._dashLength=WebGLPlot$f.defaultValue(e.dashLength,30),this._dashPattern=WebGLPlot$f.defaultValue(e.dashPattern,255),this._signalColor=WebGLPlot$f.defaultValue(e.signalColor,new WebGLPlot$f.Color(1,0,0,1)),this._gapColor=WebGLPlot$f.defaultValue(e.gapColor,new WebGLPlot$f.Color(0,0,0,0)),this._polylineCollection=void 0,this._linkPrimitive=void 0}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x2887b9.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$f.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x2887b9.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$f.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$f.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x3f9f2a.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$f.defined(t)&&(this._pntStart=_0x2887b9.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x3f9f2a.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$f.defined(i)&&(this._pntEnd=_0x2887b9.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$f.defined(this._pntStart)||!WebGLPlot$f.defined(this._pntEnd))return!1;let n=new Cesium.Material({fabric:{type:"MyDashLineMaterial",uniforms:{color:this._signalColor,gapColor:this._gapColor,dashLength:this._dashLength,dashPattern:this._dashPattern,speedV:this._speedV},source:"uniform vec4 gapColor;\n uniform float dashLength;\n uniform float dashPattern;\n uniform float xy;\n varying float v_polylineAngle;\n \n const float maskLength = 16.0;\n \n mat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(\n c, s,\n -s, c\n );\n }\n \n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n \n // Get the relative position within the dash from 0 to 1\n float dashPosition = fract(pos.x/ (dashLength * czm_pixelRatio) + czm_frameNumber * 0.01 * speedV);\n // Figure out the mask index.\n float maskIndex = floor(dashPosition * maskLength);\n // Test the bit mask.\n float maskTest = floor((dashPattern) / pow(2.0, maskIndex));\n vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\n if (fragColor.a < 0.005) { // matches 0/255 and 1/255\n discard;\n }\n \n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n }"},translucent:!0});this._polylineCollection=new WebGLPlot$f.PolylineCollection;let r=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(r),width:this._lineWidth,material:n});let o=!1;return WebGLPlot$f.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),o=!0),o}_removeEffectFromScene(e){WebGLPlot$f.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("dashLength")||(e.dashLength=this._dashLength),e.hasOwnProperty("dashPattern")||(e.dashPattern=this._dashPattern),e.hasOwnProperty("signalColor")||(e.signalColor=this._signalColor.toCssColorString()),e.hasOwnProperty("gapColor")||(e.gapColor=this._gapColor.toCssColorString()),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$f.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$f.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$f.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$f.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$f.defined(t.dashLength)&&(this._dashLength=t.dashLength),WebGLPlot$f.defined(t.dashPattern)&&(this._dashPattern=t.dashPattern),WebGLPlot$f.defined(t.signalColor)&&(this._signalColor=WebGLPlot$f.Color.fromCssColorString(t.signalColor)),WebGLPlot$f.defined(t.gapColor)&&(this._gapColor=WebGLPlot$f.Color.fromCssColorString(t.gapColor)),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.startOffset)&&(WebGLPlot$f.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$f.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$f.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$f.defined(t.endOffset)&&(WebGLPlot$f.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$f.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$f.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x5df5f1;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x11ff81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x11ff81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._dashLength=this._dashLength,e._dashPattern=this._dashPattern,e._signalColor=WebGLPlot$f.Color.clone(this._signalColor),e._gapColor=WebGLPlot$f.Color.clone(this._gapColor),e}setSpeedV(e){this._speedV=e}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setDashLength(e){this._dashLength=e,this._initialized=!1}getDashLength(){return this._dashLength}setDashPattern(e){this._dashPattern=e,this._initialized=!1}getDashPattern(){return this._dashPattern}setSignalColor(e){this._signalColor=e,this._initialized=!1}getSignalColor(){return this._signalColor}setGapColor(e){this._gapColor=e,this._initialized=!1}getGapColor(){return this._gapColor}}const _0x1814f5=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2c0d65=_0x1814f5(void 0,(function(){return _0x2c0d65.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c0d65).search("(((.+)+)+)+$")}));_0x2c0d65();class _0x6508a2{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._shadows=WebGLPlot$f.defaultValue(e.shadows,WebGLPlot$f.ShadowMode.DISABLED),this._isFill=WebGLPlot$f.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$f.defaultValue(e.fillColor,new WebGLPlot$f.Color(1,1,0,.5)),this._isOutline=WebGLPlot$f.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$f.defaultValue(e.outlineColor,new WebGLPlot$f.Color(1,1,0,1))}setShadows(e){this._shadows=e}getShadows(){return this._shadows}setIsFill(e){this._isFill=e}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e}getOutlineColor(){return this._outlineColor}toJSON(){let e={};return e.hasOwnProperty("shadows")||(e.shadows=this._shadows),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.shadows)&&(this._shadows=t.shadows),WebGLPlot$f.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$f.defined(t.fillColor)&&(this._fillColor=WebGLPlot$f.Color.fromCssColorString(t.fillColor)),WebGLPlot$f.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$f.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$f.Color.fromCssColorString(t.outlineColor))}clone(){let e=new _0x6508a2;return e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e}_updateScan(e){e.shadows=this._shadows,e.isFill=this._isFill,e.fillColor=this._fillColor.clone(),e.isOutline=this._isOutline,e.outlineColor=this._outlineColor.clone()}}const _0x299701=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x549995=_0x299701(void 0,(function(){return _0x549995.toString().search("(((.+)+)+)+$").toString().constructor(_0x549995).search("(((.+)+)+)+$")}));_0x549995();class _0x2ed19c extends _0x46eece{constructor(e){if(super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.RADAR,this._radarType=_0x49109a.PlotCustomRadar,this._UUID=WebGLPlot$f.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._scanSpeed=WebGLPlot$f.defaultValue(e.scanSpeed,60),this._shadows=WebGLPlot$f.defaultValue(e.shadows,WebGLPlot$f.ShadowMode.DISABLED),this._isFill=WebGLPlot$f.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$f.defaultValue(e.fillColor,new WebGLPlot$f.Color(1,0,0,.3)),this._isOutline=WebGLPlot$f.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$f.defaultValue(e.outlineColor,new WebGLPlot$f.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$f.defaultValue(e.outlineWidth,1),this._isShowScan=!0,WebGLPlot$f.defined(e.arrGeoEntityEffectRadarScans))this._arrGeoEntityEffectRadarScans=e.arrGeoEntityEffectRadarScans;else{let e=[];for(let t=0;t<3;t++){let t=new _0x6508a2;e.push(t)}this._arrGeoEntityEffectRadarScans=e}}getRadarType(){return this._radarType}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setShadows(e){this._shadows=e,this._initialized=!1}getShadows(){return this._shadows}setIsFill(e){this._isFill=e,this._initialized=!1}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e,this._initialized=!1}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e,this._initialized=!1}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e,this._initialized=!1}getOutlineColor(){return this._outlineColor}setOutlineWidth(e){this._outlineWidth=e,this._initialized=!1}getOutlineWidth(){return this._outlineWidth}getGeoEntityEffectRadarScans(){return this._arrGeoEntityEffectRadarScans}setGeoEntityEffectRadarScans(e){this._arrGeoEntityEffectRadarScans=e,this._initialized=!1}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("shadows")||(e.shadows=this._shadows),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),e.hasOwnProperty("outlineWidth")||(e.outlineWidth=this._outlineWidth);let t=[];return e.hasOwnProperty("arrGeoEntityEffectRadarScans")||(e.arrGeoEntityEffectRadarScans=t,this._arrGeoEntityEffectRadarScans.forEach((e=>{t.push(e.toJSON())}))),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$f.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$f.defined(t.shadows)&&(this._shadows=t.shadows),WebGLPlot$f.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$f.defined(t.fillColor)&&(this._fillColor=WebGLPlot$f.Color.fromCssColorString(t.fillColor)),WebGLPlot$f.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$f.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$f.Color.fromCssColorString(t.outlineColor)),WebGLPlot$f.defined(t.outlineWidth)&&(this._outlineWidth=t.outlineWidth),this._arrGeoEntityEffectRadarScans=[],t.arrGeoEntityEffectRadarScans.forEach((e=>{let t=new _0x6508a2;t.fromJSON(e),this._arrGeoEntityEffectRadarScans.push(t)}))}}const _0x11fbda=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x40fa1d=_0x11fbda(void 0,(function(){return _0x40fa1d.toString().search("(((.+)+)+)+$").toString().constructor(_0x40fa1d).search("(((.+)+)+)+$")}));_0x40fa1d();class _0x28004f extends _0x2ed19c{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._radarType=_0x49109a.PlotMechanicalRadar,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectMechanicalRadar_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$f.defaultValue(e.radius,15e4),this._mechanicalRadar=null,this._cellAngle=5,this._isShowScan=!0}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._mechanicalRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x2887b9.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._mechanicalRadar.point=t)}if(e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._mechanicalRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return null;let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=new _0x11ff81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x4e5d29.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._mechanicalRadar=new _0x2a4b84({id:this._UUID,point:t,rotate:new WebGLPlot$f.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,cellAngle:this._cellAngle,radii:new WebGLPlot$f.Cartesian3(this._radius,this._radius,this._radius),isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$f.defined(this._mechanicalRadar))return!1;let n=this._mechanicalRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._mechanicalRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$f.defined(this._mechanicalRadar)&&(this._mechanicalRadar.destroy(),this._mechanicalRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$f.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$f.defined(t.radius)&&(this._radius=t.radius)}clone(){let e=new _0x28004f;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}}const _0xc09082=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4b109b=_0xc09082(void 0,(function(){return _0x4b109b.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b109b).search("(((.+)+)+)+$")}));_0x4b109b();class _0x1c4ba4 extends _0x2ed19c{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._radarType=_0x49109a.PlotParameterRadar,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectParameterRadar_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$f.defaultValue(e.radius,15e4),this._innerRadius=WebGLPlot$f.defaultValue(e.innerRadius,5e3),this._minimumClock=WebGLPlot$f.defaultValue(e.minimumClock,0),this._maximumClock=WebGLPlot$f.defaultValue(e.maximumClock,360),this._minimumCone=WebGLPlot$f.defaultValue(e.minimumCone,0),this._maximumCone=WebGLPlot$f.defaultValue(e.maximumCone,90),this._parameterRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._parameterRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x2887b9.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._parameterRadar.point=t)}if(e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._parameterRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._innerRadius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return null;let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=new _0x11ff81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x4e5d29.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._parameterRadar=new _0x2f0d40({id:this._UUID,point:t,rotate:new WebGLPlot$f.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,radii:new WebGLPlot$f.Cartesian3(this._radius,this._radius,this._radius),innerRadii:new WebGLPlot$f.Cartesian3(this._innerRadius,this._innerRadius,this._innerRadius),minimumClock:this._minimumClock,maximumClock:this._maximumClock,minimumCone:this._minimumCone,maximumCone:this._maximumCone,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$f.defined(this._parameterRadar))return!1;let n=this._parameterRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._parameterRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$f.defined(this._parameterRadar)&&(this._parameterRadar.destroy(),this._parameterRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),t.hasOwnProperty("innerRadius")||(t.innerRadius=this._innerRadius),t.hasOwnProperty("minimumClock")||(t.minimumClock=this._minimumClock),t.hasOwnProperty("maximumClock")||(t.maximumClock=this._maximumClock),t.hasOwnProperty("minimumCone")||(t.minimumCone=this._minimumCone),t.hasOwnProperty("maximumCone")||(t.maximumCone=this._maximumCone),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$f.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$f.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$f.defined(t.innerRadius)&&(this._innerRadius=t.innerRadius),WebGLPlot$f.defined(t.minimumClock)&&(this._minimumClock=t.minimumClock),WebGLPlot$f.defined(t.maximumClock)&&(this._maximumClock=t.maximumClock),WebGLPlot$f.defined(t.minimumCone)&&(this._minimumCone=t.minimumCone),WebGLPlot$f.defined(t.maximumCone)&&(this._maximumCone=t.maximumCone)}clone(){let e=new _0x1c4ba4;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e._innerRadius=this._innerRadius,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setInnerRadius(e){this._innerRadius=e,this._initialized=!1}getInnerRadius(){return this._innerRadius}setMinimumClock(e){this._minimumClock=e,this._initialized=!1}getMinimumClock(){return this._minimumClock}setMaximumClock(e){this._maximumClock=e,this._initialized=!1}getMaximumClock(){return this._maximumClock}setMinimumCone(e){this._minimumCone=e,this._initialized=!1}getMinimumCone(){return this._minimumCone}setMaximumCone(e){this._maximumCone=e,this._initialized=!1}getMaximumCone(){return this._maximumCone}}const _0x104f66=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x7579=_0x104f66(void 0,(function(){return _0x7579.toString().search("(((.+)+)+)+$").toString().constructor(_0x7579).search("(((.+)+)+)+$")}));_0x7579();class _0x4ffa33 extends _0x2ed19c{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._radarType=_0x49109a.PlotWarningRadar,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectWarningRadar_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$f.defaultValue(e.radius,15e4),this._warningRadar=null,this._cellAngle=5}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._warningRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x2887b9.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._warningRadar.point=t)}if(e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._warningRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return null;let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=new _0x11ff81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x4e5d29.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._warningRadar=new _0x5e75e0({id:this._UUID,point:t,rotate:new WebGLPlot$f.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,cellAngle:this._cellAngle,radii:new WebGLPlot$f.Cartesian3(this._radius,this._radius,this._radius),isFill:this._isFill,fillColor:this._fillColor.clone(),isOutline:this._isOutline,outlineColor:this._outlineColor.clone(),outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$f.defined(this._warningRadar))return!1;let n=this._warningRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._warningRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$f.defined(this._warningRadar)&&(this._warningRadar.destroy(),this._warningRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$f.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$f.defined(t.radius)&&(this._radius=t.radius)}clone(){let e=new _0x4ffa33;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}}const _0x417ea7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1274b4=_0x417ea7(void 0,(function(){return _0x1274b4.toString().search("(((.+)+)+)+$").toString().constructor(_0x1274b4).search("(((.+)+)+)+$")}));_0x1274b4();class _0x504843 extends _0x2ed19c{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._radarType=_0x49109a.PlotScanRadar,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectScanRadar_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._scanSpeed=WebGLPlot$f.defaultValue(e.scanSpeed,30),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$f.defaultValue(e.radius,15e4),this._scanVAngle=WebGLPlot$f.defaultValue(e.scanVAngle,30),this._scanHAngle=WebGLPlot$f.defaultValue(e.scanHAngle,90),this._cellAngle=WebGLPlot$f.defaultValue(e.cellAngle,5),this._scanColor=WebGLPlot$f.defaultValue(e.scanColor,new WebGLPlot$f.Color(1,0,0,.3)),this._scanedColor=WebGLPlot$f.defaultValue(e.scanedColor,new WebGLPlot$f.Color(0,1,0,.3)),this._scanRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._scanRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x2887b9.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._scanRadar.point=t)}if(e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._scanRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return null;let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=new _0x11ff81(0,0,0);return this._geoEntityParameter.getShowMode()==_0x4e5d29.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._scanRadar=new _0x5d6ff7({id:this._UUID,point:t,rotate:new WebGLPlot$f.Cartesian3(i.x,i.y,i.z-45),scale:this._radius,dScanSpeed:this._scanSpeed,shadows:this._shadows,scanVAngle:this._scanVAngle,scanHAngle:this._scanHAngle,cellAngle:this._cellAngle,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanColor:this._scanColor,scanedColor:this._scanedColor,show:!0},e),!!WebGLPlot$f.defined(this._scanRadar)}_removeEffectFromScene(e){WebGLPlot$f.defined(this._scanRadar)&&(this._scanRadar.destroy(),this._scanRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),t.hasOwnProperty("scanVAngle")||(t.scanVAngle=this._scanVAngle),t.hasOwnProperty("scanHAngle")||(t.scanHAngle=this._scanHAngle),t.hasOwnProperty("cellAngle")||(t.cellAngle=this._cellAngle),t.hasOwnProperty("scanColor")||(t.scanColor=this._scanColor.toCssColorString()),t.hasOwnProperty("scanedColor")||(t.scanedColor=this._scanedColor.toCssColorString()),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$f.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$f.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$f.defined(t.scanVAngle)&&(this._scanVAngle=t.scanVAngle),WebGLPlot$f.defined(t.scanHAngle)&&(this._scanHAngle=t.scanHAngle),WebGLPlot$f.defined(t.cellAngle)&&(this._cellAngle=t.cellAngle),WebGLPlot$f.defined(t.scanColor)&&(this._scanColor=WebGLPlot$f.Color.fromCssColorString(t.scanColor)),WebGLPlot$f.defined(t.scanedColor)&&(this._scanedColor=WebGLPlot$f.Color.fromCssColorString(t.scanedColor))}clone(){let e=new _0x504843;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e._scanVAngle=this._scanVAngle,e._scanHAngle=this._scanHAngle,e._cellAngle=this._cellAngle,e._scanColor=this._scanColor.clone(),e._scanedColor=this._scanedColor.clone(),e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanVAngle(e){this._scanVAngle=e}getScanVAngle(){return this._scanVAngle}setScanHAngle(e){this._scanHAngle=e}getScanHAngle(){return this._scanHAngle}setCellAngle(e){this._cellAngle=e}getCellAngle(){return this._cellAngle}setScanColor(e){this._scanColor=e}getScanColor(){return this._scanColor}setScanedColor(e){this._scanedColor=e}getScanedColor(){return this._scanedColor}}const _0x5d789f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x10b944=_0x5d789f(void 0,(function(){return _0x10b944.toString().search("(((.+)+)+)+$").toString().constructor(_0x10b944).search("(((.+)+)+)+$")}));_0x10b944();class _0x2c9b58 extends _0x2ed19c{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._radarType=_0x49109a.PlotRotateRadar,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectRotateRadar_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0);var t=[new WebGLPlot$f.Cartesian3(0,2e3,0),new WebGLPlot$f.Cartesian3(2e4,8e3,0),new WebGLPlot$f.Cartesian3(4e4,2e3,0),new WebGLPlot$f.Cartesian3(0,2e3,0)];this._customPts=WebGLPlot$f.defaultValue(e.customPts,t),this._customAngle=WebGLPlot$f.defaultValue(e.customAngle,360),this._rotateRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._rotateRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x2887b9.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._rotateRadar.point=t)}if(e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._rotateRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._rotateRadar.scale*=t}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return null;let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=new _0x11ff81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x4e5d29.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._rotateRadar=new _0x467388({id:this._UUID,point:t,rotate:new WebGLPlot$f.Cartesian3(i.x,i.y,i.z-45),dScanSpeed:this._scanSpeed,shadows:this._shadows,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,customPts:this._customPts,rotateAngle:this._customAngle,slicePartitions:this._customAngle/5,show:!0},e),!WebGLPlot$f.defined(this._rotateRadar))return!1;this._rotateRadar.scale=this._geoEntityParameter.getModelScale();let n=this._rotateRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._rotateRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$f.defined(this._rotateRadar)&&(this._rotateRadar.destroy(),this._rotateRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("customAngle")||(t.customAngle=this._customAngle);return t.hasOwnProperty("customPts")||(t.customPts=[]),this._customPts.forEach((e=>{t.customPts.push({x:e.x,y:e.y,z:e.z})})),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$f.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$f.defined(t.customAngle)&&(this._customAngle=t.customAngle),WebGLPlot$f.defined(t.customPts)&&(this._customPts=[],t.customPts.forEach((e=>{this._customPts.push(new WebGLPlot$f.Cartesian3(e.x,e.y,e.z))})))}clone(){let e=new _0x2c9b58;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._customAngle=this._customAngle,e._customPts=[],this._customPts.forEach((t=>{e._customPts.push(new WebGLPlot$f.Cartesian3(t.x,t.y,t.z))})),e}}const _0x27b8b4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x24b850=_0x27b8b4(void 0,(function(){return _0x24b850.toString().search("(((.+)+)+)+$").toString().constructor(_0x24b850).search("(((.+)+)+)+$")}));_0x24b850();class _0x3f9f2a{constructor(){}static createGeoEntityEffectFromJson(e){let t,i,n,r,o=JSON.parse(e);return WebGLPlot$f.defined(o.type)&&(i=o.type,o.type===_0x3b1c90.COMMUNICATIONLINK?WebGLPlot$f.defined(o.linkType)&&(n=o.linkType):o.type===_0x3b1c90.RADAR&&WebGLPlot$f.defined(o.radarType)&&(r=o.radarType),t=this.createGeoEntityEffectFromType({effectType:i,linkType:n,radarType:r}),WebGLPlot$f.defined(t)&&t.fromJSON(e)),t}static createGeoEntityEffectFromType(e){let t,i=(e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT)).effectType,n=e.linkType,r=e.radarType;switch(i){case _0x3b1c90.WAKE:case _0x3b1c90.ROTORWASH:break;case _0x3b1c90.FIRESMOKE:t=new _0x302fab;break;case _0x3b1c90.BURST:t=new _0x318fc4;break;case _0x3b1c90.TAILFLAME:t=new _0x3c13c7;break;case _0x3b1c90.TAILGAS:t=new _0x1914c9;break;case _0x3b1c90.RADAR:switch(r){case _0x49109a.PlotMechanicalRadar:t=new _0x28004f;break;case _0x49109a.PlotParameterRadar:t=new _0x1c4ba4;break;case _0x49109a.PlotWarningRadar:t=new _0x4ffa33;break;case _0x49109a.PlotScanRadar:t=new _0x504843;break;case _0x49109a.PlotRotateRadar:t=new _0x2c9b58}break;case _0x3b1c90.SCANWAVE:t=new _0x3fbded;break;case _0x3b1c90.SCANCONE:t=new _0x5433aa;break;case _0x3b1c90.DETECTIONCONE:t=new _0x1232ba;break;case _0x3b1c90.TRACKLINE:t=new _0x21af16;break;case _0x3b1c90.ATTACKLINE:t=new _0x2c1685;break;case _0x3b1c90.SIGN:t=new _0x137383;break;case _0x3b1c90.COMMUNICATIONLINK:switch(n){case _0x4fea45.BASICLINE:t=new _0xc54aac;break;case _0x4fea45.ARROW:t=new _0x412cba;break;case _0x4fea45.TUBULAR:t=new _0x592290;break;case _0x4fea45.METEORLINE:t=new _0x115b1a;break;case _0x4fea45.DASHLINE:t=new _0x5df5f1}break;case _0x3b1c90.DYNAMICMODEL:t=new _0x4d608c;break;case _0x3b1c90.TEXT:break;case _0x3b1c90.EXTENDACTION:t=new _0xfa8fd4;break;case _0x3b1c90.AUGMENT:t=new _0x457e81;break;case _0x3b1c90.ANNULARDIFFUSION:t=new _0x367e91}return t}static linkToAnotherGeoEntity(e,t,i){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t))return!1;let n=null;if(t.getStartUUID()==e?n=t.getEndUUID():t.getEndUUID()===e&&(n=t.getStartUUID()),!WebGLPlot$f.defined(n))return!1;let r=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(n);WebGLPlot$f.defined(r)||(r=_0x41dd10.getInstance().getGeoEntityManager().getGeoEntityByUUID(n)),WebGLPlot$f.defined(r)||(r=_0x41dd10.getInstance().getSatelliteEntityManager().getSatelliteEntityByUUID(n));let o=!1;return WebGLPlot$f.defined(r)&&(o=i?r._connectLinkToGeoEntity(t):r._disConnectLinkToGeoEntity(t)),o}static getGeoEntityParamByUUID(e){if(!WebGLPlot$f.defined(e))return;let t,i=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(e);return WebGLPlot$f.defined(i)||(i=_0x41dd10.getInstance().getGeoEntityManager().getGeoEntityByUUID(e)),WebGLPlot$f.defined(i)||(i=_0x41dd10.getInstance().getSatelliteEntityManager().getSatelliteEntityByUUID(e)),WebGLPlot$f.defined(i)&&(t=i.getGeoEntityParameter()),t}static getResourceURI(){return _0x41dd10.getInstance().getURI()}static getDefaultName(e){let t=(e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT)).effectType,i=e.linkType,n=e.radarType,r="";switch(t){case _0x3b1c90.WAKE:case _0x3b1c90.ROTORWASH:break;case _0x3b1c90.FIRESMOKE:r="燃烧";break;case _0x3b1c90.BURST:r="爆炸";break;case _0x3b1c90.TAILFLAME:r="尾焰";break;case _0x3b1c90.TAILGAS:r="尾气";break;case _0x3b1c90.RADAR:switch(n){case _0x49109a.PlotMechanicalRadar:r="机械雷达";break;case _0x49109a.PlotParameterRadar:r="参数雷达";break;case _0x49109a.PlotWarningRadar:r="预警雷达";break;case _0x49109a.PlotScanRadar:r="扫描雷达";break;case _0x49109a.PlotRotateRadar:r="旋转雷达"}break;case _0x3b1c90.SCANWAVE:r="扫描波";break;case _0x3b1c90.SCANCONE:r="扫描棱锥";break;case _0x3b1c90.DETECTIONCONE:r="探视锥";break;case _0x3b1c90.TRACKLINE:r="尾迹";break;case _0x3b1c90.ATTACKLINE:r="攻击线";break;case _0x3b1c90.SIGN:r="标牌";break;case _0x3b1c90.COMMUNICATIONLINK:switch(i){case _0x4fea45.BASICLINE:r="基础线";break;case _0x4fea45.ARROW:r="箭头线";break;case _0x4fea45.TUBULAR:r="管状线";break;case _0x4fea45.METEORLINE:r="流星线";break;case _0x4fea45.DASHLINE:r="间断线"}break;case _0x3b1c90.DYNAMICMODEL:r="渐变体";break;case _0x3b1c90.TEXT:r="文本";break;case _0x3b1c90.EXTENDACTION:r="扩展特效";break;case _0x3b1c90.AUGMENT:r="增强";break;case _0x3b1c90.ANNULARDIFFUSION:r="扩散圆"}return r}}const _0x5cfeb3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x274d2a=_0x5cfeb3(void 0,(function(){return _0x274d2a.toString().search("(((.+)+)+)+$").toString().constructor(_0x274d2a).search("(((.+)+)+)+$")}));_0x274d2a();class _0x5589fe{constructor(e){this._geoGraphicObject=e,this._name="",this._geoEntityEffects=[];let t=this;this._getScene().preUpdate.addEventListener((function(){let e=t.getGeoEntityParameter();if(e.getIsDistanceChangeMode()){let i=_0x2887b9.calcCameraDistance(e.getPosition(),t._getScene());i>e.getChangeModeDistance()&&e.getShowMode()!==_0x4e5d29.Picture?e.setShowMode(_0x4e5d29.Picture):i<e.getChangeModeDistance()&&e.getShowMode()!==_0x4e5d29.Marker&&e.setShowMode(_0x4e5d29.Marker),t.setGeoEntityParameter(e)}})),this._isModified=!1,this._isMoveGeoEntity=!1,this._isDistanceChangeMode=!1,this._changeModeDistance=5e3}_getGeoGraphicObject(){return this._geoGraphicObject}_getScene(){return this._geoGraphicObject.layer._scene}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){this._isMoveGeoEntity||_0x41dd10.getInstance()._saveGeoEntity(!1)}destroy(){this.clearGeoEntityEffects()}clone(e){e.id=WebGLPlot$f.createGuid();let t=new _0x5589fe(e);t._name=this._name;let i=[];return this._geoEntityEffects.forEach((e=>{let t=e.clone();e.getType()!=_0x3b1c90.COMMUNICATIONLINK&&i.push(t)})),t.updateGeoEntityEffects(i),t}setName(e){this._name=e,this._isModified=!0,this._save()}getName(){return this._name}setUUID(e){this._geoGraphicObject.id=e}getUUID(){return this._geoGraphicObject.id}setGeoEntityParameter(e){WebGLPlot$f.defined(this._geoGraphicObject)&&(e.isPositionUpdate()&&(this._geoGraphicObject.localPoints=[e.getPosition()]),e.isModelScaleUpdate()&&(this._geoGraphicObject.modelScale=e.getModelScale()),e.isVectorScaleUpdate()&&(this._geoGraphicObject.vectorScale=e.getVectorScale()),e.isModelRotateUpdate()&&(this._geoGraphicObject.modelRotate=e.getModelRotate()),e.isVectorRotateUpdate()&&(this._geoGraphicObject.vectorRotate=e.getVectorRotate()),e.isModelPathUpdate()&&(this._geoGraphicObject.modelPath=e.getModelPath()),e.isVisibleUpdate()&&(this._geoGraphicObject.display=e.isVisible()),e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())):e.isDotPlotLibIDUpdate()&&!e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())):!e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()&&(this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())),e.isDotPlotStyleUpdate()&&e.getDotPlotStyle().setGeoGraphicObjectStyle(this._geoGraphicObject),e.isPictureSymbolSizeUpdate()&&(this._geoGraphicObject.pictureSymbolSize=e.getPictureSymbolSize()),e.isPicturePathUpdate()&&(this._geoGraphicObject.picturePath=e.getPicturePath()),e.isShowModeUpdate()&&this._geoGraphicObject.setGeoEntityShowMode(e.getShowMode()),e.isChangeModeDistanceUpdate()&&(this._changeModeDistance=e.getChangeModeDistance()),e.isDistanceChangeModeUpdate()&&(this._isDistanceChangeMode=e.getIsDistanceChangeMode()),this._geoEntityEffects.forEach((e=>{e.setGeoEntityParameter(this.getGeoEntityParameter(),this.getUUID())})),this._isModified=!0,this._save())}getGeoEntityParameter(){if(WebGLPlot$f.defined(this._geoGraphicObject)){let e=new _0x487d97,t=new _0x24b262;return t.getGeoGraphicObjectStyle(this._geoGraphicObject),e._initParm(this._geoGraphicObject.localPoints[0],this._geoGraphicObject.modelScale,this._geoGraphicObject.vectorScale,this._geoGraphicObject.modelRotate,this._geoGraphicObject.vectorRotate,this._geoGraphicObject.modelPath,this._geoGraphicObject.display,this._geoGraphicObject.__dotPlotLibID,this._geoGraphicObject.__dotPlotCode,t,this._geoGraphicObject.pictureSymbolSize,this._geoGraphicObject.picturePath,this._geoGraphicObject.getGeoEntityShowMode(),this._isDistanceChangeMode,this._changeModeDistance),e}}toJson(){if(WebGLPlot$f.defined(this._geoGraphicObject)){let e={},t=JSON.stringify(this._geoGraphicObject.getSymbolData());if(e.hasOwnProperty("geoGraphicObject")||(e.geoGraphicObject=t),!e.hasOwnProperty("geoEntity")){let t={};t.hasOwnProperty("name")||(t.name=this._name),t.hasOwnProperty("isDistanceChangeMode")||(t.isDistanceChangeMode=this._isDistanceChangeMode),t.hasOwnProperty("changeModeDistance")||(t.changeModeDistance=this._changeModeDistance),t.hasOwnProperty("geoEntityEffects")||(t.geoEntityEffects=[],this._geoEntityEffects.forEach((e=>{(e.getType()!=_0x3b1c90.COMMUNICATIONLINK||e.getStartUUID()===this.getUUID())&&t.geoEntityEffects.push(e.toJSON())}))),e.geoEntity=JSON.stringify(t)}return JSON.stringify(e)}return""}fromJson(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.isDistanceChangeMode)&&(this._isDistanceChangeMode=t.isDistanceChangeMode),WebGLPlot$f.defined(t.changeModeDistance)&&(this._changeModeDistance=t.changeModeDistance),WebGLPlot$f.defined(t.geoEntityEffects)&&t.geoEntityEffects.forEach((e=>{let t=_0x3f9f2a.createGeoEntityEffectFromJson(e);WebGLPlot$f.defined(t)&&(t.setGeoEntity(this),t.getType()!=_0x3b1c90.COMMUNICATIONLINK&&this.addGeoEntityEffect(t))}))}getGeoEntityEffects(){return this._geoEntityEffects}addGeoEntityEffect(e){for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID())return!1;let t=this._getScene();return WebGLPlot$f.defined(t)&&(e.setGeoEntityParameter(this.getGeoEntityParameter(),this.getUUID()),e.addEffectToScene(t)),this._geoEntityEffects.push(e),e.getType()===_0x3b1c90.COMMUNICATIONLINK&&_0x3f9f2a.linkToAnotherGeoEntity(this.getUUID(),e,!0),this._isModified=!0,this._save(),!0}removeGeoEntityEffect(e){for(let t=0;t<this._geoEntityEffects.length;t++){const i=this._geoEntityEffects[t];if(i.getUUID()===e){i.getType()===_0x3b1c90.COMMUNICATIONLINK&&_0x3f9f2a.linkToAnotherGeoEntity(this.getUUID(),i,!1);let e=this._getScene();return WebGLPlot$f.defined(e)&&i.removeEffectFromScene(e),this._geoEntityEffects.splice(t,1),!0}}return this._isModified=!0,this._save(),!1}updateGeoEntityEffects(e){for(let e=0;e<this._geoEntityEffects.length;e++){const t=this._geoEntityEffects[e];t.getType()===_0x3b1c90.COMMUNICATIONLINK&&_0x3f9f2a.linkToAnotherGeoEntity(this.getUUID(),t,!1);let i=this._getScene();WebGLPlot$f.defined(i)&&t.removeEffectFromScene(i)}this._geoEntityEffects.splice(0),e.forEach((e=>{this.addGeoEntityEffect(e)})),this._isModified=!0,this._save()}updateGeoEntityEffect(e){let t=-1;for(let i=0;i<this.geoEntityEffects.length;i++)if(this.geoEntityEffects[i].getUUID()===e.getUUID()){t=i;break}-1!==t&&(this.removeGeoEntityEffect(e.getUUID()),this.addGeoEntityEffect(e),this._isModified=!0,this._save())}clearGeoEntityEffects(){this.updateGeoEntityEffects([])}_connectLinkToGeoEntity(e){if(!WebGLPlot$f.defined(e))return!1;for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID())return!1;return this._geoEntityEffects.push(e),!0}_disConnectLinkToGeoEntity(e){if(!WebGLPlot$f.defined(e))return!1;let t=!1,i=-1;for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID()){i=t;break}return-1!=i&&(this._geoEntityEffects.splice(i,1),t=!0),t}}const _0x163d1b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x227515=_0x163d1b(void 0,(function(){return _0x227515.toString().search("(((.+)+)+)+$").toString().constructor(_0x227515).search("(((.+)+)+)+$")}));_0x227515();class _0x1fa8f7{constructor(){this._geoEntitys=new Map,this._geoEntityRootNode=new _0x1e39c8("GeoEntityRootNode",!0),this._geoEntityLayer=void 0,this._geoEntityEditControl=void 0,this._geoEntityDrawControl=void 0,this._addGeoEntitys=[],this._removeEntityUUIDs=[]}_setScene(e){this._geoEntityLayer=new _0x267b40(e,"GeoEntitys"),e.plotLayers.add(this._geoEntityLayer),this._geoEntityEditControl=new _0x5bdde1(e,this._geoEntityLayer),this._geoEntityDrawControl=new _0x1ae927(e,this._geoEntityLayer)}_getAddAndRemoveGeoEntitys(){return{add:this._addGeoEntitys,remove:this._removeEntityUUIDs}}_clearAddAndRemoveGeoEntitys(){this._addGeoEntitys.splice(0),this._removeEntityUUIDs.splice(0)}_save(){_0x41dd10.getInstance()._saveGeoEntity(!1)}_removeAllGeoEntityFromScene(){this._geoEntitys.forEach(((e,t)=>{e.clearGeoEntityEffects();let i=e._getGeoGraphicObject();WebGLPlot$f.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i)})),this._geoEntitys.clear(),this._geoEntityRootNode._clear()}addGeoEntity(e){if(WebGLPlot$f.defined(this.getGeoEntityByUUID(e.getGeoEntity().getUUID())))return"";if(this._geoEntityLayer.addFeature(e)){let t=new _0x5589fe(e);e.setGeoEntity(t);let i=t.getUUID();return this._geoEntitys.set(i,t),this._geoEntityRootNode.createGeoEntityNode(t),this._addGeoEntitys.push(t),this._save(),i}return""}addGeoEntityModel(e,t,i,n,r){let o=this;this._geoEntityLayer.createSymbol(0,99999,[t],{url:i},(function(t){t.feature.__dotPlotLibID=0,t.feature.__dotPlotCode=99998;let i=_0x41dd10.getInstance().getURI();t.feature.picturePath=i+"/iserver/mgis/situationSimulation/Picture/DafaultPicture.png",WebGLPlot$f.defined(r)&&(WebGLPlot$f.defined(r.modelScale)&&(t.feature.modelScale=r.modelScale),WebGLPlot$f.defined(r.modelRotate)&&(t.feature.modelRotate=r.modelRotate),WebGLPlot$f.defined(r.picturePath)&&(t.feature.picturePath=r.picturePath),WebGLPlot$f.defined(r.pictureSymbolSize)&&(t.feature.pictureSymbolSize=r.pictureSymbolSize),WebGLPlot$f.defined(r.plotLibID)&&WebGLPlot$f.defined(r.plotCode)&&(t.feature.__dotPlotLibID=r.plotLibID,t.feature.__dotPlotCode=r.plotCode),WebGLPlot$f.defined(r.dotPlotStyle)&&r.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$f.defined(r.vectorScale)&&(t.feature.vectorScale=r.vectorScale),WebGLPlot$f.defined(r.vectorRotate)&&(t.feature.vectorRotate=r.vectorRotate),WebGLPlot$f.defined(r.visible)&&(t.feature.display=r.visible));let a=new _0x5589fe(t.feature);t.feature.setGeoEntity(a),a.setName(e);let s=a.getUUID();o._geoEntitys.set(s,a),o._geoEntityRootNode.createGeoEntityNode(a),"function"==typeof n&&n({UUID:s}),o._addGeoEntitys.push(a),o._save()}))}addGeoEntityPicture(e,t,i,n,r){let o=this;this._geoEntityLayer.createSymbol(0,20,[t],{url:i},(function(t){t.feature.__dotPlotLibID=0,t.feature.__dotPlotCode=99998;let i=_0x41dd10.getInstance().getURI();t.feature.modelPath=i+"/iserver/mgis/situationSimulation/Model/DafaultModel.gltf",WebGLPlot$f.defined(r)&&(WebGLPlot$f.defined(r.modelScale)&&(t.feature.modelScale=r.modelScale),WebGLPlot$f.defined(r.modelRotate)&&(t.feature.modelRotate=r.modelRotate),WebGLPlot$f.defined(r.modelPath)&&(t.feature.modelPath=r.modelPath),WebGLPlot$f.defined(r.pictureSymbolSize)&&(t.feature.pictureSymbolSize=r.pictureSymbolSize),WebGLPlot$f.defined(r.plotLibID)&&WebGLPlot$f.defined(r.plotCode)&&(t.feature.__dotPlotLibID=r.plotLibID,t.feature.__dotPlotCode=r.plotCode),WebGLPlot$f.defined(r.dotPlotStyle)&&r.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$f.defined(r.vectorScale)&&(t.feature.vectorScale=r.vectorScale),WebGLPlot$f.defined(r.vectorRotate)&&(t.feature.vectorRotate=r.vectorRotate),WebGLPlot$f.defined(r.visible)&&(t.feature.display=r.visible));let a=new _0x5589fe(t.feature);t.feature.setGeoEntity(a),a.setName(e);let s=a.getUUID();o._geoEntitys.set(s,a),o._geoEntityRootNode.createGeoEntityNode(a),"function"==typeof n&&n({UUID:s}),o._addGeoEntitys.push(a),o._save()}))}addGeoEntityDotPlot(e,t,i,n,r,o){let a=this;this._geoEntityLayer.createSymbol(i,n,[t],(function(t){t.feature.__dotPlotLibID=t.feature.libID,t.feature.__dotPlotCode=t.feature.code;let i=_0x41dd10.getInstance().getURI();t.feature.modelPath=i+"/iserver/mgis/situationSimulation/Model/DafaultModel.gltf",t.feature.picturePath=i+"/iserver/mgis/situationSimulation/Picture/DafaultPicture.png",WebGLPlot$f.defined(o)&&(WebGLPlot$f.defined(o.modelScale)&&(t.feature.modelScale=o.modelScale),WebGLPlot$f.defined(o.modelRotate)&&(t.feature.modelRotate=o.modelRotate),WebGLPlot$f.defined(o.modelPath)&&(t.feature.modelPath=o.modelPath),WebGLPlot$f.defined(o.picturePath)&&(t.feature.picturePath=o.picturePath),WebGLPlot$f.defined(o.pictureSymbolSize)&&(t.feature.pictureSymbolSize=o.pictureSymbolSize),WebGLPlot$f.defined(o.dotPlotStyle)&&o.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$f.defined(o.vectorScale)&&(t.feature.vectorScale=o.vectorScale),WebGLPlot$f.defined(o.vectorRotate)&&(t.feature.vectorRotate=o.vectorRotate),WebGLPlot$f.defined(o.visible)&&(t.feature.display=o.visible));let n=new _0x5589fe(t.feature);t.feature.setGeoEntity(n),n.setName(e);let s=n.getUUID();a._geoEntitys.set(s,n),a._geoEntityRootNode.createGeoEntityNode(n),"function"==typeof r&&r({UUID:s}),a._addGeoEntitys.push(n),a._save()}))}removeGeoEntity(e){let t=this._geoEntitys.get(e);if(WebGLPlot$f.defined(t)){let i=t._getGeoGraphicObject();if(t.clearGeoEntityEffects(),WebGLPlot$f.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i))return this._geoEntityRootNode._removeGeoEntityNode(e),this._geoEntitys.delete(e),this._removeEntityUUIDs.push(e),this._save(),!0}return!1}removeAllGeoEntity(){this._geoEntitys.forEach(((e,t)=>{e.clearGeoEntityEffects();let i=e._getGeoGraphicObject();WebGLPlot$f.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i),this._removeEntityUUIDs.push(t)})),this._geoEntitys.clear(),this._geoEntityRootNode._clear(),this._save()}getGeoEntityByUUID(e){return this._geoEntitys.get(e)}isGeoEntityLayerEditable(){return!!WebGLPlot$f.defined(this._geoEntityEditControl)&&this._geoEntityEditControl.isActive()}setGeoEntityLayerEditable(e){WebGLPlot$f.defined(this._geoEntityEditControl)&&(e?this._geoEntityEditControl.activate():this._geoEntityEditControl.deactivate())}getGeoEntityRootNode(){return this._geoEntityRootNode}getGeoEntitys(){return this._geoEntitys}toJson(){let e=new Map;this._geoEntitys.forEach(((t,i)=>{e.set(t.getUUID(),t.toJson())}));let t=this._geoEntityRootNode._toJson();return{geoEntityJsons:e,geoEntityNodeJson:t}}fromJson(e,t){let i=e.geoEntityJsons,n=e.geoEntityNodeJson;if(this.removeAllGeoEntity(!1),WebGLPlot$f.defined(this._geoEntityLayer)){let e=this,n=[],r=new Map;i.forEach(((o,a)=>{if(o.length>0){let s=JSON.parse(o);WebGLPlot$f.defined(s.geoGraphicObject)&&this._geoEntityLayer.geoJsonToGeoGraphicObject(JSON.parse(s.geoGraphicObject),(function(o){if(WebGLPlot$f.defined(s.geoEntity)){let l=o.feature;if(WebGLPlot$f.defined(l)){let o=new _0x5589fe(l);l.setGeoEntity(o),o.fromJson(s.geoEntity),e._geoEntitys.set(a,o),n.push(a),"function"==typeof t&&n.length===i.size&&t({UUIDs:n}),r.set(o,s)}}}))}})),this._fromJsonLink(r)}this._geoEntityRootNode._clear(),n.length>0&&this._geoEntityRootNode._fromJson(n,this._geoEntityRootNode)}_fromJsonLink(e){e.forEach(((e,t)=>{let i=JSON.parse(e.geoEntity);WebGLPlot$f.defined(i.geoEntityEffects)&&i.geoEntityEffects.forEach((e=>{let i=_0x3f9f2a.createGeoEntityEffectFromJson(e);WebGLPlot$f.defined(i)&&i.getType()==_0x3b1c90.COMMUNICATIONLINK&&t.getUUID()===i.getStartUUID()&&t.addGeoEntityEffect(i)}))}))}}function _0x124bda(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),WebGLPlot$f.PolylineCollection.call(this,e),this._visible=WebGLPlot$f.defaultValue(e.visible,!0),this._orbitsWidth=WebGLPlot$f.defaultValue(e.orbitsWidth,1),this._orbitsColor=WebGLPlot$f.defaultValue(e.orbitsColor,new WebGLPlot$f.Color(.8,.8,.2,.39)),this._initialized=!1}(function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();var i=function(){};i.prototype=WebGLPlot$f.PolylineCollection.prototype,_0x124bda.prototype=new i,_0x124bda.prototype.constructor=_0x124bda,_0x124bda.prototype.update=function(e){!this._visible&&!this._initialized||(i.prototype.update.apply(this,Array.prototype.slice.apply(arguments)),this._initialized&&(this._initialized=!1))}})(),Object.defineProperties(_0x124bda.prototype,{visible:{get:function(){return this._visible},set:function(e){for(let t=0;t<this.length;t++)this.get(t).show=e;this._visible=e,this._initialized=!0}},orbitsWidth:{get:function(){return this._orbitsWidth},set:function(e){for(let t=0;t<this.length;t++)this.get(t).width=e;this._orbitsWidth=e,this._initialized=!0}},orbitsColor:{get:function(){return this._orbitsWidth},set:function(e){for(let t=0;t<this.length;t++)this.get(t).material=WebGLPlot$f.Material.fromType("Color",{color:e});this._orbitsColor=e,this._initialized=!0}}}),function(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));r(),"object"==typeof exports&&typeof module<"u"?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).SatelliteToolkit=t()}(void 0,(function(){var e=Math.PI,t=2*e,i=e/180,n=180/e,r=1440,o=398600.8,a=6378.135,s=60/Math.sqrt(650942.9922085947),l=a*s/60,u=1/s,c=.001082616,h=-253881e-11,d=-165597e-11,f=h/c,p=2/3;function _(e,t){for(var i=[31,e%4==0?29:28,31,30,31,30,31,31,30,31,30,31],n=Math.floor(t),r=1,o=0;n>o+i[r-1]&&r<12;)o+=i[r-1],r+=1;var a=r,s=n-o,l=24*(t-n),u=Math.floor(l);l=60*(l-u);var c=Math.floor(l);return{mon:a,day:s,hr:u,minute:c,sec:60*(l-c)}}function m(e,t,i,n,r,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;return 367*e-Math.floor(7*(e+Math.floor((t+9)/12))*.25)+Math.floor(275*t/9)+i+1721013.5+((a/6e4+o/60+r)/60+n)/24}function g(e,t,i,n,r,o,a){if(e instanceof Date){var s=e;return m(s.getUTCFullYear(),s.getUTCMonth()+1,s.getUTCDate(),s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds())}return m(e,t,i,n,r,o,a)}function x(i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b=i.e3,T=i.ee2,C=i.peo,S=i.pgho,w=i.pho,E=i.pinco,P=i.plo,A=i.se2,L=i.se3,M=i.sgh2,R=i.sgh3,I=i.sgh4,O=i.sh2,D=i.sh3,B=i.si2,N=i.si3,F=i.sl2,U=i.sl3,z=i.sl4,G=i.t,V=i.xgh2,k=i.xgh3,W=i.xgh4,H=i.xh2,q=i.xh3,j=i.xi2,Y=i.xi3,X=i.xl2,K=i.xl3,Q=i.xl4,Z=i.zmol,J=i.zmos,ee=n.init,te=n.opsmode,ie=n.ep,ne=n.inclp,re=n.nodep,oe=n.argpp,ae=n.mp;$=J+119459e-10*G,"y"===ee&&($=J),y=$+.0335*Math.sin($);var se=A*(c=.5*(g=Math.sin(y))*g-.25)+L*(h=-.5*g*Math.cos(y)),le=B*c+N*h,ue=F*c+U*h+z*g,ce=M*c+R*h+I*g,he=O*c+D*h;return $=Z+.00015835218*G,"y"===ee&&($=Z),y=$+.1098*Math.sin($),d=se+(T*(c=.5*(g=Math.sin(y))*g-.25)+b*(h=-.5*g*Math.cos(y))),_=le+(j*c+Y*h),m=ue+(X*c+K*h+Q*g),f=ce+(V*c+k*h+W*g),p=he+(H*c+q*h),"n"===ee&&(m-=P,f-=S,p-=w,ne+=_-=E,ie+=d-=C,s=Math.sin(ne),a=Math.cos(ne),ne>=.2?(oe+=f-=a*(p/=s),re+=p,ae+=m):(r=s*(u=Math.sin(re)),o=s*(l=Math.cos(re)),r+=p*l+_*a*u,o+=-p*u+_*a*l,(re%=t)<0&&"a"===te&&(re+=t),x=ae+oe+a*re,x+=m+f-_*re*s,v=re,(re=Math.atan2(r,o))<0&&"a"===te&&(re+=t),Math.abs(v-re)>e&&(re<v?re+=t:re-=t),oe=x-(ae+=m)-a*re)),{ep:ie,inclp:ne,nodep:re,argpp:oe,mp:ae}}function v(e){var n=(e-2451545)/36525,r=-62e-7*n*n*n+.093104*n*n+3164400184.812866*n+67310.54841;return(r=r*i/240%t)<0&&(r+=t),r}function y(){return(arguments.length<=0?void 0:arguments[0])instanceof Date||arguments.length>1?v(g.apply(void 0,arguments)):v.apply(void 0,arguments)}function $(i,n){var r,o,u,c,h,d,_,m,g,v,y,$,b,T,C,S,w,E,P,A,L,M,R,I,O,D;i.t=n,i.error=0;var B=i.mo+i.mdot*i.t,N=i.argpo+i.argpdot*i.t,F=i.nodeo+i.nodedot*i.t;m=N,A=B;var U=i.t*i.t;if(M=F+i.nodecf*U,S=1-i.cc1*i.t,w=i.bstar*i.cc4*i.t,E=i.t2cof*U,1!==i.isimp){d=i.omgcof*i.t;var z=1+i.eta*Math.cos(B);A=B+(C=d+i.xmcof*(z*z*z-i.delmo)),m=N-C,$=(y=U*i.t)*i.t,S=S-i.d2*U-i.d3*y-i.d4*$,w+=i.bstar*i.cc5*(Math.sin(A)-i.sinmao),E=E+i.t3cof*y+$*(i.t4cof+i.t*i.t5cof)}L=i.no;var G=i.ecco;if(P=i.inclo,"d"===i.method){b=i.t;var V=function(e){var i,n,r,o,a,s,l,u,c=e.irez,h=e.d2201,d=e.d2211,f=e.d3210,p=e.d3222,_=e.d4410,m=e.d4422,g=e.d5220,x=e.d5232,v=e.d5421,y=e.d5433,$=e.dedt,b=e.del1,T=e.del2,C=e.del3,S=e.didt,w=e.dmdt,E=e.dnodt,P=e.domdt,A=e.argpo,L=e.argpdot,M=e.t,R=e.tc,I=e.gsto,O=e.xfact,D=e.xlamo,B=e.no,N=e.atime,F=e.em,U=e.argpm,z=e.inclm,G=e.xli,V=e.mm,k=e.xni,W=e.nodem,H=e.nm,q=.13130908,j=2.8843198,Y=.37448087,X=5.7686396,K=.95240898,Q=1.8014998,Z=1.050833,J=4.4108898,ee=259200,te=0,ie=0,ne=(I+.0043752690880113*R)%t;if(F+=$*M,z+=S*M,U+=P*M,W+=E*M,V+=w*M,0!==c){(0===N||M*N<=0||Math.abs(M)<Math.abs(N))&&(N=0,k=B,G=D),i=M>0?720:-720;for(var re=381;381===re;)2!==c?(l=b*Math.sin(G-q)+T*Math.sin(2*(G-j))+C*Math.sin(3*(G-Y)),a=k+O,s=b*Math.cos(G-q)+2*T*Math.cos(2*(G-j))+3*C*Math.cos(3*(G-Y)),s*=a):(r=(u=A+L*N)+u,n=G+G,l=h*Math.sin(r+G-X)+d*Math.sin(G-X)+f*Math.sin(u+G-K)+p*Math.sin(-u+G-K)+_*Math.sin(r+n-Q)+m*Math.sin(n-Q)+g*Math.sin(u+G-Z)+x*Math.sin(-u+G-Z)+v*Math.sin(u+n-J)+y*Math.sin(-u+n-J),a=k+O,s=h*Math.cos(r+G-X)+d*Math.cos(G-X)+f*Math.cos(u+G-K)+p*Math.cos(-u+G-K)+g*Math.cos(u+G-Z)+x*Math.cos(-u+G-Z)+2*(_*Math.cos(r+n-Q)+m*Math.cos(n-Q)+v*Math.cos(u+n-J)+y*Math.cos(-u+n-J)),s*=a),Math.abs(M-N)>=720?re=381:(ie=M-N,re=0),381===re&&(G+=a*i+l*ee,k+=l*i+s*ee,N+=i);H=k+l*ie+s*ie*ie*.5,o=G+a*ie+l*ie*ie*.5,1!==c?(V=o-2*W+2*ne,te=H-B):(V=o-W-U+ne,te=H-B),H=B+te}return{atime:N,em:F,argpm:U,inclm:z,xli:G,mm:V,xni:k,nodem:W,dndt:te,nm:H}}({irez:i.irez,d2201:i.d2201,d2211:i.d2211,d3210:i.d3210,d3222:i.d3222,d4410:i.d4410,d4422:i.d4422,d5220:i.d5220,d5232:i.d5232,d5421:i.d5421,d5433:i.d5433,dedt:i.dedt,del1:i.del1,del2:i.del2,del3:i.del3,didt:i.didt,dmdt:i.dmdt,dnodt:i.dnodt,domdt:i.domdt,argpo:i.argpo,argpdot:i.argpdot,t:i.t,tc:b,gsto:i.gsto,xfact:i.xfact,xlamo:i.xlamo,no:i.no,atime:i.atime,em:G,argpm:m,inclm:P,xli:i.xli,mm:A,xni:i.xni,nodem:M,nm:L});G=V.em,m=V.argpm,P=V.inclm,A=V.mm,M=V.nodem,L=V.nm}if(L<=0)return i.error=2,[!1,!1];var k=Math.pow(s/L,p)*S*S;if(L=s/Math.pow(k,1.5),(G-=w)>=1||G<-.001)return i.error=1,[!1,!1];G<1e-6&&(G=1e-6),I=(A+=i.no*E)+m+M;var W=G;if(R=P,g=m%=t,D=M%=t,O=A=((I%=t)-m-M)%t,c=Math.sin(P),u=Math.cos(P),"d"===i.method){var H=x(i,{inclo:i.inclo,init:"n",ep:W,inclp:R,nodep:D,argpp:g,mp:O,opsmode:i.operationmode});if(W=H.ep,D=H.nodep,g=H.argpp,O=H.mp,(R=H.inclp)<0&&(R=-R,D+=e,g-=e),W<0||W>1)return i.error=3,[!1,!1]}"d"===i.method&&(c=Math.sin(R),u=Math.cos(R),i.aycof=-.5*f*c,Math.abs(u+1)>15e-13?i.xlcof=-.25*f*c*(3+5*u)/(1+u):i.xlcof=-.25*f*c*(3+5*u)/15e-13);var q=W*Math.cos(g);C=1/(k*(1-W*W));var j=W*Math.sin(g)+C*i.aycof,Y=(O+g+D+C*i.xlcof*q-D)%t;_=Y,T=9999.9;for(var X=1;Math.abs(T)>=1e-12&&X<=10;)o=Math.sin(_),T=(Y-j*(r=Math.cos(_))+q*o-_)/(T=1-r*q-o*j),Math.abs(T)>=.95&&(T=T>0?.95:-.95),_+=T,X+=1;var K=q*r+j*o,Q=q*o-j*r,Z=q*q+j*j,J=k*(1-Z);if(J<0)return i.error=4,[!1,!1];var ee=k*(1-K),te=Math.sqrt(k)*Q/ee,ie=Math.sqrt(J)/ee,ne=Math.sqrt(1-Z),re=k/ee*(o-j-q*(C=Q/(1+ne))),oe=k/ee*(r-q+j*C);v=Math.atan2(re,oe);var ae=(oe+oe)*re,se=1-2*re*re,le=541308e-9*(C=1/J),ue=le*C;"d"===i.method&&(h=u*u,i.con41=3*h-1,i.x1mth2=1-h,i.x7thm1=7*h-1);var ce=ee*(1-1.5*ue*ne*i.con41)+.5*le*i.x1mth2*se;if(ce<1)return i.error=6,{position:!1,velocity:!1};v-=.25*ue*i.x7thm1*ae;var he=D+1.5*ue*u*ae,de=R+1.5*ue*u*c*se,fe=te-L*le*i.x1mth2*ae/s,pe=ie+L*le*(i.x1mth2*se+1.5*i.con41)/s,_e=Math.sin(v),me=Math.cos(v),ge=Math.sin(he),xe=Math.cos(he),ve=Math.sin(de),ye=Math.cos(de),$e=-ge*ye,be=xe*ye,Te=$e*_e+xe*me,Ce=be*_e+ge*me,Se=ve*_e;return{position:{x:ce*Te*a,y:ce*Ce*a,z:ce*Se*a},velocity:{x:(fe*Te+pe*($e*me-xe*_e))*l,y:(fe*Ce+pe*(be*me-ge*_e))*l,z:(fe*Se+pe*(ve*me))*l}}}function b(i,n){var r,o,l,h,d,_,m,g,v,b,T,C,S,w,E,P,A,L,M,R,I,O,D,B,N,F,U,z,G,V,k,W,H,q,j,Y,X,K,Q,Z,J,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he=n.opsmode,de=n.satn,fe=n.epoch,pe=n.xbstar,_e=n.xecco,me=n.xargpo,ge=n.xinclo,xe=n.xmo,ve=n.xno,ye=n.xnodeo;i.isimp=0,i.method="n",i.aycof=0,i.con41=0,i.cc1=0,i.cc4=0,i.cc5=0,i.d2=0,i.d3=0,i.d4=0,i.delmo=0,i.eta=0,i.argpdot=0,i.omgcof=0,i.sinmao=0,i.t=0,i.t2cof=0,i.t3cof=0,i.t4cof=0,i.t5cof=0,i.x1mth2=0,i.x7thm1=0,i.mdot=0,i.nodedot=0,i.xlcof=0,i.xmcof=0,i.nodecf=0,i.irez=0,i.d2201=0,i.d2211=0,i.d3210=0,i.d3222=0,i.d4410=0,i.d4422=0,i.d5220=0,i.d5232=0,i.d5421=0,i.d5433=0,i.dedt=0,i.del1=0,i.del2=0,i.del3=0,i.didt=0,i.dmdt=0,i.dnodt=0,i.domdt=0,i.e3=0,i.ee2=0,i.peo=0,i.pgho=0,i.pho=0,i.pinco=0,i.plo=0,i.se2=0,i.se3=0,i.sgh2=0,i.sgh3=0,i.sgh4=0,i.sh2=0,i.sh3=0,i.si2=0,i.si3=0,i.sl2=0,i.sl3=0,i.sl4=0,i.gsto=0,i.xfact=0,i.xgh2=0,i.xgh3=0,i.xgh4=0,i.xh2=0,i.xh3=0,i.xi2=0,i.xi3=0,i.xl2=0,i.xl3=0,i.xl4=0,i.xlamo=0,i.zmol=0,i.zmos=0,i.atime=0,i.xli=0,i.xni=0,i.bstar=pe,i.ecco=_e,i.argpo=me,i.inclo=ge,i.mo=xe,i.no=ve,i.nodeo=ye,i.operationmode=he;i.init="y",i.t=0;var $e=function(e){var i=e.ecco,n=e.epoch,r=e.inclo,o=e.opsmode,a=e.no,l=i*i,u=1-l,h=Math.sqrt(u),d=Math.cos(r),f=d*d,_=Math.pow(s/a,p),m=.75*c*(3*f-1)/(h*u),g=m/(_*_),x=_*(1-g*g-g*(1/3+134*g*g/81));a/=1+(g=m/(x*x));var v,$=Math.pow(s/a,p),b=Math.sin(r),T=$*u,C=1-5*f,S=-C-f-f,w=1/$,E=T*T,P=$*(1-i);if("a"===o){var A=n-7305,L=Math.floor(A+1e-8),M=.017202791694070362;(v=(1.7321343856509375+M*L+(M+t)*(A-L)+A*A*5075514194322695e-30)%t)<0&&(v+=t)}else v=y(n+2433281.5);return{no:a,method:"n",ainv:w,ao:$,con41:S,con42:C,cosio:d,cosio2:f,eccsq:l,omeosq:u,posq:E,rp:P,rteosq:h,sinio:b,gsto:v}}({satn:de,ecco:i.ecco,epoch:fe,inclo:i.inclo,no:i.no,method:i.method,opsmode:i.operationmode}),be=$e.ao,Te=$e.con42,Ce=$e.cosio,Se=$e.cosio2,we=$e.eccsq,Ee=$e.omeosq,Pe=$e.posq,Ae=$e.rp,Le=$e.rteosq,Me=$e.sinio;if(i.no=$e.no,i.con41=$e.con41,i.gsto=$e.gsto,i.a=Math.pow(i.no*u,-2/3),i.alta=i.a*(1+i.ecco)-1,i.altp=i.a*(1-i.ecco)-1,i.error=0,Ee>=0||i.no>=0){if(i.isimp=0,Ae<220/a+1&&(i.isimp=1),B=1.0122292801892716,L=1.880279159015271e-9,(E=(Ae-1)*a)<156){B=E-78,E<98&&(B=20);var Re=(120-B)/a;L=Re*Re*Re*Re,B=B/a+1}P=1/Pe,ee=1/(be-B),i.eta=be*i.ecco*ee,C=i.eta*i.eta,T=i.ecco*i.eta,A=Math.abs(1-C),h=(m=(_=L*Math.pow(ee,4))/Math.pow(A,3.5))*i.no*(be*(1+1.5*C+T*(4+C))+.375*c*ee/A*i.con41*(8+3*C*(8+C))),i.cc1=i.bstar*h,d=0,i.ecco>1e-4&&(d=-2*_*ee*f*i.no*Me/i.ecco),i.x1mth2=1-Se,i.cc4=2*i.no*m*be*Ee*(i.eta*(2+.5*C)+i.ecco*(.5+2*C)-c*ee/(be*A)*(-3*i.con41*(1-2*T+C*(1.5-.5*T))+.75*i.x1mth2*(2*C-T*(1+C))*Math.cos(2*i.argpo))),i.cc5=2*m*be*Ee*(1+2.75*(C+T)+T*C),g=Se*Se,Z=.5*(Q=1.5*c*P*i.no)*c*P,J=7.762359375e-7*P*P*i.no,i.mdot=i.no+.5*Q*Le*i.con41+.0625*Z*Le*(13-78*Se+137*g),i.argpdot=-.5*Q*Te+.0625*Z*(7-114*Se+395*g)+J*(3-36*Se+49*g),ie=-Q*Ce,i.nodedot=ie+(.5*Z*(4-19*Se)+2*J*(3-7*Se))*Ce,te=i.argpdot+i.nodedot,i.omgcof=i.bstar*d*Math.cos(i.argpo),i.xmcof=0,i.ecco>1e-4&&(i.xmcof=-p*_*i.bstar/T),i.nodecf=3.5*Ee*ie*i.cc1,i.t2cof=1.5*i.cc1,Math.abs(Ce+1)>15e-13?i.xlcof=-.25*f*Me*(3+5*Ce)/(1+Ce):i.xlcof=-.25*f*Me*(3+5*Ce)/15e-13,i.aycof=-.5*f*Me;var Ie=1+i.eta*Math.cos(i.mo);if(i.delmo=Ie*Ie*Ie,i.sinmao=Math.sin(i.mo),i.x7thm1=7*Se-1,2*e/i.no>=225){i.method="d",i.isimp=1,0,S=i.inclo;var Oe=function(e){var i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S,w,E,P,A,L,M,R,I,O,D,B,N,F,U,z,G,V,k,W,H,q,j,Y,X,K,Q,Z,J,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he=e.epoch,de=e.ep,fe=e.argpp,pe=e.tc,_e=e.inclp,me=e.nodep,ge=.01675,xe=.0549,ve=e.np,ye=de,$e=Math.sin(me),be=Math.cos(me),Te=Math.sin(fe),Ce=Math.cos(fe),Se=Math.sin(_e),we=Math.cos(_e),Ee=ye*ye,Pe=1-Ee,Ae=Math.sqrt(Pe),Le=he+18261.5+pe/1440,Me=(4.523602-.00092422029*Le)%t,Re=Math.sin(Me),Ie=Math.cos(Me),Oe=.91375164-.03568096*Ie,De=Math.sqrt(1-Oe*Oe),Be=.089683511*Re/De,Ne=Math.sqrt(1-Be*Be),Fe=5.8351514+.001944368*Le,Ue=.39785416*Re/De,ze=Ne*Ie+.91744867*Be*Re;Ue=Math.atan2(Ue,ze),Ue+=Fe-Me;var Ge=Math.cos(Ue),Ve=Math.sin(Ue);$=.1945905,b=-.98088458,S=.91744867,w=.39785416,T=be,C=$e,d=29864797e-13;for(var ke=1/ve,We=0;We<2;)ie=-6*(i=$*T+b*S*C)*(a=-Se*(l=-$*C+b*S*T)+we*(u=b*w))+Ee*(-24*(f=i*Ce+(n=we*l+Se*u)*Te)*(v=a*Ce)-6*(_=-i*Te+n*Ce)*(g=a*Te)),ne=-6*(i*(s=-Se*(c=b*C+$*S*T)+we*(h=$*w))+(r=-b*T+$*S*C)*a)+Ee*(-24*((p=r*Ce+(o=we*c+Se*h)*Te)*v+f*(y=s*Ce))+-6*(_*(x=s*Te)+(m=-r*Te+o*Ce)*g)),re=-6*r*s+Ee*(-24*p*y-6*m*x),oe=6*n*a+Ee*(24*f*g-6*_*v),ae=6*(o*a+n*s)+Ee*(24*(p*g+f*x)-6*(m*v+_*y)),se=6*o*s+Ee*(24*p*x-6*m*y),J=(J=3*(i*i+n*n)+(le=12*f*f-3*_*_)*Ee)+J+Pe*le,ee=(ee=6*(i*r+n*o)+(ue=24*f*p-6*_*m)*Ee)+ee+Pe*ue,te=(te=3*(r*r+o*o)+(ce=12*p*p-3*m*m)*Ee)+te+Pe*ce,j=-.5*(Y=d*ke)/Ae,q=-15*ye*(X=Y*Ae),K=f*_+p*m,Q=p*_+f*m,Z=p*m-f*_,1===(We+=1)&&(E=q,P=j,A=Y,L=X,M=K,R=Q,I=Z,O=J,D=ee,B=te,N=ie,F=ne,U=re,z=oe,G=ae,V=se,k=le,W=ue,H=ce,$=Ge,b=Ve,S=Oe,w=De,T=Ne*be+Be*$e,C=$e*Ne-be*Be,d=4.7968065e-7);return{snodm:$e,cnodm:be,sinim:Se,cosim:we,sinomm:Te,cosomm:Ce,day:Le,e3:2*q*Z,ee2:2*q*Q,em:ye,emsq:Ee,gam:Fe,peo:0,pgho:0,pho:0,pinco:0,plo:0,rtemsq:Ae,se2:2*E*R,se3:2*E*I,sgh2:2*L*W,sgh3:2*L*(H-k),sgh4:-18*L*ge,sh2:-2*P*G,sh3:-2*P*(V-z),si2:2*P*F,si3:2*P*(U-N),sl2:-2*A*D,sl3:-2*A*(B-O),sl4:-2*A*(-21-9*Ee)*ge,s1:q,s2:j,s3:Y,s4:X,s5:K,s6:Q,s7:Z,ss1:E,ss2:P,ss3:A,ss4:L,ss5:M,ss6:R,ss7:I,sz1:O,sz2:D,sz3:B,sz11:N,sz12:F,sz13:U,sz21:z,sz22:G,sz23:V,sz31:k,sz32:W,sz33:H,xgh2:2*X*ue,xgh3:2*X*(ce-le),xgh4:-18*X*xe,xh2:-2*j*ae,xh3:-2*j*(se-oe),xi2:2*j*ne,xi3:2*j*(re-ie),xl2:-2*Y*ee,xl3:-2*Y*(te-J),xl4:-2*Y*(-21-9*Ee)*xe,nm:ve,z1:J,z2:ee,z3:te,z11:ie,z12:ne,z13:re,z21:oe,z22:ae,z23:se,z31:le,z32:ue,z33:ce,zmol:(.2299715*Le-Fe+4.7199672)%t,zmos:(6.2565837+.017201977*Le)%t}}({epoch:fe,ep:i.ecco,argpp:i.argpo,tc:0,inclp:i.inclo,nodep:i.nodeo,np:i.no,e3:i.e3,ee2:i.ee2,peo:i.peo,pgho:i.pgho,pho:i.pho,pinco:i.pinco,plo:i.plo,se2:i.se2,se3:i.se3,sgh2:i.sgh2,sgh3:i.sgh3,sgh4:i.sgh4,sh2:i.sh2,sh3:i.sh3,si2:i.si2,si3:i.si3,sl2:i.sl2,sl3:i.sl3,sl4:i.sl4,xgh2:i.xgh2,xgh3:i.xgh3,xgh4:i.xgh4,xh2:i.xh2,xh3:i.xh3,xi2:i.xi2,xi3:i.xi3,xl2:i.xl2,xl3:i.xl3,xl4:i.xl4,zmol:i.zmol,zmos:i.zmos});i.e3=Oe.e3,i.ee2=Oe.ee2,i.peo=Oe.peo,i.pgho=Oe.pgho,i.pho=Oe.pho,i.pinco=Oe.pinco,i.plo=Oe.plo,i.se2=Oe.se2,i.se3=Oe.se3,i.sgh2=Oe.sgh2,i.sgh3=Oe.sgh3,i.sgh4=Oe.sgh4,i.sh2=Oe.sh2,i.sh3=Oe.sh3,i.si2=Oe.si2,i.si3=Oe.si3,i.sl2=Oe.sl2,i.sl3=Oe.sl3,i.sl4=Oe.sl4,o=Oe.sinim,r=Oe.cosim,v=Oe.em,b=Oe.emsq,M=Oe.s1,R=Oe.s2,I=Oe.s3,O=Oe.s4,D=Oe.s5,N=Oe.ss1,F=Oe.ss2,U=Oe.ss3,z=Oe.ss4,G=Oe.ss5,V=Oe.sz1,k=Oe.sz3,W=Oe.sz11,H=Oe.sz13,q=Oe.sz21,j=Oe.sz23,Y=Oe.sz31,X=Oe.sz33,i.xgh2=Oe.xgh2,i.xgh3=Oe.xgh3,i.xgh4=Oe.xgh4,i.xh2=Oe.xh2,i.xh3=Oe.xh3,i.xi2=Oe.xi2,i.xi3=Oe.xi3,i.xl2=Oe.xl2,i.xl3=Oe.xl3,i.xl4=Oe.xl4,i.zmol=Oe.zmol,i.zmos=Oe.zmos,w=Oe.nm,ne=Oe.z1,re=Oe.z3,oe=Oe.z11,ae=Oe.z13,se=Oe.z21,le=Oe.z23,ue=Oe.z31,ce=Oe.z33;var De=x(i,{inclo:S,init:i.init,ep:i.ecco,inclp:i.inclo,nodep:i.nodeo,argpp:i.argpo,mp:i.mo,opsmode:i.operationmode});i.ecco=De.ep,i.inclo=De.inclp,i.nodeo=De.nodep,i.argpo=De.argpp,i.mo=De.mp,0,0,0;var Be=function(i){var n,r,o,a,l,u,c,h,d,f,_,m,g,x,v,y,$,b=i.cosim,T=i.argpo,C=i.s1,S=i.s2,w=i.s3,E=i.s4,P=i.s5,A=i.sinim,L=i.ss1,M=i.ss2,R=i.ss3,I=i.ss4,O=i.ss5,D=i.sz1,B=i.sz3,N=i.sz11,F=i.sz13,U=i.sz21,z=i.sz23,G=i.sz31,V=i.sz33,k=i.t,W=i.tc,H=i.gsto,q=i.mo,j=i.mdot,Y=i.no,X=i.nodeo,K=i.nodedot,Q=i.xpidot,Z=i.z1,J=i.z3,ee=i.z11,te=i.z13,ie=i.z21,ne=i.z23,re=i.z31,oe=i.z33,ae=i.ecco,se=i.eccsq,le=i.emsq,ue=i.em,ce=i.argpm,he=i.inclm,de=i.mm,fe=i.nm,pe=i.nodem,_e=i.irez,me=i.atime,ge=i.d2201,xe=i.d2211,ve=i.d3210,ye=i.d3222,$e=i.d4410,be=i.d4422,Te=i.d5220,Ce=i.d5232,Se=i.d5421,we=i.d5433,Ee=i.dedt,Pe=i.didt,Ae=i.dmdt,Le=i.dnodt,Me=i.domdt,Re=i.del1,Ie=i.del2,Oe=i.del3,De=i.xfact,Be=i.xlamo,Ne=i.xli,Fe=i.xni,Ue=.0043752690880113,ze=.00015835218,Ge=119459e-10;_e=0,fe<.0052359877&&fe>.0034906585&&(_e=1),fe>=.00826&&fe<=.00924&&ue>=.5&&(_e=2);var Ve=-Ge*M*(U+z);(he<.052359877||he>e-.052359877)&&(Ve=0),0!==A&&(Ve/=A);var ke=-ze*S*(ie+ne);(he<.052359877||he>e-.052359877)&&(ke=0),Me=I*Ge*(G+V-6)-b*Ve+E*ze*(re+oe-6),Le=Ve,0!==A&&(Me-=b/A*ke,Le+=ke/A);var We=(H+W*Ue)%t;if(ue+=(Ee=L*Ge*O+C*ze*P)*k,he+=(Pe=M*Ge*(N+F)+S*ze*(ee+te))*k,ce+=Me*k,pe+=Le*k,de+=(Ae=-Ge*R*(D+B-14-6*le)-ze*w*(Z+J-14-6*le))*k,0!==_e){if(v=Math.pow(fe/s,p),2===_e){var He=ue,qe=le;$=(ue=ae)*(le=se),ue<=.65?(o=3.616-13.247*ue+16.29*le,a=117.39*ue-19.302-228.419*le+156.591*$,l=109.7927*ue-18.9068-214.6334*le+146.5816*$,u=242.694*ue-41.122-471.094*le+313.953*$,c=841.88*ue-146.407-1629.014*le+1083.435*$,h=3017.977*ue-532.114-5740.032*le+3708.276*$):(o=331.819*ue-72.099-508.738*le+266.724*$,a=1582.851*ue-346.844-2415.925*le+1246.113*$,l=1554.908*ue-342.585-2366.899*le+1215.972*$,u=4758.686*ue-1052.797-7193.992*le+3651.957*$,c=16178.11*ue-3581.69-24462.77*le+12422.52*$,h=ue>.715?29936.92*ue-5149.66-54087.36*le+31324.56*$:1464.74-4664.75*ue+3763.64*le),ue<.7?(_=4988.61*ue-919.2277-9064.77*le+5542.21*$,d=4568.6173*ue-822.71072-8491.4146*le+5337.524*$,f=4690.25*ue-853.666-8624.77*le+5341.4*$):(_=161616.52*ue-37995.78-229838.2*le+109377.94*$,d=218913.95*ue-51752.104-309468.16*le+146349.42*$,f=170470.89*ue-40023.88-242699.48*le+115605.82*$),ge=(g=17891679e-13*(x=fe*fe*3*(v*v)))*(n=.75*(1+2*b+(y=b*b)))*(-.306-.44*(ue-.64)),xe=g*(1.5*(m=A*A))*o,ve=(g=3.7393792e-7*(x*=v))*(1.875*A*(1-2*b-3*y))*a,ye=g*(-1.875*A*(1+2*b-3*y))*l,$e=(g=2*(x*=v)*7.3636953e-9)*(35*m*n)*u,be=g*(39.375*m*m)*c,Te=(g=1.1428639e-7*(x*=v))*(9.84375*A*(m*(1-2*b-5*y)+.33333333*(4*b-2+6*y)))*h,Ce=g*(A*(4.92187512*m*(-2-4*b+10*y)+6.56250012*(1+2*b-3*y)))*f,Se=(g=2*x*2.1765803e-9)*(29.53125*A*(2-8*b+y*(8*b-12+10*y)))*d,we=g*(29.53125*A*(-2-8*b+y*(12+8*b-10*y)))*_,Be=(q+X+X-(We+We))%t,De=j+Ae+2*(K+Le-Ue)-Y,ue=He,le=qe}1===_e&&(r=1+b,Ie=2*(Re=3*fe*fe*v*v)*(n=.75*(1+b)*(1+b))*(1+le*(.8125*le-2.5))*17891679e-13,Oe=3*Re*(r*=1.875*r*r)*(1+le*(6.60937*le-6))*2.2123015e-7*v,Re=Re*(.9375*A*A*(1+3*b)-.75*(1+b))*(a=1+2*le)*21460748e-13*v,Be=(q+X+T-We)%t,De=j+Q+Ae+Me+Le-(Y+Ue)),Ne=Be,Fe=Y,me=0,fe=Y+0}return{em:ue,argpm:ce,inclm:he,mm:de,nm:fe,nodem:pe,irez:_e,atime:me,d2201:ge,d2211:xe,d3210:ve,d3222:ye,d4410:$e,d4422:be,d5220:Te,d5232:Ce,d5421:Se,d5433:we,dedt:Ee,didt:Pe,dmdt:Ae,dndt:0,dnodt:Le,domdt:Me,del1:Re,del2:Ie,del3:Oe,xfact:De,xlamo:Be,xli:Ne,xni:Fe}}({cosim:r,emsq:b,argpo:i.argpo,s1:M,s2:R,s3:I,s4:O,s5:D,sinim:o,ss1:N,ss2:F,ss3:U,ss4:z,ss5:G,sz1:V,sz3:k,sz11:W,sz13:H,sz21:q,sz23:j,sz31:Y,sz33:X,t:i.t,tc:0,gsto:i.gsto,mo:i.mo,mdot:i.mdot,no:i.no,nodeo:i.nodeo,nodedot:i.nodedot,xpidot:te,z1:ne,z3:re,z11:oe,z13:ae,z21:se,z23:le,z31:ue,z33:ce,ecco:i.ecco,eccsq:we,em:v,argpm:0,inclm:S,mm:0,nm:w,nodem:0,irez:i.irez,atime:i.atime,d2201:i.d2201,d2211:i.d2211,d3210:i.d3210,d3222:i.d3222,d4410:i.d4410,d4422:i.d4422,d5220:i.d5220,d5232:i.d5232,d5421:i.d5421,d5433:i.d5433,dedt:i.dedt,didt:i.didt,dmdt:i.dmdt,dnodt:i.dnodt,domdt:i.domdt,del1:i.del1,del2:i.del2,del3:i.del3,xfact:i.xfact,xlamo:i.xlamo,xli:i.xli,xni:i.xni});i.irez=Be.irez,i.atime=Be.atime,i.d2201=Be.d2201,i.d2211=Be.d2211,i.d3210=Be.d3210,i.d3222=Be.d3222,i.d4410=Be.d4410,i.d4422=Be.d4422,i.d5220=Be.d5220,i.d5232=Be.d5232,i.d5421=Be.d5421,i.d5433=Be.d5433,i.dedt=Be.dedt,i.didt=Be.didt,i.dmdt=Be.dmdt,i.dnodt=Be.dnodt,i.domdt=Be.domdt,i.del1=Be.del1,i.del2=Be.del2,i.del3=Be.del3,i.xfact=Be.xfact,i.xlamo=Be.xlamo,i.xli=Be.xli,i.xni=Be.xni}1!==i.isimp&&(l=i.cc1*i.cc1,i.d2=4*be*ee*l,K=i.d2*ee*i.cc1/3,i.d3=(17*be+B)*K,i.d4=.5*K*be*ee*(221*be+31*B)*i.cc1,i.t3cof=i.d2+2*l,i.t4cof=.25*(3*i.d3+i.cc1*(12*i.d2+10*l)),i.t5cof=.2*(3*i.d4+12*i.cc1*i.d3+6*i.d2*i.d2+15*l*(2*i.d2+l)))}$(i,0),i.init="n"}function T(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return C(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function S(e){return e*n}function w(e){return e*i}function E(e){var t=e.longitude,i=e.latitude,n=e.height,r=6378.137,o=.006694380004260718,a=r/Math.sqrt(1-o*(Math.sin(i)*Math.sin(i)));return{x:(a+n)*Math.cos(i)*Math.cos(t),y:(a+n)*Math.cos(i)*Math.sin(t),z:(a*(1-o)+n)*Math.sin(i)}}var P={constants:Object.freeze({__proto__:null,deg2rad:i,earthRadius:a,j2:c,j3:h,j3oj2:f,j4:d,minutesPerDay:r,mu:o,pi:e,rad2deg:n,tumin:u,twoPi:t,vkmpersec:l,x2o3:p,xke:s}),propagate:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],o=Array.prototype.slice.call(t,1),a=g.apply(void 0,T(o)),s=(a-n.jdsatepoch)*r;return $(n,s)},sgp4:$,twoline2satrec:function(t,n){var r=1440/(2*e),o=0,a={error:0};a.satnum=t.substring(2,7),a.epochyr=parseInt(t.substring(18,20),10),a.epochdays=parseFloat(t.substring(20,32)),a.ndot=parseFloat(t.substring(33,43)),a.nddot=parseFloat(".".concat(parseInt(t.substring(44,50),10),"E").concat(t.substring(50,52))),a.bstar=parseFloat("".concat(t.substring(53,54),".").concat(parseInt(t.substring(54,59),10),"E").concat(t.substring(59,61))),a.inclo=parseFloat(n.substring(8,16)),a.nodeo=parseFloat(n.substring(17,25)),a.ecco=parseFloat(".".concat(n.substring(26,33))),a.argpo=parseFloat(n.substring(34,42)),a.mo=parseFloat(n.substring(43,51)),a.no=parseFloat(n.substring(52,63)),a.nc=parseFloat(n.substring(52,63)),a.no/=r,a.inclo*=i,a.nodeo*=i,a.argpo*=i,a.mo*=i;var s=_(o=a.epochyr<57?a.epochyr+2e3:a.epochyr+1900,a.epochdays),l=s.mon,u=s.day,c=s.hr,h=s.minute,d=s.sec;return a.jdsatepoch=g(o,l,u,c,h,d),b(a,{opsmode:"i",satn:a.satnum,epoch:a.jdsatepoch-2433281.5,xbstar:a.bstar,xecco:a.ecco,xargpo:a.argpo,xinclo:a.inclo,xmo:a.mo,xno:a.no,xnodeo:a.nodeo}),a},gstime:y,jday:g,invjday:function(e,t){var i=e-2415019.5,n=i/365.25,r=1900+Math.floor(n),o=Math.floor(.25*(r-1901)),a=i-(365*(r-1900)+o)+1e-11;a<1&&(a=i-(365*((r-=1)-1900)+(o=Math.floor(.25*(r-1901)))));var s=_(r,a),l=s.mon,u=s.day,c=s.hr,h=s.minute,d=s.sec-864e-9;return t?[r,l,u,c,h,Math.floor(d)]:new Date(Date.UTC(r,l-1,u,c,h,Math.floor(d)))},dopplerFactor:function(e,t,i){var n=7292115e-11,r={x:t.x-e.x,y:t.y-e.y,z:t.z-e.z};r.w=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)+Math.pow(r.z,2));var o=i.x+n*e.y,a=i.y-n*e.x,s=i.z,l=(r.x*o+r.y*a+r.z*s)/r.w;return 1+l/299792.458*(l>=0?1:-1)},radiansToDegrees:S,degreesToRadians:w,degreesLat:function(t){if(t<-e/2||t>e/2)throw new RangeError("Latitude radians must be in range [-pi/2; pi/2].");return S(t)},degreesLong:function(t){if(t<-e||t>e)throw new RangeError("Longitude radians must be in range [-pi; pi].");return S(t)},radiansLat:function(e){if(e<-90||e>90)throw new RangeError("Latitude degrees must be in range [-90; 90].");return w(e)},radiansLong:function(e){if(e<-180||e>180)throw new RangeError("Longitude degrees must be in range [-180; 180].");return w(e)},geodeticToEcf:E,eciToGeodetic:function(i,n){for(var r=6378.137,o=Math.sqrt(i.x*i.x+i.y*i.y),a=.006694380004260718,s=Math.atan2(i.y,i.x)-n;s<-e;)s+=t;for(;s>e;)s-=t;for(var l,u=0,c=Math.atan2(i.z,Math.sqrt(i.x*i.x+i.y*i.y));u<20;)l=1/Math.sqrt(1-a*(Math.sin(c)*Math.sin(c))),c=Math.atan2(i.z+r*l*a*Math.sin(c),o),u+=1;return{longitude:s,latitude:c,height:o/Math.cos(c)-r*l}},eciToEcf:function(e,t){return{x:e.x*Math.cos(t)+e.y*Math.sin(t),y:e.x*-Math.sin(t)+e.y*Math.cos(t),z:e.z}},ecfToEci:function(e,t){return{x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t),z:e.z}},ecfToLookAngles:function(t,i){var n,r,o,a,s,l,u,c,h,d,f,p,_,m,g=(r=i,o=(n=t).longitude,a=n.latitude,s=E(n),l=r.x-s.x,u=r.y-s.y,c=r.z-s.z,{topS:Math.sin(a)*Math.cos(o)*l+Math.sin(a)*Math.sin(o)*u-Math.cos(a)*c,topE:-Math.sin(o)*l+Math.cos(o)*u,topZ:Math.cos(a)*Math.cos(o)*l+Math.cos(a)*Math.sin(o)*u+Math.sin(a)*c});return d=(h=g).topS,f=h.topE,p=h.topZ,_=Math.sqrt(d*d+f*f+p*p),m=Math.asin(p/_),{azimuth:Math.atan2(-f,d)+e,elevation:m,rangeSat:_}}};return P}));var _0x59a6dd=SatelliteToolkit;const _0x39d53b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x44f0e4=_0x39d53b(void 0,(function(){return _0x44f0e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x44f0e4).search("(((.+)+)+)+$")}));_0x44f0e4();class _0x44d1e4{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._name=WebGLPlot$f.defaultValue(e.name,void 0),this._tleLine1=WebGLPlot$f.defaultValue(e.tleLine1,void 0),this._tleLine2=WebGLPlot$f.defaultValue(e.tleLine2,void 0),this._networking=WebGLPlot$f.defaultValue(e.networking,void 0),this._mapExtendProperty=new Map,this._satrec=_0x59a6dd.twoline2satrec(this._tleLine1,this._tleLine2)}setName(e){this._name}getName(){return this._name}getUUID(){return this._name+" #"+this._satrec.satnum}setNetworking(e){this._networking=e}getNetworking(){return this._networking}getPositionEci(e){let t=null,i=_0x59a6dd.propagate(this._satrec,new Date(e)).position;return WebGLPlot$f.defined(i)&&!isNaN(i.x)&&!isNaN(i.y)&&!isNaN(i.z)&&(t=new WebGLPlot$f.Cartesian3(1e3*i.x,1e3*i.y,1e3*i.z)),t}getPositionMatrix(e){var t=new WebGLPlot$f.HeadingPitchRoll;const i=this.getPositionEci(e),n=this.getPositionEci(e+1e3),r=_0x2887b9.getHeading(i,n);r&&(t.heading=r);const o=_0x2887b9.getPitch(i,n);return o&&(t.pitch=o),WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(i,t,WebGLPlot$f.Ellipsoid.WGS84,new WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west"))}getOrbitPoints(e){let t=864e5/this._satrec.nc/100,i=[];for(let n=0;n<100;n++){let r=e+parseInt(n*t),o=this.getPositionEci(r);null!=o&&i.push(o)}return i.push(i[0].clone()),i}getExtendProperty(e){return this._mapExtendProperty.get(e)}setExtendProperty(e,t){this._mapExtendProperty.set(e,t)}removeExtendProperty(e){this._mapExtendProperty.delete(e)}getllExtendProperty(){return this._mapExtendProperty}removeAllExtendProperty(){this._mapExtendProperty.clear()}toGeoJson(){let e={};if(!e.hasOwnProperty("SatelliteProperty")){const e=Object.fromEntries(_mapExtendProperty);dataJSON.SatelliteProperty=e}return JSON.stringify(e)}fromGeoJson(e){let t=e.SatelliteProperty;_mapExtendProperty=new Map(Object.entries(t))}clone(){let e=new _0x44d1e4({name:this._name,tleLine1:this._tleLine1,tleLine2:this._tleLine2,networking:this._networking});return this._mapExtendProperty.forEach(((t,i)=>{e._mapExtendProperty.set(i,t)})),e}}const _0x2d0432=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1e16c8=_0x2d0432(void 0,(function(){return _0x1e16c8.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e16c8).search("(((.+)+)+)+$")}));_0x1e16c8();class _0x329fbd{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._groupName=WebGLPlot$f.defaultValue(e.groupName,""),this._modelPath=WebGLPlot$f.defaultValue(e.modelPath,""),this._modelScale=WebGLPlot$f.defaultValue(e.modelScale,1e4),this._visible=WebGLPlot$f.defaultValue(e.visible,!0),this._orbitsVisible=WebGLPlot$f.defaultValue(e.orbitsVisible,!0),this._orbitsWidth=WebGLPlot$f.defaultValue(e.orbitsWidth,1),this._orbitsColor=WebGLPlot$f.defaultValue(e.orbitsColor,new WebGLPlot$f.Color(.8,.8,.2,.39)),this._tleFilePaths=WebGLPlot$f.defaultValue(e.tleFilePaths,[]),this._scene=void 0,this._mapSatellites=new Map,this._tleInfos=[],this._lUTCtime=void 0,this._isModel=void 0,this._satelliteCollection=void 0,this._orbitsCollection=[],this._POLYLINE_ALL_COUNT=150}setScene(e){if(WebGLPlot$f.defined(e)){this._scene=e,this._scene.primitives.add(this._satelliteCollection);const t=this._orbitsCollection.length;for(let e=0;e<t;e++)this._scene.primitives.add(this._orbitsCollection[e])}}getAllSatelliteScale(){return this._modelScale}setAllSatelliteScale(e){const t=this._satelliteCollection.length;for(let i=0;i<t;i++){this._satelliteCollection.get(i).scale=e}this._modelScale=e,this._saveToScheme()}isVisible(){return this._visible}setVisible(e){this._visible=e;const t=this._satelliteCollection.length;for(let i=0;i<t;i++){this._satelliteCollection.get(i).show=e}let i=!1;this._visible&&this._orbitsVisible&&(i=!0);for(let e=0;e<this._orbitsCollection.length;e++)this._orbitsCollection[e].visible=i;this._saveToScheme()}isOrbitsVisible(){return this._orbitsVisible}setOrbitsVisible(e){this._orbitsVisible=e;let t=!1;this._visible&&this._orbitsVisible&&(t=!0);const i=this._orbitsCollection.length;for(let e=0;e<i;e++)this._orbitsCollection[e].visible=t;this._saveToScheme()}getOrbitsWidth(){return Number(this._orbitsWidth)}setOrbitsWidth(e){const t=this._orbitsCollection.length;for(let i=0;i<t;i++)this._orbitsCollection[i].orbitsWidth=e;this._orbitsWidth=e,this._saveToScheme()}getOrbitsColor(){return this._orbitsColor}setOrbitsColor(e){const t=this._orbitsCollection.length;for(let i=0;i<t;i++)this._orbitsCollection[i].orbitsColor=e;this._orbitsColor=e,this._saveToScheme()}getGroupName(){return this._groupName}getSatelliteFileNames(){let e=[];const t=this._tleInfos.length;for(let i=0;i<t;i++)e.push(this._tleInfos[i].fileName);return e}getSatellites(e){const t=this._tleInfos.length;for(let i=0;i<t;i++){const t=this._tleInfos[i];if(t.fileName===e)return t.satellites}return[]}getSatellitePos(e){let t=null;const i=this._satelliteCollection.length;for(let n=0;n<i;n++){const i=this._satelliteCollection.get(n);if(WebGLPlot$f.defined(i)&&i.id===e){t=this._isModel?_0x2887b9.getPositionFromModelMatrix(i.modelMatrix):_0x2887b9.cartesian3ToDegrees(i.position);break}}return t}getSatelliteZRotation(e){let t=new _0x11ff81(0,0,0);const i=this._satelliteCollection.length;for(let r=0;r<i;r++){const i=this._satelliteCollection.get(r);if(WebGLPlot$f.defined(i)&&i.id===e&&this._isModel){const i=this._mapSatellites.get(e);var n=new WebGLPlot$f.HeadingPitchRoll;const r=i.getPositionEci(this._lUTCtime),o=i.getPositionEci(this._lUTCtime+1e3),a=_0x2887b9.getHeading(r,o);a&&(n.heading=a);const s=_0x2887b9.getPitch(r,o);s&&(n.pitch=s),t=new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(n.pitch),WebGLPlot$f.CesiumMath.toDegrees(n.roll),WebGLPlot$f.CesiumMath.toDegrees(n.heading))}}return t}setGroupModelPath(e){if(WebGLPlot$f.defined(e)&&-1!==e.lastIndexOf(".")){WebGLPlot$f.defined(this._satelliteCollection)&&WebGLPlot$f.defined(this._scene)&&this._scene.primitives.contains(this._satelliteCollection)&&this._scene.primitives.remove(this._satelliteCollection),this._modelPath=e,this._isModel=this._isModelPath(e),this._isModel?this._satelliteCollection=new WebGLPlot$f.PrimitiveCollection:this._satelliteCollection=new WebGLPlot$f.BillboardCollection;for(let e of this._mapSatellites.values())if(this._isModel){let t=e.getPositionMatrix(this._lUTCtime);this._satelliteCollection.add(WebGLPlot$f.Model.fromGltf({id:e.getUUID(),url:this._modelPath,scale:this._modelScale,modelMatrix:t,show:this._visible}))}else{const t=e.getPositionEci(this._lUTCtime);this._satelliteCollection.add({id:e.getUUID(),position:t,image:this._modelPath,scale:this._modelScale,horizontalOrigin:WebGLPlot$f.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$f.VerticalOrigin.CENTER,show:this._visible})}WebGLPlot$f.defined(this._scene)&&this._scene.primitives.add(this._satelliteCollection),this._saveToScheme()}}getGroupModelPath(){return this._modelPath}setGroupModelScale(e){this._modelScale=e;const t=this._satelliteCollection.length;for(let i=0;i<t;i++){let t=this._satelliteCollection.get(i);WebGLPlot$f.defined(t)&&(t.scale=e)}this._saveToScheme()}getGroupModelScale(){return this._modelScale}isModel(){return this._isModel}updateAllSatellitePosition(e){const t=this._satelliteCollection.length;for(let i=0;i<t;i++){const t=this._satelliteCollection.get(i);if(!WebGLPlot$f.defined(t))continue;let n=this.getSatelliteByUUID(t.id);if(!WebGLPlot$f.defined(n))continue;let r=n.getPositionEci(e);WebGLPlot$f.defined(r)&&(this._isModel?t.modelMatrix=n.getPositionMatrix(e):t.position=r)}}updateAllOrbitPosition(e){const t=this._orbitsCollection.length;for(let i=0;i<t;i++){const t=this._orbitsCollection[i].length;for(let n=0;n<t;n++){let t=this._orbitsCollection[i].get(n),r=this._mapSatellites.get(t.id);WebGLPlot$f.defined(r)&&(t.point3Ds=r.getPositionMatrix(e))}}}getSatelliteByUUID(e){return this._mapSatellites.get(e)}_removeSatelliteFromScene(e){if(!WebGLPlot$f.defined(e))return!1;let t=!1;const i=this._satelliteCollection.length;let n=null;for(let t=0;t<i;t++){const i=this._satelliteCollection.get(t);if(WebGLPlot$f.defined(i)&&i.id===e){n=i;break}}null!=n&&(this._satelliteCollection.remove(n),t=!0);let r=!1;const o=this._orbitsCollection.length;for(let t=0;t<o&&!r;t++){let i=null,n=this._orbitsCollection[t];const o=n.length;for(let t=0;t<o;t++){const r=n.get(t);if(WebGLPlot$f.defined(r)&&r.id===e){i=r;break}}null!=i&&(n.remove(i),r=!0)}return t&&r}_addSatelliteToScene(e){if(!WebGLPlot$f.defined(e))return!1;const t=this._mapSatellites.get(e);if(!WebGLPlot$f.defined(t))return!1;if(this._isModel){let e=t.getPositionMatrix(this._lUTCtime);this._satelliteCollection.add(WebGLPlot$f.Model.fromGltf({id:t.getUUID(),url:this._modelPath,scale:this._modelScale,modelMatrix:e,show:this._visible}))}else{const e=t.getPositionEci(this._lUTCtime);this._satelliteCollection.add({id:t.getUUID(),position:e,image:this._modelPath,scale:this._modelScale,horizontalOrigin:WebGLPlot$f.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$f.VerticalOrigin.CENTER,show:this._visible})}const i=t.getOrbitPoints(this._lUTCtime);let n=this._orbitsCollection[this._orbitsCollection.length-1];return n.add({id:t.getUUID(),positions:i}),n.orbitsColor=this._orbitsColor,n.orbitsWidth=this._orbitsWidth,n.orbitsVisible=this._orbitsVisible,!0}fromJson(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.groupName)&&(this._groupName=t.groupName),WebGLPlot$f.defined(t.modelPath)&&(this._modelPath=t.modelPath),WebGLPlot$f.defined(t.modelScale)&&(this._modelScale=t.modelScale),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.orbitsVisible)&&(this._orbitsVisible=t.orbitsVisible),WebGLPlot$f.defined(t.orbitsWidth)&&(this._orbitsWidth=t.orbitsWidth),WebGLPlot$f.defined(t.orbitsColor)&&(this._orbitsColor=WebGLPlot$f.Color.fromCssColorString(t.orbitsColor)),WebGLPlot$f.defined(t.tleFilePaths)&&(this._tleFilePaths=[],t.tleFilePaths.forEach((e=>{this._tleFilePaths.push(e)})))}toJson(){let e={};e.hasOwnProperty("groupName")||(e.groupName=this._groupName),e.hasOwnProperty("modelPath")||(e.modelPath=this._modelPath),e.hasOwnProperty("modelScale")||(e.modelScale=this._modelScale),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("orbitsVisible")||(e.orbitsVisible=this._orbitsVisible),e.hasOwnProperty("orbitsWidth")||(e.orbitsWidth=this._orbitsWidth),e.hasOwnProperty("orbitsColor")||(e.orbitsColor=this._orbitsColor.toCssColorString());let t=[];return e.hasOwnProperty("tleFilePaths")||(this._tleFilePaths.forEach((e=>{t.push(e)})),e.tleFilePaths=t),JSON.stringify(e)}initGroup(){if(!WebGLPlot$f.defined(this._modelPath)||!WebGLPlot$f.defined(this._tleFilePaths)||!WebGLPlot$f.defined(this._groupName))return;let e=_0x41dd10.getInstance().getURI();if(!WebGLPlot$f.defined(e))return;this._lUTCtime=Date.now(),this._isModel=this._isModelPath(this._modelPath),this._isModel?this._satelliteCollection=new WebGLPlot$f.PrimitiveCollection:this._satelliteCollection=new WebGLPlot$f.BillboardCollection,this._POLYLINE_ALL_COUNT=150,this._orbitsCollection=[],this._orbitsCollection.push(new _0x124bda),this._tleInfos=[];let t=this._tleFilePaths.length;for(let i=0;i<t;i++){let t=this._loadTLE(e+this._tleFilePaths[i]);WebGLPlot$f.defined(t)&&(this._tleInfos.push(t),this._addSatellites(t))}this.setOrbitsColor(this._orbitsColor),this.setOrbitsWidth(this._orbitsWidth),this.setOrbitsVisible(this._orbitsVisible)}destory(){if(WebGLPlot$f.defined(this._scene)){WebGLPlot$f.defined(this._satelliteCollection)&&this._scene.primitives.remove(this._satelliteCollection);const e=this._orbitsCollection.length;for(let t=0;t<e;t++)WebGLPlot$f.defined(this._orbitsCollection[t])&&this._scene.primitives.remove(this._orbitsCollection[t])}this._satelliteCollection=void 0,this._orbitsCollection=[],this._tleInfos=[]}_loadTLE(e){if(!WebGLPlot$f.defined(e))return null;var t=(e=e.replace(/\\+/g,"/")).lastIndexOf("/");if(-1==t)return null;let i=e.substring(t+1),n=i.substring(0,i.lastIndexOf(".")),r=[];var o;(o=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open("GET",e,!1),o.send();let a=o.responseText.split(/\r\n/).filter((function(e){return e&&e.trim()})),s=0,l=a.length/3;for(let e=0;e<l;e++){let e=new _0x44d1e4({name:a[s].trim(),tleLine1:a[s+1].trim(),tleLine2:a[s+2].trim(),networking:n});null!=e&&r.push(e),s+=3}return{fileName:n,filePath:e,satellites:r}}_addSatellites(e){let t=this._orbitsCollection[this._orbitsCollection.length-1],i=e.satellites.length;for(let n=0;n<i;n++){let i=e.satellites[n];if(!WebGLPlot$f.defined(i))continue;this._mapSatellites.set(i.getUUID(),i);const r=i.getPositionEci(this._lUTCtime);if(null==r)continue;const o=i.getOrbitPoints(this._lUTCtime);if(WebGLPlot$f.defined(o)&&0!=o.length){if(this._isModel){let e=i.getPositionMatrix(this._lUTCtime);this._satelliteCollection.add(WebGLPlot$f.Model.fromGltf({id:i.getUUID(),url:this._modelPath,scale:this._modelScale,modelMatrix:e,show:this._visible}))}else this._satelliteCollection.add({id:i.getUUID(),position:r,image:this._modelPath,scale:this._modelScale,horizontalOrigin:WebGLPlot$f.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$f.VerticalOrigin.CENTER,show:this._visible});t.length>this._POLYLINE_ALL_COUNT&&(t=new _0x124bda,this._orbitsCollection.push(t)),t.add({id:i.getUUID(),positions:o})}}}_saveToScheme(){_0x41dd10.getInstance().getSatelliteManager()._setIsModify(!0),_0x41dd10.getInstance().getSatelliteManager()._save()}_isModelPath(e){let t=!1;if(WebGLPlot$f.defined(e)){let i=e.lastIndexOf(".");if(-1!=i){let n=e.substring(i+1).toUpperCase();("GLTF"===n||"GLB"===n)&&(t=!0)}}return t}}const _0x47e68d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2c0dfb=_0x47e68d(void 0,(function(){return _0x2c0dfb.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c0dfb).search("(((.+)+)+)+$")}));_0x2c0dfb();class _0x19ce0d{constructor(){this._scene=void 0,this._arrSatelliteGroup=[],this._isModified=!1}setScene(e){this._scene=e}getGroups(){return this._arrSatelliteGroup}getGroup(e){const t=this._arrSatelliteGroup.length;for(let i=0;i<t;i++)if(this._arrSatelliteGroup[i].getGroupName()===e)return this._arrSatelliteGroup[i];return null}updateAllSatellitePosition(e){const t=this._arrSatelliteGroup.length;for(let i=0;i<t;i++)this._arrSatelliteGroup[i].updateAllSatellitePosition(e)}updateAllOrbitPosition(e){const t=this._arrSatelliteGroup.length;for(let e=0;e<t;e++)this._arrSatelliteGroup[e].updateAllOrbitPosition()}fromJson(e){let t=this._arrSatelliteGroup.length;for(let e=0;e<t;e++)this._arrSatelliteGroup[e].destory();if(this._arrSatelliteGroup=[],e.length>0){let t=JSON.parse(e);WebGLPlot$f.defined(t.groups)&&t.groups.forEach((e=>{let t=new _0x329fbd;t.fromJson(JSON.stringify(e)),t.initGroup(),WebGLPlot$f.defined(this._scene)&&t.setScene(this._scene),this._arrSatelliteGroup.push(t)}))}}toJson(){let e={},t=[];return this._arrSatelliteGroup.forEach((e=>{t.push(JSON.parse(e.toJson()))})),e.hasOwnProperty("groups")||(e.groups=t),JSON.stringify(e)}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){this._isModified&&_0x41dd10.getInstance()._saveSatelliteGroups(!1)}}const _0x1bab8c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1442ad=_0x1bab8c(void 0,(function(){return _0x1442ad.toString().search("(((.+)+)+)+$").toString().constructor(_0x1442ad).search("(((.+)+)+)+$")}));_0x1442ad();const _0x20b219={ENTITY:0,SCRIPT:1,SATELLITE:2};var _0x59c417=Object.freeze(_0x20b219);const _0xe0b6cd=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3deead=_0xe0b6cd(void 0,(function(){return _0x3deead.toString().search("(((.+)+)+)+$").toString().constructor(_0x3deead).search("(((.+)+)+)+$")}));_0x3deead();class _0x5ced36 extends _0x5589fe{constructor(e){super(e.geoGraphicObject),this._satelliteGroupName=e.satelliteGroupName,this._satellite=e.satellite,this._orbit=e.orbit,this._name=this._satellite.getUUID(),this._orbitVisible=void 0,WebGLPlot$f.defined(e.orbit)&&(this.setOrbitVisible(e.orbitVisible),this.setOrbitWidth(e.orbitWidth),this.setOrbitColor(e.orbitColor))}setGeoEntityParameter(e){super.setGeoEntityParameter(e),e.isVisible()&&this._orbitVisible?this._orbit.show=!0:this._orbit.show=!1,this._isModified=!0,this._save()}getSatellite(){return this._satellite}getSatelliteGroupName(){return this._satelliteGroupName}getOrbit(){return this._orbit}isOrbitVisible(){if(WebGLPlot$f.defined(this._orbit))return this._orbit.show}setOrbitVisible(e){this.getGeoEntityParameter().isVisible()&&e?this._orbit.show=!0:this._orbit.show=!1,this._orbitVisible=e,this._isModified=!0,this._save()}getOrbitWidth(){if(WebGLPlot$f.defined(this._orbit))return this._orbit.width}setOrbitWidth(e){this._orbit.width=e,this._isModified=!0,this._save()}getOrbitColor(){if(WebGLPlot$f.defined(this._orbit))return this._orbit.material.uniforms.color}setOrbitColor(e){this._orbit.material.uniforms.color=e,this._isModified=!0,this._save()}updateOrbitPosition(e){let t=this._satellite.getOrbitPoints(e);this._orbit.positions=t}toJson(){let e=super.toJson();if(""==e)return"";let t=JSON.parse(e);t.hasOwnProperty("satellite")||(t.satellite={},t.satellite.hasOwnProperty("satelliteGroupName")||(t.satellite.satelliteGroupName=this._satelliteGroupName),t.satellite.hasOwnProperty("satelliteUUID")||(t.satellite.satelliteUUID=this._satellite.getUUID()));return t.hasOwnProperty("orbit")||(t.orbit={},t.orbit.hasOwnProperty("orbitVisible")||(t.orbit.orbitVisible=this._orbitVisible),t.orbit.hasOwnProperty("orbitWidth")||(t.orbit.orbitWidth=this._orbit.width),t.orbit.hasOwnProperty("orbitColor")||(t.orbit.orbitColor=this._orbit.material.uniforms.color.toCssColorString())),JSON.stringify(t)}fromJson(e){return super.fromJson(e)}_save(){this._isMoveGeoEntity||_0x41dd10.getInstance()._saveSatelliteGeoEntity(!1)}}const _0xd472f4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x263417=_0xd472f4(void 0,(function(){return _0x263417.toString().search("(((.+)+)+)+$").toString().constructor(_0x263417).search("(((.+)+)+)+$")}));_0x263417();class _0x42f78d{constructor(){this._mapSatelliteEntitys=new Map,this._scene=void 0,this._geoEntityLayer=void 0,this._satelliteOrbitsLayer=new _0x124bda,this._addGeoEntitys=[],this._removeEntityUUIDs=[]}setScene(e){WebGLPlot$f.defined(e)&&(this._geoEntityLayer=new _0x267b40(e,"SatelliteEntitys"),e.plotLayers.add(this._geoEntityLayer),e.primitives.add(this._satelliteOrbitsLayer),this._scene=e)}addSatelliteEntity(e,t,i,n){if(!WebGLPlot$f.defined(t))return;const r=t.getGroup(i);if(!WebGLPlot$f.defined(r))return;let o=r.getSatelliteByUUID(e);if(!WebGLPlot$f.defined(o))return;let a=o.getName(),s=r.getAllSatelliteScale(),l=r.getOrbitsWidth(),u=r.getOrbitsColor(),c=r.getSatelliteZRotation(o.getUUID()),h=r.getSatellitePos(o.getUUID()),d=r.getGroupModelPath(),f=r.isModel(),p=this;if(f)this._geoEntityLayer.createSymbol(0,99999,[h],{url:d},(function(e){if(WebGLPlot$f.defined(e)){e.feature.__dotPlotLibID=0,e.feature.__dotPlotCode=99998;let t=o.getOrbitPoints(r._lUTCtime),h=p._satelliteOrbitsLayer.add({id:o.getUUID(),positions:t}),d=new _0x5ced36({geoGraphicObject:e.feature,satelliteGroupName:i,satellite:o,orbit:h,orbitWidth:l,orbitColor:u,orbitVisible:true});e.feature.setGeoEntity(d),p._mapSatelliteEntitys.set(d.getUUID(),d),p._addGeoEntitys.push(d),p._save();let f=d.getGeoEntityParameter();f.setModelScale(s),f.setModelRotate(c),d.setGeoEntityParameter(f),d.setName(a),r._removeSatelliteFromScene(o.getUUID()),"function"==typeof n&&n({uuid:d.getUUID()})}}));else{let e=new Image;e.src=d,e.onload=function(){let t=new WebGLPlot$f.Cartesian2(e.width*s,e.height*s),c=p;p._geoEntityLayer.createSymbol(0,20,[h],{url:d},(function(e){if(WebGLPlot$f.defined(e)){e.feature.__dotPlotLibID=0,e.feature.__dotPlotCode=99998,e.feature.anchorPoint=new WebGLPlot$f.Cartesian2(.5,1.5);let s=o.getOrbitPoints(r._lUTCtime),h=c._satelliteOrbitsLayer.add({id:o.getUUID(),positions:s}),d=new _0x5ced36({geoGraphicObject:e.feature,satelliteGroupName:i,satellite:o,orbit:h,orbitWidth:l,orbitColor:u,orbitVisible:true});e.feature.setGeoEntity(d),c._mapSatelliteEntitys.set(d.getUUID(),d),c._addGeoEntitys.push(d),c._save();let f=d.getGeoEntityParameter();f.setPictureSymbolSize(t),d.setGeoEntityParameter(f),d.setName(a),r._removeSatelliteFromScene(o.getUUID()),"function"==typeof n&&n({uuid:d.getUUID()})}}))}}}removeSatelliteEntity(e,t){let i=this._convertEntityToSatellite(e,t);return i&&(this._removeEntityUUIDs.push(e),this._save()),i}getSatelliteEntityByUUID(e){return this._mapSatelliteEntitys.get(e)}getSatelliteEntitys(){let e=[];for(let t of this._mapSatelliteEntitys.values())e.push(t);return e}updateAllSatelliteEntityPosition(e){for(let t of this._mapSatelliteEntitys.values()){let i=t.getSatellite();if(WebGLPlot$f.defined(i)){let n=i.getPositionEci(e);if(WebGLPlot$f.defined(n)){let e=t.getGeoEntityParameter();e.setPosition(_0x2887b9.cartesian3ToDegrees(n)),t.setGeoEntityParameter(e)}}}}updateAllOrbitPosition(e){for(let t of this._mapSatelliteEntitys.values())t.updateOrbitPosition(e)}removeAllSatelliteEntity(e){this._mapSatelliteEntitys.forEach(((t,i)=>{this._convertEntityToSatellite(i,e)&&this._removeEntityUUIDs.push(i)})),this._mapSatelliteEntitys.clear(),this._save()}toJson(){let e=new Map;return this._mapSatelliteEntitys.forEach(((t,i)=>{e.set(t.getUUID(),t.toJson())})),e}fromJson(e,t){let i=e.satelliteEntityJsons,n=e.satelliteManager;if(this.removeAllSatelliteEntity(n),!WebGLPlot$f.defined(this._geoEntityLayer))return;let r=this,o=[];i.forEach(((e,a)=>{let s=JSON.parse(e);WebGLPlot$f.defined(s.geoGraphicObject)&&this._geoEntityLayer.geoJsonToGeoGraphicObject(JSON.parse(s.geoGraphicObject),(function(e){if(WebGLPlot$f.defined(e)){let a=e.feature;if(WebGLPlot$f.defined(a)){let e,l,u,c,h;if(WebGLPlot$f.defined(s.satellite)&&(e=n.getGroup(s.satellite.satelliteGroupName),l=e.getSatelliteByUUID(s.satellite.satelliteUUID)),WebGLPlot$f.defined(s.orbit)&&(u=s.orbit.orbitVisible,c=s.orbit.orbitWidth,h=WebGLPlot$f.Color.fromCssColorString(s.orbit.orbitColor)),WebGLPlot$f.defined(s.geoEntity)&&WebGLPlot$f.defined(e)&&WebGLPlot$f.defined(l)){let n=l.getOrbitPoints(e._lUTCtime),d=r._satelliteOrbitsLayer.add({id:l.getUUID(),positions:n}),f=new _0x5ced36({geoGraphicObject:a,satelliteGroupName:e.getGroupName(),satellite:l,orbit:d,orbitWidth:c,orbitColor:h,orbitVisible:u});f.fromJson(s.geoEntity),a.setGeoEntity(f),r._mapSatelliteEntitys.set(f.getUUID(),f),o.push(f.getUUID()),"function"==typeof t&&o.length===i.size&&t({UUIDs:o})}}}}))}))}_convertEntityToSatellite(e,t){if(!WebGLPlot$f.defined(t))return!1;const i=this._mapSatelliteEntitys.get(e);if(!WebGLPlot$f.defined(i))return!1;const n=i.getSatelliteGroupName();if(!WebGLPlot$f.defined(n))return!1;this._satelliteOrbitsLayer.remove(i.getOrbit()),this._mapSatelliteEntitys.delete(e);let r=i._getGeoGraphicObject();WebGLPlot$f.defined(r)&&(r.removeAllGeoEffect(),this._geoEntityLayer.removeGeoGraphicObject(r));const o=t.getGroup(n);return!!WebGLPlot$f.defined(o)&&(o._addSatelliteToScene(i.getSatellite().getUUID()),!0)}_removeAllSatelliteEntityFromScene(e){this._mapSatelliteEntitys.forEach(((t,i)=>{this._convertEntityToSatellite(i,e)})),this._mapSatelliteEntitys.clear()}_getAddAndRemoveGeoEntitys(){return{add:this._addGeoEntitys,remove:this._removeEntityUUIDs}}_clearAddAndRemoveGeoEntitys(){this._addGeoEntitys.splice(0),this._removeEntityUUIDs.splice(0)}_save(){_0x41dd10.getInstance()._saveSatelliteGeoEntity(!1)}}const _0x410d98=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x533a7c=_0x410d98(void 0,(function(){return _0x533a7c.toString().search("(((.+)+)+)+$").toString().constructor(_0x533a7c).search("(((.+)+)+)+$")}));_0x533a7c();class _0x78fecc{constructor(e){this._UUID=WebGLPlot$f.createGuid(),this._geoEntityParameter=WebGLPlot$f.defaultValue(e,new _0x487d97)}_getGeoEntityParameter(){return this._geoEntityParameter}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityParameter")||(e.geoEntityParameter=this._geoEntityParameter._toJson()),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.geoEntityParameter)&&this._geoEntityParameter._fromJson(t.geoEntityParameter)}clone(){let e=new _0x78fecc;return e._UUID=this._UUID,e._geoEntityParameter=this._geoEntityParameter.clone(),e}getUUID(){return this._UUID}setModelPath(e){this._geoEntityParameter.setModelPath(e)}getModelPath(){return this._geoEntityParameter.getModelPath()}setDotPlotLibID(e){this._geoEntityParameter.setDotPlotLibID(e)}getDotPlotLibID(){return this._geoEntityParameter.getDotPlotLibID()}setDotPlotCode(e){this._geoEntityParameter.setDotPlotCode(e)}getDotPlotCode(){return this._geoEntityParameter.getDotPlotCode()}setDotPlotStyle(e){this._geoEntityParameter.setDotPlotStyle(e)}getDotPlotStyle(){return this._geoEntityParameter.getDotPlotStyle()}setVisible(e){this._geoEntityParameter.setVisible(e)}isVisible(){return this._visible}setPicturePath(e){this._geoEntityParameter.setPicturePath(e)}getPicturePath(){return this._geoEntityParameter.getPicturePath()}setShowMode(e){this._geoEntityParameter.setShowMode(e)}getShowMode(){return this._geoEntityParameter.getShowMode()}setIsDistanceChangeMode(e){this._geoEntityParameter.setIsDistanceChangeMode(e)}getIsDistanceChangeMode(){return this._geoEntityParameter.getIsDistanceChangeMode()}setChangeModeDistance(e){this._geoEntityParameter.setChangeModeDistance(e)}getChangeModeDistance(){return this._geoEntityParameter.getChangeModeDistance()}}const _0x2d4be0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3edea0=_0x2d4be0(void 0,(function(){return _0x3edea0.toString().search("(((.+)+)+)+$").toString().constructor(_0x3edea0).search("(((.+)+)+)+$")}));_0x3edea0();class _0x25bff7{constructor(e){this._UUID=WebGLPlot$f.createGuid(),this._geoEntityEffects=WebGLPlot$f.defaultValue(e,[])}_fromJson(e){let t=JSON.parse(e);!WebGLPlot$f.defined(t)||(WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.geoEntityEffects)&&(this._geoEntityEffects=[],t.geoEntityEffects.forEach((e=>{this._geoEntityEffects.push(_0x3f9f2a.createGeoEntityEffectFromJson(e))}))))}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityEffects")||(e.geoEntityEffects=[],this._geoEntityEffects.forEach((t=>{e.geoEntityEffects.push(t.toJSON())}))),JSON.stringify(e)}getUUID(){return this._UUID}setGeoEntityEffects(e){this._geoEntityEffects=e}getGeoEntityEffects(){return this._geoEntityEffects}}const _0x183a0d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x7e8f1b=_0x183a0d(void 0,(function(){return _0x7e8f1b.toString().search("(((.+)+)+)+$").toString().constructor(_0x7e8f1b).search("(((.+)+)+)+$")}));_0x7e8f1b();class _0x354a71{constructor(){this._UUID=WebGLPlot$f.createGuid(),this._isTimeMode=!0,this._time=void 0,this._speed=void 0,this._isCurvePath=!1,this._pathPoint3D=void 0,this._scalePoint2D=void 0,this._originPosition=void 0,this._targetPosition=void 0,this._originGeoEntityUUID=void 0,this._targetGeoEntityUUID=void 0}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("isTimeMode")||(e.isTimeMode=this._isTimeMode),!e.hasOwnProperty("time")&&WebGLPlot$f.defined(this._time)&&(e.time=this._time),!e.hasOwnProperty("speed")&&WebGLPlot$f.defined(this._speed)&&(e.speed=this._speed),e.hasOwnProperty("isCurvePath")||(e.isCurvePath=this._isCurvePath),!e.hasOwnProperty("pathPoint3D")&&WebGLPlot$f.defined(this._pathPoint3D)&&(e.pathPoint3D=[],this._pathPoint3D.forEach((t=>{e.pathPoint3D.push({x:t.x,y:t.y,z:t.z})}))),!e.hasOwnProperty("scalePoint2D")&&WebGLPlot$f.defined(this._scalePoint2D)&&(e.scalePoint2D=[],this._scalePoint2D.forEach((t=>{e.scalePoint2D.push({x:t.x,y:t.y})}))),!e.hasOwnProperty("originPosition")&&WebGLPlot$f.defined(this._originPosition)&&(e.originPosition={x:this._originPosition.x,y:this._originPosition.y,z:this._originPosition.z}),!e.hasOwnProperty("targetPosition")&&WebGLPlot$f.defined(this._targetPosition)&&(e.targetPosition={x:this._targetPosition.x,y:this._targetPosition.y,z:this._targetPosition.z}),!e.hasOwnProperty("targetGeoEntityUUID")&&WebGLPlot$f.defined(this._targetGeoEntityUUID)&&(e.targetGeoEntityUUID=this._targetGeoEntityUUID),!e.hasOwnProperty("originGeoEntityUUID")&&WebGLPlot$f.defined(this._originGeoEntityUUID)&&(e.originGeoEntityUUID=this._originGeoEntityUUID),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.isTimeMode)&&(this._isTimeMode=t.isTimeMode),WebGLPlot$f.defined(t.time)&&(this._time=t.time),WebGLPlot$f.defined(t.speed)&&(this._speed=t.speed),WebGLPlot$f.defined(t.isCurvePath)&&(this._isCurvePath=t.isCurvePath),WebGLPlot$f.defined(t.pathPoint3D)&&(this._pathPoint3D=[],t.pathPoint3D.forEach((e=>{this._pathPoint3D.push(new _0x11ff81(e.x,e.y,e.z))}))),WebGLPlot$f.defined(t.scalePoint2D)&&(this._scalePoint2D=[],t.scalePoint2D.forEach((e=>{this._scalePoint2D.push(new WebGLPlot$f.Cartesian2(e.x,e.y))}))),WebGLPlot$f.defined(t.targetPosition)&&(this._targetPosition=new _0x11ff81(t.targetPosition.x,t.targetPosition.y,t.targetPosition.z)),WebGLPlot$f.defined(t.originPosition)&&(this._originPosition=new _0x11ff81(t.originPosition.x,t.originPosition.y,t.originPosition.z)),WebGLPlot$f.defined(t.targetGeoEntityUUID)&&(this._targetGeoEntityUUID=t.targetGeoEntityUUID),WebGLPlot$f.defined(t.originGeoEntityUUID)&&(this._originGeoEntityUUID=t.originGeoEntityUUID)}getUUID(){return this._UUID}setIsTimeMode(e){this._isTimeMode=e}isTimeMode(){return this._isTimeMode}setTime(e){this._time=e}getTime(){return this._time}setSpeed(e){this._speed=e}getSpeed(){return this._speed}setScalePoint2D(e){this._scalePoint2D=e,this._pathPoint3D=void 0}getScalePoint2D(){return this._scalePoint2D}setPathPoint3D(e){this._pathPoint3D=e,this._scalePoint2D=void 0}getPathPoint3D(){return this._pathPoint3D}setTargetPosition(e){this._targetPosition=e}getTargetPosition(){return this._targetPosition}setOriginPosition(e){this._originPosition=e}getOriginPosition(){return this._originPosition}setTargetGeoEntityUUID(e){this._targetGeoEntityUUID=e}getTargetGeoEntityUUID(){return this._targetGeoEntityUUID}setOriginGeoEntityUUID(e){this._originGeoEntityUUID=e}getOriginGeoEntityUUID(){return this._originGeoEntityUUID}setIsCurvePath(e){this._isCurvePath=e}isCurvePath(){return this._isCurvePath}clone(){let e=new _0x354a71;return e._UUID=this._UUID,e._isTimeMode=this._isTimeMode,e._time=this._time,e._speed=this._speed,e._isCurvePath=this._isCurvePath,WebGLPlot$f.defined(this._pathPoint3D)&&(e._pathPoint3D=[],this._pathPoint3D.forEach((t=>{e._pathPoint3D.push(new _0x11ff81(t.x,t.y,t.z))}))),WebGLPlot$f.defined(this._scalePoint2D)&&(e._scalePoint2D=[],this._scalePoint2D.forEach((t=>{e._scalePoint2D.push(new WebGLPlot$f.Cartesian2(t.x,t.y))}))),e._originPosition=this._originPosition,e._targetPosition=this._targetPosition,e._targetGeoEntityUUID=this._targetGeoEntityUUID,e._originGeoEntityUUID=this._originGeoEntityUUID,e}}var _0x339153=(_0x1b5cc5=!0,function(e,t){var i=_0x1b5cc5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b5cc5=!1,i}),_0x200b11=_0x339153(void 0,(function(){return _0x200b11.toString().search("(((.+)+)+)+$").toString().constructor(_0x200b11).search("(((.+)+)+)+$")})),_0x1b5cc5;_0x200b11();var _0xdb296e={NO:0,ONEWAY:1,BOTHWAY:2},_0x12cd7b=Object.freeze(_0xdb296e);const _0x294a2a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xc2ee1d=_0x294a2a(void 0,(function(){return _0xc2ee1d.toString().search("(((.+)+)+)+$").toString().constructor(_0xc2ee1d).search("(((.+)+)+)+$")}));_0xc2ee1d();class _0x537142{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._time=WebGLPlot$f.defaultValue(e.time,0),this._startRotation=WebGLPlot$f.defaultValue(e.startRotation,new _0x11ff81(0,0,0)),this._endRotation=WebGLPlot$f.defaultValue(e.endRotation,new _0x11ff81(0,0,0)),this._cyclicType=WebGLPlot$f.defaultValue(e.cyclicType,_0x12cd7b.NO),this._isGradient=WebGLPlot$f.defaultValue(e.isGradient,!0),WebGLPlot$f.defined(e.time)||WebGLPlot$f.defined(e.totalTime)?this._totalTime=WebGLPlot$f.defaultValue(e.totalTime,e.time):this._totalTime=void 0,this._UUID=WebGLPlot$f.createGuid()}getUUID(){return this._UUID}setTotalTime(e){this._totalTime=e}getTotalTime(){return this._totalTime}setTime(e){this._time=e,WebGLPlot$f.defined(this._totalTime)||(this._totalTime=this._time)}getTime(){return this._time}setStartRotation(e){this._startRotation=e}getStartRotation(){return this._startRotation}setEndRotation(e){this._endRotation=e}getEndRotation(){return this._endRotation}setCyclicType(e){this._cyclicType=e}getCyclicType(){return this._cyclicType}setIsGradient(e){this._isGradient=e}isGradient(){return this._isGradient}_toJson(){let e={};e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("time")||(e.time=this._time);e.hasOwnProperty("startRotation")||(e.startRotation={},e.startRotation.hasOwnProperty("x")||(e.startRotation.x=this._startRotation.x),e.startRotation.hasOwnProperty("y")||(e.startRotation.y=this._startRotation.y),e.startRotation.hasOwnProperty("z")||(e.startRotation.z=this._startRotation.z));return e.hasOwnProperty("endRotation")||(e.endRotation={},e.endRotation.hasOwnProperty("x")||(e.endRotation.x=this._endRotation.x),e.endRotation.hasOwnProperty("y")||(e.endRotation.y=this._endRotation.y),e.endRotation.hasOwnProperty("z")||(e.endRotation.z=this._endRotation.z)),e.hasOwnProperty("cyclicType")||(e.cyclicType=this._cyclicType),e.hasOwnProperty("isGradient")||(e.isGradient=this._isGradient),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.time)&&(this._time=t.time),WebGLPlot$f.defined(t.startRotation)&&(WebGLPlot$f.defined(t.startRotation.x)&&(this._startRotation.x=t.startRotation.x),WebGLPlot$f.defined(t.startRotation.y)&&(this._startRotation.y=t.startRotation.y),WebGLPlot$f.defined(t.startRotation.z)&&(this._startRotation.z=t.startRotation.z)),WebGLPlot$f.defined(t.endRotation)&&(WebGLPlot$f.defined(t.endRotation.x)&&(this._endRotation.x=t.endRotation.x),WebGLPlot$f.defined(t.endRotation.y)&&(this._endRotation.y=t.endRotation.y),WebGLPlot$f.defined(t.endRotation.z)&&(this._endRotation.z=t.endRotation.z)),WebGLPlot$f.defined(t.cyclicType)&&(this._cyclicType=t.cyclicType),WebGLPlot$f.defined(t.isGradient)&&(this._isGradient=t.isGradient)}}const _0x2bd227=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x57e4b3=_0x2bd227(void 0,(function(){return _0x57e4b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x57e4b3).search("(((.+)+)+)+$")}));_0x57e4b3();class _0xbe66a7{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._time=WebGLPlot$f.defaultValue(e.time,0),this._startScale=WebGLPlot$f.defaultValue(e.startScale,1),this._endScale=WebGLPlot$f.defaultValue(e.endScale,1),this._cyclicType=WebGLPlot$f.defaultValue(e.cyclicType,_0x12cd7b.NO),this._isGradient=WebGLPlot$f.defaultValue(e.isGradient,!0),WebGLPlot$f.defined(e.time)||WebGLPlot$f.defined(e.totalTime)?this._totalTime=WebGLPlot$f.defaultValue(e.totalTime,e.time):this._totalTime=void 0,this._UUID=WebGLPlot$f.createGuid()}getUUID(){return this._UUID}setTotalTime(e){this._totalTime=e}getTotalTime(){return this._totalTime}setTime(e){this._time=e,WebGLPlot$f.defined(this._totalTime)||(this._totalTime=this._time)}getTime(){return this._time}setStartScale(e){this._startScale=e}getStartScale(){return this._startScale}setEndScale(e){this._endScale=e}getEndScale(){return this._endScale}setCyclicType(e){this._cyclicType=e}getCyclicType(){return this._cyclicType}setIsGradient(e){this._isGradient=e}isGradient(){return this._isGradient}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("time")||(e.time=this._time),e.hasOwnProperty("startScale")||(e.startScale=this._startScale),e.hasOwnProperty("endScale")||(e.endScale=this._endScale),e.hasOwnProperty("cyclicType")||(e.cyclicType=this._cyclicType),e.hasOwnProperty("isGradient")||(e.isGradient=this._isGradient),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.time)&&(this._time=t.time),WebGLPlot$f.defined(t.startScale)&&(this._startScale=t.startScale),WebGLPlot$f.defined(t.endScale)&&(this._endScale=t.endScale),WebGLPlot$f.defined(t.cyclicType)&&(this._cyclicType=t.cyclicType),WebGLPlot$f.defined(t.isGradient)&&(this._isGradient=t.isGradient)}}const _0x21d437=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1fabd8=_0x21d437(void 0,(function(){return _0x1fabd8.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fabd8).search("(((.+)+)+)+$")}));_0x1fabd8();class _0x3139ed{constructor(e,t,i,n,r,o,a){this._geoEntityUUID=e,this._geoEntityMoveParameter=t,this._executeManagerCalc=n,this._groupIndex=r,this._speed=0,this._curvePath3D=[],this._controlPointIndexs=[],this._isToTarget=!1,this._lastTime=void 0,this._lastDistance=0,this._isFinished=!1,this._isChangeCurve=!1,this._moveMode=-1,this._position=o,this._rotation=a,this._geoEntityMoveParameter=t,this._init(t,i)}_createCurve3D(e){let t=_0x2887b9.getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$f.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new Cesium.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_init(e,t){let i=e.isTimeMode(),n=e.getTime(),r=e.getSpeed(),o=e.getPathPoint3D(),a=e.getScalePoint2D();if(i&&WebGLPlot$f.defined(n)){let i=1e3*n;if(i>0){let n,r=[],s=e.getOriginGeoEntityUUID();WebGLPlot$f.defined(s)&&(n=this._executeManagerCalc._getPosition(this._groupIndex,s,t));let l,u=e.getTargetGeoEntityUUID();if(WebGLPlot$f.defined(u)&&(l=this._executeManagerCalc._getPosition(this._groupIndex,u,t+i)),WebGLPlot$f.defined(o))WebGLPlot$f.defined(n)&&r.push(n),o.forEach((e=>{r.push(e)})),WebGLPlot$f.defined(l)&&r.push(l);else if(WebGLPlot$f.defined(a)){if(WebGLPlot$f.defined(n)&&WebGLPlot$f.defined(l)){let e=[n,l];r=[n,l];let t=_0x2887b9.getAllDistance(e);a.forEach((i=>{let n=t*i.x,o=_0x2887b9.getPositionByDistance(e,n);r.splice(r.length-1,0,new WebGLPlot$f.Cartesian3(o.point.x,o.point.y,o.point.z+i.y))}))}}else WebGLPlot$f.defined(n)&&r.push(n),WebGLPlot$f.defined(l)&&r.push(l);if(r=this._convertToCartesian3(r),r.length>=2&&_0x2887b9.getAllDistance(r)>.001){if(this._moveMode=0,e.isCurvePath()){let e=this._createCurve3D(r);this._curvePath3D=e.curvePath3D}else this._curvePath3D=r;let n=_0x2887b9.getAllDistance(this._curvePath3D);this._speed=n/i,this._lastTime=t,this._lastDistance=0}}}else if(!i&&WebGLPlot$f.defined(r)){let i=r/1e3;if(i>0){let n,r=[],s=e.getOriginGeoEntityUUID();WebGLPlot$f.defined(s)&&(n=this._executeManagerCalc._getPosition(this._groupIndex,s,t));let l,u=e.getTargetGeoEntityUUID();if(WebGLPlot$f.defined(u)&&(l=this._executeManagerCalc._getPosition(this._groupIndex,u,t)),WebGLPlot$f.defined(o))WebGLPlot$f.defined(n)&&r.push(n),o.forEach((e=>{r.push(e)})),WebGLPlot$f.defined(l)&&r.push(l);else if(WebGLPlot$f.defined(a)){if(WebGLPlot$f.defined(n)&&WebGLPlot$f.defined(l)){let e=[n,l];r=[n,l];let t=_0x2887b9.getAllDistance(e);a.forEach((i=>{let n=t*i.x,o=_0x2887b9.getPositionByDistance(e,n);r.splice(r.length-1,0,new WebGLPlot$f.Cartesian3(o.point.x,o.point.y,o.point.z+i.y))}))}}else WebGLPlot$f.defined(n)&&r.push(n),WebGLPlot$f.defined(l)&&r.push(l);if(r=this._convertToCartesian3(r),r.length>=2&&_0x2887b9.getAllDistance(r)>.001){if(WebGLPlot$f.defined(l)?this._moveMode=1:this._moveMode=0,e.isCurvePath()){let e=this._createCurve3D(r);this._curvePath3D=e.curvePath3D,this._controlPointIndexs=e.controlPointIndexs}else{this._curvePath3D=r;for(let e=0;e<r.length;e++)this._controlPointIndexs.push(e)}1===this._moveMode&&this._controlPointIndexs.splice(this._controlPointIndexs.length-1,1),this._speed=i,this._lastTime=t,this._lastDistance=0}}}}_convertToCartesian3(e){let t=[];return e.forEach((e=>{t.push(_0x2887b9.degreesToCartesian3(e))})),t}_caclulate(e){if(!this._isFinished)if(this._geoEntityMoveParameter.isTimeMode()&&0===this._geoEntityMoveParameter.getTime()){this._isFinished=!0;let t,i=this._geoEntityMoveParameter.getTargetGeoEntityUUID();if(WebGLPlot$f.defined(i)&&(t=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityMoveParameter.getTargetGeoEntityUUID(),e)),!WebGLPlot$f.defined(t)){let e=this._geoEntityMoveParameter.getPathPoint3D();WebGLPlot$f.defined(e)&&e.length>0&&(t=e[e.length-1])}WebGLPlot$f.defined(t)&&(this._position=t)}else{let t=e-this._lastTime;this._lastTime=e;let i=this._lastDistance+t*this._speed;this._lastDistance=i;let n=[];if(this._isToTarget){let t=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityUUID,e),i=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityMoveParameter.getTargetGeoEntityUUID(),e),r=_0x2887b9.degreesToCartesian3(t),o=_0x2887b9.degreesToCartesian3(i);WebGLPlot$f.defined(t)&&WebGLPlot$f.defined(i)&&WebGLPlot$f.Cartesian3.distance(this._curvePath3D[this._curvePath3D.length-1],o)>.001?(this._isChangeCurve?this._curvePath3D.splice(this._curvePath3D.length-1):(this._curvePath3D.splice(this._controlPointIndexs[this._controlPointIndexs.length-1]),this._isChangeCurve=!0),n.push(r),n.push(o),this._curvePath3D=this._curvePath3D.concat(n),n=this._curvePath3D):n=this._curvePath3D}else n=this._curvePath3D;if(i>_0x2887b9.getAllDistance(n))this._isFinished=!0;else{let e=_0x2887b9.getPositionByDistance(n,i),t=e.index;if(t<n.length&&t>=0){if(!this._isToTarget&&1===this._moveMode&&t>=this._controlPointIndexs[this._controlPointIndexs.length-1]&&(this._isToTarget=!0),this._position=_0x2887b9.cartesian3ToDegrees(e.point),t!==n.length-1){let i=n[t+1];if(e.point.x!==i.x||e.point.y!==i.y||e.point.z!==i.z){let t=_0x2887b9.getPitch(e.point,i),n=_0x2887b9.getHeading(e.point,i);if(t&&n){let e=new _0x11ff81(0);e.x=WebGLPlot$f.CesiumMath.toDegrees(t),e.z=WebGLPlot$f.CesiumMath.toDegrees(n),this._rotation=e}}}}else this._isFinished=!0}}return{position:this._position,rotation:this._rotation}}}const _0x1b824c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x464403=_0x1b824c(void 0,(function(){return _0x464403.toString().search("(((.+)+)+)+$").toString().constructor(_0x464403).search("(((.+)+)+)+$")}));_0x464403();class _0x177623{constructor(e,t){this._geoEntityRotationParameter=e,this._speed=void 0,this._startTime=t,this._cyclicStartTime=void 0,this._lastTime=void 0,this._isBack=!1,this._isFinished=!1,this._rotate=void 0,this._init(e,t)}_init(e,t){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t))return void(this._isFinished=!0);let i=1e3*e.getTime();if(i<0)return void(this._isFinished=!0);let n=e.getStartRotation(),r=e.getEndRotation();this._isBack&&(n=e.getEndRotation(),r=e.getStartRotation()),this._speed=new _0x11ff81(0,0,0),e.isGradient()&&(this._speed=new _0x11ff81((r.x-n.x)/i,(r.y-n.y)/i,(r.z-n.z)/i)),this._cyclicStartTime=t,this._lastTime=t,this._rotate=new _0x11ff81(n.x,n.y,n.z),this._isFinished=!1}_caclulate(e){if(WebGLPlot$f.defined(this._geoEntityRotationParameter)){if(this._isFinished)return this._rotate;if(e-this._startTime>1e3*this._geoEntityRotationParameter.getTotalTime()&&(this._isFinished=!0),e-this._cyclicStartTime>1e3*this._geoEntityRotationParameter.getTime()){let t=this._geoEntityRotationParameter.getCyclicType();t==_0x12cd7b.NO?(this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isFinished=!0):t==_0x12cd7b.ONEWAY?(this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isFinished||this._init(this._geoEntityRotationParameter,e)):t==_0x12cd7b.BOTHWAY&&(this._isBack?this._rotate=this._geoEntityRotationParameter.getStartRotation().clone():this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isBack=!this._isBack,this._isFinished||this._init(this._geoEntityRotationParameter,e))}else{let t=e-this._lastTime;this._lastTime=e;let i=this._rotate.x+t*this._speed.x,n=this._rotate.y+t*this._speed.y,r=this._rotate.z+t*this._speed.z;this._rotate=new _0x11ff81(i,n,r)}return this._rotate}}}const _0x3edec0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xcbebed=_0x3edec0(void 0,(function(){return _0xcbebed.toString().search("(((.+)+)+)+$").toString().constructor(_0xcbebed).search("(((.+)+)+)+$")}));_0xcbebed();class _0x109a17{constructor(e,t){this._geoEntityScaleParameter=e,this._speed=void 0,this._startTime=t,this._cyclicStartTime=void 0,this._lastTime=void 0,this._isBack=!1,this._isFinished=!1,this._scale=void 0,this._init(e,t)}_init(e,t){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t))return void(this._isFinished=!0);let i=1e3*e.getTime();if(i<0)return void(this._isFinished=!0);let n=e.getStartScale(),r=e.getEndScale();this._isBack&&(n=e.getEndScale(),r=e.getStartScale()),this._speed=0,e.isGradient()&&(this._speed=(r-n)/i),this._cyclicStartTime=t,this._lastTime=t,this._scale=n,this._isFinished=!1}_caclulate(e){if(WebGLPlot$f.defined(this._geoEntityScaleParameter)){if(this._isFinished)return this._scale;if(e-this._startTime>1e3*this._geoEntityScaleParameter.getTotalTime()&&(this._isFinished=!0),e-this._cyclicStartTime>1e3*this._geoEntityScaleParameter.getTime()){let t=this._geoEntityScaleParameter.getCyclicType();t==_0x12cd7b.NO?(this._isFinished=!0,this._scale=this._geoEntityScaleParameter.getEndScale()):t==_0x12cd7b.ONEWAY?(this._scale=this._geoEntityScaleParameter.getEndScale(),this._isFinished||this._init(this._geoEntityScaleParameter,e)):t==_0x12cd7b.BOTHWAY&&(this._isBack?this._scale=this._geoEntityScaleParameter.getStartScale():this._scale=this._geoEntityScaleParameter.getEndScale(),this._isBack=!this._isBack,this._isFinished||this._init(this._geoEntityScaleParameter,e))}else{let t=e-this._lastTime;this._lastTime=e,this._scale+=t*this._speed}return this._scale}}}const _0x25eae7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2658e5=_0x25eae7(void 0,(function(){return _0x2658e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x2658e5).search("(((.+)+)+)+$")}));_0x2658e5();class _0x47d1ee{constructor(e,t,i){this._deductionScript=e,this._executeManagerCalc=t,this._currentGroupIndex=i,this._currentGeoEntityBasicParameter=void 0,this._currentGeoEntityEffectParameter=void 0,this._currentGeoEntityMoveParameter=void 0,this._currentGeoEntityRotationParameter=void 0,this._currentGeoEntityScaleParameter=void 0,this._geoEntity=void 0,this._finishTime=void 0,this._geoEntityMoveCalc=void 0,this._geoEntityRotationCalc=void 0,this._geoEntityScaleCalc=void 0,this._position=void 0,this._scale=void 0,this._rotation=void 0,this._startTime=void 0}_getGeoEntityUUID(){return this._deductionScript.getGeoEntityUUID()}_setGeoEntityMoveParameter(e,t){this._geoEntityMoveCalc=new _0x3139ed(this._deductionScript.getGeoEntityUUID(),e,t,this._executeManagerCalc,this._currentGroupIndex,this._position,this._rotation)}_setGeoEntityRotationParameter(e,t){this._geoEntityRotationCalc=new _0x177623(e,t)}_setGeoEntityScaleParameter(e,t){this._geoEntityScaleCalc=new _0x109a17(e,t)}_getPosition(){return this._position}_start(e){this._startTime=e,this._geoEntity=_0x41dd10.getInstance().getGeoEntityManager().getGeoEntityByUUID(this._deductionScript.getGeoEntityUUID()),WebGLPlot$f.defined(this._geoEntity)&&(this._position=this._geoEntity.getGeoEntityParameter().getPosition(),this._rotation=this._geoEntity.getGeoEntityParameter().getModelRotate(),this._scale=this._geoEntity.getGeoEntityParameter().getModelScale())}_excuteMove(e){if(!WebGLPlot$f.defined(this._geoEntityMoveCalc))return;let t={},i=this._geoEntityMoveCalc._caclulate(e);return WebGLPlot$f.defined(i)&&(WebGLPlot$f.defined(i.position)&&(t.position=i.position),WebGLPlot$f.defined(i.rotation)&&(t.moveRotate=i.rotation)),t}_excuteRotation(e){if(!WebGLPlot$f.defined(this._geoEntityRotationCalc))return;let t=this._geoEntityRotationCalc._caclulate(e);return WebGLPlot$f.defined(t)?t:void 0}_excuteScale(e){if(!WebGLPlot$f.defined(this._geoEntityScaleCalc))return;let t=this._geoEntityScaleCalc._caclulate(e);return WebGLPlot$f.defined(t)?t:void 0}_isLegal(e){if(!WebGLPlot$f.defined(e))return!1;let t=e._getGeoEntityParameter();return!!(t._isModelPathUpdate&&t._isVisibleUpdate&&t._isDotPlotLibIDUpdate&&t._isDotPlotCodeUpdate&&t._isDotPlotStyleUpdate&&t._isPicturePathUpdate&&t._isShowModeUpdate&&t._isDistanceChangeModeUpdate&&t._isChangeModeDistanceUpdate)}_execute(e){if(this._isDeductionScriptExecuteStop(e))return;let t=e-this._startTime,i=t/1e3,n=this._deductionScript.getGeoEntityBasicParameterTimes();for(let e=0;e<n.length;e++){let t=n[e],r=this._deductionScript.getGeoEntityBasicParameter(t);if(i>=t){if(e===n.length-1){this._currentGeoEntityBasicParameter=r.clone();break}if(i<n[e+1]){this._currentGeoEntityBasicParameter=r.clone();break}}}let r=this._deductionScript.getGeoEntityEffectParameterTimes();for(let e=0;e<r.length;e++){let t=r[e],n=this._deductionScript.getGeoEntityEffectParameter(t);if(i>=t){if(e===r.length-1){this._currentGeoEntityEffectParameter=n;break}if(i<r[e+1]){this._currentGeoEntityEffectParameter=n;break}}}let o,a,s=this._deductionScript.getGeoEntityMoveParameterTimes();for(let e=0;e<s.length;e++){let t=s[e],n=this._deductionScript.getGeoEntityMoveParameter(t);if(i>=t){if(e===s.length-1){o=n,a=1e3*t;break}if(i<s[e+1]){o=n,a=1e3*t;break}}}let l,u,c=this._deductionScript.getGeoEntityRotationParameterTimes();for(let e=0;e<c.length;e++){let t=c[e],n=this._deductionScript.getGeoEntityRotationParameter(t);if(i>=t){if(e===c.length-1){l=n,u=1e3*t;break}if(i<c[e+1]){l=n,u=1e3*t;break}}}let h,d,f=this._deductionScript.getGeoEntityScaleParameterTimes();for(let e=0;e<f.length;e++){let t=f[e],n=this._deductionScript.getGeoEntityScaleParameter(t);if(i>=t){if(e===f.length-1){h=n,d=1e3*t;break}if(i<f[e+1]){h=n,d=1e3*t;break}}}!WebGLPlot$f.defined(this._currentGeoEntityBasicParameter)&&WebGLPlot$f.defined(this._geoEntity)&&(this._currentGeoEntityBasicParameter=new _0x78fecc,this._currentGeoEntityBasicParameter._UUID="InitGeoEntityBasicParameter",this._currentGeoEntityBasicParameter._geoEntityParameter=this._geoEntity.getGeoEntityParameter()),WebGLPlot$f.defined(this._currentGeoEntityEffectParameter)||(this._currentGeoEntityEffectParameter=new _0x25bff7,this._currentGeoEntityEffectParameter._UUID="InitGeoEntityEffectParameter",WebGLPlot$f.defined(this._geoEntity)&&this._geoEntity.getGeoEntityEffects().forEach((e=>{this._currentGeoEntityEffectParameter._geoEntityEffects.push(e.clone())}))),WebGLPlot$f.defined(o)&&(!WebGLPlot$f.defined(this._currentGeoEntityMoveParameter)||this._currentGeoEntityMoveParameter.getUUID()!=o.getUUID())&&(this._currentGeoEntityMoveParameter=o,this._setGeoEntityMoveParameter(o,a)),WebGLPlot$f.defined(l)&&(!WebGLPlot$f.defined(this._currentGeoEntityRotationParameter)||this._currentGeoEntityRotationParameter.getUUID()!=l.getUUID())&&(this._currentGeoEntityRotationParameter=l,this._setGeoEntityRotationParameter(l,u)),WebGLPlot$f.defined(h)&&(!WebGLPlot$f.defined(this._currentGeoEntityScaleParameter)||this._currentGeoEntityScaleParameter.getUUID()!=h.getUUID())&&(this._currentGeoEntityScaleParameter=h,this._setGeoEntityScaleParameter(h,d));let p={position:this._position,rotation:this._rotation,scale:this._scale};p.UUID=this._deductionScript.getGeoEntityUUID(),WebGLPlot$f.defined(this._currentGeoEntityMoveParameter)&&(p.geoEntityMoveParameter={UUID:this._currentGeoEntityMoveParameter.getUUID(),geoEntityMoveParameter:this._currentGeoEntityMoveParameter}),WebGLPlot$f.defined(this._currentGeoEntityBasicParameter)&&(p.geoEntityBasicParameter={UUID:this._currentGeoEntityBasicParameter.getUUID(),geoEntityBasicParameter:this._currentGeoEntityBasicParameter}),WebGLPlot$f.defined(this._currentGeoEntityEffectParameter)&&(p.geoEntityEffectParameter={UUID:this._currentGeoEntityEffectParameter.getUUID(),geoEntityEffectParameter:this._currentGeoEntityEffectParameter});let _=this._excuteMove(t),m=this._excuteRotation(t),g=this._excuteScale(t);return WebGLPlot$f.defined(_)&&WebGLPlot$f.defined(_.position)&&(p.position=_.position),WebGLPlot$f.defined(_)&&WebGLPlot$f.defined(_.moveRotate)&&(p.rotation=_.moveRotate),WebGLPlot$f.defined(m)&&(p.rotation=new _0x11ff81(p.rotation.x+m.x,p.rotation.y+m.y,p.rotation.z+m.z)),WebGLPlot$f.defined(g)&&(p.scale=g),p}_isDeductionScriptExecuteStop(e){let t=!1,i=this._deductionScript.getGeoEntityMoveParameterTimes();if(0===i.length)t=!0;else{let e=i[i.length-1];WebGLPlot$f.defined(this._currentGeoEntityMoveParameter)&&this._currentGeoEntityMoveParameter.getUUID()===this._deductionScript.getGeoEntityMoveParameter(e).getUUID()&&(!WebGLPlot$f.defined(this._geoEntityMoveCalc)||!0===this._geoEntityMoveCalc._isFinished)&&(t=!0)}let n=!1,r=this._deductionScript.getGeoEntityRotationParameterTimes();if(0===r.length)n=!0;else{let e=r[r.length-1];WebGLPlot$f.defined(this._currentGeoEntityRotationParameter)&&this._currentGeoEntityRotationParameter.getUUID()===this._deductionScript.getGeoEntityRotationParameter(e).getUUID()&&(!WebGLPlot$f.defined(this._geoEntityRotationCalc)||!0===this._geoEntityRotationCalc._isFinished)&&(n=!0)}let o=!1,a=this._deductionScript.getGeoEntityScaleParameterTimes();if(0===a.length)o=!0;else{let e=a[a.length-1];WebGLPlot$f.defined(this._currentGeoEntityScaleParameter)&&this._currentGeoEntityScaleParameter.getUUID()===this._deductionScript.getGeoEntityScaleParameter(e).getUUID()&&(!WebGLPlot$f.defined(this._geoEntityScaleCalc)||!0===this._geoEntityScaleCalc._isFinished)&&(o=!0)}let s=!1,l=this._deductionScript.getGeoEntityBasicParameterTimes();if(0===l.length)s=!0;else{let e=l[l.length-1];WebGLPlot$f.defined(this._currentGeoEntityBasicParameter)&&this._currentGeoEntityBasicParameter.getUUID()===this._deductionScript.getGeoEntityBasicParameter(e).getUUID()&&(s=!0)}let u=!1,c=this._deductionScript.getGeoEntityEffectParameterTimes();if(0===c.length)u=!0;else{let e=c[c.length-1];WebGLPlot$f.defined(this._currentGeoEntityEffectParameter)&&this._currentGeoEntityEffectParameter.getUUID()===this._deductionScript.getGeoEntityEffectParameter(e).getUUID()&&(u=!0)}if(t&&n&&o&&s&&u){if(this._deductionScript.getDelayFinishTime()>0){if(!WebGLPlot$f.defined(this._finishTime))return this._finishTime=e,!1;if(e-this._finishTime<=1e3*this._deductionScript.getDelayFinishTime())return!1}return!0}return!1}}const _0xa45c3b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x30935d=_0xa45c3b(void 0,(function(){return _0x30935d.toString().search("(((.+)+)+)+$").toString().constructor(_0x30935d).search("(((.+)+)+)+$")}));_0x30935d();class _0x101f8e{constructor(){this._deductionScriptGroups=void 0,this._allActions=void 0}static getInstance(){return _0x101f8e._instance||(_0x101f8e._instance=new _0x101f8e),_0x101f8e._instance}_reset(){this._deductionScriptGroups=void 0,this._allActions=void 0}_getAllActions(){return this._allActions}_containDeductionScriptGeoEntity(e,t){let i=e.getDeductionScripts();for(let e=0;e<i.length;e++)if(i[e].getGeoEntityUUID()===t)return i[e]}_calcDeductionScript(e,t,i,n,r){if(-1!==t.indexOf(n.getUUID()))return;n.getGeoEntityMoveParameterTimes().forEach((o=>{let a=n.getGeoEntityMoveParameter(o),s=a.getOriginGeoEntityUUID(),l=a.getTargetGeoEntityUUID();if(WebGLPlot$f.defined(s)&&s!==n.getGeoEntityUUID()){let n=this._containDeductionScriptGeoEntity(i,s);WebGLPlot$f.defined(n)&&-1===t.indexOf(n.getUUID())&&this._calcDeductionScript(e,t,i,n,r)}if(WebGLPlot$f.defined(l)){let n=this._containDeductionScriptGeoEntity(i,l);WebGLPlot$f.defined(n)&&-1===t.indexOf(n.getUUID())&&this._calcDeductionScript(e,t,i,n,r)}})),t.push(n.getUUID()),e.set(n.getGeoEntityUUID(),[]);let o=new _0x47d1ee(n,this,r);o._start(0);let a=10;for(;;){let t=o._execute(a);if(!WebGLPlot$f.defined(t))break;t.time=a,e.get(n.getGeoEntityUUID()).push(t),a+=10}}_getPosition(e,t,i){let n;if(WebGLPlot$f.defined(this._allActions)){let r=this._allActions.groupActions;if(r.length>0){let o=r[e].actions;if(o.has(t)){let e=o.get(t);for(let t=0;t<e.length;t++){let r=e[t];if(i>=r.time){if(t===e.length-1){n=r.position;break}if(i<e[t+1].time){n=r.position;break}}}}if(!WebGLPlot$f.defined(n))for(let i=e-1;i>=0;i--){let e=r[i].actions;if(e.has(t)){let i=e.get(t);i.length>0&&(n=i[i.length-1].position);break}}}}if(!WebGLPlot$f.defined(n)){let e=_0x41dd10.getInstance().getGeoEntityManager().getGeoEntityByUUID(t);WebGLPlot$f.defined(e)&&(n=e.getGeoEntityParameter().getPosition())}return n}_calcute(){this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._allActions={};let e=0,t=[];this._allActions.groupActions=t;for(let i=0;i<this._deductionScriptGroups.length;i++){let n=this._deductionScriptGroups[i],r={};t.push(r);let o=new Map;r.actions=o;let a=[],s=n.getDeductionScriptExtend()._getDeductionScript();this._calcDeductionScript(o,a,n,s,i),n.getDeductionScripts().forEach((e=>{this._calcDeductionScript(o,a,n,e,i)}));let l=0;o.forEach(((e,t)=>{if(e.length>0){let t=e[e.length-1].time;t>l&&(l=t)}})),r.time=l,e+=l}this._allActions.time=e,console.log(this._allActions)}_findGeoEntityMoveParameter(e){if(WebGLPlot$f.defined(this._deductionScriptGroups))for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t].getDeductionScripts();for(let n=0;n<i.length;n++){let r=i[n],o=r.getGeoEntityMoveParameterTimes();for(let i=0;i<o.length;i++){let n=r.getGeoEntityMoveParameter(o[i]);if(n.getUUID()===e)return{geoEntityMoveParameter:n,deductionScript:r,groupIndex:t,time:o[i]}}}}}_indexOfDeductionScript(e){if(WebGLPlot$f.defined(this._deductionScriptGroups))for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t].getDeductionScripts();for(let n=0;n<i.length;n++)if(i[n].getUUID()===e)return t}return-1}_calcGeoEntityMoveParameter(e,t,i){let n=this._getMoveParameterTime(e.getUUID()),r=this._getMoveParameterSpeed(e.getUUID());WebGLPlot$f.defined(n)&&WebGLPlot$f.defined(r)&&(WebGLPlot$f.defined(e.getOriginGeoEntityUUID())&&e.setOriginPosition(this._getPosition(i,e.getOriginGeoEntityUUID(),1e3*t)),WebGLPlot$f.defined(e.getTargetGeoEntityUUID())&&WebGLPlot$f.defined(n)&&e.setTargetPosition(this._getPosition(i,e.getTargetGeoEntityUUID(),1e3*(t+n))),e.setTime(n),e.setSpeed(r))}_getMoveParameterTime(e){let t;if(WebGLPlot$f.defined(this._deductionScriptGroups)){let i=this._findGeoEntityMoveParameter(e);if(WebGLPlot$f.defined(i)){t=i.geoEntityMoveParameter.getTime();let n=i.groupIndex,r=i.deductionScript.getGeoEntityUUID();if(!i.geoEntityMoveParameter.isTimeMode()&&WebGLPlot$f.defined(n)&&WebGLPlot$f.defined(r)&&WebGLPlot$f.defined(this._allActions)){let i=this._allActions.groupActions;if(n<i.length){let o=i[n].actions;if(o.has(r)){let i=o.get(r);if(WebGLPlot$f.defined(i)){let n;for(let r=0;r<i.length;r++){let o=i[r];if(Cesium.defined(o.geoEntityMoveParameter)&&o.geoEntityMoveParameter.UUID===e)WebGLPlot$f.defined(n)||(n=o.time);else if(WebGLPlot$f.defined(n)){t=(o.time-n)/1e3;break}}Cesium.defined(n)&&!Cesium.defined(t)&&(t=(i[i.length-1].time-n)/1e3)}}}}}}return t}_getMoveParameterSpeed(e){let t;if(WebGLPlot$f.defined(this._deductionScriptGroups)){let i=this._findGeoEntityMoveParameter(e);if(WebGLPlot$f.defined(i)){t=i.geoEntityMoveParameter.getSpeed();let n=i.groupIndex,r=i.deductionScript.getGeoEntityUUID();if(i.geoEntityMoveParameter.isTimeMode()&&WebGLPlot$f.defined(n)&&WebGLPlot$f.defined(r)&&WebGLPlot$f.defined(this._allActions)){let i,o,a=this._allActions.groupActions;if(n<a.length){let t=a[n].actions;if(t.has(r)){let n=t.get(r);if(WebGLPlot$f.defined(n)){let t;for(let r=0;r<n.length;r++){let a=n[r];if(Cesium.defined(a.geoEntityMoveParameter)&&a.geoEntityMoveParameter.UUID===e)WebGLPlot$f.defined(i)||(t=a.time,i=[]),i.push(a.position);else if(WebGLPlot$f.defined(t)){o=(a.time-t)/1e3;break}}WebGLPlot$f.defined(t)&&!WebGLPlot$f.defined(o)&&(o=(n[n.length-1].time-t)/1e3)}}}let s=[];i.forEach((e=>{s.push(_0x2887b9.degreesToCartesian3(e))})),t=_0x2887b9.getAllDistance(s)/o}}}return t}_getDependsDeductionScriptInfos(e,t){let i=[];if(WebGLPlot$f.defined(this._deductionScriptGroups)&&e<this._deductionScriptGroups.length)for(let n=e;n<this._deductionScriptGroups.length;n++)this._deductionScriptGroups[n].getDeductionScripts().forEach((r=>{if(r.getGeoEntityUUID()!==t||n!==e){let e=r.getGeoEntityMoveParameterTimes();for(let o=0;o<e.length;o++){let a=r.getGeoEntityMoveParameter(e[o]);(a.getOriginGeoEntityUUID()===t||a.getTargetGeoEntityUUID()===t)&&i.push({deductionScript:r,groupIndex:n})}}}));return i}_calcFlowMoveParameter(e,t,i){e.getGeoEntityMoveParameterTimes().forEach((n=>{if(n>t){let t=e.getGeoEntityMoveParameter(n);this._calcGeoEntityMoveParameter(t,n,i)}}))}_updateGeoEntityMoveParameter(e,t,i){let n=this._indexOfDeductionScript(e.getUUID());this._calcGeoEntityMoveParameter(i,t,n),this._calcFlowMoveParameter(e,t,n),this._getDependsDeductionScriptInfos(n,e.getGeoEntityUUID()).forEach((e=>{let t=e.deductionScript.getGeoEntityMoveParameterTimes();t.length>0&&this._updateGeoEntityMoveParameter(e.deductionScript,t[0],e.deductionScript.getGeoEntityMoveParameter(t[0]))}))}_removeGeoEntityMoveParameter(e,t){let i=this._indexOfDeductionScript(e.getUUID());this._calcFlowMoveParameter(e,t,i),this._getDependsDeductionScriptInfos(i,e.getGeoEntityUUID()).forEach((e=>{let t=e.deductionScript.getGeoEntityMoveParameterTimes();t.length>0&&this._updateGeoEntityMoveParameter(e.deductionScript,t[0],e.deductionScript.getGeoEntityMoveParameter(t[0]))}))}}const _0x2f80c0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xa82966=_0x2f80c0(void 0,(function(){return _0xa82966.toString().search("(((.+)+)+)+$").toString().constructor(_0xa82966).search("(((.+)+)+)+$")}));_0xa82966();class _0x39c042{constructor(e){this._UUID=WebGLPlot$f.createGuid(),this._geoEntityUUID=e,this._delayFinishTime=0,this._geoEntityBasicParameters=new Map,this._geoEntityEffectParameters=new Map,this._geoEntityMoveParameters=new Map,this._geoEntityRotationParameters=new Map,this._geoEntityScaleParameters=new Map,this._isModified=!1}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){_0x41dd10.getInstance()._saveDeductionScript(!1)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.geoEntityUUID)&&(this._geoEntityUUID=t.geoEntityUUID),WebGLPlot$f.defined(t.delayFinishTime)&&(this._delayFinishTime=t.delayFinishTime),WebGLPlot$f.defined(t.geoBaseEntityParameters)&&(this._geoEntityBasicParameters.clear(),t.geoBaseEntityParameters.forEach((e=>{let t=e.time,i=new _0x78fecc;i._fromJson(e.geoEntityBasicParameter),this._geoEntityBasicParameters.set(t,i)}))),WebGLPlot$f.defined(t.geoEntityEffectParameters)&&(this._geoEntityEffectParameters.clear(),t.geoEntityEffectParameters.forEach((e=>{let t=e.time,i=new _0x25bff7;i._fromJson(e.geoEntityEffectParameter),this._geoEntityEffectParameters.set(t,i)}))),WebGLPlot$f.defined(t.geoEntityMoveParameters)&&(this._geoEntityMoveParameters.clear(),t.geoEntityMoveParameters.forEach((e=>{let t=e.time,i=new _0x354a71;i._fromJson(e.geoEntityMoveParameter),this._geoEntityMoveParameters.set(t,i)}))),WebGLPlot$f.defined(t.geoEntityRotationParameters)&&(this._geoEntityRotationParameters.clear(),t.geoEntityRotationParameters.forEach((e=>{let t=e.time,i=new _0x537142;i._fromJson(e.geoEntityRotationParameter),this._geoEntityRotationParameters.set(t,i)}))),WebGLPlot$f.defined(t.geoEntityScaleParameters)&&(this._geoEntityScaleParameters.clear(),t.geoEntityScaleParameters.forEach((e=>{let t=e.time,i=new _0xbe66a7;i._fromJson(e.geoEntityScaleParameter),this._geoEntityScaleParameters.set(t,i)})))}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityUUID")||(e.geoEntityUUID=this._geoEntityUUID),e.hasOwnProperty("delayFinishTime")||(e.delayFinishTime=this._delayFinishTime),e.hasOwnProperty("geoBaseEntityParameters")||(e.geoBaseEntityParameters=[],this._geoEntityBasicParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityBasicParameter")||(n.geoEntityBasicParameter=t._toJson()),e.geoBaseEntityParameters.push(n)}))),e.hasOwnProperty("geoEntityEffectParameters")||(e.geoEntityEffectParameters=[],this._geoEntityEffectParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityEffectParameter")||(n.geoEntityEffectParameter=t._toJson()),e.geoEntityEffectParameters.push(n)}))),e.hasOwnProperty("geoEntityMoveParameters")||(e.geoEntityMoveParameters=[],this._geoEntityMoveParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityMoveParameter")||(n.geoEntityMoveParameter=t._toJson()),e.geoEntityMoveParameters.push(n)}))),e.hasOwnProperty("geoEntityRotationParameters")||(e.geoEntityRotationParameters=[],this._geoEntityRotationParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityRotationParameter")||(n.geoEntityRotationParameter=t._toJson()),e.geoEntityRotationParameters.push(n)}))),e.hasOwnProperty("geoEntityScaleParameters")||(e.geoEntityScaleParameters=[],this._geoEntityScaleParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityScaleParameter")||(n.geoEntityScaleParameter=t._toJson()),e.geoEntityScaleParameters.push(n)}))),JSON.stringify(e)}_getTotalTime(){let e=0,t=this.getGeoEntityBasicParameterTimes();if(t.length>0){let i=1e3*t[t.length-1];e<i&&(e=i)}let i=this.getGeoEntityEffectParameterTimes();if(i.length>0){let t=1e3*i[i.length-1];e<t&&(e=t)}let n=this.getGeoEntityMoveParameterTimes();if(n.length>0){let t=n[n.length-1],i=this.getGeoEntityMoveParameter(t),r=1e3*(n[n.length-1]+i.getTime());e<r&&(e=r)}let r=this.getGeoEntityRotationParameterTimes();if(r.length>0){let t=r[r.length-1],i=this.getGeoEntityRotationParameter(t),n=1e3*(r[r.length-1]+i.getTotalTime());e<n&&(e=n)}let o=this.getGeoEntityScaleParameterTimes();if(o.length>0){let t=o[o.length-1],i=this.getGeoEntityScaleParameter(t),n=1e3*(o[o.length-1]+i.getTotalTime());e<n&&(e=n)}return e+=1e3*this._delayFinishTime,e}getGeoEntityUUID(){return this._geoEntityUUID}getUUID(){return this._UUID}getGeoEntityBasicParameterTimes(){let e=[];return this._geoEntityBasicParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityBasicParameter(e){let t;return this._geoEntityBasicParameters.has(e)&&(t=this._geoEntityBasicParameters.get(e)),t}setGeoEntityBasicParameter(e,t){this._geoEntityBasicParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityBasicParameter(e){this._geoEntityBasicParameters.has(e)&&(this._geoEntityBasicParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityEffectParameterTimes(){let e=[];return this._geoEntityEffectParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityEffectParameter(e){let t;return this._geoEntityEffectParameters.has(e)&&(t=this._geoEntityEffectParameters.get(e)),t}setGeoEntityEffectParameter(e,t){this._geoEntityEffectParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityEffectParameter(e){this._geoEntityEffectParameters.has(e)&&(this._geoEntityEffectParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityMoveParameterTimes(){let e=[];return this._geoEntityMoveParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityMoveParameter(e){let t;return this._geoEntityMoveParameters.has(e)&&(t=this._geoEntityMoveParameters.get(e)),t}setGeoEntityMoveParameter(e,t){this._geoEntityMoveParameters.set(e,t),_0x101f8e.getInstance()._calcute(),_0x101f8e.getInstance()._updateGeoEntityMoveParameter(this,e,t),this._isModified=!0,this._save()}removeGeoEntityMoveParameter(e){this._geoEntityMoveParameters.has(e)&&(this._geoEntityMoveParameters.delete(e),_0x101f8e.getInstance()._calcute(),_0x101f8e.getInstance()._removeGeoEntityMoveParameter(this,e),this._isModified=!0,this._save())}setDelayFinishTime(e){this._delayFinishTime=e,this._isModified=!0,this._save()}getDelayFinishTime(){return this._delayFinishTime}getGeoEntityRotationParameterTimes(){let e=[];return this._geoEntityRotationParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityRotationParameter(e){let t;return this._geoEntityRotationParameters.has(e)&&(t=this._geoEntityRotationParameters.get(e)),t}setGeoEntityRotationParameter(e,t){this._geoEntityRotationParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityRotationParameter(e){this._geoEntityRotationParameters.has(e)&&(this._geoEntityRotationParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityScaleParameterTimes(){let e=[];return this._geoEntityScaleParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityScaleParameter(e){let t;return this._geoEntityScaleParameters.has(e)&&(t=this._geoEntityScaleParameters.get(e)),t}setGeoEntityScaleParameter(e,t){this._geoEntityScaleParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityScaleParameter(e){this._geoEntityScaleParameters.has(e)&&(this._geoEntityScaleParameters.delete(e),this._isModified=!0,this._save())}}const _0x47f773=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4beb46=_0x47f773(void 0,(function(){return _0x4beb46.toString().search("(((.+)+)+)+$").toString().constructor(_0x4beb46).search("(((.+)+)+)+$")}));_0x4beb46();class _0x3e4e1c{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityMoveParameter=void 0,this._speed=0,this._curvePath3D=[],this._startTime=void 0,this._isFinished=!1,this._position=void 0,this._rotation=void 0,this._geoEntityMoveParameter=void 0,this._allDistance=void 0,this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityMoveParameterUUID=void 0}_init(e,t,i,n){this._geoEntityMoveParameter=e,this._startTime=t,this._position=i,this._rotation=n;let r=e.getSpeed()/1e3;if(r>0){let t=[],i=e.getPathPoint3D(),n=e.getScalePoint2D(),o=e.getOriginPosition(),a=e.getTargetPosition();if(WebGLPlot$f.defined(i))WebGLPlot$f.defined(o)&&t.push(o),i.forEach((e=>{t.push(e)})),WebGLPlot$f.defined(a)&&t.push(a);else if(WebGLPlot$f.defined(n)){if(WebGLPlot$f.defined(o)&&WebGLPlot$f.defined(a)){let e=[o,a];t=[o,a];let i=_0x2887b9.getAllDistance(e);n.forEach((n=>{let r=i*n.x,o=_0x2887b9.getPositionByDistance(e,r);t.splice(t.length-1,0,new WebGLPlot$f.Cartesian3(o.point.x,o.point.y,o.point.z+n.y))}))}}else WebGLPlot$f.defined(o)&&t.push(o),WebGLPlot$f.defined(a)&&t.push(a);if(t=this._convertToCartesian3(t),t.length>=2&&_0x2887b9.getAllDistance(t)>.001){if(e.isCurvePath()){let e=this._createCurve3D(t);this._curvePath3D=e.curvePath3D}else this._curvePath3D=t;this._speed=r}}this._allDistance=_0x2887b9.getAllDistance(this._curvePath3D),this._isFinished=!1}_update(e,t,i){let n={},r=e/1e3,o=this._getCurrentGeoEntityMoveParameter(r);if(WebGLPlot$f.defined(o.geoEntityMoveParameter)&&WebGLPlot$f.defined(o.geoEntityMoveParameterActionTime)){this._currentGeoEntityMoveParameterUUID!=o.geoEntityMoveParameter.getUUID()&&(this._currentGeoEntityMoveParameterUUID=o.geoEntityMoveParameter.getUUID(),this._init(o.geoEntityMoveParameter,o.geoEntityMoveParameterActionTime,t,i));let r=this._caclulate(e);WebGLPlot$f.defined(r)&&(n.position=r.position,n.isCurrent=!0,n.finishTime=o.geoEntityMoveParameterActionTime+1e3*this._geoEntityMoveParameter.getTime(),n.isFinished=this._isFinished,n.rotation=r.rotation)}else{let e,r,o;if(this._groupIndex>0)for(let t=this._groupIndex-1;t>=0;t--){let i=this._deductionScriptGroups[t]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$f.defined(i)){let n=i.getGeoEntityMoveParameterTimes();if(n.length>0){e=n[n.length-1],r=i.getGeoEntityMoveParameter(e),o=t;break}}}if(WebGLPlot$f.defined(r)){let t=new _0x3e4e1c;t._init(r);let i,a=t._getFinalPosition(),s=t._curvePath3D;if(s.length>1){let e=_0x2887b9.getPitch(s[s.length-2],s[s.length-1]),t=_0x2887b9.getHeading(s[s.length-2],s[s.length-1]);e&&t&&(i=new _0x11ff81(0),i.x=WebGLPlot$f.CesiumMath.toDegrees(e),i.z=WebGLPlot$f.CesiumMath.toDegrees(t))}n.position=a,n.isCurrent=!1,n.rotation=i,n.groupIndex=o,n.finishTime=1e3*(e+r.getTime())}else n.position=t,n.isCurrent=!1,n.rotation=i}return n}_getCurrentGeoEntityMoveParameter(e){let t,i,n=this._deductionScript.getGeoEntityMoveParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityMoveParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityMoveParameter:t,geoEntityMoveParameterActionTime:i}}_createCurve3D(e){let t=_0x2887b9.getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$f.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new Cesium.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_convertToCartesian3(e){let t=[];return e.forEach((e=>{t.push(_0x2887b9.degreesToCartesian3(e))})),t}_getFinalPosition(){let e=this._geoEntityMoveParameter.getTargetPosition();if(WebGLPlot$f.defined(e))return e;let t=this._geoEntityMoveParameter.getPathPoint3D();return t.length>0&&(e=t[t.length-1]),WebGLPlot$f.defined(e)||(e=this._geoEntityMoveParameter.getOriginPosition(),WebGLPlot$f.defined(e))?e:void 0}_caclulate(e){if(!this._isFinished)if(this._geoEntityMoveParameter.isTimeMode()&&0===this._geoEntityMoveParameter.getTime())this._isFinished=!0,this._position=this._getFinalPosition();else{let t=(e-this._startTime)*this._speed;if(t>this._allDistance)this._isFinished=!0,this._currentGeoEntityMoveParameterUUID=void 0;else{let e=_0x2887b9.getPositionByDistance(this._curvePath3D,t),i=e.index;if(i<=this._curvePath3D.length&&i>=0){if(this._position=_0x2887b9.cartesian3ToDegrees(e.point),i!==this._curvePath3D.length-1){let t=this._curvePath3D[i+1];if(e.point.x!==t.x||e.point.y!==t.y||e.point.z!==t.z){let i=_0x2887b9.getPitch(e.point,t),n=_0x2887b9.getHeading(e.point,t);if(i&&n){let e=new _0x11ff81(0);e.x=WebGLPlot$f.CesiumMath.toDegrees(i),e.z=WebGLPlot$f.CesiumMath.toDegrees(n),this._rotation=e}}}}else this._isFinished=!0,this._currentGeoEntityMoveParameterUUID=void 0}if(this._isFinished){let e=this._getFinalPosition();if(WebGLPlot$f.defined(e)&&(this._position=e),!WebGLPlot$f.defined(this._curvePath3D)){let e=this._geoEntityMoveParameter.getPathPoint3D();if(WebGLPlot$f.defined(e)&&e.length>0&&e.length>1){let t=_0x2887b9.getPitch(e[e.length-2],e[e.length-1]),i=_0x2887b9.getHeading(e[e.length-2],e[e.length-1]);if(t&&i){let e=new _0x11ff81(0);e.x=WebGLPlot$f.CesiumMath.toDegrees(t),e.z=WebGLPlot$f.CesiumMath.toDegrees(i),this._rotation=e}}}}}return{position:this._position,rotation:this._rotation}}}const _0x8c6327=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xbdf4ac=_0x8c6327(void 0,(function(){return _0xbdf4ac.toString().search("(((.+)+)+)+$").toString().constructor(_0xbdf4ac).search("(((.+)+)+)+$")}));_0xbdf4ac();class _0x75e70a{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityRotationParameter=void 0,this._speed=void 0,this._startTime=void 0,this._isBack=!1,this._isFinished=!1,this._rotate=void 0,this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityRotationParameterUUID=void 0,this._startRotation=void 0,this._endRotation=void 0}_init(e,t){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t))return void(this._isFinished=!0);this._geoEntityRotationParameter=e,this._startTime=t,this._rotate=new _0x11ff81(0);let i=1e3*e.getTime();i<0?this._isFinished=!0:(this._startRotation=e.getStartRotation(),this._endRotation=e.getEndRotation(),(!WebGLPlot$f.defined(this._startRotation)||!WebGLPlot$f.defined(this._endRotation)||this._startRotation.x===this._endRotation.x&&this._startRotation.y===this._endRotation.y&&this._startRotation.z===this._endRotation.z)&&(this._isFinished=!0),e.isGradient()&&(this._speed=new _0x11ff81((this._endRotation.x-this._startRotation.x)/i,(this._endRotation.y-this._startRotation.y)/i,(this._endRotation.z-this._startRotation.z)/i),e.getCyclicType()==_0x12cd7b.BOTHWAY&&(this._speed=new _0x11ff81(2*this._speed.x,2*this._speed.y,2*this._speed.z))),this._isFinished=!1)}_update(e){let t=e/1e3,i=this._getCurrentGeoEntityRotationParameter(t);if(WebGLPlot$f.defined(i.geoEntityRotationParameter)&&WebGLPlot$f.defined(i.geoEntityRotationParameterActionTime))return this._currentGeoEntityRotationParameterUUID!=i.geoEntityRotationParameter.getUUID()&&(this._currentGeoEntityRotationParameterUUID=i.geoEntityRotationParameter.getUUID(),this._init(i.geoEntityRotationParameter,i.geoEntityRotationParameterActionTime)),{rotation:this._caclulate(e),isCurrent:!0,isFinished:this._isFinished};{let e,t,i;if(this._groupIndex>0)for(let n=this._groupIndex-1;n>=0;n--){let r=this._deductionScriptGroups[n]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$f.defined(r)){let o=r.getGeoEntityRotationParameterTimes();if(o.length>0){e=o[o.length-1],t=r.getGeoEntityRotationParameter(e),i=n;break}}}if(WebGLPlot$f.defined(t)){let n=new _0x75e70a;return n._init(t),{rotation:n._caclulate(1e3*t.getTotalTime()+1),isCurrent:!1,groupIndex:i,finishTime:1e3*(e+t.getTotalTime())}}return{rotation:new _0x11ff81(0),isCurrent:!1}}}_getCurrentGeoEntityRotationParameter(e){let t,i,n=this._deductionScript.getGeoEntityRotationParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityRotationParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityRotationParameter:t,geoEntityRotationParameterActionTime:i}}_caclulate(e){if(!WebGLPlot$f.defined(this._geoEntityRotationParameter))return;if(this._isFinished)return this._rotate;let t=this._geoEntityRotationParameter.getCyclicType(),i=1e3*this._geoEntityRotationParameter.getTime(),n=this._geoEntityRotationParameter.isGradient(),r=e-this._startTime;if(t==_0x12cd7b.NO)if(r>=i)this._isFinished=!0,this._rotate=this._endRotation.clone();else if(n){let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x11ff81(e,t,i)}else this._rotate=this._startRotation.clone();else{let e=1e3*this._geoEntityRotationParameter.getTotalTime();if(r>=e){this._isFinished=!0;let r=e%i;if(0===r)n?t==_0x12cd7b.ONEWAY?this._rotate=this._endRotation.clone():t==_0x12cd7b.BOTHWAY&&(this._rotate=this._startRotation.clone()):this._rotate=this._endRotation.clone();else if(n){if(t==_0x12cd7b.ONEWAY){let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x11ff81(e,t,i)}else if(t==_0x12cd7b.BOTHWAY){let e=i/2;if(r>e){let t=this._endRotation.x-(r-e)*this._speed.x,i=this._endRotation.y-(r-e)*this._speed.y,n=this._endRotation.z-(r-e)*this._speed.z;this._rotate=new _0x11ff81(t,i,n)}else{let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x11ff81(e,t,i)}}}else{let e=i/2;this._rotate=r>e?this._endRotation.clone():this._startRotation.clone()}}else{let e=r%i;if(n){if(t==_0x12cd7b.ONEWAY){let t=this._startRotation.x+e*this._speed.x,i=this._startRotation.y+e*this._speed.y,n=this._startRotation.z+e*this._speed.z;this._rotate=new _0x11ff81(t,i,n)}else if(t==_0x12cd7b.BOTHWAY){let t=i/2;if(e>t){let i=this._endRotation.x-(e-t)*this._speed.x,n=this._endRotation.y-(e-t)*this._speed.y,r=this._endRotation.z-(e-t)*this._speed.z;this._rotate=new _0x11ff81(i,n,r)}else{let t=this._startRotation.x+e*this._speed.x,i=this._startRotation.y+e*this._speed.y,n=this._startRotation.z+e*this._speed.z;this._rotate=new _0x11ff81(t,i,n)}}}else{let t=i/2;this._rotate=e>t?this._endRotation.clone():this._startRotation.clone()}}}return this._rotate}}const _0x6673dd=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x41812b=_0x6673dd(void 0,(function(){return _0x41812b.toString().search("(((.+)+)+)+$").toString().constructor(_0x41812b).search("(((.+)+)+)+$")}));_0x41812b();class _0x3f6390{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityScaleParameter=void 0,this._speed=void 0,this._startTime=void 0,this._cyclicStartTime=void 0,this._isBack=!1,this._isFinished=!1,this._scale=void 0,this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityScaleParameterUUID=void 0,this._startScale=void 0,this._endScale=void 0}_init(e,t,i){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t))return void(this._isFinished=!0);this._geoEntityScaleParameter=e,this._startTime=t,this._scale=i;let n=1e3*e.getTime();n<0?this._isFinished=!0:(this._startScale=e.getStartScale(),WebGLPlot$f.defined(this._startScale)||(this._startScale=i),this._endScale=e.getEndScale(),WebGLPlot$f.defined(this._endScale)||(this._endScale=i),this._startScale!==this._endScale?(e.isGradient()&&(this._speed=(this._endScale-this._startScale)/n,this._geoEntityScaleParameter.getCyclicType()==_0x12cd7b.BOTHWAY&&(this._speed=2*this._speed)),this._isFinished=!1):this._isFinished=!0)}_update(e){let t=e/1e3,i=this._getCurrentGeoEntityScaleParameter(t);if(WebGLPlot$f.defined(i.geoEntityScaleParameter)&&WebGLPlot$f.defined(i.geoEntityScaleParameterActionTime))return this._currentGeoEntityScaleParameterUUID!=i.geoEntityScaleParameter.getUUID()&&(this._currentGeoEntityScaleParameterUUID=i.geoEntityScaleParameter.getUUID(),this._init(i.geoEntityScaleParameter,i.geoEntityScaleParameterActionTime)),this._caclulate(e);{let e,t;if(this._groupIndex>0)for(let i=this._groupIndex-1;i>=0;i--){let n=this._deductionScriptGroups[i]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$f.defined(n)){let i=n.getGeoEntityScaleParameterTimes();if(i.length>0){e=i[i.length-1],t=n.getGeoEntityScaleParameter(e);break}}}if(WebGLPlot$f.defined(t)){let e=new _0x3f6390;return e._init(t),e._caclulate(1e3*t.getTotalTime()+1)}return this._scale}}_getCurrentGeoEntityScaleParameter(e){let t,i,n=this._deductionScript.getGeoEntityScaleParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityScaleParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityScaleParameter:t,geoEntityScaleParameterActionTime:i}}_caclulate(e){if(!WebGLPlot$f.defined(this._geoEntityScaleParameter))return;if(this._isFinished)return this._scale;let t=this._geoEntityScaleParameter.getCyclicType(),i=1e3*this._geoEntityScaleParameter.getTime(),n=this._geoEntityScaleParameter.getStartScale();WebGLPlot$f.defined(n)||(n=this._initScale);let r=this._geoEntityScaleParameter.getEndScale();WebGLPlot$f.defined(n)||(r=this._initScale);let o=this._geoEntityScaleParameter.isGradient(),a=e-this._startTime;if(t==_0x12cd7b.NO)a>=i?(this._isFinished=!0,this._scale=r):this._scale=o?n+a*this._speed:this._initScale;else{let e=1e3*this._geoEntityScaleParameter.getTotalTime();if(a>=e){this._isFinished=!0;let a=e%i;if(0===a)o?t==_0x12cd7b.ONEWAY?this._scale=r:t==_0x12cd7b.BOTHWAY&&(this._scale=n):this._scale=r;else if(o){if(t==_0x12cd7b.ONEWAY)this._scale=n+a*this._speed;else if(t==_0x12cd7b.BOTHWAY){let e=i/2;this._scale=a>e?r-(a-e)*this._speed:n+a*this._speed}}else{let e=i/2;this._scale=a>e?r:n}}else{let e=a%i;if(o){if(t==_0x12cd7b.ONEWAY)this._scale=n+e*this._speed;else if(t==_0x12cd7b.BOTHWAY){let t=i/2;this._scale=e>t?r-(e-t)*this._speed:n+e*this._speed}}else{let t=i/2;this._scale=e>t?r:n}}}return this._scale}}const _0x392260=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x34cf6c=_0x392260(void 0,(function(){return _0x34cf6c.toString().search("(((.+)+)+)+$").toString().constructor(_0x34cf6c).search("(((.+)+)+)+$")}));_0x34cf6c();class _0x397ab1{constructor(e,t,i,n,r){this._geoEntity=e,this._moveGeoEntity=t,this._deductionScript=i,this._groupIndex=n,this._geoEntityStartVisible=r,this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityBasicParameterUUID=void 0}_setGeoEntityBasicParamerter(e){WebGLPlot$f.defined(this._moveGeoEntity)&&this._moveGeoEntity.setGeoEntityParameter(e._getGeoEntityParameter())}_caclulate(e){if(!WebGLPlot$f.defined(this._geoEntity)||!WebGLPlot$f.defined(this._deductionScript))return;let t,i=this._deductionScript.getGeoEntityBasicParameterTimes();for(let n=0;n<i.length;n++){let r=i[n],o=this._deductionScript.getGeoEntityBasicParameter(r);if(e>=r){if(n===i.length-1){t=o;break}if(e<i[n+1]){t=o;break}}}if(!WebGLPlot$f.defined(t)&&this._groupIndex>0)for(let e=this._groupIndex-1;e>=0;e--){let i=this._deductionScriptGroups[e]._getDeductionScriptByGeoEntityUUID(this._geoEntity.getUUID());if(WebGLPlot$f.defined(i)){let e=i.getGeoEntityBasicParameterTimes();if(e.length>0){t=i.getGeoEntityBasicParameter(e[e.length-1]);break}}}if(WebGLPlot$f.defined(t))return{geoEntityBasicParameter:t,geoEntityBasicParameterUUID:t.getUUID()};{let e=this._geoEntity.getGeoEntityParameter(),t=new _0x487d97;return t._update(e),t.setVisible(this._geoEntityStartVisible),{geoEntityBasicParameter:new _0x78fecc(t),geoEntityBasicParameterUUID:"initGeoEntityBasicParameter"}}}_update(e){let t=e/1e3,i=this._caclulate(t);WebGLPlot$f.defined(i)&&WebGLPlot$f.defined(i.geoEntityBasicParameter)&&this._currentGeoEntityBasicParameterUUID!==i.geoEntityBasicParameterUUID&&(this._setGeoEntityBasicParamerter(i.geoEntityBasicParameter),this._currentGeoEntityBasicParameterUUID=i.geoEntityBasicParameterUUID)}}const _0xc66a29=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5afed2=_0xc66a29(void 0,(function(){return _0x5afed2.toString().search("(((.+)+)+)+$").toString().constructor(_0x5afed2).search("(((.+)+)+)+$")}));_0x5afed2();class _0x5d6f1b{constructor(e,t,i,n,r){this._geoEntity=e,this._moveGeoEntity=t,this._deductionScript=i,this._groupIndex=n,this._geoEntityStartEffectVisible=r,this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityEffectParameterUUID=void 0}_setGeoEntityEffectParameter(e){let t=e.getGeoEntityEffects(),i=[];t.forEach((e=>{let t=e.clone();if(t.setGeoEntity(this._moveGeoEntity),t.getType()==_0x3b1c90.COMMUNICATIONLINK){let e=t.getStartUUID(),i=t.getEndUUID();if(this._geoEntity.getUUID()==e){e=this._moveGeoEntity.getUUID();let t=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(i);WebGLPlot$f.defined(t)&&(i=t.getUUID())}else if(this._geoEntity.getUUID()==i){i=this._moveGeoEntity.getUUID();let t=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(e);WebGLPlot$f.defined(t)&&(e=t.getUUID())}t.setStartUUID(e),t.setEndUUID(i)}i.push(t)})),this._moveGeoEntity.updateGeoEntityEffects(i)}_caclulate(e){if(!WebGLPlot$f.defined(this._geoEntity)||!WebGLPlot$f.defined(this._deductionScript))return;let t,i=this._deductionScript.getGeoEntityEffectParameterTimes();for(let n=0;n<i.length;n++){let r=i[n],o=this._deductionScript.getGeoEntityEffectParameter(r);if(e>=r){if(n===i.length-1){t=o;break}if(e<i[n+1]){t=o;break}}}if(!WebGLPlot$f.defined(t)&&this._groupIndex>0)for(let e=this._groupIndex-1;e>=0;e--){let i=this._deductionScriptGroups[e]._getDeductionScriptByGeoEntityUUID(this._geoEntity.getUUID());if(WebGLPlot$f.defined(i)){let e=i.getGeoEntityEffectParameterTimes();if(e.length>0){t=i.getGeoEntityEffectParameter(e[e.length-1]);break}}}if(WebGLPlot$f.defined(t))return{geoEntityEffectParameter:t,geoEntityEffectParameterUUID:t.getUUID()};{let e=this._geoEntity.getGeoEntityEffects(),t=[];return e.forEach((e=>{let i=e.clone(),n=this._geoEntityStartEffectVisible.get(e.getUUID());i.setVisible(n),t.push(i)})),{geoEntityEffectParameter:new _0x25bff7(t),geoEntityEffectParameterUUID:"initGeoEntityEffectParameter"}}}_update(e){let t=e/1e3,i=this._caclulate(t);WebGLPlot$f.defined(i)&&WebGLPlot$f.defined(i.geoEntityEffectParameter)&&this._currentGeoEntityEffectParameterUUID!==i.geoEntityEffectParameterUUID&&(this._setGeoEntityEffectParameter(i.geoEntityEffectParameter),this._currentGeoEntityEffectParameterUUID=i.geoEntityEffectParameterUUID)}}const _0x22f009=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x33848e=_0x22f009(void 0,(function(){return _0x33848e.toString().search("(((.+)+)+)+$").toString().constructor(_0x33848e).search("(((.+)+)+)+$")}));_0x33848e();class _0x8bca35{constructor(e,t,i){this._geoEntityMoveLayer=e,this._deductionScript=t,this._groupIndex=i,this._geoEntity=void 0,this._moveGeoEntity=void 0,this._position=void 0,this._scale=void 0,this._rotation=void 0,this._currentExtendEffectParameterUUID=void 0,this._deductionScriptActionBasicParm=void 0,this._deductionScriptActionEffect=void 0,this._deductionScriptActionMove=void 0,this._deductionScriptActionRotation=void 0,this._deductionScriptActionScale=void 0,this._geoEntityStartEffectVisible=void 0,this._geoEntityStartVisible=void 0,this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups()}_getMoveGeoEntity(){return this._moveGeoEntity}_getGeoEntityUUID(){return this._deductionScript.getGeoEntityUUID()}_setGeoEntityParamerter(e){WebGLPlot$f.defined(this._moveGeoEntity)&&this._moveGeoEntity.setGeoEntityParameter(e)}_setExtendEffectParameter(e){e.getGeoEntityEffects().forEach((e=>{e.getType()===_0x3b1c90.EXTENDACTION&&e._executeExtend()}))}_updateDeductionScript(e,t){this._deductionScript=e,this._groupIndex=t,this._currentGeoEntityEffectParameterUUID=void 0,this._deductionScriptActionBasicParm=new _0x397ab1(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionEffect=new _0x5d6f1b(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionMove=new _0x3e4e1c(this._deductionScript,this._groupIndex),this._deductionScriptActionRotation=new _0x75e70a(this._deductionScript,this._groupIndex),this._deductionScriptActionScale=new _0x3f6390(this._deductionScript,this._groupIndex)}_start(){let e=_0x41dd10.getInstance().getGeoEntityManager();if(!WebGLPlot$f.defined(e)||(this._geoEntity=e.getGeoEntityByUUID(this._deductionScript.getGeoEntityUUID()),!WebGLPlot$f.defined(this._geoEntity)))return;let t=this._geoEntity._getGeoGraphicObject();if(!WebGLPlot$f.defined(t))return;let i=t.clone();this._geoEntityStartEffectVisible=new Map,this._geoEntity.getGeoEntityEffects().forEach((e=>{e.getType()!=_0x3b1c90.COMMUNICATIONLINK&&(this._geoEntityStartEffectVisible.set(e.getUUID(),e.isVisible()),e.setVisible(!1))}));let n=[];if(t.getGeoEntity().getGeoEntityEffects().forEach((e=>{e.getType()==_0x3b1c90.COMMUNICATIONLINK&&n.push(e)})),n.forEach((e=>{let n=t.getGeoEntity().getUUID(),r=i.getGeoEntity().getUUID(),o=!1,a=e.getStartUUID();n==a&&(o=!0,a=e.getEndUUID());let s=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(a);if(WebGLPlot$f.defined(s))o?e.setStartUUID(r):e.setEndUUID(r),i.getGeoEntity()._connectLinkToGeoEntity(e);else{let t=e.clone();o?t.setStartUUID(r):t.setEndUUID(r),i.getGeoEntity().addGeoEntityEffect(t),this._geoEntityStartEffectVisible.set(e.getUUID(),e.isVisible()),e.isVisible()&&e.setVisible(!1)}})),this._geoEntityMoveLayer.addFeature(i),this._geoEntityStartVisible=this._geoEntity.getGeoEntityParameter().isVisible(),this._geoEntityStartVisible){let e=new _0x487d97;e.setVisible(!1),this._geoEntity.setGeoEntityParameter(e)}this._moveGeoEntity=i.getGeoEntity(),this._moveGeoEntity._isMoveGeoEntity=!0,this._position=this._geoEntity.getGeoEntityParameter().getPosition(),this._rotation=this._geoEntity.getGeoEntityParameter().getModelRotate(),this._scale=this._geoEntity.getGeoEntityParameter().getModelScale(),this._deductionScriptActionBasicParm=new _0x397ab1(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionEffect=new _0x5d6f1b(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartEffectVisible),this._deductionScriptActionMove=new _0x3e4e1c(this._deductionScript,this._groupIndex),this._deductionScriptActionRotation=new _0x75e70a(this._deductionScript,this._groupIndex),this._deductionScriptActionScale=new _0x3f6390(this._deductionScript,this._groupIndex)}_reset(e){if(!WebGLPlot$f.defined(this._geoEntity)||!WebGLPlot$f.defined(this._moveGeoEntity))return;let t=new _0x487d97;if(e){t.setVisible(this._geoEntityStartVisible),this._geoEntity.getGeoEntityEffects().forEach((e=>{let t=this._geoEntityStartEffectVisible.get(e.getUUID());if(e.getType()==_0x3b1c90.COMMUNICATIONLINK){let i=e.getStartUUID();i==this._geoEntity.getUUID()&&(i=e.getEndUUID());let n=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(i);WebGLPlot$f.defined(n)||e.setVisible(t)}else e.setVisible(t)}));let e=this._moveGeoEntity.getGeoEntityEffects(),i=[],n=[];e.forEach((e=>{if(e.getType()==_0x3b1c90.COMMUNICATIONLINK){let t=!1,r=e.getStartUUID();r==this._moveGeoEntity.getUUID()&&(t=!0,r=e.getEndUUID());let o=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(r);WebGLPlot$f.defined(o)?(t?e.setStartUUID(this._geoEntity.getUUID()):e.setEndUUID(this._geoEntity.getUUID()),n.push(e)):i.push(e)}})),i.forEach((e=>{this._moveGeoEntity.removeGeoEntityEffect(e.getUUID())})),n.forEach((e=>{this._moveGeoEntity._disConnectLinkToGeoEntity(e),this._geoEntity._connectLinkToGeoEntity(e)}))}else{let e=this._moveGeoEntity.getGeoEntityParameter();WebGLPlot$f.defined(e)&&t._update(e);let i=[],n=[];this._moveGeoEntity.getGeoEntityEffects().forEach((e=>{e.getType()==_0x3b1c90.COMMUNICATIONLINK?i.push(e):n.push(e.clone())})),this._geoEntity.updateGeoEntityEffects(n),i.forEach((e=>{this._moveGeoEntity._disConnectLinkToGeoEntity(e),this._geoEntity._connectLinkToGeoEntity(e)}))}this._geoEntity.setGeoEntityParameter(t),this._geoEntityMoveLayer.removeGeoGraphicObject(this._moveGeoEntity._getGeoGraphicObject()),this._moveGeoEntity=void 0}_execute(e){if(WebGLPlot$f.defined(this._geoEntity)){this._deductionScriptActionBasicParm._update(e),this._deductionScriptActionEffect._update(e);let t=this._deductionScriptActionMove._update(e,this._position,this._rotation),i=this._deductionScriptActionRotation._update(e),n=this._deductionScriptActionScale._update(e);if(WebGLPlot$f.defined(t)||WebGLPlot$f.defined(i)||WebGLPlot$f.defined(n)){let e=new _0x487d97;WebGLPlot$f.defined(t)&&WebGLPlot$f.defined(t.position)&&e.setPosition(t.position);let r=new _0x11ff81(0);if(t.isCurrent?r=i.isCurrent?t.isFinished?i.isFinished&&t.currentFinishTime>i.currentFinishTime?new _0x11ff81(t.rotation.x,i.rotation.y,t.rotation.z):new _0x11ff81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):i.isFinished?new _0x11ff81(t.rotation.x,i.rotation.y,t.rotation.z):new _0x11ff81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):new _0x11ff81(t.rotation.x,i.rotation.y,t.rotation.z):i.isCurrent?r=new _0x11ff81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):WebGLPlot$f.defined(t.groupIndex)?WebGLPlot$f.defined(i.groupIndex)?t.groupIndex===i.groupIndex?r=t.finishTime>i.finishTime?new _0x11ff81(t.rotation.x,i.rotation.y,t.rotation.z):new _0x11ff81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):t.groupIndex<i.groupIndex?r=new _0x11ff81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):t.groupIndex>i.groupIndex&&(r=new _0x11ff81(t.rotation.x,i.rotation.y,t.rotation.z)):r=t.rotation:r=WebGLPlot$f.defined(i.groupIndex)?new _0x11ff81(t.rotation.x+i.rotation.x,t.rotation.y+i.rotation.y,t.rotation.z+i.rotation.z):t.rotation,e.setModelRotate(r),e.setVectorRotate(r),WebGLPlot$f.defined(n)){e.setModelScale(n),e.setVectorRotate(n);let t=this._moveGeoEntity._getGeoGraphicObject()._symbolSizeInLib;if(-1!=t.x&&-1!=t.y){let i=this._moveGeoEntity.getGeoEntityParameter().getDotPlotStyle();0===n?i.setGridSymbolSize(new WebGLPlot$f.Cartesian2(.1,.1)):i.setGridSymbolSize(new WebGLPlot$f.Cartesian2(t.x*n,t.y*n)),e.setDotPlotStyle(i)}let i=new WebGLPlot$f.Cartesian2(64,64);e.setPictureSymbolSize(new WebGLPlot$f.Cartesian2(i.x*n,i.y*n))}this._setGeoEntityParamerter(e)}}else{let t,i=e/1e3,n=this._deductionScript.getGeoEntityEffectParameterTimes();for(let e=0;e<n.length;e++){let r=n[e],o=this._deductionScript.getGeoEntityEffectParameter(r);if(i>=r){if(e===n.length-1){t=o;break}if(i<n[e+1]){t=o;break}}}WebGLPlot$f.defined(t)&&this._currentExtendEffectParameterUUID!==t.getUUID()&&(this._setExtendEffectParameter(t),this._currentExtendEffectParameterUUID=t.getUUID())}}}var _0x40c323=(_0x426332=!0,function(e,t){var i=_0x426332?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x426332=!1,i}),_0x79cfbf=_0x40c323(void 0,(function(){return _0x79cfbf.toString().search("(((.+)+)+)+$").toString().constructor(_0x79cfbf).search("(((.+)+)+)+$")})),_0x426332;_0x79cfbf();var _0x3a4b02={Ready:0,Executing:1,Stop:2},_0x100aa6=Object.freeze(_0x3a4b02);const _0x432763=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1c63ed=_0x432763(void 0,(function(){return _0x1c63ed.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c63ed).search("(((.+)+)+)+$")}));_0x1c63ed();class _0x130d03{constructor(e,t,i){this._geoEntityMoveLayer=e,this._deductionScriptGroup=t,this._deductionScriptExcuteManager=i,this._deductionScriptExcutes=[],this._executeState=_0x100aa6.Ready,this._totalTime=this._calcTotalTime()}_calcTotalTime(){let e=this._deductionScriptGroup.getDeductionScripts(),t=0;e.forEach((e=>{let i=e._getTotalTime();t<i&&(t=i)}));let i=this._deductionScriptGroup.getDeductionScriptExtend()._getDeductionScript()._getTotalTime();return t<i&&(t=i),t}_getTotalTime(){return this._totalTime}_getExecuteState(){return this._executeState}_getDeductionScriptExcutes(){return this._deductionScriptExcutes}_execute(e,t){this._executeState===_0x100aa6.Executing&&this._deductionScriptExcutes.forEach((i=>{i._execute(e,t)}))}_start(e){let t=this._deductionScriptGroup.getDeductionScripts();for(let i=0;i<t.length;i++){let n=t[i],r=this._deductionScriptExcuteManager._getDeductionScriptExecute(n.getGeoEntityUUID());WebGLPlot$f.defined(r)?r._updateDeductionScript(n,e):(r=new _0x8bca35(this._geoEntityMoveLayer,n,e),r._start()),this._deductionScriptExcutes.push(r)}let i=this._deductionScriptGroup.getDeductionScriptExtend()._getDeductionScript(),n=new _0x8bca35(this._geoEntityMoveLayer,i,e);n._start(),this._deductionScriptExcutes.push(n),this._executeState=_0x100aa6.Executing}_reset(e){this._deductionScriptExcutes.forEach((t=>{this._executeState!==_0x100aa6.Ready&&t._reset(e)})),this._executeState=_0x100aa6.Ready}}var _0x23b738=(_0x4cc278=!0,function(e,t){var i=_0x4cc278?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4cc278=!1,i}),_0x3c4f54=_0x23b738(void 0,(function(){return _0x3c4f54.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c4f54).search("(((.+)+)+)+$")})),_0x4cc278;_0x3c4f54();var _0x5c2bbc={NoReset:0,ManualReset:1,AutoReset:2},_0x1d0519=Object.freeze(_0x5c2bbc);const _0x5c31f9=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x51d446=_0x5c31f9(void 0,(function(){return _0x51d446.toString().search("(((.+)+)+)+$").toString().constructor(_0x51d446).search("(((.+)+)+)+$")}));_0x51d446();class _0x5ba8bb{constructor(e){this._geoEntityMoveLayer=e,this._UUID=WebGLPlot$f.createGuid(),this._resetType=_0x1d0519.AutoReset,this._executeState=_0x100aa6.Ready,this._executeCallBackFunction=void 0,this._groupIndex=-1,this._deductionScriptExecuteGroups=[],this._currentDeductionScriptExecuteGroup=void 0,this._totalPassTime=0,this._lastTime=void 0}_getUUID(){return this._UUID}_getDeductionScriptExecute(e){for(let t=0;t<=this._groupIndex;t++){let i=this._deductionScriptExecuteGroups[t]._getDeductionScriptExcutes();if(WebGLPlot$f.defined(i))for(let t=0;t<i.length;t++){const n=i[t];if(n._getGeoEntityUUID()===e)return n}}}_execute(e){if(this._executeState===_0x100aa6.Executing){let t=e-this._lastTime;if(this._totalPassTime+=t,this._totalPassTime>0){let e=-1,t=0;for(let i=0;i<this._deductionScriptExecuteGroups.length;i++){let n=t+this._deductionScriptExecuteGroups[i]._getTotalTime();if(this._totalPassTime>=t&&this._totalPassTime<n+30){e=i;break}t=n}-1===e?this._stop():e!=this._groupIndex?(this._groupIndex=e,this._currentDeductionScriptExecuteGroup=this._deductionScriptExecuteGroups[this._groupIndex],this._currentDeductionScriptExecuteGroup._start(e)):this._currentDeductionScriptExecuteGroup._execute(this._totalPassTime-t,this._deductionScriptGroups[e-1]),WebGLPlot$f.defined(this._executeCallBackFunction)&&this._executeCallBackFunction({allPassTime:this._totalPassTime,groupIndex:this._groupIndex,groupPassTime:this._totalPassTime-t})}}this._lastTime=e}_start(e){this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._lastTime=e,this._deductionScriptGroups.forEach((e=>{let t=new _0x130d03(this._geoEntityMoveLayer,e,this);this._deductionScriptExecuteGroups.push(t)})),this._executeState=_0x100aa6.Executing;let t=0;return this._deductionScriptExecuteGroups.forEach((e=>{t+=e._getTotalTime()})),t}_stop(){this._executeState===_0x100aa6.Executing&&(this._resetType===_0x1d0519.AutoReset||this._resetType===_0x1d0519.NoReset?this._reset(this._UUID):this._executeState=_0x100aa6.Stop)}_reset(){this._executeState!==_0x100aa6.Ready&&(this._deductionScriptExecuteGroups.forEach((e=>{this._resetType===_0x1d0519.NoReset?e._reset(!1):e._reset(!0)})),this._executeState=_0x100aa6.Ready,this._groupIndex=-1,this._deductionScriptExecuteGroups=[],this._currentDeductionScriptExecuteGroup=void 0,this._totalPassTime=0,this._lastTime=void 0)}_setExecuteCallBackFunc(e){this._executeCallBackFunction=e}_setResetType(e){this._resetType=e}}var _0x417d21=(_0x322589=!0,function(e,t){var i=_0x322589?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x322589=!1,i}),_0x415a04=_0x417d21(void 0,(function(){return _0x415a04.toString().search("(((.+)+)+)+$").toString().constructor(_0x415a04).search("(((.+)+)+)+$")})),_0x322589;_0x415a04();class _0x14792f{constructor(){this._deductionScript=new _0x39c042("Extend"),this._isModified=!1}_getDeductionScript(){return this._deductionScript}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){_0x41dd10.getInstance()._saveDeductionScript(!1)}_toJson(){return this._deductionScript._toJson()}_fromJson(e){this._deductionScript._fromJson(e)}getUUID(){return this._deductionScript.getUUID()}getGeoEntityEffectExtendParameterTimes(){return this._deductionScript.getGeoEntityEffectParameterTimes()}getGeoEntityEffectExtendParameter(e){this._deductionScript.getGeoEntityEffectParameter(e)}setGeoEntityEffectExtendParameter(e,t){this._deductionScript.setGeoEntityEffectParameter(e,t),this._isModified=!0,this._save()}removeGeoEntityEffectExtendParameter(e){this._deductionScript.removeGeoEntityEffectParameter(e),this._isModified=!0,this._save()}getDelayFinishTime(){return this._deductionScript.getDelayFinishTime()}setDelayFinishTime(e){this._deductionScript.setDelayFinishTime(e),this._isModified=!0}}const _0x5252f7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3da48c=_0x5252f7(void 0,(function(){return _0x3da48c.toString().search("(((.+)+)+)+$").toString().constructor(_0x3da48c).search("(((.+)+)+)+$")}));_0x3da48c();class _0x386efd{constructor(e){this._deductionScriptManager=e,this._UUID=WebGLPlot$f.createGuid(),this._name="",this._deductionScripts=[],this._deductionScriptExtend=new _0x14792f,this._isModified=!1}_fromJson(e,t){let i=JSON.parse(e);WebGLPlot$f.defined(i.UUID)&&(this._UUID=i.UUID),WebGLPlot$f.defined(i.name)&&(this._name=i.name),WebGLPlot$f.defined(i.deductionScriptUUIDs)&&(this._deductionScripts.splice(0),i.deductionScriptUUIDs.forEach((e=>{this._deductionScripts.push(t.get(e))}))),WebGLPlot$f.defined(i.deductionScriptExtend)&&this._deductionScriptExtend._fromJson(i.deductionScriptExtend)}_toJson(){let e=new Map,t={};return t.hasOwnProperty("UUID")||(t.UUID=this._UUID),t.hasOwnProperty("name")||(t.name=this._name),t.hasOwnProperty("deductionScriptUUIDs")||(t.deductionScriptUUIDs=[],this._deductionScripts.forEach((i=>{e.set(i.getUUID(),i._toJson()),t.deductionScriptUUIDs.push(i.getUUID())}))),t.hasOwnProperty("deductionScriptExtend")||(t.deductionScriptExtend=this._deductionScriptExtend._toJson()),{deductionScriptJsons:e,json:JSON.stringify(t)}}_isModify(){return!!this._isModified||!!this._deductionScriptExtend._isModify()}_setIsModify(e){this._isModified=e,this._deductionScriptExtend._setIsModify(e)}_save(){_0x41dd10.getInstance()._saveDeductionScript(!1)}_getDeductionScriptByGeoEntityUUID(e){for(let t=0;t<this._deductionScripts.length;t++){let i=this._deductionScripts[t];if(i.getGeoEntityUUID()===e)return i}}createDeductionScript(e){let t=new _0x39c042(e);return this._deductionScripts.push(t),this._deductionScriptManager._addDeductionScripts.push(t),this._isModified=!0,this._save(),t}removeDeductionScript(e){for(let t=0;t<this._deductionScripts.length;t++){const i=this._deductionScripts[t];if(i.getUUID()===e){let n=i.getGeoEntityMoveParameterTimes();for(let e=n.length-1;e>=0;e--)i.removeGeoEntityMoveParameter(n[e]);this._deductionScripts.splice(t,1),this._deductionScriptManager._removeDeductionScriptUUIDs.push(e),this._isModified=!0,this._save();break}}}getDeductionScripts(){return this._deductionScripts}setName(e){this._name=e,this._isModified=!0,this._save()}getName(){return this._name}getUUID(){return this._UUID}getDeductionScriptExtend(){return this._deductionScriptExtend}}const _0x501882=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x248e54=_0x501882(void 0,(function(){return _0x248e54.toString().search("(((.+)+)+)+$").toString().constructor(_0x248e54).search("(((.+)+)+)+$")}));_0x248e54();class _0x2962c5{constructor(){this._deductionScriptGroups=[],this._scene=void 0,this._geoEntityMoveLayer=void 0,this._deductionScriptExecuteManager=void 0,this._addDeductionScripts=[],this._removeDeductionScriptUUIDs=[],this._isGroupInfoModified=!1}_setScene(e){this._geoEntityMoveLayer=new _0x267b40(e,"GeoEntityMoveLayer"),e.plotLayers.add(this._geoEntityMoveLayer),this._scene=e,this._deductionScriptExecuteManager=new _0x5ba8bb(this._geoEntityMoveLayer)}_execute(e){WebGLPlot$f.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._execute(e)}_getDeductionScriptExecute(e){if(WebGLPlot$f.defined(this._deductionScriptExecuteManager)){let t=this._deductionScriptExecuteManager._getDeductionScriptExecute(e);if(WebGLPlot$f.defined(t))return t}}_saveDeduscriptGroupsDataToScheme(){let e=_0x41dd10.getInstance()._getOpenedSchemeName();if(WebGLPlot$f.defined(e)){let t=[];this._deductionScriptGroups.forEach((e=>{let i=e._toJson();t.push(i.json)})),_0x41dd10.getInstance().getSituationSimulationSchemeManager().saveScriptStructure(e,t)}}_getAddAndRemoveDeductionScripts(){return{add:this._addDeductionScripts,remove:this._removeDeductionScriptUUIDs}}_clearAddAndRemoveDeductionScripts(){this._addDeductionScripts.splice(0),this._removeDeductionScriptUUIDs.splice(0)}_isGroupInfoModify(){if(this._isGroupInfoModified)return!0;for(let e=0;e<this._deductionScriptGroups.length;e++)if(this._deductionScriptGroups[e]._isModify())return!0;return!1}_setIsGroupInfoModify(e){this._isGroupInfoModified=e,this._deductionScriptGroups.forEach((t=>{t._setIsModify(e)}))}_save(){_0x41dd10.getInstance()._saveDeductionScript(!1)}_start(e){return this._reset(),this._deductionScriptExecuteManager._start(e)}_stop(){WebGLPlot$f.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._stop()}_reset(){WebGLPlot$f.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._reset(),_0x41dd10.getInstance().getGeoEntityEffectExtendFactory().clearText()}_setResetType(e){WebGLPlot$f.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._setResetType(e)}_setExecuteCallBackFunc(e){WebGLPlot$f.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._setExecuteCallBackFunc(e)}_removeAllScriptGroupFromScene(){this._deductionScriptGroups.splice(0)}getDeductionScriptGroups(){return this._deductionScriptGroups}removeScriptGroup(e){for(let t=0;t<this._deductionScriptGroups.length;t++){const i=this._deductionScriptGroups[t];if(i.getUUID()===e){i.getDeductionScripts().forEach((e=>{this._removeDeductionScriptUUIDs.push(e.getUUID())})),this._deductionScriptGroups.splice(t,1),this._isGroupInfoModified=!0,this._save();break}}}getScriptGroupByUUID(e){for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t];if(i.getUUID()===e)return i}}removeAllScriptGroup(){this._deductionScriptGroups.forEach((e=>{e.getDeductionScripts().forEach((e=>{this._removeDeductionScriptUUIDs.push(e.getUUID())}))})),this._deductionScriptGroups.splice(0),this._isGroupInfoModified=!0,this._save()}createScriptGroup(e){let t=new _0x386efd(this);return t.setName(e),this._deductionScriptGroups.push(t),this._isGroupInfoModified=!0,this._save(),t}toJson(){let e=new Map,t=[];return this._deductionScriptGroups.forEach((i=>{let n=i._toJson();e=new Map([...e,...n.deductionScriptJsons]),t.push(n.json)})),{deductionScriptJsons:e,deductionScriptGroupJsons:JSON.stringify(t)}}fromJson(e){this.removeAllScriptGroup(!1);let t=e.deductionScriptJsons,i=new Map;if(t.forEach(((e,t)=>{if(e.length>0){let n=new _0x39c042("");n._fromJson(e),i.set(t,n)}})),e.deductionScriptGroupJsons.length>0){let t=JSON.parse(e.deductionScriptGroupJsons);WebGLPlot$f.defined(t)&&t.forEach((e=>{let t=new _0x386efd(this);t._fromJson(e,i),this._deductionScriptGroups.push(t)}))}}_getMoveGeoEntityByUUID(e){let t=this._getDeductionScriptExecute(e);if(WebGLPlot$f.defined(t))return t._getMoveGeoEntity();if(WebGLPlot$f.defined(this._deductionScriptExecuteManager))for(let t=0;t<=this._deductionScriptExecuteManager._groupIndex;t++){let i=this._deductionScriptExecuteManager._deductionScriptExecuteGroups[t]._getDeductionScriptExcutes();if(WebGLPlot$f.defined(i))for(let t=0;t<i.length;t++){const n=i[t];if(WebGLPlot$f.defined(n)&&WebGLPlot$f.defined(n._getMoveGeoEntity())){let t=n._getMoveGeoEntity();if(t.getUUID()==e)return t}}}return null}}const _0x33a479=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xc3a9ab=_0x33a479(void 0,(function(){return _0xc3a9ab.toString().search("(((.+)+)+)+$").toString().constructor(_0xc3a9ab).search("(((.+)+)+)+$")}));_0xc3a9ab();class _0x236d05{constructor(){this._datasetNameSuffix=["_Structure","_Entity","_Script","_Satellite"],this._commit=this._getCommit(),this._URI=null}_setURI(e){this._URI=e,this._SatelliteConfigURI=e+"/iserver/mgis/situationSimulation/Satellite/SatelliteGroupsTemplate.json",this._datasetsURI=e+"/iserver/services/data-SituationSimulationSchemeWorkspace/rest/data/datasources/SituationSimulationSchemeDatasource/datasets",this._featureResultsURI=e+"/iserver/services/data-SituationSimulationSchemeWorkspace/rest/data/featureResults.rjson?returnContent=true"}newScheme(e){if(null==e||0===e.length||/^\d/.test(e))return!1;let t=this._queryFeatures("metadata","SchemeName",e);if(null==t||null!=t&&t.length>0)return!1;let i=this._datasetsURI+"/metadata/features.rjson",n=[{fieldNames:["SmID","SmUserID","SchemeName"],fieldValues:["0","0",e],geometry:null}];this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(WebGLPlot$f.toJSON(n));for(let t=0;t<this._datasetNameSuffix.length;t++){let i={datasetType:"TABULAR",datasetName:e+this._datasetNameSuffix[t]};if(this._commit.open("POST",encodeURI(this._datasetsURI+".json"),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(i)),JSON.parse(this._commit.responseText,null).succeed){let i=this._datasetsURI+"/"+e+this._datasetNameSuffix[t]+"/fields.rjson",n=["uuid","Content"];0===t&&(n=["EntityStructure","ScriptStructure","SatelliteGroupStructure"]);for(let e=0;e<n.length;e++){let t={isZeroLengthAllowed:"false",maxLength:"100000",isRequired:"false",name:n[e],caption:n[e],type:"WTEXT",defaultValue:"null",isSystemField:"false"};this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(t))}}}let r=this._loadSateGroupInfos(this._SatelliteConfigURI);return WebGLPlot$f.defined(r)&&this.saveSatelliteGroupStructure(e,r),!0}getAllSchemeName(){let e=this._queryFeatures("metadata","",""),t=[];if(null!=e)for(let i=0;i<e.length;i++)t.push(e[i].fieldValues[2]);return t}deleteScheme(e){let t=this._datasetsURI+"/metadata/features.rjson?_method=DELETE&deleteMode=SQL",i={attributeFilter:'SchemeName="'+e+'"'};this._commit.open("POST",encodeURI(t),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(WebGLPlot$f.toJSON(i));for(let t=0;t<this._datasetNameSuffix.length;t++){let i=this._datasetsURI+"/"+e+this._datasetNameSuffix[t]+".rjson";this._commit.open("DELETE",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null)}}saveEntityStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","EntityStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","EntityStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getEntityStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[2]:""}saveScriptStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","ScriptStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","ScriptStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getScriptStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[3]:""}saveSatelliteGroupStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","SatelliteGroupStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","SatelliteGroupStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getSatelliteGroupStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[4]:""}addFeature(e,t,i,n){return this._editFeature(e,t,i,n)}addFeatures(e,t,i){i.forEach(((i,n)=>{this._editFeature(e,t,n,i)}))}getFeatures(e,t){let i=this._getDatasetNameSuffix(t),n=this._queryFeatures(e+i,"","");const r=new Map;if(null!=n)for(let e=0;e<n.length;e++)r.set(n[e].fieldValues[2],n[e].fieldValues[3]);return r}updateFeature(e,t,i,n){return this._editFeature(e,t,i,n)}updateFeatures(e,t,i){let n=this._getDatasetNameSuffix(t),r=this._datasetsURI+"/"+e+n+"/features.rjson";this._commit.open("GET",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let o=JSON.parse(this._commit.responseText,null);if(null!=o&&o.featureCount>0){r=this._datasetsURI+"/"+e+n+"/features.rjson?_method=DELETE&deleteMode=SQL";let t={attributeFilter:"SmID>=0"};this._commit.open("POST",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(t))}i.forEach(((i,n)=>{this._editFeature(e,t,n,i)}))}deleteFeature(e,t,i){let n=this._getDatasetNameSuffix(t),r=this._datasetsURI+"/"+e+n+"/features.rjson?_method=DELETE&deleteMode=SQL",o={attributeFilter:'uuid="'+i+'"'};return this._commit.open("POST",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(o)),JSON.parse(this._commit.responseText,null).succeed}_getCommit(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{this.commit=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}_editFeature(e,t,i,n){let r=this._getDatasetNameSuffix(t),o=this._queryFeatures(e+r,"uuid",i),a=this._datasetsURI+"/"+e+r+"/features.rjson",s=[{fieldNames:["SmID","SmUserID","uuid","Content"],fieldValues:["0","0",i,n],geometry:null}];return null!=o&&o.length>0&&(a+="?_method=PUT",s=[{ID:o[0].ID,fieldNames:["SmID","SmUserID","Content"],fieldValues:["0","0",n],geometry:null}]),this._commit.open("POST",encodeURI(a),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(s)),JSON.parse(this._commit.responseText,null).succeed}_getDatasetNameSuffix(e){let t="";switch(e){case _0x59c417.ENTITY:t="_Entity";break;case _0x59c417.SCRIPT:t="_Script";break;case _0x59c417.SATELLITE:t="_Satellite"}return t}_queryFeatures(e,t,i){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let n={getFeatureMode:"SQL",datasetNames:["SituationSimulationSchemeDatasource:"+e],maxFeatures:1e4,queryParameter:{sortClause:null,ids:null,name:null,attributeFilter:0===t.length?"":t+'="'+i+'"',groupClause:null,linkItems:null,joinItems:null,fields:null}};this._commit.send(WebGLPlot$f.toJSON(n));let r=JSON.parse(this._commit.responseText,null);return null==r?null:r.features}_loadSateGroupInfos(e){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(this._URI))return null;var t;if(-1==(e=e.replace(/\\+/g,"/")).lastIndexOf("/"))return null;(t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open("GET",e,!1),t.send();var i=t.responseText;if(!WebGLPlot$f.defined(i))return null;let n=JSON.parse(i);return WebGLPlot$f.defined(n.groups)&&n.groups.forEach((e=>{WebGLPlot$f.defined(e.modelPath)&&(e.modelPath=this._URI+e.modelPath)})),JSON.stringify(n)}_convertToRgba(e){if(e.startsWith("RGBA(")&&e.endsWith(")")){let t=e.replace("RGBA(","");t=t.substring(0,t.lastIndexOf(")"));let i=t.split(",");if(4===i.length)return new WebGLPlot$f.Color(i[0].trim(),i[1].trim(),i[2].trim(),i[3].trim())}return null}}const _0x165a9c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1cfc64=_0x165a9c(void 0,(function(){return _0x1cfc64.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cfc64).search("(((.+)+)+)+$")}));_0x1cfc64();class _0x5ed02a{constructor(){this._textNames=[],this._funcs=new Map,this._time=void 0}_execute(e){this._time=e,this._funcs.forEach(((e,t)=>{e.func(e.parms)}))}init(e){let t=this;WebGLPlot$f.defined(e.viewer)&&_0xfa8fd4.addExtendCallBack((function(e,t,i){if("camera"===t){let t=e.viewer,n=JSON.parse(i);t.camera.flyTo({destination:new Cesium.Cartesian3(n.position.x,n.position.y,n.position.z),orientation:{heading:n.heading,pitch:n.pitch,roll:n.roll},duration:n.duration})}}),{viewer:e.viewer}),WebGLPlot$f.defined(e.document)&&_0xfa8fd4.addExtendCallBack((function(e,i,n){if("text"===i){let i=e.document,r=JSON.parse(n),o=i.createElement("Div");o.onselectstart=function(){return!1},o.style.position="absolute",o.style.zIndex="9999",o.style.whiteSpace="pre-wrap",o.style.wordBreak="break-all",o.style.width=r.width,o.style.height=r.height,o.style.background=r.backColor,o.style.webkitBorderRadius=r.borderRadius,o.style.paddingLeft=r.paddingLeft,o.style.paddingRight=r.paddingRight,o.style.paddingTop=r.paddingTop,o.style.paddingBottom=r.paddingBottom;let a=r.texts;for(let e=0;e<a.length;e++){let t=a[e],n=i.createElement("p");n.style.marginTop="0px",n.style.marginBottom="0px";let r=t.fontSize,s=r.slice(0,r.length-2);n.style.paddingTop=String(Number(s)/2)+"px",n.style.paddingBottom=String(Number(s)/2)+"px",n.style.color=t.color,n.style.fontFamily=t.fontFamily,n.style.fontSize=t.fontSize,n.style.fontWeight=t.fontWeight,n.style.fontStyle=t.fontStyle,n.style.lineHeight=t.lineHeight,n.style.letterSpacing=t.letterSpacing,n.style.textDecoration=t.textDecoration,n.style.textShadow=t.textShadow,n.style["-webkit-text-stroke"]=t.stroke,n.style.textAlign=t.textAlign,"left"===n.style.textAlign?n.style.marginLeft=t.margin:"right"===n.style.textAlign&&(n.style.marginRight=t.margin);let l=i.createTextNode(t.text);n.appendChild(l),o.appendChild(n)}i.body.appendChild(o);let s=o.offsetWidth,l=o.offsetHeight;switch(r.position.type){case 0:o.style.left=r.position.customPos.left,o.style.top=r.position.customPos.top;break;case 1:o.style.left="1px",o.style.top="1px";break;case 2:o.style.left="calc(50% - "+String(s/2)+"px)",o.style.top="1px";break;case 3:o.style.left="calc(100% - "+String(s+1)+"px)",o.style.top="1px";break;case 4:o.style.left="1px",o.style.top="calc(50% - "+String(l/2)+"px)";break;case 5:o.style.left="calc(50% - "+String(s/2)+"px)",o.style.top="calc(50% - "+String(l/2)+"px)";break;case 6:o.style.left="calc(100% - "+String(s+1)+"px)",o.style.top="calc(50% - "+String(l/2)+"px)";break;case 7:o.style.left="1px",o.style.top="calc(100% - "+String(l+1)+"px)";break;case 8:o.style.left="calc(50% - "+String(s/2)+"px)",o.style.top="calc(100% - "+String(l+1)+"px)";break;case 9:o.style.left="calc(50% - "+String(s+1)+"px)",o.style.top="calc(100% - "+String(l+1)+"px)"}let u=WebGLPlot$f.createGuid(),c=function(e){if(t._time-e.startTime>e.time){e.div.remove(),t._funcs.delete(u);for(let e=0;e<t._textNames.length;e++)if(t._textNames[e]===u){t._textNames.splice(e,1);break}}};t._funcs.set(u,{parms:{startTime:t._time,time:r.time,div:o},func:c}),t._textNames.push(u)}}),{document:e.document})}clearText(){this._textNames.forEach((e=>{this._funcs.get(e).parms.div.remove(),this._funcs.delete(e)})),this._textNames=[]}createCameraFlyExtendEffect(e){let t=new _0xfa8fd4;t.setName("camera");let i={};return i.position={x:e.position.x,y:e.position.y,z:e.position.z},i.heading=e.heading,i.pitch=e.pitch,i.roll=e.roll,i.duration=e.duration,t.setParam(JSON.stringify(i)),t}createTextExtendEffect(e){if(!WebGLPlot$f.defined(e.texts))return;let t=new _0xfa8fd4;t.setName("text");let i={};return i.time=WebGLPlot$f.defaultValue(1e3*e.time,3e3),i.width=WebGLPlot$f.defined(e.width)?String(e.width)+"px":"",i.height=WebGLPlot$f.defined(e.height)?String(e.height)+"px":"",WebGLPlot$f.defined(e.position)?(i.position={type:WebGLPlot$f.defaultValue(e.position.type,8)},WebGLPlot$f.defined(e.position.customPos)?i.position.customPos={left:WebGLPlot$f.defined(e.position.customPos.x)?String(e.position.customPos.x)+"px":"0px",top:WebGLPlot$f.defined(e.position.customPos.y)?String(e.position.customPos.y)+"px":"0px"}:i.position.customPos={left:"0px",top:"0px"}):i.position={type:8},i.backColor=WebGLPlot$f.defined(e.backColor)?e.backColor.toCssColorString():"white",i.borderRadius=WebGLPlot$f.defined(e.borderRadius)?e.borderRadius+"px":"0px",i.paddingLeft=WebGLPlot$f.defined(e.paddingLeft)?String(e.paddingLeft)+"px":"0px",i.paddingRight=WebGLPlot$f.defined(e.paddingRight)?String(e.paddingRight)+"px":"0px",i.paddingTop=WebGLPlot$f.defined(e.paddingTop)?String(e.paddingTop)+"px":"0px",i.paddingBottom=WebGLPlot$f.defined(e.paddingBottom)?String(e.paddingBottom)+"px":"0px",i.texts=[],e.texts.forEach((e=>{let t={text:WebGLPlot$f.defaultValue(e.text,"Text"),fontFamily:WebGLPlot$f.defaultValue(e.fontFamily,"Microsoft YaHei"),fontStyle:WebGLPlot$f.defaultValue(e.fontStyle,"normal"),lineHeight:WebGLPlot$f.defaultValue(e.lineHeight,1),fontSize:WebGLPlot$f.defined(e.fontSize)?String(e.fontSize)+"px":"16px",fontWeight:WebGLPlot$f.defined(e.fontWeight)?String(e.fontWeight)+"px":"normal",letterSpacing:WebGLPlot$f.defined(e.letterSpacing)?String(e.letterSpacing)+"px":"0px",color:WebGLPlot$f.defined(e.color)?e.color.toCssColorString():"black",textAlign:WebGLPlot$f.defaultValue(e.textAlign,"left"),margin:WebGLPlot$f.defined(e.margin)?String(e.margin)+"px":"0px"};if(WebGLPlot$f.defined(e.textDecoration)){let i=WebGLPlot$f.defined(e.textDecoration.type)?e.textDecoration.type:"none",n=WebGLPlot$f.defined(e.textDecoration.color)?e.textDecoration.color.toCssColorString():"black";t.textDecoration=i+" "+n}if(WebGLPlot$f.defined(e.textShadow)){let i=WebGLPlot$f.defined(e.textShadow.color)?e.textShadow.color.toCssColorString():"black",n=WebGLPlot$f.defined(e.textShadow.left)?String(e.textShadow.left)+"px":"4px",r=WebGLPlot$f.defined(e.textShadow.top)?String(e.textShadow.top)+"px":"4px",o=WebGLPlot$f.defined(e.textShadow.size)?String(e.textShadow.size)+"px":"4px";t.textShadow=i+" "+n+" "+r+" "+o}if(WebGLPlot$f.defined(e.stroke)){let i=WebGLPlot$f.defined(e.stroke.width)?String(e.stroke.width)+"px":"0px",n=WebGLPlot$f.defined(e.stroke.color)?e.stroke.color.toCssColorString():"black";t.stroke=i+" "+n}i.texts.push(t)})),t.setParam(JSON.stringify(i)),t}}const _0x4cb1bb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x33a3b7=_0x4cb1bb(void 0,(function(){return _0x33a3b7.toString().search("(((.+)+)+)+$").toString().constructor(_0x33a3b7).search("(((.+)+)+)+$")}));_0x33a3b7();class _0x4e5cfb{constructor(){this._bPlay=!1,this._lUTCTime=(new Date).getTime(),this._lSimulationTime=this._lUTCTime,this._dSimulationSpeed=1,this._lCumnlativeTime=0,this._bReverse=!1,this._bAutoUpdate=!1,this._lOrbitTime=this._lSimulationTime;let e=this;this._timer=setInterval((function(){e._execute()}),30)}setResetType(e){_0x41dd10.getInstance().getDeductionScriptManager()._setResetType(e)}start(){return this._bPlay=!0,_0x41dd10.getInstance().getDeductionScriptManager()._start(this._lSimulationTime)}stop(){this._bPlay=!1,_0x41dd10.getInstance().getDeductionScriptManager()._stop()}reset(){this._bPlay=!1,_0x41dd10.getInstance().getDeductionScriptManager()._reset()}pause(){this._bPlay=!1}continue(){this._bPlay=!0}setExecutePassTimeOffset(e){this._lSimulationTime+=e}setExecuteCallBackFunc(e){_0x41dd10.getInstance().getDeductionScriptManager()._setExecuteCallBackFunc(e)}getUTCTime(){return this._lUTCTime}setSimulationSpeed(e){this._dSimulationSpeed=e}getSimulationSpeed(){return this._dSimulationSpeed}setSimulationTime(e){this._lSimulationTime=e,this._executeSatellite(),this._executeDeductionScript()}getSimulationTime(){return this._lSimulationTime}setIsReverse(e){this._bReverse=e}getIsReverse(){return this._bReverse}getAutoUpdate(){return this._bAutoUpdate}isPlay(){return this._bPlay}updataAllOrbitPosition(){_0x41dd10.getInstance().getSatelliteManager().updateAllOrbitPosition(this._lSimulationTime)}_execute(){let e=(new Date).getTime();if(this._bPlay){let t=(e-this._lUTCTime)*this._dSimulationSpeed;this._bReverse?this._lSimulationTime=this._lSimulationTime-t:this._lSimulationTime=this._lSimulationTime+t,this._executeSatellite(),this._executeDeductionScript(),this._lCumnlativeTime=0}this._lUTCTime=e}_executeSatellite(){_0x41dd10.getInstance().getSatelliteManager().updateAllSatellitePosition(this._lSimulationTime),_0x41dd10.getInstance().getSatelliteEntityManager().updateAllSatelliteEntityPosition(this._lSimulationTime)}_executeDeductionScript(){_0x41dd10.getInstance().getDeductionScriptManager()._execute(this._lSimulationTime),_0x41dd10.getInstance().getGeoEntityEffectExtendFactory()._execute(this._lSimulationTime)}}const _0x20e1f3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x27edd6=_0x20e1f3(void 0,(function(){return _0x27edd6.toString().search("(((.+)+)+)+$").toString().constructor(_0x27edd6).search("(((.+)+)+)+$")}));_0x27edd6();class _0x41dd10{constructor(){this._geoEntityManager=new _0x1fa8f7,this._satelliteEntityManager=new _0x42f78d,this._satelliteManager=new _0x19ce0d,this._deductionScriptManager=new _0x2962c5,this._situationSimulationSchemeManager=new _0x236d05,this._geoEntityEffectExtendFactory=new _0x5ed02a,this._simulationController=new _0x4e5cfb,this._schemeName=void 0,this._isAutoSave=!1,this._uri=void 0}_getOpenedSchemeName(){return this._schemeName}_saveGeoEntity(e){if(e||this._isAutoSave){if(!WebGLPlot$f.defined(this._schemeName))return;let e=this._geoEntityManager._getAddAndRemoveGeoEntitys();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x59c417.ENTITY,e.getUUID(),e.toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x59c417.ENTITY,e)}));let t=this._geoEntityManager.getGeoEntityRootNode();(e.add.length>0||e.remove.length>0||t._isModify())&&(this._situationSimulationSchemeManager.saveEntityStructure(this._schemeName,t._toJson()),t._isModify()&&t._setIsModify(!1)),this._geoEntityManager.getGeoEntitys().forEach((t=>{-1===e.add.indexOf(t)&&t._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x59c417.ENTITY,t.getUUID(),t.toJson()),t._setIsModify(!1))})),this._geoEntityManager._clearAddAndRemoveGeoEntitys()}}_saveSatelliteGeoEntity(e){if(e||this._isAutoSave){if(!WebGLPlot$f.defined(this._schemeName))return;let e=this._satelliteEntityManager._getAddAndRemoveGeoEntitys();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x59c417.SATELLITE,e.getUUID(),e.toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x59c417.SATELLITE,e)})),this._satelliteEntityManager.getSatelliteEntitys().forEach((t=>{-1===e.add.indexOf(t)&&t._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x59c417.SATELLITE,t.getUUID(),t.toJson()),t._setIsModify(!1))})),this._satelliteEntityManager._clearAddAndRemoveGeoEntitys()}}_saveDeductionScript(e){if(e||this._isAutoSave){if(!WebGLPlot$f.defined(this._schemeName))return;let e=this._deductionScriptManager._getAddAndRemoveDeductionScripts();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x59c417.SCRIPT,e.getUUID(),e._toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x59c417.SCRIPT,e)})),(e.add.length>0||e.remove.length>0||this._deductionScriptManager._isGroupInfoModify())&&(this._situationSimulationSchemeManager.saveScriptStructure(this._schemeName,this._deductionScriptManager.toJson().deductionScriptGroupJsons),this._deductionScriptManager._isGroupInfoModify()&&this._deductionScriptManager._setIsGroupInfoModify(!1)),this._deductionScriptManager.getDeductionScriptGroups().forEach((e=>{e.getDeductionScripts().forEach((e=>{e._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x59c417.SCRIPT,e.getUUID(),e._toJson()),e._setIsModify(!1))}))}))}}_saveSatelliteGroups(e){if(e||this._isAutoSave){if(!WebGLPlot$f.defined(this._schemeName))return;this._satelliteManager._isModify()&&(this._situationSimulationSchemeManager.saveSatelliteGroupStructure(this._schemeName,this._satelliteManager.toJson()),this._satelliteManager._setIsModify(!1))}}static getInstance(){return _0x41dd10._instance||(_0x41dd10._instance=new _0x41dd10),_0x41dd10._instance}getSimulationController(){return this._simulationController}getGeoEntityManager(){return this._geoEntityManager}getSatelliteEntityManager(){return this._satelliteEntityManager}getSatelliteManager(){return this._satelliteManager}getDeductionScriptManager(){return this._deductionScriptManager}getSituationSimulationSchemeManager(){return this._situationSimulationSchemeManager}getGeoEntityEffectExtendFactory(){return this._geoEntityEffectExtendFactory}setScene(e){this._geoEntityManager._setScene(e),this._satelliteEntityManager.setScene(e),this._satelliteManager.setScene(e),this._deductionScriptManager._setScene(e)}openScheme(e,t){let i=this._isAutoSave;this._isAutoSave=!1;let n=this._situationSimulationSchemeManager.getSatelliteGroupStructure(e);this._satelliteManager.fromJson(n);let r=this._situationSimulationSchemeManager.getFeatures(e,_0x59c417.ENTITY),o=this._situationSimulationSchemeManager.getEntityStructure(e);this._geoEntityManager.fromJson({geoEntityJsons:r,geoEntityNodeJson:o},(function(e){"function"==typeof t&&t(e)}));let a=this._situationSimulationSchemeManager.getFeatures(e,_0x59c417.SCRIPT),s=this._situationSimulationSchemeManager.getScriptStructure(e);this._deductionScriptManager.fromJson({deductionScriptJsons:a,deductionScriptGroupJsons:s});let l=this._situationSimulationSchemeManager.getFeatures(e,_0x59c417.SATELLITE);this._satelliteEntityManager.fromJson({satelliteEntityJsons:l,satelliteManager:this._satelliteManager},(function(e){"function"==typeof t&&t(e)})),this._schemeName=e,this._isAutoSave=i}closeScheme(){let e=this._isAutoSave;this._isAutoSave=!1,this._geoEntityManager._removeAllGeoEntityFromScene(),this._deductionScriptManager._removeAllScriptGroupFromScene(),this._satelliteEntityManager._removeAllSatelliteEntityFromScene(this._satelliteManager),this._schemeName=void 0,this._isAutoSave=e}saveScheme(){this._saveGeoEntity(!0),this._saveSatelliteGeoEntity(!0),this._saveDeductionScript(!0),this._saveSatelliteGroups(!0)}setIsAutoSave(e){this._isAutoSave=e}isAutoSave(){return this._isAutoSave}setURI(e){this._situationSimulationSchemeManager._setURI(e),this._uri=e}getURI(){return this._uri}}var _0x480a2a=(_0x4c56de=!0,function(e,t){var i=_0x4c56de?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c56de=!1,i}),_0x5ec440=_0x480a2a(void 0,(function(){return _0x5ec440.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ec440).search("(((.+)+)+)+$")})),_0x4c56de;_0x5ec440();var WebGLPlot$4=window.WebGLPlot=window.WebGLPlot||{};function _0x1d0b9d(e){e=e||{},this.defaultFlag=!!e.defaultFlag&&e.defaultFlag,this.symbolStyle=new _0x53d051,this.symbolTextStyle=new _0x34d1aa,this._gridSymbolSize=e.gridSymbolSize?e.gridSymbolSize:new WebGLPlot$4.Cartesian2(-1,-1),this._lineSymbolID=e.lineSymbolID?e.lineSymbolID:-1,this._gridLineWidth=e.gridLineWidth?e.gridLineWidth:-1,this._modelPath=e.modelPath?e.modelPath:"",this.CLASS_NAME="DefaultStyle"}Object.defineProperties(_0x1d0b9d.prototype,{lineColor:{get:function(){return this.symbolStyle._lineColor},set:function(e){e!==this.symbolStyle._lineColor&&(this.symbolStyle.lineColor=e)}},lineWidth:{get:function(){return this.symbolStyle._lineWidth},set:function(e){e!==this.symbolStyle._lineWidth&&(this.symbolStyle.lineWidth=e)}},fillBackColor:{get:function(){return this.symbolStyle._fillBackColor},set:function(e){e!==this.symbolStyle._fillBackColor&&(this.symbolStyle.fillBackColor=e)}},fillForeColor:{get:function(){return this.symbolStyle._fillForeColor},set:function(e){e!==this.symbolStyle._fillForeColor&&(this.symbolStyle.fillForeColor=e)}},fillBackOpaque:{get:function(){return this.symbolStyle._fillBackOpaque},set:function(e){e!==this.symbolStyle._fillBackOpaque&&(this.symbolStyle.fillBackOpaque=e)}},fillGradientAngle:{get:function(){return this.symbolStyle._fillGradientAngle},set:function(e){e!==this.symbolStyle._fillGradientAngle&&(this.symbolStyle.fillGradientAngle=e)}},fillGradientMode:{get:function(){return this.symbolStyle._fillGradientMode},set:function(e){e!==this.symbolStyle._fillGradientMode&&(this.symbolStyle.fillGradientMode=e)}},fillGradientOffsetRatioY:{get:function(){return this.symbolStyle._fillGradientOffsetRatioY},set:function(e){e!==this.symbolStyle._fillGradientOffsetRatioY&&(this.symbolStyle.fillGradientOffsetRatioY=e)}},fillGradientOffsetRatioX:{get:function(){return this.symbolStyle._fillGradientOffsetRatioX},set:function(e){e!==this.symbolStyle._fillGradientOffsetRatioX&&(this.symbolStyle.fillGradientOffsetRatioX=e)}},fillSymbolID:{get:function(){return this.symbolStyle._fillSymbolID},set:function(e){e!==this.symbolStyle._fillSymbolID&&(this.symbolStyle.fillSymbolID=e)}},fillOpaqueRate:{get:function(){return this.symbolStyle._fillOpaqueRate},set:function(e){e===this.symbolStyle._fillOpaqueRate||e>100||e<0||(this.symbolStyle.fillOpaqueRate=e)}},surroundLineWidth:{get:function(){return this.symbolStyle._surroundLineWidth},set:function(e){e!==this.symbolStyle._surroundLineWidth&&(this.symbolStyle.surroundLineWidth=e)}},surroundLineColor:{get:function(){return this.symbolStyle._surroundLineColor},set:function(e){e!==this.symbolStyle._surroundLineColor&&(this.symbolStyle.surroundLineColor=e)}},opacity:{get:function(){return this.symbolStyle._opacity},set:function(e){e!==this.symbolStyle._opacity&&(this.symbolStyle.opacity=e)}},surroundLineType:{get:function(){return this.symbolStyle._surroundLineType},set:function(e){e!==this.symbolStyle._surroundLineType&&(this.symbolStyle.surroundLineType=e)}},height:{get:function(){return this.symbolTextStyle._height},set:function(e){e!==this.symbolTextStyle._height&&(this.symbolTextStyle.height=e)}},foreColor:{get:function(){return this.symbolTextStyle._foreColor},set:function(e){e!==this.symbolTextStyle._foreColor&&(this.symbolTextStyle.foreColor=e)}},backColor:{get:function(){return this.symbolTextStyle._backColor},set:function(e){e!==this.symbolTextStyle._backColor&&(this.symbolTextStyle.backColor=e)}},outline:{get:function(){return this.symbolTextStyle._outline},set:function(e){e!==this.symbolTextStyle._outline&&(this.symbolTextStyle.outline=e)}},fontName:{get:function(){return this.symbolTextStyle._fontName},set:function(e){e!==this.symbolTextStyle._fontName&&(this.symbolTextStyle.fontName=e)}},italic:{get:function(){return this.symbolTextStyle._italic},set:function(e){e!==this.symbolTextStyle._italic&&(this.symbolTextStyle.italic=e)}},bold:{get:function(){return this.symbolTextStyle._bold},set:function(e){e!==this.symbolTextStyle._bold&&(this.symbolTextStyle.bold=e)}},align:{get:function(){return this.symbolTextStyle._align},set:function(e){e!==this.symbolTextStyle._italic&&(this.symbolTextStyle.align=e)}},italicAngle:{get:function(){return this.symbolTextStyle._italicAngle},set:function(e){e!==this.symbolTextStyle._italicAngle&&(this.symbolTextStyle.italicAngle=e)}},shadow:{get:function(){return this.symbolTextStyle._shadow},set:function(e){e!==this.symbolTextStyle._shadow&&(this.symbolTextStyle.shadow=e)}},sizeFixed:{get:function(){return this.symbolTextStyle._sizeFixed},set:function(e){e!==this.symbolTextStyle._sizeFixed&&(this.symbolTextStyle.sizeFixed=e)}},underline:{get:function(){return this.symbolTextStyle._underline},set:function(e){e!==this.symbolTextStyle._underline&&(this.symbolTextStyle.underline=e)}},backOpaque:{get:function(){return this.symbolTextStyle._backOpaque},set:function(e){e!==this.symbolTextStyle._backOpaque&&(this.symbolTextStyle.backOpaque=e)}},strikeout:{get:function(){return this.symbolTextStyle._strikeout},set:function(e){e!==this.symbolTextStyle._strikeout&&(this.symbolTextStyle.strikeout=e)}},borderSpacingWidth:{get:function(){return this._borderSpacingWidth},set:function(e){e!==this._borderSpacingWidth&&(this._borderSpacingWidth=e)}},outlineWidth:{get:function(){return this.symbolTextStyle._outlineWidth},set:function(e){e!==this.symbolTextStyle._outlineWidth&&(this.symbolTextStyle.outlineWidth=e)}},fontWidth:{get:function(){return this.symbolTextStyle._fontWidth},set:function(e){e!==this.symbolTextStyle._fontWidth&&(this.symbolTextStyle.fontWidth=e)}},opaqueRate:{get:function(){return this.symbolTextStyle._opaqueRate},set:function(e){e!==this.symbolTextStyle._opaqueRate&&(this.symbolTextStyle.opaqueRate=e)}},stringAlignment:{get:function(){return this.symbolTextStyle._stringAlignment},set:function(e){e!==this.symbolTextStyle._stringAlignment&&(this.symbolTextStyle.stringAlignment=e)}},text3DScale:{get:function(){return this.symbolTextStyle._text3DScale},set:function(e){e!==this.symbolTextStyle._text3DScale&&(this.symbolTextStyle.text3DScale=e)}},fontWeight:{get:function(){return this.symbolTextStyle._fontWeight},set:function(e){e!==this.symbolTextStyle._fontWeight&&(this.symbolTextStyle.fontWeight=e)}},fontSize:{get:function(){return this.symbolTextStyle._fontSize},set:function(e){e!==this.symbolTextStyle._fontSize&&(this.symbolTextStyle.fontSize=e)}},outlineColor:{get:function(){return this.symbolTextStyle._outlineColor},set:function(e){e!==this.symbolTextStyle._outlineColor&&(this.symbolTextStyle.outlineColor=e)}},gridSymbolSize:{get:function(){return this._gridSymbolSize},set:function(e){e.x>0&&e.y>0&&(this._gridSymbolSize=e)}},lineSymbolID:{get:function(){return this._lineSymbolID},set:function(e){this._lineSymbolID!==e&&(this._lineSymbolID=e)}},gridLineWidth:{get:function(){return this._gridLineWidth},set:function(e){this._gridLineWidth!==e&&(this._gridLineWidth=e)}},modelPath:{get:function(){return this._modelPath},set:function(e){this._modelPath!==e&&(this._modelPath=e)}}}),WebGLPlot$4.DefaultStyle=_0x1d0b9d;var _0x292cd2=(_0x39c022=!0,function(e,t){var i=_0x39c022?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39c022=!1,i}),_0x2a9f7d=_0x292cd2(void 0,(function(){return _0x2a9f7d.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a9f7d).search("(((.+)+)+)+$")})),_0x39c022;_0x2a9f7d();var WebGLPlot$3=window.WebGLPlot=window.WebGLPlot||{};function _0x14b23e(e){e=e||{},this.properties=e.properties?e.properties:[],this.CLASS_NAME="ExtendProperty"}function t$2(e){this._shaderProgramText=e.shaderProgramText,this._name=e.name,this._context=e.context}function r$8(e,t){this.name=e.name,this._engine=e.engine,this._shaderProgram=e.shaderProgram,this._threadGroupsize=[],this._computerShader=new _0x14f326(this.name,this._engine,{computeSource:this._shaderProgram},t)}_0x14b23e.prototype.addProperty=function(e,t){var i=this.findProperty(e);return null===i?this.properties.push(WebGLPlot$3.createProperty(e,t)):i.setValue(t),!0},_0x14b23e.prototype.deleteProperty=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties.slice(t,1),!0;return!1},_0x14b23e.prototype.findProperty=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties[t];return null},_0x14b23e.prototype.getPropertyValue=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties[t].value;return null},_0x14b23e.prototype.getPropertyByIndex=function(e){return e<this.properties.length?this.properties[e]:null},_0x14b23e.prototype.getPropertyCount=function(){return this.properties.length},_0x14b23e.prototype.destroy=function(){this.properties=null},WebGLPlot$3.ExtendProperty=_0x14b23e,Object.defineProperties(t$2.prototype,{shaderProgram:{get:function(){return this._shaderProgramText}},shaderName:{get:function(){return this._name}},engine:{get:function(){return this._context.engine}}}),Object.defineProperties(r$8.prototype,{threadGroupsize:{get:function(){return this._threadGroupsize}}}),r$8.prototype.dispatch=function(e,t,i,n){e$2b(t)||(t=1),e$2b(i)||(i=1),0==this.threadGroupsize.length&&this.getThreadGroupSizes(this._shaderProgram);const r=this.threadGroupsize,o=Math.ceil(e/r[0]),a=Math.ceil(t/r[1]),s=Math.ceil(i/r[2]);return e$2b(n)?this._computerShader.dispatchWhenReady(o,a,s,n):(this._computerShader.dispatch(o,a,s),null)},r$8.prototype.getThreadGroupSizes=function(e){var t=/workgroup_size\s*?\(\s*?(\d+)\s*?,\s*?(\d+)\s*?,\s*?(\d+)/g.exec(e);return t=t?[0|t[1],0|t[2],0|t[3]]:[1,1,1],this._threadGroupsize=t,t},r$8.prototype.bindStorageBuffer=function(e,t){this._computerShader.setStorageBuffer(e,t)},r$8.prototype.bindUniformBuffer=function(e,t){this._computerShader.setUniformBuffer(e,t)},r$8.prototype.bindTextureSampler=function(e,t){this._computerShader.setTextureSampler(e,t)},r$8.prototype.bindStorageTexture=function(e,t){this._computerShader.setStorageTexture(e,t)},r$8.prototype.bindTexture=function(e,t,i){this._computerShader.setTexture(e,t,i)};var _0x28b766=(_0x5d388f=!0,function(e,t){var i=_0x5d388f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d388f=!1,i}),_0x6489fa=_0x28b766(void 0,(function(){return _0x6489fa.toString().search("(((.+)+)+)+$").toString().constructor(_0x6489fa).search("(((.+)+)+)+$")})),_0x5d388f;_0x6489fa();var CommonNoLigthOneTextureVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\n#ifdef RENDER_POINT\nuniform float uPointSize;\n#endif\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n gl_Position = depthClampFarPlane(pos);\n vTexCoord = aTexCoord0.xy;\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n#ifdef RENDER_POINT\n gl_PointSize = uPointSize;\n#endif\n}",_0x262122=(_0x57b18c=!0,function(e,t){var i=_0x57b18c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57b18c=!1,i}),_0x40bdea=_0x262122(void 0,(function(){return _0x40bdea.toString().search("(((.+)+)+)+$").toString().constructor(_0x40bdea).search("(((.+)+)+)+$")})),_0x57b18c;_0x40bdea();var CommonOneTextureFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uTexture0;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec2 texcoord = vTexCoord.xy;\n gl_FragColor = texture2D(uTexture0, texcoord);\n}",_0x4dc43e=(_0x5715c1=!0,function(e,t){var i=_0x5715c1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5715c1=!1,i}),_0x1c822c=_0x4dc43e(void 0,(function(){return _0x1c822c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c822c).search("(((.+)+)+)+$")})),_0x5715c1;_0x1c822c();var DepthMapAnalysisVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nuniform mat4 uRenderTextureMatrix;\nvarying vec4 renderTextureCoord;\nvarying float texcoordX;\n#ifdef LOG_DEPTH\nvarying float v_rttLogZ;\n#endif\nvarying vec4 vPositionEC;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n vPositionEC = viewPos;\n renderTextureCoord = uRenderTextureMatrix * viewPos;\n texcoordX = aTexCoord0.x;\n}",_0x3bc55c=(_0x108208=!0,function(e,t){var i=_0x108208?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x108208=!1,i}),_0x54131e=_0x3bc55c(void 0,(function(){return _0x54131e.toString().search("(((.+)+)+)+$").toString().constructor(_0x54131e).search("(((.+)+)+)+$")})),_0x108208;_0x54131e();var ModifyRegionBottomFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uColorTexture;\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\nuniform vec4 uGeoBounds;\nuniform vec4 uHypRect;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying float fHeight;\n\n\nfloat computeMixCon(float height)\n{\n\tfloat distanceToContour = mod(height - 0.0002, uHypContourInterval);\n\tfloat dxc = abs(dFdx(height));\n\tfloat dyc = abs(dFdy(height));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float height)\n{\n\tfloat threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat contourRate = (height - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tvec2 contourCoord = vec2(0.0, finalCoord);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec2 texcoord = vTexCoord.xy;\n gl_FragColor = texture2D(uColorTexture, texcoord);\n if(uHypHasColorTable > 0.1)\n {\n float bNext = 1.0;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (uGeoBounds.z - uGeoBounds.x) + uGeoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uGeoBounds.w - uGeoBounds.y) + uGeoBounds.y;\n if(polyTexCoord.x>uHypRect.x && polyTexCoord.x<uHypRect.z && polyTexCoord.y> uHypRect.y&& polyTexCoord.y < uHypRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uHypRect.x, uHypRect.w);\n polyTexCoord.x = polyTexCoord.x / (uHypRect.z - uHypRect.x);\n polyTexCoord.y = 1.0 - polyTexCoord.y / (uHypRect.y - uHypRect.w);\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n bNext = 0.0;\n }\n }\n else\n {\n bNext = 0.0;\n }\n }\n if(bNext > 0.2)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(fHeight <= uHypMaxVisibleValue && fHeight >= uHypMinVisibleValue)\n {\n#ifdef GL_OES_standard_derivatives\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fHeight);\n contourMapColor = mix(computeContourMapColor(fHeight), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fHeight);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fHeight);\n }\n else\n {\n finalOpacity = 0.0;\n }\n }\n else\n {\n finalOpacity = 0.5;\n }\n gl_FragColor = mix(gl_FragColor, contourMapColor, finalOpacity);\n }\n }\n}",_0x53f31f=(_0x158f9e=!0,function(e,t){var i=_0x158f9e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x158f9e=!1,i}),_0x264b62=_0x53f31f(void 0,(function(){return _0x264b62.toString().search("(((.+)+)+)+$").toString().constructor(_0x264b62).search("(((.+)+)+)+$")})),_0x158f9e;_0x264b62();var ModifyRegionBottomVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\n#ifdef RENDER_POINT\nuniform float uPointSize;\n#endif\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying float fHeight;\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n gl_Position = depthClampFarPlane(pos);\n vTexCoord = aTexCoord0.xy;\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n fHeight = aPosition.w;\n#ifdef RENDER_POINT\n gl_PointSize = uPointSize;\n#endif\n}",_0x2ac431=(_0x43408b=!0,function(e,t){var i=_0x43408b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43408b=!1,i}),_0x47e9e3=_0x2ac431(void 0,(function(){return _0x47e9e3.toString().search("(((.+)+)+)+$").toString().constructor(_0x47e9e3).search("(((.+)+)+)+$")})),_0x43408b;_0x47e9e3();var ModifyRegionOuterFS="varying vec2 vTexCoord;\nuniform sampler2D uColorTexture;\nvoid main()\n{\n gl_FragColor = texture2D(uColorTexture, vTexCoord);\n}",_0x5cee8f=(_0x29227a=!0,function(e,t){var i=_0x29227a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29227a=!1,i}),_0x36c236=_0x5cee8f(void 0,(function(){return _0x36c236.toString().search("(((.+)+)+)+$").toString().constructor(_0x36c236).search("(((.+)+)+)+$")})),_0x29227a;_0x36c236();var ModifyRegionOuterVS="attribute vec4 aPosition;\nattribute vec2 aTexCoord;\nuniform vec2 uMinMaxModifyHeight;\nvarying vec2 vTexCoord;\nuniform sampler2D uHeightTexture;\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uHeightTexture, aTexCoord));\n float height = aPosition.z + terrainHeight;\n vec4 vertexPos = vec4(aPosition.xy, height, 1.0);\n gl_Position = czm_modelViewProjection * vertexPos;\n vTexCoord = aTexCoord;\n}",_0x510f99=(_0x17c529=!0,function(e,t){var i=_0x17c529?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17c529=!1,i}),_0xbe76f8=_0x510f99(void 0,(function(){return _0xbe76f8.toString().search("(((.+)+)+)+$").toString().constructor(_0xbe76f8).search("(((.+)+)+)+$")})),_0x17c529;_0xbe76f8();var ModifyRegionSideFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uHeightTexture;\nuniform sampler2D uColorTexture;\n\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\nuniform vec4 uGeoBounds;\nuniform vec4 uHypRect;\nvarying vec2 vTexcoord;\nvarying float fHeight;\nvarying float height;\nvarying float regionHeight;\n#ifdef Excavation\nvarying vec2 vTexcoord1;\n#endif\n\nfloat computeMixCon(float height)\n{\n\tfloat distanceToContour = mod(height - 0.0002, uHypContourInterval);\n\tfloat dxc = abs(dFdx(height));\n\tfloat dyc = abs(dFdy(height));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float height)\n{\n\tfloat threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat contourRate = (height - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tvec2 contourCoord = vec2(0.0, finalCoord);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvoid main()\n{\nczm_writeDepthClampedToFarPlane();\n\tvec2 texcoord = vTexcoord;\n#ifdef Excavation\n\ttexcoord = vTexcoord1;\n#endif\nfloat terrainHeight = max(czm_unpackValue(texture2D(uHeightTexture, vTexcoord)), 0.0);\nif(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n}\n#ifndef Excavation\n if(regionHeight > terrainHeight)\n {\n if(height > regionHeight|| height < terrainHeight - 500.0)\n {\n discard;\n }\n }\n else\n {\n if(height > terrainHeight || height < regionHeight - 500.0)\n {\n discard;\n }\n }\n#else\n if(height > terrainHeight || height < regionHeight)\n {\n discard;\n }\n#endif\n\tgl_FragColor = vec4(texture2D(uColorTexture, texcoord).rgb, 1.0);\n\tif(uHypHasColorTable > 0.1)\n {\n float bNext = 1.0;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexcoord.xy;\n polyTexCoord.x = polyTexCoord.x * (uGeoBounds.z - uGeoBounds.x) + uGeoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uGeoBounds.w - uGeoBounds.y) + uGeoBounds.y;\n if(polyTexCoord.x>uHypRect.x && polyTexCoord.x<uHypRect.z && polyTexCoord.y> uHypRect.y&& polyTexCoord.y < uHypRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uHypRect.x, uHypRect.w);\n polyTexCoord.x = polyTexCoord.x / (uHypRect.z - uHypRect.x);\n polyTexCoord.y = 1.0 - polyTexCoord.y / (uHypRect.y - uHypRect.w);\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n bNext = 0.0;\n }\n }\n else\n {\n bNext = 0.0;\n }\n }\n if(bNext > 0.2)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(fHeight <= uHypMaxVisibleValue && fHeight >= uHypMinVisibleValue)\n {\n#ifdef GL_OES_standard_derivatives\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fHeight);\n contourMapColor = mix(computeContourMapColor(fHeight), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fHeight);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fHeight);\n }\n else\n {\n finalOpacity = 0.0;\n }\n }\n else\n {\n finalOpacity = 0.5;\n }\n gl_FragColor = mix(gl_FragColor, contourMapColor, finalOpacity);\n }\n }\n}",_0x1813bd=(_0x29c6a2=!0,function(e,t){var i=_0x29c6a2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29c6a2=!1,i}),_0x1b9e3=_0x1813bd(void 0,(function(){return _0x1b9e3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b9e3).search("(((.+)+)+)+$")})),_0x29c6a2;_0x1b9e3();var ModifyRegionSideVp="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n\nuniform sampler2D uTexture0;\nvarying vec2 vTexcoord;\nvarying float fHeight;\nvarying float height;\nvarying float regionHeight;\n#ifdef Excavation\nvarying vec2 vTexcoord1;\n#endif\n\nvoid main()\n{\n\tvTexcoord = aTexCoord0.xy;\n#ifdef Excavation\n\tvTexcoord1 = aTexCoord1.xy;\n#endif\n\tgl_Position = czm_depthClampFarPlane(czm_modelViewProjection * vec4(aPosition.xyz, 1.0));\n\theight = aPosition.w;\n\tregionHeight = aTexCoord0.z;\n}",_0x1e14b7=(_0x273b5e=!0,function(e,t){var i=_0x273b5e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x273b5e=!1,i}),_0x34cef4=_0x1e14b7(void 0,(function(){return _0x34cef4.toString().search("(((.+)+)+)+$").toString().constructor(_0x34cef4).search("(((.+)+)+)+$")})),_0x273b5e;_0x34cef4();var S3MTilesBillboardVp="attribute vec3 aPosition; \n \nattribute vec3 aNormal; \n \nattribute vec4 aTexCoord0; \n \nattribute vec4 aTexCoord1; \n \n#ifdef VertexColor \nattribute vec4 aColor; \n#endif \n#ifdef BatchTable \nattribute float batchId; \n#endif \n \nvarying vec4 vColor; \nvarying float fVertexColor; \nvarying vec4 vSecondColor; \nvarying vec4 vAmbientColor; \nvarying vec2 vTexCoord; \nvarying vec2 vSecondTexCoord; \nvarying vec4 clip_vertex; \n \nuniform vec4 uDiffuseColor; \nuniform vec4 uAmbientColor; \n \nvoid main() \n{ \n vTexCoord = aTexCoord0.xy; \n vSecondTexCoord = aTexCoord1.xy; \n\tvec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n vertexColor = aColor; \n#endif \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n vec4 operationType = czm_batchTable_operation(batchId); \n vec4 objsColor = czm_batchTable_color(batchId); \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor); \n#endif \n vColor = vertexColor * uDiffuseColor; \n fVertexColor = vertexColor.a; \n vec4 viewPos = czm_modelView * vec4(aPosition, 1.0); \n viewPos.xyz = viewPos.xyz + aNormal; \n clip_vertex = viewPos; \n gl_Position = czm_projection * viewPos; \n vAmbientColor = uAmbientColor; \n}",_0x592b8c=(_0x2e795b=!0,function(e,t){var i=_0x2e795b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e795b=!1,i}),_0x29da08=_0x592b8c(void 0,(function(){return _0x29da08.toString().search("(((.+)+)+)+$").toString().constructor(_0x29da08).search("(((.+)+)+)+$")})),_0x2e795b;_0x29da08();var S3MVoxelGridFp="#extension GL_EXT_draw_buffers : enable\nvarying vec4 vColor;\nvarying vec4 vPosition;\nvarying vec4 vPositionMC;\nvarying float v_pixelDistance;\nvoid main()\n{\n#ifdef CLIP\n czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n vec4 color = vColor;\n float distanceToCenter = length(gl_PointCoord - vec2(0.5));\n float maxDistance = max(0.0, 0.5 - v_pixelDistance);\n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n color.a *= wholeAlpha;\n\tcolor = czm_gammaCorrect(color);\n#ifdef EXCAVATION\n if(czm_executeExcavation())\n {\n discard;\n }\n#endif\n#ifdef OIT\n vec3 Ci = color.rgb * color.a;\n float ai = color.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n#else\n gl_FragColor = color;\n#endif\n}",_0x2cb9d6=(_0x3e721b=!0,function(e,t){var i=_0x3e721b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3e721b=!1,i}),_0x466cb8=_0x2cb9d6(void 0,(function(){return _0x466cb8.toString().search("(((.+)+)+)+$").toString().constructor(_0x466cb8).search("(((.+)+)+)+$")})),_0x3e721b;_0x466cb8();var S3MVoxelGridVp="attribute vec4 aPosition;\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n#endif\nattribute vec4 aColor;\nvarying float v_pixelDistance;\nvarying vec4 vPosition;\nuniform mat4 uGeoMatrix;\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\n#ifdef HYPSOMETRIC\n uniform sampler2D uHypsometricTexture;\n uniform float uHypOpacity;\n uniform float uHypContourFillMode;\n uniform float uHypFloor;\n uniform float uHypCeil;\n uniform float uHypMaxVisibleValue;\n uniform float uHypMinVisibleValue;\n uniform vec4 uNoValueColor;\n#endif\n uniform float uPointCloudSize;\n uniform vec4 uFillForeColor;\n varying vec4 vColor;\n varying vec4 vPositionMC;\n#ifdef HYPSOMETRIC\nvec4 computeContourMapColor(float fValue)\n{\n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n float contourRate = (fValue - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n float count = floor(finalCoord * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 contourCoord = vec2(x, y);\n return texture2D(uHypsometricTexture, contourCoord).rgba;\n}\nvec4 getHypsometricColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n contourMapColor = computeContourMapColor(fValue);\n finalOpacity *= sign(uHypContourFillMode);\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n return mixColor;\n}\n#endif\n\nfloat getGlobeDepth(vec4 positionEC)\n{\n vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n if (globeDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n\nvoid main()\n{\n vec4 vertexPos = aPosition;\n vertexPos.w = 1.0;\n vPositionMC.xyz = vertexPos.xyz;\n vPositionMC.w = 0.0;\n vColor = aColor;\n float wValue = aTexCoord0.x;\n gl_Position = czm_modelViewProjection * vertexPos;\n#ifdef HYPSOMETRIC\n if(wValue > uHypMaxVisibleValue || wValue < uHypMinVisibleValue)\n {\n gl_Position = czm_projection * vec4(0.0, 0.0, 0.0, 1.0);\n }\n vColor = getHypsometricColor(vColor, wValue);\n#endif\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n vColor *= uFillForeColor;\n vPosition = czm_modelView * vertexPos;\n float depthsilon = 10.0;\n float globeDepth = getGlobeDepth(vPosition);\n if (globeDepth != 0.0 && vPosition.z + depthsilon < globeDepth)\n {\n gl_Position = czm_projection * vec4(0.0, 0.0, 0.0, 1.0);\n }\n float mpp = czm_metersPerPixel(vPosition);\n float pointSize = uPointCloudSize / mpp;\n v_pixelDistance = 2.0 / pointSize;\n gl_PointSize = pointSize;\n}",_0x6723e0=(_0x5678b7=!0,function(e,t){var i=_0x5678b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5678b7=!1,i}),_0x44f935=_0x6723e0(void 0,(function(){return _0x44f935.toString().search("(((.+)+)+)+$").toString().constructor(_0x44f935).search("(((.+)+)+)+$")})),_0x5678b7;_0x44f935();var SightlineAnalysisFp="uniform sampler2D uTexture0;\nuniform vec4 uVisibleColor;\nuniform vec4 uHiddenColor;\n\nvarying vec4 renderTextureCoord;\nvarying float texcoordX;\nvarying vec4 vPositionEC;void main()\n{\n vec4 resultColor = vec4(uVisibleColor.rgb, 1.0);\n vec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n float depth = texCoord.z * 0.5 + 0.5;\n // float depthBias = 0.0005 * max(-vPositionEC.z * 0.01, 1.0);\n // depth -= depthBias;\n texCoord.xy = texCoord.xy * 0.5 + 0.5;\n if(abs(texcoordX - 1.0) < 0.0001)\n {\n\t\tfloat z_window = czm_unpackDepth(texture2D(uTexture0, texCoord.xy));\n\t\tif(z_window < depth && z_window > 0.0 && z_window < 1.0)\n\t\t{\n\t\t\tresultColor = vec4(uHiddenColor.rgb, 1.0);\n\t\t}\n }\n else\n {\n\t\tresultColor = vec4(0.4, 0.4, 0.4, 1.0);\n }\n gl_FragColor = resultColor;\n}";const _0x5599d7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x252f02=_0x5599d7(void 0,(function(){return _0x252f02.toString().search("(((.+)+)+)+$").toString().constructor(_0x252f02).search("(((.+)+)+)+$")}));function _0x3c3817(e){var t=_0x3e2f69.call(this)||this;t._layer=e,t._name=_0x27131a.Polyline,this._initUniformMap()}_0x252f02(),_0x3e2f69&&(_0x3c3817.__proto__=_0x3e2f69),_0x3c3817.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x3c3817.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x3c3817.prototype,{}),_0x3c3817.prototype._initUBOStruct=function(){const e=this._ubo;e.addUniform("uForeColor",4),e.addUniform("uBackColor",4),e.addUniform("uRotationAngle",1),e.addUniform("uType",1),e.addUniform("uLineWidthX",1),e.addUniform("uLineWidthY",1),e.addUniform("uRepeatX",1),e.addUniform("uRepeatY",1),e.addUniform("uOffsetX",1),e.addUniform("uOffsetY",1)},_0x3c3817.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),this._initUBOStruct(),this._ubo.create()},_0x3c3817.prototype.update=function(e){if(!e.webgpu&&!e.webgl2)return;e$2b(this._ubo)||this._initUBO(e);const t=this._layer,i=this._ubo,n=t._effect;i.updateDirectColor4("uForeColor",n._foreColor),i.updateDirectColor4("uBackColor",n._backColor),i.updateFloat("uRotationAngle",n._rotationAngle),i.updateFloat("uType",n._type),i.updateFloat("uLineWidthX",n._lineWidthX),i.updateFloat("uLineWidthY",n._lineWidthY),i.updateFloat("uRepeatX",n._repeatX),i.updateFloat("uRepeatY",n._repeatY),i.updateFloat("uOffsetX",n._offsetX),i.updateFloat("uOffsetY",n._offsetY),i.update()},_0x3c3817.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x3c3817.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x3c3817.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(t.webgl2||t.webgpu)return;const i=e._effect;var n={uForeColor:function(){return i._foreColor},uBackColor:function(){return i._backColor},uRotationAngle:function(){return i._rotationAngle},uType:function(){return i._type},uLineWidthX:function(){return i._lineWidthX},uLineWidthY:function(){return i._lineWidthY},uRepeatX:function(){return i._repeatX},uRepeatY:function(){return i._repeatY},uOffsetX:function(){return i._offsetX},uOffsetY:function(){return i._offsetY}};this._uniformMap=n},_0x3c3817.prototype.isDestroyed=function(){return!1},_0x3c3817.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};var RasterLayerUboDecl="\n uniform RasterLayer {\n \n };\n",N$1="http://www.w3.org/2000/svg",O$2="http://www.w3.org/1999/xlink",w,x$2=e$1U.fromCssColorString("rgba(247,250,255,0.384)"),E$1=e$1U.fromCssColorString("rgba(143,191,255,0.216)"),M$2=e$1U.fromCssColorString("rgba(153,197,255,0.098)"),k$2=e$1U.fromCssColorString("rgba(255,255,255,0.086)"),K=e$1U.fromCssColorString("rgba(255,255,255,0.267)"),X$1=e$1U.fromCssColorString("rgba(255,255,255,0)"),F$1=e$1U.fromCssColorString("rgba(66,67,68,0.3)"),W$2=e$1U.fromCssColorString("rgba(0,0,0,0.5)");function b$3(e){return e$1U.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}function c$4(e){var t=document.createElementNS(N$1,e.tagName);for(var i in e)if(e.hasOwnProperty(i)&&"tagName"!==i)if("children"===i){var n,r=e.children.length;for(n=0;n<r;++n)t.appendChild(c$4(e.children[n]))}else 0===i.indexOf("xlink:")?t.setAttributeNS(O$2,i.substring(6),e[i]):"textContent"===i?t.textContent=e[i]:t.setAttribute(i,e[i]);return t}function B(e,t,i){var n=document.createElementNS(N$1,"text");n.setAttribute("x",e),n.setAttribute("y",t),n.setAttribute("class","supermap3d-animation-svgText");var r=document.createElementNS(N$1,"tspan");return r.textContent=i,n.appendChild(r),n}function q$1(e,t,i){e.setAttribute("transform","translate(100,100) rotate("+i+")"),t.setAttribute("transform","rotate("+i+")")}var R$2=new e$1U;function i$6(e,t){var i=t.alpha,n=1-i;return R$2.red=e.red*n+t.red*i,R$2.green=e.green*n+t.green*i,R$2.blue=e.blue*n+t.blue*i,R$2.toCssColorString()}function z$1(e,t,i){return c$4({tagName:"g",class:"supermap3d-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"rect",class:"supermap3d-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect",class:"supermap3d-animation-buttonMain",width:32,height:32,rx:4,ry:4},{tagName:"use",class:"supermap3d-animation-buttonPath","xlink:href":i},{tagName:"title",textContent:""}]})}function J(e,t,i){return c$4({tagName:"g",class:"supermap3d-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"use",class:"supermap3d-animation-buttonGlow","xlink:href":"#animation_pathWingButton"},{tagName:"use",class:"supermap3d-animation-buttonMain","xlink:href":"#animation_pathWingButton"},{tagName:"use",class:"supermap3d-animation-buttonPath","xlink:href":i},{tagName:"title",textContent:""}]})}function Q$2(e,t){var i=e._viewModel,n=i.shuttleRingDragging;if(!n||w===e)if("mousedown"===t.type||n&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||n&&"touchmove"===t.type&&1===t.touches.length){var r,o,a=e._centerX,s=e._centerY,l=e._svgNode.getBoundingClientRect();if("touchstart"===t.type||"touchmove"===t.type?(r=t.touches[0].clientX,o=t.touches[0].clientY):(r=t.clientX,o=t.clientY),!n&&(r>l.right||r<l.left||o<l.top||o>l.bottom))return;var u=e._shuttleRingPointer.getBoundingClientRect(),c=r-a-l.left,h=o-s-l.top,d=180*Math.atan2(h,c)/Math.PI+90;d>180&&(d-=360);var f=i.shuttleRingAngle;n||r<u.right&&r>u.left&&o>u.top&&o<u.bottom?(w=e,i.shuttleRingDragging=!0,i.shuttleRingAngle=d):d<f?i.slower():d>f&&i.faster(),t.preventDefault()}else e===w&&(w=void 0),i.shuttleRingDragging=!1}function f$4(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;var i=this;this._clickFunction=function(){var e=i._viewModel.command;e.canExecute&&e()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[c$5(t,"toggled",this.setToggled,this),c$5(t,"tooltip",this.setTooltip,this),c$5(t.command,"canExecute",this.setEnabled,this)]}function y$4(e,t){if(!e$2b(e))throw new t$16("container is required.");if(!e$2b(t))throw new t$16("viewModel is required.");e=i$c(e),this._viewModel=t,this._container=e,this._centerX=0,this._centerY=0,this._defsElement=void 0,this._svgNode=void 0,this._topG=void 0,this._lastHeight=void 0,this._lastWidth=void 0;var i=document.createElement("style");i.textContent=".supermap3d-animation-rectButton .supermap3d-animation-buttonGlow { filter: url(#animation_blurred); }.supermap3d-animation-rectButton .supermap3d-animation-buttonMain { fill: url(#animation_buttonNormal); }.supermap3d-animation-buttonToggled .supermap3d-animation-buttonMain { fill: url(#animation_buttonToggled); }.supermap3d-animation-rectButton:hover .supermap3d-animation-buttonMain { fill: url(#animation_buttonHovered); }.supermap3d-animation-buttonDisabled .supermap3d-animation-buttonMain { fill: url(#animation_buttonDisabled); }.supermap3d-animation-shuttleRingG .supermap3d-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.supermap3d-animation-shuttleRingG:hover .supermap3d-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.supermap3d-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.supermap3d-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.supermap3d-animation-knobOuter { fill: url(#animation_knobOuter); }.supermap3d-animation-knobInner { fill: url(#animation_knobInner); }",document.head.insertBefore(i,document.head.childNodes[0]);var n=document.createElement("div");n.className="supermap3d-animation-theme",n.innerHTML='<div class="supermap3d-animation-themeNormal"></div><div class="supermap3d-animation-themeHover"></div><div class="supermap3d-animation-themeSelect"></div><div class="supermap3d-animation-themeDisabled"></div><div class="supermap3d-animation-themeKnob"></div><div class="supermap3d-animation-themePointer"></div><div class="supermap3d-animation-themeSwoosh"></div><div class="supermap3d-animation-themeSwooshHover"></div>',this._theme=n,this._themeNormal=n.childNodes[0],this._themeHover=n.childNodes[1],this._themeSelect=n.childNodes[2],this._themeDisabled=n.childNodes[3],this._themeKnob=n.childNodes[4],this._themePointer=n.childNodes[5],this._themeSwoosh=n.childNodes[6],this._themeSwooshHover=n.childNodes[7];var r=document.createElementNS(N$1,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",O$2);var o=document.createElementNS(N$1,"g");this._topG=o,this._realtimeSVG=new f$4(J(3,4,"#animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new f$4(z$1(44,99,"#animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new f$4(z$1(124,99,"#animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new f$4(z$1(84,99,"#animation_pathPause"),t.pauseViewModel);var a=document.createElementNS(N$1,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);var s=c$4({tagName:"circle",class:"supermap3d-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=s;var l=c$4({tagName:"g",class:"supermap3d-animation-shuttleRingSwoosh",children:[{tagName:"use",transform:"translate(100,97) scale(-1,1)","xlink:href":"#animation_pathSwooshFX"},{tagName:"use",transform:"translate(100,97)","xlink:href":"#animation_pathSwooshFX"},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=l,this._shuttleRingPointer=c$4({tagName:"use",class:"supermap3d-animation-shuttleRingPointer","xlink:href":"#animation_pathPointer"});var u=c$4({tagName:"g",transform:"translate(100,100)"});this._knobOuter=c$4({tagName:"circle",class:"supermap3d-animation-knobOuter",cx:0,cy:0,r:71});var c=c$4({tagName:"circle",class:"supermap3d-animation-knobInner",cx:0,cy:0,r:61});this._knobDate=B(0,-24,""),this._knobTime=B(0,-7,""),this._knobStatus=B(0,-41,"");var h=c$4({tagName:"circle",class:"supermap3d-animation-blank",cx:0,cy:0,r:61}),d=document.createElementNS(N$1,"g");d.setAttribute("class","supermap3d-animation-shuttleRingG"),e.appendChild(n),o.appendChild(d),o.appendChild(u),o.appendChild(a),d.appendChild(s),d.appendChild(l),d.appendChild(this._shuttleRingPointer),u.appendChild(this._knobOuter),u.appendChild(c),u.appendChild(this._knobDate),u.appendChild(this._knobTime),u.appendChild(this._knobStatus),u.appendChild(h),r.appendChild(o),e.appendChild(r);var f=this;function p(e){Q$2(f,e)}this._mouseCallback=p,s.addEventListener("mousedown",p,!0),s.addEventListener("touchstart",p,!0),l.addEventListener("mousedown",p,!0),l.addEventListener("touchstart",p,!0),document.addEventListener("mousemove",p,!0),document.addEventListener("touchmove",p,!0),document.addEventListener("mouseup",p,!0),document.addEventListener("touchend",p,!0),document.addEventListener("touchcancel",p,!0),this._shuttleRingPointer.addEventListener("mousedown",p,!0),this._shuttleRingPointer.addEventListener("touchstart",p,!0),this._knobOuter.addEventListener("mousedown",p,!0),this._knobOuter.addEventListener("touchstart",p,!0);var _,m=this._knobTime.childNodes[0],g=this._knobDate.childNodes[0],x=this._knobStatus.childNodes[0];this._subscriptions=[c$5(t.pauseViewModel,"toggled",(function(e){_!==e&&((_=e)?f._shuttleRingPointer.setAttribute("class","supermap3d-animation-shuttleRingPausePointer"):f._shuttleRingPointer.setAttribute("class","supermap3d-animation-shuttleRingPointer"))})),c$5(t,"shuttleRingAngle",(function(e){q$1(f._shuttleRingPointer,f._knobOuter,e)})),c$5(t,"dateLabel",(function(e){g.textContent!==e&&(g.textContent=e)})),c$5(t,"timeLabel",(function(e){m.textContent!==e&&(m.textContent=e)})),c$5(t,"multiplierLabel",(function(e){x.textContent!==e&&(x.textContent=e)}))],this.applyThemeChanges(),this.resize()}f$4.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);for(var e=this._subscriptions,t=0,i=e.length;t<i;t++)e[t].dispose();i$10(this)},f$4.prototype.isDestroyed=function(){return!1},f$4.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e)return void this.svgElement.setAttribute("class","supermap3d-animation-buttonDisabled");if(this._toggled)return void this.svgElement.setAttribute("class","supermap3d-animation-rectButton supermap3d-animation-buttonToggled");this.svgElement.setAttribute("class","supermap3d-animation-rectButton")}},f$4.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","supermap3d-animation-rectButton supermap3d-animation-buttonToggled"):this.svgElement.setAttribute("class","supermap3d-animation-rectButton")))},f$4.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e},Object.defineProperties(y$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),y$4.prototype.isDestroyed=function(){return!1},y$4.prototype.destroy=function(){e$2b(this._observer)&&(this._observer.disconnect(),this._observer=void 0);var e=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",e,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",e,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",e,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",e,!0),document.removeEventListener("mousemove",e,!0),document.removeEventListener("touchmove",e,!0),document.removeEventListener("mouseup",e,!0),document.removeEventListener("touchend",e,!0),document.removeEventListener("touchcancel",e,!0),this._shuttleRingPointer.removeEventListener("mousedown",e,!0),this._shuttleRingPointer.removeEventListener("touchstart",e,!0),this._knobOuter.removeEventListener("mousedown",e,!0),this._knobOuter.removeEventListener("touchstart",e,!0),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();for(var t=this._subscriptions,i=0,n=t.length;i<n;i++)t[i].dispose();return i$10(this)},y$4.prototype.resize=function(){var e=this._container.clientWidth,t=this._container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){var i=this._svgNode,n=200,r=132,o=e,a=t;0===e&&0===t?(o=n,a=r):0===e?(a=t,o=n*(t/r)):0===t&&(o=e,a=r*(e/n));var s=o/n,l=a/r;i.style.cssText="width: "+o+"px; height: "+a+"px; position: absolute; bottom: 0; left: 0; overflow: hidden;",i.setAttribute("width",o),i.setAttribute("height",a),i.setAttribute("viewBox","0 0 "+o+" "+a),this._topG.setAttribute("transform","scale("+s+","+l+")"),this._centerX=Math.max(1,100*s),this._centerY=Math.max(1,100*l),this._lastHeight=e,this._lastWidth=t}},y$4.prototype.applyThemeChanges=function(){if(!document.body.contains(this._container)){if(e$2b(this._observer))return;var e=this;return e._observer=new MutationObserver((function(){document.body.contains(e._container)&&(e._observer.disconnect(),e._observer=void 0,e.applyThemeChanges())})),void e._observer.observe(document,{childList:!0,subtree:!0})}var t=b$3(this._themeNormal),i=b$3(this._themeHover),n=b$3(this._themeSelect),r=b$3(this._themeDisabled),o=b$3(this._themeKnob),a=b$3(this._themePointer),s=b$3(this._themeSwoosh),l=b$3(this._themeSwooshHover),u=c$4({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(t,x$2)},{tagName:"stop",offset:"12%","stop-color":i$6(t,E$1)},{tagName:"stop",offset:"46%","stop-color":i$6(t,M$2)},{tagName:"stop",offset:"81%","stop-color":i$6(t,k$2)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(i,x$2)},{tagName:"stop",offset:"12%","stop-color":i$6(i,E$1)},{tagName:"stop",offset:"46%","stop-color":i$6(i,M$2)},{tagName:"stop",offset:"81%","stop-color":i$6(i,k$2)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(n,x$2)},{tagName:"stop",offset:"12%","stop-color":i$6(n,E$1)},{tagName:"stop",offset:"46%","stop-color":i$6(n,M$2)},{tagName:"stop",offset:"81%","stop-color":i$6(n,k$2)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(r,K)},{tagName:"stop",offset:"75%","stop-color":i$6(r,X$1)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,in:"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":s.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":l.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":i$6(a,W$2)},{tagName:"stop",offset:"100%","stop-color":i$6(a,W$2)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":i$6(o,x$2)},{tagName:"stop",offset:"60%","stop-color":i$6(o,F$1)},{tagName:"stop",offset:"85%","stop-color":i$6(o,E$1)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":i$6(o,F$1)},{tagName:"stop",offset:"60%","stop-color":i$6(o,x$2)},{tagName:"stop",offset:"85%","stop-color":i$6(o,k$2)}]},{id:"animation_pathReset",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},{id:"animation_pathPause",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},{id:"animation_pathPlay",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},{id:"animation_pathPlayReverse",tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},{id:"animation_pathLoop",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},{id:"animation_pathClock",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},{id:"animation_pathWingButton",tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},{id:"animation_pathPointer",tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},{id:"animation_pathSwooshFX",tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}]});e$2b(this._defsElement)?this._svgNode.replaceChild(u,this._defsElement):this._svgNode.appendChild(u),this._defsElement=u};var F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],f$3=15,_$2=105;function R$1(e,t){return e-t}function y$3(e,t){var i=a$17(t,e,R$1);return i<0?~i:i}function b$2(e,t){if(Math.abs(e)<=f$3)return e/f$3;var i,n=f$3,r=_$2;return e>0?(i=(Math.log(t[t.length-1])-0)/(r-n),Math.exp(0+i*(e-n))):(i=(Math.log(-t[0])-0)/(r-n),-Math.exp(0+i*(Math.abs(e)-n)))}function C$2(e,t,i){if(i.clockStep===g$Q.SYSTEM_CLOCK)return f$3;if(Math.abs(e)<=1)return e*f$3;var n=t[t.length-1];e>n?e=n:e<-n&&(e=-n);var r,o=f$3,a=_$2;return e>0?(r=(Math.log(n)-0)/(a-o),(Math.log(e)-0)/r+o):(r=(Math.log(-t[0])-0)/(a-o),-((Math.log(Math.abs(e))-0)/r+o))}function m$5(e){if(!e$2b(e))throw new t$16("clockViewModel is required.");var t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=m$5.defaultDateFormatter,this._timeFormatter=m$5.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,ce$1.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(m$5.defaultTicks),this.timeLabel=void 0,ce$1.defineProperty(this,"timeLabel",(function(){return t._timeFormatter(t._clockViewModel.currentTime,t)})),this.dateLabel=void 0,ce$1.defineProperty(this,"dateLabel",(function(){return t._dateFormatter(t._clockViewModel.currentTime,t)})),this.multiplierLabel=void 0,ce$1.defineProperty(this,"multiplierLabel",(function(){var e=t._clockViewModel;if(e.clockStep===g$Q.SYSTEM_CLOCK)return"Today";var i=e.multiplier;return i%1==0?i.toFixed(0)+"x":i.toFixed(3).replace(/0{0,3}$/,"")+"x"})),this.shuttleRingAngle=void 0,ce$1.defineProperty(this,"shuttleRingAngle",{get:function(){return C$2(e.multiplier,t._allShuttleRingTicks,e)},set:function(e){e=Math.max(Math.min(e,_$2),-_$2);var i=t._allShuttleRingTicks,n=t._clockViewModel;if(n.clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER,Math.abs(e)!==_$2){var r=b$2(e,i);if(t.snapToTicks)r=i[y$3(r,i)];else if(0!==r){var o=Math.abs(r);if(o>100){var a=o.toFixed(0).length-2,s=Math.pow(10,a);r=Math.round(r/s)*s|0}else o>f$3?r=Math.round(r):o>1?r=+r.toFixed(1):o>0&&(r=+r.toFixed(2))}n.multiplier=r}else n.multiplier=e>0?i[i.length-1]:i[0]}}),this._canAnimate=void 0,ce$1.defineProperty(this,"_canAnimate",(function(){var e=t._clockViewModel,i=e.clockRange;if(t.shuttleRingDragging||i===tt$9.UNBOUNDED)return!0;var n=e.multiplier,r=e.currentTime,o=e.startTime,a=!1;if(i===tt$9.LOOP_STOP)a=a$15.greaterThan(r,o)||r.equals(o)&&n>0;else{var s=e.stopTime;a=a$15.greaterThan(r,o)&&a$15.lessThan(r,s)||r.equals(o)&&n>0||r.equals(s)&&n<0}return a||(e.shouldAnimate=!1),a})),this._isSystemTimeAvailable=void 0,ce$1.defineProperty(this,"_isSystemTimeAvailable",(function(){var e=t._clockViewModel;if(e.clockRange===tt$9.UNBOUNDED)return!0;var i=e.systemTime;return a$15.greaterThanOrEquals(i,e.startTime)&&a$15.lessThanOrEquals(i,e.stopTime)})),this._isAnimating=void 0,ce$1.defineProperty(this,"_isAnimating",(function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)}));var i=s$4((function(){var e=t._clockViewModel;e.shouldAnimate?e.shouldAnimate=!1:t._canAnimate&&(e.shouldAnimate=!0)}));this._pauseViewModel=new r$9(i,{toggled:ce$1.computed((function(){return!t._isAnimating})),tooltip:"Pause"});var n=s$4((function(){var e=t._clockViewModel,i=e.multiplier;i>0&&(e.multiplier=-i),e.shouldAnimate=!0}));this._playReverseViewModel=new r$9(n,{toggled:ce$1.computed((function(){return t._isAnimating&&e.multiplier<0})),tooltip:"Play Reverse"});var r=s$4((function(){var e=t._clockViewModel,i=e.multiplier;i<0&&(e.multiplier=-i),e.shouldAnimate=!0}));this._playForwardViewModel=new r$9(r,{toggled:ce$1.computed((function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==g$Q.SYSTEM_CLOCK})),tooltip:"Play Forward"});var o=s$4((function(){t._clockViewModel.clockStep=g$Q.SYSTEM_CLOCK}),ce$1.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new r$9(o,{toggled:ce$1.computed((function(){return e.clockStep===g$Q.SYSTEM_CLOCK})),tooltip:ce$1.computed((function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"}))}),this._slower=s$4((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,n=y$3(e.multiplier,i)-1;n>=0&&(e.multiplier=i[n])})),this._faster=s$4((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,n=y$3(e.multiplier,i)+1;n<i.length&&(e.multiplier=i[n])}))}function V(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).globe,i=u$_(e.imageryProviderViewModels,[]),n=u$_(e.terrainProviderViewModels,[]);if(!e$2b(t))throw new t$16("globe is required");this._globe=t,this.imageryProviderViewModels=i.slice(0),this.terrainProviderViewModels=n.slice(0),this.dropDownVisible=!1,ce$1.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);var r=ce$1.getObservable(this,"imageryProviderViewModels"),o=ce$1.pureComputed((function(){var e,t=r(),i={};for(e=0;e<t.length;e++){var n=t[e],o=n.category;e$2b(i[o])?i[o].push(n):i[o]=[n]}var a=Object.keys(i),s=[];for(e=0;e<a.length;e++){var l=a[e];s.push({name:l,providers:i[l]})}return s}));this._imageryProviders=o;var a=ce$1.getObservable(this,"terrainProviderViewModels"),s=ce$1.pureComputed((function(){var e,t=a(),i={};for(e=0;e<t.length;e++){var n=t[e],r=n.category;e$2b(i[r])?i[r].push(n):i[r]=[n]}var o=Object.keys(i),s=[];for(e=0;e<o.length;e++){var l=o[e];s.push({name:l,providers:i[l]})}return s}));this._terrainProviders=s,this.buttonTooltip=void 0,ce$1.defineProperty(this,"buttonTooltip",(function(){var e=this.selectedImagery,t=this.selectedTerrain,i=e$2b(e)?e.name:void 0,n=e$2b(t)?t.name:void 0;return e$2b(i)&&e$2b(n)?i+"\n"+n:e$2b(i)?i:n})),this.buttonImageUrl=void 0,ce$1.defineProperty(this,"buttonImageUrl",(function(){var e=this.selectedImagery;if(e$2b(e))return e.iconUrl})),this.selectedImagery=void 0;var l=ce$1.observable();this._currentImageryProviders=[],ce$1.defineProperty(this,"selectedImagery",{get:function(){return l()},set:function(e){if(l()!==e){var t,i=this._currentImageryProviders,n=i.length,r=this._globe.imageryLayers,o=!1;for(t=0;t<n;t++)for(var a=r.length,s=0;s<a;s++){var u=r.get(s);if(u.imageryProvider===i[t]){r.remove(u),o=!0;break}}if(e$2b(e)){var c=e.creationCommand();if(Array.isArray(c)){for(t=c.length-1;t>=0;t--)r.addImageryProvider(c[t],0);this._currentImageryProviders=c.slice(0)}else if(this._currentImageryProviders=[c],o)r.addImageryProvider(c,0);else{var h=r.get(0);e$2b(h)&&r.remove(h),r.addImageryProvider(c,0)}}l(e),this.dropDownVisible=!1}else this.dropDownVisible=!1}}),this.selectedTerrain=void 0;var u=ce$1.observable();ce$1.defineProperty(this,"selectedTerrain",{get:function(){return u()},set:function(e){var t;u()!==e?(e$2b(e)&&(t=e.creationCommand()),this._globe.depthTestAgainstTerrain=!(t instanceof t$A),this._globe.terrainProvider=t,u(e),this.dropDownVisible=!1):this.dropDownVisible=!1}});var c=this;this._toggleDropDown=s$4((function(){c.dropDownVisible=!c.dropDownVisible})),this.selectedImagery=u$_(e.selectedImageryProviderViewModel,i[0]),this.selectedTerrain=u$_(e.selectedTerrainProviderViewModel,n[0])}function g$3(e,t){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e);var i=new V(t),n=document.createElement("button");n.type="button",n.className="supermap3d-button supermap3d-toolbar-button",n.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(n);var r=document.createElement("img");r.setAttribute("draggable","false"),r.className="supermap3d-baseLayerPicker-selected",r.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),n.appendChild(r);var o=document.createElement("div");o.className="supermap3d-baseLayerPicker-dropDown",o.setAttribute("data-bind",'css: { "supermap3d-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(o);var a=document.createElement("div");a.className="supermap3d-baseLayerPicker-sectionTitle",a.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),a.innerHTML="Imagery",o.appendChild(a);var s=document.createElement("div");s.className="supermap3d-baseLayerPicker-section",s.setAttribute("data-bind","foreach: _imageryProviders"),o.appendChild(s);var l=document.createElement("div");l.className="supermap3d-baseLayerPicker-category",s.appendChild(l);var u=document.createElement("div");u.className="supermap3d-baseLayerPicker-categoryTitle",u.setAttribute("data-bind","text: name"),l.appendChild(u);var c=document.createElement("div");c.className="supermap3d-baseLayerPicker-choices",c.setAttribute("data-bind","foreach: providers"),l.appendChild(c);var h=document.createElement("div");h.className="supermap3d-baseLayerPicker-item",h.setAttribute("data-bind",'css: { "supermap3d-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),c.appendChild(h);var d=document.createElement("img");d.className="supermap3d-baseLayerPicker-itemIcon",d.setAttribute("data-bind","attr: { src: iconUrl }"),d.setAttribute("draggable","false"),h.appendChild(d);var f=document.createElement("div");f.className="supermap3d-baseLayerPicker-itemLabel",f.setAttribute("data-bind","text: name"),h.appendChild(f);var p=document.createElement("div");p.className="supermap3d-baseLayerPicker-sectionTitle",p.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),p.innerHTML="Terrain",o.appendChild(p);var _=document.createElement("div");_.className="supermap3d-baseLayerPicker-section",_.setAttribute("data-bind","foreach: _terrainProviders"),o.appendChild(_);var m=document.createElement("div");m.className="supermap3d-baseLayerPicker-category",_.appendChild(m);var g=document.createElement("div");g.className="supermap3d-baseLayerPicker-categoryTitle",g.setAttribute("data-bind","text: name"),m.appendChild(g);var x=document.createElement("div");x.className="supermap3d-baseLayerPicker-choices",x.setAttribute("data-bind","foreach: providers"),m.appendChild(x);var v=document.createElement("div");v.className="supermap3d-baseLayerPicker-item",v.setAttribute("data-bind",'css: { "supermap3d-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),x.appendChild(v);var y=document.createElement("img");y.className="supermap3d-baseLayerPicker-itemIcon",y.setAttribute("data-bind","attr: { src: iconUrl }"),y.setAttribute("draggable","false"),v.appendChild(y);var $=document.createElement("div");$.className="supermap3d-baseLayerPicker-itemLabel",$.setAttribute("data-bind","text: name"),v.appendChild($),ce$1.applyBindings(i,n),ce$1.applyBindings(i,o),this._viewModel=i,this._container=e,this._element=n,this._dropPanel=o,this._closeDropDown=function(e){n.contains(e.target)||o.contains(e.target)||(i.dropDownVisible=!1)},s$Y.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function i$5(e){if(!e$2b(e.name))throw new t$16("options.name is required.");if(!e$2b(e.tooltip))throw new t$16("options.tooltip is required.");if(!e$2b(e.iconUrl))throw new t$16("options.iconUrl is required.");if("function"!=typeof e.creationFunction)throw new t$16("options.creationFunction is required.");var t=e.creationFunction;e$2b(t.canExecute)||(t=s$4(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=u$_(e.category,""),ce$1.track(this,["name","tooltip","iconUrl"])}function m$4(){var e=[];return e.push(new i$5({name:"Bing Maps Aerial",iconUrl:n$15("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return o$j({style:n$e.AERIAL})}})),e.push(new i$5({name:"Bing Maps Aerial with Labels",iconUrl:n$15("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return o$j({style:n$e.AERIAL_WITH_LABELS})}})),e.push(new i$5({name:"Bing Maps Roads",iconUrl:n$15("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return o$j({style:n$e.ROAD})}})),e.push(new i$5({name:"Mapbox Satellite",tooltip:"Mapbox satellite imagery ",iconUrl:n$15("Widgets/Images/ImageryProviders/mapboxSatellite.png"),category:"Other",creationFunction:function(){return new m$g({mapId:"mapbox.satellite"})}})),e.push(new i$5({name:"Mapbox Streets",tooltip:"Mapbox streets imagery",iconUrl:n$15("Widgets/Images/ImageryProviders/mapboxTerrain.png"),category:"Other",creationFunction:function(){return new m$g({mapId:"mapbox.streets"})}})),e.push(new i$5({name:"Mapbox Streets Classic",tooltip:"Mapbox streets basic imagery",iconUrl:n$15("Widgets/Images/ImageryProviders/mapboxStreets.png"),category:"Other",creationFunction:function(){return new m$g({mapId:"mapbox.streets-basic"})}})),e.push(new i$5({name:"ESRI World Imagery",iconUrl:n$15("Widgets/Images/ImageryProviders/esriWorldImagery.png"),tooltip:"World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. The map includes NASA Blue Marble: Next Generation 500m resolution imagery at small scales (above 1:1,000,000), i-cubed 15m eSAT imagery at medium-to-large scales (down to 1:70,000) for the world, and USGS 15m Landsat imagery for Antarctica. The map features 0.3m resolution imagery in the continental United States and 0.6m resolution imagery in parts of Western Europe from DigitalGlobe. In other parts of the world, 1 meter resolution imagery is available from GeoEye IKONOS, i-cubed Nationwide Prime, Getmapping, AeroGRID, IGN Spain, and IGP Portugal. Additionally, imagery at different resolutions has been contributed by the GIS User Community.\n",category:"Other",creationFunction:function(){return new b$p({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",enablePickFeatures:!1})}})),e.push(new i$5({name:"ESRI World Street Map",iconUrl:n$15("Widgets/Images/ImageryProviders/esriWorldStreetMap.png"),tooltip:"This worldwide street map presents highway-level data for the world. Street-level data includes the United States; much of Canada; Japan; most countries in Europe; Australia and New Zealand; India; parts of South America including Argentina, Brazil, Chile, Colombia, and Venezuela; Ghana; and parts of southern Africa including Botswana, Lesotho, Namibia, South Africa, and Swaziland.\n",category:"Other",creationFunction:function(){return new b$p({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",enablePickFeatures:!1})}})),e.push(new i$5({name:"ESRI National Geographic",iconUrl:n$15("Widgets/Images/ImageryProviders/esriNationalGeographic.png"),tooltip:"This web map contains the National Geographic World Map service. This map service is designed to be used as a general reference map for informational and educational purposes as well as a basemap by GIS professionals and other users for creating web maps and web mapping applications.\n",category:"Other",creationFunction:function(){return new b$p({url:"https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/",enablePickFeatures:!1})}})),e.push(new i$5({name:"Open­Street­Map",iconUrl:n$15("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:"OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org",category:"Other",creationFunction:function(){return L$j({url:"https://a.tile.openstreetmap.org/"})}})),e.push(new i$5({name:"Stamen Watercolor",iconUrl:n$15("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:"Reminiscent of hand drawn maps, Stamen watercolor maps apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.\n",category:"Other",creationFunction:function(){return L$j({url:"https://stamen-tiles.a.ssl.fastly.net/watercolor/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new i$5({name:"Stamen Toner",iconUrl:n$15("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:"A high contrast black and white map.\n",category:"Other",creationFunction:function(){return L$j({url:"https://stamen-tiles.a.ssl.fastly.net/toner/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new i$5({name:"Sentinel-2",iconUrl:n$15("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"SuperMap3D ion",creationFunction:function(){return new o$k({assetId:3954})}})),e.push(new i$5({name:"Blue Marble",iconUrl:n$15("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"SuperMap3D ion",creationFunction:function(){return new o$k({assetId:3845})}})),e.push(new i$5({name:"Earth at night",iconUrl:n$15("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"SuperMap3D ion",creationFunction:function(){return new o$k({assetId:3812})}})),e.push(new i$5({name:"Natural Earth II",iconUrl:n$15("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\n",category:"SuperMap3D ion",creationFunction:function(){return te$5({url:n$15("Assets/Textures/NaturalEarthII")})}})),e}function n$3(){var e=[];return e.push(new i$5({name:"WGS84 Ellipsoid",iconUrl:n$15("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"SuperMap3D ion",creationFunction:function(){return new t$A}})),e.push(new i$5({name:"SuperMap3D World Terrain",iconUrl:n$15("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return u$H({requestWaterMask:!0,requestVertexNormals:!0})}})),e}function ne(e){return function(t){var i=e._scene.pick(t.position);e$2b(i)&&i.primitive instanceof p$u&&(e.tileset=i.primitive),e.pickActive=!1}}function Y$1(e,t){t?e._eventHandler.setInputAction((function(t){var i=e._scene.pick(t.endPosition);e$2b(i)&&i.primitive instanceof p$u&&(e.tileset=i.primitive)}),G$I.MOUSE_MOVE):(e._eventHandler.removeInputAction(G$I.MOUSE_MOVE),e.picking=e.picking)}m$5.defaultDateFormatter=function(e,t){var i=a$15.toGregorianDate(e);return F[i.month-1]+" "+i.day+" "+i.year},m$5.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800],m$5.defaultTimeFormatter=function(e,t){var i=a$15.toGregorianDate(e),n=Math.round(i.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?$$17("%02d:%02d:%02d.%03d",i.hour,i.minute,i.second,n):$$17("%02d:%02d:%02d UTC",i.hour,i.minute,i.second)},m$5.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)},m$5.prototype.setShuttleRingTicks=function(e){if(!e$2b(e))throw new t$16("positiveTicks is required.");var t,i,n,r={},o=this._sortedFilteredPositiveTicks;for(o.length=0,t=0,i=e.length;t<i;++t)n=e[t],r.hasOwnProperty(n)||(r[n]=!0,o.push(n));o.sort(R$1);var a=[];for(t=(i=o.length)-1;t>=0;--t)0!==(n=o[t])&&a.push(-n);Array.prototype.push.apply(a,o),this._allShuttleRingTicks=a},Object.defineProperties(m$5.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){if("function"!=typeof e)throw new t$16("dateFormatter must be a function");this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){if("function"!=typeof e)throw new t$16("timeFormatter must be a function");this._timeFormatter=e}}}),m$5._maxShuttleRingAngle=_$2,m$5._realtimeShuttleRingAngle=f$3,Object.defineProperties(V.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}}),Object.defineProperties(g$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),g$3.prototype.isDestroyed=function(){return!1},g$3.prototype.destroy=function(){return s$Y.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ce$1.cleanNode(this._element),ce$1.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),i$10(this)},Object.defineProperties(i$5.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var oe={maximumFractionDigits:3};function P$2(e){var t=e/1048576;return t<1?t.toLocaleString(void 0,oe):Math.round(t).toLocaleString()}function y$2(e,t){if(!e$2b(e))return"";var i=t?e._statisticsLastPick:e._statisticsLastRender,n='<ul class="supermap3d-cesiumInspector-statistics">';return n+="<li><strong>Visited: </strong>"+i.visited.toLocaleString()+"</li><li><strong>Selected: </strong>"+i.selected.toLocaleString()+"</li><li><strong>Commands: </strong>"+i.numberOfCommands.toLocaleString()+"</li>",n+="</ul>",t||(n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Requests: </strong>"+i.numberOfPendingRequests.toLocaleString()+"</li><li><strong>Attempted: </strong>"+i.numberOfAttemptedRequests.toLocaleString()+"</li><li><strong>Processing: </strong>"+i.numberOfTilesProcessing.toLocaleString()+"</li><li><strong>Content Ready: </strong>"+i.numberOfTilesWithContentReady.toLocaleString()+"</li><li><strong>Total: </strong>"+i.numberOfTilesTotal.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Features Selected: </strong>"+i.numberOfFeaturesSelected.toLocaleString()+"</li><li><strong>Features Loaded: </strong>"+i.numberOfFeaturesLoaded.toLocaleString()+"</li><li><strong>Points Selected: </strong>"+i.numberOfPointsSelected.toLocaleString()+"</li><li><strong>Points Loaded: </strong>"+i.numberOfPointsLoaded.toLocaleString()+"</li><li><strong>Triangles Selected: </strong>"+i.numberOfTrianglesSelected.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Tiles styled: </strong>"+i.numberOfTilesStyled.toLocaleString()+"</li><li><strong>Features styled: </strong>"+i.numberOfFeaturesStyled.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Children Union Culled: </strong>"+i.numberOfTilesCulledWithChildrenUnion.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Geometry Memory (MB): </strong>"+P$2(i.geometryByteLength)+"</li><li><strong>Texture Memory (MB): </strong>"+P$2(i.texturesByteLength)+"</li><li><strong>Batch Table Memory (MB): </strong>"+P$2(i.batchTableByteLength)+"</li>",n+="</ul>"),n}var le=[{text:"Highlight",value:L$I.HIGHLIGHT},{text:"Replace",value:L$I.REPLACE},{text:"Mix",value:L$I.MIX}],Z$2=new e$1U(1,1,0,.4),ce=new e$1U,v$2=new e$1U;function l$6(e,t){o$1q.typeOf.object("scene",e),o$1q.typeOf.object("performanceContainer",t);var i=this,n=e.canvas;this._eventHandler=new g$J(n),this._scene=e,this._performanceContainer=t,this._canvas=n,this._performanceDisplay=new o$c({container:t}),this._statisticsText="",this._pickStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this._tileset=void 0,this._feature=void 0,this._tile=void 0,ce$1.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_editorError","showPickStatistics","showStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile"]),this._properties=ce$1.observable({}),this.properties=[],ce$1.defineProperty(this,"properties",(function(){var e=[],t=i._properties();for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}));var r=ce$1.observable();ce$1.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return r()},set:function(e){r(e),e$2b(i._tileset)&&(i._tileset.dynamicScreenSpaceError=e)}}),this.dynamicScreenSpaceError=!1;var o=ce$1.observable();ce$1.defineProperty(this,"colorBlendMode",{get:function(){return o()},set:function(e){o(e),e$2b(i._tileset)&&(i._tileset.colorBlendMode=e,i._scene.requestRender())}}),this.colorBlendMode=L$I.HIGHLIGHT;var a=ce$1.observable();ce$1.defineProperty(this,"picking",{get:function(){return a()},set:function(t){a(t),t?i._eventHandler.setInputAction((function(t){var n=e.pick(t.endPosition);if(n instanceof e$L?(i.feature=n,i.tile=n.content.tile):e$2b(n)&&e$2b(n.content)?(i.feature=void 0,i.tile=n.content.tile):(i.feature=void 0,i.tile=void 0),e$2b(i._tileset)){var r;if(f&&e$2b(n)&&e$2b(n.content))e.pickPositionSupported&&(e$2b(r=e.pickPosition(t.endPosition))&&(i._tileset.debugPickPosition=r)),i._tileset.debugPickedTile=n.content.tile;else i._tileset.debugPickedTile=void 0;i._scene.requestRender()}}),G$I.MOUSE_MOVE):(i.feature=void 0,i.tile=void 0,i._eventHandler.removeInputAction(G$I.MOUSE_MOVE))}}),this.picking=!0;var s=ce$1.observable();ce$1.defineProperty(this,"colorize",{get:function(){return s()},set:function(e){s(e),e$2b(i._tileset)&&(i._tileset.debugColorizeTiles=e,i._scene.requestRender())}}),this.colorize=!1;var l=ce$1.observable();ce$1.defineProperty(this,"wireframe",{get:function(){return l()},set:function(e){l(e),e$2b(i._tileset)&&(i._tileset.debugWireframe=e,i._scene.requestRender())}}),this.wireframe=!1;var u=ce$1.observable();ce$1.defineProperty(this,"showBoundingVolumes",{get:function(){return u()},set:function(e){u(e),e$2b(i._tileset)&&(i._tileset.debugShowBoundingVolume=e,i._scene.requestRender())}}),this.showBoundingVolumes=!1;var c=ce$1.observable();ce$1.defineProperty(this,"showContentBoundingVolumes",{get:function(){return c()},set:function(e){c(e),e$2b(i._tileset)&&(i._tileset.debugShowContentBoundingVolume=e,i._scene.requestRender())}}),this.showContentBoundingVolumes=!1;var h=ce$1.observable();ce$1.defineProperty(this,"showRequestVolumes",{get:function(){return h()},set:function(e){h(e),e$2b(i._tileset)&&(i._tileset.debugShowViewerRequestVolume=e,i._scene.requestRender())}}),this.showRequestVolumes=!1;var d=ce$1.observable();ce$1.defineProperty(this,"freezeFrame",{get:function(){return d()},set:function(e){d(e),e$2b(i._tileset)&&(i._tileset.debugFreezeFrame=e,i._scene.debugShowFrustumPlanes=e,i._scene.requestRender())}}),this.freezeFrame=!1;var f=ce$1.observable();ce$1.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return f()},set:function(e){f(e),e$2b(i._tileset)&&(i._tileset.debugPickedTileLabelOnly=e,i._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;var p=ce$1.observable();ce$1.defineProperty(this,"showGeometricError",{get:function(){return p()},set:function(e){p(e),e$2b(i._tileset)&&(i._tileset.debugShowGeometricError=e,i._scene.requestRender())}}),this.showGeometricError=!1;var _=ce$1.observable();ce$1.defineProperty(this,"showRenderingStatistics",{get:function(){return _()},set:function(e){_(e),e$2b(i._tileset)&&(i._tileset.debugShowRenderingStatistics=e,i._scene.requestRender())}}),this.showRenderingStatistics=!1;var m=ce$1.observable();ce$1.defineProperty(this,"showMemoryUsage",{get:function(){return m()},set:function(e){m(e),e$2b(i._tileset)&&(i._tileset.debugShowMemoryUsage=e,i._scene.requestRender())}}),this.showMemoryUsage=!1;var g=ce$1.observable();ce$1.defineProperty(this,"showUrl",{get:function(){return g()},set:function(e){g(e),e$2b(i._tileset)&&(i._tileset.debugShowUrl=e,i._scene.requestRender())}}),this.showUrl=!1;var x=ce$1.observable();ce$1.defineProperty(this,"maximumScreenSpaceError",{get:function(){return x()},set:function(e){e=Number(e),isNaN(e)||(x(e),e$2b(i._tileset)&&(i._tileset.maximumScreenSpaceError=e))}}),this.maximumScreenSpaceError=16;var v=ce$1.observable();ce$1.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return v()},set:function(e){e=Number(e),isNaN(e)||(v(e),e$2b(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorDensity=e))}}),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,ce$1.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(v(),1/6)},set:function(e){v(Math.pow(e,6))}});var y=ce$1.observable();ce$1.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return y()},set:function(e){e=Number(e),isNaN(e)||(y(e),e$2b(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorFactor=e))}}),this.dynamicScreenSpaceErrorFactor=4;var $=ne(this),b=ce$1.observable();ce$1.defineProperty(this,"pickActive",{get:function(){return b()},set:function(e){b(e),e?i._eventHandler.setInputAction($,G$I.LEFT_CLICK):i._eventHandler.removeInputAction(G$I.LEFT_CLICK)}});var T=ce$1.observable();ce$1.defineProperty(this,"pointCloudShading",{get:function(){return T()},set:function(e){T(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.attenuation=e)}}),this.pointCloudShading=!1;var C=ce$1.observable();ce$1.defineProperty(this,"geometricErrorScale",{get:function(){return C()},set:function(e){e=Number(e),isNaN(e)||(C(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.geometricErrorScale=e))}}),this.geometricErrorScale=1;var S=ce$1.observable();ce$1.defineProperty(this,"maximumAttenuation",{get:function(){return S()},set:function(e){e=Number(e),isNaN(e)||(S(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.maximumAttenuation=0===e?void 0:e))}}),this.maximumAttenuation=0;var w=ce$1.observable();ce$1.defineProperty(this,"baseResolution",{get:function(){return w()},set:function(e){e=Number(e),isNaN(e)||(w(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.baseResolution=0===e?void 0:e))}}),this.baseResolution=0;var E=ce$1.observable();ce$1.defineProperty(this,"eyeDomeLighting",{get:function(){return E()},set:function(e){E(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLighting=e)}}),this.eyeDomeLighting=!1;var P=ce$1.observable();ce$1.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return P()},set:function(e){e=Number(e),isNaN(e)||(P(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingStrength=e))}}),this.eyeDomeLightingStrength=1;var A=ce$1.observable();ce$1.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return A()},set:function(e){e=Number(e),isNaN(e)||(A(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingRadius=e))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;var L=ce$1.observable();ce$1.defineProperty(this,"skipLevelOfDetail",{get:function(){return L()},set:function(e){L(e),e$2b(i._tileset)&&(i._tileset.skipLevelOfDetail=e)}}),this.skipLevelOfDetail=!0;var M=ce$1.observable();ce$1.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return M()},set:function(e){e=Number(e),isNaN(e)||(M(e),e$2b(i._tileset)&&(i._tileset.skipScreenSpaceErrorFactor=e))}}),this.skipScreenSpaceErrorFactor=16;var R=ce$1.observable();ce$1.defineProperty(this,"baseScreenSpaceError",{get:function(){return R()},set:function(e){e=Number(e),isNaN(e)||(R(e),e$2b(i._tileset)&&(i._tileset.baseScreenSpaceError=e))}}),this.baseScreenSpaceError=1024;var I=ce$1.observable();ce$1.defineProperty(this,"skipLevels",{get:function(){return I()},set:function(e){e=Number(e),isNaN(e)||(I(e),e$2b(i._tileset)&&(i._tileset.skipLevels=e))}}),this.skipLevels=1;var O=ce$1.observable();ce$1.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return O()},set:function(e){O(e),e$2b(i._tileset)&&(i._tileset.immediatelyLoadDesiredLevelOfDetail=e)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;var D=ce$1.observable();ce$1.defineProperty(this,"loadSiblings",{get:function(){return D()},set:function(e){D(e),e$2b(i._tileset)&&(i._tileset.loadSiblings=e)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()})),e$2b(this._tileset)||Y$1(this,!0)}function k$1(e){if(e.featuresLength>0)return!0;var t=e.innerContents;if(e$2b(t)){for(var i=t.length,n=0;n<i;++n)if(!k$1(t[n]))return!1;return!0}return!1}function y$1(e,t){o$1q.defined("container",e),o$1q.typeOf.object("scene",t),e=i$c(e);var i=document.createElement("div"),n=document.createElement("div");n.setAttribute("data-bind","visible: performance");var r=new l$6(t,n);this._viewModel=r,this._container=e,this._element=i;var o=document.createElement("div");o.textContent="3D Tiles Inspector",o.className="supermap3d-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),i.appendChild(o),i.className="supermap3d-cesiumInspector supermap3d-3DTilesInspector",i.setAttribute("data-bind",'css: { "supermap3d-cesiumInspector-visible" : inspectorVisible, "supermap3d-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(i);var a=document.createElement("div");this._panel=a,a.className="supermap3d-cesiumInspector-dropDown",i.appendChild(a);var s=o$4.createSection,l=o$4.createCheckbox,u=s(a,"Tileset","tilesetVisible","toggleTileset"),c=s(a,"Display","displayVisible","toggleDisplay"),h=s(a,"Update","updateVisible","toggleUpdate"),d=s(a,"Logging","loggingVisible","toggleLogging"),f=s(a,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),p=s(a,"Style","styleVisible","toggleStyle"),_=s(a,"Optimization","optimizationVisible","toggleOptimization"),m=document.createElement("div");m.className="field-group";var g=document.createElement("label");g.className="field-label",g.appendChild(document.createTextNode("Properties: "));var x=document.createElement("div");x.setAttribute("data-bind","text: properties"),m.appendChild(g),m.appendChild(x),u.appendChild(m),u.appendChild(L$4("togglePickTileset","Pick Tileset","pickActive")),u.appendChild(L$4("trimTilesCache","Trim Tiles Cache")),u.appendChild(l("Enable Picking","picking")),c.appendChild(l("Colorize","colorize")),c.appendChild(l("Wireframe","wireframe")),c.appendChild(l("Bounding Volumes","showBoundingVolumes")),c.appendChild(l("Content Volumes","showContentBoundingVolumes")),c.appendChild(l("Request Volumes","showRequestVolumes")),c.appendChild(l("Point Cloud Shading","pointCloudShading"));var v=document.createElement("div");v.setAttribute("data-bind","visible: pointCloudShading"),v.appendChild(r$7("geometricErrorScale",0,2,.01,"Geometric Error Scale")),v.appendChild(r$7("maximumAttenuation",0,32,1,"Maximum Attenuation")),v.appendChild(r$7("baseResolution",0,1,.01,"Base Resolution")),v.appendChild(l("Eye Dome Lighting (EDL)","eyeDomeLighting")),c.appendChild(v);var y=document.createElement("div");y.setAttribute("data-bind","visible: eyeDomeLighting"),y.appendChild(r$7("eyeDomeLightingStrength",0,2,.1,"EDL Strength")),y.appendChild(r$7("eyeDomeLightingRadius",0,4,.1,"EDL Radius")),v.appendChild(y),h.appendChild(l("Freeze Frame","freezeFrame")),h.appendChild(l("Dynamic Screen Space Error","dynamicScreenSpaceError"));var $=document.createElement("div");$.appendChild(r$7("maximumScreenSpaceError",0,128,1,"Maximum Screen Space Error")),h.appendChild($);var b=document.createElement("div");b.setAttribute("data-bind","visible: dynamicScreenSpaceError"),b.appendChild(r$7("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"Screen Space Error Density","dynamicScreenSpaceErrorDensity")),b.appendChild(r$7("dynamicScreenSpaceErrorFactor",1,10,.1,"Screen Space Error Factor")),h.appendChild(b),d.appendChild(l("Performance","performance")),d.appendChild(n),d.appendChild(l("Statistics","showStatistics"));var T=document.createElement("div");T.className="supermap3d-3dTilesInspector-statistics",T.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),d.appendChild(T),d.appendChild(l("Pick Statistics","showPickStatistics"));var C=document.createElement("div");C.className="supermap3d-3dTilesInspector-statistics",C.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),d.appendChild(C);var S=document.createElement("div");p.appendChild(S),S.appendChild(document.createTextNode("Color Blend Mode: "));var w=document.createElement("select");w.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),S.appendChild(w);var E=document.createElement("textarea");E.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),S.className="supermap3d-cesiumInspector-styleEditor",S.appendChild(E);var P=L$4("compileStyle","Compile (Ctrl+Enter)");S.appendChild(P);var A=document.createElement("div");A.className="supermap3d-cesiumInspector-error",A.setAttribute("data-bind","text: editorError"),S.appendChild(A),f.appendChild(l("Show Picked Only","showOnlyPickedTileDebugLabel")),f.appendChild(l("Geometric Error","showGeometricError")),f.appendChild(l("Rendering Statistics","showRenderingStatistics")),f.appendChild(l("Memory Usage (MB)","showMemoryUsage")),f.appendChild(l("Url","showUrl")),_.appendChild(l("Skip Tile LODs","skipLevelOfDetail"));var L=document.createElement("div");L.appendChild(r$7("skipScreenSpaceErrorFactor",1,50,1,"Skip SSE Factor")),_.appendChild(L);var M=document.createElement("div");M.appendChild(r$7("baseScreenSpaceError",0,4096,1,"SSE before skipping LOD")),_.appendChild(M);var R=document.createElement("div");R.appendChild(r$7("skipLevels",0,10,1,"Min. levels to skip")),_.appendChild(R),_.appendChild(l("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),_.appendChild(l("Load siblings of visible tiles","loadSiblings")),ce$1.applyBindings(r,i)}function r$7(e,t,i,n,r,o){o=u$_(o,e);var a=document.createElement("input");a.setAttribute("data-bind","value: "+o),a.type="number";var s=document.createElement("input");s.type="range",s.min=t,s.max=i,s.step=n,s.setAttribute("data-bind",'valueUpdate: "input", value: '+e);var l=document.createElement("div");l.appendChild(s);var u=document.createElement("div");return u.className="supermap3d-cesiumInspector-slider",u.appendChild(document.createTextNode(r)),u.appendChild(a),u.appendChild(l),u}function L$4(e,t,i){var n=document.createElement("button");n.type="button",n.textContent=t,n.className="supermap3d-cesiumInspector-pickButton";var r="click: "+e;return e$2b(i)&&(r+=', css: {"supermap3d-cesiumInspector-pickButtonHighlight" : '+i+"}"),n.setAttribute("data-bind",r),n}function M$1(e){var t;if(e$2b(e)){t="Command Statistics";var i=e.commandsInFrustums;for(var n in i)if(i.hasOwnProperty(n)){var r,o=parseInt(n,10);if(7===o)r="1, 2 and 3";else{for(var a=[],s=2;s>=0;s--){var l=Math.pow(2,s);o>=l&&(a.push(s+1),o-=l)}r=a.reverse().join(" and ")}t+="<br>    "+i[n]+" in frustum "+r}t+="<br>Total: "+e.totalCommands}return t}function g$2(e,t,i){var n=Math.min(i,t);return n=Math.max(n,e)}function m$3(e,t){if(!e$2b(e))throw new t$16("scene is required");if(!e$2b(t))throw new t$16("performanceContainer is required");var i=this,n=e.canvas,r=new g$J(n);this._eventHandler=r,this._scene=e,this._canvas=n,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;var o,a=this._scene.globe;function s(e){var t=i._scene.pick({x:e.position.x,y:e.position.y});e$2b(t)&&(i.primitive=e$2b(t.collection)?t.collection:t.primitive),i._scene.requestRender(),i.pickPrimitiveActive=!1}function l(e){var t,n=a.ellipsoid,r=i._scene.camera.pickEllipsoid({x:e.position.x,y:e.position.y},n);if(e$2b(r))for(var o=n.cartesianToCartographic(r),s=a._surface.tileProvider._tilesToRenderByTextureCount,l=0;!t&&l<s.length;++l){var u=s[l];if(e$2b(u))for(var c=0;!t&&c<u.length;++c){var h=u[c];h$18.contains(h.rectangle,o)&&(t=h)}}i.tile=t,i.pickTileActive=!1}a.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.globeDepth=!1,this.pickDepth=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",ce$1.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","globeDepth","pickDepth","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=s$4((function(){i.dropDownVisible=!i.dropDownVisible})),this._toggleGeneral=s$4((function(){i.generalVisible=!i.generalVisible})),this._togglePrimitives=s$4((function(){i.primitivesVisible=!i.primitivesVisible})),this._toggleTerrain=s$4((function(){i.terrainVisible=!i.terrainVisible})),this._frustumsSubscription=ce$1.getObservable(this,"frustums").subscribe((function(e){i._scene.debugShowFrustums=e,i._scene.requestRender()})),this._frustumPlanesSubscription=ce$1.getObservable(this,"frustumPlanes").subscribe((function(e){i._scene.debugShowFrustumPlanes=e,i._scene.requestRender()})),this._performanceSubscription=ce$1.getObservable(this,"performance").subscribe((function(e){e?i._performanceDisplay=new o$c({container:i._performanceContainer}):i._performanceContainer.innerHTML=""})),this._showPrimitiveBoundingSphere=s$4((function(){return i._primitive.debugShowBoundingVolume=i.primitiveBoundingSphere,i._scene.requestRender(),!0})),this._primitiveBoundingSphereSubscription=ce$1.getObservable(this,"primitiveBoundingSphere").subscribe((function(){i._showPrimitiveBoundingSphere()})),this._showPrimitiveReferenceFrame=s$4((function(){if(i.primitiveReferenceFrame){var e=i._primitive.modelMatrix;i._modelMatrixPrimitive=new s$d({modelMatrix:e}),i._scene.primitives.add(i._modelMatrixPrimitive)}else e$2b(i._modelMatrixPrimitive)&&(i._scene.primitives.remove(i._modelMatrixPrimitive),i._modelMatrixPrimitive=void 0);return i._scene.requestRender(),!0})),this._primitiveReferenceFrameSubscription=ce$1.getObservable(this,"primitiveReferenceFrame").subscribe((function(){i._showPrimitiveReferenceFrame()})),this._doFilterPrimitive=s$4((function(){return i.filterPrimitive?i._scene.debugCommandFilter=function(e){return!(!e$2b(i._modelMatrixPrimitive)||e.owner!==i._modelMatrixPrimitive._primitive)||!!e$2b(i._primitive)&&(e.owner===i._primitive||e.owner===i._primitive._billboardCollection||e.owner.primitive===i._primitive)}:i._scene.debugCommandFilter=void 0,!0})),this._filterPrimitiveSubscription=ce$1.getObservable(this,"filterPrimitive").subscribe((function(){i._doFilterPrimitive(),i._scene.requestRender()})),this._wireframeSubscription=ce$1.getObservable(this,"wireframe").subscribe((function(e){a._surface.tileProvider._debug.wireframe=e,i._scene.requestRender()})),this._globeDepthSubscription=ce$1.getObservable(this,"globeDepth").subscribe((function(e){i._scene.debugShowGlobeDepth=e,i._scene.requestRender()})),this._pickDepthSubscription=ce$1.getObservable(this,"pickDepth").subscribe((function(e){i._scene.debugShowPickDepth=e,i._scene.requestRender()})),this._depthFrustumSubscription=ce$1.getObservable(this,"depthFrustum").subscribe((function(e){i._scene.debugShowDepthFrustum=e,i._scene.requestRender()})),this._incrementDepthFrustum=s$4((function(){var e=i.depthFrustum+1;return i.depthFrustum=g$2(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._decrementDepthFrustum=s$4((function(){var e=i.depthFrustum-1;return i.depthFrustum=g$2(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._suspendUpdatesSubscription=ce$1.getObservable(this,"suspendUpdates").subscribe((function(e){a._surface._debug.suspendLodUpdate=e,e||(i.filterTile=!1)})),this._showTileCoordinates=s$4((function(){return i.tileCoordinates&&!e$2b(o)?o=e.imageryLayers.addImageryProvider(new n$4({tilingScheme:e.terrainProvider.tilingScheme})):!i.tileCoordinates&&e$2b(o)&&(e.imageryLayers.remove(o),o=void 0),!0})),this._tileCoordinatesSubscription=ce$1.getObservable(this,"tileCoordinates").subscribe((function(){i._showTileCoordinates(),i._scene.requestRender()})),this._tileBoundingSphereSubscription=ce$1.getObservable(this,"tileBoundingSphere").subscribe((function(){i._showTileBoundingSphere(),i._scene.requestRender()})),this._showTileBoundingSphere=s$4((function(){return i.tileBoundingSphere?a._surface.tileProvider._debug.boundingSphereTile=i._tile:a._surface.tileProvider._debug.boundingSphereTile=void 0,i._scene.requestRender(),!0})),this._doFilterTile=s$4((function(){return i.filterTile?(i.suspendUpdates=!0,a._surface._tilesToRender=[],e$2b(i._tile)&&i._tile.renderable&&a._surface._tilesToRender.push(i._tile)):i.suspendUpdates=!1,!0})),this._filterTileSubscription=ce$1.getObservable(this,"filterTile").subscribe((function(){i.doFilterTile(),i._scene.requestRender()})),this._pickPrimitive=s$4((function(){i.pickPrimitiveActive=!i.pickPrimitiveActive})),this._pickPrimitiveActiveSubscription=ce$1.getObservable(this,"pickPrimitiveActive").subscribe((function(e){e?r.setInputAction(s,G$I.LEFT_CLICK):r.removeInputAction(G$I.LEFT_CLICK)})),this._pickTile=s$4((function(){i.pickTileActive=!i.pickTileActive})),this._pickTileActiveSubscription=ce$1.getObservable(this,"pickTileActive").subscribe((function(e){e?r.setInputAction(l,G$I.LEFT_CLICK):r.removeInputAction(G$I.LEFT_CLICK)})),this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()}))}function g$1(e,t){if(!e$2b(e))throw new t$16("container is required.");if(!e$2b(t))throw new t$16("scene is required.");e=i$c(e);var i=document.createElement("div"),n=new m$3(t,i);this._viewModel=n,this._container=e;var r=document.createElement("div");this._element=r;var o=document.createElement("div");o.textContent="SuperMap3D Inspector",o.className="supermap3d-cesiumInspector-button",o.setAttribute("data-bind","click: toggleDropDown"),r.appendChild(o),r.className="supermap3d-cesiumInspector",r.setAttribute("data-bind",'css: { "supermap3d-cesiumInspector-visible" : dropDownVisible, "supermap3d-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);var a=document.createElement("div");this._panel=a,a.className="supermap3d-cesiumInspector-dropDown",r.appendChild(a);var s=o$4.createSection,l=o$4.createCheckbox,u=s(a,"General","generalVisible","toggleGeneral"),c=l("Show Frustums","frustums"),h=document.createElement("div");h.className="supermap3d-cesiumInspector-frustumStatistics",h.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),c.appendChild(h),u.appendChild(c),u.appendChild(l("Show Frustum Planes","frustumPlanes")),u.appendChild(l("Performance Display","performance")),i.className="supermap3d-cesiumInspector-performanceDisplay",u.appendChild(i);var d=document.createElement("div");d.className="supermap3d-cesiumInspector-shaderCache",d.setAttribute("data-bind","html: shaderCacheText"),u.appendChild(d);var f=document.createElement("div");u.appendChild(f);var p=document.createElement("span");p.setAttribute("data-bind",'html: "     Frustum:"'),f.appendChild(p);var _=document.createElement("span");_.setAttribute("data-bind","text: depthFrustumText"),f.appendChild(_);var m=document.createElement("input");m.type="button",m.value="-",m.className="supermap3d-cesiumInspector-pickButton",m.setAttribute("data-bind","click: decrementDepthFrustum"),f.appendChild(m);var g=document.createElement("input");g.type="button",g.value="+",g.className="supermap3d-cesiumInspector-pickButton",g.setAttribute("data-bind","click: incrementDepthFrustum"),f.appendChild(g);var x=s(a,"Primitives","primitivesVisible","togglePrimitives"),v=document.createElement("div");v.className="supermap3d-cesiumInspector-pickSection",x.appendChild(v);var y=document.createElement("input");y.type="button",y.value="Pick a primitive",y.className="supermap3d-cesiumInspector-pickButton",y.setAttribute("data-bind",'css: {"supermap3d-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');var $=document.createElement("div");$.className="supermap3d-cesiumInspector-center",$.appendChild(y),v.appendChild($),v.appendChild(l("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),v.appendChild(l("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=l("Show only selected","filterPrimitive","hasPickedPrimitive"),v.appendChild(this._primitiveOnly);var b=s(a,"Terrain","terrainVisible","toggleTerrain"),T=document.createElement("div");T.className="supermap3d-cesiumInspector-pickSection",b.appendChild(T);var C=document.createElement("input");C.type="button",C.value="Pick a tile",C.className="supermap3d-cesiumInspector-pickButton",C.setAttribute("data-bind",'css: {"supermap3d-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),($=document.createElement("div")).appendChild(C),$.className="supermap3d-cesiumInspector-center",T.appendChild($);var S=document.createElement("div");T.appendChild(S);var w=document.createElement("input");w.type="button",w.value="Parent",w.className="supermap3d-cesiumInspector-pickButton",w.setAttribute("data-bind","click: selectParent");var E=document.createElement("input");E.type="button",E.value="NW",E.className="supermap3d-cesiumInspector-pickButton",E.setAttribute("data-bind","click: selectNW");var P=document.createElement("input");P.type="button",P.value="NE",P.className="supermap3d-cesiumInspector-pickButton",P.setAttribute("data-bind","click: selectNE");var A=document.createElement("input");A.type="button",A.value="SW",A.className="supermap3d-cesiumInspector-pickButton",A.setAttribute("data-bind","click: selectSW");var L=document.createElement("input");L.type="button",L.value="SE",L.className="supermap3d-cesiumInspector-pickButton",L.setAttribute("data-bind","click: selectSE");var M=document.createElement("div");M.className="supermap3d-cesiumInspector-tileText",S.className="supermap3d-cesiumInspector-frustumStatistics",S.appendChild(M),S.setAttribute("data-bind","visible: hasPickedTile"),M.setAttribute("data-bind","html: tileText");var R=document.createElement("div");R.className="supermap3d-cesiumInspector-relativeText",R.textContent="Select relative:",S.appendChild(R);var I=document.createElement("table"),O=document.createElement("tr"),D=document.createElement("tr"),B=document.createElement("td");B.appendChild(w);var N=document.createElement("td");N.appendChild(E);var F=document.createElement("td");F.appendChild(P),O.appendChild(B),O.appendChild(N),O.appendChild(F);var U=document.createElement("td"),z=document.createElement("td");z.appendChild(A);var G=document.createElement("td");G.appendChild(L),D.appendChild(U),D.appendChild(z),D.appendChild(G),I.appendChild(O),I.appendChild(D),S.appendChild(I),T.appendChild(l("Show bounding volume","tileBoundingSphere","hasPickedTile")),T.appendChild(l("Show only selected","filterTile","hasPickedTile")),b.appendChild(l("Wireframe","wireframe")),b.appendChild(l("Suspend LOD update","suspendUpdates")),b.appendChild(l("Show tile coordinates","tileCoordinates")),ce$1.applyBindings(n,this._element)}function r$6(e){var t=this,i=ce$1.observable(l$1f.fullscreen),n=ce$1.observable(l$1f.enabled);this.isFullscreen=void 0,ce$1.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,ce$1.defineProperty(this,"isFullscreenEnabled",{get:function(){return n()},set:function(e){n(e&&l$1f.enabled)}}),this.tooltip=void 0,ce$1.defineProperty(this,"tooltip",(function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"})),this._command=s$4((function(){l$1f.fullscreen?l$1f.exitFullscreen():l$1f.requestFullscreen(t._fullscreenElement)}),ce$1.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=u$_(i$c(e),document.body),this._callback=function(){i(l$1f.fullscreen)},document.addEventListener(l$1f.changeEventName,this._callback)}Object.defineProperties(l$6.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},colorBlendModes:{get:function(){return le}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,e$2b(e)){var t=this;e.readyPromise.then((function(e){t.isDestroyed()||t._properties(e.properties)}));for(var i=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],n=i.length,r=0;r<n;++r){var o=i[r];this[o]=this[o]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings;var a=e.pointCloudShading;this.pointCloudShading=a.attenuation,this.geometricErrorScale=a.geometricErrorScale,this.maximumAttenuation=a.maximumAttenuation?a.maximumAttenuation:0,this.baseResolution=a.baseResolution?a.baseResolution:0,this.eyeDomeLighting=a.eyeDomeLighting,this.eyeDomeLightingStrength=a.eyeDomeLightingStrength,this.eyeDomeLightingRadius=a.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=y$2(e,!1),this._pickStatisticsText=y$2(e,!0),Y$1(this,!1)}},feature:{get:function(){return this._feature},set:function(e){if(this._feature!==e){var t=this._feature;e$2b(t)&&!t.content.isDestroyed()&&(!this.colorize&&e$2b(this._style)?t.color=e$2b(this._style.color)?this._style.color.evaluateColor(t,ce):e$1U.WHITE:t.color=v$2,this._scene.requestRender()),e$2b(e)&&(e$1U.clone(e.color,v$2),e.color=Z$2,this._scene.requestRender()),this._feature=e}}},tile:{get:function(){return this._tile},set:function(e){if(this._tile!==e){var t=this._tile;e$2b(t)&&!t.isDestroyed()&&!k$1(t.content)&&(t.color=v$2,this._scene.requestRender()),e$2b(e)&&!k$1(e.content)&&(e$1U.clone(e.color,v$2),e.color=Z$2,this._scene.requestRender()),this._tile=e}}}}),l$6.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive},l$6.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible},l$6.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible},l$6.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible},l$6.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible},l$6.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible},l$6.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible},l$6.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible},l$6.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible},l$6.prototype.trimTilesCache=function(){e$2b(this._tileset)&&this._tileset.trimLoadedTiles()},l$6.prototype.compileStyle=function(){var e=this._tileset;if(e$2b(e)&&this.styleString!==JSON.stringify(e.style)){this._editorError="";try{0===this.styleString.length&&(this.styleString="{}"),this._style=new d$n(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(e){this._editorError=e.toString()}this.feature=this._feature,this.tile=this._tile}},l$6.prototype.styleEditorKeyPress=function(e,t){if(9===t.keyCode){t.preventDefault();var i,n=t.target,r=n.selectionStart,o=n.selectionEnd,a=o,s=n.value.slice(r,o).split("\n"),l=s.length;if(t.shiftKey)for(i=0;i<l;++i)" "===s[i][0]&&(" "===s[i][1]?(s[i]=s[i].substr(2),a-=2):(s[i]=s[i].substr(1),a-=1));else for(i=0;i<l;++i)s[i]=" "+s[i],a+=2;var u=s.join("\n");n.value=n.value.slice(0,r)+u+n.value.slice(o),n.selectionStart=r!==o?r:a,n.selectionEnd=a}else t.ctrlKey&&(10===t.keyCode||13===t.keyCode)&&this.compileStyle();return!0},l$6.prototype._update=function(){var e=this._tileset;if(this.performance&&this._performanceDisplay.update(),e$2b(e)){if(e.isDestroyed())return this.tile=void 0,this.feature=void 0,void(this.tileset=void 0);var t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=y$2(e,!1),this._pickStatisticsText=y$2(e,!0))},l$6.prototype.isDestroyed=function(){return!1},l$6.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();var e=this;return this._definedProperties.forEach((function(t){ce$1.getObservable(e,t).dispose()})),i$10(this)},l$6.getStatistics=y$2,Object.defineProperties(y$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),y$1.prototype.isDestroyed=function(){return!1},y$1.prototype.destroy=function(){return ce$1.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),i$10(this)},Object.defineProperties(m$3.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.parent}))}},selectNW:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.northwestChild}))}},selectNE:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.northeastChild}))}},selectSW:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.southwestChild}))}},selectSE:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.southeastChild}))}},primitive:{get:function(){return this._primitive},set:function(e){var t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,e$2b(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,e$2b(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout((function(){e.show=!0}),50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(e$2b(e)){if(this.hasPickedTile=!0,e!==this._tile){this.tileText="L: "+e.level+" X: "+e.x+" Y: "+e.y,this.tileText+="<br>SW corner: "+e.rectangle.west+", "+e.rectangle.south,this.tileText+="<br>NE corner: "+e.rectangle.east+", "+e.rectangle.north;var t=e.data;e$2b(t)?this.tileText+="<br>Min: "+t.minimumHeight+" Max: "+t.maximumHeight:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}}),m$3.prototype._update=function(){this.frustums&&(this.frustumStatisticText=M$1(this._scene.debugFrustumStatistics));var e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=g$2(1,e,this.depthFrustum),this.depthFrustumText=this.depthFrustum+" of "+e,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText="Cached shaders: "+this._scene.context.shaderCache.numberOfShaders},m$3.prototype.isDestroyed=function(){return!1},m$3.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._globeDepthSubscription.dispose(),this._pickDepthSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),i$10(this)},Object.defineProperties(g$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),g$1.prototype.isDestroyed=function(){return!1},g$1.prototype.destroy=function(){return ce$1.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),i$10(this)},Object.defineProperties(r$6.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){if(!(e instanceof Element))throw new t$16("value must be a valid Element.");this._fullscreenElement=e}},command:{get:function(){return this._command}}}),r$6.prototype.isDestroyed=function(){return!1},r$6.prototype.destroy=function(){document.removeEventListener(l$1f.changeEventName,this._callback),i$10(this)};var c$3="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",d$4="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function r$5(e,t){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e);var i=new r$6(t);i._exitFullScreenPath=d$4,i._enterFullScreenPath=c$3;var n=document.createElement("button");n.type="button",n.className="supermap3d-button supermap3d-fullscreenButton",n.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(n),ce$1.applyBindings(i,n),this._container=e,this._viewModel=i,this._element=n}function D$2(e){if(!e$2b(e)||!e$2b(e.scene)||!e$2b(e.viewer))throw new t$16("options.scene and optinss.viewer is required.");this._viewer=e.viewer,this._url=u$_(e.url,"//dev.virtualearth.net/"),this._url.length>0&&"/"!==this._url[this._url.length-1]&&(this._url+="/"),this._key=e$11.getKey(e.key),this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodeInProgress=void 0,this._complete=new o$1h,this._dataSource=void 0;var t=this;this._searchCommand=s$4((function(){t.isSearchInProgress?U$1(t):Q$1(t)})),this.keepExpanded=!1,ce$1.track(this,["_searchText","_isSearchInProgress","keepExpanded"]),this.isSearchInProgress=void 0,ce$1.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,ce$1.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(e){if("string"!=typeof e)throw new t$16("value must be a valid string.");this._searchText=e}}),this.flightDuration=void 0,ce$1.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(e){if(e$2b(e)&&e<0)throw new t$16("value must be positive.");this._flightDuration=e}})}function j$4(e,t){e._scene.camera.flyTo({destination:t,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:p$1d.IDENTITY})}Object.defineProperties(r$5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),r$5.prototype.isDestroyed=function(){return!1},r$5.prototype.destroy=function(){return this._viewModel.destroy(),ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$10(this)},Object.defineProperties(D$2.prototype,{url:{get:function(){return this._url}},key:{get:function(){return this._key}},complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},dataSource:{get:function(){return this._dataSource}}});var L$3="https://www.supermapol.com/iserver/services/localsearch/rest/searchdatas/China/poiinfos.json";function Q$1(e){var t=e.searchText;if(!/^\s*$/.test(t)){var i=t.match(/[^\s,\n]+/g);if(2===i.length||3===i.length){var n=+i[0],r=+i[1],o=3===i.length?+i[2]:300;if(!isNaN(n)&&!isNaN(r)&&!isNaN(o))return void j$4(e,o$1p.fromDegrees(n,r,o))}e._isSearchInProgress=!0;var a={key:e.geoKey},s=t.match(/[^\s-\n]+/g);2===s.length?(a.city=s[0],a.keywords=s[1]):a.keywords=s[0],t$11.fetch({url:L$3,queryParameters:a}).then((t=>{t=JSON.parse(t);if(e._isSearchInProgress=!1,e$2b(t.error))return e._isSearchInProgress=!1,void(e.searchText=t.error.errorMsg);e$2b(e._datasource)&&(e._viewer.dataSources.remove(e._datasource),e._datasource=void 0);var i=t.poiInfos[0];e._searchText=i.name;var n=i.location;n.lon=n.x,n.lat=n.y,!e$2b(o$1p.fromDegrees(n.x,n.y,500))||(e._datasource=Y(t,e),e._viewer.dataSources.add(e._datasource),o$1l(e._datasource,(function(t){e._datasource=t,e._viewer.flyTo(t)}),(function(e){console.log(e)})))})).catch((e=>{console.log("error",e)}))}}function U$1(e){e._isSearchInProgress=!1,e$2b(e._geocodeInProgress)&&(e._geocodeInProgress.cancel=!0,e._geocodeInProgress=void 0)}function Y(e,t){for(var i={type:"FeatureCollection",features:[]},n=e.poiInfos,r=[],o=0,a=n.length;o<a;o++){var s=n[o];s.address;var l=s.location,u=e$2a.toRadians(l.x),c=e$2a.toRadians(l.y);r.push(new a$18(u,c))}return o$1l(y$C(t._viewer.terrainProvider,9,r),(function(e){for(var t=0,r=n.length;t<r;t++){var o=n[t],a=o.address,s=e[t],l={type:"Feature",geometry:{type:"Point",coordinates:[e$2a.toDegrees(s.longitude),e$2a.toDegrees(s.latitude),s.height]},properties:{title:o.name,"marker-color":"#B9EB14",tel:o.telephone,address:a}};i.features.push(l)}return(new y$p).loadPoiJsonData(i)}))}var l$5="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",f$2="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function s$3(e){if(!e$2b(e)||!e$2b(e.container))throw new t$16("options.container is required.");if(!e$2b(e.scene)||!e$2b(e.viewer))throw new t$16("options.scene and options.viewer is required.");var t=i$c(e.container),i=new D$2(e);i._startSearchPath=l$5,i._stopSearchPath=f$2;var n=document.createElement("form");n.setAttribute("data-bind","submit: search");var r=document.createElement("input");r.type="search",r.className="supermap3d-geocoder-input",r.setAttribute("placeholder","Enter an address or landmark..."),r.setAttribute("data-bind",'value: searchText,valueUpdate: "afterkeydown",disable: isSearchInProgress,css: { "supermap3d-geocoder-input-wide" : keepExpanded || searchText.length > 0 }'),n.appendChild(r);var o=document.createElement("span");o.className="supermap3d-geocoder-searchButton",o.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),n.appendChild(o),t.appendChild(n),ce$1.applyBindings(i,n),this._container=t,this._viewModel=i,this._form=n,this._onInputBegin=function(e){t.contains(e.target)||r.blur()},this._onInputEnd=function(e){t.contains(e.target)&&r.focus()},s$Y.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),document.addEventListener("pointerup",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),document.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),document.addEventListener("touchend",this._onInputEnd,!0))}function r$4(e,t){if(!e$2b(e))throw new t$16("scene is required.");this._scene=e,this._duration=t;var i=this;this._command=s$4((function(){i._scene.camera.flyHome(i._duration)})),this.tooltip="View Home",ce$1.track(this,["tooltip"])}function o$3(e,t,i){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e);var n=new r$4(t,i);n._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";var r=document.createElement("button");r.type="button",r.className="supermap3d-button supermap3d-toolbar-button supermap3d-home-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(r),ce$1.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}Object.defineProperties(s$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),s$3.prototype.isDestroyed=function(){return!1},s$3.prototype.destroy=function(){return s$Y.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),document.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),document.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),document.removeEventListener("touchend",this._onInputEnd,!0)),ce$1.cleanNode(this._form),this._container.removeChild(this._form),i$10(this)},Object.defineProperties(r$4.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){if(e$2b(e)&&e<0)throw new t$16("value must be positive.");this._duration=e}}}),Object.defineProperties(o$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),o$3.prototype.isDestroyed=function(){return!1},o$3.prototype.destroy=function(){return ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$10(this)};var r$3="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",o$2="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function t$1(){this._cameraClicked=new o$1h,this._closeClicked=new o$1h,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",ce$1.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="supermap3d-infoBox-loadingContainer"><span class="supermap3d-infoBox-loading"></span></div>',this.cameraIconPath=void 0,ce$1.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?o$2:r$3}}),ce$1.defineProperty(this,"_bodyless",{get:function(){return!e$2b(this.description)||0===this.description.length}})}function l$4(e){o$1q.defined("container",e),e=i$c(e);var t=document.createElement("div");t.className="supermap3d-infoBox",t.setAttribute("data-bind",'css: { "supermap3d-infoBox-visible" : showInfo, "supermap3d-infoBox-bodyless" : _bodyless }'),e.appendChild(t);var i=document.createElement("div");i.className="supermap3d-infoBox-title",i.setAttribute("data-bind","text: titleText"),t.appendChild(i);var n=document.createElement("button");n.type="button",n.className="supermap3d-button supermap3d-infoBox-camera",n.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(n);var r=document.createElement("button");r.type="button",r.className="supermap3d-infoBox-close",r.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),r.innerHTML="×",t.appendChild(r);var o=document.createElement("iframe");o.className="supermap3d-infoBox-iframe",o.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),o.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),o.setAttribute("allowfullscreen",!0),t.appendChild(o);var a=new t$1;ce$1.applyBindings(a,t),this._container=e,this._element=t,this._frame=o,this._viewModel=a,this._descriptionSubscription=void 0;var s=this;o.addEventListener("load",(function(){var e=o.contentDocument,i=e.createElement("link");i.href=n$15("Widgets/InfoBox/InfoBoxDescription.css"),i.rel="stylesheet",i.type="text/css";var n=e.createElement("div");n.className="supermap3d-infoBox-description",e.head.appendChild(i),e.body.appendChild(n),s._descriptionSubscription=c$5(a,"description",(function(e){o.style.height="5px",n.innerHTML=e;var i=null,r=n.firstElementChild;if(null!==r&&1===n.childNodes.length){var a=window.getComputedStyle(r);if(null!==a){var s=a["background-color"],l=e$1U.fromCssColorString(s);e$2b(l)&&0!==l.alpha&&(i=a["background-color"])}}t.style["background-color"]=i;var u=n.getBoundingClientRect().height;o.style.height=u+"px"}))})),o.setAttribute("src","about:blank")}t$1.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},Object.defineProperties(t$1.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}}),Object.defineProperties(l$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),l$4.prototype.isDestroyed=function(){return!1},l$4.prototype.destroy=function(){var e=this._container;return ce$1.cleanNode(this._element),e.removeChild(this._element),e$2b(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),i$10(this)};var n$2=function(e){var t=document.createElement("div");t.innerHTML=e;for(var i=document.createDocumentFragment();t.firstChild;)i.appendChild(t.firstChild);return i},f$1=function(e,t,i){t=i$c(t);var n,r=n$2(e),o=[];for(n=0;n<r.childNodes.length;++n)o.push(r.childNodes[n]);for(t.appendChild(r),n=0;n<o.length;++n){var a=o[n];(1===a.nodeType||8===a.nodeType)&&ce$1.applyBindings(i,a)}return o},y=function(e,t){if(!e$2b(e)||!e$2b(e.viewer)||!e$2b(e.scene))throw new t$16("options and options.viewer and optins.scene is required.");this.viewer=e.viewer,this.viewer.afterViewerChanged=new o$1h,this.viewer.beforeViewerChanged=new o$1h,this.scene=e.scene,this.eventHelper=new n$x,this.showCompass=e$2b(this.scene),this.heading=this.showCompass?this.scene.camera.heading:0,this.isOrbiting=!1,this.orbitCursorAngle=0,this.isRotating=!1,this.rotateInitialCursorAngle=void 0,this.rotateFrame=void 0,this.rotateMouseMoveFunction=void 0,this.rotateMouseUpFunction=void 0,this._unsubcribeFromPostRender=void 0,this.tiltbarLeft=56,this.tiltbarTop=3,this.isTilting=!1,this.zoombarTop=65,this.tiltInitialCursorAngle=0,this.screenSpaceEventHandler=new g$J(t),this.clickStartPosition=null,ce$1.track(this,["showCompass","heading","isOrbiting","orbitCursorAngle","isRotating","tiltbarLeft","tiltbarTop","isTilting","zoombarTop"]);var i=this;function n(){e$2b(i.viewer)?(i._unsubcribeFromPostRender&&(i._unsubcribeFromPostRender(),i._unsubcribeFromPostRender=void 0),i.showCompass=!0,i._unsubcribeFromPostRender=i.scene.postRender.addEventListener((function(){var e=Math.abs(i.scene.camera.heading-i.heading);if((e<e$2a.PI_OVER_TWO||e>3*e$2a.PI_OVER_TWO)&&(i.heading=i.scene.camera.heading),i.scene.screenSpaceCameraController,!i.isTilting){var t=i.scene.camera.pitch+e$2a.PI_OVER_TWO,n=e$2a.PI_OVER_TWO/20,r=Math.floor(t/n);r=(r=r>19?19:r)<0?0:r,i.tiltbarLeft=C$1[r].x,i.tiltbarTop=C$1[r].y}}))):(i._unsubcribeFromPostRender&&(i._unsubcribeFromPostRender(),i._unsubcribeFromPostRender=void 0),i.showCompass=!1)}this.eventHelper.add(this.viewer.afterViewerChanged,n,this),function(){var t=e$2a.PI_OVER_TWO+e.scene.camera.pitch,n=Math.PI/2/20,r=Math.floor(t/n);r=(r=r>19?19:r)<0?0:r,i.tiltbarLeft=C$1[r].x,i.tiltbarTop=C$1[r].y}(),n()},z=new o$1o;new o$1p,y.prototype.handleZoomBarScrollMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e.screenSpaceEventHandler.removeInputAction(G$I.MOUSE_MOVE),e$2b(e.zoombarTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoombarTickFunction),e.zoomBarScrollMouseUpFunction=void 0,e.zoombarTickFunction=void 0,e.isZoomBarScrolling=!0;var i=e.viewer.scene.camera;e.zoombarTickFunction=function(t){var n=e.zoombarTop-65;n>0?e.viewer.scene.mode===C$13.COLUMBUS_VIEW||e.viewer.scene.mode===C$13.SCENE2D?i.zoomOut():L$2(e,-1):n<0&&(e.viewer.scene.mode===C$13.COLUMBUS_VIEW||e.viewer.scene.mode===C$13.SCENE2D?i.zoomIn():L$2(e,1))},e.zoomBarScrollMouseMoveFunction=function(t,n){var r=e.zoombarTop,o=t.endPosition.y-t.startPosition.y+r;o=(o=o<0?0:o)>120?120:o,e.zoombarTop=o,e.zoombarTop-r>0?e.viewer.scene.mode===C$13.COLUMBUS_VIEW?i.zoomOut():L$2(e,-1):e.viewer.scene.mode===C$13.COLUMBUS_VIEW?i.zoomIn():L$2(e,1)},e.zoomBarScrollMouseUpFunction=function(t){e.isZoomBarScrolling=!1,e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e.screenSpaceEventHandler.removeInputAction(G$I.MOUSE_MOVE),e$2b(e.zoombarTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoombarTickFunction),e.zoomBarScrollMouseUpFunction=void 0,e.zoomBarScrollMouseMoveFunction=void 0,e.zoombarTickFunction=void 0,e.zoombarTop=65},e.screenSpaceEventHandler.setInputAction(e.zoomBarScrollMouseUpFunction,G$I.LEFT_UP),e.screenSpaceEventHandler.setInputAction(e.zoomBarScrollMouseMoveFunction,G$I.MOUSE_MOVE),e.viewer.clock.onTick.addEventListener(e.zoombarTickFunction)},y.prototype.handleZoomInMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e$2b(e.zoominTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoominTickFunction),e.zoominMouseUpFunction=void 0,e.zoominTickFunction=void 0,e.isZoomin=!0,e.zoominLastTimestamp=Et$a();var i=e.viewer.scene,n=i.camera;e.zoominTickFunction=function(t){if(e.viewer.scene.mode===C$13.COLUMBUS_VIEW){var r=j$3(i,1);e$2b(r)&&n.zoomIn(r)}else e.viewer.scene.mode===C$13.SCENE2D?n.zoomIn():L$2(e,1)},e.zoominMouseUpFunction=function(t){e.isZoomin=!1,e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e$2b(e.zoominTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoominTickFunction),e.zoominMouseUpFunction=void 0,e.zoominTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.zoominMouseUpFunction,G$I.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.zoominTickFunction)},y.prototype.handleZoomOutMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e$2b(e.zoomoutTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoomoutTickFunction),e.zoomoutMouseUpFunction=void 0,e.zoomoutTickFunction=void 0,e.iszoomout=!0,e.zoomoutLastTimestamp=Et$a();var i=e.viewer.scene,n=i.camera;e.zoomoutTickFunction=function(t){if(e.viewer.scene.mode===C$13.COLUMBUS_VIEW){var r=j$3(i,1);e$2b(r)&&n.zoomOut(r)}else e.viewer.scene.mode===C$13.SCENE2D?n.zoomOut():L$2(e,-1)},e.zoomoutMouseUpFunction=function(t){e.iszoomout=!1,e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e$2b(e.zoomoutTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoomoutTickFunction),e.zoomoutMouseUpFunction=void 0,e.zoomoutTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.zoomoutMouseUpFunction,G$I.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.zoomoutTickFunction)};var X=1;function M(e,t,i){e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e$2b(e.rotateEastTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.rotateEastTickFunction),e.rotateEastMouseUpFunction=void 0,e.rotateEastTickFunction=void 0,e.isrotateEasting=!0,e.rotateEastLastTimestamp=Et$a(),e.viewer.scene.camera;var n=e$2a.PI_OVER_TWO-Math.atan2(-i.y,i.x),r=Math.PI/4,o=0,a=1,s=2,l=3,u=4;o=n>=-r&&n<=r?u:n>=r&&n<=3*r?s:n>=3*r&&n<=5*r?l:a,e.rotateEastTickFunction=function(t){var i=e.viewer.scene.camera,r=Et$a();switch(e.rotateEastLastTimestamp,n=20*Math.abs(i._positionCartographic.height/6378317)*5e-4,o){case a:i.rotate(i.up,n);break;case s:i.rotate(i.up,-n);break;case l:i.rotate(i.right,-n);break;case u:i.rotate(i.right,n)}e.rotateLastTimestamp=r},e.rotateEastMouseUpFunction=function(t){e.isRotateEasting=!1,e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e$2b(e.rotateEastTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.rotateEastTickFunction),e.rotateEastMouseUpFunction=void 0,e.rotateEastTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.rotateEastMouseUpFunction,G$I.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.rotateEastTickFunction)}y.prototype.handleMouseDown=function(e,t){var i=t.currentTarget,n=t.currentTarget.getBoundingClientRect();X=n.height/i.clientHeight,n.width;var r=new o$1o((n.right-n.left)/2,(n.bottom-n.top)/2),o=0;o="mousedown"===t.type?new o$1o(t.clientX-n.left,t.clientY-n.top):new o$1o(t.originalEvent.touches[0].clientX-n.left,t.originalEvent.touches[0].clientY-n.top);var a=o$1o.subtract(o,r,z);this.clickStartPosition=new o$1o(t.clientX,t.clientY);var s=o$1o.magnitude(a);if((s/=X)>30&&s<45)tt(this,i,a);else{if(!(s>50&&s<70))return e.viewer.scene.mode===C$13.SCENE2D?void 0:M(this,i,a);if(e.viewer.scene.mode===C$13.SCENE2D)return;var l=e$2a.PI_OVER_TWO-Math.atan2(-a.y,a.x);l>=0&&l<=e$2a.PI_OVER_TWO&&nt(this,i,a)}},y.prototype.handleMouseUp=function(e,t){var i=t.currentTarget.getBoundingClientRect(),n=new o$1o((i.right-i.left)/2,(i.bottom-i.top)/2),r=0;r="mouseup"===t.type?new o$1o(t.clientX-i.left,t.clientY-i.top):new o$1o(t.originalEvent.touches[0].clientX-i.left,t.originalEvent.touches[0].clientY-i.top);var o=o$1o.subtract(r,n,z),a=o$1o.magnitude(o);if(a>30&&a<45){var s=e$2a.toDegrees(Math.atan2(-o.y,o.x)),l=new o$1o(t.clientX,t.clientY),u=l.x-this.clickStartPosition.x,c=l.y-this.clickStartPosition.y;if(Math.sqrt(u*u+c*c)>5)return;var h=e$2a.toDegrees(e.heading),d=Math.abs(s-h),f=e.viewer.scene;(s>0&&h>0&&h<90&&d>80&&d<100||d>260&&d<280)&&f.camera.flyTo({destination:f.camera.position,orientation:{heading:0,pitch:f.camera.pitch}})}};var x$1=new p$1d,W$1=new p$1d,d$3=new o$1p,N=new o$1o;function tt(e,t,i){e.screenSpaceEventHandler.removeInputAction(G$I.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e.rotateMouseMoveFunction=void 0,e.rotateMouseUpFunction=void 0,e.isRotating=!0,e.rotateInitialCursorAngle=Math.atan2(-i.y,i.x);var n=e.viewer.scene,r=n.camera,o=N;o.x=n.canvas.clientWidth/2,o.y=n.canvas.clientHeight/2;var a=r.pickEllipsoid(o,n.globe.ellipsoid,d$3);e$2b(a)?(e.rotateFrame=m$17.eastNorthUpToFixedFrame(a,n.globe.ellipsoid,W$1),e.rotateIsLook=!1):(e.rotateFrame=m$17.eastNorthUpToFixedFrame(r.positionWC,n.globe.ellipsoid,W$1),e.rotateIsLook=!0);var s=p$1d.clone(r.transform,x$1);r.lookAtTransform(e.rotateFrame),e.rotateInitialCameraAngle=-r.heading,e.rotateInitialCameraDistance=o$1p.magnitude(new o$1p(r.position.x,r.position.y,0)),r.lookAtTransform(s),e.rotateMouseMoveFunction=function(i,n){var r=t.getBoundingClientRect(),o=new o$1o((r.right-r.left)/2,(r.bottom-r.top)/2),a=new o$1o(n.clientX-r.left,n.clientY-r.top),s=o$1o.subtract(a,o,z),l=Math.atan2(-s.y,s.x)-e.rotateInitialCursorAngle,u=e$2a.zeroToTwoPi(e.rotateInitialCameraAngle-l),c=e.viewer.scene.camera,h=p$1d.clone(c.transform,x$1);c.lookAtTransform(e.rotateFrame);var d=-c.heading;c.rotateRight(u-d),c.lookAtTransform(h)},e.rotateMouseUpFunction=function(t){e.isRotating=!1,e.screenSpaceEventHandler.removeInputAction(G$I.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e.rotateMouseMoveFunction=void 0,e.rotateMouseUpFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.rotateMouseMoveFunction,G$I.MOUSE_MOVE),e.screenSpaceEventHandler.setInputAction(e.rotateMouseUpFunction,G$I.LEFT_UP)}var C$1=[{x:56,y:3},{x:59,y:4},{x:64,y:5},{x:69,y:6},{x:74,y:7},{x:79,y:9},{x:84,y:12},{x:89,y:15},{x:92,y:19},{x:94,y:20},{x:99,y:25},{x:104,y:34},{x:106,y:40},{x:107,y:44},{x:107,y:46},{x:107,y:48},{x:107,y:50},{x:107,y:52},{x:107,y:54},{x:107,y:56}],Z$1=Math.PI/40;function nt(e,t,i){e.screenSpaceEventHandler.removeInputAction(G$I.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e.tiltMouseMoveFunction=void 0,e.tiltMouseUpFunction=void 0;var n=e$2a.PI_OVER_TWO-Math.atan2(-i.y,i.x);n=(n=n<0?0:n)>e$2a.PI_OVER_TWO?e$2a.PI_OVER_TWO:n,e.tiltInitialCursorAngle=n,e.isTilting=!0;var r=e.viewer.scene,o=r.camera,a=N;a.x=r.canvas.clientWidth/2,a.y=r.canvas.clientHeight/2;for(var s=o.pickEllipsoid(a,r.globe.ellipsoid,d$3);!e$2b(s)&&a.y<r.canvas.clientHeight;)a.y+=5,s=o.pickEllipsoid(a,r.globe.ellipsoid,d$3);!e$2b(s)||(e.tiltFrame=m$17.eastNorthUpToFixedFrame(s,r.globe.ellipsoid,W$1),e.tiltMouseMoveFunction=function(i,n){e.isTilting=!0;var r=t.getBoundingClientRect(),o=new o$1o((r.right-r.left)/2,(r.bottom-r.top)/2),a=new o$1o(n.clientX-r.left,n.clientY-r.top),s=o$1o.subtract(a,o,z),l=e$2a.PI_OVER_TWO-Math.atan2(-s.y,s.x);l=(l=l<0?0:l)>e$2a.PI_OVER_TWO?e$2a.PI_OVER_TWO:l;var u=e.viewer.scene.camera,c=p$1d.clone(u.transform,x$1);u.lookAtTransform(e.tiltFrame);var h=l-e.tiltInitialCursorAngle;u.rotateUp(h),e.tiltInitialCursorAngle=l,u.lookAtTransform(c);var d=Math.ceil(l/Z$1),f=C$1[d=d>19?19:d];e.tiltbarLeft=f.x,e.tiltbarTop=f.y},e.tiltMouseUpFunction=function(t){e.isTilting=!1,e.screenSpaceEventHandler.removeInputAction(G$I.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e.tiltMouseMoveFunction=void 0,e.tiltMouseUpFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.tiltMouseMoveFunction,G$I.MOUSE_MOVE),e.screenSpaceEventHandler.setInputAction(e.tiltMouseUpFunction,G$I.LEFT_UP))}function j$3(e,t){var i=e.camera,n=e.canvas,r=new o$1o;r.x=n.clientWidth/2,r.y=n.clientHeight/2;var o=q(e,r);if(e$2b(o)){var a=o$1p.distance(i.positionWC,o),s=.0618*t*.2;return a*(s=a>300?s:2*s)}}function L$2(e,t){var i=e.viewer.scene,n=i.camera,r=i.canvas,o=new o$1o;o.x=r.clientWidth/2,o.y=r.clientHeight/2;var a=q(i,o);if(e$2b(a)){var s=o$1p.distance(n.position,a),l=.0618*t*.2;l=s>300?l:2*l,n.position;var u=s*l,c=new o$1p;o$1p.subtract(a,n.position,c);var h=new o$1p,d=(h=o$1p.clone(n.right,h),o$1p.dot(c,h)),f=new o$1p;f=o$1p.multiplyByScalar(h,d,f);var p=new o$1p;p=o$1p.subtract(c,f,p);var _=new o$1p;_=o$1p.normalize(p,_),new o$1p,n.move(_,u);var m=new o$1p;m=o$1p.normalize(a,m);var g=o$1p.magnitude(a),x=t$13.fromCartesian3(g),v=n.pickEllipsoid(o,x,new o$1p);if(e$2b(v)&&!isNaN(v.x)&&!isNaN(v.y)&&!isNaN(v.z)&&(v=o$1p.normalize(v,v),!(n._positionCartographic.height<0))){var y=o$1p.angleBetween(m,v);if(!e$2a.equalsEpsilon(y,0,e$2a.EPSILON10)){var $=new o$1p;$=o$1p.cross(m,v,$),n.rotate($,y)}}}}var et=new f$17,rt$1=new o$1p,at$1=new o$1p;function q(e,t){var i=e.globe,n=e.camera;if(e$2b(i)){var r;e.pickPositionSupported&&(r=e.pickPositionWorldCoordinates(t,rt$1));var o=n.getPickRay(t,et),a=i.pick(o,e,at$1);return(e$2b(r)?o$1p.distance(r,n.positionWC):Number.POSITIVE_INFINITY)<(e$2b(a)?o$1p.distance(a,n.positionWC):Number.POSITIVE_INFINITY)?r:a}}var t=function(e){if(!e$2b(e)||!e$2b(e.container))throw new t$16("options.container is required.");if(!e$2b(e.scene))throw new t$16("options.scene is required.");if(!e$2b(e.viewer))throw new t$16("options.viewer is required.");var t=i$c(e.container);this._viewModel=new y(e,t),m$2(t,this._viewModel),s$Y.isPCBroswer()||(document.querySelector(".sm-zoom").style.visibility="visible",document.querySelector(".sm-compass-tiltbar").style.visibility="visible",document.querySelector(".sm-compass-arrows").style.visibility="visible",document.querySelector(".sm-compass-tilt").style.visibility="visible")};function m$2(e,t){var i=['<div class="sm-compass" data-bind="visible: showCompass, event: { mousedown: handleMouseDown , touchstart : handleMouseDown, mouseup: handleMouseUp, touchend: handleMouseUp}">','<div class="sm-compass-tilt"></div>',"<div class=\"sm-compass-tiltbar\" data-bind = \"style : { left : + tiltbarLeft + 'px',top : + tiltbarTop + 'px'}\"></div>",'<div class="sm-compass-arrows"></div>',"<div class=\"sm-compass-outer-ring\" data-bind=\"style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }\"></div>",'<div class="arrows_e_active"></div>','<div class="arrows_n_active"></div>','<div class="arrows_s_active"></div>','<div class="arrows_w_active"></div>',"</div>",'<div class="sm-zoom">','<div class="sm-zoomin" data-bind="event : {mousedown : handleZoomInMouseDown,touchstart : handleZoomInMouseDown}"></div>','<div class="sm-zoomout" data-bind="event : {mousedown : handleZoomOutMouseDown, touchstart : handleZoomOutMouseDown}"></div>','<div class="sm-zoombar" data-bind="event : {mousedown : handleZoomBarScrollMouseDown, touchstart : handleZoomBarScrollMouseDown},style : {top : + zoombarTop + \'px\' }"></div>'," </div>"].join("");f$1(i,e,t)}function i$4(){this.showInstructions=!1;var e=this;this._command=s$4((function(){e.showInstructions=!e.showInstructions})),this._showClick=s$4((function(){e._touch=!1})),this._showTouch=s$4((function(){e._touch=!0})),this._touch=!1,this.tooltip="Navigation Instructions",ce$1.track(this,["tooltip","showInstructions","_touch"])}function l$3(e){if(!e$2b(e)||!e$2b(e.container))throw new t$16("options.container is required.");var t=i$c(e.container),i=new i$4,n=u$_(e.instructionsInitiallyVisible,!1);i.showInstructions=n,i._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";var r=document.createElement("span");r.className="supermap3d-navigationHelpButton-wrapper",t.appendChild(r);var o=document.createElement("button");o.type="button",o.className="supermap3d-button supermap3d-toolbar-button supermap3d-navigation-help-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),r.appendChild(o);var a=document.createElement("div");a.className="supermap3d-navigation-help",a.setAttribute("data-bind",'css: { "supermap3d-navigation-help-visible" : showInstructions}'),r.appendChild(a);var s=document.createElement("button");s.type="button",s.className="supermap3d-navigation-button supermap3d-navigation-button-left",s.setAttribute("data-bind",'click: showClick, css: {"supermap3d-navigation-button-selected": !_touch, "supermap3d-navigation-button-unselected": _touch}');var l=document.createElement("img");l.src=n$15("Widgets/Images/NavigationHelp/Mouse.svg"),l.className="supermap3d-navigation-button-icon",l.style.width="25px",l.style.height="25px",s.appendChild(l),s.appendChild(document.createTextNode("Mouse"));var u=document.createElement("button");u.type="button",u.className="supermap3d-navigation-button supermap3d-navigation-button-right",u.setAttribute("data-bind",'click: showTouch, css: {"supermap3d-navigation-button-selected": _touch, "supermap3d-navigation-button-unselected": !_touch}');var c=document.createElement("img");c.src=n$15("Widgets/Images/NavigationHelp/Touch.svg"),c.className="supermap3d-navigation-button-icon",c.style.width="25px",c.style.height="25px",u.appendChild(c),u.appendChild(document.createTextNode("Touch")),a.appendChild(s),a.appendChild(u);var h=document.createElement("div");h.className="supermap3d-click-navigation-help supermap3d-navigation-help-instructions",h.setAttribute("data-bind",'css: { "supermap3d-click-navigation-help-visible" : !_touch}'),h.innerHTML=' <table> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/MouseLeft.svg")+'" width="48" height="48" /></td> <td> <div class="supermap3d-navigation-help-pan">Pan view</div> <div class="supermap3d-navigation-help-details">Left click + drag</div> </td> </tr> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/MouseRight.svg")+'" width="48" height="48" /></td> <td> <div class="supermap3d-navigation-help-zoom">Zoom view</div> <div class="supermap3d-navigation-help-details">Right click + drag, or</div> <div class="supermap3d-navigation-help-details">Mouse wheel scroll</div> </td> </tr> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/MouseMiddle.svg")+'" width="48" height="48" /></td> <td> <div class="supermap3d-navigation-help-rotate">Rotate view</div> <div class="supermap3d-navigation-help-details">Middle click + drag, or</div> <div class="supermap3d-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>',a.appendChild(h);var d=document.createElement("div");d.className="supermap3d-touch-navigation-help supermap3d-navigation-help-instructions",d.setAttribute("data-bind",'css: { "supermap3d-touch-navigation-help-visible" : _touch}'),d.innerHTML=' <table> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/TouchDrag.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-pan">Pan view</div> <div class="supermap3d-navigation-help-details">One finger drag</div> </td> </tr> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/TouchZoom.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-zoom">Zoom view</div> <div class="supermap3d-navigation-help-details">Two finger pinch</div> </td> </tr> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/TouchTilt.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-rotate">Tilt view</div> <div class="supermap3d-navigation-help-details">Two finger drag, same direction</div> </td> </tr> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/TouchRotate.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-tilt">Rotate view</div> <div class="supermap3d-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>',a.appendChild(d),ce$1.applyBindings(i,r),this._container=t,this._viewModel=i,this._wrapper=r,this._closeInstructions=function(e){r.contains(e.target)||(i.showInstructions=!1)},s$Y.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}function r$2(e){if(!e$2b(e)||!e$2b(e.scene))throw new t$16("options.scene is required.");this._scene=e.scene,this.lowFrameRateMessage=u$_(e.lowFrameRateMessage,"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,ce$1.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);var t=this;this._dismissMessage=s$4((function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0}));var i=i$f.fromScene(e.scene);this._unsubscribeLowFrameRate=i.lowFrameRate.addEventListener((function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)})),this._unsubscribeNominalFrameRate=i.nominalFrameRate.addEventListener((function(){t.showingLowFrameRateMessage=!1}))}function i$3(e){if(!e$2b(e)||!e$2b(e.container))throw new t$16("options.container is required.");if(!e$2b(e.scene))throw new t$16("options.scene is required.");var t=i$c(e.container),i=new r$2(e),n=document.createElement("div");n.className="supermap3d-performance-watchdog-message-area",n.setAttribute("data-bind","visible: showingLowFrameRateMessage");var r=document.createElement("button");r.setAttribute("type","button"),r.className="supermap3d-performance-watchdog-message-dismiss",r.innerHTML="×",r.setAttribute("data-bind","click: dismissMessage"),n.appendChild(r);var o=document.createElement("div");o.className="supermap3d-performance-watchdog-message",o.setAttribute("data-bind","html: lowFrameRateMessage"),n.appendChild(o),t.appendChild(n),ce$1.applyBindings(i,n),this._container=t,this._viewModel=i,this._element=n}function o$1(e){if(!e$2b(e))throw new t$16("scene is required.");this._scene=e,this._orthographic=e.camera.frustum instanceof a$V,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,ce$1.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);var t=this;ce$1.defineProperty(this,"selectedTooltip",(function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective})),this._toggleDropDown=s$4((function(){t.sceneMode===C$13.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)})),this._eventHelper=new n$x,this._eventHelper.add(e.morphComplete,(function(e,i,n,r){t.sceneMode=n,t._orthographic=n===C$13.SCENE2D||t._scene.camera.frustum instanceof a$V})),this._eventHelper.add(e.preRender,(function(){t._flightInProgress=e$2b(e.camera._currentFlight)})),this._switchToPerspective=s$4((function(){t.sceneMode!==C$13.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)})),this._switchToOrthographic=s$4((function(){t.sceneMode!==C$13.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)})),this._sceneMode=C$13}Object.defineProperties(t.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Object.defineProperties(i$4.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}}),Object.defineProperties(l$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),l$3.prototype.isDestroyed=function(){return!1},l$3.prototype.destroy=function(){return s$Y.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),ce$1.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i$10(this)},Object.defineProperties(r$2.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}}),r$2.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),i$10(this)},Object.defineProperties(i$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),i$3.prototype.isDestroyed=function(){return!1},i$3.prototype.destroy=function(){return this._viewModel.destroy(),ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$10(this)},Object.defineProperties(o$1.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}}),o$1.prototype.isDestroyed=function(){return!1},o$1.prototype.destroy=function(){this._eventHelper.removeAll(),i$10(this)};var v$1="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",b$1="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function n$1(e,t){if(!e$2b(e))throw new t$16("container is required.");if(!e$2b(t))throw new t$16("scene is required.");e=i$c(e);var i=new o$1(t);i._perspectivePath=v$1,i._orthographicPath=b$1;var n=document.createElement("span");n.className="supermap3d-projectionPicker-wrapper supermap3d-toolbar-button",e.appendChild(n);var r=document.createElement("button");r.type="button",r.className="supermap3d-button supermap3d-toolbar-button",r.setAttribute("data-bind",'css: { "supermap3d-projectionPicker-buttonPerspective": !_orthographic, "supermap3d-projectionPicker-buttonOrthographic": _orthographic, "supermap3d-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "supermap3d-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "supermap3d-projectionPicker-iconPerspective" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "supermap3d-projectionPicker-iconOrthographic" } --\x3e\x3c!-- /ko --\x3e',n.appendChild(r);var o=document.createElement("button");o.type="button",o.className="supermap3d-button supermap3d-toolbar-button supermap3d-projectionPicker-dropDown-icon",o.setAttribute("data-bind",'css: { "supermap3d-projectionPicker-visible" : (dropDownVisible && _orthographic), "supermap3d-projectionPicker-none" : !_orthographic, "supermap3d-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),n.appendChild(o);var a=document.createElement("button");a.type="button",a.className="supermap3d-button supermap3d-toolbar-button supermap3d-projectionPicker-dropDown-icon",a.setAttribute("data-bind",'css: { "supermap3d-projectionPicker-visible" : (dropDownVisible && !_orthographic), "supermap3d-projectionPicker-none" : _orthographic, "supermap3d-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),n.appendChild(a),ce$1.applyBindings(i,n),this._viewModel=i,this._container=e,this._wrapper=n,this._closeDropDown=function(e){n.contains(e.target)||(i.dropDownVisible=!1)},s$Y.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function i$2(e,t){if(!e$2b(e))throw new t$16("scene is required.");this._scene=e;var i=this;this._eventHelper=new n$x,this._eventHelper.add(e.morphStart,(function(e,t,n,r){i.sceneMode=n,i.dropDownVisible=!1})),this._duration=u$_(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",ce$1.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,ce$1.defineProperty(this,"selectedTooltip",(function(){var e=i.sceneMode;return e===C$13.SCENE2D?i.tooltip2D:e===C$13.SCENE3D?i.tooltip3D:i.tooltipColumbusView})),this._toggleDropDown=s$4((function(){i.dropDownVisible=!i.dropDownVisible})),this._morphTo2D=s$4((function(){e.morphTo2D(i._duration)})),this._morphTo3D=s$4((function(){e.morphTo3D(i._duration)})),this._morphToColumbusView=s$4((function(){e.morphToColumbusView(i._duration)})),this._sceneMode=C$13}Object.defineProperties(n$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),n$1.prototype.isDestroyed=function(){return!1},n$1.prototype.destroy=function(){return this._viewModel.destroy(),s$Y.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ce$1.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i$10(this)},Object.defineProperties(i$2.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){if(e<0)throw new t$16("duration value must be positive.");this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}}),i$2.prototype.isDestroyed=function(){return!1},i$2.prototype.destroy=function(){this._eventHelper.removeAll(),i$10(this)};var D$1="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",P$1="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",_$1="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function c$2(e,t,i){if(!e$2b(e))throw new t$16("container is required.");if(!e$2b(t))throw new t$16("scene is required.");e=i$c(e);var n=new i$2(t,i);n._globePath=D$1,n._flatMapPath=P$1,n._columbusViewPath=_$1;var r=document.createElement("span");r.className="supermap3d-sceneModePicker-wrapper supermap3d-toolbar-button",e.appendChild(r);var o=document.createElement("button");o.type="button",o.className="supermap3d-button supermap3d-toolbar-button",o.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "supermap3d-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "supermap3d-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "supermap3d-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "supermap3d-sceneModePicker-slide-svg supermap3d-sceneModePicker-icon3D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "supermap3d-sceneModePicker-slide-svg supermap3d-sceneModePicker-icon2D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "supermap3d-sceneModePicker-slide-svg supermap3d-sceneModePicker-iconColumbusView" } --\x3e\x3c!-- /ko --\x3e',r.appendChild(o);var a=document.createElement("button");a.type="button",a.className="supermap3d-button supermap3d-toolbar-button supermap3d-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "supermap3d-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "supermap3d-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),r.appendChild(a);var s=document.createElement("button");s.type="button",s.className="supermap3d-button supermap3d-toolbar-button supermap3d-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "supermap3d-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "supermap3d-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),r.appendChild(s);var l=document.createElement("button");l.type="button",l.className="supermap3d-button supermap3d-toolbar-button supermap3d-sceneModePicker-dropDown-icon",l.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "supermap3d-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "supermap3d-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),r.appendChild(l),ce$1.applyBindings(n,r),this._viewModel=n,this._container=e,this._wrapper=r,this._closeDropDown=function(e){r.contains(e.target)||(n.dropDownVisible=!1)},s$Y.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(c$2.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),c$2.prototype.isDestroyed=function(){return!1},c$2.prototype.destroy=function(){return this._viewModel.destroy(),s$Y.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ce$1.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i$10(this)};var m$1=new o$1o,s$2="-1000px";function n(e,t,i){if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(t))throw new t$16("selectionIndicatorElement is required.");if(!e$2b(i))throw new t$16("container is required.");this._scene=e,this._screenPositionX=s$2,this._screenPositionY=s$2,this._tweens=e.tweens,this._container=u$_(i,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,ce$1.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,ce$1.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&e$2b(this.position)}}),ce$1.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return s$Q.wgs84ToWindowCoordinates(e,t,i)}}function i$1(e,t){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e),this._container=e;var i=document.createElement("div");i.className="supermap3d-selection-wrapper",i.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "supermap3d-selection-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var r="http://www.w3.org/2000/svg",o=document.createElementNS(r,"svg:svg");o.setAttribute("width",160),o.setAttribute("height",160),o.setAttribute("viewBox","0 0 160 160");var a=document.createElementNS(r,"g");a.setAttribute("transform","translate(80,80)"),o.appendChild(a);var s=document.createElementNS(r,"path");s.setAttribute("data-bind","attr: { transform: _transform }"),s.setAttribute("d","M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z"),a.appendChild(s),i.appendChild(o);var l=new n(t,this._element,this._container);this._viewModel=l,ce$1.applyBindings(this._viewModel,this._element)}n.prototype.update=function(){if(this.showSelection&&e$2b(this.position)){var e=this.computeScreenSpacePosition(this.position,m$1);if(e$2b(e)){var t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,r=this._selectionIndicatorElement.clientWidth,o=.5*r;e.x=Math.min(Math.max(e.x,-r),i+r)-o,e.y=Math.min(Math.max(e.y,-r),n+r)-o,this._screenPositionX=Math.floor(e.x+.25)+"px",this._screenPositionY=Math.floor(e.y+.25)+"px"}else this._screenPositionX=s$2,this._screenPositionY=s$2}},n.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:m$W.EXPONENTIAL_OUT})},n.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:m$W.EXPONENTIAL_OUT})},Object.defineProperties(n.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(i$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),i$1.prototype.isDestroyed=function(){return!1},i$1.prototype.destroy=function(){var e=this._container;return ce$1.cleanNode(this._element),e.removeChild(this._element),i$10(this)};var C={UNLOAD:0,LOADING:1,LOADED:2,LOST:3},Be=new i$V("S3MTilesParser",1e4);function g(e,t,i,n,r){this._viewer=e,this._context=t,this._state=C.UNLOAD,this._url=i,this._gl=t._gl,this._renderEntities=[],this._visible=!1,this._scale=u$_(r,1),this._position=o$1p.clone(n),this._modelMatrix=m$17.eastNorthUpToFixedFrame(n,void 0,new p$1d),null!==t.s3tc?this._supportCompressType=1:null!==t.pvrtc?this._supportCompressType=2:null!==t.etc1&&(this._supportCompressType=3)}function Ue(e){let t=o$1p.distance(e._position,e._viewer.camera.position),i=e._viewer.camera.frustum.near,n=e._viewer.scene._view.viewport.height,r=e._viewer.camera.frustum.fov;return 25/n*Math.tan(r/2)*i*2/(i/(i+t))}function d$2(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(e$2b(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function he(e,t,i){if(e$2b(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];e$2b(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}}function Fe(e,t,i){if(!e$2b(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];e$2b(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function l$2(e,t,i){var n=d$2(e,t,i);if(e$2b(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function R(e,t,i){var n=d$2(e,t,i);if(e$2b(n))return n.textContent.trim()}function Ve$1(e,t,i){var n=d$2(e,t,i);if(e$2b(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}Object.defineProperties(g.prototype,{visible:{set:function(e){this._visible=e},get:function(){return this._visible}},position:{get:function(){return this._position}},scale:{get:function(){return this._scale}}}),g.prototype.setModelMatrix=function(e,t){this._position=o$1p.clone(t);var i=Ue(this),n=m$17.eastNorthUpToFixedFrame(t,void 0,new p$1d);p$1d.multiplyByUniformScale(n,i,this._modelMatrix);for(var r=this._renderEntities,o=0,a=r.length;o<a;o++){var s=r[o],l=s._oriCenter,u=s._colorCommand;e$2b(u)&&(u.modelMatrix=p$1d.clone(this._modelMatrix),p$1d.multiplyByPoint(this._modelMatrix,l,u.boundingVolume.center))}},g.prototype.load=function(){var e=this,t=this._state;if(C.UNLOAD==t){var i=o$N(this._url,(function(e){return o$10(e)}));e$2b(i)&&(this._state=C.LOADING,i.then((function(t){Ge(e,t)}),(function(e){this._state=C.UNLOAD})))}},g.prototype.update=function(e){if(this._visible&&!e.passes.fbo){if(!this._ready)return void this.load();e.context;var t=this._renderEntities;if(t&&0!=t.length)for(var i=0,n=t.length;i<n;i++){var r=t[i];e$2b(r._colorCommand)&&!o$1p.equals(r._colorCommand.boundingVolume.center,o$1p.ZERO)&&e.commandList.push(r._colorCommand)}}},g.prototype.isDestroyed=function(){return!1},g.prototype.destroy=function(){for(var e=this._renderEntities,t=0,i=e.length;t<i;t++){e[t].destroy()}return this._renderEntities.length=0,this._viewer._tiltIndicator=void 0,i$10(this)};var Me=new s$S;function Ge(e,t){var i={buffer:t,supportCompressType:e._supportCompressType},n=Be.scheduleTask(i,[t]);e$2b(n)?n.then((function(t){if(t.result){e._gl;for(var i=e._context,n=Me.read(t.xmlDoc).firstChild,r=n.namespaceURI,o=Fe(d$2(n,"Material3Ds",r),"material",r),a={},s=0,l=o.length;s<l;s++){var u=o[s],c=R(u,"name",r),h=new _0x21d1b1({});a[c]=h;var d=d$2(u,"Ambient",r),f=l$2(d,"AmbientR",r),p=l$2(d,"AmbientG",r),_=l$2(d,"AmbientB",r),m=l$2(d,"AmbientA",r);h._ambientColor=new e$1U(f,p,_,m);var g=d$2(u,"Diffuse",r);f=l$2(g,"DiffuseR",r),p=l$2(g,"DiffuseG",r),_=l$2(g,"DiffuseB",r),m=l$2(g,"DiffuseA",r),h._diffuseColor=new e$1U(f,p,_,m);var x=d$2(u,"Specular",r);f=l$2(x,"SpecularR",r),p=l$2(x,"SpecularG",r),_=l$2(x,"SpecularB",r),m=l$2(x,"SpecularA",r),h._specularColor=new e$1U(f,p,_,m);var v=l$2(u,"Shininess",r);h._shininess=v,d$2(u,"TransparentSorting",r),h._bTransparentSorting=Ve$1(u,"TransparentSorting",r);var y=d$2(u,"texture",r),$=R(y,"name",r),b=d$2(y,"AddressMode",r),T=R(b,"u",r),S=R(b,"v",r);T="TAM_WRAP"===T?q$19.REPEAT:q$19.CLAMP_TO_EDGE,S="TAM_WRAP"===S?q$19.REPEAT:q$19.CLAMP_TO_EDGE;var w=t.texturePackage[$];if(e$2b(w)){$=i._id+"_"+$;var E=Se$d.CreateTexture($,i,w.width,w.height,w.nFormat,w.compressType,w.imageBuffer,!1,T,S);h._textures.push(E)}}var P=he(d$2(n,"PageLods",r),"Geode",r);for(s=0,l=P.length;s<l;s++){for(var A=P[s],L=R(A,"GeoDeModMatrix",r).split(","),M=0;M<16;M++)L[M]=parseFloat(L[M]);L=p$1d.unpack(L,0);for(var I=he(A,"GeoName",r),O=[],D=0,B=I.length;D<B;D++){var N=I[D].textContent.trim();O.push(N)}for(var F=[],U=new i$1c,z=0;z<O.length;z++){var G=ze$1(W=(k=t.geoPackage[O[z]]).vertexPackage,L);F.push(G)}var V=new o$1p;F.length>0&&(i$1c.fromBoundingSpheres(F,U),V=o$1p.clone(U.center),F.length=0),e.oriRadius=U.radius;for(B=0;B<O.length;B++){var k,W=(k=t.geoPackage[O[B]]).vertexPackage,H=k.arrIndexPackage,q={};for(var j in H){var Y=H[j];if(e$2b(Y)){h=a[c=Y.materialCode];q[c]=h}}var X=new T$1({vertexPackage:W,arrIndexPackage:H,version:t.version,mapPass:q,boundingVolume:U,oriCenter:V,owner:e});X.initialize(e._context),e._renderEntities.push(X)}}e._ready=!0,e._state=C.LOADED}else e._state=C.UNLOAD})):e.state=C.UNLOAD}function ze$1(e,t){for(var i=[],n=new i$1c,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1c.fromPoints(i,n),i.length=0,i$1c.transform(n,t,n),n}function T$1(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;this._arrIndexPackage=t,this._vertexPackage=i,this._owner=e.owner,this._attributeLocations={},this._initialize=!1,this._mapPass=n,this._boundingVolume=e.boundingVolume,this._oriCenter=e.oriCenter}function s$1(e,t,i){this._color=e,this._height=t,this._base=u$_(i,0)}function v(e,t,i,n){this.interval=e,this.height=t,this.color=i||new e$1U(.5,.5,.5,1),this.backgroundColor=n||new e$1U(0,0,0,0)}T$1.prototype.initialize=function(e){this._initialize||(this.createCommand(e),this._initialize=!0)},T$1.prototype.createVertexData=function(e){var t=this._vertexPackage.vertexAttributes;for(var i in this._vertexPackage.attrLocation){var n=this._vertexPackage.attrLocation[i];this._vertexPackage.vertexAttributes[n].name=i}for(var r=0,o=t.length;r<o;r++){var a=t[r];!e$2b(a.typedArray)||(a.vertexBuffer=t$Y.createVertexBuffer({context:e,typedArray:a.typedArray,usage:A$19.STATIC_DRAW}),a.typedArray=null,delete a.typedArray)}return this._attributeLocations=this._vertexPackage.attrLocation,t},T$1.prototype.createCommand=function(e){var t=this.createVertexData(e),i=Le$s.OPAQUE,n=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),r=this._vertexPackage.verticesCount,o=this._arrIndexPackage[0];if(e$2b(o)){var a=ce$x.UNSIGNED_SHORT;(1===o.indexType||r>=e$2a.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(a=ce$x.UNSIGNED_INT);var s=t$Y.createIndexBuffer({context:e,typedArray:o.indicesTypedArray,usage:A$19.STATIC_DRAW,indexDatatype:a}),l=this._mapPass[o.materialCode]||_0x21d1b1.Default,u=W$18.TRIANGLES;switch(o.primitiveType){case 1:u=W$18.POINTS;break;case 2:u=W$18.LINES;break;case 4:u=W$18.TRIANGLES}var c=new i$_({primitiveType:u,boundingVolume:this._boundingVolume,pass:i,owner:this,cull:!1,modelMatrix:p$1d.clone(this._owner._modelMatrix)});c.vertexArray=new c$12({context:e,attributes:t,indexBuffer:s});var h=new s$U({name:"tiltIndicatorVS",sources:["attribute vec4 aPosition;\n attribute vec3 aNormal;\n attribute vec4 aTexCoord0;\n #ifdef VertexColor\n attribute vec4 aColor;\n #endif\n uniform vec4 uAmbientColor;\n uniform vec4 uDiffuseColor;\n uniform vec4 uSpecularColor;\n varying vec2 vTexCoord;\n varying vec4 vColor;\n const float SHIFT_LEFT8 = 256.0;\n const float SHIFT_RIGHT8 = 1.0 / 256.0;\n const vec4 LIGHT_COLOR = vec4(0.8, 0.8, 0.8, 1.0);\n vec4 vertexColor = vec4(1.0);\n #ifdef VertexColor\n vertexColor = aColor;\n #endif\n void main()\n {\n vec4 vertexPos = aPosition;\n vTexCoord = aTexCoord0.xy;\n vertexPos.w = 1.0;\n gl_Position = czm_modelViewProjection * vertexPos;\n vColor = vertexColor;\n vec4 eyePosition = czm_modelView * vertexPos;\n vec3 normal = normalize(aNormal);\n vec3 lightDirection = normalize(czm_sunPositionWC - vec3(eyePosition));\n float nDotL = max(dot(lightDirection, normal), 0.0);\n vec4 diffuse = uDiffuseColor * LIGHT_COLOR * nDotL;\n vec4 ambient = uAmbientColor * LIGHT_COLOR;\n vec4 materialColor = clamp(diffuse + ambient, vec4(0.0), vec4(1.0));\n vColor = vColor * materialColor;\n }"]}),d=new s$U({name:"tiltIndicatorFS",sources:["#ifdef TEXTURE_ENABLE\n uniform sampler2D uTexture;\n #endif\n varying vec2 vTexCoord;\n varying vec4 vColor;\n void main()\n {\n #ifdef TEXTURE_ENABLE\n vec2 vecTexCoord = vec2(vTexCoord.x,1.0-vTexCoord.y);\n gl_FragColor = texture2D(uTexture, vecTexCoord.xy, 0.0) * vColor;\n #else\n gl_FragColor = vColor;\n #endif\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n }"]});e$2b(this._attributeLocations.aTexCoord0)&&l._textures.length>0&&d.defines.push("TEXTURE_ENABLE"),e$2b(this._attributeLocations.aColor)&&h.defines.push("VertexColor"),c.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:this._attributeLocations}),c.uniformMap={uTexture:function(){return l._textures[0]},uAmbientColor:function(){return l._ambientColor},uDiffuseColor:function(){return l._diffuseColor},uSpecularColor:function(){return l._specularColor}},c.renderState=n,this._colorCommand=c,this._vertexPackage=null,this._arrIndexPackage.length=0}},T$1.prototype.isDestroyed=function(){return!1},T$1.prototype.destroy=function(){for(var e in this._mapPass)this._mapPass.hasOwnProperty(e)&&this._mapPass[e].destroy();return this._mapPass.length=0,e$2b(this._colorCommand)&&(this._colorCommand.vertexArray=this._colorCommand.vertexArray&&!this._colorCommand.vertexArray.isDestroyed()&&this._colorCommand.vertexArray.destroy(),this._colorCommand.shaderProgram=this._colorCommand.shaderProgram&&!this._colorCommand.shaderProgram.isDestroyed()&&this._colorCommand.shaderProgram.destroy(),this._colorCommand=void 0),this._vertexPackage=null,this._arrIndexPackage.length=0,this._attributeLocations=void 0,i$10(this)},s$1.prototype.getHeight=function(){return this._height},s$1.prototype.getBase=function(){return this._base},s$1.prototype.getStartTime=function(){return this._start},s$1.prototype.getStopTime=function(){return this._stop},s$1.prototype.setRange=function(e,t){this._start=e,this._stop=t},s$1.prototype.render=function(e){var t="";if(this._start&&this._stop&&this._color){var i=a$15.secondsDifference(this._start,e.epochJulian),n=Math.round(e.timeBarWidth*e.getAlpha(i)),r=a$15.secondsDifference(this._stop,e.epochJulian),o=Math.round(e.timeBarWidth*e.getAlpha(r))-n;n<0&&(o+=n,n=0),n+o>e.timeBarWidth&&(o=e.timeBarWidth-n),o>0&&(t='<span class="supermap3d-timeline-highlight" style="left: '+n.toString()+"px; width: "+o.toString()+"px; bottom: "+this._base.toString()+"px; height: "+this._height+"px; background-color: "+this._color+';"></span>')}return t},v.prototype.render=function(e,t){var i=this.interval.start,n=this.interval.stop,r=t.startJulian,o=a$15.addSeconds(t.startJulian,t.duration,new a$15);if(a$15.lessThan(i,r)&&a$15.greaterThan(n,o))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(a$15.lessThanOrEquals(i,o)&&a$15.greaterThanOrEquals(n,r)){var a,s,l;for(a=0;a<t.timeBarWidth;++a){var u=a$15.addSeconds(t.startJulian,a/t.timeBarWidth*t.duration,new a$15);!e$2b(s)&&a$15.greaterThanOrEquals(u,i)?s=a:!e$2b(l)&&a$15.greaterThanOrEquals(u,n)&&(l=a)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),e$2b(s)&&(e$2b(l)||(l=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(s,t.y,Math.max(l-s,1),this.height))}};var Z=1e12,_={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},c$1={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},T=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6];function u$3(e,t){if(!e$2b(e))throw new t$16("container is required.");if(!e$2b(t))throw new t$16("clock is required.");e=i$c(e),this.container=e;var i=document.createElement("div");i.className="supermap3d-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=_.none,this._touchMode=c$1.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="supermap3d-timeline-bar"></div><div class="supermap3d-timeline-trackContainer"><canvas class="supermap3d-timeline-tracks" width="10" height="1"></canvas></div><div class="supermap3d-timeline-needle"></div><span class="supermap3d-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=ot(this),this._onMouseUp=at(this),this._onMouseMove=rt(this),this._onMouseWheel=ht(this),this._onTouchStart=ct(this),this._onTouchMove=dt(this),this._onTouchEnd=ut(this);var n=this._timeBarEle;document.addEventListener("mouseup",this._onMouseUp,!1),document.addEventListener("mousemove",this._onMouseMove,!1),n.addEventListener("mousedown",this._onMouseDown,!1),n.addEventListener("touchstart",this._onTouchStart,!1),n.addEventListener("touchend",this._onTouchEnd,!1),n.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}function A(e){return e<10?"0"+e.toString():e.toString()}function ot(e){return function(t){e._mouseMode!==_.touchOnly&&(0===t.button?(e._mouseMode=_.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,2===t.button?e._mouseMode=_.zoom:e._mouseMode=_.slide)),t.preventDefault()}}function at(e){return function(t){e._mouseMode=_.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function rt(e){return function(t){var i;if(e._mouseMode===_.scrub){t.preventDefault();var n=t.clientX-e._topDiv.getBoundingClientRect().left;n<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):n>e._topDiv.clientWidth||(e._timelineDragLocation=void 0,e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===_.slide){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i){var r=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(a$15.addSeconds(e._startJulian,r,new a$15),a$15.addSeconds(e._endJulian,r,new a$15))}}else e._mouseMode===_.zoom&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i&&e.zoomFrom(Math.pow(1.01,i)))}}function ht(e){return function(t){var i=t.wheelDeltaY||t.wheelDelta||-t.detail;i/=Z=Math.max(Math.min(Math.abs(i),Z),1),e.zoomFrom(Math.pow(1.05,-i))}}function ct(e){return function(t){var i,n,r=t.touches.length,o=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=_.touchOnly,1===r?(i=a$15.secondsDifference(e._scrubJulian,e._startJulian),n=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+o),Math.abs(t.touches[0].clientX-n)<50?(e._touchMode=c$1.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===r?"-16px 0":"0 0")):(e._touchMode=c$1.singleTap,e._touchState.centerX=t.touches[0].clientX-o)):2===r?(e._touchMode=c$1.slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-o,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=c$1.ignore}}function ut(e){return function(t){var i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===c$1.singleTap?(e._touchMode=c$1.scrub,e._onTouchMove(t)):e._touchMode===c$1.scrub&&e._onTouchMove(t),e._mouseMode=_.touchOnly,1!==i?e._touchMode=i>0?c$1.ignore:c$1.none:e._touchMode===c$1.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function dt(e){return function(t){var i,n,r,o,a,s,l=1,u=e._topDiv.getBoundingClientRect().left;e._touchMode===c$1.singleTap&&(e._touchMode=c$1.slideZoom),e._mouseMode=_.touchOnly,e._touchMode===c$1.scrub?(t.preventDefault(),1===t.changedTouches.length&&((n=t.changedTouches[0].clientX-u)>=0&&n<=e._topDiv.clientWidth&&e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===c$1.slideZoom&&(2===(r=t.touches.length)?(o=.5*(t.touches[0].clientX+t.touches[1].clientX)-u,a=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===r&&(o=t.touches[0].clientX-u,a=0),e$2b(o)&&(a>0&&e._touchState.spanX>0?(l=e._touchState.spanX/a,s=a$15.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-o*e._timeBarSecondsSpan*l)/e._topDiv.clientWidth,new a$15)):(i=e._touchState.centerX-o,s=a$15.addSeconds(e._startJulian,i*e._timeBarSecondsSpan/e._topDiv.clientWidth,new a$15)),e.zoomTo(s,a$15.addSeconds(s,e._timeBarSecondsSpan*l,new a$15)),e._touchState.centerX=o,e._touchState.spanX=a))}}function f(e){return n$15("Assets/Textures/SkyBox/tycho2t3_80_"+e+".jpg")}function U(e){e._renderLoopRunning=!0;var t=0;p$H((function i(n){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{var r=e._targetFrameRate;if(e$2b(r)){var o=1e3/r,a=n-t;a>o&&(e.resize(),e.render(),t=n-a%o),p$H(i)}else e.resize(),e.render(),p$H(i)}catch(t){e._errorListenerEvent.raiseEvent(t)}else e._renderLoopRunning=!1}))}function j$2(e){var t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,e._pixelRatio=t,e$2b(e._scene)&&(e._scene.pixelRatio=t),t}function x(e){var t=e._canvas,i=t.clientWidth,n=t.clientHeight,r=j$2(e);e._canvasClientWidth=i,e._canvasClientHeight=n,i*=r,n*=r,t.width=i,t.height=n,e._canRender=0!==i&&0!==n,e._lastDevicePixelRatio=window.devicePixelRatio}function L$1(e){var t=e._canvas,i=t.width,n=t.height;if(0!==i&&0!==n){var r=e._scene.camera.frustum;e$2b(r.aspectRatio)?r.aspectRatio=i/n:(r.top=r.right*(n/i),r.bottom=-r.top)}}function u$2(e,t){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e),t=u$_(t,{}),this._options=t;var i=document.createElement("div");i.className="supermap3d-widget",e.appendChild(i);var n=document.createElement("canvas"),r=s$Y.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=r,r&&(n.style.imageRendering=s$Y.imageRenderingValue()),n.oncontextmenu=function(){return!1},n.onselectstart=function(){return!1},i.appendChild(n);var o=document.createElement("div");o.className="supermap3d-widget-credits";var a=e$2b(t.creditContainer)?i$c(t.creditContainer):i;a.appendChild(o);var s=e$2b(t.creditViewport)?i$c(t.creditViewport):i,l=u$_(t.showRenderLoopErrors,!0),u=u$_(t.useBrowserRecommendedResolution,!0);this._element=i,this._container=e,this._canvas=n,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=s,this._creditContainer=a,this._innerCreditContainer=o,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=l,this._resolutionScale=1,this._useBrowserRecommendedResolution=u,this._forceResize=!1,this._clock=e$2b(t.clock)?t.clock:new u$I,this._isShowErrorPanel=!0,this._errorListenerEvent=new o$1h,x(this),(!e$2b(t.contextOptions)||!e$2b(t.contextOptions)||t.contextOptions.contextType!=De$h.WebGPU)&&this._initScene()}function E(e){var t=!1,i=window.screen;return e$2b(i)&&(e$2b(i.lockOrientation)?t=i.lockOrientation(e):e$2b(i.mozLockOrientation)?t=i.mozLockOrientation(e):e$2b(i.msLockOrientation)?t=i.msLockOrientation(e):e$2b(i.orientation&&i.orientation.lock)&&(t=i.orientation.lock(e))),t}function u$1(){var e=window.screen;e$2b(e)&&(e$2b(e.unlockOrientation)?e.unlockOrientation():e$2b(e.mozUnlockOrientation)?e.mozUnlockOrientation():e$2b(e.msUnlockOrientation)?e.msUnlockOrientation():e$2b(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function O$1(e,t,i,n){n()||(i()?(t.useWebVR=!1,e._locked&&(u$1(),e._locked=!1),e._noSleep.disable(),l$1f.exitFullscreen(),i(!1)):(l$1f.fullscreen||l$1f.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=E("landscape")),t.useWebVR=!0,i(!0)))}function a(e,t){if(!e$2b(e))throw new t$16("scene is required.");var i=this,n=ce$1.observable(l$1f.enabled),r=ce$1.observable(!1);this.isVRMode=void 0,ce$1.defineProperty(this,"isVRMode",{get:function(){return r()}}),this.isVREnabled=void 0,ce$1.defineProperty(this,"isVREnabled",{get:function(){return n()},set:function(e){n(e&&l$1f.enabled)}}),this.tooltip=void 0,ce$1.defineProperty(this,"tooltip",(function(){return n()?r()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"}));var o=ce$1.observable(!1);this._isOrthographic=void 0,ce$1.defineProperty(this,"_isOrthographic",{get:function(){return o()}}),this._eventHelper=new n$x,this._eventHelper.add(e.preRender,(function(){o(e.camera.frustum instanceof a$V)})),this._locked=!1,this._noSleep=new b$4,this._command=s$4((function(){O$1(i,e,r,o)}),ce$1.getObservable(this,"isVREnabled")),this._vrElement=u$_(i$c(t),document.body),this._callback=function(){!l$1f.fullscreen&&r()&&(e.useWebVR=!1,i._locked&&(u$1(),i._locked=!1),i._noSleep.disable(),r(!1))},document.addEventListener(l$1f.changeEventName,this._callback)}u$3.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},u$3.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},u$3.prototype.isDestroyed=function(){return!1},u$3.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this),document.removeEventListener("mouseup",this._onMouseUp,!1),document.removeEventListener("mousemove",this._onMouseMove,!1);var e=this._timeBarEle;e.removeEventListener("mousedown",this._onMouseDown,!1),e.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),e.removeEventListener("mousewheel",this._onMouseWheel,!1),e.removeEventListener("touchstart",this._onTouchStart,!1),e.removeEventListener("touchmove",this._onTouchMove,!1),e.removeEventListener("touchend",this._onTouchEnd,!1),e.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),i$10(this)},u$3.prototype.addHighlightRange=function(e,t,i){var n=new s$1(e,t,i);return this._highlightRanges.push(n),this.resize(),n},u$3.prototype.addTrack=function(e,t,i,n){var r=new v(e,t,i,n);return this._trackList.push(r),this._lastHeight=void 0,this.resize(),r},u$3.prototype.zoomTo=function(e,t){if(!e$2b(e))throw new t$16("startTime is required.");if(!e$2b(t))throw new t$16("stopTime is required");if(a$15.lessThanOrEquals(t,e))throw new t$16("Start time must come before end time.");if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=a$15.secondsDifference(t,e),this._clock&&this._clock.clockRange!==tt$9.UNBOUNDED){var i=this._clock.startTime,n=this._clock.stopTime,r=a$15.secondsDifference(n,i),o=a$15.secondsDifference(i,this._startJulian),a=a$15.secondsDifference(n,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):o>0?(this._endJulian=a$15.addSeconds(this._endJulian,o,new a$15),this._startJulian=i,this._timeBarSecondsSpan=a$15.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=a$15.addSeconds(this._startJulian,a,new a$15),this._endJulian=n,this._timeBarSecondsSpan=a$15.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();var s=document.createEvent("Event");s.initEvent("setzoom",!0,!0),s.startJulian=this._startJulian,s.endJulian=this._endJulian,s.epochJulian=this._epochJulian,s.totalSpan=this._timeBarSecondsSpan,s.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(s)},u$3.prototype.zoomFrom=function(e){var t=a$15.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;var i=this._timeBarSecondsSpan-t;this.zoomTo(a$15.addSeconds(this._startJulian,t-t*e,new a$15),a$15.addSeconds(this._endJulian,i*e-i,new a$15))},u$3.prototype.makeLabel=function(e){var t=a$15.toGregorianDate(e),i=t.hour+8;return i>=24&&(i-=24),A(i)+":"+A(t.minute)+":"+A(t.second)},u$3.prototype.smallestTicInPixels=7,u$3.prototype._makeTics=function(){var e,t=this._timeBarEle,i=a$15.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(i*this._topDiv.clientWidth/this._timeBarSecondsSpan),r=n-8,o=this;this._needleEle.style.left=n.toString()+"px";var a="",s=.01,l=31536e6,u=1e-10,c=0,h=this._timeBarSecondsSpan;h<s?(h=s,this._timeBarSecondsSpan=s,this._endJulian=a$15.addSeconds(this._startJulian,s,new a$15)):h>l&&(h=l,this._timeBarSecondsSpan=l,this._endJulian=a$15.addSeconds(this._startJulian,l,new a$15));var d=this._timeBarEle.clientWidth;d<10&&(d=10);var f,p=this._startJulian,_=Math.min(h/d*1e-5,.4),m=a$15.toGregorianDate(p);f=h>31536e4?a$15.fromDate(new Date(Date.UTC(100*Math.floor(m.year/100),0))):h>31536e3?a$15.fromDate(new Date(Date.UTC(10*Math.floor(m.year/10),0))):h>86400?a$15.fromDate(new Date(Date.UTC(m.year,0))):a$15.fromDate(new Date(Date.UTC(m.year,m.month,m.day)));var g=a$15.secondsDifference(this._startJulian,a$15.addSeconds(f,_,new a$15)),x=g+h;function v(e){return Math.floor(g/e)*e}function y(e,t){return Math.ceil(e/t+.5)*t}function $(e){return(e-g)/h}function b(e,t){return e-t*Math.round(e/t)}this._epochJulian=f,this._rulerEle.innerHTML=this.makeLabel(a$15.addSeconds(this._endJulian,-s,new a$15));var C=this._rulerEle.offsetWidth+20;C<30&&(C=180);var S=c;c-=u;var w={startTime:g,startJulian:p,epochJulian:f,duration:h,timeBarWidth:d,getAlpha:$};this._highlightRanges.forEach((function(e){a+=e.render(w)}));var E=0,P=0,A=0,L=C/d;L>1&&(L=1),L*=this._timeBarSecondsSpan;var M,R=-1,I=-1,O=T.length;for(M=0;M<O;++M){var D=T[M];if(++R,E=D,D>L&&D>c)break;I<0&&d*(D/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(I=R)}if(R>0){for(;R>0;)if(--R,Math.abs(b(E,T[R]))<1e-5){T[R]>=c&&(P=T[R]);break}if(I>=0)for(;I<R;){if(Math.abs(b(P,T[I]))<1e-5&&T[I]>=c){A=T[I];break}++I}}(c=S)>u&&A<1e-5&&Math.abs(c-E)>u&&(A=c,c<=E+u&&(P=0));var B,N=-999999;if(d*(A/this._timeBarSecondsSpan)>=3)for(e=v(A);e<=x;e=y(e,A))a+='<span class="supermap3d-timeline-ticTiny" style="left: '+Math.round(d*$(e)).toString()+'px;"></span>';if(d*(P/this._timeBarSecondsSpan)>=3)for(e=v(P);e<=x;e=y(e,P))a+='<span class="supermap3d-timeline-ticSub" style="left: '+Math.round(d*$(e)).toString()+'px;"></span>';if(d*(E/this._timeBarSecondsSpan)>=2){this._mainTicSpan=E,x+=E,e=v(E);for(var F=a$15.computeTaiMinusUtc(f);e<=x;){var U=a$15.addSeconds(p,e-g,new a$15);if(E>2.1){var z=a$15.computeTaiMinusUtc(U);Math.abs(z-F)>.1&&(e+=z-F,U=a$15.addSeconds(p,e-g,new a$15))}var G=Math.round(d*$(e)),V=this.makeLabel(U);this._rulerEle.innerHTML=V,(B=this._rulerEle.offsetWidth)<10&&(B=C);var k=G-(B/2-1);k>N?(N=k+B+271,a+='<span class="supermap3d-timeline-ticMain" style="left: '+G.toString()+'px;"></span><span class="supermap3d-timeline-ticLabel" style="left: '+k.toString()+'px;">'+V+"</span>"):a+='<span class="supermap3d-timeline-ticSub" style="left: '+G.toString()+'px;"></span>',e=y(e,E)}}else this._mainTicSpan=-1;a+='<span class="supermap3d-timeline-icon16" style="left:'+r+'px;bottom:0;background-position: 0 0;"></span>',t.innerHTML=a,this._scrubElement=t.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),w.y=0,this._trackList.forEach((function(e){e.render(o._context,w),w.y+=e.height}))},u$3.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;var e=this._scrubElement;if(e$2b(this._scrubElement)){var t=a$15.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==i&&(this._lastXPos=i,e.style.left=i-8+"px",this._needleEle.style.left=i+"px")}e$2b(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(a$15.addSeconds(this._startJulian,this._timelineDrag,new a$15),a$15.addSeconds(this._endJulian,this._timelineDrag,new a$15)))},u$3.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=a$15.addSeconds(this._startJulian,t,new a$15),this._scrubElement){var i=e-8;this._scrubElement.style.left=i.toString()+"px",this._needleEle.style.left=e.toString()+"px"}var n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)},u$3.prototype.resize=function(){var e=this.container.clientWidth,t=this.container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){this._trackContainer.style.height=t+"px";var i=1;this._trackList.forEach((function(e){i+=e.height})),this._trackListEle.style.height=i.toString()+"px",this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=i,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t}},Object.defineProperties(u$2.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},scenePromise:{get:function(){if(e$2b(this._options)&&e$2b(this._options.contextOptions)&&e$2b(this._options.contextOptions.contextType)&&this._options.contextOptions.contextType==De$h.WebGPU){var e=this;return _0x58fcf.CreateAsync(this._canvas,{doNotHandleContextLost:!0,deviceDescriptor:{requiredFeatures:["depth-clamping","depth32float-stencil8","depth24unorm-stencil8","texture-compression-bc","timestamp-query"]}}).then((function(t){return e._options.engine=t,t.compatibilityMode=!1,e._initScene(),console.log("SuperMap - WebGPU Engine"),e._scene})).catch((function(e){console.log("Can not create WebGPU Device and/or context.")}))}return Promise.resolve(this._scene)}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){if(e<=0)throw new t$16("targetFrameRate must be greater than 0, or undefined.");this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&U(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){if(e<=0)throw new t$16("resolutionScale must be greater than 0.");this._resolutionScale=e,this._forceResize=!0}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}},setErrorPanelIsShow:{get:function(){return this._isShowErrorPanel},set:function(e){this._isShowErrorPanel!==e&&(this._isShowErrorPanel=e)}},errorListenerEvent:{get:function(){return this._errorListenerEvent}}}),u$2.prototype._initScene=function(){var e=this._options;try{var t=new w$3({canvas:this._canvas,contextOptions:e.contextOptions,engine:e.engine,creditContainer:this._innerCreditContainer,creditViewport:this._creditViewport,mapProjection:e.mapProjection,orderIndependentTranslucency:e.orderIndependentTranslucency,scene3DOnly:u$_(e.scene3DOnly,!1),terrainExaggeration:e.terrainExaggeration,shadows:e.shadows,mapMode2D:e.mapMode2D,requestRenderMode:e.requestRenderMode,maximumRenderTimeChange:e.maximumRenderTimeChange,pcss:e.pcss,shadowQuality:u$_(e.shadowQuality,0)});t.pixelRatio=this._pixelRatio,this._scene=t,t.camera.constrainedAxis=o$1p.UNIT_Z,L$1(this);var i=u$_(t.mapProjection.ellipsoid,t$13.WGS84),n=e.globe;e$2b(n)||(n=new h$d(i)),!1!==n&&(t.globe=n,t.globe.shadows=u$_(e.terrainShadows,W$W.RECEIVE_ONLY));var r=e.skyBox;e$2b(r)||(r=new h$5({sources:{positiveX:f("px"),negativeX:f("mx"),positiveY:f("py"),negativeY:f("my"),positiveZ:f("pz"),negativeZ:f("mz")}})),!1!==r&&(t.skyBox=r,t.sun=new u$5,t.moon=new n$9);var o=e.cloudBox;e$2b(o)&&(t.cloudBox=o);var a=e.skyAtmosphere;e$2b(a)||(a=new h$6(i)),!1!==a&&(t.skyAtmosphere=a);var s=!1!==e.globe&&e.imageryProvider;e$2b(s)||(s=new u$f({url:n$15("Assets/Textures/GlobalBkLayer.jpg")})),!1!==s&&t.imageryLayers.addImageryProvider(s),e$2b(e.terrainProvider)&&!1!==e.globe&&(t.terrainProvider=e.terrainProvider,e.terrainProvider.readyPromise.otherwise((function(){t.terrainProvider=t.globe._defaultTerrainProvider}))),e$2b(e.gridProvider)&&t.imageryLayers.addGridProvider(e.gridProvider),this._screenSpaceEventHandler=new g$J(this._canvas,!1),e$2b(e.sceneMode)&&(e.sceneMode===C$13.SCENE2D&&this._scene.morphTo2D(0),e.sceneMode===C$13.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=u$_(e.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=e.targetFrameRate;var l=this;t.renderError.addEventListener((function(e,t){if(l._useDefaultRenderLoop=!1,l._renderLoopRunning=!1,l._showRenderLoopErrors){l.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,t)}}))}catch(e){if(this._showRenderLoopErrors){this.showErrorPanel("Error constructing Widget.","verify your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:",e)}throw e}},u$2.prototype.showErrorPanel=function(e,t,i){var n=this._element,r=document.createElement("div");r.className="supermap3d-widget-errorPanel",!1===this.setErrorPanelIsShow?r.style.display="none":r.style.display="block";var o=document.createElement("div");o.className="supermap3d-widget-errorPanel-content",r.appendChild(o);var a=document.createElement("div");a.className="cessupermap3dium-widget-errorPanel-header",a.appendChild(document.createTextNode(e)),o.appendChild(a);var s=document.createElement("div");function l(){s.style.maxHeight=Math.max(Math.round(.9*n.clientHeight-100),30)+"px"}if(s.className="supermap3d-widget-errorPanel-scroll",o.appendChild(s),l(),e$2b(window.addEventListener)&&window.addEventListener("resize",l,!1),e$2b(t)){var u=document.createElement("div");u.className="supermap3d-widget-errorPanel-message",u.innerHTML="<p>"+t+"</p>",s.appendChild(u)}var c="(no error details available)";e$2b(i)&&(c=f$R(i));var h=document.createElement("div");h.className="supermap3d-widget-errorPanel-message",h.appendChild(document.createTextNode(c)),s.appendChild(h);var d=document.createElement("div");d.className="supermap3d-widget-errorPanel-buttonPanel",o.appendChild(d);var f=document.createElement("button");f.setAttribute("type","button"),f.className="supermap3d-button",f.appendChild(document.createTextNode("OK")),f.onclick=function(){e$2b(l)&&e$2b(window.removeEventListener)&&window.removeEventListener("resize",l,!1),n.removeChild(r)},d.appendChild(f),n.appendChild(r),typeof console<"u"&&console.error(e+"\n"+t+"\n"+c)},u$2.prototype.isDestroyed=function(){return!1},u$2.prototype.destroy=function(){this._scene=this._scene&&this._scene.destroy(),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),i$10(this)},u$2.prototype.resize=function(){var e=this._canvas,t=e.clientWidth,i=e.clientHeight;!this._forceResize&&this._canvasClientWidth===t&&this._canvasClientHeight===i&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,x(this),L$1(this),this._scene.requestRender())},u$2.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();var e=this._clock.tick();this._scene.render(e)}else this._clock.tick()},Object.defineProperties(a.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){if(!(e instanceof Element))throw new t$16("value must be a valid Element.");this._vrElement=e}},command:{get:function(){return this._command}}}),a.prototype.isDestroyed=function(){return!1},a.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(l$1f.changeEventName,this._callback),i$10(this)};var p="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",h$1="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function r$1(e,t,i){if(!e$2b(e))throw new t$16("container is required.");if(!e$2b(t))throw new t$16("scene is required.");e=i$c(e);var n=new a(t,i);n._exitVRPath=h$1,n._enterVRPath=p;var r=document.createElement("button");r.type="button",r.className="supermap3d-button supermap3d-vrButton",r.setAttribute("data-bind",'css: { "supermap3d-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(r),ce$1.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}Object.defineProperties(r$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),r$1.prototype.isDestroyed=function(){return!1},r$1.prototype.destroy=function(){return this._viewModel.destroy(),ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$10(this)},new o$1o;var l$1="-1000px";function r(e,t,i){if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(t))throw new t$16("zoomIndicatorElement is required.");if(!e$2b(i))throw new t$16("container is required.");this._scene=e,this._screenPositionX=l$1,this._screenPositionY=l$1,this._tweens=e.tweens,this._container=u$_(i,document.body),this._zoomIndicatorElement=t,this._scale=1,this._opacity=1,this.position=void 0,this.showSelection=!1,ce$1.track(this,["position","_screenPositionX","_screenPositionY","_opacity","showSelection"]),this.isVisible=void 0,ce$1.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&e$2b(this.position)}}),ce$1.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return s$Q.wgs84ToWindowCoordinates(e,t,i)}}function o(e,t){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e),this._container=e;var i=document.createElement("div");i.className="supermap3d-zoom-wrapper",i.setAttribute("data-bind",' style: { "top" : _screenPositionY, "left" : _screenPositionX,"opacity" : _opacity }, css: { "supermap3d-zoom-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var n=document.createElement("img");n.src=n$15("Widgets/Images/ZoomIndicator/zoom_Identifiers.png"),n.style.width="48px",n.style.height="48px",i.appendChild(n);var o=new r(t,this._element,this._container);this._viewModel=o,ce$1.applyBindings(this._viewModel,this._element)}r.prototype.update=function(){var e=this.scene._screenSpaceCameraController;if(e.zoomActive){e.zoomActive=!1;var t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,r=o$1o.clone(e._zoomMouseStart);r.x=Math.min(Math.max(r.x,-48),i+48)-24,r.y=Math.min(Math.max(r.y,-48),n+48)-24,this._screenPositionX=Math.floor(r.x+.25)+"px",this._screenPositionY=Math.floor(r.y+.25)+"px",this._opacity=1,this.showSelection=!0,this.animateDepart()}},r.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:m$W.EXPONENTIAL_OUT})},r.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_opacity",startValue:this._opacity,stopValue:0,duration:1,easingFunction:m$W.EXPONENTIAL_OUT})},Object.defineProperties(r.prototype,{container:{get:function(){return this._container}},zoomIndicatorElement:{get:function(){return this._zoomIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(o.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),o.prototype.isDestroyed=function(){return!1},o.prototype.destroy=function(){var e=this._container;return ce$1.cleanNode(this._element),e.removeChild(this._element),i$10(this)};var P=new i$1c;function xe(e){var t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function Le(e,t){if(e$2b(e.scene._frameState)&&e$2b(e.scene._frameState.pickIDColor)&&(e.scene._frameState.pickIDColor=new e$1U(1,1,1,1)),e$2b(e._activeBillboard)){if(e$2b(e._activeBillboard.billboard._billboardsBySymbol))for(var i=e._activeBillboard.billboard._billboardsBySymbol.length,n=0;n<i;n++)e._activeBillboard.billboard._billboardsBySymbol[n].color=e._activeBillboard.originalColor;e._activeBillboard=void 0}return e.scene.pickAsync(t.position).then((i=>{if(i){var n=u$_(i.id,i.primitive.id);if(n instanceof h$V)return Promise.resolve(n);if(e$2b(i.primitive)){if(e.scene.layers._layerQueue.length>0&&wt(e,t.position),e$2b(i.collection)&&i.collection._isMVT){if(e$2b(i.primitive)&&i.primitive instanceof n$I&&e$2b(i.primitive._billboardsBySymbol))for(var r=0;r<i.primitive._billboardsBySymbol.length;r++)e._activeBillboard={billboard:i.primitive,originalColor:e$1U.clone(i.primitive._billboardsBySymbol[r].color)},i.primitive._billboardsBySymbol[r].color=e$1U.CYAN;var o={pickResult:{featureID:i.primitive._id,layerID:i.primitive._mvtLayerID,mapName:i.primitive._mapName,position:i.primitive._position,primitive:i.primitive,properties:i.primitive._mvtProperties}};return Promise.resolve(o)}for(var a=e.scene._vectorTileSource.values.length-1;a>=0;a--){var s=e.scene._vectorTileSource.values[a];s._MVTStyle.cancelHighLight(s)}return Promise.resolve(i)}}return e$2b(e.scene.globe)?Promise.resolve(Ae(e.scene,t.position)):Promise.resolve(!1)}))}function Ve(e,t,i){if(e$2b(i)){var n=i.clock;e$2b(n)&&(n.getValue(t),e$2b(e)&&(e.updateFromClock(),e.zoomTo(n.startTime,n.stopTime)))}}var Re=new o$1p;function Ae(e,t){var i=null,n=e._frameState;return e.pickPositionAsync(t).then((t=>{if(!e$2b(t))return Promise.resolve(null);for(var r=a$18.fromCartesian(t),o=e._vectorTileSource.values.length-1;o>=0;o--){var a=e._vectorTileSource.values[o];if((!e$2b(a._selectEnabled)||a._selectEnabled)&&e$2b(i=a.pick(r,n)))return i.mapName=a._owner._name,Promise.resolve(new h$V({id:i.featureID,layerID:i.layerID,pickResult:i}))}return Promise.resolve(null)}))}function wt(e,t){var i=e.scene,n=i.layers.pickFeatures(t,i);if(!e$2b(n))return!1;var r=new h$V({id:"Loading...",description:"Loading feature information..."});o$1l(n,(function(i){if(e$2b(i)){var n=i.fieldNames,r=i.fieldValues;if(e$2b(n)&&e$2b(r)){for(var o={},a=0,s=n.length;a<s;a++)o[n[a]]=r[a];var l=new h$V({feature:o});if(e.scene.pickPositionAsync(t).then((e=>{l.scenePos=e})),e$2b(o.position)){var u=e.scene.globe.ellipsoid.cartographicToCartesian(o.position,Re);l.position=new r$U(u)}e$2b(i.geometry)&&(o.geometry=i.geometry),e.selectedEntity=l,e.pickEvent.raiseEvent(o)}else e.selectedEntity=void 0}else e.selectedEntity=void 0}),(function(){e.selectedEntity===r&&(e.selectedEntity=void 0)}))}function Bt(e,t){var i=e._geocoder,n=e._homeButton,r=e._sceneModePicker,o=e._projectionPicker,a=e._baseLayerPicker,s=e._animation,l=e._timeline,u=e._fullscreenButton,c=e._infoBox,h=e._selectionIndicator,d=t?"hidden":"visible";if(e$2b(i)&&(i.container.style.visibility=d),e$2b(n)&&(n.container.style.visibility=d),e$2b(r)&&(r.container.style.visibility=d),e$2b(o)&&(o.container.style.visibility=d),e$2b(a)&&(a.container.style.visibility=d),e$2b(s)&&(s.container.style.visibility=d),e$2b(l)&&(l.container.style.visibility=d),e$2b(u)&&u.viewModel.isFullscreenEnabled&&(u.container.style.visibility=d),e$2b(c)&&(c.container.style.visibility=d),e$2b(h)&&(h.container.style.visibility=d),e._container){var f=t||!e$2b(u)?0:u.container.clientWidth;e._vrButton.container.style.right=f+"px",e.forceResize()}}function u(e,t){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e),this._container=e;var i=(!e$2b((t=u$_(t,u$_.EMPTY_OBJECT)).globe)||!1!==t.globe)&&e$2b(t.baseLayerPicker)&&!1!==t.baseLayerPicker;if(!i&&e$2b(t.selectedImageryProviderViewModel))throw new t$16("options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.imageryProvider instead or set options.baseLayerPicker to true.");if(!i&&e$2b(t.selectedTerrainProviderViewModel))throw new t$16("options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.terrainProvider instead or set options.baseLayerPicker to true.");var n=document.createElement("div");n.className="supermap3d-viewer",e.appendChild(n);var r=document.createElement("div");r.className="supermap3d-viewer-WidgetContainer",n.appendChild(r);var o=document.createElement("div");o.className="supermap3d-viewer-bottom",n.appendChild(o),this._bottomContainer=o,this._viewerContainer=n;var a,s=u$_(t.scene3DOnly,!1);e$2b(t.clockViewModel)?a=t.clockViewModel.clock:new r$a(a=new u$I),a.shouldAnimate=u$_(t.shouldAnimate,!0),this._clock=a;var l=new u$2(r,{terrainProvider:t.terrainProvider,imageryProvider:!i&&!e$2b(t.imageryProvider)&&void 0,gridProvider:t.gridProvider,clock:a,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:e$2b(t.creditContainer)?t.creditContainer:o,creditViewport:t.creditViewport,scene3DOnly:s,terrainExaggeration:t.terrainExaggeration,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,cloudBox:t.cloudBox,pcss:t.pcss,shadowQuality:t.shadowQuality});this._Widget=l,this._options=t,(!e$2b(t.contextOptions)||!e$2b(t.contextOptions.contextType)||t.contextOptions.contextType!=De$h.WebGPU)&&this._initScene(t)}Object.defineProperties(u.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},Widget:{get:function(){return this._Widget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},navigation:{get:function(){return this._navigation}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._Widget.canvas}},cesiumLogo:{get:function(){return this._Widget.cesiumLogo}},scene:{get:function(){return this._Widget.scene}},scenePromise:{get:function(){var e=this;return this._Widget.scenePromise.then((t=>(e$2b(e._options)&&e$2b(e._options.contextOptions)&&e$2b(e._options.contextOptions.contextType)&&e._options.contextOptions.contextType==De$h.WebGPU&&e._initScene(e._options),Promise.resolve(t))))}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainLayers:{get:function(){return this.scene.terrainLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e;var t=this;e.readyPromise.otherwise((function(){t.scene.terrainProvider=t.scene.globe._defaultTerrainProvider}))}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._Widget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._Widget.targetFrameRate},set:function(e){this._Widget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._Widget.useDefaultRenderLoop},set:function(e){this._Widget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._Widget.resolutionScale},set:function(e){this._Widget.resolutionScale=e,this._forceResize=!0}},useBrowserRecommendedResolution:{get:function(){return this._Widget.useBrowserRecommendedResolution},set:function(e){this._Widget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,de(this);var t=this.scene,i=t.mode;e$2b(e)&&e$2b(e.position)?this._needTrackedEntityUpdate=!0:(this._needTrackedEntityUpdate=!1,(i===C$13.COLUMBUS_VIEW||i===C$13.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(i===C$13.COLUMBUS_VIEW||i===C$13.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(p$1d.IDENTITY)),this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;var t=e$2b(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;e$2b(e)?e$2b(t)&&t.animateAppear():e$2b(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,Ve(this._timeline,this.clock,e))}}}),u.prototype._initScene=function(e){var i=this,n=this._Widget.scene,r=e.dataSources,a=!1;e$2b(r)||(r=new i$t,a=!0);var s,l=new u$p({scene:n,dataSourceCollection:r}),c=this._clock,h=!1;e$2b(e.clockViewModel)?s=e.clockViewModel:(s=new r$a(c),h=!0);var d=new n$x;d.add(c.onTick,u.prototype._onTick,this),d.add(n.morphStart,u.prototype._clearTrackedObject,this);var f,p,_=this._viewerContainer;if(!e$2b(e.selectionIndicator)||!1!==e.selectionIndicator){var m=document.createElement("div");m.className="supermap3d-viewer-selectionIndicatorContainer",_.appendChild(m),f=new i$1(m,n)}if(!e$2b(e.infoBox)||!1!==e.infoBox){var g=document.createElement("div");g.className="supermap3d-viewer-infoBoxContainer",_.appendChild(g);var x=(p=new l$4(g)).viewModel;d.add(x.cameraClicked,u.prototype._onInfoBoxCameraClicked,this),d.add(x.closeClicked,u.prototype._onInfoBoxClockClicked,this)}var v,y,$=document.createElement("div");if($.className="supermap3d-viewer-toolbar",_.appendChild($),e$2b(e.geocoder)&&!1!==e.geocoder){var b,T=document.createElement("div");T.className="supermap3d-viewer-geocoderContainer",$.appendChild(T),e$2b(e.geocoder)&&"boolean"!=typeof e.geocoder&&(b=Array.isArray(e.geocoder)?e.geocoder:[e.geocoder]),v=new s$3({container:T,geocoderServices:b,scene:n,viewer:this}),d.add(v.viewModel.search.beforeExecute,u.prototype._clearObjects,this)}if(e$2b(e.homeButton)&&!1!==e.homeButton&&(y=new o$3($,n),e$2b(v)&&d.add(y.viewModel.command.afterExecute,(function(){var e=v.viewModel;e.searchText="",e.isSearchInProgress&&e.search()})),d.add(y.viewModel.command.beforeExecute,u.prototype._clearTrackedObject,this)),!0===e.sceneModePicker&&w)throw new t$16("options.sceneModePicker is not available when options.scene3DOnly is set to true.");var C,S,w=u$_(e.scene3DOnly,!1);!w&&e$2b(e.sceneModePicker)&&!1!==e.sceneModePicker&&(C=new c$2($,n)),e.projectionPicker&&(S=new n$1($,n));var E,P,A,L,M,R,I,O,D,B,N,F,U=(!e$2b(e.globe)||!1!==e.globe)&&e$2b(e.baseLayerPicker)&&!1!==e.baseLayerPicker;if(U){var z=u$_(e.imageryProviderViewModels,m$4()),G=u$_(e.terrainProviderViewModels,n$3());E=new g$3($,{globe:n.globe,imageryProviderViewModels:z,selectedImageryProviderViewModel:e.selectedImageryProviderViewModel,terrainProviderViewModels:G,selectedTerrainProviderViewModel:e.selectedTerrainProviderViewModel}),P=$.getElementsByClassName("supermap3d-baseLayerPicker-dropDown")[0]}if(e$2b(e.imageryProvider)&&!1!==e.imageryProvider&&(U&&(E.viewModel.selectedImagery=void 0),n.imageryLayers.removeAll(),n.imageryLayers.addImageryProvider(e.imageryProvider)),e$2b(e.terrainProvider)&&(U&&(E.viewModel.selectedTerrain=void 0),n.terrainProvider=e.terrainProvider),e$2b(e.navigationHelpButton)&&!1!==e.navigationHelpButton){var V=!0;try{if(e$2b(window.localStorage)){var k=window.localStorage.getItem("supermap3d-hasSeenNavHelp");e$2b(k)&&Boolean(k)?V=!1:window.localStorage.setItem("supermap3d-hasSeenNavHelp","true")}}catch{}A=new l$3({container:$,instructionsInitiallyVisible:u$_(e.navigationInstructionsInitiallyVisible,V)})}if(e$2b(e.animation)&&!1!==e.animation){var W=document.createElement("div");W.className="supermap3d-viewer-animationContainer",_.appendChild(W),L=new y$4(W,new m$5(s))}if(e$2b(e.timeline)&&!1!==e.timeline){var H=document.createElement("div");H.className="supermap3d-viewer-timelineContainer",_.appendChild(H),(M=new u$3(H,c)).addEventListener("settime",xe,!1);var q=a$15.clone(c.startTime);q.secondsOfDay=14400;var j=a$15.clone(c.stopTime);j.secondsOfDay=14400,M.zoomTo(q,j)}if(e$2b(e.fullscreenButton)&&!1!==e.fullscreenButton&&((O=document.createElement("div")).className="supermap3d-viewer-fullscreenContainer",_.appendChild(O),I=c$5((R=new r$5(O,e.fullscreenElement)).viewModel,"isFullscreenEnabled",(function(e){O.style.display=e?"block":"none",e$2b(M)&&(M.container.style.right=O.clientWidth+"px",M.resize())}))),e.vrButton){var Y=document.createElement("div");Y.className="supermap3d-viewer-vrContainer",_.appendChild(Y),B=c$5((D=new r$1(Y,n,e.fullScreenElement)).viewModel,"isVREnabled",(function(e){Y.style.display=e?"block":"none",e$2b(R)&&(Y.style.right=O.clientWidth+"px"),e$2b(M)&&(M.container.style.right=Y.clientWidth+"px",M.resize())})),N=c$5(D.viewModel,"isVRMode",(function(e){Bt(i,e)}))}if(!e$2b(e.navigation)||!1!==e.navigation){var X=document.createElement("div");X.className="supermap3d-viewer-navigationContainer",_.appendChild(X),F=new t({container:X,scene:n,viewer:this})}this._scratchHoldUrl="url("+n$15("Widgets/Images/cur/Hold.cur")+"), auto",this._scratchPanUrl="url("+n$15("Widgets/Images/cur/Pan.cur")+"), auto",this._activeBillboard=void 0,this._baseLayerPickerDropDown=P,this._fullscreenSubscription=I,this._vrSubscription=B,this._vrModeSubscription=N,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=u$_(e.automaticallyTrackDataSourceClocks,!0),this._element=_,this._selectionIndicator=f,this._infoBox=p,this._dataSourceCollection=r,this._destroyDataSourceCollection=a,this._dataSourceDisplay=l,this._clockViewModel=s,this._destroyClockViewModel=h,this._toolbar=$,this._homeButton=y,this._sceneModePicker=C,this._projectionPicker=S,this._baseLayerPicker=E,this._navigationHelpButton=A,this._animation=L,this._timeline=M,this._fullscreenButton=R,this._vrButton=D,this._geocoder=v,this._navigation=F,this._eventHelper=d,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=e$2b(p)||e$2b(f),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._clockTrackedDataSource=void 0,this._forceResize=!1,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new o$1h,this._trackedEntityChanged=new o$1h,this._capturePointSize=16,this._capturePointColor=e$1U.fromCssColorString("#0173c7"),ce$1.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),d.add(r.dataSourceAdded,u.prototype._onDataSourceAdded,this),d.add(r.dataSourceRemoved,u.prototype._onDataSourceRemoved,this),d.add(n.postUpdate,u.prototype.resize,this),d.add(n.postRender,u.prototype._postRender,this);for(var K=r.length,Q=0;Q<K;Q++)this._dataSourceAdded(r,r.get(Q));this._dataSourceAdded(void 0,l.defaultDataSource),d.add(r.dataSourceAdded,u.prototype._dataSourceAdded,this),d.add(r.dataSourceRemoved,u.prototype._dataSourceRemoved,this);var Z=this._Widget;Z.screenSpaceEventHandler.setInputAction((function(e){Le(i,e).then((e=>{i.selectedEntity=e}))}),G$I.LEFT_CLICK),Z.screenSpaceEventHandler.setInputAction((function(e){Le(i,e).then((e=>{var t=e;e$2b(t)?r$Z.getValueOrUndefined(t.position,i.clock.currentTime)?i.trackedEntity=t:i.zoomTo(t):e$2b(i.trackedEntity)&&(i.trackedEntity=void 0)}))}),G$I.LEFT_DOUBLE_CLICK),this.pickEvent=new o$1h;var J=document.createElement("div");J.className="supermap3d-viewer-zoomIndicatorContainer",_.appendChild(J),this._zoomIndicator=new o(J,Z.scene);var ee=this._zoomIndicator._viewModel;ee._screenPositionX="100px",ee._screenPositionY="100px",ee.position="absolute",ee.showSelection=!1},u.prototype.extend=function(e,t){if(!e$2b(e))throw new t$16("mixin is required.");e(this,t)},u.prototype.resize=function(){var e=this._Widget,t=this._container,i=t.clientWidth,n=t.clientHeight,r=e$2b(this._animation),o=e$2b(this._timeline);if(this._forceResize||i!==this._lastWidth||n!==this._lastHeight){e.resize(),this.scene.context.resize(),this._forceResize=!1;var a=n-125,s=this._baseLayerPickerDropDown;e$2b(s)&&(s.style.maxHeight=a+"px"),e$2b(this._infoBox)&&(this._infoBox.viewModel.maxHeight=a);var l,u=this._timeline,c=0,h=0,d=0;if(r&&"hidden"!==window.getComputedStyle(this._animation.container).visibility){var f=this._lastWidth;l=this._animation.container,i>900?(c=169,f<=900&&(l.style.width="169px",l.style.height="112px",this._animation.resize())):i>=600?(c=136,(f<600||f>900)&&(l.style.width="136px",l.style.height="90px",this._animation.resize())):(c=106,(f>600||0===f)&&(l.style.width="106px",l.style.height="70px",this._animation.resize())),h=c+5}if(o&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility){var p=this._fullscreenButton,_=this._vrButton,m=u.container,g=m.style;d=m.clientHeight+3,g.left=c+"px";var x=0;e$2b(p)&&(x+=p.container.clientWidth),e$2b(_)&&(x+=_.container.clientWidth),g.right=x+"px",u.resize()}this._bottomContainer.style.left=h+"px",this._bottomContainer.style.bottom=d+"px",this._lastWidth=i,this._lastHeight=n}},u.prototype.forceResize=function(){this._lastWidth=0,this.resize()},u.prototype.render=function(){this._Widget.render()},u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){var e;this.screenSpaceEventHandler.removeInputAction(G$I.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(G$I.LEFT_DOUBLE_CLICK);var t=this.dataSources,i=t.length;for(e=0;e<i;e++)this._dataSourceRemoved(t,t.get(e));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),e$2b(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),e$2b(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),e$2b(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),e$2b(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),e$2b(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),e$2b(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),e$2b(this._timeline)&&(this._timeline.removeEventListener("settime",xe,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),e$2b(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),e$2b(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),e$2b(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),e$2b(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._Widget=this._Widget.destroy(),this._destroyDataSourceCollection&&!this._dataSourceCollection.isDestroyed()&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),i$10(this)},u.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(u.prototype._onEntityCollectionChanged,this)},u.prototype._dataSourceRemoved=function(e,t){var i=t.entities;i.collectionChanged.removeEventListener(u.prototype._onEntityCollectionChanged,this),e$2b(this.trackedEntity)&&i.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),e$2b(this.selectedEntity)&&i.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};var Q=!1,W,ze=0;function We(e,t,i,n){if(!e$2b(t))throw new t$16("zoomTarget is required.");de(e);var r=o$1l.defer();return e._zoomPromise=r,e._zoomIsFlight=n,e._zoomOptions=i,o$1l(t,(function(t){if(e._zoomPromise===r){if(t instanceof h$Q)return void t.getViewableRectangle().then((function(t){return a$d(t,e.scene)})).then((function(t){e._zoomPromise===r&&(e._zoomTarget=t)}));if(t instanceof p$u)return void(e._zoomTarget=t);if(t instanceof g$6)return void(e._zoomTarget=t);if(t.isLoading&&e$2b(t.loadingEvent)){var i=t.loadingEvent.addEventListener((function(){i(),e._zoomPromise===r&&(e._zoomTarget=t.entities.values.slice(0))}));return}if(Array.isArray(t))return void(e._zoomTarget=t.slice(0));if(t instanceof _0x22e933)return void(e._zoomTarget=t.layerBounds);if(t instanceof p$b)return void t.getViewableRectangle().then((function(t){return a$d(t,e.scene)})).then((function(t){e._zoomPromise===r&&(e._zoomTarget=t)}));e$2b((t=u$_(t.values,t)).entities)&&(t=t.entities.values),Array.isArray(t)?e._zoomTarget=t.slice(0):e._zoomTarget=[t]}})),e.scene.requestRender(),r.promise}function D(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function de(e){var t=e._zoomPromise;e$2b(t)&&(D(e),t.resolve(!1))}function It(e){var t=e._zoomTarget;if(e$2b(t)&&e.scene.mode!==C$13.MORPHING){var i=e.scene,n=i.camera,r=e._zoomPromise,o=u$_(e._zoomOptions,{});if(t instanceof p$u)return t.readyPromise.then((function(){var i=t.boundingSphere;e$2b(o.offset)||(o.offset=new a$T(0,-.5,i.radius)),s={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(t.boundingSphere,s):(n.viewBoundingSphere(i,o.offset),n.lookAtTransform(p$1d.IDENTITY),r.resolve(!0)),D(e)}));if(t instanceof g$6)return t.readyPromise.then((function(){var i=t.boundingSphere;e$2b(o.offset)||(o.offset=new a$T(0,-.5,i.radius)),s={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(i,s):(n.viewBoundingSphere(i,o.offset),n.lookAtTransform(p$1d.IDENTITY),r.resolve(!0)),D(e)}));if(t instanceof a$18)return s={destination:i.mapProjection.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyTo(s):(n.setView(s),r.resolve(!0)),void D(e);var a=t;if(a instanceof h$18){var s={offset:o.offset,destination:a,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}};if(e._zoomIsFlight){var l=i$1c.fromRectangle3D(t);n.flyToBoundingSphere(l,s)}else n.setView(s),r.resolve(!0);return void D(e)}for(var u=[],c=0,h=a.length;c<h;c++){var d=e._dataSourceDisplay.getBoundingSphere(a[c],!1,P);if(d===R$w.PENDING)return;d!==R$w.FAILED&&u.push(i$1c.clone(P))}if(0===u.length)return void de(e);e.trackedEntity=void 0,l=i$1c.fromBoundingSpheres(u),e._zoomIsFlight?(D(e),n.flyToBoundingSphere(l,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)},offset:o.offset})):(n.viewBoundingSphere(l,o.offset),n.lookAtTransform(p$1d.IDENTITY),D(e),r.resolve(!0))}}function Tt(e){if(e._needTrackedEntityUpdate){var t=e._trackedEntity,i=e.clock.currentTime;if(e$2b(r$Z.getValueOrUndefined(t.position,i))){var n=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,P);if(r!==R$w.PENDING){var o=n.mode;(o===C$13.COLUMBUS_VIEW||o===C$13.SCENE2D)&&(n.screenSpaceCameraController.enableTranslate=!1),(o===C$13.COLUMBUS_VIEW||o===C$13.SCENE3D)&&(n.screenSpaceCameraController.enableTilt=!1);var a=r!==R$w.FAILED?P:void 0;e._entityView=new V$i(t,n,n.mapProjection.ellipsoid),e._entityView.update(i,a),e._needTrackedEntityUpdate=!1}}}}function s(e){o$1q.typeOf.object("viewer",e);var t=document.createElement("div");t.className="supermap3d-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);var i=new y$1(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return i}}})}function c(e){if(!e$2b(e))throw new t$16("viewer is required.");var t=document.createElement("div");t.className="supermap3d-viewer-cesiumInspectorContainer",e.container.appendChild(t);var i=new g$1(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return i}}})}function $$1(e,t){if(!e$2b(e))throw new t$16("viewer is required.");if(e.hasOwnProperty("dropTarget"))throw new t$16("dropTarget is already defined by another mixin.");if(e.hasOwnProperty("dropEnabled"))throw new t$16("dropEnabled is already defined by another mixin.");if(e.hasOwnProperty("dropError"))throw new t$16("dropError is already defined by another mixin.");if(e.hasOwnProperty("clearOnDrop"))throw new t$16("clearOnDrop is already defined by another mixin.");if(e.hasOwnProperty("flyToOnDrop"))throw new t$16("flyToOnDrop is already defined by another mixin.");t=u$_(t,u$_.EMPTY_OBJECT);var i=!0,n=u$_(t.flyToOnDrop,!0),r=new o$1h,o=u$_(t.clearOnDrop,!0),a=u$_(t.dropTarget,e.container),s=u$_(t.clampToGround,!0),l=t.proxy;function u(t){d$1(t),o&&(e.entities.removeAll(),e.dataSources.removeAll());for(var i=t.dataTransfer.files,n=i.length,r=0;r<n;r++){var a=i[r],u=new FileReader;u.onload=j$1(e,a,l,s),u.onerror=k(e,a),u.readAsText(a)}}a=i$c(a),Object.defineProperties(e,{dropTarget:{get:function(){return a},set:function(e){if(!e$2b(e))throw new t$16("value is required.");O(a,u),h(a=e,u)}},dropEnabled:{get:function(){return i},set:function(e){e!==i&&(e?h(a,u):O(a,u),i=e)}},dropError:{get:function(){return r}},clearOnDrop:{get:function(){return o},set:function(e){o=e}},flyToOnDrop:{get:function(){return n},set:function(e){n=e}},proxy:{get:function(){return l},set:function(e){l=e}},clampToGround:{get:function(){return s},set:function(e){s=e}}}),h(a,u),e.destroy=e$O(e,e.destroy,(function(){e.dropEnabled=!1})),e._handleDrop=u}function d$1(e){e.stopPropagation(),e.preventDefault()}function O(e,t){var i=e;e$2b(i)&&(i.removeEventListener("drop",t,!1),i.removeEventListener("dragenter",d$1,!1),i.removeEventListener("dragover",d$1,!1),i.removeEventListener("dragexit",d$1,!1))}function h(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",d$1,!1),e.addEventListener("dragover",d$1,!1),e.addEventListener("dragexit",d$1,!1)}function j$1(e,t,i,n){var r=e.scene;return function(o){var a=t.name;try{var s;if(/\.czml$/i.test(a))s=E$v.load(JSON.parse(o.target.result),{sourceUri:a});else if(/\.geojson$/i.test(a)||/\.json$/i.test(a)||/\.topojson$/i.test(a))s=y$p.load(JSON.parse(o.target.result),{sourceUri:a,clampToGround:n});else{if(!/\.(kml|kmz)$/i.test(a))return void e.dropError.raiseEvent(e,a,"Unrecognized file: "+a);s=U$m.load(t,{sourceUri:a,proxy:i,camera:r.camera,canvas:r.canvas,clampToGround:n})}e$2b(s)&&e.dataSources.add(s).then((function(t){e.flyToOnDrop&&e.flyTo(t)})).otherwise((function(t){e.dropError.raiseEvent(e,a,t)}))}catch(t){e.dropError.raiseEvent(e,a,t)}}}function k(e,t){return function(i){e.dropError.raiseEvent(e,t.name,i.target.error)}}function m(e,t){if(!e$2b(e))throw new t$16("viewer is required.");t=u$_(t,u$_.EMPTY_OBJECT);var i=new i$3({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return i}}})}u.prototype._onTick=function(e){var t=e.currentTime,i=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=i);var n=this._entityView;if(e$2b(n)){var r=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(r,!1,P)===R$w.DONE&&n.update(t,P)}var o,a=!1,s=this.selectedEntity,l=e$2b(s)&&this._enableInfoOrSelection,u=this.customInfobox;if(e$2b(u))if(this._enableInfoOrSelection=!1,e$2b(s)&&e$2b(s.scenePos)){var c=this.scene.canvas.height,h=s.scenePos,d=new o$1o;s$Q.wgs84ToWindowCoordinates(this.scene,h,d),u.style.bottom=c-d.y+45+"px",u.style.left=d.x-70+"px",u.style.visibility="visible"}else u.style.visibility="hidden";(l=e$2b(s)&&this._enableInfoOrSelection)&&s.isShowing&&s.isAvailable(t)&&(this._dataSourceDisplay.getBoundingSphere(s,!0,P)!==R$w.FAILED?o=P.center:e$2b(s.position)&&(o=s.position.getValue(t,o)),a=e$2b(o));var f=e$2b(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;e$2b(f)&&(f.position=o$1p.clone(o,f.position),f.showSelection=l&&a,f.update());var p=e$2b(this._infoBox)?this._infoBox.viewModel:void 0;e$2b(p)&&(p.showInfo=l,p.enableCamera=a,p.isCameraTracking=this.trackedEntity===this.selectedEntity,l?(p.titleText=u$_(s.name,s.id),p.description=r$Z.getValueOrDefault(s.description,t,"")):(p.titleText="",p.description="")),this._zoomIndicator._viewModel.update();var _=this.scene._screenSpaceCameraController,m=_.tiltEventTypes,x=_._aggregator._isDown;(x[m[0]]&&3==this.scene.mode?(e$2b(this._tiltIndicator)?this._tiltIndicator.setModelMatrix(this.scene.frameState,_._tiltCenter):(this._tiltIndicator=new g(this,this.scene.context,n$15("Widgets/Images/compass.s3m"),_._tiltCenter),this.scene.primitives.add(this._tiltIndicator)),this._tiltIndicator._visible=!0):e$2b(this._tiltIndicator)&&(this._tiltIndicator._visible=!1),e$2b(this.enableCursorStyle)&&0==this.enableCursorStyle)||(""==this._element.style.cursor&&(this._element.style.cursor=this._scratchPanUrl),x[_.rotateEventTypes]?Q||(Q=!0,this._element.style.cursor=this._scratchHoldUrl):Q&&(Q=!1,this._element.style.cursor=this._scratchPanUrl));if(_._scene.pickPointEnabled){e$2b(this.pointCloudIndicator)||(this.pointCloudIndicator=this.entities.add({id:"pont-cloud-indicator",position:new n$V((function(){return _._scene.pickPoint}),!1),point:{pixelSize:this._capturePointSize,color:this._capturePointColor,disableDepthTestDistance:Number.POSITIVE_INFINITY}})),this.pointCloudIndicator.show=!0;var v=_._aggregator;e$2b(W)||(W=o$1o.clone(v.currentMousePosition));var y=Et$a();if(y-ze>_._scene.pickPointInterval){ze=y;var $=o$1o.clone(v.currentMousePosition),b=$.x-W.x,T=$.y-W.y,C=Math.sqrt(b*b+T*T);W=o$1o.clone(v.currentMousePosition),C>5&&_._scene.pointPick($)}}else e$2b(this.pointCloudIndicator)&&(this.pointCloudIndicator.show=!1)},u.prototype._onEntityCollectionChanged=function(e,t,i){for(var n=i.length,r=0;r<n;r++){var o=i[r];this.trackedEntity===o&&(this.trackedEntity=void 0),this.selectedEntity===o&&(this.selectedEntity=void 0)}},u.prototype._onInfoBoxCameraClicked=function(e){e.isCameraTracking&&this.trackedEntity===this.selectedEntity?this.trackedEntity=void 0:e$2b(this.selectedEntity.position)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)},u.prototype._clearTrackedObject=function(){this.trackedEntity=void 0},u.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0},u.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0},u.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Ve(this.timeline,this.clock,e)},u.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);var i=t.entities.id,n=this._eventHelper.add(t.changedEvent,u.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[i]=n},u.prototype._onDataSourceRemoved=function(e,t){var i=this.clockTrackedDataSource===t,n=t.entities.id;if(this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0,i){var r=e.length;this._automaticallyTrackDataSourceClocks&&r>0?this.clockTrackedDataSource=e.get(r-1):this.clockTrackedDataSource=void 0}},u.prototype.zoomTo=function(e,t){return We(this,e,{offset:t},!1)},u.prototype.flyTo=function(e,t){return We(this,e,t,!0)},u.prototype._postRender=function(){It(this),Tt(this)};const _0x146629=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x15cfa7=_0x146629(void 0,(function(){return _0x15cfa7.toString().search("(((.+)+)+)+$").toString().constructor(_0x15cfa7).search("(((.+)+)+)+$")}));_0x15cfa7();var _0x38b1eb,_0x5762f7=[],_0x1e9b87=.1,_0x476e95,_0xc80623,_0x6182f6="Selection_Cube";function _0x195cd9(e){this._scene=e,_0x38b1eb=new WebGLPlot.ScreenSpaceEventHandler(e.canvas)}function _0x1aa412(e,t){let i=[];if(e&&e.plotLayers){let t=e.plotLayers._layerQueue.length;for(let n=0;n<t;n++){let t=e.plotLayers._layerQueue[n];if(WebGLPlot.defined(t)&&t instanceof _0x267b40){let e=t._geoGraphicObjects.length;for(let n=0;n<e;n++){let e=t._geoGraphicObjects[n];_0x45cda7(e)&&i.push(e)}}}}"function"==typeof t&&t({geoArray:i})}function _0x45cda7(e){let t=_0x5762f7[0].x>_0x5762f7[1].x?_0x5762f7[0].x:_0x5762f7[1].x,i=_0x5762f7[0].y>_0x5762f7[1].y?_0x5762f7[0].y:_0x5762f7[1].y,n=_0x5762f7[0].z>_0x1e9b87?_0x5762f7[0].z:_0x1e9b87,r=_0x5762f7[0].x<_0x5762f7[1].x?_0x5762f7[0].x:_0x5762f7[1].x,o=_0x5762f7[0].y<_0x5762f7[1].y?_0x5762f7[0].y:_0x5762f7[1].y,a=_0x5762f7[0].z<_0x1e9b87?_0x5762f7[0].z:_0x1e9b87,s=e.localPoints.length;for(let l=0;l<s;l++){let s=e.localPoints[l];if(s.x>r&&s.x<t&&s.y>o&&s.y<i&&s.z>a&&s.z<n)return!0}return!1}function _0x257ae1(e,t){_0x38b1eb.setInputAction((function(i){var n=_0x2d6822.getPosition(e._scene,i.position);if(n){if(_0x5762f7.length>=3)return _0xc80623=i.position,_0x17be26(),_0x1aa412(e._scene,t),void e.deActivate();2===_0x5762f7.length&&(_0x5762f7[_0x5762f7.length-1]=n,_0x476e95=i.position),0===_0x5762f7.length&&_0x5762f7.push(n),_0x5762f7.push(n),_0x5762f7.length>=2&&_0x17be26()}}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x38b1eb.setInputAction((function(t){var i=_0x2d6822.getPosition(e._scene,t.endPosition);_0x5762f7.length>=2&&(_0x5762f7.pop(),_0x5762f7.push(i),_0x5762f7.length>=3&&(_0xc80623=t.endPosition),_0x17be26(e._scene))}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE)}function _0x17be26(e){if(!e||_0x5762f7.length<2||_0x5762f7[0].x===_0x5762f7[1].x&&_0x5762f7[0].y===_0x5762f7[1].y)return;var t=WebGLPlot.Cartesian3.fromDegrees(_0x5762f7[0].x,_0x5762f7[0].y,_0x5762f7[0].z),i=[t,WebGLPlot.Cartesian3.fromDegrees(_0x5762f7[1].x,_0x5762f7[0].y,_0x5762f7[0].z),WebGLPlot.Cartesian3.fromDegrees(_0x5762f7[1].x,_0x5762f7[1].y,_0x5762f7[0].z),WebGLPlot.Cartesian3.fromDegrees(_0x5762f7[0].x,_0x5762f7[1].y,_0x5762f7[0].z),t];if(_0x476e95&&_0xc80623){let t=e.camera;var n=t.getPickRay(_0x476e95),r=new WebGLPlot.Cartesian2(_0x476e95.x+1,_0x476e95.y),o=t.getPickRay(r),a=e.globe.pick(n,e),s=e.globe.pick(o,e);let i=WebGLPlot.Cartesian3.distance(a,s);_0x1e9b87=(_0x476e95.y-_0xc80623.y)*i}const l=new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(i),perPositionHeight:!0,closeTop:!0,closeBottom:!0,extrudedHeight:_0x1e9b87}),u=WebGLPlot.PolygonGeometry.createGeometry(l);var c=new WebGLPlot.GeometryInstance({geometry:u,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(new WebGLPlot.Color(1,0,0,.2))}});_0x38860f.setScaneInstances(_0x6182f6,[c],this._scene)}WebGLPlot.g_CubeHandler=null,_0x195cd9.getInstance=function(e){return WebGLPlot.defined(e)&&(!WebGLPlot.g_CubeHandler||WebGLPlot.g_CubeHandler._scene!==e)&&(WebGLPlot.g_CubeHandler=new _0x195cd9(e)),WebGLPlot.g_CubeHandler},_0x195cd9.prototype.activate=function(e){_0x5762f7=[],_0x257ae1(this,e)},_0x195cd9.prototype.deActivate=function(){_0x5762f7=[],_0x38b1eb&&(_0x38b1eb.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x38b1eb.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE)),_0x1e9b87=.1,_0x476e95=void 0,_0xc80623=void 0,_0x38860f.setScaneInstances(_0x6182f6,[],this._scene)};const _0x25b423=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2b88b9=_0x25b423(void 0,(function(){return _0x2b88b9.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b88b9).search("(((.+)+)+)+$")}));_0x2b88b9();let _0x34363d,_0x4c5536,_0x822650=!1,_0x4cccce,_0x30487c=[],_0x395f89;function _0x434208(e,t){this.dom=e,this.viewer=t,_0x4c5536=this,_0x4cccce=new WebGLPlot.ScreenSpaceEventHandler(e),_0x395f89=new _0x53a1a6(e),this.isDestroyed=!1,this.activeEvt=new WebGLPlot.Event,this.cancelEvt=new WebGLPlot.Event,this.movingEvt=new WebGLPlot.Event,this.drawEvt=new WebGLPlot.Event}function _0x53a1a6(e){this.rect=document.createElement("div"),this.rect.style.visibility="hidden",e.appendChild(this.rect),this.leftTopPoint=new WebGLPlot.Cartesian2,this.rightBottomPoint=new WebGLPlot.Cartesian2,_0x53a1a6.prototype.setPosition=function(e,t){let i,n,r,o,a=t.x-e.x,s=t.y-e.y;a<0?(i=t.x,r=-a):(i=e.x,r=a),s<0?(n=t.y,o=-s):(n=e.y,o=s),this.leftTopPoint=new WebGLPlot.Cartesian2(i,n),this.rightBottomPoint=new WebGLPlot.Cartesian2(i+r,n+o),this.rect.style="position:fixed;top:"+n+"px;left:"+i+"px;width:"+r+"px;height:"+o+"px;border:2px dashed #333;",this.setVisible(!0)},_0x53a1a6.prototype.setVisible=function(e){this.rect.style.visibility=e?"visible":"hidden"},_0x53a1a6.prototype.getRectPoint=function(){return{leftTopPoint:this.leftTopPoint,rightBottomPoint:this.rightBottomPoint}},_0x53a1a6.prototype.destroy=function(){e.removeChild(_0x395f89),this.rect=null}}function _0x165998(e,t){let i=t.screenSpaceCameraController;i.enableRotate=e,i.enableTranslate=e,i.enableZoom=e,i.enableTilt=e,i.enableLook=e}function _0x13971e(e,t,i){t?(i.enableCursorStyle=!1,i._element.style.cursor="",e.style.cursor="default"):i.enableCursorStyle=!0}function _0x3c696b(){_0x4cccce.setInputAction((function(e){_0x822650=!0,_0x34363d=new WebGLPlot.Cartesian2(e.position.x,e.position.y)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN);let e=function(e){_0x4c5536.cancelEvt.raiseEvent(),"Shift"===e.key&&_0x822650&&!_0x4c5536.isDestroyed&&(_0x822650=!1,_0x395f89.setVisible(!1))};document.addEventListener("keyup",e),_0x30487c.push((function(){document.removeEventListener("keyup",e)})),_0x4cccce.setInputAction((function(e){let t=e.endPosition;_0x4c5536.activeEvt.raiseEvent(t),_0x822650&&(_0x395f89.setPosition(_0x34363d,t),_0x395f89.setVisible(!0),_0x4c5536.movingEvt.raiseEvent(_0x395f89.getRectPoint()))}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),_0x4cccce.setInputAction((function(e){_0x822650=!1,_0x395f89.setVisible(!1),_0x4c5536.drawEvt.raiseEvent(_0x395f89.getRectPoint())}),WebGLPlot.ScreenSpaceEventType.LEFT_UP)}function _0x44e94d(){_0x4cccce.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x4cccce.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),_0x4cccce.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x4cccce.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP)}_0x434208.prototype.destroy=function(){if(!this.isDestroyed){_0x165998(!0,this.viewer.scene),_0x44e94d();for(let e=0,t=_0x30487c.length;e<t;e++)_0x30487c[e]();_0x4cccce.destroy(),_0x395f89.destroy(),_0x395f89=null,this.isDestroyed=!0}},_0x434208.prototype.activate=function(){this.isDestroyed||(_0x165998(!1,this.viewer.scene),_0x13971e(this.dom,!0,this.viewer),_0x3c696b())},_0x434208.prototype.deactivate=function(){this.isDestroyed||(_0x165998(!0,this.viewer.scene),_0x13971e(this.dom,!1,this.viewer),_0x44e94d())};var _0x4a5c55=(_0x2a4a06=!0,function(e,t){var i=_0x2a4a06?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a4a06=!1,i}),_0x14f8b0=_0x4a5c55(void 0,(function(){return _0x14f8b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x14f8b0).search("(((.+)+)+)+$")})),_0x2a4a06;_0x14f8b0();var _0x926223={GEOJSON:"GEOJSON",ISERVER:"ISERVER"};class NetworkAnalystServiceBase extends _0xd9c3dd{constructor(e,t){super(e,t),this.format=_0x926223.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t,i=this;(e=_0x57693f.transformResult(e))&&i.format===_0x926223.GEOJSON&&"function"==typeof i.toGeoJSONResult&&(t=i.toGeoJSONResult(e)),t||(t=e),i.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){return null}}function _0x4a6d61(){}_0x4a6d61.extend=function(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},_0x4a6d61.copy=function(e,t){var i;if(e=e||{},t)for(var n in e)typeof(i=t[n])<"u"&&(e[n]=i)},_0x4a6d61.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"===_typeof(e[t])&&e[t]instanceof Array){for(var i in e[t])e[t][i].destroy&&e[t][i].destroy();e[t].length=0}else"object"===_typeof(e[t])&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},_0x4a6d61.getElement=function(){for(var e=[],t=0,i=arguments.length;t<i;t++){var n=arguments[t];if("string"==typeof n&&(n=document.getElementById(n)),1===arguments.length)return n;e.push(n)}return e},_0x4a6d61.isElement=function(e){return!(!e||1!==e.nodeType)},_0x4a6d61.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},_0x4a6d61.removeItem=function(e,t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1);return e},_0x4a6d61.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},_0x4a6d61.modifyDOMElement=function(e,t,i,n,r,o,a,s){t&&(e.id=t),i&&(e.style.left=i.x+"px",e.style.top=i.y+"px"),n&&(e.style.width=n.w+"px",e.style.height=n.h+"px"),r&&(e.style.position=r),o&&(e.style.border=o),a&&(e.style.overflow=a),parseFloat(s)>=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},_0x4a6d61.applyDefaults=function(e,t){e=e||{};var i="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!i&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!i&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},_0x4a6d61.getParameterString=function(e){var t=[];for(var i in e){var n,r=e[i];if(null!=r&&"function"!=typeof r)n=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(i)+"="+n)}return t.join("&")},_0x4a6d61.urlAppend=function(e,t){var i=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i},_0x4a6d61.urlPathAppend=function(e,t){var i=e;if(!t)return i;0===t.indexOf("/")&&(t=t.substring(1));var n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),i="".concat(n[0]).concat(t).concat(n.length>1?"?".concat(n[1]):"")},_0x4a6d61.DEFAULT_PRECISION=14,_0x4a6d61.toFloat=function(e,t){return null==t&&(t=_0x4a6d61.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},_0x4a6d61.rad=function(e){return e*Math.PI/180},_0x4a6d61.getParameters=function(e){e=e??window.location.href;var t="";if(StringExt.contains(e,"?")){var i=e.indexOf("?")+1,n=StringExt.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(i,n)}for(var r={},o=t.split(/[&;]/),a=0,s=o.length;a<s;++a){var l=o[a].split("=");if(l[0]){var u=l[0];try{u=decodeURIComponent(u)}catch{u=unescape(u)}var c=(l[1]||"").replace(/\+/g," ");try{c=decodeURIComponent(c)}catch{c=unescape(c)}1==(c=c.split(",")).length&&(c=c[0]),r[u]=c}}return r},_0x4a6d61.lastSeqID=0,_0x4a6d61.createUniqueID=function(e){return null==e&&(e="id_"),_0x4a6d61.lastSeqID+=1,e+_0x4a6d61.lastSeqID},_0x4a6d61.normalizeScale=function(e){return e>1?1/e:e},_0x4a6d61.getResolutionFromScale=function(e,t){var i;e&&(null==t&&(t="degrees"),i=1/(_0x4a6d61.normalizeScale(e)*_0x37ee86[t]*_0x5f44f1));return i},_0x4a6d61.getScaleFromResolution=function(e,t){return null==t&&(t="degrees"),e*_0x37ee86[t]*_0x5f44f1},_0x4a6d61.getBrowser=function(){return _0x24e6db},_0x4a6d61.isSupportCanvas=_0x228fbf,_0x4a6d61.supportCanvas=function(){return _0x4a6d61.isSupportCanvas},_0x4a6d61.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l},_0x4a6d61.calculateDpi=function(e,t,i,n,r){if(e&&t&&i){var o,a=1e4,s=e.getWidth(),l=e.getHeight(),u=t.w,c=t.h;if(r=r||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){var h=s/u,d=l/c;o=254/(h>d?h:d)/i/(2*Math.PI*r/360)/a}else{o=254/(s/u)/i/a}return o}},_0x4a6d61.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var i="",n=0,r=t.length;n<r;n++)i+=_0x4a6d61.toJSON(t[n]),n!==t.length-1&&(i+=",");return"["+i+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"===_typeof(t)){if(t.length){for(var o=[],a=0,s=t.length;a<s;a++)o.push(_0x4a6d61.toJSON(t[a]));return"["+o.join(",")+"]"}var l=[];for(var u in t)"function"!=typeof t[u]&&"CLASS_NAME"!==u&&"parent"!==u&&l.push("'"+u+"':"+_0x4a6d61.toJSON(t[u]));return l.length>0?"{"+l.join(",")+"}":"{}"}return t.toString()}},_0x4a6d61.getResolutionFromScaleDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?(e=_0x4a6d61.normalizeScale(e),"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r):-1},_0x4a6d61.getScaleFromResolutionDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r:-1},_0x4a6d61.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},_0x4a6d61.copyAttributes=function(e,t){if(e=e||{},t)for(var i in t){var n=t[i];void 0!==n&&"CLASS_NAME"!==i&&"function"!=typeof n&&(e[i]=n)}return e},_0x4a6d61.copyAttributesWithClip=function(e,t,i){if(e=e||{},t)for(var n in t){var r=!1;if(i&&i.length)for(var o=0,a=i.length;o<a;o++)if(n===i[o]){r=!0;break}if(!0!==r){var s=t[n];void 0!==s&&"CLASS_NAME"!==n&&"function"!=typeof s&&(e[n]=s)}}return e},_0x4a6d61.cloneObject=function(e){if(null===e||"object"!==_typeof(e))return e;if(e instanceof Date){var t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.slice(0);if(e instanceof Object){var i={};for(var n in e)e.hasOwnProperty(n)&&(i[n]=_0x4a6d61.cloneObject(e[n]));return i}throw new Error("Unable to copy obj! Its type isn't supported.")},_0x4a6d61.lineIntersection=function(e,t,i,n){var r,o,a=null,s=(n.x-i.x)*(e.y-i.y)-(n.y-i.y)*(e.x-i.x),l=(t.x-e.x)*(e.y-i.y)-(t.y-e.y)*(e.x-i.x),u=(n.y-i.y)*(t.x-e.x)-(n.x-i.x)*(t.y-e.y);if(0!=u)o=l/u,a=(r=s/u)>=0&&o<=1&&r<=1&&o>=0?new Geometry.Point(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y)):"No Intersection";else if(0==s&&0==l){var c=Math.max(e.y,t.y),h=Math.min(e.y,t.y),d=Math.max(e.x,t.x),f=Math.min(e.x,t.x);a=(i.y>=h&&i.y<=c||n.y>=h&&n.y<=c)&&i.x>=f&&i.x<=d||n.x>=f&&n.x<=d?"Coincident":"Parallel"}else a="Parallel";return a},_0x4a6d61.getTextBounds=function(e,t,i){document.body.appendChild(i),i.style.width="auto",i.style.height="auto",e.fontSize&&(i.style.fontSize=e.fontSize),e.fontFamily&&(i.style.fontFamily=e.fontFamily),e.fontWeight&&(i.style.fontWeight=e.fontWeight),i.style.position="relative",i.style.visibility="hidden",i.style.display="inline-block",i.innerHTML=t;var n=i.clientWidth,r=i.clientHeight;return document.body.removeChild(i),{textWidth:n,textHeight:r}},_0x4a6d61.convertPath=function(e,t){return t?e.replace(/\{([\w-\.]+)\}/g,(function(e,i){var n;return n=t.hasOwnProperty(i)?paramToString(t[i]):e,encodeURIComponent(n)})):e};var _0x5f44f1=96,_0x37ee86={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};_0x37ee86.in=_0x37ee86.inches,_0x37ee86.degrees=_0x37ee86.dd,_0x37ee86.nmi=1852*_0x37ee86.m;var _0x24e6db=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();var n,r="",o="",a="pc",s=navigator.userAgent.toLowerCase();return s.indexOf("msie")>-1||s.indexOf("trident")>-1&&s.indexOf("rv")>-1?(r="msie",n=s.match(/msie ([\d.]+)/)||s.match(/rv:([\d.]+)/)):s.indexOf("chrome")>-1?(r="chrome",n=s.match(/chrome\/([\d.]+)/)):s.indexOf("firefox")>-1?(r="firefox",n=s.match(/firefox\/([\d.]+)/)):s.indexOf("opera")>-1?(r="opera",n=s.match(/version\/([\d.]+)/)):s.indexOf("safari")>-1&&(r="safari",n=s.match(/version\/([\d.]+)/)),o=n?n[1]:"",s.indexOf("ipad")>-1||s.indexOf("ipod")>-1||s.indexOf("iphone")>-1?a="apple":s.indexOf("android")>-1&&(o=(n=s.match(/version\/([\d.]+)/))?n[1]:"",a="android"),{name:r,version:o,device:a}}(),_0x228fbf=(_0x171728=!0,_0x1b58ea=_0x24e6db,document.createElement("canvas").getContext?("firefox"===_0x1b58ea.name&&parseFloat(_0x1b58ea.version)<5&&(_0x171728=!1),"safari"===_0x1b58ea.name&&parseFloat(_0x1b58ea.version)<4&&(_0x171728=!1),"opera"===_0x1b58ea.name&&parseFloat(_0x1b58ea.version)<10&&(_0x171728=!1),"msie"===_0x1b58ea.name&&parseFloat(_0x1b58ea.version)<9&&(_0x171728=!1)):_0x171728=!1,_0x171728),_0x171728,_0x1b58ea,_0x3534f6=(_0x593ad7=!0,function(e,t){var i=_0x593ad7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x593ad7=!1,i}),_0x107600=_0x3534f6(void 0,(function(){return _0x107600.toString().search("(((.+)+)+)+$").toString().constructor(_0x107600).search("(((.+)+)+)+$")})),_0x593ad7;_0x107600();class BurstPipelineAnalystService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof BurstPipelineAnalystParameters))return null;var t,i=this;if(i.url=_0x4a6d61.urlPathAppend(i.url,"burstAnalyse"),t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");if(null===e.edgeID&&null===e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}var _0x84fa9d=(_0x2127a4=!0,function(e,t){var i=_0x2127a4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2127a4=!1,i}),_0x319b21=_0x84fa9d(void 0,(function(){return _0x319b21.toString().search("(((.+)+)+)+$").toString().constructor(_0x319b21).search("(((.+)+)+)+$")})),_0x2127a4;_0x319b21();class TransportationAnalystResultSetting{constructor(e){!e||(this.returnEdgeFeatures=!1,this.returnEdgeGeometry=!1,this.returnEdgeIDs=!1,this.returnNodeFeatures=!1,this.returnNodeGeometry=!1,this.returnNodeIDs=!1,this.returnPathGuides=!1,this.returnRoutes=!1,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystResultSetting")}destroy(){var e=this;e.returnEdgeFeatures=null,e.returnEdgeGeometry=null,e.returnEdgeIDs=null,e.returnNodeFeatures=null,e.returnNodeGeometry=null,e.returnNodeIDs=null,e.returnPathGuides=null,e.returnRoutes=null}}var _0x21f3df=(_0x52bbdd=!0,function(e,t){var i=_0x52bbdd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x52bbdd=!1,i}),_0x25780e=_0x21f3df(void 0,(function(){return _0x25780e.toString().search("(((.+)+)+)+$").toString().constructor(_0x25780e).search("(((.+)+)+)+$")})),_0x52bbdd;_0x25780e();class TransportationAnalystParameter{constructor(e){!e||(this.barrierEdgeIDs=null,this.barrierNodeIDs=null,this.barrierPoints=null,this.weightFieldName=null,this.turnWeightField=null,this.resultSetting=new TransportationAnalystResultSetting,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystParameter")}destroy(){var e=this;if(e.barrierEdgeIDs=null,e.barrierNodeIDs=null,e.weightFieldName=null,e.turnWeightField=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.barrierPoints&&e.barrierPoints.length)for(var t in e.barrierPoints)e.barrierPoints[t].destroy();e.barrierPoints=null}}var _0x3d37b3=(_0x435ccc=!0,function(e,t){var i=_0x435ccc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x435ccc=!1,i}),_0x62fc28=_0x3d37b3(void 0,(function(){return _0x62fc28.toString().search("(((.+)+)+)+$").toString().constructor(_0x62fc28).search("(((.+)+)+)+$")})),_0x435ccc;_0x62fc28();class ComputeWeightMatrixParameters{constructor(e){this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.ComputeWeightMatrixParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x24c237=(_0x512359=!0,function(e,t){var i=_0x512359?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x512359=!1,i}),_0xa7fb69=_0x24c237(void 0,(function(){return _0xa7fb69.toString().search("(((.+)+)+)+$").toString().constructor(_0xa7fb69).search("(((.+)+)+)+$")})),_0x512359;_0xa7fb69();class ComputeWeightMatrixService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ComputeWeightMatrixService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ComputeWeightMatrixParameters){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"weightmatrix"),t={parameter:_0x57693f.toJSON(e.parameter),nodes:i.getJson(e.isAnalyzeById,e.nodes)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}}var _0x1e6561=(_0xe0dd34=!0,function(e,t){var i=_0xe0dd34?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe0dd34=!1,i}),_0x2ae599=_0x1e6561(void 0,(function(){return _0x2ae599.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ae599).search("(((.+)+)+)+$")})),_0xe0dd34;_0x2ae599();class _0x531671{constructor(e){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=!1,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalyst3DParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null}}var _0xcd63ba=(_0x9b11da=!0,function(e,t){var i=_0x9b11da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x9b11da=!1,i}),_0x24045f=_0xcd63ba(void 0,(function(){return _0x24045f.toString().search("(((.+)+)+)+$").toString().constructor(_0x24045f).search("(((.+)+)+)+$")})),_0x9b11da;_0x24045f();class FacilityAnalystStreamParameters{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,this.queryType=null,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystStreamParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null,e.type=null}}var _0x2cfcc2=(_0x398d60=!0,function(e,t){var i=_0x398d60?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x398d60=!1,i}),_0x130339=_0x2cfcc2(void 0,(function(){return _0x130339.toString().search("(((.+)+)+)+$").toString().constructor(_0x130339).search("(((.+)+)+)+$")})),_0x398d60;_0x130339();class FacilityAnalystStreamService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystStreamService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FacilityAnalystStreamParameters){var t,i=this;if(0===e.queryType)i.url=_0x4a6d61.urlPathAppend(i.url,"upstreamcirticalfaclilities");else{if(1!==e.queryType)return;i.url=_0x4a6d61.urlPathAppend(i.url,"downstreamcirticalfaclilities")}t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},(null===e.edgeID||null===e.nodeID)&&(null===e.edgeID&&null===e.nodeID||(null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})))}}}var _0x2859d4=(_0x15b122=!0,function(e,t){var i=_0x15b122?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x15b122=!1,i}),_0x2fa5d7=_0x2859d4(void 0,(function(){return _0x2fa5d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fa5d7).search("(((.+)+)+)+$")})),_0x15b122;_0x2fa5d7();class _0x573b05 extends _0x531671{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DParameters"}destroy(){super.destroy()}}var _0x13b9c1=(_0x23e591=!0,function(e,t){var i=_0x23e591?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23e591=!1,i}),_0x7a18f0=_0x13b9c1(void 0,(function(){return _0x7a18f0.toString().search("(((.+)+)+)+$").toString().constructor(_0x7a18f0).search("(((.+)+)+)+$")})),_0x23e591;_0x7a18f0();class _0x11783d extends _0xd9c3dd{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _0x573b05){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"tracedownresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}var _0x48ed3b=(_0x3f83f6=!0,function(e,t){var i=_0x3f83f6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f83f6=!1,i}),_0x5f9b22=_0x48ed3b(void 0,(function(){return _0x5f9b22.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f9b22).search("(((.+)+)+)+$")})),_0x3f83f6;_0x5f9b22();class _0x205ec0 extends _0x531671{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DParameters"}destroy(){super.destroy()}}var _0x8edb93=(_0x47d731=!0,function(e,t){var i=_0x47d731?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47d731=!1,i}),_0x2f3811=_0x8edb93(void 0,(function(){return _0x2f3811.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f3811).search("(((.+)+)+)+$")})),_0x47d731;_0x2f3811();class _0x3e2490 extends _0xd9c3dd{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _0x205ec0){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"traceupresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}var _0x35abc0=(_0x51d14c=!0,function(e,t){var i=_0x51d14c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51d14c=!1,i}),_0x7124c0=_0x35abc0(void 0,(function(){return _0x7124c0.toString().search("(((.+)+)+)+$").toString().constructor(_0x7124c0).search("(((.+)+)+)+$")})),_0x51d14c;_0x7124c0();class _0x25f55d{constructor(e,t,i,n){_0x57693f.isArray(e)&&(n=e[3],i=e[2],t=e[1],e=e[0]),this.left=null!=e?_0x57693f.toFloat(e):this.left,this.bottom=null!=t?_0x57693f.toFloat(t):this.bottom,this.right=null!=i?_0x57693f.toFloat(i):this.right,this.top=null!=n?_0x57693f.toFloat(n):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new _0x25f55d(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var i=Math.pow(10,e),n=Math.round(this.left*i)/i,r=Math.round(this.bottom*i)/i,o=Math.round(this.right*i)/i,a=Math.round(this.top*i)/i;return!0===t?r+","+n+","+a+","+o:n+","+r+","+o+","+a}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new Size(this.getWidth(),this.getHeight())}getCenterPixel(){return new Pixel((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new LonLat((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var i,n;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(i=t.lon,n=t.lat):(i=t.x,n=t.y);var r=(this.left-i)*e+i,o=(this.bottom-n)*e+n,a=(this.right-i)*e+i,s=(this.top-n)*e+n;return new _0x25f55d(r,o,a,s)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new _0x25f55d(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new _0x25f55d(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new _0x25f55d(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var i=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!i){var r=n.getWidth(),o=(n.left+n.right)/2,a=Math.round((e.lon-o)/r);i=this.containsLonLat({lon:e.lon-a*r,lat:e.lat},{inclusive:t.inclusive})}return i}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,i){if(null==i&&(i=!0),null==e||null==t)return!1;return i?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var i=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else i=this;null==t.inclusive&&(t.inclusive=!0);var n=!1,r=i.left===e.right||i.right===e.left||i.top===e.bottom||i.bottom===e.top;if(t.inclusive||!r){var o=e.bottom>=i.bottom&&e.bottom<=i.top||i.bottom>=e.bottom&&i.bottom<=e.top,a=e.top>=i.bottom&&e.top<=i.top||i.top>e.bottom&&i.top<e.top,s=e.left>=i.left&&e.left<=i.right||i.left>=e.left&&i.left<=e.right,l=e.right>=i.left&&e.right<=i.right||i.right>=e.left&&i.right<=e.right;n=(o||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),h=!u.containsBounds(i),d=!u.containsBounds(e);h&&!d?(e=e.add(-c,0),n=i.intersectsBounds(e,{inclusive:t.inclusive})):d&&!h&&(i=i.add(-c,0),n=e.intersectsBounds(i,{inclusive:t.inclusive}))}return n}containsBounds(e,t,i){null==t&&(t=!1),null==i&&(i=!0);var n=this.contains(e.left,e.bottom,i),r=this.contains(e.right,e.bottom,i),o=this.contains(e.left,e.top,i),a=this.contains(e.right,e.top,i);return t?n||r||o||a:n&&r&&o&&a}determineQuadrant(e){var t="",i=this.getCenterLonLat();return t+=e.lat<i.lat?"b":"t",t+=e.lon<i.lon?"l":"r"}wrapDateLine(e,t){var i=(t=t||{}).leftTolerance||0,n=t.rightTolerance||0,r=this.clone();if(e){for(var o=e.getWidth();r.left<e.left&&r.right-n<=e.left;)r=r.add(o,0);for(;r.left+i>=e.right&&r.right>e.right;)r=r.add(-o,0);var a=r.left+i;a<e.right&&a>e.left&&r.right-n>e.right&&(r=r.add(-o,0))}return r}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}fromString(e,t){var i=e.split(",");return _0x25f55d.fromArray(i,t)}fromArray(e,t){return!0===t?new _0x25f55d(e[1],e[0],e[3],e[2]):new _0x25f55d(e[0],e[1],e[2],e[3])}fromSize(e){return new _0x25f55d(0,e.h,e.w,0)}oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}var _0xf5a48c=(_0x3aea27=!0,function(e,t){var i=_0x3aea27?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3aea27=!1,i}),_0x4b2f29=_0xf5a48c(void 0,(function(){return _0x4b2f29.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b2f29).search("(((.+)+)+)+$")})),_0x3aea27;_0x4b2f29();class _0x46fa27{constructor(){this.CLASS_NAME="SuperMap.GeometryServer",this.id=_0x57693f.createUniqueID(this.CLASS_NAME+"_"),this.parent=null,this.bounds=null,this.SRID=null}destroy(){this.id=null,this.bounds=null,this.SRID=null}clone(){return new _0x46fa27}setBounds(e){e&&(this.bounds=e.clone())}clearBounds(){this.bounds=null,this.parent&&this.parent.clearBounds()}extendBounds(e){this.getBounds()?this.bounds.extend(e):this.setBounds(e)}getBounds(){return null==this.bounds&&this.calculateBounds(),this.bounds}calculateBounds(){}getVertices(e){}getArea(){return 0}}var _0xcc18ff=(_0x1b500e=!0,function(e,t){var i=_0x1b500e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b500e=!1,i}),_0x5a515f=_0xcc18ff(void 0,(function(){return _0x5a515f.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a515f).search("(((.+)+)+)+$")})),_0x1b500e;_0x5a515f();class Collection$1 extends _0x46fa27{constructor(e){super(),this.components=[],this.componentTypes=null,null!=e&&this.addComponents(e),this.CLASS_NAME="SuperMap.Geometry.Collection",this.geometryType="Collection"}destroy(){this.components.length=0,this.components=null,super.destroy()}clone(){for(var e=new Collection$1,t=0,i=this.components.length;t<i;t++)e.addComponent(this.components[t].clone());return _0x57693f.applyDefaults(e,this),e}getComponentsString(){for(var e=[],t=0,i=this.components.length;t<i;t++)e.push(this.components[t].toShortString());return e.join(",")}calculateBounds(){this.bounds=null;var e=new _0x25f55d,t=this.components;if(t)for(var i=0,n=t.length;i<n;i++)e.extend(t[i].getBounds());null!=e.left&&null!=e.bottom&&null!=e.right&&null!=e.top&&this.setBounds(e)}addComponents(e){_0x57693f.isArray(e)||(e=[e]);for(var t=0,i=e.length;t<i;t++)this.addComponent(e[t])}addComponent(e,t){var i=!1;if(e&&(null==this.componentTypes||_0x57693f.indexOf(this.componentTypes,e.CLASS_NAME)>-1)){if(null!=t&&t<this.components.length){var n=this.components.slice(0,t),r=this.components.slice(t,this.components.length);n.push(e),this.components=n.concat(r)}else this.components.push(e);e.parent=this,this.clearBounds(),i=!0}return i}removeComponents(e){var t=!1;_0x57693f.isArray(e)||(e=[e]);for(var i=e.length-1;i>=0;--i)t=this.removeComponent(e[i])||t;return t}removeComponent(e){return _0x57693f.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,i=this.components.length;t<i;t++)e+=this.components[t].getArea();return e}equals(e){var t=!0;if(e&&e.CLASS_NAME&&this.CLASS_NAME===e.CLASS_NAME)if(_0x57693f.isArray(e.components)&&e.components.length===this.components.length){for(var i=0,n=this.components.length;i<n;++i)if(!this.components[i].equals(e.components[i])){t=!1;break}}else t=!1;else t=!1;return t}getVertices(e){for(var t=[],i=0,n=this.components.length;i<n;++i)Array.prototype.push.apply(t,this.components[i].getVertices(e));return t}}var _0x42149b=(_0x117db2=!0,function(e,t){var i=_0x117db2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x117db2=!1,i}),_0xa7917a=_0x42149b(void 0,(function(){return _0xa7917a.toString().search("(((.+)+)+)+$").toString().constructor(_0xa7917a).search("(((.+)+)+)+$")})),_0x117db2;_0xa7917a();class MultiPolygon extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Polygon"],this.CLASS_NAME="SuperMap.Geometry.MultiPolygon",this.geometryType="MultiPolygon"}}var _0x3682a7=(_0x413d95=!0,function(e,t){var i=_0x413d95?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x413d95=!1,i}),_0x484037=_0x3682a7(void 0,(function(){return _0x484037.toString().search("(((.+)+)+)+$").toString().constructor(_0x484037).search("(((.+)+)+)+$")})),_0x413d95;_0x484037();class Point$1 extends _0x46fa27{constructor(e,t,i,n){super(e,t,i,n),this.x=parseFloat(e),this.y=parseFloat(t),this.tag=n||0==n?parseFloat(n):null,this.type=i||"Point",this.CLASS_NAME="SuperMap.Geometry.Point",this.geometryType="Point"}clone(e){return null==e&&(e=new Point$1(this.x,this.y)),_0x57693f.applyDefaults(e,this),e}calculateBounds(){this.bounds=new _0x25f55d(this.x,this.y,this.x,this.y)}equals(e){var t=!1;return null!=e&&(t=this.x===e.x&&this.y===e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}move(e,t){this.x=this.x+e,this.y=this.y+t,this.clearBounds()}toShortString(){return this.x+", "+this.y}destroy(){this.x=null,this.y=null,this.tag=null,super.destroy()}getVertices(){return[this]}}var _0x30370a=(_0x5e0c7e=!0,function(e,t){var i=_0x5e0c7e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e0c7e=!1,i}),_0xfb8bfb=_0x30370a(void 0,(function(){return _0xfb8bfb.toString().search("(((.+)+)+)+$").toString().constructor(_0xfb8bfb).search("(((.+)+)+)+$")})),_0x5e0c7e;_0xfb8bfb();class MultiPoint extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.MultiPoint",this.geometryType="MultiPoint"}addPoint(e,t){this.addComponent(e,t)}removePoint(e){this.removeComponent(e)}}var _0x3b17ca=(_0xdce96f=!0,function(e,t){var i=_0xdce96f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xdce96f=!1,i}),_0x56e441=_0x3b17ca(void 0,(function(){return _0x56e441.toString().search("(((.+)+)+)+$").toString().constructor(_0x56e441).search("(((.+)+)+)+$")})),_0xdce96f;_0x56e441();class Curve extends MultiPoint{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point","SuperMap.PointWithMeasure"],this.CLASS_NAME="SuperMap.Geometry.Curve",this.geometryType="Curve"}}var _0x1109a6=(_0x4065ab=!0,function(e,t){var i=_0x4065ab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4065ab=!1,i}),_0x4a2c4d=_0x1109a6(void 0,(function(){return _0x4a2c4d.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a2c4d).search("(((.+)+)+)+$")})),_0x4065ab;_0x4a2c4d();class LineString extends Curve{constructor(e){super(e),this.CLASS_NAME="SuperMap.Geometry.LineString",this.geometryType="LineString"}removeComponent(e){var t=this.components&&this.components.length>2;return t&&LineString_get(LineString_getPrototypeOf(LineString.prototype),"removeComponent",this).apply(this,arguments),t}getSortedSegments(){for(var e,t,i=this.components.length-1,n=new Array(i),r=0;r<i;++r)e=this.components[r],t=this.components[r+1],e.x<t.x?n[r]={x1:e.x,y1:e.y,x2:t.x,y2:t.y}:n[r]={x1:t.x,y1:t.y,x2:e.x,y2:e.y};return n.sort((function(e,t){return e.x1-t.x1}))}getVertices(e){return!0===e?[this.components[0],this.components[this.components.length-1]]:!1===e?this.components.slice(1,this.components.length-1):this.components.slice()}calculateCircle(e){if(e.length<3)return e;var t={},i=e[0],n=e[1],r=e[2],o=0,a=0,s=!0,l=0,u=0,c=0,h=[],d=(r.y-i.y)/(r.x-i.x),f=r.y-d*r.x;if(r.x!=i.x&&r.y!=i.y&&n.y==d*n.x+f||r.x==i.x&&n.x==i.x||r.y==i.y&&n.y==i.y||r.x==i.x&&r.y==i.y||r.x==n.x&&r.y==n.y||i.x==n.x&&i.y==n.y)h.push(i),h.push(n),h.push(r);else{var p=(n.x*n.x+n.y*n.y-(i.x*i.x+i.y*i.y))*(2*(r.y-i.y))-(r.x*r.x+r.y*r.y-(i.x*i.x+i.y*i.y))*(2*(n.y-i.y)),_=2*(n.x-i.x)*(r.x*r.x+r.y*r.y-(i.x*i.x+i.y*i.y))-2*(r.x-i.x)*(n.x*n.x+n.y*n.y-(i.x*i.x+i.y*i.y)),m=4*((n.x-i.x)*(r.y-i.y)-(r.x-i.x)*(n.y-i.y));t.x=p/m,t.y=_/m;var g=(2*(o=Math.sqrt((i.x-t.x)*(i.x-t.x)+(i.y-t.y)*(i.y-t.y)))*o-((i.x-r.x)*(i.x-r.x)+(i.y-r.y)*(i.y-r.y)))/(2*o*o);g=(g=g>=1?1:g)<=-1?-1:g,c=180*Math.acos(g)/Math.PI,a=(c=r.x==i.x?t.x>i.x&&n.x>i.x||t.x<i.x&&n.x<i.x?360-c:c:t.y>d*t.x+f&&n.y>d*n.x+f||t.y<d*t.x+f&&n.y<d*n.x+f?360-c:c)/72,r.y!=i.y?r.x==i.x?r.y>i.y?n.x<i.x&&(s=!1):n.x>i.x&&(s=!1):r.x<i.x?n.y<d*n.x+f&&(s=!1):n.y>d*n.x+f&&(s=!1):r.x>i.x?n.y>i.y&&(s=!1):n.y<i.y&&(s=!1);var x=(i.y-t.y)/(i.x-t.x),v=x>=0?180*Math.atan(x)/Math.PI:Math.abs(180*Math.atan(x)/Math.PI)+90,y=Math.abs(t.y);i.y==y&&y==r.y&&i.x<r.x&&(v+=180);var $=i.y-t.y;h.push(i);for(var b=1;b<72;b++){l=a*b,u=v,s?$>=0?x>=0?u+=l:u=180-(u-90)+l:u=x>0?u-180+l:90-u+l:$>=0?x>=0?u-=l:u=180-(u-90)-l:u=x>=0?u-180-l:90-u-l,u=u*Math.PI/180;var T=t.x+o*Math.cos(u),C=t.y+o*Math.sin(u);h.push(new Point(T,C))}h.push(r)}return h}createLineEPS(e){var t=[],i=e.length;if(i<2)return e;for(var n=0;n<i;){if("LTypeArc"==e[n].type){var r=LineString.createLineArc(t,n,i,e);t=r[0],n=r[1]}else t.push(e[n]),n++}return t}createLineArc(e,t,i,n){if(0==t){var r=LineString.addPointEPS(n,t,i,"LTypeArc");Array.prototype.push.apply(e,r[0]),t=r[1]+1}else if(t==i-1){var o=[n[t-1],n[t]],a=LineString.calculateCircle(o);Array.prototype.push.apply(e,a),t++}else{var s=LineString.addPointEPS(n,t,i,"LTypeArc");e.pop(),Array.prototype.push.apply(e,s[0]),t=s[1]+1}return[e,t]}addPointEPS(e,t,i,n){var r,o=[],a=t+1;return 0==t?Array.prototype.push.apply(o,[e[t],e[t+1]]):t==i-1?Array.prototype.push.apply(o,[e[t-1],e[t]]):Array.prototype.push.apply(o,[e[t-1],e[t],e[t+1]]),"LTypeCurve"==n?r=LineString.calculatePointsFBZN(o):"LTypeArc"==n&&(r=LineString.calculateCircle(o)),[r,a]}}var _0x2f7f25=(_0x5f14bc=!0,function(e,t){var i=_0x5f14bc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f14bc=!1,i}),_0x28b7f8=_0x2f7f25(void 0,(function(){return _0x28b7f8.toString().search("(((.+)+)+)+$").toString().constructor(_0x28b7f8).search("(((.+)+)+)+$")})),_0x5f14bc;_0x28b7f8();class MultiLineString extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Geometry.MultiLineString",this.geometryType="MultiLineString"}}var _0x13ae77=(_0x175315=!0,function(e,t){var i=_0x175315?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x175315=!1,i}),_0x2b0fa6=_0x13ae77(void 0,(function(){return _0x2b0fa6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b0fa6).search("(((.+)+)+)+$")})),_0x175315;_0x2b0fa6();class LinearRing extends LineString{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var i=!1,n=this.components.pop();(null!=t||!e.equals(n))&&(i=LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,arguments));var r=this.components[0];return LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,[r]),i}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"removeComponent",this).apply(this,arguments);var i=this.components[0];LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,[i])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,i=0,n=this.components.length;i<n-1;i++){var r=this.components[i],o=this.components[i+1];t+=(r.x+o.x)*(o.y-r.y)}e=-t/2}return e}getVertices(e){return!0===e?[]:this.components.slice(0,this.components.length-1)}}var _0x2f31d0=(_0x48a269=!0,function(e,t){var i=_0x48a269?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x48a269=!1,i}),_0x4d6396=_0x2f31d0(void 0,(function(){return _0x4d6396.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d6396).search("(((.+)+)+)+$")})),_0x48a269;_0x4d6396();class Polygon extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LinearRing"],this.CLASS_NAME="SuperMap.Geometry.Polygon",this.geometryType="Polygon"}getArea(){var e=0;if(this.components&&this.components.length>0){e+=Math.abs(this.components[0].getArea());for(var t=1,i=this.components.length;t<i;t++)e-=Math.abs(this.components[t].getArea())}return e}}var _0x39a5a6=(_0x37e558=!0,function(e,t){var i=_0x37e558?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37e558=!1,i}),_0x2f79dc=_0x39a5a6(void 0,(function(){return _0x2f79dc.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f79dc).search("(((.+)+)+)+$")})),_0x37e558;_0x2f79dc();class Feature{constructor(e,t,i){this.CLASS_NAME="SuperMap.Feature",this.layer=e,this.id=_0x57693f.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=t,this.data=i??{}}destroy(){this.id=null,this.lonlat=null,this.data=null}}var _0x3cd79c=(_0x5ac5f5=!0,function(e,t){var i=_0x5ac5f5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ac5f5=!1,i}),_0xb141e2=_0x3cd79c(void 0,(function(){return _0xb141e2.toString().search("(((.+)+)+)+$").toString().constructor(_0xb141e2).search("(((.+)+)+)+$")})),_0x5ac5f5;_0xb141e2();var _0x326b5b={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"};class Vector extends Feature{constructor(e,t,i){super(null,null,t),this.fid=null,this.geometry=e||null,this.attributes={},t&&(this.attributes=Util.extend(_this.attributes,t)),this.bounds=null,this.state=null,this.style=i||null,this.url=null,this.lonlat=null,this.CLASS_NAME="SuperMap.Feature.Vector",Vector.style={default:{fillColor:"#ee9900",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},select:{fillColor:"blue",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},temporary:{fillColor:"#66cccc",fillOpacity:.2,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"default",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},delete:{display:"none"}}}destroy(){this.layer&&(this.layer.removeFeatures(this),this.layer=null),this.geometry=null,Vector_get(Vector_getPrototypeOf(Vector.prototype),"destroy",this).call(this)}clone(){return new Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style)}toState(e){if(e===_0x326b5b.UPDATE)switch(this.state){case _0x326b5b.UNKNOWN:case _0x326b5b.DELETE:this.state=e}else if(e===_0x326b5b.INSERT)if(this.state===_0x326b5b.UNKNOWN);else this.state=e;else if(e===_0x326b5b.DELETE)switch(this.state){case _0x326b5b.INSERT:case _0x326b5b.DELETE:break;case _0x326b5b.UNKNOWN:case _0x326b5b.UPDATE:this.state=e}else e===_0x326b5b.UNKNOWN&&(this.state=e)}}var _0x1e8577=(_0x1ccc94=!0,function(e,t){var i=_0x1ccc94?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ccc94=!1,i}),_0x425ca9=_0x1e8577(void 0,(function(){return _0x425ca9.toString().search("(((.+)+)+)+$").toString().constructor(_0x425ca9).search("(((.+)+)+)+$")})),_0x1ccc94;_0x425ca9();class PointWithMeasure extends Point$1{constructor(e){super(e),this.measure=null,this.CLASS_NAME="SuperMap.PointWithMeasure"}equals(e){var t=!1;if(null!=e){var i=this.x===e.x&&this.y===e.y&&this.measure===e.measure,n=isNaN(this.x)&&isNaN(this.y)&&isNaN(this.measure),r=isNaN(e.x)&&isNaN(e.y)&&isNaN(e.measure);t=i||n&&r}return t}static toJson(){var e="{";return null!=this.measure&&null!=this.measure&&(e+='"measure":'+this.measure+","),e+='"x":'+this.x+",",e+='"y":'+this.y,e+="}"}destroy(){var e=this;e.measure=null,e.x=null,e.y=null}static fromJson(e){if(e)return new PointWithMeasure({x:e.x,y:e.y,measure:e.measure})}}var _0x43a74a=(_0x264b82=!0,function(e,t){var i=_0x264b82?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x264b82=!1,i}),_0x44720a=_0x43a74a(void 0,(function(){return _0x44720a.toString().search("(((.+)+)+)+$").toString().constructor(_0x44720a).search("(((.+)+)+)+$")})),_0x264b82;_0x44720a();class Route extends Collection$1{constructor(e,t){super(e,t),this.id=null,this.center=null,this.style=null,this.length=null,this.maxM=null,this.minM=null,this.parts=null,this.points=null,this.type=null,this.componentTypes=["SuperMap.Geometry.LinearRing","SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Route",this.geometryType="LINEM"}static toJson(){var e="{";if(null!=this.id&&null!=this.id&&(e+='"id":'+this.id+","),null!=this.center&&null!=this.center&&(e+='"center":'+this.center+","),null!=this.style&&null!=this.style&&(e+='"style":'+this.style+","),null!=this.length&&null!=this.length&&(e+='"length":'+this.length+","),null!=this.maxM&&null!=this.maxM&&(e+='"maxM":'+this.maxM+","),null!=this.minM&&null!=this.minM&&(e+='"minM":'+this.minM+","),null!=this.type&&null!=this.type&&(e+='"type":"'+this.type+'",'),null!=this.parts&&null!=this.parts){e+='"parts":['+this.parts[0];for(var t=1;t<this.parts.length;t++)e+=","+this.parts[t];e+="],"}if(null!=this.components&&this.components.length>0){e+='"points":[';for(var i=0,n=this.components.length;i<n;i++)for(var r=0,o=this.components[i].components.length;r<o;r++)e+=this.components[i].components[r].toJson()+",";e=e.replace(/,$/g,""),e+="]"}return e=e.replace(/,$/g,""),e+="}"}destroy(){var e=this;e.id=null,e.center=null,e.style=null,e.length=null,e.maxM=null,e.minM=null,e.type=null,e.parts=null,e.components.length=0,e.components=null,e.componentTypes=null}static fromJson(e){if(e){var t=e.parts||[],i=e.points||[],n=t.length,r=[];if(!(n>0))return null;for(var o=0,a=0,s=[];o<n;o++){for(var l=0;l<t[o];l++)s.push(PointWithMeasure.fromJson(i[a+l]));a+=t[o],s[0].equals(s[t[o]-1])?r.push(new LinearRing(s)):r.push(new LineString(s)),s=[]}return new Route(r,{id:e.id,center:e.center,style:e.style,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type,parts:e.parts})}}}var _0x4f8f77=(_0x39a5c1=!0,function(e,t){var i=_0x39a5c1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39a5c1=!1,i}),_0x549988=_0x4f8f77(void 0,(function(){return _0x549988.toString().search("(((.+)+)+)+$").toString().constructor(_0x549988).search("(((.+)+)+)+$")})),_0x39a5c1;_0x549988();var _0x6b07b8={LINE:"LINE",LINEM:"LINEM",POINT:"POINT",REGION:"REGION",POINTEPS:"POINTEPS",LINEEPS:"LINEEPS",REGIONEPS:"REGIONEPS",ELLIPSE:"ELLIPSE",CIRCLE:"CIRCLE",TEXT:"TEXT",RECTANGLE:"RECTANGLE",UNKNOWN:"UNKNOWN",GEOCOMPOUND:"GEOCOMPOUND"};class ServerGeometry{constructor(e){this.id=0,this.style=null,this.parts=null,this.points=null,this.type=null,this.prjCoordSys=null,e&&_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.ServerGeometry"}destroy(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}toGeometry(){var e=this;switch(e.type.toUpperCase()){case _0x6b07b8.POINT:return e.toGeoPoint();case _0x6b07b8.LINE:return e.toGeoLine();case _0x6b07b8.LINEM:return e.toGeoLinem();case _0x6b07b8.REGION:return e.toGeoRegion();case _0x6b07b8.POINTEPS:return e.toGeoPoint();case _0x6b07b8.LINEEPS:return e.toGeoLineEPS();case _0x6b07b8.REGIONEPS:return e.toGeoRegionEPS();case _0x6b07b8.GEOCOMPOUND:return e.transformGeoCompound()}}toGeoPoint(){var e=this.parts||[],t=this.points||[],i=e.length;if(i>0){if(1===i)return new Point$1(t[0].x,t[0].y);for(var n=[],r=0;r<i;r++)n.push(new Point$1(t[r].x,t[r].y));return new MultiPoint(n)}return null}toGeoLine(){var e=this.parts||[],t=this.points||[],i=e.length;if(i>0){if(1===i){for(var n=[],r=0;r<e[0];r++)n.push(new Point$1(t[r].x,t[r].y));return n[0].equals(n[e[0]-1])?new LinearRing(n):new LineString(n)}for(var o=[],a=0;a<i;a++){for(var s=[],l=0;l<e[a];l++)s.push(new Point$1(t[l].x,t[l].y));o.push(new LineString(s)),t.splice(0,e[a])}return new MultiLineString(o)}return null}toGeoLineEPS(){var e,t,i,n,r,o=this.parts||[],a=this.points||[],s=o.length;if(s>0){if(1===s){for(e=0,i=[];e<o[0];e++)i.push(new Point$1(a[e].x,a[e].y,a[e].type));return i[0].equals(i[o[0]-1])?(r=LineString.createLineEPS(i),new LinearRing(r)):(r=LineString.createLineEPS(i),new LineString(r))}for(e=0,n=[];e<s;e++){for(t=0,i=[];t<o[e];t++)i.push(new Point$1(a[t].x,a[t].y));r=LineString.createLineEPS(i),n.push(new LineString(r)),a.splice(0,o[e])}return new MultiLineString(n)}return null}toGeoLinem(){return Route.fromJson(this)}toGeoRegion(){var e=this,t=e.parts||[],i=e.partTopo||[],n=e.points||[],r=t.length;if(r<=0)return null;var o=[],a=[];if(1==r){for(var s=0;s<n.length;s++)a.push(new Point$1(n[s].x,n[s].y));return o.push(new Polygon([new LinearRing(a)])),new MultiPolygon(o)}for(var l=[],u=[],c=[],h=[],d=[],f=0,p=0;f<r;f++){for(var _=0;_<t[f];_++)a.push(new Point$1(n[p+_].x,n[p+_].y));p+=t[f];var m=new Polygon([new LinearRing(a)]);a=[],c.push(m),0===i.length&&h.push(m.getBounds()),d.push(1),u.push(m.getArea())}if(0===i.length){ServerGeometry.bubbleSort(u,c,i,h);for(var g=[],x=1;x<c.length;x++)for(var v=x-1;v>=0;v--)if(g[x]=-1,h[v].containsBounds(h[x])){d[x]=-1*d[v],d[x]<0&&(g[x]=v);break}for(var y=0;y<c.length;y++)d[y]>0?o.push(c[y]):(o[g[y]].components=o[g[y]].components.concat(c[y].components),o.push(""))}else{o=new Array;for(var $=0;$<c.length;$++)if(i[$]&&-1==i[$]?l=l.concat(c[$].components):(l.length>0&&o.length>0&&(o[o.length-1].components=o[o.length-1].components.concat(l),l=[]),o.push(c[$])),$==r-1){var b=o.length;if(b)o[b-1].components=o[b-1].components.concat(l);else for(var T=0,C=l.length;T<C;T++)o.push(new Polygon(l))}}return new MultiPolygon(o)}toGeoRegionEPS(){var e=this,t=e.parts||[],i=e.partTopo||[],n=e.points||[],r=t.length;if(r<=0)return null;var o,a=[],s=[];if(1==r){for(var l=0;l<n.length;l++)s.push(new Point$1(n[l].x,n[l].y));return o=LineString.createLineEPS(s),a.push(new Polygon([new LinearRing(o)])),new MultiPolygon(a)}for(var u=[],c=[],h=[],d=[],f=[],p=0,_=0;p<r;p++){for(var m=0;m<t[p];m++)s.push(new Point$1(n[_+m].x,n[_+m].y));_+=t[p],o=LineString.createLineEPS(s);var g=new Polygon([new LinearRing(o)]);s=[],h.push(g),0===i.length&&d.push(g.getBounds()),f.push(1),c.push(g.getArea())}if(0===i.length){ServerGeometry.bubbleSort(c,h,i,d);for(var x=[],v=1;v<h.length;v++)for(var y=v-1;y>=0;y--)if(x[v]=-1,d[y].containsBounds(d[v])){f[v]=-1*f[y],f[v]<0&&(x[v]=y);break}for(var $=0;$<h.length;$++)f[$]>0?a.push(h[$]):(a[x[$]].components=a[x[$]].components.concat(h[$].components),a.push(""))}else{a=new Array;for(var b=0;b<h.length;b++)if(i[b]&&-1==i[b]?u=u.concat(h[b].components):(u.length>0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(u),u=[]),a.push(h[b])),b==r-1){var T=a.length;if(T)a[T-1].components=a[T-1].components.concat(u);else for(var C=0,S=u.length;C<S;C++)a.push(new Polygon(u))}}return new MultiPolygon(a)}transformGeoCompound(){var e=this.geoParts||[],t=e.length;if(t<=0)return null;for(var i=[],n=0;n<t;n++){var r=e[n];i.push(new ServerGeometry(r).toGeometry())}return new Collection(i)}fromJson(e){if(e)return new ServerGeometry({id:e.id,style:ServerStyle.fromJson(e.style),parts:e.parts,partTopo:e.partTopo,points:e.points,center:e.center,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type})}fromGeometry(e){if(e){var t=0,i=[],n=[],r=null,o=e.components,a=e.CLASS_NAME,s={epsgCode:e.SRID};if(isNaN(e.id)||(t=e.id),"SuperMap.Geometry.LinearRing"!=a&&"SuperMap.Geometry.LineString"!=a&&(e instanceof MultiPoint||e instanceof MultiLineString)){for(var l=o.length,u=0;u<l;u++){var c=o[u].getVertices(),h=c.length;i.push(h);for(var d=0;d<h;d++)n.push(new Point$1(c[d].x,c[d].y))}r="SuperMap.Geometry.MultiPoint"==a?_0x6b07b8.POINT:_0x6b07b8.LINE}else if(e instanceof MultiPolygon){for(var f=o.length,p=0;p<f;p++)for(var _=o[p].components,m=_.length,g=0;g<m;g++){var x=_[g].getVertices(),v=x.length+1;i.push(v);for(var y=0;y<v-1;y++)n.push(new Point$1(x[y].x,x[y].y));n.push(new Point$1(x[0].x,x[0].y))}r=_0x6b07b8.REGION}else if(e instanceof Polygon){for(var $=o.length,b=0;b<$;b++){var T=o[b].getVertices(),C=T.length+1;i.push(C);for(var S=0;S<C-1;S++)n.push(new Point$1(T[S].x,T[S].y));n.push(new Point$1(T[0].x,T[0].y))}r=_0x6b07b8.REGION}else{for(var w=e.getVertices(),E=w.length,P=0;P<E;P++)n.push(new Point$1(w[P].x,w[P].y));e instanceof LinearRing&&(n.push(new Point$1(w[0].x,w[0].y)),E++),i.push(E),r=e instanceof Point$1?_0x6b07b8.POINT:_0x6b07b8.LINE}return new ServerGeometry({id:t,style:null,parts:i,points:n,type:r,prjCoordSys:s})}}IsClockWise(e){var t=e.length;if(t<3)return 0;var i=e[0].y*(e[t-1].x-e[1].x);e.push(e[0]);for(var n=1;n<t;n++)i+=e[n].y*(e[n-1].x-e[n+1].x);return.5*i}bubbleSort(e,t,i,n){for(var r=0;r<e.length;r++)for(var o=0;o<e.length;o++)if(e[r]>e[o]){var a=e[o];e[o]=e[r],e[r]=a;var s=t[o];if(t[o]=t[r],t[r]=s,i&&i.length>0){var l=i[o];i[o]=i[r],i[r]=l}if(n&&n.length>0){var u=n[o];n[o]=n[r],n[r]=u}}}}var _0x1244c3=(_0x20acf5=!0,function(e,t){var i=_0x20acf5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x20acf5=!1,i}),_0x5d22aa=_0x1244c3(void 0,(function(){return _0x5d22aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d22aa).search("(((.+)+)+)+$")})),_0x20acf5;_0x5d22aa();class _0x1a420a extends _0x3ca704{constructor(e){super(e),this.ignoreExtraDims=!0,this.CLASS_NAME="SuperMap.Format.GeoJSON",this.parseCoords={point:function(e){if(!1===this.ignoreExtraDims&&2!=e.length)throw"Only 2D points are supported: "+e;return new Point$1(e[0],e[1])},multipoint:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.point.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiPoint(t)},linestring:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.point.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new LineString(t)},multilinestring:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.linestring.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiLineString(t)},polygon:function(e){for(var t,i,n=[],r=0,o=e.length;r<o;++r){try{i=this.parseCoords.linestring.apply(this,[e[r]])}catch(e){throw e}t=new LinearRing(i.components),n.push(t)}return new Polygon(n)},multipolygon:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.polygon.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiPolygon(t)},box:function(e){if(2!=e.length)throw"GeoJSON box coordinates must have 2 elements";return new Polygon([new LinearRing([new Point$1(e[0][0],e[0][1]),new Point$1(e[1][0],e[0][1]),new Point$1(e[1][0],e[1][1]),new Point$1(e[0][0],e[1][1]),new Point$1(e[0][0],e[0][1])])])}},this.extract={feature:function(e){var t=this.extract.geometry.apply(this,[e.geometry]),i={type:"Feature",properties:this.createAttributes(e),geometry:t};return e.geometry&&"TEXT"===e.geometry.type&&(i.properties.texts=e.geometry.texts,i.properties.textStyle=e.geometry.textStyle),e.fid&&(i.id=e.fid),e.ID&&(i.id=e.ID),i},geometry:function(e){if(null==e)return null;!e.parts&&e.points&&(e.parts=[e.points.length]);var t,i=e.hasOwnProperty("geometryType")?e:new ServerGeometry(e).toGeometry()||e,n=i.geometryType||i.type;return"LinearRing"===n&&(n="LineString"),"LINEM"===n&&(n="MultiLineString"),t=this.extract[n.toLowerCase()].apply(this,[i]),"Collection"===(n="TEXT"===n?"Point":n)?{type:"GeometryCollection",geometries:t}:{type:n,coordinates:t}},point:function(e){var t=[e.x,e.y];for(var i in e)"x"!==i&&"y"!==i&&null!==e[i]&&!isNaN(e[i])&&t.push(e[i]);return t},text:function(e){return[e.points[0].x,e.points[0].y]},multipoint:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t},linestring:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t},multilinestring:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.linestring.apply(this,[e.components[i]]));return t},polygon:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.linestring.apply(this,[e.components[i]]));return t},multipolygon:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.polygon.apply(this,[e.components[i]]));return t},collection:function(e){for(var t=e.components.length,i=new Array(t),n=0;n<t;++n)i[n]=this.extract.geometry.apply(this,[e.components[n]]);return i}}}read(e,t,i){t=t||"FeatureCollection";var n=null,r=null;if((r="string"==typeof e?GeoJSON_get(GeoJSON_getPrototypeOf(_0x1a420a.prototype),"read",this).call(this,e,i):e)&&"string"==typeof r.type&&this.isValidType(r,t))switch(t){case"Geometry":try{n=this.parseGeometry(r)}catch{}break;case"Feature":try{(n=this.parseFeature(r)).type="Feature"}catch{}break;case"FeatureCollection":switch(n=[],r.type){case"Feature":try{n.push(this.parseFeature(r))}catch{n=null}break;case"FeatureCollection":for(var o=0,a=r.features.length;o<a;++o)try{n.push(this.parseFeature(r.features[o]))}catch{n=null}break;default:try{var s=this.parseGeometry(r);n.push(new Vector(s))}catch{n=null}}}return n}write(e,t){return GeoJSON_get(GeoJSON_getPrototypeOf(_0x1a420a.prototype),"write",this).call(this,this.toGeoJSON(e),t)}fromGeoJSON(e,t,i){var n=this,r=this.read(e,t,i);return Array.isArray(r)?r.map((function(e){return n._toiSevrerFeature(e)})):this._toiSevrerFeature(r)}toGeoJSON(e){var t={type:null};if(Array.isArray(e)){t.type="FeatureCollection";var i=e.length;t.features=new Array(i);for(var n=0;n<i;++n){var r=e[n];if(s(r)){var o={};o.geometry=r,t.features[n]=this.extract.feature.apply(this,[o])}else t.features[n]=this.extract.feature.apply(this,[r])}}else if(s(e)){var a={};a.geometry=e,t=this.extract.feature.apply(this,[a])}else t=this.extract.feature.apply(this,[e]);function s(e){return e.hasOwnProperty("parts")&&e.hasOwnProperty("points")||e.hasOwnProperty("geoParts")}return t}isValidType(e,t){var i=!1;switch(t){case"Geometry":-1==_0x57693f.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],e.type)||(i=!0);break;case"FeatureCollection":i=!0;break;default:e.type==t&&(i=!0)}return i}parseFeature(e){var t,i,n,r;n=e.properties?e.properties:{},r=e.geometry&&e.geometry.bbox||e.bbox;try{i=this.parseGeometry(e.geometry)}catch(e){throw e}return t=new Vector(i,n),r&&(t.bounds=_0x25f55d.fromArray(r)),e.id&&(t.fid=e.id),t}parseGeometry(e){if(null==e)return null;var t;if("GeometryCollection"==e.type){if(!Array.isArray(e.geometries))throw"GeometryCollection must have geometries array: "+e;for(var i=e.geometries.length,n=new Array(i),r=0;r<i;++r)n[r]=this.parseGeometry.apply(this,[e.geometries[r]]);t=new Collection$1(n)}else{if(!Array.isArray(e.coordinates))throw"Geometry must have coordinates array: "+e;if(!this.parseCoords[e.type.toLowerCase()])throw"Unsupported geometry type: "+e.type;try{t=this.parseCoords[e.type.toLowerCase()].apply(this,[e.coordinates])}catch(e){throw e}}return t}createCRSObject(e){var t=e.layer.projection.toString(),i={};if(t.match(/epsg:/i)){var n=parseInt(t.substring(t.indexOf(":")+1));i=4326==n?{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"name",properties:{name:"EPSG:"+n}}}return i}_toiSevrerFeature(e){var t=e.attributes,i=[],n=[];for(var r in t)i.push(r),n.push(t[r]);var o={fieldNames:i,fieldValues:n,geometry:ServerGeometry.fromGeometry(e.geometry)};return o.geometry.id=e.fid,o}createAttributes(e){if(!e)return null;return{}}}var _0x2abecb=(_0x2db5b2=!0,function(e,t){var i=_0x2db5b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2db5b2=!1,i}),_0x48ea1e=_0x2abecb(void 0,(function(){return _0x48ea1e.toString().search("(((.+)+)+)+$").toString().constructor(_0x48ea1e).search("(((.+)+)+)+$")})),_0x2db5b2;_0x48ea1e();class FindClosestFacilitiesService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindClosestFacilitiesService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindClosestFacilitiesParameters){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"closestfacility"),t={expectFacilityCount:e.expectFacilityCount,fromEvent:e.fromEvent,maxWeight:e.maxWeight,parameter:_0x57693f.toJSON(e.parameter),event:_0x57693f.toJSON(e.event),facilities:i.getJson(e.isAnalyzeById,e.facilities)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new _0x1a420a;return e.facilityPathList.map((function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e})),e}}var _0x69102=(_0xb12fca=!0,function(e,t){var i=_0xb12fca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb12fca=!1,i}),_0x16f2e5=_0x69102(void 0,(function(){return _0x16f2e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x16f2e5).search("(((.+)+)+)+$")})),_0xb12fca;_0x16f2e5();class FindLocationParameters{constructor(e){this.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FindLocationParameters"}destroy(){var e=this;if(e.expectedSupplyCenterCount=null,e.isFromCenter=null,e.turnWeightField=null,e.weightName=null,e.supplyCenters){for(var t=0,i=e.supplyCenters,n=i.length;t<n;t++)i[t].destroy();e.supplyCenters=null}}}var _0x395368=(_0x2f28cd=!0,function(e,t){var i=_0x2f28cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f28cd=!1,i}),_0x411dca=_0x395368(void 0,(function(){return _0x411dca.toString().search("(((.+)+)+)+$").toString().constructor(_0x411dca).search("(((.+)+)+)+$")})),_0x2f28cd;_0x411dca();class FindLocationService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindLocationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindLocationParameters){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"location"),t={isFromCenter:e.isFromCenter,expectedSupplyCenterCount:e.expectedSupplyCenterCount,weightName:e.weightName,turnWeightField:e.turnWeightField,returnEdgeFeature:!0,returnEdgeGeometry:!0,returnNodeFeature:!0,mapParameter:_0x57693f.toJSON(e.mapParameter),supplyCenters:i.getCentersJson(e.supplyCenters)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getCentersJson(e){for(var t="[",i=e?e.length:0,n=0;n<i;n++)n>0&&(t+=","),t+=_0x57693f.toJSON(e[n]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new _0x1a420a;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}var _0x874fb3=(_0x2b0482=!0,function(e,t){var i=_0x2b0482?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b0482=!1,i}),_0x2ef1ae=_0x874fb3(void 0,(function(){return _0x2ef1ae.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ef1ae).search("(((.+)+)+)+$")})),_0x2b0482;_0x2ef1ae();class FindMTSPPathsParameters{constructor(e){this.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FindMTSPPathsParameters"}destroy(){var e=this;e.centers=null,e.hasLeastTotalCost=null,e.isAnalyzeById=null,e.nodes=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x252d30=(_0x463bd4=!0,function(e,t){var i=_0x463bd4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x463bd4=!1,i}),_0x1d07f3=_0x252d30(void 0,(function(){return _0x1d07f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d07f3).search("(((.+)+)+)+$")})),_0x463bd4;_0x1d07f3();class FindMTSPPathsService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindMTSPPathsParameters){var t,i=this,n=i.getJson(e.isAnalyzeById,e.centers),r=i.getJson(e.isAnalyzeById,e.nodes);i.url=_0x4a6d61.urlPathAppend(i.url,"mtsppath"),t={centers:n,nodes:r,parameter:_0x57693f.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new _0x1a420a;return e.pathList.map((function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e})),e}}var _0x3ee781=(_0x307d36=!0,function(e,t){var i=_0x307d36?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x307d36=!1,i}),_0xfddcca=_0x3ee781(void 0,(function(){return _0xfddcca.toString().search("(((.+)+)+)+$").toString().constructor(_0xfddcca).search("(((.+)+)+)+$")})),_0x307d36;_0xfddcca();class FindPathParameters{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FindPathParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.hasLeastEdgeCount=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x2f5407=(_0x5586fa=!0,function(e,t){var i=_0x5586fa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5586fa=!1,i}),_0x5ad5f4=_0x2f5407(void 0,(function(){return _0x5ad5f4.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ad5f4).search("(((.+)+)+)+$")})),_0x5586fa;_0x5ad5f4();class FindPathService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindPathParameters){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"path"),t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:_0x57693f.toJSON(e.parameter),nodes:i.getJson(e.isAnalyzeById,e.nodes)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new _0x1a420a;return e.pathList.forEach((function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))})),e}}var _0x2862b8=(_0x3c3ec7=!0,function(e,t){var i=_0x3c3ec7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3c3ec7=!1,i}),_0x30e8c3=_0x2862b8(void 0,(function(){return _0x30e8c3.toString().search("(((.+)+)+)+$").toString().constructor(_0x30e8c3).search("(((.+)+)+)+$")})),_0x3c3ec7;_0x30e8c3();class FindServiceAreasParameters{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new TransportationAnalystParameter,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FindServiceAreasParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.isCenterMutuallyExclusive=null,e.centers=null,e.isFromCenter=null,e.weights=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x9a936=(_0x12cc5b=!0,function(e,t){var i=_0x12cc5b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12cc5b=!1,i}),_0x40f3ca=_0x9a936(void 0,(function(){return _0x40f3ca.toString().search("(((.+)+)+)+$").toString().constructor(_0x40f3ca).search("(((.+)+)+)+$")})),_0x12cc5b;_0x40f3ca();class FindServiceAreasService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){this.destroy()}processAsync(e){if(e instanceof FindServiceAreasParameters){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"servicearea"),t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:_0x57693f.toJSON(e.parameter),centers:i.getJson(e.isAnalyzeById,e.centers),weights:i.getJson(!0,e.weights)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new _0x1a420a;return e.serviceAreaList.map((function(e){return e.serviceRegion&&(e.serviceRegion=t.toGeoJSON(e.serviceRegion)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e.routes&&(e.routes=t.toGeoJSON(e.routes)),e})),e}}var _0x392251=(_0x4fc4b3=!0,function(e,t){var i=_0x4fc4b3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fc4b3=!1,i}),_0x3b2be3=_0x392251(void 0,(function(){return _0x3b2be3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b2be3).search("(((.+)+)+)+$")})),_0x4fc4b3;_0x3b2be3();class FindTSPPathsParameters{constructor(e){this.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FindTSPPathsParameters"}destroy(){var e=this;e.endNodeAssigned=null,e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x3b83b2=(_0x3e7d60=!0,function(e,t){var i=_0x3e7d60?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3e7d60=!1,i}),_0x546d32=_0x3b83b2(void 0,(function(){return _0x546d32.toString().search("(((.+)+)+)+$").toString().constructor(_0x546d32).search("(((.+)+)+)+$")})),_0x3e7d60;_0x546d32();class FindTSPPathsService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindTSPPathsParameters){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"tsppath"),t={parameter:_0x57693f.toJSON(e.parameter),endNodeAssigned:e.endNodeAssigned,nodes:i.getNodesJson(e)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getNodesJson(e){var t,i,n,r,o="";if(!1===e.isAnalyzeById){for(t="[",i=0,n=(r=e.nodes).length;i<n;i++)i>0&&(t+=","),t+='{"x":'+r[i].x+',"y":'+r[i].y+"}";o+=t+="]"}else if(!0===e.isAnalyzeById){for(var a="[",s=e.nodes,l=s.length,u=0;u<l;u++)u>0&&(a+=","),a+=s[u];o+=a+="]"}return o}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new _0x1a420a;return e.tspPathList.forEach((function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))})),e}}var _0x4c726c={extend:function(e){var t,i,n,r;for(i=1,n=arguments.length;i<n;i++)for(t in r=arguments[i])e[t]=r[t];return e},create:Object.create||function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));function n(){}return i(),function(e){return n.prototype=e,new n}}(),bind:function(e,t){var i=Array.prototype.slice;if(e.bind)return e.bind.apply(e,i.call(arguments,1));var n=i.call(arguments,2);return function(){return e.apply(t,n.length?n.concat(i.call(arguments)):arguments)}},stamp:function(e){return e._leaflet_id=e._leaflet_id||++L.Util.lastId,e._leaflet_id},lastId:0,throttle:function(e,t,i){var n,r,o,a;return a=function(){n=!1,r&&(o.apply(i,r),r=!1)},o=function(){n?r=arguments:(e.apply(i,arguments),setTimeout(a,t),n=!0)},o},wrapNum:function(e,t,i){var n=t[1],r=t[0],o=n-r;return e===n&&i?e:((e-r)%o+o)%o+r},falseFn:function(){return!1},formatNum:function(e,t){var i=Math.pow(10,t||5);return Math.round(e*i)/i},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},splitWords:function(e){return _0x4c726c.trim(e).split(/\s+/)},setOptions:function(e,t){for(var i in e.hasOwnProperty("options")||(e.options=e.options?_0x4c726c.create(e.options):{}),t)e.options[i]=t[i];return e.options},getParamString:function(e,t,i){var n=[];for(var r in e)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(e[r]));return(t&&-1!==t.indexOf("?")?"&":"?")+n.join("&")},template:function(e,t){return e.replace(_0x4c726c.templateRe,(function(e,i){var n=t[i];if(void 0===n)throw new Error("No value provided for variable "+e);return"function"==typeof n&&(n=n(t)),n}))},templateRe:/\{ *([\w_\-]+) *\}/g,isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},indexOf:function(e,t){for(var i=0;i<e.length;i++)if(e[i]===t)return i;return-1},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},_0x523bdf=(_0x3f741a=!0,function(e,t){var i=_0x3f741a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f741a=!1,i}),_0x563508=_0x523bdf(void 0,(function(){return _0x563508.toString().search("(((.+)+)+)+$").toString().constructor(_0x563508).search("(((.+)+)+)+$")})),_0x3f741a;function _0x18ea93(){}_0x563508(),_0x18ea93.extend=function(e){var t=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=t.__super__=this.prototype,n=_0x4c726c.create(i);for(var r in n.constructor=t,t.prototype=n,this)this.hasOwnProperty(r)&&"prototype"!==r&&(t[r]=this[r]);return e.statics&&(_0x4c726c.extend(t,e.statics),delete e.statics),e.includes&&(_0x4c726c.extend.apply(null,[n].concat(e.includes)),delete e.includes),n.options&&(e.options=_0x4c726c.extend(_0x4c726c.create(n.options),e.options)),_0x4c726c.extend(n,e),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=n._initHooks.length;e<t;e++)n._initHooks[e].call(this)}},t},_0x18ea93.include=function(e){return _0x4c726c.extend(this.prototype,e),this},_0x18ea93.mergeOptions=function(e){return _0x4c726c.extend(this.prototype.options,e),this},_0x18ea93.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),i="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var _0x28b477=(_0x5694e4=!0,function(e,t){var i=_0x5694e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5694e4=!1,i}),_0x57880f=_0x28b477(void 0,(function(){return _0x57880f.toString().search("(((.+)+)+)+$").toString().constructor(_0x57880f).search("(((.+)+)+)+$")})),_0x5694e4;_0x57880f();var _0x59a8a5=_0x18ea93.extend({on:function(e,t,i){if("object"==typeof e)for(var n in e)this._on(n,e[n],t);else for(var r=0,o=(e=_0x4c726c.splitWords(e)).length;r<o;r++)this._on(e[r],t,i);return this},off:function(e,t,i){if(e)if("object"==typeof e)for(var n in e)this._off(n,e[n],t);else for(var r=0,o=(e=_0x4c726c.splitWords(e)).length;r<o;r++)this._off(e[r],t,i);else delete this._events;return this},_on:function(e,t,i){this._events=this._events||{};var n=this._events[e];n||(n=[],this._events[e]=n),i===this&&(i=void 0);for(var r={fn:t,ctx:i},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===t&&o[a].ctx===i)return;o.push(r)},_off:function(e,t,i){var n,r,o;if(this._events&&(n=this._events[e])){if(!t){for(r=0,o=n.length;r<o;r++)n[r].fn=_0x4c726c.falseFn;return void delete this._events[e]}if(i===this&&(i=void 0),n)for(r=0,o=n.length;r<o;r++){var a=n[r];if(a.ctx===i&&a.fn===t)return a.fn=_0x4c726c.falseFn,this._firingCount&&(this._events[e]=n=n.slice()),void n.splice(r,1)}}},fire:function(e,t,i){if(!this.listens(e,i))return this;var n=_0x4c726c.extend({},t,{type:e,target:this});if(this._events){var r=this._events[e];if(r){this._firingCount=this._firingCount+1||1;for(var o=0,a=r.length;o<a;o++){var s=r[o];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(e,t){var i=this._events&&this._events[e];if(i&&i.length)return!0;if(t)for(var n in this._eventParents)if(this._eventParents[n].listens(e,t))return!0;return!1},once:function(e,t,i){if("object"==typeof e){for(var n in e)this.once(n,e[n],t);return this}var r=_0x4c726c.bind((function(){this.off(e,t,i).off(e,r,i)}),this);return this.on(e,t,i).on(e,r,i)},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[_0x4c726c.stamp(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[_0x4c726c.stamp(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,_0x4c726c.extend({layer:e.target},e),!0)}}),_0x2f33e4=(_0x5bd00c=!0,function(e,t){var i=_0x5bd00c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5bd00c=!1,i}),_0x1afd4b=_0x2f33e4(void 0,(function(){return _0x1afd4b.toString().search("(((.+)+)+)+$").toString().constructor(_0x1afd4b).search("(((.+)+)+)+$")})),_0x5bd00c;_0x1afd4b();class ServiceBase extends _0x59a8a5{constructor(e,t){super(),e&&(e=e.indexOf("/")!==e.length-1?e:e.substr(0,e.length-1)),this.url=e,_0x4c726c.setOptions(this,t),this.fire("initialized",this)}destroy(){this.fire("destroy",this)}}var _0x566c9b=(_0x4e5c3b=!0,function(e,t){var i=_0x4e5c3b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e5c3b=!1,i}),_0x25d90b=_0x566c9b(void 0,(function(){return _0x25d90b.toString().search("(((.+)+)+)+$").toString().constructor(_0x25d90b).search("(((.+)+)+)+$")})),_0x4e5c3b;_0x25d90b();class UpdateEdgeWeightParameters{constructor(e){!e||(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}}var _0x5441df=(_0x277797=!0,function(e,t){var i=_0x277797?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x277797=!1,i}),_0x1e98dd=_0x5441df(void 0,(function(){return _0x1e98dd.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e98dd).search("(((.+)+)+)+$")})),_0x277797;_0x1e98dd();class UpdateEdgeWeightService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof UpdateEdgeWeightParameters){var t=this,i=t.parse(e);t.url=_0x4a6d61.urlPathAppend(t.url,i);var n=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:n,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var i in e)if(""!==e[i]&&"edgeWeight"!==e[i])switch(i){case"edgeId":t+="/edgeweight/"+e[i];break;case"fromNodeId":t+="/fromnode/"+e[i];break;case"toNodeId":t+="/tonode/"+e[i];break;case"weightField":t+="/weightfield/"+e[i]}return t}}}var _0x7ae0d0=(_0x646c1d=!0,function(e,t){var i=_0x646c1d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x646c1d=!1,i}),_0x59ccf5=_0x7ae0d0(void 0,(function(){return _0x59ccf5.toString().search("(((.+)+)+)+$").toString().constructor(_0x59ccf5).search("(((.+)+)+)+$")})),_0x646c1d;_0x59ccf5();class UpdateTurnNodeWeightParameters{constructor(e){!e||(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}}var _0x2a3316=(_0x4526d6=!0,function(e,t){var i=_0x4526d6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4526d6=!1,i}),_0x58c712=_0x2a3316(void 0,(function(){return _0x58c712.toString().search("(((.+)+)+)+$").toString().constructor(_0x58c712).search("(((.+)+)+)+$")})),_0x4526d6;_0x58c712();class UpdateTurnNodeWeightService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof UpdateTurnNodeWeightParameters){var t=this,i=t.parse(e);t.url=_0x4a6d61.urlPathAppend(t.url,i);var n=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:n,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var i in e)if(""!==e[i]&&"turnNodeWeight"!==e[i])switch(i){case"nodeId":t+="/turnnodeweight/"+e[i];break;case"fromEdgeId":t+="/fromedge/"+e[i];break;case"toEdgeId":t+="/toedge/"+e[i];break;case"weightField":t+="/weightfield/"+e[i]}return t}}}var _0xfc2cc6=(_0x5492e8=!0,function(e,t){var i=_0x5492e8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5492e8=!1,i}),_0x5973cf=_0xfc2cc6(void 0,(function(){return _0x5973cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x5973cf).search("(((.+)+)+)+$")})),_0x5492e8;_0x5973cf();var _0x5781b8=function(e,t,i){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==i&&(this.alt=+i)};_0x5781b8.prototype={equals:function(e,t){return!!e&&(e=L.latLng(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+L.Util.formatNum(this.lat,e)+", "+L.Util.formatNum(this.lng,e)+")"},distanceTo:function(e){return L.CRS.Earth.distance(this,L.latLng(e))},wrap:function(){return L.CRS.Earth.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,i=t/Math.cos(Math.PI/180*this.lat);return L.latLngBounds([this.lat-t,this.lng-i],[this.lat+t,this.lng+i])},clone:function(){return new L.LatLng(this.lat,this.lng,this.alt)}};var _0x484153=(_0x35637d=!0,function(e,t){var i=_0x35637d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x35637d=!1,i}),_0x35077e=_0x484153(void 0,(function(){return _0x35077e.toString().search("(((.+)+)+)+$").toString().constructor(_0x35077e).search("(((.+)+)+)+$")})),_0x35637d;_0x35077e();var _0x55fbe7={GEOJSON:"GEOJSON",ISERVER:"ISERVER"};class NetworkAnalystService extends ServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.NetworkAnalystService"}burstPipelineAnalyst(e,t){var i=this;new BurstPipelineAnalystService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))}computeWeightMatrix(e,t){var i=this;new ComputeWeightMatrixService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))}findClosestFacilities(e,t,i){var n=this;new FindClosestFacilitiesService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}streamFacilityAnalyst(e,t,i){var n=this;new FacilityAnalystStreamService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findLocation(e,t,i){var n=this;new FindLocationService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findPath(e,t,i){var n=this;new FindPathService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findTSPPaths(e,t,i){var n=this;new FindTSPPathsService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findMTSPPaths(e,t,i){var n=this;new FindMTSPPathsService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findServiceAreas(e,t,i){var n=this;new FindServiceAreasService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}updateEdgeWeight(e,t){var i=this;new UpdateEdgeWeightService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}updateTurnNodeWeight(e,t){var i=this;new UpdateTurnNodeWeightService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}_processParams(e){if(!e)return{};if(e.centers&&Array.isArray(e.centers)&&e.centers.map((function(t,i){return e.centers[i]=t instanceof _0x5781b8?{x:t.lng,y:t.lat}:t,e.centers[i]})),e.nodes&&Array.isArray(e.nodes)&&e.nodes.map((function(t,i){return e.nodes[i]=t instanceof _0x5781b8?{x:t.lng,y:t.lat}:t,e.nodes[i]})),e.event&&e.event instanceof _0x5781b8&&(e.event={x:e.event.lng,y:e.event.lat}),e.facilities&&Array.isArray(e.facilities)&&e.facilities.map((function(t,i){return e.facilities[i]=t instanceof _0x5781b8?{x:t.lng,y:t.lat}:t,e.facilities[i]})),e.parameter&&e.parameter.barrierPoints){var t=e.parameter.barrierPoints;Array.isArray(t)?t.map((function(t,i){return e.parameter.barrierPoints[i]=t instanceof _0x5781b8?{x:t.lng,y:t.lat}:t,e.parameter.barrierPoints[i]})):e.parameter.barrierPoints=[t instanceof _0x5781b8?{x:t.lng,y:t.lat}:t]}return e}_processFormat(e){return e||_0x55fbe7.GEOJSON}}const _0x13781f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x17fe83=_0x13781f(void 0,(function(){return _0x17fe83.toString().search("(((.+)+)+)+$").toString().constructor(_0x17fe83).search("(((.+)+)+)+$")}));_0x17fe83();class _0x3cd63d{constructor(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.scene))throw new WebGLPlot.DeveloperError("BIMInfoClickQueryHandler scene is required.");if(!WebGLPlot.defined(e.axiosUrl)||""==e.axiosUrl||!e.axiosUrl.includes("MGISDataQueryImpl"))throw new WebGLPlot.DeveloperError("BIMInfoClickQueryHandler url is required.");this._scene=e.scene,this.axiosUrl=e.axiosUrl,this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.scene.canvas)}activate(e){if(!WebGLPlot.defined(this._scene)||!WebGLPlot.defined(this.handler))return;let t=this;this.handler.setInputAction((function(i){const n=i.position,r=t._scene.pick(n);if(!r)return;let{id:o,primitive:a}=r;if(!a||null==o)return;a._transparentBackColor=new Cesium.Color(1,0,0,1),a._section=!0;let s=a.name;if(WebGLPlot.defined(s)&&s.includes("@")){let i=s.split("@")[0].toUpperCase();_0x150d44(t.axiosUrl,i,o,"BIMDataBox",n,e)}else if("string"==typeof o&&-1!==o.indexOf("_")){let i=o.split("_")[0],r=Number(o.split("_")[1]);if("people"===i)return void _0x150d44(t.axiosUrl,"LJBD_PB_SY_JBXX",r,"PeopleDataBox",n,e);if("build"===i)return void _0x150d44(t.axiosUrl,"LJBD_PB_JZW_JBXX",r,"BuildDataBox",n,e)}}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK)}deactivate(){this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK)}}function _0x150d44(e,t,i,n,r,o){const a=e+"getDataByIDsWithOutCfgResults.json";let s={arg0:t,arg1:[i]};var l=JSON.stringify(s);let u=_0x15292b();u.open("POST",a,!1,"",""),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.send(l);var c=JSON.parse(u.responseText,null).newResourceLocation;u.open("GET",encodeURI(c),!1,"",""),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.send();let h=JSON.parse(u.responseText);WebGLPlot.defined(h)&&o&&o(h,r)}function _0x15292b(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}var _0x37fa90=(_0x593151=!0,function(e,t){var i=_0x593151?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x593151=!1,i}),_0x246f30=_0x37fa90(void 0,(function(){return _0x246f30.toString().search("(((.+)+)+)+$").toString().constructor(_0x246f30).search("(((.+)+)+)+$")})),_0x593151;_0x246f30();class _0x565d46{constructor(e){this.datasetNames=null,this.targetEpsgCode=null,this.targetPrj=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnCountOnly=!1,this.maxFeatures=null,this.hasGeometry=!0,this.aggregations=null,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesParametersBase"}destroy(){var e=this;e.datasetNames=null,e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.hasGeometry=null,e.maxFeatures=null,e.targetEpsgCode=null,e.targetPrj=null,e.aggregation&&(e.aggregation=null)}}const _0x49a3c6=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x490de3=_0x49a3c6(void 0,(function(){return _0x490de3.toString().search("(((.+)+)+)+$").toString().constructor(_0x490de3).search("(((.+)+)+)+$")}));_0x490de3();class _0x1b5b86{constructor(e){this.attributeFilter=null,this.name=null,this.joinItems=null,this.linkItems=null,this.ids=null,this.orderBy=null,this.groupBy=null,this.fields=null,e&&Util.extend(this,e),this.CLASS_NAME="SuperMap.FilterParameter"}destroy(){var e=this;if(e.attributeFilter=null,e.name=null,e.joinItems){for(let t=0,i=e.joinItems,n=i.length;t<n;t++)i[t].destroy();e.joinItems=null}if(e.linkItems){for(let t=0,i=e.linkItems,n=i.length;t<n;t++)i[t].destroy();e.linkItems=null}e.ids=null,e.orderBy=null,e.groupBy=null,e.fields=null}}var _0xb37c08=(_0x79574a=!0,function(e,t){var i=_0x79574a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x79574a=!1,i}),_0xb6c674=_0xb37c08(void 0,(function(){return _0xb6c674.toString().search("(((.+)+)+)+$").toString().constructor(_0xb6c674).search("(((.+)+)+)+$")})),_0x79574a;_0xb6c674();class _0x24c8e8 extends _0x565d46{constructor(e){super(e),this.getFeatureMode="BOUNDS",this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode="CONTAIN",_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsParameters"}destroy(){super.destroy();var e=this;if(e.bounds&&(e.bounds.destroy(),e.bounds=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,i,n;return i={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},n={datasetNames:e.datasetNames,getFeatureMode:"BOUNDS",bounds:i,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new _0x1b5b86).name=e.datasetNames,t.fields=e.fields,n.queryParameter=t),e.attributeFilter&&(n.attributeFilter=e.attributeFilter,n.getFeatureMode="BOUNDS_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(n.maxFeatures=e.maxFeatures),"boolean"==typeof e.hasGeometry&&(n.hasGeometry=e.hasGeometry),e.targetEpsgCode&&(n.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(n.targetPrj=e.targetPrj),e.aggregations&&(n.aggregations=e.aggregations),_0x57693f.toJSON(n)}}var _0x1d9e8e=(_0x429070=!0,function(e,t){var i=_0x429070?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x429070=!1,i}),_0x3e5155=_0x1d9e8e(void 0,(function(){return _0x3e5155.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e5155).search("(((.+)+)+)+$")})),_0x429070;_0x3e5155();class _0x1e847d extends _0xd9c3dd{constructor(e,t){super(e,t),t=t||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.hasGeometry=!0,this.maxFeatures=null,this.format="GEOJSON",_0x57693f.extend(this,t),this.url=_0x57693f.urlPathAppend(this.url,"featureResults"),this.CLASS_NAME="SuperMap.GetFeaturesServiceBase"}destroy(){super.destroy();var e=this;e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.format=null,e.hasGeometry=null}processAsync(e){if(e){var t,i=this,n=!0;i.returnContent=e.returnContent,i.fromIndex=e.fromIndex,i.toIndex=e.toIndex,i.maxFeatures=e.maxFeatures,i.hasGeometry=e.hasGeometry,i.returnContent&&(i.url=_0x57693f.urlAppend(i.url,"returnContent="+i.returnContent),n=!1),null!=i.fromIndex&&null!=i.toIndex&&!isNaN(i.fromIndex)&&!isNaN(i.toIndex)&&i.fromIndex>=0&&i.toIndex>=0&&!n&&(i.url=_0x57693f.urlAppend(i.url,"fromIndex="+i.fromIndex+"&toIndex="+i.toIndex)),e.returnCountOnly&&(i.url=_0x57693f.urlAppend(i.url,"&returnCountOnly="+e.returnContent)),t=i.getJsonParameters(e),i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}serviceProcessCompleted(e){e=_0x57693f.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}getJsonParameters(e){var t="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata",i=this;return i.url=_0x57693f.urlPathAppend(i.url,t),i.url=_0x57693f.urlAppend(i.url,"returnContent=true"),_0x57693f.toJSON(e)}}var _0x386a23=(_0x29f301=!0,function(e,t){var i=_0x29f301?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29f301=!1,i}),_0x210ed5=_0x386a23(void 0,(function(){return _0x210ed5.toString().search("(((.+)+)+)+$").toString().constructor(_0x210ed5).search("(((.+)+)+)+$")})),_0x29f301;_0x210ed5();class _0x424915 extends _0x1e847d{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return _0x24c8e8.toJsonParameters(e)}}var _0x20a508=(_0x5ef097=!0,function(e,t){var i=_0x5ef097?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ef097=!1,i}),_0x1a234a=_0x20a508(void 0,(function(){return _0x1a234a.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a234a).search("(((.+)+)+)+$")})),_0x5ef097;_0x1a234a();class _0x54c5e3{constructor(e,t,i,n){SuperMap.Util.isArray(e)&&(n=e[3],i=e[2],t=e[1],e=e[0]),this.left=null!=e?SuperMap.Util.toFloat(e):this.left,this.bottom=null!=t?SuperMap.Util.toFloat(t):this.bottom,this.right=null!=i?SuperMap.Util.toFloat(i):this.right,this.top=null!=n?SuperMap.Util.toFloat(n):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.PlotBounds"}clone(){return new _0x54c5e3(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var i=Math.pow(10,e),n=Math.round(this.left*i)/i,r=Math.round(this.bottom*i)/i,o=Math.round(this.right*i)/i,a=Math.round(this.top*i)/i;return!0===t?r+","+n+","+a+","+o:n+","+r+","+o+","+a}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new WebGLPlot.Cartesian2(this.getWidth(),this.getHeight())}getCenterPixel(){return new WebGLPlot.Cartesian2((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new WebGLPlot.Cartesian2((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var i,n;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(i=t.lon,n=t.lat):(i=t.x,n=t.y);var r=(this.left-i)*e+i,o=(this.bottom-n)*e+n,a=(this.right-i)*e+i,s=(this.top-n)*e+n;return new _0x54c5e3(r,o,a,s)}add(e,t){if(null==e||null==t)throw new WebGLPlot.DeveloperError("PlotBounds.add cannot receive null values");return new _0x54c5e3(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new _0x54c5e3(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new _0x54c5e3(e.x,e.y,e.x,e.y);break;case"SuperMap.PlotBounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var i=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!i){var r=n.getWidth(),o=(n.left+n.right)/2,a=Math.round((e.lon-o)/r);i=this.containsLonLat({lon:e.lon-a*r,lat:e.lat},{inclusive:t.inclusive})}return i}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,i){if(null==i&&(i=!0),null==e||null==t)return!1;return i?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var i=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else i=this;null==t.inclusive&&(t.inclusive=!0);var n=!1,r=i.left===e.right||i.right===e.left||i.top===e.bottom||i.bottom===e.top;if(t.inclusive||!r){var o=e.bottom>=i.bottom&&e.bottom<=i.top||i.bottom>=e.bottom&&i.bottom<=e.top,a=e.top>=i.bottom&&e.top<=i.top||i.top>e.bottom&&i.top<e.top,s=e.left>=i.left&&e.left<=i.right||i.left>=e.left&&i.left<=e.right,l=e.right>=i.left&&e.right<=i.right||i.right>=e.left&&i.right<=e.right;n=(o||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),h=!u.containsBounds(i),d=!u.containsBounds(e);h&&!d?(e=e.add(-c,0),n=i.intersectsBounds(e,{inclusive:t.inclusive})):d&&!h&&(i=i.add(-c,0),n=e.intersectsBounds(i,{inclusive:t.inclusive}))}return n}containsBounds(e,t,i){null==t&&(t=!1),null==i&&(i=!0);var n=this.contains(e.left,e.bottom,i),r=this.contains(e.right,e.bottom,i),o=this.contains(e.left,e.top,i),a=this.contains(e.right,e.top,i);return t?n||r||o||a:n&&r&&o&&a}determineQuadrant(e){var t="",i=this.getCenterLonLat();return t+=e.lat<i.lat?"b":"t",t+=e.lon<i.lon?"l":"r"}wrapDateLine(e,t){var i=(t=t||{}).leftTolerance||0,n=t.rightTolerance||0,r=this.clone();if(e){for(var o=e.getWidth();r.left<e.left&&r.right-n<=e.left;)r=r.add(o,0);for(;r.left+i>=e.right&&r.right>e.right;)r=r.add(-o,0);var a=r.left+i;a<e.right&&a>e.left&&r.right-n>e.right&&(r=r.add(-o,0))}return r}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}static fromString(e,t){var i=e.split(",");return _0x54c5e3.fromArray(i,t)}static fromArray(e,t){return!0===t?new _0x54c5e3(e[1],e[0],e[3],e[2]):new _0x54c5e3(e[0],e[1],e[2],e[3])}static fromSize(e){return new _0x54c5e3(0,e.h,e.w,0)}static oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}var _0x2fac72=(_0x6071b2=!0,function(e,t){var i=_0x6071b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6071b2=!1,i}),_0x2ea9e2=_0x2fac72(void 0,(function(){return _0x2ea9e2.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ea9e2).search("(((.+)+)+)+$")})),_0x6071b2;_0x2ea9e2();class _0x3913cb extends ServiceBase{constructor(e,t){super(e,t)}getFeaturesByBounds(e,t,i){var n=this;new _0x424915(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}_processParams(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.fromIndex=e.fromIndex?e.fromIndex:0,e.toIndex=e.toIndex?e.toIndex:-1,e.isUseBatch=null!=e.isUseBatch&&e.isUseBatch,e.bounds&&(e.bounds=_0x218b23(e.bounds)),e):{}}_processFormat(e){return e||"GEOJSON"}}function _0x218b23(e){if(Array.isArray(e)&&e[0]instanceof WebGLPlot.Cartesian2){let t=Math.min(e[0].x,e[1].x),i=Math.min(e[0].y,e[1].y),n=Math.max(e[0].x,e[1].x),r=Math.max(e[0].y,e[1].y);return new _0x54c5e3(t,i,n,r)}return new _0x54c5e3}var _0x5c0d79=(_0x1fd4f4=!0,function(e,t){var i=_0x1fd4f4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fd4f4=!1,i}),_0x5a025b=_0x5c0d79(void 0,(function(){return _0x5a025b.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a025b).search("(((.+)+)+)+$")})),_0x1fd4f4;_0x5a025b();class _0x5870d3{constructor(e,t){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.viewer))throw new WebGLPlot.DeveloperError("RectQueryHandler viewer is required.");if(!WebGLPlot.defined(e.superMapDataUrl)||""===e.superMapDataUrl)throw new WebGLPlot.DeveloperError("RectQueryHandler superMapDataUrl is required.");this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.viewer.scene.canvas),this.active=!1,this.isDrawing=!1,this.bounds=null,this.boundsPts=[],this.fillColor=new WebGLPlot.Color(0,.35,.91,.4),this.outlineColor=new WebGLPlot.Color(0,1,0,1),this._superMapDataUrl=WebGLPlot.defaultValue(e.superMapDataUrl,""),this._queryFeatures=WebGLPlot.defaultValue(e.queryFeatures,[]),this._viewer=e.viewer,this.callback=t}setQueryFeatures(e){e&&e.length>0&&(this._queryFeatures=e)}activate(e){if(!0!==this.active){this._viewer.scene._canvas.style.cursor="crosshair",this.polygon&&(this._viewer.entities.remove(this.polygon),this.polygon=void 0),this.active=!0;var t=this;this.handler.setInputAction((function(i){_0x194d8c(i,t,e)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction((function(e){_0xc9b814(e,t)}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction((function(i){_0x4fae7c(i,t,e)}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}}deactivate(){this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this.polygon&&(this._viewer.entities.remove(this.polygon),this.polygon=void 0),this._viewer.scene._canvas.style.cursor=""}queryByDrawRect(){_0x56024b(this)}queryByBounds(e,t){let i=Math.min(e.x,t.x),n=Math.min(e.y,t.y),r=Math.max(e.x,t.x),o=Math.max(e.y,t.y);this._positions=[],this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(i,o,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(r,o,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(r,n,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(i,n,0)),this.boundsPts=[],this.boundsPts.push(new WebGLPlot.Cartesian2(i,o)),this.boundsPts.push(new WebGLPlot.Cartesian2(r,n)),this.bounds={leftBottom:{x:i,y:n},rightTop:{x:r,y:o}},_0x56024b(this)}}function _0x194d8c(e,t,i){var n=t;if(n&&n.active){var r=n._viewer.scene.pickPosition(e.position);r&&(n.isDrawing||n.polygon?n.polygon&&(n.isDrawing=!1,n.active=!1,n._clickPts[1]=r,n._positions=_0x39124b(n,n._clickPts),i&&i(n.boundsPts),n._viewer.scene._canvas.style.cursor=""):(n.isDrawing=!0,n._clickPts=[r.clone(),r.clone()],n._positions=[r.clone(),r.clone()],n.polygon=n._viewer.entities.add({name:"RectQuery__Rect",polygon:{hierarchy:new WebGLPlot.CallbackProperty((function(){return{positions:n._positions}}),!1),material:n.fillColor,outline:!0,outlineColor:n.outlineColor},depthTestEnabled:!0})))}}function _0xc9b814(e,t){var i=t;if(i&&i.active&&i.isDrawing){var n=i._viewer.scene.pickPosition(e.endPosition);n&&(i._clickPts[1]=n,i._positions=_0x39124b(i,i._clickPts))}}function _0x4fae7c(e,t,i){var n=t;if(n&&n.active&&n.isDrawing){n.isDrawing=!1,n.active=!1;var r=n._viewer.scene.pickPosition(e.position);r&&(n._clickPts[1]=r,n._positions=_0x39124b(n,n._clickPts)),i&&i(n.boundsPts),n._viewer.scene._canvas.style.cursor=""}}function _0x39124b(e,t){var i=[];if(e.boundsPts=[],2===t.length){var n=WebGLPlot.Cartographic.fromCartesian(t[0]),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=WebGLPlot.Cartographic.fromCartesian(t[1]),s=WebGLPlot.CesiumMath.toDegrees(a.longitude),l=WebGLPlot.CesiumMath.toDegrees(a.latitude);let u=Math.min(r,s),c=Math.min(o,l),h=Math.max(r,s),d=Math.max(o,l);i.push(new WebGLPlot.Cartesian3.fromDegrees(u,d,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(h,d,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(h,c,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(u,c,0)),e.bounds={leftBottom:{x:u,y:c},rightTop:{x:h,y:d}},e.boundsPts.push(new WebGLPlot.Cartesian2(r,o)),e.boundsPts.push(new WebGLPlot.Cartesian2(s,l))}return i}function _0x56024b(e){let t=[];for(let r=0;r<e._queryFeatures.length;r++){const o=e._queryFeatures[r],a=o.axiosUrl+"queryByBoundsResults.json";let s=o.datasetNames;if(s.length>0){let r={arg0:s,arg1:e.bounds};var i=JSON.stringify(r);let o=_0x1cf8f3();o.open("POST",encodeURI(a),!1,"",""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),o.send(i);var n=JSON.parse(o.responseText,null).newResourceLocation;o.open("GET",encodeURI(n),!1,"",""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),o.send();let l=JSON.parse(o.responseText);t.push(l)}e.callback&&e.callback(t)}}function _0x1cf8f3(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}const _0x361582=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x226f2c=_0x361582(void 0,(function(){return _0x226f2c.toString().search("(((.+)+)+)+$").toString().constructor(_0x226f2c).search("(((.+)+)+)+$")}));_0x226f2c();class _0x301bce{constructor(e,t){this.viewer=e,this.init(e),this.updateOptionsParams(t)}init(e){this.clipPlanePositions=null,this.ClipPlaneShow=!1,this.clipPlaneScale=.1,this.LocalToWorldMatrix=null,this.layerNmaes=null}updateOptionsParams(e){!e||(WebGLPlot.defined(e.ClipPlaneShow)&&(this.ClipPlaneShow=e.ClipPlaneShow),WebGLPlot.defined(e.clipPlaneScale)&&(this.clipPlaneScale=e.clipPlaneScale))}setPlanePositions(e){this.LocalToWorldMatrix=e;let t=10*this.clipPlaneScale,i=new WebGLPlot.Cartesian3(t,t,0),n=new WebGLPlot.Cartesian3(t,-t,0),r=new WebGLPlot.Cartesian3(-t,-t,0),o=new WebGLPlot.Cartesian3(-t,t,0),a=WebGLPlot.Matrix4.multiplyByPoint(e,o,new WebGLPlot.Cartesian3),s=WebGLPlot.Matrix4.multiplyByPoint(e,r,new WebGLPlot.Cartesian3),l=WebGLPlot.Matrix4.multiplyByPoint(e,n,new WebGLPlot.Cartesian3),u=WebGLPlot.Matrix4.multiplyByPoint(e,i,new WebGLPlot.Cartesian3);this.clipPlanePositions=[a,s,l,u],this.clipPlaneUpdate()}addsurface(){this.planeSurface=this.viewer.entities.add({id:"clip-plane",polygon:{hierarchy:new Cesium.CallbackProperty((()=>({positions:this.clipPlanePositions,holes:[]})),!1),show:new Cesium.CallbackProperty((()=>this.ClipPlaneShow),!1),material:WebGLPlot.Color.GOLD.withAlpha(.2),outline:!0,outlineColor:WebGLPlot.Color.GOLD,perPositionHeight:!0}})}setClipPlane(e,t){this.clear();let i=this.degreeToCartesian3(e),n=WebGLPlot.Transforms.eastNorthUpToFixedFrame(i);this.layerNmaes=t,this.setPlanePositions(n),this.addsurface()}clipPlaneUpdate(){if(!this.clipPlanePositions)return;const e=this.getAllS3MTilesLayer(this.viewer.scene);0!==e.size&&e.forEach((e=>{if(this.layerNmaes&&this.layerNmaes.includes(e.name))e.setCustomClipPlane(this.clipPlanePositions[0],this.clipPlanePositions[1],this.clipPlanePositions[2]);else if(this.layerNmaes&&this.layerNmaes.includes(e._name))for(let t of e._s3mLayers._array)t.setCustomClipPlane(this.clipPlanePositions[0],this.clipPlanePositions[1],this.clipPlanePositions[2])}))}clear(){const e=this.getAllS3MTilesLayer(this.viewer.scene);0!==e.size&&(e.forEach((e=>{if(null==e._layerConfigs)e.clearCustomClipBox();else for(let t of e._s3mLayers._array)t.clearCustomClipBox()})),this.planeSurface&&(this.viewer.entities.remove(this.planeSurface),this.planeSurface=null,this.clipPlanePositions=null,this.LocalToWorldMatrix=null))}degreeToCartesian3(e){let t=this.viewer.scene.globe.ellipsoid,i=WebGLPlot.Cartographic.fromDegrees(e.lng,e.lat,e.alt);return t.cartographicToCartesian(i)}destroy(){this.clear(),this.modelEditor&&this.modelEditor.destroy()}getAllS3MTilesLayer(){var e=new Map;if(window.SuperMap3D&&void 0===this.viewer.scene.layers){let t=this.viewer.scene.primitives._primitives;for(let i=0;i<t.length;i++){const n=t[i];n instanceof WebGLPlot.S3MTilesLayer&&e.set(n.name,n)}}else this.viewer.scene.layers instanceof WebGLPlot.Layers&&this.viewer.scene.layers._layers._array.map((t=>{t instanceof WebGLPlot.S3MTilesLayer&&e.set(t.name,t)}));return e}}const _0x16c376=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x32dfba=_0x16c376(void 0,(function(){return _0x32dfba.toString().search("(((.+)+)+)+$").toString().constructor(_0x32dfba).search("(((.+)+)+)+$")}));function _0xeb17d7(e,t){this.viewer=e,this.clipPlaneclipPlane=new _0x301bce(e,{ClipPlaneShow:!1}),this.tsBuildDatas=t.tsBuildDatas,this.levelHeight=t.levelHeight,this.BIMHeight=t.BIMHeight,this.levelNum=t.levelNum}function _0x2aff73(e){var t=new Map;if(window.SuperMap3D&&void 0===e.scene.layers){let i=e.scene.primitives._primitives;for(let e=0;e<i.length;e++){const n=i[e];n instanceof WebGLPlot.S3MTilesLayer&&t.set(n.name,n)}}else e.scene.layers instanceof WebGLPlot.Layers&&e.scene.layers._layers._array.map((e=>{e instanceof WebGLPlot.S3MTilesLayer&&t.set(e.name,e)}));return t}_0x32dfba(),_0xeb17d7.prototype.setLayerShow=function(e,t){for(let r=0;r<this.tsBuildDatas.length;r++){let o=this.tsBuildDatas[r].Name,a=this.tsBuildDatas[r].CilpLayers,s=this.tsBuildDatas[r].HideLayers,l=this.tsBuildDatas[r].ShowLayers,u=this.tsBuildDatas[r].ShowImageLayers,c=this.tsBuildDatas[r].Center,h=this.tsBuildDatas[r].Height,d=this.tsBuildDatas[r].BaseHeight;if(e===o){if(0!==a.length&&void 0!==h&&void 0!==d&&this.clipPlaneclipPlane.setClipPlane({lng:c.x,lat:c.y,alt:this.BIMHeight-this.levelHeight*(this.levelNum-t)},a),0===a.length&&this.clipPlaneclipPlane.clear(),0!==s.length&&this.hideLayers(s),0!==l.length&&(this.showLayers(l),"showUnderLinePipe"===o)){var i=WebGLPlot.CesiumMath.toDegrees(1.9875852260482232),n=WebGLPlot.CesiumMath.toDegrees(.3928307475708383);this.viewer.scene.camera.setView({destination:new WebGLPlot.Cartesian3.fromDegrees(i,n,360),orientation:{heading:1.1366928213021517,pitch:-1.063671189141393,roll:6.283184795466507}})}!0===u?this.showImageryLayers():this.hideImageryLayers()}}},_0xeb17d7.prototype.showLayers=function(e){const t=_0x2aff73(this.viewer);0!==t.size&&t.forEach((t=>{if(e.includes(t.name)||e.includes(t._name))if(null==t._layerConfigs)t.visible=!0;else for(let e of t._layerConfigs._array)e.isVisible=!0}))},_0xeb17d7.prototype.hideLayers=function(e){const t=_0x2aff73(this.viewer);0!==t.size&&t.forEach((t=>{if(e.includes(t.name)||e.includes(t._name))if(null==t._layerConfigs)t.visible=!1;else for(let e of t._layerConfigs._array)e.isVisible=!1}))},_0xeb17d7.prototype.hideImageryLayers=function(){let e=this.viewer.scene.imageryLayers._layers;for(let t=1;t<e.length;++t)e[t].show=!1},_0xeb17d7.prototype.showImageryLayers=function(){let e=this.viewer.scene.imageryLayers._layers;for(let t=1;t<e.length;++t)e[t].show=!0};var _0x3c11d9=(_0x51b547=!0,function(e,t){var i=_0x51b547?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51b547=!1,i}),_0x4dbbf5=_0x3c11d9(void 0,(function(){return _0x4dbbf5.toString().search("(((.+)+)+)+$").toString().constructor(_0x4dbbf5).search("(((.+)+)+)+$")})),_0x51b547;function _0x2a4279(){this.dataStorege=new Array,this.add=_0x430099,this.show=_0x3ef84d,this.find=_0x43c3fc,this.remove=_0x4718c8,this.count=_0x33bb27,this.kSort=_0x2cb08b,this.vSort=_0x15a206,this.clear=_0xa7df0e}function _0x430099(e,t){this.dataStorege[e]=t}function _0x3ef84d(){for(var e in this.dataStorege)console.log(e+":"+this.dataStorege[e])}function _0x43c3fc(e){return this.dataStorege[e]}function _0x4718c8(e){delete this.dataStorege[e]}function _0x33bb27(){var e=0;for(var t in Object.keys(this.dataStorege))++e;return e}function _0x2cb08b(){var e=this.dataStorege,t=Object.keys(e).sort();for(var i in t)console.log(t[i]+":"+e[t[i]])}function _0x15a206(){var e=this.dataStorege,t=Object.keys(e).sort((function(t,i){return e[t]-e[i]}));for(var i in t)console.log(t[i]+":"+e[t[i]])}function _0xa7df0e(){for(var e in this.dataStorege)delete this.dataStorege[e]}_0x4dbbf5();const _0x2a8801=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x375f1f=_0x2a8801(void 0,(function(){return _0x375f1f.toString().search("(((.+)+)+)+$").toString().constructor(_0x375f1f).search("(((.+)+)+)+$")}));_0x375f1f();class _0x3e45e1{constructor(){}static getAllS3MTilesLayer(e){var t=new Map;if(window.SuperMap3D&&void 0===e.layers){let i=e.primitives._primitives;for(let e=0;e<i.length;e++){const n=i[e];n instanceof WebGLPlot.S3MTilesLayer&&t.set(n.name,n)}}else e.layers instanceof WebGLPlot.Layers&&e.layers._layers._array.map((e=>{e instanceof WebGLPlot.S3MTilesLayer&&t.set(e.name,e)}));return t}static createS3MTilesLayersTreeData(e,t){let i=[],n=[];const r=this.getAllS3MTilesLayer(e.scene);if(WebGLPlot.defined(t)){let e=function(t){return t?t.filter((t=>{if(t.children=e(t.children),t.node){if(!r.get(t.label))return!1;n.push(t.label),t.data=r.get(t.label)}return!0})):[]};i=e(window.tsLayerPanelConfig),r.forEach((e=>{n.includes(e.name)||i.push({label:e.name,data:e,show:e.visible})}))}else r.size>0&&r.forEach((e=>{var t={label:e.name,data:e,children:[],show:e.visible};i.push(t)}));return i}static createImageryLayerTreeData(e){let t=[];return e&&e.imageryLayers.length>0&&e.imageryLayers._layers&&(t=e.imageryLayers._layers.map((e=>{const t=e._imageryProvider;let i="";if(t._image){const e=t.url.split("/");i=e[e.length-1].split(".")[0],i=decodeURI(i)}else if(t._resource){const e=t._resource.url.split("/");i=e[e.length-1].split("/")[0],i.includes(".")&&(i=i.split(".")[0]),""===i&&(i=e[e.length-2].split("/")[0]),i=decodeURI(i)}return{label:i,data:e,show:e.show}}))),t}static createTerrainProviderTreeData(e){let t=[];return e&&e.terrainProvider&&e.terrainProvider.tablename&&(t=e.terrainProvider._layers.map((t=>{let i=e.terrainProvider;return{label:e.terrainProvider.tablename,data:i,show:i.visible}}))),t}}const _0x4d283b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5c7284=_0x4d283b(void 0,(function(){return _0x5c7284.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c7284).search("(((.+)+)+)+$")}));_0x5c7284(),WebGLPlot.wtsConfigManager=void 0;class _0x5ca3d2{constructor(e){try{if(!e||""===e||!e.includes("http://"))throw console.log("WTSConfig dataServerUrl is error!!!"),this._urlIsError=!0,"PlotCustomRadar scene is required.";if(this.dataServerUrl=e,this.queryServerUrl=this.dataServerUrl.split("datasources")[0]+"featureResults.rjson?returnContent=true",this._commit=_0x4dca24(),this._commit.open("GET",encodeURI(e),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(),404===this._commit.status)throw this._urlIsError=!0,"PlotCustomRadar scene is required."}catch(e){console.log(e)}}static getInstance(e){return e&&(!WebGLPlot.wtsConfigManager||WebGLPlot.wtsConfigManager.plotServerUrl!==e)&&(WebGLPlot.wtsConfigManager=new _0x5ca3d2(e)),WebGLPlot.wtsConfigManager}updateDoorsCfg(e){if(e.length<=0||this._urlIsError)return!1;_0x489f36(this._commit,e,this.dataServerUrl,"doorsConfig")}getDoorsCfg(){if(this._urlIsError)return[];return _0x229631(this._commit,this.dataServerUrl,"doorsConfig")}updateQuickPositionCfg(e){if(e.length<0||this._urlIsError)return!1;const t="quickPositionConfig",i=this.dataServerUrl+"/"+t+"/features.rjson";let n=[];n.push("groupName"),n.push("groupUuID"),n.push("keyCode"),n.push("stopUuID");let r=Object.keys(e[0].stops[0].stop);for(let e=0;e<r.length;e++)"key"!==r[e]&&n.push(r[e]);_0x1c58a2(this._commit,this.dataServerUrl,t)?_0x5862ab(this._commit,i):_0x107107(this._commit,t,this.dataServerUrl,n);let o=[];o.push(_0x2bd6ea(n));for(let t=0;t<e.length;t++){const i=e[t];for(let e=0;e<i.stops.length;e++){const t=i.stops[e].stop;t.stopUuID=i.stops[e].uuid,t.keyCode=t.key,t.groupName=i.groupName,t.groupUuID=i.uuid;let r=[];for(let e=0;e<n.length;e++)r.push(t[n[e]]);let a=_0x3e3563(n,r);o.push(a)}}_0x154efc(this._commit,i,o)}getQuickPositionCfg(){if(this._urlIsError)return[];let e=_0x229631(this._commit,this.dataServerUrl,"quickPositionConfig"),t=new Map;for(let i=0;i<e.length;i++){const n=e[i];let r={};r.key=n.keyCode,r.lat=n.lat,r.lng=n.lng,r.alt=n.alt,r.heading=n.heading,r.roll=n.roll,r.pitch=n.pitch,r.second=n.second,r.uuid=n.stopUuID,r.name=n.name,r.groupName=n.groupName,r.groupUuID=n.groupUuID,t.get(n.groupName)||t.set(n.groupName,[]),t.get(n.groupName).push(r)}let i=[];return t.forEach((function(e,t,n){let r={};r.groupName=t,e.length>0&&(r.uuid=e[0].groupUuID),r.stops=e,i.push(r)})),i}updateBuildClipCfg(e){if(e.length<0||this._urlIsError)return!1;_0x489f36(this._commit,e,this.dataServerUrl,"buildClipsConfig")}getBuildClipCfg(){if(this._urlIsError)return[];return _0x229631(this._commit,this.dataServerUrl,"buildClipsConfig")}updataLayer3DGroupCfg(e){if(e.length<0||this._urlIsError)return!1;_0x489f36(this._commit,e,this.dataServerUrl,"Layer3DGroupCfg")}getLayer3DGroupCfg(){if(this._urlIsError)return[];return _0x229631(this._commit,this.dataServerUrl,"Layer3DGroupCfg")}updateCommonSymbolsCfg(e){if(e.length<0||this._urlIsError)return!1;_0x489f36(this._commit,e,this.dataServerUrl,"commonSymbolsConfig")}getCommonSymbols(){if(this._urlIsError)return[];return _0x229631(this._commit,this.dataServerUrl,"commonSymbolsConfig")}updateOhterSimpleCfg(e,t){if(e.length<0||this._urlIsError)return!1;_0x489f36(this._commit,e,this.dataServerUrl,t)}getOhterSimpleCfg(e){return this._urlIsError?[]:_0x229631(this._commit,this.dataServerUrl,e)}deleteDataset(e){_0x4c0687(this._commit,e,this.dataServerUrl)}}function _0x154efc(e,t,i){_0x35bea4(e,t,i)}function _0x5862ab(e,t){t+="?_method=DELETE&deleteMode=SQL";e.open("POST",encodeURI(t),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify({attributeFilter:"SmID>0"}))}function _0x35bea4(e,t,i){e.open("POST",encodeURI(t),!0,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(i))}function _0x2bd6ea(e){let t={fieldNames:["SmID","SmUserID"],fieldValues:["0","0"],geometry:null};for(let i in e){const n=e[i];t.fieldNames.push(n),t.fieldValues.push(n)}return t}function _0x3e3563(e,t){let i={fieldNames:["SmID","SmUserID"],fieldValues:["0","0"],geometry:null};for(let n in e){const r=e[n],o=t[n];i.fieldNames.push(r),i.fieldValues.push(o)}return i}function _0x19d83c(e){let t=[];for(let i=1;i<e.length;i++){const n=e[i];let r={};for(let t=2;t<n.fieldValues.length;t++){const i=e[0].fieldValues[t];r[i]=n.fieldValues[t],n.fieldValues[t].includes(",")&&(r[i]=JSON.parse(n.fieldValues[t]))}t.push(r)}return t}function _0x1c58a2(e,t,i){e.open("GET",encodeURI(t+".json"),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(null);let n=JSON.parse(e.responseText,null);return!!(n&&n.datasetNames&&n.datasetNames.includes(i))}function _0x489f36(e,t,i,n){const r=i+"/"+n+"/features.rjson";if(t.length<=0)return void _0x5862ab(e,r);let o=[],a=Object.keys(t[0]);for(let e=0;e<a.length;e++)o.push(a[e]);_0x1c58a2(e,i,n)?_0x5862ab(e,r):_0x107107(e,n,i,o);let s=[];s.push(_0x2bd6ea(o));for(let e=0;e<t.length;e++){const i=t[e];let n=[];for(let e=0;e<o.length;e++)n.push(i[o[e]]);let r=_0x3e3563(o,n);s.push(r)}_0x154efc(e,r,s)}function _0x229631(e,t,i){return _0x19d83c(_0x4175ed(e,t,i))}function _0x4175ed(e,t,i){const n=t+"/"+i+"/features.json";let r;e.open("GET",encodeURI(n),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");try{if(e.send(),r=JSON.parse(e.responseText,null),r.error)return console.log("WTSConfig request error!!!",r.error),[];if(r.featureCount<=0)return[]}catch(e){return console.log("WTSConfig request error!!!",e),[]}const o=n+"?fromIndex=0&toIndex="+(r.featureCount-1).toString();e.open("GET",encodeURI(o),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(),r=JSON.parse(e.responseText,null);let a=[];for(let t=0;t<r.childUriList.length;t++){const i=r.childUriList[t]+".json";e.open("GET",encodeURI(i),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send();let n=JSON.parse(e.responseText,null);a.push(n)}return a}function _0x107107(e,t,i,n){let r=i+".json",o={datasetType:"TABULAR",datasetName:t};if(e.open("POST",encodeURI(r),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(o)),JSON.parse(e.responseText,null).succeed){let r=i+"/"+t+"/fields.rjson";for(let t=0;t<n.length;t++){const i=n[t];let o={isZeroLengthAllowed:"true",maxLength:"50000",isRequired:"false",name:i,caption:i,type:"WTEXT",defaultValue:"null",isSystemField:"false"};e.open("POST",encodeURI(r),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(o)),JSON.parse(e.responseText,null)}}}function _0x4c0687(e,t,i){let n=i+"/"+t+".rjson";e.open("DELETE",encodeURI(n),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(null)}function _0x4dca24(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}var _0x293844=(_0x41c9e9=!0,function(e,t){var i=_0x41c9e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41c9e9=!1,i}),_0x21fa44=_0x293844(void 0,(function(){return _0x21fa44.toString().search("(((.+)+)+)+$").toString().constructor(_0x21fa44).search("(((.+)+)+)+$")})),_0x41c9e9;function _0x51fe51(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.SampleDataModelsCfg=WebGLPlot.defaultValue(e.SampleDataModelsCfg,[]),this.elementsCfg=WebGLPlot.defaultValue(e.elementsCfg,[]),this.tsBuildDatas=WebGLPlot.defaultValue(e.tsBuildDatas,[]),this.geoLayerConfig=WebGLPlot.defaultValue(e.geoLayerConfig,[]),this.MGISQueryConfig=WebGLPlot.defaultValue(e.MGISQueryConfig,[]),this.tsPositions=WebGLPlot.defaultValue(e.tsPositions,[])}_0x21fa44(),_0x51fe51.prototype.fromJSON=function(e){this.SampleDataModelsCfg=e.SampleDataModelsCfg,this.elementsCfg=e.elementsCfg,this.tsBuildDatas=e.tsBuildDatas,this.geoLayerConfig=e.geoLayerConfig,this.MGISQueryConfig=e.MGISQueryConfig,this.tsPositions=e.tsPositions},_0x51fe51.prototype.toJSON=function(){return'{"SampleDataModelsCfg":'+WebGLPlot.toJSON(this.SampleDataModelsCfg)+',"elementsCfg":'+WebGLPlot.toJSON(this.elementsCfg)+',"tsBuildDatas":'+WebGLPlot.toJSON(this.tsBuildDatas)+',"geoLayerConfig":'+WebGLPlot.toJSON(this.geoLayerConfig)+',"MGISQueryConfig":'+WebGLPlot.toJSON(this.MGISQueryConfig)+',"tsPositions":'+WebGLPlot.toJSON(this.tsPositions)+"}"},_0x51fe51.prototype.destory=function(){this.SampleDataModelsCfg=null,this.elementsCfg=null,this.tsBuildDatas=null,this.geoLayerConfig=null,this.MGISQueryConfig=null,this.tsPositions=null};var _0x105d8b=(_0x235f3a=!0,function(e,t){var i=_0x235f3a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x235f3a=!1,i}),_0x34c226=_0x105d8b(void 0,(function(){return _0x34c226.toString().search("(((.+)+)+)+$").toString().constructor(_0x34c226).search("(((.+)+)+)+$")})),_0x235f3a;_0x34c226();var WebGLPlot$2=window.WebGLPlot=window.WebGLPlot||{},_0xf1e015=null,_0x51bfe6=void 0;function _0x290856(e){e=WebGLPlot$2.defaultValue(e,WebGLPlot$2.defaultValue.EMPTY_OBJECT),this._serverUrl=WebGLPlot$2.defaultValue(e.serverUrl,WebGLPlot$2.Plotting.serverUrl),this._configData=WebGLPlot$2.defaultValue(e.configSmlInfo,new _0x51fe51),this._configSmlFileName=WebGLPlot$2.defaultValue(e._configSmlFileName,"WTSPlotConfig_DoNotDel"),this._openSmlFileCompleted=new WebGLPlot$2.Event,this._openSmlFileFailed=new WebGLPlot$2.Event,this._saveSmlFileCompleted=new WebGLPlot$2.Event,this._saveSmlFileFailed=new WebGLPlot$2.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}}}_0x290856.getInstance=function(e){return _0xf1e015||(_0xf1e015=new WebGLPlot$2.ConfigManager(e)),_0xf1e015},_0x290856.prototype.openSmlFileOnServer=function(e,t){e||(e=this._configSmlFileName);var i=this;function n(e){i._openSmlFileFailed.raiseEvent(),"function"==typeof t&&t({success:!1,message:"Open failed"})}var r=WebGLPlot$2.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(r){var o;r.result?r.result.succeed?(o=r.result,i._getCompletedInit(o,e),"function"==typeof t&&t({success:!0,configSmlFileName:e})):n():r.error&&n()}),this)}},_0x290856.prototype._getCompletedInit=function(e,t){if(this._configSmlFileName=t,e.tsPositions)for(var i=0;i<e.tsPositions.length;i++){var n=e.tsPositions[i].key;e.tsPositions[i].key=n.replaceAll("%2b","+")}this.openConfigDataFromConfigData(e)},_0x290856.prototype.openConfigDataFromConfigData=function(e){this._configData.fromJSON(e),e.SampleDataModelsCfg&&(this.configData.SampleDataModelsCfg=e.SampleDataModelsCfg),e.elementsCfg&&(this.configData.elementsCfg=e.elementsCfg),e.tsBuildDatas&&(this.configData.tsBuildDatas=e.tsBuildDatas),e.geoLayerConfig&&(this.configData.geoLayerConfig=e.geoLayerConfig),e.MGISQueryConfig&&(this.configData.MGISQueryConfig=e.MGISQueryConfig),e.tsPositions&&(this.configData.tsPositions=e.tsPositions),this._openSmlFileCompleted.raiseEvent(e)},_0x290856.prototype.saveSmlFileToServer=function(e,t){if(!WebGLPlot$2.defined(e))throw new WebGLPlot$2.DeveloperError("Local ConfigData Path is required.");WebGLPlot$2.defaultValue(t,!1)},_0x290856.prototype._save=function(e,t){var i=this;function n(e){var t,n;e?(n=e,i._saveSmlFileCompleted.raiseEvent(n)):i._saveSmlFileFailed.raiseEvent(t)}var r=i._serverUrl,o=WebGLPlot$2.smlFileService(r,this.options.serviceParams);if(o){var a=o.editSmlFileParams;a.method="POST",a.sitData=this.saveConfigData(),a.smlFileName=e,a.isCover=t,o.smlFileService.editSMLFile(a,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}},_0x290856.prototype.saveConfigData=function(){var e=new _0x51fe51;return e.SampleDataModelsCfg=_0x51bfe6.SampleDataModelsCfg,e.elementsCfg=_0x51bfe6.elementsCfg,e.tsBuildDatas=_0x51bfe6.tsBuildDatas,e.geoLayerConfig=_0x51bfe6.geoLayerConfig,e.MGISQueryConfig=_0x51bfe6.MGISQueryConfig,e.tsPositions=_0x51bfe6.tsPositions,e},Object.defineProperties(_0x290856.prototype,{serverUrl:{get:function(){return this._serverUrl}},configData:{get:function(){return this._configData},set:function(e){e!==this._configData&&(this._configData=e)}},configSmlFileName:{get:function(){return this._configSmlFileName},set:function(e){e!==this._configSmlFileName&&(this._configSmlFileName=e)}},openSmlFileCompleted:{get:function(){return this._openSmlFileCompleted}},openSmlFileFailed:{get:function(){return this._openSmlFileFailed}},saveSmlFileFailed:{get:function(){return this._saveSmlFileFailed}},saveSmlFileCompleted:{get:function(){return this._saveSmlFileCompleted}}}),WebGLPlot$2.ConfigManager=_0x290856;var _0x41e16b=(_0x132689=!0,function(e,t){var i=_0x132689?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x132689=!1,i}),_0x281989=_0x41e16b(void 0,(function(){return _0x281989.toString().search("(((.+)+)+)+$").toString().constructor(_0x281989).search("(((.+)+)+)+$")})),_0x132689;_0x281989();class _0x1f291c{constructor(){}static doContourAnalyst(e,t,i,n,r){void 0===t&&(t=theCrimePoint),_0x1f291c.entity&&_0x1f291c.clear(e);let o=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,i);_0x1f291c.entityEllipse=e.entities.add({position:o,ellipse:{height:i,semiMinorAxis:n,semiMajorAxis:n,material:new WebGLPlot.Color(1,1,0,.35),outline:!0}}),_0x1f291c.entityCirclePt=e.entities.add({position:o,point:{pixelSize:5,color:WebGLPlot.Color.WHITE,outlineColor:WebGLPlot.Color.fromCssColorString("#fff"),outlineWidth:2,show:!0}}),_0x1f291c.entityPolyline=e.entities.add({polyline:{show:!0,positions:WebGLPlot.Cartesian3.fromDegreesArrayHeights([t.x,t.y,i,r.x,r.y,i,r.x,r.y,0]),width:3,material:WebGLPlot.Color.fromCssColorString("#51ff00"),loop:!0,clampToGround:!1}});var a=(r.x+t.x)/2,s=(r.y+t.y)/2;_0x1f291c.labels=e.scene.primitives.add(new WebGLPlot.LabelCollection({depthTestEnable:!1})),_0x1f291c.labels.add({position:WebGLPlot.Cartesian3.fromDegrees(a,s,i+10),font:"500 16px sans-serif",style:WebGLPlot.LabelStyle.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:WebGLPlot.Color.BLACK,showBackground:!0,backgroundColor:WebGLPlot.Color.fromCssColorString("rgba(38, 38, 38, 0.85)"),pixelOffset:new WebGLPlot.Cartesian2(15,0),pixelOffsetScaleByDistance:new WebGLPlot.NearFarScalar(150,3,15e6,.5),text:"height:"+i+"m\nradius:"+n+"m",show:!0,horizontalOrigin:WebGLPlot.HorizontalOrigin.LEFT})}static clear(e){_0x1f291c.entity&&(e.entities.remove(_0x1f291c.entity),e.entities.remove(_0x1f291c.entityCirclePt),e.entities.remove(_0x1f291c.entityPolyline),e.entities.remove(_0x1f291c.labels),_0x1f291c.entity=void 0),_0x1f291c.textGeo&&superMapTrackingLayer.removeGeoGraphicObject(_0x1f291c.textGeo)}}_0x1f291c.entity=1,_0x1f291c.textGeo=void 0;var _0x3bd5b1=(_0x4e9b08=!0,function(e,t){var i=_0x4e9b08?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e9b08=!1,i}),_0x494b94=_0x3bd5b1(void 0,(function(){return _0x494b94.toString().search("(((.+)+)+)+$").toString().constructor(_0x494b94).search("(((.+)+)+)+$")})),_0x4e9b08;_0x494b94();var WebGLPlot$1=window.WebGLPlot=window.WebGLPlot||{};function _0x14bd2c(e){this.viewer=e.viewer,this.theCrimePoint=WebGLPlot$1.defaultValue(e.theCrimePoint,new _0x11ff81(113.88122956581786,22.50809724778502,0)),this.groundEfficiency=void 0}function _0x4d9b51(e,t,i){WebGLPlot$1.defined(i)||(i=15);const n=e/6378137;for(var r=[_0x24d2b4(t[1]),_0x24d2b4(t[0])],o=[],a=0;a<i;a++){const e=a*(360/i)*Math.PI/180,t=r[0]+n*Math.cos(e),s=r[1]+n*Math.sin(e);o.push([_0x36edc5(s),_0x36edc5(t)])}return o.push(o[0]),[o]}function _0x24d2b4(e){return e*Math.PI/180}function _0x36edc5(e){return 180*e/Math.PI}_0x14bd2c.prototype.contourAnalysisConfirm=function(e){this.groundEfficiency&&(this.groundEfficiency.destroy(),this.groundEfficiency=void 0);let t=e.height,i=e.radius,n=WebGLPlot$1.defined(e.minTerrainHeight)?e.minTerrainHeight:0;if(0===i)throw new WebGLPlot$1.DeveloperError("height or radius can not be empty!");for(var r=_0x4d9b51(i,[this.theCrimePoint.x,this.theCrimePoint.y],50),o=[],a=0;a<r[0].length;a++)o.push(r[0][a][0]),o.push(r[0][a][1]);_0x1f291c.doContourAnalyst(this.viewer,this.theCrimePoint,t,i,o),this.groundEfficiency=new _0x3a2d15({scene:scene,id:"sniperGroundEffect",color:WebGLPlot$1.Color.RED.withAlpha(.5),positions:o,minTerrainHeight:n})},_0x14bd2c.prototype.contourAnalysisClose=function(){_0x1f291c.clear(this.viewer),this.groundEfficiency&&this.groundEfficiency.destroy()},WebGLPlot$1.BuildContourAnalyst=_0x14bd2c;const _0x36f23a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x38f70b=_0x36f23a(void 0,(function(){return _0x38f70b.toString().search("(((.+)+)+)+$").toString().constructor(_0x38f70b).search("(((.+)+)+)+$")}));function _0x234d8c(e){this.viewer=e,this.doorEntitise=[],this.doorExcID=-1,this._doorClickEvent=new WebGLPlot.Event}function _0x492774(e,t){let i=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),n=WebGLPlot.Transforms.headingPitchRollQuaternion(i,new WebGLPlot.HeadingPitchRoll(WebGLPlot.CesiumMath.toRadians(e.radians),WebGLPlot.CesiumMath.toRadians(90),0)),r=t.entities.add({position:i,box:{dimensions:new WebGLPlot.Cartesian3(e.width,e.height,.5),material:new WebGLPlot.Color(1,0,0,.5)},orientation:n,show:!1});return r.show=!0,r}function _0xe1b5fe(e,t){isNaN(e.lon)||isNaN(e.lat)||isNaN(e.height)?console.warn("flyToMap:option is not correct"):e.heading?t.camera.flyTo({destination:WebGLPlot.Cartesian3.fromDegrees(e.lon,e.lat,e.height),orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},aim:!0}):t.camera.flyTo({destination:WebGLPlot.Cartesian3.fromDegrees(e.lon,e.lat,e.height),aim:!0})}_0x38f70b(),_0x234d8c.prototype.createDoors=function(e){if(-1===this.doorExcID){for(let t=0;t<e.length;t++){let i=e[t];this.doorEntitise.push(_0x492774(i,this.viewer))}this._doorClickEvent.raiseEvent(e)}},_0x234d8c.prototype.removeDoors=function(){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1),this.doorEntitise&&this.doorEntitise.length>0&&(this.doorEntitise.map((e=>{this.viewer.entities.remove(e)})),this.doorEntitise=[])},_0x234d8c.prototype.blinkDoor=function(e){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1);var t=this.doorEntitise[e];this.doorExcID=window.setInterval(function(){t.show=!t.show}.bind(this),500)},_0x234d8c.prototype.blinkDoors=function(e){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1);for(var t=[],i=0;i<e.length;i++)t.push(this.doorEntitise[e[i]]);this.doorExcID=window.setInterval(function(){t.map((e=>{e.show=!e.show}))}.bind(this),500)},_0x234d8c.prototype.blinkAllDoors=function(){if(-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1),!this.doorEntitise||this.doorEntitise.length<=0)return;let e=this;this.doorExcID=window.setInterval(function(){e.doorEntitise.map((e=>{e.show=!e.show}))}.bind(this),500)},_0x234d8c.prototype.flytoLocation=function(e){_0xe1b5fe(e,this.viewer)},Object.defineProperties(_0x234d8c.prototype,{doorClickEvent:{get:function(){return this._doorClickEvent}}});const _0x27d59f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1f8f62=_0x27d59f(void 0,(function(){return _0x1f8f62.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f8f62).search("(((.+)+)+)+$")}));_0x1f8f62();class _0x35248f{constructor(){}createXMLflyLine(e){let t=new DOMParser;window.parser=t;let i=t.parseFromString("<cusxmlRoute></cusxmlRoute>","text/xml");window.xmlDoc=i;let n=this.createSceneRouteNode(i),r=this.createRouteNode(i,e),o=this.createRouteStyleNode(i);r.appendChild(o);let a=this,s=e.routeStops;if(!(s.length<2)){for(let e=0;e<s.length;e++){let t=s[e],n={longitude:t.point[0],latitude:t.point[1],altitude:t.point[2],heading:t.heading*(180/Math.PI),tilt:t.tilt*(180/Math.PI)+90},o=a.createStopNode(i,n,t,e);r.appendChild(o)}return n.appendChild(r),i.children[0].appendChild(n),i.children[0].innerHTML}}createXMLflyLines(e){let t=new DOMParser;window.parser=t;let i=t.parseFromString("<cusxmlRoute></cusxmlRoute>","text/xml");window.xmlDoc=i;let n=this.createSceneRouteNode(i);for(let t=0;t<e.length;t++){var r=e[t];let o=this.createRouteNode(i,r),a=this.createRouteStyleNode(i);o.appendChild(a);let s=this,l=r.routeStops;if(l.length<2)return void console.warn("节点数小于2");for(let e=0;e<l.length;e++){let t=l[e],n={longitude:t.point[0],latitude:t.point[1],altitude:t.point[2],heading:t.heading*(180/Math.PI),tilt:t.tilt*(180/Math.PI)+90},r=s.createStopNode(i,n,t,e);o.appendChild(r)}n.appendChild(o)}return i.children[0].appendChild(n),i.children[0].innerHTML}createSceneRouteNode(e){let t=e.createElement("SceneRoute");return t.setAttribute("xmlns","http://www.supermap.com"),t}createRouteNode(e,t){let i=e.createElement("route"),n={name:t.routeName||"飞行路线",speed:t.speed||"200",lineType:"0",showroutestop:"False",showrouteline:"False",altitudefree:"False",headingfree:"False",tiltfree:"False",flycircle:"False",alongline:t.isAlongLine||"False"};for(const e in n)i.setAttribute(e,n[e]);return i}createRouteStyleNode(e){let t=e.createElement("style"),i=e.createElement("geostyle3d"),n=e.createElement("linecolor");n.textContent="RGBA(147,112,219,255)";let r=e.createElement("linewidth");r.textContent=2;let o=e.createElement("altitudeMode");o.textContent="Absolute";let a=e.createElement("bottomAltitude");return a.textContent=0,i.appendChild(n),i.appendChild(r),i.appendChild(o),i.appendChild(a),t.appendChild(i),t}createStopNode(e,t,i,n){let r=e.createElement("routestop"),o={name:i.stopName||"Stop"+(n+1),speed:i.speed,excluded:"False",viewType:"camera"};for(const e in o)r.setAttribute(e,o[e]);let a=this.createStopCameraNode(e,t);r.appendChild(a);let s=this.createStopStyleNode(e,i);r.appendChild(s);let l=this.createStopSettingNode(e,i);return r.appendChild(l),r}createStopCameraNode(e,t){let i=e.createElement("camera");for(const n in t){let r=e.createElement(n);r.textContent=t[n],i.appendChild(r)}return i}createStopStyleNode(e,t){let i={icon:t.img,markersize:4.8,markericonscale:1,markercolor:"RGBA(255, 255, 255, 255)"},n=e.createElement("style"),r=e.createElement("geostyle3d");for(const t in i){let n=e.createElement(t);n.textContent=i[t],r.appendChild(n)}return n.appendChild(r),n}createStopSettingNode(e,t){let i=e.createElement("setting"),n={turnTime:t.surroundDuration||1.5,turnSlowly:"False",stopPlayMode:t.stopPlayMode||"StopPause",autoPlay:"False",pauseTime:t.waitTime||0,angularSpeed:1};for(const t in n){let r=e.createElement(t);r.textContent=n[t],i.appendChild(r)}return i}}const _0xc60def=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x242096=_0xc60def(void 0,(function(){return _0x242096.toString().search("(((.+)+)+)+$").toString().constructor(_0x242096).search("(((.+)+)+)+$")}));_0x242096();class _0x27821a{constructor(e){this.viewer=e,this.flyManager,this.routeCollection,this.reader=new FileReader,this.createXml,this.flyLineXmls=new _0x2a4279,this.routesDictionary=new _0x2a4279,this.routes=[],this.duration=5,this.showRoute=!1,this.showStop=!1,this.setStopSpeed=0,this.stopPlayMode="StopPause",this.waitTime=.001,this.surroundDuration=1,this.isAlongline=!1,this.routeSpeed=0,this.initFlyManager()}initFlyManager(){this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.flyManager=new Cesium.FlyManager({scene:this.viewer.scene,routes:this.routeCollection}),this.createXml=new _0x35248f}addStop(e){this.route=this.routesDictionary.find(e);let t=this.route.routeStops,i=this.viewer.camera.position,n=this.CartesiantoDegrees(i);var r=0;if(t.length>0){let e=t[t.length-1],i=e.point,o=Cesium.Cartesian3.fromDegrees(i[0],i[1],i[2]),a=Cesium.Cartesian3.fromDegrees(n[0],n[1],n[2]);r=Cesium.Cartesian3.distance(o,a)/this.duration,e.speed=r}let o=t.length,a="视点"+(Number(o)+1),s={uuid:Math.random().toString(15).slice(2,15),stopName:a,point:n,heading:this.viewer.camera.heading,tilt:this.viewer.camera.pitch,speed:r,stopPlayMode:this.stopPlayMode,surroundDuration:this.surroundDuration,waitTime:this.waitTime,duration:this.duration};t.push(s),this.loadRoute(e)}changeStop(e,t){this.flyManager&&this.flyManager.stop();let i=e.routename;this.route=this.routesDictionary.find(i);let n=this.route.routeStops,r=this.viewer.camera.position,o=this.CartesiantoDegrees(r),a=null,s=null,l=null;for(let t=0;t<n.length;t++){let i=n[t];if(t>0&&(s=n[t-1]),n.length!==t+1&&(l=n[t+1]),i.uuid===e.stop.uuid){a=i;break}}let u=a.speed;if(t.position&&null!==l){let e=l.point,i=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]),n=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),r=Cesium.Cartesian3.distance(i,n);u=t.duration?r/t.duration:r/a.duration}else if(t.position&&null!==s&&null===l){let e=s.point,t=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]),i=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),n=Cesium.Cartesian3.distance(t,i);s.speed=n/s.duration}else if(!t.position&&t.duration&&null!==l){o=a.point;let e=l.point,i=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]),n=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),r=Cesium.Cartesian3.distance(i,n);t.duration&&(u=r/t.duration)}var c=null,h=null,d=null;t.position?(c=this.viewer.camera.heading,h=this.viewer.camera.pitch):(c=a.heading,h=a.tilt,o=a.point,d=t.duration?parseInt(t.duration):a.duration);let f={uuid:e.stop.uuid,stopName:t.name||e.stop.stopName,point:o,heading:c,tilt:h,speed:u,stopPlayMode:this.stopPlayMode,surroundDuration:this.surroundDuration,waitTime:this.waitTime,duration:d||this.duration};for(let t=0;t<n.length;t++)if(n[t].uuid===e.stop.uuid){n[t]=f;break}this.loadRoute(i)}locateStop(e,t){this.flyManager&&this.flyManager.stop(),this.route=this.routesDictionary.find(e);let i=this.route.routeStops;for(let e=0;e<i.length;e++){let n=i[e];if(n.stopName===t){this.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(n.point[0],n.point[1],n.point[2]),orientation:{heading:n.heading,pitch:n.tilt,roll:0},duration:1});break}}}deleteStop(e,t){this.flyManager&&this.flyManager.stop(),this.route=this.routesDictionary.find(e);let i=this.route.routeStops;for(let e=0;e<i.length;e++)if(i[e].stopName===t){i.splice(e,1);break}this.loadRoute(e)}createImage(){return this.viewer.render(),this.viewer.scene.canvas.toDataURL("image/png").replace("image/png","image/octet-stream")}addRoute(){let e={routeName:"飞行路线"+(this.routes.length+1),speed:this.routeSpeed,isAlongLine:"False",routeStops:[],showLine:!1};this.routesDictionary.add(e.routeName,e),this.routes.push(e)}changeRoute(e,t){this.flyManager&&this.flyManager.stop();let i=e.name;this.route=this.routesDictionary.find(i),this.route.routeName=t.name;let n=this.createXml.createXMLflyLine(this.route);this.routesDictionary.remove(i),this.routesDictionary.add(t.name,this.route),n&&(this.flyLineXmls.remove(i),this.flyLineXmls.add(t.name,n))}deleteRoute(e){if(this.flyManager&&this.flyManager.stop(),!(this.flyLineXmls.length<1)){this.flyLineXmls.remove(e);var t=this.routesDictionary.find(e);this.routes.splice(this.routes.indexOf(t),1),this.routesDictionary.remove(e)}}showCurRoute(e,t){let i=this.flyLineXmls.find(e),n=this.flyManager.currentRoute;if(this.route=this.routesDictionary.find(e),n.routeName===e)n.isLineVisible=t,n.isStopVisible=t,this.route.showLine=t;else{n&&n.clear(),this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.routeCollection.fromXML(i),this.flyManager.routes=this.routeCollection,this.route.showLine=!0;for(let t=0;t<this.flyManager.routes._routes.length;t++){let i=this.flyManager.routes._routes[t];i.routeName===e&&(i.isLineVisible=!0,i.isStopVisible=!0)}}}loadRoute(e){var t=this.routesDictionary.find(e);if(t.routeStops.length<2)return;let i=this.createXml.createXMLflyLine(t);if(!i||(this.flyLineXmls.add(e,i),!e))return;let n=this.flyManager.currentRoute;n&&n.clear(),this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.routeCollection.fromXML(i),this.flyManager.routes=this.routeCollection}readyPromise(){this.routesDictionary.clear(),this.flyLineXmls.clear(),this.routes=[],this.routeCollection.readyPromise.then((()=>{this.flyManager.routes=this.routeCollection;for(let e=0;e<this.routeCollection._routes.length;e++){let t=this.routeCollection._routes[e],i={routeName:t._routeName,speed:t._speed,isAlongLine:t._isAlongline,routeStops:[]};for(let e=0;e<t._stopCollection.length;e++){let n=t._stopCollection.get(e),r=n._point,o=this.CartesiantoDegrees(r),a=n._duration;(e===t._stopCollection.length-1||200===n._speed&&10===n._duration)&&(a=5);let s=n._waitTime;0===s&&(s=.001);let l={uuid:Math.random().toString(15).slice(2,15),stopName:n._stopName,point:o,heading:n._heading,tilt:n._tilt,speed:n._speed,stopPlayMode:n._stopPlayMode,surroundDuration:n._surroundDuration,waitTime:s,duration:a};i.routeStops.push(l)}this.routesDictionary.add(i.routeName,i),this.routes.push(i);let n=this.createXml.createXMLflyLine(i);if(!n)return;this.flyLineXmls.add(i.routeName,n)}}))}download(e){let t=this.flyLineXmls.find(e);if(!t)return;let i=new Blob([t]),n=document.createElement("a");n.download="view-flight-route.fpf",n.href=URL.createObjectURL(i),n.click()}downloadAll(){if(this.flyLineXmls.count()<1)return;let e=this.createXml.createXMLflyLines(this.routes);if(!e)return;let t=new Blob(["\ufeff",e],{type:"text/plain"}),i=document.createElement("a");i.download="view-flight-route.fpf",i.href=URL.createObjectURL(t),i.click()}uploading(e){this.flyManager.stop();let t=this.flyManager.currentRoute;t&&t.clear(),this.routeCollection=new Cesium.RouteCollection(viewer.entities),e&&(this.reader.onload=e=>{let t=e.target.result;this.routeCollection.fromXML(t),this.readyPromise()},this.reader.readAsText(e,"UTF-8"))}play(e){let t=this.flyLineXmls.find(e),i=this.flyManager.currentRoute;i&&i.clear(),this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.routeCollection.fromXML(t),this.flyManager.routes=this.routeCollection,this.flyManager.readyPromise.then((()=>{this.flyManager.play()}))}pause(){this.flyManager&&this.flyManager.pause()}stop(){this.flyManager&&this.flyManager.stop()}CartesiantoDegrees(e){let t=[].concat(e),i=[];for(let e=0,n=t.length;e<n;e++){let n=Cesium.Cartographic.fromCartesian(t[e]),r=Cesium.Math.toDegrees(n.longitude),o=Cesium.Math.toDegrees(n.latitude),a=n.height;-1==i.indexOf(r)&&-1==i.indexOf(o)&&(i.push(r),i.push(o),i.push(a))}return i}}var _0x2b3b1b=(_0x543c33=!0,function(e,t){var i=_0x543c33?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x543c33=!1,i}),_0x3cf19b=_0x2b3b1b(void 0,(function(){return _0x3cf19b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3cf19b).search("(((.+)+)+)+$")})),_0x543c33;_0x3cf19b();class _0x1df87e{constructor(e){this.name=WebGLPlot.defaultValue(e.name,""),this.key=WebGLPlot.defaultValue(e.key,""),this.second=WebGLPlot.defaultValue(e.second,""),e.position&&e.position.heading&&(this.heading=e.position.heading,this.pitch=e.position.pitch,this.roll=e.position.roll,this.lng=e.position.point.lng,this.lat=e.position.point.lat,this.alt=e.position.point.alt)}}var _0x39b66f=(_0x14cb7a=!0,function(e,t){var i=_0x14cb7a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x14cb7a=!1,i}),_0x522a0b=_0x39b66f(void 0,(function(){return _0x522a0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x522a0b).search("(((.+)+)+)+$")})),_0x14cb7a;function _0x4b85fa(e){this.viewer=e}_0x522a0b(),_0x4b85fa.prototype.addCamera=function(e,t){if(!this.viewer)return;let i=this.viewer.scene.camera,n=i.positionCartographic,r={point:{lng:Cesium.Math.toDegrees(n.longitude),lat:Cesium.Math.toDegrees(n.latitude),alt:n.height},heading:i.heading,pitch:i.pitch,roll:i.roll},o=t.root.uuid,a=this.groupDic.find(o),s=a.stops.count(),l=e+(Number(s)+1);o=Math.random().toString(15).slice(2,15),this.quickPosPara=new positionPara({name:l,position:r}),a.stops.add(o,this.quickPosPara)},_0x4b85fa.prototype.addRoute=function(e){if(!this.viewer)return;let t=Math.random().toString(15).slice(2,15),i={groupName:e+(this.groupDic.count()+1),uuid:t,stops:new _0x2a4279};this.quickGroupPara=i,this.groupDic.add(t,i)},_0x4b85fa.prototype.inputRoute=function(){for(var e in this.keyboards=[],this.groupJson=[],this.groupDic.dataStorege){var t=this.groupDic.find(e),i=[];for(var n in t.stops.dataStorege){var r=t.stops.find(n);i.push({uuid:n,stop:r}),this.keyboards.push(r)}this.groupJson.push({groupName:t.groupName,uuid:e,stops:i})}return this.groupJson},_0x4b85fa.prototype.locateCamera=function(e){let t=e.heading,i=e.pitch,n=e.roll,r=e.lng,o=e.lat,a=e.alt;this.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(r,o,a),orientation:{heading:t,pitch:i,roll:n}})};var _0x2edaae=(_0x2fdac0=!0,function(e,t){var i=_0x2fdac0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2fdac0=!1,i}),_0x3cce5a=_0x2edaae(void 0,(function(){return _0x3cce5a.toString().search("(((.+)+)+)+$").toString().constructor(_0x3cce5a).search("(((.+)+)+)+$")})),_0x2fdac0;_0x3cce5a();var _0x5aa1b7={on:function(e,t,i){if("object"==typeof e)for(var n in e)this._on(n,e[n],t);else for(var r=0,o=(e=splitWords(e)).length;r<o;r++)this._on(e[r],t,i);return this},off:function(e,t,i){if(e)if("object"==typeof e)for(var n in e)this._off(n,e[n],t);else for(var r=0,o=(e=splitWords(e)).length;r<o;r++)this._off(e[r],t,i);else delete this._events;return this},_on:function(e,t,i){this._events=this._events||{};var n=this._events[e];n||(n=[],this._events[e]=n),i===this&&(i=void 0);for(var r={fn:t,ctx:i},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===t&&o[a].ctx===i)return;o.push(r)},_off:function(e,t,i){var n,r,o;if(this._events&&(n=this._events[e])){if(!t){for(r=0,o=n.length;r<o;r++)n[r].fn=falseFn;return void delete this._events[e]}if(i===this&&(i=void 0),n)for(r=0,o=n.length;r<o;r++){var a=n[r];if(a.ctx===i&&a.fn===t)return a.fn=falseFn,this._firingCount&&(this._events[e]=n=n.slice()),void n.splice(r,1)}}},fire:function(e,t,i){if(!this.listens(e,i))return this;var n=extend({},t,{type:e,target:this});if(this._events){var r=this._events[e];if(r){this._firingCount=this._firingCount+1||1;for(var o=0,a=r.length;o<a;o++){var s=r[o];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(e,t){var i=this._events&&this._events[e];if(i&&i.length)return!0;if(t)for(var n in this._eventParents)if(this._eventParents[n].listens(e,t))return!0;return!1},once:function(e,t,i){if("object"==typeof e){for(var n in e)this.once(n,e[n],t);return this}var r=bind((function(){this.off(e,t,i).off(e,r,i)}),this);return this.on(e,t,i).on(e,r,i)},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[stamp(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[stamp(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,extend({layer:e.target},e),!0)}};function d(e,t,i){try{return e(t,i)}catch(e){return o$1l.reject(e)}}function l(e){var t;return function(i){var n=i.data,r=[],o={id:n.id,result:void 0,error:void 0};return o$1l(d(e,n.parameters,r)).then((function(e){o.result=e})).otherwise((function(e){e instanceof Error?o.error={name:e.name,message:e.message,stack:e.stack}:o.error=e})).always((function(){e$2b(t)||(t=u$_(self.webkitPostMessage,self.postMessage)),n.canTransferArrayBuffer||(r.length=0);try{t(o,r)}catch(e){o.result=void 0,o.error="postMessage failed with error: "+f$R(e)+"\n with responseMessage: "+JSON.stringify(o),t(o)}}))}}var VERSION="11i(2023)",SuperMapVersion="svnversion";export{_0xdbdb64 as AbstractMesh,_0x3eee05 as AlgoInclude,_0x4381c6 as AlgoSymbol,_0x5f0e97 as AlphaMode,_0x9a5fe0 as AnalysisTool,_0x142894 as Animation,y$4 as Animation2,_0x19c7e4 as AnimationBlink,_0x426167 as AnimationBrokenLine,_0x2c9321 as AnimationCurve,_0x178a11 as AnimationFollowType,_0x27e0a8 as AnimationGrow,_0x4c816f as AnimationHide,_0x448584 as AnimationMoveIn,_0x365699 as AnimationMoveOut,_0x28a0bd as AnimationPlayType,_0xa4850 as AnimationReduce,_0x33f59e as AnimationShow,m$5 as AnimationViewModel,_0x4f5528 as AnimationWay,_0x440bb3 as AnimationZoomIn,_0x443e7e as AnimationZoomOut,a$S as Appearance,e$1E as ApproximateTerrainHeights,_$E as ArcGISTiledElevationTerrainProvider,m$L as ArcGisGeographicTilingScheme,b$p as ArcGisMapServerImageryProvider,m$1f as ArcType,_0x412cba as ArrowCommunicationLink,e$1N as AssociativeArray,t$10 as AttributeCompression,Q$y as AttributeType,a$h as AutoExposure,zr as Autolinker,l$19 as AutomaticUniforms,v$y as Axis,e$26 as AxisAlignedBoundingBox,_0x3cd63d as BIMInfoClickQueryHandler,g$3 as BaseLayerPicker,V as BaseLayerPickerViewModel,_0x36dee7 as BaseParticleSystem,_0xc54aac as BasicLineCommunicationLink,h$W as BatchTable,n$p as Batched3DModel3DTileContent,n$I as Billboard,_0x5b6bf2 as BillboardAxialVp,w$N as BillboardCollection,n$T as BillboardGraphics,yr$1 as BillboardMode,_0x539845 as BillboardPixelSizeWithAngleVp,g$I as BillboardVisualizer,e$11 as BingMapsApi,o$L as BingMapsGeocoderService,o$p as BingMapsImageryProvider,I$k as BingMapsStyle,b$19 as BlendEquation,l$14 as BlendFunction,S$J as BlendOption,Ee$r as BlendingState,_0x448062 as BlinkAnimationBlinkStyle,_0x41970a as BlinkAnimationReplaceStyle,r$Q as BlockCacheList,e$1b as BlockCacheNode,_0x3dc8e2 as BloodPosition,_0xb27609 as BloodVolume,e$f as BloomEffect,t$9 as BoundingBoxRenderer,f$18 as BoundingRectangle,i$1c as BoundingSphere,R$w as BoundingSphereState,_0x25f55d as Bounds,d$s as BoundsOctree,S$l as BoxEditor,a$j as BoxEmitter,O$y as BoxGeometry,i$E as BoxGeometryUpdater,n$S as BoxGraphics,o$17 as BoxOutlineGeometry,_0x419949 as BoxParticleEmitter,t$d as BrdfLutGenerator,t$Y as Buffer,h$11 as BufferGL,r$12 as BufferGPU,f$Z as BufferIDRecorder,_0x408f08 as BufferManager,A$19 as BufferUsage,_0x14bd2c as BuildContourAnalyst,_0x234d8c as BuildingDoors,BurstPipelineAnalystService,D$h as CGCS2000MapServerImageryProvider,n$V as CallbackProperty,v$K as Camera,l$l as CameraEventAggregator,Q$c as CameraEventType,mr$4 as CameraFlightPath,_0x539867 as CameraMoveHandler,o$1o as Cartesian2,o$1p as Cartesian3,e$29 as Cartesian4,a$18 as Cartographic,N$B as CartographicGeocoderService,_0x5a8f1b as CaseTable,_0x576c2d as CategoryVisibleMode,z$n as Catenaryline,c$K as CatmullRomSpline,c$r as Cesium3DTile,h$D as Cesium3DTileBatchTable,L$I as Cesium3DTileColorBlendMode,r$n as Cesium3DTileContent,i$y as Cesium3DTileContentFactory,X$o as Cesium3DTileContentState,e$L as Cesium3DTileFeature,o$B as Cesium3DTileFeatureTable,s$q as Cesium3DTileOptimizationHint,I$E as Cesium3DTileOptimizations,ue$d as Cesium3DTilePass,a$g as Cesium3DTilePassState,i$z as Cesium3DTilePointFeature,f$D as Cesium3DTileRefine,d$n as Cesium3DTileStyle,e$1r as Cesium3DTileStyleEngine,y$1 as Cesium3DTilesInspector,l$6 as Cesium3DTilesInspectorViewModel,p$u as Cesium3DTileset,h$j as Cesium3DTilesetAsyncTraversal,e$B as Cesium3DTilesetCache,i$R as Cesium3DTilesetGraphics,a$s as Cesium3DTilesetHeatmap,f$C as Cesium3DTilesetMostDetailedTraversal,r$x as Cesium3DTilesetStatistics,W$x as Cesium3DTilesetTraversal,l$E as Cesium3DTilesetVisualizer,g$1 as CesiumInspector,m$3 as CesiumInspectorViewModel,o$1q as Check,r$w as CheckerboardMaterialProperty,u$l as CircleEmitter,n$A as CircleGeometry,a$H as CircleOutlineGeometry,t$h as ClampFramebuffer,l$p as ClampMode,_0x18ea93 as Class,A$C as ClassificationModel,x$$ as ClassificationPrimitive,_0x3b5200 as ClassificationType,t$X as ClearCommand,_0xeb17d7 as ClipBuild,_0x2742bb as ClipPlaneDepthFp,_0x5a01b0 as ClipPlaneFp,_0xff9e19 as ClipPlaneMode,R$K as ClipPlaneVp,a$I as ClippingPlane,h$K as ClippingPlaneCollection,R$J as ClippingType,u$I as Clock,tt$9 as ClockRange,g$Q as ClockStep,r$a as ClockViewModel,a$i as ClosedDepthFramebuffer,t$c as CloudBox,Collection$1 as Collection,e$1U as Color,_0x48c0c2 as Color3Gradient,I$J as ColorBlendMode,o$n as ColorCorrection,o$16 as ColorGeometryInstanceAttribute,_0x43ab59 as ColorGradient,t$Q as ColorMaterialProperty,i$S as ColorTable,_0x40204d as ColorTransferFunction,t$3 as Command,_0x26c9cf as CommonBillboardVp,Ht$7 as CommonNoLigthNoTextureVp,CommonNoLigthOneTextureVp,_0x1b19d0 as CommonNoTextureFS,Yt$8 as CommonNoTextureFp,_0x49106d as CommonNoTextureVS,CommonOneTextureFp,_0xd9c3dd as CommonServiceBase,_0x4a6d61 as CommonUtil,_0x1eb387 as CommunicationLinkBase,_0x4fea45 as CommunicationLinkType,S$12 as ComponentDatatype,i$B as Composite3DTileContent,s$p as CompositeEntityCollection,e$z as CompositeMaterialProperty,t$q as CompositePositionProperty,e$A as CompositeProperty,o$l as Compositor,e$1H as CompressedTextureBuffer,t$I as ComputeCommand,f$n as ComputeEngine,r$8 as ComputePipeline,ComputeWeightMatrixParameters,ComputeWeightMatrixService,u$h as ConditionsExpression,n$j as ConeEmitter,_0xf9ea81 as ConeParticleEmitter,_0x51fe51 as ConfigData,_0x290856 as ConfigManager,r$U as ConstantPositionProperty,e$1I as ConstantProperty,i$i as Context,g$a as ContextGL,e$1T as ContextLimits,De$h as ContextType,f$8 as ContextWebGPU,_0x1f291c as ContourAnalyst,vi$1 as ControlMode,P$H as CoplanarPolygonGeometry,g$P as CoplanarPolygonGeometryLibrary,a$G as CoplanarPolygonOutlineGeometry,ar$5 as CornerType,P$F as CorridorGeometry,b$S as CorridorGeometryLibrary,f$y as CorridorGeometryUpdater,n$R as CorridorGraphics,V$w as CorridorOutlineGeometry,a$O as Credential,E$X as CredentialType,r$T as Credit,r$l as CreditDisplay,_0x1f7045 as CtrlPosition,_0x1e0288 as CtrlPositionType,e$1M as CubeMap,c$$ as CubeMapFace,X$Y as CubeMapGL,y$T as CubeMapGPU,j$1g as CubicRealPolynomial,G$17 as CullFace,i$W as CullingVolume,Curve,n$o as CustomDataSource,m$r as CustomGeometryUpdater,_0x4ba997 as CustomParticleEmitter,p$L as CustomProjection,_0x732f89 as CylinderDirectedParticleEmitter,l$Q as CylinderGeometry,I$R as CylinderGeometryLibrary,s$n as CylinderGeometryUpdater,n$Q as CylinderGraphics,d$Z as CylinderOutlineGeometry,_0x17a06c as CylinderParticleEmitter,E$v as CzmlDataSource,_0x2dc616 as DDSTexture,o$$ as DDSTextureGL,o$_ as DDSTextureGPU,Se$d as DDSTextureManager,L$U as DXTTextureDecode,r$k as DamBreakAnalysis,_0x5df5f1 as DashLineCommunicationLink,d$15 as DataFileType,o$A as DataSource,e$y as DataSourceClock,i$t as DataSourceCollection,u$p as DataSourceDisplay,i$h as DebugAppearance,p$U as DebugCameraPrimitive,_0x41e390 as DebugCommand,s$d as DebugModelMatrixPrimitive,_0x39c042 as DeductionScript,_0x397ab1 as DeductionScriptActionBasicParm,_0x5d6f1b as DeductionScriptActionEffect,_0x3e4e1c as DeductionScriptActionMove,_0x75e70a as DeductionScriptActionRotation,_0x3f6390 as DeductionScriptActionScale,_0x101f8e as DeductionScriptCalc,_0x8bca35 as DeductionScriptExecute,_0x47d1ee as DeductionScriptExecuteCalc,_0x130d03 as DeductionScriptExecuteGroup,_0x5ba8bb as DeductionScriptExecuteManager,_0x1d0519 as DeductionScriptExecuteResetType,_0x100aa6 as DeductionScriptExecuteState,_0x14792f as DeductionScriptExtend,_0x386efd as DeductionScriptGroup,_0x2962c5 as DeductionScriptManager,o$K as DefaultProxy,_0x1d0b9d as DefaultStyle,s$T as DepthFramebuffer,re$E as DepthFunction,DepthMapAnalysisVp,n$g as DepthOfFieldEffect,c$c as DepthPlane,l$i as DerivedCommand,t$16 as DeveloperError,h$g as DeviceOrientationCameraController,_0x2a4279 as Dictionary,c$h as DirectionalLight,r$j as DiscardColorTileImagePolicy,A$l as DiscardEmptyTileImagePolicy,u$i as DiscardMissingTileImagePolicy,r$Y as DistanceDisplayCondition,t$B as DistanceDisplayConditionGeometryInstanceAttribute,_0x4e5d29 as DotMode,_0x24b262 as DotPlotStyle,h$P as DoublyLinkedList,r$A as DracoLoader,i$_ as DrawCommand,_0x195cd9 as DrawCubeHandler,w$m as DrawHandler,_0x20cc4b as DrawMode,_0x434208 as DrawRectHandler,_0x413c78 as DxtTexture,_0x728fb1 as DynamicExtendRegionFp,_0x35073f as DynamicExtendRegionVp,r$s as DynamicGeometryBatch,a$C as DynamicGeometryUpdater,_0x75f8b5 as DynamicLayer3D,_0x46b7bc as DynamicLayerVertex,_0x4c5a2b as DynamicObjectScane,_0x2b82d9 as DynamicObjectState,x$1h as EarthOrientationParameters,n$1a as EarthOrientationParametersSample,m$W as EasingFunction,_0x461802 as EdgePreprocessing,_$l as EditHandler,_0x4b4567 as EditSmlFileParameters,_0x13c545 as EditSmlFileService,_0x256ea7 as EfficiencyManager,Y$y as EllipseGeometry,C$J as EllipseGeometryLibrary,u$t as EllipseGeometryUpdater,n$P as EllipseGraphics,M$L as EllipseOutlineGeometry,t$13 as Ellipsoid,E$1s as EllipsoidGeodesic,b$P as EllipsoidGeometry,l$z as EllipsoidGeometryUpdater,e$1n as EllipsoidGraphics,x$13 as EllipsoidOutlineGeometry,p$c as EllipsoidPrimitive,P$16 as EllipsoidRhumbLine,t$i as EllipsoidSurfaceAppearance,f$14 as EllipsoidTangentPlane,t$A as EllipsoidTerrainProvider,s$G as EllipsoidalOccluder,t$k as EmissionMaterialProperty,_0x3ba5f2 as EmissionTextureUnit,t$s as Empty3DTileContent,i$11 as EncodedCartesian3,h$V as Entity,a$r as EntityCluster,r$v as EntityCollection,V$i as EntityView,R$$ as EnumConvertor,o$1h as Event,n$x as EventHelper,_0x59a8a5 as Evented,_0x5aa1b7 as Events,Ta$3 as ExcavationBottomFS,xa$3 as ExcavationBottomVS,$$N as ExcavationFS,b$W as ExcavationSources,Z$J as ExcavationVS,L$E as Expression,s$u as ExpressionNodeType,_0x14b23e as ExtendProperty,_0x346789 as ExtrapolationType,k$I as FXAA3_11,C$l as Facade,_0x531671 as FacilityAnalyst3DParameters,FacilityAnalystStreamParameters,FacilityAnalystStreamService,_0x573b05 as FacilityAnalystTracedown3DParameters,_0x11783d as FacilityAnalystTracedown3DService,_0x205ec0 as FacilityAnalystTraceup3DParameters,_0x3e2490 as FacilityAnalystTraceup3DService,_0x28226b as FactorGradient,Feature,s$Y as FeatureDetection,_0x3913cb as FeatureService,i$g as FieldLayer3D,_0x83f1a2 as FillGradientMode,fr$2 as FillStyle,_0x1b5b86 as FilterParameter,FindClosestFacilitiesService,FindLocationParameters,FindLocationService,FindMTSPPathsParameters,FindMTSPPathsService,FindPathParameters,FindPathService,FindServiceAreasParameters,FindServiceAreasService,FindTSPPathsParameters,FindTSPPathsService,f$X as FlattenRegion,I$d as FloodAnalysis3D,j$13 as FlyInterpolationMode,l$r as FlyManager,v$p as FlyTurningMode,g$i as Fog,e$K as ForEach,_0x398ff2 as Format,_0x205de2 as Forward3D,Qe$c as FrameBufferType,i$f as FrameRateMonitor,h$f as FrameState,t$W as Framebuffer,a$W as FramebufferGL,r$11 as FramebufferGPU,s$g as FramebufferManager,_0xace9b2 as FresnelFp,_0x3b10bb as FresnelVp,i$e as FrustumCommands,z$T as FrustumGeometry,s$N as FrustumOutlineGeometry,l$1f as Fullscreen,r$5 as FullscreenButton,r$6 as FullscreenButtonViewModel,_0x1d93f7 as FunctionExt,_0x2688ba as GOAnimation,_0x45edd9 as GOAnimationAttribute,_0x306baa as GOAnimationBlink,_0x4a4ca0 as GOAnimationGrow,_0x1713d3 as GOAnimationManager,GOAnimationManagerBase,_0x1b6a94 as GOAnimationRotate,_0x1c88c7 as GOAnimationScale,_0x43b269 as GOAnimationShow,_0x5140b5 as GOAnimationState,_0x304306 as GOAnimationType,_0x381298 as GOAnimationWay,_0x1c2b25 as GOAnimationWay_ModelGroup,i$q as GeoBillboard,i$p as GeoBox,i$o as GeoCircle3D,r$q as GeoCone,i$n as GeoCylinder,i$m as GeoEllipsoid,_0x5589fe as GeoEntity,_0x78fecc as GeoEntityBasicParameter,_0x46eece as GeoEntityEffect,_0x367e91 as GeoEntityEffectAnnularDiffusion,_0x2c1685 as GeoEntityEffectAttackline,_0x457e81 as GeoEntityEffectAugment,_0x318fc4 as GeoEntityEffectBurst,_0x1232ba as GeoEntityEffectDetecttoncone,_0x4d608c as GeoEntityEffectDynamic,_0xfa8fd4 as GeoEntityEffectExtend,_0x5ed02a as GeoEntityEffectExtendFactory,_0x302fab as GeoEntityEffectFiresmoke,_0x28004f as GeoEntityEffectMechanicalRadar,_0x25bff7 as GeoEntityEffectParameter,_0x1c4ba4 as GeoEntityEffectParameterRadar,_0x2ed19c as GeoEntityEffectRadarBase,_0x6508a2 as GeoEntityEffectRadarScanBase,_0x2c9b58 as GeoEntityEffectRotateRadar,_0x504843 as GeoEntityEffectScanRadar,_0x3fbded as GeoEntityEffectScanWave,_0x4ca362 as GeoEntityEffectScanWaveColorMode,_0x5433aa as GeoEntityEffectScancone,_0x2bebaf as GeoEntityEffectScanconeType,_0x137383 as GeoEntityEffectSign,_0x1c3666 as GeoEntityEffectSignType,_0x3c13c7 as GeoEntityEffectTailflame,_0x1914c9 as GeoEntityEffectTailgas,_0x3f9f2a as GeoEntityEffectToolkit,_0x31475a as GeoEntityEffectTrackLineType,_0x21af16 as GeoEntityEffectTrackline,_0x3b1c90 as GeoEntityEffectType,_0x4ffa33 as GeoEntityEffectWarningRadar,_0x1fa8f7 as GeoEntityManager,_0x3139ed as GeoEntityMoveCalc,_0x354a71 as GeoEntityMoveParameter,_0x1e39c8 as GeoEntityNode,_0x12cd7b as GeoEntityParamCyclicType,_0x487d97 as GeoEntityParameter,_0x177623 as GeoEntityRotationCalc,_0x537142 as GeoEntityRotationParameter,_0x109a17 as GeoEntityScaleCalc,_0xbe66a7 as GeoEntityScaleParameter,_0x21fac2 as GeoGraphicObject,_0x2004fc as GeoGraphicObjectConvert,_0x1a420a as GeoJSON,y$p as GeoJsonDataSource,p$T as GeoLine3D,t$j as GeoModel3D,e$q as GeoPoint3D,o$t as GeoPolyline,n$E as GeoRegion3D,e$p as GeoSphere,c$G as GeocodeType,s$3 as Geocoder,o$J as GeocoderService,D$2 as GeocoderViewModel,n$1b as GeographicProjection,g$13 as GeographicTilingScheme,I$1p as Geometry,o$11 as Geometry3D,p$w as Geometry3DTileContent,P$U as Geometry3DType,o$1c as GeometryAttribute,a$_ as GeometryAttributes,d$1o as GeometryInstance,o$13 as GeometryInstanceAttribute,_0x58701d as GeometryOffsetAttribute,k$13 as GeometryPipeline,_0x46fa27 as GeometryServer,Me$p as GeometryType,i$F as GeometryUpdater,c$k as GeometryVisualizer,R$h as GetFeatureInfoFormat,_0x24c8e8 as GetFeaturesByBoundsParameters,_0x424915 as GetFeaturesByBoundsService,_0x565d46 as GetFeaturesParametersBase,_0x1e847d as GetFeaturesServiceBase,_0x5ad32f as GetLibIDsService,_0x23d9b2 as GetLibInfoParameter,GetLibInfoService,_0x2bed72 as GetSMLInfosParameters,_0x1e0300 as GetSMLInfosService,_0x570598 as GetSymbolInfoParameters,_0x460259 as GetSymbolInfoService,h$d as Globe,a$a as GlobeDepth,H$j as GlobeSurfaceShaderSet,v$C as GlobeSurfaceTile,A$S as GlobeSurfaceTileProvider,_0x55856b as GlobeTileUBO,i$d as GlobeTranslucency,p$8 as GlobeTranslucencyFramebuffer,F$b as GlobeTranslucencyState,_0x4c199e as GltfSkeleton,_0x5bf1b0 as GltfSkeletonProcessor,h$b as GoogleEarthEnterpriseImageryProvider,n$f as GoogleEarthEnterpriseMapsProvider,c$F as GoogleEarthEnterpriseMetadata,T$G as GoogleEarthEnterpriseTerrainData,_$B as GoogleEarthEnterpriseTerrainProvider,e$V as GoogleEarthEnterpriseTileInformation,_0x326310 as GpuParticleSystem,_0xf6a90a as GradientHelper,d$1r as GregorianDate,n$c as GridImagery,o$g as GridImageryProvider,p$b as GridLayer,t$p as GridMaterialProperty,w$a as GridProvider,_$e as GridState,d$j as GridTileImagery,_0x3a2d15 as GroundEffect,i$x as GroundGeometryUpdater,aa$4 as GroundPolylineGeometry,g$11 as GroundPolylinePrimitive,d$14 as GroundPrimitive,_0x3a6b26 as GroupObject,a$T as HeadingPitchRange,i$15 as HeadingPitchRoll,o$1g as Heap,o$f as HeatMap,k$P as HeightReference,T$L as HeightmapEncoding,T$J as HeightmapTerrainData,m$O as HeightmapTessellator,e$k as HemisphereLight,_0x498a84 as HemisphericParticleEmitter,E$I as HermitePolynomialApproximation,m$M as HermiteSpline,o$3 as HomeButton,r$4 as HomeButtonViewModel,j$T as HorizontalOrigin,T$11 as HypSometric,u$M as HypsometricSetting,k$Q as HypsometricSettingEnum,y$F as Iau2000Orientation,D$15 as Iau2006XysData,a$10 as Iau2006XysSample,h$I as IauOrientationAxes,o$I as IauOrientationParameters,_0x3aace6 as ImageMarchingCubes,a$R as ImageMaterialProperty,o$V as Imagery,h$Q as ImageryLayer,n$b as ImageryLayerCollection,o$q as ImageryLayerFeatureInfo,e$h as ImageryProvider,Xe$b as ImagerySplitDirection,wt$6 as ImageryState,ce$x as IndexDatatype,l$15 as IndexedDBScheduler,l$4 as InfoBox,t$1 as InfoBoxViewModel,o$4 as InspectorShared,_0x588b14 as Instance,_0x377331 as InstanceInfo,_0x2c3aba as InstanceLayer,_0x721735 as InstanceMode,_0x212e1c as InstanceSkeletonManager,_0xbc2054 as InstanceTile,_0x1525ff as InstanceTilesLayerVS,u$z as Instanced3DModel3DTileContent,bt$5 as InstancedType,r$L as InterpolationAlgorithm,_0x186188 as InterpolationType,Ae$u as Intersect,g$1h as IntersectionTests,d$10 as Intersections2D,o$1n as Interval,t$a as InvertClassification,e$Y as Ion,s$C as IonGeocoderService,o$k as IonImageryProvider,n$y as IonResource,n$e as IonWorldImageryStyle,o$H as Iso8601,_0x3ca704 as JSONFormat,o$e as JobScheduler,i$Q as JobType,a$15 as JulianDate,o$U as KTX2Transcoder,Aa$1 as KeyboardEventModifier,o$v as KmlCamera,U$m as KmlDataSource,o$u as KmlLookAt,l$s as KmlTour,a$m as KmlTourFlyTo,i$r as KmlTourWait,D$Q as Label,g$U as LabelCollection,n$O as LabelGraphics,R$Q as LabelStyle,l$w as LabelVisualizer,i$I as LagrangePolynomialApproximation,_0x5781b8 as LatLng,_0x3a5bf8 as LayerDataStruct,d$1h as LayerUboDecl,u$k as Layers,a$16 as LeapSecond,LercDecode,r$g as Light,_0x3cc8e0 as LightCount,Ze$3 as LightGroupType,s$I as LightSource,_0x1d9df9 as LightSourceType,_0x3de36a as LightUBO,K$U as LightUboDecl,_0x218aaa as LimitBody,_0x18d31f as LimitBodyVp,_$L as LineCallOut,X$M as LineCallOutVp,X$V as LineDisplayType,LineString,v$A as LinearApproximation,LinearRing,r$P as LinearSpline,N$P as LoadState,_0x10659f as LoadingPriorityMode,r$R as ManagedArray,Rr$2 as MapMode2D,r$J as MapProjection,e$T as MapboxApi,m$g as MapboxImageryProvider,o$d as MapboxStyleImageryProvider,r$X as Material,t$w as MaterialAppearance,_0x34f811 as MaterialExt,_0x5b0881 as MaterialManager,_0x21d1b1 as MaterialPass,r$C as MaterialProperty,b$1d as MaterialUboDecl,e$2a as Math,f$13 as Matrix2,p$1e as Matrix3,p$1d as Matrix4,T$l as MeasureHandler,_0x91cd7b as MeasureMode,_0xb93137 as Measurement,ti$3 as MemoryManager,_0x40adc0 as MeshParticleEmitter,_0x165ffe as MeshProcessing,u$T as MeshUboDecl,_0x115b1a as MeteorCommunicationLink,I$1e as MipmapHint,_0x203e3b as MixColorType,F$C as Model,a$x as ModelAnimation,S$t as ModelAnimationCache,f$F as ModelAnimationCollection,_0x157d80 as ModelAnimationLoop,E$B as ModelAnimationState,_0x171550 as ModelEdgeFp,_0x5a4442 as ModelEdgeVp,_0x4cf411 as ModelEditControl,u$o as ModelEditor,t$J as ModelGraphics,e$G as ModelInstance,w$u as ModelInstanceCollection,t$u as ModelLoadResources,a$w as ModelMaterial,a$v as ModelMesh,r$z as ModelNode,_0x18cb5a as ModelObject,s$v as ModelUtility,d$z as ModelVisualizer,ModifyRegionBottomFp,ModifyRegionBottomVp,_0x25a093 as ModifyRegionMode,ModifyRegionOuterFS,ModifyRegionOuterVS,ModifyRegionSideFp,ModifyRegionSideVp,Ne$g as ModifyTerrain,_0x1c5342 as Module,n$9 as Moon,MultiLineString,MultiPoint,MultiPolygon,_0x26a0a0 as MultiTemporalFresnelFp,_0x49e50a as MultiViewShed3D,_0xe651ea as MultiViewShedAnalysisFp,B$e as MultiViewportMode,f$m as MultisampleFramebuffer,I$10 as MvtProviderGL,t as Navigation,l$3 as NavigationHelpButton,i$4 as NavigationHelpButtonViewModel,y as NavigationViewModel,o$Y as NearFarScalar,x$b as NetCDFParser,NetworkAnalystService,NetworkAnalystServiceBase,e$7 as NeverTileDiscardPolicy,b$4 as NoSleep,a$N as NodeTransformationProperty,s$h as NormalFramebuffer,C$c as OIT,_0x4580ad as ObjsOperationType,d$U as Occluder,g$9 as OcclusionFp,i$$ as OcclusionMesh,e$1V as OcclusionQueryStastics,A$8 as OcclusionVp,u$B as OctahedralProjectedCubeMap,e$1B as OffsetGeometryInstanceAttribute,s$B as OpenCageGeocoderService,a$9 as OpenStreetMapImageryProvider,r$t as OrderedGroundPrimitiveCollection,y$Z as OrientedBoundingBox,a$V as OrthographicFrustum,l$12 as OrthographicOffCenterFrustum,_0x702fc2 as OverLayerOffsetOptions,_0x7480db as OverLayerPicture,_0x59b619 as OverLayerSolid,_0x4574a2 as OverLayerStyle,_0x4cfa9e as OverLayerSymbol,_0x1aae83 as OverLayerUtilityTools,ie$p as PBRExtensionParamterType,je$g as PBRMaterialType,t$y as Packable,o$F as PackableForInterpolation,X$N as PackingRequest,_0x46a5cb as PagedLOD,_0x15de7e as Particle,a$k as Particle2,_0x29b01c as ParticleBillboardMode,_0x5f5957 as ParticleBlendMode,m$c as ParticleBurst,e$6 as ParticleEmitter,_0x42502 as ParticleHelper,u$b as ParticlePostRenderer,_0x2fb622 as ParticleSystem,g$s as ParticleSystem2,_0x279143 as ParticleSystemSet,v$o as ParticleSystemType,r$f as ParticleTrailsPostRenderer,P$g as ParticleVelocityFieldEffect,Le$s as Pass,n$Z as PassState,n$N as PathGraphics,w$p as PathVisualizer,i$J as PeliasGeocoderService,t$R as PerInstanceColorAppearance,o$c as PerformanceDisplay,i$3 as PerformanceWatchdog,r$2 as PerformanceWatchdogViewModel,o$15 as PerspectiveFrustum,l$11 as PerspectiveOffCenterFrustum,f$d as PickDepth,s$b as PickDepthFramebuffer,f$c as PickFramebuffer,a$7 as PickPointFramebuffer,t$f as PickRectFramebuffer,d$g as Picking,_0x52c5cf as PiecewiseFunction,s$A as PinBuilder,_$$ as PixelDatatype,V$10 as PixelFormat,o$1m as Plane,f$K as PlaneGeometry,p$n as PlaneGeometryUpdater,e$1l as PlaneGraphics,i$H as PlaneOutlineGeometry,_0x3ff6b7 as PlotAnimationLayer,_0x54c5e3 as PlotBounds,_0x5a145c as PlotCesium,_0x3c9c12 as PlotCollentionLayer,_0x38860f as PlotCollentionManager,_0x1393d7 as PlotCommonServiceBase,_0x5ab2f6 as PlotCredential,_0x45019a as PlotCustomRadar,_0x328501 as PlotCustomRadarGeometry,_0x1ff575 as PlotCustomRadarOutlineGeometry,_0x5f15a4 as PlotCylinderGeometry,_0x2d7530 as PlotCylinderGeometryLibrary,_0x1ae927 as PlotDrawControl,_0x5bdde1 as PlotEditControl,_0x4f2fe2 as PlotEvent,_0x47a70a as PlotEventManager,_0x3d7456 as PlotEvents,_0x4c2451 as PlotFetchJsonp,_0x363434 as PlotFetchRequest,_0x4157b2 as PlotGeoEffectBase,_0x4dfaf3 as PlotGroundPrimitive,_0x5291a3 as PlotLayers,_0x2a4b84 as PlotMechanicalRadar,_0x2f0d40 as PlotParameterRadar,_0x18b408 as PlotParameterRadarScan,_0x11ff81 as PlotPoint3D,_0x32c2d4 as PlotProperty,_0x46adf9 as PlotRadarBase,_0x436613 as PlotRadarGeometry,_0x377d94 as PlotRadarOutlineGeometry,_0x49109a as PlotRadarType,_0x14bd84 as PlotRadarUpdater,_0x467388 as PlotRotateRadar,_0x2e830f as PlotRotateRadarScan,_0x5d6ff7 as PlotScanRadar,_0x11b373 as PlotScanRadarScan,_0x57693f as PlotServicesUtil,_0x3e45e1 as PlotUtilityTools,_0x5e75e0 as PlotWarningRadar,_0x39fbca as Plotting,_0x267b40 as PlottingLayer,Point$1 as Point,s$M as Point3D,t$M as Point3Ds,ie$g as PointCloud,a$u as PointCloud3DTileContent,_0x5730db as PointCloudClassificationInfo,m$U as PointCloudEyeDomeLighting,_0x16e744 as PointCloudRenderMode,o$Z as PointCloudShading,n$M as PointGraphics,d$v as PointHandler,c$g as PointLight,_0x21fe0a as PointParticleEmitter,s$o as PointPrimitive,D$s as PointPrimitiveCollection,v$r as PointVisualizer,PointWithMeasure,Polygon,M$a as PolygonEmitter,z$_ as PolygonGeometry,y$_ as PolygonGeometryLibrary,l$y as PolygonGeometryUpdater,l$Z as PolygonGraphics,l$n as PolygonHandler,e$1J as PolygonHierarchy,A$R as PolygonOutlineGeometry,A$1g as PolygonPipeline,o$14 as Polyline,t$o as PolylineArrowMaterialProperty,k$T as PolylineCollection,e$1C as PolylineColorAppearance,o$z as PolylineDashMaterialProperty,e$u as PolylineDynamicMaterialProperty,H$10 as PolylineEffectUboDecl,_0x54ee86 as PolylineFp,R$A as PolylineGeometry,u$q as PolylineGeometryUpdater,t$n as PolylineGlowMaterialProperty,a$L as PolylineGraphics,d$u as PolylineHandler,r$W as PolylineMaterialAppearance,e$x as PolylineOutlineMaterialProperty,m$V as PolylinePipeline,_0x45c27e as PolylineRasterVp,_0x5b2edf as PolylineShadowVolumeFS,_0x4632a6 as PolylineShadowVolumeVS,o$w as PolylineTrailMaterialProperty,l$u as PolylineVisualizer,N$y as PolylineVolumeGeometry,J$B as PolylineVolumeGeometryLibrary,a$n as PolylineVolumeGeometryUpdater,e$1k as PolylineVolumeGraphics,_$z as PolylineVolumeOutlineGeometry,_0x1e7638 as PolylineVp,j$X as PositionMode,t$K as PositionProperty,n$n as PositionPropertyArray,t$g as PostEffectFilterlFramebuffer,p$h as PostProcessStage,_$a as PostProcessStageCollection,s$f as PostProcessStageComposite,i$b as PostProcessStageLibrary,e$i as PostProcessStageSampleMode,g$q as PostProcessStageTextureCache,v$9 as PrefilterRadianceMap,_0x4e6a4d as PrepassRenderer,b$r as PreprocessCubeMap,y$S as Primitive,o$x as PrimitiveCollection,_e$s as PrimitiveEdgeFp,ge$p as PrimitiveEdgeVp,k$S as PrimitivePipeline,_0x142e29 as PrimitiveState,W$18 as PrimitiveType,_0x15862b as Profile,h$8 as ProfilePlaneGeometry,f$a as ProfileRender,Y$H as ProgramDefines,_0x3065eb as ProjectionImage,_0x48873e as ProjectionImageFp,_0x23afcf as ProjectionMode,ProjectionName,n$1 as ProjectionPicker,o$1 as ProjectionPickerViewModel,r$Z as Property,i$v as PropertyArray,f$T as PropertyBag,i$5 as ProviderViewModel,m$1d as QuadraticRealPolynomial,e$9 as QuadtreeOccluders,C$e as QuadtreePrimitive,h$e as QuadtreeTile,re$z as QuadtreeTileLoadState,r$e as QuadtreeTileProvider,Quality,p$O as QuantizedMeshTerrainData,F$1i as QuarticRealPolynomial,n$13 as Quaternion,r$O as QuaternionSpline,r$16 as Queue,_0x1df87e as QuickPosition,_0x4b85fa as QuickPositionManager,U$h as RGBELoader,k$f as RPListenerType,_0x2056d1 as RangeMode,t$F as RasterFramebuffer,C$q as RasterGeometryType,RasterLayerUboDecl,p$9 as RasterVectorCollection,f$17 as Ray,_0x5870d3 as RectQueryHandler,h$18 as Rectangle,r$G as RectangleCollisionChecker,j$N as RectangleGeometry,j$O as RectangleGeometryLibrary,d$B as RectangleGeometryUpdater,n$L as RectangleGraphics,k$G as RectangleOutlineGeometry,Re$k as ReferenceFrame,a$p as ReferenceProperty,i$j as ReflectFramebuffer,_0x568483 as RegionAltitudeVectex,q$15 as RegionEffectUboDecl,_0x3af34f as RegionFragment,_0x362543 as RegionMaterialFp,_0xb28fe0 as RegionMaterialVp,_0x4dbad4 as RegionTextureVertex,_0x3a1ce5 as RegionVectex,_0x3218ec as RenderClipPlane,_0x30a010 as RenderEntityPagedLOD,_0x485985 as RenderPipeline,d$1m as RenderState,t$_ as RenderStateGL,n$10 as RenderStateGPU,s$L as RenderTexture,r$$ as Renderbuffer,M$13 as RenderbufferFormat,o$19 as RenderbufferGL,r$10 as RenderbufferGPU,t$e as Renderer2D,r$1b as Request,s$_ as RequestErrorEvent,r$1a as RequestScheduler,W$1c as RequestState,V$15 as RequestType,t$11 as Resource,_0x36b304 as RotateDirection,m$q as Rotation,O$I as RotationOrigin,f$p as Route,Route as Route2,d$x as RouteCollection,e$s as RouteStop,t$14 as RuntimeError,_0x1309b8 as S3MBDataParser,_0x1c7703 as S3MBSkeletonProcessor,_0x5868f1 as S3MBlock,_0x5d6ada as S3MBlockCache,_0x5ea05b as S3MBloomEffect,_0x2072ef as S3MCompressType,_0x5cff5c as S3MCreateIndexJob,_0x4eaac2 as S3MCreateVertexJob,_0x215208 as S3MDataParser,_0x2424eb as S3MDracoDecode,_0x30c9ea as S3MEdgeProcessor,_0x206cda as S3MEntity,_0x104945 as S3MFeature,_0x40a7a7 as S3MGroupLayer,_0x331f36 as S3MInstance,_0x448857 as S3MInstanceCollection,_0x3e7b8e as S3MInstanceCollectionVertex,_0x2e6772 as S3MLayerScheduler,_0x473d2d as S3MLayerUBO,_0xfa6ee5 as S3MMaterialUBO,_0x4db383 as S3MMeshUBO,v$R as S3MOperationFSDecl,_0x5370ac as S3MPBRMaterialLib,_0x3dfacd as S3MPixelFormat,_0x25441b as S3MPointCloudEDL,_0x3af776 as S3MPointCloudEDLFp,_0x4b2711 as S3MPointCloudEDLFpWGSL,_0x18fcae as S3MPointCloudFp,_0x4e9507 as S3MPointCloudFpWGSL,_0x50ea4a as S3MPointCloudVp,_0x390e70 as S3MPointCloudVpWGSL,_0x2f60f9 as S3MPolylineEffect,_0x280589 as S3MPolylineEffectUBO,_0x14c08b as S3MRegionEffect,_0x3c3817 as S3MRegionEffectUBO,_0x187e60 as S3MRenderStateCreator,_0x3fd475 as S3MShaderProgramJob,_0x4f9ecb as S3MSkeleton,_0x5ba273 as S3MSkeletonProcessor,_0x46a73d as S3MTaskManager,_0x4dad4e as S3MTextureManager,_0x14f094 as S3MThemeGraph,_0x21a0db as S3MTilesBillboardPixelSizeVp,S3MTilesBillboardVp,_0x4da3bc as S3MTilesCommonOntTextureFP,_0x3410ec as S3MTilesExtendPolygonShadowVP,_0x223db1 as S3MTilesFontWithHaloFp,_0x2288cf as S3MTilesFpPointWGSL,_0x1084eb as S3MTilesFpWGSL,_0x2b6657 as S3MTilesFragment,_0x21bee4 as S3MTilesFragmentRaster,_0x4ee275 as S3MTilesLabelStyle,_0x22e933 as S3MTilesLayer,_0x4c08bd as S3MTilesLineShadowVectex,_0x25cbb0 as S3MTilesRectSelection,_0xaee82b as S3MTilesRectSelectionWGSL,_0x3b4223 as S3MTilesRegionShadowVectex,_0x527139 as S3MTilesSelection,_0x5e3105 as S3MTilesShadowVolumeFP,_0x19a31f as S3MTilesVectex,_0x370b02 as S3MTilesVectexRaster,_0x519466 as S3MTilesVpPointWGSL,_0x46f3da as S3MTilesVpWGSL,_0x23730d as S3MUniformMapCreator,_0x10b3f1 as S3MUploadSubTextureJob,_0x41168d as S3MVersion,C$16 as S3MVertexFactory,_0x58bcd6 as S3MVertexPackage,_0x236967 as S3MVolumeUBO,X$_ as S3MVolumeUboDecl,S3MVoxelGridFp,S3MVoxelGridVp,_0x360415 as S3MWaterLayerUBO,_0x451393 as S3ModelFP,se$q as SCTTerrainProvider,V$I as SDFSettings,i$a as SMAA,_0x46b1b9 as SMLFileService,t$L as SQFramebuffer,s$V as SRGBtoLINEAR,a$f as SSAOEffect,o$y as SampledPositionProperty,g$x as SampledProperty,e$1P as Sampler,_0x44d1e4 as Satellite,_0x5ced36 as SatelliteEntity,_0x42f78d as SatelliteEntityManager,_0x329fbd as SatelliteGroup,_0x19ce0d as SatelliteManager,_0x124bda as SatelliteOrbitsLayer,_0x59a6dd as SatelliteToolkit,_0x2c1e2b as Scalar,i$s as ScaledPositionProperty,h$i as ScanEffect,A$j as ScanEffectMode,w$3 as Scene,De$1 as SceneConfigLoader,n$i as SceneFramebuffer,C$13 as SceneMode,c$2 as SceneModePicker,i$2 as SceneModePickerViewModel,s$Q as SceneTransforms,R$8 as SceneTransitioner,_0x4116a0 as SceneUBO,x$16 as SceneUboDecl,_a as ScreenSpaceCameraController,g$J as ScreenSpaceEventHandler,G$I as ScreenSpaceEventType,Zr$2 as SelectColorType,i$1 as SelectionIndicator,n as SelectionIndicatorViewModel,ServerGeometry,ServiceBase,h$m as ShaderCache,mo$1 as ShaderChunk,r$13 as ShaderProgram,t$2 as ShaderProgramCompute,_0x256445 as ShaderProgramCreator,g$18 as ShaderProgramGL,m$Z as ShaderProgramGPU,s$U as ShaderSource,_0x4e4501 as ShadowAnalysisFp,C$Y as ShadowMap,g$10 as ShadowMapShader,W$W as ShadowMode,_0x485098 as ShadowQueryFp,_0x38ed3e as ShadowQueryPoints,_0x2328b4 as ShadowQueryVp,_0x381f49 as ShadowType,_0x1498b5 as ShadowUBO,J$X as ShadowUboDecl,y$R as ShadowVolumeAppearance,_0x3cffe6 as SharedEDLFrameBuffer,e$1F as ShowGeometryInstanceAttribute,_0x3d592b as SightLineAnalysis,_0x23be36 as Sightline,SightlineAnalysisFp,_0x26c186 as SightlineAnalysisVp,n$6 as SilverLightingAtmosphere,a$2 as SilverLightingEphemeris,e$2 as SilverLightingLocalTime,i$8 as SilverLightingLocation,a$3 as SilverLightingLuminanceMapper,l$a as SilverLightingSky,o$8 as SilverLightingSolarSpectrum,G$5 as SilverLightingSpectrum,F$H as Simon1994PlanetaryPositions,S$z as SimplePolylineGeometry,_0x4e5cfb as SimulationController,u$f as SingleTileImageryProvider,_0x29db2d as SitDataManager,_0x19562b as SitDataStruct,_0x41dd10 as SituationSimulationManager,_0x59c417 as SituationSimulationSchemeDataType,_0x236d05 as SituationSimulationSchemeManager,_0x2887b9 as SituationSimulationToolkit,_0x344064 as SkeletonProcessor,_0x49d3c9 as SkeletonState,h$6 as SkyAtmosphere,h$5 as SkyBox,_0x1e0d7c as Skyline,_0x2821fb as SkylineFp,_0x150dfa as SkylineVp,l$K as SlopeSetting,_0x256766 as SlopeSettingEnum,_0x24c268 as SmlInfoStruct,r$N as SmoothStepSpline,r$d as SolidModelsProfile,V$6 as SolidProfileFp,_0x4d0d03 as SpatialQuery3D,_0x594de8 as SpatialQueryFp,_0x2a7fd2 as SpatialQueryFpWGSL,_0x18a488 as SphereDirectedParticleEmitter,o$r as SphereEmitter,n$u as SphereGeometry,a$U as SphereOutlineGeometry,_0x19aa0e as SphereParticleEmitter,c$A as Spherical,n$G as Spline,_0x405774 as SplitDirection,_$k as SpotLight,y$s as StaticGeometryColorBatch,u$s as StaticGeometryPerMaterialBatch,p$l as StaticGroundGeometryColorBatch,f$s as StaticGroundGeometryPerMaterialBatch,m$n as StaticGroundPolylinePerMaterialBatch,y$r as StaticOutlineGeometryBatch,u$N as StencilConstants,m$X as StencilFunction,n$Y as StencilOperation,A$q as StopPlayMode,i$u as StripeMaterialProperty,mr$1 as StripeOrientation,e$1s as Style3D,t$8 as StyleExpression,_0x1e1355 as SubEmitter,_0x536d2c as SubEmitterType,_0x2f6556 as SubTextureCache,_0x3fad8f as SubTextureManager,u$5 as Sun,i$k as SunLight,s$e as SunPostProcess,H$4 as SuperMapImageryProvider,ne$x as SuperMapTerrainProvider,SuperMapVersion,f$I as SupportTools,_0x26609d as SurroundLineType,g$4 as SvgPathBindingHandler,_0x2d6822 as SymbolAlgoUtil,_0xebe7e9 as SymbolAnnotation,_0x202b10 as SymbolArbitraryPolygon,_0x3b1257 as SymbolArc,_0x3f02c6 as SymbolBrace,_0x526be0 as SymbolCell,_0x56bfc5 as SymbolChord,_0x5538dd as SymbolCircle,_0xc18e25 as SymbolConcentricCircle,_0x33d4e9 as SymbolCurveEight,_0x25259d as SymbolDot,_0x22f580 as SymbolDotGraphic,_0x54378e as SymbolDotPicture,_0x404870 as SymbolDotVector,_0x2ebfea as SymbolEllipse,_0xab1d32 as SymbolKidney,_0x4657e6 as SymbolLib,_0x298073 as SymbolLibManager,_0xdf8675 as SymbolLibService,_0x3a50ed as SymbolParallelogram,_0x20f603 as SymbolPie,_0x2ad880 as SymbolPolyBezier,_0x5178a6 as SymbolPolyBezierClosed,_0x43c7a1 as SymbolPolyline,_0x26b28c as SymbolRectangle,_0x3966c2 as SymbolRegularPolygon,_0x575907 as SymbolRunWay,_0x53d051 as SymbolStyle,_0x34d1aa as SymbolTextStyle,_0x1a7236 as SymbolTrapezoid,_0x18bc2f as SymbolType,_0x301bce as TSClipPlane,i$V as TaskProcessor,a$e as TemporalAA,o$T as TemporalSetting,r$E as TerrainData,h$L as TerrainEncoding,Q$J as TerrainFillMesh,r$h as TerrainLayer,o$h as TerrainLayerCollection,T$K as TerrainMesh,h$E as TerrainOffsetProperty,I$12 as TerrainProvider,me$p as TerrainQuantization,_0x56988a as TerrainSlopeAnalysis,Le$m as TerrainState,_0x15f4db as TextOverlapInfo,_0x4c2bdd as TextPos,t$V as Texture,e$j as Texture3D,E$l as Texture3DGL,f$l as Texture3DGPU,v$I as TextureAtlas,r$o as TextureCache,w$U as TextureGL,u$S as TextureGPU,rt$i as TextureMagnificationFilter,_0x27ac16 as TextureManager,tt$h as TextureMinificationFilter,q$19 as TextureWrap,_0x4bd175 as ThreeDModeling,h$3 as TiandituAnnotationProvider,f$6 as TiandituImageryProvider,t$7 as TiandituMapsStyle,d$8 as TiandituTerrainProvider,n$C as TileAvailability,y$K as TileBoundingRegion,t$r as TileBoundingSphere,o$7 as TileBoundingVolume,n$4 as TileCoordinatesImageryProvider,r$b as TileDiscardPolicy,T$I as TileEdge,o$S as TileImagery,g$m as TileMapServiceImageryProvider,c$s as TileOrientedBoundingBox,l$W as TileProviderError,i$L as TileReplacementQueue,D$J as TileSelectionResult,TileState,x$Q as TileTerrain,t$t as Tileset3DTileContent,o$C as TilingScheme,g as TiltIndicator,h$17 as TimeConstants,f$P as TimeDynamicImagery,g$6 as TimeDynamicPointCloud,d$W as TimeInterval,c$z as TimeIntervalCollection,t$m as TimeIntervalCollectionPositionProperty,t$l as TimeIntervalCollectionProperty,H$19 as TimeStandard,u$3 as Timeline,s$1 as TimelineHighlightRange,v as TimelineTrack,D$12 as Tipsify,r$9 as ToggleButtonViewModel,M$8 as Tonemapper,s$i as TransformFeedback,m$17 as Transforms,e$1X as TranslationRotationScale,TransportationAnalystParameter,TransportationAnalystResultSetting,m$N as TridiagonalSystemSolver,u$X as TrustedServers,_0x592290 as TubularCommunicationLink,f$V as Tween,s$a as TweenCollection,_0x3e2f69 as UBOBase,_0x27131a as UBONames,UBONames as UBONames2,t$6 as UnderGlobe,F$5 as UniformBufferEngineGL,e$1z as UniformBufferGL,P$l as UniformState,n$F as UniformlyVariableMotionSpline,UpdateEdgeWeightParameters,UpdateEdgeWeightService,UpdateTurnNodeWeightParameters,UpdateTurnNodeWeightService,h$16 as Uri,_$g as UrlTemplateImageryProvider,Tr$3 as UrlType,_0x4c726c as Util,VERSION,r$1 as VRButton,a as VRButtonViewModel,l$J as VRTheWorldTerrainProvider,Vector,c$w as Vector3DTileBatch,y$v as Vector3DTileContent,e$H as Vector3DTileGeometry,b$H as Vector3DTilePoints,a$t as Vector3DTilePolygons,h$C as Vector3DTilePolylines,y$y as Vector3DTilePrimitive,_$8 as VectorTilesLayer,i$O as VectorTilesMap,e$v as VelocityOrientationProperty,r$u as VelocityVectorProperty,c$12 as VertexArray,v$F as VertexArrayFacade,l$16 as VertexArrayGL,m$Y as VertexArrayGPU,_0x35ed09 as VertexCompressOption,n$11 as VertexFormat,_0x7aa085 as VertexWeightMode,S$O as VerticalOrigin,n$t as VideoSynchronizer,L$c as View,_0x4f36f0 as ViewDome,_0xefb578 as ViewDomeFp,_0xc82867 as ViewDomeType,_0x69adc8 as ViewDomeVp,_0x12cc1f as ViewShed3D,_0x2178ea as ViewShedAnalysis,_0x2818b6 as ViewShedAnalysisFp,_0x2f8522 as ViewShedAnalysisVp,u as Viewer,o$6 as ViewportQuad,fe$n as Visibility,r$r as Visualizer,A$2 as Volume,c$7 as VolumeBillboardCollection,Nt$1 as VolumeBoxFp,Mt$1 as VolumeBoxVp,gt$1 as VolumeRenderMode,g$d as VoxelGridLayer3D,a$5 as VoxelGridPostRenderer,_$9 as VoxelGridTile,o$a as VoxelGridTileMultiResolution,VulkanConstants,_0x5ca3d2 as WTSConfigManager,Ct as WalkingMode,E$F as WallGeometry,D$C as WallGeometryLibrary,n$m as WallGeometryUpdater,e$1j as WallGraphics,w$x as WallOutlineGeometry,G$1c as WaterLayerUboDecl,K$9 as WaterMode,_0x59cef0 as WayPathType,de$x as WebGLConstants,m$f as WebMapServiceImageryProvider,v$E as WebMapTileServiceImageryProvider,t$O as WebMercatorProjection,c$R as WebMercatorTilingScheme,r$D as WeightSpline,u$2 as Widget,W$13 as WindingOrder,_0x15916e as WireFrameType,s$S as XML,o as ZoomIndicator,r as ZoomIndicatorViewModel,a$y as addBuffer,E$D as addDefaults,s$x as addExtensionsRequired,i$C as addExtensionsUsed,s$z as addPipelineExtras,d$P as addToArray,O$N as adjustColor,n$18 as appendForwardSlash,d$1s as arrayFill,D$11 as arrayRemoveDuplicates,l$R as arraySlice,S$Z as barycentricCoordinates,tr as bignumber,a$17 as binarySearch,b$10 as bitmap_sdf,ro$1 as blinnPhong,l$17 as brdf,n$15 as buildModuleUrl,u$4 as bytebuffer,eo as calcTexCoordDecl,V$W as calculateMipLevel,N$W as calculatePolyTexCoord,t$D as cancelAnimationFrame,r$p as checkFloatTexturePrecision,_$X as clip,l$1g as clone,p$19 as combine,a$d as computeFlyToLocationForRectangle,R$Z as computeWValue,i$A as createBillboardPointCallback,s$4 as createCommand,m$4 as createDefaultImageryProviderViewModels,n$3 as createDefaultTerrainProviderViewModels,n$2 as createFragmentFromTemplate,e$1Q as createGuid,c$_ as createMaterialPropertyDescriptor,L$j as createOpenStreetMapImageryProvider,C$$ as createPropertyDescriptor,c$W as createRawPropertyDescriptor,y$e as createTangentSpaceDebugPrimitive,l as createTaskProcessorWorker,te$5 as createTileMapServiceImageryProvider,I$1m as createUniform,V$Z as createUniformArray,j$17 as createUniformArrayGPU,V$X as createUniformGPU,o$j as createWorldImagery,u$H as createWorldTerrain,Module$1 as crunchprevious,c$13 as cubeUV_reflection,f$L as decodeGoogleEarthEnterpriseData,u$_ as defaultValue,e$2b as defined,t$12 as deprecationWarning,i$10 as destroyObject,i$Y as directionLightDecl,h$s as dynamicGeometryGetBoundingSphere,_0x66a0ff as earcut,z$$ as earcut_2_2_1,I$1i as executeExcavation,f$Y as executeServerExcavationDecl,oe$a as exportKml,_0x2e833c as fill_style_layer,B$y as findAccessorMinMax,_0x35248f as flightLineXml,_0x27821a as flyManager,f$R as formatError,c$15 as freezeRenderState,o$1j as getAbsoluteUri,p$A as getAccessorByteStride,i$1a as getBaseUri,M$C as getBinaryAccessor,p$x as getClipAndStyleCode,f$G as getClippingFunction,c$x as getComponentReader,i$c as getElement,k$Z as getEmissiveTextureAtlasColor,Z$$ as getEnvironmentColor,a$13 as getExtensionFromUri,f$O as getFilenameFromUri,w$W as getFusionModePosition,d$13 as getImagePixels,a$F as getMagic,z$X as getNormalMatrix,A$1b as getPBRParamFromTexture,R$C as getPreciseArea,a$K as getStringFromTypedArray,y$W as getTextureColorDecl,Et$a as getTimestamp,E$18 as getUVMatrixDecl,P$12 as getVertexByFlatten,j$16 as getVolumeValue,h$12 as globeAnalysis,D$Z as globeOcean,T$N as graphemesplitter,i$D as hasExtension,a$B as heightReferenceOnEntityPropertyChanged,e$1R as hemisphereLightDecl,_0x269f3b as html2canvas,i$P as isBitSet,i$19 as isBlobUri,i$18 as isCrossOriginUrl,e$23 as isDataUri,i$1b as isLeapYear,n$U as joinUrls,q$B as jsep,O$B as kdbush,ce$1 as knockout,ce$1 as knockout_3_5_1,t$5 as knockout_es5,p$10 as lightSourceImpl,_0x5e23b5 as line_style_layer,a$11 as loadAndExecuteScript,o$10 as loadArrayBuffer,l$O as loadBlob,a$P as loadCRN,h$T as loadCRNForS3M,d$q as loadCubeMap,B$M as loadDXTZ,t$T as loadImage,w$Q as loadImageFromTypedArray,c$E as loadImageViaBlob,u$Q as loadJson,_0x2bb4f4 as loadJson2,d$V as loadJsonp,k$V as loadKTX,f$S as loadKTX2,u$R as loadText,_0xdbaebe as loadText2,f$1 as loadView,p$_ as loadWithXhr,_0x2293fb as loadWithXhr2,d$1f as loadXML,s$7 as long,F$T as measureText,m$H as mergeSort,s$11 as mersenne_twister,V$1 as meshopt_decoder_module,S$U as modernizeShader,R$v as moveTechniqueRenderStates,R$u as moveTechniquesToExtension,k$5 as netcdf,r$B as numberOfComponentsForType,m$1b as objectToQuery,e$1$ as oneTimeWarning,O$u as parseGlb,n$17 as parseResponseHeaders,h$U as pbf,c$C as pointInsideTriangle,m$_ as pointLightDecl,W$U as potpack,M$16 as preClipFS,ue$k as processModelMaterialsCommon,he$f as processPbrMaterials,k$C as proj4_src,f$7 as protobuf,R$B as protobuf_minimal,je$d as purify,m$1a as queryToObject,s$J as quickselect,o$1a as rainDecl,B$B as rbush,T$z as readAccessorPacked,s$y as removeExtensionsRequired,d$N as removeExtensionsUsed,f$E as removePipelineExtras,d$L as removeUnusedElements,g$15 as renderNormal,S$T as renderNormalAndDepth,U$12 as renderPrePass,p$H as requestAnimationFrame,B$Z as s3mComputeVaryings,y$C as sampleTerrain,y$B as sampleTerrainMostDetailed,P$1e as scaleToGeodeticSurface,F$13 as setAlphaByWValue,Y$R as shaderModelBase,a$X as shadowReceive,n$_ as shadowVisibility,Q$$ as sketchMode,r$14 as snowDecl,W$10 as splitClip,t$Z as spotLightDecl,$$17 as sprintf,u$P as subdivideArray,c$5 as subscribeAndEvaluate,t$4 as supermap3D_openlayer_4_6_5,o$N as throttleRequestByServer,ke$4 as topojson,_0x3ebab5 as unzip,T$y as updateAccessorComponentTypes,re$r as updateVersion,$$10 as vertexLogDepthDecl,s as viewerCesium3DTilesInspectorMixin,c as viewerCesiumInspectorMixin,$$1 as viewerDragDropMixin,m as viewerPerformanceWatchdogMixin,t$x as webGLConstantToGlslType,l$I as websocketScheduler,o$1l as when,e$O as wrapFunction,L$16 as writeFragDepth,oo as writeLogDepthDecl,x$X as writeTextToCanvas,he$8 as zip}; +var factory;function e$2e(e){return null!=e}function t$15(e){var t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}factory=function(){var e,t;e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(void 0,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();var n=1,r=function(e,t){var i=t.pixelRatio,n=t.version,r=t.stretchX,o=t.stretchY,a=t.content;this.paddedRect=e,this.pixelRatio=i,this.stretchX=r,this.stretchY=o,this.content=a,this.version=n},o={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};o.tl.get=function(){return[this.paddedRect.x+n,this.paddedRect.y+n]},o.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-n,this.paddedRect.y+this.paddedRect.h-n]},o.tlbr.get=function(){return this.tl.concat(this.br)},o.displaySize.get=function(){return[(this.paddedRect.w-2*n)/this.pixelRatio,(this.paddedRect.h-2*n)/this.pixelRatio]},Object.defineProperties(r.prototype,o);var a,s=(a=!0,function(e,t){var i=a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return a=!1,i}),l=s(void 0,(function(){return l.toString().search("(((.+)+)+)+$").toString().constructor(l).search("(((.+)+)+)+$")}));l();var u=function(e,t){c(this,e,4,t)};function c(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function h(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=c({},{width:n,height:r},i);d(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function d(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)return console.log("out of range source coordinates for image copy"),t;if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)return console.log("out of range destination coordinates for image copy"),t;for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}function f(e){for(var t=0,i=0,n=0,r=e;n<r.length;n+=1){var o=r[n];t+=o.w*o.h,i=Math.max(i,o.w)}e.sort((function(e,t){return t.h-e.h}));for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}],s=0,l=0,u=0,c=e;u<c.length;u+=1)for(var h=c[u],d=a.length-1;d>=0;d--){var f=a[d];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var p=a.pop();d<a.length&&(a[d]=p)}else h.h===f.h?(f.x+=h.w,f.w-=h.w):h.w===f.w?(f.y+=h.h,f.h-=h.h):(a.push({x:f.x+h.w,y:f.y,w:f.w-h.w,h:h.h}),f.y+=h.h,f.h-=h.h);break}}return{w:s,h:l,fill:t/(s*l)||0}}u.prototype.resize=function(e){h(this,e,4)},u.prototype.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},u.prototype.clone=function(){return new u({width:this.width,height:this.height},new Uint8Array(this.data))},u.copy=function(e,t,i,n,r){d(e,t,i,n,r,4)};var p,_=(p=!0,function(e,t){var i=p?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return p=!1,i}),m=_(void 0,(function(){return m.toString().search("(((.+)+)+)+$").toString().constructor(m).search("(((.+)+)+)+$")}));m();var g=1,x=function(e,t){var i={},n={};this.haveRenderCallbacks=[];var r=[];this.addImages(e,i,r),this.addImages(t,n,r);var o=f(r),a=o.w,s=o.h,l=new u({width:a||1,height:s||1});for(var c in e){var h=e[c],d=i[c].paddedRect;u.copy(h.data,l,{x:0,y:0},{x:d.x+g,y:d.y+g},h.data)}for(var p in t){var _=t[p],m=n[p].paddedRect,x=m.x+g,y=m.y+g,v=_.data.width,$=_.data.height;u.copy(_.data,l,{x:0,y:0},{x:x,y:y},_.data),u.copy(_.data,l,{x:0,y:$-1},{x:x,y:y-1},{width:v,height:1}),u.copy(_.data,l,{x:0,y:0},{x:x,y:y+$},{width:v,height:1}),u.copy(_.data,l,{x:v-1,y:0},{x:x-1,y:y},{width:1,height:$}),u.copy(_.data,l,{x:0,y:0},{x:x+v,y:y},{width:1,height:$})}this.image=l,this.iconPositions=i,this.patternPositions=n};x.prototype.addImages=function(e,t,i){for(var n in e){var o=e[n],a={x:0,y:0,w:o.data.width+2*g,h:o.data.height+2*g};i.push(a),t[n]=new r(a,o),o.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},x.prototype.patchUpdatedImages=function(e,t){for(var i in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[i],e.getImage(i),t),this.patchUpdatedImage(this.patternPositions[i],e.getImage(i),t)},x.prototype.patchUpdatedImage=function(e,t,i){if(e&&t&&e.version!==t.version){e.version=t.version;var n=e.tl,r=n[0],o=n[1];i.update(t.data,void 0,{x:r,y:o})}};var y,v=(y=!0,function(e,t){var i=y?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return y=!1,i}),$=v(void 0,(function(){return $.toString().search("(((.+)+)+)+$").toString().constructor($).search("(((.+)+)+)+$")}));$();var b={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function T(e){return(e=Math.round(e))<0?0:e>255?255:e}function C(e){return e<0?0:e>1?1:e}function S(e){return"%"===e[e.length-1]?T(parseFloat(e)/100*255):T(parseInt(e))}function w(e){return"%"===e[e.length-1]?C(parseFloat(e)/100):C(parseFloat(e))}function E(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function P(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in b)return b[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===i.length){var o=i.substr(0,n),a=i.substr(n+1,r-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=w(a.pop());case"rgb":return 3!==a.length?null:[S(a[0]),S(a[1]),S(a[2]),s];case"hsla":if(4!==a.length)return null;s=w(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=w(a[1]),c=w(a[2]),h=c<=.5?c*(u+1):c+u-c*u,d=2*c-h;return[T(255*E(d,h,l+1/3)),T(255*E(d,h,l)),T(255*E(d,h,l-1/3)),s];default:return null}}return null}const A=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),L=A(void 0,(function(){return L.toString().search("(((.+)+)+)+$").toString().constructor(L).search("(((.+)+)+)+$")}));L();class M{constructor(e,t,i,n=1){this.r=e,this.g=t,this.b=i,this.a=n}static parse(e){if(!e)return;if(e instanceof M)return e;if("string"!=typeof e)return;const t=P(e);return t?new M(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,i,n]=this.toArray();return"rgba("+Math.round(e)+","+Math.round(t)+","+Math.round(i)+","+n+")"}toArray(){const{r:e,g:t,b:i,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*i/n,n]}}M.black=new M(0,0,0,1),M.white=new M(1,1,1,1),M.transparent=new M(0,0,0,0),M.red=new M(1,0,0,1);var R={kind:"null"},O={kind:"number"},D={kind:"string"},I={kind:"boolean"},F={kind:"color"},B={kind:"object"},N={kind:"value"},G={kind:"formatted"},z={kind:"resolvedImage"};function U(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));return r(),{kind:"array",itemType:e,N:t}}function V(e){if("array"===e.kind){var t=V(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var k=[R,O,D,I,F,G,B,U(N),z];function W(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!W(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var i=0,n=k;i<n.length;i+=1)if(!W(n[i],t))return null}return"Expected "+V(e)+" but found "+V(t)+" instead."}var H,q=(H=!0,function(e,t){var i=H?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return H=!1,i}),j=q(void 0,(function(){return j.toString().search("(((.+)+)+)+$").toString().constructor(j).search("(((.+)+)+)+$")}));j();var X=function(e,t,i){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};X.prototype.compare=function(e,t){return this.collator.compare(e,t)},X.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Y,Z=(Y=!0,function(e,t){var i=Y?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Y=!1,i}),K=Z(void 0,(function(){return K.toString().search("(((.+)+)+)+$").toString().constructor(K).search("(((.+)+)+)+$")}));K();var Q,J=function(e,t,i,n,r){this.text=e,this.image=t,this.scale=i,this.fontStack=n,this.textColor=r},ee=(Q=!0,function(e,t){var i=Q?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Q=!1,i}),te=ee(void 0,(function(){return te.toString().search("(((.+)+)+)+$").toString().constructor(te).search("(((.+)+)+)+$")}));te();var ie=function(e){this.sections=e};ie.fromString=function(e){return new ie([new J(e,null,null,null,null)])},ie.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},ie.factory=function(e){return e instanceof ie?e:ie.fromString(e)},ie.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},ie.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];if(n.image)e.push(["image",n.image.name]);else{e.push(n.text);var r={};n.fontStack&&(r["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(r["font-scale"]=n.scale),n.textColor&&(r["text-color"]=["rgba"].concat(n.textColor.toArray())),e.push(r)}}return e};var ne,re=(ne=!0,function(e,t){var i=ne?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ne=!1,i}),oe=re(void 0,(function(){return oe.toString().search("(((.+)+)+)+$").toString().constructor(oe).search("(((.+)+)+)+$")}));oe();var ae=function(e){this.name=e.name,this.available=e.available};ae.prototype.toString=function(){return this.name},ae.fromString=function(e){return new ae({name:e,available:!1})},ae.prototype.serialize=function(){return["image",this.name]};var se,le=(se=!0,function(e,t){var i=se?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return se=!1,i}),ue=le(void 0,(function(){return ue.toString().search("(((.+)+)+)+$").toString().constructor(ue).search("(((.+)+)+)+$")}));ue();var ce={kind:"null"},he={kind:"number"},de={kind:"string"},fe={kind:"boolean"},pe={kind:"color"},_e={kind:"object"},me={kind:"value"},ge={kind:"collator"},xe={kind:"formatted"},ye={kind:"resolvedImage"};function ve(e,t){return{kind:"array",itemType:e,N:t}}function $e(){}$e.validateRGBA=function(e,t,i,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,i,n]:[e,t,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."},$e.isValue=function(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof M)return!0;if(e instanceof X)return!0;if(e instanceof ie)return!0;if(e instanceof ae)return!0;if(Array.isArray(e)){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(!$e.isValue(n))return!1}return!0}if("object"==typeof e){for(var r in e)if(!$e.isValue(e[r]))return!1;return!0}return!1},$e.typeOf=function(e){if(null===e)return ce;if("string"==typeof e)return de;if("boolean"==typeof e)return fe;if("number"==typeof e)return he;if(e instanceof M)return pe;if(e instanceof X)return ge;if(e instanceof ie)return xe;if(e instanceof ae)return ye;if(Array.isArray(e)){for(var t,i=e.length,n=0,r=e;n<r.length;n+=1){var o=r[n],a=$e.typeOf(o);if(t){if(t===a)continue;t=me;break}t=a}return ve(t||me,i)}return _e},$e.toString$1=function(e){var t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof M||e instanceof ie||e instanceof ae?e.toString():JSON.stringify(e)};var be,Te=(be=!0,function(e,t){var i=be?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return be=!1,i}),Ce=Te(void 0,(function(){return Ce.toString().search("(((.+)+)+)+$").toString().constructor(Ce).search("(((.+)+)+)+$")}));Ce();var Se={kind:"number"},we={kind:"string"},Ee={kind:"boolean"},Pe={kind:"object"},Ae={kind:"value"};function Le(e,t){return{kind:"array",itemType:e,N:t}}var Me={string:we,number:Se,boolean:Ee,object:Pe},Re=function(e,t){this.type=e,this.args=t};Re.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i,n=1,r=e[0];if("array"===r){var o,a;if(e.length>2){var s=e[1];if("string"!=typeof s||!(s in Me)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=Me[s],n++}else o=Ae;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}i=Le(o,a)}else i=Me[r];for(var l=[];n<e.length;n++){var u=t.parse(e[n],n,Ae);if(!u)return null;l.push(u)}return new Re(i,l)},Re.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var i=this.args[t].evaluate(e);if(!W(this.type,$e.typeOf(i)))return i;if(t===this.args.length-1)throw new RuntimeError("Expected value to be of type "+toString(this.type)+", but found "+toString($e.typeOf(i))+" instead.")}return null},Re.prototype.eachChild=function(e){this.args.forEach(e)},Re.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},Re.prototype.serialize=function(){var e=this.type,t=[e.kind];if("array"===e.kind){var i=e.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){t.push(i.kind);var n=e.N;("number"==typeof n||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var Oe,De=(Oe=!0,function(e,t){var i=Oe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Oe=!1,i}),Ie=De(void 0,(function(){return Ie.toString().search("(((.+)+)+)+$").toString().constructor(Ie).search("(((.+)+)+)+$")}));Ie();var Fe={kind:"number"},Be={kind:"value"};function Ne(e,t){return{kind:"array",itemType:e,N:t}}var Ge=function(e,t,i){this.type=e,this.index=t,this.input=i};Ge.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,Fe),n=t.parse(e[2],2,Ne(t.expectedType||Be));if(!i||!n)return null;var r=n.type;return new Ge(r.itemType,i,n)},Ge.prototype.evaluate=function(e){var t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new RuntimeError("Array index out of bounds: "+t+" < 0.");if(t>=i.length)throw new RuntimeError("Array index out of bounds: "+t+" > "+(i.length-1)+".");if(t!==Math.floor(t))throw new RuntimeError("Array index must be an integer, but found "+t+" instead.");return i[t]},Ge.prototype.eachChild=function(e){e(this.index),e(this.input)},Ge.prototype.possibleOutputs=function(){return[void 0]},Ge.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ze,Ue=(ze=!0,function(e,t){var i=ze?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ze=!1,i}),Ve=Ue(void 0,(function(){return Ve.toString().search("(((.+)+)+)+$").toString().constructor(Ve).search("(((.+)+)+)+$")}));Ve();var ke={kind:"boolean"},We=function(e,t,i){this.type=e,this.branches=t,this.otherwise=i};We.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var i;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(var n=[],r=1;r<e.length-1;r+=2){var o=t.parse(e[r],r,ke);if(!o)return null;var a=t.parse(e[r+1],r+1,i);if(!a)return null;n.push([o,a]),i=i||a.type}var s=t.parse(e[e.length-1],e.length-1,i);return s?new We(i,n,s):null},We.prototype.evaluate=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];if(r.evaluate(e))return o.evaluate(e)}return this.otherwise.evaluate(e)},We.prototype.eachChild=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e(r),e(o)}e(this.otherwise)},We.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.branches.map((function(e){return e[0],e[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},We.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var He,qe=(He=!0,function(e,t){var i=He?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return He=!1,i}),je=qe(void 0,(function(){return je.toString().search("(((.+)+)+)+$").toString().constructor(je).search("(((.+)+)+)+$")}));je();var Xe={kind:"value"},Ye=function(e,t){this.type=e,this.args=t};Ye.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var i=null,n=t.expectedType;n&&"value"!==n.kind&&(i=n);for(var r=[],o=0,a=e.slice(1);o<a.length;o+=1){var s=a[o],l=t.parse(s,1+r.length,i,void 0,{typeAnnotation:"omit"});if(!l)return null;i=i||l.type,r.push(l)}var u=n&&r.some((function(e){return W(n,e.type)}));return new Ye(u?Xe:i,r)},Ye.prototype.evaluate=function(e){for(var t,i=null,n=0,r=0,o=this.args;r<o.length&&(n++,(i=o[r].evaluate(e))&&i instanceof ae&&!i.available&&(!t&&(t=i.name),i=null,n===this.args.length&&(i=t)),null===i);r+=1);return i},Ye.prototype.eachChild=function(e){this.args.forEach(e)},Ye.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},Ye.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Ze,Ke=(Ze=!0,function(e,t){var i=Ze?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ze=!1,i}),Qe=Ke(void 0,(function(){return Qe.toString().search("(((.+)+)+)+$").toString().constructor(Qe).search("(((.+)+)+)+$")}));Qe();var Je={kind:"number"},et={kind:"string"},tt={kind:"boolean"},it={kind:"color"},nt={kind:"value"},rt={"to-boolean":tt,"to-color":it,"to-number":Je,"to-string":et},ot=function(e,t){this.type=e,this.args=t};ot.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[0];if(("to-boolean"===i||"to-string"===i)&&2!==e.length)return t.error("Expected one argument.");for(var n=rt[i],r=[],o=1;o<e.length;o++){var a=t.parse(e[o],o,nt);if(!a)return null;r.push(a)}return new ot(n,r)},ot.prototype.evaluate=function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){for(var t,i,n=0,r=this.args;n<r.length;n+=1){if(i=null,(t=r[n].evaluate(e))instanceof M)return t;if("string"==typeof t){var o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&!(i=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":validateRGBA(t[0],t[1],t[2],t[3])))return new M(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new RuntimeError(i||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null===(a=l[s].evaluate(e)))return 0;var u=Number(a);if(!isNaN(u))return u}throw new RuntimeError("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?Formatted.fromString($e.toString$1(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?ae.fromString($e.toString$1(this.args[0].evaluate(e))):$e.toString$1(this.args[0].evaluate(e))},ot.prototype.eachChild=function(e){this.args.forEach(e)},ot.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},ot.prototype.serialize=function(){if("formatted"===this.type.kind)return new FormatExpression([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ImageExpression(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var at,st=(at=!0,function(e,t){var i=at?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return at=!1,i}),lt=st(void 0,(function(){return lt.toString().search("(((.+)+)+)+$").toString().constructor(lt).search("(((.+)+)+)+$")}));lt();var ut={kind:"string"},ct={kind:"boolean"},ht={kind:"collator"},dt=function(e,t,i){this.type=ht,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=t};dt.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var i=e[1];if("object"!=typeof i||Array.isArray(i))return t.error("Collator options argument must be an object.");var n=t.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,ct);if(!n)return null;var r=t.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,ct);if(!r)return null;var o=null;return i.locale&&!(o=t.parse(i.locale,1,ut))?null:new dt(n,r,o)},dt.prototype.evaluate=function(e){return new X(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},dt.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},dt.prototype.possibleOutputs=function(){return[void 0]},dt.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var ft={kind:"boolean"},pt={kind:"value"},_t={kind:"collator"};function mt(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function gt(e,t,i){return t===i}function xt(e,t,i){return t!==i}function yt(e,t,i){return t<i}function vt(e,t,i){return t>i}function $t(e,t,i){return t<=i}function bt(e,t,i){return t>=i}function Tt(e,t,i,n){return 0===n.compare(t,i)}function Ct(e,t,i,n){return!Tt(0,t,i,n)}function St(e,t,i,n){return n.compare(t,i)<0}function wt(e,t,i,n){return n.compare(t,i)>0}function Et(e,t,i,n){return n.compare(t,i)<=0}function Pt(e,t,i,n){return n.compare(t,i)>=0}function At(e,t,i){var n,r=(n=!0,function(e,t){var i=n?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}),o="=="!==e&&"!="!==e;return function(){var n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function a(e,t,i){this.type=ft,this.lhs=e,this.rhs=t,this.collator=i,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return n(),a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var i=e[0],n=t.parse(e[1],1,pt);if(!n)return null;if(!mt(i,n.type))return t.concat(1).error('"'+i+"\" comparisons are not supported for type '"+toString(n.type)+"'.");var r=t.parse(e[2],2,pt);if(!r)return null;if(!mt(i,r.type))return t.concat(2).error('"'+i+"\" comparisons are not supported for type '"+toString(r.type)+"'.");if(n.type.kind!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot compare types '"+toString(n.type)+"' and '"+toString(r.type)+"'.");o&&("value"===n.type.kind&&"value"!==r.type.kind?n=new Re(r.type,[n]):"value"!==n.type.kind&&"value"===r.type.kind&&(r=new Re(n.type,[r])));var s=null;if(4===e.length){if("string"!==n.type.kind&&"string"!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,_t)))return null}return new a(n,r,s)},a.prototype.evaluate=function(n){var r=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(o&&this.hasUntypedArgument){var s=$e.typeOf(r),l=$e.typeOf(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new RuntimeError('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!o&&this.hasUntypedArgument){var u=$e.typeOf(r),c=$e.typeOf(a);if("string"!==u.kind||"string"!==c.kind)return t(n,r,a)}return this.collator?i(n,r,a,this.collator.evaluate(n)):t(n,r,a)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.possibleOutputs=function(){return[!0,!1]},a.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},a}()}var Lt={};Lt.Equals=At("==",gt,Tt),Lt.NotEquals=At("!=",xt,Ct),Lt.LessThan=At("<",yt,St),Lt.GreaterThan=At(">",vt,wt),Lt.LessThanOrEqual=At("<=",$t,Et),Lt.GreaterThanOrEqual=At(">=",bt,Pt);var Mt,Rt=(Mt=!0,function(e,t){var i=Mt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Mt=!1,i}),Ot=Rt(void 0,(function(){return Ot.toString().search("(((.+)+)+)+$").toString().constructor(Ot).search("(((.+)+)+)+$")}));Ot();var Dt={kind:"number"},It={kind:"string"},Ft={kind:"color"},Bt={kind:"value"},Nt={kind:"formatted"},Gt={kind:"resolvedImage"};function zt(e,t){return{kind:"array",itemType:e,N:t}}var Ut=function(e){this.type=Nt,this.sections=e};Ut.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[1];if(!Array.isArray(i)&&"object"==typeof i)return t.error("First argument must be an image or text section.");for(var n=[],r=!1,o=1;o<=e.length-1;++o){var a=e[o];if(r&&"object"==typeof a&&!Array.isArray(a)){r=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,Dt)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,zt(It))))return null;var u=null;if(a["text-color"]&&!(u=t.parse(a["text-color"],1,Ft)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var h=t.parse(e[o],1,Bt);if(!h)return null;var d=h.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new Ut(n)},Ut.prototype.evaluate=function(e){return new ie(this.sections.map((function(t){var i=t.content.evaluate(e);return $e.typeOf(i)===Gt?new J("",i,null,null,null):new J($e.toString$1(i),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},Ut.prototype.eachChild=function(e){for(var t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e(n.content),n.scale&&e(n.scale),n.font&&e(n.font),n.textColor&&e(n.textColor)}},Ut.prototype.possibleOutputs=function(){return[void 0]},Ut.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e.push(n.content.serialize());var r={};n.scale&&(r["font-scale"]=n.scale.serialize()),n.font&&(r["text-font"]=n.font.serialize()),n.textColor&&(r["text-color"]=n.textColor.serialize()),e.push(r)}return e};var Vt,kt=(Vt=!0,function(e,t){var i=Vt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Vt=!1,i}),Wt=kt(void 0,(function(){return Wt.toString().search("(((.+)+)+)+$").toString().constructor(Wt).search("(((.+)+)+)+$")}));Wt();var Ht={kind:"string"},qt={kind:"resolvedImage"},jt=function(e){this.type=qt,this.input=e};jt.parse=function(e,t){if(2!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,Ht);return i?new jt(i):t.error("No image name provided.")},jt.prototype.evaluate=function(e){var t=this.input.evaluate(e),i=!1;return e.availableImages&&e.availableImages.indexOf(t)>-1&&(i=!0),new ae({name:t,available:i})},jt.prototype.eachChild=function(e){e(this.input)},jt.prototype.possibleOutputs=function(){return[void 0]},jt.prototype.serialize=function(){return["image",this.input.serialize()]};var Xt,Yt=(Xt=!0,function(e,t){var i=Xt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Xt=!1,i}),Zt=Yt(void 0,(function(){return Zt.toString().search("(((.+)+)+)+$").toString().constructor(Zt).search("(((.+)+)+)+$")}));Zt();var Kt=function(e,t,i,n,r){this.type=e,this.operator=t,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=r;o<a.length;o+=1){var s=a[o],l=s[0],u=s[1];this.labels.push(l),this.outputs.push(u)}},Qt={kind:"number"},Jt={kind:"color"};function ei(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}Kt.interpolationFactor=function(e,t,i,n){var r=0;if("exponential"===e.name)r=ei(t,e.base,i,n);else if("linear"===e.name)r=ei(t,1,i,n);else if("cubic-bezier"===e.name){var o=e.controlPoints;r=new unitbezier(o[0],o[1],o[2],o[3]).solve(ei(t,1,i,n))}return r},Kt.parse=function(e,t){var i=e[0],n=e[1],r=e[2],o=e.slice(3);if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var a=n[1];if("number"!=typeof a)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:a}}else{if("cubic-bezier"!==n[0])return t.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some((function(e){return"number"!=typeof e||e<0||e>1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(r=t.parse(r,2,Qt)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=Jt:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c<o.length;c+=2){var h=o[c],d=o[c+1],f=c+3,p=c+4;if("number"!=typeof h)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var _=t.parse(d,p,u);if(!_)return null;u=u||_.type,l.push([h,_])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new Kt(u,i,n,r,l):t.error("Type "+toString(u)+" is not interpolatable.")},Kt.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;if(n>=t[r-1])return i[r-1].evaluate(e);var o=findStopLessThanOrEqualTo(t,n),a=t[o],s=t[o+1],l=Kt.interpolationFactor(this.interpolation,n,a,s),u=i[o].evaluate(e),c=i[o+1].evaluate(e);return"interpolate"===this.operator?interpolate[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?hcl.reverse(hcl.interpolate(hcl.forward(u),hcl.forward(c),l)):lab.reverse(lab.interpolate(lab.forward(u),lab.forward(c),l))},Kt.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1)e(i[t])},Kt.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},Kt.prototype.serialize=function(){var e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],i=0;i<this.labels.length;i++)t.push(this.labels[i],this.outputs[i].serialize());return t};var ti,ii=(ti=!0,function(e,t){var i=ti?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ti=!1,i}),ni=ii(void 0,(function(){return ni.toString().search("(((.+)+)+)+$").toString().constructor(ni).search("(((.+)+)+)+$")}));ni();var ri={kind:"boolean"},oi={kind:"value"};function ai(e){return"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind}function si(e){return"boolean"==typeof e||"string"==typeof e||"number"==typeof e}function li(e){return Array.isArray(e)||"string"==typeof e}var ui=function(e,t){this.type=ri,this.needle=e,this.haystack=t};ui.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,oi),n=t.parse(e[2],2,oi);return i&&n?ai(i.type)?new ui(i,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+toString(i.type)+" instead"):null},ui.prototype.evaluate=function(e){var t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!t||!i)return!1;if(!si(t))throw new RuntimeError("Expected first argument to be of type boolean, string or number, but found "+toString(typeOf(t))+" instead.");if(!li(i))throw new RuntimeError("Expected second argument to be of type array or string, but found "+toString(typeOf(i))+" instead.");return i.indexOf(t)>=0},ui.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},ui.prototype.possibleOutputs=function(){return[!0,!1]},ui.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var ci,hi=(ci=!0,function(e,t){var i=ci?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ci=!1,i}),di=hi(void 0,(function(){return di.toString().search("(((.+)+)+)+$").toString().constructor(di).search("(((.+)+)+)+$")}));di();var fi=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};fi.prototype.evaluate=function(e){return this.result.evaluate(e)},fi.prototype.eachChild=function(e){for(var t=0,i=this.bindings;t<i.length;t+=1)e(i[t][1]);e(this.result)},fi.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var i=[],n=1;n<e.length-1;n+=2){var r=e[n];if("string"!=typeof r)return t.error("Expected string, but found "+typeof r+" instead.",n);if(/[^a-zA-Z0-9_]/.test(r))return t.error("Variable names must contain only alphanumeric characters or '_'.",n);var o=t.parse(e[n+1],n+1);if(!o)return null;i.push([r,o])}var a=t.parse(e[e.length-1],e.length-1,t.expectedType,i);return a?new fi(i,a):null},fi.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},fi.prototype.serialize=function(){for(var e=["let"],t=0,i=this.bindings;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e.push(r,o.serialize())}return e.push(this.result.serialize()),e};var pi,_i=(pi=!0,function(e,t){var i=pi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return pi=!1,i}),mi=_i(void 0,(function(){return mi.toString().search("(((.+)+)+)+$").toString().constructor(mi).search("(((.+)+)+)+$")}));mi();var gi={kind:"number"},xi=function(e){this.type=gi,this.input=e};xi.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?t.error("Expected argument of type string or array, but found "+toString(i.type)+" instead."):new xi(i):null},xi.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new RuntimeError("Expected value to be of type string or array, but found "+toString(typeOf(t))+" instead.")},xi.prototype.eachChild=function(e){e(this.input)},xi.prototype.possibleOutputs=function(){return[void 0]},xi.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var yi,vi=(yi=!0,function(e,t){var i=yi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return yi=!1,i}),$i=vi(void 0,(function(){return $i.toString().search("(((.+)+)+)+$").toString().constructor($i).search("(((.+)+)+)+$")}));$i();var bi=function(e,t){this.type=e,this.value=t};bi.parse=function(e,t){if(2!==e.length)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!$e.isValue(e[1]))return t.error("invalid value");var i=e[1],n=$e.typeOf(i),r=t.expectedType;return"array"===n.kind&&0===n.N&&r&&"array"===r.kind&&("number"!=typeof r.N||0===r.N)&&(n=r),new bi(n,i)},bi.prototype.evaluate=function(){return this.value},bi.prototype.eachChild=function(){},bi.prototype.possibleOutputs=function(){return[this.value]},bi.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Color?["rgba"].concat(this.value.toArray()):this.value instanceof ie?this.value.serialize():this.value};var Ti,Ci=(Ti=!0,function(e,t){var i=Ti?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ti=!1,i}),Si=Ci(void 0,(function(){return Si.toString().search("(((.+)+)+)+$").toString().constructor(Si).search("(((.+)+)+)+$")}));Si();var wi={kind:"value"},Ei=function(e,t,i,n,r,o){this.inputType=e,this.type=t,this.input=i,this.cases=n,this.outputs=r,this.otherwise=o};Ei.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var i,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var r={},o=[],a=2;a<e.length-1;a+=2){var s=e[a],l=e[a+1];!Array.isArray(s)&&(s=[s]);var u=t.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,h=s;c<h.length;c+=1){var d=h[c];if("number"!=typeof d&&"string"!=typeof d)return u.error("Branch labels must be numbers or strings.");if("number"==typeof d&&Math.abs(d)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,$e.typeOf(d)))return null}else i=$e.typeOf(d);if(void 0!==r[String(d)])return u.error("Branch labels must be unique.");r[String(d)]=o.length}var f=t.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var p=t.parse(e[1],1,wi);if(!p)return null;var _=t.parse(e[e.length-1],e.length-1,n);return _?"value"!==p.type.kind&&t.concat(1).checkSubtype(i,p.type)?null:new Ei(i,n,p,r,o,_):null},Ei.prototype.evaluate=function(e){var t=this.input.evaluate(e);return($e.typeOf(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},Ei.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},Ei.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},Ei.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],i=[],n={},r=0,o=Object.keys(this.cases).sort();r<o.length;r+=1){var a=o[r];void 0===(h=n[this.cases[a]])?(n[this.cases[a]]=i.length,i.push([this.cases[a],[a]])):i[h][1].push(a)}for(var s=function(t){return"number"===e.inputType.kind?Number(t):t},l=0,u=i;l<u.length;l+=1){var c=u[l],h=c[0],d=c[1];1===d.length?t.push(s(d[0])):t.push(d.map(s)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var Pi,Ai=(Pi=!0,function(e,t){var i=Pi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Pi=!1,i}),Li=Ai(void 0,(function(){return Li.toString().search("(((.+)+)+)+$").toString().constructor(Li).search("(((.+)+)+)+$")}));Li();var Mi={kind:"number"},Ri={kind:"string"},Oi=function(e,t,i,n,r){this.type=Ri,this.number=e,this.locale=t,this.currency=i,this.minFractionDigits=n,this.maxFractionDigits=r};Oi.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,Mi);if(!i)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var r=null;if(n.locale&&!(r=t.parse(n.locale,1,Ri)))return null;var o=null;if(n.currency&&!(o=t.parse(n.currency,1,Ri)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=t.parse(n["min-fraction-digits"],1,Mi)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,Mi))?null:new Oi(i,r,o,a,s)},Oi.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},Oi.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},Oi.prototype.possibleOutputs=function(){return[void 0]},Oi.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Di,Ii=(Di=!0,function(e,t){var i=Di?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Di=!1,i}),Fi=Ii(void 0,(function(){return Fi.toString().search("(((.+)+)+)+$").toString().constructor(Fi).search("(((.+)+)+)+$")}));function Bi(e,t){for(var i,n,r=e.length-1,o=0,a=r,s=0;o<=a;)if(i=e[s=Math.floor((o+a)/2)],n=e[s+1],i<=t){if(s===r||t<n)return s;o=s+1}else{if(!(i>t))throw new RuntimeError("Input is not a number.");a=s-1}return 0}Fi();var Ni,Gi=(Ni=!0,function(e,t){var i=Ni?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ni=!1,i}),zi=Gi(void 0,(function(){return zi.toString().search("(((.+)+)+)+$").toString().constructor(zi).search("(((.+)+)+)+$")}));zi();var Ui={kind:"number"},Vi=function(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,r=i;n<r.length;n+=1){var o=r[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};Vi.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var i=t.parse(e[1],1,Ui);if(!i)return null;var n=[],r=null;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var o=1;o<e.length;o+=2){var a=1===o?-1/0:e[o],s=e[o+1],l=o,u=o+1;if("number"!=typeof a)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,r);if(!c)return null;r=r||c.type,n.push([a,c])}return new Vi(r,i,n)},Vi.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;return n>=t[r-1]?i[r-1].evaluate(e):i[Bi(t,n)].evaluate(e)},Vi.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1)e(i[t])},Vi.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},Vi.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var ki,Wi=(ki=!0,function(e,t){var i=ki?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ki=!1,i}),Hi=Wi(void 0,(function(){return Hi.toString().search("(((.+)+)+)+$").toString().constructor(Hi).search("(((.+)+)+)+$")}));Hi();var qi=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};qi.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var i=e[1];return t.scope.has(i)?new qi(i,t.scope.get(i)):t.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},qi.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},qi.prototype.eachChild=function(){},qi.prototype.possibleOutputs=function(){return[void 0]},qi.prototype.serialize=function(){return["var",this.name]};var ji,Xi=(ji=!0,function(e,t){var i=ji?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ji=!1,i}),Yi=Xi(void 0,(function(){return Yi.toString().search("(((.+)+)+)+$").toString().constructor(Yi).search("(((.+)+)+)+$")}));Yi();var Zi,Ki={"==":Lt.Equals,"!=":Lt.NotEquals,">":Lt.GreaterThan,"<":Lt.LessThan,">=":Lt.GreaterThanOrEqual,"<=":Lt.LessThanOrEqual,array:Re,at:Ge,boolean:Re,case:We,coalesce:Ye,collator:dt,format:Ut,image:jt,in:ui,interpolate:Kt,"interpolate-hcl":Kt,"interpolate-lab":Kt,length:xi,let:fi,literal:bi,match:Ei,number:Re,"number-format":Oi,object:Re,step:Vi,string:Re,"to-boolean":ot,"to-color":ot,"to-number":ot,"to-string":ot,var:qi},Qi=(Zi=!0,function(e,t){var i=Zi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Zi=!1,i}),Ji=Qi(void 0,(function(){return Ji.toString().search("(((.+)+)+)+$").toString().constructor(Ji).search("(((.+)+)+)+$")}));function en(){}Ji();var tn={};for(var nn in en.register=function(e,t,i){void 0===i&&(i={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),tn[e]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}},en.register("Object",Object),en.register("Color",M),en.register("Error",Error),en.register("ResolvedImage",ae),en.register("ImageAtlas",x),en.register("ImagePosition",r),en.register("RGBAImage",u),en.register("Formatted",ie),en.register("FormattedSection",J),Ki)Ki[nn]._classRegistryKey||en.register("Expression_"+nn,Ki[nn]);function rn(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}en.serialize=function(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(rn(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var i=e;return t&&t.push(i.buffer),i}if(e instanceof ImageData)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var n=[],r=0,o=e;r<o.length;r+=1){var a=o[r];n.push(en.serialize(a,t))}return n}if("object"==typeof e){var s=e.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var u=s.serialize?s.serialize(e,t):{};if(!s.serialize){for(var c in e)if(e.hasOwnProperty(c)&&!(tn[l].omit.indexOf(c)>=0)){var h=e[c];"function"!=typeof h&&(u[c]=tn[l].shallow.indexOf(c)>=0?h:en.serialize(h,t))}e instanceof Error&&(u.message=e.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof e)},en.deserialize=function(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||rn(e)||ArrayBuffer.isView(e)||e instanceof ImageData)return e;if(Array.isArray(e))return e.map(en.deserialize);if("object"==typeof e){var t=e.$name||"Object",i=tn[t].klass;if(!i)throw new Error("can't deserialize unregistered class "+t);if(i.deserialize)return i.deserialize(e);for(var n=Object.create(i.prototype),r=0,o=Object.keys(e);r<o.length;r+=1){var a=o[r];if("$name"!==a){var s=e[a];n[a]=tn[t].shallow.indexOf(a)>=0?s:en.deserialize(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)};var on,an=(on=!0,function(e,t){var i=on?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return on=!1,i}),sn=an(void 0,(function(){return sn.toString().search("(((.+)+)+)+$").toString().constructor(sn).search("(((.+)+)+)+$")}));function ln(e){this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}sn(),ln.prototype.trigger=function(){!this._triggered&&(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))};const un=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),cn=un(void 0,(function(){return cn.toString().search("(((.+)+)+)+$").toString().constructor(cn).search("(((.+)+)+)+$")}));function hn(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function dn(e,t,i){this.target=e,this.parent=t,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},hn(["receive","process"],this),this.invoker=new ln(this.process),this.target.addEventListener("message",this.receive,!1)}cn(),dn.prototype.send=function(e,t,i,n){const r=++dn.taskId;i&&(this.callbacks[r]=i);const o=[];return this.target.postMessage({id:r,type:e,hasCallback:!!i,targetMapId:n,sourceMapId:this.mapId,data:en.serialize(t,o)},o),{cancel:()=>{i&&delete this.callbacks[r],this.target.postMessage({id:r,type:"<cancel>",targetMapId:n,sourceMapId:this.mapId})}}},dn.prototype.receive=function(e){const t=e.data,i=t.id;if(i&&(!t.targetMapId||this.mapId===t.targetMapId))if("<cancel>"===t.type){delete this.tasks[i];const e=this.cancelCallbacks[i];delete this.cancelCallbacks[i],e&&e()}else this.tasks[i]=t,this.taskQueue.push(i),this.invoker.trigger()},dn.prototype.process=function(){if(!this.taskQueue.length)return;const e=this.taskQueue.shift(),t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t)if("<response>"===t.type){const i=this.callbacks[e];delete this.callbacks[e],i&&(t.error?i(en.deserialize(t.error)):i(null,en.deserialize(t.data)))}else{let i=!1;const n=t.hasCallback?(t,n)=>{i=!0,delete this.cancelCallbacks[e];const r=[];this.target.postMessage({id:e,type:"<response>",sourceMapId:this.mapId,error:t?en.serialize(t):null,data:en.serialize(n,r)},r)}:e=>{i=!0};let r=null;const o=en.deserialize(t.data);if(this.parent[t.type])r=this.parent[t.type](t.sourceMapId,o,n);else if(this.parent.getWorkerSource){const e=t.type.split(".");r=this.parent.getWorkerSource(t.sourceMapId,e[0],o.source)[e[1]](o,n)}else n(new Error("Could not find function "+t.type));!i&&r&&r.cancel&&(this.cancelCallbacks[e]=r.cancel)}},dn.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},dn.taskId=0;var fn,pn=(fn=!0,function(e,t){var i=fn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return fn=!1,i}),_n=pn(void 0,(function(){return _n.toString().search("(((.+)+)+)+$").toString().constructor(_n).search("(((.+)+)+)+$")}));_n();var mn=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var i=0,n=t;i<n.length;i+=1){var r=n[i],o=r[0],a=r[1];this.bindings[o]=a}};mn.prototype.concat=function(e){return new mn(this,e)},mn.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},mn.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var gn,xn=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,i),this.message=i,this.key=t}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r}(Error),yn=(gn=!0,function(e,t){var i=gn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return gn=!1,i}),vn=yn(void 0,(function(){return vn.toString().search("(((.+)+)+)+$").toString().constructor(vn).search("(((.+)+)+)+$")}));vn();var $n=["Unknown","Point","LineString","Polygon"],bn=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null};bn.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},bn.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?$n[this.feature.type]:this.feature.type:null},bn.prototype.properties=function(){return this.feature&&this.feature.properties||{}},bn.prototype.parseColor=function(e){var t=this._parseColorCache[e];return!t&&(t=this._parseColorCache[e]=M.parse(e)),t},en.register("EvaluationContext",bn);var Tn,Cn=(Tn=!0,function(e,t){var i=Tn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Tn=!1,i}),Sn=Cn(void 0,(function(){return Sn.toString().search("(((.+)+)+)+$").toString().constructor(Sn).search("(((.+)+)+)+$")}));function wn(){}Sn(),wn.isFeatureConstant=function(e){if(e instanceof Ln.CompoundExpression){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}var t=!0;return e.eachChild((function(e){t&&!wn.isFeatureConstant(e)&&(t=!1)})),t},wn.isStateConstant=function(e){if(e instanceof Ln.CompoundExpression&&"feature-state"===e.name)return!1;var t=!0;return e.eachChild((function(e){t&&!wn.isStateConstant(e)&&(t=!1)})),t},wn.isGlobalPropertyConstant=function(e,t){if(e instanceof Ln.CompoundExpression&&t.indexOf(e.name)>=0)return!1;var i=!0;return e.eachChild((function(e){i&&!wn.isGlobalPropertyConstant(e,t)&&(i=!1)})),i};var En,Pn=(En=!0,function(e,t){var i=En?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return En=!1,i}),An=Pn(void 0,(function(){return An.toString().search("(((.+)+)+)+$").toString().constructor(An).search("(((.+)+)+)+$")}));An();var Ln=function(e,t,i,n,r){void 0===t&&(t=[]),void 0===n&&(n=new mn),void 0===r&&(r=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=r,this.expectedType=i};function Mn(e,t){const i=t[e];return void 0===i?null:i}Ln.prototype.parse=function(e,t,i,n,r){return void 0===r&&(r={}),t?this.concat(t,i,n)._parse(e,r):this._parse(e,r)},Ln.prototype._parse=function(e,t){function i(e,t,i){return"assert"===i?new Re(t,[e]):"coerce"===i?new ot(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var o=r.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=i(o,a,t.typeAnnotation||"coerce");else o=i(o,a,t.typeAnnotation||"assert")}return!(o instanceof bi)&&o.type.kind,o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},Ln.prototype.concat=function(e,t,i){var n="number"==typeof e?this.path.concat(e):this.path,r=i?this.scope.concat(i):this.scope;return new Ln(this.registry,n,t||null,r,this.errors)},Ln.prototype.error=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new xn(n,e))},Ln.prototype.checkSubtype=function(e,t){var i=W(e,t);return i&&this.error(i),i};var Rn=function(e,t,i,n){this.name=e,this.type=t,this._evaluate=i,this.args=n};function On(e){return Array.isArray(e)?"("+e.map(toString).join(", ")+")":"("+toString(e.type)+"...)"}Rn.prototype.evaluate=function(e,t){return this._evaluate(e,this.args,t)},Rn.prototype.eachChild=function(e){this.args.forEach(e)},Rn.prototype.possibleOutputs=function(){return[void 0]},Rn.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},Rn.parse=function(e,t){var i,n=e[0],r=Rn.definitions[n];if(!r)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=a.filter((function(t){var i=t[0];return!Array.isArray(i)||i.length===e.length-1})),l=null,u=0,c=s;u<c.length;u+=1){var h=c[u],d=h[0],f=h[1];l=new Ln(t.registry,t.path,null,t.scope);for(var p=[],_=!1,m=1;m<e.length;m++){var g=e[m],x=Array.isArray(d)?d[m-1]:d.type,y=l.parse(g,1+p.length,x);if(!y){_=!0;break}p.push(y)}if(!_)if(Array.isArray(d)&&d.length!==p.length)l.error("Expected "+d.length+" arguments, but found "+p.length+" instead.");else{for(var v=0;v<p.length;v++){var $=Array.isArray(d)?d[v]:d.type,b=p[v];l.concat(v+1).checkSubtype($,b.type)}if(0===l.errors.length)return new Rn(n,o,f,p)}}if(1===s.length)(i=t.errors).push.apply(i,l.errors);else{for(var T=(s.length?s:a).map((function(e){return On(e[0])})).join(" | "),C=[],S=1;S<e.length;S++){var w=t.parse(e[S],1+C.length);if(!w)return null;C.push(toString(w.type))}t.error("Expected arguments of type "+T+", but found ("+C.join(", ")+") instead.")}return null},Rn.register=function(e,t){for(var i in Rn.definitions=t,t)e[i]=Rn},en.register("CompoundExpression",Rn);var Dn={kind:"number"},In={kind:"string"},Fn={kind:"boolean"},Bn={kind:"color"},Nn={kind:"object"},Gn={kind:"value"},zn={kind:"error"},Un={kind:"collator"};function Vn(e,t){return{kind:"array",itemType:e,N:t}}function kn(e){return{type:e}}function Wn(e,t){var i=t[0],n=t[1],r=t[2],o=t[3];i=i.evaluate(e),n=n.evaluate(e),r=r.evaluate(e);var a=o?o.evaluate(e):1,s=Values.validateRGBA(i,n,r,a);if(s)throw new RuntimeError(s);return new Color(i/255*a,n/255*a,r/255*a,a)}Rn.register(Ki,{error:[zn,[In],function(e,t){var i=t[0];throw new RuntimeError(i.evaluate(e))}],typeof:[In,[Gn],function(e,t){var i=t[0];return toString(Values.typeOf(i.evaluate(e)))}],"to-rgba":[Vn(Dn,4),[Bn],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[Bn,[Dn,Dn,Dn],Wn],rgba:[Bn,[Dn,Dn,Dn,Dn],Wn],has:{type:Fn,overloads:[[[In],function(e,t){var i=t[0];return has(i.evaluate(e),e.properties())}],[[In,Nn],function(e,t){var i=t[0],n=t[1];return has(i.evaluate(e),n.evaluate(e))}]]},get:{type:Gn,overloads:[[[In],function(e,t){return Mn(t[0].evaluate(e),e.properties())}],[[In,Nn],function(e,t){var i=t[0],n=t[1];return Mn(i.evaluate(e),n.evaluate(e))}]]},"feature-state":[Gn,[In],function(e,t){return Mn(t[0].evaluate(e),e.featureState||{})}],properties:[Nn,[],function(e){return e.properties()}],"geometry-type":[In,[],function(e){return e.geometryType()}],id:[Gn,[],function(e){return e.id()}],zoom:[Dn,[],function(e){return e.globals.zoom}],"heatmap-density":[Dn,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[Dn,[],function(e){return e.globals.lineProgress||0}],accumulated:[Gn,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[Dn,kn(Dn),function(e,t){for(var i=0,n=0,r=t;n<r.length;n+=1)i+=r[n].evaluate(e);return i}],"*":[Dn,kn(Dn),function(e,t){for(var i=1,n=0,r=t;n<r.length;n+=1)i*=r[n].evaluate(e);return i}],"-":{type:Dn,overloads:[[[Dn,Dn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)-n.evaluate(e)}],[[Dn],function(e,t){return-t[0].evaluate(e)}]]},"/":[Dn,[Dn,Dn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)/n.evaluate(e)}],"%":[Dn,[Dn,Dn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)%n.evaluate(e)}],ln2:[Dn,[],function(){return Math.LN2}],pi:[Dn,[],function(){return Math.PI}],e:[Dn,[],function(){return Math.E}],"^":[Dn,[Dn,Dn],function(e,t){var i=t[0],n=t[1];return Math.pow(i.evaluate(e),n.evaluate(e))}],sqrt:[Dn,[Dn],function(e,t){var i=t[0];return Math.sqrt(i.evaluate(e))}],log10:[Dn,[Dn],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN10}],ln:[Dn,[Dn],function(e,t){var i=t[0];return Math.log(i.evaluate(e))}],log2:[Dn,[Dn],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN2}],sin:[Dn,[Dn],function(e,t){var i=t[0];return Math.sin(i.evaluate(e))}],cos:[Dn,[Dn],function(e,t){var i=t[0];return Math.cos(i.evaluate(e))}],tan:[Dn,[Dn],function(e,t){var i=t[0];return Math.tan(i.evaluate(e))}],asin:[Dn,[Dn],function(e,t){var i=t[0];return Math.asin(i.evaluate(e))}],acos:[Dn,[Dn],function(e,t){var i=t[0];return Math.acos(i.evaluate(e))}],atan:[Dn,[Dn],function(e,t){var i=t[0];return Math.atan(i.evaluate(e))}],min:[Dn,kn(Dn),function(e,t){return Math.min.apply(Math,t.map((function(t){return t.evaluate(e)})))}],max:[Dn,kn(Dn),function(e,t){return Math.max.apply(Math,t.map((function(t){return t.evaluate(e)})))}],abs:[Dn,[Dn],function(e,t){var i=t[0];return Math.abs(i.evaluate(e))}],round:[Dn,[Dn],function(e,t){var i=t[0].evaluate(e);return i<0?-Math.round(-i):Math.round(i)}],floor:[Dn,[Dn],function(e,t){var i=t[0];return Math.floor(i.evaluate(e))}],ceil:[Dn,[Dn],function(e,t){var i=t[0];return Math.ceil(i.evaluate(e))}],"filter-==":[Fn,[In,Gn],function(e,t,i){var n=t[0],r=t[1];if(i){var o,a,s=n.value,l=r.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":o=c+d;break;case"-":o=c-d}return o===(a=r.value)}if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(o="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);a="left"==g?d.substring(0,x):d.substring(d.length-x)}else a=r.value;return o===a}return e.properties()[n.value]===e.properties()[r.value]}return e.properties()[n.value]===r.value}],"filter-id-==":[Fn,[Gn],function(e,t){var i=t[0];return e.id()===i.value}],"filter-like":[Fn,[In,In],function(e,t){var i=t[0].value,n=t[1].value,r=e.properties();return i in r&&(/^%.*[^%]$/.test(n)?(n=n.replace("%",""),r[i].endsWith(n)):/^(?!%).+%$/.test(n)?(n=n.replace("%",""),r[i].startsWith(n)):(n=n.replace(/%/g,""),r[i].indexOf(n)>-1))}],"filter-type-==":[Fn,[In],function(e,t){var i=t[0];return e.geometryType()===i.value}],"filter-<":[Fn,[In,Gn],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<r}],"filter-id-<":[Fn,[Gn],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<r}],"filter->":[Fn,[In,Gn],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>r}],"filter-id->":[Fn,[Gn],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[Fn,[In,Gn],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<=r}],"filter-id-<=":[Fn,[Gn],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[Fn,[In,Gn],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>=r}],"filter-id->=":[Fn,[Gn],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[Fn,[Gn],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[Fn,[],function(e){return null!==e.id()}],"filter-type-in":[Fn,[Vn(In)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[Fn,[Vn(Gn)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[Fn,[In,Vn(Gn)],function(e,t){var i=t[0];return t[1].value.indexOf(e.properties()[i.value])>=0}],"filter-in-large":[Fn,[In,Vn(Gn)],function(e,t){var i=t[0],n=t[1];return binarySearch(e.properties()[i.value],n.value,0,n.value.length-1)}],all:{type:Fn,overloads:[[[Fn,Fn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)&&n.evaluate(e)}],[kn(Fn),function(e,t){for(var i=0,n=t;i<n.length;i+=1)if(!n[i].evaluate(e))return!1;return!0}]]},crossFields:{type:Fn,overloads:[[[Fn,Fn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e,!0)&&n.evaluate(e,!0)}],[kn(Fn),function(e,t){for(var i=0,n=t;i<n.length;i+=1)if(!n[i].evaluate(e,!0))return!1;return!0}]]},any:{type:Fn,overloads:[[[Fn,Fn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)||n.evaluate(e)}],[kn(Fn),function(e,t){for(var i=0,n=t;i<n.length;i+=1)if(n[i].evaluate(e))return!0;return!1}]]},"!":[Fn,[Fn],function(e,t,i){return!t[0].evaluate(e,i)}],"is-supported-script":[Fn,[In],function(e,t){var i=t[0],n=e.globals&&e.globals.isSupportedScript;return!n||n(i.evaluate(e))}],upcase:[In,[In],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[In,[In],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[In,kn(Gn),function(e,t){return t.map((function(t){return Values.toString$1(t.evaluate(e))})).join("")}],"resolved-locale":[In,[Un],function(e,t){return t[0].evaluate(e).resolvedLocale()}]}),Ln.CompoundExpression=Rn;var Hn,qn=(Hn=!0,function(e,t){var i=Hn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Hn=!1,i}),jn=qn(void 0,(function(){return jn.toString().search("(((.+)+)+)+$").toString().constructor(jn).search("(((.+)+)+)+$")}));jn();var Xn=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new bn,this._defaultValue=t?Zn(t):null,this._enumValues=t&&"enum"===t.type?t.values:null};function Yn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Zn(e){return"color"===e.type&&Yn(e.default)?new M(0,0,0,0):"color"===e.type?M.parse(e.default)||null:void 0===e.default?null:e.default}Xn.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r,this.expression.evaluate(this._evaluator)},Xn.prototype.evaluate=function(e,t,i,n,r){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=i||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new RuntimeError("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(e){return!this._warningHistory[e.message]&&(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}},en.register("StyleExpression",Xn);var Kn,Qn=(Kn=!0,function(e,t){var i=Kn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Kn=!1,i}),Jn=Qn(void 0,(function(){return Jn.toString().search("(((.+)+)+)+$").toString().constructor(Jn).search("(((.+)+)+)+$")}));function er(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function tr(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function ir(e){return!!e.expression&&e.expression.interpolated}Jn();var nr,rr=(nr=!0,function(e,t){var i=nr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return nr=!1,i}),or=rr(void 0,(function(){return or.toString().search("(((.+)+)+)+$").toString().constructor(or).search("(((.+)+)+)+$")}));function ar(){}function sr(e){return{result:"success",value:e}}function lr(e){return{result:"error",value:e}}or(),ar.isExpression=function(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in Ki};var ur={kind:"number"},cr={kind:"string"},hr={kind:"boolean"},dr={kind:"color"},fr={kind:"value"},pr={kind:"formatted"},_r={kind:"resolvedImage"};function mr(e,t){return{kind:"array",itemType:e,N:t}}function gr(e){var t=null;if(e instanceof fi)t=gr(e.result);else if(e instanceof Ye){for(var i of e.args)if(t=gr(i))break}else(e instanceof Vi||e instanceof Kt)&&e.input instanceof Ln.CompoundExpression&&"zoom"===e.input.name&&(t=e);return t instanceof xn||e.eachChild((e=>{var i=gr(e);i instanceof xn?t=i:!t&&i?t=new xn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new xn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function xr(e){var t={color:dr,string:cr,number:ur,enum:cr,boolean:hr,formatted:pr,resolvedImage:_r};return"array"===e.type?mr(t[e.value]||fr,e.length):t[e.type]}function yr(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function vr(e){return e}function $r(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}function br(e,t,i){var n=void 0!==e.base?e.base:1;if("number"!==Rr(i))return Ar(e.default,t.default);var r=e.stops.length;if(1===r)return e.stops[0][1];if(i<=e.stops[0][0])return e.stops[0][1];if(i>=e.stops[r-1][0])return e.stops[r-1][1];var o=Bi(e.stops.map((e=>e[0])),i),a=Lr(i,n,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],u=interpolate[t.type]||vr;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=colorSpaces[e.colorSpace];u=(e,t)=>c.reverse(c.interpolate(c.forward(e),c.forward(t),a))}return"function"==typeof s.evaluate?{evaluate(...e){var t=s.evaluate.apply(void 0,e),i=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==i)return u(t,i,a)}}:u(s,l,a)}function Tr(e,t,i){return"color"===t.type?i=M.parse(i):"formatted"===t.type?i=Formatted.fromString(i.toString()):"resolvedImage"===t.type?i=ResolvedImage.fromString(i.toString()):Rr(i)!==t.type&&("enum"!==t.type||!t.values[i])&&(i=void 0),Ar(i,e.default,t.default)}function Cr(e,t){var i=new Ln(Ki,[],t?xr(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?sr(new Xn(n,t)):lr(i.errors)}function Sr(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!wn.isStateConstant(t.expression)}function wr(e,t,i,n){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent="camera"!==e&&!wn.isStateConstant(t.expression),this.interpolationType=n}function Er(e,t){if("error"===(e=Cr(e,t)).result)return e;var i=e.value.expression,n=wn.isFeatureConstant(i);if(!n&&!er(t))return lr([new xn("","data expressions not supported")]);var r=wn.isGlobalPropertyConstant(i,["zoom"]);if(!r&&!tr(t))return lr([new xn("","zoom expressions not supported")]);var o=gr(i);if(!o&&!r)return lr([new xn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof xn)return lr([o]);if(o instanceof Kt&&!ir(t))return lr([new xn("",'"interpolate" expressions cannot be used with this property')]);if(!o)return sr(new Sr(n?"constant":"source",e.value));var a=o instanceof Kt?o.interpolation:void 0;return sr(new wr(n?"camera":"composite",e.value,o.labels,a))}function Pr(e,t){var i,n,r,o="color"===t.type,a=e.stops&&"object"==typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,u=e.type||(ir(t)?"exponential":"interval");if(o&&((e=$r({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],M.parse(e[1])]}))),e.default?e.default=M.parse(e.default):e.default=M.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!colorSpaces[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)i=br;else if("interval"===u)i=evaluateIntervalFunction;else if("categorical"===u){i=evaluateCategoricalFunction,n=Object.create(null);for(var c=0,h=e.stops;c<h.length;c+=1){var d=h[c];n[d[0]]=d[1]}r=typeof e.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');i=Tr}if(a){for(var f={},p=[],_=0;_<e.stops.length;_++){var m=e.stops[_],g=m[0].zoom;void 0===f[g]&&(f[g]={zoom:g,type:e.type,property:e.property,default:e.default,stops:[]},p.push(g)),f[g].stops.push([m[0].value,m[1]])}for(var x=[],y=0,v=p;y<v.length;y+=1){var $=v[y];x.push([f[$].zoom,Pr(f[$],t)])}var b={name:"linear"};return{kind:"composite",interpolationType:b,interpolationFactor:Kt.interpolationFactor.bind(void 0,b),zoomStops:x.map((function(e){return e[0]})),evaluate:function(i,n){var r=i.zoom;return br({stops:x,base:e.base},t,r).evaluate(r,n)}}}if(l){var T="exponential"===u?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:T,interpolationFactor:Kt.interpolationFactor.bind(void 0,T),zoomStops:e.stops.map((function(e){return e[0]})),evaluate:function(o){var a=o.zoom;return i(e,t,a,n,r)}}}return{kind:"source",evaluate:function(o,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?Ar(e.default,t.default):i(e,t,s,n,r)}}}function Ar(e,t,i){return void 0!==e?e:void 0!==t?t:void 0!==i?i:void 0}function Lr(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}ar.createExpression=function(e,t){var i=new Ln(Ki,[],t?xr(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?sr(new Xn(n,t)):lr(i.errors)},Sr.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},Sr.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},en.register("ZoomConstantExpression",Sr),wr.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},wr.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},wr.prototype.interpolationFactor=function(e,t,i){return this.interpolationType?Kt.interpolationFactor(this.interpolationType,e,t,i):0},en.register("ZoomDependentExpression",wr);var Mr=function(e,t){this._parameters=e,this._specification=t,$r(this,Pr(this._parameters,this._specification))};function Rr(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}Mr.deserialize=function(e){return new Mr(e._parameters,e._specification)},Mr.serialize=function(e){return{_parameters:e._parameters,_specification:e._specification}},en.register("StylePropertyFunction",Mr),ar.normalizePropertyExpression=function(e,t){if(yr(e))return new Mr(e,t);if(ar.isExpression(e)){var i=Er(e,t);if("error"===i.result)throw new Error(i.value.map((function(e){return e.key+": "+e.message})).join(", "));return i.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=M.parse(e)),{kind:"constant",evaluate:function(){return n}}};var Or,Dr=(Or=!0,function(e,t){var i=Or?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Or=!1,i}),Ir=Dr(void 0,(function(){return Ir.toString().search("(((.+)+)+)+$").toString().constructor(Ir).search("(((.+)+)+)+$")}));function Fr(){}Ir(),Fr.isExpressionFilter=function(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&Array.isArray(e[2]);case"!in":case"!has":case"none":case"crossFields":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":case"like":case"!like":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,i=e.slice(1);t<i.length;t+=1){var n=i[t];if(!Fr.isExpressionFilter(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}};var Br={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Nr(e,t){return e<t?-1:e>t?1:0}function Gr(e){if(!e)return!0;var t=e[0];return e.length<=1?"any"!==t:"=="===t?zr(e[1],e[2],"=="):"!="===t?Wr(zr(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?zr(e[1],e[2],t):"any"===t?Ur(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(Gr)):"crossFields"===t?["crossFields"].concat(e.slice(1).map(Gr)):"none"===t?["all"].concat(e.slice(1).map(Gr).map(Wr)):"in"===t?Vr(e[1],e.slice(2)):"!in"===t?Wr(Vr(e[1],e.slice(2))):"has"===t?kr(e[1]):"!has"===t?Wr(kr(e[1])):"like"===t?zr(e[1],e[2],"like"):"!like"!==t||Wr(zr(e[1],e[2],"like"))}function zr(e,t,i){switch(e){case"$type":return["filter-type-"+i,t];case"$id":return["filter-id-"+i,t];default:return["filter-"+i,e,t]}}function Ur(e){return["any"].concat(e.map(Gr))}function Vr(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(Nr)]]:["filter-in-small",e,["literal",t]]}}function kr(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Wr(e){return["!",e]}Fr.createFilter=function(e){if(null==e)return function(){return!0};!Fr.isExpressionFilter(e)&&(e=Gr(e));var t=ar.createExpression(e,Br);if("error"===t.result)throw new Error(t.value.map((function(e){return e.key+": "+e.message})).join(", "));return function(e,i){return t.value.evaluate(e,i)}};var Hr,qr=(Hr=!0,function(e,t){var i=Hr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Hr=!1,i}),jr=qr(void 0,(function(){return jr.toString().search("(((.+)+)+)+$").toString().constructor(jr).search("(((.+)+)+)+$")}));jr();const Xr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Yr(e){var t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var i="[",n=0,r=e;n<r.length;n+=1)i+=Yr(r[n])+",";return i+"]"}for(var o=Object.keys(e).sort(),a="{",s=0;s<o.length;s++)a+=JSON.stringify(o[s])+":"+Yr(e[o[s]])+",";return a+"}"}function Zr(e){for(var t="",i=0,n=Xr;i<n.length;i+=1)t+="/"+Yr(e[n[i]]);return t}function Kr(e,t){for(var i={},n=0;n<e.length;n++){var r=t&&t[e[n].id]||Zr(e[n]);t&&(t[e[n].id]=r);var o=i[r];!o&&(o=i[r]=[]),o.push(e[n])}var a=[];for(var s in i)a.push(i[s]);return a}var Qr,Jr=(Qr=!0,function(e,t){var i=Qr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Qr=!1,i}),eo=Jr(void 0,(function(){return eo.toString().search("(((.+)+)+)+$").toString().constructor(eo).search("(((.+)+)+)+$")}));function to(e,t){this.x=e,this.y=t}eo(),to.prototype={clone:function(){return new to(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,i=e.y-this.y;return t*t+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,i=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=i,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),i=Math.sin(e),n=t*this.x-i*this.y,r=i*this.x+t*this.y;return this.x=n,this.y=r,this},_rotateAround:function(e,t){var i=Math.cos(e),n=Math.sin(e),r=t.x+i*(this.x-t.x)-n*(this.y-t.y),o=t.y+n*(this.x-t.x)+i*(this.y-t.y);return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},to.convert=function(e){return e instanceof to?e:Array.isArray(e)?new to(e[0],e[1]):e};var io,no=(io=!0,function(e,t){var i=io?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return io=!1,i}),ro=no(void 0,(function(){return ro.toString().search("(((.+)+)+)+$").toString().constructor(ro).search("(((.+)+)+)+$")}));ro();var oo={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};function ao(e,t){void 0===t&&(t=1);var i=0,n=0;return{members:e.map((function(e){var r=so(e.type),o=i=lo(i,Math.max(t,r)),a=e.components||1;return n=Math.max(n,r),i+=r*a,{name:e.name,type:e.type,components:a,offset:o}})),size:lo(i,Math.max(n,t)),alignment:t}}function so(e){return oo[e].BYTES_PER_ELEMENT}function lo(e,t){return Math.ceil(e/t)*t}var uo,co=(uo=!0,function(e,t){var i=uo?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return uo=!1,i}),ho=co(void 0,(function(){return ho.toString().search("(((.+)+)+)+$").toString().constructor(ho).search("(((.+)+)+)+$")}));ho();var fo=function(){this.first=!0};fo.prototype.update=function(e,t){var i=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<i&&(this.lastIntegerZoom=i,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=i,!0))},en.register("ZoomHistory",fo);var po,_o=(po=!0,function(e,t){var i=po?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return po=!1,i}),mo=_o(void 0,(function(){return mo.toString().search("(((.+)+)+)+$").toString().constructor(mo).search("(((.+)+)+)+$")}));mo();var go=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new fo,this.transition={})};go.prototype.isSupportedScript=function(e){return!1},go.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},go.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),i=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*t}},en.register("EvaluationParameters",go);var xo,yo=(xo=!0,function(e,t){var i=xo?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return xo=!1,i}),vo=yo(void 0,(function(){return vo.toString().search("(((.+)+)+)+$").toString().constructor(vo).search("(((.+)+)+)+$")}));vo();var $o=8192;function bo(e,t,i){return Math.min(i,Math.max(t,e))}function To(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),{min:-1*Math.pow(2,e-1),max:Math.pow(2,e-1)-1}}var Co=To(15);function So(e){for(var t=$o/e.extent,i=e.loadGeometry(),n=0;n<i.length;n++)for(var r=i[n],o=0;o<r.length;o++){var a=r[o];a.x=Math.round(a.x*t),a.y=$o-Math.round(a.y*t),(a.x<Co.min||a.x>Co.max||a.y<Co.min||a.y>Co.max)&&(a.x=bo(a.x,Co.min,Co.max),a.y=bo(a.y,Co.min,Co.max))}return i}var wo,Eo=(wo=!0,function(e,t){var i=wo?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wo=!1,i}),Po=Eo(void 0,(function(){return Po.toString().search("(((.+)+)+)+$").toString().constructor(Po).search("(((.+)+)+)+$")}));Po();var Ao=function(e){void 0===e&&(e=[]),this.segments=e};Ao.prototype.prepareSegment=function(e,t,i,n){var r=this.segments[this.segments.length-1];return(!r||r.vertexLength+e>Ao.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==n)&&(r={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},void 0!==n&&(r.sortKey=n),this.segments.push(r)),r},Ao.prototype.get=function(){return this.segments},Ao.prototype.destroy=function(){for(var e=0,t=this.segments;e<t.length;e+=1){var i=t[e];for(var n in i.cesiumVaos)i.cesiumVaos[n].destroy()}},Ao.simpleSegment=function(e,t,i,n){return new Ao([{vertexOffset:e,primitiveOffset:t,vertexLength:i,primitiveLength:n,vaos:{},cesiumVaos:{},drawCommands:{},sortKey:0}])},Ao.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,en.register("SegmentVector",Ao);const Lo=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Mo=Lo(void 0,(function(){return Mo.toString().search("(((.+)+)+)+$").toString().constructor(Mo).search("(((.+)+)+)+$")}));Mo();var Ro=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8};const Oo=128,Do=5;var Io=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Io.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},Io.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},Io.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Io.prototype.clear=function(){this.length=0},Io.prototype.resize=function(e){this.reserve(e),this.length=e},Io.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*Do),Oo),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&(0==t.length&&console.log("oldUint8Array.length == 0"),this.uint8.set(t))}},Io.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Fo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=i,e},t}(Io);Fo.prototype.bytesPerElement=4,en.register("StructArrayLayout2i4",Fo);var Bo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=i,this.int16[o+2]=n,this.int16[o+3]=r,e},t}(Io);Bo.prototype.bytesPerElement=8,en.register("StructArrayLayout4i8",Bo);var No=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(Io);No.prototype.bytesPerElement=12,en.register("StructArrayLayout2i4i12",No);var Go=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.uint8[l+4]=n,this.uint8[l+5]=r,this.uint8[l+6]=o,this.uint8[l+7]=a,e},t}(Io);Go.prototype.bytesPerElement=8,en.register("StructArrayLayout2i4ub8",Go);var zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=i,this.uint16[u+2]=n,this.uint16[u+3]=r,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,e},t}(Io);zo.prototype.bytesPerElement=16,en.register("StructArrayLayout8ui16",zo);var Uo=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},r.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},r.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.int16[f+0]=t,this.int16[f+1]=i,this.int16[f+2]=n,this.int16[f+3]=r,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=d,e},r}(Io);Uo.prototype.bytesPerElement=24,en.register("StructArrayLayout4i4ui4i24",Uo);var Vo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.float32[r+0]=t,this.float32[r+1]=i,this.float32[r+2]=n,e},t}(Io);Vo.prototype.bytesPerElement=12,en.register("StructArrayLayout3f12",Vo);var ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint32[i+0]=t,e},t}(Io);ko.prototype.bytesPerElement=4,en.register("StructArrayLayout1ul4",ko);var Wo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c){var h=this.length;return this.resize(h+1),this.emplace(h,e,t,i,n,r,o,a,s,l,u,c)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=12*e,f=6*e;return this.int16[d+0]=t,this.int16[d+1]=i,this.int16[d+2]=n,this.int16[d+3]=r,this.int16[d+4]=o,this.int16[d+5]=a,this.uint32[f+3]=s,this.uint16[d+8]=l,this.uint16[d+9]=u,this.int16[d+10]=c,this.int16[d+11]=h,e},t}(Io);Wo.prototype.bytesPerElement=24,en.register("StructArrayLayout6i1ul2ui2i24",Wo);var Ho=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(Io);Ho.prototype.bytesPerElement=12,en.register("StructArrayLayout2i2i2i12",Ho);var qo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=i,this.float32[a+1]=n,this.float32[a+2]=r,e},t}(Io);qo.prototype.bytesPerElement=12,en.register("StructArrayLayout2ub2f12",qo);var jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var g=this.length;return this.resize(g+1),this.emplace(g,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g){var x=24*e,y=12*e,v=48*e;return this.int16[x+0]=t,this.int16[x+1]=i,this.uint16[x+2]=n,this.uint16[x+3]=r,this.uint32[y+2]=o,this.uint32[y+3]=a,this.uint32[y+4]=s,this.uint16[x+10]=l,this.uint16[x+11]=u,this.uint16[x+12]=c,this.float32[y+7]=h,this.float32[y+8]=d,this.uint8[v+36]=f,this.uint8[v+37]=p,this.uint8[v+38]=_,this.uint32[y+10]=m,this.int16[x+22]=g,e},t}(Io);jo.prototype.bytesPerElement=48,en.register("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",jo);var Xo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S){var w=this.length;return this.resize(w+1),this.emplace(w,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S,w){var E=30*e,P=15*e;return this.int16[E+0]=t,this.int16[E+1]=i,this.int16[E+2]=n,this.int16[E+3]=r,this.int16[E+4]=o,this.int16[E+5]=a,this.int16[E+6]=s,this.int16[E+7]=l,this.uint16[E+8]=u,this.uint16[E+9]=c,this.uint16[E+10]=h,this.uint16[E+11]=d,this.uint16[E+12]=f,this.uint16[E+13]=p,this.uint16[E+14]=_,this.uint16[E+15]=m,this.uint16[E+16]=g,this.uint16[E+17]=x,this.uint16[E+18]=y,this.uint16[E+19]=v,this.uint16[E+20]=$,this.uint16[E+21]=b,this.uint32[P+11]=T,this.float32[P+12]=C,this.float32[P+13]=S,this.float32[P+14]=w,e},t}(Io);Xo.prototype.bytesPerElement=60,en.register("StructArrayLayout8i14ui1ul3f60",Xo);var Yo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.float32[i+0]=t,e},t}(Io);Yo.prototype.bytesPerElement=4,en.register("StructArrayLayout1f4",Yo);var Zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.int16[r+0]=t,this.int16[r+1]=i,this.int16[r+2]=n,e},t}(Io);Zo.prototype.bytesPerElement=6,en.register("StructArrayLayout3i6",Zo);var Ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=2*e,o=4*e;return this.uint32[r+0]=t,this.uint16[o+2]=i,this.uint16[o+3]=n,e},t}(Io);Ko.prototype.bytesPerElement=8,en.register("StructArrayLayout1ul2ui8",Ko);var Qo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.uint16[r+0]=t,this.uint16[r+1]=i,this.uint16[r+2]=n,e},t}(Io);Qo.prototype.bytesPerElement=6,en.register("StructArrayLayout3ui6",Qo);var Jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=i,e},t}(Io);Jo.prototype.bytesPerElement=4,en.register("StructArrayLayout2ui4",Jo);var ea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint16[i+0]=t,e},t}(Io);ea.prototype.bytesPerElement=2,en.register("StructArrayLayout1ui2",ea);var ta=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=i,e},t}(Io);ta.prototype.bytesPerElement=8,en.register("StructArrayLayout2f8",ta);var ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=i,this.float32[o+2]=n,this.float32[o+3]=r,e},t}(Io);ia.prototype.bytesPerElement=16,en.register("StructArrayLayout4f16",ia);var na=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.float32[s+0]=t,this.float32[s+1]=i,this.float32[s+2]=n,this.float32[s+3]=r,this.float32[s+4]=o,this.float32[s+5]=a,e},t}(Io);na.prototype.bytesPerElement=24,en.register("StructArrayLayout6f24",na);var ra=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.float32[u+0]=t,this.float32[u+1]=i,this.float32[u+2]=n,this.float32[u+3]=r,this.float32[u+4]=o,this.float32[u+5]=a,this.float32[u+6]=s,this.float32[u+7]=l,e},t}(Io);ra.prototype.bytesPerElement=32,en.register("StructArrayLayout8f32",ra);var oa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.float32[f+0]=t,this.float32[f+1]=i,this.float32[f+2]=n,this.float32[f+3]=r,this.float32[f+4]=o,this.float32[f+5]=a,this.float32[f+6]=s,this.float32[f+7]=l,this.float32[f+8]=u,this.float32[f+9]=c,this.float32[f+10]=h,this.float32[f+11]=d,e},t}(Io);oa.prototype.bytesPerElement=48,en.register("StructArrayLayout12f48",oa);var aa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return i.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.x1.get=function(){return this._structArray.int16[this._pos2+2]},i.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},i.y1.get=function(){return this._structArray.int16[this._pos2+3]},i.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},i.x2.get=function(){return this._structArray.int16[this._pos2+4]},i.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},i.y2.get=function(){return this._structArray.int16[this._pos2+5]},i.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.radius.get=function(){return this._structArray.int16[this._pos2+10]},i.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},i.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},i.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},i.anchorPoint.get=function(){return new pointGeometry(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,i),t}(Ro);aa.prototype.size=24;var sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new aa(this,e)},t}(Wo);en.register("CollisionBoxArray",sa);var la=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},i.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},i.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},i.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},i.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},i.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},i.segment.get=function(){return this._structArray.uint16[this._pos2+10]},i.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},i.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},i.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},i.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},i.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},i.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},i.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},i.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},i.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},i.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},i.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},i.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},i.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},i.associatedIconIndex.set=function(e){this._structArray.int16[this._pos2+22]=e},Object.defineProperties(t.prototype,i),t}(Ro);la.prototype.size=48;var ua=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new la(this,e)},t}(jo);en.register("PlacedSymbolArray",ua);var ca=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},i.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},i.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},i.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},i.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},i.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},i.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},i.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},i.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},i.placedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+6]=e},i.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},i.verticalPlacedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+7]=e},i.key.get=function(){return this._structArray.uint16[this._pos2+8]},i.key.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},i.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},i.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},i.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},i.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},i.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},i.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+14]=e},i.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},i.verticalIconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+15]=e},i.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},i.verticalIconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+16]=e},i.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},i.featureIndex.set=function(e){this._structArray.uint16[this._pos2+17]=e},i.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},i.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+18]=e},i.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},i.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+19]=e},i.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},i.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+20]=e},i.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},i.numVerticalIconVertices.set=function(e){this._structArray.uint16[this._pos2+21]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+11]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+11]=e},i.textBoxScale.get=function(){return this._structArray.float32[this._pos4+12]},i.textBoxScale.set=function(e){this._structArray.float32[this._pos4+12]=e},i.textOffset0.get=function(){return this._structArray.float32[this._pos4+13]},i.textOffset0.set=function(e){this._structArray.float32[this._pos4+13]=e},i.textOffset1.get=function(){return this._structArray.float32[this._pos4+14]},i.textOffset1.set=function(e){this._structArray.float32[this._pos4+14]=e},Object.defineProperties(t.prototype,i),t}(Ro);ca.prototype.size=60;var ha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ca(this,e)},t}(Xo);en.register("SymbolInstanceArray",ha);var da=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={offsetX:{configurable:!0}};return i.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},i.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,i),t}(Ro);da.prototype.size=4;var fa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new da(this,e)},t}(Yo);en.register("GlyphOffsetArray",fa);var pa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return i.x.get=function(){return this._structArray.int16[this._pos2+0]},i.x.set=function(e){this._structArray.int16[this._pos2+0]=e},i.y.get=function(){return this._structArray.int16[this._pos2+1]},i.y.set=function(e){this._structArray.int16[this._pos2+1]=e},i.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},i.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,i),t}(Ro);pa.prototype.size=6;var _a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new pa(this,e)},t}(Zo);en.register("SymbolLineVertexArray",_a);var ma=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,i),t}(Ro);ma.prototype.size=8;var ga=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ma(this,e)},t}(Ko);en.register("FeatureIndexArray",ga);var xa,ya=(xa=!0,function(e,t){var i=xa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return xa=!1,i}),va=ya(void 0,(function(){return va.toString().search("(((.+)+)+)+$").toString().constructor(va).search("(((.+)+)+)+$")}));va();var $a=function(e,t,i){this.property=e,this.value=t,this.parameters=i};$a.prototype.isConstant=function(){return"constant"===this.value.kind},$a.prototype.constantOr=function(e){return"constant"===this.value.kind?this.value.value:e},$a.prototype.evaluate=function(e,t,i){return this.property.evaluate(this.value,this.parameters,e,t,i)};var ba={},Ta=function(e,t){this.gl=e.gl,this.location=t};ba.Uniform1i=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,t,i),this.current=0}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},r}(Ta),ba.Uniform1f=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(Ta),ba.Uniform2f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(Ta),ba.Uniform3f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(Ta),ba.Uniform4f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},t}(Ta),ba.UniformColor=function(e){function t(t,i){e.call(this,t,i),this.current=M.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(Ta);var Ca=new Float32Array(16);function Sa(e,t){return e??t}function wa(e){return null!=e}function Ea(e){var t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}ba.UniformMatrix4f=function(e){function t(t,i){e.call(this,t,i),this.current=Ca}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.gl.uniformMatrix4fv(this.location,!1,e)},t}(Ta),Sa.EMPTY_OBJECT=Object.freeze({}),wa(Object.create)&&(Ea.prototype=Object.create(Error.prototype),Ea.prototype.constructor=Ea),Ea.prototype.toString=function(){var e=this.name+": "+this.message;return wa(this.stack)&&(e+="\n"+this.stack.toString()),e},Ea.throwInstantiationError=function(){throw new Ea("This function defines an interface and should not be called directly.")};const Pa={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047};var Aa=Object.freeze(Pa),La={BYTE:Aa.BYTE,UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,SHORT:Aa.SHORT,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,INT:Aa.INT,UNSIGNED_INT:Aa.UNSIGNED_INT,FLOAT:Aa.FLOAT,DOUBLE:Aa.DOUBLE,getSizeInBytes:function(e){if(!wa(e))throw new Ea("value is required.");switch(e){case La.BYTE:return Int8Array.BYTES_PER_ELEMENT;case La.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case La.SHORT:return Int16Array.BYTES_PER_ELEMENT;case La.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case La.INT:return Int32Array.BYTES_PER_ELEMENT;case La.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case La.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case La.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new Ea("componentDatatype is not a valid value.")}},fromTypedArray:function(e){return e instanceof Int8Array?La.BYTE:e instanceof Uint8Array?La.UNSIGNED_BYTE:e instanceof Int16Array?La.SHORT:e instanceof Uint16Array?La.UNSIGNED_SHORT:e instanceof Int32Array?La.INT:e instanceof Uint32Array?La.UNSIGNED_INT:e instanceof Float32Array?La.FLOAT:e instanceof Float64Array?La.DOUBLE:void 0},validate:function(e){return wa(e)&&(e===La.BYTE||e===La.UNSIGNED_BYTE||e===La.SHORT||e===La.UNSIGNED_SHORT||e===La.INT||e===La.UNSIGNED_INT||e===La.FLOAT||e===La.DOUBLE)},createTypedArray:function(e,t){if(!wa(e))throw new Ea("componentDatatype is required.");if(!wa(t))throw new Ea("valuesOrLength is required.");switch(e){case La.BYTE:return new Int8Array(t);case La.UNSIGNED_BYTE:return new Uint8Array(t);case La.SHORT:return new Int16Array(t);case La.UNSIGNED_SHORT:return new Uint16Array(t);case La.INT:return new Int32Array(t);case La.UNSIGNED_INT:return new Uint32Array(t);case La.FLOAT:return new Float32Array(t);case La.DOUBLE:return new Float64Array(t);default:throw new Ea("componentDatatype is not a valid value.")}},createArrayBufferView:function(e,t,i,n){if(!wa(e))throw new Ea("componentDatatype is required.");if(!wa(t))throw new Ea("buffer is required.");switch(i=Sa(i,0),n=Sa(n,(t.byteLength-i)/La.getSizeInBytes(e)),e){case La.BYTE:return new Int8Array(t,i,n);case La.UNSIGNED_BYTE:return new Uint8Array(t,i,n);case La.SHORT:return new Int16Array(t,i,n);case La.UNSIGNED_SHORT:return new Uint16Array(t,i,n);case La.INT:return new Int32Array(t,i,n);case La.UNSIGNED_INT:return new Uint32Array(t,i,n);case La.FLOAT:return new Float32Array(t,i,n);case La.DOUBLE:return new Float64Array(t,i,n);default:throw new Ea("componentDatatype is not a valid value.")}},fromName:function(e){switch(e){case"BYTE":return La.BYTE;case"UNSIGNED_BYTE":return La.UNSIGNED_BYTE;case"SHORT":return La.SHORT;case"UNSIGNED_SHORT":return La.UNSIGNED_SHORT;case"INT":return La.INT;case"UNSIGNED_INT":return La.UNSIGNED_INT;case"FLOAT":return La.FLOAT;case"DOUBLE":return La.DOUBLE;default:throw new Ea("name is not a valid value.")}}},Ma=Object.freeze(La),Ra=function(e){null==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};Ra.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++)e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30,this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0},Ra.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i<this.N-this.M;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+this.M]^e>>>1^t[1&e];for(;i<this.N-1;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+(this.M-this.N)]^e>>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},Ra.prototype.random=function(){return this.genrand_int32()*(1/4294967296)};var Oa={};function Da(e){return e+" is required, actual value was undefined"}function Ia(e,t,i){return"Expected "+i+" to be typeof "+t+", actual typeof was "+e}Oa.typeOf={},Oa.defined=function(e,t){if(!wa(t))throw new Ea(Da(e))},Oa.typeOf.func=function(e,t){if("function"!=typeof t)throw new Ea(Ia(typeof t,"function",e))},Oa.typeOf.string=function(e,t){if("string"!=typeof t)throw new Ea(Ia(typeof t,"string",e))},Oa.typeOf.number=function(e,t){if("number"!=typeof t)throw new Ea(Ia(typeof t,"number",e))},Oa.typeOf.number.lessThan=function(e,t,i){if(Oa.typeOf.number(e,t),t>=i)throw new Ea("Expected "+e+" to be less than "+i+", actual value was "+t)},Oa.typeOf.number.lessThanOrEquals=function(e,t,i){if(Oa.typeOf.number(e,t),t>i)throw new Ea("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},Oa.typeOf.number.greaterThan=function(e,t,i){if(Oa.typeOf.number(e,t),t<=i)throw new Ea("Expected "+e+" to be greater than "+i+", actual value was "+t)},Oa.typeOf.number.greaterThanOrEquals=function(e,t,i){if(Oa.typeOf.number(e,t),t<i)throw new Ea("Expected "+e+" to be greater than or equal to"+i+", actual value was "+t)},Oa.typeOf.object=function(e,t){if("object"!=typeof t)throw new Ea(Ia(typeof t,"object",e))},Oa.typeOf.bool=function(e,t){if("boolean"!=typeof t)throw new Ea(Ia(typeof t,"boolean",e))},Oa.typeOf.number.equals=function(e,t,i,n){if(Oa.typeOf.number(e,i),Oa.typeOf.number(t,n),i!==n)throw new Ea(e+" must be equal to "+t+", the actual values are "+i+" and "+n)};var Fa={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536};Fa.sign=Sa(Math.sign,(function(e){return 0==(e=+e)||e!=e?e:e>0?1:-1})),Fa.signNotZero=function(e){return e<0?-1:1},Fa.toSNorm=function(e,t){return t=Sa(t,255),Math.round((.5*Fa.clamp(e,-1,1)+.5)*t)},Fa.fromSNorm=function(e,t){return t=Sa(t,255),Fa.clamp(e,0,t)/t*2-1},Fa.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:Fa.clamp((e-t)/i,0,1)},Fa.sinh=Sa(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),Fa.cosh=Sa(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),Fa.lerp=function(e,t,i){return(1-i)*e+i*t},Fa.PI=Math.PI,Fa.ONE_OVER_PI=1/Math.PI,Fa.PI_OVER_TWO=Math.PI/2,Fa.PI_OVER_THREE=Math.PI/3,Fa.PI_OVER_FOUR=Math.PI/4,Fa.PI_OVER_SIX=Math.PI/6,Fa.THREE_PI_OVER_TWO=3*Math.PI/2,Fa.TWO_PI=2*Math.PI,Fa.ONE_OVER_TWO_PI=1/(2*Math.PI),Fa.RADIANS_PER_DEGREE=Math.PI/180,Fa.DEGREES_PER_RADIAN=180/Math.PI,Fa.RADIANS_PER_ARCSECOND=Fa.RADIANS_PER_DEGREE/3600,Fa.toRadians=function(e){if(!wa(e))throw new Ea("degrees is required.");return e*Fa.RADIANS_PER_DEGREE},Fa.toDegrees=function(e){if(!wa(e))throw new Ea("radians is required.");return e*Fa.DEGREES_PER_RADIAN},Fa.convertLongitudeRange=function(e){if(!wa(e))throw new Ea("angle is required.");var t=Fa.TWO_PI,i=e-Math.floor(e/t)*t;return i<-Math.PI?i+t:i>=Math.PI?i-t:i},Fa.clampToLatitudeRange=function(e){if(!wa(e))throw new Ea("angle is required.");return Fa.clamp(e,-1*Fa.PI_OVER_TWO,Fa.PI_OVER_TWO)},Fa.negativePiToPi=function(e){if(!wa(e))throw new Ea("angle is required.");return Fa.zeroToTwoPi(e+Fa.PI)-Fa.PI},Fa.zeroToTwoPi=function(e){if(!wa(e))throw new Ea("angle is required.");var t=Fa.mod(e,Fa.TWO_PI);return Math.abs(t)<Fa.EPSILON14&&Math.abs(e)>Fa.EPSILON14?Fa.TWO_PI:t},Fa.mod=function(e,t){if(!wa(e))throw new Ea("m is required.");if(!wa(t))throw new Ea("n is required.");return(e%t+t)%t},Fa.equalsEpsilon=function(e,t,i,n){if(!wa(e))throw new Ea("left is required.");if(!wa(t))throw new Ea("right is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");n=Sa(n,i);var r=Math.abs(e-t);return r<=n||r<=i*Math.max(Math.abs(e),Math.abs(t))},Fa.lessThan=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t<-i},Fa.lessThanOrEquals=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t<i},Fa.greaterThan=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t>i},Fa.greaterThanOrEquals=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t>-i};var Ba=[1];Fa.factorial=function(e){if("number"!=typeof e||e<0)throw new Ea("A number greater than or equal to 0 is required.");var t=Ba.length;if(e>=t)for(var i=Ba[t-1],n=t;n<=e;n++){var r=i*n;Ba.push(r),i=r}return Ba[e]},Fa.incrementWrap=function(e,t,i){if(i=Sa(i,0),!wa(e))throw new Ea("n is required.");if(t<=i)throw new Ea("maximumValue must be greater than minimumValue.");return++e>t&&(e=i),e},Fa.isPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new Ea("A number greater than or equal to 0 is required.");return 0!==e&&0==(e&e-1)},Fa.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new Ea("A number greater than or equal to 0 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},Fa.clamp=function(e,t,i){if(!wa(e))throw new Ea("value is required");if(!wa(t))throw new Ea("min is required.");if(!wa(i))throw new Ea("max is required.");return e<t?t:e>i?i:e};var Na=new Ra;Fa.setRandomNumberSeed=function(e){if(!wa(e))throw new Ea("seed is required.");Na=new Ra(e)},Fa.nextRandomNumber=function(){return Na.random()},Fa.randomBetween=function(e,t){return Fa.nextRandomNumber()*(t-e)+e},Fa.acosClamped=function(e){if(!wa(e))throw new Ea("value is required.");return Math.acos(Fa.clamp(e,-1,1))},Fa.asinClamped=function(e){if(!wa(e))throw new Ea("value is required.");return Math.asin(Fa.clamp(e,-1,1))},Fa.chordLength=function(e,t){if(!wa(e))throw new Ea("angle is required.");if(!wa(t))throw new Ea("radius is required.");return 2*t*Math.sin(.5*e)},Fa.logBase=function(e,t){if(!wa(e))throw new Ea("number is required.");if(!wa(t))throw new Ea("base is required.");return Math.log(e)/Math.log(t)},Fa.cbrt=Sa(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t})),Fa.log2=Sa(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),Fa.fog=function(e,t){var i=e*t;return 1-Math.exp(-i*i)},Fa.fastApproximateAtan=function(e){return Oa.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},Fa.fastApproximateAtan2=function(e,t){Oa.typeOf.number("x",e),Oa.typeOf.number("y",t);var i,n,r=Math.abs(e);i=Math.abs(t),n=Math.max(r,i);var o=(i=Math.min(r,i))/n;if(isNaN(o))throw new Ea("either x or y must be nonzero");return r=Fa.fastApproximateAtan(o),r=Math.abs(t)>Math.abs(e)?Fa.PI_OVER_TWO-r:r,r=e<0?Fa.PI-r:r,r=t<0?-r:r};var Ga={UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,UNSIGNED_INT:Aa.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case Ga.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Ga.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Ga.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new Ea("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return Ga.UNSIGNED_SHORT;case 4:return Ga.UNSIGNED_INT;case 1:return Ga.UNSIGNED_BYTE;default:throw new Ea("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return wa(e)&&(e===Ga.UNSIGNED_BYTE||e===Ga.UNSIGNED_SHORT||e===Ga.UNSIGNED_INT)},createTypedArray:function(e,t){if(!wa(e))throw new Ea("numberOfVertices is required.");return e>=Fa.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,i,n){if(!wa(e))throw new Ea("numberOfVertices is required.");if(!wa(t))throw new Ea("sourceArray is required.");if(!wa(i))throw new Ea("byteOffset is required.");return e>=Fa.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,i,n):new Uint16Array(t,i,n)}},za=Object.freeze(Ga),Ua={STREAM_DRAW:Aa.STREAM_DRAW,STATIC_DRAW:Aa.STATIC_DRAW,DYNAMIC_DRAW:Aa.DYNAMIC_DRAW,validate:function(e){return e===Ua.STREAM_DRAW||e===Ua.STATIC_DRAW||e===Ua.DYNAMIC_DRAW}};function Va(){return!0}function ka(e,t){function i(){throw new Ea(t)}for(var n in t=Sa(t,"This object was destroyed, i.e., destroy() was called."),e)"function"==typeof e[n]&&(e[n]=i);e.isDestroyed=Va}function Wa(e){if(e=Sa(e,Sa.EMPTY_OBJECT),Oa.defined("options.context",e.context),!wa(e.typedArray)&&!wa(e.sizeInBytes))throw new Ea("Either options.sizeInBytes or options.typedArray is required.");if(wa(e.typedArray)&&wa(e.sizeInBytes))throw new Ea("Cannot pass in both options.sizeInBytes and options.typedArray.");if(wa(e.typedArray)&&(Oa.typeOf.object("options.typedArray",e.typedArray),Oa.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!Ua.validate(e.usage))throw new Ea("usage is invalid.");var t=e.context._gl,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=wa(n);a&&(r=n.byteLength),Oa.typeOf.number.greaterThan("sizeInBytes",r,0);var s=t.createBuffer();t.bindBuffer(i,s),t.bufferData(i,a?n:r,o),t.bindBuffer(i,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this._buffer=s,this.context=e.context,e.context.memorySize+=r}Object.defineProperties(Wa.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),Wa.prototype._getBuffer=function(){return this._buffer},Wa.prototype.copyFromArrayView=function(e,t){t=Sa(t,0),Oa.defined("arrayView",e),Oa.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);var i=this._gl,n=this._bufferTarget;i.bindBuffer(n,this._buffer),i.bufferSubData(n,t,e),i.bindBuffer(n,null)},Wa.prototype.copyFromBuffer=function(e,t,i,n){if(!this._webgl2)throw new Ea("A WebGL 2 context is required.");if(!wa(e))throw new Ea("readBuffer must be defined.");if(!wa(n)||n<=0)throw new Ea("sizeInBytes must be defined and be greater than zero.");if(!wa(t)||t<0||t+n>e._sizeInBytes)throw new Ea("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!wa(i)||i<0||i+n>this._sizeInBytes)throw new Ea("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(i>=t&&i<t+n||t>i&&t<i+n))throw new Ea("When readBuffer is equal to this, the ranges [readOffset + sizeInBytes) and [writeOffset, writeOffset + sizeInBytes) must not overlap.");if(this._bufferTarget===Aa.ELEMENT_ARRAY_BUFFER&&e._bufferTarget!==Aa.ELEMENT_ARRAY_BUFFER||this._bufferTarget!==Aa.ELEMENT_ARRAY_BUFFER&&e._bufferTarget===Aa.ELEMENT_ARRAY_BUFFER)throw new Ea("Can not copy an index buffer into another buffer type.");var r=Aa.COPY_READ_BUFFER,o=Aa.COPY_WRITE_BUFFER,a=this._gl;a.bindBuffer(o,this._buffer),a.bindBuffer(r,e._buffer),a.copyBufferSubData(r,o,t,i,n),a.bindBuffer(o,null),a.bindBuffer(r,null)},Wa.prototype.getBufferData=function(e,t,i,n){if(t=Sa(t,0),i=Sa(i,0),!this._webgl2)throw new Ea("A WebGL 2 context is required.");if(!wa(e))throw new Ea("arrayView is required.");var r,o,a=e.byteLength;if(wa(n)?(r=n,wa(a)?o=1:(a=e.length,o=e.BYTES_PER_ELEMENT)):wa(a)?(r=a-i,o=1):(r=(a=e.length)-i,o=e.BYTES_PER_ELEMENT),i<0||i>a)throw new Ea("destinationOffset must be greater than zero and less than the arrayView length.");if(i+r>a)throw new Ea("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new Ea("sourceOffset must be greater than zero and less than the buffers size.");if(t+r*o>this._sizeInBytes)throw new Ea("sourceOffset + length must be less than the buffers size.");var s=this._gl,l=Aa.COPY_READ_BUFFER;s.bindBuffer(l,this._buffer),s.getBufferSubData(l,t,e,i,n),s.bindBuffer(l,null)},Wa.prototype.isDestroyed=function(){return!1},Wa.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),this.context.memorySize-=this.sizeInBytes,ka(this)};var Ha,qa=(Ha=!0,function(e,t){var i=Ha?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ha=!1,i}),ja=qa(void 0,(function(){return ja.toString().search("(((.+)+)+)+$").toString().constructor(ja).search("(((.+)+)+)+$")}));function Xa(){}ja(),Xa.ALPHA_DISABLE=0,Xa.ALPHA_ADD=1,Xa.ALPHA_COMBINE=2,Xa.ALPHA_SUBTRACT=3,Xa.ALPHA_MULTIPLY=4,Xa.ALPHA_MAXIMIZED=5,Xa.ALPHA_ONEONE=6,Xa.ALPHA_PREMULTIPLIED=7,Xa.ALPHA_PREMULTIPLIED_PORTERDUFF=8,Xa.ALPHA_INTERPOLATE=9,Xa.ALPHA_SCREENMODE=10,Xa.ALPHA_ONEONE_ONEONE=11,Xa.ALPHA_ALPHATOCOLOR=12,Xa.ALPHA_REVERSEONEMINUS=13,Xa.ALPHA_SRC_DSTONEMINUSSRCALPHA=14,Xa.ALPHA_ONEONE_ONEZERO=15,Xa.ALPHA_EXCLUSION=16,Xa.ALPHA_LAYER_ACCUMULATE=17,Xa.ALPHA_EQUATION_ADD=0,Xa.ALPHA_EQUATION_SUBSTRACT=1,Xa.ALPHA_EQUATION_REVERSE_SUBTRACT=2,Xa.ALPHA_EQUATION_MAX=3,Xa.ALPHA_EQUATION_MIN=4,Xa.ALPHA_EQUATION_DARKEN=5,Xa.DELAYLOADSTATE_NONE=0,Xa.DELAYLOADSTATE_LOADED=1,Xa.DELAYLOADSTATE_LOADING=2,Xa.DELAYLOADSTATE_NOTLOADED=4,Xa.NEVER=512,Xa.ALWAYS=519,Xa.LESS=513,Xa.EQUAL=514,Xa.LEQUAL=515,Xa.GREATER=516,Xa.GEQUAL=518,Xa.NOTEQUAL=517,Xa.KEEP=7680,Xa.ZERO=0,Xa.REPLACE=7681,Xa.INCR=7682,Xa.DECR=7683,Xa.INVERT=5386,Xa.INCR_WRAP=34055,Xa.DECR_WRAP=34056,Xa.FRONT=0,Xa.BACK=1,Xa.TEXTURE_CLAMP_ADDRESSMODE=0,Xa.TEXTURE_WRAP_ADDRESSMODE=1,Xa.TEXTURE_MIRROR_ADDRESSMODE=2,Xa.TEXTURE_CREATIONFLAG_STORAGE=1,Xa.TEXTUREFORMAT_ALPHA=0,Xa.TEXTUREFORMAT_LUMINANCE=1,Xa.TEXTUREFORMAT_LUMINANCE_ALPHA=2,Xa.TEXTUREFORMAT_RGB=4,Xa.TEXTUREFORMAT_RGBA=5,Xa.TEXTUREFORMAT_RED=6,Xa.TEXTUREFORMAT_R=6,Xa.TEXTUREFORMAT_RG=7,Xa.TEXTUREFORMAT_RED_INTEGER=8,Xa.TEXTUREFORMAT_R_INTEGER=8,Xa.TEXTUREFORMAT_RG_INTEGER=9,Xa.TEXTUREFORMAT_RGB_INTEGER=10,Xa.TEXTUREFORMAT_RGBA_INTEGER=11,Xa.TEXTUREFORMAT_BGRA=12,Xa.TEXTUREFORMAT_DEPTH24_STENCIL8=13,Xa.TEXTUREFORMAT_DEPTH32_FLOAT=14,Xa.TEXTUREFORMAT_DEPTH16=15,Xa.TEXTUREFORMAT_DEPTH24=16,Xa.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8=17,Xa.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8=18,Xa.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM=36492,Xa.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM=36493,Xa.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT=36495,Xa.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT=36494,Xa.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5=33779,Xa.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919,Xa.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3=33778,Xa.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918,Xa.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1=33777,Xa.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1=33776,Xa.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917,Xa.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT=35916,Xa.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4=37808,Xa.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840,Xa.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL=36196,Xa.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2=37492,Xa.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2=37493,Xa.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494,Xa.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495,Xa.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC=37496,Xa.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497,Xa.TEXTURETYPE_UNSIGNED_BYTE=0,Xa.TEXTURETYPE_UNSIGNED_INT=0,Xa.TEXTURETYPE_FLOAT=1,Xa.TEXTURETYPE_HALF_FLOAT=2,Xa.TEXTURETYPE_BYTE=3,Xa.TEXTURETYPE_SHORT=4,Xa.TEXTURETYPE_UNSIGNED_SHORT=5,Xa.TEXTURETYPE_INT=6,Xa.TEXTURETYPE_UNSIGNED_INTEGER=7,Xa.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,Xa.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,Xa.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,Xa.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,Xa.TEXTURETYPE_UNSIGNED_INT_24_8=12,Xa.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,Xa.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,Xa.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,Xa.TEXTURETYPE_UNDEFINED=16,Xa.TEXTURE_NEAREST_SAMPLINGMODE=1,Xa.TEXTURE_NEAREST_NEAREST=1,Xa.TEXTURE_BILINEAR_SAMPLINGMODE=2,Xa.TEXTURE_LINEAR_LINEAR=2,Xa.TEXTURE_TRILINEAR_SAMPLINGMODE=3,Xa.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,Xa.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,Xa.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,Xa.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,Xa.TEXTURE_NEAREST_LINEAR=7,Xa.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,Xa.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,Xa.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,Xa.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,Xa.TEXTURE_LINEAR_NEAREST=12,Xa.TEXTURE_EXPLICIT_MODE=0,Xa.TEXTURE_SPHERICAL_MODE=1,Xa.TEXTURE_PLANAR_MODE=2,Xa.TEXTURE_CUBIC_MODE=3,Xa.TEXTURE_PROJECTION_MODE=4,Xa.TEXTURE_SKYBOX_MODE=5,Xa.TEXTURE_INVCUBIC_MODE=6,Xa.TEXTURE_EQUIRECTANGULAR_MODE=7,Xa.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,Xa.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,Xa.TEXTURE_FILTERING_QUALITY_OFFLINE=4096,Xa.TEXTURE_FILTERING_QUALITY_HIGH=64,Xa.TEXTURE_FILTERING_QUALITY_MEDIUM=16,Xa.TEXTURE_FILTERING_QUALITY_LOW=8,Xa.SCALEMODE_FLOOR=1,Xa.SCALEMODE_NEAREST=2,Xa.SCALEMODE_CEILING=3,Xa.MATERIAL_TextureDirtyFlag=1,Xa.MATERIAL_LightDirtyFlag=2,Xa.MATERIAL_FresnelDirtyFlag=4,Xa.MATERIAL_AttributesDirtyFlag=8,Xa.MATERIAL_MiscDirtyFlag=16,Xa.MATERIAL_PrePassDirtyFlag=32,Xa.MATERIAL_AllDirtyFlag=63,Xa.MATERIAL_TriangleFillMode=0,Xa.MATERIAL_WireFrameFillMode=1,Xa.MATERIAL_PointFillMode=2,Xa.MATERIAL_PointListDrawMode=3,Xa.MATERIAL_LineListDrawMode=4,Xa.MATERIAL_LineLoopDrawMode=5,Xa.MATERIAL_LineStripDrawMode=6,Xa.MATERIAL_TriangleStripDrawMode=7,Xa.MATERIAL_TriangleFanDrawMode=8,Xa.MATERIAL_ClockWiseSideOrientation=0,Xa.MATERIAL_CounterClockWiseSideOrientation=1,Xa.ACTION_NothingTrigger=0,Xa.ACTION_OnPickTrigger=1,Xa.ACTION_OnLeftPickTrigger=2,Xa.ACTION_OnRightPickTrigger=3,Xa.ACTION_OnCenterPickTrigger=4,Xa.ACTION_OnPickDownTrigger=5,Xa.ACTION_OnDoublePickTrigger=6,Xa.ACTION_OnPickUpTrigger=7,Xa.ACTION_OnPickOutTrigger=16,Xa.ACTION_OnLongPressTrigger=8,Xa.ACTION_OnPointerOverTrigger=9,Xa.ACTION_OnPointerOutTrigger=10,Xa.ACTION_OnEveryFrameTrigger=11,Xa.ACTION_OnIntersectionEnterTrigger=12,Xa.ACTION_OnIntersectionExitTrigger=13,Xa.ACTION_OnKeyDownTrigger=14,Xa.ACTION_OnKeyUpTrigger=15,Xa.PARTICLES_BILLBOARDMODE_Y=2,Xa.PARTICLES_BILLBOARDMODE_ALL=7,Xa.PARTICLES_BILLBOARDMODE_STRETCHED=8,Xa.MESHES_CULLINGSTRATEGY_STANDARD=0,Xa.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,Xa.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=2,Xa.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=3,Xa.SCENELOADER_NO_LOGGING=0,Xa.SCENELOADER_MINIMAL_LOGGING=1,Xa.SCENELOADER_SUMMARY_LOGGING=2,Xa.SCENELOADER_DETAILED_LOGGING=3,Xa.PREPASS_IRRADIANCE_TEXTURE_TYPE=0,Xa.PREPASS_POSITION_TEXTURE_TYPE=1,Xa.PREPASS_VELOCITY_TEXTURE_TYPE=2,Xa.PREPASS_REFLECTIVITY_TEXTURE_TYPE=3,Xa.PREPASS_COLOR_TEXTURE_TYPE=4,Xa.PREPASS_DEPTH_TEXTURE_TYPE=5,Xa.PREPASS_NORMAL_TEXTURE_TYPE=6,Xa.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE=7,Xa.BUFFER_CREATIONFLAG_READ=1,Xa.BUFFER_CREATIONFLAG_WRITE=2,Xa.BUFFER_CREATIONFLAG_READWRITE=3,Xa.BUFFER_CREATIONFLAG_UNIFORM=4,Xa.BUFFER_CREATIONFLAG_VERTEX=8,Xa.BUFFER_CREATIONFLAG_INDEX=16,Xa.BUFFER_CREATIONFLAG_STORAGE=32,Xa.RENDERPASS_MAIN=0,Xa.INPUT_ALT_KEY=18,Xa.INPUT_CTRL_KEY=17,Xa.INPUT_META_KEY1=91,Xa.INPUT_META_KEY2=92,Xa.INPUT_META_KEY3=93,Xa.INPUT_SHIFT_KEY=16,Xa.SNAPSHOTRENDERING_STANDARD=0,Xa.SNAPSHOTRENDERING_FAST=1,Xa.PERSPECTIVE_CAMERA=0,Xa.ORTHOGRAPHIC_CAMERA=1,Xa.FOVMODE_VERTICAL_FIXED=0,Xa.FOVMODE_HORIZONTAL_FIXED=1,Xa.RIG_MODE_NONE=0,Xa.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,Xa.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,Xa.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,Xa.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,Xa.RIG_MODE_STEREOSCOPIC_INTERLACED=14,Xa.RIG_MODE_VR=20,Xa.RIG_MODE_WEBVR=21,Xa.RIG_MODE_CUSTOM=22,Xa.MAX_SUPPORTED_UV_SETS=6,Xa.GL_ALPHA_EQUATION_ADD=32774,Xa.GL_ALPHA_EQUATION_MIN=32775,Xa.GL_ALPHA_EQUATION_MAX=32776,Xa.GL_ALPHA_EQUATION_SUBTRACT=32778,Xa.GL_ALPHA_EQUATION_REVERSE_SUBTRACT=32779,Xa.GL_ALPHA_FUNCTION_SRC=768,Xa.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR=769,Xa.GL_ALPHA_FUNCTION_SRC_ALPHA=770,Xa.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA=771,Xa.GL_ALPHA_FUNCTION_DST_ALPHA=772,Xa.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA=773,Xa.GL_ALPHA_FUNCTION_DST_COLOR=774,Xa.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR=775,Xa.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED=776,Xa.GL_ALPHA_FUNCTION_CONSTANT_COLOR=32769,Xa.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR=32770,Xa.GL_ALPHA_FUNCTION_CONSTANT_ALPHA=32771,Xa.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA=32772,Xa.SnippetUrl="";var Ya,Za=(Ya=!0,function(e,t){var i=Ya?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ya=!1,i}),Ka=Za(void 0,(function(){return Ka.toString().search("(((.+)+)+)+$").toString().constructor(Ka).search("(((.+)+)+)+$")}));function Qa(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=Qa._Counter++}Ka(),Object.defineProperty(Qa.prototype,"underlyingResource",{get:function(){return null},enumerable:!1,configurable:!0}),Qa._Counter=0;var Ja,es=(Ja=!0,function(e,t){var i=Ja?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ja=!1,i}),ts=es(void 0,(function(){return ts.toString().search("(((.+)+)+)+$").toString().constructor(ts).search("(((.+)+)+)+$")}));function is(e,t,i,n,r,o,a,s){void 0===n&&(n=0),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),this._isAlreadyOwned=!1,e.getScene?this._engine=e.getScene().getEngine():this._engine=e,this._updatable=i,this._instanced=o,this._divisor=s||1,t instanceof Qa?(this._data=null,this._buffer=t):(this._data=t,this._buffer=null),this.byteStride=a?n:n*Float32Array.BYTES_PER_ELEMENT,!r&&this.create()}function ns(e,t,i,n,r,o,a,s,l,u,c,h,d,f){if(void 0===c&&(c=!1),void 0===h&&(h=!1),void 0===d&&(d=1),void 0===f&&(f=!1),t instanceof is?(this._buffer=t,this._ownsBuffer=f):(this._buffer=new is(e,t,n,o,r,a,h),this._ownsBuffer=!0),this.uniqueId=ns._Counter++,this._kind=i,null==u){var p=this.getData();this.type=ns.FLOAT,p instanceof Int8Array?this.type=ns.BYTE:p instanceof Uint8Array?this.type=ns.UNSIGNED_BYTE:p instanceof Int16Array?this.type=ns.SHORT:p instanceof Uint16Array?this.type=ns.UNSIGNED_SHORT:p instanceof Int32Array?this.type=ns.INT:p instanceof Uint32Array&&(this.type=ns.UNSIGNED_INT)}else this.type=u;var _=ns.GetTypeByteLength(this.type);h?(this._size=l||(o?o/_:ns.DeduceStride(i)),this.byteStride=o||this._buffer.byteStride||this._size*_,this.byteOffset=s||0):(this._size=l||o||ns.DeduceStride(i),this.byteStride=o?o*_:this._buffer.byteStride||this._size*_,this.byteOffset=(s||0)*_),this.normalized=c,this._instanced=void 0!==a&&a,this._instanceDivisor=a?d:0,this._computeHashCode()}ts(),is.prototype.createVertexBuffer=function(e,t,i,n,r,o,a){void 0===o&&(o=!1);var s=o?t:t*Float32Array.BYTES_PER_ELEMENT,l=n?o?n:n*Float32Array.BYTES_PER_ELEMENT:this.byteStride;return new ns(this._engine,this,e,this._updatable,!0,l,void 0===r?this._instanced:r,s,i,void 0,void 0,!0,this._divisor||a)},is.prototype.isUpdatable=function(){return this._updatable},is.prototype.getData=function(){return this._data},is.prototype.getBuffer=function(){return this._buffer},is.prototype.getStrideSize=function(){return this.byteStride/Float32Array.BYTES_PER_ELEMENT},is.prototype.create=function(e){void 0===e&&(e=null),!e&&this._buffer||(e=e||this._data)&&(this._buffer?this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e),this._data=e):this._updatable?(this._buffer=this._engine.createDynamicVertexBuffer(e),this._data=e):this._buffer=this._engine.createVertexBuffer(e))},is.prototype._rebuild=function(){this._buffer=null,this.create(this._data)},is.prototype.update=function(e){this.create(e)},is.prototype.updateDirectly=function(e,t,i,n){void 0===n&&(n=!1),this._buffer&&this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e,n?t:t*Float32Array.BYTES_PER_ELEMENT,i?i*this.byteStride:void 0),this._data=0===t&&void 0===i?e:null)},is.prototype._increaseReferences=function(){this._buffer&&(this._isAlreadyOwned?this._buffer.references++:this._isAlreadyOwned=!0)},is.prototype.dispose=function(){this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null,this._data=null)},Object.defineProperty(ns.prototype,"instanceDivisor",{get:function(){return this._instanceDivisor},set:function(e){this._instanceDivisor=e,this._instanced=0!=e,this._computeHashCode()},enumerable:!1,configurable:!0}),ns.prototype._computeHashCode=function(){this.hashCode=(this.type-5120<<0)+((this.normalized?1:0)<<3)+(this._size<<4)+((this._instanced?1:0)<<6)+(this.byteStride<<12)},ns.prototype._rebuild=function(){this._buffer&&this._buffer._rebuild()},ns.prototype.getKind=function(){return this._kind},ns.prototype.isUpdatable=function(){return this._buffer.isUpdatable()},ns.prototype.getData=function(){return this._buffer.getData()},ns.prototype.getFloatData=function(e,t){var i=this.getData();if(!i)return null;var n=this.getSize()*ns.GetTypeByteLength(this.type),r=e*this.getSize();if(this.type!==ns.FLOAT||this.byteStride!==n){var o=new Float32Array(r);return this.forEach(r,(function(e,t){return o[t]=e})),o}if(!(i instanceof Array||i instanceof Float32Array)||0!==this.byteOffset||i.length!==r){if(i instanceof Array){var a=this.byteOffset/4;return i.slice(a,a+r)}if(i instanceof ArrayBuffer)return new Float32Array(i,this.byteOffset,r);if(a=i.byteOffset+this.byteOffset,t){var s=new Float32Array(r),l=new Float32Array(i.buffer,a,r);return s.set(l),s}var u=a%4;return u&&(a=Math.max(0,a-u)),new Float32Array(i.buffer,a,r)}return t?i.slice():i},ns.prototype.getBuffer=function(){return this._buffer.getBuffer()},ns.prototype.getStrideSize=function(){return this.byteStride/ns.GetTypeByteLength(this.type)},ns.prototype.getOffset=function(){return this.byteOffset/ns.GetTypeByteLength(this.type)},ns.prototype.getSize=function(e){return void 0===e&&(e=!1),e?this._size*ns.GetTypeByteLength(this.type):this._size},ns.prototype.getIsInstanced=function(){return this._instanced},ns.prototype.getInstanceDivisor=function(){return this._instanceDivisor},ns.prototype.create=function(e){this._buffer.create(e)},ns.prototype.update=function(e){this._buffer.update(e)},ns.prototype.updateDirectly=function(e,t,i){void 0===i&&(i=!1),this._buffer.updateDirectly(e,t,void 0,i)},ns.prototype.dispose=function(){this._ownsBuffer&&this._buffer.dispose()},ns.prototype.forEach=function(e,t){ns.ForEach(this._buffer.getData(),this.byteOffset,this.byteStride,this._size,this.type,e,this.normalized,t)},ns.DeduceStride=function(e){switch(e){case ns.UVKind:case ns.UV2Kind:case ns.UV3Kind:case ns.UV4Kind:case ns.UV5Kind:case ns.UV6Kind:return 2;case ns.NormalKind:case ns.PositionKind:return 3;case ns.ColorKind:case ns.MatricesIndicesKind:case ns.MatricesIndicesExtraKind:case ns.MatricesWeightsKind:case ns.MatricesWeightsExtraKind:case ns.TangentKind:return 4;default:throw new Error("Invalid kind '"+e+"'")}},ns.GetTypeByteLength=function(e){switch(e){case ns.BYTE:case ns.UNSIGNED_BYTE:return 1;case ns.SHORT:case ns.UNSIGNED_SHORT:return 2;case ns.INT:case ns.UNSIGNED_INT:case ns.FLOAT:return 4;default:throw new Error("Invalid type '".concat(e,"'"))}},ns.ForEach=function(e,t,i,n,r,o,a,s){if(e instanceof Array)for(var l=t/4,u=i/4,c=0;c<o;c+=n){for(var h=0;h<n;h++)s(e[l+h],c+h);l+=u}else{var d=e instanceof ArrayBuffer?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),f=ns.GetTypeByteLength(r);for(c=0;c<o;c+=n){var p=t;for(h=0;h<n;h++)s(ns._GetFloatValue(d,r,p,a),c+h),p+=f;t+=i}}},ns._GetFloatValue=function(e,t,i,n){switch(t){case ns.BYTE:var r=e.getInt8(i);return n&&(r=Math.max(r/127,-1)),r;case ns.UNSIGNED_BYTE:return r=e.getUint8(i),n&&(r/=255),r;case ns.SHORT:return r=e.getInt16(i,!0),n&&(r=Math.max(r/32767,-1)),r;case ns.UNSIGNED_SHORT:return r=e.getUint16(i,!0),n&&(r/=65535),r;case ns.INT:return e.getInt32(i,!0);case ns.UNSIGNED_INT:return e.getUint32(i,!0);case ns.FLOAT:return e.getFloat32(i,!0);default:throw new Error("Invalid component type ".concat(t))}},ns._Counter=0,ns.BYTE=5120,ns.UNSIGNED_BYTE=5121,ns.SHORT=5122,ns.UNSIGNED_SHORT=5123,ns.INT=5124,ns.UNSIGNED_INT=5125,ns.FLOAT=5126,ns.PositionKind="position",ns.NormalKind="normal",ns.TangentKind="tangent",ns.UVKind="uv",ns.UV2Kind="uv2",ns.UV3Kind="uv3",ns.UV4Kind="uv4",ns.UV5Kind="uv5",ns.UV6Kind="uv6",ns.ColorKind="color",ns.ColorInstanceKind="instanceColor",ns.MatricesIndicesKind="matricesIndices",ns.MatricesWeightsKind="matricesWeights",ns.MatricesIndicesExtraKind="matricesIndicesExtra",ns.MatricesWeightsExtraKind="matricesWeightsExtra";var rs,os=(rs=!0,function(e,t){var i=rs?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return rs=!1,i}),as=os(void 0,(function(){return as.toString().search("(((.+)+)+)+$").toString().constructor(as).search("(((.+)+)+)+$")}));function ss(e,t,i){void 0===i&&(i=Xa.BUFFER_CREATIONFLAG_READWRITE),this._engine=e,this._engine._storageBuffers.push(this),this._create(t,i)}function ls(e){var t=(e=Sa(e,Sa.EMPTY_OBJECT)).context,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=wa(n);a?r=n.byteLength:n=new Uint8Array(r);var s=Xa.BUFFER_CREATIONFLAG_STORAGE;wa(o)&&(o==Ua.STREAM_DRAW||o==Ua.STATIC_DRAW?s|=Xa.BUFFER_CREATIONFLAG_WRITE:o==Ua.DYNAMIC_DRAW&&(s|=Xa.BUFFER_CREATIONFLAG_READWRITE)),wa(i)?i==Aa.ELEMENT_ARRAY_BUFFER?(n instanceof Uint8Array&&(e.indexDatatype==za.UNSIGNED_INT?n=new Uint32Array(n.buffer,n.byteOffset,n.byteLength/4):e.indexDatatype==za.UNSIGNED_SHORT&&(n=new Uint16Array(n.buffer,n.byteOffset,n.byteLength/2))),this._dataBuffer=t.engine.createIndexBuffer(n)):i==Aa.ARRAY_BUFFER?(this._dataBuffer=new is(t.engine,n,!0),this._dataBuffer._data=null):console.log("BufferGPU not supported bufferTarget"):(this._dataBuffer=new ss(t.engine,r,s),a&&this._dataBuffer.update(n,0,r)),this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this.context=e.context,e.context.memorySize+=r}function us(e){if(e=Sa(e,Sa.EMPTY_OBJECT),Oa.defined("options.context",e.context),!wa(e.typedArray)&&!wa(e.sizeInBytes))throw new Ea("Either options.sizeInBytes or options.typedArray is required.");if(wa(e.typedArray)&&wa(e.sizeInBytes))throw new Ea("Cannot pass in both options.sizeInBytes and options.typedArray.");wa(e.typedArray)&&(Oa.typeOf.object("options.typedArray",e.typedArray),Oa.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),e.context.webgpu?this._inner=new ls(e):this._inner=new Wa(e),this.vertexArrayDestroyable=!0}function cs(e,t){this.x=Sa(e,0),this.y=Sa(t,0)}as(),ss.prototype._create=function(e,t){this._bufferSize=e,this._creationFlags=t,this._buffer=this._engine.createStorageBuffer(e,t)},ss.prototype._rebuild=function(){this._create(this._bufferSize,this._creationFlags)},ss.prototype.getBuffer=function(){return this._buffer},ss.prototype.update=function(e,t,i){this._buffer&&this._engine.updateStorageBuffer(this._buffer,e,t,i)},ss.prototype.read=function(e,t,i){return this._engine.readFromStorageBuffer(this._buffer,e,t,i)},ss.prototype.dispose=function(){var e=this._engine._storageBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._engine._releaseBuffer(this._buffer),this._buffer=null},Object.defineProperties(ls.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}},dataBuffer:{get:function(){return this._dataBuffer}}}),ls.prototype._getBuffer=function(){return console.log("BufferGPU.prototype._getBuffer"),this._dataBuffer},ls.prototype.copyFromArrayView=function(e,t){this._dataBuffer.updateDirectly(e,t,null,!0)},ls.prototype.copyFromBuffer=function(e,t,i,n){console.log("BufferGPU.prototype.copyFromBuffer")},ls.prototype.getBufferData=function(e,t,i,n){console.log("BufferGPU.prototype.getBufferData")},ls.prototype.isDestroyed=function(){return!1},ls.prototype.destroy=function(){return this._bufferTarget!==Aa.ELEMENT_ARRAY_BUFFER?this._dataBuffer.dispose():this.context._engine._releaseBuffer(this._dataBuffer),this.context.memorySize-=this.sizeInBytes,ka(this)},us.createVertexBuffer=function(e){return Oa.defined("options.context",e.context),new us({context:e.context,bufferTarget:Aa.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},us.createIndexBuffer=function(e){if(Oa.defined("options.context",e.context),!za.validate(e.indexDatatype))throw new Ea("Invalid indexDatatype.");if(e.indexDatatype===za.UNSIGNED_INT&&!e.context.elementIndexUint)throw new Ea("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");var t=e.context,i=e.indexDatatype,n=za.getSizeInBytes(i),r=new us({context:t,bufferTarget:Aa.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage,indexDatatype:i}),o=r.sizeInBytes/n;return Object.defineProperties(r,{indexDatatype:{get:function(){return i}},bytesPerIndex:{get:function(){return n}},numberOfIndices:{get:function(){return o}}}),r},Object.defineProperties(us.prototype,{sizeInBytes:{get:function(){return this._inner.sizeInBytes}},usage:{get:function(){return this._inner.usage}}}),us.prototype._getBuffer=function(){return this._inner._getBuffer()},us.prototype.copyFromArrayView=function(e,t){this._inner.copyFromArrayView(e,t)},us.prototype.copyFromBuffer=function(e,t,i,n){this._inner.copyFromBuffer(e,t,i,n)},us.prototype.getBufferData=function(e,t,i,n){this._inner.getBufferData(e,t,i,n)},us.prototype.isDestroyed=function(){return!1},us.prototype.destroy=function(){return this._inner.destroy(),ka(this)},cs.fromElements=function(e,t,i){return wa(i)?(i.x=e,i.y=t,i):new cs(e,t)},cs.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t):new cs(e.x,e.y)},cs.fromCartesian3=cs.clone,cs.fromCartesian4=cs.clone,cs.packedLength=2,cs.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i]=e.y,t},cs.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new cs),i.x=e[t++],i.y=e[t],i},cs.packArray=function(e,t){Oa.defined("array",e);var i=e.length,n=2*i;if(wa(t)){if(!Array.isArray(t)&&t.length!==n)throw new Ea("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)cs.pack(e[r],t,2*r);return t},cs.unpackArray=function(e,t){if(Oa.defined("array",e),Oa.typeOf.number.greaterThanOrEquals("array.length",e.length,2),e.length%2!=0)throw new Ea("array length must be a multiple of 2.");var i=e.length;wa(t)?t.length=i/2:t=new Array(i/2);for(var n=0;n<i;n+=2){var r=n/2;t[r]=cs.unpack(e,n,t[r])}return t},cs.fromArray=cs.unpack,cs.maximumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.max(e.x,e.y)},cs.minimumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.min(e.x,e.y)},cs.minimumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i},cs.maximumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i},cs.magnitudeSquared=function(e){return Oa.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y},cs.magnitude=function(e){return Math.sqrt(cs.magnitudeSquared(e))};var hs=new cs;cs.distance=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),cs.subtract(e,t,hs),cs.magnitude(hs)},cs.distanceSquared=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),cs.subtract(e,t,hs),cs.magnitudeSquared(hs)},cs.normalize=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=cs.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,isNaN(t.x)||isNaN(t.y))throw new Ea("normalized result is not a number");return t},cs.dot=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),e.x*t.x+e.y*t.y},cs.multiplyComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i},cs.divideComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i},cs.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i},cs.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i},cs.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i},cs.divideByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i},cs.negate=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t},cs.abs=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var ds=new cs;cs.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),cs.multiplyByScalar(t,i,ds),n=cs.multiplyByScalar(e,1-i,n),cs.add(ds,n,n)};var fs=new cs,ps=new cs;cs.angleBetween=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),cs.normalize(e,fs),cs.normalize(t,ps),Fa.acosClamped(cs.dot(fs,ps))};var _s=new cs;function ms(e,t,i){this.x=Sa(e,0),this.y=Sa(t,0),this.z=Sa(i,0)}cs.mostOrthogonalAxis=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=cs.normalize(e,_s);return cs.abs(i,i),t=i.x<=i.y?cs.clone(cs.UNIT_X,t):cs.clone(cs.UNIT_Y,t)},cs.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y},cs.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]},cs.equalsEpsilon=function(e,t,i,n){return e===t||wa(e)&&wa(t)&&Fa.equalsEpsilon(e.x,t.x,i,n)&&Fa.equalsEpsilon(e.y,t.y,i,n)},cs.ZERO=Object.freeze(new cs(0,0)),cs.UNIT_X=Object.freeze(new cs(1,0)),cs.UNIT_Y=Object.freeze(new cs(0,1)),cs.prototype.clone=function(e){return cs.clone(this,e)},cs.prototype.equals=function(e){return cs.equals(this,e)},cs.prototype.equalsEpsilon=function(e,t,i){return cs.equalsEpsilon(this,e,t,i)},cs.prototype.toString=function(){return"("+this.x+", "+this.y+")"},cs.prototype.toArray=function(e,t){cs.pack(this,e,t)},ms.fromSpherical=function(e,t){Oa.typeOf.object("spherical",e),wa(t)||(t=new ms);var i=e.clock,n=e.cone,r=Sa(e.magnitude,1),o=r*Math.sin(n);return t.x=o*Math.cos(i),t.y=o*Math.sin(i),t.z=r*Math.cos(n),t},ms.fromElements=function(e,t,i,n){return wa(n)?(n.x=e,n.y=t,n.z=i,n):new ms(e,t,i)},ms.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new ms(e.x,e.y,e.z)},ms.fromCartesian4=ms.clone,ms.packedLength=3,ms.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i++]=e.y,t[i]=e.z,t},ms.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new ms),i.x=e[t++],i.y=e[t++],i.z=e[t],i},ms.packArray=function(e,t){Oa.defined("array",e);var i=e.length,n=3*i;if(wa(t)){if(!Array.isArray(t)&&t.length!==n)throw new Ea("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)ms.pack(e[r],t,3*r);return t},ms.unpackArray=function(e,t){if(Oa.defined("array",e),Oa.typeOf.number.greaterThanOrEquals("array.length",e.length,3),e.length%3!=0)throw new Ea("array length must be a multiple of 3.");var i=e.length;wa(t)?t.length=i/3:t=new Array(i/3);for(var n=0;n<i;n+=3){var r=n/3;t[r]=ms.unpack(e,n,t[r])}return t},ms.fromArray=ms.unpack,ms.maximumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z)},ms.minimumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z)},ms.minimumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i},ms.maximumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i},ms.magnitudeSquared=function(e){return Oa.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z},ms.magnitude=function(e){return Math.sqrt(ms.magnitudeSquared(e))};var gs=new ms;ms.distance=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),ms.subtract(e,t,gs),ms.magnitude(gs)},ms.distanceSquared=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),ms.subtract(e,t,gs),ms.magnitudeSquared(gs)},ms.normalize=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=ms.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new Ea("normalized result is not a number");return t},ms.dot=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z},ms.multiplyComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i},ms.divideComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i},ms.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i},ms.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i},ms.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i},ms.divideByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i},ms.negate=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t},ms.abs=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var xs=new ms;ms.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),ms.multiplyByScalar(t,i,xs),n=ms.multiplyByScalar(e,1-i,n),ms.add(xs,n,n)};var ys=new ms,vs=new ms;ms.angleBetween=function(e,t){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),ms.normalize(e,ys),ms.normalize(t,vs);var i=ms.dot(ys,vs),n=ms.magnitude(ms.cross(ys,vs,ys));return Math.atan2(n,i)};var $s=new ms;ms.mostOrthogonalAxis=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=ms.normalize(e,$s);return ms.abs(i,i),t=i.x<=i.y?i.x<=i.z?ms.clone(ms.UNIT_X,t):ms.clone(ms.UNIT_Z,t):i.y<=i.z?ms.clone(ms.UNIT_Y,t):ms.clone(ms.UNIT_Z,t)},ms.projectVector=function(e,t,i){Oa.defined("a",e),Oa.defined("b",t),Oa.defined("result",i);var n=ms.dot(e,t)/ms.dot(t,t);return ms.multiplyByScalar(t,n,i)},ms.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},ms.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]},ms.equalsEpsilon=function(e,t,i,n){return e===t||wa(e)&&wa(t)&&Fa.equalsEpsilon(e.x,t.x,i,n)&&Fa.equalsEpsilon(e.y,t.y,i,n)&&Fa.equalsEpsilon(e.z,t.z,i,n)},ms.cross=function(e,t,i){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i);var n=e.x,r=e.y,o=e.z,a=t.x,s=t.y,l=t.z,u=r*l-o*s,c=o*a-n*l,h=n*s-r*a;return i.x=u,i.y=c,i.z=h,i},ms.midpoint=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=.5*(e.x+t.x),i.y=.5*(e.y+t.y),i.z=.5*(e.z+t.z),i},ms.fromDegrees=function(e,t,i,n,r){return Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),e=Fa.toRadians(e),t=Fa.toRadians(t),ms.fromRadians(e,t,i,n,r)};var bs=new ms,Ts=new ms,Cs=new ms(40680631590769,40680631590769,40408299984661.445);ms.fromRadians=function(e,t,i,n,r){Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),i=Sa(i,0);var o=wa(n)?n.radiiSquared:Cs,a=Math.cos(t);bs.x=a*Math.cos(e),bs.y=a*Math.sin(e),bs.z=Math.sin(t),bs=ms.normalize(bs,bs),ms.multiplyComponents(o,bs,Ts);var s=Math.sqrt(ms.dot(bs,Ts));return Ts=ms.divideByScalar(Ts,s,Ts),bs=ms.multiplyByScalar(bs,i,bs),wa(r)||(r=new ms),ms.add(Ts,bs,r)},ms.fromDegreesArray=function(e,t,i){if(Oa.defined("coordinates",e),e.length<2||e.length%2!=0)throw new Ea("the number of coordinates must be a multiple of 2 and at least 2");var n=e.length;wa(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var o=e[r],a=e[r+1],s=r/2;i[s]=ms.fromDegrees(o,a,0,t,i[s])}return i},ms.fromRadiansArray=function(e,t,i){if(Oa.defined("coordinates",e),e.length<2||e.length%2!=0)throw new Ea("the number of coordinates must be a multiple of 2 and at least 2");var n=e.length;wa(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var o=e[r],a=e[r+1],s=r/2;i[s]=ms.fromRadians(o,a,0,t,i[s])}return i},ms.fromDegreesArrayHeights=function(e,t,i){if(Oa.defined("coordinates",e),e.length<3||e.length%3!=0)throw new Ea("the number of coordinates must be a multiple of 3 and at least 3");var n=e.length;wa(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var o=e[r],a=e[r+1],s=e[r+2],l=r/3;i[l]=ms.fromDegrees(o,a,s,t,i[l])}return i},ms.fromRadiansArrayHeights=function(e,t,i){if(Oa.defined("coordinates",e),e.length<3||e.length%3!=0)throw new Ea("the number of coordinates must be a multiple of 3 and at least 3");var n=e.length;wa(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var o=e[r],a=e[r+1],s=e[r+2],l=r/3;i[l]=ms.fromRadians(o,a,s,t,i[l])}return i},ms.ZERO=Object.freeze(new ms(0,0,0)),ms.UNIT_X=Object.freeze(new ms(1,0,0)),ms.UNIT_Y=Object.freeze(new ms(0,1,0)),ms.UNIT_Z=Object.freeze(new ms(0,0,1)),ms.UNIT_XYZ=Object.freeze(new ms(1,1,1)),ms.prototype.clone=function(e){return ms.clone(this,e)},ms.prototype.equals=function(e){return ms.equals(this,e)},ms.prototype.equalsEpsilon=function(e,t,i){return ms.equalsEpsilon(this,e,t,i)},ms.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},ms.prototype.toArray=function(e,t){ms.pack(this,e,t)},ms.globalOffset=new ms(0,0,0);var Ss=new ms,ws=new ms;function Es(e,t,i,n,r){if(!wa(e))throw new Ea("cartesian is required.");if(!wa(t))throw new Ea("oneOverRadii is required.");if(!wa(i))throw new Ea("oneOverRadiiSquared is required.");if(!wa(n))throw new Ea("centerToleranceSquared is required.");var o=e.x,a=e.y,s=e.z,l=t.x,u=t.y,c=t.z,h=o*o*l*l,d=a*a*u*u,f=s*s*c*c,p=h+d+f,_=Math.sqrt(1/p),m=ms.multiplyByScalar(e,_,Ss);if(p<n)return isFinite(_)?ms.clone(m,r):void 0;var g=i.x,x=i.y,y=i.z,v=ws;v.x=m.x*g*2,v.y=m.y*x*2,v.z=m.z*y*2;var $,b,T,C,S,w,E,P=(1-_)*ms.magnitude(e)/(.5*ms.magnitude(v)),A=0;do{A=($=h*(S=(b=1/(1+(P-=A)*g))*b)+d*(w=(T=1/(1+P*x))*T)+f*(E=(C=1/(1+P*y))*C)-1)/(-2*(h*(S*b)*g+d*(w*T)*x+f*(E*C)*y))}while(Math.abs($)>Fa.EPSILON12);return wa(r)?(r.x=o*b,r.y=a*T,r.z=s*C,r):new ms(o*b,a*T,s*C)}function Ps(e,t,i){this.longitude=Sa(e,0),this.latitude=Sa(t,0),this.height=Sa(i,0)}Ps.fromRadians=function(e,t,i,n){return Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),i=Sa(i,0),wa(n)?(n.longitude=e,n.latitude=t,n.height=i,n):new Ps(e,t,i)},Ps.fromDegrees=function(e,t,i,n){return Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),e=Fa.toRadians(e),t=Fa.toRadians(t),Ps.fromRadians(e,t,i,n)};var As=new ms,Ls=new ms,Ms=new ms,Rs=new ms(1/6378137,1/6378137,1/6356752.314245179),Os=new ms(1/40680631590769,1/40680631590769,1/40408299984661.445),Ds=Fa.EPSILON1;function Is(e,t,i,n){t=Sa(t,0),i=Sa(i,0),n=Sa(n,0),Oa.typeOf.number.greaterThanOrEquals("x",t,0),Oa.typeOf.number.greaterThanOrEquals("y",i,0),Oa.typeOf.number.greaterThanOrEquals("z",n,0),e._radii=new ms(t,i,n),e._radiiSquared=new ms(t*t,i*i,n*n),e._radiiToTheFourth=new ms(t*t*t*t,i*i*i*i,n*n*n*n),e._oneOverRadii=new ms(0===t?0:1/t,0===i?0:1/i,0===n?0:1/n),e._oneOverRadiiSquared=new ms(0===t?0:1/(t*t),0===i?0:1/(i*i),0===n?0:1/(n*n)),e._minimumRadius=Math.min(t,i,n),e._maximumRadius=Math.max(t,i,n),e._centerToleranceSquared=Fa.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function Fs(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,Is(this,e,t,i)}Ps.fromCartesian=function(e,t,i){var n=wa(t)?t.oneOverRadii:Rs,r=wa(t)?t.oneOverRadiiSquared:Os,o=Es(e,n,r,wa(t)?t._centerToleranceSquared:Ds,Ls);if(wa(o)){var a=ms.multiplyComponents(o,r,As);a=ms.normalize(a,a);var s=ms.subtract(e,o,Ms),l=Math.atan2(a.y,a.x),u=Math.asin(a.z),c=Fa.sign(ms.dot(s,e))*ms.magnitude(s);return wa(i)?(i.longitude=l,i.latitude=u,i.height=c,i):new Ps(l,u,c)}},Ps.toCartesian=function(e,t,i){return Oa.defined("cartographic",e),ms.fromRadians(e.longitude,e.latitude,e.height,t,i)},Ps.sphericalDistance=function(e,t,i,n){if(Oa.defined("longitudeA",e),Oa.defined("longitudeB",i),Oa.defined("latitudeA",t),Oa.defined("latitudeB",n),e===i&&t===n)return 0;var r=Fa.toRadians(t),o=Fa.toRadians(n),a=Fa.toRadians(e),s=Fa.toRadians(i),l=a*a+r*r,u=s*s+o*o,c=(l+u-((a-s)*(a-s)+(r-o)*(r-o)))/(2*Math.sqrt(l)*Math.sqrt(u));return c=Fa.clamp(c,-1,1),6378137*Math.acos(c)},Ps.clone=function(e,t){if(wa(e))return wa(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new Ps(e.longitude,e.latitude,e.height)},Ps.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},Ps.equalsEpsilon=function(e,t,i){return Oa.typeOf.number("epsilon",i),e===t||wa(e)&&wa(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},Ps.ZERO=Object.freeze(new Ps(0,0,0)),Ps.prototype.clone=function(e){return Ps.clone(this,e)},Ps.prototype.equals=function(e){return Ps.equals(this,e)},Ps.prototype.equalsEpsilon=function(e,t){return Ps.equalsEpsilon(this,e,t)},Ps.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},Object.defineProperties(Fs.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),Fs.clone=function(e,t){if(wa(e)){var i=e._radii;return wa(t)?(ms.clone(i,t._radii),ms.clone(e._radiiSquared,t._radiiSquared),ms.clone(e._radiiToTheFourth,t._radiiToTheFourth),ms.clone(e._oneOverRadii,t._oneOverRadii),ms.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new Fs(i.x,i.y,i.z)}},Fs.fromCartesian3=function(e,t){return wa(t)||(t=new Fs),wa(e)&&Is(t,e.x,e.y,e.z),t},Fs.WGS84=Object.freeze(new Fs(6378137,6378137,6356752.314245179)),Fs.XIAN80=Object.freeze(new Fs(6378140,6378140,6356755.29)),Fs.CGCS2000=Object.freeze(new Fs(6378137,6378137,6356752.31)),Fs.UNIT_SPHERE=Object.freeze(new Fs(1,1,1)),Fs.MOON=Object.freeze(new Fs(Fa.LUNAR_RADIUS,Fa.LUNAR_RADIUS,Fa.LUNAR_RADIUS)),Fs.prototype.clone=function(e){return Fs.clone(this,e)},Fs.packedLength=ms.packedLength,Fs.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),ms.pack(e._radii,t,i),t},Fs.unpack=function(e,t,i){Oa.defined("array",e),t=Sa(t,0);var n=ms.unpack(e,t);return Fs.fromCartesian3(n,i)},Fs.prototype.geocentricSurfaceNormal=ms.normalize,Fs.prototype.geodeticSurfaceNormalCartographic=function(e,t){Oa.typeOf.object("cartographic",e);var i=e.longitude,n=e.latitude,r=Math.cos(n),o=r*Math.cos(i),a=r*Math.sin(i),s=Math.sin(n);return wa(t)||(t=new ms),t.x=o,t.y=a,t.z=s,ms.normalize(t,t)},Fs.prototype.geodeticSurfaceNormal=function(e,t){return wa(t)||(t=new ms),t=ms.multiplyComponents(e,this._oneOverRadiiSquared,t),ms.normalize(t,t)};var Bs=new ms,Ns=new ms;Fs.prototype.cartographicToCartesian=function(e,t){var i=Bs,n=Ns;this.geodeticSurfaceNormalCartographic(e,i),ms.multiplyComponents(this._radiiSquared,i,n);var r=Math.sqrt(ms.dot(i,n));return ms.divideByScalar(n,r,n),ms.multiplyByScalar(i,e.height,i),wa(t)||(t=new ms),ms.add(n,i,t)},Fs.prototype.cartographicArrayToCartesianArray=function(e,t){Oa.defined("cartographics",e);var i=e.length;wa(t)?t.length=i:t=new Array(i);for(var n=0;n<i;n++)t[n]=this.cartographicToCartesian(e[n],t[n]);return t};var Gs=new ms,zs=new ms,Us=new ms;function Vs(e){this._ellipsoid=Sa(e,Fs.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Fs.prototype.cartesianToCartographic=function(e,t){var i=this.scaleToGeodeticSurface(e,zs);if(wa(i)){var n=this.geodeticSurfaceNormal(i,Gs),r=ms.subtract(e,i,Us),o=Math.atan2(n.y,n.x),a=Math.asin(n.z),s=Fa.sign(ms.dot(r,e))*ms.magnitude(r);return wa(t)?(t.longitude=o,t.latitude=a,t.height=s,t):new Ps(o,a,s)}},Fs.prototype.cartesianArrayToCartographicArray=function(e,t){Oa.defined("cartesians",e);var i=e.length;wa(t)?t.length=i:t=new Array(i);for(var n=0;n<i;++n)t[n]=this.cartesianToCartographic(e[n],t[n]);return t},Fs.prototype.scaleToGeodeticSurface=function(e,t){return Es(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},Fs.prototype.scaleToGeocentricSurface=function(e,t){Oa.typeOf.object("cartesian",e),wa(t)||(t=new ms);var i=e.x,n=e.y,r=e.z,o=this._oneOverRadiiSquared,a=1/Math.sqrt(i*i*o.x+n*n*o.y+r*r*o.z);return ms.multiplyByScalar(e,a,t)},Fs.prototype.transformPositionToScaledSpace=function(e,t){return wa(t)||(t=new ms),ms.multiplyComponents(e,this._oneOverRadii,t)},Fs.prototype.transformPositionFromScaledSpace=function(e,t){return wa(t)||(t=new ms),ms.multiplyComponents(e,this._radii,t)},Fs.prototype.equals=function(e){return this===e||wa(e)&&ms.equals(this._radii,e._radii)},Fs.prototype.toString=function(){return this._radii.toString()},Fs.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,i){if(Oa.typeOf.object("position",e),!Fa.equalsEpsilon(this._radii.x,this._radii.y,Fa.EPSILON15))throw new Ea("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");Oa.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),t=Sa(t,0);var n=this._squaredXOverSquaredZ;if(wa(i)||(i=new ms),i.x=0,i.y=0,i.z=e.z*(1-n),!(Math.abs(i.z)>=this._radii.z-t))return i},Object.defineProperties(Vs.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),Vs.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=e.latitude*i,o=e.height;return wa(t)?(t.x=n,t.y=r,t.z=o,t):new ms(n,r,o)},Vs.prototype.unproject=function(e,t){if(!wa(e))throw new Ea("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=e.y*i,o=e.z;return wa(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new Ps(n,r,o)};var ks={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Ws=Object.freeze(ks);function Hs(e,t,i,n){this.west=Sa(e,0),this.south=Sa(t,0),this.east=Sa(i,0),this.north=Sa(n,0)}Object.defineProperties(Hs.prototype,{width:{get:function(){return Hs.computeWidth(this)}},height:{get:function(){return Hs.computeHeight(this)}}}),Hs.packedLength=4,Hs.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.west,t[i++]=e.south,t[i++]=e.east,t[i]=e.north,t},Hs.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new Hs),i.west=e[t++],i.south=e[t++],i.east=e[t++],i.north=e[t],i},Hs.computeWidth=function(e){Oa.typeOf.object("rectangle",e);var t=e.east,i=e.west;return t<i&&(t+=Fa.TWO_PI),t-i},Hs.computeHeight=function(e){return Oa.typeOf.object("rectangle",e),e.north-e.south},Hs.fromDegrees=function(e,t,i,n,r){return e=Fa.toRadians(Sa(e,0)),t=Fa.toRadians(Sa(t,0)),i=Fa.toRadians(Sa(i,0)),n=Fa.toRadians(Sa(n,0)),wa(r)?(r.west=e,r.south=t,r.east=i,r.north=n,r):new Hs(e,t,i,n)},Hs.fromRadians=function(e,t,i,n,r){return wa(r)?(r.west=Sa(e,0),r.south=Sa(t,0),r.east=Sa(i,0),r.north=Sa(n,0),r):new Hs(e,t,i,n)},Hs.fromCartographicArray=function(e,t){Oa.defined("cartographics",e);for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0,u=e.length;l<u;l++){var c=e[l];i=Math.min(i,c.longitude),n=Math.max(n,c.longitude),a=Math.min(a,c.latitude),s=Math.max(s,c.latitude);var h=c.longitude>=0?c.longitude:c.longitude+Fa.TWO_PI;r=Math.min(r,h),o=Math.max(o,h)}return n-i>o-r&&(i=r,(n=o)>Fa.PI&&(n-=Fa.TWO_PI),i>Fa.PI&&(i-=Fa.TWO_PI)),wa(t)?(t.west=i,t.south=a,t.east=n,t.north=s,t):new Hs(i,a,n,s)},Hs.fromCartesianArray=function(e,t,i){Oa.defined("cartesians",e),t=Sa(t,Fs.WGS84);for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0,c=e.length;u<c;u++){var h=t.cartesianToCartographic(e[u]);n=Math.min(n,h.longitude),r=Math.max(r,h.longitude),s=Math.min(s,h.latitude),l=Math.max(l,h.latitude);var d=h.longitude>=0?h.longitude:h.longitude+Fa.TWO_PI;o=Math.min(o,d),a=Math.max(a,d)}return r-n>a-o&&(n=o,(r=a)>Fa.PI&&(r-=Fa.TWO_PI),n>Fa.PI&&(n-=Fa.TWO_PI)),wa(i)?(i.west=n,i.south=s,i.east=r,i.north=l,i):new Hs(n,s,r,l)},Hs.clone=function(e,t){if(wa(e))return wa(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new Hs(e.west,e.south,e.east,e.north)},Hs.equalsEpsilon=function(e,t,i){return Oa.typeOf.number("absoluteEpsilon",i),e===t||wa(e)&&wa(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},Hs.prototype.clone=function(e){return Hs.clone(this,e)},Hs.prototype.equals=function(e){return Hs.equals(this,e)},Hs.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},Hs.prototype.equalsEpsilon=function(e,t){return Oa.typeOf.number("epsilon",t),Hs.equalsEpsilon(this,e,t)},Hs.validate=function(e){Oa.typeOf.object("rectangle",e);var t=e.north;Oa.typeOf.number.greaterThanOrEquals("north",t,-Fa.PI_OVER_TWO),Oa.typeOf.number.lessThanOrEquals("north",t,Fa.PI_OVER_TWO);var i=e.south;Oa.typeOf.number.greaterThanOrEquals("south",i,-Fa.PI_OVER_TWO),Oa.typeOf.number.lessThanOrEquals("south",i,Fa.PI_OVER_TWO);var n=e.west;Oa.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),Oa.typeOf.number.lessThanOrEquals("west",n,Math.PI);var r=e.east;Oa.typeOf.number.greaterThanOrEquals("east",r,-Math.PI),Oa.typeOf.number.lessThanOrEquals("east",r,Math.PI)},Hs.southwest=function(e,t){return Oa.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new Ps(e.west,e.south)},Hs.northwest=function(e,t){return Oa.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new Ps(e.west,e.north)},Hs.northeast=function(e,t){return Oa.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new Ps(e.east,e.north)},Hs.southeast=function(e,t){return Oa.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new Ps(e.east,e.south)},Hs.center=function(e,t){Oa.typeOf.object("rectangle",e);var i=e.east,n=e.west;i<n&&(i+=Fa.TWO_PI);var r=Fa.negativePiToPi(.5*(n+i)),o=.5*(e.south+e.north);return wa(t)?(t.longitude=r,t.latitude=o,t.height=0,t):new Ps(r,o)},Hs.intersection=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("otherRectangle",t);var n=e.east,r=e.west,o=t.east,a=t.west;n<r&&o>0?n+=Fa.TWO_PI:o<a&&n>0&&(o+=Fa.TWO_PI),n<r&&a<0?a+=Fa.TWO_PI:o<a&&r<0&&(r+=Fa.TWO_PI);var s=Fa.negativePiToPi(Math.max(r,a)),l=Fa.negativePiToPi(Math.min(n,o));if(!((e.west<e.east||t.west<t.east)&&l<=s)){var u=Math.max(e.south,t.south),c=Math.min(e.north,t.north);if(!(u>=c))return wa(i)?(i.west=s,i.south=u,i.east=l,i.north=c,i):new Hs(s,u,l,c)}},Hs.simpleIntersection=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("otherRectangle",t);var n=Math.max(e.west,t.west),r=Math.max(e.south,t.south),o=Math.min(e.east,t.east),a=Math.min(e.north,t.north);if(!(r>=a||n>=o))return wa(i)?(i.west=n,i.south=r,i.east=o,i.north=a,i):new Hs(n,r,o,a)},Hs.union=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("otherRectangle",t),wa(i)||(i=new Hs);var n=e.east,r=e.west,o=t.east,a=t.west;n<r&&o>0?n+=Fa.TWO_PI:o<a&&n>0&&(o+=Fa.TWO_PI),n<r&&a<0?a+=Fa.TWO_PI:o<a&&r<0&&(r+=Fa.TWO_PI);var s=Fa.convertLongitudeRange(Math.min(r,a)),l=Fa.convertLongitudeRange(Math.max(n,o));return i.west=s,i.south=Math.min(e.south,t.south),i.east=l,i.north=Math.max(e.north,t.north),i},Hs.expand=function(e,t,i){return Oa.typeOf.object("rectangle",e),Oa.typeOf.object("cartographic",t),wa(i)||(i=new Hs),i.west=Math.min(e.west,t.longitude),i.south=Math.min(e.south,t.latitude),i.east=Math.max(e.east,t.longitude),i.north=Math.max(e.north,t.latitude),i},Hs.contains=function(e,t){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("cartographic",t);var i=t.longitude,n=t.latitude,r=e.west,o=e.east;return o<r&&(o+=Fa.TWO_PI,i<0&&(i+=Fa.TWO_PI)),(i>r||Fa.equalsEpsilon(i,r,Fa.EPSILON14))&&(i<o||Fa.equalsEpsilon(i,o,Fa.EPSILON14))&&n>=e.south&&n<=e.north};var qs=new Ps;Hs.subsample=function(e,t,i,n){Oa.typeOf.object("rectangle",e),t=Sa(t,Fs.WGS84),i=Sa(i,0),wa(n)||(n=[]);var r=0,o=e.north,a=e.south,s=e.east,l=e.west,u=qs;u.height=i,u.longitude=l,u.latitude=o,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=a,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=o<0?o:a>0?a:0;for(var c=1;c<8;++c)u.longitude=-Math.PI+c*Fa.PI_OVER_TWO,Hs.contains(e,u)&&(n[r]=t.cartographicToCartesian(u,n[r]),r++);return 0===u.latitude&&(u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++),n.length=r,n};var js=new Ps;function Xs(e,t,i,n){this.x=Sa(e,0),this.y=Sa(t,0),this.width=Sa(i,0),this.height=Sa(n,0)}Hs.prototype.contains=function(e){return Hs.contains(this,Hs.southwest(e,js))&&Hs.contains(this,Hs.northwest(e,js))&&Hs.contains(this,Hs.southeast(e,js))&&Hs.contains(this,Hs.northeast(e,js))},Hs.MAX_VALUE=Object.freeze(new Hs(-Math.PI,-Fa.PI_OVER_TWO,Math.PI,Fa.PI_OVER_TWO)),Xs.packedLength=4,Xs.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.width,t[i]=e.height,t},Xs.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new Xs),i.x=e[t++],i.y=e[t++],i.width=e[t++],i.height=e[t],i},Xs.fromPoints=function(e,t){if(wa(t)||(t=new Xs),!wa(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,n=e[0].x,r=e[0].y,o=e[0].x,a=e[0].y,s=1;s<i;s++){var l=e[s],u=l.x,c=l.y;n=Math.min(u,n),o=Math.max(u,o),r=Math.min(c,r),a=Math.max(c,a)}return t.x=n,t.y=r,t.width=o-n,t.height=a-r,t};var Ys=new Vs,Zs=new Ps,Ks=new Ps;Xs.fromRectangle=function(e,t,i){if(wa(i)||(i=new Xs),!wa(e))return i.x=0,i.y=0,i.width=0,i.height=0,i;var n=(t=Sa(t,Ys)).project(Hs.southwest(e,Zs)),r=t.project(Hs.northeast(e,Ks));return cs.subtract(r,n,r),i.x=n.x,i.y=n.y,i.width=r.x,i.height=r.y,i},Xs.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new Xs(e.x,e.y,e.width,e.height)},Xs.union=function(e,t,i){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),wa(i)||(i=new Xs);var n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),o=Math.max(e.x+e.width,t.x+t.width),a=Math.max(e.y+e.height,t.y+t.height);return i.x=n,i.y=r,i.width=o-n,i.height=a-r,i},Xs.expand=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("point",t),i=Xs.clone(e,i);var n=t.x-i.x,r=t.y-i.y;return n>i.width?i.width=n:n<0&&(i.width-=n,i.x=t.x),r>i.height?i.height=r:r<0&&(i.height-=r,i.y=t.y),i},Xs.intersect=function(e,t){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t);var i=e.x,n=e.y,r=t.x,o=t.y;return i>r+t.width||i+e.width<r||n+e.height<o||n>o+t.height?Ws.OUTSIDE:Ws.INTERSECTING},Xs.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},Xs.prototype.clone=function(e){return Xs.clone(this,e)},Xs.prototype.intersect=function(e){return Xs.intersect(this,e)},Xs.prototype.equals=function(e){return Xs.equals(this,e)};var Qs,Js,el,tl,il,nl,rl,ol,al,sl,ll,ul,cl,hl,dl,fl,pl,_l,ml,gl,xl,yl,vl,$l,bl={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},Tl={};function Cl(e,t,i,n){return Sl(e).then(t,i,n)}function Sl(e){var t,i;return e instanceof El?t=e:Ml(e)?(i=Ll(),e.then((function(e){i.resolve(e)}),(function(e){i.reject(e)}),(function(e){i.progress(e)})),t=i.promise):t=Pl(e),t}function wl(e){return Cl(e,Al)}function El(e){this.then=e}function Pl(e){var t=new El((function(t){try{return Sl(t?t(e):e)}catch(e){return Al(e)}}));return t}function Al(e){var t=new El((function(t,i){try{return i?Sl(i(e)):Al(e)}catch(e){return Al(e)}}));return t}function Ll(){var e,t,i,n,r,o;return e=new El(a),t=[],i=[],n=function(e,n,r){var o,a;return o=Ll(),a="function"==typeof r?function(e){try{o.progress(r(e))}catch(e){o.progress(e)}}:function(e){o.progress(e)},t.push((function(t){t.then(e,n).then(o.resolve,o.reject,a)})),i.push(a),o.promise},r=function(e){return zl(i,e),e},o=function(e){return e=Sl(e),n=e.then,o=Sl,r=Vl,zl(t,e),i=t=tl,e},{then:a,resolve:s,reject:l,progress:u,promise:e,resolver:{resolve:s,reject:l,progress:u}};function a(e,t,i){return n(e,t,i)}function s(e){return o(e)}function l(e){return o(Al(e))}function u(e){return r(e)}}function Ml(e){return e&&"function"==typeof e.then}function Rl(e,t,i,n,r){return Ul(2,arguments),Cl(e,(function(e){var o,a,s,l,u,c,h,d,f,p;if(f=e.length>>>0,o=Math.max(0,Math.min(t,f)),s=[],a=f-o+1,l=[],u=Ll(),o)for(d=u.progress,h=function(e){l.push(e),--a||(c=h=Vl,u.reject(l))},c=function(e){s.push(e),--o||(c=h=Vl,u.resolve(s))},p=0;p<f;++p)p in e&&Cl(e[p],m,_,d);else u.resolve(s);return u.then(i,n,r);function _(e){h(e)}function m(e){c(e)}}))}function Ol(e,t,i,n){return Ul(1,arguments),Cl(e,(function(e){var r,o,a,s,l,u,c,h,d;for(c=e.length>>>0,h=e.length>>>0,r=[],o=[],u=(a=Ll()).progress,l=function(e){o.push(e),--h||(s=l=Vl,a.resolve(r))},s=function(e,t){r[t]=e,--h||(s=l=Vl,a.resolve(r))},d=0;d<c;++d)switch(d){case 0:Cl(e[d],_,f,u);break;case 1:Cl(e[d],m,f,u);break;case 2:Cl(e[d],g,f,u);break;case 3:Cl(e[d],x,f,u);break;case 4:Cl(e[d],y,f,u);break;default:Cl(e[d],p,f,u)}return a.then(t,i,n);function f(e){l(e)}function p(e){s(e,0)}function _(e){s(e,0)}function m(e){s(e,1)}function g(e){s(e,2)}function x(e){s(e,3)}function y(e){s(e,4)}}))}function Dl(e,t,i,n){return Rl(e,1,(function(e){return t?t(e[0]):e[0]}),i,n)}function Il(e,t,i,n){return Ul(1,arguments),Bl(e,kl).then(t,i,n)}function Fl(){return Bl(arguments,kl)}function Bl(e,t){return Cl(e,(function(e){var i,n,r,o,a,s;if(r=n=e.length>>>0,i=[],s=Ll(),r)for(o=function(e,n){Cl(e,t).then((function(e){i[n]=e,--r||s.resolve(i)}),s.reject)},a=0;a<n;a++)a in e?o(e[a],a):--r;else s.resolve(i);return s.promise}))}function Nl(e,t){var i=el.call(arguments,1);return Cl(e,(function(e){var n;return n=e.length,i[0]=function(e,i,r){return Cl(e,(function(e){return Cl(i,(function(i){return t(e,i,r,n)}))}))},Js.apply(e,i)}))}function Gl(e,t,i){var n=arguments.length>2;return Cl(e,(function(e){return e=n?i:e,t.resolve(e),e}),(function(e){return t.reject(e),Al(e)}),t.progress)}function zl(e,t){for(var i,n=0;i=e[n++];)i(t)}function Ul(e,t){for(var i,n=t.length;n>e;)if(null!=(i=t[--n])&&"function"!=typeof i)throw new Error("arg "+n+" must be a function")}function Vl(){}function kl(e){return e}function Wl(e){for(var t=e.split("."),i=0,n=t.length;i<n;++i)t[i]=parseInt(t[i],10);return t}function Hl(){if(!wa(nl)&&(nl=!1,!Jl())){var e=/ Chrome\/([\.0-9]+)/.exec(il.userAgent);null!==e&&(nl=!0,rl=Wl(e[1]))}return nl}function ql(){return Hl()&&rl}function jl(){if(!wa(ol)&&(ol=!1,!Hl()&&!Jl()&&/ Safari\/[\.0-9]+/.test(il.userAgent))){var e=/ Version\/([\.0-9]+)/.exec(il.userAgent);null!==e&&(ol=!0,al=Wl(e[1]))}return ol}function Xl(){return jl()&&al}function Yl(){if(!wa(sl)){sl=!1;var e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(il.userAgent);null!==e&&(sl=!0,(ll=Wl(e[1])).isNightly=!!e[2])}return sl}function Zl(){return Yl()&&ll}function Kl(){var e;return wa(ul)||(ul=!1,"Microsoft Internet Explorer"===il.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(il.userAgent))&&(ul=!0,cl=Wl(e[1])):"Netscape"===il.appName&&null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(il.userAgent))&&(ul=!0,cl=Wl(e[1]))),ul}function Ql(){return Kl()&&cl}function Jl(){if(!wa(hl)){hl=!1;var e=/ Edge\/([\.0-9]+)/.exec(il.userAgent);null!==e&&(hl=!0,dl=Wl(e[1]))}return hl}function eu(){return Jl()&&dl}function tu(){if(!wa(fl)){fl=!1;var e=/Firefox\/([\.0-9]+)/.exec(il.userAgent);null!==e&&(fl=!0,pl=Wl(e[1]))}return fl}function iu(){return wa(_l)||(_l=/Windows/i.test(il.appVersion)),_l}function nu(){return tu()&&pl}function ru(){return wa(ml)||(ml="object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)),ml}function ou(){return wa(gl)||(gl=!tu()&&typeof PointerEvent<"u"&&(!wa(il.pointerEnabled)||il.pointerEnabled)),gl}function au(){if(!wa(yl)){var e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");var t=e.style.imageRendering;(yl=wa(t)&&""!==t)&&(xl=t)}return yl}function su(){return au()?xl:void 0}function lu(){if(wa($l))return $l.promise;$l=Cl.defer(),Jl()&&(vl=!1,$l.resolve(vl));var e=new Image;return e.onload=function(){vl=e.width>0&&e.height>0,$l.resolve(vl)},e.onerror=function(){vl=!1,$l.resolve(vl)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",$l.promise}function uu(){return wa($l)||lu(),vl}Object.defineProperties(Tl,{element:{get:function(){if(Tl.supportsFullscreen())return document[bl.fullscreenElement]}},changeEventName:{get:function(){if(Tl.supportsFullscreen())return bl.fullscreenchange}},errorEventName:{get:function(){if(Tl.supportsFullscreen())return bl.fullscreenerror}},enabled:{get:function(){if(Tl.supportsFullscreen())return document[bl.fullscreenEnabled]}},fullscreen:{get:function(){if(Tl.supportsFullscreen())return null!==Tl.element}}}),Tl.supportsFullscreen=function(){if(wa(Qs))return Qs;Qs=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return bl.requestFullscreen="requestFullscreen",bl.exitFullscreen="exitFullscreen",bl.fullscreenEnabled="fullscreenEnabled",bl.fullscreenElement="fullscreenElement",bl.fullscreenchange="fullscreenchange",bl.fullscreenerror="fullscreenerror",Qs=!0;for(var t,i=["webkit","moz","o","ms","khtml"],n=0,r=i.length;n<r;++n){var o=i[n];("function"==typeof e[t=o+"RequestFullscreen"]||"function"==typeof e[t=o+"RequestFullScreen"])&&(bl.requestFullscreen=t,Qs=!0),t=o+"ExitFullscreen","function"==typeof document[t]?bl.exitFullscreen=t:(t=o+"CancelFullScreen","function"==typeof document[t]&&(bl.exitFullscreen=t)),t=o+"FullscreenEnabled",void 0!==document[t]?bl.fullscreenEnabled=t:(t=o+"FullScreenEnabled",void 0!==document[t]&&(bl.fullscreenEnabled=t)),t=o+"FullscreenElement",void 0!==document[t]?bl.fullscreenElement=t:(t=o+"FullScreenElement",void 0!==document[t]&&(bl.fullscreenElement=t)),t=o+"fullscreenchange",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenChange"),bl.fullscreenchange=t),t=o+"fullscreenerror",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenError"),bl.fullscreenerror=t)}return Qs},Tl.requestFullscreen=function(e,t){!Tl.supportsFullscreen()||e[bl.requestFullscreen]({vrDisplay:t})},Tl.exitFullscreen=function(){!Tl.supportsFullscreen()||document[bl.exitFullscreen]()},Tl._names=bl,Cl.defer=Ll,Cl.resolve=Sl,Cl.reject=wl,Cl.join=Fl,Cl.all=Il,Cl.map=Bl,Cl.reduce=Nl,Cl.any=Dl,Cl.some=Rl,Cl.allSettled=Ol,Cl.chain=Gl,Cl.isPromise=Ml,El.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(tl,e)},yield:function(e){return this.then((function(){return e}))},spread:function(e){return this.then((function(t){return Il(t,(function(t){return e.apply(tl,t)}))}))}},el=[].slice,Js=[].reduce||function(e){var t,i,n,r,o;if(o=0,r=(t=Object(this)).length>>>0,(i=arguments).length<=1)for(;;){if(o in t){n=t[o++];break}if(++o>=r)throw new TypeError}else n=i[1];for(;o<r;++o)o in t&&(n=e(n,t[o],o,t));return n},il=typeof navigator<"u"?navigator:{};var cu=[];typeof ArrayBuffer<"u"&&(cu.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&cu.push(Uint8ClampedArray),typeof CanvasPixelArray<"u"&&cu.push(CanvasPixelArray));var hu,du,fu,pu={isChrome:Hl,chromeVersion:ql,isSafari:jl,safariVersion:Xl,isWebkit:Yl,webkitVersion:Zl,isInternetExplorer:Kl,internetExplorerVersion:Ql,isEdge:Jl,edgeVersion:eu,isFirefox:tu,firefoxVersion:nu,isWindows:iu,isNodeJs:ru,hardwareConcurrency:Sa(il.hardwareConcurrency,3),supportsPointerEvents:ou,supportsImageRenderingPixelated:au,supportsWebP:lu,supportsWebPSync:uu,imageRenderingValue:su,typedArrayTypes:cu,isPCBroswer:_u};function _u(){var e=window.navigator.userAgent.toLowerCase(),t="ipad"==e.match(/ipad/i),i="iphone os"==e.match(/iphone os/i),n="midp"==e.match(/midp/i),r="ucweb"==e.match(/ucweb/i),o="android"==e.match(/android/i),a="windows ce"==e.match(/windows ce/i),s="windows mobile"==e.match(/windows mobile/i);return!(t||i||n||r||o||a||s)}function mu(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function gu(e,t,i,n){this.red=Sa(e,1),this.green=Sa(t,1),this.blue=Sa(i,1),this.alpha=Sa(n,1)}pu.supportsFullscreen=function(){return Tl.supportsFullscreen()},pu.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},pu.supportsWebWorkers=function(){return typeof Worker<"u"},pu.supportsWebAssembly=function(){return typeof WebAssembly<"u"&&!pu.isEdge()},pu.supportsOffscreenCanvas=function(){return typeof OffscreenCanvas<"u"&&!pu.isEdge()},gu.fromCartesian4=function(e,t){return Oa.typeOf.object("cartesian",e),wa(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new gu(e.x,e.y,e.z,e.w)},gu.fromBytes=function(e,t,i,n,r){return e=gu.byteToFloat(Sa(e,255)),t=gu.byteToFloat(Sa(t,255)),i=gu.byteToFloat(Sa(i,255)),n=gu.byteToFloat(Sa(n,255)),wa(r)?(r.red=e,r.green=t,r.blue=i,r.alpha=n,r):new gu(e,t,i,n)},gu.fromAlpha=function(e,t,i){return Oa.typeOf.object("color",e),Oa.typeOf.number("alpha",t),wa(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=t,i):new gu(e.red,e.green,e.blue,t)},pu.supportsTypedArrays()&&(hu=new ArrayBuffer(4),du=new Uint32Array(hu),fu=new Uint8Array(hu)),gu.fromRgba=function(e,t){return du[0]=e,gu.fromBytes(fu[0],fu[1],fu[2],fu[3],t)},gu.byteToRgba=function(e,t,i,n){return fu[0]=e,fu[1]=t,fu[2]=i,fu[3]=n,du[0]},gu.fromHsl=function(e,t,i,n,r){e=Sa(e,0)%1,t=Sa(t,0),i=Sa(i,0),n=Sa(n,1);var o=i,a=i,s=i;if(0!==t){var l,u=2*i-(l=i<.5?i*(1+t):i+t-i*t);o=mu(u,l,e+1/3),a=mu(u,l,e),s=mu(u,l,e-1/3)}return wa(r)?(r.red=o,r.green=a,r.blue=s,r.alpha=n,r):new gu(o,a,s,n)},gu.fromRandom=function(e,t){var i=(e=Sa(e,Sa.EMPTY_OBJECT)).red;if(!wa(i)){var n=Sa(e.minimumRed,0),r=Sa(e.maximumRed,1);Oa.typeOf.number.lessThanOrEquals("minimumRed",n,r),i=n+Fa.nextRandomNumber()*(r-n)}var o=e.green;if(!wa(o)){var a=Sa(e.minimumGreen,0),s=Sa(e.maximumGreen,1);Oa.typeOf.number.lessThanOrEquals("minimumGreen",a,s),o=a+Fa.nextRandomNumber()*(s-a)}var l=e.blue;if(!wa(l)){var u=Sa(e.minimumBlue,0),c=Sa(e.maximumBlue,1);Oa.typeOf.number.lessThanOrEquals("minimumBlue",u,c),l=u+Fa.nextRandomNumber()*(c-u)}var h=e.alpha;if(!wa(h)){var d=Sa(e.minimumAlpha,0),f=Sa(e.maximumAlpha,1);Oa.typeOf.number.lessThanOrEquals("minumumAlpha",d,f),h=d+Fa.nextRandomNumber()*(f-d)}return wa(t)?(t.red=i,t.green=o,t.blue=l,t.alpha=h,t):new gu(i,o,l,h)};var xu=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,yu=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,vu=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,$u=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;gu.fromCssColorString=function(e,t){Oa.typeOf.string("color",e),wa(t)||(t=new gu);var i=gu[e.toUpperCase()];if(wa(i))return gu.clone(i,t),t;var n=xu.exec(e);return null!==n?(t.red=parseInt(n[1],16)/15,t.green=parseInt(n[2],16)/15,t.blue=parseInt(n[3],16)/15,t.alpha=1,t):null!==(n=yu.exec(e))?(t.red=parseInt(n[1],16)/255,t.green=parseInt(n[2],16)/255,t.blue=parseInt(n[3],16)/255,t.alpha=1,t):null!==(n=vu.exec(e))?(t.red=parseFloat(n[1])/("%"===n[1].substr(-1)?100:255),t.green=parseFloat(n[2])/("%"===n[2].substr(-1)?100:255),t.blue=parseFloat(n[3])/("%"===n[3].substr(-1)?100:255),t.alpha=parseFloat(Sa(n[4],"1.0")),t):null!==(n=$u.exec(e))?gu.fromHsl(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(Sa(n[4],"1.0")),t):t=void 0},gu.packedLength=4,gu.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.red,t[i++]=e.green,t[i++]=e.blue,t[i]=e.alpha,t},gu.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new gu),i.red=e[t++],i.green=e[t++],i.blue=e[t++],i.alpha=e[t],i},gu.byteToFloat=function(e){return e/255},gu.floatToByte=function(e){return 1===e?255:256*e|0},gu.clone=function(e,t){if(wa(e))return wa(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new gu(e.red,e.green,e.blue,e.alpha)},gu.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},gu.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},gu.prototype.clone=function(e){return gu.clone(this,e)},gu.prototype.equals=function(e){return gu.equals(this,e)},gu.prototype.equalsEpsilon=function(e,t){return this===e||wa(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},gu.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},gu.prototype.toCssColorString=function(){var e=gu.floatToByte(this.red),t=gu.floatToByte(this.green),i=gu.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},gu.prototype.toBytes=function(e){var t=gu.floatToByte(this.red),i=gu.floatToByte(this.green),n=gu.floatToByte(this.blue),r=gu.floatToByte(this.alpha);return wa(e)?(e[0]=t,e[1]=i,e[2]=n,e[3]=r,e):[t,i,n,r]},gu.prototype.toRgba=function(){return fu[0]=gu.floatToByte(this.red),fu[1]=gu.floatToByte(this.green),fu[2]=gu.floatToByte(this.blue),fu[3]=gu.floatToByte(this.alpha),du[0]},gu.prototype.brighten=function(e,t){return Oa.typeOf.number("magnitude",e),Oa.typeOf.number.greaterThanOrEquals("magnitude",e,0),Oa.typeOf.object("result",t),e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},gu.prototype.darken=function(e,t){return Oa.typeOf.number("magnitude",e),Oa.typeOf.number.greaterThanOrEquals("magnitude",e,0),Oa.typeOf.object("result",t),e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},gu.prototype.withAlpha=function(e,t){return gu.fromAlpha(this,e,t)},gu.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},gu.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},gu.multiply=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},gu.divide=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},gu.mod=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},gu.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),n.red=Fa.lerp(e.red,t.red,i),n.green=Fa.lerp(e.green,t.green,i),n.blue=Fa.lerp(e.blue,t.blue,i),n.alpha=Fa.lerp(e.alpha,t.alpha,i),n},gu.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("color",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},gu.divideByScalar=function(e,t,i){return Oa.typeOf.object("color",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},gu.ALICEBLUE=Object.freeze(gu.fromCssColorString("#F0F8FF")),gu.ANTIQUEWHITE=Object.freeze(gu.fromCssColorString("#FAEBD7")),gu.AQUA=Object.freeze(gu.fromCssColorString("#00FFFF")),gu.AQUAMARINE=Object.freeze(gu.fromCssColorString("#7FFFD4")),gu.AZURE=Object.freeze(gu.fromCssColorString("#F0FFFF")),gu.BEIGE=Object.freeze(gu.fromCssColorString("#F5F5DC")),gu.BISQUE=Object.freeze(gu.fromCssColorString("#FFE4C4")),gu.BLACK=Object.freeze(gu.fromCssColorString("#000000")),gu.BLANCHEDALMOND=Object.freeze(gu.fromCssColorString("#FFEBCD")),gu.BLUE=Object.freeze(gu.fromCssColorString("#0000FF")),gu.BLUEVIOLET=Object.freeze(gu.fromCssColorString("#8A2BE2")),gu.BROWN=Object.freeze(gu.fromCssColorString("#A52A2A")),gu.BURLYWOOD=Object.freeze(gu.fromCssColorString("#DEB887")),gu.CADETBLUE=Object.freeze(gu.fromCssColorString("#5F9EA0")),gu.CHARTREUSE=Object.freeze(gu.fromCssColorString("#7FFF00")),gu.CHOCOLATE=Object.freeze(gu.fromCssColorString("#D2691E")),gu.CORAL=Object.freeze(gu.fromCssColorString("#FF7F50")),gu.CORNFLOWERBLUE=Object.freeze(gu.fromCssColorString("#6495ED")),gu.CORNSILK=Object.freeze(gu.fromCssColorString("#FFF8DC")),gu.CRIMSON=Object.freeze(gu.fromCssColorString("#DC143C")),gu.CYAN=Object.freeze(gu.fromCssColorString("#00FFFF")),gu.DARKBLUE=Object.freeze(gu.fromCssColorString("#00008B")),gu.DARKCYAN=Object.freeze(gu.fromCssColorString("#008B8B")),gu.DARKGOLDENROD=Object.freeze(gu.fromCssColorString("#B8860B")),gu.DARKGRAY=Object.freeze(gu.fromCssColorString("#A9A9A9")),gu.DARKGREEN=Object.freeze(gu.fromCssColorString("#006400")),gu.DARKGREY=gu.DARKGRAY,gu.DARKKHAKI=Object.freeze(gu.fromCssColorString("#BDB76B")),gu.DARKMAGENTA=Object.freeze(gu.fromCssColorString("#8B008B")),gu.DARKOLIVEGREEN=Object.freeze(gu.fromCssColorString("#556B2F")),gu.DARKORANGE=Object.freeze(gu.fromCssColorString("#FF8C00")),gu.DARKORCHID=Object.freeze(gu.fromCssColorString("#9932CC")),gu.DARKRED=Object.freeze(gu.fromCssColorString("#8B0000")),gu.DARKSALMON=Object.freeze(gu.fromCssColorString("#E9967A")),gu.DARKSEAGREEN=Object.freeze(gu.fromCssColorString("#8FBC8F")),gu.DARKSLATEBLUE=Object.freeze(gu.fromCssColorString("#483D8B")),gu.DARKSLATEGRAY=Object.freeze(gu.fromCssColorString("#2F4F4F")),gu.DARKSLATEGREY=gu.DARKSLATEGRAY,gu.DARKTURQUOISE=Object.freeze(gu.fromCssColorString("#00CED1")),gu.DARKVIOLET=Object.freeze(gu.fromCssColorString("#9400D3")),gu.DEEPPINK=Object.freeze(gu.fromCssColorString("#FF1493")),gu.DEEPSKYBLUE=Object.freeze(gu.fromCssColorString("#00BFFF")),gu.DIMGRAY=Object.freeze(gu.fromCssColorString("#696969")),gu.DIMGREY=gu.DIMGRAY,gu.DODGERBLUE=Object.freeze(gu.fromCssColorString("#1E90FF")),gu.FIREBRICK=Object.freeze(gu.fromCssColorString("#B22222")),gu.FLORALWHITE=Object.freeze(gu.fromCssColorString("#FFFAF0")),gu.FORESTGREEN=Object.freeze(gu.fromCssColorString("#228B22")),gu.FUCHSIA=Object.freeze(gu.fromCssColorString("#FF00FF")),gu.GAINSBORO=Object.freeze(gu.fromCssColorString("#DCDCDC")),gu.GHOSTWHITE=Object.freeze(gu.fromCssColorString("#F8F8FF")),gu.GOLD=Object.freeze(gu.fromCssColorString("#FFD700")),gu.GOLDENROD=Object.freeze(gu.fromCssColorString("#DAA520")),gu.GRAY=Object.freeze(gu.fromCssColorString("#808080")),gu.GREEN=Object.freeze(gu.fromCssColorString("#008000")),gu.GREENYELLOW=Object.freeze(gu.fromCssColorString("#ADFF2F")),gu.GREY=gu.GRAY,gu.HONEYDEW=Object.freeze(gu.fromCssColorString("#F0FFF0")),gu.HOTPINK=Object.freeze(gu.fromCssColorString("#FF69B4")),gu.INDIANRED=Object.freeze(gu.fromCssColorString("#CD5C5C")),gu.INDIGO=Object.freeze(gu.fromCssColorString("#4B0082")),gu.IVORY=Object.freeze(gu.fromCssColorString("#FFFFF0")),gu.KHAKI=Object.freeze(gu.fromCssColorString("#F0E68C")),gu.LAVENDER=Object.freeze(gu.fromCssColorString("#E6E6FA")),gu.LAVENDAR_BLUSH=Object.freeze(gu.fromCssColorString("#FFF0F5")),gu.LAWNGREEN=Object.freeze(gu.fromCssColorString("#7CFC00")),gu.LEMONCHIFFON=Object.freeze(gu.fromCssColorString("#FFFACD")),gu.LIGHTBLUE=Object.freeze(gu.fromCssColorString("#ADD8E6")),gu.LIGHTCORAL=Object.freeze(gu.fromCssColorString("#F08080")),gu.LIGHTCYAN=Object.freeze(gu.fromCssColorString("#E0FFFF")),gu.LIGHTGOLDENRODYELLOW=Object.freeze(gu.fromCssColorString("#FAFAD2")),gu.LIGHTGRAY=Object.freeze(gu.fromCssColorString("#D3D3D3")),gu.LIGHTGREEN=Object.freeze(gu.fromCssColorString("#90EE90")),gu.LIGHTGREY=gu.LIGHTGRAY,gu.LIGHTPINK=Object.freeze(gu.fromCssColorString("#FFB6C1")),gu.LIGHTSEAGREEN=Object.freeze(gu.fromCssColorString("#20B2AA")),gu.LIGHTSKYBLUE=Object.freeze(gu.fromCssColorString("#87CEFA")),gu.LIGHTSLATEGRAY=Object.freeze(gu.fromCssColorString("#778899")),gu.LIGHTSLATEGREY=gu.LIGHTSLATEGRAY,gu.LIGHTSTEELBLUE=Object.freeze(gu.fromCssColorString("#B0C4DE")),gu.LIGHTYELLOW=Object.freeze(gu.fromCssColorString("#FFFFE0")),gu.LIME=Object.freeze(gu.fromCssColorString("#00FF00")),gu.LIMEGREEN=Object.freeze(gu.fromCssColorString("#32CD32")),gu.LINEN=Object.freeze(gu.fromCssColorString("#FAF0E6")),gu.MAGENTA=Object.freeze(gu.fromCssColorString("#FF00FF")),gu.MAROON=Object.freeze(gu.fromCssColorString("#800000")),gu.MEDIUMAQUAMARINE=Object.freeze(gu.fromCssColorString("#66CDAA")),gu.MEDIUMBLUE=Object.freeze(gu.fromCssColorString("#0000CD")),gu.MEDIUMORCHID=Object.freeze(gu.fromCssColorString("#BA55D3")),gu.MEDIUMPURPLE=Object.freeze(gu.fromCssColorString("#9370DB")),gu.MEDIUMSEAGREEN=Object.freeze(gu.fromCssColorString("#3CB371")),gu.MEDIUMSLATEBLUE=Object.freeze(gu.fromCssColorString("#7B68EE")),gu.MEDIUMSPRINGGREEN=Object.freeze(gu.fromCssColorString("#00FA9A")),gu.MEDIUMTURQUOISE=Object.freeze(gu.fromCssColorString("#48D1CC")),gu.MEDIUMVIOLETRED=Object.freeze(gu.fromCssColorString("#C71585")),gu.MIDNIGHTBLUE=Object.freeze(gu.fromCssColorString("#191970")),gu.MINTCREAM=Object.freeze(gu.fromCssColorString("#F5FFFA")),gu.MISTYROSE=Object.freeze(gu.fromCssColorString("#FFE4E1")),gu.MOCCASIN=Object.freeze(gu.fromCssColorString("#FFE4B5")),gu.NAVAJOWHITE=Object.freeze(gu.fromCssColorString("#FFDEAD")),gu.NAVY=Object.freeze(gu.fromCssColorString("#000080")),gu.OLDLACE=Object.freeze(gu.fromCssColorString("#FDF5E6")),gu.OLIVE=Object.freeze(gu.fromCssColorString("#808000")),gu.OLIVEDRAB=Object.freeze(gu.fromCssColorString("#6B8E23")),gu.ORANGE=Object.freeze(gu.fromCssColorString("#FFA500")),gu.ORANGERED=Object.freeze(gu.fromCssColorString("#FF4500")),gu.ORCHID=Object.freeze(gu.fromCssColorString("#DA70D6")),gu.PALEGOLDENROD=Object.freeze(gu.fromCssColorString("#EEE8AA")),gu.PALEGREEN=Object.freeze(gu.fromCssColorString("#98FB98")),gu.PALETURQUOISE=Object.freeze(gu.fromCssColorString("#AFEEEE")),gu.PALEVIOLETRED=Object.freeze(gu.fromCssColorString("#DB7093")),gu.PAPAYAWHIP=Object.freeze(gu.fromCssColorString("#FFEFD5")),gu.PEACHPUFF=Object.freeze(gu.fromCssColorString("#FFDAB9")),gu.PERU=Object.freeze(gu.fromCssColorString("#CD853F")),gu.PINK=Object.freeze(gu.fromCssColorString("#FFC0CB")),gu.PLUM=Object.freeze(gu.fromCssColorString("#DDA0DD")),gu.POWDERBLUE=Object.freeze(gu.fromCssColorString("#B0E0E6")),gu.PURPLE=Object.freeze(gu.fromCssColorString("#800080")),gu.RED=Object.freeze(gu.fromCssColorString("#FF0000")),gu.ROSYBROWN=Object.freeze(gu.fromCssColorString("#BC8F8F")),gu.ROYALBLUE=Object.freeze(gu.fromCssColorString("#4169E1")),gu.SADDLEBROWN=Object.freeze(gu.fromCssColorString("#8B4513")),gu.SALMON=Object.freeze(gu.fromCssColorString("#FA8072")),gu.SANDYBROWN=Object.freeze(gu.fromCssColorString("#F4A460")),gu.SEAGREEN=Object.freeze(gu.fromCssColorString("#2E8B57")),gu.SEASHELL=Object.freeze(gu.fromCssColorString("#FFF5EE")),gu.SIENNA=Object.freeze(gu.fromCssColorString("#A0522D")),gu.SILVER=Object.freeze(gu.fromCssColorString("#C0C0C0")),gu.SKYBLUE=Object.freeze(gu.fromCssColorString("#87CEEB")),gu.SLATEBLUE=Object.freeze(gu.fromCssColorString("#6A5ACD")),gu.SLATEGRAY=Object.freeze(gu.fromCssColorString("#708090")),gu.SLATEGREY=gu.SLATEGRAY,gu.SNOW=Object.freeze(gu.fromCssColorString("#FFFAFA")),gu.SPRINGGREEN=Object.freeze(gu.fromCssColorString("#00FF7F")),gu.STEELBLUE=Object.freeze(gu.fromCssColorString("#4682B4")),gu.TAN=Object.freeze(gu.fromCssColorString("#D2B48C")),gu.TEAL=Object.freeze(gu.fromCssColorString("#008080")),gu.THISTLE=Object.freeze(gu.fromCssColorString("#D8BFD8")),gu.TOMATO=Object.freeze(gu.fromCssColorString("#FF6347")),gu.TURQUOISE=Object.freeze(gu.fromCssColorString("#40E0D0")),gu.VIOLET=Object.freeze(gu.fromCssColorString("#EE82EE")),gu.WHEAT=Object.freeze(gu.fromCssColorString("#F5DEB3")),gu.WHITE=Object.freeze(gu.fromCssColorString("#FFFFFF")),gu.WHITESMOKE=Object.freeze(gu.fromCssColorString("#F5F5F5")),gu.YELLOW=Object.freeze(gu.fromCssColorString("#FFFF00")),gu.YELLOWGREEN=Object.freeze(gu.fromCssColorString("#9ACD32")),gu.TRANSPARENT=Object.freeze(new gu(0,0,0,0));var bu={CLOCKWISE:Aa.CW,COUNTER_CLOCKWISE:Aa.CCW,NONE:Aa.NONE,validate:function(e){return e===bu.CLOCKWISE||e===bu.COUNTER_CLOCKWISE}},Tu=Object.freeze(bu),Cu={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:10,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1,_uniformBufferOffsetAlignment:256,_maxUniformBufferBinding:36,_maxArrayTextureLayers:256};function Su(e){if("object"!=typeof e||null===e)return e;for(var t,i=Object.keys(e),n=0;n<i.length;n++)t=i[n],e.hasOwnProperty(t)&&"_applyFunctions"!==t&&(e[t]=Su(e[t]));return Object.freeze(e)}Object.defineProperties(Cu,{maximumCombinedTextureImageUnits:{get:function(){return Cu._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return Cu._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return Cu._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return Cu._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return Cu._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return Cu._maximumTextureSize}},maximumVaryingVectors:{get:function(){return Cu._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return Cu._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return Cu._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return Cu._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return Cu._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return Cu._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return Cu._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return Cu._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return Cu._maximumViewportWidth}},maximumViewportHeight:{get:function(){return Cu._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return Cu._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return Cu._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return Cu._maximumColorAttachments}},highpFloatSupported:{get:function(){return Cu._highpFloatSupported}},highpIntSupported:{get:function(){return Cu._highpIntSupported}},uniformBufferOffsetAlignment:{get:function(){return Cu._uniformBufferOffsetAlignment}},maxUniformBufferBinding:{get:function(){return Cu._maxUniformBufferBinding}},maxArrayTextureLayers:{get:function(){return Cu._maxArrayTextureLayers}}});var wu,Eu=(wu=!0,function(e,t){var i=wu?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wu=!1,i}),Pu=Eu(void 0,(function(){return Pu.toString().search("(((.+)+)+)+$").toString().constructor(Pu).search("(((.+)+)+)+$")}));function Au(){this.reset()}Pu(),Au.prototype.reset=function(){this.enabled=!1,this.mask=255,this.funcRef=1,this.funcMask=255,this.frontFunc=Au.ALWAYS,this.backFunc=Au.ALWAYS,this.frontOpStencilFail=Au.KEEP,this.backOpStencilFail=Au.KEEP,this.frontOpDepthFail=Au.KEEP,this.backOpDepthFail=Au.KEEP,this.frontOpStencilDepthPass=Au.REPLACE,this.backOpStencilDepthPass=Au.REPLACE},Object.defineProperty(Au.prototype,"frontStencilFunc",{get:function(){return this.frontFunc},set:function(e){this.frontFunc=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"backStencilFunc",{get:function(){return this.backFunc},set:function(e){this.backFunc=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"stencilFuncRef",{get:function(){return this.funcRef},set:function(e){this.funcRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"stencilFuncMask",{get:function(){return this.funcMask},set:function(e){this.funcMask=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"frontStencilOpStencilFail",{get:function(){return this.frontOpStencilFail},set:function(e){this.frontOpStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"backStencilOpStencilFail",{get:function(){return this.backOpStencilFail},set:function(e){this.backOpStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"frontStencilOpDepthFail",{get:function(){return this.frontOpDepthFail},set:function(e){this.frontOpDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"backStencilOpDepthFail",{get:function(){return this.backOpDepthFail},set:function(e){this.backOpDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"frontStencilOpStencilDepthPass",{get:function(){return this.frontOpStencilDepthPass},set:function(e){this.frontOpStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"backStencilOpStencilDepthPass",{get:function(){return this.backOpStencilDepthPass},set:function(e){this.backOpStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"stencilMask",{get:function(){return this.mask},set:function(e){this.mask=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"stencilTest",{get:function(){return this.enabled},set:function(e){this.enabled=e},enumerable:!1,configurable:!0}),Au.ALWAYS=Xa.ALWAYS,Au.KEEP=Xa.KEEP,Au.REPLACE=Xa.REPLACE,Au.FRONT=Xa.FRONT,Au.BACK=Xa.BACK;var Lu={UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,UNSIGNED_INT:Aa.UNSIGNED_INT,FLOAT:Aa.FLOAT,HALF_FLOAT:Aa.HALF_FLOAT_OES,UNSIGNED_INT_24_8:Aa.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:Aa.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:Aa.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:Aa.UNSIGNED_SHORT_5_6_5,isPacked:function(e){return e===Lu.UNSIGNED_INT_24_8||e===Lu.UNSIGNED_SHORT_4_4_4_4||e===Lu.UNSIGNED_SHORT_5_5_5_1||e===Lu.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case Lu.UNSIGNED_BYTE:return 1;case Lu.UNSIGNED_SHORT:case Lu.UNSIGNED_SHORT_4_4_4_4:case Lu.UNSIGNED_SHORT_5_5_5_1:case Lu.UNSIGNED_SHORT_5_6_5:case Aa.HALF_FLOAT:case Aa.HALF_FLOAT_OES:return 2;case Lu.UNSIGNED_INT:case Lu.FLOAT:case Lu.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===Lu.UNSIGNED_BYTE||e===Lu.UNSIGNED_SHORT||e===Lu.UNSIGNED_INT||e===Lu.FLOAT||e===Aa.HALF_FLOAT||e===Aa.HALF_FLOAT_OES||e===Lu.UNSIGNED_INT_24_8||e===Lu.UNSIGNED_SHORT_4_4_4_4||e===Lu.UNSIGNED_SHORT_5_5_5_1||e===Lu.UNSIGNED_SHORT_5_6_5},toWebGLConstant:function(e,t){switch(e){case Lu.UNSIGNED_BYTE:return Aa.UNSIGNED_BYTE;case Lu.UNSIGNED_SHORT:return Aa.UNSIGNED_SHORT;case Lu.UNSIGNED_INT:return Aa.UNSIGNED_INT;case Lu.FLOAT:return Aa.FLOAT;case Lu.HALF_FLOAT:return t.webgl2?Aa.HALF_FLOAT:Aa.HALF_FLOAT_OES;case Lu.UNSIGNED_INT_24_8:return Aa.UNSIGNED_INT_24_8;case Lu.UNSIGNED_SHORT_4_4_4_4:return Aa.UNSIGNED_SHORT_4_4_4_4;case Lu.UNSIGNED_SHORT_5_5_5_1:return Aa.UNSIGNED_SHORT_5_5_5_1;case Lu.UNSIGNED_SHORT_5_6_5:return Lu.UNSIGNED_SHORT_5_6_5}}},Mu={DEPTH_COMPONENT:Aa.DEPTH_COMPONENT,DEPTH_COMPONENT16:Aa.DEPTH_COMPONENT16,DEPTH_COMPONENT32F:Aa.DEPTH_COMPONENT32F,DEPTH_STENCIL:Aa.DEPTH_STENCIL,ALPHA:Aa.ALPHA,RGB:Aa.RGB,RGBA:Aa.RGBA,LUMINANCE:Aa.LUMINANCE,LUMINANCE_ALPHA:Aa.LUMINANCE_ALPHA,RGB_DXT1:Aa.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:Aa.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:Aa.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:Aa.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:Aa.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:Aa.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:Aa.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:Aa.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:Aa.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:Aa.COMPRESSED_RGB_ETC1_WEBGL,RED_INTEGER:Aa.RED_INTEGER,RED:Aa.RED,RGB8_ETC2:Aa.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:Aa.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:Aa.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(e){switch(e){case Mu.RGB:return 3;case Mu.RGBA:return 4;case Mu.LUMINANCE_ALPHA:return 2;case Mu.ALPHA:case Mu.LUMINANCE:case Mu.RED:case Mu.RED_INTEGER:default:return 1}},validate:function(e){return e===Mu.DEPTH_COMPONENT||e===Mu.DEPTH_COMPONENT16||e===Mu.DEPTH_COMPONENT32F||e===Mu.DEPTH_STENCIL||e===Mu.ALPHA||e===Mu.RED||e===Mu.RED_INTEGER||e===Mu.RGB||e===Mu.RGBA||e===Mu.LUMINANCE||e===Mu.LUMINANCE_ALPHA||e===Mu.RGB_DXT1||e===Mu.RGBA_DXT1||e===Mu.RGBA_DXT3||e===Mu.RGBA_DXT5||e===Mu.RGB_PVRTC_4BPPV1||e===Mu.RGB_PVRTC_2BPPV1||e===Mu.RGBA_PVRTC_4BPPV1||e===Mu.RGBA_PVRTC_2BPPV1||e===Mu.RGBA_ASTC||e===Mu.RGB_ETC1||e===Mu.RGB8_ETC2||e===Mu.RGBA8_ETC2_EAC||e===Mu.RGBA_BC7},isColorFormat:function(e){return e===Mu.ALPHA||e===Mu.RED||e===Mu.RED_INTEGER||e===Mu.RGB||e===Mu.RGBA||e===Mu.LUMINANCE||e===Mu.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===Mu.DEPTH_COMPONENT||e===Mu.DEPTH_COMPONENT16||e===Mu.DEPTH_COMPONENT32F||e===Mu.DEPTH_STENCIL},isCompressedFormat:function(e){return e===Mu.RGB_DXT1||e===Mu.RGBA_DXT1||e===Mu.RGBA_DXT3||e===Mu.RGBA_DXT5||e===Mu.RGB_PVRTC_4BPPV1||e===Mu.RGB_PVRTC_2BPPV1||e===Mu.RGBA_PVRTC_4BPPV1||e===Mu.RGBA_PVRTC_2BPPV1||e===Mu.RGBA_ASTC||e===Mu.RGB_ETC1||e===Mu.RGB8_ETC2||e===Mu.RGBA8_ETC2_EAC||e===Mu.RGBA_BC7},isDXTFormat:function(e){return e===Mu.RGB_DXT1||e===Mu.RGBA_DXT1||e===Mu.RGBA_DXT3||e===Mu.RGBA_DXT5},isPVRTCFormat:function(e){return e===Mu.RGB_PVRTC_4BPPV1||e===Mu.RGB_PVRTC_2BPPV1||e===Mu.RGBA_PVRTC_4BPPV1||e===Mu.RGBA_PVRTC_2BPPV1},isETC1Format:function(e){return e===Mu.RGB_ETC1},compressedTextureSizeInBytes:function(e,t,i,n){var r=wa(n)?n:1;switch(e){case Mu.RGB_DXT1:case Mu.RGBA_DXT1:case Mu.RGB_ETC1:case Mu.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*8*r;case Mu.RGBA_DXT3:case Mu.RGBA_DXT5:case Mu.RGBA_ASTC:case Mu.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*16*r;case Mu.RGB_PVRTC_4BPPV1:case Mu.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8)*r;case Mu.RGB_PVRTC_2BPPV1:case Mu.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8)*r;case Mu.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(i/4)*16;default:return 0}},textureSizeInBytes:function(e,t,i,n,r){var o=wa(r)?r:1,a=Mu.componentsLength(e);return Lu.isPacked(t)&&(a=1),a*Lu.sizeInBytes(t)*i*n*o},alignmentInBytes:function(e,t,i){var n=Mu.textureSizeInBytes(e,t,i,1)%4;return 0===n?4:2===n?2:1},createTypedArray:function(e,t,i,n){var r=Lu.sizeInBytes(t);return new(r===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:r===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:r===Float32Array.BYTES_PER_ELEMENT&&t===Lu.FLOAT?Float32Array:Uint32Array)(Mu.componentsLength(e)*i*n)},flipY:function(e,t,i,n,r){if(1===r)return e;for(var o=Mu.createTypedArray(t,i,n,r),a=Mu.componentsLength(t),s=n*a,l=0;l<r;++l)for(var u=l*n*a,c=(r-l-1)*n*a,h=0;h<s;++h)o[c+h]=e[u+h];return o},RGBToRGBA:function(e,t,i,n){for(var r=Mu.createTypedArray(Mu.RGBA,t,i,n),o=e.length/3,a=0;a<o;a++)r[4*a]=e[3*a],r[4*a+1]=e[3*a+1],r[4*a+2]=e[3*a+2];return r},toInternalFormat:function(e,t,i){if(!i.webgl2)return e;if(e===Mu.DEPTH_STENCIL)return Aa.DEPTH24_STENCIL8;if(e===Mu.DEPTH_COMPONENT){if(t===Lu.UNSIGNED_SHORT)return Aa.DEPTH_COMPONENT16;if(t===Lu.UNSIGNED_INT)return Aa.DEPTH_COMPONENT24;if(t===Lu.FLOAT)return Aa.DEPTH_COMPONENT32F}if(e===Mu.DEPTH_COMPONENT16)return Aa.DEPTH_COMPONENT16;if(e===Mu.DEPTH_COMPONENT32F)return Aa.DEPTH_COMPONENT32F;if(t===Lu.FLOAT)switch(e){case Mu.RGBA:return Aa.RGBA32F;case Mu.RGB:return Aa.RGB32F;case Mu.RG:return Aa.RG32F;case Mu.RED:return Aa.R32F}if(t===Lu.UNSIGNED_BYTE)switch(e){case Mu.RGBA:return Aa.RGBA8;case Mu.RGB:return Aa.RGB8;case Mu.RED:return Aa.R8}if(t===Lu.HALF_FLOAT)switch(e){case Mu.RGBA:return Aa.RGBA16F;case Mu.RGB:return Aa.RGB16F;case Mu.RG:return Aa.RG16F;case Mu.RED:return Aa.R16F}return e}},Ru=Object.freeze(Mu),Ou={POINTS:Aa.POINTS,LINES:Aa.LINES,LINE_LOOP:Aa.LINE_LOOP,LINE_STRIP:Aa.LINE_STRIP,TRIANGLES:Aa.TRIANGLES,TRIANGLE_STRIP:Aa.TRIANGLE_STRIP,TRIANGLE_FAN:Aa.TRIANGLE_FAN,validate:function(e){return e===Ou.POINTS||e===Ou.LINES||e===Ou.LINE_LOOP||e===Ou.LINE_STRIP||e===Ou.TRIANGLES||e===Ou.TRIANGLE_STRIP||e===Ou.TRIANGLE_FAN}},Du=Object.freeze(Ou),Iu={CLAMP_TO_EDGE:Aa.CLAMP_TO_EDGE,REPEAT:Aa.REPEAT,MIRRORED_REPEAT:Aa.MIRRORED_REPEAT,validate:function(e){return e===Iu.CLAMP_TO_EDGE||e===Iu.REPEAT||e===Iu.MIRRORED_REPEAT}},Fu=Object.freeze(Iu),Bu={NEAREST:Aa.NEAREST,LINEAR:Aa.LINEAR,validate:function(e){return e===Bu.NEAREST||e===Bu.LINEAR}},Nu=Object.freeze(Bu),Gu={NEAREST:Aa.NEAREST,LINEAR:Aa.LINEAR,NEAREST_MIPMAP_NEAREST:Aa.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:Aa.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:Aa.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:Aa.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===Gu.NEAREST||e===Gu.LINEAR||e===Gu.NEAREST_MIPMAP_NEAREST||e===Gu.LINEAR_MIPMAP_NEAREST||e===Gu.NEAREST_MIPMAP_LINEAR||e===Gu.LINEAR_MIPMAP_LINEAR}},zu=Object.freeze(Gu);function Uu(){}function Vu(){}Uu.toPixelFormat=function(e){switch(e){case Ru.RED:return Xa.TEXTUREFORMAT_RED;case Ru.RED_INTEGER:return Xa.TEXTUREFORMAT_RED_INTEGER;case Ru.RGB:return Xa.TEXTUREFORMAT_RGB;case Ru.RGBA:return Xa.TEXTUREFORMAT_RGBA;case Ru.LUMINANCE_ALPHA:return Xa.TEXTUREFORMAT_LUMINANCE_ALPHA;case Ru.ALPHA:return Xa.TEXTUREFORMAT_ALPHA;case Ru.LUMINANCE:return Xa.TEXTUREFORMAT_LUMINANCE;case Ru.DEPTH_COMPONENT16:return Xa.TEXTUREFORMAT_DEPTH16;case Ru.DEPTH_COMPONENT:return Xa.TEXTUREFORMAT_DEPTH24;case Ru.DEPTH_COMPONENT32F:return Xa.TEXTUREFORMAT_DEPTH32_FLOAT;case Ru.DEPTH_STENCIL:return Xa.TEXTUREFORMAT_DEPTH24_STENCIL8;case Ru.RGBA_DXT1:return Xa.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1;case Ru.RGBA_DXT3:return Xa.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3;case Ru.RGBA_DXT5:return Xa.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5;case Ru.RGB_DXT1:return Xa.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1;case Ru.RGBA_PVRTC_2BPPV1:case Ru.RGBA_PVRTC_4BPPV1:case Ru.RGB_ETC1:case Ru.RGB_PVRTC_2BPPV1:case Ru.RGB_PVRTC_4BPPV1:default:return 1}},Uu.toPixelType=function(e){switch(e){case Lu.FLOAT:return Xa.TEXTURETYPE_FLOAT;case Lu.HALF_FLOAT:return Xa.TEXTURETYPE_HALF_FLOAT;case Lu.UNSIGNED_BYTE:return Xa.TEXTURETYPE_UNSIGNED_BYTE;case Lu.UNSIGNED_INT:return Xa.TEXTURETYPE_UNSIGNED_INT;case Lu.UNSIGNED_INT_24_8:return Xa.TEXTURETYPE_UNSIGNED_INT_24_8;case Lu.UNSIGNED_SHORT:return Xa.TEXTURETYPE_UNSIGNED_SHORT;case Lu.UNSIGNED_SHORT_4_4_4_4:return Xa.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4;case Lu.UNSIGNED_SHORT_5_5_5_1:return Xa.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1;case Lu.UNSIGNED_SHORT_5_6_5:return Xa.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;default:return Xa.TEXTURETYPE_UNDEFINED}},Uu.toSamplerMode=function(e,t){var i=e==Lu.FLOAT||e==Lu.HALF_FLOAT;if(t.magnificationFilter==Nu.NEAREST){if(t.minificationFilter==zu.NEAREST)return Xa.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==zu.LINEAR)return Xa.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==zu.NEAREST_MIPMAP_NEAREST)return Xa.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==zu.LINEAR_MIPMAP_NEAREST)return Xa.TEXTURE_NEAREST_SAMPLINGMODE}else{if(t.magnificationFilter!=Nu.LINEAR)return console.log("EnumConvertor.toSamplerMode unsupported type"),Xa.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==zu.NEAREST)return i?Xa.TEXTURE_NEAREST_SAMPLINGMODE:Xa.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==zu.LINEAR)return i?Xa.TEXTURE_NEAREST_SAMPLINGMODE:Xa.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==zu.NEAREST_MIPMAP_NEAREST)return i?Xa.TEXTURE_NEAREST_SAMPLINGMODE:Xa.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==zu.LINEAR_MIPMAP_NEAREST)return i?Xa.TEXTURE_NEAREST_SAMPLINGMODE:Xa.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==zu.LINEAR_MIPMAP_LINEAR)return i?Xa.TEXTURE_NEAREST_SAMPLINGMODE:Xa.TEXTURE_LINEAR_LINEAR_MIPLINEAR}},Uu.toAddressMode=function(e){switch(e){case Fu.CLAMP_TO_EDGE:return Xa.TEXTURE_CLAMP_ADDRESSMODE;case Fu.REPEAT:return Xa.TEXTURE_WRAP_ADDRESSMODE;case Fu.MIRRORED_REPEAT:return Xa.TEXTURE_MIRROR_ADDRESSMODE;default:return Xa.TEXTURE_CLAMP_ADDRESSMODE}},Uu.toFillMode=function(e){switch(e){case Du.TRIANGLES:return Xa.MATERIAL_TriangleFillMode;case Du.POINTS:return Xa.MATERIAL_PointFillMode;case Du.LINES:return Xa.MATERIAL_WireFrameFillMode;case Du.LINE_STRIP:return Xa.MATERIAL_LineStripDrawMode;default:return console.log("EnumConvertor.toFillMode unsupported type"),Xa.MATERIAL_TriangleFillMode}},Uu.toCullFace=function(e){switch(e){case Aa.FRONT:return 2;case Aa.BACK:default:return 1}},Uu.toFrontFace=function(e,t){switch(e){case Aa.CCW:return t?2:1;case Aa.CW:return t?1:2;default:return 1}},Uu.toVertexBufferDataType=function(e){switch(e){case Ma.BYTE:return ns.BYTE;case Ma.UNSIGNED_BYTE:return ns.UNSIGNED_BYTE;case Ma.SHORT:return ns.SHORT;case Ma.UNSIGNED_SHORT:return ns.UNSIGNED_SHORT;case Ma.INT:return ns.INT;case Ma.UNSIGNED_INT:return ns.UNSIGNED_INT;case Ma.FLOAT:return ns.FLOAT;default:throw console.log("EnumConvertor.toVertexBufferDataType unsupported type"),new Ea("componentDatatype is not a valid value.")}},Vu.applyFrontFace=function(e,t,i){e._depthCullingState.frontFace=Uu.toFrontFace(t.frontFace,i)},Vu.applyCull=function(e,t){var i=t.cull;i.enabled?(e._depthCullingState.cull=!0,e._depthCullingState.cullFace=Uu.toCullFace(i.face)):(e._depthCullingState.cull=!1,e._depthCullingState.cullFace=0)},Vu.applyLineWidth=function(e,t){},Vu.applyPolygonOffset=function(e,t){var i=t.polygonOffset;i.enabled?(e.setZOffset(i.factor),e.setZOffsetUnits(i.units)):(e.setZOffset(0),e.setZOffsetUnits(0))},Vu.applyScissorTest=function(e,t,i){var n=t.scissorTest;if(wa(i.scissorTest)?i.scissorTest.enabled:n.enabled){var r=wa(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.enableScissor(r.x,r.y,r.width,r.height)}else e.disableScissor()},Vu.applyDepthRange=function(e,t){},Vu.applyDepthTest=function(e,t){var i=t.depthTest,n=i.enabled;e.setDepthBuffer(n),n&&e.setDepthFunction(i.func)},Vu.applyColorMask=function(e,t){var i=t.colorMask;e.setColorWrite(i.red)},Vu.applyDepthMask=function(e,t){e.setDepthWrite(t.depthMask)},Vu.applyStencilMask=function(e,t){var i=t.stencilMask;i<0&&(i=255),e.setStencilMask(i)},Vu.applyBlendingColor=function(e,t){e.setAlphaConstants(t.red,t.green,t.blue,t.alpha)},Vu.applyBlending=function(e,t,i){var n=t.blending;(wa(i.blendingEnabled)?i.blendingEnabled:n.enabled)?(Vu.applyBlendingColor(e,n.color),e._alphaState.setAlphaEquationParameters(n.equationRgb,n.equationAlpha),e._alphaState.setAlphaBlendFunctionParameters(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha),e._alphaState.alphaBlend=!0):e.setAlphaMode(Xa.ALPHA_DISABLE)},Vu.applyStencilTest=function(e,t){var i=t.stencilTest,n=i.enabled;if(e.setStencilBuffer(n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.setStencilFunction(Au.FRONT,r);var l=i.frontOperation;e.setStencilOperationFail(Au.FRONT,l.fail),e.setStencilOperationDepthFail(Au.FRONT,l.zFail),e.setStencilOperationPass(Au.FRONT,l.zPass),e.setStencilFunction(Au.BACK,o);var u=i.backOperation;e.setStencilOperationFail(Au.BACK,u.fail),e.setStencilOperationDepthFail(Au.BACK,u.zFail),e.setStencilOperationPass(Au.BACK,u.zPass),e.setStencilFunctionReference(a),e.setStencilFunctionMask(s)}},Vu.applySampleCoverage=function(e,t){};var ku=new Xs;function Wu(){}function Hu(e,t,i){i?e.enable(t):e.disable(t)}Vu.applyViewport=function(e,t,i,n,r){var o=Sa(t.viewport,i.viewport);wa(o)||((o=ku).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight);var a=Sa(n,i.context.drawingBufferWidth),s=Sa(r,i.context.drawingBufferHeight);i.context.uniformState.viewport=o;var l={x:o.x/a,y:o.y/s,width:o.width/a,height:o.height/s};e.setViewport(l,n,r)},Wu.applyFrontFace=function(e,t,i){e.frontFace(t.frontFace)},Wu.applyCull=function(e,t){var i=t.cull,n=i.enabled;Hu(e,e.CULL_FACE,n),n&&e.cullFace(i.face)},Wu.applyLineWidth=function(e,t){e.lineWidth(t.lineWidth)},Wu.applyPolygonOffset=function(e,t){var i=t.polygonOffset,n=i.enabled;Hu(e,e.POLYGON_OFFSET_FILL,n),n&&e.polygonOffset(i.factor,i.units)},Wu.applyScissorTest=function(e,t,i){var n=t.scissorTest,r=wa(i.scissorTest)?i.scissorTest.enabled:n.enabled;if(Hu(e,e.SCISSOR_TEST,r),r){var o=wa(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.scissor(o.x,o.y,o.width,o.height)}},Wu.applyDepthRange=function(e,t){var i=t.depthRange;e.depthRange(i.near,i.far)},Wu.applyDepthTest=function(e,t){var i=t.depthTest,n=i.enabled;Hu(e,e.DEPTH_TEST,n),n&&e.depthFunc(i.func)},Wu.applyColorMask=function(e,t){var i=t.colorMask;e.colorMask(i.red,i.green,i.blue,i.alpha)},Wu.applyDepthMask=function(e,t){e.depthMask(t.depthMask)},Wu.applyStencilMask=function(e,t){e.stencilMask(t.stencilMask)},Wu.applyBlendingColor=function(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)},Wu.applyBlending=function(e,t,i){var n=t.blending,r=wa(i.blendingEnabled)?i.blendingEnabled:n.enabled;Hu(e,e.BLEND,r),r&&(Wu.applyBlendingColor(e,n.color),e.blendEquationSeparate(n.equationRgb,n.equationAlpha),e.blendFuncSeparate(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha))},Wu.applyStencilTest=function(e,t){var i=t.stencilTest,n=i.enabled;if(Hu(e,e.STENCIL_TEST,n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.stencilFunc(r,a,s),e.stencilFuncSeparate(e.BACK,o,a,s),e.stencilFuncSeparate(e.FRONT,r,a,s);var l=i.frontOperation,u=l.fail,c=l.zFail,h=l.zPass;e.stencilOpSeparate(e.FRONT,u,c,h);var d=i.backOperation,f=d.fail,p=d.zFail,_=d.zPass;e.stencilOpSeparate(e.BACK,f,p,_)}},Wu.applySampleCoverage=function(e,t){var i=t.sampleCoverage,n=i.enabled;Hu(e,e.SAMPLE_COVERAGE,n),n&&e.sampleCoverage(i.value,i.invert)};var qu=new Xs;function ju(e){return e===Aa.FUNC_ADD||e===Aa.FUNC_SUBTRACT||e===Aa.FUNC_REVERSE_SUBTRACT||e===Aa.MIN||e===Aa.MAX}function Xu(e){return e===Aa.ZERO||e===Aa.ONE||e===Aa.SRC_COLOR||e===Aa.ONE_MINUS_SRC_COLOR||e===Aa.DST_COLOR||e===Aa.ONE_MINUS_DST_COLOR||e===Aa.SRC_ALPHA||e===Aa.ONE_MINUS_SRC_ALPHA||e===Aa.DST_ALPHA||e===Aa.ONE_MINUS_DST_ALPHA||e===Aa.CONSTANT_COLOR||e===Aa.ONE_MINUS_CONSTANT_COLOR||e===Aa.CONSTANT_ALPHA||e===Aa.ONE_MINUS_CONSTANT_ALPHA||e===Aa.SRC_ALPHA_SATURATE}function Yu(e){return e===Aa.FRONT||e===Aa.BACK||e===Aa.FRONT_AND_BACK}function Zu(e){return e===Aa.NEVER||e===Aa.LESS||e===Aa.EQUAL||e===Aa.LEQUAL||e===Aa.GREATER||e===Aa.NOTEQUAL||e===Aa.GEQUAL||e===Aa.ALWAYS}function Ku(e){return e===Aa.NEVER||e===Aa.LESS||e===Aa.EQUAL||e===Aa.LEQUAL||e===Aa.GREATER||e===Aa.NOTEQUAL||e===Aa.GEQUAL||e===Aa.ALWAYS}function Qu(e){return e===Aa.ZERO||e===Aa.KEEP||e===Aa.REPLACE||e===Aa.INCR||e===Aa.DECR||e===Aa.INVERT||e===Aa.INCR_WRAP||e===Aa.DECR_WRAP}function Ju(e){var t=Sa(e,{}),i=Sa(t.cull,{}),n=Sa(t.polygonOffset,{}),r=Sa(t.scissorTest,{}),o=Sa(r.rectangle,{}),a=Sa(t.depthRange,{}),s=Sa(t.depthTest,{}),l=Sa(t.colorMask,{}),u=Sa(t.blending,{}),c=Sa(u.color,{}),h=Sa(t.stencilTest,{}),d=Sa(h.frontOperation,{}),f=Sa(h.backOperation,{}),p=Sa(t.sampleCoverage,{}),_=t.viewport;if(this.frontFace=Sa(t.frontFace,Tu.COUNTER_CLOCKWISE),this.cull={enabled:Sa(i.enabled,!1),face:Sa(i.face,Aa.BACK)},this.lineWidth=Sa(t.lineWidth,1),this.polygonOffset={enabled:Sa(n.enabled,!1),factor:Sa(n.factor,0),units:Sa(n.units,0)},this.scissorTest={enabled:Sa(r.enabled,!1),rectangle:Xs.clone(o)},this.depthRange={near:Sa(a.near,0),far:Sa(a.far,1)},this.depthTest={enabled:Sa(s.enabled,!1),func:Sa(s.func,Aa.LESS)},this.colorMask={red:Sa(l.red,!0),green:Sa(l.green,!0),blue:Sa(l.blue,!0),alpha:Sa(l.alpha,!0)},this.depthMask=Sa(t.depthMask,!0),this.stencilMask=Sa(t.stencilMask,65535),this.blending={enabled:Sa(u.enabled,!1),color:new gu(Sa(c.red,0),Sa(c.green,0),Sa(c.blue,0),Sa(c.alpha,0)),equationRgb:Sa(u.equationRgb,Aa.FUNC_ADD),equationAlpha:Sa(u.equationAlpha,Aa.FUNC_ADD),functionSourceRgb:Sa(u.functionSourceRgb,Aa.ONE),functionSourceAlpha:Sa(u.functionSourceAlpha,Aa.ONE),functionDestinationRgb:Sa(u.functionDestinationRgb,Aa.ZERO),functionDestinationAlpha:Sa(u.functionDestinationAlpha,Aa.ZERO)},this.stencilTest={enabled:Sa(h.enabled,!1),frontFunction:Sa(h.frontFunction,Aa.ALWAYS),backFunction:Sa(h.backFunction,Aa.ALWAYS),reference:Sa(h.reference,0),mask:Sa(h.mask,65535),frontOperation:{fail:Sa(d.fail,Aa.KEEP),zFail:Sa(d.zFail,Aa.KEEP),zPass:Sa(d.zPass,Aa.KEEP)},backOperation:{fail:Sa(f.fail,Aa.KEEP),zFail:Sa(f.zFail,Aa.KEEP),zPass:Sa(f.zPass,Aa.KEEP)}},this.sampleCoverage={enabled:Sa(p.enabled,!1),value:Sa(p.value,1),invert:Sa(p.invert,!1)},this.viewport=wa(_)?new Xs(_.x,_.y,_.width,_.height):void 0,this.lineWidth<Cu.minimumAliasedLineWidth||this.lineWidth>Cu.maximumAliasedLineWidth)throw new Ea("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!Tu.validate(this.frontFace))throw new Ea("Invalid renderState.frontFace.");if(!Yu(this.cull.face))throw new Ea("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new Ea("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new Ea("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new Ea("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new Ea("renderState.depthRange.far must be less than or equal to one.");if(!Zu(this.depthTest.func))throw new Ea("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new Ea("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!ju(this.blending.equationRgb))throw new Ea("Invalid renderState.blending.equationRgb.");if(!ju(this.blending.equationAlpha))throw new Ea("Invalid renderState.blending.equationAlpha.");if(!Xu(this.blending.functionSourceRgb))throw new Ea("Invalid renderState.blending.functionSourceRgb.");if(!Xu(this.blending.functionSourceAlpha))throw new Ea("Invalid renderState.blending.functionSourceAlpha.");if(!Xu(this.blending.functionDestinationRgb))throw new Ea("Invalid renderState.blending.functionDestinationRgb.");if(!Xu(this.blending.functionDestinationAlpha))throw new Ea("Invalid renderState.blending.functionDestinationAlpha.");if(!Ku(this.stencilTest.frontFunction))throw new Ea("Invalid renderState.stencilTest.frontFunction.");if(!Ku(this.stencilTest.backFunction))throw new Ea("Invalid renderState.stencilTest.backFunction.");if(!Qu(this.stencilTest.frontOperation.fail))throw new Ea("Invalid renderState.stencilTest.frontOperation.fail.");if(!Qu(this.stencilTest.frontOperation.zFail))throw new Ea("Invalid renderState.stencilTest.frontOperation.zFail.");if(!Qu(this.stencilTest.frontOperation.zPass))throw new Ea("Invalid renderState.stencilTest.frontOperation.zPass.");if(!Qu(this.stencilTest.backOperation.fail))throw new Ea("Invalid renderState.stencilTest.backOperation.fail.");if(!Qu(this.stencilTest.backOperation.zFail))throw new Ea("Invalid renderState.stencilTest.backOperation.zFail.");if(!Qu(this.stencilTest.backOperation.zPass))throw new Ea("Invalid renderState.stencilTest.backOperation.zPass.");if(wa(this.viewport)){if(this.viewport.width<0)throw new Ea("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new Ea("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>Cu.maximumViewportWidth)throw new Ea("renderState.viewport.width must be less than or equal to the maximum viewport width ("+Cu.maximumViewportWidth.toString()+"). Check maximumViewportWidth.");if(this.viewport.height>Cu.maximumViewportHeight)throw new Ea("renderState.viewport.height must be less than or equal to the maximum viewport height ("+Cu.maximumViewportHeight.toString()+"). Check maximumViewportHeight.")}this.id=0,this._applyFunctions=[]}Wu.applyViewport=function(e,t,i,n,r){var o=Sa(t.viewport,i.viewport);wa(o)||((o=qu).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=o,e.viewport(o.x,o.y,o.width,o.height)};var ec=0,tc={};function ic(e,t,i){(e?Vu:Wu).applyFrontFace(t,i)}function nc(e,t,i){(e?Vu:Wu).applyCull(t,i)}function rc(e,t,i){(e?Vu:Wu).applyLineWidth(t,i)}function oc(e,t,i){(e?Vu:Wu).applyPolygonOffset(t,i)}function ac(e,t,i){(e?Vu:Wu).applyDepthRange(t,i)}function sc(e,t,i){(e?Vu:Wu).applyDepthTest(t,i)}function lc(e,t,i){(e?Vu:Wu).applyColorMask(t,i)}function uc(e,t,i){(e?Vu:Wu).applyDepthMask(t,i)}function cc(e,t,i){(e?Vu:Wu).applyStencilMask(t,i)}function hc(e,t,i){(e?Vu:Wu).applyStencilTest(t,i)}function dc(e,t,i){(e?Vu:Wu).applySampleCoverage(t,i)}function fc(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(ic),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&i.push(nc),e.lineWidth!==t.lineWidth&&i.push(rc),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&i.push(oc),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&i.push(ac),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&i.push(sc),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&i.push(lc),e.depthMask!==t.depthMask&&i.push(uc),e.stencilMask!==t.stencilMask&&i.push(cc),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&i.push(hc),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&i.push(dc),i}Ju.fromCache=function(e){var t=JSON.stringify(e),i=tc[t];if(wa(i))return++i.referenceCount,i.state;var n=new Ju(e),r=JSON.stringify(n);return wa(i=tc[r])||(n.id=ec++,i={referenceCount:0,state:n=Su(n)},tc[r]=i),++i.referenceCount,tc[t]={referenceCount:1,state:i.state},i.state},Ju.removeFromCache=function(e){var t=new Ju(e),i=JSON.stringify(t),n=tc[i],r=JSON.stringify(e),o=tc[r];wa(o)&&(--o.referenceCount,0===o.referenceCount&&(delete tc[r],wa(n)&&--n.referenceCount)),wa(n)&&0===n.referenceCount&&delete tc[i]},Ju.getCache=function(){return tc},Ju.clearCache=function(){tc={}},Ju.apply=function(e,t,i){const n=wa(e.name)?Vu:Wu;n.applyFrontFace(e,t),n.applyCull(e,t),n.applyLineWidth(e,t),n.applyPolygonOffset(e,t),n.applyDepthRange(e,t),n.applyDepthTest(e,t),n.applyColorMask(e,t),n.applyDepthMask(e,t),n.applyStencilMask(e,t),n.applyStencilTest(e,t),n.applySampleCoverage(e,t),n.applyScissorTest(e,t,i),n.applyBlending(e,t,i),n.applyViewport(e,t,i)},Ju.partialApply=function(e,t,i,n,r,o,a,s,l,u,c){const h=wa(e.name),d=h?Vu:Wu;if(t!==i){var f=i._applyFunctions[t.id];wa(f)||(f=fc(t,i),i._applyFunctions[t.id]=f);for(var p=f.length,_=0;_<p;++_)f[_](h,e,i)}((wa(n.scissorTest)?n.scissorTest:t.scissorTest)!==(wa(r.scissorTest)?r.scissorTest:i.scissorTest)||s)&&d.applyScissorTest(e,i,r);var m=wa(n.blendingEnabled)?n.blendingEnabled:t.blending.enabled,g=wa(r.blendingEnabled)?r.blendingEnabled:i.blending.enabled;(m!==g||g&&t.blending!==i.blending)&&d.applyBlending(e,i,r),(t!==i||n!==r||n.context!==r.context||o!==a)&&d.applyViewport(e,i,r,l,u)},Ju.getState=function(e){if(!wa(e))throw new Ea("renderState is required.");return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:Xs.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:gu.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:wa(e.viewport)?Xs.clone(e.viewport):void 0}};var pc,_c={ADD:Aa.FUNC_ADD,SUBTRACT:Aa.FUNC_SUBTRACT,REVERSE_SUBTRACT:Aa.FUNC_REVERSE_SUBTRACT,MIN:Aa.MIN,MAX:Aa.MAX},mc=Object.freeze(_c),gc={ZERO:Aa.ZERO,ONE:Aa.ONE,SOURCE_COLOR:Aa.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:Aa.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:Aa.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:Aa.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:Aa.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:Aa.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:Aa.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:Aa.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:Aa.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:Aa.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:Aa.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:Aa.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:Aa.SRC_ALPHA_SATURATE},xc=Object.freeze(gc),yc={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:mc.ADD,equationAlpha:mc.ADD,functionSourceRgb:xc.SOURCE_ALPHA,functionSourceAlpha:xc.ONE,functionDestinationRgb:xc.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:xc.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:mc.ADD,equationAlpha:mc.ADD,functionSourceRgb:xc.ONE,functionSourceAlpha:xc.ONE,functionDestinationRgb:xc.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:xc.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:mc.ADD,equationAlpha:mc.ADD,functionSourceRgb:xc.SOURCE_ALPHA,functionSourceAlpha:xc.ONE,functionDestinationRgb:xc.ONE,functionDestinationAlpha:xc.ONE})},vc=Object.freeze(yc),$c=(pc=!0,function(e,t){var i=pc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return pc=!1,i}),bc=$c(void 0,(function(){return bc.toString().search("(((.+)+)+)+$").toString().constructor(bc).search("(((.+)+)+)+$")}));function Tc(){}bc(),Tc.toVertexBuffer=function(e,t,i,n){var r=us.createVertexBuffer({context:e,typedArray:t.arrayBuffer,usage:n?Ua.DYNAMIC_DRAW:Ua.STATIC_DRAW});return r.vertexArrayDestroyable=!1,r.bytesPerElement=t.bytesPerElement,r.length=t.length,r.attributes=i,r.itemSize=t.bytesPerElement,r.dynamicDraw=n,!n&&delete t.arrayBuffer,r},Tc.toIndexBuffer=function(e,t,i){if(0!==t.length){var n=us.createIndexBuffer({context:e,typedArray:t.arrayBuffer,usage:Ua.STATIC_DRAW,indexDatatype:za.UNSIGNED_SHORT});return n.vertexArrayDestroyable=!1,n.dynamicDraw=i,!n.dynamicDraw&&delete t.arrayBuffer,n}},Tc.toRenderState=function(e,t,i){var n=vc.DISABLED;e.blendFunction[0]==Aa.ONE&&e.blendFunction[1]==Aa.ONE_MINUS_SRC_ALPHA&&(n=vc.ALPHA_BLEND);var r={frontFace:i.frontFace,cull:{enabled:i.enable,face:i.mode},depthRange:{near:t.range[0],far:t.range[1]},depthTest:{enabled:t.func!==Aa.ALWAYS,func:t.func},depthMask:t.mask,colorMask:{red:e.mask[0],green:e.mask[1],blue:e.mask[2],alpha:e.mask[3]},blending:n};return Ju.fromCache(r)},Tc.toComponentDatatype=function(e){switch(e){case"Int8":return Ma.BYTE;case"Uint8":return Ma.UNSIGNED_BYTE;case"Int16":return Ma.SHORT;case"Uint16":return Ma.UNSIGNED_SHORT;case"Int32":return Ma.INT;case"Uint32":return Ma.UNSIGNED_INT;default:return Ma.FLOAT}},Tc.mbxAttributeToCesiumVertexArrtribute=function(e,t,i,n){var r=this.toComponentDatatype(e.type);Ma.getSizeInBytes(r);var o=t.bytesPerElement,a=e.offset+o*(n||0);return{name:e.name,index:i,vertexBuffer:t,componentsPerAttribute:e.components,componentDatatype:r,offsetInBytes:a,strideInBytes:o,normalize:!1}};var Cc,Sc=(Cc=!0,function(e,t){var i=Cc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Cc=!1,i}),wc=Sc(void 0,(function(){return wc.toString().search("(((.+)+)+)+$").toString().constructor(wc).search("(((.+)+)+)+$")}));wc();var Ec=function(){this.ids=[],this.positions=[],this.indexed=!1};function Pc(e,t,i,n){if(!(i>=n)){for(var r=e[i+n>>1],o=i-1,a=n+1;;){do{o++}while(e[o]<r);do{a--}while(e[a]>r);if(o>=a)break;Ac(e,o,a),Ac(t,3*o,3*a),Ac(t,3*o+1,3*a+1),Ac(t,3*o+2,3*a+2)}Pc(e,t,i,a),Pc(e,t,a+1,n)}}function Ac(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Lc(e,t,i,n){this.x=Sa(e,0),this.y=Sa(t,0),this.z=Sa(i,0),this.w=Sa(n,0)}Ec.prototype.add=function(e,t,i,n){this.ids.push(e),this.positions.push(t,i,n)},Ec.prototype.getPositions=function(e){for(var t=0,i=this.ids.length-1;t<i;){var n=t+i>>1;this.ids[n]>=e?i=n:t=n+1}for(var r=[];this.ids[t]===e;){var o=this.positions[3*t],a=this.positions[3*t+1],s=this.positions[3*t+2];r.push({index:o,start:a,end:s}),t++}return r},Ec.serialize=function(e,t){var i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Pc(i,n,0,i.length-1),t&&t.push(i.buffer,n.buffer),{ids:i,positions:n}},Ec.deserialize=function(e){var t=new Ec;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},en.register("FeaturePositionMap",Ec),Lc.fromElements=function(e,t,i,n,r){return wa(r)?(r.x=e,r.y=t,r.z=i,r.w=n,r):new Lc(e,t,i,n)},Lc.fromColor=function(e,t){return Oa.typeOf.object("color",e),wa(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new Lc(e.red,e.green,e.blue,e.alpha)},Lc.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Lc(e.x,e.y,e.z,e.w)},Lc.packedLength=4,Lc.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},Lc.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new Lc),i.x=e[t++],i.y=e[t++],i.z=e[t++],i.w=e[t],i},Lc.packArray=function(e,t){Oa.defined("array",e);var i=e.length,n=4*i;if(wa(t)){if(!Array.isArray(t)&&t.length!==n)throw new Ea("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)Lc.pack(e[r],t,4*r);return t},Lc.unpackArray=function(e,t){if(Oa.defined("array",e),Oa.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!=0)throw new Ea("array length must be a multiple of 4.");var i=e.length;wa(t)?t.length=i/4:t=new Array(i/4);for(var n=0;n<i;n+=4){var r=n/4;t[r]=Lc.unpack(e,n,t[r])}return t},Lc.fromArray=Lc.unpack,Lc.maximumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)},Lc.minimumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)},Lc.minimumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i.w=Math.min(e.w,t.w),i},Lc.maximumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i.w=Math.max(e.w,t.w),i},Lc.magnitudeSquared=function(e){return Oa.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},Lc.magnitude=function(e){return Math.sqrt(Lc.magnitudeSquared(e))};var Mc=new Lc;Lc.distance=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Lc.subtract(e,t,Mc),Lc.magnitude(Mc)},Lc.distanceSquared=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Lc.subtract(e,t,Mc),Lc.magnitudeSquared(Mc)},Lc.normalize=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=Lc.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t.w=e.w/i,isNaN(t.x)||isNaN(t.y)||isNaN(t.z)||isNaN(t.w))throw new Ea("normalized result is not a number");return t},Lc.dot=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},Lc.multiplyComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i.w=e.w*t.w,i},Lc.divideComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i.w=e.w/t.w,i},Lc.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},Lc.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},Lc.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},Lc.divideByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},Lc.negate=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},Lc.abs=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var Rc=new Lc;Lc.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),Lc.multiplyByScalar(t,i,Rc),n=Lc.multiplyByScalar(e,1-i,n),Lc.add(Rc,n,n)};var Oc=new Lc;Lc.mostOrthogonalAxis=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=Lc.normalize(e,Oc);return Lc.abs(i,i),t=i.x<=i.y?i.x<=i.z?i.x<=i.w?Lc.clone(Lc.UNIT_X,t):Lc.clone(Lc.UNIT_W,t):i.z<=i.w?Lc.clone(Lc.UNIT_Z,t):Lc.clone(Lc.UNIT_W,t):i.y<=i.z?i.y<=i.w?Lc.clone(Lc.UNIT_Y,t):Lc.clone(Lc.UNIT_W,t):i.z<=i.w?Lc.clone(Lc.UNIT_Z,t):Lc.clone(Lc.UNIT_W,t)},Lc.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},Lc.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]&&e.w===t[i+3]},Lc.equalsEpsilon=function(e,t,i,n){return e===t||wa(e)&&wa(t)&&Fa.equalsEpsilon(e.x,t.x,i,n)&&Fa.equalsEpsilon(e.y,t.y,i,n)&&Fa.equalsEpsilon(e.z,t.z,i,n)&&Fa.equalsEpsilon(e.w,t.w,i,n)},Lc.ZERO=Object.freeze(new Lc(0,0,0,0)),Lc.UNIT_X=Object.freeze(new Lc(1,0,0,0)),Lc.UNIT_Y=Object.freeze(new Lc(0,1,0,0)),Lc.UNIT_Z=Object.freeze(new Lc(0,0,1,0)),Lc.UNIT_W=Object.freeze(new Lc(0,0,0,1)),Lc.prototype.clone=function(e){return Lc.clone(this,e)},Lc.prototype.equals=function(e){return Lc.equals(this,e)},Lc.prototype.equalsEpsilon=function(e,t,i){return Lc.equalsEpsilon(this,e,t,i)},Lc.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var Dc=new Float32Array(1),Ic=256,Fc=65536,Bc=16777216,Nc=1/Ic,Gc=1/Fc,zc=1/Bc,Uc=38;Lc.packFloat=function(e,t){if(Oa.typeOf.number("value",e),wa(t)||(t=new Lc),Dc[0]=e,0===(e=Dc[0]))return Lc.clone(Lc.ZERO,t);var i,n=e<0?1:0;isFinite(e)?(e=Math.abs(e),i=Math.floor(Fa.logBase(e,10))+1,e/=Math.pow(10,i)):(e=.1,i=Uc);var r=e*Ic;return t.x=Math.floor(r),r=(r-t.x)*Ic,t.y=Math.floor(r),r=(r-t.y)*Ic,t.z=Math.floor(r),t.w=2*(i+Uc)+n,t},Lc.unpackFloat=function(e){Oa.typeOf.object("packedFloat",e);var t=e.w/2,i=Math.floor(t),n=2*(t-i);if(n=-(n=2*n-1),(i-=Uc)>=Uc)return n<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var r=n*e.x*Nc;return r+=n*e.y*Gc,(r+=n*e.z*zc)*Math.pow(10,i)},Lc.prototype.toArray=function(e,t){Lc.pack(this,e,t)};var Vc,kc=(Vc=!0,function(e,t){var i=Vc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Vc=!1,i}),Wc=kc(void 0,(function(){return Wc.toString().search("(((.+)+)+)+$").toString().constructor(Wc).search("(((.+)+)+)+$")}));function Hc(e,t,i){return Math.min(i,Math.max(t,e))}function qc(e,t){return 256*(e=Hc(Math.floor(e),0,255))+(t=Hc(Math.floor(t),0,255))}function jc(e){return[qc(255*e.r,255*e.g),qc(255*e.b,255*e.a)]}Wc();var Xc=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0};Xc.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},Xc.prototype.setConstantPatternPositions=function(){},Xc.prototype.populatePaintArray=function(){},Xc.prototype.updatePaintArray=function(){},Xc.prototype.upload=function(){},Xc.prototype.destroy=function(){},Xc.prototype.setUniforms=function(e,t,i,n){t.set(n.constantOr(this.value))},Xc.prototype.getBinding=function(e,t){return"color"===this.type?new ba.UniformColor(e,t):new ba.Uniform1f(e,t)},Xc.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){var e=n.get(i).constantOr(r.value);return"color"===r.type&&(e.red=e.r,e.green=e.g,e.blue=e.b,e.alpha=e.a),e}},Xc.serialize=function(e){var t=e.value,i=e.names,n=e.type;return{value:en.serialize(t),names:i,type:n}},Xc.deserialize=function(e){var t=e.value,i=e.names,n=e.type;return new Xc(en.deserialize(t),i,n)};var Yc=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};Yc.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},Yc.prototype.populatePaintArray=function(){},Yc.prototype.updatePaintArray=function(){},Yc.prototype.upload=function(){},Yc.prototype.destroy=function(){},Yc.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},Yc.prototype.setUniforms=function(e,t,i,n,r){var o=this.patternPositions;"u_pattern_to"===r&&o.patternTo&&t.set(Lc(o.patternTo[0],o.patternTo[1],o.patternTo[2],o.patternTo[3])),"u_pattern_from"===r&&o.patternFrom&&t.set(Lc(o.patternFrom[0],o.patternFrom[1],o.patternFrom[2],o.patternFrom[3]))},Yc.prototype.getBinding=function(e,t){return new ba.Uniform4f(e,t)},Yc.prototype.setUniformMap=function(e,t,i,n){var r=this.patternPositions;e[t]=function(){return"u_pattern_to"===t&&r.patternTo?new Lc(r.patternTo[0],r.patternTo[1],r.patternTo[2],r.patternTo[3]):"u_pattern_from"===t&&r.patternFrom?new Lc(r.patternFrom[0],r.patternFrom[1],r.patternFrom[2],r.patternFrom[3]):void console.log("CrossFadedConstantBinder is not support")}};var Zc=function(e,t,i,n){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?2:1,offset:0}})),this.paintVertexArray=new n};Zc.prototype.defines=function(){return[]},Zc.prototype.setConstantPatternPositions=function(){},Zc.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new go(0),t,{},[],n);if("color"===this.type)for(var s=jc(a),l=o;l<e;l++)r.emplaceBack(s[0],s[1]);else{for(var u=o;u<e;u++)r.emplaceBack(a);this.maxValue=Math.max(this.maxValue,a)}},Zc.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:0},i,n);if("color"===this.type)for(var a=jc(o),s=e;s<t;s++)r.emplace(s,a[0],a[1]);else{for(var l=e;l<t;l++)r.emplace(l,o);this.maxValue=Math.max(this.maxValue,o)}},Zc.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=Tc.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},Zc.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Zc.prototype.setUniforms=function(e,t){t.set(0)},Zc.prototype.getBinding=function(e,t){return new ba.Uniform1f(e,t)},Zc.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};var Kc=function(e,t,i,n,r,o){this.expression=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.type=i,this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?4:2,offset:0}})),this.paintVertexArray=new a};Kc.prototype.defines=function(){return[]},Kc.prototype.setConstantPatternPositions=function(){},Kc.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new go(this.zoom),t,{},[],n),s=this.expression.evaluate(new go(this.zoom+1),t,{},[],n);if("color"===this.type)for(var l=jc(a),u=jc(s),c=o;c<e;c++)r.emplaceBack(l[0],l[1],u[0],u[1]);else{for(var h=o;h<e;h++)r.emplaceBack(a,s);this.maxValue=Math.max(this.maxValue,a,s)}},Kc.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},i,n),a=this.expression.evaluate({zoom:this.zoom+1},i,n);if("color"===this.type)for(var s=jc(o),l=jc(a),u=e;u<t;u++)r.emplace(u,s[0],s[1],l[0],l[1]);else{for(var c=e;c<t;c++)r.emplace(c,o,a);this.maxValue=Math.max(this.maxValue,o,a)}},Kc.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=Tc.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},Kc.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Kc.prototype.interpolationFactor=function(e){return this.useIntegerZoom&&(e=Math.floor(e)),Hc(this.expression.interpolationFactor(e,this.zoom,this.zoom+1),0,1)},Kc.prototype.setUniforms=function(e,t,i){t.set(this.interpolationFactor(i.zoom))},Kc.prototype.getBinding=function(e,t){return new ba.Uniform1f(e,t)},Kc.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){return r.interpolationFactor(0)}};var Qc=function(e,t,i,n,r,o,a){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0,this.layerId=a,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:4,offset:0}})),this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o};Qc.prototype.defines=function(){return[]},Qc.prototype.setConstantPatternPositions=function(){},Qc.prototype.populatePaintArray=function(e,t,i){var n=this.zoomInPaintVertexArray,r=this.zoomOutPaintVertexArray,o=this.layerId,a=n.length;if(n.reserve(e),r.reserve(e),i&&t.patterns&&t.patterns[o]){var s=t.patterns[o],l=s.min,u=s.mid,c=s.max,h=i[l],d=i[u],f=i[c];if(!h||!d||!f)return;for(var p=a;p<e;p++)n.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1]),r.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},Qc.prototype.updatePaintArray=function(e,t,i,n,r){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(r&&i.patterns&&i.patterns[s]){var l=i.patterns[s],u=l.min,c=l.mid,h=l.max,d=r[u],f=r[c],p=r[h];if(!d||!f||!p)return;for(var _=e;_<t;_++)o.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],d.tl[0],d.tl[1],d.br[0],d.br[1]),a.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],p.tl[0],p.tl[1],p.br[0],p.br[1])}},Qc.prototype.upload=function(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=Tc.toVertexBuffer(e,this.zoomInPaintVertexArray,this.paintVertexAttributes),this.zoomOutPaintVertexBuffer=Tc.toVertexBuffer(e,this.zoomOutPaintVertexArray,this.paintVertexAttributes))},Qc.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},Qc.prototype.setUniforms=function(e,t){t.set(0)},Qc.prototype.getBinding=function(e,t){return new Uniform1f(e,t)},Qc.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};class Jc{constructor(){this.binders={},this.cacheKey="",this._buffers=[]}static createDynamic(e,t,i){const n=new Jc,r=[];for(const o in e.paint._values){if(!i(o))continue;const a=e.paint.get(o);if(!(a instanceof $a&&er(a.property.specification)))continue;const s=th(o,e.type),l=a.property.specification.type,u=a.property.useIntegerZoom;if("cross-faded"===a.property.specification["property-type"]||"cross-faded-data-driven"===a.property.specification["property-type"])if("constant"===a.value.kind)n.binders[o]=new Yc(a.value.value,s,l),r.push("/u_"+o);else{const i=nh(o,l,"source");n.binders[o]=new Qc(a.value,s,l,u,t,i,e.id),r.push("/a_"+o)}else if("constant"===a.value.kind)n.binders[o]=new Xc(a.value.value,s,l),r.push("/u_"+o);else if("source"===a.value.kind){const e=nh(o,l,"source");n.binders[o]=new Zc(a.value,s,l,e),r.push("/a_"+o)}else{const e=nh(o,l,"composite");n.binders[o]=new Kc(a.value,s,l,u,t,e),r.push("/z_"+o)}}return n.cacheKey=r.sort().join(""),n}populatePaintArrays(e,t,i,n,r){for(const i in this.binders)this.binders[i].populatePaintArray(e,t,n,r)}setConstantPatternPositions(e,t){for(const i in this.binders)this.binders[i].setConstantPatternPositions(e,t)}updatePaintArrays(e,t,i,n,r){let o=!1;for(const a in e){const s=t.getPositions(+a);for(const t of s){const s=i.feature(t.index);for(const i in this.binders){const l=this.binders[i];if(!(l instanceof Xc||l instanceof Yc)&&!0===l.expression.isStateDependent){const u=n.paint.get(i);l.expression=u.value,l.updatePaintArray(t.start,t.end,s,e[a],r),o=!0}}}}return o}defines(){var e=[];for(var t in this.binders)e.push.apply(e,this.binders[t].defines());return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){const i=[];for(const n in this.binders){const r=this.binders[n];for(const o of r.uniformNames)if(t[o]){const a=r.getBinding(e,t[o]);i.push({name:o,property:n,binding:a})}}return i}setUniforms(e,t,i,n){for(const{name:r,property:o,binding:a}of t)this.binders[o].setUniforms(e,a,n,i.get(o),r)}updatePatternPaintBuffers(e){const t=[];for(const i in this.binders){const n=this.binders[i];if(n instanceof Qc){const i=2===e.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;i&&t.push(i)}else(n instanceof Zc||n instanceof Kc)&&n.paintVertexBuffer&&t.push(n.paintVertexBuffer)}this._buffers=t}upload(e){for(const t in this.binders)this.binders[t].upload(e);const t=[];for(const e in this.binders){const i=this.binders[e];(i instanceof Zc||i instanceof Kc)&&i.paintVertexBuffer&&t.push(i.paintVertexBuffer)}this._buffers=t}getAttributeLocation(){for(var e=0,t={},i=0;i<this.layoutAttributes.length;i++)t[this.layoutAttributes[i].name]=i,e++;for(var n=this.getPaintVertexBuffers(),r=0;n&&r<n.length;r++)for(var o=n[r],a=0;a<o.attributes.length;a++)t[o.attributes[a].name]=e++;return t}getUniformMaps(e,t,i){for(var n in this.binders)for(var r=this.binders[n],o=0,a=r.uniformNames;o<a.length;o+=1){var s=a[o];e[s]&&r.setUniformMap(i,s,n,t)}for(var l in e)!i[l]&&l.indexOf("_t")>-1&&(i[l]=function(){return 0});return i}destroy(){for(const e in this.binders)this.binders[e].destroy()}}class eh{constructor(e,t,i,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=Jc.createDynamic(r,i,n),this.programConfigurations[r.id].layoutAttributes=e;this.needsUpload=!1,this._featureMap=new Ec,this._bufferOffset=0}populatePaintArrays(e,t,i,n,r){for(const o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(e,t,i,n,r);void 0!==t.id&&this._featureMap.add(+t.id,i,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,i,n){for(const r of i)this.needsUpload=this.programConfigurations[r.id].updatePaintArrays(e,this._featureMap,t,r,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function th(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"text-show-background":["show-background"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function ih(e){return{"line-pattern":{source:ra,composite:ra},"fill-pattern":{source:ra,composite:ra},"fill-extrusion-pattern":{source:ra,composite:ra}}[e]}function nh(e,t,i){var n={color:{source:ta,composite:ia},number:{source:Yo,composite:ta}},r=ih(e);return r&&r[i]||n[t][i]}en.register("ConstantBinder",Xc),en.register("CrossFadedConstantBinder",Yc),en.register("SourceExpressionBinder",Zc),en.register("CrossFadedCompositeBinder",Qc),en.register("CompositeExpressionBinder",Kc),en.register("ProgramConfiguration",Jc,{omit:["_buffers"]}),en.register("ProgramConfigurationSet",eh);var rh,oh=(rh=!0,function(e,t){var i=rh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return rh=!1,i}),ah=oh(void 0,(function(){return ah.toString().search("(((.+)+)+)+$").toString().constructor(ah).search("(((.+)+)+)+$")}));ah();var sh=ao([{name:"a_pos",components:2,type:"Int16"}],4),lh=sh.members,uh=ao([{name:"a_pos",components:2,type:"Float32"}],4),ch=uh.members;function hh(e,t,i,n,r){e.emplaceBack(2*t+(n+1)/2,2*i+(r+1)/2)}var dh=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this._sourceLayerIds={};var t=this;this.layerIds=this.layers.map((function(e,i){return t._sourceLayerIds[e.sourceLayer]=i,e.sourceLayer})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Fo,this.indexArray=new Qo,this.segments=new Ao,this.programConfigurations=new eh(lh,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};dh.prototype.populate=function(e,t){var i=this.layers[0],n=[],r=null;"circle"===i.type&&(r=i.layout.get("circle-sort-key"));for(var o=0,a=e;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.index,c=s.sourceLayerIndex,h=s.sourceLayerId,d=this._sourceLayerIds[h],f=this.layers[d];if(f){var p=$o/512,_=f.paint.get("circle-radius").value.value*p;if(this.layers[0]._featureFilter(new go(0),l)){var m=So(l),g=r?r.evaluate(l,{}):void 0,x={id:l.id,properties:l.properties,type:l.type,sourceLayerIndex:c,index:u,geometry:m,patterns:{},sortKey:g,circleRadius:_};n.push(x)}}}r&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var y=0,v=n;y<v.length;y+=1){var $=v[y],b=$,T=b.geometry,C=b.index,S=b.sourceLayerIndex,w=e[C].feature;this.addFeature($,T,C),t.featureIndex.insert(w,T,C,S,this.index,void 0,b.circleRadius)}},dh.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},dh.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},dh.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},dh.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=e.webgpu?ch:lh;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Tc.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},dh.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},dh.prototype.clear=function(){wa(this.layoutVertexArray)&&(this.layoutVertexArray=null),wa(this.indexArray)&&(this.indexArray=null)},dh.prototype.addFeature=function(e,t,i){for(var n=0,r=t;n<r.length;n+=1)for(var o=0,a=r[n];o<a.length;o+=1){var s=a[o],l=s.x,u=s.y;if(!(l<0||l>=$o||u<0||u>=$o)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),h=c.vertexLength;hh(this.layoutVertexArray,l,u,-1,-1),hh(this.layoutVertexArray,l,u,1,-1),hh(this.layoutVertexArray,l,u,1,1),hh(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,{})},en.register("CircleBucket",dh,{omit:["layers"]});var fh,ph=(fh=!0,function(e,t){var i=fh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return fh=!1,i}),_h=ph(void 0,(function(){return _h.toString().search("(((.+)+)+)+$").toString().constructor(_h).search("(((.+)+)+)+$")}));_h();var mh=function(e){this.specification=e};mh.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},mh.prototype.interpolate=function(e,t,i){var n=interpolate[this.specification.type];return n?n(e,t,i):e},en.register("DataConstantProperty",mh);var gh,xh=(gh=!0,function(e,t){var i=gh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return gh=!1,i}),yh=xh(void 0,(function(){return yh.toString().search("(((.+)+)+)+$").toString().constructor(yh).search("(((.+)+)+)+$")}));yh();var vh=function(e,t){this.specification=e,this.overrides=t};vh.prototype.possiblyEvaluate=function(e,t,i){return"constant"===e.expression.kind||"camera"===e.expression.kind?new $a(this,{kind:"constant",value:e.expression.evaluate(t,null,{},i)},t):new $a(this,e.expression,t)},vh.prototype.interpolate=function(e,t,i){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new $a(this,{kind:"constant",value:void 0},e.parameters);var n=interpolate[this.specification.type];return n?new $a(this,{kind:"constant",value:n(e.value.value,t.value.value,i)},e.parameters):e},vh.prototype.evaluate=function(e,t,i,n,r){return"constant"===e.kind?e.value:e.evaluate(t,i,n,r)},en.register("DataDrivenProperty",vh);var $h,bh=($h=!0,function(e,t){var i=$h?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return $h=!1,i}),Th=bh(void 0,(function(){return Th.toString().search("(((.+)+)+)+$").toString().constructor(Th).search("(((.+)+)+)+$")}));Th();var Ch=function(e,t){this.property=e,this.value=t,this.expression=ar.normalizePropertyExpression(void 0===t?e.specification.default:t,e.specification)};Ch.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Ch.prototype.possiblyEvaluate=function(e,t){return this.property.possiblyEvaluate(this,e,t)};var Sh,wh=(Sh=!0,function(e,t){var i=Sh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Sh=!1,i}),Eh=wh(void 0,(function(){return Eh.toString().search("(((.+)+)+)+$").toString().constructor(Eh).search("(((.+)+)+)+$")}));function Ph(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,i=t*e;return 4*(e<.5?i:3*(e-t)+i-.75)}Eh();var Ah=function(e,t,i,n,r){this.property=e,this.value=t,this.begin=r+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=i)};Ah.prototype.possiblyEvaluate=function(e,t){var i=e.now||0,n=this.value.possiblyEvaluate(e,t),r=this.prior;if(r){if(i>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(i<this.begin)return r.possiblyEvaluate(e,t);var o=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(r.possiblyEvaluate(e,t),n,Ph(o))}return n};const Lh=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Mh=Lh(void 0,(function(){return Mh.toString().search("(((.+)+)+)+$").toString().constructor(Mh).search("(((.+)+)+)+$")}));function Rh(e,t,i,n){const r=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),o=r(this,(function(){return o.toString().search("(((.+)+)+)+$").toString().constructor(o).search("(((.+)+)+)+$")}));o()}function Oh(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}function Dh(e,t){return-1!==e.indexOf(t,e.length-t.length)}function Ih(e,t,i){const n={};for(const r in e)n[r]=t.call(i||this,e[r],r,e);return n}function Fh(e,t,i){const n={};for(const r in e)t.call(i||this,e[r],r,e)&&(n[r]=e[r]);return n}function Bh(e){return Array.isArray(e)?e.map(Bh):"object"==typeof e&&e?Ih(e,Bh):e}function Nh(e,t){for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>=0)return!0;return!1}Mh(),Rh();const Gh={};function zh(e){Gh[e]||("undefined"!=typeof console&&console.warn(e),Gh[e]=!0)}function Uh(e,t,i){return(i.y-e.y)*(t.x-e.x)>(t.y-e.y)*(i.x-e.x)}function Vh(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function kh(e){const t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,i,n,r)=>{const o=n||r;return t[i]=!o||o.toLowerCase(),""})),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}var Wh,Hh=(Wh=!0,function(e,t){var i=Wh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Wh=!1,i}),qh=Hh(void 0,(function(){return qh.toString().search("(((.+)+)+)+$").toString().constructor(qh).search("(((.+)+)+)+$")}));qh();var jh=function(e){this.property=e,this.value=new Ch(e,void 0)};jh.prototype.transitioned=function(e,t){return new Ah(this.property,this.value,t,Oh({},e.transition,this.transition),e.now)},jh.prototype.untransitioned=function(){return new Ah(this.property,this.value,null,{},0)};var Xh,Yh=(Xh=!0,function(e,t){var i=Xh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Xh=!1,i}),Zh=Yh(void 0,(function(){return Zh.toString().search("(((.+)+)+)+$").toString().constructor(Zh).search("(((.+)+)+)+$")}));Zh();var Kh,Qh=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var i=e[t];i.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new Ch(i,void 0),r=this.defaultTransitionablePropertyValues[t]=new jh(i);this.defaultTransitioningPropertyValues[t]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}},Jh=(Kh=!0,function(e,t){var i=Kh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Kh=!1,i}),ed=Jh(void 0,(function(){return ed.toString().search("(((.+)+)+)+$").toString().constructor(ed).search("(((.+)+)+)+$")}));function td(){}ed(),td.getMaximumPaintValue=function(e,t,i){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:i.programConfigurations.get(t.id).binders[e].maxValue},td.translateDistance=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},td.translate=function(e,t,i,n,r){if(!t||!t[0]&&!t[1])return e;var o=to.convert(t)._mult(r);"viewport"===i&&o._rotate(-n);for(var a=[],s=0;s<e.length;s++){var l=e[s];a.push(l.sub(o))}return a};var id,nd=(id=!0,function(e,t){var i=id?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return id=!1,i}),rd=nd(void 0,(function(){return rd.toString().search("(((.+)+)+)+$").toString().constructor(rd).search("(((.+)+)+)+$")}));rd();var od=function(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)};od.prototype.get=function(e){return this._values[e]};var ad,sd=(ad=!0,function(e,t){var i=ad?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ad=!1,i}),ld=sd(void 0,(function(){return ld.toString().search("(((.+)+)+)+$").toString().constructor(ld).search("(((.+)+)+)+$")}));ld();var ud=function(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)};ud.prototype.getValue=function(e){return Bh(this._values[e].value)},ud.prototype.setValue=function(e,t){this._values[e]=new Ch(this._values[e].property,null===t?void 0:Bh(t))},ud.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r)}return e},ud.prototype.possiblyEvaluate=function(e,t){for(var i=new od(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i};var cd,hd=(cd=!0,function(e,t){var i=cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return cd=!1,i}),dd=hd(void 0,(function(){return dd.toString().search("(((.+)+)+)+$").toString().constructor(dd).search("(((.+)+)+)+$")}));dd();var fd=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};fd.prototype.possiblyEvaluate=function(e,t){for(var i=new od(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i},fd.prototype.hasTransition=function(){for(var e=0,t=Object.keys(this._values);e<t.length;e+=1){var i=t[e];if(this._values[i].prior)return!0}return!1};var pd,_d=(pd=!0,function(e,t){var i=pd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return pd=!1,i}),md=_d(void 0,(function(){return md.toString().search("(((.+)+)+)+$").toString().constructor(md).search("(((.+)+)+)+$")}));md();var gd=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};gd.prototype.getValue=function(e){return Bh(this._values[e].value.value)},gd.prototype.setValue=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new jh(this._values[e].property)),this._values[e].value=new Ch(this._values[e].property,null===t?void 0:Bh(t))},gd.prototype.getTransition=function(e){return Bh(this._values[e].transition)},gd.prototype.setTransition=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new jh(this._values[e].property)),this._values[e].transition=Bh(t)||void 0},gd.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r);var o=this.getTransition(n);void 0!==o&&(e[n+"-transition"]=o)}return e},gd.prototype.transitioned=function(e,t){for(var i=new fd(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].transitioned(e,t._values[o])}return i},gd.prototype.untransitioned=function(){for(var e=new fd(this._properties),t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t];e._values[n]=this._values[n].untransitioned()}return e};var xd,yd=(xd=!0,function(e,t){var i=xd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return xd=!1,i}),vd=yd(void 0,(function(){return vd.toString().search("(((.+)+)+)+$").toString().constructor(vd).search("(((.+)+)+)+$")}));vd();var $d="-transition";function bd(e,t){if(this.id=e.id,this.type=e.type,"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new ud(t.layout)),t.paint)){for(var i in this._transitionablePaint=new gd(t.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var n in e.layout)this.setLayoutProperty(n,e.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}bd.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},bd.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},bd.prototype.setLayoutProperty=function(e,t,i){if(null!=t&&this.id,"visibility"===e)return this.visibility=t,void(this.config&&this.config.layout&&(this.config.layout.visibility=t));this._unevaluatedLayout.setValue(e,t)},bd.prototype.getPaintProperty=function(e){return Dh(e,$d)?this._transitionablePaint.getTransition(e.slice(0,-$d.length)):this._transitionablePaint.getValue(e)},bd.prototype.setPaintProperty=function(e,t,i){if(null!=t&&this.id,Dh(e,$d))return this._transitionablePaint.setTransition(e.slice(0,-$d.length),t||void 0),!1;var n=this._transitionablePaint._values[e],r="cross-faded-data-driven"===n.property.specification["property-type"],o=n.value.isDataDriven(),a=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var s=this._transitionablePaint._values[e].value;return s.isDataDriven()||o||r||this._handleOverridablePaintPropertyUpdate(e,a,s)},bd.prototype._handleSpecialPaintPropertyUpdate=function(e){},bd.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!1},bd.prototype.isHidden=function(e){return!!(this.minzoom&&e<this.minzoom)||!!(this.maxzoom&&e>=this.maxzoom)||"none"===this.visibility},bd.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},bd.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},bd.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,t)},bd.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),Fh(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},bd.prototype._validate=function(e,t,i,n,r){return!0},bd.prototype.is3D=function(){return!1},bd.prototype.isTileClipped=function(){return!1},bd.prototype.hasOffscreenPass=function(){return!1},bd.prototype.resize=function(){},bd.prototype.isStateDependent=function(){return!0};var Td,Cd=(Td=!0,function(e,t){var i=Td?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Td=!1,i}),Sd=Cd(void 0,(function(){return Sd.toString().search("(((.+)+)+)+$").toString().constructor(Sd).search("(((.+)+)+)+$")}));Sd();var wd,Ed=8,Pd={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},Ad={"*":{type:"source"}},Ld=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Md={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},Rd={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},Od={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},Dd={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},Id={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Fd={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Bd={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Nd=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Gd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},zd={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ud={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Vd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},kd={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Wd={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Hd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},qd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},jd={type:"array",value:"*"},Xd={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},Yd={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Zd={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Kd={type:"array",value:"*",minimum:1},Qd={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},Jd={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},ef=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],tf={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},nf={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},rf={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},of={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},af={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-show-background":{type:"boolean",default:!1,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},sf={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},lf={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},uf={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},cf={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},hf={$version:Ed,$root:Pd,sources:Ad,source:Ld,source_vector:Md,source_raster:Rd,source_raster_dem:Od,source_geojson:Dd,source_video:Id,source_image:Fd,layer:Bd,layout:Nd,layout_background:Gd,layout_fill:zd,layout_circle:Ud,layout_heatmap:Vd,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:kd,layout_symbol:Wd,layout_raster:Hd,layout_hillshade:qd,filter:jd,filter_operator:Xd,geometry_type:Yd,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:Zd,expression:Kd,expression_name:Qd,light:Jd,paint:ef,paint_fill:tf,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:nf,paint_circle:rf,paint_heatmap:of,paint_symbol:af,paint_raster:sf,paint_hillshade:lf,paint_background:uf,transition:cf,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},df=(wd=!0,function(e,t){var i=wd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wd=!1,i}),ff=df(void 0,(function(){return ff.toString().search("(((.+)+)+)+$").toString().constructor(ff).search("(((.+)+)+)+$")}));function pf(){}function _f(e,t,i){if(e.length>1){if(mf(e,t))return!0;for(var n=0;n<t.length;n++)if(xf(t[n],e,i))return!0}for(var r=0;r<e.length;r++)if(xf(e[r],t,i))return!0;return!1}function mf(e,t){if(0===e.length||0===t.length)return!1;for(var i=0;i<e.length-1;i++)for(var n=e[i],r=e[i+1],o=0;o<t.length-1;o++)if(gf(n,r,t[o],t[o+1]))return!0;return!1}function gf(e,t,i,n){return Uh(e,i,n)!==Uh(t,i,n)&&Uh(e,t,i)!==Uh(e,t,n)}function xf(e,t,i){var n=i*i;if(1===t.length)return e.distSqr(t[0])<n;for(var r=1;r<t.length;r++){var o=t[r-1],a=t[r];if(pf.distToSegmentSquared(e,o,a)<n)return!0}return!1}function yf(e,t){for(var i,n,r,o=!1,a=0;a<e.length;a++)for(var s=0,l=(i=e[a]).length-1;s<i.length;l=s++)n=i[s],r=i[l],n.y>t.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(o=!o);return o}function vf(e,t){for(var i=!1,n=0,r=e.length-1;n<e.length;r=n++){var o=e[n],a=e[r];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}ff(),pf.polygonIntersectsPolygon=function(e,t){for(var i=0;i<e.length;i++)if(vf(t,e[i]))return!0;for(var n=0;n<t.length;n++)if(vf(e,t[n]))return!0;return!!mf(e,t)},pf.polygonIntersectsBufferedPoint=function(e,t,i){return!!vf(e,t)||!!xf(t,e,i)},pf.polygonIntersectsMultiPolygon=function(e,t){if(1===e.length)return yf(t,e[0]);for(var i=0;i<t.length;i++)for(var n=t[i],r=0;r<n.length;r++)if(vf(e,n[r]))return!0;for(var o=0;o<e.length;o++)if(yf(t,e[o]))return!0;for(var a=0;a<t.length;a++)if(mf(e,t[a]))return!0;return!1},pf.polygonIntersectsBufferedMultiLine=function(e,t,i){for(var n=0;n<t.length;n++){var r=t[n];if(e.length>=3)for(var o=0;o<r.length;o++)if(vf(e,r[o]))return!0;if(_f(e,r,i))return!0}return!1},pf.distToSegmentSquared=function(e,t,i){var n=t.distSqr(i);if(0===n)return e.distSqr(t);var r=((e.x-t.x)*(i.x-t.x)+(e.y-t.y)*(i.y-t.y))/n;return r<0?e.distSqr(t):r>1?e.distSqr(i):e.distSqr(i.sub(t)._mult(r)._add(t))},pf.polygonIntersectPoint=function(e,t){return vf(e,t)};var $f=new Qh({"circle-sort-key":new vh(hf.layout_circle["circle-sort-key"])}),bf=new Qh({"circle-radius":new vh(hf.paint_circle["circle-radius"]),"circle-color":new vh(hf.paint_circle["circle-color"]),"circle-blur":new vh(hf.paint_circle["circle-blur"]),"circle-opacity":new vh(hf.paint_circle["circle-opacity"]),"circle-translate":new mh(hf.paint_circle["circle-translate"]),"circle-translate-anchor":new mh(hf.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new mh(hf.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new mh(hf.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new vh(hf.paint_circle["circle-stroke-width"]),"circle-stroke-color":new vh(hf.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new vh(hf.paint_circle["circle-stroke-opacity"])}),Tf={paint:bf,layout:$f},Cf=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Tf)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.createBucket=function(e){return new dh(e)},r.prototype.queryRadius=function(e){var t=e;return td.getMaximumPaintValue("circle-radius",this,t)+td.getMaximumPaintValue("circle-stroke-width",this,t)+td.translateDistance(this.paint.get("circle-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a,s,l){s=Ef();for(var u=td.translate(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),0,a),c=this.paint.get("circle-radius")?.evaluate(t,i),h=this.paint.get("circle-stroke-width")?.evaluate(t,i),d=c+h,f="map"===this.paint.get("circle-pitch-alignment"),p=f?u:wf(u,s),_=f?d*a:d,m=0,g=n;m<g.length;m+=1)for(var x=0,y=g[m];x<y.length;x+=1){var v=y[x],$=f?v:Sf(v,s),b=_;if(Pf([],[v.x,v.y,0,1],s),"viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")||"map"===this.paint.get("circle-pitch-scale")&&this.paint.get("circle-pitch-alignment"),l=wa(l)?l:10,pf.polygonIntersectsBufferedPoint(p,$,b*l))return!0}return!1},r}(bd);function Sf(e,t){var i=Pf([],[e.x,e.y,0,1],t);return new to(i[0],i[1])}function wf(e,t){return e.map((function(e){return Sf(e,t)}))}function Ef(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function Pf(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,e[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,e[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,e[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,e}function Af(e,t,i,n,r){Lf(e,t,i||0,n||e.length-1,r||Rf)}function Lf(e,t,i,n,r){for(;n>i;){if(n-i>600){var o=n-i+1,a=t-i+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);Lf(e,t,Math.max(i,Math.floor(t-a*l/o+u)),Math.min(n,Math.floor(t+(o-a)*l/o+u)),r)}var c=e[t],h=i,d=n;for(Mf(e,i,t),r(e[n],c)>0&&Mf(e,i,n);h<d;){for(Mf(e,h,d),h++,d--;r(e[h],c)<0;)h++;for(;r(e[d],c)>0;)d--}0===r(e[i],c)?Mf(e,i,d):Mf(e,++d,n),d<=t&&(i=d+1),t<=d&&(n=d-1)}}function Mf(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Rf(e,t){return e<t?-1:e>t?1:0}var Of,Df=(Of=!0,function(e,t){var i=Of?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Of=!1,i}),If=Df(void 0,(function(){return If.toString().search("(((.+)+)+)+$").toString().constructor(If).search("(((.+)+)+)+$")}));function Ff(e){for(var t=0,i=0,n=e.length,r=n-1,o=void 0,a=void 0;i<n;r=i++)o=e[i],t+=((a=e[r]).x-o.x)*(o.y+a.y);return t}function Bf(e,t){var i=e.length;if(i<=1)return[e];for(var n,r,o=[],a=0;a<i;a++){var s=Ff(e[a]);0!==s&&(e[a].area=Math.abs(s),void 0===r&&(r=s<0),r===s<0?(n&&o.push(n),n=[e[a]]):n.push(e[a]))}if(n&&o.push(n),t>1)for(var l=0;l<o.length;l++)o[l].length<=t||(Af(o[l],t,1,o[l].length-1,Nf),o[l]=o[l].slice(0,t));return o}function Nf(e,t){return t.area-e.area}function Gf(e,t,i){i=i||2;var n,r,o,a,s,l,u,c=t&&t.length,h=c?t[0]*i:e.length,d=zf(e,0,h,i,!0),f=[];if(!d||d.next===d.prev)return f;if(c&&(d=jf(e,t,d,i)),e.length>80*i){n=o=e[0],r=a=e[1];for(var p=i;p<h;p+=i)(s=e[p])<n&&(n=s),(l=e[p+1])<r&&(r=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-r))?1/u:0}return Vf(d,f,i,n,r,u),f}function zf(e,t,i,n,r){var o,a;if(r===mp(e,t,i,n)>0)for(o=t;o<i;o+=n)a=fp(o,e[o],e[o+1],a);else for(o=i-n;o>=t;o-=n)a=fp(o,e[o],e[o+1],a);return a&&op(a,a.next)&&(pp(a),a=a.next),a}function Uf(e,t){if(!e)return e;t||(t=e);var i,n=e;do{if(i=!1,n.steiner||!op(n,n.next)&&0!==rp(n.prev,n,n.next))n=n.next;else{if(pp(n),(n=t=n.prev)===n.next)break;i=!0}}while(i||n!==t);return t}function Vf(e,t,i,n,r,o,a){if(e){!a&&o&&Qf(e,n,r,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?Wf(e,n,r,o):kf(e))t.push(s.i/i),t.push(e.i/i),t.push(l.i/i),pp(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?Vf(e=Hf(Uf(e),t,i),t,i,n,r,o,2):2===a&&qf(e,t,i,n,r,o):Vf(Uf(e),t,i,n,r,o,1);break}}}function kf(e){var t=e.prev,i=e,n=e.next;if(rp(t,i,n)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(ip(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&rp(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Wf(e,t,i,n){var r=e.prev,o=e,a=e.next;if(rp(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,l=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,u=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=ep(s,l,t,i,n),d=ep(u,c,t,i,n),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&rp(f.prev,f,f.next)>=0||(f=f.prevZ,p!==e.prev&&p!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&rp(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&rp(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&rp(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Hf(e,t,i){var n=e;do{var r=n.prev,o=n.next.next;!op(r,o)&&ap(r,n,n.next,o)&&cp(r,o)&&cp(o,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(o.i/i),pp(n),pp(n.next),n=e=o),n=n.next}while(n!==e);return Uf(n)}function qf(e,t,i,n,r,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&np(a,s)){var l=dp(a,s);return a=Uf(a,a.next),l=Uf(l,l.next),Vf(a,t,i,n,r,o),void Vf(l,t,i,n,r,o)}s=s.next}a=a.next}while(a!==e)}function jf(e,t,i,n){var r,o,a,s=[];for(r=0,o=t.length;r<o;r++)(a=zf(e,t[r]*n,r<o-1?t[r+1]*n:e.length,n,!1))===a.next&&(a.steiner=!0),s.push(tp(a));for(s.sort(Xf),r=0;r<s.length;r++)Yf(s[r],i),i=Uf(i,i.next);return i}function Xf(e,t){return e.x-t.x}function Yf(e,t){if(t=Zf(e,t)){var i=dp(t,e);Uf(i,i.next)}}function Zf(e,t){var i,n=t,r=e.x,o=e.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if(a=s,s===r){if(o===n.y)return n;if(o===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!i)return null;if(r===a)return i;var l,u=i,c=i.x,h=i.y,d=1/0;n=i;do{r>=n.x&&n.x>=c&&r!==n.x&&ip(o<h?r:a,o,c,h,o<h?a:r,o,n.x,n.y)&&(l=Math.abs(o-n.y)/(r-n.x),cp(n,e)&&(l<d||l===d&&(n.x>i.x||n.x===i.x&&Kf(i,n)))&&(i=n,d=l)),n=n.next}while(n!==u);return i}function Kf(e,t){return rp(e.prev,e,t.prev)<0&&rp(t.next,e,e.next)<0}function Qf(e,t,i,n){var r=e;do{null===r.z&&(r.z=ep(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,Jf(r)}function Jf(e){var t,i,n,r,o,a,s,l,u=1;do{for(i=e,e=null,o=null,a=0;i;){for(a++,n=i,s=0,t=0;t<u&&(s++,n=n.nextZ);t++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=n}o.nextZ=null,u*=2}while(a>1);return e}function ep(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function tp(e){var t=e,i=e;do{(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next}while(t!==e);return i}function ip(e,t,i,n,r,o,a,s){return(r-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(n-s)-(i-a)*(t-s)>=0&&(i-a)*(o-s)-(r-a)*(n-s)>=0}function np(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!up(e,t)&&(cp(e,t)&&cp(t,e)&&hp(e,t)&&(rp(e.prev,e,t.prev)||rp(e,t.prev,t))||op(e,t)&&rp(e.prev,e,e.next)>0&&rp(t.prev,t,t.next)>0)}function rp(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function op(e,t){return e.x===t.x&&e.y===t.y}function ap(e,t,i,n){var r=lp(rp(e,t,i)),o=lp(rp(e,t,n)),a=lp(rp(i,n,e)),s=lp(rp(i,n,t));return!!(r!==o&&a!==s||0===r&&sp(e,i,t)||0===o&&sp(e,n,t)||0===a&&sp(i,e,n)||0===s&&sp(i,t,n))}function sp(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function lp(e){return e>0?1:e<0?-1:0}function up(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&ap(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function cp(e,t){return rp(e.prev,e,e.next)<0?rp(e,t,e.next)>=0&&rp(e,e.prev,t)>=0:rp(e,t,e.prev)<0||rp(e,e.next,t)<0}function hp(e,t){var i=e,n=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}function dp(e,t){var i=new _p(e.i,e.x,e.y),n=new _p(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function fp(e,t,i,n){var r=new _p(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function pp(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _p(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function mp(e,t,i,n){for(var r=0,o=t,a=i-n;o<i;o+=n)r+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return r}If(),Gf.deviation=function(e,t,i,n){var r=t&&t.length,o=r?t[0]*i:e.length,a=Math.abs(mp(e,0,o,i));if(r)for(var s=0,l=t.length;s<l;s++){var u=t[s]*i,c=s<l-1?t[s+1]*i:e.length;a-=Math.abs(mp(e,u,c,i))}var h=0;for(s=0;s<n.length;s+=3){var d=n[s]*i,f=n[s+1]*i,p=n[s+2]*i;h+=Math.abs((e[d]-e[p])*(e[f+1]-e[d+1])-(e[d]-e[f])*(e[p+1]-e[d+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},Gf.flatten=function(e){for(var t=e[0][0].length,i={vertices:[],holes:[],dimensions:t},n=0,r=0;r<e.length;r++){for(var o=0;o<e[r].length;o++)for(var a=0;a<t;a++)i.vertices.push(e[r][o][a]);r>0&&(n+=e[r-1].length,i.holes.push(n))}return i};var gp,xp=(gp=!0,function(e,t){var i=gp?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return gp=!1,i}),yp=xp(void 0,(function(){return yp.toString().search("(((.+)+)+)+$").toString().constructor(yp).search("(((.+)+)+)+$")}));function vp(e,t,i,n,r){for(var o=r.patternDependencies,a=0,s=t;a<s.length;a+=1){var l=s[a],u=l.paint.get(e+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:n-1},i,{},r.availableImages),h=u.evaluate({zoom:n},i,{},r.availableImages),d=u.evaluate({zoom:n+1},i,{},r.availableImages);c=c&&c.name?c.name:c,h=h&&h.name?h.name:h,d=d&&d.name?d.name:d,o[c]=!0,o[h]=!0,o[d]=!0,i.patterns[l.id]={min:c,mid:h,max:d}}}return i}yp();var $p,bp=($p=!0,function(e,t){var i=$p?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return $p=!1,i}),Tp=bp(void 0,(function(){return Tp.toString().search("(((.+)+)+)+$").toString().constructor(Tp).search("(((.+)+)+)+$")}));function Cp(e,t,i){for(var n=i.patternDependencies,r=!1,o=0,a=t;o<a.length;o+=1){var s=a[o].paint.get(e+"-pattern");!s.isConstant()&&(r=!0);var l=s.constantOr(null);l&&(r=!0,n[l.to]=!0,n[l.from]=!0)}return r}if(Tp(),typeof WebAssembly<"u"){let e=function(e){return wp.locateFile?wp.locateFile(e,Dp):Dp+e},t=function(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1)},i=function(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return Hp[e>>0];case"i16":return jp[e>>1];case"i32":case"i64":return Xp[e>>2];case"float":return Zp[e>>2];case"double":return Kp[e>>3];default:de("invalid type for getValue: "+t)}return null},n=function(e,t){e||de("Assertion failed: "+t)},r=function(e){var t=wp["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=k_(i),c(e,t,i)}return t},array:function(e){var t=k_(e.length);return h(e,t),t}},u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p<o.length;p++){var _=s[i[p]];_?(0===f&&(f=H_()),d[p]=_(o[p])):d[p]=o[p]}var m=u.apply(null,d);return m=function(e){return"string"===t?l(e):"boolean"===t?Boolean(e):e}(m),0!==f&&W_(f),m},a=function(e,t,i,n){return function(){return o(e,t,i,arguments)}},s=function(e,i,n){for(var r=i+n,o=i;e[o]&&!(o>=r);)++o;if(o-i>16&&e.subarray&&kp)return kp.decode(e.subarray(i,o));for(var a="";i<o;){var s=e[i++];if(128&s){var l=63&e[i++];if(192!=(224&s)){var u=63&e[i++];if(224==(240&s)?s=(15&s)<<12|l<<6|u:(240!=(248&s)&&t("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),s=(7&s)<<18|l<<12|u<<6|63&e[i++]),s<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(qp,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343&&(l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s)),l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,qp,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),Hp.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e==e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return wp.extraStackTrace&&(e+="\n"+wp.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){wp.HEAP8=Hp=new Int8Array(Wp),wp.HEAP16=jp=new Int16Array(Wp),wp.HEAP32=Xp=new Int32Array(Wp),wp.HEAPU8=qp=new Uint8Array(Wp),wp.HEAPU16=new Uint16Array(Wp),wp.HEAPU32=Yp=new Uint32Array(Wp),wp.HEAPF32=Zp=new Float32Array(Wp),wp.HEAPF64=Kp=new Float64Array(Wp)},g=function(){n(0==(3&e_)),Yp[(e_>>2)-1]=34821223,Yp[(e_>>2)-2]=2310721022},x=function(){(34821223!=Yp[(e_>>2)-1]||2310721022!=Yp[(e_>>2)-2])&&de("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+Yp[(e_>>2)-2].toString(16)+" "+Yp[(e_>>2)-1].toString(16)),1668509029!==Xp[0]&&de("Runtime error: The application has corrupted its heap memory area (address zero)!")},y=function(e){de("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(e_-H_()+e)+" bytes available!")},v=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?wp.dynCall_v(i):wp.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},$=function(){if(wp.preRun)for("function"==typeof wp.preRun&&(wp.preRun=[wp.preRun]);wp.preRun.length;)S(wp.preRun.shift());v(o_)},b=function(){x(),!u_&&(u_=!0,v(a_))},T=function(){x(),v(s_)},C=function(){if(x(),wp.postRun)for("function"==typeof wp.postRun&&(wp.postRun=[wp.postRun]);wp.postRun.length;)w(wp.postRun.shift());v(l_)},S=function(e){o_.unshift(e)},w=function(e){l_.unshift(e)},E=function(e){h_++,wp.monitorRunDependencies&&wp.monitorRunDependencies(h_),e&&(n(!p_[e]),p_[e]=1,null===d_&&typeof setInterval<"u"&&(d_=setInterval((function(){if(Vp)return clearInterval(d_),void(d_=null)}),1e4)))},P=function(e){if(h_--,wp.monitorRunDependencies&&wp.monitorRunDependencies(h_),e&&(n(p_[e]),delete p_[e]),0==h_&&(null!==d_&&(clearInterval(d_),d_=null),f_)){var t=f_;f_=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(g_):0===e.indexOf(g_)},L=function(){try{if(wp.wasmBinary)return new Uint8Array(wp.wasmBinary);if(wp.readBinary)return wp.readBinary(m_);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}},M=function(){return wp.wasmBinary||!Pp&&!Ap||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(m_,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+m_+"'";return e.arrayBuffer()})).catch((function(){return L()}))},R=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Bp};function i(e,t){var i=e.exports;wp.asm=i,P("wasm-instantiate")}E("wasm-instantiate");var r=wp;function o(e){n(wp===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(wp.instantiateWasm)try{return wp.instantiateWasm(t,i)}catch{return!1}return function(){if(wp.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(m_)||"function"!=typeof fetch)return a(o);fetch(m_,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},O=function(e){return V_(e)},D=function(e){e&&v_[e].refcount++},I=function(e){if(!e||v_[e])return e;for(var t in v_)for(var i=+t,n=v_[i].adjusted,r=n.length,o=0;o<r;o++)if(n[o]===e)return i;return e},F=function(e){var t=v_[e];return t&&!t.caught&&(t.caught=!0,U_.uncaught_exception--),t&&(t.rethrown=!1),$_.push(e),D(I(e)),e},B=function(e,t,i){throw v_[e]={ptr:e,adjusted:[e],type:t,destructor:i,refcount:0,caught:!1,rethrown:!1},"uncaught_exception"in U_?U_.uncaught_exception++:U_.uncaught_exception=1,e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."},N=function(){return!!U_.uncaught_exception},G=function(){},z=function(){},U=function(e,t){b_.varargs=t;try{return b_.getStreamFromFD(),b_.get(),b_.get(),b_.get(),b_.get(),de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},V=function(){var e=wp._fflush;e&&e(0);var t=b_.buffers;t[1].length&&b_.printChar(1,10),t[2].length&&b_.printChar(2,10)},k=function(e,t){b_.varargs=t;try{for(var i=b_.get(),n=b_.get(),r=b_.get(),o=0,a=0;a<r;a++){for(var s=Xp[n+8*a>>2],l=Xp[n+(8*a+4)>>2],u=0;u<l;u++)b_.printChar(i,qp[s+u]);o+=l}return o}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},W=function(e,t){b_.varargs=t;try{return 0}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},H=function(e,t){b_.varargs=t;try{return b_.getStreamFromFD(),de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},q=function(){},j=function(){wp.abort()},X=function(){return Hp.length},Y=function(e,t,i){qp.set(qp.subarray(t,t+i),e)},Z=function(e){if(!wp.___errno_location)return e;Xp[wp.___errno_location()>>2]=e},K=function(e){de("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+Hp.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},Q=function(e){e=_(e,65536);var t=Wp.byteLength;try{return-1!==Up.grow((e-t)/65536)&&(Wp=Up.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},J=function(e){var i=X();n(e>i);var r=65536,o=2147418112;if(e>o)return!1;for(var a=Math.max(i,16777216);a<e;)(a=a<=536870912?_(2*a,r):Math.min(_((3*a+2147483648)/4,r),o))===i&&t("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+Hp.length);return!!Q(a)&&(m(),!0)},ee=function(e){Fp("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Fp("Build with ASSERTIONS=2 for more info."),de(e)},te=function(e){Fp("Invalid function pointer called with signature 'iidiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Fp("Build with ASSERTIONS=2 for more info."),de(e)},ie=function(e){Fp("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Fp("Build with ASSERTIONS=2 for more info."),de(e)},ne=function(e){Fp("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Fp("Build with ASSERTIONS=2 for more info."),de(e)},re=function(e){Fp("Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Fp("Build with ASSERTIONS=2 for more info."),de(e)},oe=function(e){Fp("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Fp("Build with ASSERTIONS=2 for more info."),de(e)},ae=function(e){Fp("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Fp("Build with ASSERTIONS=2 for more info."),de(e)},se=function(e){Fp("Invalid function pointer called with signature 'viiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Fp("Build with ASSERTIONS=2 for more info."),de(e)},le=function(e){Fp("Invalid function pointer called with signature 'viiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Fp("Build with ASSERTIONS=2 for more info."),de(e)},ue=function(e){Fp("Invalid function pointer called with signature 'viiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Fp("Build with ASSERTIONS=2 for more info."),de(e)},ce=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},he=function(e){function t(){wp.calledRun||(wp.calledRun=!0,!Vp&&(b(),T(),wp.onRuntimeInitialized&&wp.onRuntimeInitialized(),n(!wp._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),C()))}e=e||wp.arguments,h_>0||(g(),$(),h_>0)||wp.calledRun||(wp.setStatus?(wp.setStatus("Running..."),setTimeout((function(){setTimeout((function(){wp.setStatus("")}),1),t()}),1)):t(),x())},de=function(e){wp.onAbort&&wp.onAbort(e),Vp=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw q_&&q_.forEach((function(i){t=i(t,e)})),t};var Sp,wp=typeof wp<"u"?wp:{},Ep={};for(Sp in wp)wp.hasOwnProperty(Sp)&&(Ep[Sp]=wp[Sp]);wp.arguments=[],wp.thisProgram="./this.program",wp.quit=function(e,t){throw t},wp.preRun=[],wp.postRun=[];var Pp=!1,Ap=!1,Lp=!1,Mp=!1;if(Pp="object"==typeof window,Ap="function"==typeof importScripts,Lp="object"==typeof process&&"function"==typeof require&&!Pp&&!Ap,Mp=!Pp&&!Lp&&!Ap,wp.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var Rp,Op,Dp="";if(Lp)Dp=__dirname+"/",wp.read=function(e,t){var i;return Rp||(Rp=require("fs")),Op||(Op=require("path")),e=Op.normalize(e),i=Rp.readFileSync(e),t?i:i.toString()},wp.readBinary=function(e){var t=wp.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(wp.thisProgram=process.argv[1].replace(/\\/g,"/")),wp.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=wp),process.on("uncaughtException",(function(e){if(!(e instanceof ce))throw e})),process.on("unhandledRejection",de),wp.quit=function(e){process.exit(e)},wp.inspect=function(){return"[Emscripten Module object]"};else if(Mp)typeof read<"u"&&(wp.read=function(e){return read(e)}),wp.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?wp.arguments=scriptArgs:typeof arguments<"u"&&(wp.arguments=arguments),"function"==typeof quit&&(wp.quit=function(e){quit(e)});else{if(!Pp&&!Ap)throw new Error("environment detection error");Ap?Dp=self.location.href:document.currentScript&&(Dp=document.currentScript.src),Dp=0!==Dp.indexOf("blob:")?Dp.substr(0,Dp.lastIndexOf("/")+1):"",wp.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},Ap&&(wp.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),wp.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},wp.setWindowTitle=function(e){document.title=e}}var Ip=wp.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),Fp=wp.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||Ip);for(Sp in Ep)Ep.hasOwnProperty(Sp)&&(wp[Sp]=Ep[Sp]);Ep=void 0,n(typeof wp.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof wp.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof wp.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof wp.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),H_=W_=k_=function(){de("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Bp={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var Np=0,Gp=function(e){Np=e},zp=function(){return Np};"object"!=typeof WebAssembly&&de("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Up,Vp=!1,kp=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Wp,Hp,qp,jp,Xp,Yp,Zp,Kp,Qp=65536,Jp=5872,e_=5248752,t_=5248752,i_=5840;n(Jp%16==0,"stack must start aligned"),n(t_%16==0,"heap must start aligned");var n_=5242880;wp.TOTAL_STACK&&n(n_===wp.TOTAL_STACK,"the stack size can no longer be determined at runtime");var r_=wp.TOTAL_MEMORY||16777216;if(r_<n_&&Fp("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+r_+"! (TOTAL_STACK="+n_+")"),n(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),wp.buffer?(Wp=wp.buffer,n(Wp.byteLength===r_,"provided buffer should be "+r_+" bytes, but it is "+Wp.byteLength)):("object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(n(r_%Qp==0),Up=new WebAssembly.Memory({initial:r_/Qp}),Wp=Up.buffer):Wp=new ArrayBuffer(r_),n(Wp.byteLength===r_)),m(),Xp[i_>>2]=t_,Xp[0]=1668509029,jp[1]=25459,115!==qp[2]||99!==qp[3])throw"Runtime error: expected the system to be little-endian!";var o_=[],a_=[],s_=[],l_=[],u_=!1,c_=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var h_=0,d_=null,f_=null,p_={};wp.preloadedImages={},wp.preloadedAudios={};var __={error:function(){de("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){__.error()},createDataFile:function(){__.error()},createPreloadedFile:function(){__.error()},createLazyFile:function(){__.error()},open:function(){__.error()},mkdev:function(){__.error()},registerDevice:function(){__.error()},analyzePath:function(){__.error()},loadFilesFromDB:function(){__.error()},ErrnoError:function(){__.error()}};wp.FS_createDataFile=__.createDataFile,wp.FS_createPreloadedFile=__.createPreloadedFile;var m_,g_="data:application/octet-stream;base64,",x_=typeof window>"u"?self:window;m_=x_.location.href.endsWith(".openrealspace")?"../../static/Build/SuperMap3D/ThirdParty/earcut.wasm":"ThirdParty/earcut.wasm",A(m_)||(m_=e(m_)),wp.asm=function(e,t,i){t.memory=Up,t.table=new WebAssembly.Table({initial:260,maximum:260,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=R(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var y_=5856;n(y_%8==0);var v_={},$_=[],b_={buffers:[null,[],[]],printChar:function(e,t){var i=b_.buffers[e];n(i),0===t||10===t?((1===e?Ip:Fp)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return b_.varargs+=4,Xp[b_.varargs-4>>2]},getStr:function(){return l(b_.get())},get64:function(){var e=b_.get(),t=b_.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===b_.get())}},T_={},C_={abort:de,setTempRet0:Gp,getTempRet0:zp,abortStackOverflow:y,nullFunc_ii:ee,nullFunc_iidiiii:te,nullFunc_iiii:ie,nullFunc_jiji:ne,nullFunc_v:re,nullFunc_vi:oe,nullFunc_vii:ae,nullFunc_viiii:se,nullFunc_viiiii:le,nullFunc_viiiiii:ue,___cxa_allocate_exception:O,___cxa_begin_catch:F,___cxa_throw:B,___cxa_uncaught_exception:N,___exception_addRef:D,___exception_deAdjust:I,___gxx_personality_v0:G,___lock:z,___setErrNo:Z,___syscall140:U,___syscall146:k,___syscall54:W,___syscall6:H,___unlock:q,_abort:j,_emscripten_get_heap_size:X,_emscripten_memcpy_big:Y,_emscripten_resize_heap:J,abortOnCannotGrowMemory:K,emscripten_realloc_buffer:Q,flush_NO_FILESYSTEM:V,tempDoublePtr:y_,DYNAMICTOP_PTR:i_},S_=wp.asm(T_,C_,Wp),w_=S_.__ZSt18uncaught_exceptionv;S_.__ZSt18uncaught_exceptionv=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),w_.apply(null,arguments)};var E_=S_.___cxa_can_catch;S_.___cxa_can_catch=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),E_.apply(null,arguments)};var P_=S_.___cxa_is_pointer_type;S_.___cxa_is_pointer_type=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),P_.apply(null,arguments)};var A_=S_.___errno_location;S_.___errno_location=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),A_.apply(null,arguments)};var L_=S_._earcut;S_._earcut=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),L_.apply(null,arguments)};var M_=S_._fflush;S_._fflush=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),M_.apply(null,arguments)};var R_=S_._free;S_._free=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),R_.apply(null,arguments)};var O_=S_._llvm_maxnum_f64;S_._llvm_maxnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),O_.apply(null,arguments)};var D_=S_._llvm_minnum_f64;S_._llvm_minnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),D_.apply(null,arguments)};var I_=S_._malloc;S_._malloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),I_.apply(null,arguments)};var F_=S_._sbrk;S_._sbrk=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),F_.apply(null,arguments)};var B_=S_.establishStackSpace;S_.establishStackSpace=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),B_.apply(null,arguments)};var N_=S_.stackAlloc;S_.stackAlloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),N_.apply(null,arguments)};var G_=S_.stackRestore;S_.stackRestore=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),G_.apply(null,arguments)};var z_=S_.stackSave;S_.stackSave=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),z_.apply(null,arguments)},wp.asm=S_;var U_=wp.__ZSt18uncaught_exceptionv=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.__ZSt18uncaught_exceptionv.apply(null,arguments)};wp.___cxa_can_catch=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.___cxa_can_catch.apply(null,arguments)},wp.___cxa_is_pointer_type=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.___cxa_is_pointer_type.apply(null,arguments)},wp.___errno_location=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.___errno_location.apply(null,arguments)},wp._earcut=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._earcut.apply(null,arguments)},wp._emscripten_replace_memory=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._emscripten_replace_memory.apply(null,arguments)},wp._fflush=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._fflush.apply(null,arguments)},wp._free=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._free.apply(null,arguments)},wp._llvm_maxnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._llvm_maxnum_f64.apply(null,arguments)},wp._llvm_minnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._llvm_minnum_f64.apply(null,arguments)};var V_=wp._malloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._malloc.apply(null,arguments)};wp._memcpy=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._memcpy.apply(null,arguments)},wp._memset=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._memset.apply(null,arguments)},wp._sbrk=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._sbrk.apply(null,arguments)},wp.establishStackSpace=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.establishStackSpace.apply(null,arguments)};var k_=wp.stackAlloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.stackAlloc.apply(null,arguments)},W_=wp.stackRestore=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.stackRestore.apply(null,arguments)},H_=wp.stackSave=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.stackSave.apply(null,arguments)};wp.dynCall_ii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_ii.apply(null,arguments)},wp.dynCall_iidiiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_iidiiii.apply(null,arguments)},wp.dynCall_iiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_iiii.apply(null,arguments)},wp.dynCall_jiji=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_jiji.apply(null,arguments)},wp.dynCall_v=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_v.apply(null,arguments)},wp.dynCall_vi=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_vi.apply(null,arguments)},wp.dynCall_vii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_vii.apply(null,arguments)},wp.dynCall_viiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_viiii.apply(null,arguments)},wp.dynCall_viiiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_viiiii.apply(null,arguments)},wp.dynCall_viiiiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_viiiiii.apply(null,arguments)},wp.asm=S_,wp.intArrayFromString||(wp.intArrayFromString=function(){de("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.intArrayToString||(wp.intArrayToString=function(){de("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.ccall=o,wp.cwrap=a,wp.setValue||(wp.setValue=function(){de("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getValue=i,wp.allocate||(wp.allocate=function(){de("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getMemory||(wp.getMemory=function(){de("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.AsciiToString||(wp.AsciiToString=function(){de("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToAscii||(wp.stringToAscii=function(){de("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF8ArrayToString||(wp.UTF8ArrayToString=function(){de("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF8ToString||(wp.UTF8ToString=function(){de("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF8Array||(wp.stringToUTF8Array=function(){de("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF8||(wp.stringToUTF8=function(){de("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.lengthBytesUTF8||(wp.lengthBytesUTF8=function(){de("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF16ToString||(wp.UTF16ToString=function(){de("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF16||(wp.stringToUTF16=function(){de("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.lengthBytesUTF16||(wp.lengthBytesUTF16=function(){de("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF32ToString||(wp.UTF32ToString=function(){de("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF32||(wp.stringToUTF32=function(){de("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.lengthBytesUTF32||(wp.lengthBytesUTF32=function(){de("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.allocateUTF8||(wp.allocateUTF8=function(){de("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackTrace||(wp.stackTrace=function(){de("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnPreRun||(wp.addOnPreRun=function(){de("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnInit||(wp.addOnInit=function(){de("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnPreMain||(wp.addOnPreMain=function(){de("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnExit||(wp.addOnExit=function(){de("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnPostRun||(wp.addOnPostRun=function(){de("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.writeStringToMemory||(wp.writeStringToMemory=function(){de("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.writeArrayToMemory||(wp.writeArrayToMemory=function(){de("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.writeAsciiToMemory||(wp.writeAsciiToMemory=function(){de("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addRunDependency||(wp.addRunDependency=function(){de("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.removeRunDependency||(wp.removeRunDependency=function(){de("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.ENV||(wp.ENV=function(){de("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.FS||(wp.FS=function(){de("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.FS_createFolder||(wp.FS_createFolder=function(){de("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createPath||(wp.FS_createPath=function(){de("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createDataFile||(wp.FS_createDataFile=function(){de("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createPreloadedFile||(wp.FS_createPreloadedFile=function(){de("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createLazyFile||(wp.FS_createLazyFile=function(){de("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createLink||(wp.FS_createLink=function(){de("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createDevice||(wp.FS_createDevice=function(){de("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_unlink||(wp.FS_unlink=function(){de("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.GL||(wp.GL=function(){de("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.dynamicAlloc||(wp.dynamicAlloc=function(){de("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.warnOnce||(wp.warnOnce=function(){de("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.loadDynamicLibrary||(wp.loadDynamicLibrary=function(){de("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.loadWebAssemblyModule||(wp.loadWebAssemblyModule=function(){de("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getLEB||(wp.getLEB=function(){de("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getFunctionTables||(wp.getFunctionTables=function(){de("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.alignFunctionTables||(wp.alignFunctionTables=function(){de("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.registerFunctions||(wp.registerFunctions=function(){de("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addFunction||(wp.addFunction=function(){de("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.removeFunction||(wp.removeFunction=function(){de("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getFuncWrapper||(wp.getFuncWrapper=function(){de("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.prettyPrint||(wp.prettyPrint=function(){de("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.makeBigInt||(wp.makeBigInt=function(){de("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.dynCall||(wp.dynCall=function(){de("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getCompilerSetting||(wp.getCompilerSetting=function(){de("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackSave||(wp.stackSave=function(){de("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackRestore||(wp.stackRestore=function(){de("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackAlloc||(wp.stackAlloc=function(){de("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.establishStackSpace||(wp.establishStackSpace=function(){de("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.print||(wp.print=function(){de("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.printErr||(wp.printErr=function(){de("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getTempRet0||(wp.getTempRet0=function(){de("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.setTempRet0||(wp.setTempRet0=function(){de("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.Pointer_stringify||(wp.Pointer_stringify=function(){de("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.ALLOC_NORMAL||Object.defineProperty(wp,"ALLOC_NORMAL",{get:function(){de("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wp.ALLOC_STACK||Object.defineProperty(wp,"ALLOC_STACK",{get:function(){de("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wp.ALLOC_DYNAMIC||Object.defineProperty(wp,"ALLOC_DYNAMIC",{get:function(){de("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wp.ALLOC_NONE||Object.defineProperty(wp,"ALLOC_NONE",{get:function(){de("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),ce.prototype=new Error,ce.prototype.constructor=ce,f_=function e(){wp.calledRun||he(),wp.calledRun||(f_=e)},wp.run=he;var q_=[];if(wp.abort=de,wp.preInit)for("function"==typeof wp.preInit&&(wp.preInit=[wp.preInit]);wp.preInit.length>0;)wp.preInit.pop()();wp.noExitRuntime=!0,he()}else wp=null;var j_,X_=wp,Y_=(j_=!0,function(e,t){var i=j_?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return j_=!1,i}),Z_=Y_(void 0,(function(){return Z_.toString().search("(((.+)+)+)+$").toString().constructor(Z_).search("(((.+)+)+)+$")}));Z_();var K_=!1;if(wa(X_)){X_.onRuntimeInitialized=function(){K_=!0};var Q_=X_.cwrap("earcut","number",["number","number","number","number","number","number"])}var J_=ao([{name:"a_pos",components:2,type:"Int16"}],4),em=J_.members,tm=500,im=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Fo,this.indexArray=new Qo,this.indexArray2=new Jo,this.programConfigurations=new eh(em,e.layers,e.zoom),this.segments=new Ao,this.segments2=new Ao,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};im.prototype.populate=function(e,t){this.hasPattern=Cp("fill",this.layers,t);for(var i=[],n=0,r=e;n<r.length;n+=1){var o=r[n],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(this.layers[0]._featureFilter(new go(0),a)){var u=So(a),c={id:a.id,properties:a.properties,type:a.type,sourceLayerIndex:l,index:s,geometry:u,patterns:{},sortKey:void 0};i.push(c)}}for(var h=0,d=i;h<d.length;h+=1){var f=d[h],p=f,_=p.geometry,m=p.index,g=p.sourceLayerIndex;if(this.hasPattern){var x=vp("fill",this.layers,f,this.zoom,t);this.patternFeatures.push(x)}else this.addFeature(f,_,m,{},t.indexData);var y=e[m].feature;t.featureIndex.insert(y,_,m,g,this.index)}},im.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},im.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},im.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},im.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},im.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=em;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Tc.toIndexBuffer(e,this.indexArray),this.cesiumIndexBuffer2=Tc.toIndexBuffer(e,this.indexArray2))}this.programConfigurations.upload(e),this.uploaded=!0},im.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer?.destroy(),this.cesiumIndexBuffer2?.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},im.prototype.clear=function(){wa(this.layoutVertexArray)&&(this.layoutVertexArray=null),wa(this.indexArray)&&(this.indexArray=null),wa(this.indexArray2)&&(this.indexArray2=null)},im.prototype.addFeature=function(e,t,i,n,r){for(var o=0,a=Bf(t,tm);o<a.length;o+=1){for(var s=a[o],l=0,u=0,c=s;u<c.length;u+=1)l+=c[u].length;for(var h,d=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),f=d.vertexLength,p=[],_=[],m=0,g=s;m<g.length;m+=1){var x=g[m];if(0!==x.length){x!==s[0]&&_.push(p.length/2);var y=this.segments2.prepareSegment(x.length,this.layoutVertexArray,this.indexArray2),v=y.vertexLength;this.layoutVertexArray.emplaceBack(x[0].x,x[0].y),this.indexArray2.emplaceBack(v+x.length-1,v),p.push(x[0].x),p.push(x[0].y);for(var $=1;$<x.length;$++)this.layoutVertexArray.emplaceBack(x[$].x,x[$].y),this.indexArray2.emplaceBack(v+$-1,v+$),p.push(x[$].x),p.push(x[$].y);y.vertexLength+=x.length,y.primitiveLength+=x.length}}if(wa(r)&&wa(r[e.id]))h=r[e.id];else if(!0===K_){var b=new Int32Array(p),T=b.length,C=X_._malloc(Int32Array.BYTES_PER_ELEMENT*T);X_.HEAP32.set(b,C/Int32Array.BYTES_PER_ELEMENT);var S=new Int32Array(_),w=S.length,E=X_._malloc(Int32Array.BYTES_PER_ELEMENT*w);X_.HEAP32.set(S,E/Int32Array.BYTES_PER_ELEMENT);var P=new Int32Array(10*T),A=X_._malloc(Int32Array.BYTES_PER_ELEMENT*T*10);X_.HEAP32.set(P,A/Int32Array.BYTES_PER_ELEMENT);var L=Q_(C,T,E,w,2,A),M=new Int32Array(X_.HEAP32.buffer,A,L);h=new Int32Array(M),X_._free(C),X_._free(E),X_._free(A)}else h=Gf(p,_);for(var R=0;R<h.length;R+=3)this.indexArray.emplaceBack(f+h[R],f+h[R+1],f+h[R+2]);d.vertexLength+=l,d.primitiveLength+=h.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,n)},en.register("FillBucket",im,{omit:["layers","patternFeatures"]});var nm=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.possiblyEvaluate=function(e,t,i){if(void 0===e.value)return new $a(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i),r="resolvedImage"===e.property.specification.type&&"string"!=typeof n?n.name:n,o=this._calculate(r,r,r,t);return new $a(this,{kind:"constant",value:o},t)}if("camera"===e.expression.kind){var a=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new $a(this,{kind:"constant",value:a},t)}return new $a(this,e.expression,t)},r.prototype.evaluate=function(e,t,i,n,r){if("source"===e.kind){var o=e.evaluate(t,i,n,r);return this._calculate(o,o,o,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},i,n),e.evaluate({zoom:Math.floor(t.zoom)},i,n),e.evaluate({zoom:Math.floor(t.zoom)+1},i,n),t):e.value},r.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},r.prototype.interpolate=function(e){return e},r}(vh);en.register("DataDrivenProperty",vh);var rm,om=new Qh({"fill-sort-key":new vh(hf.layout_fill["fill-sort-key"])}),am=new Qh({"fill-antialias":new mh(hf.paint_fill["fill-antialias"]),"fill-opacity":new vh(hf.paint_fill["fill-opacity"]),"fill-color":new vh(hf.paint_fill["fill-color"]),"fill-outline-color":new vh(hf.paint_fill["fill-outline-color"]),"fill-translate":new mh(hf.paint_fill["fill-translate"]),"fill-translate-anchor":new mh(hf.paint_fill["fill-translate-anchor"]),"fill-pattern":new nm(hf.paint_fill["fill-pattern"])}),sm={paint:am,layout:om},lm=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,sm)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},r.prototype.createBucket=function(e){return new im(e)},r.prototype.queryRadius=function(){return td.translateDistance(this.paint.get("fill-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){var s=td.translate(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),0,a);return pf.polygonIntersectsMultiPolygon(s,n)},r.prototype.isTileClipped=function(){return!0},r}(bd),um=(rm=!0,function(e,t){var i=rm?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return rm=!1,i}),cm=um(void 0,(function(){return cm.toString().search("(((.+)+)+)+$").toString().constructor(cm).search("(((.+)+)+)+$")}));cm();var hm=["Unknown","Point","LineString","Polygon"],dm=ao([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),fm=dm.members,pm=63,_m=Math.cos(Math.PI/180*37.5),mm=15,gm=20,xm=15,ym=.5,vm=Math.pow(2,xm-1)/ym,$m=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Go,this.indexArray=new Qo,this.programConfigurations=new eh(fm,e.layers,e.zoom),this.segments=new Ao,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};$m.prototype.populate=function(e,t){this.hasPattern=!1;for(var i=this.layers[0].layout.get("line-sort-key"),n=[],r=0,o=e;r<o.length;r+=1){var a=o[r],s=a.feature,l=a.index,u=a.sourceLayerIndex;if(this.layers[0]._featureFilter(new go(0),s)){var c=So(s),h=i?i.evaluate(s,{}):void 0,d={id:s.id,properties:s.properties,type:s.type,sourceLayerIndex:u,index:l,geometry:c,patterns:{},sortKey:h};n.push(d)}}i&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var f=0,p=n;f<p.length;f+=1){var _=p[f],m=_,g=m.geometry,x=m.index,y=m.sourceLayerIndex;if(this.hasPattern){var v=vp("line",this.layers,_,this.zoom,t);this.patternFeatures.push(v)}else this.addFeature(_,g,x,{});var $=e[x].feature;t.featureIndex.insert($,g,x,y,this.index)}},$m.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},$m.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},$m.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},$m.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},$m.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=fm;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Tc.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},$m.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy()),this.programConfigurations.destroy(),this.segments.destroy())},$m.prototype.clear=function(){wa(this.layoutVertexArray)&&(this.layoutVertexArray=null),wa(this.indexArray)&&(this.indexArray=null)},$m.prototype.addFeature=function(e,t,i,n){for(var r=this.layers[0].layout,o=r.get("line-join").evaluate(e,{}),a=r.get("line-cap"),s=r.get("line-miter-limit"),l=r.get("line-round-limit"),u=0,c=t;u<c.length;u+=1){var h=c[u];this.addLine(h,e,o,a,s,l,i,n)}},$m.prototype.addLine=function(e,t,i,n,r,o,a,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+t.properties.mapbox_clip_start,this.clipEnd=+t.properties.mapbox_clip_end;for(var l=0;l<e.length-1;l++)this.totalDistance+=e[l].dist(e[l+1])}for(var u="Polygon"===hm[t.type],c=e.length;c>=2&&e[c-1].equals(e[c-2]);)c--;for(var h=0;h<c-1&&e[h].equals(e[h+1]);)h++;if(!(c<(u?3:2))){"bevel"===i&&(r=1.05);var d,f=this.overscaling<=16?mm*$o/(512*this.overscaling):0,p=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray),_=void 0,m=void 0,g=void 0,x=void 0;this.e1=this.e2=-1,u&&(d=e[c-2],x=e[h].sub(d)._unit()._perp());for(var y=h;y<c;y++)if(!(m=u&&y===c-1?e[h+1]:e[y+1])||!e[y].equals(m)){x&&(g=x),d&&(_=d),d=e[y],x=m?m.sub(d)._unit()._perp():g;var v=(g=g||x).add(x);(0!==v.x||0!==v.y)&&v._unit();var $=g.x*x.x+g.y*x.y,b=v.x*x.x+v.y*x.y,T=0!==b?1/b:1/0,C=2*Math.sqrt(2-2*b),S=b<_m&&_&&m,w=g.x*x.y-g.y*x.x>0;if(S&&y>h){var E=d.dist(_);if(E>2*f){var P=d.sub(d.sub(_)._mult(f/E)._round());this.updateDistance(_,P),this.addCurrentVertex(P,g,0,0,p),_=P}}var A=_&&m,L=A?i:u?"butt":n;if(A&&"round"===L&&(T<o?L="miter":T<=2&&(L="fakeround")),"miter"===L&&T>r&&(L="bevel"),"bevel"===L&&(T>2&&(L="flipbevel"),T<r&&(L="miter")),_&&this.updateDistance(_,d),"miter"===L)v._mult(T),this.addCurrentVertex(d,v,0,0,p);else if("flipbevel"===L){if(T>100)v=x.mult(-1);else{var M=T*g.add(x).mag()/g.sub(x).mag();v._perp()._mult(M*(w?-1:1))}this.addCurrentVertex(d,v,0,0,p),this.addCurrentVertex(d,v.mult(-1),0,0,p)}else if("bevel"===L||"fakeround"===L){var R=-Math.sqrt(T*T-1),O=w?R:0,D=w?0:R;if(_&&this.addCurrentVertex(d,g,O,D,p),"fakeround"===L)for(var I=Math.round(180*C/Math.PI/gm),F=1;F<I;F++){var B=F/I;if(.5!==B){var N=B-.5;B+=B*N*(B-1)*((1.0904+$*($*(3.55645-1.43519*$)-3.2452))*N*N+(.848013+$*(.215638*$-1.06021)))}var G=x.sub(g)._mult(B)._add(g)._unit()._mult(w?-1:1);this.addHalfVertex(d,G.x,G.y,!1,w,0,p)}m&&this.addCurrentVertex(d,x,-O,-D,p)}else if("butt"===L)this.addCurrentVertex(d,v,0,0,p);else if("square"===L){var z=_?1:-1;this.addCurrentVertex(d,v,z,z,p)}else"round"===L&&(_&&(this.addCurrentVertex(d,g,0,0,p),this.addCurrentVertex(d,g,1,1,p,!0)),m&&(this.addCurrentVertex(d,x,-1,-1,p,!0),this.addCurrentVertex(d,x,0,0,p)));if(S&&y<c-1){var U=d.dist(m);if(U>2*f){var V=d.add(m.sub(d)._mult(f/U)._round());this.updateDistance(d,V),this.addCurrentVertex(V,x,0,0,p),d=V}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,a,s)}},$m.prototype.addCurrentVertex=function(e,t,i,n,r,o){void 0===o&&(o=!1);var a=t.x+t.y*i,s=t.y-t.x*i,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,a,s,o,!1,i,r),this.addHalfVertex(e,l,u,o,!0,-n,r),this.distance>vm/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,i,n,r,o))},$m.prototype.addHalfVertex=function(e,t,i,n,r,o,a){var s=e.x,l=e.y,u=this.scaledDistance*ym;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(r?1:0),Math.round(pm*t)+128,Math.round(pm*i)+128,1+(0===o?0:o<0?-1:1)|(63&u)<<2,u>>6);var c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),a.primitiveLength++),r?this.e2=c:this.e1=c},$m.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(vm-1):this.distance},en.register("LineBucket",$m,{omit:["layers","patternFeatures"]});var bm,Tm=(bm=!0,function(e,t){var i=bm?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return bm=!1,i}),Cm=Tm(void 0,(function(){return Cm.toString().search("(((.+)+)+)+$").toString().constructor(Cm).search("(((.+)+)+)+$")}));Cm();var Sm=function(e){this.specification=e};Sm.prototype.possiblyEvaluate=function(e,t,i){if(void 0!==e.value){if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new go(Math.floor(t.zoom-1),t)),e.expression.evaluate(new go(Math.floor(t.zoom),t)),e.expression.evaluate(new go(Math.floor(t.zoom+1),t)),t)}},Sm.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},Sm.prototype.interpolate=function(e){return e},en.register("CrossFadedProperty",Sm);var wm,Em=(wm=!0,function(e,t){var i=wm?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wm=!1,i}),Pm=Em(void 0,(function(){return Pm.toString().search("(((.+)+)+)+$").toString().constructor(Pm).search("(((.+)+)+)+$")}));Pm();var Am=function(e){this.specification=e};Am.prototype.possiblyEvaluate=function(e,t,i){return!!e.expression.evaluate(t,null,{},i)},Am.prototype.interpolate=function(){return!1},en.register("ColorRampProperty",Am);var Lm=new Qh({"line-cap":new mh(hf.layout_line["line-cap"]),"line-join":new vh(hf.layout_line["line-join"]),"line-miter-limit":new mh(hf.layout_line["line-miter-limit"]),"line-round-limit":new mh(hf.layout_line["line-round-limit"]),"line-sort-key":new vh(hf.layout_line["line-sort-key"])}),Mm=new Qh({"line-opacity":new vh(hf.paint_line["line-opacity"]),"line-color":new vh(hf.paint_line["line-color"]),"line-translate":new mh(hf.paint_line["line-translate"]),"line-translate-anchor":new mh(hf.paint_line["line-translate-anchor"]),"line-width":new vh(hf.paint_line["line-width"]),"line-gap-width":new vh(hf.paint_line["line-gap-width"]),"line-offset":new vh(hf.paint_line["line-offset"]),"line-blur":new vh(hf.paint_line["line-blur"]),"line-dasharray":new Sm(hf.paint_line["line-dasharray"]),"line-pattern":new nm(hf.paint_line["line-pattern"]),"line-gradient":new Am(hf.paint_line["line-gradient"])}),Rm={paint:Mm,layout:Lm},Om=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,i){return i=new go(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),e.prototype.possiblyEvaluate.call(this,t,i)},t.prototype.evaluate=function(t,i,n,r){return i=extend({},i,{zoom:Math.floor(i.zoom)}),e.prototype.evaluate.call(this,t,i,n,r)},t}(vh),Dm=new Om(Rm.paint.properties["line-width"].specification);Dm.useIntegerZoom=!0;var Im=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Rm)}function o(e,t){return t>0?t+2*e:e}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},r.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=renderColorRamp(e,"lineProgress"),this.gradientTexture=null},r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i),this.paint._values["line-floorwidth"]=Dm.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},r.prototype.createBucket=function(e){return new $m(e)},r.prototype.queryRadius=function(e){var t=e,i=o(td.getMaximumPaintValue("line-width",this,t),td.getMaximumPaintValue("line-gap-width",this,t)),n=td.getMaximumPaintValue("line-offset",this,t);return i/2+Math.abs(n)+td.translateDistance(this.paint.get("line-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,a,s){var l=td.translate(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),0,s),u=o(this.paint.get("line-width")?.evaluate(t,i),this.paint.get("line-gap-width")?.evaluate(t,i)),c=s/2*(u=Math.max(u,5)),h=this.paint.get("line-offset")?.evaluate(t,i);return h&&(n=function(e,t){for(var i=[],n=new to(0,0),r=0;r<e.length;r++){for(var o=e[r],a=[],s=0;s<o.length;s++){var l=o[s-1],u=o[s],c=o[s+1],h=0===s?n:u.sub(l)._unit()._perp(),d=s===o.length-1?n:c.sub(u)._unit()._perp(),f=h._add(d)._unit(),p=f.x*d.x+f.y*d.y;f._mult(1/p),a.push(f._mult(t)._add(u))}i.push(a)}return i}(n,h*s)),pf.polygonIntersectsBufferedMultiLine(l,n,c)},r.prototype.isTileClipped=function(){return!0},r}(bd);const Fm=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Bm=Fm(void 0,(function(){return Bm.toString().search("(((.+)+)+)+$").toString().constructor(Bm).search("(((.+)+)+)+$")}));Bm();const Nm=ao([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Gm=ao([{name:"a_projected_pos",components:3,type:"Float32"}],4);ao([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ao([{name:"a_fade_opacity",components:1,type:"Float32"}],4);const zm=ao([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);ao([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]);const Um=ao([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Vm=ao([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);ao([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ao([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"}]),ao([{type:"Float32",name:"offsetX"}]),ao([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var km,Wm=(km=!0,function(e,t){var i=km?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return km=!1,i}),Hm=Wm(void 0,(function(){return Hm.toString().search("(((.+)+)+)+$").toString().constructor(Hm).search("(((.+)+)+)+$")}));Hm();var qm={"Latin-1 Supplement":function(e){return e>=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};const jm=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Xm=jm(void 0,(function(){return Xm.toString().search("(((.+)+)+)+$").toString().constructor(Xm).search("(((.+)+)+)+$")}));function Ym(e){for(const t of e)if(Jm(t.charCodeAt(0)))return!0;return!1}function Zm(e){for(const t of e)if(!Km(t.charCodeAt(0)))return!1;return!0}function Km(e){return!(qm.Arabic(e)||qm["Arabic Supplement"](e)||qm["Arabic Extended-A"](e)||qm["Arabic Presentation Forms-A"](e)||qm["Arabic Presentation Forms-B"](e))}function Qm(e){return!(e<11904||!(qm["Bopomofo Extended"](e)||qm.Bopomofo(e)||qm["CJK Compatibility Forms"](e)||qm["CJK Compatibility Ideographs"](e)||qm["CJK Compatibility"](e)||qm["CJK Radicals Supplement"](e)||qm["CJK Strokes"](e)||qm["CJK Symbols and Punctuation"](e)||qm["CJK Unified Ideographs Extension A"](e)||qm["CJK Unified Ideographs"](e)||qm["Enclosed CJK Letters and Months"](e)||qm["Halfwidth and Fullwidth Forms"](e)||qm.Hiragana(e)||qm["Ideographic Description Characters"](e)||qm["Kangxi Radicals"](e)||qm["Katakana Phonetic Extensions"](e)||qm.Katakana(e)||qm["Vertical Forms"](e)||qm["Yi Radicals"](e)||qm["Yi Syllables"](e)))}function Jm(e){return!(746!==e&&747!==e&&(e<4352||!(qm["Bopomofo Extended"](e)||qm.Bopomofo(e)||qm["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||qm["CJK Compatibility Ideographs"](e)||qm["CJK Compatibility"](e)||qm["CJK Radicals Supplement"](e)||qm["CJK Strokes"](e)||!(!qm["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||qm["CJK Unified Ideographs Extension A"](e)||qm["CJK Unified Ideographs"](e)||qm["Enclosed CJK Letters and Months"](e)||qm["Hangul Compatibility Jamo"](e)||qm["Hangul Jamo Extended-A"](e)||qm["Hangul Jamo Extended-B"](e)||qm["Hangul Jamo"](e)||qm["Hangul Syllables"](e)||qm.Hiragana(e)||qm["Ideographic Description Characters"](e)||qm.Kanbun(e)||qm["Kangxi Radicals"](e)||qm["Katakana Phonetic Extensions"](e)||qm.Katakana(e)&&12540!==e||!(!qm["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!qm["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||qm["Unified Canadian Aboriginal Syllabics"](e)||qm["Unified Canadian Aboriginal Syllabics Extended"](e)||qm["Vertical Forms"](e)||qm["Yijing Hexagram Symbols"](e)||qm["Yi Syllables"](e)||qm["Yi Radicals"](e))))}function eg(e){return!!(qm["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||qm["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||qm["Letterlike Symbols"](e)||qm["Number Forms"](e)||qm["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||qm["Control Pictures"](e)&&9251!==e||qm["Optical Character Recognition"](e)||qm["Enclosed Alphanumerics"](e)||qm["Geometric Shapes"](e)||qm["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||qm["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||qm["CJK Symbols and Punctuation"](e)||qm.Katakana(e)||qm["Private Use Area"](e)||qm["CJK Compatibility Forms"](e)||qm["Small Form Variants"](e)||qm["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}function tg(e){return!(Jm(e)||eg(e))}function ig(e){return qm.Arabic(e)||qm["Arabic Supplement"](e)||qm["Arabic Extended-A"](e)||qm["Arabic Presentation Forms-A"](e)||qm["Arabic Presentation Forms-B"](e)}function ng(e){return e>=1424&&e<=2303||qm["Arabic Presentation Forms-A"](e)||qm["Arabic Presentation Forms-B"](e)}function rg(e){for(const t of e)if(ng(t.charCodeAt(0)))return!0;return!1}Xm();const og=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),ag=og(void 0,(function(){return ag.toString().search("(((.+)+)+)+$").toString().constructor(ag).search("(((.+)+)+)+$")}));ag();const sg={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function lg(e){let t="";for(let i=0;i<e.length;i++){const n=e.charCodeAt(i+1)||null,r=e.charCodeAt(i-1)||null;n&&tg(n)&&!sg[e[i+1]]||r&&tg(r)&&!sg[e[i-1]]||!sg[e[i]]?t+=e[i]:t+=sg[e[i]]}return t}var ug,cg=(ug=!0,function(e,t){var i=ug?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ug=!1,i}),hg=cg(void 0,(function(){return hg.toString().search("(((.+)+)+)+$").toString().constructor(hg).search("(((.+)+)+)+$")}));hg();var dg,fg=(dg=!0,function(e,t){var i=dg?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return dg=!1,i}),pg=fg(void 0,(function(){return pg.toString().search("(((.+)+)+)+$").toString().constructor(pg).search("(((.+)+)+)+$")}));function _g(e){var t={},i={},n=[],r=0;function o(t){n.push(e[t]),r++}function a(e,t,r){var o=i[e];return delete i[e],i[t]=o,n[o].geometry[0].pop(),n[o].geometry[0]=n[o].geometry[0].concat(r[0]),o}function s(e,i,r){var o=t[i];return delete t[i],t[e]=o,n[o].geometry[0].shift(),n[o].geometry[0]=r[0].concat(n[o].geometry[0]),o}function l(e,t,i){var n=i?t[0][t[0].length-1]:t[0][0];return e+":"+n.x+":"+n.y}for(var u=0;u<e.length;u++){var c=e[u],h=c.geometry,d=c.text?c.text.toString():null;if(d){var f=l(d,h),p=l(d,h,!0);if(f in i&&p in t&&i[f]!==t[p]){var _=s(f,p,h),m=a(f,p,n[_].geometry);delete t[f],delete i[p],i[l(d,n[m].geometry,!0)]=m,n[_].geometry=null}else f in i?a(f,p,h):p in t?s(f,p,h):(o(u),t[f]=r-1,i[p]=r-1)}else o(u)}return n.filter((function(e){return e.geometry}))}pg();var mg=function(e,t){void 0===t&&(t={}),Oh(this,t),this.type=e};!function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){void 0===i&&(i={}),e.call(this,"error",Oh({error:t},i))}n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r}(mg);const gg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),xg=gg(void 0,(function(){return xg.toString().search("(((.+)+)+)+$").toString().constructor(xg).search("(((.+)+)+)+$")}));xg();const yg=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function vg(e){return yg.test(e)}function $g(e){return e.indexOf("sku=")>0&&vg(e)}const bg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Tg=bg(void 0,(function(){return Tg.toString().search("(((.+)+)+)+$").toString().constructor(Tg).search("(((.+)+)+)+$")}));Tg();const Cg="mapbox-tiles",Sg=42e4;let wg;function Eg(e,t){if(void 0===wg)try{new Response(new ReadableStream),wg=!0}catch(e){wg=!1}wg?t(e.body):e.blob().then(t)}function Pg(e,t,i){if(!window.caches)return;const n={status:t.status,statusText:t.statusText,headers:new window.Headers};t.headers.forEach(((e,t)=>n.headers.set(t,e)));const r=kh(t.headers.get("Cache-Control")||"");r["no-store"]||(r["max-age"]&&n.headers.set("Expires",new Date(i+1e3*r["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-i<Sg||Eg(t,(t=>{const i=new window.Response(t,n);window.caches.open(Cg).then((t=>t.put(Ag(e.url),i)))})))}function Ag(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Lg(e,t){if(!window.caches)return t(null);const i=Ag(e.url);window.caches.open(Cg).catch(t).then((e=>{e.match(i).catch(t).then((n=>{const r=Mg(n);e.delete(i),r&&e.put(i,n.clone()),t(null,n,r)}))}))}function Mg(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")),i=kh(e.headers.get("Cache-Control")||"");return t>Date.now()&&!i["no-cache"]}function Rg(e){window.caches&&window.caches.open(Cg).then((t=>{t.keys().then((i=>{for(let n=0;n<i.length-e;n++)t.delete(i[n])}))}))}const Og=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Dg=Og(void 0,(function(){return Dg.toString().search("(((.+)+)+)+$").toString().constructor(Dg).search("(((.+)+)+)+$")}));Dg();const Ig={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(Ig);class Fg extends Error{constructor(e,t,i){401===t&&vg(i)&&(e+=": you may have provided an invalid Mapbox access token."),super(e),this.status=t,this.url=i,this.name=this.constructor.name,this.message=e}toString(){return this.name+": "+this.message+" ("+this.status+"): "+this.url}}const Bg=Vh()?()=>self.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href,Ng=e=>/^file:/.test(e)||/^file:/.test(Bg())&&!/^\w+:/.test(e);function Gg(e,t){const i=Vh()?self:window,n=new i.AbortController,r=new i.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:Bg(),signal:n.signal});let o=!1,a=!1;const s=$g(r.url);"json"===e.type&&r.headers.set("Accept","application/json");const l=(n,o,l)=>{if(a)return;if(n&&"SecurityError"!==n.message&&zh(n),o&&l)return u(o);const c=Date.now();i.fetch(r).then((i=>{if(i.ok){const e=s?i.clone():null;return u(i,e,c)}return t(new Fg(i.statusText,i.status,e.url))})).catch((e=>{20!==e.code&&t(new Error(e.message))}))},u=(i,n,s)=>{("arrayBuffer"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text()).then((e=>{a||(n&&s&&Pg(r,n,s),o=!0,t(null,e,i.headers.get("Cache-Control"),i.headers.get("Expires")))})).catch((e=>t(new Error(e.message))))};return s?Lg(r,l):l(null,null),{cancel:()=>{a=!0,o||n.abort()}}}function zg(e,t){const i=new((Vh()?self:window).XMLHttpRequest);i.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(i.responseType="arraybuffer");for(const t in e.headers)i.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=()=>{t(new Error(i.statusText))},i.onload=()=>{if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){let n=i.response;if("json"===e.type)try{n=JSON.parse(i.response)}catch(e){return t(e)}t(null,n,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else t(new Fg(i.statusText,i.status,e.url))},i.send(e.body),{cancel:()=>i.abort()}}const Ug=function(e,t){const i=Vh()?self:window;if(!Ng(e.url)){if(i.fetch&&i.Request&&i.AbortController&&i.Request.prototype.hasOwnProperty("signal"))return Gg(e,t);if(Vh()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}return zg(e,t)},Vg=function(e,t){return Ug(Oh(e,{type:"arrayBuffer"}),t)},kg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Wg=kg(void 0,(function(){return Wg.toString().search("(((.+)+)+)+$").toString().constructor(Wg).search("(((.+)+)+)+$")}));Wg();const Hg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),qg=Hg(void 0,(function(){return qg.toString().search("(((.+)+)+)+$").toString().constructor(qg).search("(((.+)+)+)+$")}));qg();const jg={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"};let Xg=jg.unavailable,Yg=null;const Zg={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Xg===jg.loaded||null!=Zg.applyArabicShaping,isLoading:()=>Xg===jg.loading,setState(e){Xg=e.pluginStatus,Yg=e.pluginURL},isParsed:()=>null!=Zg.applyArabicShaping,getPluginURL:()=>Yg};var Kg,Qg=(Kg=!0,function(e,t){var i=Kg?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Kg=!1,i}),Jg=Qg(void 0,(function(){return Jg.toString().search("(((.+)+)+)+$").toString().constructor(Jg).search("(((.+)+)+)+$")}));Jg();var ex,tx=24,ix=(ex=!0,function(e,t){var i=ex?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ex=!1,i}),nx=ix(void 0,(function(){return nx.toString().search("(((.+)+)+)+$").toString().constructor(nx).search("(((.+)+)+)+$")}));nx();var rx=function(e,t){ox(this,e,1,t)};function ox(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function ax(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=ox({},{width:n,height:r},i);sx(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function sx(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}rx.prototype.resize=function(e){ax(this,e,1)},rx.prototype.clone=function(){return new rx({width:this.width,height:this.height},new Uint8Array(this.data))},rx.copy=function(e,t,i,n,r){sx(e,t,i,n,r,1)},en.register("AlphaImage",rx);var lx=function(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},ux=function(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_},cx={read:lx,write:ux};function hx(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}hx.Varint=0,hx.Fixed64=1,hx.Bytes=2,hx.Fixed32=5;var dx=4294967296,fx=1/dx;function px(e,t,i){var n,r,o=i.buf;if(n=(112&(r=o[i.pos++]))>>4,r<128||(n|=(127&(r=o[i.pos++]))<<3,r<128)||(n|=(127&(r=o[i.pos++]))<<10,r<128)||(n|=(127&(r=o[i.pos++]))<<17,r<128)||(n|=(127&(r=o[i.pos++]))<<24,r<128)||(n|=(1&(r=o[i.pos++]))<<31,r<128))return mx(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function _x(e){return e.type===hx.Bytes?e.readVarint()+e.pos:e.pos+1}function mx(e,t,i){return i?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function gx(e,t){var i,n;if(e>=0?(i=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(i=~(-e%4294967296))?i=i+1|0:(i=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),xx(i,0,t),yx(n,t)}function xx(e,t,i){i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}function yx(e,t){var i=(7&e)<<4;t.buf[t.pos++]|=i|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function vx(e,t,i){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=e;r--)i.buf[r+n]=i.buf[r]}function $x(e,t){for(var i=0;i<e.length;i++)t.writeVarint(e[i])}function bx(e,t){for(var i=0;i<e.length;i++)t.writeSVarint(e[i])}function Tx(e,t){for(var i=0;i<e.length;i++)t.writeFloat(e[i])}function Cx(e,t){for(var i=0;i<e.length;i++)t.writeDouble(e[i])}function Sx(e,t){for(var i=0;i<e.length;i++)t.writeBoolean(e[i])}function wx(e,t){for(var i=0;i<e.length;i++)t.writeFixed32(e[i])}function Ex(e,t){for(var i=0;i<e.length;i++)t.writeSFixed32(e[i])}function Px(e,t){for(var i=0;i<e.length;i++)t.writeFixed64(e[i])}function Ax(e,t){for(var i=0;i<e.length;i++)t.writeSFixed64(e[i])}function Lx(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function Mx(e,t,i){e[i]=t,e[i+1]=t>>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function Rx(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function Ox(e,t,i){for(var n="",r=t;r<i;){var o,a,s,l=e[r],u=null,c=l>239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[r+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(o=e[r+1],a=e[r+2],128==(192&o)&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(o=e[r+1],a=e[r+2],s=e[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=c}return n}function Dx(e,t,i){for(var n,r,o=0;o<t.length;o++){if((n=t.charCodeAt(o))>55295&&n<57344){if(!r){n>56319||o+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):r=n;continue}if(n<56320){e[i++]=239,e[i++]=191,e[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(e[i++]=239,e[i++]=191,e[i++]=189,r=null);n<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:(n<65536?e[i++]=n>>12|224:(e[i++]=n>>18|240,e[i++]=n>>12&63|128),e[i++]=n>>6&63|128),e[i++]=63&n|128)}return i}hx.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=7&n,e(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Lx(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Rx(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Lx(this.buf,this.pos)+Lx(this.buf,this.pos+4)*dx;return this.pos+=8,e},readSFixed64:function(){var e=Lx(this.buf,this.pos)+Rx(this.buf,this.pos+4)*dx;return this.pos+=8,e},readFloat:function(){var e=cx.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=cx.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,n=this.buf;return t=127&(i=n[this.pos++]),i<128||(t|=(127&(i=n[this.pos++]))<<7,i<128)||(t|=(127&(i=n[this.pos++]))<<14,i<128)||(t|=(127&(i=n[this.pos++]))<<21,i<128)?t:px(t|=(15&(i=n[this.pos]))<<28,e,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=Ox(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var i=_x(this);for(e=e||[];this.pos<i;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===hx.Varint)for(;this.buf[this.pos++]>127;);else if(t===hx.Bytes)this.pos=this.readVarint()+this.pos;else if(t===hx.Fixed32)this.pos+=4;else{if(t!==hx.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var i=new Uint8Array(t);i.set(this.buf),this.buf=i,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),Mx(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),Mx(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),Mx(this.buf,-1&e,this.pos),Mx(this.buf,Math.floor(e*fx),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),Mx(this.buf,-1&e,this.pos),Mx(this.buf,Math.floor(e*fx),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?gx(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=Dx(this.buf,e,this.pos);var i=this.pos-t;i>=128&&vx(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),cx.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),cx.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i<t;i++)this.buf[this.pos++]=e[i]},writeRawMessage:function(e,t){this.pos++;var i=this.pos;e(t,this);var n=this.pos-i;n>=128&&vx(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,i){this.writeTag(e,hx.Bytes),this.writeRawMessage(t,i)},writePackedVarint:function(e,t){this.writeMessage(e,$x,t)},writePackedSVarint:function(e,t){this.writeMessage(e,bx,t)},writePackedBoolean:function(e,t){this.writeMessage(e,Sx,t)},writePackedFloat:function(e,t){this.writeMessage(e,Tx,t)},writePackedDouble:function(e,t){this.writeMessage(e,Cx,t)},writePackedFixed32:function(e,t){this.writeMessage(e,wx,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,Ex,t)},writePackedFixed64:function(e,t){this.writeMessage(e,Px,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,Ax,t)},writeBytesField:function(e,t){this.writeTag(e,hx.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,hx.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,hx.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,hx.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,hx.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,hx.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,hx.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,hx.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,hx.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,hx.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};const Ix=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Fx=Ix(void 0,(function(){return Fx.toString().search("(((.+)+)+)+$").toString().constructor(Fx).search("(((.+)+)+)+$")}));Fx();const Bx=3,Nx=Bx,Gx=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),zx=Gx(void 0,(function(){return zx.toString().search("(((.+)+)+)+$").toString().constructor(zx).search("(((.+)+)+)+$")}));zx();var Ux=1;const Vx={horizontal:1,vertical:2,horizontalOnly:3},kx=-17;function Wx(e){for(const t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}const Hx=57344,qx=63743;class jx{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(e,t){const i=new jx;return i.scale=e||1,i.fontStack=t,i}static forImage(e){const t=new jx;return t.imageName=e,t}}class Xx{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(e,t){const i=new Xx;for(let n=0;n<e.sections.length;n++){const r=e.sections[n];r.image?i.addImageSection(r):i.addTextSection(r,t)}return i}length(){return this.text.length}getSection(e){return this.sections[this.sectionIndex[e]]}getSectionIndex(e){return this.sectionIndex[e]}getCharCode(e){return this.text.charCodeAt(e)}verticalizePunctuation(){this.text=lg(this.text)}trim(){let e=0;for(let t=0;t<this.text.length&&Kx[this.text.charCodeAt(t)];t++)e++;let t=this.text.length;for(let i=this.text.length-1;i>=0&&i>=e&&Kx[this.text.charCodeAt(i)];i--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){const i=new Xx;return i.text=this.text.substring(e,t),i.sectionIndex=this.sectionIndex.slice(e,t),i.sections=this.sections,i}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((e,t)=>Math.max(e,this.sections[t].scale)),0)}addTextSection(e,t){this.text+=e.text,this.sections.push(jx.forText(e.scale,e.fontStack||t));const i=this.sections.length-1;for(let t=0;t<e.text.length;++t)this.sectionIndex.push(i)}addImageSection(e){const t=e.image?e.image.name:"";if(0===t.length)return void zh("Can't add FormattedSection with an empty image.");const i=this.getNextImageSectionCharCode();i?(this.text+=String.fromCharCode(i),this.sections.push(jx.forImage(t)),this.sectionIndex.push(this.sections.length-1)):zh("Reached maximum number of images "+(qx-Hx+2))}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=qx?null:++this.imageSectionID:(this.imageSectionID=Hx,this.imageSectionID)}}function Yx(e,t){const i=[],n=e.text;let r=0;for(const n of t)i.push(e.substring(r,n)),r=n;return r<n.length&&i.push(e.substring(r,n.length)),i}function Zx(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){const m=Xx.fromFeature(e,r);let g;h===Vx.vertical&&m.verticalizePunctuation();const{processBidirectionalText:x,processStyledBidirectionalText:y}=Zg;if(x&&1===m.sections.length){g=[];const e=x(m.toString(),oy(m,u,o,t,n,f,p));for(const t of e){const e=new Xx;e.text=t,e.sections=m.sections;for(let i=0;i<t.length;i++)e.sectionIndex.push(0);g.push(e)}}else if(y){g=[];const e=y(m.text,m.sectionIndex,oy(m,u,o,t,n,f,p));for(const t of e){const e=new Xx;e.text=t[0],e.sectionIndex=t[1],e.sections=m.sections,g.push(e)}}else g=Yx(m,oy(m,u,o,t,n,f,p));const v=[],$={positionedLines:v,text:m.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:h,iconsInText:!1,verticalizable:!1};return sy($,t,i,n,g,a,s,l,h,u,d,_),!Wx(v)&&$}const Kx={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Qx={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function Jx(e,t,i,n,r,o){if(t.imageName){const e=n[t.imageName];return e?e.displaySize[0]*t.scale*tx/o+r:0}{const n=i[t.fontStack],o=n&&n[e];return o?o.metrics.advance*t.scale+r:0}}function ey(e,t,i,n,r,o){let a=0;for(let i=0;i<e.length();i++){const s=e.getSection(i);a+=Jx(e.getCharCode(i),s,n,r,t,o)}return a/Math.max(1,Math.ceil(a/i))}function ty(e,t,i,n){const r=Math.pow(e-t,2);return n?e<t?r/2:2*r:r+Math.abs(i)*i}function iy(e,t,i){let n=0;return 10===e&&(n-=1e4),i&&(n+=150),(40===e||65288===e)&&(n+=50),(41===t||65289===t)&&(n+=50),n}function ny(e,t,i,n,r,o){let a=null,s=ty(t,i,r,o);for(const e of n){const n=ty(t-e.x,i,r,o)+e.badness;n<=s&&(a=e,s=n)}return{index:e,x:t,priorBreak:a,badness:s}}function ry(e){return e?ry(e.priorBreak).concat(e.index):[]}function oy(e,t,i,n,r,o,a){if("point"!==o)return[];if(!e)return[];const s=[],l=ey(e,t,i,n,r,a),u=e.text.indexOf("​")>=0;let c=0;for(let i=0;i<e.length();i++){const o=e.getSection(i),h=e.getCharCode(i);if(Kx[h]||(c+=Jx(h,o,n,r,t,a)),i<e.length()-1){const t=Qm(h);(Qx[h]||t||o.imageName)&&s.push(ny(i+1,c,l,s,iy(h,e.getCharCode(i+1),t&&u),!1))}}return ry(ny(e.length(),c,l,s,0,!0))}function ay(e){let t=.5,i=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":i=1;break;case"top":case"top-right":case"top-left":i=0}return{horizontalAlign:t,verticalAlign:i}}function sy(e,t,i,n,r,o,a,s,l,u,c,h){let d=0,f=kx,p=0,_=0;const m="right"===s?1:"left"===s?0:.5;let g=0;for(const a of r){a.trim();const r=a.getMaxScale(),s=(r-1)*tx,x={positionedGlyphs:[],lineOffset:0};e.positionedLines[g]=x;const y=x.positionedGlyphs;let v=0;if(!a.length()){f+=o,++g;continue}for(let o=0;o<a.length();o++){const p=a.getSection(o),_=a.getSectionIndex(o),m=a.getCharCode(o);let g=0,x=null,$=null,b=null,T=tx;const C=!(l===Vx.horizontal||!c&&!Jm(m)||c&&(Kx[m]||ig(m)));if(p.imageName){const t=n[p.imageName];if(!t)continue;b=p.imageName,e.iconsInText=e.iconsInText||!0,$=t.paddedRect;const i=t.displaySize;p.scale=p.scale*tx/h,x={width:i[0],height:i[1],left:Ux,top:-Nx,advance:C?i[1]:i[0]},g=s+(tx-i[1]*p.scale),T=x.advance;const o=C?i[0]*p.scale-tx*r:i[1]*p.scale-tx*r;o>0&&o>v&&(v=o)}else{const e=i[p.fontStack],n=e&&e[m];if(n&&n.rect)$=n.rect,x=n.metrics;else{const e=t[p.fontStack],i=e&&e[m];if(!i)continue;x=i.metrics}g=(r-p.scale)*tx}C?(e.verticalizable=!0,y.push({glyph:m,imageName:b,x:d,y:f+g,vertical:C,scale:p.scale,fontStack:p.fontStack,sectionIndex:_,metrics:x,rect:$}),d+=T*p.scale+u):(y.push({glyph:m,imageName:b,x:d,y:f+g,vertical:C,scale:p.scale,fontStack:p.fontStack,sectionIndex:_,metrics:x,rect:$}),d+=x.advance*p.scale+u)}if(0!==y.length){const e=d-u;p=Math.max(e,p),ly(y,0,y.length-1,m,v)}d=0;const $=o*r+v;x.lineOffset=Math.max(v,s),f+=$,_=Math.max($,_),++g}const x=f-kx,{horizontalAlign:y,verticalAlign:v}=ay(a);uy(e.positionedLines,m,y,v,p,_,o,x,r.length),e.top+=-v*x,e.bottom=e.top+x,e.left+=-y*p,e.right=e.left+p}function ly(e,t,i,n,r){if(!n&&!r)return;const o=e[i],a=o.metrics.advance*o.scale,s=(e[i].x+a)*n;for(let n=t;n<=i;n++)e[n].x-=s,e[n].y+=r}function uy(e,t,i,n,r,o,a,s,l){const u=(t-i)*r;let c=0;c=o!==a?-s*n-kx:(-n*l+.5)*a;for(const t of e)for(const e of t.positionedGlyphs)e.x+=u,e.y+=c}function cy(e,t,i){const{horizontalAlign:n,verticalAlign:r}=ay(i),o=t[0],a=t[1],s=o-e.displaySize[0]*n,l=s+e.displaySize[0],u=a-e.displaySize[1]*r;return{image:e,top:u,bottom:u+e.displaySize[1],left:s,right:l}}function hy(e,t,i,n,r,o){const a=e.image;let s;if(a.content){const e=a.content,t=a.pixelRatio||1;s=[e[0]/t,e[1]/t,a.displaySize[0]-e[2]/t,a.displaySize[1]-e[3]/t]}const l=t.left*o,u=t.right*o;let c,h,d,f;"width"===i||"both"===i?(f=r[0]+l-n[3],h=r[0]+u+n[1]):(f=r[0]+(l+u-a.displaySize[0])/2,h=f+a.displaySize[0]);const p=t.top*o,_=t.bottom*o;return"height"===i||"both"===i?(c=r[1]+p-n[0],d=r[1]+_+n[2]):(c=r[1]+(p+_-a.displaySize[1])/2,d=c+a.displaySize[1]),{image:a,top:c,right:h,bottom:d,left:f,collisionPadding:s}}var dy,fy=(dy=!0,function(e,t){var i=dy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return dy=!1,i}),py=fy(void 0,(function(){return py.toString().search("(((.+)+)+)+$").toString().constructor(py).search("(((.+)+)+)+$")}));py();const _y=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),my=_y(void 0,(function(){return my.toString().search("(((.+)+)+)+$").toString().constructor(my).search("(((.+)+)+)+$")}));my();const gy=128;function xy(e,t){const{expression:i}=t;if("constant"===i.kind)return{kind:"constant",layoutSize:i.evaluate(new go(e+1))};if("source"===i.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:n}=i;let r=0;for(;r<t.length&&t[r]<=e;)r++;r=Math.max(0,r-1);let o=r;for(;o<t.length&&t[o]<e+1;)o++;o=Math.min(t.length-1,o);const a=t[r],s=t[o];return"composite"===i.kind?{kind:"composite",minZoom:a,maxZoom:s,interpolationType:n}:{kind:"camera",minZoom:a,maxZoom:s,minSize:i.evaluate(new go(a)),maxSize:i.evaluate(new go(s)),interpolationType:n}}}var yy=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n,r){e.call(this,t,i),this.angle=n,void 0!==r&&(this.segment=r)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.clone=function(){return new r(this.x,this.y,this.angle,this.segment)},r}(to);en.register("Anchor",yy);var vy,$y=(vy=!0,function(e,t){var i=vy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return vy=!1,i}),by=$y(void 0,(function(){return by.toString().search("(((.+)+)+)+$").toString().constructor(by).search("(((.+)+)+)+$")}));function Ty(e,t,i,n,r){if(void 0===t.segment)return!0;for(var o=t,a=t.segment+1,s=0;s>-i/2;){if(--a<0)return!1;s-=e[a].dist(o),o=e[a]}s+=e[a].dist(e[a+1]),a++;for(var l=[],u=0;s<i/2;){var c=e[a-1],h=e[a],d=e[a+1];if(!d)return!1;var f=c.angleTo(h)-h.angleTo(d);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:f}),u+=f;s-l[0].distance>n;)u-=l.shift().angleDelta;if(u>r)return!1;a++,s+=h.dist(d)}return!0}by();var Cy,Sy=(Cy=!0,function(e,t){var i=Cy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Cy=!1,i}),wy=Sy(void 0,(function(){return wy.toString().search("(((.+)+)+)+$").toString().constructor(wy).search("(((.+)+)+)+$")}));function Ey(e,t,i){return e*(1-i)+t*i}wy();var Py=function(){};function Ay(e){for(var t=0,i=0;i<e.length-1;i++)t+=e[i].dist(e[i+1]);return t}function Ly(e,t,i){return e?.6*t*i:0}function My(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function Ry(e,t,i,n,r,o,a,s,l){for(var u=o/2,c=Ay(e),h=0,d=t-i,f=[],p=0;p<e.length-1;p++){for(var _=e[p],m=e[p+1],g=_.dist(m),x=m.angleTo(_);d+i<h+g;){var y=((d+=i)-h)/g,v=Ey(_.x,m.x,y),$=Ey(_.y,m.y,y);if(v>=0&&v<l&&$>=0&&$<l&&d-u>=0&&d+u<=c){var b=new yy(v,$,x,p);b._round(),(!n||Ty(e,b,o,n,r))&&f.push(b)}}h+=g}return!s&&!f.length&&!a&&(f=Ry(e,h/2,i,n,r,o,a,!0,l)),f}Py.getCenterAnchor=function(e,t,i,n,r,o){for(var a=Ly(i,r,o),s=My(i,n)*o,l=0,u=Ay(e)/2,c=0;c<e.length-1;c++){var h=e[c],d=e[c+1],f=h.dist(d);if(l+f>u){var p=(u-l)/f,_=Ey(h.x,d.x,p),m=Ey(h.y,d.y,p),g=new yy(_,m,d.angleTo(h),c);return g._round(),!a||Ty(e,g,s,a,t)?g:void 0}l+=f}},Py.getAnchors=function(e,t,i,n,r,o,a,s,l){var u=Ly(n,o,a),c=My(n,r),h=c*a,d=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-h<t/4&&(t=h+t/4),Ry(e,d?t/2*s%t:(c/2+2*o)*a*s%t,t,u,i,h,d,!1,l)};var Oy,Dy=(Oy=!0,function(e,t){var i=Oy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Oy=!1,i}),Iy=Dy(void 0,(function(){return Iy.toString().search("(((.+)+)+)+$").toString().constructor(Iy).search("(((.+)+)+)+$")}));function Fy(e,t,i,n,r){for(var o=[],a=0;a<e.length;a++)for(var s=e[a],l=void 0,u=0;u<s.length-1;u++){var c=s[u],h=s[u+1];c.x<t&&h.x<t||(c.x<t?c=new to(t,c.y+(h.y-c.y)*((t-c.x)/(h.x-c.x)))._round():h.x<t&&(h=new to(t,c.y+(h.y-c.y)*((t-c.x)/(h.x-c.x)))._round()),c.y<i&&h.y<i||(c.y<i?c=new to(c.x+(h.x-c.x)*((i-c.y)/(h.y-c.y)),i)._round():h.y<i&&(h=new to(c.x+(h.x-c.x)*((i-c.y)/(h.y-c.y)),i)._round()),c.x>=n&&h.x>=n||(c.x>=n?c=new to(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round():h.x>=n&&(h=new to(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round()),c.y>=r&&h.y>=r||(c.y>=r?c=new to(c.x+(h.x-c.x)*((r-c.y)/(h.y-c.y)),r)._round():h.y>=r&&(h=new to(c.x+(h.x-c.x)*((r-c.y)/(h.y-c.y)),r)._round()),(!l||!c.equals(l[l.length-1]))&&(l=[c],o.push(l)),l.push(h)))))}return o}Iy();var By,Ny=(By=!0,function(e,t){var i=By?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return By=!1,i}),Gy=Ny(void 0,(function(){return Gy.toString().search("(((.+)+)+)+$").toString().constructor(Gy).search("(((.+)+)+)+$")}));Gy();var zy=1,Uy=-17,Vy=3,ky=function(){},Wy=zy;function Hy(e,t,i){for(var n=0,r=0,o=e;r<o.length;r+=1){var a=o[r];n+=Math.max(t,Math.min(i,a[1]))-Math.max(t,Math.min(i,a[0]))}return n}function qy(e,t,i){for(var n=[{fixed:-Wy,stretch:0}],r=0,o=e;r<o.length;r+=1){var a=o[r],s=a[0],l=a[1],u=n[n.length-1];n.push({fixed:s-u.stretch,stretch:u.stretch}),n.push({fixed:s-u.stretch,stretch:u.stretch+(l-s)})}return n.push({fixed:t+Wy,stretch:i}),n}function jy(e,t,i,n){return e/t*i+n}function Xy(e,t,i,n){return e-t*i/n}ky.getIconQuads=function(e,t,i,n){var r=[],o=e.image,a=o.pixelRatio,s=o.paddedRect.w-2*Wy,l=o.paddedRect.h-2*Wy,u=e.right-e.left,c=e.bottom-e.top,h=o.stretchX||[[0,s]],d=o.stretchY||[[0,l]],f=function(e,t){return e+t[1]-t[0]},p=h.reduce(f,0),_=d.reduce(f,0),m=s-p,g=l-_,x=0,y=p,v=0,$=_,b=0,T=m,C=0,S=g;if(o.content&&n){var w=o.content;x=Hy(h,0,w[0]),v=Hy(d,0,w[1]),y=Hy(h,w[0],w[2]),$=Hy(d,w[1],w[3]),b=w[0]-x,C=w[1]-v,T=w[2]-w[0]-y,S=w[3]-w[1]-$}var E=function(n,r,s,l){var h=jy(n.stretch-x,y,u,e.left),d=Xy(n.fixed-b,T,n.stretch,p),f=jy(r.stretch-v,$,c,e.top),m=Xy(r.fixed-C,S,r.stretch,_),g=jy(s.stretch-x,y,u,e.left),w=Xy(s.fixed-b,T,s.stretch,p),E=jy(l.stretch-v,$,c,e.top),P=Xy(l.fixed-C,S,l.stretch,_),A=new to(h,f),L=new to(g,f),M=new to(g,E),R=new to(h,E),O=new to(d/a,m/a),D=new to(w/a,P/a),I=t*Math.PI/180;if(I){var F=Math.sin(I),B=Math.cos(I),N=[B,-F,F,B];A._matMult(N),L._matMult(N),R._matMult(N),M._matMult(N)}var G=n.stretch+n.fixed,z=s.stretch+s.fixed,U=r.stretch+r.fixed,V=l.stretch+l.fixed;return{tl:A,tr:L,bl:R,br:M,tex:{x:o.paddedRect.x+Wy+G,y:o.paddedRect.y+Wy+U,w:z-G,h:V-U},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:O,pixelOffsetBR:D,minFontScaleX:T/a/u,minFontScaleY:S/a/c,isSDF:i}};if(n&&(o.stretchX||o.stretchY))for(var P=qy(h,m,p),A=qy(d,g,_),L=0;L<P.length-1;L++)for(var M=P[L],R=P[L+1],O=0;O<A.length-1;O++){var D=A[O],I=A[O+1];r.push(E(M,D,R,I))}else r.push(E({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:s+1},{fixed:0,stretch:l+1}));return r},ky.getGlyphQuads=function(e,t,i,n,r,o,a,s){for(var l=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=[],c=0,h=t.positionedLines;c<h.length;c+=1)for(var d=h[c],f=0,p=d.positionedGlyphs;f<p.length;f+=1){var _=p[f];if(_.rect){var m=_.rect||{},g=Vy+1,x=!0,y=1,v=0,$=(r||s)&&_.vertical,b=_.metrics.advance*_.scale/2;if(s&&t.verticalizable){var T=(_.scale-1)*tx,C=(tx-_.metrics.width*_.scale)/2;v=d.lineOffset/2-(_.imageName?-C:T)}if(_.imageName){var S=a[_.imageName];x=S.sdf,y=S.pixelRatio,g=zy/y}var w=r?[_.x+b,_.y]:[0,0],E=r?[0,0]:[_.x+b+i[0],_.y+i[1]-v],P=[0,0];$&&(P=E,E=[0,0]);var A=(_.metrics.left-g)*_.scale-b+E[0],L=(-_.metrics.top-g)*_.scale+E[1],M=A+m.w*_.scale/y,R=L+m.h*_.scale/y,O=new to(A,L),D=new to(M,L),I=new to(A,R),F=new to(M,R);if($){var B=new to(-b,b-Uy),N=-Math.PI/2,G=tx/2-b,z=_.imageName?G:0,U=new to(5-Uy-G,-z),V=new(Function.prototype.bind.apply(to,[null].concat(P)));O._rotateAround(N,B)._add(U)._add(V),D._rotateAround(N,B)._add(U)._add(V),I._rotateAround(N,B)._add(U)._add(V),F._rotateAround(N,B)._add(U)._add(V)}if(l){var k=Math.sin(l),W=Math.cos(l),H=[W,-k,k,W];O._matMult(H),D._matMult(H),I._matMult(H),F._matMult(H)}var q=new to(0,0),j=new to(0,0);u.push({tl:O,tr:D,bl:I,br:F,tex:m,writingMode:t.writingMode,glyphOffset:w,sectionIndex:_.sectionIndex,isSDF:x,pixelOffsetTL:q,pixelOffsetBR:j,minFontScaleX:0,minFontScaleY:0})}}return u};var Yy,Zy=(Yy=!0,function(e,t){var i=Yy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Yy=!1,i}),Ky=Zy(void 0,(function(){return Ky.toString().search("(((.+)+)+)+$").toString().constructor(Ky).search("(((.+)+)+)+$")}));Ky();var Qy=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=a.top*s-l,f=a.bottom*s+l,p=a.left*s-l,_=a.right*s+l,m=a.collisionPadding;if(m&&(p-=m[0]*s,d-=m[1]*s,_+=m[2]*s,f+=m[3]*s),this.boxStartIndex=e.length,u){var g=f-d,x=_-p;g>0&&(g=Math.max(10*s,g),this._addLineCollisionCircles(e,t,i,i.segment,x,g,n,r,o,c))}else{if(h){var y=new to(p,d),v=new to(_,d),$=new to(p,f),b=new to(_,f),T=h*Math.PI/180;y._rotate(T),v._rotate(T),$._rotate(T),b._rotate(T),p=Math.min(y.x,v.x,$.x,b.x),_=Math.max(y.x,v.x,$.x,b.x),d=Math.min(y.y,v.y,$.y,b.y),f=Math.max(y.y,v.y,$.y,b.y)}e.emplaceBack(i.x,i.y,p,d,_,f,n,r,o,0,0)}this.boxEndIndex=e.length};Qy.prototype._addLineCollisionCircles=function(e,t,i,n,r,o,a,s,l,u){var c=o/2,h=Math.floor(r/c)||1,d=1+.4*Math.log(u)/Math.LN2,f=Math.floor(h*d/2),p=-o/2,_=i,m=n+1,g=p,x=-r/2,y=x-r/4;do{if(--m<0){if(g>x)return;m=0;break}g-=t[m].dist(_),_=t[m]}while(g>y);for(var v=t[m].dist(t[m+1]),$=-f;$<h+f;$++){var b=$*c,T=x+b;if(b<0&&(T+=b),b>r&&(T+=b-r),!(T<g)){for(;g+v<T;){if(g+=v,1+ ++m>=t.length)return;v=t[m].dist(t[m+1])}var C=T-g,S=t[m],w=t[m+1].sub(S)._unit()._mult(C)._add(S)._round(),E=Math.abs(T-p)<c?0:.8*(T-p);e.emplaceBack(w.x,w.y,-o/2,-o/2,o/2,o/2,a,s,l,o/2,E)}}};var Jy,ev=(Jy=!0,function(e,t){var i=Jy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Jy=!1,i}),tv=ev(void 0,(function(){return tv.toString().search("(((.+)+)+)+$").toString().constructor(tv).search("(((.+)+)+)+$")}));function iv(e,t,i){void 0===t&&(t=1),void 0===i&&(i=!1);for(var n=1/0,r=1/0,o=-1/0,a=-1/0,s=e[0],l=0;l<s.length;l++){var u=s[l];(!l||u.x<n)&&(n=u.x),(!l||u.y<r)&&(r=u.y),(!l||u.x>o)&&(o=u.x),(!l||u.y>a)&&(a=u.y)}var c=o-n,h=a-r,d=Math.min(c,h),f=d/2,p=new TinyQueue([],nv);if(0===d)return new to(n,r);for(var _=n;_<o;_+=d)for(var m=r;m<a;m+=d)p.push(new rv(_+f,m+f,f,e));for(var g=av(e),x=p.length;p.length;){var y=p.pop();(y.d>g.d||!g.d)&&(g=y,i&&console.log("found best %d after %d probes",Math.round(1e4*y.d)/1e4,x)),y.max-g.d<=t||(f=y.h/2,p.push(new rv(y.p.x-f,y.p.y-f,f,e)),p.push(new rv(y.p.x+f,y.p.y-f,f,e)),p.push(new rv(y.p.x-f,y.p.y+f,f,e)),p.push(new rv(y.p.x+f,y.p.y+f,f,e)),x+=4)}return i&&(console.log("num probes: "+x),console.log("best distance: "+g.d)),g.p}function nv(e,t){return t.max-e.max}function rv(e,t,i,n){this.p=new to(e,t),this.h=i,this.d=ov(this.p,n),this.max=this.d+this.h*Math.SQRT2}function ov(e,t){for(var i=!1,n=1/0,r=0;r<t.length;r++)for(var o=t[r],a=0,s=o.length,l=s-1;a<s;l=a++){var u=o[a],c=o[l];u.y>e.y!=c.y>e.y&&e.x<(c.x-u.x)*(e.y-u.y)/(c.y-u.y)+u.x&&(i=!i),n=Math.min(n,pf.distToSegmentSquared(e,u,c))}return(i?1:-1)*Math.sqrt(n)}function av(e){for(var t=0,i=0,n=0,r=e[0],o=0,a=r.length,s=a-1;o<a;s=o++){var l=r[o],u=r[s],c=l.x*u.y-u.x*l.y;i+=(l.x+u.x)*c,n+=(l.y+u.y)*c,t+=3*c}return new rv(i/t,n/t,0,e)}tv();var sv,lv=(sv=!0,function(e,t){var i=sv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return sv=!1,i}),uv=lv(void 0,(function(){return uv.toString().search("(((.+)+)+)+$").toString().constructor(uv).search("(((.+)+)+)+$")}));function cv(e,t){var i,n,r,o,a,s,l,u;for(i=3&e.length,n=e.length-i,r=t,a=3432918353,s=461845907,u=0;u<n;)l=255&e.charCodeAt(u)|(255&e.charCodeAt(++u))<<8|(255&e.charCodeAt(++u))<<16|(255&e.charCodeAt(++u))<<24,++u,r=27492+(65535&(o=5*(65535&(r=(r^=l=(65535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,i){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:r^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return r^=e.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}uv();const hv=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),dv=hv(void 0,(function(){return dv.toString().search("(((.+)+)+)+$").toString().constructor(dv).search("(((.+)+)+)+$")}));dv();const fv=7,pv=Number.POSITIVE_INFINITY;function _v(e,t){return t[1]!==pv?function(e,t,i){let n=0,r=0;switch(t=Math.abs(t),i=Math.abs(i),e){case"top-right":case"top-left":case"top":r=i-fv;break;case"bottom-right":case"bottom-left":case"bottom":r=-i+fv}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,r]}(e,t[0],t[1]):function(e,t){let i=0,n=0;t<0&&(t=0);const r=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":n=r-fv;break;case"bottom-right":case"bottom-left":n=-r+fv;break;case"bottom":n=-t+fv;break;case"top":n=t-fv}switch(e){case"top-right":case"bottom-right":i=-r;break;case"top-left":case"bottom-left":i=r;break;case"left":i=t;break;case"right":i=-t}return[i,n]}(e,t[0])}function mv(e,t,i,n,r,o){e.createArrays();const a=512*e.overscaling;e.tilePixelRatio=$o/a,e.compareText={},e.iconsNeedLinear=!1;const s=e.layers[0].layout,l=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){const{minZoom:t,maxZoom:i}=e.textSizeData;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new go(t)),l["text-size"].possiblyEvaluate(new go(i))]}if("composite"===e.iconSizeData.kind){const{minZoom:t,maxZoom:i}=e.iconSizeData;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new go(t)),l["icon-size"].possiblyEvaluate(new go(i))]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new go(e.zoom+1)),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new go(e.zoom+1)),u.textMaxSize=l["text-size"].possiblyEvaluate(new go(18));const c=s.get("text-line-height")*tx,h="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),d=s.get("text-keep-upright"),f=s.get("text-size");for(const o of e.features){const a=s.get("text-font").evaluate(o,{}).join(","),l=f.evaluate(o,{}),p=u.layoutTextSize.evaluate(o,{}),_=u.layoutIconSize.evaluate(o,{}),m={horizontal:{},vertical:void 0},g=o.text;let x=[0,0];if(g){const n=g.toString(),u=s.get("text-letter-spacing").evaluate(o,{})*tx,f=Zm(n)?u:0,_=s.get("text-anchor").evaluate(o,{}),y=s.get("text-variable-anchor");if(!y){const e=s.get("text-radial-offset").evaluate(o,{});x=e?_v(_,[e*tx,pv]):s.get("text-offset").evaluate(o,{}).map((e=>e*tx))}let v=h?"center":s.get("text-justify").evaluate(o,{});const $=s.get("symbol-placement"),b="point"===$?s.get("text-max-width").evaluate(o,{})*tx:0,T=()=>{e.allowVerticalPlacement&&Ym(n)&&(m.vertical=Zx(g,t,i,r,a,b,c,_,"left",f,x,Vx.vertical,!0,$,p,l))};if(!h&&y){const e="auto"===v?y.map((e=>gv(e))):[v];let n=!1;for(let o=0;o<e.length;o++){const s=e[o];if(!m.horizontal[s])if(n)m.horizontal[s]=m.horizontal[0];else{const e=Zx(g,t,i,r,a,b,c,"center",s,f,x,Vx.horizontal,!1,$,p,l);e&&(m.horizontal[s]=e,n=1===e.positionedLines.length)}}T()}else{"auto"===v&&(v=gv(_));const e=Zx(g,t,i,r,a,b,c,_,v,f,x,Vx.horizontal,!1,$,p,l);e&&(m.horizontal[v]=e),T(),Ym(n)&&h&&d&&(m.vertical=Zx(g,t,i,r,a,b,c,_,v,f,x,Vx.vertical,!1,$,p,l))}}let y,v=!1;if(o.icon&&o.icon.name){const t=n[o.icon.name];t&&(y=cy(r[o.icon.name],s.get("icon-offset").evaluate(o,{}),s.get("icon-anchor").evaluate(o,{})),v=t.sdf,void 0===e.sdfIcons?e.sdfIcons=t.sdf:e.sdfIcons!==t.sdf&&zh("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(t.pixelRatio!==e.pixelRatio||0!==s.get("icon-rotate").constantOr(1))&&(e.iconsNeedLinear=!0))}const $=bv(m.horizontal)||m.vertical;e.iconsInText=!!$&&$.iconsInText,($||y)&&xv(e,o,m,y,n,u,p,_,x,v)}o&&e.generateCollisionDebugBuffers()}function gv(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function xv(e,t,i,n,r,o,a,s,l,u){let c=o.textMaxSize.evaluate(t,{});void 0===c&&(c=a);const h=e.layers[0].layout,d=h.get("icon-offset").evaluate(t,{}),f=bv(i.horizontal),p=a/24,_=e.tilePixelRatio*p,m=e.tilePixelRatio*c/24,g=e.tilePixelRatio*s,x=e.tilePixelRatio*h.get("symbol-spacing"),y=h.get("text-padding")*e.tilePixelRatio,v=h.get("icon-padding")*e.tilePixelRatio,$=h.get("text-max-angle")/180*Math.PI,b="map"===h.get("text-rotation-alignment")&&"point"!==h.get("symbol-placement"),T="map"===h.get("icon-rotation-alignment")&&"point"!==h.get("symbol-placement"),C=h.get("symbol-placement"),S=x/2,w=h.get("icon-text-fit");let E;n&&"none"!==w&&(e.allowVerticalPlacement&&i.vertical&&(E=hy(n,i.vertical,w,h.get("icon-text-fit-padding"),d,p)),f&&(n=hy(n,f,w,h.get("icon-text-fit-padding"),d,p)));const P=(a,s)=>{s.x<0||s.x>=$o||s.y<0||s.y>=$o||Tv(e,s,a,i,n,r,E,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,_,y,b,l,g,v,T,d,t,o,u)};if("line"===C)for(const r of Fy(t.geometry,0,0,$o,$o)){const t=Py.getAnchors(r,x,$,i.vertical||f,n,24,m,e.overscaling,$o);for(const i of t){const t=f;(!t||!Cv(e,t.text,S,i))&&P(r,i)}}else if("line-center"===C){for(const e of t.geometry)if(e.length>1){const t=Py.getCenterAnchor(e,$,i.vertical||f,n,24,m);t&&P(e,t)}}else if("Polygon"===t.type)for(const e of Bf(t.geometry,0)){const t=iv(e,16);P(e[0],new yy(t.x,t.y,0))}else if("LineString"===t.type)for(const e of t.geometry)P(e,new yy(e[0].x,e[0].y,0));else if("Point"===t.type)for(const e of t.geometry)for(const t of e)P([t],new yy(t.x,t.y,0))}const yv=255,vv=yv*gy;function $v(e,t,i,n,r,o,a,s,l,u,c,h,d,f){const p=ky.getGlyphQuads(t,i,s,r,o,a,n,e.allowVerticalPlacement),_=e.textSizeData;let m=null;"source"===_.kind?(m=[gy*r.layout.get("text-size").evaluate(a,{})],m[0]>vv&&zh(e.layerIds[0]+': Value for "text-size" is >= '+yv+'. Reduce your "text-size".')):"composite"===_.kind&&(m=[gy*f.compositeTextSizes[0].evaluate(a,{}),gy*f.compositeTextSizes[1].evaluate(a,{})],(m[0]>vv||m[1]>vv)&&zh(e.layerIds[0]+': Value for "text-size" is >= '+yv+'. Reduce your "text-size".')),e.addSymbols(e.text,p,m,s,o,a,u,t,l.lineStartIndex,l.lineLength,d);for(const t of c)h[t]=e.text.placedSymbolArray.length-1;return 4*p.length}function bv(e){for(const t in e)return e[t];return null}function Tv(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b){const T=e.addToLineVertexArray(t,i);let C,S,w,E,P=0,A=0,L=0,M=0,R=-1,O=-1;const D={};let I=cv(""),F=0,B=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?[F,B]=s.layout.get("text-offset").evaluate(v,{}).map((e=>e*tx)):(F=s.layout.get("text-radial-offset").evaluate(v,{})*tx,B=pv),e.allowVerticalPlacement&&n.vertical){const r=s.layout.get("text-rotate").evaluate(v,{})+90,o=n.vertical;w=new Qy(l,i,t,u,c,h,o,d,f,p,e.overscaling,r),a&&(E=new Qy(l,i,t,u,c,h,a,m,g,p,e.overscaling,r))}if(r){const n=s.layout.get("icon-rotate").evaluate(v,{}),o="none"!==s.layout.get("icon-text-fit"),d=ky.getIconQuads(r,n,b,o),f=a?ky.getIconQuads(a,n,b,o):void 0;S=new Qy(l,i,t,u,c,h,r,m,g,!1,e.overscaling,n),P=4*d.length;const p=e.iconSizeData;let _=null;"source"===p.kind?(_=[gy*s.layout.get("icon-size").evaluate(v,{})],_[0]>vv&&zh(e.layerIds[0]+': Value for "icon-size" is >= '+yv+'. Reduce your "icon-size".')):"composite"===p.kind&&(_=[gy*$.compositeIconSizes[0].evaluate(v,{}),gy*$.compositeIconSizes[1].evaluate(v,{})],(_[0]>vv||_[1]>vv)&&zh(e.layerIds[0]+': Value for "icon-size" is >= '+yv+'. Reduce your "icon-size".')),e.addSymbols(e.icon,d,_,y,x,v,!1,t,T.lineStartIndex,T.lineLength,-1),R=e.icon.placedSymbolArray.length-1,f&&(A=4*f.length,e.addSymbols(e.icon,f,_,y,x,v,Vx.vertical,t,T.lineStartIndex,T.lineLength,-1),O=e.icon.placedSymbolArray.length-1)}for(const r in n.horizontal){const a=n.horizontal[r];if(!C){I=cv(a.text);const n=s.layout.get("text-rotate").evaluate(v,{});C=new Qy(l,i,t,u,c,h,a,d,f,p,e.overscaling,n)}const m=1===a.positionedLines.length;if(L+=$v(e,t,a,o,s,p,v,_,T,n.vertical?Vx.horizontal:Vx.horizontalOnly,m?Object.keys(n.horizontal):[r],D,R,$),m)break}n.vertical&&(M+=$v(e,t,n.vertical,o,s,p,v,_,T,Vx.vertical,["vertical"],D,O,$));const N=C?C.boxStartIndex:e.collisionBoxArray.length,G=C?C.boxEndIndex:e.collisionBoxArray.length,z=w?w.boxStartIndex:e.collisionBoxArray.length,U=w?w.boxEndIndex:e.collisionBoxArray.length,V=S?S.boxStartIndex:e.collisionBoxArray.length,k=S?S.boxEndIndex:e.collisionBoxArray.length,W=E?E.boxStartIndex:e.collisionBoxArray.length,H=E?E.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=zv.MAX_GLYPHS&&zh("Too many glyphs being rendered in a tile."),e.symbolInstances.emplaceBack(t.x,t.y,D.right>=0?D.right:-1,D.center>=0?D.center:-1,D.left>=0?D.left:-1,D.vertical||-1,R,O,I,N,G,z,U,V,k,W,H,u,L,M,P,A,0,d,F,B)}function Cv(e,t,i,n){const r=e.compareText;if(t in r){const e=r[t];for(let t=e.length-1;t>=0;t--)if(n.dist(e[t])<i)return!0}else r[t]=[];return r[t].push(n),!1}var Sv,wv=(Sv=!0,function(e,t){var i=Sv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Sv=!1,i}),Ev=wv(void 0,(function(){return Ev.toString().search("(((.+)+)+)+$").toString().constructor(Ev).search("(((.+)+)+)+$")}));function Pv(e,t,i){var n=t.layout.get("text-transform").evaluate(i,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),e}function Av(e,t,i){return e.sections.forEach((function(e){e.text=Pv(e.text,t,i)})),e}Ev();var Lv,Mv=(Lv=!0,function(e,t){var i=Lv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Lv=!1,i}),Rv=Mv(void 0,(function(){return Rv.toString().search("(((.+)+)+)+$").toString().constructor(Rv).search("(((.+)+)+)+$")}));Rv();var Ov=["Unknown","Point","LineString","Polygon"],Dv=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Iv(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=s?Math.min(vv,Math.round(s[0])):0,p=s?Math.min(vv,Math.round(s[1])):0;e.emplaceBack(t,i,Math.round(32*n),Math.round(32*r),o,a,(f<<1)+(l?1:0),p,16*u,16*c,256*h,256*d)}function Fv(e,t,i){e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i)}function Bv(e){for(var t=0,i=e.sections;t<i.length;t+=1)if(rg(i[t].text))return!0;return!1}var Nv=function(e){this.layoutVertexArray=new Uo,this.indexArray=new Qo,this.programConfigurations=e,this.segments=new Ao,this.dynamicLayoutVertexArray=new Vo,this.opacityVertexArray=new ko,this.placedSymbolArray=new ua};Nv.prototype.upload=function(e,t,i,n){i&&(this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,Nm.members)),this.indexArray.length>0&&(this.indexBuffer=Tc.toIndexBuffer(e,this.indexArray,t)),this.dynamicLayoutVertexArray.length>0&&(this.dynamicLayoutVertexBuffer=Tc.toVertexBuffer(e,this.dynamicLayoutVertexArray,Gm.members,!0)),this.opacityVertexArray.length>0&&(this.opacityVertexBuffer=Tc.toVertexBuffer(e,this.opacityVertexArray,Dv,!0),this.opacityVertexBuffer.itemSize=1)),(i||n)&&this.programConfigurations.upload(e)},Nv.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.dynamicLayoutVertexBuffer&&(this.dynamicLayoutVertexBuffer.destroy(),this.dynamicLayoutVertexBuffer=null),this.opacityVertexBuffer&&(this.opacityVertexBuffer.destroy(),this.opacityVertexBuffer=null),this.programConfigurations.destroy(),this.segments.destroy()},Nv.prototype.clear=function(){},en.register("SymbolBuffers",Nv);var Gv=function(e,t,i){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new i,this.segments=new Ao,this.collisionVertexArray=new qo};Gv.prototype.upload=function(e){this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,this.layoutAttributes)),this.indexArray.length>0&&(this.indexBuffer=Tc.toIndexBuffer(e,this.indexArray)),this.collisionVertexArray.length>0&&(this.collisionVertexBuffer=Tc.toVertexBuffer(e,this.collisionVertexArray,zm.members,!0))},Gv.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.collisionVertexBuffer&&(this.collisionVertexBuffer.destroy(),this.collisionVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.segments.destroy()},en.register("CollisionBuffers",Gv);var zv=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasPaintOverrides=!1,this.hasRTLText=!1;var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=xy(this.zoom,t["text-size"]),this.iconSizeData=xy(this.zoom,t["icon-size"]);var i=this.layers[0].layout,n=i.get("symbol-sort-key"),r=i.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==r&&void 0!==n.constantOr(1);var o="viewport-y"===r||"auto"===r&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map((function(e){return Vx[e]}))),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id})),this.sourceID=e.sourceID,this.overscaling=1};zv.prototype.createArrays=function(){const e=this.layers[0].layout;this.hasPaintOverrides=Qv.hasPaintOverrides(e);var t=Nm.members;this.text=new Nv(new eh(t,this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new Nv(new eh(t,this.layers,this.zoom,(e=>/^icon/.test(e)))),this.textCollisionBox=new Gv(Ho,Um.members,Jo),this.iconCollisionBox=new Gv(Ho,Um.members,Jo),this.textCollisionCircle=new Gv(Ho,Vm.members,Qo),this.iconCollisionCircle=new Gv(Ho,Vm.members,Qo),this.glyphOffsetArray=new fa,this.lineVertexArray=new _a,this.symbolInstances=new ha},zv.prototype.calculateGlyphDependencies=function(e,t,i,n,r){for(let o=0;o<e.length;o++)if(t[e.charCodeAt(o)]=!0,(i||n)&&r){const i=sg[e.charAt(o)];i&&(t[i.charCodeAt(0)]=!0)}},zv.prototype.populate=function(e,t){var i=this.layers[0],n=i.layout,r=n.get("text-font"),o=n.get("text-field"),a=n.get("icon-image"),s=("constant"!==o.value.kind||o.value.value instanceof ie&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&("constant"!==r.value.kind||r.value.value.length>0),l=("constant"!==a.value.kind||!!a.value.value)&&Object.keys(a.parameters).length>0,u=n.get("symbol-sort-key");if(this.features=[],s||l){for(var c=t.iconDependencies,h=t.glyphDependencies,d=t.availableImages,f=new go(this.zoom),p=0,_=e;p<_.length;p+=1){var m=_[p],g=m.feature,x=m.index,y=m.sourceLayerIndex;if(i._featureFilter(f,g)){var v=void 0;if(s){var $=i.getValueAndResolveTokens("text-field",g,d),b=ie.factory($);Bv(b)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===getRTLTextPluginStatus()||this.hasRTLText&&plugin.isParsed())&&(v=Av(b,i,g))}var T=void 0;if(l){var C=i.getValueAndResolveTokens("icon-image",g,d);T=C instanceof ae?C:ae.fromString(C)}if(v||T){var S=this.sortFeaturesByKey?u.evaluate(g,{}):void 0,w={text:v,icon:T,index:x,sourceLayerIndex:y,geometry:So(g),properties:g.properties,type:Ov[g.type],sortKey:S};if(void 0!==g.id&&(w.id=g.id),this.features.push(w),T&&(c[T.name]=!0),v){var E=r.evaluate(g,{}).join(","),P="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(Vx.vertical)>=0;for(var A=0,L=v.sections;A<L.length;A+=1){var M=L[A];if(M.image)c[M.image.name]=!0;else{var R=Ym(v.toString()),O=M.fontStack||E,D=h[O]=h[O]||{};this.calculateGlyphDependencies(M.text,D,P,this.allowVerticalPlacement,R)}}}}}}if("point"===n.get("symbol-placement"))for(p=0,_=this.features;p<_.length;p+=1){var I=_[p],F=I.geometry,B=I.index,N=I.sourceLayerIndex,G=e[B].feature;t.featureIndex.insert(G,F,B,N,this.index)}"line"===n.get("symbol-placement")&&(this.features=_g(this.features)),this.sortFeaturesByKey&&this.features.sort((function(e,t){return e.sortKey-t.sortKey}))}},zv.prototype.update=function(e,t,i){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,i),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,i))},zv.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},zv.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},zv.prototype.upload=function(e){this.text&&(!this.uploaded&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e),this.textCollisionCircle.upload(e),this.iconCollisionCircle.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0)},zv.prototype.destroy=function(){this.text&&(this.text.destroy(),this.icon.destroy(),this.textCollisionBox.destroy(),this.iconCollisionBox.destroy(),this.textCollisionCircle.destroy(),this.iconCollisionCircle.destroy())},zv.prototype.clear=function(){},zv.prototype.addToLineVertexArray=function(e,t){var i=this.lineVertexArray.length;if(void 0!==e.segment){for(var n=e.dist(t[e.segment+1]),r=e.dist(t[e.segment]),o={},a=e.segment+1;a<t.length;a++)o[a]={x:t[a].x,y:t[a].y,tileUnitDistanceFromAnchor:n},a<t.length-1&&(n+=t[a+1].dist(t[a]));for(var s=e.segment||0;s>=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:r},s>0&&(r+=t[s-1].dist(t[s]));for(var l=0;l<t.length;l++){var u=o[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:i,lineLength:this.lineVertexArray.length-i}},zv.prototype.addSymbols=function(e,t,i,n,r,o,a,s,l,u,c){var h=this,d=e.indexArray,f=e.layoutVertexArray,p=e.dynamicLayoutVertexArray,_=e.segments.prepareSegment(4*t.length,e.layoutVertexArray,e.indexArray,o.sortKey),m=this.glyphOffsetArray.length,g=_.vertexLength,x=this.allowVerticalPlacement&&a===Vx.vertical?Math.PI/2:0,y=function(e){var t=e.tl,n=e.tr,r=e.bl,o=e.br,a=e.tex,l=e.pixelOffsetTL,u=e.pixelOffsetBR,c=e.minFontScaleX,m=e.minFontScaleY,g=_.vertexLength,y=e.glyphOffset[1];Iv(f,s.x,s.y,t.x,y+t.y,a.x,a.y+a.h,i,e.isSDF,l.x,l.y,c,m),Iv(f,s.x,s.y,n.x,y+n.y,a.x+a.w,a.y+a.h,i,e.isSDF,u.x,l.y,c,m),Iv(f,s.x,s.y,r.x,y+r.y,a.x,a.y,i,e.isSDF,l.x,u.y,c,m),Iv(f,s.x,s.y,o.x,y+o.y,a.x+a.w,a.y,i,e.isSDF,u.x,u.y,c,m),Fv(p,s,x),d.emplaceBack(g,g+1,g+2),d.emplaceBack(g+1,g+2,g+3),_.vertexLength+=4,_.primitiveLength+=2,h.glyphOffsetArray.emplaceBack(e.glyphOffset[0])};if(o.text&&o.text.sections){var v=o.text.sections;if(this.hasPaintOverrides){for(var $,b=function(t,i){void 0!==$&&($!==t||i)&&e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},v[$]),$=t},T=0,C=t;T<C.length;T+=1){var S=C[T];b(S.sectionIndex,!1),y(S)}b($,!0)}else{for(var w=0,E=t;w<E.length;w+=1)y(E[w]);e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},v[0])}}else{for(var P=0,A=t;P<A.length;P+=1)y(A[P]);e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{})}e.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,g,l,u,s.segment,i?i[0]:0,i?i[1]:0,n[0],n[1],a,0,!1,0,c)},zv.prototype._addCollisionDebugVertex=function(e,t,i,n,r,o){return t.emplaceBack(0,0),e.emplaceBack(i.x,i.y,n,r,Math.round(o.x),Math.round(o.y))},zv.prototype.addCollisionDebugVertices=function(e,t,i,n,r,o,a,s){var l=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),u=l.vertexLength,c=r.layoutVertexArray,h=r.collisionVertexArray,d=a.anchorX,f=a.anchorY;if(this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,n)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,n)),l.vertexLength+=4,s){var p=r.indexArray;p.emplaceBack(u,u+1,u+2),p.emplaceBack(u,u+2,u+3),l.primitiveLength+=2}else{var _=r.indexArray;_.emplaceBack(u,u+1),_.emplaceBack(u+1,u+2),_.emplaceBack(u+2,u+3),_.emplaceBack(u+3,u),l.primitiveLength+=4}},zv.prototype.addDebugCollisionBoxes=function(e,t,i,n){for(var r=e;r<t;r++){var o=this.collisionBoxArray.get(r),a=o.x1,s=o.y1,l=o.x2,u=o.y2,c=o.radius>0;this.addCollisionDebugVertices(a,s,l,u,c?n?this.textCollisionCircle:this.iconCollisionCircle:n?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,i,c)}},zv.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e<this.symbolInstances.length;e++){var t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}},zv.prototype._deserializeCollisionBoxesForSymbol=function(e,t,i,n,r,o,a,s,l){for(var u={},c=t;c<i;c++){var h=e.get(c);if(0===h.radius){u.textBox={x1:h.x1,y1:h.y1,x2:h.x2,y2:h.y2,anchorPointX:h.anchorPointX,anchorPointY:h.anchorPointY},u.textFeatureIndex=h.featureIndex;break}!u.textCircles&&(u.textCircles=[],u.textFeatureIndex=h.featureIndex),u.textCircles.push(h.anchorPointX,h.anchorPointY,h.radius,h.signedDistanceFromAnchor,1)}for(var d=n;d<r;d++){var f=e.get(d);if(0===f.radius){u.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalTextFeatureIndex=f.featureIndex;break}}for(var p=o;p<a;p++){var _=e.get(p);if(0===_.radius){u.iconBox={x1:_.x1,y1:_.y1,x2:_.x2,y2:_.y2,anchorPointX:_.anchorPointX,anchorPointY:_.anchorPointY},u.iconFeatureIndex=_.featureIndex;break}}for(var m=s;m<l;m++){var g=e.get(m);if(0===g.radius){u.verticalIconBox={x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,anchorPointX:g.anchorPointX,anchorPointY:g.anchorPointY},u.verticalIconFeatureIndex=g.featureIndex;break}}return u},zv.prototype.deserializeCollisionBoxes=function(e){this.collisionArrays=[];for(var t=0;t<this.symbolInstances.length;t++){var i=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,i.textBoxStartIndex,i.textBoxEndIndex,i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i.iconBoxStartIndex,i.iconBoxEndIndex,i.verticalIconBoxStartIndex,i.verticalIconBoxEndIndex))}},zv.prototype.hasTextData=function(){return this.text.segments.get().length>0},zv.prototype.hasIconData=function(){return this.icon.segments.get().length>0},zv.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},zv.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},zv.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},zv.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},zv.prototype.addIndicesForPlacedSymbol=function(e,t){for(var i=e.placedSymbolArray.get(t),n=i.vertexStartIndex+4*i.numGlyphs,r=i.vertexStartIndex;r<n;r+=4)e.indexArray.emplaceBack(r,r+1,r+2),e.indexArray.emplaceBack(r+1,r+2,r+3)},zv.prototype.getSortedSymbolIndexes=function(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var t=Math.sin(e),i=Math.cos(e),n=[],r=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);n.push(0|Math.round(t*s.anchorX+i*s.anchorY)),r.push(s.featureIndex)}return o.sort((function(e,t){return n[e]-n[t]||r[t]-r[e]})),o},zv.prototype.sortFeatures=function(e){var t=this;if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var i=0,n=this.symbolInstanceIndexes;i<n.length;i+=1){var r=n[i],o=this.symbolInstances.get(r);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(e,i,n){e>=0&&n.indexOf(e)===i&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},en.register("SymbolBucket",zv,{omit:["layers","collisionBoxArray","compareText"]}),zv.MAX_GLYPHS=65535,zv.addDynamicAttributes=Fv;var Uv,Vv=(Uv=!0,function(e,t){var i=Uv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Uv=!1,i}),kv=Vv(void 0,(function(){return kv.toString().search("(((.+)+)+)+$").toString().constructor(kv).search("(((.+)+)+)+$")}));function Wv(e,t){return t.replace(/{([^{}]+)}/g,((t,i)=>i in e?String(e[i]):""))}kv();var Hv,qv={kind:"color"},jv={kind:"formatted"},Xv=new Qh({"symbol-placement":new mh(hf.layout_symbol["symbol-placement"]),"symbol-spacing":new mh(hf.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new mh(hf.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new vh(hf.layout_symbol["symbol-sort-key"]),"symbol-z-order":new mh(hf.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new mh(hf.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new mh(hf.layout_symbol["icon-ignore-placement"]),"icon-optional":new mh(hf.layout_symbol["icon-optional"]),"icon-rotation-alignment":new mh(hf.layout_symbol["icon-rotation-alignment"]),"icon-size":new vh(hf.layout_symbol["icon-size"]),"icon-text-fit":new mh(hf.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new mh(hf.layout_symbol["icon-text-fit-padding"]),"icon-image":new vh(hf.layout_symbol["icon-image"]),"icon-rotate":new vh(hf.layout_symbol["icon-rotate"]),"icon-padding":new mh(hf.layout_symbol["icon-padding"]),"icon-keep-upright":new mh(hf.layout_symbol["icon-keep-upright"]),"icon-offset":new vh(hf.layout_symbol["icon-offset"]),"icon-anchor":new vh(hf.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new mh(hf.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new mh(hf.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new mh(hf.layout_symbol["text-rotation-alignment"]),"text-field":new vh(hf.layout_symbol["text-field"]),"text-font":new vh(hf.layout_symbol["text-font"]),"text-size":new vh(hf.layout_symbol["text-size"]),"text-max-width":new vh(hf.layout_symbol["text-max-width"]),"text-line-height":new mh(hf.layout_symbol["text-line-height"]),"text-letter-spacing":new vh(hf.layout_symbol["text-letter-spacing"]),"text-justify":new vh(hf.layout_symbol["text-justify"]),"text-radial-offset":new vh(hf.layout_symbol["text-radial-offset"]),"text-variable-anchor":new mh(hf.layout_symbol["text-variable-anchor"]),"text-anchor":new vh(hf.layout_symbol["text-anchor"]),"text-max-angle":new mh(hf.layout_symbol["text-max-angle"]),"text-writing-mode":new mh(hf.layout_symbol["text-writing-mode"]),"text-rotate":new vh(hf.layout_symbol["text-rotate"]),"text-padding":new mh(hf.layout_symbol["text-padding"]),"text-keep-upright":new mh(hf.layout_symbol["text-keep-upright"]),"text-transform":new vh(hf.layout_symbol["text-transform"]),"text-offset":new vh(hf.layout_symbol["text-offset"]),"text-allow-overlap":new mh(hf.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new mh(hf.layout_symbol["text-ignore-placement"]),"text-optional":new mh(hf.layout_symbol["text-optional"])}),Yv=new Qh({"icon-opacity":new vh(hf.paint_symbol["icon-opacity"]),"icon-color":new vh(hf.paint_symbol["icon-color"]),"icon-halo-color":new vh(hf.paint_symbol["icon-halo-color"]),"icon-halo-width":new vh(hf.paint_symbol["icon-halo-width"]),"icon-halo-blur":new vh(hf.paint_symbol["icon-halo-blur"]),"icon-translate":new mh(hf.paint_symbol["icon-translate"]),"icon-translate-anchor":new mh(hf.paint_symbol["icon-translate-anchor"]),"text-opacity":new vh(hf.paint_symbol["text-opacity"]),"text-color":new vh(hf.paint_symbol["text-color"],{runtimeType:qv,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new vh(hf.paint_symbol["text-halo-color"]),"text-halo-width":new vh(hf.paint_symbol["text-halo-width"]),"text-halo-blur":new vh(hf.paint_symbol["text-halo-blur"]),"text-show-background":new vh(hf.paint_symbol["text-show-background"]),"text-translate":new mh(hf.paint_symbol["text-translate"]),"text-translate-anchor":new mh(hf.paint_symbol["text-translate-anchor"])}),Zv={paint:Yv,layout:Xv},Kv=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Zv)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){if(e.prototype.recalculate.call(this,t,i),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"line"==this.layout.get("symbol-placement")&&"viewport"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="map"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var r=[],o=0,a=n;o<a.length;o+=1){var s=a[o];r.indexOf(s)<0&&r.push(s)}this.layout._values["text-writing-mode"]=r}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},r.prototype.getValueAndResolveTokens=function(e,t,i){var n=this.layout.get(e).evaluate(t,{},i),r=this._unevaluatedLayout._values[e];return r.isDataDriven()||ar.isExpression(r.value)||!n?n:Wv(t.properties,n)},r.prototype.createBucket=function(e){return new zv(e)},r.prototype.queryRadius=function(){return 0},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){return pf.polygonIntersectPoint(e,n[0][0])},r.prototype._setPaintOverrides=function(){for(var e=0,t=Zv.paint.overridableProperties;e<t.length;e+=1){var i=t[e];if(r.hasPaintOverride(this.layout,i)){var n=this.paint.get(i);new FormatSectionOverride(n),"constant"===n.value.kind||n.value.kind,this.paint._values[i]=new PossiblyEvaluatedPropertyValue(n.property,null,n.parameters)}}},r.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!(!this.layout||t.isDataDriven()||i.isDataDriven())&&r.hasPaintOverride(this.layout,e)},r.hasPaintOverride=function(e,t){var i=e.get("text-field"),n=Zv.paint.properties[t],r=!1,o=function(e){for(var t=0,i=e;t<i.length;t+=1){var o=i[t];if(n.overrides&&n.overrides.hasOverride(o))return void(r=!0)}};if("constant"===i.value.kind&&i.value.value instanceof ie)o(i.value.value.sections);else if("source"===i.value.kind){var a=function(e){if(!r)if(e instanceof bi&&$e.typeOf(e.value)===jv){var t=e.value;o(t.sections)}else e instanceof Ut?o(e.sections):e.eachChild(a)},s=i.value;s._styleExpression&&a(s._styleExpression.expression)}return r},r.hasPaintOverrides=function(e){for(var t=0,i=Zv.paint.overridableProperties;t<i.length;t+=1){var n=i[t];if(r.hasPaintOverride(e,n))return!0}return!1},r}(bd),Qv=Kv,Jv=(Hv=!0,function(e,t){var i=Hv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Hv=!1,i}),e$=Jv(void 0,(function(){return e$.toString().search("(((.+)+)+)+$").toString().constructor(e$).search("(((.+)+)+)+$")}));e$();var t$={circle:Cf,fill:lm,line:Im,symbol:Qv};function i$(e){return t$[e.type]?new t$[e.type](e):null}var n$,r$=(n$=!0,function(e,t){var i=n$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n$=!1,i}),o$=r$(void 0,(function(){return o$.toString().search("(((.+)+)+)+$").toString().constructor(o$).search("(((.+)+)+)+$")}));o$();var a$=function(e){this.keyCache={},e&&this.replace(e)};function s$(e){var t=[];for(var i in e)t.push(e[i]);return t}a$.prototype.replace=function(e){this._layerConfigs={},this._layers={},this.update(e,[])},a$.prototype.update=function(e,t){for(var i=this,n=0,r=e;n<r.length;n+=1){var o=r[n];this._layerConfigs[o.id]=o;var a=i$(o);null!=a&&(this._layers[o.id]=a,a._featureFilter=Fr.createFilter(a.filter),this.keyCache[o.id]&&delete this.keyCache[o.id])}for(var s=0,l=t;s<l.length;s+=1){var u=l[s];delete this.keyCache[u],delete this._layerConfigs[u],delete this._layers[u]}this.familiesBySource={};for(var c=0,h=Kr(s$(this._layerConfigs),this.keyCache);c<h.length;c+=1){var d=h[c].map((function(e){return i._layers[e.id]})),f=d[0];if(null!=f&&"none"!==f.visibility){var p=f.source||"",_=this.familiesBySource[p];!_&&(_=this.familiesBySource[p]={});var m=f.sourceLayer,g=_[m];!g&&(g=_[m]=[]),g.push(d)}}};var l$,u$=(l$=!0,function(e,t){var i=l$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return l$=!1,i}),c$=u$(void 0,(function(){return c$.toString().search("(((.+)+)+)+$").toString().constructor(c$).search("(((.+)+)+)+$")}));function h$(e,t,i,n,r){this.properties={},this.extent=i,this.type=0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=r,e.readFields(d$,this,t)}function d$(e,t,i){1==e?t.id=i.readVarint():2==e?f$(i,t):3==e?t.type=i.readVarint():4==e&&(t._geometry=i.pos)}function f$(e,t){for(var i=e.readVarint()+e.pos;e.pos<i;){var n=t._keys[e.readVarint()],r=t._values[e.readVarint()];t.properties[n]=r}}function p$(e){var t=e.length;if(t<=1)return[e];for(var i,n,r=[],o=0;o<t;o++){var a=_$(e[o]);0!==a&&(void 0===n&&(n=a<0),n===a<0?(i&&r.push(i),i=[e[o]]):i.push(e[o]))}return i&&r.push(i),r}function _$(e){for(var t,i,n=0,r=0,o=e.length,a=o-1;r<o;a=r++)t=e[r],n+=((i=e[a]).x-t.x)*(t.y+i.y);return n}c$(),h$.types=["Unknown","Point","LineString","Polygon"],h$.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,i=e.readVarint()+e.pos,n=1,r=0,o=0,a=0,s=[];e.pos<i;){if(r<=0){var l=e.readVarint();n=7&l,r=l>>3}r--,1===n||2===n?(o+=e.readSVarint(),a+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new to(o,a))):7===n?t&&t.push(t[0].clone()):console.log("VectorTileFeature loadGeometry unknown command "+n)}return t&&s.push(t),s},h$.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,n=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos<t;){if(n<=0){var c=e.readVarint();i=7&c,n=c>>3}if(n--,1===i||2===i)(r+=e.readSVarint())<a&&(a=r),r>s&&(s=r),(o+=e.readSVarint())<l&&(l=o),o>u&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},h$.prototype.toGeoJSON=function(e,t,i){var n,r,o=this.extent*Math.pow(2,i),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=h$.types[this.type];function c(e){for(var t=0;t<e.length;t++){var i=e[t],n=180-360*(i.y+s)/o;e[t]=[360*(i.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(n=0;n<l.length;n++)h[n]=l[n][0];c(l=h);break;case 2:for(n=0;n<l.length;n++)c(l[n]);break;case 3:for(l=p$(l),n=0;n<l.length;n++)for(r=0;r<l[n].length;r++)c(l[n][r])}1===l.length?l=l[0]:u="Multi"+u;var d={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(d.id=this.id),d};var m$,g$=(m$=!0,function(e,t){var i=m$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return m$=!1,i}),x$=g$(void 0,(function(){return x$.toString().search("(((.+)+)+)+$").toString().constructor(x$).search("(((.+)+)+)+$")}));function y$(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(v$,this,t),this.length=this._features.length}function v$(e,t,i){15===e?t.version=i.readVarint():1===e?t.name=i.readString():5===e?t.extent=i.readVarint():2===e?t._features.push(i.pos):3===e?t._keys.push(i.readString()):4===e&&t._values.push($$(i))}function $$(e){for(var t=null,i=e.readVarint()+e.pos;e.pos<i;){var n=e.readVarint()>>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}x$(),y$.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new h$(this._pbf,t,this.extent,this._keys,this._values)};var b$,T$=(b$=!0,function(e,t){var i=b$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return b$=!1,i}),C$=T$(void 0,(function(){return C$.toString().search("(((.+)+)+)+$").toString().constructor(C$).search("(((.+)+)+)+$")}));function S$(e,t){this.layers=e.readFields(w$,{},t)}function w$(e,t,i){if(3===e){var n=new y$(i,i.readVarint()+i.pos);n.length&&(t[n.name]=n)}}C$();var E$,P$=(E$=!0,function(e,t){var i=E$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return E$=!1,i}),A$=P$(void 0,(function(){return A$.toString().search("(((.+)+)+)+$").toString().constructor(A$).search("(((.+)+)+)+$")}));function L$(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t<e.length;t++){var i=e[t];this._stringToNumber[i]=t,this._numberToString[t]=i}}A$(),L$.prototype.encode=function(e){return this._stringToNumber[e]},L$.prototype.decode=function(e){return this._numberToString[e]};var M$,R$=(M$=!0,function(e,t){var i=M$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return M$=!1,i}),O$=R$(void 0,(function(){return O$.toString().search("(((.+)+)+)+$").toString().constructor(O$).search("(((.+)+)+)+$")}));O$();var D$=3;function I$(e,t,i){var n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var r=new Int32Array(this.arrayBuffer);e=r[0],t=r[1],i=r[2],this.d=t+2*i;for(var o=0;o<this.d*this.d;o++){var a=r[D$+o],s=r[D$+o+1];n.push(a===s?null:r.subarray(a,s))}var l=r[D$+n.length],u=r[D$+n.length+1];this.keys=r.subarray(l,u),this.bboxes=r.subarray(u),this.insert=this._insertReadonly}else{this.d=t+2*i;for(var c=0;c<this.d*this.d;c++)n.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=i,this.scale=t/e,this.uid=0;var h=i/t*e;this.min=-h,this.max=e+h}I$.prototype.insert=function(e,t,i,n,r){this._forEachCell(t,i,n,r,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)},I$.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},I$.prototype._insertCell=function(e,t,i,n,r,o){this.cells[r].push(o)},I$.prototype.query=function(e,t,i,n,r){var o=this.min,a=this.max;if(e<=o&&t<=o&&a<=i&&a<=n&&!r)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(e,t,i,n,this._queryCell,s,{},r),s},I$.prototype._queryCell=function(e,t,i,n,r,o,a,s){var l=this.cells[r];if(null!==l)for(var u=this.keys,c=this.bboxes,h=0;h<l.length;h++){var d=l[h];if(void 0===a[d]){var f=4*d;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):e<=c[f+2]&&t<=c[f+3]&&i>=c[f+0]&&n>=c[f+1])?(a[d]=!0,o.push(u[d])):a[d]=!1}}},I$.prototype._forEachCell=function(e,t,i,n,r,o,a,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(i),h=this._convertToCellCoord(n),d=l;d<=c;d++)for(var f=u;f<=h;f++){var p=this.d*f+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(f),this._convertFromCellCoord(d+1),this._convertFromCellCoord(f+1)))&&r.call(this,e,t,i,n,p,o,a,s))return}},I$.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},I$.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},I$.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=D$+this.cells.length+1+1,i=0,n=0;n<this.cells.length;n++)i+=this.cells[n].length;var r=new Int32Array(t+i+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;for(var o=t,a=0;a<e.length;a++){var s=e[a];r[D$+a]=o,r.set(s,o),o+=s.length}return r[D$+e.length]=o,r.set(this.keys,o),o+=this.keys.length,r[D$+e.length+1]=o,r.set(this.bboxes,o),o+=this.bboxes.length,r.buffer},en.register("GridIndex",I$,{omit:["layers","patternFeatures"]});var F$,B$=(F$=!0,function(e,t){var i=F$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return F$=!1,i}),N$=B$(void 0,(function(){return N$.toString().search("(((.+)+)+)+$").toString().constructor(N$).search("(((.+)+)+)+$")}));N$();var G$=function(e,t,i){this.x=e.x,this.y=e.y,this.z=e.z,this.grid=t||new I$($o,16,0),this.featureIndexArray=i||new ga};function z$(e){for(var t=1/0,i=1/0,n=-1/0,r=-1/0,o=0,a=e;o<a.length;o+=1){var s=a[o];t=Math.min(t,s.x),i=Math.min(i,s.y),n=Math.max(n,s.x),r=Math.max(r,s.y)}return{minX:t,minY:i,maxX:n,maxY:r}}function U$(e,t){return t-e}function V$(e,t,i){if(wa(i)&&i.realtime&&wa(i.zoom)){var n=i.zoom-e,r=$o/(t*Math.pow(2,n));return r*=t/512}return $o/t}G$.prototype.insert=function(e,t,i,n,r,o,a){var s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(i,n,r);var l=this.grid;a=a||0;for(var u=0;u<t.length;u++){for(var c=t[u],h=[1/0,1/0,-1/0,-1/0],d=0;d<c.length;d++){var f=c[d];h[0]=Math.min(h[0],f.x),h[1]=Math.min(h[1],f.y),h[2]=Math.max(h[2],f.x),h[3]=Math.max(h[3],f.y)}h[0]<$o&&h[1]<$o&&h[2]>=0&&h[3]>=0&&l.insert(s,h[0]-a,h[1]-a,h[2]+a,h[3]+a)}},G$.prototype.loadVTLayers=function(){return!this.vtLayers&&(this.vtLayers=new S$(new hx(this.rawTileData)).layers,this.sourceLayerCoder=new L$(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},G$.prototype.query=function(e,t,i){var n=this;this.loadVTLayers();var r=e.params||{},o=V$(this.z,e.tileSize,r),a=Fr.createFilter(r.filter),s=e.queryGeometry,l=5,u=z$(s),c=[];wa(r.selectTolerance)&&(l+=o*r.selectTolerance),(c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l)).sort(U$);for(var h,d={},f=function(i){var l=c[i];if(l!==h){h=l;var u=n.featureIndexArray.get(l),f=null;n.loadMatchingFeature(d,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,a,r.layers,t,(function(t,i){return!f&&(f=So(t)),i.queryIntersectsFeature(s,t,{},f,n.z,e.transform,o,e.pixelPosMatrix,e.adjustScale)}))}},p=0;p<c.length;p++)f(p);return d},G$.prototype.loadMatchingFeature=function(e,t,i,n,r,o,a,s){if(wa(t)&&wa(i)&&wa(n)){var l=this.bucketLayerIDs[t];if(!o||Nh(o,l)){var u=this.sourceLayerCoder.decode(i),c=this.vtLayers[u].feature(n);if(r(new go(this.z),c))for(var h=0;h<l.length;h++){var d=l[h];if(!(o&&o.indexOf(d)<0)){var f=a[d];if(f){var p=!s||s(c,f);if(p){c.layer=f.serialize();var _=e[d];void 0===_&&(_=e[d]=[]),_.push({featureIndex:n,feature:c,intersectionZ:p})}}}}}}},G$.prototype.lookupSymbolFeatures=function(e,t,i,n,r,o){var a={};this.loadVTLayers();for(var s=createFilter(n),l=0,u=e;l<u.length;l+=1){var c=u[l];this.loadMatchingFeature(a,t,i,c,s,r,o)}return a},G$.prototype.hasLayer=function(e){for(var t=0,i=this.bucketLayerIDs;t<i.length;t+=1)for(var n=0,r=i[t];n<r.length;n+=1)if(e===r[n])return!0;return!1},en.register("FeatureIndex",G$,{omit:["rawTileData","sourceLayerCoder","vtLayers"]});var k$,W$=(k$=!0,function(e,t){var i=k$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return k$=!1,i}),H$=W$(void 0,(function(){return H$.toString().search("(((.+)+)+)+$").toString().constructor(H$).search("(((.+)+)+)+$")}));H$();var q$=1,j$=function(e){var t={},i=[];for(var n in e){var r=e[n],o=t[n]={};for(var a in r){var s=r[+a];if(s&&0!==s.bitmap.width&&0!==s.bitmap.height){var l={x:0,y:0,w:s.bitmap.width+2*q$,h:s.bitmap.height+2*q$};i.push(l),o[a]={rect:l,metrics:s.metrics}}}}var u=f(i),c=u.w,h=u.h,d=new rx({width:c||1,height:h||1});for(var p in e){var _=e[p];for(var m in _){var g=_[+m];if(g&&0!==g.bitmap.width&&0!==g.bitmap.height){var x=t[p][m].rect;rx.copy(g.bitmap,d,{x:0,y:0},{x:x.x+q$,y:x.y+q$},g.bitmap)}}}this.image=d,this.positions=t};en.register("GlyphAtlas",j$);var X$,Y$=(X$=!0,function(e,t){var i=X$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return X$=!1,i}),Z$=Y$(void 0,(function(){return Z$.toString().search("(((.+)+)+)+$").toString().constructor(Z$).search("(((.+)+)+)+$")}));function K$(e){this.uid=e.uid,this.source=e.source,this.showCollisionBoxes=!1,this.zoom=e.tileID.z}function Q$(e,t,i){for(var n=new go(t),r=0,o=e;r<o.length;r+=1)o[r].recalculate(n,i)}Z$(),en.register("FeatureIndex",G$,{omit:["rawTileData","sourceLayerCoder"]}),K$.prototype.parse=function(e,t,i,n,r,o){try{this.status="parsing",this.data=t,this.collisionBoxArray=new sa,this.tileID=e.tileID;var a=e.featureIndex;!wa(a)&&((a=new G$(e.tileID)).bucketLayerIDs=[]);var s={},l=new L$(Object.keys(t.layers).sort()),u={},c={featureIndex:a,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:n};for(var h in i.familiesBySource){var d=i.familiesBySource[h];for(var f in d){var p=t.layers[f];if(p){for(var _=l.encode(f),m=[],g=0;g<p.length;g++){var y=p.feature(g);m.push({feature:y,index:g,sourceLayerIndex:_,sourceLayerId:f})}for(var v=0,$=d[f];v<$.length;v+=1){var b=$[v],T=b[0];if(!(T.minzoom&&this.zoom<Math.floor(T.minzoom)||T.maxzoom&&this.zoom>=T.maxzoom||"none"===T.visibility)){Q$(b,0,n);var C=T.id,S=u[C]=T.createBucket({index:a.bucketLayerIDs.length,layers:b,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_,webgpu:e.webgpu});wa(e.indexData)&&wa(e.indexData[T.id])&&(c.indexData=e.indexData[T.id]),S.populate(m,c),a.bucketLayerIDs.push(b.map((function(e){return e.id})))}}}}}let E,P,A,L;const M=Ih(c.glyphDependencies,(e=>Object.keys(e).map(Number)));Object.keys(M).length?r.send("getGlyphs",{uid:0,stacks:M},((e,t)=>{!E&&(E=e,P=t,w.call(this))})):P={};const R=Object.keys(c.iconDependencies);R.length?r.send("getImages",{icons:R,source:this.source,tileID:this.tileID,type:"icons"},((e,t)=>{!E&&(E=e,A=t,w.call(this))})):A={};const O=Object.keys(c.patternDependencies);function w(){if(E)return o(E);if(P&&A&&L){const n=new j$(P),r=new x(A,L);for(var t in u){var i=u[t];i instanceof zv?(i.layers[0].layout,mv(i,P,n.positions,A,r.iconPositions,this.showCollisionBoxes)):i.hasPattern&&(i instanceof $m||i instanceof im)&&i.addFeatures(c,r.patternPositions)}s.buckets=u,s.imageAtlas=r,s.glyphAtlasImage=n.image,s.featureIndex=a,s.pickId=e.pickId,this.status="done",o(null,s)}}O.length?r.send("getImages",{icons:O,source:this.source,tileID:this.tileID,type:"patterns"},((e,t)=>{!E&&(E=e,L=t,w.call(this))})):L={},w.call(this)}catch(D){console.log(D)}};const J$=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),eb=J$(void 0,(function(){return eb.toString().search("(((.+)+)+)+$").toString().constructor(eb).search("(((.+)+)+)+$")}));function tb(e,t){const i=Vg(e.request,((e,i,n,r)=>{e?t(e):i&&t(null,{vectorTile:new S$(new hx(i)),rawData:i,cacheControl:n,expires:r})}));return()=>{i.cancel(),t()}}eb();class ib{constructor(e,t,i,n){this.actor=e,this.layerIndex=t,this.availableImages=i,this.loadVectorData=n||tb,this.loading={},this.loaded={}}loadTile(e,t){const i=e.uid;this.loading||(this.loading={});const n=this.loading[i]=new K$(e);n.abort=this.loadVectorData(e,((r,o)=>{if(delete this.loading[i],r||!o)return n.status="done",this.loaded[i]=n,t(r);const a=o.rawData,s={};o.expires&&(s.expires=o.expires),o.cacheControl&&(s.cacheControl=o.cacheControl);const l={};n.vectorTile=o.vectorTile,n.parse(e,o.vectorTile,this.layerIndex,this.availableImages,this.actor,((e,i)=>{if(e||!i)return t(e);t(null,Oh({rawTileData:a.slice(0)},i,s,l))})),this.loaded=this.loaded||{},this.loaded[i]=n}))}reloadTile(e,t){const i=this.loaded,n=e.uid,r=this;if(i&&i[n]){const o=i[n];o.showCollisionBoxes=e.showCollisionBoxes;const a=(i,n)=>{const a=o.reloadCallback;a&&(delete o.reloadCallback,o.parse(e,o.vectorTile,r.layerIndex,this.availableImages,r.actor,a)),t(i,n)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(e,o.vectorTile,this.layerIndex,this.availableImages,this.actor,a):a())}}abortTile(e,t){const i=this.loading,n=e.uid;i&&i[n]&&i[n].abort&&(i[n].abort(),delete i[n]),t()}removeTile(e,t){const i=this.loaded,n=e.uid;i&&i[n]&&delete i[n],t()}}const nb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),rb=nb(void 0,(function(){return rb.toString().search("(((.+)+)+)+$").toString().constructor(rb).search("(((.+)+)+)+$")}));rb();class ob{constructor(e){this.self=e,this.actor=new dn(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:ib},this.workerSources={},this.demWorkerSources={}}setReferrer(e,t){this.referrer=t}setImages(e,t,i){this.availableImages[e]=t,i()}setLayers(e,t,i){this.getLayerIndex(e).replace(t),i()}updateLayers(e,t,i){this.getLayerIndex(e).update(t.layers,t.removedIds),i()}loadTile(e,t,i){this.getWorkerSource(e,t.type,t.source).loadTile(t,i)}reloadTile(e,t,i){this.getWorkerSource(e,t.type,t.source).reloadTile(t,i)}abortTile(e,t,i){this.getWorkerSource(e,t.type,t.source).abortTile(t,i)}removeTile(e,t,i){this.getWorkerSource(e,t.type,t.source).removeTile(t,i)}removeSource(e,t,i){if(!this.workerSources[e]||!this.workerSources[e][t.type]||!this.workerSources[e][t.type][t.source])return;const n=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==n.removeSource?n.removeSource(t,i):i()}loadWorkerSource(e,t,i){try{this.self.importScripts(t.url),i()}catch(e){i(e.toString())}}getAvailableImages(e){let t=this.availableImages[e];return!t&&(t=[]),t}getLayerIndex(e){let t=this.layerIndexes[e];return!t&&(t=this.layerIndexes[e]=new a$),t}getWorkerSource(e,t,i){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][i]){const n={send:(t,i,n)=>{this.actor.send(t,i,n,e)}};this.workerSources[e][t][i]=new this.workerSourceTypes[t](n,this.getLayerIndex(e),this.getAvailableImages(e))}return this.workerSources[e][t][i]}enforceCacheSizeLimit(e,t){Rg(t)}}"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new ob(self))},t="("+e+")()",window.mvtWorkerUrl=window.URL.createObjectURL(new Blob([t],{type:"text/javascript"}))},"function"==typeof define&&define.amd?define(factory):factory(),e$2e(Object.create)&&(t$15.prototype=Object.create(Error.prototype),t$15.prototype.constructor=t$15),t$15.prototype.toString=function(){var e=this.name+": "+this.message;return e$2e(this.stack)&&(e+="\n"+this.stack.toString()),e},t$15.throwInstantiationError=function(){throw new t$15("This function defines an interface and should not be called directly.")};var o$1q={};function p$1f(e){return e+" is required, actual value was undefined"}function t$14(e,t,i){return"Expected "+i+" to be typeof "+t+", actual typeof was "+e}function u$Z(e,t){return e??t}o$1q.typeOf={},o$1q.defined=function(e,t){if(!e$2e(t))throw new t$15(p$1f(e))},o$1q.typeOf.func=function(e,t){if("function"!=typeof t)throw new t$15(t$14(typeof t,"function",e))},o$1q.typeOf.string=function(e,t){if("string"!=typeof t)throw new t$15(t$14(typeof t,"string",e))},o$1q.typeOf.number=function(e,t){if("number"!=typeof t)throw new t$15(t$14(typeof t,"number",e))},o$1q.typeOf.number.lessThan=function(e,t,i){if(o$1q.typeOf.number(e,t),t>=i)throw new t$15("Expected "+e+" to be less than "+i+", actual value was "+t)},o$1q.typeOf.number.lessThanOrEquals=function(e,t,i){if(o$1q.typeOf.number(e,t),t>i)throw new t$15("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},o$1q.typeOf.number.greaterThan=function(e,t,i){if(o$1q.typeOf.number(e,t),t<=i)throw new t$15("Expected "+e+" to be greater than "+i+", actual value was "+t)},o$1q.typeOf.number.greaterThanOrEquals=function(e,t,i){if(o$1q.typeOf.number(e,t),t<i)throw new t$15("Expected "+e+" to be greater than or equal to"+i+", actual value was "+t)},o$1q.typeOf.object=function(e,t){if("object"!=typeof t)throw new t$15(t$14(typeof t,"object",e))},o$1q.typeOf.bool=function(e,t){if("boolean"!=typeof t)throw new t$15(t$14(typeof t,"boolean",e))},o$1q.typeOf.number.equals=function(e,t,i,n){if(o$1q.typeOf.number(e,i),o$1q.typeOf.number(t,n),i!==n)throw new t$15(e+" must be equal to "+t+", the actual values are "+i+" and "+n)},u$Z.EMPTY_OBJECT=Object.freeze({});var s$12=function(e){null==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};s$12.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++){e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0}},s$12.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i<this.N-this.M;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+this.M]^e>>>1^t[1&e];for(;i<this.N-1;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+(this.M-this.N)]^e>>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},s$12.prototype.random=function(){return this.genrand_int32()*(1/4294967296)};var e$2d={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536};e$2d.sign=u$Z(Math.sign,(function(e){return 0===(e=+e)||e!=e?e:e>0?1:-1})),e$2d.signNotZero=function(e){return e<0?-1:1},e$2d.toSNorm=function(e,t){return t=u$Z(t,255),Math.round((.5*e$2d.clamp(e,-1,1)+.5)*t)},e$2d.fromSNorm=function(e,t){return t=u$Z(t,255),e$2d.clamp(e,0,t)/t*2-1},e$2d.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:e$2d.clamp((e-t)/i,0,1)},e$2d.sinh=u$Z(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),e$2d.cosh=u$Z(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),e$2d.lerp=function(e,t,i){return(1-i)*e+i*t},e$2d.PI=Math.PI,e$2d.ONE_OVER_PI=1/Math.PI,e$2d.PI_OVER_TWO=Math.PI/2,e$2d.PI_OVER_THREE=Math.PI/3,e$2d.PI_OVER_FOUR=Math.PI/4,e$2d.PI_OVER_SIX=Math.PI/6,e$2d.THREE_PI_OVER_TWO=3*Math.PI/2,e$2d.TWO_PI=2*Math.PI,e$2d.ONE_OVER_TWO_PI=1/(2*Math.PI),e$2d.RADIANS_PER_DEGREE=Math.PI/180,e$2d.DEGREES_PER_RADIAN=180/Math.PI,e$2d.RADIANS_PER_ARCSECOND=e$2d.RADIANS_PER_DEGREE/3600,e$2d.toRadians=function(e){if(!e$2e(e))throw new t$15("degrees is required.");return e*e$2d.RADIANS_PER_DEGREE},e$2d.toDegrees=function(e){if(!e$2e(e))throw new t$15("radians is required.");return e*e$2d.DEGREES_PER_RADIAN},e$2d.convertLongitudeRange=function(e){if(!e$2e(e))throw new t$15("angle is required.");var t=e$2d.TWO_PI,i=e-Math.floor(e/t)*t;return i<-Math.PI?i+t:i>=Math.PI?i-t:i},e$2d.clampToLatitudeRange=function(e){if(!e$2e(e))throw new t$15("angle is required.");return e$2d.clamp(e,-1*e$2d.PI_OVER_TWO,e$2d.PI_OVER_TWO)},e$2d.negativePiToPi=function(e){if(!e$2e(e))throw new t$15("angle is required.");return e$2d.zeroToTwoPi(e+e$2d.PI)-e$2d.PI},e$2d.zeroToTwoPi=function(e){if(!e$2e(e))throw new t$15("angle is required.");var t=e$2d.mod(e,e$2d.TWO_PI);return Math.abs(t)<e$2d.EPSILON14&&Math.abs(e)>e$2d.EPSILON14?e$2d.TWO_PI:t},e$2d.mod=function(e,t){if(!e$2e(e))throw new t$15("m is required.");if(!e$2e(t))throw new t$15("n is required.");return(e%t+t)%t},e$2d.equalsEpsilon=function(e,t,i,n){if(!e$2e(e))throw new t$15("left is required.");if(!e$2e(t))throw new t$15("right is required.");if(!e$2e(i))throw new t$15("relativeEpsilon is required.");n=u$Z(n,i);var r=Math.abs(e-t);return r<=n||r<=i*Math.max(Math.abs(e),Math.abs(t))},e$2d.lessThan=function(e,t,i){if(!e$2e(e))throw new t$15("first is required.");if(!e$2e(t))throw new t$15("second is required.");if(!e$2e(i))throw new t$15("relativeEpsilon is required.");return e-t<-i},e$2d.lessThanOrEquals=function(e,t,i){if(!e$2e(e))throw new t$15("first is required.");if(!e$2e(t))throw new t$15("second is required.");if(!e$2e(i))throw new t$15("relativeEpsilon is required.");return e-t<i},e$2d.greaterThan=function(e,t,i){if(!e$2e(e))throw new t$15("first is required.");if(!e$2e(t))throw new t$15("second is required.");if(!e$2e(i))throw new t$15("relativeEpsilon is required.");return e-t>i},e$2d.greaterThanOrEquals=function(e,t,i){if(!e$2e(e))throw new t$15("first is required.");if(!e$2e(t))throw new t$15("second is required.");if(!e$2e(i))throw new t$15("relativeEpsilon is required.");return e-t>-i};var h$1a=[1];e$2d.factorial=function(e){if("number"!=typeof e||e<0)throw new t$15("A number greater than or equal to 0 is required.");var t=h$1a.length;if(e>=t)for(var i=h$1a[t-1],n=t;n<=e;n++){var r=i*n;h$1a.push(r),i=r}return h$1a[e]},e$2d.incrementWrap=function(e,t,i){if(i=u$Z(i,0),!e$2e(e))throw new t$15("n is required.");if(t<=i)throw new t$15("maximumValue must be greater than minimumValue.");return++e>t&&(e=i),e},e$2d.isPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new t$15("A number greater than or equal to 0 is required.");return 0!==e&&0==(e&e-1)},e$2d.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new t$15("A number greater than or equal to 0 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},e$2d.clamp=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("min is required.");if(!e$2e(i))throw new t$15("max is required.");return e<t?t:e>i?i:e};var I$1z=new s$12;function o$1p(e,t,i){this.x=u$Z(e,0),this.y=u$Z(t,0),this.z=u$Z(i,0)}e$2d.setRandomNumberSeed=function(e){if(!e$2e(e))throw new t$15("seed is required.");I$1z=new s$12(e)},e$2d.nextRandomNumber=function(){return I$1z.random()},e$2d.randomBetween=function(e,t){return e$2d.nextRandomNumber()*(t-e)+e},e$2d.acosClamped=function(e){if(!e$2e(e))throw new t$15("value is required.");return Math.acos(e$2d.clamp(e,-1,1))},e$2d.asinClamped=function(e){if(!e$2e(e))throw new t$15("value is required.");return Math.asin(e$2d.clamp(e,-1,1))},e$2d.chordLength=function(e,t){if(!e$2e(e))throw new t$15("angle is required.");if(!e$2e(t))throw new t$15("radius is required.");return 2*t*Math.sin(.5*e)},e$2d.logBase=function(e,t){if(!e$2e(e))throw new t$15("number is required.");if(!e$2e(t))throw new t$15("base is required.");return Math.log(e)/Math.log(t)},e$2d.cbrt=u$Z(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t})),e$2d.log2=u$Z(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),e$2d.fog=function(e,t){var i=e*t;return 1-Math.exp(-i*i)},e$2d.fastApproximateAtan=function(e){return o$1q.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},e$2d.fastApproximateAtan2=function(e,t){o$1q.typeOf.number("x",e),o$1q.typeOf.number("y",t);var i,n,r=Math.abs(e);i=Math.abs(t),n=Math.max(r,i);var o=(i=Math.min(r,i))/n;if(isNaN(o))throw new t$15("either x or y must be nonzero");return r=e$2d.fastApproximateAtan(o),r=Math.abs(t)>Math.abs(e)?e$2d.PI_OVER_TWO-r:r,r=e<0?e$2d.PI-r:r,r=t<0?-r:r},o$1p.fromSpherical=function(e,t){o$1q.typeOf.object("spherical",e),e$2e(t)||(t=new o$1p);var i=e.clock,n=e.cone,r=u$Z(e.magnitude,1),o=r*Math.sin(n);return t.x=o*Math.cos(i),t.y=o*Math.sin(i),t.z=r*Math.cos(n),t},o$1p.fromElements=function(e,t,i,n){return e$2e(n)?(n.x=e,n.y=t,n.z=i,n):new o$1p(e,t,i)},o$1p.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new o$1p(e.x,e.y,e.z)},o$1p.fromCartesian4=o$1p.clone,o$1p.packedLength=3,o$1p.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.x,t[i++]=e.y,t[i]=e.z,t},o$1p.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new o$1p),i.x=e[t++],i.y=e[t++],i.z=e[t],i},o$1p.packArray=function(e,t){o$1q.defined("array",e);var i=e.length,n=3*i;if(e$2e(t)){if(!Array.isArray(t)&&t.length!==n)throw new t$15("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)o$1p.pack(e[r],t,3*r);return t},o$1p.unpackArray=function(e,t){if(o$1q.defined("array",e),o$1q.typeOf.number.greaterThanOrEquals("array.length",e.length,3),e.length%3!=0)throw new t$15("array length must be a multiple of 3.");var i=e.length;e$2e(t)?t.length=i/3:t=new Array(i/3);for(var n=0;n<i;n+=3){var r=n/3;t[r]=o$1p.unpack(e,n,t[r])}return t},o$1p.fromArray=o$1p.unpack,o$1p.maximumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z)},o$1p.minimumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z)},o$1p.minimumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i},o$1p.maximumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i},o$1p.magnitudeSquared=function(e){return o$1q.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z},o$1p.magnitude=function(e){return Math.sqrt(o$1p.magnitudeSquared(e))};var v$_=new o$1p;o$1p.distance=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1p.subtract(e,t,v$_),o$1p.magnitude(v$_)},o$1p.distanceSquared=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1p.subtract(e,t,v$_),o$1p.magnitudeSquared(v$_)},o$1p.normalize=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1p.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new t$15("normalized result is not a number");return t},o$1p.dot=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z},o$1p.multiplyComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i},o$1p.divideComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i},o$1p.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i},o$1p.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i},o$1p.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i},o$1p.divideByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i},o$1p.negate=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t},o$1p.abs=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var d$1u=new o$1p;o$1p.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),o$1p.multiplyByScalar(t,i,d$1u),n=o$1p.multiplyByScalar(e,1-i,n),o$1p.add(d$1u,n,n)};var u$Y=new o$1p,x$1o=new o$1p;o$1p.angleBetween=function(e,t){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1p.normalize(e,u$Y),o$1p.normalize(t,x$1o);var i=o$1p.dot(u$Y,x$1o),n=o$1p.magnitude(o$1p.cross(u$Y,x$1o,u$Y));return Math.atan2(n,i)};var S$15=new o$1p;o$1p.mostOrthogonalAxis=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1p.normalize(e,S$15);return o$1p.abs(i,i),t=i.x<=i.y?i.x<=i.z?o$1p.clone(o$1p.UNIT_X,t):o$1p.clone(o$1p.UNIT_Z,t):i.y<=i.z?o$1p.clone(o$1p.UNIT_Y,t):o$1p.clone(o$1p.UNIT_Z,t)},o$1p.projectVector=function(e,t,i){o$1q.defined("a",e),o$1q.defined("b",t),o$1q.defined("result",i);var n=o$1p.dot(e,t)/o$1p.dot(t,t);return o$1p.multiplyByScalar(t,n,i)},o$1p.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},o$1p.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]},o$1p.equalsEpsilon=function(e,t,i,n){return e===t||e$2e(e)&&e$2e(t)&&e$2d.equalsEpsilon(e.x,t.x,i,n)&&e$2d.equalsEpsilon(e.y,t.y,i,n)&&e$2d.equalsEpsilon(e.z,t.z,i,n)},o$1p.cross=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e.x,r=e.y,o=e.z,a=t.x,s=t.y,l=t.z,u=r*l-o*s,c=o*a-n*l,h=n*s-r*a;return i.x=u,i.y=c,i.z=h,i},o$1p.midpoint=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=.5*(e.x+t.x),i.y=.5*(e.y+t.y),i.z=.5*(e.z+t.z),i},o$1p.fromDegrees=function(e,t,i,n,r){return o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),e=e$2d.toRadians(e),t=e$2d.toRadians(t),o$1p.fromRadians(e,t,i,n,r)};var b$1l=new o$1p,z$15=new o$1p,q$1j=new o$1p(40680631590769,40680631590769,40408299984661.445);function e$2c(e,t,i,n){this.x=u$Z(e,0),this.y=u$Z(t,0),this.z=u$Z(i,0),this.w=u$Z(n,0)}o$1p.fromRadians=function(e,t,i,n,r){o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),i=u$Z(i,0);var o=e$2e(n)?n.radiiSquared:q$1j,a=Math.cos(t);b$1l.x=a*Math.cos(e),b$1l.y=a*Math.sin(e),b$1l.z=Math.sin(t),b$1l=o$1p.normalize(b$1l,b$1l),o$1p.multiplyComponents(o,b$1l,z$15);var s=Math.sqrt(o$1p.dot(b$1l,z$15));return z$15=o$1p.divideByScalar(z$15,s,z$15),b$1l=o$1p.multiplyByScalar(b$1l,i,b$1l),e$2e(r)||(r=new o$1p),o$1p.add(z$15,b$1l,r)},o$1p.fromDegreesArray=function(e,t,i){if(o$1q.defined("coordinates",e),e.length<2||e.length%2!=0)throw new t$15("the number of coordinates must be a multiple of 2 and at least 2");var n=e.length;e$2e(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var o=e[r],a=e[r+1],s=r/2;i[s]=o$1p.fromDegrees(o,a,0,t,i[s])}return i},o$1p.fromRadiansArray=function(e,t,i){if(o$1q.defined("coordinates",e),e.length<2||e.length%2!=0)throw new t$15("the number of coordinates must be a multiple of 2 and at least 2");var n=e.length;e$2e(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var o=e[r],a=e[r+1],s=r/2;i[s]=o$1p.fromRadians(o,a,0,t,i[s])}return i},o$1p.fromDegreesArrayHeights=function(e,t,i){if(o$1q.defined("coordinates",e),e.length<3||e.length%3!=0)throw new t$15("the number of coordinates must be a multiple of 3 and at least 3");var n=e.length;e$2e(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var o=e[r],a=e[r+1],s=e[r+2],l=r/3;i[l]=o$1p.fromDegrees(o,a,s,t,i[l])}return i},o$1p.fromRadiansArrayHeights=function(e,t,i){if(o$1q.defined("coordinates",e),e.length<3||e.length%3!=0)throw new t$15("the number of coordinates must be a multiple of 3 and at least 3");var n=e.length;e$2e(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var o=e[r],a=e[r+1],s=e[r+2],l=r/3;i[l]=o$1p.fromRadians(o,a,s,t,i[l])}return i},o$1p.ZERO=Object.freeze(new o$1p(0,0,0)),o$1p.UNIT_X=Object.freeze(new o$1p(1,0,0)),o$1p.UNIT_Y=Object.freeze(new o$1p(0,1,0)),o$1p.UNIT_Z=Object.freeze(new o$1p(0,0,1)),o$1p.UNIT_XYZ=Object.freeze(new o$1p(1,1,1)),o$1p.prototype.clone=function(e){return o$1p.clone(this,e)},o$1p.prototype.equals=function(e){return o$1p.equals(this,e)},o$1p.prototype.equalsEpsilon=function(e,t,i){return o$1p.equalsEpsilon(this,e,t,i)},o$1p.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},o$1p.prototype.toArray=function(e,t){o$1p.pack(this,e,t)},o$1p.globalOffset=new o$1p(0,0,0),e$2c.fromElements=function(e,t,i,n,r){return e$2e(r)?(r.x=e,r.y=t,r.z=i,r.w=n,r):new e$2c(e,t,i,n)},e$2c.fromColor=function(e,t){return o$1q.typeOf.object("color",e),e$2e(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new e$2c(e.red,e.green,e.blue,e.alpha)},e$2c.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new e$2c(e.x,e.y,e.z,e.w)},e$2c.packedLength=4,e$2c.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},e$2c.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new e$2c),i.x=e[t++],i.y=e[t++],i.z=e[t++],i.w=e[t],i},e$2c.packArray=function(e,t){o$1q.defined("array",e);var i=e.length,n=4*i;if(e$2e(t)){if(!Array.isArray(t)&&t.length!==n)throw new t$15("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)e$2c.pack(e[r],t,4*r);return t},e$2c.unpackArray=function(e,t){if(o$1q.defined("array",e),o$1q.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!=0)throw new t$15("array length must be a multiple of 4.");var i=e.length;e$2e(t)?t.length=i/4:t=new Array(i/4);for(var n=0;n<i;n+=4){var r=n/4;t[r]=e$2c.unpack(e,n,t[r])}return t},e$2c.fromArray=e$2c.unpack,e$2c.maximumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)},e$2c.minimumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)},e$2c.minimumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i.w=Math.min(e.w,t.w),i},e$2c.maximumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i.w=Math.max(e.w,t.w),i},e$2c.magnitudeSquared=function(e){return o$1q.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},e$2c.magnitude=function(e){return Math.sqrt(e$2c.magnitudeSquared(e))};var b$1k=new e$2c;e$2c.distance=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e$2c.subtract(e,t,b$1k),e$2c.magnitude(b$1k)},e$2c.distanceSquared=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e$2c.subtract(e,t,b$1k),e$2c.magnitudeSquared(b$1k)},e$2c.normalize=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=e$2c.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t.w=e.w/i,isNaN(t.x)||isNaN(t.y)||isNaN(t.z)||isNaN(t.w))throw new t$15("normalized result is not a number");return t},e$2c.dot=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},e$2c.multiplyComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i.w=e.w*t.w,i},e$2c.divideComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i.w=e.w/t.w,i},e$2c.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},e$2c.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},e$2c.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},e$2c.divideByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},e$2c.negate=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},e$2c.abs=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var j$1l=new e$2c;e$2c.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),e$2c.multiplyByScalar(t,i,j$1l),n=e$2c.multiplyByScalar(e,1-i,n),e$2c.add(j$1l,n,n)};var h$19=new e$2c;e$2c.mostOrthogonalAxis=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=e$2c.normalize(e,h$19);return e$2c.abs(i,i),t=i.x<=i.y?i.x<=i.z?i.x<=i.w?e$2c.clone(e$2c.UNIT_X,t):e$2c.clone(e$2c.UNIT_W,t):i.z<=i.w?e$2c.clone(e$2c.UNIT_Z,t):e$2c.clone(e$2c.UNIT_W,t):i.y<=i.z?i.y<=i.w?e$2c.clone(e$2c.UNIT_Y,t):e$2c.clone(e$2c.UNIT_W,t):i.z<=i.w?e$2c.clone(e$2c.UNIT_Z,t):e$2c.clone(e$2c.UNIT_W,t)},e$2c.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},e$2c.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]&&e.w===t[i+3]},e$2c.equalsEpsilon=function(e,t,i,n){return e===t||e$2e(e)&&e$2e(t)&&e$2d.equalsEpsilon(e.x,t.x,i,n)&&e$2d.equalsEpsilon(e.y,t.y,i,n)&&e$2d.equalsEpsilon(e.z,t.z,i,n)&&e$2d.equalsEpsilon(e.w,t.w,i,n)},e$2c.ZERO=Object.freeze(new e$2c(0,0,0,0)),e$2c.UNIT_X=Object.freeze(new e$2c(1,0,0,0)),e$2c.UNIT_Y=Object.freeze(new e$2c(0,1,0,0)),e$2c.UNIT_Z=Object.freeze(new e$2c(0,0,1,0)),e$2c.UNIT_W=Object.freeze(new e$2c(0,0,0,1)),e$2c.prototype.clone=function(e){return e$2c.clone(this,e)},e$2c.prototype.equals=function(e){return e$2c.equals(this,e)},e$2c.prototype.equalsEpsilon=function(e,t,i){return e$2c.equalsEpsilon(this,e,t,i)},e$2c.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var i$1g=new Float32Array(1),z$14=256,T$1g=65536,N$11=16777216,_$17=1/z$14,M$1e=1/T$1g,d$1t=1/N$11,O$_=38;e$2c.packFloat=function(e,t){if(o$1q.typeOf.number("value",e),e$2e(t)||(t=new e$2c),i$1g[0]=e,0===(e=i$1g[0]))return e$2c.clone(e$2c.ZERO,t);var i,n=e<0?1:0;isFinite(e)?(e=Math.abs(e),i=Math.floor(e$2d.logBase(e,10))+1,e/=Math.pow(10,i)):(e=.1,i=O$_);var r=e*z$14;return t.x=Math.floor(r),r=(r-t.x)*z$14,t.y=Math.floor(r),r=(r-t.y)*z$14,t.z=Math.floor(r),t.w=2*(i+O$_)+n,t},e$2c.unpackFloat=function(e){o$1q.typeOf.object("packedFloat",e);var t=e.w/2,i=Math.floor(t),n=2*(t-i);if(n=-(n=2*n-1),(i-=O$_)>=O$_)return n<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var r=n*e.x*_$17;return r+=n*e.y*M$1e,(r+=n*e.z*d$1t)*Math.pow(10,i)},e$2c.prototype.toArray=function(e,t){e$2c.pack(this,e,t)};var F$1m=new o$1p,L$1m=new o$1p;function P$1d(e,t,i,n,r){if(!e$2e(e))throw new t$15("cartesian is required.");if(!e$2e(t))throw new t$15("oneOverRadii is required.");if(!e$2e(i))throw new t$15("oneOverRadiiSquared is required.");if(!e$2e(n))throw new t$15("centerToleranceSquared is required.");var o=e.x,a=e.y,s=e.z,l=t.x,u=t.y,c=t.z,h=o*o*l*l,d=a*a*u*u,f=s*s*c*c,p=h+d+f,_=Math.sqrt(1/p),m=o$1p.multiplyByScalar(e,_,F$1m);if(p<n)return isFinite(_)?o$1p.clone(m,r):void 0;var g=i.x,x=i.y,y=i.z,v=L$1m;v.x=m.x*g*2,v.y=m.y*x*2,v.z=m.z*y*2;var $,b,T,C,S,w,E,P=(1-_)*o$1p.magnitude(e)/(.5*o$1p.magnitude(v)),A=0;do{A=($=h*(S=(b=1/(1+(P-=A)*g))*b)+d*(w=(T=1/(1+P*x))*T)+f*(E=(C=1/(1+P*y))*C)-1)/(-2*(h*(S*b)*g+d*(w*T)*x+f*(E*C)*y))}while(Math.abs($)>e$2d.EPSILON12);return e$2e(r)?(r.x=o*b,r.y=a*T,r.z=s*C,r):new o$1p(o*b,a*T,s*C)}function a$18(e,t,i){this.longitude=u$Z(e,0),this.latitude=u$Z(t,0),this.height=u$Z(i,0)}a$18.fromRadians=function(e,t,i,n){return o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),i=u$Z(i,0),e$2e(n)?(n.longitude=e,n.latitude=t,n.height=i,n):new a$18(e,t,i)},a$18.fromDegrees=function(e,t,i,n){return o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),e=e$2d.toRadians(e),t=e$2d.toRadians(t),a$18.fromRadians(e,t,i,n)};var g$1m=new o$1p,l$1h=new o$1p,w$19=new o$1p,b$1j=new o$1p(1/6378137,1/6378137,1/6356752.314245179),y$14=new o$1p(1/40680631590769,1/40680631590769,1/40408299984661.445),C$1i=e$2d.EPSILON1;function p$1e(e,t,i,n,r,o,a,s,l){this[0]=u$Z(e,0),this[1]=u$Z(n,0),this[2]=u$Z(a,0),this[3]=u$Z(t,0),this[4]=u$Z(r,0),this[5]=u$Z(s,0),this[6]=u$Z(i,0),this[7]=u$Z(o,0),this[8]=u$Z(l,0),this.isMatrix3=!0}a$18.fromCartesian=function(e,t,i){var n=e$2e(t)?t.oneOverRadii:b$1j,r=e$2e(t)?t.oneOverRadiiSquared:y$14,o=P$1d(e,n,r,e$2e(t)?t._centerToleranceSquared:C$1i,l$1h);if(e$2e(o)){var a=o$1p.multiplyComponents(o,r,g$1m);a=o$1p.normalize(a,a);var s=o$1p.subtract(e,o,w$19),l=Math.atan2(a.y,a.x),u=Math.asin(a.z),c=e$2d.sign(o$1p.dot(s,e))*o$1p.magnitude(s);return e$2e(i)?(i.longitude=l,i.latitude=u,i.height=c,i):new a$18(l,u,c)}},a$18.toCartesian=function(e,t,i){return o$1q.defined("cartographic",e),o$1p.fromRadians(e.longitude,e.latitude,e.height,t,i)},a$18.sphericalDistance=function(e,t,i,n){if(o$1q.defined("longitudeA",e),o$1q.defined("longitudeB",i),o$1q.defined("latitudeA",t),o$1q.defined("latitudeB",n),e===i&&t===n)return 0;var r=e$2d.toRadians(t),o=e$2d.toRadians(n),a=e$2d.toRadians(e),s=e$2d.toRadians(i),l=a*a+r*r,u=s*s+o*o,c=(l+u-((a-s)*(a-s)+(r-o)*(r-o)))/(2*Math.sqrt(l)*Math.sqrt(u));return c=e$2d.clamp(c,-1,1),6378137*Math.acos(c)},a$18.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new a$18(e.longitude,e.latitude,e.height)},a$18.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},a$18.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},a$18.ZERO=Object.freeze(new a$18(0,0,0)),a$18.prototype.clone=function(e){return a$18.clone(this,e)},a$18.prototype.equals=function(e){return a$18.equals(this,e)},a$18.prototype.equalsEpsilon=function(e,t){return a$18.equalsEpsilon(this,e,t)},a$18.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},p$1e.packedLength=9,p$1e.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t},p$1e.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new p$1e),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i},p$1e.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new p$1e(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},p$1e.fromArray=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new p$1e),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i[4]=e[t+4],i[5]=e[t+5],i[6]=e[t+6],i[7]=e[t+7],i[8]=e[t+8],i},p$1e.fromColumnMajorArray=function(e,t){return o$1q.defined("values",e),p$1e.clone(e,t)},p$1e.fromRowMajorArray=function(e,t){return o$1q.defined("values",e),e$2e(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new p$1e(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},p$1e.fromQuaternion=function(e,t){o$1q.typeOf.object("quaternion",e);var i=e.x*e.x,n=e.x*e.y,r=e.x*e.z,o=e.x*e.w,a=e.y*e.y,s=e.y*e.z,l=e.y*e.w,u=e.z*e.z,c=e.z*e.w,h=e.w*e.w,d=i-a-u+h,f=2*(n-c),p=2*(r+l),_=2*(n+c),m=-i+a-u+h,g=2*(s-o),x=2*(r-l),y=2*(s+o),v=-i-a+u+h;return e$2e(t)?(t[0]=d,t[1]=_,t[2]=x,t[3]=f,t[4]=m,t[5]=y,t[6]=p,t[7]=g,t[8]=v,t):new p$1e(d,f,p,_,m,g,x,y,v)},p$1e.fromHeadingPitchRoll=function(e,t){o$1q.typeOf.object("headingPitchRoll",e);var i=Math.cos(-e.pitch),n=Math.cos(-e.heading),r=Math.cos(e.roll),o=Math.sin(-e.pitch),a=Math.sin(-e.heading),s=Math.sin(e.roll),l=i*n,u=-r*a+s*o*n,c=s*a+r*o*n,h=i*a,d=r*n+s*o*a,f=-s*n+r*o*a,p=-o,_=s*i,m=r*i;return e$2e(t)?(t[0]=l,t[1]=h,t[2]=p,t[3]=u,t[4]=d,t[5]=_,t[6]=c,t[7]=f,t[8]=m,t):new p$1e(l,u,c,h,d,f,p,_,m)},p$1e.fromScale=function(e,t){return o$1q.typeOf.object("scale",e),e$2e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new p$1e(e.x,0,0,0,e.y,0,0,0,e.z)},p$1e.fromUniformScale=function(e,t){return o$1q.typeOf.number("scale",e),e$2e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new p$1e(e,0,0,0,e,0,0,0,e)},p$1e.fromCrossProduct=function(e,t){return o$1q.typeOf.object("vector",e),e$2e(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new p$1e(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},p$1e.fromRotationX=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2e(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=i,t[5]=n,t[6]=0,t[7]=-n,t[8]=i,t):new p$1e(1,0,0,0,i,-n,0,n,i)},p$1e.fromRotationY=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2e(t)?(t[0]=i,t[1]=0,t[2]=-n,t[3]=0,t[4]=1,t[5]=0,t[6]=n,t[7]=0,t[8]=i,t):new p$1e(i,0,n,0,1,0,-n,0,i)},p$1e.fromRotationZ=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2e(t)?(t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new p$1e(i,-n,0,n,i,0,0,0,1)},p$1e.toArray=function(e,t){return o$1q.typeOf.object("matrix",e),e$2e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},p$1e.getElementIndex=function(e,t){return o$1q.typeOf.number.greaterThanOrEquals("row",t,0),o$1q.typeOf.number.lessThanOrEquals("row",t,2),o$1q.typeOf.number.greaterThanOrEquals("column",e,0),o$1q.typeOf.number.lessThanOrEquals("column",e,2),3*e+t},p$1e.getColumn=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("result",i);var n=3*t,r=e[n],o=e[n+1],a=e[n+2];return i.x=r,i.y=o,i.z=a,i},p$1e.setColumn=function(e,t,i,n){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n);var r=3*t;return(n=p$1e.clone(e,n))[r]=i.x,n[r+1]=i.y,n[r+2]=i.z,n},p$1e.getRow=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("result",i);var n=e[t],r=e[t+3],o=e[t+6];return i.x=n,i.y=r,i.z=o,i},p$1e.setRow=function(e,t,i,n){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n),(n=p$1e.clone(e,n))[t]=i.x,n[t+3]=i.y,n[t+6]=i.z,n};var W$1d=new o$1p;p$1e.getScale=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=o$1p.magnitude(o$1p.fromElements(e[0],e[1],e[2],W$1d)),t.y=o$1p.magnitude(o$1p.fromElements(e[3],e[4],e[5],W$1d)),t.z=o$1p.magnitude(o$1p.fromElements(e[6],e[7],e[8],W$1d)),t};var A$1l=new o$1p;p$1e.getMaximumScale=function(e){return p$1e.getScale(e,A$1l),o$1p.maximumComponent(A$1l)},p$1e.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],r=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],o=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],a=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],s=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],l=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],u=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],c=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],h=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return i[0]=n,i[1]=r,i[2]=o,i[3]=a,i[4]=s,i[5]=l,i[6]=u,i[7]=c,i[8]=h,i},p$1e.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i},p$1e.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i},p$1e.multiplyByVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[3]*r+e[6]*o,s=e[1]*n+e[4]*r+e[7]*o,l=e[2]*n+e[5]*r+e[8]*o;return i.x=a,i.y=s,i.z=l,i},p$1e.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i},p$1e.multiplyByScale=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.x,i[3]=e[3]*t.y,i[4]=e[4]*t.y,i[5]=e[5]*t.y,i[6]=e[6]*t.z,i[7]=e[7]*t.z,i[8]=e[8]*t.z,i},p$1e.negate=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},p$1e.transpose=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[3],r=e[6],o=e[1],a=e[4],s=e[7],l=e[2],u=e[5],c=e[8];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=s,t[6]=l,t[7]=u,t[8]=c,t};var F$1l=new o$1p(1,1,1);function X$17(e){for(var t=0,i=0;i<9;++i){var n=e[i];t+=n*n}return Math.sqrt(t)}p$1e.getRotation=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=o$1p.divideComponents(F$1l,p$1e.getScale(e,A$1l),A$1l);return t=p$1e.multiplyByScale(e,i,t)};var D$19=[1,0,0],k$1d=[2,2,1];function H$1h(e){for(var t=0,i=0;i<3;++i){var n=e[p$1e.getElementIndex(k$1d[i],D$19[i])];t+=2*n*n}return Math.sqrt(t)}function Q$1e(e,t){for(var i=e$2d.EPSILON15,n=0,r=1,o=0;o<3;++o){var a=Math.abs(e[p$1e.getElementIndex(k$1d[o],D$19[o])]);a>n&&(r=o,n=a)}var s=1,l=0,u=D$19[r],c=k$1d[r];if(Math.abs(e[p$1e.getElementIndex(c,u)])>i){var h,d=(e[p$1e.getElementIndex(c,c)]-e[p$1e.getElementIndex(u,u)])/2/e[p$1e.getElementIndex(c,u)];l=(h=d<0?-1/(-d+Math.sqrt(1+d*d)):1/(d+Math.sqrt(1+d*d)))*(s=1/Math.sqrt(1+h*h))}return(t=p$1e.clone(p$1e.IDENTITY,t))[p$1e.getElementIndex(u,u)]=t[p$1e.getElementIndex(c,c)]=s,t[p$1e.getElementIndex(c,u)]=l,t[p$1e.getElementIndex(u,c)]=-l,t}var U$1i=new p$1e,V$19=new p$1e;function t$13(e){var t;this.name="RuntimeError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}function p$1d(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){this[0]=u$Z(e,0),this[1]=u$Z(r,0),this[2]=u$Z(l,0),this[3]=u$Z(d,0),this[4]=u$Z(t,0),this[5]=u$Z(o,0),this[6]=u$Z(u,0),this[7]=u$Z(f,0),this[8]=u$Z(i,0),this[9]=u$Z(a,0),this[10]=u$Z(c,0),this[11]=u$Z(p,0),this[12]=u$Z(n,0),this[13]=u$Z(s,0),this[14]=u$Z(h,0),this[15]=u$Z(_,0),this.isMatrix4=!0}p$1e.computeEigenDecomposition=function(e,t){o$1q.typeOf.object("matrix",e);var i=e$2d.EPSILON20,n=0,r=0;e$2e(t)||(t={});for(var o=t.unitary=p$1e.clone(p$1e.IDENTITY,t.unitary),a=t.diagonal=p$1e.clone(e,t.diagonal),s=i*X$17(a);r<10&&H$1h(a)>s;)Q$1e(a,U$1i),p$1e.transpose(U$1i,V$19),p$1e.multiply(a,U$1i,a),p$1e.multiply(V$19,a,a),p$1e.multiply(o,U$1i,o),++n>2&&(++r,n=0);return t},p$1e.abs=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},p$1e.determinant=function(e){o$1q.typeOf.object("matrix",e);var t=e[0],i=e[3],n=e[6],r=e[1],o=e[4],a=e[7],s=e[2],l=e[5],u=e[8];return t*(o*u-l*a)+r*(l*n-i*u)+s*(i*a-o*n)},p$1e.inverse=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=p$1e.determinant(e);if(Math.abs(h)<=e$2d.EPSILON15)throw new t$15("matrix is not invertible");t[0]=a*c-u*s,t[1]=u*r-n*c,t[2]=n*s-a*r,t[3]=l*s-o*c,t[4]=i*c-l*r,t[5]=o*r-i*s,t[6]=o*u-l*a,t[7]=l*n-i*u,t[8]=i*a-o*n;var d=1/h;return p$1e.multiplyByScalar(t,d,t)},p$1e.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},p$1e.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i},p$1e.IDENTITY=Object.freeze(new p$1e(1,0,0,0,1,0,0,0,1)),p$1e.ZERO=Object.freeze(new p$1e(0,0,0,0,0,0,0,0,0)),p$1e.COLUMN0ROW0=0,p$1e.COLUMN0ROW1=1,p$1e.COLUMN0ROW2=2,p$1e.COLUMN1ROW0=3,p$1e.COLUMN1ROW1=4,p$1e.COLUMN1ROW2=5,p$1e.COLUMN2ROW0=6,p$1e.COLUMN2ROW1=7,p$1e.COLUMN2ROW2=8,Object.defineProperties(p$1e.prototype,{length:{get:function(){return p$1e.packedLength}}}),p$1e.prototype.clone=function(e){return p$1e.clone(this,e)},p$1e.prototype.equals=function(e){return p$1e.equals(this,e)},p$1e.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]},p$1e.prototype.equalsEpsilon=function(e,t){return p$1e.equalsEpsilon(this,e,t)},p$1e.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},p$1e.prototype.toArray=function(e,t){p$1e.pack(this,e,t)},e$2e(Object.create)&&(t$13.prototype=Object.create(Error.prototype),t$13.prototype.constructor=t$13),t$13.prototype.toString=function(){var e=this.name+": "+this.message;return e$2e(this.stack)&&(e+="\n"+this.stack.toString()),e},p$1d.packedLength=16,p$1d.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t[i++]=e[9],t[i++]=e[10],t[i++]=e[11],t[i++]=e[12],t[i++]=e[13],t[i++]=e[14],t[i]=e[15],t},p$1d.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new p$1d),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i[9]=e[t++],i[10]=e[t++],i[11]=e[t++],i[12]=e[t++],i[13]=e[t++],i[14]=e[t++],i[15]=e[t],i},p$1d.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new p$1d(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])},p$1d.fromArray=p$1d.unpack,p$1d.fromColumnMajorArray=function(e,t){return o$1q.defined("values",e),p$1d.clone(e,t)},p$1d.fromRowMajorArray=function(e,t){return o$1q.defined("values",e),e$2e(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new p$1d(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},p$1d.fromRotationTranslation=function(e,t,i){return o$1q.typeOf.object("rotation",e),t=u$Z(t,o$1p.ZERO),e$2e(i)?(i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=0,i[4]=e[3],i[5]=e[4],i[6]=e[5],i[7]=0,i[8]=e[6],i[9]=e[7],i[10]=e[8],i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,i):new p$1d(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)},p$1d.fromTranslationQuaternionRotationScale=function(e,t,i,n){o$1q.typeOf.object("translation",e),o$1q.typeOf.object("rotation",t),o$1q.typeOf.object("scale",i),e$2e(n)||(n=new p$1d);var r=i.x,o=i.y,a=i.z,s=t.x*t.x,l=t.x*t.y,u=t.x*t.z,c=t.x*t.w,h=t.y*t.y,d=t.y*t.z,f=t.y*t.w,p=t.z*t.z,_=t.z*t.w,m=t.w*t.w,g=s-h-p+m,x=2*(l-_),y=2*(u+f),v=2*(l+_),$=-s+h-p+m,b=2*(d-c),T=2*(u-f),C=2*(d+c),S=-s-h+p+m;return n[0]=g*r,n[1]=v*r,n[2]=T*r,n[3]=0,n[4]=x*o,n[5]=$*o,n[6]=C*o,n[7]=0,n[8]=y*a,n[9]=b*a,n[10]=S*a,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n},p$1d.fromTranslationRotationScale=function(e,t){return o$1q.typeOf.object("translationRotationScale",e),p$1d.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},p$1d.fromTranslation=function(e,t){return o$1q.typeOf.object("translation",e),p$1d.fromRotationTranslation(p$1e.IDENTITY,e,t)},p$1d.fromScale=function(e,t){return o$1q.typeOf.object("scale",e),e$2e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new p$1d(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},p$1d.fromUniformScale=function(e,t){return o$1q.typeOf.number("scale",e),e$2e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new p$1d(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};var $$19=new o$1p,I$1y=new o$1p,i$1f=new o$1p;p$1d.fromCamera=function(e,t){o$1q.typeOf.object("camera",e);var i=e.position,n=e.direction,r=e.up;o$1q.typeOf.object("camera.position",i),o$1q.typeOf.object("camera.direction",n),o$1q.typeOf.object("camera.up",r),o$1p.normalize(n,$$19),o$1p.normalize(o$1p.cross($$19,r,I$1y),I$1y),o$1p.normalize(o$1p.cross(I$1y,$$19,i$1f),i$1f);var o=I$1y.x,a=I$1y.y,s=I$1y.z,l=$$19.x,u=$$19.y,c=$$19.z,h=i$1f.x,d=i$1f.y,f=i$1f.z,p=i.x,_=i.y,m=i.z,g=o*-p+a*-_+s*-m,x=h*-p+d*-_+f*-m,y=l*p+u*_+c*m;return e$2e(t)?(t[0]=o,t[1]=h,t[2]=-l,t[3]=0,t[4]=a,t[5]=d,t[6]=-u,t[7]=0,t[8]=s,t[9]=f,t[10]=-c,t[11]=0,t[12]=g,t[13]=x,t[14]=y,t[15]=1,t):new p$1d(o,a,s,g,h,d,f,x,-l,-u,-c,y,0,0,0,1)},p$1d.computePerspectiveFieldOfView=function(e,t,i,n,r){o$1q.typeOf.number.greaterThan("fovY",e,0),o$1q.typeOf.number.lessThan("fovY",e,Math.PI),o$1q.typeOf.number.greaterThan("near",i,0),o$1q.typeOf.number.greaterThan("far",n,0),o$1q.typeOf.object("result",r);var o=1/Math.tan(.5*e),a=o/t,s=(n+i)/(i-n),l=2*n*i/(i-n);return r[0]=a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=o,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=s,r[11]=-1,r[12]=0,r[13]=0,r[14]=l,r[15]=0,r},p$1d.computeOrthographicOffCenter=function(e,t,i,n,r,o,a){o$1q.typeOf.number("left",e),o$1q.typeOf.number("right",t),o$1q.typeOf.number("bottom",i),o$1q.typeOf.number("top",n),o$1q.typeOf.number("near",r),o$1q.typeOf.number("far",o),o$1q.typeOf.object("result",a);var s=1/(t-e),l=1/(n-i),u=1/(o-r),c=-(t+e)*s,h=-(n+i)*l,d=-(o+r)*u;return s*=2,l*=2,u*=-2,a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=u,a[11]=0,a[12]=c,a[13]=h,a[14]=d,a[15]=1,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,a,a),a},p$1d.computePerspectiveOffCenter=function(e,t,i,n,r,o,a){o$1q.typeOf.number("left",e),o$1q.typeOf.number("right",t),o$1q.typeOf.number("bottom",i),o$1q.typeOf.number("top",n),o$1q.typeOf.number("near",r),o$1q.typeOf.number("far",o),o$1q.typeOf.object("result",a);var s=2*r/(t-e),l=2*r/(n-i),u=(t+e)/(t-e),c=(n+i)/(n-i),h=-(o+r)/(o-r),d=-2*o*r/(o-r);return a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=u,a[9]=c,a[10]=h,a[11]=-1,a[12]=0,a[13]=0,a[14]=d,a[15]=0,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,a,a),a},p$1d.computeInfinitePerspectiveOffCenter=function(e,t,i,n,r,o){o$1q.typeOf.number("left",e),o$1q.typeOf.number("right",t),o$1q.typeOf.number("bottom",i),o$1q.typeOf.number("top",n),o$1q.typeOf.number("near",r),o$1q.typeOf.object("result",o);var a=2*r/(t-e),s=2*r/(n-i),l=(t+e)/(t-e),u=(n+i)/(n-i),c=-2*r;return o[0]=a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=l,o[9]=u,o[10]=-1,o[11]=-1,o[12]=0,o[13]=0,o[14]=c,o[15]=0,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,o,o),o},p$1d.computeViewportTransformation=function(e,t,i,n){o$1q.typeOf.object("result",n),e=u$Z(e,u$Z.EMPTY_OBJECT);var r=u$Z(e.x,0),o=u$Z(e.y,0),a=u$Z(e.width,0),s=u$Z(e.height,0);t=u$Z(t,0);var l=.5*a,u=.5*s,c=.5*((i=u$Z(i,1))-t),h=l,d=u,f=c,p=r+l,_=o+u,m=t+c;return n[0]=h,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=d,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=f,n[11]=0,n[12]=p,n[13]=_,n[14]=m,n[15]=1,n},p$1d.computeView=function(e,t,i,n,r){return o$1q.typeOf.object("position",e),o$1q.typeOf.object("direction",t),o$1q.typeOf.object("up",i),o$1q.typeOf.object("right",n),o$1q.typeOf.object("result",r),r[0]=n.x,r[1]=i.x,r[2]=-t.x,r[3]=0,r[4]=n.y,r[5]=i.y,r[6]=-t.y,r[7]=0,r[8]=n.z,r[9]=i.z,r[10]=-t.z,r[11]=0,r[12]=-o$1p.dot(n,e),r[13]=-o$1p.dot(i,e),r[14]=o$1p.dot(t,e),r[15]=1,r},p$1d.toArray=function(e,t){return o$1q.typeOf.object("matrix",e),e$2e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},p$1d.getElementIndex=function(e,t){return o$1q.typeOf.number.greaterThanOrEquals("row",t,0),o$1q.typeOf.number.lessThanOrEquals("row",t,3),o$1q.typeOf.number.greaterThanOrEquals("column",e,0),o$1q.typeOf.number.lessThanOrEquals("column",e,3),4*e+t},p$1d.getColumn=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("result",i);var n=4*t,r=e[n],o=e[n+1],a=e[n+2],s=e[n+3];return i.x=r,i.y=o,i.z=a,i.w=s,i},p$1d.setColumn=function(e,t,i,n){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n);var r=4*t;return(n=p$1d.clone(e,n))[r]=i.x,n[r+1]=i.y,n[r+2]=i.z,n[r+3]=i.w,n},p$1d.setTranslation=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("translation",t),o$1q.typeOf.object("result",i),i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=e[15],i};var p0=new o$1p;p$1d.setScale=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i);var n=p$1d.getScale(e,p0),r=o$1p.divideComponents(t,n,p0);return p$1d.multiplyByScale(e,r,i)},p$1d.getRow=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("result",i);var n=e[t],r=e[t+4],o=e[t+8],a=e[t+12];return i.x=n,i.y=r,i.z=o,i.w=a,i},p$1d.setRow=function(e,t,i,n){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n),(n=p$1d.clone(e,n))[t]=i.x,n[t+4]=i.y,n[t+8]=i.z,n[t+12]=i.w,n};var O0=new o$1p;p$1d.getScale=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=o$1p.magnitude(o$1p.fromElements(e[0],e[1],e[2],O0)),t.y=o$1p.magnitude(o$1p.fromElements(e[4],e[5],e[6],O0)),t.z=o$1p.magnitude(o$1p.fromElements(e[8],e[9],e[10],O0)),t};var f0$1=new o$1p;p$1d.getMaximumScale=function(e){return p$1d.getScale(e,f0$1),o$1p.maximumComponent(f0$1)},p$1d.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=e[10],p=e[11],_=e[12],m=e[13],g=e[14],x=e[15],y=t[0],v=t[1],$=t[2],b=t[3],T=t[4],C=t[5],S=t[6],w=t[7],E=t[8],P=t[9],A=t[10],L=t[11],M=t[12],R=t[13],O=t[14],D=t[15],I=n*y+s*v+h*$+_*b,F=r*y+l*v+d*$+m*b,B=o*y+u*v+f*$+g*b,N=a*y+c*v+p*$+x*b,G=n*T+s*C+h*S+_*w,z=r*T+l*C+d*S+m*w,U=o*T+u*C+f*S+g*w,V=a*T+c*C+p*S+x*w,k=n*E+s*P+h*A+_*L,W=r*E+l*P+d*A+m*L,H=o*E+u*P+f*A+g*L,q=a*E+c*P+p*A+x*L,j=n*M+s*R+h*O+_*D,X=r*M+l*R+d*O+m*D,Y=o*M+u*R+f*O+g*D,Z=a*M+c*R+p*O+x*D;return i[0]=I,i[1]=F,i[2]=B,i[3]=N,i[4]=G,i[5]=z,i[6]=U,i[7]=V,i[8]=k,i[9]=W,i[10]=H,i[11]=q,i[12]=j,i[13]=X,i[14]=Y,i[15]=Z,i},p$1d.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i[9]=e[9]+t[9],i[10]=e[10]+t[10],i[11]=e[11]+t[11],i[12]=e[12]+t[12],i[13]=e[13]+t[13],i[14]=e[14]+t[14],i[15]=e[15]+t[15],i},p$1d.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i[9]=e[9]-t[9],i[10]=e[10]-t[10],i[11]=e[11]-t[11],i[12]=e[12]-t[12],i[13]=e[13]-t[13],i[14]=e[14]-t[14],i[15]=e[15]-t[15],i},p$1d.multiplyTransformation=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],c=e[9],h=e[10],d=e[12],f=e[13],p=e[14],_=t[0],m=t[1],g=t[2],x=t[4],y=t[5],v=t[6],$=t[8],b=t[9],T=t[10],C=t[12],S=t[13],w=t[14],E=n*_+a*m+u*g,P=r*_+s*m+c*g,A=o*_+l*m+h*g,L=n*x+a*y+u*v,M=r*x+s*y+c*v,R=o*x+l*y+h*v,O=n*$+a*b+u*T,D=r*$+s*b+c*T,I=o*$+l*b+h*T,F=n*C+a*S+u*w+d,B=r*C+s*S+c*w+f,N=o*C+l*S+h*w+p;return i[0]=E,i[1]=P,i[2]=A,i[3]=0,i[4]=L,i[5]=M,i[6]=R,i[7]=0,i[8]=O,i[9]=D,i[10]=I,i[11]=0,i[12]=F,i[13]=B,i[14]=N,i[15]=1,i},p$1d.multiplyByMatrix3=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("rotation",t),o$1q.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],c=e[9],h=e[10],d=t[0],f=t[1],p=t[2],_=t[3],m=t[4],g=t[5],x=t[6],y=t[7],v=t[8],$=n*d+a*f+u*p,b=r*d+s*f+c*p,T=o*d+l*f+h*p,C=n*_+a*m+u*g,S=r*_+s*m+c*g,w=o*_+l*m+h*g,E=n*x+a*y+u*v,P=r*x+s*y+c*v,A=o*x+l*y+h*v;return i[0]=$,i[1]=b,i[2]=T,i[3]=0,i[4]=C,i[5]=S,i[6]=w,i[7]=0,i[8]=E,i[9]=P,i[10]=A,i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},p$1d.multiplyByTranslation=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("translation",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=n*e[0]+r*e[4]+o*e[8]+e[12],s=n*e[1]+r*e[5]+o*e[9]+e[13],l=n*e[2]+r*e[6]+o*e[10]+e[14];return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=a,i[13]=s,i[14]=l,i[15]=e[15],i};var r$1f=new o$1p;p$1d.multiplyByUniformScale=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scale",t),o$1q.typeOf.object("result",i),r$1f.x=t,r$1f.y=t,r$1f.z=t,p$1d.multiplyByScale(e,r$1f,i)},p$1d.multiplyByScale=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z;return 1===n&&1===r&&1===o?p$1d.clone(e,i):(i[0]=n*e[0],i[1]=n*e[1],i[2]=n*e[2],i[3]=0,i[4]=r*e[4],i[5]=r*e[5],i[6]=r*e[6],i[7]=0,i[8]=o*e[8],i[9]=o*e[9],i[10]=o*e[10],i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=1,i)},p$1d.multiplyByVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=t.w,s=e[0]*n+e[4]*r+e[8]*o+e[12]*a,l=e[1]*n+e[5]*r+e[9]*o+e[13]*a,u=e[2]*n+e[6]*r+e[10]*o+e[14]*a,c=e[3]*n+e[7]*r+e[11]*o+e[15]*a;return i.x=s,i.y=l,i.z=u,i.w=c,i},p$1d.multiplyByPointAsVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[4]*r+e[8]*o,s=e[1]*n+e[5]*r+e[9]*o,l=e[2]*n+e[6]*r+e[10]*o;return i.x=a,i.y=s,i.z=l,i},p$1d.multiplyByPoint=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[4]*r+e[8]*o+e[12],s=e[1]*n+e[5]*r+e[9]*o+e[13],l=e[2]*n+e[6]*r+e[10]*o+e[14];return i.x=a,i.y=s,i.z=l,i},p$1d.multiplyByDirection=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z;return i.x=n*e[0]+r*e[4]+o*e[8],i.y=n*e[1]+r*e[5]+o*e[9],i.z=n*e[2]+r*e[6]+o*e[10],i},p$1d.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i[9]=e[9]*t,i[10]=e[10]*t,i[11]=e[11]*t,i[12]=e[12]*t,i[13]=e[13]*t,i[14]=e[14]*t,i[15]=e[15]*t,i},p$1d.multiplyByPlane=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("plane",t),o$1q.typeOf.object("result",i);var n=new p$1d,r=new p$1d;p$1d.inverse(e,n),p$1d.transpose(n,r);var o=new e$2c(t.normal.x,t.normal.y,t.normal.z,t.distance);p$1d.multiplyByVector(r,o,o),i.normal.x=o.x,i.normal.y=o.y,i.normal.z=o.z;var a=o$1p.magnitude(i.normal);return o$1p.normalize(i.normal,i.normal),i.distance=o.w/a,i},p$1d.negate=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},p$1d.transpose=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[1],n=e[2],r=e[3],o=e[6],a=e[7],s=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=i,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[10]=e[10],t[11]=e[14],t[12]=r,t[13]=a,t[14]=s,t[15]=e[15],t},p$1d.abs=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},p$1d.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},p$1d.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i&&Math.abs(e[9]-t[9])<=i&&Math.abs(e[10]-t[10])<=i&&Math.abs(e[11]-t[11])<=i&&Math.abs(e[12]-t[12])<=i&&Math.abs(e[13]-t[13])<=i&&Math.abs(e[14]-t[14])<=i&&Math.abs(e[15]-t[15])<=i},p$1d.getTranslation=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=e[12],t.y=e[13],t.z=e[14],t},p$1d.getMatrix3=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},p$1d.getRotation=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var z0=new p$1e,h0$2=new p$1e,C0=new e$2c,T0=new e$2c(0,0,0,1);p$1d.inverse=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[4],r=e[8],o=e[12],a=e[1],s=e[5],l=e[9],u=e[13],c=e[2],h=e[6],d=e[10],f=e[14],p=e[3],_=e[7],m=e[11],g=e[15],x=d*g,y=f*m,v=h*g,$=f*_,b=h*m,T=d*_,C=c*g,S=f*p,w=c*m,E=d*p,P=c*_,A=h*p,L=x*s+$*l+b*u-(y*s+v*l+T*u),M=y*a+C*l+E*u-(x*a+S*l+w*u),R=v*a+S*s+P*u-($*a+C*s+A*u),O=T*a+w*s+A*l-(b*a+E*s+P*l),D=y*n+v*r+T*o-(x*n+$*r+b*o),I=x*i+S*r+w*o-(y*i+C*r+E*o),F=$*i+C*n+A*o-(v*i+S*n+P*o),B=b*i+E*n+P*r-(T*i+w*n+A*r),N=(x=r*u)*_+($=o*s)*m+(b=n*l)*g-((y=o*l)*_+(v=n*u)*m+(T=r*s)*g),G=y*p+(C=i*u)*m+(E=r*a)*g-(x*p+(S=o*a)*m+(w=i*l)*g),z=v*p+S*_+(P=i*s)*g-($*p+C*_+(A=n*a)*g),U=T*p+w*_+A*m-(b*p+E*_+P*m),V=v*d+T*f+y*h-(b*f+x*h+$*d),k=w*f+x*c+S*d-(C*d+E*f+y*c),W=C*h+A*f+$*c-(P*f+v*c+S*h),H=P*d+b*c+E*h-(w*h+A*d+T*c),q=i*L+n*M+r*R+o*O;if(Math.abs(q)<e$2d.EPSILON21){if(p$1e.equalsEpsilon(p$1d.getRotation(e,z0),h0$2,e$2d.EPSILON5)&&e$2c.equals(p$1d.getRow(e,3,C0),T0))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new t$13("matrix is not invertible because its determinate is zero.")}return q=1/q,t[0]=L*q,t[1]=M*q,t[2]=R*q,t[3]=O*q,t[4]=D*q,t[5]=I*q,t[6]=F*q,t[7]=B*q,t[8]=N*q,t[9]=G*q,t[10]=z*q,t[11]=U*q,t[12]=V*q,t[13]=k*q,t[14]=W*q,t[15]=H*q,t},p$1d.inverseTransformation=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[1],r=e[2],o=e[4],a=e[5],s=e[6],l=e[8],u=e[9],c=e[10],h=e[12],d=e[13],f=e[14],p=-i*h-n*d-r*f,_=-o*h-a*d-s*f,m=-l*h-u*d-c*f;return t[0]=i,t[1]=o,t[2]=l,t[3]=0,t[4]=n,t[5]=a,t[6]=u,t[7]=0,t[8]=r,t[9]=s,t[10]=c,t[11]=0,t[12]=p,t[13]=_,t[14]=m,t[15]=1,t},p$1d.IDENTITY=Object.freeze(new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),p$1d.ZERO=Object.freeze(new p$1d(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),p$1d.ConvertNDCToHalfZRange=Object.freeze(new p$1d(1,0,0,0,0,1,0,0,0,0,.5,.5,0,0,0,1)),p$1d.COLUMN0ROW0=0,p$1d.COLUMN0ROW1=1,p$1d.COLUMN0ROW2=2,p$1d.COLUMN0ROW3=3,p$1d.COLUMN1ROW0=4,p$1d.COLUMN1ROW1=5,p$1d.COLUMN1ROW2=6,p$1d.COLUMN1ROW3=7,p$1d.COLUMN2ROW0=8,p$1d.COLUMN2ROW1=9,p$1d.COLUMN2ROW2=10,p$1d.COLUMN2ROW3=11,p$1d.COLUMN3ROW0=12,p$1d.COLUMN3ROW1=13,p$1d.COLUMN3ROW2=14,p$1d.COLUMN3ROW3=15,p$1d.halfZRange=!1,Object.defineProperties(p$1d.prototype,{length:{get:function(){return p$1d.packedLength}}}),p$1d.prototype.clone=function(e){return p$1d.clone(this,e)},p$1d.prototype.equals=function(e){return p$1d.equals(this,e)},p$1d.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]&&e[9]===t[i+9]&&e[10]===t[i+10]&&e[11]===t[i+11]&&e[12]===t[i+12]&&e[13]===t[i+13]&&e[14]===t[i+14]&&e[15]===t[i+15]},p$1d.prototype.equalsEpsilon=function(e,t){return p$1d.equalsEpsilon(this,e,t)},p$1d.prototype.toString=function(){return"("+this[0]+", "+this[4]+", "+this[8]+", "+this[12]+")\n("+this[1]+", "+this[5]+", "+this[9]+", "+this[13]+")\n("+this[2]+", "+this[6]+", "+this[10]+", "+this[14]+")\n("+this[3]+", "+this[7]+", "+this[11]+", "+this[15]+")"},p$1d.prototype.toArray=function(e,t){p$1d.pack(this,e,t)};var e$2b={NONE:0,GEODESIC:1,RHUMB:2},m$1h=Object.freeze(e$2b);function d$1s(e,t,i,n){if(o$1q.defined("array",e),o$1q.defined("value",t),e$2e(i)&&o$1q.typeOf.number("start",i),e$2e(n)&&o$1q.typeOf.number("end",n),"function"==typeof e.fill)return e.fill(t,i,n);for(var r=e.length>>>0,o=u$Z(i,0),a=o<0?Math.max(r+o,0):Math.min(o,r),s=u$Z(n,r),l=s<0?Math.max(r+s,0):Math.min(s,r);a<l;)e[a]=t,a++;return e}function o$1o(e,t){this.x=u$Z(e,0),this.y=u$Z(t,0)}o$1o.fromElements=function(e,t,i){return e$2e(i)?(i.x=e,i.y=t,i):new o$1o(e,t)},o$1o.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.x=e.x,t.y=e.y,t):new o$1o(e.x,e.y)},o$1o.fromCartesian3=o$1o.clone,o$1o.fromCartesian4=o$1o.clone,o$1o.packedLength=2,o$1o.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.x,t[i]=e.y,t},o$1o.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new o$1o),i.x=e[t++],i.y=e[t],i},o$1o.packArray=function(e,t){o$1q.defined("array",e);var i=e.length,n=2*i;if(e$2e(t)){if(!Array.isArray(t)&&t.length!==n)throw new t$15("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)o$1o.pack(e[r],t,2*r);return t},o$1o.unpackArray=function(e,t){if(o$1q.defined("array",e),o$1q.typeOf.number.greaterThanOrEquals("array.length",e.length,2),e.length%2!=0)throw new t$15("array length must be a multiple of 2.");var i=e.length;e$2e(t)?t.length=i/2:t=new Array(i/2);for(var n=0;n<i;n+=2){var r=n/2;t[r]=o$1o.unpack(e,n,t[r])}return t},o$1o.fromArray=o$1o.unpack,o$1o.maximumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.max(e.x,e.y)},o$1o.minimumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.min(e.x,e.y)},o$1o.minimumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i},o$1o.maximumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i},o$1o.magnitudeSquared=function(e){return o$1q.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y},o$1o.magnitude=function(e){return Math.sqrt(o$1o.magnitudeSquared(e))};var i$1e=new o$1o;o$1o.distance=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1o.subtract(e,t,i$1e),o$1o.magnitude(i$1e)},o$1o.distanceSquared=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1o.subtract(e,t,i$1e),o$1o.magnitudeSquared(i$1e)},o$1o.normalize=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1o.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,isNaN(t.x)||isNaN(t.y))throw new t$15("normalized result is not a number");return t},o$1o.dot=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.x*t.x+e.y*t.y},o$1o.multiplyComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i},o$1o.divideComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i},o$1o.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i},o$1o.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i},o$1o.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i},o$1o.divideByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i},o$1o.negate=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t},o$1o.abs=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var m$1g=new o$1o;o$1o.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),o$1o.multiplyByScalar(t,i,m$1g),n=o$1o.multiplyByScalar(e,1-i,n),o$1o.add(m$1g,n,n)};var b$1i=new o$1o,O$Z=new o$1o;o$1o.angleBetween=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1o.normalize(e,b$1i),o$1o.normalize(t,O$Z),e$2d.acosClamped(o$1o.dot(b$1i,O$Z))};var x$1n=new o$1o;function _$16(e,t,i,n){t=u$Z(t,0),i=u$Z(i,0),n=u$Z(n,0),o$1q.typeOf.number.greaterThanOrEquals("x",t,0),o$1q.typeOf.number.greaterThanOrEquals("y",i,0),o$1q.typeOf.number.greaterThanOrEquals("z",n,0),e._radii=new o$1p(t,i,n),e._radiiSquared=new o$1p(t*t,i*i,n*n),e._radiiToTheFourth=new o$1p(t*t*t*t,i*i*i*i,n*n*n*n),e._oneOverRadii=new o$1p(0===t?0:1/t,0===i?0:1/i,0===n?0:1/n),e._oneOverRadiiSquared=new o$1p(0===t?0:1/(t*t),0===i?0:1/(i*i),0===n?0:1/(n*n)),e._minimumRadius=Math.min(t,i,n),e._maximumRadius=Math.max(t,i,n),e._centerToleranceSquared=e$2d.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function t$12(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,_$16(this,e,t,i)}o$1o.mostOrthogonalAxis=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1o.normalize(e,x$1n);return o$1o.abs(i,i),t=i.x<=i.y?o$1o.clone(o$1o.UNIT_X,t):o$1o.clone(o$1o.UNIT_Y,t)},o$1o.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.x===t.x&&e.y===t.y},o$1o.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]},o$1o.equalsEpsilon=function(e,t,i,n){return e===t||e$2e(e)&&e$2e(t)&&e$2d.equalsEpsilon(e.x,t.x,i,n)&&e$2d.equalsEpsilon(e.y,t.y,i,n)},o$1o.ZERO=Object.freeze(new o$1o(0,0)),o$1o.UNIT_X=Object.freeze(new o$1o(1,0)),o$1o.UNIT_Y=Object.freeze(new o$1o(0,1)),o$1o.prototype.clone=function(e){return o$1o.clone(this,e)},o$1o.prototype.equals=function(e){return o$1o.equals(this,e)},o$1o.prototype.equalsEpsilon=function(e,t,i){return o$1o.equalsEpsilon(this,e,t,i)},o$1o.prototype.toString=function(){return"("+this.x+", "+this.y+")"},o$1o.prototype.toArray=function(e,t){o$1o.pack(this,e,t)},Object.defineProperties(t$12.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),t$12.clone=function(e,t){if(e$2e(e)){var i=e._radii;return e$2e(t)?(o$1p.clone(i,t._radii),o$1p.clone(e._radiiSquared,t._radiiSquared),o$1p.clone(e._radiiToTheFourth,t._radiiToTheFourth),o$1p.clone(e._oneOverRadii,t._oneOverRadii),o$1p.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new t$12(i.x,i.y,i.z)}},t$12.fromCartesian3=function(e,t){return e$2e(t)||(t=new t$12),e$2e(e)&&_$16(t,e.x,e.y,e.z),t},t$12.WGS84=Object.freeze(new t$12(6378137,6378137,6356752.314245179)),t$12.XIAN80=Object.freeze(new t$12(6378140,6378140,6356755.29)),t$12.CGCS2000=Object.freeze(new t$12(6378137,6378137,6356752.31)),t$12.UNIT_SPHERE=Object.freeze(new t$12(1,1,1)),t$12.MOON=Object.freeze(new t$12(e$2d.LUNAR_RADIUS,e$2d.LUNAR_RADIUS,e$2d.LUNAR_RADIUS)),t$12.prototype.clone=function(e){return t$12.clone(this,e)},t$12.packedLength=o$1p.packedLength,t$12.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),o$1p.pack(e._radii,t,i),t},t$12.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=o$1p.unpack(e,t);return t$12.fromCartesian3(n,i)},t$12.prototype.geocentricSurfaceNormal=o$1p.normalize,t$12.prototype.geodeticSurfaceNormalCartographic=function(e,t){o$1q.typeOf.object("cartographic",e);var i=e.longitude,n=e.latitude,r=Math.cos(n),o=r*Math.cos(i),a=r*Math.sin(i),s=Math.sin(n);return e$2e(t)||(t=new o$1p),t.x=o,t.y=a,t.z=s,o$1p.normalize(t,t)},t$12.prototype.geodeticSurfaceNormal=function(e,t){return e$2e(t)||(t=new o$1p),t=o$1p.multiplyComponents(e,this._oneOverRadiiSquared,t),o$1p.normalize(t,t)};var g$1l=new o$1p,q$1i=new o$1p;t$12.prototype.cartographicToCartesian=function(e,t){var i=g$1l,n=q$1i;this.geodeticSurfaceNormalCartographic(e,i),o$1p.multiplyComponents(this._radiiSquared,i,n);var r=Math.sqrt(o$1p.dot(i,n));return o$1p.divideByScalar(n,r,n),o$1p.multiplyByScalar(i,e.height,i),e$2e(t)||(t=new o$1p),o$1p.add(n,i,t)},t$12.prototype.cartographicArrayToCartesianArray=function(e,t){o$1q.defined("cartographics",e);var i=e.length;e$2e(t)?t.length=i:t=new Array(i);for(var n=0;n<i;n++)t[n]=this.cartographicToCartesian(e[n],t[n]);return t};var T$1f=new o$1p,R$17=new o$1p,y$13=new o$1p;function n$1d(e){this._ellipsoid=u$Z(e,t$12.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}t$12.prototype.cartesianToCartographic=function(e,t){var i=this.scaleToGeodeticSurface(e,R$17);if(e$2e(i)){var n=this.geodeticSurfaceNormal(i,T$1f),r=o$1p.subtract(e,i,y$13),o=Math.atan2(n.y,n.x),a=Math.asin(n.z),s=e$2d.sign(o$1p.dot(r,e))*o$1p.magnitude(r);return e$2e(t)?(t.longitude=o,t.latitude=a,t.height=s,t):new a$18(o,a,s)}},t$12.prototype.cartesianArrayToCartographicArray=function(e,t){o$1q.defined("cartesians",e);var i=e.length;e$2e(t)?t.length=i:t=new Array(i);for(var n=0;n<i;++n)t[n]=this.cartesianToCartographic(e[n],t[n]);return t},t$12.prototype.scaleToGeodeticSurface=function(e,t){return P$1d(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},t$12.prototype.scaleToGeocentricSurface=function(e,t){o$1q.typeOf.object("cartesian",e),e$2e(t)||(t=new o$1p);var i=e.x,n=e.y,r=e.z,o=this._oneOverRadiiSquared,a=1/Math.sqrt(i*i*o.x+n*n*o.y+r*r*o.z);return o$1p.multiplyByScalar(e,a,t)},t$12.prototype.transformPositionToScaledSpace=function(e,t){return e$2e(t)||(t=new o$1p),o$1p.multiplyComponents(e,this._oneOverRadii,t)},t$12.prototype.transformPositionFromScaledSpace=function(e,t){return e$2e(t)||(t=new o$1p),o$1p.multiplyComponents(e,this._radii,t)},t$12.prototype.equals=function(e){return this===e||e$2e(e)&&o$1p.equals(this._radii,e._radii)},t$12.prototype.toString=function(){return this._radii.toString()},t$12.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,i){if(o$1q.typeOf.object("position",e),!e$2d.equalsEpsilon(this._radii.x,this._radii.y,e$2d.EPSILON15))throw new t$15("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");o$1q.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),t=u$Z(t,0);var n=this._squaredXOverSquaredZ;if(e$2e(i)||(i=new o$1p),i.x=0,i.y=0,i.z=e.z*(1-n),!(Math.abs(i.z)>=this._radii.z-t))return i},Object.defineProperties(n$1d.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),n$1d.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=e.latitude*i,o=e.height;return e$2e(t)?(t.x=n,t.y=r,t.z=o,t):new o$1p(n,r,o)},n$1d.prototype.unproject=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=e.y*i,o=e.z;return e$2e(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new a$18(n,r,o)};var e$2a={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Ae$w=Object.freeze(e$2a);function h$18(e,t,i,n){this.west=u$Z(e,0),this.south=u$Z(t,0),this.east=u$Z(i,0),this.north=u$Z(n,0)}Object.defineProperties(h$18.prototype,{width:{get:function(){return h$18.computeWidth(this)}},height:{get:function(){return h$18.computeHeight(this)}}}),h$18.packedLength=4,h$18.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.west,t[i++]=e.south,t[i++]=e.east,t[i]=e.north,t},h$18.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new h$18),i.west=e[t++],i.south=e[t++],i.east=e[t++],i.north=e[t],i},h$18.computeWidth=function(e){o$1q.typeOf.object("rectangle",e);var t=e.east,i=e.west;return t<i&&(t+=e$2d.TWO_PI),t-i},h$18.computeHeight=function(e){return o$1q.typeOf.object("rectangle",e),e.north-e.south},h$18.fromDegrees=function(e,t,i,n,r){return e=e$2d.toRadians(u$Z(e,0)),t=e$2d.toRadians(u$Z(t,0)),i=e$2d.toRadians(u$Z(i,0)),n=e$2d.toRadians(u$Z(n,0)),e$2e(r)?(r.west=e,r.south=t,r.east=i,r.north=n,r):new h$18(e,t,i,n)},h$18.fromRadians=function(e,t,i,n,r){return e$2e(r)?(r.west=u$Z(e,0),r.south=u$Z(t,0),r.east=u$Z(i,0),r.north=u$Z(n,0),r):new h$18(e,t,i,n)},h$18.fromCartographicArray=function(e,t){o$1q.defined("cartographics",e);for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0,u=e.length;l<u;l++){var c=e[l];i=Math.min(i,c.longitude),n=Math.max(n,c.longitude),a=Math.min(a,c.latitude),s=Math.max(s,c.latitude);var h=c.longitude>=0?c.longitude:c.longitude+e$2d.TWO_PI;r=Math.min(r,h),o=Math.max(o,h)}return n-i>o-r&&(i=r,(n=o)>e$2d.PI&&(n-=e$2d.TWO_PI),i>e$2d.PI&&(i-=e$2d.TWO_PI)),e$2e(t)?(t.west=i,t.south=a,t.east=n,t.north=s,t):new h$18(i,a,n,s)},h$18.fromCartesianArray=function(e,t,i){o$1q.defined("cartesians",e),t=u$Z(t,t$12.WGS84);for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0,c=e.length;u<c;u++){var h=t.cartesianToCartographic(e[u]);n=Math.min(n,h.longitude),r=Math.max(r,h.longitude),s=Math.min(s,h.latitude),l=Math.max(l,h.latitude);var d=h.longitude>=0?h.longitude:h.longitude+e$2d.TWO_PI;o=Math.min(o,d),a=Math.max(a,d)}return r-n>a-o&&(n=o,(r=a)>e$2d.PI&&(r-=e$2d.TWO_PI),n>e$2d.PI&&(n-=e$2d.TWO_PI)),e$2e(i)?(i.west=n,i.south=s,i.east=r,i.north=l,i):new h$18(n,s,r,l)},h$18.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new h$18(e.west,e.south,e.east,e.north)},h$18.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("absoluteEpsilon",i),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},h$18.prototype.clone=function(e){return h$18.clone(this,e)},h$18.prototype.equals=function(e){return h$18.equals(this,e)},h$18.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},h$18.prototype.equalsEpsilon=function(e,t){return o$1q.typeOf.number("epsilon",t),h$18.equalsEpsilon(this,e,t)},h$18.validate=function(e){o$1q.typeOf.object("rectangle",e);var t=e.north;o$1q.typeOf.number.greaterThanOrEquals("north",t,-e$2d.PI_OVER_TWO),o$1q.typeOf.number.lessThanOrEquals("north",t,e$2d.PI_OVER_TWO);var i=e.south;o$1q.typeOf.number.greaterThanOrEquals("south",i,-e$2d.PI_OVER_TWO),o$1q.typeOf.number.lessThanOrEquals("south",i,e$2d.PI_OVER_TWO);var n=e.west;o$1q.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),o$1q.typeOf.number.lessThanOrEquals("west",n,Math.PI);var r=e.east;o$1q.typeOf.number.greaterThanOrEquals("east",r,-Math.PI),o$1q.typeOf.number.lessThanOrEquals("east",r,Math.PI)},h$18.southwest=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2e(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new a$18(e.west,e.south)},h$18.northwest=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2e(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new a$18(e.west,e.north)},h$18.northeast=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2e(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new a$18(e.east,e.north)},h$18.southeast=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2e(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new a$18(e.east,e.south)},h$18.center=function(e,t){o$1q.typeOf.object("rectangle",e);var i=e.east,n=e.west;i<n&&(i+=e$2d.TWO_PI);var r=e$2d.negativePiToPi(.5*(n+i)),o=.5*(e.south+e.north);return e$2e(t)?(t.longitude=r,t.latitude=o,t.height=0,t):new a$18(r,o)},h$18.intersection=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("otherRectangle",t);var n=e.east,r=e.west,o=t.east,a=t.west;n<r&&o>0?n+=e$2d.TWO_PI:o<a&&n>0&&(o+=e$2d.TWO_PI),n<r&&a<0?a+=e$2d.TWO_PI:o<a&&r<0&&(r+=e$2d.TWO_PI);var s=e$2d.negativePiToPi(Math.max(r,a)),l=e$2d.negativePiToPi(Math.min(n,o));if(!((e.west<e.east||t.west<t.east)&&l<=s)){var u=Math.max(e.south,t.south),c=Math.min(e.north,t.north);if(!(u>=c))return e$2e(i)?(i.west=s,i.south=u,i.east=l,i.north=c,i):new h$18(s,u,l,c)}},h$18.simpleIntersection=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("otherRectangle",t);var n=Math.max(e.west,t.west),r=Math.max(e.south,t.south),o=Math.min(e.east,t.east),a=Math.min(e.north,t.north);if(!(r>=a||n>=o))return e$2e(i)?(i.west=n,i.south=r,i.east=o,i.north=a,i):new h$18(n,r,o,a)},h$18.union=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("otherRectangle",t),e$2e(i)||(i=new h$18);var n=e.east,r=e.west,o=t.east,a=t.west;n<r&&o>0?n+=e$2d.TWO_PI:o<a&&n>0&&(o+=e$2d.TWO_PI),n<r&&a<0?a+=e$2d.TWO_PI:o<a&&r<0&&(r+=e$2d.TWO_PI);var s=e$2d.convertLongitudeRange(Math.min(r,a)),l=e$2d.convertLongitudeRange(Math.max(n,o));return i.west=s,i.south=Math.min(e.south,t.south),i.east=l,i.north=Math.max(e.north,t.north),i},h$18.expand=function(e,t,i){return o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("cartographic",t),e$2e(i)||(i=new h$18),i.west=Math.min(e.west,t.longitude),i.south=Math.min(e.south,t.latitude),i.east=Math.max(e.east,t.longitude),i.north=Math.max(e.north,t.latitude),i},h$18.contains=function(e,t){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("cartographic",t);var i=t.longitude,n=t.latitude,r=e.west,o=e.east;return o<r&&(o+=e$2d.TWO_PI,i<0&&(i+=e$2d.TWO_PI)),(i>r||e$2d.equalsEpsilon(i,r,e$2d.EPSILON14))&&(i<o||e$2d.equalsEpsilon(i,o,e$2d.EPSILON14))&&n>=e.south&&n<=e.north};var T$1e=new a$18;h$18.subsample=function(e,t,i,n){o$1q.typeOf.object("rectangle",e),t=u$Z(t,t$12.WGS84),i=u$Z(i,0),e$2e(n)||(n=[]);var r=0,o=e.north,a=e.south,s=e.east,l=e.west,u=T$1e;u.height=i,u.longitude=l,u.latitude=o,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=a,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=o<0?o:a>0?a:0;for(var c=1;c<8;++c)u.longitude=-Math.PI+c*e$2d.PI_OVER_TWO,h$18.contains(e,u)&&(n[r]=t.cartographicToCartesian(u,n[r]),r++);return 0===u.latitude&&(u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++),n.length=r,n};var p$1c=new a$18;function f$1a(e,t,i,n){this.x=u$Z(e,0),this.y=u$Z(t,0),this.width=u$Z(i,0),this.height=u$Z(n,0)}h$18.prototype.contains=function(e){return h$18.contains(this,h$18.southwest(e,p$1c))&&h$18.contains(this,h$18.northwest(e,p$1c))&&h$18.contains(this,h$18.southeast(e,p$1c))&&h$18.contains(this,h$18.northeast(e,p$1c))},h$18.MAX_VALUE=Object.freeze(new h$18(-Math.PI,-e$2d.PI_OVER_TWO,Math.PI,e$2d.PI_OVER_TWO)),f$1a.packedLength=4,f$1a.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.width,t[i]=e.height,t},f$1a.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new f$1a),i.x=e[t++],i.y=e[t++],i.width=e[t++],i.height=e[t],i},f$1a.fromPoints=function(e,t){if(e$2e(t)||(t=new f$1a),!e$2e(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,n=e[0].x,r=e[0].y,o=e[0].x,a=e[0].y,s=1;s<i;s++){var l=e[s],u=l.x,c=l.y;n=Math.min(u,n),o=Math.max(u,o),r=Math.min(c,r),a=Math.max(c,a)}return t.x=n,t.y=r,t.width=o-n,t.height=a-r,t};var O$Y=new n$1d,g$1k=new a$18,r$1e=new a$18;function o$1n(e,t){this.start=u$Z(e,0),this.stop=u$Z(t,0)}function i$1d(e,t){this.center=o$1p.clone(u$Z(e,o$1p.ZERO)),this.radius=u$Z(t,0)}f$1a.fromRectangle=function(e,t,i){if(e$2e(i)||(i=new f$1a),!e$2e(e))return i.x=0,i.y=0,i.width=0,i.height=0,i;var n=(t=u$Z(t,O$Y)).project(h$18.southwest(e,g$1k)),r=t.project(h$18.northeast(e,r$1e));return o$1o.subtract(r,n,r),i.x=n.x,i.y=n.y,i.width=r.x,i.height=r.y,i},f$1a.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new f$1a(e.x,e.y,e.width,e.height)},f$1a.union=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e$2e(i)||(i=new f$1a);var n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),o=Math.max(e.x+e.width,t.x+t.width),a=Math.max(e.y+e.height,t.y+t.height);return i.x=n,i.y=r,i.width=o-n,i.height=a-r,i},f$1a.expand=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("point",t),i=f$1a.clone(e,i);var n=t.x-i.x,r=t.y-i.y;return n>i.width?i.width=n:n<0&&(i.width-=n,i.x=t.x),r>i.height?i.height=r:r<0&&(i.height-=r,i.y=t.y),i},f$1a.intersect=function(e,t){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t);var i=e.x,n=e.y,r=t.x,o=t.y;return i>r+t.width||i+e.width<r||n+e.height<o||n>o+t.height?Ae$w.OUTSIDE:Ae$w.INTERSECTING},f$1a.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},f$1a.prototype.clone=function(e){return f$1a.clone(this,e)},f$1a.prototype.intersect=function(e){return f$1a.intersect(this,e)},f$1a.prototype.equals=function(e){return f$1a.equals(this,e)};var T$1d=new o$1p,F$1k=new o$1p,I$1x=new o$1p,J$17=new o$1p,K$15=new o$1p,Q$1d=new o$1p,$$18=new o$1p,M$1d=new o$1p,L$1l=new o$1p,H$1g=new o$1p,s$11=new o$1p,aa$8=new o$1p,da$4=4/3*e$2d.PI;i$1d.fromPoints=function(e,t){if(e$2e(t)||(t=new i$1d),!e$2e(e)||0===e.length)return t.center=o$1p.clone(o$1p.ZERO,t.center),t.radius=0,t;var i,n=o$1p.clone(e[0],$$18),r=o$1p.clone(n,T$1d),o=o$1p.clone(n,F$1k),a=o$1p.clone(n,I$1x),s=o$1p.clone(n,J$17),l=o$1p.clone(n,K$15),u=o$1p.clone(n,Q$1d),c=e.length;for(i=1;i<c;i++){o$1p.clone(e[i],n);var h=n.x,d=n.y,f=n.z;h<r.x&&o$1p.clone(n,r),h>s.x&&o$1p.clone(n,s),d<o.y&&o$1p.clone(n,o),d>l.y&&o$1p.clone(n,l),f<a.z&&o$1p.clone(n,a),f>u.z&&o$1p.clone(n,u)}var p=o$1p.magnitudeSquared(o$1p.subtract(s,r,M$1d)),_=o$1p.magnitudeSquared(o$1p.subtract(l,o,M$1d)),m=o$1p.magnitudeSquared(o$1p.subtract(u,a,M$1d)),g=r,x=s,y=p;_>y&&(y=_,g=o,x=l),m>y&&(y=m,g=a,x=u);var v=L$1l;v.x=.5*(g.x+x.x),v.y=.5*(g.y+x.y),v.z=.5*(g.z+x.z);var $=o$1p.magnitudeSquared(o$1p.subtract(x,v,M$1d)),b=Math.sqrt($),T=H$1g;T.x=r.x,T.y=o.y,T.z=a.z;var C=s$11;C.x=s.x,C.y=l.y,C.z=u.z;var S=o$1p.midpoint(T,C,aa$8),w=0;for(i=0;i<c;i++){o$1p.clone(e[i],n);var E=o$1p.magnitude(o$1p.subtract(n,S,M$1d));E>w&&(w=E);var P=o$1p.magnitudeSquared(o$1p.subtract(n,v,M$1d));if(P>$){var A=Math.sqrt(P);$=(b=.5*(b+A))*b;var L=A-b;v.x=(b*v.x+L*n.x)/A,v.y=(b*v.y+L*n.y)/A,v.z=(b*v.z+L*n.z)/A}}return b<w?(o$1p.clone(v,t.center),t.radius=b):(o$1p.clone(S,t.center),t.radius=w),t};var ua$6=new n$1d,ma$5=new o$1p,ya$4=new o$1p,ra$9=new a$18,ea$9=new a$18;i$1d.fromRectangle2D=function(e,t,i){return i$1d.fromRectangleWithHeights2D(e,t,0,0,i)},i$1d.fromRectangleWithHeights2D=function(e,t,i,n,r){if(e$2e(r)||(r=new i$1d),!e$2e(e))return r.center=o$1p.clone(o$1p.ZERO,r.center),r.radius=0,r;t=u$Z(t,ua$6),h$18.southwest(e,ra$9),ra$9.height=i,h$18.northeast(e,ea$9),ea$9.height=n;var o=t.project(ra$9,ma$5),a=t.project(ea$9,ya$4),s=a.x-o.x,l=a.y-o.y,u=a.z-o.z;r.radius=.5*Math.sqrt(s*s+l*l+u*u);var c=r.center;return c.x=o.x+.5*s,c.y=o.y+.5*l,c.z=o.z+.5*u,r};var xa$5=[];i$1d.fromRectangle3D=function(e,t,i,n){if(t=u$Z(t,t$12.WGS84),i=u$Z(i,0),e$2e(n)||(n=new i$1d),!e$2e(e))return n.center=o$1p.clone(o$1p.ZERO,n.center),n.radius=0,n;var r=h$18.subsample(e,t,i,xa$5);return i$1d.fromPoints(r,n)},i$1d.fromVertices=function(e,t,i,n){if(e$2e(n)||(n=new i$1d),!e$2e(e)||0===e.length)return n.center=o$1p.clone(o$1p.ZERO,n.center),n.radius=0,n;t=u$Z(t,o$1p.ZERO),i=u$Z(i,3),o$1q.typeOf.number.greaterThanOrEquals("stride",i,3);var r=$$18;r.x=e[0]+t.x,r.y=e[1]+t.y,r.z=e[2]+t.z;var o,a=o$1p.clone(r,T$1d),s=o$1p.clone(r,F$1k),l=o$1p.clone(r,I$1x),u=o$1p.clone(r,J$17),c=o$1p.clone(r,K$15),h=o$1p.clone(r,Q$1d),d=e.length;for(o=0;o<d;o+=i){var f=e[o]+t.x,p=e[o+1]+t.y,_=e[o+2]+t.z;r.x=f,r.y=p,r.z=_,f<a.x&&o$1p.clone(r,a),f>u.x&&o$1p.clone(r,u),p<s.y&&o$1p.clone(r,s),p>c.y&&o$1p.clone(r,c),_<l.z&&o$1p.clone(r,l),_>h.z&&o$1p.clone(r,h)}var m=o$1p.magnitudeSquared(o$1p.subtract(u,a,M$1d)),g=o$1p.magnitudeSquared(o$1p.subtract(c,s,M$1d)),x=o$1p.magnitudeSquared(o$1p.subtract(h,l,M$1d)),y=a,v=u,$=m;g>$&&($=g,y=s,v=c),x>$&&($=x,y=l,v=h);var b=L$1l;b.x=.5*(y.x+v.x),b.y=.5*(y.y+v.y),b.z=.5*(y.z+v.z);var T=o$1p.magnitudeSquared(o$1p.subtract(v,b,M$1d)),C=Math.sqrt(T),S=H$1g;S.x=a.x,S.y=s.y,S.z=l.z;var w=s$11;w.x=u.x,w.y=c.y,w.z=h.z;var E=o$1p.midpoint(S,w,aa$8),P=0;for(o=0;o<d;o+=i){r.x=e[o]+t.x,r.y=e[o+1]+t.y,r.z=e[o+2]+t.z;var A=o$1p.magnitude(o$1p.subtract(r,E,M$1d));A>P&&(P=A);var L=o$1p.magnitudeSquared(o$1p.subtract(r,b,M$1d));if(L>T){var M=Math.sqrt(L);T=(C=.5*(C+M))*C;var R=M-C;b.x=(C*b.x+R*r.x)/M,b.y=(C*b.y+R*r.y)/M,b.z=(C*b.z+R*r.z)/M}}return C<P?(o$1p.clone(b,n.center),n.radius=C):(o$1p.clone(E,n.center),n.radius=P),n},i$1d.fromEncodedCartesianVertices=function(e,t,i){if(e$2e(i)||(i=new i$1d),!e$2e(e)||!e$2e(t)||e.length!==t.length||0===e.length)return i.center=o$1p.clone(o$1p.ZERO,i.center),i.radius=0,i;var n=$$18;n.x=e[0]+t[0],n.y=e[1]+t[1],n.z=e[2]+t[2];var r,o=o$1p.clone(n,T$1d),a=o$1p.clone(n,F$1k),s=o$1p.clone(n,I$1x),l=o$1p.clone(n,J$17),u=o$1p.clone(n,K$15),c=o$1p.clone(n,Q$1d),h=e.length;for(r=0;r<h;r+=3){var d=e[r]+t[r],f=e[r+1]+t[r+1],p=e[r+2]+t[r+2];n.x=d,n.y=f,n.z=p,d<o.x&&o$1p.clone(n,o),d>l.x&&o$1p.clone(n,l),f<a.y&&o$1p.clone(n,a),f>u.y&&o$1p.clone(n,u),p<s.z&&o$1p.clone(n,s),p>c.z&&o$1p.clone(n,c)}var _=o$1p.magnitudeSquared(o$1p.subtract(l,o,M$1d)),m=o$1p.magnitudeSquared(o$1p.subtract(u,a,M$1d)),g=o$1p.magnitudeSquared(o$1p.subtract(c,s,M$1d)),x=o,y=l,v=_;m>v&&(v=m,x=a,y=u),g>v&&(v=g,x=s,y=c);var $=L$1l;$.x=.5*(x.x+y.x),$.y=.5*(x.y+y.y),$.z=.5*(x.z+y.z);var b=o$1p.magnitudeSquared(o$1p.subtract(y,$,M$1d)),T=Math.sqrt(b),C=H$1g;C.x=o.x,C.y=a.y,C.z=s.z;var S=s$11;S.x=l.x,S.y=u.y,S.z=c.z;var w=o$1p.midpoint(C,S,aa$8),E=0;for(r=0;r<h;r+=3){n.x=e[r]+t[r],n.y=e[r+1]+t[r+1],n.z=e[r+2]+t[r+2];var P=o$1p.magnitude(o$1p.subtract(n,w,M$1d));P>E&&(E=P);var A=o$1p.magnitudeSquared(o$1p.subtract(n,$,M$1d));if(A>b){var L=Math.sqrt(A);b=(T=.5*(T+L))*T;var M=L-T;$.x=(T*$.x+M*n.x)/L,$.y=(T*$.y+M*n.y)/L,$.z=(T*$.z+M*n.z)/L}}return T<E?(o$1p.clone($,i.center),i.radius=T):(o$1p.clone(w,i.center),i.radius=E),i},i$1d.fromCornerPoints=function(e,t,i){o$1q.typeOf.object("corner",e),o$1q.typeOf.object("oppositeCorner",t),e$2e(i)||(i=new i$1d);var n=o$1p.midpoint(e,t,i.center);return i.radius=o$1p.distance(n,t),i},i$1d.fromEllipsoid=function(e,t){return o$1q.typeOf.object("ellipsoid",e),e$2e(t)||(t=new i$1d),o$1p.clone(o$1p.ZERO,t.center),t.radius=e.maximumRadius,t};var za$6=new o$1p;i$1d.fromBoundingSpheres=function(e,t){if(e$2e(t)||(t=new i$1d),!e$2e(e)||0===e.length)return t.center=o$1p.clone(o$1p.ZERO,t.center),t.radius=0,t;var i=e.length;if(1===i)return i$1d.clone(e[0],t);if(2===i)return i$1d.union(e[0],e[1],t);var n,r=[];for(n=0;n<i;n++)r.push(e[n].center);var o=(t=i$1d.fromPoints(r,t)).center,a=t.radius;for(n=0;n<i;n++){var s=e[n];a=Math.max(a,o$1p.distance(o,s.center,za$6)+s.radius)}return t.radius=a,t};var Sa$5=new o$1p,ha$4=new o$1p,pa$5=new o$1p;i$1d.fromOrientedBoundingBox=function(e,t){o$1q.defined("orientedBoundingBox",e),e$2e(t)||(t=new i$1d);var i=e.halfAxes,n=p$1e.getColumn(i,0,Sa$5),r=p$1e.getColumn(i,1,ha$4),o=p$1e.getColumn(i,2,pa$5);return o$1p.add(n,r,n),o$1p.add(n,o,n),t.center=o$1p.clone(e.center,t.center),t.radius=o$1p.magnitude(n),t},i$1d.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.center=o$1p.clone(e.center,t.center),t.radius=e.radius,t):new i$1d(e.center,e.radius)},i$1d.packedLength=4,i$1d.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0);var n=e.center;return t[i++]=n.x,t[i++]=n.y,t[i++]=n.z,t[i]=e.radius,t},i$1d.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new i$1d);var n=i.center;return n.x=e[t++],n.y=e[t++],n.z=e[t++],i.radius=e[t],i};var wa$4=new o$1p,Oa$6=new o$1p;i$1d.union=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e$2e(i)||(i=new i$1d);var n=e.center,r=e.radius,o=t.center,a=t.radius,s=o$1p.subtract(o,n,wa$4),l=o$1p.magnitude(s);if(r>=l+a)return e.clone(i),i;if(a>=l+r)return t.clone(i),i;var u=.5*(r+l+a),c=o$1p.multiplyByScalar(s,(-r+u)/l,Oa$6);return o$1p.add(c,n,c),o$1p.clone(c,i.center),i.radius=u,i};var ba$4=new o$1p;i$1d.expand=function(e,t,i){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("point",t),i=i$1d.clone(e,i);var n=o$1p.magnitude(o$1p.subtract(t,i.center,ba$4));return n>i.radius&&(i.radius=n),i},i$1d.intersectPlane=function(e,t){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("plane",t);var i=e.center,n=e.radius,r=t.normal,o=o$1p.dot(r,i)+t.distance;return o<-n?Ae$w.OUTSIDE:o<n?Ae$w.INTERSECTING:Ae$w.INSIDE},i$1d.transform=function(e,t,i){return o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("transform",t),e$2e(i)||(i=new i$1d),i.center=p$1d.multiplyByPoint(t,e.center,i.center),i.radius=p$1d.getMaximumScale(t)*e.radius,i};var ga$6=new o$1p;i$1d.distanceSquaredTo=function(e,t){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("cartesian",t);var i=o$1p.subtract(e.center,t,ga$6);return o$1p.magnitudeSquared(i)-e.radius*e.radius},i$1d.transformWithoutScale=function(e,t,i){return o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("transform",t),e$2e(i)||(i=new i$1d),i.center=p$1d.multiplyByPoint(t,e.center,i.center),i.radius=e.radius,i};var Ma$6=new o$1p;i$1d.computePlaneDistances=function(e,t,i,n){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("position",t),o$1q.typeOf.object("direction",i),e$2e(n)||(n=new o$1n);var r=o$1p.subtract(e.center,t,Ma$6),o=o$1p.dot(i,r);return n.start=o-e.radius,n.stop=o+e.radius,n};for(var ca$2=new o$1p,Ra$8=new o$1p,qa$7=new o$1p,ja$4=new o$1p,Pa$5=new o$1p,Ba$5=new a$18,ia$5=new Array(8),na$5=0;na$5<8;++na$5)ia$5[na$5]=new o$1p;var Da$8=new n$1d;i$1d.projectTo2D=function(e,t,i){o$1q.typeOf.object("sphere",e);var n,r=(t=u$Z(t,Da$8)).ellipsoid,o=e.center,a=e.radius;n=o$1p.equals(o,o$1p.ZERO)?o$1p.clone(o$1p.UNIT_X,ca$2):r.geodeticSurfaceNormal(o,ca$2);var s=o$1p.cross(o$1p.UNIT_Z,n,Ra$8);o$1p.normalize(s,s);var l=o$1p.cross(n,s,qa$7);o$1p.normalize(l,l),o$1p.multiplyByScalar(n,a,n),o$1p.multiplyByScalar(l,a,l),o$1p.multiplyByScalar(s,a,s);var u=o$1p.negate(l,Pa$5),c=o$1p.negate(s,ja$4),h=ia$5,d=h[0];o$1p.add(n,l,d),o$1p.add(d,s,d),d=h[1],o$1p.add(n,l,d),o$1p.add(d,c,d),d=h[2],o$1p.add(n,u,d),o$1p.add(d,c,d),d=h[3],o$1p.add(n,u,d),o$1p.add(d,s,d),o$1p.negate(n,n),d=h[4],o$1p.add(n,l,d),o$1p.add(d,s,d),d=h[5],o$1p.add(n,l,d),o$1p.add(d,c,d),d=h[6],o$1p.add(n,u,d),o$1p.add(d,c,d),d=h[7],o$1p.add(n,u,d),o$1p.add(d,s,d);for(var f=h.length,p=0;p<f;++p){var _=h[p];o$1p.add(o,_,_);var m=r.cartesianToCartographic(_,Ba$5);t.project(m,_)}var g=(o=(i=i$1d.fromPoints(h,i)).center).x,x=o.y,y=o.z;return o.x=y,o.y=g,o.z=x,i},i$1d.isOccluded=function(e,t){return o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)},i$1d.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&o$1p.equals(e.center,t.center)&&e.radius===t.radius},i$1d.prototype.intersectPlane=function(e){return i$1d.intersectPlane(this,e)},i$1d.prototype.distanceSquaredTo=function(e){return i$1d.distanceSquaredTo(this,e)},i$1d.prototype.computePlaneDistances=function(e,t,i){return i$1d.computePlaneDistances(this,e,t,i)},i$1d.prototype.isOccluded=function(e){return i$1d.isOccluded(this,e)},i$1d.prototype.equals=function(e){return i$1d.equals(this,e)},i$1d.prototype.clone=function(e){return i$1d.clone(this,e)},i$1d.prototype.volume=function(){var e=this.radius;return da$4*e*e*e};const E$1u={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047};var de$y=Object.freeze(E$1u),r$1d={BYTE:de$y.BYTE,UNSIGNED_BYTE:de$y.UNSIGNED_BYTE,SHORT:de$y.SHORT,UNSIGNED_SHORT:de$y.UNSIGNED_SHORT,INT:de$y.INT,UNSIGNED_INT:de$y.UNSIGNED_INT,FLOAT:de$y.FLOAT,DOUBLE:de$y.DOUBLE,getSizeInBytes:function(e){if(!e$2e(e))throw new t$15("value is required.");switch(e){case r$1d.BYTE:return Int8Array.BYTES_PER_ELEMENT;case r$1d.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r$1d.SHORT:return Int16Array.BYTES_PER_ELEMENT;case r$1d.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r$1d.INT:return Int32Array.BYTES_PER_ELEMENT;case r$1d.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case r$1d.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case r$1d.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new t$15("componentDatatype is not a valid value.")}},fromTypedArray:function(e){return e instanceof Int8Array?r$1d.BYTE:e instanceof Uint8Array?r$1d.UNSIGNED_BYTE:e instanceof Int16Array?r$1d.SHORT:e instanceof Uint16Array?r$1d.UNSIGNED_SHORT:e instanceof Int32Array?r$1d.INT:e instanceof Uint32Array?r$1d.UNSIGNED_INT:e instanceof Float32Array?r$1d.FLOAT:e instanceof Float64Array?r$1d.DOUBLE:void 0},validate:function(e){return e$2e(e)&&(e===r$1d.BYTE||e===r$1d.UNSIGNED_BYTE||e===r$1d.SHORT||e===r$1d.UNSIGNED_SHORT||e===r$1d.INT||e===r$1d.UNSIGNED_INT||e===r$1d.FLOAT||e===r$1d.DOUBLE)},createTypedArray:function(e,t){if(!e$2e(e))throw new t$15("componentDatatype is required.");if(!e$2e(t))throw new t$15("valuesOrLength is required.");switch(e){case r$1d.BYTE:return new Int8Array(t);case r$1d.UNSIGNED_BYTE:return new Uint8Array(t);case r$1d.SHORT:return new Int16Array(t);case r$1d.UNSIGNED_SHORT:return new Uint16Array(t);case r$1d.INT:return new Int32Array(t);case r$1d.UNSIGNED_INT:return new Uint32Array(t);case r$1d.FLOAT:return new Float32Array(t);case r$1d.DOUBLE:return new Float64Array(t);default:throw new t$15("componentDatatype is not a valid value.")}},createArrayBufferView:function(e,t,i,n){if(!e$2e(e))throw new t$15("componentDatatype is required.");if(!e$2e(t))throw new t$15("buffer is required.");switch(i=u$Z(i,0),n=u$Z(n,(t.byteLength-i)/r$1d.getSizeInBytes(e)),e){case r$1d.BYTE:return new Int8Array(t,i,n);case r$1d.UNSIGNED_BYTE:return new Uint8Array(t,i,n);case r$1d.SHORT:return new Int16Array(t,i,n);case r$1d.UNSIGNED_SHORT:return new Uint16Array(t,i,n);case r$1d.INT:return new Int32Array(t,i,n);case r$1d.UNSIGNED_INT:return new Uint32Array(t,i,n);case r$1d.FLOAT:return new Float32Array(t,i,n);case r$1d.DOUBLE:return new Float64Array(t,i,n);default:throw new t$15("componentDatatype is not a valid value.")}},fromName:function(e){switch(e){case"BYTE":return r$1d.BYTE;case"UNSIGNED_BYTE":return r$1d.UNSIGNED_BYTE;case"SHORT":return r$1d.SHORT;case"UNSIGNED_SHORT":return r$1d.UNSIGNED_SHORT;case"INT":return r$1d.INT;case"UNSIGNED_INT":return r$1d.UNSIGNED_INT;case"FLOAT":return r$1d.FLOAT;case"DOUBLE":return r$1d.DOUBLE;default:throw new t$15("name is not a valid value.")}}},S$14=Object.freeze(r$1d);function Y$Z(e){var t=e._uSquared,i=e._ellipsoid.maximumRadius,n=e._ellipsoid.minimumRadius,r=(i-n)/i,o=Math.cos(e._startHeading),a=Math.sin(e._startHeading),s=(1-r)*Math.tan(e._start.latitude),l=1/Math.sqrt(1+s*s),u=l*s,c=Math.atan2(s,o),h=l*a,d=h*h,f=1-d,p=Math.sqrt(f),_=t/4,m=_*_,g=m*_,x=m*m,y=1+_-3*m/4+5*g/4-175*x/64,v=1-_+15*m/8-35*g/8,$=1-3*_+35*m/4,b=1-5*_,T=y*c-v*Math.sin(2*c)*_/2-$*Math.sin(4*c)*m/16-b*Math.sin(6*c)*g/48-5*Math.sin(8*c)*x/512,C=e._constants;C.a=i,C.b=n,C.f=r,C.cosineHeading=o,C.sineHeading=a,C.tanU=s,C.cosineU=l,C.sineU=u,C.sigma=c,C.sineAlpha=h,C.sineSquaredAlpha=d,C.cosineSquaredAlpha=f,C.cosineAlpha=p,C.u2Over4=_,C.u4Over16=m,C.u6Over64=g,C.u8Over256=x,C.a0=y,C.a1=v,C.a2=$,C.a3=b,C.distanceRatio=T}function Z$1d(e,t){return e*t*(4+e*(4-3*t))/16}function B$17(e,t,i,n,r,o,a){var s=Z$1d(e,i);return(1-s)*e*t*(n+s*r*(a+s*o*(2*a*a-1)))}function $$17(e,t,i,n,r,o,a){var s,l,u,c,h,d=(t-i)/t,f=o-n,p=Math.atan((1-d)*Math.tan(r)),_=Math.atan((1-d)*Math.tan(a)),m=Math.cos(p),g=Math.sin(p),x=Math.cos(_),y=Math.sin(_),v=m*x,$=m*y,b=g*y,T=g*x,C=f,S=e$2d.TWO_PI,w=Math.cos(C),E=Math.sin(C);do{w=Math.cos(C),E=Math.sin(C);var P,A=$-T*w;u=Math.sqrt(x*x*E*E+A*A),l=b+v*w,s=Math.atan2(u,l),0===u?(P=0,c=1):c=1-(P=v*E/u)*P,S=C,h=l-2*b/c,isNaN(h)&&(h=0),C=f+B$17(d,P,c,s,u,l,h)}while(Math.abs(C-S)>e$2d.EPSILON12);var L=c*(t*t-i*i)/(i*i),M=L*(256+L*(L*(74-47*L)-128))/1024,R=h*h,O=i*(1+L*(4096+L*(L*(320-175*L)-768))/16384)*(s-M*u*(h+M*(l*(2*R-1)-M*h*(4*u*u-3)*(4*R-3)/6)/4)),D=Math.atan2(x*E,$-T*w),I=Math.atan2(m*E,$*w-T);e._distance=O,e._startHeading=D,e._endHeading=I,e._uSquared=L}var j$1k=new o$1p,L$1k=new o$1p;function F$1j(e,t,i,n){var r=o$1p.normalize(n.cartographicToCartesian(t,L$1k),j$1k),o=o$1p.normalize(n.cartographicToCartesian(i,L$1k),L$1k);o$1q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(o$1p.angleBetween(r,o))-Math.PI),.0125),$$17(e,n.maximumRadius,n.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude),e._start=a$18.clone(t,e._start),e._end=a$18.clone(i,e._end),e._start.height=0,e._end.height=0,Y$Z(e)}function E$1t(e,t,i){var n=u$Z(i,t$12.WGS84);this._ellipsoid=n,this._start=new a$18,this._end=new a$18,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,e$2e(e)&&e$2e(t)&&F$1j(this,e,t,n)}function e$29(e,t,i){this.minimum=o$1p.clone(u$Z(e,o$1p.ZERO)),this.maximum=o$1p.clone(u$Z(t,o$1p.ZERO)),i=e$2e(i)?o$1p.clone(i):o$1p.midpoint(this.minimum,this.maximum,new o$1p),this.center=i}Object.defineProperties(E$1t.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return o$1q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return o$1q.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return o$1q.defined("distance",this._distance),this._endHeading}}}),E$1t.prototype.setEndPoints=function(e,t){o$1q.defined("start",e),o$1q.defined("end",t),F$1j(this,e,t,this._ellipsoid)},E$1t.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},E$1t.prototype.interpolateUsingSurfaceDistance=function(e,t){o$1q.defined("distance",this._distance);var i=this._constants,n=i.distanceRatio+e/i.b,r=Math.cos(2*n),o=Math.cos(4*n),a=Math.cos(6*n),s=Math.sin(2*n),l=Math.sin(4*n),u=Math.sin(6*n),c=Math.sin(8*n),h=n*n,d=n*h,f=i.u8Over256,p=i.u2Over4,_=i.u6Over64,m=i.u4Over16,g=2*d*f*r/3+n*(1-p+7*m/4-15*_/4+579*f/64-(m-15*_/4+187*f/16)*r-(5*_/4-115*f/16)*o-29*f*a/16)+(p/2-m+71*_/32-85*f/16)*s+(5*m/16-5*_/4+383*f/96)*l-h*((_-11*f/2)*s+5*f*l/2)+(29*_/96-29*f/16)*u+539*f*c/1536,x=Math.asin(Math.sin(g)*i.cosineAlpha),y=Math.atan(i.a/i.b*Math.tan(x));g-=i.sigma;var v=Math.cos(2*i.sigma+g),$=Math.sin(g),b=Math.cos(g),T=i.cosineU*b,C=i.sineU*$,S=Math.atan2($*i.sineHeading,T-C*i.cosineHeading)-B$17(i.f,i.sineAlpha,i.cosineSquaredAlpha,g,$,b,v);return e$2e(t)?(t.longitude=this._start.longitude+S,t.latitude=y,t.height=0,t):new a$18(this._start.longitude+S,y,0)},e$29.fromPoints=function(e,t){if(e$2e(t)||(t=new e$29),!e$2e(e)||0===e.length)return t.minimum=o$1p.clone(o$1p.ZERO,t.minimum),t.maximum=o$1p.clone(o$1p.ZERO,t.maximum),t.center=o$1p.clone(o$1p.ZERO,t.center),t;for(var i=e[0].x,n=e[0].y,r=e[0].z,o=e[0].x,a=e[0].y,s=e[0].z,l=e.length,u=1;u<l;u++){var c=e[u],h=c.x,d=c.y,f=c.z;i=Math.min(h,i),o=Math.max(h,o),n=Math.min(d,n),a=Math.max(d,a),r=Math.min(f,r),s=Math.max(f,s)}var p=t.minimum;p.x=i,p.y=n,p.z=r;var _=t.maximum;return _.x=o,_.y=a,_.z=s,t.center=o$1p.midpoint(p,_,t.center),t},e$29.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.minimum=o$1p.clone(e.minimum,t.minimum),t.maximum=o$1p.clone(e.maximum,t.maximum),t.center=o$1p.clone(e.center,t.center),t):new e$29(e.minimum,e.maximum,e.center)},e$29.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&o$1p.equals(e.center,t.center)&&o$1p.equals(e.minimum,t.minimum)&&o$1p.equals(e.maximum,t.maximum)};var x$1m=new o$1p;e$29.intersectPlane=function(e,t){o$1q.defined("box",e),o$1q.defined("plane",t),x$1m=o$1p.subtract(e.maximum,e.minimum,x$1m);var i=o$1p.multiplyByScalar(x$1m,.5,x$1m),n=t.normal,r=i.x*Math.abs(n.x)+i.y*Math.abs(n.y)+i.z*Math.abs(n.z),o=o$1p.dot(e.center,n)+t.distance;return o-r>0?Ae$w.INSIDE:o+r<0?Ae$w.OUTSIDE:Ae$w.INTERSECTING},e$29.prototype.clone=function(e){return e$29.clone(this,e)},e$29.prototype.intersectPlane=function(e){return e$29.intersectPlane(this,e)},e$29.prototype.equals=function(e){return e$29.equals(this,e)};var m$1f={};function p$1b(e,t,i){var n=e+t;return e$2d.sign(e)!==e$2d.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))<i?0:n}m$1f.computeDiscriminant=function(e,t,i){if("number"!=typeof e)throw new t$15("a is a required number.");if("number"!=typeof t)throw new t$15("b is a required number.");if("number"!=typeof i)throw new t$15("c is a required number.");return t*t-4*e*i},m$1f.computeRealRoots=function(e,t,i){if("number"!=typeof e)throw new t$15("a is a required number.");if("number"!=typeof t)throw new t$15("b is a required number.");if("number"!=typeof i)throw new t$15("c is a required number.");var n;if(0===e)return 0===t?[]:[-i/t];if(0===t){if(0===i)return[0,0];var r=Math.abs(i),o=Math.abs(e);if(r<o&&r/o<e$2d.EPSILON14)return[0,0];if(r>o&&o/r<e$2d.EPSILON14)return[];if((n=-i/e)<0)return[];var a=Math.sqrt(n);return[-a,a]}if(0===i)return(n=-t/e)<0?[n,0]:[0,n];var s=p$1b(t*t,-(4*e*i),e$2d.EPSILON14);if(s<0)return[];var l=-.5*p$1b(t,e$2d.sign(t)*Math.sqrt(s),e$2d.EPSILON14);return t>0?[l/e,i/l]:[i/l,l/e]};var j$1j={};function k$1c(e,t,i,n){var r,o,a=e,s=t/3,l=i/3,u=n,c=a*l,h=s*u,d=s*s,f=l*l,p=a*l-d,_=a*u-s*l,m=s*u-f,g=4*p*m-_*_;if(g<0){var x,y,v;d*h>=c*f?(x=a,y=p,v=-2*s*p+a*_):(x=u,y=m,v=-u*_+2*l*m);var $=-(v<0?-1:1)*Math.abs(x)*Math.sqrt(-g),b=(o=-v+$)/2,T=b<0?-Math.pow(-b,1/3):Math.pow(b,1/3),C=o===$?-T:-y/T;return r=y<=0?T+C:-v/(T*T+C*C+y),d*h>=c*f?[(r-s)/a]:[-u/(r+l)]}var S=p,w=-2*s*p+a*_,E=m,P=-u*_+2*l*m,A=Math.sqrt(g),L=Math.sqrt(3)/2,M=Math.abs(Math.atan2(a*A,-w)/3);r=2*Math.sqrt(-S);var R=Math.cos(M);o=r*R;var O=r*(-R/2-L*Math.sin(M)),D=o+O>2*s?o-s:O-s,I=a,F=D/I;M=Math.abs(Math.atan2(u*A,-P)/3);var B=-u,N=(o=(r=2*Math.sqrt(-E))*(R=Math.cos(M)))+(O=r*(-R/2-L*Math.sin(M)))<2*l?o+l:O+l,G=B/N,z=-D*N-I*B,U=(l*z-s*(D*B))/(-s*z+l*(I*N));return F<=U?F<=G?U<=G?[F,U,G]:[F,G,U]:[G,F,U]:F<=G?[U,F,G]:U<=G?[U,G,F]:[G,U,F]}j$1j.computeDiscriminant=function(e,t,i,n){if("number"!=typeof e)throw new t$15("a is a required number.");if("number"!=typeof t)throw new t$15("b is a required number.");if("number"!=typeof i)throw new t$15("c is a required number.");if("number"!=typeof n)throw new t$15("d is a required number.");var r=t*t,o=i*i;return 18*e*t*i*n+r*o-27*(e*e)*(n*n)-4*(e*o*i+r*t*n)},j$1j.computeRealRoots=function(e,t,i,n){if("number"!=typeof e)throw new t$15("a is a required number.");if("number"!=typeof t)throw new t$15("b is a required number.");if("number"!=typeof i)throw new t$15("c is a required number.");if("number"!=typeof n)throw new t$15("d is a required number.");var r,o;if(0===e)return m$1f.computeRealRoots(t,i,n);if(0===t){if(0===i){if(0===n)return[0,0,0];var a=(o=-n/e)<0?-Math.pow(-o,1/3):Math.pow(o,1/3);return[a,a,a]}return 0===n?0===(r=m$1f.computeRealRoots(e,0,i)).Length?[0]:[r[0],0,r[1]]:k$1c(e,0,i,n)}return 0===i?0===n?(o=-t/e)<0?[o,0,0]:[0,0,o]:k$1c(e,t,0,n):0===n?0===(r=m$1f.computeRealRoots(e,t,i)).length?[0]:r[1]<=0?[r[0],r[1],0]:r[0]>=0?[0,r[0],r[1]]:[r[0],0,r[1]]:k$1c(e,t,i,n)};var F$1i={};function P$1c(e,t,i,n){var r=e*e,o=t-3*r/8,a=i-t*e/2+r*e/8,s=n-i*e/4+t*r/16-3*r*r/256,l=j$1j.computeRealRoots(1,2*o,o*o-4*s,-a*a);if(l.length>0){var u=-e/4,c=l[l.length-1];if(Math.abs(c)<e$2d.EPSILON14){var h=m$1f.computeRealRoots(1,o,s);if(2===h.length){var d,f=h[0],p=h[1];if(f>=0&&p>=0){var _=Math.sqrt(f),m=Math.sqrt(p);return[u-m,u-_,u+_,u+m]}if(f>=0&&p<0)return[u-(d=Math.sqrt(f)),u+d];if(f<0&&p>=0)return[u-(d=Math.sqrt(p)),u+d]}return[]}if(c>0){var g=Math.sqrt(c),x=(o+c-a/g)/2,y=(o+c+a/g)/2,v=m$1f.computeRealRoots(1,g,x),$=m$1f.computeRealRoots(1,-g,y);return 0!==v.length?(v[0]+=u,v[1]+=u,0!==$.length?($[0]+=u,$[1]+=u,v[1]<=$[0]?[v[0],v[1],$[0],$[1]]:$[1]<=v[0]?[$[0],$[1],v[0],v[1]]:v[0]>=$[0]&&v[1]<=$[1]?[$[0],v[0],v[1],$[1]]:$[0]>=v[0]&&$[1]<=v[1]?[v[0],$[0],$[1],v[1]]:v[0]>$[0]&&v[0]<$[1]?[$[0],v[0],$[1],v[1]]:[v[0],$[0],v[1],$[1]]):v):0!==$.length?($[0]+=u,$[1]+=u,$):[]}}return[]}function y$12(e,t,i,n){var r=e*e,o=-2*t,a=i*e+t*t-4*n,s=r*n-i*t*e+i*i,l=j$1j.computeRealRoots(1,o,a,s);if(l.length>0){var u,c,h,d,f,p,_=l[0],m=t-_,g=m*m,x=e/2,y=m/2,v=g-4*n,$=g+4*Math.abs(n),b=r-4*_,T=r+4*Math.abs(_);if(_<0||v*T<b*$){var C=Math.sqrt(b);u=C/2,c=0===C?0:(e*y-i)/C}else{var S=Math.sqrt(v);u=0===S?0:(e*y-i)/S,c=S/2}0===x&&0===u?(h=0,d=0):e$2d.sign(x)===e$2d.sign(u)?d=_/(h=x+u):h=_/(d=x-u),0===y&&0===c?(f=0,p=0):e$2d.sign(y)===e$2d.sign(c)?p=n/(f=y+c):f=n/(p=y-c);var w=m$1f.computeRealRoots(1,h,f),E=m$1f.computeRealRoots(1,d,p);if(0!==w.length)return 0!==E.length?w[1]<=E[0]?[w[0],w[1],E[0],E[1]]:E[1]<=w[0]?[E[0],E[1],w[0],w[1]]:w[0]>=E[0]&&w[1]<=E[1]?[E[0],w[0],w[1],E[1]]:E[0]>=w[0]&&E[1]<=w[1]?[w[0],E[0],E[1],w[1]]:w[0]>E[0]&&w[0]<E[1]?[E[0],w[0],E[1],w[1]]:[w[0],E[0],w[1],E[1]]:w;if(0!==E.length)return E}return[]}function f$19(e,t){t=o$1p.clone(u$Z(t,o$1p.ZERO)),o$1p.equals(t,o$1p.ZERO)||o$1p.normalize(t,t),this.origin=o$1p.clone(u$Z(e,o$1p.ZERO)),this.direction=t}F$1i.computeDiscriminant=function(e,t,i,n,r){if("number"!=typeof e)throw new t$15("a is a required number.");if("number"!=typeof t)throw new t$15("b is a required number.");if("number"!=typeof i)throw new t$15("c is a required number.");if("number"!=typeof n)throw new t$15("d is a required number.");if("number"!=typeof r)throw new t$15("e is a required number.");var o=e*e,a=t*t,s=a*t,l=i*i,u=l*i,c=n*n,h=c*n,d=r*r;return a*l*c-4*s*h-4*e*u*c+18*e*t*i*h-27*o*c*c+256*(o*e)*(d*r)+r*(18*s*i*n-4*a*u+16*e*l*l-80*e*t*l*n-6*e*a*c+144*o*i*c)+d*(144*e*a*i-27*a*a-128*o*l-192*o*t*n)},F$1i.computeRealRoots=function(e,t,i,n,r){if("number"!=typeof e)throw new t$15("a is a required number.");if("number"!=typeof t)throw new t$15("b is a required number.");if("number"!=typeof i)throw new t$15("c is a required number.");if("number"!=typeof n)throw new t$15("d is a required number.");if("number"!=typeof r)throw new t$15("e is a required number.");if(Math.abs(e)<e$2d.EPSILON15)return j$1j.computeRealRoots(t,i,n,r);var o=t/e,a=i/e,s=n/e,l=r/e,u=o<0?1:0;switch(u+=a<0?u+1:u,u+=s<0?u+1:u,u+=l<0?u+1:u){case 0:case 3:case 4:case 6:case 7:case 9:case 10:case 12:case 13:case 14:case 15:return P$1c(o,a,s,l);case 1:case 2:case 5:case 8:case 11:return y$12(o,a,s,l);default:return}},f$19.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.origin=o$1p.clone(e.origin),t.direction=o$1p.clone(e.direction),t):new f$19(e.origin,e.direction)},f$19.getPoint=function(e,t,i){return o$1q.typeOf.object("ray",e),o$1q.typeOf.number("t",t),e$2e(i)||(i=new o$1p),i=o$1p.multiplyByScalar(e.direction,t,i),o$1p.add(e.origin,i,i)};var g$1j={rayPlane:function(e,t,i){if(!e$2e(e))throw new t$15("ray is required.");if(!e$2e(t))throw new t$15("plane is required.");e$2e(i)||(i=new o$1p);var n=e.origin,r=e.direction,o=t.normal,a=o$1p.dot(o,r);if(!(Math.abs(a)<e$2d.EPSILON15)){var s=(-t.distance-o$1p.dot(o,n))/a;if(!(s<0))return i=o$1p.multiplyByScalar(r,s,i),o$1p.add(n,i,i)}}},or$b=new o$1p,dr$7=new o$1p,Y$Y=new o$1p,j$1i=new o$1p,H$1f=new o$1p;g$1j.rayTriangleParametric=function(e,t,i,n,r){if(!e$2e(e))throw new t$15("ray is required.");if(!e$2e(t))throw new t$15("p0 is required.");if(!e$2e(i))throw new t$15("p1 is required.");if(!e$2e(n))throw new t$15("p2 is required.");r=u$Z(r,!1);var o,a,s,l,u,c=e.origin,h=e.direction,d=o$1p.subtract(i,t,or$b),f=o$1p.subtract(n,t,dr$7),p=o$1p.cross(h,f,Y$Y),_=o$1p.dot(d,p);if(r){if(_<e$2d.EPSILON6||(o=o$1p.subtract(c,t,j$1i),(s=o$1p.dot(o,p))<0||s>_)||(a=o$1p.cross(o,d,H$1f),(l=o$1p.dot(h,a))<0||s+l>_))return;u=o$1p.dot(f,a)/_}else{if(Math.abs(_)<e$2d.EPSILON6)return;var m=1/_;if(o=o$1p.subtract(c,t,j$1i),(s=o$1p.dot(o,p)*m)<0||s>1||(a=o$1p.cross(o,d,H$1f),(l=o$1p.dot(h,a)*m)<0||s+l>1))return;u=o$1p.dot(f,a)*m}return u},g$1j.rayTriangle=function(e,t,i,n,r,o){var a=g$1j.rayTriangleParametric(e,t,i,n,r);if(e$2e(a)&&!(a<0))return e$2e(o)||(o=new o$1p),o$1p.multiplyByScalar(e.direction,a,o),o$1p.add(e.origin,o,o)};var fr$5=new f$19;function vr$9(e,t,i,n){var r=t*t-4*e*i;if(!(r<0)){if(r>0){var o=1/(2*e),a=Math.sqrt(r),s=(-t+a)*o,l=(-t-a)*o;return s<l?(n.root0=s,n.root1=l):(n.root0=l,n.root1=s),n}var u=-t/(2*e);if(0!==u)return n.root0=n.root1=u,n}}g$1j.lineSegmentTriangle=function(e,t,i,n,r,o,a){if(!e$2e(e))throw new t$15("v0 is required.");if(!e$2e(t))throw new t$15("v1 is required.");if(!e$2e(i))throw new t$15("p0 is required.");if(!e$2e(n))throw new t$15("p1 is required.");if(!e$2e(r))throw new t$15("p2 is required.");var s=fr$5;o$1p.clone(e,s.origin),o$1p.subtract(t,e,s.direction),o$1p.normalize(s.direction,s.direction);var l=g$1j.rayTriangleParametric(s,i,n,r,o);if(!(!e$2e(l)||l<0||l>o$1p.distance(e,t)))return e$2e(a)||(a=new o$1p),o$1p.multiplyByScalar(s.direction,l,a),o$1p.add(s.origin,a,a)};var cr$8={root0:0,root1:0};function J$16(e,t,i){e$2e(i)||(i=new o$1n);var n=e.origin,r=e.direction,o=t.center,a=t.radius*t.radius,s=o$1p.subtract(n,o,Y$Y),l=vr$9(o$1p.dot(r,r),2*o$1p.dot(r,s),o$1p.magnitudeSquared(s)-a,cr$8);if(e$2e(l))return i.start=l.root0,i.stop=l.root1,i}g$1j.raySphere=function(e,t,i){if(!e$2e(e))throw new t$15("ray is required.");if(!e$2e(t))throw new t$15("sphere is required.");if(e$2e(i=J$16(e,t,i))&&!(i.stop<0))return i.start=Math.max(i.start,0),i};var ur$a=new f$19;g$1j.lineSegmentSphere=function(e,t,i,n){if(!e$2e(e))throw new t$15("p0 is required.");if(!e$2e(t))throw new t$15("p1 is required.");if(!e$2e(i))throw new t$15("sphere is required.");var r=ur$a;o$1p.clone(e,r.origin);var o=o$1p.subtract(t,e,r.direction),a=o$1p.magnitude(o);if(o$1p.normalize(o,o),!(!e$2e(n=J$16(r,i,n))||n.stop<0||n.start>a))return n.start=Math.max(n.start,0),n.stop=Math.min(n.stop,a),n};var sr$a=new o$1p,hr$7=new o$1p;function E$1s(e,t,i){var n=e+t;return e$2d.sign(e)!==e$2d.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))<i?0:n}function mr$8(e,t,i,n,r){var o,a=n*n,s=r*r,l=(e[p$1e.COLUMN1ROW1]-e[p$1e.COLUMN2ROW2])*s,u=r*(n*E$1s(e[p$1e.COLUMN1ROW0],e[p$1e.COLUMN0ROW1],e$2d.EPSILON15)+t.y),c=e[p$1e.COLUMN0ROW0]*a+e[p$1e.COLUMN2ROW2]*s+n*t.x+i,h=s*E$1s(e[p$1e.COLUMN2ROW1],e[p$1e.COLUMN1ROW2],e$2d.EPSILON15),d=r*(n*E$1s(e[p$1e.COLUMN2ROW0],e[p$1e.COLUMN0ROW2])+t.z),f=[];if(0===d&&0===h){if(0===(o=m$1f.computeRealRoots(l,u,c)).length)return f;var p=o[0],_=Math.sqrt(Math.max(1-p*p,0));if(f.push(new o$1p(n,r*p,r*-_)),f.push(new o$1p(n,r*p,r*_)),2===o.length){var m=o[1],g=Math.sqrt(Math.max(1-m*m,0));f.push(new o$1p(n,r*m,r*-g)),f.push(new o$1p(n,r*m,r*g))}return f}var x=d*d,y=h*h,v=d*h,$=l*l+y,b=2*(u*l+v),T=2*c*l+u*u-y+x,C=2*(c*u-v),S=c*c-x;if(0===$&&0===b&&0===T&&0===C)return f;var w=(o=F$1i.computeRealRoots($,b,T,C,S)).length;if(0===w)return f;for(var E=0;E<w;++E){var P=o[E],A=P*P,L=Math.max(1-A,0),M=Math.sqrt(L),R=(e$2d.sign(l)===e$2d.sign(c)?E$1s(l*A+c,u*P,e$2d.EPSILON12):e$2d.sign(c)===e$2d.sign(u*P)?E$1s(l*A,u*P+c,e$2d.EPSILON12):E$1s(l*A+u*P,c,e$2d.EPSILON12))*E$1s(h*P,d,e$2d.EPSILON15);R<0?f.push(new o$1p(n,r*P,r*M)):R>0?f.push(new o$1p(n,r*P,r*-M)):0!==M?(f.push(new o$1p(n,r*P,r*-M)),f.push(new o$1p(n,r*P,r*M)),++E):f.push(new o$1p(n,r*P,r*M))}return f}g$1j.rayEllipsoid=function(e,t){if(!e$2e(e))throw new t$15("ray is required.");if(!e$2e(t))throw new t$15("ellipsoid is required.");var i,n,r,o,a,s=t.oneOverRadii,l=o$1p.multiplyComponents(s,e.origin,sr$a),u=o$1p.multiplyComponents(s,e.direction,hr$7),c=o$1p.magnitudeSquared(l),h=o$1p.dot(l,u);if(c>1){if(h>=0)return;var d=h*h;if(i=c-1,d<(r=(n=o$1p.magnitudeSquared(u))*i))return;if(d>r){o=h*h-r;var f=(a=-h+Math.sqrt(o))/n,p=i/a;return f<p?new o$1n(f,p):{start:p,stop:f}}var _=Math.sqrt(i/n);return new o$1n(_,_)}return c<1?(i=c-1,o=h*h-(r=(n=o$1p.magnitudeSquared(u))*i),new o$1n(0,(a=-h+Math.sqrt(o))/n)):h<0?new o$1n(0,-h/(n=o$1p.magnitudeSquared(u))):void 0};var Z$1c=new o$1p,K$14=new o$1p,X$16=new o$1p,V$18=new o$1p,wr$6=new o$1p,gr$8=new p$1e,Sr$6=new p$1e,lr$a=new p$1e,qr$4=new p$1e,yr$7=new p$1e,$$16=new p$1e,k$1b=new p$1e,F$1h=new o$1p,Or$5=new o$1p,Mr$6=new a$18;g$1j.grazingAltitudeLocation=function(e,t){if(!e$2e(e))throw new t$15("ray is required.");if(!e$2e(t))throw new t$15("ellipsoid is required.");var i=e.origin,n=e.direction;if(!o$1p.equals(i,o$1p.ZERO)){var r=t.geodeticSurfaceNormal(i,Z$1c);if(o$1p.dot(n,r)>=0)return i}var o=e$2e(this.rayEllipsoid(e,t)),a=t.transformPositionToScaledSpace(n,Z$1c),s=o$1p.normalize(a,a),l=o$1p.mostOrthogonalAxis(a,V$18),u=o$1p.normalize(o$1p.cross(l,s,K$14),K$14),c=o$1p.normalize(o$1p.cross(s,u,X$16),X$16),h=gr$8;h[0]=s.x,h[1]=s.y,h[2]=s.z,h[3]=u.x,h[4]=u.y,h[5]=u.z,h[6]=c.x,h[7]=c.y,h[8]=c.z;var d=p$1e.transpose(h,Sr$6),f=p$1e.fromScale(t.radii,lr$a),p=p$1e.fromScale(t.oneOverRadii,qr$4),_=yr$7;_[0]=0,_[1]=-n.z,_[2]=n.y,_[3]=n.z,_[4]=0,_[5]=-n.x,_[6]=-n.y,_[7]=n.x,_[8]=0;var m,g,x=p$1e.multiply(p$1e.multiply(d,p,$$16),_,$$16),y=p$1e.multiply(p$1e.multiply(x,f,k$1b),h,k$1b),v=p$1e.multiplyByVector(x,i,wr$6),$=mr$8(y,o$1p.negate(v,Z$1c),0,0,1),b=$.length;if(b>0){for(var T=o$1p.clone(o$1p.ZERO,Or$5),C=Number.NEGATIVE_INFINITY,S=0;S<b;++S){m=p$1e.multiplyByVector(f,p$1e.multiplyByVector(h,$[S],F$1h),F$1h);var w=o$1p.normalize(o$1p.subtract(m,i,V$18),V$18),E=o$1p.dot(w,n);E>C&&(C=E,T=o$1p.clone(m,T))}var P=t.cartesianToCartographic(T,Mr$6);return C=e$2d.clamp(C,0,1),g=o$1p.magnitude(o$1p.subtract(T,i,V$18))*Math.sqrt(1-C*C),g=o?-g:g,P.height=g,t.cartographicToCartesian(P,new o$1p)}};var Pr$6=new o$1p;function o$1m(e,t){if(o$1q.typeOf.object("normal",e),!e$2d.equalsEpsilon(o$1p.magnitude(e),1,e$2d.EPSILON6))throw new t$15("normal must be normalized.");o$1q.typeOf.number("distance",t),this.normal=o$1p.clone(e),this.distance=t}g$1j.lineSegmentPlane=function(e,t,i,n){if(!e$2e(e))throw new t$15("endPoint0 is required.");if(!e$2e(t))throw new t$15("endPoint1 is required.");if(!e$2e(i))throw new t$15("plane is required.");e$2e(n)||(n=new o$1p);var r=o$1p.subtract(t,e,Pr$6),o=i.normal,a=o$1p.dot(o,r);if(!(Math.abs(a)<e$2d.EPSILON6)){var s=o$1p.dot(o,e),l=-(i.distance+s)/a;if(!(l<0||l>1))return o$1p.multiplyByScalar(r,l,n),o$1p.add(e,n,n),n}},g$1j.trianglePlaneIntersection=function(e,t,i,n){if(!(e$2e(e)&&e$2e(t)&&e$2e(i)&&e$2e(n)))throw new t$15("p0, p1, p2, and plane are required.");var r,o,a=n.normal,s=n.distance,l=o$1p.dot(a,e)+s<0,u=o$1p.dot(a,t)+s<0,c=o$1p.dot(a,i)+s<0,h=0;if(h+=l?1:0,h+=u?1:0,(1===(h+=c?1:0)||2===h)&&(r=new o$1p,o=new o$1p),1===h){if(l)return g$1j.lineSegmentPlane(e,t,n,r),g$1j.lineSegmentPlane(e,i,n,o),{positions:[e,t,i,r,o],indices:[0,3,4,1,2,4,1,4,3]};if(u)return g$1j.lineSegmentPlane(t,i,n,r),g$1j.lineSegmentPlane(t,e,n,o),{positions:[e,t,i,r,o],indices:[1,3,4,2,0,4,2,4,3]};if(c)return g$1j.lineSegmentPlane(i,e,n,r),g$1j.lineSegmentPlane(i,t,n,o),{positions:[e,t,i,r,o],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===h){if(!l)return g$1j.lineSegmentPlane(t,e,n,r),g$1j.lineSegmentPlane(i,e,n,o),{positions:[e,t,i,r,o],indices:[1,2,4,1,4,3,0,3,4]};if(!u)return g$1j.lineSegmentPlane(i,t,n,r),g$1j.lineSegmentPlane(e,t,n,o),{positions:[e,t,i,r,o],indices:[2,0,4,2,4,3,1,3,4]};if(!c)return g$1j.lineSegmentPlane(e,i,n,r),g$1j.lineSegmentPlane(t,i,n,o),{positions:[e,t,i,r,o],indices:[0,1,4,0,4,3,2,3,4]}}},o$1m.fromPointNormal=function(e,t,i){if(o$1q.typeOf.object("point",e),o$1q.typeOf.object("normal",t),!e$2d.equalsEpsilon(o$1p.magnitude(t),1,e$2d.EPSILON6))throw new t$15("normal must be normalized.");var n=-o$1p.dot(t,e);return e$2e(i)?(o$1p.clone(t,i.normal),i.distance=n,i):new o$1m(t,n)};var m$1e=new o$1p;o$1m.fromCartesian4=function(e,t){o$1q.typeOf.object("coefficients",e);var i=o$1p.fromCartesian4(e,m$1e),n=e.w;if(!e$2d.equalsEpsilon(o$1p.magnitude(i),1,e$2d.EPSILON6))throw new t$15("normal must be normalized.");return e$2e(t)?(o$1p.clone(i,t.normal),t.distance=n,t):new o$1m(i,n)},o$1m.getPointDistance=function(e,t){return o$1q.typeOf.object("plane",e),o$1q.typeOf.object("point",t),o$1p.dot(e.normal,t)+e.distance};var O$X=new o$1p;o$1m.projectPointOntoPlane=function(e,t,i){o$1q.typeOf.object("plane",e),o$1q.typeOf.object("point",t),e$2e(i)||(i=new o$1p);var n=o$1m.getPointDistance(e,t),r=o$1p.multiplyByScalar(e.normal,n,O$X);return o$1p.subtract(t,r,i)};var l$1g=new o$1p,H$1e,M$1c,S$13;function o$1l(e,t,i,n){return y$11(e).then(t,i,n)}function y$11(e){var t,i;return e instanceof _$15?t=e:T$1c(e)?(i=k$1a(),e.then((function(e){i.resolve(e)}),(function(e){i.reject(e)}),(function(e){i.progress(e)})),t=i.promise):t=G$1p(e),t}function D$18(e){return o$1l(e,b$1h)}function _$15(e){this.then=e}function G$1p(e){var t=new _$15((function(t){try{return y$11(t?t(e):e)}catch(e){return b$1h(e)}}));return t}function b$1h(e){var t=new _$15((function(t,i){try{return i?y$11(i(e)):b$1h(e)}catch(e){return b$1h(e)}}));return t}function k$1a(){var e,t,i,n,r,o;return e=new _$15(a),t=[],i=[],n=function(e,n,r){var o,a;return o=k$1a(),a="function"==typeof r?function(e){try{o.progress(r(e))}catch(e){o.progress(e)}}:function(e){o.progress(e)},t.push((function(t){t.then(e,n).then(o.resolve,o.reject,a)})),i.push(a),o.promise},r=function(e){return Q$1c(i,e),e},o=function(e){return e=y$11(e),n=e.then,o=y$11,r=P$1b,Q$1c(t,e),i=t=S$13,e},{then:a,resolve:s,reject:l,progress:u,promise:e,resolver:{resolve:s,reject:l,progress:u}};function a(e,t,i){return n(e,t,i)}function s(e){return o(e)}function l(e){return o(b$1h(e))}function u(e){return r(e)}}function T$1c(e){return e&&"function"==typeof e.then}function A$1k(e,t,i,n,r){return E$1r(2,arguments),o$1l(e,(function(e){var o,a,s,l,u,c,h,d,f,p;if(f=e.length>>>0,o=Math.max(0,Math.min(t,f)),s=[],a=f-o+1,l=[],u=k$1a(),o)for(d=u.progress,h=function(e){l.push(e),--a||(c=h=P$1b,u.reject(l))},c=function(e){s.push(e),--o||(c=h=P$1b,u.resolve(s))},p=0;p<f;++p)p in e&&o$1l(e[p],m,_,d);else u.resolve(s);return u.then(i,n,r);function _(e){h(e)}function m(e){c(e)}}))}function I$1w(e,t,i,n){return E$1r(1,arguments),o$1l(e,(function(e){var r,o,a,s,l,u,c,h,d;for(c=e.length>>>0,h=e.length>>>0,r=[],o=[],u=(a=k$1a()).progress,l=function(e){o.push(e),--h||(s=l=P$1b,a.resolve(r))},s=function(e,t){r[t]=e,--h||(s=l=P$1b,a.resolve(r))},d=0;d<c;++d)switch(d){case 0:o$1l(e[d],_,f,u);break;case 1:o$1l(e[d],m,f,u);break;case 2:o$1l(e[d],g,f,u);break;case 3:o$1l(e[d],x,f,u);break;case 4:o$1l(e[d],y,f,u);break;default:o$1l(e[d],p,f,u)}return a.then(t,i,n);function f(e){l(e)}function p(e){s(e,0)}function _(e){s(e,0)}function m(e){s(e,1)}function g(e){s(e,2)}function x(e){s(e,3)}function y(e){s(e,4)}}))}function J$15(e,t,i,n){return A$1k(e,1,(function(e){return t?t(e[0]):e[0]}),i,n)}function L$1j(e,t,i,n){return E$1r(1,arguments),x$1l(e,q$1h).then(t,i,n)}function K$13(){return x$1l(arguments,q$1h)}function x$1l(e,t){return o$1l(e,(function(e){var i,n,r,o,a,s;if(r=n=e.length>>>0,i=[],s=k$1a(),r)for(o=function(e,n){o$1l(e,t).then((function(e){i[n]=e,--r||s.resolve(i)}),s.reject)},a=0;a<n;a++)a in e?o(e[a],a):--r;else s.resolve(i);return s.promise}))}function N$10(e,t){var i=M$1c.call(arguments,1);return o$1l(e,(function(e){var n;return n=e.length,i[0]=function(e,i,r){return o$1l(e,(function(e){return o$1l(i,(function(i){return t(e,i,r,n)}))}))},H$1e.apply(e,i)}))}function U$1h(e,t,i){var n=arguments.length>2;return o$1l(e,(function(e){return e=n?i:e,t.resolve(e),e}),(function(e){return t.reject(e),b$1h(e)}),t.progress)}function Q$1c(e,t){for(var i,n=0;i=e[n++];)i(t)}function E$1r(e,t){for(var i,n=t.length;n>e;)if(null!=(i=t[--n])&&"function"!=typeof i)throw new Error("arg "+n+" must be a function")}function P$1b(){}function q$1h(e){return e}function a$17(e,t,i){o$1q.defined("array",e),o$1q.defined("itemToFind",t),o$1q.defined("comparator",i);for(var n,r,o=0,a=e.length-1;o<=a;)if((r=i(e[n=~~((o+a)/2)],t))<0)o=n+1;else{if(!(r>0))return n;a=n-1}return~(a+1)}function n$1c(e,t,i,n,r){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=i,this.yPoleOffset=n,this.ut1MinusUtc=r}function $$15(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,t=arguments,i=0,n=t[i++],r=function(e,t,i,n){i||(i=" ");var r=e.length>=t?"":Array(1+t-e.length>>>0).join(i);return n?e+r:r+e},o=function(e,t,i,n,o,a){var s=n-e.length;return s>0&&(e=i||!o?r(e,n,a,i):e.slice(0,t.length)+r("",s,"0",!0)+e.slice(t.length)),e},a=function(e,t,i,n,a,s,l){var u=e>>>0;return e=(i=i&&u&&{2:"0b",8:"0",16:"0x"}[t]||"")+r(u.toString(t),s||0,"0",!1),o(e,i,n,a,l)},s=function(e,t,i,n,r,a){return null!=n&&(e=e.slice(0,n)),o(e,"",t,i,r,a)},l=function(e,n,l,u,c,h,d){var f,p,_,m,g;if("%%"==e)return"%";for(var x=!1,y="",v=!1,$=!1,b=" ",T=l.length,C=0;l&&C<T;C++)switch(l.charAt(C)){case" ":y=" ";break;case"+":y="+";break;case"-":x=!0;break;case"'":b=l.charAt(C+1);break;case"0":v=!0;break;case"#":$=!0}if((u=u?"*"==u?+t[i++]:"*"==u.charAt(0)?+t[u.slice(1,-1)]:+u:0)<0&&(u=-u,x=!0),!isFinite(u))throw new Error("sprintf: (minimum-)width must be finite");switch(h=h?"*"==h?+t[i++]:"*"==h.charAt(0)?+t[h.slice(1,-1)]:+h:"fFeE".indexOf(d)>-1?6:"d"==d?0:void 0,g=n?t[n.slice(0,-1)]:t[i++],d){case"s":return s(String(g),x,u,h,v,b);case"c":return s(String.fromCharCode(+g),x,u,h,v);case"b":return a(g,2,$,x,u,h,v);case"o":return a(g,8,$,x,u,h,v);case"x":return a(g,16,$,x,u,h,v);case"X":return a(g,16,$,x,u,h,v).toUpperCase();case"u":return a(g,10,$,x,u,h,v);case"i":case"d":return f=+g||0,g=(p=(f=Math.round(f-f%1))<0?"-":y)+r(String(Math.abs(f)),h,"0",!1),o(g,p,x,u,v);case"e":case"E":case"f":case"F":case"g":case"G":return p=(f=+g)<0?"-":y,_=["toExponential","toFixed","toPrecision"]["efg".indexOf(d.toLowerCase())],m=["toString","toUpperCase"]["eEfFgG".indexOf(d)%2],g=p+Math.abs(f)[_](h),o(g,p,x,u,v)[m]();default:return e}};return n.replace(e,l)}function d$1r(e,t,i,n,r,o,a,s){this.year=e,this.month=t,this.day=i,this.hour=n,this.minute=r,this.second=o,this.millisecond=a,this.isLeapSecond=s}function i$1c(e){if(null===e||isNaN(e))throw new t$15("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0}function a$16(e,t){this.julianDate=e,this.offset=t}o$1m.transform=function(e,t,i){return o$1q.typeOf.object("plane",e),o$1q.typeOf.object("transform",t),p$1d.multiplyByPointAsVector(t,e.normal,m$1e),o$1p.normalize(m$1e,m$1e),o$1p.multiplyByScalar(e.normal,-e.distance,l$1g),p$1d.multiplyByPoint(t,l$1g,l$1g),o$1m.fromPointNormal(l$1g,m$1e,i)},o$1m.clone=function(e,t){return o$1q.typeOf.object("plane",e),e$2e(t)?(o$1p.clone(e.normal,t.normal),t.distance=e.distance,t):new o$1m(e.normal,e.distance)},o$1m.equals=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.distance===t.distance&&o$1p.equals(e.normal,t.normal)},o$1m.ORIGIN_XY_PLANE=Object.freeze(new o$1m(o$1p.UNIT_Z,0)),o$1m.ORIGIN_YZ_PLANE=Object.freeze(new o$1m(o$1p.UNIT_X,0)),o$1m.ORIGIN_ZX_PLANE=Object.freeze(new o$1m(o$1p.UNIT_Y,0)),o$1l.defer=k$1a,o$1l.resolve=y$11,o$1l.reject=D$18,o$1l.join=K$13,o$1l.all=L$1j,o$1l.map=x$1l,o$1l.reduce=N$10,o$1l.any=J$15,o$1l.some=A$1k,o$1l.allSettled=I$1w,o$1l.chain=U$1h,o$1l.isPromise=T$1c,_$15.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(S$13,e)},yield:function(e){return this.then((function(){return e}))},spread:function(e){return this.then((function(t){return L$1j(t,(function(t){return e.apply(S$13,t)}))}))}},M$1c=[].slice,H$1e=[].reduce||function(e){var t,i,n,r,o;if(o=0,r=(t=Object(this)).length>>>0,(i=arguments).length<=1)for(;;){if(o in t){n=t[o++];break}if(++o>=r)throw new TypeError}else n=i[1];for(;o<r;++o)o in t&&(n=e(n,t[o],o,t));return n};var E$1q={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5},h$17=Object.freeze(E$1q),e$28={UTC:0,TAI:1},H$1d=Object.freeze(e$28),Z$1b=new d$1r,U$1g=[31,28,31,30,31,30,31,31,30,31,30,31],b$1g=29;function H$1c(e,t){return a$15.compare(e.julianDate,t.julianDate)}var O$W=new a$16;function q$1g(e){O$W.julianDate=e;var t=a$15.leapSeconds,i=a$17(t,O$W,H$1c);i<0&&(i=~i),i>=t.length&&(i=t.length-1);var n=t[i].offset;i>0&&(a$15.secondsDifference(t[i].julianDate,e)>n&&(n=t[--i].offset));a$15.addSeconds(e,n,e)}function F$1g(e,t){O$W.julianDate=e;var i=a$15.leapSeconds,n=a$17(i,O$W,H$1c);if(n<0&&(n=~n),0===n)return a$15.addSeconds(e,-i[0].offset,t);if(n>=i.length)return a$15.addSeconds(e,-i[n-1].offset,t);var r=a$15.secondsDifference(i[n].julianDate,e);return 0===r?a$15.addSeconds(e,-i[n].offset,t):r<=1?void 0:a$15.addSeconds(e,-i[--n].offset,t)}function I$1v(e,t,i){var n=t/h$17.SECONDS_PER_DAY|0;return e+=n,(t-=h$17.SECONDS_PER_DAY*n)<0&&(e--,t+=h$17.SECONDS_PER_DAY),i.dayNumber=e,i.secondsOfDay=t,i}function x$1k(e,t,i,n,r,o,a){var s=(t-14)/12|0,l=e+4800+s,u=(1461*l/4|0)+(367*(t-2-12*s)/12|0)-(3*((l+100)/100|0)/4|0)+i-32075;(n-=12)<0&&(n+=24);var c=o+(n*h$17.SECONDS_PER_HOUR+r*h$17.SECONDS_PER_MINUTE+a*h$17.SECONDS_PER_MILLISECOND);return c>=43200&&(u-=1),[u,c]}var V$17=/^(\d{4})$/,B$16=/^(\d{4})-(\d{2})$/,K$12=/^(\d{4})-?(\d{3})$/,Q$1b=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,X$15=/^(\d{4})-?(\d{2})-?(\d{2})$/,G$1o=/([Z+\-])?(\d{2})?:?(\d{2})?$/,j$1h=/^(\d{2})(\.\d+)?/.source+G$1o.source,ee$C=/^(\d{2}):?(\d{2})(\.\d+)?/.source+G$1o.source,ne$J=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+G$1o.source,y$10="Invalid ISO 8601 date.";function a$15(e,t,i){this.dayNumber=void 0,this.secondsOfDay=void 0,e=u$Z(e,0),t=u$Z(t,0),i=u$Z(i,H$1d.UTC);var n=0|e;I$1v(n,t+=(e-n)*h$17.SECONDS_PER_DAY,this),i===H$1d.UTC&&q$1g(this)}a$15.fromGregorianDate=function(e,t){if(!(e instanceof d$1r))throw new t$15("date must be a valid GregorianDate.");var i=x$1k(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return e$2e(t)?(I$1v(i[0],i[1],t),q$1g(t),t):new a$15(i[0],i[1],H$1d.UTC)},a$15.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new t$15("date must be a valid JavaScript Date.");var i=x$1k(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return e$2e(t)?(I$1v(i[0],i[1],t),q$1g(t),t):new a$15(i[0],i[1],H$1d.UTC)},a$15.fromIso8601=function(e,t){if("string"!=typeof e)throw new t$15(y$10);var i,n,r,o,a,s=(e=e.replace(",",".")).split("T"),l=1,u=1,c=0,h=0,d=0,f=0,p=s[0],_=s[1];if(!e$2e(p))throw new t$15(y$10);if(null!==(s=p.match(X$15))){if((o=p.split("-").length-1)>0&&2!==o)throw new t$15(y$10);i=+s[1],l=+s[2],u=+s[3]}else if(null!==(s=p.match(B$16)))i=+s[1],l=+s[2];else if(null!==(s=p.match(V$17)))i=+s[1];else{var m;if(null!==(s=p.match(K$12))){if(i=+s[1],m=+s[2],r=i$1c(i),m<1||r&&m>366||!r&&m>365)throw new t$15(y$10)}else{if(null===(s=p.match(Q$1b)))throw new t$15(y$10);i=+s[1];var g=+s[2],x=+s[3]||0;if((o=p.split("-").length-1)>0&&(!e$2e(s[3])&&1!==o||e$2e(s[3])&&2!==o))throw new t$15(y$10);m=7*g+x-new Date(Date.UTC(i,0,4)).getUTCDay()-3}(n=new Date(Date.UTC(i,0,1))).setUTCDate(m),l=n.getUTCMonth()+1,u=n.getUTCDate()}if(r=i$1c(i),l<1||l>12||u<1||(2!==l||!r)&&u>U$1g[l-1]||r&&2===l&&u>b$1g)throw new t$15(y$10);if(e$2e(_)){if(null!==(s=_.match(ne$J))){if((o=_.split(":").length-1)>0&&2!==o&&3!==o)throw new t$15(y$10);c=+s[1],h=+s[2],d=+s[3],f=1e3*+(s[4]||0),a=5}else if(null!==(s=_.match(ee$C))){if((o=_.split(":").length-1)>2)throw new t$15(y$10);c=+s[1],h=+s[2],d=60*+(s[3]||0),a=4}else{if(null===(s=_.match(j$1h)))throw new t$15(y$10);c=+s[1],h=60*+(s[2]||0),a=3}if(h>=60||d>=61||c>24||24===c&&(h>0||d>0||f>0))throw new t$15(y$10);var y=s[a],v=+s[a+1],$=+(s[a+2]||0);switch(y){case"+":c-=v,h-=$;break;case"-":c+=v,h+=$;break;case"Z":break;default:h+=new Date(Date.UTC(i,l-1,u,c,h)).getTimezoneOffset()}}var b=60===d;for(b&&d--;h>=60;)h-=60,c++;for(;c>=24;)c-=24,u++;for(n=r&&2===l?b$1g:U$1g[l-1];u>n;)u-=n,++l>12&&(l-=12,i++),n=r&&2===l?b$1g:U$1g[l-1];for(;h<0;)h+=60,c--;for(;c<0;)c+=24,u--;for(;u<1;)--l<1&&(l+=12,i--),u+=n=r&&2===l?b$1g:U$1g[l-1];var T=x$1k(i,l,u,c,h,d,f);return e$2e(t)?(I$1v(T[0],T[1],t),q$1g(t)):t=new a$15(T[0],T[1],H$1d.UTC),b&&a$15.addSeconds(t,1,t),t},a$15.now=function(e){return a$15.fromDate(new Date,e)};var g$1i=new a$15(0,0,H$1d.TAI);function h$16(e){if(e instanceof h$16)this.scheme=e.scheme,this.authority=e.authority,this.path=e.path,this.query=e.query,this.fragment=e.fragment;else if(e){var t=o$1k.exec(e);this.scheme=t[1],this.authority=t[2],this.path=t[3],this.query=t[4],this.fragment=t[5]}}a$15.toGregorianDate=function(e,t){if(!e$2e(e))throw new t$15("julianDate is required.");var i=!1,n=F$1g(e,g$1i);e$2e(n)||(a$15.addSeconds(e,-1,g$1i),n=F$1g(g$1i,g$1i),i=!0);var r=n.dayNumber,o=n.secondsOfDay;o>=43200&&(r+=1);var a=r+68569|0,s=4*a/146097|0,l=4e3*((a=a-((146097*s+3)/4|0)|0)+1)/1461001|0,u=80*(a=a-(1461*l/4|0)+31|0)/2447|0,c=a-(2447*u/80|0)|0,h=u+2-12*(a=u/11|0)|0,d=100*(s-49)+l+a|0,f=o/h$17.SECONDS_PER_HOUR|0,p=o-f*h$17.SECONDS_PER_HOUR,_=p/h$17.SECONDS_PER_MINUTE|0,m=0|(p-=_*h$17.SECONDS_PER_MINUTE),g=(p-m)/h$17.SECONDS_PER_MILLISECOND;return(f+=12)>23&&(f-=24),i&&(m+=1),e$2e(t)?(t.year=d,t.month=h,t.day=c,t.hour=f,t.minute=_,t.second=m,t.millisecond=g,t.isLeapSecond=i,t):new d$1r(d,h,c,f,_,m,g,i)},a$15.toDate=function(e){if(!e$2e(e))throw new t$15("julianDate is required.");var t=a$15.toGregorianDate(e,Z$1b),i=t.second;return t.isLeapSecond&&(i-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,i,t.millisecond))},a$15.toIso8601=function(e,t){if(!e$2e(e))throw new t$15("julianDate is required.");var i=a$15.toGregorianDate(e,Z$1b),n=i.year,r=i.month,o=i.day,a=i.hour,s=i.minute,l=i.second,u=i.millisecond;return 1e4===n&&1===r&&1===o&&0===a&&0===s&&0===l&&0===u&&(n=9999,r=12,o=31,a=24),e$2e(t)||0===u?e$2e(t)&&0!==t?$$15("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",n,r,o,a,s,l,(.01*u).toFixed(t).replace(".","").slice(0,t)):$$15("%04d-%02d-%02dT%02d:%02d:%02dZ",n,r,o,a,s,l):$$15("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",n,r,o,a,s,l,(.01*u).toString().replace(".",""))},a$15.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new a$15(e.dayNumber,e.secondsOfDay,H$1d.TAI)},a$15.compare=function(e,t){if(!e$2e(e))throw new t$15("left is required.");if(!e$2e(t))throw new t$15("right is required.");var i=e.dayNumber-t.dayNumber;return 0!==i?i:e.secondsOfDay-t.secondsOfDay},a$15.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},a$15.equalsEpsilon=function(e,t,i){if(!e$2e(i))throw new t$15("epsilon is required.");return e===t||e$2e(e)&&e$2e(t)&&Math.abs(a$15.secondsDifference(e,t))<=i},a$15.totalDays=function(e){if(!e$2e(e))throw new t$15("julianDate is required.");return e.dayNumber+e.secondsOfDay/h$17.SECONDS_PER_DAY},a$15.secondsDifference=function(e,t){if(!e$2e(e))throw new t$15("left is required.");if(!e$2e(t))throw new t$15("right is required.");return(e.dayNumber-t.dayNumber)*h$17.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},a$15.daysDifference=function(e,t){if(!e$2e(e))throw new t$15("left is required.");if(!e$2e(t))throw new t$15("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/h$17.SECONDS_PER_DAY},a$15.computeTaiMinusUtc=function(e){O$W.julianDate=e;var t=a$15.leapSeconds,i=a$17(t,O$W,H$1c);return i<0&&(i=~i,--i<0&&(i=0)),t[i].offset},a$15.addSeconds=function(e,t,i){if(!e$2e(e))throw new t$15("julianDate is required.");if(!e$2e(t))throw new t$15("seconds is required.");if(!e$2e(i))throw new t$15("result is required.");return I$1v(e.dayNumber,e.secondsOfDay+t,i)},a$15.addMinutes=function(e,t,i){if(!e$2e(e))throw new t$15("julianDate is required.");if(!e$2e(t))throw new t$15("minutes is required.");if(!e$2e(i))throw new t$15("result is required.");var n=e.secondsOfDay+t*h$17.SECONDS_PER_MINUTE;return I$1v(e.dayNumber,n,i)},a$15.addHours=function(e,t,i){if(!e$2e(e))throw new t$15("julianDate is required.");if(!e$2e(t))throw new t$15("hours is required.");if(!e$2e(i))throw new t$15("result is required.");var n=e.secondsOfDay+t*h$17.SECONDS_PER_HOUR;return I$1v(e.dayNumber,n,i)},a$15.addDays=function(e,t,i){if(!e$2e(e))throw new t$15("julianDate is required.");if(!e$2e(t))throw new t$15("days is required.");if(!e$2e(i))throw new t$15("result is required.");return I$1v(e.dayNumber+t,e.secondsOfDay,i)},a$15.lessThan=function(e,t){return a$15.compare(e,t)<0},a$15.lessThanOrEquals=function(e,t){return a$15.compare(e,t)<=0},a$15.greaterThan=function(e,t){return a$15.compare(e,t)>0},a$15.greaterThanOrEquals=function(e,t){return a$15.compare(e,t)>=0},a$15.prototype.clone=function(e){return a$15.clone(this,e)},a$15.prototype.equals=function(e){return a$15.equals(this,e)},a$15.prototype.equalsEpsilon=function(e,t){return a$15.equalsEpsilon(this,e,t)},a$15.prototype.toString=function(){return a$15.toIso8601(this)},a$15.leapSeconds=[new a$16(new a$15(2441317,43210,H$1d.TAI),10),new a$16(new a$15(2441499,43211,H$1d.TAI),11),new a$16(new a$15(2441683,43212,H$1d.TAI),12),new a$16(new a$15(2442048,43213,H$1d.TAI),13),new a$16(new a$15(2442413,43214,H$1d.TAI),14),new a$16(new a$15(2442778,43215,H$1d.TAI),15),new a$16(new a$15(2443144,43216,H$1d.TAI),16),new a$16(new a$15(2443509,43217,H$1d.TAI),17),new a$16(new a$15(2443874,43218,H$1d.TAI),18),new a$16(new a$15(2444239,43219,H$1d.TAI),19),new a$16(new a$15(2444786,43220,H$1d.TAI),20),new a$16(new a$15(2445151,43221,H$1d.TAI),21),new a$16(new a$15(2445516,43222,H$1d.TAI),22),new a$16(new a$15(2446247,43223,H$1d.TAI),23),new a$16(new a$15(2447161,43224,H$1d.TAI),24),new a$16(new a$15(2447892,43225,H$1d.TAI),25),new a$16(new a$15(2448257,43226,H$1d.TAI),26),new a$16(new a$15(2448804,43227,H$1d.TAI),27),new a$16(new a$15(2449169,43228,H$1d.TAI),28),new a$16(new a$15(2449534,43229,H$1d.TAI),29),new a$16(new a$15(2450083,43230,H$1d.TAI),30),new a$16(new a$15(2450630,43231,H$1d.TAI),31),new a$16(new a$15(2451179,43232,H$1d.TAI),32),new a$16(new a$15(2453736,43233,H$1d.TAI),33),new a$16(new a$15(2454832,43234,H$1d.TAI),34),new a$16(new a$15(2456109,43235,H$1d.TAI),35),new a$16(new a$15(2457204,43236,H$1d.TAI),36),new a$16(new a$15(2457754,43237,H$1d.TAI),37)],h$16.prototype.scheme=null,h$16.prototype.authority=null,h$16.prototype.path="",h$16.prototype.query=null,h$16.prototype.fragment=null;var o$1k=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");h$16.prototype.getScheme=function(){return this.scheme},h$16.prototype.getAuthority=function(){return this.authority},h$16.prototype.getPath=function(){return this.path},h$16.prototype.getQuery=function(){return this.query},h$16.prototype.getFragment=function(){return this.fragment},h$16.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},h$16.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query},h$16.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment},h$16.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(n$1b,u$X).replace(s$10,a$14)),this.path&&(this.path=this.path.replace(s$10,a$14)),this.query&&(this.query=this.query.replace(s$10,a$14)),this.fragment&&(this.fragment=this.fragment.replace(s$10,a$14))};var s$10=/%[0-9a-z]{2}/gi,p$1a=/[a-zA-Z0-9\-\._~]/,n$1b=/(.*@)?([^@:]*)(:.*)?/;function a$14(e){var t=unescape(e);return p$1a.test(t)?t:e.toUpperCase()}function u$X(e,t,i,n){return(t||"")+i.toLowerCase()+(n||"")}function n$1a(e){return(0===e.length||"/"!==e[e.length-1])&&(e+="/"),e}function l$1f(e,t){if(null===e||"object"!=typeof e)return e;t=u$Z(t,!1);var i=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t&&(r=l$1f(r,t)),i[n]=r}return i}function p$19(e,t,i){i=u$Z(i,!1);var n,r,o,a={},s=e$2e(e),l=e$2e(t);if(s)for(n in e)e.hasOwnProperty(n)&&(r=e[n],l&&i&&"object"==typeof r&&t.hasOwnProperty(n)?(o=t[n],a[n]="object"==typeof o?p$19(r,o,i):r):a[n]=r);if(l)for(n in t)t.hasOwnProperty(n)&&!a.hasOwnProperty(n)&&(o=t[n],a[n]=o);return a}function o$1j(e,t){var i;return typeof document<"u"&&(i=document),o$1j._implementation(e,t,i)}function i$1b(e,t){if(!e$2e(e))throw new t$15("uri is required.");var i="",n=e.lastIndexOf("/");return-1!==n&&(i=e.substring(0,n+1)),t&&(e$2e((e=new h$16(e)).query)&&(i+="?"+e.query),e$2e(e.fragment)&&(i+="#"+e.fragment)),i}function a$13(e){if(!e$2e(e))throw new t$15("uri is required.");var t=new h$16(e);t.normalize();var i=t.path,n=i.lastIndexOf("/");return-1!==n&&(i=i.substr(n+1)),n=i.lastIndexOf("."),i=-1===n?"":i.substr(n+1)}h$16.prototype.resolve=function(e){var t=new h$16;return this.scheme?(t.scheme=this.scheme,t.authority=this.authority,t.path=this.path,t.query=this.query):(t.scheme=e.scheme,this.authority?(t.authority=this.authority,t.path=this.path,t.query=this.query):(t.authority=e.authority,""==this.path?(t.path=e.path,t.query=this.query||e.query):("/"==this.path.charAt(0)?(t.path=this.path,t.removeDotSegments()):(e.authority&&""==e.path?t.path="/"+this.path:t.path=e.path.substring(0,e.path.lastIndexOf("/")+1)+this.path,t.removeDotSegments()),t.query=this.query))),t.fragment=this.fragment,t},h$16.prototype.removeDotSegments=function(){var e,t=this.path.split("/"),i=[],n=""==t[0];n&&t.shift();for(""==t[0]&&t.shift();t.length;)".."==(e=t.shift())?i.pop():"."!=e&&i.push(e);("."==e||".."==e)&&i.push(""),n&&i.unshift(""),this.path=i.join("/")},h$16.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e},o$1j._implementation=function(e,t,i){if(!e$2e(e))throw new t$15("relative uri is required.");if(!e$2e(t)){if(typeof i>"u")return e;t=u$Z(i.baseURI,i.location.href)}var n=new h$16(t);return new h$16(e).resolve(n).toString()};var e$27=/^blob:/i,o$1i;function i$1a(e){return o$1q.typeOf.string("uri",e),e$27.test(e)}function i$19(e){e$2e(o$1i)||(o$1i=document.createElement("a")),o$1i.href=window.location.href;var t=o$1i.host,i=o$1i.protocol;return o$1i.href=e,o$1i.href=o$1i.href,i!==o$1i.protocol||t!==o$1i.host}var a$12=/^data:/i;function e$26(e){return o$1q.typeOf.string("uri",e),a$12.test(e)}function a$11(e){var t=o$1l.defer(),i=document.createElement("script");i.async=!0,i.src=e;var n=document.getElementsByTagName("head")[0];return i.onload=function(){i.onload=void 0,n.removeChild(i),t.resolve()},i.onerror=function(e){t.reject(e)},n.appendChild(i),t.promise}function m$1d(e,t){if(!e$2e(e))throw new t$15("obj is required.");var i="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=encodeURIComponent(n)+"=";if(Array.isArray(r))for(var a=0,s=r.length;a<s;++a)i+=!0===t?o+encodeURI(r[a])+"&":o+encodeURIComponent(r[a])+"&";else i+=!0===t?o+encodeURI(r)+"&":o+encodeURIComponent(r)+"&"}return i=i.slice(0,-1)}function m$1c(e){if(!e$2e(e))throw new t$15("queryString is required.");var t={};if(""===e)return t;for(var i=e.replace(/\+/g,"%20").split(/[&;]/),n=0,r=i.length;n<r;++n){var o=i[n].split("=");if(o.length>2){var a=i[n].indexOf("=");o=[i[n].substring(0,a),i[n].substring(a+1,i[n].length)]}var s=decodeURIComponent(o[0]),l=o[1];l=e$2e(l)?decodeURIComponent(l):"";var u=t[s];"string"==typeof u?t[s]=[u,l]:Array.isArray(u)?u.push(l):t[s]=l}return t}var e$25={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},W$1c=Object.freeze(e$25),e$24={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3,PACK:4,BLOCK:5,BLOCKPACK:6},U$1f=Object.freeze(e$24),e$23;function r$1c(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.throttleByServer,!1),i=u$Z(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=u$Z(e.priority,0),this.throttle=i,this.throttleByServer=t,this.type=u$Z(e.type,U$1f.OTHER),this.serverKey=void 0,this.state=W$1c.UNISSUED,this.deferred=void 0,this.cancelled=!1}function n$19(e){var t={};if(!e)return t;for(var i=e.split("\r\n"),n=0;n<i.length;++n){var r=i[n],o=r.indexOf(": ");if(o>0){var a=r.substring(0,o),s=r.substring(o+2);t[a]=s}}return t}function s$$(e,t,i){this.statusCode=e,this.response=t,this.responseHeaders=i,"string"==typeof this.responseHeaders&&(this.responseHeaders=n$19(this.responseHeaders))}function o$1h(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function v$Z(e,t){return t-e}function o$1g(e){o$1q.typeOf.object("options",e),o$1q.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function m$1b(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}r$1c.prototype.cancel=function(){this.cancelled=!0},r$1c.prototype.clone=function(e){return e$2e(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new r$1c(this)},s$$.prototype.toString=function(){var e="Request has failed.";return e$2e(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e},Object.defineProperties(o$1h.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),o$1h.prototype.addEventListener=function(e,t){o$1q.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);var i=this;return function(){i.removeEventListener(e,t)}},o$1h.prototype.removeEventListener=function(e,t){o$1q.typeOf.func("listener",e);for(var i=this._listeners,n=this._scopes,r=-1,o=0;o<i.length;o++)if(i[o]===e&&n[o]===t){r=o;break}return-1!==r&&(this._insideRaiseEvent?(this._toRemove.push(r),i[r]=void 0,n[r]=void 0):(i.splice(r,1),n.splice(r,1)),!0)},o$1h.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;var e,t=this._listeners,i=this._scopes,n=t.length;for(e=0;e<n;e++){var r=t[e];e$2e(r)&&t[e].apply(i[e],arguments)}var o=this._toRemove;if((n=o.length)>0){for(o.sort(v$Z),e=0;e<n;e++){var a=o[e];t.splice(a,1),i.splice(a,1)}o.length=0}this._insideRaiseEvent=!1},Object.defineProperties(o$1g.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){this._maximumLength=e,this._length>e&&e>0&&(this._length=e,this._array.length=e)}},comparator:{get:function(){return this._comparator}}}),o$1g.prototype.reserve=function(e){e=u$Z(e,this._length),this._array.length=e},o$1g.prototype.heapify=function(e){e=u$Z(e,0);for(var t=this._length,i=this._comparator,n=this._array,r=-1,o=!0;o;){var a=2*(e+1),s=a-1;r=s<t&&i(n[s],n[e])<0?s:e,a<t&&i(n[a],n[r])<0&&(r=a),r!==e?(m$1b(n,r,e),e=r):o=!1}},o$1g.prototype.resort=function(){for(var e=this._length,t=Math.ceil(e/2);t>=0;--t)this.heapify(t)},o$1g.prototype.insert=function(e){o$1q.defined("element",e);var t,i=this._array,n=this._comparator,r=this._maximumLength,o=this._length++;for(o<i.length?i[o]=e:i.push(e);0!==o;){var a=Math.floor((o-1)/2);if(!(n(i[o],i[a])<0))break;m$1b(i,o,a),o=a}return e$2e(r)&&this._length>r&&(t=i[r],i.pop(),this._length=r),t},o$1g.prototype.pop=function(e){if(e=u$Z(e,0),0!==this._length){o$1q.typeOf.number.lessThan("index",e,this._length);var t=this._array,i=t[e];return m$1b(t,e,--this._length),t[this._length]=void 0,this.heapify(e),i}},e$23=typeof performance<"u"&&"function"==typeof performance.now&&isFinite(performance.now())?function(){return performance.now()}:function(){return Date.now()};var Et$c=e$23;function S$12(e,t){return e.priority-t.priority}var i$18={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0,totalRequestTime:0},b$1f=20,o$1f=new o$1g({comparator:S$12});o$1f.maximumLength=b$1f,o$1f.reserve(b$1f);var c$19=[],v$Y={},I$1u=typeof document<"u"?new h$16(document.location.href):new h$16,k$19=new o$1h;function r$1b(){}function K$11(e){e$2e(e.priorityFunction)&&(e.priority=e.priorityFunction())}function C$1h(e){var t=u$Z(r$1b.requestsByServer[e],r$1b.maximumRequestsPerServer);return v$Y[e]<t}function q$1f(e){return e$2e(e.packKey)||(e.packKey=e.serverKey+"_"+e.providerName),e.packKey}function L$1i(e){return e$2e(e.blockKey)||(e.blockKey=e.serverKey+"_"+e.providerName+"_"+e.quadKey+e.url.substring(e.url.indexOf("dataVersion"))),e.blockKey}function N$$(e){var t=q$1f(e);return e$2e(r$1b.packRequestGroup[t])||(r$1b.packRequestGroup[t]=[]),e$2e(r$1b.packRequestQuadKey[t])||(r$1b.packRequestQuadKey[t]=""),e$2e(r$1b.packRequestPromise[t])||(r$1b.packRequestPromise[t]=o$1l.defer()),e$2e(r$1b.quadKeyIndex[t])||(r$1b.quadKeyIndex[t]=0),e.quadKeyIndex=r$1b.quadKeyIndex[t]++,e.deferred=r$1b.packRequestPromise[t],e.state=W$1c.ISSUED,r$1b.packRequestGroup[t].push(e),e.deferred.promise}function T$1b(e){var t=L$1i(e),i=r$1b.blockDefer[t];return e$2e(i)||(i=r$1b.blockDefer[t]=o$1l.defer(),r$1b.blockRequest[t]=e),e.deferred=i,e.state=W$1c.ISSUED,e.deferred.promise}function H$1b(){r$1b.packRequestGroup={},r$1b.packRequestPromise={},r$1b.packRequestQuadKey={},r$1b.quadKeyIndex={}}function U$1e(){r$1b.blockRequest={}}function Q$1a(e){for(var t=0,i=e.length;t<i;t++){e[t].state=W$1c.CANCELLED}}function j$1g(e){for(var t=[],i={},n=0,r=e.length;n<r;n++){var o=e[n];if(!o.cancelled){var a=o.quadKey;i[a]||(i[a]=!0,t.push(a))}}return t}function V$16(){var e=r$1b.packRequestGroup;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];if(i.length<1)continue;var n=i[0].clone(),r=-1!==n.url.indexOf("rest/maps");n.serverKey=i[0].serverKey,n.state=i[0].state;var o=n.url,a=j$1g(i);if(a.length<1)continue;r$1b.packRequestQuadKey[t]=r?a.join(","):a.join(";");var s=r$1b.packRequestQuadKey[t];if(n.throttleByServer&&!C$1h(n.serverKey)){Q$1a(i),r$1b.packRequestPromise[t].reject();continue}n.deferred=r$1b.packRequestPromise[t];var l=new h$16(o);l.query=r?e$2e(l.query)?l.query+"&tiles="+s:"tiles="+s:e$2e(l.query)?l.query+"&extratiles="+s:"extratiles="+s,n.url=l.toString(),A$1j(n,n.url)}H$1b()}function _$14(){var e=r$1b.blockRequest;for(var t in e)if(e.hasOwnProperty(t)){A$1j(e[t])}U$1e()}function x$1j(e){if(e.state===W$1c.UNISSUED)if(e.state=W$1c.ISSUED,e.type===U$1f.PACK||e.type===U$1f.BLOCKPACK){var t=q$1f(e);e$2e(r$1b.packRequestPromise[t])||(r$1b.packRequestPromise[t]=o$1l.defer()),e.deferred=r$1b.packRequestPromise[t]}else e.deferred=o$1l.defer();return e.deferred.promise}function M$1b(e){return function(t){if(e.state!==W$1c.CANCELLED&&(--i$18.numberOfActiveRequests,--v$Y[e.serverKey],k$19.raiseEvent(),e.state=W$1c.RECEIVED,e.deferred.resolve(t),e.endTime=Et$c(),(r$1b.statisticRequestTime>0||e.type!==U$1f.OTHER)&&(i$18.totalRequestTime+=e.endTime-e.startTime),e.type===U$1f.BLOCK||e.type===U$1f.BLOCKPACK)){var i=L$1i(e);e$2e(r$1b.blockDefer[i])&&(r$1b.blockDefer[i]=void 0,delete r$1b.blockDefer[i])}}}function z$13(e){return function(t){e.state!==W$1c.CANCELLED&&(++i$18.numberOfFailedRequests,--i$18.numberOfActiveRequests,--v$Y[e.serverKey],k$19.raiseEvent(t),e.state=W$1c.FAILED,e.deferred.reject(t))}}function A$1j(e,t){var i=x$1j(e);return e.state=W$1c.ACTIVE,c$19.push(e),++i$18.numberOfActiveRequests,++i$18.numberOfActiveRequestsEver,++v$Y[e.serverKey],e.startTime=Et$c(),e.requestFunction(t).then(M$1b(e)).otherwise(z$13(e)),i}function p$18(e){var t=e.state===W$1c.ACTIVE;e.state=W$1c.CANCELLED,++i$18.numberOfCancelledRequests,e.deferred.reject(),t&&(--i$18.numberOfActiveRequests,--v$Y[e.serverKey],++i$18.numberOfCancelledActiveRequests),e$2e(e.cancelFunction)&&e.cancelFunction()}function G$1n(){for(var e in r$1b.packRequestHeap)if(r$1b.packRequestHeap.hasOwnProperty(e)){for(var t=r$1b.packRequestHeap[e],i=t.internalArray,n=t.length,r=0;r<n;++r)K$11(i[r]);t.resort()}}function J$14(){for(var e in r$1b.packRequestHeap)if(r$1b.packRequestHeap.hasOwnProperty(e))for(var t=r$1b.packRequestHeap[e];t.length>0;){var i=t.pop();i.cancelled?p$18(i):N$$(i)}V$16()}function W$1b(e){var t=q$1f(e),i=r$1b.packRequestHeap[t];return e$2e(i)||((i=r$1b.packRequestHeap[t]=new o$1g({comparator:S$12})).maximumLength=r$1b.perPacketCount,i.reserve(b$1f)),i}function X$14(){!r$1b.debugShowStatistics||(0===i$18.numberOfActiveRequests&&i$18.lastNumberOfActiveRequests>0&&(i$18.numberOfAttemptedRequests>0&&(console.log("Number of attempted requests: "+i$18.numberOfAttemptedRequests),i$18.numberOfAttemptedRequests=0),i$18.numberOfCancelledRequests>0&&(console.log("Number of cancelled requests: "+i$18.numberOfCancelledRequests),i$18.numberOfCancelledRequests=0),i$18.numberOfCancelledActiveRequests>0&&(console.log("Number of cancelled active requests: "+i$18.numberOfCancelledActiveRequests),i$18.numberOfCancelledActiveRequests=0),i$18.numberOfFailedRequests>0&&(console.log("Number of failed requests: "+i$18.numberOfFailedRequests),i$18.numberOfFailedRequests=0)),i$18.lastNumberOfActiveRequests=i$18.numberOfActiveRequests)}r$1b.TIMEOUT=5e3,r$1b.CANCLE_COUNT=3,r$1b.statisticRequestTime=-1,r$1b.maximumRequests=50,r$1b.maximumRequestsPerServer=6,r$1b.perPacketCount=20,r$1b.requestsByServer={},r$1b.throttleRequests=!0,r$1b.debugShowStatistics=!1,r$1b.requestCompletedEvent=k$19,Object.defineProperties(r$1b,{activeRequestLength:{get:function(){return c$19.length}},statistics:{get:function(){return i$18}},priorityHeapLength:{get:function(){return b$1f},set:function(e){if(e<b$1f)for(;o$1f.length>e;){p$18(o$1f.pop())}b$1f=e,o$1f.maximumLength=e,o$1f.reserve(e)}}}),r$1b.packRequestGroup={},r$1b.packRequestPromise={},r$1b.packRequestQuadKey={},r$1b.quadKeyIndex={},r$1b.packRequestHeap={},r$1b.blockDefer={},r$1b.blockRequest={},r$1b.update=function(){var e,t,i=0,n=c$19.length;for(e=0;e<n;++e)(t=c$19[e]).cancelled&&p$18(t),t.state===W$1c.ACTIVE?i>0&&(c$19[e-i]=t):++i;c$19.length-=i;var r=o$1f.internalArray,o=o$1f.length;for(e=0;e<o;++e)K$11(r[e]);o$1f.resort(),G$1n(),_$14(),J$14();for(var a=Math.max(r$1b.maximumRequests-c$19.length,0),s=0;s<a&&o$1f.length>0;)(t=o$1f.pop()).cancelled?p$18(t):!t.throttleByServer||C$1h(t.serverKey)?(A$1j(t),++s):p$18(t);X$14()},r$1b.getServerKey=function(e){o$1q.typeOf.string("url",e);var t=new h$16(e).resolve(I$1u);t.normalize();var i=t.authority;return/:/.test(i)||(i=i+":"+("https"===t.scheme?"443":"80")),e$2e(v$Y[i])||(v$Y[i]=0),i},r$1b.request=function(e){if(o$1q.typeOf.object("request",e),o$1q.typeOf.string("request.url",e.url),o$1q.typeOf.func("request.requestFunction",e.requestFunction),e$26(e.url)||i$1a(e.url))return k$19.raiseEvent(),e.state=W$1c.RECEIVED,e.requestFunction();if(++i$18.numberOfAttemptedRequests,e$2e(e.serverKey)||(e.serverKey=r$1b.getServerKey(e.url)),e.type===U$1f.BLOCK)return T$1b(e);if(!e.throttleByServer||C$1h(e.serverKey)){if(!r$1b.throttleRequests||!e.throttle)return A$1j(e);if(!(c$19.length>=r$1b.maximumRequests)){var t;if(K$11(e),e.type===U$1f.PACK||e.type===U$1f.BLOCKPACK){var i=W$1b(e),n=!0;if(e.type===U$1f.BLOCKPACK)for(var r=0;r<i.length;r++)if(i._array[r].quadKey===e.quadKey){e.blockRequest=i._array[r],n=!1;break}n&&(t=i.insert(e))}else t=o$1f.insert(e);if(e$2e(t)){if(t===e)return;p$18(t)}return x$1j(e)}}},r$1b.clearForSpecs=function(){for(;o$1f.length>0;){p$18(o$1f.pop())}for(var e=c$19.length,t=0;t<e;++t)p$18(c$19[t]);c$19.length=0,v$Y={},i$18.numberOfAttemptedRequests=0,i$18.numberOfActiveRequests=0,i$18.numberOfCancelledRequests=0,i$18.numberOfCancelledActiveRequests=0,i$18.numberOfFailedRequests=0,i$18.numberOfActiveRequestsEver=0,i$18.lastNumberOfActiveRequests=0,i$18.totalRequestTime=0},r$1b.numberOfActiveRequestsByServer=function(e){return v$Y[e]},r$1b.requestHeap=o$1f;var u$W={},n$18={};function w$18(e){var t=new h$16(e);t.normalize();var i=t.getAuthority();if(e$2e(i)){if(-1!==i.indexOf("@")){var n=i.split("@");i=n[1]}if(-1===i.indexOf(":")){var r=t.getScheme();if(e$2e(r)||(r=(r=window.location.protocol).substring(0,r.length-1)),"http"===r)i+=":80";else{if("https"!==r)return;i+=":443"}}return i}}u$W.add=function(e,t){if(!e$2e(e))throw new t$15("host is required.");if(!e$2e(t)||t<=0)throw new t$15("port is required to be greater than 0.");var i=e.toLowerCase()+":"+t;e$2e(n$18[i])||(n$18[i]=!0)},u$W.remove=function(e,t){if(!e$2e(e))throw new t$15("host is required.");if(!e$2e(t)||t<=0)throw new t$15("port is required to be greater than 0.");var i=e.toLowerCase()+":"+t;e$2e(n$18[i])&&delete n$18[i]},u$W.contains=function(e){if(!e$2e(e))throw new t$15("url is required.");var t=w$18(e);return!(!e$2e(t)||!e$2e(n$18[t]))},u$W.clear=function(){n$18={}};var i$17={};function e$22(e,t){if(!e$2e(e))throw new t$15("identifier is required.");e$2e(i$17[e])||(i$17[e]=!0,console.warn(u$Z(t,e)))}function t$11(e,t){if(!e$2e(e)||!e$2e(t))throw new t$15("identifier and message are required.");e$22(e,t)}e$22.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",e$22.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",e$22.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",e$22.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var k$18=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch{return!1}}(),_$13;function x$1i(e,t,i,n){var r,o=e.query;if(!e$2e(o)||0===o.length)return{};if(-1===o.indexOf("=")){var a={};a[o]=void 0,r=a}else r=m$1c(o);t._queryParameters=i?O$V(r,t._queryParameters,n):r,e.query=void 0}function re$K(e,t){var i=t._queryParameters,n=Object.keys(i);1!==n.length||e$2e(i[n[0]])?e.query=m$1d(i):e.query=n[0]}function v$X(e,t){return e$2e(e)?e$2e(e.clone)?e.clone():l$1f(e):t}function C$1g(e){if(e.state===W$1c.ISSUED||e.state===W$1c.ACTIVE)throw new t$13("The Resource is already being fetched.");e.state=W$1c.UNISSUED,e.deferred=void 0}function O$V(e,t,i){if(!i)return p$19(e,t);var n=l$1f(e,!0);for(var r in t)if(t.hasOwnProperty(r)){var o=n[r],a=t[r];e$2e(o)?(Array.isArray(o)||(o=n[r]=[o]),n[r]=o.concat(a)):n[r]=Array.isArray(a)?a.slice():a}return n}function t$10(e){"string"==typeof(e=u$Z(e,u$Z.EMPTY_OBJECT))&&(e={url:e}),o$1q.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=v$X(e.templateValues,{}),this._queryParameters=v$X(e.queryParameters,{}),this.headers=v$X(e.headers,{}),this.request=u$Z(e.request,new r$1c),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=u$Z(e.retryAttempts,0),this._retryCount=0;var t=new h$16(e.url);x$1i(t,this,!0,!0),t.fragment=void 0,this._url=t.toString()}function j$1f(e){var t=e.resource,i=e.flipY,n=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){var e=!1;!t.isDataUri&&!t.isBlobUri&&(e=t.isCrossOriginUrl);var o=o$1l.defer();return t$10._Implementations.createImage(r,e,o,i,n),o.promise};var o=r$1b.request(r);if(e$2e(o))return o.otherwise((function(e){return r.state!==W$1c.FAILED?o$1l.reject(e):t.retryOnError(e).then((function(o){return o?(r.state=W$1c.UNISSUED,r.deferred=void 0,j$1f({resource:t,flipY:i,preferImageBitmap:n})):o$1l.reject(e)}))}))}function L$1h(e,t,i){var n={};n[t]=i,e.setQueryParameters(n);var r=e.request;r.url=e.url,r.requestFunction=function(){var t=o$1l.defer();return window[i]=function(e){t.resolve(e);try{delete window[i]}catch{window[i]=void 0}},t$10._Implementations.loadAndExecuteScript(e.url,i,t),t.promise};var o=r$1b.request(r);if(e$2e(o))return o.otherwise((function(n){return r.state!==W$1c.FAILED?o$1l.reject(n):e.retryOnError(n).then((function(o){return o?(r.state=W$1c.UNISSUED,r.deferred=void 0,L$1h(e,t,i)):o$1l.reject(n)}))}))}t$10.createIfNeeded=function(e){return e instanceof t$10?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new t$10({url:e})},t$10.supportsImageBitmapOptions=function(){if(e$2e(_$13))return _$13;if("function"!=typeof createImageBitmap)return _$13=o$1l.resolve(!1);return _$13=t$10.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then((function(e){return createImageBitmap(e,{imageOrientation:"flipY",premultiplyAlpha:"none"})})).then((function(e){return!0})).otherwise((function(){return!1})),_$13},Object.defineProperties(t$10,{isBlobSupported:{get:function(){return k$18}}}),Object.defineProperties(t$10.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){var t=new h$16(e);x$1i(t,this,!1),t.fragment=void 0,this._url=t.toString()}},extension:{get:function(){return a$13(this._url)}},isDataUri:{get:function(){return e$26(this._url)}},isBlobUri:{get:function(){return i$1a(this._url)}},isCrossOriginUrl:{get:function(){return i$19(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}}),t$10.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;var i=new h$16(this._url);e&&re$K(i,this);var n=i.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),r=this._templateValues;return n=n.replace(/{(.*?)}/g,(function(e,t){var i=r[t];return e$2e(i)?encodeURIComponent(i):e})),t&&e$2e(this.proxy)&&(n=this.proxy.getURL(n)),n},t$10.prototype.setQueryParameters=function(e,t){this._queryParameters=t?O$V(this._queryParameters,e,!1):O$V(e,this._queryParameters,!1)},t$10.prototype.appendQueryParameters=function(e){this._queryParameters=O$V(e,this._queryParameters,!0)},t$10.prototype.setTemplateValues=function(e,t){this._templateValues=t?p$19(this._templateValues,e):p$19(e,this._templateValues)},t$10.prototype.getDerivedResource=function(e){var t=this.clone();if(t._retryCount=0,e$2e(e.url)){var i=new h$16(e.url);x$1i(i,t,!0,u$Z(e.preserveQueryParameters,!1)),i.fragment=void 0,t._url=i.resolve(new h$16(o$1j(this._url))).toString()}return e$2e(e.queryParameters)&&(t._queryParameters=p$19(e.queryParameters,t._queryParameters)),e$2e(e.templateValues)&&(t._templateValues=p$19(e.templateValues,t.templateValues)),e$2e(e.headers)&&(t.headers=p$19(e.headers,t.headers)),e$2e(e.proxy)&&(t.proxy=e.proxy),e$2e(e.request)&&(t.request=e.request),e$2e(e.retryCallback)&&(t.retryCallback=e.retryCallback),e$2e(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},t$10.prototype.retryOnError=function(e){var t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return o$1l(!1);var i=this;return o$1l(t(this,e)).then((function(e){return++i._retryCount,e}))},t$10.prototype.clone=function(e){return e$2e(e)||(e=new t$10({url:this._url})),e._url=this._url,e._queryParameters=l$1f(this._queryParameters),e._templateValues=l$1f(this._templateValues),e.headers=l$1f(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},t$10.prototype.getBaseUri=function(e){return i$1b(this.getUrlComponent(e),e)},t$10.prototype.appendForwardSlash=function(){this._url=n$1a(this._url)},t$10.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},t$10.fetchArrayBuffer=function(e){return new t$10(e).fetchArrayBuffer()},t$10.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},t$10.fetchBlob=function(e){return new t$10(e).fetchBlob()},t$10.prototype.fetchImage=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.preferImageBitmap,!1),i=u$Z(e.preferBlob,!1),n=u$Z(e.flipY,!1);if(C$1g(this.request),!k$18||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!i)return j$1f({resource:this,flipY:n,preferImageBitmap:t});var r,o,a,s=this.fetchBlob();return e$2e(s)?t$10.supportsImageBitmapOptions().then((function(e){return r=e&&t,s})).then((function(e){if(e$2e(e)){if(a=e,r)return t$10.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});var t=window.URL.createObjectURL(e);return j$1f({resource:o=new t$10({url:t}),flipY:n,preferImageBitmap:!1})}})).then((function(e){if(e$2e(e))return e.blob=a,r||window.URL.revokeObjectURL(o.url),e})).otherwise((function(e){return e$2e(o)&&window.URL.revokeObjectURL(o.url),e.blob=a,o$1l.reject(e)})):void 0},t$10.fetchImage=function(e){return new t$10(e).fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},t$10.prototype.fetchText=function(){return this.fetch({responseType:"text"})},t$10.fetchText=function(e){return new t$10(e).fetchText()},t$10.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(e$2e(e))return e.then((function(e){if(e$2e(e))return JSON.parse(e)}))},t$10.fetchJson=function(e){return new t$10(e).fetchJson()},t$10.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},t$10.fetchXML=function(e){return new t$10(e).fetchXML()},t$10.prototype.fetchJsonp=function(e){var t;e=u$Z(e,"callback"),C$1g(this.request);do{t="loadJsonp"+Math.random().toString().substring(2,8)}while(e$2e(window[t]));return L$1h(this,e,t)},t$10.fetchJsonp=function(e){return new t$10(e).fetchJsonp(e.callbackParameterName)},t$10.prototype._makeRequest=function(e){var t=this;C$1g(t.request);var i=t.request;i.url=t.url,i.requestFunction=function(n){var r=e.responseType,o=p$19(e.headers,t.headers),a=e.overrideMimeType,s=e.method,l=e.data,u=o$1l.defer(),c=e$2e(n)?n:t.url,h=t$10._Implementations.loadWithXhr(c,r,s,l,o,u,a);return e$2e(h)&&e$2e(h.abort)&&(i.cancelFunction=function(){h.abort()}),u.promise};var n=r$1b.request(i);if(e$2e(n))return n.then((function(e){return e})).otherwise((function(n){return i.state!==W$1c.FAILED?o$1l.reject(n):t.retryOnError(n).then((function(r){return r?(i.state=W$1c.UNISSUED,i.deferred=void 0,t.fetch(e)):o$1l.reject(n)}))}))};var te$F=/^data:(.*?)(;base64)?,(.*)$/;function E$1p(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function Y$X(e,t){for(var i=E$1p(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return n}function ne$I(e,t){t=u$Z(t,"");var i=e[1],n=!!e[2],r=e[3];switch(t){case"":case"text":return E$1p(n,r);case"arraybuffer":return Y$X(n,r);case"blob":var o=Y$X(n,r);return new Blob([o],{type:i});case"document":return(new DOMParser).parseFromString(E$1p(n,r),i);case"json":return JSON.parse(E$1p(n,r));default:throw new t$15("Unhandled responseType: "+t)}}function ae$A(e,t,i){var n=new Image;n.onload=function(){i.resolve(n)},n.onerror=function(e){i.reject(e)},t&&(u$W.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e}function F$1f(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}function ie$G(e,t,i,n,r,o,a){var s=require("url").parse(e),l="https:"===s.protocol?require("https"):require("http"),u=require("zlib"),c={protocol:s.protocol,hostname:s.hostname,port:s.port,path:s.path,query:s.query,method:i,headers:r};l.request(c).on("response",(function(e){if(e.statusCode<200||e.statusCode>=300)o.reject(new s$$(e.statusCode,e,e.headers));else{var i=[];e.on("data",(function(e){i.push(e)})),e.on("end",(function(){var n=Buffer.concat(i);"gzip"===e.headers["content-encoding"]?u.gunzip(n,(function(e,i){e?o.reject(new t$13("Error decompressing response.")):o.resolve(F$1f(i,t))})):o.resolve(F$1f(n,t))}))}})).on("error",(function(e){o.reject(new s$$)})).end()}t$10.prototype.fetch=function(e){return(e=v$X(e,{})).method="GET",this._makeRequest(e)},t$10.fetch=function(e){return new t$10(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$10.prototype.delete=function(e){return(e=v$X(e,{})).method="DELETE",this._makeRequest(e)},t$10.delete=function(e){return new t$10(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},t$10.prototype.head=function(e){return(e=v$X(e,{})).method="HEAD",this._makeRequest(e)},t$10.head=function(e){return new t$10(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$10.prototype.options=function(e){return(e=v$X(e,{})).method="OPTIONS",this._makeRequest(e)},t$10.options=function(e){return new t$10(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$10.prototype.post=function(e,t){return o$1q.defined("data",e),(t=v$X(t,{})).method="POST",t.data=e,this._makeRequest(t)},t$10.post=function(e){return new t$10(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$10.prototype.put=function(e,t){return o$1q.defined("data",e),(t=v$X(t,{})).method="PUT",t.data=e,this._makeRequest(t)},t$10.put=function(e){return new t$10(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$10.prototype.patch=function(e,t){return o$1q.defined("data",e),(t=v$X(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},t$10.patch=function(e){return new t$10(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$10._Implementations={},t$10._Implementations.createImage=function(e,t,i,n,r){var o=e.url;t$10.supportsImageBitmapOptions().then((function(a){if(a&&r){var s=o$1l.defer(),l=t$10._Implementations.loadWithXhr(o,"blob","GET",void 0,void 0,s,void 0,void 0,void 0);return e$2e(l)&&e$2e(l.abort)&&(e.cancelFunction=function(){l.abort()}),s.promise.then((function(e){if(e$2e(e))return t$10.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});i.reject(new t$13("Successfully retrieved "+o+" but it contained no content."))})).then(i.resolve)}ae$A(o,t,i)})).otherwise(i.reject)},t$10.createImageBitmapFromBlob=function(e,t){return o$1q.defined("options",t),o$1q.typeOf.bool("options.flipY",t.flipY),o$1q.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none"})};var ue$E=typeof XMLHttpRequest>"u";function x$1h(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=u$Z(e.addNewLeapSeconds,!0),e$2e(e.data))U$1d(this,e.data);else if(e$2e(e.url)){var t=t$10.createIfNeeded(e.url),i=this;this._downloadPromise=o$1l(t.fetchJson(),(function(e){U$1d(i,e)}),(function(){i._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))}else U$1d(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function F$1e(e,t){return a$15.compare(e.julianDate,t)}function U$1d(e,t){if(e$2e(t.columnNames))if(e$2e(t.samples)){var i=t.columnNames.indexOf("modifiedJulianDateUtc"),n=t.columnNames.indexOf("xPoleWanderRadians"),r=t.columnNames.indexOf("yPoleWanderRadians"),o=t.columnNames.indexOf("ut1MinusUtcSeconds"),a=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),s=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(i<0||n<0||r<0||o<0||a<0||s<0||l<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var u=e._samples=t.samples,c=e._dates=[];e._dateColumn=i,e._xPoleWanderRadiansColumn=n,e._yPoleWanderRadiansColumn=r,e._ut1MinusUtcSecondsColumn=o,e._xCelestialPoleOffsetRadiansColumn=a,e._yCelestialPoleOffsetRadiansColumn=s,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var h,d=e._addNewLeapSeconds,f=0,p=u.length;f<p;f+=e._columnCount){var _=u[f+i],m=u[f+l],g=new a$15(_+h$17.MODIFIED_JULIAN_DATE_DIFFERENCE,m,H$1d.TAI);if(c.push(g),d){if(m!==h&&e$2e(h)){var x=a$15.leapSeconds,y=a$17(x,g,F$1e);if(y<0){var v=new a$16(g,m);x.splice(~y,0,v)}}h=m}}}}else e._dataError="Error in loaded EOP data: The samples property is required.";else e._dataError="Error in loaded EOP data: The columnNames property is required."}function T$1a(e,t,i,n,r){var o=i*n;r.xPoleWander=t[o+e._xPoleWanderRadiansColumn],r.yPoleWander=t[o+e._yPoleWanderRadiansColumn],r.xPoleOffset=t[o+e._xCelestialPoleOffsetRadiansColumn],r.yPoleOffset=t[o+e._yCelestialPoleOffsetRadiansColumn],r.ut1MinusUtc=t[o+e._ut1MinusUtcSecondsColumn]}function O$U(e,t,i){return t+e*(i-t)}function I$1t(e,t,i,n,r,o,a){var s=e._columnCount;if(o>t.length-1)return a.xPoleWander=0,a.yPoleWander=0,a.xPoleOffset=0,a.yPoleOffset=0,a.ut1MinusUtc=0,a;var l=t[r],u=t[o];if(l.equals(u)||n.equals(l))return T$1a(e,i,r,s,a),a;if(n.equals(u))return T$1a(e,i,o,s,a),a;var c=a$15.secondsDifference(n,l)/a$15.secondsDifference(u,l),h=r*s,d=o*s,f=i[h+e._ut1MinusUtcSecondsColumn],p=i[d+e._ut1MinusUtcSecondsColumn],_=p-f;if(_>.5||_<-.5){var m=i[h+e._taiMinusUtcSecondsColumn],g=i[d+e._taiMinusUtcSecondsColumn];m!==g&&(u.equals(n)?f=p:p-=g-m)}return a.xPoleWander=O$U(c,i[h+e._xPoleWanderRadiansColumn],i[d+e._xPoleWanderRadiansColumn]),a.yPoleWander=O$U(c,i[h+e._yPoleWanderRadiansColumn],i[d+e._yPoleWanderRadiansColumn]),a.xPoleOffset=O$U(c,i[h+e._xCelestialPoleOffsetRadiansColumn],i[d+e._xCelestialPoleOffsetRadiansColumn]),a.yPoleOffset=O$U(c,i[h+e._yCelestialPoleOffsetRadiansColumn],i[d+e._yCelestialPoleOffsetRadiansColumn]),a.ut1MinusUtc=O$U(c,f,p),a}function i$16(e,t,i){this.heading=u$Z(e,0),this.pitch=u$Z(t,0),this.roll=u$Z(i,0)}t$10._Implementations.loadWithXhr=function(e,t,i,n,r,o,a){var s=te$F.exec(e);if(null===s){if(!ue$E){var l=new XMLHttpRequest;if(u$W.contains(e)&&(l.withCredentials=!0),e=e.replace(/{/g,"%7B").replace(/}/g,"%7D"),l.open(i,e,!0),e$2e(a)&&e$2e(l.overrideMimeType)&&l.overrideMimeType(a),e$2e(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);e$2e(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")||typeof window<"u"&&"file://"===window.location.origin),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,n=l.responseType;if("HEAD"===i||"OPTIONS"===i){var r=l.getAllResponseHeaders().trim().split(/[\r\n]+/),a={};return r.forEach((function(e){var t=e.split(": "),i=t.shift();a[i]=t.join(": ")})),void o.resolve(a)}if(204===l.status)o.resolve();else if(!e$2e(e)||e$2e(t)&&n!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===n||"document"===n)&&e$2e(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==n&&"text"!==n||!e$2e(l.responseText)?o.reject(new t$13("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new s$$(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new s$$)},l.send(n),l}ie$G(e,t,i,n,r,o)}else o.resolve(ne$I(s,t))},t$10._Implementations.loadAndExecuteScript=function(e,t,i){return a$11(e).otherwise(i.reject)},t$10._DefaultImplementations={},t$10._DefaultImplementations.createImage=t$10._Implementations.createImage,t$10._DefaultImplementations.loadWithXhr=t$10._Implementations.loadWithXhr,t$10._DefaultImplementations.loadAndExecuteScript=t$10._Implementations.loadAndExecuteScript,t$10.DEFAULT=Object.freeze(new t$10({url:typeof document>"u"?"":document.location.href.split("?")[0]})),x$1h.NONE=Object.freeze({getPromiseToLoad:function(){return o$1l()},compute:function(e,t){return e$2e(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new n$1c(0,0,0,0,0),t}}),x$1h.prototype.getPromiseToLoad=function(){return o$1l(this._downloadPromise)},x$1h.prototype.compute=function(e,t){if(e$2e(this._samples)){if(e$2e(t)||(t=new n$1c(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;var i=this._dates,n=this._lastIndex,r=0,o=0;if(e$2e(n)){var a=i[n],s=i[n+1],l=a$15.lessThanOrEquals(a,e),u=!e$2e(s),c=u||a$15.greaterThanOrEquals(s,e);if(l&&c)return r=n,!u&&s.equals(e)&&++r,o=r+1,I$1t(this,i,this._samples,e,r,o,t),t}var h=a$17(i,e,a$15.compare,this._dateColumn);return h>=0?(h<i.length-1&&i[h+1].equals(e)&&++h,r=h,o=h):(r=(o=~h)-1)<0&&(r=0),this._lastIndex=r,I$1t(this,i,this._samples,e,r,o,t),t}if(e$2e(this._dataError))throw new t$13(this._dataError)},i$16.fromQuaternion=function(e,t){if(!e$2e(e))throw new t$15("quaternion is required");e$2e(t)||(t=new i$16);var i=2*(e.w*e.y-e.z*e.x),n=1-2*(e.x*e.x+e.y*e.y),r=2*(e.w*e.x+e.y*e.z),o=1-2*(e.y*e.y+e.z*e.z),a=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(a,o),t.roll=Math.atan2(r,n),t.pitch=-e$2d.asinClamped(i),t},i$16.fromDegrees=function(e,t,i,n){if(!e$2e(e))throw new t$15("heading is required");if(!e$2e(t))throw new t$15("pitch is required");if(!e$2e(i))throw new t$15("roll is required");return e$2e(n)||(n=new i$16),n.heading=e*e$2d.RADIANS_PER_DEGREE,n.pitch=t*e$2d.RADIANS_PER_DEGREE,n.roll=i*e$2d.RADIANS_PER_DEGREE,n},i$16.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new i$16(e.heading,e.pitch,e.roll)},i$16.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},i$16.equalsEpsilon=function(e,t,i,n){return e===t||e$2e(e)&&e$2e(t)&&e$2d.equalsEpsilon(e.heading,t.heading,i,n)&&e$2d.equalsEpsilon(e.pitch,t.pitch,i,n)&&e$2d.equalsEpsilon(e.roll,t.roll,i,n)},i$16.prototype.clone=function(e){return i$16.clone(this,e)},i$16.prototype.equals=function(e){return i$16.equals(this,e)},i$16.prototype.equalsEpsilon=function(e,t,i){return i$16.equalsEpsilon(this,e,t,i)},i$16.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var d$1q=/((?:.*\/)|^)SuperMap3D\.js$/,u$V,i$15,o$1e;function g$1h(){for(var e=document.getElementsByTagName("script"),t=0,i=e.length;t<i;++t){var n=e[t].getAttribute("src"),r=d$1q.exec(n);if(null!==r)return r[1]}}function f$18(e){return typeof document>"u"?e:(e$2e(u$V)||(u$V=document.createElement("a")),u$V.href=e,u$V.href=u$V.href,u$V.href)}function s$_(){if(e$2e(i$15))return i$15;var e;if(e=typeof BASE_URL<"u"?BASE_URL:"object"==typeof define&&e$2e(define.amd)&&!define.amd.toUrlUndefined&&e$2e(require.toUrl)?o$1j("..",n$17("Core/buildModuleUrl.js")):g$1h(),!e$2e(e))throw new t$15("Unable to determine SuperMap3D base URL automatically, try defining a global variable called BASE_URL.");return(i$15=new t$10({url:f$18(e)})).appendForwardSlash(),i$15}function v$W(e){return f$18(require.toUrl("../"+e))}function c$18(e){return s$_().getDerivedResource({url:e}).url}function n$17(e){return e$2e(o$1e)||(o$1e="object"==typeof define&&e$2e(define.amd)&&!define.amd.toUrlUndefined&&e$2e(require.toUrl)?v$W:c$18),o$1e(e)}function a$10(e,t,i){this.x=e,this.y=t,this.s=i}function D$17(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._xysFileUrlTemplate=t$10.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=u$Z(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=u$Z(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new a$15(this._sampleZeroJulianEphemerisDate,0,H$1d.TAI),this._stepSizeDays=u$Z(e.stepSizeDays,1),this._samplesPerXysFile=u$Z(e.samplesPerXysFile,1e3),this._totalSamples=u$Z(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,i=this._denominators=new Array(t+1),n=this._xTable=new Array(t+1),r=Math.pow(this._stepSizeDays,t),o=0;o<=t;++o){i[o]=r,n[o]=o*this._stepSizeDays;for(var a=0;a<=t;++a)a!==o&&(i[o]*=o-a);i[o]=1/i[o]}this._work=new Array(t+1),this._coef=new Array(t+1)}n$17._cesiumScriptRegex=d$1q,n$17._buildModuleUrlFromBaseUrl=c$18,n$17._clearBaseResource=function(){i$15=void 0},n$17.setBaseUrl=function(e){i$15=t$10.DEFAULT.getDerivedResource({url:e})},n$17.getCesiumBaseUrl=s$_;var E$1o=new a$15(0,0,H$1d.TAI);function w$17(e,t,i){var n=E$1o;return n.dayNumber=t,n.secondsOfDay=i,a$15.daysDifference(n,e._sampleZeroDateTT)}function T$19(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];var i=o$1l.defer();e._chunkDownloadsInProgress[t]=i;var n=e._xysFileUrlTemplate;return o$1l((e$2e(n)?n.getDerivedResource({templateValues:{0:t}}):new t$10({url:n$17("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")})).fetchJson(),(function(n){e._chunkDownloadsInProgress[t]=!1;for(var r=e._samples,o=n.samples,a=t*e._samplesPerXysFile*3,s=0,l=o.length;s<l;++s)r[a+s]=o[s];i.resolve()})),i.promise}D$17.prototype.preload=function(e,t,i,n){var r=w$17(this,e,t),o=w$17(this,i,n),a=r/this._stepSizeDays-this._interpolationOrder/2|0;a<0&&(a=0);var s=o/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;s>=this._totalSamples&&(s=this._totalSamples-1);for(var l=a/this._samplesPerXysFile|0,u=s/this._samplesPerXysFile|0,c=[],h=l;h<=u;++h)c.push(T$19(this,h));return o$1l.all(c)},D$17.prototype.computeXysRadians=function(e,t,i){var n=w$17(this,e,t);if(!(n<0)){var r=n/this._stepSizeDays|0;if(!(r>=this._totalSamples)){var o=this._interpolationOrder,a=r-(o/2|0);a<0&&(a=0);var s=a+o;s>=this._totalSamples&&((a=(s=this._totalSamples-1)-o)<0&&(a=0));var l=!1,u=this._samples;if(e$2e(u[3*a])||(T$19(this,a/this._samplesPerXysFile|0),l=!0),e$2e(u[3*s])||(T$19(this,s/this._samplesPerXysFile|0),l=!0),!l){e$2e(i)?(i.x=0,i.y=0,i.s=0):i=new a$10(0,0,0);var c,h,d=n-a*this._stepSizeDays,f=this._work,p=this._denominators,_=this._coef,m=this._xTable;for(c=0;c<=o;++c)f[c]=d-m[c];for(c=0;c<=o;++c){for(_[c]=1,h=0;h<=o;++h)h!==c&&(_[c]*=f[h]);_[c]*=p[c];var g=3*(a+c);i.x+=_[c]*u[g++],i.y+=_[c]*u[g++],i.s+=_[c]*u[g]}return i}}}};var r$1a,n$16={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},l$1e={},r$19,l$1d,E$1n,c$17,W$1a,d$1p,h$15,f$17,w$16,v$V,k$17,A$1i,S$11,R$16,V$15,I$1s,N$_,g$1g,a$$,i$14;function o$1d(e){for(var t=e.split("."),i=0,n=t.length;i<n;++i)t[i]=parseInt(t[i],10);return t}function b$1e(){if(!e$2e(l$1d)&&(l$1d=!1,!p$17())){var e=/ Chrome\/([\.0-9]+)/.exec(r$19.userAgent);null!==e&&(l$1d=!0,E$1n=o$1d(e[1]))}return l$1d}function z$12(){return b$1e()&&E$1n}function P$1a(){if(!e$2e(c$17)&&(c$17=!1,!b$1e()&&!p$17()&&/ Safari\/[\.0-9]+/.test(r$19.userAgent))){var e=/ Version\/([\.0-9]+)/.exec(r$19.userAgent);null!==e&&(c$17=!0,W$1a=o$1d(e[1]))}return c$17}function G$1m(){return P$1a()&&W$1a}function C$1f(){if(!e$2e(d$1p)){d$1p=!1;var e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(r$19.userAgent);null!==e&&(d$1p=!0,(h$15=o$1d(e[1])).isNightly=!!e[2])}return d$1p}function K$10(){return C$1f()&&h$15}function F$1d(){var e;e$2e(f$17)||(f$17=!1,"Microsoft Internet Explorer"===r$19.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(r$19.userAgent))&&(f$17=!0,w$16=o$1d(e[1])):"Netscape"===r$19.appName&&(null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(r$19.userAgent))&&(f$17=!0,w$16=o$1d(e[1]))));return f$17}function L$1g(){return F$1d()&&w$16}function p$17(){if(!e$2e(v$V)){v$V=!1;var e=/ Edge\/([\.0-9]+)/.exec(r$19.userAgent);null!==e&&(v$V=!0,k$17=o$1d(e[1]))}return v$V}function X$13(){return p$17()&&k$17}function x$1g(){if(!e$2e(A$1i)){A$1i=!1;var e=/Firefox\/([\.0-9]+)/.exec(r$19.userAgent);null!==e&&(A$1i=!0,S$11=o$1d(e[1]))}return A$1i}function Y$W(){return e$2e(R$16)||(R$16=/Windows/i.test(r$19.appVersion)),R$16}function q$1e(){return x$1g()&&S$11}function H$1a(){return e$2e(V$15)||(V$15="object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)),V$15}function Z$1a(){return e$2e(I$1s)||(I$1s=!x$1g()&&typeof PointerEvent<"u"&&(!e$2e(r$19.pointerEnabled)||r$19.pointerEnabled)),I$1s}function U$1c(){if(!e$2e(g$1g)){var e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");var t=e.style.imageRendering;(g$1g=e$2e(t)&&""!==t)&&(N$_=t)}return g$1g}function _$12(){return U$1c()?N$_:void 0}function B$15(){if(e$2e(i$14))return i$14.promise;i$14=o$1l.defer(),p$17()&&(a$$=!1,i$14.resolve(a$$));var e=new Image;return e.onload=function(){a$$=e.width>0&&e.height>0,i$14.resolve(a$$)},e.onerror=function(){a$$=!1,i$14.resolve(a$$)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",i$14.promise}function $$14(){return e$2e(i$14)||B$15(),a$$}Object.defineProperties(l$1e,{element:{get:function(){if(l$1e.supportsFullscreen())return document[n$16.fullscreenElement]}},changeEventName:{get:function(){if(l$1e.supportsFullscreen())return n$16.fullscreenchange}},errorEventName:{get:function(){if(l$1e.supportsFullscreen())return n$16.fullscreenerror}},enabled:{get:function(){if(l$1e.supportsFullscreen())return document[n$16.fullscreenEnabled]}},fullscreen:{get:function(){if(l$1e.supportsFullscreen())return null!==l$1e.element}}}),l$1e.supportsFullscreen=function(){if(e$2e(r$1a))return r$1a;r$1a=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return n$16.requestFullscreen="requestFullscreen",n$16.exitFullscreen="exitFullscreen",n$16.fullscreenEnabled="fullscreenEnabled",n$16.fullscreenElement="fullscreenElement",n$16.fullscreenchange="fullscreenchange",n$16.fullscreenerror="fullscreenerror",r$1a=!0;for(var t,i=["webkit","moz","o","ms","khtml"],n=0,r=i.length;n<r;++n){var o=i[n];"function"==typeof e[t=o+"RequestFullscreen"]?(n$16.requestFullscreen=t,r$1a=!0):"function"==typeof e[t=o+"RequestFullScreen"]&&(n$16.requestFullscreen=t,r$1a=!0),t=o+"ExitFullscreen","function"==typeof document[t]?n$16.exitFullscreen=t:(t=o+"CancelFullScreen","function"==typeof document[t]&&(n$16.exitFullscreen=t)),t=o+"FullscreenEnabled",void 0!==document[t]?n$16.fullscreenEnabled=t:(t=o+"FullScreenEnabled",void 0!==document[t]&&(n$16.fullscreenEnabled=t)),t=o+"FullscreenElement",void 0!==document[t]?n$16.fullscreenElement=t:(t=o+"FullScreenElement",void 0!==document[t]&&(n$16.fullscreenElement=t)),t=o+"fullscreenchange",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenChange"),n$16.fullscreenchange=t),t=o+"fullscreenerror",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenError"),n$16.fullscreenerror=t)}return r$1a},l$1e.requestFullscreen=function(e,t){!l$1e.supportsFullscreen()||e[n$16.requestFullscreen]({vrDisplay:t})},l$1e.exitFullscreen=function(){!l$1e.supportsFullscreen()||document[n$16.exitFullscreen]()},l$1e._names=n$16,r$19=typeof navigator<"u"?navigator:{};var m$1a=[];typeof ArrayBuffer<"u"&&(m$1a.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&m$1a.push(Uint8ClampedArray),typeof CanvasPixelArray<"u"&&m$1a.push(CanvasPixelArray));var s$Z={isChrome:b$1e,chromeVersion:z$12,isSafari:P$1a,safariVersion:G$1m,isWebkit:C$1f,webkitVersion:K$10,isInternetExplorer:F$1d,internetExplorerVersion:L$1g,isEdge:p$17,edgeVersion:X$13,isFirefox:x$1g,firefoxVersion:q$1e,isWindows:Y$W,isNodeJs:H$1a,hardwareConcurrency:u$Z(r$19.hardwareConcurrency,3),supportsPointerEvents:Z$1a,supportsImageRenderingPixelated:U$1c,supportsWebP:B$15,supportsWebPSync:$$14,imageRenderingValue:_$12,typedArrayTypes:m$1a,isPCBroswer:ee$B};function ee$B(){var e=window.navigator.userAgent.toLowerCase(),t="ipad"==e.match(/ipad/i),i="iphone os"==e.match(/iphone os/i),n="midp"==e.match(/midp/i),r="ucweb"==e.match(/ucweb/i),o="android"==e.match(/android/i),a="windows ce"==e.match(/windows ce/i),s="windows mobile"==e.match(/windows mobile/i);return!(t||i||n||r||o||a||s)}function n$15(e,t,i,n){this.x=u$Z(e,0),this.y=u$Z(t,0),this.z=u$Z(i,0),this.w=u$Z(n,0)}s$Z.supportsFullscreen=function(){return l$1e.supportsFullscreen()},s$Z.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},s$Z.supportsWebWorkers=function(){return typeof Worker<"u"},s$Z.supportsWebAssembly=function(){return typeof WebAssembly<"u"&&!s$Z.isEdge()},s$Z.supportsOffscreenCanvas=function(){return typeof OffscreenCanvas<"u"&&!s$Z.isEdge()};var E$1m=new o$1p;n$15.fromAxisAngle=function(e,t,i){o$1q.typeOf.object("axis",e),o$1q.typeOf.number("angle",t);var n=t/2,r=Math.sin(n),o=(E$1m=o$1p.normalize(e,E$1m)).x*r,a=E$1m.y*r,s=E$1m.z*r,l=Math.cos(n);return e$2e(i)?(i.x=o,i.y=a,i.z=s,i.w=l,i):new n$15(o,a,s,l)};var G$1l=[1,2,0],J$13=new Array(3);n$15.fromRotationMatrix=function(e,t){o$1q.typeOf.object("matrix",e);var i,n,r,o,a,s=e[p$1e.COLUMN0ROW0],l=e[p$1e.COLUMN1ROW1],u=e[p$1e.COLUMN2ROW2],c=s+l+u;if(c>0)a=.5*(i=Math.sqrt(c+1)),i=.5/i,n=(e[p$1e.COLUMN1ROW2]-e[p$1e.COLUMN2ROW1])*i,r=(e[p$1e.COLUMN2ROW0]-e[p$1e.COLUMN0ROW2])*i,o=(e[p$1e.COLUMN0ROW1]-e[p$1e.COLUMN1ROW0])*i;else{var h=G$1l,d=0;l>s&&(d=1),u>s&&u>l&&(d=2);var f=h[d],p=h[f];i=Math.sqrt(e[p$1e.getElementIndex(d,d)]-e[p$1e.getElementIndex(f,f)]-e[p$1e.getElementIndex(p,p)]+1);var _=J$13;_[d]=.5*i,i=.5/i,a=(e[p$1e.getElementIndex(p,f)]-e[p$1e.getElementIndex(f,p)])*i,_[f]=(e[p$1e.getElementIndex(f,d)]+e[p$1e.getElementIndex(d,f)])*i,_[p]=(e[p$1e.getElementIndex(p,d)]+e[p$1e.getElementIndex(d,p)])*i,n=-_[0],r=-_[1],o=-_[2]}return e$2e(t)?(t.x=n,t.y=r,t.z=o,t.w=a,t):new n$15(n,r,o,a)};var Y$V=new n$15,Z$19=new n$15,I$1r=new n$15,k$16=new n$15;n$15.fromHeadingPitchRoll=function(e,t){return o$1q.typeOf.object("headingPitchRoll",e),k$16=n$15.fromAxisAngle(o$1p.UNIT_X,e.roll,Y$V),I$1r=n$15.fromAxisAngle(o$1p.UNIT_Y,-e.pitch,t),t=n$15.multiply(I$1r,k$16,I$1r),Z$19=n$15.fromAxisAngle(o$1p.UNIT_Z,-e.heading,Y$V),n$15.multiply(Z$19,t,t)};var g$1f=new o$1p,U$1b=new o$1p,i$13=new n$15,H$19=new n$15,C$1e=new n$15;n$15.packedLength=4,n$15.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},n$15.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new n$15),i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3],i},n$15.packedInterpolationLength=3,n$15.convertPackedArrayForInterpolation=function(e,t,i,n){n$15.unpack(e,4*i,C$1e),n$15.conjugate(C$1e,C$1e);for(var r=0,o=i-t+1;r<o;r++){var a=3*r;n$15.unpack(e,4*(t+r),i$13),n$15.multiply(i$13,C$1e,i$13),i$13.w<0&&n$15.negate(i$13,i$13),n$15.computeAxis(i$13,g$1f);var s=n$15.computeAngle(i$13);n[a]=g$1f.x*s,n[a+1]=g$1f.y*s,n[a+2]=g$1f.z*s}},n$15.unpackInterpolationResult=function(e,t,i,n,r){e$2e(r)||(r=new n$15),o$1p.fromArray(e,0,U$1b);var o=o$1p.magnitude(U$1b);return n$15.unpack(t,4*n,H$19),0===o?n$15.clone(n$15.IDENTITY,i$13):n$15.fromAxisAngle(U$1b,o,i$13),n$15.multiply(i$13,H$19,r)},n$15.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new n$15(e.x,e.y,e.z,e.w)},n$15.conjugate=function(e,t){return o$1q.typeOf.object("quaternion",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},n$15.magnitudeSquared=function(e){return o$1q.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},n$15.magnitude=function(e){return Math.sqrt(n$15.magnitudeSquared(e))},n$15.normalize=function(e,t){o$1q.typeOf.object("result",t);var i=1/n$15.magnitude(e),n=e.x*i,r=e.y*i,o=e.z*i,a=e.w*i;return t.x=n,t.y=r,t.z=o,t.w=a,t},n$15.inverse=function(e,t){o$1q.typeOf.object("result",t);var i=n$15.magnitudeSquared(e);return t=n$15.conjugate(e,t),n$15.multiplyByScalar(t,1/i,t)},n$15.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},n$15.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},n$15.negate=function(e,t){return o$1q.typeOf.object("quaternion",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},n$15.dot=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},n$15.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e.x,r=e.y,o=e.z,a=e.w,s=t.x,l=t.y,u=t.z,c=t.w,h=a*s+n*c+r*u-o*l,d=a*l-n*u+r*c+o*s,f=a*u+n*l-r*s+o*c,p=a*c-n*s-r*l-o*u;return i.x=h,i.y=d,i.z=f,i.w=p,i},n$15.multiplyByVec=function(e,t,i){var n=new o$1p,r=new o$1p,o=new o$1p(e.x,e.y,e.z);n=o$1p.cross(o,t,n),r=o$1p.cross(o,n,r);var a=new o$1p;a=o$1p.multiplyByScalar(n,2*e.w,a);var s=new o$1p;return s=o$1p.multiplyByScalar(n,2,s),i=o$1p.add(t,a,i),i=o$1p.add(i,s,i)},n$15.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("quaternion",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},n$15.divideByScalar=function(e,t,i){return o$1q.typeOf.object("quaternion",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},n$15.computeAxis=function(e,t){o$1q.typeOf.object("quaternion",e),o$1q.typeOf.object("result",t);var i=e.w;if(Math.abs(i-1)<e$2d.EPSILON6)return t.x=t.y=t.z=0,t;var n=1/Math.sqrt(1-i*i);return t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t},n$15.computeAngle=function(e){return o$1q.typeOf.object("quaternion",e),Math.abs(e.w-1)<e$2d.EPSILON6?0:2*Math.acos(e.w)};var W$19=new n$15;n$15.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),W$19=n$15.multiplyByScalar(t,i,W$19),n=n$15.multiplyByScalar(e,1-i,n),n$15.add(W$19,n,n)};var X$12=new n$15,D$16=new n$15,F$1c=new n$15;n$15.slerp=function(e,t,i,n){o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n);var r=n$15.dot(e,t),o=t;if(r<0&&(r=-r,o=X$12=n$15.negate(t,X$12)),1-r<e$2d.EPSILON6)return n$15.lerp(e,o,i,n);var a=Math.acos(r);return D$16=n$15.multiplyByScalar(e,Math.sin((1-i)*a),D$16),F$1c=n$15.multiplyByScalar(o,Math.sin(i*a),F$1c),n=n$15.add(D$16,F$1c,n),n$15.multiplyByScalar(n,1/Math.sin(a),n)},n$15.log=function(e,t){o$1q.typeOf.object("quaternion",e),o$1q.typeOf.object("result",t);var i=e$2d.acosClamped(e.w),n=0;return 0!==i&&(n=i/Math.sin(i)),o$1p.multiplyByScalar(e,n,t)},n$15.exp=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1p.magnitude(e),n=0;return 0!==i&&(n=Math.sin(i)/i),t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t.w=Math.cos(i),t};var K$$=new o$1p,$$13=new o$1p,N$Z=new n$15,l$1c=new n$15;n$15.computeInnerQuadrangle=function(e,t,i,n){o$1q.typeOf.object("q0",e),o$1q.typeOf.object("q1",t),o$1q.typeOf.object("q2",i),o$1q.typeOf.object("result",n);var r=n$15.conjugate(t,N$Z);n$15.multiply(r,i,l$1c);var o=n$15.log(l$1c,K$$);n$15.multiply(r,e,l$1c);var a=n$15.log(l$1c,$$13);return o$1p.add(o,a,o),o$1p.multiplyByScalar(o,.25,o),o$1p.negate(o,o),n$15.exp(o,N$Z),n$15.multiply(t,N$Z,n)},n$15.squad=function(e,t,i,n,r,o){o$1q.typeOf.object("q0",e),o$1q.typeOf.object("q1",t),o$1q.typeOf.object("s0",i),o$1q.typeOf.object("s1",n),o$1q.typeOf.number("t",r),o$1q.typeOf.object("result",o);var a=n$15.slerp(e,t,r,N$Z),s=n$15.slerp(i,n,r,l$1c);return n$15.slerp(a,s,2*r*(1-r),o)};for(var s$Y=new n$15,_$11=1.9011074535173003,B$14=s$Z.supportsTypedArrays()?new Float32Array(8):[],L$1f=s$Z.supportsTypedArrays()?new Float32Array(8):[],x$1f=s$Z.supportsTypedArrays()?new Float32Array(8):[],S$10=s$Z.supportsTypedArrays()?new Float32Array(8):[],Q$19=0;Q$19<7;++Q$19){var P$19=Q$19+1,V$14=2*P$19+1;B$14[Q$19]=1/(P$19*V$14),L$1f[Q$19]=P$19/V$14}B$14[7]=_$11/136,L$1f[7]=8*_$11/17,n$15.fastSlerp=function(e,t,i,n){o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n);var r,o=n$15.dot(e,t);o>=0?r=1:(r=-1,o=-o);for(var a=o-1,s=1-i,l=i*i,u=s*s,c=7;c>=0;--c)x$1f[c]=(B$14[c]*l-L$1f[c])*a,S$10[c]=(B$14[c]*u-L$1f[c])*a;var h=r*i*(1+x$1f[0]*(1+x$1f[1]*(1+x$1f[2]*(1+x$1f[3]*(1+x$1f[4]*(1+x$1f[5]*(1+x$1f[6]*(1+x$1f[7])))))))),d=s*(1+S$10[0]*(1+S$10[1]*(1+S$10[2]*(1+S$10[3]*(1+S$10[4]*(1+S$10[5]*(1+S$10[6]*(1+S$10[7])))))))),f=n$15.multiplyByScalar(e,d,s$Y);return n$15.multiplyByScalar(t,h,n),n$15.add(f,n,n)},n$15.fastSquad=function(e,t,i,n,r,o){o$1q.typeOf.object("q0",e),o$1q.typeOf.object("q1",t),o$1q.typeOf.object("s0",i),o$1q.typeOf.object("s1",n),o$1q.typeOf.number("t",r),o$1q.typeOf.object("result",o);var a=n$15.fastSlerp(e,t,r,N$Z),s=n$15.fastSlerp(i,n,r,l$1c);return n$15.fastSlerp(a,s,2*r*(1-r),o)},n$15.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},n$15.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e.x-t.x)<=i&&Math.abs(e.y-t.y)<=i&&Math.abs(e.z-t.z)<=i&&Math.abs(e.w-t.w)<=i},n$15.ZERO=Object.freeze(new n$15(0,0,0,0)),n$15.IDENTITY=Object.freeze(new n$15(0,0,0,1)),n$15.prototype.clone=function(e){return n$15.clone(this,e)},n$15.prototype.equals=function(e){return n$15.equals(this,e)},n$15.prototype.equalsEpsilon=function(e,t){return n$15.equalsEpsilon(this,e,t)},n$15.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var m$19={},B$13={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},O$T={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Y$U={},y$$={east:new o$1p,north:new o$1p,up:new o$1p,west:new o$1p,south:new o$1p,down:new o$1p},x$1e=new o$1p,P$18=new o$1p,E$1l=new o$1p;m$19.localFrameToFixedFrameGenerator=function(e,t){if(!B$13.hasOwnProperty(e)||!B$13[e].hasOwnProperty(t))throw new t$15("firstAxis and secondAxis must be east, north, up, west, south or down.");var i,n=B$13[e][t],r=e+t;return e$2e(Y$U[r])?i=Y$U[r]:(i=function(i,r,o){if(!e$2e(i))throw new t$15("origin is required.");if(e$2e(o)||(o=new p$1d),o$1p.equalsEpsilon(i,o$1p.ZERO,e$2d.EPSILON14))o$1p.unpack(O$T[e],0,x$1e),o$1p.unpack(O$T[t],0,P$18),o$1p.unpack(O$T[n],0,E$1l);else if(e$2d.equalsEpsilon(i.x,0,e$2d.EPSILON14)&&e$2d.equalsEpsilon(i.y,0,e$2d.EPSILON14)){var a=e$2d.sign(i.z);o$1p.unpack(O$T[e],0,x$1e),"east"!==e&&"west"!==e&&o$1p.multiplyByScalar(x$1e,a,x$1e),o$1p.unpack(O$T[t],0,P$18),"east"!==t&&"west"!==t&&o$1p.multiplyByScalar(P$18,a,P$18),o$1p.unpack(O$T[n],0,E$1l),"east"!==n&&"west"!==n&&o$1p.multiplyByScalar(E$1l,a,E$1l)}else{(r=u$Z(r,t$12.WGS84)).geodeticSurfaceNormal(i,y$$.up);var s=y$$.up,l=y$$.east;l.x=-i.y,l.y=i.x,l.z=0,o$1p.normalize(l,y$$.east),o$1p.cross(s,l,y$$.north),o$1p.multiplyByScalar(y$$.up,-1,y$$.down),o$1p.multiplyByScalar(y$$.east,-1,y$$.west),o$1p.multiplyByScalar(y$$.north,-1,y$$.south),x$1e=y$$[e],P$18=y$$[t],E$1l=y$$[n]}return o[0]=x$1e.x,o[1]=x$1e.y,o[2]=x$1e.z,o[3]=0,o[4]=P$18.x,o[5]=P$18.y,o[6]=P$18.z,o[7]=0,o[8]=E$1l.x,o[9]=E$1l.y,o[10]=E$1l.z,o[11]=0,o[12]=i.x,o[13]=i.y,o[14]=i.z,o[15]=1,o},Y$U[r]=i),i},m$19.eastNorthUpToFixedFrame=m$19.localFrameToFixedFrameGenerator("east","north"),m$19.northEastDownToFixedFrame=m$19.localFrameToFixedFrameGenerator("north","east"),m$19.northUpEastToFixedFrame=m$19.localFrameToFixedFrameGenerator("north","up"),m$19.northWestUpToFixedFrame=m$19.localFrameToFixedFrameGenerator("north","west");var fa$5=new n$15,da$3=new o$1p(1,1,1),ua$5=new p$1d;m$19.headingPitchRollToFixedFrame=function(e,t,i,n,r){o$1q.typeOf.object("HeadingPitchRoll",t),n=u$Z(n,m$19.eastNorthUpToFixedFrame);var o=n$15.fromHeadingPitchRoll(t,fa$5),a=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,o,da$3,ua$5);return r=n(e,i,r),p$1d.multiply(r,a,r)};var ya$3=new p$1d,la$5=new p$1e;m$19.headingPitchRollQuaternion=function(e,t,i,n,r){o$1q.typeOf.object("HeadingPitchRoll",t);var o=m$19.headingPitchRollToFixedFrame(e,t,i,n,ya$3),a=p$1d.getMatrix3(o,la$5);return n$15.fromRotationMatrix(a,r)};var Ta$6=new o$1p(1,1,1),xa$4=new o$1p,aa$7=new p$1d,Pa$4=new p$1d,Ea$5=new p$1e,Sa$4=new n$15;m$19.fixedFrameToHeadingPitchRoll=function(e,t,i,n){o$1q.defined("transform",e),t=u$Z(t,t$12.WGS84),i=u$Z(i,m$19.eastNorthUpToFixedFrame),e$2e(n)||(n=new i$16);var r=p$1d.getTranslation(e,xa$4);if(o$1p.equals(r,o$1p.ZERO))return n.heading=0,n.pitch=0,n.roll=0,n;var o=p$1d.inverseTransformation(i(r,t,aa$7),aa$7),a=p$1d.setScale(e,Ta$6,Pa$4);a=p$1d.setTranslation(a,o$1p.ZERO,a),o=p$1d.multiply(o,a,o);var s=n$15.fromRotationMatrix(p$1d.getMatrix3(o,Ea$5),Sa$4);return s=n$15.normalize(s,s),i$16.fromQuaternion(s,n)};var Fa$6=24110.54841,Ca$4=8640184.812866,Ma$5=.093104,Oa$5=-62e-7,Na$5=11772758384668e-32,Ra$7=72921158553e-15,Da$7=e$2d.TWO_PI/86400,q$1d=new a$15;m$19.computeTemeToPseudoFixedMatrix=function(e,t){if(!e$2e(e))throw new t$15("date is required.");var i,n=(q$1d=a$15.addSeconds(e,-a$15.computeTaiMinusUtc(e),q$1d)).dayNumber,r=q$1d.secondsOfDay,o=n-2451545;i=r>=43200?(o+.5)/h$17.DAYS_PER_JULIAN_CENTURY:(o-.5)/h$17.DAYS_PER_JULIAN_CENTURY;var a=(Fa$6+i*(Ca$4+i*(Ma$5+i*Oa$5)))*Da$7%e$2d.TWO_PI+(Ra$7+Na$5*(n-2451545.5))*((r+.5*h$17.SECONDS_PER_DAY)%h$17.SECONDS_PER_DAY),s=Math.cos(a),l=Math.sin(a);return e$2e(t)?(t[0]=s,t[1]=-l,t[2]=0,t[3]=l,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new p$1e(s,l,0,-l,s,0,0,0,1)},m$19.iau2006XysData=new D$17,m$19.earthOrientationParameters=x$1h.NONE;var H$18=32.184,ga$5=2451545;m$19.preloadIcrfFixed=function(e){var t=e.start.dayNumber,i=e.start.secondsOfDay+H$18,n=e.stop.dayNumber,r=e.stop.secondsOfDay+H$18,o=m$19.iau2006XysData.preload(t,i,n,r),a=m$19.earthOrientationParameters.getPromiseToLoad();return o$1l.all([o,a])},m$19.computeIcrfToFixedMatrix=function(e,t){if(!e$2e(e))throw new t$15("date is required.");e$2e(t)||(t=new p$1e);var i=m$19.computeFixedToIcrfMatrix(e,t);if(e$2e(i))return p$1e.transpose(i,t)};var Ua$7=new a$10(0,0,0),_a$5=new n$1c(0,0,0,0,0,0),Q$18=new p$1e,Z$18=new p$1e;m$19.computeFixedToIcrfMatrix=function(e,t){if(!e$2e(e))throw new t$15("date is required.");e$2e(t)||(t=new p$1e);var i=m$19.earthOrientationParameters.compute(e,_a$5);if(e$2e(i)){var n=e.dayNumber,r=e.secondsOfDay+H$18,o=m$19.iau2006XysData.computeXysRadians(n,r,Ua$7);if(e$2e(o)){var a=o.x+i.xPoleOffset,s=o.y+i.yPoleOffset,l=1/(1+Math.sqrt(1-a*a-s*s)),u=Q$18;u[0]=1-l*a*a,u[3]=-l*a*s,u[6]=a,u[1]=-l*a*s,u[4]=1-l*s*s,u[7]=s,u[2]=-a,u[5]=-s,u[8]=1-l*(a*a+s*s);var c=p$1e.fromRotationZ(-o.s,Z$18),h=p$1e.multiply(u,c,Q$18),d=e.dayNumber-2451545,f=(e.secondsOfDay-a$15.computeTaiMinusUtc(e)+i.ut1MinusUtc)/h$17.SECONDS_PER_DAY,p=.779057273264+f+.00273781191135448*(d+f);p=p%1*e$2d.TWO_PI;var _=p$1e.fromRotationZ(p,Z$18),m=p$1e.multiply(h,_,Q$18),g=Math.cos(i.xPoleWander),x=Math.cos(i.yPoleWander),y=Math.sin(i.xPoleWander),v=Math.sin(i.yPoleWander),$=n-ga$5+r/h$17.SECONDS_PER_DAY,b=-47e-6*($/=36525)*e$2d.RADIANS_PER_DEGREE/3600,T=Math.cos(b),C=Math.sin(b),S=Z$18;return S[0]=g*T,S[1]=g*C,S[2]=y,S[3]=-x*C+v*y*T,S[4]=x*T+v*y*C,S[5]=-v*g,S[6]=-v*C-x*y*T,S[7]=v*T-x*y*C,S[8]=x*g,p$1e.multiply(m,S,t)}}};var Ia$6=new e$2c;m$19.pointToWindowCoordinates=function(e,t,i,n){return(n=m$19.pointToGLWindowCoordinates(e,t,i,n)).y=2*t[5]-n.y,n},m$19.pointToGLWindowCoordinates=function(e,t,i,n){if(!e$2e(e))throw new t$15("modelViewProjectionMatrix is required.");if(!e$2e(t))throw new t$15("viewportTransformation is required.");if(!e$2e(i))throw new t$15("point is required.");e$2e(n)||(n=new o$1o);var r=Ia$6;return p$1d.multiplyByVector(e,e$2c.fromElements(i.x,i.y,i.z,1,r),r),e$2c.multiplyByScalar(r,1/r.w,r),p$1d.multiplyByVector(t,r,r),o$1o.fromCartesian4(r,n)};var za$5=new o$1p,qa$6=new o$1p,Wa$4=new o$1p;m$19.rotationMatrixFromPositionVelocity=function(e,t,i,n){if(!e$2e(e))throw new t$15("position is required.");if(!e$2e(t))throw new t$15("velocity is required.");var r=u$Z(i,t$12.WGS84).geodeticSurfaceNormal(e,za$5),o=o$1p.cross(t,r,qa$6);o$1p.equalsEpsilon(o,o$1p.ZERO,e$2d.EPSILON6)&&(o=o$1p.clone(o$1p.UNIT_X,o));var a=o$1p.cross(o,t,Wa$4);return o$1p.normalize(a,a),o$1p.cross(t,a,o),o$1p.negate(o,o),o$1p.normalize(o,o),e$2e(n)||(n=new p$1e),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=o.x,n[4]=o.y,n[5]=o.z,n[6]=a.x,n[7]=a.y,n[8]=a.z,n};var ra$8=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),oa$6=new a$18,ta$6=new o$1p,ba$3=new o$1p,Ga$6=new p$1e,k$15=new p$1d,ea$8=new p$1d;m$19.basisTo2D=function(e,t,i){if(!e$2e(e))throw new t$15("projection is required.");if(!e$2e(t))throw new t$15("matrix is required.");if(!e$2e(i))throw new t$15("result is required.");var n=p$1d.getTranslation(t,ba$3),r=e.ellipsoid,o=r.cartesianToCartographic(n,oa$6),a=e.project(o,ta$6);o$1p.fromElements(a.z,a.x,a.y,a);var s=m$19.eastNorthUpToFixedFrame(n,r,k$15),l=p$1d.inverseTransformation(s,ea$8),u=p$1d.getMatrix3(t,Ga$6),c=p$1d.multiplyByMatrix3(l,u,i);return p$1d.multiply(ra$8,c,i),p$1d.setTranslation(i,a,i),i},m$19.wgs84To2DModelMatrix=function(e,t,i){if(!e$2e(e))throw new t$15("projection is required.");if(!e$2e(t))throw new t$15("center is required.");if(!e$2e(i))throw new t$15("result is required.");var n=e.ellipsoid,r=m$19.eastNorthUpToFixedFrame(t,n,k$15),o=p$1d.inverseTransformation(r,ea$8),a=n.cartesianToCartographic(t,oa$6),s=e.project(a,ta$6);o$1p.fromElements(s.z,s.x,s.y,s);var l=p$1d.fromTranslation(s,k$15);return p$1d.multiply(ra$8,o,i),p$1d.multiply(l,i,i),i},m$19.buildUp=function(e,t){var i=t.clone(),n=e.clone();n=o$1p.normalize(n,n),Math.abs(o$1p.dot(n,i))>=1&&(n=Math.abs(o$1p.dot(i,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,n):o$1p.clone(o$1p.UNIT_Z,n));var r=new o$1p;return o$1p.cross(n,i,r),r=o$1p.normalize(r,r),o$1p.cross(i,r,n),n=o$1p.normalize(n,n)},m$19.getHeading=function(e,t){var i;return i=e$2d.equalsEpsilon(Math.abs(e.z),1,e$2d.EPSILON3)?Math.atan2(t.y,t.x)-e$2d.PI_OVER_TWO:Math.atan2(e.y,e.x)-e$2d.PI_OVER_TWO,e$2d.TWO_PI-e$2d.zeroToTwoPi(i)},m$19.convertToColumbusCartesian=function(e){var t=new n$1d,i=t.ellipsoid,n=new o$1p,r=new a$18;return i.cartesianToCartographic(e,r),t.project(r,n),o$1p.fromElements(n.z,n.x,n.y)},m$19.convertTo3DCartesian=function(e){var t=new n$1d,i=t.ellipsoid,n=new o$1p,r=new a$18;return n=o$1p.fromElements(e.y,e.z,e.x),t.unproject(n,r),i.cartographicToCartesian(r,n)};var l$1b=new e$2c;function f$16(e,t){if(o$1q.defined("origin",e),!e$2e(e=(t=u$Z(t,t$12.WGS84)).scaleToGeodeticSurface(e)))throw new t$15("origin must not be at the center of the ellipsoid.");var i=m$19.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=o$1p.fromCartesian4(p$1d.getColumn(i,0,l$1b)),this._yAxis=o$1p.fromCartesian4(p$1d.getColumn(i,1,l$1b));var n=o$1p.fromCartesian4(p$1d.getColumn(i,2,l$1b));this._plane=o$1m.fromPointNormal(e,n)}Object.defineProperties(f$16.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var w$15=new e$29;f$16.fromPoints=function(e,t){return o$1q.defined("cartesians",e),new f$16(e$29.fromPoints(e,w$15).center,t)};var x$1d=new f$19,m$18=new o$1p;f$16.prototype.projectPointOntoPlane=function(e,t){o$1q.defined("cartesian",e);var i=x$1d;i.origin=e,o$1p.normalize(e,i.direction);var n=g$1j.rayPlane(i,this._plane,m$18);if(e$2e(n)||(o$1p.negate(i.direction,i.direction),n=g$1j.rayPlane(i,this._plane,m$18)),e$2e(n)){var r=o$1p.subtract(n,this._origin,n),o=o$1p.dot(this._xAxis,r),a=o$1p.dot(this._yAxis,r);return e$2e(t)?(t.x=o,t.y=a,t):new o$1o(o,a)}},f$16.prototype.projectPointsOntoPlane=function(e,t){o$1q.defined("cartesians",e),e$2e(t)||(t=[]);for(var i=0,n=e.length,r=0;r<n;r++){var o=this.projectPointOntoPlane(e[r],t[i]);e$2e(o)&&(t[i]=o,i++)}return t.length=i,t},f$16.prototype.projectPointToNearestOnPlane=function(e,t){o$1q.defined("cartesian",e),e$2e(t)||(t=new o$1o);var i=x$1d;i.origin=e,o$1p.clone(this._plane.normal,i.direction);var n=g$1j.rayPlane(i,this._plane,m$18);e$2e(n)||(o$1p.negate(i.direction,i.direction),n=g$1j.rayPlane(i,this._plane,m$18));var r=o$1p.subtract(n,this._origin,n),o=o$1p.dot(this._xAxis,r),a=o$1p.dot(this._yAxis,r);return t.x=o,t.y=a,t},f$16.prototype.projectPointsToNearestOnPlane=function(e,t){o$1q.defined("cartesians",e),e$2e(t)||(t=[]);var i=e.length;t.length=i;for(var n=0;n<i;n++)t[n]=this.projectPointToNearestOnPlane(e[n],t[n]);return t};var C$1d=new o$1p;f$16.prototype.projectPointOntoEllipsoid=function(e,t){o$1q.defined("cartesian",e),e$2e(t)||(t=new o$1p);var i=this._ellipsoid,n=this._origin,r=this._xAxis,o=this._yAxis,a=C$1d;return o$1p.multiplyByScalar(r,e.x,a),t=o$1p.add(n,a,t),o$1p.multiplyByScalar(o,e.y,a),o$1p.add(t,a,t),i.scaleToGeocentricSurface(t,t),t},f$16.prototype.projectPointsOntoEllipsoid=function(e,t){o$1q.defined("cartesians",e);var i=e.length;e$2e(t)?t.length=i:t=new Array(i);for(var n=0;n<i;++n)t[n]=this.projectPointOntoEllipsoid(e[n],t[n]);return t};var e$21={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},Me$s=Object.freeze(e$21);function f$15(e,t,i,n){this[0]=u$Z(e,0),this[1]=u$Z(i,0),this[2]=u$Z(t,0),this[3]=u$Z(n,0)}f$15.packedLength=4,f$15.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t},f$15.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new f$15),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i},f$15.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new f$15(e[0],e[2],e[1],e[3])},f$15.fromArray=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new f$15),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i},f$15.fromColumnMajorArray=function(e,t){return o$1q.defined("values",e),f$15.clone(e,t)},f$15.fromRowMajorArray=function(e,t){return o$1q.defined("values",e),e$2e(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new f$15(e[0],e[1],e[2],e[3])},f$15.fromScale=function(e,t){return o$1q.typeOf.object("scale",e),e$2e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new f$15(e.x,0,0,e.y)},f$15.fromUniformScale=function(e,t){return o$1q.typeOf.number("scale",e),e$2e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new f$15(e,0,0,e)},f$15.fromRotation=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2e(t)?(t[0]=i,t[1]=n,t[2]=-n,t[3]=i,t):new f$15(i,-n,n,i)},f$15.toArray=function(e,t){return o$1q.typeOf.object("matrix",e),e$2e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},f$15.getElementIndex=function(e,t){return o$1q.typeOf.number.greaterThanOrEquals("row",t,0),o$1q.typeOf.number.lessThanOrEquals("row",t,1),o$1q.typeOf.number.greaterThanOrEquals("column",e,0),o$1q.typeOf.number.lessThanOrEquals("column",e,1),2*e+t},f$15.getColumn=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,1),o$1q.typeOf.object("result",i);var n=2*t,r=e[n],o=e[n+1];return i.x=r,i.y=o,i},f$15.setColumn=function(e,t,i,n){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,1),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n);var r=2*t;return(n=f$15.clone(e,n))[r]=i.x,n[r+1]=i.y,n},f$15.getRow=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,1),o$1q.typeOf.object("result",i);var n=e[t],r=e[t+2];return i.x=n,i.y=r,i},f$15.setRow=function(e,t,i,n){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,1),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n),(n=f$15.clone(e,n))[t]=i.x,n[t+2]=i.y,n};var u$U=new o$1o;f$15.getScale=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=o$1o.magnitude(o$1o.fromElements(e[0],e[1],u$U)),t.y=o$1o.magnitude(o$1o.fromElements(e[2],e[3],u$U)),t};var w$14=new o$1o;f$15.getMaximumScale=function(e){return f$15.getScale(e,w$14),o$1o.maximumComponent(w$14)},f$15.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0]*t[0]+e[2]*t[1],r=e[0]*t[2]+e[2]*t[3],o=e[1]*t[0]+e[3]*t[1],a=e[1]*t[2]+e[3]*t[3];return i[0]=n,i[1]=o,i[2]=r,i[3]=a,i},f$15.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i},f$15.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i},f$15.multiplyByVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=e[0]*t.x+e[2]*t.y,r=e[1]*t.x+e[3]*t.y;return i.x=n,i.y=r,i},f$15.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i},f$15.multiplyByScale=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.y,i[3]=e[3]*t.y,i},f$15.negate=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},f$15.transpose=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[2],r=e[1],o=e[3];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t},f$15.abs=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},f$15.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},f$15.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]},f$15.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i},f$15.IDENTITY=Object.freeze(new f$15(1,0,0,1)),f$15.ZERO=Object.freeze(new f$15(0,0,0,0)),f$15.COLUMN0ROW0=0,f$15.COLUMN0ROW1=1,f$15.COLUMN1ROW0=2,f$15.COLUMN1ROW1=3,Object.defineProperties(f$15.prototype,{length:{get:function(){return f$15.packedLength}}}),f$15.prototype.clone=function(e){return f$15.clone(this,e)},f$15.prototype.equals=function(e){return f$15.equals(this,e)},f$15.prototype.equalsEpsilon=function(e,t){return f$15.equalsEpsilon(this,e,t)},f$15.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"};var I$1q={POINTS:de$y.POINTS,LINES:de$y.LINES,LINE_LOOP:de$y.LINE_LOOP,LINE_STRIP:de$y.LINE_STRIP,TRIANGLES:de$y.TRIANGLES,TRIANGLE_STRIP:de$y.TRIANGLE_STRIP,TRIANGLE_FAN:de$y.TRIANGLE_FAN,validate:function(e){return e===I$1q.POINTS||e===I$1q.LINES||e===I$1q.LINE_LOOP||e===I$1q.LINE_STRIP||e===I$1q.TRIANGLES||e===I$1q.TRIANGLE_STRIP||e===I$1q.TRIANGLE_FAN}},W$18=Object.freeze(I$1q);function I$1p(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.typeOf.object("options.attributes",e.attributes),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=u$Z(e.primitiveType,W$18.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=u$Z(e.geometryType,Me$s.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}I$1p.computeNumberOfVertices=function(e){o$1q.typeOf.object("geometry",e);var t=-1;for(var i in e.attributes)if(e.attributes.hasOwnProperty(i)&&e$2e(e.attributes[i])&&e$2e(e.attributes[i].values)){var n=e.attributes[i];if(n.isInstanceAttribute)continue;var r=n.values.length/n.componentsPerAttribute;if(t!==r&&-1!==t)throw new t$15("All attribute lists must have the same number of attributes.");t=r}return t};var R$15=new a$18,W$17=new o$1p,P$17=new p$1d,Z$17=[new a$18,new a$18,new a$18],q$1c=[new o$1o,new o$1o,new o$1o],z$11=[new o$1o,new o$1o,new o$1o],D$15=new o$1p,K$_=new n$15,$$12=new p$1d,rr$d=new f$15;function o$1c(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).componentDatatype))throw new t$15("options.componentDatatype is required.");if(!e$2e(e.componentsPerAttribute))throw new t$15("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new t$15("options.componentsPerAttribute must be between 1 and 4.");if(!e$2e(e.values))throw new t$15("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=u$Z(e.normalize,!1),this.values=e.values}function d$1o(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).geometry))throw new t$15("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=u$Z(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}I$1p._textureCoordinateRotationPoints=function(e,t,i,n){var r,o=h$18.center(n,R$15),a=a$18.toCartesian(o,i,W$17),s=m$19.eastNorthUpToFixedFrame(a,i,P$17),l=p$1d.inverse(s,P$17),u=q$1c,c=Z$17;c[0].longitude=n.west,c[0].latitude=n.south,c[1].longitude=n.west,c[1].latitude=n.north,c[2].longitude=n.east,c[2].latitude=n.south;var h=D$15;for(r=0;r<3;r++)a$18.toCartesian(c[r],i,h),h=p$1d.multiplyByPointAsVector(l,h,h),u[r].x=h.x,u[r].y=h.y;var d=n$15.fromAxisAngle(o$1p.UNIT_Z,-t,K$_),f=p$1e.fromQuaternion(d,$$12),p=e.length,_=Number.POSITIVE_INFINITY,m=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(r=0;r<p;r++)h=p$1d.multiplyByPointAsVector(l,e[r],h),h=p$1e.multiplyByVector(f,h,h),_=Math.min(_,h.x),m=Math.min(m,h.y),g=Math.max(g,h.x),x=Math.max(x,h.y);var y=f$15.fromRotation(t,rr$d),v=z$11;v[0].x=_,v[0].y=m,v[1].x=_,v[1].y=x,v[2].x=g,v[2].y=m;var $=u[0],b=u[2].x-$.x,T=u[1].y-$.y;for(r=0;r<3;r++){var C=v[r];f$15.multiplyByVector(y,C,C),C.x=(C.x-$.x)/b,C.y=(C.y-$.y)/T}var S=v[0],w=v[1],E=v[2],P=new Array(6);return o$1o.pack(S,P),o$1o.pack(w,P,2),o$1o.pack(E,P,4),P};var e$20={NONE:0,TOP:1,ALL:2},_0x39c22a=Object.freeze(e$20),F$1b=1/256,M$1a=256,t$$={octEncodeInRange:function(e,t,i){o$1q.defined("vector",e),o$1q.defined("result",i);var n=o$1p.magnitudeSquared(e);if(Math.abs(n-1)>e$2d.EPSILON6)throw new t$15("vector must be normalized.");if(i.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),i.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){var r=i.x,o=i.y;i.x=(1-Math.abs(o))*e$2d.signNotZero(r),i.y=(1-Math.abs(r))*e$2d.signNotZero(o)}return i.x=e$2d.toSNorm(i.x,t),i.y=e$2d.toSNorm(i.y,t),i},octEncode:function(e,t){return t$$.octEncodeInRange(e,255,t)}},y$_=new o$1o,w$13=new Uint8Array(1);function h$14(e){return w$13[0]=e,w$13[0]}t$$.octEncodeToCartesian4=function(e,t){return t$$.octEncodeInRange(e,65535,y$_),t.x=h$14(y$_.x*F$1b),t.y=h$14(y$_.x),t.z=h$14(y$_.y*F$1b),t.w=h$14(y$_.y),t},t$$.octDecodeInRange=function(e,t,i,n){if(o$1q.defined("result",n),e<0||e>i||t<0||t>i)throw new t$15("x and y must be unsigned normalized integers between 0 and "+i);if(n.x=e$2d.fromSNorm(e,i),n.y=e$2d.fromSNorm(t,i),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){var r=n.x;n.x=(1-Math.abs(n.y))*e$2d.signNotZero(r),n.y=(1-Math.abs(r))*e$2d.signNotZero(n.y)}return o$1p.normalize(n,n)},t$$.octDecode=function(e,t,i){return t$$.octDecodeInRange(e,t,255,i)},t$$.octDecodeFromCartesian4=function(e,t){o$1q.typeOf.object("encoded",e),o$1q.typeOf.object("result",t);var i=e.x,n=e.y,r=e.z,o=e.w;if(i<0||i>255||n<0||n>255||r<0||r>255||o<0||o>255)throw new t$15("x, y, z, and w must be unsigned normalized integers between 0 and 255");var a=i*M$1a+n,s=r*M$1a+o;return t$$.octDecodeInRange(a,s,65535,t)},t$$.octPackFloat=function(e){return o$1q.defined("encoded",e),256*e.x+e.y};var b$1d=new o$1o;function g$1e(e){return e>>1^-(1&e)}t$$.octEncodeFloat=function(e){return t$$.octEncode(e,b$1d),t$$.octPackFloat(b$1d)},t$$.octDecodeFloat=function(e,t){o$1q.defined("value",e);var i=e/256,n=Math.floor(i),r=256*(i-n);return t$$.octDecode(n,r,t)},t$$.octPack=function(e,t,i,n){o$1q.defined("v1",e),o$1q.defined("v2",t),o$1q.defined("v3",i),o$1q.defined("result",n);var r=t$$.octEncodeFloat(e),o=t$$.octEncodeFloat(t),a=t$$.octEncode(i,b$1d);return n.x=65536*a.x+r,n.y=65536*a.y+o,n},t$$.octUnpack=function(e,t,i,n){o$1q.defined("packed",e),o$1q.defined("v1",t),o$1q.defined("v2",i),o$1q.defined("v3",n);var r=e.x/65536,o=Math.floor(r),a=65536*(r-o);r=e.y/65536;var s=Math.floor(r),l=65536*(r-s);t$$.octDecodeFloat(a,t),t$$.octDecodeFloat(l,i),t$$.octDecode(o,s,n)},t$$.compressTextureCoordinates=function(e){return o$1q.defined("textureCoordinates",e),4096*(4095*e.x|0)+(4095*e.y|0)},t$$.decompressTextureCoordinates=function(e,t){o$1q.defined("compressed",e),o$1q.defined("result",t);var i=e/4096,n=Math.floor(i);return t.x=n/4095,t.y=(e-4096*n)/4095,t},t$$.zigZagDeltaDecode=function(e,t,i){o$1q.defined("uBuffer",e),o$1q.defined("vBuffer",t),o$1q.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),e$2e(i)&&o$1q.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,i.length);for(var n=e.length,r=0,o=0,a=0,s=0;s<n;++s)r+=g$1e(e[s]),o+=g$1e(t[s]),e[s]=r,t[s]=o,e$2e(i)&&(a+=g$1e(i[s]),i[s]=a)},t$$.octShortToFloat=function(e){return e$2d.clamp(3051850947599719e-20*e,-1,1)},t$$.octShortDecode=function(e,t,i){if(o$1q.defined("result",i),i.x=t$$.octShortToFloat(e),i.y=t$$.octShortToFloat(t),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){var n=i.x;i.x=(1-Math.abs(i.y))*e$2d.signNotZero(n),i.y=(1-Math.abs(n))*e$2d.signNotZero(i.y)}return o$1p.normalize(i,i)};var L$1e=new o$1p,O$S=new o$1p,P$16=new o$1p;function S$$(e,t,i,n,r){var o,a,s,l,u,c,h,d;if(o$1q.defined("point",e),o$1q.defined("p0",t),o$1q.defined("p1",i),o$1q.defined("p2",n),e$2e(r)||(r=new o$1p),e$2e(t.z)){if(o$1p.equalsEpsilon(e,t,e$2d.EPSILON14))return o$1p.clone(o$1p.UNIT_X,r);if(o$1p.equalsEpsilon(e,i,e$2d.EPSILON14))return o$1p.clone(o$1p.UNIT_Y,r);if(o$1p.equalsEpsilon(e,n,e$2d.EPSILON14))return o$1p.clone(o$1p.UNIT_Z,r);o=o$1p.subtract(i,t,L$1e),a=o$1p.subtract(n,t,O$S),s=o$1p.subtract(e,t,P$16),l=o$1p.dot(o,o),u=o$1p.dot(o,a),c=o$1p.dot(o,s),h=o$1p.dot(a,a),d=o$1p.dot(a,s)}else{if(o$1o.equalsEpsilon(e,t,e$2d.EPSILON14))return o$1p.clone(o$1p.UNIT_X,r);if(o$1o.equalsEpsilon(e,i,e$2d.EPSILON14))return o$1p.clone(o$1p.UNIT_Y,r);if(o$1o.equalsEpsilon(e,n,e$2d.EPSILON14))return o$1p.clone(o$1p.UNIT_Z,r);o=o$1o.subtract(i,t,L$1e),a=o$1o.subtract(n,t,O$S),s=o$1o.subtract(e,t,P$16),l=o$1o.dot(o,o),u=o$1o.dot(o,a),c=o$1o.dot(o,s),h=o$1o.dot(a,a),d=o$1o.dot(a,s)}r.y=h*c-u*d,r.z=l*d-u*c;var f=l*h-u*u;return 0!==r.y&&(r.y/=f),0!==r.z&&(r.z/=f),r.x=1-r.y-r.z,r}function i$12(){this.high=o$1p.clone(o$1p.ZERO),this.low=o$1p.clone(o$1p.ZERO)}i$12.encode=function(e,t){var i;return o$1q.typeOf.number("value",e),e$2e(t)||(t={high:0,low:0}),e>=0?(i=65536*Math.floor(e/65536),t.high=i,t.low=e-i):(i=65536*Math.floor(-e/65536),t.high=-i,t.low=e+i),t};var n$14={high:0,low:0};i$12.fromCartesian=function(e,t){o$1q.typeOf.object("cartesian",e),e$2e(t)||(t=new i$12);var i=t.high,n=t.low;return i$12.encode(e.x,n$14),i.x=n$14.high,n.x=n$14.low,i$12.encode(e.y,n$14),i.y=n$14.high,n.y=n$14.low,i$12.encode(e.z,n$14),i.z=n$14.high,n.z=n$14.low,t};var t$_=new i$12;i$12.writeElements=function(e,t,i){o$1q.defined("cartesianArray",t),o$1q.typeOf.number("index",i),o$1q.typeOf.number.greaterThanOrEquals("index",i,0),i$12.fromCartesian(e,t$_);var n=t$_.high,r=t$_.low;t[i]=n.x,t[i+1]=n.y,t[i+2]=n.z,t[i+3]=r.x,t[i+4]=r.y,t[i+5]=r.z};var r$18={UNSIGNED_BYTE:de$y.UNSIGNED_BYTE,UNSIGNED_SHORT:de$y.UNSIGNED_SHORT,UNSIGNED_INT:de$y.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case r$18.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r$18.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r$18.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t$15("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return r$18.UNSIGNED_SHORT;case 4:return r$18.UNSIGNED_INT;case 1:return r$18.UNSIGNED_BYTE;default:throw new t$15("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return e$2e(e)&&(e===r$18.UNSIGNED_BYTE||e===r$18.UNSIGNED_SHORT||e===r$18.UNSIGNED_INT)},createTypedArray:function(e,t){if(!e$2e(e))throw new t$15("numberOfVertices is required.");return e>=e$2d.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,i,n){if(!e$2e(e))throw new t$15("numberOfVertices is required.");if(!e$2e(t))throw new t$15("sourceArray is required.");if(!e$2e(i))throw new t$15("byteOffset is required.");return e>=e$2d.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,i,n):new Uint16Array(t,i,n)}},ce$z=Object.freeze(r$18),D$14={calculateACMR:function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).indices,i=e.maximumIndex,n=u$Z(e.cacheSize,24);if(!e$2e(t))throw new t$15("indices is required.");var r=t.length;if(r<3||r%3!=0)throw new t$15("indices length must be a multiple of three.");if(i<=0)throw new t$15("maximumIndex must be greater than zero.");if(n<3)throw new t$15("cacheSize must be greater than two.");if(!e$2e(i)){i=0;for(var o=0,a=t[o];o<r;)a>i&&(i=a),a=t[++o]}for(var s=[],l=0;l<i+1;l++)s[l]=0;for(var u=n+1,c=0;c<r;++c)u-s[t[c]]>n&&(s[t[c]]=u,++u);return(u-n+1)/(r/3)}};D$14.tipsify=function(e){var t,i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).indices,n=e.maximumIndex,r=u$Z(e.cacheSize,24);function o(e,i,n,r,o,a,s){for(var l,u=-1,c=-1,h=0;h<n.length;){var d=n[h];r[d].numLiveTriangles&&(l=0,o-r[d].timeStamp+2*r[d].numLiveTriangles<=i&&(l=o-r[d].timeStamp),(l>c||-1===c)&&(c=l,u=d)),++h}return-1===u?function(e,i,n,r){for(;i.length>=1;){var o=i[i.length-1];if(i.splice(i.length-1,1),e[o].numLiveTriangles>0)return o}for(;t<r;){if(e[t].numLiveTriangles>0)return++t-1;++t}return-1}(r,a,0,s):u}if(!e$2e(i))throw new t$15("indices is required.");var a=i.length;if(a<3||a%3!=0)throw new t$15("indices length must be a multiple of three.");if(n<=0)throw new t$15("maximumIndex must be greater than zero.");if(r<3)throw new t$15("cacheSize must be greater than two.");var s=0,l=0,u=i[l],c=a;if(e$2e(n))s=n+1;else{for(;l<c;)u>s&&(s=u),u=i[++l];if(-1===s)return 0;++s}var h,d=[];for(h=0;h<s;h++)d[h]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};l=0;for(var f=0;l<c;)d[i[l]].vertexTriangles.push(f),++d[i[l]].numLiveTriangles,d[i[l+1]].vertexTriangles.push(f),++d[i[l+1]].numLiveTriangles,d[i[l+2]].vertexTriangles.push(f),++d[i[l+2]].numLiveTriangles,++f,l+=3;var p=0,_=r+1;t=1;var m,g,x,y,v=[],$=[],b=0,T=[],C=a/3,S=[];for(h=0;h<C;h++)S[h]=!1;for(;-1!==p;){v=[],y=(g=d[p]).vertexTriangles.length;for(var w=0;w<y;++w)if(!S[f=g.vertexTriangles[w]]){S[f]=!0,l=f+f+f;for(var E=0;E<3;++E)x=i[l],v.push(x),$.push(x),T[b]=x,++b,--(m=d[x]).numLiveTriangles,_-m.timeStamp>r&&(m.timeStamp=_,++_),++l}p=o(0,r,v,d,_,$,s)}return T};var k$14={};function gr$7(e,t,i,n,r){e[t++]=i,e[t++]=n,e[t++]=n,e[t++]=r,e[t++]=r,e[t]=i}function ma$4(e){for(var t=e.length,i=t/3*6,n=ce$z.createTypedArray(t,i),r=0,o=0;o<t;o+=3,r+=6)gr$7(n,r,e[o],e[o+1],e[o+2]);return n}function pa$4(e){var t=e.length;if(t>=3){var i=6*(t-2),n=ce$z.createTypedArray(t,i);gr$7(n,0,e[0],e[1],e[2]);for(var r=6,o=3;o<t;++o,r+=6)gr$7(n,r,e[o-1],e[o],e[o-2]);return n}return new Uint16Array}function ya$2(e){if(e.length>0){for(var t=e.length-1,i=6*(t-1),n=ce$z.createTypedArray(t,i),r=e[0],o=0,a=1;a<t;++a,o+=6)gr$7(n,o,r,e[a],e[a+1]);return n}return new Uint16Array}function Yr$3(e){var t={};for(var i in e)if(e.hasOwnProperty(i)&&e$2e(e[i])&&e$2e(e[i].values)){var n=e[i];t[i]=new o$1c({componentDatatype:n.componentDatatype,componentsPerAttribute:n.componentsPerAttribute,normalize:n.normalize,values:[]})}return t}function wa$3(e,t,i){for(var n in t)if(t.hasOwnProperty(n)&&e$2e(t[n])&&e$2e(t[n].values))for(var r=t[n],o=0;o<r.componentsPerAttribute;++o)e[n].values.push(r.values[i*r.componentsPerAttribute+o])}k$14.toWireframe=function(e){if(!e$2e(e))throw new t$15("geometry is required.");var t=e.indices;if(e$2e(t)){switch(e.primitiveType){case W$18.TRIANGLES:e.indices=ma$4(t);break;case W$18.TRIANGLE_STRIP:e.indices=pa$4(t);break;case W$18.TRIANGLE_FAN:e.indices=ya$2(t);break;default:throw new t$15("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}e.primitiveType=W$18.LINES}return e},k$14.createLineSegmentsForVectors=function(e,t,i){if(t=u$Z(t,"normal"),!e$2e(e))throw new t$15("geometry is required.");if(!e$2e(e.attributes.position))throw new t$15("geometry.attributes.position is required.");if(!e$2e(e.attributes[t]))throw new t$15("geometry.attributes must have an attribute with the same name as the attributeName parameter, "+t+".");i=u$Z(i,1e4);for(var n=e.attributes.position.values,r=e.attributes[t].values,o=n.length,a=new Float64Array(2*o),s=0,l=0;l<o;l+=3)a[s++]=n[l],a[s++]=n[l+1],a[s++]=n[l+2],a[s++]=n[l]+r[l]*i,a[s++]=n[l+1]+r[l+1]*i,a[s++]=n[l+2]+r[l+2]*i;var u,c=e.boundingSphere;return e$2e(c)&&(u=new i$1d(c.center,c.radius+i)),new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:a})},primitiveType:W$18.LINES,boundingSphere:u})},k$14.createAttributeLocations=function(e){if(!e$2e(e))throw new t$15("geometry is required.");var t,i=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,r={},o=0,a=i.length;for(t=0;t<a;++t){var s=i[t];e$2e(n[s])&&(r[s]=o++)}for(var l in n)n.hasOwnProperty(l)&&!e$2e(r[l])&&(r[l]=o++);return r},k$14.reorderForPreVertexCache=function(e){if(!e$2e(e))throw new t$15("geometry is required.");var t=I$1p.computeNumberOfVertices(e),i=e.indices;if(e$2e(i)){for(var n=new Int32Array(t),r=0;r<t;r++)n[r]=-1;for(var o,a=i,s=a.length,l=ce$z.createTypedArray(t,s),u=0,c=0,h=0;u<s;)-1!==(o=n[a[u]])?l[c]=o:(n[o=a[u]]=h,l[c]=h,++h),++u,++c;e.indices=l;var d=e.attributes;for(var f in d)if(d.hasOwnProperty(f)&&e$2e(d[f])&&e$2e(d[f].values)){for(var p=d[f],_=p.values,m=0,g=p.componentsPerAttribute,x=S$14.createTypedArray(p.componentDatatype,h*g);m<t;){var y=n[m];if(-1!==y)for(var v=0;v<g;v++)x[g*y+v]=_[g*m+v];++m}p.values=x}}return e},k$14.reorderForPostVertexCache=function(e,t){if(!e$2e(e))throw new t$15("geometry is required.");var i=e.indices;if(e.primitiveType===W$18.TRIANGLES&&e$2e(i)){for(var n=i.length,r=0,o=0;o<n;o++)i[o]>r&&(r=i[o]);e.indices=D$14.tipsify({indices:i,maximumIndex:r,cacheSize:t})}return e},k$14.fitToUnsignedShortIndices=function(e){if(!e$2e(e))throw new t$15("geometry is required.");if(e$2e(e.indices)&&e.primitiveType!==W$18.TRIANGLES&&e.primitiveType!==W$18.LINES&&e.primitiveType!==W$18.POINTS)throw new t$15("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");var t=[],i=I$1p.computeNumberOfVertices(e);if(e$2e(e.indices)&&i>=e$2d.SIXTY_FOUR_KILOBYTES){var n,r=[],o=[],a=0,s=Yr$3(e.attributes),l=e.indices,u=l.length;e.primitiveType===W$18.TRIANGLES?n=3:e.primitiveType===W$18.LINES?n=2:e.primitiveType===W$18.POINTS&&(n=1);for(var c=0;c<u;c+=n){for(var h=0;h<n;++h){var d=l[c+h],f=r[d];e$2e(f)||(f=a++,r[d]=f,wa$3(s,e.attributes,d)),o.push(f)}a+n>=e$2d.SIXTY_FOUR_KILOBYTES&&(t.push(new I$1p({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),r=[],o=[],a=0,s=Yr$3(e.attributes))}0!==o.length&&t.push(new I$1p({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var Hr$2=new o$1p,da$2=new a$18;k$14.projectTo2D=function(e,t,i,n,r){if(!e$2e(e))throw new t$15("geometry is required.");if(!e$2e(t))throw new t$15("attributeName is required.");if(!e$2e(i))throw new t$15("attributeName3D is required.");if(!e$2e(n))throw new t$15("attributeName2D is required.");if(!e$2e(e.attributes[t]))throw new t$15("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==S$14.DOUBLE)throw new t$15("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var o=e.attributes[t],a=(r=e$2e(r)?r:new n$1d).ellipsoid,s=o.values,l=new Float64Array(s.length),u=0,c=0;c<s.length;c+=3){var h=o$1p.fromArray(s,c,Hr$2),d=a.cartesianToCartographic(h,da$2);if(!e$2e(d))throw new t$15("Could not project point ("+h.x+", "+h.y+", "+h.z+") to 2D.");var f=r.project(d,Hr$2);l[u++]=f.x,l[u++]=f.y,l[u++]=f.z}return e.attributes[i]=o,e.attributes[n]=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:l}),delete e.attributes[t],e};var xr$6={high:0,low:0};k$14.encodeAttribute=function(e,t,i,n){if(!e$2e(e))throw new t$15("geometry is required.");if(!e$2e(t))throw new t$15("attributeName is required.");if(!e$2e(i))throw new t$15("attributeHighName is required.");if(!e$2e(n))throw new t$15("attributeLowName is required.");if(!e$2e(e.attributes[t]))throw new t$15("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==S$14.DOUBLE)throw new t$15("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var r=e.attributes[t],o=r.values,a=o.length,s=new Float32Array(a),l=new Float32Array(a),u=0;u<a;++u)i$12.encode(o[u],xr$6),s[u]=xr$6.high,l[u]=xr$6.low;var c=r.componentsPerAttribute;return e.attributes[i]=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:c,values:s}),e.attributes[n]=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:c,values:l}),delete e.attributes[t],e};var W$16=new o$1p;function Vr$5(e,t){if(e$2e(t))for(var i=t.values,n=i.length,r=0;r<n;r+=3)o$1p.unpack(i,r,W$16),p$1d.multiplyByPoint(e,W$16,W$16),o$1p.pack(W$16,i,r)}function qr$3(e,t){if(e$2e(t))for(var i=t.values,n=i.length,r=0;r<n;r+=3)o$1p.unpack(i,r,W$16),p$1e.multiplyByVector(e,W$16,W$16),W$16=o$1p.normalize(W$16,W$16),o$1p.pack(W$16,i,r)}var Er$6=new p$1d,Lr$6=new p$1e;function Sa$3(e,t){var i,n=e.length,r={},o=e[0][t].attributes;for(i in o)if(o.hasOwnProperty(i)&&e$2e(o[i])&&e$2e(o[i].values)){for(var a=o[i],s=a.values.length,l=!0,u=1;u<n;++u){var c=e[u][t].attributes[i];if(!e$2e(c)||a.componentDatatype!==c.componentDatatype||a.componentsPerAttribute!==c.componentsPerAttribute||a.normalize!==c.normalize){l=!1;break}s+=c.values.length}l&&(r[i]=new o$1c({componentDatatype:a.componentDatatype,componentsPerAttribute:a.componentsPerAttribute,normalize:a.normalize,values:S$14.createTypedArray(a.componentDatatype,s)}),a.isInstanceAttribute&&(r[i].isInstanceAttribute=!0))}return r}k$14.transformToWorldCoordinates=function(e){if(!e$2e(e))throw new t$15("instance is required.");var t=e.modelMatrix;if(p$1d.equals(t,p$1d.IDENTITY))return e;var i=e.geometry.attributes;Vr$5(t,i.position),Vr$5(t,i.prevPosition),Vr$5(t,i.nextPosition),(e$2e(i.normal)||e$2e(i.tangent)||e$2e(i.bitangent))&&(p$1d.inverse(t,Er$6),p$1d.transpose(Er$6,Er$6),p$1d.getRotation(Er$6,Lr$6),qr$3(Lr$6,i.normal),qr$3(Lr$6,i.tangent),qr$3(Lr$6,i.bitangent));var n=e.geometry.boundingSphere;return e$2e(n)&&(e.geometry.boundingSphere=i$1d.transform(n,t,n)),e.modelMatrix=p$1d.clone(p$1d.IDENTITY),e};var Ta$5=new o$1p;function Gr$4(e,t){var i,n,r,o,a=e.length,s=e[0].modelMatrix,l=e$2e(e[0][t].indices),u=e[0][t].primitiveType;for(n=1;n<a;++n){if(!p$1d.equals(e[n].modelMatrix,s))throw new t$15("All instances must have the same modelMatrix.");if(e$2e(e[n][t].indices)!==l)throw new t$15("All instance geometries must have an indices or not have one.");if(e[n][t].primitiveType!==u)throw new t$15("All instance geometries must have the same primitiveType.")}var c,h,d,f,p=Sa$3(e,t);for(i in p)if(p.hasOwnProperty(i))for(c=p[i].values,o=0,n=0;n<a;++n)for(d=(h=e[n][t].attributes[i].values).length,r=0;r<d;++r)c[o++]=h[r];if(l){var _=0;for(n=0;n<a;++n)_+=e[n][t].indices.length;var m=I$1p.computeNumberOfVertices(new I$1p({attributes:p,primitiveType:W$18.POINTS})),g=ce$z.createTypedArray(m,_),x=0,y=0;for(n=0;n<a;++n){var v=e[n][t].indices,$=v.length;for(o=0;o<$;++o)g[x++]=y+v[o];y+=I$1p.computeNumberOfVertices(e[n][t])}f=g}var b,T=new o$1p,C=0;for(n=0;n<a;++n){if(!e$2e(b=e[n][t].boundingSphere)){T=void 0;break}o$1p.add(b.center,T,T)}if(e$2e(T))for(o$1p.divideByScalar(T,a,T),n=0;n<a;++n){b=e[n][t].boundingSphere;var S=o$1p.magnitude(o$1p.subtract(b.center,T,Ta$5))+b.radius;S>C&&(C=S)}return new I$1p({attributes:p,indices:f,primitiveType:u,boundingSphere:e$2e(T)?new i$1d(T,C):void 0})}k$14.combineInstances=function(e){if(!e$2e(e)||e.length<1)throw new t$15("instances is required and must have length greater than zero.");for(var t=[],i=[],n=e.length,r=0;r<n;++r){var o=e[r];e$2e(o.geometry)?t.push(o):e$2e(o.westHemisphereGeometry)&&e$2e(o.eastHemisphereGeometry)&&i.push(o)}var a=[];return t.length>0&&a.push(Gr$4(t,"geometry")),i.length>0&&(a.push(Gr$4(i,"westHemisphereGeometry")),a.push(Gr$4(i,"eastHemisphereGeometry"))),a};var U$1a=new o$1p,mr$7=new o$1p,or$a=new o$1p,sr$9=new o$1p;k$14.computeNormal=function(e){if(!e$2e(e))throw new t$15("geometry is required.");if(!e$2e(e.attributes.position)||!e$2e(e.attributes.position.values))throw new t$15("geometry.attributes.position.values is required.");if(!e$2e(e.indices))throw new t$15("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!=0)throw new t$15("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==W$18.TRIANGLES)throw new t$15("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var t,i=e.indices,n=e.attributes,r=n.position.values,o=n.position.values.length/3,a=i.length,s=new Array(o),l=new Array(a/3),u=new Array(a);for(t=0;t<o;t++)s[t]={indexOffset:0,count:0,currentCount:0};var c=0;for(t=0;t<a;t+=3){var h=i[t],d=i[t+1],f=i[t+2],p=3*h,_=3*d,m=3*f;mr$7.x=r[p],mr$7.y=r[p+1],mr$7.z=r[p+2],or$a.x=r[_],or$a.y=r[_+1],or$a.z=r[_+2],sr$9.x=r[m],sr$9.y=r[m+1],sr$9.z=r[m+2],s[h].count++,s[d].count++,s[f].count++,o$1p.subtract(or$a,mr$7,or$a),o$1p.subtract(sr$9,mr$7,sr$9),l[c]=o$1p.cross(or$a,sr$9,new o$1p),c++}var g,x=0;for(t=0;t<o;t++)s[t].indexOffset+=x,x+=s[t].count;for(c=0,t=0;t<a;t+=3){var y=(g=s[i[t]]).indexOffset+g.currentCount;u[y]=c,g.currentCount++,u[y=(g=s[i[t+1]]).indexOffset+g.currentCount]=c,g.currentCount++,u[y=(g=s[i[t+2]]).indexOffset+g.currentCount]=c,g.currentCount++,c++}var v=new Float32Array(3*o);for(t=0;t<o;t++){var $=3*t;if(g=s[t],o$1p.clone(o$1p.ZERO,U$1a),g.count>0){for(c=0;c<g.count;c++)o$1p.add(U$1a,l[u[g.indexOffset+c]],U$1a);o$1p.equalsEpsilon(o$1p.ZERO,U$1a,e$2d.EPSILON10)&&o$1p.clone(l[u[g.indexOffset]],U$1a)}o$1p.equalsEpsilon(o$1p.ZERO,U$1a,e$2d.EPSILON10)&&(U$1a.z=1),o$1p.normalize(U$1a,U$1a),v[$]=U$1a.x,v[$+1]=U$1a.y,v[$+2]=U$1a.z}return e.attributes.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:v}),e};var ba$2=new o$1p,Wr$3=new o$1p,ga$4=new o$1p;k$14.computeTangentAndBitangent=function(e){if(!e$2e(e))throw new t$15("geometry is required.");var t=e.attributes,i=e.indices;if(!e$2e(t.position)||!e$2e(t.position.values))throw new t$15("geometry.attributes.position.values is required.");if(!e$2e(t.normal)||!e$2e(t.normal.values))throw new t$15("geometry.attributes.normal.values is required.");if(!e$2e(t.st)||!e$2e(t.st.values))throw new t$15("geometry.attributes.st.values is required.");if(!e$2e(i))throw new t$15("geometry.indices is required.");if(i.length<2||i.length%3!=0)throw new t$15("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==W$18.TRIANGLES)throw new t$15("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var n,r,o,a,s=e.attributes.position.values,l=e.attributes.normal.values,u=e.attributes.st.values,c=e.attributes.position.values.length/3,h=i.length,d=new Array(3*c);for(n=0;n<d.length;n++)d[n]=0;for(n=0;n<h;n+=3){var f=i[n],p=i[n+1],_=i[n+2];o=3*p,a=3*_;var m=2*f,g=2*p,x=2*_,y=s[r=3*f],v=s[r+1],$=s[r+2],b=u[m],T=u[m+1],C=u[g+1]-T,S=u[x+1]-T,w=1/((u[g]-b)*S-(u[x]-b)*C),E=(S*(s[o]-y)-C*(s[a]-y))*w,P=(S*(s[o+1]-v)-C*(s[a+1]-v))*w,A=(S*(s[o+2]-$)-C*(s[a+2]-$))*w;d[r]+=E,d[r+1]+=P,d[r+2]+=A,d[o]+=E,d[o+1]+=P,d[o+2]+=A,d[a]+=E,d[a+1]+=P,d[a+2]+=A}var L=new Float32Array(3*c),M=new Float32Array(3*c);for(n=0;n<c;n++){o=(r=3*n)+1,a=r+2;var R=o$1p.fromArray(l,r,ba$2),O=o$1p.fromArray(d,r,ga$4),D=o$1p.dot(R,O);o$1p.multiplyByScalar(R,D,Wr$3),o$1p.normalize(o$1p.subtract(O,Wr$3,O),O),L[r]=O.x,L[o]=O.y,L[a]=O.z,o$1p.normalize(o$1p.cross(R,O,O),O),M[r]=O.x,M[o]=O.y,M[a]=O.z}return e.attributes.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:L}),e.attributes.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:M}),e};var pr$6=new o$1o,X$11=new o$1p,Xr$3=new o$1p,Kr$4=new o$1p,Or$4=new o$1o;function Ea$4(e){if(e$2e(e.indices))return e;var t=I$1p.computeNumberOfVertices(e);if(t<3)throw new t$15("The number of vertices must be at least three.");if(t%3!=0)throw new t$15("The number of vertices must be a multiple of three.");for(var i=ce$z.createTypedArray(t,t),n=0;n<t;++n)i[n]=n;return e.indices=i,e}function La$4(e){var t=I$1p.computeNumberOfVertices(e);if(t<3)throw new t$15("The number of vertices must be at least three.");var i=ce$z.createTypedArray(t,3*(t-2));i[0]=1,i[1]=0,i[2]=2;for(var n=3,r=3;r<t;++r)i[n++]=r-1,i[n++]=0,i[n++]=r;return e.indices=i,e.primitiveType=W$18.TRIANGLES,e}function Oa$4(e){var t=I$1p.computeNumberOfVertices(e);if(t<3)throw new t$15("The number of vertices must be at least 3.");var i=ce$z.createTypedArray(t,3*(t-2));i[0]=0,i[1]=1,i[2]=2,t>3&&(i[3]=0,i[4]=2,i[5]=3);for(var n=6,r=3;r<t-1;r+=2)i[n++]=r,i[n++]=r-1,i[n++]=r+1,r+2<t&&(i[n++]=r,i[n++]=r+1,i[n++]=r+2);return e.indices=i,e.primitiveType=W$18.TRIANGLES,e}function Aa$5(e){if(e$2e(e.indices))return e;var t=I$1p.computeNumberOfVertices(e);if(t<2)throw new t$15("The number of vertices must be at least two.");if(t%2!=0)throw new t$15("The number of vertices must be a multiple of 2.");for(var i=ce$z.createTypedArray(t,t),n=0;n<t;++n)i[n]=n;return e.indices=i,e}function Pa$3(e){var t=I$1p.computeNumberOfVertices(e);if(t<2)throw new t$15("The number of vertices must be at least two.");var i=ce$z.createTypedArray(t,2*(t-1));i[0]=0,i[1]=1;for(var n=2,r=2;r<t;++r)i[n++]=r-1,i[n++]=r;return e.indices=i,e.primitiveType=W$18.LINES,e}function za$4(e){var t=I$1p.computeNumberOfVertices(e);if(t<2)throw new t$15("The number of vertices must be at least two.");var i=ce$z.createTypedArray(t,2*t);i[0]=0,i[1]=1;for(var n=2,r=2;r<t;++r)i[n++]=r-1,i[n++]=r;return i[n++]=t-1,i[n]=0,e.indices=i,e.primitiveType=W$18.LINES,e}function Na$4(e){switch(e.primitiveType){case W$18.TRIANGLE_FAN:return La$4(e);case W$18.TRIANGLE_STRIP:return Oa$4(e);case W$18.TRIANGLES:return Ea$4(e);case W$18.LINE_STRIP:return Pa$3(e);case W$18.LINE_LOOP:return za$4(e);case W$18.LINES:return Aa$5(e)}return e}function ar$a(e,t){Math.abs(e.y)<e$2d.EPSILON6&&(e.y=t?-e$2d.EPSILON6:e$2d.EPSILON6)}function Da$6(e,t,i){if(0!==e.y&&0!==t.y&&0!==i.y)return ar$a(e,e.y<0),ar$a(t,t.y<0),void ar$a(i,i.y<0);var n=Math.abs(e.y),r=Math.abs(t.y),o=Math.abs(i.y),a=(n>r?n>o?e$2d.sign(e.y):e$2d.sign(i.y):r>o?e$2d.sign(t.y):e$2d.sign(i.y))<0;ar$a(e,a),ar$a(t,a),ar$a(i,a)}k$14.compressVertices=function(e){if(!e$2e(e))throw new t$15("geometry is required.");var t,i,n=e.attributes.extrudeDirection;if(e$2e(n)){var r=n.values;i=r.length/3;var o=new Float32Array(2*i),a=0;for(t=0;t<i;++t)o$1p.fromArray(r,3*t,X$11),o$1p.equals(X$11,o$1p.ZERO)?a+=2:(Or$4=t$$.octEncodeInRange(X$11,65535,Or$4),o[a++]=Or$4.x,o[a++]=Or$4.y);return e.attributes.compressedAttributes=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:o}),delete e.attributes.extrudeDirection,e}var s=e.attributes.normal,l=e.attributes.st,u=e$2e(s),c=e$2e(l);if(!u&&!c)return e;var h,d,f,p,_=e.attributes.tangent,m=e.attributes.bitangent,g=e$2e(_),x=e$2e(m);u&&(h=s.values),c&&(d=l.values),g&&(f=_.values),x&&(p=m.values);var y=i=(u?h.length:d.length)/(u?3:2),v=c&&u?2:1;v+=g||x?1:0;var $=new Float32Array(y*=v),b=0;for(t=0;t<i;++t){c&&(o$1o.fromArray(d,2*t,pr$6),$[b++]=t$$.compressTextureCoordinates(pr$6));var T=3*t;u&&e$2e(f)&&e$2e(p)?(o$1p.fromArray(h,T,X$11),o$1p.fromArray(f,T,Xr$3),o$1p.fromArray(p,T,Kr$4),t$$.octPack(X$11,Xr$3,Kr$4,pr$6),$[b++]=pr$6.x,$[b++]=pr$6.y):(u&&(o$1p.fromArray(h,T,X$11),$[b++]=t$$.octEncodeFloat(X$11)),g&&(o$1p.fromArray(f,T,X$11),$[b++]=t$$.octEncodeFloat(X$11)),x&&(o$1p.fromArray(p,T,X$11),$[b++]=t$$.octEncodeFloat(X$11)))}return e.attributes.compressedAttributes=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:v,values:$}),u&&delete e.attributes.normal,c&&delete e.attributes.st,x&&delete e.attributes.bitangent,g&&delete e.attributes.tangent,e};var Jr$3=new o$1p;function Z$16(e,t,i,n){o$1p.add(e,o$1p.multiplyByScalar(o$1p.subtract(t,e,Jr$3),e.y/(e.y-t.y),Jr$3),i),o$1p.clone(i,n),ar$a(i,!0),ar$a(n,!1)}var er$d=new o$1p,nr$d=new o$1p,vr$8=new o$1p,tr$b=new o$1p,Rr$5={positions:new Array(7),indices:new Array(9)};function xa$3(e,t,i){if(!(e.x>=0||t.x>=0||i.x>=0)){Da$6(e,t,i);var n=e.y<0,r=t.y<0,o=i.y<0,a=0;a+=n?1:0,a+=r?1:0,a+=o?1:0;var s=Rr$5.indices;1===a?(s[1]=3,s[2]=4,s[5]=6,s[7]=6,s[8]=5,n?(Z$16(e,t,er$d,vr$8),Z$16(e,i,nr$d,tr$b),s[0]=0,s[3]=1,s[4]=2,s[6]=1):r?(Z$16(t,i,er$d,vr$8),Z$16(t,e,nr$d,tr$b),s[0]=1,s[3]=2,s[4]=0,s[6]=2):o&&(Z$16(i,e,er$d,vr$8),Z$16(i,t,nr$d,tr$b),s[0]=2,s[3]=0,s[4]=1,s[6]=0)):2===a&&(s[2]=4,s[4]=4,s[5]=3,s[7]=5,s[8]=6,n?r?o||(Z$16(i,e,er$d,vr$8),Z$16(i,t,nr$d,tr$b),s[0]=0,s[1]=1,s[3]=0,s[6]=2):(Z$16(t,i,er$d,vr$8),Z$16(t,e,nr$d,tr$b),s[0]=2,s[1]=0,s[3]=2,s[6]=1):(Z$16(e,t,er$d,vr$8),Z$16(e,i,nr$d,tr$b),s[0]=1,s[1]=2,s[3]=1,s[6]=0));var l=Rr$5.positions;return l[0]=e,l[1]=t,l[2]=i,l.length=3,(1===a||2===a)&&(l[3]=er$d,l[4]=nr$d,l[5]=vr$8,l[6]=tr$b,l.length=7),Rr$5}}function Qr$3(e,t){var i=e.attributes;if(0!==i.position.values.length){for(var n in i)if(i.hasOwnProperty(n)&&e$2e(i[n])&&e$2e(i[n].values)){var r=i[n];r.values=S$14.createTypedArray(r.componentDatatype,r.values)}var o=I$1p.computeNumberOfVertices(e);return e.indices=ce$z.createTypedArray(o,e.indices),t&&(e.boundingSphere=i$1d.fromVertices(i.position.values)),e}}function ur$9(e){var t=e.attributes,i={};for(var n in t)if(t.hasOwnProperty(n)&&e$2e(t[n])&&e$2e(t[n].values)){var r=t[n];i[n]=new o$1c({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]})}return new I$1p({attributes:i,indices:[],primitiveType:e.primitiveType})}function Br$4(e,t,i){var n=e$2e(e.geometry.boundingSphere);t=Qr$3(t,n),e$2e(i=Qr$3(i,n))&&!e$2e(t)?e.geometry=i:!e$2e(i)&&e$2e(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=i,e.geometry=void 0)}function Fr$4(e,t){var i=new e,n=new e,r=new e;return function(o,a,s,l,u,c,h,d){var f=e.fromArray(u,o*t,i),p=e.fromArray(u,a*t,n),_=e.fromArray(u,s*t,r);e.multiplyByScalar(f,l.x,f),e.multiplyByScalar(p,l.y,p),e.multiplyByScalar(_,l.z,_);var m=e.add(f,p,f);e.add(m,_,m),d&&e.normalize(m,m),e.pack(m,c,h*t)}}var Va$4=Fr$4(e$2c,4),Ar$5=Fr$4(o$1p,3),$r$4=Fr$4(o$1o,2),qa$5=function(e,t,i,n,r,o,a){var s=r[e]*n.x,l=r[t]*n.y,u=r[i]*n.z;o[a]=s+l+u>e$2d.EPSILON6?1:0},yr$6=new o$1p,kr$5=new o$1p,Ir$7=new o$1p,Ga$5=new o$1p;function Pr$5(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){if(e$2e(o)||e$2e(a)||e$2e(s)||e$2e(l)||e$2e(u)||0!==f){var m=S$$(n,o$1p.fromArray(r,3*e,yr$6),o$1p.fromArray(r,3*t,kr$5),o$1p.fromArray(r,3*i,Ir$7),Ga$5);if(e$2e(o)&&Ar$5(e,t,i,m,o,h.normal.values,_,!0),e$2e(u)){var g,x=o$1p.fromArray(u,3*e,yr$6),y=o$1p.fromArray(u,3*t,kr$5),v=o$1p.fromArray(u,3*i,Ir$7);o$1p.multiplyByScalar(x,m.x,x),o$1p.multiplyByScalar(y,m.y,y),o$1p.multiplyByScalar(v,m.z,v),o$1p.equals(x,o$1p.ZERO)&&o$1p.equals(y,o$1p.ZERO)&&o$1p.equals(v,o$1p.ZERO)?((g=yr$6).x=0,g.y=0,g.z=0):(g=o$1p.add(x,y,x),o$1p.add(g,v,g),o$1p.normalize(g,g)),o$1p.pack(g,h.extrudeDirection.values,3*_)}if(e$2e(c)&&qa$5(e,t,i,m,c,h.applyOffset.values,_),e$2e(a)&&Ar$5(e,t,i,m,a,h.tangent.values,_,!0),e$2e(s)&&Ar$5(e,t,i,m,s,h.bitangent.values,_,!0),e$2e(l)&&$r$4(e,t,i,m,l,h.st.values,_),f>0)for(var $=0;$<f;$++){var b=d[$];Ra$6(e,t,i,m,_,p[b],h[b])}}}function Ra$6(e,t,i,n,r,o,a){var s=o.componentsPerAttribute,l=o.values,u=a.values;switch(s){case 4:Va$4(e,t,i,n,l,u,r,!1);break;case 3:Ar$5(e,t,i,n,l,u,r,!1);break;case 2:$r$4(e,t,i,n,l,u,r,!1);break;default:u[r]=l[e]*n.x+l[t]*n.y+l[i]*n.z}}function Q$17(e,t,i,n,r,o){var a=e.position.values.length/3;if(-1!==r){var s=n[r],l=i[s];return-1===l?(i[s]=a,e.position.values.push(o.x,o.y,o.z),t.push(a),a):(t.push(l),l)}return e.position.values.push(o.x,o.y,o.z),t.push(a),a}var Ba$4={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function jr$5(e){var t=e.geometry,i=t.attributes,n=i.position.values,r=e$2e(i.normal)?i.normal.values:void 0,o=e$2e(i.bitangent)?i.bitangent.values:void 0,a=e$2e(i.tangent)?i.tangent.values:void 0,s=e$2e(i.st)?i.st.values:void 0,l=e$2e(i.extrudeDirection)?i.extrudeDirection.values:void 0,u=e$2e(i.applyOffset)?i.applyOffset.values:void 0,c=t.indices,h=[];for(var d in i)i.hasOwnProperty(d)&&!Ba$4[d]&&e$2e(i[d])&&h.push(d);var f,p,_,m,g=h.length,x=ur$9(t),y=ur$9(t),v=[];v.length=n.length/3;var $=[];for($.length=n.length/3,m=0;m<v.length;++m)v[m]=-1,$[m]=-1;var b=c.length;for(m=0;m<b;m+=3){var T=c[m],C=c[m+1],S=c[m+2],w=o$1p.fromArray(n,3*T),E=o$1p.fromArray(n,3*C),P=o$1p.fromArray(n,3*S),A=xa$3(w,E,P);if(e$2e(A)&&A.positions.length>3)for(var L=A.positions,M=A.indices,R=M.length,O=0;O<R;++O){var D=M[O],I=L[D];I.y<0?(f=y.attributes,p=y.indices,_=v):(f=x.attributes,p=x.indices,_=$),Pr$5(T,C,S,I,n,r,a,o,s,l,u,f,h,g,i,Q$17(f,p,_,c,D<3?m+D:-1,I))}else e$2e(A)&&(w=A.positions[0],E=A.positions[1],P=A.positions[2]),w.y<0?(f=y.attributes,p=y.indices,_=v):(f=x.attributes,p=x.indices,_=$),Pr$5(T,C,S,w,n,r,a,o,s,l,u,f,h,g,i,Q$17(f,p,_,c,m,w)),Pr$5(T,C,S,E,n,r,a,o,s,l,u,f,h,g,i,Q$17(f,p,_,c,m+1,E)),Pr$5(T,C,S,P,n,r,a,o,s,l,u,f,h,g,i,Q$17(f,p,_,c,m+2,P))}Br$4(e,y,x)}var ra$7=o$1m.fromPointNormal(o$1p.ZERO,o$1p.UNIT_Y),Fa$5=new o$1p,ka$5=new o$1p;function lr$9(e,t,i,n,r,o,a){if(e$2e(a)){var s=o$1p.fromArray(n,3*e,yr$6);o$1p.equalsEpsilon(s,i,e$2d.EPSILON10)?o.applyOffset.values[r]=a[e]:o.applyOffset.values[r]=a[t]}}function aa$6(e){var t,i=e.geometry,n=i.attributes,r=n.position.values,o=e$2e(n.applyOffset)?n.applyOffset.values:void 0,a=i.indices,s=ur$9(i),l=ur$9(i),u=a.length,c=[];c.length=r.length/3;var h=[];for(h.length=r.length/3,t=0;t<c.length;++t)c[t]=-1,h[t]=-1;for(t=0;t<u;t+=2){var d=a[t],f=a[t+1],p=o$1p.fromArray(r,3*d,yr$6),_=o$1p.fromArray(r,3*f,kr$5);Math.abs(p.y)<e$2d.EPSILON6&&(p.y<0?p.y=-e$2d.EPSILON6:p.y=e$2d.EPSILON6),Math.abs(_.y)<e$2d.EPSILON6&&(_.y<0?_.y=-e$2d.EPSILON6:_.y=e$2d.EPSILON6);var m=s.attributes,g=s.indices,x=h,y=l.attributes,v=l.indices,$=c,b=g$1j.lineSegmentPlane(p,_,ra$7,Ir$7);if(e$2e(b)){var T=o$1p.multiplyByScalar(o$1p.UNIT_Y,5*e$2d.EPSILON9,Fa$5);p.y<0&&(o$1p.negate(T,T),m=l.attributes,g=l.indices,x=c,y=s.attributes,v=s.indices,$=h);var C=o$1p.add(b,T,ka$5);lr$9(d,f,p,r,Q$17(m,g,x,a,t,p),m,o),lr$9(d,f,C,r,Q$17(m,g,x,a,-1,C),m,o),o$1p.negate(T,T),o$1p.add(b,T,C),lr$9(d,f,C,r,Q$17(y,v,$,a,-1,C),y,o),lr$9(d,f,_,r,Q$17(y,v,$,a,t+1,_),y,o)}else{var S,w,E;p.y<0?(S=l.attributes,w=l.indices,E=c):(S=s.attributes,w=s.indices,E=h),lr$9(d,f,p,r,Q$17(S,w,E,a,t,p),S,o),lr$9(d,f,_,r,Q$17(S,w,E,a,t+1,_),S,o)}}Br$4(e,l,s)}var ea$7=new o$1o,Ia$5=new o$1o,na$4=new o$1p,va$3=new o$1p,Cr$5=new o$1p,Ca$3=new o$1p,_a$4=new o$1p,Ma$4=new o$1p,ta$5=new o$1p,ia$4=new e$2c;function oa$5(e){for(var t=e.attributes,i=t.position.values,n=t.prevPosition.values,r=t.nextPosition.values,o=i.length,a=0;a<o;a+=3){var s=o$1p.unpack(i,a,na$4);if(!(s.x>0)){var l=o$1p.unpack(n,a,va$3);(s.y<0&&l.y>0||s.y>0&&l.y<0)&&(a-3>0?(n[a]=i[a-3],n[a+1]=i[a-2],n[a+2]=i[a-1]):o$1p.pack(s,n,a));var u=o$1p.unpack(r,a,Cr$5);(s.y<0&&u.y>0||s.y>0&&u.y<0)&&(a+3<o?(r[a]=i[a+3],r[a+1]=i[a+4],r[a+2]=i[a+5]):o$1p.pack(s,r,a))}}}var Ua$6=5*e$2d.EPSILON9,zr$7=e$2d.EPSILON6;function Za$5(e){var t,i,n,r=e.geometry,o=r.attributes,a=o.position.values,s=o.prevPosition.values,l=o.nextPosition.values,u=o.expandAndWidth.values,c=e$2e(o.st)?o.st.values:void 0,h=e$2e(o.color)?o.color.values:void 0,d=e$2e(o.dist)?o.dist.values:void 0,f=ur$9(r),p=ur$9(r),_=!1,m=a.length/3;for(t=0;t<m;t+=4){var g=t,x=t+2,y=o$1p.fromArray(a,3*g,na$4),v=o$1p.fromArray(a,3*x,va$3);if(Math.abs(y.y)<zr$7)for(y.y=zr$7*(v.y<0?-1:1),a[3*t+1]=y.y,a[3*(t+1)+1]=y.y,i=3*g;i<3*g+12;i+=3)s[i]=a[3*t],s[i+1]=a[3*t+1],s[i+2]=a[3*t+2];if(Math.abs(v.y)<zr$7)for(v.y=zr$7*(y.y<0?-1:1),a[3*(t+2)+1]=v.y,a[3*(t+3)+1]=v.y,i=3*g;i<3*g+12;i+=3)l[i]=a[3*(t+2)],l[i+1]=a[3*(t+2)+1],l[i+2]=a[3*(t+2)+2];var $=f.attributes,b=f.indices,T=p.attributes,C=p.indices,S=g$1j.lineSegmentPlane(y,v,ra$7,Ca$3);if(e$2e(S)){_=!0;var w=o$1p.multiplyByScalar(o$1p.UNIT_Y,Ua$6,_a$4);y.y<0&&(o$1p.negate(w,w),$=p.attributes,b=p.indices,T=f.attributes,C=f.indices);var E=o$1p.add(S,w,Ma$4);$.position.values.push(y.x,y.y,y.z,y.x,y.y,y.z),$.position.values.push(E.x,E.y,E.z),$.position.values.push(E.x,E.y,E.z),$.prevPosition.values.push(s[3*g],s[3*g+1],s[3*g+2]),$.prevPosition.values.push(s[3*g+3],s[3*g+4],s[3*g+5]),$.prevPosition.values.push(y.x,y.y,y.z,y.x,y.y,y.z),$.nextPosition.values.push(E.x,E.y,E.z),$.nextPosition.values.push(E.x,E.y,E.z),$.nextPosition.values.push(E.x,E.y,E.z),$.nextPosition.values.push(E.x,E.y,E.z),o$1p.negate(w,w),o$1p.add(S,w,E),T.position.values.push(E.x,E.y,E.z),T.position.values.push(E.x,E.y,E.z),T.position.values.push(v.x,v.y,v.z,v.x,v.y,v.z),T.prevPosition.values.push(E.x,E.y,E.z),T.prevPosition.values.push(E.x,E.y,E.z),T.prevPosition.values.push(E.x,E.y,E.z),T.prevPosition.values.push(E.x,E.y,E.z),T.nextPosition.values.push(v.x,v.y,v.z,v.x,v.y,v.z),T.nextPosition.values.push(l[3*x],l[3*x+1],l[3*x+2]),T.nextPosition.values.push(l[3*x+3],l[3*x+4],l[3*x+5]);var P=o$1o.fromArray(u,2*g,ea$7),A=Math.abs(P.y);$.expandAndWidth.values.push(-1,A,1,A),$.expandAndWidth.values.push(-1,-A,1,-A),T.expandAndWidth.values.push(-1,A,1,A),T.expandAndWidth.values.push(-1,-A,1,-A);var L=o$1p.magnitudeSquared(o$1p.subtract(S,y,Cr$5));if(L/=o$1p.magnitudeSquared(o$1p.subtract(v,y,Cr$5)),e$2e(h)){var M=e$2c.fromArray(h,4*g,ia$4),R=e$2c.fromArray(h,4*x,ia$4),O=e$2d.lerp(M.x,R.x,L),D=e$2d.lerp(M.y,R.y,L),I=e$2d.lerp(M.z,R.z,L),F=e$2d.lerp(M.w,R.w,L);for(i=4*g;i<4*g+8;++i)$.color.values.push(h[i]);for($.color.values.push(O,D,I,F),$.color.values.push(O,D,I,F),T.color.values.push(O,D,I,F),T.color.values.push(O,D,I,F),i=4*x;i<4*x+8;++i)T.color.values.push(h[i])}if(e$2e(c)){var B=o$1o.fromArray(c,2*g,ea$7),N=o$1o.fromArray(c,2*(t+3),Ia$5),G=e$2d.lerp(B.x,N.x,L);for(i=2*g;i<2*g+4;++i)$.st.values.push(c[i]);for($.st.values.push(G,B.y),$.st.values.push(G,N.y),T.st.values.push(G,B.y),T.st.values.push(G,N.y),i=2*x;i<2*x+4;++i)T.st.values.push(c[i])}if(e$2e(d)){var z=o$1p.fromArray(d,3*g,ta$5),U=o$1p.fromArray(d,3*x,ta$5),V=e$2d.lerp(z.x,U.x,L);for(i=3*g;i<3*g+6;++i)$.dist.values.push(d[i]);for($.dist.values.push(V,z.y,z.z),$.dist.values.push(V,z.y,z.z),T.dist.values.push(V,U.y,U.z),T.dist.values.push(V,U.y,U.z),i=3*x;i<3*x+6;++i)T.dist.values.push(d[i])}n=$.position.values.length/3-4,b.push(n,n+2,n+1),b.push(n+1,n+2,n+3),n=T.position.values.length/3-4,C.push(n,n+2,n+1),C.push(n+1,n+2,n+3)}else{var k,W;for(y.y<0?(k=p.attributes,W=p.indices):(k=f.attributes,W=f.indices),k.position.values.push(y.x,y.y,y.z),k.position.values.push(y.x,y.y,y.z),k.position.values.push(v.x,v.y,v.z),k.position.values.push(v.x,v.y,v.z),i=3*t;i<3*t+12;++i)k.prevPosition.values.push(s[i]),k.nextPosition.values.push(l[i]);for(i=2*t;i<2*t+8;++i)k.expandAndWidth.values.push(u[i]),e$2e(c)&&k.st.values.push(c[i]);if(e$2e(h))for(i=4*t;i<4*t+16;++i)k.color.values.push(h[i]);if(e$2e(d))for(i=3*t;i<3*t+12;++i)k.dist.values.push(d[i]);n=k.position.values.length/3-4,W.push(n,n+2,n+1),W.push(n+1,n+2,n+3)}}_&&(oa$5(p),oa$5(f)),Br$4(e,p,f)}k$14.splitLongitude=function(e){if(!e$2e(e))throw new t$15("instance is required.");var t=e.geometry,i=t.boundingSphere;if(e$2e(i)&&(i.center.x-i.radius>0||i$1d.intersectPlane(i,o$1m.ORIGIN_ZX_PLANE)!==Ae$w.INTERSECTING))return e;if(t.geometryType!==Me$s.NONE)switch(t.geometryType){case Me$s.POLYLINES:Za$5(e);break;case Me$s.TRIANGLES:jr$5(e);break;case Me$s.LINES:aa$6(e)}else Na$4(t),t.primitiveType===W$18.TRIANGLES?jr$5(e):t.primitiveType===W$18.LINES&&aa$6(e);return e};var C$1c=e$2d.EPSILON10;function D$13(e,t,i,n){if(o$1q.defined("equalsEpsilon",t),e$2e(e)){n=u$Z(n,C$1c),i=u$Z(i,!1);var r,o,a,s=e.length;if(s<2)return e;for(r=1;r<s&&!t(o=e[r-1],a=e[r],n);++r);if(r===s)return i&&t(e[0],e[e.length-1],n)?e.slice(1):e;for(var l=e.slice(0,r);r<s;++r)t(o,a=e[r],n)||(l.push(a),o=a);return i&&l.length>1&&t(l[0],l[l.length-1],n)&&l.shift(),l}}function T$18(e,t,i){if(0===e)return t*i;var n=e*e,r=n*n,o=r*n,a=o*n,s=a*n,l=s*n,u=i;return t*((1-n/4-3*r/64-5*o/256-175*a/16384-441*s/65536-4851*l/1048576)*u-(3*n/8+3*r/32+45*o/1024+105*a/4096+2205*s/131072+6237*l/524288)*Math.sin(2*u)+(15*r/256+45*o/1024+525*a/16384+1575*s/65536+155925*l/8388608)*Math.sin(4*u)-(35*o/3072+175*a/12288+3675*s/262144+13475*l/1048576)*Math.sin(6*u)+(315*a/131072+2205*s/524288+43659*l/8388608)*Math.sin(8*u)-(693*s/1310720+6237*l/5242880)*Math.sin(10*u)+1001*l/8388608*Math.sin(12*u))}function z$10(e,t,i){var n=e/i;if(0===t)return n;var r=n*n,o=r*n,a=o*n,s=t*t,l=s*s,u=l*s,c=u*s,h=c*s,d=h*s,f=Math.sin(2*n),p=Math.cos(2*n),_=Math.sin(4*n),m=Math.cos(4*n),g=Math.sin(6*n),x=Math.cos(6*n),y=Math.sin(8*n),v=Math.cos(8*n),$=Math.sin(10*n);return n+n*s/4+7*n*l/64+15*n*u/256+579*n*c/16384+1515*n*h/65536+16837*n*d/1048576+(3*n*l/16+45*n*u/256-n*(32*r-561)*c/4096-n*(232*r-1677)*h/16384+n*(399985-90560*r+512*a)*d/5242880)*p+(21*n*u/256+483*n*c/4096-n*(224*r-1969)*h/16384-n*(33152*r-112599)*d/1048576)*m+(151*n*c/4096+4681*n*h/65536+1479*n*d/16384-453*o*d/32768)*x+(1097*n*h/65536+42783*n*d/1048576)*v+8011*n*d/1048576*Math.cos(10*n)+(3*s/8+3*l/16+213*u/2048-3*r*u/64+255*c/4096-33*r*c/512+20861*h/524288-33*r*h/512+a*h/1024+28273*d/1048576-471*r*d/8192+9*a*d/4096)*f+(21*l/256+21*u/256+533*c/8192-21*r*c/512+197*h/4096-315*r*h/4096+584039*d/16777216-12517*r*d/131072+7*a*d/2048)*_+(151*u/6144+151*c/4096+5019*h/131072-453*r*h/16384+26965*d/786432-8607*r*d/131072)*g+(1097*c/131072+1097*h/65536+225797*d/10485760-1097*r*d/65536)*y+(8011*h/2621440+8011*d/1048576)*$+293393*d/251658240*Math.sin(12*n)}function p$16(e,t){if(0===e)return Math.log(Math.tan(.5*(e$2d.PI_OVER_TWO+t)));var i=e*Math.sin(t);return Math.log(Math.tan(.5*(e$2d.PI_OVER_TWO+t)))-e/2*Math.log((1+i)/(1-i))}function G$1k(e,t,i,n,r){var o=p$16(e._ellipticity,i),a=p$16(e._ellipticity,r);return Math.atan2(e$2d.negativePiToPi(n-t),a-o)}function k$13(e,t,i,n,r,o,a){var s=e._heading,l=o-n,u=0;if(e$2d.equalsEpsilon(Math.abs(s),e$2d.PI_OVER_TWO,e$2d.EPSILON8))if(t===i)u=t*Math.cos(r)*e$2d.negativePiToPi(l);else{var c=Math.sin(r);u=t*Math.cos(r)*e$2d.negativePiToPi(l)/Math.sqrt(1-e._ellipticitySquared*c*c)}else{var h=T$18(e._ellipticity,t,r);u=(T$18(e._ellipticity,t,a)-h)/Math.cos(s)}return Math.abs(u)}var A$1h=new o$1p,q$1b=new o$1p;function D$12(e,t,i,n){var r=o$1p.normalize(n.cartographicToCartesian(t,q$1b),A$1h),o=o$1p.normalize(n.cartographicToCartesian(i,q$1b),q$1b);o$1q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(o$1p.angleBetween(r,o))-Math.PI),.0125);var a=n.maximumRadius,s=n.minimumRadius,l=a*a,u=s*s;e._ellipticitySquared=(l-u)/l,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=a$18.clone(t,e._start),e._start.height=0,e._end=a$18.clone(i,e._end),e._end.height=0,e._heading=G$1k(e,t.longitude,t.latitude,i.longitude,i.latitude),e._distance=k$13(e,n.maximumRadius,n.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude)}function W$15(e,t,i,n,r,o){var a,s,l,u=r*r;if(Math.abs(e$2d.PI_OVER_TWO-Math.abs(t))>e$2d.EPSILON8){s=z$10(T$18(r,n,e.latitude)+i*Math.cos(t),r,n);var c=p$16(r,e.latitude),h=p$16(r,s);l=Math.tan(t)*(h-c),a=e$2d.negativePiToPi(e.longitude+l)}else{var d;if(s=e.latitude,0===r)d=n*Math.cos(e.latitude);else{var f=Math.sin(e.latitude);d=n*Math.cos(e.latitude)/Math.sqrt(1-u*f*f)}l=i/d,a=t>0?e$2d.negativePiToPi(e.longitude+l):e$2d.negativePiToPi(e.longitude-l)}return e$2e(o)?(o.longitude=a,o.latitude=s,o.height=0,o):new a$18(a,s,0)}function P$15(e,t,i){var n=u$Z(i,t$12.WGS84);this._ellipsoid=n,this._start=new a$18,this._end=new a$18,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,e$2e(e)&&e$2e(t)&&D$12(this,e,t,n)}function a$_(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}function z$$(e,t,i){i=i||2;var n,r,o,a,s,l,u,c=t&&t.length,h=c?t[0]*i:e.length,d=P$14(e,0,h,i,!0),f=[];if(!d||d.next===d.prev)return f;if(c&&(d=K$Z(e,t,d,i)),e.length>80*i){n=o=e[0],r=a=e[1];for(var p=i;p<h;p+=i)(s=e[p])<n&&(n=s),(l=e[p+1])<r&&(r=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-r))?1/u:0}return g$1d(d,f,i,n,r,u),f}function P$14(e,t,i,n,r){var o,a;if(r===E$1k(e,t,i,n)>0)for(o=t;o<i;o+=n)a=D$11(o,e[o],e[o+1],a);else for(o=i-n;o>=t;o-=n)a=D$11(o,e[o],e[o+1],a);return a&&L$1d(a,a.next)&&(M$19(a),a=a.next),a}function Z$15(e,t){if(!e)return e;t||(t=e);var i,n=e;do{if(i=!1,n.steiner||!L$1d(n,n.next)&&0!==h$13(n.prev,n,n.next))n=n.next;else{if(M$19(n),(n=t=n.prev)===n.next)break;i=!0}}while(i||n!==t);return t}function g$1d(e,t,i,n,r,o,a){if(e){!a&&o&&_$10(e,n,r,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?V$13(e,n,r,o):O$R(e))t.push(s.i/i),t.push(e.i/i),t.push(l.i/i),M$19(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?g$1d(e=G$1j(Z$15(e),t,i),t,i,n,r,o,2):2===a&&J$12(e,t,i,n,r,o):g$1d(Z$15(e),t,i,n,r,o,1);break}}}function O$R(e){var t=e.prev,i=e,n=e.next;if(h$13(t,i,n)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(w$12(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&h$13(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function V$13(e,t,i,n){var r=e.prev,o=e,a=e.next;if(h$13(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,l=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,u=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=T$17(s,l,t,i,n),d=T$17(u,c,t,i,n),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&w$12(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&h$13(f.prev,f,f.next)>=0||(f=f.prevZ,p!==e.prev&&p!==e.next&&w$12(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&h$13(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&w$12(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&h$13(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&w$12(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&h$13(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function G$1j(e,t,i){var n=e;do{var r=n.prev,o=n.next.next;!L$1d(r,o)&&C$1b(r,n,n.next,o)&&F$1a(r,o)&&F$1a(o,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(o.i/i),M$19(n),M$19(n.next),n=e=o),n=n.next}while(n!==e);return Z$15(n)}function J$12(e,t,i,n,r,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Y$T(a,s)){var l=B$12(a,s);return a=Z$15(a,a.next),l=Z$15(l,l.next),g$1d(a,t,i,n,r,o),void g$1d(l,t,i,n,r,o)}s=s.next}a=a.next}while(a!==e)}function K$Z(e,t,i,n){var r,o,a,s=[];for(r=0,o=t.length;r<o;r++)(a=P$14(e,t[r]*n,r<o-1?t[r+1]*n:e.length,n,!1))===a.next&&(a.steiner=!0),s.push(X$10(a));for(s.sort(Q$16),r=0;r<s.length;r++)R$14(s[r],i),i=Z$15(i,i.next);return i}function Q$16(e,t){return e.x-t.x}function R$14(e,t){if(t=U$19(e,t)){var i=B$12(t,e);Z$15(i,i.next)}}function U$19(e,t){var i,n=t,r=e.x,o=e.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if(a=s,s===r){if(o===n.y)return n;if(o===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!i)return null;if(r===a)return i;var l,u=i,c=i.x,h=i.y,d=1/0;n=i;do{r>=n.x&&n.x>=c&&r!==n.x&&w$12(o<h?r:a,o,c,h,o<h?a:r,o,n.x,n.y)&&(l=Math.abs(o-n.y)/(r-n.x),F$1a(n,e)&&(l<d||l===d&&(n.x>i.x||n.x===i.x&&W$14(i,n)))&&(i=n,d=l)),n=n.next}while(n!==u);return i}function W$14(e,t){return h$13(e.prev,e,t.prev)<0&&h$13(t.next,e,e.next)<0}function _$10(e,t,i,n){var r=e;do{null===r.z&&(r.z=T$17(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,$$11(r)}function $$11(e){var t,i,n,r,o,a,s,l,u=1;do{for(i=e,e=null,o=null,a=0;i;){for(a++,n=i,s=0,t=0;t<u&&(s++,n=n.nextZ);t++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=n}o.nextZ=null,u*=2}while(a>1);return e}function T$17(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function X$10(e){var t=e,i=e;do{(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next}while(t!==e);return i}function w$12(e,t,i,n,r,o,a,s){return(r-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(n-s)-(i-a)*(t-s)>=0&&(i-a)*(o-s)-(r-a)*(n-s)>=0}function Y$T(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!I$1o(e,t)&&(F$1a(e,t)&&F$1a(t,e)&&S$_(e,t)&&(h$13(e.prev,e,t.prev)||h$13(e,t.prev,t))||L$1d(e,t)&&h$13(e.prev,e,e.next)>0&&h$13(t.prev,t,t.next)>0)}function h$13(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function L$1d(e,t){return e.x===t.x&&e.y===t.y}function C$1b(e,t,i,n){var r=H$17(h$13(e,t,i)),o=H$17(h$13(e,t,n)),a=H$17(h$13(i,n,e)),s=H$17(h$13(i,n,t));return!!(r!==o&&a!==s||0===r&&k$12(e,i,t)||0===o&&k$12(e,n,t)||0===a&&k$12(i,e,n)||0===s&&k$12(i,t,n))}function k$12(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function H$17(e){return e>0?1:e<0?-1:0}function I$1o(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&C$1b(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function F$1a(e,t){return h$13(e.prev,e,e.next)<0?h$13(e,t,e.next)>=0&&h$13(e,e.prev,t)>=0:h$13(e,t,e.prev)<0||h$13(e,e.next,t)<0}function S$_(e,t){var i=e,n=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}function B$12(e,t){var i=new A$1g(e.i,e.x,e.y),n=new A$1g(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function D$11(e,t,i,n){var r=new A$1g(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function M$19(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function A$1g(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E$1k(e,t,i,n){for(var r=0,o=t,a=i-n;o<i;o+=n)r+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return r}Object.defineProperties(P$15.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return o$1q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return o$1q.defined("distance",this._distance),this._heading}}}),P$15.fromStartHeadingDistance=function(e,t,i,n,r){o$1q.defined("start",e),o$1q.defined("heading",t),o$1q.defined("distance",i),o$1q.typeOf.number.greaterThan("distance",i,0);var o=u$Z(n,t$12.WGS84),a=o.maximumRadius,s=o.minimumRadius,l=a*a,u=s*s,c=Math.sqrt((l-u)/l),h=W$15(e,t=e$2d.negativePiToPi(t),i,o.maximumRadius,c);return!e$2e(r)||e$2e(n)&&!n.equals(r.ellipsoid)?new P$15(e,h,o):(r.setEndPoints(e,h),r)},P$15.prototype.setEndPoints=function(e,t){o$1q.defined("start",e),o$1q.defined("end",t),D$12(this,e,t,this._ellipsoid)},P$15.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)},P$15.prototype.interpolateUsingSurfaceDistance=function(e,t){if(o$1q.typeOf.number("distance",e),!e$2e(this._distance)||0===this._distance)throw new t$15("EllipsoidRhumbLine must have distinct start and end set.");return W$15(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)},P$15.prototype.findIntersectionWithLongitude=function(e,t){if(o$1q.typeOf.number("intersectionLongitude",e),!e$2e(this._distance)||0===this._distance)throw new t$15("EllipsoidRhumbLine must have distinct start and end set.");var i=this._ellipticity,n=this._heading,r=Math.abs(n),o=this._start;if(e=e$2d.negativePiToPi(e),e$2d.equalsEpsilon(Math.abs(e),Math.PI,e$2d.EPSILON14)&&(e=e$2d.sign(o.longitude)*Math.PI),e$2e(t)||(t=new a$18),Math.abs(e$2d.PI_OVER_TWO-r)<=e$2d.EPSILON8)return t.longitude=e,t.latitude=o.latitude,t.height=0,t;if(e$2d.equalsEpsilon(Math.abs(e$2d.PI_OVER_TWO-r),e$2d.PI_OVER_TWO,e$2d.EPSILON8))return e$2d.equalsEpsilon(e,o.longitude,e$2d.EPSILON12)?void 0:(t.longitude=e,t.latitude=e$2d.PI_OVER_TWO*e$2d.sign(e$2d.PI_OVER_TWO-n),t.height=0,t);var a,s=o.latitude,l=i*Math.sin(s),u=Math.tan(.5*(e$2d.PI_OVER_TWO+s))*Math.exp((e-o.longitude)/Math.tan(n)),c=(1+l)/(1-l),h=o.latitude;do{a=h;var d=i*Math.sin(a),f=(1+d)/(1-d);h=2*Math.atan(u*Math.pow(f/c,i/2))-e$2d.PI_OVER_TWO}while(!e$2d.equalsEpsilon(h,a,e$2d.EPSILON12));return t.longitude=e,t.latitude=h,t.height=0,t},P$15.prototype.findIntersectionWithLatitude=function(e,t){if(o$1q.typeOf.number("intersectionLatitude",e),!e$2e(this._distance)||0===this._distance)throw new t$15("EllipsoidRhumbLine must have distinct start and end set.");var i=this._ellipticity,n=this._heading,r=this._start;if(!e$2d.equalsEpsilon(Math.abs(n),e$2d.PI_OVER_TWO,e$2d.EPSILON8)){var o=p$16(i,r.latitude),a=p$16(i,e),s=Math.tan(n)*(a-o),l=e$2d.negativePiToPi(r.longitude+s);return e$2e(t)?(t.longitude=l,t.latitude=e,t.height=0,t):new a$18(l,e,0)}},z$$.deviation=function(e,t,i,n){var r=t&&t.length,o=r?t[0]*i:e.length,a=Math.abs(E$1k(e,0,o,i));if(r)for(var s=0,l=t.length;s<l;s++){var u=t[s]*i,c=s<l-1?t[s+1]*i:e.length;a-=Math.abs(E$1k(e,u,c,i))}var h=0;for(s=0;s<n.length;s+=3){var d=n[s]*i,f=n[s+1]*i,p=n[s+2]*i;h+=Math.abs((e[d]-e[p])*(e[f+1]-e[d+1])-(e[d]-e[f])*(e[p+1]-e[d+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},z$$.flatten=function(e){for(var t=e[0][0].length,i={vertices:[],holes:[],dimensions:t},n=0,r=0;r<e.length;r++){for(var o=0;o<e[r].length;o++)for(var a=0;a<t;a++)i.vertices.push(e[r][o][a]);r>0&&(n+=e[r-1].length,i.holes.push(n))}return i};var e$1$={CLOCKWISE:de$y.CW,COUNTER_CLOCKWISE:de$y.CCW,NONE:de$y.NONE,validate:function(e){return e===e$1$.CLOCKWISE||e===e$1$.COUNTER_CLOCKWISE}},W$13=Object.freeze(e$1$),nr$c=new o$1p,ur$8=new o$1p,A$1f={computeArea2D:function(e){o$1q.defined("positions",e),o$1q.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);for(var t=e.length,i=0,n=t-1,r=0;r<t;n=r++){var o=e[n],a=e[r];i+=o.x*a.y-a.x*o.y}return.5*i},computeWindingOrder2D:function(e){return A$1f.computeArea2D(e)>0?W$13.COUNTER_CLOCKWISE:W$13.CLOCKWISE},triangulate:function(e,t){return o$1q.defined("positions",e),z$$(o$1o.packArray(e),t,2)}},X$$=new o$1p,Y$S=new o$1p,Z$14=new o$1p,$$10=new o$1p,H$16=new o$1p,rr$c=new o$1p,g$1c=new o$1p;A$1f.computeSubdivision=function(e,t,i,n,r){r=u$Z(r,!1),n=u$Z(n,e$2d.RADIANS_PER_DEGREE),o$1q.typeOf.object("ellipsoid",e),o$1q.defined("positions",t),o$1q.defined("indices",i),o$1q.typeOf.number.greaterThanOrEquals("indices.length",i.length,3),o$1q.typeOf.number.equals("indices.length % 3","0",i.length%3,0),o$1q.typeOf.number.greaterThan("granularity",n,0);var o,a=i.slice(0),s=t.length,l=new Array(3*s),u=0;for(o=0;o<s;o++){var c=t[o];l[u++]=c.x,l[u++]=c.y,l[u++]=c.z}for(var h=[],d={},f=e.maximumRadius,p=e$2d.chordLength(n,f),_=p*p;a.length>0;){var m,g,x=a.pop(),y=a.pop(),v=a.pop(),$=o$1p.fromArray(l,3*v,X$$),b=o$1p.fromArray(l,3*y,Y$S),T=o$1p.fromArray(l,3*x,Z$14),C=r?$:o$1p.multiplyByScalar(o$1p.normalize($,$$10),f,$$10),S=r?b:o$1p.multiplyByScalar(o$1p.normalize(b,H$16),f,H$16),w=r?T:o$1p.multiplyByScalar(o$1p.normalize(T,rr$c),f,rr$c),E=o$1p.magnitudeSquared(o$1p.subtract(C,S,g$1c)),P=o$1p.magnitudeSquared(o$1p.subtract(S,w,g$1c)),A=o$1p.magnitudeSquared(o$1p.subtract(w,C,g$1c)),L=Math.max(E,P,A);L>_?E===L?(e$2e(o=d[m=Math.min(v,y)+" "+Math.max(v,y)])||(g=o$1p.add($,b,g$1c),o$1p.multiplyByScalar(g,.5,g),l.push(g.x,g.y,g.z),o=l.length/3-1,d[m]=o),a.push(v,o,x),a.push(o,y,x)):P===L?(e$2e(o=d[m=Math.min(y,x)+" "+Math.max(y,x)])||(g=o$1p.add(b,T,g$1c),o$1p.multiplyByScalar(g,.5,g),l.push(g.x,g.y,g.z),o=l.length/3-1,d[m]=o),a.push(y,o,v),a.push(o,x,v)):A===L&&(e$2e(o=d[m=Math.min(x,v)+" "+Math.max(x,v)])||(g=o$1p.add(T,$,g$1c),o$1p.multiplyByScalar(g,.5,g),l.push(g.x,g.y,g.z),o=l.length/3-1,d[m]=o),a.push(x,o,y),a.push(o,v,y)):(h.push(v),h.push(y),h.push(x))}return new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:l})},indices:h,primitiveType:W$18.TRIANGLES})};var or$9=new a$18,hr$6=new a$18,vr$7=new a$18,F$19=new a$18;function r$17(){this._array=[],this._offset=0,this._length=0}A$1f.computeRhumbLineSubdivision=function(e,t,i,n){n=u$Z(n,e$2d.RADIANS_PER_DEGREE),o$1q.typeOf.object("ellipsoid",e),o$1q.defined("positions",t),o$1q.defined("indices",i),o$1q.typeOf.number.greaterThanOrEquals("indices.length",i.length,3),o$1q.typeOf.number.equals("indices.length % 3","0",i.length%3,0),o$1q.typeOf.number.greaterThan("granularity",n,0);var r,o=i.slice(0),a=t.length,s=new Array(3*a),l=0;for(r=0;r<a;r++){var u=t[r];s[l++]=u.x,s[l++]=u.y,s[l++]=u.z}for(var c=[],h={},d=e.maximumRadius,f=e$2d.chordLength(n,d),p=new P$15(void 0,void 0,e),_=new P$15(void 0,void 0,e),m=new P$15(void 0,void 0,e);o.length>0;){var g=o.pop(),x=o.pop(),y=o.pop(),v=o$1p.fromArray(s,3*y,X$$),$=o$1p.fromArray(s,3*x,Y$S),b=o$1p.fromArray(s,3*g,Z$14),T=e.cartesianToCartographic(v,or$9),C=e.cartesianToCartographic($,hr$6),S=e.cartesianToCartographic(b,vr$7);p.setEndPoints(T,C);var w=p.surfaceDistance;_.setEndPoints(C,S);var E=_.surfaceDistance;m.setEndPoints(S,T);var P,A,L,M,R=m.surfaceDistance,O=Math.max(w,E,R);O>f?w===O?(e$2e(r=h[P=Math.min(y,x)+" "+Math.max(y,x)])||(A=p.interpolateUsingFraction(.5,F$19),L=.5*(T.height+C.height),M=o$1p.fromRadians(A.longitude,A.latitude,L,e,g$1c),s.push(M.x,M.y,M.z),r=s.length/3-1,h[P]=r),o.push(y,r,g),o.push(r,x,g)):E===O?(e$2e(r=h[P=Math.min(x,g)+" "+Math.max(x,g)])||(A=_.interpolateUsingFraction(.5,F$19),L=.5*(C.height+S.height),M=o$1p.fromRadians(A.longitude,A.latitude,L,e,g$1c),s.push(M.x,M.y,M.z),r=s.length/3-1,h[P]=r),o.push(x,r,y),o.push(r,g,y)):R===O&&(e$2e(r=h[P=Math.min(g,y)+" "+Math.max(g,y)])||(A=m.interpolateUsingFraction(.5,F$19),L=.5*(S.height+T.height),M=o$1p.fromRadians(A.longitude,A.latitude,L,e,g$1c),s.push(M.x,M.y,M.z),r=s.length/3-1,h[P]=r),o.push(g,r,x),o.push(r,y,x)):(c.push(y),c.push(x),c.push(g))}return new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:s})},indices:c,primitiveType:W$18.TRIANGLES})},A$1f.scaleToGeodeticHeight=function(e,t,i,n){i=u$Z(i,t$12.WGS84);var r=nr$c,o=ur$8;if(t=u$Z(t,0),n=u$Z(n,!0),e$2e(e))for(var a=e.length,s=0;s<a;s+=3)o$1p.fromArray(e,s,o),n&&(o=i.scaleToGeodeticSurface(o,o)),0!==t&&(r=i.geodeticSurfaceNormal(o,r),o$1p.multiplyByScalar(r,t,r),o$1p.add(o,r,o)),e[s]=o.x,e[s+1]=o.y,e[s+2]=o.z;return e},Object.defineProperties(r$17.prototype,{length:{get:function(){return this._length}}}),r$17.prototype.enqueue=function(e){this._array.push(e),this._length++},r$17.prototype.dequeue=function(){if(0!==this._length){var e=this._array,t=this._offset,i=e[t];return e[t]=void 0,++t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,i}},r$17.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},r$17.prototype.contains=function(e){return-1!==this._array.indexOf(e)},r$17.prototype.clear=function(){this._array.length=this._offset=this._length=0},r$17.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var y$Z={computeHierarchyPackedLength:function(e){for(var t=0,i=[e];i.length>0;){var n=i.pop();if(e$2e(n)){t+=2;var r=n.positions,o=n.holes;if(e$2e(r)&&(t+=r.length*o$1p.packedLength),e$2e(o))for(var a=o.length,s=0;s<a;++s)i.push(o[s])}}return t},packPolygonHierarchy:function(e,t,i){for(var n=[e];n.length>0;){var r=n.pop();if(e$2e(r)){var o=r.positions,a=r.holes;if(t[i++]=e$2e(o)?o.length:0,t[i++]=e$2e(a)?a.length:0,e$2e(o))for(var s=o.length,l=0;l<s;++l,i+=3)o$1p.pack(o[l],t,i);if(e$2e(a))for(var u=a.length,c=0;c<u;++c)n.push(a[c])}}return i},unpackPolygonHierarchy:function(e,t){for(var i=e[t++],n=e[t++],r=new Array(i),o=n>0?new Array(n):void 0,a=0;a<i;++a,t+=o$1p.packedLength)r[a]=o$1p.unpack(e,t);for(var s=0;s<n;++s)o[s]=y$Z.unpackPolygonHierarchy(e,t),t=o[s].startingIndex,delete o[s].startingIndex;return{positions:r,holes:o,startingIndex:t}}},G$1i=new o$1p;function P$13(e,t,i,n){return o$1p.subtract(t,e,G$1i),o$1p.multiplyByScalar(G$1i,i/n,G$1i),o$1p.add(e,G$1i,G$1i),[G$1i.x,G$1i.y,G$1i.z]}y$Z.subdivideLineCount=function(e,t,i){var n=o$1p.distance(e,t)/i,r=Math.max(0,Math.ceil(e$2d.log2(n)));return Math.pow(2,r)};var _$$=new a$18,Q$15=new a$18,j$1e=new a$18,rr$b=new o$1p;y$Z.subdivideRhumbLineCount=function(e,t,i,n){var r=new P$15(e.cartesianToCartographic(t,_$$),e.cartesianToCartographic(i,Q$15),e).surfaceDistance/n,o=Math.max(0,Math.ceil(e$2d.log2(r)));return Math.pow(2,o)},y$Z.subdivideLine=function(e,t,i,n){var r=y$Z.subdivideLineCount(e,t,i),o=o$1p.distance(e,t),a=o/r;e$2e(n)||(n=[]);var s=n;s.length=3*r;for(var l=0,u=0;u<r;u++){var c=P$13(e,t,u*a,o);s[l++]=c[0],s[l++]=c[1],s[l++]=c[2]}return s},y$Z.subdivideRhumbLine=function(e,t,i,n,r){var o=new P$15(e.cartesianToCartographic(t,_$$),e.cartesianToCartographic(i,Q$15),e),a=o.surfaceDistance/n,s=Math.max(0,Math.ceil(e$2d.log2(a))),l=Math.pow(2,s),u=o.surfaceDistance/l;e$2e(r)||(r=[]);var c=r;c.length=3*l;for(var h=0,d=0;d<l;d++){var f=o.interpolateUsingSurfaceDistance(d*u,j$1e),p=e.cartographicToCartesian(f,rr$b);c[h++]=p.x,c[h++]=p.y,c[h++]=p.z}return c};var ar$9=new o$1p,er$c=new o$1p,tr$a=new o$1p,nr$b=new o$1p;y$Z.scaleToGeodeticHeightExtruded=function(e,t,i,n,r){n=u$Z(n,t$12.WGS84);var o=ar$9,a=er$c,s=tr$a,l=nr$b;if(e$2e(e)&&e$2e(e.attributes)&&e$2e(e.attributes.position))for(var u=e.attributes.position.values,c=u.length/2,h=0;h<c;h+=3)o$1p.fromArray(u,h,s),n.geodeticSurfaceNormal(s,o),l=n.scaleToGeodeticSurface(s,l),a=o$1p.multiplyByScalar(o,i,a),a=o$1p.add(l,a,a),u[h+c]=a.x,u[h+1+c]=a.y,u[h+2+c]=a.z,r&&(l=o$1p.clone(s,l)),a=o$1p.multiplyByScalar(o,t,a),a=o$1p.add(l,a,a),u[h]=a.x,u[h+1]=a.y,u[h+2]=a.z;return e},y$Z.polygonOutlinesFromHierarchy=function(e,t,i){var n,r,o,a=[],s=new r$17;for(s.enqueue(e);0!==s.length;){var l=s.dequeue(),u=l.positions;if(t)for(o=u.length,n=0;n<o;n++)i.scaleToGeodeticSurface(u[n],u[n]);if(!((u=D$13(u,o$1p.equalsEpsilon,!0)).length<3)){var c=l.holes?l.holes.length:0;for(n=0;n<c;n++){var h=l.holes[n],d=h.positions;if(t)for(o=d.length,r=0;r<o;++r)i.scaleToGeodeticSurface(d[r],d[r]);if(!((d=D$13(d,o$1p.equalsEpsilon,!0)).length<3)){a.push(d);var f=0;for(e$2e(h.holes)&&(f=h.holes.length),r=0;r<f;r++)s.enqueue(h.holes[r])}}a.push(u)}}return a};var vr$6=new o$1p(6378137,6378137,6378137);y$Z.polygonsFromHierarchy=function(e,t,i,n){var r=[],o=[],a=new r$17;for(a.enqueue(e);0!==a.length;){var s,l,u,c=a.dequeue(),h=c.positions,d=c.holes,f=h.slice();if(i)for(l=h.length,s=0;s<l;s++)n.scaleToGeodeticSurface(h[s],f[s]);if(e$2e(n)&&!o$1p.equals(n._radii,vr$6)&&(u=e$2d.EPSILON7),!((h=D$13(f,o$1p.equalsEpsilon,!0,u)).length<3)){var p=t(h);if(e$2e(p)){var _=[],m=A$1f.computeWindingOrder2D(p);m===W$13.CLOCKWISE&&(p.reverse(),h=h.slice().reverse());var g,x=h.slice(),y=e$2e(d)?d.length:0,v=[];for(s=0;s<y;s++){var $=d[s],b=$.positions;if(i)for(l=b.length,g=0;g<l;++g)n.scaleToGeodeticSurface(b[g],b[g]);if(!((b=D$13(b,o$1p.equalsEpsilon,!0,e$2d.EPSILON7)).length<3)){var T=t(b);if(e$2e(T)){(m=A$1f.computeWindingOrder2D(T))===W$13.CLOCKWISE&&(T.reverse(),b=b.slice().reverse()),v.push(b),_.push(x.length),x=x.concat(b),p=p.concat(T);var C=0;for(e$2e($.holes)&&(C=$.holes.length),g=0;g<C;g++)a.enqueue($.holes[g])}}}r.push({outerRing:h,holes:v}),o.push({positions:x,positions2D:p,holes:_})}}}return{hierarchy:r,polygons:o}};var cr$7=new o$1o,ur$7=new o$1p,fr$4=new n$15,ir$7=new p$1e;y$Z.computeBoundingRectangle=function(e,t,i,n,r){for(var o=n$15.fromAxisAngle(e,n,fr$4),a=p$1e.fromQuaternion(o,ir$7),s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,h=i.length,d=0;d<h;++d){var f=o$1p.clone(i[d],ur$7);p$1e.multiplyByVector(a,f,f);var p=t(f,cr$7);e$2e(p)&&(s=Math.min(s,p.x),l=Math.max(l,p.x),u=Math.min(u,p.y),c=Math.max(c,p.y))}return r.x=s,r.y=u,r.width=l-s,r.height=c-u,r},y$Z.createGeometryFromPositions=function(e,t,i,n,r,o){var a=A$1f.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);var s=t.positions;if(n){for(var l=s.length,u=new Array(3*l),c=0,h=0;h<l;h++){var d=s[h];u[c++]=d.x,u[c++]=d.y,u[c++]=d.z}var f=new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:u})},indices:a,primitiveType:W$18.TRIANGLES});return r.normal?k$14.computeNormal(f):f}return o===m$1h.GEODESIC?A$1f.computeSubdivision(e,s,a,i):o===m$1h.RHUMB?A$1f.computeRhumbLineSubdivision(e,s,a,i):void 0};var K$Y=[],mr$6=new o$1p,or$8=new o$1p;function n$13(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.position=u$Z(e.position,!1),this.normal=u$Z(e.normal,!1),this.st=u$Z(e.st,!1),this.bitangent=u$Z(e.bitangent,!1),this.tangent=u$Z(e.tangent,!1),this.color=u$Z(e.color,!1)}y$Z.computeWallGeometry=function(e,t,i,n,r){var o,a,s,l,u,c=e.length,h=0;if(n)for(a=3*c*2,o=new Array(2*a),s=0;s<c;s++)l=e[s],u=e[(s+1)%c],o[h]=o[h+a]=l.x,o[++h]=o[h+a]=l.y,o[++h]=o[h+a]=l.z,o[++h]=o[h+a]=u.x,o[++h]=o[h+a]=u.y,o[++h]=o[h+a]=u.z,++h;else{var d=e$2d.chordLength(i,t.maximumRadius),f=0;if(r===m$1h.GEODESIC)for(s=0;s<c;s++)f+=y$Z.subdivideLineCount(e[s],e[(s+1)%c],d);else if(r===m$1h.RHUMB)for(s=0;s<c;s++)f+=y$Z.subdivideRhumbLineCount(t,e[s],e[(s+1)%c],d);for(a=3*(f+c),o=new Array(2*a),s=0;s<c;s++){var p;l=e[s],u=e[(s+1)%c],r===m$1h.GEODESIC?p=y$Z.subdivideLine(l,u,d,K$Y):r===m$1h.RHUMB&&(p=y$Z.subdivideRhumbLine(t,l,u,d,K$Y));for(var _=p.length,m=0;m<_;++m,++h)o[h]=p[m],o[h+a]=p[m];o[h]=u.x,o[h+a]=u.x,o[++h]=u.y,o[h+a]=u.y,o[++h]=u.z,o[h+a]=u.z,++h}}c=o.length;var g=ce$z.createTypedArray(c/3,c-6*e.length),x=0;for(c/=6,s=0;s<c;s++){var y=s,v=y+1,$=y+c,b=$+1;l=o$1p.fromArray(o,3*y,mr$6),u=o$1p.fromArray(o,3*v,or$8),!o$1p.equalsEpsilon(l,u,e$2d.EPSILON10,e$2d.EPSILON10)&&(g[x++]=y,g[x++]=$,g[x++]=v,g[x++]=v,g[x++]=$,g[x++]=b)}return new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:o})}),indices:g,primitiveType:W$18.TRIANGLES})},n$13.POSITION_ONLY=Object.freeze(new n$13({position:!0})),n$13.POSITION_AND_NORMAL=Object.freeze(new n$13({position:!0,normal:!0})),n$13.POSITION_NORMAL_AND_ST=Object.freeze(new n$13({position:!0,normal:!0,st:!0})),n$13.POSITION_AND_ST=Object.freeze(new n$13({position:!0,st:!0})),n$13.POSITION_AND_COLOR=Object.freeze(new n$13({position:!0,color:!0})),n$13.ALL=Object.freeze(new n$13({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0})),n$13.DEFAULT=n$13.POSITION_NORMAL_AND_ST,n$13.packedLength=6,n$13.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),t[i++]=e.position?1:0,t[i++]=e.normal?1:0,t[i++]=e.st?1:0,t[i++]=e.tangent?1:0,t[i++]=e.bitangent?1:0,t[i]=e.color?1:0,t},n$13.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");return t=u$Z(t,0),e$2e(i)||(i=new n$13),i.position=1===e[t++],i.normal=1===e[t++],i.st=1===e[t++],i.tangent=1===e[t++],i.bitangent=1===e[t++],i.color=1===e[t],i},n$13.clone=function(e,t){if(e$2e(e))return e$2e(t)||(t=new n$13),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var Se$i=new a$18,Ee$s=new a$18;function Ve$l(e,t,i,n){var r=n.cartesianToCartographic(e,Se$i).height,o=n.cartesianToCartographic(t,Ee$s);o.height=r,n.cartographicToCartesian(o,t);var a=n.cartesianToCartographic(i,Ee$s);a.height=r-100,n.cartographicToCartesian(a,i)}var Be$o=new f$1a,ke$i=new o$1p,ze$h=new o$1p,Ue$k=new o$1p,Ye$j=new o$1p,We$m=new o$1p,je$i=new o$1p,ve$x=new o$1p,Q$14=new o$1p,I$1n=new o$1p,Me$r=new o$1o,Qe$d=new o$1o,qe$f=new o$1p,He$h=new n$15,Ke$d=new p$1e,Ze$9=new p$1e;function pe$D(e){var t=e.vertexFormat,i=e.geometry,n=e.shadowVolume,r=i.attributes.position.values,o=r.length,a=e.wall,s=e.top||a,l=e.bottom||a;if(t.st||t.normal||t.tangent||t.bitangent||n){var u=e.boundingRectangle,c=e.tangentPlane,h=e.ellipsoid,d=e.stRotation,f=e.perPositionHeight,p=Me$r;p.x=u.x,p.y=u.y;var _,m=e.isComputeTexCoord?new Float32Array(o):new Float32Array(o/3*2),g=t.st?m:void 0;t.normal&&(_=f&&s&&!a?i.attributes.normal.values:new Float32Array(o));var x=t.tangent?new Float32Array(o):void 0,y=t.bitangent?new Float32Array(o):void 0,v=n?new Float32Array(o):void 0,$=0,b=0,T=ze$h,C=Ue$k,S=Ye$j,w=!0,E=Ke$d,P=Ze$9;if(0!==d){var A=n$15.fromAxisAngle(c._plane.normal,d,He$h);E=p$1e.fromQuaternion(A,E),A=n$15.fromAxisAngle(c._plane.normal,-d,He$h),P=p$1e.fromQuaternion(A,P)}else E=p$1e.clone(p$1e.IDENTITY,E),P=p$1e.clone(p$1e.IDENTITY,P);var L=0,M=0;s&&l&&(L=o/2,M=o/3,o/=2);for(var R=0;R<o;R+=3){var O=o$1p.fromArray(r,R,qe$f);if(t.st){var D=p$1e.multiplyByVector(E,O,ke$i);D=h.scaleToGeodeticSurface(D,D);var I=c.projectPointOntoPlane(D,Qe$d);o$1o.subtract(I,p,I);var F=e$2d.clamp(I.x/u.width,0,1),B=e$2d.clamp(I.y/u.height,0,1);l&&(g[$+M]=F,g[$+1+M]=B),s&&(g[$]=F,g[$+1]=B),$+=2}if(t.normal||t.tangent||t.bitangent||n){var N=b+1,G=b+2;if(a){if(R+3<o){var z=o$1p.fromArray(r,R+3,We$m);if(w){var U=o$1p.fromArray(r,R+o,je$i);f&&Ve$l(O,z,U,h),o$1p.subtract(z,O,z),o$1p.subtract(U,O,U),T=o$1p.normalize(o$1p.cross(U,z,T),T),w=!1}o$1p.equalsEpsilon(z,O,e$2d.EPSILON10)&&(w=!0)}(t.tangent||t.bitangent)&&(S=h.geodeticSurfaceNormal(O,S),t.tangent&&(C=o$1p.normalize(o$1p.cross(S,T,C),C)))}else T=h.geodeticSurfaceNormal(O,T),(t.tangent||t.bitangent)&&(f&&(ve$x=o$1p.fromArray(_,b,ve$x),Q$14=o$1p.cross(o$1p.UNIT_Z,ve$x,Q$14),Q$14=o$1p.normalize(p$1e.multiplyByVector(P,Q$14,Q$14),Q$14),t.bitangent&&(I$1n=o$1p.normalize(o$1p.cross(ve$x,Q$14,I$1n),I$1n))),C=o$1p.cross(o$1p.UNIT_Z,T,C),C=o$1p.normalize(p$1e.multiplyByVector(P,C,C),C),t.bitangent&&(S=o$1p.normalize(o$1p.cross(T,C,S),S)));t.normal&&(e.wall?(_[b+L]=T.x,_[N+L]=T.y,_[G+L]=T.z):l&&(_[b+L]=-T.x,_[N+L]=-T.y,_[G+L]=-T.z),(s&&!f||a)&&(_[b]=T.x,_[N]=T.y,_[G]=T.z)),n&&(a&&(T=h.geodeticSurfaceNormal(O,T)),v[b+L]=-T.x,v[N+L]=-T.y,v[G+L]=-T.z),t.tangent&&(e.wall?(x[b+L]=C.x,x[N+L]=C.y,x[G+L]=C.z):l&&(x[b+L]=-C.x,x[N+L]=-C.y,x[G+L]=-C.z),s&&(f?(x[b]=Q$14.x,x[N]=Q$14.y,x[G]=Q$14.z):(x[b]=C.x,x[N]=C.y,x[G]=C.z))),t.bitangent&&(l&&(y[b+L]=S.x,y[N+L]=S.y,y[G+L]=S.z),s&&(f?(y[b]=I$1n.x,y[N]=I$1n.y,y[G]=I$1n.z):(y[b]=S.x,y[N]=S.y,y[G]=S.z))),b+=3}}t.st&&(i.attributes.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:g})),t.normal&&(i.attributes.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:_})),t.tangent&&(i.attributes.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:x})),t.bitangent&&(i.attributes.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:y})),n&&(i.attributes.extrudeDirection=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:v}))}if(e.extrude&&e$2e(e.offsetAttribute)){var V=r.length/3,k=new Uint8Array(V);if(e.offsetAttribute===_0x39c22a.TOP)s&&l||a?k=d$1s(k,1,0,V/2):s&&(k=d$1s(k,1));else k=d$1s(k,e.offsetAttribute===_0x39c22a.NONE?0:1);i.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:k})}return i}var Ce$l=new a$18,De$o=new a$18,Ce$l=new a$18,De$o=new a$18,Z$13={westOverIDL:0,eastOverIDL:0},ee$A=new E$1t;function Ae$v(e,t,i,n,r){if(r=u$Z(r,new h$18),!e$2e(e)||e.length<3)return r.west=0,r.north=0,r.south=0,r.east=0,r;if(i===m$1h.RHUMB)return h$18.fromCartesianArray(e,t,r);ee$A.ellipsoid.equals(t)||(ee$A=new E$1t(void 0,void 0,t)),r.west=Number.POSITIVE_INFINITY,r.east=Number.NEGATIVE_INFINITY,r.south=Number.POSITIVE_INFINITY,r.north=Number.NEGATIVE_INFINITY,Z$13.westOverIDL=Number.POSITIVE_INFINITY,Z$13.eastOverIDL=Number.NEGATIVE_INFINITY;for(var o,a=1/e$2d.chordLength(n,t.maximumRadius),s=e.length,l=t.cartesianToCartographic(e[0],De$o),u=Ce$l,c=1;c<s;c++)o=u,u=l,l=t.cartesianToCartographic(e[c],o),ee$A.setEndPoints(u,l),be$v(ee$A,a,r,Z$13);return o=u,u=l,l=t.cartesianToCartographic(e[0],o),ee$A.setEndPoints(u,l),be$v(ee$A,a,r,Z$13),r.east-r.west>Z$13.eastOverIDL-Z$13.westOverIDL&&(r.west=Z$13.westOverIDL,r.east=Z$13.eastOverIDL,r.east>e$2d.PI&&(r.east=r.east-e$2d.TWO_PI),r.west>e$2d.PI&&(r.west=r.west-e$2d.TWO_PI)),r}var Je$a=new a$18;function be$v(e,t,i,n){for(var r=e.surfaceDistance,o=Math.ceil(r*t),a=o>0?r/(o-1):Number.POSITIVE_INFINITY,s=0,l=0;l<o;l++){var u=e.interpolateUsingSurfaceDistance(s,Je$a);s+=a;var c=u.longitude,h=u.latitude;i.west=Math.min(i.west,c),i.east=Math.max(i.east,c),i.south=Math.min(i.south,h),i.north=Math.max(i.north,h);var d=c>=0?c:c+e$2d.TWO_PI;n.westOverIDL=Math.min(n.westOverIDL,d),n.eastOverIDL=Math.max(n.eastOverIDL,d)}}var Ne$l=[];function Xe$g(e,t,i,n,r,o,a,s,l,u){var c,h={walls:[]};if(o||a){var d,f,p=y$Z.createGeometryFromPositions(e,t,i,r,s,l),_=p.attributes.position.values,m=p.indices;if(o&&a){var g=_.concat(_);d=g.length/3,(f=ce$z.createTypedArray(d,2*m.length)).set(m);var x=m.length,y=d/2;for(c=0;c<x;c+=3){var v=f[c]+y,$=f[c+1]+y,b=f[c+2]+y;f[c+x]=b,f[c+1+x]=$,f[c+2+x]=v}if(p.attributes.position.values=g,r&&s.normal){var T=p.attributes.normal.values;p.attributes.normal.values=new Float32Array(g.length),p.attributes.normal.values.set(T)}p.indices=f}else if(a){for(d=_.length/3,f=ce$z.createTypedArray(d,m.length),c=0;c<m.length;c+=3)f[c]=m[c+2],f[c+1]=m[c+1],f[c+2]=m[c];p.indices=f}h.topAndBottom=new d$1o({geometry:p})}var C,S=n.outerRing,w=f$16.fromPoints(S,e),E=w.projectPointsOntoPlane(S,Ne$l),P=A$1f.computeWindingOrder2D(E);P===W$13.CLOCKWISE&&(S=S.slice().reverse()),u&&(C=y$Z.computeWallGeometry(S,e,i,r,l),h.walls.push(new d$1o({geometry:C})));var A=n.holes;for(c=0;c<A.length;c++){var L=A[c];E=(w=f$16.fromPoints(L,e)).projectPointsOntoPlane(L,Ne$l),(P=A$1f.computeWindingOrder2D(E))===W$13.COUNTER_CLOCKWISE&&(L=L.slice().reverse()),C=y$Z.computeWallGeometry(L,e,i,r,l),h.walls.push(new d$1o({geometry:C}))}return h}function U$18(e){if(o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e$2e(e.perPositionHeight)&&e.perPositionHeight&&e$2e(e.height))throw new t$15("Cannot use both options.perPositionHeight and options.height");if(e$2e(e.arcType)&&e.arcType!==m$1h.GEODESIC&&e.arcType!==m$1h.RHUMB)throw new t$15("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var t=e.polygonHierarchy,i=u$Z(e.vertexFormat,n$13.DEFAULT),n=u$Z(e.ellipsoid,t$12.WGS84),r=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),o=u$Z(e.stRotation,0),a=u$Z(e.perPositionHeight,!1),s=a&&e$2e(e.extrudedHeight),l=u$Z(e.height,0),u=u$Z(e.extrudedHeight,l);if(!s){var c=Math.max(l,u);u=Math.min(l,u),l=c}this._vertexFormat=n$13.clone(i),this._ellipsoid=t$12.clone(n),this._granularity=r,this._stRotation=o,this._height=l,this._extrudedHeight=u,this._closeTop=u$Z(e.closeTop,!0),this._closeBottom=u$Z(e.closeBottom,!0),this._extrudeOutering=u$Z(e.extrudeOutering,!0),this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=s,this._shadowVolume=u$Z(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=u$Z(e.arcType,m$1h.GEODESIC),this._groundBottomAltitude=u$Z(e.groundBottomAltitude,0),this._groundExtrudedHeight=u$Z(e.groundExtrudedHeight,0),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this.packedLength=y$Z.computeHierarchyPackedLength(t)+t$12.packedLength+n$13.packedLength+12}U$18.fromPositions=function(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new U$18({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType})},U$18.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),i=y$Z.packPolygonHierarchy(e._polygonHierarchy,t,i),t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._stRotation,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._closeTop?1:0,t[i++]=e._closeBottom?1:0,t[i++]=e._shadowVolume?1:0,t[i++]=u$Z(e._offsetAttribute,-1),t[i++]=e._arcType,t[i]=e.packedLength,t};var $e$c=t$12.clone(t$12.UNIT_SPHERE),Ge$i=new n$13,xe$r={polygonHierarchy:{}};function Ie$o(e){var t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];var i=e._ellipsoid,n=e._polygonHierarchy.positions,r=e.rectangle;return I$1p._textureCoordinateRotationPoints(n,t,i,r)}U$18.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=y$Z.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=t$12.unpack(e,t,$e$c);t+=t$12.packedLength;var o=n$13.unpack(e,t,Ge$i);t+=n$13.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=1===e[t++],h=1===e[t++],d=1===e[t++],f=1===e[t++],p=1===e[t++],_=e[t++],m=e[t++],g=e[t];return e$2e(i)||(i=new U$18(xe$r)),i._polygonHierarchy=n,i._ellipsoid=t$12.clone(r,i._ellipsoid),i._vertexFormat=n$13.clone(o,i._vertexFormat),i._height=a,i._extrudedHeight=s,i._granularity=l,i._stRotation=u,i._perPositionHeightExtrude=c,i._perPositionHeight=h,i._closeTop=d,i._closeBottom=f,i._shadowVolume=p,i._offsetAttribute=-1===_?void 0:_,i._arcType=m,i.packedLength=g,i},U$18.computeRectangle=function(e,t){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.polygonHierarchy",e.polygonHierarchy);var i=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),n=u$Z(e.arcType,m$1h.GEODESIC);if(n!==m$1h.GEODESIC&&n!==m$1h.RHUMB)throw new t$15("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var r=e.polygonHierarchy,o=u$Z(e.ellipsoid,t$12.WGS84);return Ae$v(r.positions,o,n,i,t)},U$18.createGeometry=function(e){var t=e._vertexFormat,i=e._ellipsoid,n=e._granularity,r=e._stRotation,o=e._polygonHierarchy,a=e._perPositionHeight,s=e._closeTop,l=e._closeBottom,u=e._arcType,c=o.positions;if(!(c.length<3)){var h=f$16.fromPoints(c,i),d=y$Z.polygonsFromHierarchy(o,h.projectPointsOntoPlane.bind(h),!a,i),f=d.hierarchy,p=d.polygons;if(0!==f.length){c=f[0].outerRing;var _,m=y$Z.computeBoundingRectangle(h.plane.normal,h.projectPointOntoPlane.bind(h),c,r,Be$o),g=[],x=e._height,y=e._extrudedHeight,v={perPositionHeight:a,vertexFormat:t,geometry:void 0,tangentPlane:h,boundingRectangle:m,ellipsoid:i,stRotation:r,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u};if(e._perPositionHeightExtrude||!e$2d.equalsEpsilon(x,y,0,e$2d.EPSILON2))for(v.extrude=!0,v.top=s,v.bottom=l,v.shadowVolume=e._shadowVolume,v.offsetAttribute=e._offsetAttribute,_=0;_<p.length;_++){var $,b=Xe$g(i,p[_],n,f[_],a,s,l,t,u,e._extrudeOutering);s&&l?($=b.topAndBottom,v.geometry=y$Z.scaleToGeodeticHeightExtruded($.geometry,x,y,i,a)):s?(($=b.topAndBottom).geometry.attributes.position.values=A$1f.scaleToGeodeticHeight($.geometry.attributes.position.values,x,i,!a),v.geometry=$.geometry):l&&(($=b.topAndBottom).geometry.attributes.position.values=A$1f.scaleToGeodeticHeight($.geometry.attributes.position.values,y,i,!0),v.geometry=$.geometry),(s||l)&&(v.wall=!1,$.geometry=pe$D(v),g.push($));var T=b.walls;v.wall=!0;for(var C=0;C<T.length;C++){var S=T[C];v.geometry=y$Z.scaleToGeodeticHeightExtruded(S.geometry,x,y,i,a),S.geometry=pe$D(v),g.push(S)}}else for(_=0;_<p.length;_++){var w=new d$1o({geometry:y$Z.createGeometryFromPositions(i,p[_],n,a,t,u)});if(w.geometry.attributes.position.values=A$1f.scaleToGeodeticHeight(w.geometry.attributes.position.values,x,i,!a),v.geometry=w.geometry,w.geometry=pe$D(v),e$2e(e._offsetAttribute)){var E=w.geometry.attributes.position.values.length,P=new Uint8Array(E/3);d$1s(P,e._offsetAttribute===_0x39c22a.NONE?0:1),w.geometry.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:P})}g.push(w)}var A=k$14.combineInstances(g)[0];A.attributes.position.values=new Float64Array(A.attributes.position.values),A.indices=ce$z.createTypedArray(A.attributes.position.values.length/3,A.indices);var L=A.attributes,M=i$1d.fromVertices(L.position.values);return t.position||delete L.position,new I$1p({attributes:L,indices:A.indices,primitiveType:A.primitiveType,boundingSphere:M,offsetAttribute:e._offsetAttribute})}}},U$18.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=e._groundBottomAltitude+e._groundExtrudedHeight,a=e._groundBottomAltitude?e._groundBottomAltitude:t(n,r),s=o!==e._groundBottomAltitude?o:i(n,r);return new U$18({polygonHierarchy:e._polygonHierarchy,ellipsoid:r,stRotation:e._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:a,height:s,vertexFormat:n$13.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(U$18.prototype,{rectangle:{get:function(){if(!e$2e(this._rectangle)){var e=this._polygonHierarchy.positions;this._rectangle=Ae$v(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e$2e(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Ie$o(this)),this._textureCoordinateRotationPoints}}});var E$1j={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE:4,CESIUM_3D_TILE_CLASSIFICATION:5,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:6,S3MTiles:8,S3MTilesClampObjectStencil:9,S3MTilesClampObjectColor:10,ProjectionImage:11,OPAQUE:12,ClampObject:13,NonClampObject:14,Label_Billboard:15,Voxel_Billboard:16,Particle:17,TRANSLUCENT:18,ANALYSIS:19,LOG_DEPTH_OVERLAY:20,OVERLAY:21,OVERLAY_AGAINST_DEPTH:22,NUMBER_OF_PASSES:23},Le$q=Object.freeze(E$1j);function f$14(){return!0}function i$11(e,t){function i(){throw new t$15(t)}for(var n in t=u$Z(t,"This object was destroyed, i.e., destroy() was called."),e)"function"==typeof e[n]&&(e[n]=i);e.isDestroyed=f$14}var v$U=[];function y$Y(e,t){this.center=o$1p.clone(u$Z(e,o$1p.ZERO)),this.halfAxes=p$1e.clone(u$Z(t,p$1e.ZERO)),this.areaDirty=1}v$U[0]={num:0,des:"inside"},v$U[1]={num:4,data:[0,4,7,3],des:"left"},v$U[2]={num:4,data:[1,2,6,5],des:"right"},v$U[3]={num:0},v$U[4]={num:4,data:[0,1,5,4],des:"bottom"},v$U[5]={num:6,data:[0,1,5,4,7,3],des:"bottom, left"},v$U[6]={num:6,data:[0,1,2,6,5,4],des:"bottom, right"},v$U[7]={num:0},v$U[8]={num:4,data:[2,3,7,6],des:"top"},v$U[9]={num:6,data:[4,7,6,2,3,0],des:"top, left"},v$U[10]={num:6,data:[2,3,7,6,5,1],des:"top, right"},v$U[11]={num:0},v$U[12]={num:0},v$U[13]={num:0},v$U[14]={num:0},v$U[15]={num:0},v$U[16]={num:4,data:[0,3,2,1],des:"front"},v$U[17]={num:6,data:[0,4,7,3,2,1],des:"front, left"},v$U[18]={num:6,data:[0,3,2,6,5,1],des:"front, right"},v$U[19]={num:0},v$U[20]={num:6,data:[0,3,2,1,5,4],des:"front, bottom"},v$U[21]={num:6,data:[2,1,5,4,7,3],des:"front, bottom, left"},v$U[22]={num:6,data:[0,3,2,6,5,4],des:"front, bottom, right"},v$U[23]={num:0},v$U[24]={num:6,data:[0,3,7,6,2,1],des:"front, top"},v$U[25]={num:6,data:[0,4,7,6,2,1],des:"front, top, left"},v$U[26]={num:6,data:[0,3,7,6,5,1],des:"front, top, right"},v$U[27]={num:0},v$U[28]={num:0},v$U[29]={num:0},v$U[30]={num:0},v$U[31]={num:0},v$U[32]={num:4,data:[4,5,6,7],des:"back"},v$U[33]={num:6,data:[4,5,6,7,3,0],des:"back, left"},v$U[34]={num:6,data:[1,2,6,7,4,5],des:"back, right"},v$U[35]={num:0},v$U[36]={num:6,data:[0,1,5,6,7,4],des:"back, bottom"},v$U[37]={num:6,data:[0,1,5,6,7,3],des:"back, bottom, left"},v$U[38]={num:6,data:[0,1,2,6,7,4],des:"back, bottom, right"},v$U[39]={num:0},v$U[40]={num:6,data:[2,3,7,4,5,6],des:"back, top"},v$U[41]={num:6,data:[0,4,5,6,2,3],des:"back, top, left"},v$U[42]={num:6,data:[1,2,3,7,4,5],des:"back, top, right"},y$Y.packedLength=o$1p.packedLength+p$1e.packedLength,y$Y.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),o$1p.pack(e.center,t,i),p$1e.pack(e.halfAxes,t,i+o$1p.packedLength),t},y$Y.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new y$Y),o$1p.unpack(e,t,i.center),p$1e.unpack(e,t+o$1p.packedLength,i.halfAxes),i};var Oa$3=new o$1p,Aa$4=new o$1p,Na$3=new o$1p,Ea$3=new o$1p,Ta$4=new o$1p,Ra$5=new o$1p,ga$3=new p$1e,Ba$3={unitary:new p$1e,diagonal:new p$1e},k$11=new o$1p,E$1i=new o$1p,p$15=new o$1p;y$Y.fromPoints=function(e,t){if(e$2e(t)||(t=new y$Y),!e$2e(e)||0===e.length)return t.halfAxes=p$1e.ZERO,t.center=o$1p.ZERO,t;var i,n=e.length,r=o$1p.clone(e[0],Oa$3);for(i=1;i<n;i++)o$1p.add(r,e[i],r);var o=1/n;o$1p.multiplyByScalar(r,o,r);var a,s=0,l=0,u=0,c=0,h=0,d=0;for(i=0;i<n;i++)s+=(a=o$1p.subtract(e[i],r,Aa$4)).x*a.x,l+=a.x*a.y,u+=a.x*a.z,c+=a.y*a.y,h+=a.y*a.z,d+=a.z*a.z;s*=o,l*=o,u*=o,c*=o,h*=o,d*=o;var f=ga$3;f[0]=s,f[1]=l,f[2]=u,f[3]=l,f[4]=c,f[5]=h,f[6]=u,f[7]=h,f[8]=d;var p=p$1e.computeEigenDecomposition(f,Ba$3),_=p$1e.clone(p.unitary,t.halfAxes),m=p$1e.getColumn(_,0,Ea$3),g=p$1e.getColumn(_,1,Ta$4),x=p$1e.getColumn(_,2,Ra$5),y=-Number.MAX_VALUE,v=-Number.MAX_VALUE,$=-Number.MAX_VALUE,b=Number.MAX_VALUE,T=Number.MAX_VALUE,C=Number.MAX_VALUE;for(i=0;i<n;i++)a=e[i],y=Math.max(o$1p.dot(m,a),y),v=Math.max(o$1p.dot(g,a),v),$=Math.max(o$1p.dot(x,a),$),b=Math.min(o$1p.dot(m,a),b),T=Math.min(o$1p.dot(g,a),T),C=Math.min(o$1p.dot(x,a),C);m=o$1p.multiplyByScalar(m,.5*(b+y),m),g=o$1p.multiplyByScalar(g,.5*(T+v),g),x=o$1p.multiplyByScalar(x,.5*(C+$),x);var S=o$1p.add(m,g,t.center);o$1p.add(S,x,S);var w=Na$3;return w.x=y-b,w.y=v-T,w.z=$-C,o$1p.multiplyByScalar(w,.5,w),p$1e.multiplyByScale(t.halfAxes,w,t.halfAxes),t};var va$2=new o$1p,La$3=new o$1p;function ua$4(e,t,i,n,r,o,a,s,l,u,c){if(!(e$2e(r)&&e$2e(o)&&e$2e(a)&&e$2e(s)&&e$2e(l)&&e$2e(u)))throw new t$15("all extents (minimum/maximum X/Y/Z) are required.");e$2e(c)||(c=new y$Y);var h=c.halfAxes;p$1e.setColumn(h,0,t,h),p$1e.setColumn(h,1,i,h),p$1e.setColumn(h,2,n,h);var d=va$2;d.x=(r+o)/2,d.y=(a+s)/2,d.z=(l+u)/2;var f=La$3;f.x=(o-r)/2,f.y=(s-a)/2,f.z=(u-l)/2;var p=c.center;return d=p$1e.multiplyByVector(h,d,d),o$1p.add(e,d,p),p$1e.multiplyByScale(h,f,h),c}var fa$4=new a$18,Ia$4=new o$1p,Sa$2=new a$18,qa$4=new a$18,ka$4=new a$18,Ua$5=new a$18,Da$5=new a$18,Va$3=new o$1p,ma$3=new o$1p,Xa$5=new o$1p,wa$2=new o$1p,ja$3=new o$1p,Wa$3=new o$1o,_a$3=new o$1o,Za$4=new o$1o,Ya$5=new o$1o,Fa$4=new o$1o,Ga$4=new o$1p,Ja$5=new o$1p,Ka$5=new o$1p,Qa$5=new o$1p,$a$5=new o$1o,Ha$3=new o$1p,ar$8=new o$1p,rr$a=new o$1p,tr$9=new o$1m(o$1p.UNIT_X,0);y$Y.fromRectangle=function(e,t,i,n,r){if(!e$2e(e))throw new t$15("rectangle is required");if(e.width<0||e.width>e$2d.TWO_PI)throw new t$15("Rectangle width must be between 0 and 2*pi");if(e.height<0||e.height>e$2d.PI)throw new t$15("Rectangle height must be between 0 and pi");if(e$2e(n)&&!e$2d.equalsEpsilon(n.radii.x,n.radii.y,e$2d.EPSILON15))throw new t$15("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");var o,a,s,l,u,c,h;if(t=u$Z(t,0),i=u$Z(i,0),n=u$Z(n,t$12.WGS84),e.width<=e$2d.PI){var d=h$18.center(e,fa$4),f=new f$16(n.cartographicToCartesian(d,Ia$4),n);h=f.plane;var p=d.longitude,_=e.south<0&&e.north>0?0:d.latitude,m=a$18.fromRadians(p,e.north,i,Sa$2),g=a$18.fromRadians(e.west,e.north,i,qa$4),x=a$18.fromRadians(e.west,_,i,ka$4),y=a$18.fromRadians(e.west,e.south,i,Ua$5),v=a$18.fromRadians(p,e.south,i,Da$5),$=n.cartographicToCartesian(m,Va$3),b=n.cartographicToCartesian(g,ma$3),T=n.cartographicToCartesian(x,Xa$5),C=n.cartographicToCartesian(y,wa$2),S=n.cartographicToCartesian(v,ja$3),w=f.projectPointToNearestOnPlane($,Wa$3),E=f.projectPointToNearestOnPlane(b,_a$3),P=f.projectPointToNearestOnPlane(T,Za$4),A=f.projectPointToNearestOnPlane(C,Ya$5),L=f.projectPointToNearestOnPlane(S,Fa$4);return a=-(o=Math.min(E.x,P.x,A.x)),l=Math.max(E.y,w.y),s=Math.min(A.y,L.y),g.height=y.height=t,b=n.cartographicToCartesian(g,ma$3),C=n.cartographicToCartesian(y,wa$2),u=Math.min(o$1m.getPointDistance(h,b),o$1m.getPointDistance(h,C)),c=i,ua$4(f.origin,f.xAxis,f.yAxis,f.zAxis,o,a,s,l,u,c,r)}var M=e.south>0,R=e.north<0,O=M?e.south:R?e.north:0,D=h$18.center(e,fa$4).longitude,I=o$1p.fromRadians(D,O,i,n,Ga$4);I.z=0;var F=Math.abs(I.x)<e$2d.EPSILON10&&Math.abs(I.y)<e$2d.EPSILON10?o$1p.UNIT_X:o$1p.normalize(I,Ja$5),B=o$1p.UNIT_Z,N=o$1p.cross(F,B,Ka$5);h=o$1m.fromPointNormal(I,F,tr$9);var G=o$1p.fromRadians(D+e$2d.PI_OVER_TWO,O,i,n,Qa$5);o=-(a=o$1p.dot(o$1m.projectPointOntoPlane(h,G,$a$5),N)),l=o$1p.fromRadians(0,e.north,R?t:i,n,Ha$3).z,s=o$1p.fromRadians(0,e.south,M?t:i,n,ar$8).z;var z=o$1p.fromRadians(e.east,O,i,n,rr$a);return ua$4(I,N,B,F,o,a,s,l,u=o$1m.getPointDistance(h,z),c=0,r)},y$Y.clone=function(e,t){if(e$2e(e))return e$2e(t)?(o$1p.clone(e.center,t.center),p$1e.clone(e.halfAxes,t.halfAxes),t.areaDirty=1,t):new y$Y(e.center,e.halfAxes)},y$Y.intersectPlane=function(e,t){if(!e$2e(e))throw new t$15("box is required.");if(!e$2e(t))throw new t$15("plane is required.");var i=e.center,n=t.normal,r=e.halfAxes,o=n.x,a=n.y,s=n.z,l=Math.abs(o*r[p$1e.COLUMN0ROW0]+a*r[p$1e.COLUMN0ROW1]+s*r[p$1e.COLUMN0ROW2])+Math.abs(o*r[p$1e.COLUMN1ROW0]+a*r[p$1e.COLUMN1ROW1]+s*r[p$1e.COLUMN1ROW2])+Math.abs(o*r[p$1e.COLUMN2ROW0]+a*r[p$1e.COLUMN2ROW1]+s*r[p$1e.COLUMN2ROW2]),u=o$1p.dot(n,i)+t.distance;return u<=-l?Ae$w.OUTSIDE:u>=l?Ae$w.INSIDE:Ae$w.INTERSECTING};var ra$6=new o$1p,ta$4=new o$1p,ea$6=new o$1p,er$b=new o$1p,nr$a=new o$1p;y$Y.distanceSquaredTo=function(e,t){if(!e$2e(e))throw new t$15("box is required.");if(!e$2e(t))throw new t$15("cartesian is required.");var i=o$1p.subtract(t,e.center,va$2),n=e.halfAxes,r=p$1e.getColumn(n,0,ra$6),o=p$1e.getColumn(n,1,ta$4),a=p$1e.getColumn(n,2,ea$6),s=o$1p.magnitude(r),l=o$1p.magnitude(o),u=o$1p.magnitude(a);o$1p.normalize(r,r),o$1p.normalize(o,o),o$1p.normalize(a,a);var c=er$b;c.x=o$1p.dot(i,r),c.y=o$1p.dot(i,o),c.z=o$1p.dot(i,a);var h,d=0;return c.x<-s?d+=(h=c.x+s)*h:c.x>s&&(d+=(h=c.x-s)*h),c.y<-l?d+=(h=c.y+l)*h:c.y>l&&(d+=(h=c.y-l)*h),c.z<-u?d+=(h=c.z+u)*h:c.z>u&&(d+=(h=c.z-u)*h),d};var la$4=new o$1p,or$7=new o$1p;y$Y.computePlaneDistances=function(e,t,i,n){if(!e$2e(e))throw new t$15("box is required.");if(!e$2e(t))throw new t$15("position is required.");if(!e$2e(i))throw new t$15("direction is required.");e$2e(n)||(n=new o$1n);var r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=e.center,s=e.halfAxes,l=p$1e.getColumn(s,0,ra$6),u=p$1e.getColumn(s,1,ta$4),c=p$1e.getColumn(s,2,ea$6),h=o$1p.add(l,u,la$4);o$1p.add(h,c,h),o$1p.add(h,a,h);var d=o$1p.subtract(h,t,or$7),f=o$1p.dot(i,d);return r=Math.min(f,r),o=Math.max(f,o),o$1p.add(a,l,h),o$1p.add(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.add(a,l,h),o$1p.subtract(h,u,h),o$1p.add(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.add(a,l,h),o$1p.subtract(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.add(h,u,h),o$1p.add(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.add(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.subtract(h,u,h),o$1p.add(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.subtract(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),n.start=r,n.stop=o,n};var sr$8=new i$1d;y$Y.isOccluded=function(e,t){if(!e$2e(e))throw new t$15("box is required.");if(!e$2e(t))throw new t$15("occluder is required.");var i=i$1d.fromOrientedBoundingBox(e,sr$8);return!t.isBoundingSphereVisible(i)},y$Y.prototype.intersectPlane=function(e){return y$Y.intersectPlane(this,e)},y$Y.prototype.distanceSquaredTo=function(e){return y$Y.distanceSquaredTo(this,e)},y$Y.prototype.computePlaneDistances=function(e,t,i){return y$Y.computePlaneDistances(this,e,t,i)},y$Y.prototype.isOccluded=function(e){return y$Y.isOccluded(this,e)},y$Y.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&o$1p.equals(e.center,t.center)&&p$1e.equals(e.halfAxes,t.halfAxes)},y$Y.prototype.clone=function(e){return y$Y.clone(this,e)},y$Y.prototype.equals=function(e){return y$Y.equals(this,e)};var pa$3=new e$2c;y$Y.prototype._updateBBox=function(){if(1==this.areaDirty){var e=p$1e.getColumn(this.halfAxes,0,ra$6),t=o$1p.clone(o$1p.negate(e,k$11)),i=p$1e.getColumn(this.halfAxes,1,ta$4),n=o$1p.clone(o$1p.negate(i,k$11)),r=p$1e.getColumn(this.halfAxes,2,ea$6),o=o$1p.clone(o$1p.negate(r,k$11));this.bbox=[],o$1p.add(this.center,i,k$11),o$1p.add(k$11,o,E$1i),o$1p.add(E$1i,t,p$15),this.bbox[0]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1i,e,p$15),this.bbox[1]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(k$11,r,E$1i),o$1p.add(E$1i,e,p$15),this.bbox[2]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1i,t,p$15),this.bbox[3]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(this.center,n,k$11),o$1p.add(k$11,o,E$1i),o$1p.add(E$1i,t,p$15),this.bbox[4]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1i,e,p$15),this.bbox[5]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(k$11,r,E$1i),o$1p.add(E$1i,e,p$15),this.bbox[6]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1i,t,p$15),this.bbox[7]=new o$1p(p$15.x,p$15.y,p$15.z);var a=o$1p.magnitude(e),s=o$1p.magnitude(i),l=o$1p.magnitude(r),u=new o$1p(-a,-s,-l),c=new o$1p(a,s,l);if(a*s*l==0)return void(this.areaDirty=-1);o$1p.normalize(e,e),o$1p.normalize(i,i),o$1p.normalize(r,r),this.u=o$1p.clone(e),this.v=o$1p.clone(i),this.w=o$1p.clone(r),this.posMin=u,this.posMaX=c,this.areaDirty=0}};var j$1d=[];j$1d.push(new o$1o),j$1d.push(new o$1o),j$1d.push(new o$1o),j$1d.push(new o$1o),j$1d.push(new o$1o),j$1d.push(new o$1o);var cr$6=new a$18,J$11=new o$1p;y$Y.prototype.calculateBoxArea=function(e,t,i,n,r,o,a,s){this._updateBBox();var l=e,u=o$1p.subtract(l,this.center,nr$a);if(-1==this.areaDirty){var c=r/n*($=-1!=o?o:.5*o$1p.distance(this.posMaX,this.posMin))/i;return e$2d.PI*c*c}var h=o$1p.fromElements(o$1p.dot(u,this.u),o$1p.dot(u,this.v),o$1p.dot(u,this.w),la$4),d=(h.x<this.posMin.x?1:0)+((h.x>this.posMaX.x?1:0)<<1)+((h.z<this.posMin.z?1:0)<<2)+((h.z>this.posMaX.z?1:0)<<3)+((h.y>this.posMaX.y?1:0)<<4)+((h.y<this.posMin.y?1:0)<<5);if(d>42)return console.log("area calculation is wrong"),-100;var f=v$U[d];if(0==f.num){c=r/n*($=-1!=o?o:.5*o$1p.distance(this.posMaX,this.posMin))/i;return e$2d.PI*c*c}if(0==f.num)return console.log("area calculation is wrong"),-100;for(var p,_=[],m=a,g=0;g<f.num;g++){var x=j$1d[g],y=this.bbox[f.data[g]];p=!1;var v,$,b=e$2d.PI;if(3===t)(v=p$1d.multiplyByVector(m,e$2c.fromElements(y.x,y.y,y.z,1),pa$3)).z<0&&(p=!0,-1==$&&(b=e$2d.PI_OVER_FOUR,i=o$1p.magnitude(u)));else{var T=s,C=T.ellipsoid.cartesianToCartographic(y,cr$6);e$2e(C)?(T.project(C,J$11),(v=p$1d.multiplyByVector(m,e$2c.fromElements(J$11.z,J$11.x,J$11.y,1),pa$3)).z<0&&(p=!0)):p=!0}if(1==p)return b*(c=r/n*($=-1!=o?o:.5*o$1p.distance(this.posMaX,this.posMin))/i)*c;x.x=v.x/v.w,x.y=r-v.y/v.w,_.push(x)}return Math.abs(A$1f.computeArea2D(_))};var s$X=new o$1p(1,1,1),u$T=o$1p.ZERO,f$13=n$15.IDENTITY,e$1_=function(e,t,i){this.translation=o$1p.clone(u$Z(e,u$T)),this.rotation=n$15.clone(u$Z(t,f$13)),this.scale=o$1p.clone(u$Z(i,s$X))};e$1_.prototype.equals=function(e){return this===e||e$2e(e)&&o$1p.equals(this.translation,e.translation)&&n$15.equals(this.rotation,e.rotation)&&o$1p.equals(this.scale,e.scale)};var _0x352b38=(_0x31e5a5=!0,function(e,t){var i=_0x31e5a5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31e5a5=!1,i}),_0x1aa701=_0x352b38(void 0,(function(){return _0x1aa701.toString().search("(((.+)+)+)+$").toString().constructor(_0x1aa701).search("(((.+)+)+)+$")})),_0x31e5a5;function _0x50f23a(){}_0x1aa701(),_0x50f23a._CheckLimit=function(e,t){var i=_0x50f23a._LogLimitOutputs[e];return i?i.current++:(i={limit:t,current:1},_0x50f23a._LogLimitOutputs[e]=i),i.current<=i.limit},_0x50f23a._GenerateLimitMessage=function(e,t){var i=_0x50f23a._LogLimitOutputs[e];if(i&&_0x50f23a.MessageLimitReached&&i.current===i.limit)switch(t){case 0:_0x50f23a.Log(_0x50f23a.MessageLimitReached.replace(/%LIMIT%/g,""+i.limit).replace(/%TYPE%/g,"log"));break;case 1:_0x50f23a.Warn(_0x50f23a.MessageLimitReached.replace(/%LIMIT%/g,""+i.limit).replace(/%TYPE%/g,"warning"));break;case 2:_0x50f23a.Error(_0x50f23a.MessageLimitReached.replace(/%LIMIT%/g,""+i.limit).replace(/%TYPE%/g,"error"))}},_0x50f23a._AddLogEntry=function(e){_0x50f23a._LogCache=e+_0x50f23a._LogCache,_0x50f23a.OnNewCacheEntry&&_0x50f23a.OnNewCacheEntry(e)},_0x50f23a._FormatMessage=function(e){var t=function(e){return e<10?"0"+e:""+e},i=new Date;return"["+t(i.getHours())+":"+t(i.getMinutes())+":"+t(i.getSeconds())+"]: "+e},_0x50f23a._LogDisabled=function(e,t){},_0x50f23a._LogEnabled=function(e,t){if(void 0===t||_0x50f23a._CheckLimit(e,t)){var i=_0x50f23a._FormatMessage(e);console.log("BJS - "+i);var n="<div style='color:white'>"+i+"</div><br>";_0x50f23a._AddLogEntry(n),_0x50f23a._GenerateLimitMessage(e,0)}},_0x50f23a._WarnDisabled=function(e,t){},_0x50f23a._WarnEnabled=function(e,t){if(void 0===t||_0x50f23a._CheckLimit(e,t)){var i=_0x50f23a._FormatMessage(e);console.warn("BJS - "+i);var n="<div style='color:orange'>"+e+"</div><br>";_0x50f23a._AddLogEntry(n),_0x50f23a._GenerateLimitMessage(e,1)}},_0x50f23a._ErrorDisabled=function(e,t){},_0x50f23a._ErrorEnabled=function(e,t){if(void 0===t||_0x50f23a._CheckLimit(e,t)){var i=_0x50f23a._FormatMessage(e);_0x50f23a.errorsCount++,console.error("BJS - "+i);var n="<div style='color:red'>"+i+"</div><br>";_0x50f23a._AddLogEntry(n),_0x50f23a._GenerateLimitMessage(e,2)}},Object.defineProperty(_0x50f23a,"LogCache",{get:function(){return _0x50f23a._LogCache},enumerable:!1,configurable:!0}),_0x50f23a.ClearLogCache=function(){_0x50f23a._LogCache="",_0x50f23a._LogLimitOutputs={},_0x50f23a.errorsCount=0},Object.defineProperty(_0x50f23a,"LogLevels",{set:function(e){(e&_0x50f23a.MessageLogLevel)===_0x50f23a.MessageLogLevel?_0x50f23a.Log=_0x50f23a._LogEnabled:_0x50f23a.Log=_0x50f23a._LogDisabled,(e&_0x50f23a.WarningLogLevel)===_0x50f23a.WarningLogLevel?_0x50f23a.Warn=_0x50f23a._WarnEnabled:_0x50f23a.Warn=_0x50f23a._WarnDisabled,(e&_0x50f23a.ErrorLogLevel)===_0x50f23a.ErrorLogLevel?_0x50f23a.Error=_0x50f23a._ErrorEnabled:_0x50f23a.Error=_0x50f23a._ErrorDisabled},enumerable:!1,configurable:!0}),_0x50f23a.NoneLogLevel=0,_0x50f23a.MessageLogLevel=1,_0x50f23a.WarningLogLevel=2,_0x50f23a.ErrorLogLevel=4,_0x50f23a.AllLogLevel=7,_0x50f23a.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",_0x50f23a._LogCache="",_0x50f23a._LogLimitOutputs={},_0x50f23a.errorsCount=0,_0x50f23a.Log=_0x50f23a._LogEnabled,_0x50f23a.Warn=_0x50f23a._WarnEnabled,_0x50f23a.Error=_0x50f23a._ErrorEnabled;var _0x42d20b=(_0x12cada=!0,function(e,t){var i=_0x12cada?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12cada=!1,i}),_0xa3286e=_0x42d20b(void 0,(function(){return _0xa3286e.toString().search("(((.+)+)+)+$").toString().constructor(_0xa3286e).search("(((.+)+)+)+$")})),_0x12cada;function _0xd79dde(){}_0xa3286e(),Object.defineProperty(_0xd79dde,"BaseUrl",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.BaseUrl},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.BaseUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xd79dde,"DefaultRetryStrategy",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.DefaultRetryStrategy},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.DefaultRetryStrategy=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xd79dde,"CorsBehavior",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.CorsBehavior},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.CorsBehavior=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xd79dde,"UseFallbackTexture",{get:function(){return _Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.UseFallbackTexture},set:function(e){_Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.UseFallbackTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xd79dde,"RegisteredExternalClasses",{get:function(){return _instantiationTools__WEBPACK_IMPORTED_MODULE_11__.InstantiationTools.RegisteredExternalClasses},set:function(e){_instantiationTools__WEBPACK_IMPORTED_MODULE_11__.InstantiationTools.RegisteredExternalClasses=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xd79dde,"fallbackTexture",{get:function(){return _Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.FallbackTexture},set:function(e){_Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.FallbackTexture=e},enumerable:!1,configurable:!0}),_0xd79dde.FetchToRef=function(e,t,i,n,r,o){var a=4*((Math.abs(e)*i%i|0)+(Math.abs(t)*n%n|0)*i);o.r=r[a]/255,o.g=r[a+1]/255,o.b=r[a+2]/255,o.a=r[a+3]/255},_0xd79dde.Mix=function(e,t,i){return e*(1-i)+t*i},_0xd79dde.Instantiate=function(e){return _instantiationTools__WEBPACK_IMPORTED_MODULE_11__.InstantiationTools.Instantiate(e)},_0xd79dde.SetImmediate=function(e){_timingTools__WEBPACK_IMPORTED_MODULE_10__.TimingTools.SetImmediate(e)},_0xd79dde.IsExponentOfTwo=function(e){var t=1;do{t*=2}while(t<e);return t===e},_0xd79dde.FloatRound=function(e){return Math.fround?Math.fround(e):(_0xd79dde._TmpFloatArray[0]=e,_0xd79dde._TmpFloatArray[0])},_0xd79dde.GetFilename=function(e){var t=e.lastIndexOf("/");return t<0?e:e.substring(t+1)},_0xd79dde.GetFolderPath=function(e,t){void 0===t&&(t=!1);var i=e.lastIndexOf("/");return i<0?t?e:"":e.substring(0,i+1)},_0xd79dde.ToDegrees=function(e){return 180*e/Math.PI},_0xd79dde.ToRadians=function(e){return e*Math.PI/180},_0xd79dde.MakeArray=function(e,t){return!0===t||void 0!==e&&null!=e?Array.isArray(e)?e:[e]:null},_0xd79dde.GetPointerPrefix=function(e){var t="pointer";return(0,_domManagement__WEBPACK_IMPORTED_MODULE_2__.IsWindowObjectExist)()&&!window.PointerEvent&&(t="mouse"),e._badDesktopOS&&!e._badOS&&!(document&&"ontouchend"in document)&&(t="mouse"),t},_0xd79dde.SetCorsBehavior=function(e,t){t.crossOrigin="anonymous"},_0xd79dde.CleanUrl=function(e){return e=e.replace(/#/gm,"%23")},Object.defineProperty(_0xd79dde,"PreprocessUrl",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.PreprocessUrl},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.PreprocessUrl=e},enumerable:!1,configurable:!0}),_0xd79dde.LoadImage=function(e,t,i,n,r,o){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.LoadImage)(e,t,i,n,r,o)},_0xd79dde.LoadFile=function(e,t,i,n,r,o){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.LoadFile)(e,t,i,n,r,o)},_0xd79dde.LoadFileAsync=function(e,t){return void 0===t&&(t=!0),new Promise((function(i,n){(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.LoadFile)(e,(function(e){i(e)}),void 0,void 0,t,(function(e,t){n(t)}))}))},_0xd79dde.LoadScript=function(e,t,i,n){if("undefined"!=typeof window){var r=document.getElementsByTagName("head")[0],o=document.createElement("script");o.setAttribute("type","text/javascript"),o.setAttribute("src",e),n&&(o.id=n),o.onload=function(){t&&t()},o.onerror=function(t){i&&i("Unable to load script '".concat(e,"'"),t)},r.appendChild(o)}},_0xd79dde.LoadScriptAsync=function(e){var t=this;return new Promise((function(i,n){t.LoadScript(e,(function(){i()}),(function(e,t){n(t)}))}))},_0xd79dde.ReadFileAsDataURL=function(e,t,i){var n=new FileReader,r={onCompleteObservable:new _observable__WEBPACK_IMPORTED_MODULE_1__.Observable,abort:function(){return n.abort()}};return n.onloadend=function(){r.onCompleteObservable.notifyObservers(r)},n.onload=function(e){t(e.target.result)},n.onprogress=i,n.readAsDataURL(e),r},_0xd79dde.ReadFile=function(e,t,i,n,r){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.ReadFile)(e,t,i,n,r)},_0xd79dde.FileAsURL=function(e){var t=new Blob([e]);return(window.URL||window.webkitURL).createObjectURL(t)},_0xd79dde.Format=function(e,t){return void 0===t&&(t=2),e.toFixed(t)},_0xd79dde.DeepCopy=function(e,t,i,n){_deepCopier__WEBPACK_IMPORTED_MODULE_4__.DeepCopier.DeepCopy(e,t,i,n)},_0xd79dde.IsEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},_0xd79dde.RegisterTopRootEvents=function(e,t){for(var i=0;i<t.length;i++){var n=t[i];e.addEventListener(n.name,n.handler,!1);try{window.parent&&window.parent.addEventListener(n.name,n.handler,!1)}catch(e){}}},_0xd79dde.UnregisterTopRootEvents=function(e,t){for(var i=0;i<t.length;i++){var n=t[i];e.removeEventListener(n.name,n.handler);try{e.parent&&e.parent.removeEventListener(n.name,n.handler)}catch(e){}}},_0xd79dde.DumpFramebuffer=function(e,t,i,n,r,o){return void 0===r&&(r="image/png"),(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this,void 0,void 0,(function(){var a,s;return(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this,(function(l){switch(l.label){case 0:return[4,i.readPixels(0,0,e,t)];case 1:return a=l.sent(),s=new Uint8Array(a.buffer),_0xd79dde.DumpData(e,t,s,n,r,o,!0),[2]}}))}))},_0xd79dde.DumpData=function(e,t,i,n,r,o,a,s,l){void 0===r&&(r="image/png"),void 0===a&&(a=!1),void 0===s&&(s=!1),!_0xd79dde._ScreenshotCanvas&&(_0xd79dde._ScreenshotCanvas=document.createElement("canvas")),_0xd79dde._ScreenshotCanvas.width=e,_0xd79dde._ScreenshotCanvas.height=t;var u=_0xd79dde._ScreenshotCanvas.getContext("2d");if(u){if(i instanceof Float32Array){for(var c=new Uint8Array(i.length),h=i.length;h--;){var d=i[h];c[h]=d<0?0:d>1?1:Math.round(255*d)}i=c}var f=u.createImageData(e,t);f.data.set(i),u.putImageData(f,0,0);var p=_0xd79dde._ScreenshotCanvas;if(a){var _=document.createElement("canvas");_.width=e,_.height=t;var m=_.getContext("2d");if(!m)return;m.translate(0,t),m.scale(1,-1),m.drawImage(_0xd79dde._ScreenshotCanvas,0,0),p=_}s?_0xd79dde.ToBlob(p,(function(e){var t=new FileReader;t.onload=function(e){var t=e.target.result;n&&n(t)},t.readAsArrayBuffer(e)}),r,l):_0xd79dde.EncodeScreenshotCanvasData(n,r,o,p,l)}},_0xd79dde.DumpDataAsync=function(e,t,i,n,r,o,a,s){return void 0===n&&(n="image/png"),void 0===o&&(o=!1),void 0===a&&(a=!1),new Promise((function(l){_0xd79dde.DumpData(e,t,i,(function(e){return l(e)}),n,r,o,a,s)}))},_0xd79dde.ToBlob=function(e,t,i,n){void 0===i&&(i="image/png"),!e.toBlob&&(e.toBlob=function(e,t,i){var n=this;setTimeout((function(){for(var r=atob(n.toDataURL(t,i).split(",")[1]),o=r.length,a=new Uint8Array(o),s=0;s<o;s++)a[s]=r.charCodeAt(s);e(new Blob([a]))}))}),e.toBlob((function(e){t(e)}),i,n)},_0xd79dde.EncodeScreenshotCanvasData=function(e,t,i,n,r){(void 0===t&&(t="image/png"),e)?e((null!=n?n:_0xd79dde._ScreenshotCanvas).toDataURL(t,r)):this.ToBlob(null!=n?n:_0xd79dde._ScreenshotCanvas,(function(e){if("download"in document.createElement("a")){if(!i){var t=new Date,n=(t.getFullYear()+"-"+(t.getMonth()+1)).slice(2)+"-"+t.getDate()+"_"+t.getHours()+"-"+("0"+t.getMinutes()).slice(-2);i="screenshot_"+n+".png"}_0xd79dde.Download(e,i)}else if(e){var r=URL.createObjectURL(e),o=window.open("");if(!o)return;var a=o.document.createElement("img");a.onload=function(){URL.revokeObjectURL(r)},a.src=r,o.document.body.appendChild(a)}}),t,r)},_0xd79dde.Download=function(e,t){if(navigator&&navigator.msSaveBlob)navigator.msSaveBlob(e,t);else{var i=window.URL.createObjectURL(e),n=document.createElement("a");document.body.appendChild(n),n.style.display="none",n.href=i,n.download=t,n.addEventListener("click",(function(){n.parentElement&&n.parentElement.removeChild(n)})),n.click(),window.URL.revokeObjectURL(i)}},_0xd79dde.BackCompatCameraNoPreventDefault=function(e){return"boolean"==typeof e[0]?e[0]:"boolean"==typeof e[1]&&e[1]},_0xd79dde.CreateScreenshot=function(e,t,i,n,r){throw(0,_devTools__WEBPACK_IMPORTED_MODULE_6__._WarnImport)("ScreenshotTools")},_0xd79dde.CreateScreenshotAsync=function(e,t,i,n){throw(0,_devTools__WEBPACK_IMPORTED_MODULE_6__._WarnImport)("ScreenshotTools")},_0xd79dde.CreateScreenshotUsingRenderTarget=function(e,t,i,n,r,o,a,s){throw(0,_devTools__WEBPACK_IMPORTED_MODULE_6__._WarnImport)("ScreenshotTools")},_0xd79dde.CreateScreenshotUsingRenderTargetAsync=function(e,t,i,n,r,o,a){throw(0,_devTools__WEBPACK_IMPORTED_MODULE_6__._WarnImport)("ScreenshotTools")},_0xd79dde.RandomId=function(){return(0,_guid__WEBPACK_IMPORTED_MODULE_12__.RandomGUID)()},_0xd79dde.IsBase64=function(e){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.IsBase64DataUrl)(e)},_0xd79dde.DecodeBase64=function(e){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.DecodeBase64UrlToBinary)(e)},Object.defineProperty(_0xd79dde,"errorsCount",{get:function(){return _logger__WEBPACK_IMPORTED_MODULE_3__.Logger.errorsCount},enumerable:!1,configurable:!0}),_0xd79dde.Log=function(e){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.Log(e)},_0xd79dde.Warn=function(e){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.Warn(e)},_0xd79dde.Error=function(e){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.Error(e)},Object.defineProperty(_0xd79dde,"LogCache",{get:function(){return _logger__WEBPACK_IMPORTED_MODULE_3__.Logger.LogCache},enumerable:!1,configurable:!0}),_0xd79dde.ClearLogCache=function(){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.ClearLogCache()},Object.defineProperty(_0xd79dde,"LogLevels",{set:function(e){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.LogLevels=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xd79dde,"PerformanceLogLevel",{set:function(e){return(e&_0xd79dde.PerformanceUserMarkLogLevel)===_0xd79dde.PerformanceUserMarkLogLevel?(_0xd79dde.StartPerformanceCounter=_0xd79dde._StartUserMark,void(_0xd79dde.EndPerformanceCounter=_0xd79dde._EndUserMark)):(e&_0xd79dde.PerformanceConsoleLogLevel)===_0xd79dde.PerformanceConsoleLogLevel?(_0xd79dde.StartPerformanceCounter=_0xd79dde._StartPerformanceConsole,void(_0xd79dde.EndPerformanceCounter=_0xd79dde._EndPerformanceConsole)):(_0xd79dde.StartPerformanceCounter=_0xd79dde._StartPerformanceCounterDisabled,void(_0xd79dde.EndPerformanceCounter=_0xd79dde._EndPerformanceCounterDisabled))},enumerable:!1,configurable:!0}),_0xd79dde._StartPerformanceCounterDisabled=function(e,t){},_0xd79dde._EndPerformanceCounterDisabled=function(e,t){},_0xd79dde._StartUserMark=function(e,t){if(void 0===t&&(t=!0),!_0xd79dde._Performance){if(!(0,_domManagement__WEBPACK_IMPORTED_MODULE_2__.IsWindowObjectExist)())return;_0xd79dde._Performance=window.performance}t&&_0xd79dde._Performance.mark&&_0xd79dde._Performance.mark(e+"-Begin")},_0xd79dde._EndUserMark=function(e,t){void 0===t&&(t=!0),t&&_0xd79dde._Performance.mark&&(_0xd79dde._Performance.mark(e+"-End"),_0xd79dde._Performance.measure(e,e+"-Begin",e+"-End"))},_0xd79dde._StartPerformanceConsole=function(e,t){void 0===t&&(t=!0),t&&(_0xd79dde._StartUserMark(e,t),console.time&&console.time(e))},_0xd79dde._EndPerformanceConsole=function(e,t){void 0===t&&(t=!0),t&&(_0xd79dde._EndUserMark(e,t),console.timeEnd(e))},Object.defineProperty(_0xd79dde,"Now",{get:function(){return _precisionDate__WEBPACK_IMPORTED_MODULE_5__.PrecisionDate.Now},enumerable:!1,configurable:!0}),_0xd79dde.GetClassName=function(e,t){void 0===t&&(t=!1);var i=null;if(!t&&e.getClassName)i=e.getClassName();else{if(e instanceof Object)i=(t?e:Object.getPrototypeOf(e)).constructor.__bjsclassName__;!i&&(i=typeof e)}return i},_0xd79dde.First=function(e,t){for(var i=0,n=e;i<n.length;i++){var r=n[i];if(t(r))return r}return null},_0xd79dde.getFullClassName=function(e,t){void 0===t&&(t=!1);var i=null,n=null;if(!t&&e.getClassName)i=e.getClassName();else{if(e instanceof Object){var r=t?e:Object.getPrototypeOf(e);i=r.constructor.__bjsclassName__,n=r.constructor.__bjsmoduleName__}!i&&(i=typeof e)}return i?(null!=n?n+".":"")+i:null},_0xd79dde.DelayAsync=function(e){return new Promise((function(t){setTimeout((function(){t()}),e)}))},_0xd79dde.IsSafari=function(){return!!(0,_domManagement__WEBPACK_IMPORTED_MODULE_2__.IsNavigatorAvailable)()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)};var _0xb120bc=(_0x409188=!0,function(e,t){var i=_0x409188?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x409188=!1,i}),_0x245335=_0xb120bc(void 0,(function(){return _0x245335.toString().search("(((.+)+)+)+$").toString().constructor(_0x245335).search("(((.+)+)+)+$")})),_0x409188;function _0x5c4ccd(e,t,i,n,r,o){void 0===r&&(r=!1),this._valueCache={},this._engine=e,this._noUBO=!e.supportsUniformBuffers||r,this._dynamic=i,this._name=null!=n?n:"no-name",this._data=t||[],this._uniformLocations={},this._uniformSizes={},this._uniformArraySizes={},this._uniformLocationPointer=0,this._needSync=!1,this._trackUbosInFrame=null!=o?o:this._engine._features.trackUbosInFrame,this._trackUbosInFrame&&(this._buffers=[],this._bufferIndex=-1,this._createBufferOnWrite=!1,this._currentFrameId=0),this._noUBO?(this.updateMatrix3x3=this._updateMatrix3x3ForEffect,this.updateMatrix2x2=this._updateMatrix2x2ForEffect,this.updateFloat=this._updateFloatForEffect,this.updateFloat2=this._updateFloat2ForEffect,this.updateFloat3=this._updateFloat3ForEffect,this.updateFloat4=this._updateFloat4ForEffect,this.updateFloatArray=this._updateFloatArrayForEffect,this.updateArray=this._updateArrayForEffect,this.updateIntArray=this._updateIntArrayForEffect,this.updateMatrix=this._updateMatrixForEffect,this.updateMatrices=this._updateMatricesForEffect,this.updateVector3=this._updateVector3ForEffect,this.updateVector4=this._updateVector4ForEffect,this.updateColor3=this._updateColor3ForEffect,this.updateColor4=this._updateColor4ForEffect,this.updateDirectColor4=this._updateDirectColor4ForEffect,this.updateInt=this._updateIntForEffect,this.updateInt2=this._updateInt2ForEffect,this.updateInt3=this._updateInt3ForEffect,this.updateInt4=this._updateInt4ForEffect):(this._engine._uniformBuffers.push(this),this.updateMatrix3x3=this._updateMatrix3x3ForUniform,this.updateMatrix2x2=this._updateMatrix2x2ForUniform,this.updateFloat=this._updateFloatForUniform,this.updateFloat2=this._updateFloat2ForUniform,this.updateFloat3=this._updateFloat3ForUniform,this.updateFloat4=this._updateFloat4ForUniform,this.updateFloatArray=this._updateFloatArrayForUniform,this.updateArray=this._updateArrayForUniform,this.updateIntArray=this._updateIntArrayForUniform,this.updateMatrix=this._updateMatrixForUniform,this.updateMatrices=this._updateMatricesForUniform,this.updateVector3=this._updateVector3ForUniform,this.updateVector4=this._updateVector4ForUniform,this.updateColor3=this._updateColor3ForUniform,this.updateColor4=this._updateColor4ForUniform,this.updateDirectColor4=this._updateDirectColor4ForUniform,this.updateInt=this._updateIntForUniform,this.updateInt2=this._updateInt2ForUniform,this.updateInt3=this._updateInt3ForUniform,this.updateInt4=this._updateInt4ForUniform)}_0x245335(),Object.defineProperty(_0x5c4ccd.prototype,"useUbo",{get:function(){return!this._noUBO},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5c4ccd.prototype,"isSync",{get:function(){return!this._needSync},enumerable:!1,configurable:!0}),_0x5c4ccd.prototype.isDynamic=function(){return void 0!==this._dynamic},_0x5c4ccd.prototype.getData=function(){return this._bufferData},_0x5c4ccd.prototype.getBuffer=function(){return this._buffer},_0x5c4ccd.prototype._fillAlignment=function(e){var t;if(t=e<=2?e:4,this._uniformLocationPointer%t!=0){var i=this._uniformLocationPointer;this._uniformLocationPointer+=t-this._uniformLocationPointer%t;for(var n=this._uniformLocationPointer-i,r=0;r<n;r++)this._data.push(0)}},_0x5c4ccd.prototype.addUniform=function(e,t,i){if(void 0===i&&(i=0),!this._noUBO&&void 0===this._uniformLocations[e]){var n;if(i>0){if(t instanceof Array)throw"addUniform should not be use with Array in UBO: "+e;if(this._fillAlignment(4),this._uniformArraySizes[e]={strideSize:t,arraySize:i},16==t)t*=i;else t=t*i+(4-t)*i;n=[];for(var r=0;r<t;r++)n.push(0)}else{if(t instanceof Array)t=(n=t).length;else{t=t,n=[];for(r=0;r<t;r++)n.push(0)}this._fillAlignment(t)}this._uniformSizes[e]=t,this._uniformLocations[e]=this._uniformLocationPointer,this._uniformLocationPointer+=t;for(r=0;r<t;r++)this._data.push(n[r]);this._needSync=!0}},_0x5c4ccd.prototype.addMatrix=function(e,t){this.addUniform(e,Array.prototype.slice.call(t.toArray()))},_0x5c4ccd.prototype.addFloat2=function(e,t,i){var n=[t,i];this.addUniform(e,n)},_0x5c4ccd.prototype.addFloat3=function(e,t,i,n){var r=[t,i,n];this.addUniform(e,r)},_0x5c4ccd.prototype.addColor3=function(e,t){var i=[t.r,t.g,t.b];this.addUniform(e,i)},_0x5c4ccd.prototype.addColor4=function(e,t,i){var n=[t.r,t.g,t.b,i];this.addUniform(e,n)},_0x5c4ccd.prototype.addVector3=function(e,t){var i=[t.x,t.y,t.z];this.addUniform(e,i)},_0x5c4ccd.prototype.addMatrix3x3=function(e){this.addUniform(e,12)},_0x5c4ccd.prototype.addMatrix2x2=function(e){this.addUniform(e,8)},_0x5c4ccd.prototype.create=function(){this._noUBO||this._buffer||(this._fillAlignment(4),this._bufferData=new Float32Array(this._data),this._rebuild(),this._needSync=!0)},_0x5c4ccd.prototype._rebuild=function(){!this._noUBO&&this._bufferData&&(this._dynamic?this._buffer=this._engine.createDynamicUniformBuffer(this._bufferData):this._buffer=this._engine.createUniformBuffer(this._bufferData),this._trackUbosInFrame&&(this._buffers.push([this._buffer,this._engine._features.checkUbosContentBeforeUpload?this._bufferData.slice():void 0]),this._bufferIndex=this._buffers.length-1,this._createBufferOnWrite=!1))},Object.defineProperty(_0x5c4ccd.prototype,"_numBuffers",{get:function(){return this._buffers.length},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5c4ccd.prototype,"_indexBuffer",{get:function(){return this._bufferIndex},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5c4ccd.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),_0x5c4ccd.prototype._buffersEqual=function(e,t){for(var i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0},_0x5c4ccd.prototype._copyBuffer=function(e,t){for(var i=0;i<e.length;++i)t[i]=e[i]},_0x5c4ccd.prototype.update=function(){if(!this._noUBO)if(this.bindUniformBuffer(),this._buffer)if(this._dynamic||this._needSync){if(this._buffers&&this._buffers.length>1&&this._buffers[this._bufferIndex][1]){if(this._buffersEqual(this._bufferData,this._buffers[this._bufferIndex][1]))return this._needSync=!1,void(this._createBufferOnWrite=this._trackUbosInFrame);this._copyBuffer(this._bufferData,this._buffers[this._bufferIndex][1])}this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._engine._features._collectUbosUpdatedInFrame&&(!_0x5c4ccd._UpdatedUbosInFrame[this._name]&&(_0x5c4ccd._UpdatedUbosInFrame[this._name]=0),_0x5c4ccd._UpdatedUbosInFrame[this._name]++),this._needSync=!1,this._createBufferOnWrite=this._trackUbosInFrame}else this._createBufferOnWrite=this._trackUbosInFrame;else this.create()},_0x5c4ccd.prototype._createNewBuffer=function(){this._bufferIndex+1<this._buffers.length?(this._bufferIndex++,this._buffer=this._buffers[this._bufferIndex][0],this._createBufferOnWrite=!1,this._needSync=!0):this._rebuild()},_0x5c4ccd.prototype._checkNewFrame=function(){this._trackUbosInFrame&&this._currentFrameId!==this._engine.frameId&&(this._currentFrameId=this._engine.frameId,this._createBufferOnWrite=!1,this._buffers&&this._buffers.length>0?(this._needSync=0!==this._bufferIndex,this._bufferIndex=0,this._buffer=this._buffers[this._bufferIndex][0]):this._bufferIndex=-1)},_0x5c4ccd.prototype.updateUniform=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0===n){if(this._buffer)return void _0x50f23a.Error("Cannot add an uniform after UBO has been created.");this.addUniform(e,i),n=this._uniformLocations[e]}if(!this._buffer&&this.create(),this._dynamic)for(o=0;o<i;o++)this._bufferData[n+o]=t[o];else{for(var r=!1,o=0;o<i;o++)(16===i&&!this._engine._features.uniformBufferHardCheckMatrix||this._bufferData[n+o]!==_0xd79dde.FloatRound(t[o]))&&(r=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[n+o]=t[o]);this._needSync=this._needSync||r}},_0x5c4ccd.prototype.updateUniformArray=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0!==n){!this._buffer&&this.create();var r=this._uniformArraySizes[e];if(this._dynamic)for(l=0;l<i;l++)this._bufferData[n+l]=t[l];else{for(var o=!1,a=0,s=0,l=0;l<i;l++)if(this._bufferData[n+4*s+a]!==_0xd79dde.FloatRound(t[l])&&(o=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[n+4*s+a]=t[l]),++a===r.strideSize){for(;a<4;a++)this._bufferData[n+4*s+a]=0;a=0,s++}this._needSync=this._needSync||o}}else _0x50f23a.Error("Cannot add an uniform Array dynamically. Please, add it using addUniform.")},_0x5c4ccd.prototype._cacheMatrix=function(e,t){this._checkNewFrame();var i=this._valueCache[e],n=t.updateFlag;return(void 0===i||i!==n)&&(this._valueCache[e]=n,!0)},_0x5c4ccd.prototype._updateMatrix3x3ForUniform=function(e,t){for(var i=0;i<3;i++)_0x5c4ccd._TempBuffer[4*i]=t[3*i],_0x5c4ccd._TempBuffer[4*i+1]=t[3*i+1],_0x5c4ccd._TempBuffer[4*i+2]=t[3*i+2],_0x5c4ccd._TempBuffer[4*i+3]=0;this.updateUniform(e,_0x5c4ccd._TempBuffer,12)},_0x5c4ccd.prototype._updateMatrix3x3ForEffect=function(e,t){this._currentEffect.setMatrix3x3(e,t)},_0x5c4ccd.prototype._updateMatrix2x2ForEffect=function(e,t){this._currentEffect.setMatrix2x2(e,t)},_0x5c4ccd.prototype._updateMatrix2x2ForUniform=function(e,t){for(var i=0;i<2;i++)_0x5c4ccd._TempBuffer[4*i]=t[2*i],_0x5c4ccd._TempBuffer[4*i+1]=t[2*i+1],_0x5c4ccd._TempBuffer[4*i+2]=0,_0x5c4ccd._TempBuffer[4*i+3]=0;this.updateUniform(e,_0x5c4ccd._TempBuffer,8)},_0x5c4ccd.prototype._updateFloatForEffect=function(e,t){this._currentEffect.setFloat(e,t)},_0x5c4ccd.prototype._updateFloatForUniform=function(e,t){_0x5c4ccd._TempBuffer[0]=t,this.updateUniform(e,_0x5c4ccd._TempBuffer,1)},_0x5c4ccd.prototype._updateFloat2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setFloat2(e+n,t,i)},_0x5c4ccd.prototype._updateFloat2ForUniform=function(e,t,i){_0x5c4ccd._TempBuffer[0]=t,_0x5c4ccd._TempBuffer[1]=i,this.updateUniform(e,_0x5c4ccd._TempBuffer,2)},_0x5c4ccd.prototype._updateFloat3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setFloat3(e+r,t,i,n)},_0x5c4ccd.prototype._updateFloat3ForUniform=function(e,t,i,n){_0x5c4ccd._TempBuffer[0]=t,_0x5c4ccd._TempBuffer[1]=i,_0x5c4ccd._TempBuffer[2]=n,this.updateUniform(e,_0x5c4ccd._TempBuffer,3)},_0x5c4ccd.prototype._updateFloat4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setFloat4(e+o,t,i,n,r)},_0x5c4ccd.prototype._updateFloat4ForUniform=function(e,t,i,n,r){_0x5c4ccd._TempBuffer[0]=t,_0x5c4ccd._TempBuffer[1]=i,_0x5c4ccd._TempBuffer[2]=n,_0x5c4ccd._TempBuffer[3]=r,this.updateUniform(e,_0x5c4ccd._TempBuffer,4)},_0x5c4ccd.prototype._updateFloatArrayForEffect=function(e,t){this._currentEffect.setFloatArray(e,t)},_0x5c4ccd.prototype._updateFloatArrayForUniform=function(e,t){this.updateUniformArray(e,t,t.length)},_0x5c4ccd.prototype._updateArrayForEffect=function(e,t){this._currentEffect.setArray(e,t)},_0x5c4ccd.prototype._updateArrayForUniform=function(e,t){this.updateUniformArray(e,t,t.length)},_0x5c4ccd.prototype._updateIntArrayForEffect=function(e,t){this._currentEffect.setIntArray(e,t)},_0x5c4ccd.prototype._updateIntArrayForUniform=function(e,t){_0x5c4ccd._TempBufferInt32View.set(t),this.updateUniformArray(e,_0x5c4ccd._TempBuffer,t.length)},_0x5c4ccd.prototype._updateMatrixForEffect=function(e,t){this._currentEffect.setMatrix(e,t)},_0x5c4ccd.prototype._updateMatrixForUniform=function(e,t){this._cacheMatrix(e,t)&&this.updateUniform(e,t.toArray(),16)},_0x5c4ccd.prototype._updateMatricesForEffect=function(e,t){this._currentEffect.setMatrices(e,t)},_0x5c4ccd.prototype._updateMatricesForUniform=function(e,t){this.updateUniform(e,t,t.length)},_0x5c4ccd.prototype._updateVector3ForEffect=function(e,t){this._currentEffect.setVector3(e,t)},_0x5c4ccd.prototype._updateVector3ForUniform=function(e,t){_0x5c4ccd._TempBuffer[0]=t.x,_0x5c4ccd._TempBuffer[1]=t.y,_0x5c4ccd._TempBuffer[2]=t.z,this.updateUniform(e,_0x5c4ccd._TempBuffer,3)},_0x5c4ccd.prototype._updateVector4ForEffect=function(e,t){this._currentEffect.setVector4(e,t)},_0x5c4ccd.prototype._updateVector4ForUniform=function(e,t){_0x5c4ccd._TempBuffer[0]=t.x,_0x5c4ccd._TempBuffer[1]=t.y,_0x5c4ccd._TempBuffer[2]=t.z,_0x5c4ccd._TempBuffer[3]=t.w,this.updateUniform(e,_0x5c4ccd._TempBuffer,4)},_0x5c4ccd.prototype._updateColor3ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setColor3(e+i,t)},_0x5c4ccd.prototype._updateColor3ForUniform=function(e,t){_0x5c4ccd._TempBuffer[0]=t.r,_0x5c4ccd._TempBuffer[1]=t.g,_0x5c4ccd._TempBuffer[2]=t.b,this.updateUniform(e,_0x5c4ccd._TempBuffer,3)},_0x5c4ccd.prototype._updateColor4ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setColor4(e+n,t,i)},_0x5c4ccd.prototype._updateDirectColor4ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setDirectColor4(e+i,t)},_0x5c4ccd.prototype._updateColor4ForUniform=function(e,t,i){_0x5c4ccd._TempBuffer[0]=t.r,_0x5c4ccd._TempBuffer[1]=t.g,_0x5c4ccd._TempBuffer[2]=t.b,_0x5c4ccd._TempBuffer[3]=i,this.updateUniform(e,_0x5c4ccd._TempBuffer,4)},_0x5c4ccd.prototype._updateDirectColor4ForUniform=function(e,t){t.red?(_0x5c4ccd._TempBuffer[0]=t.red,_0x5c4ccd._TempBuffer[1]=t.green,_0x5c4ccd._TempBuffer[2]=t.blue,_0x5c4ccd._TempBuffer[3]=t.alpha):(_0x5c4ccd._TempBuffer[0]=t.r,_0x5c4ccd._TempBuffer[1]=t.g,_0x5c4ccd._TempBuffer[2]=t.b,_0x5c4ccd._TempBuffer[3]=t.a),this.updateUniform(e,_0x5c4ccd._TempBuffer,4)},_0x5c4ccd.prototype._updateIntForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setInt(e+i,t)},_0x5c4ccd.prototype._updateIntForUniform=function(e,t){_0x5c4ccd._TempBufferInt32View[0]=t,this.updateUniform(e,_0x5c4ccd._TempBuffer,1)},_0x5c4ccd.prototype._updateInt2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setInt2(e+n,t,i)},_0x5c4ccd.prototype._updateInt2ForUniform=function(e,t,i){_0x5c4ccd._TempBufferInt32View[0]=t,_0x5c4ccd._TempBufferInt32View[1]=i,this.updateUniform(e,_0x5c4ccd._TempBuffer,2)},_0x5c4ccd.prototype._updateInt3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setInt3(e+r,t,i,n)},_0x5c4ccd.prototype._updateInt3ForUniform=function(e,t,i,n){_0x5c4ccd._TempBufferInt32View[0]=t,_0x5c4ccd._TempBufferInt32View[1]=i,_0x5c4ccd._TempBufferInt32View[2]=n,this.updateUniform(e,_0x5c4ccd._TempBuffer,3)},_0x5c4ccd.prototype._updateInt4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setInt4(e+o,t,i,n,r)},_0x5c4ccd.prototype._updateInt4ForUniform=function(e,t,i,n,r){_0x5c4ccd._TempBufferInt32View[0]=t,_0x5c4ccd._TempBufferInt32View[1]=i,_0x5c4ccd._TempBufferInt32View[2]=n,_0x5c4ccd._TempBufferInt32View[3]=r,this.updateUniform(e,_0x5c4ccd._TempBuffer,4)},_0x5c4ccd.prototype.setTexture=function(e,t){this._currentEffect.setTexture(e,t)},_0x5c4ccd.prototype.updateUniformDirectly=function(e,t){this.updateUniform(e,t,t.length),this.update()},_0x5c4ccd.prototype.bindToEffect=function(e,t){this._currentEffect=e,this._currentEffectName=t},_0x5c4ccd.prototype.bindUniformBuffer=function(){!this._noUBO&&this._buffer&&this._currentEffect&&this._currentEffect.bindUniformBuffer(this._buffer,this._currentEffectName)},_0x5c4ccd.prototype.unbindEffect=function(){this._currentEffect=void 0,this._currentEffectName=void 0},_0x5c4ccd.prototype.setDataBuffer=function(e){if(!this._buffers)return this._buffer===e;for(var t=0;t<this._buffers.length;++t){if(this._buffers[t][0]===e)return this._bufferIndex=t,this._buffer=e,this._createBufferOnWrite=!1,this._currentEffect=void 0,!0}return!1},_0x5c4ccd.prototype.dispose=function(){if(!this._noUBO){var e=this._engine._uniformBuffers,t=e.indexOf(this);if(-1!==t&&(e[t]=e[e.length-1],e.pop()),this._trackUbosInFrame&&this._buffers)for(var i=0;i<this._buffers.length;++i){var n=this._buffers[i][0];this._engine._releaseBuffer(n)}else this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)}},_0x5c4ccd._UpdatedUbosInFrame={},_0x5c4ccd._MAX_UNIFORM_SIZE=256,_0x5c4ccd._TempBuffer=new Float32Array(_0x5c4ccd._MAX_UNIFORM_SIZE),_0x5c4ccd._TempBufferInt32View=new Uint32Array(_0x5c4ccd._TempBuffer.buffer);var e$1Z={SCENE:"Scene",LIGHT:"Light",MESH:"Mesh",MATERIAL:"Material",LAYER:"Layer",SHADOW:"Shadow",WaterLayer:"WaterLayer",Polyline:"Polyline",S3MVolume:"S3MVolume"},_0x2e0417=Object.freeze(e$1Z),_0x39f9f1=(_0x5e85d9=!0,function(e,t){var i=_0x5e85d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e85d9=!1,i}),_0xbfe2d8=_0x39f9f1(void 0,(function(){return _0xbfe2d8.toString().search("(((.+)+)+)+$").toString().constructor(_0xbfe2d8).search("(((.+)+)+)+$")})),_0x5e85d9;function _0x404bc2(){}_0xbfe2d8(),_0x404bc2.BuildArray=function(e,t){for(var i=[],n=0;n<e;++n)i.push(t());return i},_0x404bc2.BuildTuple=function(e,t){return _0x404bc2.BuildArray(e,t)};var _0x59e1ec=(_0x426578=!0,function(e,t){var i=_0x426578?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x426578=!1,i}),_0x3a4632=_0x59e1ec(void 0,(function(){return _0x3a4632.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a4632).search("(((.+)+)+)+$")})),_0x426578;function _0x2fa08c(){}_0x3a4632(),_0x2fa08c.SetMatrixPrecision=function(e){if(_0x2fa08c.MatrixTrackPrecisionChange=!1,e&&!_0x2fa08c.MatrixUse64Bits&&_0x2fa08c.MatrixTrackedMatrices)for(var t=0;t<_0x2fa08c.MatrixTrackedMatrices.length;++t){var i=_0x2fa08c.MatrixTrackedMatrices[t],n=i._m;i._m=new Array(16);for(var r=0;r<16;++r)i._m[r]=n[r]}_0x2fa08c.MatrixUse64Bits=e,_0x2fa08c.MatrixCurrentType=_0x2fa08c.MatrixUse64Bits?Array:Float32Array,_0x2fa08c.MatrixTrackedMatrices=null},_0x2fa08c.MatrixUse64Bits=!1,_0x2fa08c.MatrixTrackPrecisionChange=!0,_0x2fa08c.MatrixCurrentType=Float32Array,_0x2fa08c.MatrixTrackedMatrices=[];var _0x305a01=(_0x422df3=!0,function(e,t){var i=_0x422df3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x422df3=!1,i}),_0x2151c3=_0x305a01(void 0,(function(){return _0x2151c3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2151c3).search("(((.+)+)+)+$")})),_0x422df3;_0x2151c3();var _0x1b2557=function(e){return parseInt(e.toString().replace(/\W/g,""))};function Vector2(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.x=e,this.y=t}function Vector3(e,t,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),this._isDirty=!0,this._x=e,this._y=t,this._z=i}function Vector4(e,t,i,n){this.x=e,this.y=t,this.z=i,this.w=n}function Quaternion(e,t,i,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=1),this._isDirty=!0,this._x=e,this._y=t,this._z=i,this._w=n}function Matrix(){this._isIdentity=!1,this._isIdentityDirty=!0,this._isIdentity3x2=!0,this._isIdentity3x2Dirty=!0,this.updateFlag=-1,_0x2fa08c.MatrixTrackPrecisionChange&&_0x2fa08c.MatrixTrackedMatrices.push(this),this._m=new _0x2fa08c.MatrixCurrentType(16),this.markAsUpdated()}function MathTmp(){}function TmpVectors(){}Vector2.prototype.toString=function(){return"{X: ".concat(this.x," Y: ").concat(this.y,"}")},Vector2.prototype.getClassName=function(){return"Vector2"},Vector2.prototype.getHashCode=function(){var e=_0x1b2557(this.x);return e=397*e^_0x1b2557(this.y)},Vector2.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,this},Vector2.prototype.fromArray=function(e,t){return void 0===t&&(t=0),Vector2.FromArrayToRef(e,t,this),this},Vector2.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},Vector2.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this},Vector2.prototype.copyFromFloats=function(e,t){return this.x=e,this.y=t,this},Vector2.prototype.set=function(e,t){return this.copyFromFloats(e,t)},Vector2.prototype.add=function(e){return new Vector2(this.x+e.x,this.y+e.y)},Vector2.prototype.addToRef=function(e,t){return t.x=this.x+e.x,t.y=this.y+e.y,this},Vector2.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this},Vector2.prototype.addVector3=function(e){return new Vector2(this.x+e.x,this.y+e.y)},Vector2.prototype.subtract=function(e){return new Vector2(this.x-e.x,this.y-e.y)},Vector2.prototype.subtractToRef=function(e,t){return t.x=this.x-e.x,t.y=this.y-e.y,this},Vector2.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this},Vector2.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this},Vector2.prototype.multiply=function(e){return new Vector2(this.x*e.x,this.y*e.y)},Vector2.prototype.multiplyToRef=function(e,t){return t.x=this.x*e.x,t.y=this.y*e.y,this},Vector2.prototype.multiplyByFloats=function(e,t){return new Vector2(this.x*e,this.y*t)},Vector2.prototype.divide=function(e){return new Vector2(this.x/e.x,this.y/e.y)},Vector2.prototype.divideToRef=function(e,t){return t.x=this.x/e.x,t.y=this.y/e.y,this},Vector2.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},Vector2.prototype.negate=function(){return new Vector2(-this.x,-this.y)},Vector2.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this},Vector2.prototype.negateToRef=function(e){return e.copyFromFloats(-1*this.x,-1*this.y)},Vector2.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this},Vector2.prototype.scale=function(e){var t=new Vector2(0,0);return this.scaleToRef(e,t),t},Vector2.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,this},Vector2.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,this},Vector2.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y},Vector2.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.x,e.x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.y,e.y,t)},Vector2.prototype.floor=function(){return new Vector2(Math.floor(this.x),Math.floor(this.y))},Vector2.prototype.fract=function(){return new Vector2(this.x-Math.floor(this.x),this.y-Math.floor(this.y))},Vector2.prototype.rotateToRef=function(e,t){var i=Math.cos(e),n=Math.sin(e);return t.x=i*this.x-n*this.y,t.y=n*this.x+i*this.y,this},Vector2.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},Vector2.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y},Vector2.prototype.normalize=function(){return Vector2.NormalizeToRef(this,this),this},Vector2.prototype.clone=function(){return new Vector2(this.x,this.y)},Vector2.Zero=function(){return new Vector2(0,0)},Vector2.One=function(){return new Vector2(1,1)},Vector2.FromArray=function(e,t){return void 0===t&&(t=0),new Vector2(e[t],e[t+1])},Vector2.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1]},Vector2.CatmullRom=function(e,t,i,n,r){var o=r*r,a=r*o;return new Vector2(.5*(2*t.x+(-e.x+i.x)*r+(2*e.x-5*t.x+4*i.x-n.x)*o+(-e.x+3*t.x-3*i.x+n.x)*a),.5*(2*t.y+(-e.y+i.y)*r+(2*e.y-5*t.y+4*i.y-n.y)*o+(-e.y+3*t.y-3*i.y+n.y)*a))},Vector2.Clamp=function(e,t,i){var n=e.x;n=(n=n>i.x?i.x:n)<t.x?t.x:n;var r=e.y;return new Vector2(n,r=(r=r>i.y?i.y:r)<t.y?t.y:r)},Vector2.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o,s=2*a-3*o+1,l=-2*a+3*o,u=a-2*o+r,c=a-o;return new Vector2(e.x*s+i.x*l+t.x*u+n.x*c,e.y*s+i.y*l+t.y*u+n.y*c)},Vector2.Hermite1stDerivative=function(e,t,i,n,r){var o=Vector2.Zero();return this.Hermite1stDerivativeToRef(e,t,i,n,r,o),o},Vector2.Hermite1stDerivativeToRef=function(e,t,i,n,r,o){var a=r*r;o.x=6*(a-r)*e.x+(3*a-4*r+1)*t.x+6*(-a+r)*i.x+(3*a-2*r)*n.x,o.y=6*(a-r)*e.y+(3*a-4*r+1)*t.y+6*(-a+r)*i.y+(3*a-2*r)*n.y},Vector2.Lerp=function(e,t,i){return new Vector2(e.x+(t.x-e.x)*i,e.y+(t.y-e.y)*i)},Vector2.Dot=function(e,t){return e.x*t.x+e.y*t.y},Vector2.Normalize=function(e){var t=Vector2.Zero();return this.NormalizeToRef(e,t),t},Vector2.NormalizeToRef=function(e,t){var i=e.length();0!==i&&(t.x=e.x/i,t.y=e.y/i)},Vector2.Minimize=function(e,t){return new Vector2(e.x<t.x?e.x:t.x,e.y<t.y?e.y:t.y)},Vector2.Maximize=function(e,t){return new Vector2(e.x>t.x?e.x:t.x,e.y>t.y?e.y:t.y)},Vector2.Transform=function(e,t){var i=Vector2.Zero();return Vector2.TransformToRef(e,t,i),i},Vector2.TransformToRef=function(e,t,i){var n=t.m,r=e.x*n[0]+e.y*n[4]+n[12],o=e.x*n[1]+e.y*n[5]+n[13];i.x=r,i.y=o},Vector2.PointInTriangle=function(e,t,i,n){var r=.5*(-i.y*n.x+t.y*(-i.x+n.x)+t.x*(i.y-n.y)+i.x*n.y),o=r<0?-1:1,a=(t.y*n.x-t.x*n.y+(n.y-t.y)*e.x+(t.x-n.x)*e.y)*o,s=(t.x*i.y-t.y*i.x+(t.y-i.y)*e.x+(i.x-t.x)*e.y)*o;return a>0&&s>0&&a+s<2*r*o},Vector2.Distance=function(e,t){return Math.sqrt(Vector2.DistanceSquared(e,t))},Vector2.DistanceSquared=function(e,t){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},Vector2.Center=function(e,t){return Vector2.CenterToRef(e,t,Vector2.Zero())},Vector2.CenterToRef=function(e,t,i){return i.copyFromFloats((e.x+t.x)/2,(e.y+t.y)/2)},Vector2.DistanceOfPointFromSegment=function(e,t,i){var n=Vector2.DistanceSquared(t,i);if(0===n)return Vector2.Distance(e,t);var r=i.subtract(t),o=Math.max(0,Math.min(1,Vector2.Dot(e.subtract(t),r)/n)),a=t.add(r.multiplyByFloats(o,o));return Vector2.Distance(e,a)},Object.defineProperty(Vector3.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3.prototype,"z",{get:function(){return this._z},set:function(e){this._z=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Vector3.prototype.toString=function(){return"{X: ".concat(this._x," Y: ").concat(this._y," Z: ").concat(this._z,"}")},Vector3.prototype.getClassName=function(){return"Vector3"},Vector3.prototype.getHashCode=function(){var e=_0x1b2557(this._x);return e=397*(e=397*e^_0x1b2557(this._y))^_0x1b2557(this._z)},Vector3.prototype.asArray=function(){var e=[];return this.toArray(e,0),e},Vector3.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,this},Vector3.prototype.fromArray=function(e,t){return void 0===t&&(t=0),Vector3.FromArrayToRef(e,t,this),this},Vector3.prototype.toQuaternion=function(){return Quaternion.RotationYawPitchRoll(this._y,this._x,this._z)},Vector3.prototype.addInPlace=function(e){return this.addInPlaceFromFloats(e._x,e._y,e._z)},Vector3.prototype.addInPlaceFromFloats=function(e,t,i){return this.x+=e,this.y+=t,this.z+=i,this},Vector3.prototype.add=function(e){return new Vector3(this._x+e._x,this._y+e._y,this._z+e._z)},Vector3.prototype.addToRef=function(e,t){return t.copyFromFloats(this._x+e._x,this._y+e._y,this._z+e._z)},Vector3.prototype.subtractInPlace=function(e){return this.x-=e._x,this.y-=e._y,this.z-=e._z,this},Vector3.prototype.subtract=function(e){return new Vector3(this._x-e._x,this._y-e._y,this._z-e._z)},Vector3.prototype.subtractToRef=function(e,t){return this.subtractFromFloatsToRef(e._x,e._y,e._z,t)},Vector3.prototype.subtractFromFloats=function(e,t,i){return new Vector3(this._x-e,this._y-t,this._z-i)},Vector3.prototype.subtractFromFloatsToRef=function(e,t,i,n){return n.copyFromFloats(this._x-e,this._y-t,this._z-i)},Vector3.prototype.negate=function(){return new Vector3(-this._x,-this._y,-this._z)},Vector3.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},Vector3.prototype.negateToRef=function(e){return e.copyFromFloats(-1*this._x,-1*this._y,-1*this._z)},Vector3.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this},Vector3.prototype.scale=function(e){return new Vector3(this._x*e,this._y*e,this._z*e)},Vector3.prototype.scaleToRef=function(e,t){return t.copyFromFloats(this._x*e,this._y*e,this._z*e)},Vector3.prototype.applyRotationQuaternionToRef=function(e,t){var i=e.w*this.x+e.y*this.z-e.z*this.y,n=e.w*this.y+e.z*this.x-e.x*this.z,r=e.w*this.z+e.x*this.y-e.y*this.x,o=-e.x*this.x-e.y*this.y-e.z*this.z;return t.x=i*e.w+o*-e.x+n*-e.z-r*-e.y,t.y=n*e.w+o*-e.y+r*-e.x-i*-e.z,t.z=r*e.w+o*-e.z+i*-e.y-n*-e.x,t},Vector3.prototype.applyRotationQuaternionInPlace=function(e){return this.applyRotationQuaternionToRef(e,this)},Vector3.prototype.applyRotationQuaternion=function(e){return this.applyRotationQuaternionToRef(e,Vector3.Zero())},Vector3.prototype.scaleAndAddToRef=function(e,t){return t.addInPlaceFromFloats(this._x*e,this._y*e,this._z*e)},Vector3.prototype.projectOnPlane=function(e,t){var i=Vector3.Zero();return this.projectOnPlaneToRef(e,t,i),i},Vector3.prototype.projectOnPlaneToRef=function(e,t,i){var n=e.normal,r=e.d,o=MathTmp.Vector3[0];this.subtractToRef(t,o),o.normalize();var a=Vector3.Dot(o,n),s=-(Vector3.Dot(t,n)+r)/a,l=o.scaleInPlace(s);t.addToRef(l,i)},Vector3.prototype.equals=function(e){return e&&this._x===e._x&&this._y===e._y&&this._z===e._z},Vector3.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._x,e._x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._y,e._y,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._z,e._z,t)},Vector3.prototype.equalsToFloats=function(e,t,i){return this._x===e&&this._y===t&&this._z===i},Vector3.prototype.multiplyInPlace=function(e){return this.x*=e._x,this.y*=e._y,this.z*=e._z,this},Vector3.prototype.multiply=function(e){return this.multiplyByFloats(e._x,e._y,e._z)},Vector3.prototype.multiplyToRef=function(e,t){return t.copyFromFloats(this._x*e._x,this._y*e._y,this._z*e._z)},Vector3.prototype.multiplyByFloats=function(e,t,i){return new Vector3(this._x*e,this._y*t,this._z*i)},Vector3.prototype.divide=function(e){return new Vector3(this._x/e._x,this._y/e._y,this._z/e._z)},Vector3.prototype.divideToRef=function(e,t){return t.copyFromFloats(this._x/e._x,this._y/e._y,this._z/e._z)},Vector3.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},Vector3.prototype.minimizeInPlace=function(e){return this.minimizeInPlaceFromFloats(e._x,e._y,e._z)},Vector3.prototype.maximizeInPlace=function(e){return this.maximizeInPlaceFromFloats(e._x,e._y,e._z)},Vector3.prototype.minimizeInPlaceFromFloats=function(e,t,i){return e<this._x&&(this.x=e),t<this._y&&(this.y=t),i<this._z&&(this.z=i),this},Vector3.prototype.maximizeInPlaceFromFloats=function(e,t,i){return e>this._x&&(this.x=e),t>this._y&&(this.y=t),i>this._z&&(this.z=i),this},Vector3.prototype.isNonUniformWithinEpsilon=function(e){var t=Math.abs(this._x),i=Math.abs(this._y);if(!_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(t,i,e))return!0;var n=Math.abs(this._z);return!_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(t,n,e)||!_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(i,n,e)},Object.defineProperty(Vector3.prototype,"isNonUniform",{get:function(){var e=Math.abs(this._x);return e!==Math.abs(this._y)||e!==Math.abs(this._z)},enumerable:!1,configurable:!0}),Vector3.prototype.floor=function(){return new Vector3(Math.floor(this._x),Math.floor(this._y),Math.floor(this._z))},Vector3.prototype.fract=function(){return new Vector3(this._x-Math.floor(this._x),this._y-Math.floor(this._y),this._z-Math.floor(this._z))},Vector3.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)},Vector3.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z},Object.defineProperty(Vector3.prototype,"hasAZeroComponent",{get:function(){return this._x*this._y*this._z==0},enumerable:!1,configurable:!0}),Vector3.prototype.normalize=function(){return this.normalizeFromLength(this.length())},Vector3.prototype.reorderInPlace=function(e){var t=this;return"xyz"===(e=e.toLowerCase())||(MathTmp.Vector3[0].copyFrom(this),["x","y","z"].forEach((function(i,n){t[i]=MathTmp.Vector3[0][e[n]]}))),this},Vector3.prototype.rotateByQuaternionToRef=function(e,t){return e.toRotationMatrix(MathTmp.Matrix[0]),Vector3.TransformCoordinatesToRef(this,MathTmp.Matrix[0],t),t},Vector3.prototype.rotateByQuaternionAroundPointToRef=function(e,t,i){return this.subtractToRef(t,MathTmp.Vector3[0]),MathTmp.Vector3[0].rotateByQuaternionToRef(e,MathTmp.Vector3[0]),t.addToRef(MathTmp.Vector3[0],i),i},Vector3.prototype.cross=function(e){return Vector3.Cross(this,e)},Vector3.prototype.normalizeFromLength=function(e){return 0===e||1===e?this:this.scaleInPlace(1/e)},Vector3.prototype.normalizeToNew=function(){var e=new Vector3(0,0,0);return this.normalizeToRef(e),e},Vector3.prototype.normalizeToRef=function(e){var t=this.length();return 0===t||1===t?e.copyFromFloats(this._x,this._y,this._z):this.scaleToRef(1/t,e)},Vector3.prototype.clone=function(){return new Vector3(this._x,this._y,this._z)},Vector3.prototype.copyFrom=function(e){return this.copyFromFloats(e._x,e._y,e._z)},Vector3.prototype.copyFromFloats=function(e,t,i){return this.x=e,this.y=t,this.z=i,this},Vector3.prototype.set=function(e,t,i){return this.copyFromFloats(e,t,i)},Vector3.prototype.setAll=function(e){return this.x=this.y=this.z=e,this},Vector3.GetClipFactor=function(e,t,i,n){var r=Vector3.Dot(e,i)-n;return r/(r-(Vector3.Dot(t,i)-n))},Vector3.GetAngleBetweenVectors=function(e,t,i){var n=e.normalizeToRef(MathTmp.Vector3[1]),r=t.normalizeToRef(MathTmp.Vector3[2]),o=Vector3.Dot(n,r);o=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(o,-1,1);var a=Math.acos(o),s=MathTmp.Vector3[3];return Vector3.CrossToRef(n,r,s),Vector3.Dot(s,i)>0?isNaN(a)?0:a:isNaN(a)?-Math.PI:-Math.acos(o)},Vector3.GetAngleBetweenVectorsOnPlane=function(e,t,i){MathTmp.Vector3[0].copyFrom(e);var n=MathTmp.Vector3[0];MathTmp.Vector3[1].copyFrom(t);var r=MathTmp.Vector3[1];MathTmp.Vector3[2].copyFrom(i);var o=MathTmp.Vector3[2],a=MathTmp.Vector3[3],s=MathTmp.Vector3[4];n.normalize(),r.normalize(),o.normalize(),Vector3.CrossToRef(o,n,a),Vector3.CrossToRef(a,o,s);var l=Math.atan2(Vector3.Dot(r,a),Vector3.Dot(r,s));return _math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.NormalizeRadians(l)},Vector3.SlerpToRef=function(e,t,i,n){i=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(i,0,1);var r=MathTmp.Vector3[0],o=MathTmp.Vector3[1];r.copyFrom(e);var a=r.length();r.normalizeFromLength(a),o.copyFrom(t);var s=o.length();o.normalizeFromLength(s);var l,u,c=Vector3.Dot(r,o);if(c<1-_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon){var h=Math.acos(c),d=1/Math.sin(h);l=Math.sin((1-i)*h)*d,u=Math.sin(i*h)*d}else l=1-i,u=i;r.scaleInPlace(l),o.scaleInPlace(u),n.copyFrom(r).addInPlace(o),n.scaleInPlace(_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Lerp(a,s,i))},Vector3.SmoothToRef=function(e,t,i,n,r){Vector3.SlerpToRef(e,t,0===n?1:i/n,r)},Vector3.FromArray=function(e,t){return void 0===t&&(t=0),new Vector3(e[t],e[t+1],e[t+2])},Vector3.FromFloatArray=function(e,t){return Vector3.FromArray(e,t)},Vector3.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2]},Vector3.FromFloatArrayToRef=function(e,t,i){return Vector3.FromArrayToRef(e,t,i)},Vector3.FromFloatsToRef=function(e,t,i,n){n.copyFromFloats(e,t,i)},Vector3.Zero=function(){return new Vector3(0,0,0)},Vector3.One=function(){return new Vector3(1,1,1)},Vector3.Up=function(){return new Vector3(0,1,0)},Object.defineProperty(Vector3,"UpReadOnly",{get:function(){return Vector3._UpReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"RightReadOnly",{get:function(){return Vector3._RightReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"LeftReadOnly",{get:function(){return Vector3._LeftReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"LeftHandedForwardReadOnly",{get:function(){return Vector3._LeftHandedForwardReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"RightHandedForwardReadOnly",{get:function(){return Vector3._RightHandedForwardReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"ZeroReadOnly",{get:function(){return Vector3._ZeroReadOnly},enumerable:!1,configurable:!0}),Vector3.Down=function(){return new Vector3(0,-1,0)},Vector3.Forward=function(e){return void 0===e&&(e=!1),new Vector3(0,0,e?-1:1)},Vector3.Backward=function(e){return void 0===e&&(e=!1),new Vector3(0,0,e?1:-1)},Vector3.Right=function(){return new Vector3(1,0,0)},Vector3.Left=function(){return new Vector3(-1,0,0)},Vector3.TransformCoordinates=function(e,t){var i=Vector3.Zero();return Vector3.TransformCoordinatesToRef(e,t,i),i},Vector3.TransformCoordinatesToRef=function(e,t,i){Vector3.TransformCoordinatesFromFloatsToRef(e._x,e._y,e._z,t,i)},Vector3.TransformCoordinatesFromFloatsToRef=function(e,t,i,n,r){var o=n.m,a=e*o[0]+t*o[4]+i*o[8]+o[12],s=e*o[1]+t*o[5]+i*o[9]+o[13],l=e*o[2]+t*o[6]+i*o[10]+o[14],u=1/(e*o[3]+t*o[7]+i*o[11]+o[15]);r.x=a*u,r.y=s*u,r.z=l*u},Vector3.TransformNormal=function(e,t){var i=Vector3.Zero();return Vector3.TransformNormalToRef(e,t,i),i},Vector3.TransformNormalToRef=function(e,t,i){this.TransformNormalFromFloatsToRef(e._x,e._y,e._z,t,i)},Vector3.TransformNormalFromFloatsToRef=function(e,t,i,n,r){var o=n.m;r.x=e*o[0]+t*o[4]+i*o[8],r.y=e*o[1]+t*o[5]+i*o[9],r.z=e*o[2]+t*o[6]+i*o[10]},Vector3.CatmullRom=function(e,t,i,n,r){var o=r*r,a=r*o;return new Vector3(.5*(2*t._x+(-e._x+i._x)*r+(2*e._x-5*t._x+4*i._x-n._x)*o+(-e._x+3*t._x-3*i._x+n._x)*a),.5*(2*t._y+(-e._y+i._y)*r+(2*e._y-5*t._y+4*i._y-n._y)*o+(-e._y+3*t._y-3*i._y+n._y)*a),.5*(2*t._z+(-e._z+i._z)*r+(2*e._z-5*t._z+4*i._z-n._z)*o+(-e._z+3*t._z-3*i._z+n._z)*a))},Vector3.Clamp=function(e,t,i){var n=new Vector3;return Vector3.ClampToRef(e,t,i,n),n},Vector3.ClampToRef=function(e,t,i,n){var r=e._x;r=(r=r>i._x?i._x:r)<t._x?t._x:r;var o=e._y;o=(o=o>i._y?i._y:o)<t._y?t._y:o;var a=e._z;a=(a=a>i._z?i._z:a)<t._z?t._z:a,n.copyFromFloats(r,o,a)},Vector3.CheckExtends=function(e,t,i){t.minimizeInPlace(e),i.maximizeInPlace(e)},Vector3.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o,s=2*a-3*o+1,l=-2*a+3*o,u=a-2*o+r,c=a-o;return new Vector3(e._x*s+i._x*l+t._x*u+n._x*c,e._y*s+i._y*l+t._y*u+n._y*c,e._z*s+i._z*l+t._z*u+n._z*c)},Vector3.Hermite1stDerivative=function(e,t,i,n,r){var o=Vector3.Zero();return this.Hermite1stDerivativeToRef(e,t,i,n,r,o),o},Vector3.Hermite1stDerivativeToRef=function(e,t,i,n,r,o){var a=r*r;o.x=6*(a-r)*e.x+(3*a-4*r+1)*t.x+6*(-a+r)*i.x+(3*a-2*r)*n.x,o.y=6*(a-r)*e.y+(3*a-4*r+1)*t.y+6*(-a+r)*i.y+(3*a-2*r)*n.y,o.z=6*(a-r)*e.z+(3*a-4*r+1)*t.z+6*(-a+r)*i.z+(3*a-2*r)*n.z},Vector3.Lerp=function(e,t,i){var n=new Vector3(0,0,0);return Vector3.LerpToRef(e,t,i,n),n},Vector3.LerpToRef=function(e,t,i,n){n.x=e._x+(t._x-e._x)*i,n.y=e._y+(t._y-e._y)*i,n.z=e._z+(t._z-e._z)*i},Vector3.Dot=function(e,t){return e._x*t._x+e._y*t._y+e._z*t._z},Vector3.Cross=function(e,t){var i=Vector3.Zero();return Vector3.CrossToRef(e,t,i),i},Vector3.CrossToRef=function(e,t,i){var n=e._y*t._z-e._z*t._y,r=e._z*t._x-e._x*t._z,o=e._x*t._y-e._y*t._x;i.copyFromFloats(n,r,o)},Vector3.Normalize=function(e){var t=Vector3.Zero();return Vector3.NormalizeToRef(e,t),t},Vector3.NormalizeToRef=function(e,t){e.normalizeToRef(t)},Vector3.Project=function(e,t,i,n){var r=new Vector3;return Vector3.ProjectToRef(e,t,i,n,r),r},Vector3.ProjectToRef=function(e,t,i,n,r){var o=n.width,a=n.height,s=n.x,l=n.y,u=MathTmp.Matrix[1];Matrix.FromValuesToRef(o/2,0,0,0,0,-a/2,0,0,0,0,.5,0,s+o/2,a/2+l,.5,1,u);var c=MathTmp.Matrix[0];return t.multiplyToRef(i,c),c.multiplyToRef(u,c),Vector3.TransformCoordinatesToRef(e,c,r),r},Vector3._UnprojectFromInvertedMatrixToRef=function(e,t,i){Vector3.TransformCoordinatesToRef(e,t,i);var n=t.m,r=e._x*n[3]+e._y*n[7]+e._z*n[11]+n[15];_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(r,1)&&i.scaleInPlace(1/r)},Vector3.UnprojectFromTransform=function(e,t,i,n,r){return this.Unproject(e,t,i,n,r,Matrix.IdentityReadOnly)},Vector3.Unproject=function(e,t,i,n,r,o){var a=Vector3.Zero();return Vector3.UnprojectToRef(e,t,i,n,r,o,a),a},Vector3.UnprojectToRef=function(e,t,i,n,r,o,a){Vector3.UnprojectFloatsToRef(e._x,e._y,e._z,t,i,n,r,o,a)},Vector3.UnprojectFloatsToRef=function(e,t,i,n,r,o,a,s,l){var u,c=MathTmp.Matrix[0];o.multiplyToRef(a,c),c.multiplyToRef(s,c),c.invert();var h=MathTmp.Vector3[0];h.x=e/n*2-1,h.y=-(t/r*2-1),(null===(u=_Engines_engineStore__WEBPACK_IMPORTED_MODULE_5__.EngineStore.LastCreatedEngine)||void 0===u?void 0:u.isNDCHalfZRange)?h.z=i:h.z=2*i-1,Vector3._UnprojectFromInvertedMatrixToRef(h,c,l)},Vector3.Minimize=function(e,t){var i=e.clone();return i.minimizeInPlace(t),i},Vector3.Maximize=function(e,t){var i=e.clone();return i.maximizeInPlace(t),i},Vector3.Distance=function(e,t){return Math.sqrt(Vector3.DistanceSquared(e,t))},Vector3.DistanceSquared=function(e,t){var i=e._x-t._x,n=e._y-t._y,r=e._z-t._z;return i*i+n*n+r*r},Vector3.ProjectOnTriangleToRef=function(e,t,i,n,r){var o=MathTmp.Vector3[0],a=MathTmp.Vector3[1],s=MathTmp.Vector3[2],l=MathTmp.Vector3[3],u=MathTmp.Vector3[4];i.subtractToRef(t,o),n.subtractToRef(t,a),n.subtractToRef(i,s);var c=o.length(),h=a.length(),d=s.length();if(c<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon||h<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon||d<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(t),Vector3.Distance(e,t);e.subtractToRef(t,u),Vector3.CrossToRef(o,a,l);var f=l.length();if(f<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(t),Vector3.Distance(e,t);l.normalizeFromLength(f);var p=u.length();if(p<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(t),0;u.normalizeFromLength(p);var _=Vector3.Dot(l,u),m=MathTmp.Vector3[5],g=MathTmp.Vector3[6];m.copyFrom(l).scaleInPlace(-p*_),g.copyFrom(e).addInPlace(m);var x=MathTmp.Vector3[4],y=MathTmp.Vector3[5],v=MathTmp.Vector3[7],$=MathTmp.Vector3[8];x.copyFrom(o).scaleInPlace(1/c),$.copyFrom(a).scaleInPlace(1/h),x.addInPlace($).scaleInPlace(-1),y.copyFrom(o).scaleInPlace(-1/c),$.copyFrom(s).scaleInPlace(1/d),y.addInPlace($).scaleInPlace(-1),v.copyFrom(s).scaleInPlace(-1/d),$.copyFrom(a).scaleInPlace(-1/h),v.addInPlace($).scaleInPlace(-1);var b=MathTmp.Vector3[9];b.copyFrom(g).subtractInPlace(t),Vector3.CrossToRef(x,b,$);var T=Vector3.Dot($,l);b.copyFrom(g).subtractInPlace(i),Vector3.CrossToRef(y,b,$);var C=Vector3.Dot($,l);b.copyFrom(g).subtractInPlace(n),Vector3.CrossToRef(v,b,$);var S,w,E=Vector3.Dot($,l),P=MathTmp.Vector3[10];T>0&&C<0?(P.copyFrom(o),S=t,w=i):C>0&&E<0?(P.copyFrom(s),S=i,w=n):(P.copyFrom(a).scaleInPlace(-1),S=n,w=t);var A=MathTmp.Vector3[9],L=MathTmp.Vector3[4];if(S.subtractToRef(g,$),w.subtractToRef(g,A),Vector3.CrossToRef($,A,L),!(Vector3.Dot(L,l)<0))return r.copyFrom(g),Math.abs(p*_);var M=MathTmp.Vector3[5];Vector3.CrossToRef(P,L,M),M.normalize();var R=MathTmp.Vector3[9];R.copyFrom(S).subtractInPlace(g);var O=R.length();if(O<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(S),Vector3.Distance(e,S);R.normalizeFromLength(O);var D=Vector3.Dot(M,R),I=MathTmp.Vector3[7];I.copyFrom(g).addInPlace(M.scaleInPlace(O*D)),$.copyFrom(I).subtractInPlace(S),p=P.length(),P.normalizeFromLength(p);var F=Vector3.Dot($,P)/Math.max(p,_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon);return F=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(F,0,1),I.copyFrom(S).addInPlace(P.scaleInPlace(F*p)),r.copyFrom(I),Vector3.Distance(e,I)},Vector3.Center=function(e,t){return Vector3.CenterToRef(e,t,Vector3.Zero())},Vector3.CenterToRef=function(e,t,i){return i.copyFromFloats((e._x+t._x)/2,(e._y+t._y)/2,(e._z+t._z)/2)},Vector3.RotationFromAxis=function(e,t,i){var n=Vector3.Zero();return Vector3.RotationFromAxisToRef(e,t,i,n),n},Vector3.RotationFromAxisToRef=function(e,t,i,n){var r=MathTmp.Quaternion[0];Quaternion.RotationQuaternionFromAxisToRef(e,t,i,r),r.toEulerAnglesToRef(n)},Vector3._UpReadOnly=Vector3.Up(),Vector3._LeftHandedForwardReadOnly=Vector3.Forward(!1),Vector3._RightHandedForwardReadOnly=Vector3.Forward(!0),Vector3._RightReadOnly=Vector3.Right(),Vector3._LeftReadOnly=Vector3.Left(),Vector3._ZeroReadOnly=Vector3.Zero(),Vector4.prototype.toString=function(){return"{X: ".concat(this.x," Y: ").concat(this.y," Z: ").concat(this.z," W: ").concat(this.w,"}")},Vector4.prototype.getClassName=function(){return"Vector4"},Vector4.prototype.getHashCode=function(){var e=_0x1b2557(this.x);return e=397*(e=397*(e=397*e^_0x1b2557(this.y))^_0x1b2557(this.z))^_0x1b2557(this.w)},Vector4.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},Vector4.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,this},Vector4.prototype.fromArray=function(e,t){return void 0===t&&(t=0),Vector4.FromArrayToRef(e,t,this),this},Vector4.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this},Vector4.prototype.add=function(e){return new Vector4(this.x+e.x,this.y+e.y,this.z+e.z,this.w+e.w)},Vector4.prototype.addToRef=function(e,t){return t.x=this.x+e.x,t.y=this.y+e.y,t.z=this.z+e.z,t.w=this.w+e.w,this},Vector4.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this},Vector4.prototype.subtract=function(e){return new Vector4(this.x-e.x,this.y-e.y,this.z-e.z,this.w-e.w)},Vector4.prototype.subtractToRef=function(e,t){return t.x=this.x-e.x,t.y=this.y-e.y,t.z=this.z-e.z,t.w=this.w-e.w,this},Vector4.prototype.subtractFromFloats=function(e,t,i,n){return new Vector4(this.x-e,this.y-t,this.z-i,this.w-n)},Vector4.prototype.subtractFromFloatsToRef=function(e,t,i,n,r){return r.x=this.x-e,r.y=this.y-t,r.z=this.z-i,r.w=this.w-n,this},Vector4.prototype.negate=function(){return new Vector4(-this.x,-this.y,-this.z,-this.w)},Vector4.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.w*=-1,this},Vector4.prototype.negateToRef=function(e){return e.copyFromFloats(-1*this.x,-1*this.y,-1*this.z,-1*this.w)},Vector4.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},Vector4.prototype.scale=function(e){return new Vector4(this.x*e,this.y*e,this.z*e,this.w*e)},Vector4.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,t.z=this.z*e,t.w=this.w*e,this},Vector4.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,t.z+=this.z*e,t.w+=this.w*e,this},Vector4.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y&&this.z===e.z&&this.w===e.w},Vector4.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.x,e.x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.y,e.y,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.z,e.z,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.w,e.w,t)},Vector4.prototype.equalsToFloats=function(e,t,i,n){return this.x===e&&this.y===t&&this.z===i&&this.w===n},Vector4.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this},Vector4.prototype.multiply=function(e){return new Vector4(this.x*e.x,this.y*e.y,this.z*e.z,this.w*e.w)},Vector4.prototype.multiplyToRef=function(e,t){return t.x=this.x*e.x,t.y=this.y*e.y,t.z=this.z*e.z,t.w=this.w*e.w,this},Vector4.prototype.multiplyByFloats=function(e,t,i,n){return new Vector4(this.x*e,this.y*t,this.z*i,this.w*n)},Vector4.prototype.divide=function(e){return new Vector4(this.x/e.x,this.y/e.y,this.z/e.z,this.w/e.w)},Vector4.prototype.divideToRef=function(e,t){return t.x=this.x/e.x,t.y=this.y/e.y,t.z=this.z/e.z,t.w=this.w/e.w,this},Vector4.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},Vector4.prototype.minimizeInPlace=function(e){return e.x<this.x&&(this.x=e.x),e.y<this.y&&(this.y=e.y),e.z<this.z&&(this.z=e.z),e.w<this.w&&(this.w=e.w),this},Vector4.prototype.maximizeInPlace=function(e){return e.x>this.x&&(this.x=e.x),e.y>this.y&&(this.y=e.y),e.z>this.z&&(this.z=e.z),e.w>this.w&&(this.w=e.w),this},Vector4.prototype.floor=function(){return new Vector4(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z),Math.floor(this.w))},Vector4.prototype.fract=function(){return new Vector4(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z),this.w-Math.floor(this.w))},Vector4.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},Vector4.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},Vector4.prototype.normalize=function(){var e=this.length();return 0===e?this:this.scaleInPlace(1/e)},Vector4.prototype.toVector3=function(){return new Vector3(this.x,this.y,this.z)},Vector4.prototype.clone=function(){return new Vector4(this.x,this.y,this.z,this.w)},Vector4.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},Vector4.prototype.copyFromFloats=function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},Vector4.prototype.set=function(e,t,i,n){return this.copyFromFloats(e,t,i,n)},Vector4.prototype.setAll=function(e){return this.x=this.y=this.z=this.w=e,this},Vector4.FromArray=function(e,t){return!t&&(t=0),new Vector4(e[t],e[t+1],e[t+2],e[t+3])},Vector4.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3]},Vector4.FromFloatArrayToRef=function(e,t,i){Vector4.FromArrayToRef(e,t,i)},Vector4.FromFloatsToRef=function(e,t,i,n,r){r.x=e,r.y=t,r.z=i,r.w=n},Vector4.Zero=function(){return new Vector4(0,0,0,0)},Vector4.One=function(){return new Vector4(1,1,1,1)},Vector4.Normalize=function(e){var t=Vector4.Zero();return Vector4.NormalizeToRef(e,t),t},Vector4.NormalizeToRef=function(e,t){t.copyFrom(e),t.normalize()},Vector4.Minimize=function(e,t){var i=e.clone();return i.minimizeInPlace(t),i},Vector4.Maximize=function(e,t){var i=e.clone();return i.maximizeInPlace(t),i},Vector4.Distance=function(e,t){return Math.sqrt(Vector4.DistanceSquared(e,t))},Vector4.DistanceSquared=function(e,t){var i=e.x-t.x,n=e.y-t.y,r=e.z-t.z,o=e.w-t.w;return i*i+n*n+r*r+o*o},Vector4.Center=function(e,t){return Vector4.CenterToRef(e,t,Vector4.Zero())},Vector4.CenterToRef=function(e,t,i){return i.copyFromFloats((e.x+t.x)/2,(e.y+t.y)/2,(e.z+t.z)/2,(e.w+t.w)/2)},Vector4.TransformCoordinates=function(e,t){var i=Vector4.Zero();return Vector4.TransformCoordinatesToRef(e,t,i),i},Vector4.TransformCoordinatesToRef=function(e,t,i){Vector4.TransformCoordinatesFromFloatsToRef(e._x,e._y,e._z,t,i)},Vector4.TransformCoordinatesFromFloatsToRef=function(e,t,i,n,r){var o=n.m,a=e*o[0]+t*o[4]+i*o[8]+o[12],s=e*o[1]+t*o[5]+i*o[9]+o[13],l=e*o[2]+t*o[6]+i*o[10]+o[14],u=e*o[3]+t*o[7]+i*o[11]+o[15];r.x=a,r.y=s,r.z=l,r.w=u},Vector4.TransformNormal=function(e,t){var i=Vector4.Zero();return Vector4.TransformNormalToRef(e,t,i),i},Vector4.TransformNormalToRef=function(e,t,i){var n=t.m,r=e.x*n[0]+e.y*n[4]+e.z*n[8],o=e.x*n[1]+e.y*n[5]+e.z*n[9],a=e.x*n[2]+e.y*n[6]+e.z*n[10];i.x=r,i.y=o,i.z=a,i.w=e.w},Vector4.TransformNormalFromFloatsToRef=function(e,t,i,n,r,o){var a=r.m;o.x=e*a[0]+t*a[4]+i*a[8],o.y=e*a[1]+t*a[5]+i*a[9],o.z=e*a[2]+t*a[6]+i*a[10],o.w=n},Vector4.FromVector3=function(e,t){return void 0===t&&(t=0),new Vector4(e._x,e._y,e._z,t)},Object.defineProperty(Quaternion.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Quaternion.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Quaternion.prototype,"z",{get:function(){return this._z},set:function(e){this._z=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Quaternion.prototype,"w",{get:function(){return this._w},set:function(e){this._w=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Quaternion.prototype.toString=function(){return"{X: ".concat(this._x," Y: ").concat(this._y," Z: ").concat(this._z," W: ").concat(this._w,"}")},Quaternion.prototype.getClassName=function(){return"Quaternion"},Quaternion.prototype.getHashCode=function(){var e=_0x1b2557(this._x);return e=397*(e=397*(e=397*e^_0x1b2557(this._y))^_0x1b2557(this._z))^_0x1b2557(this._w)},Quaternion.prototype.asArray=function(){return[this._x,this._y,this._z,this._w]},Quaternion.prototype.equals=function(e){return e&&this._x===e._x&&this._y===e._y&&this._z===e._z&&this._w===e._w},Quaternion.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._x,e._x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._y,e._y,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._z,e._z,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._w,e._w,t)},Quaternion.prototype.clone=function(){return new Quaternion(this._x,this._y,this._z,this._w)},Quaternion.prototype.copyFrom=function(e){return this.x=e._x,this.y=e._y,this.z=e._z,this.w=e._w,this},Quaternion.prototype.copyFromFloats=function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},Quaternion.prototype.set=function(e,t,i,n){return this.copyFromFloats(e,t,i,n)},Quaternion.prototype.add=function(e){return new Quaternion(this._x+e._x,this._y+e._y,this._z+e._z,this._w+e._w)},Quaternion.prototype.addInPlace=function(e){return this._x+=e._x,this._y+=e._y,this._z+=e._z,this._w+=e._w,this},Quaternion.prototype.subtract=function(e){return new Quaternion(this._x-e._x,this._y-e._y,this._z-e._z,this._w-e._w)},Quaternion.prototype.subtractInPlace=function(e){return this._x-=e._x,this._y-=e._y,this._z-=e._z,this._w-=e._w,this},Quaternion.prototype.scale=function(e){return new Quaternion(this._x*e,this._y*e,this._z*e,this._w*e)},Quaternion.prototype.scaleToRef=function(e,t){return t.x=this._x*e,t.y=this._y*e,t.z=this._z*e,t.w=this._w*e,this},Quaternion.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},Quaternion.prototype.scaleAndAddToRef=function(e,t){return t.x+=this._x*e,t.y+=this._y*e,t.z+=this._z*e,t.w+=this._w*e,this},Quaternion.prototype.multiply=function(e){var t=new Quaternion(0,0,0,1);return this.multiplyToRef(e,t),t},Quaternion.prototype.multiplyToRef=function(e,t){var i=this._x*e._w+this._y*e._z-this._z*e._y+this._w*e._x,n=-this._x*e._z+this._y*e._w+this._z*e._x+this._w*e._y,r=this._x*e._y-this._y*e._x+this._z*e._w+this._w*e._z,o=-this._x*e._x-this._y*e._y-this._z*e._z+this._w*e._w;return t.copyFromFloats(i,n,r,o),this},Quaternion.prototype.multiplyInPlace=function(e){return this.multiplyToRef(e,this),this},Quaternion.prototype.conjugateToRef=function(e){return e.copyFromFloats(-this._x,-this._y,-this._z,this._w),this},Quaternion.prototype.conjugateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},Quaternion.prototype.conjugate=function(){return new Quaternion(-this._x,-this._y,-this._z,this._w)},Quaternion.prototype.invert=function(){var e=this.conjugate(),t=this.lengthSquared();return 0==t||1==t||e.scaleInPlace(1/t),e},Quaternion.prototype.invertInPlace=function(){this.conjugateInPlace();var e=this.lengthSquared();return 0==e||1==e||this.scaleInPlace(1/e),this},Quaternion.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},Quaternion.prototype.length=function(){return Math.sqrt(this.lengthSquared())},Quaternion.prototype.normalize=function(){var e=this.length();if(0===e)return this;var t=1/e;return this.scaleInPlace(t),this},Quaternion.prototype.normalizeToNew=function(){var e=this.length();if(0===e)return this.clone();var t=1/e;return this.scale(t)},Quaternion.prototype.toEulerAngles=function(){var e=Vector3.Zero();return this.toEulerAnglesToRef(e),e},Quaternion.prototype.toEulerAnglesToRef=function(e){var t=this._z,i=this._x,n=this._y,r=this._w,o=n*t-i*r,a=.4999999;if(o<-.4999999)e.y=2*Math.atan2(n,r),e.x=Math.PI/2,e.z=0;else if(o>a)e.y=2*Math.atan2(n,r),e.x=-Math.PI/2,e.z=0;else{var s=r*r,l=t*t,u=i*i,c=n*n;e.z=Math.atan2(2*(i*n+t*r),-l-u+c+s),e.x=Math.asin(-2*o),e.y=Math.atan2(2*(t*i+n*r),l-u-c+s)}return this},Quaternion.prototype.toRotationMatrix=function(e){return Matrix.FromQuaternionToRef(this,e),this},Quaternion.prototype.fromRotationMatrix=function(e){return Quaternion.FromRotationMatrixToRef(e,this),this},Quaternion.FromRotationMatrix=function(e){var t=new Quaternion;return Quaternion.FromRotationMatrixToRef(e,t),t},Quaternion.FromRotationMatrixToRef=function(e,t){var i,n=e.m,r=n[0],o=n[4],a=n[8],s=n[1],l=n[5],u=n[9],c=n[2],h=n[6],d=n[10],f=r+l+d;f>0?(i=.5/Math.sqrt(f+1),t.w=.25/i,t.x=(h-u)*i,t.y=(a-c)*i,t.z=(s-o)*i):r>l&&r>d?(i=2*Math.sqrt(1+r-l-d),t.w=(h-u)/i,t.x=.25*i,t.y=(o+s)/i,t.z=(a+c)/i):l>d?(i=2*Math.sqrt(1+l-r-d),t.w=(a-c)/i,t.x=(o+s)/i,t.y=.25*i,t.z=(u+h)/i):(i=2*Math.sqrt(1+d-r-l),t.w=(s-o)/i,t.x=(a+c)/i,t.y=(u+h)/i,t.z=.25*i)},Quaternion.Dot=function(e,t){return e._x*t._x+e._y*t._y+e._z*t._z+e._w*t._w},Quaternion.AreClose=function(e,t){return Quaternion.Dot(e,t)>=0},Quaternion.SmoothToRef=function(e,t,i,n,r){var o=0===n?1:i/n;o=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(o,0,1),Quaternion.SlerpToRef(e,t,o,r)},Quaternion.Zero=function(){return new Quaternion(0,0,0,0)},Quaternion.Inverse=function(e){return new Quaternion(-e._x,-e._y,-e._z,e._w)},Quaternion.InverseToRef=function(e,t){return t.set(-e._x,-e._y,-e._z,e._w),t},Quaternion.Identity=function(){return new Quaternion(0,0,0,1)},Quaternion.IsIdentity=function(e){return e&&0===e._x&&0===e._y&&0===e._z&&1===e._w},Quaternion.RotationAxis=function(e,t){return Quaternion.RotationAxisToRef(e,t,new Quaternion)},Quaternion.RotationAxisToRef=function(e,t,i){var n=Math.sin(t/2);return e.normalize(),i.w=Math.cos(t/2),i.x=e._x*n,i.y=e._y*n,i.z=e._z*n,i},Quaternion.FromArray=function(e,t){return!t&&(t=0),new Quaternion(e[t],e[t+1],e[t+2],e[t+3])},Quaternion.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3]},Quaternion.FromEulerAngles=function(e,t,i){var n=new Quaternion;return Quaternion.RotationYawPitchRollToRef(t,e,i,n),n},Quaternion.FromEulerAnglesToRef=function(e,t,i,n){return Quaternion.RotationYawPitchRollToRef(t,e,i,n),n},Quaternion.FromEulerVector=function(e){var t=new Quaternion;return Quaternion.RotationYawPitchRollToRef(e._y,e._x,e._z,t),t},Quaternion.FromEulerVectorToRef=function(e,t){return Quaternion.RotationYawPitchRollToRef(e._y,e._x,e._z,t),t},Quaternion.FromUnitVectorsToRef=function(e,t,i){var n=Vector3.Dot(e,t)+1;return n<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon?Math.abs(e.x)>Math.abs(e.z)?i.set(-e.y,e.x,0,0):i.set(0,-e.z,e.y,0):(Vector3.CrossToRef(e,t,TmpVectors.Vector3[0]),i.set(TmpVectors.Vector3[0].x,TmpVectors.Vector3[0].y,TmpVectors.Vector3[0].z,n)),i.normalize()},Quaternion.RotationYawPitchRoll=function(e,t,i){var n=new Quaternion;return Quaternion.RotationYawPitchRollToRef(e,t,i,n),n},Quaternion.RotationYawPitchRollToRef=function(e,t,i,n){var r=.5*i,o=.5*t,a=.5*e,s=Math.sin(r),l=Math.cos(r),u=Math.sin(o),c=Math.cos(o),h=Math.sin(a),d=Math.cos(a);n.x=d*u*l+h*c*s,n.y=h*c*l-d*u*s,n.z=d*c*s-h*u*l,n.w=d*c*l+h*u*s},Quaternion.RotationAlphaBetaGamma=function(e,t,i){var n=new Quaternion;return Quaternion.RotationAlphaBetaGammaToRef(e,t,i,n),n},Quaternion.RotationAlphaBetaGammaToRef=function(e,t,i,n){var r=.5*(i+e),o=.5*(i-e),a=.5*t;n.x=Math.cos(o)*Math.sin(a),n.y=Math.sin(o)*Math.sin(a),n.z=Math.sin(r)*Math.cos(a),n.w=Math.cos(r)*Math.cos(a)},Quaternion.RotationQuaternionFromAxis=function(e,t,i){var n=new Quaternion(0,0,0,0);return Quaternion.RotationQuaternionFromAxisToRef(e,t,i,n),n},Quaternion.RotationQuaternionFromAxisToRef=function(e,t,i,n){var r=MathTmp.Matrix[0];Matrix.FromXYZAxesToRef(e.normalize(),t.normalize(),i.normalize(),r),Quaternion.FromRotationMatrixToRef(r,n)},Quaternion.FromLookDirectionLH=function(e,t){var i=new Quaternion;return Quaternion.FromLookDirectionLHToRef(e,t,i),i},Quaternion.FromLookDirectionLHToRef=function(e,t,i){var n=MathTmp.Matrix[0];Matrix.LookDirectionLHToRef(e,t,n),Quaternion.FromRotationMatrixToRef(n,i)},Quaternion.FromLookDirectionRH=function(e,t){var i=new Quaternion;return Quaternion.FromLookDirectionRHToRef(e,t,i),i},Quaternion.FromLookDirectionRHToRef=function(e,t,i){var n=MathTmp.Matrix[0];return Matrix.LookDirectionRHToRef(e,t,n),Quaternion.FromRotationMatrixToRef(n,i)},Quaternion.Slerp=function(e,t,i){var n=Quaternion.Identity();return Quaternion.SlerpToRef(e,t,i,n),n},Quaternion.SlerpToRef=function(e,t,i,n){var r,o,a=e._x*t._x+e._y*t._y+e._z*t._z+e._w*t._w,s=!1;if(a<0&&(s=!0,a=-a),a>.999999)o=1-i,r=s?-i:i;else{var l=Math.acos(a),u=1/Math.sin(l);o=Math.sin((1-i)*l)*u,r=s?-Math.sin(i*l)*u:Math.sin(i*l)*u}n.x=o*e._x+r*t._x,n.y=o*e._y+r*t._y,n.z=o*e._z+r*t._z,n.w=o*e._w+r*t._w},Quaternion.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o,s=2*a-3*o+1,l=-2*a+3*o,u=a-2*o+r,c=a-o;return new Quaternion(e._x*s+i._x*l+t._x*u+n._x*c,e._y*s+i._y*l+t._y*u+n._y*c,e._z*s+i._z*l+t._z*u+n._z*c,e._w*s+i._w*l+t._w*u+n._w*c)},Quaternion.Hermite1stDerivative=function(e,t,i,n,r){var o=Quaternion.Zero();return this.Hermite1stDerivativeToRef(e,t,i,n,r,o),o},Quaternion.Hermite1stDerivativeToRef=function(e,t,i,n,r,o){var a=r*r;o.x=6*(a-r)*e.x+(3*a-4*r+1)*t.x+6*(-a+r)*i.x+(3*a-2*r)*n.x,o.y=6*(a-r)*e.y+(3*a-4*r+1)*t.y+6*(-a+r)*i.y+(3*a-2*r)*n.y,o.z=6*(a-r)*e.z+(3*a-4*r+1)*t.z+6*(-a+r)*i.z+(3*a-2*r)*n.z,o.w=6*(a-r)*e.w+(3*a-4*r+1)*t.w+6*(-a+r)*i.w+(3*a-2*r)*n.w},Object.defineProperty(Matrix,"Use64Bits",{get:function(){return _0x2fa08c.MatrixUse64Bits},enumerable:!1,configurable:!0}),Object.defineProperty(Matrix.prototype,"m",{get:function(){return this._m},enumerable:!1,configurable:!0}),Matrix.prototype.markAsUpdated=function(){this.updateFlag=Matrix._UpdateFlagSeed++,this._isIdentity=!1,this._isIdentity3x2=!1,this._isIdentityDirty=!0,this._isIdentity3x2Dirty=!0},Matrix.prototype._updateIdentityStatus=function(e,t,i,n){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!0),this._isIdentity=e,this._isIdentity3x2=e||i,this._isIdentityDirty=!this._isIdentity&&t,this._isIdentity3x2Dirty=!this._isIdentity3x2&&n},Matrix.prototype.isIdentity=function(){if(this._isIdentityDirty){this._isIdentityDirty=!1;var e=this._m;this._isIdentity=1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]}return this._isIdentity},Matrix.prototype.isIdentityAs3x2=function(){return this._isIdentity3x2Dirty&&(this._isIdentity3x2Dirty=!1,1!==this._m[0]||1!==this._m[5]||1!==this._m[15]||0!==this._m[1]||0!==this._m[2]||0!==this._m[3]||0!==this._m[4]||0!==this._m[6]||0!==this._m[7]||0!==this._m[8]||0!==this._m[9]||0!==this._m[10]||0!==this._m[11]||0!==this._m[12]||0!==this._m[13]||0!==this._m[14]?this._isIdentity3x2=!1:this._isIdentity3x2=!0),this._isIdentity3x2},Matrix.prototype.determinant=function(){if(!0===this._isIdentity)return 1;var e=this._m,t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],f=e[12],p=e[13],_=e[14],m=e[15],g=h*m-_*d,x=c*m-p*d,y=c*_-p*h,v=u*m-f*d,$=u*_-h*f,b=u*p-f*c;return t*+(a*g-s*x+l*y)+i*-(o*g-s*v+l*$)+n*+(o*x-a*v+l*b)+r*-(o*y-a*$+s*b)},Matrix.prototype.toArray=function(){return this._m},Matrix.prototype.asArray=function(){return this._m},Matrix.prototype.invert=function(){return this.invertToRef(this),this},Matrix.prototype.reset=function(){return Matrix.FromValuesToRef(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,this),this._updateIdentityStatus(!1),this},Matrix.prototype.add=function(e){var t=new Matrix;return this.addToRef(e,t),t},Matrix.prototype.addToRef=function(e,t){for(var i=this._m,n=t._m,r=e.m,o=0;o<16;o++)n[o]=i[o]+r[o];return t.markAsUpdated(),this},Matrix.prototype.addToSelf=function(e){for(var t=this._m,i=e.m,n=0;n<16;n++)t[n]+=i[n];return this.markAsUpdated(),this},Matrix.prototype.invertToRef=function(e){if(!0===this._isIdentity)return Matrix.IdentityToRef(e),this;var t=this._m,i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15],x=d*g-m*f,y=h*g-_*f,v=h*m-_*d,$=c*g-p*f,b=c*m-d*p,T=c*_-p*h,C=+(s*x-l*y+u*v),S=-(a*x-l*$+u*b),w=+(a*y-s*$+u*T),E=-(a*v-s*b+l*T),P=i*C+n*S+r*w+o*E;if(0===P)return e.copyFrom(this),this;var A=1/P,L=l*g-m*u,M=s*g-_*u,R=s*m-_*l,O=a*g-p*u,D=a*m-p*l,I=a*_-p*s,F=l*f-d*u,B=s*f-h*u,N=s*d-h*l,G=a*f-c*u,z=a*d-c*l,U=a*h-c*s,V=-(n*x-r*y+o*v),k=+(i*x-r*$+o*b),W=-(i*y-n*$+o*T),H=+(i*v-n*b+r*T),q=+(n*L-r*M+o*R),j=-(i*L-r*O+o*D),X=+(i*M-n*O+o*I),Y=-(i*R-n*D+r*I),Z=-(n*F-r*B+o*N),K=+(i*F-r*G+o*z),Q=-(i*B-n*G+o*U),J=+(i*N-n*z+r*U);return Matrix.FromValuesToRef(C*A,V*A,q*A,Z*A,S*A,k*A,j*A,K*A,w*A,W*A,X*A,Q*A,E*A,H*A,Y*A,J*A,e),this},Matrix.prototype.addAtIndex=function(e,t){return this._m[e]+=t,this.markAsUpdated(),this},Matrix.prototype.multiplyAtIndex=function(e,t){return this._m[e]*=t,this.markAsUpdated(),this},Matrix.prototype.setTranslationFromFloats=function(e,t,i){return this._m[12]=e,this._m[13]=t,this._m[14]=i,this.markAsUpdated(),this},Matrix.prototype.addTranslationFromFloats=function(e,t,i){return this._m[12]+=e,this._m[13]+=t,this._m[14]+=i,this.markAsUpdated(),this},Matrix.prototype.setTranslation=function(e){return this.setTranslationFromFloats(e._x,e._y,e._z)},Matrix.prototype.getTranslation=function(){return new Vector3(this._m[12],this._m[13],this._m[14])},Matrix.prototype.getTranslationToRef=function(e){return e.x=this._m[12],e.y=this._m[13],e.z=this._m[14],this},Matrix.prototype.removeRotationAndScaling=function(){var e=this.m;return Matrix.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,e[12],e[13],e[14],e[15],this),this._updateIdentityStatus(0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]),this},Matrix.prototype.multiply=function(e){var t=new Matrix;return this.multiplyToRef(e,t),t},Matrix.prototype.copyFrom=function(e){e.copyToArray(this._m);var t=e;return this.updateFlag=t.updateFlag,this._updateIdentityStatus(t._isIdentity,t._isIdentityDirty,t._isIdentity3x2,t._isIdentity3x2Dirty),this},Matrix.prototype.copyToArray=function(e,t){void 0===t&&(t=0);var i=this._m;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],this},Matrix.prototype.multiplyToRef=function(e,t){return this._isIdentity?(t.copyFrom(e),this):e._isIdentity?(t.copyFrom(this),this):(this.multiplyToArray(e,t._m,0),t.markAsUpdated(),this)},Matrix.prototype.multiplyToArray=function(e,t,i){var n=this._m,r=e.m,o=n[0],a=n[1],s=n[2],l=n[3],u=n[4],c=n[5],h=n[6],d=n[7],f=n[8],p=n[9],_=n[10],m=n[11],g=n[12],x=n[13],y=n[14],v=n[15],$=r[0],b=r[1],T=r[2],C=r[3],S=r[4],w=r[5],E=r[6],P=r[7],A=r[8],L=r[9],M=r[10],R=r[11],O=r[12],D=r[13],I=r[14],F=r[15];return t[i]=o*$+a*S+s*A+l*O,t[i+1]=o*b+a*w+s*L+l*D,t[i+2]=o*T+a*E+s*M+l*I,t[i+3]=o*C+a*P+s*R+l*F,t[i+4]=u*$+c*S+h*A+d*O,t[i+5]=u*b+c*w+h*L+d*D,t[i+6]=u*T+c*E+h*M+d*I,t[i+7]=u*C+c*P+h*R+d*F,t[i+8]=f*$+p*S+_*A+m*O,t[i+9]=f*b+p*w+_*L+m*D,t[i+10]=f*T+p*E+_*M+m*I,t[i+11]=f*C+p*P+_*R+m*F,t[i+12]=g*$+x*S+y*A+v*O,t[i+13]=g*b+x*w+y*L+v*D,t[i+14]=g*T+x*E+y*M+v*I,t[i+15]=g*C+x*P+y*R+v*F,this},Matrix.prototype.equals=function(e){var t=e;if(!t)return!1;if((this._isIdentity||t._isIdentity)&&!this._isIdentityDirty&&!t._isIdentityDirty)return this._isIdentity&&t._isIdentity;var i=this.m,n=t.m;return i[0]===n[0]&&i[1]===n[1]&&i[2]===n[2]&&i[3]===n[3]&&i[4]===n[4]&&i[5]===n[5]&&i[6]===n[6]&&i[7]===n[7]&&i[8]===n[8]&&i[9]===n[9]&&i[10]===n[10]&&i[11]===n[11]&&i[12]===n[12]&&i[13]===n[13]&&i[14]===n[14]&&i[15]===n[15]},Matrix.prototype.clone=function(){var e=new Matrix;return e.copyFrom(this),e},Matrix.prototype.getClassName=function(){return"Matrix"},Matrix.prototype.getHashCode=function(){for(var e=_0x1b2557(this._m[0]),t=1;t<16;t++)e=397*e^_0x1b2557(this._m[t]);return e},Matrix.prototype.decomposeToTransformNode=function(e){return e.rotationQuaternion=e.rotationQuaternion||new Quaternion,this.decompose(e.scaling,e.rotationQuaternion,e.position)},Matrix.prototype.decompose=function(e,t,i,n){if(this._isIdentity)return i&&i.setAll(0),e&&e.setAll(1),t&&t.copyFromFloats(0,0,0,1),!0;var r=this._m;if(i&&i.copyFromFloats(r[12],r[13],r[14]),(e=e||MathTmp.Vector3[0]).x=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]),e.y=Math.sqrt(r[4]*r[4]+r[5]*r[5]+r[6]*r[6]),e.z=Math.sqrt(r[8]*r[8]+r[9]*r[9]+r[10]*r[10]),n){var o=n.scaling.x<0?-1:1,a=n.scaling.y<0?-1:1,s=n.scaling.z<0?-1:1;e.x*=o,e.y*=a,e.z*=s}else this.determinant()<=0&&(e.y*=-1);if(0===e._x||0===e._y||0===e._z)return t&&t.copyFromFloats(0,0,0,1),!1;if(t){var l=1/e._x,u=1/e._y,c=1/e._z;Matrix.FromValuesToRef(r[0]*l,r[1]*l,r[2]*l,0,r[4]*u,r[5]*u,r[6]*u,0,r[8]*c,r[9]*c,r[10]*c,0,0,0,0,1,MathTmp.Matrix[0]),Quaternion.FromRotationMatrixToRef(MathTmp.Matrix[0],t)}return!0},Matrix.prototype.getRow=function(e){if(e<0||e>3)return null;var t=4*e;return new Vector4(this._m[t+0],this._m[t+1],this._m[t+2],this._m[t+3])},Matrix.prototype.setRow=function(e,t){return this.setRowFromFloats(e,t.x,t.y,t.z,t.w)},Matrix.prototype.transpose=function(){return Matrix.Transpose(this)},Matrix.prototype.transposeToRef=function(e){return Matrix.TransposeToRef(this,e),this},Matrix.prototype.setRowFromFloats=function(e,t,i,n,r){if(e<0||e>3)return this;var o=4*e;return this._m[o+0]=t,this._m[o+1]=i,this._m[o+2]=n,this._m[o+3]=r,this.markAsUpdated(),this},Matrix.prototype.scale=function(e){var t=new Matrix;return this.scaleToRef(e,t),t},Matrix.prototype.scaleToRef=function(e,t){for(var i=0;i<16;i++)t._m[i]=this._m[i]*e;return t.markAsUpdated(),this},Matrix.prototype.scaleAndAddToRef=function(e,t){for(var i=0;i<16;i++)t._m[i]+=this._m[i]*e;return t.markAsUpdated(),this},Matrix.prototype.toNormalMatrix=function(e){var t=MathTmp.Matrix[0];this.invertToRef(t),t.transposeToRef(e);var i=e._m;Matrix.FromValuesToRef(i[0],i[1],i[2],0,i[4],i[5],i[6],0,i[8],i[9],i[10],0,0,0,0,1,e)},Matrix.prototype.getRotationMatrix=function(){var e=new Matrix;return this.getRotationMatrixToRef(e),e},Matrix.prototype.getRotationMatrixToRef=function(e){var t=MathTmp.Vector3[0];if(!this.decompose(t))return Matrix.IdentityToRef(e),this;var i=this._m,n=1/t._x,r=1/t._y,o=1/t._z;return Matrix.FromValuesToRef(i[0]*n,i[1]*n,i[2]*n,0,i[4]*r,i[5]*r,i[6]*r,0,i[8]*o,i[9]*o,i[10]*o,0,0,0,0,1,e),this},Matrix.prototype.toggleModelMatrixHandInPlace=function(){var e=this._m;e[2]*=-1,e[6]*=-1,e[8]*=-1,e[9]*=-1,e[14]*=-1,this.markAsUpdated()},Matrix.prototype.toggleProjectionMatrixHandInPlace=function(){var e=this._m;e[8]*=-1,e[9]*=-1,e[10]*=-1,e[11]*=-1,this.markAsUpdated()},Matrix.FromArray=function(e,t){void 0===t&&(t=0);var i=new Matrix;return Matrix.FromArrayToRef(e,t,i),i},Matrix.FromArrayToRef=function(e,t,i){for(var n=0;n<16;n++)i._m[n]=e[n+t];i.markAsUpdated()},Matrix.FromFloat32ArrayToRefScaled=function(e,t,i,n){for(var r=0;r<16;r++)n._m[r]=e[r+t]*i;n.markAsUpdated()},Object.defineProperty(Matrix,"IdentityReadOnly",{get:function(){return Matrix._IdentityReadOnly},enumerable:!1,configurable:!0}),Matrix.FromValuesToRef=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var g=m._m;g[0]=e,g[1]=t,g[2]=i,g[3]=n,g[4]=r,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=u,g[10]=c,g[11]=h,g[12]=d,g[13]=f,g[14]=p,g[15]=_,m.markAsUpdated()},Matrix.FromValues=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=new Matrix,g=m._m;return g[0]=e,g[1]=t,g[2]=i,g[3]=n,g[4]=r,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=u,g[10]=c,g[11]=h,g[12]=d,g[13]=f,g[14]=p,g[15]=_,m.markAsUpdated(),m},Matrix.Compose=function(e,t,i){var n=new Matrix;return Matrix.ComposeToRef(e,t,i,n),n},Matrix.ComposeToRef=function(e,t,i,n){var r=n._m,o=t._x,a=t._y,s=t._z,l=t._w,u=o+o,c=a+a,h=s+s,d=o*u,f=o*c,p=o*h,_=a*c,m=a*h,g=s*h,x=l*u,y=l*c,v=l*h,$=e._x,b=e._y,T=e._z;r[0]=(1-(_+g))*$,r[1]=(f+v)*$,r[2]=(p-y)*$,r[3]=0,r[4]=(f-v)*b,r[5]=(1-(d+g))*b,r[6]=(m+x)*b,r[7]=0,r[8]=(p+y)*T,r[9]=(m-x)*T,r[10]=(1-(d+_))*T,r[11]=0,r[12]=i._x,r[13]=i._y,r[14]=i._z,r[15]=1,n.markAsUpdated()},Matrix.Identity=function(){var e=Matrix.FromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return e._updateIdentityStatus(!0),e},Matrix.IdentityToRef=function(e){Matrix.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,e),e._updateIdentityStatus(!0)},Matrix.Zero=function(){var e=Matrix.FromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return e._updateIdentityStatus(!1),e},Matrix.RotationX=function(e){var t=new Matrix;return Matrix.RotationXToRef(e,t),t},Matrix.Invert=function(e){var t=new Matrix;return e.invertToRef(t),t},Matrix.RotationXToRef=function(e,t){var i=Math.sin(e),n=Math.cos(e);Matrix.FromValuesToRef(1,0,0,0,0,n,i,0,0,-i,n,0,0,0,0,1,t),t._updateIdentityStatus(1===n&&0===i)},Matrix.RotationY=function(e){var t=new Matrix;return Matrix.RotationYToRef(e,t),t},Matrix.RotationYToRef=function(e,t){var i=Math.sin(e),n=Math.cos(e);Matrix.FromValuesToRef(n,0,-i,0,0,1,0,0,i,0,n,0,0,0,0,1,t),t._updateIdentityStatus(1===n&&0===i)},Matrix.RotationZ=function(e){var t=new Matrix;return Matrix.RotationZToRef(e,t),t},Matrix.RotationZToRef=function(e,t){var i=Math.sin(e),n=Math.cos(e);Matrix.FromValuesToRef(n,i,0,0,-i,n,0,0,0,0,1,0,0,0,0,1,t),t._updateIdentityStatus(1===n&&0===i)},Matrix.RotationAxis=function(e,t){var i=new Matrix;return Matrix.RotationAxisToRef(e,t,i),i},Matrix.RotationAxisToRef=function(e,t,i){var n=Math.sin(-t),r=Math.cos(-t),o=1-r;e.normalize();var a=i._m;a[0]=e._x*e._x*o+r,a[1]=e._x*e._y*o-e._z*n,a[2]=e._x*e._z*o+e._y*n,a[3]=0,a[4]=e._y*e._x*o+e._z*n,a[5]=e._y*e._y*o+r,a[6]=e._y*e._z*o-e._x*n,a[7]=0,a[8]=e._z*e._x*o-e._y*n,a[9]=e._z*e._y*o+e._x*n,a[10]=e._z*e._z*o+r,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,i.markAsUpdated()},Matrix.RotationAlignToRef=function(e,t,i){var n=Vector3.Dot(t,e),r=i._m;if(n<-1+_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)r[0]=-1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0;else{var o=Vector3.Cross(t,e),a=1/(1+n);r[0]=o._x*o._x*a+n,r[1]=o._y*o._x*a-o._z,r[2]=o._z*o._x*a+o._y,r[3]=0,r[4]=o._x*o._y*a+o._z,r[5]=o._y*o._y*a+n,r[6]=o._z*o._y*a-o._x,r[7]=0,r[8]=o._x*o._z*a-o._y,r[9]=o._y*o._z*a+o._x,r[10]=o._z*o._z*a+n,r[11]=0}r[12]=0,r[13]=0,r[14]=0,r[15]=1,i.markAsUpdated()},Matrix.RotationYawPitchRoll=function(e,t,i){var n=new Matrix;return Matrix.RotationYawPitchRollToRef(e,t,i,n),n},Matrix.RotationYawPitchRollToRef=function(e,t,i,n){Quaternion.RotationYawPitchRollToRef(e,t,i,MathTmp.Quaternion[0]),MathTmp.Quaternion[0].toRotationMatrix(n)},Matrix.Scaling=function(e,t,i){var n=new Matrix;return Matrix.ScalingToRef(e,t,i,n),n},Matrix.ScalingToRef=function(e,t,i,n){Matrix.FromValuesToRef(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1,n),n._updateIdentityStatus(1===e&&1===t&&1===i)},Matrix.Translation=function(e,t,i){var n=new Matrix;return Matrix.TranslationToRef(e,t,i,n),n},Matrix.TranslationToRef=function(e,t,i,n){Matrix.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,e,t,i,1,n),n._updateIdentityStatus(0===e&&0===t&&0===i)},Matrix.Lerp=function(e,t,i){var n=new Matrix;return Matrix.LerpToRef(e,t,i,n),n},Matrix.LerpToRef=function(e,t,i,n){for(var r=n._m,o=e.m,a=t.m,s=0;s<16;s++)r[s]=o[s]*(1-i)+a[s]*i;n.markAsUpdated()},Matrix.DecomposeLerp=function(e,t,i){var n=new Matrix;return Matrix.DecomposeLerpToRef(e,t,i,n),n},Matrix.DecomposeLerpToRef=function(e,t,i,n){var r=MathTmp.Vector3[0],o=MathTmp.Quaternion[0],a=MathTmp.Vector3[1];e.decompose(r,o,a);var s=MathTmp.Vector3[2],l=MathTmp.Quaternion[1],u=MathTmp.Vector3[3];t.decompose(s,l,u);var c=MathTmp.Vector3[4];Vector3.LerpToRef(r,s,i,c);var h=MathTmp.Quaternion[2];Quaternion.SlerpToRef(o,l,i,h);var d=MathTmp.Vector3[5];Vector3.LerpToRef(a,u,i,d),Matrix.ComposeToRef(c,h,d,n)},Matrix.LookAtLH=function(e,t,i){var n=new Matrix;return Matrix.LookAtLHToRef(e,t,i,n),n},Matrix.LookAtLHToRef=function(e,t,i,n){var r=MathTmp.Vector3[0],o=MathTmp.Vector3[1],a=MathTmp.Vector3[2];t.subtractToRef(e,a),a.normalize(),Vector3.CrossToRef(i,a,r);var s=r.lengthSquared();0===s?r.x=1:r.normalizeFromLength(Math.sqrt(s)),Vector3.CrossToRef(a,r,o),o.normalize();var l=-Vector3.Dot(r,e),u=-Vector3.Dot(o,e),c=-Vector3.Dot(a,e);Matrix.FromValuesToRef(r._x,o._x,a._x,0,r._y,o._y,a._y,0,r._z,o._z,a._z,0,l,u,c,1,n)},Matrix.LookAtRH=function(e,t,i){var n=new Matrix;return Matrix.LookAtRHToRef(e,t,i,n),n},Matrix.LookAtRHToRef=function(e,t,i,n){var r=MathTmp.Vector3[0],o=MathTmp.Vector3[1],a=MathTmp.Vector3[2];e.subtractToRef(t,a),a.normalize(),Vector3.CrossToRef(i,a,r);var s=r.lengthSquared();0===s?r.x=1:r.normalizeFromLength(Math.sqrt(s)),Vector3.CrossToRef(a,r,o),o.normalize();var l=-Vector3.Dot(r,e),u=-Vector3.Dot(o,e),c=-Vector3.Dot(a,e);Matrix.FromValuesToRef(r._x,o._x,a._x,0,r._y,o._y,a._y,0,r._z,o._z,a._z,0,l,u,c,1,n)},Matrix.LookDirectionLH=function(e,t){var i=new Matrix;return Matrix.LookDirectionLHToRef(e,t,i),i},Matrix.LookDirectionLHToRef=function(e,t,i){var n=MathTmp.Vector3[0];n.copyFrom(e),n.scaleInPlace(-1);var r=MathTmp.Vector3[1];Vector3.CrossToRef(t,n,r),Matrix.FromValuesToRef(r._x,r._y,r._z,0,t._x,t._y,t._z,0,n._x,n._y,n._z,0,0,0,0,1,i)},Matrix.LookDirectionRH=function(e,t){var i=new Matrix;return Matrix.LookDirectionRHToRef(e,t,i),i},Matrix.LookDirectionRHToRef=function(e,t,i){var n=MathTmp.Vector3[2];Vector3.CrossToRef(t,e,n),Matrix.FromValuesToRef(n._x,n._y,n._z,0,t._x,t._y,t._z,0,e._x,e._y,e._z,0,0,0,0,1,i)},Matrix.OrthoLH=function(e,t,i,n,r){var o=new Matrix;return Matrix.OrthoLHToRef(e,t,i,n,o,r),o},Matrix.OrthoLHToRef=function(e,t,i,n,r,o){var a=2/e,s=2/t,l=2/(n-i),u=-(n+i)/(n-i);Matrix.FromValuesToRef(a,0,0,0,0,s,0,0,0,0,l,0,0,0,u,1,r),o&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(1===a&&1===s&&1===l&&0===u)},Matrix.OrthoOffCenterLH=function(e,t,i,n,r,o,a){var s=new Matrix;return Matrix.OrthoOffCenterLHToRef(e,t,i,n,r,o,s,a),s},Matrix.OrthoOffCenterLHToRef=function(e,t,i,n,r,o,a,s){var l=2/(t-e),u=2/(n-i),c=2/(o-r),h=-(o+r)/(o-r),d=(e+t)/(e-t),f=(n+i)/(i-n);Matrix.FromValuesToRef(l,0,0,0,0,u,0,0,0,0,c,0,d,f,h,1,a),s&&a.multiplyToRef(mtxConvertNDCToHalfZRange,a),a.markAsUpdated()},Matrix.OrthoOffCenterRH=function(e,t,i,n,r,o,a){var s=new Matrix;return Matrix.OrthoOffCenterRHToRef(e,t,i,n,r,o,s,a),s},Matrix.OrthoOffCenterRHToRef=function(e,t,i,n,r,o,a,s){Matrix.OrthoOffCenterLHToRef(e,t,i,n,r,o,a,s),a._m[10]*=-1},Matrix.PerspectiveLH=function(e,t,i,n,r,o){void 0===o&&(o=0);var a=new Matrix,s=2*i/e,l=2*i/t,u=(n+i)/(n-i),c=-2*n*i/(n-i),h=Math.tan(o);return Matrix.FromValuesToRef(s,0,0,0,0,l,0,h,0,0,u,1,0,0,c,0,a),r&&a.multiplyToRef(mtxConvertNDCToHalfZRange,a),a._updateIdentityStatus(!1),a},Matrix.PerspectiveFovLH=function(e,t,i,n,r,o,a){void 0===o&&(o=0),void 0===a&&(a=!1);var s=new Matrix;return Matrix.PerspectiveFovLHToRef(e,t,i,n,s,!0,r,o,a),s},Matrix.PerspectiveFovLHToRef=function(e,t,i,n,r,o,a,s,l){void 0===o&&(o=!0),void 0===s&&(s=0),void 0===l&&(l=!1);var u=i,c=n,h=1/Math.tan(.5*e),d=o?h/t:h,f=o?h:h*t,p=l&&0===u?-1:0!==c?(c+u)/(c-u):1,_=l&&0===u?2*c:0!==c?-2*c*u/(c-u):-2*u,m=Math.tan(s);Matrix.FromValuesToRef(d,0,0,0,0,f,0,m,0,0,p,1,0,0,_,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovReverseLHToRef=function(e,t,i,n,r,o,a,s){void 0===o&&(o=!0),void 0===s&&(s=0);var l=1/Math.tan(.5*e),u=o?l/t:l,c=o?l:l*t,h=Math.tan(s);Matrix.FromValuesToRef(u,0,0,0,0,c,0,h,0,0,-i,1,0,0,1,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovRH=function(e,t,i,n,r,o,a){void 0===o&&(o=0),void 0===a&&(a=!1);var s=new Matrix;return Matrix.PerspectiveFovRHToRef(e,t,i,n,s,!0,r,o,a),s},Matrix.PerspectiveFovRHToRef=function(e,t,i,n,r,o,a,s,l){void 0===o&&(o=!0),void 0===s&&(s=0),void 0===l&&(l=!1);var u=i,c=n,h=1/Math.tan(.5*e),d=o?h/t:h,f=o?h:h*t,p=l&&0===u?1:0!==c?-(c+u)/(c-u):-1,_=l&&0===u?2*c:0!==c?-2*c*u/(c-u):-2*u,m=Math.tan(s);Matrix.FromValuesToRef(d,0,0,0,0,f,0,m,0,0,p,-1,0,0,_,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovReverseRHToRef=function(e,t,i,n,r,o,a,s){void 0===o&&(o=!0),void 0===s&&(s=0);var l=1/Math.tan(.5*e),u=o?l/t:l,c=o?l:l*t,h=Math.tan(s);Matrix.FromValuesToRef(u,0,0,0,0,c,0,h,0,0,-i,-1,0,0,-1,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovWebVRToRef=function(e,t,i,n,r,o,a){void 0===r&&(r=!1),void 0===a&&(a=0);var s=r?-1:1,l=Math.tan(e.upDegrees*Math.PI/180),u=Math.tan(e.downDegrees*Math.PI/180),c=Math.tan(e.leftDegrees*Math.PI/180),h=Math.tan(e.rightDegrees*Math.PI/180),d=2/(c+h),f=2/(l+u),p=Math.tan(a),_=n._m;_[0]=d,_[1]=_[2]=_[3]=_[4]=0,_[5]=f,_[6]=0,_[7]=p,_[8]=(c-h)*d*.5,_[9]=-(l-u)*f*.5,_[10]=-i/(t-i),_[11]=1*s,_[12]=_[13]=_[15]=0,_[14]=-2*i*t/(i-t),o&&n.multiplyToRef(mtxConvertNDCToHalfZRange,n),n.markAsUpdated()},Matrix.GetFinalMatrix=function(e,t,i,n,r,o){var a=e.width,s=e.height,l=e.x,u=e.y,c=Matrix.FromValues(a/2,0,0,0,0,-s/2,0,0,0,0,o-r,0,l+a/2,s/2+u,r,1),h=MathTmp.Matrix[0];return t.multiplyToRef(i,h),h.multiplyToRef(n,h),h.multiply(c)},Matrix.GetAsMatrix2x2=function(e){var t=e.m,i=[t[0],t[1],t[4],t[5]];return _0x2fa08c.MatrixUse64Bits?i:new Float32Array(i)},Matrix.GetAsMatrix3x3=function(e){var t=e.m,i=[t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]];return _0x2fa08c.MatrixUse64Bits?i:new Float32Array(i)},Matrix.Transpose=function(e){var t=new Matrix;return Matrix.TransposeToRef(e,t),t},Matrix.TransposeToRef=function(e,t){var i=t._m,n=e.m;i[0]=n[0],i[1]=n[4],i[2]=n[8],i[3]=n[12],i[4]=n[1],i[5]=n[5],i[6]=n[9],i[7]=n[13],i[8]=n[2],i[9]=n[6],i[10]=n[10],i[11]=n[14],i[12]=n[3],i[13]=n[7],i[14]=n[11],i[15]=n[15],t.markAsUpdated(),t._updateIdentityStatus(e._isIdentity,e._isIdentityDirty)},Matrix.Reflection=function(e){var t=new Matrix;return Matrix.ReflectionToRef(e,t),t},Matrix.ReflectionToRef=function(e,t){e.normalize();var i=e.normal.x,n=e.normal.y,r=e.normal.z,o=-2*i,a=-2*n,s=-2*r;Matrix.FromValuesToRef(o*i+1,a*i,s*i,0,o*n,a*n+1,s*n,0,o*r,a*r,s*r+1,0,o*e.d,a*e.d,s*e.d,1,t)},Matrix.FromXYZAxesToRef=function(e,t,i,n){Matrix.FromValuesToRef(e._x,e._y,e._z,0,t._x,t._y,t._z,0,i._x,i._y,i._z,0,0,0,0,1,n)},Matrix.FromQuaternionToRef=function(e,t){var i=e._x*e._x,n=e._y*e._y,r=e._z*e._z,o=e._x*e._y,a=e._z*e._w,s=e._z*e._x,l=e._y*e._w,u=e._y*e._z,c=e._x*e._w;t._m[0]=1-2*(n+r),t._m[1]=2*(o+a),t._m[2]=2*(s-l),t._m[3]=0,t._m[4]=2*(o-a),t._m[5]=1-2*(r+i),t._m[6]=2*(u+c),t._m[7]=0,t._m[8]=2*(s+l),t._m[9]=2*(u-c),t._m[10]=1-2*(n+i),t._m[11]=0,t._m[12]=0,t._m[13]=0,t._m[14]=0,t._m[15]=1,t.markAsUpdated()},Matrix._UpdateFlagSeed=0,Matrix._IdentityReadOnly=Matrix.Identity(),MathTmp.Vector3=_0x404bc2.BuildTuple(11,Vector3.Zero),MathTmp.Matrix=_0x404bc2.BuildTuple(2,Matrix.Identity),MathTmp.Quaternion=_0x404bc2.BuildTuple(3,Quaternion.Zero),TmpVectors.Vector2=_0x404bc2.BuildTuple(3,Vector2.Zero),TmpVectors.Vector3=_0x404bc2.BuildTuple(13,Vector3.Zero),TmpVectors.Vector4=_0x404bc2.BuildTuple(3,Vector4.Zero),TmpVectors.Quaternion=_0x404bc2.BuildTuple(2,Quaternion.Zero),TmpVectors.Matrix=_0x404bc2.BuildTuple(8,Matrix.Identity);const mtxConvertNDCToHalfZRange=Matrix.FromValues(1,0,0,0,0,1,0,0,0,0,.5,0,0,0,.5,1);var _0x5d3935=(_0x572008=!0,function(e,t){var i=_0x572008?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x572008=!1,i}),_0x4b6964=_0x5d3935(void 0,(function(){return _0x4b6964.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b6964).search("(((.+)+)+)+$")})),_0x572008;function _0x37a515(){this._ubo=void 0,this._name="",this._isValueDirty=!0,this._isTextureDirty=!1,this._uniformMap=void 0}_0x4b6964(),Object.defineProperties(_0x37a515.prototype,{GPUbuffer:{get:function(){return this._ubo.getBuffer()}},buffer:{get:function(){return this._ubo}},name:{get:function(){return this._name}},valueDirty:{set:function(e){return this._isValueDirty=e},get:function(){return this._isValueDirty}},textureDirty:{set:function(e){return this._isTextureDirty=e},get:function(){return this._isTextureDirty}},uniformMap:{get:function(){return this._uniformMap}}}),_0x37a515.prototype.update=function(e,t){},_0x37a515.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x37a515.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x37a515.writeCartesian2ToUBO=function(e,t,i){t.updateFloat2(e,i.x,i.y)},_0x37a515.writeCartesian3ToUBO=function(e,t,i){t.updateFloat3(e,i.x,i.y,i.z)},_0x37a515.writeCartesian4ToUBO=function(e,t,i){t.updateFloat4(e,i.x,i.y,i.z,i.w)};var _0x48ac1d=new Float32Array(16),_0x5c191c=new Matrix,_0x188c73=new Float32Array(9);function e$1Y(){}function r$16(){(_0x37a515.call(this)||this)._name=_0x2e0417.MESH}_0x37a515.writeMatrix3ToUBO=function(e,t,i){p$1e.toArray(i,_0x188c73),t.updateMatrix3x3(e,_0x188c73)},_0x37a515.writeMatrix4ToUBO=function(e,t,i){p$1d.toArray(i,_0x48ac1d),Matrix.FromArrayToRef(_0x48ac1d,0,_0x5c191c),t.updateMatrix(e,_0x5c191c)},_0x37a515.writeColorToUBO=function(e,t,i){t.updateFloat4(e,i.red,i.green,i.blue,i.alpha)},_0x37a515.setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x37a515.setTextureArrayToEffect=function(e,t,i){var n,r=t.length,o=[];for(n=0;n<r;++n){var a=t[n];o.push(a._inner._texture)}r>0&&e.setTextureArray(i,o)},_0x37a515.prototype.isDestroyed=function(){return!1},_0x37a515.prototype.destroy=function(){return this._ubo.dispose(),i$11(this)},e$1Y.totalQueryCount=0,e$1Y.thisFrameQueryCount=0,e$1Y.maxQueryPerFrame=1,e$1Y.updateArrayByQueryID=new Uint32Array(8192),e$1Y.reset=function(){e$1Y.thisFrameQueryCount=0;var e=e$1Y.totalQueryCount/5;e$1Y.maxQueryPerFrame=Math.ceil(e)},e$1Y.createQuery=function(e){e$1Y.totalQueryCount++,e$1Y.updateArrayByQueryID[e]=0},e$1Y.deleteQuery=function(e){e$1Y.totalQueryCount--,e$1Y.totalQueryCount<0&&(e$1Y.totalQueryCount=0)},e$1Y.canQueryThisFrame=function(e,t){return!(e$1Y.thisFrameQueryCount>=e$1Y.maxQueryPerFrame)&&!(t-e$1Y.updateArrayByQueryID[e]<=5)},e$1Y.updateQuery=function(e,t){e$1Y.updateArrayByQueryID[e]=t},_0x37a515&&(r$16.__proto__=_0x37a515),r$16.prototype=Object.create(_0x37a515&&_0x37a515.prototype),r$16.prototype.constructor=_0x37a515,r$16.prototype._initUBO=function(e){this._ubo=new _0x5c4ccd(e.engine,void 0,!1,_0x2e0417.MESH,!1,!1),this._ubo.addUniform("uModelMatrix",16),this._ubo.create()},r$16.prototype.update=function(e,t){this._ubo||this._initUBO(e),_0x37a515.writeMatrix4ToUBO("uModelMatrix",this._ubo,t),this._ubo.update()},r$16.prototype.isDestroyed=function(){return!1},r$16.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};const D$10=8192;var M$18={OCCLUSION_TYPE_NONE:0,OCCLUSION_TYPE_OPTIMISTIC:1,OCCLUSION_TYPE_STRICT:2};function w$11(){this.occlusionInternalRetryCounter=0,this.isOcclusionQueryInProgress=!1,this.isOccluded=!1,this.occlusionRetryCount=-1,this.occlusionType=M$18.OCCLUSION_TYPE_OPTIMISTIC,this.forceRenderingWhenOccluded=!1}function i$10(e,t,i){this._occlusionDataStorage=new w$11,this._context=e,this._occlusionQuery=null,this._meshDrawCommand=t,this._occlusionMeshDrawCommand=i,this._matModel=new p$1d,this._relativeModelMatrix=new p$1d,this._createFrameId=-1}i$10.prototype.isOccluded=function(){return this._occlusionDataStorage.isOccluded},i$10.prototype.checkOcclusionQuery=function(e,t){var i=t.frameNumber;const n=this._occlusionDataStorage;if(n.occlusionType===M$18.OCCLUSION_TYPE_NONE)return n.isOccluded=!1,!1;this._prepare();var r=this._context.engine;if(this._occlusionDataStorage.isOcclusionQueryInProgress&&this._occlusionQuery){const e=r.isQueryResultAvailable(this._occlusionQuery,this),t=r.getQueryResultFrameID();if(e&&this._createFrameId<=t){const e=r.getQueryResult(this._occlusionQuery);n.isOcclusionQueryInProgress=!1,n.occlusionInternalRetryCounter=0,n.isOccluded=!(e>0)}else{if(!e)return!1;this._createFrameId>t&&(n.isOccluded=!1)}}if(this._occlusionQuery&&!e$1Y.canQueryThisFrame(this._occlusionQuery,i))return n.isOccluded;var o=t.camera.position;if(this._meshDrawCommand.orientedBoundingBox){if(y$Y.isPointIn(this._meshDrawCommand.orientedBoundingBox,o))return n.isOccluded=!1,!1}else if(this._meshDrawCommand.boundingVolume.distanceSquaredTo(o)<0)return n.isOccluded=!1,!1;return null===this._occlusionQuery&&(this._occlusionQuery=r.createQuery(),e$1Y.createQuery(this._occlusionQuery),this._createFrameId=r.frameId+5),this._occlusionQuery<D$10&&(this._occlusionMeshDrawCommand.occlusionQueryID=this._occlusionQuery,this._occlusionMeshDrawCommand.execute(this._context,e),this._occlusionDataStorage.isOcclusionQueryInProgress=!0,e$1Y.updateQuery(this._occlusionQuery,i)),n.isOccluded},i$10.prototype._prepare=function(){this._meshUBO||(this._meshUBO=new r$16,this._occlusionMeshDrawCommand.addUniformBuffer(this._meshUBO),this._occlusionMeshDrawCommand.addUniformBuffer(this._context.uniformState.sceneUBO),this._meshDrawCommand.orientedBoundingBox?this._obbToWorldMatrix(this._meshDrawCommand.orientedBoundingBox):this._boundingVolumeToWorldMatrix(this._meshDrawCommand.boundingVolume),this.updateRelativeModelMatrix(),this._context._boundingBoxRenderer.initDrawCommand(this._occlusionMeshDrawCommand))};var d$1n=new o$1p;i$10.prototype.updateRelativeModelMatrix=function(){p$1d.clone(this._matModel,this._relativeModelMatrix),p$1d.getTranslation(this._matModel,d$1n),o$1p.subtract(d$1n,this._context.relativeOrigin,d$1n),p$1d.setTranslation(this._relativeModelMatrix,d$1n,this._relativeModelMatrix),this._meshUBO.update(this._context,this._relativeModelMatrix)};var a$Z=new e$1_;i$10.prototype._boundingVolumeToWorldMatrix=function(e){a$Z.translation=o$1p.clone(e.center,a$Z.translation);var t=2*e.radius;a$Z.scale.x=t,a$Z.scale.y=t,a$Z.scale.z=t,p$1d.fromTranslationRotationScale(a$Z,this._matModel)};var x$1c=new p$1e,S$Z=new o$1p(2,2,2),l$1a,j$1c,E$1h;function i$$(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._cull=u$Z(e.cull,!0),this._occlude=u$Z(e.occlude,!0),this._modelMatrix=e.modelMatrix,this._primitiveType=u$Z(e.primitiveType,W$18.TRIANGLES),this._vertexArray=e.vertexArray,this._count=e.count,this._offset=u$Z(e.offset,0),this._instanceCount=u$Z(e.instanceCount,0),this._shaderProgram=e.shaderProgram,this._uniformMap=e.uniformMap,this._renderState=e.renderState,this._framebuffer=e.framebuffer,this._pass=e.pass,this._executeInClosestFrustum=u$Z(e.executeInClosestFrustum,!1),this._owner=e.owner,this._debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this._debugOverlappingFrustums=0,this._castShadows=u$Z(e.castShadows,!1),this._receiveShadows=u$Z(e.receiveShadows,!1),this._selectCastShadows=!1,this._pickId=e.pickId,this._pickOnly=u$Z(e.pickOnly,!1),this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={},this._uniformBuffers=[],this._relativeOrigin=new o$1p,this._relativeModelMatrix=new p$1d,this._useRelativeOrigin=!0,this._fastBundleDirty=!0,e$2e(this._matModel)?p$1d.clone(this._matModel,this._relativeModelMatrix):p$1d.clone(p$1d.IDENTITY,this._relativeModelMatrix),this._activeFrameBufferID=-1,this._fastBundle={},this._s3mlayer=!1,this._occulsionQueryEnable=u$Z(e.occulsionQueryEnable,!1),!e$2e(this._count)&&e$2e(this._vertexArray)){var t=this._vertexArray.indexBuffer;e$2e(t)&&(this._count=t.numberOfIndices)}this._vertexArrayID=-1,this._lastUseVertexArrayID=-1}function m$17(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function e$1X(e,t,i,n){this.red=u$Z(e,1),this.green=u$Z(t,1),this.blue=u$Z(i,1),this.alpha=u$Z(n,1)}i$10.prototype._obbToWorldMatrix=function(e){p$1e.fromArray(e.halfAxes,0,x$1c),this._matModel=p$1d.fromRotationTranslation(x$1c,e.center,this._matModel),p$1d.multiplyByScale(this._matModel,S$Z,this._matModel)},i$10.prototype.isDestroyed=function(){return!1},i$10.prototype.destroy=function(){return this._occlusionQuery&&(this._context.engine.deleteQuery(this._occlusionQuery),this._occlusionQuery=null,this._occlusionDataStorage.isOcclusionQueryInProgress=!1,e$1Y.deleteQuery(this._occlusionQuery)),this._meshUBO&&this._meshUBO.destroy(),this._occlusionMeshDrawCommand=null,i$11(this)},Object.defineProperties(i$$.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this.dirty=!0)}},occlude:{get:function(){return this._occlude},set:function(e){this._occlude!==e&&(this._occlude=e,this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){if(this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0,e$2e(e)?this._vertexArrayID=e.uniqueID:this._vertexArrayID=-1,!e$2e(this._count))){var t=e.indexBuffer;e$2e(t)&&(this._count=t.numberOfIndices)}}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0,this._fastBundleDirty=!0)}},castShadows:{get:function(){return this._castShadows},set:function(e){this._castShadows!==e&&(this._castShadows=e,this.dirty=!0)}},selectCastShadows:{get:function(){return this._selectCastShadows},set:function(e){this._selectCastShadows!==e&&(this._selectCastShadows=e,this.dirty=!0)}},receiveShadows:{get:function(){return this._receiveShadows},set:function(e){this._receiveShadows!==e&&(this._receiveShadows=e,this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this._combineUniformMapWithUBO(),this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return this._executeInClosestFrustum},set:function(e){this._executeInClosestFrustum!==e&&(this._executeInClosestFrustum=e,this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickOnly:{get:function(){return this._pickOnly},set:function(e){this._pickOnly!==e&&(this._pickOnly=e,this.dirty=!0)}},transformFeedback:{get:function(){return this._transformFeedback},set:function(e){this._transformFeedback=e}},fastBundleDirty:{get:function(){return this._fastBundleDirty}},s3mLayer:{get:function(){return this._s3mlayer},set:function(e){this._s3mlayer=e}},occlusionQueryEnable:{get:function(){return this._occulsionQueryEnable},set:function(e){this._occulsionQueryEnable=e}},useRelativeOrigin:{get:function(){return this._useRelativeOrigin},set:function(e){this._useRelativeOrigin=e}}}),i$$.prototype.addUniformBuffer=function(e){this._uniformBuffers.push(e),e.uniformMap&&(this._uniformMap=p$19(this._uniformMap,e.uniformMap))},i$$.prototype.removeAllUniformBuffer=function(){this._uniformBuffers=[]},i$$.shallowClone=function(e,t){if(e$2e(e))return e$2e(t)||(t=new i$$),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._cull=e._cull,t._occlude=e._occlude,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._uniformBuffers=e._uniformBuffers,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._executeInClosestFrustum=e._executeInClosestFrustum,t._owner=e._owner,t._debugShowBoundingVolume=e._debugShowBoundingVolume,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._castShadows=e._castShadows,t._receiveShadows=e._receiveShadows,t._selectCastShadows=e._selectCastShadows,t._pickId=e._pickId,t._pickOnly=e._pickOnly,t._pointCloudEyeDomeLighting=e._pointCloudEyeDomeLighting,t._transformFeedback=e._transformFeedback,t._relativeOrigin=e._relativeOrigin,t._relativeModelMatrix=e._relativeModelMatrix,t._occlusionMesh=e._occlusionMesh,t._occulsionQueryEnable=e._occulsionQueryEnable,t._useRelativeOrigin=e._useRelativeOrigin,t.dirty=!0,t.lastDirtyTime=0,t._vertexArrayID=e._vertexArrayID,t._activeFrameBufferID=e._activeFrameBufferID,t},i$$.prototype.execute=function(e,t){e.draw(this,t)},i$$.prototype.setActiveFrameBufferID=function(e){this._activeFrameBufferID=e},i$$.prototype.setFastBundle=function(e){this._fastBundle[this._activeFrameBufferID]=e,this._fastBundleDirty=!1},i$$.prototype.removeAllFastBundleAndBindGroups=function(){this.bindGroups=void 0,this._fastBundle={}},i$$.prototype.getActiveBundle=function(){return this._fastBundle[this._activeFrameBufferID]},i$$.prototype.checkOcclusionQuery=function(e,t,i){return!(!e.webgpu||!this._occulsionQueryEnable)&&(this._occlusionMesh||(this._occlusionMesh=new i$10(e,this,new i$$)),this._occlusionMesh.checkOcclusionQuery(t,i))},i$$.prototype.isOccluded=function(){return!(!this._occulsionQueryEnable||!this._occlusionMesh)&&this._occlusionMesh.isOccluded()},i$$.prototype._combineUniformMapWithUBO=function(){for(var e=0;e<this._uniformBuffers.length;e++){var t=this._uniformBuffers[e];t.uniformMap&&(this._uniformMap=p$19(this._uniformMap,t.uniformMap))}},e$1X.fromCartesian4=function(e,t){return o$1q.typeOf.object("cartesian",e),e$2e(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new e$1X(e.x,e.y,e.z,e.w)},e$1X.fromBytes=function(e,t,i,n,r){return e=e$1X.byteToFloat(u$Z(e,255)),t=e$1X.byteToFloat(u$Z(t,255)),i=e$1X.byteToFloat(u$Z(i,255)),n=e$1X.byteToFloat(u$Z(n,255)),e$2e(r)?(r.red=e,r.green=t,r.blue=i,r.alpha=n,r):new e$1X(e,t,i,n)},e$1X.fromAlpha=function(e,t,i){return o$1q.typeOf.object("color",e),o$1q.typeOf.number("alpha",t),e$2e(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=t,i):new e$1X(e.red,e.green,e.blue,t)},s$Z.supportsTypedArrays()&&(l$1a=new ArrayBuffer(4),j$1c=new Uint32Array(l$1a),E$1h=new Uint8Array(l$1a)),e$1X.fromRgba=function(e,t){return j$1c[0]=e,e$1X.fromBytes(E$1h[0],E$1h[1],E$1h[2],E$1h[3],t)},e$1X.byteToRgba=function(e,t,i,n){return E$1h[0]=e,E$1h[1]=t,E$1h[2]=i,E$1h[3]=n,j$1c[0]},e$1X.fromHsl=function(e,t,i,n,r){e=u$Z(e,0)%1,t=u$Z(t,0),i=u$Z(i,0),n=u$Z(n,1);var o=i,a=i,s=i;if(0!==t){var l,u=2*i-(l=i<.5?i*(1+t):i+t-i*t);o=m$17(u,l,e+1/3),a=m$17(u,l,e),s=m$17(u,l,e-1/3)}return e$2e(r)?(r.red=o,r.green=a,r.blue=s,r.alpha=n,r):new e$1X(o,a,s,n)},e$1X.fromRandom=function(e,t){var i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).red;if(!e$2e(i)){var n=u$Z(e.minimumRed,0),r=u$Z(e.maximumRed,1);o$1q.typeOf.number.lessThanOrEquals("minimumRed",n,r),i=n+e$2d.nextRandomNumber()*(r-n)}var o=e.green;if(!e$2e(o)){var a=u$Z(e.minimumGreen,0),s=u$Z(e.maximumGreen,1);o$1q.typeOf.number.lessThanOrEquals("minimumGreen",a,s),o=a+e$2d.nextRandomNumber()*(s-a)}var l=e.blue;if(!e$2e(l)){var u=u$Z(e.minimumBlue,0),c=u$Z(e.maximumBlue,1);o$1q.typeOf.number.lessThanOrEquals("minimumBlue",u,c),l=u+e$2d.nextRandomNumber()*(c-u)}var h=e.alpha;if(!e$2e(h)){var d=u$Z(e.minimumAlpha,0),f=u$Z(e.maximumAlpha,1);o$1q.typeOf.number.lessThanOrEquals("minumumAlpha",d,f),h=d+e$2d.nextRandomNumber()*(f-d)}return e$2e(t)?(t.red=i,t.green=o,t.blue=l,t.alpha=h,t):new e$1X(i,o,l,h)};var R$13=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,L$1c=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,B$11=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,T$16=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;e$1X.fromCssColorString=function(e,t){o$1q.typeOf.string("color",e),e$2e(t)||(t=new e$1X);var i=e$1X[e.toUpperCase()];if(e$2e(i))return e$1X.clone(i,t),t;var n=R$13.exec(e);return null!==n?(t.red=parseInt(n[1],16)/15,t.green=parseInt(n[2],16)/15,t.blue=parseInt(n[3],16)/15,t.alpha=1,t):null!==(n=L$1c.exec(e))?(t.red=parseInt(n[1],16)/255,t.green=parseInt(n[2],16)/255,t.blue=parseInt(n[3],16)/255,t.alpha=1,t):null!==(n=B$11.exec(e))?(t.red=parseFloat(n[1])/("%"===n[1].substr(-1)?100:255),t.green=parseFloat(n[2])/("%"===n[2].substr(-1)?100:255),t.blue=parseFloat(n[3])/("%"===n[3].substr(-1)?100:255),t.alpha=parseFloat(u$Z(n[4],"1.0")),t):null!==(n=T$16.exec(e))?e$1X.fromHsl(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(u$Z(n[4],"1.0")),t):t=void 0},e$1X.packedLength=4,e$1X.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.red,t[i++]=e.green,t[i++]=e.blue,t[i]=e.alpha,t},e$1X.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new e$1X),i.red=e[t++],i.green=e[t++],i.blue=e[t++],i.alpha=e[t],i},e$1X.byteToFloat=function(e){return e/255},e$1X.floatToByte=function(e){return 1===e?255:256*e|0},e$1X.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new e$1X(e.red,e.green,e.blue,e.alpha)},e$1X.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},e$1X.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},e$1X.prototype.clone=function(e){return e$1X.clone(this,e)},e$1X.prototype.equals=function(e){return e$1X.equals(this,e)},e$1X.prototype.equalsEpsilon=function(e,t){return this===e||e$2e(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},e$1X.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},e$1X.prototype.toCssColorString=function(){var e=e$1X.floatToByte(this.red),t=e$1X.floatToByte(this.green),i=e$1X.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},e$1X.prototype.toBytes=function(e){var t=e$1X.floatToByte(this.red),i=e$1X.floatToByte(this.green),n=e$1X.floatToByte(this.blue),r=e$1X.floatToByte(this.alpha);return e$2e(e)?(e[0]=t,e[1]=i,e[2]=n,e[3]=r,e):[t,i,n,r]},e$1X.prototype.toRgba=function(){return E$1h[0]=e$1X.floatToByte(this.red),E$1h[1]=e$1X.floatToByte(this.green),E$1h[2]=e$1X.floatToByte(this.blue),E$1h[3]=e$1X.floatToByte(this.alpha),j$1c[0]},e$1X.prototype.brighten=function(e,t){return o$1q.typeOf.number("magnitude",e),o$1q.typeOf.number.greaterThanOrEquals("magnitude",e,0),o$1q.typeOf.object("result",t),e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},e$1X.prototype.darken=function(e,t){return o$1q.typeOf.number("magnitude",e),o$1q.typeOf.number.greaterThanOrEquals("magnitude",e,0),o$1q.typeOf.object("result",t),e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},e$1X.prototype.withAlpha=function(e,t){return e$1X.fromAlpha(this,e,t)},e$1X.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},e$1X.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},e$1X.multiply=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},e$1X.divide=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},e$1X.mod=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},e$1X.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),n.red=e$2d.lerp(e.red,t.red,i),n.green=e$2d.lerp(e.green,t.green,i),n.blue=e$2d.lerp(e.blue,t.blue,i),n.alpha=e$2d.lerp(e.alpha,t.alpha,i),n},e$1X.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("color",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},e$1X.divideByScalar=function(e,t,i){return o$1q.typeOf.object("color",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},e$1X.ALICEBLUE=Object.freeze(e$1X.fromCssColorString("#F0F8FF")),e$1X.ANTIQUEWHITE=Object.freeze(e$1X.fromCssColorString("#FAEBD7")),e$1X.AQUA=Object.freeze(e$1X.fromCssColorString("#00FFFF")),e$1X.AQUAMARINE=Object.freeze(e$1X.fromCssColorString("#7FFFD4")),e$1X.AZURE=Object.freeze(e$1X.fromCssColorString("#F0FFFF")),e$1X.BEIGE=Object.freeze(e$1X.fromCssColorString("#F5F5DC")),e$1X.BISQUE=Object.freeze(e$1X.fromCssColorString("#FFE4C4")),e$1X.BLACK=Object.freeze(e$1X.fromCssColorString("#000000")),e$1X.BLANCHEDALMOND=Object.freeze(e$1X.fromCssColorString("#FFEBCD")),e$1X.BLUE=Object.freeze(e$1X.fromCssColorString("#0000FF")),e$1X.BLUEVIOLET=Object.freeze(e$1X.fromCssColorString("#8A2BE2")),e$1X.BROWN=Object.freeze(e$1X.fromCssColorString("#A52A2A")),e$1X.BURLYWOOD=Object.freeze(e$1X.fromCssColorString("#DEB887")),e$1X.CADETBLUE=Object.freeze(e$1X.fromCssColorString("#5F9EA0")),e$1X.CHARTREUSE=Object.freeze(e$1X.fromCssColorString("#7FFF00")),e$1X.CHOCOLATE=Object.freeze(e$1X.fromCssColorString("#D2691E")),e$1X.CORAL=Object.freeze(e$1X.fromCssColorString("#FF7F50")),e$1X.CORNFLOWERBLUE=Object.freeze(e$1X.fromCssColorString("#6495ED")),e$1X.CORNSILK=Object.freeze(e$1X.fromCssColorString("#FFF8DC")),e$1X.CRIMSON=Object.freeze(e$1X.fromCssColorString("#DC143C")),e$1X.CYAN=Object.freeze(e$1X.fromCssColorString("#00FFFF")),e$1X.DARKBLUE=Object.freeze(e$1X.fromCssColorString("#00008B")),e$1X.DARKCYAN=Object.freeze(e$1X.fromCssColorString("#008B8B")),e$1X.DARKGOLDENROD=Object.freeze(e$1X.fromCssColorString("#B8860B")),e$1X.DARKGRAY=Object.freeze(e$1X.fromCssColorString("#A9A9A9")),e$1X.DARKGREEN=Object.freeze(e$1X.fromCssColorString("#006400")),e$1X.DARKGREY=e$1X.DARKGRAY,e$1X.DARKKHAKI=Object.freeze(e$1X.fromCssColorString("#BDB76B")),e$1X.DARKMAGENTA=Object.freeze(e$1X.fromCssColorString("#8B008B")),e$1X.DARKOLIVEGREEN=Object.freeze(e$1X.fromCssColorString("#556B2F")),e$1X.DARKORANGE=Object.freeze(e$1X.fromCssColorString("#FF8C00")),e$1X.DARKORCHID=Object.freeze(e$1X.fromCssColorString("#9932CC")),e$1X.DARKRED=Object.freeze(e$1X.fromCssColorString("#8B0000")),e$1X.DARKSALMON=Object.freeze(e$1X.fromCssColorString("#E9967A")),e$1X.DARKSEAGREEN=Object.freeze(e$1X.fromCssColorString("#8FBC8F")),e$1X.DARKSLATEBLUE=Object.freeze(e$1X.fromCssColorString("#483D8B")),e$1X.DARKSLATEGRAY=Object.freeze(e$1X.fromCssColorString("#2F4F4F")),e$1X.DARKSLATEGREY=e$1X.DARKSLATEGRAY,e$1X.DARKTURQUOISE=Object.freeze(e$1X.fromCssColorString("#00CED1")),e$1X.DARKVIOLET=Object.freeze(e$1X.fromCssColorString("#9400D3")),e$1X.DEEPPINK=Object.freeze(e$1X.fromCssColorString("#FF1493")),e$1X.DEEPSKYBLUE=Object.freeze(e$1X.fromCssColorString("#00BFFF")),e$1X.DIMGRAY=Object.freeze(e$1X.fromCssColorString("#696969")),e$1X.DIMGREY=e$1X.DIMGRAY,e$1X.DODGERBLUE=Object.freeze(e$1X.fromCssColorString("#1E90FF")),e$1X.FIREBRICK=Object.freeze(e$1X.fromCssColorString("#B22222")),e$1X.FLORALWHITE=Object.freeze(e$1X.fromCssColorString("#FFFAF0")),e$1X.FORESTGREEN=Object.freeze(e$1X.fromCssColorString("#228B22")),e$1X.FUCHSIA=Object.freeze(e$1X.fromCssColorString("#FF00FF")),e$1X.GAINSBORO=Object.freeze(e$1X.fromCssColorString("#DCDCDC")),e$1X.GHOSTWHITE=Object.freeze(e$1X.fromCssColorString("#F8F8FF")),e$1X.GOLD=Object.freeze(e$1X.fromCssColorString("#FFD700")),e$1X.GOLDENROD=Object.freeze(e$1X.fromCssColorString("#DAA520")),e$1X.GRAY=Object.freeze(e$1X.fromCssColorString("#808080")),e$1X.GREEN=Object.freeze(e$1X.fromCssColorString("#008000")),e$1X.GREENYELLOW=Object.freeze(e$1X.fromCssColorString("#ADFF2F")),e$1X.GREY=e$1X.GRAY,e$1X.HONEYDEW=Object.freeze(e$1X.fromCssColorString("#F0FFF0")),e$1X.HOTPINK=Object.freeze(e$1X.fromCssColorString("#FF69B4")),e$1X.INDIANRED=Object.freeze(e$1X.fromCssColorString("#CD5C5C")),e$1X.INDIGO=Object.freeze(e$1X.fromCssColorString("#4B0082")),e$1X.IVORY=Object.freeze(e$1X.fromCssColorString("#FFFFF0")),e$1X.KHAKI=Object.freeze(e$1X.fromCssColorString("#F0E68C")),e$1X.LAVENDER=Object.freeze(e$1X.fromCssColorString("#E6E6FA")),e$1X.LAVENDAR_BLUSH=Object.freeze(e$1X.fromCssColorString("#FFF0F5")),e$1X.LAWNGREEN=Object.freeze(e$1X.fromCssColorString("#7CFC00")),e$1X.LEMONCHIFFON=Object.freeze(e$1X.fromCssColorString("#FFFACD")),e$1X.LIGHTBLUE=Object.freeze(e$1X.fromCssColorString("#ADD8E6")),e$1X.LIGHTCORAL=Object.freeze(e$1X.fromCssColorString("#F08080")),e$1X.LIGHTCYAN=Object.freeze(e$1X.fromCssColorString("#E0FFFF")),e$1X.LIGHTGOLDENRODYELLOW=Object.freeze(e$1X.fromCssColorString("#FAFAD2")),e$1X.LIGHTGRAY=Object.freeze(e$1X.fromCssColorString("#D3D3D3")),e$1X.LIGHTGREEN=Object.freeze(e$1X.fromCssColorString("#90EE90")),e$1X.LIGHTGREY=e$1X.LIGHTGRAY,e$1X.LIGHTPINK=Object.freeze(e$1X.fromCssColorString("#FFB6C1")),e$1X.LIGHTSEAGREEN=Object.freeze(e$1X.fromCssColorString("#20B2AA")),e$1X.LIGHTSKYBLUE=Object.freeze(e$1X.fromCssColorString("#87CEFA")),e$1X.LIGHTSLATEGRAY=Object.freeze(e$1X.fromCssColorString("#778899")),e$1X.LIGHTSLATEGREY=e$1X.LIGHTSLATEGRAY,e$1X.LIGHTSTEELBLUE=Object.freeze(e$1X.fromCssColorString("#B0C4DE")),e$1X.LIGHTYELLOW=Object.freeze(e$1X.fromCssColorString("#FFFFE0")),e$1X.LIME=Object.freeze(e$1X.fromCssColorString("#00FF00")),e$1X.LIMEGREEN=Object.freeze(e$1X.fromCssColorString("#32CD32")),e$1X.LINEN=Object.freeze(e$1X.fromCssColorString("#FAF0E6")),e$1X.MAGENTA=Object.freeze(e$1X.fromCssColorString("#FF00FF")),e$1X.MAROON=Object.freeze(e$1X.fromCssColorString("#800000")),e$1X.MEDIUMAQUAMARINE=Object.freeze(e$1X.fromCssColorString("#66CDAA")),e$1X.MEDIUMBLUE=Object.freeze(e$1X.fromCssColorString("#0000CD")),e$1X.MEDIUMORCHID=Object.freeze(e$1X.fromCssColorString("#BA55D3")),e$1X.MEDIUMPURPLE=Object.freeze(e$1X.fromCssColorString("#9370DB")),e$1X.MEDIUMSEAGREEN=Object.freeze(e$1X.fromCssColorString("#3CB371")),e$1X.MEDIUMSLATEBLUE=Object.freeze(e$1X.fromCssColorString("#7B68EE")),e$1X.MEDIUMSPRINGGREEN=Object.freeze(e$1X.fromCssColorString("#00FA9A")),e$1X.MEDIUMTURQUOISE=Object.freeze(e$1X.fromCssColorString("#48D1CC")),e$1X.MEDIUMVIOLETRED=Object.freeze(e$1X.fromCssColorString("#C71585")),e$1X.MIDNIGHTBLUE=Object.freeze(e$1X.fromCssColorString("#191970")),e$1X.MINTCREAM=Object.freeze(e$1X.fromCssColorString("#F5FFFA")),e$1X.MISTYROSE=Object.freeze(e$1X.fromCssColorString("#FFE4E1")),e$1X.MOCCASIN=Object.freeze(e$1X.fromCssColorString("#FFE4B5")),e$1X.NAVAJOWHITE=Object.freeze(e$1X.fromCssColorString("#FFDEAD")),e$1X.NAVY=Object.freeze(e$1X.fromCssColorString("#000080")),e$1X.OLDLACE=Object.freeze(e$1X.fromCssColorString("#FDF5E6")),e$1X.OLIVE=Object.freeze(e$1X.fromCssColorString("#808000")),e$1X.OLIVEDRAB=Object.freeze(e$1X.fromCssColorString("#6B8E23")),e$1X.ORANGE=Object.freeze(e$1X.fromCssColorString("#FFA500")),e$1X.ORANGERED=Object.freeze(e$1X.fromCssColorString("#FF4500")),e$1X.ORCHID=Object.freeze(e$1X.fromCssColorString("#DA70D6")),e$1X.PALEGOLDENROD=Object.freeze(e$1X.fromCssColorString("#EEE8AA")),e$1X.PALEGREEN=Object.freeze(e$1X.fromCssColorString("#98FB98")),e$1X.PALETURQUOISE=Object.freeze(e$1X.fromCssColorString("#AFEEEE")),e$1X.PALEVIOLETRED=Object.freeze(e$1X.fromCssColorString("#DB7093")),e$1X.PAPAYAWHIP=Object.freeze(e$1X.fromCssColorString("#FFEFD5")),e$1X.PEACHPUFF=Object.freeze(e$1X.fromCssColorString("#FFDAB9")),e$1X.PERU=Object.freeze(e$1X.fromCssColorString("#CD853F")),e$1X.PINK=Object.freeze(e$1X.fromCssColorString("#FFC0CB")),e$1X.PLUM=Object.freeze(e$1X.fromCssColorString("#DDA0DD")),e$1X.POWDERBLUE=Object.freeze(e$1X.fromCssColorString("#B0E0E6")),e$1X.PURPLE=Object.freeze(e$1X.fromCssColorString("#800080")),e$1X.RED=Object.freeze(e$1X.fromCssColorString("#FF0000")),e$1X.ROSYBROWN=Object.freeze(e$1X.fromCssColorString("#BC8F8F")),e$1X.ROYALBLUE=Object.freeze(e$1X.fromCssColorString("#4169E1")),e$1X.SADDLEBROWN=Object.freeze(e$1X.fromCssColorString("#8B4513")),e$1X.SALMON=Object.freeze(e$1X.fromCssColorString("#FA8072")),e$1X.SANDYBROWN=Object.freeze(e$1X.fromCssColorString("#F4A460")),e$1X.SEAGREEN=Object.freeze(e$1X.fromCssColorString("#2E8B57")),e$1X.SEASHELL=Object.freeze(e$1X.fromCssColorString("#FFF5EE")),e$1X.SIENNA=Object.freeze(e$1X.fromCssColorString("#A0522D")),e$1X.SILVER=Object.freeze(e$1X.fromCssColorString("#C0C0C0")),e$1X.SKYBLUE=Object.freeze(e$1X.fromCssColorString("#87CEEB")),e$1X.SLATEBLUE=Object.freeze(e$1X.fromCssColorString("#6A5ACD")),e$1X.SLATEGRAY=Object.freeze(e$1X.fromCssColorString("#708090")),e$1X.SLATEGREY=e$1X.SLATEGRAY,e$1X.SNOW=Object.freeze(e$1X.fromCssColorString("#FFFAFA")),e$1X.SPRINGGREEN=Object.freeze(e$1X.fromCssColorString("#00FF7F")),e$1X.STEELBLUE=Object.freeze(e$1X.fromCssColorString("#4682B4")),e$1X.TAN=Object.freeze(e$1X.fromCssColorString("#D2B48C")),e$1X.TEAL=Object.freeze(e$1X.fromCssColorString("#008080")),e$1X.THISTLE=Object.freeze(e$1X.fromCssColorString("#D8BFD8")),e$1X.TOMATO=Object.freeze(e$1X.fromCssColorString("#FF6347")),e$1X.TURQUOISE=Object.freeze(e$1X.fromCssColorString("#40E0D0")),e$1X.VIOLET=Object.freeze(e$1X.fromCssColorString("#EE82EE")),e$1X.WHEAT=Object.freeze(e$1X.fromCssColorString("#F5DEB3")),e$1X.WHITE=Object.freeze(e$1X.fromCssColorString("#FFFFFF")),e$1X.WHITESMOKE=Object.freeze(e$1X.fromCssColorString("#F5F5F5")),e$1X.YELLOW=Object.freeze(e$1X.fromCssColorString("#FFFF00")),e$1X.YELLOWGREEN=Object.freeze(e$1X.fromCssColorString("#9ACD32")),e$1X.TRANSPARENT=Object.freeze(new e$1X(0,0,0,0));var e$1W={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:10,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1,_uniformBufferOffsetAlignment:256,_maxUniformBufferBinding:36,_maxArrayTextureLayers:256};function c$16(e){if("object"!=typeof e||null===e)return e;for(var t,i=Object.keys(e),n=0;n<i.length;n++)t=i[n],e.hasOwnProperty(t)&&"_applyFunctions"!==t&&(e[t]=c$16(e[t]));return Object.freeze(e)}Object.defineProperties(e$1W,{maximumCombinedTextureImageUnits:{get:function(){return e$1W._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return e$1W._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return e$1W._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return e$1W._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return e$1W._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return e$1W._maximumTextureSize}},maximumVaryingVectors:{get:function(){return e$1W._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return e$1W._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return e$1W._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return e$1W._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return e$1W._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return e$1W._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return e$1W._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return e$1W._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return e$1W._maximumViewportWidth}},maximumViewportHeight:{get:function(){return e$1W._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return e$1W._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return e$1W._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return e$1W._maximumColorAttachments}},highpFloatSupported:{get:function(){return e$1W._highpFloatSupported}},highpIntSupported:{get:function(){return e$1W._highpIntSupported}},uniformBufferOffsetAlignment:{get:function(){return e$1W._uniformBufferOffsetAlignment}},maxUniformBufferBinding:{get:function(){return e$1W._maxUniformBufferBinding}},maxArrayTextureLayers:{get:function(){return e$1W._maxArrayTextureLayers}}});var _0x3b2396=(_0x545c37=!0,function(e,t){var i=_0x545c37?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x545c37=!1,i}),_0x6df049=_0x3b2396(void 0,(function(){return _0x6df049.toString().search("(((.+)+)+)+$").toString().constructor(_0x6df049).search("(((.+)+)+)+$")})),_0x545c37;function _0x333f62(){}_0x6df049(),_0x333f62.ALPHA_DISABLE=0,_0x333f62.ALPHA_ADD=1,_0x333f62.ALPHA_COMBINE=2,_0x333f62.ALPHA_SUBTRACT=3,_0x333f62.ALPHA_MULTIPLY=4,_0x333f62.ALPHA_MAXIMIZED=5,_0x333f62.ALPHA_ONEONE=6,_0x333f62.ALPHA_PREMULTIPLIED=7,_0x333f62.ALPHA_PREMULTIPLIED_PORTERDUFF=8,_0x333f62.ALPHA_INTERPOLATE=9,_0x333f62.ALPHA_SCREENMODE=10,_0x333f62.ALPHA_ONEONE_ONEONE=11,_0x333f62.ALPHA_ALPHATOCOLOR=12,_0x333f62.ALPHA_REVERSEONEMINUS=13,_0x333f62.ALPHA_SRC_DSTONEMINUSSRCALPHA=14,_0x333f62.ALPHA_ONEONE_ONEZERO=15,_0x333f62.ALPHA_EXCLUSION=16,_0x333f62.ALPHA_LAYER_ACCUMULATE=17,_0x333f62.ALPHA_EQUATION_ADD=0,_0x333f62.ALPHA_EQUATION_SUBSTRACT=1,_0x333f62.ALPHA_EQUATION_REVERSE_SUBTRACT=2,_0x333f62.ALPHA_EQUATION_MAX=3,_0x333f62.ALPHA_EQUATION_MIN=4,_0x333f62.ALPHA_EQUATION_DARKEN=5,_0x333f62.DELAYLOADSTATE_NONE=0,_0x333f62.DELAYLOADSTATE_LOADED=1,_0x333f62.DELAYLOADSTATE_LOADING=2,_0x333f62.DELAYLOADSTATE_NOTLOADED=4,_0x333f62.NEVER=512,_0x333f62.ALWAYS=519,_0x333f62.LESS=513,_0x333f62.EQUAL=514,_0x333f62.LEQUAL=515,_0x333f62.GREATER=516,_0x333f62.GEQUAL=518,_0x333f62.NOTEQUAL=517,_0x333f62.KEEP=7680,_0x333f62.ZERO=0,_0x333f62.REPLACE=7681,_0x333f62.INCR=7682,_0x333f62.DECR=7683,_0x333f62.INVERT=5386,_0x333f62.INCR_WRAP=34055,_0x333f62.DECR_WRAP=34056,_0x333f62.FRONT=0,_0x333f62.BACK=1,_0x333f62.TEXTURE_CLAMP_ADDRESSMODE=0,_0x333f62.TEXTURE_WRAP_ADDRESSMODE=1,_0x333f62.TEXTURE_MIRROR_ADDRESSMODE=2,_0x333f62.TEXTURE_CREATIONFLAG_STORAGE=1,_0x333f62.TEXTUREFORMAT_ALPHA=0,_0x333f62.TEXTUREFORMAT_LUMINANCE=1,_0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA=2,_0x333f62.TEXTUREFORMAT_RGB=4,_0x333f62.TEXTUREFORMAT_RGBA=5,_0x333f62.TEXTUREFORMAT_RED=6,_0x333f62.TEXTUREFORMAT_R=6,_0x333f62.TEXTUREFORMAT_RG=7,_0x333f62.TEXTUREFORMAT_RED_INTEGER=8,_0x333f62.TEXTUREFORMAT_R_INTEGER=8,_0x333f62.TEXTUREFORMAT_RG_INTEGER=9,_0x333f62.TEXTUREFORMAT_RGB_INTEGER=10,_0x333f62.TEXTUREFORMAT_RGBA_INTEGER=11,_0x333f62.TEXTUREFORMAT_BGRA=12,_0x333f62.TEXTUREFORMAT_DEPTH24_STENCIL8=13,_0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT=14,_0x333f62.TEXTUREFORMAT_DEPTH16=15,_0x333f62.TEXTUREFORMAT_DEPTH24=16,_0x333f62.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8=17,_0x333f62.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8=18,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM=36492,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM=36493,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT=36495,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT=36494,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5=33779,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3=33778,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1=33777,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1=33776,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT=35916,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4=37808,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL=36196,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2=37492,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2=37493,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC=37496,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497,_0x333f62.TEXTURETYPE_UNSIGNED_BYTE=0,_0x333f62.TEXTURETYPE_UNSIGNED_INT=0,_0x333f62.TEXTURETYPE_FLOAT=1,_0x333f62.TEXTURETYPE_HALF_FLOAT=2,_0x333f62.TEXTURETYPE_BYTE=3,_0x333f62.TEXTURETYPE_SHORT=4,_0x333f62.TEXTURETYPE_UNSIGNED_SHORT=5,_0x333f62.TEXTURETYPE_INT=6,_0x333f62.TEXTURETYPE_UNSIGNED_INTEGER=7,_0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,_0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,_0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,_0x333f62.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,_0x333f62.TEXTURETYPE_UNSIGNED_INT_24_8=12,_0x333f62.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,_0x333f62.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,_0x333f62.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,_0x333f62.TEXTURETYPE_UNDEFINED=16,_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE=1,_0x333f62.TEXTURE_NEAREST_NEAREST=1,_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE=2,_0x333f62.TEXTURE_LINEAR_LINEAR=2,_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE=3,_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,_0x333f62.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,_0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,_0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,_0x333f62.TEXTURE_NEAREST_LINEAR=7,_0x333f62.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,_0x333f62.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,_0x333f62.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,_0x333f62.TEXTURE_LINEAR_NEAREST=12,_0x333f62.TEXTURE_EXPLICIT_MODE=0,_0x333f62.TEXTURE_SPHERICAL_MODE=1,_0x333f62.TEXTURE_PLANAR_MODE=2,_0x333f62.TEXTURE_CUBIC_MODE=3,_0x333f62.TEXTURE_PROJECTION_MODE=4,_0x333f62.TEXTURE_SKYBOX_MODE=5,_0x333f62.TEXTURE_INVCUBIC_MODE=6,_0x333f62.TEXTURE_EQUIRECTANGULAR_MODE=7,_0x333f62.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,_0x333f62.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,_0x333f62.TEXTURE_FILTERING_QUALITY_OFFLINE=4096,_0x333f62.TEXTURE_FILTERING_QUALITY_HIGH=64,_0x333f62.TEXTURE_FILTERING_QUALITY_MEDIUM=16,_0x333f62.TEXTURE_FILTERING_QUALITY_LOW=8,_0x333f62.SCALEMODE_FLOOR=1,_0x333f62.SCALEMODE_NEAREST=2,_0x333f62.SCALEMODE_CEILING=3,_0x333f62.MATERIAL_TextureDirtyFlag=1,_0x333f62.MATERIAL_LightDirtyFlag=2,_0x333f62.MATERIAL_FresnelDirtyFlag=4,_0x333f62.MATERIAL_AttributesDirtyFlag=8,_0x333f62.MATERIAL_MiscDirtyFlag=16,_0x333f62.MATERIAL_PrePassDirtyFlag=32,_0x333f62.MATERIAL_AllDirtyFlag=63,_0x333f62.MATERIAL_TriangleFillMode=0,_0x333f62.MATERIAL_WireFrameFillMode=1,_0x333f62.MATERIAL_PointFillMode=2,_0x333f62.MATERIAL_PointListDrawMode=3,_0x333f62.MATERIAL_LineListDrawMode=4,_0x333f62.MATERIAL_LineLoopDrawMode=5,_0x333f62.MATERIAL_LineStripDrawMode=6,_0x333f62.MATERIAL_TriangleStripDrawMode=7,_0x333f62.MATERIAL_TriangleFanDrawMode=8,_0x333f62.MATERIAL_ClockWiseSideOrientation=0,_0x333f62.MATERIAL_CounterClockWiseSideOrientation=1,_0x333f62.ACTION_NothingTrigger=0,_0x333f62.ACTION_OnPickTrigger=1,_0x333f62.ACTION_OnLeftPickTrigger=2,_0x333f62.ACTION_OnRightPickTrigger=3,_0x333f62.ACTION_OnCenterPickTrigger=4,_0x333f62.ACTION_OnPickDownTrigger=5,_0x333f62.ACTION_OnDoublePickTrigger=6,_0x333f62.ACTION_OnPickUpTrigger=7,_0x333f62.ACTION_OnPickOutTrigger=16,_0x333f62.ACTION_OnLongPressTrigger=8,_0x333f62.ACTION_OnPointerOverTrigger=9,_0x333f62.ACTION_OnPointerOutTrigger=10,_0x333f62.ACTION_OnEveryFrameTrigger=11,_0x333f62.ACTION_OnIntersectionEnterTrigger=12,_0x333f62.ACTION_OnIntersectionExitTrigger=13,_0x333f62.ACTION_OnKeyDownTrigger=14,_0x333f62.ACTION_OnKeyUpTrigger=15,_0x333f62.PARTICLES_BILLBOARDMODE_Y=2,_0x333f62.PARTICLES_BILLBOARDMODE_ALL=7,_0x333f62.PARTICLES_BILLBOARDMODE_STRETCHED=8,_0x333f62.MESHES_CULLINGSTRATEGY_STANDARD=0,_0x333f62.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,_0x333f62.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=2,_0x333f62.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=3,_0x333f62.SCENELOADER_NO_LOGGING=0,_0x333f62.SCENELOADER_MINIMAL_LOGGING=1,_0x333f62.SCENELOADER_SUMMARY_LOGGING=2,_0x333f62.SCENELOADER_DETAILED_LOGGING=3,_0x333f62.PREPASS_IRRADIANCE_TEXTURE_TYPE=0,_0x333f62.PREPASS_POSITION_TEXTURE_TYPE=1,_0x333f62.PREPASS_VELOCITY_TEXTURE_TYPE=2,_0x333f62.PREPASS_REFLECTIVITY_TEXTURE_TYPE=3,_0x333f62.PREPASS_COLOR_TEXTURE_TYPE=4,_0x333f62.PREPASS_DEPTH_TEXTURE_TYPE=5,_0x333f62.PREPASS_NORMAL_TEXTURE_TYPE=6,_0x333f62.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE=7,_0x333f62.BUFFER_CREATIONFLAG_READ=1,_0x333f62.BUFFER_CREATIONFLAG_WRITE=2,_0x333f62.BUFFER_CREATIONFLAG_READWRITE=3,_0x333f62.BUFFER_CREATIONFLAG_UNIFORM=4,_0x333f62.BUFFER_CREATIONFLAG_VERTEX=8,_0x333f62.BUFFER_CREATIONFLAG_INDEX=16,_0x333f62.BUFFER_CREATIONFLAG_STORAGE=32,_0x333f62.RENDERPASS_MAIN=0,_0x333f62.INPUT_ALT_KEY=18,_0x333f62.INPUT_CTRL_KEY=17,_0x333f62.INPUT_META_KEY1=91,_0x333f62.INPUT_META_KEY2=92,_0x333f62.INPUT_META_KEY3=93,_0x333f62.INPUT_SHIFT_KEY=16,_0x333f62.SNAPSHOTRENDERING_STANDARD=0,_0x333f62.SNAPSHOTRENDERING_FAST=1,_0x333f62.PERSPECTIVE_CAMERA=0,_0x333f62.ORTHOGRAPHIC_CAMERA=1,_0x333f62.FOVMODE_VERTICAL_FIXED=0,_0x333f62.FOVMODE_HORIZONTAL_FIXED=1,_0x333f62.RIG_MODE_NONE=0,_0x333f62.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,_0x333f62.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,_0x333f62.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,_0x333f62.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,_0x333f62.RIG_MODE_STEREOSCOPIC_INTERLACED=14,_0x333f62.RIG_MODE_VR=20,_0x333f62.RIG_MODE_WEBVR=21,_0x333f62.RIG_MODE_CUSTOM=22,_0x333f62.MAX_SUPPORTED_UV_SETS=6,_0x333f62.GL_ALPHA_EQUATION_ADD=32774,_0x333f62.GL_ALPHA_EQUATION_MIN=32775,_0x333f62.GL_ALPHA_EQUATION_MAX=32776,_0x333f62.GL_ALPHA_EQUATION_SUBTRACT=32778,_0x333f62.GL_ALPHA_EQUATION_REVERSE_SUBTRACT=32779,_0x333f62.GL_ALPHA_FUNCTION_SRC=768,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR=769,_0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA=770,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA=771,_0x333f62.GL_ALPHA_FUNCTION_DST_ALPHA=772,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA=773,_0x333f62.GL_ALPHA_FUNCTION_DST_COLOR=774,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR=775,_0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED=776,_0x333f62.GL_ALPHA_FUNCTION_CONSTANT_COLOR=32769,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR=32770,_0x333f62.GL_ALPHA_FUNCTION_CONSTANT_ALPHA=32771,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA=32772,_0x333f62.SnippetUrl="";var _0x5585c2=(_0x2ef89e=!0,function(e,t){var i=_0x2ef89e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ef89e=!1,i}),_0x13daeb=_0x5585c2(void 0,(function(){return _0x13daeb.toString().search("(((.+)+)+)+$").toString().constructor(_0x13daeb).search("(((.+)+)+)+$")})),_0x2ef89e;function _0x4257c2(){this.reset()}_0x13daeb(),_0x4257c2.prototype.reset=function(){this.enabled=!1,this.mask=255,this.funcRef=1,this.funcMask=255,this.frontFunc=_0x4257c2.ALWAYS,this.backFunc=_0x4257c2.ALWAYS,this.frontOpStencilFail=_0x4257c2.KEEP,this.backOpStencilFail=_0x4257c2.KEEP,this.frontOpDepthFail=_0x4257c2.KEEP,this.backOpDepthFail=_0x4257c2.KEEP,this.frontOpStencilDepthPass=_0x4257c2.REPLACE,this.backOpStencilDepthPass=_0x4257c2.REPLACE},Object.defineProperty(_0x4257c2.prototype,"frontStencilFunc",{get:function(){return this.frontFunc},set:function(e){this.frontFunc=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"backStencilFunc",{get:function(){return this.backFunc},set:function(e){this.backFunc=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"stencilFuncRef",{get:function(){return this.funcRef},set:function(e){this.funcRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"stencilFuncMask",{get:function(){return this.funcMask},set:function(e){this.funcMask=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"frontStencilOpStencilFail",{get:function(){return this.frontOpStencilFail},set:function(e){this.frontOpStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"backStencilOpStencilFail",{get:function(){return this.backOpStencilFail},set:function(e){this.backOpStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"frontStencilOpDepthFail",{get:function(){return this.frontOpDepthFail},set:function(e){this.frontOpDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"backStencilOpDepthFail",{get:function(){return this.backOpDepthFail},set:function(e){this.backOpDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"frontStencilOpStencilDepthPass",{get:function(){return this.frontOpStencilDepthPass},set:function(e){this.frontOpStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"backStencilOpStencilDepthPass",{get:function(){return this.backOpStencilDepthPass},set:function(e){this.backOpStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"stencilMask",{get:function(){return this.mask},set:function(e){this.mask=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"stencilTest",{get:function(){return this.enabled},set:function(e){this.enabled=e},enumerable:!1,configurable:!0}),_0x4257c2.ALWAYS=_0x333f62.ALWAYS,_0x4257c2.KEEP=_0x333f62.KEEP,_0x4257c2.REPLACE=_0x333f62.REPLACE,_0x4257c2.FRONT=_0x333f62.FRONT,_0x4257c2.BACK=_0x333f62.BACK;var _$_={UNSIGNED_BYTE:de$y.UNSIGNED_BYTE,UNSIGNED_SHORT:de$y.UNSIGNED_SHORT,UNSIGNED_INT:de$y.UNSIGNED_INT,FLOAT:de$y.FLOAT,HALF_FLOAT:de$y.HALF_FLOAT_OES,UNSIGNED_INT_24_8:de$y.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:de$y.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:de$y.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:de$y.UNSIGNED_SHORT_5_6_5,isPacked:function(e){return e===_$_.UNSIGNED_INT_24_8||e===_$_.UNSIGNED_SHORT_4_4_4_4||e===_$_.UNSIGNED_SHORT_5_5_5_1||e===_$_.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case _$_.UNSIGNED_BYTE:return 1;case _$_.UNSIGNED_SHORT:case _$_.UNSIGNED_SHORT_4_4_4_4:case _$_.UNSIGNED_SHORT_5_5_5_1:case _$_.UNSIGNED_SHORT_5_6_5:case de$y.HALF_FLOAT:case de$y.HALF_FLOAT_OES:return 2;case _$_.UNSIGNED_INT:case _$_.FLOAT:case _$_.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===_$_.UNSIGNED_BYTE||e===_$_.UNSIGNED_SHORT||e===_$_.UNSIGNED_INT||e===_$_.FLOAT||e===de$y.HALF_FLOAT||e===de$y.HALF_FLOAT_OES||e===_$_.UNSIGNED_INT_24_8||e===_$_.UNSIGNED_SHORT_4_4_4_4||e===_$_.UNSIGNED_SHORT_5_5_5_1||e===_$_.UNSIGNED_SHORT_5_6_5},toWebGLConstant:function(e,t){switch(e){case _$_.UNSIGNED_BYTE:return de$y.UNSIGNED_BYTE;case _$_.UNSIGNED_SHORT:return de$y.UNSIGNED_SHORT;case _$_.UNSIGNED_INT:return de$y.UNSIGNED_INT;case _$_.FLOAT:return de$y.FLOAT;case _$_.HALF_FLOAT:return t.webgl2?de$y.HALF_FLOAT:de$y.HALF_FLOAT_OES;case _$_.UNSIGNED_INT_24_8:return de$y.UNSIGNED_INT_24_8;case _$_.UNSIGNED_SHORT_4_4_4_4:return de$y.UNSIGNED_SHORT_4_4_4_4;case _$_.UNSIGNED_SHORT_5_5_5_1:return de$y.UNSIGNED_SHORT_5_5_5_1;case _$_.UNSIGNED_SHORT_5_6_5:return _$_.UNSIGNED_SHORT_5_6_5}}},_$Z={DEPTH_COMPONENT:de$y.DEPTH_COMPONENT,DEPTH_COMPONENT16:de$y.DEPTH_COMPONENT16,DEPTH_COMPONENT32F:de$y.DEPTH_COMPONENT32F,DEPTH_STENCIL:de$y.DEPTH_STENCIL,ALPHA:de$y.ALPHA,RGB:de$y.RGB,RGBA:de$y.RGBA,LUMINANCE:de$y.LUMINANCE,LUMINANCE_ALPHA:de$y.LUMINANCE_ALPHA,RGB_DXT1:de$y.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:de$y.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:de$y.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:de$y.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:de$y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:de$y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:de$y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:de$y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:de$y.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:de$y.COMPRESSED_RGB_ETC1_WEBGL,RED_INTEGER:de$y.RED_INTEGER,RED:de$y.RED,RGB8_ETC2:de$y.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:de$y.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:de$y.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(e){switch(e){case _$Z.RGB:return 3;case _$Z.RGBA:return 4;case _$Z.LUMINANCE_ALPHA:return 2;case _$Z.ALPHA:case _$Z.LUMINANCE:case _$Z.RED:case _$Z.RED_INTEGER:default:return 1}},validate:function(e){return e===_$Z.DEPTH_COMPONENT||e===_$Z.DEPTH_COMPONENT16||e===_$Z.DEPTH_COMPONENT32F||e===_$Z.DEPTH_STENCIL||e===_$Z.ALPHA||e===_$Z.RED||e===_$Z.RED_INTEGER||e===_$Z.RGB||e===_$Z.RGBA||e===_$Z.LUMINANCE||e===_$Z.LUMINANCE_ALPHA||e===_$Z.RGB_DXT1||e===_$Z.RGBA_DXT1||e===_$Z.RGBA_DXT3||e===_$Z.RGBA_DXT5||e===_$Z.RGB_PVRTC_4BPPV1||e===_$Z.RGB_PVRTC_2BPPV1||e===_$Z.RGBA_PVRTC_4BPPV1||e===_$Z.RGBA_PVRTC_2BPPV1||e===_$Z.RGBA_ASTC||e===_$Z.RGB_ETC1||e===_$Z.RGB8_ETC2||e===_$Z.RGBA8_ETC2_EAC||e===_$Z.RGBA_BC7},isColorFormat:function(e){return e===_$Z.ALPHA||e===_$Z.RED||e===_$Z.RED_INTEGER||e===_$Z.RGB||e===_$Z.RGBA||e===_$Z.LUMINANCE||e===_$Z.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===_$Z.DEPTH_COMPONENT||e===_$Z.DEPTH_COMPONENT16||e===_$Z.DEPTH_COMPONENT32F||e===_$Z.DEPTH_STENCIL},isCompressedFormat:function(e){return e===_$Z.RGB_DXT1||e===_$Z.RGBA_DXT1||e===_$Z.RGBA_DXT3||e===_$Z.RGBA_DXT5||e===_$Z.RGB_PVRTC_4BPPV1||e===_$Z.RGB_PVRTC_2BPPV1||e===_$Z.RGBA_PVRTC_4BPPV1||e===_$Z.RGBA_PVRTC_2BPPV1||e===_$Z.RGBA_ASTC||e===_$Z.RGB_ETC1||e===_$Z.RGB8_ETC2||e===_$Z.RGBA8_ETC2_EAC||e===_$Z.RGBA_BC7},isDXTFormat:function(e){return e===_$Z.RGB_DXT1||e===_$Z.RGBA_DXT1||e===_$Z.RGBA_DXT3||e===_$Z.RGBA_DXT5},isPVRTCFormat:function(e){return e===_$Z.RGB_PVRTC_4BPPV1||e===_$Z.RGB_PVRTC_2BPPV1||e===_$Z.RGBA_PVRTC_4BPPV1||e===_$Z.RGBA_PVRTC_2BPPV1},isETC1Format:function(e){return e===_$Z.RGB_ETC1},compressedTextureSizeInBytes:function(e,t,i,n){var r=e$2e(n)?n:1;switch(e){case _$Z.RGB_DXT1:case _$Z.RGBA_DXT1:case _$Z.RGB_ETC1:case _$Z.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*8*r;case _$Z.RGBA_DXT3:case _$Z.RGBA_DXT5:case _$Z.RGBA_ASTC:case _$Z.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*16*r;case _$Z.RGB_PVRTC_4BPPV1:case _$Z.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8)*r;case _$Z.RGB_PVRTC_2BPPV1:case _$Z.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8)*r;case _$Z.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(i/4)*16;default:return 0}},textureSizeInBytes:function(e,t,i,n,r){var o=e$2e(r)?r:1,a=_$Z.componentsLength(e);return _$_.isPacked(t)&&(a=1),a*_$_.sizeInBytes(t)*i*n*o},alignmentInBytes:function(e,t,i){var n=_$Z.textureSizeInBytes(e,t,i,1)%4;return 0===n?4:2===n?2:1},createTypedArray:function(e,t,i,n){var r=_$_.sizeInBytes(t);return new(r===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:r===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:r===Float32Array.BYTES_PER_ELEMENT&&t===_$_.FLOAT?Float32Array:Uint32Array)(_$Z.componentsLength(e)*i*n)},flipY:function(e,t,i,n,r){if(1===r)return e;for(var o=_$Z.createTypedArray(t,i,n,r),a=_$Z.componentsLength(t),s=n*a,l=0;l<r;++l)for(var u=l*n*a,c=(r-l-1)*n*a,h=0;h<s;++h)o[c+h]=e[u+h];return o},RGBToRGBA:function(e,t,i,n){for(var r=_$Z.createTypedArray(_$Z.RGBA,t,i,n),o=e.length/3,a=0;a<o;a++)r[4*a]=e[3*a],r[4*a+1]=e[3*a+1],r[4*a+2]=e[3*a+2];return r},toInternalFormat:function(e,t,i){if(!i.webgl2)return e;if(e===_$Z.DEPTH_STENCIL)return de$y.DEPTH24_STENCIL8;if(e===_$Z.DEPTH_COMPONENT){if(t===_$_.UNSIGNED_SHORT)return de$y.DEPTH_COMPONENT16;if(t===_$_.UNSIGNED_INT)return de$y.DEPTH_COMPONENT24;if(t===_$_.FLOAT)return de$y.DEPTH_COMPONENT32F}if(e===_$Z.DEPTH_COMPONENT16)return de$y.DEPTH_COMPONENT16;if(e===_$Z.DEPTH_COMPONENT32F)return de$y.DEPTH_COMPONENT32F;if(t===_$_.FLOAT)switch(e){case _$Z.RGBA:return de$y.RGBA32F;case _$Z.RGB:return de$y.RGB32F;case _$Z.RG:return de$y.RG32F;case _$Z.RED:return de$y.R32F}if(t===_$_.UNSIGNED_BYTE)switch(e){case _$Z.RGBA:return de$y.RGBA8;case _$Z.RGB:return de$y.RGB8;case _$Z.RED:return de$y.R8}if(t===_$_.HALF_FLOAT)switch(e){case _$Z.RGBA:return de$y.RGBA16F;case _$Z.RGB:return de$y.RGB16F;case _$Z.RG:return de$y.RG16F;case _$Z.RED:return de$y.R16F}return e}},V$12=Object.freeze(_$Z),E$1g={CLAMP_TO_EDGE:de$y.CLAMP_TO_EDGE,REPEAT:de$y.REPEAT,MIRRORED_REPEAT:de$y.MIRRORED_REPEAT,validate:function(e){return e===E$1g.CLAMP_TO_EDGE||e===E$1g.REPEAT||e===E$1g.MIRRORED_REPEAT}},q$1a=Object.freeze(E$1g),e$1V={NEAREST:de$y.NEAREST,LINEAR:de$y.LINEAR,validate:function(e){return e===e$1V.NEAREST||e===e$1V.LINEAR}},rt$k=Object.freeze(e$1V),E$1f={NEAREST:de$y.NEAREST,LINEAR:de$y.LINEAR,NEAREST_MIPMAP_NEAREST:de$y.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:de$y.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:de$y.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:de$y.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===E$1f.NEAREST||e===E$1f.LINEAR||e===E$1f.NEAREST_MIPMAP_NEAREST||e===E$1f.LINEAR_MIPMAP_NEAREST||e===E$1f.NEAREST_MIPMAP_LINEAR||e===E$1f.LINEAR_MIPMAP_LINEAR}},tt$i=Object.freeze(E$1f),_0x54b949=(_0x53e092=!0,function(e,t){var i=_0x53e092?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53e092=!1,i}),_0x89b7f=_0x54b949(void 0,(function(){return _0x89b7f.toString().search("(((.+)+)+)+$").toString().constructor(_0x89b7f).search("(((.+)+)+)+$")})),_0x53e092;function _0xc1cee(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=_0xc1cee._Counter++}_0x89b7f(),Object.defineProperty(_0xc1cee.prototype,"underlyingResource",{get:function(){return null},enumerable:!1,configurable:!0}),_0xc1cee._Counter=0;var _0x14b656=(_0x2b9730=!0,function(e,t){var i=_0x2b9730?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b9730=!1,i}),_0x342d77=_0x14b656(void 0,(function(){return _0x342d77.toString().search("(((.+)+)+)+$").toString().constructor(_0x342d77).search("(((.+)+)+)+$")})),_0x2b9730;function Buffer$1(e,t,i,n,r,o,a,s){void 0===n&&(n=0),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),this._isAlreadyOwned=!1,e.getScene?this._engine=e.getScene().getEngine():this._engine=e,this._updatable=i,this._instanced=o,this._divisor=s||1,t instanceof _0xc1cee?(this._data=null,this._buffer=t):(this._data=t,this._buffer=null),this.byteStride=a?n:n*Float32Array.BYTES_PER_ELEMENT,!r&&this.create()}function VertexBuffer(e,t,i,n,r,o,a,s,l,u,c,h,d,f){if(void 0===c&&(c=!1),void 0===h&&(h=!1),void 0===d&&(d=1),void 0===f&&(f=!1),t instanceof Buffer$1?(this._buffer=t,this._ownsBuffer=f):(this._buffer=new Buffer$1(e,t,n,o,r,a,h),this._ownsBuffer=!0),this.uniqueId=VertexBuffer._Counter++,this._kind=i,null==u){var p=this.getData();this.type=VertexBuffer.FLOAT,p instanceof Int8Array?this.type=VertexBuffer.BYTE:p instanceof Uint8Array?this.type=VertexBuffer.UNSIGNED_BYTE:p instanceof Int16Array?this.type=VertexBuffer.SHORT:p instanceof Uint16Array?this.type=VertexBuffer.UNSIGNED_SHORT:p instanceof Int32Array?this.type=VertexBuffer.INT:p instanceof Uint32Array&&(this.type=VertexBuffer.UNSIGNED_INT)}else this.type=u;var _=VertexBuffer.GetTypeByteLength(this.type);h?(this._size=l||(o?o/_:VertexBuffer.DeduceStride(i)),this.byteStride=o||this._buffer.byteStride||this._size*_,this.byteOffset=s||0):(this._size=l||o||VertexBuffer.DeduceStride(i),this.byteStride=o?o*_:this._buffer.byteStride||this._size*_,this.byteOffset=(s||0)*_),this.normalized=c,this._instanced=void 0!==a&&a,this._instanceDivisor=a?d:0,this._computeHashCode()}function R$12(){}function n$12(){}_0x342d77(),Buffer$1.prototype.createVertexBuffer=function(e,t,i,n,r,o,a){void 0===o&&(o=!1);var s=o?t:t*Float32Array.BYTES_PER_ELEMENT,l=n?o?n:n*Float32Array.BYTES_PER_ELEMENT:this.byteStride;return new VertexBuffer(this._engine,this,e,this._updatable,!0,l,void 0===r?this._instanced:r,s,i,void 0,void 0,!0,this._divisor||a)},Buffer$1.prototype.isUpdatable=function(){return this._updatable},Buffer$1.prototype.getData=function(){return this._data},Buffer$1.prototype.getBuffer=function(){return this._buffer},Buffer$1.prototype.getStrideSize=function(){return this.byteStride/Float32Array.BYTES_PER_ELEMENT},Buffer$1.prototype.create=function(e){void 0===e&&(e=null),!e&&this._buffer||(e=e||this._data)&&(this._buffer?this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e),this._data=e):this._updatable?(this._buffer=this._engine.createDynamicVertexBuffer(e),this._data=e):this._buffer=this._engine.createVertexBuffer(e))},Buffer$1.prototype._rebuild=function(){this._buffer=null,this.create(this._data)},Buffer$1.prototype.update=function(e){this.create(e)},Buffer$1.prototype.updateDirectly=function(e,t,i,n){void 0===n&&(n=!1),this._buffer&&this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e,n?t:t*Float32Array.BYTES_PER_ELEMENT,i?i*this.byteStride:void 0),this._data=0===t&&void 0===i?e:null)},Buffer$1.prototype._increaseReferences=function(){this._buffer&&(this._isAlreadyOwned?this._buffer.references++:this._isAlreadyOwned=!0)},Buffer$1.prototype.dispose=function(){this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null,this._data=null)},Object.defineProperty(VertexBuffer.prototype,"instanceDivisor",{get:function(){return this._instanceDivisor},set:function(e){this._instanceDivisor=e,this._instanced=0!=e,this._computeHashCode()},enumerable:!1,configurable:!0}),VertexBuffer.prototype._computeHashCode=function(){this.hashCode=(this.type-5120<<0)+((this.normalized?1:0)<<3)+(this._size<<4)+((this._instanced?1:0)<<6)+(this.byteStride<<12)},VertexBuffer.prototype._rebuild=function(){this._buffer&&this._buffer._rebuild()},VertexBuffer.prototype.getKind=function(){return this._kind},VertexBuffer.prototype.isUpdatable=function(){return this._buffer.isUpdatable()},VertexBuffer.prototype.getData=function(){return this._buffer.getData()},VertexBuffer.prototype.getFloatData=function(e,t){var i=this.getData();if(!i)return null;var n=this.getSize()*VertexBuffer.GetTypeByteLength(this.type),r=e*this.getSize();if(this.type!==VertexBuffer.FLOAT||this.byteStride!==n){var o=new Float32Array(r);return this.forEach(r,(function(e,t){return o[t]=e})),o}if(!(i instanceof Array||i instanceof Float32Array)||0!==this.byteOffset||i.length!==r){if(i instanceof Array){var a=this.byteOffset/4;return i.slice(a,a+r)}if(i instanceof ArrayBuffer)return new Float32Array(i,this.byteOffset,r);a=i.byteOffset+this.byteOffset;if(t){var s=new Float32Array(r),l=new Float32Array(i.buffer,a,r);return s.set(l),s}var u=a%4;return u&&(a=Math.max(0,a-u)),new Float32Array(i.buffer,a,r)}return t?i.slice():i},VertexBuffer.prototype.getBuffer=function(){return this._buffer.getBuffer()},VertexBuffer.prototype.getStrideSize=function(){return this.byteStride/VertexBuffer.GetTypeByteLength(this.type)},VertexBuffer.prototype.getOffset=function(){return this.byteOffset/VertexBuffer.GetTypeByteLength(this.type)},VertexBuffer.prototype.getSize=function(e){return void 0===e&&(e=!1),e?this._size*VertexBuffer.GetTypeByteLength(this.type):this._size},VertexBuffer.prototype.getIsInstanced=function(){return this._instanced},VertexBuffer.prototype.getInstanceDivisor=function(){return this._instanceDivisor},VertexBuffer.prototype.create=function(e){this._buffer.create(e)},VertexBuffer.prototype.update=function(e){this._buffer.update(e)},VertexBuffer.prototype.updateDirectly=function(e,t,i){void 0===i&&(i=!1),this._buffer.updateDirectly(e,t,void 0,i)},VertexBuffer.prototype.dispose=function(){this._ownsBuffer&&this._buffer.dispose()},VertexBuffer.prototype.forEach=function(e,t){VertexBuffer.ForEach(this._buffer.getData(),this.byteOffset,this.byteStride,this._size,this.type,e,this.normalized,t)},VertexBuffer.DeduceStride=function(e){switch(e){case VertexBuffer.UVKind:case VertexBuffer.UV2Kind:case VertexBuffer.UV3Kind:case VertexBuffer.UV4Kind:case VertexBuffer.UV5Kind:case VertexBuffer.UV6Kind:return 2;case VertexBuffer.NormalKind:case VertexBuffer.PositionKind:return 3;case VertexBuffer.ColorKind:case VertexBuffer.MatricesIndicesKind:case VertexBuffer.MatricesIndicesExtraKind:case VertexBuffer.MatricesWeightsKind:case VertexBuffer.MatricesWeightsExtraKind:case VertexBuffer.TangentKind:return 4;default:throw new Error("Invalid kind '"+e+"'")}},VertexBuffer.GetTypeByteLength=function(e){switch(e){case VertexBuffer.BYTE:case VertexBuffer.UNSIGNED_BYTE:return 1;case VertexBuffer.SHORT:case VertexBuffer.UNSIGNED_SHORT:return 2;case VertexBuffer.INT:case VertexBuffer.UNSIGNED_INT:case VertexBuffer.FLOAT:return 4;default:throw new Error("Invalid type '".concat(e,"'"))}},VertexBuffer.ForEach=function(e,t,i,n,r,o,a,s){if(e instanceof Array)for(var l=t/4,u=i/4,c=0;c<o;c+=n){for(var h=0;h<n;h++)s(e[l+h],c+h);l+=u}else{var d=e instanceof ArrayBuffer?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),f=VertexBuffer.GetTypeByteLength(r);for(c=0;c<o;c+=n){var p=t;for(h=0;h<n;h++){s(VertexBuffer._GetFloatValue(d,r,p,a),c+h),p+=f}t+=i}}},VertexBuffer._GetFloatValue=function(e,t,i,n){switch(t){case VertexBuffer.BYTE:var r=e.getInt8(i);return n&&(r=Math.max(r/127,-1)),r;case VertexBuffer.UNSIGNED_BYTE:r=e.getUint8(i);return n&&(r/=255),r;case VertexBuffer.SHORT:r=e.getInt16(i,!0);return n&&(r=Math.max(r/32767,-1)),r;case VertexBuffer.UNSIGNED_SHORT:r=e.getUint16(i,!0);return n&&(r/=65535),r;case VertexBuffer.INT:return e.getInt32(i,!0);case VertexBuffer.UNSIGNED_INT:return e.getUint32(i,!0);case VertexBuffer.FLOAT:return e.getFloat32(i,!0);default:throw new Error("Invalid component type ".concat(t))}},VertexBuffer._Counter=0,VertexBuffer.BYTE=5120,VertexBuffer.UNSIGNED_BYTE=5121,VertexBuffer.SHORT=5122,VertexBuffer.UNSIGNED_SHORT=5123,VertexBuffer.INT=5124,VertexBuffer.UNSIGNED_INT=5125,VertexBuffer.FLOAT=5126,VertexBuffer.PositionKind="position",VertexBuffer.NormalKind="normal",VertexBuffer.TangentKind="tangent",VertexBuffer.UVKind="uv",VertexBuffer.UV2Kind="uv2",VertexBuffer.UV3Kind="uv3",VertexBuffer.UV4Kind="uv4",VertexBuffer.UV5Kind="uv5",VertexBuffer.UV6Kind="uv6",VertexBuffer.ColorKind="color",VertexBuffer.ColorInstanceKind="instanceColor",VertexBuffer.MatricesIndicesKind="matricesIndices",VertexBuffer.MatricesWeightsKind="matricesWeights",VertexBuffer.MatricesIndicesExtraKind="matricesIndicesExtra",VertexBuffer.MatricesWeightsExtraKind="matricesWeightsExtra",R$12.toPixelFormat=function(e){switch(e){case V$12.RED:return _0x333f62.TEXTUREFORMAT_RED;case V$12.RED_INTEGER:return _0x333f62.TEXTUREFORMAT_RED_INTEGER;case V$12.RGB:return _0x333f62.TEXTUREFORMAT_RGB;case V$12.RGBA:return _0x333f62.TEXTUREFORMAT_RGBA;case V$12.LUMINANCE_ALPHA:return _0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA;case V$12.ALPHA:return _0x333f62.TEXTUREFORMAT_ALPHA;case V$12.LUMINANCE:return _0x333f62.TEXTUREFORMAT_LUMINANCE;case V$12.DEPTH_COMPONENT16:return _0x333f62.TEXTUREFORMAT_DEPTH16;case V$12.DEPTH_COMPONENT:return _0x333f62.TEXTUREFORMAT_DEPTH24;case V$12.DEPTH_COMPONENT32F:return _0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT;case V$12.DEPTH_STENCIL:return _0x333f62.TEXTUREFORMAT_DEPTH24_STENCIL8;case V$12.RGBA_DXT1:return _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1;case V$12.RGBA_DXT3:return _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3;case V$12.RGBA_DXT5:return _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5;case V$12.RGB_DXT1:return _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1;case V$12.RGBA_PVRTC_2BPPV1:case V$12.RGBA_PVRTC_4BPPV1:case V$12.RGB_ETC1:case V$12.RGB_PVRTC_2BPPV1:case V$12.RGB_PVRTC_4BPPV1:default:return 1}},R$12.toPixelType=function(e){switch(e){case _$_.FLOAT:return _0x333f62.TEXTURETYPE_FLOAT;case _$_.HALF_FLOAT:return _0x333f62.TEXTURETYPE_HALF_FLOAT;case _$_.UNSIGNED_BYTE:return _0x333f62.TEXTURETYPE_UNSIGNED_BYTE;case _$_.UNSIGNED_INT:return _0x333f62.TEXTURETYPE_UNSIGNED_INT;case _$_.UNSIGNED_INT_24_8:return _0x333f62.TEXTURETYPE_UNSIGNED_INT_24_8;case _$_.UNSIGNED_SHORT:return _0x333f62.TEXTURETYPE_UNSIGNED_SHORT;case _$_.UNSIGNED_SHORT_4_4_4_4:return _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4;case _$_.UNSIGNED_SHORT_5_5_5_1:return _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1;case _$_.UNSIGNED_SHORT_5_6_5:return _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;default:return _0x333f62.TEXTURETYPE_UNDEFINED}},R$12.toSamplerMode=function(e,t){var i=e==_$_.FLOAT||e==_$_.HALF_FLOAT;if(t.magnificationFilter==rt$k.NEAREST){if(t.minificationFilter==tt$i.NEAREST)return _0x333f62.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==tt$i.LINEAR)return _0x333f62.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==tt$i.NEAREST_MIPMAP_NEAREST)return _0x333f62.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==tt$i.LINEAR_MIPMAP_NEAREST)return _0x333f62.TEXTURE_NEAREST_SAMPLINGMODE}else{if(t.magnificationFilter!=rt$k.LINEAR)return console.log("EnumConvertor.toSamplerMode unsupported type"),_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==tt$i.NEAREST)return i?_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE:_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==tt$i.LINEAR)return i?_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE:_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==tt$i.NEAREST_MIPMAP_NEAREST)return i?_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE:_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==tt$i.LINEAR_MIPMAP_NEAREST)return i?_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE:_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==tt$i.LINEAR_MIPMAP_LINEAR)return i?_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE:_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR}},R$12.toAddressMode=function(e){switch(e){case q$1a.CLAMP_TO_EDGE:return _0x333f62.TEXTURE_CLAMP_ADDRESSMODE;case q$1a.REPEAT:return _0x333f62.TEXTURE_WRAP_ADDRESSMODE;case q$1a.MIRRORED_REPEAT:return _0x333f62.TEXTURE_MIRROR_ADDRESSMODE;default:return _0x333f62.TEXTURE_CLAMP_ADDRESSMODE}},R$12.toFillMode=function(e){switch(e){case W$18.TRIANGLES:return _0x333f62.MATERIAL_TriangleFillMode;case W$18.POINTS:return _0x333f62.MATERIAL_PointFillMode;case W$18.LINES:return _0x333f62.MATERIAL_WireFrameFillMode;case W$18.LINE_STRIP:return _0x333f62.MATERIAL_LineStripDrawMode;default:return console.log("EnumConvertor.toFillMode unsupported type"),_0x333f62.MATERIAL_TriangleFillMode}},R$12.toCullFace=function(e){switch(e){case de$y.FRONT:return 2;case de$y.BACK:default:return 1}},R$12.toFrontFace=function(e,t){switch(e){case de$y.CCW:return t?2:1;case de$y.CW:return t?1:2;default:return 1}},R$12.toVertexBufferDataType=function(e){switch(e){case S$14.BYTE:return VertexBuffer.BYTE;case S$14.UNSIGNED_BYTE:return VertexBuffer.UNSIGNED_BYTE;case S$14.SHORT:return VertexBuffer.SHORT;case S$14.UNSIGNED_SHORT:return VertexBuffer.UNSIGNED_SHORT;case S$14.INT:return VertexBuffer.INT;case S$14.UNSIGNED_INT:return VertexBuffer.UNSIGNED_INT;case S$14.FLOAT:return VertexBuffer.FLOAT;default:throw console.log("EnumConvertor.toVertexBufferDataType unsupported type"),new t$15("componentDatatype is not a valid value.")}},n$12.applyFrontFace=function(e,t,i){e._depthCullingState.frontFace=R$12.toFrontFace(t.frontFace,i)},n$12.applyCull=function(e,t){var i=t.cull;i.enabled?(e._depthCullingState.cull=!0,e._depthCullingState.cullFace=R$12.toCullFace(i.face)):(e._depthCullingState.cull=!1,e._depthCullingState.cullFace=0)},n$12.applyLineWidth=function(e,t){},n$12.applyPolygonOffset=function(e,t){var i=t.polygonOffset;i.enabled?(e.setZOffset(i.factor),e.setZOffsetUnits(i.units)):(e.setZOffset(0),e.setZOffsetUnits(0))},n$12.applyScissorTest=function(e,t,i){var n=t.scissorTest;if(e$2e(i.scissorTest)?i.scissorTest.enabled:n.enabled){var r=e$2e(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.enableScissor(r.x,r.y,r.width,r.height)}else e.disableScissor()},n$12.applyDepthRange=function(e,t){},n$12.applyDepthTest=function(e,t){var i=t.depthTest,n=i.enabled;e.setDepthBuffer(n),n&&e.setDepthFunction(i.func)},n$12.applyColorMask=function(e,t){var i=t.colorMask;e.setColorWrite(i.red)},n$12.applyDepthMask=function(e,t){e.setDepthWrite(t.depthMask)},n$12.applyStencilMask=function(e,t){var i=t.stencilMask;i<0&&(i=255),e.setStencilMask(i)},n$12.applyBlendingColor=function(e,t){e.setAlphaConstants(t.red,t.green,t.blue,t.alpha)},n$12.applyBlending=function(e,t,i){var n=t.blending;(e$2e(i.blendingEnabled)?i.blendingEnabled:n.enabled)?(n$12.applyBlendingColor(e,n.color),e._alphaState.setAlphaEquationParameters(n.equationRgb,n.equationAlpha),e._alphaState.setAlphaBlendFunctionParameters(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha),e._alphaState.alphaBlend=!0):e.setAlphaMode(_0x333f62.ALPHA_DISABLE)},n$12.applyStencilTest=function(e,t){var i=t.stencilTest,n=i.enabled;if(e.setStencilBuffer(n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.setStencilFunction(_0x4257c2.FRONT,r);var l=i.frontOperation;e.setStencilOperationFail(_0x4257c2.FRONT,l.fail),e.setStencilOperationDepthFail(_0x4257c2.FRONT,l.zFail),e.setStencilOperationPass(_0x4257c2.FRONT,l.zPass),e.setStencilFunction(_0x4257c2.BACK,o);var u=i.backOperation;e.setStencilOperationFail(_0x4257c2.BACK,u.fail),e.setStencilOperationDepthFail(_0x4257c2.BACK,u.zFail),e.setStencilOperationPass(_0x4257c2.BACK,u.zPass),e.setStencilFunctionReference(a),e.setStencilFunctionMask(s)}},n$12.applySampleCoverage=function(e,t){};var S$Y=new f$1a;function t$Z(){}function l$19(e,t,i){i?e.enable(t):e.disable(t)}n$12.applyViewport=function(e,t,i,n,r){var o=u$Z(t.viewport,i.viewport);e$2e(o)||((o=S$Y).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight);var a=u$Z(n,i.context.drawingBufferWidth),s=u$Z(r,i.context.drawingBufferHeight);i.context.uniformState.viewport=o;var l={x:o.x/a,y:o.y/s,width:o.width/a,height:o.height/s};e.setViewport(l,n,r)},t$Z.applyFrontFace=function(e,t,i){e.frontFace(t.frontFace)},t$Z.applyCull=function(e,t){var i=t.cull,n=i.enabled;l$19(e,e.CULL_FACE,n),n&&e.cullFace(i.face)},t$Z.applyLineWidth=function(e,t){e.lineWidth(t.lineWidth)},t$Z.applyPolygonOffset=function(e,t){var i=t.polygonOffset,n=i.enabled;l$19(e,e.POLYGON_OFFSET_FILL,n),n&&e.polygonOffset(i.factor,i.units)},t$Z.applyScissorTest=function(e,t,i){var n=t.scissorTest,r=e$2e(i.scissorTest)?i.scissorTest.enabled:n.enabled;if(l$19(e,e.SCISSOR_TEST,r),r){var o=e$2e(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.scissor(o.x,o.y,o.width,o.height)}},t$Z.applyDepthRange=function(e,t){var i=t.depthRange;e.depthRange(i.near,i.far)},t$Z.applyDepthTest=function(e,t){var i=t.depthTest,n=i.enabled;l$19(e,e.DEPTH_TEST,n),n&&e.depthFunc(i.func)},t$Z.applyColorMask=function(e,t){var i=t.colorMask;e.colorMask(i.red,i.green,i.blue,i.alpha)},t$Z.applyDepthMask=function(e,t){e.depthMask(t.depthMask)},t$Z.applyStencilMask=function(e,t){e.stencilMask(t.stencilMask)},t$Z.applyBlendingColor=function(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)},t$Z.applyBlending=function(e,t,i){var n=t.blending,r=e$2e(i.blendingEnabled)?i.blendingEnabled:n.enabled;l$19(e,e.BLEND,r),r&&(t$Z.applyBlendingColor(e,n.color),e.blendEquationSeparate(n.equationRgb,n.equationAlpha),e.blendFuncSeparate(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha))},t$Z.applyStencilTest=function(e,t){var i=t.stencilTest,n=i.enabled;if(l$19(e,e.STENCIL_TEST,n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.stencilFunc(r,a,s),e.stencilFuncSeparate(e.BACK,o,a,s),e.stencilFuncSeparate(e.FRONT,r,a,s);var l=i.frontOperation,u=l.fail,c=l.zFail,h=l.zPass;e.stencilOpSeparate(e.FRONT,u,c,h);var d=i.backOperation,f=d.fail,p=d.zFail,_=d.zPass;e.stencilOpSeparate(e.BACK,f,p,_)}},t$Z.applySampleCoverage=function(e,t){var i=t.sampleCoverage,n=i.enabled;l$19(e,e.SAMPLE_COVERAGE,n),n&&e.sampleCoverage(i.value,i.invert)};var S$X=new f$1a;function F$18(e){return e===de$y.FUNC_ADD||e===de$y.FUNC_SUBTRACT||e===de$y.FUNC_REVERSE_SUBTRACT||e===de$y.MIN||e===de$y.MAX}function E$1e(e){return e===de$y.ZERO||e===de$y.ONE||e===de$y.SRC_COLOR||e===de$y.ONE_MINUS_SRC_COLOR||e===de$y.DST_COLOR||e===de$y.ONE_MINUS_DST_COLOR||e===de$y.SRC_ALPHA||e===de$y.ONE_MINUS_SRC_ALPHA||e===de$y.DST_ALPHA||e===de$y.ONE_MINUS_DST_ALPHA||e===de$y.CONSTANT_COLOR||e===de$y.ONE_MINUS_CONSTANT_COLOR||e===de$y.CONSTANT_ALPHA||e===de$y.ONE_MINUS_CONSTANT_ALPHA||e===de$y.SRC_ALPHA_SATURATE}function W$12(e){return e===de$y.FRONT||e===de$y.BACK||e===de$y.FRONT_AND_BACK}function U$17(e){return e===de$y.NEVER||e===de$y.LESS||e===de$y.EQUAL||e===de$y.LEQUAL||e===de$y.GREATER||e===de$y.NOTEQUAL||e===de$y.GEQUAL||e===de$y.ALWAYS}function _$Y(e){return e===de$y.NEVER||e===de$y.LESS||e===de$y.EQUAL||e===de$y.LEQUAL||e===de$y.GREATER||e===de$y.NOTEQUAL||e===de$y.GEQUAL||e===de$y.ALWAYS}function m$16(e){return e===de$y.ZERO||e===de$y.KEEP||e===de$y.REPLACE||e===de$y.INCR||e===de$y.DECR||e===de$y.INVERT||e===de$y.INCR_WRAP||e===de$y.DECR_WRAP}function d$1m(e){var t=u$Z(e,{}),i=u$Z(t.cull,{}),n=u$Z(t.polygonOffset,{}),r=u$Z(t.scissorTest,{}),o=u$Z(r.rectangle,{}),a=u$Z(t.depthRange,{}),s=u$Z(t.depthTest,{}),l=u$Z(t.colorMask,{}),u=u$Z(t.blending,{}),c=u$Z(u.color,{}),h=u$Z(t.stencilTest,{}),d=u$Z(h.frontOperation,{}),f=u$Z(h.backOperation,{}),p=u$Z(t.sampleCoverage,{}),_=t.viewport;if(this.frontFace=u$Z(t.frontFace,W$13.COUNTER_CLOCKWISE),this.cull={enabled:u$Z(i.enabled,!1),face:u$Z(i.face,de$y.BACK)},this.lineWidth=u$Z(t.lineWidth,1),this.polygonOffset={enabled:u$Z(n.enabled,!1),factor:u$Z(n.factor,0),units:u$Z(n.units,0)},this.scissorTest={enabled:u$Z(r.enabled,!1),rectangle:f$1a.clone(o)},this.depthRange={near:u$Z(a.near,0),far:u$Z(a.far,1)},this.depthTest={enabled:u$Z(s.enabled,!1),func:u$Z(s.func,de$y.LESS)},this.colorMask={red:u$Z(l.red,!0),green:u$Z(l.green,!0),blue:u$Z(l.blue,!0),alpha:u$Z(l.alpha,!0)},this.depthMask=u$Z(t.depthMask,!0),this.stencilMask=u$Z(t.stencilMask,65535),this.blending={enabled:u$Z(u.enabled,!1),color:new e$1X(u$Z(c.red,0),u$Z(c.green,0),u$Z(c.blue,0),u$Z(c.alpha,0)),equationRgb:u$Z(u.equationRgb,de$y.FUNC_ADD),equationAlpha:u$Z(u.equationAlpha,de$y.FUNC_ADD),functionSourceRgb:u$Z(u.functionSourceRgb,de$y.ONE),functionSourceAlpha:u$Z(u.functionSourceAlpha,de$y.ONE),functionDestinationRgb:u$Z(u.functionDestinationRgb,de$y.ZERO),functionDestinationAlpha:u$Z(u.functionDestinationAlpha,de$y.ZERO)},this.stencilTest={enabled:u$Z(h.enabled,!1),frontFunction:u$Z(h.frontFunction,de$y.ALWAYS),backFunction:u$Z(h.backFunction,de$y.ALWAYS),reference:u$Z(h.reference,0),mask:u$Z(h.mask,65535),frontOperation:{fail:u$Z(d.fail,de$y.KEEP),zFail:u$Z(d.zFail,de$y.KEEP),zPass:u$Z(d.zPass,de$y.KEEP)},backOperation:{fail:u$Z(f.fail,de$y.KEEP),zFail:u$Z(f.zFail,de$y.KEEP),zPass:u$Z(f.zPass,de$y.KEEP)}},this.sampleCoverage={enabled:u$Z(p.enabled,!1),value:u$Z(p.value,1),invert:u$Z(p.invert,!1)},this.viewport=e$2e(_)?new f$1a(_.x,_.y,_.width,_.height):void 0,this.lineWidth<e$1W.minimumAliasedLineWidth||this.lineWidth>e$1W.maximumAliasedLineWidth)throw new t$15("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!W$13.validate(this.frontFace))throw new t$15("Invalid renderState.frontFace.");if(!W$12(this.cull.face))throw new t$15("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new t$15("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new t$15("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new t$15("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new t$15("renderState.depthRange.far must be less than or equal to one.");if(!U$17(this.depthTest.func))throw new t$15("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new t$15("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!F$18(this.blending.equationRgb))throw new t$15("Invalid renderState.blending.equationRgb.");if(!F$18(this.blending.equationAlpha))throw new t$15("Invalid renderState.blending.equationAlpha.");if(!E$1e(this.blending.functionSourceRgb))throw new t$15("Invalid renderState.blending.functionSourceRgb.");if(!E$1e(this.blending.functionSourceAlpha))throw new t$15("Invalid renderState.blending.functionSourceAlpha.");if(!E$1e(this.blending.functionDestinationRgb))throw new t$15("Invalid renderState.blending.functionDestinationRgb.");if(!E$1e(this.blending.functionDestinationAlpha))throw new t$15("Invalid renderState.blending.functionDestinationAlpha.");if(!_$Y(this.stencilTest.frontFunction))throw new t$15("Invalid renderState.stencilTest.frontFunction.");if(!_$Y(this.stencilTest.backFunction))throw new t$15("Invalid renderState.stencilTest.backFunction.");if(!m$16(this.stencilTest.frontOperation.fail))throw new t$15("Invalid renderState.stencilTest.frontOperation.fail.");if(!m$16(this.stencilTest.frontOperation.zFail))throw new t$15("Invalid renderState.stencilTest.frontOperation.zFail.");if(!m$16(this.stencilTest.frontOperation.zPass))throw new t$15("Invalid renderState.stencilTest.frontOperation.zPass.");if(!m$16(this.stencilTest.backOperation.fail))throw new t$15("Invalid renderState.stencilTest.backOperation.fail.");if(!m$16(this.stencilTest.backOperation.zFail))throw new t$15("Invalid renderState.stencilTest.backOperation.zFail.");if(!m$16(this.stencilTest.backOperation.zPass))throw new t$15("Invalid renderState.stencilTest.backOperation.zPass.");if(e$2e(this.viewport)){if(this.viewport.width<0)throw new t$15("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new t$15("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>e$1W.maximumViewportWidth)throw new t$15("renderState.viewport.width must be less than or equal to the maximum viewport width ("+e$1W.maximumViewportWidth.toString()+"). Check maximumViewportWidth.");if(this.viewport.height>e$1W.maximumViewportHeight)throw new t$15("renderState.viewport.height must be less than or equal to the maximum viewport height ("+e$1W.maximumViewportHeight.toString()+"). Check maximumViewportHeight.")}this.id=0,this._applyFunctions=[]}t$Z.applyViewport=function(e,t,i,n,r){var o=u$Z(t.viewport,i.viewport);e$2e(o)||((o=S$X).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=o,e.viewport(o.x,o.y,o.width,o.height)};var q$19=0,g$1b={};function B$10(e,t,i){(e?n$12:t$Z).applyFrontFace(t,i)}function K$X(e,t,i){(e?n$12:t$Z).applyCull(t,i)}function V$11(e,t,i){(e?n$12:t$Z).applyLineWidth(t,i)}function H$15(e,t,i){(e?n$12:t$Z).applyPolygonOffset(t,i)}function Q$13(e,t,i){(e?n$12:t$Z).applyDepthRange(t,i)}function G$1h(e,t,i){(e?n$12:t$Z).applyDepthTest(t,i)}function J$10(e,t,i){(e?n$12:t$Z).applyColorMask(t,i)}function Y$R(e,t,i){(e?n$12:t$Z).applyDepthMask(t,i)}function Z$12(e,t,i){(e?n$12:t$Z).applyStencilMask(t,i)}function X$_(e,t,i){(e?n$12:t$Z).applyStencilTest(t,i)}function j$1b(e,t,i){(e?n$12:t$Z).applySampleCoverage(t,i)}function $$$(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(B$10),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&i.push(K$X),e.lineWidth!==t.lineWidth&&i.push(V$11),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&i.push(H$15),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&i.push(Q$13),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&i.push(G$1h),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&i.push(J$10),e.depthMask!==t.depthMask&&i.push(Y$R),e.stencilMask!==t.stencilMask&&i.push(Z$12),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&i.push(X$_),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&i.push(j$1b),i}d$1m.fromCache=function(e){var t=JSON.stringify(e),i=g$1b[t];if(e$2e(i))return++i.referenceCount,i.state;var n=new d$1m(e),r=JSON.stringify(n);return e$2e(i=g$1b[r])||(n.id=q$19++,i={referenceCount:0,state:n=c$16(n)},g$1b[r]=i),++i.referenceCount,g$1b[t]={referenceCount:1,state:i.state},i.state},d$1m.removeFromCache=function(e){var t=new d$1m(e),i=JSON.stringify(t),n=g$1b[i],r=JSON.stringify(e),o=g$1b[r];e$2e(o)&&(--o.referenceCount,0===o.referenceCount&&(delete g$1b[r],e$2e(n)&&--n.referenceCount)),e$2e(n)&&0===n.referenceCount&&delete g$1b[i]},d$1m.getCache=function(){return g$1b},d$1m.clearCache=function(){g$1b={}},d$1m.apply=function(e,t,i){const n=e$2e(e.name)?n$12:t$Z;n.applyFrontFace(e,t),n.applyCull(e,t),n.applyLineWidth(e,t),n.applyPolygonOffset(e,t),n.applyDepthRange(e,t),n.applyDepthTest(e,t),n.applyColorMask(e,t),n.applyDepthMask(e,t),n.applyStencilMask(e,t),n.applyStencilTest(e,t),n.applySampleCoverage(e,t),n.applyScissorTest(e,t,i),n.applyBlending(e,t,i),n.applyViewport(e,t,i)},d$1m.partialApply=function(e,t,i,n,r,o,a,s,l,u,c){const h=e$2e(e.name),d=h?n$12:t$Z;if(t!==i){var f=i._applyFunctions[t.id];e$2e(f)||(f=$$$(t,i),i._applyFunctions[t.id]=f);for(var p=f.length,_=0;_<p;++_)f[_](h,e,i)}((e$2e(n.scissorTest)?n.scissorTest:t.scissorTest)!==(e$2e(r.scissorTest)?r.scissorTest:i.scissorTest)||s)&&d.applyScissorTest(e,i,r);var m=e$2e(n.blendingEnabled)?n.blendingEnabled:t.blending.enabled,g=e$2e(r.blendingEnabled)?r.blendingEnabled:i.blending.enabled;(m!==g||g&&t.blending!==i.blending)&&d.applyBlending(e,i,r),(t!==i||n!==r||n.context!==r.context||o!==a)&&d.applyViewport(e,i,r,l,u)},d$1m.getState=function(e){if(!e$2e(e))throw new t$15("renderState is required.");return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:f$1a.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:e$1X.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:e$2e(e.viewport)?f$1a.clone(e.viewport):void 0}};var o$1b=new o$1p;function n$11(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var a$Y={};a$Y[de$y.FLOAT]="float",a$Y[de$y.FLOAT_VEC2]="vec2",a$Y[de$y.FLOAT_VEC3]="vec3",a$Y[de$y.FLOAT_VEC4]="vec4",a$Y[de$y.INT]="int",a$Y[de$y.INT_VEC2]="ivec2",a$Y[de$y.INT_VEC3]="ivec3",a$Y[de$y.INT_VEC4]="ivec4",a$Y[de$y.BOOL]="bool",a$Y[de$y.BOOL_VEC2]="bvec2",a$Y[de$y.BOOL_VEC3]="bvec3",a$Y[de$y.BOOL_VEC4]="bvec4",a$Y[de$y.FLOAT_MAT2]="mat2",a$Y[de$y.FLOAT_MAT3]="mat3",a$Y[de$y.FLOAT_MAT4]="mat4",a$Y[de$y.SAMPLER_2D]="sampler2D",a$Y[de$y.SAMPLER_CUBE]="samplerCube",n$11.prototype.getDeclaration=function(e){var t="uniform "+a$Y[this._datatype]+" "+e,i=this._size;return t+=1===i?";":"["+i.toString()+"];"};var i$_={};i$_[de$y.FLOAT]="f32",i$_[de$y.FLOAT_VEC2]="vec2<f32>",i$_[de$y.FLOAT_VEC3]="vec3<f32>",i$_[de$y.FLOAT_VEC4]="vec4<f32>",i$_[de$y.INT]="i32",i$_[de$y.INT_VEC2]="vec2<i32>",i$_[de$y.INT_VEC3]="vec3<i32>",i$_[de$y.INT_VEC4]="vec4<i32>",i$_[de$y.BOOL]="bool",i$_[de$y.BOOL_VEC2]="vec2<bool>",i$_[de$y.BOOL_VEC3]="vec3<bool>",i$_[de$y.BOOL_VEC4]="vec4<bool>",i$_[de$y.FLOAT_MAT2]="mat2x2<f32>",i$_[de$y.FLOAT_MAT3]="mat3x3<f32>",i$_[de$y.FLOAT_MAT4]="mat4x4<f32>",i$_[de$y.SAMPLER_2D]="texture_2d<f32>",i$_[de$y.SAMPLER_CUBE]="texture_cube<f32>",n$11.prototype.getWgslDeclaration=function(e){var t="";return this._datatype==de$y.SAMPLER_2D||this._datatype==de$y.SAMPLER_CUBE?(t+="var "+e+" : "+i$_[this._datatype]+";\n",t+="var "+e+"Sampler : sampler;"):t+="uniform "+e+" : "+i$_[this._datatype]+";",t};var l$18={czm_viewport:new n$11({size:1,datatype:de$y.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new n$11({size:1,datatype:de$y.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_model:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight2D:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_entireFrustum:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new n$11({size:1,datatype:de$y.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_cameraPositionWC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e._cameraPosition}}),czm_viewerPositionWC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return p$1d.getTranslation(e.inverseView,o$1b)}}),czm_viewerPositionECEF:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return p$1d.getTranslation(e.inverseView,o$1b),o$1p.add(o$1b,e._relativeOrigin,o$1b),o$1b}}),czm_frameNumber:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new n$11({size:1,datatype:de$y.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new n$11({size:1,datatype:de$y.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new n$11({size:1,datatype:de$y.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new n$11({size:1,datatype:de$y.SAMPLER_2D,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapSize:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.specularEnvironmentMapsDimensions}}),czm_specularEnvironmentMapsMaximumLOD:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new n$11({size:9,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_resolutionScale:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.resolutionScale}}),czm_fogDensity:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.fogDensity}}),czm_imagerySplitPosition:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.imagerySplitPosition}}),czm_globeSplitPosition:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.globeSplitPosition}}),czm_geometricToleranceOverMeter:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new n$11({size:1,datatype:de$y.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.gamma}}),czm_sunColor:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.sunColor}}),czm_globeDepthTextureDim:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.globeDepthTextureDim}}),czm_nonSelDepthTexture:new n$11({size:1,datatype:de$y.SAMPLER_2D,getValue:function(e){return e.nonSelDepthTexture}}),czm_maskTexture:new n$11({size:1,datatype:de$y.SAMPLER_2D,getValue:function(e){return e.maskTexture}}),czm_relativeOrigin:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e._relativeOrigin}}),czm_hdrEnvMap:new n$11({size:1,datatype:de$y.SAMPLER_2D,getValue:function(e){return e.hdrEnvMap}}),czm_toneMappingExposure:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.toneMappingExposure}}),czm_encodedOriginCameraPositionMCHigh:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.encodedOriginCameraPositionMCHigh}}),czm_encodedOriginCameraPositionMCLow:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.encodedOriginCameraPositionMCLow}}),czm_eyeHeight:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.eyeHeight}})};function I$1m(e,t,i,n){switch(t.type){case e.FLOAT:return new d$1l(e,t,i,n);case e.FLOAT_VEC2:return new p$14(e,t,i,n);case e.FLOAT_VEC3:return new m$15(e,t,i,n);case e.FLOAT_VEC4:return new y$X(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_2D_SHADOW:case e.SAMPLER_CUBE:return new f$12(e,t,i,n);case e.SAMPLER_2D_ARRAY:return new v$T(e,t,i,n);case e.INT:case e.BOOL:return new w$10(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new A$1e(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new x$1b(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new T$15(e,t,i,n);case e.FLOAT_MAT2:return new E$1d(e,t,i,n);case e.FLOAT_MAT3:return new U$16(e,t,i,n);case e.FLOAT_MAT4:return new M$17(e,t,i,n);default:throw new t$13("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function d$1l(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function p$14(e,t,i,n){this.name=i,this.value=void 0,this._value=new o$1o,this._gl=e,this._location=n}function m$15(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function y$X(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function f$12(e,t,i,n){this.name=i,this.value=void 0,this._gl=e,this._location=n,this.textureUnitIndex=void 0}function v$T(e,t,i,n){this.name=i,this.value=void 0,this._gl=e,this._location=n,this.textureUnitIndex=void 0,this.lastBindTextureID=void 0}function w$10(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function A$1e(e,t,i,n){this.name=i,this.value=void 0,this._value=new o$1o,this._gl=e,this._location=n}function x$1b(e,t,i,n){this.name=i,this.value=void 0,this._value=new o$1p,this._gl=e,this._location=n}function T$15(e,t,i,n){this.name=i,this.value=void 0,this._value=new e$2c,this._gl=e,this._location=n}d$1l.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))},p$14.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))},m$15.prototype.set=function(){var e=this.value;if(e$2e(e.red))e$1X.equals(e,this._value)||(this._value=e$1X.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue));else{if(!e$2e(e.x))throw new t$15('Invalid vec3 value for uniform "'+this.name+'".');o$1p.equals(e,this._value)||(this._value=o$1p.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z))}},y$X.prototype.set=function(){var e=this.value;if(e$2e(e.red))e$1X.equals(e,this._value)||(this._value=e$1X.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha));else{if(!e$2e(e.x))throw new t$15('Invalid vec4 value for uniform "'+this.name+'".');e$2c.equals(e,this._value)||(this._value=e$2c.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w))}},f$12.prototype.set=function(){var e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);var t=this.value;e.bindTexture(t._target,t._texture)},f$12.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},v$T.prototype.set=function(){var e=this.value;if(!e$2e(e.id)||this.lastBindTextureID!==e.id){var t=this._gl;t.activeTexture(t.TEXTURE0+this.textureUnitIndex),t.bindTexture(e._target,e._texture),this.lastBindTextureID=e.id}},v$T.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},w$10.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))},A$1e.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))},x$1b.prototype.set=function(){var e=this.value;o$1p.equals(e,this._value)||(o$1p.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))},T$15.prototype.set=function(){var e=this.value;e$2c.equals(e,this._value)||(e$2c.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};var L$1b=new Float32Array(4);function E$1d(e,t,i,n){this.name=i,this.value=void 0,this._value=new f$15,this._gl=e,this._location=n}E$1d.prototype.set=function(){if(!f$15.equalsArray(this.value,this._value,0)){f$15.clone(this.value,this._value);var e=f$15.toArray(this.value,L$1b);this._gl.uniformMatrix2fv(this._location,!1,e)}};var V$10=new Float32Array(9);function U$16(e,t,i,n){this.name=i,this.value=void 0,this._value=new p$1e,this._gl=e,this._location=n}U$16.prototype.set=function(){if(!p$1e.equalsArray(this.value,this._value,0)){p$1e.clone(this.value,this._value);var e=p$1e.toArray(this.value,V$10);this._gl.uniformMatrix3fv(this._location,!1,e)}};var C$1a=new Float32Array(16);function M$17(e,t,i,n){this.name=i,this.value=void 0,this._value=new p$1d,this._gl=e,this._location=n}function V$$(e,t,i,n){switch(t.type){case e.FLOAT:return new A$1d(e,t,i,n);case e.FLOAT_VEC2:return new p$13(e,t,i,n);case e.FLOAT_VEC3:return new w$$(e,t,i,n);case e.FLOAT_VEC4:return new m$14(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new f$11(e,t,i,n);case e.INT:case e.BOOL:return new d$1k(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new F$17(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new T$14(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new U$15(e,t,i,n);case e.FLOAT_MAT2:return new x$1a(e,t,i,n);case e.FLOAT_MAT3:return new E$1c(e,t,i,n);case e.FLOAT_MAT4:return new I$1l(e,t,i,n);default:throw new t$13("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function A$1d(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=e,this._location=n[0]}function p$13(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(2*r),this._gl=e,this._location=n[0]}function w$$(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(3*r),this._gl=e,this._location=n[0]}function m$14(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(4*r),this._gl=e,this._location=n[0]}function f$11(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=e,this._locations=n,this.textureUnitIndex=void 0}function d$1k(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r),this._gl=e,this._location=n[0]}function F$17(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(2*r),this._gl=e,this._location=n[0]}function T$14(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(3*r),this._gl=e,this._location=n[0]}function U$15(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(4*r),this._gl=e,this._location=n[0]}function x$1a(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(4*r),this._gl=e,this._location=n[0]}function E$1c(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(9*r),this._gl=e,this._location=n[0]}function I$1l(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(16*r),this._gl=e,this._location=n[0]}M$17.prototype.set=function(){if(!p$1d.equalsArray(this.value,this._value,0)){p$1d.clone(this.value,this._value);var e=p$1d.toArray(this.value,C$1a);this._gl.uniformMatrix4fv(this._location,!1,e)}},A$1d.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;r<t;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._gl.uniform1fv(this._location,i)},p$13.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1o.equalsArray(a,i,r)||(o$1o.pack(a,i,r),n=!0),r+=2}n&&this._gl.uniform2fv(this._location,i)},w$$.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(e$2e(a.red))(a.red!==i[r]||a.green!==i[r+1]||a.blue!==i[r+2])&&(i[r]=a.red,i[r+1]=a.green,i[r+2]=a.blue,n=!0);else{if(!e$2e(a.x))throw new t$15("Invalid vec3 value.");o$1p.equalsArray(a,i,r)||(o$1p.pack(a,i,r),n=!0)}r+=3}n&&this._gl.uniform3fv(this._location,i)},m$14.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(e$2e(a.red))e$1X.equalsArray(a,i,r)||(e$1X.pack(a,i,r),n=!0);else{if(!e$2e(a.x))throw new t$15("Invalid vec4 value.");e$2c.equalsArray(a,i,r)||(e$2c.pack(a,i,r),n=!0)}r+=4}n&&this._gl.uniform4fv(this._location,i)},f$11.prototype.set=function(){for(var e=this._gl,t=e.TEXTURE0+this.textureUnitIndex,i=this.value,n=i.length,r=0;r<n;++r){var o=i[r];e.activeTexture(t+r),e.bindTexture(o._target,o._texture)}},f$11.prototype._setSampler=function(e){this.textureUnitIndex=e;for(var t=this._locations,i=t.length,n=0;n<i;++n){var r=e+n;this._gl.uniform1i(t[n],r)}return e+i},d$1k.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;r<t;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._gl.uniform1iv(this._location,i)},F$17.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1o.equalsArray(a,i,r)||(o$1o.pack(a,i,r),n=!0),r+=2}n&&this._gl.uniform2iv(this._location,i)},T$14.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1p.equalsArray(a,i,r)||(o$1p.pack(a,i,r),n=!0),r+=3}n&&this._gl.uniform3iv(this._location,i)},U$15.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];e$2c.equalsArray(a,i,r)||(e$2c.pack(a,i,r),n=!0),r+=4}n&&this._gl.uniform4iv(this._location,i)},x$1a.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];f$15.equalsArray(a,i,r)||(f$15.pack(a,i,r),n=!0),r+=4}n&&this._gl.uniformMatrix2fv(this._location,!1,i)},E$1c.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];p$1e.equalsArray(a,i,r)||(p$1e.pack(a,i,r),n=!0),r+=9}n&&this._gl.uniformMatrix3fv(this._location,!1,i)},I$1l.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];p$1d.equalsArray(a,i,r)||(p$1d.pack(a,i,r),n=!0),r+=16}n&&this._gl.uniformMatrix4fv(this._location,!1,i)};var E$1b=0;function g$1a(e){var t=C$19(e.vertexShaderText,e.fragmentShaderText);this._context=e.context,this._gl=e.gl,this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=e.attributeLocations,this._transformFeedbackVaryings=e.transformFeedbackVaryings,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._uniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=t.duplicateUniformNames,this._cachedShader=void 0,this._maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=t.fragmentShaderText,this._id=E$1b++,this._uniformBuffersNames={},this._nextUniformBufferPoint=0}function B$$(e){var t=[],i=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(e$2e(i))for(var n=i.length,r=0;r<n;r++){var o=i[r].trim(),a=o.slice(o.lastIndexOf(" ")+1);t.push(a)}return t}function C$19(e,t){var i={};if(!e$1W.highpFloatSupported||!e$1W.highpIntSupported){var n,r,o,a,s=B$$(e),l=B$$(t),u=s.length,c=l.length;for(n=0;n<u;n++)for(r=0;r<c;r++)if(s[n]===l[r]){a="czm_mediump_"+(o=s[n]);var h=new RegExp(o+"\\b","g");t=t.replace(h,a),i[a]=o}}return{fragmentShaderText:t,duplicateUniformNames:i}}g$1a._BaseCache={},Object.defineProperties(g$1a.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return x$19(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return x$19(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return x$19(this),this._uniformsByName}},cachedShader:{get:function(){return this._cachedShader},set:function(e){this._cachedShader=e}},name:{get:function(){return""}},program:{get:function(){return this._program}},maximumTextureUnitIndex:{get:function(){return this._maximumTextureUnitIndex}},id:{get:function(){return this._id}}});var l$17="[SuperMap3D WebGL] ";function F$16(e,t){var i=t._vertexShaderText,n=t._fragmentShaderText,r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,i),e.compileShader(r);var o=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(o,n),e.compileShader(o);var a=e.createProgram();e.attachShader(a,r),e.attachShader(a,o),e.deleteShader(r),e.deleteShader(o);var s,l=t._attributeLocations;if(e$2e(l))for(var u in l)l.hasOwnProperty(u)&&e.bindAttribLocation(a,l[u],u);if(e$2e(t._transformFeedbackVaryings)&&e.transformFeedbackVaryings(a,t._transformFeedbackVaryings,e.SEPARATE_ATTRIBS),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS)){var c=t._debugShaders;if(!e.getShaderParameter(o,e.COMPILE_STATUS)){if(s=e.getShaderInfoLog(o),console.error(l$17+"Fragment shader compile log: "+s),e$2e(c)){var h=c.getTranslatedShaderSource(o);console.error(""!==h?l$17+"Translated fragment shader source:\n"+h:l$17+"Fragment shader translation failed.")}throw e.deleteProgram(a),new t$13("Fragment shader failed to compile. Compile log: "+s)}if(!e.getShaderParameter(r,e.COMPILE_STATUS)){if(s=e.getShaderInfoLog(r),console.error(l$17+"Vertex shader compile log: "+s),e$2e(c)){var d=c.getTranslatedShaderSource(r);console.error(""!==d?l$17+"Translated vertex shader source:\n"+d:l$17+"Vertex shader translation failed.")}throw e.deleteProgram(a),new t$13("Vertex shader failed to compile. Compile log: "+s)}throw s=e.getProgramInfoLog(a),console.error(l$17+"Shader program link log: "+s),e$2e(c)&&(console.error(l$17+"Translated vertex shader source:\n"+c.getTranslatedShaderSource(r)),console.error(l$17+"Translated fragment shader source:\n"+c.getTranslatedShaderSource(o))),e.deleteProgram(a),new t$13("Program failed to link. Link log: "+s)}var f=t._logShaderCompilation;return f&&(e$2e(s=e.getShaderInfoLog(r))&&s.length>0&&console.log(l$17+"Vertex shader compile log: "+s)),f&&(e$2e(s=e.getShaderInfoLog(o))&&s.length>0&&console.log(l$17+"Fragment shader compile log: "+s)),f&&(e$2e(s=e.getProgramInfoLog(a))&&s.length>0&&console.log(l$17+"Shader program link log: "+s)),a}function O$Q(e,t,i){for(var n={},r=0;r<i;++r){var o=e.getActiveAttrib(t,r),a=e.getAttribLocation(t,o.name);n[o.name]={name:o.name,type:o.type,index:a}}return n}function w$_(e,t){for(var i={},n=[],r=[],o=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),a=0;a<o;++a){var s=e.getActiveUniform(t,a),l=-1!==s.name.indexOf("[0]",s.name.length-"[0]".length)?s.name.slice(0,s.name.length-3):s.name;if(0!==l.indexOf("gl_"))if(s.name.indexOf("[")<0){var u=e.getUniformLocation(t,l);if(null!==u){var c=I$1m(e,s,l,u);i[l]=c,n.push(c),c._setSampler&&r.push(c)}}else{var h,d,f,p,_=l.indexOf("[");if(_>=0){if(!e$2e(h=i[l.slice(0,_)]))continue;(d=h._locations).length<=1&&(f=h.value,null!==(p=e.getUniformLocation(t,l))&&(d.push(p),f.push(e.getUniform(t,p))))}else{d=[];for(var m=!1,g=0;g<s.size;++g)null!==(p=e.getUniformLocation(t,l+"["+g+"]"))&&d.push(p),0===g&&null===p&&(m=!0);d.length>0&&!m&&(h=V$$(e,s,l,d),i[l]=h,n.push(h),h._setSampler&&r.push(h))}}}return{uniformsByName:i,uniforms:n,samplerUniforms:r}}function k$10(e,t){var i=[],n=[];for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=r,s=e._duplicateUniformNames[a];e$2e(s)&&(o.name=s,a=s);var l=l$18[a];e$2e(l)?i.push({uniform:o,automaticUniform:l}):n.push(o)}return{automaticUniforms:i,manualUniforms:n}}function R$11(e,t,i){e.useProgram(t);for(var n=0,r=i.length,o=0;o<r;++o)n=i[o]._setSampler(n);return e.useProgram(null),n}function x$19(e){if(!e$2e(e._program)){var t=e._gl,i=F$16(t,e,e._debugShaders),n=t.getProgramParameter(i,t.ACTIVE_ATTRIBUTES),r=w$_(t,i),o=k$10(e,r.uniformsByName);e._program=i,e._numberOfVertexAttributes=n,e._vertexAttributes=O$Q(t,i,n),e._uniformsByName=r.uniformsByName,e._uniforms=r.uniforms,e._automaticUniforms=o.automaticUniforms,e._manualUniforms=o.manualUniforms,e._maximumTextureUnitIndex=R$11(t,i,r.samplerUniforms)}}function V$_(e,t,i){switch(i){case"float":case"f32":return new c$15(e,t);case"vec2":case"vec2<f32>":return new _$X(e,t);case"vec3":case"vec3<f32>":return new m$13(e,t);case"vec4":case"vec4<f32>":return new p$12(e,t);case"texture2D":return new f$10(e,t);case"texture2DArray":return new d$1j(e,t);case"int":case"bool":case"i32":return new y$W(e,t);case"int2":case"bool2":case"vec2<i32>":return new x$18(e,t);case"int3":case"bool3":case"vec3<i32>":return new w$Z(e,t);case"int4":case"bool4":case"vec4<i32>":return new U$14(e,t);case"mat2":case"mat2x2<f32>":return new A$1c(e,t);case"mat3":case"mat3x3<f32>":return new I$1k(e,t);case"mat4":case"mat4x4<f32>":return new q$18(e,t);default:throw new t$13('Unrecognized for uniform "'+t+'".')}}function c$15(e,t){this.name=t,this.value=void 0,this._value=0,this._effect=e}function _$X(e,t){this.name=t,this.value=void 0,this._value=new o$1o,this._effect=e}function m$13(e,t){this.name=t,this.value=void 0,this._value=void 0,this._effect=e}function p$12(e,t){this.name=t,this.value=void 0,this._value=void 0,this._effect=e,this._valueType=-1}function f$10(e,t){this.name=t,this.value=void 0,this._effect=e,this.id=void 0}function d$1j(e,t){this.name=t,this.value=void 0,this._effect=e,this.lastBindTextureID=void 0}function y$W(e,t){this.name=t,this.value=void 0,this._value=0,this._effect=e}function x$18(e,t){this.name=t,this.value=void 0,this._value=new o$1o,this._effect=e}function w$Z(e,t){this.name=t,this.value=void 0,this._value=new o$1p,this._effect=e}function U$14(e,t){this.name=t,this.value=void 0,this._value=new e$2c,this._effect=e}g$1a.prototype._bind=function(){x$19(this),this._gl.useProgram(this._program)},g$1a.prototype._setUniforms=function(e,t,i,n){var r,o;if(e$2e(e)){var a=this._manualUniforms;for(r=a.length,o=0;o<r;++o){var s=a[o];s.value=e[s.name]()}}var l=this._automaticUniforms;for(r=l.length,o=0;o<r;++o){var u=l[o];u.uniform.value=u.automaticUniform.getValue(t)}var c=this._uniforms;for(r=c.length,o=0;o<r;++o)c[o].set();if(this._context.webgl2){const e=n._uniformBuffers;for(this.initUniformBufferBindPoint(e),o=0,r=e.length;o<r;o++){var h=e[o];this.bindUniformBuffer(h.buffer.getBuffer(),h.name)}}if(i){var d=this._gl,f=this._program;if(d.validateProgram(f),!d.getProgramParameter(f,d.VALIDATE_STATUS))throw new t$15("Program validation failed. Program info log: "+d.getProgramInfoLog(f))}},g$1a.prototype.initUniformBufferBindPoint=function(e){if(this._nextUniformBufferPoint>0||0==e.length||!this._context.webgl2)return;const t=this.program,i=this._context._uniformBufferEngine;var n,r;for(n=0,r=e.length;n<r;n++){const r=e[n]._ubo,o=this._allocateBindingPointIndexForUniformBuffer(r.name);i.bindUniformBlock(t,r.name,o)}},g$1a.prototype.bindUniformBuffer=function(e,t){const i=this._uniformBuffersNames[t];void 0!==i&&g$1a._BaseCache[i]!==e&&(g$1a._BaseCache[i]=e,this._context._uniformBufferEngine.bindUniformBufferBase(e,i,t))},g$1a.prototype._allocateBindingPointIndexForUniformBuffer=function(e){var t=this._nextUniformBufferPoint;return this._uniformBuffersNames[e]=t,this._nextUniformBufferPoint++,t},g$1a.prototype._isReady=function(){return!0},g$1a.prototype.isDestroyed=function(){return!1},g$1a.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)},g$1a.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),i$11(this)},c$15.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._effect.setFloat(this.name,this.value))},_$X.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._effect.setFloat2(this.name,e.x,e.y))},m$13.prototype.set=function(){var e=this.value;if(e$2e(e.red))e$1X.equals(e,this._value)||(this._value=e$1X.clone(e,this._value),this._effect.setFloat3(this.name,e.red,e.green,e.blue));else{if(!e$2e(e.x))throw new t$15('Invalid vec3 value for uniform "'+this.name+'".');o$1p.equals(e,this._value)||(this._value=o$1p.clone(e,this._value),this._effect.setFloat3(this.name,e.x,e.y,e.z))}},p$12.prototype.set=function(){var e=this.value;this._valueType<0&&(e$2e(e.red)?this._valueType=0:e$2e(e.x)&&(this._valueType=1)),0==this._valueType?e$1X.equals(e,this._value)||(this._value=e$1X.clone(e,this._value),this._effect.setFloat4(this.name,e.red,e.green,e.blue,e.alpha)):e$2c.equals(e,this._value)||(this._value=e$2c.clone(e,this._value),this._effect.setFloat4(this.name,e.x,e.y,e.z,e.w))},f$10.prototype.set=function(){var e=this.value,t=this._effect.getEngine(),i=e._inner._texture.getInternalTexture();t._setInternalTexture(this.name,i,this.name)},f$10.prototype.getUniqueId=function(e){var t=this.value;this._effect.getEngine();var i=t._inner._texture.getInternalTexture();e.push(i.uniqueId)},d$1j.prototype.set=function(){var e=this.value;this._effect.setTextureArray(this.name,e._texture)},y$W.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._effect.setInt(this.name,this.value))},x$18.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._effect.setInt2(this.name,e.x,e.y))},w$Z.prototype.set=function(){var e=this.value;o$1p.equals(e,this._value)||(o$1p.clone(e,this._value),this._effect.setInt3(this.name,e.x,e.y,e.z))},U$14.prototype.set=function(){var e=this.value;e$2c.equals(e,this._value)||(e$2c.clone(e,this._value),this._effect.setInt3(this.name,e.x,e.y,e.z,e.w))};var z$_=new Float32Array(4);function A$1c(e,t){this.name=t,this.value=void 0,this._value=new f$15,this._effect=e}A$1c.prototype.set=function(){if(!f$15.equalsArray(this.value,this._value,0)){f$15.clone(this.value,this._value);var e=f$15.toArray(this.value,z$_);this._effect.setMatrix2x2(this.name,e)}};var C$18=new Float32Array(9);function I$1k(e,t){this.name=t,this.value=void 0,this._value=new p$1e,this._effect=e}I$1k.prototype.set=function(){if(!p$1e.equalsArray(this.value,this._value,0)){p$1e.clone(this.value,this._value);var e=p$1e.toArray(this.value,C$18);this._effect.setMatrix3x3(this.name,e)}};var F$15=new Float32Array(16),T$13=new Matrix;function q$18(e,t){this.name=t,this.value=void 0,this._value=new p$1d,this._effect=e}function j$1a(e,t,i,n){switch(i){case"float":case"f32":return new A$1b(e,t,n);case"vec2":case"vec2<f32>":return new m$12(e,t,n);case"vec3":case"vec3<f32>":return new g$19(e,t,n);case"vec4":case"vec4<f32>":return new w$Y(e,t,n);case"texture2D":case"textureCube":return new v$S(e,t,n);case"int":case"bool":case"u32":case"i32":return new d$1i(e,t,n);case"int2":case"bool2":case"vec2<u32>":case"vec2<i32>":return new b$1c(e,t,n);case"int3":case"bool3":case"vec3<u32>":case"vec3<i32>":return new I$1j(e,t,n);case"int4":case"bool4":case"vec4<u32>":case"vec4<i32>":return new x$17(e,t,n);case"mat2":case"mat2x2<f32>":return new U$13(e,t,n);case"mat3":case"mat3x3<f32>":return new q$17(e,t,n);case"mat4":case"mat4x4<f32>":return new k$$(e,t,n);default:throw new t$13('Unrecognized for uniform "'+t+'".')}}function A$1b(e,t,i){this.name=t,this._effect=e}function m$12(e,t,i){this.name=t,this._value=new Float32Array(2*i),this._effect=e}function g$19(e,t,i){this.name=t,this._value=new Float32Array(3*i),this._effect=e}function w$Y(e,t,i){this.name=t,this._value=new Float32Array(4*i),this._effect=e}function v$S(e,t,i){this.name=t,this.value=new Array(i),this._effect=e}function d$1i(e,t,i){this.name=t,this._value=new Int32Array(i),this._effect=e}function b$1c(e,t,i){this.name=t,this._value=new Int32Array(2*i),this._effect=e}function I$1j(e,t,i){this.name=t,this._value=new Int32Array(3*i),this._effect=e}function x$17(e,t,i){this.name=t,this._value=new Int32Array(4*i),this._effect=e}function U$13(e,t,i){this.name=t,this._value=new Float32Array(9*i),this._effect=e}function q$17(e,t,i){this.name=t,this._value=new Float32Array(9*i),this._effect=e}function k$$(e,t,i){this.name=t,this._value=new Float32Array(16*i),this._effect=e}q$18.prototype.set=function(){p$1d.equalsArray(this.value,this._value,0)||(p$1d.clone(this.value,this._value),p$1d.toArray(this.value,F$15),Matrix.FromArrayToRef(F$15,0,T$13),this._effect.setMatrix(this.name,T$13))},A$1b.prototype.set=function(){this._effect.setArray(this.name,this.value)},m$12.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1o.equalsArray(a,i,r)||(o$1o.pack(a,i,r),n=!0),r+=2}n&&this._effect.setArray2(this.name,i)},g$19.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(e$2e(a.red))(a.red!==i[r]||a.green!==i[r+1]||a.blue!==i[r+2])&&(i[r]=a.red,i[r+1]=a.green,i[r+2]=a.blue,n=!0);else{if(!e$2e(a.x))throw new t$15("Invalid vec3 value.");o$1p.equalsArray(a,i,r)||(o$1p.pack(a,i,r),n=!0)}r+=3}n&&this._effect.setArray3(this.name,i)},w$Y.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(e$2e(a.red))e$1X.equalsArray(a,i,r)||(e$1X.pack(a,i,r),n=!0);else{if(!e$2e(a.x))throw new t$15("Invalid vec4 value.");e$2c.equalsArray(a,i,r)||(e$2c.pack(a,i,r),n=!0)}r+=4}n&&this._effect.setArray4(this.name,i)},v$S.prototype.set=function(){for(var e=this.value,t=e.length,i=[],n=0;n<t;++n){var r=e[n];i.push(r._inner._texture)}this._effect.setTextureArray(this.name,i)},v$S.prototype._setSampler=function(e){return this.textureUnitIndex=e,e+length},v$S.prototype.getUniqueId=function(e){for(var t=this.value,i=t.length,n=0;n<i;++n){var r=t[n]._inner._texture.getInternalTexture();e.push(r.uniqueId)}},d$1i.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;r<t;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._effect.setIntArray(this.name,i)},b$1c.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1o.equalsArray(a,i,r)||(o$1o.pack(a,i,r),n=!0),r+=2}n&&this._effect.setIntArray2(this.name,i)},I$1j.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1p.equalsArray(a,i,r)||(o$1p.pack(a,i,r),n=!0),r+=3}n&&this._effect.setIntArray3(this.name,i)},x$17.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];e$2c.equalsArray(a,i,r)||(e$2c.pack(a,i,r),n=!0),r+=4}n&&this._effect.setIntArray4(this.name,i)},U$13.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];f$15.equalsArray(a,i,r)||(f$15.pack(a,i,r),n=!0),r+=4}n&&this._effect.setMatrices(this.name,i)},q$17.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];p$1e.equalsArray(a,i,r)||(p$1e.pack(a,i,r),n=!0),r+=9}n&&this._effect.setMatrices(this.name,i)},k$$.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];p$1d.equalsArray(a,i,r)||(p$1d.pack(a,i,r),n=!0),r+=16}n&&this._effect.setMatrices(this.name,i)};var _0x302d18=(_0x1f7676=!0,function(e,t){var i=_0x1f7676?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f7676=!1,i}),_0xf1af12=_0x302d18(void 0,(function(){return _0xf1af12.toString().search("(((.+)+)+)+$").toString().constructor(_0xf1af12).search("(((.+)+)+)+$")})),_0x1f7676;function _0x2da137(e,t){void 0===t&&(t=!0),this.effect=null,this.defines=null,this.drawContext=e.createDrawContext(),t&&(this.materialContext=e.createMaterialContext())}_0xf1af12(),_0x2da137.IsWrapper=function(e){return void 0===e.getPipelineContext},_0x2da137.GetEffect=function(e){return void 0===e.getPipelineContext?e.effect:e},_0x2da137.prototype.setEffect=function(e,t,i){var n;void 0===i&&(i=!0),this.effect=e,void 0!==t&&(this.defines=t),i&&(null===(n=this.drawContext)||void 0===n||n.reset())},_0x2da137.prototype.dispose=function(){var e;null===(e=this.drawContext)||void 0===e||e.dispose()};var _0x90fc5=(_0x480309=!0,function(e,t){var i=_0x480309?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x480309=!1,i}),_0x249ff6=_0x90fc5(void 0,(function(){return _0x249ff6.toString().search("(((.+)+)+)+$").toString().constructor(_0x249ff6).search("(((.+)+)+)+$")})),_0x480309;_0x249ff6();var _0x5b1907={GLSL:0,WGSL:1,0:"GLSL",1:"WGSL"},_0x3b3a87=Object.freeze(_0x5b1907);function f$$(){this._lastTextureId=[],this._lastLeftOverBufferID=-1,this._init=!1}function S$W(e,t){var i=/#define OUTPUT_DECLARATION/,n=e.split("\n");if(/#version 300 es/g.test(e))return e;var r,o,a=-1;for(r=0;r<n.length;++r)if(o=n[r],i.test(o)){a=r;break}if(-1===a)throw new t$15("Could not find a #define OUTPUT_DECLARATION!");var s=[];for(r=0;r<10;r++){var l="gl_FragData\\["+r+"\\]",u="czm_out"+r;new RegExp(l,"g").test(e)&&(L$1a(u,s),g$18(l,u,n),n.splice(a,0,"layout(location = "+r+") out vec4 "+u+";"),a+=1)}var c="czm_fragColor";z$Z("gl_FragColor",n)&&(L$1a(c,s),g$18("gl_FragColor",c,n),n.splice(a,0,"layout(location = 0) out vec4 czm_fragColor;"),a+=1);var h=P$12(s,n),d={};for(r=0;r<n.length;r++)for(var f in o=n[r],h)if(h.hasOwnProperty(f)){new RegExp("(layout)[^]+(out)[^]+("+f+")[^]+","g").test(o)&&(d[o]=f)}for(var p in d)if(d.hasOwnProperty(p)){var _,m=d[p],g=n.indexOf(p),x=h[m],y=x.length;for(_=0;_<y;_++)n.splice(g,0,x[_]);for(g+=y+1,_=y-1;_>=0;_--)n.splice(g,0,"#endif //"+x[_])}var v="#version 300 es",$=!1;for(r=0;r<n.length;r++)/#version/.test(n[r])&&(n[r]=v,$=!0);return $||n.splice(0,0,v),R$10("EXT_draw_buffers",n),R$10("EXT_frag_depth",n),g$18("texture2D","texture",n),g$18("texture3D","texture",n),g$18("textureCube","texture",n),g$18("gl_FragDepthEXT","gl_FragDepth",n),t?g$18("varying","in",n):(g$18("attribute","in",n),g$18("varying","out",n)),F$14(n)}function g$18(e,t,i){for(var n=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),r=i.length,o=0;o<r;++o){var a=i[o];i[o]=a.replace(n,"$1"+t+"$3")}}function m$11(e,t,i){for(var n=i.length,r=0;r<n;++r){var o=i[r];i[r]=o.replace(e,t)}}function z$Z(e,t){for(var i=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),n=t.length,r=0;r<n;++r){var o=t[r];if(i.test(o))return!0}return!1}function F$14(e){for(var t="",i=e.length,n=0;n<i;++n)t+=e[n]+"\n";return t}function L$1a(e,t){-1===t.indexOf(e)&&t.push(e)}function P$12(e,t){for(var i={},n=e.length,r=[],o=0;o<t.length;++o){var a=t[o],s=/(#ifdef|#if)/g.test(a),l=/#else/g.test(a),u=/#endif/g.test(a);if(s)r.push(a);else if(l){var c=r[r.length-1].replace("ifdef","ifndef");/if/g.test(c)&&(c=c.replace(/(#if\s+)(\S*)([^]*)/,"$1!($2)$3")),r.pop(),r.push(c)}else if(u)r.pop();else if(!/layout/g.test(a))for(var h=0;h<n;++h){var d=e[h];-1!==a.indexOf(d)&&(e$2e(i[d])?i[d]=i[d].filter((function(e){return r.indexOf(e)>=0})):i[d]=r.slice())}}return i}function R$10(e,t){m$11(new RegExp("#extension\\s+GL_"+e+"\\s+:\\s+[a-zA-Z0-9]+\\s*$","g"),"",t)}Object.defineProperties(f$$.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}}}),f$$.prototype.isDirty=function(e,t){if(!this._init)return!0;var i=-1;if(e$2e(t.drawContext.buffers.LeftOver)&&(i=t.drawContext.buffers.LeftOver.uniqueId,t.effect._pipelineContext.uniformBuffer.getBuffer().uniqueId!=i))return!0;var n,r=e.length,o=[];for(n=0;n<r;++n)e[n].getUniqueId(o);if((r=o.length)!==this._lastTextureId.length)return!0;for(n=0;n<r;++n)if(this._lastTextureId[n]!==o[n])return!0;return!1},f$$.prototype.setBufferIDToContext=function(e){this._lastTextureId=[];var t,i=e.length;for(t=0;t<i;++t){var n=e[t];e[t].getUniqueId(this._lastTextureId),n.set()}this._init=!0},f$$.prototype.isDestroyed=function(){return!1},f$$.prototype.destroy=function(){return i$11(this)};var czm_degreesPerRadian$1="/**\n * A built-in GLSL floating-point constant for converting radians to degrees.\n *\n * @alias czm_degreesPerRadian\n * @glslConstant\n *\n * @see CesiumMath.DEGREES_PER_RADIAN\n *\n * @example\n * // GLSL declaration\n * const float czm_degreesPerRadian = ...;\n *\n * // Example\n * float deg = czm_degreesPerRadian * rad;\n */\nconst float czm_degreesPerRadian = 57.29577951308232;\n",czm_depthRange$1="/**\n * A built-in GLSL vec2 constant for defining the depth range.\n * This is a workaround to a bug where IE11 does not implement gl_DepthRange.\n *\n * @alias czm_depthRange\n * @glslConstant\n *\n * @example\n * // GLSL declaration\n * float depthRangeNear = czm_depthRange.near;\n * float depthRangeFar = czm_depthRange.far;\n *\n */\nconst czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n",czm_ellipsoidInverseRadii$1="/**\n * The reciprocal of the radius of the WGS84 ellipsoid.\n *\n * @name czm_ellipsoidInverseRadii\n * @glslConstant\n */\nconst vec3 czm_ellipsoidInverseRadii = vec3(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.314245);\n",czm_ellipsoidRadii$1="/**\n * The radius of the WGS84 ellipsoid.\n *\n * @name czm_ellipsoidRadii\n * @glslConstant\n */\nconst vec3 czm_ellipsoidRadii = vec3(6378137.0, 6378137.0, 6356752.314245);\n",czm_epsilon1$1="/**\n * 0.1\n *\n * @name czm_epsilon1\n * @glslConstant\n */\nconst float czm_epsilon1 = 0.1;\n",czm_epsilon2$1="/**\n * 0.01\n *\n * @name czm_epsilon2\n * @glslConstant\n */\nconst float czm_epsilon2 = 0.01;\n",czm_epsilon3$1="/**\n * 0.001\n *\n * @name czm_epsilon3\n * @glslConstant\n */\nconst float czm_epsilon3 = 0.001;\n",czm_epsilon4$1="/**\n * 0.0001\n *\n * @name czm_epsilon4\n * @glslConstant\n */\nconst float czm_epsilon4 = 0.0001;\n",czm_epsilon5$1="/**\n * 0.00001\n *\n * @name czm_epsilon5\n * @glslConstant\n */\nconst float czm_epsilon5 = 0.00001;\n",czm_epsilon6$1="/**\n * 0.000001\n *\n * @name czm_epsilon6\n * @glslConstant\n */\nconst float czm_epsilon6 = 0.000001;\n",czm_epsilon7$1="/**\n * 0.0000001\n *\n * @name czm_epsilon7\n * @glslConstant\n */\nconst float czm_epsilon7 = 0.0000001;\n",czm_infinity$1="/**\n * DOC_TBA\n *\n * @name czm_infinity\n * @glslConstant\n */\nconst float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?\n",czm_oneOverPi$1="/**\n * A built-in GLSL floating-point constant for <code>1/pi</code>.\n *\n * @alias czm_oneOverPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverPi = ...;\n *\n * // Example\n * float pi = 1.0 / czm_oneOverPi;\n */\nconst float czm_oneOverPi = 0.3183098861837907;\n",czm_oneOverTwoPi$1="/**\n * A built-in GLSL floating-point constant for <code>1/2pi</code>.\n *\n * @alias czm_oneOverTwoPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverTwoPi = ...;\n *\n * // Example\n * float pi = 2.0 * czm_oneOverTwoPi;\n */\nconst float czm_oneOverTwoPi = 0.15915494309189535;\n",czm_passCesium3DTile$1="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}\n *\n * @name czm_passCesium3DTile\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTile = 4.0;\n",czm_passCesium3DTileClassification$1="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}\n *\n * @name czm_passCesium3DTileClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassification = 5.0;\n",czm_passCesium3DTileClassificationIgnoreShow$1="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}\n *\n * @name czm_passCesium3DTileClassificationIgnoreShow\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n",czm_passClassification$1="/**\n * The automatic GLSL constant for {@link Pass#CLASSIFICATION}\n *\n * @name czm_passClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passClassification = 7.0;\n",czm_passCompute$1="/**\n * The automatic GLSL constant for {@link Pass#COMPUTE}\n *\n * @name czm_passCompute\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCompute = 1.0;\n",czm_passEnvironment$1="/**\n * The automatic GLSL constant for {@link Pass#ENVIRONMENT}\n *\n * @name czm_passEnvironment\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passEnvironment = 0.0;\n",czm_passGlobe$1="/**\n * The automatic GLSL constant for {@link Pass#GLOBE}\n *\n * @name czm_passGlobe\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGlobe = 2.0;\n",czm_passGround$1="/**\n * The automatic GLSL constant for {@link Pass#GROUND}\n *\n * @name czm_passGround\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGround = 4.0;\n",czm_passOpaque$1="/**\n * The automatic GLSL constant for {@link Pass#OPAQUE}\n *\n * @name czm_passOpaque\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOpaque = 12.0;\n",czm_passOverlay$1="/**\n * The automatic GLSL constant for {@link Pass#OVERLAY}\n *\n * @name czm_passOverlay\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOverlay = 20.0;",czm_passTerrainClassification$1="/**\n * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}\n *\n * @name czm_passTerrainClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTerrainClassification = 3.0;\n",czm_passTranslucent$1="/**\n * The automatic GLSL constant for {@link Pass#TRANSLUCENT}\n *\n * @name czm_passTranslucent\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTranslucent = 18.0;",czm_pi$1="/**\n * A built-in GLSL floating-point constant for <code>Math.PI</code>.\n *\n * @alias czm_pi\n * @glslConstant\n *\n * @see CesiumMath.PI\n *\n * @example\n * // GLSL declaration\n * const float czm_pi = ...;\n *\n * // Example\n * float twoPi = 2.0 * czm_pi;\n */\nconst float czm_pi = 3.141592653589793;\n",czm_piOverFour$1="/**\n * A built-in GLSL floating-point constant for <code>pi/4</code>.\n *\n * @alias czm_piOverFour\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_FOUR\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverFour = ...;\n *\n * // Example\n * float pi = 4.0 * czm_piOverFour;\n */\nconst float czm_piOverFour = 0.7853981633974483;\n",czm_piOverSix$1="/**\n * A built-in GLSL floating-point constant for <code>pi/6</code>.\n *\n * @alias czm_piOverSix\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_SIX\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverSix = ...;\n *\n * // Example\n * float pi = 6.0 * czm_piOverSix;\n */\nconst float czm_piOverSix = 0.5235987755982988;\n",czm_piOverThree$1="/**\n * A built-in GLSL floating-point constant for <code>pi/3</code>.\n *\n * @alias czm_piOverThree\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_THREE\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverThree = ...;\n *\n * // Example\n * float pi = 3.0 * czm_piOverThree;\n */\nconst float czm_piOverThree = 1.0471975511965976;\n",czm_piOverTwo$1="/**\n * A built-in GLSL floating-point constant for <code>pi/2</code>.\n *\n * @alias czm_piOverTwo\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverTwo = ...;\n *\n * // Example\n * float pi = 2.0 * czm_piOverTwo;\n */\nconst float czm_piOverTwo = 1.5707963267948966;\n",czm_radiansPerDegree$1="/**\n * A built-in GLSL floating-point constant for converting degrees to radians.\n *\n * @alias czm_radiansPerDegree\n * @glslConstant\n *\n * @see CesiumMath.RADIANS_PER_DEGREE\n *\n * @example\n * // GLSL declaration\n * const float czm_radiansPerDegree = ...;\n *\n * // Example\n * float rad = czm_radiansPerDegree * deg;\n */\nconst float czm_radiansPerDegree = 0.017453292519943295;\n",czm_sceneMode2D$1="/**\n * The constant identifier for the 2D {@link SceneMode}\n *\n * @name czm_sceneMode2D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode2D = 2.0;\n",czm_sceneMode3D$1="/**\n * The constant identifier for the 3D {@link SceneMode}\n *\n * @name czm_sceneMode3D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode3D = 3.0;\n",czm_sceneModeColumbusView$1="/**\n * The constant identifier for the Columbus View {@link SceneMode}\n *\n * @name czm_sceneModeColumbusView\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneModeColumbusView = 1.0;\n",czm_sceneModeMorphing$1="/**\n * The constant identifier for the Morphing {@link SceneMode}\n *\n * @name czm_sceneModeMorphing\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n */\nconst float czm_sceneModeMorphing = 0.0;\n",czm_solarRadius$1="/**\n * A built-in GLSL floating-point constant for one solar radius.\n *\n * @alias czm_solarRadius\n * @glslConstant\n *\n * @see CesiumMath.SOLAR_RADIUS\n *\n * @example\n * // GLSL declaration\n * const float czm_solarRadius = ...;\n */\nconst float czm_solarRadius = 695500000.0;\n",czm_threePiOver2$1="/**\n * A built-in GLSL floating-point constant for <code>3pi/2</code>.\n *\n * @alias czm_threePiOver2\n * @glslConstant\n *\n * @see CesiumMath.THREE_PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_threePiOver2 = ...;\n *\n * // Example\n * float pi = (2.0 / 3.0) * czm_threePiOver2;\n */\nconst float czm_threePiOver2 = 4.71238898038469;\n",czm_twoPi$1="/**\n * A built-in GLSL floating-point constant for <code>2pi</code>.\n *\n * @alias czm_twoPi\n * @glslConstant\n *\n * @see CesiumMath.TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_twoPi = ...;\n *\n * // Example\n * float pi = czm_twoPi / 2.0;\n */\nconst float czm_twoPi = 6.283185307179586;\n",czm_webMercatorMaxLatitude$1="/**\n * The maximum latitude, in radians, both North and South, supported by a Web Mercator\n * (EPSG:3857) projection. Technically, the Mercator projection is defined\n * for any latitude up to (but not including) 90 degrees, but it makes sense\n * to cut it off sooner because it grows exponentially with increasing latitude.\n * The logic behind this particular cutoff value, which is the one used by\n * Google Maps, Bing Maps, and Esri, is that it makes the projection\n * square. That is, the rectangle is equal in the X and Y directions.\n *\n * The constant value is computed as follows:\n * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))\n *\n * @name czm_webMercatorMaxLatitude\n * @glslConstant\n */\nconst float czm_webMercatorMaxLatitude = 1.4844222297453324;\n",czm_depthRangeStruct$1="/**\n * @name czm_depthRangeStruct\n * @glslStruct\n */\nstruct czm_depthRangeStruct\n{\n float near;\n float far;\n};\n",czm_ellipsoid$1="/** DOC_TBA\n *\n * @name czm_ellipsoid\n * @glslStruct\n */\nstruct czm_ellipsoid\n{\n vec3 center;\n vec3 radii;\n vec3 inverseRadii;\n vec3 inverseRadiiSquared;\n};\n",czm_material$1="/**\n * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.\n *\n * @name czm_material\n * @glslStruct\n *\n * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n * @property {float} specular Intensity of incoming light reflecting in a single direction.\n * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n * @property {float} alpha Opacity of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n */\nstruct czm_material\n{\n vec3 diffuse;\n float specular;\n float shininess;\n vec3 normal;\n vec3 emission;\n float alpha;\n};\n",czm_materialInput$1="/**\n * Used as input to every material's czm_getMaterial function.\n *\n * @name czm_materialInput\n * @glslStruct\n *\n * @property {float} s 1D texture coordinates.\n * @property {vec2} st 2D texture coordinates.\n * @property {vec3} str 3D texture coordinates.\n * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.\n * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.\n * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.\n * @property {float} height The height of the terrain in meters above or below the WGS84 ellipsoid. Only available for globe materials.\n * @property {float} slope The slope of the terrain normalized from 0 to 1. 0 is completely vertical, 1 is completely flat. Only available for globe materials.\n */\nstruct czm_materialInput\n{\n float s;\n vec2 st;\n vec3 str;\n vec3 normalEC;\n mat3 tangentToEyeMatrix;\n vec3 positionToEyeEC;\n float height;\n float slope;\n};\n",czm_ray$1="/**\n * DOC_TBA\n *\n * @name czm_ray\n * @glslStruct\n */\nstruct czm_ray\n{\n vec3 origin;\n vec3 direction;\n};\n",czm_raySegment$1="/**\n * DOC_TBA\n *\n * @name czm_raySegment\n * @glslStruct\n */\nstruct czm_raySegment\n{\n float start;\n float stop;\n};\n\n/**\n * DOC_TBA\n *\n * @name czm_emptyRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\n\n/**\n * DOC_TBA\n *\n * @name czm_fullRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n",czm_s3mMaterialInput$1="struct czm_s3mMaterialInput\n{\n vec4 ambientColor;\n vec4 diffuseColor;\n vec4 ambientLightColor;\n vec4 sunLightColor;\n mat4 texMatrix;\n float texture0Width;\n float texture1Width;\n vec3 sunDirectionEC;\n float sunLightON;\n};\n",czm_shadowParameters$1="struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\n vec3 texCoords;\n#else\n vec2 texCoords;\n#endif\n\n float depthBias;\n float depth;\n float nDotL;\n vec2 texelStepSize;\n float normalShadingSmooth;\n float darkness;\n vec4 uvRange;\n float shadowMapIndex;\n};\n",czm_acesTonemapping$1="// See:\n\nvec3 czm_acesTonemapping(vec3 color) {\n float g = 0.985;\n float a = 0.065;\n float b = 0.0001;\n float c = 0.433;\n float d = 0.238;\n\n color = (color * (color + a) - b) / (color * (g * color + c) + d);\n\n color = clamp(color, 0.0, 1.0);\n\n return color;\n}\n",czm_adjustColor$1="uniform float uBrightness;\nuniform float uContrast;\nuniform float uHue;\nuniform float uSaturation;\nuniform float uOneOverGamma;\nvec3 czm_adjustColor(vec3 inputColor)\n{\n vec3 outputColor = inputColor;\n outputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\n outputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\n outputColor.rgb = czm_hue(outputColor.rgb, uHue);\n outputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\n outputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\n outputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\n return outputColor;\n}",czm_alphaWeight$1="/**\n * @private\n */\nfloat czm_alphaWeight(float a)\n{\n float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n\n // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:\n return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n",czm_antialias$1="/**\n * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.\n *\n * @name czm_antialias\n * @glslFunction\n *\n * @param {vec4} color1 The color on one side of the edge.\n * @param {vec4} color2 The color on the other side of the edge.\n * @param {vec4} currentcolor The current color, either <code>color1</code> or <code>color2</code>.\n * @param {float} dist The distance to the edge in texture coordinates.\n * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.\n * @returns {vec4} The anti-aliased color.\n *\n * @example\n * // GLSL declarations\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);\n *\n * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space\n * float dist = abs(textureCoordinates.t - 0.5);\n * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));\n * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);\n */\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\n float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\n float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\n val1 = val1 * (1.0 - val2);\n val1 = val1 * val1 * (3.0 - (2.0 * val1));\n val1 = pow(val1, 0.5); //makes the transition nicer\n \n vec4 midColor = (color1 + color2) * 0.5;\n return mix(midColor, currentColor, val1);\n}\n\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\n return czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n",czm_approximateSphericalCoordinates$1="/**\n * Approximately computes spherical coordinates given a normal.\n * Uses approximate inverse trigonometry for speed and consistency,\n * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.\n *\n * @name czm_approximateSphericalCoordinates\n * @glslFunction\n *\n * @param {vec3} normal arbitrary-length normal.\n *\n * @returns {vec2} Approximate latitude and longitude spherical coordinates.\n */\nvec2 czm_approximateSphericalCoordinates(vec3 normal) {\n // Project into plane with vertical for latitude\n float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\n float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\n return vec2(latitudeApproximation, longitudeApproximation);\n}\n",czm_branchFreeTernary$1="/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a float expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {float} a Value to return if the comparison is true.\n * @param {float} b Value to return if the comparison is false.\n *\n * @returns {float} equivalent of comparison ? a : b\n */\nfloat czm_branchFreeTernary(bool comparison, float a, float b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec2 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec2} a Value to return if the comparison is true.\n * @param {vec2} b Value to return if the comparison is false.\n *\n * @returns {vec2} equivalent of comparison ? a : b\n */\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec3 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec4 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n",czm_cascadeColor$1="\nvec4 czm_cascadeColor(vec4 weights)\n{\n return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\n vec4(0.0, 1.0, 0.0, 1.0) * weights.y +\n vec4(0.0, 0.0, 1.0, 1.0) * weights.z +\n vec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n",czm_cascadeDistance$1="\nuniform vec4 shadowMap_cascadeDistances;\n\nfloat czm_cascadeDistance(vec4 weights)\n{\n return dot(shadowMap_cascadeDistances, weights);\n}\n",czm_cascadeMatrix$1="\nuniform mat4 shadowMap_cascadeMatrices[4];\n\nmat4 czm_cascadeMatrix(vec4 weights)\n{\n return shadowMap_cascadeMatrices[0] * weights.x +\n shadowMap_cascadeMatrices[1] * weights.y +\n shadowMap_cascadeMatrices[2] * weights.z +\n shadowMap_cascadeMatrices[3] * weights.w;\n}\n",czm_cascadeWeights$1="\nuniform vec4 shadowMap_cascadeSplits[2];\n\nvec4 czm_cascadeWeights(float depthEye)\n{\n // One component is set to 1.0 and all others set to 0.0.\n vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\n vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}\n",czm_clip$1="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform float clip_mode;\nuniform vec4 clip_planes[6];\nuniform vec4 clip_line_color;\nconst float clip_lineWidth = 3.0;\n\nfloat GetClipDistance(vec3 pos, vec3 planeNormal, float disToOrigin)\n{\n\treturn dot(planeNormal, pos) + disToOrigin;\n}\n\nfloat ClipBehindAllPlane(float fBorderWidth, vec4 clip_vertex)\n{\nfloat distance = 0.0;\nfloat result = -1.0;\n#ifdef CLIPPLANE\ndistance = GetClipDistance(clip_vertex.xyz, clip_planes[0].xyz, clip_planes[0].w);\nif (distance < 0.0)\n{\nreturn 1.0;\n}\nelse if (distance < fBorderWidth)\n{\nresult = 0.0;\n}\n#else\nfor(int i = 0; i < 6; i++)\n{\ndistance = GetClipDistance(clip_vertex.xyz, clip_planes[i].xyz, clip_planes[i].w);\nif(distance < 0.0)\n{\nreturn 1.0;\n}\nelse if(distance < fBorderWidth)\n{\nresult = 0.0;\n}\n}\n#endif\nreturn result;\n}\n\nfloat ClipBehindAnyPlane(float fBorderWidth, vec4 clip_vertex)\n{\n\tfloat result = 1.0;\n\tfor(int i = 0; i < 6; i++)\n\t{\n\t\tfloat distance = GetClipDistance(clip_vertex.xyz, clip_planes[i].xyz, clip_planes[i].w);\n\t\tif((distance + fBorderWidth) < 0.0)\n\t\t{\n\t\t\treturn -1.0;\n\t\t}\n\t\telse if(distance < 0.0)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n\treturn result;\n}\n\nfloat ClipAnythingButLine(float fBorderWidth, vec4 clip_vertex)\n{\n\tfloat result = -1.0;\n\tfor(int i = 0; i < 6; i++)\n\t{\n\t\tfloat distance = GetClipDistance(clip_vertex.xyz, clip_planes[i].xyz, clip_planes[i].w);\n\t\tif(distance < 0.0)\n\t\t{\n\t\t\treturn -1.0;\n\t\t}\n\t\telse if(distance < fBorderWidth)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n\treturn result;\n}\n\nvec4 czm_clip(vec4 clip_vertex, float fIsFiltByID)\n{\n if(fIsFiltByID < 0.1)\n {\n return vec4(1.0);\n }\n\tif(clip_mode < 0.5)\n\t{\n\t\treturn vec4(1.0);\n\t}\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n\tfloat dxc = abs(dFdx(clip_vertex.x));\n\tfloat dyc = abs(dFdy(clip_vertex.y));\n\tfloat fBorderWidth = max(dxc, dyc) * clip_lineWidth;\n#else\n\tfloat fBorderWidth = clip_lineWidth;\n#endif\n\tfloat clipResult = 1.0;\n\tif(clip_line_color.a < 0.01)\n\t{\n\t\tfBorderWidth = 0.0;\n\t}\n\tif(clip_mode < 1.5)\n\t{\n\t\tclipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n\t}\n\telse if(clip_mode < 2.5)\n\t{\n\t\tclipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n\t}\n\telse if(clip_mode < 3.5)\n\t{\n\t\tclipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n\t}\n\tif(clipResult < -0.5)\n\t{\n\t\tdiscard;\n\t}\n\telse if(clipResult < 0.5)\n\t{\n\t\treturn clip_line_color;\n\t}\n\telse\n\t{\n return vec4(1.0);\n\t}\n}",czm_columbusViewMorph$1="/**\n * DOC_TBA\n *\n * @name czm_columbusViewMorph\n * @glslFunction\n */\nvec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)\n{\n // Just linear for now.\n vec3 p = mix(position2D.xyz, position3D.xyz, time);\n return vec4(p, 1.0);\n}\n",czm_computeLightColorInFP="vec4 czm_computeLightColorInFP(czm_s3mMaterialInput material, vec3 positionMC, float hasNormal, vec3 normal)\n{\n vec3 normalEC;\n if(hasNormal > 0.9)\n {\n normalEC = normalize(normal);\n }\n else\n {\n normalEC = normalize(czm_normal*czm_computeNormal(positionMC));\n }\n vec3 positionEC = vec3(czm_modelView * vec4(positionMC,1.0)).xyz;\n return czm_directionLight(material, normalEC, -positionEC, positionMC);\n}",czm_computeLightColorInstanceInFP="vec4 czm_computeLightColorInstanceInFP(czm_s3mMaterialInput material, vec3 positionRotateMC, vec3 positionMC, float hasNormal, vec3 normal)\n{\n vec3 normalEC;\n if(hasNormal > 0.9)\n {\n normalEC = normalize(normal);\n }\n else\n {\n normalEC = normalize(czm_normal*czm_computeNormal(positionRotateMC));\n }\n vec3 positionEC = vec3(czm_modelView * vec4(positionMC,1.0)).xyz;\n return czm_directionLight(material, normalEC, -positionEC, positionMC);\n}",czm_computeNormal$1="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvec3 czm_computeNormal(in vec3 oriVertex)\n{\n\tvec3 normal = cross(vec3(dFdx(oriVertex.x), dFdx(oriVertex.y), dFdx(oriVertex.z)), vec3(dFdy(oriVertex.x), dFdy(oriVertex.y), dFdy(oriVertex.z)));\n\tnormal = normalize(normal);\n\treturn normal;\n}",czm_computePosition$1="/**\n * Returns a position in model coordinates relative to eye taking into\n * account the current scene mode: 3D, 2D, or Columbus view.\n * <p>\n * This uses standard position attributes, <code>position3DHigh</code>, \n * <code>position3DLow</code>, <code>position2DHigh</code>, and <code>position2DLow</code>, \n * and should be used when writing a vertex shader for an {@link Appearance}.\n * </p>\n *\n * @name czm_computePosition\n * @glslFunction\n *\n * @returns {vec4} The position relative to eye.\n *\n * @example\n * vec4 p = czm_computePosition();\n * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n *\n * @see czm_translateRelativeToEye\n */\nvec4 czm_computePosition();\n",czm_cosineAndSine$1="/**\n * @private\n */\nvec2 cordic(float angle)\n{\n// Scale the vector by the appropriate factor for the 24 iterations to follow.\n vec2 vector = vec2(6.0725293500888267e-1, 0.0);\n// Iteration 1\n float sense = (angle < 0.0) ? -1.0 : 1.0;\n // float factor = sense * 1.0; // 2^-0\n mat2 rotation = mat2(1.0, sense, -sense, 1.0);\n vector = rotation * vector;\n angle -= sense * 7.8539816339744828e-1; // atan(2^-0)\n// Iteration 2\n sense = (angle < 0.0) ? -1.0 : 1.0;\n float factor = sense * 5.0e-1; // 2^-1\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.6364760900080609e-1; // atan(2^-1)\n// Iteration 3\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.5e-1; // 2^-2\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4497866312686414e-1; // atan(2^-2)\n// Iteration 4\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.25e-1; // 2^-3\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2435499454676144e-1; // atan(2^-3)\n// Iteration 5\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.25e-2; // 2^-4\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.2418809995957350e-2; // atan(2^-4)\n// Iteration 6\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.125e-2; // 2^-5\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.1239833430268277e-2; // atan(2^-5)\n// Iteration 7\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.5625e-2; // 2^-6\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5623728620476831e-2; // atan(2^-6)\n// Iteration 8\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.8125e-3; // 2^-7\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.8123410601011111e-3; // atan(2^-7)\n// Iteration 9\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.90625e-3; // 2^-8\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.9062301319669718e-3; // atan(2^-8)\n// Iteration 10\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.953125e-3; // 2^-9\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9531225164788188e-3; // atan(2^-9)\n// Iteration 11\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.765625e-4; // 2^-10\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.7656218955931946e-4; // atan(2^-10)\n// Iteration 12\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.8828125e-4; // 2^-11\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.8828121119489829e-4; // atan(2^-11)\n// Iteration 13\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.44140625e-4; // 2^-12\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4414062014936177e-4; // atan(2^-12)\n// Iteration 14\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.220703125e-4; // 2^-13\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2207031189367021e-4; // atan(2^-13)\n// Iteration 15\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.103515625e-5; // 2^-14\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.1035156174208773e-5; // atan(2^-14)\n// Iteration 16\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.0517578125e-5; // 2^-15\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.0517578115526096e-5; // atan(2^-15)\n// Iteration 17\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.52587890625e-5; // 2^-16\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5258789061315762e-5; // atan(2^-16)\n// Iteration 18\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.62939453125e-6; // 2^-17\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.6293945311019700e-6; // atan(2^-17)\n// Iteration 19\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.814697265625e-6; // 2^-18\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.8146972656064961e-6; // atan(2^-18)\n// Iteration 20\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.9073486328125e-6; // 2^-19\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9073486328101870e-6; // atan(2^-19)\n// Iteration 21\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.5367431640625e-7; // 2^-20\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.5367431640596084e-7; // atan(2^-20)\n// Iteration 22\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.76837158203125e-7; // 2^-21\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.7683715820308884e-7; // atan(2^-21)\n// Iteration 23\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.384185791015625e-7; // 2^-22\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.3841857910155797e-7; // atan(2^-22)\n// Iteration 24\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.1920928955078125e-7; // 2^-23\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n// angle -= sense * 1.1920928955078068e-7; // atan(2^-23)\n\n return vector;\n}\n\n/**\n * Computes the cosine and sine of the provided angle using the CORDIC algorithm.\n *\n * @name czm_cosineAndSine\n * @glslFunction\n *\n * @param {float} angle The angle in radians.\n *\n * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).\n *\n * @example\n * vec2 v = czm_cosineAndSine(czm_piOverSix);\n * float cosine = v.x;\n * float sine = v.y;\n */\nvec2 czm_cosineAndSine(float angle)\n{\n if (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n {\n if (angle < 0.0)\n {\n return -cordic(angle + czm_pi);\n }\n else\n {\n return -cordic(angle - czm_pi);\n }\n }\n else\n {\n return cordic(angle);\n }\n}\n",czm_decompressTextureCoordinates$1="/**\n * Decompresses texture coordinates that were packed into a single float.\n *\n * @name czm_decompressTextureCoordinates\n * @glslFunction\n *\n * @param {float} encoded The compressed texture coordinates.\n * @returns {vec2} The decompressed texture coordinates.\n */\n vec2 czm_decompressTextureCoordinates(float encoded)\n {\n float temp = encoded / 4096.0;\n float xZeroTo4095 = floor(temp);\n float stx = xZeroTo4095 / 4095.0;\n float sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\n return vec2(stx, sty);\n }\n",czm_depthClampFarPlane$1="// emulated noperspective\n#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\n\n/**\n * Clamps a vertex to the far plane.\n *\n * @name czm_depthClampFarPlane\n * @glslFunction\n *\n * @param {vec4} coords The vertex in clip coordinates.\n * @returns {vec4} The vertex clipped to the far plane.\n *\n * @example\n * gl_Position = czm_depthClampFarPlane(czm_modelViewProjection * vec4(position, 1.0));\n *\n * @see czm_writeDepthClampedToFarPlane\n */\nvec4 czm_depthClampFarPlane(vec4 coords)\n{\n#ifndef LOG_DEPTH\n v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\n coords.z = min(coords.z, coords.w);\n#endif\n return coords;\n}\n",czm_directionLight="const vec3 SideLightColor = vec3(0.0);\nuniform vec4 uSpecularColor;\nuniform float uShininess;\nconst vec3 specular = vec3(0.066666);\nconst float shininess2 = 30.0;\nfloat saturate( in float a ) { return clamp( a, 0.0, 1.0 ); }\nfloat calcLightAttenuation( float lightDistance, float cutoffDistance, float decayExponent ) {\n if ( decayExponent > 0.0 ) {\n return pow( saturate( 1.0 - lightDistance / cutoffDistance ), decayExponent );\n }\n return 1.0;\n}\n#if POINT_LIGHTS > 0\n uniform vec3 uPointLightPositionEC[POINT_LIGHTS];\n uniform vec3 uPointLightColor[POINT_LIGHTS];\n uniform vec2 uPointLightDistanceAndDecay[POINT_LIGHTS];\n#endif\n#if SPOT_LIGHTS > 0\n uniform vec3 uSpotLightPosition[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDirection[ SPOT_LIGHTS ];\n uniform float uSpotLightExponent[ SPOT_LIGHTS ];\n uniform vec4 uSpotLightDistanceDecayCosPenumbra[ SPOT_LIGHTS ];\n#endif\n#if DIR_LIGHTS > 0\n uniform vec3 uDirectionalLightDirection[ DIR_LIGHTS ];\n uniform vec3 uDirectionalLightColor[ DIR_LIGHTS];\n#endif\n#if HEMISPHERE_LIGHTS > 0\n uniform vec3 uSkyColor[ HEMISPHERE_LIGHTS ];\n uniform vec3 uGroundColor[ HEMISPHERE_LIGHTS];\n#endif\n vec4 czm_directionLight(czm_s3mMaterialInput material, vec3 normalEC, vec3 positionToEyeEC, vec3 positionMC)\n {\n vec3 totalDiffuseLight = vec3(0.0);\n vec3 totalSpecularLight = vec3(0.0);\n float sunLightDiffuseWeight = max( dot( normalEC, material.sunDirectionEC ), 0.0 );\n float sideLightDiffuseWeight = max( dot( normalEC, vec3(0.0,0.0,1.0) ), 0.0 );\n totalDiffuseLight = material.sunLightColor.rgb * sunLightDiffuseWeight * material.sunLightON + sideLightDiffuseWeight * SideLightColor;\n vec3 positionToEyeECDir = normalize(positionToEyeEC);\n\t#if HEMISPHERE_LIGHTS > 0\n for ( int i = 0; i < HEMISPHERE_LIGHTS; i ++ )\n {\n vec3 dirVectorEC = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\n float dotProduct = dot( normalEC, dirVectorEC );\n\t\t\tvec3 skyColor = uSkyColor[i];\n vec3 groundColor = uGroundColor[i];\n\t\t\tfloat hemiDiffuseWeight = 0.5 * dotProduct + 0.5;\n\t\t\tvec3 irradiance = mix( groundColor, skyColor, hemiDiffuseWeight );\n\t\t\tirradiance *= 3.141592653589793;\n totalDiffuseLight += irradiance;\n }\n #endif\n #if DIR_LIGHTS > 0\n for ( int i = 0; i < DIR_LIGHTS; i ++ )\n {\n vec3 dirVectorEC = normalize((czm_view * vec4(uDirectionalLightDirection[ i ], 0.0)).xyz);\n float dotProduct = dot( normalEC, dirVectorEC );\n float dirDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += uDirectionalLightColor[ i ] * dirDiffuseWeight;\n }\n #endif\n #if POINT_LIGHTS > 0\n for ( int i = 0; i < POINT_LIGHTS; i ++ )\n {\n vec3 lVector = uPointLightPositionEC[i] + positionToEyeEC;\n float lengthToLight = length( lVector );\n float cutoffDis = uPointLightDistanceAndDecay[i].x;\n if(lengthToLight > cutoffDis)\n {\n continue;\n }\n float attenuation = calcLightAttenuation( lengthToLight, cutoffDis, uPointLightDistanceAndDecay[i].y);\n lVector = normalize( lVector );\n float dotProduct = dot( normalEC, lVector );\n float pointLightDiffuse = max( dotProduct, 0.0 );\n totalDiffuseLight += uPointLightColor[i] * pointLightDiffuse * attenuation;\n vec3 pointHalfVector = normalize( lVector + positionToEyeECDir );\n float pointDotNormalHalf = max( dot( normalEC, pointHalfVector ), 0.0 );\n float pointSpecularWeight = max( pow( pointDotNormalHalf, shininess2 ), 0.0 );\n float specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, pointHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * uPointLightColor[ i ] * pointSpecularWeight * pointLightDiffuse * attenuation * specularNormalization;\n }\n #endif\n #if SPOT_LIGHTS > 0\n vec3 positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;\n for ( int i = 0; i < SPOT_LIGHTS; i ++ )\n {\n vec3 lVector = uSpotLightPositionEC[i] + positionToEyeEC;\n float attenuation = calcLightAttenuation( length( lVector ), uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\n lVector = normalize( lVector );\n float spotEffect = dot( uSpotLightDirection[ i ], normalize( uSpotLightPosition[ i ] - positionWC ) );\n if ( spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z ) {\n spotEffect = max( pow( max( spotEffect, 0.0 ), uSpotLightExponent[ i ] ), 0.0 );\n float dotProduct = dot( normalEC, lVector );\n float spotDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += uSpotLightColor[ i ] * spotDiffuseWeight * attenuation * spotEffect;\n vec3 spotHalfVector = normalize( lVector + positionToEyeECDir );\n float spotDotNormalHalf = max( dot( normalEC, spotHalfVector ), 0.0 );\n float spotSpecularWeight = max( pow( spotDotNormalHalf, shininess2 ), 0.0 );\n float specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * uSpotLightColor[ i ] * spotSpecularWeight * spotDiffuseWeight * attenuation * specularNormalization * spotEffect;\n }\n }\n #endif\n vec4 color = vec4(material.diffuseColor.rgb * totalDiffuseLight + material.ambientColor.rgb * material.ambientLightColor.rgb * 0.6 + totalSpecularLight, material.diffuseColor.a);\n return color;\n }\n\n",czm_eastNorthUpToEyeCoordinates$1="/**\n * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system \n * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the \n * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.\n * <br /><br />\n * The ellipsoid is assumed to be centered at the model coordinate's origin.\n *\n * @name czm_eastNorthUpToEyeCoordinates\n * @glslFunction\n *\n * @param {vec3} positionMC The position on the ellipsoid in model coordinates.\n * @param {vec3} normalEC The normalized ellipsoid surface normal, at <code>positionMC</code>, in eye coordinates.\n *\n * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.\n *\n * @example\n * // Transform a vector defined in the east-north-up coordinate \n * // system, (0, 0, 1) which is the surface normal, to eye \n * // coordinates.\n * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);\n */\nmat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\n vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates\n vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordiantes\n vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates\n\n return mat3(\n tangentEC.x, tangentEC.y, tangentEC.z,\n bitangentEC.x, bitangentEC.y, bitangentEC.z,\n normalEC.x, normalEC.y, normalEC.z);\n}\n",czm_ellipsoidContainsPoint$1="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidContainsPoint\n * @glslFunction\n *\n */\nbool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\n vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\n return (dot(scaled, scaled) <= 1.0);\n}\n",czm_ellipsoidNew$1="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidNew\n * @glslFunction\n *\n */\nczm_ellipsoid czm_ellipsoidNew(vec3 center, vec3 radii)\n{\n vec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n vec3 inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(center, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n",czm_ellipsoidWgs84TextureCoordinates$1="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidWgs84TextureCoordinates\n * @glslFunction\n */\nvec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\n return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n",czm_equalsEpsilon$1="/**\n * Compares <code>left</code> and <code>right</code> componentwise. Returns <code>true</code>\n * if they are within <code>epsilon</code> and <code>false</code> otherwise. The inputs\n * <code>left</code> and <code>right</code> can be <code>float</code>s, <code>vec2</code>s,\n * <code>vec3</code>s, or <code>vec4</code>s.\n *\n * @name czm_equalsEpsilon\n * @glslFunction\n *\n * @param {} left The first vector.\n * @param {} right The second vector.\n * @param {float} epsilon The epsilon to use for equality testing.\n * @returns {bool} <code>true</code> if the components are within <code>epsilon</code> and <code>false</code> otherwise.\n *\n * @example\n * // GLSL declarations\n * bool czm_equalsEpsilon(float left, float right, float epsilon);\n * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);\n * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);\n * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);\n */\nbool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\n\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\n return (abs(left - right) <= epsilon);\n}\n",czm_executeExcavation$1="#ifdef EXCAVATION\nuniform sampler2D uExcavationTexture;\nuniform float uExcavationMode;\nuniform vec4 uExcavationRect;\nvarying vec4 vExcavationVertexPos;\nvec2 CalculateExcavationPolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect)\n{\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\nbool czm_executeExcavation()\n{\n float hasExcavation = 1.0;\n vec2 vecExcavationTexCoord = CalculateExcavationPolyTexCoord(vExcavationVertexPos, uExcavationRect, hasExcavation);\n bool excavationInside = (uExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n if(excavationInside)\n {\n return texture2D(uExcavationTexture, vecExcavationTexCoord.xy).r > 0.5;\n }\n else\n {\n return texture2D(uExcavationTexture, vecExcavationTexCoord.xy).r < 0.5;\n }\n}\n#endif",czm_eyeOffset$1="/**\n * DOC_TBA\n *\n * @name czm_eyeOffset\n * @glslFunction\n *\n * @param {vec4} positionEC DOC_TBA.\n * @param {vec3} eyeOffset DOC_TBA.\n *\n * @returns {vec4} DOC_TBA.\n */\nvec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\n // This equation is approximate in x and y.\n vec4 p = positionEC;\n vec4 zEyeOffset = normalize(p) * eyeOffset.z;\n p.xy += eyeOffset.xy + zEyeOffset.xy;\n p.z += zEyeOffset.z;\n return p;\n}\n",czm_eyeToWindowCoordinates$1="/**\n * Transforms a position from eye to window coordinates. The transformation\n * from eye to clip coordinates is done using {@link czm_projection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of <code>near = 0</code> and <code>far = 1</code>.\n * <br /><br />\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *\n * @name czm_eyeToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in eye coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_projection\n * @see czm_viewportTransformation\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n */\nvec4 czm_eyeToWindowCoordinates(vec4 positionEC)\n{\n vec4 q = czm_projection * positionEC; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n",czm_fastApproximateAtan$1="/**\n * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.\n *\n * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on\n * \"Efficient approximations for the arctangent function,\" Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.\n * Adapted from ShaderFastLibs under MIT License.\n *\n * Chosen for the following characteristics over range [0, 1]:\n * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)\n * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)\n *\n * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);\n * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between 0 and 1 inclusive.\n *\n * @returns {float} Approximation of atan(x)\n */\nfloat czm_fastApproximateAtan(float x) {\n return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\n\n/**\n * Approximation of atan2.\n *\n * Range reduction math based on nvidia's cg reference implementation for atan2:\n * However, we replaced their atan curve with Michael Drobot's (see above).\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between -1 and 1 inclusive.\n * @param {float} y Value between -1 and 1 inclusive.\n *\n * @returns {float} Approximation of atan2(x, y)\n */\nfloat czm_fastApproximateAtan(float x, float y) {\n // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.\n // So range-reduce using abs and by flipping whether x or y is on top.\n float t = abs(x); // t used as swap and atan result.\n float opposite = abs(y);\n float adjacent = max(t, opposite);\n opposite = min(t, opposite);\n\n t = czm_fastApproximateAtan(opposite / adjacent);\n\n // Undo range reduction\n t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\n t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\n t = czm_branchFreeTernary(y < 0.0, -t, t);\n return t;\n}\n",czm_fog$1="/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)\n{\n float scalar = distanceToCamera * czm_fogDensity;\n float fog = 1.0 - exp(-(scalar * scalar));\n return mix(color, fogColor, fog);\n}\n\n/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n * @param {float} fogModifierConstant A constant to modify the appearance of fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)\n{\n float scalar = distanceToCamera * czm_fogDensity;\n float fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\n return mix(color, fogColor, fog);\n}\n",czm_gammaCorrect$1="/**\n * Converts a color from RGB space to linear space.\n *\n * @name czm_gammaCorrect\n * @glslFunction\n *\n * @param {vec3} color The color in RGB space.\n * @returns {vec3} The color in linear space.\n */\nvec3 czm_gammaCorrect(vec3 color) {\n#ifdef HDR\n color = pow(color, vec3(czm_gamma));\n#endif\n return color;\n}\n\nvec4 czm_gammaCorrect(vec4 color) {\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3(czm_gamma));\n#endif\n return color;\n}\n",czm_geodeticSurfaceNormal$1="/**\n * DOC_TBA\n *\n * @name czm_geodeticSurfaceNormal\n * @glslFunction\n *\n * @param {vec3} positionOnEllipsoid DOC_TBA\n * @param {vec3} ellipsoidCenter DOC_TBA\n * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA\n * \n * @returns {vec3} DOC_TBA.\n */\nvec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)\n{\n return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial$1="/**\n * An czm_material with default values. Every material's czm_getMaterial\n * should use this default material as a base for the material it returns.\n * The default normal value is given by materialInput.normalEC.\n *\n * @name czm_getDefaultMaterial\n * @glslFunction\n *\n * @param {czm_materialInput} input The input used to construct the default material.\n *\n * @returns {czm_material} The default material.\n *\n * @see czm_materialInput\n * @see czm_material\n * @see czm_getMaterial\n */\nczm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\n czm_material material;\n material.diffuse = vec3(0.0);\n material.specular = 0.0;\n material.shininess = 1.0;\n material.normal = materialInput.normalEC;\n material.emission = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n",czm_getEmissiveTextureColor$1="uniform float uMaxCategoryOrHypCeil;\nuniform float uMinCategoryOrHypFloor;\nuniform sampler2D uEmissionTexAtlas;\nuniform vec4 uEmissionTexAtlasTilingAndOffset[EMISSION_TEXTURE_COUNT];\nuniform vec4 uEmissionTexAtlasRects[EMISSION_TEXTURE_COUNT];\nuniform float uLayerCornerLength;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 czm_getEmissiveTextureColor(float w)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n for(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n return texColor;\n}\nvec3 czm_getEmissiveTextureColor(float w, vec2 texCoord)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n for(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n return texColor;\n}",czm_getHorizontalColor$1="uniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 czm_getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}",czm_getHypsometricColor$1="uniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypsometricVisible;\nuniform float uHypOpacity;\nuniform float uHypContourInterval;\nuniform vec4 uHypLineColor;\nuniform float uHypContourFillMode;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypHasAnalysisRegion;\nvarying vec2 vecHypTexCoord;\nuniform float uMixColorType;\nuniform vec4 uNoValueColor;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uVolumeType;\n#endif\n\n#ifdef Volume2\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uFilterMode;\n#endif\n\nfloat computeMixCon(float fValue)\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n\t if(fValue < 0.5)\n {\n distanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n }\n else\n {\n float t = floor(fValue / uHypContourInterval);\n distanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n }\n\t}\n\telse\n\t{\n\t distanceToContour = abs(fValue - uHypMaxVisibleValue);\n\t}\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float fValue)\n{\n\t//float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat threshold = abs(uHypCeil - uHypFloor);\n\tfloat contourRate = (fValue - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tfloat count = floor(finalCoord * 16.0);\n\tfloat y = (count*2.0 + 1.0)/32.0;\n\tfloat x = fract(finalCoord*16.0);\n\tif(y > 1.0)\n\t{\n\t x = 1.0;\n\t}\n\tvec2 contourCoord = vec2(x, y);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n#ifdef Volume2\n\nvec4 czm_getContourMapColor(vec4 oriColor, vec4 volColor)\n{\n if(uFilterMode > 0.5)\n {\n vec4 finalColor = volColor * oriColor;\n\n if(uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n\n\tfloat noValue = volColor.a;\n\tfloat texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\n\n\tfloat fValue;\n\tif(noValue > 0.5)\n\t{\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n vec4 finalColor = mixColor * oriColor;\n#ifdef PT_CLOUD\n\tfinalColor = mixColor;\n#endif\n if(uMixColorType > 0.5)\n {\n finalColor = mixColor;\n }\n return finalColor;\n}\n\n#else\n\nvec4 czm_getContourMapColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n#ifdef Volume\n\tvec3 aRatioT = vecRotioCoord;\n\tif((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n\t{\n\t if(uVolumeType > 0.5)\n\t {\n\t\t\tvec4 volumeColor = czm_getVolumeValue(aRatioT);\n\t\t\tif(uMixColorType > 0.5)\n\t\t\t{\n\t\t\t\tvolumeColor = volumeColor * oriColor;\n\t\t\t}\n\t\t\treturn volumeColor;\n\t }\n\t float noValue;\n\t float texTest = czm_getVolumeValue(aRatioT, noValue);\n\t if(noValue > 0.5)\n\t {\n\t fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n\t }\n\t else\n\t {\n\t fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n\t }\n\t}\n\telse\n\t{\n\t fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n\t}\n#endif\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n vec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n\tfinalColor = mixColor;\n#endif\n#ifdef Volume\n if(uMixColorType > 0.5)\n {\n finalColor = mixColor;\n }\n#endif\n return finalColor;\n}\n\n#endif\n\n#ifdef Volume2\nvec4 czm_getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\n\tif(uHypHasAnalysisRegion > 0.1)\n {\n\t\tvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n\t\tif(hypColor.r < 0.1)\n\t\t{\n\t\t\treturn oriColor;\n\t\t}\n\t}\n return czm_getContourMapColor(oriColor, volColor);\n}\n#else\nvec4 czm_getHypsometricColor(vec4 oriColor, float wValue)\n{\n float fValue = wValue;\n\tif(uHypHasAnalysisRegion > 0.1)\n {\n\t\tvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n\t\tif(hypColor.r < 0.1)\n\t\t{\n\t\t\treturn oriColor;\n\t\t}\n\t}\n return czm_getContourMapColor(oriColor, fValue);\n}\n\nvec4 czm_getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return czm_getContourMapColor(oriColor, wValue);\n}\n\n#endif",czm_getLambertDiffuse$1="/**\n * Calculates the intensity of diffusely reflected light.\n *\n * @name czm_getLambertDiffuse\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n *\n * @returns {float} The intensity of the diffuse reflection.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)\n{\n return max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getSpecular$1="/**\n * Calculates the specular intensity of reflected light.\n *\n * @name czm_getSpecular\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n *\n * @returns {float} The intensity of the specular highlight.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\n vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\n float specular = max(dot(toReflectedLight, toEyeEC), 0.0);\n\n // pow has undefined behavior if both parameters <= 0.\n // Prevent this by making sure shininess is at least czm_epsilon2.\n return pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getTexColorForS3M="void CalculateMipLevel(in vec2 inTexCoord, in float vecTile, in float fMaxMip, inout float mipLevel)\n{\n\tvec2 dx = dFdx(inTexCoord * vecTile);\n\tvec2 dy = dFdy(inTexCoord * vecTile);\n\tfloat dotX = dot(dx, dx);\n\tfloat dotY = dot(dy, dy);\n\tfloat dMax = max(dotX, dotY);\n\tfloat dMin = min(dotX, dotY);\n\tfloat offset = (dMax - dMin) / (dMax + dMin);\n\toffset = clamp(offset, 0.0, 1.0);\n\tfloat d = dMax * (1.0 - offset) + dMin * offset;\n\tmipLevel = 0.5 * log2(d);\n\tmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\n\nvoid CalculateMipLevel(in vec2 inTexCoord, in vec2 vecTile, in float fMaxMip, inout float mipLevel)\n{\n\tvec2 dx = dFdx(inTexCoord * vecTile.x);\n\tvec2 dy = dFdy(inTexCoord * vecTile.y);\n\tfloat dotX = dot(dx, dx);\n\tfloat dotY = dot(dy, dy);\n\tfloat dMax = max(dotX, dotY);\n\tfloat dMin = min(dotX, dotY);\n\tfloat offset = (dMax - dMin) / (dMax + dMin);\n\toffset = clamp(offset, 0.0, 1.0);\n\tfloat d = dMax * (1.0 - offset) + dMin * offset;\n\tmipLevel = 0.5 * log2(d);\n\tmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\n\nvoid CalculateTexCoord(in vec3 inTexCoord, in float scale, in float XTran, in float YTran, in float fTile, in float mipLevel, inout vec2 outTexCoord)\n{\n if(inTexCoord.z < -9000.0)\n {\n outTexCoord = inTexCoord.xy;\n }\n else\n {\n\t vec2 fTexCoord = fract(inTexCoord.xy);\n\t float offset = 1.0 * pow(2.0, mipLevel) / fTile;\n\t fTexCoord = clamp(fTexCoord, offset, 1.0 - offset);\n\t outTexCoord.x = (fTexCoord.x + XTran) * scale;\n\t outTexCoord.y = (fTexCoord.y + YTran) * scale;\n\t}\n}\n\n\nvec4 czm_getTexColorForS3M(sampler2D curTexture, vec3 oriTexCoord, float texTileWidth, float fMaxMipLev, float fTexCoordScale, vec2 vecTexCoordTranslate,float isRGBA, vec4 texUVoffset, out vec2 outTexCoord)\n{\n\tvec4 color = vec4(1.0);\n float mipLevel = 0.0;\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n CalculateMipLevel(oriTexCoord.xy, texTileWidth, fMaxMipLev, mipLevel);\n#endif\n vec2 realTexCoord;\n CalculateTexCoord(oriTexCoord, fTexCoordScale, vecTexCoordTranslate.x, vecTexCoordTranslate.y, texTileWidth, mipLevel, realTexCoord);\n\tif(isRGBA > 0.5)\n\t{\n\t vec2 rgbTexCoord;\n\t\trgbTexCoord.x = (realTexCoord.x + vecTexCoordTranslate.x * fTexCoordScale) * 0.5;\n\t\trgbTexCoord.y = (realTexCoord.y + vecTexCoordTranslate.y * fTexCoordScale) * 0.5;\n\t\trgbTexCoord.xy += texUVoffset.xy;\n color = texture2D(curTexture, rgbTexCoord.xy, -10.0);\n\t\tvec2 vecAlphaTexCoord;\n\t\tvecAlphaTexCoord.x = rgbTexCoord.x;\n\t\tvecAlphaTexCoord.y = rgbTexCoord.y + fTexCoordScale * 0.5;\n\t\tvecAlphaTexCoord.xy += texUVoffset.xy;\n\t color.a = texture2D(curTexture, vecAlphaTexCoord.xy, -10.0).r;\n\t}\n\telse\n\t{\n\t realTexCoord = realTexCoord * texUVoffset.zw + texUVoffset.xy;\n\t if(oriTexCoord.z < -9000.0)\n {\n color = texture2D(curTexture, realTexCoord.xy);\n }\n else\n {\n #ifdef GL_EXT_shader_texture_lod\n color = texture2DLodEXT(curTexture, realTexCoord.xy, mipLevel);\n #else\n #ifdef WEBGL2\n color = textureLod(curTexture, realTexCoord.xy, mipLevel);\n #else\n color = texture2D(curTexture, realTexCoord.xy, mipLevel);\n #endif\n #endif\n }\n #ifdef RGBTOBGR\n color = color.bgra;\n #endif\n\t}\n\toutTexCoord = realTexCoord;\n\treturn color;\n}\n\nvec4 czm_getTexColorForS3M(sampler2D texture, vec2 uv, vec2 texDim, vec2 texTran, vec2 texScale, float maxMipLevel, out vec2 outTexCoord)\n{\n if(maxMipLevel < 0.0)\n {\n return vec4(1.0);\n }\n\tvec4 colorCeil = vec4(1.0);\n float mipLevel = 0.0;\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n CalculateMipLevel(uv, texDim, maxMipLevel, mipLevel);\n#endif\n\tfloat ceilMipLevel = ceil(mipLevel);\n\tvec2 translate = vec2(texTran.x, texTran.y);\n\tfloat temp;\n\tif(ceilMipLevel > 0.0)\n\t{\n\t\ttranslate.x = texTran.x + texScale.x;\n\t\ttemp = pow(2.0, ceilMipLevel - 1.0);\n\t\ttranslate.y = texTran.y + texScale.y * (temp - 1.0) / temp;\n\t}\n float scale = 1.0 / pow(2.0, ceilMipLevel);\n\tvec2 texcoord = fract(uv);\n\tfloat offsetX = pow(2.0, ceilMipLevel) / texDim.x;\n\tfloat offsetY = pow(2.0, ceilMipLevel) / texDim.y;\n\ttexcoord.x = clamp(texcoord.x, 0.0 + offsetX, 1.0 - offsetX);\n\ttexcoord.y = clamp(texcoord.y, 0.0 + offsetY, 1.0 - offsetY);\n\ttexcoord.x = texcoord.x * texScale.x * scale + translate.x;\n\ttexcoord.y = texcoord.y * texScale.y * scale + translate.y;\n\t#ifdef GL_EXT_shader_texture_lod\n colorCeil = texture2DLodEXT(texture, texcoord.xy, 0.0);\n #else\n #ifdef WEBGL2\n colorCeil = textureLod(texture, texcoord.xy, 0.0);\n #else\n colorCeil = texture2D(texture, texcoord.xy, -10.0);\n #endif\n #endif\n\tvec4 colorFloor = vec4(1.0);\n\tfloat floorMipLevel = floor(mipLevel);\n\ttranslate = vec2(texTran.x, texTran.y);\n\tif(floorMipLevel > 0.0)\n\t{\n\t translate.x = texTran.x + texScale.x;\n\t temp = pow(2.0, floorMipLevel - 1.0);\n\t translate.y = texTran.y + texScale.y * (temp - 1.0) / temp;\n\t}\n\tscale = 1.0 / pow(2.0, floorMipLevel);\n\ttexcoord = fract(uv);\n\toffsetX = pow(2.0, floorMipLevel) / texDim.x;\n\toffsetY = pow(2.0, floorMipLevel) / texDim.y;\n\ttexcoord.x = clamp(texcoord.x, 0.0 + offsetX, 1.0 - offsetX);\n\ttexcoord.y = clamp(texcoord.y, 0.0 + offsetY, 1.0 - offsetY);\n\ttexcoord.x = texcoord.x * texScale.x * scale + translate.x;\n\ttexcoord.y = texcoord.y * texScale.y * scale + translate.y;\n\t#ifdef GL_EXT_shader_texture_lod\n colorFloor = texture2DLodEXT(texture, texcoord.xy, 0.0);\n #else\n #ifdef WEBGL2\n colorFloor = textureLod(texture, texcoord.xy, 0.0);\n #else\n colorFloor = texture2D(texture, texcoord.xy, -10.0);\n #endif\n #endif\n\tvec4 color = colorCeil * 0.5 + colorFloor * 0.5;\n\treturn color;\n}",czm_getTextureMatrixFromZValue="const float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT4 = 1.0 / 16.0;\nconst float SHIFT_LEFT4 = 16.0;\n\nvoid czm_getTextureMatrixFromZValue(in float nZ, inout float XTran, inout float YTran, inout float scale, inout float isRGBA)\n{\n if(nZ <= 0.0)\n {\n return;\n }\n float nDel8 = floor(nZ * SHIFT_RIGHT8);\n float nDel16 = floor(nDel8 * SHIFT_RIGHT8);\n float nDel20 = floor(nDel16 * SHIFT_RIGHT4);\n isRGBA = floor(nDel20);\n YTran = nZ - nDel8 * SHIFT_LEFT8;\n XTran = nDel8 - nDel16 * SHIFT_LEFT8;\n float nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\n scale = 1.0 / pow(2.0, nLevel);\n}",czm_getVolumeValue$1="uniform sampler2D uVolumeTexture;\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uTimeRatio;\n#endif\n\n#ifdef Volume\nuniform float width;\nuniform float height;\nuniform float depth;\nuniform float sideBlockCount;\nuniform float blockLength;\nuniform float texLength;\nuniform float uFilterMode;\n#endif\n\nfloat czm_unpackVolume(vec3 packedDepth)\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\n#ifdef Volume\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\n float yOffset = floor((fLevel+0.25/sideBlockCount) / sideBlockCount);\n float xOffset = fLevel - yOffset * sideBlockCount;\n float texCoordV = (texCoord.y * height + yOffset * blockLength) / texLength;\n float texCoordU = (texCoord.x * width + xOffset * blockLength) / texLength;\n return vec2(texCoordU, texCoordV);\n}\n\n#define inline\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\n vec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\n vec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\n float fValue1 = clamp(czm_unpackVolume(volumeValue1.xyz),0.0,1.0);\n float fValue2 = clamp(czm_unpackVolume(volumeValue2.xyz),0.0,1.0);\n if(uFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n noValue = mix(volumeValue1.a, volumeValue2.a, ratio);\n if(volumeValue1.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(volumeValue2.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfloat czm_getVolumeValue(vec3 texCoord, out float noValue)\n{\n float fLevel = (depth - 1.0) * texCoord.z;\n float bottomLevel= floor(fLevel);\n float topLevel = bottomLevel + 1.0;\n float ratio = topLevel - fLevel;\n vec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n vec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n float fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n fResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\n return fResult;\n}\n\nvec4 czm_getVolumeValue(vec3 texCoord)\n{\n\tfloat fLevel = (depth - 1.0) * texCoord.z;\n\tfloat bottomLevel= floor(fLevel);\n\tfloat topLevel = bottomLevel + 1.0;\n\tfloat ratio = topLevel - fLevel;\n\tfloat yOffset1 = floor((topLevel+0.25/sideBlockCount) / sideBlockCount);\n\tfloat xOffset1 = topLevel - yOffset1 * sideBlockCount;\n\tfloat texCoordV1 = (texCoord.y * height + yOffset1 * blockLength)/texLength;\n\tfloat texCoordU1 = (texCoord.x * width + xOffset1 * blockLength)/texLength;\n\tvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\n\tfloat yOffset2 = floor((bottomLevel+0.25/sideBlockCount) / sideBlockCount);\n\tfloat xOffset2 = bottomLevel - yOffset2 * sideBlockCount;\n\tfloat texCoordV2 = (texCoord.y * height + yOffset2 * blockLength)/texLength;\n\tfloat texCoordU2 = (texCoord.x * width + xOffset2 * blockLength)/texLength;\n\tvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\n\n\tif(uFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif",czm_getVolumeValueMultiResolution="uniform sampler2D uVolumeTexture1;\nuniform sampler2D uVolumeTexture2;\nuniform sampler2D uVolumeTexture3;\n\n\nuniform mat4 uMultiResolutionPara1;\n/*\n{uMultiResolutionTranslation1\n0.0, 0.0, 0.0, 0.0,\nwidth1,height1,sideBlockCount1,blockLength1\ntexLength1, 0.0, 0.0, 0.0};\n*/\nuniform mat4 uMultiResolutionPara2;\nuniform mat4 uMultiResolutionPara3;\n\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture1;\nuniform sampler2D uNextVolumeTexture2;\nuniform sampler2D uNextVolumeTexture3;\n#endif\n\n#ifdef Volume\n\nvec2 computeVolumeTextureCoord(vec2 texCoord, float fLevel, float texWidth, float texHeight, float texSideBlockCount, float texBlockLength, float texTotalLength)\n{\n float yOffset = floor((fLevel+0.25/texSideBlockCount) / texSideBlockCount);\n float xOffset = fLevel - yOffset * texSideBlockCount;\n float texCoordV = (texCoord.y * texHeight + yOffset * texBlockLength) / texTotalLength;\n float texCoordU = (texCoord.x * texWidth + xOffset * texBlockLength) / texTotalLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfloat czm_getVolumeValueMultiResolution(vec3 texCoord, out float noValue)\n{\n float fLevel = (depth - 1.0) * texCoord.z;\n float bottomLevel= floor(fLevel);\n float topLevel = bottomLevel + 1.0;\n float ratio = topLevel - fLevel;\n\n\n vec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n vec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n\n float fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n fResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\n\n\n float width = uMultiResolutionPara1[2].x;\n float height = uMultiResolutionPara1[2].y;\n float sideBlockCount = uMultiResolutionPara1[2].z;\n float blockLength = uMultiResolutionPara1[2].w;\n float texLength = uMultiResolutionPara1[3].x;\n vec4 uMultiResolutionTranslation = uMultiResolutionPara1[0];\n\n vec2 texCoord1 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\n vec2 topTexCoord1 = computeVolumeTextureCoord(texCoord1, topLevel, width, height, sideBlockCount, blockLength, texLength);\n vec2 bottomTexCoord1 = computeVolumeTextureCoord(texCoord1, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\n float alpha1 = 5.0 * clamp( max(abs(texCoord1.x - 0.5), abs(texCoord1.y - 0.5)) - 0.3,0.0,0.2);\n\n float fResult1 = computeVolumeValue(uVolumeTexture1, topTexCoord1, bottomTexCoord1, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult1 = computeVolumeValue(uNextVolumeTexture1, topTexCoord1, bottomTexCoord1, ratio, noValue);\n fResult1 = mix(fResult1, fNextResult1, uTimeRatio);\n#endif\n\n\n width = uMultiResolutionPara2[2].x;\n height = uMultiResolutionPara2[2].y;\n sideBlockCount = uMultiResolutionPara2[2].z;\n blockLength = uMultiResolutionPara2[2].w;\n texLength = uMultiResolutionPara2[3].x;\n uMultiResolutionTranslation = uMultiResolutionPara2[0];\n\n vec2 texCoord2 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\n vec2 topTexCoord2 = computeVolumeTextureCoord(texCoord2, topLevel, width, height, sideBlockCount, blockLength, texLength);\n vec2 bottomTexCoord2 = computeVolumeTextureCoord(texCoord2, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\n float alpha2 = 5.0 * clamp( max(abs(texCoord2.x - 0.5), abs(texCoord2.y - 0.5)) - 0.3,0.0,0.2);\n\n float fResult2 = computeVolumeValue(uVolumeTexture2, topTexCoord2, bottomTexCoord2, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult2 = computeVolumeValue(uNextVolumeTexture2, topTexCoord2, bottomTexCoord2, ratio, noValue);\n fResult2 = mix(fResult2, fNextResult2, uTimeRatio);\n#endif\n\n\n width = uMultiResolutionPara3[2].x;\n height = uMultiResolutionPara3[2].y;\n sideBlockCount = uMultiResolutionPara3[2].z;\n blockLength = uMultiResolutionPara3[2].w;\n texLength = uMultiResolutionPara3[3].x;\n uMultiResolutionTranslation = uMultiResolutionPara3[0];\n\n vec2 texCoord3 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\n vec2 topTexCoord3 = computeVolumeTextureCoord(texCoord3, topLevel, width, height, sideBlockCount, blockLength, texLength);\n vec2 bottomTexCoord3 = computeVolumeTextureCoord(texCoord3, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\n float alpha3 = 5.0 * clamp( max(abs(texCoord3.x - 0.5), abs(texCoord3.y - 0.5)) - 0.3,0.0,0.2);\n\n float fResult3 = computeVolumeValue(uVolumeTexture3, topTexCoord3, bottomTexCoord3, ratio, noValue);\n\n#ifdef TIME_ORDER\n float fNextResult3 = computeVolumeValue(uNextVolumeTexture3, topTexCoord3, bottomTexCoord3, ratio, noValue);\n fResult3 = mix(fResult3, fNextResult3, uTimeRatio);\n#endif\n\n\n //return mix(fResult2, mix(fResult1, fResult, alpha1), alpha2);\n return mix(fResult3, mix(fResult2, mix(fResult1, fResult, alpha1), alpha2), alpha3);\n}\n\n#endif",czm_getWaterNoise$1="/**\n * @private\n */\nvec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n\n // time dependent sampling directions\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n\n // rotate sampling direction by specified angle\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (texture2D(normalMap, uv0)) +\n (texture2D(normalMap, uv1)) +\n (texture2D(normalMap, uv2)) +\n (texture2D(normalMap, uv3));\n\n // average and scale to between -1 and 1\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_getWgs84EllipsoidEC$1="/**\n * Returns the WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @name czm_getWgs84EllipsoidEC\n * @glslFunction\n *\n * @returns {czm_ellipsoid} The WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @see Ellipsoid.WGS84\n *\n * @example\n * czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n */\nczm_ellipsoid czm_getWgs84EllipsoidEC()\n{\n vec3 radii = vec3(6378137.0, 6378137.0, 6378137.0);\n vec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n vec3 inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(czm_view[3].xyz, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n",czm_HSBToRGB$1="/**\n * Converts an HSB color (hue, saturation, brightness) to RGB\n * HSB <-> RGB conversion with minimal branching:\n *\n * @name czm_HSBToRGB\n * @glslFunction\n * \n * @param {vec3} hsb The color in HSB.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsb = czm_RGBToHSB(rgb);\n * hsb.z *= 0.1;\n * rgb = czm_HSBToRGB(hsb);\n */\n\nconst vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n\nvec3 czm_HSBToRGB(vec3 hsb)\n{\n vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\n return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);\n}\n",czm_HSLToRGB$1="/**\n * Converts an HSL color (hue, saturation, lightness) to RGB\n * HSL <-> RGB conversion: \n *\n * @name czm_HSLToRGB\n * @glslFunction\n * \n * @param {vec3} rgb The color in HSL.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n\nvec3 hueToRGB(float hue)\n{\n float r = abs(hue * 6.0 - 3.0) - 1.0;\n float g = 2.0 - abs(hue * 6.0 - 2.0);\n float b = 2.0 - abs(hue * 6.0 - 4.0);\n return clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 czm_HSLToRGB(vec3 hsl)\n{\n vec3 rgb = hueToRGB(hsl.x);\n float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\n return (rgb - 0.5) * c + hsl.z;\n}\n",czm_hue$1="/**\n * Adjusts the hue of a color.\n * \n * @name czm_hue\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the hue of the color in radians.\n *\n * @returns {float} The color with the hue adjusted.\n *\n * @example\n * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)\n */\nvec3 czm_hue(vec3 rgb, float adjustment)\n{\n const mat3 toYIQ = mat3(0.299, 0.587, 0.114,\n 0.595716, -0.274453, -0.321263,\n 0.211456, -0.522591, 0.311135);\n const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,\n 1.0, -0.2721, -0.6474,\n 1.0, -1.107, 1.7046);\n \n vec3 yiq = toYIQ * rgb;\n float hue = atan(yiq.z, yiq.y) + adjustment;\n float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\n \n vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\n return toRGB * color;\n}\n",czm_inverseGamma$1="/**\n * Converts a color in linear space to RGB space.\n *\n * @name czm_inverseGamma\n * @glslFunction\n *\n * @param {vec3} color The color in linear space.\n * @returns {vec3} The color in RGB space.\n */\nvec3 czm_inverseGamma(vec3 color) {\n return pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_inverseMatrix$1="mat3 czm_inverseMatrix(mat3 m)\n{\n float Determinant =\n m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\n - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\n + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\n\n mat3 Inverse;\n Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);\n Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);\n Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);\n Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);\n Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);\n Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);\n Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\n Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);\n Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);\n Inverse /= Determinant;\n\n return Inverse;\n}\n\nmat4 czm_inverseMatrix(mat4 m)\n{\n float Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\n float Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\n float Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\n\n float Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\n float Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\n float Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\n\n float Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\n float Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\n float Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\n\n float Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\n float Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\n float Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\n\n float Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\n float Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\n float Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\n\n float Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\n float Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\n float Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\n\n const vec4 SignA = vec4( 1.0, -1.0, 1.0, -1.0);\n const vec4 SignB = vec4(-1.0, 1.0, -1.0, 1.0);\n\n vec4 Fac0 = vec4(Coef00, Coef00, Coef02, Coef03);\n vec4 Fac1 = vec4(Coef04, Coef04, Coef06, Coef07);\n vec4 Fac2 = vec4(Coef08, Coef08, Coef10, Coef11);\n vec4 Fac3 = vec4(Coef12, Coef12, Coef14, Coef15);\n vec4 Fac4 = vec4(Coef16, Coef16, Coef18, Coef19);\n vec4 Fac5 = vec4(Coef20, Coef20, Coef22, Coef23);\n\n vec4 Vec0 = vec4(m[1][0], m[0][0], m[0][0], m[0][0]);\n vec4 Vec1 = vec4(m[1][1], m[0][1], m[0][1], m[0][1]);\n vec4 Vec2 = vec4(m[1][2], m[0][2], m[0][2], m[0][2]);\n vec4 Vec3 = vec4(m[1][3], m[0][3], m[0][3], m[0][3]);\n\n vec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);\n vec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);\n vec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);\n vec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);\n\n mat4 Inverse = mat4(Inv0, Inv1, Inv2, Inv3);\n\n vec4 Row0 = vec4(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);\n\n float Determinant = dot(m[0], Row0);\n\n Inverse /= Determinant;\n\n return Inverse;\n}\n",czm_isEmpty$1="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isEmpty\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isEmpty(czm_raySegment interval)\n{\n return (interval.stop < 0.0);\n}\n",czm_isFull$1="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isFull\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isFull(czm_raySegment interval)\n{\n return (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction$1="/**\n * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.\n *\n * @name czm_latitudeToWebMercatorFraction\n * @glslFunction\n *\n * @param {float} latitude The geodetic latitude, in radians.\n * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.\n * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.\n *\n * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern\n * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return\n * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.\n */ \nfloat czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)\n{\n float sinLatitude = sin(latitude);\n float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\n \n return (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_lineDistance$1="/**\n * Computes distance from an point in 2D to a line in 2D.\n *\n * @name czm_lineDistance\n * @glslFunction\n *\n * param {vec2} point1 A point along the line.\n * param {vec2} point2 A point along the line.\n * param {vec2} point A point that may or may not be on the line.\n * returns {float} The distance from the point to the line.\n */\nfloat czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\n return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_luminance$1="/**\n * Computes the luminance of a color. \n *\n * @name czm_luminance\n * @glslFunction\n *\n * @param {vec3} rgb The color.\n * \n * @returns {float} The luminance.\n *\n * @example\n * float light = czm_luminance(vec3(0.0)); // 0.0\n * float dark = czm_luminance(vec3(1.0)); // ~1.0 \n */\nfloat czm_luminance(vec3 rgb)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n return dot(rgb, W);\n}\n",czm_metersPerPixel$1="/**\n * Computes the size of a pixel in meters at a distance from the eye.\n * <p>\n * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.\n * </p>\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n * @param {float} pixelRatio The scaling factor from pixel space to coordinate space\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfloat czm_metersPerPixel(vec4 positionEC, float pixelRatio)\n{\n float width = czm_viewport.z;\n float height = czm_viewport.w;\n float pixelWidth;\n float pixelHeight;\n\n float top = czm_frustumPlanes.x;\n float bottom = czm_frustumPlanes.y;\n float left = czm_frustumPlanes.z;\n float right = czm_frustumPlanes.w;\n\n if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n {\n float frustumWidth = right - left;\n float frustumHeight = top - bottom;\n pixelWidth = frustumWidth / width;\n pixelHeight = frustumHeight / height;\n }\n else\n {\n float distanceToPixel = -positionEC.z;\n float inverseNear = 1.0 / czm_currentFrustum.x;\n float tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n }\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}\n\n/**\n * Computes the size of a pixel in meters at a distance from the eye.\n * <p>\n * Use this version when scaling by pixel ratio.\n * </p>\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfloat czm_metersPerPixel(vec4 positionEC)\n{\n return czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates$1="/**\n * Transforms a position from model to window coordinates. The transformation\n * from model to clip coordinates is done using {@link czm_modelViewProjection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of <code>near = 0</code> and <code>far = 1</code>.\n * <br /><br />\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n * <br /><br />\n * This function should not be confused with {@link czm_viewportOrthographic},\n * which is an orthographic projection matrix that transforms from window \n * coordinates to clip coordinates.\n *\n * @name czm_modelToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in model coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_eyeToWindowCoordinates\n * @see czm_modelViewProjection\n * @see czm_viewportTransformation\n * @see czm_viewportOrthographic\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);\n */\nvec4 czm_modelToWindowCoordinates(vec4 position)\n{\n vec4 q = czm_modelViewProjection * position; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n",czm_multiplyWithColorBalance$1="/**\n * DOC_TBA\n *\n * @name czm_multiplyWithColorBalance\n * @glslFunction\n */\nvec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n \n vec3 target = left * right;\n float leftLuminance = dot(left, W);\n float rightLuminance = dot(right, W);\n float targetLuminance = dot(target, W);\n \n return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar$1="/**\n * Computes a value that scales with distance. The scaling is clamped at the near and\n * far distances, and does not extrapolate. This function works with the\n * {@link NearFarScalar} JavaScript class.\n *\n * @name czm_nearFarScalar\n * @glslFunction\n *\n * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).\n * @param {float} cameraDistSq The square of the current distance from the camera.\n *\n * @returns {float} The value at this distance.\n */\nfloat czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\n float valueAtMin = nearFarScalar.y;\n float valueAtMax = nearFarScalar.w;\n float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\n float farDistanceSq = nearFarScalar.z * nearFarScalar.z;\n\n float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\n\n t = pow(clamp(t, 0.0, 1.0), 0.2);\n\n return mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode$1=" /**\n * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: \n *\n * @name czm_octDecode\n * @param {vec2} encoded The oct-encoded, unit-length vector\n * @param {float} range The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(vec2 encoded, float range)\n {\n if (encoded.x == 0.0 && encoded.y == 0.0) {\n return vec3(0.0, 0.0, 0.0);\n }\n\n encoded = encoded / range * 2.0 - 1.0;\n vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\n if (v.z < 0.0)\n {\n v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);\n }\n\n return normalize(v);\n }\n\n/**\n * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: \n *\n * @name czm_octDecode\n * @param {vec2} encoded The oct-encoded, unit-length vector\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(vec2 encoded)\n {\n return czm_octDecode(encoded, 255.0);\n }\n\n /**\n * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: \n *\n * @name czm_octDecode\n * @param {float} encoded The oct-encoded, unit-length vector\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(float encoded)\n {\n float temp = encoded / 256.0;\n float x = floor(temp);\n float y = (temp - x) * 256.0;\n return czm_octDecode(vec2(x, y));\n }\n\n/**\n * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: \n *\n * @name czm_octDecode\n * @param {vec2} encoded The packed oct-encoded, unit-length vectors.\n * @param {vec3} vector1 One decoded and normalized vector.\n * @param {vec3} vector2 One decoded and normalized vector.\n * @param {vec3} vector3 One decoded and normalized vector.\n */\n void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)\n {\n float temp = encoded.x / 65536.0;\n float x = floor(temp);\n float encodedFloat1 = (temp - x) * 65536.0;\n\n temp = encoded.y / 65536.0;\n float y = floor(temp);\n float encodedFloat2 = (temp - y) * 65536.0;\n\n vector1 = czm_octDecode(encodedFloat1);\n vector2 = czm_octDecode(encodedFloat2);\n vector3 = czm_octDecode(vec2(x, y));\n }\n\n",czm_packDepth$1="/**\n * Packs a depth value into a vec3 that can be represented by unsigned bytes.\n *\n * @name czm_packDepth\n * @glslFunction\n *\n * @param {float} depth The floating-point depth.\n * @returns {vec3} The packed depth.\n */\nvec4 czm_packDepth(float depth)\n{\n // See Aras Pranckevičius' post Encoding Floats to RGBA\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n return enc;\n}\n",czm_packValue$1="/**\n * Packs a float value into a vec3 that can be represented by unsigned bytes.\n *\n * @name czm_packValue\n * @glslFunction\n *\n * @param {float} value The floating-point value.\n * @returns {vec3} The packed value.\n */\nvec4 czm_packValue(float value)\n{\n float SHIFT_LEFT8 = 256.0;\n\tfloat SHIFT_RIGHT8 = 1.0 / 256.0;\n\tvec4 result;\n\tresult.a = 255.0;\n\tfloat fPos = abs(value + 9000.0) * SHIFT_RIGHT8;\n\tresult.b = (fPos - floor(fPos)) * SHIFT_LEFT8;\n\tfPos = floor(fPos) * SHIFT_RIGHT8;\n\tresult.g = (fPos - floor(fPos)) * SHIFT_LEFT8;\n\tresult.r = floor(fPos);\n\tresult /= 255.0;\n\treturn result;\n}\n",czm_phong$1="float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\n return czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\n\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\n return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\n\n/**\n * Computes a color using the Phong lighting model.\n *\n * @name czm_phong\n * @glslFunction\n *\n * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.\n * @param {czm_material} material The fragment's material.\n *\n * @returns {vec4} The computed color.\n *\n * @example\n * vec3 positionToEyeEC = // ...\n * czm_material material = // ...\n * vec3 lightDirectionEC = // ...\n * gl_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);\n *\n * @see czm_getMaterial\n */\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down)\n float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n }\n\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n vec3 ambient = vec3(0.0);\n vec3 color = ambient + material.emission;\n color += material.diffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_planeDistance$1="/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec4 plane, vec3 point) {\n return (dot(plane.xyz, point) + plane.w);\n}\n\n/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js\n * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\n return (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay$1="/**\n * Computes the point along a ray at the given time. <code>time</code> can be positive, negative, or zero.\n *\n * @name czm_pointAlongRay\n * @glslFunction\n *\n * @param {czm_ray} ray The ray to compute the point along.\n * @param {float} time The time along the ray.\n * \n * @returns {vec3} The point along the ray at the given time.\n * \n * @example\n * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction\n * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)\n */\nvec3 czm_pointAlongRay(czm_ray ray, float time)\n{\n return ray.origin + (time * ray.direction);\n}\n",czm_rayEllipsoidIntersectionInterval$1="/**\n * DOC_TBA\n *\n * @name czm_rayEllipsoidIntersectionInterval\n * @glslFunction\n */\nczm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)\n{\n // ray and ellipsoid center in eye coordinates. radii in model coordinates.\n vec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;\n vec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;\n\n q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;\n\n float q2 = dot(q, q);\n float qw = dot(q, w);\n\n if (q2 > 1.0) // Outside ellipsoid.\n {\n if (qw >= 0.0) // Looking outward or tangent (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else // qw < 0.0.\n {\n float qw2 = qw * qw;\n float difference = q2 - 1.0; // Positively valued.\n float w2 = dot(w, w);\n float product = w2 * difference;\n\n if (qw2 < product) // Imaginary roots (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else if (qw2 > product) // Distinct roots (2 intersections).\n {\n float discriminant = qw * qw - product;\n float temp = -qw + sqrt(discriminant); // Avoid cancellation.\n float root0 = temp / w2;\n float root1 = difference / temp;\n if (root0 < root1)\n {\n czm_raySegment i = czm_raySegment(root0, root1);\n return i;\n }\n else\n {\n czm_raySegment i = czm_raySegment(root1, root0);\n return i;\n }\n }\n else // qw2 == product. Repeated roots (2 intersections).\n {\n float root = sqrt(difference / w2);\n czm_raySegment i = czm_raySegment(root, root);\n return i;\n }\n }\n }\n else if (q2 < 1.0) // Inside ellipsoid (2 intersections).\n {\n float difference = q2 - 1.0; // Negatively valued.\n float w2 = dot(w, w);\n float product = w2 * difference; // Negatively valued.\n float discriminant = qw * qw - product;\n float temp = -qw + sqrt(discriminant); // Positively valued.\n czm_raySegment i = czm_raySegment(0.0, temp / w2);\n return i;\n }\n else // q2 == 1.0. On ellipsoid.\n {\n if (qw < 0.0) // Looking inward.\n {\n float w2 = dot(w, w);\n czm_raySegment i = czm_raySegment(0.0, -qw / w2);\n return i;\n }\n else // qw >= 0.0. Looking outward or tangent.\n {\n return czm_emptyRaySegment;\n }\n }\n}\n",czm_raySphereIntersectionInterval="/**\n * Compute the intersection interval of a ray with a sphere.\n *\n * @name czm_raySphereIntersectionInterval\n * @glslFunction\n *\n * @param {czm_ray} ray The ray.\n * @param {vec3} center The center of the sphere.\n * @param {float} radius The radius of the sphere.\n * @return {czm_raySegment} The intersection interval of the ray with the sphere.\n */\nczm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)\n{\n vec3 o = ray.origin;\n vec3 d = ray.direction;\n\n vec3 oc = o - center;\n\n float a = dot(d, d);\n float b = 2.0 * dot(d, oc);\n float c = dot(oc, oc) - (radius * radius);\n\n float det = (b * b) - (4.0 * a * c);\n\n if (det < 0.0) {\n return czm_emptyRaySegment;\n }\n\n float sqrtDet = sqrt(det);\n\n float t0 = (-b - sqrtDet) / (2.0 * a);\n float t1 = (-b + sqrtDet) / (2.0 * a);\n\n czm_raySegment result = czm_raySegment(t0, t1);\n return result;\n}\n",czm_readDepth$1="float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\n return czm_reverseLogDepth(texture2D(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective$1="/**\n * Reads a value previously transformed with {@link czm_writeNonPerspective}\n * by dividing it by `w`, the value used in the perspective divide.\n * This function is intended to be called in a fragment shader to access a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The value should have been\n * previously written in the vertex shader with a call to\n * {@link czm_writeNonPerspective}.\n *\n * @name czm_readNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.\n * @param {float} oneOverW One over the perspective divide value, `w`. Usually this is simply `gl_FragCoord.w`.\n * @returns {float|vec2|vec3|vec4} The usable value.\n */\nfloat czm_readNonPerspective(float value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\n return value * oneOverW;\n}\n",czm_reverseLogDepth$1="float czm_reverseLogDepth(float logZ)\n{\n#ifdef LOG_DEPTH\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n float log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;\n float depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#endif\n return logZ;\n}\n",czm_RGBToHSB$1="/**\n * Converts an RGB color to HSB (hue, saturation, brightness)\n * HSB <-> RGB conversion with minimal branching:\n *\n * @name czm_RGBToHSB\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in HSB.\n *\n * @example\n * vec3 hsb = czm_RGBToHSB(rgb);\n * hsb.z *= 0.1;\n * rgb = czm_HSBToRGB(hsb);\n */\n\nconst vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\nvec3 czm_RGBToHSB(vec3 rgb)\n{\n vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\n vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\n float d = q.x - min(q.w, q.y);\n return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL$1="/**\n * Converts an RGB color to HSL (hue, saturation, lightness)\n * HSL <-> RGB conversion: \n *\n * @name czm_RGBToHSL\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in HSL.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n \nvec3 RGBtoHCV(vec3 rgb)\n{\n // Based on work by Sam Hocevar and Emil Persson\n vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);\n vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);\n float c = q.x - min(q.w, q.y);\n float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\n return vec3(h, c, q.x);\n}\n\nvec3 czm_RGBToHSL(vec3 rgb)\n{\n vec3 hcv = RGBtoHCV(rgb);\n float l = hcv.z - hcv.y * 0.5;\n float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\n return vec3(hcv.x, s, l);\n}\n",czm_RGBToXYZ$1="/**\n * Converts an RGB color to CIE Yxy.\n * <p>The conversion is described in\n * </p>\n * \n * @name czm_RGBToXYZ\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in CIE Yxy.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_RGBToXYZ(vec3 rgb)\n{\n const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,\n 0.3576, 0.7152, 0.1192,\n 0.1805, 0.0722, 0.9505);\n vec3 xyz = RGB2XYZ * rgb;\n vec3 Yxy;\n Yxy.r = xyz.g;\n float temp = dot(vec3(1.0), xyz);\n Yxy.gb = xyz.rg / temp;\n return Yxy;\n}\n",czm_RollerShutter$1="void czm_RollerShutter(vec2 coord, vec4 region)\n{\n vec2 f = step(region.xw, coord);\n vec2 s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n",czm_s3mBatchOperation$1="void czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation)\n{\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n vertexColor *= color;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n vertexColor *= selectedColor;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos.xyz += translation;\n }\n float isClip = fract(floor(right_16) * 0.5);\n if(isClip > 0.1)\n {\n vIsFiltByID.x = 1.0;\n }\n}\n\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout float fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n vertexColor *= color;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected = 1.0;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos.xyz += translation;\n }\n float isClip = fract(floor(right_16) * 0.5);\n if(isClip > 0.1)\n {\n vIsFiltByID.x = 1.0;\n }\n}\n\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout float fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n vertexColor.rgb = color.rgb;\n vertexColor.a *= color.a;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected = 1.0;\n #ifdef REPLACE_SELECT_TYPE\n vertexColor = selectedColor;\n #else\n vertexColor *= selectedColor;\n #endif\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos.xyz += translation;\n }\n float isClip = fract(floor(right_16) * 0.5);\n if(isClip > 0.1)\n {\n vIsFiltByID.x = 1.0;\n }\n}\n\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n vertexColor *= color;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n vertexColor *= selectedColor;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n}\n\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout float fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n fSelected = 1.0;\n vertexColor = color;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected = 1.0;\n vertexColor = selectedColor;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n}\n\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout vec2 fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n fSelected.y = 1.0;\n vertexColor.rgb = color.rgb;\n vertexColor.a *= color.a;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected.x = 1.0;\n #ifdef REPLACE_SELECT_TYPE\n vertexColor = selectedColor;\n #else\n vertexColor *= selectedColor;\n #endif\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos.xyz += translation;\n }\n float isClip = fract(floor(right_16) * 0.5);\n if(isClip > 0.1)\n {\n vIsFiltByID.x = 1.0;\n }\n}\n",czm_S3MPBR$1=" uniform float u_metallicFactor;\n uniform float u_roughnessFactor;\n uniform vec4 u_emissiveFactor;\n uniform vec4 u_baseColorFactor;\n uniform float u_alphaCutoff;\n uniform sampler2D u_baseColorTexture;\n uniform sampler2D u_metallicRoughnessTexture;\n uniform sampler2D u_normalTexture;\n uniform sampler2D u_occlusionTexture;\n uniform sampler2D u_emissiveTexture;\n uniform vec4 u_baseColorUVOffsetAndTiling;\n uniform vec4 u_emissiveUVOffsetAndTiling;\n\n uniform float uSunLightON;\n #if DIR_LIGHTS > 0\n uniform vec3 uDirectionalLightDirectionEC[ DIR_LIGHTS ];\n uniform vec3 uDirectionalLightColor[ DIR_LIGHTS ];\n #endif\n #if POINT_LIGHTS > 0\n uniform vec3 uPointLightPositionEC[ POINT_LIGHTS ];\n uniform vec3 uPointLightColor[ POINT_LIGHTS ];\n uniform vec2 uPointLightDistanceAndDecay[ POINT_LIGHTS ];\n #endif\n #if SPOT_LIGHTS > 0\n uniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDirectionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDistanceDecayCos[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightExponent[ SPOT_LIGHTS ];\n #endif\n\n const float M_PI = 3.141592653589793;\n\n vec3 lambertianDiffuse(vec3 diffuseColor)\n {\n return diffuseColor / M_PI;\n }\n\n vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n {\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n }\n\n vec3 fresnelSchlick(float metalness, float VdotH)\n {\n return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n }\n\n vec3 F_Schlick(float ndv, vec3 spec)\n {\n return spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n }\n\n float D_Phong(float g, float ndh)\n {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n }\n\n float smithVisibilityG1(float NdotV, float roughness)\n {\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n }\n\n float smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n {\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n }\n\n float GGX(float roughness, float NdotH)\n {\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n }\n\n void getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm)\n {\n vec3 h = normalize(viewDir + lightDir);\n float NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\n float NdotH = clamp(dot(normal, h), 0.0, 1.0);\n vec3 li = lightColor * NdotL;\n diffuseTerm = li;\n specularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n }\n\n vec3 SRGBtoLINEAR3(vec3 srgbIn)\n {\n return pow(srgbIn, vec3(2.2));\n }\n\n vec4 SRGBtoLINEAR4(vec4 srgbIn)\n {\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n }\n\n vec3 LINEARtoSRGB(vec3 linearIn)\n {\n#ifndef HDR\n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n }\n\n float calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent)\n {\n return pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n }\n\n vec4 czm_S3MPBR(vec3 normalEC, vec3 positionEC, vec2 texCoord, vec4 vertexColor)\n {\n vec3 ng = normalize(normalEC);\n vec3 positionWC = (czm_inverseView * vec4(positionEC, 1.0)).xyz;\n#ifdef HAS_NORMAL_TEXTURE\n vec3 pos_dx = dFdx(positionEC);\n vec3 pos_dy = dFdy(positionEC);\n vec3 tex_dx = dFdx(vec3(texCoord, 0.0));\n vec3 tex_dy = dFdy(vec3(texCoord, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(u_normalTexture, texCoord).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n\n vec3 v = -normalize(positionEC);\n#ifdef DOUBLE_SIDED\n if (dot(n, v) < 0.0) {\n n = -n;\n }\n#endif\n\n // Add base color to fragment shader\n#ifdef HAS_BASECOLOR_TEXTURE\n vec2 baseColorTexCoord = texCoord;\n baseColorTexCoord = baseColorTexCoord * u_baseColorUVOffsetAndTiling.zw + u_baseColorUVOffsetAndTiling.xy;\n vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, baseColorTexCoord));\n baseColorWithAlpha *= u_baseColorFactor;\n#else\n vec4 baseColorWithAlpha = u_baseColorFactor;\n#endif\n baseColorWithAlpha *= vertexColor;\n vec3 baseColor = baseColorWithAlpha.rgb;\n#ifdef HAS_METALLICROUGHNESS_TEXTURE\n vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, texCoord).rgb;\n float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n metalness *= u_metallicFactor;\n roughness *= u_roughnessFactor;\n#else\n float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n#endif\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float NdotV = abs(dot(n, v)) + 0.001;\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n vec3 fresnelTerm = F_Schlick(NdotV, specularColor);\n vec3 color = vec3(0.0);\n // 默认加一个平行光作为太阳光\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(czm_sunDirectionEC, v, n, vec3(0.8), fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm * uSunLightON;\n specularTerm += lightSpecularTerm * uSunLightON;\n#if DIR_LIGHTS > 0 \n for (int i = 0; i < DIR_LIGHTS; i++) { \n getLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n } \n#endif \n#if POINT_LIGHTS > 0 \n for (int i = 0; i < POINT_LIGHTS; i++) {\n vec3 lVector = uPointLightPositionEC[i] - v_positionEC;\n float lightDistance = length(lVector);\n float lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\n if(lightAttenuation < 0.001) {\n continue;\n }\n vec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n }\n#endif \n#if SPOT_LIGHTS > 0 \n for (int i = 0; i < SPOT_LIGHTS; i++) {\n vec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\n float lightDistance = length(lVector);\n float lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCos[i].x, uSpotLightDistanceDecayCos[i].y);\n if(lightAttenuation < 0.001) {\n continue;\n }\n float spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\n if(spotEffect > uSpotLightDistanceDecayCos[i].z) {\n vec3 spotLightColor = uSpotLightColor[i] * lightAttenuation * spotEffect;\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n }\n }\n#endif \n color = baseColor; \n color *= max(diffuseTerm, vec3(0.0)); \n color += max(specularTerm, vec3(0.0)); \n // 计算环境光\n #ifdef USE_IBL_LIGHTING\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n // Figure out if the reflection vector hits the ellipsoid\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, 6378137.0 / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z.\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n\n vec2 iblFactor = vec2(1.0);\n float luminanceAtZenith = 0.5;\n #ifdef USE_SUN_LUMINANCE\n // Angle between sun and zenith\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n // Angle between zenith and current pixel\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n // Angle between sun and current pixel\n float sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\n float gamma = acos(sunNdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = luminanceAtZenith * (numerator / denominator);\n#endif\n\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * iblFactor.y);\n#ifdef USE_SUN_LUMINANCE\n color += IBLColor * luminance;\n#else\n color += IBLColor;\n#endif // end of USE_SUN_LUMINANCE\n#endif // end of USE_IBL_LIGHTING\n\n#ifdef HAS_OCCLUSION_TEXTURE\n color *= texture2D(u_occlusionTexture, texCoord).r;\n#endif\n\n#ifdef HAS_EMISSIVE_TEXTURE\n vec2 emissiveTexCoord = texCoord;\n emissiveTexCoord = emissiveTexCoord * u_emissiveUVOffsetAndTiling.zw + u_emissiveUVOffsetAndTiling.xy;\n vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, emissiveTexCoord).rgb);\n emissive *= u_emissiveFactor.rgb;\n color += emissive;\n#else\n color += u_emissiveFactor.rgb;\n#endif\n color = LINEARtoSRGB(color);\n vec4 resultColor = vec4(color, 1.0);\n#ifdef MASK\n if (baseColorWithAlpha.a < u_alphaCutoff)\n {\n discard;\n }\n resultColor = vec4(color, 1.0);\n#endif\n#ifdef BLEND\n resultColor = vec4(color, baseColorWithAlpha.a);\n#endif\n return resultColor;\n }",czm_sampleAndBlend$1="vec4 czm_sampleAndBlend(\n vec4 currentTextureColor,\n vec4 previousColor,\n vec2 tileTextureCoordinates,\n vec4 textureCoordinateRectangle,\n vec4 transparentBackColor,\n bool imageryClipEnable,\n float textureAlpha,\n float textureBrightness,\n float textureContrast,\n float textureHue,\n float textureSaturation,\n float textureOneOverGamma,\n vec2 split,\n vec4 swipe)\n{\n // This crazy step stuff sets the alpha to 0.0 if this following condition is true:\n // tileTextureCoordinates.s < textureCoordinateRectangle.s ||\n // tileTextureCoordinates.s > textureCoordinateRectangle.p ||\n // tileTextureCoordinates.t < textureCoordinateRectangle.t ||\n // tileTextureCoordinates.t > textureCoordinateRectangle.q\n // In other words, the alpha is zero if the fragment is outside the rectangle\n // covered by this texture. Would an actual 'if' yield better performance?\n vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n\n alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n\n vec3 color = currentTextureColor.rgb;\n float alpha = currentTextureColor.a;\n if(transparentBackColor.a > 0.01)\n {\n float rDiff = abs(transparentBackColor.r - color.r);\n float gDiff = abs(transparentBackColor.g - color.g);\n float bDiff = abs(transparentBackColor.b - color.b);\n if(rDiff < transparentBackColor.a && gDiff < transparentBackColor.a && bDiff < transparentBackColor.a)\n {\n alpha = 0.0;\n }\n }\n\n if(imageryClipEnable)\n {\n #ifdef Apply_ImageryClip\n if(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n {\n alpha = 0.0;\n }\n #else\n alpha = 0.0;\n #endif\n }\n\n\n#if !defined(APPLY_GAMMA)\n vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));\n color = tempColor.rgb;\n alpha = tempColor.a;\n#else\n color = pow(color, vec3(textureOneOverGamma));\n#endif\n\n#ifdef APPLY_SPLIT\n vec2 splitPosition = czm_imagerySplitPosition;\n // Split to the left\n if (split.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\n alpha = 0.0;\n }\n // Split to the right\n else if (split.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\n alpha = 0.0;\n }\n if(split.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\n alpha = 0.0;\n }\n else if(split.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\n alpha = 0.0;\n }\n#if TEXTURE_UNITS < 2\n if(alpha == 0.0)\n {\n discard;\n }\n#endif\n#endif\n\n#ifdef APPLY_SWIPE\n if (gl_FragCoord.x < swipe.x || gl_FragCoord.y > swipe.y) {\n alpha = 0.0;\n }\n else if (gl_FragCoord.x > swipe.z || gl_FragCoord.y < swipe.w) {\n alpha = 0.0;\n }\n#if TEXTURE_UNITS < 2\n if(alpha == 0.0)\n {\n discard;\n }\n#endif\n\n#endif\n\n#ifdef APPLY_BRIGHTNESS\n color = mix(vec3(0.0), color, textureBrightness);\n#endif\n\n#ifdef APPLY_CONTRAST\n color = mix(vec3(0.5), color, textureContrast);\n#endif\n\n#ifdef APPLY_HUE\n color = czm_hue(color, textureHue);\n#endif\n\n#ifdef APPLY_SATURATION\n color = czm_saturation(color, textureSaturation);\n#endif\n\n float sourceAlpha = alpha * textureAlpha;\n float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\n vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\n return vec4(outColor, outAlpha);\n}\n\nvec4 gridTextureSampleAndBlend(\n vec4 previousColor,\n sampler2D textureToSample,\n vec2 tileTextureCoordinates,\n vec4 textureCoordinateRectangle,\n vec4 textureCoordinateTranslationAndScale)\n{\n float textureAlpha = 1.0;\n vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n vec2 translation = textureCoordinateTranslationAndScale.xy;\n vec2 scale = textureCoordinateTranslationAndScale.zw;\n vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n vec4 value = texture2D(textureToSample, textureCoordinates);\n vec3 color = value.rgb;\n float alpha = value.a;\n float sourceAlpha = alpha * textureAlpha;\n float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\n vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\n return vec4(outColor, outAlpha);\n}\n\nvec2 computeTextureCoord(vec2 tileTextureCoordinates, vec4 textureCoordinateTranslationAndScale, vec4 textureSize, bool flipY)\n{\n vec2 translation = textureCoordinateTranslationAndScale.xy;\n vec2 scale = textureCoordinateTranslationAndScale.zw;\n vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n if(flipY)\n {\n textureCoordinates.y = 1.0 - textureCoordinates.y;\n }\n#ifdef WEBGPU\n vec2 texelSize = textureSize.zw;\n textureCoordinates = clamp(textureCoordinates, texelSize, 1.0 - texelSize);\n#endif\n return textureCoordinates;\n}",czm_sampleOctahedralProjection$1="/**\n * Samples the 4 neighboring pixels and return the weighted average.\n *\n * @private\n */\nvec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod)\n{\n direction /= dot(vec3(1.0), abs(direction));\n vec2 rev = abs(direction.zx) - vec2(1.0);\n vec2 neg = vec2(direction.x < 0.0 ? rev.x : -rev.x,\n direction.z < 0.0 ? rev.y : -rev.y);\n vec2 uv = direction.y < 0.0 ? neg : direction.xz;\n vec2 coord = 0.5 * uv + vec2(0.5);\n vec2 pixel = 1.0 / textureSize;\n\n if (lod > 0.0)\n {\n // Each subseqeuent mip level is half the size\n float scale = 1.0 / pow(2.0, lod);\n float offset = ((textureSize.y + 1.0) / textureSize.x);\n\n coord.x *= offset;\n coord *= scale;\n\n coord.x += offset + pixel.x;\n coord.y += (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n }\n else\n {\n coord.x *= (textureSize.y / textureSize.x);\n }\n\n // Do bilinear filtering\n #ifndef OES_texture_float_linear\n vec3 color1 = texture2D(projectedMap, coord + vec2(0.0, pixel.y)).rgb;\n vec3 color2 = texture2D(projectedMap, coord + vec2(pixel.x, 0.0)).rgb;\n vec3 color3 = texture2D(projectedMap, coord + pixel).rgb;\n vec3 color4 = texture2D(projectedMap, coord).rgb;\n\n vec2 texturePosition = coord * textureSize;\n\n float fu = fract(texturePosition.x);\n float fv = fract(texturePosition.y);\n\n vec3 average1 = mix(color4, color2, fu);\n vec3 average2 = mix(color1, color3, fu);\n\n vec3 color = mix(average1, average2, fv);\n #else\n vec3 color = texture2D(projectedMap, coord).rgb;\n #endif\n\n return color;\n}\n\n\n/**\n * Samples from a cube map that has been projected using an octahedral projection from the given direction.\n *\n * @name czm_sampleOctahedralProjection\n * @glslFunction\n *\n * @param {sampler2D} projectedMap The texture with the octahedral projected cube map.\n * @param {vec2} textureSize The width and height dimensions in pixels of the projected map.\n * @param {vec3} direction The normalized direction used to sample the cube map.\n * @param {float} lod The level of detail to sample.\n * @param {float} maxLod The maximum level of detail.\n * @returns {vec3} The color of the cube map at the direction.\n */\nvec3 czm_sampleOctahedralProjection(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod, float maxLod) {\n float currentLod = floor(lod);\n float nextLod = min(currentLod + 1.0, maxLod);\n\n vec3 colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, currentLod);\n vec3 colorNextLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, nextLod);\n\n return mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation$1="/**\n * Adjusts the saturation of a color.\n * \n * @name czm_saturation\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the saturation of the color.\n *\n * @returns {float} The color with the saturation adjusted.\n *\n * @example\n * vec3 greyScale = czm_saturation(color, 0.0);\n * vec3 doubleSaturation = czm_saturation(color, 2.0);\n */\nvec3 czm_saturation(vec3 rgb, float adjustment)\n{\n // Algorithm from Chapter 16 of OpenGL Shading Language\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n vec3 intensity = vec3(dot(rgb, W));\n return mix(intensity, rgb, adjustment);\n}\n",czm_shadowDepthCompare="\nfloat czm_sampleShadowMap(samplerCube shadowMap, vec3 d)\n{\n return czm_unpackDepth(textureCube(shadowMap, d));\n}\n\nfloat czm_sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture2D(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\n\nfloat czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\n return step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n\nfloat czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n",czm_shadowVisibility="\nfloat czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n float strength = step(0.0, nDotL);\n#endif\n visibility *= strength;\n#endif\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\nfloat czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec3 uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\nfloat czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec2 uv = shadowParameters.texCoords;\n\n depth -= depthBias;\n#ifdef USE_SOFT_SHADOWS\n vec2 texelStepSize = shadowParameters.texelStepSize;\n float radius = 1.0;\n float dx0 = -texelStepSize.x * radius;\n float dy0 = -texelStepSize.y * radius;\n float dx1 = texelStepSize.x * radius;\n float dy1 = texelStepSize.y * radius;\n float visibility = (\n czm_shadowDepthCompare(shadowMap, uv, depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\n ) * (1.0 / 9.0);\n#else\n float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n",czm_signNotZero$1="/**\n * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL\n * built-in function <code>sign</code> except that returns 1.0 instead of 0.0 when the input value is 0.0.\n * \n * @name czm_signNotZero\n * @glslFunction\n *\n * @param {} value The value for which to determine the sign.\n * @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative.\n */\nfloat czm_signNotZero(float value)\n{\n return value >= 0.0 ? 1.0 : -1.0;\n}\n\nvec2 czm_signNotZero(vec2 value)\n{\n return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\n\nvec3 czm_signNotZero(vec3 value)\n{\n return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n}\n\nvec4 czm_signNotZero(vec4 value)\n{\n return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n}\n",czm_sketchMode$1="uniform sampler2D uNormalDepthTexture;\nuniform int uFillStyle;\nfloat edgeDetection(float lineWidth)\n{\n vec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\n vec2 off = lineWidth / czm_globeDepthTextureDim.xy;\n vec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\n val_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\n vec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\n val_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\n vec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\n val_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\n vec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\n val_se.xyz = (val_se.xyz * 2.0) - 1.0;\n float discontinuity = 0.0;\n float dot0 = dot(val_nw.xyz, val_se.xyz);\n float dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nvec4 czm_sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\n vec4 outputColor = inputColor;\n float discontinuity = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0, 1.0);\n if(uFillStyle == 1)\n {\n outputColor = lineColor;\n outputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\n outputColor.a *= lineColor.a;\n }\n else\n {\n vec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\n outputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n }\n return outputColor;\n}",czm_sphericalHarmonics$1="/**\n * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.\n * <p>\n * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].\n * </p>\n *\n * @name czm_sphericalHarmonics\n * @glslFunction\n *\n * @param {vec3} normal The normalized direction.\n * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.\n * @returns {vec3} The color at the direction.\n *\n */\nvec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])\n{\n const float c1 = 0.429043;\n const float c2 = 0.511664;\n const float c3 = 0.743125;\n const float c4 = 0.886227;\n const float c5 = 0.247708;\n\n vec3 L00 = coefficients[0];\n vec3 L1_1 = coefficients[1];\n vec3 L10 = coefficients[2];\n vec3 L11 = coefficients[3];\n vec3 L2_2 = coefficients[4];\n vec3 L2_1 = coefficients[5];\n vec3 L20 = coefficients[6];\n vec3 L21 = coefficients[7];\n vec3 L22 = coefficients[8];\n\n float x = normal.x;\n float y = normal.y;\n float z = normal.z;\n\n return c1 * L22 * (x * x - y * y) + c3 * L20 * z * z + c4 * L00 - c5 * L20 +\n 2.0 * c1 * (L2_2 * x * y + L21 * x * z + L2_1 * y * z) +\n 2.0 * c2 * (L11 * x + L1_1 * y + L10 * z);\n}\n",czm_tangentToEyeSpaceMatrix$1="/**\n * Creates a matrix that transforms vectors from tangent space to eye space.\n *\n * @name czm_tangentToEyeSpaceMatrix\n * @glslFunction\n *\n * @param {vec3} normalEC The normal vector in eye coordinates.\n * @param {vec3} tangentEC The tangent vector in eye coordinates.\n * @param {vec3} bitangentEC The bitangent vector in eye coordinates.\n *\n * @returns {mat3} The matrix that transforms from tangent space to eye space.\n *\n * @example\n * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);\n * vec3 normal = tangentToEye * texture2D(normalMap, st).xyz;\n */\nmat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\n vec3 normal = normalize(normalEC);\n vec3 tangent = normalize(tangentEC);\n vec3 bitangent = normalize(bitangentEC);\n return mat3(tangent.x , tangent.y , tangent.z,\n bitangent.x, bitangent.y, bitangent.z,\n normal.x , normal.y , normal.z);\n}\n",czm_transformPlane$1="vec4 czm_transformPlane(vec4 clippingPlane, mat4 transform) {\n vec3 transformedDirection = normalize((transform * vec4(clippingPlane.xyz, 0.0)).xyz);\n vec3 transformedPosition = (transform * vec4(clippingPlane.xyz * -clippingPlane.w, 1.0)).xyz;\n vec4 transformedPlane;\n transformedPlane.xyz = transformedDirection;\n transformedPlane.w = -dot(transformedDirection, transformedPosition);\n return transformedPlane;\n}\n",czm_translateRelativeToEye$1="/**\n * Translates a position (or any <code>vec3</code>) that was encoded with {@link EncodedCartesian3},\n * and then provided to the shader as separate <code>high</code> and <code>low</code> bits to\n * be relative to the eye. As shown in the example, the position can then be transformed in eye\n * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},\n * respectively.\n * <p>\n * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as\n * described in .\n * </p>\n *\n * @name czm_translateRelativeToEye\n * @glslFunction\n *\n * @param {vec3} high The position's high bits.\n * @param {vec3} low The position's low bits.\n * @returns {vec3} The position translated to be relative to the camera's position.\n *\n * @example\n * attribute vec3 positionHigh;\n * attribute vec3 positionLow;\n *\n * void main()\n * {\n * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n * }\n *\n * @see czm_modelViewRelativeToEye\n * @see czm_modelViewProjectionRelativeToEye\n * @see czm_computePosition\n * @see EncodedCartesian3\n */\nvec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\n vec3 highDifference = high - czm_encodedCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedCameraPositionMCLow;\n\n return vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong$1="/**\n * @private\n */\nvec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down and horizon views)\n float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\n\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n }\n\n diffuse = clamp(diffuse, 0.0, 1.0);\n\n float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_transpose$1="/**\n * Returns the transpose of the matrix. The input <code>matrix</code> can be\n * a <code>mat2</code>, <code>mat3</code>, or <code>mat4</code>.\n *\n * @name czm_transpose\n * @glslFunction\n *\n * @param {} matrix The matrix to transpose.\n *\n * @returns {} The transposed matrix.\n *\n * @example\n * // GLSL declarations\n * mat2 czm_transpose(mat2 matrix);\n * mat3 czm_transpose(mat3 matrix);\n * mat4 czm_transpose(mat4 matrix);\n *\n * // Transpose a 3x3 rotation matrix to find its inverse.\n * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(\n * positionMC, normalEC);\n * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);\n */\nmat2 czm_transpose(mat2 matrix)\n{\n return mat2(\n matrix[0][0], matrix[1][0],\n matrix[0][1], matrix[1][1]);\n}\n\nmat3 czm_transpose(mat3 matrix)\n{\n return mat3(\n matrix[0][0], matrix[1][0], matrix[2][0],\n matrix[0][1], matrix[1][1], matrix[2][1],\n matrix[0][2], matrix[1][2], matrix[2][2]);\n}\n\nmat4 czm_transpose(mat4 matrix)\n{\n return mat4(\n matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\n matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\n matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\n matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackDepth$1="/**\n * Unpacks a vec4 depth value to a float in [0, 1) range.\n *\n * @name czm_unpackDepth\n * @glslFunction\n *\n * @param {vec4} packedDepth The packed depth.\n *\n * @returns {float} The floating-point depth in [0, 1) range.\n */\n float czm_unpackDepth(vec4 packedDepth)\n {\n // See Aras Pranckevičius' post Encoding Floats to RGBA\n return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n }\n",czm_unpackFloat$1="#define SHIFT_RIGHT_8 0.00390625 //1.0 / 256.0\n#define SHIFT_RIGHT_16 0.00001525878 //1.0 / 65536.0\n#define SHIFT_RIGHT_24 5.960464477539063e-8//1.0 / 16777216.0\n\n#define BIAS 38.0\n\n/**\n * Unpacks a vec4 value containing values expressable as uint8 to an arbitrary float.\n *\n * @name czm_unpackFloat\n * @glslFunction\n *\n * @param {vec4} packedFloat The packed float.\n *\n * @returns {float} The floating-point depth in arbitrary range.\n */\n float czm_unpackFloat(vec4 packedFloat)\n{\n packedFloat *= 255.0;\n float temp = packedFloat.w / 2.0;\n float exponent = floor(temp);\n float sign = (temp - exponent) * 2.0;\n exponent = exponent - float(BIAS);\n sign = sign * 2.0 - 1.0;\n sign = -sign;\n float unpacked = sign * packedFloat.x * float(SHIFT_RIGHT_8);\n unpacked += sign * packedFloat.y * float(SHIFT_RIGHT_16);\n unpacked += sign * packedFloat.z * float(SHIFT_RIGHT_24);\n return unpacked * pow(10.0, exponent);\n}\n",czm_unpackValue$1="/**\n * Unpacks a vec4 value to a float.\n *\n * @name czm_unpackValue\n * @glslFunction\n *\n * @param {vec3} packedValue The packed value.\n *\n * @returns {float} The floating-point value.\n */\n float czm_unpackValue(vec4 packedValue)\n {\n float SHIFT_LEFT16 = 65536.0;\n\tfloat SHIFT_LEFT8 = 256.0;\n\tvec4 value = packedValue * 255.0;\n\treturn value.r * SHIFT_LEFT16 + value.g * SHIFT_LEFT8 + value.b - 9000.0;\n }\n",czm_vertexLogDepth$1="#ifdef LOG_DEPTH\n// 1.0 at the near plane, increasing linearly from there.\nvarying float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nvarying vec3 v_logPositionEC;\n#endif\n#endif\n\nvec4 czm_updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n\n#ifdef SHADOW_MAP\n vec3 logPositionEC = (czm_inverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n#endif\n\n // With the very high far/near ratios used with the logarithmic depth\n // buffer, floating point rounding errors can cause linear depth values\n // to end up on the wrong side of the far plane, even for vertices that\n // are really nowhere near it. Since we always write a correct logarithmic\n // depth value in the fragment shader anyway, we just need to make sure\n // such errors don't cause the primitive to be clipped entirely before\n // we even get to the fragment shader.\n coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\n\n return coords;\n}\n\n/**\n * Writes the logarithmic depth to gl_Position using the already computed gl_Position.\n *\n * @name czm_vertexLogDepth\n * @glslFunction\n */\nvoid czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0 - czm_currentFrustum.x + gl_Position.w;\n gl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\n\n/**\n * Writes the logarithmic depth to gl_Position using the provided clip coordinates.\n * <p>\n * An example use case for this function would be moving the vertex in window coordinates\n * before converting back to clip coordinates. Use the original vertex clip coordinates.\n * </p>\n * @name czm_vertexLogDepth\n * @glslFunction\n *\n * @param {vec4} clipCoords The vertex in clip coordinates.\n *\n * @example\n * czm_vertexLogDepth(czm_projection * vec4(positionEyeCoordinates, 1.0));\n */\nvoid czm_vertexLogDepth(vec4 clipCoords)\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0 - czm_currentFrustum.x + clipCoords.w;\n czm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates$1="/**\n * Transforms a position from window to eye coordinates.\n * The transform from window to normalized device coordinates is done using components\n * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating\n * the inverse of <code>czm_viewportTransformation</code>. The transformation from\n * normalized device coordinates to clip coordinates is done using <code>fragmentCoordinate.w</code>,\n * which is expected to be the scalar used in the perspective divide. The transformation\n * from clip to eye coordinates is done using {@link czm_inverseProjection}.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec4} fragmentCoordinate The position in window coordinates to transform.\n *\n * @returns {vec4} The transformed position in eye coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @example\n * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);\n */\nvec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)\n{\n // Reconstruct NDC coordinates\n float x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\n float y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\n float z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n vec4 q = vec4(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= fragmentCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s\n {\n q = czm_inverseProjection * q;\n }\n else\n {\n float top = czm_frustumPlanes.x;\n float bottom = czm_frustumPlanes.y;\n float left = czm_frustumPlanes.z;\n float right = czm_frustumPlanes.w;\n\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n\n q.x = (q.x * (right - left) + left + right) * 0.5;\n q.y = (q.y * (top - bottom) + bottom + top) * 0.5;\n q.z = (q.z * (near - far) - near - far) * 0.5;\n q.w = 1.0;\n }\n\n return q;\n}\n\n/**\n * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.\n * This function produces more accurate results for window positions with log depth than\n * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version\n * of czm_windowToEyeCoordinates.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.\n * @param {float} depthOrLogDepth A depth or log depth for the fragment.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @returns {vec4} The transformed position in eye coordinates.\n */\nvec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)\n{\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#ifdef LOG_DEPTH\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n float log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\n float depthFromNear = pow(2.0, log2Depth) - 1.0;\n float depthFromCamera = depthFromNear + near;\n vec4 windowCoord = vec4(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n return eyeCoordinate;\n#else\n vec4 windowCoord = vec4(fragmentCoordinateXY, depthOrLogDepth, 1.0);\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n#endif\n return eyeCoordinate;\n}\n",czm_writeDepthClampedToFarPlane$1="// emulated noperspective\n#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\n/**\n * Clamps a vertex to the far plane by writing the fragments depth.\n * <p>\n * The shader must enable the GL_EXT_frag_depth extension.\n * </p>\n *\n * @name czm_writeDepthClampedToFarPlane\n * @glslFunction\n *\n * @example\n * gl_FragColor = color;\n * czm_writeDepthClampedToFarPlane();\n *\n * @see czm_depthClampFarPlane\n */\nvoid czm_writeDepthClampedToFarPlane()\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && !defined(LOG_DEPTH)\n gl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n",czm_writeLogDepth$1="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\nuniform vec2 u_polygonOffset;\n#endif\n\n#endif\n\n/**\n * Writes the fragment depth to the logarithmic depth buffer.\n * <p>\n * Use this when the vertex shader does not call {@link czm_vertexlogDepth}, for example, when\n * ray-casting geometry using a full screen quad.\n * </p>\n * @name czm_writeLogDepth\n * @glslFunction\n *\n * @param {float} depth The depth coordinate, where 1.0 is on the near plane and\n * depth increases in eye-space units from there\n *\n * @example\n * czm_writeLogDepth((czm_projection * v_positionEyeCoordinates).w + 1.0);\n */\nvoid czm_writeLogDepth(float depth)\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && defined(LOG_DEPTH)\n // Discard the vertex if it's not between the near and far planes.\n // We allow a bit of epsilon on the near plane comparison because a 1.0\n // from the vertex shader (indicating the vertex should be _on_ the near\n // plane) will not necessarily come here as exactly 1.0.\n if (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {\n discard;\n }\n\n#ifdef POLYGON_OFFSET\n // Polygon offset: m * factor + r * units\n float factor = u_polygonOffset[0];\n float units = u_polygonOffset[1];\n\n // If we can't compute derivatives, just leave out the factor I guess?\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n // m = sqrt(dZdX^2 + dZdY^2);\n float x = dFdx(depth);\n float y = dFdy(depth);\n float m = sqrt(x * x + y * y);\n\n // Apply the factor before computing the log depth.\n depth += m * factor;\n#endif\n\n#endif\n\n gl_FragDepthEXT = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\n // Apply the units after the log depth.\n gl_FragDepthEXT += czm_epsilon7 * units;\n#endif\n\n#endif\n}\n\n/**\n * Writes the fragment depth to the logarithmic depth buffer.\n * <p>\n * Use this when the vertex shader calls {@link czm_vertexlogDepth}.\n * </p>\n *\n * @name czm_writeLogDepth\n * @glslFunction\n */\nvoid czm_writeLogDepth() {\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",czm_writeNonPerspective$1="/**\n * Transforms a value for non-perspective interpolation by multiplying\n * it by w, the value used in the perspective divide. This function is\n * intended to be called in a vertex shader to compute the value of a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The fragment shader\n * must call {@link czm_readNonPerspective} to retrieve the final\n * non-perspective value.\n *\n * @name czm_writeNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.\n * @param {float} w The perspective divide value. Usually this is the computed `gl_Position.w`.\n * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a `varying` and read in the\n * fragment shader with {@link czm_readNonPerspective}.\n */\nfloat czm_writeNonPerspective(float value, float w) {\n return value * w;\n}\n\nvec2 czm_writeNonPerspective(vec2 value, float w) {\n return value * w;\n}\n\nvec3 czm_writeNonPerspective(vec3 value, float w) {\n return value * w;\n}\n\nvec4 czm_writeNonPerspective(vec4 value, float w) {\n return value * w;\n}\n",czm_XYZToRGB$1="/**\n * Converts a CIE Yxy color to RGB.\n * <p>The conversion is described in\n * </p>\n * \n * @name czm_XYZToRGB\n * @glslFunction\n * \n * @param {vec3} Yxy The color in CIE Yxy.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_XYZToRGB(vec3 Yxy)\n{\n const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n -1.5371, 1.8760, -0.2040,\n -0.4985, 0.0416, 1.0572);\n vec3 xyz;\n xyz.r = Yxy.r * Yxy.g / Yxy.b;\n xyz.g = Yxy.r;\n xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\n \n return XYZ2RGB * xyz;\n}\n",G$1g={czm_degreesPerRadian:czm_degreesPerRadian$1,czm_depthRange:czm_depthRange$1,czm_ellipsoidInverseRadii:czm_ellipsoidInverseRadii$1,czm_ellipsoidRadii:czm_ellipsoidRadii$1,czm_epsilon1:czm_epsilon1$1,czm_epsilon2:czm_epsilon2$1,czm_epsilon3:czm_epsilon3$1,czm_epsilon4:czm_epsilon4$1,czm_epsilon5:czm_epsilon5$1,czm_epsilon6:czm_epsilon6$1,czm_epsilon7:czm_epsilon7$1,czm_infinity:czm_infinity$1,czm_oneOverPi:czm_oneOverPi$1,czm_oneOverTwoPi:czm_oneOverTwoPi$1,czm_passCesium3DTile:czm_passCesium3DTile$1,czm_passCesium3DTileClassification:czm_passCesium3DTileClassification$1,czm_passCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow$1,czm_passClassification:czm_passClassification$1,czm_passCompute:czm_passCompute$1,czm_passEnvironment:czm_passEnvironment$1,czm_passGlobe:czm_passGlobe$1,czm_passGround:czm_passGround$1,czm_passOpaque:czm_passOpaque$1,czm_passOverlay:czm_passOverlay$1,czm_passTerrainClassification:czm_passTerrainClassification$1,czm_passTranslucent:czm_passTranslucent$1,czm_pi:czm_pi$1,czm_piOverFour:czm_piOverFour$1,czm_piOverSix:czm_piOverSix$1,czm_piOverThree:czm_piOverThree$1,czm_piOverTwo:czm_piOverTwo$1,czm_radiansPerDegree:czm_radiansPerDegree$1,czm_sceneMode2D:czm_sceneMode2D$1,czm_sceneMode3D:czm_sceneMode3D$1,czm_sceneModeColumbusView:czm_sceneModeColumbusView$1,czm_sceneModeMorphing:czm_sceneModeMorphing$1,czm_solarRadius:czm_solarRadius$1,czm_threePiOver2:czm_threePiOver2$1,czm_twoPi:czm_twoPi$1,czm_webMercatorMaxLatitude:czm_webMercatorMaxLatitude$1,czm_depthRangeStruct:czm_depthRangeStruct$1,czm_ellipsoid:czm_ellipsoid$1,czm_material:czm_material$1,czm_materialInput:czm_materialInput$1,czm_ray:czm_ray$1,czm_raySegment:czm_raySegment$1,czm_s3mMaterialInput:czm_s3mMaterialInput$1,czm_shadowParameters:czm_shadowParameters$1,czm_acesTonemapping:czm_acesTonemapping$1,czm_adjustColor:czm_adjustColor$1,czm_alphaWeight:czm_alphaWeight$1,czm_antialias:czm_antialias$1,czm_approximateSphericalCoordinates:czm_approximateSphericalCoordinates$1,czm_branchFreeTernary:czm_branchFreeTernary$1,czm_cascadeColor:czm_cascadeColor$1,czm_cascadeDistance:czm_cascadeDistance$1,czm_cascadeMatrix:czm_cascadeMatrix$1,czm_cascadeWeights:czm_cascadeWeights$1,czm_clip:czm_clip$1,czm_columbusViewMorph:czm_columbusViewMorph$1,czm_computeLightColorInFP:czm_computeLightColorInFP,czm_computeLightColorInstanceInFP:czm_computeLightColorInstanceInFP,czm_computeNormal:czm_computeNormal$1,czm_computePosition:czm_computePosition$1,czm_cosineAndSine:czm_cosineAndSine$1,czm_decompressTextureCoordinates:czm_decompressTextureCoordinates$1,czm_depthClampFarPlane:czm_depthClampFarPlane$1,czm_directionLight:czm_directionLight,czm_eastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates$1,czm_ellipsoidContainsPoint:czm_ellipsoidContainsPoint$1,czm_ellipsoidNew:czm_ellipsoidNew$1,czm_ellipsoidWgs84TextureCoordinates:czm_ellipsoidWgs84TextureCoordinates$1,czm_equalsEpsilon:czm_equalsEpsilon$1,czm_executeExcavation:czm_executeExcavation$1,czm_eyeOffset:czm_eyeOffset$1,czm_eyeToWindowCoordinates:czm_eyeToWindowCoordinates$1,czm_fastApproximateAtan:czm_fastApproximateAtan$1,czm_fog:czm_fog$1,czm_gammaCorrect:czm_gammaCorrect$1,czm_geodeticSurfaceNormal:czm_geodeticSurfaceNormal$1,czm_getDefaultMaterial:czm_getDefaultMaterial$1,czm_getEmissiveTextureColor:czm_getEmissiveTextureColor$1,czm_getHorizontalColor:czm_getHorizontalColor$1,czm_getHypsometricColor:czm_getHypsometricColor$1,czm_getLambertDiffuse:czm_getLambertDiffuse$1,czm_getSpecular:czm_getSpecular$1,czm_getTexColorForS3M:czm_getTexColorForS3M,czm_getTextureMatrixFromZValue:czm_getTextureMatrixFromZValue,czm_getVolumeValue:czm_getVolumeValue$1,czm_getVolumeValueMultiResolution:czm_getVolumeValueMultiResolution,czm_getWaterNoise:czm_getWaterNoise$1,czm_getWgs84EllipsoidEC:czm_getWgs84EllipsoidEC$1,czm_HSBToRGB:czm_HSBToRGB$1,czm_HSLToRGB:czm_HSLToRGB$1,czm_hue:czm_hue$1,czm_inverseGamma:czm_inverseGamma$1,czm_inverseMatrix:czm_inverseMatrix$1,czm_isEmpty:czm_isEmpty$1,czm_isFull:czm_isFull$1,czm_latitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction$1,czm_lineDistance:czm_lineDistance$1,czm_luminance:czm_luminance$1,czm_metersPerPixel:czm_metersPerPixel$1,czm_modelToWindowCoordinates:czm_modelToWindowCoordinates$1,czm_multiplyWithColorBalance:czm_multiplyWithColorBalance$1,czm_nearFarScalar:czm_nearFarScalar$1,czm_octDecode:czm_octDecode$1,czm_packDepth:czm_packDepth$1,czm_packValue:czm_packValue$1,czm_phong:czm_phong$1,czm_planeDistance:czm_planeDistance$1,czm_pointAlongRay:czm_pointAlongRay$1,czm_rayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval$1,czm_raySphereIntersectionInterval:czm_raySphereIntersectionInterval,czm_readDepth:czm_readDepth$1,czm_readNonPerspective:czm_readNonPerspective$1,czm_reverseLogDepth:czm_reverseLogDepth$1,czm_RGBToHSB:czm_RGBToHSB$1,czm_RGBToHSL:czm_RGBToHSL$1,czm_RGBToXYZ:czm_RGBToXYZ$1,czm_RollerShutter:czm_RollerShutter$1,czm_s3mBatchOperation:czm_s3mBatchOperation$1,czm_S3MPBR:czm_S3MPBR$1,czm_sampleAndBlend:czm_sampleAndBlend$1,czm_sampleOctahedralProjection:czm_sampleOctahedralProjection$1,czm_saturation:czm_saturation$1,czm_shadowDepthCompare:czm_shadowDepthCompare,czm_shadowVisibility:czm_shadowVisibility,czm_signNotZero:czm_signNotZero$1,czm_sketchMode:czm_sketchMode$1,czm_sphericalHarmonics:czm_sphericalHarmonics$1,czm_tangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix$1,czm_transformPlane:czm_transformPlane$1,czm_translateRelativeToEye:czm_translateRelativeToEye$1,czm_translucentPhong:czm_translucentPhong$1,czm_transpose:czm_transpose$1,czm_unpackDepth:czm_unpackDepth$1,czm_unpackFloat:czm_unpackFloat$1,czm_unpackValue:czm_unpackValue$1,czm_vertexLogDepth:czm_vertexLogDepth$1,czm_windowToEyeCoordinates:czm_windowToEyeCoordinates$1,czm_writeDepthClampedToFarPlane:czm_writeDepthClampedToFarPlane$1,czm_writeLogDepth:czm_writeLogDepth$1,czm_writeNonPerspective:czm_writeNonPerspective$1,czm_XYZToRGB:czm_XYZToRGB$1},czm_degreesPerRadian="/**\n * A built-in GLSL floating-point constant for converting radians to degrees.\n *\n * @alias czm_degreesPerRadian\n * @glslConstant\n *\n * @see CesiumMath.DEGREES_PER_RADIAN\n *\n * @example\n * // GLSL declaration\n * const float czm_degreesPerRadian = ...;\n *\n * // Example\n * float deg = czm_degreesPerRadian * rad;\n */\nconst float czm_degreesPerRadian = 57.29577951308232;\n",czm_depthRange="/**\n * A built-in GLSL vec2 constant for defining the depth range.\n * This is a workaround to a bug where IE11 does not implement gl_DepthRange.\n *\n * @alias czm_depthRange\n * @glslConstant\n *\n * @example\n * // GLSL declaration\n * float depthRangeNear = czm_depthRange.near;\n * float depthRangeFar = czm_depthRange.far;\n *\n */\nconst czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n",czm_ellipsoidInverseRadii="/**\n * The reciprocal of the radius of the WGS84 ellipsoid.\n *\n * @name czm_ellipsoidInverseRadii\n * @glslConstant\n */\nconst czm_ellipsoidInverseRadii = vec3<f32>(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.314245);\n",czm_ellipsoidRadii="/**\n * The radius of the WGS84 ellipsoid.\n *\n * @name czm_ellipsoidRadii\n * @glslConstant\n */\nconst czm_ellipsoidRadii = vec3<f32>(6378137.0, 6378137.0, 6356752.314245);\n",czm_epsilon1="/**\n * 0.1\n *\n * @name czm_epsilon1\n * @glslConstant\n */\nconst czm_epsilon1 = 0.1;\n",czm_epsilon2="/**\n * 0.01\n *\n * @name czm_epsilon2\n * @glslConstant\n */\nconst czm_epsilon2 = 0.01;\n",czm_epsilon3="/**\n * 0.001\n *\n * @name czm_epsilon3\n * @glslConstant\n */\nconst czm_epsilon3 = 0.001;\n",czm_epsilon4="/**\n * 0.0001\n *\n * @name czm_epsilon4\n * @glslConstant\n */\nconst czm_epsilon4 = 0.0001;\n",czm_epsilon5="/**\n * 0.00001\n *\n * @name czm_epsilon5\n * @glslConstant\n */\nconst czm_epsilon5 = 0.00001;\n",czm_epsilon6="/**\n * 0.000001\n *\n * @name czm_epsilon6\n * @glslConstant\n */\nconst czm_epsilon6 = 0.000001;\n",czm_epsilon7="/**\n * 0.0000001\n *\n * @name czm_epsilon7\n * @glslConstant\n */\nconst czm_epsilon7 = 0.0000001;\n",czm_infinity="/**\n * DOC_TBA\n *\n * @name czm_infinity\n * @glslConstant\n */\nconst float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?\n",czm_oneOverPi="/**\n * A built-in GLSL floating-point constant for <code>1/pi</code>.\n *\n * @alias czm_oneOverPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverPi = ...;\n *\n * // Example\n * float pi = 1.0 / czm_oneOverPi;\n */\nconst float czm_oneOverPi = 0.3183098861837907;\n",czm_oneOverTwoPi="/**\n * A built-in GLSL floating-point constant for <code>1/2pi</code>.\n *\n * @alias czm_oneOverTwoPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverTwoPi = ...;\n *\n * // Example\n * float pi = 2.0 * czm_oneOverTwoPi;\n */\nconst float czm_oneOverTwoPi = 0.15915494309189535;\n",czm_passCesium3DTile="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}\n *\n * @name czm_passCesium3DTile\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTile = 4.0;\n",czm_passCesium3DTileClassification="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}\n *\n * @name czm_passCesium3DTileClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassification = 5.0;\n",czm_passCesium3DTileClassificationIgnoreShow="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}\n *\n * @name czm_passCesium3DTileClassificationIgnoreShow\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n",czm_passClassification="/**\n * The automatic GLSL constant for {@link Pass#CLASSIFICATION}\n *\n * @name czm_passClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passClassification = 7.0;\n",czm_passCompute="/**\n * The automatic GLSL constant for {@link Pass#COMPUTE}\n *\n * @name czm_passCompute\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCompute = 1.0;\n",czm_passEnvironment="/**\n * The automatic GLSL constant for {@link Pass#ENVIRONMENT}\n *\n * @name czm_passEnvironment\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passEnvironment = 0.0;\n",czm_passGlobe="/**\n * The automatic GLSL constant for {@link Pass#GLOBE}\n *\n * @name czm_passGlobe\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGlobe = 2.0;\n",czm_passGround="/**\n * The automatic GLSL constant for {@link Pass#GROUND}\n *\n * @name czm_passGround\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGround = 4.0;\n",czm_passOpaque="/**\n * The automatic GLSL constant for {@link Pass#OPAQUE}\n *\n * @name czm_passOpaque\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOpaque = 12.0;\n",czm_passOverlay="/**\n * The automatic GLSL constant for {@link Pass#OVERLAY}\n *\n * @name czm_passOverlay\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOverlay = 20.0;",czm_passTerrainClassification="/**\n * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}\n *\n * @name czm_passTerrainClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTerrainClassification = 3.0;\n",czm_passTranslucent="/**\n * The automatic GLSL constant for {@link Pass#TRANSLUCENT}\n *\n * @name czm_passTranslucent\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTranslucent = 18.0;",czm_pi="/**\n * A built-in GLSL floating-point constant for <code>Math.PI</code>.\n *\n * @alias czm_pi\n * @glslConstant\n *\n * @see CesiumMath.PI\n *\n * @example\n * // GLSL declaration\n * const float czm_pi = ...;\n *\n * // Example\n * float twoPi = 2.0 * czm_pi;\n */\nconst czm_pi = 3.141592653589793;\n",czm_piOverFour="/**\n * A built-in GLSL floating-point constant for <code>pi/4</code>.\n *\n * @alias czm_piOverFour\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_FOUR\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverFour = ...;\n *\n * // Example\n * float pi = 4.0 * czm_piOverFour;\n */\nconst float czm_piOverFour = 0.7853981633974483;\n",czm_piOverSix="/**\n * A built-in GLSL floating-point constant for <code>pi/6</code>.\n *\n * @alias czm_piOverSix\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_SIX\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverSix = ...;\n *\n * // Example\n * float pi = 6.0 * czm_piOverSix;\n */\nconst float czm_piOverSix = 0.5235987755982988;\n",czm_piOverThree="/**\n * A built-in GLSL floating-point constant for <code>pi/3</code>.\n *\n * @alias czm_piOverThree\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_THREE\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverThree = ...;\n *\n * // Example\n * float pi = 3.0 * czm_piOverThree;\n */\nconst float czm_piOverThree = 1.0471975511965976;\n",czm_piOverTwo="/**\n * A built-in GLSL floating-point constant for <code>pi/2</code>.\n *\n * @alias czm_piOverTwo\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverTwo = ...;\n *\n * // Example\n * float pi = 2.0 * czm_piOverTwo;\n */\nconst float czm_piOverTwo = 1.5707963267948966;\n",czm_radiansPerDegree="/**\n * A built-in GLSL floating-point constant for converting degrees to radians.\n *\n * @alias czm_radiansPerDegree\n * @glslConstant\n *\n * @see CesiumMath.RADIANS_PER_DEGREE\n *\n * @example\n * // GLSL declaration\n * const float czm_radiansPerDegree = ...;\n *\n * // Example\n * float rad = czm_radiansPerDegree * deg;\n */\nconst czm_radiansPerDegree = 0.017453292519943295;\n",czm_sceneMode2D="/**\n * The constant identifier for the 2D {@link SceneMode}\n *\n * @name czm_sceneMode2D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode2D = 2.0;\n",czm_sceneMode3D="/**\n * The constant identifier for the 3D {@link SceneMode}\n *\n * @name czm_sceneMode3D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode3D = 3.0;\n",czm_sceneModeColumbusView="/**\n * The constant identifier for the Columbus View {@link SceneMode}\n *\n * @name czm_sceneModeColumbusView\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneModeColumbusView = 1.0;\n",czm_sceneModeMorphing="/**\n * The constant identifier for the Morphing {@link SceneMode}\n *\n * @name czm_sceneModeMorphing\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n */\nconst float czm_sceneModeMorphing = 0.0;\n",czm_solarRadius="/**\n * A built-in GLSL floating-point constant for one solar radius.\n *\n * @alias czm_solarRadius\n * @glslConstant\n *\n * @see CesiumMath.SOLAR_RADIUS\n *\n * @example\n * // GLSL declaration\n * const float czm_solarRadius = ...;\n */\nconst float czm_solarRadius = 695500000.0;\n",czm_threePiOver2="/**\n * A built-in GLSL floating-point constant for <code>3pi/2</code>.\n *\n * @alias czm_threePiOver2\n * @glslConstant\n *\n * @see CesiumMath.THREE_PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_threePiOver2 = ...;\n *\n * // Example\n * float pi = (2.0 / 3.0) * czm_threePiOver2;\n */\nconst float czm_threePiOver2 = 4.71238898038469;\n",czm_twoPi="/**\n * A built-in GLSL floating-point constant for <code>2pi</code>.\n *\n * @alias czm_twoPi\n * @glslConstant\n *\n * @see CesiumMath.TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_twoPi = ...;\n *\n * // Example\n * float pi = czm_twoPi / 2.0;\n */\nconst float czm_twoPi = 6.283185307179586;\n",czm_webMercatorMaxLatitude="/**\n * The maximum latitude, in radians, both North and South, supported by a Web Mercator\n * (EPSG:3857) projection. Technically, the Mercator projection is defined\n * for any latitude up to (but not including) 90 degrees, but it makes sense\n * to cut it off sooner because it grows exponentially with increasing latitude.\n * The logic behind this particular cutoff value, which is the one used by\n * Google Maps, Bing Maps, and Esri, is that it makes the projection\n * square. That is, the rectangle is equal in the X and Y directions.\n *\n * The constant value is computed as follows:\n * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))\n *\n * @name czm_webMercatorMaxLatitude\n * @glslConstant\n */\nconst float czm_webMercatorMaxLatitude = 1.4844222297453324;\n",czm_depthRangeStruct="/**\n * @name czm_depthRangeStruct\n * @glslStruct\n */\nstruct czm_depthRangeStruct\n{\n float near;\n float far;\n};\n",czm_ellipsoid="/** DOC_TBA\n *\n * @name czm_ellipsoid\n * @glslStruct\n */\nstruct czm_ellipsoid\n{\n vec3 center;\n vec3 radii;\n vec3 inverseRadii;\n vec3 inverseRadiiSquared;\n};\n",czm_material="/**\n * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.\n *\n * @name czm_material\n * @glslStruct\n *\n * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n * @property {float} specular Intensity of incoming light reflecting in a single direction.\n * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n * @property {float} alpha Opacity of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n */\nstruct czm_material\n{\n diffuse : vec3<f32>;\n specular : f32;\n shininess : f32;\n normal : vec3<f32>;\n emission : vec3<f32>;\n alpha : f32;\n};\n",czm_materialInput="/**\n * Used as input to every material's czm_getMaterial function.\n *\n * @name czm_materialInput\n * @glslStruct\n *\n * @property {float} s 1D texture coordinates.\n * @property {vec2} st 2D texture coordinates.\n * @property {vec3} str 3D texture coordinates.\n * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.\n * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.\n * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.\n * @property {float} height The height of the terrain in meters above or below the WGS84 ellipsoid. Only available for globe materials.\n * @property {float} slope The slope of the terrain normalized from 0 to 1. 0 is completely vertical, 1 is completely flat. Only available for globe materials.\n */\nstruct czm_materialInput\n{\n s : f32;\n st : vec2<f32>;\n str : vec3<f32>;\n normalEC : vec3<f32>;\n tangentToEyeMatrix : mat3x3<f32>;\n positionToEyeEC : vec3<f32>;\n height : f32;\n slope : f32;\n};\n",czm_ray="/**\n * DOC_TBA\n *\n * @name czm_ray\n * @glslStruct\n */\nstruct czm_ray\n{\n origin : vec3<f32>;\n direction : vec3<f32>;\n};\n",czm_raySegment="/**\n * DOC_TBA\n *\n * @name czm_raySegment\n * @glslStruct\n */\nstruct czm_raySegment\n{\n start : f32;\n stop : f32;\n};\n\n/**\n * DOC_TBA\n *\n * @name czm_emptyRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\n\n/**\n * DOC_TBA\n *\n * @name czm_fullRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n",czm_s3mMaterialInput="struct czm_s3mMaterialInput\n{\n vec4 ambientColor;\n vec4 diffuseColor;\n vec4 ambientLightColor;\n vec4 sunLightColor;\n mat4 texMatrix;\n float texture0Width;\n float texture1Width;\n vec3 sunDirectionEC;\n float sunLightON;\n};\n",czm_shadowParameters="struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\n texCoords : vec3<f32>,\n#else\n texCoords : vec2<f32>,\n#endif\n\n depthBias : f32,\n depth : f32,\n nDotL : f32,\n texelStepSize : vec2<f32>,\n normalShadingSmooth : f32,\n darkness : f32,\n shadowMapIndex : f32\n};\n",czm_acesTonemapping="// See:\n// https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/\n\nfn czm_acesTonemapping(inColor : vec3<f32>) -> vec3<f32> {\n var color = inColor;\n var g = 0.985f;\n var a = 0.065f;\n var b = 0.0001f;\n var c = 0.433f;\n var d = 0.238f;\n color = (color * (color + a) - b) / (color * (g * color + c) + d);\n color = clamp(color, vec3<f32>(0.0f, 0.0f, 0.0f), vec3<f32>(1.0f, 1.0f, 1.0f));\n return color;\n}\n",czm_adjustColor="uniform float uBrightness;\nuniform float uContrast;\nuniform float uHue;\nuniform float uSaturation;\nuniform float uOneOverGamma;\nvec3 czm_adjustColor(vec3 inputColor)\n{\n vec3 outputColor = inputColor;\n outputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\n outputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\n outputColor.rgb = czm_hue(outputColor.rgb, uHue);\n outputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\n outputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\n outputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\n return outputColor;\n}",czm_alphaWeight="\nfn czm_alphaWeight(a : f32) -> f32\n{\n var z = (gl_FragCoord.z - Scene.uViewportTransformation[3][2]) / Scene.uViewportTransformation[2][2];\n\n // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:\n // http://jcgt.org/published/0002/02/09/\n return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n",czm_antialias="/**\n * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.\n *\n * @name czm_antialias\n * @glslFunction\n *\n * @param {vec4} color1 The color on one side of the edge.\n * @param {vec4} color2 The color on the other side of the edge.\n * @param {vec4} currentcolor The current color, either <code>color1</code> or <code>color2</code>.\n * @param {float} dist The distance to the edge in texture coordinates.\n * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.\n * @returns {vec4} The anti-aliased color.\n *\n * @example\n * // GLSL declarations\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);\n *\n * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space\n * float dist = abs(textureCoordinates.t - 0.5);\n * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));\n * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);\n */\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\n float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\n float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\n val1 = val1 * (1.0 - val2);\n val1 = val1 * val1 * (3.0 - (2.0 * val1));\n val1 = pow(val1, 0.5); //makes the transition nicer\n \n vec4 midColor = (color1 + color2) * 0.5;\n return mix(midColor, currentColor, val1);\n}\n\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\n return czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n",czm_approximateSphericalCoordinates="/**\n * Approximately computes spherical coordinates given a normal.\n * Uses approximate inverse trigonometry for speed and consistency,\n * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.\n *\n * @name czm_approximateSphericalCoordinates\n * @glslFunction\n *\n * @param {vec3} normal arbitrary-length normal.\n *\n * @returns {vec2} Approximate latitude and longitude spherical coordinates.\n */\nvec2 czm_approximateSphericalCoordinates(vec3 normal) {\n // Project into plane with vertical for latitude\n float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\n float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\n return vec2(latitudeApproximation, longitudeApproximation);\n}\n",czm_branchFreeTernary="/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a float expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {float} a Value to return if the comparison is true.\n * @param {float} b Value to return if the comparison is false.\n *\n * @returns {float} equivalent of comparison ? a : b\n */\nfloat czm_branchFreeTernary(bool comparison, float a, float b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec2 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec2} a Value to return if the comparison is true.\n * @param {vec2} b Value to return if the comparison is false.\n *\n * @returns {vec2} equivalent of comparison ? a : b\n */\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec3 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec4 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n",czm_cascadeColor="\nvec4 czm_cascadeColor(vec4 weights)\n{\n return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\n vec4(0.0, 1.0, 0.0, 1.0) * weights.y +\n vec4(0.0, 0.0, 1.0, 1.0) * weights.z +\n vec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n",czm_cascadeDistance="\nuniform vec4 shadowMap_cascadeDistances;\n\nfloat czm_cascadeDistance(vec4 weights)\n{\n return dot(shadowMap_cascadeDistances, weights);\n}\n",czm_cascadeMatrix="\nuniform mat4 shadowMap_cascadeMatrices[4];\n\nmat4 czm_cascadeMatrix(vec4 weights)\n{\n return shadowMap_cascadeMatrices[0] * weights.x +\n shadowMap_cascadeMatrices[1] * weights.y +\n shadowMap_cascadeMatrices[2] * weights.z +\n shadowMap_cascadeMatrices[3] * weights.w;\n}\n",czm_cascadeWeights="\nuniform shadowMap_cascadeSplits : array<vec4<f32>, 2>;\n\nfn czm_cascadeWeights(depthEye : f32) -> vec4<f32>\n{\n // One component is set to 1.0 and all others set to 0.0.\n var near = step(shadowMap_cascadeSplits[0], vec4<f32>(depthEye));\n var far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}\n",czm_clip="\nuniform clip_mode : f32;\nuniform clip_planes : array<vec4<f32>, 6>;\nuniform clip_line_color : vec4<f32>;\nconst clip_lineWidth = 3.0;\n\nfn GetClipDistance(pos : vec3<f32>, planeNormal : vec3<f32>, disToOrigin : f32) -> f32\n{\n\treturn dot(planeNormal, pos) + disToOrigin;\n}\n\nfn ClipBehindAllPlane(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n\tvar distance = 0.0;\n\tvar result = -1.0;\n#ifdef CLIPPLANE\n\tdistance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[0].xyz, uniforms.clip_planes[0].w);\n\tif (distance < 0.0)\n\t{\n\t\treturn 1.0;\n\t}\n\telse if (distance < fBorderWidth)\n\t{\n\t\tresult = 0.0;\n\t}\n#else\n\tvar i : u32;\n\tfor(i = 0; i < 6; i++)\n\t{\n\t\tdistance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[i].xyz, uniforms.clip_planes[i].w);\n\t\tif(distance < 0.0)\n\t\t{\n\t\t\treturn 1.0;\n\t\t}\n\t\telse if(distance < fBorderWidth)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n#endif // CLIPPLANE\n\treturn result;\n}\n\nfn ClipBehindAnyPlane(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n\tvar result = 1.0;\n\tvar i : u32;\n\tfor(i = 0; i < 6; i++)\n\t{\n\t\tvar distance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[i].xyz, uniforms.clip_planes[i].w);\n\t\tif((distance + fBorderWidth) < 0.0)\n\t\t{\n\t\t\treturn -1.0;\n\t\t}\n\t\telse if(distance < 0.0)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n\treturn result;\n}\n\nfn ClipAnythingButLine(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n\tvar result = -1.0;\n\tvar i : u32;\n\tfor(i = 0; i < 6; i++)\n\t{\n\t\tvar distance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[i].xyz, uniforms.clip_planes[i].w);\n\t\tif(distance < 0.0)\n\t\t{\n\t\t\treturn -1.0;\n\t\t}\n\t\telse if(distance < fBorderWidth)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n\treturn result;\n}\n\nfn czm_clip(clip_vertex : vec4<f32>, fIsFiltByID : f32) -> vec4<f32>\n{\n if(fIsFiltByID < 0.1)\n {\n return vec4<f32>(1.0);\n }\n\tif(uniforms.clip_mode < 0.5)\n\t{\n\t\treturn vec4<f32>(1.0);\n\t}\n\n\tvar fBorderWidth = clip_lineWidth;\n\tvar clipResult = 1.0;\n\tif(uniforms.clip_line_color.a < 0.01)\n\t{\n\t\tfBorderWidth = 0.0;\n\t}\n\tif(uniforms.clip_mode < 1.5)\n\t{\n\t\tclipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n\t}\n\telse if(uniforms.clip_mode < 2.5)\n\t{\n\t\tclipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n\t}\n\telse if(uniforms.clip_mode < 3.5)\n\t{\n\t\tclipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n\t}\n\tif(clipResult < -0.5)\n\t{\n\t\tdiscard;\n\t}\n\telse if(clipResult < 0.5)\n\t{\n\t\treturn uniforms.clip_line_color;\n\t}\n\telse\n\t{\n return vec4<f32>(1.0);\n\t}\n}\n",czm_columbusViewMorph="\nfn czm_columbusViewMorph(position2D : vec4<f32>, position3D : vec4<f32>, time : f32) -> vec4<f32>\n{\n // Just linear for now.\n var p = mix(position2D.xyz, position3D.xyz, time);\n return vec4<f32>(p, 1.0);\n}\n",czm_computeNormal="\nfn czm_computeNormal(oriVertex : vec3<f32>) -> vec3<f32> {\n var normal : vec3<f32>;\n normal = cross(vec3<f32>(dpdx(oriVertex.x), dpdx(oriVertex.y), dpdx(oriVertex.z)), vec3<f32>(dpdy(oriVertex.x), dpdy(oriVertex.y), dpdy(oriVertex.z)));\n normal = normalize(normal);\n return normal;\n}",czm_computePosition="/**\n * Returns a position in model coordinates relative to eye taking into\n * account the current scene mode: 3D, 2D, or Columbus view.\n * <p>\n * This uses standard position attributes, <code>position3DHigh</code>, \n * <code>position3DLow</code>, <code>position2DHigh</code>, and <code>position2DLow</code>, \n * and should be used when writing a vertex shader for an {@link Appearance}.\n * </p>\n *\n * @name czm_computePosition\n * @glslFunction\n *\n * @returns {vec4} The position relative to eye.\n *\n * @example\n * vec4 p = czm_computePosition();\n * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n *\n * @see czm_translateRelativeToEye\n */\nvec4 czm_computePosition();\n",czm_cosineAndSine="/**\n * @private\n */\nvec2 cordic(float angle)\n{\n// Scale the vector by the appropriate factor for the 24 iterations to follow.\n vec2 vector = vec2(6.0725293500888267e-1, 0.0);\n// Iteration 1\n float sense = (angle < 0.0) ? -1.0 : 1.0;\n // float factor = sense * 1.0; // 2^-0\n mat2 rotation = mat2(1.0, sense, -sense, 1.0);\n vector = rotation * vector;\n angle -= sense * 7.8539816339744828e-1; // atan(2^-0)\n// Iteration 2\n sense = (angle < 0.0) ? -1.0 : 1.0;\n float factor = sense * 5.0e-1; // 2^-1\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.6364760900080609e-1; // atan(2^-1)\n// Iteration 3\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.5e-1; // 2^-2\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4497866312686414e-1; // atan(2^-2)\n// Iteration 4\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.25e-1; // 2^-3\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2435499454676144e-1; // atan(2^-3)\n// Iteration 5\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.25e-2; // 2^-4\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.2418809995957350e-2; // atan(2^-4)\n// Iteration 6\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.125e-2; // 2^-5\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.1239833430268277e-2; // atan(2^-5)\n// Iteration 7\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.5625e-2; // 2^-6\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5623728620476831e-2; // atan(2^-6)\n// Iteration 8\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.8125e-3; // 2^-7\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.8123410601011111e-3; // atan(2^-7)\n// Iteration 9\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.90625e-3; // 2^-8\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.9062301319669718e-3; // atan(2^-8)\n// Iteration 10\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.953125e-3; // 2^-9\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9531225164788188e-3; // atan(2^-9)\n// Iteration 11\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.765625e-4; // 2^-10\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.7656218955931946e-4; // atan(2^-10)\n// Iteration 12\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.8828125e-4; // 2^-11\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.8828121119489829e-4; // atan(2^-11)\n// Iteration 13\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.44140625e-4; // 2^-12\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4414062014936177e-4; // atan(2^-12)\n// Iteration 14\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.220703125e-4; // 2^-13\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2207031189367021e-4; // atan(2^-13)\n// Iteration 15\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.103515625e-5; // 2^-14\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.1035156174208773e-5; // atan(2^-14)\n// Iteration 16\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.0517578125e-5; // 2^-15\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.0517578115526096e-5; // atan(2^-15)\n// Iteration 17\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.52587890625e-5; // 2^-16\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5258789061315762e-5; // atan(2^-16)\n// Iteration 18\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.62939453125e-6; // 2^-17\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.6293945311019700e-6; // atan(2^-17)\n// Iteration 19\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.814697265625e-6; // 2^-18\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.8146972656064961e-6; // atan(2^-18)\n// Iteration 20\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.9073486328125e-6; // 2^-19\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9073486328101870e-6; // atan(2^-19)\n// Iteration 21\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.5367431640625e-7; // 2^-20\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.5367431640596084e-7; // atan(2^-20)\n// Iteration 22\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.76837158203125e-7; // 2^-21\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.7683715820308884e-7; // atan(2^-21)\n// Iteration 23\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.384185791015625e-7; // 2^-22\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.3841857910155797e-7; // atan(2^-22)\n// Iteration 24\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.1920928955078125e-7; // 2^-23\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n// angle -= sense * 1.1920928955078068e-7; // atan(2^-23)\n\n return vector;\n}\n\n/**\n * Computes the cosine and sine of the provided angle using the CORDIC algorithm.\n *\n * @name czm_cosineAndSine\n * @glslFunction\n *\n * @param {float} angle The angle in radians.\n *\n * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).\n *\n * @example\n * vec2 v = czm_cosineAndSine(czm_piOverSix);\n * float cosine = v.x;\n * float sine = v.y;\n */\nvec2 czm_cosineAndSine(float angle)\n{\n if (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n {\n if (angle < 0.0)\n {\n return -cordic(angle + czm_pi);\n }\n else\n {\n return -cordic(angle - czm_pi);\n }\n }\n else\n {\n return cordic(angle);\n }\n}\n",czm_decompressTextureCoordinates="/**\n * Decompresses texture coordinates that were packed into a single float.\n *\n * @name czm_decompressTextureCoordinates\n * @glslFunction\n *\n * @param {float} encoded The compressed texture coordinates.\n * @returns {vec2} The decompressed texture coordinates.\n */\n fn czm_decompressTextureCoordinates(encoded : f32) -> vec2<f32>\n {\n var temp = encoded / 4096.0;\n var xZeroTo4095 = floor(temp);\n var stx = xZeroTo4095 / 4095.0;\n var sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\n return vec2<f32>(stx, sty);\n }\n",czm_depthClampFarPlane="// emulated noperspective\n#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\n\n/**\n * Clamps a vertex to the far plane.\n *\n * @name czm_depthClampFarPlane\n * @glslFunction\n *\n * @param {vec4} coords The vertex in clip coordinates.\n * @returns {vec4} The vertex clipped to the far plane.\n *\n * @example\n * gl_Position = czm_depthClampFarPlane(czm_modelViewProjection * vec4(position, 1.0));\n *\n * @see czm_writeDepthClampedToFarPlane\n */\nvec4 czm_depthClampFarPlane(vec4 coords)\n{\n#ifndef LOG_DEPTH\n v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\n coords.z = min(coords.z, coords.w);\n#endif\n return coords;\n}\n",czm_eastNorthUpToEyeCoordinates="/**\n * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system \n * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the \n * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.\n * <br /><br />\n * The ellipsoid is assumed to be centered at the model coordinate's origin.\n *\n * @name czm_eastNorthUpToEyeCoordinates\n * @glslFunction\n *\n * @param {vec3} positionMC The position on the ellipsoid in model coordinates.\n * @param {vec3} normalEC The normalized ellipsoid surface normal, at <code>positionMC</code>, in eye coordinates.\n *\n * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.\n *\n * @example\n * // Transform a vector defined in the east-north-up coordinate \n * // system, (0, 0, 1) which is the surface normal, to eye \n * // coordinates.\n * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);\n */\nmat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\n vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates\n vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordiantes\n vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates\n\n return mat3(\n tangentEC.x, tangentEC.y, tangentEC.z,\n bitangentEC.x, bitangentEC.y, bitangentEC.z,\n normalEC.x, normalEC.y, normalEC.z);\n}\n",czm_ellipsoidContainsPoint="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidContainsPoint\n * @glslFunction\n *\n */\nbool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\n vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\n return (dot(scaled, scaled) <= 1.0);\n}\n",czm_ellipsoidNew="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidNew\n * @glslFunction\n *\n */\nczm_ellipsoid czm_ellipsoidNew(vec3 center, vec3 radii)\n{\n vec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n vec3 inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(center, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n",czm_ellipsoidWgs84TextureCoordinates="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidWgs84TextureCoordinates\n * @glslFunction\n */\nvec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\n return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n",czm_equalsEpsilon="/**\n * Compares <code>left</code> and <code>right</code> componentwise. Returns <code>true</code>\n * if they are within <code>epsilon</code> and <code>false</code> otherwise. The inputs\n * <code>left</code> and <code>right</code> can be <code>float</code>s, <code>vec2</code>s,\n * <code>vec3</code>s, or <code>vec4</code>s.\n *\n * @name czm_equalsEpsilon\n * @glslFunction\n *\n * @param {} left The first vector.\n * @param {} right The second vector.\n * @param {float} epsilon The epsilon to use for equality testing.\n * @returns {bool} <code>true</code> if the components are within <code>epsilon</code> and <code>false</code> otherwise.\n *\n * @example\n * // GLSL declarations\n * bool czm_equalsEpsilon(float left, float right, float epsilon);\n * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);\n * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);\n * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);\n */\nbool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\n\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\n return (abs(left - right) <= epsilon);\n}\n",czm_ExcavationFS="uniform sampler2D uColorTexture;\nuniform sampler2D uRasterTexture;\nvarying float vHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying float regionHeight;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uRasterTexture, vTexCoord0));\n if(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n }\n if (vHeight > terrainHeight || vHeight < regionHeight) { \n discard;\n }\n vec4 baseColorWithAlpha = texture2D(uColorTexture, vTexCoord1);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(vTexCoord1.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(vTexCoord1.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, vTexCoord1.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n if(gl_FrontFacing)\n {\n n = -n;\n }\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}\n",czm_ExcavationVS="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nattribute vec2 aTexCoord1;\nvarying float vHeight;\nvarying float regionHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vHeight = aPosition.w;\n vTexCoord0 = aTexCoord0.xy;\n vTexCoord1 = aTexCoord1;\n regionHeight = aTexCoord0.z;\n gl_Position = pos;\n v_positionMC = vec4(aPosition.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\n}\n",czm_executeExcavation="#ifdef EXCAVATION\nvar uExcavationTexture : texture_2d<f32>;\nvar uExcavationTextureSampler : sampler;\n\nvarying vExcavationVertexPos : vec4<f32>;\nfn CalculateExcavationPolyTexCoord(vertexPos :vec4<f32>, rectPos : vec4<f32>) -> vec3<f32>\n{\n var vecRatio = vec2<f32>(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n var texCoord = vec2<f32>(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n var ptInRect : f32 = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2<f32>(0.0), vec2<f32>(1.0));\n var result = vec3<f32>(texCoord.xy, ptInRect);\n return result;\n}\nfn czm_executeExcavation() -> bool\n{\n var vecExcavationTexCoord = CalculateExcavationPolyTexCoord(vExcavationVertexPos, Layer.uExcavationRect);\n var hasExcavation = vecExcavationTexCoord.z;\n var excavationInside : bool = (Layer.uExcavationMode < 0.5);\n var regionColor = textureSample(uExcavationTexture, uExcavationTextureSampler, vecExcavationTexCoord.xy).r;\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n if(excavationInside)\n {\n return regionColor > 0.5;\n }\n else\n {\n return regionColor < 0.5;\n }\n}\n#endif",czm_eyeOffset="/**\n * DOC_TBA\n *\n * @name czm_eyeOffset\n * @glslFunction\n *\n * @param {vec4} positionEC DOC_TBA.\n * @param {vec3} eyeOffset DOC_TBA.\n *\n * @returns {vec4} DOC_TBA.\n */\nvec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\n // This equation is approximate in x and y.\n vec4 p = positionEC;\n vec4 zEyeOffset = normalize(p) * eyeOffset.z;\n p.xy += eyeOffset.xy + zEyeOffset.xy;\n p.z += zEyeOffset.z;\n return p;\n}\n",czm_eyeToWindowCoordinates="/**\n * Transforms a position from eye to window coordinates. The transformation\n * from eye to clip coordinates is done using {@link czm_projection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of <code>near = 0</code> and <code>far = 1</code>.\n * <br /><br />\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *\n * @name czm_eyeToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in eye coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_projection\n * @see czm_viewportTransformation\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n */\nfn czm_eyeToWindowCoordinates(positionEC : vec4<f32>) -> vec4<f32>\n{\n var q = uniforms.czm_projection * positionEC; // clip coordinates\n var qxyz = q.xyz;\n q = vec4<f32>(qxyz / q.w, q.w); // normalized device coordinates\n q = vec4<f32>((uniforms.czm_viewportTransformation * vec4<f32>(q.xyz, 1.0)).xyz, q.w); // window coordinates\n return q;\n}\n",czm_fastApproximateAtan="/**\n * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.\n *\n * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on\n * \"Efficient approximations for the arctangent function,\" Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.\n * Adapted from ShaderFastLibs under MIT License.\n *\n * Chosen for the following characteristics over range [0, 1]:\n * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)\n * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)\n *\n * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);\n * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between 0 and 1 inclusive.\n *\n * @returns {float} Approximation of atan(x)\n */\nfloat czm_fastApproximateAtan(float x) {\n return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\n\n/**\n * Approximation of atan2.\n *\n * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html\n * However, we replaced their atan curve with Michael Drobot's (see above).\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between -1 and 1 inclusive.\n * @param {float} y Value between -1 and 1 inclusive.\n *\n * @returns {float} Approximation of atan2(x, y)\n */\nfloat czm_fastApproximateAtan(float x, float y) {\n // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.\n // So range-reduce using abs and by flipping whether x or y is on top.\n float t = abs(x); // t used as swap and atan result.\n float opposite = abs(y);\n float adjacent = max(t, opposite);\n opposite = min(t, opposite);\n\n t = czm_fastApproximateAtan(opposite / adjacent);\n\n // Undo range reduction\n t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\n t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\n t = czm_branchFreeTernary(y < 0.0, -t, t);\n return t;\n}\n",czm_floodAnalysis="#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nvoid czm_getFloodWaterColor(inout vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n}\n#endif\n}",czm_fog="/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nfn czm_fog(distanceToCamera : f32, color : vec3<f32>, fogColor : vec3<f32>) -> vec3<f32>\n{\n var scalar = distanceToCamera * czm_fogDensity;\n var fog = 1.0 - exp(-(scalar * scalar));\n return mix(color, fogColor, fog);\n}\n\n/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n * @param {float} fogModifierConstant A constant to modify the appearance of fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\n fn czm_fog(distanceToCamera : f32, color : vec3<f32>, fogColor : vec3<f32>, fogModifierConstant : f32) -> vec3<f32>\n{\n var scalar = distanceToCamera * czm_fogDensity;\n var fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\n return mix(color, fogColor, fog);\n}\n",czm_gammaCorrect="/**\n * Converts a color from RGB space to linear space.\n *\n * @name czm_gammaCorrect\n * @glslFunction\n *\n * @param {vec3} color The color in RGB space.\n * @returns {vec3} The color in linear space.\n */\n// vec3 czm_gammaCorrect(vec3 color) {\n// #ifdef HDR\n// color = pow(color, vec3(czm_gamma));\n// #endif\n// return color;\n// }\n\nfn czm_gammaCorrect(color : vec4<f32>) -> vec4<f32> {\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3<f32>(czm_gamma));\n#endif\n return color;\n}\n",czm_geodeticSurfaceNormal="/**\n * DOC_TBA\n *\n * @name czm_geodeticSurfaceNormal\n * @glslFunction\n *\n * @param {vec3} positionOnEllipsoid DOC_TBA\n * @param {vec3} ellipsoidCenter DOC_TBA\n * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA\n * \n * @returns {vec3} DOC_TBA.\n */\nfn czm_geodeticSurfaceNormal(positionOnEllipsoid : vec3<f32>, ellipsoidCenter : vec3<f32>, oneOverEllipsoidRadiiSquared : vec3<f32>) -> vec3<f32>\n{\n return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial="/**\n * An czm_material with default values. Every material's czm_getMaterial\n * should use this default material as a base for the material it returns.\n * The default normal value is given by materialInput.normalEC.\n *\n * @name czm_getDefaultMaterial\n * @glslFunction\n *\n * @param {czm_materialInput} input The input used to construct the default material.\n *\n * @returns {czm_material} The default material.\n *\n * @see czm_materialInput\n * @see czm_material\n * @see czm_getMaterial\n */\nczm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\n czm_material material;\n material.diffuse = vec3(0.0);\n material.specular = 0.0;\n material.shininess = 1.0;\n material.normal = materialInput.normalEC;\n material.emission = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n",czm_getEmissiveTextureColor="uniform float uMaxCategoryOrHypCeil;\nuniform float uMinCategoryOrHypFloor;\nuniform sampler2D uEmissionTexAtlas;\n#if EMISSION_TEXTURE_COUNT > 0\nuniform vec4 uEmissionTexAtlasTilingAndOffset[EMISSION_TEXTURE_COUNT];\nuniform vec4 uEmissionTexAtlasRects[EMISSION_TEXTURE_COUNT];\n#endif\nuniform float uLayerCornerLength;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 czm_getEmissiveTextureColor(float w)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n #if EMISSION_TEXTURE_COUNT > 0\n for(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n #endif\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n return texColor;\n}\nvec3 czm_getEmissiveTextureColor(float w, vec2 texCoord)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n #if EMISSION_TEXTURE_COUNT > 0\n for(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n #endif\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n return texColor;\n}",czm_getFusionModePostiion="\n#ifdef FusionMode\n uniform mat4 uModelView;\n uniform vec2 uPanOffset;\n\n czm_getFusionModePosition(vec4 vertexPos)\n {\n vec4 positionCC = czm_projection * uModelView * vertexPos;\n positionCC.x += (2.0 * uPanOffset.x * positionCC.w);\n positionCC.y += (-2.0 * uPanOffset.y * positionCC.w);\n return positionCC;\n }\n#endif\n",czm_getHorizontalColor="uniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 czm_getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}",czm_getHypsometricColor="uniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypsometricVisible;\nuniform float uHypOpacity;\nuniform float uHypContourInterval;\nuniform vec4 uHypLineColor;\nuniform float uHypContourFillMode;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypHasAnalysisRegion;\nvarying vec2 vecHypTexCoord;\nuniform float uMixColorType;\nuniform vec4 uNoValueColor;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uVolumeType;\n#endif\n\n#ifdef Volume2\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uFilterMode;\n#endif\n\nfloat computeMixCon(float fValue)\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n\t if(fValue < 0.5)\n {\n distanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n }\n else\n {\n float t = floor(fValue / uHypContourInterval);\n distanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n }\n\t}\n\telse\n\t{\n\t distanceToContour = abs(fValue - uHypMaxVisibleValue);\n\t}\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float fValue)\n{\n\t//float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat threshold = abs(uHypCeil - uHypFloor);\n\tfloat contourRate = (fValue - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tfloat count = floor(finalCoord * 16.0);\n\tfloat y = (count*2.0 + 1.0)/32.0;\n\tfloat x = fract(finalCoord*16.0);\n\tif(y > 1.0)\n\t{\n\t x = 1.0;\n\t}\n\tvec2 contourCoord = vec2(x, y);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n#ifdef Volume2\n\nvec4 czm_getContourMapColor(vec4 oriColor, vec4 volColor)\n{\n if(uFilterMode > 0.5)\n {\n vec4 finalColor = volColor * oriColor;\n\n if(uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n\n\tfloat noValue = volColor.a;\n\tfloat texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\n\n\tfloat fValue;\n\tif(noValue > 0.5)\n\t{\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n vec4 finalColor = mixColor * oriColor;\n#ifdef PT_CLOUD\n\tfinalColor = mixColor;\n#endif\n if(uMixColorType > 0.5)\n {\n finalColor = mixColor;\n }\n return finalColor;\n}\n\n#else\n\nvec4 czm_getContourMapColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n#ifdef Volume\n\tvec3 aRatioT = vecRotioCoord;\n\tif((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n\t{\n\t if(uVolumeType > 0.5)\n\t {\n\t\t\tvec4 volumeColor = czm_getVolumeValue(aRatioT);\n\t\t\tif(uMixColorType > 0.5)\n\t\t\t{\n\t\t\t\tvolumeColor = volumeColor * oriColor;\n\t\t\t}\n\t\t\treturn volumeColor;\n\t }\n\t float noValue;\n\t float texTest = czm_getVolumeValue(aRatioT, noValue);\n\t if(noValue > 0.5)\n\t {\n\t fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n\t }\n\t else\n\t {\n\t fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n\t }\n\t}\n\telse\n\t{\n\t fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n\t}\n#endif\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n vec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n\tfinalColor = mixColor;\n#endif\n#ifdef Volume\n if(uMixColorType > 0.5)\n {\n finalColor = mixColor;\n }\n#endif\n return finalColor;\n}\n\n#endif\n\n#ifdef Volume2\nvec4 czm_getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\n\tif(uHypHasAnalysisRegion > 0.1)\n {\n\t\tvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n\t\tif(hypColor.r < 0.1)\n\t\t{\n\t\t\treturn oriColor;\n\t\t}\n\t}\n return czm_getContourMapColor(oriColor, volColor);\n}\n#else\nvec4 czm_getHypsometricColor(vec4 oriColor, float wValue)\n{\n float fValue = wValue;\n\tif(uHypHasAnalysisRegion > 0.1)\n {\n\t\tvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n\t\tif(hypColor.r < 0.1)\n\t\t{\n\t\t\treturn oriColor;\n\t\t}\n\t}\n return czm_getContourMapColor(oriColor, fValue);\n}\n\nvec4 czm_getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return czm_getContourMapColor(oriColor, wValue);\n}\n\n#endif",czm_getLambertDiffuse="/**\n * Calculates the intensity of diffusely reflected light.\n *\n * @name czm_getLambertDiffuse\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n *\n * @returns {float} The intensity of the diffuse reflection.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfn czm_getLambertDiffuse(lightDirectionEC : vec3<f32>, normalEC : vec3<f32>) -> f32\n{\n return max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getPBRParamFromTexture="\n#ifdef USE_BatchPBR\n var uPBRTexture : texture_2d<f32>;\n var uPBRTextureSampler : sampler;\n varying vMetallicRoughness : vec2<f32>;\n varying vEmissiveFactor : vec4<f32>;\n varying vAlphaCutoffAndModeAndDoubleSide : vec3<f32>;\n fn czm_getPBRParamFromTexture(uv : vec2<f32>)\n {\n var x = (uv.x * 2.0f + 0.5f)/ Material.uPBRTexWH.x;\n var y = (uv.x * 2.0f + 1.5f)/ Material.uPBRTexWH.x;\n var pbrParam = textureSampleLevel(uPBRTexture, uPBRTextureSampler, vec2<f32>(x, 0.5f), 0.0f);\n vMetallicRoughness = pbrParam.rg;\n vAlphaCutoffAndModeAndDoubleSide.x = pbrParam.b;\n var temp = pbrParam.a / 65536.0f;\n vAlphaCutoffAndModeAndDoubleSide.y = floor(temp);\n vAlphaCutoffAndModeAndDoubleSide.z = (temp- vAlphaCutoffAndModeAndDoubleSide.y) * 65536.0f;\n vEmissiveFactor = textureSampleLevel(uPBRTexture, uPBRTextureSampler, vec2<f32>(y, 0.5f), 0.0f);\n }\n#endif\n",czm_getSpecular="/**\n * Calculates the specular intensity of reflected light.\n *\n * @name czm_getSpecular\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n *\n * @returns {float} The intensity of the specular highlight.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\n vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\n float specular = max(dot(toReflectedLight, toEyeEC), 0.0);\n\n // pow has undefined behavior if both parameters <= 0.\n // Prevent this by making sure shininess is at least czm_epsilon2.\n return pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getVolumeValue="\nuniform sampler2D uVolumeTexture;\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uVolumeTimeRatio;\n#endif\n\n#ifdef Volume\nuniform float uVolumeWidth;\nuniform float uVolumeHeight;\nuniform float uVolumeDepth;\nuniform float uVolumeSideBlockCount;\nuniform float uVolumeBlockLength;\nuniform float uVolumeTexLength;\nuniform float uVolumeFilterMode;\n#endif\n\nfloat czm_unpackVolume(vec3 packedDepth)\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\n#ifdef Volume\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\n float yOffset = floor((fLevel+0.25/uVolumeSideBlockCount) / uVolumeSideBlockCount);\n float xOffset = fLevel - yOffset * uVolumeSideBlockCount;\n float texCoordV = (texCoord.y * uVolumeHeight + yOffset * uVolumeBlockLength) / uVolumeTexLength;\n float texCoordU = (texCoord.x * uVolumeWidth + xOffset * uVolumeBlockLength) / uVolumeTexLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\n vec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\n vec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\n float fValue1 = clamp(czm_unpackVolume(volumeValue1.xyz),0.0,1.0);\n float fValue2 = clamp(czm_unpackVolume(volumeValue2.xyz),0.0,1.0);\n if(uVolumeFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n noValue = mix(volumeValue1.a, volumeValue2.a, ratio);\n if(volumeValue1.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(volumeValue2.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfloat czm_getVolumeValue(vec3 texCoord, out float noValue)\n{\n float fLevel = (uVolumeDepth - 1.0) * texCoord.z;\n float bottomLevel= floor(fLevel);\n float topLevel = bottomLevel + 1.0;\n float ratio = topLevel - fLevel;\n vec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n vec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n float fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n fResult = mix(fResult, fNextResult, uVolumeTimeRatio);\n#endif\n return fResult;\n}\n\nvec4 czm_getVolumeValue(vec3 texCoord)\n{\n\tfloat fLevel = (uVolumeDepth - 1.0) * texCoord.z;\n\tfloat bottomLevel= floor(fLevel);\n\tfloat topLevel = bottomLevel + 1.0;\n\tfloat ratio = topLevel - fLevel;\n\tfloat yOffset1 = floor((topLevel+0.25/uVolumeSideBlockCount) / uVolumeSideBlockCount);\n\tfloat xOffset1 = topLevel - yOffset1 * uVolumeSideBlockCount;\n\tfloat texCoordV1 = (texCoord.y * uVolumeHeight + yOffset1 * uVolumeBlockLength)/uVolumeTexLength;\n\tfloat texCoordU1 = (texCoord.x * uVolumeWidth + xOffset1 * uVolumeBlockLength)/uVolumeTexLength;\n\tvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\n\tfloat yOffset2 = floor((bottomLevel+0.25/uVolumeSideBlockCount) / uVolumeSideBlockCount);\n\tfloat xOffset2 = bottomLevel - yOffset2 * uVolumeSideBlockCount;\n\tfloat texCoordV2 = (texCoord.y * uVolumeHeight + yOffset2 * uVolumeBlockLength)/uVolumeTexLength;\n\tfloat texCoordU2 = (texCoord.x * uVolumeWidth + xOffset2 * uVolumeBlockLength)/uVolumeTexLength;\n\tvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\n\n\tif(uVolumeFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif\n",czm_getWaterNoise="/**\n * @private\n */\nvec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n\n // time dependent sampling directions\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n\n // rotate sampling direction by specified angle\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (texture2D(normalMap, uv0)) +\n (texture2D(normalMap, uv1)) +\n (texture2D(normalMap, uv2)) +\n (texture2D(normalMap, uv3));\n\n // average and scale to between -1 and 1\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_getWgs84EllipsoidEC="/**\n * Returns the WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @name czm_getWgs84EllipsoidEC\n * @glslFunction\n *\n * @returns {czm_ellipsoid} The WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @see Ellipsoid.WGS84\n *\n * @example\n * czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n */\nfn czm_getWgs84EllipsoidEC() -> czm_ellipsoid\n{\n var radii = vec3<f32>(6378137.0, 6378137.0, 6378137.0);\n var inverseRadii = vec3<f32>(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n var inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(czm_view[3].xyz, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n",czm_HSBToRGB="\nfn czm_HSBToRGB(hsb : vec3<f32>) -> vec3<f32>\n{\n var K_HSB2RGB = vec4<f32>(1.0, 0.66667, 0.33333, 3.0);\n var p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\n return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, vec3<f32>(0.0), vec3<f32>(1.0)), hsb.y);\n}\n",czm_HSLToRGB="/**\n * Converts an HSL color (hue, saturation, lightness) to RGB\n * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}\n *\n * @name czm_HSLToRGB\n * @glslFunction\n * \n * @param {vec3} rgb The color in HSL.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n\nvec3 hueToRGB(float hue)\n{\n float r = abs(hue * 6.0 - 3.0) - 1.0;\n float g = 2.0 - abs(hue * 6.0 - 2.0);\n float b = 2.0 - abs(hue * 6.0 - 4.0);\n return clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 czm_HSLToRGB(vec3 hsl)\n{\n vec3 rgb = hueToRGB(hsl.x);\n float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\n return (rgb - 0.5) * c + hsl.z;\n}\n",czm_hue="/**\n * Adjusts the hue of a color.\n * \n * @name czm_hue\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the hue of the color in radians.\n *\n * @returns {float} The color with the hue adjusted.\n *\n * @example\n * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)\n */\nfn czm_hue(rgb : vec3<f32>, adjustment : f32) -> vec3<f32>\n{\n var toYIQ = mat3x3<f32>(0.299, 0.587, 0.114,\n 0.595716, -0.274453, -0.321263,\n 0.211456, -0.522591, 0.311135);\n var toRGB = mat3x3<f32>(1.0, 0.9563, 0.6210,\n 1.0, -0.2721, -0.6474,\n 1.0, -1.107, 1.7046);\n \n var yiq = toYIQ * rgb;\n var hue = atan2(yiq.z, yiq.y) + adjustment;\n var chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\n \n var color = vec3<f32>(yiq.x, chroma * cos(hue), chroma * sin(hue));\n return toRGB * color;\n}\n",czm_inverseGamma="/**\n * Converts a color in linear space to RGB space.\n *\n * @name czm_inverseGamma\n * @glslFunction\n *\n * @param {vec3} color The color in linear space.\n * @returns {vec3} The color in RGB space.\n */\nvec3 czm_inverseGamma(vec3 color) {\n return pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_inverseMatrix="mat3 czm_inverseMatrix(mat3 m)\n{\n float Determinant =\n m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\n - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\n + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\n\n mat3 Inverse;\n Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);\n Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);\n Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);\n Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);\n Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);\n Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);\n Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\n Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);\n Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);\n Inverse /= Determinant;\n\n return Inverse;\n}\n\nmat4 czm_inverseMatrix(mat4 m)\n{\n float Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\n float Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\n float Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\n\n float Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\n float Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\n float Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\n\n float Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\n float Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\n float Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\n\n float Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\n float Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\n float Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\n\n float Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\n float Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\n float Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\n\n float Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\n float Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\n float Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\n\n const vec4 SignA = vec4( 1.0, -1.0, 1.0, -1.0);\n const vec4 SignB = vec4(-1.0, 1.0, -1.0, 1.0);\n\n vec4 Fac0 = vec4(Coef00, Coef00, Coef02, Coef03);\n vec4 Fac1 = vec4(Coef04, Coef04, Coef06, Coef07);\n vec4 Fac2 = vec4(Coef08, Coef08, Coef10, Coef11);\n vec4 Fac3 = vec4(Coef12, Coef12, Coef14, Coef15);\n vec4 Fac4 = vec4(Coef16, Coef16, Coef18, Coef19);\n vec4 Fac5 = vec4(Coef20, Coef20, Coef22, Coef23);\n\n vec4 Vec0 = vec4(m[1][0], m[0][0], m[0][0], m[0][0]);\n vec4 Vec1 = vec4(m[1][1], m[0][1], m[0][1], m[0][1]);\n vec4 Vec2 = vec4(m[1][2], m[0][2], m[0][2], m[0][2]);\n vec4 Vec3 = vec4(m[1][3], m[0][3], m[0][3], m[0][3]);\n\n vec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);\n vec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);\n vec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);\n vec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);\n\n mat4 Inverse = mat4(Inv0, Inv1, Inv2, Inv3);\n\n vec4 Row0 = vec4(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);\n\n float Determinant = dot(m[0], Row0);\n\n Inverse /= Determinant;\n\n return Inverse;\n}\n",czm_isEmpty="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isEmpty\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isEmpty(czm_raySegment interval)\n{\n return (interval.stop < 0.0);\n}\n",czm_isFull="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isFull\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isFull(czm_raySegment interval)\n{\n return (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction="/**\n * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.\n *\n * @name czm_latitudeToWebMercatorFraction\n * @glslFunction\n *\n * @param {float} latitude The geodetic latitude, in radians.\n * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.\n * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.\n *\n * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern\n * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return\n * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.\n */ \nfn czm_latitudeToWebMercatorFraction(latitude : f32, southMercatorY : f32, oneOverMercatorHeight : f32) -> f32\n{\n var sinLatitude = sin(latitude);\n var mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\n \n return (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_LineCallOutVp="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute float aColor;\nuniform float uLineWidth;\nvarying float vColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nvoid main()\n{\n bool bUsePre = aTexCoord0.x < 0.1;\n float offset = bUsePre ? -uLineWidth : uLineWidth;\n vec4 viewPos1 = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tviewPos1.x = viewPos1.x + offset * computerOnePixelLength();\n\tgl_Position = czm_projection * viewPos1;\n\tvColor = aColor;\n}\n\n\n\n",czm_lineDistance="/**\n * Computes distance from an point in 2D to a line in 2D.\n *\n * @name czm_lineDistance\n * @glslFunction\n *\n * param {vec2} point1 A point along the line.\n * param {vec2} point2 A point along the line.\n * param {vec2} point A point that may or may not be on the line.\n * returns {float} The distance from the point to the line.\n */\nfloat czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\n return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_luminance="/**\n * Computes the luminance of a color. \n *\n * @name czm_luminance\n * @glslFunction\n *\n * @param {vec3} rgb The color.\n * \n * @returns {float} The luminance.\n *\n * @example\n * float light = czm_luminance(vec3(0.0)); // 0.0\n * float dark = czm_luminance(vec3(1.0)); // ~1.0 \n */\nfloat czm_luminance(vec3 rgb)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n return dot(rgb, W);\n}\n",czm_metersPerPixel="/**\n * Computes the size of a pixel in meters at a distance from the eye.\n * <p>\n * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.\n * </p>\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n * @param {float} pixelRatio The scaling factor from pixel space to coordinate space\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfn czm_metersPerPixel(positionEC : vec4<f32>, pixelRatio : f32) -> f32\n{\n var width = czm_viewport.z;\n var height = czm_viewport.w;\n var pixelWidth;\n var pixelHeight;\n\n var top = czm_frustumPlanes.x;\n var bottom = czm_frustumPlanes.y;\n var left = czm_frustumPlanes.z;\n var right = czm_frustumPlanes.w;\n\n if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n {\n var frustumWidth = right - left;\n var frustumHeight = top - bottom;\n pixelWidth = frustumWidth / width;\n pixelHeight = frustumHeight / height;\n }\n else\n {\n var distanceToPixel = -positionEC.z;\n var inverseNear = 1.0 / czm_currentFrustum.x;\n var tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n }\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}\n\n/**\n * Computes the size of a pixel in meters at a distance from the eye.\n * <p>\n * Use this version when scaling by pixel ratio.\n * </p>\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfn czm_metersPerPixel(positionEC : vec4<f32>) -> f32\n{\n return czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates="/**\n * Transforms a position from model to window coordinates. The transformation\n * from model to clip coordinates is done using {@link czm_modelViewProjection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of <code>near = 0</code> and <code>far = 1</code>.\n * <br /><br />\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n * <br /><br />\n * This function should not be confused with {@link czm_viewportOrthographic},\n * which is an orthographic projection matrix that transforms from window \n * coordinates to clip coordinates.\n *\n * @name czm_modelToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in model coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_eyeToWindowCoordinates\n * @see czm_modelViewProjection\n * @see czm_viewportTransformation\n * @see czm_viewportOrthographic\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);\n */\nfn czm_modelToWindowCoordinates(vec4 position) -> vec4<f32>\n{\n var q = uniforms.czm_modelViewProjection * position; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (uniforms.czm_viewportTransformation * vec4<f32>(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n",czm_multiplyWithColorBalance="/**\n * DOC_TBA\n *\n * @name czm_multiplyWithColorBalance\n * @glslFunction\n */\nvec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n \n vec3 target = left * right;\n float leftLuminance = dot(left, W);\n float rightLuminance = dot(right, W);\n float targetLuminance = dot(target, W);\n \n return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar="/**\n * Computes a value that scales with distance. The scaling is clamped at the near and\n * far distances, and does not extrapolate. This function works with the\n * {@link NearFarScalar} JavaScript class.\n *\n * @name czm_nearFarScalar\n * @glslFunction\n *\n * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).\n * @param {float} cameraDistSq The square of the current distance from the camera.\n *\n * @returns {float} The value at this distance.\n */\nfloat czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\n float valueAtMin = nearFarScalar.y;\n float valueAtMax = nearFarScalar.w;\n float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\n float farDistanceSq = nearFarScalar.z * nearFarScalar.z;\n\n float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\n\n t = pow(clamp(t, 0.0, 1.0), 0.2);\n\n return mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode="\n\nfn signNotZero_v2(value : vec2<f32>) -> vec2<f32>\n{\n return vec2<f32>(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\n\nfn czm_octDecode(inEncoded : vec2<f32>, range : f32) -> vec3<f32>\n{\n if (inEncoded.x == 0.0 && inEncoded.y == 0.0) {\n return vec3<f32>(0.0, 0.0, 0.0);\n }\n var encoded = inEncoded / range * 2.0 - 1.0;\n var v = vec3<f32>(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\n if (v.z < 0.0)\n {\n var temp = (vec2(1.0) - abs(v.yx)) * signNotZero_v2(v.xy);\n v.x = temp.x;\n v.y = temp.y;\n }\n\n return normalize(v);\n}\n// wgsl不支持重载\n// fn czm_octDecode(encoded : f32) -> vec3<f32>\n// {\n// var temp = encoded / 256.0;\n// var x = floor(temp);\n// var y = (temp - x) * 256.0;\n// return czm_octDecode(vec2<f32>(x, y));\n// }\n\n// fn czm_octDecode(encoded : vec2<f32>, vector1 : ptr<function, vec3<f32>>, vector2 : ptr<function, vec3<f32>>, vector3 : ptr<function, vec3<f32>>)\n// {\n// var temp = encoded.x / 65536.0;\n// var x = floor(temp);\n// var encodedFloat1 = (temp - x) * 65536.0;\n\n// temp = encoded.y / 65536.0;\n// var y = floor(temp);\n// var encodedFloat2 = (temp - y) * 65536.0;\n\n// vector1 = czm_octDecode(encodedFloat1);\n// vector2 = czm_octDecode(encodedFloat2);\n// vector3 = czm_octDecode(vec2<f32>(x, y));\n// }\n",czm_packDepth="\nfn czm_packDepth(depth : f32) -> vec4<f32>\n{\n var enc = vec4<f32>(1.0, 255.0, 65025.0, 16581375.0) * depth;\n enc = fract(enc);\n enc -= enc.yzww * vec4<f32>(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n return enc;\n}\n",czm_packValue="/**\n * Packs a float value into a vec3 that can be represented by unsigned bytes.\n *\n * @name czm_packValue\n * @glslFunction\n *\n * @param {float} value The floating-point value.\n * @returns {vec3} The packed value.\n */\nvec4 czm_packValue(float value)\n{\n float SHIFT_LEFT8 = 256.0;\n\tfloat SHIFT_RIGHT8 = 1.0 / 256.0;\n\tvec4 result;\n\tresult.a = 255.0;\n\tfloat fPos = abs(value + 9000.0) * SHIFT_RIGHT8;\n\tresult.b = (fPos - floor(fPos)) * SHIFT_LEFT8;\n\tfPos = floor(fPos) * SHIFT_RIGHT8;\n\tresult.g = (fPos - floor(fPos)) * SHIFT_LEFT8;\n\tresult.r = floor(fPos);\n\tresult /= 255.0;\n\treturn result;\n}\n",czm_phong="float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\n return czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\n\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\n return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\n\n/**\n * Computes a color using the Phong lighting model.\n *\n * @name czm_phong\n * @glslFunction\n *\n * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.\n * @param {czm_material} material The fragment's material.\n *\n * @returns {vec4} The computed color.\n *\n * @example\n * vec3 positionToEyeEC = // ...\n * czm_material material = // ...\n * vec3 lightDirectionEC = // ...\n * gl_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);\n *\n * @see czm_getMaterial\n */\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down)\n float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n }\n\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n vec3 ambient = vec3(0.0);\n vec3 color = ambient + material.emission;\n color += material.diffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_planeDistance="/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec4 plane, vec3 point) {\n return (dot(plane.xyz, point) + plane.w);\n}\n\n/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js\n * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\n return (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay="/**\n * Computes the point along a ray at the given time. <code>time</code> can be positive, negative, or zero.\n *\n * @name czm_pointAlongRay\n * @glslFunction\n *\n * @param {czm_ray} ray The ray to compute the point along.\n * @param {float} time The time along the ray.\n * \n * @returns {vec3} The point along the ray at the given time.\n * \n * @example\n * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction\n * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)\n */\nfn czm_pointAlongRay(ray : czm_ray, time : f32) -> vec3<f32>\n{\n return ray.origin + (time * ray.direction);\n}\n",czm_rainMaterial="#ifdef HAS_WETNESS\nuniform float uWetnessFactor;\n#endif\n#ifdef HAS_RAIN\nuniform float uAnimationSpeed;\nuniform sampler2D uRippleTexture;\nuniform float uRippleScale;\nuniform float uWindIntensity;\nuniform float uRain;\nuniform float uCameraDepth;\nvoid getTimeInfo(float animationSpeed, out vec2 timeVec)\n{\n float time = czm_frameNumber * animationSpeed;\n time = floor(30.0 * time);\n float time_diff = floor(time*0.25);\n time = mod(time, 4.0);\n time_diff = mod(time_diff, 4.0);\n timeVec = vec2(time, time_diff);\n}\nvoid getPosInfo(vec4 posMC, out vec2 posMC_frac1, out vec2 posMC_frac2)\n{\n float ripple_scale = 1.0 / uRippleScale;\n vec2 posXY = posMC.xy * ripple_scale;\n posMC_frac1 = fract(posXY);\n vec2 posStep = vec2(0.5);\n posMC_frac2 = fract(posXY + posStep);\n}\nfloat getAlpha(vec2 posMC_frac1)\n{\n vec2 dist = (posMC_frac1 - vec2(0.5)) * 2.0;\n dist = vec2(abs(dist.x), abs(dist.y));\n vec2 result = pow(dist, vec2(5.0));\n return result.x + result.y;\n}\nvec4 getRippleValue(vec2 timeVec, vec2 posMC_frac1, vec2 posMC_frac2, float alpha)\n{\n vec2 rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n vec2 rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n vec4 rippleValue_1 = texture2D(uRippleTexture, rippleUV_1.xy);\n vec4 rippleValue_2 = texture2D(uRippleTexture, rippleUV_2.xy);\n return mix(rippleValue_1, rippleValue_2, alpha);\n}\nvec3 getRippleNormal(vec4 rippleValue, float wind_intensity, float rain, float depthFade)\n{\n vec2 rippleValueXY = rippleValue.xy;\n vec2 rippleValueZW = rippleValue.zw;\n const vec2 _value = vec2(0.5);\n vec2 part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n vec2 part_2 = (rippleValueXY - _value) * 0.6;\n vec2 mergedValue = mix(part_1, part_2, rain) * depthFade;\n return vec3(mergedValue, 1.0);\n}\nfloat getNormalAlpha(vec3 normalWS, float wetness)\n{\n float valueZ = normalWS.z - 0.5;\n float wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n return pow(wet_correction, 15.0);\n}\nvec3 rippleNormalCorrection(vec3 rippleNormal, float normalAlpha)\n{\n const vec3 blueNormal = vec3(0.0, 0.0, 1.0);\n return mix(blueNormal, rippleNormal, normalAlpha);\n}\nvec3 rippleGenerator(float animationSpeed, vec3 normalWS, float wetness)\n{\n vec2 timeVec = vec2(1.0);\n getTimeInfo(animationSpeed, timeVec);\n vec2 posMC_frac1 = vec2(1.0);\n vec2 posMC_frac2 = vec2(1.0);\n getPosInfo(vPositionMC, posMC_frac1, posMC_frac2);\n float alpha = getAlpha(posMC_frac1);\n vec4 rippleValue = getRippleValue(timeVec, posMC_frac1, posMC_frac2, alpha);\n vec3 rippleNormal = getRippleNormal(rippleValue, uWindIntensity, uRain, uCameraDepth);\n float normalAlpha = getNormalAlpha(normalWS, wetness);\n return normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\nvoid czm_getRainMaterialParam(inout vec3 normalEC, inout vec3 baseColor, inout float roughness){\n vec3 normalWS_wetness = vec3(0.0, 0.0, 1.0);\n#ifdef HAS_WETNESS\n mat3 fixedToENU_wetness = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n normalWS_wetness = normalize(fixedToENU_wetness * normalEC);\n#endif\n normalEC = rippleGenerator(uAnimationSpeed, normalWS_wetness, uWetnessFactor);\n#ifdef HAS_WETNESS\n float fWetness = clamp(uWetnessFactor,0.0,1.0);\n float fWetness_correction = pow(4.0 * fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction, clamp(fWetness,0.0,0.9),1.0);\n float fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n baseColor = mix(baseColor,baseColor * 0.7, fWerness_normalized);\n roughness = mix(roughness, 0.05, fWerness_normalized);\n#endif\n}\n#endif\n",czm_rasterCull="\n#ifdef RASTER_CULL\nvarying vec2 vRasterTexCoord;\nuniform float uDepth;\nuniform sampler2D uRasterTexture;\n\nvoid czm_rasterCull()\n{\n float colorByDepth = texture2D(uRasterTexture, vRasterTexCoord.xy).g;\n\tif((colorByDepth * 255.0 - uDepth) > 0.5)\n\t{\n \t\tdiscard;\n\t}\n}\n#endif\n",czm_rayEllipsoidIntersectionInterval="/**\n * DOC_TBA\n *\n * @name czm_rayEllipsoidIntersectionInterval\n * @glslFunction\n */\nfn czm_rayEllipsoidIntersectionInterval(ray : czm_ray, ellipsoid_center : vec3<f32>, ellipsoid_inverseRadii : vec3<f32>) -> czm_raySegment\n{\n // ray and ellipsoid center in eye coordinates. radii in model coordinates.\n var q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4<f32>(ray.origin, 1.0)).xyz;\n var w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4<f32>(ray.direction, 0.0)).xyz;\n\n q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4<f32>(ellipsoid_center, 1.0)).xyz;\n\n var q2 = dot(q, q);\n var qw = dot(q, w);\n\n if (q2 > 1.0) // Outside ellipsoid.\n {\n if (qw >= 0.0) // Looking outward or tangent (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else // qw < 0.0.\n {\n var qw2 = qw * qw;\n var difference = q2 - 1.0; // Positively valued.\n var w2 = dot(w, w);\n var product = w2 * difference;\n\n if (qw2 < product) // Imaginary roots (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else if (qw2 > product) // Distinct roots (2 intersections).\n {\n var discriminant = qw * qw - product;\n var temp = -qw + sqrt(discriminant); // Avoid cancellation.\n var root0 = temp / w2;\n var root1 = difference / temp;\n if (root0 < root1)\n {\n czm_raySegment i = czm_raySegment(root0, root1);\n return i;\n }\n else\n {\n czm_raySegment i = czm_raySegment(root1, root0);\n return i;\n }\n }\n else // qw2 == product. Repeated roots (2 intersections).\n {\n var root = sqrt(difference / w2);\n czm_raySegment i = czm_raySegment(root, root);\n return i;\n }\n }\n }\n else if (q2 < 1.0) // Inside ellipsoid (2 intersections).\n {\n var difference = q2 - 1.0; // Negatively valued.\n var w2 = dot(w, w);\n var product = w2 * difference; // Negatively valued.\n var discriminant = qw * qw - product;\n var temp = -qw + sqrt(discriminant); // Positively valued.\n czm_raySegment i = czm_raySegment(0.0, temp / w2);\n return i;\n }\n else // q2 == 1.0. On ellipsoid.\n {\n if (qw < 0.0) // Looking inward.\n {\n var w2 = dot(w, w);\n czm_raySegment i = czm_raySegment(0.0, -qw / w2);\n return i;\n }\n else // qw >= 0.0. Looking outward or tangent.\n {\n return czm_emptyRaySegment;\n }\n }\n}\n",czm_readDepth="float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\n return czm_reverseLogDepth(texture2D(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective="/**\n * Reads a value previously transformed with {@link czm_writeNonPerspective}\n * by dividing it by `w`, the value used in the perspective divide.\n * This function is intended to be called in a fragment shader to access a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The value should have been\n * previously written in the vertex shader with a call to\n * {@link czm_writeNonPerspective}.\n *\n * @name czm_readNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.\n * @param {float} oneOverW One over the perspective divide value, `w`. Usually this is simply `gl_FragCoord.w`.\n * @returns {float|vec2|vec3|vec4} The usable value.\n */\nfloat czm_readNonPerspective(float value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\n return value * oneOverW;\n}\n",czm_reverseLogDepth="fn czm_reverseLogDepth(logZ : f32) -> f32\n{\n#ifdef LOG_DEPTH\n var near = uniforms.czm_currentFrustum.x;\n var far = uniforms.czm_currentFrustum.y;\n var log2Depth = logZ * uniforms.czm_log2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#else\n return logZ;\n#endif\n}\n",czm_RGBToHSB="\nfn czm_RGBToHSB(rgb : vec3<f32>) -> vec3<f32>\n{\n var K_RGB2HSB = vec4<f32>(0.0, -0.33333, 0.66667, -1.0);\n var p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\n var q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\n var d = q.x - min(q.w, q.y);\n return vec3<f32>(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL="\nfn RGBtoHCV(rgb : vec3<f32>) -> vec3<f32>\n{\n // Based on work by Sam Hocevar and Emil Persson\n var p : vec4<f32>;\n if(rgb.g < rgb.b){\n p = vec4<f32>(rgb.bg, -1.0, 2.0 / 3.0);\n }\n else{\n p = vec4<f32>(rgb.gb, 0.0, -1.0 / 3.0);\n }\n var q : vec4<f32>;\n if(rgb.r < p.x){\n p = vec4(p.xyw, rgb.r);\n }\n else{\n p = vec4(rgb.r, p.yzx);\n }\n var c = q.x - min(q.w, q.y);\n var h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\n return vec3(h, c, q.x);\n}\n\nfn czm_RGBToHSL(rgb : vec3<f32>) -> vec3<f32>\n{\n var hcv = RGBtoHCV(rgb);\n var l = hcv.z - hcv.y * 0.5;\n var s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\n return vec3<f32>(hcv.x, s, l);\n}\n",czm_RGBToXYZ="\nfn czm_RGBToXYZ(rgb : vec3<f32>) -> vec3<f32>\n{\n const RGB2XYZ = mat3x3<f32>(0.4124, 0.2126, 0.0193,\n 0.3576, 0.7152, 0.1192,\n 0.1805, 0.0722, 0.9505);\n var xyz = RGB2XYZ * rgb;\n var Yxy;\n Yxy.r = xyz.g;\n var temp = dot(vec3<f32>(1.0), xyz);\n Yxy.gb = xyz.rg / temp;\n return Yxy;\n}\n",czm_RollerShutter="void czm_RollerShutter(vec2 coord, vec4 region)\n{\n vec2 f = step(region.xw, coord);\n vec2 s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n",czm_s3mBatchOperation="\nfn czm_s3mBatchOperation(inOperationType : vec4<f32>, color : vec4<f32>, selectedColor : vec4<f32>, translation : vec3<f32>,\n vertexColor : ptr<function, vec4<f32>>, vertexPos : ptr<function, vec4<f32>>, vIsFiltByID : ptr<function, vec4<f32>>, fSelected : ptr<function, f32>)\n{\n var operationType = inOperationType;\n operationType.x += 0.001f;\n var right_2 = operationType.x * 0.5f;\n var right_4 = right_2 * 0.5f;\n var right_8 = right_4 * 0.5f;\n var right_16 = right_8 * 0.5f;\n var isSetColor = fract(right_2);\n if(isSetColor > 0.1f)\n {\n var mixA = (*vertexColor).a * color.a;\n (*vertexColor) = vec4(color.rgb, mixA);\n }\n var isPicked = fract(floor(right_2)* 0.5f);\n if(isPicked > 0.1f)\n {\n (*fSelected) = 1.0f;\n #ifdef REPLACE_SELECT_TYPE\n (*vertexColor) = selectedColor;\n #else\n (*vertexColor) *= selectedColor;\n #endif\n }\n var isHide = fract(floor(right_4)* 0.5f);\n if(isHide > 0.1f)\n {\n (*vertexColor).a = 0.0f;\n }\n var isOffset = fract(floor(right_8)* 0.5f);\n if(isOffset > 0.1f)\n {\n (*vertexPos).x += translation.x;\n (*vertexPos).y += translation.y;\n (*vertexPos).z += translation.z;\n }\n var isClip = fract(floor(right_16) * 0.5f);\n if(isClip > 0.1f)\n {\n (*vIsFiltByID).x = 1.0f;\n }\n}\n",czm_s3mBatchOperationForSilhouette="\nfn czm_s3mBatchOperationForSilhouette(inOperationType : vec4<f32>, color : vec4<f32>, vertexColor : ptr<function, vec4<f32>>, vertexPos : ptr<function, vec4<f32>>, vIsFiltByID : ptr<function, vec4<f32>>, translation : vec3<f32>, fSelected : ptr<function, f32>)\n{\n var operationType = inOperationType;\n operationType.x += 0.001;\n var right_2 = operationType.x * 0.5f;\n var right_4 = right_2 * 0.5f;\n var right_8 = right_4 * 0.5f;\n var right_16 = right_8 * 0.5f;\n var isSetColor = fract(right_2);\n if(isSetColor > 0.1f)\n {\n (*vertexColor) *= color;\n }\n var isPicked = fract(floor(right_2)* 0.5f);\n if(isPicked > 0.1f)\n {\n (*fSelected) = 1.0f;\n }\n var isHide = fract(floor(right_4)* 0.5f);\n if(isHide > 0.1f)\n {\n (*vertexColor).a = 0.0f;\n }\n var isOffset = fract(floor(right_8)* 0.5f);\n if(isOffset > 0.1f)\n {\n (*vertexPos).x += translation.x;\n (*vertexPos).y += translation.y;\n (*vertexPos).z += translation.z;\n }\n var isClip = fract(floor(right_16) * 0.5f);\n if(isClip > 0.1f)\n {\n (*vIsFiltByID).x = 1.0f;\n }\n}\n",czm_s3mComputeVaryings="\n#ifdef IMAGERY\n attribute img : vec2<f32>;\n varying imgCoord : vec2<f32>;\n#endif\n\n#ifdef RASTER_CULL\nvarying vRasterTexCoord : vec2<f32>;\nuniform uRasterRactc : vec4<f32>;\n#endif\n\n#ifdef Volume\n attribute aRatio : vec3<f32>;\n varying vecRotioCoord : vec3<f32>;\n#endif\n\n#ifdef QUAD_OUTLINE\n varying vDistanceFromEye : f32;\n#endif\n\n#ifdef HYPSOMETRIC\n varying vecHypTexCoord : vec2<f32>;\n#endif\n\n#ifdef EXCAVATION\n varying vExcavationVertexPos : vec4<f32>;\n#endif\n\n#ifdef SQRESULT\n uniform uSQViewProj : mat4x4<f32>;\n varying vSQ_clip_pos : vec4<f32>;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n uniform uFloodMatrixInvert : mat4x4<f32>;\n varying vFloodPos : vec4<f32>;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n varying vLayerTexCoord : vec2<f32>;\n varying vModIndexAndTexIndex : vec2<f32>;\n#endif\n\n\nfn czm_s3mComputeVaryings(vertexPos : vec4<f32>)\n{\n#ifdef RASTER_CULL\n var rasterPos : vec2<f32> = (Mesh.uGeoMatrix * aPosition).xy;\n vRasterTexCoord.x = (rasterPos.x - uRasterRact.x)/(uRasterRact.z - uRasterRact.x);\n vRasterTexCoord.y = (rasterPos.y - uRasterRact.y)/(uRasterRact.w - uRasterRact.y);\n#endif\n\n#ifdef Volume\n vecRotioCoord = aRatio;\n#endif\n\n#ifdef EXCAVATION\n vExcavationVertexPos = Mesh.uGeoMatrix * vertexPos;\n#endif\n\n#ifdef HYPSOMETRIC\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var ptInRect = 1.0;\n vecHypTexCoord = calculatePolyTexCoord(Mesh.uGeoMatrix * vec4(vertexPos.xyz, 1.0), Layer.uHypRect, &ptInRect);\n }\n#endif\n\n#ifdef SQRESULT\n vSQ_clip_pos = uniforms.uSQViewProj * vec4<f32>(vertexPos.xyz, 1.0);\n#endif\n\n#ifdef IMAGERY\n imgCoord = img;\n#endif\n\n#ifdef QUAD_OUTLINE\n vDistanceFromEye = gl_Position.z;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n const right_8 : f32 = 65280.0;\n const right_16 : f32 = 16711680.0;\n var pickId = vSecondColor.r * 255.0 + vSecondColor.g * right_8 + vSecondColor.b * right_16;\n vModIndexAndTexIndex.x = (pickId - 10.0 * floor(pickId / 10.0)) * 0.1;\n vModIndexAndTexIndex.y = pickId - Layer.uEmissionTexAtlasCount * floor(pickId / Layer.uEmissionTexAtlasCount);\n var realVertexPos = Mesh.uGeoMatrix * vertexPos;\n vLayerTexCoord = (realVertexPos.xy - Layer.uLayerBounds.xy) / Layer.uLayerBounds.zw;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n vFloodPos = uniforms.uFloodMatrixInvert * vec4<f32>(vertexPos.xyz, 1.0);\n#endif\n}\n",czm_s3mImageryColor="\n#ifdef IMAGERY\nvarying vec2 imgCoord;\nuniform sampler2D uImgTexture;\nuniform float uImgTextureAlpha;\nuniform vec2 uImgTextureBound;\n\n//#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\nuniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n//#endif\n\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\n\n\nvoid czm_getImageryColor(inout vec4 color)\n{\n\tvec2 texcood = vec2(imgCoord.x / uImgTextureBound.x, imgCoord.y / uImgTextureBound.y);\n#ifdef MULTIBATCH\n\tcolor = computeDayColor(vec4(1.0,1.0,1.0,0.0), clamp(vec3(texcood,0.0), 0.0, 1.0));\n#else\n\tcolor = computeDayColor(color, clamp(vec3(texcood,0.0), 0.0, 1.0));\n#endif\n}\n#endif\n",czm_s3mOverlay="\n#ifdef OVERLAY\n uniform sampler2D uOverlayTexture;\n varying vec2 vecOverlayTexCoord;\n varying float hasOverlay;\n\tvoid czm_getOverlayColor(inout vec4 color)\n\t{\n\t\tif(hasOverlay > 0.5)\n\t\t{\n\t\t\tvec4 overlayColor = texture2D(uOverlayTexture, vecOverlayTexCoord.xy);\n\t\t\tif(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n\t\t\t{\n\t\t\t\tvec4 mixColor = mix(color, overlayColor, overlayColor.a);\n\t\t\t\tcolor = vec4(mixColor.r, mixColor.g, mixColor.b, color.a);\n\t\t\t}\n\t\t}\n\t}\n#endif\n",czm_S3MPBR=" uniform float u_metallicFactor;\n uniform float u_roughnessFactor;\n uniform vec4 u_emissiveFactor;\n uniform vec4 u_baseColorFactor;\n uniform float u_alphaCutoff;\n uniform sampler2D u_baseColorTexture;\n uniform sampler2D u_metallicRoughnessTexture;\n uniform sampler2D u_normalTexture;\n uniform sampler2D u_occlusionTexture;\n uniform sampler2D u_emissiveTexture;\n uniform vec4 u_baseColorUVOffsetAndTiling;\n uniform vec4 u_emissiveUVOffsetAndTiling;\n\n uniform float uSunLightON;\n #if DIR_LIGHTS > 0\n uniform vec3 uDirectionalLightDirectionEC[ DIR_LIGHTS ];\n uniform vec3 uDirectionalLightColor[ DIR_LIGHTS ];\n #endif\n #if POINT_LIGHTS > 0\n uniform vec3 uPointLightPositionEC[ POINT_LIGHTS ];\n uniform vec3 uPointLightColor[ POINT_LIGHTS ];\n uniform vec2 uPointLightDistanceAndDecay[ POINT_LIGHTS ];\n #endif\n #if SPOT_LIGHTS > 0\n uniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDirectionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDistanceDecayCos[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightExponent[ SPOT_LIGHTS ];\n #endif\n\n const float M_PI = 3.141592653589793;\n\n vec3 lambertianDiffuse(vec3 diffuseColor)\n {\n return diffuseColor / M_PI;\n }\n\n vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n {\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n }\n\n vec3 fresnelSchlick(float metalness, float VdotH)\n {\n return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n }\n\n vec3 F_Schlick(float ndv, vec3 spec)\n {\n return spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n }\n\n float D_Phong(float g, float ndh)\n {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n }\n\n float smithVisibilityG1(float NdotV, float roughness)\n {\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n }\n\n float smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n {\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n }\n\n float GGX(float roughness, float NdotH)\n {\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n }\n\n void getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm)\n {\n vec3 h = normalize(viewDir + lightDir);\n float NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\n float NdotH = clamp(dot(normal, h), 0.0, 1.0);\n vec3 li = lightColor * NdotL;\n diffuseTerm = li;\n specularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n }\n\n vec3 SRGBtoLINEAR3(vec3 srgbIn)\n {\n return pow(srgbIn, vec3(2.2));\n }\n\n vec4 SRGBtoLINEAR4(vec4 srgbIn)\n {\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n }\n\n vec3 LINEARtoSRGB(vec3 linearIn)\n {\n#ifndef HDR\n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n }\n\n float calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent)\n {\n return pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n }\n\n vec4 czm_S3MPBR(vec3 normalEC, vec3 positionEC, vec2 texCoord, vec4 vertexColor)\n {\n vec3 ng = normalize(normalEC);\n vec3 positionWC = (czm_inverseView * vec4(positionEC, 1.0)).xyz;\n#ifdef HAS_NORMAL_TEXTURE\n vec3 pos_dx = dFdx(positionEC);\n vec3 pos_dy = dFdy(positionEC);\n vec3 tex_dx = dFdx(vec3(texCoord, 0.0));\n vec3 tex_dy = dFdy(vec3(texCoord, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(u_normalTexture, texCoord).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n\n vec3 v = -normalize(positionEC);\n#ifdef DOUBLE_SIDED\n if (dot(n, v) < 0.0) {\n n = -n;\n }\n#endif\n\n // Add base color to fragment shader\n#ifdef HAS_BASECOLOR_TEXTURE\n vec2 baseColorTexCoord = texCoord;\n baseColorTexCoord = baseColorTexCoord * u_baseColorUVOffsetAndTiling.zw + u_baseColorUVOffsetAndTiling.xy;\n vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, baseColorTexCoord));\n baseColorWithAlpha *= u_baseColorFactor;\n#else\n vec4 baseColorWithAlpha = u_baseColorFactor;\n#endif\n baseColorWithAlpha *= vertexColor;\n vec3 baseColor = baseColorWithAlpha.rgb;\n#ifdef HAS_METALLICROUGHNESS_TEXTURE\n vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, texCoord).rgb;\n float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n metalness *= u_metallicFactor;\n roughness *= u_roughnessFactor;\n#else\n float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n#endif\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float NdotV = abs(dot(n, v)) + 0.001;\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n vec3 fresnelTerm = F_Schlick(NdotV, specularColor);\n vec3 color = vec3(0.0);\n // 默认加一个平行光作为太阳光\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(czm_sunDirectionEC, v, n, vec3(0.8), fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm * uSunLightON;\n specularTerm += lightSpecularTerm * uSunLightON;\n#if DIR_LIGHTS > 0 \n for (int i = 0; i < DIR_LIGHTS; i++) { \n getLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n } \n#endif \n#if POINT_LIGHTS > 0 \n for (int i = 0; i < POINT_LIGHTS; i++) {\n vec3 lVector = uPointLightPositionEC[i] - v_positionEC;\n float lightDistance = length(lVector);\n float lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\n if(lightAttenuation < 0.001) {\n continue;\n }\n vec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n }\n#endif \n#if SPOT_LIGHTS > 0 \n for (int i = 0; i < SPOT_LIGHTS; i++) {\n vec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\n float lightDistance = length(lVector);\n float lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCos[i].x, uSpotLightDistanceDecayCos[i].y);\n if(lightAttenuation < 0.001) {\n continue;\n }\n float spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\n if(spotEffect > uSpotLightDistanceDecayCos[i].z) {\n vec3 spotLightColor = uSpotLightColor[i] * lightAttenuation * spotEffect;\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n }\n }\n#endif \n color = baseColor; \n color *= max(diffuseTerm, vec3(0.0)); \n color += max(specularTerm, vec3(0.0)); \n // 计算环境光\n #ifdef USE_IBL_LIGHTING\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n // Figure out if the reflection vector hits the ellipsoid\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, 6378137.0 / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z.\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n\n vec2 iblFactor = vec2(1.0);\n float luminanceAtZenith = 0.5;\n // Luminance model from page 40 of http://silviojemma.com/public/papers/lighting/spherical-harmonic-lighting.pdf\n #ifdef USE_SUN_LUMINANCE\n // Angle between sun and zenith\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n // Angle between zenith and current pixel\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n // Angle between sun and current pixel\n float sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\n float gamma = acos(sunNdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = luminanceAtZenith * (numerator / denominator);\n#endif\n\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * iblFactor.y);\n#ifdef USE_SUN_LUMINANCE\n color += IBLColor * luminance;\n#else\n color += IBLColor;\n#endif // end of USE_SUN_LUMINANCE\n#endif // end of USE_IBL_LIGHTING\n\n#ifdef HAS_OCCLUSION_TEXTURE\n color *= texture2D(u_occlusionTexture, texCoord).r;\n#endif\n\n#ifdef HAS_EMISSIVE_TEXTURE\n vec2 emissiveTexCoord = texCoord;\n emissiveTexCoord = emissiveTexCoord * u_emissiveUVOffsetAndTiling.zw + u_emissiveUVOffsetAndTiling.xy;\n vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, emissiveTexCoord).rgb);\n emissive *= u_emissiveFactor.rgb;\n color += emissive;\n#else\n color += u_emissiveFactor.rgb;\n#endif\n color = LINEARtoSRGB(color);\n vec4 resultColor = vec4(color, 1.0);\n#ifdef MASK\n if (baseColorWithAlpha.a < u_alphaCutoff)\n {\n discard;\n }\n resultColor = vec4(color, 1.0);\n#endif\n#ifdef BLEND\n resultColor = vec4(color, baseColorWithAlpha.a);\n#endif\n return resultColor;\n }",czm_s3mVisibleDistance="#ifdef VISIBLEDISTANCEMAX\nuniform float uVisibleDistanceMax;\nvoid czm_s3mGetAlphaByDistance(vec3 positionEC, inout vec4 color)\n{\n if(length(positionEC) > uVisibleDistanceMax)\n {\n float minAlphl = min(1.0, (length(positionEC) - uVisibleDistanceMax) / 2000.0);\n color.a = 1.0 - minAlphl;\n }\n}\n#endif",czm_sampleOctahedralProjection="\nvar uSpecularEnvironmentMaps : texture_2d<f32>;\nvar uSpecularEnvironmentMapsSampler : sampler;\n\n/**\n * Samples the 4 neighboring pixels and return the weighted average.\n *\n * @private\n */\nfn czm_sampleOctahedralProjectionWithFiltering(textureSize : vec2<f32>, inDirection : vec3<f32>, lod : f32) -> vec3<f32> {\n var direction = inDirection / dot(vec3<f32>(1.0), abs(inDirection));\n var rev = abs(direction.zx) - vec2<f32>(1.0);\n var negX : f32;\n var negY : f32;\n if(direction.x < 0.0){\n negX = rev.x;\n }\n else\n {\n negX = -rev.x;\n }\n if(direction.z < 0.0) {\n negY = rev.y;\n }\n else {\n negY = -rev.y;\n }\n var neg = vec2<f32>(negX, negY);\n\n var uv : vec2<f32>;\n if(direction.y < 0.0){\n uv = neg;\n }\n else {\n uv = direction.xz;\n }\n\n var coord = 0.5 * uv + vec2<f32>(0.5);\n var pixel = 1.0 / textureSize;\n\n if (lod > 0.0)\n {\n // Each subseqeuent mip level is half the size\n var scale = 1.0 / pow(2.0, lod);\n var offset = ((textureSize.y + 1.0) / textureSize.x);\n\n coord.x = coord.x * offset;\n coord = coord * scale;\n\n coord.x = coord.x + offset + pixel.x;\n coord.y = coord.y + (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n }\n else\n {\n coord.x = coord.x * (textureSize.y / textureSize.x);\n }\n\n // Do bilinear filtering\n //#ifndef OES_texture_float_linear\n // var color1 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord + vec2<f32>(0.0, pixel.y)).rgb;\n // var color2 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord + vec2<f32>(pixel.x, 0.0)).rgb;\n // var color3 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord + pixel).rgb;\n // var color4 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord).rgb;\n\n // var texturePosition = coord * textureSize;\n\n // var fu = fract(texturePosition.x);\n // var fv = fract(texturePosition.y);\n\n // var average1 = mix(color4, color2, fu);\n // var average2 = mix(color1, color3, fu);\n\n // var color = mix(average1, average2, fv);\n // #else\n var color = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord).rgb;\n // #endif\n\n return color;\n}\n\n\n/**\n * Samples from a cube map that has been projected using an octahedral projection from the given direction.\n *\n * @name czm_sampleOctahedralProjection\n * @glslFunction\n *\n * @param {vec2} textureSize The width and height dimensions in pixels of the projected map.\n * @param {vec3} direction The normalized direction used to sample the cube map.\n * @param {float} lod The level of detail to sample.\n * @param {float} maxLod The maximum level of detail.\n * @returns {vec3} The color of the cube map at the direction.\n */\nfn czm_sampleOctahedralProjection(textureSize : vec2<f32>, direction : vec3<f32>, lod : f32, maxLod : f32) -> vec3<f32>{\n var currentLod = floor(lod);\n var nextLod = min(currentLod + 1.0, maxLod);\n\n var colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(textureSize, direction, currentLod);\n var colorNextLod = czm_sampleOctahedralProjectionWithFiltering(textureSize, direction, nextLod);\n\n return mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation="/**\n * Adjusts the saturation of a color.\n * \n * @name czm_saturation\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the saturation of the color.\n *\n * @returns {float} The color with the saturation adjusted.\n *\n * @example\n * vec3 greyScale = czm_saturation(color, 0.0);\n * vec3 doubleSaturation = czm_saturation(color, 2.0);\n */\nfn czm_saturation(rgb : vec3<f32>, adjustment : f32) -> vec3<f32>\n{\n // Algorithm from Chapter 16 of OpenGL Shading Language\n var W = vec3(0.2125, 0.7154, 0.0721);\n var intensity = vec3<f32>(dot(rgb, W));\n return mix(intensity, rgb, adjustment);\n}\n",czm_setAlphaByWWalue="\n#ifdef W_VISIBLE\n uniform sampler2D uCategorieTexture;\n uniform float uMaxCategory;\n uniform float uMinCategory;\n uniform float uCategoryWidht;\n\n czm_setAlphaByWValue(in float w, inout vec4 color)\n {\n vec2 categoryTexCoord = vec2(abs(w - uMinCategory) / uCategoryWidht + 0.5 /uCategoryWidht , 0.5);\n float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n color.a *= 1.0 - category;\n }\n#endif\n",czm_signNotZero="\nfn czm_signNotZero(value : f32) ->f32\n{\n if(value >= 0.0){\n return 1.0; \n }\n else\n {\n return -1.0;\n }\n}\n// wgsl不支持重载\n// fn czm_signNotZero_v2(value : vec2<f32>) -> vec2<f32>\n// {\n// return vec2<f32>(czm_signNotZero(value.x), czm_signNotZero(value.y));\n// }\n\n// fn czm_signNotZero_v3(value : vec3<f32>) -> vec3<f32>\n// {\n// return vec3<f32>(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n// }\n\n// fn czm_signNotZero_v4(value : vec4<f32>) -> vec4<f32>\n// {\n// return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n// }\n",czm_sketchMode="uniform sampler2D uNormalDepthTexture;\nuniform int uFillStyle;\nfloat edgeDetection(float lineWidth)\n{\n vec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\n vec2 off = lineWidth / czm_globeDepthTextureDim.xy;\n vec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\n val_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\n vec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\n val_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\n vec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\n val_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\n vec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\n val_se.xyz = (val_se.xyz * 2.0) - 1.0;\n float discontinuity = 0.0;\n float dot0 = dot(val_nw.xyz, val_se.xyz);\n float dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nvec4 czm_sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\n vec4 outputColor = inputColor;\n float discontinuity = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0, 1.0);\n if(uFillStyle == 1)\n {\n outputColor = lineColor;\n outputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\n outputColor.a *= lineColor.a;\n }\n else\n {\n vec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\n outputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n }\n return outputColor;\n}",czm_spatialQueryClip="#ifdef SQCLIP\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \nfloat computeDepth()\n{\n#ifdef LOG_DEPTH\n return log2(v_depthFromNearPlusOne) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\n return gl_FragCoord.z;\n#endif\n}\nbool isPointInSpatialQueryObject(vec2 texCoord)\n{\n bool bIn = false;\n vec4 colorInClipTexture = texture2D(uFrontColorTexture,texCoord.xy);\n if(colorInClipTexture.r > 0.99 && colorInClipTexture.g < 0.01 && colorInClipTexture.b < 0.01)\n {\n float depthNear = czm_unpackDepth(texture2D(uFrontDepthTexture, texCoord.xy)) - 0.00001;\n float depthFar = czm_unpackDepth(texture2D(uBackDepthTexture, texCoord.xy)) + 0.00001;\n float currentDepth = computeDepth();\n if(currentDepth > depthNear && currentDepth < depthFar){\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\nvoid czm_spatialQueryClip(){\n\tvec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\n if(!isPointInSpatialQueryObject(texCoord)) \n { \n discard; \n } \n}\n#endif\n}",czm_sphericalHarmonics="/**\n * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.\n * <p>\n * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].\n * </p>\n *\n * @name czm_sphericalHarmonics\n * @glslFunction\n *\n * @param {vec3} normal The normalized direction.\n * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.\n * @returns {vec3} The color at the direction.\n *\n * @see https://graphics.stanford.edu/papers/envmap/envmap.pdf\n */\nfn czm_sphericalHarmonics(normal : vec3<f32>, coefficients : array<vec3<f32>, 9>) -> vec3<f32>\n{\n const c1 = 0.429043;\n const c2 = 0.511664;\n const c3 = 0.743125;\n const c4 = 0.886227;\n const c5 = 0.247708;\n\n var L00 = coefficients[0];\n var L1_1 = coefficients[1];\n var L10 = coefficients[2];\n var L11 = coefficients[3];\n var L2_2 = coefficients[4];\n var L2_1 = coefficients[5];\n var L20 = coefficients[6];\n var L21 = coefficients[7];\n var L22 = coefficients[8];\n\n var x = normal.x;\n var y = normal.y;\n var z = normal.z;\n\n return c1 * L22 * (x * x - y * y) + c3 * L20 * z * z + c4 * L00 - c5 * L20 +\n 2.0 * c1 * (L2_2 * x * y + L21 * x * z + L2_1 * y * z) +\n 2.0 * c2 * (L11 * x + L1_1 * y + L10 * z);\n}\n",czm_splitClip="#ifdef APPLY_SPLIT\nuniform float uSplitDirection;\nuniform float uSplitPosition;\nvoid czm_splitClip(){\n if (uSplitDirection > 1.5)\n {\n if(gl_FragCoord.x > uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection > 0.5)\n {\n if(gl_FragCoord.x < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -1.5)\n {\n if(gl_FragCoord.y < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -0.5)\n {\n if(gl_FragCoord.y > uSplitPosition)\n {\n discard;\n }\n }\n}\n#endif\n}",czm_sRGBToLinear="vec3 czm_sRGBToLinear(vec3 srgbIn)\n{\nreturn pow(srgbIn, vec3(2.2));\n}\nvec4 czm_sRGBToLinear(vec4 srgbIn)\n{\nsrgbIn = srgbIn ;\nvec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\nreturn vec4(linearOut, srgbIn.a);\n}\n",czm_tangentToEyeSpaceMatrix="/**\n * Creates a matrix that transforms vectors from tangent space to eye space.\n *\n * @name czm_tangentToEyeSpaceMatrix\n * @glslFunction\n *\n * @param {vec3} normalEC The normal vector in eye coordinates.\n * @param {vec3} tangentEC The tangent vector in eye coordinates.\n * @param {vec3} bitangentEC The bitangent vector in eye coordinates.\n *\n * @returns {mat3} The matrix that transforms from tangent space to eye space.\n *\n * @example\n * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);\n * vec3 normal = tangentToEye * texture2D(normalMap, st).xyz;\n */\nmat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\n vec3 normal = normalize(normalEC);\n vec3 tangent = normalize(tangentEC);\n vec3 bitangent = normalize(bitangentEC);\n return mat3(tangent.x , tangent.y , tangent.z,\n bitangent.x, bitangent.y, bitangent.z,\n normal.x , normal.y , normal.z);\n}\n",czm_transformPlane="vec4 czm_transformPlane(vec4 clippingPlane, mat4 transform) {\n vec3 transformedDirection = normalize((transform * vec4(clippingPlane.xyz, 0.0)).xyz);\n vec3 transformedPosition = (transform * vec4(clippingPlane.xyz * -clippingPlane.w, 1.0)).xyz;\n vec4 transformedPlane;\n transformedPlane.xyz = transformedDirection;\n transformedPlane.w = -dot(transformedDirection, transformedPosition);\n return transformedPlane;\n}\n",czm_translateRelativeToEye="/**\n * Translates a position (or any <code>vec3</code>) that was encoded with {@link EncodedCartesian3},\n * and then provided to the shader as separate <code>high</code> and <code>low</code> bits to\n * be relative to the eye. As shown in the example, the position can then be transformed in eye\n * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},\n * respectively.\n * <p>\n * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as\n * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.\n * </p>\n *\n * @name czm_translateRelativeToEye\n * @glslFunction\n *\n * @param {vec3} high The position's high bits.\n * @param {vec3} low The position's low bits.\n * @returns {vec3} The position translated to be relative to the camera's position.\n *\n * @example\n * attribute vec3 positionHigh;\n * attribute vec3 positionLow;\n *\n * void main()\n * {\n * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n * }\n *\n * @see czm_modelViewRelativeToEye\n * @see czm_modelViewProjectionRelativeToEye\n * @see czm_computePosition\n * @see EncodedCartesian3\n */\nvec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\n vec3 highDifference = high - czm_encodedCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedCameraPositionMCLow;\n\n return vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong="/**\n * @private\n */\nvec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down and horizon views)\n float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\n\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n }\n\n diffuse = clamp(diffuse, 0.0, 1.0);\n\n float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_transparentColorClip="#ifdef TRANSPARENT_BACK_COLOR\nuniform vec4 uTransparentBackColor;\nuniform float uTransparentBackColorTolerance;\n\nczm_transparentColorClip(vec4 color)\n{\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - color.r);\n float gDiff = abs(uTransparentBackColor.g - color.g);\n float bDiff = abs(uTransparentBackColor.b - color.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n}\n#endif\n",czm_transpose="/**\n * Returns the transpose of the matrix. The input <code>matrix</code> can be\n * a <code>mat2</code>, <code>mat3</code>, or <code>mat4</code>.\n *\n * @name czm_transpose\n * @glslFunction\n *\n * @param {} matrix The matrix to transpose.\n *\n * @returns {} The transposed matrix.\n *\n * @example\n * // GLSL declarations\n * mat2 czm_transpose(mat2 matrix);\n * mat3 czm_transpose(mat3 matrix);\n * mat4 czm_transpose(mat4 matrix);\n *\n * // Transpose a 3x3 rotation matrix to find its inverse.\n * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(\n * positionMC, normalEC);\n * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);\n */\nmat2 czm_transpose(mat2 matrix)\n{\n return mat2(\n matrix[0][0], matrix[1][0],\n matrix[0][1], matrix[1][1]);\n}\n\nmat3 czm_transpose(mat3 matrix)\n{\n return mat3(\n matrix[0][0], matrix[1][0], matrix[2][0],\n matrix[0][1], matrix[1][1], matrix[2][1],\n matrix[0][2], matrix[1][2], matrix[2][2]);\n}\n\nmat4 czm_transpose(mat4 matrix)\n{\n return mat4(\n matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\n matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\n matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\n matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackDepth="\n fn czm_unpackDepth(packedDepth : vec4<f32>) -> f32\n {\n return dot(packedDepth, vec4<f32>(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n }\n",czm_unpackFloat="\n// #define SHIFT_RIGHT_8 0.00390625 //1.0 / 256.0\n// #define SHIFT_RIGHT_16 0.00001525878 //1.0 / 65536.0\n// #define SHIFT_RIGHT_24 5.960464477539063e-8//1.0 / 16777216.0\n// #define BIAS 38.0\n\nfn czm_unpackFloat(packedFloat : vec4<f32>) -> f32\n{\n packedFloat *= 255.0f;\n var temp = packedFloat.w / 2.0f;\n var exponent = floor(temp);\n var sign = (temp - exponent) * 2.0f;\n exponent = exponent - float(38.0f);\n sign = sign * 2.0f - 1.0f;\n sign = -sign;\n var unpacked = sign * packedFloat.x * 0.00390625f;\n unpacked += sign * packedFloat.y * 0.00001525878f;\n unpacked += sign * packedFloat.z * 5.960464477539063e-8f;\n return unpacked * pow(10.0f, exponent);\n}\n",czm_unpackValue="\n fn czm_unpackValue(packedValue : vec4<f32>) -> f32\n {\n const SHIFT_LEFT16 = 65536.0;\n\tconst SHIFT_LEFT8 = 256.0;\n\tvar value = packedValue * 255.0;\n\treturn value.r * SHIFT_LEFT16 + value.g * SHIFT_LEFT8 + value.b - 9000.0;\n }\n",czm_vertexLogDepth="\n#ifdef LOG_DEPTH\n varying v_depthFromNearPlusOne : f32;\n #ifdef SHADOW_MAP\n varying v_logPositionEC : vec3<f32>;\n #endif\n#endif\n\nfn czm_updatePositionDepth(inCoords : vec4<f32>) -> vec4<f32> {\n var coords = inCoords;\n#ifdef LOG_DEPTH\n #ifdef SHADOW_MAP\n var logPositionEC = (Scene.uInverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n #endif\n coords.z = clamp(coords.z / coords.w, -1.0f, 1.0f) * coords.w;\n#endif\n return coords;\n}\n\nfn czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0f - Scene.uCurrentFrustum.x + gl_Position.w;\n gl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\n\nfn czm_vertexLogDepth_v4f(clipCoords : vec4<f32>)\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0f - Scene.uCurrentFrustum.x + clipCoords.w;\n czm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates="/**\n * Transforms a position from window to eye coordinates.\n * The transform from window to normalized device coordinates is done using components\n * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating\n * the inverse of <code>czm_viewportTransformation</code>. The transformation from\n * normalized device coordinates to clip coordinates is done using <code>fragmentCoordinate.w</code>,\n * which is expected to be the scalar used in the perspective divide. The transformation\n * from clip to eye coordinates is done using {@link czm_inverseProjection}.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec4} fragmentCoordinate The position in window coordinates to transform.\n *\n * @returns {vec4} The transformed position in eye coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @example\n * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);\n */\nfn czm_windowToEyeCoordinates(fragmentCoordinate : vec4<f32>) -> vec4<f32>\n{\n // Reconstruct NDC coordinates\n var x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\n var y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\n var z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n var q = vec4<f32>(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= fragmentCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s\n {\n q = czm_inverseProjection * q;\n }\n else\n {\n var top = czm_frustumPlanes.x;\n var bottom = czm_frustumPlanes.y;\n var left = czm_frustumPlanes.z;\n var right = czm_frustumPlanes.w;\n\n var near = czm_currentFrustum.x;\n var far = czm_currentFrustum.y;\n\n q.x = (q.x * (right - left) + left + right) * 0.5;\n q.y = (q.y * (top - bottom) + bottom + top) * 0.5;\n q.z = (q.z * (near - far) - near - far) * 0.5;\n q.w = 1.0;\n }\n\n return q;\n}\n\n/**\n * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.\n * This function produces more accurate results for window positions with log depth than\n * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version\n * of czm_windowToEyeCoordinates.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.\n * @param {float} depthOrLogDepth A depth or log depth for the fragment.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @returns {vec4} The transformed position in eye coordinates.\n */\nfn czm_windowToEyeCoordinates(fragmentCoordinateXY : vec2<f32>, depthOrLogDepth : f32) -> vec4<f32>\n{\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#ifdef LOG_DEPTH\n var near = czm_currentFrustum.x;\n var far = czm_currentFrustum.y;\n var log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n var depthFromCamera = depthFromNear + near;\n var windowCoord = vec4<f32>(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n var eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n return eyeCoordinate;\n#else\n var windowCoord = vec4<f32>(fragmentCoordinateXY, depthOrLogDepth, 1.0);\n var eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n#endif\n return eyeCoordinate;\n}\n",czm_writeDepthClampedToFarPlane="// emulated noperspective\n#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\n/**\n * Clamps a vertex to the far plane by writing the fragments depth.\n * <p>\n * The shader must enable the GL_EXT_frag_depth extension.\n * </p>\n *\n * @name czm_writeDepthClampedToFarPlane\n * @glslFunction\n *\n * @example\n * gl_FragColor = color;\n * czm_writeDepthClampedToFarPlane();\n *\n * @see czm_depthClampFarPlane\n */\nvoid czm_writeDepthClampedToFarPlane()\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && !defined(LOG_DEPTH)\n gl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n",czm_writeLogDepth="#ifdef LOG_DEPTH\nvarying v_depthFromNearPlusOne : f32;\n\n#ifdef POLYGON_OFFSET\nuniform u_polygonOffset : vec2<f32>;\n#endif\n\n#endif\n\nfn czm_writeLogDepth(inDepth : f32)\n{\n var depth = inDepth;\n#ifdef LOG_DEPTH\n if (depth <= 0.9999999 || depth > Scene.uFarDepthFromNearPlusOne) {\n discard;\n }\n\n#ifdef POLYGON_OFFSET\n var factor = u_polygonOffset.x;\n var units = u_polygonOffset.y;\n var x = dpdx(depth);\n var y = dpdy(depth);\n var m = sqrt(x * x + y * y);\n depth += m * factor;\n\n#endif // POLYGON_OFFSET\n\n gl_FragDepth = log2(depth) * Scene.uOneOverLog2FarDepthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\n gl_FragDepth += 0.00000001 * units;\n#endif // POLYGON_OFFSET\n\n#endif // LOG_DEPTH\n}\n",czm_writeNonPerspective="/**\n * Transforms a value for non-perspective interpolation by multiplying\n * it by w, the value used in the perspective divide. This function is\n * intended to be called in a vertex shader to compute the value of a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The fragment shader\n * must call {@link czm_readNonPerspective} to retrieve the final\n * non-perspective value.\n *\n * @name czm_writeNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.\n * @param {float} w The perspective divide value. Usually this is the computed `gl_Position.w`.\n * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a `varying` and read in the\n * fragment shader with {@link czm_readNonPerspective}.\n */\nfloat czm_writeNonPerspective(float value, float w) {\n return value * w;\n}\n\nvec2 czm_writeNonPerspective(vec2 value, float w) {\n return value * w;\n}\n\nvec3 czm_writeNonPerspective(vec3 value, float w) {\n return value * w;\n}\n\nvec4 czm_writeNonPerspective(vec4 value, float w) {\n return value * w;\n}\n",czm_XYZToRGB="/**\n * Converts a CIE Yxy color to RGB.\n * <p>The conversion is described in\n * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n * </p>\n * \n * @name czm_XYZToRGB\n * @glslFunction\n * \n * @param {vec3} Yxy The color in CIE Yxy.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_XYZToRGB(vec3 Yxy)\n{\n const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n -1.5371, 1.8760, -0.2040,\n -0.4985, 0.0416, 1.0572);\n vec3 xyz;\n xyz.r = Yxy.r * Yxy.g / Yxy.b;\n xyz.g = Yxy.r;\n xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\n \n return XYZ2RGB * xyz;\n}\n",czm_getNormalMatrix="\nfn czm_getNormalMatrix(viewMatrix : mat4x4<f32>, modelMatrix : mat4x4<f32>) -> mat3x3<f32> {\n var modelView = viewMatrix * modelMatrix;\n let modelViewRow0 : vec4<f32> = modelView[0u];\n let modelViewRow1 : vec4<f32> = modelView[1u]; \n let modelViewRow2 : vec4<f32> = modelView[2u]; \n var normalMatrix = mat3x3<f32>(\n vec3<f32>(modelViewRow0.x, modelViewRow0.y, modelViewRow0.z), \n vec3<f32>(modelViewRow1.x, modelViewRow1.y, modelViewRow1.z), \n vec3<f32>(modelViewRow2.x, modelViewRow2.y, modelViewRow2.z));\n return normalMatrix;\n}",czm_sampleAndBlend="fn czm_sampleAndBlend(\ncurrentTextureColor : vec4<f32>,\npreviousColor : vec4<f32>,\ntileTextureCoordinates : vec2<f32>,\ntextureCoordinateRectangle : vec4<f32>,\ntransparentBackColor : vec4<f32>,\nimageryClipEnable : bool,\ntextureAlphaIn : f32,\ntextureBrightness : f32,\ntextureContrast : f32,\ntextureHue : f32,\ntextureSaturation : f32,\ntextureOneOverGamma : f32,\nsplit : vec2<f32>,\nswipe : vec4<f32>)\n-> vec4<f32> {\nvar alphaMultiplier : vec2<f32> = step(textureCoordinateRectangle.xy, tileTextureCoordinates);\nvar textureAlpha : f32 = textureAlphaIn * alphaMultiplier.x * alphaMultiplier.y;\nalphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.zw - tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nvar color : vec3<f32> = currentTextureColor.rgb;\nvar alpha : f32 = currentTextureColor.a;\nif(transparentBackColor.a > 0.01)\n{\nvar rDiff = abs(transparentBackColor.r - color.r);\nvar gDiff = abs(transparentBackColor.g - color.g);\nvar bDiff = abs(transparentBackColor.b - color.b);\nif(rDiff < transparentBackColor.a && gDiff < transparentBackColor.a && bDiff < transparentBackColor.a)\n{\nalpha = 0.0;\n}\n}\nif(imageryClipEnable)\n{\n#ifdef Apply_ImageryClip\nif(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n{\nalpha = 0.0;\n}\n#else\nalpha = 0.0;\n#endif\n}\n#if !defined(APPLY_GAMMA)\nvar tempColor : vec4<f32> = czm_gammaCorrect(vec4<f32>(color, alpha));\ncolor = tempColor.rgb;\nalpha = tempColor.a;\n#else\ncolor = pow(color, vec3<f32>(textureOneOverGamma));\n#endif\n#ifdef APPLY_SPLIT\nvar splitPosition : vec2<f32>= czm_imagerySplitPosition;\nif (split.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\nalpha = 0.0;\n}\nelse if (split.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\nalpha = 0.0;\n}\nif(split.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\nalpha = 0.0;\n}\nelse if(split.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_SWIPE\nif (gl_FragCoord.x < swipe.x || gl_FragCoord.y > swipe.y) {\nalpha = 0.0;\n}\nelse if (gl_FragCoord.x > swipe.z || gl_FragCoord.y < swipe.w) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_BRIGHTNESS\ncolor = mix(vec3(0.0), color, textureBrightness);\n#endif\n#ifdef APPLY_CONTRAST\ncolor = mix(vec3(0.5), color, textureContrast);\n#endif\n#ifdef APPLY_HUE\ncolor = czm_hue(color, textureHue);\n#endif\n#ifdef APPLY_SATURATION\ncolor = czm_saturation(color, textureSaturation);\n#endif\nvar sourceAlpha : f32 = alpha * textureAlpha;\nvar outAlpha : f32 = mix(previousColor.a, 1.0, sourceAlpha);\nvar outColor : vec3<f32> = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4<f32>(outColor, outAlpha);\n}\n// fn gridTextureSampleAndBlend(\n// vec4 previousColor,\n// sampler2D textureToSample,\n// vec2 tileTextureCoordinates,\n// vec4 textureCoordinateRectangle,\n// vec4 textureCoordinateTranslationAndScale)\n// -> vec4<f32> {\n// float textureAlpha = 1.0;\n// vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\n// textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n// alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\n// textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n// vec2 translation = textureCoordinateTranslationAndScale.xy;\n// vec2 scale = textureCoordinateTranslationAndScale.zw;\n// vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n// vec4 value = texture2D(textureToSample, textureCoordinates);\n// vec3 color = value.rgb;\n// float alpha = value.a;\n// float sourceAlpha = alpha * textureAlpha;\n// float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\n// vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\n// return vec4(outColor, outAlpha);\n// }\nfn computeTextureCoord(tileTextureCoordinates : vec2<f32>, textureCoordinateTranslationAndScale : vec4<f32>, textureSize : vec4<f32>, flipY : bool) ->vec2<f32>\n{\nvar translation : vec2<f32> = textureCoordinateTranslationAndScale.xy;\nvar scale : vec2<f32> = textureCoordinateTranslationAndScale.zw;\nvar textureCoordinates : vec2<f32> = tileTextureCoordinates * scale + translation;\nif(flipY)\n{\ntextureCoordinates.y = 1.0 - textureCoordinates.y;\n}\n// #ifdef WEBGPU\n// var texelSize : vec2<f32> = textureSize.zw;\n// textureCoordinates = clamp(textureCoordinates, texelSize, 1.0 - texelSize);\n// #endif\nreturn textureCoordinates;\n}\n",E$1a={czm_degreesPerRadian:czm_degreesPerRadian,czm_depthRange:czm_depthRange,czm_ellipsoidInverseRadii:czm_ellipsoidInverseRadii,czm_ellipsoidRadii:czm_ellipsoidRadii,czm_epsilon1:czm_epsilon1,czm_epsilon2:czm_epsilon2,czm_epsilon3:czm_epsilon3,czm_epsilon4:czm_epsilon4,czm_epsilon5:czm_epsilon5,czm_epsilon6:czm_epsilon6,czm_epsilon7:czm_epsilon7,czm_infinity:czm_infinity,czm_oneOverPi:czm_oneOverPi,czm_oneOverTwoPi:czm_oneOverTwoPi,czm_passCesium3DTile:czm_passCesium3DTile,czm_passCesium3DTileClassification:czm_passCesium3DTileClassification,czm_passCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow,czm_passClassification:czm_passClassification,czm_passCompute:czm_passCompute,czm_passEnvironment:czm_passEnvironment,czm_passGlobe:czm_passGlobe,czm_passGround:czm_passGround,czm_passOpaque:czm_passOpaque,czm_passOverlay:czm_passOverlay,czm_passTerrainClassification:czm_passTerrainClassification,czm_passTranslucent:czm_passTranslucent,czm_pi:czm_pi,czm_piOverFour:czm_piOverFour,czm_piOverSix:czm_piOverSix,czm_piOverThree:czm_piOverThree,czm_piOverTwo:czm_piOverTwo,czm_radiansPerDegree:czm_radiansPerDegree,czm_sceneMode2D:czm_sceneMode2D,czm_sceneMode3D:czm_sceneMode3D,czm_sceneModeColumbusView:czm_sceneModeColumbusView,czm_sceneModeMorphing:czm_sceneModeMorphing,czm_solarRadius:czm_solarRadius,czm_threePiOver2:czm_threePiOver2,czm_twoPi:czm_twoPi,czm_webMercatorMaxLatitude:czm_webMercatorMaxLatitude,czm_depthRangeStruct:czm_depthRangeStruct,czm_ellipsoid:czm_ellipsoid,czm_material:czm_material,czm_materialInput:czm_materialInput,czm_ray:czm_ray,czm_raySegment:czm_raySegment,czm_s3mMaterialInput:czm_s3mMaterialInput,czm_shadowParameters:czm_shadowParameters,czm_acesTonemapping:czm_acesTonemapping,czm_adjustColor:czm_adjustColor,czm_alphaWeight:czm_alphaWeight,czm_antialias:czm_antialias,czm_approximateSphericalCoordinates:czm_approximateSphericalCoordinates,czm_branchFreeTernary:czm_branchFreeTernary,czm_cascadeColor:czm_cascadeColor,czm_cascadeDistance:czm_cascadeDistance,czm_cascadeMatrix:czm_cascadeMatrix,czm_cascadeWeights:czm_cascadeWeights,czm_clip:czm_clip,czm_columbusViewMorph:czm_columbusViewMorph,czm_computeNormal:czm_computeNormal,czm_computePosition:czm_computePosition,czm_cosineAndSine:czm_cosineAndSine,czm_decompressTextureCoordinates:czm_decompressTextureCoordinates,czm_depthClampFarPlane:czm_depthClampFarPlane,czm_eastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates,czm_ellipsoidContainsPoint:czm_ellipsoidContainsPoint,czm_ellipsoidNew:czm_ellipsoidNew,czm_ellipsoidWgs84TextureCoordinates:czm_ellipsoidWgs84TextureCoordinates,czm_equalsEpsilon:czm_equalsEpsilon,czm_ExcavationFS:czm_ExcavationFS,czm_ExcavationVS:czm_ExcavationVS,czm_executeExcavation:czm_executeExcavation,czm_eyeOffset:czm_eyeOffset,czm_eyeToWindowCoordinates:czm_eyeToWindowCoordinates,czm_fastApproximateAtan:czm_fastApproximateAtan,czm_floodAnalysis:czm_floodAnalysis,czm_fog:czm_fog,czm_gammaCorrect:czm_gammaCorrect,czm_geodeticSurfaceNormal:czm_geodeticSurfaceNormal,czm_getDefaultMaterial:czm_getDefaultMaterial,czm_getEmissiveTextureColor:czm_getEmissiveTextureColor,czm_getFusionModePostiion:czm_getFusionModePostiion,czm_getHorizontalColor:czm_getHorizontalColor,czm_getHypsometricColor:czm_getHypsometricColor,czm_getLambertDiffuse:czm_getLambertDiffuse,czm_getPBRParamFromTexture:czm_getPBRParamFromTexture,czm_getSpecular:czm_getSpecular,czm_getVolumeValue:czm_getVolumeValue,czm_getWaterNoise:czm_getWaterNoise,czm_getWgs84EllipsoidEC:czm_getWgs84EllipsoidEC,czm_HSBToRGB:czm_HSBToRGB,czm_HSLToRGB:czm_HSLToRGB,czm_hue:czm_hue,czm_inverseGamma:czm_inverseGamma,czm_inverseMatrix:czm_inverseMatrix,czm_isEmpty:czm_isEmpty,czm_isFull:czm_isFull,czm_latitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction,czm_LineCallOutVp:czm_LineCallOutVp,czm_lineDistance:czm_lineDistance,czm_luminance:czm_luminance,czm_metersPerPixel:czm_metersPerPixel,czm_modelToWindowCoordinates:czm_modelToWindowCoordinates,czm_multiplyWithColorBalance:czm_multiplyWithColorBalance,czm_nearFarScalar:czm_nearFarScalar,czm_octDecode:czm_octDecode,czm_packDepth:czm_packDepth,czm_packValue:czm_packValue,czm_phong:czm_phong,czm_planeDistance:czm_planeDistance,czm_pointAlongRay:czm_pointAlongRay,czm_rainMaterial:czm_rainMaterial,czm_rasterCull:czm_rasterCull,czm_rayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval,czm_readDepth:czm_readDepth,czm_readNonPerspective:czm_readNonPerspective,czm_reverseLogDepth:czm_reverseLogDepth,czm_RGBToHSB:czm_RGBToHSB,czm_RGBToHSL:czm_RGBToHSL,czm_RGBToXYZ:czm_RGBToXYZ,czm_RollerShutter:czm_RollerShutter,czm_s3mBatchOperation:czm_s3mBatchOperation,czm_s3mBatchOperationForSilhouette:czm_s3mBatchOperationForSilhouette,czm_s3mComputeVaryings:czm_s3mComputeVaryings,czm_s3mImageryColor:czm_s3mImageryColor,czm_s3mOverlay:czm_s3mOverlay,czm_S3MPBR:czm_S3MPBR,czm_s3mVisibleDistance:czm_s3mVisibleDistance,czm_sampleOctahedralProjection:czm_sampleOctahedralProjection,czm_saturation:czm_saturation,czm_setAlphaByWWalue:czm_setAlphaByWWalue,czm_signNotZero:czm_signNotZero,czm_sketchMode:czm_sketchMode,czm_spatialQueryClip:czm_spatialQueryClip,czm_sphericalHarmonics:czm_sphericalHarmonics,czm_splitClip:czm_splitClip,czm_sRGBToLinear:czm_sRGBToLinear,czm_tangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix,czm_transformPlane:czm_transformPlane,czm_translateRelativeToEye:czm_translateRelativeToEye,czm_translucentPhong:czm_translucentPhong,czm_transparentColorClip:czm_transparentColorClip,czm_transpose:czm_transpose,czm_unpackDepth:czm_unpackDepth,czm_unpackFloat:czm_unpackFloat,czm_unpackValue:czm_unpackValue,czm_vertexLogDepth:czm_vertexLogDepth,czm_windowToEyeCoordinates:czm_windowToEyeCoordinates,czm_writeDepthClampedToFarPlane:czm_writeDepthClampedToFarPlane,czm_writeLogDepth:czm_writeLogDepth,czm_writeNonPerspective:czm_writeNonPerspective,czm_XYZToRGB:czm_XYZToRGB,czm_getNormalMatrix:czm_getNormalMatrix,czm_sampleAndBlend:czm_sampleAndBlend},o$1a="\n#ifdef HAS_RAIN\nuniform sampler2D uRippleTexture;\n \nvoid getTimeInfo(float animationSpeed, out vec2 timeVec)\n{\n\tfloat time = czm_frameNumber * animationSpeed;\n\ttime = floor(30.0 * time);\n\tfloat time_diff = floor(time*0.25);\n\ttime = mod(time, 4.0);\n\ttime_diff = mod(time_diff, 4.0);\n\ttimeVec = vec2(time, time_diff);\n}\n\nvoid getPosInfo(vec4 posMC, out vec2 posMC_frac1, out vec2 posMC_frac2)\n{\n\tfloat ripple_scale = 1.0 / uRippleScale;\n\tvec2 posXY = posMC.xy * ripple_scale;\n\tposMC_frac1 = fract(posXY);\n\tvec2 posStep = vec2(0.5);\n\tposMC_frac2 = fract(posXY + posStep);\n}\n\nfloat getAlpha(vec2 posMC_frac1)\n{\n\tvec2 dist = (posMC_frac1 - vec2(0.5)) * 2.0;\n\tdist = vec2(abs(dist.x), abs(dist.y));\n\tvec2 result = pow(dist, vec2(5.0));\n\treturn result.x + result.y;\n}\n\nvec4 getRippleValue(sampler2D uRippleTexture, vec2 timeVec, vec2 posMC_frac1, vec2 posMC_frac2, float alpha)\n{\n\tvec2 rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n\tvec2 rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n\tvec4 rippleValue_1 = texture2D(uRippleTexture, rippleUV_1.xy);\n\tvec4 rippleValue_2 = texture2D(uRippleTexture, rippleUV_2.xy);\n\treturn mix(rippleValue_1, rippleValue_2, alpha);\n}\n\nvec3 getRippleNormal(vec4 rippleValue, float wind_intensity, float rain, float depthFade)\n{\n\tvec2 rippleValueXY = rippleValue.xy;\n\tvec2 rippleValueZW = rippleValue.zw;\n\tconst vec2 _value = vec2(0.5);\n\tvec2 part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n\tvec2 part_2 = (rippleValueXY - _value) * 0.6;\n\tvec2 mergedValue = mix(part_1, part_2, rain) * depthFade;\n\treturn vec3(mergedValue, 1.0);\n}\n\nfloat getNormalAlpha(vec3 normalWS,float wetness)\n{\n\tfloat valueZ = normalWS.z - 0.5;\n\tfloat wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n\treturn pow(wet_correction, 15.0);\n}\n\nvec3 rippleNormalCorrection(vec3 rippleNormal,float normalAlpha)\n{\n\tconst vec3 blueNormal = vec3(0.0, 0.0, 1.0);\n\treturn mix(blueNormal, rippleNormal, normalAlpha);\n}\n\nvec3 rippleGenerator(sampler2D uRippleTexture, float animationSpeed,vec3 normalWS,float wetness)\n{\n\tvec2 timeVec = vec2(1.0);\n\tgetTimeInfo(animationSpeed, timeVec);\n\tvec2 posMC_frac1 = vec2(1.0);\n\tvec2 posMC_frac2 = vec2(1.0);\n\tgetPosInfo(vPositionMC, posMC_frac1, posMC_frac2);\n\tfloat alpha = getAlpha(posMC_frac1);\n\tvec4 rippleValue = getRippleValue(uRippleTexture, timeVec, posMC_frac1, posMC_frac2, alpha);\n\tvec3 rippleNormal = getRippleNormal(rippleValue, uWindIntensity, uRain, uCameraDepth);\n\tfloat normalAlpha = getNormalAlpha(normalWS, wetness);\n\treturn normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\n#endif\n",r$15="\n#ifdef HAS_SNOW\nuniform sampler2D uSnowMaskTexture;\nuniform sampler2D uSnowNormalTexture;\n\nvec3 getSnowMaskValue(sampler2D uSnowMaskTexture, vec2 snowUV)\n{\n\treturn texture2D(uSnowMaskTexture, snowUV).rgb;\n}\n\nfloat getSnowCoverage(float snow_coverage, float max_snow_coverage, vec3 normalWS, float z_mask)\n{\n\tfloat normal_z = normalWS.z;\n\tnormal_z += 1.1 + z_mask;\n\tnormal_z = clamp(normal_z * 0.5, 0.0, 1.0);\n\tfloat final_snow_coverage = clamp(snow_coverage, 0.0, max_snow_coverage);\n\tfinal_snow_coverage = clamp(final_snow_coverage*normal_z, 0.0, 1.0);\n\treturn final_snow_coverage;\n}\n\nfloat getSnowCoverageWithMaskTexture(float finalSnowCoverage, float heightValue, float snow_scatter_value, float snow_scatter_alpha, float tighten_value)\n{\n\tfloat scatter_value = mix(heightValue, snow_scatter_value, snow_scatter_alpha);\n\treturn clamp((tighten_value + 1.0) * finalSnowCoverage - tighten_value * scatter_value, 0.0, 1.0);\n}\n\nfloat getSnowAlpha(vec3 normalWS, float snow_coverage, float z_mask)\n{\n\treturn clamp((normalWS.z + z_mask) * 5.0, 0.0, 1.0) * snow_coverage;\n}\n\nvec3 getFinalBaseColor(vec3 baseColor, vec3 snow_baseColor, float snowAlpha)\n{\n\treturn mix(baseColor, snow_baseColor, snowAlpha);\n}\n\nfloat getFinalRoughness(float roughness, float snow_roughness, float snowAlpha)\n{\n\treturn mix(roughness, snow_roughness, snowAlpha);\n}\n\nvec3 getFinalNormal(vec3 normalWS, vec3 snowNormal, float blendNormalValue, float snow_coverage)\n{\n\tvec3 snowNormal_part2 = vec3(snowNormal.xy - vec2(0.5), 1.0);\n\tfloat normal_alpha = (1.0 - blendNormalValue)* snow_coverage;\n\treturn mix(normalWS, snowNormal_part2, normal_alpha);\n}\n\nvoid snowGenerator(sampler2D uSnowMaskTexture, sampler2D uSnowNormalTexture, vec2 snowUV, float snow_coverage, inout vec3 normalWS, inout vec3 baseColor, inout float roughness)\n{\n\tvec3 snowMaskValue = texture2D(uSnowMaskTexture, snowUV).rgb;\n\tconst float max_snow_coverage = 1.0;\n\tconst float z_mask = 0.0;\n\tfloat snowCoverage = getSnowCoverage(snow_coverage, max_snow_coverage, normalWS, z_mask);\n\tconst float heightValue = 0.5;\n\tfloat snow_scatter_value = snowMaskValue.g;\n\tconst float snow_scatter_alpha = 0.5;\n\tconst float tighten_value = 4.0;\n snowCoverage = getSnowCoverageWithMaskTexture(snowCoverage, heightValue, snow_scatter_value, snow_scatter_alpha, tighten_value);\n\tfloat snow_alpha = getSnowAlpha(normalWS, snowCoverage, z_mask);\n\tbaseColor = getFinalBaseColor(baseColor, vec3(snowMaskValue.r), snow_alpha);\n\troughness = getFinalRoughness(roughness, snowMaskValue.b, snow_alpha);\n\tvec3 snowNormalValue = texture2D(uSnowNormalTexture, snowUV).rgb;\n\tconst float blendNormalValue = 0.3;\n\tnormalWS = getFinalNormal(normalWS, snowNormalValue, blendNormalValue, snowCoverage);\n}\n\n#endif\n",e$1U="\n#ifdef HAS_HEMISPHERE_LIGHTS\n\nstruct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n};\n\nvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n float dotNL = dot( geometry.normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n}\n\n#endif\n",m$10="\n#ifdef HAS_POINT_LIGHTS\nstruct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n};\n\nvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = pointLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n directLight.color = pointLight.color;\n directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n directLight.visible = ( directLight.color != vec3( 0.0 ) );\n}\n\n#endif\n",t$Y="\n#ifdef HAS_SPOT_LIGHTS\n\nstruct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n};\n\nvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = spotLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n float angleCos = dot( directLight.direction, spotLight.direction );\n if ( angleCos > spotLight.coneCos ) {\n float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n directLight.color = spotLight.color;\n directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n directLight.visible = true;\n } else {\n directLight.color = vec3( 0.0 );\n directLight.visible = false;\n }\n}\n\n#endif\n",i$Z="\n#ifdef HAS_DIR_LIGHTS\n \n#endif\n",p$11="\n\n#ifdef HAS_DIR_LIGHTS\nfor (int i = 0; i < uDirLightCount; i++) {\n directLight.color = uDirectionalLightColor[i];\n directLight.direction = uDirectionalLightDirectionEC[i];\n directLight.visible = true;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n\n#ifdef HAS_POINT_LIGHTS\nPointLight pointLight;\nfor (int i = 0; i < uPointLightCount; i++) {\n pointLight.position = uPointLightPositionEC[i];\n pointLight.color = uPointLightColor[i];\n pointLight.distance = uPointLightDistanceAndDecay[i].x;\n pointLight.decay = uPointLightDistanceAndDecay[i].y;\n getPointDirectLightIrradiance( pointLight, geometry, directLight );\n if(!directLight.visible) continue;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n\n#ifdef HAS_SPOT_LIGHTS\nSpotLight spotLight;\nfor (int i = 0; i < uSpotLightCount; i++) {\n spotLight.position = uSpotLightPositionEC[i];\n spotLight.color = uSpotLightColorAndExponent[i].rgb;\n spotLight.direction = uSpotLightDirectionEC[i];\n spotLight.coneCos = uSpotLightDistanceDecayCosPenumbra[i].z;\n spotLight.penumbraCos = uSpotLightDistanceDecayCosPenumbra[i].w;\n getSpotDirectLightIrradiance( spotLight, geometry, directLight );\n if(!directLight.visible) continue;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n",l$16="\n#ifdef BRDF\n#define RECIPROCAL_PI 0.31830988618\n#define M_PI 3.141592653589793\n#define EPSILON 1e-6\nfloat pow2( const in float x ) { return x * x; }\n\n#ifdef HAS_BASE_TEXTURE\n uniform sampler2D uBaseTexture;\n#endif\n\n#ifdef HAS_NORMAL_TEXTURE\n uniform sampler2D uNormalTexture;\n#endif\n\n#ifdef HAS_EMISSIVE_TEXTURE\n uniform sampler2D uEmissionTexture;\n#endif\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n uniform sampler2D uMetallicRoughnessTexture;\n#endif\n\n#ifdef HAS_OCCLUSION_TEXTURE\n uniform sampler2D uOcclusionTexture;\n#endif\n\n#ifdef USE_BatchPBR\n varying vec2 vMetallicRoughness;\n varying vec4 vEmissiveFactor;\n varying vec3 vAlphaCutoffAndModeAndDoubleSide;\n#endif\n\n#include <directionLightDecl>\n#include <pointLightDecl>\n#include <spotLightDecl>\n#include <snowDecl>\n#include <rainDecl>\n\nvec3 sRGBToLinear(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\nvec4 sRGBToLinear(vec4 srgbIn)\n{\n srgbIn = srgbIn ;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\nvec3 LinearTosRGB(vec3 linearIn) \n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else \n return linearIn;\n#endif \n}\n\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor * RECIPROCAL_PI;\n}\n\nvec3 applyTonemapping(vec3 linearIn) \n{\n vec3 color = linearIn * uToneMappingExposure;\n return czm_acesTonemapping(color);\n}\n\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\n\nfloat GeometrySchlickGGX(float roughness, float NoV)\n{\n float k = pow(roughness + 1.0, 2.0) / 8.0;\n return NoV / (NoV * (1.0 - k) + k);\n}\n\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n float alpha = roughness * roughness;\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = clamp( dot( normal, lightDir ), 0.001, 1.0 );\n float dotNV = abs( dot( normal, viewDir ) ) + 0.001;\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotLH = saturate( dot( lightDir, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n float D = D_GGX( alpha, dotNH );\n return F * ( G * D ) / (4.0 * dotNL * dotNV);\n}\n\nvoid directPhysical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n reflectedLight.directDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n}\n\n#ifdef HAS_NORMAL_TEXTURE\nvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv, vec3 mapN) {\n float fNormalLength = length(mapN);\n vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n if(fNormalLength < 0.5) {\n return surf_norm;\n }\n mapN = mapN * 2.0 - 1.0;\n float scale = sign( st1.t * st0.s - st0.t * st1.s );\n vec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n vec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n vec3 N = normalize( surf_norm );\n mat3 tsn = mat3( S, T, N );\n mapN.xy *= uNormalTextureScale;\n mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n return normalize( tsn * mapN );\n}\n#endif\n\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n\n#ifdef HAS_RAIN\nvoid adjustByWetness(inout vec3 baseColor, inout float roughness, vec3 normalWS_wetness) {\n float fWetness = clamp(uWetnessFactor,0.0,1.0);\n float fWetness_correction = pow(4.0*fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction,clamp(fWetness,0.0,0.9),1.0);\n float fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n baseColor = mix(baseColor,baseColor*0.7,fWerness_normalized);\n roughness = mix(roughness,0.05,fWerness_normalized);\n}\n#endif\n\nfloat getRoughness(vec2 oriTexCoord){\n float roughness = uMetallicRoughnessIntensityScale.y;\n#ifdef PBR_THEME\n int pbrIndex = int(vPBRIndex);\n if(vPBRIndex < 0.0)\n {\n return 1.0;\n }\n mat4 pbrPar = mat4(0.0);\n for(int i = 0;i < NUM_PBR_MATERIALS;i++)\n {\n if(i == pbrIndex)\n {\n pbrPar = uPBRMaterials[i];\n break;\n }\n }\n roughness = clamp(pbrPar[0][0], 0.04, 1.0);\n#endif\n#ifdef USE_BatchPBR\n roughness = vMetallicRoughness.y;\n#endif\n roughness = clamp(roughness, 0.0, 1.0);\n \n#ifdef HAS_MetallicRoughness_TEXTURE\n vec3 metallicRoughness = texture2D(uMetallicRoughnessTexture, oriTexCoord).rgb;\n roughness = clamp(roughness * metallicRoughness.g, 0.04, 1.0);\n#ifdef HAS_RAIN\n adjustByWetness(vec3(1.0), roughness, vec3(0.0));\n#endif\n#endif\n return roughness;\n}\n\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\nvec3 getTexcoordAndMipmapLevel(vec2 uv, vec4 texMatrix, float texCoordZ) {\n vec2 translate = texMatrix.xy;\n float textureWidth = texMatrix.z * uPbrParTextureWidth;\n float scale = texMatrix.z;\n float maxMipmapLevel = texMatrix.w;\n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, vec2(textureWidth), maxMipmapLevel, mipLevel);\n #endif\n vec2 texCoord;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n float offset = pow(2.0, mipLevel) / textureWidth;\n texCoord = clamp(texCoord, offset, 1.0 - offset);\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n return vec3(texCoord.xy, mipLevel);\n}\n#endif\n\nvec4 brdf(in vec4 baseColorWithAlpha, vec2 texCoord, vec2 oriTexCoord, vec3 posEC, vec3 posMC, vec3 vertexNormalEC, mat4 modelMatrix) {\n vec2 uv = oriTexCoord;\n float mipmapLevel = 0.0;\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\n vec3 uvAndMiplevel = getTexcoordAndMipmapLevel(oriTexCoord, vTexMatrix, vTexCoordZ.x);\n uv = uvAndMiplevel.xy;\n mipmapLevel = uvAndMiplevel.z;\n#endif\n#ifndef USE_BatchPBR\n baseColorWithAlpha = baseColorWithAlpha * uBaseColorFactor;\n#endif\n#ifdef BaseColorReplace\n baseColorWithAlpha = uBaseColorFactor;\n#endif\n float faceDirection = (gl_FrontFacing ? 1.0 : - 1.0) * uCameraReflect;\n mat3 normalMatrix = getNormalMatrix(uView, modelMatrix);\n vec3 ng = normalize(vertexNormalEC);\n #ifndef HAS_NORMAL\n ng = normalize(normalMatrix * czm_computeNormal(posMC.xyz));\n #endif\n ng = ng * faceDirection;\n#ifdef HAS_BASE_TEXTURE\n #ifdef USE_BatchPBR\n baseColorWithAlpha *= sRGBToLinear(texture2DLodEXT(uBaseTexture, uv * uTexUVOffset.zw + uTexUVOffset.xy, mipmapLevel));\n #else\n baseColorWithAlpha = sRGBToLinear(texture2D(uBaseTexture, oriTexCoord * uTexUVOffset.zw + uTexUVOffset.xy)) * uBaseColorFactor;\n #endif\n#endif\n#ifdef HAS_NORMAL_TEXTURE\n #ifdef USE_BatchPBR\n vec3 mapN = texture2DLodEXT( uNormalTexture, uv, mipmapLevel).xyz;\n #else\n vec3 mapN = texture2D( uNormalTexture, uv).xyz;\n #endif\n // 切线空间计算纹理坐标需采用原始纹理坐标,边界未做偏移\n vec3 n = ng;\n vec3 oriNg = perturbNormal2Arb(posEC, ng, oriTexCoord, mapN);\n if(!(oriTexCoord.x == 0.0 && oriTexCoord.y == 0.0)){\n n = oriNg;\n }\n#else\n vec3 n = ng;\n#endif\n#ifdef HAS_RAIN\n mat3 fixedToENU_wetness = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n vec3 normalWS_wetness = normalize(fixedToENU_wetness * n);\n n = rippleGenerator(uRippleTexture,uAnimationSpeed,normalWS_wetness,uWetnessFactor);\n#endif\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = uMetallicRoughnessIntensityScale.y;\n float metalness = uMetallicRoughnessIntensityScale.x;\n vec4 emissiveFactor = uEmissiveFactor;\n#ifdef PBR_THEME\n int pbrIndex = int(vPBRIndex);\n if(vPBRIndex < 0.0)\n {\n return baseColorWithAlpha;\n }\n mat4 pbrPar = mat4(0.0);\n for(int i = 0;i < NUM_PBR_MATERIALS;i++)\n {\n if(i == pbrIndex)\n {\n pbrPar = uPBRMaterials[i];\n break;\n }\n }\n roughness = clamp(pbrPar[0][0], 0.04, 1.0);\n metalness = clamp(pbrPar[0][1], 0.0, 1.0);\n baseColor = (baseColorWithAlpha / uBaseColorFactor * vec4(pbrPar[0][2], pbrPar[0][3], pbrPar[1][0], pbrPar[1][1])).rgb;\n#endif\n#ifdef USE_BatchPBR\n metalness = vMetallicRoughness.x;\n roughness = vMetallicRoughness.y;\n emissiveFactor = vEmissiveFactor;\n#endif\n metalness = clamp(metalness, 0.0, 1.0);\n roughness = clamp(roughness, 0.04, 1.0);\n \n#ifdef HAS_MetallicRoughness_TEXTURE\n #ifdef USE_BatchPBR\n vec3 metallicRoughness = texture2DLodEXT(uMetallicRoughnessTexture, uv, mipmapLevel).rgb;\n #else\n vec3 metallicRoughness = texture2D(uMetallicRoughnessTexture, oriTexCoord).rgb;\n #endif\n metalness = clamp(metalness * metallicRoughness.r, 0.0, 1.0);\n roughness = clamp(roughness * metallicRoughness.g, 0.04, 1.0);\n#ifdef HAS_RAIN\n adjustByWetness(baseColor, roughness, normalWS_wetness);\n#endif\n#ifdef HAS_SNOW\n mat3 fixedToENU_snow = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n vec3 normalWS_snow = normalize(fixedToENU_snow * n);\n snowGenerator(uSnowMaskTexture,uSnowNormalTexture, oriTexCoord,uSnowCoverageFactor,normalWS_snow,baseColor,roughness);\n#endif\n#endif\n\n vec3 lightColorHdr = vec3(2.0) * uSunLightColor.rgb * uSunLightON;\n vec3 l = normalize(uSunDirectionEC);\n vec3 v = -normalize(posEC);\n vec3 h = normalize(v + l);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n \n float alpha = roughness * roughness;\n float dotNL = clamp( dot( n, l ), 0.001, 1.0 );\n float dotNV = abs( dot( n, v ) ) + 0.001;\n float dotNH = saturate( dot( n, h ) );\n float dotLH = saturate( dot( l, h ) );\n float dotVH = saturate( dot( v, h ) );\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n float f90 = clamp(reflectance * 25.0, 0.0, 1.0);\n vec3 F = F_Schlick( specularColor, f90, dotVH );\n float G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n float D = D_GGX( alpha, dotNH );\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * dotNL * dotNV);\n\n PhysicalMaterial material;\n material.diffuseColor = diffuseColor;\n material.roughness = max( roughness, 0.0525 );\n material.roughness = min( material.roughness, 1.0 );\n material.specularColor = specularColor;\n material.specularF90 = 1.0;\n \n GeometricContext geometry;\n geometry.position = posEC;\n geometry.normal = n;\n geometry.viewDir = v;\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += dotNL * lightColorHdr * diffuseContribution;\n reflectedLight.directSpecular += dotNL * lightColorHdr * specularContribution;\n \n IncidentLight directLight; \n #include <lightSourceImpl>\n \n getEnvironmentColor(geometry, material, reflectedLight);\n\n#ifdef HAS_OCCLUSION_TEXTURE\n #ifdef USE_BatchPBR\n float ambientOcclusion = texture2DLodEXT(uOcclusionTexture, uv, mipmapLevel).r;\n #else\n float ambientOcclusion = texture2D(uOcclusionTexture, oriTexCoord.xy).r;\n #endif\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n#ifdef IBL\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n#endif\n#endif\n\n float shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), n, -posEC.z);\n#endif\n\nvec3 color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n\n#ifdef HAS_EMISSIVE_TEXTURE\n vec2 emissiveTexCoord = uv * uEmissiveUVOffsetAndTiling.zw + uEmissiveUVOffsetAndTiling.xy;\n #ifdef USE_BatchPBR\n vec3 emissive = texture2DLodEXT(uEmissionTexture, emissiveTexCoord, mipmapLevel).rgb;\n #else\n vec3 emissive = texture2D(uEmissionTexture, emissiveTexCoord).rgb;\n #endif\n emissive *= emissiveFactor.rgb;\n color += emissive;\n#else\n color += emissiveFactor.rgb;\n#endif\n\n color = applyTonemapping(color);\n color = LinearTosRGB(color);\n#ifdef MASK\n if (baseColorWithAlpha.a < uAlphaCutoff)\n {\n discard;\n }\n return vec4(color.rgb, 1.0);\n#endif\n return vec4(color.rgb, baseColorWithAlpha.a);\n}\n#endif\n",f$_="\n#ifdef SERVEREXCAVATION\nuniform sampler2D uServerExcavationTexture;\nvarying vec4 vServerExcavationVertexPos;\nvec2 CalculateServerExcavationPolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect)\n{\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\nbool executeServerExcavation()\n{\n float hasExcavation = 1.0;\n vec2 vecExcavationTexCoord = CalculateServerExcavationPolyTexCoord(vServerExcavationVertexPos, uServerExcavationRect, hasExcavation);\n bool excavationInside = (uServerExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n if(excavationInside)\n {\n return texture2D(uServerExcavationTexture, vecExcavationTexCoord.xy).r > 0.5;\n }\n else\n {\n return texture2D(uServerExcavationTexture, vecExcavationTexCoord.xy).r < 0.5;\n }\n}\n#endif",c$14="\n\t#define CUBEUV_MAX_MIP 8.0\n\t#define CUBEUV_TEXEL_WIDTH 0.0013020833333333333\n\t#define CUBEUV_TEXEL_HEIGHT 0.0009765625\n #define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\n\t// These shader functions convert between the UV coordinates of a single face of\n\t// a cubemap, the 0-5 integer index of a cube face, and the direction vector for\n\t// sampling a textureCube (not generally normalized ).\n\n\tfloat getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\n\t// RH coordinate system; PMREM face-indexing convention\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t}\n\n\t// These defines must match with PMREMGenerator\n\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\n\tfloat roughnessToMip( float roughness ) {\n\n\t\tfloat mip = 0.0;\n\n\t\tif ( roughness >= cubeUV_r1 ) {\n\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\n\t\t} else {\n\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25\n\t\t}\n\n\t\treturn mip;\n\n\t}\n\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\n\t\tfloat mipF = fract( mip );\n\n\t\tfloat mipInt = floor( mip );\n\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\n\t\tif ( mipF == 0.0 ) {\n\n\t\t\treturn vec4( color0, 1.0 );\n\n\t\t} else {\n\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\n\t\t}\n\n\t}\n",a$X="\n#ifdef USE_CUBE_MAP_SHADOW\n uniform samplerCube shadowMap_textureCube;\n#else\n uniform sampler2D shadowMap_texture;\n #ifdef USE_PCSS\n uniform highp sampler2DShadow u_shadowDepth;\n #endif\n#endif\n\n#include <shadowVisibility>\n\n\nvec4 cascadeWeights(float depthEye)\n{\n // One component is set to 1.0 and all others set to 0.0.\n vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\n vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}\n\n// Offset the shadow position in the direction of the normal for perpendicular and back faces\nvoid applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL)\n{\n#ifdef APPLY_NORMAL_OFFSET\n float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;\n float normalOffsetScale = 1.0 - nDotL;\n vec3 offset = normalOffset * normalOffsetScale * normalEC;\n positionEC.xyz += offset;\n#endif // APPLY_NORMAL_OFFSET\n}\n\nfloat getShadowVisibility(vec4 positionEC, vec3 normalEC, float depth){\n czm_shadowParameters shadowParameters;\n shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\n shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\n shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\n shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\n shadowParameters.uvRange = vec4(0.0, 1.0, 0.0, 1.0);\n\n float visibility = 1.0;\n\n #ifdef IS_TERRAIN\n // Scale depth bias based on view distance to reduce z-fighting in distant terrain\n shadowParameters.depthBias *= max(depth * 0.01, 1.0);\n #endif // IS_TERRAIN\n\n shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);\n \n #ifdef USE_CUBE_MAP_SHADOW // POINT_LIGHT\n vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz;\n float distance = length(directionEC);\n directionEC = normalize(directionEC);\n float radius = shadowMap_lightPositionEC.w;\n // Stop early if the fragment is beyond the point light radius\n if (distance > radius)\n {\n return visibility;\n }\n vec3 directionWC = czm_inverseViewRotation * directionEC;\n \n shadowParameters.depth = distance / radius;\n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n \n shadowParameters.texCoords = directionWC;\n visibility = shadowVisibility(shadowMap_textureCube, shadowParameters);\n #endif // USE_CUBE_MAP_SHADOW\n \n #ifdef SPOT_LIGHT_SHADOW\n vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);\n float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n applyNormalOffset(positionEC, normalEC, nDotL);\n vec4 shadowPosition = shadowMap_matrix * positionEC;\n // Spot light uses a perspective projection, so perform the perspective divide\n shadowPosition /= shadowPosition.w;\n \n // Stop early if the fragment is not in the shadow bounds\n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n {\n return visibility;\n }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n \n visibility = shadowVisibility(shadowMap_texture, shadowParameters);\n #endif // SPOT_LIGHT_SHADOW\n \n #ifdef HAS_CASCADES\n float maxDepth = shadowMap_cascadeSplits[1].w;\n // Stop early if the eye depth exceeds the last cascade\n if (depth > maxDepth)\n {\n return visibility;\n }\n \n // Get the cascade based on the eye-space depth\n vec4 weights = cascadeWeights(depth);\n \n // Apply normal offset\n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(positionEC, normalEC, nDotL);\n \n // Transform position into the cascade\n //vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;\n\n mat4 cascadeMatrix;\n mat4 nextCascadeMatrix;\n bool csmBlend = false;\n float diffRatio = 0.0;\n float shadowMapIndex = 0.0;\n if(weights.x > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[0];\n nextCascadeMatrix = shadowMap_cascadeMatrices[1];\n csmBlend = weights.y > 0.0;\n diffRatio = (depth - shadowMap_cascadeSplits[0].y) / (shadowMap_cascadeSplits[1].x - shadowMap_cascadeSplits[0].y);\n shadowMapIndex = 0.0;\n }\n else if(weights.y > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[1];\n nextCascadeMatrix = shadowMap_cascadeMatrices[2];\n csmBlend = weights.z > 0.0;\n diffRatio = (depth - shadowMap_cascadeSplits[0].z) / (shadowMap_cascadeSplits[1].y - shadowMap_cascadeSplits[0].z);\n shadowMapIndex = 1.0;\n }\n else if(weights.z > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[2];\n nextCascadeMatrix = shadowMap_cascadeMatrices[3];\n csmBlend = weights.w > 0.0;\n diffRatio = (depth - shadowMap_cascadeSplits[0].w) / (shadowMap_cascadeSplits[1].z - shadowMap_cascadeSplits[0].w);\n shadowMapIndex = 2.0;\n }\n else if(weights.w > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[3];\n shadowMapIndex = 3.0;\n }\n vec4 shadowPosition = cascadeMatrix * positionEC;\n \n // Get visibility\n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n shadowParameters.shadowMapIndex = shadowMapIndex;\n visibility = shadowVisibility(shadowMap_texture, shadowParameters);\n\n if(csmBlend){\n vec4 nextShadowPosition = nextCascadeMatrix * positionEC;\n shadowParameters.texCoords = nextShadowPosition.xy;\n shadowParameters.depth = nextShadowPosition.z;\n shadowParameters.shadowMapIndex = shadowMapIndex + 1.0;\n float nextVisibility = shadowVisibility(shadowMap_texture, shadowParameters);\n visibility = mix(visibility, nextVisibility, diffRatio);\n // Draw cascade blend colors for debugging\n //gl_FragColor *= vec4(diffRatio, 0.0, 0.0, 1.0);\n }\n \n // Fade out shadows that are far away\n float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;\n float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);\n visibility = mix(visibility, 1.0, fade);\n \n visibility = clamp(visibility, 0.0, 1.0);\n //// Draw cascade colors for debugging\n //gl_FragColor *= czm_cascadeColor(weights);\n #endif // HAS_CASCADES\n \n #ifdef NO_CASCADES\n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(positionEC, normalEC, nDotL);\n vec4 shadowPosition = shadowMap_matrix * positionEC;\n \n // Stop early if the fragment is not in the shadow bounds\n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n {\n return visibility;\n }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n visibility = shadowVisibility(shadowMap_texture, shadowParameters);\n #endif // NO_CASCADES\n\n return visibility;\n}\n",n$10="\n#ifdef USE_PCSS\nconst vec3 PoissonSamplers32[64] = vec3[64](\n vec3(0.06407013, 0.05409927, 0.),\n vec3(0.7366577, 0.5789394, 0.),\n vec3(-0.6270542, -0.5320278, 0.),\n vec3(-0.4096107, 0.8411095, 0.),\n vec3(0.6849564, -0.4990818, 0.),\n vec3(-0.874181, -0.04579735, 0.),\n vec3(0.9989998, 0.0009880066, 0.),\n vec3(-0.004920578, -0.9151649, 0.),\n vec3(0.1805763, 0.9747483, 0.),\n vec3(-0.2138451, 0.2635818, 0.),\n vec3(0.109845, 0.3884785, 0.),\n vec3(0.06876755, -0.3581074, 0.),\n vec3(0.374073, -0.7661266, 0.),\n vec3(0.3079132, -0.1216763, 0.),\n vec3(-0.3794335, -0.8271583, 0.),\n vec3(-0.203878, -0.07715034, 0.),\n vec3(0.5912697, 0.1469799, 0.),\n vec3(-0.88069, 0.3031784, 0.),\n vec3(0.5040108, 0.8283722, 0.),\n vec3(-0.5844124, 0.5494877, 0.),\n vec3(0.6017799, -0.1726654, 0.),\n vec3(-0.5554981, 0.1559997, 0.),\n vec3(-0.3016369, -0.3900928, 0.),\n vec3(-0.5550632, -0.1723762, 0.),\n vec3(0.925029, 0.2995041, 0.),\n vec3(-0.2473137, 0.5538505, 0.),\n vec3(0.9183037, -0.2862392, 0.),\n vec3(0.2469421, 0.6718712, 0.),\n vec3(0.3916397, -0.4328209, 0.),\n vec3(-0.03576927, -0.6220032, 0.),\n vec3(-0.04661255, 0.7995201, 0.),\n vec3(0.4402924, 0.3640312, 0.),\n\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.)\n);\n\nconst vec3 PoissonSamplers64[64] = vec3[64](\n vec3(-0.613392, 0.617481, 0.),\n vec3(0.170019, -0.040254, 0.),\n vec3(-0.299417, 0.791925, 0.),\n vec3(0.645680, 0.493210, 0.),\n vec3(-0.651784, 0.717887, 0.),\n vec3(0.421003, 0.027070, 0.),\n vec3(-0.817194, -0.271096, 0.),\n vec3(-0.705374, -0.668203, 0.),\n vec3(0.977050, -0.108615, 0.),\n vec3(0.063326, 0.142369, 0.),\n vec3(0.203528, 0.214331, 0.),\n vec3(-0.667531, 0.326090, 0.),\n vec3(-0.098422, -0.295755, 0.),\n vec3(-0.885922, 0.215369, 0.),\n vec3(0.566637, 0.605213, 0.),\n vec3(0.039766, -0.396100, 0.),\n vec3(0.751946, 0.453352, 0.),\n vec3(0.078707, -0.715323, 0.),\n vec3(-0.075838, -0.529344, 0.),\n vec3(0.724479, -0.580798, 0.),\n vec3(0.222999, -0.215125, 0.),\n vec3(-0.467574, -0.405438, 0.),\n vec3(-0.248268, -0.814753, 0.),\n vec3(0.354411, -0.887570, 0.),\n vec3(0.175817, 0.382366, 0.),\n vec3(0.487472, -0.063082, 0.),\n vec3(-0.084078, 0.898312, 0.),\n vec3(0.488876, -0.783441, 0.),\n vec3(0.470016, 0.217933, 0.),\n vec3(-0.696890, -0.549791, 0.),\n vec3(-0.149693, 0.605762, 0.),\n vec3(0.034211, 0.979980, 0.),\n vec3(0.503098, -0.308878, 0.),\n vec3(-0.016205, -0.872921, 0.),\n vec3(0.385784, -0.393902, 0.),\n vec3(-0.146886, -0.859249, 0.),\n vec3(0.643361, 0.164098, 0.),\n vec3(0.634388, -0.049471, 0.),\n vec3(-0.688894, 0.007843, 0.),\n vec3(0.464034, -0.188818, 0.),\n vec3(-0.440840, 0.137486, 0.),\n vec3(0.364483, 0.511704, 0.),\n vec3(0.034028, 0.325968, 0.),\n vec3(0.099094, -0.308023, 0.),\n vec3(0.693960, -0.366253, 0.),\n vec3(0.678884, -0.204688, 0.),\n vec3(0.001801, 0.780328, 0.),\n vec3(0.145177, -0.898984, 0.),\n vec3(0.062655, -0.611866, 0.),\n vec3(0.315226, -0.604297, 0.),\n vec3(-0.780145, 0.486251, 0.),\n vec3(-0.371868, 0.882138, 0.),\n vec3(0.200476, 0.494430, 0.),\n vec3(-0.494552, -0.711051, 0.),\n vec3(0.612476, 0.705252, 0.),\n vec3(-0.578845, -0.768792, 0.),\n vec3(-0.772454, -0.090976, 0.),\n vec3(0.504440, 0.372295, 0.),\n vec3(0.155736, 0.065157, 0.),\n vec3(0.391522, 0.849605, 0.),\n vec3(-0.620106, -0.328104, 0.),\n vec3(0.789239, -0.419965, 0.),\n vec3(-0.545396, 0.538133, 0.),\n vec3(-0.178564, -0.596057, 0.)\n);\n#endif // USE_PCSS\n\n\nfloat getRand(vec2 seed) {\n return fract(sin(dot(seed.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n#define inline\nfloat cubeSampleShadowMap(samplerCube shadowMap, vec3 d)\n{\n return czm_unpackDepth(textureCube(shadowMap, d));\n}\n\n#define inline\nfloat sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture2D(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\n\n#define inline\nfloat cubeShadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\n return step(depth, cubeSampleShadowMap(shadowMap, uv));\n}\n\n#define inline\nfloat shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, sampleShadowMap(shadowMap, uv));\n}\n\nfloat private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n float strength = step(0.0, nDotL);\n#endif\n visibility *= strength;\n#endif\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\n#define inline\nfloat shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec3 uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n float visibility = cubeShadowDepthCompare(shadowMap, uvw, depth);\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\n\n#ifdef USE_PCSS\n #define inline\n float computeShadowWithPCSS(czm_shadowParameters shadowParameters, sampler2D depthSampler, int searchTapCount, int pcfTapCount, vec3[64] poissonSamplers)\n {\n float depthMetric = shadowParameters.depth;\n\n if (depthMetric > 1.0 || depthMetric < 0.0) {\n return 1.0;\n }\n\n vec4 uvRange = shadowParameters.uvRange;\n float depthBias = shadowParameters.depthBias;\n #ifdef WEBGPU\n depthBias *= 2.0;\n #endif\n vec3 clipPos = vec3(shadowParameters.texCoords.xy, shadowParameters.depth - depthBias);\n vec3 uvDepth = clipPos;\n\n float shadowMapSize = 1.0 / shadowParameters.texelStepSize.x;\n float shadowMapSizeInverse = shadowParameters.texelStepSize.x;\n float contactHardeningLightSizeUVRatio = shadowMap_penumbraRatio;\n float shadowMapIndex = shadowParameters.shadowMapIndex;\n // hack : 让不同cascade的阴影看起来没有明显分隔\n float scale = pow(2.0, shadowMapIndex);\n contactHardeningLightSizeUVRatio /= scale;\n float lightSizeUV = shadowMapSize * contactHardeningLightSizeUVRatio;\n float darkness = shadowParameters.darkness;\n\n float blockerDepth = 0.0;\n float sumBlockerDepth = 0.0;\n float numBlocker = 0.0;\n\n for (int i = 0; i < searchTapCount; i ++) {\n blockerDepth = czm_unpackDepth(textureLod(depthSampler, uvDepth.xy + (lightSizeUV * shadowMapSizeInverse * PoissonSamplers32[i].xy), 0.0));\n if (blockerDepth < uvDepth.z) {\n sumBlockerDepth += blockerDepth;\n numBlocker++;\n }\n }\n\n if (numBlocker < 1.0) {\n return 1.0;\n }\n else\n {\n float avgBlockerDepth = sumBlockerDepth / numBlocker;\n\n // Offset preventing aliasing on contact.\n float AAOffset = shadowMapSizeInverse * 10.;\n // Do not dividing by z despite being physically incorrect looks better due to the limited kernel size.\n // float penumbraRatio = (depthMetric - avgBlockerDepth) / avgBlockerDepth;\n float penumbraRatio = ((depthMetric - avgBlockerDepth) + AAOffset);\n float filterRadius = penumbraRatio * lightSizeUV * shadowMapSizeInverse;\n\n float random = getRand(shadowParameters.texCoords.xy);\n float rotationAngle = random * 3.1415926;\n vec2 rotationVector = vec2(cos(rotationAngle), sin(rotationAngle));\n\n float shadow = 0.;\n for (int i = 0; i < pcfTapCount; i++) {\n vec3 offset = poissonSamplers[i];\n // Rotated offset.\n offset = vec3(offset.x * rotationVector.x - offset.y * rotationVector.y, offset.y * rotationVector.x + offset.x * rotationVector.y, 0.);\n vec3 realUV = uvDepth + offset * filterRadius;\n #ifdef WEBGPU\n realUV.z = (realUV.z - 0.5) * 2.0;\n #endif\n shadow += textureLod(u_shadowDepth, realUV, 0.0);\n }\n shadow /= float(pcfTapCount);\n\n // Blocker distance falloff\n shadow = mix(shadow, 1.0, depthMetric - avgBlockerDepth);\n\n // Apply darkness\n shadow = mix(darkness, 1.0, shadow);\n\n return shadow;\n }\n }\n\n #define inline\n float computeShadowWithPCSS16(czm_shadowParameters shadowParameters, sampler2D depthSampler)\n {\n return computeShadowWithPCSS(shadowParameters, depthSampler, 16, 16, PoissonSamplers32);\n }\n\n #define inline\n float computeShadowWithPCSS32(czm_shadowParameters shadowParameters, sampler2D depthSampler)\n {\n return computeShadowWithPCSS(shadowParameters, depthSampler, 16, 32, PoissonSamplers32);\n }\n\n #define inline\n float computeShadowWithPCSS64(czm_shadowParameters shadowParameters, sampler2D depthSampler)\n {\n return computeShadowWithPCSS(shadowParameters, depthSampler, 32, 64, PoissonSamplers64);\n }\n\n#else\n #define inline\n float computeShadowWithPoissonSampling(czm_shadowParameters shadowParameters, sampler2D shadowMap)\n {\n float shadowPixelDepth = shadowParameters.depth;\n float depthBias = shadowParameters.depthBias;\n shadowPixelDepth -= depthBias;\n float darkness = shadowParameters.darkness;\n vec2 uv = shadowParameters.texCoords;\n vec4 uvRange = shadowParameters.uvRange;\n vec2 texelStepSize = shadowParameters.texelStepSize;\n\n float visibility = 1.0;\n vec2 poissonDisk[4];\n poissonDisk[0] = vec2(-0.94201624, -0.39906216);\n poissonDisk[1] = vec2(0.94558609, -0.76890725);\n poissonDisk[2] = vec2(-0.094184101, -0.92938870);\n poissonDisk[3] = vec2(0.34495938, 0.29387760);\n\n // Poisson Sampling\n if (sampleShadowMap(shadowMap, uv + poissonDisk[0] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n if (sampleShadowMap(shadowMap, uv + poissonDisk[1] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n if (sampleShadowMap(shadowMap, uv + poissonDisk[2] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n if (sampleShadowMap(shadowMap, uv + poissonDisk[3] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n\n return visibility;\n }\n#endif // USE_PCSS\n\n#define inline\nfloat shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\n#ifdef USE_SOFT_SHADOWS\n #ifdef USE_PCSS\n #ifdef LOW_QUALITY_SHADOW\n float visibility = computeShadowWithPCSS16(shadowParameters, shadowMap);\n #elif defined(MEDIUM_QUALITY_SHADOW)\n float visibility = computeShadowWithPCSS32(shadowParameters, shadowMap);\n #else\n float visibility = computeShadowWithPCSS64(shadowParameters, shadowMap);\n #endif\n #else\n float visibility = computeShadowWithPoissonSampling(shadowParameters, shadowMap);\n #endif\n#else\n float depth = shadowParameters.depth;\n float depthBias = shadowParameters.depthBias;\n depth -= depthBias;\n vec2 uv = shadowParameters.texCoords;\n float visibility = shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n",D$$="\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n\nuniform sampler2D u_waterMask;\nuniform vec4 u_waterMaskTranslationAndScale;\nuniform float u_zoomedOutOceanSpecularIntensity;\n\nfloat waveFade(float edge0, float edge1, float x)\n{\n float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n return pow(1.0 - y, 5.0);\n}\n\nfloat linearFade(float edge0, float edge1, float x)\n{\n return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n}\n\n// Based on water rendering by Jonas Wagner:\n\n// low altitude wave settings\nconst float oceanFrequencyLowAltitude = 825000.0;\nconst float oceanAnimationSpeedLowAltitude = 0.004;\nconst float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;\nconst float oceanSpecularIntensity = 0.5;\n\n// high altitude wave settings\nconst float oceanFrequencyHighAltitude = 125000.0;\nconst float oceanAnimationSpeedHighAltitude = 0.008;\nconst float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;\n\nvec4 getWaterNoise(vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (textureLod(u_oceanNormalMap, uv0, 0.0)) +\n (textureLod(u_oceanNormalMap, uv1, 0.0)) +\n (textureLod(u_oceanNormalMap, uv2, 0.0)) +\n (textureLod(u_oceanNormalMap, uv3, 0.0));\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)\n{\n vec3 positionToEyeEC = -positionEyeCoordinates;\n float positionToEyeECLength = length(positionToEyeEC);\n\n // The double normalize below works around a bug in Firefox on Android devices.\n vec3 normalizedpositionToEyeEC = normalize(normalize(positionToEyeEC));\n\n // Fade out the waves as the camera moves far from the surface.\n float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);\n\n#ifdef SHOW_OCEAN_WAVES\n // high altitude waves\n float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;\n vec4 noise = getWaterNoise(textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);\n vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);\n\n // low altitude waves\n time = czm_frameNumber * oceanAnimationSpeedLowAltitude;\n noise = getWaterNoise(textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);\n vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);\n\n // blend the 2 wave layers based on distance to surface\n float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);\n float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);\n vec3 normalTangentSpace =\n (highAltitudeFade * normalTangentSpaceHighAltitude) +\n (lowAltitudeFade * normalTangentSpaceLowAltitude);\n normalTangentSpace = normalize(normalTangentSpace);\n\n // fade out the normal perturbation as we move farther from the water surface\n normalTangentSpace.xy *= waveIntensity;\n normalTangentSpace = normalize(normalTangentSpace);\n#else\n vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);\n#endif\n\n vec3 normalEC = enuToEye * normalTangentSpace;\n\n const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);\n\n // Use diffuse light to highlight the waves\n float diffuseIntensity = czm_getLambertDiffuse(czm_sunDirectionEC, normalEC) * maskValue;\n vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);\n\n#ifdef SHOW_OCEAN_WAVES\n // Where diffuse light is low or non-existent, use wave highlights based solely on\n // the wave bumpiness and no particular light direction.\n float tsPerturbationRatio = normalTangentSpace.z;\n vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);\n#else\n vec3 nonDiffuseHighlight = vec3(0.0);\n#endif\n\n // Add specular highlights in 3D, and in all modes when zoomed in.\n float specularIntensity = czm_getSpecular(czm_sunDirectionEC, normalizedpositionToEyeEC, normalEC, 10.0) + 0.25 * czm_getSpecular(czm_moonDirectionEC, normalizedpositionToEyeEC, normalEC, 10.0);\n float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);\n float specular = specularIntensity * surfaceReflectance;\n\n#ifdef HDR\n specular *= 1.4;\n\n float e = 0.2;\n float d = 3.3;\n float c = 1.7;\n\n vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));\n#else\n vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;\n#endif\n\n return vec4(color, imageryColor.a);\n}\n\nvec4 getOceanColor(vec4 inColor, vec3 positionEC, vec3 positionMC, vec3 normalEC, vec3 normalMC, float fade)\n{\n vec4 color = inColor;\n vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;\n vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;\n vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;\n waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;\n\n float mask = texture2D(u_waterMask, waterMaskTextureCoordinates).r;\n\n if (mask > 0.0)\n {\n mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n\n vec2 ellipsoidTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC);\n vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC.zyx);\n\n vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));\n\n color = computeWaterColor(positionEC, textureCoordinates, enuToEye, color, mask, fade);\n }\n return color;\n}\n\n#endif\n",g$17="\n#ifdef HYPSOMETRIC_ANALYSIS\nuniform sampler2D uHypsometricTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\n\nfloat computeMixCon()\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n float t = floor(v_height2 / uHypContourInterval);\n distanceToContour = abs(v_height2 - t * uHypContourInterval - 0.1) ;\n }\n else\n {\n distanceToContour = abs(v_height2 - uHypMaxVisibleValue);\n }\n float dxc = abs(dFdx(v_height2));\n float dyc = abs(dFdy(v_height2));\n float dF = max(dxc, dyc);\n return (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor()\n{\n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n float contourRate = (v_height2 - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n vec2 contourCoord = vec2(0.0, finalCoord);\n return textureLod(uHypsometricTexture, contourCoord, 0.0).rgba;\n}\n\nvec4 getHypsometricAnalysisColor(vec4 inColor, vec2 textureCoordinates)\n{\n vec4 finalColor = inColor;\n float mixCon = computeMixCon();\n if(uHypHasColorTable > 0.1)\n {\n bool hasHyp = true;\n #ifdef HYPSOMETRIC_REGION\n if(uHypHasAnalysisRegion > 0.1){\n hasHyp = texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w > 0.5;\n }\n #endif\n if(hasHyp)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(v_height2 > uHypMaxVisibleValue + 4.0 || v_height2 < uHypMinVisibleValue - 4.0)\n {\n finalOpacity = 0.5;\n }\n else\n {\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = mixCon;\n contourMapColor = mix(computeContourMapColor(), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = mixCon;\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n #else\n if(uHypContourFillMode > 0.9)\n #endif\n {\n contourMapColor = computeContourMapColor();\n }\n else\n {\n finalOpacity = 0.0;\n }\n finalColor = mix(finalColor, contourMapColor, finalOpacity);\n }\n }\n }\n return finalColor;\n}\n\n#endif\n\n#ifdef SLOPE_ANALYSIS\nuniform sampler2D uSlopeColorTexture;\nuniform sampler2D uSlopeArrowsTexture;\nuniform float uSlopeHasColorTable;\nuniform float uSlopeFillMode;\nuniform float uSlopeOpacity;\nuniform float uSlopeFloor;\nuniform float uSlopeCeil;\nuniform float uSlopeMinVisibleValue;\nuniform float uSlopeMaxVisibleValue;\nuniform float uHasSlopeRegion;\nuniform vec4 uSlopeRect;\nconst float PI = 3.1415926535897932384626;\nvarying vec2 texCoordRotate;\n\n\nvec4 ComputeSlopeArrowColor(in float slopeAngle, in vec3 realNormal)\n{\n vec2 limitTexCoord = fract(texCoordRotate);\n vec2 slopeDirection = realNormal.xy;\n vec4 arrowsTexColor = vec4(0.0);\n float arrowAlpha = 0.0;\n float distance = length(slopeDirection);\n float acosSlopeDirection = acos(slopeDirection.x/distance);\n float slopeArrowsAngle = acosSlopeDirection;//坡向的旋转角\n if(slopeDirection.y<0.0)//第二、三象限\n {\n slopeArrowsAngle = 2.0 * PI - acosSlopeDirection;\n }\n //绕Z轴旋转的旋转矩阵\n vec2 n = vec2(cos(slopeArrowsAngle),-sin(slopeArrowsAngle));\n vec2 t = vec2(sin(slopeArrowsAngle),cos(slopeArrowsAngle));\n mat2 slopeRotateZMatrix = mat2(n,t);\n //1、把旋转点移到(0.5,0.5)\n vec2 transCoord = limitTexCoord - vec2(0.5,0.5);\n //2、以原点为中心点旋转纹理坐标\n transCoord = slopeRotateZMatrix * transCoord;\n //3、把旋转点(0.5,0.5)移到原点处\n transCoord += vec2(0.5,0.5);\n transCoord = smoothstep(0.0,1.0, transCoord);\n arrowsTexColor = textureLod(uSlopeArrowsTexture, transCoord, 0.0);\n if (slopeAngle <= PI/180.0) // 当地形的坡度值小于E-6度时,不显示表示方向的箭头。\n {\n return vec4(0.0);\n }\n arrowAlpha = arrowsTexColor.a;\n // 解决坡向边界有黑线的问题\n float xNum = floor(transCoord.x * 64.0);\n float yNum = floor(transCoord.y * 64.0);\n if ((xNum <= 2.0 || xNum >= 61.0|| yNum <= 2.0||yNum >= 61.0) && arrowAlpha < 1.0)\n {\n arrowAlpha = 0.0;\n }\n arrowsTexColor = vec4(arrowsTexColor.rgb, arrowAlpha);\n return arrowsTexColor;\n}\n\nvec4 getSlopeAnalysisColor(vec4 inColor, vec2 textureCoordinates, vec3 realNormal){\n vec4 finalColor = inColor;\n bool hasSlopeRegion = true;\n #ifdef SlopeRegion\n if(uHasSlopeRegion > 0.1){\n hasSlopeRegion = texture2D(uModifyRasterTexture, textureCoordinates.xy).w > 0.5;\n }\n #endif\n if(hasSlopeRegion)\n {\n float finalOpacity = uSlopeOpacity;\n float slopeRate = abs(normalize(realNormal).z);\n float slopeAngle = acos(slopeRate);\n if (slopeAngle < uSlopeMinVisibleValue || slopeAngle > uSlopeMaxVisibleValue)\n {\n finalOpacity = 0.0;\n }\n float threshold = clamp(abs(uSlopeCeil-uSlopeFloor),0.0000001,PI/2.0);\n float rate = (slopeAngle-uSlopeFloor)/threshold;\n float finalRate = clamp(rate,0.0,1.0);\n float count = floor(finalRate * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalRate*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 slopeCoord = vec2(x, y);\n vec4 slopeFillColor = textureLod(uSlopeColorTexture, slopeCoord, 0.0);\n vec4 slopeMapColor = vec4(0.0);\n if(uSlopeFillMode > 2.9)//填充和坡向\n {\n vec4 arrowsTexColor = ComputeSlopeArrowColor(slopeAngle, realNormal);\n slopeMapColor = mix(slopeFillColor, arrowsTexColor, arrowsTexColor.a);\n }\n else if(uSlopeFillMode > 1.9)//坡向\n {\n vec4 arrowsTexColor = ComputeSlopeArrowColor(slopeAngle, realNormal);\n slopeMapColor = arrowsTexColor;\n finalOpacity *= arrowsTexColor.a;\n }\n else if(uSlopeFillMode > 0.9)//填充\n {\n slopeMapColor = slopeFillColor;\n }\n else\n {\n finalOpacity = 0.0;\n }\n finalColor = mix(finalColor, slopeMapColor, finalOpacity);\n }\n \n return finalColor;\n}\n\n#endif\n\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodTexture;\nuniform vec4 uFloodRect;\nvarying vec3 vProjectionCoord;\n\nvec4 getFloodAnalysisColor(vec4 inColor, vec2 textureCoordinates){\n vec4 finalColor = inColor;\n float bIsFloodColor = 1.0;\n vec2 polyTexCoord = textureCoordinates.xy;\n polyTexCoord.x = polyTexCoord.x * (uTileBounds.z - uTileBounds.x) + uTileBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uTileBounds.w - uTileBounds.y) + uTileBounds.y;\n vec4 floodColor = vec4(0.0);\n if(polyTexCoord.x>uFloodRect.x && polyTexCoord.x<uFloodRect.z && polyTexCoord.y> uFloodRect.y&& polyTexCoord.y < uFloodRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uFloodRect.x, uFloodRect.w);\n polyTexCoord.x = polyTexCoord.x / (uFloodRect.z - uFloodRect.x);\n polyTexCoord.y = 1.0-polyTexCoord.y / (uFloodRect.y - uFloodRect.w);\n }\n floodColor = texture2D(uFloodTexture, polyTexCoord);\n if(floodColor.r > 0.5)\n {\n finalColor = vec4(40.0/255.0,150.0/255.0,200.0/255.0,u_GlobeAlpha);\n }\n return finalColor;\n}\n#endif\n\n\n",h$12="\n#ifdef NORMAL\nvec4 renderNormal(vec3 posMC)\n{\n vec3 normalMC = normalize(czm_computeNormal(posMC));\n normalMC = normalMC * 0.5 + vec3(0.5);\n #include <writeFragDepth>\n return vec4(normalMC, 1.0);\n}\n#endif\n",s$W="\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn ;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\n",u$S="\nUBO_DECL_BEGIN(Mesh)\n UBO_PARAM mat4 uModelMatrix;\n UBO_PARAM mat4 uGeoMatrix;\n UBO_PARAM vec4 batchTextureStep;\n UBO_PARAM vec2 batchTextureDimensions;\n UBO_PARAM vec2 decode_texCoord0_min;\n UBO_PARAM vec2 decode_texCoord1_min;\n UBO_PARAM vec3 decode_texCoord0_vNormConstant;\n UBO_PARAM vec3 decode_texCoord1_vNormConstant;\n UBO_PARAM vec4 decode_position_min;\n UBO_PARAM float decode_position_normConstant;\n UBO_PARAM float normal_rangeConstant;\n UBO_PARAM mat4 uInverseGeoMatrix;\n UBO_PARAM mat4 uSkeletonMatrix;\n UBO_PARAM float uSkeletonCount;\n UBO_PARAM vec2 uImgTextureBound;\n UBO_PARAM float uImgTextureAlpha;\n UBO_PARAM float fMultiTemporalFactor;\n UBO_PARAM vec3 uSouthWest;\n UBO_PARAM vec3 uNorthDir;\n UBO_PARAM vec3 uEastDir;\n UBO_PARAM vec2 textureRepeat;\nUBO_DECL_END\n",d$1h="\nUBO_DECL_BEGIN(Layer)\n UBO_PARAM vec4 uSelColor;\n UBO_PARAM vec4 uTranslationAndBottom;\n UBO_PARAM vec4 uFillForeColor;\n UBO_PARAM vec4 uPolygonOffset;\n UBO_PARAM float uPointSize;\n UBO_PARAM vec2 uMinMaxTransparent;\n UBO_PARAM float uTransparentFilter;\n UBO_PARAM vec4 uHypLineColor;\n UBO_PARAM vec4 uNoValueColor;\n UBO_PARAM vec4 uHypRect;\n UBO_PARAM float uHypHasAnalysisRegion;\n UBO_PARAM float uMixColorType;\n UBO_PARAM float uHypOpacity;\n UBO_PARAM float uHypContourInterval;\n UBO_PARAM float uHypContourFillMode;\n UBO_PARAM float uHypFloor;\n UBO_PARAM float uHypCeil;\n UBO_PARAM float uDataFloor;\n UBO_PARAM float uDataCeil;\n UBO_PARAM float uHypMaxVisibleValue;\n UBO_PARAM float uHypMinVisibleValue;\n UBO_PARAM float uHypsometricVisible;\n UBO_PARAM vec4 uRect;\n UBO_PARAM float uCameraHeight;\n UBO_PARAM vec4 uExcavationRect;\n UBO_PARAM vec4 uServerExcavationRect;\n UBO_PARAM float uExcavationMode;\n UBO_PARAM float uServerExcavationMode;\n UBO_PARAM vec4 uSwipeRegion;\n UBO_PARAM float uBrightness;\n UBO_PARAM float uContrast;\n UBO_PARAM float uHue;\n UBO_PARAM float uSaturation;\n UBO_PARAM float uOneOverGamma;\n UBO_PARAM vec4 uClipPlanes[6];\n UBO_PARAM vec4 uClipLineColor;\n UBO_PARAM float uClipMode;\n UBO_PARAM float uMaxCategory;\n UBO_PARAM float uMinCategory;\n UBO_PARAM float uCategoryWidht;\n UBO_PARAM float uCategoryHeight;\n UBO_PARAM vec4 uLineColor;\n UBO_PARAM float uLineWidth;\n UBO_PARAM float uFillStyle;\n UBO_PARAM vec4 uTransparentBackColor;\n UBO_PARAM float uTransparentBackColorTolerance;\n UBO_PARAM float uVisibleDistanceMax;\n UBO_PARAM vec4 uHorizontalColor;\n UBO_PARAM float uHorizontalLine;\n UBO_PARAM float uDistanceFalloffFactor;\n UBO_PARAM vec2 uStrokesTextureScale;\n UBO_PARAM float uStrokesLog2Resolution;\n UBO_PARAM vec4 uMinMaxTerrainHeightAndPickInfo;\n UBO_PARAM vec4 uOverlayRect;\n UBO_PARAM vec4 uEmissionTexAtlasTilingAndOffset[10];\n UBO_PARAM vec4 uEmissionTexAtlasRects[10];\n UBO_PARAM vec4 uEmissionColor;\n UBO_PARAM vec4 uLayerBounds;\n UBO_PARAM float uLayerCornerLength;\n UBO_PARAM float uMaxCategoryOrHypCeil;\n UBO_PARAM float uMinCategoryOrHypFloor;\n UBO_PARAM float uEmissionTexAtlasCount;\n UBO_PARAM float uSnowCoverageFactor;\n UBO_PARAM float uAnimationSpeed;\n UBO_PARAM float uRippleScale;\n UBO_PARAM float uWindIntensity;\n UBO_PARAM float uRain;\n UBO_PARAM float uCameraDepth;\n UBO_PARAM float uWetnessFactor;\n UBO_PARAM float uSelectColorType;\nUBO_DECL_END\n",b$1b="\nUBO_DECL_BEGIN(Material)\n UBO_PARAM mat4 uTexMatrix;\n UBO_PARAM vec4 uDiffuseColor;\n UBO_PARAM vec4 uAmbientColor;\n UBO_PARAM vec4 uSpecularColor;\n UBO_PARAM vec4 uTexUVOffset;\n UBO_PARAM vec4 uTextureDim;\n UBO_PARAM vec2 uTextureWidths;\n UBO_PARAM vec4 batchTextureStep_baseTex;\n UBO_PARAM vec2 batchTextureDimensions_baseTex;\n UBO_PARAM vec4 batchTextureStep_bakeTex;\n UBO_PARAM vec2 batchTextureDimensions_bakeTex;\n \n UBO_PARAM vec4 uBaseColorFactor;\n UBO_PARAM vec4 uEmissiveFactor;\n UBO_PARAM vec4 uEmissiveUVOffsetAndTiling;\n UBO_PARAM vec3 uMetallicRoughnessIntensityScale;\n UBO_PARAM vec2 uPBRTexWH;\n UBO_PARAM float uNormalTextureScale;\n UBO_PARAM float uAlphaMode;\n UBO_PARAM float uAlphaCutoff;\n UBO_PARAM float uPbrParTextureWidth;\n \n // uIndexOfRefraction;\n // uTransmissionFactor;\n // uThickness;\n // uSnowCoverageFactor;\n // uIntensityScale;\n // uAnimationSpeed;\n // uWetnessFactor;\n // uRippleScale;\n // uWindIntensity;\n // uRain;\n // uCameraDepth;\n // uTintColor;\n // uDiffusionDistance;\n // uClearcoatFactor;\n // uClearcoatRoughnessFactor;\n // uAnisotropy; \nUBO_DECL_END\n",x$16="\nUBO_DECL_BEGIN(Scene)\n UBO_PARAM mat4 uView;\n UBO_PARAM mat4 uProjection;\n UBO_PARAM mat4 uViewProjection;\n UBO_PARAM mat4 uInverseView;\n UBO_PARAM mat4 uInverseProjection;\n UBO_PARAM mat4 uInverseViewProjection;\n UBO_PARAM mat4 uViewportTransformation;\n UBO_PARAM mat3 uViewRotation;\n UBO_PARAM mat3 uInverseViewRotation;\n UBO_PARAM mat3 uTemeToPseudoFixed;\n UBO_PARAM vec4 uViewport;\n UBO_PARAM vec4 uFrustumPlanes;\n UBO_PARAM vec3 uRelativeOrigin;\n UBO_PARAM vec2 uCurrentFrustum;\n UBO_PARAM float uFarDepthFromNearPlusOne;\n UBO_PARAM float uLog2FarDepthFromNearPlusOne;\n UBO_PARAM float uOneOverLog2FarDepthFromNearPlusOne;\n UBO_PARAM float uFrameNumber;\n UBO_PARAM float uPixelRatio;\n UBO_PARAM float uResolutionScale;\n UBO_PARAM float uGamma;\n UBO_PARAM float uToneMappingExposure;\n UBO_PARAM float uEnvMapIntensity;\n UBO_PARAM vec2 uSpecularEnvironmentMapSize;\n UBO_PARAM float uSpecularEnvironmentMapsMaximumLOD;\n UBO_PARAM vec3 uSphericalHarmonicCoefficients[9];\n UBO_PARAM float uCameraReflect;\nUBO_DECL_END\n",L$19="\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = gl_FragCoord.z;\n#endif\n\n#ifdef WEBGL2\n gl_FragDepthEXT = gl_FragCoord.z;\n#endif\n",S$V="\n#ifdef NORMAL_AND_DEPTH\nvarying vec4 oriVertex;\nvarying vec3 perVertexNormals;\nvarying float depthInCamera;\nvec4 renderNormalAndDepth(vec3 posMC)\n{\n vec3 normal = normalize(perVertexNormals);\n float dLength = length(perVertexNormals);\n if(dLength <= 0.9)\n {\n normal = vec3(mat3(czm_modelView)*czm_computeNormal(posMC.xyz));\n }\n normal = (normal + 1.0) * 0.5;\n #include <writeFragDepth>\n return vec4(normal, 1.0);\n}\n#endif\n",U$12="\n#ifdef PREPASS\nvoid renderPrePass(float roughness)\n{\n vec3 normalEC = normalize(mat3(czm_view * uModelMatrix) * czm_computeNormal(vPositionMC.xyz));\n // 相机坐标系坐标\n gl_FragData[0] = vec4(v_positionEC, 1.0);\n // 相机坐标系法线\n gl_FragData[1] = vec4(normalEC, 1.0);\n // 反射率\n float reflectivity = 1.0 - roughness;\n gl_FragData[2] = vec4(reflectivity, reflectivity, reflectivity, 1.0);\n}\n#endif\n",V$Z="\nvoid calculateMipLevel(in vec2 inTexCoord, in vec2 vecTile, in float fMaxMip, inout float mipLevel)\n{\n\tvec2 dx = dFdx(inTexCoord * vecTile.x);\n\tvec2 dy = dFdy(inTexCoord * vecTile.y);\n\tfloat dotX = dot(dx, dx);\n\tfloat dotY = dot(dy, dy);\n\tfloat dMax = max(dotX, dotY);\n\tfloat dMin = min(dotX, dotY);\n\tfloat offset = (dMax - dMin) / (dMax + dMin);\n\toffset = clamp(offset, 0.0, 1.0);\n\tfloat d = dMax * (1.0 - offset) + dMin * offset;\n\tmipLevel = 0.5 * log2(d);\n\tmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\n",y$V="\n#ifdef Has_Texture\n uniform sampler2D uTexture;\n#ifdef MULTI_TEX\n uniform sampler2D uSecTexture;\n#endif\n#ifndef NO_TEXCOORD\n struct TextureParam {\n vec2 uv;\n vec2 dim;\n vec2 translate;\n vec2 scale;\n vec4 uvOffset;\n float maxMipmapLevel;\n float texCoordZ;\n float isRGBA;\n };\n \n vec4 sampleLod(vec2 uv, float mipLevel, bool bUseFirstTexture) {\n vec4 color = vec4(1.0);\n \n if(bUseFirstTexture)\n {\n #ifdef GL_EXT_shader_texture_lod\n color = texture2DLodEXT(uTexture, uv, mipLevel);\n #else\n #ifdef WEBGL2\n color = textureLod(uTexture, uv, mipLevel);\n #else\n color = texture2D(uTexture, uv, mipLevel);\n #endif\n #endif\n }\n else\n {\n #ifdef MULTI_TEX\n #ifdef GL_EXT_shader_texture_lod\n color = texture2DLodEXT(uSecTexture, uv, mipLevel);\n #else\n #ifdef WEBGL2\n color = textureLod(uSecTexture, uv, mipLevel);\n #else\n color = texture2D(uSecTexture, uv, mipLevel);\n #endif\n #endif\n #endif\n }\n \n return SRGBtoLINEAR4(color);\n }\n \n#ifdef TextureBatch\n\n vec4 getBatchTextureColor(TextureParam textureParam, bool bUseFirstTexture)\n {\n vec2 uv = textureParam.uv;\n vec2 dim = textureParam.dim;\n vec2 translate = textureParam.translate;\n vec2 scale = textureParam.scale;\n vec4 uvOffset = textureParam.uvOffset;\n float maxMipmapLevel = textureParam.maxMipmapLevel;\n if(maxMipmapLevel < 0.0)\n {\n return vec4(1.0);\n }\n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, dim, maxMipmapLevel, mipLevel);\n #endif\n vec2 texCoord = getBatchUV(uv, translate, scale, dim, ceil(mipLevel));\n vec4 colorCeil = sampleLod(texCoord, 0.0, bUseFirstTexture);\n texCoord = getBatchUV(uv, translate, scale, dim, floor(mipLevel));\n vec4 colorFloor = sampleLod(texCoord, 0.0, bUseFirstTexture);\n return colorCeil * 0.5 + colorFloor * 0.5;\n }\n\n#else\n\n vec4 getTextureColor(TextureParam textureParam, vec2 outTexCoord, bool bUseFirstTexture)\n {\n vec2 uv = textureParam.uv;\n vec2 dim = textureParam.dim;\n vec2 translate = textureParam.translate;\n vec2 scale = textureParam.scale;\n vec4 uvOffset = textureParam.uvOffset;\n float maxMipmapLevel = textureParam.maxMipmapLevel;\n float texCoordZ = textureParam.texCoordZ;\n \n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, dim, maxMipmapLevel, mipLevel);\n #endif\n outTexCoord = getUV(uv, translate, uvOffset, scale.x, dim.x, mipLevel, texCoordZ);\n vec4 color = sampleLod(outTexCoord, mipLevel, bUseFirstTexture);\n #ifdef RGBTOBGR\n color = color.bgra;\n #endif\n return color;\n }\n\n#endif\n#endif\n\n vec4 getTextureColorForS3M(out vec4 outTexCoord)\n {\n #ifdef INVALID_OBLIQUE\n return vec4(0.5,0.5,0.5,1.0);\n #endif\n #ifdef NO_TEXCOORD\n return SRGBtoLINEAR4(texture2D(uTexture, vec2(0.5)));\n #endif\n #ifndef NO_TEXCOORD\n TextureParam textureParam;\n textureParam.uv = vTexCoord.xy;\n vec4 firstColor, secColor;\n #ifdef TextureBatch\n textureParam.dim = vTexSize.xy;\n textureParam.translate = vTexTran.xy;\n textureParam.scale = vTexScale.xy;\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.x;\n firstColor = getBatchTextureColor(textureParam, true);\n #else\n if(vTexMatrix.z < 0.0){\n return vec4(1.0);\n }\n float texWidth = vTexMatrix.z * uTextureWidths.x;\n textureParam.dim = vec2(texWidth, texWidth);\n textureParam.translate = vTexMatrix.xy;\n textureParam.scale = vec2(vTexMatrix.z, vTexMatrix.z);\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vTexMatrix.w;\n textureParam.isRGBA = vIsRGBA.x;\n textureParam.texCoordZ = vTexCoordZ.x;\n firstColor = getTextureColor(textureParam, outTexCoord.xy, true);\n #endif\n \n #ifdef MULTI_TEX\n textureParam.uv = vTexCoord.zw;\n #ifdef TextureBatch\n textureParam.dim = vTexSize.zw;\n textureParam.translate = vTexTran.zw;\n textureParam.scale = vTexScale.zw;\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.y;\n secColor = getBatchTextureColor(textureParam, false);\n #else\n texWidth = vTexMatrix2.z * uTextureWidths.y;\n textureParam.dim = vec2(texWidth, texWidth);\n textureParam.translate = vTexMatrix2.xy;\n textureParam.scale = vec2(vTexMatrix2.z, vTexMatrix2.z);\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vTexMatrix2.w;\n textureParam.isRGBA = vIsRGBA.y;\n textureParam.texCoordZ = vTexCoordZ.y;\n secColor = getTextureColor(textureParam, outTexCoord.zw, false);\n #endif\n return firstColor * secColor;\n #endif\n \n return firstColor;\n #endif\n }\n#endif\n",C$17="\n#include <calculatePolyTexCoord>\n#include <executeExcavation>\n#include <splitClip>\n#include <executeServerExcavationDecl>\n#ifdef FINAL_RESOLUTION_CLIP\nvarying vec3 vertexClip;\nuniform vec3 uMaxClip;\nuniform vec3 uMinClip;\n#endif\nvoid preClip()\n{\n if(vColor.a == 0.0)\n {\n discard;\n }\n#ifdef FINAL_RESOLUTION_CLIP\n\tif(vertexClip.x > uMaxClip.x || vertexClip.y > uMaxClip.y || vertexClip.z > uMaxClip.z \n\t|| vertexClip.x < uMinClip.x || vertexClip.y < uMinClip.y || vertexClip.z < uMinClip.z) \n { \n discard; \n } \n#endif\n#ifdef SQCLIP\n czm_spatialQueryClip();\n#endif\n#ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(executeExcavation())\n {\n discard;\n }\n#endif\n#ifdef SERVEREXCAVATION\n if(executeServerExcavation())\n {\n discard;\n }\n#endif\n}\n",M$16="\n#ifdef VISIBLEDISTANCEMAX\nvoid getAlphaByDistance(vec3 positionEC, inout vec4 color) {\n if(length(positionEC) > uVisibleDistanceMax)\n {\n float minAlpha = min(1.0, (length(positionEC) - uVisibleDistanceMax) / 2000.0);\n color.a = 1.0 - minAlpha;\n }\n}\n#endif\n\n#ifdef OVERLAY\nuniform sampler2D uOverlayTexture;\nvoid getOverlayColor(inout vec4 color)\n{\n float ptInRect = 1.0;\n vec4 vertexPos = uGeoMatrix * vec4(vPositionMC.xyz, 1.0);\n vec2 uv = calculatePolyTexCoord(vertexPos, uOverlayRect, ptInRect);\n if(ptInRect > 0.5)\n {\n vec4 overlayColor = texture2D(uOverlayTexture, uv.xy);\n if(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n {\n vec4 mixColor = mix(color, overlayColor, overlayColor.a);\n color = vec4(mixColor.r, mixColor.g, mixColor.b, color.a);\n }\n }\n}\n#endif\n\n#ifdef HORIZONTAL_LINE\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}\n#endif\n\n#ifdef IMAGERY\nvarying vec2 imgCoord;\nuniform sampler2D uImgTexture;\n\n//#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform vec4 u_dayTextureSize[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\nuniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n//#endif\n\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\n\nvoid getImageryColor(inout vec4 color)\n{\n\tvec2 texcood = vec2(imgCoord.x / uImgTextureBound.x, imgCoord.y / uImgTextureBound.y);\n#ifdef MULTIBATCH\n\tcolor = computeDayColor(vec4(1.0,1.0,1.0,0.0), clamp(vec3(texcood,0.0), 0.0, 1.0));\n#else\n\tcolor = computeDayColor(color, clamp(vec3(texcood,0.0), 0.0, 1.0));\n#endif\n}\n#endif\n\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nvoid getFloodWaterColor(inout vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n}\n#endif\n\n#ifdef TRANSPARENT_BACK_COLOR\nvoid transparentColorClip(vec4 color)\n{\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - color.r);\n float gDiff = abs(uTransparentBackColor.g - color.g);\n float bDiff = abs(uTransparentBackColor.b - color.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n}\n#endif\n",v$R="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n#endif\n#ifdef TexCoord2\n attribute vec4 aTexCoord1;\n#endif\n\n#ifdef VertexColor\n attribute vec4 aColor;\n#endif\n\n#ifdef USE_VertexWeight\n attribute float aVertexWeight;\n #ifdef MultiTemporalWeight\n attribute float aVertexWeight_1;\n #endif\n#endif\n\n#ifdef Volume\n attribute vec3 aRatio;\n#endif\n\n#ifdef InstanceRenderBIM\n attribute vec4 uv2;\n attribute vec4 uv3;\n attribute vec4 uv4;\n attribute vec4 secondary_colour;\n attribute vec4 uv6;\n#endif\n\n#ifdef InstanceRenderPipeline\n attribute vec4 uv1;\n attribute vec4 uv2;\n attribute vec4 uv3;\n attribute vec4 uv4;\n attribute vec4 uv5;\n attribute vec4 uv6;\n attribute vec4 uv7;\n attribute vec4 secondary_colour;\n attribute vec4 uv9;\n#endif\n\n#ifdef BatchTable\n#ifdef Instance\n #ifdef InstanceModel\n attribute float batchId;\n #endif\n attribute float instanceId;\n#else\n attribute float batchId;\n#endif\n#endif\n\nstruct VertexFactoryIntermediates{\n vec4 position;\n vec4 vertexColor;\n vec4 secondColor;\n vec3 normal;\n vec3 normalInstance;\n vec4 uv0;\n vec4 uv1;\n float batchTableID;\n vec2 pbrTextureUV;\n};\n\nvec4 GetLocalPosition(){\n vec4 vertexPos = aPosition;\n#ifdef COMPRESS_VERTEX\n vertexPos = decode_position_min + vec4(aPosition.xyz, 1.0) * decode_position_normConstant;\n#endif\n return vertexPos;\n}\nvec4 GetUV0(){\n vec4 result = vec4(0.0);\n#ifdef TexCoord\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n vec2 texCoord0;\n texCoord0.x = aTexCoord0.x * decode_texCoord0_vNormConstant.x;\n texCoord0.y = aTexCoord0.y * decode_texCoord0_vNormConstant.y;\n result.xy = decode_texCoord0_min + texCoord0.xy;\n #else\n result.xy = decode_texCoord0_min.xy + aTexCoord0.xy * decode_texCoord0_normConstant;\n #endif // MeshOPT_Compress\n #else\n result = aTexCoord0;\n #endif // COMPRESS_TEXCOORD\n \n #ifdef InstanceRenderPipeline\n vec4 tex4Vec;\n if(aTexCoord0.y > 0.5) {\n tex4Vec = vec4(uv7.y, aTexCoord0.x, 0.0, 1.0);\n }\n else {\n tex4Vec = vec4(uv7.x, aTexCoord0.x, 0.0, 1.0);\n }\n \n result.xy = tex4Vec.xy;\n #endif\n#endif // TexCoord\n\n return uTexMatrix * result;\n}\nvec4 GetUV1(){\n vec4 result = vec4(0.0);\n#ifdef TexCoord2\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n vec2 texCoord1;\n texCoord1.x = aTexCoord1.x * decode_texCoord1_vNormConstant.x;\n texCoord1.y = aTexCoord1.y * decode_texCoord1_vNormConstant.y;\n result.xy = decode_texCoord1_min + texCoord1.xy;\n #else\n result.xy = decode_texCoord1_min.xy + aTexCoord1.xy * decode_texCoord1_normConstant;\n #endif // MeshOPT_Compress\n #else\n result = aTexCoord1;\n #endif // COMPRESS_TEXCOORD\n#endif // TexCoord2\n return result;\n}\nvec3 GetNormal(){\n#ifdef HAS_NORMAL\n vec3 realNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n #ifdef MeshOPT_Compress\n realNormal.x = aNormal.x / 127.0;\n realNormal.y = aNormal.y / 127.0;\n realNormal.z = 1.0 - abs(realNormal.x) - abs(realNormal.y);\n realNormal = normalize(realNormal);\n #else\n realNormal = czm_octDecode(aNormal.xy, normal_rangeConstant).zxy;\n #endif // MeshOPT_Compress\n #endif // COMPRESS_NORMAL \n \n #ifdef InstanceRenderPipeline\n #ifdef TexCoord\n realNormal.x = realNormal.x * uv7.z;\n #endif \n #endif\n return realNormal;\n#else\n return vec3(0.0, 0.0, 0.0);\n#endif // HAS_NORMAL \n}\nVertexFactoryIntermediates getVertexFactoryIntermediates(){\n VertexFactoryIntermediates intermediates;\n vec4 vertexPos = GetLocalPosition();\n \n#ifdef UseInstanceSkeletonMatrix\n vertexPos = uSkeletonMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n\n#ifdef InstanceRenderBIM\n mat4 worldMatrix;\n worldMatrix[0] = uv2;\n worldMatrix[1] = uv3;\n worldMatrix[2] = uv4;\n worldMatrix[3] = vec4( 0, 0, 0, 1 );\n vertexPos = vec4(vertexPos.xyz, 1.0) * worldMatrix;\n#endif\n\n#ifdef InstanceRenderPipeline\n mat4 worldMatrix;\n mat4 worldMatrix0;\n mat4 worldMatrix1;\n vec4 worldPos0;\n vec4 worldPos1;\n worldMatrix0[0] = uv1;\n worldMatrix0[1] = uv2;\n worldMatrix0[2] = uv3;\n worldMatrix0[3] = vec4( 0, 0, 0, 1 );\n worldMatrix1[0] = uv4;\n worldMatrix1[1] = uv5;\n worldMatrix1[2] = uv6;\n worldMatrix1[3] = vec4( 0, 0, 0, 1 );\n vec4 realVertex = vec4(vertexPos.xyz, 1.0);\n realVertex.x = realVertex.x * uv7.z;\n worldPos0 = realVertex * worldMatrix0;\n worldPos1 = realVertex * worldMatrix1;\n #ifdef TexCoord\n if(aTexCoord0.y > 0.5) {\n vertexPos = worldPos1;\n worldMatrix = worldMatrix1;\n }\n else {\n vertexPos = worldPos0;\n worldMatrix = worldMatrix0;\n }\n #endif\n#endif\n\n\n\n intermediates.position = vertexPos;\n intermediates.normal = GetNormal();\n#ifdef Instance\n intermediates.normalInstance = intermediates.normal * mat3(worldMatrix);\n#endif\n intermediates.uv0 = GetUV0();\n intermediates.uv1 = GetUV1();\n intermediates.vertexColor = vec4(1.0);\n#ifdef VertexColor\n intermediates.vertexColor = aColor;\n#endif\n\n#ifdef Instance\n intermediates.vertexColor *= secondary_colour;\n#endif\n\n#ifdef BatchTable\n #ifdef Instance\n float index = instanceId;\n #else\n float index = batchId;\n #endif\n \n #ifdef InstanceModel\n index = instanceId * uSkeletonCount + batchId;\n #endif\n intermediates.batchTableID = index;\n#endif\n\n#ifdef USE_BatchPBR\n intermediates.pbrTextureUV = aTexCoord1.xy;\n#endif\n\n return intermediates;\n}\n",E$19="\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef USE_TextureCoordMatrix\n attribute vec2 aTextureCoordMatrix;\n#endif\n\n#ifdef TextureBatch\n#ifdef MULTI_TEX\n attribute vec2 aTextureBatchId;\n float getTextureBatchId0(vec2 att)\n {\n return att.x;\n }\n float getTextureBatchId1(vec2 att) \n {\n return att.y;\n }\n#else\n attribute float aTextureBatchId;\n float getTextureBatchId0(float att)\n {\n return att;\n }\n#endif\n// MULTI_TEX \n varying vec4 vTexTran;\n varying vec4 vTexScale;\n varying vec4 vTexSize;\n varying vec2 vMaxMipLevel;\n void getTextureParameter(in vec4 xywh, in vec2 textureDim, inout vec2 translate, inout vec2 scale, inout vec2 texSize, inout float maxMipLevel)\n {\n float width = xywh.z;\n float height = xywh.w;\n width *= 2.0 / 3.0;\n maxMipLevel = log2(min(width, height));\n scale.x = width / textureDim.x;\n scale.y = height / textureDim.y;\n translate.x = xywh.x;\n translate.y = xywh.y;\n translate /= textureDim;\n texSize.x = width;\n texSize.y = height;\n }\n \n void getUVMatrixForBatch(vec4 xywh, vec4 xywh2) {\n if(getTextureBatchId0(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.x = -1.0;\n }\n else\n {\n getTextureParameter(xywh, uTextureDim.xy, vTexTran.xy, vTexScale.xy, vTexSize.xy, vMaxMipLevel.x);\n }\n #ifdef MULTI_TEX\n if(getTextureBatchId1(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.y = -1.0;\n }\n else\n {\n getTextureParameter(xywh2, uTextureDim.zw, vTexTran.zw, vTexScale.zw, vTexSize.zw, vMaxMipLevel.y);\n }\n #endif // MULTI_TEX \n }\n#else\n #ifdef TexCoord\n varying vec2 vTexCoordZ;\n #endif\n \n varying vec4 vTexMatrix;\n varying vec2 vIsRGBA;\t\n #ifdef TexCoord2\n varying vec4 vTexMatrix2;\n #endif // TexCoord2\n \n const float SHIFT_LEFT8 = 256.0;\n const float SHIFT_RIGHT8 = 1.0 / 256.0;\n const float SHIFT_RIGHT4 = 1.0 / 16.0;\n const float SHIFT_LEFT4 = 16.0;\n \n void computeUVMatrixFromZValue(in float nZ, inout float XTran, inout float YTran, inout float scale, inout float isRGBA)\n {\n if(nZ <= 0.0)\n {\n return;\n }\n float nDel8 = floor(nZ * SHIFT_RIGHT8);\n float nDel16 = floor(nDel8 * SHIFT_RIGHT8);\n float nDel20 = floor(nDel16 * SHIFT_RIGHT4);\n isRGBA = floor(nDel20);\n YTran = nZ - nDel8 * SHIFT_LEFT8;\n XTran = nDel8 - nDel16 * SHIFT_LEFT8;\n float nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\n scale = 1.0 / pow(2.0, nLevel);\n }\n \n void getUVMatrix(vec4 uv0, vec4 uv1) {\n vTexCoordZ.x = uv0.z;\n \n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.x = aTextureCoordMatrix.x;\n #endif // USE_TextureCoordMatrix\n \n vTexMatrix = vec4(0.0,0.0,1.0,0.0);\n vIsRGBA.x = 0.0;\n if(vTexCoordZ.x < -90000.0) {\n vTexMatrix.z = -1.0;\n }\n \n #ifndef Instance\n computeUVMatrixFromZValue(floor(vTexCoordZ.x), vTexMatrix.x, vTexMatrix.y, vTexMatrix.z, vIsRGBA.x);\n #ifdef TexCoord2\n vTexMatrix2 = vec4(0.0,0.0,1.0,0.0);\n vIsRGBA.y = 0.0;\n vTexCoordZ.y = uv1.z;\n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.y = aTextureCoordMatrix.y;\n #endif // USE_TextureCoordMatrix \n computeUVMatrixFromZValue(floor(vTexCoordZ.y), vTexMatrix2.x, vTexMatrix2.y, vTexMatrix2.z, vIsRGBA.y);\n #endif // TexCoord2\n #endif // Instance\n vTexMatrix.w = log2(uTextureWidths.x * vTexMatrix.z);\n #ifdef TexCoord2\n vTexMatrix2.w = log2(uTextureWidths.y * vTexMatrix.z);\n #endif // TexCoord2\n }\n \n#endif\n\n#endif // COMPUTE_TEXCOORD\n",P$11="\n#ifdef FALTTEN\n uniform sampler2D uFlattenTexture;\n\n vec4 getVertexByFlatten(vec4 posInLayerCoord, float layerBottom)\n {\n vec4 vecPos = uGeoMatrix * vec4(posInLayerCoord.xyz, 1.0);\n vec2 vecRatio = vec2(uRect.z - uRect.x, uRect.w - uRect.y);\n vec2 vecTexCoord = vec2(vecPos.x - uRect.x, vecPos.y - uRect.y);\n vecTexCoord.x = vecTexCoord.x / vecRatio.x;\n vecTexCoord.y = vecTexCoord.y / vecRatio.y;\n if(vecTexCoord.x > 1.0 || vecTexCoord.x < 0.0 || vecTexCoord.y > 1.0 || vecTexCoord.y < 0.0)\n {\n return posInLayerCoord;\n }\n vec4 value = texture2D(uFlattenTexture, vecTexCoord.xy);\n #ifdef UseFloatTexture\n float fHeight = value.r;\n #else\n float fHeight = czm_unpackValue(value);\n #endif\n if(vecPos.z > fHeight && value.a > 0.5)\n {\n float fDepthOffset = clamp((uCameraHeight - fHeight - layerBottom) * 0.0001 * (vecPos.z + layerBottom - fHeight), 0.001, 3.0);\n vecPos.z = fHeight + fDepthOffset;\n vecPos.w = vecPos.z;\n }\n return uInverseGeoMatrix * vec4(vecPos.xyz, 1.0);\n }\n#endif\n",w$X="\n#ifdef FusionMode\n uniform mat4 uModelView;\n uniform vec2 uPanOffset;\n\n vec4 getFusionModePosition(vec4 vertexPos)\n {\n vec4 positionCC = czm_projection * uModelView * vertexPos;\n positionCC.x += (2.0 * uPanOffset.x * positionCC.w);\n positionCC.y += (-2.0 * uPanOffset.y * positionCC.w);\n return positionCC;\n }\n#endif\n",F$13="\n#ifdef W_VISIBLE\n uniform sampler2D uCategorieTexture;\n\n void setAlphaByWValue(in float w, inout vec4 color)\n {\n float category_u = abs(w - uMinCategory);\n float category_y = ceil(category_u / uCategoryWidht) / uCategoryHeight - 0.5 / uCategoryHeight;\n float category_x = mod(category_u, uCategoryWidht) / uCategoryWidht + 0.5 / uCategoryWidht ;\n vec2 categoryTexCoord = vec2(category_x , category_y);\n float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n color.a *= 1.0 - category;\n }\n#endif\n",A$1a="\n#ifdef USE_BatchPBR\n uniform sampler2D uPBRTexture;\n varying vec2 vMetallicRoughness;\n varying vec4 vEmissiveFactor;\n varying vec3 vAlphaCutoffAndModeAndDoubleSide;\n void getPBRParamFromTexture(vec2 uv1)\n {\n float x = (uv1.x * 2.0 + 0.5)/ uPBRTexWH.x;\n float y = (uv1.x * 2.0 + 1.5)/ uPBRTexWH.x;\n vec4 pbrParam = texture2D(uPBRTexture, vec2(x, 0.5));\n vMetallicRoughness.xy = pbrParam.rg;\n vAlphaCutoffAndModeAndDoubleSide.x = pbrParam.b;\n float temp = pbrParam.a / 65536.0;\n vAlphaCutoffAndModeAndDoubleSide.y = floor(temp);\n vAlphaCutoffAndModeAndDoubleSide.z = (temp- vAlphaCutoffAndModeAndDoubleSide.y) * 65536.0;\n vEmissiveFactor = texture2D(uPBRTexture, vec2(y, 0.5));\n }\n#endif\n",B$_="\n#ifdef IMAGERY\n attribute vec2 img;\n varying vec2 imgCoord;\n#endif\n\n#ifdef Volume\n varying vec3 vecRotioCoord;\n#endif\n\n#ifdef QUAD_OUTLINE\n varying float vDistanceFromEye;\n#endif\n\n#ifdef HYPSOMETRIC\n varying vec2 vecHypTexCoord;\n#endif\n\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\n\n#ifdef SERVEREXCAVATION\n varying vec4 vServerExcavationVertexPos;\n#endif\n\n#ifdef SQRESULT\n uniform mat4 uSQViewProj;\n varying vec4 vSQ_clip_pos;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n uniform mat4 uFloodMatrixInvert;\n varying vec4 vFloodPos;\n#endif\n\n#ifdef FINAL_RESOLUTION_CLIP\n varying vec3 vertexClip;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n varying vec2 vLayerTexCoord;\n varying vec2 vModIndexAndTexIndex;\n#endif\n\nvoid s3mComputeVaryings(vec4 vertexPos)\n{\n#ifdef Volume\n vecRotioCoord = aRatio;\n#endif\n\n#ifdef FINAL_RESOLUTION_CLIP\n vertexClip = (uGeoMatrix * vec4(vertexPos.xyz, 1.0)).xyz;\n#endif\n\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n\n#ifdef SERVEREXCAVATION\n vServerExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n\n#ifdef HYPSOMETRIC\n if(uHypHasAnalysisRegion > 0.1)\n {\n float ptInRect = 1.0;\n vecHypTexCoord = calculatePolyTexCoord(uGeoMatrix * vec4(vertexPos.xyz, 1.0), uHypRect, ptInRect);\n }\n#endif\n\n#ifdef SQRESULT\n vSQ_clip_pos = uSQViewProj * vec4(vertexPos.xyz, 1.0);\n#endif\n\n#ifdef IMAGERY\n imgCoord = img;\n#endif\n\n#ifdef QUAD_OUTLINE\n vDistanceFromEye = gl_Position.z;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n const float right_8 = 65280.0;\n const float right_16 = 16711680.0;\n float pickId = vSecondColor.r * 255.0 + vSecondColor.g * right_8 + vSecondColor.b * right_16;\n vModIndexAndTexIndex.x = mod(pickId, 10.0) * 0.1;\n vModIndexAndTexIndex.y = mod(pickId, uEmissionTexAtlasCount);\n vec4 realVertexPos = uGeoMatrix * vertexPos;\n vLayerTexCoord = (realVertexPos.xy - uLayerBounds.xy) / uLayerBounds.zw;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n vFloodPos = uFloodMatrixInvert * vec4(vertexPos.xyz, 1.0);\n#endif\n}\n",N$Y="\nfloat computeWValue(inout vec4 vertexPos){\n float realWValue = vertexPos.w;\n#ifdef HypColorByZValue\n realWValue = vertexPos.z;\n#endif\n#ifdef TEXTURE_COORD_ONE_IS_W\n realWValue = aTexCoord0.x;\n#endif\n#ifdef USE_VertexWeight\n realWValue = aVertexWeight;\n #ifdef MultiTemporalWeight\n realWValue = mix(aVertexWeight, aVertexWeight_1, fMultiTemporalFactor);\n #ifdef ChangeZValue\n\t\tvertexPos.z += realWValue;\n\t\t#endif\n\t#endif\n#endif\n#ifdef COMPUTE_W_VALUE\n wValue = realWValue + uTranslationAndBottom.w;\n#endif\n return realWValue;\n}\n",R$$="\n#ifdef HYPSOMETRIC\n#include <getVolumeValue>\n\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nvarying vec2 vecHypTexCoord;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\n#endif\n\nfloat computeMixCon(float fValue)\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n if(fValue < 0.5)\n {\n distanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n }\n else\n {\n float t = floor(fValue / uHypContourInterval);\n distanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n }\n }\n else\n {\n distanceToContour = abs(fValue - uHypMaxVisibleValue);\n }\n float dxc = abs(dFdx(fValue));\n float dyc = abs(dFdy(fValue));\n float dF = max(dxc, dyc);\n return (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float fValue)\n{\n float threshold = abs(uHypCeil - uHypFloor);\n float contourRate = (fValue - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n float count = floor(finalCoord * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 contourCoord = vec2(x, y);\n return texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvec4 getContourMapColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n#ifdef Volume\n vec3 aRatioT = vecRotioCoord;\n if((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n {\n if(uVolumeType > 0.5)\n {\n vec4 volumeColor = getVolumeValue(aRatioT);\n if(uMixColorType > 0.5)\n {\n volumeColor = volumeColor * oriColor;\n }\n return volumeColor;\n }\n float noValue;\n float texTest = getVolumeValue(aRatioT, noValue);\n if(noValue > 0.5)\n {\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n#endif\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n finalColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n#endif\n return finalColor;\n}\n\n#ifdef Volume2\nfloat getContourValue(vec4 volColor) {\n float noValue = volColor.a;\n float texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\n\n float fValue;\n if(noValue > 0.5)\n {\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n \n return fValue;\n}\n\nvec4 getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n \n if(uFilterMode > 0.5) {\n vec4 finalColor = volColor * oriColor;\n\n if(uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n \n float fValue = getContourValue(volColor);\n return getContourMapColor(oriColor, fValue);\n}\n\n#else\n\nvec4 getHypsometricColor(vec4 oriColor, float wValue)\n{\n float fValue = wValue;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return getContourMapColor(oriColor, fValue);\n}\n\nvec4 getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return getContourMapColor(oriColor, wValue);\n}\n#endif\n\n#endif\n",T$12="\nvec2 calculatePolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect){\n vec4 realVertexPos = vertexPos;\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(realVertexPos.x - rectPos.x, realVertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\n",I$1i="\n#ifdef EXCAVATION\nuniform sampler2D uExcavationTexture;\nvarying vec4 vExcavationVertexPos;\nbool executeExcavation()\n{\n float hasExcavation = 1.0;\n vec2 vecExcavationTexCoord = calculatePolyTexCoord(vExcavationVertexPos, uExcavationRect, hasExcavation);\n bool excavationInside = (uExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n \n if(excavationInside)\n {\n return textureLod(uExcavationTexture, vecExcavationTexCoord.xy, 0.0).r > 0.5;\n }\n \n return textureLod(uExcavationTexture, vecExcavationTexCoord.xy, 0.0).r < 0.5;\n}\n#endif\n",W$11="\n#ifdef APPLY_SWIPE\nvoid rollerShutter(vec2 coord, vec4 region)\n{\n vec2 f = step(region.xw, coord);\n vec2 s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n#endif\n",k$_="\n#ifdef EMISSION_TEXTURE_ATLAS\nuniform sampler2D uEmissionTexAtlas;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 getEmissiveTextureAtlasColor(float w)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n for(int i = 0; i < int(uEmissionTexAtlasCount); i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n vec3 normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n float isNotTopFace = 1.0 - step(0.95, normalMC.z);\n float dayTime = 1.0 - czm_RGBToHSL(uAmbientLightColor.rgb).z;\n vec3 emissionTexColor = uEmissionColor.rgb * texColor * dayTime * isNotTopFace;\n return emissionTexColor;\n}\n\nvec3 getEmissiveTextureAtlasColor(float w, vec2 texCoord)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n for(int i = 0; i < int(uEmissionTexAtlasCount); i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n vec3 normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n float isNotTopFace = 1.0 - step(0.95, normalMC.z);\n float dayTime = 1.0 - czm_RGBToHSL(uAmbientLightColor.rgb).z;\n vec3 emissionTexColor = uEmissionColor.rgb * texColor * dayTime * isNotTopFace;\n return emissionTexColor;\n}\n#endif\n",O$P="\n#ifdef ADJUST_COLOR\nvec3 adjustColor(vec3 inputColor)\n{\n vec3 outputColor = inputColor;\n outputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\n outputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\n outputColor.rgb = czm_hue(outputColor.rgb, uHue);\n outputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\n outputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\n outputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\n return outputColor;\n}\n#endif\n",_$W="\n#ifdef CLIP\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nconst float clip_lineWidth = 3.0;\n\nfloat GetClipDistance(vec3 pos, vec3 planeNormal, float disToOrigin)\n{\n return dot(planeNormal, pos) + disToOrigin;\n}\n\nfloat ClipBehindAllPlane(float fBorderWidth, vec4 clip_vertex)\n{\n float distance = 0.0;\n float result = -1.0;\n #ifdef CLIPPLANE\n distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[0].xyz, uClipPlanes[0].w);\n if (distance < 0.0)\n {\n return 1.0;\n }\n else if (distance < fBorderWidth)\n {\n result = 0.0;\n }\n #else\n for(int i = 0; i < 6; i++)\n {\n distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[i].xyz, uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return 1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n #endif\n return result;\n}\n\nfloat ClipBehindAnyPlane(float fBorderWidth, vec4 clip_vertex)\n{\n float result = 1.0;\n for(int i = 0; i < 6; i++)\n {\n float distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[i].xyz, uClipPlanes[i].w);\n if((distance + fBorderWidth) < 0.0)\n {\n return -1.0;\n }\n else if(distance < 0.0)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nfloat ClipAnythingButLine(float fBorderWidth, vec4 clip_vertex)\n{\n float result = -1.0;\n for(int i = 0; i < 6; i++)\n {\n float distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[i].xyz, uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return -1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nvec4 clip(vec4 clip_vertex, float fIsFiltByID)\n{\n if(fIsFiltByID < 0.1)\n {\n return vec4(1.0);\n }\n if(uClipMode < 0.5)\n {\n return vec4(1.0);\n }\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2) \n float dxc = abs(dFdx(clip_vertex.x));\n float dyc = abs(dFdy(clip_vertex.y));\n float fBorderWidth = max(dxc, dyc) * clip_lineWidth;\n #else\n float fBorderWidth = clip_lineWidth;\n #endif\n float clipResult = 1.0;\n if(uClipLineColor.a < 0.01)\n {\n fBorderWidth = 0.0;\n }\n if(uClipMode < 1.5)\n {\n clipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n }\n else if(uClipMode < 2.5)\n {\n clipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n }\n else if(uClipMode < 3.5)\n {\n clipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n }\n if(clipResult < -0.5)\n {\n discard;\n }\n else if(clipResult < 0.5)\n {\n return uClipLineColor;\n }\n else\n {\n return vec4(1.0);\n }\n}\n#endif\n",j$19="\n#ifdef Volume\nuniform sampler2D uVolumeTexture;\n\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uTimeRatio;\n#endif\n\nfloat unpackVolume(vec3 packedDepth)\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\n float yOffset = floor((fLevel+0.25/uVolSideBlockCount) / uVolSideBlockCount);\n float xOffset = fLevel - yOffset * uVolSideBlockCount;\n float texCoordV = (texCoord.y * uVolHeight + yOffset * uVolBlockLength) / uVolTexLength;\n float texCoordU = (texCoord.x * uVolWidth + xOffset * uVolBlockLength) / uVolTexLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\n vec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\n vec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\n float fValue1 = clamp(unpackVolume(volumeValue1.xyz),0.0,1.0);\n float fValue2 = clamp(unpackVolume(volumeValue2.xyz),0.0,1.0);\n if(uVolFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n noValue = mix(volumeValue1.a, volumeValue2.a, ratio);\n if(volumeValue1.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(volumeValue2.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfloat getVolumeValue(vec3 texCoord, out float noValue)\n{\n float fLevel = (uVolDepth - 1.0) * texCoord.z;\n float bottomLevel= floor(fLevel);\n float topLevel = bottomLevel + 1.0;\n float ratio = topLevel - fLevel;\n vec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n vec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n float fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n fResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\n return fResult;\n}\n\nvec4 getVolumeValue(vec3 texCoord)\n{\n\tfloat fLevel = (uVolDepth - 1.0) * texCoord.z;\n\tfloat bottomLevel= floor(fLevel);\n\tfloat topLevel = bottomLevel + 1.0;\n\tfloat ratio = topLevel - fLevel;\n\tfloat yOffset1 = floor((topLevel+0.25/uVolSideBlockCount) / uVolSideBlockCount);\n\tfloat xOffset1 = topLevel - yOffset1 * uVolSideBlockCount;\n\tfloat texCoordV1 = (texCoord.y * uVolHeight + yOffset1 * uVolBlockLength)/uVolTexLength;\n\tfloat texCoordU1 = (texCoord.x * uVolWidth + xOffset1 * uVolBlockLength)/uVolTexLength;\n\tvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\n\tfloat yOffset2 = floor((bottomLevel+0.25/uVolSideBlockCount) / uVolSideBlockCount);\n\tfloat xOffset2 = bottomLevel - yOffset2 * uVolSideBlockCount;\n\tfloat texCoordV2 = (texCoord.y * uVolHeight + yOffset2 * uVolBlockLength)/uVolTexLength;\n\tfloat texCoordU2 = (texCoord.x * uVolWidth + xOffset2 * uVolBlockLength)/uVolTexLength;\n\tvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\n\n\tif(uVolFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif\n",G$1f="\nUBO_DECL_BEGIN(WaterLayer)\n UBO_PARAM vec4 uWaterColor;\n UBO_PARAM vec4 uSunColor;\n UBO_PARAM vec4 uFlowParameter;\n UBO_PARAM float uTimeVal;\n UBO_PARAM float uWaterBrightness;\n UBO_PARAM float uUseRefectMap;\n UBO_PARAM float uWaveScale;\n UBO_PARAM float uReflowWaveScale;\n UBO_PARAM float uNoiseStrength;\n UBO_PARAM float uMinVisibleValue;\n UBO_PARAM float uMaxVisibleValue;\n UBO_PARAM float uReflectMapLod;\nUBO_DECL_END\n",H$14="\n UBO_DECL_BEGIN(Polyline)\n vec4 uColor;\n vec4 uOutlineColor;\n vec4 uGapColor;\n float uEffectLineWidth;\n float uType;\n float uOutlineWidth;\n float uDashLength;\n float uDashPattern;\n float uGlowPower;\n float uIsArrow;\n UBO_DECL_END\n",q$16="\n UBO_DECL_BEGIN(RegionEffect)\n vec4 uForeColor;\n vec4 uBackColor;\n float uRotationAngle;\n float uType;\n float uLineWidthX;\n float uLineWidthY;\n float uRepeatX;\n float uRepeatY;\n float uOffsetX;\n float uOffsetY;\n UBO_DECL_END\n",z$Y="\nmat3 getNormalMatrix(mat4 viewMatrix, mat4 modelMatrix) {\n mat4 modelView = viewMatrix * modelMatrix;\n vec4 modelViewRow0 = modelView[0];\n vec4 modelViewRow1 = modelView[1]; \n vec4 modelViewRow2 = modelView[2]; \n mat3 normalMatrix = mat3(\n vec3(modelViewRow0.x, modelViewRow0.y, modelViewRow0.z), \n vec3(modelViewRow1.x, modelViewRow1.y, modelViewRow1.z), \n vec3(modelViewRow2.x, modelViewRow2.y, modelViewRow2.z));\n return normalMatrix;\n}",J$$="\nUBO_DECL_BEGIN(Shadow)\n UBO_PARAM mat4 shadowMap_matrix;\n UBO_PARAM vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;\n UBO_PARAM vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;\n UBO_PARAM mat4 shadowMap_cascadeMatrices[4];\n UBO_PARAM vec4 shadowMap_cascadeSplits[2];\n UBO_PARAM vec4 shadowMap_lightPositionEC;\n UBO_PARAM vec3 shadowMap_lightDirectionEC;\n UBO_PARAM float shadowMap_penumbraRatio;\nUBO_DECL_END\n",K$W="\n#define MAX_POINT_LIGHT_COUNT 16\n#define MAX_SPOT_LIGHT_COUNT 16\n#define MAX_DIRECTION_LIGHT_COUNT 4\nUBO_DECL_BEGIN(Light)\n UBO_PARAM vec3 uPointLightPositionEC[MAX_POINT_LIGHT_COUNT];\n UBO_PARAM vec3 uPointLightColor[MAX_POINT_LIGHT_COUNT];\n UBO_PARAM vec4 uPointLightDistanceAndDecay[MAX_POINT_LIGHT_COUNT];\n UBO_PARAM vec4 uSpotLightColorAndExponent[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec3 uSpotLightPositionEC[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec3 uSpotLightDirectionEC[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec4 uSpotLightDistanceDecayCosPenumbra[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec3 uDirectionalLightDirectionEC[MAX_DIRECTION_LIGHT_COUNT];\n UBO_PARAM vec3 uDirectionalLightDirection[MAX_DIRECTION_LIGHT_COUNT];\n UBO_PARAM vec3 uDirectionalLightColor[MAX_DIRECTION_LIGHT_COUNT];\n UBO_PARAM vec4 uAmbientLightColor;\n UBO_PARAM vec4 uSunLightColor;\n UBO_PARAM vec3 uSunDirectionEC;\n UBO_PARAM vec3 uSkyColor;\n UBO_PARAM vec3 uGroundColor;\n UBO_PARAM float uSunLightON;\n UBO_PARAM int uPointLightCount;\n UBO_PARAM int uSpotLightCount;\n UBO_PARAM int uDirLightCount;\nUBO_DECL_END\n",Q$12="\nuniform sampler2D uNormalDepthTexture;\nfloat edgeDetection(float lineWidth)\n{\n vec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\n vec2 off = lineWidth / czm_globeDepthTextureDim.xy;\n vec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\n val_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\n vec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\n val_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\n vec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\n val_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\n vec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\n val_se.xyz = (val_se.xyz * 2.0) - 1.0;\n float discontinuity = 0.0;\n float dot0 = dot(val_nw.xyz, val_se.xyz);\n float dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nvec4 sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\n vec4 outputColor = inputColor;\n float discontinuity = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0, 1.0);\n if(uFillStyle == 1.)\n {\n outputColor = lineColor;\n outputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\n outputColor.a *= lineColor.a;\n }\n else\n {\n vec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\n outputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n }\n return outputColor;\n}\n",X$Z="\nUBO_DECL_BEGIN(S3MVolume)\n UBO_PARAM float uVolSideBlockCount;\n UBO_PARAM float uVolBlockLength;\n UBO_PARAM float uVolTexLength;\n UBO_PARAM float uVolWidth;\n UBO_PARAM float uVolHeight;\n UBO_PARAM float uVolDepth;\n UBO_PARAM float uVolFilterMode;\n UBO_PARAM float uVolumeType;\nUBO_DECL_END\n",Y$Q="\nstruct IncidentLight {\n vec3 direction;\n vec3 color;\n bool visible;\n};\n\nstruct GeometricContext {\n vec3 position;\n vec3 normal;\n vec3 viewDir;\n};\n\nstruct PhysicalMaterial {\n vec3\tdiffuseColor;\n float\troughness;\n vec3\tspecularColor;\n float specularF90;\n};\n\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n\n#define saturate(a) clamp( a, 0.0, 1.0 )\n\n#include <getEnvironmentColor>\n\n//参考UE4.24实现计算精确光源的衰减\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n if ( decayExponent > 0.0 ) {\n return pow( clamp( 1.0 - lightDistance / cutoffDistance, 0.0, 1.0 ), decayExponent );\n }\n return 1.0;\n}\n",Z$11="\n\n#include <cubeUV_reflection>\n#include <hemisphereLightDecl>\nvec3 inverseTransformDirection( in vec3 dir ) {\n mat3 fixedToENU = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n const mat3 yUpToZUp = mat3(1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n return normalize( yUpToZUp * fixedToENU * dir );\n}\n\n// void indirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n// reflectedLight.indirectDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n// }\n\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\n\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n vec3 Fr = specularColor;\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\n vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\n\nvoid indirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance;\n computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n vec3 totalScattering = singleScattering + multiScattering;\n vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n reflectedLight.indirectSpecular += radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#ifdef IBL\nvec3 getIBLIrradiance( const in vec3 normal ) {\n vec3 worldNormal = inverseTransformDirection( normal );\n vec4 envMapColor = textureCubeUV( czm_hdrEnvMap, worldNormal, 1.0 );\n return envMapColor.rgb;\n}\n\nvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n vec3 reflectVec = reflect( - viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n reflectVec = inverseTransformDirection( reflectVec );\n vec4 envMapColor = textureCubeUV( czm_hdrEnvMap, reflectVec, roughness );\n return envMapColor.rgb;\n}\n#endif\n\nvoid getEnvironmentColor(GeometricContext geometry, PhysicalMaterial material, inout ReflectedLight reflectedLight)\n{\n float roughness = material.roughness;\n vec3 posEC = geometry.position;\n vec3 n = geometry.normal;\n vec3 v = geometry.viewDir;\n\n vec3 irradiance = vec3(0.0);\n vec3 radiance = vec3(0.0);\n\n#ifdef BRDF\n#ifdef IBL\n\n#ifdef KtxEnvMap\n mat3 fixedToENU = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n vec3 cubeDir = normalize( yUpToZUp * fixedToENU * reflect(-v, n) );\n vec3 worldNormal = normalize( yUpToZUp * fixedToENU * n );\n irradiance = czm_sphericalHarmonics(worldNormal, uSphericalHarmonicCoefficients);\n radiance = czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, uSpecularEnvironmentMapSize, cubeDir, roughness * uSpecularEnvironmentMapsMaximumLOD, uSpecularEnvironmentMapsMaximumLOD);\n#else\n irradiance += getIBLIrradiance( geometry.normal );\n radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n#endif\n \n#else\n vec3 positionWC = vec3(uInverseView * vec4(posEC, 1.0)) + uRelativeOrigin;\n vec3 r = normalize(uInverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(uTemeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(uInverseViewRotation * uSunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(uInverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float sunNdotL = clamp(dot(n, uSunDirectionEC), 0.001, 1.0);\n float gamma = acos(sunNdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n luminance = luminance * uSunLightON + (1.0 - uSunLightON);\n irradiance = diffuseIrradiance * luminance;\n radiance = specularIrradiance * luminance;\n#endif\n irradiance *= uEnvMapIntensity;\n radiance *= uEnvMapIntensity;\n#else\n irradiance = uAmbientLightColor.rgb * 0.6;\n#endif\n\n#ifdef HAS_HEMISPHERE_LIGHTS\n HemisphereLight hemiLight;\n hemiLight.skyColor = uSkyColor;\n hemiLight.groundColor = uGroundColor;\n hemiLight.direction = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\n irradiance += getHemisphereLightIrradiance( hemiLight, geometry );\n#endif\n\n indirectSpecular_Physical(radiance, irradiance, geometry, material, reflectedLight);\n\n}\n\n",$$_="\n#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nvarying vec3 v_logPositionEC;\n#endif\n#endif\n\nvec4 updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n\n#ifdef SHADOW_MAP\n vec3 logPositionEC = (uInverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n#endif\n coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\n\n return coords;\n}\n\nvoid vertexLogDepth() {\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0 - uCurrentFrustum.x + gl_Position.w;\n gl_Position = updatePositionDepth(gl_Position);\n#endif\n}\n",oo$1="\n#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#endif\n\nvoid writeLogDepth(float depth)\n{\n#ifdef LOG_DEPTH\n#if defined(GL_EXT_frag_depth) || defined(WEBGL2)\n if (depth <= 0.9999999 || depth > uFarDepthFromNearPlusOne) {\n discard;\n }\n#ifdef POLYGON_OFFSET\n float factor = uPolygonOffset.z;\n float units = uPolygonOffset.w;\n\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n float x = dFdx(depth);\n float y = dFdy(depth);\n float m = sqrt(x * x + y * y);\n depth += m * factor;\n#endif\n\n#endif\n\n gl_FragDepthEXT = log2(depth) * uOneOverLog2FarDepthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\n gl_FragDepthEXT += czm_epsilon7 * units;\n#endif\n\n#endif\n#endif\n}\n\n",ro$1="\n#ifndef BRDF\nconst float shininess2 = 30.0;\nconst vec3 specular = vec3(0.066666);\n\nfloat getRoughness(vec2 oriTexCoord){\n return 1.0;\n}\n\nvec4 blinnPhong(in vec4 baseColorWithAlpha, vec2 texCoord, vec2 oriTexCoord, vec3 posEC, vec3 posMC, vec3 vertexNormalEC, mat4 modelMatrix)\n{\n vec3 normalEC = getNormalEC(vNormalEC, modelMatrix, posMC);\n vec3 totalDiffuseLight = vec3(0.0);\n vec3 totalSpecularLight = vec3(0.0);\n float sunLightDiffuseWeight = max( dot( normalEC, uSunDirectionEC ), 0.0 );\n totalDiffuseLight = uSunLightColor.rgb * sunLightDiffuseWeight * uSunLightON;\n vec3 positionToEyeECDir = -normalize(posEC);\n\n #ifdef HAS_DIR_LIGHTS\n for ( int i = 0; i < uDirLightCount; i ++ )\n {\n vec3 dirVectorEC = normalize((uView * vec4(uDirectionalLightDirection[ i ], 0.0)).xyz);\n float dotProduct = dot( normalEC, dirVectorEC );\n float dirDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += uDirectionalLightColor[ i ] * dirDiffuseWeight;\n }\n #endif\n\n #ifdef HAS_POINT_LIGHTS\n for ( int i = 0; i < uPointLightCount; i ++ )\n {\n vec3 lVector = uPointLightPositionEC[i] - posEC;\n float lengthToLight = length( lVector );\n float cutoffDis = uPointLightDistanceAndDecay[i].x;\n if(lengthToLight > cutoffDis)\n {\n continue;\n }\n float attenuation = punctualLightIntensityToIrradianceFactor( lengthToLight, cutoffDis, uPointLightDistanceAndDecay[i].y);\n lVector = normalize( lVector );\n float dotProduct = dot( normalEC, lVector );\n float pointLightDiffuse = max( dotProduct, 0.0 );\n totalDiffuseLight += uPointLightColor[i] * pointLightDiffuse * attenuation;\n vec3 pointHalfVector = normalize( lVector + positionToEyeECDir );\n float pointDotNormalHalf = max( dot( normalEC, pointHalfVector ), 0.0 );\n float pointSpecularWeight = max( pow( pointDotNormalHalf, shininess2 ), 0.0 );\n float specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, pointHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * uPointLightColor[ i ] * pointSpecularWeight * pointLightDiffuse * attenuation * specularNormalization;\n }\n #endif\n\n #ifdef HAS_SPOT_LIGHTS\n vec3 positionWC = (czm_model * vec4(posMC, 1.0)).xyz;\n for ( int i = 0; i < uSpotLightCount; i ++ )\n {\n vec3 lVector = uSpotLightPositionEC[i] - posEC;\n float attenuation = punctualLightIntensityToIrradianceFactor( length( lVector ), uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\n lVector = normalize( lVector );\n float spotEffect = dot( lVector, uSpotLightDirectionEC[ i ] );\n if ( spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z ) {\n spotEffect = max( pow( max( spotEffect, 0.0 ), uSpotLightColorAndExponent[ i ].w ), 0.0 );\n float dotProduct = dot( normalEC, lVector );\n float spotDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += uSpotLightColorAndExponent[ i ].rgb * spotDiffuseWeight * attenuation * spotEffect;\n vec3 spotHalfVector = normalize( lVector + positionToEyeECDir );\n float spotDotNormalHalf = max( dot( normalEC, spotHalfVector ), 0.0 );\n float spotSpecularWeight = max( pow( spotDotNormalHalf, shininess2 ), 0.0 );\n float specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * uSpotLightColorAndExponent[ i ].rgb * spotSpecularWeight * spotDiffuseWeight * attenuation * specularNormalization * spotEffect;\n }\n }\n #endif\n\n vec3 diffuseColor = uDiffuseColor.rgb * baseColorWithAlpha.rgb;\n\n PhysicalMaterial material;\n material.diffuseColor = diffuseColor;\n material.roughness = 1.0;\n float metalness = 0.0;\n vec3 f0 = vec3(0.04);\n material.specularColor = mix(f0, baseColorWithAlpha.rgb, metalness);;\n material.specularF90 = 1.0;\n \n GeometricContext geometry;\n geometry.position = posEC;\n geometry.normal = normalEC;\n geometry.viewDir = positionToEyeECDir;\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += totalDiffuseLight * diffuseColor;\n reflectedLight.directSpecular += totalSpecularLight * uSpecularColor.rgb;\n \n getEnvironmentColor(geometry, material, reflectedLight);\n\n float shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), normalEC, -posEC.z);\n#endif\n\n vec3 color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n return vec4(LINEARtoSRGB(color.rgb), baseColorWithAlpha.a);\n}\n#endif\n",eo="\n#ifdef TexCoord\n varying vec4 vTexCoord;\n varying vec2 vTexCoordZ;\n#endif\n\n#ifdef MULTI_TEX\n varying vec4 vTexMatrix2;\n#endif\n\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef TextureBatch\n varying vec4 vTexTran;\n varying vec4 vTexScale;\n varying vec4 vTexSize;\n varying vec2 vMaxMipLevel;\n#else\n varying vec4 vTexMatrix;\n varying vec2 vIsRGBA;\n#endif\n\n#include <calculateMipLevel>\n\n#ifdef TextureBatch\n\nvec2 getBatchUV(vec2 uv, vec2 translate, vec2 scale, vec2 dim, float mipLevel)\n{\n float temp;\n vec2 texTranslate = vec2(translate.x, translate.y);\t\n\tif(mipLevel > 0.0)\n\t{\n\t\ttexTranslate.x = translate.x + scale.x;\n\t\ttemp = pow(2.0, mipLevel - 1.0);\n\t\ttexTranslate.y = translate.y + scale.y * (temp - 1.0) / temp;\n\t}\n float texScale = 1.0 / pow(2.0, mipLevel);\n\tvec2 outUV = fract(uv);\n\tfloat offsetX = pow(2.0, mipLevel) / dim.x;\n\tfloat offsetY = pow(2.0, mipLevel) / dim.y;\n\toutUV.x = clamp(outUV.x, 0.0 + offsetX, 1.0 - offsetX);\n\toutUV.y = clamp(outUV.y, 0.0 + offsetY, 1.0 - offsetY);\n\toutUV.x = outUV.x * texScale * scale.x + texTranslate.x;\n\toutUV.y = outUV.y * texScale * scale.y + texTranslate.y;\n\treturn outUV;\n}\n\n#else\n\nvec2 getUV(vec2 uv, vec2 translate, vec4 uvOffset, float scale, float width, float mipLevel, float texCoordZ) \n{\n vec2 texCoord;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n float offset = pow(2.0, mipLevel) / width;\n texCoord = clamp(texCoord, offset, 1.0 - offset);\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n texCoord = texCoord * uvOffset.zw + uvOffset.xy;\n return texCoord;\n}\n\n#endif\n\n#endif\n",mo$2="\nvec3 getNormalEC(vec3 norEC, mat4 modelMatrix, vec3 posMC) { \n float faceDirection = gl_FrontFacing ? 1.0 : -1.0;\n mat3 normalMatrix = getNormalMatrix(uView, modelMatrix);\n vec3 normalEC = normalize(norEC);\n #ifndef HAS_NORMAL\n normalEC = normalize(normalMatrix * czm_computeNormal(posMC.xyz));\n #endif\n return normalEC * faceDirection;\n} \n";const to={rainDecl:o$1a,snowDecl:r$15,hemisphereLightDecl:e$1U,pointLightDecl:m$10,spotLightDecl:t$Y,directionLightDecl:i$Z,lightSourceImpl:p$11,brdf:l$16,executeServerExcavationDecl:f$_,cubeUV_reflection:c$14,shadowReceive:a$X,shadowVisibility:n$10,globeOcean:D$$,globeAnalysis:g$17,SRGBtoLINEAR:s$W,SceneUboDecl:x$16,LayerUboDecl:d$1h,MaterialUboDecl:b$1b,MeshUboDecl:u$S,writeFragDepth:L$19,renderNormal:h$12,renderNormalAndDepth:S$V,renderPrePass:U$12,calculateMipLevel:V$Z,getTextureColorDecl:y$V,preClipFS:C$17,S3MOperationFSDecl:M$16,S3MVertexFactory:v$R,getUVMatrixDecl:E$19,getVertexByFlatten:P$11,getFusionModePosition:w$X,setAlphaByWValue:F$13,getPBRParamFromTexture:A$1a,s3mComputeVaryings:B$_,computeWValue:N$Y,HypSometric:R$$,calculatePolyTexCoord:T$12,executeExcavation:I$1i,splitClip:W$11,getEmissiveTextureAtlasColor:k$_,adjustColor:O$P,clip:_$W,getVolumeValue:j$19,WaterLayerUboDecl:G$1f,RegionEffectUboDecl:q$16,PolylineEffectUboDecl:H$14,getNormalMatrix:z$Y,ShadowUboDecl:J$$,LightUboDecl:K$W,sketchMode:Q$12,S3MVolumeUboDecl:X$Z,vertexLogDepthDecl:$$_,writeLogDepthDecl:oo$1,getEnvironmentColor:Z$11,shaderModelBase:Y$Q,blinnPhong:ro$1,calcTexCoordDecl:eo,getNormalEC:mo$2};var preClipFS="\n#include <calculatePolyTexCoord>\n#include <executeExcavation>\n#include <splitClip>\nfn preClip()\n{\n#ifdef RASTER_CULL\n czm_rasterCull();\n#endif\n#ifdef SQCLIP\n czm_spatialQueryClip();\n#endif\n#ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, Layer.uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(executeExcavation())\n {\n discard;\n }\n#endif\n}\n",writeFragDepth="\ngl_FragDepth = gl_FragCoord.z;\n",renderNormal="\n#ifdef NORMAL\nfn renderNormal(posMC : vec3<f32>) -> vec4<f32>\n{\n var normalMC : vec3<f32> = normalize(czm_computeNormal(posMC));\n normalMC = normalMC * 0.5 + vec3<f32>(0.5);\n #include <writeFragDepth>\n return vec4<f32>(normalMC, 1.0);\n}\n#endif\n",renderNormalAndDepth="\n#ifdef NORMAL_AND_DEPTH\nvarying oriVertex : vec4<f32>;\nvarying perVertexNormals : vec3<f32>;\nfn renderNormalAndDepth(posMC : vec3<f32>) -> vec4<f32>\n{\n var normal = normalize(perVertexNormals);\n var modelView = Scene.uView * Mesh.uModelMatrix;\n var modelViewMat = mat3x3<f32>(modelView[0][0], modelView[1][0], modelView[2][0], modelView[0][1], modelView[1][1], modelView[2][1], modelView[0][2], modelView[1][2], modelView[2][2]);\n var shaderNormal = vec3<f32>(modelViewMat * czm_computeNormal(posMC.xyz));\n var dLength = length(perVertexNormals);\n if(dLength <= 0.9)\n {\n normal = shaderNormal;\n }\n normal = (normal + 1.0) * 0.5;\n #include <writeFragDepth>\n return vec4<f32>(normal, 1.0);\n}\n#endif\n",renderPrePass="\nvar normalEC = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(vPositionMC.xyz));\n// 相机坐标系坐标\ngl_FragData0 = vec4<f32>(v_positionEC, 1.0);\n// 相机坐标系法线\ngl_FragData1 = vec4<f32>(normalEC, 1.0);\n// 反射率\ngl_FragData2 = vec4<f32>(0.5, 0.5, 0.5, 1.0);\n",calculateMipLevel="\nfn calculateMipLevel(inTexCoord : vec2<f32>, vecTile : vec2<f32>, fMaxMip : f32, outMipLevel : ptr<function, f32>) {\n\tvar dx = dpdx((inTexCoord * vecTile.x));\n\tvar dy = dpdy((inTexCoord * vecTile.y));\n\tvar dotX = dot(dx, dx);\n\tvar dotY = dot(dy, dy);\n\tvar dMax = max(dotX, dotY);\n\tvar dMin = min(dotX, dotY);\n\tvar offset = ((dMax - dMin) / (dMax + dMin));\n\toffset = clamp(offset, 0.0f, 1.0f);\n\tvar d = ((dMax * (1.0f - offset)) + (dMin * offset));\n\tvar mipLevel = (0.5f * log2(d));\n\tmipLevel = clamp(mipLevel, 0.0f, (fMaxMip - 1.620000005f));\n\t(*outMipLevel) = mipLevel;\n\treturn;\n }\n \n",getTextureColorDecl="\n#ifdef Has_Texture\n var uTexture : texture_2d<f32>;\n var uTextureSampler : sampler;\n\n#ifdef MULTI_TEX\n var uSecTexture : texture_2d<f32>;\n var uSecTextureSampler : sampler;\n#endif\n#ifndef NO_TEXCOORD\nstruct TextureParam {\n uv : vec2<f32>,\n dim : vec2<f32>,\n translate : vec2<f32>,\n scale : vec2<f32>,\n uvOffset : vec4<f32>,\n maxMipmapLevel : f32,\n texCoordZ : f32,\n isRGBA : f32,\n}\nfn sampleLod(uv : vec2<f32>, mipLevel : f32, bUseFirstTexture : bool) -> vec4<f32> {\n var color = vec4<f32>(1.0f, 1.0f, 1.0f, 1.0f);\n if (bUseFirstTexture) {\n color = textureSampleLevel(uTexture, uTextureSampler, uv, mipLevel);\n }\n else\n {\n#ifdef MULTI_TEX\n color = textureSampleLevel(uSecTexture, uSecTextureSampler, uv, mipLevel);\n#endif\n }\n color = sRGBToLinear(color);\n return color;\n}\n\n #ifdef TextureBatch\n fn getBatchTextureColor(textureParam : TextureParam, bUseFirstTexture : bool) -> vec4<f32>\n {\n var uv = textureParam.uv;\n var dim = textureParam.dim;\n var translate = textureParam.translate;\n var scale = textureParam.scale;\n var uvOffset = textureParam.uvOffset;\n var maxMipmapLevel = textureParam.maxMipmapLevel;\n var mipLevel = 0.0;\n calculateMipLevel(uv, dim, maxMipmapLevel, &mipLevel);\n if(maxMipmapLevel < 0.0)\n {\n return vec4(1.0);\n }\n var texCoord = getBatchUV(uv, translate, scale, dim, ceil(mipLevel));\n var colorCeil = sampleLod(texCoord, 0.0, bUseFirstTexture);\n texCoord = getBatchUV(uv, translate, scale, dim, floor(mipLevel));\n var colorFloor = sampleLod(texCoord, 0.0, bUseFirstTexture);\n return colorCeil * 0.5 + colorFloor * 0.5;\n }\n #else\n fn getTextureColor(textureParam : TextureParam, outTexCoord : ptr<function, vec2<f32>>, bUseFirstTexture : bool) -> vec4<f32> {\n var dim = textureParam.dim;\n var maxMipmapLevel = textureParam.maxMipmapLevel;\n var mipLevel = 0.0f;\n calculateMipLevel(textureParam.uv, dim, maxMipmapLevel, &(mipLevel));\n *(outTexCoord) = getUV(textureParam.uv, textureParam.translate, textureParam.uvOffset, textureParam.scale.x, dim.x, mipLevel, textureParam.texCoordZ);\n var color = sampleLod(*(outTexCoord), mipLevel, bUseFirstTexture);\n return color;\n }\n #endif\n // end TextureBatch\n\n#endif\n\nfn SRGBtoLINEAR4(srgbIn : vec4<f32>) -> vec4<f32>\n{\n var linearOut = pow(srgbIn.rgb, vec3<f32>(2.2));\n return vec4<f32>(linearOut, srgbIn.a);\n}\n\nfn getTextureColorForS3M(outTexCoord : ptr<function, vec4<f32>>, firstColor : ptr<function, vec4<f32>>, secColor : ptr<function, vec4<f32>>) -> vec4<f32> {\n #ifdef INVALID_OBLIQUE\n return vec4<f32>(0.5, 0.5, 0.5, 1.0);\n #endif\n #ifdef NO_TEXCOORD\n return SRGBtoLINEAR4(textureSample(uTexture, uTextureSampler, vec2<f32>(0.5)));\n #endif\n #ifndef NO_TEXCOORD\n var textureParam : TextureParam;\n textureParam.uv = vec2<f32>(vTexCoord.x, vTexCoord.y);\n #ifdef TextureBatch\n textureParam.dim = vTexSize.xy;\n textureParam.translate = vTexTran.xy;\n textureParam.scale = vTexScale.xy;\n textureParam.uvOffset = Material.uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.x;\n *(firstColor) = getBatchTextureColor(textureParam, true);\n #else\n var texWidth : f32;\n texWidth = (vTexMatrix.z * Material.uTextureWidths.x); \n textureParam.dim = vec2<f32>(texWidth, texWidth); \n textureParam.translate = vec2<f32>(vTexMatrix.x, vTexMatrix.y); \n textureParam.scale = vec2<f32>(vTexMatrix.z, vTexMatrix.z); \n textureParam.uvOffset = Material.uTexUVOffset; \n textureParam.maxMipmapLevel = vTexMatrix.w; \n textureParam.texCoordZ = vTexCoordZ.x;\n var param_42 = vec2<f32>((*(outTexCoord)).x, (*(outTexCoord)).y); \n *(firstColor) = getTextureColor(textureParam, &(param_42), true);\n (*outTexCoord).x = param_42.x;\n (*outTexCoord).y = param_42.y;\n #endif\n\n #ifdef MULTI_TEX\n textureParam.uv = vTexCoord.zw;\n #ifdef TextureBatch\n textureParam.dim = vTexSize.zw;\n textureParam.translate = vTexTran.zw;\n textureParam.scale = vTexScale.zw;\n textureParam.uvOffset = Material.uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.y;\n *(secColor) = getBatchTextureColor(textureParam, false);\n #else\n texWidth = vTexMatrix2.z * Material.uTextureWidths.y;\n textureParam.dim = vec2(texWidth, texWidth);\n textureParam.translate = vTexMatrix2.xy;\n textureParam.scale = vec2(vTexMatrix2.z, vTexMatrix2.z);\n textureParam.uvOffset = Material.uTexUVOffset;\n textureParam.maxMipmapLevel = vTexMatrix2.w;\n textureParam.texCoordZ = vTexCoordZ.y;\n param_42 = vec2<f32>((*(outTexCoord)).z, (*(outTexCoord)).w); \n *(secColor) = getTextureColor(textureParam, &(param_42), false);\n #endif\n return *(firstColor) * (*(secColor));\n #else\n return *(firstColor);\n #endif\n #endif\n}\n#endif\n",rainDecl="\n#ifdef HAS_RAIN\nvar uRippleTexture : texture_2d<f32>;\nvar uRippleTextureSampler : sampler;\n \nfn getTimeInfo(animationSpeed : f32, timeVec : ptr<function, vec2<f32>>)\n{\n\tvar time = Scene.uFrameNumber * animationSpeed;\n\ttime = floor(30.0 * time);\n\tvar time_diff = floor(time*0.25);\n\t//time = mod(time, 4.0);\n\ttime = (time - (4.0 * floor(time / 4.0)));\n\t//time_diff = mod(time_diff, 4.0);\n\ttime_diff = (time_diff - (4.0 * floor(time_diff / 4.0)));\n\t(*timeVec) = vec2<f32>(time, time_diff);\n}\n\nfn getPosInfo(posMC : vec4<f32>, posMC_frac1 : ptr<function, vec2<f32>>, posMC_frac2 : ptr<function, vec2<f32>>)\n{\n\tvar ripple_scale = 1.0 / Layer.uRippleScale;\n\tvar posXY = posMC.xy * ripple_scale;\n\t(*posMC_frac1) = fract(posXY);\n\tvar posStep = vec2<f32>(0.5);\n\t(*posMC_frac2) = fract(posXY + posStep);\n}\n\nfn getAlpha(posMC_frac1 : vec2<f32>) -> f32\n{\n\tvar dist = (posMC_frac1 - vec2<f32>(0.5)) * 2.0;\n\tdist = vec2<f32>(abs(dist.x), abs(dist.y));\n\tvar result = pow(dist, vec2<f32>(5.0));\n\treturn result.x + result.y;\n}\n\nfn getRippleValue(timeVec : vec2<f32>, posMC_frac1 : vec2<f32>, posMC_frac2 : vec2<f32>, alpha : f32) -> vec4<f32>\n{\n\tvar rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n\tvar rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n\tvar rippleValue_1 = textureSample(uRippleTexture, uRippleTextureSampler, rippleUV_1.xy);\n\tvar rippleValue_2 = textureSample(uRippleTexture, uRippleTextureSampler, rippleUV_2.xy);\n\treturn mix(rippleValue_1, rippleValue_2, alpha);\n}\n\nfn getRippleNormal(rippleValue : vec4<f32>, wind_intensity : f32, rain : f32, depthFade : f32) -> vec3<f32>\n{\n\tvar rippleValueXY = rippleValue.xy;\n\tvar rippleValueZW = rippleValue.zw;\n\tvar _value = vec2<f32>(0.5);\n\tvar part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n\tvar part_2 = (rippleValueXY - _value) * 0.6;\n\tvar mergedValue = mix(part_1, part_2, rain) * depthFade;\n\treturn vec3<f32>(mergedValue, 1.0);\n}\n\nfn getNormalAlpha(normalWS : vec3<f32>, wetness : f32) -> f32\n{\n\tvar valueZ = normalWS.z - 0.5;\n\tvar wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n\treturn pow(wet_correction, 15.0);\n}\n\nfn rippleNormalCorrection(rippleNormal : vec3<f32>, normalAlpha : f32) -> vec3<f32>\n{\n\tvar blueNormal = vec3<f32>(0.0, 0.0, 1.0);\n\treturn mix(blueNormal, rippleNormal, normalAlpha);\n}\n\nfn rippleGenerator(animationSpeed : f32,normalWS : vec3<f32>, wetness : f32) -> vec3<f32>\n{\n\tvar timeVec = vec2<f32>(1.0);\n\tgetTimeInfo(animationSpeed, &timeVec);\n\tvar posMC_frac1 = vec2(1.0);\n\tvar posMC_frac2 = vec2(1.0);\n\tgetPosInfo(vPositionMC, &posMC_frac1, &posMC_frac2);\n\tvar alpha = getAlpha(posMC_frac1);\n\tvar rippleValue = getRippleValue(timeVec, posMC_frac1, posMC_frac2, alpha);\n\tvar rippleNormal = getRippleNormal(rippleValue, Layer.uWindIntensity, Layer.uRain, Layer.uCameraDepth);\n\tvar normalAlpha = getNormalAlpha(normalWS, wetness);\n\treturn normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\n#endif\n",snowDecl="\n#ifdef HAS_SNOW\n\nvar uSnowMaskTexture : texture_2d<f32>;\nvar uSnowMaskTextureSampler : sampler;\n\nvar uSnowNormalTexture : texture_2d<f32>;\nvar uSnowNormalTextureSampler : sampler;\n\n// fn getSnowMaskValue(sampler2D uSnowMaskTexture, vec2 snowUV) -> vec3<f32>\n// {\n// \treturn textureSample(uSnowMaskTexture, uSnowMaskTextureSampler, snowUV).rgb;\n// }\n\nfn getSnowCoverage(snow_coverage : f32, max_snow_coverage : f32, normalWS : vec3<f32>, z_mask : f32) -> f32\n{\n\tvar normal_z = normalWS.z;\n\tnormal_z += 1.1 + z_mask;\n\tnormal_z = clamp(normal_z * 0.5, 0.0, 1.0);\n\tvar final_snow_coverage = clamp(snow_coverage, 0.0, max_snow_coverage);\n\tfinal_snow_coverage = clamp(final_snow_coverage*normal_z, 0.0, 1.0);\n\treturn final_snow_coverage;\n}\n\nfn getSnowCoverageWithMaskTexture(finalSnowCoverage : f32, heightValue : f32, snow_scatter_value : f32, snow_scatter_alpha : f32, tighten_value : f32) -> f32\n{\n\tvar scatter_value = mix(heightValue, snow_scatter_value, snow_scatter_alpha);\n\treturn clamp((tighten_value + 1.0) * finalSnowCoverage - tighten_value * scatter_value, 0.0, 1.0);\n}\n\nfn getSnowAlpha(normalWS : vec3<f32>, snow_coverage : f32, z_mask : f32) -> f32\n{\n\treturn clamp((normalWS.z + z_mask) * 5.0, 0.0, 1.0) * snow_coverage;\n}\n\nfn getFinalBaseColor(baseColor : vec3<f32>, snow_baseColor : vec3<f32>, snowAlpha : f32) -> vec3<f32>\n{\n\treturn mix(baseColor, snow_baseColor, snowAlpha);\n}\n\nfn getFinalRoughness(roughness : f32, snow_roughness : f32, snowAlpha : f32) -> f32\n{\n\treturn mix(roughness, snow_roughness, snowAlpha);\n}\n\nfn getFinalNormal(normalWS : vec3<f32>, snowNormal : vec3<f32>, blendNormalValue : f32, snow_coverage : f32) -> vec3<f32>\n{\n\tvar snowNormal_part2 = vec3<f32>(snowNormal.xy - vec2<f32>(0.5), 1.0);\n\tvar normal_alpha = (1.0 - blendNormalValue)* snow_coverage;\n\treturn mix(normalWS, snowNormal_part2, normal_alpha);\n}\n\nfn snowGenerator(snowUV : vec2<f32>, snow_coverage : f32, normalWS : ptr<function, vec3<f32>>, baseColor : ptr<function, vec3<f32>>, roughness : ptr<function, f32>)\n{\n\tvar snowMaskValue = textureSample(uSnowMaskTexture, uSnowMaskTextureSampler, snowUV).rgb;\n\tvar max_snow_coverage = 1.0;\n\tvar z_mask = 0.0;\n\tvar snowCoverage = getSnowCoverage(snow_coverage, max_snow_coverage, (*normalWS), z_mask);\n\tvar heightValue = 0.5;\n\tvar snow_scatter_value = snowMaskValue.g;\n\tvar snow_scatter_alpha = 0.5;\n\tvar tighten_value = 4.0;\n snowCoverage = getSnowCoverageWithMaskTexture(snowCoverage, heightValue, snow_scatter_value, snow_scatter_alpha, tighten_value);\n\tvar snow_alpha = getSnowAlpha((*normalWS), snowCoverage, z_mask);\n\t(*baseColor) = getFinalBaseColor((*baseColor), vec3(snowMaskValue.r), snow_alpha);\n\t(*roughness) = getFinalRoughness((*roughness), snowMaskValue.b, snow_alpha);\n\tvar snowNormalValue = textureSample(uSnowNormalTexture, uSnowNormalTextureSampler, snowUV).rgb;\n\tvar blendNormalValue = 0.3;\n\t(*normalWS) = getFinalNormal((*normalWS), snowNormalValue, blendNormalValue, snowCoverage);\n}\n\n#endif\n",directionLightDecl="\n#ifdef HAS_DIR_LIGHTS\n#endif\n",hemisphereLightDecl="\n#ifdef HAS_HEMISPHERE_LIGHTS\n\nuniform uSkyColor : array<vec3<f32>, HEMISPHERE_LIGHTS>;\nuniform uGroundColor : array<vec3<f32>, HEMISPHERE_LIGHTS>;\nuniform uHemisphereLightDirectionEC : array<vec3<f32>, HEMISPHERE_LIGHTS>;\n \nstruct HemisphereLight {\n direction : vec3<f32>;\n skyColor : vec3<f32>;\n groundColor : vec3<f32>;\n};\n\nfn getHemisphereLightIrradiance(hemiLight : HemisphereLight, geometry : GeometricContext) -> vec3<f32>{\n var dotNL = dot( geometry.normal, hemiLight.direction );\n var hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n var irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n}\n\n#endif\n",pointLightDecl="\n#ifdef HAS_POINT_LIGHTS\nstruct PointLight {\n position : vec3<f32>,\n color : vec3<f32>,\n distance : f32,\n decay : f32\n};\n\nfn getPointDirectLightIrradiance(pointLight : PointLight, geometry : GeometricContext, directLight : ptr<function,IncidentLight>) {\n var lVector = pointLight.position - geometry.position;\n (*(directLight)).direction = normalize( lVector );\n var lightDistance = length( lVector );\n (*(directLight)).color = pointLight.color;\n (*(directLight)).color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n var color = (*directLight).color;\n if(lightDistance < pointLight.distance){\n (*(directLight)).visible = true;\n }\n else{\n (*(directLight)).visible = false;\n }\n}\n\n#endif\n",spotLightDecl="\n#ifdef HAS_SPOT_LIGHTS\nstruct SpotLight {\n position : vec3<f32>;\n direction : vec3<f32>;\n color : vec3<f32>;\n distance : f32;\n decay : f32;\n coneCos : f32;\n penumbraCos : f32;\n};\n\nfn getSpotDirectLightIrradiance( spotLight : SpotLight, geometry : GeometricContext, directLight : ptr<function, IncidentLight>) {\n var lVector = spotLight.position - geometry.position;\n (*(directLight)).direction = normalize( lVector );\n var lightDistance = length( lVector );\n var angleCos = dot( directLight.direction, spotLight.direction );\n if ( angleCos > spotLight.coneCos ) {\n var spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n (*(directLight)).color = spotLight.color;\n (*(directLight)).color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n (*(directLight)).visible = true;\n } else {\n (*(directLight)).color = vec3<f32>( 0.0 );\n (*(directLight)).visible = false;\n }\n}\n\n#endif\n",lightSourceImpl="\n\nvar i= 0;\n#ifdef HAS_DIR_LIGHTS\nfor (i = 0; i < Light.uDirLightCount; i++) {\n directLight.color = Light.uDirectionalLightColor[i];\n directLight.direction = Light.uDirectionalLightDirectionEC[i];\n directLight.visible = true;\n directPhysical( directLight, geometry, material, &reflectedLight );\n}\n#endif\n\n#ifdef HAS_POINT_LIGHTS\nvar pointLight : PointLight;\nfor (i = 0; i < Light.uPointLightCount; i++) {\n pointLight.position = Light.uPointLightPositionEC[i];\n pointLight.color = Light.uPointLightColor[i];\n pointLight.distance = Light.uPointLightDistanceAndDecay[i].x;\n pointLight.decay = Light.uPointLightDistanceAndDecay[i].y;\n getPointDirectLightIrradiance( pointLight, geometry, &directLight );\n if(!directLight.visible) {\n continue;\n }\n directPhysical( directLight, geometry, material, &reflectedLight );\n}\n#endif\n\n#ifdef HAS_SPOT_LIGHTS\nvar spotLight : SpotLight;\nfor (i = 0; i < Light.uSpotLightCount; i++) {\n spotLight.position = Light.uSpotLightPositionEC[i];\n spotLight.color = Light.uSpotLightColorAndExponent[i].rgb;\n spotLight.direction = Light.uSpotLightDirectionEC[i];\n spotLight.coneCos = Light.uSpotLightDistanceDecayCosPenumbra[i].z;\n spotLight.penumbraCos = Light.uSpotLightDistanceDecayCosPenumbra[i].w;\n getSpotDirectLightIrradiance( spotLight, geometry, &directLight );\n if(!directLight.visible) {\n continue;\n }\n directPhysical( directLight, geometry, material, &reflectedLight );\n}\n#endif\n",brdf="\n const RECIPROCAL_PI = 0.31830988618;\n const M_PI = 3.141592653589793;\n const EPSILON = 1e-6;\n\n fn pow2( x : f32 ) -> f32 { return x * x; }\n\n#ifdef HAS_BASE_TEXTURE\n var uBaseTexture : texture_2d<f32>;\n var uBaseTextureSampler : sampler;\n#endif\n\n#ifdef HAS_NORMAL_TEXTURE\n var uNormalTexture : texture_2d<f32>;\n var uNormalTextureSampler : sampler;\n#endif // HAS_NORMAL_TEXTURE\n\n#ifdef HAS_EMISSIVE_TEXTURE\n var uEmissionTexture : texture_2d<f32>;\n var uEmissionTextureSampler : sampler;\n#endif\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n var uMetallicRoughnessTexture : texture_2d<f32>;\n var uMetallicRoughnessTextureSampler : sampler;\n#endif // HAS_MetallicRoughness_TEXTURE\n\n#ifdef HAS_OCCLUSION_TEXTURE\n var uOcclusionTexture : texture_2d<f32>;\n var uOcclusionTextureSampler : sampler;\n#endif\n\n#ifdef HAS_WETNESS\n uniform float uWetnessFactor;\n#endif\n\n#include <directionLightDecl>\n#include <pointLightDecl>\n#include <spotLightDecl>\n#include <snowDecl>\n#include <rainDecl>\n\nfn lambertianDiffuse(diffuseColor : vec3<f32>) -> vec3<f32>\n{\n return diffuseColor * RECIPROCAL_PI;\n}\n\nfn applyTonemapping(inLinearIn : vec3<f32>) -> vec3<f32> \n{\n var linearIn = inLinearIn;\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\n\nfn F_Schlick(f0 : vec3<f32>, f90 : f32, dotVH : f32) -> vec3<f32>\n {\n var fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\n\n\nfn GeometrySchlickGGX(roughness : f32, NoV : f32)->f32\n{\n var k = pow(roughness + 1.0, 2.0) / 8.0;\n return NoV / (NoV * (1.0 - k) + k);\n}\n\nfn D_GGX( alpha : f32, dotNH : f32 ) ->f32\n{\n var a2 = pow2( alpha );\n var denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n\nfn BRDF_GGX(lightDir : vec3<f32>, viewDir : vec3<f32>, normal : vec3<f32>, f0 : vec3<f32>, f90 : f32, roughness : f32 ) -> vec3<f32>\n{\n var alpha = roughness * roughness;\n var halfDir = normalize( lightDir + viewDir );\n var dotNL = clamp( dot( normal, lightDir ), 0.001, 1.0 );\n var dotNV = abs( dot( normal, viewDir ) ) + 0.001;\n var dotNH = saturate( dot( normal, halfDir ) );\n var dotLH = saturate( dot( lightDir, halfDir ) );\n var dotVH = saturate( dot( viewDir, halfDir ) );\n var F = F_Schlick( f0, f90, dotVH );\n var G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n var D = D_GGX( alpha, dotNH );\n return F * ( G * D ) / (4.0 * dotNL * dotNV);\n}\n\nfn directPhysical(directLight : IncidentLight, geometry : GeometricContext, material : PhysicalMaterial, reflectedLight : ptr<function, ReflectedLight> )\n {\n var dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n var irradiance = dotNL * directLight.color;\n (*(reflectedLight)).directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n (*(reflectedLight)).directDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n}\n\n#ifdef HAS_NORMAL_TEXTURE\nfn perturbNormal2Arb( eye_pos : vec3<f32>, surf_norm : vec3<f32>, uv : vec2<f32>, mapN : vec3<f32>) -> vec3<f32>\n{\n var fNormalLength = length(mapN);\n var q0 = vec3<f32>( dpdx( eye_pos.x ), dpdx( eye_pos.y ), dpdx( eye_pos.z ) );\n var q1 = vec3<f32>( dpdy( eye_pos.x ), dpdy( eye_pos.y ), dpdy( eye_pos.z ) );\n var st0 = dpdx( uv.xy );\n var st1 = dpdy( uv.xy );\n if(fNormalLength < 0.5) {\n return surf_norm;\n }\n var scale = sign( st1.y * st0.x - st0.y * st1.x );\n var S = normalize( ( q0 * st1.y - q1 * st0.y ) * scale );\n var T = normalize( ( - q0 * st1.x + q1 * st0.x ) * scale );\n var N = normalize( surf_norm );\n var tsn = mat3x3<f32>( S, T, N );\n\n var tempN = mapN * 2.0 - 1.0;\n var flip = f32( gl_FrontFacing ) * 2.0 - 1.0;\n var normMapN = vec3(tempN.x * flip, tempN.y * flip, tempN.z);\n return normalize( tsn * normMapN );\n}\n#endif\n\nfn computeSpecularOcclusion(dotNV : f32, ambientOcclusion : f32, roughness : f32) -> f32\n{\n return saturate(pow(dotNV + ambientOcclusion, exp2(-16.0 * roughness - 1.0 )) - 1.0 + ambientOcclusion);\n}\n\n#ifdef HAS_RAIN\nfn adjustByWetness(baseColor : ptr<function, vec3<f32>>, roughness : ptr<function, f32>, normalWS_wetness : vec3<f32>) {\n var fWetness = clamp(Layer.uWetnessFactor,0.0,1.0);\n var fWetness_correction = pow(4.0*fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction,clamp(fWetness,0.0,0.9),1.0);\n var fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n (*baseColor) = mix((*baseColor),(*baseColor)*0.7,fWerness_normalized);\n (*roughness) = mix((*roughness),0.05,fWerness_normalized);\n}\n#endif\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n#ifdef USE_BatchPBR\n varying vMetallicRoughness : vec2<f32>;\n varying vEmissiveFactor : vec4<f32>;\n varying vAlphaCutoffAndModeAndDoubleSide : vec3<f32>;\n#endif\n\n#ifdef PBR_THEME\n uniform uPBRMaterials : mat4x4<f32>[NUM_PBR_MATERIALS];\n varying vPBRIndex : f32;\n#endif\n\nfn getRoughness(oriTexCoord : vec2<f32>) -> f32{\n var roughness = Material.uMetallicRoughnessIntensityScale.y;\n#ifdef USE_BatchPBR\n roughness = vMetallicRoughness.y;\n#endif // USE_BatchPBR\n roughness = clamp(roughness, 0.0, 1.0);\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n var metallicRoughness = textureSample(uMetallicRoughnessTexture, uMetallicRoughnessTextureSampler, oriTexCoord.xy).rgb;\n roughness = clamp(roughness * metallicRoughness.g, 0.04f, 1.0f);\n #ifdef HAS_RAIN\n adjustByWetness(vec3<f32>(1.0), roughness, vec3<f32>(0.0));\n #endif\n#endif // HAS_MetallicRoughness_TEXTURE\n return roughness;\n}\n\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\nfn getTexcoordAndMipmapLevel(uv : vec2<f32>, texMatrix : vec4<f32>, texCoordZ : f32) -> vec3<f32> {\n var translate = texMatrix.xy;\n var textureWidth = texMatrix.z * Material.uPbrParTextureWidth;\n var scale = texMatrix.z;\n var maxMipmapLevel = texMatrix.w;\n var mipLevel = 0.0;\n calculateMipLevel(uv, vec2(textureWidth), maxMipmapLevel, &mipLevel);\n var texCoord : vec2<f32>;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n var offset = pow(2.0, mipLevel) / textureWidth;\n texCoord = clamp(texCoord, vec2(offset), vec2(1.0 - offset));\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n return vec3<f32>(texCoord.xy, mipLevel);\n}\n#endif\n\nfn brdf(inBaseColorWithAlpha : vec4<f32>, texCoord : vec2<f32>, oriTexCoord : vec2<f32>, posEC : vec3<f32>, posMC : vec4<f32>, vertexNormalEC : vec3<f32>) ->vec4<f32> {\n var uv = oriTexCoord;\n var mipmapLevel = 0.0;\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\n var uvAndMiplevel = getTexcoordAndMipmapLevel(oriTexCoord, vTexMatrix, vTexCoordZ.x);\n uv = uvAndMiplevel.xy;\n mipmapLevel = uvAndMiplevel.z;\n #endif\n\n var baseColorWithAlpha = inBaseColorWithAlpha;\n#ifndef USE_BatchPBR\n baseColorWithAlpha = baseColorWithAlpha * Material.uBaseColorFactor;\n#endif\n\n var faceDirection : f32;\n if(gl_FrontFacing){\n faceDirection = 1.0;\n } \n else {\n faceDirection = -1.0;\n }\n\n var ng : vec3<f32> = normalize(vertexNormalEC);\n #ifndef HAS_NORMAL\n ng = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(posMC.xyz));\n #endif\n \n ng = ng * faceDirection;\n#ifdef HAS_BASE_TEXTURE\n #ifdef USE_BatchPBR\n baseColorWithAlpha *= sRGBToLinear(textureSampleLevel(uBaseTexture, uBaseTextureSampler, uv.xy, mipmapLevel));\n #else\n baseColorWithAlpha = textureSample(uBaseTexture, uBaseTextureSampler, oriTexCoord.xy);\n baseColorWithAlpha = sRGBToLinear(baseColorWithAlpha) * Material.uBaseColorFactor;\n #endif\n#endif\n#ifdef HAS_NORMAL_TEXTURE\n #ifdef USE_BatchPBR\n var mapN = textureSampleLevel(uNormalTexture, uNormalTextureSampler, uv.xy, mipmapLevel).xyz;\n #else\n var mapN = textureSample(uNormalTexture, uNormalTextureSampler, uv).xyz;\n #endif\n var n = ng;\n var oriNg = perturbNormal2Arb(posEC, ng, oriTexCoord, mapN);\n if(!(oriTexCoord.x == 0.0 && oriTexCoord.y == 0.0)){\n var n = oriNg;\n }\n#else\n var n = ng;\n#endif\n\n#ifdef HAS_WETNESS\n var fixedToENU_wetness = mat3x3<f32>(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n var normalWS_wetness = normalize(fixedToENU_wetness * n);\n#endif\n#ifdef HAS_RAIN\n var modelView = Scene.uView * Mesh.uModelMatrix;\n var fixedToENU_wetness = mat3x3<f32>(modelView[0][0], modelView[1][0], modelView[2][0], modelView[0][1], modelView[1][1], modelView[2][1], modelView[0][2], modelView[1][2], modelView[2][2]);\n var normalWS_wetness = normalize(fixedToENU_wetness * n);\n n = rippleGenerator(Layer.uAnimationSpeed,normalWS_wetness,Layer.uWetnessFactor);\n#endif\n\n var baseColor = baseColorWithAlpha.rgb;\n var roughness = Material.uMetallicRoughnessIntensityScale.y;\n var metalness = Material.uMetallicRoughnessIntensityScale.x;\n var emissiveFactor = Material.uEmissiveFactor;\n\n // TODO\n// #ifdef PBR_THEME\n// var pbrIndex = int(vPBRIndex);\n// if(vPBRIndex < 0.0f)\n// {\n// return baseColorWithAlpha;\n// }\n// var pbrPar = mat4x4<f32>(0.0f);\n// for(var i = 0;i < NUM_PBR_MATERIALS;i++)\n// {\n// if(i == pbrIndex)\n// {\n// pbrPar = uPBRMaterials[i];\n// break;\n// }\n// }\n// roughness = clamp(pbrPar[0][0], 0.04f, 1.0f);\n// metalness = clamp(pbrPar[0][1], 0.0f, 1.0f);\n// baseColor = (baseColorWithAlpha / Material.uBaseColorFactor * vec4<f32>(pbrPar[0][2], pbrPar[0][3], pbrPar[1][0], pbrPar[1][1])).rgb;\n// #endif // PBR_THEME\n\n#ifdef USE_BatchPBR\n metalness = vMetallicRoughness.x;\n roughness = vMetallicRoughness.y;\n emissiveFactor = vEmissiveFactor;\n#endif // USE_BatchPBR\n metalness = clamp(metalness, 0.0, 1.0);\n roughness = clamp(roughness, 0.04, 1.0);\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n#ifdef USE_BatchPBR\n var metallicRoughness = textureSampleLevel(uMetallicRoughnessTexture, uMetallicRoughnessTextureSampler, uv, mipmapLevel).rgb;\n#else\n var metallicRoughness = textureSample(uMetallicRoughnessTexture, uMetallicRoughnessTextureSampler, oriTexCoord.xy).rgb;\n#endif\n metalness = clamp(metallicRoughness.r, 0.0f, 1.0f);\n roughness = clamp(metallicRoughness.g, 0.04f, 1.0f);\n #ifdef HAS_RAIN\n adjustByWetness(&baseColor, &roughness, normalWS_wetness);\n #endif\n #ifdef HAS_SNOW\n var modelView = Scene.uView * Mesh.uModelMatrix;\n var fixedToENU_snow = mat3x3<f32>(modelView[0][0], modelView[1][0], modelView[2][0], modelView[0][1], modelView[1][1], modelView[2][1], modelView[0][2], modelView[1][2], modelView[2][2]);\n var normalWS_snow = normalize(fixedToENU_snow * n);\n snowGenerator(oriTexCoord,Layer.uSnowCoverageFactor,&normalWS_snow,&baseColor,&roughness);\n #endif\n#endif // HAS_MetallicRoughness_TEXTURE\n\n var lightColorHdr = vec3<f32>(2.0) * Light.uSunLightColor.rgb * Light.uSunLightON;\n var l = normalize(Light.uSunDirectionEC);\n var v = -normalize(posEC);\n var h = normalize(v + l);\n var f0 = vec3<f32>(0.04);\n var diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n var specularColor = mix(f0, baseColor, metalness);\n\n var alpha = roughness * roughness;\n var dotNL = clamp( dot( n, l ), 0.001, 1.0 );\n var dotNV = abs( dot( n, v ) ) + 0.001;\n var dotNH = saturate( dot( n, h ) );\n var dotLH = saturate( dot( l, h ) );\n var dotVH = saturate( dot( v, h ) );\n var reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n var f90 = clamp(reflectance * 25.0, 0.0, 1.0);\n var F = F_Schlick( specularColor, f90, dotVH );\n var G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n var D = D_GGX( alpha, dotNH );\n var diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n var specularContribution = F * G * D / (4.0 * dotNL * dotNV);\n\n var geometryNormal = ng;\n var material : PhysicalMaterial;\n material.diffuseColor = diffuseColor;\n material.roughness = max( roughness, 0.0525 );\n material.roughness = min( material.roughness, 1.0 );\n material.specularColor = specularColor;\n material.specularF90 = 1.0;\n\n var geometry : GeometricContext;\n geometry.position = posEC;\n geometry.normal = n;\n geometry.viewDir = v;\n var reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += dotNL * lightColorHdr * diffuseContribution;\n reflectedLight.directSpecular += dotNL * lightColorHdr * specularContribution;\n\n var directLight : IncidentLight; \n #include <lightSourceImpl>\n\n getEnvironmentColor(geometry, material, &reflectedLight);\n\n#ifdef HAS_OCCLUSION_TEXTURE\n #ifdef USE_BatchPBR\n var ambientOcclusion = textureSampleLevel(uOcclusionTexture, uOcclusionTextureSampler, uv, mipmapLevel).r;\n #else\n var ambientOcclusion = textureSample(uOcclusionTexture, uOcclusionTextureSampler, oriTexCoord.xy).r;\n #endif\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n#ifdef IBL\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n#endif\n#endif // HAS_OCCLUSION_TEXTURE\n\n var shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), n, -posEC.z);\n#endif\n\n var color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n\n#ifdef HAS_EMISSIVE_TEXTURE\n var emissiveTexCoord = uv * Material.uEmissiveUVOffsetAndTiling.zw + Material.uEmissiveUVOffsetAndTiling.xy;\n var emissive = sRGBToLinear_vf3(textureSample(uEmissionTexture, uEmissionTextureSampler, emissiveTexCoord).rgb);\n emissive *= emissiveFactor.rgb;\n color += emissive;\n#else\n color += emissiveFactor.rgb;\n#endif // HAS_EMISSIVE_TEXTURE\n\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n\n #ifdef MASK\n if (baseColorWithAlpha.a < Material.uAlphaCutoff)\n {\n discard;\n }\n#endif\n return vec4(color.rgb, baseColorWithAlpha.a);\n}",S3MVertexFactory="\n\n#ifdef COMPRESS_VERTEX\n #ifdef DRACO_Compress\n attribute aPosition : vec4<u32>;\n #else\n attribute aPosition : vec4<i32>;\n #endif\n#else\n attribute aPosition : vec4<f32>;\n#endif\n\n#ifdef HAS_NORMAL\n #ifdef COMPRESS_NORMAL \n #ifdef MeshOPT_Compress\n attribute aNormal : vec2<i32>;\n #else\n attribute aNormal : vec3<i32>;\n #endif\n #else\n attribute aNormal : vec3<f32>;\n #endif\n#endif\n\n#ifdef TexCoord\n #ifdef UINT_TEXCOORD0\n attribute aTexCoord0 : vec2<i32>;\n #else\n attribute aTexCoord0 : vec4<f32>;\n #endif\n#endif\n\n#ifdef TexCoord2\n #ifdef USE_BatchPBR\n attribute aTexCoord1 : vec2<f32>;\n #else\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n attribute aTexCoord1 : vec2<i32>;\n #else\n attribute aTexCoord1 : vec2<f32>;\n #endif\n #else\n attribute aTexCoord1 : vec4<f32>;\n #endif //COMPRESS_TEXCOORD\n #endif //USE_BatchPBR\n#endif\n\n#ifdef VertexColor\n attribute aColor : vec4<u32>;\n#endif\n\n#ifdef InstanceRenderBIM\n attribute uv2 : vec4<f32>;\n attribute uv3 : vec4<f32>;\n attribute uv4 : vec4<f32>;\n attribute secondary_colour : vec4<f32>;\n //attribute uv6 : vec4<u32>;\n#endif\n\n#ifdef InstanceRenderPipeline\n attribute uv1 : vec4<f32>;\n attribute uv2 : vec4<f32>;\n attribute uv3 : vec4<f32>;\n attribute uv4 : vec4<f32>;\n attribute uv5 : vec4<f32>;\n attribute uv6 : vec4<f32>;\n attribute uv7 : vec4<f32>;\n // 新版本的管线\n #ifdef InstanceS3MB\n attribute secondary_colour : vec4<u32>;\n attribute uv9 : vec4<u32>;\n #else\n attribute secondary_colour : vec4<f32>;\n attribute uv9 : vec4<f32>;\n #endif\n#endif\n\n#ifdef BatchTable\n #ifdef Instance\n #ifdef InstanceModel\n attribute batchId : f32;\n #endif\n attribute instanceId : f32;\n #else\n attribute batchId : f32;\n #endif\n#endif // BatchTable\n\n#ifdef UseInstanceSkeletonMatrix\n //uniform uSkeletonMatrix : mat4x4<f32>;\n#endif\n\nstruct VertexFactoryIntermediates {\n position : vec4<f32>,\n vertexColor : vec4<f32>,\n secondColor : vec4<f32>,\n normal : vec3<f32>,\n normalInstance : vec3<f32>,\n uv0 : vec4<f32>,\n uv1 : vec4<f32>,\n batchTableID : f32,\n pbrTextureUV : vec2<f32>,\n }\n\nfn GetLocalPosition() -> vec4<f32>{\n#ifdef COMPRESS_VERTEX\n var iAPosition = vec4<f32>(aPosition);\n var vertexPos : vec4<f32>;\n vertexPos = Mesh.decode_position_min + vec4<f32>(iAPosition.xyz, 1.0f) * Mesh.decode_position_normConstant;\n#else\n var vertexPos = aPosition;\n#endif\n return vertexPos;\n}\n\nfn GetUV0() ->vec4<f32> {\n var result = vec4<f32>(0.0f);\n#ifdef TexCoord\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n var texCoord0 : vec2<f32>;\n texCoord0.x = f32(aTexCoord0.x) * f32(Mesh.decode_texCoord0_vNormConstant.x);\n texCoord0.y = f32(aTexCoord0.y) * f32(Mesh.decode_texCoord0_vNormConstant.y);\n result = vec4<f32>(vec2<f32>(Mesh.decode_texCoord0_min) + texCoord0.xy, 0.0f, 0.0f);\n #else\n result.xy = vec2<f32>(Mesh.decode_texCoord0_min.xy) + vec2<f32>(aTexCoord0.xy) * Mesh.decode_texCoord0_normConstant;\n #endif\n #else // COMPRESS_TEXCOORD\n result = aTexCoord0;\n #endif // COMPRESS_TEXCOORD\n \n #ifdef InstanceRenderPipeline\n var tex4Vec:vec4<f32>;\n if(aTexCoord0.y > 0.5) {\n tex4Vec = vec4<f32>(uv7.y, aTexCoord0.x, 0.0, 1.0);\n }\n else {\n tex4Vec = vec4<f32>(uv7.x, aTexCoord0.x, 0.0, 1.0);\n }\n result.x = tex4Vec.x;\n result.y = tex4Vec.y;\n #endif\n#endif // TexCoord\n\n return Material.uTexMatrix * result;\n}\nfn GetUV1() ->vec4<f32>{\n var result = vec4<f32>(0.0f);\n#ifdef TexCoord2\n #ifdef USE_BatchPBR\n result.x = aTexCoord1.x;\n result.y = aTexCoord1.y;\n #else\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n var texCoord1 :vec2<f32>;\n texCoord1.x = f32(aTexCoord1.x) * Mesh.decode_texCoord1_vNormConstant.x;\n texCoord1.y = f32(aTexCoord1.y) * Mesh.decode_texCoord1_vNormConstant.y;\n result = vec4<f32>(Mesh.decode_texCoord1_min + texCoord1.xy, 0.0f, 0.0f);\n #else\n result.x = Mesh.decode_texCoord1_min.x + aTexCoord1.x * Mesh.decode_texCoord1_normConstant.x;\n result.y = Mesh.decode_texCoord1_min.y + aTexCoord1.y * Mesh.decode_texCoord1_normConstant.y;\n #endif // MeshOPT_Compress\n #else\n result = aTexCoord1;\n #endif // COMPRESS_TEXCOORD\n #endif\n#endif // TexCoord2\n return result;\n}\nfn GetNormal() ->vec3<f32> {\n#ifdef HAS_NORMAL\n var realNormal : vec3<f32>;\n #ifdef COMPRESS_NORMAL\n var fANormal = vec2<f32>(aNormal.xy);\n #ifdef MeshOPT_Compress\n realNormal.x = fANormal.x / 127.0f;\n realNormal.y = fANormal.y / 127.0f;\n realNormal.z = 1.0f - abs(realNormal.x) - abs(realNormal.y);\n realNormal = normalize(realNormal);\n #else\n realNormal = czm_octDecode(fANormal.xy, Mesh.normal_rangeConstant).zxy;\n #endif // MeshOPT_Compress\n #else\n realNormal = aNormal;\n #endif // COMPRESS_NORMAL \n \n #ifdef InstanceRenderPipeline\n realNormal.x = realNormal.x * uv7.z;\n #endif\n return realNormal;\n#else\n return vec3<f32>(0.0f, 0.0f, 0.0f);\n#endif // HAS_NORMAL \n}\n\nfn GetVertexFactoryIntermediates() -> VertexFactoryIntermediates {\n var intermediates : VertexFactoryIntermediates;\n var vertexPos = GetLocalPosition();\n\n#ifdef UseInstanceSkeletonMatrix\n vertexPos = Mesh.uSkeletonMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n \n#ifdef InstanceRenderBIM\n var worldMatrix:mat4x4<f32>;\n worldMatrix[0] = uv2;\n worldMatrix[1] = uv3;\n worldMatrix[2] = uv4;\n worldMatrix[3] = vec4( 0, 0, 0, 1 );\n vertexPos = vec4(vertexPos.xyz, 1.0) * worldMatrix;\n#endif\n\n#ifdef InstanceRenderPipeline\n var worldMatrix:mat4x4<f32>;\n var worldMatrix0:mat4x4<f32>;\n var worldMatrix1:mat4x4<f32>;\n var worldPos0:vec4<f32>;\n var worldPos1:vec4<f32>;\n worldMatrix0[0] = uv1;\n worldMatrix0[1] = uv2;\n worldMatrix0[2] = uv3;\n worldMatrix0[3] = vec4<f32>( 0, 0, 0, 1 );\n worldMatrix1[0] = uv4;\n worldMatrix1[1] = uv5;\n worldMatrix1[2] = uv6;\n worldMatrix1[3] = vec4<f32>( 0, 0, 0, 1 );\n var realVertex = vec4<f32>(vertexPos.xyz, 1.0);\n realVertex.x = realVertex.x * uv7.z;\n worldPos0 = realVertex * worldMatrix0;\n worldPos1 = realVertex * worldMatrix1;\n #ifdef TexCoord\n if(aTexCoord0.y > 0.5) {\n vertexPos = worldPos1;\n worldMatrix = worldMatrix1;\n }\n else {\n vertexPos = worldPos0;\n worldMatrix = worldMatrix0;\n }\n #endif\n#endif\n\n intermediates.position = vertexPos;\n intermediates.normal = GetNormal();\n#ifdef Instance\n intermediates.normalInstance = intermediates.normal * mat3x3<f32>(worldMatrix[0].xyz,worldMatrix[1].xyz,worldMatrix[2].xyz);\n#endif\n intermediates.uv0 = GetUV0();\n intermediates.uv1 = GetUV1();\n \n#ifdef VertexColor\n var fColor = vec4<f32>(aColor);\n intermediates.vertexColor = vec4<f32>(fColor.r / 255.0f, fColor.g / 255.0f, fColor.b / 255.0f, fColor.a / 255.0f);\n#else\n intermediates.vertexColor = vec4<f32>(1.0);\n#endif\n\n#ifdef Instance\n #ifdef InstanceRenderPipeline\n #ifdef InstanceS3MB\n var fSecondary = vec4<f32>(secondary_colour);\n intermediates.vertexColor *= vec4<f32>(fSecondary.r / 255.0f, fSecondary.g / 255.0f, fSecondary.b / 255.0f, fSecondary.a / 255.0f);\n #else\n intermediates.vertexColor *= vec4<f32>(secondary_colour);\n #endif\n #else\n intermediates.vertexColor *= vec4<f32>(secondary_colour);\n #endif\n#endif\n\n#ifdef BatchTable\n #ifdef Instance\n var index = instanceId;\n #else\n var index = batchId;\n #endif\n \n #ifdef InstanceModel\n index = instanceId * Mesh.uSkeletonCount + batchId;\n #endif\n intermediates.batchTableID = index;\n#endif\n\n#ifdef USE_BatchPBR\n intermediates.pbrTextureUV.x = f32(aTexCoord1.x);\n intermediates.pbrTextureUV.y = f32(aTexCoord1.y);\n#endif\n return intermediates;\n}\n",getUVMatrixDecl="\n#ifdef TexCoord\n varying vTexCoordZ : vec2<f32>;\n#endif\n\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef USE_TextureCoordMatrix\n attribute aTextureCoordMatrix : vec2<f32>;\n#endif\n\n#ifdef TextureBatch\n #ifdef MULTI_TEX\n attribute aTextureBatchId : vec2<f32>;\n\n fn getTextureBatchId0(att : vec2<f32>) -> f32\n {\n return att.x;\n }\n fn getTextureBatchId1(att : vec2<f32>) ->f32 \n {\n return att.y;\n }\n #else\n attribute aTextureBatchId : f32;\n\n fn getTextureBatchId0(att : f32) -> f32\n {\n return att;\n }\n #endif // MULTI_TEX \n varying vTexTran : vec4<f32>;\n varying vTexScale : vec4<f32>;\n varying vTexSize : vec4<f32>;\n varying vMaxMipLevel : vec2<f32>;\n fn getTextureParameter(xywh : vec4<f32>, textureDim : vec2<f32>, translate : ptr<function, vec2<f32>>, scale : ptr<function, vec2<f32>>, texSize : ptr<function, vec2<f32>>, \n maxMipLevel : ptr<function, f32>)\n {\n var width = xywh.z;\n var height = xywh.w;\n width *= 2.0 / 3.0;\n (*maxMipLevel) = log2(min(width, height));\n var tempScale : vec2<f32>;\n tempScale.x = width / textureDim.x;\n tempScale.y = height / textureDim.y;\n (*scale) = tempScale;\n var tempTranslate : vec2<f32>;\n tempTranslate.x = xywh.x;\n tempTranslate.y = xywh.y;\n tempTranslate /= textureDim;\n (*translate) = tempTranslate;\n var tempTexSize : vec2<f32>;\n tempTexSize.x = width;\n tempTexSize.y = height;\n (*texSize) = tempTexSize;\n }\n \n fn getUVMatrixForBatch(xywh : vec4<f32>, xywh2 : vec4<f32>) {\n if(getTextureBatchId0(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.x = -1.0;\n }\n else\n {\n var outTexTran = vec2(vTexTran.xy);\n var outTexScale = vec2(vTexScale.xy);\n var outTexSize = vec2(vTexSize.xy);\n var outMaxMipLevel = vMaxMipLevel.x;\n getTextureParameter(xywh, Material.uTextureDim.xy, &outTexTran, &outTexScale, &outTexSize, &outMaxMipLevel);\n vTexTran = vec4(outTexTran.x, outTexTran.y, vTexTran.z, vTexTran.w);\n vTexScale = vec4(outTexScale.x, outTexScale.y, vTexScale.z, vTexScale.w);\n vTexSize = vec4(outTexSize.x, outTexSize.y, vTexSize.z, vTexSize.w);\n vMaxMipLevel.x = outMaxMipLevel;\n\n }\n #ifdef MULTI_TEX\n if(getTextureBatchId0(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.y = -1.0;\n }\n else\n {\n var outTexTran = vec2(vTexTran.zw);\n var outTexScale = vec2(vTexScale.zw);\n var outTexSize = vec2(vTexSize.zw);\n var outMaxMipLevel = vMaxMipLevel.y;\n getTextureParameter(xywh2, Material.uTextureDim.zw, &outTexTran, &outTexScale, &outTexSize, &outMaxMipLevel);\n vTexTran = vec4(vTexTran.x, vTexTran.y, outTexTran.x, outTexTran.y);\n vTexScale = vec4(vTexScale.x, vTexScale.y, outTexScale.x, outTexScale.y);\n vTexSize = vec4(vTexSize.x, vTexSize.y, outTexSize.x, outTexSize.y);\n vMaxMipLevel.y = outMaxMipLevel;\n }\n #endif // MULTI_TEX \n }\n#else\n varying vTexMatrix : vec4<f32>;\n\n #ifdef TexCoord2\n varying vTexMatrix2 : vec4<f32>;\n #endif // TexCoord2\n \nconst SHIFT_LEFT8 : i32 = 256;\n\nfn computeUVMatrixFromZValue(nZ : i32, XTran : ptr<function, f32>, YTran : ptr<function, f32>, scale : ptr<function, f32>, isRGBA : ptr<function, f32>) {\n var nDel8 : i32;\n var nDel16 : i32;\n var nLevel : i32;\n if (nZ < i32(0)) {\n return;\n }\n nDel8 = nZ / SHIFT_LEFT8;\n nDel16 = nDel8 / SHIFT_LEFT8;\n *(YTran) = f32(nZ - nDel8 * SHIFT_LEFT8);\n *(XTran) = f32(nDel8 - nDel16 * SHIFT_LEFT8);\n nLevel = nDel16;\n *(scale) = 1.0 / pow(2.0, f32(nLevel));\n}\n\nfn getUVMatrix(uv0 : vec4<f32>, uv1 : vec4<f32>) { \n var param_1 : f32; \n var param_2 : f32; \n var param_3 : f32; \n var param_4 : f32;\n vTexCoordZ.x = uv0.z;\n\n#ifdef USE_TextureCoordMatrix\n vTexCoordZ.x = aTextureCoordMatrix.x;\n#endif // USE_TextureCoordMatrix\n\n vTexMatrix = vec4<f32>(0.0f, 0.0f, 1.0f, 0.0f); \n if ((vTexCoordZ.x < -90000.0f)) \n { \n vTexMatrix.z = -1.0f; \n } \n param_1 = vTexMatrix.x; \n param_2 = vTexMatrix.y; \n param_3 = vTexMatrix.z; \n computeUVMatrixFromZValue(i32(round(vTexCoordZ.x)), ¶m_1, ¶m_2, ¶m_3, ¶m_4); \n vTexMatrix.x = param_1; \n vTexMatrix.y = param_2; \n vTexMatrix.z = param_3;\n#ifdef TexCoord2\n vTexMatrix2 = vec4(0.0,0.0,1.0,0.0);\n vTexCoordZ.y = uv1.z;\n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.y = aTextureCoordMatrix.y;\n #endif // USE_TextureCoordMatrix\n param_1 = vTexMatrix2.x; \n param_2 = vTexMatrix2.y; \n param_3 = vTexMatrix2.z; \n computeUVMatrixFromZValue(i32(round(vTexCoordZ.y)), &(param_1), &(param_2), &(param_3), &(param_4));\n vTexMatrix2.x = param_1; \n vTexMatrix2.y = param_2; \n vTexMatrix2.z = param_3;\n#endif // TexCoord2\n vTexMatrix.w = log2((Material.uTextureWidths.x * vTexMatrix.z));\n#ifdef TexCoord2\n vTexMatrix2.w = log2(Material.uTextureWidths.y * vTexMatrix.z);\n#endif // TexCoord2\n return;\n} \n \n#endif\n\n#endif // COMPUTE_TEXCOORD\n",S3MOperationFSDecl="\n#ifdef VISIBLEDISTANCEMAX\nuniform float uVisibleDistanceMax;\nvoid getAlphaByDistance(vec3 positionEC, inout vec4 color) {\n if(length(positionEC) > uVisibleDistanceMax)\n {\n float minAlpha = min(1.0, (length(positionEC) - uVisibleDistanceMax) / 2000.0);\n color.a = 1.0 - minAlpha;\n }\n}\n#endif\n\n#ifdef OVERLAY\nvar uOverlayTexture : texture_2d<f32>;\nvar uOverlayTextureSampler : sampler;\nfn getOverlayColor(color : ptr<function, vec4<f32>>)\n{\n var ptInRect = 1.0;\n var vertexPos = Mesh.uGeoMatrix * vec4(vPositionMC.xyz, 1.0);\n var uv = calculatePolyTexCoord(vertexPos, Layer.uOverlayRect, &ptInRect);\n if(ptInRect > 0.5)\n {\n var oldColor = vec4((*color).r, (*color).g, (*color).b, (*color).a);\n var overlayColor = textureSampleLevel(uOverlayTexture, uOverlayTextureSampler, uv.xy, 0.0);\n if(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n {\n var mixColor = mix(oldColor, overlayColor, overlayColor.a);\n (*color) = vec4<f32>(mixColor.r, mixColor.g, mixColor.b, oldColor.a);\n }\n }\n \n}\n#endif\n\n#ifdef HORIZONTAL_LINE\nuniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}\n#endif\n\n#ifdef IMAGERY\nvarying imgCoord : vec2<f32>;\n//uniform sampler2D uImgTexture;\n//uniform float uImgTextureAlpha;\n//uniform vec2 uImgTextureBound;\n//#if TEXTURE_UNITS > 0\nvar u_dayTextures : array<texture_2d<f32>, TEXTURE_UNITS>;\nvar u_dayTexturesSampler : sampler;\nuniform u_dayTextureTranslationAndScale : array<vec4<f32>, TEXTURE_UNITS>;\nuniform u_dayTextureSize : array<vec4<f32>, TEXTURE_UNITS>;\nuniform u_dayTextureUseWebMercatorT : array<u32, TEXTURE_UNITS>;\nuniform u_dayTextureFlipY : array<u32, TEXTURE_UNITS>;\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform u_transparentBackColor : array<vec4<f32>, TEXTURE_UNITS>;\nuniform u_imageryClipEnable : array<u32, TEXTURE_UNITS>;\n\n#ifdef APPLY_ALPHA\nuniform u_dayTextureAlpha : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_SPLIT\nuniform u_dayTextureSplit : array<vec2<f32>, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_SWIPE\nuniform u_dayTextureSwipeRegion : array<vec4<f32>, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform u_GlobeSplitDirection : vec2<f32>;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform u_GlobeSwipeRegion : vec4<f32>;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform u_dayTextureBrightness : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform u_dayTextureContrast : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_HUE\nuniform u_dayTextureHue : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_SATURATION\nuniform u_dayTextureSaturation : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_GAMMA\nuniform u_dayTextureOneOverGamma : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform u_dayTextureCutoutRectangles : array<vec4<f32>, TEXTURE_UNITS>;\n#endif\n\nuniform u_dayTextureTexCoordsRectangle : array<vec4<f32>, TEXTURE_UNITS>;\n//#endif\n\nfn getImageryColor(color : ptr<function, vec4<f32>>)\n{\n\tvar texcood = vec2<f32>(imgCoord.x / Mesh.uImgTextureBound.x, imgCoord.y / Mesh.uImgTextureBound.y);\n#ifdef MULTIBATCH\n\t(*color) = computeDayColor(vec4<f32>(1.0,1.0,1.0,0.0), clamp(vec3<f32>(texcood,0.0), vec3<f32>(0.0), vec3<f32>(1.0)));\n#else\n\t(*color) = computeDayColor((*color), clamp(vec3<f32>(texcood, 0.0), vec3<f32>(0.0), vec3<f32>(1.0)));\n#endif\n}\n#endif\n\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nvoid getFloodWaterColor(inout vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n}\n#endif\n\n#ifdef TRANSPARENT_BACK_COLOR\nuniform vec4 uTransparentBackColor;\nuniform float uTransparentBackColorTolerance;\n\nvoid transparentColorClip(vec4 color)\n{\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - color.r);\n float gDiff = abs(uTransparentBackColor.g - color.g);\n float bDiff = abs(uTransparentBackColor.b - color.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n}\n#endif\n",shadowReceive="\n#ifdef USE_CUBE_MAP_SHADOW\n var shadowMap_textureCube : texture_cube<f32>;\n var shadowMap_textureCubeSampler : sampler;\n#else\n var shadowMap_texture : texture_2d<f32>;\n var shadowMap_textureSampler : sampler;\n #ifdef USE_PCSS\n var u_shadowDepth : texture_depth_2d;\n var u_shadowDepthSampler : sampler_comparison;\n #endif\n#endif\n\n#ifdef HAS_CASCADES\n\nfn cascadeWeights(depthEye : f32) -> vec4<f32>\n{\n // One component is set to 1.0 and all others set to 0.0.\n var near = step(Shadow.shadowMap_cascadeSplits[0], vec4<f32>(depthEye));\n var far = step(vec4<f32>(depthEye), Shadow.shadowMap_cascadeSplits[1]);\n return near * far;\n}\n\nfn cascadeMatrix(weights : vec4<f32>) -> mat4x4<f32>\n{\n return Shadow.shadowMap_cascadeMatrices[0] * weights.x +\n Shadow.shadowMap_cascadeMatrices[1] * weights.y +\n Shadow.shadowMap_cascadeMatrices[2] * weights.z +\n Shadow.shadowMap_cascadeMatrices[3] * weights.w;\n}\n#endif\n\n#include <shadowVisibility>\n\n// Offset the shadow position in the direction of the normal for perpendicular and back faces\n\nfn applyNormalOffset(positionEC : ptr<function, vec4<f32>>, normalEC : vec3<f32>, nDotL : f32)\n{\n#ifdef APPLY_NORMAL_OFFSET\n var normalOffset = Shadow.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;\n var normalOffsetScale = 1.0 - nDotL;\n var offset = normalOffset * normalOffsetScale * normalEC;\n var newPositionEC = (*positionEC).xyz + offset;\n var w = (*positionEC).w;\n (*positionEC) = vec4(newPositionEC, w);\n#endif // APPLY_NORMAL_OFFSET\n}\n\nfn getShadowVisibility(inPositionEC : vec4<f32>, normalEC : vec3<f32>, depth : f32) -> f32\n{\n var positionEC : vec4<f32> = inPositionEC;\n var shadowParameters : czm_shadowParameters;\n shadowParameters.texelStepSize = Shadow.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\n shadowParameters.depthBias = Shadow.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\n shadowParameters.normalShadingSmooth = Shadow.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\n shadowParameters.darkness = Shadow.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\n\n var visibility = 1.0;\n\n #ifdef IS_TERRAIN\n // Scale depth bias based on view distance to reduce z-fighting in distant terrain\n shadowParameters.depthBias *= max(depth * 0.01, 1.0);\n #endif // IS_TERRAIN\n\n shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);\n \n #ifdef USE_CUBE_MAP_SHADOW // POINT_LIGHT\n var directionEC : vec3<f32> = positionEC.xyz - Shadow.shadowMap_lightPositionEC.xyz;\n var distance = length(directionEC);\n directionEC = normalize(directionEC);\n var radius = Shadow.shadowMap_lightPositionEC.w;\n // Stop early if the fragment is beyond the point light radius\n if (distance > radius)\n {\n return visibility;\n }\n var directionWC : vec3<f32> = czm_inverseViewRotation * directionEC;\n \n shadowParameters.depth = distance / radius;\n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n \n shadowParameters.texCoords = directionWC;\n visibility = shadowVisibility(shadowParameters);\n #endif // USE_CUBE_MAP_SHADOW\n \n #ifdef SPOT_LIGHT_SHADOW\n var directionEC = normalize(positionEC.xyz - Shadow.shadowMap_lightPositionEC.xyz);\n var nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n applyNormalOffset(&positionEC, normalEC, nDotL);\n var shadowPosition = Shadow.shadowMap_matrix * positionEC;\n // Spot light uses a perspective projection, so perform the perspective divide\n shadowPosition /= shadowPosition.w;\n \n // Stop early if the fragment is not in the shadow bounds\n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n {\n return visibility;\n }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n \n visibility = shadowVisibility(shadowParameters);\n #endif // SPOT_LIGHT_SHADOW\n \n #ifdef HAS_CASCADES\n var maxDepth = Shadow.shadowMap_cascadeSplits[1].w;\n // Stop early if the eye depth exceeds the last cascade\n if (depth > maxDepth)\n {\n return visibility;\n }\n \n // Get the cascade based on the eye-space depth\n var weights : vec4<f32> = cascadeWeights(depth);\n \n // Apply normal offset\n var nDotL = clamp(dot(normalEC, Shadow.shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(&positionEC, normalEC, nDotL);\n \n var cascadeMatrix : mat4x4<f32>;\n var nextCascadeMatrix : mat4x4<f32>;\n var csmBlend = false;\n var diffRatio = 0.0;\n var shadowMapIndex = 0.0;\n if(weights.x > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[0];\n nextCascadeMatrix = Shadow.shadowMap_cascadeMatrices[1];\n csmBlend = weights.y > 0.0;\n diffRatio = (depth - Shadow.shadowMap_cascadeSplits[0].y) / (Shadow.shadowMap_cascadeSplits[1].x - Shadow.shadowMap_cascadeSplits[0].y);\n shadowMapIndex = 0.0;\n }\n else if(weights.y > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[1];\n nextCascadeMatrix = Shadow.shadowMap_cascadeMatrices[2];\n csmBlend = weights.z > 0.0;\n diffRatio = (depth - Shadow.shadowMap_cascadeSplits[0].z) / (Shadow.shadowMap_cascadeSplits[1].y - Shadow.shadowMap_cascadeSplits[0].z);\n shadowMapIndex = 1.0;\n }\n else if(weights.z > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[2];\n nextCascadeMatrix = Shadow.shadowMap_cascadeMatrices[3];\n csmBlend = weights.w > 0.0;\n diffRatio = (depth - Shadow.shadowMap_cascadeSplits[0].w) / (Shadow.shadowMap_cascadeSplits[1].z - Shadow.shadowMap_cascadeSplits[0].w);\n shadowMapIndex = 2.0;\n }\n else if(weights.w > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[3];\n shadowMapIndex = 3.0;\n }\n var shadowPosition = cascadeMatrix * positionEC;\n \n // Get visibility\n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n shadowParameters.shadowMapIndex = shadowMapIndex;\n visibility = shadowVisibility(shadowParameters);\n\n if(csmBlend){\n var nextVisibility = 0.0;\n var nextShadowPosition = nextCascadeMatrix * positionEC;\n shadowParameters.texCoords = nextShadowPosition.xy;\n shadowParameters.depth = nextShadowPosition.z;\n shadowParameters.shadowMapIndex = shadowMapIndex + 1.0;\n nextVisibility = shadowVisibility(shadowParameters);\n visibility = mix(visibility, nextVisibility, diffRatio);\n // Draw cascade blend colors for debugging\n //gl_FragColor *= vec4<f32>(diffRatio, 0.0, 0.0, 1.0);\n }\n \n // Fade out shadows that are far away\n var shadowMapMaximumDistance = Shadow.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;\n var fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);\n visibility = mix(visibility, 1.0, fade);\n \n visibility = clamp(visibility, 0.0, 1.0);\n\n //// Draw cascade colors for debugging\n //gl_FragColor *= czm_cascadeColor(weights);\n #endif // HAS_CASCADES\n \n #ifdef NO_CASCADES\n var nDotL = clamp(dot(normalEC, Shadow.shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(&positionEC, normalEC, nDotL);\n var shadowPosition = Shadow.shadowMap_matrix * positionEC;\n \n // Stop early if the fragment is not in the shadow bounds\n // if (any(lessThan(shadowPosition.xyz, vec3<f32>(0.0))) || any(greaterThan(shadowPosition.xyz, vec3<f32>(1.0))))\n // {\n // return visibility;\n // }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n visibility = shadowVisibility(shadowParameters);\n #endif // NO_CASCADES\n\n return visibility;\n}\n",shadowVisibility="\n#ifdef USE_PCSS\nconst PoissonSamplers32 = array<vec3<f32>, 64>(\n vec3(0.06407013, 0.05409927, 0.),\n vec3(0.7366577, 0.5789394, 0.),\n vec3(-0.6270542, -0.5320278, 0.),\n vec3(-0.4096107, 0.8411095, 0.),\n vec3(0.6849564, -0.4990818, 0.),\n vec3(-0.874181, -0.04579735, 0.),\n vec3(0.9989998, 0.0009880066, 0.),\n vec3(-0.004920578, -0.9151649, 0.),\n vec3(0.1805763, 0.9747483, 0.),\n vec3(-0.2138451, 0.2635818, 0.),\n vec3(0.109845, 0.3884785, 0.),\n vec3(0.06876755, -0.3581074, 0.),\n vec3(0.374073, -0.7661266, 0.),\n vec3(0.3079132, -0.1216763, 0.),\n vec3(-0.3794335, -0.8271583, 0.),\n vec3(-0.203878, -0.07715034, 0.),\n vec3(0.5912697, 0.1469799, 0.),\n vec3(-0.88069, 0.3031784, 0.),\n vec3(0.5040108, 0.8283722, 0.),\n vec3(-0.5844124, 0.5494877, 0.),\n vec3(0.6017799, -0.1726654, 0.),\n vec3(-0.5554981, 0.1559997, 0.),\n vec3(-0.3016369, -0.3900928, 0.),\n vec3(-0.5550632, -0.1723762, 0.),\n vec3(0.925029, 0.2995041, 0.),\n vec3(-0.2473137, 0.5538505, 0.),\n vec3(0.9183037, -0.2862392, 0.),\n vec3(0.2469421, 0.6718712, 0.),\n vec3(0.3916397, -0.4328209, 0.),\n vec3(-0.03576927, -0.6220032, 0.),\n vec3(-0.04661255, 0.7995201, 0.),\n vec3(0.4402924, 0.3640312, 0.),\n\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.)\n);\n\nconst PoissonSamplers64 =array<vec3<f32>, 64>(\n vec3(-0.613392, 0.617481, 0.),\n vec3(0.170019, -0.040254, 0.),\n vec3(-0.299417, 0.791925, 0.),\n vec3(0.645680, 0.493210, 0.),\n vec3(-0.651784, 0.717887, 0.),\n vec3(0.421003, 0.027070, 0.),\n vec3(-0.817194, -0.271096, 0.),\n vec3(-0.705374, -0.668203, 0.),\n vec3(0.977050, -0.108615, 0.),\n vec3(0.063326, 0.142369, 0.),\n vec3(0.203528, 0.214331, 0.),\n vec3(-0.667531, 0.326090, 0.),\n vec3(-0.098422, -0.295755, 0.),\n vec3(-0.885922, 0.215369, 0.),\n vec3(0.566637, 0.605213, 0.),\n vec3(0.039766, -0.396100, 0.),\n vec3(0.751946, 0.453352, 0.),\n vec3(0.078707, -0.715323, 0.),\n vec3(-0.075838, -0.529344, 0.),\n vec3(0.724479, -0.580798, 0.),\n vec3(0.222999, -0.215125, 0.),\n vec3(-0.467574, -0.405438, 0.),\n vec3(-0.248268, -0.814753, 0.),\n vec3(0.354411, -0.887570, 0.),\n vec3(0.175817, 0.382366, 0.),\n vec3(0.487472, -0.063082, 0.),\n vec3(-0.084078, 0.898312, 0.),\n vec3(0.488876, -0.783441, 0.),\n vec3(0.470016, 0.217933, 0.),\n vec3(-0.696890, -0.549791, 0.),\n vec3(-0.149693, 0.605762, 0.),\n vec3(0.034211, 0.979980, 0.),\n vec3(0.503098, -0.308878, 0.),\n vec3(-0.016205, -0.872921, 0.),\n vec3(0.385784, -0.393902, 0.),\n vec3(-0.146886, -0.859249, 0.),\n vec3(0.643361, 0.164098, 0.),\n vec3(0.634388, -0.049471, 0.),\n vec3(-0.688894, 0.007843, 0.),\n vec3(0.464034, -0.188818, 0.),\n vec3(-0.440840, 0.137486, 0.),\n vec3(0.364483, 0.511704, 0.),\n vec3(0.034028, 0.325968, 0.),\n vec3(0.099094, -0.308023, 0.),\n vec3(0.693960, -0.366253, 0.),\n vec3(0.678884, -0.204688, 0.),\n vec3(0.001801, 0.780328, 0.),\n vec3(0.145177, -0.898984, 0.),\n vec3(0.062655, -0.611866, 0.),\n vec3(0.315226, -0.604297, 0.),\n vec3(-0.780145, 0.486251, 0.),\n vec3(-0.371868, 0.882138, 0.),\n vec3(0.200476, 0.494430, 0.),\n vec3(-0.494552, -0.711051, 0.),\n vec3(0.612476, 0.705252, 0.),\n vec3(-0.578845, -0.768792, 0.),\n vec3(-0.772454, -0.090976, 0.),\n vec3(0.504440, 0.372295, 0.),\n vec3(0.155736, 0.065157, 0.),\n vec3(0.391522, 0.849605, 0.),\n vec3(-0.620106, -0.328104, 0.),\n vec3(0.789239, -0.419965, 0.),\n vec3(-0.545396, 0.538133, 0.),\n vec3(-0.178564, -0.596057, 0.)\n);\n\nfn getRand(seed : vec2<f32>)->f32 {\n return fract(sin(dot(seed.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n#endif // USE_PCSS\n\n#ifdef USE_CUBE_MAP_SHADOW\nfn cubeShadowDepthCompare(uv : vec3<f32>, depth : f32) -> f32\n{\n var depthValue = textureSample(shadowMap_textureCube, shadowMap_textureCubeSampler, uv);\n return step(depth, depthValue);\n}\n#else\nfn shadowDepthCompare(uv : vec2<f32>, depth : f32) -> f32\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n var depthValue = textureSample(shadowMap_texture, shadowMap_textureSampler, uv).r;\n#else\n var depthValue = czm_unpackDepth(textureSample(shadowMap_texture, shadowMap_textureSampler, uv));\n#endif // USE_SHADOW_DEPTH_TEXTURE\n return step(depth, depthValue);\n}\n#endif // USE_CUBE_MAP_SHADOW\n\nfn sampleShadowMap(uv : vec2<f32>) -> f32\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n var depthValue = textureSample(shadowMap_texture, shadowMap_textureSampler, uv).r;\n#else\n var depthValue = czm_unpackDepth(textureSample(shadowMap_texture, shadowMap_textureSampler, uv));\n#endif\n return depthValue;\n}\n\nfn private_shadowVisibility(inVisibility : f32, nDotL : f32, normalShadingSmooth : f32, darkness : f32) -> f32\n{\n var visibility = inVisibility;\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n var strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n var strength = step(0.0, nDotL);\n#endif // USE_NORMAL_SHADING_SMOOTH\n visibility *= strength;\n#endif // USE_NORMAL_SHADING\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\nfn shadowVisibility(shadowParameters : czm_shadowParameters) -> f32\n{\n var depthBias = shadowParameters.depthBias;\n var depth = shadowParameters.depth;\n var nDotL = shadowParameters.nDotL;\n var normalShadingSmooth = shadowParameters.normalShadingSmooth;\n var darkness = shadowParameters.darkness;\n var uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n var visibility = cubeShadowDepthCompare(uvw, depth);\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\n\n#ifdef USE_PCSS\n\n fn computeShadowWithPCSS(shadowParameters : czm_shadowParameters, searchTapCount : u32, pcfTapCount : u32, poissonSamplers : array<vec3<f32>, 64>)-> f32\n {\n var depthMetric = shadowParameters.depth;\n\n if (depthMetric > 1.0 || depthMetric < 0.0) {\n return 1.0;\n }\n\n var depthBias = shadowParameters.depthBias;\n depthBias *= 2.0;\n var clipPos = vec3(shadowParameters.texCoords.xy, shadowParameters.depth - depthBias);\n var uvDepth = clipPos;\n\n var shadowMapSize = 1.0 / shadowParameters.texelStepSize.x;\n var shadowMapSizeInverse = shadowParameters.texelStepSize.x;\n var contactHardeningLightSizeUVRatio = Shadow.shadowMap_penumbraRatio;\n var shadowMapIndex = shadowParameters.shadowMapIndex;\n // hack : 让不同cascade的阴影看起来没有明显分隔\n var scale = pow(2.0, shadowMapIndex);\n contactHardeningLightSizeUVRatio /= scale;\n\n var lightSizeUV = shadowMapSize * contactHardeningLightSizeUVRatio;\n var darkness = shadowParameters.darkness;\n\n var blockerDepth = 0.0;\n var sumBlockerDepth = 0.0;\n var numBlocker = 0.0;\n\n var i : u32;\n for (i = 0; i < searchTapCount; i++) {\n blockerDepth = czm_unpackDepth(textureSampleLevel(shadowMap_texture, shadowMap_textureSampler, uvDepth.xy + (lightSizeUV * shadowMapSizeInverse * PoissonSamplers32[i].xy), 0.0));\n if (blockerDepth < uvDepth.z) {\n sumBlockerDepth += blockerDepth;\n numBlocker += 1.0;\n }\n }\n\n if (numBlocker < 1.0) {\n return 1.0;\n }\n else\n {\n var avgBlockerDepth = sumBlockerDepth / numBlocker;\n\n // Offset preventing aliasing on contact.\n var AAOffset = shadowMapSizeInverse * 10.;\n // Do not dividing by z despite being physically incorrect looks better due to the limited kernel size.\n // var penumbraRatio = (depthMetric - avgBlockerDepth) / avgBlockerDepth;\n var penumbraRatio = ((depthMetric - avgBlockerDepth) + AAOffset);\n var filterRadius = penumbraRatio * lightSizeUV * shadowMapSizeInverse;\n\n var random = getRand(shadowParameters.texCoords.xy);\n var rotationAngle = random * 3.1415926;\n var rotationVector = vec2(cos(rotationAngle), sin(rotationAngle));\n\n var shadow = 0.0;\n var i : u32;\n for (i = 0; i < pcfTapCount; i++) {\n var offset = poissonSamplers[i];\n // Rotated offset.\n offset = vec3(offset.x * rotationVector.x - offset.y * rotationVector.y, offset.y * rotationVector.x + offset.x * rotationVector.y, 0.0);\n var realUV = uvDepth + offset * filterRadius;\n realUV.z = (realUV.z - 0.5) * 2.0;\n shadow += textureSampleCompareLevel(u_shadowDepth, u_shadowDepthSampler, realUV.xy, realUV.z);\n }\n shadow /= f32(pcfTapCount);\n\n // Blocker distance falloff\n shadow = mix(shadow, 1.0, depthMetric - avgBlockerDepth);\n\n // Apply darkness\n shadow = mix(darkness, 1.0, shadow);\n\n return shadow;\n }\n }\n\n fn computeShadowWithPCSS16(shadowParameters : czm_shadowParameters)->f32\n {\n return computeShadowWithPCSS(shadowParameters, 16, 16, PoissonSamplers32);\n }\n\n fn computeShadowWithPCSS32(shadowParameters : czm_shadowParameters)->f32\n {\n return computeShadowWithPCSS(shadowParameters, 16, 32, PoissonSamplers32);\n }\n\n fn computeShadowWithPCSS64(shadowParameters : czm_shadowParameters)->f32\n {\n return computeShadowWithPCSS(shadowParameters, 32, 64, PoissonSamplers64);\n }\n#else\n fn computeShadowWithPoissonSampling(shadowParameters : czm_shadowParameters) -> f32\n {\n var shadowPixelDepth = shadowParameters.depth;\n var depthBias = shadowParameters.depthBias;\n shadowPixelDepth -= depthBias;\n var darkness = shadowParameters.darkness;\n var uv = shadowParameters.texCoords;\n var texelStepSize = shadowParameters.texelStepSize;\n\n var visibility = 1.0;\n var poissonDisk : array<vec2<f32>, 4>;\n poissonDisk[0] = vec2<f32>(-0.94201624, -0.39906216);\n poissonDisk[1] = vec2<f32>(0.94558609, -0.76890725);\n poissonDisk[2] = vec2<f32>(-0.094184101, -0.92938870);\n poissonDisk[3] = vec2<f32>(0.34495938, 0.29387760);\n\n // Poisson Sampling\n if (sampleShadowMap(uv + poissonDisk[0] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n if (sampleShadowMap(uv + poissonDisk[1] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n if (sampleShadowMap(uv + poissonDisk[2] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n if (sampleShadowMap(uv + poissonDisk[3] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n return visibility;\n }\n#endif\n\nfn shadowVisibility(shadowParameters : czm_shadowParameters) -> f32\n{\n#ifdef USE_SOFT_SHADOWS\n #ifdef USE_PCSS\n #ifdef LOW_QUALITY_SHADOW\n var visibility = computeShadowWithPCSS16(shadowParameters);\n #elif defined(MEDIUM_QUALITY_SHADOW)\n var visibility = computeShadowWithPCSS32(shadowParameters);\n #else\n var visibility = computeShadowWithPCSS64(shadowParameters);\n #endif\n #else\n var visibility = computeShadowWithPoissonSampling(shadowParameters);\n #endif\n#else\n var depth = shadowParameters.depth;\n var depthBias = shadowParameters.depthBias;\n depth -= depthBias;\n var visibility = shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n var nDotL = shadowParameters.nDotL;\n var normalShadingSmooth = shadowParameters.normalShadingSmooth;\n var darkness = shadowParameters.darkness;\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif // USE_CUBE_MAP_SHADOW\n",cubeUV_reflection="\n\n\tvar uSpecularEnvironmentMaps : texture_2d<f32>;\n\tvar uSpecularEnvironmentMapsSampler : sampler;\n\n\tconst CUBEUV_MAX_MIP = 8.0;\n const CUBEUV_TEXEL_WIDTH = 0.0013020833333333333;\n const CUBEUV_TEXEL_HEIGHT = 0.0009765625;\n const cubeUV_minMipLevel = 4.0;\n\tconst cubeUV_minTileSize = 16.0;\n\n\t// These shader functions convert between the UV coordinates of a single face of\n\t// a cubemap, the 0-5 integer index of a cube face, and the direction vector for\n\t// sampling a textureCube (not generally normalized ).\n\n\tfn getFace( direction : vec3<f32> ) ->f32\n\t{\n\t\tvar absDirection = abs( direction );\n\t\tvar face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\n\t// RH coordinate system; PMREM face-indexing convention\n\tfn getUV( direction : vec3<f32>, face : f32) -> vec2<f32>{\n\t\tvar uv : vec2<f32>;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2<f32>( direction.z, direction.y ) / abs( direction.x ); // pos x\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2<f32>( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2<f32>( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2<f32>( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2<f32>( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\t\t} else {\n\t\t\tuv = vec2<f32>( direction.x, direction.y ) / abs( direction.z ); // neg z\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\n\t// fn bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) ->vec3<f32>\n\t// {\n\t// \tfloat face = getFace( direction );\n\t// \tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t// \tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t// \tfloat faceSize = exp2( mipInt );\n\t// \tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t// \tif ( face > 2.0 ) {\n\t// \t\tuv.y += faceSize;\n\t// \t\tface -= 3.0;\n\t// \t}\n\t// \tuv.x += face * faceSize;\n\t// \tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t// \tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t// \tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t// \tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t// \treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t// }\n\n\t// These defines must match with PMREMGenerator\n\n\tconst cubeUV_r0 = 1.0;\n\tconst cubeUV_v0 = 0.339;\n\tconst cubeUV_m0 = -2.0;\n\tconst cubeUV_r1 = 0.8;\n\tconst cubeUV_v1 = 0.276;\n\tconst cubeUV_m1 = -1.0;\n\tconst cubeUV_r4 = 0.4;\n\tconst cubeUV_v4 = 0.046;\n\tconst cubeUV_m4 = 2.0;\n\tconst cubeUV_r5 = 0.305;\n\tconst cubeUV_v5 = 0.016;\n\tconst cubeUV_m5 = 3.0;\n\tconst cubeUV_r6 = 0.21;\n\tconst cubeUV_v6 = 0.0038;\n\tconst cubeUV_m6 = 4.0;\n\n\tfn roughnessToMip(roughness : f32) ->f32\n\t{\n\t\tvar mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25\n\t\t}\n\t\treturn mip;\n\t}\n\n\t// vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\n\t// \tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\n\t// \tfloat mipF = fract( mip );\n\n\t// \tfloat mipInt = floor( mip );\n\n\t// \tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\n\t// \tif ( mipF == 0.0 ) {\n\n\t// \t\treturn vec4( color0, 1.0 );\n\n\t// \t} else {\n\n\t// \t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\n\t// \t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\n\t// \t}\n\n\t// }\n",LightUBODecl="\n#define MAX_POINT_LIGHT_COUNT 16;\n#define MAX_SPOT_LIGHT_COUNT 16;\n#define MAX_DIRECTION_LIGHT_COUNT 4;\nstruct LightUBO \n{ \n uPointLightPositionEC : array<vec3<f32>, 16>,\n uPointLightColor : array<vec3<f32>, 16>,\n uPointLightDistanceAndDecay : array<vec4<f32>, 16>,\n uSpotLightColorAndExponent : array<vec4<f32>, 16>,\n uSpotLightPositionEC : array<vec3<f32>, 16>,\n uSpotLightDirectionEC : array<vec3<f32>, 16>,\n uSpotLightDistanceDecayCosPenumbra : array<vec4<f32>, 16>,\n uDirectionalLightDirectionEC : array<vec3<f32>, 4>,\n uDirectionalLightDirection : array<vec3<f32>, 4>,\n uDirectionalLightColor : array<vec3<f32>, 4>,\n uAmbientLightColor : vec4<f32>, \n uSunLightColor : vec4<f32>,\n uSunDirectionEC : vec3<f32>,\n uSkyColor : vec3<f32>,\n uGroundColor : vec3<f32>,\n uSunLightON : f32,\n uPointLightCount : i32,\n uSpotLightCount : i32,\n uDirLightCount : i32\n};\nvar<uniform> Light : LightUBO;\n",MaterialUboDecl="\nstruct MaterialUBO {\n uTexMatrix : mat4x4<f32>,\n uDiffuseColor : vec4<f32>,\n uAmbientColor : vec4<f32>,\n uSpecularColor : vec4<f32>,\n uTexUVOffset : vec4<f32>,\n uTextureDim : vec4<f32>,\n uTextureWidths : vec2<f32>,\n batchTextureStep_baseTex : vec4<f32>,\n batchTextureDimensions_baseTex : vec2<f32>,\n batchTextureStep_bakeTex : vec4<f32>,\n batchTextureDimensions_bakeTex : vec2<f32>,\n uBaseColorFactor : vec4<f32>,\n uEmissiveFactor : vec4<f32>,\n uEmissiveUVOffsetAndTiling : vec4<f32>,\n uMetallicRoughnessIntensityScale : vec3<f32>,\n uPBRTexWH : vec2<f32>,\n uNormalTextureScale : f32,\n uAlphaMode : f32,\n uAlphaCutoff : f32,\n uPbrParTextureWidth : f32\n};\n\nvar<uniform> Material : MaterialUBO;",MeshUboDecl="\nstruct MeshUBO {\n uModelMatrix : mat4x4<f32>, \n uGeoMatrix : mat4x4<f32>, \n batchTextureStep : vec4<f32>, \n batchTextureDimensions : vec2<f32>,\n decode_texCoord0_min : vec2<f32>,\n decode_texCoord1_min : vec2<f32>,\n decode_texCoord0_vNormConstant : vec3<f32>,\n decode_texCoord1_vNormConstant : vec3<f32>,\n decode_position_min : vec4<f32>,\n decode_position_normConstant : f32,\n normal_rangeConstant : f32,\n uInverseGeoMatrix : mat4x4<f32>, \n uSkeletonMatrix : mat4x4<f32>,\n uSkeletonCount : f32,\n uImgTextureBound : vec2<f32>,\n uImgTextureAlpha : f32,\n fMultiTemporalFactor : f32,\n uSouthWest : vec3<f32>,\n uNorthDir : vec3<f32>,\n uEastDir : vec3<f32>,\n textureRepeat : vec2<f32>\n};\n\nvar<uniform> Mesh : MeshUBO;",LayerUboDecl="\nstruct LayerUBO { \n uSelColor : vec4<f32>, \n uTranslationAndBottom : vec4<f32>, \n uFillForeColor : vec4<f32>, \n uPolygonOffset : vec4<f32>, \n uPointSize : f32,\n uMinMaxTransparent : vec2<f32>,\n uTransparentFilter : f32,\n uHypLineColor : vec4<f32>,\n uNoValueColor : vec4<f32>,\n uHypRect : vec4<f32>,\n uHypHasAnalysisRegion : f32,\n uMixColorType : f32,\n uHypOpacity : f32,\n uHypContourInterval : f32,\n uHypContourFillMode : f32,\n uHypFloor : f32,\n uHypCeil : f32,\n uDataFloor : f32,\n uDataCeil : f32,\n uHypMaxVisibleValue : f32,\n uHypMinVisibleValue : f32,\n uHypsometricVisible : f32,\n uRect : vec4<f32>,\n uCameraHeight : f32,\n uExcavationRect : vec4<f32>,\n uServerExcavationRect : vec4<f32>,\n uExcavationMode : f32,\n uServerExcavationMode : f32,\n uSwipeRegion : vec4<f32>,\n uBrightness : f32,\n uContrast : f32,\n uHue : f32,\n uSaturation : f32,\n uOneOverGamma : f32,\n uClipPlanes : array<vec4<f32>, 6>,\n uClipLineColor : vec4<f32>,\n uClipMode : f32,\n uMaxCategory : f32,\n uMinCategory : f32,\n uCategoryWidht : f32,\n uCategoryHeight : f32,\n uLineColor : vec4<f32>,\n uLineWidth : f32,\n uFillStyle : f32,\n uTransparentBackColor : vec4<f32>,\n uTransparentBackColorTolerance : f32,\n uVisibleDistanceMax : f32,\n uHorizontalColor : vec4<f32>,\n uHorizontalLine : f32,\n uDistanceFalloffFactor : f32,\n uStrokesTextureScale : vec2<f32>,\n uStrokesLog2Resolution : f32,\n uMinMaxTerrainHeightAndPickInfo : vec4<f32>,\n uOverlayRect : vec4<f32>,\n uEmissionTexAtlasTilingAndOffset : array<vec4<f32>, 10>,\n uEmissionTexAtlasRects : array<vec4<f32>, 10>,\n uEmissionColor : vec4<f32>,\n uLayerBounds : vec4<f32>,\n uLayerCornerLength : f32,\n uMaxCategoryOrHypCeil : f32,\n uMinCategoryOrHypFloor : f32,\n uEmissionTexAtlasCount : f32,\n uSnowCoverageFactor : f32,\n uAnimationSpeed : f32,\n uRippleScale : f32,\n uWindIntensity : f32,\n uRain : f32,\n uCameraDepth : f32,\n uWetnessFactor : f32,\n uSelectColorType: f32\n};\n\nvar<uniform> Layer : LayerUBO;",k$Z="\nstruct SceneUBO { \n uView : mat4x4<f32>, \n uProjection : mat4x4<f32>, \n uViewProjection : mat4x4<f32>, \n uInverseView : mat4x4<f32>, \n uInverseProjection : mat4x4<f32>, \n uInverseViewProjection : mat4x4<f32>, \n uViewportTransformation : mat4x4<f32>,\n uViewRotation : mat3x3<f32>, \n uInverseViewRotation : mat3x3<f32>, \n uTemeToPseudoFixed : mat3x3<f32>, \n uViewport : vec4<f32>, \n uFrustumPlanes : vec4<f32>, \n uRelativeOrigin : vec3<f32>,\n uCurrentFrustum : vec2<f32>, \n uFarDepthFromNearPlusOne : f32, \n uLog2FarDepthFromNearPlusOne : f32, \n uOneOverLog2FarDepthFromNearPlusOne : f32, \n uFrameNumber : f32, \n uPixelRatio : f32, \n uResolutionScale : f32, \n uGamma : f32,\n uToneMappingExposure : f32,\n uEnvMapIntensity : f32,\n uSpecularEnvironmentMapSize : vec2<f32>,\n uSpecularEnvironmentMapsMaximumLOD : f32,\n uSphericalHarmonicCoefficients : array<vec3<f32>, 9>,\n uCameraReflect : f32\n};\nvar<uniform> Scene : SceneUBO;",ShadowUboDecl="\nstruct ShadowUBO { \n shadowMap_matix : mat4x4<f32>,\n shadowMap_texelSizeDepthBiasAndNormalShadingSmooth : vec4<f32>,\n shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness : vec4<f32>,\n shadowMap_cascadeMatrices : array<mat4x4<f32>, 4>,\n shadowMap_cascadeSplits : array<vec4<f32>, 2>,\n shadowMap_lightPositionEC : vec4<f32>,\n shadowMap_lightDirectionEC : vec3<f32>,\n shadowMap_penumbraRatio : f32\n};\nvar<uniform> Shadow : ShadowUBO;\n",blinnPhong="\nconst shininess2 = 30.0;\nconst specular = vec3<f32>(0.066666);\n\nfn getRoughness(oriTexCoord : vec2<f32>) -> f32{\n return 1.0;\n}\n\nfn blinnPhong(inBaseColorWithAlpha : vec4<f32>, texCoord : vec2<f32>, oriTexCoord : vec2<f32>, posEC : vec3<f32>, posMC : vec4<f32>, vertexNormalEC : vec3<f32>)->vec4<f32>\n{\n var normalEC : vec3<f32> = getNormalEC(vNormalEC, Mesh.uModelMatrix, posMC.xyz);\n var totalDiffuseLight = vec3<f32>(0.0);\n var totalSpecularLight = vec3<f32>(0.0);\n var sunLightDiffuseWeight = max( dot( normalEC, Light.uSunDirectionEC ), 0.0 );\n totalDiffuseLight = Light.uSunLightColor.rgb * sunLightDiffuseWeight * Light.uSunLightON;\n var positionToEyeECDir = -normalize(posEC);\n\n var i : i32;\n #ifdef HAS_DIR_LIGHTS\n for (i = 0; i < Light.uDirLightCount; i ++ )\n {\n var dirVectorEC = normalize((Scene.uView * vec4<f32>(Light.uDirectionalLightDirection[i], 0.0)).xyz);\n var dotProduct = dot( normalEC, dirVectorEC );\n var dirDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += Light.uDirectionalLightColor[ i ] * dirDiffuseWeight;\n }\n #endif\n\n #ifdef HAS_POINT_LIGHTS\n for (i = 0; i < Light.uPointLightCount; i ++ )\n {\n var lVector = Light.uPointLightPositionEC[i] - posEC;\n var lengthToLight = length( lVector );\n var cutoffDis = Light.uPointLightDistanceAndDecay[i].x;\n if(lengthToLight > cutoffDis)\n {\n continue;\n }\n var attenuation = punctualLightIntensityToIrradianceFactor( lengthToLight, cutoffDis, Light.uPointLightDistanceAndDecay[i].y);\n lVector = normalize( lVector );\n var dotProduct = dot( normalEC, lVector );\n var pointLightDiffuse = max( dotProduct, 0.0 );\n totalDiffuseLight += Light.uPointLightColor[i] * pointLightDiffuse * attenuation;\n var pointHalfVector = normalize( lVector + positionToEyeECDir );\n var pointDotNormalHalf = max( dot( normalEC, pointHalfVector ), 0.0 );\n var pointSpecularWeight = max( pow( pointDotNormalHalf, shininess2 ), 0.0 );\n var specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n var schlick = specular + vec3<f32>(1.0 - specular) * pow(max(1.0 - dot(lVector, pointHalfVector), 0.0), 5.0);\n totalSpecularLight += schlick * Light.uPointLightColor[ i ] * pointSpecularWeight * pointLightDiffuse * attenuation * specularNormalization;\n }\n #endif\n\n #ifdef HAS_SPOT_LIGHTS\n var positionWC = (Mesh.uModelMatrix * posMC).xyz;\n for (i = 0; i < Light.uSpotLightCount; i ++ )\n {\n var lVector = Light.uSpotLightPositionEC[i] - posEC;\n var attenuation = punctualLightIntensityToIrradianceFactor( length( lVector ), Light.uSpotLightDistanceDecayCosPenumbra[i].x, Light.uSpotLightDistanceDecayCosPenumbra[i].y);\n lVector = normalize( lVector );\n var spotEffect = dot( lVector, Light.uSpotLightDirectionEC[ i ] );\n if ( spotEffect > Light.uSpotLightDistanceDecayCosPenumbra[i].z ) {\n spotEffect = max( pow( max( spotEffect, 0.0 ), Light.uSpotLightColorAndExponent[ i ].a ), 0.0 );\n var dotProduct = dot( normalEC, lVector );\n var spotDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += Light.uSpotLightColorAndExponent[ i ].rgb * spotDiffuseWeight * attenuation * spotEffect;\n var spotHalfVector = normalize( lVector + positionToEyeECDir );\n var spotDotNormalHalf = max( dot( normalEC, spotHalfVector ), 0.0 );\n var spotSpecularWeight = max( pow( spotDotNormalHalf, shininess2 ), 0.0 );\n var specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n var schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * Light.uSpotLightColorAndExponent[ i ].rgb * spotSpecularWeight * spotDiffuseWeight * attenuation * specularNormalization * spotEffect;\n }\n }\n #endif\n\n var diffuseColor = Material.uDiffuseColor.rgb * inBaseColorWithAlpha.rgb;\n\n var material : PhysicalMaterial;\n material.diffuseColor = diffuseColor;\n material.roughness = 1.0;\n var metalness = 0.0;\n var f0 = vec3<f32>(0.04);\n material.specularColor = mix(f0, inBaseColorWithAlpha.rgb, metalness);;\n material.specularF90 = 1.0;\n \n var geometry : GeometricContext;\n geometry.position = posEC;\n geometry.normal = normalEC;\n geometry.viewDir = positionToEyeECDir;\n var reflectedLight = ReflectedLight(vec3<f32>(0.0), vec3<f32>(0.0), vec3<f32>(0.0), vec3<f32>(0.0));\n reflectedLight.directDiffuse += totalDiffuseLight * diffuseColor;\n reflectedLight.directSpecular += totalSpecularLight * Material.uSpecularColor.rgb;\n \n getEnvironmentColor(geometry, material, &reflectedLight);\n\n var shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), normalEC, -posEC.z);\n#endif\n\n var color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n return vec4(LINEARtoSRGB(color.rgb), inBaseColorWithAlpha.a);\n}\n",shaderModelBase="\nstruct IncidentLight\n{\n direction : vec3<f32>,\n color : vec3<f32>,\n visible : bool\n};\n\nstruct GeometricContext {\n position : vec3<f32>,\n normal : vec3<f32>,\n viewDir : vec3<f32>\n};\n\nstruct PhysicalMaterial {\n diffuseColor : vec3<f32>,\n roughness : f32,\n specularColor : vec3<f32>,\n specularF90 : f32\n};\n\nstruct ReflectedLight {\n directDiffuse : vec3<f32>,\n directSpecular : vec3<f32>,\n indirectDiffuse : vec3<f32>,\n indirectSpecular : vec3<f32>\n};\n\n#define saturate(a) clamp( a, 0.0, 1.0 )\n\n#include <getEnvironmentColor>\n\n//参考UE4.24实现计算精确光源的衰减\nfn punctualLightIntensityToIrradianceFactor(lightDistance : f32, cutoffDistance : f32, decayExponent : f32) ->f32\n{\n if ( decayExponent > 0.0 ) {\n return pow( saturate( 1.0 - lightDistance / cutoffDistance ), decayExponent );\n }\n return 1.0;\n}\n\nfn sRGBToLinear(srgbIn : vec4<f32>) -> vec4<f32> {\n var linearOut = pow(vec3<f32>(srgbIn.x, srgbIn.y, srgbIn.z), vec3<f32>(2.2f, 2.2f, 2.2f));\n return vec4<f32>(linearOut.x, linearOut.y, linearOut.z, srgbIn.w);\n}\n\nfn sRGBToLinear_vf3(srgbIn : vec3<f32>) -> vec3<f32> {\n return pow(srgbIn, vec3<f32>(2.2f, 2.2f, 2.2f));\n}\n\nfn LINEARtoSRGB(linearIn : vec3<f32>) -> vec3<f32>{\n #ifndef HDR\n return pow(linearIn, vec3<f32>(1.0/2.2));\n #else\n return linearIn;\n #endif\n}\n\n",getEnvironmentColor="\n\nvar uBrdfLut : texture_2d<f32>;\nvar uBrdfLutSampler : sampler;\n\nvar uEnvironmentMap : texture_cube<f32>;\nvar uEnvironmentMapSampler : sampler;\n\n//#include <cubeUV_reflection>\n#include <hemisphereLightDecl>\n\nfn DFGApprox( normal : vec3<f32>, viewDir : vec3<f32>, roughness : f32) ->vec2<f32> {\n var dotNV = saturate( dot( normal, viewDir ) );\n const c0 = vec4<f32>( - 1, - 0.0275, - 0.572, 0.022 );\n const c1 = vec4<f32>( 1, 0.0425, 1.04, - 0.04 );\n var r = roughness * c0 + c1;\n var a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n var fab = vec2<f32>( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\n\nfn computeMultiscattering(normal : vec3<f32>, viewDir : vec3<f32>, specularColor : vec3<f32>, specularF90 : f32, roughness : f32, \n singleScatter : ptr<function, vec3<f32>>, multiScatter : ptr<function, vec3<f32>>) {\n var fab = DFGApprox( normal, viewDir, roughness );\n var Fr = specularColor;\n var FssEss = Fr * fab.x + specularF90 * fab.y;\n var Ess = fab.x + fab.y;\n var Ems = 1.0 - Ess;\n var Favg = Fr + ( 1.0 - Fr ) * 0.047619;\n var Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n var lastSingle = (*(singleScatter)) + FssEss;\n (*singleScatter) = lastSingle;\n var lastMulti = (*(multiScatter)) + Fms * Ems;\n (*multiScatter) = lastMulti;\n}\n\nfn indirectSpecular_Physical(radiance : vec3<f32>, irradiance : vec3<f32>, geometry : GeometricContext, material : PhysicalMaterial, reflectedLight : ptr<function, ReflectedLight>) {\n var singleScattering = vec3<f32>(0.0);\n var multiScattering = vec3<f32>(0.0);\n var cosineWeightedIrradiance = irradiance;\n computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, &singleScattering, &multiScattering);\n var totalScattering = singleScattering + multiScattering;\n var diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n (*(reflectedLight)).indirectSpecular += radiance * singleScattering;\n (*(reflectedLight)).indirectSpecular += multiScattering * cosineWeightedIrradiance;\n (*(reflectedLight)).indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n\nfn getEnvironmentColor(geometry : GeometricContext, material : PhysicalMaterial, reflectedLight : ptr<function, ReflectedLight> )\n{\n var roughness = material.roughness;\n var posEC = geometry.position;\n var n = geometry.normal;\n var v = geometry.viewDir;\n\n var irradiance = vec3<f32>(0.0);\n var radiance = vec3<f32>(0.0);\n \n#ifdef HAS_HEMISPHERE_LIGHTS\n // TODO\n // HemisphereLight hemiLight;\n // hemiLight.skyColor = uSkyColor[0];\n // hemiLight.groundColor = uGroundColor[0];\n // hemiLight.direction = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\n // irradiance += getHemisphereLightIrradiance( hemiLight, geometry );\n#endif\n\n#ifdef BRDF\n#ifdef IBL\n\n#ifdef KtxEnvMap\n var modelView = Scene.uView * Mesh.uModelMatrix;\n let modelViewRow0 : vec4<f32> = modelView[0u];\n let modelViewRow1 : vec4<f32> = modelView[1u]; \n let modelViewRow2 : vec4<f32> = modelView[2u]; \n var fixedToENU = mat3x3<f32>(\n vec3<f32>(modelViewRow0.x, modelViewRow1.x, modelViewRow2.x), \n vec3<f32>(modelViewRow0.y, modelViewRow1.y, modelViewRow2.y), \n vec3<f32>(modelViewRow0.z, modelViewRow1.z, modelViewRow2.z)\n );\n const yUpToZUp = mat3x3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n var cubeDir = normalize( yUpToZUp * fixedToENU * reflect(-v, n) );\n var worldNormal = normalize( yUpToZUp * fixedToENU * n );\n irradiance = czm_sphericalHarmonics(worldNormal, Scene.uSphericalHarmonicCoefficients);\n radiance = czm_sampleOctahedralProjection(Scene.uSpecularEnvironmentMapSize, cubeDir, \n roughness * Scene.uSpecularEnvironmentMapsMaximumLOD, Scene.uSpecularEnvironmentMapsMaximumLOD);\n #else\n // irradiance+= getIBLIrradiance( geometry.normal );\n // radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n#endif // KtxEnvMap\n \n#else // IBL\n var positionWC = vec3<f32>((Scene.uInverseView * vec4<f32>(posEC, 1.0f)).xyz) + Scene.uRelativeOrigin;\n var r = normalize(Scene.uInverseViewRotation * normalize(reflect(v, n)));\n var vertexRadius = length(positionWC);\n var horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n var reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(Scene.uTemeToPseudoFixed * r);\n r.x = -r.x;\n var inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n var sceneSkyBox = textureSample(uEnvironmentMap, uEnvironmentMapSampler, r).rgb * inverseRoughness;\n var atmosphereHeight = 0.05;\n var blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n var blendRegionOffset = roughness * -1.0;\n var farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n var aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n var farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n var smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n var belowHorizonColor = mix(vec3<f32>(0.1, 0.15, 0.25), vec3<f32>(0.4, 0.7, 0.9), smoothstepHeight);\n var nadirColor = belowHorizonColor * 0.5;\n var aboveHorizonColor = mix(vec3<f32>(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n var blueSkyColor = mix(vec3<f32>(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n var zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n var blueSkyDiffuseColor = vec3<f32>(0.7, 0.85, 0.9);\n var diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n var diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n var diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n var notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n var specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n var LdotZenith = clamp(dot(normalize(Scene.uInverseViewRotation * Light.uSunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n var S = acos(LdotZenith);\n var NdotZenith = clamp(dot(normalize(Scene.uInverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n var sunNdotL = clamp(dot(n, Light.uSunDirectionEC), 0.001, 1.0);\n var gamma = acos(sunNdotL);\n var numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n var denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n var luminance = 0.2 * (numerator / denominator);\n irradiance = diffuseIrradiance * luminance;\n radiance = specularIrradiance * luminance;\n#endif // IBL\n\n#else\n irradiance = Light.uAmbientLightColor.rgb * 0.6;\n#endif // BRDF\n\n indirectSpecular_Physical(radiance, irradiance, geometry, material, reflectedLight);\n}\n\n",getMetersPerPixel="\n//计算像素大小\nfn getMetersPerPixel(positionEC : vec4<f32>, pixelRatio : f32) -> f32\n{\n var width = Scene.uViewport.z;\n var height = Scene.uViewport.w;\n var pixelWidth:f32;\n var pixelHeight:f32;\n\n var top = Scene.uFrustumPlanes.x;\n var bottom = Scene.uFrustumPlanes.y;\n var left = Scene.uFrustumPlanes.z;\n var right = Scene.uFrustumPlanes.w;\n\n // if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n // {\n // var frustumWidth = right - left;\n // var frustumHeight = top - bottom;\n // pixelWidth = frustumWidth / width;\n // pixelHeight = frustumHeight / height;\n // }\n // else\n // {\n var distanceToPixel = -positionEC.z;\n var inverseNear = 1.0 / Scene.uCurrentFrustum.x;\n var tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n //}\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}",clip="\n#ifdef CLIP\n\nconst clip_lineWidth = 3.0;\n\nfn GetClipDistance(pos : vec3<f32>, planeNormal : vec3<f32>, disToOrigin : f32) -> f32\n{\n\treturn dot(planeNormal, pos) + disToOrigin;\n}\n\nfn ClipBehindAllPlane(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n var distance = 0.0;\n var result = -1.0;\n #ifdef CLIPPLANE\n distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[0].xyz, Layer.uClipPlanes[0].w);\n if (distance < 0.0)\n {\n return 1.0;\n }\n else if (distance < fBorderWidth)\n {\n result = 0.0;\n }\n #else\n var i : u32;\n for(i = 0; i < 6; i++)\n {\n distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[i].xyz, Layer.uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return 1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n #endif\n return result;\n}\n\nfn ClipBehindAnyPlane(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n var result = 1.0;\n var i : u32;\n for(i = 0; i < 6; i++)\n {\n var distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[i].xyz, Layer.uClipPlanes[i].w);\n if((distance + fBorderWidth) < 0.0)\n {\n return -1.0;\n }\n else if(distance < 0.0)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nfn ClipAnythingButLine(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n var result = -1.0;\n var i : u32;\n for(i = 0; i < 6; i++)\n {\n var distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[i].xyz, Layer.uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return -1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nfn clip(clip_vertex : vec4<f32>, fIsFiltByID : f32) -> f32\n{\n if(fIsFiltByID < 0.1)\n {\n return 1.0;\n }\n if(Layer.uClipMode < 0.5)\n {\n return 1.0;\n }\n var fBorderWidth = 1.0;\n var clipResult = 1.0;\n if(Layer.uClipLineColor.a < 0.01)\n {\n fBorderWidth = 0.0;\n }\n if(Layer.uClipMode < 1.5)\n {\n clipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n }\n else if(Layer.uClipMode < 2.5)\n {\n clipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n }\n else if(Layer.uClipMode < 3.5)\n {\n clipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n }\n return clipResult;\n}\n#endif\n",calcTexCoordDecl="\n#ifdef TexCoord\n varying vTexCoord : vec4<f32>;\n varying vTexCoordZ : vec2<f32>;\n#endif\n\n#ifndef TextureBatch\n#ifdef MULTI_TEX\n varying vTexMatrix2 : vec4<f32>;\n#endif\n#endif\n\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef TextureBatch\n varying vTexTran : vec4<f32>;\n varying vTexScale : vec4<f32>;\n varying vTexSize : vec4<f32>;\n varying vMaxMipLevel : vec2<f32>;\n#else\n varying vTexMatrix : vec4<f32>;\n#endif\n\n#include <calculateMipLevel>\n\n #ifdef TextureBatch\n fn getBatchUV(uv : vec2<f32>, translate : vec2<f32>, scale : vec2<f32>, dim : vec2<f32>, mipLevel : f32) -> vec2<f32>\n {\n var temp : f32;\n var texTranslate = vec2(translate.x, translate.y);\t\n if(mipLevel > 0.0)\n {\n texTranslate.x = translate.x + scale.x;\n temp = pow(2.0, mipLevel - 1.0);\n texTranslate.y = translate.y + scale.y * (temp - 1.0) / temp;\n }\n var texScale = 1.0 / pow(2.0, mipLevel);\n var outUV = fract(uv);\n var offsetX = pow(2.0, mipLevel) / dim.x;\n var offsetY = pow(2.0, mipLevel) / dim.y;\n outUV.x = clamp(outUV.x, 0.0 + offsetX, 1.0 - offsetX);\n outUV.y = clamp(outUV.y, 0.0 + offsetY, 1.0 - offsetY);\n outUV.x = outUV.x * texScale * scale.x + texTranslate.x;\n outUV.y = outUV.y * texScale * scale.y + texTranslate.y;\n return outUV;\n }\n #else\n fn getUV(uv : vec2<f32>, translate : vec2<f32>, uvOffset : vec4<f32>, scale : f32, width : f32, mipLevel : f32, texCoordZ : f32) -> vec2<f32> {\n var texCoord : vec2<f32>;\n var offset : f32;\n if ((texCoordZ < -9000.0f)) {\n texCoord = vec2<f32>(uv.x, uv.y);\n } else {\n texCoord = fract(uv);\n offset = (pow(2.0f, mipLevel) / width);\n texCoord = clamp(texCoord, vec2<f32>(offset, offset), vec2<f32>(1.0f - offset, 1.0f - offset));\n texCoord.x = ((texCoord.x + translate.x) * scale);\n texCoord.y = ((texCoord.y + translate.y) * scale);\n }\n texCoord = ((texCoord * vec2<f32>(uvOffset.z, uvOffset.w)) + vec2<f32>(uvOffset.x, uvOffset.y));\n return texCoord;\n }\n #endif\n // end TextureBatch\n\n#endif\n// end COMPUTE_TEXCOORD\n",getEmissiveTextureAtlasColor="\n#ifdef EMISSION_TEXTURE_ATLAS\nvar uEmissionTexAtlas : texture_2d<f32>;\nvar uEmissionTexAtlasSampler : sampler;\nvarying vLayerTexCoord : vec2<f32>;\nvarying vModIndexAndTexIndex : vec2<f32>;\nfn getEmissiveTextureAtlasColor(w : f32) -> vec3<f32>\n{\n var texColor = vec3<f32>(0.0);\n var emissionTexCoord : vec2<f32>;\n var nEmissionTexTexIdx = i32(floor(vModIndexAndTexIndex.y + 0.5));\n var atlasTexCoord : vec2<f32>;\n for(var i : i32 = 0; i < i32(Layer.uEmissionTexAtlasCount); i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = length(vLayerTexCoord) * Layer.uLayerCornerLength / Layer.uEmissionTexAtlasTilingAndOffset[i].x - floor(length(vLayerTexCoord) * Layer.uLayerCornerLength / Layer.uEmissionTexAtlasTilingAndOffset[i].x);\n emissionTexCoord.y = (w - Layer.uMinCategoryOrHypFloor) / Layer.uEmissionTexAtlasTilingAndOffset[i].y - floor((w - Layer.uMinCategoryOrHypFloor) / Layer.uEmissionTexAtlasTilingAndOffset[i].y);\n emissionTexCoord.x += Layer.uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + Layer.uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.x = fract(emissionTexCoord.x);\n emissionTexCoord.y = fract(emissionTexCoord.y);\n atlasTexCoord = mix(Layer.uEmissionTexAtlasRects[i].xy, Layer.uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = textureSample(uEmissionTexAtlas, uEmissionTexAtlasSampler, atlasTexCoord).rgb;\n var normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n var isNotTopFace = 1.0 - step(0.95, normalMC.z);\n var dayTime = 1.0 - czm_RGBToHSL(Light.uAmbientLightColor.rgb).z;\n var emissionTexColor = Layer.uEmissionColor.rgb * texColor * dayTime * isNotTopFace;\n return emissionTexColor;\n}\n#endif\n",computeWValue="\nfn computeWValue(vertexPos : ptr<function, vec4<f32>>) -> f32{\n var realWValue : f32 = (*vertexPos).w;\n#ifdef HypColorByZValue\n realWValue = (*vertexPos).z;\n#endif\n#ifdef TEXTURE_COORD_ONE_IS_W\n realWValue = aTexCoord0.x;\n#endif\n#ifdef USE_VertexWeight\n realWValue = aVertexWeight;\n #ifdef MultiTemporalWeight\n realWValue = mix(aVertexWeight, aVertexWeight_1, fMultiTemporalFactor);\n #ifdef ChangeZValue\n (*vertexPos).z += realWValue;\n #endif\n #endif\n#endif\n#ifdef COMPUTE_W_VALUE\n wValue = realWValue + Layer.uTranslationAndBottom.w;\n#endif\n return realWValue;\n}\n",setAlphaByWValue="\n#ifdef W_VISIBLE\n var uCategorieTexture : texture_2d<f32>;\n var uCategorieTextureSampler : sampler;\n \n fn setAlphaByWValue(w : f32, color : ptr<function, vec4<f32>>)\n {\n var category_u = abs(w - Layer.uMinCategory);\n var category_y = ceil(category_u / Layer.uCategoryWidht) / Layer.uCategoryHeight - 0.5 / Layer.uCategoryHeight;\n var category_x = (category_u - Layer.uCategoryWidht * floor(category_u / Layer.uCategoryWidht)) / Layer.uCategoryWidht + 0.5 / Layer.uCategoryWidht;\n var categoryTexCoord = vec2<f32>(category_x , category_y);\n var category = textureSampleLevel(uCategorieTexture, uCategorieTextureSampler, categoryTexCoord, 0.0f).a;\n (*color).a *= 1.0 - category;\n }\n#endif\n",adjustColor="\n#ifdef ADJUST_COLOR\nfn adjustColor(inputColor : vec3<f32>) ->vec3<f32>\n{\n var outputColor : vec3<f32> = inputColor;\n outputColor = mix(vec3(0.0), outputColor.rgb, Layer.uBrightness);\n outputColor = mix(vec3(0.5), outputColor.rgb, Layer.uContrast);\n outputColor = czm_hue(outputColor.rgb, Layer.uHue);\n outputColor = clamp(outputColor.rgb, vec3<f32>(0.0), vec3<f32>(1.0));\n outputColor = czm_saturation(outputColor.rgb, Layer.uSaturation);\n outputColor = pow(outputColor.rgb, vec3(Layer.uOneOverGamma));\n return outputColor;\n}\n#endif\n",calculatePolyTexCoord="\nfn calculatePolyTexCoord(vertexPos: vec4<f32>, rectPos : vec4<f32>, ptInRect : ptr<function, f32>) -> vec2<f32>\n{\n var realVertexPos = vertexPos;\n var vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n var texCoord = vec2(realVertexPos.x - rectPos.x, realVertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n (*ptInRect) = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\n",getVertexByFlatten="\n#ifdef FALTTEN\n var uFlattenTexture : texture_2d<f32>;\n var uFlattenTextureSampler : sampler;\n\n fn getVertexByFlatten(posInLayerCoord : vec4<f32>, layerBottom : f32) -> vec4<f32>\n {\n var vecPos = Mesh.uGeoMatrix * vec4(posInLayerCoord.xyz, 1.0);\n var vecRatio = vec2(Layer.uRect.z - Layer.uRect.x, Layer.uRect.w - Layer.uRect.y);\n var vecTexCoord = vec2(vecPos.x - Layer.uRect.x, vecPos.y - Layer.uRect.y);\n vecTexCoord.x = vecTexCoord.x / vecRatio.x;\n vecTexCoord.y = vecTexCoord.y / vecRatio.y;\n if(vecTexCoord.x > 1.0 || vecTexCoord.x < 0.0 || vecTexCoord.y > 1.0 || vecTexCoord.y < 0.0)\n {\n return posInLayerCoord;\n }\n var value = textureSampleLevel(uFlattenTexture, uFlattenTextureSampler, vecTexCoord.xy, 0.0);\n #ifdef UseFloatTexture\n var fHeight = value.r;\n #else\n var fHeight = czm_unpackValue(value);\n #endif\n if(vecPos.z > fHeight && value.a > 0.5)\n {\n var fDepthOffset = clamp((Layer.uCameraHeight - fHeight - layerBottom) * 0.0001 * (vecPos.z + layerBottom - fHeight), 0.001, 3.0);\n vecPos.z = fHeight + fDepthOffset;\n vecPos.w = vecPos.z;\n }\n return Mesh.uInverseGeoMatrix * vec4(vecPos.xyz, 1.0);\n }\n#endif\n",HypSometric="\n#ifdef HYPSOMETRIC\n#include <getVolumeValue>\n\nvar uHypsometricTexture : texture_2d<f32>;\nvar uHypsometricTextureSampler : sampler;\nvar uHypsometricRenderTexture : texture_2d<f32>;\nvar uHypsometricRenderTextureSampler : sampler;\n\nvarying vecHypTexCoord : vec2<f32>;\n#ifdef Volume\nvarying vecRotioCoord : vec3<f32>;\n#endif\n\nfn computeMixCon(fValue : f32) -> f32\n{\n var distanceToContour : f32;\n if(abs(Layer.uHypMaxVisibleValue - Layer.uHypMinVisibleValue) > 0.1)\n {\n if(fValue < 0.5)\n {\n var t = fValue - 0.0002;\n var m = t - floor(t / Layer.uHypContourInterval) * Layer.uHypContourInterval;\n distanceToContour = m;\n }\n else\n {\n var t = floor(fValue / Layer.uHypContourInterval);\n distanceToContour = abs(fValue - (t * Layer.uHypContourInterval) - 0.1);\n }\n }\n else\n {\n distanceToContour = abs(fValue - Layer.uHypMaxVisibleValue);\n }\n var dxc = abs(dpdx(fValue));\n var dyc = abs(dpdy(fValue));\n var dF = max(dxc, dyc);\n if(distanceToContour < dF){\n return 1.0;\n }\n else{\n return 0.0;\n }\n}\n\nfn computeContourMapColor(fValue : f32) -> vec4<f32>\n{\n var threshold = abs(Layer.uHypCeil - Layer.uHypFloor);\n var contourRate = (fValue - Layer.uHypFloor) / threshold;\n var finalCoord = clamp(contourRate, 0.0, 1.0);\n var count = floor(finalCoord * 16.0);\n var y = (count*2.0 + 1.0)/32.0;\n var x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n var contourCoord = vec2(x, y);\n return textureSampleLevel(uHypsometricTexture, uHypsometricTextureSampler, contourCoord, 0.0).rgba;\n}\n\nfn branchFreeTernary(comparison : bool, a : f32, b : f32) ->f32\n{\n var useA = f32(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\nfn getContourMapColor(oriColor : vec4<f32>, inValue : f32) -> vec4<f32>\n{\n var fValue = inValue;\n var contourMapColor = vec4(0.0);\n var finalOpacity = Layer.uHypOpacity;\n var output = vec4<f32>(0.0);\n#ifdef Volume\nvar aRatioT = vecRotioCoord;\n if((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n {\n if(S3MVolume.uVolumeType > 0.5)\n {\n var volumeColor = getVolumeValue(aRatioT);\n if(Layer.uMixColorType > 0.5)\n {\n volumeColor = volumeColor * oriColor;\n }\n output = volumeColor;\n }\n var noValue : f32;\n var texTest = getVolumeValueWithNoValue(aRatioT, &noValue);\n if(noValue > 0.5)\n {\n fValue = Layer.uDataFloor + texTest * (Layer.uDataCeil - Layer.uDataFloor);\n }\n else\n {\n fValue = Layer.uHypMaxVisibleValue + abs(Layer.uHypMaxVisibleValue * 0.1);\n }\n }\n else\n {\n fValue = Layer.uHypMaxVisibleValue + abs(Layer.uHypMaxVisibleValue * 0.1);\n }\n#endif\n var extendHeight = branchFreeTernary(Layer.uHypContourFillMode > 2.9, 0.0, branchFreeTernary(Layer.uHypContourFillMode > 1.9, 5.0, 0.0));\n var mixCon = computeMixCon(fValue);\n if(length(output) > 0.0 )\n {\n return output;\n }\n if(fValue > Layer.uHypMaxVisibleValue + extendHeight || fValue < Layer.uHypMinVisibleValue - extendHeight)\n {\n return Layer.uNoValueColor * oriColor;\n }\n if(Layer.uHypContourFillMode > 2.9)\n {\n var mix_con = mixCon;\n contourMapColor = mix(computeContourMapColor(fValue), Layer.uHypLineColor, mix_con);\n }\n else if(Layer.uHypContourFillMode > 1.9)\n {\n finalOpacity = mixCon;\n contourMapColor = Layer.uHypLineColor;\n }\n else if(Layer.uHypContourFillMode > 0.9)\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n var finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n finalColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n#endif\n return finalColor;\n}\n\n#ifdef Volume2\nfn getContourValue(volColor : vec4<f32>) -> f32\n{\n var noValue = volColor.a;\n var texTest = clamp(czm_unpackVolume(volColor.zyx), 0.0, 1.0);\n\n var fValue;\n if(noValue > 0.5)\n {\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = Layer.uHypMaxVisibleValue + abs(Layer.uHypMaxVisibleValue * 0.1);\n }\n \n return fValue;\n}\n\nfn getHypsometricColor(oriColor : vec4<f32>, volColor : vec4<f32>) -> vec4<f32>\n{\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var hypColor = textureSample(uHypsometricRenderTexture, uHypsometricRenderTextureSampler, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n \n if(uFilterMode > 0.5) {\n var finalColor = volColor * oriColor;\n\n if(Layer.uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n \n var fValue = getContourValue(volColor);\n return getContourMapColor(oriColor, fValue);\n}\n\n#else\n\nfn getHypsometricColor(oriColor : vec4<f32>, wValue : f32)-> vec4<f32>\n{\n var fValue = wValue;\n var output : vec4<f32> = getContourMapColor(oriColor, fValue);\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var hypColor = textureSample(uHypsometricRenderTexture, uHypsometricRenderTextureSampler, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return output;\n}\n\nfn getHypsometricColorByGeoBounds(oriColor : vec4<f32>, wValue : f32, hypRect : vec4<f32>, vTexCoord : vec2<f32>, geoBounds : vec4<f32>) -> vec4<f32>\n{\n var output : vec4<f32> = getContourMapColor(oriColor, wValue);\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n var hypColor = textureSample(uHypsometricRenderTexture, uHypsometricRenderTextureSampler, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return output;\n}\n#endif\n\n#endif\n",getVolumeValue="\n#ifdef Volume\nvar uVolumeTexture : texture_2d<f32>;\nvar uVolumeTextureSampler : sampler;\n\n#ifdef TIME_ORDER\nvar uNextVolumeTexture : texture_2d<f32>;\nvar uNextVolumeTextureSampler : sampler;\nuniform uTimeRatio : f32;\n#endif\n\nfn unpackVolume(packedDepth : vec3<f32>) -> f32\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\nfn computeVolumeTextureCoord(texCoord : vec3<f32>, fLevel : f32) -> vec2<f32>\n{\n var yOffset = floor((fLevel+0.25/ S3MVolume.uVolSideBlockCount) / S3MVolume.uVolSideBlockCount);\n var xOffset = fLevel - yOffset * S3MVolume.uVolSideBlockCount;\n var texCoordV = (texCoord.y * S3MVolume.uVolHeight + yOffset * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n var texCoordU = (texCoord.x * S3MVolume.uVolWidth + xOffset * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfn computeVolumeValue(topVolumeValue : vec4<f32>, bottomVolumeValue : vec4<f32>, inRatio : f32, noValue : ptr<function, f32>) -> f32\n{\n var ratio = inRatio;\n var fValue1 = clamp(unpackVolume(topVolumeValue.xyz),0.0,1.0);\n var fValue2 = clamp(unpackVolume(bottomVolumeValue.xyz),0.0,1.0);\n if(S3MVolume.uVolFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n (*noValue) = mix(topVolumeValue.a, bottomVolumeValue.a, ratio);\n if(topVolumeValue.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(bottomVolumeValue.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfn getVolumeValueWithNoValue(texCoord : vec3<f32>, noValue : ptr<function, f32>) -> f32\n{\n var fLevel = (S3MVolume.uVolDepth - 1.0) * texCoord.z;\n var bottomLevel= floor(fLevel);\n var topLevel = bottomLevel + 1.0;\n var ratio = topLevel - fLevel;\n var topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n var bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n\n var topVolumeValue = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, topTexCoord, 0.0);\n var bottomVolumeValue = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, bottomTexCoord, 0.0);\n var fResult = computeVolumeValue(topVolumeValue, bottomVolumeValue, ratio, noValue);\n#ifdef TIME_ORDER\n var topNextVolumeValue = textureSampleLevel(uNextVolumeTexture, uNextVolumeTextureSampler, topTexCoord, 0.0);\n var bottomNextVolumeValue = textureSampleLevel(uNextVolumeTexture, uNextVolumeTextureSampler, bottomTexCoord, 0.0);\n var fNextResult = computeVolumeValue(topNextVolumeValue, bottomNextVolumeValue, ratio, noValue);\n fResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\n return fResult;\n}\n\nfn getVolumeValue(texCoord : vec3<f32>) -> vec4<f32>\n{\n\tvar fLevel = (S3MVolume.uVolDepth - 1.0) * texCoord.z;\n\tvar bottomLevel= floor(fLevel);\n\tvar topLevel = bottomLevel + 1.0;\n\tvar ratio = topLevel - fLevel;\n\tvar yOffset1 = floor((topLevel+0.25/ S3MVolume.uVolSideBlockCount) / S3MVolume.uVolSideBlockCount);\n\tvar xOffset1 = topLevel - yOffset1 * S3MVolume.uVolSideBlockCount;\n\tvar texCoordV1 = (texCoord.y * S3MVolume.uVolHeight + yOffset1 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar texCoordU1 = (texCoord.x * S3MVolume.uVolWidth + xOffset1 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar volumeColor1 = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, vec2(texCoordU1,texCoordV1), 0.0);\n\tvar yOffset2 = floor((bottomLevel+0.25 / S3MVolume.uVolSideBlockCount) / S3MVolume.uVolSideBlockCount);\n\tvar xOffset2 = bottomLevel - yOffset2 * S3MVolume.uVolSideBlockCount;\n\tvar texCoordV2 = (texCoord.y * S3MVolume.uVolHeight + yOffset2 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar texCoordU2 = (texCoord.x * S3MVolume.uVolWidth + xOffset2 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar volumeColor2 = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, vec2(texCoordU2, texCoordV2), 0.0);\n\n\tif(S3MVolume.uVolFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvar volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif\n",splitClip="\n#ifdef APPLY_SWIPE\nfn rollerShutter(coord : vec2<f32>, region : vec4<f32>)\n{\n var f = step(region.xw, coord);\n var s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n#endif\n",executeExcavation="\n#ifdef EXCAVATION\nvar uExcavationTexture : texture_2d<f32>;\nvar uExcavationTextureSampler : sampler;\nvarying vExcavationVertexPos : vec4<f32>;\nfn executeExcavation() -> bool\n{\n var hasExcavation = 1.0;\n var vecExcavationTexCoord = calculatePolyTexCoord(vExcavationVertexPos, Layer.uExcavationRect, &hasExcavation);\n var excavationInside = (Layer.uExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n \n if(excavationInside)\n {\n return textureSampleLevel(uExcavationTexture, uExcavationTextureSampler, vecExcavationTexCoord.xy, 0.0).r > 0.5;\n }\n \n return textureSampleLevel(uExcavationTexture, uExcavationTextureSampler, vecExcavationTexCoord.xy, 0.0).r < 0.5;\n}\n#endif\n",S3MVolumeUboDecl="\nstruct S3MVolumeUBO {\n uVolSideBlockCount : f32,\n uVolBlockLength : f32,\n uVolTexLength : f32,\n uVolWidth : f32,\n uVolHeight : f32,\n uVolDepth : f32,\n uVolFilterMode : f32,\n uVolumeType : f32\n};\nvar<uniform> S3MVolume : S3MVolumeUBO;\n",sketchMode="\nvar uNormalDepthTexture : texture_2d<f32>;\nvar uNormalDepthTextureSampler : sampler;\nfn edgeDetection(lineWidth : f32) -> f32\n{\n var center : vec2<f32> = gl_FragCoord.xy / uniforms.czm_globeDepthTextureDim.xy;\n var off : vec2<f32> = lineWidth / uniforms.czm_globeDepthTextureDim.xy;\n var tex_nw : vec4<f32> = vec4<f32>(center.x+off.x, center.y+off.y, 1.0f, 1.0f);\n var val_nw : vec4<f32> = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_nw.xy);\n val_nw.x = ((val_nw.xyz * 2.0f) - 1.0f).x;\n val_nw.y = ((val_nw.xyz * 2.0f) - 1.0f).y;\n val_nw.z = ((val_nw.xyz * 2.0f) - 1.0f).z;\n var tex_ne = vec4<f32>(center.x-off.x, center.y+off.y, 1.0f, 1.0f);\n var val_ne : vec4<f32> = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_ne.xy);\n val_ne.x = ((val_ne.xyz * 2.0f) - 1.0f).x;\n val_ne.y = ((val_ne.xyz * 2.0f) - 1.0f).y;\n val_ne.z = ((val_ne.xyz * 2.0f) - 1.0f).z;\n var tex_sw = vec4<f32>(center.x+off.x, center.y-off.y, 1.0, 1.0);\n var val_sw : vec4<f32> = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_sw.xy);\n val_sw.x = ((val_sw.xyz * 2.0 ) - 1.0).x;\n val_sw.y = ((val_sw.xyz * 2.0 ) - 1.0).y;\n val_sw.z = ((val_sw.xyz * 2.0 ) - 1.0).z;\n var tex_se = vec4<f32>(center.x-off.x, center.y-off.y, 1.0f, 1.0f);\n var val_se : vec4<f32> = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_se.xy);\n val_se.x = ((val_se.xyz * 2.0) - 1.0).x;\n val_se.y = ((val_se.xyz * 2.0) - 1.0).y;\n val_se.z = ((val_se.xyz * 2.0) - 1.0).z;\n var discontinuity = 0.0f;\n var dot0 = dot(val_nw.xyz, val_se.xyz);\n var dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nfn sketchMode(inputColor : vec4<f32>, lineColor : vec4<f32>, lineWidth : f32) -> vec4<f32>\n{\n var outputColor = inputColor;\n var discontinuity : f32 = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0f, 1.0f);\n if(Layer.uFillStyle == 1.0f)\n {\n outputColor = lineColor;\n outputColor.a = (1.0f - sign(discontinuity - 0.5f)) * 0.5f;\n outputColor.a *= lineColor.a;\n }\n else\n {\n var mixLineColor : vec3<f32> = mix(inputColor.rgb, vec3<f32>(lineColor.rgb), lineColor.a);\n var outColor = mix(mixLineColor, inputColor.rgb, discontinuity);\n outputColor.r = outColor.r;\n outputColor.g = outColor.g;\n outputColor.b = outColor.b;\n }\n return outputColor;\n}\n",getNormalEC="\nfn getNormalEC(vNormalEC : vec3<f32>, modelMatrix : mat4x4<f32>, posMC : vec3<f32>) -> vec3<f32>\n{ \n var faceDirection = select(-1.0, 1.0, gl_FrontFacing);\n var normalMatrix = getNormalMatrix(Scene.uView, modelMatrix);\n var normalEC = normalize(vNormalEC);\n #ifndef HAS_NORMAL\n normalEC = normalize(normalMatrix * czm_computeNormal(posMC.xyz));\n #endif\n return normalEC * faceDirection;\n}\n",getNormalMatrix="\nfn getNormalMatrix(viewMatrix : mat4x4<f32>, modelMatrix : mat4x4<f32>) -> mat3x3<f32>{\n var modelView = viewMatrix * modelMatrix;\n var modelViewRow0 : vec4<f32> = modelView[0u];\n var modelViewRow1 : vec4<f32> = modelView[1u]; \n var modelViewRow2 : vec4<f32> = modelView[2u]; \n var normalMatrix = mat3x3<f32>(\n vec3<f32>(modelViewRow0.x, modelViewRow0.y, modelViewRow0.z), \n vec3<f32>(modelViewRow1.x, modelViewRow1.y, modelViewRow1.z), \n vec3<f32>(modelViewRow2.x, modelViewRow2.y, modelViewRow2.z));\n return normalMatrix;\n}";const ShaderChunk={preClipFS:preClipFS,writeFragDepth:writeFragDepth,renderNormal:renderNormal,renderNormalAndDepth:renderNormalAndDepth,renderPrePass:renderPrePass,calculateMipLevel:calculateMipLevel,getTextureColorDecl:getTextureColorDecl,rainDecl:rainDecl,snowDecl:snowDecl,directionLightDecl:directionLightDecl,hemisphereLightDecl:hemisphereLightDecl,pointLightDecl:pointLightDecl,spotLightDecl:spotLightDecl,lightSourceImpl:lightSourceImpl,brdf:brdf,S3MVertexFactory:S3MVertexFactory,getUVMatrixDecl:getUVMatrixDecl,S3MOperationFSDecl:S3MOperationFSDecl,shadowReceive:shadowReceive,shadowVisibility:shadowVisibility,cubeUV_reflection:cubeUV_reflection,LightUBODecl:LightUBODecl,MaterialUboDecl:MaterialUboDecl,MeshUboDecl:MeshUboDecl,LayerUboDecl:LayerUboDecl,SceneUboDecl:k$Z,ShadowUboDecl:ShadowUboDecl,blinnPhong:blinnPhong,shaderModelBase:shaderModelBase,getEnvironmentColor:getEnvironmentColor,getMetersPerPixel:getMetersPerPixel,clip:clip,calcTexCoordDecl:calcTexCoordDecl,getEmissiveTextureAtlasColor:getEmissiveTextureAtlasColor,computeWValue:computeWValue,setAlphaByWValue:setAlphaByWValue,adjustColor:adjustColor,calculatePolyTexCoord:calculatePolyTexCoord,getVertexByFlatten:getVertexByFlatten,HypSometric:HypSometric,getVolumeValue:getVolumeValue,splitClip:splitClip,executeExcavation:executeExcavation,S3MVolumeUboDecl:S3MVolumeUboDecl,sketchMode:sketchMode,getNormalEC:getNormalEC,getNormalMatrix:getNormalMatrix};var _0x44d065=(_0x1ee56b=!0,function(e,t){var i=_0x1ee56b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ee56b=!1,i}),_0x657791=_0x44d065(void 0,(function(){return _0x657791.toString().search("(((.+)+)+)+$").toString().constructor(_0x657791).search("(((.+)+)+)+$")})),_0x1ee56b;function _0x6c367a(){this.children=[]}_0x657791(),_0x6c367a.prototype.isValid=function(e){return!0},_0x6c367a.prototype.process=function(e,t){var i="";if(this.line){var n=this.line,r=t.processor;if(r){if(r.lineProcessor&&(n=r.lineProcessor(n,t.isFragment,t.processingContext)),r.attributeProcessor&&this.line.startsWith("attribute"))n=r.attributeProcessor(this.line,e,t.processingContext);else if(r.varyingProcessor&&this.line.startsWith("varying"))n=r.varyingProcessor(this.line,t.isFragment,e,t.processingContext);else if(r.uniformProcessor&&r.uniformRegexp&&r.uniformRegexp.test(this.line))!t.lookForClosingBracketForUniformBuffer&&(n=r.uniformProcessor(this.line,t.isFragment,e,t.processingContext));else if(r.uniformBufferProcessor&&r.uniformBufferRegexp&&r.uniformBufferRegexp.test(this.line))!t.lookForClosingBracketForUniformBuffer&&(n=r.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0);else if(r.textureProcessor&&r.textureRegexp&&r.textureRegexp.test(this.line))n=r.textureProcessor(this.line,t.isFragment,e,t.processingContext);else if((r.uniformProcessor||r.uniformBufferProcessor)&&this.line.startsWith("uniform")&&!t.lookForClosingBracketForUniformBuffer){/uniform\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/.test(this.line)?r.uniformProcessor&&(n=r.uniformProcessor(this.line,t.isFragment,e,t.processingContext)):r.uniformBufferProcessor&&(n=r.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0)}t.lookForClosingBracketForUniformBuffer&&-1!==this.line.indexOf("}")&&(t.lookForClosingBracketForUniformBuffer=!1,r.endOfUniformBufferProcessor&&(n=r.endOfUniformBufferProcessor(this.line,t.isFragment,t.processingContext)))}i+=n+"\r\n"}return this.children.forEach((function(n){i+=n.process(e,t)})),this.additionalDefineKey&&(e[this.additionalDefineKey]=this.additionalDefineValue||"true"),i};var _0x531604=(_0x41adf6=!0,function(e,t){var i=_0x41adf6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41adf6=!1,i}),_0x97049b=_0x531604(void 0,(function(){return _0x97049b.toString().search("(((.+)+)+)+$").toString().constructor(_0x97049b).search("(((.+)+)+)+$")})),_0x41adf6;function _0x4a6f81(){}_0x97049b(),Object.defineProperty(_0x4a6f81.prototype,"currentLine",{get:function(){return this._lines[this.lineIndex]},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4a6f81.prototype,"canRead",{get:function(){return this.lineIndex<this._lines.length-1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4a6f81.prototype,"lines",{set:function(e){this._lines=[];for(var t=0,i=e;t<i.length;t++){var n=i[t];if("#"!==n[0])if(n.trim().startsWith("//"))this._lines.push(n);else for(var r=n.split(";"),o=0;o<r.length;o++){var a=r[o];(a=a.trim())&&this._lines.push(a+(o!==r.length-1?";":""))}else this._lines.push(n)}},enumerable:!1,configurable:!0});var _0x41e470=(_0x185644=!0,function(e,t){var i=_0x185644?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x185644=!1,i}),_0x5f0b81=_0x41e470(void 0,(function(){return _0x5f0b81.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f0b81).search("(((.+)+)+)+$")})),_0x185644;function _0x19d3c4(){return null!==_0x6c367a&&_0x6c367a.apply(this,arguments)||this}_0x5f0b81(),_0x6c367a&&(_0x19d3c4.__proto__=_0x6c367a),_0x19d3c4.prototype=Object.create(_0x6c367a&&_0x6c367a.prototype),_0x19d3c4.prototype.constructor=_0x6c367a,_0x19d3c4.prototype.process=function(e,t){for(var i=0;i<this.children.length;i++){var n=this.children[i];if(n.isValid(e))return n.process(e,t)}return""};var _0x3736f0=(_0x28c2df=!0,function(e,t){var i=_0x28c2df?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28c2df=!1,i}),_0x44fbeb=_0x3736f0(void 0,(function(){return _0x44fbeb.toString().search("(((.+)+)+)+$").toString().constructor(_0x44fbeb).search("(((.+)+)+)+$")})),_0x28c2df;function _0x2e49ca(){return null!==_0x6c367a&&_0x6c367a.apply(this,arguments)||this}_0x44fbeb(),_0x6c367a&&(_0x2e49ca.__proto__=_0x6c367a),_0x2e49ca.prototype=Object.create(_0x6c367a&&_0x6c367a.prototype),_0x2e49ca.prototype.constructor=_0x6c367a,_0x2e49ca.prototype.isValid=function(e){return this.testExpression.isTrue(e)};var _0x26d317=(_0x231465=!0,function(e,t){var i=_0x231465?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x231465=!1,i}),_0x5af1a3=_0x26d317(void 0,(function(){return _0x5af1a3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5af1a3).search("(((.+)+)+)+$")})),_0x231465;function _0x42c469(){}_0x5af1a3(),_0x42c469.prototype.isTrue=function(e){return!0},_0x42c469.postfixToInfix=function(e){for(var t=[],i=0,n=e;i<n.length;i++){var r=n[i];if(void 0===_0x42c469._OperatorPriority[r])t.push(r);else{var o=t[t.length-1],a=t[t.length-2];t.length-=2,t.push("(".concat(a).concat(r).concat(o,")"))}}return t[t.length-1]},_0x42c469.infixToPostfix=function(e){for(var t=[],i=-1,n=function(){""!==(l=l.trim())&&(t.push(l),l="")},r=function(e){i<_0x42c469._Stack.length-1&&(_0x42c469._Stack[++i]=e)},o=function(){return _0x42c469._Stack[i]},a=function(){return-1===i?"!!INVALID EXPRESSION!!":_0x42c469._Stack[i--]},s=0,l="";s<e.length;){var u=e.charAt(s),c=s<e.length-1?e.substr(s,2):"";if("("===u)l="",r(u);else if(")"===u){for(n();-1!==i&&"("!==o();)t.push(a());a()}else if(_0x42c469._OperatorPriority[c]>1){for(n();-1!==i&&_0x42c469._OperatorPriority[o()]>=_0x42c469._OperatorPriority[c];)t.push(a());r(c),s++}else l+=u;s++}for(n();-1!==i;)"("===o()?a():t.push(a());return t},_0x42c469._OperatorPriority={")":0,"(":1,"||":2,"&&":3},_0x42c469._Stack=["","","","","","","","","","","","","","","","","","","",""];var _0x1fd03b=(_0xa14289=!0,function(e,t){var i=_0xa14289?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa14289=!1,i}),_0x4cc68c=_0x1fd03b(void 0,(function(){return _0x4cc68c.toString().search("(((.+)+)+)+$").toString().constructor(_0x4cc68c).search("(((.+)+)+)+$")})),_0xa14289;function _0x28cf9d(e,t){void 0===t&&(t=!1);var i=_0x42c469.call(this)||this;return i.define=e,i.not=t,i}_0x4cc68c(),_0x42c469&&(_0x28cf9d.__proto__=_0x42c469),_0x28cf9d.prototype=Object.create(_0x42c469&&_0x42c469.prototype),_0x28cf9d.prototype.constructor=_0x42c469,_0x28cf9d.prototype.isTrue=function(e){var t=void 0!==e[this.define];return this.not&&(t=!t),t};var _0x4a33fb=(_0x1b1ef2=!0,function(e,t){var i=_0x1b1ef2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b1ef2=!1,i}),_0x27adcf=_0x4a33fb(void 0,(function(){return _0x27adcf.toString().search("(((.+)+)+)+$").toString().constructor(_0x27adcf).search("(((.+)+)+)+$")})),_0x1b1ef2;function _0x579206(){return null!==_0x42c469&&_0x42c469.apply(this,arguments)||this}_0x27adcf(),_0x42c469&&(_0x579206.__proto__=_0x42c469),_0x579206.prototype=Object.create(_0x42c469&&_0x42c469.prototype),_0x579206.prototype.constructor=_0x42c469,_0x579206.prototype.isTrue=function(e){return this.leftOperand.isTrue(e)||this.rightOperand.isTrue(e)};var _0x1b88bc=(_0x476591=!0,function(e,t){var i=_0x476591?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x476591=!1,i}),_0x3ae882=_0x1b88bc(void 0,(function(){return _0x3ae882.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ae882).search("(((.+)+)+)+$")})),_0x476591;function _0x40f328(){return null!==_0x42c469&&_0x42c469.apply(this,arguments)||this}_0x3ae882(),_0x42c469&&(_0x40f328.__proto__=_0x42c469),_0x40f328.prototype=Object.create(_0x42c469&&_0x42c469.prototype),_0x40f328.prototype.constructor=_0x42c469,_0x40f328.prototype.isTrue=function(e){return this.leftOperand.isTrue(e)&&this.rightOperand.isTrue(e)};var _0x27298e=(_0xfea568=!0,function(e,t){var i=_0xfea568?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xfea568=!1,i}),_0x8d0146=_0x27298e(void 0,(function(){return _0x8d0146.toString().search("(((.+)+)+)+$").toString().constructor(_0x8d0146).search("(((.+)+)+)+$")})),_0xfea568;function _0x1819d4(e,t,i){var n=_0x42c469.call(this)||this;return n.define=e,n.operand=t,n.testValue=i,n}_0x8d0146(),_0x42c469&&(_0x1819d4.__proto__=_0x42c469),_0x1819d4.prototype=Object.create(_0x42c469&&_0x42c469.prototype),_0x1819d4.prototype.constructor=_0x42c469,_0x1819d4.prototype.isTrue=function(e){var t=e[this.define];void 0===t&&(t=this.define);var i=!1,n=parseInt(t),r=parseInt(this.testValue);switch(this.operand){case">":i=n>r;break;case"<":i=n<r;break;case"<=":i=n<=r;break;case">=":i=n>=r;break;case"==":i=n===r}return i};var _0x2393c9=(_0x50cac4=!0,function(e,t){var i=_0x50cac4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x50cac4=!1,i}),_0x174b61=_0x2393c9(void 0,(function(){return _0x174b61.toString().search("(((.+)+)+)+$").toString().constructor(_0x174b61).search("(((.+)+)+)+$")})),_0x50cac4;_0x174b61();var _0x387d68=/defined\s*?\((.+?)\)/g,_0x5edc7b=/defined\s*?\[(.+?)\]/g,_0x32e7f3=/#include\s?<(.+)>(\((.*)\))*(\[(.*)\])*/g;function _0x56a2f1(){}function O$O(e){return(e=e.replace(/\/\/.*/g,"")).replace(/\/\*\*[\s\S]*?\*\//gm,(function(e){for(var t=e.match(/\n/gm).length,i="",n=0;n<t;++n)i+="\n";return i}))}function k$Y(e,t,i,n,r){for(var o,a=0;a<r.length;++a)r[a].name===i&&(o=r[a]);if(!e$2e(o)){n=O$O(n);var s=t.defines;o={name:i,glslSource:n=_0x56a2f1.removeUnuseCode(n,s,e._sysShaderDefines),dependsOn:[],requiredBy:[],evaluated:!1},r.push(o)}return o}function z$X(e,t,i,n){if(!i.evaluated){var r=t.useWGSL?s$V._czmBuiltinsAndUniformsWGSL:s$V._czmBuiltinsAndUniforms;i.evaluated=!0;var o=i.glslSource.match(/\bczm_[a-zA-Z0-9_]*/g);e$2e(o)&&null!==o&&(o=o.filter((function(e,t){return o.indexOf(e)===t})),o.forEach((function(o){if(o!==i.name&&r.hasOwnProperty(o)){var a=k$Y(e,t,o,r[o],n);i.dependsOn.push(a),a.requiredBy.push(i),z$X(e,t,a,n)}})))}}function F$12(e){for(var t=[],i=[];e.length>0;){var n=e.pop();i.push(n),0===n.requiredBy.length&&t.push(n)}for(;t.length>0;){var r=t.shift();e.push(r);for(var o=0;o<r.dependsOn.length;++o){var a=r.dependsOn[o],s=a.requiredBy.indexOf(r);a.requiredBy.splice(s,1),0===a.requiredBy.length&&t.push(a)}}for(var l=[],u=0;u<i.length;++u)0!==i[u].requiredBy.length&&l.push(i[u]);if(0!==l.length){for(var c="A circular dependency was found in the following built-in functions/structs/constants: \n",h=0;h<l.length;++h)c=c+l[h].name+"\n";throw new t$15(c)}}function A$19(e,t,i){var n=[],r=k$Y(i,e,"main",t,n);z$X(i,e,r,n),F$12(n);for(var o="",a=n.length-1;a>=0;--a)o=o+n[a].glslSource+"\n";return o.replace(r.glslSource,"")}function W$10(e,t,i){var n,r,o="",a=e.sources;if(e$2e(a))for(n=0,r=a.length;n<r;++n)o+="\n"+a[n];o=O$O(o=U$11(!0,o));var s=e.defines;o=_0x56a2f1.removeUnuseCode(o,s,i._sysShaderDefines);var l="";e.includeBuiltIns&&(l+=A$19(e,o,i));return l+="\n",l+=o}function U$11(e,t){return t.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,(function(t,i){var n=e?ShaderChunk[i]:to[i];if(void 0===n)throw new Error("Can not resolve #include <"+i+">");return U$11(e,n)}))}function I$1h(e,t,i){var n,r,o,a="",s=e.sources;if(e$2e(s))for(n=0,r=s.length;n<r;++n)a+="\n"+s[n];a=(a=O$O(a=U$11(!1,a))).replace(/#version\s+(.*?)\n/gm,(function(e,t){if(e$2e(o)&&o!==t)throw new t$15("inconsistent versions found: "+o+" and "+t);return o=t,"\n"}));var l=[];a=(a=a.replace(/#extension.*\n/gm,(function(e){return l.push(e),"\n"}))).replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");var u=e.pickColorQualifier;e$2e(u)&&(a=s$V.createPickFragmentShaderSource(a,u));var c="";e$2e(o)&&(c="#version "+o+"\n");var h=l.length;for(n=0;n<h;n++)c+=l[n];t&&(c+="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\n");var d=e.defines;if(e$2e(d))for(n=0,r=d.length;n<r;++n){var f=d[n];0!==f.length&&(c+="#define "+f+"\n")}if(i.webgl2?(c+="#define OUTPUT_DECLARATION\n\n",c+="#define WEBGL2\n\n",c+="#define texture2DGradEXT textureGrad\n\n",c+="#define texture2DLodEXT textureLod\n\n",c+="#define UBO_PARAM \n\n",c+="#define UBO_DECL_BEGIN(bufferName) uniform bufferName {\n",c+="#define UBO_DECL_END }; \n"):i.webgpu?(c+="#define texture2DGradEXT textureGrad\n\n",c+="#define texture2DLodEXT textureLod\n\n",c+="#define WEBGPU\n\n"):(c+="#define UBO_PARAM uniform \n\n",c+="#define UBO_DECL_BEGIN(bufferName) \n",c+="#define UBO_DECL_END \n"),a=_0x56a2f1.removeUnuseCode(a,d,i._sysShaderDefines),i.textureFloatLinear&&(c+="#define OES_texture_float_linear\n\n"),e.includeBuiltIns){var p=A$19(e,a,i);for(l.length=0,p=p.replace(/#extension.*\n/gm,(function(e){return l.push(e),"\n"})),h=l.length,n=0;n<h;n++)c=l[n]+c;c+=p}return c+="\n",c+=a,i.webgl2&&(c=S$W(c,t)),c}function s$V(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).pickColorQualifier;if(e$2e(t)&&"uniform"!==t&&"varying"!==t)throw new t$15("options.pickColorQualifier must be 'uniform' or 'varying'.");this.defines=e$2e(e.defines)?e.defines.slice(0):[],this.sources=e$2e(e.sources)?e.sources.slice(0):[],this.pickColorQualifier=t,this.includeBuiltIns=u$Z(e.includeBuiltIns,!0),this.name=e$2e(e.name)?e.name:void 0,this.useWGSL=u$Z(e.useWGSL,!1)}for(var p$10 in _0x56a2f1.Initialize=function(e){e.processor&&e.processor.initializeShaders&&e.processor.initializeShaders(e.processingContext)},_0x56a2f1.Process=function(e,t,i,n){var r,o=this;(null===(r=t.processor)||void 0===r?void 0:r.preProcessShaderCode)&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),this._ProcessIncludes(e,t,(function(e){t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e));var r=o._ProcessShaderConversion(e,t,n);i(r)}))},_0x56a2f1.PreProcess=function(e,t,i,n){var r,o=this;(null===(r=t.processor)||void 0===r?void 0:r.preProcessShaderCode)&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),this._ProcessIncludes(e,t,(function(e){t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e));var r=o._ApplyPreProcessing(e,t,n);i(r)}))},_0x56a2f1.Finalize=function(e,t,i){return i.processor&&i.processor.finalizeShaders?i.processor.finalizeShaders(e,t,i.processingContext):{vertexCode:e,fragmentCode:t}},_0x56a2f1._ProcessPrecision=function(e,t){var i;if(null===(i=t.processor)||void 0===i?void 0:i.noPrecision)return e;var n=t.shouldUseHighPrecisionShader;return-1===e.indexOf("precision highp float")?e=n?"precision highp float;\n"+e:"precision mediump float;\n"+e:!n&&(e=e.replace("precision highp float","precision mediump float")),e},_0x56a2f1._ExtractOperation=function(e){var t=/defined\((.+)\)/.exec(e);if(t&&t.length)return new _0x28cf9d(t[1].trim(),"!"===e[0]);for(var i="",n=0,r=0,o=["==",">=","<=","<",">"];r<o.length&&(i=o[r],!((n=e.indexOf(i))>-1));r++);return-1===n?new _0x28cf9d(e):new _0x1819d4(e.substring(0,n).trim(),i,e.substring(n+i.length).trim())},_0x56a2f1._BuildSubExpression=function(e){e=e.replace(_0x387d68,"defined[$1]");for(var t=[],i=0,n=_0x42c469.infixToPostfix(e);i<n.length;i++){var r=n[i];if("||"!==r&&"&&"!==r)t.push(r);else if(t.length>=2){var o=t[t.length-1],a=t[t.length-2];t.length-=2;var s="&&"==r?new _0x40f328:new _0x579206;"string"==typeof o&&(o=o.replace(_0x5edc7b,"defined($1)")),"string"==typeof a&&(a=a.replace(_0x5edc7b,"defined($1)")),s.leftOperand="string"==typeof a?this._ExtractOperation(a):a,s.rightOperand="string"==typeof o?this._ExtractOperation(o):o,t.push(s)}}var l=t[t.length-1];return"string"==typeof l&&(l=l.replace(_0x5edc7b,"defined($1)")),"string"==typeof l?this._ExtractOperation(l):l},_0x56a2f1._BuildExpression=function(e,t){var i=new _0x2e49ca,n=e.substring(0,t),r=e.substring(t);return r=r.substring(0,(r.indexOf("//")+1||r.length+1)-1).trim(),i.testExpression="#ifdef"===n?new _0x28cf9d(r):"#ifndef"===n?new _0x28cf9d(r,!0):this._BuildSubExpression(r),i},_0x56a2f1._MoveCursorWithinIf=function(e,t,i){for(var n=e.currentLine;this._MoveCursor(e,i);){var r=(n=e.currentLine).substring(0,5).toLowerCase();if("#else"===r){var o=new _0x6c367a;return t.children.push(o),void this._MoveCursor(e,o)}if("#elif"===r){var a=this._BuildExpression(n,5);t.children.push(a),i=a}}},_0x56a2f1._MoveCursor=function(e,t){for(;e.canRead;){e.lineIndex++;var i=e.currentLine,n=/(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/.exec(i);if(n&&n.length){switch(n[0]){case"#ifdef":var r=new _0x19d3c4;t.children.push(r);var o=this._BuildExpression(i,6);r.children.push(o),this._MoveCursorWithinIf(e,r,o);break;case"#else":case"#elif":return!0;case"#endif":return!1;case"#ifndef":r=new _0x19d3c4;t.children.push(r);o=this._BuildExpression(i,7);r.children.push(o),this._MoveCursorWithinIf(e,r,o);break;case"#if":r=new _0x19d3c4,o=this._BuildExpression(i,3);t.children.push(r),r.children.push(o),this._MoveCursorWithinIf(e,r,o)}}else{var a=new _0x6c367a;if(a.line=i,t.children.push(a),"#"===i[0]&&"d"===i[1]){var s=i.replace(";","").split(" ");a.additionalDefineKey=s[1],3===s.length&&(a.additionalDefineValue=s[2])}}}return!1},_0x56a2f1._EvaluatePreProcessors=function(e,t,i){var n=new _0x6c367a,r=new _0x4a6f81;return r.lineIndex=-1,r.lines=e.split("\n"),this._MoveCursor(r,n),n.process(t,i)},_0x56a2f1.removeUnuseCode=function(e,t,i){for(var n={},r=0,o=t.concat(i);r<o.length;r++){var a=o[r].replace("#define","").replace(";","").trim().split(" ");n[a[0]]=a.length>1?a[1]:""}var s=new _0x6c367a,l=new _0x4a6f81;return l.lineIndex=-1,l.lines=e.split("\n"),this._MoveCursor(l,s),s.process(n,{processor:{}})},_0x56a2f1._PreparePreProcessors=function(e,t){for(var i,n={},r=0,o=e.defines;r<o.length;r++){var a=o[r].replace("#define","").replace(";","").trim().split(" ");n[a[0]]=a.length>1?a[1]:""}return(null===(i=e.processor)||void 0===i?void 0:i.shaderLanguage)===_0x3b3a87.GLSL&&(n.GL_ES="true"),n.__VERSION__=e.version,n[e.platformName]="true",t._getGlobalDefines(n),n},_0x56a2f1._ProcessShaderConversion=function(e,t,i){var n=this._ProcessPrecision(e,t);if(!t.processor)return n;if(t.processor.shaderLanguage===_0x3b3a87.GLSL&&-1!==n.indexOf("#version 3"))return n.replace("#version 300 es","");var r=t.defines,o=this._PreparePreProcessors(t,i);return t.processor.preProcessor&&(n=t.processor.preProcessor(n,r,t.isFragment,t.processingContext)),n=this._EvaluatePreProcessors(n,o,t),t.processor.postProcessor&&(n=t.processor.postProcessor(n,r,t.isFragment,t.processingContext,i)),i._features.needShaderCodeInlining&&(n=i.inlineShaderCode(n)),n},_0x56a2f1._ApplyPreProcessing=function(e,t,i){var n,r,o=e,a=t.defines,s=this._PreparePreProcessors(t,i);return(null===(n=t.processor)||void 0===n?void 0:n.preProcessor)&&(o=t.processor.preProcessor(o,a,t.isFragment,t.processingContext)),o=this._EvaluatePreProcessors(o,s,t),(null===(r=t.processor)||void 0===r?void 0:r.postProcessor)&&(o=t.processor.postProcessor(o,a,t.isFragment,t.processingContext,i)),i._features.needShaderCodeInlining&&(o=i.inlineShaderCode(o)),o},_0x56a2f1._ProcessIncludes=function(e,t,i){for(var n=this,r=_0x32e7f3.exec(e),o=new String(e),a=!1,s=function(){var s=r[1];if(-1!==s.indexOf("__decl__")&&(s=s.replace(/__decl__/,""),t.supportsUniformBuffers&&(s=(s=s.replace(/Vertex/,"Ubo")).replace(/Fragment/,"Ubo")),s+="Declaration"),!t.includesShadersStore[s]){var l=t.shadersRepository+"ShadersInclude/"+s+".fx";return _0x56a2f1._FileToolsLoadFile(l,(function(e){t.includesShadersStore[s]=e,n._ProcessIncludes(o,t,i)})),{value:void 0}}var u=t.includesShadersStore[s];if(r[2])for(var c=r[3].split(","),h=0;h<c.length;h+=2){var d=new RegExp(c[h],"g"),f=c[h+1];u=u.replace(d,f)}if(r[4]){var p=r[5];if(-1!==p.indexOf("..")){var _=p.split(".."),m=parseInt(_[0]),g=parseInt(_[1]),x=u.slice(0);u="",isNaN(g)&&(g=t.indexParameters[_[1]]);for(var y=m;y<g;y++)!t.supportsUniformBuffers&&(x=x.replace(/light\{X\}.(\w*)/g,(function(e,t){return t+"{X}"}))),u+=x.replace(/\{X\}/g,y.toString())+"\n"}else!t.supportsUniformBuffers&&(u=u.replace(/light\{X\}.(\w*)/g,(function(e,t){return t+"{X}"}))),u=u.replace(/\{X\}/g,p)}o=o.replace(r[0],u),a=a||u.indexOf("#include<")>=0||u.indexOf("#include <")>=0,r=_0x32e7f3.exec(e)};null!=r;){var l=s();if("object"==typeof l)return l.value}a?this._ProcessIncludes(o.toString(),t,i):i(o)},_0x56a2f1._FileToolsLoadFile=function(e,t,i,n,r,o){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_9__._WarnImport)("FileTools")},s$V.prototype.clone=function(){return new s$V({sources:this.sources,defines:this.defines,name:this.name,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns,useWGSL:this.useWGSL})},s$V.replaceMain=function(e,t,i){return(i=u$Z(i,!1))?s$V._replaceMainWGSL(e,t):s$V._replaceMainGLSL(e,t)},s$V._replaceMainGLSL=function(e,t){return t="void "+t+"()",e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)},s$V._replaceMainWGSL=function(e,t){return t="fn "+t+"()",e.replace(/(@vertex|@fragment)\s+fn\s+main\s*\(input\s+\:\s+(VertexInputs|FragmentInputs)\s*\)\s*->\s*(FragmentInputs|FragmentOutputs)/g,t)},s$V.prototype.getCacheKey=function(e){const t=this.defines.slice().sort().join(","),i=this.pickColorQualifier||"";this.includeBuiltIns;return`${t}:${i}:${this.sources.join("\n")}`},s$V.prototype._getKeyForShaderProgramName=function(){const e=this.defines.slice().sort().join(","),t=this.pickColorQualifier||"";return`${this.name}:${e}:${t}`},s$V.prototype.createCombinedVertexShader=function(e){return e.webgpu&&this.useWGSL?W$10(this,!1,e):I$1h(this,!1,e)},s$V.prototype.createCombinedFragmentShader=function(e){return e.webgpu&&this.useWGSL?W$10(this,!0,e):I$1h(this,!0,e)},s$V._czmBuiltinsAndUniforms={},G$1g)G$1g.hasOwnProperty(p$10)&&(s$V._czmBuiltinsAndUniforms[p$10]=G$1g[p$10]);for(var v$Q in l$18)if(l$18.hasOwnProperty(v$Q)){var _$V=l$18[v$Q];"function"==typeof _$V.getDeclaration&&(s$V._czmBuiltinsAndUniforms[v$Q]=_$V.getDeclaration(v$Q))}for(var p$10 in s$V._czmBuiltinsAndUniformsWGSL={},E$1a)E$1a.hasOwnProperty(p$10)&&(s$V._czmBuiltinsAndUniformsWGSL[p$10]=E$1a[p$10]);for(var v$Q in l$18)if(l$18.hasOwnProperty(v$Q)){var _$V=l$18[v$Q];"function"==typeof _$V.getDeclaration&&(s$V._czmBuiltinsAndUniformsWGSL[v$Q]=_$V.getWgslDeclaration(v$Q))}s$V.createPickVertexShaderSource=function(e){return s$V.replaceMain(e,"czm_old_main")+"\nattribute vec4 pickColor; \nvarying vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n czm_pickColor = pickColor; \n}"},s$V.createPickFragmentShaderSource=function(e,t){return s$V.replaceMain(e,"czm_old_main")+"\n"+(t+" vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = czm_pickColor; \n}")},s$V.findVarying=function(e,t){for(var i=e.sources,n=t.length,r=0;r<n;++r)for(var o=t[r],a=i.length,s=0;s<a;++s)if(-1!==i[s].indexOf(o))return o};var V$Y=["v_normalEC","v_normal","aNormal"];s$V.findNormalVarying=function(e){return s$V.findVarying(e,V$Y)};var M$15=["v_positionEC"];s$V.findPositionVarying=function(e){return s$V.findVarying(e,M$15)};var Q$11=/UBO_DECL_BEGIN\s*\(\s*(\w+)\s*\)/g,T$11=/UBO_DECL_END/g,R$_=/UBO_PARAM/g;s$V.replaceUniformBufferMarco=function(e){var t=e.match(Q$11);if(null==t)return e;for(var i=0;i<t.length;i++){var n=t[i],r=/UBO_DECL_BEGIN\s*\(\s*(\w+)\s*\)/g.exec(n)[1];e=e.replace(n,"uniform "+r+" {")}return e=(e=e.replace(T$11,"};")).replace(R$_,"")};var I$1g=0;function m$$(e){var t=P$10(e.vertexShaderText,e.fragmentShaderText);this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=u$Z(e.attributeLocations,[]),this._transformFeedbackVaryings=e.transformFeedbackVaryings,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._samplerUniforms=void 0,this._valueUniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=t.duplicateUniformNames,this._cachedShader=void 0,this.maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=t.fragmentShaderText,this._name=e.name,this._isS3MTiles=-1!=this._name.indexOf("S3MTiles"),this.id=I$1g++,this._context=e.context,this._useWGSL=u$Z(e.useWGSL,!1)}function O$N(e,t){for(var i=e.concat(t.defines),n={},r=0,o=i.length;r<o;r++)if(!e$2e(n[i[r]])&&""!=i[r]){n[i[r]]=1}var a="";for(var s in n){var l="";s.indexOf("#define")&&(l="#define "),a+=l+s+"\n"}return a}function b$1a(e){var t=[],i=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(e$2e(i))for(var n=i.length,r=0;r<n;r++){var o=i[r].trim(),a=o.slice(o.lastIndexOf(" ")+1);t.push(a)}return t}function P$10(e,t){var i={};if(!e$1W.highpFloatSupported||!e$1W.highpIntSupported){var n,r,o,a,s=b$1a(e),l=b$1a(t),u=s.length,c=l.length;for(n=0;n<u;n++)for(r=0;r<c;r++)if(s[n]===l[r]){a="czm_mediump_"+(o=s[n]);var h=new RegExp(o+"\\b","g");t=t.replace(h,a),i[a]=o}}return{fragmentShaderText:t,duplicateUniformNames:i}}function E$18(e,t){var i={},n=[],r=[],o=t.getPipelineContext();if(e$2e(o._leftOverUniformsByName)){var a=o._leftOverUniformsByName;for(var s in a){var l=a[s],u=o.uniformBuffer._uniformArraySizes[s];d=e$2e(u)?j$1a(t,s,l,u.arraySize):V$_(t,s,l),i[s]=d,n.push(d)}if(!e){var c=o.shaderProcessingContext.availableTextures;for(var h in c){var d,f=c[h];d=f.isTextureArray?j$1a(t,h,"texture2D",f.textures.length):V$_(t,h,"texture2D"),i[h]=d,r.push(d)}}return{uniformsByName:i,valueUniforms:n,samplerUniforms:r}}}function G$1e(e,t){var i=[],n=[];for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=r,s=e._duplicateUniformNames[a];e$2e(s)&&(o.name=s,a=s);var l=l$18[a];e$2e(l)?i.push({uniform:o,automaticUniform:l}):n.push(o)}return{automaticUniforms:i,manualUniforms:n}}function B$Z(e){if(!e._uniformsByName){e._createEffect();var t=E$18(e._isS3MTiles,e._effect),i=G$1e(e,t.uniformsByName);e._uniformsByName=t.uniformsByName,e._valueUniforms=t.valueUniforms,e._samplerUniforms=t.samplerUniforms,e._automaticUniforms=i.automaticUniforms,e._manualUniforms=i.manualUniforms}}function V$X(e,t,i){if(t._bufferIDRecorder.isDirty(e,i))return!0;if(t._vertexArrayID!=t._lastUseVertexArrayID)return t._lastUseVertexArrayID=t._vertexArrayID,!0;var n,r=t._uniformBuffers.length;for(n=0;n<r;++n){if(t._uniformBuffers[n]._isTextureDirty)return!0}return!1}function r$14(e){e.context.webgpu?this._inner=new m$$(e):this._inner=new g$1a(e)}Object.defineProperties(m$$.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){if(!e$2e(this._vertexAttributes)&&(this._vertexAttributes={},this._effect)){var e=this._effect.getPipelineContext().shaderProcessingContext.availableAttributes;for(const t in e)this._vertexAttributes[t]={name:t,index:e[t]}}return this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return console.log("ShaderProgramGPU.numberOfVertexAttributes.get"),this._numberOfVertexAttributes}},allUniforms:{get:function(){return B$Z(this),this._uniformsByName}},cachedShader:{get:function(){return this._cachedShader},set:function(e){this._cachedShader=e}},name:{get:function(){return this._name}}}),m$$.prototype._createEffect=function(){if(!this._effect){var e=this._context.engine,t=this._attributeLocations,i=[];if(e$2e(t))for(var n in t)t.hasOwnProperty(n)&&i.push(n);this._useWGSL||(this._vertexShaderText=s$V.replaceUniformBufferMarco(this._vertexShaderText),this._fragmentShaderText=s$V.replaceUniformBufferMarco(this._fragmentShaderText));var r=O$N(this._vertexShaderSource.defines,this._fragmentShaderSource),o=[_0x2e0417.SCENE,_0x2e0417.LAYER,_0x2e0417.WaterLayer,_0x2e0417.LIGHT,_0x2e0417.MATERIAL,_0x2e0417.MESH,_0x2e0417.SHADOW,"TileUBO",_0x2e0417.Polyline,_0x2e0417.S3MVolume];this._effect=e.createEffect(this._name,{attributes:i,uniformsNames:[],uniformBuffersNames:o,samplers:[],defines:r,vertexCode:this._vertexShaderText,fragmentCode:this._fragmentShaderText,shaderLanguage:this._useWGSL?_0x3b3a87.WGSL:_0x3b3a87.GLSL},e),this._drawWrapper=new _0x2da137(e),this._drawWrapper.setEffect(this._effect)}},m$$.prototype._isReady=function(){return!!this._effect&&this._effect.isReady()},m$$.prototype._bind=function(){B$Z(this)},m$$.prototype._setUniforms=function(e,t,i,n){var r,o;if(e$2e(e)){var a=this._manualUniforms;for(r=a.length,o=0;o<r;++o){var s=a[o];s.value=e[s.name]()}}var l=this._automaticUniforms;for(r=l.length,o=0;o<r;++o){var u=l[o];u.uniform.value=u.automaticUniform.getValue(t)}this._context.engine.enableEffect(this._drawWrapper),e$2e(n._bufferIDRecorder)||(n._bufferIDRecorder=new f$$),this._setUniformsValue();var c=V$X(this._samplerUniforms,n,this._drawWrapper);if(!e$2e(n.bindGroups)||c||n.fastBundleDirty){for(r=n._uniformBuffers.length,o=0;o<r;++o){n._uniformBuffers[o].setToEffect(this._effect)}n._bufferIDRecorder.setBufferIDToContext(this._samplerUniforms),n.removeAllFastBundleAndBindGroups()}},m$$.prototype._setUniformsValue=function(){var e,t=this._valueUniforms,i=t.length;for(e=0;e<i;++e)t[e].set()},m$$.prototype.isDestroyed=function(){return!1},m$$.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)},m$$.prototype.finalDestroy=function(){return e$2e(this._effect)&&this._effect.dispose(),i$11(this)},r$14.fromCache=function(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.shaderCache.getShaderProgram(e)},r$14.replaceCache=function(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.shaderCache.replaceShaderProgram(e)},Object.defineProperties(r$14.prototype,{vertexShaderSource:{get:function(){return this._inner.vertexShaderSource}},fragmentShaderSource:{get:function(){return this._inner.fragmentShaderSource}},vertexAttributes:{get:function(){return this._inner.vertexAttributes}},numberOfVertexAttributes:{get:function(){return this._inner.numberOfVertexAttributes}},allUniforms:{get:function(){return this._inner.allUniforms}},_cachedShader:{get:function(){return this._inner.cachedShader},set:function(e){this._inner.cachedShader=e}},name:{get:function(){return this._inner.name}},program:{get:function(){return this._inner.program}},maximumTextureUnitIndex:{get:function(){return this._inner.maximumTextureUnitIndex}},id:{get:function(){return this._inner.id}},_attributeLocations:{get:function(){return this._inner._attributeLocations}}}),r$14.prototype._bind=function(){this._inner._bind()},r$14.prototype._setUniforms=function(e,t,i,n){this._inner._setUniforms(e,t,i,n)},r$14.prototype._isReady=function(){return this._inner._isReady()},r$14.prototype.isDestroyed=function(){return!1},r$14.prototype.destroy=function(){this._inner.destroy()},r$14.prototype.finalDestroy=function(){return this._inner.finalDestroy(),i$11(this)};var A$18={STREAM_DRAW:de$y.STREAM_DRAW,STATIC_DRAW:de$y.STATIC_DRAW,DYNAMIC_DRAW:de$y.DYNAMIC_DRAW,validate:function(e){return e===A$18.STREAM_DRAW||e===A$18.STATIC_DRAW||e===A$18.DYNAMIC_DRAW}};function h$11(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),!e$2e(e.typedArray)&&!e$2e(e.sizeInBytes))throw new t$15("Either options.sizeInBytes or options.typedArray is required.");if(e$2e(e.typedArray)&&e$2e(e.sizeInBytes))throw new t$15("Cannot pass in both options.sizeInBytes and options.typedArray.");if(e$2e(e.typedArray)&&(o$1q.typeOf.object("options.typedArray",e.typedArray),o$1q.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!A$18.validate(e.usage))throw new t$15("usage is invalid.");var t=e.context._gl,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=e$2e(n);a&&(r=n.byteLength),o$1q.typeOf.number.greaterThan("sizeInBytes",r,0);var s=t.createBuffer();t.bindBuffer(i,s),t.bufferData(i,a?n:r,o),t.bindBuffer(i,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this._buffer=s,this.context=e.context,e.context.memorySize+=r}Object.defineProperties(h$11.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),h$11.prototype._getBuffer=function(){return this._buffer},h$11.prototype.copyFromArrayView=function(e,t){t=u$Z(t,0),o$1q.defined("arrayView",e),o$1q.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);var i=this._gl,n=this._bufferTarget;i.bindBuffer(n,this._buffer),i.bufferSubData(n,t,e),i.bindBuffer(n,null)},h$11.prototype.copyFromBuffer=function(e,t,i,n){if(!this._webgl2)throw new t$15("A WebGL 2 context is required.");if(!e$2e(e))throw new t$15("readBuffer must be defined.");if(!e$2e(n)||n<=0)throw new t$15("sizeInBytes must be defined and be greater than zero.");if(!e$2e(t)||t<0||t+n>e._sizeInBytes)throw new t$15("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!e$2e(i)||i<0||i+n>this._sizeInBytes)throw new t$15("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(i>=t&&i<t+n||t>i&&t<i+n))throw new t$15("When readBuffer is equal to this, the ranges [readOffset + sizeInBytes) and [writeOffset, writeOffset + sizeInBytes) must not overlap.");if(this._bufferTarget===de$y.ELEMENT_ARRAY_BUFFER&&e._bufferTarget!==de$y.ELEMENT_ARRAY_BUFFER||this._bufferTarget!==de$y.ELEMENT_ARRAY_BUFFER&&e._bufferTarget===de$y.ELEMENT_ARRAY_BUFFER)throw new t$15("Can not copy an index buffer into another buffer type.");var r=de$y.COPY_READ_BUFFER,o=de$y.COPY_WRITE_BUFFER,a=this._gl;a.bindBuffer(o,this._buffer),a.bindBuffer(r,e._buffer),a.copyBufferSubData(r,o,t,i,n),a.bindBuffer(o,null),a.bindBuffer(r,null)},h$11.prototype.getBufferData=function(e,t,i,n){if(t=u$Z(t,0),i=u$Z(i,0),!this._webgl2)throw new t$15("A WebGL 2 context is required.");if(!e$2e(e))throw new t$15("arrayView is required.");var r,o,a=e.byteLength;if(e$2e(n)?(r=n,e$2e(a)?o=1:(a=e.length,o=e.BYTES_PER_ELEMENT)):e$2e(a)?(r=a-i,o=1):(r=(a=e.length)-i,o=e.BYTES_PER_ELEMENT),i<0||i>a)throw new t$15("destinationOffset must be greater than zero and less than the arrayView length.");if(i+r>a)throw new t$15("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new t$15("sourceOffset must be greater than zero and less than the buffers size.");if(t+r*o>this._sizeInBytes)throw new t$15("sourceOffset + length must be less than the buffers size.");var s=this._gl,l=de$y.COPY_READ_BUFFER;s.bindBuffer(l,this._buffer),s.getBufferSubData(l,t,e,i,n),s.bindBuffer(l,null)},h$11.prototype.isDestroyed=function(){return!1},h$11.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),this.context.memorySize-=this.sizeInBytes,i$11(this)};var _0x210484=(_0x415ec1=!0,function(e,t){var i=_0x415ec1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x415ec1=!1,i}),_0x4fe4ad=_0x210484(void 0,(function(){return _0x4fe4ad.toString().search("(((.+)+)+)+$").toString().constructor(_0x4fe4ad).search("(((.+)+)+)+$")})),_0x415ec1;function _0x556c47(e,t,i){void 0===i&&(i=_0x333f62.BUFFER_CREATIONFLAG_READWRITE),this._engine=e,this._engine._storageBuffers.push(this),this._create(t,i)}function r$13(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=e$2e(n);a?r=n.byteLength:n=new Uint8Array(r);var s=_0x333f62.BUFFER_CREATIONFLAG_STORAGE;e$2e(o)&&(o==A$18.STREAM_DRAW||o==A$18.STATIC_DRAW?s|=_0x333f62.BUFFER_CREATIONFLAG_WRITE:o==A$18.DYNAMIC_DRAW&&(s|=_0x333f62.BUFFER_CREATIONFLAG_READWRITE)),e$2e(i)?i==de$y.ELEMENT_ARRAY_BUFFER?(n instanceof Uint8Array&&(e.indexDatatype==ce$z.UNSIGNED_INT?n=new Uint32Array(n.buffer,n.byteOffset,n.byteLength/4):e.indexDatatype==ce$z.UNSIGNED_SHORT&&(n=new Uint16Array(n.buffer,n.byteOffset,n.byteLength/2))),this._dataBuffer=t.engine.createIndexBuffer(n)):i==de$y.ARRAY_BUFFER?(this._dataBuffer=new Buffer$1(t.engine,n,!0),this._dataBuffer._data=null):console.log("BufferGPU not supported bufferTarget"):(this._dataBuffer=new _0x556c47(t.engine,r,s),a&&this._dataBuffer.update(n,0,r)),this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this.context=e.context,e.context.memorySize+=r}function t$X(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),!e$2e(e.typedArray)&&!e$2e(e.sizeInBytes))throw new t$15("Either options.sizeInBytes or options.typedArray is required.");if(e$2e(e.typedArray)&&e$2e(e.sizeInBytes))throw new t$15("Cannot pass in both options.sizeInBytes and options.typedArray.");e$2e(e.typedArray)&&(o$1q.typeOf.object("options.typedArray",e.typedArray),o$1q.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),e.context.webgpu?this._inner=new r$13(e):this._inner=new h$11(e),this.vertexArrayDestroyable=!0}function w$W(e,t,i,n){var r=e$2e(t.vertexBuffer),o=e$2e(t.value),a=t.value?t.value.length:t.componentsPerAttribute;if(!r&&!o)throw new t$15("attribute must have a vertexBuffer or a value.");if(r&&o)throw new t$15("attribute cannot have both a vertexBuffer and a value. It must have either a vertexBuffer property defining per-vertex data or a value property defining data for all vertices.");if(1!==a&&2!==a&&3!==a&&4!==a)throw new t$15(o?"attribute.value.length must be in the range [1, 4].":"attribute.componentsPerAttribute must be in the range [1, 4].");if(e$2e(t.componentDatatype)&&!S$14.validate(t.componentDatatype))throw new t$15("attribute must have a valid componentDatatype or not specify it.");if(e$2e(t.strideInBytes)&&t.strideInBytes>255)throw new t$15("attribute must have a strideInBytes less than or equal to 255 or not specify it.");if(e$2e(t.instanceDivisor)&&t.instanceDivisor>0&&!n.instancedArrays)throw new t$15("instanced arrays is not supported");if(e$2e(t.instanceDivisor)&&t.instanceDivisor<0)throw new t$15("attribute must have an instanceDivisor greater than or equal to zero");if(e$2e(t.instanceDivisor)&&o)throw new t$15("attribute cannot have have an instanceDivisor if it is not backed by a buffer");if(e$2e(t.instanceDivisor)&&t.instanceDivisor>0&&0===t.index)throw new t$15("attribute zero cannot have an instanceDivisor greater than 0");var s={index:u$Z(t.index,i),enabled:u$Z(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:o?t.value.slice(0):void 0,componentsPerAttribute:a,componentDatatype:u$Z(t.componentDatatype,S$14.FLOAT),normalize:u$Z(t.normalize,!1),offsetInBytes:u$Z(t.offsetInBytes,0),strideInBytes:u$Z(t.strideInBytes,0),instanceDivisor:u$Z(t.instanceDivisor,0)};if(r)s.vertexAttrib=function(e){var t=this.index;e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),e.vertexAttribPointer(t,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),e.enableVertexAttribArray(t),this.instanceDivisor>0&&(n.glVertexAttribDivisor(t,this.instanceDivisor),n._vertexAttribDivisors[t]=this.instanceDivisor,n._previousDrawInstanced=!0)},s.disableVertexAttribArray=function(e){e.disableVertexAttribArray(this.index),this.instanceDivisor>0&&n.glVertexAttribDivisor(i,0)};else{switch(s.componentsPerAttribute){case 1:s.vertexAttrib=function(e){e.vertexAttrib1fv(this.index,this.value)};break;case 2:s.vertexAttrib=function(e){e.vertexAttrib2fv(this.index,this.value)};break;case 3:s.vertexAttrib=function(e){e.vertexAttrib3fv(this.index,this.value)};break;case 4:s.vertexAttrib=function(e){e.vertexAttrib4fv(this.index,this.value)}}s.disableVertexAttribArray=function(e){}}e.push(s)}function _$U(e,t,i){for(var n=0;n<t.length;++n){var r=t[n];r.enabled&&r.vertexAttrib(e)}e$2e(i)&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i._getBuffer())}function l$15(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),o$1q.defined("options.attributes",e.attributes);var t,i=e.context,n=i._gl,r=e.attributes,o=e.indexBuffer,a=[],s=1,l=!1,u=!1,c=r.length;for(t=0;t<c;++t)w$W(a,r[t],t,i);for(c=a.length,t=0;t<c;++t){var h=a[t];if(e$2e(h.vertexBuffer)&&0===h.instanceDivisor){var d=h.strideInBytes||h.componentsPerAttribute*S$14.getSizeInBytes(h.componentDatatype);s=h.vertexBuffer.sizeInBytes/d;break}}for(t=0;t<c;++t)a[t].instanceDivisor>0&&(l=!0),e$2e(a[t].value)&&(u=!0);var f,p={};for(t=0;t<c;++t){var _=a[t].index;if(p[_])throw new t$15("Index "+_+" is used by more than one attribute.");p[_]=!0}i.vertexArrayObject&&(f=i.glCreateVertexArray(),i.glBindVertexArray(f),_$U(n,a,o),i.glBindVertexArray(null)),this._numberOfVertices=s,this._hasInstancedAttributes=l,this._hasConstantAttributes=u,this._context=i,this._gl=n,this._vao=f,this._attributes=a,this._indexBuffer=o}function V$W(e){var t=e._context,i=e._hasInstancedAttributes;if(i||t._previousDrawInstanced){t._previousDrawInstanced=i;var n,r=t._vertexAttribDivisors,o=e._attributes,a=e$1W.maximumVertexAttributes;if(i){var s=o.length;for(n=0;n<s;++n){var l=o[n];if(l.enabled){var u=l.instanceDivisor,c=l.index;u!==r[c]&&(t.glVertexAttribDivisor(c,u),r[c]=u)}}}else for(n=0;n<a;++n)r[n]>0&&(t.glVertexAttribDivisor(n,0),r[n]=0)}}function I$1f(e,t){for(var i=e._attributes,n=i.length,r=0;r<n;++r){var o=i[r];o.enabled&&e$2e(o.value)&&o.vertexAttrib(t)}}function C$16(e,t,i,n){var r=e$2e(t.vertexBuffer),o=e$2e(t.value),a=t.value?t.value.length:t.componentsPerAttribute;if(!r&&!o)throw new t$15("attribute must have a vertexBuffer or a value.");if(r&&o)throw new t$15("attribute cannot have both a vertexBuffer and a value. It must have either a vertexBuffer property defining per-vertex data or a value property defining data for all vertices.");if(1!==a&&2!==a&&3!==a&&4!==a)throw new t$15(o?"attribute.value.length must be in the range [1, 4].":"attribute.componentsPerAttribute must be in the range [1, 4].");if(!e$2e(t.name))throw new t$15("attribute must have a name.");if(e$2e(t.componentDatatype)&&!S$14.validate(t.componentDatatype))throw new t$15("attribute must have a valid componentDatatype or not specify it.");if(e$2e(t.strideInBytes)&&t.strideInBytes>2048)throw new t$15("attribute must have a strideInBytes less than or equal to 2048 or not specify it.");if(e$2e(t.strideInBytes)&&t.strideInBytes%4!=0)throw new t$15("attribute must have a strideInBytes is a multiple of 4.");if(e$2e(t.instanceDivisor)&&t.instanceDivisor<0)throw new t$15("attribute must have an instanceDivisor greater than or equal to zero");if(e$2e(t.instanceDivisor)&&o)throw new t$15("attribute cannot have have an instanceDivisor if it is not backed by a buffer");var s={name:t.name,index:u$Z(t.index,i),enabled:u$Z(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:o?t.value.slice(0):void 0,componentsPerAttribute:a,componentDatatype:u$Z(t.componentDatatype,S$14.FLOAT),normalize:u$Z(t.normalize,!1),offsetInBytes:u$Z(t.offsetInBytes,0),strideInBytes:u$Z(t.strideInBytes,0),instanceDivisor:u$Z(t.instanceDivisor,0)};e.push(s)}function m$_(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),o$1q.defined("options.attributes",e.attributes);var t=e.context,i=e.attributes,n=e.indexBuffer;this._babylonVertexBuffers={};var r,o=[],a=1,s=!1,l=i.length;for(r=0;r<l;++r)C$16(o,i[r],r);for(l=o.length,r=0;r<l;++r){if(e$2e((c=o[r]).vertexBuffer)&&(!c.instanceDivisor||0===c.instanceDivisor)){var u=c.strideInBytes||c.componentsPerAttribute*S$14.getSizeInBytes(c.componentDatatype);a=c.vertexBuffer.sizeInBytes/u;break}}for(r=0;r<l;++r){var c;e$2e((c=o[r]).name)||console.log("no attribute name");var h=!1,d=1;c.instanceDivisor&&c.instanceDivisor>0&&(s=!0,h=!0,d=c.instanceDivisor);var f,p,_=e$2e(c.vertexBuffer),m=e$2e(c.value);_&&(p=(f=c.vertexBuffer._inner.dataBuffer).isUpdatable()),m&&(f=c.value,p=!0);const e=u$Z(c.componentDatatype,S$14.FLOAT);var g=R$12.toVertexBufferDataType(e),x=new VertexBuffer(t.engine,f,c.name,p,!0,c.strideInBytes,h,c.offsetInBytes,c.componentsPerAttribute,g,!1,!0,d);this._babylonVertexBuffers[c.name]=x}this._numberOfVertices=a,this._hasInstancedAttributes=s,this._hasConstantAttributes=!1,this._context=t,this._attributes=o,this._indexBuffer=n}_0x4fe4ad(),_0x556c47.prototype._create=function(e,t){this._bufferSize=e,this._creationFlags=t,this._buffer=this._engine.createStorageBuffer(e,t)},_0x556c47.prototype._rebuild=function(){this._create(this._bufferSize,this._creationFlags)},_0x556c47.prototype.getBuffer=function(){return this._buffer},_0x556c47.prototype.update=function(e,t,i){this._buffer&&this._engine.updateStorageBuffer(this._buffer,e,t,i)},_0x556c47.prototype.read=function(e,t,i){return this._engine.readFromStorageBuffer(this._buffer,e,t,i)},_0x556c47.prototype.dispose=function(){var e=this._engine._storageBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._engine._releaseBuffer(this._buffer),this._buffer=null},Object.defineProperties(r$13.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}},dataBuffer:{get:function(){return this._dataBuffer}}}),r$13.prototype._getBuffer=function(){return console.log("BufferGPU.prototype._getBuffer"),this._dataBuffer},r$13.prototype.copyFromArrayView=function(e,t){this._dataBuffer.updateDirectly(e,t,null,!0)},r$13.prototype.copyFromBuffer=function(e,t,i,n){console.log("BufferGPU.prototype.copyFromBuffer")},r$13.prototype.getBufferData=function(e,t,i,n){console.log("BufferGPU.prototype.getBufferData")},r$13.prototype.isDestroyed=function(){return!1},r$13.prototype.destroy=function(){return this._bufferTarget!==de$y.ELEMENT_ARRAY_BUFFER?this._dataBuffer.dispose():this.context._engine._releaseBuffer(this._dataBuffer),this.context.memorySize-=this.sizeInBytes,i$11(this)},t$X.createVertexBuffer=function(e){return o$1q.defined("options.context",e.context),new t$X({context:e.context,bufferTarget:de$y.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},t$X.createIndexBuffer=function(e){if(o$1q.defined("options.context",e.context),!ce$z.validate(e.indexDatatype))throw new t$15("Invalid indexDatatype.");if(e.indexDatatype===ce$z.UNSIGNED_INT&&!e.context.elementIndexUint)throw new t$15("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");var t=e.context,i=e.indexDatatype,n=ce$z.getSizeInBytes(i),r=new t$X({context:t,bufferTarget:de$y.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage,indexDatatype:i}),o=r.sizeInBytes/n;return Object.defineProperties(r,{indexDatatype:{get:function(){return i}},bytesPerIndex:{get:function(){return n}},numberOfIndices:{get:function(){return o}}}),r},Object.defineProperties(t$X.prototype,{sizeInBytes:{get:function(){return this._inner.sizeInBytes}},usage:{get:function(){return this._inner.usage}}}),t$X.prototype._getBuffer=function(){return this._inner._getBuffer()},t$X.prototype.copyFromArrayView=function(e,t){this._inner.copyFromArrayView(e,t)},t$X.prototype.copyFromBuffer=function(e,t,i,n){this._inner.copyFromBuffer(e,t,i,n)},t$X.prototype.getBufferData=function(e,t,i,n){this._inner.getBufferData(e,t,i,n)},t$X.prototype.isDestroyed=function(){return!1},t$X.prototype.destroy=function(){return this._inner.destroy(),i$11(this)},Object.defineProperties(l$15.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),l$15.prototype.getAttribute=function(e){return o$1q.defined("index",e),this._attributes[e]},l$15.prototype._bind=function(){e$2e(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&V$W(this),this._hasConstantAttributes&&I$1f(this,this._gl)):_$U(this._gl,this._attributes,this._indexBuffer)},l$15.prototype._unBind=function(){if(e$2e(this._vao))this._context.glBindVertexArray(null);else{for(var e=this._attributes,t=this._gl,i=0;i<e.length;++i){var n=e[i];n.enabled&&n.disableVertexAttribArray(t)}this._indexBuffer&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}},l$15.prototype.isDestroyed=function(){return!1},l$15.prototype.destroy=function(){for(var e=this._attributes,t=0;t<e.length;++t){var i=e[t].vertexBuffer;e$2e(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}var n=this._indexBuffer;return e$2e(n)&&!n.isDestroyed()&&n.vertexArrayDestroyable&&n.destroy(),e$2e(this._vao)&&this._context.glDeleteVertexArray(this._vao),i$11(this)},Object.defineProperties(m$_.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),m$_.prototype.getAttribute=function(e){return o$1q.defined("index",e),this._attributes[e]},m$_.prototype._bind=function(){var e=this._context.engine;e$2e(this._indexBuffer)?e.bindBuffers(this._babylonVertexBuffers,this._indexBuffer._inner.dataBuffer,null,null):e.bindBuffers(this._babylonVertexBuffers,null,null,null)},m$_.prototype._unBind=function(){console.log("VertexArrayGPU.prototype._unBind")},m$_.prototype.isDestroyed=function(){return!1},m$_.prototype.destroy=function(){for(var e=this._attributes,t=0;t<e.length;++t){var i=e[t].vertexBuffer;e$2e(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}var n=this._indexBuffer;return e$2e(n)&&!n.isDestroyed()&&n.vertexArrayDestroyable&&n.destroy(),i$11(this)};var Y$P=0;function c$13(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),o$1q.defined("options.attributes",e.attributes),e.context.webgpu?this._inner=new m$_(e):this._inner=new l$15(e),this._uniqueID=Y$P++}function E$17(e){return e.values.length/e.componentsPerAttribute}function G$1d(e){return S$14.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function M$14(e){var t,i,n,r=[];for(i in e)e.hasOwnProperty(i)&&e$2e(e[i])&&e$2e(e[i].values)&&(r.push(i),e[i].componentDatatype===S$14.DOUBLE&&(e[i].componentDatatype=S$14.FLOAT,e[i].values=S$14.createTypedArray(S$14.FLOAT,e[i].values)));var o,a=r.length;if(a>0)for(o=E$17(e[r[0]]),t=1;t<a;++t){var s=E$17(e[r[t]]);if(s!==o)throw new t$13("Each attribute list must have the same number of vertices. Attribute "+r[t]+" has a different number of vertices ("+s.toString()+") than attribute "+r[0]+" ("+o.toString()+").")}r.sort((function(t,i){return S$14.getSizeInBytes(e[i].componentDatatype)-S$14.getSizeInBytes(e[t].componentDatatype)}));var l=0,u={};for(t=0;t<a;++t)i=r[t],n=e[i],u[i]=l,l+=G$1d(n);if(l>0){var c=S$14.getSizeInBytes(e[r[0]].componentDatatype),h=l%c;0!==h&&(l+=c-h);var d=new ArrayBuffer(o*l),f={};for(t=0;t<a;++t){i=r[t];var p=S$14.getSizeInBytes(e[i].componentDatatype);f[i]={pointer:S$14.createTypedArray(e[i].componentDatatype,d),index:u[i]/p,strideInComponentType:l/p}}for(t=0;t<o;++t)for(var _=0;_<a;++_){i=r[_];for(var m=(n=e[i]).values,g=f[i],x=g.pointer,y=n.componentsPerAttribute,v=0;v<y;++v)x[g.index+v]=m[t*y+v];g.index+=g.strideInComponentType}return{buffer:d,offsetsInBytes:u,vertexSizeInBytes:l}}}c$13.fromGeometry=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t,i,n,r=e.context,o=u$Z(e.geometry,u$Z.EMPTY_OBJECT),a=u$Z(e.bufferUsage,A$18.DYNAMIC_DRAW),s=u$Z(e.attributeLocations,u$Z.EMPTY_OBJECT),l=u$Z(e.interleave,!1),u=e.vertexArrayAttributes,c=e$2e(u)?u:[],h=o.attributes;if(l){var d=M$14(h);if(e$2e(d)){n=t$X.createVertexBuffer({context:r,typedArray:d.buffer,usage:a});var f=d.offsetsInBytes,p=d.vertexSizeInBytes;for(t in h)h.hasOwnProperty(t)&&e$2e(h[t])&&(e$2e((i=h[t]).values)?c.push({name:t,index:s[t],vertexBuffer:n,componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,offsetInBytes:f[t],strideInBytes:p}):c.push({name:t,index:s[t],value:i.value,componentDatatype:i.componentDatatype,normalize:i.normalize}))}}else for(t in h)if(h.hasOwnProperty(t)&&e$2e(h[t])){var _=(i=h[t]).componentDatatype;_===S$14.DOUBLE&&(_=S$14.FLOAT),n=void 0,e$2e(i.values)&&(n=t$X.createVertexBuffer({context:r,typedArray:S$14.createTypedArray(_,i.values),usage:a})),c.push({name:t,index:s[t],vertexBuffer:n,value:i.value,componentDatatype:_,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize})}var m,g=o.indices;return e$2e(g)&&(m=I$1p.computeNumberOfVertices(o)>=e$2d.SIXTY_FOUR_KILOBYTES&&r.elementIndexUint?t$X.createIndexBuffer({context:r,typedArray:new Uint32Array(g),usage:a,indexDatatype:ce$z.UNSIGNED_INT}):t$X.createIndexBuffer({context:r,typedArray:new Uint16Array(g),usage:a,indexDatatype:ce$z.UNSIGNED_SHORT})),new c$13({context:r,attributes:c,indexBuffer:m})},Object.defineProperties(c$13.prototype,{numberOfAttributes:{get:function(){return this._inner.numberOfAttributes}},numberOfVertices:{get:function(){return this._inner.numberOfVertices}},indexBuffer:{get:function(){return this._inner.indexBuffer}},uniqueID:{get:function(){return this._uniqueID}}}),c$13.prototype.getAttribute=function(e){return o$1q.defined("index",e),this._inner.getAttribute(e)},c$13.prototype._bind=function(){this._inner._bind()},c$13.prototype._unBind=function(){this._inner._unBind()},c$13.prototype.isDestroyed=function(){return!1},c$13.prototype.destroy=function(){return this._inner.destroy(),i$11(this)};var _0x1c6611=(_0x1d5f60=!0,function(e,t){var i=_0x1d5f60?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d5f60=!1,i}),_0x45a610=_0x1c6611(void 0,(function(){return _0x45a610.toString().search("(((.+)+)+)+$").toString().constructor(_0x45a610).search("(((.+)+)+)+$")})),_0x1d5f60;_0x45a610();var Ht$8="attribute vec4 aPosition;\n\nuniform vec4 uDiffuseColor;\n\nvarying vec4 vColor;\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\n#endif\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n #ifdef USE_RelativeOrigin\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz - czm_relativeOrigin, 1.0);\n#else\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n#endif\n gl_Position = depthClampFarPlane(pos);\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n vColor = uDiffuseColor;\n#ifdef NormalVertex\n normal_vertex = aPosition.xyz;\n#endif\n}",_0x43c20f=(_0x17f90d=!0,function(e,t){var i=_0x17f90d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17f90d=!1,i}),_0x49f4db=_0x43c20f(void 0,(function(){return _0x49f4db.toString().search("(((.+)+)+)+$").toString().constructor(_0x49f4db).search("(((.+)+)+)+$")})),_0x17f90d;_0x49f4db();var _0x5ef453="attribute vec4 position;\n\nuniform vec4 uDiffuseColor;\n\nvarying vec4 vColor;\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\n#endif\n\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(position.xyz, 1.0);\n gl_Position = pos;\n clip_vertex = czm_modelView * vec4(position.xyz, 1.0);\n vColor = uDiffuseColor;\n#ifdef NormalVertex\n normal_vertex = position.xyz;\n#endif\n}",_0xf1928d=(_0x39ff6f=!0,function(e,t){var i=_0x39ff6f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39ff6f=!1,i}),_0x167946=_0xf1928d(void 0,(function(){return _0x167946.toString().search("(((.+)+)+)+$").toString().constructor(_0x167946).search("(((.+)+)+)+$")})),_0x39ff6f;_0x167946();var Yt$8="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\nvarying vec4 vColor;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\nconst vec4 LIGHT_COLOR = vec4(0.8, 0.8, 0.8, 1.0);\n#endif\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n gl_FragColor = vColor;\n#ifdef NormalVertex\n vec3 normal = normalize(czm_computeNormal(normal_vertex));\n vec4 eyePosition = czm_modelView * vec4(normal_vertex.xyz, 1.0);\n vec3 lightDirection = normalize(czm_sunPositionWC - vec3(eyePosition));\n float nDotL = max(dot(lightDirection, normal), 0.0);\n vec4 diffuse = vColor * LIGHT_COLOR * nDotL;\n vec4 ambient = vColor * LIGHT_COLOR;\n gl_FragColor = clamp(diffuse + ambient, vec4(0.0), vec4(1.0));\n#endif\n}",_0x527443=(_0x2b28ec=!0,function(e,t){var i=_0x2b28ec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b28ec=!1,i}),_0x360684=_0x527443(void 0,(function(){return _0x360684.toString().search("(((.+)+)+)+$").toString().constructor(_0x360684).search("(((.+)+)+)+$")})),_0x2b28ec;function _0x6cc60b(e,t){this._positions=e,this._skyline=t,this._command=void 0,this._initialize=!1,this._matWorldMatrix=p$1d.IDENTITY.clone(),this._vertexArray=void 0,this._normalArray=void 0,this._texcoordArray=void 0}function _0x558838(e,t,i,n,r){var o=o$1p.fromRadians(t.longitude,t.latitude,0),a=o$1p.fromRadians(t.longitude,t.latitude,100);o$1p.subtract(o,e,o),o$1p.subtract(a,e,a);var s=new e$2c(o.x,o.y,o.z,1);p$1d.multiplyByVector(i,s,s),e$2c.divideByScalar(s,s.w,s),n.push(.5*s.x+.5),n.push(.5*s.y+.5),s=new e$2c(a.x,a.y,a.z,1),p$1d.multiplyByVector(i,s,s),e$2c.divideByScalar(s,s.w,s),r.push(.5*s.x+.5),r.push(.5*s.y+.5)}_0x360684(),_0x6cc60b.prototype.destroy=function(){e$2e(this._command)&&(this._command.vertexArray=this._command.vertexArray&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&this._command.shaderProgram.destroy(),this._command=void 0),this._vertexArray=void 0,this._normalArray=void 0,this._texcoordArray=void 0},_0x6cc60b.prototype.initialize=function(e){if(!this._initialize){e$2e(this._command)&&(this._command.vertexArray=this._command.vertexArray&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&this._command.shaderProgram.destroy(),this._command=void 0),this._typeArray=null,this._initialize=!0;var t=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArray(this._positions)},extrudedHeight:100,granularity:1e-6}),i=U$18.createGeometry(t);p$1d.setTranslation(this._matWorldMatrix,i.boundingSphere.center,this._matWorldMatrix),this._vertexArray=i.attributes.position.values,this._normalArray=i.attributes.normal.values,this._texcoordArray=i.attributes.st.values,this._command=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matWorldMatrix,pass:Le$q.ANALYSIS,boundingVolume:i.boundingSphere,cull:!1});var n={position:0,st:1,normal:2};this._command.vertexArray=c$13.fromGeometry({context:e,geometry:i,attributeLocations:n,bufferUsage:A$18.STATIC_DRAW,interleave:!0});var r=new s$V({sources:[_0x5ef453]}),o=new s$V({sources:[Yt$8]});r.defines.push("NormalVertex"),o.defines.push("NormalVertex"),this._command.shaderProgram=r$14.fromCache({name:"LimitBody",context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n}),this._command.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var a=new e$2c(128/255,1,235/255,1);this._command.uniformMap={uDiffuseColor:function(){return a}}}};var _0x22d022=new o$1p;_0x6cc60b.prototype.update=function(e,t,i,n,r){this.initialize(e),e.readPixelsAsync({framebuffer:this._skyline._depthBuffer.framebuffer}).then((o=>{var a=p$1d.IDENTITY.clone();p$1d.inverse(this._matWorldMatrix,a);var s=e$2d.toDegrees(r.longitude),l=e$2d.toDegrees(r.latitude),u=r.height,c=this._vertexArray.length/3,h=this._command.vertexArray.getAttribute(0),d=new Float32Array(8*c),f=new e$2c,p=new e$2c(1,1/255,1/65025,1/160581375),_=new p$1d;p$1d.inverse(t,_);for(var m=i.x,g=i.y,x=0;x<c;x++){var y=new e$2c(this._vertexArray[3*x],this._vertexArray[3*x+1],this._vertexArray[3*x+2],1),v=a$18.fromCartesian(y);if(v.height<50)p$1d.multiplyByVector(a,y,y),d[8*x]=y.x,d[8*x+1]=y.y,d[8*x+2]=y.z,d[8*x+3]=this._texcoordArray[2*x],d[8*x+4]=this._texcoordArray[2*x+1],d[8*x+5]=this._normalArray[3*x],d[8*x+6]=this._normalArray[3*x+1],d[8*x+7]=this._normalArray[3*x+2];else{var $=[],b=[];_0x558838(e.relativeOrigin,v,t,$,b);var T=0;b[0]!=$[0]&&b[1]!=$[1]&&(T=(b[1]-$[1])/(b[0]-$[0]));for(var C=new e$2c(0,0,0,1),S=0,w=e.drawingBufferHeight-1;w>-1;w--){var E=0;if(0===T)E=Math.round($[0]*e.drawingBufferWidth);else{var P=(w/e.drawingBufferHeight-$[1])/T+$[0];E=Math.round(P*e.drawingBufferWidth)}E=e$2d.clamp(E,0,e.drawingBufferWidth-1);var A=e.drawingBufferWidth*w+E,L=e$2c.unpack(o,4*A,f);if(e$2c.divideByScalar(L,255,L),(S=e$2c.dot(L,p))>0){C.x=E/e.drawingBufferWidth*2-1,C.y=w/e.drawingBufferHeight*2-1;break}}if(this._skyline._scene.frameState.useLogDepth&&S>0){var M=S*n;S=g*(1-m/(Math.pow(2,M)-1+m))/(g-m)}e.webgpu||(S=2*S-1),C.z=S,p$1d.multiplyByVector(_,C,C),e$2c.divideByScalar(C,C.w,C),o$1p.add(e.relativeOrigin,C,_0x22d022);var R=a$18.fromCartesian(_0x22d022);R.longitude=e$2d.toDegrees(R.longitude),R.latitude=e$2d.toDegrees(R.latitude),v.longitude=e$2d.toDegrees(v.longitude),v.latitude=e$2d.toDegrees(v.latitude);var O=a$18.sphericalDistance(s,l,R.longitude,R.latitude),D=a$18.sphericalDistance(s,l,v.longitude,v.latitude)/O*(R.height-u)+u,I=o$1p.fromDegrees(v.longitude,v.latitude,D);y.x=I.x,y.y=I.y,y.z=I.z,y.w=1,p$1d.multiplyByVector(a,y,y),d[8*x]=y.x,d[8*x+1]=y.y,d[8*x+2]=y.z,d[8*x+3]=this._texcoordArray[2*x],d[8*x+4]=this._texcoordArray[2*x+1],d[8*x+5]=this._normalArray[3*x],d[8*x+6]=this._normalArray[3*x+1],d[8*x+7]=this._normalArray[3*x+2]}}h.vertexBuffer.copyFromArrayView(d,0)}))};var _0x487e23=(_0x430140=!0,function(e,t){var i=_0x430140?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x430140=!1,i}),_0x383bba=_0x487e23(void 0,(function(){return _0x383bba.toString().search("(((.+)+)+)+$").toString().constructor(_0x383bba).search("(((.+)+)+)+$")})),_0x430140;function _0x4f9793(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._viewSheds=[],this._boundingSphere=new i$1d,this._frameState=void 0,this._update=!0,this._id=0,this._name="",this._sceneName="",this._checking=!1,this._visibleViewport=4095}function _0x5805d3(e,t,i,n){if(t._isUpdateCommand){for(var r=[],o=[],a=0;a<n.length;a++)r.push(i[n[a]]._cameraDepthBuffer.depthTexture),o.push(i[n[a]]._renderTextureMatrix);t._colorCommand.uniformMap={uVisibleAreaColor:function(){return t._visibleAreaColor},textureCount:function(){return n.length},uHiddenAreaColor:function(){return t._hiddenAreaColor},uRenderTextureMatrixs:function(){return o},uTexture1_size:function(){var e=t._cameraDepthBuffer.depthTexture;return new o$1o(e.width,e.height)},uTextures:function(){return r},uGlobalDepthTexture:function(){return t._globalDepthBuffer.depthTexture},uGlobeTextureSize:function(){return new o$1o(t._globalDepthBuffer.depthTexture.width,t._globalDepthBuffer.depthTexture.height)}},t._colorCommand._isViewShed=!0,t._isUpdateCommand=!1}}function _0x3b009f(e,t,i){for(var n=e._viewSheds,r=0;r<n.length;r++){for(var o=[],a=[],s=n[r]._boundingSphere,l=0;l<n.length;l++)r!=l&&_0x59f6ca(s,n[l]._boundingSphere)&&(o.push(n[l]._name),a.push(l));o.length>0&&(o.push(n[r]._name),a.push(r)),t.push(o),i.push(a)}}function _0x59f6ca(e,t){var i=e.radius,n=t.radius,r=e.center,o=t.center;return o$1p.distance(r,o)<i+n}function t$W(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}function T$10(e,t,i){var n=e._gl;n.framebufferTexture2D(n.FRAMEBUFFER,t,i._target,i._texture,0)}function b$19(e,t,i){var n=e._gl;n.framebufferRenderbuffer(n.FRAMEBUFFER,t,n.RENDERBUFFER,i._getRenderbuffer())}function a$W(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context;o$1q.defined("options.context",t);var i=t._gl,n=e$1W.maximumColorAttachments;if(this._gl=i,this._framebuffer=i.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=u$Z(e.destroyAttachments,!0),e$2e(e.colorTextures)&&e$2e(e.colorRenderbuffers))throw new t$15("Cannot have both color texture and color renderbuffer attachments.");if(e$2e(e.depthTexture)&&e$2e(e.depthRenderbuffer))throw new t$15("Cannot have both a depth texture and depth renderbuffer attachment.");if(e$2e(e.depthStencilTexture)&&e$2e(e.depthStencilRenderbuffer))throw new t$15("Cannot have both a depth-stencil texture and depth-stencil renderbuffer attachment.");var r,o,a,s,l,u=e$2e(e.depthTexture)||e$2e(e.depthRenderbuffer),c=e$2e(e.depthStencilTexture)||e$2e(e.depthStencilRenderbuffer);if(u&&c)throw new t$15("Cannot have both a depth and depth-stencil attachment.");if(e$2e(e.stencilRenderbuffer)&&c)throw new t$15("Cannot have both a stencil and depth-stencil attachment.");if(u&&e$2e(e.stencilRenderbuffer))throw new t$15("Cannot have both a depth and stencil attachment.");if(this._bind(),e$2e(e.colorTextures)){var h=e.colorTextures;if((s=this._colorTextures.length=this._activeColorAttachments.length=h.length)>n)throw new t$15("The number of color attachments exceeds the number supported.");for(a=0;a<s;++a){if(r=h[a],!V$12.isColorFormat(r.pixelFormat))throw new t$15("The color-texture pixel-format must be a color format.");if(r.pixelDatatype===_$_.FLOAT&&!t.colorBufferFloat)throw new t$15("The color texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions. See Context.colorBufferFloat.");if(r.pixelDatatype===_$_.HALF_FLOAT&&!t.colorBufferHalfFloat)throw new t$15("The color texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension. See Context.colorBufferHalfFloat.");T$10(this,l=this._gl.COLOR_ATTACHMENT0+a,r),this._activeColorAttachments[a]=l,this._colorTextures[a]=r}}if(e$2e(e.colorRenderbuffers)){var d=e.colorRenderbuffers;if((s=this._colorRenderbuffers.length=this._activeColorAttachments.length=d.length)>n)throw new t$15("The number of color attachments exceeds the number supported.");for(a=0;a<s;++a)o=d[a],b$19(this,l=this._gl.COLOR_ATTACHMENT0+a,o),this._activeColorAttachments[a]=l,this._colorRenderbuffers[a]=o}if(e$2e(e.depthTexture)){if((r=e.depthTexture).pixelFormat!==V$12.DEPTH_COMPONENT&&r.pixelFormat!==V$12.DEPTH_COMPONENT16&&r.pixelFormat!==V$12.DEPTH_COMPONENT32F)throw new t$15("The depth-texture pixel-format must be DEPTH_COMPONENT.");T$10(this,this._gl.DEPTH_ATTACHMENT,r),this._depthTexture=r}if(e$2e(e.depthRenderbuffer)&&(o=e.depthRenderbuffer,b$19(this,this._gl.DEPTH_ATTACHMENT,o),this._depthRenderbuffer=o),e$2e(e.stencilRenderbuffer)&&(o=e.stencilRenderbuffer,b$19(this,this._gl.STENCIL_ATTACHMENT,o),this._stencilRenderbuffer=o),e$2e(e.depthStencilTexture)){if((r=e.depthStencilTexture).pixelFormat!==V$12.DEPTH_STENCIL)throw new t$15("The depth-stencil pixel-format must be DEPTH_STENCIL.");T$10(this,this._gl.DEPTH_STENCIL_ATTACHMENT,r),this._depthStencilTexture=r}e$2e(e.depthStencilRenderbuffer)&&(o=e.depthStencilRenderbuffer,b$19(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilRenderbuffer=o),this._unBind()}_0x383bba(),Object.defineProperties(_0x4f9793.prototype,{ViewShedCount:{get:function(){return this._viewSheds.length}}}),_0x4f9793.prototype.addViewShed=function(e){e$2e(e)&&this._viewSheds.push(e)},_0x4f9793.prototype.getViewShed=function(e){if(this._viewSheds.length<=e)throw new t$15("index is outrange.");return this._viewSheds[e]},_0x4f9793.prototype.removeViewShed=function(e,t){if(this._viewSheds.length<=e)throw new t$15("index is outrange.");t?this._viewSheds[e].destroy():this._viewSheds[e].clear(),this._viewSheds.splice(e,1)},_0x4f9793.prototype.destroy=function(){for(var e=0;e<this._viewSheds.length;e++)this._viewSheds[e].destroy();this._viewSheds=[],this._scene._analyst3D.remove(this._name,!0)},_0x4f9793.prototype.clear=function(){for(var e=0;e<this._viewSheds.length;e++)this._viewSheds[e].clear();this._viewSheds=[],this._scene._analyst3D.remove(this._name,!1)},_0x4f9793.prototype.build=function(){if(""===this._name&&!this._checking){for(var e=0;e<this._viewSheds.length;e++)""!=this._viewSheds[e]._name?this._scene._analyst3D.add(this._viewSheds[e]):this._viewSheds[e].build();this._name="multiviewshed3d"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this)}},_0x4f9793.prototype.update=function(e,t,i){if("normal"===t._fboState.name&&!t.passes.pick&&!t.camera.bReflect){var n=[],r=[];_0x3b009f(this,n,r);for(var o=this._viewSheds.length,a=0;a<o;a++){var s=n[a],l=r[a];s.length>0&&(this._viewSheds[a]._setMultiViewShedNames(s),_0x5805d3(e,this._viewSheds[a],this._viewSheds,l))}}},t$W.ALL=Object.freeze(new t$W({color:new e$1X(0,0,0,0),depth:1,stencil:0})),t$W.prototype.execute=function(e,t){e.clear(this,t)},t$W.prototype.checkOcclusionQuery=function(e,t,i){return!1},t$W.prototype.isOccluded=function(){return!1},Object.defineProperties(a$W.prototype,{status:{get:function(){this._bind();var e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}}),a$W.prototype._bind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)},a$W.prototype._unBind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)},a$W.prototype._attachTexture=function(e,t){if(1==this.destroyAttachments)throw new t$15("destroyAttachments must be false");var i=this._gl;i.framebufferTexture2D(i.FRAMEBUFFER,e,t._target,t._texture,0)},a$W.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments},a$W.prototype.getColorTexture=function(e){if(!e$2e(e)||e<0||e>=this._colorTextures.length)throw new t$15("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]},a$W.prototype.getColorRenderbuffer=function(e){if(!e$2e(e)||e<0||e>=this._colorRenderbuffers.length)throw new t$15("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]},a$W.prototype.isDestroyed=function(){return!1},a$W.prototype.destroy=function(){if(this.destroyAttachments){for(var e=0,t=this._colorTextures,i=t.length;e<i;++e){var n=t[e];e$2e(n)&&n.destroy()}var r=this._colorRenderbuffers;for(i=r.length,e=0;e<i;++e){var o=r[e];e$2e(o)&&o.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),i$11(this)},a$W.blitFramebuffers=function(e,t,i,n,r,o){if(e.webgl2){var a=e._gl,s=0;if(i.numberOfColorAttachments>0&&(s|=a.COLOR_BUFFER_BIT),(e$2e(i.depthStencilTexture)||e$2e(i.depthTexture))&&(s|=a.DEPTH_BUFFER_BIT|(o?a.STENCIL_BUFFER_BIT:0)),0!=s){a.bindFramebuffer(a.READ_FRAMEBUFFER,t._inner._framebuffer),a.bindFramebuffer(a.DRAW_FRAMEBUFFER,i._inner._framebuffer);var l=i.getColorTexture(0),u=l.width,c=l.height;a.blitFramebuffer(0,0,u,c,0,0,u,c,s,a.NEAREST),a.bindFramebuffer(a.READ_FRAMEBUFFER,null),a.bindFramebuffer(a.DRAW_FRAMEBUFFER,null)}}};var _0x5e9e9f=(_0x31af5b=!0,function(e,t){var i=_0x31af5b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31af5b=!1,i}),_0x274d9b=_0x5e9e9f(void 0,(function(){return _0x274d9b.toString().search("(((.+)+)+)+$").toString().constructor(_0x274d9b).search("(((.+)+)+)+$")})),_0x31af5b;function EventState(e,t,i,n){void 0===t&&(t=!1),this.initialize(e,t,i,n)}function Observer(e,t,i){void 0===i&&(i=null),this.callback=e,this.mask=t,this.scope=i,this._willBeUnregistered=!1,this.unregisterOnNextCall=!1}function Observable(e){this._observers=new Array,this._eventState=new EventState(0),e&&(this._onObserverAdded=e)}_0x274d9b(),EventState.prototype.initialize=function(e,t,i,n){return void 0===t&&(t=!1),this.mask=e,this.skipNextObservers=t,this.target=i,this.currentTarget=n,this},Observable.FromPromise=function(e,t){var i=new Observable;return e.then((function(e){i.notifyObservers(e)})).catch((function(e){if(!t)throw e;t.notifyObservers(e)})),i},Object.defineProperty(Observable.prototype,"observers",{get:function(){return this._observers},enumerable:!1,configurable:!0}),Observable.prototype.add=function(e,t,i,n,r){if(void 0===t&&(t=-1),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===r&&(r=!1),!e)return null;var o=new Observer(e,t,n);return o.unregisterOnNextCall=r,i?this._observers.unshift(o):this._observers.push(o),this._onObserverAdded&&this._onObserverAdded(o),o},Observable.prototype.addOnce=function(e){return this.add(e,void 0,void 0,void 0,!0)},Observable.prototype.remove=function(e){return!!e&&(-1!==this._observers.indexOf(e)&&(this._deferUnregister(e),!0))},Observable.prototype.removeCallback=function(e,t){for(var i=0;i<this._observers.length;i++){var n=this._observers[i];if(!n._willBeUnregistered&&(n.callback===e&&(!t||t===n.scope)))return this._deferUnregister(n),!0}return!1},Observable.prototype._deferUnregister=function(e){var t=this;e.unregisterOnNextCall=!1,e._willBeUnregistered=!0,setTimeout((function(){t._remove(e)}),0)},Observable.prototype._remove=function(e){if(!e)return!1;var t=this._observers.indexOf(e);return-1!==t&&(this._observers.splice(t,1),!0)},Observable.prototype.makeObserverTopPriority=function(e){this._remove(e),this._observers.unshift(e)},Observable.prototype.makeObserverBottomPriority=function(e){this._remove(e),this._observers.push(e)},Observable.prototype.notifyObservers=function(e,t,i,n,r){if(void 0===t&&(t=-1),!this._observers.length)return!0;var o=this._eventState;o.mask=t,o.target=i,o.currentTarget=n,o.skipNextObservers=!1,o.lastReturnValue=e,o.userInfo=r;for(var a=0,s=this._observers;a<s.length;a++){var l=s[a];if(!l._willBeUnregistered&&(l.mask&t&&(l.scope?o.lastReturnValue=l.callback.apply(l.scope,[e,o]):o.lastReturnValue=l.callback(e,o),l.unregisterOnNextCall&&this._deferUnregister(l)),o.skipNextObservers))return!1}return!0},Observable.prototype.notifyObserversWithPromise=function(e,t,i,n,r){var o=this;void 0===t&&(t=-1);var a=Promise.resolve(e);if(!this._observers.length)return a;var s=this._eventState;return s.mask=t,s.target=i,s.currentTarget=n,s.skipNextObservers=!1,s.userInfo=r,this._observers.forEach((function(i){s.skipNextObservers||i._willBeUnregistered||i.mask&t&&(a=i.scope?a.then((function(t){return s.lastReturnValue=t,i.callback.apply(i.scope,[e,s])})):a.then((function(t){return s.lastReturnValue=t,i.callback(e,s)})),i.unregisterOnNextCall&&o._deferUnregister(i))})),a.then((function(){return e}))},Observable.prototype.notifyObserver=function(e,t,i){if(void 0===i&&(i=-1),!e._willBeUnregistered){var n=this._eventState;n.mask=i,n.skipNextObservers=!1,e.callback(t,n),e.unregisterOnNextCall&&this._deferUnregister(e)}},Observable.prototype.hasObservers=function(){return this._observers.length>0},Observable.prototype.clear=function(){this._observers=new Array,this._onObserverAdded=null},Observable.prototype.clone=function(){var e=new Observable;return e._observers=this._observers.slice(0),e},Observable.prototype.hasSpecificMask=function(e){void 0===e&&(e=-1);for(var t=0,i=this._observers;t<i.length;t++){var n=i[t];if(n.mask&e||n.mask===e)return!0}return!1};var _0xc84bd7=(_0x2e374f=!0,function(e,t){var i=_0x2e374f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e374f=!1,i}),_0x493251=_0xc84bd7(void 0,(function(){return _0x493251.toString().search("(((.+)+)+)+$").toString().constructor(_0x493251).search("(((.+)+)+)+$")})),_0x2e374f,_0x5b1f42;function _0x13d391(){this.samplingMode=-1,this._useMipMaps=!0,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this._comparisonFunction=0}_0x493251(),Object.defineProperty(_0x13d391.prototype,"wrapU",{get:function(){return this._cachedWrapU},set:function(e){this._cachedWrapU=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x13d391.prototype,"wrapV",{get:function(){return this._cachedWrapV},set:function(e){this._cachedWrapV=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x13d391.prototype,"wrapR",{get:function(){return this._cachedWrapR},set:function(e){this._cachedWrapR=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x13d391.prototype,"anisotropicFilteringLevel",{get:function(){return this._cachedAnisotropicFilteringLevel},set:function(e){this._cachedAnisotropicFilteringLevel=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x13d391.prototype,"comparisonFunction",{get:function(){return this._comparisonFunction},set:function(e){this._comparisonFunction=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x13d391.prototype,"useMipMaps",{get:function(){return this._useMipMaps},set:function(e){this._useMipMaps=e},enumerable:!1,configurable:!0}),_0x13d391.prototype.setParameters=function(e,t,i,n,r,o){return void 0===e&&(e=_0x333f62.TEXTURE_WRAP_ADDRESSMODE),void 0===t&&(t=_0x333f62.TEXTURE_WRAP_ADDRESSMODE),void 0===i&&(i=_0x333f62.TEXTURE_WRAP_ADDRESSMODE),void 0===n&&(n=1),void 0===r&&(r=_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE),void 0===o&&(o=0),this._cachedWrapU=e,this._cachedWrapV=t,this._cachedWrapR=i,this._cachedAnisotropicFilteringLevel=n,this.samplingMode=r,this._comparisonFunction=o,this},_0x13d391.prototype.compareSampler=function(e){return this._cachedWrapU===e._cachedWrapU&&this._cachedWrapV===e._cachedWrapV&&this._cachedWrapR===e._cachedWrapR&&this._cachedAnisotropicFilteringLevel===e._cachedAnisotropicFilteringLevel&&this.samplingMode===e.samplingMode&&this._comparisonFunction===e._comparisonFunction&&this._useMipMaps===e._useMipMaps},function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.Unknown=0]="Unknown",e[e.Url=1]="Url",e[e.Temp=2]="Temp",e[e.Raw=3]="Raw",e[e.Dynamic=4]="Dynamic",e[e.RenderTarget=5]="RenderTarget",e[e.MultiRenderTarget=6]="MultiRenderTarget",e[e.Cube=7]="Cube",e[e.CubeRaw=8]="CubeRaw",e[e.CubePrefiltered=9]="CubePrefiltered",e[e.Raw3D=10]="Raw3D",e[e.Raw2DArray=11]="Raw2DArray",e[e.DepthStencil=12]="DepthStencil",e[e.CubeRawRGBD=13]="CubeRawRGBD",e[e.Depth=14]="Depth"}(_0x5b1f42||(_0x5b1f42={}));const InternalTextureSource=_0x5b1f42;function InternalTexture(e,t,i){void 0===i&&(i=!1);var n=_0x13d391.call(this)||this;return n.isReady=!1,n.isCube=!1,n.is3D=!1,n.is2DArray=!1,n.isMultiview=!1,n.url="",n.generateMipMaps=!1,n.samples=0,n.type=-1,n.format=-1,n.onLoadedObservable=new Observable,n.onErrorObservable=new Observable,n.onRebuildCallback=null,n.width=0,n.height=0,n.depth=0,n.baseWidth=0,n.baseHeight=0,n.baseDepth=0,n.invertY=!1,n._invertVScale=!1,n._associatedChannel=-1,n._source=InternalTextureSource.Unknown,n._buffer=null,n._bufferView=null,n._bufferViewArray=null,n._bufferViewArrayArray=null,n._size=0,n._extension="",n._files=null,n._workingCanvas=null,n._workingContext=null,n._cachedCoordinatesMode=null,n._isDisabled=!1,n._compression=null,n._sphericalPolynomial=null,n._sphericalPolynomialPromise=null,n._sphericalPolynomialComputed=!1,n._lodGenerationScale=0,n._lodGenerationOffset=0,n._useSRGBBuffer=!1,n._lodTextureHigh=null,n._lodTextureMid=null,n._lodTextureLow=null,n._isRGBD=!1,n._linearSpecularLOD=!1,n._irradianceTexture=null,n._hardwareTexture=null,n._maxLodLevel=null,n._references=1,n._gammaSpace=null,n._engine=e,n._source=t,n._uniqueId=InternalTexture._Counter++,!i&&(n._hardwareTexture=e._createHardwareTexture()),n}_0x13d391&&(InternalTexture.__proto__=_0x13d391),InternalTexture.prototype=Object.create(_0x13d391&&_0x13d391.prototype),InternalTexture.prototype.constructor=_0x13d391,Object.defineProperty(InternalTexture.prototype,"useMipMaps",{get:function(){return this._useMipMaps},set:function(e){this._useMipMaps=e},enumerable:!1,configurable:!0}),Object.defineProperty(InternalTexture.prototype,"uniqueId",{get:function(){return this._uniqueId},enumerable:!1,configurable:!0}),InternalTexture.prototype.getEngine=function(){return this._engine},Object.defineProperty(InternalTexture.prototype,"source",{get:function(){return this._source},enumerable:!1,configurable:!0}),InternalTexture.prototype.incrementReferences=function(){this._references++},InternalTexture.prototype.updateSize=function(e,t,i){void 0===i&&(i=1),this._engine.updateTextureDimensions(this,e,t,i),this.width=e,this.height=t,this.depth=i,this.baseWidth=e,this.baseHeight=t,this.baseDepth=i,this._size=e*t*i},InternalTexture.prototype._rebuild=function(){var e,t=this;if(this.isReady=!1,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this.onRebuildCallback){var i=this.onRebuildCallback(this),n=function(e){e._swapAndDie(t,!1),t.isReady=i.isReady};i.isAsync?i.proxy.then(n):n(i.proxy)}else{var r;switch(this.source){case InternalTextureSource.Temp:break;case InternalTextureSource.Url:return void(r=this._engine.createTexture(null!==(e=this._originalUrl)&&void 0!==e?e:this.url,!this.generateMipMaps,this.invertY,null,this.samplingMode,(function(){r._swapAndDie(t,!1),t.isReady=!0}),null,this._buffer,void 0,this.format,this._extension,void 0,void 0,void 0,this._useSRGBBuffer));case InternalTextureSource.Raw:(r=this._engine.createRawTexture(this._bufferView,this.baseWidth,this.baseHeight,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type,void 0,this._useSRGBBuffer))._swapAndDie(this,!1),this.isReady=!0;break;case InternalTextureSource.Raw3D:(r=this._engine.createRawTexture3D(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type))._swapAndDie(this,!1),this.isReady=!0;break;case InternalTextureSource.Raw2DArray:(r=this._engine.createRawTexture2DArray(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type))._swapAndDie(this,!1),this.isReady=!0;break;case InternalTextureSource.Dynamic:(r=this._engine.createDynamicTexture(this.baseWidth,this.baseHeight,this.generateMipMaps,this.samplingMode))._swapAndDie(this,!1),this._engine.updateDynamicTexture(this,this._engine.getRenderingCanvas(),this.invertY,void 0,void 0,!0);break;case InternalTextureSource.Cube:return void(r=this._engine.createCubeTexture(this.url,null,this._files,!this.generateMipMaps,(function(){r._swapAndDie(t,!1),t.isReady=!0}),null,this.format,this._extension,!1,0,0,null,void 0,this._useSRGBBuffer));case InternalTextureSource.CubeRaw:(r=this._engine.createRawCubeTexture(this._bufferViewArray,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this,!1),this.isReady=!0;break;case InternalTextureSource.CubeRawRGBD:return;case InternalTextureSource.CubePrefiltered:return void((r=this._engine.createPrefilteredCubeTexture(this.url,null,this._lodGenerationScale,this._lodGenerationOffset,(function(e){e&&e._swapAndDie(t,!1),t.isReady=!0}),null,this.format,this._extension))._sphericalPolynomial=this._sphericalPolynomial)}}},InternalTexture.prototype._swapAndDie=function(e,t){var i;void 0===t&&(t=!0),null===(i=this._hardwareTexture)||void 0===i||i.setUsage(e._source,this.generateMipMaps,this.isCube,this.width,this.height),e._hardwareTexture=this._hardwareTexture,t&&(e._isRGBD=this._isRGBD),this._lodTextureHigh&&(e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureHigh=this._lodTextureHigh),this._lodTextureMid&&(e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureMid=this._lodTextureMid),this._lodTextureLow&&(e._lodTextureLow&&e._lodTextureLow.dispose(),e._lodTextureLow=this._lodTextureLow),this._irradianceTexture&&(e._irradianceTexture&&e._irradianceTexture.dispose(),e._irradianceTexture=this._irradianceTexture);var n=this._engine.getLoadedTexturesCache(),r=n.indexOf(this);-1!==r&&n.splice(r,1),-1===(r=n.indexOf(e))&&n.push(e)},InternalTexture.prototype.dispose=function(){this._references--,this.onLoadedObservable.clear(),this.onErrorObservable.clear(),0===this._references&&(this._engine._releaseTexture(this),this._hardwareTexture=null)},InternalTexture._Counter=0;var _0x5589c5=(_0x4014a1=!0,function(e,t){var i=_0x4014a1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4014a1=!1,i}),_0x3078d5=_0x5589c5(void 0,(function(){return _0x3078d5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3078d5).search("(((.+)+)+)+$")})),_0x4014a1;function _0x3ebbca(e,t,i,n){this._textures=null,this._attachments=null,this._generateStencilBuffer=!1,this._generateDepthBuffer=!1,this._depthStencilTextureWithStencil=!1,this._isMulti=e,this._isCube=t,this._size=i,this._engine=n,this._depthStencilTexture=null}_0x3078d5(),Object.defineProperty(_0x3ebbca.prototype,"depthStencilTexture",{get:function(){return this._depthStencilTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"depthStencilTextureWithStencil",{get:function(){return this._depthStencilTextureWithStencil},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"isCube",{get:function(){return this._isCube},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"isMulti",{get:function(){return this._isMulti},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"is2DArray",{get:function(){return this.layers>0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"size",{get:function(){return this.width},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"width",{get:function(){return this._size.width||this._size},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"height",{get:function(){return this._size.height||this._size},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"layers",{get:function(){return this._size.layers||0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"texture",{get:function(){var e,t;return null!==(t=null===(e=this._textures)||void 0===e?void 0:e[0])&&void 0!==t?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"textures",{get:function(){return this._textures},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"samples",{get:function(){var e,t;return null!==(t=null===(e=this.texture)||void 0===e?void 0:e.samples)&&void 0!==t?t:1},enumerable:!1,configurable:!0}),_0x3ebbca.prototype.setSamples=function(e,t,i){return void 0===t&&(t=!0),void 0===i&&(i=!1),this.samples!==e||i?this._isMulti?this._engine.updateMultipleRenderTargetTextureSampleCount(this,e,t):this._engine.updateRenderTargetTextureSampleCount(this,e):e},_0x3ebbca.prototype.setTextures=function(e){Array.isArray(e)?this._textures=e:this._textures=e?[e]:null},_0x3ebbca.prototype.setTexture=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=!0),!this._textures&&(this._textures=[]),this._textures[t]&&i&&this._textures[t].dispose(),this._textures[t]=e},_0x3ebbca.prototype.createDepthStencilTexture=function(e,t,i,n,r){var o;return void 0===e&&(e=0),void 0===t&&(t=!0),void 0===i&&(i=!1),void 0===n&&(n=1),void 0===r&&(r=_0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT),null===(o=this._depthStencilTexture)||void 0===o||o.dispose(),this._depthStencilTextureWithStencil=i,this._depthStencilTexture=this._engine.createDepthStencilTexture(this._size,{bilinearFiltering:t,comparisonFunction:e,generateStencil:i,isCube:this._isCube,samples:n,depthTextureFormat:r},this),this._depthStencilTexture},_0x3ebbca.prototype._shareDepth=function(e){this._depthStencilTexture&&(e._depthStencilTexture&&e._depthStencilTexture.dispose(),e._depthStencilTexture=this._depthStencilTexture,this._depthStencilTexture.incrementReferences())},_0x3ebbca.prototype._swapAndDie=function(e){this.texture&&this.texture._swapAndDie(e),this._textures=null,this.dispose(!0)},_0x3ebbca.prototype._cloneRenderTargetWrapper=function(){var e,t,i,n,r,o,a=null;if(this._isMulti){var s=this.textures;if(s&&s.length>0){var l=!1,u=s.length,c=s[s.length-1]._source;(c===InternalTextureSource.Depth||c===InternalTextureSource.DepthStencil)&&(l=!0,u--);for(var h=[],d=[],f=0;f<u;++f){var p=s[f];h.push(p.samplingMode),d.push(p.type)}var _={samplingModes:h,generateMipMaps:s[0].generateMipMaps,generateDepthBuffer:this._generateDepthBuffer,generateStencilBuffer:this._generateStencilBuffer,generateDepthTexture:l,types:d,textureCount:u},m={width:this.width,height:this.height};a=this._engine.createMultipleRenderTarget(m,_)}}else{var g={};if(g.generateDepthBuffer=this._generateDepthBuffer,g.generateMipMaps=null!==(t=null===(e=this.texture)||void 0===e?void 0:e.generateMipMaps)&&void 0!==t&&t,g.generateStencilBuffer=this._generateStencilBuffer,g.samplingMode=null===(i=this.texture)||void 0===i?void 0:i.samplingMode,g.type=null===(n=this.texture)||void 0===n?void 0:n.type,g.format=null===(r=this.texture)||void 0===r?void 0:r.format,this.isCube)a=this._engine.createRenderTargetCubeTexture(this.width,g);else{m={width:this.width,height:this.height,layers:this.is2DArray?null===(o=this.texture)||void 0===o?void 0:o.depth:void 0};a=this._engine.createRenderTargetTexture(m,g)}a.texture.isReady=!0}return a},_0x3ebbca.prototype._swapRenderTargetWrapper=function(e){if(this._textures&&e._textures)for(var t=0;t<this._textures.length;++t)this._textures[t]._swapAndDie(e._textures[t],!1),e._textures[t].isReady=!0;this._depthStencilTexture&&e._depthStencilTexture&&(this._depthStencilTexture._swapAndDie(e._depthStencilTexture),e._depthStencilTexture.isReady=!0),this._textures=null,this._depthStencilTexture=null},_0x3ebbca.prototype._rebuild=function(){var e=this._cloneRenderTargetWrapper();if(e){if(this._depthStencilTexture){var t=this._depthStencilTexture.samplingMode,i=t===_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE||t===_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE||t===_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST;e.createDepthStencilTexture(this._depthStencilTexture._comparisonFunction,i,this._depthStencilTextureWithStencil,this._depthStencilTexture.samples)}this.samples>1&&e.setSamples(this.samples),e._swapRenderTargetWrapper(this),e.dispose()}},_0x3ebbca.prototype.releaseTextures=function(){var e,t;if(this._textures)for(var i=0;null!==(t=i<(null===(e=this._textures)||void 0===e?void 0:e.length))&&void 0!==t&&t;++i)this._textures[i].dispose();this._textures=null},_0x3ebbca.prototype.dispose=function(e){var t;void 0===e&&(e=!1),!e&&(null===(t=this._depthStencilTexture)||void 0===t||t.dispose(),this._depthStencilTexture=null,this.releaseTextures()),this._engine._releaseRenderTargetWrapper(this)};var v$P=1;function r$12(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context;o$1q.defined("options.context",t),this.id=v$P++,this._context=t,this._colorTextures=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthStencilTexture=void 0,this.destroyAttachments=u$Z(e.destroyAttachments,!0);var i,n,r,o=e.colorTextures,a=!1,s=1,l=1;if(e$2e(e.colorTextures)?(a=o.length>1,s=o[0].width,l=o[0].height):e$2e(e.depthTexture)?(s=e.depthTexture.width,l=e.depthTexture.height):e$2e(e.depthStencilTexture)&&(s=e.depthStencilTexture.width,l=e.depthStencilTexture.height),this._textureSize={width:s,height:l},this._renderTargetWrapper=new _0x3ebbca(a,!1,this._textureSize,t.engine),e$2e(e.colorTextures)){var u=e.colorTextures;r=this._colorTextures.length=this._activeColorAttachments.length=u.length;var c=[],h=[];for(n=0;n<r;++n){if(i=u[n],!V$12.isColorFormat(i.pixelFormat))throw new t$15("The color-texture pixel-format must be a color format.");if(i.pixelDatatype===_$_.FLOAT&&!t.colorBufferFloat)throw new t$15("The color texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions. See Context.colorBufferFloat.");if(i.pixelDatatype===_$_.HALF_FLOAT&&!t.colorBufferHalfFloat)throw new t$15("The color texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension. See Context.colorBufferHalfFloat.");this._renderTargetWrapper.setTexture(i._inner.internalTexture,n,!1),this._colorTextures[n]=i,c.push(n+1),h.push(n+1)}this._renderTargetWrapper._attachments=c,this._renderTargetWrapper._defaultAttachments=h}e$2e(e.depthTexture)&&(this._renderTargetWrapper._depthStencilTextureWithStencil=!1,this._renderTargetWrapper._depthStencilTexture=e.depthTexture._inner.internalTexture,this._depthTexture=e.depthTexture),e$2e(e.depthStencilTexture)&&(this._renderTargetWrapper._depthStencilTextureWithStencil=!0,this._renderTargetWrapper._depthStencilTexture=e.depthStencilTexture._inner.internalTexture,this._depthStencilTexture=e.depthStencilTexture)}function t$V(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context;o$1q.defined("options.context",t),e.context.webgpu?this._inner=new r$12(e):this._inner=new a$W(e)}function n$$(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}function e$1T(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}Object.defineProperties(r$12.prototype,{status:{get:function(){return de$y.FRAMEBUFFER_COMPLETE}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}},textureSize:{get:function(){return this._textureSize}}}),r$12.prototype._bind=function(){e$2e(this._renderTargetWrapper)&&this._context._engine.bindFramebuffer(this._renderTargetWrapper)},r$12.prototype._unBind=function(){e$2e(this._renderTargetWrapper)&&this._context._engine.unBindFramebuffer(this._renderTargetWrapper)},r$12.prototype._attachTexture=function(e,t){console.log("FramebufferGPU.prototype._attachTexture")},r$12.prototype._getActiveColorAttachments=function(){console.log("FramebufferGPU.prototype._getActiveColorAttachments")},r$12.prototype.getColorTexture=function(e){if(!e$2e(e)||e<0||e>=this._colorTextures.length)throw new t$15("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]},r$12.prototype.getColorRenderbuffer=function(e){if(!e$2e(e)||e<0||e>=this._colorRenderbuffers.length)throw new t$15("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]},r$12.prototype.isDestroyed=function(){return!1},r$12.prototype.destroy=function(){if(this._renderTargetWrapper.dispose(!0),this.destroyAttachments){for(var e=this._colorTextures,t=e.length,i=0;i<t;++i){var n=e[i];e$2e(n)&&n.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy()}return i$11(this)},Object.defineProperties(t$V.prototype,{status:{get:function(){return this._inner.status}},numberOfColorAttachments:{get:function(){return this._inner.numberOfColorAttachments}},depthTexture:{get:function(){return this._inner.depthTexture}},depthRenderbuffer:{get:function(){return this._inner.depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._inner.stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._inner.depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._inner.depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}},textureSize:{get:function(){return this._inner.textureSize}}}),t$V.prototype._bind=function(){this._inner._bind()},t$V.prototype._unBind=function(){this._inner._unBind()},t$V.prototype._attachTexture=function(e,t){this._inner._attachTexture(e,t)},t$V.prototype._getActiveColorAttachments=function(){return this._inner._getActiveColorAttachments()},t$V.prototype.getColorTexture=function(e){return this._inner.getColorTexture(e)},t$V.prototype.getColorRenderbuffer=function(e){return this._inner.getColorRenderbuffer(e)},t$V.prototype.isDestroyed=function(){return!1},t$V.prototype.destroy=function(){return this._inner.destroy(),i$11(this)},t$V.blitFramebuffers=function(e,t,i,n,r,o){e.webgpu||a$W.blitFramebuffers(e,t,i,n,r,o)};var T$$={DONT_CARE:de$y.DONT_CARE,FASTEST:de$y.FASTEST,NICEST:de$y.NICEST,validate:function(e){return e===T$$.DONT_CARE||e===T$$.FASTEST||e===T$$.NICEST}},I$1e=Object.freeze(T$$);function e$1S(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.wrapS,q$1a.CLAMP_TO_EDGE),i=u$Z(e.wrapT,q$1a.CLAMP_TO_EDGE),n=u$Z(e.minificationFilter,tt$i.LINEAR),r=u$Z(e.magnificationFilter,rt$k.LINEAR),o=e$2e(e.maximumAnisotropy)?e.maximumAnisotropy:1;if(!q$1a.validate(t))throw new t$15("Invalid sampler.wrapS.");if(!q$1a.validate(i))throw new t$15("Invalid sampler.wrapT.");if(!tt$i.validate(n))throw new t$15("Invalid sampler.minificationFilter.");if(!rt$k.validate(r))throw new t$15("Invalid sampler.magnificationFilter.");o$1q.typeOf.number.greaterThanOrEquals("maximumAnisotropy",o,1),this._wrapS=t,this._wrapT=i,this._minificationFilter=n,this._magnificationFilter=r,this._maximumAnisotropy=o,this._comparisonFunction=e.comparisonFunction}function w$V(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=e.width,n=e.height,r=e.source;e$2e(r)&&(e$2e(i)||(i=u$Z(r.videoWidth,r.width)),e$2e(n)||(n=u$Z(r.videoHeight,r.height)));var o=u$Z(e.pixelFormat,V$12.RGBA),a=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),s=V$12.toInternalFormat(o,a,t),l=V$12.isCompressedFormat(s);if(!e$2e(i)||!e$2e(n))throw new t$15("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(o$1q.typeOf.number.greaterThan("width",i,0),i>e$1W.maximumTextureSize)throw new t$15("Width must be less than or equal to the maximum texture size ("+e$1W.maximumTextureSize+"). Check maximumTextureSize.");if(o$1q.typeOf.number.greaterThan("height",n,0),n>e$1W.maximumTextureSize)throw new t$15("Height must be less than or equal to the maximum texture size ("+e$1W.maximumTextureSize+"). Check maximumTextureSize.");if(!V$12.validate(o))throw new t$15("Invalid options.pixelFormat.");if(!l&&!_$_.validate(a))throw new t$15("Invalid options.pixelDatatype.");if(o===V$12.DEPTH_COMPONENT&&a!==_$_.UNSIGNED_SHORT&&a!==_$_.UNSIGNED_INT&&a!==_$_.FLOAT)throw new t$15("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(o===V$12.DEPTH_STENCIL&&a!==_$_.UNSIGNED_INT_24_8)throw new t$15("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(a===_$_.FLOAT&&!t.floatingPointTexture)throw new t$15("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(a===_$_.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$15("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(V$12.isDepthFormat(o)){if(e$2e(r))throw new t$15("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, source cannot be provided.");if(!t.depthTexture)throw new t$15("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.")}if(l){if(!e$2e(r)||!e$2e(r.arrayBufferView))throw new t$15("When options.pixelFormat is compressed, options.source.arrayBufferView must be defined.");if(V$12.isDXTFormat(s)&&!t.s3tc)throw new t$15("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(V$12.isPVRTCFormat(s)&&!t.pvrtc)throw new t$15("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(V$12.isETC1Format(s)&&!t.etc1)throw new t$15("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.");if(V$12.compressedTextureSizeInBytes(s,i,n)!==r.arrayBufferView.byteLength)throw new t$15("The byte length of the array buffer is invalid for the compressed texture with the given width and height.")}var u=e.preMultiplyAlpha||o===V$12.RGB||o===V$12.LUMINANCE,c=u$Z(e.flipY,!0);const h=u$Z(e.skipColorSpaceConversion,!1);var d=!0,f=t._gl,p=f.TEXTURE_2D,_=f.createTexture();f.activeTexture(f.TEXTURE0),f.bindTexture(p,_);var m,g=4;if(e$2e(r)&&e$2e(r.arrayBufferView)&&!l&&(g=V$12.alignmentInBytes(o,a,i)),f.pixelStorei(f.UNPACK_ALIGNMENT,g),h?f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.NONE):f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.BROWSER_DEFAULT_WEBGL),e$2e(r))if(e$2e(r.arrayBufferView)){f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!1);var x,y,v=r.arrayBufferView;if(l){if(f.compressedTexImage2D(p,0,s,i,n,0,v),e$2e(r.mipLevels))for(x=i,y=n,$=0;$<r.mipLevels.length;++$)(x=0|Math.floor(x/2))<1&&(x=1),(y=0|Math.floor(y/2))<1&&(y=1),f.compressedTexImage2D(p,$+1,s,x,y,0,r.mipLevels[$])}else if(c&&(v=V$12.flipY(v,o,a,i,n)),f.texImage2D(p,0,s,i,n,0,o,_$_.toWebGLConstant(a,t),v),e$2e(r.mipLevels))for(x=i,y=n,$=0;$<r.mipLevels.length;++$)(x=0|Math.floor(x/2))<1&&(x=1),(y=0|Math.floor(y/2))<1&&(y=1),f.texImage2D(p,$+1,s,x,y,0,o,_$_.toWebGLConstant(a,t),r.mipLevels[$])}else if(e$2e(r.framebuffer))f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!1),r.framebuffer!==t.defaultFramebuffer&&r.framebuffer._bind(),f.copyTexImage2D(p,0,s,r.xOffset,r.yOffset,i,n,0),r.framebuffer!==t.defaultFramebuffer&&r.framebuffer._unBind();else{f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,c),f.texImage2D(p,0,s,o,_$_.toWebGLConstant(a,t),r);let i=e.mipLevels;if(e$2e(i))for(var $=0,b=i.length;$<b;++$)f.texImage2D(p,$+1,s,o,_$_.toWebGLConstant(a,t),i[$])}else f.texImage2D(p,0,s,i,n,0,o,_$_.toWebGLConstant(a,t),null),d=!1;f.bindTexture(p,null),m=l?V$12.compressedTextureSizeInBytes(o,i,n):V$12.textureSizeInBytes(o,a,i,n),this._id=e$1T(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=p,this._texture=_,this._internalFormat=s,this._pixelFormat=o,this._pixelDatatype=a,this._width=i,this._height=n,this._dimensions=new o$1o(i,n),this._size=[i,n],this._hasMipmap=!1,this._sizeInBytes=m,this._preMultiplyAlpha=u,this._flipY=c,this._initialized=d,this._sampler=void 0,this.ignoreWEBGL2=!1,this.sampler=e$2e(e.sampler)?e.sampler:new e$1S,t.memorySize+=m}Object.defineProperties(e$1S.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}},comparisonFunction:{get:function(){return this._comparisonFunction}}}),e$1S.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy},w$V.fromFramebuffer=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=t._gl,n=u$Z(e.pixelFormat,V$12.RGB),r=u$Z(e.framebufferXOffset,0),o=u$Z(e.framebufferYOffset,0),a=u$Z(e.width,i.drawingBufferWidth),s=u$Z(e.height,i.drawingBufferHeight),l=e.framebuffer;if(!V$12.validate(n))throw new t$15("Invalid pixelFormat.");if(V$12.isDepthFormat(n)||V$12.isCompressedFormat(n))throw new t$15("pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.");if(o$1q.defined("options.context",e.context),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",r,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",o,0),r+a>i.drawingBufferWidth)throw new t$15("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(o+s>i.drawingBufferHeight)throw new t$15("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new w$V({context:t,width:a,height:s,pixelFormat:n,source:{framebuffer:e$2e(l)?l:t.defaultFramebuffer,xOffset:r,yOffset:o,width:a,height:s}})},Object.defineProperties(w$V.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=e.comparisonFunction,r=t===tt$i.NEAREST_MIPMAP_NEAREST||t===tt$i.NEAREST_MIPMAP_LINEAR||t===tt$i.LINEAR_MIPMAP_NEAREST||t===tt$i.LINEAR_MIPMAP_LINEAR,o=this._context,a=this._pixelDatatype;const s=this._pixelFormat;(a===_$_.FLOAT&&!o.textureFloatLinear||a===_$_.HALF_FLOAT&&!o.textureHalfFloatLinear)&&(t=r?tt$i.NEAREST_MIPMAP_NEAREST:tt$i.NEAREST,i=rt$k.NEAREST),o.webgl2&&V$12.isDepthFormat(s)&&(t=tt$i.NEAREST,i=rt$k.NEAREST);var l=o._gl,u=this._textureTarget;l.activeTexture(l.TEXTURE0),l.bindTexture(u,this._texture),l.texParameteri(u,l.TEXTURE_MIN_FILTER,t),l.texParameteri(u,l.TEXTURE_MAG_FILTER,i),l.texParameteri(u,l.TEXTURE_WRAP_S,e.wrapS),l.texParameteri(u,l.TEXTURE_WRAP_T,e.wrapT),e$2e(this._textureFilterAnisotropic)&&l.texParameteri(u,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),o.webgl2&&n&&(n===de$y.LEQUAL?(l.texParameteri(u,l.TEXTURE_COMPARE_FUNC,de$y.LEQUAL),l.texParameteri(u,l.TEXTURE_COMPARE_MODE,l.NONE)):(l.texParameteri(u,l.TEXTURE_COMPARE_FUNC,n),l.texParameteri(u,l.TEXTURE_COMPARE_MODE,l.COMPARE_REF_TO_TEXTURE))),l.bindTexture(u,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},size:{get:function(){return this._size}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),w$V.prototype.copyFrom=function(e,t,i){if(t=u$Z(t,0),i=u$Z(i,0),o$1q.defined("source",e),V$12.isDepthFormat(this._pixelFormat))throw new t$15("Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");var n=V$12.isCompressedFormat(this._pixelFormat);o$1q.typeOf.number.greaterThanOrEquals("xOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",i,0),o$1q.typeOf.number.lessThanOrEquals("xOffset + source.width",t+e.width,this._width),o$1q.typeOf.number.lessThanOrEquals("yOffset + source.height",i+e.height,this._height);const r=this._context;var o=r._gl,a=this._textureTarget;o.activeTexture(o.TEXTURE0),o.bindTexture(a,this._texture);var s=e.width,l=e.height,u=e.arrayBufferView,c=this._width,h=this._height,d=this._pixelFormat,f=this._pixelDatatype;const p=this._internalFormat;var _=this._preMultiplyAlpha,m=this._flipY,g=4;e$2e(u)&&(g=V$12.alignmentInBytes(d,f,s)),o.pixelStorei(o.UNPACK_ALIGNMENT,g),o.pixelStorei(o.UNPACK_COLORSPACE_CONVERSION_WEBGL,o.BROWSER_DEFAULT_WEBGL);var x=!1;if(!this._initialized){if(0===t&&0===i&&s===c&&l===h)e$2e(u)?(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),m&&(u=V$12.flipY(u,d,f,c,h)),o.texImage2D(a,0,p,c,h,0,d,_$_.toWebGLConstant(f,r),u)):(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,_),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,m),o.texImage2D(a,0,p,d,_$_.toWebGLConstant(f,r),e)),x=!0;else{o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1);var y=V$12.createTypedArray(d,f,c,h);o.texImage2D(a,0,p,c,h,0,d,_$_.toWebGLConstant(f,r),y)}this._initialized=!0}x||(e$2e(u)?(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),m&&(u=V$12.flipY(u,d,f,s,l)),n?o.compressedTexSubImage2D(a,0,t,i,s,l,d,u):o.texSubImage2D(a,0,t,i,s,l,d,_$_.toWebGLConstant(f,r),u)):(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,_),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,m),n?o.compressedTexSubImage2D(a,0,t,i,s,l,d,u):o.texSubImage2D(a,0,t,i,d,_$_.toWebGLConstant(f,r),e))),o.bindTexture(a,null)},w$V.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){if(e=u$Z(e,0),t=u$Z(t,0),i=u$Z(i,0),n=u$Z(n,0),r=u$Z(r,this._width),o=u$Z(o,this._height),V$12.isDepthFormat(this._pixelFormat))throw new t$15("Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(this._pixelDatatype===_$_.FLOAT)throw new t$15("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===_$_.HALF_FLOAT)throw new t$15("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");if(V$12.isCompressedFormat(this._pixelFormat))throw new t$15("Cannot call copyFrom with a compressed texture pixel format.");o$1q.typeOf.number.greaterThanOrEquals("xOffset",e,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",i,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",n,0),o$1q.typeOf.number.lessThanOrEquals("xOffset + width",e+r,this._width),o$1q.typeOf.number.lessThanOrEquals("yOffset + height",t+o,this._height);var a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.copyTexSubImage2D(s,0,e,t,i,n,r,o),a.bindTexture(s,null),this._initialized=!0},w$V.prototype.copyFromTexture=function(e,t,i,n,r,o,a){var s=this._context,l=new t$V({context:s,colorTextures:[e],destroyAttachments:!1});if(l!==s._currentFramebuffer&&(s._currentFramebuffer=l,e$2e(l))){l._bind();var u=l._getActiveColorAttachments();s.drawBuffers&&s.glDrawBuffers(u)}this.copyFromFramebuffer(t,i,n,r,o,a),l.destroy()},w$V.prototype.generateMipmap=function(e){if(e=u$Z(e,I$1e.DONT_CARE),V$12.isDepthFormat(this._pixelFormat))throw new t$15("Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(V$12.isCompressedFormat(this._pixelFormat))throw new t$15("Cannot call generateMipmap with a compressed pixel format.");if(!this._context.webgl2){if(this._width>1&&!e$2d.isPowerOfTwo(this._width))throw new t$15("width must be a power of two to call generateMipmap() in a WebGL1 context.");if(this._height>1&&!e$2d.isPowerOfTwo(this._height))throw new t$15("height must be a power of two to call generateMipmap() in a WebGL1 context.")}if(!I$1e.validate(e))throw new t$15("hint is invalid.");this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},w$V.prototype.isDestroyed=function(){return!1},w$V.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,i$11(this)};var _0xbc1b3e=(_0x11a988=!0,function(e,t){var i=_0x11a988?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x11a988=!1,i}),_0x25d124=_0xbc1b3e(void 0,(function(){return _0x25d124.toString().search("(((.+)+)+)+$").toString().constructor(_0x25d124).search("(((.+)+)+)+$")})),_0x11a988;function _0x3efa68(e,t){this.width=e,this.height=t}_0x25d124(),_0x3efa68.prototype.toString=function(){return"{W: ".concat(this.width,", H: ").concat(this.height,"}")},_0x3efa68.prototype.getClassName=function(){return"Size"},_0x3efa68.prototype.getHashCode=function(){var e=0|this.width;return e=397*e^(0|this.height)},_0x3efa68.prototype.copyFrom=function(e){this.width=e.width,this.height=e.height},_0x3efa68.prototype.copyFromFloats=function(e,t){return this.width=e,this.height=t,this},_0x3efa68.prototype.set=function(e,t){return this.copyFromFloats(e,t)},_0x3efa68.prototype.multiplyByFloats=function(e,t){return new _0x3efa68(this.width*e,this.height*t)},_0x3efa68.prototype.clone=function(){return new _0x3efa68(this.width,this.height)},_0x3efa68.prototype.equals=function(e){return!!e&&(this.width===e.width&&this.height===e.height)},Object.defineProperty(_0x3efa68.prototype,"surface",{get:function(){return this.width*this.height},enumerable:!1,configurable:!0}),_0x3efa68.Zero=function(){return new _0x3efa68(0,0)},_0x3efa68.prototype.add=function(e){return new _0x3efa68(this.width+e.width,this.height+e.height)},_0x3efa68.prototype.subtract=function(e){return new _0x3efa68(this.width-e.width,this.height-e.height)},_0x3efa68.Lerp=function(e,t,i){return new _0x3efa68(e.width+(t.width-e.width)*i,e.height+(t.height-e.height)*i)};var _0x15befd=(_0x220b53=!0,function(e,t){var i=_0x220b53?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x220b53=!1,i}),_0x27639d=_0x15befd(void 0,(function(){return _0x27639d.toString().search("(((.+)+)+)+$").toString().constructor(_0x27639d).search("(((.+)+)+)+$")})),_0x220b53,_0x319f19,_0x9ec4cc,_0x35641a,_0x524ad8,_0x55f8a5,_0x1ffb97,_0x31dfb3,_0x5d58ab,_0x52a314,_0x12594e,_0x175bc2,_0x37a56b,_0x5def63,_0xd232e9,_0x30a614,_0x4efaef,_0x50a60d,_0x291623,_0x158e5e,_0x4bb617,_0x20ad54,_0x4d085e,_0x5d3792,_0x427817,_0x347549,_0x4fceae,_0x2dcd1c,_0x6128f2,_0x41a60c,_0x59ba23,_0x5f170f,_0x246e26,_0x3461a8,_0x475b0d,_0x1e98e2,_0x2189e5,_0x5473dc,_0x445856,_0x264290,_0x222021,_0x438ba1,_0x145c99,_0x5264ab,_0xf848da,_0x464add,_0x3960c5,_0x52694e,_0x3b9a40,_0x1adac6,_0x3c2100,_0x189d32,_0x1d1021,_0x328c09,_0x1ff094,_0x434c90,_0x1b2042,_0xc349d7,_0x3bc73e,_0x255cb0,_0x13e122,_0x4d7f67,_0x12ce9c,_0x5bbb5b,_0x4e2f72,_0xa7e460,_0x263931,_0x318e1f,_0x32b46f,_0x2a29b1,_0x1bc6f1,_0x6e2659;function _0x4f1603(e){this._wrapU=_0x333f62.TEXTURE_WRAP_ADDRESSMODE,this._wrapV=_0x333f62.TEXTURE_WRAP_ADDRESSMODE,this.wrapR=_0x333f62.TEXTURE_WRAP_ADDRESSMODE,this.anisotropicFilteringLevel=4,this.delayLoadState=_0x333f62.DELAYLOADSTATE_NONE,this._texture=null,this._engine=null,this._cachedSize=_0x3efa68.Zero(),this._cachedBaseSize=_0x3efa68.Zero(),this._initialSamplingMode=_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE,this._texture=e,this._texture&&(this._engine=this._texture.getEngine())}_0x27639d(),Object.defineProperty(_0x4f1603.prototype,"wrapU",{get:function(){return this._wrapU},set:function(e){this._wrapU=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4f1603.prototype,"wrapV",{get:function(){return this._wrapV},set:function(e){this._wrapV=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4f1603.prototype,"coordinatesMode",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4f1603.prototype,"isCube",{get:function(){return!!this._texture&&this._texture.isCube},set:function(e){this._texture&&(this._texture.isCube=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4f1603.prototype,"is3D",{get:function(){return!!this._texture&&this._texture.is3D},set:function(e){this._texture&&(this._texture.is3D=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4f1603.prototype,"is2DArray",{get:function(){return!!this._texture&&this._texture.is2DArray},set:function(e){this._texture&&(this._texture.is2DArray=e)},enumerable:!1,configurable:!0}),_0x4f1603.prototype.getClassName=function(){return"ThinTexture"},_0x4f1603.prototype.isReady=function(){return this.delayLoadState===_0x333f62.DELAYLOADSTATE_NOTLOADED?(this.delayLoad(),!1):!!this._texture&&this._texture.isReady},_0x4f1603.prototype.delayLoad=function(){},_0x4f1603.prototype.getInternalTexture=function(){return this._texture},_0x4f1603.prototype.getSize=function(){if(this._texture){if(this._texture.width)return this._cachedSize.width=this._texture.width,this._cachedSize.height=this._texture.height,this._cachedSize;if(this._texture._size)return this._cachedSize.width=this._texture._size,this._cachedSize.height=this._texture._size,this._cachedSize}return this._cachedSize},_0x4f1603.prototype.getBaseSize=function(){return this.isReady()&&this._texture?this._texture._size?(this._cachedBaseSize.width=this._texture._size,this._cachedBaseSize.height=this._texture._size,this._cachedBaseSize):(this._cachedBaseSize.width=this._texture.baseWidth,this._cachedBaseSize.height=this._texture.baseHeight,this._cachedBaseSize):(this._cachedBaseSize.width=0,this._cachedBaseSize.height=0,this._cachedBaseSize)},Object.defineProperty(_0x4f1603.prototype,"samplingMode",{get:function(){return this._texture?this._texture.samplingMode:this._initialSamplingMode},enumerable:!1,configurable:!0}),_0x4f1603.prototype.updateSamplingMode=function(e){this._texture&&this._engine&&this._engine.updateTextureSamplingMode(e,this._texture)},_0x4f1603.prototype.releaseInternalTexture=function(){this._texture&&(this._texture.dispose(),this._texture=null)},_0x4f1603.prototype.dispose=function(){this._texture&&(this.releaseInternalTexture(),this._engine=null)},(_0x319f19||(_0x319f19={})).SRGB="srgb",function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e.LowPower="low-power",e.HighPerformance="high-performance"}(_0x9ec4cc||(_0x9ec4cc={})),_0x524ad8=_0x35641a||(_0x35641a={}),_0x524ad8.DepthClipControl="depth-clip-control",_0x524ad8.Depth24UnormStencil8="depth24unorm-stencil8",_0x524ad8.Depth32FloatStencil8="depth32float-stencil8",_0x524ad8.TextureCompressionBC="texture-compression-bc",_0x524ad8.TextureCompressionETC2="texture-compression-etc2",_0x524ad8.TextureCompressionASTC="texture-compression-astc",_0x524ad8.TimestampQuery="timestamp-query",_0x524ad8.IndirectFirstInstance="indirect-first-instance",_0x524ad8.ShaderF16="shader-f16",_0x524ad8.BGRA8UnormStorage="bgra8unorm-storage",_0x1ffb97=_0x55f8a5||(_0x55f8a5={}),_0x1ffb97[_0x1ffb97.MapRead=1]="MapRead",_0x1ffb97[_0x1ffb97.MapWrite=2]="MapWrite",_0x1ffb97[_0x1ffb97.CopySrc=4]="CopySrc",_0x1ffb97[_0x1ffb97.CopyDst=8]="CopyDst",_0x1ffb97[_0x1ffb97.Index=16]="Index",_0x1ffb97[_0x1ffb97.Vertex=32]="Vertex",_0x1ffb97[_0x1ffb97.Uniform=64]="Uniform",_0x1ffb97[_0x1ffb97.Storage=128]="Storage",_0x1ffb97[_0x1ffb97.Indirect=256]="Indirect",_0x1ffb97[_0x1ffb97.QueryResolve=512]="QueryResolve",_0x5d58ab=_0x31dfb3||(_0x31dfb3={}),_0x5d58ab[_0x5d58ab.Read=1]="Read",_0x5d58ab[_0x5d58ab.Write=2]="Write",_0x12594e=_0x52a314||(_0x52a314={}),_0x12594e.E1d="1d",_0x12594e.E2d="2d",_0x12594e.E3d="3d",_0x37a56b=_0x175bc2||(_0x175bc2={}),_0x37a56b[_0x37a56b.CopySrc=1]="CopySrc",_0x37a56b[_0x37a56b.CopyDst=2]="CopyDst",_0x37a56b[_0x37a56b.TextureBinding=4]="TextureBinding",_0x37a56b[_0x37a56b.StorageBinding=8]="StorageBinding",_0x37a56b[_0x37a56b.RenderAttachment=16]="RenderAttachment",_0xd232e9=_0x5def63||(_0x5def63={}),_0xd232e9.E1d="1d",_0xd232e9.E2d="2d",_0xd232e9.E2dArray="2d-array",_0xd232e9.Cube="cube",_0xd232e9.CubeArray="cube-array",_0xd232e9.E3d="3d",_0x4efaef=_0x30a614||(_0x30a614={}),_0x4efaef.All="all",_0x4efaef.StencilOnly="stencil-only",_0x4efaef.DepthOnly="depth-only",_0x291623=_0x50a60d||(_0x50a60d={}),_0x291623.R8Unorm="r8unorm",_0x291623.R8Snorm="r8snorm",_0x291623.R8Uint="r8uint",_0x291623.R8Sint="r8sint",_0x291623.R16Uint="r16uint",_0x291623.R16Sint="r16sint",_0x291623.R16Float="r16float",_0x291623.RG8Unorm="rg8unorm",_0x291623.RG8Snorm="rg8snorm",_0x291623.RG8Uint="rg8uint",_0x291623.RG8Sint="rg8sint",_0x291623.R32Uint="r32uint",_0x291623.R32Sint="r32sint",_0x291623.R32Float="r32float",_0x291623.RG16Uint="rg16uint",_0x291623.RG16Sint="rg16sint",_0x291623.RG16Float="rg16float",_0x291623.RGBA8Unorm="rgba8unorm",_0x291623.RGBA8UnormSRGB="rgba8unorm-srgb",_0x291623.RGBA8Snorm="rgba8snorm",_0x291623.RGBA8Uint="rgba8uint",_0x291623.RGBA8Sint="rgba8sint",_0x291623.BGRA8Unorm="bgra8unorm",_0x291623.BGRA8UnormSRGB="bgra8unorm-srgb",_0x291623.RGB9E5UFloat="rgb9e5ufloat",_0x291623.RGB10A2Unorm="rgb10a2unorm",_0x291623.RG11B10UFloat="rg11b10ufloat",_0x291623.RG32Uint="rg32uint",_0x291623.RG32Sint="rg32sint",_0x291623.RG32Float="rg32float",_0x291623.RGBA16Uint="rgba16uint",_0x291623.RGBA16Sint="rgba16sint",_0x291623.RGBA16Float="rgba16float",_0x291623.RGBA32Uint="rgba32uint",_0x291623.RGBA32Sint="rgba32sint",_0x291623.RGBA32Float="rgba32float",_0x291623.Stencil8="stencil8",_0x291623.Depth16Unorm="depth16unorm",_0x291623.Depth24Plus="depth24plus",_0x291623.Depth24PlusStencil8="depth24plus-stencil8",_0x291623.Depth32Float="depth32float",_0x291623.BC1RGBAUnorm="bc1-rgba-unorm",_0x291623.BC1RGBAUnormSRGB="bc1-rgba-unorm-srgb",_0x291623.BC2RGBAUnorm="bc2-rgba-unorm",_0x291623.BC2RGBAUnormSRGB="bc2-rgba-unorm-srgb",_0x291623.BC3RGBAUnorm="bc3-rgba-unorm",_0x291623.BC3RGBAUnormSRGB="bc3-rgba-unorm-srgb",_0x291623.BC4RUnorm="bc4-r-unorm",_0x291623.BC4RSnorm="bc4-r-snorm",_0x291623.BC5RGUnorm="bc5-rg-unorm",_0x291623.BC5RGSnorm="bc5-rg-snorm",_0x291623.BC6HRGBUFloat="bc6h-rgb-ufloat",_0x291623.BC6HRGBFloat="bc6h-rgb-float",_0x291623.BC7RGBAUnorm="bc7-rgba-unorm",_0x291623.BC7RGBAUnormSRGB="bc7-rgba-unorm-srgb",_0x291623.ETC2RGB8Unorm="etc2-rgb8unorm",_0x291623.ETC2RGB8UnormSRGB="etc2-rgb8unorm-srgb",_0x291623.ETC2RGB8A1Unorm="etc2-rgb8a1unorm",_0x291623.ETC2RGB8A1UnormSRGB="etc2-rgb8a1unorm-srgb",_0x291623.ETC2RGBA8Unorm="etc2-rgba8unorm",_0x291623.ETC2RGBA8UnormSRGB="etc2-rgba8unorm-srgb",_0x291623.EACR11Unorm="eac-r11unorm",_0x291623.EACR11Snorm="eac-r11snorm",_0x291623.EACRG11Unorm="eac-rg11unorm",_0x291623.EACRG11Snorm="eac-rg11snorm",_0x291623.ASTC4x4Unorm="astc-4x4-unorm",_0x291623.ASTC4x4UnormSRGB="astc-4x4-unorm-srgb",_0x291623.ASTC5x4Unorm="astc-5x4-unorm",_0x291623.ASTC5x4UnormSRGB="astc-5x4-unorm-srgb",_0x291623.ASTC5x5Unorm="astc-5x5-unorm",_0x291623.ASTC5x5UnormSRGB="astc-5x5-unorm-srgb",_0x291623.ASTC6x5Unorm="astc-6x5-unorm",_0x291623.ASTC6x5UnormSRGB="astc-6x5-unorm-srgb",_0x291623.ASTC6x6Unorm="astc-6x6-unorm",_0x291623.ASTC6x6UnormSRGB="astc-6x6-unorm-srgb",_0x291623.ASTC8x5Unorm="astc-8x5-unorm",_0x291623.ASTC8x5UnormSRGB="astc-8x5-unorm-srgb",_0x291623.ASTC8x6Unorm="astc-8x6-unorm",_0x291623.ASTC8x6UnormSRGB="astc-8x6-unorm-srgb",_0x291623.ASTC8x8Unorm="astc-8x8-unorm",_0x291623.ASTC8x8UnormSRGB="astc-8x8-unorm-srgb",_0x291623.ASTC10x5Unorm="astc-10x5-unorm",_0x291623.ASTC10x5UnormSRGB="astc-10x5-unorm-srgb",_0x291623.ASTC10x6Unorm="astc-10x6-unorm",_0x291623.ASTC10x6UnormSRGB="astc-10x6-unorm-srgb",_0x291623.ASTC10x8Unorm="astc-10x8-unorm",_0x291623.ASTC10x8UnormSRGB="astc-10x8-unorm-srgb",_0x291623.ASTC10x10Unorm="astc-10x10-unorm",_0x291623.ASTC10x10UnormSRGB="astc-10x10-unorm-srgb",_0x291623.ASTC12x10Unorm="astc-12x10-unorm",_0x291623.ASTC12x10UnormSRGB="astc-12x10-unorm-srgb",_0x291623.ASTC12x12Unorm="astc-12x12-unorm",_0x291623.ASTC12x12UnormSRGB="astc-12x12-unorm-srgb",_0x291623.Depth24UnormStencil8="depth24unorm-stencil8",_0x291623.Depth32FloatStencil8="depth32float-stencil8",_0x4bb617=_0x158e5e||(_0x158e5e={}),_0x4bb617.ClampToEdge="clamp-to-edge",_0x4bb617.Repeat="repeat",_0x4bb617.MirrorRepeat="mirror-repeat",_0x4d085e=_0x20ad54||(_0x20ad54={}),_0x4d085e.Nearest="nearest",_0x4d085e.Linear="linear",_0x427817=_0x5d3792||(_0x5d3792={}),_0x427817.Never="never",_0x427817.Less="less",_0x427817.Equal="equal",_0x427817.LessEqual="less-equal",_0x427817.Greater="greater",_0x427817.NotEqual="not-equal",_0x427817.GreaterEqual="greater-equal",_0x427817.Always="always",_0x4fceae=_0x347549||(_0x347549={}),_0x4fceae[_0x4fceae.Vertex=1]="Vertex",_0x4fceae[_0x4fceae.Fragment=2]="Fragment",_0x4fceae[_0x4fceae.Compute=4]="Compute",_0x6128f2=_0x2dcd1c||(_0x2dcd1c={}),_0x6128f2.Uniform="uniform",_0x6128f2.Storage="storage",_0x6128f2.ReadOnlyStorage="read-only-storage",_0x59ba23=_0x41a60c||(_0x41a60c={}),_0x59ba23.Filtering="filtering",_0x59ba23.NonFiltering="non-filtering",_0x59ba23.Comparison="comparison",_0x246e26=_0x5f170f||(_0x5f170f={}),_0x246e26.Float="float",_0x246e26.UnfilterableFloat="unfilterable-float",_0x246e26.Depth="depth",_0x246e26.Sint="sint",_0x246e26.Uint="uint",(_0x3461a8||(_0x3461a8={})).WriteOnly="write-only",_0x1e98e2=_0x475b0d||(_0x475b0d={}),_0x1e98e2.Error="error",_0x1e98e2.Warning="warning",_0x1e98e2.Info="info",(_0x2189e5||(_0x2189e5={})).Auto="auto",_0x445856=_0x5473dc||(_0x5473dc={}),_0x445856.PointList="point-list",_0x445856.LineList="line-list",_0x445856.LineStrip="line-strip",_0x445856.TriangleList="triangle-list",_0x445856.TriangleStrip="triangle-strip",_0x222021=_0x264290||(_0x264290={}),_0x222021.CCW="ccw",_0x222021.CW="cw",_0x145c99=_0x438ba1||(_0x438ba1={}),_0x145c99.None="none",_0x145c99.Front="front",_0x145c99.Back="back",_0xf848da=_0x5264ab||(_0x5264ab={}),_0xf848da[_0xf848da.Red=1]="Red",_0xf848da[_0xf848da.Green=2]="Green",_0xf848da[_0xf848da.Blue=4]="Blue",_0xf848da[_0xf848da.Alpha=8]="Alpha",_0xf848da[_0xf848da.All=15]="All",_0x3960c5=_0x464add||(_0x464add={}),_0x3960c5.Zero="zero",_0x3960c5.One="one",_0x3960c5.Src="src",_0x3960c5.OneMinusSrc="one-minus-src",_0x3960c5.SrcAlpha="src-alpha",_0x3960c5.OneMinusSrcAlpha="one-minus-src-alpha",_0x3960c5.Dst="dst",_0x3960c5.OneMinusDst="one-minus-dst",_0x3960c5.DstAlpha="dst-alpha",_0x3960c5.OneMinusDstAlpha="one-minus-dst-alpha",_0x3960c5.SrcAlphaSaturated="src-alpha-saturated",_0x3960c5.Constant="constant",_0x3960c5.OneMinusConstant="one-minus-constant",_0x3b9a40=_0x52694e||(_0x52694e={}),_0x3b9a40.Add="add",_0x3b9a40.Subtract="subtract",_0x3b9a40.ReverseSubtract="reverse-subtract",_0x3b9a40.Min="min",_0x3b9a40.Max="max",_0x3c2100=_0x1adac6||(_0x1adac6={}),_0x3c2100.Keep="keep",_0x3c2100.Zero="zero",_0x3c2100.Replace="replace",_0x3c2100.Invert="invert",_0x3c2100.IncrementClamp="increment-clamp",_0x3c2100.DecrementClamp="decrement-clamp",_0x3c2100.IncrementWrap="increment-wrap",_0x3c2100.DecrementWrap="decrement-wrap",_0x1d1021=_0x189d32||(_0x189d32={}),_0x1d1021.Uint16="uint16",_0x1d1021.Uint32="uint32",_0x1ff094=_0x328c09||(_0x328c09={}),_0x1ff094.Uint8x2="uint8x2",_0x1ff094.Uint8x4="uint8x4",_0x1ff094.Sint8x2="sint8x2",_0x1ff094.Sint8x4="sint8x4",_0x1ff094.Unorm8x2="unorm8x2",_0x1ff094.Unorm8x4="unorm8x4",_0x1ff094.Snorm8x2="snorm8x2",_0x1ff094.Snorm8x4="snorm8x4",_0x1ff094.Uint16x2="uint16x2",_0x1ff094.Uint16x4="uint16x4",_0x1ff094.Sint16x2="sint16x2",_0x1ff094.Sint16x4="sint16x4",_0x1ff094.Unorm16x2="unorm16x2",_0x1ff094.Unorm16x4="unorm16x4",_0x1ff094.Snorm16x2="snorm16x2",_0x1ff094.Snorm16x4="snorm16x4",_0x1ff094.Float16x2="float16x2",_0x1ff094.Float16x4="float16x4",_0x1ff094.Float32="float32",_0x1ff094.Float32x2="float32x2",_0x1ff094.Float32x3="float32x3",_0x1ff094.Float32x4="float32x4",_0x1ff094.Uint32="uint32",_0x1ff094.Uint32x2="uint32x2",_0x1ff094.Uint32x3="uint32x3",_0x1ff094.Uint32x4="uint32x4",_0x1ff094.Sint32="sint32",_0x1ff094.Sint32x2="sint32x2",_0x1ff094.Sint32x3="sint32x3",_0x1ff094.Sint32x4="sint32x4",_0x1b2042=_0x434c90||(_0x434c90={}),_0x1b2042.Vertex="vertex",_0x1b2042.Instance="instance",_0x3bc73e=_0xc349d7||(_0xc349d7={}),_0x3bc73e.Beginning="beginning",_0x3bc73e.End="end",_0x13e122=_0x255cb0||(_0x255cb0={}),_0x13e122.Beginning="beginning",_0x13e122.End="end",_0x12ce9c=_0x4d7f67||(_0x4d7f67={}),_0x12ce9c.Load="load",_0x12ce9c.Clear="clear",_0x4e2f72=_0x5bbb5b||(_0x5bbb5b={}),_0x4e2f72.Store="store",_0x4e2f72.Discard="discard",_0x263931=_0xa7e460||(_0xa7e460={}),_0x263931.Occlusion="occlusion",_0x263931.Timestamp="timestamp",_0x32b46f=_0x318e1f||(_0x318e1f={}),_0x32b46f.Opaque="opaque",_0x32b46f.Premultiplied="premultiplied",(_0x2a29b1||(_0x2a29b1={})).Destroyed="destroyed",_0x6e2659=_0x1bc6f1||(_0x1bc6f1={}),_0x6e2659.OutOfMemory="out-of-memory",_0x6e2659.Validation="validation";var _0x5213c6={PredefinedColorSpace:_0x319f19,PowerPreference:_0x9ec4cc,FeatureName:_0x35641a,BufferUsage:_0x55f8a5,MapMode:_0x31dfb3,TextureDimension:_0x52a314,TextureUsage:_0x175bc2,TextureViewDimension:_0x5def63,TextureAspect:_0x30a614,TextureFormat:_0x50a60d,AddressMode:_0x158e5e,FilterMode:_0x20ad54,CompareFunction:_0x5d3792,ShaderStage:_0x347549,BufferBindingType:_0x2dcd1c,SamplerBindingType:_0x41a60c,TextureSampleType:_0x5f170f,StorageTextureAccess:_0x3461a8,CompilationMessageType:_0x475b0d,AutoLayoutMode:_0x2189e5,PrimitiveTopology:_0x5473dc,FrontFace:_0x264290,CullMode:_0x438ba1,ColorWriteFlags:_0x5264ab,BlendFactor:_0x464add,BlendOperation:_0x52694e,StencilOperation:_0x1adac6,IndexFormat:_0x189d32,VertexFormat:_0x328c09,InputStepMode:_0x434c90,ComputePassTimestampLocation:_0xc349d7,RenderPassTimestampLocation:_0x255cb0,LoadOp:_0x4d7f67,StoreOp:_0x5bbb5b,QueryType:_0xa7e460,CanvasCompositingAlphaMode:_0x318e1f,DeviceLostReason:_0x2a29b1,ErrorFilter:_0x1bc6f1},_0x251b06=(_0x1de4d1=!0,function(e,t){var i=_0x1de4d1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1de4d1=!1,i}),_0x5103ca=_0x251b06(void 0,(function(){return _0x5103ca.toString().search("(((.+)+)+)+$").toString().constructor(_0x5103ca).search("(((.+)+)+)+$")})),_0x1de4d1;function _0x3ea109(){}_0x5103ca(),_0x3ea109.WithinEpsilon=function(e,t,i){return void 0===i&&(i=1401298e-51),Math.abs(e-t)<=i},_0x3ea109.ToHex=function(e){var t=e.toString(16);return e<=15?("0"+t).toUpperCase():t.toUpperCase()},_0x3ea109.Sign=function(e){return 0===(e=+e)||isNaN(e)?e:e>0?1:-1},_0x3ea109.Clamp=function(e,t,i){return void 0===t&&(t=0),void 0===i&&(i=1),Math.min(i,Math.max(t,e))},_0x3ea109.Log2=function(e){return Math.log(e)*Math.LOG2E},_0x3ea109.ILog2=function(e){if(Math.log2)return Math.floor(Math.log2(e));if(e<0)return NaN;if(0===e)return-1/0;var t=0;if(e<1){for(;e<1;)t++,e*=2;t=-t}else if(e>1)for(;e>1;)t++,e=Math.floor(e/2);return t},_0x3ea109.Repeat=function(e,t){return e-Math.floor(e/t)*t},_0x3ea109.Normalize=function(e,t,i){return(e-t)/(i-t)},_0x3ea109.Denormalize=function(e,t,i){return e*(i-t)+t},_0x3ea109.DeltaAngle=function(e,t){var i=_0x3ea109.Repeat(t-e,360);return i>180&&(i-=360),i},_0x3ea109.PingPong=function(e,t){var i=_0x3ea109.Repeat(e,2*t);return t-Math.abs(i-t)},_0x3ea109.SmoothStep=function(e,t,i){var n=_0x3ea109.Clamp(i);return t*(n=-2*n*n*n+3*n*n)+e*(1-n)},_0x3ea109.MoveTowards=function(e,t,i){return Math.abs(t-e)<=i?t:e+_0x3ea109.Sign(t-e)*i},_0x3ea109.MoveTowardsAngle=function(e,t,i){var n=_0x3ea109.DeltaAngle(e,t),r=0;return-i<n&&n<i?r=t:(t=e+n,r=_0x3ea109.MoveTowards(e,t,i)),r},_0x3ea109.Lerp=function(e,t,i){return e+(t-e)*i},_0x3ea109.LerpAngle=function(e,t,i){var n=_0x3ea109.Repeat(t-e,360);return n>180&&(n-=360),e+n*_0x3ea109.Clamp(i)},_0x3ea109.InverseLerp=function(e,t,i){return e!=t?_0x3ea109.Clamp((i-e)/(t-e)):0},_0x3ea109.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o;return e*(2*a-3*o+1)+i*(-2*a+3*o)+t*(a-2*o+r)+n*(a-o)},_0x3ea109.Hermite1stDerivative=function(e,t,i,n,r){var o=r*r;return 6*(o-r)*e+(3*o-4*r+1)*t+6*(-o+r)*i+(3*o-2*r)*n},_0x3ea109.RandomRange=function(e,t){return e===t?e:Math.random()*(t-e)+e},_0x3ea109.RangeToPercent=function(e,t,i){return(e-t)/(i-t)},_0x3ea109.PercentToRange=function(e,t,i){return(i-t)*e+t},_0x3ea109.NormalizeRadians=function(e){return e-=_0x3ea109.TwoPi*Math.floor((e+Math.PI)/_0x3ea109.TwoPi)},_0x3ea109.HCF=function(e,t){var i=e%t;return 0===i?t:_0x3ea109.HCF(t,i)},_0x3ea109.TwoPi=2*Math.PI;var _0x1c5e22=(_0x2b542b=!0,function(e,t){var i=_0x2b542b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b542b=!1,i}),_0x32d4b0=_0x1c5e22(void 0,(function(){return _0x32d4b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x32d4b0).search("(((.+)+)+)+$")})),_0x2b542b;function _0x4de77b(e){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=_0x4de77b._Counter++;return this._buffer=e,this}_0x32d4b0(),Object.defineProperty(_0x4de77b.prototype,"underlyingResource",{get:function(){return this._buffer},enumerable:!1,configurable:!0}),_0x4de77b._Counter=0;var _0x3d1d8d=(_0x5639ec=!0,function(e,t){var i=_0x5639ec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5639ec=!1,i}),_0x34dbaf=_0x3d1d8d(void 0,(function(){return _0x34dbaf.toString().search("(((.+)+)+)+$").toString().constructor(_0x34dbaf).search("(((.+)+)+)+$")})),_0x5639ec;function RandomGUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}_0x34dbaf();var _0x2f8dbc=(_0x392d33=!0,function(e,t){var i=_0x392d33?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x392d33=!1,i}),_0x504079=_0x2f8dbc(void 0,(function(){return _0x504079.toString().search("(((.+)+)+)+$").toString().constructor(_0x504079).search("(((.+)+)+)+$")})),_0x392d33;function _0x124fec(e){var t=_0x4f1603.call(this,null)||this;return t.metadata=null,t.reservedDataStore=null,t._hasAlpha=!1,t._getAlphaFromRGB=!1,t.level=1,t._coordinatesIndex=0,t._coordinatesMode=_0x333f62.TEXTURE_EXPLICIT_MODE,t.wrapR=_0x333f62.TEXTURE_WRAP_ADDRESSMODE,t.anisotropicFilteringLevel=_0x124fec.DEFAULT_ANISOTROPIC_FILTERING_LEVEL,t._isCube=!1,t._gammaSpace=!0,t.invertZ=!1,t.lodLevelInAlpha=!1,t.isRenderTarget=!1,t._prefiltered=!1,t._forceSerialize=!1,t.animations=new Array,t.onDisposeObservable=new Observable,t._onDisposeObserver=null,t._scene=null,t._uid=null,t._parentContainer=null,t._loadingError=!1,e?_0x124fec._IsScene(e)?t._scene=e:t._engine=e:t._scene=EngineStore.LastCreatedScene,t._scene&&(t.uniqueId=t._scene.getUniqueId(),t._scene.addTexture(t),t._engine=t._scene.getEngine()),t._uid=null,t}_0x504079(),_0x4f1603&&(_0x124fec.__proto__=_0x4f1603),_0x124fec.prototype=Object.create(_0x4f1603&&_0x4f1603.prototype),_0x124fec.prototype.constructor=_0x4f1603,Object.defineProperty(_0x124fec.prototype,"hasAlpha",{get:function(){return this._hasAlpha},set:function(e){var t=this;this._hasAlpha!==e&&(this._hasAlpha=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"getAlphaFromRGB",{get:function(){return this._getAlphaFromRGB},set:function(e){var t=this;this._getAlphaFromRGB!==e&&(this._getAlphaFromRGB=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"coordinatesIndex",{get:function(){return this._coordinatesIndex},set:function(e){var t=this;this._coordinatesIndex!==e&&(this._coordinatesIndex=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"coordinatesMode",{get:function(){return this._coordinatesMode},set:function(e){var t=this;this._coordinatesMode!==e&&(this._coordinatesMode=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"wrapU",{get:function(){return this._wrapU},set:function(e){this._wrapU=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"wrapV",{get:function(){return this._wrapV},set:function(e){this._wrapV=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"isCube",{get:function(){return this._texture?this._texture.isCube:this._isCube},set:function(e){this._texture?this._texture.isCube=e:this._isCube=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"is3D",{get:function(){return!!this._texture&&this._texture.is3D},set:function(e){this._texture&&(this._texture.is3D=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"is2DArray",{get:function(){return!!this._texture&&this._texture.is2DArray},set:function(e){this._texture&&(this._texture.is2DArray=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"gammaSpace",{get:function(){return this._texture?(null===this._texture._gammaSpace&&(this._texture._gammaSpace=this._gammaSpace),this._texture._gammaSpace&&!this._texture._useSRGBBuffer):this._gammaSpace},set:function(e){if(this._texture){if(this._texture._gammaSpace===e)return;this._texture._gammaSpace=e}else{if(this._gammaSpace===e)return;this._gammaSpace=e}this._markAllSubMeshesAsTexturesDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"isRGBD",{get:function(){return null!=this._texture&&this._texture._isRGBD},set:function(e){this._texture&&(this._texture._isRGBD=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"noMipmap",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"lodGenerationOffset",{get:function(){return this._texture?this._texture._lodGenerationOffset:0},set:function(e){this._texture&&(this._texture._lodGenerationOffset=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"lodGenerationScale",{get:function(){return this._texture?this._texture._lodGenerationScale:0},set:function(e){this._texture&&(this._texture._lodGenerationScale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"linearSpecularLOD",{get:function(){return!!this._texture&&this._texture._linearSpecularLOD},set:function(e){this._texture&&(this._texture._linearSpecularLOD=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"irradianceTexture",{get:function(){return this._texture?this._texture._irradianceTexture:null},set:function(e){this._texture&&(this._texture._irradianceTexture=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"uid",{get:function(){return!this._uid&&(this._uid=RandomGUID()),this._uid},enumerable:!1,configurable:!0}),_0x124fec.prototype.toString=function(){return this.name},_0x124fec.prototype.getClassName=function(){return"BaseTexture"},Object.defineProperty(_0x124fec.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"isBlocking",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"loadingError",{get:function(){return this._loadingError},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"errorObject",{get:function(){return this._errorObject},enumerable:!1,configurable:!0}),_0x124fec.prototype.getScene=function(){return this._scene},_0x124fec.prototype._getEngine=function(){return this._engine},_0x124fec.prototype.checkTransformsAreIdentical=function(e){return null!==e},_0x124fec.prototype.getTextureMatrix=function(){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityReadOnly},_0x124fec.prototype.getReflectionTextureMatrix=function(){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityReadOnly},_0x124fec.prototype.isReadyOrNotBlocking=function(){return!this.isBlocking||this.isReady()||this.loadingError},_0x124fec.prototype.scale=function(e){},Object.defineProperty(_0x124fec.prototype,"canRescale",{get:function(){return!1},enumerable:!1,configurable:!0}),_0x124fec.prototype._getFromCache=function(e,t,i,n,r){var o=this._getEngine();if(!o)return null;for(var a=o._getUseSRGBBuffer(!!r,t),s=o.getLoadedTexturesCache(),l=0;l<s.length;l++){var u=s[l];if((void 0===r||a===u._useSRGBBuffer)&&!(void 0!==n&&n!==u.invertY||u.url!==e||u.generateMipMaps!==!t||i&&i!==u.samplingMode))return u.incrementReferences(),u}return null},_0x124fec.prototype._rebuild=function(){},_0x124fec.prototype.clone=function(){return null},Object.defineProperty(_0x124fec.prototype,"textureType",{get:function(){return this._texture&&void 0!==this._texture.type?this._texture.type:_0x333f62.TEXTURETYPE_UNSIGNED_INT},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"textureFormat",{get:function(){return this._texture&&void 0!==this._texture.format?this._texture.format:_0x333f62.TEXTUREFORMAT_RGBA},enumerable:!1,configurable:!0}),_0x124fec.prototype._markAllSubMeshesAsTexturesDirty=function(){var e=this.getScene();e&&e.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag)},_0x124fec.prototype.readPixels=function(e,t,i,n,r,o,a,s,l){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=null),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=0),void 0===a&&(a=0),void 0===s&&(s=Number.MAX_VALUE),void 0===l&&(l=Number.MAX_VALUE),!this._texture)return null;var u=this._getEngine();if(!u)return null;var c=this.getSize(),h=c.width,d=c.height;0!==t&&(h/=Math.pow(2,t),d/=Math.pow(2,t),h=Math.round(h),d=Math.round(d)),s=Math.min(h,s),l=Math.min(d,l);try{return this._texture.isCube?u._readTexturePixels(this._texture,s,l,e,t,i,n,r,o,a):u._readTexturePixels(this._texture,s,l,-1,t,i,n,r,o,a)}catch(e){return null}},_0x124fec.prototype._readPixelsSync=function(e,t,i,n,r){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=null),void 0===n&&(n=!0),void 0===r&&(r=!1),!this._texture)return null;var o=this.getSize(),a=o.width,s=o.height,l=this._getEngine();if(!l)return null;0!=t&&(a/=Math.pow(2,t),s/=Math.pow(2,t),a=Math.round(a),s=Math.round(s));try{return this._texture.isCube?l._readTexturePixelsSync(this._texture,a,s,e,t,i,n,r):l._readTexturePixelsSync(this._texture,a,s,-1,t,i,n,r)}catch(e){return null}},Object.defineProperty(_0x124fec.prototype,"_lodTextureHigh",{get:function(){return this._texture?this._texture._lodTextureHigh:null},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"_lodTextureMid",{get:function(){return this._texture?this._texture._lodTextureMid:null},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"_lodTextureLow",{get:function(){return this._texture?this._texture._lodTextureLow:null},enumerable:!1,configurable:!0}),_0x124fec.prototype.dispose=function(){if(this._scene){this._scene.stopAnimation&&this._scene.stopAnimation(this),this._scene._removePendingData(this);var e=this._scene.textures.indexOf(this);if(e>=0&&this._scene.textures.splice(e,1),this._scene.onTextureRemovedObservable.notifyObservers(this),this._scene=null,this._parentContainer){var t=this._parentContainer.textures.indexOf(this);t>-1&&this._parentContainer.textures.splice(t,1),this._parentContainer=null}}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.metadata=null,_super.prototype.dispose.call(this)},_0x124fec.prototype.serialize=function(){if(!this.name)return null;var e=_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Serialize(this);return _Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.AppendSerializedAnimations(this,e),e},_0x124fec.WhenAllReady=function(e,t){var i=e.length;if(0!==i)for(var n=0;n<e.length;n++){var r=e[n];if(r.isReady())0==--i&&t();else{var o=r.onLoadObservable;o?o.addOnce((function(){0==--i&&t()})):0==--i&&t()}}else t()},_0x124fec._IsScene=function(e){return"Scene"===e.getClassName()},_0x124fec.DEFAULT_ANISOTROPIC_FILTERING_LEVEL=4;var _0x5dcefa=(_0x359be1=!0,function(e,t){var i=_0x359be1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x359be1=!1,i}),_0x199455=_0x5dcefa(void 0,(function(){return _0x199455.toString().search("(((.+)+)+)+$").toString().constructor(_0x199455).search("(((.+)+)+)+$")})),_0x359be1;function _0x5141a8(e,t,i,n,r,o,a,s,l,u,c,h,d,f){void 0===r&&(r=_0x5141a8.TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=!1);var p,_,m,g,x,y,v,$,b,T=this;(T=_0x124fec.call(this,t)||this).url=null,T.uOffset=0,T.vOffset=0,T.uScale=1,T.vScale=1,T.uAng=0,T.vAng=0,T.wAng=0,T.uRotationCenter=.5,T.vRotationCenter=.5,T.wRotationCenter=.5,T.homogeneousRotationInUVTransform=!1,T.inspectableCustomProperties=null,T._noMipmap=!1,T._invertY=!1,T._rowGenerationMatrix=null,T._cachedTextureMatrix=null,T._projectionModeMatrix=null,T._t0=null,T._t1=null,T._t2=null,T._cachedUOffset=-1,T._cachedVOffset=-1,T._cachedUScale=0,T._cachedVScale=0,T._cachedUAng=-1,T._cachedVAng=-1,T._cachedWAng=-1,T._cachedProjectionMatrixId=-1,T._cachedURotationCenter=-1,T._cachedVRotationCenter=-1,T._cachedWRotationCenter=-1,T._cachedHomogeneousRotationInUVTransform=!1,T._cachedCoordinatesMode=-1,T._buffer=null,T._deleteBuffer=!1,T._format=null,T._delayedOnLoad=null,T._delayedOnError=null,T.onLoadObservable=new Observable,T._isBlocking=!0,T.name=e||"",T.url=e;var C,S=!1,w=null;"object"==typeof i&&null!==i?(C=null!==(p=i.noMipmap)&&void 0!==p&&p,n=null!==(_=i.invertY)&&void 0!==_&&_,r=null!==(m=i.samplingMode)&&void 0!==m?m:_0x5141a8.TRILINEAR_SAMPLINGMODE,o=null!==(g=i.onLoad)&&void 0!==g?g:null,a=null!==(x=i.onError)&&void 0!==x?x:null,s=null!==(y=i.buffer)&&void 0!==y?y:null,l=null!==(v=i.deleteBuffer)&&void 0!==v&&v,u=i.format,c=i.mimeType,h=i.loaderOptions,d=i.creationFlags,S=null!==($=i.useSRGBBuffer)&&void 0!==$&&$,w=null!==(b=i.internalTexture)&&void 0!==b?b:null):C=!!i,T._noMipmap=C,T._invertY=void 0!==n&&n,T._initialSamplingMode=r,T._buffer=s,T._deleteBuffer=l,T._mimeType=c,T._loaderOptions=h,T._creationFlags=d,T._useSRGBBuffer=S,T._forcedExtension=f,u&&(T._format=u);var E=T.getScene(),P=T._getEngine();if(!P)return T;P.onBeforeTextureInitObservable.notifyObservers(T);var A=function(){T._texture&&(T._texture._invertVScale&&(T.vScale*=-1,T.vOffset+=1),null!==T._texture._cachedWrapU&&(T.wrapU=T._texture._cachedWrapU,T._texture._cachedWrapU=null),null!==T._texture._cachedWrapV&&(T.wrapV=T._texture._cachedWrapV,T._texture._cachedWrapV=null),null!==T._texture._cachedWrapR&&(T.wrapR=T._texture._cachedWrapR,T._texture._cachedWrapR=null)),T.onLoadObservable.hasObservers()&&T.onLoadObservable.notifyObservers(T),o&&o(),!T.isBlocking&&E&&E.resetCachedMaterial()},L=function(e,t){T._loadingError=!0,T._errorObject={message:e,exception:t},a&&a(e,t),_0x5141a8.OnTextureLoadErrorObservable.notifyObservers(T)};if(!T.url)return T._delayedOnLoad=A,T._delayedOnError=L,T;if(T._texture=null!=w?w:T._getFromCache(T.url,C,r,T._invertY,S),T._texture)if(T._texture.isReady)_Misc_timingTools__WEBPACK_IMPORTED_MODULE_8__.TimingTools.SetImmediate((function(){return A()}));else{var M=T._texture.onLoadedObservable.add(A);T._texture.onErrorObservable.add((function(e){var t;L(e.message,e.exception),null===(t=T._texture)||void 0===t||t.onLoadedObservable.remove(M)}))}else if(E&&E.useDelayedTextureLoading)T.delayLoadState=_0x333f62.DELAYLOADSTATE_NOTLOADED,T._delayedOnLoad=A,T._delayedOnError=L;else{try{T._texture=P.createTexture(T.url,C,T._invertY,E,r,A,L,T._buffer,void 0,T._format,T._forcedExtension,c,h,d,S)}catch(e){throw L("error loading",e),e}l&&(T._buffer=null)}return T}_0x199455(),_0x124fec&&(_0x5141a8.__proto__=_0x124fec),_0x5141a8.prototype=Object.create(_0x124fec&&_0x124fec.prototype),_0x5141a8.prototype.constructor=_0x124fec,Object.defineProperty(_0x5141a8.prototype,"noMipmap",{get:function(){return this._noMipmap},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5141a8.prototype,"mimeType",{get:function(){return this._mimeType},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5141a8.prototype,"isBlocking",{get:function(){return this._isBlocking},set:function(e){this._isBlocking=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5141a8.prototype,"invertY",{get:function(){return this._invertY},enumerable:!1,configurable:!0}),_0x5141a8.prototype.updateURL=function(e,t,i,n){void 0===t&&(t=null),this.url&&(this.releaseInternalTexture(),this.getScene().markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag)),(!this.name||this.name.startsWith("data:"))&&(this.name=e),this.url=e,this._buffer=t,this._forcedExtension=n,this.delayLoadState=_0x333f62.DELAYLOADSTATE_NOTLOADED,i&&(this._delayedOnLoad=i),this.delayLoad()},_0x5141a8.prototype.delayLoad=function(){if(this.delayLoadState===_0x333f62.DELAYLOADSTATE_NOTLOADED){var e=this.getScene();e&&(this.delayLoadState=_0x333f62.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap,this.samplingMode,this._invertY,this._useSRGBBuffer),this._texture?this._delayedOnLoad&&(this._texture.isReady?_Misc_timingTools__WEBPACK_IMPORTED_MODULE_8__.TimingTools.SetImmediate(this._delayedOnLoad):this._texture.onLoadedObservable.add(this._delayedOnLoad)):(this._texture=e.getEngine().createTexture(this.url,this._noMipmap,this._invertY,e,this.samplingMode,this._delayedOnLoad,this._delayedOnError,this._buffer,null,this._format,this._forcedExtension,this._mimeType,this._loaderOptions,this._creationFlags,this._useSRGBBuffer),this._deleteBuffer&&(this._buffer=null)),this._delayedOnLoad=null,this._delayedOnError=null)}},_0x5141a8.prototype._prepareRowForTextureGeneration=function(e,t,i,n){e*=this._cachedUScale,t*=this._cachedVScale,e-=this.uRotationCenter*this._cachedUScale,t-=this.vRotationCenter*this._cachedVScale,i-=this.wRotationCenter,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.TransformCoordinatesFromFloatsToRef(e,t,i,this._rowGenerationMatrix,n),n.x+=this.uRotationCenter*this._cachedUScale+this._cachedUOffset,n.y+=this.vRotationCenter*this._cachedVScale+this._cachedVOffset,n.z+=this.wRotationCenter},_0x5141a8.prototype.checkTransformsAreIdentical=function(e){return null!==e&&this.uOffset===e.uOffset&&this.vOffset===e.vOffset&&this.uScale===e.uScale&&this.vScale===e.vScale&&this.uAng===e.uAng&&this.vAng===e.vAng&&this.wAng===e.wAng},_0x5141a8.prototype.getTextureMatrix=function(e){var t=this;if(void 0===e&&(e=1),this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale*e===this._cachedUScale&&this.vScale===this._cachedVScale&&this.uAng===this._cachedUAng&&this.vAng===this._cachedVAng&&this.wAng===this._cachedWAng&&this.uRotationCenter===this._cachedURotationCenter&&this.vRotationCenter===this._cachedVRotationCenter&&this.wRotationCenter===this._cachedWRotationCenter&&this.homogeneousRotationInUVTransform===this._cachedHomogeneousRotationInUVTransform)return this._cachedTextureMatrix;this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale*e,this._cachedVScale=this.vScale,this._cachedUAng=this.uAng,this._cachedVAng=this.vAng,this._cachedWAng=this.wAng,this._cachedURotationCenter=this.uRotationCenter,this._cachedVRotationCenter=this.vRotationCenter,this._cachedWRotationCenter=this.wRotationCenter,this._cachedHomogeneousRotationInUVTransform=this.homogeneousRotationInUVTransform,(!this._cachedTextureMatrix||!this._rowGenerationMatrix)&&(this._cachedTextureMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Zero(),this._rowGenerationMatrix=new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix,this._t0=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero(),this._t1=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero(),this._t2=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero()),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.RotationYawPitchRollToRef(this.vAng,this.uAng,this.wAng,this._rowGenerationMatrix),this.homogeneousRotationInUVTransform?(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.TranslationToRef(-this._cachedURotationCenter,-this._cachedVRotationCenter,-this._cachedWRotationCenter,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[0]),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.TranslationToRef(this._cachedURotationCenter,this._cachedVRotationCenter,this._cachedWRotationCenter,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[1]),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.ScalingToRef(this._cachedUScale,this._cachedVScale,0,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[2]),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.TranslationToRef(this._cachedUOffset,this._cachedVOffset,0,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[3]),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[0].multiplyToRef(this._rowGenerationMatrix,this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[1],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[2],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[3],this._cachedTextureMatrix),this._cachedTextureMatrix.setRowFromFloats(2,this._cachedTextureMatrix.m[12],this._cachedTextureMatrix.m[13],this._cachedTextureMatrix.m[14],1)):(this._prepareRowForTextureGeneration(0,0,0,this._t0),this._prepareRowForTextureGeneration(1,0,0,this._t1),this._prepareRowForTextureGeneration(0,1,0,this._t2),this._t1.subtractInPlace(this._t0),this._t2.subtractInPlace(this._t0),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.FromValuesToRef(this._t1.x,this._t1.y,this._t1.z,0,this._t2.x,this._t2.y,this._t2.z,0,this._t0.x,this._t0.y,this._t0.z,0,0,0,0,1,this._cachedTextureMatrix));var i=this.getScene();return i?(i.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})),this._cachedTextureMatrix):this._cachedTextureMatrix},_0x5141a8.prototype.getReflectionTextureMatrix=function(){var e=this,t=this.getScene();if(!t)return this._cachedTextureMatrix;if(this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale===this._cachedUScale&&this.vScale===this._cachedVScale&&this.coordinatesMode===this._cachedCoordinatesMode){if(this.coordinatesMode!==_0x5141a8.PROJECTION_MODE)return this._cachedTextureMatrix;if(this._cachedProjectionMatrixId===t.getProjectionMatrix().updateFlag)return this._cachedTextureMatrix}!this._cachedTextureMatrix&&(this._cachedTextureMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Zero()),!this._projectionModeMatrix&&(this._projectionModeMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Zero());var i=this._cachedCoordinatesMode!==this.coordinatesMode;switch(this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale,this._cachedVScale=this.vScale,this._cachedCoordinatesMode=this.coordinatesMode,this.coordinatesMode){case _0x5141a8.PLANAR_MODE:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityToRef(this._cachedTextureMatrix),this._cachedTextureMatrix[0]=this.uScale,this._cachedTextureMatrix[5]=this.vScale,this._cachedTextureMatrix[12]=this.uOffset,this._cachedTextureMatrix[13]=this.vOffset;break;case _0x5141a8.PROJECTION_MODE:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.FromValuesToRef(.5,0,0,0,0,-.5,0,0,0,0,0,0,.5,.5,1,1,this._projectionModeMatrix);var n=t.getProjectionMatrix();this._cachedProjectionMatrixId=n.updateFlag,n.multiplyToRef(this._projectionModeMatrix,this._cachedTextureMatrix);break;default:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityToRef(this._cachedTextureMatrix)}return i&&t.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag,(function(t){return-1!==t.getActiveTextures().indexOf(e)})),this._cachedTextureMatrix},_0x5141a8.prototype.clone=function(){var e=this,t={noMipmap:this._noMipmap,invertY:this._invertY,samplingMode:this.samplingMode,onLoad:void 0,onError:void 0,buffer:this._texture?this._texture._buffer:void 0,deleteBuffer:this._deleteBuffer,format:this.textureFormat,mimeType:this.mimeType,loaderOptions:this._loaderOptions,creationFlags:this._creationFlags,useSRGBBuffer:this._useSRGBBuffer};return _Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Clone((function(){return new _0x5141a8(e._texture?e._texture.url:null,e.getScene(),t)}),this)},_0x5141a8.prototype.serialize=function(){var e=this.name;!_0x5141a8.SerializeBuffers&&this.name.startsWith("data:")&&(this.name=""),this.name.startsWith("data:")&&this.url===this.name&&(this.url="");var t=_super.prototype.serialize.call(this);return t?((_0x5141a8.SerializeBuffers||_0x5141a8.ForceSerializeBuffers)&&("string"==typeof this._buffer&&"data:"===this._buffer.substr(0,5)?(t.base64String=this._buffer,t.name=t.name.replace("data:","")):this.url&&this.url.startsWith("data:")&&this._buffer instanceof Uint8Array?t.base64String="data:image/png;base64,"+(0,_Misc_stringTools__WEBPACK_IMPORTED_MODULE_11__.EncodeArrayBufferToBase64)(this._buffer):(_0x5141a8.ForceSerializeBuffers||this.url&&this.url.startsWith("blob:")||this._forceSerialize)&&(t.base64String=!this._engine||this._engine._features.supportSyncTextureRead?(0,_Misc_copyTools__WEBPACK_IMPORTED_MODULE_12__.GenerateBase64StringFromTexture)(this):(0,_Misc_copyTools__WEBPACK_IMPORTED_MODULE_12__.GenerateBase64StringFromTextureAsync)(this))),t.invertY=this._invertY,t.samplingMode=this.samplingMode,t._creationFlags=this._creationFlags,t._useSRGBBuffer=this._useSRGBBuffer,this.name=e,t):null},_0x5141a8.prototype.getClassName=function(){return"Texture"},_0x5141a8.prototype.dispose=function(){_super.prototype.dispose.call(this),this.onLoadObservable.clear(),this._delayedOnLoad=null,this._delayedOnError=null},_0x5141a8.Parse=function(e,t,i){if(e.customType){var n=_Misc_instantiationTools__WEBPACK_IMPORTED_MODULE_9__.InstantiationTools.Instantiate(e.customType).Parse(e,t,i);return e.samplingMode&&n.updateSamplingMode&&n._samplingMode&&n._samplingMode!==e.samplingMode&&n.updateSamplingMode(e.samplingMode),n}if(e.isCube&&!e.isRenderTarget)return _0x5141a8._CubeTextureParser(e,t,i);if(!e.name&&!e.isRenderTarget)return null;var r=function(){if(o&&o._texture&&(o._texture._cachedWrapU=null,o._texture._cachedWrapV=null,o._texture._cachedWrapR=null),e.samplingMode){var t=e.samplingMode;o&&o.samplingMode!==t&&o.updateSamplingMode(t)}if(o&&e.animations)for(var i=0;i<e.animations.length;i++){var n=e.animations[i],r=(0,_Misc_typeStore__WEBPACK_IMPORTED_MODULE_6__.GetClass)("BABYLON.Animation");r&&o.animations.push(r.Parse(n))}},o=_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Parse((function(){var n,o,a,s,l=!0;if(e.noMipmap&&(l=!1),e.mirrorPlane){var u=_0x5141a8._CreateMirror(e.name,e.renderTargetSize,t,l);return u._waitingRenderList=e.renderList,u.mirrorPlane=_Maths_math_plane__WEBPACK_IMPORTED_MODULE_10__.Plane.FromArray(e.mirrorPlane),r(),u}if(e.isRenderTarget){var c=null;if(e.isCube){if(t.reflectionProbes)for(var h=0;h<t.reflectionProbes.length;h++){var d=t.reflectionProbes[h];if(d.name===e.name)return d.cubeTexture}}else(c=_0x5141a8._CreateRenderTargetTexture(e.name,e.renderTargetSize,t,l,null!==(n=e._creationFlags)&&void 0!==n?n:0))._waitingRenderList=e.renderList;return r(),c}if(e.base64String)s=_0x5141a8.CreateFromBase64String(e.base64String,e.name,t,!l,e.invertY,e.samplingMode,r,null!==(o=e._creationFlags)&&void 0!==o?o:0,null!==(a=e._useSRGBBuffer)&&void 0!==a&&a);else{var f=void 0;f=e.name&&e.name.indexOf("://")>0?e.name:i+e.name,e.url&&(e.url.startsWith("data:")||_0x5141a8.UseSerializedUrlIfAny)&&(f=e.url),s=new _0x5141a8(f,t,!l,e.invertY,e.samplingMode,r)}return s}),e,t);return o},_0x5141a8.CreateFromBase64String=function(e,t,i,n,r,o,a,s,l,u){return void 0===o&&(o=_0x5141a8.TRILINEAR_SAMPLINGMODE),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=_0x333f62.TEXTUREFORMAT_RGBA),new _0x5141a8("data:"+t,i,n,r,o,a,s,e,!1,l,void 0,void 0,u)},_0x5141a8.LoadFromDataString=function(e,t,i,n,r,o,a,s,l,u,c){return void 0===n&&(n=!1),void 0===o&&(o=!0),void 0===a&&(a=_0x5141a8.TRILINEAR_SAMPLINGMODE),void 0===s&&(s=null),void 0===l&&(l=null),void 0===u&&(u=_0x333f62.TEXTUREFORMAT_RGBA),"data:"!==e.substr(0,5)&&(e="data:"+e),new _0x5141a8(e,i,r,o,a,s,l,t,n,u,void 0,void 0,c)},_0x5141a8.SerializeBuffers=!0,_0x5141a8.ForceSerializeBuffers=!1,_0x5141a8.OnTextureLoadErrorObservable=new Observable,_0x5141a8._CubeTextureParser=function(e,t,i){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_7__._WarnImport)("CubeTexture")},_0x5141a8._CreateMirror=function(e,t,i,n){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_7__._WarnImport)("MirrorTexture")},_0x5141a8._CreateRenderTargetTexture=function(e,t,i,n,r){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_7__._WarnImport)("RenderTargetTexture")},_0x5141a8.NEAREST_SAMPLINGMODE=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,_0x5141a8.NEAREST_NEAREST_MIPLINEAR=_0x333f62.TEXTURE_NEAREST_NEAREST_MIPLINEAR,_0x5141a8.BILINEAR_SAMPLINGMODE=_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE,_0x5141a8.LINEAR_LINEAR_MIPNEAREST=_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST,_0x5141a8.TRILINEAR_SAMPLINGMODE=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE,_0x5141a8.LINEAR_LINEAR_MIPLINEAR=_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR,_0x5141a8.NEAREST_NEAREST_MIPNEAREST=_0x333f62.TEXTURE_NEAREST_NEAREST_MIPNEAREST,_0x5141a8.NEAREST_LINEAR_MIPNEAREST=_0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST,_0x5141a8.NEAREST_LINEAR_MIPLINEAR=_0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR,_0x5141a8.NEAREST_LINEAR=_0x333f62.TEXTURE_NEAREST_LINEAR,_0x5141a8.NEAREST_NEAREST=_0x333f62.TEXTURE_NEAREST_NEAREST,_0x5141a8.LINEAR_NEAREST_MIPNEAREST=_0x333f62.TEXTURE_LINEAR_NEAREST_MIPNEAREST,_0x5141a8.LINEAR_NEAREST_MIPLINEAR=_0x333f62.TEXTURE_LINEAR_NEAREST_MIPLINEAR,_0x5141a8.LINEAR_LINEAR=_0x333f62.TEXTURE_LINEAR_LINEAR,_0x5141a8.LINEAR_NEAREST=_0x333f62.TEXTURE_LINEAR_NEAREST,_0x5141a8.EXPLICIT_MODE=_0x333f62.TEXTURE_EXPLICIT_MODE,_0x5141a8.SPHERICAL_MODE=_0x333f62.TEXTURE_SPHERICAL_MODE,_0x5141a8.PLANAR_MODE=_0x333f62.TEXTURE_PLANAR_MODE,_0x5141a8.CUBIC_MODE=_0x333f62.TEXTURE_CUBIC_MODE,_0x5141a8.PROJECTION_MODE=_0x333f62.TEXTURE_PROJECTION_MODE,_0x5141a8.SKYBOX_MODE=_0x333f62.TEXTURE_SKYBOX_MODE,_0x5141a8.INVCUBIC_MODE=_0x333f62.TEXTURE_INVCUBIC_MODE,_0x5141a8.EQUIRECTANGULAR_MODE=_0x333f62.TEXTURE_EQUIRECTANGULAR_MODE,_0x5141a8.FIXED_EQUIRECTANGULAR_MODE=_0x333f62.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,_0x5141a8.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=_0x333f62.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,_0x5141a8.CLAMP_ADDRESSMODE=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,_0x5141a8.WRAP_ADDRESSMODE=_0x333f62.TEXTURE_WRAP_ADDRESSMODE,_0x5141a8.MIRROR_ADDRESSMODE=_0x333f62.TEXTURE_MIRROR_ADDRESSMODE;var _0x1f5636=(_0x38d6b7=!0,function(e,t){var i=_0x38d6b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38d6b7=!1,i}),_0x4db4b8=_0x1f5636(void 0,(function(){return _0x4db4b8.toString().search("(((.+)+)+)+$").toString().constructor(_0x4db4b8).search("(((.+)+)+)+$")})),_0x38d6b7;function _0x5535c1(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){void 0===r&&(r=!0),void 0===o&&(o=_0x333f62.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),void 0===s&&(s=_0x5141a8.TRILINEAR_SAMPLINGMODE),void 0===l&&(l=!0),void 0===u&&(u=!1),void 0===c&&(c=!1),void 0===h&&(h=_0x333f62.TEXTUREFORMAT_RGBA),void 0===d&&(d=!1),void 0===_&&(_=!1),void 0===m&&(m=!1);var g,x=this;if((x=_0x5141a8.call(this,null,i,!n,void 0,s,void 0,void 0,void 0,void 0,h)||this).renderParticles=!0,x.renderSprites=!1,x.ignoreCameraViewport=!1,x.onBeforeBindObservable=new Observable,x.onAfterUnbindObservable=new Observable,x.onBeforeRenderObservable=new Observable,x.onAfterRenderObservable=new Observable,x.onClearObservable=new Observable,x.onResizeObservable=new Observable,x._cleared=!1,x.skipInitialClear=!1,x._currentRefreshId=-1,x._refreshRate=1,x._samples=1,x._canRescale=!0,x._renderTarget=null,x.boundingBoxPosition=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero(),!(i=x.getScene()))return x;var y=x.getScene().getEngine();return x._coordinatesMode=_0x5141a8.PROJECTION_MODE,x.renderList=new Array,x.name=e,x.isRenderTarget=!0,x._initialSizeParameter=t,x._renderPassIds=[],x._isCubeData=a,x._processSizeParameter(t),x.renderPassId=x._renderPassIds[0],x._resizeObserver=y.onResizeObservable.add((function(){})),x._generateMipMaps=!!n,x._doNotChangeAspectRatio=r,x._renderingManager=new _Rendering_renderingManager__WEBPACK_IMPORTED_MODULE_6__.RenderingManager(i),x._renderingManager._useSceneAutoClearSetup=!0,c||(x._renderTargetOptions={generateMipMaps:n,type:o,format:null!==(g=x._format)&&void 0!==g?g:void 0,samplingMode:x.samplingMode,generateDepthBuffer:l,generateStencilBuffer:u,samples:f,creationFlags:p,noColorTarget:_,useSRGBBuffer:m},x.samplingMode===_0x5141a8.NEAREST_SAMPLINGMODE&&(x.wrapU=_0x5141a8.CLAMP_ADDRESSMODE,x.wrapV=_0x5141a8.CLAMP_ADDRESSMODE),!d&&(a?(x._renderTarget=i.getEngine().createRenderTargetCubeTexture(x.getRenderSize(),x._renderTargetOptions),x.coordinatesMode=_0x5141a8.INVCUBIC_MODE,x._textureMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Identity()):x._renderTarget=i.getEngine().createRenderTargetTexture(x._size,x._renderTargetOptions),x._texture=x._renderTarget.texture,void 0!==f&&(x.samples=f))),x}_0x4db4b8(),_0x5141a8&&(_0x5535c1.__proto__=_0x5141a8),_0x5535c1.prototype=Object.create(_0x5141a8&&_0x5141a8.prototype),_0x5535c1.prototype.constructor=_0x5141a8,Object.defineProperty(_0x5535c1.prototype,"renderList",{get:function(){return this._renderList},set:function(e){this._renderList=e,this._renderList&&this._hookArray(this._renderList)},enumerable:!1,configurable:!0}),_0x5535c1.prototype._hookArray=function(e){var t=this,i=e.push;e.push=function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=0===e.length,s=i.apply(e,r);return a&&(null===(n=t.getScene())||void 0===n||n.meshes.forEach((function(e){e._markSubMeshesAsLightDirty()}))),s};var n=e.splice;e.splice=function(i,r){var o,a=n.apply(e,[i,r]);return 0===e.length&&(null===(o=t.getScene())||void 0===o||o.meshes.forEach((function(e){e._markSubMeshesAsLightDirty()}))),a}},Object.defineProperty(_0x5535c1.prototype,"postProcesses",{get:function(){return this._postProcesses},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"_prePassEnabled",{get:function(){return!!this._prePassRenderTarget&&this._prePassRenderTarget.enabled},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"onAfterUnbind",{set:function(e){this._onAfterUnbindObserver&&this.onAfterUnbindObservable.remove(this._onAfterUnbindObserver),this._onAfterUnbindObserver=this.onAfterUnbindObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"onBeforeRender",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"onAfterRender",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"onClear",{set:function(e){this._onClearObserver&&this.onClearObservable.remove(this._onClearObserver),this._onClearObserver=this.onClearObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"renderPassIds",{get:function(){return this._renderPassIds},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"currentRefreshId",{get:function(){return this._currentRefreshId},enumerable:!1,configurable:!0}),_0x5535c1.prototype.setMaterialForRendering=function(e,t){var i;i=Array.isArray(e)?e:[e];for(var n=0;n<i.length;++n)for(var r=0;r<this._renderPassIds.length;++r)i[n].setMaterialForRenderPass(this._renderPassIds[r],void 0!==t?Array.isArray(t)?t[r]:t:void 0)},Object.defineProperty(_0x5535c1.prototype,"renderTargetOptions",{get:function(){return this._renderTargetOptions},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"renderTarget",{get:function(){return this._renderTarget},enumerable:!1,configurable:!0}),_0x5535c1.prototype._onRatioRescale=function(){this._sizeRatio&&this.resize(this._initialSizeParameter)},Object.defineProperty(_0x5535c1.prototype,"boundingBoxSize",{get:function(){return this._boundingBoxSize},set:function(e){if(!this._boundingBoxSize||!this._boundingBoxSize.equals(e)){this._boundingBoxSize=e;var t=this.getScene();t&&t.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag)}},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"depthStencilTexture",{get:function(){var e,t;return null!==(t=null===(e=this._renderTarget)||void 0===e?void 0:e._depthStencilTexture)&&void 0!==t?t:null},enumerable:!1,configurable:!0}),_0x5535c1.prototype.createDepthStencilTexture=function(e,t,i,n,r){var o;void 0===e&&(e=0),void 0===t&&(t=!0),void 0===i&&(i=!1),void 0===n&&(n=1),void 0===r&&(r=_0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT),null===(o=this._renderTarget)||void 0===o||o.createDepthStencilTexture(e,t,i,n,r)},_0x5535c1.prototype._releaseRenderPassId=function(){if(this._scene)for(var e=this._scene.getEngine(),t=0;t<this._renderPassIds.length;++t)e.releaseRenderPassId(this._renderPassIds[t]);this._renderPassIds=[]},_0x5535c1.prototype._createRenderPassId=function(){this._releaseRenderPassId();for(var e=this._scene.getEngine(),t=this._isCubeData?6:this.getRenderLayers()||1,i=0;i<t;++i)this._renderPassIds[i]=e.createRenderPassId("RenderTargetTexture - ".concat(this.name,"#").concat(i))},_0x5535c1.prototype._processSizeParameter=function(e){if(e.ratio){this._sizeRatio=e.ratio;var t=this._getEngine();this._size={width:this._bestReflectionRenderTargetDimension(t.getRenderWidth(),this._sizeRatio),height:this._bestReflectionRenderTargetDimension(t.getRenderHeight(),this._sizeRatio)}}else this._size=e;this._createRenderPassId()},Object.defineProperty(_0x5535c1.prototype,"samples",{get:function(){var e,t;return null!==(t=null===(e=this._renderTarget)||void 0===e?void 0:e.samples)&&void 0!==t?t:this._samples},set:function(e){this._renderTarget&&(this._samples=this._renderTarget.setSamples(e))},enumerable:!1,configurable:!0}),_0x5535c1.prototype.resetRefreshCounter=function(){this._currentRefreshId=-1},Object.defineProperty(_0x5535c1.prototype,"refreshRate",{get:function(){return this._refreshRate},set:function(e){this._refreshRate=e,this.resetRefreshCounter()},enumerable:!1,configurable:!0}),_0x5535c1.prototype.addPostProcess=function(e){if(!this._postProcessManager){var t=this.getScene();if(!t)return;this._postProcessManager=new _PostProcesses_postProcessManager__WEBPACK_IMPORTED_MODULE_5__.PostProcessManager(t),this._postProcesses=new Array}this._postProcesses.push(e),this._postProcesses[0].autoClear=!1},_0x5535c1.prototype.clearPostProcesses=function(e){if(void 0===e&&(e=!1),this._postProcesses){if(e)for(var t=0,i=this._postProcesses;t<i.length;t++){i[t].dispose()}this._postProcesses=[]}},_0x5535c1.prototype.removePostProcess=function(e){if(this._postProcesses){var t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses.splice(t,1),this._postProcesses.length>0&&(this._postProcesses[0].autoClear=!1))}},_0x5535c1.prototype._shouldRender=function(){return-1===this._currentRefreshId||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1)},_0x5535c1.prototype.getRenderSize=function(){return this.getRenderWidth()},_0x5535c1.prototype.getRenderWidth=function(){return this._size.width?this._size.width:this._size},_0x5535c1.prototype.getRenderHeight=function(){return this._size.width?this._size.height:this._size},_0x5535c1.prototype.getRenderLayers=function(){var e=this._size.layers;return e||0},_0x5535c1.prototype.disableRescaling=function(){this._canRescale=!1},Object.defineProperty(_0x5535c1.prototype,"canRescale",{get:function(){return this._canRescale},enumerable:!1,configurable:!0}),_0x5535c1.prototype.scale=function(e){var t=Math.max(1,this.getRenderSize()*e);this.resize(t)},_0x5535c1.prototype.getReflectionTextureMatrix=function(){return this.isCube?this._textureMatrix:_super.prototype.getReflectionTextureMatrix.call(this)},_0x5535c1.prototype.resize=function(e){var t,i=this.isCube;null===(t=this._renderTarget)||void 0===t||t.dispose(),this._renderTarget=null;var n=this.getScene();n&&(this._processSizeParameter(e),this._renderTarget=i?n.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions):n.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this._texture=this._renderTarget.texture,void 0!==this._renderTargetOptions.samples&&(this.samples=this._renderTargetOptions.samples),this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this))},_0x5535c1.prototype.render=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),this._render(e,t)},_0x5535c1.prototype.isReadyForRendering=function(){return this._render(!1,!1,!0)},_0x5535c1.prototype._render=function(e,t,i){var n;void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===i&&(i=!1);var r=this.getScene();if(!r)return i;var o=r.getEngine();if(void 0!==this.useCameraPostProcesses&&(e=this.useCameraPostProcesses),this._waitingRenderList){this.renderList=[];for(var a=0;a<this._waitingRenderList.length;a++){var s=this._waitingRenderList[a];(c=r.getMeshById(s))&&this.renderList.push(c)}this._waitingRenderList=void 0}if(this.renderListPredicate){this.renderList?this.renderList.length=0:this.renderList=[];var l=this.getScene();if(!l)return i;var u=l.meshes;for(a=0;a<u.length;a++){var c=u[a];this.renderListPredicate(c)&&this.renderList.push(c)}}var h=o.currentRenderPassId;this.onBeforeBindObservable.notifyObservers(this);var d=null!==(n=this.activeCamera)&&void 0!==n?n:r.activeCamera;d&&(d!==r.activeCamera&&r.setTransformMatrix(d.getViewMatrix(),d.getProjectionMatrix(!0)),o.setViewport(d.viewport,this.getRenderWidth(),this.getRenderHeight())),this._defaultRenderListPrepared=!1;var f=i;if(i){!r.getViewMatrix()&&r.updateTransformMatrix();var p=this.is2DArray?this.getRenderLayers():this.isCube?6:1;for(y=0;y<p&&f;y++){var _=null,m=this.renderList?this.renderList:r.getActiveMeshes().data,g=this.renderList?this.renderList.length:r.getActiveMeshes().length;o.currentRenderPassId=this._renderPassIds[y],this.onBeforeRenderObservable.notifyObservers(y),this.getCustomRenderList&&(_=this.getCustomRenderList(y,m,g)),!_&&(_=m),!this._doNotChangeAspectRatio&&r.updateTransformMatrix(!0);for(var x=0;x<_.length&&f;++x){if((c=_[x]).isEnabled()&&!c.isBlocked&&c.isVisible&&c.subMeshes)if(this.customIsReadyFunction){if(!this.customIsReadyFunction(c,this.refreshRate)){f=!1;break}}else if(!c.isReady(!0)){f=!1;break}}this.onAfterRenderObservable.notifyObservers(y)}}else if(this.is2DArray)for(var y=0;y<this.getRenderLayers();y++)this._renderToTarget(0,e,t,y,d),r.incrementRenderId(),r.resetCachedMaterial();else if(this.isCube)for(var v=0;v<6;v++)this._renderToTarget(v,e,t,void 0,d),r.incrementRenderId(),r.resetCachedMaterial();else this._renderToTarget(0,e,t,void 0,d);return this.onAfterUnbindObservable.notifyObservers(this),o.currentRenderPassId=h,r.activeCamera&&((r.getEngine().scenes.length>1||this.activeCamera&&this.activeCamera!==r.activeCamera)&&r.setTransformMatrix(r.activeCamera.getViewMatrix(),r.activeCamera.getProjectionMatrix(!0)),o.setViewport(r.activeCamera.viewport)),r.resetCachedMaterial(),f},_0x5535c1.prototype._bestReflectionRenderTargetDimension=function(e,t){var i=e*t,n=_Engines_engine__WEBPACK_IMPORTED_MODULE_10__.Engine.NearestPOT(i+16384/(128+i));return Math.min(_Engines_engine__WEBPACK_IMPORTED_MODULE_10__.Engine.FloorPOT(e),n)},_0x5535c1.prototype._prepareRenderingManager=function(e,t,i,n){var r=this.getScene();if(r){this._renderingManager.reset();for(var o=r.getRenderId(),a=0;a<t;a++){var s=e[a];if(s&&!s.isBlocked){if(this.customIsReadyFunction){if(!this.customIsReadyFunction(s,this.refreshRate)){this.resetRefreshCounter();continue}}else if(!s.isReady(0===this.refreshRate)){this.resetRefreshCounter();continue}if(!s._internalAbstractMeshDataInfo._currentLODIsUpToDate&&r.activeCamera&&(s._internalAbstractMeshDataInfo._currentLOD=r.customLODSelector?r.customLODSelector(s,this.activeCamera||r.activeCamera):s.getLOD(this.activeCamera||r.activeCamera),s._internalAbstractMeshDataInfo._currentLODIsUpToDate=!0),!s._internalAbstractMeshDataInfo._currentLOD)continue;var l=s._internalAbstractMeshDataInfo._currentLOD;l._preActivateForIntermediateRendering(o);var u=void 0;if(u=!(!n||!i)&&0==(s.layerMask&i.layerMask),s.isEnabled()&&s.isVisible&&s.subMeshes&&!u&&(l!==s&&l._activate(o,!0),s._activate(o,!0)&&s.subMeshes.length)){s.isAnInstance?s._internalAbstractMeshDataInfo._actAsRegularMesh&&(l=s):l._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!1,l._internalAbstractMeshDataInfo._isActiveIntermediate=!0;for(var c=0;c<l.subMeshes.length;c++){var h=l.subMeshes[c];this._renderingManager.dispatch(h,l)}}}}for(var d=0;d<r.particleSystems.length;d++){var f=r.particleSystems[d],p=f.emitter;f.isStarted()&&p&&p.position&&p.isEnabled()&&(e.indexOf(p)>=0&&this._renderingManager.dispatchParticles(f))}}},_0x5535c1.prototype._bindFrameBuffer=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0);var i=this.getScene();if(i){var n=i.getEngine();this._renderTarget&&n.bindFramebuffer(this._renderTarget,this.isCube?e:void 0,void 0,void 0,this.ignoreCameraViewport,0,t)}},_0x5535c1.prototype._unbindFrameBuffer=function(e,t){var i=this;this._renderTarget&&e.unBindFramebuffer(this._renderTarget,this.isCube,(function(){i.onAfterRenderObservable.notifyObservers(t)}))},_0x5535c1.prototype._prepareFrame=function(e,t,i,n){this._postProcessManager?!this._prePassEnabled&&this._postProcessManager._prepareFrame(this._texture,this._postProcesses):(!n||!e.postProcessManager._prepareFrame(this._texture))&&this._bindFrameBuffer(t,i)},_0x5535c1.prototype._renderToTarget=function(e,t,i,n,r){var o,a,s,l,u,c;void 0===n&&(n=0),void 0===r&&(r=null);var h=this.getScene();if(h){var d=h.getEngine();if(null===(o=d._debugPushGroup)||void 0===o||o.call(d,"render to face #".concat(e," layer #").concat(n),1),this._prepareFrame(h,e,n,t),this.is2DArray?(d.currentRenderPassId=this._renderPassIds[n],this.onBeforeRenderObservable.notifyObservers(n)):(d.currentRenderPassId=this._renderPassIds[e],this.onBeforeRenderObservable.notifyObservers(e)),d.snapshotRendering&&d.snapshotRenderingMode===_0x333f62.SNAPSHOTRENDERING_FAST)this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(d):!this.skipInitialClear&&d.clear(this.clearColor||h.clearColor,!0,!0,!0);else{var f=null,p=this.renderList?this.renderList:h.getActiveMeshes().data,_=this.renderList?this.renderList.length:h.getActiveMeshes().length;this.getCustomRenderList&&(f=this.getCustomRenderList(this.is2DArray?n:e,p,_)),f?this._prepareRenderingManager(f,f.length,r,!1):(!this._defaultRenderListPrepared&&(this._prepareRenderingManager(p,_,r,!this.renderList),this._defaultRenderListPrepared=!0),f=p);for(var m=0,g=h._beforeRenderTargetClearStage;m<g.length;m++){g[m].action(this,e,n)}this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(d):!this.skipInitialClear&&d.clear(this.clearColor||h.clearColor,!0,!0,!0),!this._doNotChangeAspectRatio&&h.updateTransformMatrix(!0);for(var x=0,y=h._beforeRenderTargetDrawStage;x<y.length;x++){y[x].action(this,e,n)}this._renderingManager.render(this.customRenderFunction,f,this.renderParticles,this.renderSprites);for(var v=0,$=h._afterRenderTargetDrawStage;v<$.length;v++){$[v].action(this,e,n)}var b=null!==(s=null===(a=this._texture)||void 0===a?void 0:a.generateMipMaps)&&void 0!==s&&s;this._texture&&(this._texture.generateMipMaps=!1),this._postProcessManager?this._postProcessManager._finalizeFrame(!1,null!==(l=this._renderTarget)&&void 0!==l?l:void 0,e,this._postProcesses,this.ignoreCameraViewport):t&&h.postProcessManager._finalizeFrame(!1,null!==(u=this._renderTarget)&&void 0!==u?u:void 0,e),this._texture&&(this._texture.generateMipMaps=b),!this._doNotChangeAspectRatio&&h.updateTransformMatrix(!0),i&&_0xd79dde.DumpFramebuffer(this.getRenderWidth(),this.getRenderHeight(),d)}this._unbindFrameBuffer(d,e),this._texture&&this.isCube&&5===e&&d.generateMipMapsForCubemap(this._texture),null===(c=d._debugPopGroup)||void 0===c||c.call(d,1)}},_0x5535c1.prototype.setRenderingOrder=function(e,t,i,n){void 0===t&&(t=null),void 0===i&&(i=null),void 0===n&&(n=null),this._renderingManager.setRenderingOrder(e,t,i,n)},_0x5535c1.prototype.setRenderingAutoClearDepthStencil=function(e,t){this._renderingManager.setRenderingAutoClearDepthStencil(e,t),this._renderingManager._useSceneAutoClearSetup=!1},_0x5535c1.prototype.clone=function(){var e=this.getSize(),t=new _0x5535c1(this.name,e,this.getScene(),this._renderTargetOptions.generateMipMaps,this._doNotChangeAspectRatio,this._renderTargetOptions.type,this.isCube,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer,this._renderTargetOptions.generateStencilBuffer,void 0,this._renderTargetOptions.format,void 0,this._renderTargetOptions.samples);return t.hasAlpha=this.hasAlpha,t.level=this.level,t.coordinatesMode=this.coordinatesMode,this.renderList&&(t.renderList=this.renderList.slice(0)),t},_0x5535c1.prototype.serialize=function(){if(!this.name)return null;var e=_super.prototype.serialize.call(this);if(e.renderTargetSize=this.getRenderSize(),e.renderList=[],this.renderList)for(var t=0;t<this.renderList.length;t++)e.renderList.push(this.renderList[t].id);return e},_0x5535c1.prototype.disposeFramebufferObjects=function(){var e;null===(e=this._renderTarget)||void 0===e||e.dispose(!0)},_0x5535c1.prototype.releaseInternalTexture=function(){var e;null===(e=this._renderTarget)||void 0===e||e.releaseTextures(),this._texture=null},_0x5535c1.prototype.dispose=function(){var e;this.onResizeObservable.clear(),this.onClearObservable.clear(),this.onAfterRenderObservable.clear(),this.onAfterUnbindObservable.clear(),this.onBeforeBindObservable.clear(),this.onBeforeRenderObservable.clear(),this._postProcessManager&&(this._postProcessManager.dispose(),this._postProcessManager=null),this._prePassRenderTarget&&this._prePassRenderTarget.dispose(),this._releaseRenderPassId(),this.clearPostProcesses(!0),this._resizeObserver&&(this.getScene().getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null),this.renderList=null;var t=this.getScene();if(t){var i=t.customRenderTargets.indexOf(this);i>=0&&t.customRenderTargets.splice(i,1);for(var n=0,r=t.cameras;n<r.length;n++){var o=r[n];(i=o.customRenderTargets.indexOf(this))>=0&&o.customRenderTargets.splice(i,1)}null===(e=this._renderTarget)||void 0===e||e.dispose(),this._renderTarget=null,this._texture=null,_super.prototype.dispose.call(this)}},_0x5535c1.prototype._rebuild=function(){this.refreshRate===_0x5535c1.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=_0x5535c1.REFRESHRATE_RENDER_ONCE),this._postProcessManager&&this._postProcessManager._rebuild()},_0x5535c1.prototype.freeRenderingGroups=function(){this._renderingManager&&this._renderingManager.freeRenderingGroups()},_0x5535c1.prototype.getViewCount=function(){return 1},_0x5535c1.REFRESHRATE_RENDER_ONCE=0,_0x5535c1.REFRESHRATE_RENDER_ONEVERYFRAME=1,_0x5535c1.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2,_0x5141a8._CreateRenderTargetTexture=function(e,t,i,n,r){return new _0x5535c1(e,t,i,n)};var _0x4487c2=(_0x10429b=!0,function(e,t){var i=_0x10429b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x10429b=!1,i}),_0x18de9f=_0x4487c2(void 0,(function(){return _0x18de9f.toString().search("(((.+)+)+)+$").toString().constructor(_0x18de9f).search("(((.+)+)+)+$")})),_0x10429b,_0x28f552,_0x2ce3e5;function _0x253b1a(e,t,i,n){void 0===n&&(n=!0);var r=e.getScene(),o=r.getEngine(),a=new _0x5535c1("resized"+e.name,{width:t,height:i},r,!e.noMipmap,!0,e._texture.type,!1,e.samplingMode,!1);a.wrapU=e.wrapU,a.wrapV=e.wrapV,a.uOffset=e.uOffset,a.vOffset=e.vOffset,a.uScale=e.uScale,a.vScale=e.vScale,a.uAng=e.uAng,a.vAng=e.vAng,a.wAng=e.wAng,a.coordinatesIndex=e.coordinatesIndex,a.level=e.level,a.anisotropicFilteringLevel=e.anisotropicFilteringLevel,a._texture.isReady=!1,e.wrapU=_0x5141a8.CLAMP_ADDRESSMODE,e.wrapV=_0x5141a8.CLAMP_ADDRESSMODE;var s=new _PostProcesses_passPostProcess__WEBPACK_IMPORTED_MODULE_2__.PassPostProcess("pass",1,null,n?_0x5141a8.BILINEAR_SAMPLINGMODE:_0x5141a8.NEAREST_SAMPLINGMODE,o,!1,_0x333f62.TEXTURETYPE_UNSIGNED_INT);return s.externalTextureSamplerBinding=!0,s.getEffect().executeWhenCompiled((function(){s.onApply=function(t){t.setTexture("textureSampler",e)};var t=a.renderTarget;t&&(r.postProcessManager.directRender([s],t),o.unBindFramebuffer(t),a.disposeFramebufferObjects(),s.dispose(),a.getInternalTexture().isReady=!0)})),a}function _0x2a94e0(e,t,i,n,r,o){var a=t.getEngine();return t.isReady=!1,r=null!=r?r:t.samplingMode,n=null!=n?n:t.type,o=null!=o?o:t.format,-1===n&&(n=_0x333f62.TEXTURETYPE_UNSIGNED_BYTE),new Promise((function(s){var l=new _PostProcesses_postProcess__WEBPACK_IMPORTED_MODULE_4__.PostProcess("postprocess",e,null,null,1,null,r,a,!1,void 0,n,void 0,null,!1,o);l.externalTextureSamplerBinding=!0;var u=a.createRenderTargetTexture({width:t.width,height:t.height},{generateDepthBuffer:!1,generateMipMaps:!1,generateStencilBuffer:!1,samplingMode:r,type:n,format:o});l.getEffect().executeWhenCompiled((function(){l.onApply=function(e){e._bindTexture("textureSampler",t),e.setFloat2("scale",1,1)},i.postProcessManager.directRender([l],u,!0),a.restoreDefaultFramebuffer(),a._releaseTexture(t),l&&l.dispose(),u._swapAndDie(t),t.type=n,t.format=_0x333f62.TEXTUREFORMAT_RGBA,t.isReady=!0,s(t)}))}))}function _0x17e77f(e){!_0x28f552&&(_0x28f552=new Float32Array(1),_0x2ce3e5=new Int32Array(_0x28f552.buffer)),_0x28f552[0]=e;var t=_0x2ce3e5[0],i=t>>16&32768,n=t>>12&2047,r=t>>23&255;return r<103?i:r>142?(i|=31744,i|=(255==r?0:1)&&8388607&t):r<113?i|=((n|=2048)>>114-r)+(n>>113-r&1):(i|=r-112<<10|n>>1,i+=1&n)}function _0x185fb9(e){var t=(32768&e)>>15,i=(31744&e)>>10,n=1023&e;return 0===i?(t?-1:1)*Math.pow(2,-14)*(n/Math.pow(2,10)):31==i?n?NaN:1/0*(t?-1:1):(t?-1:1)*Math.pow(2,i-15)*(1+n/Math.pow(2,10))}_0x18de9f();var _0x2314f2={CreateResizedCopy:_0x253b1a,ApplyPostProcess:_0x2a94e0,ToHalfFloat:_0x17e77f,FromHalfFloat:_0x185fb9},_0x33e56b=(_0x487147=!0,function(e,t){var i=_0x487147?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x487147=!1,i}),_0xca9c5e=_0x33e56b(void 0,(function(){return _0xca9c5e.toString().search("(((.+)+)+)+$").toString().constructor(_0xca9c5e).search("(((.+)+)+)+$")})),_0x487147;function _0x168153(e){void 0===e&&(e=!0),this._isDepthTestDirty=!1,this._isDepthMaskDirty=!1,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1,e&&this.reset()}_0xca9c5e(),Object.defineProperty(_0x168153.prototype,"isDirty",{get:function(){return this._isDepthFuncDirty||this._isDepthTestDirty||this._isDepthMaskDirty||this._isCullFaceDirty||this._isCullDirty||this._isZOffsetDirty||this._isFrontFaceDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"zOffset",{get:function(){return this._zOffset},set:function(e){this._zOffset!==e&&(this._zOffset=e,this._isZOffsetDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"zOffsetUnits",{get:function(){return this._zOffsetUnits},set:function(e){this._zOffsetUnits!==e&&(this._zOffsetUnits=e,this._isZOffsetDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"cullFace",{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,this._isCullFaceDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"cull",{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this._isCullDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"depthFunc",{get:function(){return this._depthFunc},set:function(e){this._depthFunc!==e&&(this._depthFunc=e,this._isDepthFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"depthMask",{get:function(){return this._depthMask},set:function(e){this._depthMask!==e&&(this._depthMask=e,this._isDepthMaskDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"depthTest",{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._isDepthTestDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"frontFace",{get:function(){return this._frontFace},set:function(e){this._frontFace!==e&&(this._frontFace=e,this._isFrontFaceDirty=!0)},enumerable:!1,configurable:!0}),_0x168153.prototype.reset=function(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._zOffsetUnits=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!0,this._isFrontFaceDirty=!1},_0x168153.prototype.apply=function(e){this.isDirty&&(this._isCullDirty&&(this.cull?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this._isCullDirty=!1),this._isCullFaceDirty&&(e.cullFace(this.cullFace),this._isCullFaceDirty=!1),this._isDepthMaskDirty&&(e.depthMask(this.depthMask),this._isDepthMaskDirty=!1),this._isDepthTestDirty&&(this.depthTest?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this._isDepthTestDirty=!1),this._isDepthFuncDirty&&(e.depthFunc(this.depthFunc),this._isDepthFuncDirty=!1),this._isZOffsetDirty&&(this.zOffset||this.zOffsetUnits?(e.enable(e.POLYGON_OFFSET_FILL),e.polygonOffset(this.zOffset,this.zOffsetUnits)):e.disable(e.POLYGON_OFFSET_FILL),this._isZOffsetDirty=!1),this._isFrontFaceDirty&&(e.frontFace(this.frontFace),this._isFrontFaceDirty=!1))};var _0x3416e8=(_0x48556d=!0,function(e,t){var i=_0x48556d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x48556d=!1,i}),_0x511188=_0x3416e8(void 0,(function(){return _0x511188.toString().search("(((.+)+)+)+$").toString().constructor(_0x511188).search("(((.+)+)+)+$")})),_0x48556d;function _0x4ad628(){this._blendFunctionParameters=new Array(4),this._blendEquationParameters=new Array(2),this._blendConstants=new Array(4),this._isBlendConstantsDirty=!1,this._alphaBlend=!1,this._isAlphaBlendDirty=!1,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this.reset()}_0x511188(),Object.defineProperty(_0x4ad628.prototype,"isDirty",{get:function(){return this._isAlphaBlendDirty||this._isBlendFunctionParametersDirty||this._isBlendEquationParametersDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4ad628.prototype,"alphaBlend",{get:function(){return this._alphaBlend},set:function(e){this._alphaBlend!==e&&(this._alphaBlend=e,this._isAlphaBlendDirty=!0)},enumerable:!1,configurable:!0}),_0x4ad628.prototype.setAlphaBlendConstants=function(e,t,i,n){this._blendConstants[0]===e&&this._blendConstants[1]===t&&this._blendConstants[2]===i&&this._blendConstants[3]===n||(this._blendConstants[0]=e,this._blendConstants[1]=t,this._blendConstants[2]=i,this._blendConstants[3]=n,this._isBlendConstantsDirty=!0)},_0x4ad628.prototype.setAlphaBlendFunctionParameters=function(e,t,i,n){this._blendFunctionParameters[0]===e&&this._blendFunctionParameters[1]===t&&this._blendFunctionParameters[2]===i&&this._blendFunctionParameters[3]===n||(this._blendFunctionParameters[0]=e,this._blendFunctionParameters[1]=t,this._blendFunctionParameters[2]=i,this._blendFunctionParameters[3]=n,this._isBlendFunctionParametersDirty=!0)},_0x4ad628.prototype.setAlphaEquationParameters=function(e,t){this._blendEquationParameters[0]===e&&this._blendEquationParameters[1]===t||(this._blendEquationParameters[0]=e,this._blendEquationParameters[1]=t,this._isBlendEquationParametersDirty=!0)},_0x4ad628.prototype.reset=function(){this._alphaBlend=!1,this._blendFunctionParameters[0]=null,this._blendFunctionParameters[1]=null,this._blendFunctionParameters[2]=null,this._blendFunctionParameters[3]=null,this._blendEquationParameters[0]=null,this._blendEquationParameters[1]=null,this._blendConstants[0]=null,this._blendConstants[1]=null,this._blendConstants[2]=null,this._blendConstants[3]=null,this._isAlphaBlendDirty=!0,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1},_0x4ad628.prototype.apply=function(e){this.isDirty&&(this._isAlphaBlendDirty&&(this._alphaBlend?e.enable(e.BLEND):e.disable(e.BLEND),this._isAlphaBlendDirty=!1),this._isBlendFunctionParametersDirty&&(e.blendFuncSeparate(this._blendFunctionParameters[0],this._blendFunctionParameters[1],this._blendFunctionParameters[2],this._blendFunctionParameters[3]),this._isBlendFunctionParametersDirty=!1),this._isBlendEquationParametersDirty&&(e.blendEquationSeparate(this._blendEquationParameters[0],this._blendEquationParameters[1]),this._isBlendEquationParametersDirty=!1),this._isBlendConstantsDirty&&(e.blendColor(this._blendConstants[0],this._blendConstants[1],this._blendConstants[2],this._blendConstants[3]),this._isBlendConstantsDirty=!1))};var _0x39e5d5=(_0x422ced=!0,function(e,t){var i=_0x422ced?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x422ced=!1,i}),_0x39515e=_0x39e5d5(void 0,(function(){return _0x39515e.toString().search("(((.+)+)+)+$").toString().constructor(_0x39515e).search("(((.+)+)+)+$")})),_0x422ced;function IsWindowObjectExist(){return"undefined"!=typeof window}function IsDocumentAvailable(){return"undefined"!=typeof document}function GetDOMTextContent(e){for(var t="",i=e.firstChild;i;)3===i.nodeType&&(t+=i.textContent),i=i.nextSibling;return t}_0x39515e();var _0x8da745=(_0x2d7be5=!0,function(e,t){var i=_0x2d7be5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d7be5=!1,i}),_0x5cc0e3=_0x8da745(void 0,(function(){return _0x5cc0e3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5cc0e3).search("(((.+)+)+)+$")})),_0x2d7be5;function _0x588382(e){void 0===e&&(e=!0),this._isStencilTestDirty=!1,this._isStencilMaskDirty=!1,this._isStencilFuncDirty=!1,this._isStencilOpDirty=!1,this.useStencilGlobalOnly=!1,e&&this.reset()}_0x5cc0e3(),Object.defineProperty(_0x588382.prototype,"isDirty",{get:function(){return this._isStencilTestDirty||this._isStencilMaskDirty||this._isStencilFuncDirty||this._isStencilOpDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"func",{get:function(){return this._func},set:function(e){this._func!==e&&(this._func=e,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"funcRef",{get:function(){return this._funcRef},set:function(e){this._funcRef!==e&&(this._funcRef=e,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"funcMask",{get:function(){return this._funcMask},set:function(e){this._funcMask!==e&&(this._funcMask=e,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"opStencilFail",{get:function(){return this._opStencilFail},set:function(e){this._opStencilFail!==e&&(this._opStencilFail=e,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"opDepthFail",{get:function(){return this._opDepthFail},set:function(e){this._opDepthFail!==e&&(this._opDepthFail=e,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"opStencilDepthPass",{get:function(){return this._opStencilDepthPass},set:function(e){this._opStencilDepthPass!==e&&(this._opStencilDepthPass=e,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask!==e&&(this._mask=e,this._isStencilMaskDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,this._isStencilTestDirty=!0)},enumerable:!1,configurable:!0}),_0x588382.prototype.reset=function(){var e;this.stencilMaterial=void 0,null===(e=this.stencilGlobal)||void 0===e||e.reset(),this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0},_0x588382.prototype.apply=function(e){var t;if(e){var i=!this.useStencilGlobalOnly&&!!(null===(t=this.stencilMaterial)||void 0===t?void 0:t.enabled);this.enabled=i?this.stencilMaterial.enabled:this.stencilGlobal.enabled,this.func=i?this.stencilMaterial.func:this.stencilGlobal.func,this.funcRef=i?this.stencilMaterial.funcRef:this.stencilGlobal.funcRef,this.funcMask=i?this.stencilMaterial.funcMask:this.stencilGlobal.funcMask,this.opStencilFail=i?this.stencilMaterial.opStencilFail:this.stencilGlobal.opStencilFail,this.opDepthFail=i?this.stencilMaterial.opDepthFail:this.stencilGlobal.opDepthFail,this.opStencilDepthPass=i?this.stencilMaterial.opStencilDepthPass:this.stencilGlobal.opStencilDepthPass,this.mask=i?this.stencilMaterial.mask:this.stencilGlobal.mask,this.isDirty&&(this._isStencilTestDirty&&(this.enabled?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this._isStencilTestDirty=!1),this._isStencilMaskDirty&&(e.stencilMask(this.mask),this._isStencilMaskDirty=!1),this._isStencilFuncDirty&&(e.stencilFunc(this.func,this.funcRef,this.funcMask),this._isStencilFuncDirty=!1),this._isStencilOpDirty&&(e.stencilOp(this.opStencilFail,this.opDepthFail,this.opStencilDepthPass),this._isStencilOpDirty=!1))}};var _0xcc19c2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));return i(),function(){}}();function _0x265690(e,t,i,n){var r=this;this._name="WebGL",this.forcePOTTextures=!1,this.isFullscreen=!1,this.cullBackFaces=null,this.renderEvenInBackground=!0,this.preventCacheWipeBetweenFrames=!1,this.validateShaderPrograms=!1,this._useReverseDepthBuffer=!1,this.isNDCHalfZRange=!1,this.hasOriginBottomLeft=!0,this.disableUniformBuffers=!1,this.onDisposeObservable=new Observable,this._frameId=0,this._uniformBuffers=new Array,this._storageBuffers=new Array,this._webGLVersion=1,this._windowIsBackground=!1,this._highPrecisionShadersAllowed=!0,this._badOS=!1,this._badDesktopOS=!1,this._renderingQueueLaunched=!1,this._activeRenderLoops=new Array,this.onContextLostObservable=new Observable,this.onContextRestoredObservable=new Observable,this._contextWasLost=!1,this._doNotHandleContextLost=!1,this.disableVertexArrayObjects=!1,this._colorWrite=!0,this._colorWriteChanged=!0,this._depthCullingState=new _0x168153,this._stencilStateComposer=new _0x588382,this._stencilState=new _0x4257c2,this._alphaState=new _0x4ad628,this._alphaMode=_0x333f62.ALPHA_ADD,this._alphaEquation=_0x333f62.ALPHA_DISABLE,this._internalTexturesCache=new Array,this._renderTargetWrapperCache=new Array,this._activeChannel=0,this._currentTextureChannel=-1,this._boundTexturesCache={},this._compiledEffects={},this._vertexAttribArraysEnabled=[],this._uintIndicesCurrentlySet=!1,this._currentBoundBuffer=new Array,this._currentFramebuffer=null,this._dummyFramebuffer=null,this._currentBufferPointers=new Array,this._currentInstanceLocations=new Array,this._currentInstanceBuffers=new Array,this._vaoRecordInProgress=!1,this._mustWipeVertexAttributes=!1,this._nextFreeTextureSlots=new Array,this._maxSimultaneousTextures=0,this._maxMSAASamplesOverride=null,this._activeRequests=new Array,this._adaptToDeviceRatio=!1,this._transformTextureUrl=null,this.hostInformation={isMobile:!1},this.premultipliedAlpha=!0,this.onBeforeTextureInitObservable=new Observable,this._isWebGPU=!1,this._snapshotRenderingMode=_0x333f62.SNAPSHOTRENDERING_STANDARD,this._viewportCached={x:0,y:0,z:0,w:0},this._unpackFlipYCached=null,this.enableUnpackFlipYCached=!0,this._boundUniforms={};var o=null;if(i=i||{},this._creationOptions=i,this._adaptToDeviceRatio=null!=n&&n,this._stencilStateComposer.stencilGlobal=this._stencilState,_0x2fa08c.SetMatrixPrecision(!!i.useHighPrecisionMatrix),e){if(n=n||i.adaptToDeviceRatio||!1,e.getContext){if(o=e,this._renderingCanvas=o,void 0!==t&&(i.antialias=t),void 0===i.deterministicLockstep&&(i.deterministicLockstep=!1),void 0===i.lockstepMaxSteps&&(i.lockstepMaxSteps=4),void 0===i.timeStep&&(i.timeStep=1/60),void 0===i.preserveDrawingBuffer&&(i.preserveDrawingBuffer=!1),void 0===i.audioEngine&&(i.audioEngine=!0),void 0!==i.audioEngineOptions&&void 0!==i.audioEngineOptions.audioContext&&(this._audioContext=i.audioEngineOptions.audioContext),void 0!==i.audioEngineOptions&&void 0!==i.audioEngineOptions.audioDestination&&(this._audioDestination=i.audioEngineOptions.audioDestination),void 0===i.stencil&&(i.stencil=!0),!1===i.premultipliedAlpha&&(this.premultipliedAlpha=!1),void 0===i.xrCompatible&&(i.xrCompatible=!0),this._doNotHandleContextLost=!!i.doNotHandleContextLost,navigator&&navigator.userAgent){this._checkForMobile=function(){var e=navigator.userAgent;r.hostInformation.isMobile=-1!==e.indexOf("Mobile")||-1!==e.indexOf("Mac")&&IsDocumentAvailable()&&"ontouchend"in document},this._checkForMobile(),IsWindowObjectExist()&&window.addEventListener("resize",this._checkForMobile);for(var a=navigator.userAgent,s=0,l=_0x265690.ExceptionList;s<l.length;s++){var u=l[s],c=u.key,h=u.targets;if(new RegExp(c).test(a)){if(u.capture&&u.captureConstraint){var d=u.capture,f=u.captureConstraint,p=new RegExp(d).exec(a);if(p&&p.length>0)if(parseInt(p[p.length-1])>=f)continue}for(var _=0,m=h;_<m.length;_++){switch(m[_]){case"uniformBuffer":this.disableUniformBuffers=!0;break;case"vao":this.disableVertexArrayObjects=!0;break;case"antialias":i.antialias=!1;break;case"maxMSAASamples":this._maxMSAASamplesOverride=1}}}}}if(!this._doNotHandleContextLost&&(this._onContextLost=function(e){e.preventDefault(),r._contextWasLost=!0,_0x50f23a.Warn("WebGL context lost."),r.onContextLostObservable.notifyObservers(r)},this._onContextRestored=function(){r._restoreEngineAfterContextLost(r._initGLContext.bind(r))},o.addEventListener("webglcontextlost",this._onContextLost,!1),o.addEventListener("webglcontextrestored",this._onContextRestored,!1),i.powerPreference="high-performance"),this._badDesktopOS=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),this._badDesktopOS&&(i.xrCompatible=!1),!i.disableWebGL2Support)try{this._gl=o.getContext("webgl2",i)||o.getContext("experimental-webgl2",i),this._gl&&(this._webGLVersion=2,this._shaderPlatformName="WEBGL2",!this._gl.deleteQuery&&(this._webGLVersion=1,this._shaderPlatformName="WEBGL1"))}catch(e){}if(!this._gl){if(!o)throw new Error("The provided canvas is null or undefined.");try{this._gl=o.getContext("webgl",i)||o.getContext("experimental-webgl",i)}catch(e){throw new Error("WebGL not supported")}}if(!this._gl)throw new Error("WebGL not supported")}else{this._gl=e,this._renderingCanvas=this._gl.canvas,this._gl.renderbufferStorageMultisample?(this._webGLVersion=2,this._shaderPlatformName="WEBGL2"):this._shaderPlatformName="WEBGL1";var g=this._gl.getContextAttributes();g&&(i.stencil=g.stencil)}this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),void 0!==i.useHighPrecisionFloats&&(this._highPrecisionShadersAllowed=i.useHighPrecisionFloats);var x=IsWindowObjectExist()&&window.devicePixelRatio||1,y=i.limitDeviceRatio||x;this._hardwareScalingLevel=n?1/Math.min(y,x):1,this.resize(),this._isStencilEnable=!!i.stencil,this._initGLContext(),this._initFeatures();for(var v=0;v<this._caps.maxVertexAttribs;v++)this._currentBufferPointers[v]=new _0xcc19c2;this._shaderProcessor=this.webGLVersion>1?new _WebGL_webGL2ShaderProcessors__WEBPACK_IMPORTED_MODULE_13__.WebGL2ShaderProcessor:new _WebGL_webGLShaderProcessors__WEBPACK_IMPORTED_MODULE_12__.WebGLShaderProcessor,this._badOS=/iPad/i.test(navigator.userAgent)||/iPhone/i.test(navigator.userAgent);var $="Babylon.js v".concat(_0x265690.Version);console.log($+" - ".concat(this.description)),this._renderingCanvas&&this._renderingCanvas.setAttribute&&this._renderingCanvas.setAttribute("data-engine",$)}}Object.defineProperty(_0x265690,"NpmPackage",{get:function(){return"babylonjs@5.9.0"},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690,"Version",{get:function(){return"5.9.0"},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"description",{get:function(){var e=this.name+this.webGLVersion;return this._caps.parallelShaderCompile&&(e+=" - Parallel shader compilation"),e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"version",{get:function(){return this._webGLVersion},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690,"ShadersRepository",{get:function(){return _Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ShadersRepository},set:function(e){_Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ShadersRepository=e},enumerable:!1,configurable:!0}),_0x265690.prototype._getShaderProcessor=function(e){return this._shaderProcessor},Object.defineProperty(_0x265690.prototype,"useReverseDepthBuffer",{get:function(){return this._useReverseDepthBuffer},set:function(e){e!==this._useReverseDepthBuffer&&(this._useReverseDepthBuffer=e,this._depthCullingState.depthFunc=e?_0x333f62.GEQUAL:_0x333f62.LEQUAL)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"frameId",{get:function(){return this._frameId},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"supportsUniformBuffers",{get:function(){return this.webGLVersion>1&&!this.disableUniformBuffers},enumerable:!1,configurable:!0}),_0x265690.prototype.getCreationOptions=function(){return this._creationOptions},Object.defineProperty(_0x265690.prototype,"_shouldUseHighPrecisionShader",{get:function(){return!(!this._caps.highPrecisionShaderSupported||!this._highPrecisionShadersAllowed)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"needPOTTextures",{get:function(){return this._webGLVersion<2||this.forcePOTTextures},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"activeRenderLoops",{get:function(){return this._activeRenderLoops},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"doNotHandleContextLost",{get:function(){return this._doNotHandleContextLost},set:function(e){this._doNotHandleContextLost=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"_supportsHardwareTextureRescaling",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"framebufferDimensionsObject",{set:function(e){this._framebufferDimensionsObject=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"currentViewport",{get:function(){return this._cachedViewport},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"emptyTexture",{get:function(){return!this._emptyTexture&&(this._emptyTexture=this.createRawTexture(new Uint8Array(4),1,1,_0x333f62.TEXTUREFORMAT_RGBA,!1,!1,_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"emptyTexture3D",{get:function(){return!this._emptyTexture3D&&(this._emptyTexture3D=this.createRawTexture3D(new Uint8Array(4),1,1,1,_0x333f62.TEXTUREFORMAT_RGBA,!1,!1,_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture3D},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"emptyTexture2DArray",{get:function(){return!this._emptyTexture2DArray&&(this._emptyTexture2DArray=this.createRawTexture2DArray(new Uint8Array(4),1,1,1,_0x333f62.TEXTUREFORMAT_RGBA,!1,!1,_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture2DArray},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"emptyCubeTexture",{get:function(){if(!this._emptyCubeTexture){var e=new Uint8Array(4),t=[e,e,e,e,e,e];this._emptyCubeTexture=this.createRawCubeTexture(t,1,_0x333f62.TEXTUREFORMAT_RGBA,_0x333f62.TEXTURETYPE_UNSIGNED_INT,!1,!1,_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE)}return this._emptyCubeTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"isWebGPU",{get:function(){return this._isWebGPU},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"shaderPlatformName",{get:function(){return this._shaderPlatformName},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"snapshotRendering",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"snapshotRenderingMode",{get:function(){return this._snapshotRenderingMode},set:function(e){this._snapshotRenderingMode=e},enumerable:!1,configurable:!0}),_0x265690.prototype.snapshotRenderingReset=function(){this.snapshotRendering=!1},_0x265690._CreateCanvas=function(e,t){if("undefined"==typeof document)return new OffscreenCanvas(e,t);var i=document.createElement("canvas");return i.width=e,i.height=t,i},_0x265690.prototype.createCanvas=function(e,t){return _0x265690._CreateCanvas(e,t)},_0x265690.prototype.createCanvasImage=function(){return document.createElement("img")},_0x265690.prototype._restoreEngineAfterContextLost=function(e){var t=this;setTimeout((function(){return(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(t,void 0,void 0,(function(){var t,i,n,r,o;return(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this,(function(a){switch(a.label){case 0:return this._dummyFramebuffer=null,t=this._depthCullingState.depthTest,i=this._depthCullingState.depthFunc,n=this._depthCullingState.depthMask,r=this._stencilState.stencilTest,[4,e()];case 1:return a.sent(),this._rebuildEffects(),null===(o=this._rebuildComputeEffects)||void 0===o||o.call(this),this._rebuildInternalTextures(),this._rebuildRenderTargetWrappers(),this._rebuildBuffers(),this.wipeCaches(!0),this._depthCullingState.depthTest=t,this._depthCullingState.depthFunc=i,this._depthCullingState.depthMask=n,this._stencilState.stencilTest=r,_0x50f23a.Warn(this.name+" context successfully restored."),this.onContextRestoredObservable.notifyObservers(this),this._contextWasLost=!1,[2]}}))}))}),0)},_0x265690.prototype._sharedInit=function(e,t,i){this._renderingCanvas=e},_0x265690.prototype._getShaderProcessingContext=function(e){return null},_0x265690.prototype._rebuildInternalTextures=function(){for(var e=0,t=this._internalTexturesCache.slice();e<t.length;e++){t[e]._rebuild()}},_0x265690.prototype._rebuildRenderTargetWrappers=function(){for(var e=0,t=this._renderTargetWrapperCache.slice();e<t.length;e++){t[e]._rebuild()}},_0x265690.prototype._rebuildEffects=function(){for(var e in this._compiledEffects){var t=this._compiledEffects[e];t._pipelineContext=null,t._wasPreviouslyReady=!1,t._prepareEffect()}_Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ResetCache()},_0x265690.prototype.areAllEffectsReady=function(){for(var e in this._compiledEffects){if(!this._compiledEffects[e].isReady())return!1}return!0},_0x265690.prototype._rebuildBuffers=function(){for(var e=0,t=this._uniformBuffers;e<t.length;e++){t[e]._rebuild()}for(var i=0,n=this._storageBuffers;i<n.length;i++){n[i]._rebuild()}},_0x265690.prototype._initGLContext=function(){this._caps={maxTexturesImageUnits:this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),maxCombinedTexturesImageUnits:this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),maxVertexTextureImageUnits:this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxTextureSize:this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),maxSamples:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile")||void 0,standardDerivatives:this._webGLVersion>1||null!==this._gl.getExtension("OES_standard_derivatives"),maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),s3tc_srgb:this._gl.getExtension("WEBGL_compressed_texture_s3tc_srgb")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc_srgb"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||null!==this._gl.getExtension("OES_element_index_uint"),fragmentDepthSupported:this._webGLVersion>1||null!==this._gl.getExtension("EXT_frag_depth"),highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),supportOcclusionQuery:this._webGLVersion>1,canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float")),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1,canUseGLInstanceID:this._webGLVersion>1,canUseGLVertexID:this._webGLVersion>1,supportComputeShaders:!1,supportSRGBBuffers:!1,supportTransformFeedbacks:this._webGLVersion>1,textureMaxLevel:this._webGLVersion>1,texture2DArrayMaxLayerCount:this._webGLVersion>1?256:128},this._glVersion=this._gl.getParameter(this._gl.VERSION);var e=this._gl.getExtension("WEBGL_debug_renderer_info");if(null!=e&&(this._glRenderer=this._gl.getParameter(e.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(e.UNMASKED_VENDOR_WEBGL)),!this._glVendor&&(this._glVendor=this._gl.getParameter(this._gl.VENDOR)||"Unknown vendor"),!this._glRenderer&&(this._glRenderer=this._gl.getParameter(this._gl.RENDERER)||"Unknown renderer"),36193!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=36193),34842!==this._gl.RGBA16F&&(this._gl.RGBA16F=34842),34836!==this._gl.RGBA32F&&(this._gl.RGBA32F=34836),35056!==this._gl.DEPTH24_STENCIL8&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(1===this._webGLVersion&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!(!this._caps.textureFloat||!this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!(!this._caps.textureFloat||!this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._caps.astc&&(this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR),this._caps.bptc&&(this._gl.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=this._caps.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT),this._caps.s3tc_srgb&&(this._gl.COMPRESSED_SRGB_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT),this._caps.etc2&&(this._gl.COMPRESSED_SRGB8_ETC2=this._caps.etc2.COMPRESSED_SRGB8_ETC2,this._gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=this._caps.etc2.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC),this._webGLVersion>1&&5131!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=null!==this._maxMSAASamplesOverride?this._maxMSAASamplesOverride:this._gl.getParameter(this._gl.MAX_SAMPLES);else{var t=this._gl.getExtension("WEBGL_draw_buffers");if(null!==t){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=t.drawBuffersWEBGL.bind(t),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(var i=0;i<16;i++)this._gl["COLOR_ATTACHMENT"+i+"_WEBGL"]=t["COLOR_ATTACHMENT"+i+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{var n=this._gl.getExtension("WEBGL_depth_texture");null!=n&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=n.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{var r=this._gl.getExtension("OES_vertex_array_object");null!=r&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=r.createVertexArrayOES.bind(r),this._gl.bindVertexArray=r.bindVertexArrayOES.bind(r),this._gl.deleteVertexArray=r.deleteVertexArrayOES.bind(r))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{var o=this._gl.getExtension("ANGLE_instanced_arrays");null!=o?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=o.drawArraysInstancedANGLE.bind(o),this._gl.drawElementsInstanced=o.drawElementsInstancedANGLE.bind(o),this._gl.vertexAttribDivisor=o.vertexAttribDivisorANGLE.bind(o)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){var a=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),s=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);a&&s&&(this._caps.highPrecisionShaderSupported=0!==a.precision&&0!==s.precision)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{var l=this._gl.getExtension("EXT_blend_minmax");null!=l&&(this._caps.blendMinMax=!0,this._gl.MAX=l.MAX_EXT,this._gl.MIN=l.MIN_EXT)}if(!this._caps.supportSRGBBuffers){if(this._webGLVersion>1)this._caps.supportSRGBBuffers=!0;else{var u=this._gl.getExtension("EXT_sRGB");null!=u&&(this._caps.supportSRGBBuffers=!0,this._gl.SRGB=u.SRGB_EXT,this._gl.SRGB8=u.SRGB_ALPHA_EXT,this._gl.SRGB8_ALPHA8=u.SRGB_ALPHA_EXT)}this._caps.supportSRGBBuffers=this._caps.supportSRGBBuffers&&!(!this._creationOptions||!this._creationOptions.forceSRGBBufferSupportState)}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(var c=0;c<this._maxSimultaneousTextures;c++)this._nextFreeTextureSlots.push(c)},_0x265690.prototype._initFeatures=function(){this._features={forceBitmapOverHTMLImageElement:!1,supportRenderAndCopyToLodForFloatTextures:1!==this._webGLVersion,supportDepthStencilTexture:1!==this._webGLVersion,supportShadowSamplers:1!==this._webGLVersion,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:1!==this._webGLVersion,trackUbosInFrame:!1,checkUbosContentBeforeUpload:!1,supportCSM:1!==this._webGLVersion,basisNeedsPOT:1===this._webGLVersion,support3DTextures:1!==this._webGLVersion,needTypeSuffixInShaderConstants:1!==this._webGLVersion,supportMSAA:1!==this._webGLVersion,supportSSAO2:1!==this._webGLVersion,supportExtendedTextureFormats:1!==this._webGLVersion,supportSwitchCaseInShader:1!==this._webGLVersion,supportSyncTextureRead:!0,needsInvertingBitmap:!0,useUBOBindingCache:!0,needShaderCodeInlining:!1,needToAlwaysBindUniformBuffers:!1,supportRenderPasses:!1,_collectUbosUpdatedInFrame:!1}},Object.defineProperty(_0x265690.prototype,"webGLVersion",{get:function(){return this._webGLVersion},enumerable:!1,configurable:!0}),_0x265690.prototype.getClassName=function(){return"ThinEngine"},Object.defineProperty(_0x265690.prototype,"isStencilEnable",{get:function(){return this._isStencilEnable},enumerable:!1,configurable:!0}),_0x265690.prototype._prepareWorkingCanvas=function(){if(!this._workingCanvas){this._workingCanvas=this.createCanvas(1,1);var e=this._workingCanvas.getContext("2d");e&&(this._workingContext=e)}},_0x265690.prototype.resetTextureCache=function(){for(var e in this._boundTexturesCache)Object.prototype.hasOwnProperty.call(this._boundTexturesCache,e)&&(this._boundTexturesCache[e]=null);this._currentTextureChannel=-1},_0x265690.prototype.getInfo=function(){return this.getGlInfo()},_0x265690.prototype.getGlInfo=function(){return{vendor:this._glVendor,renderer:this._glRenderer,version:this._glVersion}},_0x265690.prototype.setHardwareScalingLevel=function(e){this._hardwareScalingLevel=e,this.resize()},_0x265690.prototype.getHardwareScalingLevel=function(){return this._hardwareScalingLevel},_0x265690.prototype.getLoadedTexturesCache=function(){return this._internalTexturesCache},_0x265690.prototype.getCaps=function(){return this._caps},_0x265690.prototype.stopRenderLoop=function(e){if(e){var t=this._activeRenderLoops.indexOf(e);t>=0&&this._activeRenderLoops.splice(t,1)}else this._activeRenderLoops=[]},_0x265690.prototype._renderLoop=function(){if(!this._contextWasLost){var e=!0;if(!this.renderEvenInBackground&&this._windowIsBackground&&(e=!1),e){this.beginFrame();for(var t=0;t<this._activeRenderLoops.length;t++){(0,this._activeRenderLoops[t])()}this.endFrame()}}this._activeRenderLoops.length>0?this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},_0x265690.prototype.getRenderingCanvas=function(){return this._renderingCanvas},_0x265690.prototype.getAudioContext=function(){return this._audioContext},_0x265690.prototype.getAudioDestination=function(){return this._audioDestination},_0x265690.prototype.getHostWindow=function(){return IsWindowObjectExist()?this._renderingCanvas&&this._renderingCanvas.ownerDocument&&this._renderingCanvas.ownerDocument.defaultView?this._renderingCanvas.ownerDocument.defaultView:window:null},_0x265690.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth},_0x265690.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight},_0x265690.prototype._queueNewFrame=function(e,t){return _0x265690.QueueNewFrame(e,t)},_0x265690.prototype.runRenderLoop=function(e){-1===this._activeRenderLoops.indexOf(e)&&(this._activeRenderLoops.push(e),!this._renderingQueueLaunched&&(this._renderingQueueLaunched=!0,this._boundRenderFunction=this._renderLoop.bind(this),this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow())))},_0x265690.prototype.clear=function(e,t,i,n){void 0===n&&(n=!1);var r=this.stencilStateComposer.useStencilGlobalOnly;this.stencilStateComposer.useStencilGlobalOnly=!0,this.applyStates(),this.stencilStateComposer.useStencilGlobalOnly=r;var o=0;t&&e&&(this._gl.clearColor(e.r,e.g,e.b,void 0!==e.a?e.a:1),o|=this._gl.COLOR_BUFFER_BIT),i&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GEQUAL,this._gl.clearDepth(0)):this._gl.clearDepth(1),o|=this._gl.DEPTH_BUFFER_BIT),n&&(this._gl.clearStencil(0),o|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(o)},_0x265690.prototype._viewport=function(e,t,i,n){(e!==this._viewportCached.x||t!==this._viewportCached.y||i!==this._viewportCached.z||n!==this._viewportCached.w)&&(this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=i,this._viewportCached.w=n,this._gl.viewport(e,t,i,n))},_0x265690.prototype.setViewport=function(e,t,i){var n=t||this.getRenderWidth(),r=i||this.getRenderHeight(),o=e.x||0,a=e.y||0;this._cachedViewport=e,this._viewport(o*n,a*r,n*e.width,r*e.height)},_0x265690.prototype.beginFrame=function(){},_0x265690.prototype.endFrame=function(){this._badOS&&this.flushFramebuffer(),this._frameId++},_0x265690.prototype.resize=function(e){var t,i;if(void 0===e&&(e=!1),this._adaptToDeviceRatio){var n=IsWindowObjectExist()&&window.devicePixelRatio||1,r=this._creationOptions.limitDeviceRatio||n;this._hardwareScalingLevel=this._adaptToDeviceRatio?1/Math.min(r,n):1}IsWindowObjectExist()?(t=this._renderingCanvas?this._renderingCanvas.clientWidth||this._renderingCanvas.width:window.innerWidth,i=this._renderingCanvas?this._renderingCanvas.clientHeight||this._renderingCanvas.height:window.innerHeight):(t=this._renderingCanvas?this._renderingCanvas.width:100,i=this._renderingCanvas?this._renderingCanvas.height:100),this.setSize(t/this._hardwareScalingLevel,i/this._hardwareScalingLevel,e)},_0x265690.prototype.setSize=function(e,t,i){return void 0===i&&(i=!1),!!this._renderingCanvas&&(e|=0,t|=0,!(!i&&this._renderingCanvas.width===e&&this._renderingCanvas.height===t)&&(this._renderingCanvas.width=e,this._renderingCanvas.height=t,!0))},_0x265690.prototype.bindFramebuffer=function(e,t,i,n,r,o,a){var s,l,u,c,h;void 0===t&&(t=0),void 0===o&&(o=0),void 0===a&&(a=0);var d=e;this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._bindUnboundFramebuffer(d._MSAAFramebuffer?d._MSAAFramebuffer:d._framebuffer);var f=this._gl;e.is2DArray?f.framebufferTextureLayer(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,null===(s=e.texture._hardwareTexture)||void 0===s?void 0:s.underlyingResource,o,a):e.isCube&&f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_CUBE_MAP_POSITIVE_X+t,null===(l=e.texture._hardwareTexture)||void 0===l?void 0:l.underlyingResource,o);var p=e._depthStencilTexture;if(p){var _=e._depthStencilTextureWithStencil?f.DEPTH_STENCIL_ATTACHMENT:f.DEPTH_ATTACHMENT;e.is2DArray?f.framebufferTextureLayer(f.FRAMEBUFFER,_,null===(u=p._hardwareTexture)||void 0===u?void 0:u.underlyingResource,o,a):e.isCube?f.framebufferTexture2D(f.FRAMEBUFFER,_,f.TEXTURE_CUBE_MAP_POSITIVE_X+t,null===(c=p._hardwareTexture)||void 0===c?void 0:c.underlyingResource,o):f.framebufferTexture2D(f.FRAMEBUFFER,_,f.TEXTURE_2D,null===(h=p._hardwareTexture)||void 0===h?void 0:h.underlyingResource,o)}this._cachedViewport&&!r?this.setViewport(this._cachedViewport,i,n):(!i&&(i=e.width,o&&(i/=Math.pow(2,o))),!n&&(n=e.height,o&&(n/=Math.pow(2,o))),this._viewport(0,0,i,n)),this.wipeCaches()},_0x265690.prototype.setState=function(e,t,i,n,r,o,a){var s,l;void 0===t&&(t=0),void 0===n&&(n=!1),void 0===a&&(a=0),(this._depthCullingState.cull!==e||i)&&(this._depthCullingState.cull=e);var u=null===(l=null!==(s=this.cullBackFaces)&&void 0!==s?s:r)||void 0===l||l?this._gl.BACK:this._gl.FRONT;(this._depthCullingState.cullFace!==u||i)&&(this._depthCullingState.cullFace=u),this.setZOffset(t),this.setZOffsetUnits(a);var c=n?this._gl.CW:this._gl.CCW;(this._depthCullingState.frontFace!==c||i)&&(this._depthCullingState.frontFace=c),this._stencilStateComposer.stencilMaterial=o},_0x265690.prototype.setZOffset=function(e){this._depthCullingState.zOffset=this.useReverseDepthBuffer?-e:e},_0x265690.prototype.getZOffset=function(){var e=this._depthCullingState.zOffset;return this.useReverseDepthBuffer?-e:e},_0x265690.prototype.setZOffsetUnits=function(e){this._depthCullingState.zOffsetUnits=this.useReverseDepthBuffer?-e:e},_0x265690.prototype.getZOffsetUnits=function(){var e=this._depthCullingState.zOffsetUnits;return this.useReverseDepthBuffer?-e:e},_0x265690.prototype._bindUnboundFramebuffer=function(e){this._currentFramebuffer!==e&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,e),this._currentFramebuffer=e)},_0x265690.prototype._currentFrameBufferIsDefaultFrameBuffer=function(){return null===this._currentFramebuffer},_0x265690.prototype.generateMipmaps=function(e){this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)},_0x265690.prototype.unBindFramebuffer=function(e,t,i){var n;void 0===t&&(t=!1);var r=e;this._currentRenderTarget=null;var o=this._gl;if(r._MSAAFramebuffer){if(e.isMulti)return void this.unBindMultiColorAttachmentFramebuffer(e,t,i);o.bindFramebuffer(o.READ_FRAMEBUFFER,r._MSAAFramebuffer),o.bindFramebuffer(o.DRAW_FRAMEBUFFER,r._framebuffer),o.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,o.COLOR_BUFFER_BIT,o.NEAREST)}(null===(n=e.texture)||void 0===n?void 0:n.generateMipMaps)&&!t&&!e.isCube&&this.generateMipmaps(e.texture),i&&(r._MSAAFramebuffer&&this._bindUnboundFramebuffer(r._framebuffer),i()),this._bindUnboundFramebuffer(null)},_0x265690.prototype.flushFramebuffer=function(){this._gl.flush()},_0x265690.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},_0x265690.prototype._resetVertexBufferBinding=function(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null},_0x265690.prototype.createVertexBuffer=function(e){return this._createVertexBuffer(e,this._gl.STATIC_DRAW)},_0x265690.prototype._createVertexBuffer=function(e,t){var i=this._gl.createBuffer();if(!i)throw new Error("Unable to create vertex buffer");var n=new _Meshes_WebGL_webGLDataBuffer__WEBPACK_IMPORTED_MODULE_14__.WebGLDataBuffer(i);return this.bindArrayBuffer(n),e instanceof Array?this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),t):this._gl.bufferData(this._gl.ARRAY_BUFFER,e,t),this._resetVertexBufferBinding(),n.references=1,n},_0x265690.prototype.createDynamicVertexBuffer=function(e){return this._createVertexBuffer(e,this._gl.DYNAMIC_DRAW)},_0x265690.prototype._resetIndexBufferBinding=function(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null},_0x265690.prototype.createIndexBuffer=function(e,t){var i=this._gl.createBuffer(),n=new _Meshes_WebGL_webGLDataBuffer__WEBPACK_IMPORTED_MODULE_14__.WebGLDataBuffer(i);if(!i)throw new Error("Unable to create index buffer");this.bindIndexBuffer(n);var r=this._normalizeIndexData(e);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,r,t?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),n.references=1,n.is32Bits=4===r.BYTES_PER_ELEMENT,n},_0x265690.prototype._normalizeIndexData=function(e){if(2===e.BYTES_PER_ELEMENT)return e;if(this._caps.uintIndices){if(e instanceof Uint32Array)return e;for(var t=0;t<e.length;t++)if(e[t]>=65535)return new Uint32Array(e);return new Uint16Array(e)}return new Uint16Array(e)},_0x265690.prototype.bindArrayBuffer=function(e){!this._vaoRecordInProgress&&this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ARRAY_BUFFER)},_0x265690.prototype.bindUniformBlock=function(e,t,i){var n=e.program,r=this._gl.getUniformBlockIndex(n,t);this._gl.uniformBlockBinding(n,r,i)},_0x265690.prototype.bindIndexBuffer=function(e){!this._vaoRecordInProgress&&this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ELEMENT_ARRAY_BUFFER)},_0x265690.prototype._bindBuffer=function(e,t){(this._vaoRecordInProgress||this._currentBoundBuffer[t]!==e)&&(this._gl.bindBuffer(t,e?e.underlyingResource:null),this._currentBoundBuffer[t]=e)},_0x265690.prototype.updateArrayBuffer=function(e){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,e)},_0x265690.prototype._vertexAttribPointer=function(e,t,i,n,r,o,a){var s=this._currentBufferPointers[t];if(s){var l=!1;s.active?(s.buffer!==e&&(s.buffer=e,l=!0),s.size!==i&&(s.size=i,l=!0),s.type!==n&&(s.type=n,l=!0),s.normalized!==r&&(s.normalized=r,l=!0),s.stride!==o&&(s.stride=o,l=!0),s.offset!==a&&(s.offset=a,l=!0)):(l=!0,s.active=!0,s.index=t,s.size=i,s.type=n,s.normalized=r,s.stride=o,s.offset=a,s.buffer=e),(l||this._vaoRecordInProgress)&&(this.bindArrayBuffer(e),this._gl.vertexAttribPointer(t,i,n,r,o,a))}},_0x265690.prototype._bindIndexBufferWithCache=function(e){null!=e&&this._cachedIndexBuffer!==e&&(this._cachedIndexBuffer=e,this.bindIndexBuffer(e),this._uintIndicesCurrentlySet=e.is32Bits)},_0x265690.prototype._bindVertexBuffersAttributes=function(e,t,i){var n=t.getAttributesNames();!this._vaoRecordInProgress&&this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var r=0;r<n.length;r++){var o=t.getAttributeLocation(r);if(o>=0){var a=n[r],s=null;if(i&&(s=i[a]),!s&&(s=e[a]),!s)continue;this._gl.enableVertexAttribArray(o),!this._vaoRecordInProgress&&(this._vertexAttribArraysEnabled[o]=!0);var l=s.getBuffer();l&&(this._vertexAttribPointer(l,o,s.getSize(),s.type,s.normalized,s.byteStride,s.byteOffset),s.getIsInstanced()&&(this._gl.vertexAttribDivisor(o,s.getInstanceDivisor()),!this._vaoRecordInProgress&&(this._currentInstanceLocations.push(o),this._currentInstanceBuffers.push(l))))}}},_0x265690.prototype.recordVertexArrayObject=function(e,t,i,n){var r=this._gl.createVertexArray();return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(r),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(e,i,n),this.bindIndexBuffer(t),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),r},_0x265690.prototype.bindVertexArrayObject=function(e,t){this._cachedVertexArrayObject!==e&&(this._cachedVertexArrayObject=e,this._gl.bindVertexArray(e),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=null!=t&&t.is32Bits,this._mustWipeVertexAttributes=!0)},_0x265690.prototype.bindBuffersDirectly=function(e,t,i,n,r){if(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==r){this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=r;var o=r.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var a=0,s=0;s<o;s++)if(s<i.length){var l=r.getAttributeLocation(s);l>=0&&(this._gl.enableVertexAttribArray(l),this._vertexAttribArraysEnabled[l]=!0,this._vertexAttribPointer(e,l,i[s],this._gl.FLOAT,!1,n,a)),a+=4*i[s]}}this._bindIndexBufferWithCache(t)},_0x265690.prototype._unbindVertexArrayObject=function(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))},_0x265690.prototype.bindBuffers=function(e,t,i,n){(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==i)&&(this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=i,this._bindVertexBuffersAttributes(e,i,n)),this._bindIndexBufferWithCache(t)},_0x265690.prototype.unbindInstanceAttributes=function(){for(var e,t=0,i=this._currentInstanceLocations.length;t<i;t++){var n=this._currentInstanceBuffers[t];e!=n&&n.references&&(e=n,this.bindArrayBuffer(n));var r=this._currentInstanceLocations[t];this._gl.vertexAttribDivisor(r,0)}this._currentInstanceBuffers.length=0,this._currentInstanceLocations.length=0},_0x265690.prototype.releaseVertexArrayObject=function(e){this._gl.deleteVertexArray(e)},_0x265690.prototype._releaseBuffer=function(e){return e.references--,0===e.references&&(this._deleteBuffer(e),!0)},_0x265690.prototype._deleteBuffer=function(e){this._gl.deleteBuffer(e.underlyingResource)},_0x265690.prototype.updateAndBindInstancesBuffer=function(e,t,i){if(this.bindArrayBuffer(e),t&&this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t),void 0!==i[0].index)this.bindInstancesBuffer(e,i,!0);else for(var n=0;n<4;n++){var r=i[n];!this._vertexAttribArraysEnabled[r]&&(this._gl.enableVertexAttribArray(r),this._vertexAttribArraysEnabled[r]=!0),this._vertexAttribPointer(e,r,4,this._gl.FLOAT,!1,64,16*n),this._gl.vertexAttribDivisor(r,1),this._currentInstanceLocations.push(r),this._currentInstanceBuffers.push(e)}},_0x265690.prototype.bindInstancesBuffer=function(e,t,i){void 0===i&&(i=!0),this.bindArrayBuffer(e);var n=0;if(i)for(var r=0;r<t.length;r++){n+=4*(o=t[r]).attributeSize}for(r=0;r<t.length;r++){var o;void 0===(o=t[r]).index&&(o.index=this._currentEffect.getAttributeLocationByName(o.attributeName)),o.index<0||(!this._vertexAttribArraysEnabled[o.index]&&(this._gl.enableVertexAttribArray(o.index),this._vertexAttribArraysEnabled[o.index]=!0),this._vertexAttribPointer(e,o.index,o.attributeSize,o.attributeType||this._gl.FLOAT,o.normalized||!1,n,o.offset),this._gl.vertexAttribDivisor(o.index,void 0===o.divisor?1:o.divisor),this._currentInstanceLocations.push(o.index),this._currentInstanceBuffers.push(e))}},_0x265690.prototype.disableInstanceAttributeByName=function(e){if(this._currentEffect){var t=this._currentEffect.getAttributeLocationByName(e);this.disableInstanceAttribute(t)}},_0x265690.prototype.disableInstanceAttribute=function(e){for(var t,i=!1;-1!==(t=this._currentInstanceLocations.indexOf(e));)this._currentInstanceLocations.splice(t,1),this._currentInstanceBuffers.splice(t,1),i=!0,t=this._currentInstanceLocations.indexOf(e);i&&(this._gl.vertexAttribDivisor(e,0),this.disableAttributeByIndex(e))},_0x265690.prototype.disableAttributeByIndex=function(e){this._gl.disableVertexAttribArray(e),this._vertexAttribArraysEnabled[e]=!1,this._currentBufferPointers[e].active=!1},_0x265690.prototype.draw=function(e,t,i,n){this.drawElementsType(e?_0x333f62.MATERIAL_TriangleFillMode:_0x333f62.MATERIAL_WireFrameFillMode,t,i,n)},_0x265690.prototype.drawPointClouds=function(e,t,i){this.drawArraysType(_0x333f62.MATERIAL_PointFillMode,e,t,i)},_0x265690.prototype.drawUnIndexed=function(e,t,i,n){this.drawArraysType(e?_0x333f62.MATERIAL_TriangleFillMode:_0x333f62.MATERIAL_WireFrameFillMode,t,i,n)},_0x265690.prototype.drawElementsType=function(e,t,i,n){this.applyStates(),this._reportDrawCall();var r=this._drawMode(e),o=this._uintIndicesCurrentlySet?this._gl.UNSIGNED_INT:this._gl.UNSIGNED_SHORT,a=this._uintIndicesCurrentlySet?4:2;n?this._gl.drawElementsInstanced(r,i,o,t*a,n):this._gl.drawElements(r,i,o,t*a)},_0x265690.prototype.drawArraysType=function(e,t,i,n){this.applyStates(),this._reportDrawCall();var r=this._drawMode(e);n?this._gl.drawArraysInstanced(r,t,i,n):this._gl.drawArrays(r,t,i)},_0x265690.prototype._drawMode=function(e){switch(e){case _0x333f62.MATERIAL_TriangleFillMode:return this._gl.TRIANGLES;case _0x333f62.MATERIAL_PointFillMode:return this._gl.POINTS;case _0x333f62.MATERIAL_WireFrameFillMode:return this._gl.LINES;case _0x333f62.MATERIAL_PointListDrawMode:return this._gl.POINTS;case _0x333f62.MATERIAL_LineListDrawMode:return this._gl.LINES;case _0x333f62.MATERIAL_LineLoopDrawMode:return this._gl.LINE_LOOP;case _0x333f62.MATERIAL_LineStripDrawMode:return this._gl.LINE_STRIP;case _0x333f62.MATERIAL_TriangleStripDrawMode:return this._gl.TRIANGLE_STRIP;case _0x333f62.MATERIAL_TriangleFanDrawMode:return this._gl.TRIANGLE_FAN;default:return this._gl.TRIANGLES}},_0x265690.prototype._reportDrawCall=function(){},_0x265690.prototype._releaseEffect=function(e){if(this._compiledEffects[e._key]){delete this._compiledEffects[e._key];var t=e.getPipelineContext();t&&this._deletePipelineContext(t)}},_0x265690.prototype._deletePipelineContext=function(e){var t=e;t&&t.program&&(t.program.__SPECTOR_rebuildProgram=null,this._gl.deleteProgram(t.program))},_0x265690.prototype._getGlobalDefines=function(e){if(e)return this.isNDCHalfZRange?e.IS_NDC_HALF_ZRANGE="":delete e.IS_NDC_HALF_ZRANGE,void(this.useReverseDepthBuffer?e.USE_REVERSE_DEPTHBUFFER="":delete e.USE_REVERSE_DEPTHBUFFER);var t="";return this.isNDCHalfZRange&&(t+="#define IS_NDC_HALF_ZRANGE"),this.useReverseDepthBuffer&&(t&&(t+="\n"),t+="#define USE_REVERSE_DEPTHBUFFER"),t},_0x265690.prototype.createEffect=function(e,t,i,n,r,o,a,s,l,u){var c;void 0===u&&(u=_Materials_shaderLanguage__WEBPACK_IMPORTED_MODULE_20__.ShaderLanguage.GLSL);var h=e.vertexElement||e.vertex||e.vertexToken||e.vertexSource||e,d=e.fragmentElement||e.fragment||e.fragmentToken||e.fragmentSource||e,f=this._getGlobalDefines(),p=null!==(c=null!=r?r:t.defines)&&void 0!==c?c:"";f&&(p+=f);var _=h+"+"+d+"@"+p;if(this._compiledEffects[_]){var m=this._compiledEffects[_];return a&&m.isReady()&&a(m),m}var g=new _Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect(e,t,i,n,this,r,o,a,s,l,_,u);return this._compiledEffects[_]=g,g},_0x265690._ConcatenateShader=function(e,t,i){return void 0===i&&(i=""),i+(t?t+"\n":"")+e},_0x265690.prototype._compileShader=function(e,t,i,n){return this._compileRawShader(_0x265690._ConcatenateShader(e,i,n),t)},_0x265690.prototype._compileRawShader=function(e,t){var i=this._gl,n=i.createShader("vertex"===t?i.VERTEX_SHADER:i.FRAGMENT_SHADER);if(!n){for(var r=i.NO_ERROR,o=i.NO_ERROR;(o=i.getError())!==i.NO_ERROR;)r=o;throw new Error("Something went wrong while creating a gl ".concat(t," shader object. gl error=").concat(r,", gl isContextLost=").concat(i.isContextLost(),", _contextWasLost=").concat(this._contextWasLost))}return i.shaderSource(n,e),i.compileShader(n),n},_0x265690.prototype._getShaderSource=function(e){return this._gl.getShaderSource(e)},_0x265690.prototype.createRawShaderProgram=function(e,t,i,n,r){void 0===r&&(r=null),n=n||this._gl;var o=this._compileRawShader(t,"vertex"),a=this._compileRawShader(i,"fragment");return this._createShaderProgram(e,o,a,n,r)},_0x265690.prototype.createShaderProgram=function(e,t,i,n,r,o){void 0===o&&(o=null),r=r||this._gl;var a=this._webGLVersion>1?"#version 300 es\n#define WEBGL2 \n":"",s=this._compileShader(t,"vertex",n,a),l=this._compileShader(i,"fragment",n,a);return this._createShaderProgram(e,s,l,r,o)},_0x265690.prototype.inlineShaderCode=function(e){return e},_0x265690.prototype.createPipelineContext=function(e){var t=new _WebGL_webGLPipelineContext__WEBPACK_IMPORTED_MODULE_15__.WebGLPipelineContext;return t.engine=this,this._caps.parallelShaderCompile&&(t.isParallelCompiled=!0),t},_0x265690.prototype.createMaterialContext=function(){},_0x265690.prototype.createDrawContext=function(){},_0x265690.prototype._createShaderProgram=function(e,t,i,n,r){var o=n.createProgram();if(e.program=o,!o)throw new Error("Unable to create program");return n.attachShader(o,t),n.attachShader(o,i),n.linkProgram(o),e.context=n,e.vertexShader=t,e.fragmentShader=i,!e.isParallelCompiled&&this._finalizePipelineContext(e),o},_0x265690.prototype._finalizePipelineContext=function(e){var t=e.context,i=e.vertexShader,n=e.fragmentShader,r=e.program;if(!t.getProgramParameter(r,t.LINK_STATUS)){var o,a;if(!this._gl.getShaderParameter(i,this._gl.COMPILE_STATUS))if(o=this._gl.getShaderInfoLog(i))throw e.vertexCompilationError=o,new Error("VERTEX SHADER "+o);if(!this._gl.getShaderParameter(n,this._gl.COMPILE_STATUS))if(o=this._gl.getShaderInfoLog(n))throw e.fragmentCompilationError=o,new Error("FRAGMENT SHADER "+o);if(a=t.getProgramInfoLog(r))throw e.programLinkError=a,new Error(a)}if(this.validateShaderPrograms&&(t.validateProgram(r),!t.getProgramParameter(r,t.VALIDATE_STATUS)&&(a=t.getProgramInfoLog(r))))throw e.programValidationError=a,new Error(a);t.deleteShader(i),t.deleteShader(n),e.vertexShader=void 0,e.fragmentShader=void 0,e.onCompiled&&(e.onCompiled(),e.onCompiled=void 0)},_0x265690.prototype._preparePipelineContext=function(e,t,i,n,r,o,a,s,l,u){var c=e;c.program=n?this.createRawShaderProgram(c,t,i,void 0,l):this.createShaderProgram(c,t,i,s,void 0,l),c.program.__SPECTOR_rebuildProgram=a},_0x265690.prototype._isRenderingStateCompiled=function(e){var t=e;return!!this._gl.getProgramParameter(t.program,this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)&&(this._finalizePipelineContext(t),!0)},_0x265690.prototype._executeWhenRenderingStateIsCompiled=function(e,t){var i=e;if(i.isParallelCompiled){var n=i.onCompiled;i.onCompiled=n?function(){n(),t()}:t}else t()},_0x265690.prototype.getUniforms=function(e,t){for(var i=new Array,n=e,r=0;r<t.length;r++)i.push(this._gl.getUniformLocation(n.program,t[r]));return i},_0x265690.prototype.getAttributes=function(e,t){for(var i=[],n=e,r=0;r<t.length;r++)try{i.push(this._gl.getAttribLocation(n.program,t[r]))}catch(e){i.push(-1)}return i},_0x265690.prototype.enableEffect=function(e){(e=null!==e&&_Materials_drawWrapper__WEBPACK_IMPORTED_MODULE_18__.DrawWrapper.IsWrapper(e)?e.effect:e)&&e!==this._currentEffect&&(this._stencilStateComposer.stencilMaterial=void 0,e=e,this.bindSamplers(e),this._currentEffect=e,e.onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e))},_0x265690.prototype.setInt=function(e,t){return!!e&&(this._gl.uniform1i(e,t),!0)},_0x265690.prototype.setInt2=function(e,t,i){return!!e&&(this._gl.uniform2i(e,t,i),!0)},_0x265690.prototype.setInt3=function(e,t,i,n){return!!e&&(this._gl.uniform3i(e,t,i,n),!0)},_0x265690.prototype.setInt4=function(e,t,i,n,r){return!!e&&(this._gl.uniform4i(e,t,i,n,r),!0)},_0x265690.prototype.setIntArray=function(e,t){return!!e&&(this._gl.uniform1iv(e,t),!0)},_0x265690.prototype.setIntArray2=function(e,t){return!(!e||t.length%2!=0)&&(this._gl.uniform2iv(e,t),!0)},_0x265690.prototype.setIntArray3=function(e,t){return!(!e||t.length%3!=0)&&(this._gl.uniform3iv(e,t),!0)},_0x265690.prototype.setIntArray4=function(e,t){return!(!e||t.length%4!=0)&&(this._gl.uniform4iv(e,t),!0)},_0x265690.prototype.setArray=function(e,t){return!!e&&(!(t.length<1)&&(this._gl.uniform1fv(e,t),!0))},_0x265690.prototype.setArray2=function(e,t){return!(!e||t.length%2!=0)&&(this._gl.uniform2fv(e,t),!0)},_0x265690.prototype.setArray3=function(e,t){return!(!e||t.length%3!=0)&&(this._gl.uniform3fv(e,t),!0)},_0x265690.prototype.setArray4=function(e,t){return!(!e||t.length%4!=0)&&(this._gl.uniform4fv(e,t),!0)},_0x265690.prototype.setMatrices=function(e,t){return!!e&&(this._gl.uniformMatrix4fv(e,!1,t),!0)},_0x265690.prototype.setMatrix3x3=function(e,t){return!!e&&(this._gl.uniformMatrix3fv(e,!1,t),!0)},_0x265690.prototype.setMatrix2x2=function(e,t){return!!e&&(this._gl.uniformMatrix2fv(e,!1,t),!0)},_0x265690.prototype.setFloat=function(e,t){return!!e&&(this._gl.uniform1f(e,t),!0)},_0x265690.prototype.setFloat2=function(e,t,i){return!!e&&(this._gl.uniform2f(e,t,i),!0)},_0x265690.prototype.setFloat3=function(e,t,i,n){return!!e&&(this._gl.uniform3f(e,t,i,n),!0)},_0x265690.prototype.setFloat4=function(e,t,i,n,r){return!!e&&(this._gl.uniform4f(e,t,i,n,r),!0)},_0x265690.prototype.applyStates=function(){if(this._depthCullingState.apply(this._gl),this._stencilStateComposer.apply(this._gl),this._alphaState.apply(this._gl),this._colorWriteChanged){this._colorWriteChanged=!1;var e=this._colorWrite;this._gl.colorMask(e,e,e,e)}},_0x265690.prototype.setColorWrite=function(e){e!==this._colorWrite&&(this._colorWriteChanged=!0,this._colorWrite=e)},_0x265690.prototype.getColorWrite=function(){return this._colorWrite},Object.defineProperty(_0x265690.prototype,"depthCullingState",{get:function(){return this._depthCullingState},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"alphaState",{get:function(){return this._alphaState},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"stencilState",{get:function(){return this._stencilState},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"stencilStateComposer",{get:function(){return this._stencilStateComposer},enumerable:!1,configurable:!0}),_0x265690.prototype.clearInternalTexturesCache=function(){this._internalTexturesCache=[]},_0x265690.prototype.wipeCaches=function(e){this.preventCacheWipeBetweenFrames&&!e||(this._currentEffect=null,this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0,this._unbindVertexArrayObject(),e&&(this._currentProgram=null,this.resetTextureCache(),this._stencilStateComposer.reset(),this._depthCullingState.reset(),this._depthCullingState.depthFunc=this._gl.LEQUAL,this._alphaState.reset(),this._alphaMode=_0x333f62.ALPHA_ADD,this._alphaEquation=_0x333f62.ALPHA_DISABLE,this._colorWrite=!0,this._colorWriteChanged=!0,this._unpackFlipYCached=null,this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),this._mustWipeVertexAttributes=!0,this.unbindAllAttributes()),this._resetVertexBufferBinding(),this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null,this.bindIndexBuffer(null))},_0x265690.prototype._getSamplingParameters=function(e,t){var i=this._gl,n=i.NEAREST,r=i.NEAREST;switch(e){case _0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST:n=i.LINEAR,r=t?i.LINEAR_MIPMAP_NEAREST:i.LINEAR;break;case _0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR:n=i.LINEAR,r=t?i.LINEAR_MIPMAP_LINEAR:i.LINEAR;break;case _0x333f62.TEXTURE_NEAREST_NEAREST_MIPLINEAR:n=i.NEAREST,r=t?i.NEAREST_MIPMAP_LINEAR:i.NEAREST;break;case _0x333f62.TEXTURE_NEAREST_NEAREST_MIPNEAREST:n=i.NEAREST,r=t?i.NEAREST_MIPMAP_NEAREST:i.NEAREST;break;case _0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST:n=i.NEAREST,r=t?i.LINEAR_MIPMAP_NEAREST:i.LINEAR;break;case _0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR:n=i.NEAREST,r=t?i.LINEAR_MIPMAP_LINEAR:i.LINEAR;break;case _0x333f62.TEXTURE_NEAREST_LINEAR:n=i.NEAREST,r=i.LINEAR;break;case _0x333f62.TEXTURE_NEAREST_NEAREST:n=i.NEAREST,r=i.NEAREST;break;case _0x333f62.TEXTURE_LINEAR_NEAREST_MIPNEAREST:n=i.LINEAR,r=t?i.NEAREST_MIPMAP_NEAREST:i.NEAREST;break;case _0x333f62.TEXTURE_LINEAR_NEAREST_MIPLINEAR:n=i.LINEAR,r=t?i.NEAREST_MIPMAP_LINEAR:i.NEAREST;break;case _0x333f62.TEXTURE_LINEAR_LINEAR:n=i.LINEAR,r=i.LINEAR;break;case _0x333f62.TEXTURE_LINEAR_NEAREST:n=i.LINEAR,r=i.NEAREST}return{min:r,mag:n}},_0x265690.prototype._createTexture=function(){var e=this._gl.createTexture();if(!e)throw new Error("Unable to create texture");return e},_0x265690.prototype._createHardwareTexture=function(){return new _WebGL_webGLHardwareTexture__WEBPACK_IMPORTED_MODULE_17__.WebGLHardwareTexture(this._createTexture(),this._gl)},_0x265690.prototype._createInternalTexture=function(e,t,i,n){void 0===n&&(n=InternalTextureSource.Unknown);var r={};void 0!==t&&"object"==typeof t?(r.generateMipMaps=t.generateMipMaps,r.type=void 0===t.type?_0x333f62.TEXTURETYPE_UNSIGNED_INT:t.type,r.samplingMode=void 0===t.samplingMode?_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,r.format=void 0===t.format?_0x333f62.TEXTUREFORMAT_RGBA:t.format,r.useSRGBBuffer=void 0!==t.useSRGBBuffer&&t.useSRGBBuffer):(r.generateMipMaps=t,r.type=_0x333f62.TEXTURETYPE_UNSIGNED_INT,r.samplingMode=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE,r.format=_0x333f62.TEXTUREFORMAT_RGBA,r.useSRGBBuffer=!1),r.useSRGBBuffer=r.useSRGBBuffer&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU),r.type!==_0x333f62.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?r.type===_0x333f62.TEXTURETYPE_HALF_FLOAT&&!this._caps.textureHalfFloatLinearFiltering&&(r.samplingMode=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE):r.samplingMode=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,r.type===_0x333f62.TEXTURETYPE_FLOAT&&!this._caps.textureFloat&&(r.type=_0x333f62.TEXTURETYPE_UNSIGNED_INT,_0x50f23a.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));var o=this._gl,a=new InternalTexture(this,n);a._useSRGBBuffer=!!r.useSRGBBuffer;var s=e.width||e,l=e.height||e,u=e.layers||0,c=this._getSamplingParameters(r.samplingMode,!!r.generateMipMaps),h=0!==u?o.TEXTURE_2D_ARRAY:o.TEXTURE_2D,d=this._getRGBABufferInternalSizedFormat(r.type,r.format,r.useSRGBBuffer),f=this._getInternalFormat(r.format),p=this._getWebGLTextureType(r.type);return this._bindTextureDirectly(h,a),0!==u?(a.is2DArray=!0,o.texImage3D(h,0,d,s,l,u,0,f,p,null)):o.texImage2D(h,0,d,s,l,0,f,p,null),o.texParameteri(h,o.TEXTURE_MAG_FILTER,c.mag),o.texParameteri(h,o.TEXTURE_MIN_FILTER,c.min),o.texParameteri(h,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(h,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),r.generateMipMaps&&this._gl.generateMipmap(h),this._bindTextureDirectly(h,null),a.baseWidth=s,a.baseHeight=l,a.width=s,a.height=l,a.depth=u,a.isReady=!0,a.samples=1,a.generateMipMaps=!!r.generateMipMaps,a.samplingMode=r.samplingMode,a.type=r.type,a.format=r.format,this._internalTexturesCache.push(a),a},_0x265690.prototype._getUseSRGBBuffer=function(e,t){return e&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU||t)},_0x265690.prototype._createTextureBase=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=this;void 0===r&&(r=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===u&&(u=null),void 0===c&&(c=null),void 0===h&&(h=null),void 0===d&&(d=null);var g="data:"===(e=e||"").substr(0,5),x="blob:"===e.substr(0,5),y=g&&-1!==e.indexOf(";base64,"),v=c||new InternalTexture(this,InternalTextureSource.Url),$=e;this._transformTextureUrl&&!y&&!c&&!u&&(e=this._transformTextureUrl(e)),$!==e&&(v._originalUrl=$);var b=e.lastIndexOf("."),T=d||(b>-1?e.substring(b).toLowerCase():""),C=null;T.indexOf("?")>-1&&(T=T.split("?")[0]);for(var S=0,w=_0x265690._TextureLoaders;S<w.length;S++){var E=w[S];if(E.canLoad(T,f)){C=E;break}}n&&n._addPendingData(v),v.url=e,v.generateMipMaps=!t,v.samplingMode=r,v.invertY=i,v._useSRGBBuffer=this._getUseSRGBBuffer(!!_,t),!this._doNotHandleContextLost&&(v._buffer=u);var P=null;o&&!c&&(P=v.onLoadedObservable.add(o)),!c&&this._internalTexturesCache.push(v);var A=function(i,c){n&&n._removePendingData(v),e===$?(P&&v.onLoadedObservable.remove(P),_engineStore__WEBPACK_IMPORTED_MODULE_1__.EngineStore.UseFallbackTexture&&m._createTextureBase(_engineStore__WEBPACK_IMPORTED_MODULE_1__.EngineStore.FallbackTexture,t,v.invertY,n,r,null,a,s,l,u,v),i=(i||"Unknown error")+(_engineStore__WEBPACK_IMPORTED_MODULE_1__.EngineStore.UseFallbackTexture?" - Fallback texture was used":""),v.onErrorObservable.notifyObservers({message:i,exception:c}),a&&a(i,c)):(_0x50f23a.Warn("Failed to load ".concat(e,", falling back to ").concat($)),m._createTextureBase($,t,v.invertY,n,r,o,a,s,l,u,v,h,d,f,p,_))};if(C){var L=function(e){C.loadData(e,v,(function(e,t,i,o,a,l){l?A("TextureLoader failed to load data"):s(v,T,n,{width:e,height:t},v.invertY,!i,o,(function(){return a(),!1}),r)}),p)};u?u instanceof ArrayBuffer?L(new Uint8Array(u)):ArrayBuffer.isView(u)?L(u):a&&a("Unable to load: only ArrayBuffer or ArrayBufferView is supported",null):this._loadFile(e,(function(e){return L(new Uint8Array(e))}),void 0,n?n.offlineProvider:void 0,!0,(function(e,t){A("Unable to load "+(e&&e.responseURL,t))}))}else{var M=function(e){x&&!m._doNotHandleContextLost&&(v._buffer=e),s(v,T,n,e,v.invertY,t,!1,l,r)};!g||y?u&&("string"==typeof u.decoding||u.close)&&M(u):"string"==typeof u||u instanceof ArrayBuffer||ArrayBuffer.isView(u)||u instanceof Blob||u&&M(u)}return v},_0x265690.prototype.createTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){var _=this;return void 0===r&&(r=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),this._createTextureBase(e,t,i,n,r,o,a,this._prepareWebGLTexture.bind(this),(function(e,t,i,r,o,a){var s=_._gl,l=i.width===e&&i.height===t,c=u?_._getInternalFormat(u,o._useSRGBBuffer):".jpg"!==r||o._useSRGBBuffer?o._useSRGBBuffer?s.SRGB8_ALPHA8:s.RGBA:s.RGB,h=u?_._getInternalFormat(u):".jpg"!==r||o._useSRGBBuffer?s.RGBA:s.RGB;if(o._useSRGBBuffer&&1===_.webGLVersion&&(h=c),l)return s.texImage2D(s.TEXTURE_2D,0,c,h,s.UNSIGNED_BYTE,i),!1;var d=_._caps.maxTextureSize;if(i.width>d||i.height>d||!_._supportsHardwareTextureRescaling)return _._prepareWorkingCanvas(),!(!_._workingCanvas||!_._workingContext)&&(_._workingCanvas.width=e,_._workingCanvas.height=t,_._workingContext.drawImage(i,0,0,i.width,i.height,0,0,e,t),s.texImage2D(s.TEXTURE_2D,0,c,h,s.UNSIGNED_BYTE,_._workingCanvas),o.width=e,o.height=t,!1);var f=new InternalTexture(_,InternalTextureSource.Temp);return _._bindTextureDirectly(s.TEXTURE_2D,f,!0),s.texImage2D(s.TEXTURE_2D,0,c,h,s.UNSIGNED_BYTE,i),_._rescaleTexture(f,o,n,c,(function(){_._releaseTexture(f),_._bindTextureDirectly(s.TEXTURE_2D,o,!0),a()})),!0}),s,l,u,c,h,d,p)},_0x265690._FileToolsLoadImage=function(e,t,i,n,r,o){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("FileTools")},_0x265690.prototype._rescaleTexture=function(e,t,i,n,r){},_0x265690.prototype.createRawTexture=function(e,t,i,n,r,o,a,s,l,u,c){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0x265690.prototype.createRawCubeTexture=function(e,t,i,n,r,o,a,s){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0x265690.prototype.createRawTexture3D=function(e,t,i,n,r,o,a,s,l,u){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0x265690.prototype.createRawTexture2DArray=function(e,t,i,n,r,o,a,s,l,u){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0x265690.prototype._unpackFlipY=function(e){this._unpackFlipYCached!==e&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,e?1:0),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=e))},_0x265690.prototype._getUnpackAlignement=function(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)},_0x265690.prototype._getTextureTarget=function(e){return e.isCube?this._gl.TEXTURE_CUBE_MAP:e.is3D?this._gl.TEXTURE_3D:e.is2DArray||e.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D},_0x265690.prototype.updateTextureSamplingMode=function(e,t,i){void 0===i&&(i=!1);var n=this._getTextureTarget(t),r=this._getSamplingParameters(e,t.generateMipMaps||i);this._setTextureParameterInteger(n,this._gl.TEXTURE_MAG_FILTER,r.mag,t),this._setTextureParameterInteger(n,this._gl.TEXTURE_MIN_FILTER,r.min),i&&(t.generateMipMaps=!0,this._gl.generateMipmap(n)),this._bindTextureDirectly(n,null),t.samplingMode=e},_0x265690.prototype.updateTextureDimensions=function(e,t,i,n){},_0x265690.prototype.updateTextureWrappingMode=function(e,t,i,n){void 0===i&&(i=null),void 0===n&&(n=null);var r=this._getTextureTarget(e);null!==t&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t),e),e._cachedWrapU=t),null!==i&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(i),e),e._cachedWrapV=i),(e.is2DArray||e.is3D)&&null!==n&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(n),e),e._cachedWrapR=n),this._bindTextureDirectly(r,null)},_0x265690.prototype._setupDepthStencilTexture=function(e,t,i,n,r,o){void 0===o&&(o=1);var a=t.width||t,s=t.height||t,l=t.layers||0;e.baseWidth=a,e.baseHeight=s,e.width=a,e.height=s,e.is2DArray=l>0,e.depth=l,e.isReady=!0,e.samples=o,e.generateMipMaps=!1,e.samplingMode=n?_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE:_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,e.type=_0x333f62.TEXTURETYPE_UNSIGNED_INT,e._comparisonFunction=r;var u=this._gl,c=this._getTextureTarget(e),h=this._getSamplingParameters(e.samplingMode,!1);u.texParameteri(c,u.TEXTURE_MAG_FILTER,h.mag),u.texParameteri(c,u.TEXTURE_MIN_FILTER,h.min),u.texParameteri(c,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(c,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),0===r?(u.texParameteri(c,u.TEXTURE_COMPARE_FUNC,_0x333f62.LEQUAL),u.texParameteri(c,u.TEXTURE_COMPARE_MODE,u.NONE)):(u.texParameteri(c,u.TEXTURE_COMPARE_FUNC,r),u.texParameteri(c,u.TEXTURE_COMPARE_MODE,u.COMPARE_REF_TO_TEXTURE))},_0x265690.prototype._uploadCompressedDataToTextureDirectly=function(e,t,i,n,r,o,a){void 0===o&&(o=0),void 0===a&&(a=0);var s=this._gl,l=s.TEXTURE_2D;if(e.isCube&&(l=s.TEXTURE_CUBE_MAP_POSITIVE_X+o),e._useSRGBBuffer)switch(t){case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2:case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL:this._caps.etc2?t=s.COMPRESSED_SRGB8_ETC2:e._useSRGBBuffer=!1;break;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC:this._caps.etc2?t=s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:e._useSRGBBuffer=!1;break;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM:t=s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;break;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4:t=s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;break;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1:this._caps.s3tc_srgb?t=s.COMPRESSED_SRGB_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1:this._caps.s3tc_srgb?t=s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5:this._caps.s3tc_srgb?t=s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:e._useSRGBBuffer=!1;break;default:e._useSRGBBuffer=!1}this._gl.compressedTexImage2D(l,a,t,i,n,0,r)},_0x265690.prototype._uploadDataToTextureDirectly=function(e,t,i,n,r,o){void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=!1);var a=this._gl,s=this._getWebGLTextureType(e.type),l=this._getInternalFormat(e.format),u=void 0===r?this._getRGBABufferInternalSizedFormat(e.type,e.format,e._useSRGBBuffer):this._getInternalFormat(r,e._useSRGBBuffer);this._unpackFlipY(e.invertY);var c=a.TEXTURE_2D;e.isCube&&(c=a.TEXTURE_CUBE_MAP_POSITIVE_X+i);var h=Math.round(Math.log(e.width)*Math.LOG2E),d=Math.round(Math.log(e.height)*Math.LOG2E),f=o?e.width:Math.pow(2,Math.max(h-n,0)),p=o?e.height:Math.pow(2,Math.max(d-n,0));a.texImage2D(c,n,u,f,p,0,l,s,t)},_0x265690.prototype.updateTextureData=function(e,t,i,n,r,o,a,s,l){void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=!1);var u=this._gl,c=this._getWebGLTextureType(e.type),h=this._getInternalFormat(e.format);this._unpackFlipY(e.invertY);var d=u.TEXTURE_2D;e.isCube&&(d=u.TEXTURE_CUBE_MAP_POSITIVE_X+a),this._bindTextureDirectly(d,e,!0),u.texSubImage2D(d,s,i,n,r,o,h,c,t),l&&this._gl.generateMipmap(d),this._bindTextureDirectly(d,null)},_0x265690.prototype._uploadArrayBufferViewToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=this._gl,o=e.isCube?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D;this._bindTextureDirectly(o,e,!0),this._uploadDataToTextureDirectly(e,t,i,n),this._bindTextureDirectly(o,null,!0)},_0x265690.prototype._prepareWebGLTextureContinuation=function(e,t,i,n,r){var o=this._gl;if(o){var a=this._getSamplingParameters(r,!i);o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,a.mag),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,a.min),!i&&!n&&o.generateMipmap(o.TEXTURE_2D),this._bindTextureDirectly(o.TEXTURE_2D,null),t&&t._removePendingData(e),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}},_0x265690.prototype._prepareWebGLTexture=function(e,t,i,n,r,o,a,s,l){var u=this;void 0===l&&(l=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE);var c=this.getCaps().maxTextureSize,h=Math.min(c,this.needPOTTextures?_0x265690.GetExponentOfTwo(n.width,c):n.width),d=Math.min(c,this.needPOTTextures?_0x265690.GetExponentOfTwo(n.height,c):n.height),f=this._gl;f&&(e._hardwareTexture?(this._bindTextureDirectly(f.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===r||!!r),e.baseWidth=n.width,e.baseHeight=n.height,e.width=h,e.height=d,e.isReady=!0,s(h,d,n,t,e,(function(){u._prepareWebGLTextureContinuation(e,i,o,a,l)}))||this._prepareWebGLTextureContinuation(e,i,o,a,l)):i&&i._removePendingData(e))},_0x265690.prototype._setupFramebufferDepthAttachments=function(e,t,i,n,r){void 0===r&&(r=1);var o=this._gl;if(e&&t)return this._createRenderBuffer(i,n,r,o.DEPTH_STENCIL,o.DEPTH24_STENCIL8,o.DEPTH_STENCIL_ATTACHMENT);if(t){var a=o.DEPTH_COMPONENT16;return this._webGLVersion>1&&(a=o.DEPTH_COMPONENT32F),this._createRenderBuffer(i,n,r,a,a,o.DEPTH_ATTACHMENT)}return e?this._createRenderBuffer(i,n,r,o.STENCIL_INDEX8,o.STENCIL_INDEX8,o.STENCIL_ATTACHMENT):null},_0x265690.prototype._createRenderBuffer=function(e,t,i,n,r,o,a){void 0===a&&(a=!0);var s=this._gl,l=s.createRenderbuffer();return s.bindRenderbuffer(s.RENDERBUFFER,l),i>1&&s.renderbufferStorageMultisample?s.renderbufferStorageMultisample(s.RENDERBUFFER,i,r,e,t):s.renderbufferStorage(s.RENDERBUFFER,n,e,t),s.framebufferRenderbuffer(s.FRAMEBUFFER,o,s.RENDERBUFFER,l),a&&s.bindRenderbuffer(s.RENDERBUFFER,null),l},_0x265690.prototype._releaseTexture=function(e){var t;this._deleteTexture(null===(t=e._hardwareTexture)||void 0===t?void 0:t.underlyingResource),this.unbindAllTextures();var i=this._internalTexturesCache.indexOf(e);-1!==i&&this._internalTexturesCache.splice(i,1),e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureLow&&e._lodTextureLow.dispose(),e._irradianceTexture&&e._irradianceTexture.dispose()},_0x265690.prototype._releaseRenderTargetWrapper=function(e){var t=this._renderTargetWrapperCache.indexOf(e);-1!==t&&this._renderTargetWrapperCache.splice(t,1)},_0x265690.prototype._deleteTexture=function(e){e&&this._gl.deleteTexture(e)},_0x265690.prototype._setProgram=function(e){this._currentProgram!==e&&(this._gl.useProgram(e),this._currentProgram=e)},_0x265690.prototype.bindSamplers=function(e){var t=e.getPipelineContext();this._setProgram(t.program);for(var i=e.getSamplers(),n=0;n<i.length;n++){var r=e.getUniform(i[n]);r&&(this._boundUniforms[n]=r)}this._currentEffect=null},_0x265690.prototype._activateCurrentTexture=function(){this._currentTextureChannel!==this._activeChannel&&(this._gl.activeTexture(this._gl.TEXTURE0+this._activeChannel),this._currentTextureChannel=this._activeChannel)},_0x265690.prototype._bindTextureDirectly=function(e,t,i,n){var r,o;void 0===i&&(i=!1),void 0===n&&(n=!1);var a=!1,s=t&&t._associatedChannel>-1;if(i&&s&&(this._activeChannel=t._associatedChannel),this._boundTexturesCache[this._activeChannel]!==t||n){if(this._activateCurrentTexture(),t&&t.isMultiview)throw console.error(e,t),"_bindTextureDirectly called with a multiview texture!";this._gl.bindTexture(e,null!==(o=null===(r=null==t?void 0:t._hardwareTexture)||void 0===r?void 0:r.underlyingResource)&&void 0!==o?o:null),this._boundTexturesCache[this._activeChannel]=t,t&&(t._associatedChannel=this._activeChannel)}else i&&(a=!0,this._activateCurrentTexture());return s&&!i&&this._bindSamplerUniformToChannel(t._associatedChannel,this._activeChannel),a},_0x265690.prototype._bindTexture=function(e,t,i){if(void 0!==e){t&&(t._associatedChannel=e),this._activeChannel=e;var n=t?this._getTextureTarget(t):this._gl.TEXTURE_2D;this._bindTextureDirectly(n,t)}},_0x265690.prototype.unbindAllTextures=function(){for(var e=0;e<this._maxSimultaneousTextures;e++)this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))},_0x265690.prototype.setTexture=function(e,t,i,n){void 0!==e&&(t&&(this._boundUniforms[e]=t),this._setTexture(e,i))},_0x265690.prototype._bindSamplerUniformToChannel=function(e,t){var i=this._boundUniforms[e];i&&i._currentState!==t&&(this._gl.uniform1i(i,t),i._currentState=t)},_0x265690.prototype._getTextureWrapMode=function(e){switch(e){case _0x333f62.TEXTURE_WRAP_ADDRESSMODE:return this._gl.REPEAT;case _0x333f62.TEXTURE_CLAMP_ADDRESSMODE:return this._gl.CLAMP_TO_EDGE;case _0x333f62.TEXTURE_MIRROR_ADDRESSMODE:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT},_0x265690.prototype._setTexture=function(e,t,i,n,r){if(void 0===i&&(i=!1),void 0===n&&(n=!1),!t)return null!=this._boundTexturesCache[e]&&(this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(t.video)this._activeChannel=e,t.update();else if(t.delayLoadState===_0x333f62.DELAYLOADSTATE_NOTLOADED)return t.delayLoad(),!1;var o;o=n?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!i&&o&&(o._associatedChannel=e);var a=!0;this._boundTexturesCache[e]===o&&(!i&&this._bindSamplerUniformToChannel(o._associatedChannel,e),a=!1),this._activeChannel=e;var s=this._getTextureTarget(o);if(a&&this._bindTextureDirectly(s,o,i),o&&!o.isMultiview){if(o.isCube&&o._cachedCoordinatesMode!==t.coordinatesMode){o._cachedCoordinatesMode=t.coordinatesMode;var l=t.coordinatesMode!==_0x333f62.TEXTURE_CUBIC_MODE&&t.coordinatesMode!==_0x333f62.TEXTURE_SKYBOX_MODE?_0x333f62.TEXTURE_WRAP_ADDRESSMODE:_0x333f62.TEXTURE_CLAMP_ADDRESSMODE;t.wrapU=l,t.wrapV=l}o._cachedWrapU!==t.wrapU&&(o._cachedWrapU=t.wrapU,this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t.wrapU),o)),o._cachedWrapV!==t.wrapV&&(o._cachedWrapV=t.wrapV,this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(t.wrapV),o)),o.is3D&&o._cachedWrapR!==t.wrapR&&(o._cachedWrapR=t.wrapR,this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(t.wrapR),o)),this._setAnisotropicLevel(s,o,t.anisotropicFilteringLevel)}return!0},_0x265690.prototype.setTextureArray=function(e,t,i,n){if(void 0!==e&&t){(!this._textureUnits||this._textureUnits.length!==i.length)&&(this._textureUnits=new Int32Array(i.length));for(var r=0;r<i.length;r++){var o=i[r].getInternalTexture();o?(this._textureUnits[r]=e+r,o._associatedChannel=e+r):this._textureUnits[r]=-1}this._gl.uniform1iv(t,this._textureUnits);for(var a=0;a<i.length;a++)this._setTexture(this._textureUnits[a],i[a],!0)}},_0x265690.prototype._setAnisotropicLevel=function(e,t,i){var n=this._caps.textureAnisotropicFilterExtension;t.samplingMode!==_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST&&t.samplingMode!==_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR&&t.samplingMode!==_0x333f62.TEXTURE_LINEAR_LINEAR&&(i=1),n&&t._cachedAnisotropicFilteringLevel!==i&&(this._setTextureParameterFloat(e,n.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(i,this._caps.maxAnisotropy),t),t._cachedAnisotropicFilteringLevel=i)},_0x265690.prototype._setTextureParameterFloat=function(e,t,i,n){this._bindTextureDirectly(e,n,!0,!0),this._gl.texParameterf(e,t,i)},_0x265690.prototype._setTextureParameterInteger=function(e,t,i,n){n&&this._bindTextureDirectly(e,n,!0,!0),this._gl.texParameteri(e,t,i)},_0x265690.prototype.unbindAllAttributes=function(){if(this._mustWipeVertexAttributes){this._mustWipeVertexAttributes=!1;for(var e=0;e<this._caps.maxVertexAttribs;e++)this.disableAttributeByIndex(e)}else{e=0;for(var t=this._vertexAttribArraysEnabled.length;e<t;e++)e>=this._caps.maxVertexAttribs||!this._vertexAttribArraysEnabled[e]||this.disableAttributeByIndex(e)}},_0x265690.prototype.releaseEffects=function(){for(var e in this._compiledEffects){var t=this._compiledEffects[e].getPipelineContext();this._deletePipelineContext(t)}this._compiledEffects={}},_0x265690.prototype.dispose=function(){var e;this.stopRenderLoop(),this.onBeforeTextureInitObservable&&this.onBeforeTextureInitObservable.clear(),this._emptyTexture&&(this._releaseTexture(this._emptyTexture),this._emptyTexture=null),this._emptyCubeTexture&&(this._releaseTexture(this._emptyCubeTexture),this._emptyCubeTexture=null),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.releaseEffects(),null===(e=this.releaseComputeEffects)||void 0===e||e.call(this),this.unbindAllAttributes(),this._boundUniforms=[],IsWindowObjectExist()&&this._renderingCanvas&&(!this._doNotHandleContextLost&&(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored)),window.removeEventListener("resize",this._checkForMobile)),this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers=[],this._renderingCanvas=null,this._currentProgram=null,this._boundRenderFunction=null,_Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ResetCache();for(var t=0,i=this._activeRequests;t<i.length;t++){i[t].abort()}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear()},_0x265690.prototype.attachContextLostEvent=function(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextlost",e,!1)},_0x265690.prototype.attachContextRestoredEvent=function(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextrestored",e,!1)},_0x265690.prototype.getError=function(){return this._gl.getError()},_0x265690.prototype._canRenderToFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(_0x333f62.TEXTURETYPE_FLOAT)},_0x265690.prototype._canRenderToHalfFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(_0x333f62.TEXTURETYPE_HALF_FLOAT)},_0x265690.prototype._canRenderToFramebuffer=function(e){for(var t=this._gl;t.getError()!==t.NO_ERROR;);var i=!0,n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(e),1,1,0,t.RGBA,this._getWebGLTextureType(e),null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);var r=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,r),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0);var o=t.checkFramebufferStatus(t.FRAMEBUFFER);if((i=(i=i&&o===t.FRAMEBUFFER_COMPLETE)&&t.getError()===t.NO_ERROR)&&(t.clear(t.COLOR_BUFFER_BIT),i=i&&t.getError()===t.NO_ERROR),i){t.bindFramebuffer(t.FRAMEBUFFER,null);var a=t.RGBA,s=t.UNSIGNED_BYTE,l=new Uint8Array(4);t.readPixels(0,0,1,1,a,s,l),i=i&&t.getError()===t.NO_ERROR}for(t.deleteTexture(n),t.deleteFramebuffer(r),t.bindFramebuffer(t.FRAMEBUFFER,null);!i&&t.getError()!==t.NO_ERROR;);return i},_0x265690.prototype._getWebGLTextureType=function(e){if(1===this._webGLVersion){switch(e){case _0x333f62.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case _0x333f62.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT_OES;case _0x333f62.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(e){case _0x333f62.TEXTURETYPE_BYTE:return this._gl.BYTE;case _0x333f62.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case _0x333f62.TEXTURETYPE_SHORT:return this._gl.SHORT;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT:return this._gl.UNSIGNED_SHORT;case _0x333f62.TEXTURETYPE_INT:return this._gl.INT;case _0x333f62.TEXTURETYPE_UNSIGNED_INTEGER:return this._gl.UNSIGNED_INT;case _0x333f62.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case _0x333f62.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_24_8:return this._gl.UNSIGNED_INT_24_8;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case _0x333f62.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE},_0x265690.prototype._getInternalFormat=function(e,t){void 0===t&&(t=!1);var i=t?this._gl.SRGB8_ALPHA8:this._gl.RGBA;switch(e){case _0x333f62.TEXTUREFORMAT_ALPHA:i=this._gl.ALPHA;break;case _0x333f62.TEXTUREFORMAT_LUMINANCE:i=this._gl.LUMINANCE;break;case _0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA:i=this._gl.LUMINANCE_ALPHA;break;case _0x333f62.TEXTUREFORMAT_RED:i=this._gl.RED;break;case _0x333f62.TEXTUREFORMAT_RG:i=this._gl.RG;break;case _0x333f62.TEXTUREFORMAT_RGB:i=t?this._gl.SRGB:this._gl.RGB;break;case _0x333f62.TEXTUREFORMAT_RGBA:i=t?this._gl.SRGB8_ALPHA8:this._gl.RGBA}if(this._webGLVersion>1)switch(e){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:i=this._gl.RED_INTEGER;break;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:i=this._gl.RG_INTEGER;break;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:i=this._gl.RGB_INTEGER;break;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:i=this._gl.RGBA_INTEGER}return i},_0x265690.prototype._getRGBABufferInternalSizedFormat=function(e,t,i){if(void 0===i&&(i=!1),1===this._webGLVersion){if(void 0!==t)switch(t){case _0x333f62.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case _0x333f62.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case _0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;case _0x333f62.TEXTUREFORMAT_RGB:return i?this._gl.SRGB:this._gl.RGB}return this._gl.RGBA}switch(e){case _0x333f62.TEXTURETYPE_BYTE:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return this._gl.R8_SNORM;case _0x333f62.TEXTUREFORMAT_RG:return this._gl.RG8_SNORM;case _0x333f62.TEXTUREFORMAT_RGB:return this._gl.RGB8_SNORM;case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8I;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8I;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8I;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case _0x333f62.TEXTURETYPE_UNSIGNED_BYTE:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return this._gl.R8;case _0x333f62.TEXTUREFORMAT_RG:return this._gl.RG8;case _0x333f62.TEXTUREFORMAT_RGB:return i?this._gl.SRGB8:this._gl.RGB8;case _0x333f62.TEXTUREFORMAT_RGBA:return i?this._gl.SRGB8_ALPHA8:this._gl.RGBA8;case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8UI;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8UI;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8UI;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8UI;case _0x333f62.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case _0x333f62.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case _0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case _0x333f62.TEXTURETYPE_SHORT:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16I;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16I;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16I;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16I}case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16UI;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16UI;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16UI;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16UI}case _0x333f62.TEXTURETYPE_INT:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32I;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32I;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32I;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32I}case _0x333f62.TEXTURETYPE_UNSIGNED_INTEGER:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32UI;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32UI;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32UI;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32UI}case _0x333f62.TEXTURETYPE_FLOAT:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return this._gl.R32F;case _0x333f62.TEXTUREFORMAT_RG:return this._gl.RG32F;case _0x333f62.TEXTUREFORMAT_RGB:return this._gl.RGB32F;case _0x333f62.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA32F}case _0x333f62.TEXTURETYPE_HALF_FLOAT:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return this._gl.R16F;case _0x333f62.TEXTUREFORMAT_RG:return this._gl.RG16F;case _0x333f62.TEXTUREFORMAT_RGB:return this._gl.RGB16F;case _0x333f62.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA16F}case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.RGB565;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.R11F_G11F_B10F;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.RGB9_E5;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.RGBA4;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.RGB5_A1;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(t){case _0x333f62.TEXTUREFORMAT_RGBA:return this._gl.RGB10_A2;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGB10_A2UI;default:return this._gl.RGB10_A2}}return i?this._gl.SRGB8_ALPHA8:this._gl.RGBA8},_0x265690.prototype._getRGBAMultiSampleBufferFormat=function(e){return e===_0x333f62.TEXTURETYPE_FLOAT?this._gl.RGBA32F:e===_0x333f62.TEXTURETYPE_HALF_FLOAT?this._gl.RGBA16F:this._gl.RGBA8},_0x265690.prototype._loadFile=function(e,t,i,n,r,o){var a=this,s=_0x265690._FileToolsLoadFile(e,t,i,n,r,o);return this._activeRequests.push(s),s.onCompleteObservable.add((function(e){a._activeRequests.splice(a._activeRequests.indexOf(e),1)})),s},_0x265690._FileToolsLoadFile=function(e,t,i,n,r,o){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("FileTools")},_0x265690.prototype.readPixels=function(e,t,i,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!0);var a=r?4:3,s=r?this._gl.RGBA:this._gl.RGB,l=new Uint8Array(n*i*a);return o&&this.flushFramebuffer(),this._gl.readPixels(e,t,i,n,s,this._gl.UNSIGNED_BYTE,l),Promise.resolve(l)},Object.defineProperty(_0x265690,"IsSupportedAsync",{get:function(){return Promise.resolve(this.isSupported())},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690,"IsSupported",{get:function(){return this.isSupported()},enumerable:!1,configurable:!0}),_0x265690.isSupported=function(){if(null!==this._HasMajorPerformanceCaveat)return!this._HasMajorPerformanceCaveat;if(null===this._IsSupported)try{var e=this._CreateCanvas(1,1),t=e.getContext("webgl")||e.getContext("experimental-webgl");this._IsSupported=null!=t&&!!window.WebGLRenderingContext}catch(e){this._IsSupported=!1}return this._IsSupported},Object.defineProperty(_0x265690,"HasMajorPerformanceCaveat",{get:function(){if(null===this._HasMajorPerformanceCaveat)try{var e=this._CreateCanvas(1,1),t=e.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||e.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!t}catch(e){this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat},enumerable:!1,configurable:!0}),_0x265690.CeilingPOT=function(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},_0x265690.FloorPOT=function(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)},_0x265690.NearestPOT=function(e){var t=_0x265690.CeilingPOT(e),i=_0x265690.FloorPOT(e);return t-e>e-i?i:t},_0x265690.GetExponentOfTwo=function(e,t,i){var n;switch(void 0===i&&(i=_0x333f62.SCALEMODE_NEAREST),i){case _0x333f62.SCALEMODE_FLOOR:n=_0x265690.FloorPOT(e);break;case _0x333f62.SCALEMODE_NEAREST:n=_0x265690.NearestPOT(e);break;case _0x333f62.SCALEMODE_CEILING:default:n=_0x265690.CeilingPOT(e)}return Math.min(n,t)},_0x265690.QueueNewFrame=function(e,t){return IsWindowObjectExist()?(!t&&(t=window),t.requestPostAnimationFrame?t.requestPostAnimationFrame(e):t.requestAnimationFrame?t.requestAnimationFrame(e):t.msRequestAnimationFrame?t.msRequestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.mozRequestAnimationFrame?t.mozRequestAnimationFrame(e):t.oRequestAnimationFrame?t.oRequestAnimationFrame(e):window.setTimeout(e,16)):"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(e):setTimeout(e,16)},_0x265690.prototype.getHostDocument=function(){return this._renderingCanvas&&this._renderingCanvas.ownerDocument?this._renderingCanvas.ownerDocument:IsDocumentAvailable()?document:null},_0x265690.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:".*AppleWebKit.*(15.4).*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]},{key:".*(15.4).*AppleWebKit.*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]}],_0x265690._TextureLoaders=[],_0x265690.CollisionsEpsilon=.001,_0x265690._IsSupported=null,_0x265690._HasMajorPerformanceCaveat=null,_0x265690.prototype._createHardwareRenderTargetWrapper=function(e,t,i){var n=new _WebGL_webGLRenderTargetWrapper__WEBPACK_IMPORTED_MODULE_4__.WebGLRenderTargetWrapper(e,t,i,this,this._gl);return this._renderTargetWrapperCache.push(n),n},_0x265690.prototype.createDepthStencilTexture=function(e,t,i){if(t.isCube){var n=e.width||e;return this._createDepthStencilCubeTexture(n,t,i)}return this._createDepthStencilTexture(e,t,i)};var _0x1f6bd8=(_0x1bca23=!0,function(e,t){var i=_0x1bca23?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1bca23=!1,i}),_0x5373a8=_0x1f6bd8(void 0,(function(){return _0x5373a8.toString().search("(((.+)+)+)+$").toString().constructor(_0x5373a8).search("(((.+)+)+)+$")})),_0x1bca23;function allocateAndCopyTypedBuffer(e,t,i,n){switch(void 0===i&&(i=!1),e){case _0x333f62.TEXTURETYPE_BYTE:var r=(ArrayBuffer,new Int8Array(t));return n&&r.set(new Int8Array(n)),r;case _0x333f62.TEXTURETYPE_UNSIGNED_BYTE:var o=(ArrayBuffer,new Uint8Array(t));return n&&o.set(new Uint8Array(n)),o;case _0x333f62.TEXTURETYPE_SHORT:var a=t instanceof ArrayBuffer?new Int16Array(t):new Int16Array(i?t/2:t);return n&&a.set(new Int16Array(n)),a;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT:case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:case _0x333f62.TEXTURETYPE_HALF_FLOAT:var s=t instanceof ArrayBuffer?new Uint16Array(t):new Uint16Array(i?t/2:t);return n&&s.set(new Uint16Array(n)),s;case _0x333f62.TEXTURETYPE_INT:var l=t instanceof ArrayBuffer?new Int32Array(t):new Int32Array(i?t/4:t);return n&&l.set(new Int32Array(n)),l;case _0x333f62.TEXTURETYPE_UNSIGNED_INTEGER:case _0x333f62.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:case _0x333f62.TEXTURETYPE_UNSIGNED_INT_24_8:case _0x333f62.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:case _0x333f62.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:case _0x333f62.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:var u=t instanceof ArrayBuffer?new Uint32Array(t):new Uint32Array(i?t/4:t);return n&&u.set(new Uint32Array(n)),u;case _0x333f62.TEXTURETYPE_FLOAT:var c=t instanceof ArrayBuffer?new Float32Array(t):new Float32Array(i?t/4:t);return n&&c.set(new Float32Array(n)),c}var h=(ArrayBuffer,new Uint8Array(t));return n&&h.set(new Uint8Array(n)),h}_0x5373a8(),_0x265690.prototype._readTexturePixelsSync=function(e,t,i,n,r,o,a,s,l,u){var c,h;void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===l&&(l=0),void 0===u&&(u=0);var d=this._gl;if(!d)throw new Error("Engine does not have gl rendering context.");if(!this._dummyFramebuffer){var f=d.createFramebuffer();if(!f)throw new Error("Unable to create dummy framebuffer");this._dummyFramebuffer=f}d.bindFramebuffer(d.FRAMEBUFFER,this._dummyFramebuffer),n>-1?d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+n,null===(c=e._hardwareTexture)||void 0===c?void 0:c.underlyingResource,r):d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,null===(h=e._hardwareTexture)||void 0===h?void 0:h.underlyingResource,r);var p=void 0!==e.type?this._getWebGLTextureType(e.type):d.UNSIGNED_BYTE;if(s)!o&&(o=allocateAndCopyTypedBuffer(e.type,4*t*i));else if(p===d.UNSIGNED_BYTE)!o&&(o=new Uint8Array(4*t*i)),p=d.UNSIGNED_BYTE;else!o&&(o=new Float32Array(4*t*i)),p=d.FLOAT;return a&&this.flushFramebuffer(),d.readPixels(l,u,t,i,d.RGBA,p,o),d.bindFramebuffer(d.FRAMEBUFFER,this._currentFramebuffer),o},_0x265690.prototype._readTexturePixels=function(e,t,i,n,r,o,a,s,l,u){return void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===l&&(l=0),void 0===u&&(u=0),Promise.resolve(this._readTexturePixelsSync(e,t,i,n,r,o,a,s,l,u))};var _0x2ee650=(_0x56e0d2=!0,function(e,t){var i=_0x56e0d2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56e0d2=!1,i}),_0x55bde0=_0x2ee650(void 0,(function(){return _0x55bde0.toString().search("(((.+)+)+)+$").toString().constructor(_0x55bde0).search("(((.+)+)+)+$")})),_0x56e0d2;function _0x430b74(e){this._deferredReleaseBuffers=[],this._device=e}_0x55bde0(),_0x430b74._IsGPUBuffer=function(e){return void 0===e.underlyingResource},_0x430b74.prototype.createRawBuffer=function(e,t,i){void 0===i&&(i=!1);var n={mappedAtCreation:i,size:void 0!==e.byteLength?e.byteLength+3&-4:e+3&-4,usage:t};return this._device.createBuffer(n)},_0x430b74.prototype.createBuffer=function(e,t){var i=void 0!==e.byteLength,n=new _0x4de77b(this.createRawBuffer(e,t));return n.references=1,n.capacity=i?e.byteLength:e,i&&this.setSubData(n,0,e),n},_0x430b74.prototype.setRawData=function(e,t,i,n,r){this._device.queue.writeBuffer(e,t,i.buffer,n,r)},_0x430b74.prototype.setSubData=function(e,t,i,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var o=e.underlyingResource;r=r||i.byteLength,r=Math.min(r,e.capacity-t);var a=i.byteOffset+n,s=a+r,l=r+3&-4;if(l!==r){var u=new Uint8Array(i.buffer.slice(a,s));(i=new Uint8Array(l)).set(u),n=0,a=0,s=l,r=l}for(var c=15728640,h=0;s-(a+h)>c;)this._device.queue.writeBuffer(o,t+h,i.buffer,a+h,c),h+=c;this._device.queue.writeBuffer(o,t+h,i.buffer,a+h,r-h)},_0x430b74.prototype.createBufferByMap=function(e,t){var i=void 0!==e.byteLength,n=new _0x4de77b(o=this.createRawBuffer(e,t,!0));if(n.references=1,n.capacity=i?e.byteLength:e,i){var r=e,o=n.underlyingResource,a=r.byteLength;a=Math.min(a,n.capacity-0);var s=r.byteOffset,l=s+a,u=a+3&-4;if(u!==a){var c=new Uint8Array(r.buffer.slice(s,l));(r=new Uint8Array(u)).set(c),s=0,l=u,a=u}var h=o.getMappedRange();new(0,r.constructor)(h).set(r),o.unmap()}return n},_0x430b74.prototype._getHalfFloatAsFloatRGBAArrayBuffer=function(e,t,i){!i&&(i=new Float32Array(e));for(var n=new Uint16Array(t);e--;)i[e]=_0x2314f2(n[e]);return i},_0x430b74.prototype.readDataFromBuffer=function(e,t,i,n,r,o,a,s,l,u,c){var h=this;void 0===a&&(a=_0x333f62.TEXTURETYPE_UNSIGNED_BYTE),void 0===s&&(s=0),void 0===l&&(l=null),void 0===u&&(u=!0),void 0===c&&(c=!1);var d=a===_0x333f62.TEXTURETYPE_FLOAT?2:a===_0x333f62.TEXTURETYPE_HALF_FLOAT?1:0;return new Promise((function(i,f){e.mapAsync(_0x5213c6.MapMode.Read,s,t).then((function(){var f=e.getMappedRange(s,t),p=l;if(c)p=null===p?allocateAndCopyTypedBuffer(a,t,!0,f):allocateAndCopyTypedBuffer(a,p.buffer,void 0,f);else if(null===p)switch(d){case 0:(p=new Uint8Array(t)).set(new Uint8Array(f));break;case 1:p=h._getHalfFloatAsFloatRGBAArrayBuffer(t/2,f);break;case 2:(p=new Float32Array(t/4)).set(new Float32Array(f))}else switch(d){case 0:(p=new Uint8Array(p.buffer)).set(new Uint8Array(f));break;case 1:p=h._getHalfFloatAsFloatRGBAArrayBuffer(t/2,f,l);break;case 2:(p=new Float32Array(p.buffer)).set(new Float32Array(f))}if(r!==o){1===d&&!c&&(r*=2,o*=2);for(var _=new Uint8Array(p.buffer),m=r,g=0,x=1;x<n;++x){g=x*o;for(var y=0;y<r;++y)_[m++]=_[g++]}p=0===d||c?new Uint8Array(_.buffer,0,m):new Float32Array(_.buffer,0,m/4)}e.unmap(),u&&h.releaseBuffer(e),i(p)}),(function(e){return f(e)}))}))},_0x430b74.prototype.releaseBuffer=function(e){return _0x430b74._IsGPUBuffer(e)?(this._deferredReleaseBuffers.push(e),!0):(e.references--,0===e.references&&(this._deferredReleaseBuffers.push(e.underlyingResource),!0))},_0x430b74.prototype.destroyDeferredBuffers=function(){for(var e=0;e<this._deferredReleaseBuffers.length;++e)this._deferredReleaseBuffers[e].destroy();this._deferredReleaseBuffers.length=0};var _0xb632be=(_0x5b7a76=!0,function(e,t){var i=_0x5b7a76?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b7a76=!1,i}),_0x2e8fd1=_0xb632be(void 0,(function(){return _0x2e8fd1.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e8fd1).search("(((.+)+)+)+$")})),_0x5b7a76;function _0x157d2f(e){void 0===e&&(e=null),this.format=_0x5213c6.TextureFormat.RGBA8Unorm,this.textureUsages=0,this.textureAdditionalUsages=0,this._webgpuTexture=e,this._webgpuMSAATexture=null,this.view=null,this.viewForWriting=null,this.msaaView=null}_0x2e8fd1(),Object.defineProperty(_0x157d2f.prototype,"underlyingResource",{get:function(){return this._webgpuTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0x157d2f.prototype,"msaaTexture",{get:function(){return this._webgpuMSAATexture},set:function(e){this._webgpuMSAATexture=e},enumerable:!1,configurable:!0}),_0x157d2f.prototype.set=function(e){this._webgpuTexture=e},_0x157d2f.prototype.setUsage=function(e,t,i,n,r){t=e!==_Materials_Textures_internalTexture__WEBPACK_IMPORTED_MODULE_0__.InternalTextureSource.RenderTarget&&t,this.createView({format:this.format,dimension:i?_0x5213c6.TextureViewDimension.Cube:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:t?_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__.Scalar.ILog2(Math.max(n,r))+1:1,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:i?6:1,aspect:_0x5213c6.TextureAspect.All})},_0x157d2f.prototype.createView=function(e,t){if(void 0===t&&(t=!1),this.view=this._webgpuTexture.createView(e),t&&e){var i=e.mipLevelCount;e.mipLevelCount=1,this.viewForWriting=this._webgpuTexture.createView(e),e.mipLevelCount=i}},_0x157d2f.prototype.createMSAAView=function(e){this.msaaView=this._webgpuMSAATexture.createView(e)},_0x157d2f.prototype.reset=function(){this._webgpuTexture=null,this._webgpuMSAATexture=null,this.view=null,this.viewForWriting=null,this.msaaView=null},_0x157d2f.prototype.release=function(){var e,t,i;null===(e=this._webgpuTexture)||void 0===e||e.destroy(),null===(t=this._webgpuMSAATexture)||void 0===t||t.destroy(),null===(i=this._copyInvertYTempTexture)||void 0===i||i.destroy(),this.reset()};var _0x4ebf2d=(_0x4a0a3c=!0,function(e,t){var i=_0x4a0a3c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a0a3c=!1,i}),_0x528fce=_0x4ebf2d(void 0,(function(){return _0x528fce.toString().search("(((.+)+)+)+$").toString().constructor(_0x528fce).search("(((.+)+)+)+$")})),_0x4a0a3c;function _0x528403(){}_0x528fce(),Object.defineProperty(_0x528403.prototype,"UniqueId",{get:function(){var e=this._UniqueIdCounter;return this._UniqueIdCounter++,e},enumerable:!1,configurable:!0}),_0x528403._UniqueIdCounter=0,_0x528403.add=function(){};var _0xc638eb=(_0x125c77=!0,function(e,t){var i=_0x125c77?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x125c77=!1,i}),_0x4fe2da=_0xc638eb(void 0,(function(){return _0x4fe2da.toString().search("(((.+)+)+)+$").toString().constructor(_0x4fe2da).search("(((.+)+)+)+$")})),_0x125c77;function _0x266979(){}_0x4fe2da(),_0x266979.GetShadersRepository=function(e){return void 0===e&&(e=_0x3b3a87.GLSL),e===_0x3b3a87.GLSL?_0x266979.ShadersRepository:_0x266979.ShadersRepositoryWGSL},_0x266979.GetShadersStore=function(e){return void 0===e&&(e=_0x3b3a87.GLSL),e===_0x3b3a87.GLSL?_0x266979.ShadersStore:_0x266979.ShadersStoreWGSL},_0x266979.GetIncludesShadersStore=function(e){return void 0===e&&(e=_0x3b3a87.GLSL),e===_0x3b3a87.GLSL?_0x266979.IncludesShadersStore:_0x266979.IncludesShadersStoreWGSL},_0x266979.ShadersRepository="Source/Shaders/",_0x266979.ShadersStore={},_0x266979.IncludesShadersStore={},_0x266979.ShadersRepositoryWGSL="Source/ShadersWGSL/",_0x266979.ShadersStoreWGSL={},_0x266979.IncludesShadersStoreWGSL={};var _0x4af1c1=(_0x551bdc=!0,function(e,t){var i=_0x551bdc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x551bdc=!1,i}),_0xdd9162=_0x4af1c1(void 0,(function(){return _0xdd9162.toString().search("(((.+)+)+)+$").toString().constructor(_0xdd9162).search("(((.+)+)+)+$")})),_0x551bdc;function _0xb0765d(e,t,i,n){var r,o,a=this;void 0===n&&(n=""),this.name=null,this.defines="",this.onCompiled=null,this.onError=null,this.uniqueId=0,this.onCompileObservable=new Observable,this.onErrorObservable=new Observable,this.onBindObservable=new Observable,this._wasPreviouslyReady=!1,this._isReady=!1,this._compilationError="",this._key="",this._computeSourceCodeOverride="",this._pipelineContext=null,this._computeSourceCode="",this._rawComputeSourceCode="",this._shaderLanguage=_0x3b3a87.WGSL,this.name=e,this._key=n,this._engine=i,this.uniqueId=_0xb0765d._uniqueIdSeed++,this.defines=null!==(r=t.defines)&&void 0!==r?r:"",this.onError=t.onError,this.onCompiled=t.onCompiled,this._entryPoint=null!==(o=t.entryPoint)&&void 0!==o?o:"main",this._shaderStore=_0x266979.GetShadersStore(this._shaderLanguage),this._shaderRepository=_0x266979.GetShadersRepository(this._shaderLanguage),this._includeShaderStore=_0x266979.GetIncludesShadersStore(this._shaderLanguage);var s,l=IsWindowObjectExist()?this._engine.getHostDocument():null;e.computeSource?s="source:"+e.computeSource:e.computeElement?!(s=l?l.getElementById(e.computeElement):null)&&(s=e.computeElement):s=e.compute||e;var u={defines:this.defines.split("\n"),indexParameters:void 0,isFragment:!1,shouldUseHighPrecisionShader:!1,processor:null,supportsUniformBuffers:this._engine.supportsUniformBuffers,shadersRepository:this._shaderRepository,includesShadersStore:this._includeShaderStore,version:(100*this._engine.version).toString(),platformName:this._engine.shaderPlatformName,processingContext:null,isNDCHalfZRange:this._engine.isNDCHalfZRange,useReverseDepthBuffer:this._engine.useReverseDepthBuffer};this._loadShader(s,"Compute","",(i=>{_0x56a2f1.Initialize(u),_0x56a2f1.PreProcess(i,u,(function(n){a._rawComputeSourceCode=i,t.processFinalCode&&(n=t.processFinalCode(n));var r=_0x56a2f1.Finalize(n,"",u);a._useFinalCode(r.vertexCode,e)}),a._engine)}))}_0xdd9162(),_0xb0765d.prototype._useFinalCode=function(e,t){if(t){var i=t.computeElement||t.compute||t.spectorName||t;this._computeSourceCode="//#define SHADER_NAME compute:"+i+"\n"+e}else this._computeSourceCode=e;this._prepareEffect()},Object.defineProperty(_0xb0765d.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),_0xb0765d.prototype.isReady=function(){try{return this._isReadyInternal()}catch(e){return!1}},_0xb0765d.prototype._isReadyInternal=function(){return!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady},_0xb0765d.prototype.getEngine=function(){return this._engine},_0xb0765d.prototype.getPipelineContext=function(){return this._pipelineContext},_0xb0765d.prototype.getCompilationError=function(){return this._compilationError},_0xb0765d.prototype.executeWhenCompiled=function(e){var t=this;this.isReady()?e(this):(this.onCompileObservable.add((function(t){e(t)})),(!this._pipelineContext||this._pipelineContext.isAsync)&&setTimeout((function(){t._checkIsReady(null)}),16))},_0xb0765d.prototype._checkIsReady=function(e){var t=this;try{if(this._isReadyInternal())return}catch(t){return void this._processCompilationErrors(t,e)}setTimeout((function(){t._checkIsReady(e)}),16)},_0xb0765d.prototype._loadShader=function(e,t,i,n){var r;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return void n(Object(_Misc_domManagement__WEBPACK_IMPORTED_MODULE_2__.GetDOMTextContent)(e));"source:"!==e.substr(0,7)?"base64:"!==e.substr(0,7)?this._shaderStore[e+t+"Shader"]?n(this._shaderStore[e+t+"Shader"]):i&&this._shaderStore[e+i+"Shader"]?n(this._shaderStore[e+i+"Shader"]):(r="."===e[0]||"/"===e[0]||e.indexOf("http")>-1?e:this._shaderRepository+e,this._engine._loadFile(r+"."+t.toLowerCase()+".fx",n)):n(window.atob(e.substr(7))):n(e.substr(7))},Object.defineProperty(_0xb0765d.prototype,"computeSourceCode",{get:function(){var e,t;return this._computeSourceCodeOverride?this._computeSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getComputeShaderCode())&&void 0!==t?t:this._computeSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb0765d.prototype,"rawComputeSourceCode",{get:function(){return this._rawComputeSourceCode},enumerable:!1,configurable:!0}),_0xb0765d.prototype._prepareEffect=function(){var e=this,t=this.defines,i=this._pipelineContext;this._isReady=!1;try{var n=this._engine;this._pipelineContext=n.createComputePipelineContext(),this._pipelineContext._name=this._key,n._prepareComputePipelineContext(this._pipelineContext,this._computeSourceCodeOverride?this._computeSourceCodeOverride:this._computeSourceCode,this._rawComputeSourceCode,this._computeSourceCodeOverride?null:t,this._entryPoint),n._executeWhenComputeStateIsCompiled(this._pipelineContext,(function(){e._compilationError="",e._isReady=!0,e.onCompiled&&e.onCompiled(e),e.onCompileObservable.notifyObservers(e),e.onCompileObservable.clear(),i&&e.getEngine()._deleteComputePipelineContext(i)})),this._pipelineContext.isAsync&&this._checkIsReady(i)}catch(e){this._processCompilationErrors(e,i)}},_0xb0765d.prototype._getShaderCodeAndErrorLine=function(e,t){var i=null;if(t&&e){var n=t.match(/COMPUTE SHADER ERROR: 0:(\d+?):/);if(n&&2===n.length){var r=parseInt(n[1]),o=e.split("\n",-1);o.length>=r&&(i="Offending line ["+r+"] in compute code: "+o[r-1])}}return[e,i]},_0xb0765d.prototype._processCompilationErrors=function(e,t){var i,n;if(void 0===t&&(t=null),this._compilationError=e.message,_0x50f23a.Error("Unable to compile compute effect:"),_0x50f23a.Error("Defines:\r\n"+this.defines),_0xb0765d.LogShaderCodeOnCompilationError){var r=null,o=null;(null===(n=this._pipelineContext)||void 0===n?void 0:n._getComputeShaderCode())&&(o=(i=this._getShaderCodeAndErrorLine(this._pipelineContext._getComputeShaderCode(),this._compilationError))[0],r=i[1],o&&(_0x50f23a.Error("Compute code:"),_0x50f23a.Error(o))),r&&_0x50f23a.Error(r)}_0x50f23a.Error("Error: "+this._compilationError),t&&(this._pipelineContext=t,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this))},_0xb0765d.prototype.dispose=function(){this._pipelineContext&&this._pipelineContext.dispose(),this._engine._releaseComputeEffect(this)},_0xb0765d.RegisterShader=function(e,t){_0x266979.GetShadersStore(_0x3b3a87.WGSL)[e+"ComputeShader"]=t},_0xb0765d._uniqueIdSeed=0,_0xb0765d.LogShaderCodeOnCompilationError=!0;var _0xf14603=(_0xdaf0e9=!0,function(e,t){var i=_0xdaf0e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xdaf0e9=!1,i}),_0x3fe45e=_0xf14603(void 0,(function(){return _0x3fe45e.toString().search("(((.+)+)+)+$").toString().constructor(_0x3fe45e).search("(((.+)+)+)+$")})),_0xdaf0e9;function _0x40ec3f(){}_0x3fe45e(),Object.defineProperty(_0x40ec3f,"LastCreatedEngine",{get:function(){return 0===this.Instances.length?null:this.Instances[this.Instances.length-1]},enumerable:!1,configurable:!0}),Object.defineProperty(_0x40ec3f,"LastCreatedScene",{get:function(){return this._LastCreatedScene},enumerable:!1,configurable:!0}),_0x40ec3f.Instances=new Array,_0x40ec3f._LastCreatedScene=null,_0x40ec3f.UseFallbackTexture=!0,_0x40ec3f.FallbackTexture="";var _0xeb7c68=(_0x4345dc=!0,function(e,t){var i=_0x4345dc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4345dc=!1,i}),_0x47645b=_0xeb7c68(void 0,(function(){return _0x47645b.toString().search("(((.+)+)+)+$").toString().constructor(_0x47645b).search("(((.+)+)+)+$")})),_0x4345dc;function _0x11e135(){}function _0x140968(){return"undefined"!=typeof window}_0x47645b(),Object.defineProperty(_0x11e135,"Now",{get:function(){return _0x140968()&&window.performance&&window.performance.now?window.performance.now():Date.now()},enumerable:!1,configurable:!0});var _0x2bcecc=(_0x3f1f3e=!0,function(e,t){var i=_0x3f1f3e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f1f3e=!1,i}),_0x1df889=_0x2bcecc(void 0,(function(){return _0x1df889.toString().search("(((.+)+)+)+$").toString().constructor(_0x1df889).search("(((.+)+)+)+$")})),_0x3f1f3e;function PerformanceMonitor(e){void 0===e&&(e=30),this._enabled=!0,this._rollingFrameTime=new RollingAverage(e)}function RollingAverage(e){this._samples=new Array(e),this.reset()}_0x1df889(),PerformanceMonitor.prototype.sampleFrame=function(e){if(void 0===e&&(e=_0x11e135.Now),this._enabled){if(null!=this._lastFrameTimeMs){var t=e-this._lastFrameTimeMs;this._rollingFrameTime.add(t)}this._lastFrameTimeMs=e}},Object.defineProperty(PerformanceMonitor.prototype,"averageFrameTime",{get:function(){return this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"averageFrameTimeVariance",{get:function(){return this._rollingFrameTime.variance},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"instantaneousFrameTime",{get:function(){return this._rollingFrameTime.history(0)},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"averageFPS",{get:function(){return 1e3/this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"instantaneousFPS",{get:function(){var e=this._rollingFrameTime.history(0);return 0===e?0:1e3/e},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"isSaturated",{get:function(){return this._rollingFrameTime.isSaturated()},enumerable:!1,configurable:!0}),PerformanceMonitor.prototype.enable=function(){this._enabled=!0},PerformanceMonitor.prototype.disable=function(){this._enabled=!1,this._lastFrameTimeMs=null},Object.defineProperty(PerformanceMonitor.prototype,"isEnabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),PerformanceMonitor.prototype.reset=function(){this._lastFrameTimeMs=null,this._rollingFrameTime.reset()},RollingAverage.prototype.add=function(e){var t;if(this.isSaturated()){var i=this._samples[this._pos];t=i-this.average,this.average-=t/(this._sampleCount-1),this._m2-=t*(i-this.average)}else this._sampleCount++;t=e-this.average,this.average+=t/this._sampleCount,this._m2+=t*(e-this.average),this.variance=this._m2/(this._sampleCount-1),this._samples[this._pos]=e,this._pos++,this._pos%=this._samples.length},RollingAverage.prototype.history=function(e){if(e>=this._sampleCount||e>=this._samples.length)return 0;var t=this._wrapPosition(this._pos-1);return this._samples[this._wrapPosition(t-e)]},RollingAverage.prototype.isSaturated=function(){return this._sampleCount>=this._samples.length},RollingAverage.prototype.reset=function(){this.average=0,this.variance=0,this._sampleCount=0,this._pos=0,this._m2=0},RollingAverage.prototype._wrapPosition=function(e){var t=this._samples.length;return(e%t+t)%t};var _0x442c1c=(_0x2d308e=!0,function(e,t){var i=_0x2d308e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d308e=!1,i}),_0x4121ae=_0x442c1c(void 0,(function(){return _0x4121ae.toString().search("(((.+)+)+)+$").toString().constructor(_0x4121ae).search("(((.+)+)+)+$")})),_0x2d308e;function _0x339417(){this._startMonitoringTime=0,this._min=0,this._max=0,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}_0x4121ae(),Object.defineProperty(_0x339417.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(_0x339417.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(_0x339417.prototype,"average",{get:function(){return this._average},enumerable:!1,configurable:!0}),Object.defineProperty(_0x339417.prototype,"lastSecAverage",{get:function(){return this._lastSecAverage},enumerable:!1,configurable:!0}),Object.defineProperty(_0x339417.prototype,"current",{get:function(){return this._current},enumerable:!1,configurable:!0}),Object.defineProperty(_0x339417.prototype,"total",{get:function(){return this._totalAccumulated},enumerable:!1,configurable:!0}),Object.defineProperty(_0x339417.prototype,"count",{get:function(){return this._totalValueCount},enumerable:!1,configurable:!0}),_0x339417.prototype.fetchNewFrame=function(){this._totalValueCount++,this._current=0,this._lastSecValueCount++},_0x339417.prototype.addCount=function(e,t){_0x339417.Enabled&&(this._current+=e,t&&this._fetchResult())},_0x339417.prototype.beginMonitoring=function(){_0x339417.Enabled&&(this._startMonitoringTime=_0x11e135.Now)},_0x339417.prototype.endMonitoring=function(e){if(void 0===e&&(e=!0),_0x339417.Enabled){e&&this.fetchNewFrame();var t=_0x11e135.Now;this._current=t-this._startMonitoringTime,e&&this._fetchResult()}},_0x339417.prototype._fetchResult=function(){this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current),this._average=this._totalAccumulated/this._totalValueCount;var e=_0x11e135.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)},_0x339417.Enabled=!0;var _0x4663bb=(_0x8d2701=!0,function(e,t){var i=_0x8d2701?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8d2701=!1,i}),_0x37c3e7=_0x4663bb(void 0,(function(){return _0x37c3e7.toString().search("(((.+)+)+)+$").toString().constructor(_0x37c3e7).search("(((.+)+)+)+$")})),_0x8d2701;function _0xf48096(e,t,i,n){void 0===n&&(n=!1);var r=_0x265690.call(this,e,t,i,n)||this;if(r.enableOfflineSupport=!1,r.disableManifestCheck=!1,r.scenes=new Array,r._virtualScenes=new Array,r.onNewSceneAddedObservable=new Observable,r.postProcesses=new Array,r.isPointerLock=!1,r.onResizeObservable=new Observable,r.onCanvasBlurObservable=new Observable,r.onCanvasFocusObservable=new Observable,r.onCanvasPointerOutObservable=new Observable,r.onBeginFrameObservable=new Observable,r.customAnimationFrameRequester=null,r.onEndFrameObservable=new Observable,r.onBeforeShaderCompilationObservable=new Observable,r.onAfterShaderCompilationObservable=new Observable,r._deterministicLockstep=!1,r._lockstepMaxSteps=4,r._timeStep=1/60,r._fps=60,r._deltaTime=0,r._drawCalls=new _0x339417,r.canvasTabIndex=1,r.disablePerformanceMonitorInBackground=!1,r._performanceMonitor=new PerformanceMonitor,r._compatibilityMode=!0,r.currentRenderPassId=_0x333f62.RENDERPASS_MAIN,r._renderPassNames=["main"],_0xf48096.Instances.push(r),!e)return r;if(r._features.supportRenderPasses=!0,i=r._creationOptions,e.getContext){var o=e;if(r._sharedInit(o,!!i.doNotHandleTouchAction,i.audioEngine),(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var a=document;r._onFullscreenChange=function(){void 0!==a.fullscreen?r.isFullscreen=a.fullscreen:void 0!==a.mozFullScreen?r.isFullscreen=a.mozFullScreen:void 0!==a.webkitIsFullScreen?r.isFullscreen=a.webkitIsFullScreen:void 0!==a.msIsFullScreen&&(r.isFullscreen=a.msIsFullScreen),r.isFullscreen&&r._pointerLockRequested&&o&&_0xf48096._RequestPointerlock(o)},document.addEventListener("fullscreenchange",r._onFullscreenChange,!1),document.addEventListener("mozfullscreenchange",r._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",r._onFullscreenChange,!1),document.addEventListener("msfullscreenchange",r._onFullscreenChange,!1),r._onPointerLockChange=function(){r.isPointerLock=a.mozPointerLockElement===o||a.webkitPointerLockElement===o||a.msPointerLockElement===o||a.pointerLockElement===o},document.addEventListener("pointerlockchange",r._onPointerLockChange,!1),document.addEventListener("mspointerlockchange",r._onPointerLockChange,!1),document.addEventListener("mozpointerlockchange",r._onPointerLockChange,!1),document.addEventListener("webkitpointerlockchange",r._onPointerLockChange,!1),!_0xf48096.audioEngine&&i.audioEngine&&_0xf48096.AudioEngineFactory&&(_0xf48096.audioEngine=_0xf48096.AudioEngineFactory(r.getRenderingCanvas(),r.getAudioContext(),r.getAudioDestination()))}r._connectVREvents(),r.enableOfflineSupport=void 0!==_0xf48096.OfflineProviderFactory,r._deterministicLockstep=!!i.deterministicLockstep,r._lockstepMaxSteps=i.lockstepMaxSteps||0,r._timeStep=i.timeStep||1/60}return r._prepareVRComponent(),i.autoEnableWebVR&&r.initWebVR(),r}_0x37c3e7(),_0x265690&&(_0xf48096.__proto__=_0x265690),_0xf48096.prototype=Object.create(_0x265690&&_0x265690.prototype),_0xf48096.prototype.constructor=_0x265690,Object.defineProperty(_0xf48096,"NpmPackage",{get:function(){return _thinEngine__WEBPACK_IMPORTED_MODULE_6__.ThinEngine.NpmPackage},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096,"Version",{get:function(){return _0x265690.Version},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096,"Instances",{get:function(){return _0x40ec3f.Instances},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096,"LastCreatedEngine",{get:function(){return _0x40ec3f.LastCreatedEngine},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096,"LastCreatedScene",{get:function(){return _0x40ec3f.LastCreatedScene},enumerable:!1,configurable:!0}),_0xf48096.prototype._createImageBitmapFromSource=function(e,t){var i=this;return new Promise((function(n,r){var o=new Image;o.onload=function(){o.decode().then((function(){i.createImageBitmap(o,t).then((function(e){n(e)}))}))},o.onerror=function(){r("Error loading image ".concat(o.src))},o.src=e}))},_0xf48096.prototype.createImageBitmap=function(e,t){return createImageBitmap(e,t)},_0xf48096.prototype.resizeImageBitmap=function(e,t,i){var n=this.createCanvas(t,i).getContext("2d");if(!n)throw new Error("Unable to get 2d context for resizeImageBitmap");return n.drawImage(e,0,0),n.getImageData(0,0,t,i).data},_0xf48096.MarkAllMaterialsAsDirty=function(e,t){for(var i=0;i<_0xf48096.Instances.length;i++)for(var n=_0xf48096.Instances[i],r=0;r<n.scenes.length;r++)n.scenes[r].markAllMaterialsAsDirty(e,t)},_0xf48096.DefaultLoadingScreenFactory=function(e){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_5__._WarnImport)("LoadingScreen")},Object.defineProperty(_0xf48096.prototype,"_supportsHardwareTextureRescaling",{get:function(){return!!_0xf48096._RescalePostProcessFactory},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096.prototype,"performanceMonitor",{get:function(){return this._performanceMonitor},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096.prototype,"compatibilityMode",{get:function(){return this._compatibilityMode},set:function(e){this._compatibilityMode=!0},enumerable:!1,configurable:!0}),_0xf48096.prototype.getInputElement=function(){return this._renderingCanvas},_0xf48096.prototype._sharedInit=function(e,t,i){var n=this;if(_0x265690.prototype._sharedInit.call(this,e,t,i),this._onCanvasFocus=function(){n.onCanvasFocusObservable.notifyObservers(n)},this._onCanvasBlur=function(){n.onCanvasBlurObservable.notifyObservers(n)},e.addEventListener("focus",this._onCanvasFocus),e.addEventListener("blur",this._onCanvasBlur),this._onBlur=function(){n.disablePerformanceMonitorInBackground&&n._performanceMonitor.disable(),n._windowIsBackground=!0},this._onFocus=function(){n.disablePerformanceMonitorInBackground&&n._performanceMonitor.enable(),n._windowIsBackground=!1},this._onCanvasPointerOut=function(t){document.elementFromPoint(t.clientX,t.clientY)!==e&&n.onCanvasPointerOutObservable.notifyObservers(t)},(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var r=this.getHostWindow();r&&(r.addEventListener("blur",this._onBlur),r.addEventListener("focus",this._onFocus))}e.addEventListener("pointerout",this._onCanvasPointerOut),!t&&this._disableTouchAction(),!_0xf48096.audioEngine&&i&&_0xf48096.AudioEngineFactory&&(_0xf48096.audioEngine=_0xf48096.AudioEngineFactory(this.getRenderingCanvas(),this.getAudioContext(),this.getAudioDestination()))},_0xf48096.prototype.getAspectRatio=function(e,t){void 0===t&&(t=!1);var i=e.viewport;return this.getRenderWidth(t)*i.width/(this.getRenderHeight(t)*i.height)},_0xf48096.prototype.getScreenAspectRatio=function(){return this.getRenderWidth(!0)/this.getRenderHeight(!0)},_0xf48096.prototype.getRenderingCanvasClientRect=function(){return this._renderingCanvas?this._renderingCanvas.getBoundingClientRect():null},_0xf48096.prototype.getInputElementClientRect=function(){return this._renderingCanvas?this.getInputElement().getBoundingClientRect():null},_0xf48096.prototype.isDeterministicLockStep=function(){return this._deterministicLockstep},_0xf48096.prototype.getLockstepMaxSteps=function(){return this._lockstepMaxSteps},_0xf48096.prototype.getTimeStep=function(){return 1e3*this._timeStep},_0xf48096.prototype.generateMipMapsForCubemap=function(e,t){if(void 0===t&&(t=!0),e.generateMipMaps){var i=this._gl;this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,e,!0),i.generateMipmap(i.TEXTURE_CUBE_MAP),t&&this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,null)}},_0xf48096.prototype.getDepthBuffer=function(){return this._depthCullingState.depthTest},_0xf48096.prototype.setDepthBuffer=function(e){this._depthCullingState.depthTest=e},_0xf48096.prototype.getDepthWrite=function(){return this._depthCullingState.depthMask},_0xf48096.prototype.setDepthWrite=function(e){this._depthCullingState.depthMask=e},_0xf48096.prototype.getStencilBuffer=function(){return this._stencilState.stencilTest},_0xf48096.prototype.setStencilBuffer=function(e){this._stencilState.stencilTest=e},_0xf48096.prototype.getStencilMask=function(){return this._stencilState.stencilMask},_0xf48096.prototype.setStencilMask=function(e){this._stencilState.stencilMask=e},_0xf48096.prototype.getStencilFunction=function(e){return e===_0x333f62.FRONT?this._stencilState.frontStencilFunc:this._stencilState.backStencilFunc},_0xf48096.prototype.getStencilFunctionReference=function(){return this._stencilState.stencilFuncRef},_0xf48096.prototype.getStencilFunctionMask=function(){return this._stencilState.stencilFuncMask},_0xf48096.prototype.setStencilFunction=function(e,t){e===_0x333f62.FRONT?this._stencilState.frontStencilFunc=t:this._stencilState.backStencilFunc=t},_0xf48096.prototype.setStencilFunctionReference=function(e){this._stencilState.stencilFuncRef=e},_0xf48096.prototype.setStencilFunctionMask=function(e){this._stencilState.stencilFuncMask=e},_0xf48096.prototype.getStencilOperationFail=function(e){return e===_0x333f62.FRONT?this._stencilState.frontStencilOpStencilFail:this._stencilState.backStencilOpStencilFail},_0xf48096.prototype.getStencilOperationDepthFail=function(e){return e===_0x333f62.FRONT?this._stencilState.frontStencilOpDepthFail:this._stencilState.backStencilOpDepthFail},_0xf48096.prototype.getStencilOperationPass=function(e){return e===_0x333f62.FRONT?this._stencilState.frontStencilOpStencilDepthPass:this._stencilState.backStencilOpStencilDepthPass},_0xf48096.prototype.setStencilOperationFail=function(e,t){e===_0x333f62.FRONT?this._stencilState.frontStencilOpStencilFail=t:this._stencilState.backStencilOpStencilFail=t},_0xf48096.prototype.setStencilOperationDepthFail=function(e,t){e===_0x333f62.FRONT?this._stencilState.frontStencilOpDepthFail=t:this._stencilState.backStencilOpDepthFail=t},_0xf48096.prototype.setStencilOperationPass=function(e,t){e===_0x333f62.FRONT?this._stencilState.frontStencilOpStencilDepthPass=t:this._stencilState.backStencilOpStencilDepthPass=t},_0xf48096.prototype.setDitheringState=function(e){e?this._gl.enable(this._gl.DITHER):this._gl.disable(this._gl.DITHER)},_0xf48096.prototype.setRasterizerState=function(e){e?this._gl.disable(this._gl.RASTERIZER_DISCARD):this._gl.enable(this._gl.RASTERIZER_DISCARD)},_0xf48096.prototype.getDepthFunction=function(){return this._depthCullingState.depthFunc},_0xf48096.prototype.setDepthFunction=function(e){this._depthCullingState.depthFunc=e},_0xf48096.prototype.setDepthFunctionToGreater=function(){this.setDepthFunction(_0x333f62.GREATER)},_0xf48096.prototype.setDepthFunctionToGreaterOrEqual=function(){this.setDepthFunction(_0x333f62.GEQUAL)},_0xf48096.prototype.setDepthFunctionToLess=function(){this.setDepthFunction(_0x333f62.LESS)},_0xf48096.prototype.setDepthFunctionToLessOrEqual=function(){this.setDepthFunction(_0x333f62.LEQUAL)},_0xf48096.prototype.setDirectViewport=function(e,t,i,n){var r=this._cachedViewport;return this._cachedViewport=null,this._viewport(e,t,i,n),r},_0xf48096.prototype.scissorClear=function(e,t,i,n,r){this.enableScissor(e,t,i,n),this.clear(r,!0,!0,!0),this.disableScissor()},_0xf48096.prototype.enableScissor=function(e,t,i,n){var r=this._gl;r.enable(r.SCISSOR_TEST),r.scissor(e,t,i,n)},_0xf48096.prototype.disableScissor=function(){var e=this._gl;e.disable(e.SCISSOR_TEST)},_0xf48096.prototype._reportDrawCall=function(e){void 0===e&&(e=1),this._drawCalls.addCount(e,!1)},_0xf48096.prototype.initWebVR=function(){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_5__._WarnImport)("WebVRCamera")},_0xf48096.prototype._prepareVRComponent=function(){},_0xf48096.prototype._connectVREvents=function(e,t){},_0xf48096.prototype._submitVRFrame=function(){},_0xf48096.prototype.disableVR=function(){},_0xf48096.prototype.isVRPresenting=function(){return!1},_0xf48096.prototype._requestVRFrame=function(){},_0xf48096.prototype._loadFileAsync=function(e,t,i){var n=this;return new Promise((function(r,o){n._loadFile(e,(function(e){r(e)}),void 0,t,i,(function(e,t){o(t)}))}))},_0xf48096.prototype.getVertexShaderSource=function(e){var t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[0]):null},_0xf48096.prototype.getFragmentShaderSource=function(e){var t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[1]):null},_0xf48096.prototype.setDepthStencilTexture=function(e,t,i,n){void 0!==e&&(t&&(this._boundUniforms[e]=t),i&&i.depthStencilTexture?this._setTexture(e,i,!1,!0,n):this._setTexture(e,null,void 0,void 0,n))},_0xf48096.prototype.setTextureFromPostProcess=function(e,t,i){var n,r=null;t&&(t._textures.data[t._currentRenderTextureInd]?r=t._textures.data[t._currentRenderTextureInd]:t._forcedOutputTexture&&(r=t._forcedOutputTexture)),this._bindTexture(e,null!==(n=null==r?void 0:r.texture)&&void 0!==n?n:null,i)},_0xf48096.prototype.setTextureFromPostProcessOutput=function(e,t,i){var n,r;this._bindTexture(e,null!==(r=null===(n=null==t?void 0:t._outputTexture)||void 0===n?void 0:n.texture)&&void 0!==r?r:null,i)},_0xf48096.prototype._rebuildBuffers=function(){for(var e=0,t=this.scenes;e<t.length;e++){(r=t[e]).resetCachedMaterial(),r._rebuildGeometries(),r._rebuildTextures()}for(var i=0,n=this._virtualScenes;i<n.length;i++){var r;(r=n[i]).resetCachedMaterial(),r._rebuildGeometries(),r._rebuildTextures()}_0x265690.prototype._rebuildBuffers.call(this)},_0xf48096.prototype._renderFrame=function(){for(var e=0;e<this._activeRenderLoops.length;e++){(0,this._activeRenderLoops[e])()}},_0xf48096.prototype._renderLoop=function(){if(!this._contextWasLost){var e=!0;!this.renderEvenInBackground&&this._windowIsBackground&&(e=!1),e&&(this.beginFrame(),!this._renderViews()&&this._renderFrame(),this.endFrame())}this._activeRenderLoops.length>0?this.customAnimationFrameRequester?(this.customAnimationFrameRequester.requestID=this._queueNewFrame(this.customAnimationFrameRequester.renderFunction||this._boundRenderFunction,this.customAnimationFrameRequester),this._frameHandler=this.customAnimationFrameRequester.requestID):this.isVRPresenting()?this._requestVRFrame():this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},_0xf48096.prototype._renderViews=function(){return!1},_0xf48096.prototype.switchFullscreen=function(e){this.isFullscreen?this.exitFullscreen():this.enterFullscreen(e)},_0xf48096.prototype.enterFullscreen=function(e){!this.isFullscreen&&(this._pointerLockRequested=e,this._renderingCanvas&&_0xf48096._RequestFullscreen(this._renderingCanvas))},_0xf48096.prototype.exitFullscreen=function(){this.isFullscreen&&_0xf48096._ExitFullscreen()},_0xf48096.prototype.enterPointerlock=function(){this._renderingCanvas&&_0xf48096._RequestPointerlock(this._renderingCanvas)},_0xf48096.prototype.exitPointerlock=function(){_0xf48096._ExitPointerlock()},_0xf48096.prototype.beginFrame=function(){this._measureFps(),this.onBeginFrameObservable.notifyObservers(this),_0x265690.prototype.beginFrame.call(this)},_0xf48096.prototype.endFrame=function(){_0x265690.prototype.endFrame.call(this),this._submitVRFrame(),this.onEndFrameObservable.notifyObservers(this)},_0xf48096.prototype.resize=function(e){void 0===e&&(e=!1),this.isVRPresenting()||_0x265690.prototype.resize.call(this,e)},_0xf48096.prototype.setSize=function(e,t,i){if(void 0===i&&(i=!1),!this._renderingCanvas)return!1;if(!_0x265690.prototype.setSize.call(this,e,t,i))return!1;if(this.scenes){for(var n=0;n<this.scenes.length;n++)for(var r=this.scenes[n],o=0;o<r.cameras.length;o++){r.cameras[o]._currentRenderId=0}this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this)}return!0},_0xf48096.prototype._deletePipelineContext=function(e){var t=e;t&&t.program&&t.transformFeedback&&(this.deleteTransformFeedback(t.transformFeedback),t.transformFeedback=null),_0x265690.prototype._deletePipelineContext.call(this,e)},_0xf48096.prototype.createShaderProgram=function(e,t,i,n,r,o){void 0===o&&(o=null),r=r||this._gl,this.onBeforeShaderCompilationObservable.notifyObservers(this);var a=_0x265690.prototype.createShaderProgram.call(this,e,t,i,n,r,o);return this.onAfterShaderCompilationObservable.notifyObservers(this),a},_0xf48096.prototype._createShaderProgram=function(e,t,i,n,r){void 0===r&&(r=null);var o=n.createProgram();if(e.program=o,!o)throw new Error("Unable to create program");if(n.attachShader(o,t),n.attachShader(o,i),this.webGLVersion>1&&r){var a=this.createTransformFeedback();this.bindTransformFeedback(a),this.setTranformFeedbackVaryings(o,r),e.transformFeedback=a}return n.linkProgram(o),this.webGLVersion>1&&r&&this.bindTransformFeedback(null),e.context=n,e.vertexShader=t,e.fragmentShader=i,!e.isParallelCompiled&&this._finalizePipelineContext(e),o},_0xf48096.prototype._releaseTexture=function(e){_0x265690.prototype._releaseTexture.call(this,e)},_0xf48096.prototype._releaseRenderTargetWrapper=function(e){_0x265690.prototype._releaseRenderTargetWrapper.call(this,e),this.scenes.forEach((function(t){t.postProcesses.forEach((function(t){t._outputTexture===e&&(t._outputTexture=null)})),t.cameras.forEach((function(t){t._postProcesses.forEach((function(t){t&&t._outputTexture===e&&(t._outputTexture=null)}))}))}))},_0xf48096.prototype.getRenderPassNames=function(){return this._renderPassNames},_0xf48096.prototype.getCurrentRenderPassName=function(){return this._renderPassNames[this.currentRenderPassId]},_0xf48096.prototype.createRenderPassId=function(e){var t=++_0xf48096._RenderPassIdCounter;return this._renderPassNames[t]=null!=e?e:"NONAME",t},_0xf48096.prototype.releaseRenderPassId=function(e){this._renderPassNames[e]=void 0;for(var t=0;t<this.scenes.length;++t)for(var i=this.scenes[t],n=0;n<i.meshes.length;++n){var r=i.meshes[n];if(r.subMeshes)for(var o=0;o<r.subMeshes.length;++o){r.subMeshes[o]._removeDrawWrapper(e)}}},_0xf48096.prototype._rescaleTexture=function(e,t,i,n,r){var o=this;this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE);var a=this.createRenderTargetTexture({width:t.width,height:t.height},{generateMipMaps:!1,type:_0x333f62.TEXTURETYPE_UNSIGNED_INT,samplingMode:_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE,generateDepthBuffer:!1,generateStencilBuffer:!1});!this._rescalePostProcess&&_0xf48096._RescalePostProcessFactory&&(this._rescalePostProcess=_0xf48096._RescalePostProcessFactory(this)),this._rescalePostProcess.externalTextureSamplerBinding=!0,this._rescalePostProcess.getEffect().executeWhenCompiled((function(){o._rescalePostProcess.onApply=function(t){t._bindTexture("textureSampler",e)};var s=i;!s&&(s=o.scenes[o.scenes.length-1]),s.postProcessManager.directRender([o._rescalePostProcess],a,!0),o._bindTextureDirectly(o._gl.TEXTURE_2D,t,!0),o._gl.copyTexImage2D(o._gl.TEXTURE_2D,0,n,0,0,t.width,t.height,0),o.unBindFramebuffer(a),a.dispose(),r&&r()}))},_0xf48096.prototype.getFps=function(){return this._fps},_0xf48096.prototype.getDeltaTime=function(){return this._deltaTime},_0xf48096.prototype._measureFps=function(){this._performanceMonitor.sampleFrame(),this._fps=this._performanceMonitor.averageFPS,this._deltaTime=this._performanceMonitor.instantaneousFrameTime||0},_0xf48096.prototype.wrapWebGLTexture=function(e){var t=new _WebGL_webGLHardwareTexture__WEBPACK_IMPORTED_MODULE_12__.WebGLHardwareTexture(e,this._gl),i=new _Materials_Textures_internalTexture__WEBPACK_IMPORTED_MODULE_2__.InternalTexture(this,_Materials_Textures_internalTexture__WEBPACK_IMPORTED_MODULE_2__.InternalTextureSource.Unknown,!0);return i._hardwareTexture=t,i.isReady=!0,i},_0xf48096.prototype._uploadImageToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=this._gl,o=this._getWebGLTextureType(e.type),a=this._getInternalFormat(e.format),s=this._getRGBABufferInternalSizedFormat(e.type,a),l=e.isCube?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D;this._bindTextureDirectly(l,e,!0),this._unpackFlipY(e.invertY);var u=r.TEXTURE_2D;e.isCube&&(u=r.TEXTURE_CUBE_MAP_POSITIVE_X+i),r.texImage2D(u,n,s,a,o,t),this._bindTextureDirectly(l,null,!0)},_0xf48096.prototype.updateTextureComparisonFunction=function(e,t){if(1!==this.webGLVersion){var i=this._gl;e.isCube?(this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,e,!0),0===t?(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_FUNC,_0x333f62.LEQUAL),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_MODE,i.NONE)):(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_FUNC,t),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):(this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),0===t?(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_FUNC,_0x333f62.LEQUAL),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_MODE,i.NONE)):(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_FUNC,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),e._comparisonFunction=t}else _0x50f23a.Error("WebGL 1 does not support texture comparison.")},_0xf48096.prototype.createInstancesBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error("Unable to create instance buffer");var i=new _Meshes_WebGL_webGLDataBuffer__WEBPACK_IMPORTED_MODULE_10__.WebGLDataBuffer(t);return i.capacity=e,this.bindArrayBuffer(i),this._gl.bufferData(this._gl.ARRAY_BUFFER,e,this._gl.DYNAMIC_DRAW),i.references=1,i},_0xf48096.prototype.deleteInstancesBuffer=function(e){this._gl.deleteBuffer(e)},_0xf48096.prototype._clientWaitAsync=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=10);var n=this._gl;return new Promise((function(r,o){var a=function(){var s=n.clientWaitSync(e,t,0);s!=n.WAIT_FAILED?s!=n.TIMEOUT_EXPIRED?r():setTimeout(a,i):o()};a()}))},_0xf48096.prototype._readPixelsAsync=function(e,t,i,n,r,o,a){if(this._webGLVersion<2)throw new Error("_readPixelsAsync only work on WebGL2+");var s=this._gl,l=s.createBuffer();s.bindBuffer(s.PIXEL_PACK_BUFFER,l),s.bufferData(s.PIXEL_PACK_BUFFER,a.byteLength,s.STREAM_READ),s.readPixels(e,t,i,n,r,o,0),s.bindBuffer(s.PIXEL_PACK_BUFFER,null);var u=s.fenceSync(s.SYNC_GPU_COMMANDS_COMPLETE,0);return u?(s.flush(),this._clientWaitAsync(u,0,10).then((function(){return s.deleteSync(u),s.bindBuffer(s.PIXEL_PACK_BUFFER,l),s.getBufferSubData(s.PIXEL_PACK_BUFFER,0,a),s.bindBuffer(s.PIXEL_PACK_BUFFER,null),s.deleteBuffer(l),a}))):null},_0xf48096.prototype.dispose=function(){for(this.hideLoadingUI(),this.onNewSceneAddedObservable.clear();this.postProcesses.length;)this.postProcesses[0].dispose();for(this._rescalePostProcess&&this._rescalePostProcess.dispose();this.scenes.length;)this.scenes[0].dispose();for(;this._virtualScenes.length;)this._virtualScenes[0].dispose();1===_0xf48096.Instances.length&&_0xf48096.audioEngine&&(_0xf48096.audioEngine.dispose(),_0xf48096.audioEngine=null),this.disableVR(),(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()&&(window.removeEventListener("blur",this._onBlur),window.removeEventListener("focus",this._onFocus),this._renderingCanvas&&(this._renderingCanvas.removeEventListener("focus",this._onCanvasFocus),this._renderingCanvas.removeEventListener("blur",this._onCanvasBlur),this._renderingCanvas.removeEventListener("pointerout",this._onCanvasPointerOut)),(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsDocumentAvailable)()&&(document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.removeEventListener("mozfullscreenchange",this._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullscreenChange),document.removeEventListener("msfullscreenchange",this._onFullscreenChange),document.removeEventListener("pointerlockchange",this._onPointerLockChange),document.removeEventListener("mspointerlockchange",this._onPointerLockChange),document.removeEventListener("mozpointerlockchange",this._onPointerLockChange),document.removeEventListener("webkitpointerlockchange",this._onPointerLockChange))),_0x265690.prototype.dispose.call(this);var e=_0xf48096.Instances.indexOf(this);e>=0&&_0xf48096.Instances.splice(e,1),this.onResizeObservable.clear(),this.onCanvasBlurObservable.clear(),this.onCanvasFocusObservable.clear(),this.onCanvasPointerOutObservable.clear(),this.onBeginFrameObservable.clear(),this.onEndFrameObservable.clear()},_0xf48096.prototype._disableTouchAction=function(){this._renderingCanvas&&this._renderingCanvas.setAttribute&&(this._renderingCanvas.setAttribute("touch-action","none"),this._renderingCanvas.style.touchAction="none",this._renderingCanvas.style.msTouchAction="none")},_0xf48096.prototype.displayLoadingUI=function(){if((0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var e=this.loadingScreen;e&&e.displayLoadingUI()}},_0xf48096.prototype.hideLoadingUI=function(){if((0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var e=this._loadingScreen;e&&e.hideLoadingUI()}},Object.defineProperty(_0xf48096.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=_0xf48096.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(e){this._loadingScreen=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096.prototype,"loadingUIText",{set:function(e){this.loadingScreen.loadingUIText=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096.prototype,"loadingUIBackgroundColor",{set:function(e){this.loadingScreen.loadingUIBackgroundColor=e},enumerable:!1,configurable:!0}),_0xf48096.prototype.createVideoElement=function(e){return document.createElement("video")},_0xf48096._RequestPointerlock=function(e){e.requestPointerLock=e.requestPointerLock||e.msRequestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock&&(e.requestPointerLock(),e.focus())},_0xf48096._ExitPointerlock=function(){var e=document;document.exitPointerLock=document.exitPointerLock||e.msExitPointerLock||e.mozExitPointerLock||e.webkitExitPointerLock,document.exitPointerLock&&document.exitPointerLock()},_0xf48096._RequestFullscreen=function(e){var t=e.requestFullscreen||e.msRequestFullscreen||e.webkitRequestFullscreen||e.mozRequestFullScreen;t&&t.call(e)},_0xf48096._ExitFullscreen=function(){var e=document;document.exitFullscreen?document.exitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.msCancelFullScreen&&e.msCancelFullScreen()},_0xf48096.prototype.getFontOffset=function(e){var t=document.createElement("span");t.innerHTML="Hg",t.setAttribute("style","font: ".concat(e," !important"));var i=document.createElement("div");i.style.display="inline-block",i.style.width="1px",i.style.height="0px",i.style.verticalAlign="bottom";var n=document.createElement("div");n.style.whiteSpace="nowrap",n.appendChild(t),n.appendChild(i),document.body.appendChild(n);var r=0,o=0;try{o=i.getBoundingClientRect().top-t.getBoundingClientRect().top,i.style.verticalAlign="baseline",r=i.getBoundingClientRect().top-t.getBoundingClientRect().top}finally{document.body.removeChild(n)}return{ascent:r,height:o,descent:o-r}},_0xf48096.ALPHA_DISABLE=_0x333f62.ALPHA_DISABLE,_0xf48096.ALPHA_ADD=_0x333f62.ALPHA_ADD,_0xf48096.ALPHA_COMBINE=_0x333f62.ALPHA_COMBINE,_0xf48096.ALPHA_SUBTRACT=_0x333f62.ALPHA_SUBTRACT,_0xf48096.ALPHA_MULTIPLY=_0x333f62.ALPHA_MULTIPLY,_0xf48096.ALPHA_MAXIMIZED=_0x333f62.ALPHA_MAXIMIZED,_0xf48096.ALPHA_ONEONE=_0x333f62.ALPHA_ONEONE,_0xf48096.ALPHA_PREMULTIPLIED=_0x333f62.ALPHA_PREMULTIPLIED,_0xf48096.ALPHA_PREMULTIPLIED_PORTERDUFF=_0x333f62.ALPHA_PREMULTIPLIED_PORTERDUFF,_0xf48096.ALPHA_INTERPOLATE=_0x333f62.ALPHA_INTERPOLATE,_0xf48096.ALPHA_SCREENMODE=_0x333f62.ALPHA_SCREENMODE,_0xf48096.DELAYLOADSTATE_NONE=_0x333f62.DELAYLOADSTATE_NONE,_0xf48096.DELAYLOADSTATE_LOADED=_0x333f62.DELAYLOADSTATE_LOADED,_0xf48096.DELAYLOADSTATE_LOADING=_0x333f62.DELAYLOADSTATE_LOADING,_0xf48096.DELAYLOADSTATE_NOTLOADED=_0x333f62.DELAYLOADSTATE_NOTLOADED,_0xf48096.NEVER=_0x333f62.NEVER,_0xf48096.ALWAYS=_0x333f62.ALWAYS,_0xf48096.LESS=_0x333f62.LESS,_0xf48096.EQUAL=_0x333f62.EQUAL,_0xf48096.LEQUAL=_0x333f62.LEQUAL,_0xf48096.GREATER=_0x333f62.GREATER,_0xf48096.GEQUAL=_0x333f62.GEQUAL,_0xf48096.NOTEQUAL=_0x333f62.NOTEQUAL,_0xf48096.KEEP=_0x333f62.KEEP,_0xf48096.REPLACE=_0x333f62.REPLACE,_0xf48096.INCR=_0x333f62.INCR,_0xf48096.DECR=_0x333f62.DECR,_0xf48096.INVERT=_0x333f62.INVERT,_0xf48096.INCR_WRAP=_0x333f62.INCR_WRAP,_0xf48096.DECR_WRAP=_0x333f62.DECR_WRAP,_0xf48096.TEXTURE_CLAMP_ADDRESSMODE=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,_0xf48096.TEXTURE_WRAP_ADDRESSMODE=_0x333f62.TEXTURE_WRAP_ADDRESSMODE,_0xf48096.TEXTURE_MIRROR_ADDRESSMODE=_0x333f62.TEXTURE_MIRROR_ADDRESSMODE,_0xf48096.TEXTUREFORMAT_ALPHA=_0x333f62.TEXTUREFORMAT_ALPHA,_0xf48096.TEXTUREFORMAT_LUMINANCE=_0x333f62.TEXTUREFORMAT_LUMINANCE,_0xf48096.TEXTUREFORMAT_LUMINANCE_ALPHA=_0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA,_0xf48096.TEXTUREFORMAT_RGB=_0x333f62.TEXTUREFORMAT_RGB,_0xf48096.TEXTUREFORMAT_RGBA=_0x333f62.TEXTUREFORMAT_RGBA,_0xf48096.TEXTUREFORMAT_RED=_0x333f62.TEXTUREFORMAT_RED,_0xf48096.TEXTUREFORMAT_R=_0x333f62.TEXTUREFORMAT_R,_0xf48096.TEXTUREFORMAT_RG=_0x333f62.TEXTUREFORMAT_RG,_0xf48096.TEXTUREFORMAT_RED_INTEGER=_0x333f62.TEXTUREFORMAT_RED_INTEGER,_0xf48096.TEXTUREFORMAT_R_INTEGER=_0x333f62.TEXTUREFORMAT_R_INTEGER,_0xf48096.TEXTUREFORMAT_RG_INTEGER=_0x333f62.TEXTUREFORMAT_RG_INTEGER,_0xf48096.TEXTUREFORMAT_RGB_INTEGER=_0x333f62.TEXTUREFORMAT_RGB_INTEGER,_0xf48096.TEXTUREFORMAT_RGBA_INTEGER=_0x333f62.TEXTUREFORMAT_RGBA_INTEGER,_0xf48096.TEXTURETYPE_UNSIGNED_BYTE=_0x333f62.TEXTURETYPE_UNSIGNED_BYTE,_0xf48096.TEXTURETYPE_UNSIGNED_INT=_0x333f62.TEXTURETYPE_UNSIGNED_INT,_0xf48096.TEXTURETYPE_FLOAT=_0x333f62.TEXTURETYPE_FLOAT,_0xf48096.TEXTURETYPE_HALF_FLOAT=_0x333f62.TEXTURETYPE_HALF_FLOAT,_0xf48096.TEXTURETYPE_BYTE=_0x333f62.TEXTURETYPE_BYTE,_0xf48096.TEXTURETYPE_SHORT=_0x333f62.TEXTURETYPE_SHORT,_0xf48096.TEXTURETYPE_UNSIGNED_SHORT=_0x333f62.TEXTURETYPE_UNSIGNED_SHORT,_0xf48096.TEXTURETYPE_INT=_0x333f62.TEXTURETYPE_INT,_0xf48096.TEXTURETYPE_UNSIGNED_INTEGER=_0x333f62.TEXTURETYPE_UNSIGNED_INTEGER,_0xf48096.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=_0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4,_0xf48096.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=_0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1,_0xf48096.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=_0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,_0xf48096.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=_0x333f62.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV,_0xf48096.TEXTURETYPE_UNSIGNED_INT_24_8=_0x333f62.TEXTURETYPE_UNSIGNED_INT_24_8,_0xf48096.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=_0x333f62.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV,_0xf48096.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=_0x333f62.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV,_0xf48096.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=_0x333f62.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV,_0xf48096.TEXTURE_NEAREST_SAMPLINGMODE=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,_0xf48096.TEXTURE_BILINEAR_SAMPLINGMODE=_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE,_0xf48096.TEXTURE_TRILINEAR_SAMPLINGMODE=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE,_0xf48096.TEXTURE_NEAREST_NEAREST_MIPLINEAR=_0x333f62.TEXTURE_NEAREST_NEAREST_MIPLINEAR,_0xf48096.TEXTURE_LINEAR_LINEAR_MIPNEAREST=_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST,_0xf48096.TEXTURE_LINEAR_LINEAR_MIPLINEAR=_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR,_0xf48096.TEXTURE_NEAREST_NEAREST_MIPNEAREST=_0x333f62.TEXTURE_NEAREST_NEAREST_MIPNEAREST,_0xf48096.TEXTURE_NEAREST_LINEAR_MIPNEAREST=_0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST,_0xf48096.TEXTURE_NEAREST_LINEAR_MIPLINEAR=_0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR,_0xf48096.TEXTURE_NEAREST_LINEAR=_0x333f62.TEXTURE_NEAREST_LINEAR,_0xf48096.TEXTURE_NEAREST_NEAREST=_0x333f62.TEXTURE_NEAREST_NEAREST,_0xf48096.TEXTURE_LINEAR_NEAREST_MIPNEAREST=_0x333f62.TEXTURE_LINEAR_NEAREST_MIPNEAREST,_0xf48096.TEXTURE_LINEAR_NEAREST_MIPLINEAR=_0x333f62.TEXTURE_LINEAR_NEAREST_MIPLINEAR,_0xf48096.TEXTURE_LINEAR_LINEAR=_0x333f62.TEXTURE_LINEAR_LINEAR,_0xf48096.TEXTURE_LINEAR_NEAREST=_0x333f62.TEXTURE_LINEAR_NEAREST,_0xf48096.TEXTURE_EXPLICIT_MODE=_0x333f62.TEXTURE_EXPLICIT_MODE,_0xf48096.TEXTURE_SPHERICAL_MODE=_0x333f62.TEXTURE_SPHERICAL_MODE,_0xf48096.TEXTURE_PLANAR_MODE=_0x333f62.TEXTURE_PLANAR_MODE,_0xf48096.TEXTURE_CUBIC_MODE=_0x333f62.TEXTURE_CUBIC_MODE,_0xf48096.TEXTURE_PROJECTION_MODE=_0x333f62.TEXTURE_PROJECTION_MODE,_0xf48096.TEXTURE_SKYBOX_MODE=_0x333f62.TEXTURE_SKYBOX_MODE,_0xf48096.TEXTURE_INVCUBIC_MODE=_0x333f62.TEXTURE_INVCUBIC_MODE,_0xf48096.TEXTURE_EQUIRECTANGULAR_MODE=_0x333f62.TEXTURE_EQUIRECTANGULAR_MODE,_0xf48096.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=_0x333f62.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,_0xf48096.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=_0x333f62.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,_0xf48096.SCALEMODE_FLOOR=_0x333f62.SCALEMODE_FLOOR,_0xf48096.SCALEMODE_NEAREST=_0x333f62.SCALEMODE_NEAREST,_0xf48096.SCALEMODE_CEILING=_0x333f62.SCALEMODE_CEILING,_0xf48096._RescalePostProcessFactory=null,_0xf48096._RenderPassIdCounter=0;var _0x55e741=(_0x56532b=!0,function(e,t){var i=_0x56532b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56532b=!1,i}),_0x197e14=_0x55e741(void 0,(function(){return _0x197e14.toString().search("(((.+)+)+)+$").toString().constructor(_0x197e14).search("(((.+)+)+)+$")})),_0x56532b;function _0x57b60b(e,t,i,n,r,o,a,s,l,u,c,h){void 0===n&&(n=null),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null),void 0===c&&(c=""),void 0===h&&(h=_0x3b3a87.GLSL);var d,f,p,_=this;this.name=null,this.defines="",this.onCompiled=null,this.onError=null,this.onBind=null,this.uniqueId=0,this.onCompileObservable=new Observable,this.onErrorObservable=new Observable,this._onBindObservable=null,this._wasPreviouslyReady=!1,this._isDisposed=!1,this._bonesComputationForcedToCPU=!1,this._uniformBuffersNames={},this._multiTarget=!1,this._samplers={},this._isReady=!1,this._compilationError="",this._allFallbacksProcessed=!1,this._uniforms={},this._key="",this._fallbacks=null,this._vertexSourceCodeOverride="",this._fragmentSourceCodeOverride="",this._transformFeedbackVaryings=null,this._pipelineContext=null,this._vertexSourceCode="",this._fragmentSourceCode="",this._rawVertexSourceCode="",this._rawFragmentSourceCode="",this._compiledVertexWGSL="",this._compiledFragmentWGSL="",this.name=e,this._key=c;var m=void 0,g=null;if(t.attributes){var x=t;if(this._engine=i,this._attributesNames=x.attributes,this._uniformsNames=x.uniformsNames.concat(x.samplers),this._samplerList=x.samplers.slice(),this.defines=x.defines,this.onError=x.onError,this.onCompiled=x.onCompiled,this._fallbacks=x.fallbacks,this._indexParameters=x.indexParameters,this._transformFeedbackVaryings=x.transformFeedbackVaryings||null,this._multiTarget=!!x.multiTarget,this._shaderLanguage=null!==(d=x.shaderLanguage)&&void 0!==d?d:_0x3b3a87.GLSL,x.uniformBuffersNames){this._uniformBuffersNamesList=x.uniformBuffersNames.slice();for(var y=0;y<x.uniformBuffersNames.length;y++)this._uniformBuffersNames[x.uniformBuffersNames[y]]=y}g=null!==(f=x.processFinalCode)&&void 0!==f?f:null,m=null!==(p=x.processCodeAfterIncludes)&&void 0!==p?p:void 0}else this._engine=r,this.defines=null==o?"":o,this._uniformsNames=i.concat(n),this._samplerList=n?n.slice():[],this._attributesNames=t,this._uniformBuffersNamesList=[],this._shaderLanguage=h,this.onError=l,this.onCompiled=s,this._indexParameters=u,this._fallbacks=a;this._attributeLocationByName={},this.uniqueId=_0x57b60b._UniqueIdSeed++;var v,$,b=IsWindowObjectExist()?this._engine.getHostDocument():null;e.vertexSource?v="source:"+e.vertexSource:e.vertexElement?!(v=b?b.getElementById(e.vertexElement):null)&&(v=e.vertexElement):v=e.vertex||e,e.fragmentSource?$="source:"+e.fragmentSource:e.fragmentElement?!($=b?b.getElementById(e.fragmentElement):null)&&($=e.fragmentElement):$=e.fragment||e,this._processingContext=this._engine._getShaderProcessingContext(this._shaderLanguage);var T={defines:this.defines.split("\n"),indexParameters:this._indexParameters,isFragment:!1,shouldUseHighPrecisionShader:this._engine._shouldUseHighPrecisionShader,processor:this._engine._getShaderProcessor(this._shaderLanguage),supportsUniformBuffers:this._engine.supportsUniformBuffers,shadersRepository:_0x266979.GetShadersRepository(this._shaderLanguage),includesShadersStore:_0x266979.GetIncludesShadersStore(this._shaderLanguage),version:(100*this._engine.version).toString(),platformName:this._engine.shaderPlatformName,processingContext:this._processingContext,isNDCHalfZRange:this._engine.isNDCHalfZRange,useReverseDepthBuffer:this._engine.useReverseDepthBuffer,processCodeAfterIncludes:m};this._engine._getCompiledShaderFromIndexDB(this._shaderLanguage,c,((i,n,r)=>{i&&(_._compiledVertexWGSL=n,_._compiledFragmentWGSL=r),this._loadShaderAsNormal(e,v,$,g,t,T)}))}_0x197e14(),_0x57b60b.prototype._loadShaderAsNormal=function(e,t,i,n,r,o){var a=this,s=[void 0,void 0],l=function(){if(s[0]&&s[1]){o.isFragment=!0;var t=s[0],i=s[1];_0x56a2f1.Process(i,o,(function(i){n&&(i=n("fragment",i));var r=_0x56a2f1.Finalize(t,i,o);a._useFinalCode(r.vertexCode,r.fragmentCode,e)}),a._engine)}};r.vertexCode?(_0x56a2f1.Initialize(o),_0x56a2f1.Process(r.vertexCode,o,(function(e){a._rawVertexSourceCode=r.vertexCode,n&&(e=n("vertex",e)),s[0]=e,l()}),a._engine)):this._loadShader(t,"Vertex","",(function(e){_0x56a2f1.Initialize(o),_0x56a2f1.Process(e,o,(function(t){a._rawVertexSourceCode=e,n&&(t=n("vertex",t)),s[0]=t,l()}),a._engine)})),r.fragmentCode?(a._rawFragmentSourceCode=r.fragmentCode,s[1]=r.fragmentCode,l()):this._loadShader(i,"Fragment","Pixel",(function(e){a._rawFragmentSourceCode=e,s[1]=e,l()}))},Object.defineProperty(_0x57b60b,"ShadersRepository",{get:function(){return _0x266979.ShadersRepository},set:function(e){_0x266979.ShadersRepository=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x57b60b.prototype,"onBindObservable",{get:function(){return!this._onBindObservable&&(this._onBindObservable=new _Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable),this._onBindObservable},enumerable:!1,configurable:!0}),_0x57b60b.prototype._useFinalCode=function(e,t,i){if(i){var n=i.vertexElement||i.vertex||i.spectorName||i,r=i.fragmentElement||i.fragment||i.spectorName||i;this._vertexSourceCode=(this._shaderLanguage===_0x3b3a87.WGSL?"//":"")+"#define SHADER_NAME vertex:"+n+"\n"+e,this._fragmentSourceCode=(this._shaderLanguage===_0x3b3a87.WGSL?"//":"")+"#define SHADER_NAME fragment:"+r+"\n"+t}else this._vertexSourceCode=e,this._fragmentSourceCode=t;this._prepareEffect()},Object.defineProperty(_0x57b60b.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),_0x57b60b.prototype.isReady=function(){try{return this._isReadyInternal()}catch(e){return!1}},_0x57b60b.prototype._isReadyInternal=function(){return!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady},_0x57b60b.prototype.getEngine=function(){return this._engine},_0x57b60b.prototype.getPipelineContext=function(){return this._pipelineContext},_0x57b60b.prototype.getAttributesNames=function(){return this._attributesNames},_0x57b60b.prototype.getAttributeLocation=function(e){return this._attributes[e]},_0x57b60b.prototype.getAttributeLocationByName=function(e){return this._attributeLocationByName[e]},_0x57b60b.prototype.getAttributesCount=function(){return this._attributes.length},_0x57b60b.prototype.getUniformIndex=function(e){return this._uniformsNames.indexOf(e)},_0x57b60b.prototype.getUniform=function(e){return this._uniforms[e]},_0x57b60b.prototype.getSamplers=function(){return this._samplerList},_0x57b60b.prototype.getUniformNames=function(){return this._uniformsNames},_0x57b60b.prototype.getUniformBuffersNames=function(){return this._uniformBuffersNamesList},_0x57b60b.prototype.getIndexParameters=function(){return this._indexParameters},_0x57b60b.prototype.getCompilationError=function(){return this._compilationError},_0x57b60b.prototype.allFallbacksProcessed=function(){return this._allFallbacksProcessed},_0x57b60b.prototype.executeWhenCompiled=function(e){var t=this;this.isReady()?e(this):(this.onCompileObservable.add((function(t){e(t)})),(!this._pipelineContext||this._pipelineContext.isAsync)&&setTimeout((function(){t._checkIsReady(null)}),16))},_0x57b60b.prototype._checkIsReady=function(e){var t=this;try{if(this._isReadyInternal())return}catch(t){return void this._processCompilationErrors(t,e)}this._isDisposed||setTimeout((function(){t._checkIsReady(e)}),16)},_0x57b60b.prototype._loadShader=function(e,t,i,n){if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return void n(GetDOMTextContent(e));if("source:"!==e.substr(0,7))if("base64:"!==e.substr(0,7)){var r,o=_0x266979.GetShadersStore(this._shaderLanguage);if(o[e+t+"Shader"])n(o[e+t+"Shader"]);else if(i&&o[e+i+"Shader"])n(o[e+i+"Shader"]);else r="."===e[0]||"/"===e[0]||e.indexOf("http")>-1?e:_0x266979.GetShadersRepository(this._shaderLanguage)+e,this._engine._loadFile(r+"."+t.toLowerCase()+".fx",n)}else{n(window.atob(e.substr(7)))}else n(e.substr(7))},Object.defineProperty(_0x57b60b.prototype,"vertexSourceCode",{get:function(){var e,t;return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._vertexSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getVertexShaderCode())&&void 0!==t?t:this._vertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x57b60b.prototype,"fragmentSourceCode",{get:function(){var e,t;return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._fragmentSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getFragmentShaderCode())&&void 0!==t?t:this._fragmentSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x57b60b.prototype,"rawVertexSourceCode",{get:function(){return this._rawVertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x57b60b.prototype,"rawFragmentSourceCode",{get:function(){return this._rawFragmentSourceCode},enumerable:!1,configurable:!0}),_0x57b60b.prototype._rebuildProgram=function(e,t,i,n){var r=this;this._isReady=!1,this._vertexSourceCodeOverride=e,this._fragmentSourceCodeOverride=t,this.onError=function(e,t){n&&n(t)},this.onCompiled=function(){var e=r.getEngine().scenes;if(e)for(var t=0;t<e.length;t++)e[t].markAllMaterialsAsDirty(_0x333f62.MATERIAL_AllDirtyFlag);r._pipelineContext._handlesSpectorRebuildCallback(i)},this._fallbacks=null,this._prepareEffect()},_0x57b60b.prototype._prepareEffect=function(){var e=this,t=this._attributesNames,i=this.defines,n=this._pipelineContext;this._isReady=!1;try{var r=this._engine;this._pipelineContext=r.createPipelineContext(this._processingContext),this._pipelineContext._name=this._key;var o=this._rebuildProgram.bind(this);this._compiledVertexWGSL&&this._compiledFragmentWGSL?r._preparePipelineContext(this._pipelineContext,this._compiledVertexWGSL,this._compiledFragmentWGSL,!0,this._rawVertexSourceCode,this._rawFragmentSourceCode,o,null,this._transformFeedbackVaryings,this._key,_0x3b3a87.WGSL):this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?r._preparePipelineContext(this._pipelineContext,this._vertexSourceCodeOverride,this._fragmentSourceCodeOverride,!0,this._rawVertexSourceCode,this._rawFragmentSourceCode,o,null,this._transformFeedbackVaryings,this._key):r._preparePipelineContext(this._pipelineContext,this._vertexSourceCode,this._fragmentSourceCode,!1,this._rawVertexSourceCode,this._rawFragmentSourceCode,o,i,this._transformFeedbackVaryings,this._key),r._executeWhenRenderingStateIsCompiled(this._pipelineContext,(function(){if(e._attributes=[],e._pipelineContext._fillEffectInformation(e,e._uniformBuffersNames,e._uniformsNames,e._uniforms,e._samplerList,e._samplers,t,e._attributes),t)for(var i=0;i<t.length;i++){var o=t[i];e._attributeLocationByName[o]=e._attributes[i]}r.bindSamplers(e),e._compilationError="",e._isReady=!0,e.onCompiled&&e.onCompiled(e),e.onCompileObservable.notifyObservers(e),e.onCompileObservable.clear(),e._fallbacks&&e._fallbacks.unBindMesh(),n&&e.getEngine()._deletePipelineContext(n)})),this._pipelineContext.isAsync&&this._checkIsReady(n)}catch(e){this._processCompilationErrors(e,n)}},_0x57b60b.prototype._getShaderCodeAndErrorLine=function(e,t,i){var n=i?/FRAGMENT SHADER ERROR: 0:(\d+?):/:/VERTEX SHADER ERROR: 0:(\d+?):/,r=null;if(t&&e){var o=t.match(n);if(o&&2===o.length){var a=parseInt(o[1]),s=e.split("\n",-1);s.length>=a&&(r="Offending line [".concat(a,"] in ").concat(i?"fragment":"vertex"," code: ").concat(s[a-1]))}}return[e,r]},_0x57b60b.prototype._processCompilationErrors=function(e,t){var i,n,r,o,a;void 0===t&&(t=null),this._compilationError=e.message;var s=this._attributesNames,l=this._fallbacks;if(_0x50f23a.Error("Unable to compile compute effect:"),_0x50f23a.Error("Uniforms: "+this._uniformsNames.map((function(e){return" "+e}))),_0x50f23a.Error("Attributes: "+s.map((function(e){return" "+e}))),_0x50f23a.Error("Defines:\r\n"+this.defines),_0x57b60b.LogShaderCodeOnCompilationError){var u=null,c=null,h=null;(null===(r=this._pipelineContext)||void 0===r?void 0:r._getVertexShaderCode())&&(h=(i=this._getShaderCodeAndErrorLine(this._pipelineContext._getVertexShaderCode(),this._compilationError,!1))[0],u=i[1],h&&(_0x50f23a.Error("Vertex code:"),_0x50f23a.Error(h))),(null===(o=this._pipelineContext)||void 0===o?void 0:o._getFragmentShaderCode())&&(h=(n=this._getShaderCodeAndErrorLine(null===(a=this._pipelineContext)||void 0===a?void 0:a._getFragmentShaderCode(),this._compilationError,!0))[0],c=n[1],h&&(_0x50f23a.Error("Fragment code:"),_0x50f23a.Error(h))),u&&_0x50f23a.Error(u),c&&_0x50f23a.Error(c)}_0x50f23a.Error("Error: "+this._compilationError),t&&(this._pipelineContext=t,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this)),l?(this._pipelineContext=null,l.hasMoreFallbacks?(this._allFallbacksProcessed=!1,_0x50f23a.Error("Trying next fallback."),this.defines=l.reduce(this.defines,this),this._prepareEffect()):(this._allFallbacksProcessed=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this),this.onErrorObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh())):this._allFallbacksProcessed=!0},Object.defineProperty(_0x57b60b.prototype,"isSupported",{get:function(){return""===this._compilationError},enumerable:!1,configurable:!0}),_0x57b60b.prototype._bindTexture=function(e,t){this._engine._bindTexture(this._samplers[e],t,e)},_0x57b60b.prototype.setTexture=function(e,t){this._engine.setTexture(this._samplers[e],this._uniforms[e],t,e)},_0x57b60b.prototype.setDepthStencilTexture=function(e,t){this._engine.setDepthStencilTexture(this._samplers[e],this._uniforms[e],t,e)},_0x57b60b.prototype.setTextureArray=function(e,t){var i=e+"Ex";if(-1===this._samplerList.indexOf(i+"0")){for(var n=this._samplerList.indexOf(e),r=1;r<t.length;r++){var o=i+(r-1).toString();this._samplerList.splice(n+r,0,o)}for(var a=0,s=0,l=this._samplerList;s<l.length;s++){var u=l[s];this._samplers[u]=a,a+=1}}this._engine.setTextureArray(this._samplers[e],this._uniforms[e],t,e)},_0x57b60b.prototype.setTextureFromPostProcess=function(e,t){this._engine.setTextureFromPostProcess(this._samplers[e],t,e)},_0x57b60b.prototype.setTextureFromPostProcessOutput=function(e,t){this._engine.setTextureFromPostProcessOutput(this._samplers[e],t,e)},_0x57b60b.prototype.bindUniformBuffer=function(e,t){var i=this._uniformBuffersNames[t];void 0===i||_0x57b60b._BaseCache[i]===e&&this._engine._features.useUBOBindingCache||(_0x57b60b._BaseCache[i]=e,this._engine.bindUniformBufferBase(e,i,t))},_0x57b60b.prototype.bindUniformBlock=function(e,t){this._engine.bindUniformBlock(this._pipelineContext,e,t)},_0x57b60b.prototype.setInt=function(e,t){return this._pipelineContext.setInt(e,t),this},_0x57b60b.prototype.setInt2=function(e,t,i){return this._pipelineContext.setInt2(e,t,i),this},_0x57b60b.prototype.setInt3=function(e,t,i,n){return this._pipelineContext.setInt3(e,t,i,n),this},_0x57b60b.prototype.setInt4=function(e,t,i,n,r){return this._pipelineContext.setInt4(e,t,i,n,r),this},_0x57b60b.prototype.setIntArray=function(e,t){return this._pipelineContext.setIntArray(e,t),this},_0x57b60b.prototype.setIntArray2=function(e,t){return this._pipelineContext.setIntArray2(e,t),this},_0x57b60b.prototype.setIntArray3=function(e,t){return this._pipelineContext.setIntArray3(e,t),this},_0x57b60b.prototype.setIntArray4=function(e,t){return this._pipelineContext.setIntArray4(e,t),this},_0x57b60b.prototype.setFloatArray=function(e,t){return this._pipelineContext.setArray(e,t),this},_0x57b60b.prototype.setFloatArray2=function(e,t){return this._pipelineContext.setArray2(e,t),this},_0x57b60b.prototype.setFloatArray3=function(e,t){return this._pipelineContext.setArray3(e,t),this},_0x57b60b.prototype.setFloatArray4=function(e,t){return this._pipelineContext.setArray4(e,t),this},_0x57b60b.prototype.setArray=function(e,t){return this._pipelineContext.setArray(e,t),this},_0x57b60b.prototype.setArray2=function(e,t){return this._pipelineContext.setArray2(e,t),this},_0x57b60b.prototype.setArray3=function(e,t){return this._pipelineContext.setArray3(e,t),this},_0x57b60b.prototype.setArray4=function(e,t){return this._pipelineContext.setArray4(e,t),this},_0x57b60b.prototype.setMatrices=function(e,t){return this._pipelineContext.setMatrices(e,t),this},_0x57b60b.prototype.setMatrix=function(e,t){return this._pipelineContext.setMatrix(e,t),this},_0x57b60b.prototype.setMatrix3x3=function(e,t){return this._pipelineContext.setMatrix3x3(e,t),this},_0x57b60b.prototype.setMatrix2x2=function(e,t){return this._pipelineContext.setMatrix2x2(e,t),this},_0x57b60b.prototype.setFloat=function(e,t){return this._pipelineContext.setFloat(e,t),this},_0x57b60b.prototype.setBool=function(e,t){return this._pipelineContext.setInt(e,t?1:0),this},_0x57b60b.prototype.setVector2=function(e,t){return this._pipelineContext.setVector2(e,t),this},_0x57b60b.prototype.setFloat2=function(e,t,i){return this._pipelineContext.setFloat2(e,t,i),this},_0x57b60b.prototype.setVector3=function(e,t){return this._pipelineContext.setVector3(e,t),this},_0x57b60b.prototype.setFloat3=function(e,t,i,n){return this._pipelineContext.setFloat3(e,t,i,n),this},_0x57b60b.prototype.setVector4=function(e,t){return this._pipelineContext.setVector4(e,t),this},_0x57b60b.prototype.setFloat4=function(e,t,i,n,r){return this._pipelineContext.setFloat4(e,t,i,n,r),this},_0x57b60b.prototype.setColor3=function(e,t){return this._pipelineContext.setColor3(e,t),this},_0x57b60b.prototype.setColor4=function(e,t,i){return this._pipelineContext.setColor4(e,t,i),this},_0x57b60b.prototype.setDirectColor4=function(e,t){return this._pipelineContext.setDirectColor4(e,t),this},_0x57b60b.prototype.dispose=function(){this._pipelineContext&&this._pipelineContext.dispose(),this._engine._releaseEffect(this),this._isDisposed=!0},_0x57b60b.RegisterShader=function(e,t,i,n){void 0===n&&(n=_0x3b3a87.GLSL),t&&(_0x266979.GetShadersStore(n)["".concat(e,"PixelShader")]=t),i&&(_0x266979.GetShadersStore(n)["".concat(e,"VertexShader")]=i)},_0x57b60b.ResetCache=function(){_0x57b60b._BaseCache={}},_0x57b60b.LogShaderCodeOnCompilationError=!0,_0x57b60b._UniqueIdSeed=0,_0x57b60b._BaseCache={},_0x57b60b.ShadersStore=_0x266979.ShadersStore,_0x57b60b.IncludesShadersStore=_0x266979.IncludesShadersStore;var _0x662e7f=(_0x343b88=!0,function(e,t){var i=_0x343b88?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x343b88=!1,i}),_0x436079=_0x662e7f(void 0,(function(){return _0x436079.toString().search("(((.+)+)+)+$").toString().constructor(_0x436079).search("(((.+)+)+)+$")})),_0x343b88;function _0x29840c(){}_0x436079(),_0x29840c.prototype._addUniformToLeftOverUBO=function(e,t,i){var n,r;e=(n=this._getArraySize(e,t,i))[0],t=n[1],r=n[2];for(var o=0;o<this._webgpuProcessingContext.leftOverUniforms.length;o++)if(this._webgpuProcessingContext.leftOverUniforms[o].name===e)return;this._webgpuProcessingContext.leftOverUniforms.push({name:e,type:t,length:r})},_0x29840c.prototype._buildLeftOverUBO=function(){if(!this._webgpuProcessingContext.leftOverUniforms.length)return"";var e=_0x29840c.LeftOvertUBOName,t=this._webgpuProcessingContext.availableBuffers[e];return!t&&(t={binding:this._webgpuProcessingContext.getNextFreeUBOBinding()},this._webgpuProcessingContext.availableBuffers[e]=t,this._addBufferBindingDescription(e,t,_0x5213c6.BufferBindingType.Uniform,!0),this._addBufferBindingDescription(e,t,_0x5213c6.BufferBindingType.Uniform,!1)),this._generateLeftOverUBOCode(e,t)},_0x29840c.prototype._collectBindingNames=function(){for(var e=0;e<this._webgpuProcessingContext.bindGroupLayoutEntries.length;e++){var t=this._webgpuProcessingContext.bindGroupLayoutEntries[e];if(void 0!==t)for(var i=0;i<t.length;i++){var n=this._webgpuProcessingContext.bindGroupLayoutEntries[e][i],r=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[e][n.binding].name,o=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[e][n.binding].nameInArrayOfTexture;n&&(n.texture||n.externalTexture||n.storageTexture?this._webgpuProcessingContext.textureNames.push(o):n.sampler?this._webgpuProcessingContext.samplerNames.push(r):n.buffer&&this._webgpuProcessingContext.bufferNames.push(r))}else this._webgpuProcessingContext.bindGroupLayoutEntries[e]=[]}},_0x29840c.prototype._preCreateBindGroupEntries=function(){for(var e=this._webgpuProcessingContext.bindGroupEntries,t=0;t<this._webgpuProcessingContext.bindGroupLayoutEntries.length;t++){for(var i=this._webgpuProcessingContext.bindGroupLayoutEntries[t],n=[],r=0;r<i.length;r++){var o=this._webgpuProcessingContext.bindGroupLayoutEntries[t][r];o.sampler||o.texture||o.storageTexture||o.externalTexture?n.push({binding:o.binding,resource:void 0}):o.buffer&&n.push({binding:o.binding,resource:{buffer:void 0,offset:0,size:0}})}e[t]=n}},_0x29840c.prototype._addTextureBindingDescription=function(e,t,i,n,r,o){var a=t.textures[i],s=a.groupIndex,l=a.bindingIndex;if(!this._webgpuProcessingContext.bindGroupLayoutEntries[s]&&(this._webgpuProcessingContext.bindGroupLayoutEntries[s]=[],this._webgpuProcessingContext.bindGroupLayoutEntryInfo[s]=[]),!this._webgpuProcessingContext.bindGroupLayoutEntryInfo[s][l]){var u=void 0;u=null===n?this._webgpuProcessingContext.bindGroupLayoutEntries[s].push({binding:l,visibility:0,externalTexture:{}}):r?this._webgpuProcessingContext.bindGroupLayoutEntries[s].push({binding:l,visibility:0,storageTexture:{access:_0x5213c6.StorageTextureAccess.WriteOnly,format:r,viewDimension:n}}):this._webgpuProcessingContext.bindGroupLayoutEntries[s].push({binding:l,visibility:0,texture:{sampleType:t.sampleType,viewDimension:n,multisampled:t.isMultisampled}});var c=t.isTextureArray?e+i:e;this._webgpuProcessingContext.bindGroupLayoutEntryInfo[s][l]={name:e,index:u-1,nameInArrayOfTexture:c}}l=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[s][l].index,this._webgpuProcessingContext.bindGroupLayoutEntries[s][l].visibility|=o?_0x5213c6.ShaderStage.Vertex:_0x5213c6.ShaderStage.Fragment},_0x29840c.prototype._addSamplerBindingDescription=function(e,t,i){var n=t.binding,r=n.groupIndex,o=n.bindingIndex;if(!this._webgpuProcessingContext.bindGroupLayoutEntries[r]&&(this._webgpuProcessingContext.bindGroupLayoutEntries[r]=[],this._webgpuProcessingContext.bindGroupLayoutEntryInfo[r]=[]),!this._webgpuProcessingContext.bindGroupLayoutEntryInfo[r][o]){var a=this._webgpuProcessingContext.bindGroupLayoutEntries[r].push({binding:o,visibility:0,sampler:{type:t.type}});this._webgpuProcessingContext.bindGroupLayoutEntryInfo[r][o]={name:e,index:a-1}}o=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[r][o].index,this._webgpuProcessingContext.bindGroupLayoutEntries[r][o].visibility|=i?_0x5213c6.ShaderStage.Vertex:_0x5213c6.ShaderStage.Fragment},_0x29840c.prototype._addBufferBindingDescription=function(e,t,i,n){var r=t.binding,o=r.groupIndex,a=r.bindingIndex;if(!this._webgpuProcessingContext.bindGroupLayoutEntries[o]&&(this._webgpuProcessingContext.bindGroupLayoutEntries[o]=[],this._webgpuProcessingContext.bindGroupLayoutEntryInfo[o]=[]),!this._webgpuProcessingContext.bindGroupLayoutEntryInfo[o][a]){var s=this._webgpuProcessingContext.bindGroupLayoutEntries[o].push({binding:a,visibility:0,buffer:{type:i}});this._webgpuProcessingContext.bindGroupLayoutEntryInfo[o][a]={name:e,index:s-1}}a=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[o][a].index,this._webgpuProcessingContext.bindGroupLayoutEntries[o][a].visibility|=n?_0x5213c6.ShaderStage.Vertex:_0x5213c6.ShaderStage.Fragment},_0x29840c.prototype._injectStartingAndEndingCode=function(e,t,i,n){if(i){var r=e.indexOf(t);if(r>=0){for(;r++<e.length&&"{"!=e.charAt(r););if(r<e.length){for(;r++<e.length&&"\n"!=e.charAt(r););if(r<e.length){var o=e.substring(0,r+1),a=e.substring(r+1);e=o+i+a}}}}if(n){var s=e.lastIndexOf("}");e=e.substring(0,s),e+=n+"\n}"}return e},_0x29840c.AutoSamplerSuffix="Sampler",_0x29840c.LeftOvertUBOName="LeftOver",_0x29840c.InternalsUBOName="Internals",_0x29840c.UniformSizes={bool:1,int:1,float:1,vec2:2,ivec2:2,vec3:3,ivec3:3,vec4:4,ivec4:4,mat2:4,mat3:12,mat4:16,i32:1,u32:1,f32:1,mat2x2:4,mat3x3:12,mat4x4:16},_0x29840c._SamplerFunctionByWebGLSamplerType={sampler2D:"sampler2D",sampler2DArray:"sampler2DArray",sampler2DShadow:"sampler2DShadow",sampler2DArrayShadow:"sampler2DArrayShadow",samplerCube:"samplerCube",sampler3D:"sampler3D"},_0x29840c._TextureTypeByWebGLSamplerType={sampler2D:"texture2D",sampler2DArray:"texture2DArray",sampler2DShadow:"texture2D",sampler2DArrayShadow:"texture2DArray",samplerCube:"textureCube",samplerCubeArray:"textureCubeArray",sampler3D:"texture3D"},_0x29840c._GpuTextureViewDimensionByWebGPUTextureType={textureCube:_0x5213c6.TextureViewDimension.Cube,textureCubeArray:_0x5213c6.TextureViewDimension.CubeArray,texture2D:_0x5213c6.TextureViewDimension.E2d,texture2DArray:_0x5213c6.TextureViewDimension.E2dArray,texture3D:_0x5213c6.TextureViewDimension.E3d},_0x29840c._SamplerTypeByWebGLSamplerType={sampler2DShadow:"samplerShadow",sampler2DArrayShadow:"samplerShadow"},_0x29840c._IsComparisonSamplerByWebGPUSamplerType={samplerShadow:!0,samplerArrayShadow:!0,sampler:!1};var _0x2ce34c=(_0xd7212b=!0,function(e,t){var i=_0xd7212b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd7212b=!1,i}),_0x30e683=_0x2ce34c(void 0,(function(){return _0x30e683.toString().search("(((.+)+)+)+$").toString().constructor(_0x30e683).search("(((.+)+)+)+$")})),_0xd7212b;function _0x2a8456(e,t){this._name="unnamed",this.shaderProcessingContext=e,this._leftOverUniformsByName={},this.engine=t}_0x30e683(),Object.defineProperty(_0x2a8456.prototype,"isAsync",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2a8456.prototype,"isReady",{get:function(){return!!this.stages},enumerable:!1,configurable:!0}),_0x2a8456.prototype._handlesSpectorRebuildCallback=function(){},_0x2a8456.prototype._fillEffectInformation=function(e,t,i,n,r,o,a,s){var l=this.engine;e._fragmentSourceCode="",e._vertexSourceCode="";var u,c=this.shaderProcessingContext.availableTextures;for(u=0;u<r.length;u++){var h=r[u],d=c[r[u]];null==d||null==d?(r.splice(u,1),u--):o[h]=u}for(var f=0,p=l.getAttributes(this,a);f<p.length;f++){var _=p[f];s.push(_)}this.buildUniformLayout();var m=[],g=[];for(u=0;u<a.length;u++){var x=s[u];x>=0&&(m.push(a[u]),g.push(x))}this.shaderProcessingContext.attributeNamesFromEffect=m,this.shaderProcessingContext.attributeLocationsFromEffect=g},_0x2a8456.prototype.buildUniformLayout=function(){if(this.shaderProcessingContext.leftOverUniforms.length){this.uniformBuffer=new _0x5c4ccd(this.engine,void 0,void 0,"leftOver-"+this._name);for(var e=0,t=this.shaderProcessingContext.leftOverUniforms;e<t.length;e++){var i=t[e],n=i.type.replace(/^(.*?)(<.*>)?$/,"$1"),r=_0x29840c.UniformSizes[n];this.uniformBuffer.addUniform(i.name,r,i.length),this._leftOverUniformsByName[i.name]=i.type}this.uniformBuffer.create()}},_0x2a8456.prototype.dispose=function(){this.uniformBuffer&&this.uniformBuffer.dispose()},_0x2a8456.prototype.setInt=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt(e,t)},_0x2a8456.prototype.setInt2=function(e,t,i){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt2(e,t,i)},_0x2a8456.prototype.setInt3=function(e,t,i,n){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt3(e,t,i,n)},_0x2a8456.prototype.setInt4=function(e,t,i,n,r){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt4(e,t,i,n,r)},_0x2a8456.prototype.setIntArray=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateIntArray(e,t)},_0x2a8456.prototype.setIntArray2=function(e,t){this.setIntArray(e,t)},_0x2a8456.prototype.setIntArray3=function(e,t){this.setIntArray(e,t)},_0x2a8456.prototype.setIntArray4=function(e,t){this.setIntArray(e,t)},_0x2a8456.prototype.setArray=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateArray(e,t)},_0x2a8456.prototype.setArray2=function(e,t){this.setArray(e,t)},_0x2a8456.prototype.setArray3=function(e,t){this.setArray(e,t)},_0x2a8456.prototype.setArray4=function(e,t){this.setArray(e,t)},_0x2a8456.prototype.setMatrices=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrices(e,t)},_0x2a8456.prototype.setMatrix=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix(e,t)},_0x2a8456.prototype.setMatrix3x3=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix3x3(e,t)},_0x2a8456.prototype.setMatrix2x2=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix2x2(e,t)},_0x2a8456.prototype.setFloat=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat(e,t)},_0x2a8456.prototype.setVector2=function(e,t){this.setFloat2(e,t.x,t.y)},_0x2a8456.prototype.setFloat2=function(e,t,i){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat2(e,t,i)},_0x2a8456.prototype.setVector3=function(e,t){this.setFloat3(e,t.x,t.y,t.z)},_0x2a8456.prototype.setFloat3=function(e,t,i,n){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat3(e,t,i,n)},_0x2a8456.prototype.setVector4=function(e,t){this.setFloat4(e,t.x,t.y,t.z,t.w)},_0x2a8456.prototype.setFloat4=function(e,t,i,n,r){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat4(e,t,i,n,r)},_0x2a8456.prototype.setColor3=function(e,t){this.setFloat3(e,t.r,t.g,t.b)},_0x2a8456.prototype.setColor4=function(e,t,i){this.setFloat4(e,t.r,t.g,t.b,i)},_0x2a8456.prototype.setDirectColor4=function(e,t){this.setFloat4(e,t.r,t.g,t.b,t.a)},_0x2a8456.prototype._getVertexShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.vertex},_0x2a8456.prototype._getFragmentShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.fragment};var _0x4f454c=(_0x3508a9=!0,function(e,t){var i=_0x3508a9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3508a9=!1,i}),_0x13efa0=_0x4f454c(void 0,(function(){return _0x13efa0.toString().search("(((.+)+)+)+$").toString().constructor(_0x13efa0).search("(((.+)+)+)+$")})),_0x3508a9;_0x13efa0();var _0x51aabd=4,_0x19e3c3=65536,_0x1d9cfd={mat2:2,mat3:3,mat4:4,mat2x2:2,mat3x3:3,mat4x4:4};function _0x27ae2e(e){this.shaderLanguage=e,this._attributeNextLocation=0,this._varyingNextLocation=0,this.freeGroupIndex=0,this.freeBindingIndex=0,this.availableVaryings={},this.availableAttributes={},this.availableBuffers={},this.availableTextures={},this.availableSamplers={},this.orderedAttributes=[],this.bindGroupLayoutEntries=[],this.bindGroupLayoutEntryInfo=[],this.bindGroupEntries=[],this.bufferNames=[],this.textureNames=[],this.samplerNames=[],this.leftOverUniforms=[],this._findStartingGroupBinding()}Object.defineProperty(_0x27ae2e,"KnownUBOs",{get:function(){return _0x27ae2e._SimplifiedKnownBindings?_0x27ae2e._SimplifiedKnownUBOs:_0x27ae2e._KnownUBOs},enumerable:!1,configurable:!0}),_0x27ae2e.prototype._findStartingGroupBinding=function(){var e=_0x27ae2e.KnownUBOs,t=[];for(var i in e){var n=e[i].binding;-1!==n.groupIndex&&(void 0===t[n.groupIndex]?t[n.groupIndex]=n.bindingIndex:t[n.groupIndex]=Math.max(t[n.groupIndex],n.bindingIndex))}this.freeGroupIndex=t.length-1,0===this.freeGroupIndex?(this.freeGroupIndex++,this.freeBindingIndex=0):this.freeBindingIndex=t[t.length-1]+1},_0x27ae2e.prototype.getAttributeNextLocation=function(e,t){var i;void 0===t&&(t=0);var n=this._attributeNextLocation;return this._attributeNextLocation+=(null!==(i=_0x1d9cfd[e])&&void 0!==i?i:1)*(t||1),n},_0x27ae2e.prototype.getVaryingNextLocation=function(e,t){var i;void 0===t&&(t=0);var n=this._varyingNextLocation;return this._varyingNextLocation+=(null!==(i=_0x1d9cfd[e])&&void 0!==i?i:1)*(t||1),n},_0x27ae2e.prototype.getNextFreeUBOBinding=function(){return this._getNextFreeBinding(1)},_0x27ae2e.prototype._getNextFreeBinding=function(e){if(this.freeBindingIndex>_0x19e3c3-e&&(this.freeGroupIndex++,this.freeBindingIndex=0),this.freeGroupIndex===_0x51aabd)throw"Too many textures or UBOs have been declared and it is not supported in WebGPU.";var t={groupIndex:this.freeGroupIndex,bindingIndex:this.freeBindingIndex};return this.freeBindingIndex+=e,t},_0x27ae2e._SimplifiedKnownBindings=!0,_0x27ae2e._SimplifiedKnownUBOs={Scene:{binding:{groupIndex:0,bindingIndex:0}},Light0:{binding:{groupIndex:-1,bindingIndex:-1}},Light1:{binding:{groupIndex:-1,bindingIndex:-1}},Light2:{binding:{groupIndex:-1,bindingIndex:-1}},Light3:{binding:{groupIndex:-1,bindingIndex:-1}},Light4:{binding:{groupIndex:-1,bindingIndex:-1}},Light5:{binding:{groupIndex:-1,bindingIndex:-1}},Light6:{binding:{groupIndex:-1,bindingIndex:-1}},Light7:{binding:{groupIndex:-1,bindingIndex:-1}},Light8:{binding:{groupIndex:-1,bindingIndex:-1}},Light9:{binding:{groupIndex:-1,bindingIndex:-1}},Light10:{binding:{groupIndex:-1,bindingIndex:-1}},Light11:{binding:{groupIndex:-1,bindingIndex:-1}},Light12:{binding:{groupIndex:-1,bindingIndex:-1}},Light13:{binding:{groupIndex:-1,bindingIndex:-1}},Light14:{binding:{groupIndex:-1,bindingIndex:-1}},Light15:{binding:{groupIndex:-1,bindingIndex:-1}},Light16:{binding:{groupIndex:-1,bindingIndex:-1}},Light17:{binding:{groupIndex:-1,bindingIndex:-1}},Light18:{binding:{groupIndex:-1,bindingIndex:-1}},Light19:{binding:{groupIndex:-1,bindingIndex:-1}},Light20:{binding:{groupIndex:-1,bindingIndex:-1}},Light21:{binding:{groupIndex:-1,bindingIndex:-1}},Light22:{binding:{groupIndex:-1,bindingIndex:-1}},Light23:{binding:{groupIndex:-1,bindingIndex:-1}},Light24:{binding:{groupIndex:-1,bindingIndex:-1}},Light25:{binding:{groupIndex:-1,bindingIndex:-1}},Light26:{binding:{groupIndex:-1,bindingIndex:-1}},Light27:{binding:{groupIndex:-1,bindingIndex:-1}},Light28:{binding:{groupIndex:-1,bindingIndex:-1}},Light29:{binding:{groupIndex:-1,bindingIndex:-1}},Light30:{binding:{groupIndex:-1,bindingIndex:-1}},Light31:{binding:{groupIndex:-1,bindingIndex:-1}},Material:{binding:{groupIndex:-1,bindingIndex:-1}},Mesh:{binding:{groupIndex:-1,bindingIndex:-1}},Internals:{binding:{groupIndex:-1,bindingIndex:-1}}},_0x27ae2e._KnownUBOs={Scene:{binding:{groupIndex:0,bindingIndex:0}},Light0:{binding:{groupIndex:1,bindingIndex:0}},Light1:{binding:{groupIndex:1,bindingIndex:1}},Light2:{binding:{groupIndex:1,bindingIndex:2}},Light3:{binding:{groupIndex:1,bindingIndex:3}},Light4:{binding:{groupIndex:1,bindingIndex:4}},Light5:{binding:{groupIndex:1,bindingIndex:5}},Light6:{binding:{groupIndex:1,bindingIndex:6}},Light7:{binding:{groupIndex:1,bindingIndex:7}},Light8:{binding:{groupIndex:1,bindingIndex:8}},Light9:{binding:{groupIndex:1,bindingIndex:9}},Light10:{binding:{groupIndex:1,bindingIndex:10}},Light11:{binding:{groupIndex:1,bindingIndex:11}},Light12:{binding:{groupIndex:1,bindingIndex:12}},Light13:{binding:{groupIndex:1,bindingIndex:13}},Light14:{binding:{groupIndex:1,bindingIndex:14}},Light15:{binding:{groupIndex:1,bindingIndex:15}},Light16:{binding:{groupIndex:1,bindingIndex:16}},Light17:{binding:{groupIndex:1,bindingIndex:17}},Light18:{binding:{groupIndex:1,bindingIndex:18}},Light19:{binding:{groupIndex:1,bindingIndex:19}},Light20:{binding:{groupIndex:1,bindingIndex:20}},Light21:{binding:{groupIndex:1,bindingIndex:21}},Light22:{binding:{groupIndex:1,bindingIndex:22}},Light23:{binding:{groupIndex:1,bindingIndex:23}},Light24:{binding:{groupIndex:1,bindingIndex:24}},Light25:{binding:{groupIndex:1,bindingIndex:25}},Light26:{binding:{groupIndex:1,bindingIndex:26}},Light27:{binding:{groupIndex:1,bindingIndex:27}},Light28:{binding:{groupIndex:1,bindingIndex:28}},Light29:{binding:{groupIndex:1,bindingIndex:29}},Light30:{binding:{groupIndex:1,bindingIndex:30}},Light31:{binding:{groupIndex:1,bindingIndex:31}},Material:{binding:{groupIndex:2,bindingIndex:0}},Mesh:{binding:{groupIndex:2,bindingIndex:1}},Internals:{binding:{groupIndex:2,bindingIndex:2}}};var _0x34223f=(_0x332c13=!0,function(e,t){var i=_0x332c13?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x332c13=!1,i}),_0x13203b=_0x34223f(void 0,(function(){return _0x13203b.toString().search("(((.+)+)+)+$").toString().constructor(_0x13203b).search("(((.+)+)+)+$")})),_0x332c13;function _0x4c4c07(){var e=_0x29840c.call(this,arguments)||this;return e._missingVaryings=[],e._textureArrayProcessing=[],e.shaderLanguage=_0x3b3a87.GLSL,e}function _0x4e0aea(e,t){for(var i=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),n=t.length,r=0;r<n;++r){var o=t[r];if(i.test(o))return!0}return!1}_0x13203b(),_0x4c4c07.prototype=Object.create(_0x29840c.prototype),_0x4c4c07.prototype.constructor=_0x29840c,_0x4c4c07.prototype._getArraySize=function(e,t,i){var n=0,r=e.indexOf("["),o=e.indexOf("]");if(r>0&&o>0){var a=e.substring(r+1,o);n=+a,isNaN(n)&&(n=+i[a.trim()]),e=e.substr(0,r)}return[e,t,n]},_0x4c4c07.prototype.initializeShaders=function(e){this._webgpuProcessingContext=e,this._missingVaryings.length=0,this._textureArrayProcessing.length=0},_0x4c4c07.prototype.preProcessShaderCode=function(e,t){var i="uniform ".concat(_0x29840c.InternalsUBOName," {\nfloat yFactor__;\nfloat textureOutputHeight__;\n};\n");return t?i+"##INJECTCODE##\n"+e:i+e},_0x4c4c07.prototype.varyingProcessor=function(e,t,i){this._preProcessors=i;var n=/\s*varying\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!=n){var r,o=n[1],a=n[2];t?(r=this._webgpuProcessingContext.availableVaryings[a],this._missingVaryings[r]="",void 0===r&&_0x50f23a.Warn('Invalid fragment shader: The varying named "'.concat(a,'" is not declared in the vertex shader! This declaration will be ignored.'))):(r=this._webgpuProcessingContext.getVaryingNextLocation(o,this._getArraySize(a,o,i)[2]),this._webgpuProcessingContext.availableVaryings[a]=r,this._missingVaryings[r]="layout(location = ".concat(r,") in ").concat(o," ").concat(a,";")),e=e.replace(n[0],void 0===r?"":"layout(location = ".concat(r,") ").concat(t?"in":"out"," ").concat(o," ").concat(a,";"))}return e},_0x4c4c07.prototype.attributeProcessor=function(e,t){this._preProcessors=t;var i=/\s*attribute\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!=i){var n=i[1],r=i[2],o=this._webgpuProcessingContext.getAttributeNextLocation(n,this._getArraySize(r,n,t)[2]);this._webgpuProcessingContext.availableAttributes[r]=o,this._webgpuProcessingContext.orderedAttributes[o]=r,e=e.replace(i[0],"layout(location = ".concat(o,") in ").concat(n," ").concat(r,";"))}return e},_0x4c4c07.prototype.uniformProcessor=function(e,t,i){var n,r;this._preProcessors=i;var o=/\s*uniform\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!=o){var a=o[1],s=o[2];if(0===a.indexOf("sampler")||1===a.indexOf("sampler")){var l=0;s=(n=this._getArraySize(s,a,i))[0],a=n[1],l=n[2];var u=this._webgpuProcessingContext.availableTextures[s];if(!u){u={autoBindSampler:!0,isTextureArray:l>0,isStorageTexture:!1,textures:[],sampleType:_0x5213c6.TextureSampleType.Float};for(var c=0;c<(l||1);++c)u.textures.push(this._webgpuProcessingContext.getNextFreeUBOBinding())}var h=null!==(r=_0x29840c._SamplerTypeByWebGLSamplerType[a])&&void 0!==r?r:"sampler",d=!!_0x29840c._IsComparisonSamplerByWebGPUSamplerType[h];s.indexOf("depth")>=0&&(d=!0);var f=d?_0x5213c6.SamplerBindingType.Comparison:_0x5213c6.SamplerBindingType.Filtering,p=s+_0x29840c.AutoSamplerSuffix,_=this._webgpuProcessingContext.availableSamplers[p];!_&&(_={binding:this._webgpuProcessingContext.getNextFreeUBOBinding(),type:f});var m="u"===a.charAt(0)?"u":"i"===a.charAt(0)?"i":"";m&&(a=a.substr(1));var g=d?_0x5213c6.TextureSampleType.Depth:"u"===m?_0x5213c6.TextureSampleType.Uint:"i"===m?_0x5213c6.TextureSampleType.Sint:_0x5213c6.TextureSampleType.Float;u.sampleType=g;var x=l>0,y=_.binding.groupIndex,v=_.binding.bindingIndex,$=_0x29840c._SamplerFunctionByWebGLSamplerType[a],b=_0x29840c._TextureTypeByWebGLSamplerType[a],T=_0x29840c._GpuTextureViewDimensionByWebGPUTextureType[b];if(x){var C=[];C.push("layout(set = ".concat(y,", binding = ").concat(v,") uniform ").concat(m).concat(h," ").concat(p,";")),e="\r\n";for(c=0;c<l;++c){var S=u.textures[c].groupIndex,w=u.textures[c].bindingIndex;C.push("layout(set = ".concat(S,", binding = ").concat(w,") uniform ").concat(b," ").concat(s,"Texture").concat(c,";")),e+="".concat(c>0?"\r\n":"","#define ").concat(s).concat(c," ").concat(m).concat($,"(").concat(s,"Texture").concat(c,", ").concat(p,")")}e=C.join("\r\n")+e,this._textureArrayProcessing.push(s)}else l=1,e="layout(set = ".concat(y,", binding = ").concat(v,") uniform ").concat(m).concat(h," ").concat(p,";\n layout(set = ").concat(u.textures[0].groupIndex,", binding = ").concat(u.textures[0].bindingIndex,") uniform ").concat(b," ").concat(s,"Texture;\n #define ").concat(s," ").concat(m).concat($,"(").concat(s,"Texture, ").concat(p,")");this._webgpuProcessingContext.availableTextures[s]=u,this._webgpuProcessingContext.availableSamplers[p]=_,this._addSamplerBindingDescription(p,_,!t);for(c=0;c<l;++c)this._addTextureBindingDescription(s,u,c,T,null,!t)}else this._addUniformToLeftOverUBO(s,a,i),e=""}return e},_0x4c4c07.prototype.uniformBufferProcessor=function(e,t){var i=/uniform\s+(\w+)/gm.exec(e);if(null!=i){var n=i[1],r=this._webgpuProcessingContext.availableBuffers[n];if(!r){var o=_0x27ae2e.KnownUBOs[n];r={binding:o&&-1!==o.binding.groupIndex?o.binding:this._webgpuProcessingContext.getNextFreeUBOBinding()},this._webgpuProcessingContext.availableBuffers[n]=r}this._addBufferBindingDescription(n,r,_0x5213c6.BufferBindingType.Uniform,!t),e=e.replace("uniform","layout(set = ".concat(r.binding.groupIndex,", binding = ").concat(r.binding.bindingIndex,") uniform"))}return e},_0x4c4c07.prototype.postProcessor=function(e,t,i,n,r){var o=e.search(/#extension.+GL_EXT_draw_buffers.+require/);o=-1!==e.search(/glFragData/);if(e=(e=e.replace(/#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g,"")).replace(/texture2D\s*\(/g,"texture("),i){var a,s,l=/##INJECTCODE##/,u=e.split("\n"),c=-1;for(a=0;a<u.length;++a)if(s=u[a],l.test(s)){c=a+1;break}if(c>-1&&_0x4e0aea("gl_FragColor",u)){var h=o?"":"layout(location = 0) out vec4 glFragColor;";u.splice(c,0,h),e=u.join("\n")}var d=e.indexOf("gl_FragCoord")>=0,f=d?"vec4 glFragCoord__;\n":"";e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/texture2DLodEXT\s*\(/g,"textureLod(")).replace(/textureCubeLodEXT\s*\(/g,"textureLod(")).replace(/textureCube\s*\(/g,"texture(")).replace(/gl_FragDepthEXT/g,"gl_FragDepth")).replace(/gl_FragColor/g,"glFragColor")).replace(/gl_FragData/g,"glFragData")).replace(/gl_FragCoord/g,"glFragCoord__")).replace(/dFdy/g,"(-yFactor__)*dFdy")).replace("##INJECTCODE##",f),d&&(e=this._injectStartingAndEndingCode(e,"void main","\n glFragCoord__ = gl_FragCoord;\n if (yFactor__ == 1.) {\n glFragCoord__.y = textureOutputHeight__ - glFragCoord__.y;\n }\n "))}else{if(e=(e=e.replace(/gl_InstanceID/g,"gl_InstanceIndex")).replace(/gl_VertexID/g,"gl_VertexIndex"),-1!==t.indexOf("#define MULTIVIEW"))return"#extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in;\n"+e}if(!i&&-1==e.indexOf("gl_Position.y *= yFactor__")){var p=e.lastIndexOf("}");e=e.substring(0,p),e+="gl_Position.y *= yFactor__;\n",!r.isNDCHalfZRange&&(e+="gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0;\n"),e+="}"}return e},_0x4c4c07.prototype._applyTextureArrayProcessing=function(e,t){for(var i=new RegExp(t+"\\s*\\[(.+)?\\]","gm"),n=i.exec(e);null!=n;){var r=n[1],o=+r;this._preProcessors&&isNaN(o)&&(o=+this._preProcessors[r.trim()]),e=e.replace(n[0],t+o),n=i.exec(e)}return e},_0x4c4c07.prototype._generateLeftOverUBOCode=function(e,t){for(var i="layout(set = ".concat(t.binding.groupIndex,", binding = ").concat(t.binding.bindingIndex,") uniform ").concat(e," {\n "),n=0,r=this._webgpuProcessingContext.leftOverUniforms;n<r.length;n++){var o=r[n];o.length>0?i+=" ".concat(o.type," ").concat(o.name,"[").concat(o.length,"];\n"):i+=" ".concat(o.type," ").concat(o.name,";\n")}return i+="};\n\n"},_0x4c4c07.prototype.finalizeShaders=function(e,t){for(var i=0;i<this._textureArrayProcessing.length;++i){var n=this._textureArrayProcessing[i];e=this._applyTextureArrayProcessing(e,n),t=this._applyTextureArrayProcessing(t,n)}for(i=0;i<this._missingVaryings.length;++i){var r=this._missingVaryings[i];r&&r.length>0&&(t=r+"\n"+t)}var o=this._buildLeftOverUBO();return e=o+e,t=o+t,this._collectBindingNames(),this._preCreateBindGroupEntries(),this._preProcessors=null,{vertexCode:e,fragmentCode:t}};var _0x12c200=(_0x40fc0d=!0,function(e,t){var i=_0x40fc0d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40fc0d=!1,i}),_0x8ca9f0=_0x12c200(void 0,(function(){return _0x8ca9f0.toString().search("(((.+)+)+)+$").toString().constructor(_0x8ca9f0).search("(((.+)+)+)+$")})),_0x40fc0d;function ExtractBetweenMarkers(e,t,i,n){for(var r=n,o=0,a="";r<i.length;){var s=i.charAt(r);if(a)s===a?'"'===a||"'"===a?"\\"!==i.charAt(r-1)&&(a=""):a="":"*/"===a&&"*"===s&&r+1<i.length&&("/"===i.charAt(r+1)&&(a=""),""===a&&r++);else switch(s){case e:o++;break;case t:o--;break;case'"':case"'":case"`":a=s;break;case"/":if(r+1<i.length){var l=i.charAt(r+1);"/"===l?a="\n":"*"===l&&(a="*/")}}if(r++,0===o)break}return 0===o?r-1:-1}function SkipWhitespaces(e,t){for(;t<e.length;){var i=e[t];if(" "!==i&&"\n"!==i&&"\r"!==i&&"\t"!==i&&"\n"!==i&&" "!==i)break;t++}return t}function IsIdentifierChar(e){var t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||95==t}function RemoveComments(e){for(var t=0,i="",n=!1,r=[];t<e.length;){var o=e.charAt(t);if(i)o===i?'"'===i||"'"===i?("\\"!==e.charAt(t-1)&&(i=""),r.push(o)):(i="",n=!1):"*/"===i&&"*"===o&&t+1<e.length?("/"===e.charAt(t+1)&&(i=""),""===i&&(n=!1,t++)):!n&&r.push(o);else{switch(o){case'"':case"'":case"`":i=o;break;case"/":if(t+1<e.length){var a=e.charAt(t+1);"/"===a?(i="\n",n=!0):"*"===a&&(i="*/",n=!0)}}!n&&r.push(o)}t++}return r.join("")}function FindBackward(e,t,i){for(;t>=0&&e.charAt(t)!==i;)t--;return t}function EscapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}_0x8ca9f0();var _0x43ecbd=(_0x260a68=!0,function(e,t){var i=_0x260a68?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x260a68=!1,i}),_0x2a22f3=_0x43ecbd(void 0,(function(){return _0x2a22f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a22f3).search("(((.+)+)+)+$")})),_0x260a68;_0x2a22f3();var _0x541e83="gl_VertexID",_0x1cea8e="gl_InstanceID",_0x51d2f3="gl_Position",_0x3356f5="gl_FragCoord",_0x9f8a66="gl_FrontFacing",_0x297cdd="gl_FragDepth",_0x518291="gl_FragColor",_0x2a42cf="gl_FragData",_0x340689=["gl_FragData0","gl_FragData1","gl_FragData2","gl_FragData3","gl_FragData4","gl_FragData5","gl_FragData6","gl_FragData7"],_0x579bde="uniforms",_0x30f05b="internals",_0x5b83a6={texture_1d:_0x5213c6.TextureViewDimension.E1d,texture_2d:_0x5213c6.TextureViewDimension.E2d,texture_2d_array:_0x5213c6.TextureViewDimension.E2dArray,texture_3d:_0x5213c6.TextureViewDimension.E3d,texture_cube:_0x5213c6.TextureViewDimension.Cube,texture_cube_array:_0x5213c6.TextureViewDimension.CubeArray,texture_multisampled_2d:_0x5213c6.TextureViewDimension.E2d,texture_depth_2d:_0x5213c6.TextureViewDimension.E2d,texture_depth_2d_array:_0x5213c6.TextureViewDimension.E2dArray,texture_depth_cube:_0x5213c6.TextureViewDimension.Cube,texture_depth_cube_array:_0x5213c6.TextureViewDimension.CubeArray,texture_depth_multisampled_2d:_0x5213c6.TextureViewDimension.E2d,texture_storage_1d:_0x5213c6.TextureViewDimension.E1d,texture_storage_2d:_0x5213c6.TextureViewDimension.E2d,texture_storage_2d_array:_0x5213c6.TextureViewDimension.E2dArray,texture_storage_3d:_0x5213c6.TextureViewDimension.E3d,texture_external:null};function _0x422dbd(){var e=_0x29840c.call(this,arguments)||this;return e.shaderLanguage=_0x3b3a87.WGSL,e.uniformRegexp=/uniform\s+(\w+)\s*:\s*(.+)\s*;/,e.textureRegexp=/var\s+(\w+)\s*:\s*((array<\s*)?(texture_\w+)\s*(<\s*(.+)\s*>)?\s*(,\s*\w+\s*>\s*)?);/,e.noPrecision=!0,e}_0x422dbd.prototype=Object.create(_0x29840c.prototype),_0x422dbd.prototype.constructor=_0x29840c,_0x422dbd.prototype._getArraySize=function(e,t,i){var n=0,r=t.lastIndexOf(">");if(t.indexOf("array")>=0&&r>0){for(var o=r;o>0&&" "!==t.charAt(o)&&","!==t.charAt(o);)o--;var a=t.substring(o+1,r);for(n=+a,isNaN(n)&&(n=+i[a.trim()]);o>0&&(" "===t.charAt(o)||","===t.charAt(o));)o--;t=t.substring(t.indexOf("<")+1,o+1)}return[e,t,n]},_0x422dbd.prototype.initializeShaders=function(e){this._webgpuProcessingContext=e,this._attributesWGSL=[],this._attributesDeclWGSL=[],this._attributeNamesWGSL=[],this._varyingsWGSL=[],this._varyingsDeclWGSL=[],this._varyingNamesWGSL=[],this._stridedUniformArrays=[]},_0x422dbd.prototype.preProcessShaderCode=function(e){return"struct ".concat(_0x29840c.InternalsUBOName," {\nyFactor__: f32,\ntextureOutputHeight__: f32,\n};\nvar<uniform> ").concat(_0x30f05b," : ").concat(_0x29840c.InternalsUBOName,";\n")+RemoveComments(e)},_0x422dbd.prototype.varyingProcessor=function(e,t,i){var n=/\s*varying\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s*:\s*(.+)\s*;/gm.exec(e);if(null!==n){var r,o=n[2],a=n[1];t?void 0===(r=this._webgpuProcessingContext.availableVaryings[a])&&_0x50f23a.Warn('Invalid fragment shader: The varying named "'.concat(a,'" is not declared in the vertex shader! This declaration will be ignored.')):(r=this._webgpuProcessingContext.getVaryingNextLocation(o,this._getArraySize(a,o,i)[2]),this._webgpuProcessingContext.availableVaryings[a]=r,this._varyingsWGSL.push("@location(".concat(r,") ").concat(a," : ").concat(o,",")),this._varyingsDeclWGSL.push("var<private> ".concat(a," : ").concat(o,";")),this._varyingNamesWGSL.push(a)),e=""}return e},_0x422dbd.prototype.attributeProcessor=function(e,t){var i=/\s*attribute\s+(\S+)\s*:\s*(.+)\s*;/gm.exec(e);if(null!==i){var n=i[2],r=i[1],o=this._webgpuProcessingContext.getAttributeNextLocation(n,this._getArraySize(r,n,t)[2]);this._webgpuProcessingContext.availableAttributes[r]=o,this._webgpuProcessingContext.orderedAttributes[o]=r,this._attributesWGSL.push("@location(".concat(o,") ").concat(r," : ").concat(n,",")),this._attributesDeclWGSL.push("var<private> ".concat(r," : ").concat(n,";")),this._attributeNamesWGSL.push(r),e=""}return e},_0x422dbd.prototype.uniformProcessor=function(e,t,i){var n=this.uniformRegexp.exec(e);if(null!==n){var r=n[2],o=n[1];this._addUniformToLeftOverUBO(o,r,i),e=""}return e},_0x422dbd.prototype.textureProcessor=function(e,t,i){var n=this.textureRegexp.exec(e);if(null!==n){var r=n[1],o=n[2],a=!!n[3],s=n[4],l=s.indexOf("storage")>0,u=n[6],c=l?u.substring(0,u.indexOf(",")).trim():null,h=a?this._getArraySize(r,o,i)[2]:0,d=this._webgpuProcessingContext.availableTextures[r];if(d)h=d.textures.length;else{d={isTextureArray:h>0,isStorageTexture:l,textures:[],sampleType:_0x5213c6.TextureSampleType.Float,isMultisampled:!1},h=h||1;for(var f=0;f<h;++f)d.textures.push(this._webgpuProcessingContext.getNextFreeUBOBinding())}this._webgpuProcessingContext.availableTextures[r]=d;var p=s.indexOf("depth")>0,_=_0x5b83a6[s],m=p?_0x5213c6.TextureSampleType.Depth:"u32"===u?_0x5213c6.TextureSampleType.Uint:"i32"===u?_0x5213c6.TextureSampleType.Sint:_0x5213c6.TextureSampleType.Float;d.sampleType=m;var g=!!p&&s.indexOf("multisampled")>0;if(d.isMultisampled=g,void 0===_)throw"Can't get the texture dimension corresponding to the texture function \"".concat(s,'"!');if(a){var x=[];for(f=0;f<h;++f){var y=d.textures[f].groupIndex,v=d.textures[f].bindingIndex;x.push("@group(".concat(y,") @binding(").concat(v,") ").concat("var ",r).concat(f," : ").concat(s,"<f32>;"))}e=x.join("\r\n")}else{h=1;var $=d.textures[0],b=$.groupIndex,T=$.bindingIndex;e="@group(".concat(b,") @binding(").concat(T,") ").concat(e)}for(f=0;f<h;++f)this._addTextureBindingDescription(r,d,f,_,c,!t)}return e},_0x422dbd.prototype.postProcessor=function(e){return e},_0x422dbd.prototype.finalizeShaders=function(e,t){var i=t.indexOf("gl_FragCoord")>=0?"\n if (internals.yFactor__ == 1.) {\n gl_FragCoord.y = internals.textureOutputHeight__ - gl_FragCoord.y;\n }\n ":"";e=this._processSamplers(e,!0),t=this._processSamplers(t,!1),e=this._processCustomBuffers(e,!0),t=this._processCustomBuffers(t,!1);var n=this._buildLeftOverUBO();t=n+t,e=(e=n+e).replace(/#define /g,"//#define "),e=this._processStridedUniformArrays(e);var r=this._varyingsDeclWGSL.join("\n")+"\n",o="var<private> ".concat(_0x541e83," : u32;\nvar<private> ").concat(_0x1cea8e," : u32;\nvar<private> ").concat(_0x51d2f3," : vec4<f32>;\n"),a=this._attributesDeclWGSL.join("\n")+"\n",s="struct VertexInputs {\n @builtin(vertex_index) vertexIndex : u32,\n @builtin(instance_index) instanceIndex : u32,\n";this._attributesWGSL.length>0&&(s+=this._attributesWGSL.join("\n")),s+="\n};\n";var l="struct FragmentInputs {\n @builtin(position) position : vec4<f32>,\n";this._varyingsWGSL.length>0&&(l+=this._varyingsWGSL.join("\n")),e=o+s+a+(l+="\n};\n")+r+e;for(var u=" var output : FragmentInputs;\n ".concat(_0x541e83," = input.vertexIndex;\n ").concat(_0x1cea8e," = input.instanceIndex;\n"),c=0;c<this._attributeNamesWGSL.length;++c){var h=this._attributeNamesWGSL[c];u+=" ".concat(h," = input.").concat(h,";\n")}var d=" output.position = ".concat(_0x51d2f3,";\n output.position.y = output.position.y * internals.yFactor__;\n");for(c=0;c<this._varyingNamesWGSL.length;++c){var f=this._varyingNamesWGSL[c];d+=" output.".concat(f," = ").concat(f,";\n")}d+=" return output;",e=this._injectStartingAndEndingCode(e,"fn main",u,d),t=t.replace(/#define /g,"//#define "),t=(t=this._processStridedUniformArrays(t)).replace(/dpdy/g,"(-internals.yFactor__)*dpdy");var p="var<private> ".concat(_0x3356f5," : vec4<f32>;\nvar<private> ").concat(_0x9f8a66," : bool;\nvar<private> ").concat(_0x518291," : vec4<f32>;\nvar<private> ").concat(_0x297cdd," : f32;\n");p+="var<private> ".concat(_0x340689[0]," : vec4<f32>;\nvar<private> ").concat(_0x340689[1]," : vec4<f32>;\nvar<private> ").concat(_0x340689[2]," : vec4<f32>;\nvar<private> ").concat(_0x340689[3]," : vec4<f32>;\nvar<private> ").concat(_0x340689[4]," : vec4<f32>;\nvar<private> ").concat(_0x340689[5]," : vec4<f32>;\nvar<private> ").concat(_0x340689[6]," : vec4<f32>;\nvar<private> ").concat(_0x340689[7]," : vec4<f32>;\n");var _="struct FragmentInputs {\n @builtin(position) position : vec4<f32>,\n @builtin(front_facing) frontFacing : bool,\n";this._varyingsWGSL.length>0&&(_+=this._varyingsWGSL.join("\n")),_+="\n};\n";for(var m,g=!1,x=0,y=-1;x>=0;)if((x=t.indexOf(_0x2a42cf,x))>=0){var v=x+_0x2a42cf.length,$=t.substring(v,v+1);$=parseInt($),y=Math.max($,y),g=!0,x+=_0x2a42cf.length}if(g){m="struct FragmentOutputs {\n";for(var b=0;b<y+1;b++)m+=" @location ("+b+") "+_0x340689[b]+" : vec4<f32>,\n"}else m="struct FragmentOutputs {\n @location(0) color : vec4<f32>,\n";for(var T=!1,C=0;!(T||(C=t.indexOf(_0x297cdd,C))<0);){var S=C;for(T=!0;C>1&&"\n"!==t.charAt(C);){if("/"===t.charAt(C)&&"/"===t.charAt(C-1)){T=!1;break}C--}C=S+_0x297cdd.length}T&&(m+=" @builtin(frag_depth) fragDepth: f32,\n"),t=p+_+r+(m+="};\n")+t;var w=" var output : FragmentOutputs;\n ".concat(_0x3356f5," = input.position;\n ").concat(_0x9f8a66," = input.frontFacing;\n")+i;for(c=0;c<this._varyingNamesWGSL.length;++c){var E=this._varyingNamesWGSL[c];w+=" ".concat(E," = input.").concat(E,";\n")}var P="";if(g)for(b=0;b<y+1;b++)P+=" output."+_0x340689[b]+" = "+_0x340689[b]+";\n";else P=" output.color = ".concat(_0x518291,";\n");return T&&(P+=" output.fragDepth = ".concat(_0x297cdd,";\n")),P+=" return output;",t=this._injectStartingAndEndingCode(t,"fn main",w,P),this._collectBindingNames(),this._preCreateBindGroupEntries(),{vertexCode:e,fragmentCode:t}},_0x422dbd.prototype._generateLeftOverUBOCode=function(e,t){for(var i="",n="struct ".concat(e," {\n"),r=0,o=this._webgpuProcessingContext.leftOverUniforms;r<o.length;r++){var a=o[r],s=a.type.replace(/^(.*?)(<.*>)?$/,"$1"),l=_0x29840c.UniformSizes[s];if(a.length>0)if(l<=2){var u="".concat(e,"_").concat(this._stridedUniformArrays.length,"_strided_arr");i+="struct ".concat(u," {\n @size(16)\n el: ").concat(s,",\n }"),this._stridedUniformArrays.push(a.name),n+=" @align(16) ".concat(a.name," : array<").concat(u,", ").concat(a.length,">,\n")}else n+=" ".concat(a.name," : array<").concat(a.type,", ").concat(a.length,">,\n");else n+=" ".concat(a.name," : ").concat(a.type,",\n")}return n+="};\n",n="".concat(i,"\n").concat(n),n+="@group(".concat(t.binding.groupIndex,") @binding(").concat(t.binding.bindingIndex,") var<uniform> ").concat(_0x579bde," : ").concat(e,";\n")},_0x422dbd.prototype._processSamplers=function(e,t){for(var i=/var\s+(\w+Sampler)\s*:\s*(sampler|sampler_comparison)\s*;/gm;;){var n=i.exec(e);if(null===n)break;var r=n[1],o=n[2],a=r.indexOf(_0x29840c.AutoSamplerSuffix)===r.length-_0x29840c.AutoSamplerSuffix.length?r.substring(0,r.indexOf(_0x29840c.AutoSamplerSuffix)):null,s="sampler_comparison"===o?_0x5213c6.SamplerBindingType.Comparison:_0x5213c6.SamplerBindingType.Filtering;if(a){var l=this._webgpuProcessingContext.availableTextures[a];l&&(l.autoBindSampler=!0)}var u=this._webgpuProcessingContext.availableSamplers[r];!u&&(u={binding:this._webgpuProcessingContext.getNextFreeUBOBinding(),type:s},this._webgpuProcessingContext.availableSamplers[r]=u),this._addSamplerBindingDescription(r,u,t);var c=e.substring(0,n.index),h="@group(".concat(u.binding.groupIndex,") @binding(").concat(u.binding.bindingIndex,") "),d=e.substring(n.index);e=c+h+d,i.lastIndex+=h.length}return e},_0x422dbd.prototype._processCustomBuffers=function(e,t){for(var i=/var<\s*(uniform|storage)\s*(,\s*(read|read_write)\s*)?>\s+(\S+)\s*:\s*(\S+)\s*;/gm;;){var n=i.exec(e);if(null===n)break;var r=n[1],o=n[3],a=n[4],s=n[5],l=this._webgpuProcessingContext.availableBuffers[a];if(!l){var u="uniform"===r?_0x27ae2e.KnownUBOs[s]:null,c=void 0;u?(a=s,-1===(c=u.binding).groupIndex&&(c=this._webgpuProcessingContext.getNextFreeUBOBinding())):c=this._webgpuProcessingContext.getNextFreeUBOBinding(),l={binding:c},this._webgpuProcessingContext.availableBuffers[a]=l}this._addBufferBindingDescription(a,this._webgpuProcessingContext.availableBuffers[a],"read_write"===o?_0x5213c6.BufferBindingType.Storage:"storage"===r?_0x5213c6.BufferBindingType.ReadOnlyStorage:_0x5213c6.BufferBindingType.Uniform,t);var h=l.binding.groupIndex,d=l.binding.bindingIndex,f=e.substring(0,n.index),p="@group(".concat(h,") @binding(").concat(d,") "),_=e.substring(n.index);e=f+p+_,i.lastIndex+=p.length}return e},_0x422dbd.prototype._processStridedUniformArrays=function(e){for(var t=0,i=this._stridedUniformArrays;t<i.length;t++){var n=i[t];e=e.replace(new RegExp("".concat(n,"\\s*\\[(.*)\\]"),"g"),"".concat(n,"[$1].el"))}return e};var _0x180f8a=(_0x1b1d21=!0,function(e,t){var i=_0x1b1d21?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b1d21=!1,i}),_0x23934e=_0x180f8a(void 0,(function(){return _0x23934e.toString().search("(((.+)+)+)+$").toString().constructor(_0x23934e).search("(((.+)+)+)+$")})),_0x1b1d21;function _0x2a893c(){this.colorAttachmentGPUTextures=[],this.reset()}_0x23934e(),_0x2a893c.prototype.reset=function(e){void 0===e&&(e=!1),this.renderPass=null,e&&(this.renderPassDescriptor=null,this.colorAttachmentViewDescriptor=null,this.depthAttachmentViewDescriptor=null,this.colorAttachmentGPUTextures=[],this.depthTextureFormat=void 0)};var _0x40a744=(_0x43a8cd=!0,function(e,t){var i=_0x43a8cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43a8cd=!1,i}),_0x99968d=_0x40a744(void 0,(function(){return _0x99968d.toString().search("(((.+)+)+)+$").toString().constructor(_0x99968d).search("(((.+)+)+)+$")})),_0x43a8cd;_0x99968d();var _0x2a8d7d=[0,0,3,7,0,2,6,2,4,1,5,3,1],_0x2f7342=[0,64,32,96,16,80,48,112,8],_0x335c5a=[0,128,128,0,0,0,0,128,0,0,0,0,128],_0x2855c3;function _0x2335eb(e){this._samplers={},this._device=e,this.disabled=!1}_0x2335eb.GetSamplerHashCode=function(e){var t,i,n,r=e._cachedAnisotropicFilteringLevel&&e._cachedAnisotropicFilteringLevel>1?4:1;return _0x2a8d7d[e.samplingMode]+_0x2f7342[(e._comparisonFunction||514)-512+1]+_0x335c5a[e.samplingMode]+((null!==(t=e._cachedWrapU)&&void 0!==t?t:1)<<8)+((null!==(i=e._cachedWrapV)&&void 0!==i?i:1)<<10)+((null!==(n=e._cachedWrapR)&&void 0!==n?n:1)<<12)+((e.useMipMaps?1:0)<<14)+(r<<15)},_0x2335eb._GetSamplerFilterDescriptor=function(e,t){var i,n,r,o,a,s=e.useMipMaps;switch(e.samplingMode){case _0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST:i=_0x5213c6.FilterMode.Linear,n=_0x5213c6.FilterMode.Linear,r=_0x5213c6.FilterMode.Nearest,!s&&(o=a=0);break;case _0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR:case _0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE:i=_0x5213c6.FilterMode.Linear,n=_0x5213c6.FilterMode.Linear,s?r=_0x5213c6.FilterMode.Linear:(r=_0x5213c6.FilterMode.Nearest,o=a=0);break;case _0x333f62.TEXTURE_NEAREST_NEAREST_MIPLINEAR:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Nearest,s?r=_0x5213c6.FilterMode.Linear:(r=_0x5213c6.FilterMode.Nearest,o=a=0);break;case _0x333f62.TEXTURE_NEAREST_NEAREST_MIPNEAREST:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Nearest,r=_0x5213c6.FilterMode.Nearest,!s&&(o=a=0);break;case _0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Linear,r=_0x5213c6.FilterMode.Nearest,!s&&(o=a=0);break;case _0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Linear,s?r=_0x5213c6.FilterMode.Linear:(r=_0x5213c6.FilterMode.Nearest,o=a=0);break;case _0x333f62.TEXTURE_NEAREST_LINEAR:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Linear,r=_0x5213c6.FilterMode.Nearest,o=a=0;break;case _0x333f62.TEXTURE_NEAREST_NEAREST:case _0x333f62.TEXTURE_NEAREST_SAMPLINGMODE:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Nearest,r=_0x5213c6.FilterMode.Nearest,o=a=0;break;case _0x333f62.TEXTURE_LINEAR_NEAREST_MIPNEAREST:i=_0x5213c6.FilterMode.Linear,n=_0x5213c6.FilterMode.Nearest,r=_0x5213c6.FilterMode.Nearest,!s&&(o=a=0);break;case _0x333f62.TEXTURE_LINEAR_NEAREST_MIPLINEAR:i=_0x5213c6.FilterMode.Linear,n=_0x5213c6.FilterMode.Nearest,s?r=_0x5213c6.FilterMode.Linear:(r=_0x5213c6.FilterMode.Nearest,o=a=0);break;case _0x333f62.TEXTURE_LINEAR_LINEAR:case _0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE:i=_0x5213c6.FilterMode.Linear,n=_0x5213c6.FilterMode.Linear,r=_0x5213c6.FilterMode.Nearest,o=a=0;break;case _0x333f62.TEXTURE_LINEAR_NEAREST:i=_0x5213c6.FilterMode.Linear,n=_0x5213c6.FilterMode.Nearest,r=_0x5213c6.FilterMode.Nearest,o=a=0;break;default:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Nearest,r=_0x5213c6.FilterMode.Nearest,o=a=0}return t>1&&(0!==o||0!==a)?{magFilter:_0x5213c6.FilterMode.Linear,minFilter:_0x5213c6.FilterMode.Linear,mipmapFilter:_0x5213c6.FilterMode.Linear,anisotropyEnabled:!0}:{magFilter:i,minFilter:n,mipmapFilter:r,lodMinClamp:o,lodMaxClamp:a}},_0x2335eb._GetWrappingMode=function(e){switch(e){case _0x333f62.TEXTURE_WRAP_ADDRESSMODE:return _0x5213c6.AddressMode.Repeat;case _0x333f62.TEXTURE_CLAMP_ADDRESSMODE:return _0x5213c6.AddressMode.ClampToEdge;case _0x333f62.TEXTURE_MIRROR_ADDRESSMODE:return _0x5213c6.AddressMode.MirrorRepeat}return _0x5213c6.AddressMode.Repeat},_0x2335eb._GetSamplerWrappingDescriptor=function(e){return{addressModeU:this._GetWrappingMode(e._cachedWrapU),addressModeV:this._GetWrappingMode(e._cachedWrapV),addressModeW:this._GetWrappingMode(e._cachedWrapR)}},_0x2335eb._GetSamplerDescriptor=function(e){var t=e.useMipMaps&&e._cachedAnisotropicFilteringLevel&&e._cachedAnisotropicFilteringLevel>1?4:1,i=this._GetSamplerFilterDescriptor(e,t),n=p$19(i,this._GetSamplerWrappingDescriptor(e));return n=p$19(n,{compare:e._comparisonFunction?_0x2335eb.GetCompareFunction(e._comparisonFunction):void 0,maxAnisotropy:i.anisotropyEnabled?t:1})},_0x2335eb.GetCompareFunction=function(e){switch(e){case _0x333f62.ALWAYS:return _0x5213c6.CompareFunction.Always;case _0x333f62.EQUAL:return _0x5213c6.CompareFunction.Equal;case _0x333f62.GREATER:return _0x5213c6.CompareFunction.Greater;case _0x333f62.GEQUAL:return _0x5213c6.CompareFunction.GreaterEqual;case _0x333f62.LESS:return _0x5213c6.CompareFunction.Less;case _0x333f62.LEQUAL:return _0x5213c6.CompareFunction.LessEqual;case _0x333f62.NEVER:return _0x5213c6.CompareFunction.Never;case _0x333f62.NOTEQUAL:return _0x5213c6.CompareFunction.NotEqual;default:return _0x5213c6.CompareFunction.Less}},_0x2335eb.prototype.getSampler=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=0),this.disabled)return this._device.createSampler(_0x2335eb._GetSamplerDescriptor(e));t?i=0:0===i&&(i=_0x2335eb.GetSamplerHashCode(e));var n=t?void 0:this._samplers[i];return!n&&(n=this._device.createSampler(_0x2335eb._GetSamplerDescriptor(e)),!t&&(this._samplers[i]=n)),n},function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.StencilReadMask=0]="StencilReadMask",e[e.StencilWriteMask=1]="StencilWriteMask",e[e.DepthBias=2]="DepthBias",e[e.DepthBiasSlopeScale=3]="DepthBiasSlopeScale",e[e.DepthStencilState=4]="DepthStencilState",e[e.MRTAttachments1=5]="MRTAttachments1",e[e.MRTAttachments2=6]="MRTAttachments2",e[e.RasterizationState=7]="RasterizationState",e[e.ColorStates=8]="ColorStates",e[e.ShaderStage=9]="ShaderStage",e[e.TextureStage=10]="TextureStage",e[e.VertexState=11]="VertexState",e[e.NumStates=12]="NumStates"}(_0x2855c3||(_0x2855c3={}));var _0x2d6853={0:1,1:2,768:3,769:4,770:5,771:6,772:7,773:8,774:9,775:10,776:11,32769:12,32770:13,32771:12,32772:13},_0x389b43={0:0,7680:1,7681:2,7682:3,7683:4,5386:5,34055:6,34056:7};function _0x3c1da5(e,t,i){this.mrtTextureCount=0,this._device=e,this._useTextureStage=i,this._states=new Array(30),this._statesLength=0,this._stateDirtyLowestIndex=0,this._emptyVertexBuffer=t,this._mrtFormats=[],this._parameter={token:void 0,pipeline:null},this.disabled=!1,this.vertexBuffers=[],this._kMaxVertexBufferStride=e.limits.maxVertexBufferArrayStride||2048,this.reset()}_0x3c1da5.prototype.reset=function(){this._isDirty=!0,this.vertexBuffers.length=0,this.setAlphaToCoverage(!1),this.resetDepthCullingState(),this.setClampDepth(!1),this.setDepthBias(0),this._webgpuColorFormat=[_0x5213c6.TextureFormat.BGRA8Unorm],this.setColorFormat(_0x5213c6.TextureFormat.BGRA8Unorm),this.setMRT([]),this.setAlphaBlendEnabled(!1),this.setAlphaBlendFactors([null,null,null,null],[null,null]),this.setWriteMask(15),this.setDepthStencilFormat(_0x5213c6.TextureFormat.Depth24PlusStencil8),this.setStencilEnabled(!1),this.resetStencilState(),this.setBuffers(null,null,null),this._setTextureState(0)},Object.defineProperty(_0x3c1da5.prototype,"colorFormats",{get:function(){return this._mrtAttachments1>0?this._mrtFormats:this._webgpuColorFormat},enumerable:!1,configurable:!0}),_0x3c1da5.prototype.getRenderPipeline=function(e,t,i,n){if(void 0===n&&(n=0),i>1&&(i=4),this.disabled){var r=_0x3c1da5._GetTopology(e);return this._setVertexState(t),this._parameter.pipeline=this._createRenderPipeline(t,r,i),_0x3c1da5.NumCacheMiss++,_0x3c1da5._NumPipelineCreationCurrentFrame++,this._parameter.pipeline}if(this._setShaderStage(t.uniqueId),this._setRasterizationState(e,i),this._setColorStates(),this._setDepthStencilState(),this._setVertexState(t),this._setTextureState(n),this.lastStateDirtyLowestIndex=this._stateDirtyLowestIndex,!this._isDirty&&this._parameter.pipeline)return this._stateDirtyLowestIndex=this._statesLength,_0x3c1da5.NumCacheHitWithoutHash++,this._parameter.pipeline;if(this._getRenderPipeline(this._parameter),this._isDirty=!1,this._stateDirtyLowestIndex=this._statesLength,this._parameter.pipeline)return _0x3c1da5.NumCacheHitWithHash++,this._parameter.pipeline;var o=_0x3c1da5._GetTopology(e);return this._parameter.pipeline=this._createRenderPipeline(t,o,i),this._setRenderPipeline(this._parameter),_0x3c1da5.NumCacheMiss++,_0x3c1da5._NumPipelineCreationCurrentFrame++,this._parameter.pipeline},_0x3c1da5.prototype.endFrame=function(){_0x3c1da5.NumPipelineCreationLastFrame=_0x3c1da5._NumPipelineCreationCurrentFrame,_0x3c1da5._NumPipelineCreationCurrentFrame=0},_0x3c1da5.prototype.setAlphaToCoverage=function(e){this._alphaToCoverageEnabled=e},_0x3c1da5.prototype.setFrontFace=function(e){this._frontFace=e},_0x3c1da5.prototype.setCullEnabled=function(e){this._cullEnabled=e},_0x3c1da5.prototype.setCullFace=function(e){this._cullFace=e},_0x3c1da5.prototype.setClampDepth=function(e){this._clampDepth=e},_0x3c1da5.prototype.resetDepthCullingState=function(){this.setDepthCullingState(!1,2,1,0,0,!0,!0,_0x333f62.ALWAYS)},_0x3c1da5.prototype.setDepthCullingState=function(e,t,i,n,r,o,a,s){this._depthWriteEnabled=a,this._depthTestEnabled=o,this._depthCompare=(null!=s?s:_0x333f62.ALWAYS)-512,this._cullFace=i,this._cullEnabled=e,this._frontFace=t,this.setDepthBiasSlopeScale(n),this.setDepthBias(r)},_0x3c1da5.prototype.setDepthBias=function(e){this._depthBias!==e&&(this._depthBias=e,this._states[_0x2855c3.DepthBias]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.DepthBias))},_0x3c1da5.prototype.setDepthBiasSlopeScale=function(e){this._depthBiasSlopeScale!==e&&(this._depthBiasSlopeScale=e,this._states[_0x2855c3.DepthBiasSlopeScale]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.DepthBiasSlopeScale))},_0x3c1da5.prototype.setColorFormat=function(e){this._webgpuColorFormat[0]=e,this._colorFormat=renderableTextureFormatToIndex[null!=e?e:""]},_0x3c1da5.prototype.setMRTAttachments=function(e){this.mrtAttachments=e;for(var t=0,i=0;i<e.length;++i)0!==e[i]&&(t+=1<<i);this._mrtEnabledMask!==t&&(this._mrtEnabledMask=t,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.MRTAttachments1))},_0x3c1da5.prototype.setMRT=function(e,t){var i,n;if((t=null!=t?t:e.length)>10)throw"Can't handle more than 10 attachments for a MRT in cache render pipeline!";this.mrtTextureArray=e,this.mrtTextureCount=t,this._mrtEnabledMask=65535;for(var r=[0,0],o=0,a=0,s=0,l=0;l<t;++l){var u=e[l],c=null==u?void 0:u._hardwareTexture;this._mrtFormats[s]=null!==(i=null==c?void 0:c.format)&&void 0!==i?i:this._webgpuColorFormat[0],r[o]+=renderableTextureFormatToIndex[null!==(n=this._mrtFormats[s])&&void 0!==n?n:""]<<a,s++,(a+=6)>=32&&(a=0,o++)}this._mrtFormats.length=s,(this._mrtAttachments1!==r[0]||this._mrtAttachments2!==r[1])&&(this._mrtAttachments1=r[0],this._mrtAttachments2=r[1],this._states[_0x2855c3.MRTAttachments1]=r[0],this._states[_0x2855c3.MRTAttachments2]=r[1],this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.MRTAttachments1))},_0x3c1da5.prototype.setAlphaBlendEnabled=function(e){this._alphaBlendEnabled=e},_0x3c1da5.prototype.setAlphaBlendFactors=function(e,t){this._alphaBlendFuncParams=e,this._alphaBlendEqParams=t},_0x3c1da5.prototype.setWriteMask=function(e){this._writeMask=e},_0x3c1da5.prototype.setDepthStencilFormat=function(e){this._webgpuDepthStencilFormat=e,this._depthStencilFormat=void 0===e?0:renderableTextureFormatToIndex[e]},_0x3c1da5.prototype.setDepthTestEnabled=function(e){this._depthTestEnabled=e},_0x3c1da5.prototype.setDepthWriteEnabled=function(e){this._depthWriteEnabled=e},_0x3c1da5.prototype.setDepthCompare=function(e){this._depthCompare=(null!=e?e:_0x333f62.ALWAYS)-512},_0x3c1da5.prototype.setStencilEnabled=function(e){this._stencilEnabled=e},_0x3c1da5.prototype.setStencilCompare=function(e,t){e===_0x333f62.FRONT?this._stencilFrontCompare=(null!=t?t:_0x333f62.ALWAYS)-512:this._stencilBackCompare=(null!=t?t:_0x333f62.ALWAYS)-512},_0x3c1da5.prototype.setStencilDepthFailOp=function(e,t){e===_0x333f62.FRONT?this._stencilFrontDepthFailOp=null===t?1:_0x389b43[t]:this._stencilBackDepthFailOp=null===t?1:_0x389b43[t]},_0x3c1da5.prototype.setStencilPassOp=function(e,t){e===_0x333f62.FRONT?this._stencilFrontPassOp=null===t?2:_0x389b43[t]:this._stencilBackPassOp=null===t?2:_0x389b43[t]},_0x3c1da5.prototype.setStencilFailOp=function(e,t){e===_0x333f62.FRONT?this._stencilFrontFailOp=null===t?1:_0x389b43[t]:this._stencilBackFailOp=null===t?1:_0x389b43[t]},_0x3c1da5.prototype.setStencilReadMask=function(e){this._stencilReadMask!==e&&(this._stencilReadMask=e,this._states[_0x2855c3.StencilReadMask]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.StencilReadMask))},_0x3c1da5.prototype.setStencilWriteMask=function(e){this._stencilWriteMask!==e&&(this._stencilWriteMask=e,this._states[_0x2855c3.StencilWriteMask]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.StencilWriteMask))},_0x3c1da5.prototype.resetStencilState=function(){this.setStencilState(_0x333f62.FRONT,!1,_0x333f62.ALWAYS,_0x333f62.KEEP,_0x333f62.REPLACE,_0x333f62.KEEP,255,255),this.setStencilState(_0x333f62.BACK,!1,_0x333f62.ALWAYS,_0x333f62.KEEP,_0x333f62.REPLACE,_0x333f62.KEEP,255,255)},_0x3c1da5.prototype.setStencilState=function(e,t,i,n,r,o,a,s){this._stencilEnabled=t,e===_0x333f62.FRONT?(this._stencilFrontCompare=(null!=i?i:_0x333f62.ALWAYS)-512,this._stencilFrontDepthFailOp=null===n?1:_0x389b43[n],this._stencilFrontPassOp=null===r?2:_0x389b43[r],this._stencilFrontFailOp=null===o?1:_0x389b43[o]):(this._stencilBackCompare=(null!=i?i:_0x333f62.ALWAYS)-512,this._stencilBackDepthFailOp=null===n?1:_0x389b43[n],this._stencilBackPassOp=null===r?2:_0x389b43[r],this._stencilBackFailOp=null===o?1:_0x389b43[o]),this.setStencilReadMask(a),this.setStencilWriteMask(s)},_0x3c1da5.prototype.setBuffers=function(e,t,i){this._vertexBuffers=e,this._overrideVertexBuffers=i,this._indexBuffer=t},_0x3c1da5._GetTopology=function(e){switch(e){case _0x333f62.MATERIAL_TriangleFillMode:return _0x5213c6.PrimitiveTopology.TriangleList;case _0x333f62.MATERIAL_PointFillMode:return _0x5213c6.PrimitiveTopology.PointList;case _0x333f62.MATERIAL_WireFrameFillMode:return _0x5213c6.PrimitiveTopology.LineList;case _0x333f62.MATERIAL_PointListDrawMode:return _0x5213c6.PrimitiveTopology.PointList;case _0x333f62.MATERIAL_LineListDrawMode:return _0x5213c6.PrimitiveTopology.LineList;case _0x333f62.MATERIAL_LineLoopDrawMode:throw"LineLoop is an unsupported fillmode in WebGPU";case _0x333f62.MATERIAL_LineStripDrawMode:return _0x5213c6.PrimitiveTopology.LineStrip;case _0x333f62.MATERIAL_TriangleStripDrawMode:return _0x5213c6.PrimitiveTopology.TriangleStrip;case _0x333f62.MATERIAL_TriangleFanDrawMode:throw"TriangleFan is an unsupported fillmode in WebGPU";default:return _0x5213c6.PrimitiveTopology.TriangleList}},_0x3c1da5._GetAphaBlendOperation=function(e){switch(e){case _0x333f62.GL_ALPHA_EQUATION_ADD:return _0x5213c6.BlendOperation.Add;case _0x333f62.GL_ALPHA_EQUATION_SUBTRACT:return _0x5213c6.BlendOperation.Subtract;case _0x333f62.GL_ALPHA_EQUATION_REVERSE_SUBTRACT:return _0x5213c6.BlendOperation.ReverseSubtract;case _0x333f62.GL_ALPHA_EQUATION_MIN:return _0x5213c6.BlendOperation.Min;case _0x333f62.GL_ALPHA_EQUATION_MAX:return _0x5213c6.BlendOperation.Max;default:return _0x5213c6.BlendOperation.Add}},_0x3c1da5._GetAphaBlendFactor=function(e){switch(e){case 0:return _0x5213c6.BlendFactor.Zero;case 1:return _0x5213c6.BlendFactor.One;case _0x333f62.GL_ALPHA_FUNCTION_SRC:return _0x5213c6.BlendFactor.Src;case _0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR:return _0x5213c6.BlendFactor.OneMinusSrc;case _0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA:return _0x5213c6.BlendFactor.SrcAlpha;case _0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA:return _0x5213c6.BlendFactor.OneMinusSrcAlpha;case _0x333f62.GL_ALPHA_FUNCTION_DST_ALPHA:return _0x5213c6.BlendFactor.DstAlpha;case _0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA:return _0x5213c6.BlendFactor.OneMinusDstAlpha;case _0x333f62.GL_ALPHA_FUNCTION_DST_COLOR:return _0x5213c6.BlendFactor.Dst;case _0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR:return _0x5213c6.BlendFactor.OneMinusDst;case _0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED:return _0x5213c6.BlendFactor.SrcAlphaSaturated;case _0x333f62.GL_ALPHA_FUNCTION_CONSTANT_COLOR:return _0x5213c6.BlendFactor.Constant;case _0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR:return _0x5213c6.BlendFactor.OneMinusConstant;case _0x333f62.GL_ALPHA_FUNCTION_CONSTANT_ALPHA:return _0x5213c6.BlendFactor.Constant;case _0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA:return _0x5213c6.BlendFactor.OneMinusConstant;default:return _0x5213c6.BlendFactor.One}},_0x3c1da5._GetCompareFunction=function(e){switch(e){case 0:return _0x5213c6.CompareFunction.Never;case 1:return _0x5213c6.CompareFunction.Less;case 2:return _0x5213c6.CompareFunction.Equal;case 3:return _0x5213c6.CompareFunction.LessEqual;case 4:return _0x5213c6.CompareFunction.Greater;case 5:return _0x5213c6.CompareFunction.NotEqual;case 6:return _0x5213c6.CompareFunction.GreaterEqual;case 7:return _0x5213c6.CompareFunction.Always}return _0x5213c6.CompareFunction.Never},_0x3c1da5._GetStencilOpFunction=function(e){switch(e){case 0:return _0x5213c6.StencilOperation.Zero;case 1:return _0x5213c6.StencilOperation.Keep;case 2:return _0x5213c6.StencilOperation.Replace;case 3:return _0x5213c6.StencilOperation.IncrementClamp;case 4:return _0x5213c6.StencilOperation.DecrementClamp;case 5:return _0x5213c6.StencilOperation.Invert;case 6:return _0x5213c6.StencilOperation.IncrementWrap;case 7:return _0x5213c6.StencilOperation.DecrementWrap}return _0x5213c6.StencilOperation.Keep},_0x3c1da5._GetVertexInputDescriptorFormat=function(e){var t=e.type,i=e.normalized,n=e.getSize();switch(t){case VertexBuffer.BYTE:switch(n){case 1:case 2:return i?_0x5213c6.VertexFormat.Snorm8x2:_0x5213c6.VertexFormat.Sint8x2;case 3:case 4:return i?_0x5213c6.VertexFormat.Snorm8x4:_0x5213c6.VertexFormat.Sint8x4}break;case VertexBuffer.UNSIGNED_BYTE:switch(n){case 1:case 2:return i?_0x5213c6.VertexFormat.Unorm8x2:_0x5213c6.VertexFormat.Uint8x2;case 3:case 4:return i?_0x5213c6.VertexFormat.Unorm8x4:_0x5213c6.VertexFormat.Uint8x4}break;case VertexBuffer.SHORT:switch(n){case 1:case 2:return i?_0x5213c6.VertexFormat.Snorm16x2:_0x5213c6.VertexFormat.Sint16x2;case 3:case 4:return i?_0x5213c6.VertexFormat.Snorm16x4:_0x5213c6.VertexFormat.Sint16x4}break;case VertexBuffer.UNSIGNED_SHORT:switch(n){case 1:case 2:return i?_0x5213c6.VertexFormat.Unorm16x2:_0x5213c6.VertexFormat.Uint16x2;case 3:case 4:return i?_0x5213c6.VertexFormat.Unorm16x4:_0x5213c6.VertexFormat.Uint16x4}break;case VertexBuffer.INT:switch(n){case 1:return _0x5213c6.VertexFormat.Sint32;case 2:return _0x5213c6.VertexFormat.Sint32x2;case 3:return _0x5213c6.VertexFormat.Sint32x3;case 4:return _0x5213c6.VertexFormat.Sint32x4}break;case VertexBuffer.UNSIGNED_INT:switch(n){case 1:return _0x5213c6.VertexFormat.Uint32;case 2:return _0x5213c6.VertexFormat.Uint32x2;case 3:return _0x5213c6.VertexFormat.Uint32x3;case 4:return _0x5213c6.VertexFormat.Uint32x4}break;case VertexBuffer.FLOAT:switch(n){case 1:return _0x5213c6.VertexFormat.Float32;case 2:return _0x5213c6.VertexFormat.Float32x2;case 3:return _0x5213c6.VertexFormat.Float32x3;case 4:return _0x5213c6.VertexFormat.Float32x4}}throw new Error("Invalid Format '".concat(e.getKind(),"' - type=").concat(t,", normalized=").concat(i,", size=").concat(n))},_0x3c1da5.prototype._getAphaBlendState=function(){return this._alphaBlendEnabled?{srcFactor:_0x3c1da5._GetAphaBlendFactor(this._alphaBlendFuncParams[2]),dstFactor:_0x3c1da5._GetAphaBlendFactor(this._alphaBlendFuncParams[3]),operation:_0x3c1da5._GetAphaBlendOperation(this._alphaBlendEqParams[1])}:null},_0x3c1da5.prototype._getColorBlendState=function(){return this._alphaBlendEnabled?{srcFactor:_0x3c1da5._GetAphaBlendFactor(this._alphaBlendFuncParams[0]),dstFactor:_0x3c1da5._GetAphaBlendFactor(this._alphaBlendFuncParams[1]),operation:_0x3c1da5._GetAphaBlendOperation(this._alphaBlendEqParams[0])}:null},_0x3c1da5.prototype._setShaderStage=function(e){this._shaderId!==e&&(this._shaderId=e,this._states[_0x2855c3.ShaderStage]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.ShaderStage))},_0x3c1da5.prototype._setRasterizationState=function(e,t){var i=this._frontFace-1+((this._cullEnabled?this._cullFace:0)<<1)+((this._clampDepth?1:0)<<3)+((this._alphaToCoverageEnabled?1:0)<<4)+(e<<5)+(t<<8);this._rasterizationState!==i&&(this._rasterizationState=i,this._states[_0x2855c3.RasterizationState]=this._rasterizationState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.RasterizationState))},_0x3c1da5.prototype._setColorStates=function(){var e=((this._writeMask?1:0)<<22)+(this._colorFormat<<23)+((this._depthWriteEnabled?1:0)<<29);this._alphaBlendEnabled&&(e+=((null===this._alphaBlendFuncParams[0]?2:_0x2d6853[this._alphaBlendFuncParams[0]])<<0)+((null===this._alphaBlendFuncParams[1]?2:_0x2d6853[this._alphaBlendFuncParams[1]])<<4)+((null===this._alphaBlendFuncParams[2]?2:_0x2d6853[this._alphaBlendFuncParams[2]])<<8)+((null===this._alphaBlendFuncParams[3]?2:_0x2d6853[this._alphaBlendFuncParams[3]])<<12)+((null===this._alphaBlendEqParams[0]?1:this._alphaBlendEqParams[0]-32773)<<16)+((null===this._alphaBlendEqParams[1]?1:this._alphaBlendEqParams[1]-32773)<<19)),e!==this._colorStates&&(this._colorStates=e,this._states[_0x2855c3.ColorStates]=this._colorStates,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.ColorStates))},_0x3c1da5.prototype._setDepthStencilState=function(){var e=this._stencilEnabled?this._stencilFrontCompare+(this._stencilFrontDepthFailOp<<3)+(this._stencilFrontPassOp<<6)+(this._stencilFrontFailOp<<9)+(this._stencilBackCompare<<12)+(this._stencilBackDepthFailOp<<15)+(this._stencilBackPassOp<<18)+(this._stencilBackFailOp<<21):2449408,t=this._depthStencilFormat+((this._depthTestEnabled?this._depthCompare:7)<<6)+(e<<10);this._depthStencilState!==t&&(this._depthStencilState=t,this._states[_0x2855c3.DepthStencilState]=this._depthStencilState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.DepthStencilState))},_0x3c1da5.prototype._setVertexState=function(e){for(var t,i,n,r=this._statesLength,o=_0x2855c3.VertexState,a=e._pipelineContext,s=a.shaderProcessingContext.attributeNamesFromEffect,l=a.shaderProcessingContext.attributeLocationsFromEffect,u=0,c=0;c<s.length;c++){var h=l[c],d=null!==(t=this._overrideVertexBuffers&&this._overrideVertexBuffers[s[c]])&&void 0!==t?t:this._vertexBuffers[s[c]];!d&&(d=this._emptyVertexBuffer);var f=null===(i=d.getBuffer())||void 0===i?void 0:i.underlyingResource;if(void 0===d._validOffsetRange){var p=d.byteOffset,_=d.getSize(!0),m=d.byteStride;d._validOffsetRange=p<=this._kMaxVertexBufferStride-_&&(0===m||p+_<=m)}(!n||n!==f||!d._validOffsetRange)&&(this.vertexBuffers[u++]=d,n=d._validOffsetRange?f:null);var g=d.hashCode+(h<<7);this._isDirty=this._isDirty||this._states[o]!==g,this._states[o++]=g}this.vertexBuffers.length=u,this._statesLength=o,this._isDirty=this._isDirty||o!==r,this._isDirty&&(this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.VertexState))},_0x3c1da5.prototype._setTextureState=function(e){this._textureState!==e&&(this._textureState=e,this._states[_0x2855c3.TextureStage]=this._textureState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.TextureStage))},_0x3c1da5.prototype._createPipelineLayout=function(e){if(this._useTextureStage)return this._createPipelineLayoutWithTextureStage(e);for(var t=[],i=e.shaderProcessingContext.bindGroupLayoutEntries,n=0;n<i.length;n++){var r=i[n];t[n]=this._device.createBindGroupLayout({entries:r})}return e.bindGroupLayouts=t,this._device.createPipelineLayout({bindGroupLayouts:t})},_0x3c1da5.prototype._createPipelineLayoutWithTextureStage=function(e){for(var t,i=e.shaderProcessingContext,n=i.bindGroupLayoutEntries,r=1,o=0;o<n.length;o++)for(var a=n[o],s=0;s<a.length;s++){var l=n[o][s];if(l.texture){var u=i.bindGroupLayoutEntryInfo[o][l.binding].name,c=i.availableTextures[u],h=c.autoBindSampler?i.availableSamplers[u+_0x29840c.AutoSamplerSuffix]:null,d=c.sampleType,f=null!==(t=null==h?void 0:h.type)&&void 0!==t?t:_0x5213c6.SamplerBindingType.Filtering;if(this._textureState&r&&d!==_0x5213c6.TextureSampleType.Depth&&(c.autoBindSampler&&(f=_0x5213c6.SamplerBindingType.NonFiltering),d=_0x5213c6.TextureSampleType.UnfilterableFloat),l.texture.sampleType=d,h){var p=i.bindGroupLayoutEntryInfo[h.binding.groupIndex][h.binding.bindingIndex].index;n[h.binding.groupIndex][p].sampler.type=f}r<<=1}}var _=[];for(o=0;o<n.length;++o)_[o]=this._device.createBindGroupLayout({entries:n[o]});return e.bindGroupLayouts=_,this._device.createPipelineLayout({bindGroupLayouts:_})},_0x3c1da5.prototype._getVertexInputDescriptor=function(e){for(var t,i,n,r,o=[],a=e._pipelineContext,s=a.shaderProcessingContext.attributeNamesFromEffect,l=a.shaderProcessingContext.attributeLocationsFromEffect,u=0;u<s.length;u++){var c=l[u],h=null!==(t=this._overrideVertexBuffers&&this._overrideVertexBuffers[s[u]])&&void 0!==t?t:this._vertexBuffers[s[u]];!h&&(h=this._emptyVertexBuffer);var d=null===(i=h.getBuffer())||void 0===i?void 0:i.underlyingResource,f=h.byteOffset,p=!h._validOffsetRange;if(!n||!r||n!==d||p){var _={arrayStride:h.byteStride,stepMode:h.getIsInstanced()?_0x5213c6.InputStepMode.Instance:_0x5213c6.InputStepMode.Vertex,attributes:[]};o.push(_),r=_.attributes,p&&(f=0,d=null)}r.push({shaderLocation:c,offset:f,format:_0x3c1da5._GetVertexInputDescriptorFormat(h)}),n=d}return o},_0x3c1da5.prototype._createRenderPipeline=function(e,t,i){var n=e._pipelineContext,r=this._getVertexInputDescriptor(e),o=this._createPipelineLayout(n),a=[],s=this._getAphaBlendState(),l=this._getColorBlendState();if(this._mrtAttachments1>0)for(var u=0;u<this._mrtFormats.length;++u){var c=this._mrtFormats[u];if(c){var h={format:c,writeMask:0!=(this._mrtEnabledMask&1<<u)?this._writeMask:0};s&&l&&(h.blend={alpha:s,color:l}),a.push(h)}else a.push(null)}else if(this._webgpuColorFormat[0]){h={format:this._webgpuColorFormat[0],writeMask:this._writeMask};s&&l&&(h.blend={alpha:s,color:l}),a.push(h)}else a.push(null);var d={compare:_0x3c1da5._GetCompareFunction(this._stencilEnabled?this._stencilFrontCompare:7),depthFailOp:_0x3c1da5._GetStencilOpFunction(this._stencilEnabled?this._stencilFrontDepthFailOp:1),failOp:_0x3c1da5._GetStencilOpFunction(this._stencilEnabled?this._stencilFrontFailOp:1),passOp:_0x3c1da5._GetStencilOpFunction(this._stencilEnabled?this._stencilFrontPassOp:1)},f={compare:_0x3c1da5._GetCompareFunction(this._stencilEnabled?this._stencilBackCompare:7),depthFailOp:_0x3c1da5._GetStencilOpFunction(this._stencilEnabled?this._stencilBackDepthFailOp:1),failOp:_0x3c1da5._GetStencilOpFunction(this._stencilEnabled?this._stencilBackFailOp:1),passOp:_0x3c1da5._GetStencilOpFunction(this._stencilEnabled?this._stencilBackPassOp:1)},p=void 0;(t===_0x5213c6.PrimitiveTopology.LineStrip||t===_0x5213c6.PrimitiveTopology.TriangleStrip)&&(p=!this._indexBuffer||this._indexBuffer.is32Bits?_0x5213c6.IndexFormat.Uint32:_0x5213c6.IndexFormat.Uint16);var _=!!this._webgpuDepthStencilFormat&&WebGPUTextureHelper.HasStencilAspect(this._webgpuDepthStencilFormat);return this._device.createRenderPipeline({layout:o,vertex:{module:n.stages.vertexStage.module,entryPoint:n.stages.vertexStage.entryPoint,buffers:r},primitive:{topology:t,stripIndexFormat:p,frontFace:1===this._frontFace?_0x5213c6.FrontFace.CCW:_0x5213c6.FrontFace.CW,cullMode:this._cullEnabled?2===this._cullFace?_0x5213c6.CullMode.Front:_0x5213c6.CullMode.Back:_0x5213c6.CullMode.None},fragment:n.stages.fragmentStage?{module:n.stages.fragmentStage.module,entryPoint:n.stages.fragmentStage.entryPoint,targets:a}:void 0,multisample:{count:i},depthStencil:void 0===this._webgpuDepthStencilFormat?void 0:{depthWriteEnabled:this._depthWriteEnabled,depthCompare:this._depthTestEnabled?_0x3c1da5._GetCompareFunction(this._depthCompare):_0x5213c6.CompareFunction.Always,format:this._webgpuDepthStencilFormat,stencilFront:this._stencilEnabled&&_?d:void 0,stencilBack:this._stencilEnabled&&_?f:void 0,stencilReadMask:this._stencilEnabled&&_?this._stencilReadMask:void 0,stencilWriteMask:this._stencilEnabled&&_?this._stencilWriteMask:void 0,depthBias:this._depthBias,depthBiasClamp:this._depthBiasClamp,depthBiasSlopeScale:this._depthBiasSlopeScale}})},_0x3c1da5.NumCacheHitWithoutHash=0,_0x3c1da5.NumCacheHitWithHash=0,_0x3c1da5.NumCacheMiss=0,_0x3c1da5.NumPipelineCreationLastFrame=0,_0x3c1da5._NumPipelineCreationCurrentFrame=0;var _0x356dce=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));function n(){this.values={}}return i(),n.prototype.count=function(){var e=0,t=this.pipeline?1:0;for(var i in this.values){var n=this.values[i].count();e+=n[0],t+=n[1],e++}return[e,t]},n}();function _0x3a822c(e,t,i){var n=_0x3c1da5.call(this,e,t,i)||this;return n._nodeStack=[],n._nodeStack[0]=_0x3a822c._Cache,n}_0x3a822c.prototype=Object.create(_0x3c1da5.prototype),_0x3a822c.prototype.constructor=_0x3c1da5,_0x3a822c.GetNodeCounts=function(){var e=_0x3a822c._Cache.count();return{nodeCount:e[0],pipelineCount:e[1]}},_0x3a822c._GetPipelines=function(e,t,i,n){if(e.pipeline){var r=i.slice();r.length=n,t.push(r)}for(var o in e.values){var a=e.values[o];i[n]=parseInt(o),_0x3a822c._GetPipelines(a,t,i,n+1)}},_0x3a822c.GetPipelines=function(){var e=[];return _0x3a822c._GetPipelines(_0x3a822c._Cache,e,[],0),e},_0x3a822c.prototype._getRenderPipeline=function(e){for(var t=this._nodeStack[this._stateDirtyLowestIndex],i=this._stateDirtyLowestIndex;i<this._statesLength;++i){var n=t.values[this._states[i]];!n&&(n=new _0x356dce,t.values[this._states[i]]=n),t=n,this._nodeStack[i+1]=t}e.token=t,e.pipeline=t.pipeline},_0x3a822c.prototype._setRenderPipeline=function(e){e.token.pipeline=e.pipeline},_0x3a822c._Cache=new _0x356dce;var _0x548e0a=(_0x2473a2=!0,function(e,t){var i=_0x2473a2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2473a2=!1,i}),_0x55e1cb=_0x548e0a(void 0,(function(){return _0x55e1cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x55e1cb).search("(((.+)+)+)+$")})),_0x2473a2;function _0x32b365(e){var t=_0x588382.call(this,!1)||this;return t._cache=e,t.reset(),t}_0x55e1cb(),_0x32b365.prototype=Object.create(_0x588382.prototype),_0x32b365.prototype.constructor=_0x588382,Object.defineProperty(_0x32b365.prototype,"frontFunc",{get:function(){return this._frontFunc},set:function(e){this._frontFunc!==e&&(this._frontFunc=e,this._cache.setStencilCompare(_0x333f62.FRONT,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"backFunc",{get:function(){return this._backFunc},set:function(e){this._backFunc!==e&&(this._backFunc=e,this._cache.setStencilCompare(_0x333f62.BACK,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"funcMask",{get:function(){return this._funcMask},set:function(e){this._funcMask!==e&&(this._funcMask=e,this._cache.setStencilReadMask(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"frontOpStencilFail",{get:function(){return this._frontOpStencilFail},set:function(e){this._frontOpStencilFail!==e&&(this._frontOpStencilFail=e,this._cache.setStencilFailOp(_0x333f62.FRONT,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"backOpStencilFail",{get:function(){return this._backOpStencilFail},set:function(e){this._backOpStencilFail!==e&&(this._backOpStencilFail=e,this._cache.setStencilFailOp(_0x333f62.BACK,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"frontOpDepthFail",{get:function(){return this._frontOpDepthFail},set:function(e){this._frontOpDepthFail!==e&&(this._frontOpDepthFail=e,this._cache.setStencilDepthFailOp(_0x333f62.FRONT,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"backOpDepthFail",{get:function(){return this._backOpDepthFail},set:function(e){this._backOpDepthFail!==e&&(this._backOpDepthFail=e,this._cache.setStencilDepthFailOp(_0x333f62.BACK,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"frontOpStencilDepthPass",{get:function(){return this._frontOpStencilDepthPass},set:function(e){this._frontOpStencilDepthPass!==e&&(this._frontOpStencilDepthPass=e,this._cache.setStencilPassOp(_0x333f62.FRONT,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"backOpStencilDepthPass",{get:function(){return this._backOpStencilDepthPass},set:function(e){this._backOpStencilDepthPass!==e&&(this._backOpStencilDepthPass=e,this._cache.setStencilPassOp(_0x333f62.BACK,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask!==e&&(this._mask=e,this._cache.setStencilWriteMask(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,this._cache.setStencilEnabled(e))},enumerable:!1,configurable:!0}),_0x32b365.prototype.reset=function(){var e;this.stencilMaterial=void 0,null===(e=this.stencilGlobal)||void 0===e||e.reset(),this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0,this._cache.resetStencilState()},_0x32b365.prototype.apply=function(){var e,t=null===(e=this.stencilMaterial)||void 0===e?void 0:e.enabled;this.enabled=t?this.stencilMaterial.enabled:this.stencilGlobal.enabled,this.enabled&&(this.frontFunc=t?this.stencilMaterial.frontFunc:this.stencilGlobal.frontFunc,this.backFunc=t?this.stencilMaterial.backFunc:this.stencilGlobal.backFunc,this.funcRef=t?this.stencilMaterial.funcRef:this.stencilGlobal.funcRef,this.funcMask=t?this.stencilMaterial.funcMask:this.stencilGlobal.funcMask,this.frontOpStencilFail=t?this.stencilMaterial.frontOpStencilFail:this.stencilGlobal.frontOpStencilFail,this.backOpStencilFail=t?this.stencilMaterial.backOpStencilFail:this.stencilGlobal.backOpStencilFail,this.frontOpDepthFail=t?this.stencilMaterial.frontOpDepthFail:this.stencilGlobal.frontOpDepthFail,this.backOpDepthFail=t?this.stencilMaterial.backOpDepthFail:this.stencilGlobal.backOpDepthFail,this.frontOpStencilDepthPass=t?this.stencilMaterial.frontOpStencilDepthPass:this.stencilGlobal.frontOpStencilDepthPass,this.backOpStencilDepthPass=t?this.stencilMaterial.backOpStencilDepthPass:this.stencilGlobal.backOpStencilDepthPass,this.mask=t?this.stencilMaterial.mask:this.stencilGlobal.mask)};var _0x40aa46=(_0x1dacf0=!0,function(e,t){var i=_0x1dacf0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1dacf0=!1,i}),_0x3f8cce=_0x40aa46(void 0,(function(){return _0x3f8cce.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f8cce).search("(((.+)+)+)+$")})),_0x1dacf0;function _0x5bc595(e){var t=_0x168153.call(this,!1)||this;return t._cache=e,t.reset(),t}_0x3f8cce(),_0x5bc595.prototype=Object.create(_0x168153.prototype),_0x5bc595.prototype.constructor=_0x168153,Object.defineProperty(_0x5bc595.prototype,"zOffset",{get:function(){return this._zOffset},set:function(e){this._zOffset!==e&&(this._zOffset=e,this._isZOffsetDirty=!0,this._cache.setDepthBiasSlopeScale(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"zOffsetUnits",{get:function(){return this._zOffsetUnits},set:function(e){this._zOffsetUnits!==e&&(this._zOffsetUnits=e,this._isZOffsetDirty=!0,this._cache.setDepthBias(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"cullFace",{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,this._isCullFaceDirty=!0,this._cache.setCullFace(null!=e?e:1))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"cull",{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this._isCullDirty=!0,this._cache.setCullEnabled(!!e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"depthFunc",{get:function(){return this._depthFunc},set:function(e){this._depthFunc!==e&&(this._depthFunc=e,this._isDepthFuncDirty=!0,this._cache.setDepthCompare(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"depthMask",{get:function(){return this._depthMask},set:function(e){this._depthMask!==e&&(this._depthMask=e,this._isDepthMaskDirty=!0,this._cache.setDepthWriteEnabled(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"depthTest",{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._isDepthTestDirty=!0,this._cache.setDepthTestEnabled(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"frontFace",{get:function(){return this._frontFace},set:function(e){this._frontFace!==e&&(this._frontFace=e,this._isFrontFaceDirty=!0,this._cache.setFrontFace(null!=e?e:2))},enumerable:!1,configurable:!0}),_0x5bc595.prototype.reset=function(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._zOffsetUnits=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!0,this._isFrontFaceDirty=!1,this._cache.resetDepthCullingState()},_0x5bc595.prototype.apply=function(){};var _0x4f5a3f=(_0x201b27=!0,function(e,t){var i=_0x201b27?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x201b27=!1,i}),_0x6e438=_0x4f5a3f(void 0,(function(){return _0x6e438.toString().search("(((.+)+)+)+$").toString().constructor(_0x6e438).search("(((.+)+)+)+$")})),_0x201b27;function _0x5228e4$1(e){this.useMipMaps=!1,this.type=_0x333f62.TEXTURETYPE_UNDEFINED,this._video=e,this.uniqueId=InternalTexture._Counter++}_0x6e438(),_0x5228e4$1.IsExternalTexture=function(e){return void 0!==e.underlyingResource},_0x5228e4$1.prototype.getClassName=function(){return"ExternalTexture"},Object.defineProperty(_0x5228e4$1.prototype,"underlyingResource",{get:function(){return this._video},enumerable:!1,configurable:!0}),_0x5228e4$1.prototype.isReady=function(){return this._video.readyState>=this._video.HAVE_CURRENT_DATA},_0x5228e4$1.prototype.dispose=function(){};var _0x16d1db=(_0x2cfa12=!0,function(e,t){var i=_0x2cfa12?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2cfa12=!1,i}),_0x10f6bb=_0x16d1db(void 0,(function(){return _0x10f6bb.toString().search("(((.+)+)+)+$").toString().constructor(_0x10f6bb).search("(((.+)+)+)+$")})),_0x2cfa12;function _0x4aeff2(){this.uniqueId=_0x4aeff2._Counter++,this.updateId=0,this.reset()}_0x10f6bb(),Object.defineProperty(_0x4aeff2.prototype,"forceBindGroupCreation",{get:function(){return this._numExternalTextures>0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4aeff2.prototype,"hasFloatTextures",{get:function(){return this._numFloatTextures>0},enumerable:!1,configurable:!0}),_0x4aeff2.prototype.reset=function(){this.samplers={},this.textures={},this.isDirty=!0,this._numFloatTextures=0,this._numExternalTextures=0},_0x4aeff2.prototype.setSampler=function(e,t){var i=this.samplers[e],n=-1;i?n=i.hashCode:this.samplers[e]=i={sampler:t,hashCode:0},i.sampler=t,i.hashCode=t?_0x2335eb.GetSamplerHashCode(t):0;var r=n!==i.hashCode;r&&this.updateId++,this.isDirty||(this.isDirty=r)},_0x4aeff2.prototype.setTexture=function(e,t){var i,n,r,o=this.textures[e],a=-1;o?a=null!==(n=null===(i=o.texture)||void 0===i?void 0:i.uniqueId)&&void 0!==n?n:-1:this.textures[e]=o={texture:t,isFloatTexture:!1,isExternalTexture:!1},o.isExternalTexture&&this._numExternalTextures--,o.isFloatTexture&&this._numFloatTextures--,t?(o.isFloatTexture=t.type===_0x333f62.TEXTURETYPE_FLOAT,o.isExternalTexture=_0x5228e4$1.IsExternalTexture(t),o.isFloatTexture&&this._numFloatTextures++,o.isExternalTexture&&this._numExternalTextures++):(o.isFloatTexture=!1,o.isExternalTexture=!1),o.texture=t;var s=a!==(null!==(r=null==t?void 0:t.uniqueId)&&void 0!==r?r:-1);s&&this.updateId++,this.isDirty||(this.isDirty=s)},_0x4aeff2._Counter=0;var _0x4bbd8f=(_0x81571a=!0,function(e,t){var i=_0x81571a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x81571a=!1,i}),_0x2811fd=_0x4bbd8f(void 0,(function(){return _0x2811fd.toString().search("(((.+)+)+)+$").toString().constructor(_0x2811fd).search("(((.+)+)+)+$")})),_0x81571a;function _0x1bd725(e){this._bufferManager=e,this.uniqueId=_0x1bd725._Counter++,this._useInstancing=!1,this._currentInstanceCount=0,this.reset()}_0x2811fd(),_0x1bd725.prototype.isDirty=function(e){return this._isDirty||this._materialContextUpdateId!==e},_0x1bd725.prototype.resetIsDirty=function(e){this._isDirty=!1,this._materialContextUpdateId=e},Object.defineProperty(_0x1bd725.prototype,"useInstancing",{get:function(){return this._useInstancing},set:function(e){this._useInstancing!==e&&(e?(this.indirectDrawBuffer=this._bufferManager.createRawBuffer(40,_0x5213c6.BufferUsage.CopyDst|_0x5213c6.BufferUsage.Indirect),this._indirectDrawData=new Uint32Array(5),this._indirectDrawData[3]=0,this._indirectDrawData[4]=0):(this.indirectDrawBuffer&&this._bufferManager.releaseBuffer(this.indirectDrawBuffer),this.indirectDrawBuffer=void 0,this._indirectDrawData=void 0),this._useInstancing=e,this._currentInstanceCount=-1)},enumerable:!1,configurable:!0}),_0x1bd725.prototype.reset=function(){this.buffers={},this._isDirty=!0,this._materialContextUpdateId=0,this.fastBundle=void 0,this.bindGroups=void 0},_0x1bd725.prototype.setBuffer=function(e,t){var i;this._isDirty||(this._isDirty=(null==t?void 0:t.uniqueId)!==(null===(i=this.buffers[e])||void 0===i?void 0:i.uniqueId)),this.buffers[e]=t},_0x1bd725.prototype.setIndirectData=function(e,t,i){t!==this._currentInstanceCount&&this.indirectDrawBuffer&&this._indirectDrawData&&(this._currentInstanceCount=t,this._indirectDrawData[0]=e,this._indirectDrawData[1]=t,this._indirectDrawData[2]=i,this._bufferManager.setRawData(this.indirectDrawBuffer,0,this._indirectDrawData,0,20))},_0x1bd725.prototype.dispose=function(){this.indirectDrawBuffer&&(this._bufferManager.releaseBuffer(this.indirectDrawBuffer),this.indirectDrawBuffer=void 0,this._indirectDrawData=void 0),this.fastBundle=void 0,this.bindGroups=void 0,this.buffers=void 0},_0x1bd725._Counter=0;var _0x3bb705=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));return i(),function(){this.values={}}}();function _0x10caf5(e,t,i){this.disabled=!1,this._device=e,this._cacheSampler=t,this._engine=i}Object.defineProperty(_0x10caf5,"Statistics",{get:function(){return{totalCreated:_0x10caf5.NumBindGroupsCreatedTotal,lastFrameCreated:_0x10caf5.NumBindGroupsCreatedLastFrame,lookupLastFrame:_0x10caf5.NumBindGroupsLookupLastFrame,noLookupLastFrame:_0x10caf5.NumBindGroupsNoLookupLastFrame}},enumerable:!1,configurable:!0}),_0x10caf5.prototype.endFrame=function(){_0x10caf5.NumBindGroupsCreatedLastFrame=_0x10caf5._NumBindGroupsCreatedCurrentFrame,_0x10caf5.NumBindGroupsLookupLastFrame=_0x10caf5._NumBindGroupsLookupCurrentFrame,_0x10caf5.NumBindGroupsNoLookupLastFrame=_0x10caf5._NumBindGroupsNoLookupCurrentFrame,_0x10caf5._NumBindGroupsCreatedCurrentFrame=0,_0x10caf5._NumBindGroupsLookupCurrentFrame=0,_0x10caf5._NumBindGroupsNoLookupCurrentFrame=0},_0x10caf5.prototype.getBindGroups=function(e,t,i,n){var r,o,a,s=void 0;if(!n&&!t.isDirty(i.updateId)&&!i.isDirty)return _0x10caf5._NumBindGroupsNoLookupCurrentFrame++,t.bindGroups;if(t.resetIsDirty(i.updateId),i.isDirty=!1,s)return t.bindGroups=s,_0x10caf5._NumBindGroupsLookupCurrentFrame++,s;s=[],t.bindGroups=s,_0x10caf5.NumBindGroupsCreatedTotal++,_0x10caf5._NumBindGroupsCreatedCurrentFrame++;for(var l=e.bindGroupLayouts,u=0;u<e.shaderProcessingContext.bindGroupLayoutEntries.length;u++){for(var c=e.shaderProcessingContext.bindGroupLayoutEntries[u],h=e.shaderProcessingContext.bindGroupEntries[u],d=0;d<c.length;d++){var f,p=e.shaderProcessingContext.bindGroupLayoutEntries[u][d],_=e.shaderProcessingContext.bindGroupLayoutEntryInfo[u][p.binding],m=null!==(r=_.nameInArrayOfTexture)&&void 0!==r?r:_.name;if(p.sampler)if(f=i.samplers[m]){var g=f.sampler;if(!g){this._engine.dbgSanityChecks&&_0x50f23a.Error("Trying to bind a null sampler! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}h[d].resource=this._cacheSampler.getSampler(g,!1,f.hashCode)}else _0x50f23a.Error('Sampler "'.concat(m,'" could not be bound. entry=').concat(JSON.stringify(p),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"<no dump>":t}))),50);else if(p.texture||p.storageTexture)if(f=i.textures[m]){if(this._engine.dbgSanityChecks&&null===f.texture){_0x50f23a.Error("Trying to bind a null texture! entry=".concat(JSON.stringify(p),", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}var x=f.texture._hardwareTexture;if(this._engine.dbgSanityChecks&&(!x||p.texture&&!x.view||p.storageTexture&&!x.viewForWriting)){_0x50f23a.Error("Trying to bind a null gpu texture or view! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", isReady=").concat(null===(o=f.texture)||void 0===o?void 0:o.isReady,", materialContext.uniqueId=").concat(i.uniqueId),50);continue}h[d].resource=p.storageTexture?x.viewForWriting:p.texture.multisampled?x.msaaView:x.view}else _0x50f23a.Error('Texture "'.concat(m,'" could not be bound. entry=').concat(JSON.stringify(p),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"<no dump>":t}))),50);else if(p.externalTexture)if(f=i.textures[m]){if(this._engine.dbgSanityChecks&&null===f.texture){_0x50f23a.Error("Trying to bind a null external texture! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}var y=f.texture.underlyingResource;if(this._engine.dbgSanityChecks&&!y){_0x50f23a.Error("Trying to bind a null gpu external texture! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", isReady=").concat(null===(a=f.texture)||void 0===a?void 0:a.isReady,", materialContext.uniqueId=").concat(i.uniqueId),50);continue}h[d].resource=this._device.importExternalTexture({source:y})}else _0x50f23a.Error('Texture "'.concat(m,'" could not be bound. entry=').concat(JSON.stringify(p),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"<no dump>":t}))),50);else if(p.buffer){var v=t.buffers[m];if(v){var $=v.underlyingResource;h[d].resource.buffer=$,h[d].resource.size=v.capacity}else _0x50f23a.Error("Can't find buffer \"".concat(m,'". entry=').concat(JSON.stringify(p),", buffers=").concat(JSON.stringify(t.buffers),", drawContext.uniqueId=").concat(t.uniqueId),50)}}var b=l[u];s[u]=this._device.createBindGroup({layout:b,entries:h})}return n&&(n.bindGroups=s),s},_0x10caf5.NumBindGroupsCreatedTotal=0,_0x10caf5.NumBindGroupsCreatedLastFrame=0,_0x10caf5.NumBindGroupsLookupLastFrame=0,_0x10caf5.NumBindGroupsNoLookupLastFrame=0,_0x10caf5._Cache=new _0x3bb705,_0x10caf5._NumBindGroupsCreatedCurrentFrame=0,_0x10caf5._NumBindGroupsLookupCurrentFrame=0,_0x10caf5._NumBindGroupsNoLookupCurrentFrame=0;var _0xcd16c5=(_0x47d059=!0,function(e,t){var i=_0x47d059?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47d059=!1,i}),_0x5341d6=_0xcd16c5(void 0,(function(){return _0x5341d6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5341d6).search("(((.+)+)+)+$")})),_0x47d059;_0x5341d6();var _0x2864d2="clearQuadVertexShader",_0x34aa3e="uniform float depthValue;\nconst vec2 pos[4]={\nvec2(-1.0,1.0),\n vec2(1.0,1.0),\nvec2(-1.0,-1.0),\n vec2(1.0,-1.0)\n};\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n #define CUSTOM_VERTEX_MAIN_BEGIN\n gl_Position=vec4(pos[gl_VertexID],depthValue,1.0);\n #define CUSTOM_VERTEX_MAIN_END\n}\n";_0x266979.ShadersStore[_0x2864d2]=_0x34aa3e;var _0x3d7917=(_0x412052=!0,function(e,t){var i=_0x412052?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x412052=!1,i}),_0x22523b=_0x3d7917(void 0,(function(){return _0x22523b.toString().search("(((.+)+)+)+$").toString().constructor(_0x22523b).search("(((.+)+)+)+$")})),_0x412052;_0x22523b();var _0xf6f5ce="clearQuadPixelShader",_0x4674d6="uniform vec4 color;\nvoid main() {\n\tgl_FragColor=color;\n}\n";_0x266979.ShadersStore[_0xf6f5ce]=_0x4674d6;var _0x3dd58d=(_0x359e60=!0,function(e,t){var i=_0x359e60?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x359e60=!1,i}),_0x3d5427=_0x3dd58d(void 0,(function(){return _0x3d5427.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d5427).search("(((.+)+)+)+$")})),_0x359e60;function _0x28ce94(e,t,i){this._bindGroups={},this._bundleCache={},this._keyTemp=[],this._device=e,this._engine=t,this._cacheRenderPipeline=new _0x3a822c(this._device,i,!t._caps.textureFloatLinearFiltering),this._cacheRenderPipeline.setDepthTestEnabled(!1),this._cacheRenderPipeline.setStencilReadMask(255),this._effect=t.createEffect("clearQuad",[],["color","depthValue"])}_0x3d5427(),_0x28ce94.prototype.setDepthStencilFormat=function(e){this._depthTextureFormat=e,this._cacheRenderPipeline.setDepthStencilFormat(e)},_0x28ce94.prototype.setColorFormat=function(e){this._cacheRenderPipeline.setColorFormat(e)},_0x28ce94.prototype.setMRTAttachments=function(e,t,i){this._cacheRenderPipeline.setMRT(t,i),this._cacheRenderPipeline.setMRTAttachments(e)},_0x28ce94.prototype.clear=function(e,t,i,n,r){var o,a;void 0===r&&(r=1);var s,l,u=null,c=!!this._engine._currentRenderTarget;if(e)s=e;else{var h=0;this._keyTemp.length=0;for(var d=0;d<this._cacheRenderPipeline.colorFormats.length;++d)this._keyTemp[h++]=renderableTextureFormatToIndex[null!==(o=this._cacheRenderPipeline.colorFormats[d])&&void 0!==o?o:""];var f=renderableTextureFormatToIndex[null!==(a=this._depthTextureFormat)&&void 0!==a?a:0];if(this._keyTemp[h]=(t?t.r+256*t.g+256*t.b*256+256*t.a*256*256:0)+(i?Math.pow(2,32):0)+(n?Math.pow(2,33):0)+(this._engine.useReverseDepthBuffer?Math.pow(2,34):0)+(c?Math.pow(2,35):0)+(r>1?Math.pow(2,36):0)+f*Math.pow(2,37),l=this._keyTemp.join("_"),u=this._bundleCache[l])return u;s=this._device.createRenderBundleEncoder({colorFormats:this._cacheRenderPipeline.colorFormats,depthStencilFormat:this._depthTextureFormat,sampleCount:r})}this._cacheRenderPipeline.setDepthWriteEnabled(!!i),this._cacheRenderPipeline.setStencilEnabled(!!n&&!!this._depthTextureFormat&&WebGPUTextureHelper.HasStencilAspect(this._depthTextureFormat)),this._cacheRenderPipeline.setStencilWriteMask(n?255:0),this._cacheRenderPipeline.setStencilCompare(_0x333f62.FRONT,n?_0x333f62.ALWAYS:_0x333f62.NEVER),this._cacheRenderPipeline.setStencilCompare(_0x333f62.BACK,n?_0x333f62.ALWAYS:_0x333f62.NEVER),this._cacheRenderPipeline.setStencilPassOp(_0x333f62.FRONT,n?_0x333f62.REPLACE:_0x333f62.KEEP),this._cacheRenderPipeline.setStencilPassOp(_0x333f62.BACK,n?_0x333f62.REPLACE:_0x333f62.KEEP),this._cacheRenderPipeline.setWriteMask(t?15:0);var p=this._cacheRenderPipeline.getRenderPipeline(_0x333f62.MATERIAL_TriangleStripDrawMode,this._effect,r),_=this._effect._pipelineContext;t&&this._effect.setDirectColor4("color",t),this._effect.setFloat("depthValue",this._engine.useReverseDepthBuffer?this._engine._clearReverseDepthValue:this._engine._clearDepthValue),_.uniformBuffer.update();var m=c?this._engine._ubInvertY:this._engine._ubDontInvertY,g=_.uniformBuffer.getBuffer(),x=g.uniqueId+"-"+m.uniqueId,y=this._bindGroups[x];if(!y){var v=_.bindGroupLayouts;(y=this._bindGroups[x]=[]).push(this._device.createBindGroup({layout:v[0],entries:[]})),!_0x27ae2e._SimplifiedKnownBindings&&y.push(this._device.createBindGroup({layout:v[1],entries:[]})),y.push(this._device.createBindGroup({layout:v[_0x27ae2e._SimplifiedKnownBindings?1:2],entries:[{binding:0,resource:{buffer:m.underlyingResource,size:m.capacity}},{binding:1,resource:{buffer:g.underlyingResource,size:g.capacity}}]}))}s.setPipeline(p);for(d=0;d<y.length;++d)s.setBindGroup(d,y[d]);return s.draw(4,1,0,0),!e&&(u=s.finish(),this._bundleCache[l]=u),u};var _0x559884=(_0x223cba=!0,function(e,t){var i=_0x223cba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x223cba=!1,i}),_0x4d5beb=_0x559884(void 0,(function(){return _0x4d5beb.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d5beb).search("(((.+)+)+)+$")})),_0x223cba;function WebGPURenderItemViewport(e,t,i,n){this.x=Math.floor(e),this.y=Math.floor(t),this.w=Math.floor(i),this.h=Math.floor(n)}function WebGPURenderItemScissor(e,t,i,n){this.x=e,this.y=t,this.w=i,this.h=n}function WebGPURenderItemStencilRef(e){this.ref=e}function WebGPURenderItemBlendColor(e){this.color=e}function WebGPURenderItemBeginOcclusionQuery(e){this.query=e}function WebGPURenderItemEndOcclusionQuery(){}function WebGPURenderItemBundles(){this.bundles=[]}function WebGPUBundleList(e){this.numDrawCalls=0,this._device=e,this._list=new Array(10),this._listLength=0}_0x4d5beb(),WebGPURenderItemViewport.prototype.run=function(e){e.setViewport(this.x,this.y,this.w,this.h,0,1)},WebGPURenderItemViewport.prototype.clone=function(){return new WebGPURenderItemViewport(this.x,this.y,this.w,this.h)},WebGPURenderItemScissor.prototype.run=function(e){e.setScissorRect(this.x,this.y,this.w,this.h)},WebGPURenderItemScissor.prototype.clone=function(){return new WebGPURenderItemScissor(this.x,this.y,this.w,this.h)},WebGPURenderItemStencilRef.prototype.run=function(e){e.setStencilReference(this.ref)},WebGPURenderItemStencilRef.prototype.clone=function(){return new WebGPURenderItemStencilRef(this.ref)},WebGPURenderItemBlendColor.prototype.run=function(e){e.setBlendConstant(this.color)},WebGPURenderItemBlendColor.prototype.clone=function(){return new WebGPURenderItemBlendColor(this.color)},WebGPURenderItemBeginOcclusionQuery.prototype.run=function(e){e.beginOcclusionQuery(this.query)},WebGPURenderItemBeginOcclusionQuery.prototype.clone=function(){return new WebGPURenderItemBeginOcclusionQuery(this.query)},WebGPURenderItemEndOcclusionQuery.prototype.run=function(e){e.endOcclusionQuery()},WebGPURenderItemEndOcclusionQuery.prototype.clone=function(){return new WebGPURenderItemEndOcclusionQuery},WebGPURenderItemBundles.prototype.run=function(e){e.executeBundles(this.bundles)},WebGPURenderItemBundles.prototype.clone=function(){var e=new WebGPURenderItemBundles;return e.bundles=this.bundles,e},WebGPUBundleList.prototype.addBundle=function(e){if(!this._currentItemIsBundle){var t=new WebGPURenderItemBundles;this._list[this._listLength++]=t,this._currentBundleList=t.bundles,this._currentItemIsBundle=!0}e&&this._currentBundleList.push(e)},WebGPUBundleList.prototype._finishBundle=function(){this._currentItemIsBundle&&this._bundleEncoder&&(this._currentBundleList.push(this._bundleEncoder.finish()),this._bundleEncoder=void 0,this._currentItemIsBundle=!1)},WebGPUBundleList.prototype.addItem=function(e){this._finishBundle(),this._list[this._listLength++]=e,this._currentItemIsBundle=!1},WebGPUBundleList.prototype.getBundleEncoder=function(e,t,i){return!this._currentItemIsBundle&&(this.addBundle(),this._bundleEncoder=this._device.createRenderBundleEncoder({colorFormats:e,depthStencilFormat:t,sampleCount:i})),this._bundleEncoder},WebGPUBundleList.prototype.close=function(){this._finishBundle()},WebGPUBundleList.prototype.run=function(e){this.close();for(var t=0;t<this._listLength;++t)this._list[t].run(e)},WebGPUBundleList.prototype.reset=function(){this._listLength=0,this._currentItemIsBundle=!1,this.numDrawCalls=0},WebGPUBundleList.prototype.clone=function(){this.close();var e=new WebGPUBundleList(this._device);e._list=new Array(this._listLength),e._listLength=this._listLength,e.numDrawCalls=this.numDrawCalls;for(var t=0;t<this._listLength;++t)e._list[t]=this._list[t].clone();return e};var _0xf90150=(_0x1aab44=!0,function(e,t){var i=_0x1aab44?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1aab44=!1,i}),_0x5d8b0c=_0xf90150(void 0,(function(){return _0x5d8b0c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d8b0c).search("(((.+)+)+)+$")})),_0x1aab44;function _0x17d952(e,t){this._enabled=!1,this._measureDurationState=0,this._device=e,this._bufferManager=t}_0x5d8b0c(),Object.defineProperty(_0x17d952.prototype,"gpuFrameTimeCounter",{get:function(){return this._gpuFrameTimeCounter},enumerable:!1,configurable:!0}),Object.defineProperty(_0x17d952.prototype,"enable",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,this._measureDurationState=0,e?this._measureDuration=new WebGPUDurationMeasure(this._device,this._bufferManager):this._measureDuration.dispose())},enumerable:!1,configurable:!0}),_0x17d952.prototype.startFrame=function(e){this._enabled&&0===this._measureDurationState&&(this._measureDuration.start(e),this._measureDurationState=1)},_0x17d952.prototype.endFrame=function(e){var t=this;1===this._measureDurationState&&(this._measureDurationState=2,this._measureDuration.stop(e).then((function(e){null!==e&&e>=0&&(t._gpuFrameTimeCounter.fetchNewFrame(),t._gpuFrameTimeCounter.addCount(e,!0)),t._measureDurationState=0})))};const _0xb6b0b3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3c9c1c=_0xb6b0b3(void 0,(function(){return _0x3c9c1c.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c9c1c).search("(((.+)+)+)+$")}));function _0x28476e(e,t,i,n,r){void 0===r&&(r=!0),this._dstBuffers=[],this._device=i,this._bufferManager=n,this._count=e,this._canUseMultipleBuffers=r,this._querySet=i.createQuerySet({type:t,count:e}),this._queryBuffer=n.createRawBuffer(8*e,_0x5213c6.BufferUsage.QueryResolve|_0x5213c6.BufferUsage.CopySrc),!r&&this._dstBuffers.push(this._bufferManager.createRawBuffer(8*this._count,_0x5213c6.BufferUsage.MapRead|_0x5213c6.BufferUsage.CopyDst))}_0x3c9c1c(),Object.defineProperty(_0x28476e.prototype,"querySet",{get:function(){return this._querySet},enumerable:!1,configurable:!0}),_0x28476e.prototype._getBuffer=function(e,t){if(!this._canUseMultipleBuffers&&0===this._dstBuffers.length)return null;var i,n=this._device.createCommandEncoder();return 0===this._dstBuffers.length?i=this._bufferManager.createRawBuffer(8*this._count,_0x5213c6.BufferUsage.MapRead|_0x5213c6.BufferUsage.CopyDst):(i=this._dstBuffers[this._dstBuffers.length-1],this._dstBuffers.length--),n.resolveQuerySet(this._querySet,e,t,this._queryBuffer,0),n.copyBufferToBuffer(this._queryBuffer,0,i,0,8*t),this._device.queue.submit([n.finish()]),i},_0x28476e.prototype.readValues=function(e,t,i){return void 0===e&&(e=0),void 0===t&&(t=1),new Promise(((n,r)=>{var o;return null===(o=this._getBuffer(e,t))?r(null):o.mapAsync(_0x5213c6.MapMode.Read).then((()=>{const e=new BigUint64Array(o.getMappedRange()).slice();o.unmap(),this._dstBuffers[this._dstBuffers.length]=o,n({data:e,frameId:i})}))}))},_0x28476e.prototype.readValue=function(e){return void 0===e&&(e=0),new Promise(((t,i)=>{const n=this._getBuffer(e,1);return null===n?t(null):n.mapAsync(_0x5213c6.MapMode.Read).then((()=>{const e=new BigUint64Array(n.getMappedRange()),i=Number(e[0]);return n.unmap(),this._dstBuffers[this._dstBuffers.length]=n,t(i)}))}))},_0x28476e.prototype.readTwoValuesAndSubtract=async function(e){return void 0===e&&(e=0),new Promise(((t,i)=>{const n=this._getBuffer(e,2);return null===n?t(null):n.mapAsync(_0x5213c6.MapMode.Read).then((()=>{const e=new BigUint64Array(n.getMappedRange()),i=Number(e[1]-e[0]);return n.unmap(),this._dstBuffers[this._dstBuffers.length]=n,t(i)}))}))},_0x28476e.prototype.dispose=function(){this._querySet.destroy(),this._bufferManager.releaseBuffer(this._queryBuffer);for(var e=0;e<this._dstBuffers.length;++e)this._bufferManager.releaseBuffer(this._dstBuffers[e])};var _0x3393f1=(_0x2fc0dd=!0,function(e,t){var i=_0x2fc0dd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2fc0dd=!1,i}),_0x11eb2b=_0x3393f1(void 0,(function(){return _0x11eb2b.toString().search("(((.+)+)+)+$").toString().constructor(_0x11eb2b).search("(((.+)+)+)+$")})),_0x2fc0dd;_0x11eb2b();var _0x3a255b=0;function _0x37a9d4(e,t,i,n,r){void 0===n&&(n=4096),void 0===r&&(r=100),this._availableIndices=[],this._engine=e,this._device=t,this._bufferManager=i,this._frameLastBuffer=-1,this._lastBufferFrameID=-1,this._currentTotalIndices=0,this._countIncrement=r,this._allocateNewIndices(n)}Object.defineProperty(_0x37a9d4.prototype,"querySet",{get:function(){return this._querySet.querySet},enumerable:!1,configurable:!0}),Object.defineProperty(_0x37a9d4.prototype,"hasQueries",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x37a9d4.prototype,"canBeginQuery",{get:function(){switch(this._engine._getCurrentRenderPassIndex()){case 0:return void 0!==this._engine._mainRenderPassWrapper.renderPassDescriptor.occlusionQuerySet;case 1:return void 0!==this._engine._rttRenderPassWrapper.renderPassDescriptor.occlusionQuerySet}return!1},enumerable:!1,configurable:!0}),_0x37a9d4.prototype.createQuery=function(){0===this._availableIndices.length&&this._allocateNewIndices();var e=this._availableIndices[_0x3a255b];return _0x3a255b--,e},_0x37a9d4.prototype.deleteQuery=function(e){_0x3a255b++,this._availableIndices[_0x3a255b]=e},_0x37a9d4.prototype.isQueryResultAvailable=function(e){return this._retrieveQueryBuffer(),!!this._lastBuffer&&e<this._lastBuffer.length},_0x37a9d4.prototype.getQueryResult=function(e){var t,i;return Number(null!==(i=null===(t=this._lastBuffer)||void 0===t?void 0:t[e])&&void 0!==i?i:-1)},_0x37a9d4.prototype.getQueryResultFrameID=function(){return this._lastBufferFrameID},_0x37a9d4.prototype._retrieveQueryBuffer=function(){var e=this;this._lastBuffer&&this._frameLastBuffer===this._engine.frameId||this._frameLastBuffer!==this._engine.frameId&&(this._frameLastBuffer=this._engine.frameId,this._querySet.readValues(0,this._currentTotalIndices,this._engine.frameId).then((function(t){e._lastBuffer=t.data,e._lastBufferFrameID=t.frameId})).catch((t=>{e._lastBuffer=null})))},_0x37a9d4.prototype._allocateNewIndices=function(e){e=null!=e?e:this._countIncrement,this._delayQuerySetDispose();for(var t=0;t<e;++t)this._availableIndices.push(this._currentTotalIndices+t);_0x3a255b=this._availableIndices.length-1,this._currentTotalIndices+=e,this._querySet=new _0x28476e(this._currentTotalIndices,_0x5213c6.QueryType.Occlusion,this._device,this._bufferManager,!1)},_0x37a9d4.prototype._delayQuerySetDispose=function(){var e=this._querySet;e&&setTimeout((function(){return e.dispose}),1e3)},_0x37a9d4.prototype.dispose=function(){var e;null===(e=this._querySet)||void 0===e||e.dispose(),this._availableIndices=[]};var _0x5ca157=(_0x5db5d6=!0,function(e,t){var i=_0x5db5d6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5db5d6=!1,i}),_0x48f65d=_0x5ca157(void 0,(function(){return _0x48f65d.toString().search("(((.+)+)+)+$").toString().constructor(_0x48f65d).search("(((.+)+)+)+$")})),_0x5db5d6;function _0x12abee(e,t){void 0===t&&(t=20),this.debug=!1,this._sourceCode=e,this._numMaxIterations=t,this._functionDescr=[],this.inlineToken="#define inline"}_0x48f65d(),Object.defineProperty(_0x12abee.prototype,"code",{get:function(){return this._sourceCode},enumerable:!1,configurable:!0}),_0x12abee.prototype.processCode=function(){this.debug&&console.log("Start inlining process (code size=".concat(this._sourceCode.length,")...")),this._collectFunctions(),this._processInlining(this._numMaxIterations),this.debug&&console.log("End of inlining process.")},_0x12abee.prototype._collectFunctions=function(){for(var e=0;e<this._sourceCode.length;){var t=this._sourceCode.indexOf(this.inlineToken,e);if(t<0)break;var i=this._sourceCode.indexOf("(",t+this.inlineToken.length);if(i<0)this.debug&&console.warn("Could not find the opening parenthesis after the token. startIndex=".concat(e)),e=t+this.inlineToken.length;else{var n=_0x12abee._RegexpFindFunctionNameAndType.exec(this._sourceCode.substring(t+this.inlineToken.length,i));if(n){var r=[n[3],n[4]],o=r[0],a=r[1],s=ExtractBetweenMarkers("(",")",this._sourceCode,i);if(s<0)this.debug&&console.warn("Could not extract the parameters the function '".concat(a,"' (type=").concat(o,"). funcParamsStartIndex=").concat(i)),e=t+this.inlineToken.length;else{var l=this._sourceCode.substring(i+1,s),u=SkipWhitespaces(this._sourceCode,s+1);if(u!==this._sourceCode.length){var c=ExtractBetweenMarkers("{","}",this._sourceCode,u);if(c<0)this.debug&&console.warn("Could not extract the body of the function '".concat(a,"' (type=").concat(o,"). funcBodyStartIndex=").concat(u)),e=t+this.inlineToken.length;else{for(var h=this._sourceCode.substring(u,c+1),d=RemoveComments(l).split(","),f=[],p=0;p<d.length;++p){var _=d[p].trim(),m=_.lastIndexOf(" ");m>=0&&f.push(_.substring(m+1))}"void"!==o&&f.push("return"),this._functionDescr.push({name:a,type:o,parameters:f,body:h,callIndex:0}),e=c+1;var g=t>0?this._sourceCode.substring(0,t):"",x=c+1<this._sourceCode.length-1?this._sourceCode.substring(c+1):"";this._sourceCode=g+x,e-=c+1-t}}else this.debug&&console.warn("Could not extract the body of the function '".concat(a,"' (type=").concat(o,"). funcParamsEndIndex=").concat(s)),e=t+this.inlineToken.length}}else this.debug&&console.warn("Could not extract the name/type of the function from: ".concat(this._sourceCode.substring(t+this.inlineToken.length,i))),e=t+this.inlineToken.length}}this.debug&&console.log("Collect functions: ".concat(this._functionDescr.length," functions found. functionDescr="),this._functionDescr)},_0x12abee.prototype._processInlining=function(e){for(void 0===e&&(e=20);e-- >=0&&this._replaceFunctionCallsByCode(););return this.debug&&console.log("numMaxIterations is ".concat(e," after inlining process")),e>=0},_0x12abee.prototype._replaceFunctionCallsByCode=function(){for(var e=!1,t=0,i=this._functionDescr;t<i.length;t++)for(var n=i[t],r=n.name,o=n.type,a=n.parameters,s=n.body,l=0;l<this._sourceCode.length;){var u=this._sourceCode.indexOf(r,l);if(u<0)break;if(0===u||IsIdentifierChar(this._sourceCode.charAt(u-1)))l=u+r.length;else{var c=SkipWhitespaces(this._sourceCode,u+r.length);if(c!==this._sourceCode.length&&"("===this._sourceCode.charAt(c)){var h=ExtractBetweenMarkers("(",")",this._sourceCode,c);if(h<0)this.debug&&console.warn("Could not extract the parameters of the function call. Function '".concat(r,"' (type=").concat(o,"). callParamsStartIndex=").concat(c)),l=u+r.length;else{var d=this._sourceCode.substring(c+1,h),f=function(e){for(var t=[],i=0,n=0;i<e.length;){if("("===e.charAt(i)){var r=ExtractBetweenMarkers("(",")",e,i);if(r<0)return null;i=r}else","===e.charAt(i)&&(t.push(e.substring(n,i)),n=i+1);i++}return n<i&&t.push(e.substring(n,i)),t}(RemoveComments(d));if(null!==f){for(var p=[],_=0;_<f.length;++_){var m=f[_].trim();p.push(m)}var g="void"!==o?r+"_"+n.callIndex++:null;if(g&&p.push(g+" ="),p.length===a.length){l=h+1;var x=this._replaceNames(s,a,p),y=u>0?this._sourceCode.substring(0,u):"",v=h+1<this._sourceCode.length-1?this._sourceCode.substring(h+1):"";if(g){var $=FindBackward(this._sourceCode,u-1,"\n");y=this._sourceCode.substring(0,$+1);var b=this._sourceCode.substring($+1,u);this._sourceCode=y+o+" "+g+";\n"+x+"\n"+b+g+v,this.debug&&console.log("Replace function call by code. Function '".concat(r,"' (type=").concat(o,"). injectDeclarationIndex=").concat($,", call parameters=").concat(p))}else this._sourceCode=y+x+v,l+=x.length-(h+1-u),this.debug&&console.log("Replace function call by code. Function '".concat(r,"' (type=").concat(o,"). functionCallIndex=").concat(u,", call parameters=").concat(p));e=!0}else this.debug&&console.warn("Invalid function call: not the same number of parameters for the call than the number expected by the function. Function '".concat(r,"' (type=").concat(o,"). function parameters=").concat(a,", call parameters=").concat(p)),l=u+r.length}else this.debug&&console.warn("Invalid function call: can't extract the parameters of the function call. Function '".concat(r,"' (type=").concat(o,"). callParamsStartIndex=").concat(c,", callParams=")+d),l=u+r.length}}else l=u+r.length}}return e},_0x12abee.prototype._replaceNames=function(e,t,i){for(var n=function(n){var r=new RegExp(EscapeRegExp(t[n]),"g"),o=t[n].length,a=i[n];e=e.replace(r,(function(i){for(var r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];var l=r[0];return IsIdentifierChar(e.charAt(l-1))||IsIdentifierChar(e.charAt(l+o))?t[n]:a}))},r=0;r<t.length;++r)n(r);return e},_0x12abee._RegexpFindFunctionNameAndType=/((\s+?)(\w+)\s+(\w+)\s*?)$/;var _0x4be5d6=(_0x36cb1e=!0,function(e,t){var i=_0x36cb1e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x36cb1e=!1,i}),_0x5c4b62=_0x4be5d6(void 0,(function(){return _0x5c4b62.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c4b62).search("(((.+)+)+)+$")})),_0x36cb1e;function _0x1db2e9(){this._twgsl=null}_0x5c4b62(),_0x1db2e9.prototype.initTwgsl=function(e){var t=n$17((e=_0x1db2e9._TWgslDefaultOptions).jsPath),i=n$17(e.wasmPath),n=this;return _0xd79dde.LoadScriptAsync(t).then((function(){return self.twgsl(i)})).then((function(e){n._twgsl=e,Promise.resolve()}))},_0x1db2e9.prototype.convertSpirV2WGSL=function(e){var t=this._twgsl.convertSpirV2WGSL(e);return _0x1db2e9.ShowWGSLShaderCode&&(console.log(t),console.log("***********************************************")),t},_0x1db2e9._TWgslDefaultOptions={jsPath:"ThirdParty/twgsl.js",wasmPath:"ThirdParty/twgsl.wasm"},_0x1db2e9.ShowWGSLShaderCode=!1;var _0x41031f=(_0x2171f5=!0,function(e,t){var i=_0x2171f5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2171f5=!1,i}),_0x1ad99f=_0x41031f(void 0,(function(){return _0x1ad99f.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ad99f).search("(((.+)+)+)+$")})),_0x2171f5;function _0x1e8692(e,t,i,n){this._record=!1,this._play=!1,this._mainPassBundleList=[],this._enabled=!1,this._engine=e,this._mode=t,this._bundleList=i,this._bundleListRenderTarget=n}_0x1ad99f(),Object.defineProperty(_0x1e8692.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._mainPassBundleList.length=0,this._record=this._enabled=e,this._play=!1,e&&(this._modeSaved=this._mode,this._mode=Constants.SNAPSHOTRENDERING_STANDARD)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x1e8692.prototype,"play",{get:function(){return this._play},enumerable:!1,configurable:!0}),Object.defineProperty(_0x1e8692.prototype,"record",{get:function(){return this._record},enumerable:!1,configurable:!0}),Object.defineProperty(_0x1e8692.prototype,"mode",{get:function(){return this._mode},set:function(e){this._record?this._modeSaved=e:this._mode=e},enumerable:!1,configurable:!0}),_0x1e8692.prototype.endMainRenderPass=function(){this._record&&this._mainPassBundleList.push(this._bundleList.clone())},_0x1e8692.prototype.endRenderTargetPass=function(e,t){var i,n,r,o;if(this._play)null===(n=null===(i=t._bundleLists)||void 0===i?void 0:i[t._currentLayer])||void 0===n||n.run(e),this._mode===Constants.SNAPSHOTRENDERING_FAST&&this._engine._reportDrawCall(null===(o=null===(r=t._bundleLists)||void 0===r?void 0:r[t._currentLayer])||void 0===o?void 0:o.numDrawCalls);else{if(!this._record)return!1;!t._bundleLists&&(t._bundleLists=[]),t._bundleLists[t._currentLayer]=this._bundleListRenderTarget.clone(),t._bundleLists[t._currentLayer].run(e),this._bundleListRenderTarget.reset()}return!0},_0x1e8692.prototype.endFrame=function(e){if(this._record&&(this._mainPassBundleList.push(this._bundleList.clone()),this._record=!1,this._play=!0,this._mode=this._modeSaved),null!==e&&this._play)for(var t=0;t<this._mainPassBundleList.length;++t)this._mainPassBundleList[t].run(e),this._mode===Constants.SNAPSHOTRENDERING_FAST&&this._engine._reportDrawCall(this._mainPassBundleList[t].numDrawCalls)},_0x1e8692.prototype.reset=function(){this.enabled=!1,this.enabled=!0};var d$1g={NONE:0,STORING:1,STORED:2,FAILED:3};function l$14(e){if(!e$2e(e.name))throw new t$15("options.name is required.");var t=o$1l.defer();this.dbname=e.name;var i=indexedDB.open(this.dbname),n=this;return i.onsuccess=function(e){n.db=e.target.result,n.version=n.db.version,e$2e(n.cachestatus)||(n.cachestatus={}),t.resolve(n)},i.onupgradeneeded=function(e){n.db=e.target.result,n.version=n.db.version,t.resolve(n)},i.onerror=function(e){n.db=null,t.reject("create database fail, error code : "+e.target.errorcode)},this.layer=e.layer||null,this.storageType=e.storageType||"arrayBuffer",this.creatingTable=!1,this.cachestatus={},t.promise}l$14.prototype.checkObjectStoreExit=function(e){return!!e$2e(this.db)&&this.db.objectStoreNames.contains(e)},l$14.prototype.createObjectStore=function(e){var t=o$1l.defer();if(this.creatingTable)t.reject(!1);else{if(this.db.objectStoreNames.contains(e))return t.reject(!1),t.promise;this.creatingTable=!0;var i=this,n=parseInt(i.db.version);i.db.close();var r=indexedDB.open(i.dbname,n+1);r.onupgradeneeded=function(r){var o=r.target.result;i.db=o;var a=o.createObjectStore(e,{keyPath:"id"});e$2e(a)?(a.createIndex("value","value",{unique:!1}),e$2e(i.cachestatus)||(i.cachestatus={}),i.cachestatus[e]={},indexedDB.open(i.dbname,n+2).onsuccess=function(e){var n=e.target.result;i.db=n,i.creatingTable=!1,t.resolve(!0)}):(i.creatingTable=!1,t.reject(!1))},r.onsuccess=function(e){i.creatingTable=!1,e.target.result.close(),t.resolve(!0)},r.onerror=function(e){i.creatingTable=!1,t.reject(!1)}}return t.promise},l$14.prototype.putElementInDB=function(e,t,i,n){var r=o$1l.defer();if(!e$2e(this.db))return r.reject(!1),r.promise;var o,a=this;if(e$2e(a.cachestatus[e])&&!e$2e(n)&&e$2e(a.cachestatus[e][t])&&(a.cachestatus[e][t]===d$1g.STORING||a.cachestatus[e][t]===d$1g.STORED))return r.resolve(!1),r.promise;if(this.db.objectStoreNames.contains(e)){var s;e$2e(a.cachestatus[e])||(a.cachestatus[e]={});try{s=this.db.transaction([e],"readwrite")}catch{return r.reject(null),r.promise}if(o=s.objectStore(e),e$2e(n))if(n instanceof Array){for(var l=0,u=n.length;l<u;l++)a.cachestatus[e][n[l].key]!==d$1g.STORED&&(o.add({id:n[l].key,value:n[l].value}),a.cachestatus[e][n[l].key]=d$1g.STORED);r.resolve(!0)}else{for(var t in n)isNaN(1*t)||o.add({id:t,value:n[t]});r.resolve(!0)}else{if(!e$2e(t)||!e$2e(i))return;if(t instanceof Array&&i instanceof Array){for(l=0,u=t.length;l<u;l++)a.cachestatus[e][t[l]]!==d$1g.STORED&&(o.add({id:t[l],value:i[l]}),a.cachestatus[e][t[l]]=d$1g.STORED);s.oncomplete=function(e){r.resolve(!0)},s.onerror=function(e){r.reject(!1)}}else{var c=o.add({id:t,value:i});a.cachestatus[e][t]=d$1g.STORING,c.onsuccess=function(i){a.cachestatus[e][t]=d$1g.STORED,r.resolve(!0)},c.onerror=function(i){a.cachestatus[e][t]=d$1g.FAILED,r.reject(!1)}}}}else this.createObjectStore(e).then((function(s){var l=a.db.transaction([e],"readwrite");if(o=l.objectStore(e),e$2e(n)){for(var u=0,c=n.length;u<c;u++)o.add({id:n[u].key,value:n[u].value});r.resolve(!0)}else{var h=o.add({id:t,value:i});h.onsuccess=function(e){r.resolve(!0)},h.onerror=function(e){r.reject(!1)}}}),(function(e){r.reject(!1)}));return r.promise},l$14.prototype.getRangeFromDB=function(e,t){var i,n,r=o$1l.defer();if(!e$2e(this.db)||!this.db.objectStoreNames.contains(e))return null;try{i=this.db.transaction([e])}catch{return r.reject(null),r.promise}try{n=i.objectStore(e)}catch{r.reject(null)}var o=n.openCursor(IDBKeyRange.bound(t[0],t[1])),a=[];return o.onsuccess=function(e){var t=e.target.result;e$2e(t)?(a.push(t.value),t.continue()):r.resolve(a)},o.onerror=function(e){r.reject(null)},r.promise},l$14.prototype.getElementFromDB=function(e,t){var i,n,r=o$1l.defer();if(!e$2e(this.db))return null;if(!this.db.objectStoreNames.contains(e))return r.reject(null),r.promise;try{i=this.db.transaction([e])}catch{return r.reject(null),r.promise}try{n=i.objectStore(e)}catch{r.reject(null)}var o=n.get(t);return o.onsuccess=function(e){e$2e(e.target.result)?r.resolve(e.target.result.value):r.reject(null)},o.onerror=function(e){r.reject(null)},r.promise},l$14.prototype.getAllElementFromDB=function(e){var t,i,n=o$1l.defer();if(!e$2e(this.db)||!this.db.objectStoreNames.contains(e))return null;if(null!=this.transaction)t=this.transaction;else try{t=this.db.transaction([e])}catch{return n.reject(null),n.promise}try{i=t.objectStore(e)}catch{n.reject(null)}var r=i.getAll();return r.onsuccess=function(e){e$2e(e.target.result)?n.resolve(e.target.result):n.reject(null)},r.onerror=function(e){n.reject(null)},n.promise},l$14.prototype.updateElementInDB=function(e,t,i,n){var r=o$1l.defer();if(!e$2e(this.db)||!this.db.objectStoreNames.contains(e))return r.resolve(!1),r.promise;var o,a=this.db.transaction([e],"readwrite");try{o=a.objectStore(e)}catch{r.resolve(!1)}var s=o.get(t);return s.onsuccess=function(e){var a=e.target.result;e$2e(a)||(a={id:t}),a.value=!0===n?Object.assign(a.value,i):i;var s=o.put(a);s.onsuccess=function(e){r.resolve(!0)},s.onerror=function(e){r.resolve(!1)}},s.onerror=function(e){r.resolve(!1)},r.promise},l$14.prototype.removeElementFromDB=function(e,t){var i=o$1l.defer();if(!e$2e(this.db)||!this.db.objectStoreNames.contains(e))return i.resolve(!1),i.promise;var n,r=this.db.transaction([e],"readwrite");try{n=r.objectStore(e)}catch{i.resolve(!1)}var o=n.delete(t);return o.onerror=function(e){i.resolve(!1)},o.onsuccess=function(e){i.resolve(!0)},i.promise},l$14.prototype.clear=function(e){var t=o$1l.defer();if(!e$2e(this.db)||!this.db.objectStoreNames.contains(e))return t.resolve(!1),t.promise;var i,n=this.db.transaction([e],"readwrite");try{i=n.objectStore(e)}catch{t.resolve(!1)}var r=i.clear();return r.onerror=function(e){t.resolve(!1)},r.onsuccess=function(e){t.resolve(!0)},t.promise};var _0x52af61=(_0x1d4073=!0,function(e,t){var i=_0x1d4073?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d4073=!1,i}),_0x62068c=_0x52af61(void 0,(function(){return _0x62068c.toString().search("(((.+)+)+)+$").toString().constructor(_0x62068c).search("(((.+)+)+)+$")})),_0x1d4073,_0x2c9aaf;function _0x4cd9cc(e,t){void 0===t&&(t={});var i,n,r,o,a=_0xf48096.call(this,null);if((a=this)._uploadEncoderDescriptor={label:"upload"},a._renderEncoderDescriptor={label:"render"},a._renderTargetEncoderDescriptor={label:"renderTarget"},a._clearDepthValue=1,a._clearReverseDepthValue=0,a._clearStencilValue=0,a._defaultSampleCount=4,a._glslang=null,a._tintWASM=null,a._compiledComputeEffects={},a._counters={numEnableEffects:0,numEnableDrawWrapper:0,numBundleCreationNonCompatMode:0,numBundleReuseNonCompatMode:0},a.countersLastFrame={numEnableEffects:0,numEnableDrawWrapper:0,numBundleCreationNonCompatMode:0,numBundleReuseNonCompatMode:0},a.numMaxUncapturedErrors=20,a._commandBuffers=[null,null,null],a._currentRenderPass=null,a._mainRenderPassWrapper=new _0x2a893c,a._rttRenderPassWrapper=new _0x2a893c,a._pendingDebugCommands=[],a._onAfterUnbindFrameBufferObservable=new Observable,a._currentOverrideVertexBuffers=null,a._currentIndexBuffer=null,a._colorWriteLocal=!0,a._forceEnableEffect=!1,a.dbgShowShaderCode=!1,a.dbgSanityChecks=!0,a.dbgVerboseLogsForFirstFrames=!1,a.dbgVerboseLogsNumFrames=10,a.dbgLogIfNotDrawWrapper=!0,a.dbgShowEmptyEnableEffectCalls=!0,a._viewportsCurrent=[{x:0,y:0,w:0,h:0},{x:0,y:0,w:0,h:0}],a._scissorsCurrent=[{x:0,y:0,w:0,h:0},{x:0,y:0,w:0,h:0}],a._scissorCached={x:0,y:0,z:0,w:0},a._stencilRefsCurrent=[-1,-1],a._blendColorsCurrent=[[null,null,null,null],[null,null,null,null]],a._name="WebGPU",a.isNDCHalfZRange=!0,a.hasOriginBottomLeft=!1,t.deviceDescriptor=t.deviceDescriptor||{},t.swapChainFormat=t.swapChainFormat||_0x5213c6.TextureFormat.BGRA8Unorm,t.antialiasing=void 0===t.antialiasing||t.antialiasing,t.stencil=null===(i=t.stencil)||void 0===i||i,t.enableGPUDebugMarkers=null!==(n=t.enableGPUDebugMarkers)&&void 0!==n&&n,!navigator.gpu)return console.log("WebGPU is not supported by your browser."),a;a._isWebGPU=!0,a._shaderPlatformName="WEBGPU",void 0===t.deterministicLockstep&&(t.deterministicLockstep=!1),void 0===t.lockstepMaxSteps&&(t.lockstepMaxSteps=4),void 0===t.audioEngine&&(t.audioEngine=!0),a._deterministicLockstep=t.deterministicLockstep,a._lockstepMaxSteps=t.lockstepMaxSteps,a._timeStep=t.timeStep||1/60,a._doNotHandleContextLost=!!t.doNotHandleContextLost,a._canvas=e,a._options=t,a.premultipliedAlpha=null===(r=t.premultipliedAlpha)||void 0===r||r;var s=window.devicePixelRatio||1,l=t.limitDeviceRatio||s,u=null!==(o=t.adaptToDeviceRatio)&&void 0!==o&&o;a._hardwareScalingLevel=u?1/Math.min(l,s):1,a._mainPassSampleCount=t.antialiasing?a._defaultSampleCount:1,a._isStencilEnable=t.stencil,a._shaderProcessor=new _0x4c4c07,a._shaderProcessorWGSL=new _0x422dbd;var c=a;return a.saveCompiledShaderInIndexDB=!0,new l$14({name:_0x4cd9cc.COMPILED_WGSL_STORE_NAME}).then((function(e){e.checkObjectStoreExit(_0x4cd9cc.COMPILED_WGSL_TABLE_NAME)?c._indexedDBScheduler=e:e.createObjectStore(_0x4cd9cc.COMPILED_WGSL_TABLE_NAME).then((function(){c._indexedDBScheduler=e}))})),a}_0x62068c(),_0xf48096&&(_0x4cd9cc.__proto__=_0xf48096),_0x4cd9cc.prototype=Object.create(_0xf48096&&_0xf48096.prototype),_0x4cd9cc.prototype.constructor=_0xf48096,Object.defineProperties(_0x4cd9cc.prototype,{snapshotRenderingMode:{get:function(){return this._snapshotRendering.mode},set:function(e){this._snapshotRendering.mode=e}},snapshotRendering:{get:function(){return this._snapshotRendering.enabled},set:function(e){this._snapshotRendering.enabled=e}},disableCacheSamplers:{get:function(){return!!this._cacheSampler&&this._cacheSampler.disabled},set:function(e){this._cacheSampler&&(this._cacheSampler.disabled=e)}},disableCacheRenderPipelines:{get:function(){return!!this._cacheRenderPipeline&&this._cacheRenderPipeline.disabled},set:function(e){this._cacheRenderPipeline&&(this._cacheRenderPipeline.disabled=e)}},disableCacheBindGroups:{get:function(){return!!this._cacheBindGroups&&this._cacheBindGroups.disabled},set:function(e){this._cacheBindGroups&&(this._cacheBindGroups.disabled=e)}},IsSupportedAsync:{get:function(){return navigator.gpu?navigator.gpu.requestAdapter().then((function(e){return!!e}),(function(){return!1})).catch((function(){return!1})):Promise.resolve(!1)}},IsSupported:{get:function(){return console.log("You must call IsSupportedAsync for WebGPU!"),!1}},supportsUniformBuffers:{get:function(){return!0}},supportedExtensions:{get:function(){return this._adapterSupportedExtensions}},enabledExtensions:{get:function(){return this._deviceEnabledExtensions}},description:{get:function(){return this.name+this.version}},version:{get:function(){return 1}},compatibilityMode:{get:function(){return this._compatibilityMode},set:function(e){this._compatibilityMode=e}},currentSampleCount:{get:function(){return this._currentRenderTarget?this._currentRenderTarget.samples:this._mainPassSampleCount}},caps:{get:function(){return this._caps}}}),_0x4cd9cc.prototype.snapshotRenderingReset=function(){this._snapshotRendering.reset()},_0x4cd9cc.prototype.getInfo=function(){return{vendor:"unknown vendor",renderer:"unknown renderer",version:"unknown version"}},_0x4cd9cc.CreateAsync=function(e,t){void 0===t&&(t={});var i=new _0x4cd9cc(e,t);return new Promise((function(e){i.initAsync(t.glslangOptions,t.twgslOptions).then((function(){return e(i)}))}))},_0x4cd9cc.prototype.initAsync=function(e,t){var i,n=this;return this._initGlslang(null!=e?e:null===(i=this._options)||void 0===i?void 0:i.glslangOptions).then((function(e){var i;return n._glslang=e,n._tintWASM=_0x4cd9cc.UseTWGSL?new _0x1db2e9:null,n._tintWASM?n._tintWASM.initTwgsl(null!=t?t:null===(i=n._options)||void 0===i?void 0:i.twgslOptions).then((function(){return navigator.gpu.requestAdapter(n._options)}),(function(e){throw console.log("Can not initialize twgsl!"),Error("WebGPU initializations stopped.")})):navigator.gpu.requestAdapter(n._options)}),(function(e){throw console.log("Can not initialize glslang!"),Error("WebGPU initializations stopped.")})).then((function(e){if(e){n._adapter=e,n._adapterSupportedExtensions=[],n._adapter.features.forEach((function(e){return n._adapterSupportedExtensions.push(e)}));var t=n._options.deviceDescriptor;if(null==t?void 0:t.requiredFeatures){for(var i=[],r=0,o=t.requiredFeatures;r<o.length;r++){var a=o[r];-1!==n._adapterSupportedExtensions.indexOf(a)&&i.push(a)}t.requiredFeatures=i}return n._adapter.requestDevice(n._options.deviceDescriptor)}throw"Could not retrieve a WebGPU adapter (adapter is null)."})).then((function(e){var t,i;n._device=e,n._deviceEnabledExtensions=[],null===(t=n._device.features)||void 0===t||t.forEach((function(e){return n._deviceEnabledExtensions.push(e)}));var r=-1;n._device.addEventListener("uncapturederror",(function(e){++r<n.numMaxUncapturedErrors?_0x50f23a.Warn("WebGPU uncaptured error (".concat(r+1,"): ").concat(e.error," - ").concat(e.error.message)):r++===n.numMaxUncapturedErrors&&_0x50f23a.Warn("WebGPU uncaptured error: too many warnings (".concat(n.numMaxUncapturedErrors,"), no more warnings will be reported to the console for this engine."))})),!n._doNotHandleContextLost&&(null===(i=n._device.lost)||void 0===i||i.then((function(e){n._contextWasLost=!0,_0x50f23a.Warn("WebGPU context lost. "+e),n.onContextLostObservable.notifyObservers(n),n._restoreEngineAfterContextLost(n.initAsync.bind(n))})))}),(function(e){console.log("Could not retrieve a WebGPU device.")})).then((function(){n._bufferManager=new _0x430b74(n._device),n._textureHelper=new WebGPUTextureHelper(n._device,n._glslang,n._tintWASM,n._bufferManager,n),n._cacheSampler=new _0x2335eb(n._device),n._cacheBindGroups=new _0x10caf5(n._device,n._cacheSampler,n),n._timestampQuery=new _0x17d952(n._device,n._bufferManager),n._occlusionQuery=n._device.createQuerySet?new _0x37a9d4(n,n._device,n._bufferManager):void 0,n._bundleList=new WebGPUBundleList(n._device),n._bundleListRenderTarget=new WebGPUBundleList(n._device),n._snapshotRendering=new _0x1e8692(n,n._snapshotRenderingMode,n._bundleList,n._bundleListRenderTarget),n._ubInvertY=n._bufferManager.createBuffer(new Float32Array([-1,0]),_0x5213c6.BufferUsage.Uniform|_0x5213c6.BufferUsage.CopyDst),n._ubDontInvertY=n._bufferManager.createBuffer(new Float32Array([1,0]),_0x5213c6.BufferUsage.Uniform|_0x5213c6.BufferUsage.CopyDst),n.dbgVerboseLogsForFirstFrames&&void 0===n._count&&(n._count=0,console.log("%c frame #"+n._count+" - begin","background: #ffff00")),n._uploadEncoder=n._device.createCommandEncoder(n._uploadEncoderDescriptor),n._renderEncoder=n._device.createCommandEncoder(n._renderEncoderDescriptor),n._renderTargetEncoder=n._device.createCommandEncoder(n._renderTargetEncoderDescriptor),n._emptyVertexBuffer=new VertexBuffer(n,[0],"",!1,!1,1,!1,0,1),n._initializeLimits(),n._cacheRenderPipeline=new _0x3a822c(n._device,n._emptyVertexBuffer,!n._caps.textureFloatLinearFiltering),n._depthCullingState=new _0x5bc595(n._cacheRenderPipeline),n._stencilStateComposer=new _0x32b365(n._cacheRenderPipeline),n._stencilStateComposer.stencilGlobal=n._stencilState,n._depthCullingState.depthTest=!0,n._depthCullingState.depthFunc=_0x333f62.LEQUAL,n._depthCullingState.depthMask=!0,n._textureHelper.setCommandEncoder(n._uploadEncoder),n._clearQuad=new _0x28ce94(n._device,n,n._emptyVertexBuffer),n._defaultDrawContext=n.createDrawContext(),n._currentDrawContext=n._defaultDrawContext,n._defaultMaterialContext=n.createMaterialContext(),n._currentMaterialContext=n._defaultMaterialContext,n._initializeContextAndSwapChain(),n._initializeMainAttachments(!0)})).catch((function(e){console.log("Can not create WebGPU Device and/or context."),console.trace&&console.trace()}))},_0x4cd9cc.prototype._initGlslang=function(e){if(e=e||{},(e=p$19(_0x4cd9cc._GLSLslangDefaultOptions,e)).glslang)return Promise.resolve(e.glslang);if(self.glslang)return self.glslang(e.wasmPath);if(e.jsPath&&e.wasmPath){var t=n$17(e.jsPath),i=n$17(e.wasmPath);return"undefined"!=typeof window?_0xd79dde.LoadScriptAsync(t).then((function(){return self.glslang(i)})):(importScripts(t),self.glslang(i))}return Promise.reject("gslang is not available.")},_0x4cd9cc.prototype._initializeLimits=function(){var e=this._adapter;this._caps={maxTexturesImageUnits:e.maxSampledTexturesPerShaderStage,maxVertexTextureImageUnits:e.maxSampledTexturesPerShaderStage,maxCombinedTexturesImageUnits:32,maxTextureSize:e.maxTextureDimension2D,maxCubemapTextureSize:e.maxTextureDimension3D,maxRenderTextureSize:e.maxTextureDimension2D,maxVertexAttribs:e.maxVertexAttributes,maxVaryingVectors:15,maxFragmentUniformVectors:1024,maxVertexUniformVectors:1024,standardDerivatives:!0,astc:this._deviceEnabledExtensions.indexOf(_0x5213c6.FeatureName.TextureCompressionASTC)>=0||void 0,s3tc:this._deviceEnabledExtensions.indexOf(_0x5213c6.FeatureName.TextureCompressionBC)>=0||void 0,pvrtc:null,etc1:null,etc2:this._deviceEnabledExtensions.indexOf(_0x5213c6.FeatureName.TextureCompressionETC2)>=0||void 0,bptc:this._deviceEnabledExtensions.indexOf(_0x5213c6.FeatureName.TextureCompressionBC)>=0||void 0,maxAnisotropy:4,uintIndices:!0,fragmentDepthSupported:!0,highPrecisionShaderSupported:!0,colorBufferFloat:!0,textureFloat:!0,textureFloatLinearFiltering:!1,textureFloatRender:!0,textureHalfFloat:!0,textureHalfFloatLinearFiltering:!0,textureHalfFloatRender:!0,textureLOD:!0,drawBuffersExtension:!0,depthTextureExtension:!0,vertexArrayObject:!1,instancedArrays:!0,timerQuery:"undefined"!=typeof BigUint64Array&&-1!==this.enabledExtensions.indexOf(_0x5213c6.FeatureName.TimestampQuery)||void 0,supportOcclusionQuery:"undefined"!=typeof BigUint64Array,canUseTimestampForTimerQuery:!0,multiview:!1,oculusMultiview:!1,parallelShaderCompile:void 0,blendMinMax:!0,maxMSAASamples:4,canUseGLInstanceID:!0,canUseGLVertexID:!0,supportComputeShaders:!0,supportSRGBBuffers:!0,supportTransformFeedbacks:!1,textureMaxLevel:!0,texture2DArrayMaxLayerCount:e.maxTextureArrayLayers,minUniformBufferOffsetAlignment:e.minUniformBufferOffsetAlignment,maxUniformBufferBindingSize:e.maxUniformBufferBindingSize},this._caps.parallelShaderCompile=null,this._features={forceBitmapOverHTMLImageElement:!0,supportRenderAndCopyToLodForFloatTextures:!0,supportDepthStencilTexture:!0,supportShadowSamplers:!0,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:!0,trackUbosInFrame:!0,checkUbosContentBeforeUpload:!0,supportCSM:!0,basisNeedsPOT:!1,support3DTextures:!0,needTypeSuffixInShaderConstants:!0,supportMSAA:!0,supportSSAO2:!0,supportExtendedTextureFormats:!0,supportSwitchCaseInShader:!0,supportSyncTextureRead:!1,needsInvertingBitmap:!1,useUBOBindingCache:!1,needShaderCodeInlining:!0,needToAlwaysBindUniformBuffers:!0,supportRenderPasses:!0,_collectUbosUpdatedInFrame:!1}},_0x4cd9cc.prototype._initializeContextAndSwapChain=function(){this._context=this._canvas.getContext("webgpu"),this._configureContext(),this._colorFormat=this._options.swapChainFormat,this._mainRenderPassWrapper.colorAttachmentGPUTextures=[new _0x157d2f],this._mainRenderPassWrapper.colorAttachmentGPUTextures[0].format=this._colorFormat},_0x4cd9cc.prototype._initializeMainAttachments=function(e){var t;void 0===e&&(e=!1),this._mainTextureExtends={width:this.getRenderWidth(e),height:this.getRenderHeight(e),depthOrArrayLayers:1};var i,n=new Float32Array([this.getRenderHeight()]);if(this._bufferManager.setSubData(this._ubInvertY,4,n),this._bufferManager.setSubData(this._ubDontInvertY,4,n),this._options.antialiasing){var r={size:this._mainTextureExtends,mipLevelCount:1,sampleCount:this._mainPassSampleCount,dimension:_0x5213c6.TextureDimension.E2d,format:this._options.swapChainFormat,usage:_0x5213c6.TextureUsage.RenderAttachment};null===(t=this._mainTexture)||void 0===t||t.destroy(),this._mainTexture=this._device.createTexture(r),i=[{view:this._mainTexture.createView(),clearValue:new e$1X(0,0,0,1),loadOp:_0x5213c6.LoadOp.Clear,storeOp:_0x5213c6.StoreOp.Store}]}else i=[{view:void 0,clearValue:new e$1X(0,0,0,1),loadOp:_0x5213c6.LoadOp.Clear,storeOp:_0x5213c6.StoreOp.Store}];this._mainRenderPassWrapper.depthTextureFormat=this.isStencilEnable?_0x5213c6.TextureFormat.Depth24PlusStencil8:_0x5213c6.TextureFormat.Depth32Float,this._setDepthTextureFormat(this._mainRenderPassWrapper);var o={size:this._mainTextureExtends,mipLevelCount:1,sampleCount:this._mainPassSampleCount,dimension:_0x5213c6.TextureDimension.E2d,format:this._mainRenderPassWrapper.depthTextureFormat,usage:_0x5213c6.TextureUsage.RenderAttachment};this._depthTexture&&this._depthTexture.destroy(),this._depthTexture=this._device.createTexture(o);var a={view:this._depthTexture.createView(),depthClearValue:this._clearDepthValue,depthLoadOp:_0x5213c6.LoadOp.Clear,depthStoreOp:_0x5213c6.StoreOp.Store,stencilClearValue:this._clearStencilValue,stencilLoadOp:this.isStencilEnable?_0x5213c6.LoadOp.Clear:void 0,stencilStoreOp:this.isStencilEnable?_0x5213c6.StoreOp.Store:void 0};this._mainRenderPassWrapper.renderPassDescriptor={colorAttachments:i,depthStencilAttachment:a},null!==this._mainRenderPassWrapper.renderPass&&this._endMainRenderPass()},_0x4cd9cc.prototype._configureContext=function(){this._context.configure({device:this._device,format:this._options.swapChainFormat,usage:_0x5213c6.TextureUsage.RenderAttachment|_0x5213c6.TextureUsage.CopySrc,alphaMode:this.premultipliedAlpha?_0x5213c6.CanvasCompositingAlphaMode.Premultiplied:_0x5213c6.CanvasCompositingAlphaMode.Opaque})},_0x4cd9cc.prototype.setSize=function(e,t,i){return void 0===i&&(i=!1),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - setSize called -",e,t)),this._initializeMainAttachments(i),this.snapshotRendering&&this.snapshotRenderingReset(),!0},_0x4cd9cc.prototype._getShaderProcessor=function(e){return e===_0x3b3a87.WGSL?this._shaderProcessorWGSL:this._shaderProcessor},_0x4cd9cc.prototype._getShaderProcessingContext=function(e){return new _0x27ae2e(e)},_0x4cd9cc.prototype.applyStates=function(){this._stencilStateComposer.apply(),this._cacheRenderPipeline.setAlphaBlendEnabled(this._alphaState.alphaBlend)},_0x4cd9cc.prototype.wipeCaches=function(e){this.preventCacheWipeBetweenFrames&&!e||(this._forceEnableEffect=!0,this._currentIndexBuffer=null,this._currentOverrideVertexBuffers=null,this._cacheRenderPipeline.setBuffers(null,null,null),e&&(this._stencilStateComposer.reset(),this._depthCullingState.reset(),this._depthCullingState.depthFunc=_0x333f62.LEQUAL,this._alphaState.reset(),this._alphaMode=_0x333f62.ALPHA_ADD,this._alphaEquation=_0x333f62.ALPHA_DISABLE,this._cacheRenderPipeline.setAlphaBlendFactors(this._alphaState._blendFunctionParameters,this._alphaState._blendEquationParameters),this._cacheRenderPipeline.setAlphaBlendEnabled(!1),this.setColorWrite(!0)),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null)},_0x4cd9cc.prototype.setColorWrite=function(e){this._colorWriteLocal=e,this._cacheRenderPipeline.setWriteMask(e?15:0)},_0x4cd9cc.prototype.getColorWrite=function(){return this._colorWriteLocal},_0x4cd9cc.prototype._resetCurrentViewport=function(e){this._viewportsCurrent[e].x=0,this._viewportsCurrent[e].y=0,this._viewportsCurrent[e].w=0,this._viewportsCurrent[e].h=0,1===e&&(this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0)},_0x4cd9cc.prototype._mustUpdateViewport=function(e){var t=e===this._mainRenderPassWrapper.renderPass?0:1,i=this._viewportCached.x,n=this._viewportCached.y,r=this._viewportCached.z,o=this._viewportCached.w,a=this._viewportsCurrent[t].x!==i||this._viewportsCurrent[t].y!==n||this._viewportsCurrent[t].w!==r||this._viewportsCurrent[t].h!==o;return a&&(this._viewportsCurrent[t].x=this._viewportCached.x,this._viewportsCurrent[t].y=this._viewportCached.y,this._viewportsCurrent[t].w=this._viewportCached.z,this._viewportsCurrent[t].h=this._viewportCached.w),a},_0x4cd9cc.prototype._applyViewport=function(e){var t=Math.floor(this._viewportCached.y),i=Math.floor(this._viewportCached.w);!this._currentRenderTarget&&(t=this.getRenderHeight()-t-i),e.setViewport(Math.floor(this._viewportCached.x),t,Math.floor(this._viewportCached.z),i,0,1),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - viewport applied - (",this._viewportCached.x,this._viewportCached.y,this._viewportCached.z,this._viewportCached.w,") current pass is main pass="+(e===this._mainRenderPassWrapper.renderPass)))},_0x4cd9cc.prototype._viewport=function(e,t,i,n){this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=i,this._viewportCached.w=n},_0x4cd9cc.prototype._resetCurrentScissor=function(e){this._scissorsCurrent[e].x=0,this._scissorsCurrent[e].y=0,this._scissorsCurrent[e].w=0,this._scissorsCurrent[e].h=0},_0x4cd9cc.prototype._mustUpdateScissor=function(e){var t=e===this._mainRenderPassWrapper.renderPass?0:1,i=this._scissorCached.x,n=this._scissorCached.y,r=this._scissorCached.z,o=this._scissorCached.w,a=this._scissorsCurrent[t].x!==i||this._scissorsCurrent[t].y!==n||this._scissorsCurrent[t].w!==r||this._scissorsCurrent[t].h!==o;return a&&(this._scissorsCurrent[t].x=this._scissorCached.x,this._scissorsCurrent[t].y=this._scissorCached.y,this._scissorsCurrent[t].w=this._scissorCached.z,this._scissorsCurrent[t].h=this._scissorCached.w),a},_0x4cd9cc.prototype._applyScissor=function(e){e.setScissorRect(this._scissorCached.x,this._currentRenderTarget?this._scissorCached.y:this.getRenderHeight()-this._scissorCached.w-this._scissorCached.y,this._scissorCached.z,this._scissorCached.w),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - scissor applied - (",this._scissorCached.x,this._scissorCached.y,this._scissorCached.z,this._scissorCached.w,") current pass is main pass="+(e===this._mainRenderPassWrapper.renderPass)))},_0x4cd9cc.prototype._scissorIsActive=function(){return 0!==this._scissorCached.x||0!==this._scissorCached.y||0!==this._scissorCached.z||0!==this._scissorCached.w},_0x4cd9cc.prototype.enableScissor=function(e,t,i,n){this._scissorCached.x=e,this._scissorCached.y=t,this._scissorCached.z=i,this._scissorCached.w=n},_0x4cd9cc.prototype.disableScissor=function(){this._scissorCached.x=0,this._scissorCached.y=0,this._scissorCached.z=0,this._scissorCached.w=0,this._resetCurrentScissor(0),this._resetCurrentScissor(1)},_0x4cd9cc.prototype._resetCurrentStencilRef=function(e){this._stencilRefsCurrent[e]=-1},_0x4cd9cc.prototype._mustUpdateStencilRef=function(e){var t=e===this._mainRenderPassWrapper.renderPass?0:1,i=this._stencilStateComposer.funcRef!==this._stencilRefsCurrent[t];return i&&(this._stencilRefsCurrent[t]=this._stencilStateComposer.funcRef),i},_0x4cd9cc.prototype._applyStencilRef=function(e){var t;e.setStencilReference(null!==(t=this._stencilStateComposer.funcRef)&&void 0!==t?t:0)},_0x4cd9cc.prototype._resetCurrentColorBlend=function(e){this._blendColorsCurrent[e][0]=this._blendColorsCurrent[e][1]=this._blendColorsCurrent[e][2]=this._blendColorsCurrent[e][3]=null},_0x4cd9cc.prototype._mustUpdateBlendColor=function(e){var t=e===this._mainRenderPassWrapper.renderPass?0:1,i=this._alphaState._blendConstants,n=i[0]!==this._blendColorsCurrent[t][0]||i[1]!==this._blendColorsCurrent[t][1]||i[2]!==this._blendColorsCurrent[t][2]||i[3]!==this._blendColorsCurrent[t][3];return n&&(this._blendColorsCurrent[t][0]=i[0],this._blendColorsCurrent[t][1]=i[1],this._blendColorsCurrent[t][2]=i[2],this._blendColorsCurrent[t][3]=i[3]),n},_0x4cd9cc.prototype._applyBlendColor=function(e){e.setBlendConstant(this._alphaState._blendConstants)},_0x4cd9cc.prototype.clear=function(e,t,i,n){void 0===n&&(n=!1),e&&void 0===e.a&&(e.a=1);var r=this._scissorIsActive();this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - clear called - backBuffer=",t," depth=",i," stencil=",n," scissor is active=",r)),this._currentRenderTarget?r?(!this._rttRenderPassWrapper.renderPass&&this._startRenderTargetRenderPass(this._currentRenderTarget,!1,t?e:null,i,n),this.compatibilityMode?this._applyScissor(this._currentRenderPass):this._bundleListRenderTarget.addItem(new WebGPURenderItemScissor(this._scissorCached.x,this._scissorCached.y,this._scissorCached.z,this._scissorCached.w)),this._clearFullQuad(t?e:null,i,n)):(this._currentRenderPass&&this._endRenderTargetRenderPass(),this._startRenderTargetRenderPass(this._currentRenderTarget,!0,t?e:null,i,n)):((!this._mainRenderPassWrapper.renderPass||!r)&&this._startMainRenderPass(!r,t?e:null,i,n),r&&(this.compatibilityMode?this._applyScissor(this._currentRenderPass):this._bundleList.addItem(new WebGPURenderItemScissor(this._scissorCached.x,this._scissorCached.y,this._scissorCached.z,this._scissorCached.w)),this._clearFullQuad(t?e:null,i,n)))},_0x4cd9cc.prototype._clearFullQuad=function(e,t,i){var n,r,o,a=this.compatibilityMode?this._getCurrentRenderPass():null,s=0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget;this._clearQuad.setColorFormat(this._colorFormat),this._clearQuad.setDepthStencilFormat(this._depthTextureFormat),this._clearQuad.setMRTAttachments(null!==(n=this._cacheRenderPipeline.mrtAttachments)&&void 0!==n?n:[],null!==(r=this._cacheRenderPipeline.mrtTextureArray)&&void 0!==r?r:[],this._cacheRenderPipeline.mrtTextureCount),this.compatibilityMode?a.setStencilReference(this._clearStencilValue):s.addItem(new WebGPURenderItemStencilRef(this._clearStencilValue));var l=this._clearQuad.clear(a,e,t,i,this.currentSampleCount);this.compatibilityMode?this._applyStencilRef(a):(s.addBundle(l),s.addItem(new WebGPURenderItemStencilRef(null!==(o=this._stencilStateComposer.funcRef)&&void 0!==o?o:0)),this._reportDrawCall())},_0x4cd9cc.prototype.createVertexBuffer=function(e){var t;return t=e instanceof Array?new Float32Array(e):e instanceof ArrayBuffer?new Uint8Array(e):e,this._bufferManager.createBufferByMap(t,_0x5213c6.BufferUsage.Vertex|_0x5213c6.BufferUsage.CopyDst)},_0x4cd9cc.prototype.createDynamicVertexBuffer=function(e){return this.createVertexBuffer(e)},_0x4cd9cc.prototype.createIndexBuffer=function(e){var t,i=!0;e instanceof Uint32Array||e instanceof Int32Array?t=e:e instanceof Uint16Array?(t=e,i=!1):e.length>65535?t=new Uint32Array(e):(t=new Uint16Array(e),i=!1);var n=this._bufferManager.createBufferByMap(t,_0x5213c6.BufferUsage.Index|_0x5213c6.BufferUsage.CopyDst);return n.is32Bits=i,n},_0x4cd9cc.prototype._createBuffer=function(e,t){var i;i=e instanceof Array?new Float32Array(e):e instanceof ArrayBuffer?new Uint8Array(e):e;var n=0;return t&_0x333f62.BUFFER_CREATIONFLAG_READ&&(n|=_0x5213c6.BufferUsage.CopySrc),t&_0x333f62.BUFFER_CREATIONFLAG_WRITE&&(n|=_0x5213c6.BufferUsage.CopyDst),t&_0x333f62.BUFFER_CREATIONFLAG_UNIFORM&&(n|=_0x5213c6.BufferUsage.Uniform),t&_0x333f62.BUFFER_CREATIONFLAG_VERTEX&&(n|=_0x5213c6.BufferUsage.Vertex),t&_0x333f62.BUFFER_CREATIONFLAG_INDEX&&(n|=_0x5213c6.BufferUsage.Index),t&_0x333f62.BUFFER_CREATIONFLAG_STORAGE&&(n|=_0x5213c6.BufferUsage.Storage),this._bufferManager.createBuffer(i,n)},_0x4cd9cc.prototype.bindBuffersDirectly=function(){throw"Not implemented on WebGPU"},_0x4cd9cc.prototype.updateAndBindInstancesBuffer=function(){throw"Not implemented on WebGPU"},_0x4cd9cc.prototype.bindBuffers=function(e,t,i,n){this._currentIndexBuffer=t,this._currentOverrideVertexBuffers=null!=n?n:null,this._cacheRenderPipeline.setBuffers(e,t,this._currentOverrideVertexBuffers)},_0x4cd9cc.prototype._releaseBuffer=function(e){return this._bufferManager.releaseBuffer(e)},_0x4cd9cc.prototype.createEffect=function(e,t,i,n,r,o,a,s,l,u){var c;void 0===u&&(u=_0x3b3a87.GLSL);var h=e.vertexElement||e.vertex||e.vertexToken||e.vertexSource||e,d=e.fragmentElement||e.fragment||e.fragmentToken||e.fragmentSource||e,f=this._getGlobalDefines(),p=null!==(c=null!=r?r:t.defines)&&void 0!==c?c:"";f&&(p+="\n"+f);var _=h+"+"+d+"@"+p;if(this._compiledEffects[_]){var m=this._compiledEffects[_];return a&&m.isReady()&&a(m),m}var g=new _0x57b60b(e,t,i,n,this,r,o,a,s,l,_,u);return this._compiledEffects[_]=g,g},_0x4cd9cc.prototype._compileRawShaderToSpirV=function(e,t){return this._glslang.compileGLSL(e,t)},_0x4cd9cc.prototype._compileShaderToSpirV=function(e,t,i,n){return this._compileRawShaderToSpirV(n+(i?i+"\n":"")+e,t)},_0x4cd9cc.prototype._getWGSLShader=function(e,t,i){return(i=i?"//"+i.split("\n").join("\n//")+"\n":"")+e},_0x4cd9cc.prototype._getCompiledShaderFromIndexDB=function(e,t,i){this.saveCompiledShaderInIndexDB&&e==_0x3b3a87.GLSL&&this._indexedDBScheduler?this._indexedDBScheduler.getElementFromDB(_0x4cd9cc.COMPILED_WGSL_TABLE_NAME,t).then((e=>{if(null!=e){var t=e[e.length-1],n=e.slice(0,t),r=e.slice(t,e.length-1);i(!0,n,r)}else console.log("shader text from indexDB is null."),i(!1,null,null)}),(e=>{i(!1,null,null)})):i(!1,null,null)},_0x4cd9cc.prototype._saveCompiledShaderToIndexDB=function(e,t,i){if(this._indexedDBScheduler&&this.saveCompiledShaderInIndexDB){var n=t.length+i.length,r=new Uint32Array(n+1);r.set(t,0),r.set(i,t.length),r[n]=t.length,this._indexedDBScheduler.putElementInDB(_0x4cd9cc.COMPILED_WGSL_TABLE_NAME,e,r)}},_0x4cd9cc.prototype._createPipelineStageDescriptor=function(e,t,i,n){return this._tintWASM&&n===_0x3b3a87.GLSL&&(t=this._tintWASM.convertSpirV2WGSL(t),i=this._tintWASM.convertSpirV2WGSL(i),t=t.replace(/type\s/g,"alias "),i=i.replace(/type\s/g,"alias ")),{vertexStage:{module:this._device.createShaderModule({code:t}),entryPoint:"main"},fragmentStage:{module:this._device.createShaderModule({code:i}),entryPoint:"main"}}},_0x4cd9cc.prototype._compileRawPipelineStageDescriptor=function(e,t,i,n){var r=n===_0x3b3a87.GLSL?this._compileRawShaderToSpirV(t,"vertex"):t,o=n===_0x3b3a87.GLSL?this._compileRawShaderToSpirV(i,"fragment"):i;return this._createPipelineStageDescriptor(e,r,o,n)},_0x4cd9cc.prototype._compilePipelineStageDescriptor=function(e,t,i,n,r){this.onBeforeShaderCompilationObservable.notifyObservers(this);var o="#version 450\n",a=r===_0x3b3a87.GLSL?this._compileShaderToSpirV(t,"vertex",n,o):this._getWGSLShader(t,"vertex",n),s=r===_0x3b3a87.GLSL?this._compileShaderToSpirV(i,"fragment",n,o):this._getWGSLShader(i,"fragment",n),l=this._createPipelineStageDescriptor(e,a,s,r);return this.onAfterShaderCompilationObservable.notifyObservers(this),l},_0x4cd9cc.prototype.createRawShaderProgram=function(){throw"Not available on WebGPU"},_0x4cd9cc.prototype.createShaderProgram=function(){throw"Not available on WebGPU"},_0x4cd9cc.prototype.inlineShaderCode=function(e){var t=new _0x12abee(e);return t.debug=!1,t.processCode(),t.code},_0x4cd9cc.prototype.createPipelineContext=function(e){return new _0x2a8456(e,this)},_0x4cd9cc.prototype.createMaterialContext=function(){return new _0x4aeff2},_0x4cd9cc.prototype.createDrawContext=function(){return new _0x1bd725(this._bufferManager)},_0x4cd9cc.prototype._preparePipelineContext=function(e,t,i,n,r,o,a,s,l,u,c){var h=e,d=c||h.shaderProcessingContext.shaderLanguage;this.dbgShowShaderCode&&(console.log(s),console.log(t),console.log(i)),h.sources={fragment:i,vertex:t,rawVertex:r,rawFragment:o};var f=e._name;h.stages=n?this._compileRawPipelineStageDescriptor(f,t,i,d):this._compilePipelineStageDescriptor(f,t,i,s,d)},_0x4cd9cc.prototype.getAttributes=function(e,t){for(var i=new Array(t.length),n=e,r=0;r<t.length;r++){var o=t[r],a=n.shaderProcessingContext.availableAttributes[o];void 0!==a&&(i[r]=a)}return i},_0x4cd9cc.prototype.enableEffect=function(e){if(e){var t=!0;if(_0x2da137.IsWrapper(e)){if(!e.effect||e.effect===this._currentEffect&&e.materialContext===this._currentMaterialContext&&e.drawContext===this._currentDrawContext&&!this._forceEnableEffect){if(!e.effect&&this.dbgShowEmptyEnableEffectCalls)throw console.error("drawWrapper=",e),"Invalid call to enableEffect: the effect property is empty!";return}if(t=e.effect!==this._currentEffect,this._currentEffect=e.effect,this._currentMaterialContext=e.materialContext,this._currentDrawContext=e.drawContext,this._counters.numEnableDrawWrapper++,!this._currentMaterialContext)throw console.error("drawWrapper=",e),"Invalid call to enableEffect: the materialContext property is empty!"}else t=e!==this._currentEffect,this._currentEffect=e,this._currentMaterialContext=this._defaultMaterialContext,this._currentDrawContext=this._defaultDrawContext,this._counters.numEnableEffects++,this.dbgLogIfNotDrawWrapper&&_0x50f23a.Warn("enableEffect has been called with an Effect and not a Wrapper! effect.uniqueId=".concat(e.uniqueId,", effect.name=").concat(e.name,", effect.name.vertex=").concat(e.name.vertex,", effect.name.fragment=").concat(e.name.fragment),10);this._stencilStateComposer.stencilMaterial=void 0,this._forceEnableEffect=!t&&!this._forceEnableEffect&&this._forceEnableEffect,t&&(this._currentEffect.onBind&&this._currentEffect.onBind(this._currentEffect),this._currentEffect._onBindObservable&&this._currentEffect._onBindObservable.notifyObservers(this._currentEffect))}},_0x4cd9cc.prototype._releaseEffect=function(e){this._compiledEffects[e._key]&&(delete this._compiledEffects[e._key],this._deletePipelineContext(e.getPipelineContext()))},_0x4cd9cc.prototype.releaseEffects=function(){for(var e in this._compiledEffects){var t=this._compiledEffects[e].getPipelineContext();this._deletePipelineContext(t)}this._compiledEffects={}},_0x4cd9cc.prototype._deletePipelineContext=function(e){e&&e.dispose()},Object.defineProperty(_0x4cd9cc.prototype,"needPOTTextures",{get:function(){return!1},enumerable:!1,configurable:!0}),_0x4cd9cc.prototype._createHardwareTexture=function(){return new _0x157d2f},_0x4cd9cc.prototype._releaseTexture=function(e){var t=this._internalTexturesCache.indexOf(e);-1!==t&&this._internalTexturesCache.splice(t,1),this._textureHelper.releaseTexture(e)},_0x4cd9cc.prototype._getRGBABufferInternalSizedFormat=function(){return _0x333f62.TEXTUREFORMAT_RGBA},_0x4cd9cc.prototype.updateTextureComparisonFunction=function(e,t){e._comparisonFunction=t},_0x4cd9cc.prototype._createInternalTexture=function(e,t,i,n){var r,o,a;void 0===i&&(i=!0),void 0===n&&(n=InternalTextureSource.Unknown);var s={};void 0!==t&&"object"==typeof t?(s.generateMipMaps=t.generateMipMaps,s.type=void 0===t.type?_0x333f62.TEXTURETYPE_UNSIGNED_INT:t.type,s.samplingMode=void 0===t.samplingMode?_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,s.format=void 0===t.format?_0x333f62.TEXTUREFORMAT_RGBA:t.format,s.samples=null!==(r=t.samples)&&void 0!==r?r:1,s.creationFlags=null!==(o=t.creationFlags)&&void 0!==o?o:0,s.useSRGBBuffer=null!==(a=t.useSRGBBuffer)&&void 0!==a&&a):(s.generateMipMaps=t,s.type=_0x333f62.TEXTURETYPE_UNSIGNED_INT,s.samplingMode=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE,s.format=_0x333f62.TEXTUREFORMAT_RGBA,s.samples=1,s.creationFlags=0,s.useSRGBBuffer=!1),s.type!==_0x333f62.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?s.type===_0x333f62.TEXTURETYPE_HALF_FLOAT&&!this._caps.textureHalfFloatLinearFiltering&&(s.samplingMode=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE):s.samplingMode=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,s.type===_0x333f62.TEXTURETYPE_FLOAT&&!this._caps.textureFloat&&(s.type=_0x333f62.TEXTURETYPE_UNSIGNED_INT,_0x50f23a.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));var l=new InternalTexture(this,n),u=e.width||e,c=e.height||e,h=e.layers||0;return l.baseWidth=u,l.baseHeight=c,l.width=u,l.height=c,l.depth=h,l.isReady=!0,l.samples=s.samples,l.generateMipMaps=!!s.generateMipMaps,l.samplingMode=s.samplingMode,l.type=s.type,l.format=s.format,l.is2DArray=h>0,l._cachedWrapU=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,l._cachedWrapV=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,l._useSRGBBuffer=s.useSRGBBuffer,this._internalTexturesCache.push(l),!i&&this._textureHelper.createGPUTextureForInternalTexture(l,u,c,h||1,s.creationFlags),l},_0x4cd9cc.prototype.createTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){var _=this;return void 0===r&&(r=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),this._createTextureBase(e,t,i,n,r,o,a,(function(e,t,i,n,r,o,a,s){var l,c=n;if(e.baseWidth=c.width,e.baseHeight=c.height,e.width=c.width,e.height=c.height,e.format=null!=u?u:-1,s(e.width,e.height,c,t,e,(function(){})),null===(l=e._hardwareTexture)||void 0===l?void 0:l.underlyingResource)!o&&!a&&_._generateMipmaps(e,_._uploadEncoder);else{var h=_._textureHelper.createGPUTextureForInternalTexture(e,c.width,c.height,void 0,f);WebGPUTextureHelper.IsImageBitmap(c)&&(_._textureHelper.updateTexture(c,e,c.width,c.height,e.depth,h.format,0,0,r,!1,0,0),!o&&!a&&_._generateMipmaps(e,_._uploadEncoder))}i&&i._removePendingData(e),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}),(function(){return!1}),s,l,u,c,h,d,p)},_0x4cd9cc.prototype.wrapWebGPUTexture=function(e){var t=new _0x157d2f(e),i=new InternalTexture(this,InternalTextureSource.Unknown,!0);return i._hardwareTexture=t,i.isReady=!0,i},_0x4cd9cc.prototype.wrapWebGLTexture=function(){throw new Error("wrapWebGLTexture is not supported, use wrapWebGPUTexture instead.")},_0x4cd9cc.prototype.generateMipMapsForCubemap=function(e){var t;e.generateMipMaps&&(!(null===(t=e._hardwareTexture)||void 0===t?void 0:t.underlyingResource)&&this._textureHelper.createGPUTextureForInternalTexture(e),this._generateMipmaps(e,e.source===InternalTextureSource.RenderTarget||e.source===InternalTextureSource.MultiRenderTarget?this._renderTargetEncoder:void 0))},_0x4cd9cc.prototype.updateTextureSamplingMode=function(e,t,i){void 0===i&&(i=!1),i&&(t.generateMipMaps=!0,this._generateMipmaps(t)),t.samplingMode=e},_0x4cd9cc.prototype.updateTextureWrappingMode=function(e,t,i,n){void 0===i&&(i=null),void 0===n&&(n=null),null!==t&&(e._cachedWrapU=t),null!==i&&(e._cachedWrapV=i),(e.is2DArray||e.is3D)&&null!==n&&(e._cachedWrapR=n)},_0x4cd9cc.prototype.updateTextureDimensions=function(e,t,i,n){if(void 0===n&&(n=1),e._hardwareTexture&&(e.width!==t||e.height!==i||e.depth!==n)){var r=e._hardwareTexture.textureAdditionalUsages;e._hardwareTexture.release(),this._textureHelper.createGPUTextureForInternalTexture(e,t,i,n,r)}},_0x4cd9cc.prototype._setInternalTexture=function(e,t,i){if(i=null!=i?i:e,this._currentEffect){var n=this._currentEffect._pipelineContext.shaderProcessingContext.availableTextures[i];if(this._currentMaterialContext.setTexture(e,t),n&&n.autoBindSampler){var r=i+_0x29840c.AutoSamplerSuffix;this._currentMaterialContext.setSampler(r,t)}}},_0x4cd9cc.prototype.setTexture=function(e,t,i,n){this._setTexture(e,i,!1,!1,n,n)},_0x4cd9cc.prototype.setTextureArray=function(e,t,i,n){for(var r=0;r<i.length;r++)this._setTexture(-1,i[r],!0,!1,n+r.toString(),n)},_0x4cd9cc.prototype._setTexture=function(e,t,i,n,r,o){if(void 0===n&&(n=!1),void 0===r&&(r=""),o=null!=o?o:r,this._currentEffect){if(!t)return this._currentMaterialContext.setTexture(r,null),!1;if(t.video)t.update();else if(t.delayLoadState===_0x333f62.DELAYLOADSTATE_NOTLOADED)return t.delayLoad(),!1;var a=null;if((a=n?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture)&&!a.isMultiview){if(a.isCube&&a._cachedCoordinatesMode!==t.coordinatesMode){a._cachedCoordinatesMode=t.coordinatesMode;var s=t.coordinatesMode!==_0x333f62.TEXTURE_CUBIC_MODE&&t.coordinatesMode!==_0x333f62.TEXTURE_SKYBOX_MODE?_0x333f62.TEXTURE_WRAP_ADDRESSMODE:_0x333f62.TEXTURE_CLAMP_ADDRESSMODE;t.wrapU=s,t.wrapV=s}a._cachedWrapU=t.wrapU,a._cachedWrapV=t.wrapV,a.is3D&&(a._cachedWrapR=t.wrapR),this._setAnisotropicLevel(0,a,t.anisotropicFilteringLevel)}this._setInternalTexture(r,a,o)}else this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - _setTexture called with a null _currentEffect! texture=",t));return!0},_0x4cd9cc.prototype._setAnisotropicLevel=function(e,t,i){t._cachedAnisotropicFilteringLevel!==i&&(t._cachedAnisotropicFilteringLevel=Math.min(i,this._caps.maxAnisotropy))},_0x4cd9cc.prototype._bindTexture=function(e,t,i){void 0!==e&&this._setInternalTexture(i,t)},_0x4cd9cc.prototype.generateMipmaps=function(e){this._generateMipmaps(e,this._renderTargetEncoder)},_0x4cd9cc.prototype._generateMipmaps=function(e,t){var i=e._hardwareTexture;if(i){t=null!=t?t:this._currentRenderTarget&&!this._currentRenderPass?this._renderTargetEncoder:this._currentRenderPass?this._uploadEncoder:this._renderEncoder;var n=e._hardwareTexture.format,r=WebGPUTextureHelper.ComputeNumMipmapLevels(e.width,e.height);this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - generate mipmaps called - width=",e.width,"height=",e.height,"isCube=",e.isCube)),e.isCube?this._textureHelper.generateCubeMipmaps(i,n,r,t):this._textureHelper.generateMipmaps(i,n,r,0,t)}},_0x4cd9cc.prototype.updateTextureData=function(e,t,i,n,r,o,a,s,l){var u;void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=!1);var c=e._hardwareTexture;!(null===(u=e._hardwareTexture)||void 0===u?void 0:u.underlyingResource)&&(c=this._textureHelper.createGPUTextureForInternalTexture(e));var h=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(h,e,r,o,e.depth,c.format,a,s,e.invertY,!1,i,n),l&&this._generateMipmaps(e,this._renderTargetEncoder)},_0x4cd9cc.prototype._uploadCompressedDataToTextureDirectly=function(e,t,i,n,r,o,a){var s;void 0===o&&(o=0),void 0===a&&(a=0);var l=e._hardwareTexture;!(null===(s=e._hardwareTexture)||void 0===s?void 0:s.underlyingResource)&&(e.format=t,l=this._textureHelper.createGPUTextureForInternalTexture(e,i,n));var u=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);this._textureHelper.updateTexture(u,e,i,n,e.depth,l.format,o,a,!1,!1,0,0)},_0x4cd9cc.prototype._uploadDataToTextureDirectly=function(e,t,i,n,r,o){var a;void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=!1);var s=Math.round(Math.log(e.width)*Math.LOG2E),l=Math.round(Math.log(e.height)*Math.LOG2E),u=o?e.width:Math.pow(2,Math.max(s-n,0)),c=o?e.height:Math.pow(2,Math.max(l-n,0)),h=e._hardwareTexture;!(null===(a=e._hardwareTexture)||void 0===a?void 0:a.underlyingResource)&&(h=this._textureHelper.createGPUTextureForInternalTexture(e,u,c));var d=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(d,e,u,c,e.depth,h.format,i,n,e.invertY,!1,0,0)},_0x4cd9cc.prototype._uploadArrayBufferViewToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this._uploadDataToTextureDirectly(e,t,i,n)},_0x4cd9cc.prototype._uploadImageToTexture=function(e,t,i,n){var r;void 0===i&&(i=0),void 0===n&&(n=0);var o=e._hardwareTexture;!(null===(r=e._hardwareTexture)||void 0===r?void 0:r.underlyingResource)&&(o=this._textureHelper.createGPUTextureForInternalTexture(e));var a=t,s=Math.ceil(e.width/(1<<n)),l=Math.ceil(e.height/(1<<n));this._textureHelper.updateTexture(a,e,s,l,e.depth,o.format,i,n,e.invertY,!1,0,0)},_0x4cd9cc.prototype.readPixels=function(e,t,i,n,r,o){void 0===o&&(o=!0);var a=(this._rttRenderPassWrapper.renderPass?this._rttRenderPassWrapper:this._mainRenderPassWrapper).colorAttachmentGPUTextures[0];if(!a)return Promise.resolve(new Uint8Array(0));var s=a.underlyingResource,l=a.format;return s?(o&&this.flushFramebuffer(),this._textureHelper.readPixels(s,e,t,i,n,l)):Promise.resolve(new Uint8Array(0))},_0x4cd9cc.prototype.beginFrame=function(){_0xf48096.prototype.beginFrame.call(this)},_0x4cd9cc.prototype.endFrame=function(){if(this._snapshotRendering.endFrame(this._mainRenderPassWrapper.renderPass),this._endMainRenderPass(),this._timestampQuery.endFrame(this._renderEncoder),this.flushFramebuffer(!1),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - counters")),this._textureHelper.destroyDeferredTextures(),this._bufferManager.destroyDeferredBuffers(),this._features._collectUbosUpdatedInFrame){if(this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),!this._count||this._count<this.dbgVerboseLogsNumFrames)){var e=[];for(var t in _0x5c4ccd._UpdatedUbosInFrame)e.push(t+":"+_0x5c4ccd._UpdatedUbosInFrame[t]);console.log("frame #"+this._count+" - updated ubos -",e.join(", "))}_0x5c4ccd._UpdatedUbosInFrame={}}this.countersLastFrame.numEnableEffects=this._counters.numEnableEffects,this.countersLastFrame.numEnableDrawWrapper=this._counters.numEnableDrawWrapper,this.countersLastFrame.numBundleCreationNonCompatMode=this._counters.numBundleCreationNonCompatMode,this.countersLastFrame.numBundleReuseNonCompatMode=this._counters.numBundleReuseNonCompatMode,this._counters.numEnableEffects=0,this._counters.numEnableDrawWrapper=0,this._counters.numBundleCreationNonCompatMode=0,this._counters.numBundleReuseNonCompatMode=0,this._cacheRenderPipeline.endFrame(),this._cacheBindGroups.endFrame(),this._pendingDebugCommands.length=0,_0xf48096.prototype.endFrame.call(this),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),this._count<this.dbgVerboseLogsNumFrames&&console.log("%c frame #"+this._count+" - end","background: #ffff00"),this._count<this.dbgVerboseLogsNumFrames&&(this._count++,this._count!==this.dbgVerboseLogsNumFrames&&console.log("%c frame #"+this._count+" - begin","background: #ffff00")))},_0x4cd9cc.prototype.flushFramebuffer=function(e){void 0===e&&(e=!0);var t=!this._currentRenderPass,i=0;this._currentRenderPass&&this._currentRenderTarget&&(i|=1,this._endRenderTargetRenderPass()),this._mainRenderPassWrapper.renderPass&&(i|=2,this._endMainRenderPass()),this._commandBuffers[0]=this._uploadEncoder.finish(),this._commandBuffers[1]=this._renderTargetEncoder.finish(),this._commandBuffers[2]=this._renderEncoder.finish(),this._device.queue.submit(this._commandBuffers),this._uploadEncoder=this._device.createCommandEncoder(this._uploadEncoderDescriptor),this._renderEncoder=this._device.createCommandEncoder(this._renderEncoderDescriptor),this._renderTargetEncoder=this._device.createCommandEncoder(this._renderTargetEncoderDescriptor),this._timestampQuery.startFrame(this._uploadEncoder),this._textureHelper.setCommandEncoder(this._uploadEncoder),this._bundleList.reset(),this._bundleListRenderTarget.reset(),e&&(2&i&&this._startMainRenderPass(!1),1&i&&this._startRenderTargetRenderPass(this._currentRenderTarget,!1,null,!1,!1),t&&this._currentRenderTarget&&(this._currentRenderPass=null))},_0x4cd9cc.prototype._currentFrameBufferIsDefaultFrameBuffer=function(){return null===this._currentRenderTarget},_0x4cd9cc.prototype._startRenderTargetRenderPass=function(e,t,i,n,r){var o,a,s,l=e,u=l._depthStencilTexture,c=null==u?void 0:u._hardwareTexture,h=null==c?void 0:c.underlyingResource,d=null==c?void 0:c.msaaTexture,f=null==h?void 0:h.createView(this._rttRenderPassWrapper.depthAttachmentViewDescriptor),p=null==d?void 0:d.createView(this._rttRenderPassWrapper.depthAttachmentViewDescriptor),_=!!c&&WebGPUTextureHelper.HasStencilAspect(c.format),m=[];this.useReverseDepthBuffer&&this.setDepthFunctionToGreaterOrEqual();var g=t&&i,x=t&&n,y=t&&r;if(l._attachments&&l.isMulti){(!this._mrtAttachments||0===this._mrtAttachments.length)&&(this._mrtAttachments=l._defaultAttachments);for(var v=0;v<this._mrtAttachments.length;++v){var $=this._mrtAttachments[v],b=l.textures[v],T=null==b?void 0:b._hardwareTexture,C=null==T?void 0:T.underlyingResource;if(T&&C){var S=p$19(this._rttRenderPassWrapper.colorAttachmentViewDescriptor,{format:T.format}),w=T.msaaTexture,E=C.createView(S),P=null==w?void 0:w.createView(S);m.push({view:P||E,resolveTarget:w?E:void 0,clearValue:0!==$&&g?i:void 0,loadOp:0!==$&&g?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load,storeOp:_0x5213c6.StoreOp.Store})}}this._cacheRenderPipeline.setMRT(l.textures,this._mrtAttachments.length),this._cacheRenderPipeline.setMRTAttachments(this._mrtAttachments)}else{if(M=l.texture){var A=M._hardwareTexture,L=A.underlyingResource;w=A.msaaTexture,E=L.createView(this._rttRenderPassWrapper.colorAttachmentViewDescriptor),P=null==w?void 0:w.createView(this._rttRenderPassWrapper.colorAttachmentViewDescriptor);m.push({view:P||E,resolveTarget:w?E:void 0,clearValue:g?i:void 0,loadOp:g?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load,storeOp:_0x5213c6.StoreOp.Store})}else m.push(null)}if(null===(o=this._debugPushGroup)||void 0===o||o.call(this,"render target pass",1),this._rttRenderPassWrapper.renderPassDescriptor={colorAttachments:m,depthStencilAttachment:u&&h?{view:p||f,depthClearValue:x?this.useReverseDepthBuffer?this._clearReverseDepthValue:this._clearDepthValue:void 0,depthLoadOp:x?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load,depthStoreOp:_0x5213c6.StoreOp.Store,stencilClearValue:l._depthStencilTextureWithStencil&&y?this._clearStencilValue:void 0,stencilLoadOp:_?l._depthStencilTextureWithStencil&&y?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load:void 0,stencilStoreOp:_?_0x5213c6.StoreOp.Store:void 0}:void 0,occlusionQuerySet:(null===(a=this._occlusionQuery)||void 0===a?void 0:a.hasQueries)?this._occlusionQuery.querySet:void 0},this._rttRenderPassWrapper.renderPass=this._renderTargetEncoder.beginRenderPass(this._rttRenderPassWrapper.renderPassDescriptor),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),!this._count||this._count<this.dbgVerboseLogsNumFrames)){var M=l.texture;console.log("frame #"+this._count+" - render target begin pass - internalTexture.uniqueId=",M.uniqueId,"width=",M.width,"height=",M.height,this._rttRenderPassWrapper.renderPassDescriptor)}this._currentRenderPass=this._rttRenderPassWrapper.renderPass,null===(s=this._debugFlushPendingCommands)||void 0===s||s.call(this),(!c||!WebGPUTextureHelper.HasStencilAspect(c.format))&&(this._stencilStateComposer.enabled=!1)},_0x4cd9cc.prototype._endRenderTargetRenderPass=function(){var e,t,i,n;if(this._currentRenderPass){var r=null===(e=this._currentRenderTarget.texture)||void 0===e?void 0:e._hardwareTexture;r&&!this._snapshotRendering.endRenderTargetPass(this._currentRenderPass,r)&&!this.compatibilityMode&&(this._bundleListRenderTarget.run(this._currentRenderPass),this._bundleListRenderTarget.reset()),this._currentRenderPass.end(),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - render target end pass - internalTexture.uniqueId=",null===(i=null===(t=this._currentRenderTarget)||void 0===t?void 0:t.texture)||void 0===i?void 0:i.uniqueId)),null===(n=this._debugPopGroup)||void 0===n||n.call(this,1),this._resetCurrentViewport(1),this._resetCurrentScissor(1),this._resetCurrentStencilRef(1),this._resetCurrentColorBlend(1),this._currentRenderPass=null,this._rttRenderPassWrapper.reset()}},_0x4cd9cc.prototype._getCurrentRenderPass=function(){return this._currentRenderTarget&&!this._currentRenderPass?this._startRenderTargetRenderPass(this._currentRenderTarget,!1,null,!1,!1):!this._currentRenderPass&&this._startMainRenderPass(!1),this._currentRenderPass},_0x4cd9cc.prototype._getCurrentRenderPassIndex=function(){return null===this._currentRenderPass?-1:this._currentRenderPass===this._mainRenderPassWrapper.renderPass?0:1},_0x4cd9cc.prototype._startMainRenderPass=function(e,t,i,n){var r,o,a;this._mainRenderPassWrapper.renderPass&&this._endMainRenderPass(),this.useReverseDepthBuffer&&this.setDepthFunctionToGreaterOrEqual();var s=e&&t,l=e&&i,u=e&&n;this._mainRenderPassWrapper.renderPassDescriptor.colorAttachments[0].clearValue=s?t:void 0,this._mainRenderPassWrapper.renderPassDescriptor.colorAttachments[0].loadOp=s?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load,this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.depthClearValue=l?this.useReverseDepthBuffer?this._clearReverseDepthValue:this._clearDepthValue:void 0,this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.depthLoadOp=l?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load,this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.stencilClearValue=u?this._clearStencilValue:void 0,this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.stencilLoadOp=this.isStencilEnable?u?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load:void 0,this._mainRenderPassWrapper.renderPassDescriptor.occlusionQuerySet=(null===(r=this._occlusionQuery)||void 0===r?void 0:r.hasQueries)?this._occlusionQuery.querySet:void 0,this._swapChainTexture=this._context.getCurrentTexture(),this._mainRenderPassWrapper.colorAttachmentGPUTextures[0].set(this._swapChainTexture),this._options.antialiasing?this._mainRenderPassWrapper.renderPassDescriptor.colorAttachments[0].resolveTarget=this._swapChainTexture.createView():this._mainRenderPassWrapper.renderPassDescriptor.colorAttachments[0].view=this._swapChainTexture.createView(),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - main begin pass - texture width="+this._mainTextureExtends.width," height="+this._mainTextureExtends.height,this._mainRenderPassWrapper.renderPassDescriptor)),null===(o=this._debugPushGroup)||void 0===o||o.call(this,"main pass",0),this._currentRenderPass=this._renderEncoder.beginRenderPass(this._mainRenderPassWrapper.renderPassDescriptor),this._mainRenderPassWrapper.renderPass=this._currentRenderPass,null===(a=this._debugFlushPendingCommands)||void 0===a||a.call(this),this._resetCurrentViewport(0),this._resetCurrentScissor(0),this._resetCurrentStencilRef(0),this._resetCurrentColorBlend(0),!this._isStencilEnable&&(this._stencilStateComposer.enabled=!1)},_0x4cd9cc.prototype._endMainRenderPass=function(){var e;null!==this._mainRenderPassWrapper.renderPass&&(this._snapshotRendering.endMainRenderPass(),!this.compatibilityMode&&!this._snapshotRendering.play&&(this._bundleList.run(this._mainRenderPassWrapper.renderPass),this._bundleList.reset()),this._mainRenderPassWrapper.renderPass.end(),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - main end pass")),null===(e=this._debugPopGroup)||void 0===e||e.call(this,0),this._resetCurrentViewport(0),this._resetCurrentScissor(0),this._resetCurrentStencilRef(0),this._resetCurrentColorBlend(0),this._mainRenderPassWrapper.renderPass===this._currentRenderPass&&(this._currentRenderPass=null),this._mainRenderPassWrapper.reset(!1))},_0x4cd9cc.prototype.bindFramebuffer=function(e,t,i,n,r,o,a){var s,l;void 0===t&&(t=0),void 0===o&&(o=0),void 0===a&&(a=0);var u=null===(s=e.texture)||void 0===s?void 0:s._hardwareTexture;this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,u&&(u._currentLayer=e.isCube?6*a+t:a),this._rttRenderPassWrapper.colorAttachmentGPUTextures[0]=u,this._rttRenderPassWrapper.depthTextureFormat=this._currentRenderTarget._depthStencilTexture?WebGPUTextureHelper.GetWebGPUTextureFormat(-1,this._currentRenderTarget._depthStencilTexture.format):void 0,this._setDepthTextureFormat(this._rttRenderPassWrapper),this._setColorFormat(this._rttRenderPassWrapper),this._rttRenderPassWrapper.colorAttachmentViewDescriptor={format:this._colorFormat,dimension:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:e.isCube?6*a+t:a,baseMipLevel:o,arrayLayerCount:1,aspect:_0x5213c6.TextureAspect.All},this._rttRenderPassWrapper.depthAttachmentViewDescriptor={format:this._depthTextureFormat,dimension:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:e.isCube?6*a+t:a,baseMipLevel:0,arrayLayerCount:1,aspect:_0x5213c6.TextureAspect.All},this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - bindFramebuffer called - internalTexture.uniqueId=",null===(l=e.texture)||void 0===l?void 0:l.uniqueId,"face=",t,"lodLevel=",o,"layer=",a,this._rttRenderPassWrapper.colorAttachmentViewDescriptor,this._rttRenderPassWrapper.depthAttachmentViewDescriptor)),this._currentRenderPass=null,this.snapshotRendering&&this.snapshotRenderingMode===_0x333f62.SNAPSHOTRENDERING_FAST&&this._getCurrentRenderPass(),this._cachedViewport&&!r?this.setViewport(this._cachedViewport,i,n):(!i&&(i=e.width,o&&(i/=Math.pow(2,o))),!n&&(n=e.height,o&&(n/=Math.pow(2,o))),this._viewport(0,0,i,n)),this.wipeCaches()},_0x4cd9cc.prototype.unBindFramebuffer=function(e,t,i){var n,r;void 0===t&&(t=!1);var o=this._currentRenderTarget;this._currentRenderTarget=null,i&&i(),this._currentRenderTarget=o,this._currentRenderPass&&this._currentRenderPass!==this._mainRenderPassWrapper.renderPass&&this._endRenderTargetRenderPass(),(null===(n=e.texture)||void 0===n?void 0:n.generateMipMaps)&&!t&&!e.isCube&&this._generateMipmaps(e.texture),this._currentRenderTarget=null,this._onAfterUnbindFrameBufferObservable.notifyObservers(this),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - unBindFramebuffer called - internalTexture.uniqueId=",null===(r=e.texture)||void 0===r?void 0:r.uniqueId)),this._mrtAttachments=[],this._cacheRenderPipeline.setMRT([]),this._cacheRenderPipeline.setMRTAttachments(this._mrtAttachments),this._currentRenderPass=this._mainRenderPassWrapper.renderPass,this._setDepthTextureFormat(this._mainRenderPassWrapper),this._setColorFormat(this._mainRenderPassWrapper)},_0x4cd9cc.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):(this._currentRenderPass=this._mainRenderPassWrapper.renderPass,this._setDepthTextureFormat(this._mainRenderPassWrapper),this._setColorFormat(this._mainRenderPassWrapper)),this._currentRenderPass&&this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},_0x4cd9cc.prototype._setColorFormat=function(e){var t,i,n=null!==(i=null===(t=e.colorAttachmentGPUTextures[0])||void 0===t?void 0:t.format)&&void 0!==i?i:null;this._cacheRenderPipeline.setColorFormat(n),this._colorFormat!==n&&(this._colorFormat=n)},_0x4cd9cc.prototype._setDepthTextureFormat=function(e){this._cacheRenderPipeline.setDepthStencilFormat(e.depthTextureFormat),this._depthTextureFormat!==e.depthTextureFormat&&(this._depthTextureFormat=e.depthTextureFormat)},_0x4cd9cc.prototype.setDitheringState=function(){},_0x4cd9cc.prototype.setRasterizerState=function(){},_0x4cd9cc.prototype.setState=function(e,t,i,n,r,o,a){var s,l;void 0===t&&(t=0),void 0===n&&(n=!1),void 0===a&&(a=0),(this._depthCullingState.cull!==e||i)&&(this._depthCullingState.cull=e);var u=null===(l=null!==(s=this.cullBackFaces)&&void 0!==s?s:r)||void 0===l||l?1:2;(this._depthCullingState.cullFace!==u||i)&&(this._depthCullingState.cullFace=u),this.setZOffset(t),this.setZOffsetUnits(a);var c=n?this._currentRenderTarget?1:2:this._currentRenderTarget?2:1;(this._depthCullingState.frontFace!==c||i)&&(this._depthCullingState.frontFace=c),this._stencilStateComposer.stencilMaterial=o},_0x4cd9cc.prototype._applyRenderPassChanges=function(e,t){var i,n=this._mustUpdateViewport(e),r=this._mustUpdateScissor(e),o=!!this._stencilStateComposer.enabled&&this._mustUpdateStencilRef(e),a=!!this._alphaState.alphaBlend&&this._mustUpdateBlendColor(e);t?(n&&t.addItem(new WebGPURenderItemViewport(this._viewportCached.x,this._viewportCached.y,this._viewportCached.z,this._viewportCached.w)),r&&t.addItem(new WebGPURenderItemScissor(this._scissorCached.x,this._scissorCached.y,this._scissorCached.z,this._scissorCached.w)),o&&t.addItem(new WebGPURenderItemStencilRef(null!==(i=this._stencilStateComposer.funcRef)&&void 0!==i?i:0)),a&&t.addItem(new WebGPURenderItemBlendColor(this._alphaState._blendConstants.slice()))):(n&&this._applyViewport(e),r&&this._applyScissor(e),o&&this._applyStencilRef(e),a&&this._applyBlendColor(e))},_0x4cd9cc.prototype._draw=function(e,t,i,n,r,o){var a,s=this._getCurrentRenderPass(),l=0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget;this.applyStates();var u=this._currentEffect._pipelineContext;if(this.bindUniformBufferBase(this._currentRenderTarget?this._ubInvertY:this._ubDontInvertY,0,_0x29840c.InternalsUBOName),u.uniformBuffer&&(u.uniformBuffer.update(),this.bindUniformBufferBase(u.uniformBuffer.getBuffer(),0,_0x29840c.LeftOvertUBOName)),this._snapshotRendering.play)this._reportDrawCall();else{var c;c=o?o.getActiveBundle():this._currentDrawContext.fastBundle,!this.compatibilityMode&&(this._currentDrawContext.isDirty(this._currentMaterialContext.updateId)||this._currentMaterialContext.isDirty||this._currentMaterialContext.forceBindGroupCreation)&&(this._currentDrawContext.fastBundle=void 0);var h=s;if(!this.compatibilityMode&&c||this._snapshotRendering.record){if(this._applyRenderPassChanges(s,l),!this._snapshotRendering.record)return this._counters.numBundleReuseNonCompatMode++,this._currentDrawContext.indirectDrawBuffer&&this._currentDrawContext.setIndirectData(n,r||1,i),l.addBundle(c),void this._reportDrawCall();h=l.getBundleEncoder(this._cacheRenderPipeline.colorFormats,this._depthTextureFormat,this.currentSampleCount),l.numDrawCalls++}var d=0;if(!this._caps.textureFloatLinearFiltering&&this._currentMaterialContext.hasFloatTextures)for(var f=1,p=0;p<u.shaderProcessingContext.textureNames.length;++p){var _=u.shaderProcessingContext.textureNames[p],m=null===(a=this._currentMaterialContext.textures[_])||void 0===a?void 0:a.texture;(null==m?void 0:m.type)===_0x333f62.TEXTURETYPE_FLOAT&&(d|=f),f<<=1}var g,x=this._cacheRenderPipeline.getRenderPipeline(t,this._currentEffect,this.currentSampleCount,d);g=o.bindGroups?o.bindGroups:this._cacheBindGroups.getBindGroups(u,this._currentDrawContext,this._currentMaterialContext,o),!this._snapshotRendering.record&&(this._applyRenderPassChanges(s,this.compatibilityMode?null:l),!this.compatibilityMode&&(this._counters.numBundleCreationNonCompatMode++,h=this._device.createRenderBundleEncoder({colorFormats:this._cacheRenderPipeline.colorFormats,depthStencilFormat:this._depthTextureFormat,sampleCount:this.currentSampleCount}))),h.setPipeline(x),this._currentIndexBuffer&&h.setIndexBuffer(this._currentIndexBuffer.underlyingResource,this._currentIndexBuffer.is32Bits?_0x5213c6.IndexFormat.Uint32:_0x5213c6.IndexFormat.Uint16,0);for(var y=this._cacheRenderPipeline.vertexBuffers,v=0;v<y.length;v++){var $=y[v],b=$.getBuffer();b&&h.setVertexBuffer(v,b.underlyingResource,$._validOffsetRange?0:$.byteOffset)}for(p=0;p<g.length;p++)h.setBindGroup(p,g[p]);var T=!this.compatibilityMode&&!this._snapshotRendering.record;T&&this._currentDrawContext.indirectDrawBuffer?(this._currentDrawContext.setIndirectData(n,r||1,i),0===e?h.drawIndexedIndirect(this._currentDrawContext.indirectDrawBuffer,0):h.drawIndirect(this._currentDrawContext.indirectDrawBuffer,0)):0===e?h.drawIndexed(n,r||1,i,0,0):h.draw(n,r||1,i,0),T&&(this._currentDrawContext.fastBundle=h.finish(),l.addBundle(this._currentDrawContext.fastBundle),o.setFastBundle(this._currentDrawContext.fastBundle)),this._reportDrawCall()}},_0x4cd9cc.prototype.drawElementsType=function(e,t,i,n,r){void 0===n&&(n=1),this._draw(0,e,t,i,n,r)},_0x4cd9cc.prototype.drawArraysType=function(e,t,i,n,r){void 0===n&&(n=1),this._currentIndexBuffer=null,this._draw(1,e,t,i,n,r)},_0x4cd9cc.prototype.dispose=function(){var e,t,i;null===(e=this._mainTexture)||void 0===e||e.destroy(),null===(t=this._mainTextureLastCopy)||void 0===t||t.destroy(),null===(i=this._depthTexture)||void 0===i||i.destroy(),_0xf48096.prototype.dispose.call(this)},_0x4cd9cc.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._canvas.width},_0x4cd9cc.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._canvas.height},_0x4cd9cc.prototype.getRenderingCanvas=function(){return this._canvas},_0x4cd9cc.prototype.getError=function(){return 0},_0x4cd9cc.prototype.bindSamplers=function(){},_0x4cd9cc.prototype._bindTextureDirectly=function(){return!1},_0x4cd9cc.prototype.areAllEffectsReady=function(){return!0},_0x4cd9cc.prototype._executeWhenRenderingStateIsCompiled=function(e,t){t()},_0x4cd9cc.prototype._isRenderingStateCompiled=function(){return!0},_0x4cd9cc.prototype._getUnpackAlignement=function(){return 1},_0x4cd9cc.prototype._unpackFlipY=function(){},_0x4cd9cc.prototype._bindUnboundFramebuffer=function(){throw"_bindUnboundFramebuffer is not implementedin WebGPU! You probably want to use restoreDefaultFramebuffer or unBindFramebuffer instead"},_0x4cd9cc.prototype._getSamplingParameters=function(){throw"_getSamplingParameters is not available in WebGPU"},_0x4cd9cc.prototype.getUniforms=function(){return[]},_0x4cd9cc.prototype.setIntArray=function(){return!1},_0x4cd9cc.prototype.setIntArray2=function(){return!1},_0x4cd9cc.prototype.setIntArray3=function(){return!1},_0x4cd9cc.prototype.setIntArray4=function(){return!1},_0x4cd9cc.prototype.setArray=function(){return!1},_0x4cd9cc.prototype.setArray2=function(){return!1},_0x4cd9cc.prototype.setArray3=function(){return!1},_0x4cd9cc.prototype.setArray4=function(){return!1},_0x4cd9cc.prototype.setMatrices=function(){return!1},_0x4cd9cc.prototype.setMatrix3x3=function(){return!1},_0x4cd9cc.prototype.setMatrix2x2=function(){return!1},_0x4cd9cc.prototype.setFloat=function(){return!1},_0x4cd9cc.prototype.setFloat2=function(){return!1},_0x4cd9cc.prototype.setFloat3=function(){return!1},_0x4cd9cc.prototype.setFloat4=function(){return!1},_0x4cd9cc._GLSLslangDefaultOptions={jsPath:"ThirdParty/glslang.js",wasmPath:"ThirdParty/glslang.wasm"},_0x4cd9cc.UseTWGSL=!0,_0x4cd9cc.COMPILED_WGSL_STORE_NAME="wgslStore",_0x4cd9cc.COMPILED_WGSL_TABLE_NAME="wgsl",function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.Texture=0]="Texture",e[e.StorageTexture=1]="StorageTexture",e[e.UniformBuffer=2]="UniformBuffer",e[e.StorageBuffer=3]="StorageBuffer",e[e.TextureWithoutSampler=4]="TextureWithoutSampler",e[e.Sampler=5]="Sampler"}(_0x2c9aaf||(_0x2c9aaf={}));const ComputeBindingType$1=_0x2c9aaf;_0x265690.prototype.createComputeEffect=function(e,t){throw new Error("createComputeEffect: This engine does not support compute shaders!")},_0x265690.prototype.createComputePipelineContext=function(){throw new Error("createComputePipelineContext: This engine does not support compute shaders!")},_0x265690.prototype.createComputeContext=function(){},_0x265690.prototype.computeDispatch=function(e,t,i,n,r,o,a){throw new Error("computeDispatch: This engine does not support compute shaders!")},_0x265690.prototype.areAllComputeEffectsReady=function(){return!0},_0x265690.prototype.releaseComputeEffects=function(){},_0x265690.prototype._prepareComputePipelineContext=function(e,t,i,n,r){},_0x265690.prototype._rebuildComputeEffects=function(){},_0x265690.prototype._executeWhenComputeStateIsCompiled=function(e,t){t()},_0x265690.prototype._releaseComputeEffect=function(e){},_0x265690.prototype._deleteComputePipelineContext=function(e){};var _0x2a6391=(_0x56d489=!0,function(e,t){var i=_0x56d489?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56d489=!1,i}),_0x37ade0=_0x2a6391(void 0,(function(){return _0x37ade0.toString().search("(((.+)+)+)+$").toString().constructor(_0x37ade0).search("(((.+)+)+)+$")})),_0x56d489;function _0x5cd8c0(e,t){this._device=e,this._cacheSampler=t,this.uniqueId=_0x5cd8c0._Counter++,this._bindGroupEntries=[],this.clear()}_0x37ade0(),_0x5cd8c0.prototype.getBindGroups=function(e,t,i){if(!i)throw new Error("WebGPUComputeContext.getBindGroups: bindingsMapping is required until browsers support reflection for wgsl shaders!");if(0===this._bindGroups.length){var n=this._bindGroupEntries.length>0;for(var r in e){var o=e[r],a=i[r],s=a.group,l=a.binding,u=o.type,c=o.object,h=o.indexInGroupEntries;switch(!(x=this._bindGroupEntries[s])&&(x=this._bindGroupEntries[s]=[]),u){case ComputeBindingType$1.Sampler:var d=c;void 0!==h&&n?x[h].resource=this._cacheSampler.getSampler(d):(o.indexInGroupEntries=x.length,x.push({binding:l,resource:this._cacheSampler.getSampler(d)}));break;case ComputeBindingType$1.Texture:case ComputeBindingType$1.TextureWithoutSampler:var f=(p=c)._texture._hardwareTexture;void 0!==h&&n?(u===ComputeBindingType$1.Texture&&(x[h++].resource=this._cacheSampler.getSampler(p._texture)),x[h].resource=f.view):(o.indexInGroupEntries=x.length,u===ComputeBindingType$1.Texture&&x.push({binding:l-1,resource:this._cacheSampler.getSampler(p._texture)}),x.push({binding:l,resource:f.view}));break;case ComputeBindingType$1.StorageTexture:var p;0==((f=(p=c)._texture._hardwareTexture).textureAdditionalUsages&_0x5213c6.TextureUsage.StorageBinding)&&_0x50f23a.Error("computeDispatch: The texture (name=".concat(p.name,", uniqueId=").concat(p.uniqueId,") is not a storage texture!"),50),void 0!==h&&n?x[h].resource=f.viewForWriting:(o.indexInGroupEntries=x.length,x.push({binding:l,resource:f.viewForWriting}));break;case ComputeBindingType$1.UniformBuffer:case ComputeBindingType$1.StorageBuffer:var _=(ComputeBindingType$1.UniformBuffer,c).getBuffer(),m=_.underlyingResource;void 0!==h&&n?(x[h].resource.buffer=m,x[h].resource.size=_.capacity):(o.indexInGroupEntries=x.length,x.push({binding:l,resource:{buffer:m,offset:0,size:_.capacity}}))}}for(var g=0;g<this._bindGroupEntries.length;++g){var x;(x=this._bindGroupEntries[g])?this._bindGroups[g]=this._device.createBindGroup({layout:t.getBindGroupLayout(g),entries:x}):this._bindGroups[g]=void 0}this._bindGroups.length=this._bindGroupEntries.length}return this._bindGroups},_0x5cd8c0.prototype.clear=function(){this._bindGroups=[]},_0x5cd8c0._Counter=0;var _0x54f67f=(_0x57a6b2=!0,function(e,t){var i=_0x57a6b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57a6b2=!1,i}),_0x346ff8=_0x54f67f(void 0,(function(){return _0x346ff8.toString().search("(((.+)+)+)+$").toString().constructor(_0x346ff8).search("(((.+)+)+)+$")})),_0x57a6b2;function _0x37d0b3(e){this._name="unnamed",this.engine=e,this.computePipeline=null}_0x346ff8(),Object.defineProperty(_0x37d0b3.prototype,"isAsync",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x37d0b3.prototype,"isReady",{get:function(){return!!this.stage},enumerable:!1,configurable:!0}),_0x37d0b3.prototype._getComputeShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.compute},_0x37d0b3.prototype.dispose=function(){};var _0x3e865f=(_0xb5471c=!0,function(e,t){var i=_0xb5471c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb5471c=!1,i}),_0x280e88=_0x3e865f(void 0,(function(){return _0x280e88.toString().search("(((.+)+)+)+$").toString().constructor(_0x280e88).search("(((.+)+)+)+$")})),_0xb5471c;_0x280e88();const ComputeBindingType={Texture:0,StorageTexture:1,UniformBuffer:2,StorageBuffer:3,TextureWithoutSampler:4,Sampler:5};_0x4cd9cc.prototype.createComputeContext=function(){return new _0x5cd8c0(this._device,this._cacheSampler)},_0x4cd9cc.prototype.createComputeEffect=function(e,t){var i=(e.computeElement||e.compute||e.computeToken||e.computeSource||e)+"@"+t.defines;if(this._compiledComputeEffects[i]){var n=this._compiledComputeEffects[i];return t.onCompiled&&n.isReady()&&t.onCompiled(n),n}var r=new _0xb0765d(e,t,this,i);return this._compiledComputeEffects[i]=r,r},_0x4cd9cc.prototype.createComputePipelineContext=function(){return new _0x37d0b3(this)},_0x4cd9cc.prototype.areAllComputeEffectsReady=function(){for(var e in this._compiledComputeEffects){if(!this._compiledComputeEffects[e].isReady())return!1}return!0},_0x4cd9cc.prototype.computeDispatch=function(e,t,i,n,r,o,a){var s=this;if(this._currentRenderTarget)this._onAfterUnbindFrameBufferObservable.addOnce((function(){s.computeDispatch(e,t,i,n,r,o,a)}));else{var l=e._pipelineContext,u=t;!l.computePipeline&&(l.computePipeline=this._device.createComputePipeline({layout:_0x5213c6.AutoLayoutMode.Auto,compute:l.stage}));var c=this._renderTargetEncoder.beginComputePass();c.setPipeline(l.computePipeline);for(var h=u.getBindGroups(i,l.computePipeline,a),d=0;d<h.length;++d){var f=h[d];f&&c.setBindGroup(d,f)}c.dispatchWorkgroups(n,r,o),c.end()}},_0x4cd9cc.prototype.releaseComputeEffects=function(){for(var e in this._compiledComputeEffects){var t=this._compiledComputeEffects[e].getPipelineContext();this._deleteComputePipelineContext(t)}this._compiledComputeEffects={}},_0x4cd9cc.prototype._prepareComputePipelineContext=function(e,t,i,n,r){var o=e;this.dbgShowShaderCode&&(console.log(n),console.log(t)),o.sources={compute:t,rawCompute:i},o.stage=this._createComputePipelineStageDescriptor(t,n,r)},_0x4cd9cc.prototype._releaseComputeEffect=function(e){this._compiledComputeEffects[e._key]&&(delete this._compiledComputeEffects[e._key],this._deleteComputePipelineContext(e.getPipelineContext()))},_0x4cd9cc.prototype._rebuildComputeEffects=function(){for(var e in this._compiledComputeEffects){var t=this._compiledComputeEffects[e];t._pipelineContext=null,t._wasPreviouslyReady=!1,t._prepareEffect()}},_0x4cd9cc.prototype._deleteComputePipelineContext=function(e){e&&e.dispose()},_0x4cd9cc.prototype._createComputePipelineStageDescriptor=function(e,t,i){return t=t?"//"+t.split("\n").join("\n//")+"\n":"",{module:this._device.createShaderModule({code:t+e}),entryPoint:i}};var _0x146d50=(_0x42b00b=!0,function(e,t){var i=_0x42b00b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42b00b=!1,i}),_0xbfb67c=_0x146d50(void 0,(function(){return _0xbfb67c.toString().search("(((.+)+)+)+$").toString().constructor(_0xbfb67c).search("(((.+)+)+)+$")})),_0x42b00b;function _0x45d8f5(e,t,i,n){void 0===n&&(n={}),this._bindings={},this._samplers={},this._contextIsDirty=!1,this.onCompiled=null,this.onError=null,this.name=e,this._engine=t,this.uniqueId=_0x528403.UniqueId,this._engine.getCaps().supportComputeShaders?n.bindingsMapping?(this._context=t.createComputeContext(),this._shaderPath=i,this._options=n||{bindingsMapping:{},defines:[]}):console.log("You must provide the binding mappings as browsers don't support reflection for wgsl shaders yet!"):console.log("This engine does not support compute shaders!")}_0xbfb67c(),Object.defineProperty(_0x45d8f5.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(_0x45d8f5.prototype,"shaderPath",{get:function(){return this._shaderPath},enumerable:!1,configurable:!0}),_0x45d8f5.prototype.getClassName=function(){return"ComputeShader"},_0x45d8f5.prototype.setTexture=function(e,t,i){void 0===i&&(i=!0);var n=this._bindings[e];this._bindings[e]={type:i?ComputeBindingType.Texture:ComputeBindingType.TextureWithoutSampler,object:t,indexInGroupEntries:null==n?void 0:n.indexInGroupEntries},this._contextIsDirty||(this._contextIsDirty=!n||n.object!==t||n.type!==this._bindings[e].type)},_0x45d8f5.prototype.setStorageTexture=function(e,t){var i=this._bindings[e];this._contextIsDirty||(this._contextIsDirty=!i||i.object!==t),this._bindings[e]={type:ComputeBindingType.StorageTexture,object:t,indexInGroupEntries:null==i?void 0:i.indexInGroupEntries}},_0x45d8f5.prototype.setUniformBuffer=function(e,t){var i=this._bindings[e];this._contextIsDirty||(this._contextIsDirty=!i||i.object!==t),this._bindings[e]={type:ComputeBindingType.UniformBuffer,object:t,indexInGroupEntries:null==i?void 0:i.indexInGroupEntries}},_0x45d8f5.prototype.setStorageBuffer=function(e,t){var i=this._bindings[e];this._contextIsDirty||(this._contextIsDirty=!i||i.object!==t),this._bindings[e]={type:ComputeBindingType.StorageBuffer,object:t,indexInGroupEntries:null==i?void 0:i.indexInGroupEntries}},_0x45d8f5.prototype.setTextureSampler=function(e,t){var i=this._bindings[e];this._contextIsDirty||(this._contextIsDirty=!i||!t.compareSampler(i.object)),this._bindings[e]={type:ComputeBindingType.Sampler,object:t,indexInGroupEntries:null==i?void 0:i.indexInGroupEntries}},_0x45d8f5.prototype.isReady=function(){var e=this._effect;for(var t in this._bindings){var i=this._bindings[t],n=i.type,r=i.object;switch(n){case ComputeBindingType.Texture:case ComputeBindingType.TextureWithoutSampler:case ComputeBindingType.StorageTexture:if(!r.isReady)return!1}}var o=[],a=this._shaderPath;if(this._options.defines)for(var s=0;s<this._options.defines.length;s++)o.push(this._options.defines[s]);var l=o.join("\n");return this._cachedDefines!==l&&(this._cachedDefines=l,e=this._engine.createComputeEffect(a,{defines:l,entryPoint:this._options.entryPoint,onCompiled:this.onCompiled,onError:this.onError}),this._effect=e),!!e.isReady()},_0x45d8f5.prototype.dispatch=function(e,t,i){var n;if(!this.isReady())return!1;for(var r in this._bindings){var o=this._bindings[r];if(!this._options.bindingsMapping[r])throw new Error("ComputeShader ('"+this.name+"'): No binding mapping has been provided for the property '"+r+"'");if(o.type===ComputeBindingType.Texture){var a=this._samplers[r],s=o.object;(!a||!s._texture||!a.compareSampler(s._texture))&&(this._samplers[r]=(new _0x13d391).setParameters(s.wrapU,s.wrapV,s.wrapR,s.anisotropicFilteringLevel,s._texture.samplingMode,null===(n=s._texture)||void 0===n?void 0:n._comparisonFunction),this._contextIsDirty=!0)}}return this._contextIsDirty&&(this._contextIsDirty=!1,this._context.clear()),this._engine.computeDispatch(this._effect,this._context,this._bindings,e,t,i,this._options.bindingsMapping),!0},_0x45d8f5.prototype.dispatchWhenReady=function(e,t,i,n){var r=this;return void 0===n&&(n=10),new Promise((function(o){var a=function(){r.dispatch(e,t,i)?o():setTimeout(a,n)};a()}))};var _0x5ca06a="\nstruct Rgba {\n R : f32,\n G : f32,\n B : f32,\n A : f32,\n};\n\n\nstruct ColorBuffer {\n colors : array<Rgba>,\n};\n\nstruct Params {\n texelSize : vec2<f32>, \n};\n\nfn nearAverage(a : Rgba, b : Rgba, c : Rgba, d : Rgba) -> Rgba\n{\n let sumR = dot(vec4<f32>(a.R, b.R, c.R, d.R), vec4<f32>(1.0));\n let sumG = dot(vec4<f32>(a.G, b.G, c.G, d.G), vec4<f32>(1.0));\n let sumB = dot(vec4<f32>(a.B, b.B, c.B, d.B), vec4<f32>(1.0));\n let sumA = dot(vec4<f32>(a.A, b.A, c.A, d.A), vec4<f32>(1.0));\n\n return Rgba(sumR/4.0, sumG/4.0, sumB/4.0, sumA/4.0);\n}\n\nfn maxDepthValue(a : Rgba, b : Rgba, c : Rgba, d : Rgba) -> Rgba\n{\n var resColor : vec4<f32> = max(max(vec4<f32>(a.R, a.G, a.B, a.A), vec4<f32>(b.R, b.G, b.B, b.A)), max(vec4<f32>(c.R, c.G, c.B, c.A), vec4<f32>(d.R, d.G, d.B, d.A)));\n return Rgba(resColor.x, resColor.y, resColor.z, resColor.w);\n}\n\n@group(0) @binding(0) var<uniform> params : Params;\n@group(0) @binding(1) var<storage, read> buffer_in : ColorBuffer;\n@group(0) @binding(2) var<storage, read_write> buffer_out : ColorBuffer;\n@group(0) @binding(3) var mipMapsTexture : texture_storage_2d<rgba8unorm, write>;\n\n// pass1 颜色求均值写入mip\n@compute @workgroup_size(8, 8, 1)\nfn main(@builtin(global_invocation_id) global_id : vec3<u32>) \n{\n if(all(global_id.xy < vec2<u32>(textureDimensions(mipMapsTexture)))){\n let width = u32(params.texelSize.x);\n let dst_offSet = global_id.x + global_id.y * width;\n let src_offSet = global_id.x*2u + global_id.y*2u * width*2u;\n\n let texel1 : Rgba = buffer_in.colors[src_offSet + 0u];\n let texel2 : Rgba = buffer_in.colors[src_offSet + 1u];\n let texel3 : Rgba = buffer_in.colors[src_offSet + 0u + width*2u];\n let texel4 : Rgba = buffer_in.colors[src_offSet + 1u + width*2u];\n\n var resColor : Rgba = Rgba(1,1,1,1);\n #if _isHizDepthTex\n resColor = maxDepthValue(texel1, texel2, texel3, texel4);\n #else\n resColor = nearAverage(texel1, texel2, texel3, texel4);\n #endif\n buffer_out.colors[dst_offSet] = resColor;\n\n textureStore(mipMapsTexture, vec2<i32>(global_id.xy), vec4<f32>(resColor.R, resColor.G, resColor.B, resColor.A));\n }\n}\n",_0x4ba444="\nstruct Rgba {\n R : f32,\n G : f32,\n B : f32,\n A : f32,\n};\n\nstruct ColorBuffer {\n colors : array<Rgba>,\n};\n\nstruct Params {\n srcDimension : u32,\n texelSize : vec2<f32>, \n};\n\n\nfn linear2Gamma(linearRGB : vec3<f32>) -> vec3<f32>\n{\n if(linearRGB.x < 0.0031308 && linearRGB.y < 0.0031308\n && linearRGB.z < 0.0031308){\n return 12.92 * linearRGB;\n }else{\n return 1.13005 * sqrt(abs(linearRGB - vec3<f32>(0.00228,0.00228,0.00228))) - 0.13448 * linearRGB \n + vec3<f32>(0.005719,0.005719,0.005719); \n }\n}\n\nfn packColor(srcColor : vec4<f32>) -> vec4<f32>\n{\n#ifdef CONVERT_TO_SRGB\n return float4(linear2Gamma(srcColor.xyz), srcColor.w);\n#else\n return srcColor;\n#endif\n}\n\n@group(0) @binding(0) var<uniform> params : Params;\n@group(0) @binding(1) var<storage, read_write> buffer_out : ColorBuffer;\n@group(0) @binding(2) var oriDepthTexture : texture_depth_2d;\n@group(0) @binding(2) var oriTexture : texture_2d<f32>;\n@group(0) @binding(3) var mip0Texture : texture_storage_2d<rgba8unorm, write>;\n\n// pass0 原始Mip纹理采样\n@compute @workgroup_size(8, 8, 1)\nfn main(@builtin(global_invocation_id) global_id : vec3<u32>) \n{\n var texelSize = params.texelSize;\n\n // 若要对非2n纹理采样使用此分情况额外处理\n var srcDimension : u32 = params.srcDimension;\n var pix : vec4<f32> = vec4<f32>(0, 0, 0, 1);\n\n #if _useDepthTexture\n let depth : f32 = textureLoad(oriDepthTexture, vec2<i32>(global_id.xy), 0);\n pix = vec4<f32>(depth, 0., 0., 1.);\n #else\n pix= packColor(textureLoad(oriTexture, vec2<i32>(global_id.xy), 0));\n #endif\n \n let offSet = global_id.x + global_id.y * u32(texelSize.x);\n let rgba : Rgba = Rgba(pix.x, pix.y, pix.z, pix.w);\n buffer_out.colors[offSet] = rgba;\n textureStore(mip0Texture, vec2<i32>(global_id.xy), pix);\n}\n",_0x4fa5cf="\n const vec2 pos[4] = vec2[4](vec2(-1.0f, 1.0f), vec2(1.0f, 1.0f), vec2(-1.0f, -1.0f), vec2(1.0f, -1.0f));\n const vec2 tex[4] = vec2[4](vec2(0.0f, 0.0f), vec2(1.0f, 0.0f), vec2(0.0f, 1.0f), vec2(1.0f, 1.0f));\n\n layout(location = 0) out vec2 vTex;\n\n void main() {\n vTex = tex[gl_VertexIndex];\n gl_Position = vec4(pos[gl_VertexIndex], 0.0, 1.0);\n }\n ",_0x217baa="\n layout(set = 0, binding = 0) uniform sampler imgSampler;\n layout(set = 0, binding = 1) uniform texture2D img;\n\n layout(location = 0) in vec2 vTex;\n layout(location = 0) out vec4 outColor;\n\n void main() {\n outColor = texture(sampler2D(img, imgSampler), vTex);\n }\n ",_0xe8e3cd="\n #extension GL_EXT_samplerless_texture_functions : enable\n\n const vec2 pos[4] = vec2[4](vec2(-1.0f, 1.0f), vec2(1.0f, 1.0f), vec2(-1.0f, -1.0f), vec2(1.0f, -1.0f));\n const vec2 tex[4] = vec2[4](vec2(0.0f, 0.0f), vec2(1.0f, 0.0f), vec2(0.0f, 1.0f), vec2(1.0f, 1.0f));\n\n layout(set = 0, binding = 0) uniform texture2D img;\n\n #ifdef INVERTY\n layout(location = 0) out flat ivec2 vTextureSize;\n #endif\n\n void main() {\n #ifdef INVERTY\n vTextureSize = textureSize(img, 0);\n #endif\n gl_Position = vec4(pos[gl_VertexIndex], 0.0, 1.0);\n }\n ",_0x20e21e="\n #extension GL_EXT_samplerless_texture_functions : enable\n\n layout(set = 0, binding = 0) uniform texture2D img;\n\n #ifdef INVERTY\n layout(location = 0) in flat ivec2 vTextureSize;\n #endif\n layout(location = 0) out vec4 outColor;\n\n void main() {\n #ifdef INVERTY\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.x, vTextureSize.y - gl_FragCoord.y), 0);\n #else\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.xy), 0);\n #endif\n #ifdef PREMULTIPLYALPHA\n color.rgb *= color.a;\n #endif\n outColor = color;\n }\n ",_0x4779d8=_0xe8e3cd,_0xaf0375="\n #extension GL_EXT_samplerless_texture_functions : enable\n\n layout(set = 0, binding = 0) uniform texture2D img;\n layout(set = 0, binding = 1) uniform Params {\n float ofstX;\n float ofstY;\n float width;\n float height;\n };\n\n #ifdef INVERTY\n layout(location = 0) in flat ivec2 vTextureSize;\n #endif\n layout(location = 0) out vec4 outColor;\n\n void main() {\n if (gl_FragCoord.x < ofstX || gl_FragCoord.x >= ofstX + width) {\n discard;\n }\n if (gl_FragCoord.y < ofstY || gl_FragCoord.y >= ofstY + height) {\n discard;\n }\n #ifdef INVERTY\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.x, ofstY + height - (gl_FragCoord.y - ofstY)), 0);\n #else\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.xy), 0);\n #endif\n #ifdef PREMULTIPLYALPHA\n color.rgb *= color.a;\n #endif\n outColor = color;\n }\n ",_0x15b0cd="\n const vec2 pos[4] = vec2[4](vec2(-1.0f, 1.0f), vec2(1.0f, 1.0f), vec2(-1.0f, -1.0f), vec2(1.0f, -1.0f));\n\n void main() {\n gl_Position = vec4(pos[gl_VertexIndex], 0.0, 1.0);\n }\n ",_0x26d64c="\n layout(set = 0, binding = 0) uniform Uniforms {\n uniform vec4 color;\n };\n\n layout(location = 0) out vec4 outColor;\n\n void main() {\n outColor = color;\n }\n ",_0x216b2d="\n struct VertexOutput {\n @builtin(position) Position : vec4<f32>,\n @location(0) fragUV : vec2<f32>\n }\n \n @vertex\n fn main(\n @builtin(vertex_index) VertexIndex : u32\n ) -> VertexOutput {\n var pos = array<vec2<f32>, 4>(\n vec2(-1.0, 1.0),\n vec2( 1.0, 1.0),\n vec2(-1.0, -1.0),\n vec2( 1.0, -1.0)\n );\n var tex = array<vec2<f32>, 4>(\n vec2(0.0, 0.0),\n vec2(1.0, 0.0),\n vec2(0.0, 1.0),\n vec2(1.0, 1.0)\n );\n\n var output: VertexOutput;\n\n output.Position = vec4<f32>(pos[VertexIndex], 0.0, 1.0);\n output.fragUV = tex[VertexIndex];\n\n return output;\n }\n ",_0x10f735="\n @group(0) @binding(0) var videoTexture: texture_external;\n\n @fragment\n fn main(\n @location(0) fragUV: vec2<f32>\n ) -> @location(0) vec4<f32> {\n let uv : vec2<i32> = vec2<i32>(i32(fragUV.x), i32(fragUV.y));\n return textureLoad(videoTexture, uv);\n }\n",_0x149974="\n @group(0) @binding(0) var videoTexture: texture_external;\n\n @fragment\n fn main(\n @location(0) fragUV: vec2<f32>\n ) -> @location(0) vec4<f32> {\n let uv : vec2<i32> = vec2<i32>(i32(fragUV.x), i32(1 - fragUV.y));\n return textureLoad(videoTexture, uv);\n }\n ",_0x5cecd5,_0x320ac9,_0x3698c0;!function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.MipMap=0]="MipMap",e[e.InvertYPremultiplyAlpha=1]="InvertYPremultiplyAlpha",e[e.Clear=2]="Clear",e[e.InvertYPremultiplyAlphaWithOfst=3]="InvertYPremultiplyAlphaWithOfst"}(_0x5cecd5||(_0x5cecd5={})),_0x3698c0=_0x320ac9||(_0x320ac9={}),_0x3698c0[_0x3698c0.DontInvertY=0]="DontInvertY",_0x3698c0[_0x3698c0.InvertY=1]="InvertY";var _0x29d065=[{vertex:_0x4fa5cf,fragment:_0x217baa},{vertex:_0xe8e3cd,fragment:_0x20e21e},{vertex:_0x15b0cd,fragment:_0x26d64c},{vertex:_0x4779d8,fragment:_0xaf0375}];const renderableTextureFormatToIndex={"":0,r8unorm:1,r8uint:2,r8sint:3,r16uint:4,r16sint:5,r16float:6,rg8unorm:7,rg8uint:8,rg8sint:9,r32uint:10,r32sint:11,r32float:12,rg16uint:13,rg16sint:14,rg16float:15,rgba8unorm:16,"rgba8unorm-srgb":17,rgba8uint:18,rgba8sint:19,bgra8unorm:20,"bgra8unorm-srgb":21,rgb10a2unorm:22,rg32uint:23,rg32sint:24,rg32float:25,rgba16uint:26,rgba16sint:27,rgba16float:28,rgba32uint:29,rgba32sint:30,rgba32float:31,stencil8:32,depth16unorm:33,depth24plus:34,"depth24plus-stencil8":35,depth32float:36,"depth24unorm-stencil8":37,"depth32float-stencil8":38};function WebGPUTextureHelper(e,t,i,n,r){this._pipelines={},this._compiledShaders=[],this._deferredReleaseTextures=[],this._videoPipelines={},this._videoCompiledShaders=[],this._userEngine=r,this._device=e,this._glslang=t,this._tintWASM=i,this._bufferManager=n,this._mipmapSampler=e.createSampler({minFilter:_0x5213c6.FilterMode.Linear}),this._videoSampler=e.createSampler({minFilter:_0x5213c6.FilterMode.Linear}),this._ubCopyWithOfst=this._bufferManager.createBuffer(16,_0x5213c6.BufferUsage.Uniform|_0x5213c6.BufferUsage.CopyDst).underlyingResource,this._getPipeline(_0x5213c6.TextureFormat.RGBA8Unorm)}WebGPUTextureHelper.ComputeNumMipmapLevels=function(e,t){return _0x3ea109.ILog2(Math.max(e,t))+1},WebGPUTextureHelper.prototype._getPipeline=function(e,t,i){void 0===t&&(t=_0x5cecd5.MipMap);var n=t===_0x5cecd5.MipMap?1:t===_0x5cecd5.InvertYPremultiplyAlpha?((i.invertY?1:0)<<1)+((i.premultiplyAlpha?1:0)<<2):t===_0x5cecd5.Clear?8:t===_0x5cecd5.InvertYPremultiplyAlphaWithOfst?((i.invertY?1:0)<<4)+((i.premultiplyAlpha?1:0)<<5):0;!this._pipelines[e]&&(this._pipelines[e]=[]);var r=this._pipelines[e][n];if(!r){var o="#version 450\r\n";(t===_0x5cecd5.InvertYPremultiplyAlpha||t===_0x5cecd5.InvertYPremultiplyAlphaWithOfst)&&(i.invertY&&(o+="#define INVERTY\r\n"),i.premultiplyAlpha&&(o+="#define PREMULTIPLYALPHA\r\n"));var a=this._compiledShaders[n];if(!a){var s=this._glslang.compileGLSL(o+_0x29d065[t].vertex,"vertex"),l=this._glslang.compileGLSL(o+_0x29d065[t].fragment,"fragment");this._tintWASM&&(s=this._tintWASM.convertSpirV2WGSL(s),l=this._tintWASM.convertSpirV2WGSL(l));var u=this._device.createShaderModule({code:s}),c=this._device.createShaderModule({code:l});a=this._compiledShaders[n]=[u,c]}var h=this._device.createRenderPipeline({layout:_0x5213c6.AutoLayoutMode.Auto,vertex:{module:a[0],entryPoint:"main"},fragment:{module:a[1],entryPoint:"main",targets:[{format:e}]},primitive:{topology:_0x5213c6.PrimitiveTopology.TriangleStrip,stripIndexFormat:_0x5213c6.IndexFormat.Uint16}});r=this._pipelines[e][n]=[h,h.getBindGroupLayout(0)]}return r},WebGPUTextureHelper.prototype._getVideoPipeline=function(e,t){void 0===t&&(t=_0x320ac9.DontInvertY);var i=t===_0x320ac9.InvertY?1:0;!this._videoPipelines[e]&&(this._videoPipelines[e]=[]);var n=this._videoPipelines[e][i];if(!n){var r=this._videoCompiledShaders[i];if(!r){var o=this._device.createShaderModule({code:_0x216b2d}),a=this._device.createShaderModule({code:0===i?_0x10f735:_0x149974});r=this._videoCompiledShaders[i]=[o,a]}var s=this._device.createRenderPipeline({label:"CopyVideoToTexture_".concat(e,"_").concat(0===i?"DontInvertY":"InvertY"),layout:_0x5213c6.AutoLayoutMode.Auto,vertex:{module:r[0],entryPoint:"main"},fragment:{module:r[1],entryPoint:"main",targets:[{format:e}]},primitive:{topology:_0x5213c6.PrimitiveTopology.TriangleStrip,stripIndexFormat:_0x5213c6.IndexFormat.Uint16}});n=this._videoPipelines[e][i]=[s,s.getBindGroupLayout(0)]}return n},WebGPUTextureHelper._GetTextureTypeFromFormat=function(e){switch(e){case _0x5213c6.TextureFormat.R8Unorm:case _0x5213c6.TextureFormat.R8Snorm:case _0x5213c6.TextureFormat.R8Uint:case _0x5213c6.TextureFormat.R8Sint:case _0x5213c6.TextureFormat.RG8Unorm:case _0x5213c6.TextureFormat.RG8Snorm:case _0x5213c6.TextureFormat.RG8Uint:case _0x5213c6.TextureFormat.RG8Sint:case _0x5213c6.TextureFormat.RGBA8Unorm:case _0x5213c6.TextureFormat.RGBA8UnormSRGB:case _0x5213c6.TextureFormat.RGBA8Snorm:case _0x5213c6.TextureFormat.RGBA8Uint:case _0x5213c6.TextureFormat.RGBA8Sint:case _0x5213c6.TextureFormat.BGRA8Unorm:case _0x5213c6.TextureFormat.BGRA8UnormSRGB:case _0x5213c6.TextureFormat.RGB10A2Unorm:case _0x5213c6.TextureFormat.RGB9E5UFloat:case _0x5213c6.TextureFormat.RG11B10UFloat:case _0x5213c6.TextureFormat.Depth24UnormStencil8:case _0x5213c6.TextureFormat.Depth32FloatStencil8:case _0x5213c6.TextureFormat.BC7RGBAUnorm:case _0x5213c6.TextureFormat.BC7RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC6HRGBUFloat:case _0x5213c6.TextureFormat.BC6HRGBFloat:case _0x5213c6.TextureFormat.BC5RGUnorm:case _0x5213c6.TextureFormat.BC5RGSnorm:case _0x5213c6.TextureFormat.BC3RGBAUnorm:case _0x5213c6.TextureFormat.BC3RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC2RGBAUnorm:case _0x5213c6.TextureFormat.BC2RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC4RUnorm:case _0x5213c6.TextureFormat.BC4RSnorm:case _0x5213c6.TextureFormat.BC1RGBAUnorm:case _0x5213c6.TextureFormat.BC1RGBAUnormSRGB:case _0x5213c6.TextureFormat.ETC2RGB8Unorm:case _0x5213c6.TextureFormat.ETC2RGB8UnormSRGB:case _0x5213c6.TextureFormat.ETC2RGB8A1Unorm:case _0x5213c6.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x5213c6.TextureFormat.ETC2RGBA8Unorm:case _0x5213c6.TextureFormat.ETC2RGBA8UnormSRGB:case _0x5213c6.TextureFormat.EACR11Unorm:case _0x5213c6.TextureFormat.EACR11Snorm:case _0x5213c6.TextureFormat.EACRG11Unorm:case _0x5213c6.TextureFormat.EACRG11Snorm:case _0x5213c6.TextureFormat.ASTC4x4Unorm:case _0x5213c6.TextureFormat.ASTC4x4UnormSRGB:case _0x5213c6.TextureFormat.ASTC5x4Unorm:case _0x5213c6.TextureFormat.ASTC5x4UnormSRGB:case _0x5213c6.TextureFormat.ASTC5x5Unorm:case _0x5213c6.TextureFormat.ASTC5x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC6x5Unorm:case _0x5213c6.TextureFormat.ASTC6x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC6x6Unorm:case _0x5213c6.TextureFormat.ASTC6x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x5Unorm:case _0x5213c6.TextureFormat.ASTC8x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x6Unorm:case _0x5213c6.TextureFormat.ASTC8x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x8Unorm:case _0x5213c6.TextureFormat.ASTC8x8UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x5Unorm:case _0x5213c6.TextureFormat.ASTC10x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x6Unorm:case _0x5213c6.TextureFormat.ASTC10x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x8Unorm:case _0x5213c6.TextureFormat.ASTC10x8UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x10Unorm:case _0x5213c6.TextureFormat.ASTC10x10UnormSRGB:case _0x5213c6.TextureFormat.ASTC12x10Unorm:case _0x5213c6.TextureFormat.ASTC12x10UnormSRGB:case _0x5213c6.TextureFormat.ASTC12x12Unorm:case _0x5213c6.TextureFormat.ASTC12x12UnormSRGB:return _0x333f62.TEXTURETYPE_UNSIGNED_BYTE;case _0x5213c6.TextureFormat.R16Uint:case _0x5213c6.TextureFormat.R16Sint:case _0x5213c6.TextureFormat.RG16Uint:case _0x5213c6.TextureFormat.RG16Sint:case _0x5213c6.TextureFormat.RGBA16Uint:case _0x5213c6.TextureFormat.RGBA16Sint:case _0x5213c6.TextureFormat.Depth16Unorm:return _0x333f62.TEXTURETYPE_UNSIGNED_SHORT;case _0x5213c6.TextureFormat.R16Float:case _0x5213c6.TextureFormat.RG16Float:case _0x5213c6.TextureFormat.RGBA16Float:return _0x333f62.TEXTURETYPE_HALF_FLOAT;case _0x5213c6.TextureFormat.R32Uint:case _0x5213c6.TextureFormat.R32Sint:case _0x5213c6.TextureFormat.RG32Uint:case _0x5213c6.TextureFormat.RG32Sint:case _0x5213c6.TextureFormat.RGBA32Uint:case _0x5213c6.TextureFormat.RGBA32Sint:return _0x333f62.TEXTURETYPE_UNSIGNED_INTEGER;case _0x5213c6.TextureFormat.R32Float:case _0x5213c6.TextureFormat.RG32Float:case _0x5213c6.TextureFormat.RGBA32Float:case _0x5213c6.TextureFormat.Depth32Float:return _0x333f62.TEXTURETYPE_FLOAT;case _0x5213c6.TextureFormat.Stencil8:throw"No fixed size for Stencil8 format!";case _0x5213c6.TextureFormat.Depth24Plus:throw"No fixed size for Depth24Plus format!";case _0x5213c6.TextureFormat.Depth24PlusStencil8:throw"No fixed size for Depth24PlusStencil8 format!"}return _0x333f62.TEXTURETYPE_UNSIGNED_BYTE},WebGPUTextureHelper._GetBlockInformationFromFormat=function(e){switch(e){case _0x5213c6.TextureFormat.R8Unorm:case _0x5213c6.TextureFormat.R8Snorm:case _0x5213c6.TextureFormat.R8Uint:case _0x5213c6.TextureFormat.R8Sint:return{width:1,height:1,length:1};case _0x5213c6.TextureFormat.R16Uint:case _0x5213c6.TextureFormat.R16Sint:case _0x5213c6.TextureFormat.R16Float:case _0x5213c6.TextureFormat.RG8Unorm:case _0x5213c6.TextureFormat.RG8Snorm:case _0x5213c6.TextureFormat.RG8Uint:case _0x5213c6.TextureFormat.RG8Sint:return{width:1,height:1,length:2};case _0x5213c6.TextureFormat.R32Uint:case _0x5213c6.TextureFormat.R32Sint:case _0x5213c6.TextureFormat.R32Float:case _0x5213c6.TextureFormat.RG16Uint:case _0x5213c6.TextureFormat.RG16Sint:case _0x5213c6.TextureFormat.RG16Float:case _0x5213c6.TextureFormat.RGBA8Unorm:case _0x5213c6.TextureFormat.RGBA8UnormSRGB:case _0x5213c6.TextureFormat.RGBA8Snorm:case _0x5213c6.TextureFormat.RGBA8Uint:case _0x5213c6.TextureFormat.RGBA8Sint:case _0x5213c6.TextureFormat.BGRA8Unorm:case _0x5213c6.TextureFormat.BGRA8UnormSRGB:case _0x5213c6.TextureFormat.RGB9E5UFloat:case _0x5213c6.TextureFormat.RGB10A2Unorm:case _0x5213c6.TextureFormat.RG11B10UFloat:return{width:1,height:1,length:4};case _0x5213c6.TextureFormat.RG32Uint:case _0x5213c6.TextureFormat.RG32Sint:case _0x5213c6.TextureFormat.RG32Float:case _0x5213c6.TextureFormat.RGBA16Uint:case _0x5213c6.TextureFormat.RGBA16Sint:case _0x5213c6.TextureFormat.RGBA16Float:return{width:1,height:1,length:8};case _0x5213c6.TextureFormat.RGBA32Uint:case _0x5213c6.TextureFormat.RGBA32Sint:case _0x5213c6.TextureFormat.RGBA32Float:return{width:1,height:1,length:16};case _0x5213c6.TextureFormat.Stencil8:throw"No fixed size for Stencil8 format!";case _0x5213c6.TextureFormat.Depth16Unorm:return{width:1,height:1,length:2};case _0x5213c6.TextureFormat.Depth24Plus:throw"No fixed size for Depth24Plus format!";case _0x5213c6.TextureFormat.Depth24PlusStencil8:throw"No fixed size for Depth24PlusStencil8 format!";case _0x5213c6.TextureFormat.Depth32Float:case _0x5213c6.TextureFormat.Depth24UnormStencil8:return{width:1,height:1,length:4};case _0x5213c6.TextureFormat.Depth32FloatStencil8:return{width:1,height:1,length:5};case _0x5213c6.TextureFormat.BC7RGBAUnorm:case _0x5213c6.TextureFormat.BC7RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC6HRGBUFloat:case _0x5213c6.TextureFormat.BC6HRGBFloat:case _0x5213c6.TextureFormat.BC5RGUnorm:case _0x5213c6.TextureFormat.BC5RGSnorm:case _0x5213c6.TextureFormat.BC3RGBAUnorm:case _0x5213c6.TextureFormat.BC3RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC2RGBAUnorm:case _0x5213c6.TextureFormat.BC2RGBAUnormSRGB:return{width:4,height:4,length:16};case _0x5213c6.TextureFormat.BC4RUnorm:case _0x5213c6.TextureFormat.BC4RSnorm:case _0x5213c6.TextureFormat.BC1RGBAUnorm:case _0x5213c6.TextureFormat.BC1RGBAUnormSRGB:case _0x5213c6.TextureFormat.ETC2RGB8Unorm:case _0x5213c6.TextureFormat.ETC2RGB8UnormSRGB:case _0x5213c6.TextureFormat.ETC2RGB8A1Unorm:case _0x5213c6.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x5213c6.TextureFormat.EACR11Unorm:case _0x5213c6.TextureFormat.EACR11Snorm:return{width:4,height:4,length:8};case _0x5213c6.TextureFormat.ETC2RGBA8Unorm:case _0x5213c6.TextureFormat.ETC2RGBA8UnormSRGB:case _0x5213c6.TextureFormat.EACRG11Unorm:case _0x5213c6.TextureFormat.EACRG11Snorm:case _0x5213c6.TextureFormat.ASTC4x4Unorm:case _0x5213c6.TextureFormat.ASTC4x4UnormSRGB:return{width:4,height:4,length:16};case _0x5213c6.TextureFormat.ASTC5x4Unorm:case _0x5213c6.TextureFormat.ASTC5x4UnormSRGB:return{width:5,height:4,length:16};case _0x5213c6.TextureFormat.ASTC5x5Unorm:case _0x5213c6.TextureFormat.ASTC5x5UnormSRGB:return{width:5,height:5,length:16};case _0x5213c6.TextureFormat.ASTC6x5Unorm:case _0x5213c6.TextureFormat.ASTC6x5UnormSRGB:return{width:6,height:5,length:16};case _0x5213c6.TextureFormat.ASTC6x6Unorm:case _0x5213c6.TextureFormat.ASTC6x6UnormSRGB:return{width:6,height:6,length:16};case _0x5213c6.TextureFormat.ASTC8x5Unorm:case _0x5213c6.TextureFormat.ASTC8x5UnormSRGB:return{width:8,height:5,length:16};case _0x5213c6.TextureFormat.ASTC8x6Unorm:case _0x5213c6.TextureFormat.ASTC8x6UnormSRGB:return{width:8,height:6,length:16};case _0x5213c6.TextureFormat.ASTC8x8Unorm:case _0x5213c6.TextureFormat.ASTC8x8UnormSRGB:return{width:8,height:8,length:16};case _0x5213c6.TextureFormat.ASTC10x5Unorm:case _0x5213c6.TextureFormat.ASTC10x5UnormSRGB:return{width:10,height:5,length:16};case _0x5213c6.TextureFormat.ASTC10x6Unorm:case _0x5213c6.TextureFormat.ASTC10x6UnormSRGB:return{width:10,height:6,length:16};case _0x5213c6.TextureFormat.ASTC10x8Unorm:case _0x5213c6.TextureFormat.ASTC10x8UnormSRGB:return{width:10,height:8,length:16};case _0x5213c6.TextureFormat.ASTC10x10Unorm:case _0x5213c6.TextureFormat.ASTC10x10UnormSRGB:return{width:10,height:10,length:16};case _0x5213c6.TextureFormat.ASTC12x10Unorm:case _0x5213c6.TextureFormat.ASTC12x10UnormSRGB:return{width:12,height:10,length:16};case _0x5213c6.TextureFormat.ASTC12x12Unorm:case _0x5213c6.TextureFormat.ASTC12x12UnormSRGB:return{width:12,height:12,length:16}}return{width:1,height:1,length:4}},WebGPUTextureHelper._IsHardwareTexture=function(e){return!!e.release},WebGPUTextureHelper._IsInternalTexture=function(e){return!!e.dispose},WebGPUTextureHelper.IsImageBitmap=function(e){return void 0!==e.close},WebGPUTextureHelper.IsImageBitmapArray=function(e){return Array.isArray(e)&&void 0!==e[0].close},WebGPUTextureHelper.prototype.setCommandEncoder=function(e){this._commandEncoderForCreation=e},WebGPUTextureHelper.IsCompressedFormat=function(e){switch(e){case _0x5213c6.TextureFormat.BC7RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC7RGBAUnorm:case _0x5213c6.TextureFormat.BC6HRGBFloat:case _0x5213c6.TextureFormat.BC6HRGBUFloat:case _0x5213c6.TextureFormat.BC5RGSnorm:case _0x5213c6.TextureFormat.BC5RGUnorm:case _0x5213c6.TextureFormat.BC4RSnorm:case _0x5213c6.TextureFormat.BC4RUnorm:case _0x5213c6.TextureFormat.BC3RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC3RGBAUnorm:case _0x5213c6.TextureFormat.BC2RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC2RGBAUnorm:case _0x5213c6.TextureFormat.BC1RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC1RGBAUnorm:case _0x5213c6.TextureFormat.ETC2RGB8Unorm:case _0x5213c6.TextureFormat.ETC2RGB8UnormSRGB:case _0x5213c6.TextureFormat.ETC2RGB8A1Unorm:case _0x5213c6.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x5213c6.TextureFormat.ETC2RGBA8Unorm:case _0x5213c6.TextureFormat.ETC2RGBA8UnormSRGB:case _0x5213c6.TextureFormat.EACR11Unorm:case _0x5213c6.TextureFormat.EACR11Snorm:case _0x5213c6.TextureFormat.EACRG11Unorm:case _0x5213c6.TextureFormat.EACRG11Snorm:case _0x5213c6.TextureFormat.ASTC4x4Unorm:case _0x5213c6.TextureFormat.ASTC4x4UnormSRGB:case _0x5213c6.TextureFormat.ASTC5x4Unorm:case _0x5213c6.TextureFormat.ASTC5x4UnormSRGB:case _0x5213c6.TextureFormat.ASTC5x5Unorm:case _0x5213c6.TextureFormat.ASTC5x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC6x5Unorm:case _0x5213c6.TextureFormat.ASTC6x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC6x6Unorm:case _0x5213c6.TextureFormat.ASTC6x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x5Unorm:case _0x5213c6.TextureFormat.ASTC8x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x6Unorm:case _0x5213c6.TextureFormat.ASTC8x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x8Unorm:case _0x5213c6.TextureFormat.ASTC8x8UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x5Unorm:case _0x5213c6.TextureFormat.ASTC10x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x6Unorm:case _0x5213c6.TextureFormat.ASTC10x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x8Unorm:case _0x5213c6.TextureFormat.ASTC10x8UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x10Unorm:case _0x5213c6.TextureFormat.ASTC10x10UnormSRGB:case _0x5213c6.TextureFormat.ASTC12x10Unorm:case _0x5213c6.TextureFormat.ASTC12x10UnormSRGB:case _0x5213c6.TextureFormat.ASTC12x12Unorm:case _0x5213c6.TextureFormat.ASTC12x12UnormSRGB:return!0}return!1},WebGPUTextureHelper.GetWebGPUTextureFormat=function(e,t,i){switch(void 0===i&&(i=!1),t){case _0x333f62.TEXTUREFORMAT_DEPTH16:return _0x5213c6.TextureFormat.Depth16Unorm;case _0x333f62.TEXTUREFORMAT_DEPTH24:return _0x5213c6.TextureFormat.Depth24Plus;case _0x333f62.TEXTUREFORMAT_DEPTH24_STENCIL8:return _0x5213c6.TextureFormat.Depth24PlusStencil8;case _0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT:return _0x5213c6.TextureFormat.Depth32Float;case _0x333f62.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8:return _0x5213c6.TextureFormat.Depth24UnormStencil8;case _0x333f62.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8:return _0x5213c6.TextureFormat.Depth32FloatStencil8;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM:return i?_0x5213c6.TextureFormat.BC7RGBAUnormSRGB:_0x5213c6.TextureFormat.BC7RGBAUnorm;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT:return _0x5213c6.TextureFormat.BC6HRGBUFloat;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT:return _0x5213c6.TextureFormat.BC6HRGBFloat;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5:return i?_0x5213c6.TextureFormat.BC3RGBAUnormSRGB:_0x5213c6.TextureFormat.BC3RGBAUnorm;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3:return i?_0x5213c6.TextureFormat.BC2RGBAUnormSRGB:_0x5213c6.TextureFormat.BC2RGBAUnorm;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1:case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1:return i?_0x5213c6.TextureFormat.BC1RGBAUnormSRGB:_0x5213c6.TextureFormat.BC1RGBAUnorm;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4:return i?_0x5213c6.TextureFormat.ASTC4x4UnormSRGB:_0x5213c6.TextureFormat.ASTC4x4Unorm;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL:case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2:return i?_0x5213c6.TextureFormat.ETC2RGB8UnormSRGB:_0x5213c6.TextureFormat.ETC2RGB8Unorm;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC:return i?_0x5213c6.TextureFormat.ETC2RGBA8UnormSRGB:_0x5213c6.TextureFormat.ETC2RGBA8Unorm}switch(e){case _0x333f62.TEXTURETYPE_BYTE:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return _0x5213c6.TextureFormat.R8Snorm;case _0x333f62.TEXTUREFORMAT_RG:return _0x5213c6.TextureFormat.RG8Snorm;case _0x333f62.TEXTUREFORMAT_RGB:throw"RGB format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return _0x5213c6.TextureFormat.R8Sint;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return _0x5213c6.TextureFormat.RG8Sint;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:throw"RGB_INTEGER format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:return _0x5213c6.TextureFormat.RGBA8Sint;default:return _0x5213c6.TextureFormat.RGBA8Snorm}case _0x333f62.TEXTURETYPE_UNSIGNED_BYTE:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return _0x5213c6.TextureFormat.R8Unorm;case _0x333f62.TEXTUREFORMAT_RG:return _0x5213c6.TextureFormat.RG8Unorm;case _0x333f62.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA:return i?_0x5213c6.TextureFormat.RGBA8UnormSRGB:_0x5213c6.TextureFormat.RGBA8Unorm;case _0x333f62.TEXTUREFORMAT_BGRA:return i?_0x5213c6.TextureFormat.BGRA8UnormSRGB:_0x5213c6.TextureFormat.BGRA8Unorm;case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return _0x5213c6.TextureFormat.R8Uint;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return _0x5213c6.TextureFormat.RG8Uint;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:throw"RGB_INTEGER format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:return _0x5213c6.TextureFormat.RGBA8Uint;case _0x333f62.TEXTUREFORMAT_ALPHA:throw"TEXTUREFORMAT_ALPHA format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_LUMINANCE:throw"TEXTUREFORMAT_LUMINANCE format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA:throw"TEXTUREFORMAT_LUMINANCE_ALPHA format not supported in WebGPU";default:return _0x5213c6.TextureFormat.RGBA8Unorm}case _0x333f62.TEXTURETYPE_SHORT:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return _0x5213c6.TextureFormat.R16Sint;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return _0x5213c6.TextureFormat.RG16Sint;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x5213c6.TextureFormat.RGBA16Sint}case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return _0x5213c6.TextureFormat.R16Uint;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return _0x5213c6.TextureFormat.RG16Uint;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x5213c6.TextureFormat.RGBA16Uint}case _0x333f62.TEXTURETYPE_INT:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return _0x5213c6.TextureFormat.R32Sint;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return _0x5213c6.TextureFormat.RG32Sint;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x5213c6.TextureFormat.RGBA32Sint}case _0x333f62.TEXTURETYPE_UNSIGNED_INTEGER:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return _0x5213c6.TextureFormat.R32Uint;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return _0x5213c6.TextureFormat.RG32Uint;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x5213c6.TextureFormat.RGBA32Uint}case _0x333f62.TEXTURETYPE_FLOAT:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return _0x5213c6.TextureFormat.R32Float;case _0x333f62.TEXTUREFORMAT_RG:return _0x5213c6.TextureFormat.RG32Float;case _0x333f62.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA:default:return _0x5213c6.TextureFormat.RGBA32Float}case _0x333f62.TEXTURETYPE_HALF_FLOAT:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return _0x5213c6.TextureFormat.R16Float;case _0x333f62.TEXTUREFORMAT_RG:return _0x5213c6.TextureFormat.RG16Float;case _0x333f62.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA:default:return _0x5213c6.TextureFormat.RGBA16Float}case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:throw"TEXTURETYPE_UNSIGNED_SHORT_5_6_5 format not supported in WebGPU";case _0x333f62.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:throw"TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV format not supported in WebGPU";case _0x333f62.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:throw"TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV format not supported in WebGPU";case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:throw"TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 format not supported in WebGPU";case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:throw"TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 format not supported in WebGPU";case _0x333f62.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(t){case _0x333f62.TEXTUREFORMAT_RGBA:return _0x5213c6.TextureFormat.RGB10A2Unorm;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:throw"TEXTUREFORMAT_RGBA_INTEGER format not supported in WebGPU when type is TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV";default:return _0x5213c6.TextureFormat.RGB10A2Unorm}}return i?_0x5213c6.TextureFormat.RGBA8UnormSRGB:_0x5213c6.TextureFormat.RGBA8Unorm},WebGPUTextureHelper.GetNumChannelsFromWebGPUTextureFormat=function(e){switch(e){case _0x5213c6.TextureFormat.R8Unorm:case _0x5213c6.TextureFormat.R8Snorm:case _0x5213c6.TextureFormat.R8Uint:case _0x5213c6.TextureFormat.R8Sint:case _0x5213c6.TextureFormat.BC4RUnorm:case _0x5213c6.TextureFormat.BC4RSnorm:case _0x5213c6.TextureFormat.R16Uint:case _0x5213c6.TextureFormat.R16Sint:case _0x5213c6.TextureFormat.Depth16Unorm:case _0x5213c6.TextureFormat.R16Float:case _0x5213c6.TextureFormat.R32Uint:case _0x5213c6.TextureFormat.R32Sint:case _0x5213c6.TextureFormat.R32Float:case _0x5213c6.TextureFormat.Depth32Float:case _0x5213c6.TextureFormat.Stencil8:case _0x5213c6.TextureFormat.Depth24Plus:case _0x5213c6.TextureFormat.EACR11Unorm:case _0x5213c6.TextureFormat.EACR11Snorm:return 1;case _0x5213c6.TextureFormat.RG8Unorm:case _0x5213c6.TextureFormat.RG8Snorm:case _0x5213c6.TextureFormat.RG8Uint:case _0x5213c6.TextureFormat.RG8Sint:case _0x5213c6.TextureFormat.Depth24UnormStencil8:case _0x5213c6.TextureFormat.Depth32FloatStencil8:case _0x5213c6.TextureFormat.BC5RGUnorm:case _0x5213c6.TextureFormat.BC5RGSnorm:case _0x5213c6.TextureFormat.RG16Uint:case _0x5213c6.TextureFormat.RG16Sint:case _0x5213c6.TextureFormat.RG16Float:case _0x5213c6.TextureFormat.RG32Uint:case _0x5213c6.TextureFormat.RG32Sint:case _0x5213c6.TextureFormat.RG32Float:case _0x5213c6.TextureFormat.Depth24PlusStencil8:case _0x5213c6.TextureFormat.EACRG11Unorm:case _0x5213c6.TextureFormat.EACRG11Snorm:return 2;case _0x5213c6.TextureFormat.RGB9E5UFloat:case _0x5213c6.TextureFormat.RG11B10UFloat:case _0x5213c6.TextureFormat.BC6HRGBUFloat:case _0x5213c6.TextureFormat.BC6HRGBFloat:case _0x5213c6.TextureFormat.ETC2RGB8Unorm:case _0x5213c6.TextureFormat.ETC2RGB8UnormSRGB:return 3;case _0x5213c6.TextureFormat.RGBA8Unorm:case _0x5213c6.TextureFormat.RGBA8UnormSRGB:case _0x5213c6.TextureFormat.RGBA8Snorm:case _0x5213c6.TextureFormat.RGBA8Uint:case _0x5213c6.TextureFormat.RGBA8Sint:case _0x5213c6.TextureFormat.BGRA8Unorm:case _0x5213c6.TextureFormat.BGRA8UnormSRGB:case _0x5213c6.TextureFormat.RGB10A2Unorm:case _0x5213c6.TextureFormat.BC7RGBAUnorm:case _0x5213c6.TextureFormat.BC7RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC3RGBAUnorm:case _0x5213c6.TextureFormat.BC3RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC2RGBAUnorm:case _0x5213c6.TextureFormat.BC2RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC1RGBAUnorm:case _0x5213c6.TextureFormat.BC1RGBAUnormSRGB:case _0x5213c6.TextureFormat.RGBA16Uint:case _0x5213c6.TextureFormat.RGBA16Sint:case _0x5213c6.TextureFormat.RGBA16Float:case _0x5213c6.TextureFormat.RGBA32Uint:case _0x5213c6.TextureFormat.RGBA32Sint:case _0x5213c6.TextureFormat.RGBA32Float:case _0x5213c6.TextureFormat.ETC2RGB8A1Unorm:case _0x5213c6.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x5213c6.TextureFormat.ETC2RGBA8Unorm:case _0x5213c6.TextureFormat.ETC2RGBA8UnormSRGB:case _0x5213c6.TextureFormat.ASTC4x4Unorm:case _0x5213c6.TextureFormat.ASTC4x4UnormSRGB:case _0x5213c6.TextureFormat.ASTC5x4Unorm:case _0x5213c6.TextureFormat.ASTC5x4UnormSRGB:case _0x5213c6.TextureFormat.ASTC5x5Unorm:case _0x5213c6.TextureFormat.ASTC5x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC6x5Unorm:case _0x5213c6.TextureFormat.ASTC6x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC6x6Unorm:case _0x5213c6.TextureFormat.ASTC6x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x5Unorm:case _0x5213c6.TextureFormat.ASTC8x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x6Unorm:case _0x5213c6.TextureFormat.ASTC8x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x8Unorm:case _0x5213c6.TextureFormat.ASTC8x8UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x5Unorm:case _0x5213c6.TextureFormat.ASTC10x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x6Unorm:case _0x5213c6.TextureFormat.ASTC10x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x8Unorm:case _0x5213c6.TextureFormat.ASTC10x8UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x10Unorm:case _0x5213c6.TextureFormat.ASTC10x10UnormSRGB:case _0x5213c6.TextureFormat.ASTC12x10Unorm:case _0x5213c6.TextureFormat.ASTC12x10UnormSRGB:case _0x5213c6.TextureFormat.ASTC12x12Unorm:case _0x5213c6.TextureFormat.ASTC12x12UnormSRGB:return 4}throw"Unknown format ".concat(e,"!")},WebGPUTextureHelper.HasStencilAspect=function(e){switch(e){case _0x5213c6.TextureFormat.Stencil8:case _0x5213c6.TextureFormat.Depth24UnormStencil8:case _0x5213c6.TextureFormat.Depth32FloatStencil8:case _0x5213c6.TextureFormat.Depth24PlusStencil8:return!0}return!1},WebGPUTextureHelper.HasDepthAndStencilAspects=function(e){switch(e){case _0x5213c6.TextureFormat.Depth24UnormStencil8:case _0x5213c6.TextureFormat.Depth32FloatStencil8:case _0x5213c6.TextureFormat.Depth24PlusStencil8:return!0}return!1},WebGPUTextureHelper.prototype.copyVideoToTexture=function(e,t,i,n,r){var o,a,s,l;void 0===n&&(n=!1);var u=void 0===r,c=this._getVideoPipeline(i,n?_0x320ac9.InvertY:_0x320ac9.DontInvertY),h=c[0],d=c[1];u&&(r=this._device.createCommandEncoder({})),null===(a=(o=r).pushDebugGroup)||void 0===a||a.call(o,"copy video to texture - invertY=".concat(n));var f={colorAttachments:[{view:t._hardwareTexture.underlyingResource.createView({format:i,dimension:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:1,aspect:_0x5213c6.TextureAspect.All}),loadOp:_0x5213c6.LoadOp.Load,storeOp:_0x5213c6.StoreOp.Store}]},p=r.beginRenderPass(f),_={layout:d,entries:[{binding:0,resource:this._device.importExternalTexture({source:e.underlyingResource})}]},m=this._device.createBindGroup(_);p.setPipeline(h),p.setBindGroup(0,m),p.draw(4,1,0,0),p.end(),null===(l=(s=r).popDebugGroup)||void 0===l||l.call(s),u&&(this._device.queue.submit([r.finish()]),r=null)},WebGPUTextureHelper.prototype.invertYPreMultiplyAlpha=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){var _,m,g,x,y,v;void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=1),void 0===u&&(u=0),void 0===c&&(c=0),void 0===h&&(h=0),void 0===d&&(d=0);var $,b=0!==h,T=void 0===f,C=this._getPipeline(n,b?_0x5cecd5.InvertYPremultiplyAlphaWithOfst:_0x5cecd5.InvertYPremultiplyAlpha,{invertY:r,premultiplyAlpha:o}),S=C[0],w=C[1];if(a=Math.max(a,0),T&&(f=this._device.createCommandEncoder({})),null===(m=(_=f).pushDebugGroup)||void 0===m||m.call(_,"internal process texture - invertY=".concat(r," premultiplyAlpha=").concat(o)),WebGPUTextureHelper._IsHardwareTexture(e)?($=e.underlyingResource,(!r||o||1!==l||0!==a)&&(e=void 0)):($=e,e=void 0),$){b&&this._bufferManager.setRawData(this._ubCopyWithOfst,0,new Float32Array([u,c,h,d]),0,16);var E=e,P=null!==(g=null==E?void 0:E._copyInvertYTempTexture)&&void 0!==g?g:this.createTexture({width:t,height:i,layers:1},!1,!1,!1,!1,!1,n,1,f,_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.RenderAttachment|_0x5213c6.TextureUsage.TextureBinding),A=null!==(x=null==E?void 0:E._copyInvertYRenderPassDescr)&&void 0!==x?x:{colorAttachments:[{view:P.createView({format:n,dimension:_0x5213c6.TextureViewDimension.E2d,baseMipLevel:0,mipLevelCount:1,arrayLayerCount:1,baseArrayLayer:0}),loadOp:_0x5213c6.LoadOp.Load,storeOp:_0x5213c6.StoreOp.Store}]},L=f.beginRenderPass(A),M=b?null==E?void 0:E._copyInvertYBindGroupWithOfst:null==E?void 0:E._copyInvertYBindGroup;if(!M){var R={layout:w,entries:[{binding:0,resource:$.createView({format:n,dimension:_0x5213c6.TextureViewDimension.E2d,baseMipLevel:s,mipLevelCount:1,arrayLayerCount:l,baseArrayLayer:a})}]};b&&R.entries.push({binding:1,resource:{buffer:this._ubCopyWithOfst}}),M=this._device.createBindGroup(R)}L.setPipeline(S),L.setBindGroup(0,M),L.draw(4,1,0,0),L.end(),f.copyTextureToTexture({texture:P},{texture:$,mipLevel:s,origin:{x:0,y:0,z:a}},{width:t,height:i,depthOrArrayLayers:1}),E?(E._copyInvertYTempTexture=P,E._copyInvertYRenderPassDescr=A,b?E._copyInvertYBindGroupWithOfst=M:E._copyInvertYBindGroup=M):this._deferredReleaseTextures.push([P,null]),null===(v=(y=f).popDebugGroup)||void 0===v||v.call(y),T&&(this._device.queue.submit([f.finish()]),f=null)}},WebGPUTextureHelper.prototype.copyWithInvertY=function(e,t,i,n){var r,o,a,s,l=void 0===n,u=this._getPipeline(t,_0x5cecd5.InvertYPremultiplyAlpha,{invertY:!0,premultiplyAlpha:!1}),c=u[0],h=u[1];l&&(n=this._device.createCommandEncoder({})),null===(o=(r=n).pushDebugGroup)||void 0===o||o.call(r,"internal copy texture with invertY");var d=n.beginRenderPass(i),f=this._device.createBindGroup({layout:h,entries:[{binding:0,resource:e}]});d.setPipeline(c),d.setBindGroup(0,f),d.draw(4,1,0,0),d.end(),null===(s=(a=n).popDebugGroup)||void 0===s||s.call(a),l&&(this._device.queue.submit([n.finish()]),n=null)},WebGPUTextureHelper.prototype.createTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=_0x5213c6.TextureFormat.RGBA8Unorm),void 0===s&&(s=1),void 0===u&&(u=-1),void 0===c&&(c=0),void 0===h&&(h=1),s>1&&(s=4);var d=e.layers||1,f={width:e.width,height:e.height,depthOrArrayLayers:d},p=WebGPUTextureHelper.IsCompressedFormat(a),_=t?WebGPUTextureHelper.ComputeNumMipmapLevels(e.width,e.height):1;h>1&&(_=h);var m=u>=0?u:_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.CopyDst|_0x5213c6.TextureUsage.TextureBinding;c|=t&&!p?_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.RenderAttachment:0,!p&&!o&&(c|=_0x5213c6.TextureUsage.RenderAttachment|_0x5213c6.TextureUsage.CopyDst);var g=this._device.createTexture({size:f,dimension:o?_0x5213c6.TextureDimension.E3d:_0x5213c6.TextureDimension.E2d,format:a,usage:m|c,sampleCount:s,mipLevelCount:_});return WebGPUTextureHelper.IsImageBitmap(e)&&(this.updateTexture(e,g,e.width,e.height,d,a,0,0,n,r,0,0),t&&i&&this.generateMipmaps(g,a,_,0,l)),g},WebGPUTextureHelper.prototype.createCubeTexture=function(e,t,i,n,r,o,a,s,l,u){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o=_0x5213c6.TextureFormat.RGBA8Unorm),void 0===a&&(a=1),void 0===l&&(l=-1),void 0===u&&(u=0),a>1&&(a=4);var c=WebGPUTextureHelper.IsImageBitmapArray(e)?e[0].width:e.width,h=WebGPUTextureHelper.IsImageBitmapArray(e)?e[0].height:e.height,d=WebGPUTextureHelper.IsCompressedFormat(o),f=t?WebGPUTextureHelper.ComputeNumMipmapLevels(c,h):1,p=l>=0?l:_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.CopyDst|_0x5213c6.TextureUsage.TextureBinding;u|=t&&!d?_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.RenderAttachment:0,!d&&(u|=_0x5213c6.TextureUsage.RenderAttachment|_0x5213c6.TextureUsage.CopyDst);var _=this._device.createTexture({size:{width:c,height:h,depthOrArrayLayers:6},dimension:_0x5213c6.TextureDimension.E2d,format:o,usage:p|u,sampleCount:a,mipLevelCount:f});return WebGPUTextureHelper.IsImageBitmapArray(e)&&(this.updateCubeTextures(e,_,c,h,o,n,r,0,0),t&&i&&this.generateCubeMipmaps(_,o,f,s)),_},WebGPUTextureHelper.prototype.generateCubeMipmaps=function(e,t,i,n){var r,o,a,s,l=void 0===n;l&&(n=this._device.createCommandEncoder({})),null===(o=(r=n).pushDebugGroup)||void 0===o||o.call(r,"create cube mipmaps - ".concat(i," levels"));for(var u=0;u<6;++u)this.generateMipmaps(e,t,i,u,n);null===(s=(a=n).popDebugGroup)||void 0===s||s.call(a),l&&(this._device.queue.submit([n.finish()]),n=null)},WebGPUTextureHelper.prototype.generateMipmaps=function(e,t,i,n,r){var o,a,s,l,u,c,h,d;void 0===n&&(n=0);var f,p=void 0===r,_=this._getPipeline(t),m=_[0],g=_[1];if(n=Math.max(n,0),p&&(r=this._device.createCommandEncoder({})),null===(a=(o=r).pushDebugGroup)||void 0===a||a.call(o,"create mipmaps for face #".concat(n," - ").concat(i," levels")),WebGPUTextureHelper._IsHardwareTexture(e)?(f=e.underlyingResource,e._mipmapGenRenderPassDescr=e._mipmapGenRenderPassDescr||[],e._mipmapGenBindGroup=e._mipmapGenBindGroup||[]):(f=e,e=void 0),f){for(var x=e,y=1;y<i;++y){var v=null!==(l=null===(s=null==x?void 0:x._mipmapGenRenderPassDescr[n])||void 0===s?void 0:s[y-1])&&void 0!==l?l:{colorAttachments:[{view:f.createView({format:t,dimension:_0x5213c6.TextureViewDimension.E2d,baseMipLevel:y,mipLevelCount:1,arrayLayerCount:1,baseArrayLayer:n}),loadOp:_0x5213c6.LoadOp.Load,storeOp:_0x5213c6.StoreOp.Store}]};x&&(x._mipmapGenRenderPassDescr[n]=x._mipmapGenRenderPassDescr[n]||[],x._mipmapGenRenderPassDescr[n][y-1]=v);var $=r.beginRenderPass(v),b=null!==(c=null===(u=null==x?void 0:x._mipmapGenBindGroup[n])||void 0===u?void 0:u[y-1])&&void 0!==c?c:this._device.createBindGroup({layout:g,entries:[{binding:0,resource:this._mipmapSampler},{binding:1,resource:f.createView({format:t,dimension:_0x5213c6.TextureViewDimension.E2d,baseMipLevel:y-1,mipLevelCount:1,arrayLayerCount:1,baseArrayLayer:n})}]});x&&(x._mipmapGenBindGroup[n]=x._mipmapGenBindGroup[n]||[],x._mipmapGenBindGroup[n][y-1]=b),$.setPipeline(m),$.setBindGroup(0,b),$.draw(4,1,0,0),$.end()}null===(d=(h=r).popDebugGroup)||void 0===d||d.call(h),p&&(this._device.queue.submit([r.finish()]),r=null)}},WebGPUTextureHelper.prototype.generateMipmapsByCS=async function(e,t,i,n,r){var o=t._texture._hardwareTexture.underlyingResource,a=this._userEngine;const s=e,l=new _0x5c4ccd(a);l.addUniform("srcDimension",1),l.addUniform("texelSize",2);var u=new _0x5c4ccd(a);u.addUniform("texelSize",2);var c=s._texture.width,h=s._texture.height,d=new _0x556c47(a,c*h*4*4),f=new _0x556c47(a,c*h*4*4),p=new _0x45d8f5("texSamplerCS",a,{computeSource:_0x4ba444},{bindingsMapping:i?{params:{group:0,binding:0},buffer_out:{group:0,binding:1},oriDepthTexture:{group:0,binding:2},mip0Texture:{group:0,binding:3}}:{params:{group:0,binding:0},buffer_out:{group:0,binding:1},oriTexture:{group:0,binding:2},mip0Texture:{group:0,binding:3}},defines:[i?"_useDepthTexture":""]}),_=new _0x45d8f5("generateMipCS",a,{computeSource:_0x5ca06a},{bindingsMapping:{params:{group:0,binding:0},buffer_in:{group:0,binding:1},buffer_out:{group:0,binding:2},mipMapsTexture:{group:0,binding:3}},defines:[n?"_isHizDepthTex":""]}),m=p;for(let e=0;e<r;e++){let n=c>>e,p=h>>e;if(e>0&&(m=_),0==e){let e=(1&p)<<1|1&n;l.updateInt("srcDimension",e),l.updateFloat2("texelSize",n,p),l.update(),m.setUniformBuffer("params",l),i?m.setTexture("oriDepthTexture",s,!1):m.setTexture("oriTexture",s,!1),m.setStorageTexture("mip0Texture",t)}else{u.updateFloat2("texelSize",n,p),u.update(),m.setUniformBuffer("params",u);let i=o.createView({format:"rgba8unorm",dimension:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:e});t._texture._hardwareTexture.viewForWriting=i,m.setStorageTexture("mipMapsTexture",t)}1&e?(m.setStorageBuffer("buffer_in",d),m.setStorageBuffer("buffer_out",f)):(e>0&&m.setStorageBuffer("buffer_in",f),m.setStorageBuffer("buffer_out",d)),await m.dispatchWhenReady(Math.ceil(n/8),Math.ceil(p/8),1),e!=r-1&&a._currentRenderTarget&&a.unBindFramebuffer(a._currentRenderTarget)}d.dispose(),f.dispose(),u.dispose(),l.dispose()},WebGPUTextureHelper.prototype.createGPUTextureForInternalTexture=function(e,t,i,n,r){!e._hardwareTexture&&(e._hardwareTexture=new _0x157d2f),void 0===t&&(t=e.width),void 0===i&&(i=e.height),void 0===n&&(n=e.depth);var o=e._hardwareTexture,a=0!=((null!=r?r:0)&_0x333f62.TEXTURE_CREATIONFLAG_STORAGE);o.format=WebGPUTextureHelper.GetWebGPUTextureFormat(e.type,e.format,e._useSRGBBuffer),o.textureUsages=e._source===InternalTextureSource.RenderTarget||e.source===InternalTextureSource.MultiRenderTarget?_0x5213c6.TextureUsage.TextureBinding|_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.RenderAttachment:e._source===InternalTextureSource.DepthStencil?_0x5213c6.TextureUsage.TextureBinding|_0x5213c6.TextureUsage.RenderAttachment:-1,o.textureAdditionalUsages=a?_0x5213c6.TextureUsage.StorageBinding:0;var s,l=e.generateMipMaps,u=n||1;if(s=null!==e._maxLodLevel?e._maxLodLevel:e.mipmapCount>1?e.mipmapCount:l?WebGPUTextureHelper.ComputeNumMipmapLevels(t,i):1,e.isCube){var c=this.createCubeTexture({width:t,height:i},e.generateMipMaps,e.generateMipMaps,e.invertY,!1,o.format,1,this._commandEncoderForCreation,o.textureUsages,o.textureAdditionalUsages);o.set(c),o.createView({format:o.format,dimension:_0x5213c6.TextureViewDimension.Cube,mipLevelCount:s,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:6,aspect:WebGPUTextureHelper.HasDepthAndStencilAspects(o.format)?_0x5213c6.TextureAspect.DepthOnly:_0x5213c6.TextureAspect.All},a)}else{c=this.createTexture({width:t,height:i,layers:u},e.generateMipMaps,e.generateMipMaps,e.invertY,!1,e.is3D,o.format,1,this._commandEncoderForCreation,o.textureUsages,o.textureAdditionalUsages,s);o.set(c);var h=o.format;"depth24plus-stencil8"==h&&(h="depth24plus"),o.createView({format:h,dimension:e.is2DArray?_0x5213c6.TextureViewDimension.E2dArray:e.is3D?_0x5213c6.TextureDimension.E3d:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:s,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:e.is3D?1:u,aspect:WebGPUTextureHelper.HasDepthAndStencilAspects(o.format)?_0x5213c6.TextureAspect.DepthOnly:_0x5213c6.TextureAspect.All},a)}return e.width=e.baseWidth=t,e.height=e.baseHeight=i,e.depth=e.baseDepth=n,this.createMSAATexture(e,e.samples),o},WebGPUTextureHelper.prototype.createMSAATexture=function(e,t){var i=e._hardwareTexture;if((null==i?void 0:i.msaaTexture)&&(this.releaseTexture(i.msaaTexture),i.msaaTexture=null),i&&!((null!=t?t:1)<=1)){var n=e.width,r=e.height,o=e.depth||1;if(e.isCube){var a=this.createCubeTexture({width:n,height:r},!1,!1,e.invertY,!1,i.format,t,this._commandEncoderForCreation,i.textureUsages,i.textureAdditionalUsages);i.msaaTexture=a}else{a=this.createTexture({width:n,height:r,layers:o},!1,!1,e.invertY,!1,e.is3D,i.format,t,this._commandEncoderForCreation,i.textureUsages,i.textureAdditionalUsages);i.msaaTexture=a}var s=i.format;"depth24plus-stencil8"==s&&(s="depth24plus"),i.createMSAAView({format:s,dimension:e.is2DArray?_0x5213c6.TextureViewDimension.E2dArray:e.is3D?_0x5213c6.TextureDimension.E3d:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:e.is3D?1:o,aspect:WebGPUTextureHelper.HasDepthAndStencilAspects(i.format)?_0x5213c6.TextureAspect.DepthOnly:_0x5213c6.TextureAspect.All})}},WebGPUTextureHelper.prototype.updateCubeTextures=function(e,t,i,n,r,o,a,s,l){void 0===o&&(o=!1),void 0===a&&(a=!1),void 0===s&&(s=0),void 0===l&&(l=0);for(var u=[0,3,1,4,2,5],c=0;c<u.length;++c){var h=e[u[c]];this.updateTexture(h,t,i,n,1,r,c,0,o,a,s,l)}},WebGPUTextureHelper.prototype.updateTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d){void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=!1),void 0===u&&(u=!1),void 0===c&&(c=0),void 0===h&&(h=0);var f=WebGPUTextureHelper._IsInternalTexture(t)?t._hardwareTexture.underlyingResource:t,p=WebGPUTextureHelper._GetBlockInformationFromFormat(o),_=WebGPUTextureHelper._IsInternalTexture(t)?t._hardwareTexture:t,m={texture:f,origin:{x:c,y:h,z:Math.max(a,0)},mipLevel:s,premultipliedAlpha:u},g={width:Math.ceil(i/p.width)*p.width,height:Math.ceil(n/p.height)*p.height,depthOrArrayLayers:r||1};if(void 0!==e.byteLength){e=e;var x=Math.ceil(i/p.width)*p.length,y=256*Math.ceil(x/256)===x;if(o==_0x5213c6.TextureFormat.RGBA16Float&&(y=!1),y){var v=this._device.createCommandEncoder({}),$=this._bufferManager.createRawBuffer(e.byteLength,_0x5213c6.BufferUsage.MapWrite|_0x5213c6.BufferUsage.CopySrc,!0),b=$.getMappedRange();new Uint8Array(b).set(e),$.unmap(),v.copyBufferToTexture({buffer:$,offset:0,bytesPerRow:x,rowsPerImage:n},m,g),this._device.queue.submit([v.finish()]),this._bufferManager.releaseBuffer($)}else this._device.queue.writeTexture(m,e,{offset:0,bytesPerRow:x,rowsPerImage:n},g);if(l||u){if(!WebGPUTextureHelper._IsInternalTexture(t))throw"updateTexture: Can't process the texture data because a GPUTexture was provided instead of an InternalTexture!";var T=0===c&&0===h&&i===t.width&&n===t.height;this.invertYPreMultiplyAlpha(_,t.width,t.height,o,l,u,a,s,r||1,c,h,T?0:i,T?0:n,void 0,d)}}else if(e=e,l)if(m.premultipliedAlpha=!1,WebGPUTextureHelper._IsInternalTexture(t)&&0===c&&0===h&&i===t.width&&n===t.height)this._device.queue.copyExternalImageToTexture({source:e},m,g),this.invertYPreMultiplyAlpha(_,i,n,o,l,u,a,s,r||1,0,0,0,0,void 0,d);else{v=this._device.createCommandEncoder({});var C=this.createTexture({width:i,height:n,layers:1},!1,!1,!1,!1,!1,o,1,v,_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.TextureBinding);this._deferredReleaseTextures.push([C,null]),g.depthOrArrayLayers=1,this._device.queue.copyExternalImageToTexture({source:e},{texture:C},g),g.depthOrArrayLayers=r||1;this.invertYPreMultiplyAlpha(C,i,n,o,l,u,0,s,r||1,0,0,0,0,v,d),v.copyTextureToTexture({texture:C},m,g),this._device.queue.submit([v.finish()])}else this._device.queue.copyExternalImageToTexture({source:e},m,g)},WebGPUTextureHelper.prototype.readPixels=function(e,t,i,n,r,o,a,s,l,u){void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=null),void 0===u&&(u=!1);var c=WebGPUTextureHelper._GetBlockInformationFromFormat(o),h=Math.ceil(n/c.width)*c.length,d=256*Math.ceil(h/256),f=d*r,p=this._bufferManager.createRawBuffer(f,_0x5213c6.BufferUsage.MapRead|_0x5213c6.BufferUsage.CopyDst),_=this._device.createCommandEncoder({});return _.copyTextureToBuffer({texture:e,mipLevel:s,origin:{x:t,y:i,z:Math.max(a,0)}},{buffer:p,offset:0,bytesPerRow:d},{width:n,height:r,depthOrArrayLayers:1}),this._device.queue.submit([_.finish()]),this._bufferManager.readDataFromBuffer(p,f,n,r,h,d,WebGPUTextureHelper._GetTextureTypeFromFormat(o),0,l,!0,u)},WebGPUTextureHelper.prototype.releaseTexture=function(e){if(WebGPUTextureHelper._IsInternalTexture(e)){var t=e._hardwareTexture,i=e._irradianceTexture;this._deferredReleaseTextures.push([t,i])}else this._deferredReleaseTextures.push([e,null])},WebGPUTextureHelper.prototype.destroyDeferredTextures=function(){for(var e=0;e<this._deferredReleaseTextures.length;++e){var t=this._deferredReleaseTextures[e],i=t[0],n=t[1];i&&(WebGPUTextureHelper._IsHardwareTexture(i)?i.release():i.destroy()),null==n||n.dispose()}this._deferredReleaseTextures.length=0};var z$W=0;function u$R(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=e.width,n=e.height,r=e.source;e$2e(r)&&(e$2e(i)||(i=u$Z(r.videoWidth,r.width)),e$2e(n)||(n=u$Z(r.videoHeight,r.height)));var o=u$Z(e.pixelFormat,V$12.RGBA),a=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),s=o,l=V$12.isCompressedFormat(s);this._needGenerateMipmap=u$Z(e.generateMipmap,!1);var u=u$Z(e.flipY,!0),c=e.context.engine,h=R$12.toPixelFormat(o),d=R$12.toPixelType(a);this._sampler=e$2e(e.sampler)?e.sampler:new e$1S,this._samples=u$Z(e.samples,1);var f,p=R$12.toAddressMode(this._sampler.wrapS),_=R$12.toAddressMode(this._sampler.wrapT),m=R$12.toSamplerMode(a,this._sampler),g=null;if(e$2e(r))if(e$2e(r.arrayBufferView)){var x=r.arrayBufferView;!l&&u&&(x=V$12.flipY(x,o,a,i,n)),g=c.createRawTexture(x,i,n,h,this._needGenerateMipmap,!1,m,null,d,0,!1,1,this._samples),this._texture=new _0x4f1603(g),g.wrapU=p,g.wrapV=_}else if(e$2e(r.framebuffer))console.log("defined(source.framebuffer)");else if(H$13(r))u=!1,g=c.createTexture("",!this._needGenerateMipmap,u,null,m,null,null,r,null,s,"",null,null,null,null),this._texture=new _0x4f1603(g),g.wrapU=p,g.wrapV=_;else{var y=this;createImageBitmap(r).then((function(e){g=c.createTexture("",!y._needGenerateMipmap,u,null,m,null,null,e,null,s,"",null,null,null,null),y._texture=new _0x4f1603(g),g.wrapU=p,g.wrapV=_})).catch((e=>{console.log("createImageBitmap")}))}else{if(o==V$12.DEPTH_COMPONENT||o==V$12.DEPTH_COMPONENT16||o==V$12.DEPTH_COMPONENT32F||o==V$12.DEPTH_STENCIL){var v={width:i,height:n},$={generateStencil:o==V$12.DEPTH_STENCIL,bilinearFiltering:!0,isCube:!1,depthTextureFormat:h,samples:this._samples,comparisonFunction:this._sampler._comparisonFunction};g=c.createDepthStencilTexture(v,$),c._textureHelper.createGPUTextureForInternalTexture(g),this._texture=new _0x4f1603(g)}else g=c.createRawTexture(x,i,n,h,this._needGenerateMipmap,u,m,!1,d,0,!1,0,this._samples),this._texture=new _0x4f1603(g);g.wrapU=p,g.wrapV=_}f=l?V$12.compressedTextureSizeInBytes(o,i,n):V$12.textureSizeInBytes(o,a,i,n),this._id=z$W++,this._context=t,this._pixelFormat=o,this._pixelDatatype=a,this._width=i,this._height=n,this._dimensions=new o$1o(i,n),this._size=[i,n],this._mipmapTexture,this._sizeInBytes=f,this._flipY=u,t.memorySize+=f}function H$13(e){return void 0!==e.close}function t$U(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.webgpu?this._inner=new u$R(e):this._inner=new w$V(e)}u$R.fromFramebuffer=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context},Object.defineProperties(u$R.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},size:{get:function(){return this._size}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}},thinTexture:{get:function(){return this._texture}},internalTexture:{get:function(){return this._texture._texture}},GPUTexture:{get:function(){return this._texture._texture._hardwareTexture.underlyingResource}}}),u$R.prototype.copyFrom=function(e,t,i){var n=e.width,r=e.height,o=e.arrayBufferView;if(e$2e(o))this._context.engine.updateTextureData(this.internalTexture,o,t,i,n,r);else{var a=this.internalTexture,s=a._hardwareTexture;e instanceof HTMLVideoElement?this._context.engine.updateVideoTexture(a,e,!1):this._context.engine._textureHelper.updateTexture(e,a,n,r,a.depth,s.format,0,0,!0,!1,t,i)}},u$R.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){console.log("TextureGPU.prototype.copyFromFramebuffer")},u$R.prototype.copyFromTexture=function(e,t,i,n,r,o,a){var s=this._context.engine._device,l=this.GPUTexture,u=e._inner.GPUTexture,c=s.createCommandEncoder({});c.copyTextureToTexture({texture:u,origin:{x:n,y:r,z:0}},{texture:l,origin:{x:t,y:i,z:0}},{width:u.width,height:u.height,depthOrArrayLayers:1}),s.queue.submit([c.finish()])},u$R.prototype.generateMipmap=function(e){if(this._needGenerateMipmap&&e$2e(this._texture)){var t=WebGPUTextureHelper.ComputeNumMipmapLevels(this._width,this._height),i=this.GPUTexture;this._context.engine._textureHelper.generateMipmaps(i,i.format,t,0)}else this._needGenerateMipmap=!0},u$R.prototype.generateMipmapTextureByCS=function(){if(e$2e(this.thinTexture)){if(this._context.engine._currentRenderTarget){var e=this;return void this._context.engine._onAfterUnbindFrameBufferObservable.addOnce((function(){e._afterCreate(!1)}))}this._afterCreate(!1)}},u$R.prototype.generateHizDepthTextureByCS=function(){if(e$2e(this.thinTexture)){if(this._context.engine._currentRenderTarget){var e=this;return void this._context.engine._onAfterUnbindFrameBufferObservable.addOnce((function(){e._afterCreate(!0)}))}this._afterCreate(!0)}},u$R.prototype._afterCreate=function(e){var t=WebGPUTextureHelper.ComputeNumMipmapLevels(this._width,this._height),i=this.pixelFormat==V$12.DEPTH_COMPONENT||this.pixelFormat==V$12.DEPTH_STENCIL;let n=this._context.engine.createRawTexture(null,this._width,this._height,_0x333f62.TEXTUREFORMAT_RGBA,!0,this.internalTexture.invertY,this.internalTexture.samplingMode,!1,0,_0x333f62.TEXTURE_CREATIONFLAG_STORAGE,!1,t,this.internalTexture.samples);this._mipmapTexture=new _0x4f1603(n),this._context.engine._textureHelper.generateMipmapsByCS(this._texture,this._mipmapTexture,i,e,t)},u$R.prototype.isDestroyed=function(){return!1},u$R.prototype.destroy=function(){return this._context.memorySize-=this._sizeInBytes,this._texture.dispose(),i$11(this)},t$U.create=function(e){return new t$U(e)},t$U.fromFramebuffer=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=t._gl,n=u$Z(e.pixelFormat,V$12.RGB),r=u$Z(e.framebufferXOffset,0),o=u$Z(e.framebufferYOffset,0),a=u$Z(e.width,i.drawingBufferWidth),s=u$Z(e.height,i.drawingBufferHeight),l=e.framebuffer;if(!V$12.validate(n))throw new t$15("Invalid pixelFormat.");if(V$12.isDepthFormat(n)||V$12.isCompressedFormat(n))throw new t$15("pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.");if(o$1q.defined("options.context",e.context),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",r,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",o,0),r+a>i.drawingBufferWidth)throw new t$15("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(o+s>i.drawingBufferHeight)throw new t$15("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new t$U({context:t,width:a,height:s,pixelFormat:n,source:{framebuffer:e$2e(l)?l:t.defaultFramebuffer,xOffset:r,yOffset:o,width:a,height:s}})},Object.defineProperties(t$U.prototype,{id:{set:function(e){this._inner.id=e},get:function(){return this._inner.id}},sampler:{get:function(){return this._inner.sampler},set:function(e){this._inner.sampler=e}},pixelFormat:{get:function(){return this._inner.pixelFormat}},pixelDatatype:{get:function(){return this._inner.pixelDatatype}},dimensions:{get:function(){return this._inner.dimensions}},size:{get:function(){return this._inner.size}},preMultiplyAlpha:{get:function(){return this._inner.preMultiplyAlpha}},flipY:{get:function(){return this._inner.flipY}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},_target:{get:function(){return this._inner._target}},_texture:{get:function(){return this._inner._texture}}}),t$U.prototype.copyFrom=function(e,t,i){this._inner.copyFrom(e,t,i)},t$U.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){this._inner.copyFromFramebuffer(e,t,i,n,r,o)},t$U.prototype.copyFromTexture=function(e,t,i,n,r,o,a){this._inner.copyFromTexture(e,t,i,n,r,o,a)},t$U.prototype.generateMipmap=function(e){this._inner.generateMipmap(e)},t$U.prototype.isDestroyed=function(){return!1},t$U.prototype.destroy=function(){return this._inner.destroy(),i$11(this)};var E$16={NORMAL:0,REFLECT:1,DEPTH:2,NORMAL_AND_DEPTH:3,POSTEFFECT_FILTER:4,RASTER:5,CLAMP:6,PICKRECT:7,SQRESULT:8},Qe$c=Object.freeze(E$16),E$15={RGBA4:de$y.RGBA4,RGBA8:de$y.RGBA8,RGBA16F:de$y.RGBA16F,RGBA32F:de$y.RGBA32F,RGB5_A1:de$y.RGB5_A1,RGB565:de$y.RGB565,DEPTH_COMPONENT16:de$y.DEPTH_COMPONENT16,STENCIL_INDEX8:de$y.STENCIL_INDEX8,DEPTH_STENCIL:de$y.DEPTH_STENCIL,DEPTH24_STENCIL8:de$y.DEPTH24_STENCIL8,validate:function(e){return e===E$15.RGBA4||e===E$15.RGBA8||e===E$15.RGBA16F||e===E$15.RGBA32F||e===E$15.RGB5_A1||e===E$15.RGB565||e===E$15.DEPTH_COMPONENT16||e===E$15.STENCIL_INDEX8||e===E$15.DEPTH_STENCIL||e===E$15.DEPTH24_STENCIL8},getColorFormat:function(e){return e===de$y.FLOAT?E$15.RGBA32F:e===de$y.HALF_FLOAT_OES?E$15.RGBA16F:E$15.RGBA8}},M$13=Object.freeze(E$15);function o$19(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=t._gl,n=e$1W.maximumRenderbufferSize,r=u$Z(e.format,M$13.RGBA4),o=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),a=e$2e(e.width)?e.width:i.drawingBufferWidth,s=e$2e(e.height)?e.height:i.drawingBufferHeight,l=!1,u=u$Z(e.samples,0);u>0&&t.webgl2&&(l=!0);var c=G$1c(t,r,o);if(!M$13.validate(r))throw new t$15("Invalid format.");if(o$1q.typeOf.number.greaterThan("width",a,0),a>n)throw new t$15("Width must be less than or equal to the maximum renderbuffer size ("+n+"). Check maximumRenderbufferSize.");if(o$1q.typeOf.number.greaterThan("height",s,0),s>n)throw new t$15("Height must be less than or equal to the maximum renderbuffer size ("+n+"). Check maximumRenderbufferSize.");this._gl=i,this._format=r,this._width=a,this._height=s,this._renderbuffer=this._gl.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,this._renderbuffer),l?i.renderbufferStorageMultisample(i.RENDERBUFFER,u,c,a,s):i.renderbufferStorage(i.RENDERBUFFER,c,a,s),i.bindRenderbuffer(i.RENDERBUFFER,null)}function G$1c(e,t,i){if(!e.webgl2)return t;var n=t;return t===de$y.RED&&(i===de$y.FLOAT&&(n=de$y.R32F),i===de$y.HALF_FLOAT&&(n=de$y.R16F),i===de$y.UNSIGNED_BYTE&&(n=de$y.R8)),t===de$y.RGB&&(i===de$y.FLOAT&&(n=de$y.RGB32F),i===de$y.HALF_FLOAT&&(n=de$y.RGB16F),i===de$y.UNSIGNED_BYTE&&(n=de$y.RGB8)),t===de$y.RGBA&&(i===de$y.FLOAT&&(n=de$y.RGBA32F),i===de$y.HALF_FLOAT&&(n=de$y.RGBA16F),i===de$y.UNSIGNED_BYTE&&(n=de$y.RGBA8)),n===de$y.R16F||n===de$y.R32F||n===de$y.RGBA16F||n===de$y.RGBA32F?e.colorBufferFloat:(n===de$y.RGB16F||n===de$y.RGB32F)&&console.warn("WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),n===de$y.DEPTH_STENCIL?n=de$y.DEPTH24_STENCIL8:n===de$y.DEPTH_COMPONENT&&(i===de$y.UNSIGNED_SHORT?n=de$y.DEPTH_COMPONENT16:i===de$y.UNSIGNED_INT&&(n=de$y.DEPTH_COMPONENT24)),n}function r$11(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=e$1W.maximumRenderbufferSize,n=u$Z(e.format,M$13.RGBA4);u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE);var r=e$2e(e.width)?e.width:t.drawingBufferWidth,o=e$2e(e.height)?e.height:t.drawingBufferHeight;if(u$Z(e.samples,0)>0&&t.webgl2,!M$13.validate(n))throw new t$15("Invalid format.");if(o$1q.typeOf.number.greaterThan("width",r,0),r>i)throw new t$15("Width must be less than or equal to the maximum renderbuffer size ("+i+"). Check maximumRenderbufferSize.");if(o$1q.typeOf.number.greaterThan("height",o,0),o>i)throw new t$15("Height must be less than or equal to the maximum renderbuffer size ("+i+"). Check maximumRenderbufferSize.");this._format=n,this._width=r,this._height=o}function r$10(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.webgpu?this._inner=new r$11(e):this._inner=new o$19(e)}Object.defineProperties(o$19.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),o$19.prototype._getRenderbuffer=function(){return this._renderbuffer},o$19.prototype.isDestroyed=function(){return!1},o$19.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),i$11(this)},Object.defineProperties(r$11.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),r$11.prototype._getRenderbuffer=function(){return null},r$11.prototype.isDestroyed=function(){return!1},r$11.prototype.destroy=function(){return i$11(this)},Object.defineProperties(r$10.prototype,{format:{get:function(){return this._inner.format}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}}}),r$10.prototype._getRenderbuffer=function(){return this._inner._getRenderbuffer()},r$10.prototype.isDestroyed=function(){return!1},r$10.prototype.destroy=function(){return this._inner.destroy(),i$11(this)};var v$O="uniform sampler2D u_depthTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n gl_FragColor = czm_packDepth(texture2D(u_depthTexture, v_textureCoordinates).r);\n}\n",C$15="varying v_textureCoordinates : vec2<f32>;\nvar u_depthTexture : texture_depth_2d;\nvar u_depthTextureSampler : sampler;\nfn packDepth(depth : f32) -> vec4<f32> {\n var enc : vec4<f32> = (vec4<f32>(1.0, 255.0, 65025.0, 16581375.0) * depth);\n enc = fract(enc);\n enc = (enc - (vec4<f32>(enc.y, enc.z, enc.w, enc.w) * vec4<f32>(0.003921569, 0.003921569, 0.003921569, 0.0)));\n return enc;\n}\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n gl_FragColor = packDepth(textureSample(u_depthTexture, u_depthTextureSampler, v_textureCoordinates));\n}\n";function s$U(e){this._depthTexture=void 0,this._framebuffer=void 0,this._copyDepthCommand=void 0,this._viewport=new f$1a,this._rs=void 0,this._passState=new n$$(e),this._passState.viewport=this._viewport,this._context=e,this._isUpdate=!1,this._beginFunc=void 0,this._endFunc=void 0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!1,isUnderGlobeVisible:!1},this._depthTextureToCopy=void 0,this._manualDepth=!0;var t=new n$$(e);t.blendingEnabled=!1,t.viewport=new f$1a,this._passState=t}function S$U(e,t,i,n,r){(!e$2e(e._framebuffer)||e.width!==n||e.height!==r)&&(e.width=n,e.height=r,e._depthTexture=e._depthTexture&&e._depthTexture.destroy(),e._depthTexture=new t$U({context:t,width:n,height:r,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._framebuffer=new t$V({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1}),t.depthTexture||(e._depthTextureCopyFrom=e._depthTextureCopyFrom&&e._depthTextureCopyFrom.destroy(),e._depthTextureCopyFrom=new t$U({context:t,width:n,height:r,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),e._framebufferCopyFrom=e._framebufferCopyFrom&&e._framebufferCopyFrom.destroy(),e._framebufferCopyFrom=new t$V({context:t,colorTextures:[e._depthTextureCopyFrom],depthStencilRenderbuffer:new r$10({context:t,width:n,height:r,format:M$13.DEPTH_STENCIL}),destroyAttachments:!1})))}function P$$(e,t,i,n){if(e._viewport.width=i,e._viewport.height=n,(!e$2e(e._rs)||!f$1a.equals(e._viewport,e._rs.viewport))&&(e._rs=d$1m.fromCache({viewport:e._viewport})),t.depthTexture)e$2e(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(t.webgpu?C$15:v$O,{shaderProgramName:"depthFramebufferCopyDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e._depthTextureToCopy}},owner:e}));else{e._copyDepthCommand=t.createViewportQuadCommand("uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",{renderState:d$1m.fromCache(),uniformMap:{u_texture:function(){return e._depthTextureToCopy}},owner:e})}e$2e(e._clearCommand)||(e._clearCommand=new t$W({color:new e$1X(0,0,0,0),stencil:0,owner:e})),e._copyDepthCommand.renderState=e._rs,e._clearCommand.framebuffer=e._framebuffer,e._copyDepthCommand.framebuffer=e._framebuffer}Object.defineProperties(s$U.prototype,{framebuffer:{get:function(){return this._framebuffer}},depthTexture:{get:function(){return this._depthTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isManualDepth:{get:function(){return this._manualDepth},set:function(e){this._manualDepth!==e&&(this._manualDepth=e,this._isUpdate=!0)}},useType:{get:function(){return 1},set:function(e){}},frameBufferType:{get:function(){return Qe$c.DEPTH}}}),s$U.prototype.begin=function(e){var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._passState.viewport.width=i,this._passState.viewport.height=n,S$U(this,t,e,i,n),P$$(this,t,i,n),this._beginFunc&&this._beginFunc(e),t.depthTexture||(e.passes.depth=!0,e.passes.pick=!0,this._passState.framebuffer=this._framebufferCopyFrom),this._passState},s$U.prototype.end=function(e){e.context.depthTexture||(e.passes.depth=!1,e.passes.pick=!1),this._endFunc&&this._endFunc(e)},s$U.prototype.update=function(e,t,i){this._depthTextureToCopy=e.depthTexture?i.depthStencilTexture:this._depthTextureCopyFrom,e$2e(this._clearCommand)&&this._clearCommand.execute(e,t),e$2e(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t)},s$U.prototype.destroy=function(){return this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._depthTextureCopyFrom=this._depthTextureCopyFrom&&this._depthTextureCopyFrom.destroy(),this._framebufferCopyFrom=this._framebufferCopyFrom&&this._framebufferCopyFrom.destroy(),e$2e(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),this._depthTextureToCopy=void 0,i$11(this)},s$U.prototype.isDestroyed=function(){return!1};var e$1R={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3,getMorphTime:function(e){return e===e$1R.SCENE3D?1:e===e$1R.MORPHING?void 0:0}},C$14=Object.freeze(e$1R);function p$$(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.url",e.url);var t=e.url,i=e.responseType,n=u$Z(e.method,"GET"),r=e.data,o=e.headers,a=e.overrideMimeType;t=u$Z(t,e.url);var s=e$2e(e.request)?e.request:new r$1c;return s.url=t,s.requestFunction=function(e){var l=o$1l.defer(),u=p$$.load(u$Z(e,t),i,n,r,o,l,a);return e$2e(u)&&e$2e(u.abort)&&(s.cancelFunction=function(){u.abort()}),l.promise},r$1b.request(s)}var j$18=/^data:(.*?)(;base64)?,(.*)$/;function h$10(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function b$18(e,t){for(var i=h$10(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return n}function C$13(e,t){t=u$Z(t,"");var i=e[1],n=!!e[2],r=e[3];switch(t){case"":case"text":return h$10(n,r);case"arraybuffer":return b$18(n,r);case"blob":var o=b$18(n,r);return new Blob([o],{type:i});case"document":return(new DOMParser).parseFromString(h$10(n,r),i);case"json":return JSON.parse(h$10(n,r));default:throw new t$15("Unhandled responseType: "+t)}}function u$Q(e,t,i){return p$$({url:e,headers:t,request:i})}p$$.load=function(e,t,i,n,r,o,a){var s=j$18.exec(e);if(null===s){var l=new XMLHttpRequest;if(u$W.contains(e)&&(l.withCredentials=!0),e$2e(a)&&e$2e(l.overrideMimeType)&&l.overrideMimeType(a),l.open(i,e,!0),e$2e(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);e$2e(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,i=l.responseType;if(!e$2e(e)||e$2e(t)&&i!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===i||"document"===i)&&e$2e(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==i&&"text"!==i||!e$2e(l.responseText)?o.reject(new t$13("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new s$$(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new s$$)},l.send(n),l}o.resolve(C$13(s,t))},p$$.defaultLoad=p$$.load;var i$Y={Accept:"application/json,*/*;q=0.01"};function u$P(e,t,i){if(!e$2e(e))throw new t$15("url is required.");e$2e(t)?e$2e(t.Accept)||((t=l$1f(t)).Accept=i$Y.Accept):t=i$Y;var n=u$Q(e,t,i);if(e$2e(n))return n.then((function(e){return JSON.parse(e)}))}var ISERVER_BASIC=!1;function LicenseChecker(){this.urlMap=Object.create(null),this.pendingRequest=Object.create(null)}LicenseChecker.functionMap=Object.freeze({ViewShed3D:"可视域分析",SpatialQuery3D:"空间查询",ShadowQueryPoints:"阴影分析",Sightline:"通视分析",Skyline:"天际线分析",ViewDome:"开敞度分析",DirectionalLight:"平行光源",ParticleSystem:"粒子系统",Profile:"剖面分析",SpotLight:"聚光源",PointLight:"点光源",Scene_bloomEffect:"泛光",Scene_hdrEnabled:"HDR开关",Scene_scanEffect:"扫描线",Scene_addLightSource:"添加光源",S3MTilesLayer_hypsometricSetting:"分层设色",DynamicLayer3D:"动态图层",Globe_SlopeSetting:"地形坡度坡向",Globe_setPBRMaterial:"地形PBR材质",CloudBox:"云层",SkyBox:"天空盒",S3MTilesLayer_setPBRMaterial:"PBR材质",ProjectionImage:"视频投放"}),LicenseChecker.prototype.getLicense=function(e){var t,i=o$1l.defer();if(!e$2e(e)||0===e.length)return i.resolve(null),i.promise;if(-1==e.indexOf("http")&&(e=window.location.href.substring(0,window.location.href.indexOf(e))+e),e=new URL(e),t=-1!==e.href.indexOf("/iserver")?e.href.substring(0,e.href.indexOf("/iserver")+8):-1!==e.href.indexOf("/services/")?e.href.substring(0,e.href.indexOf("/services/")):e.origin,e$2e(this.urlMap[t]))return i.resolve(this.urlMap[t]),i.promise;if(e$2e(this.pendingRequest[t]))return i.reject(null),i.promise;var n=t+"/manager/license.json",r=this;return r.pendingRequest[t]=!0,u$P(n).then((function(n){r.urlMap[e]=n,delete r.pendingRequest[t],i.resolve(n)})).otherwise((function(){i.reject(null)})),i.promise},LicenseChecker.prototype.check=function(e){e$2e(e)&&(!0!==e.iServerBasic&&!0!==e.iServerBasicSpace||(e$2e(e.productType)?"iServerBasic"===e.productType&&(ISERVER_BASIC=!0):ISERVER_BASIC=!0))},LicenseChecker.prototype.isBasciServer=function(){return ISERVER_BASIC},LicenseChecker.prototype.verify=function(e){if(ISERVER_BASIC)throw e="iServerBasic版本,"+LicenseChecker.functionMap[e]+"不可用",console.warn(e),new t$15(e)},LicenseChecker.LICENSECHECKER=new LicenseChecker;var _0x23ea03=(_0x229541=!0,function(e,t){var i=_0x229541?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x229541=!1,i}),_0x2e32eb=_0x23ea03(void 0,(function(){return _0x2e32eb.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e32eb).search("(((.+)+)+)+$")})),_0x229541;function _0x3c54f4(e){if(!e$2e(e))throw new t$15("scene are required.");if(!e.context.depthTexture)throw new t$15("the depth buffer is not supported.");this._scene=e,this._depthBuffer=void 0,this._depthDownBuffer=void 0,this._depthDownReverBuffer=void 0,this._depthLeftBuffer=void 0,this._depthLeftReverBuffer=void 0,this._depthTopBuffer=void 0,this._depthValue=void 0,this._dataBuffer=void 0,this._frameState=void 0,this._textureWidth=1024,this._textureHeight=1024,this._startPoint3D=[0,0,0],this._endPoint3D=[0,0,0],this._extendHeight=0,this._bManualChangeExtendHeight=!1,this._v3ProfileDir=new o$1p(0,0,0),this._v3MiddlePosition=new o$1p(0,0,0),this._v3ProfileNormal=new o$1p(0,0,0),this._viewMatrix=new p$1d,this._projMatrix=new p$1d,this._update=!0,this._visibleViewport=4095,this._id=0,this._name="",this._downName="",this._downReverName="",this._leftName="",this._leftReverName="",this._topName="",this._func=void 0,this._isGetPositions=!1,this._positions=[]}function _0x5bf48f(e,t,i){var n=i.camera._projection,r=.5*(e.startPoint[2]+e.endPoint[2]),o=new o$1p;if(o.x=.5*(e.endPoint[0]-e.startPoint[0])+e.startPoint[0],o.y=.5*(e.endPoint[1]-e.startPoint[1])+e.startPoint[1],o.z=r,e._scene.mode===C$14.SCENE3D){var a=o$1p.fromDegreesArrayHeights([e.startPoint[0],e.startPoint[1],r])[0],s=o$1p.fromDegreesArrayHeights([e.endPoint[0],e.endPoint[1],r])[0];o$1p.subtract(s,a,e._v3ProfileDir),e._v3MiddlePosition=o$1p.fromDegreesArrayHeights([o.x,o.y,r])[0];var l=new o$1p;e._v3MiddlePosition.clone(l),o$1p.normalize(l,l)}else{a=n.project(a$18.fromDegrees(e.startPoint[0],e.startPoint[1],e.startPoint[2]),new o$1p),s=n.project(a$18.fromDegrees(e.endPoint[0],e.endPoint[1],e.startPoint[2]),new o$1p);o$1p.subtract(s,a,e._v3ProfileDir);var u=a$18.fromDegrees(o.x,o.y,r);e._v3MiddlePosition=n.project(u,new o$1p),e._oriPos=n.project(a$18.fromDegrees(o.x,o.y,-6378137),new o$1p);l=new o$1p;o$1p.subtract(e._v3MiddlePosition,e._oriPos,l),o$1p.normalize(l,l)}var c=new o$1p;e._v3ProfileDir.clone(c),o$1p.normalize(c,c),o$1p.cross(c,l,e._v3ProfileNormal),o$1p.normalize(e._v3ProfileNormal,e._v3ProfileNormal)}function _0x41a8f5(e,t,i){e._textureWidth=t.drawingBufferWidth,e._textureHeight=t.drawingBufferHeight,e._textureWidth=e._textureWidth<=1?1:e._textureWidth,e._textureHeight=e._textureHeight<=1?1:e._textureHeight;var n=e._textureWidth*e._textureHeight;e._depthValue=new Float32Array(n),e._dataBuffer=new Uint8Array(4*n);for(var r=0;r<n;r++)e._depthValue[r]=1,e._dataBuffer[4*r]=0,e._dataBuffer[4*r+1]=0,e._dataBuffer[4*r+2]=0,e._dataBuffer[4*r+3]=255}function _0x2de012(e,t){var i=t.depthData,n=t.viewProjection,r=t.invViewProjection;p$1d.multiply(e._projMatrix,e._viewMatrix,n);for(var o=new e$2c,a=new e$2c(1,1/255,1/65025,1/160581375),s=t.currentFrustum.x,l=t.currentFrustum.y,u=0;u<e._textureHeight;u++)for(var c=0;c<e._textureWidth;c++){var h=u*e._textureWidth+c,d=e$2c.unpack(i,4*h,o);e$2c.divideByScalar(d,255,d);var f=e$2c.dot(d,a);if(!(f<=0)){if(e._scene.frameState.useLogDepth){var p=f*t.log2FarDepthFromNearPlusOne;f=l*(1-s/(Math.pow(2,p)-1+s))/(l-s)}o.x=c/e._textureWidth*2-1,o.y=u/e._textureHeight*2-1,t.useWebGPU?o.z=f:o.z=2*f-1,o.w=1,p$1d.multiplyByVector(r,o,o),e$2c.divideByScalar(o,o.w,o);var _=new o$1p(o.x,o.y,o.z);p$1d.multiplyByVector(n,o,o),e$2c.divideByScalar(o,o.w,o),o.x=.5*o.x+.5,o.y=.5*o.y+.5;var m=Math.round(o.x*e._textureWidth),g=Math.round(o.y*e._textureHeight);if(m>=0&&m<e._textureWidth&&g>=0&&g<e._textureHeight){var x=o.z;if(x<=1&&x>=-1){var y=m+(e._textureHeight-g)*e._textureWidth;e._dataBuffer[4*y]=0,e._dataBuffer[4*y+1]=255,e._dataBuffer[4*y+2]=255,e._dataBuffer[4*y+3]=255;var v=e._depthValue[y];e._depthValue[y]=x<v?x:v,e._isGetPositions&&e._positions.push(_)}}}}}function _0x1834e4(e){for(var t=1;t<e._textureHeight-1;t++)for(var i=1;i<e._textureWidth-1;i++){var n=t*e._textureWidth+i,r=e._dataBuffer[4*n+1],o=e._dataBuffer[4*(n-e._textureWidth)+1],a=e._dataBuffer[4*(n+e._textureWidth)+1],s=e._dataBuffer[4*(n-e._textureWidth-1)+1],l=e._dataBuffer[4*(n+e._textureWidth+1)+1],u=e._dataBuffer[4*(n-e._textureWidth+1)+1],c=e._dataBuffer[4*(n+e._textureWidth-1)+1],h=e._dataBuffer[4*(n-1)+1],d=e._dataBuffer[4*(n+1)+1];if(0==r&&(255==o&&255==a||255==s&&255==l||255==u&&255==c||255==h&&255==d)){e._dataBuffer[4*n]=0,e._dataBuffer[4*n+1]=255,e._dataBuffer[4*n+2]=255,e._dataBuffer[4*n+3]=255;for(var f=-1;f<=1;f++)for(var p=-1;p<=1;p++)n+f*e._textureWidth+p>0&&(e._dataBuffer[4*(n+f*e._textureWidth+p)]=0,e._dataBuffer[4*(n+f*e._textureWidth+p)+1]=255,e._dataBuffer[4*(n+f*e._textureWidth+p)+2]=255,e._dataBuffer[4*(n+f*e._textureWidth+p)+3]=255)}}for(t=1;t<e._textureHeight-1;t++)for(i=1;i<e._textureWidth-1;i++){n=t*e._textureWidth+i,r=e._dataBuffer[4*n+1],o=e._dataBuffer[4*(n-e._textureWidth)+1],a=e._dataBuffer[4*(n+e._textureWidth)+1],s=e._dataBuffer[4*(n-e._textureWidth-1)+1],l=e._dataBuffer[4*(n+e._textureWidth+1)+1],u=e._dataBuffer[4*(n-e._textureWidth+1)+1],c=e._dataBuffer[4*(n+e._textureWidth-1)+1],h=e._dataBuffer[4*(n-1)+1],d=e._dataBuffer[4*(n+1)+1];if(r<255){var _=(u+l+s+c)/9+(o+h+d+a)/9+r/9;_=Math.round(_),e._dataBuffer[4*n]=0,e._dataBuffer[4*n+1]=_,e._dataBuffer[4*n+2]=_,e._dataBuffer[4*n+3]=255}}}function _0x10bd10(e,t,i,n){var r=e._scene,o=45*e$2d.RADIANS_PER_DEGREE,a=.5*o$1p.magnitude(e._v3ProfileDir),s=e._extendHeight,l=new o$1p;e._v3ProfileNormal.clone(l),o$1p.multiplyByScalar(l,a,l);var u=new o$1p;if(t.downOblique&&!t.leftOblique)o$1p.UNIT_Z.clone(u),t.secondDrawing?o$1p.subtract(e._v3MiddlePosition,l,u):o$1p.add(e._v3MiddlePosition,l,u),_0x7ba088(e,u,u),o$1p.multiplyByScalar(u,a*Math.tan(o),u),o$1p.add(l,u,u),t.secondDrawing&&o$1p.negate(u,u);else if(t.leftOblique&&!t.downOblique)e._v3ProfileDir.clone(u),o$1p.normalize(u,u),o$1p.multiplyByScalar(u,a*Math.tan(o),u),o$1p.add(l,u,u),t.secondDrawing||o$1p.negate(u,u);else if(t.leftOblique||t.downOblique){var c=new o$1p;_0x7ba088(e,e._v3MiddlePosition,c),o$1p.multiplyByScalar(c,.5*s,u)}else l.clone(u);var h=new o$1p;o$1p.add(e._v3MiddlePosition,u,h);var d=new o$1p;o$1p.subtract(e._v3MiddlePosition,h,d);var f=o$1p.magnitude(d),p=f-t.cameraWidth,_=f+t.cameraWidth;o$1p.normalize(d,d);var m=d.clone(),g=new o$1p;e._v3ProfileDir.clone(g),o$1p.negate(g,g);var x=new o$1p;o$1p.cross(m,g,x),x=o$1p.normalize(x,x),t.downOblique&&t.leftOblique&&(p=.5,_=s),p=p<.5?.5:p;var y=n.camera,v=y.frustum.near,$=y.frustum.far,b=y.frustum.fov,T=new o$1p,C=y.heading,S=y.pitch,w=y.frustum.aspectRatio,E=[],P=r.globe.showSkirts,A=r.globe.backFaceCulling;o$1p.clone(y.position,T),t.depthBuffer.isUpdate=!0,t.depthBuffer._beginFunc=function(){if((e._textureWidth!=i.drawingBufferWidth||e._textureHeight!=i.drawingBufferHeight)&&_0x41a8f5(e,i),v=y.frustum.near,$=y.frustum.far,b=y.frustum.fov,C=y.heading,S=y.pitch,w=y.frustum.aspectRatio,o$1p.clone(y.position,T),y.frustum.near=p,y.frustum.far=_,y.frustum.fov=90*e$2d.RADIANS_PER_DEGREE,y.frustum.aspectRatio=e._textureWidth/e._textureHeight,y.setView({destination:h,orientation:{direction:m,up:x},convert:!1}),!t.downOblique&&!t.leftOblique){var n=i.relativeOrigin,o=new o$1p;o$1p.subtract(y.positionWC,n,o);var a=new p$1d;p$1d.clone(y.inverseViewMatrix,a),p$1d.setTranslation(a,o,a),p$1d.inverse(a,e._viewMatrix),p$1d.clone(y.frustum.projectionMatrix,e._projMatrix)}for(var s=0;s<r.layers._layerQueue.length;s++){var l=r.layers._layerQueue[s];E[s]=l.clipLineColor,l.clipLineColor=new e$1X(1,1,1,1),l.setCustomClipBox(t.clipOptions)}r.globe.showSkirts=!1,r.globe.backFaceCulling=!1,r.globe.setCustomClipBox(t.clipOptions)},t.depthBuffer._endFunc=function(){if(t.downOblique||t.leftOblique){var n=i.uniformState,o=p$1d.clone(n.inverseViewProjection),a=p$1d.clone(n.viewProjection),s=o$1o.clone(n.currentFrustum),l=n.log2FarDepthFromNearPlusOne;i.readPixelsAsync({framebuffer:t.depthBuffer.framebuffer}).then((n=>{var r={invViewProjection:o,viewProjection:a,currentFrustum:s,log2FarDepthFromNearPlusOne:l,depthData:n,useWebGPU:i.webgpu};_0x2de012(e,r),t.leftOblique&&t.downOblique&&(_0x1834e4(e),!e._isGetPositions&&e._func(e._dataBuffer),e._isGetPositions&&e._getPositionsFunc(e._positions))}))}y.setView({destination:T,orientation:{heading:C,pitch:S,roll:y.roll},convert:!1}),y.frustum.near=v,y.frustum.far=$,y.frustum.fov=b,y.frustum.aspectRatio=w,t.depthBuffer.isUpdate=!1;for(var u=0;u<r.layers._layerQueue.length;u++){var c=r.layers._layerQueue[u];c.clipLineColor=E[u],c.clearCustomClipBox()}r.globe.clearCustomClipBox(),r.globe.showSkirts=P,r.globe.backFaceCulling=A}}function _0x7ba088(e,t,i){return e._scene.mode===C$14.SCENE3D?o$1p.normalize(t,i):(o$1p.subtract(t,e._oriPos,i),o$1p.normalize(i,i)),i}function _0x4a8812(e){var t=e.x;e.x=e.z,e.z=e.y,e.y=t}function _0x511e27(e,t,i){_0x5bf48f(e,t,i),_0x41a8f5(e,t);var n=o$1p.magnitude(e._v3ProfileDir);e._bManualChangeExtendHeight||(e._extendHeight=n);var r=e._extendHeight,o=Math.sqrt(2),a=n/e._textureWidth*o;a<.1&&(a=.1);var s=new o$1p;s.x=.5*(e.startPoint[0]+e.endPoint[0]),s.y=.5*(e.startPoint[1]+e.endPoint[1]),s.z=.5*(e.startPoint[2]+e.endPoint[2]);var l=[],u=[],c=new o$1p,h=e._v3ProfileNormal.clone(),d=o$1p.negate(h,new o$1p);u.push(d),o$1p.multiplyByScalar(e._v3ProfileNormal,a,c),o$1p.add(e._v3MiddlePosition,c,c),o$1p.subtract(c,t._relativeOrigin,c),l.push(c);var f=e._v3ProfileNormal.clone();f=o$1p.negate(f,f),d=o$1p.negate(f,new o$1p),u.push(d);var p=new o$1p;o$1p.multiplyByScalar(f,a,p),o$1p.add(e._v3MiddlePosition,p,p),o$1p.subtract(p,t._relativeOrigin,p),l.push(p),e._scene.mode!==C$14.SCENE3D&&(_0x4a8812(h),_0x4a8812(f),_0x4a8812(c),_0x4a8812(p));var _={planePos:l,planeNormal:u,clipMode:"clip_behind_any_plane"};_0x10bd10(e,{downOblique:!1,leftOblique:!1,secondDrawing:!1,cameraWidth:10*a,depthBuffer:e._depthBuffer,clipOptions:_},t,i);var m=(a+.5*r)/o;_0x10bd10(e,{downOblique:!0,leftOblique:!1,secondDrawing:!1,cameraWidth:m,depthBuffer:e._depthDownBuffer,clipOptions:_},t,i),_0x10bd10(e,{downOblique:!0,leftOblique:!1,secondDrawing:!0,cameraWidth:m,depthBuffer:e._depthDownReverBuffer,clipOptions:_},t,i),_0x10bd10(e,{downOblique:!1,leftOblique:!0,secondDrawing:!1,cameraWidth:m=(a+.5*n)/o,depthBuffer:e._depthLeftBuffer,clipOptions:_},t,i),_0x10bd10(e,{downOblique:!1,leftOblique:!0,secondDrawing:!0,cameraWidth:m,depthBuffer:e._depthLeftReverBuffer,clipOptions:_},t,i),_0x10bd10(e,{downOblique:!0,leftOblique:!0,secondDrawing:!1,cameraWidth:a,depthBuffer:e._depthTopBuffer,clipOptions:_},t,i)}function e$1Q(){this._array=[],this._hash={}}function f$Z(){this._bounds=new e$2c,this._command=void 0,this._geometry=void 0,this.heightBuffer=void 0,this.colorBuffer=void 0}_0x2e32eb(),Object.defineProperties(_0x3c54f4.prototype,{startPoint:{get:function(){return this._startPoint3D},set:function(e){this._startPoint3D=e,this._update=!0}},endPoint:{get:function(){return this._endPoint3D},set:function(e){this._endPoint3D=e,this._update=!0}},extendHeight:{get:function(){return this._extendHeight},set:function(e){this._extendHeight=e,this._bManualChangeExtendHeight=!0,this._update=!0}}}),_0x3c54f4.prototype.getPositions=function(e){this._positions=[],this._isGetPositions=!0,this._getPositionsFunc=function(t){e(t),this._isGetPositions=!1},this._update=!0},_0x3c54f4.prototype.update=function(e,t,i){LicenseChecker.LICENSECHECKER.verify("Profile"),!t._fboState.enabled&&this._update&&(this._frameState=t,e$2e(this._depthBuffer)||(this._depthBuffer=new s$U(e),this._depthBuffer.environmentVisible.isObjectVisible=!0,this._depthBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthBuffer.environmentVisible.isGlobalVisible=!0,this._depthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._name]=this._depthBuffer),e$2e(this._depthDownBuffer)||(this._depthDownBuffer=new s$U(e),this._depthDownBuffer.environmentVisible.isObjectVisible=!0,this._depthDownBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthDownBuffer.environmentVisible.isGlobalVisible=!0,this._depthDownBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._downName]=this._depthDownBuffer),e$2e(this._depthDownReverBuffer)||(this._depthDownReverBuffer=new s$U(e),this._depthDownReverBuffer.environmentVisible.isObjectVisible=!0,this._depthDownReverBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthDownReverBuffer.environmentVisible.isGlobalVisible=!0,this._depthDownReverBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._downReverName]=this._depthDownReverBuffer),e$2e(this._depthLeftBuffer)||(this._depthLeftBuffer=new s$U(e),this._depthLeftBuffer.environmentVisible.isObjectVisible=!0,this._depthLeftBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthLeftBuffer.environmentVisible.isGlobalVisible=!0,this._depthLeftBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._leftName]=this._depthLeftBuffer),e$2e(this._depthLeftReverBuffer)||(this._depthLeftReverBuffer=new s$U(e,this._scene.farToNearRatio),this._depthLeftReverBuffer.environmentVisible.isObjectVisible=!0,this._depthLeftReverBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthLeftReverBuffer.environmentVisible.isGlobalVisible=!0,this._depthLeftReverBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._leftReverName]=this._depthLeftReverBuffer),e$2e(this._depthTopBuffer)||(this._depthTopBuffer=new s$U(e),this._depthTopBuffer.environmentVisible.isObjectVisible=!0,this._depthTopBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthTopBuffer.environmentVisible.isGlobalVisible=!0,this._depthTopBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._topName]=this._depthTopBuffer),this._update=!1,_0x511e27(this,e,t))},_0x3c54f4.prototype.getBuffer=function(e){this._func=e},_0x3c54f4.prototype.build=function(){""===this._name&&(this._name="profile"+this._scene._analyst3D._layerIndex,this._downName=this._name+"_down",this._downReverName=this._name+"_downRever",this._leftName=this._name+"_left",this._leftReverName=this._name+"_leftRever",this._topName=this._name+"_top",this._scene._analyst3D.add(this))},_0x3c54f4.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,e$2e(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport),e$2e(this._depthDownBuffer)&&(this._depthDownBuffer._visibleViewport=this._visibleViewport),e$2e(this._depthDownReverBuffer)&&(this._depthDownReverBuffer._visibleViewport=this._visibleViewport),e$2e(this._depthLeftBuffer)&&(this._depthLeftBuffer._visibleViewport=this._visibleViewport),e$2e(this._depthLeftReverBuffer)&&(this._depthLeftReverBuffer._visibleViewport=this._visibleViewport),e$2e(this._depthTopBuffer)&&(this._depthTopBuffer._visibleViewport=this._visibleViewport)},_0x3c54f4.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0x3c54f4.prototype.destroy=function(){return e$2e(this._frameState)&&(e$2e(this._depthBuffer)&&delete this._frameState._framebufferList[this._name],e$2e(this._depthDownBuffer)&&delete this._frameState._framebufferList[this._downName],e$2e(this._depthDownReverBuffer)&&delete this._frameState._framebufferList[this._downReverName],e$2e(this._depthLeftBuffer)&&delete this._frameState._framebufferList[this._leftName],e$2e(this._depthLeftReverBuffer)&&delete this._frameState._framebufferList[this._leftReverName],e$2e(this._depthTopBuffer)&&delete this._frameState._framebufferList[this._topName],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),this._depthDownBuffer=this._depthDownBuffer&&this._depthDownBuffer.destroy(),this._depthDownReverBuffer=this._depthDownReverBuffer&&this._depthDownReverBuffer.destroy(),this._depthLeftBuffer=this._depthLeftBuffer&&this._depthLeftBuffer.destroy(),this._depthLeftReverBuffer=this._depthLeftReverBuffer&&this._depthLeftReverBuffer.destroy(),this._depthTopBuffer=this._depthTopBuffer&&this._depthTopBuffer.destroy(),this._depthValue=null,this._dataBuffer=null,this._func=void 0,this._scene._analyst3D.remove(this._name,!0),i$11(this)},Object.defineProperties(e$1Q.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}}),e$1Q.prototype.contains=function(e){if("string"!=typeof e&&"number"!=typeof e)throw new t$15("key is required to be a string or number.");return e$2e(this._hash[e])},e$1Q.prototype.set=function(e,t){if("string"!=typeof e&&"number"!=typeof e)throw new t$15("key is required to be a string or number.");t!==this._hash[e]&&(this.remove(e),this._hash[e]=t,this._array.push(t))},e$1Q.prototype.get=function(e){if("string"!=typeof e&&"number"!=typeof e)throw new t$15("key is required to be a string or number.");return this._hash[e]},e$1Q.prototype.remove=function(e){if(e$2e(e)&&"string"!=typeof e&&"number"!=typeof e)throw new t$15("key is required to be a string or number.");var t=this._hash[e],i=e$2e(t);if(i){var n=this._array;n.splice(n.indexOf(t),1),delete this._hash[e]}return i},e$1Q.prototype.removeAll=function(){var e=this._array;e.length>0&&(this._hash={},e.length=0)},e$1Q.clone=function(e,t){if(e$2e(e)){for(var i in e$2e(t)?t.removeAll():t=new e$1Q,e._hash)e._hash.hasOwnProperty(i)&&t.set(i,e._hash[i]);return t}},f$Z.prototype.destroy=function(){delete this._bounds,this._bounds=null,e$2e(this._command)&&(this._command.vertexArray=this._command.vertexArray&&!this._command.vertexArray.isDestroyed()&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&!this._command.shaderProgram.isDestroyed()&&this._command.shaderProgram.destroy(),this._command=null);var e=this.colorBuffer;e$2e(e)&&e.destroy(),this.colorBuffer=void 0;var t=this.heightBuffer;e$2e(t)&&t.destroy(),this.heightBuffer=void 0,this._geometry=null},f$Z.updateGeometry=function(e,t,i,n){if(e$2e(e))for(var r=new n$1d,o=r.ellipsoid,a=new a$18,s=e.attributes.position,l=new o$1p,u=s.values,c=0;c<u.length;c+=3)l.x=u[c],l.y=u[c+1],l.z=u[c+2],n&&(o.cartesianToCartographic(l,a),r.project(a,l),l=o$1p.fromElements(l.z,l.x,l.y)),p$1d.multiplyByPoint(i,l,l),u[c]=l.x,u[c+1]=l.y,u[c+2]=l.z},f$Z.updateGeoBounds=function(e){for(var t=e.attributes.position.values,i=new e$2c(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),n=0;n<t.length;n+=3){var r=t[n],o=t[n+1];i.x=Math.min(r,i.x),i.y=Math.min(o,i.y),i.z=Math.max(r,i.z),i.w=Math.max(o,i.w)}return i};var A$17={ADD:de$y.FUNC_ADD,SUBTRACT:de$y.FUNC_SUBTRACT,REVERSE_SUBTRACT:de$y.FUNC_REVERSE_SUBTRACT,MIN:de$y.MIN,MAX:de$y.MAX},b$17=Object.freeze(A$17),_$T={ZERO:de$y.ZERO,ONE:de$y.ONE,SOURCE_COLOR:de$y.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:de$y.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:de$y.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:de$y.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:de$y.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:de$y.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:de$y.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:de$y.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:de$y.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:de$y.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:de$y.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:de$y.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:de$y.SRC_ALPHA_SATURATE},l$13=Object.freeze(_$T),t$T={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.SOURCE_ALPHA,functionSourceAlpha:l$13.ONE,functionDestinationRgb:l$13.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:l$13.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.ONE,functionSourceAlpha:l$13.ONE,functionDestinationRgb:l$13.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:l$13.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.SOURCE_ALPHA,functionSourceAlpha:l$13.ONE,functionDestinationRgb:l$13.ONE,functionDestinationAlpha:l$13.ONE})},Ee$r=Object.freeze(t$T),R$Z={ZERO:de$y.ZERO,KEEP:de$y.KEEP,REPLACE:de$y.REPLACE,INCREMENT:de$y.INCR,DECREMENT:de$y.DECR,INVERT:de$y.INVERT,INCREMENT_WRAP:de$y.INCR_WRAP,DECREMENT_WRAP:de$y.DECR_WRAP},n$_=Object.freeze(R$Z),A$16={NEVER:de$y.NEVER,LESS:de$y.LESS,EQUAL:de$y.EQUAL,LESS_OR_EQUAL:de$y.LEQUAL,GREATER:de$y.GREATER,NOT_EQUAL:de$y.NOTEQUAL,GREATER_OR_EQUAL:de$y.GEQUAL,ALWAYS:de$y.ALWAYS},m$Z=Object.freeze(A$16);function t$S(e,t,i){return o$1q.defined("url",e),t=u$Z(t,!0),(i=e$2e(i)?i:new r$1c).url=e,i.requestFunction=function(){var i;i=!(e$26(e)||!t)&&i$19(e);var n=o$1l.defer();return t$S.createImage(e,i,n),n.promise},r$1b.request(i)}t$S.createImage=function(e,t,i){var n=new Image;n.onload=function(){i.resolve(n)},n.onerror=function(e){i.reject(e)},t&&(u$W.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e},t$S.defaultCreateImage=t$S.createImage;var _0x57794c=(_0x2d9468=!0,function(e,t){var i=_0x2d9468?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d9468=!1,i}),_0x32aba8=_0x57794c(void 0,(function(){return _0x32aba8.toString().search("(((.+)+)+)+$").toString().constructor(_0x32aba8).search("(((.+)+)+)+$")})),_0x2d9468;_0x32aba8();var _0x56b405="attribute vec4 aPosition;\n\nvarying vec4 vClip_pos;\nvoid main()\n{\n\tvClip_pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n\tgl_Position = czm_depthClampFarPlane(vClip_pos);\n}",_0x256db1=(_0x48fc7c=!0,function(e,t){var i=_0x48fc7c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x48fc7c=!1,i}),_0x40e94c=_0x256db1(void 0,(function(){return _0x40e94c.toString().search("(((.+)+)+)+$").toString().constructor(_0x40e94c).search("(((.+)+)+)+$")})),_0x48fc7c;_0x40e94c();var _0x287c41="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform mat4 uRenderTextureMatrix;\nuniform vec2 uTexture1_size;\nuniform sampler2D uTexture1;\nuniform sampler2D uDiffuseTexture;\nuniform float uFeatheringScale;\nuniform vec3 uV3AffineX;\nuniform vec3 uV3AffineY;\n#ifdef CLIPPOLYGON\nuniform sampler2D uPolygonTexture;\nuniform mat4 uPolygonTextureMatrix;\nuniform float uPolygonMode;\n#endif\n\nvarying vec4 vClip_pos;\n\nconst float oldFeatureingRadius = 0.707;\nvec4 feathering(vec4 oldColor, vec2 texCoord){\n float disToCenter = length(texCoord - vec2(0.5));\n float roundRadius = oldFeatureingRadius * (1.0 - uFeatheringScale);\n float disToRoundBounds = disToCenter - roundRadius;\n float featheringAlpha = min(1.0, 1.0 - disToRoundBounds / (oldFeatureingRadius - roundRadius));\n return vec4(oldColor.rgb, featheringAlpha);\n}\nfloat getDepth(in vec4 depth)\n{\n\tfloat z_window = czm_unpackDepth(depth);\n#ifdef WEBGPU\n\treturn z_window;\n#else\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n#endif\n}\n\nfloat getDepthFromShadowMap(in vec2 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(uTexture1, t00));\n\tfloat z10 = getDepth(texture2D(uTexture1, t01));\n\tfloat z01 = getDepth(texture2D(uTexture1, t10));\n\tfloat z11 = getDepth(texture2D(uTexture1, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n#ifdef CLIPPOLYGON\nbool isClipValid(vec2 texcoord)\n{\n bool clipInside = (uPolygonMode < 0.5);\n if(clipInside)\n {\n return texture2D(uPolygonTexture, texcoord).r > 0.5;\n }\n else\n {\n return texture2D(uPolygonTexture, texcoord).r < 0.5;\n }\n}\n#endif\n\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n\tfloat sceneDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, depthTexCoord.xy));\n\tsceneDepth = czm_reverseLogDepth(sceneDepth);\n#ifndef WEBGPU\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n#endif\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\tvec4 viewPos = czm_inverseProjection * pos;\n\tvec4 renderTextureCoord = uRenderTextureMatrix * viewPos;\n\tvec4 ndcInDepthScene = renderTextureCoord / renderTextureCoord.w;\n\tvec2 texCoord = ndcInDepthScene.xy * 0.5 + 0.5;\n\tif(texCoord.x < 0.0 || texCoord.x > 1.0 || texCoord.y < 0.0 || texCoord.y > 1.0)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIPPOLYGON\n vec4 polygonTextureCoord = uPolygonTextureMatrix * viewPos;\n\tvec4 texCoordPolygon = polygonTextureCoord / polygonTextureCoord.w;\n\ttexCoordPolygon.xyz = texCoordPolygon.xyz * 0.5 + 0.5;\n\tif(texCoordPolygon.x < 0.0 || texCoordPolygon.x > 1.0 || texCoordPolygon.y < 0.0 || texCoordPolygon.y > 1.0)\n\t{\n\t\tdiscard;\n }\n\tif(!isClipValid(texCoordPolygon.xy))\n {\n discard;\n }\n#endif\n\tfloat depth = getDepthFromShadowMap(texCoord);\n\tif(depth + 0.00002 < ndcInDepthScene.z)\n\t{\n\t\tdiscard;\n\t}\n\tvec2 finalTexCoord = texCoord.xy;\n texCoord.x = uV3AffineX.x * finalTexCoord.x + uV3AffineX.y * finalTexCoord.y + uV3AffineX.z;\n texCoord.y = uV3AffineY.x * finalTexCoord.x + uV3AffineY.y * finalTexCoord.y + uV3AffineY.z;\n if(texCoord.x > 1.0 || texCoord.y > 1.0 || texCoord.x < 0.0 || texCoord.y < 0.0)\n {\n discard;\n }\n\tgl_FragColor = texture2D(uDiffuseTexture, texCoord.xy);\n\tgl_FragColor = feathering(gl_FragColor, texCoord.xy);\n\tgl_FragColor.rgb = czm_adjustColor(gl_FragColor.rgb);\n}",_0x4435e2=(_0xf9843f=!0,function(e,t){var i=_0xf9843f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf9843f=!1,i}),_0x34184e=_0x4435e2(void 0,(function(){return _0x34184e.toString().search("(((.+)+)+)+$").toString().constructor(_0x34184e).search("(((.+)+)+)+$")})),_0xf9843f;_0x34184e();var _0x1b488f={CLIP_INSIDE:0,CLIP_OUTSIDE:1},_0x454473=Object.freeze(_0x1b488f);function d$1f(e,t,i){return p$$({url:e,responseType:"document",headers:t,overrideMimeType:"text/xml",request:i})}var s$T=function(){this.xmldom=null};s$T.prototype.read=function(e){var t,i=e.indexOf("<");return i>0&&(e=e.substring(i)),DOMParser?(this.xmldom||(this.xmldom=new DOMParser),(t=this.xmldom).parseFromString(e,"text/xml")):(this.xmldom||(this.xmldom=new ActiveXObject("Microsoft.XMLDOM")),(t=this.xmldom).loadXML(e),t)},s$T.getElementsByTagNameNS=function(e,t,i){var n=[];if(e.getElementsByTagNameNS)n=e.getElementsByTagNameNS(t,i);else for(var r,o,a=e.getElementsByTagName("*"),s=0,l=a.length;s<l;++s)o=(r=a[s]).prefix?r.prefix+":"+i:i,("*"===i||o===r.nodeName)&&("*"===t||t===r.namespaceURI)&&n.push(r);return n},s$T.getAttributeNodeNS=function(e,t,i){var n=null;if(e.getAttributeNodeNS)n=e.getAttributeNodeNS(t,i);else for(var r,o=e.attributes,a=0,s=o.length;a<s;++a)if((r=o[a]).namespaceURI===t&&(r.prefix?r.prefix+":"+i:i)===r.nodeName){n=r;break}return n},s$T.getChildValue=function(e,t){var i=t||"";if(e)for(var n=e.firstChild;n;n=n.nextSibling)switch(n.nodeType){case 3:case 4:i+=n.nodeValue}return i},s$T.queryNumericAttribute=function(e,t){if(e$2e(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}},s$T.queryStringAttribute=function(e,t){if(e$2e(e)){var i=e.getAttribute(t);return null!==i?i:void 0}},s$T.queryBooleanAttribute=function(e,t){if(e$2e(e)){var i=e.getAttribute(t);if("false"===(i=i.toLowerCase()))return!1;if("true"===i)return!0}},s$T.queryFirstNode=function(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(i){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}},s$T.queryNodes=function(e,t,i){if(e$2e(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];i?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}},s$T.queryChildNodes=function(e,t,i){if(!e$2e(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];i?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n},s$T.queryNumericValue=function(e,t,i){var n=s$T.queryFirstNode(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}},s$T.queryStringValue=function(e,t,i){var n=s$T.queryFirstNode(e,t,i);if(e$2e(n))return n.textContent.trim()},s$T.queryBooleanValue=function(e,t,i){var n=s$T.queryFirstNode(e,t,i);if(e$2e(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}};var _0x563cb4=(_0x54c7c0=!0,function(e,t){var i=_0x54c7c0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x54c7c0=!1,i}),_0x4067d7=_0x563cb4(void 0,(function(){return _0x4067d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x4067d7).search("(((.+)+)+)+$")})),_0x54c7c0;_0x4067d7();var _0x3d43b9={ProjectToScene:0,ProjectToPlane:1},_0x403af5=Object.freeze(_0x3d43b9);function i$X(e){this.planes=u$Z(e,[])}var T$_=[new o$1p,new o$1p,new o$1p];o$1p.clone(o$1p.UNIT_X,T$_[0]),o$1p.clone(o$1p.UNIT_Y,T$_[1]),o$1p.clone(o$1p.UNIT_Z,T$_[2]);var I$1d=new o$1p,y$U=new o$1p,l$12=new o$1m(new o$1p(1,0,0),0);function l$11(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=u$Z(e.near,1),this._near=this.near,this.far=u$Z(e.far,5e8),this._far=this.far,this._cullingVolume=new i$X,this._orthographicMatrix=new p$1d}function q$15(e){if(!(e$2e(e.right)&&e$2e(e.left)&&e$2e(e.top)&&e$2e(e.bottom)&&e$2e(e.near)&&e$2e(e.far)))throw new t$15("right, left, top, bottom, near, or far parameters are not set.");if(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far){if(e.left>e.right)throw new t$15("right must be greater than left.");if(e.bottom>e.top)throw new t$15("top must be greater than bottom.");if(e.near>e.far)throw new t$15("near must be greater than zero and less than far.");e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=p$1d.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}i$X.fromBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("boundingSphere is required.");e$2e(t)||(t=new i$X);var i=T$_.length,n=t.planes;n.length=2*i;for(var r=e.center,o=e.radius,a=0,s=0;s<i;++s){var l=T$_[s],u=n[a],c=n[a+1];e$2e(u)||(u=n[a]=new e$2c),e$2e(c)||(c=n[a+1]=new e$2c),o$1p.multiplyByScalar(l,-o,I$1d),o$1p.add(r,I$1d,I$1d),u.x=l.x,u.y=l.y,u.z=l.z,u.w=-o$1p.dot(l,I$1d),o$1p.multiplyByScalar(l,o,I$1d),o$1p.add(r,I$1d,I$1d),c.x=-l.x,c.y=-l.y,c.z=-l.z,c.w=-o$1p.dot(o$1p.negate(l,y$U),I$1d),a+=2}return t},i$X.prototype.computeVisibility=function(e){if(!e$2e(e))throw new t$15("boundingVolume is required.");for(var t=this.planes,i=!1,n=0,r=t.length;n<r;++n){var o=e.intersectPlane(o$1m.fromCartesian4(t[n],l$12));if(o===Ae$w.OUTSIDE)return Ae$w.OUTSIDE;o===Ae$w.INTERSECTING&&(i=!0)}return i?Ae$w.INTERSECTING:Ae$w.INSIDE},i$X.prototype.computeVisibilityWithPlaneMask=function(e,t){if(!e$2e(e))throw new t$15("boundingVolume is required.");if(!e$2e(t))throw new t$15("parentPlaneMask is required.");if(t===i$X.MASK_OUTSIDE||t===i$X.MASK_INSIDE)return t;for(var i=i$X.MASK_INSIDE,n=this.planes,r=0,o=n.length;r<o;++r){var a=r<31?1<<r:0;if(!(r<31&&0==(t&a))){var s=e.intersectPlane(o$1m.fromCartesian4(n[r],l$12));if(s===Ae$w.OUTSIDE)return i$X.MASK_OUTSIDE;s===Ae$w.INTERSECTING&&(i|=a)}}return i},i$X.MASK_OUTSIDE=4294967295,i$X.MASK_INSIDE=0,i$X.MASK_INDETERMINATE=2147483647,Object.defineProperties(l$11.prototype,{projectionMatrix:{get:function(){return q$15(this),this._orthographicMatrix}}});var B$Y=new o$1p,M$12=new o$1p,P$_=new o$1p,s$S=new o$1p;function a$V(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._offCenterFrustum=new l$11,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=u$Z(e.near,1),this._near=this.near,this.far=u$Z(e.far,5e8),this._far=this.far}function o$18(e){if(!(e$2e(e.width)&&e$2e(e.aspectRatio)&&e$2e(e.near)&&e$2e(e.far)))throw new t$15("width, aspectRatio, near, or far parameters are not set.");var t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){if(e.aspectRatio<0)throw new t$15("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new t$15("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;var i=1/e.aspectRatio;t.right=.5*e.width,t.left=-t.right,t.top=i*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}l$11.prototype.computeCullingVolume=function(e,t,i){if(!e$2e(e))throw new t$15("position is required.");if(!e$2e(t))throw new t$15("direction is required.");if(!e$2e(i))throw new t$15("up is required.");var n=this._cullingVolume.planes,r=this.top,o=this.bottom,a=this.right,s=this.left,l=this.near,u=this.far,c=o$1p.cross(t,i,B$Y);o$1p.normalize(c,c);var h=M$12;o$1p.multiplyByScalar(t,l,h),o$1p.add(e,h,h);var d=P$_;o$1p.multiplyByScalar(c,s,d),o$1p.add(h,d,d);var f=n[0];return e$2e(f)||(f=n[0]=new e$2c),f.x=c.x,f.y=c.y,f.z=c.z,f.w=-o$1p.dot(c,d),o$1p.multiplyByScalar(c,a,d),o$1p.add(h,d,d),e$2e(f=n[1])||(f=n[1]=new e$2c),f.x=-c.x,f.y=-c.y,f.z=-c.z,f.w=-o$1p.dot(o$1p.negate(c,s$S),d),o$1p.multiplyByScalar(i,o,d),o$1p.add(h,d,d),e$2e(f=n[2])||(f=n[2]=new e$2c),f.x=i.x,f.y=i.y,f.z=i.z,f.w=-o$1p.dot(i,d),o$1p.multiplyByScalar(i,r,d),o$1p.add(h,d,d),e$2e(f=n[3])||(f=n[3]=new e$2c),f.x=-i.x,f.y=-i.y,f.z=-i.z,f.w=-o$1p.dot(o$1p.negate(i,s$S),d),e$2e(f=n[4])||(f=n[4]=new e$2c),f.x=t.x,f.y=t.y,f.z=t.z,f.w=-o$1p.dot(t,h),o$1p.multiplyByScalar(t,u,d),o$1p.add(e,d,d),e$2e(f=n[5])||(f=n[5]=new e$2c),f.x=-t.x,f.y=-t.y,f.z=-t.z,f.w=-o$1p.dot(o$1p.negate(t,s$S),d),this._cullingVolume},l$11.prototype.getPixelDimensions=function(e,t,i,n,r){if(q$15(this),!e$2e(e)||!e$2e(t))throw new t$15("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new t$15("drawingBufferWidth must be greater than zero.");if(t<=0)throw new t$15("drawingBufferHeight must be greater than zero.");if(!e$2e(i))throw new t$15("distance is required.");if(!e$2e(n))throw new t$15("pixelRatio is required.");if(n<=0)throw new t$15("pixelRatio must be greater than zero.");if(!e$2e(r))throw new t$15("A result object is required.");var o=n*(this.right-this.left)/e,a=n*(this.top-this.bottom)/t;return r.x=o,r.y=a,r},l$11.prototype.clone=function(e){return e$2e(e)||(e=new l$11),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},l$11.prototype.equals=function(e){return e$2e(e)&&e instanceof l$11&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},l$11.prototype.equalsEpsilon=function(e,t,i){return e===this||e$2e(e)&&e instanceof l$11&&e$2d.equalsEpsilon(this.right,e.right,t,i)&&e$2d.equalsEpsilon(this.left,e.left,t,i)&&e$2d.equalsEpsilon(this.top,e.top,t,i)&&e$2d.equalsEpsilon(this.bottom,e.bottom,t,i)&&e$2d.equalsEpsilon(this.near,e.near,t,i)&&e$2d.equalsEpsilon(this.far,e.far,t,i)},a$V.packedLength=4,a$V.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.width,t[i++]=e.aspectRatio,t[i++]=e.near,t[i]=e.far,t},a$V.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new a$V),i.width=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t],i},Object.defineProperties(a$V.prototype,{projectionMatrix:{get:function(){return o$18(this),this._offCenterFrustum.projectionMatrix}}}),a$V.prototype.computeCullingVolume=function(e,t,i){return o$18(this),this._offCenterFrustum.computeCullingVolume(e,t,i)},a$V.prototype.getPixelDimensions=function(e,t,i,n,r){return o$18(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n,r)},a$V.prototype.clone=function(e){return e$2e(e)||(e=new a$V),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},a$V.prototype.equals=function(e){return!!(e$2e(e)&&e instanceof a$V)&&(o$18(this),o$18(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},a$V.prototype.equalsEpsilon=function(e,t,i){return!!(e$2e(e)&&e instanceof a$V)&&(o$18(this),o$18(e),e$2d.equalsEpsilon(this.width,e.width,t,i)&&e$2d.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))};var s$R={},Z$10=new e$2c(0,0,0,1),v$N=new e$2c,J$_=new f$1a,M$11=new o$1o,j$17=new o$1o;s$R.wgs84ToWindowCoordinates=function(e,t,i){return s$R.wgs84WithEyeOffsetToWindowCoordinates(e,t,o$1p.ZERO,i)};var F$11=new e$2c,L$18=new o$1p;function P$Z(e,t,i,n){var r=i._scene.context.curFusionViewMatrix||i.viewMatrix,o=p$1d.multiplyByVector(r,e$2c.fromElements(e.x,e.y,e.z,1,F$11),F$11),a=o$1p.multiplyComponents(t,o$1p.normalize(o,L$18),L$18);return o.x+=t.x+a.x,o.y+=t.y+a.y,o.z+=a.z,p$1d.multiplyByVector(i.frustum.projectionMatrix,o,n)}var K$V=new a$18(Math.PI,e$2d.PI_OVER_TWO),Q$10=new o$1p,X$Y=new o$1p;s$R.wgs84WithEyeOffsetToWindowCoordinates=function(e,t,i,n){if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(t))throw new t$15("position is required.");var r=e.frameState,o=s$R.computeActualWgs84Position(r,t,Z$10);if(e$2e(o)){var a=e.canvas,s=J$_;s.x=0,s.y=0,s.width=a.clientWidth,s.height=a.clientHeight;var l=e.camera,u=!1;if(r.mode===C$14.SCENE2D){var c=e.mapProjection,h=K$V,d=c.project(h,Q$10),f=o$1p.clone(l.position,X$Y),p=l.frustum.clone(),_=p$1d.computeViewportTransformation(s,0,1,new p$1d),m=l.frustum.projectionMatrix,g=l.positionWC.y,x=o$1p.fromElements(e$2d.sign(g)*d.x-g,0,-l.positionWC.x),y=m$19.pointToGLWindowCoordinates(m,_,x);if(0===g||y.x<=0||y.x>=a.clientWidth)u=!0;else{if(y.x>.5*a.clientWidth){s.width=y.x,l.frustum.right=d.x-g,v$N=P$Z(o,i,l,v$N),s$R.clipToGLWindowCoordinates(s,v$N,M$11),s.x+=y.x,l.position.x=-l.position.x;var v=l.frustum.right;l.frustum.right=-l.frustum.left,l.frustum.left=-v,v$N=P$Z(o,i,l,v$N),s$R.clipToGLWindowCoordinates(s,v$N,j$17)}else{s.x+=y.x,s.width-=y.x,l.frustum.left=-d.x-g,v$N=P$Z(o,i,l,v$N),s$R.clipToGLWindowCoordinates(s,v$N,M$11),s.x=s.x-s.width,l.position.x=-l.position.x;var $=l.frustum.left;l.frustum.left=-l.frustum.right,l.frustum.right=-$,v$N=P$Z(o,i,l,v$N),s$R.clipToGLWindowCoordinates(s,v$N,j$17)}o$1p.clone(f,l.position),l.frustum=p.clone(),((n=o$1o.clone(M$11,n)).x<0||n.x>a.clientWidth)&&(n.x=j$17.x)}}if(r.mode!==C$14.SCENE2D||u){if((v$N=P$Z(o,i,l,v$N)).z<0&&!(l.frustum instanceof a$V)&&!(l.frustum instanceof l$11))return;n=s$R.clipToGLWindowCoordinates(s,v$N,n)}return n.y=a.clientHeight-n.y,n}},s$R.wgs84ToDrawingBufferCoordinates=function(e,t,i){if(e$2e(i=s$R.wgs84ToWindowCoordinates(e,t,i)))return s$R.transformWindowToDrawingBuffer(e,i,i)};var h$$=new o$1p,Y$O=new a$18;s$R.computeActualWgs84Position=function(e,t,i){var n=e.mode;if(n===C$14.SCENE3D)return o$1p.clone(t,i);var r=e.mapProjection,o=r.ellipsoid.cartesianToCartographic(t,Y$O);if(e$2e(o)){if(r.project(o,h$$),n===C$14.COLUMBUS_VIEW)return o$1p.fromElements(h$$.z,h$$.x,h$$.y,i);if(n===C$14.SCENE2D)return o$1p.fromElements(0,h$$.x,h$$.y,i);var a=e.morphTime;return o$1p.fromElements(e$2d.lerp(h$$.z,t.x,a),e$2d.lerp(h$$.x,t.y,a),e$2d.lerp(h$$.y,t.z,a),i)}};var O$M=new o$1p,N$X=new o$1p,_$S=new p$1d;s$R.clipToGLWindowCoordinates=function(e,t,i){return o$1p.divideByScalar(t,t.w,O$M),p$1d.computeViewportTransformation(e,0,1,_$S),p$1d.multiplyByPoint(_$S,O$M,N$X),o$1o.fromCartesian3(N$X,i)},s$R.transformWindowToDrawingBuffer=function(e,t,i){var n=e.canvas,r=e.drawingBufferWidth/n.clientWidth,o=e.drawingBufferHeight/n.clientHeight;return o$1o.fromElements(t.x*r,t.y*o,i)};var $$Z=new e$2c,G$1b=new e$2c;s$R.drawingBufferToWgs84Coordinates=function(e,t,i,n){var r=e.context,o=r.uniformState,a=o.currentFrustum,s=a.x,l=a.y;if(e.frameState.useLogDepth){var u=i*o.log2FarDepthFromNearPlusOne;i=l*(1-s/(Math.pow(2,u)-1+s))/(l-s)}var c=e._view.passState.viewport,h=e$2c.clone(e$2c.UNIT_W,$$Z);h.x=(t.x-c.x)/c.width*2-1,h.y=(t.y-c.y)/c.height*2-1,r.webgpu?h.z=i:h.z=2*i-1,h.w=1;var d,f=e.camera.frustum;if(e$2e(f.fovy)){var p=1/(d=p$1d.multiplyByVector(o.inverseViewProjection,h,G$1b)).w;o$1p.multiplyByScalar(d,p,d)}else e$2e(f._offCenterFrustum)&&(f=f._offCenterFrustum),(d=G$1b).x=.5*(h.x*(f.right-f.left)+f.left+f.right),d.y=.5*(h.y*(f.top-f.bottom)+f.bottom+f.top),d.z=.5*(h.z*(s-l)-s-l),d.w=1,d=p$1d.multiplyByVector(o.inverseView,d,d);return d.x+=r.relativeOrigin.x,d.y+=r.relativeOrigin.y,d.z+=r.relativeOrigin.z,o$1p.fromCartesian4(d,n)},s$R.convert2DToCartesian=function(e,t){if(t){var i=t.x,n=t.y;i>20037508.342789244&&(i-=20037508.342789244*Math.floor(i/20037508.342789244)),n>10018754.171394622&&(n-=20037508.342789244*Math.floor((n+10018754.171394622)/20037508.342789244)),t.x=i,t.y=n}var r=e.mapProjection,o=r.ellipsoid,a=new o$1p,s=new a$18,l=r.unproject(t,s);return o.cartographicToCartesian(l,a),a};var _0x4ba172=(_0x41543a=!0,function(e,t){var i=_0x41543a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41543a=!1,i}),_0x82fa20=_0x4ba172(void 0,(function(){return _0x82fa20.toString().search("(((.+)+)+)+$").toString().constructor(_0x82fa20).search("(((.+)+)+)+$")})),_0x41543a;function _0x337a3e(e){if(!e$2e(e))throw new t$15("scene are required.");if(!e.context.depthTexture)throw new t$15("the depth buffer is not supported.");this._scene=e,this._cameraDepthBuffer=void 0,this._clearStencilCommand=new t$W({stencil:0}),this._clearStencilCommand.pass=Le$q.ANALYSIS,this._lineCommand=void 0,this._stencilCommand=void 0,this._colorCommand=void 0,this._boundingSphere=new i$1d,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._roll=0,this._horizontalFov=90,this._verticalFov=60,this._distance=200,this._hintLineColor=new e$2c(1,1,1,1),this._hintLineVisible=!0,this._texture=void 0,this._segmentCount=20,this._invertViewMatrix=new p$1d,this._viewProjMatrix=new p$1d,this._renderTextureMatrix=new p$1d,this._update=!0,this._id=0,this._name="",this._cameraName="",this._visibleViewport=4095,this._video=void 0,this._hasExcavation=!1,this._polygonTexture=void 0,this._polygonRegions=new e$1Q,this._polygonTextureMatrix=new p$1d,this._polygonViewProjMatrix=new p$1d,this._polygonUpdate=!1,this._polygonMode=_0x454473.CLIP_OUTSIDE,this._brightness=1,this._contrast=1,this._hue=0,this._saturation=1,this._gamma=1,this._featheringScale=0,this._v3AffineX=new o$1p(1,0,0),this._v3AffineY=new o$1p(0,1,0),this._visible=!0,this._boundingSphereFromXML=void 0,this._visibleDistanceMax=500,this._mode=_0x403af5.ProjectToScene,this._planeRegions=void 0,this._projectEvent=new o$1h,this._projectPlaneOffset=1,this._guid=e$1T(),this._fusionAlpha=1,this._minDepth=.9999}function _0x3d42bd(e){e$2e(e._stencilCommand)&&(e._stencilCommand.vertexArray=e._stencilCommand.vertexArray&&e._stencilCommand.vertexArray.destroy(),e._stencilCommand.shaderProgram=e._stencilCommand.shaderProgram&&e._stencilCommand.shaderProgram.destroy(),e._stencilCommand=void 0),e$2e(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),e$2e(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0),e$2e(e._planeCommand)&&(e._planeCommand.vertexArray=e._planeCommand.vertexArray&&e._planeCommand.vertexArray.destroy(),e._planeCommand.shaderProgram=e._planeCommand.shaderProgram&&e._planeCommand.shaderProgram.destroy(),e._planeCommand=void 0)}function _0x3480f4(e,t,i){var n=e._horizontalFov*e$2d.RADIANS_PER_DEGREE,r=e._verticalFov*e$2d.RADIANS_PER_DEGREE,o=Math.tan(.5*n)/Math.tan(.5*r);e._distance;var a=Math.max(e._distance,10),s=e._direction*e$2d.RADIANS_PER_DEGREE,l=e._pitch*e$2d.RADIANS_PER_DEGREE,u=e._roll*e$2d.RADIANS_PER_DEGREE,c=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0],h=i.camera,d=h.frustum.aspectRatio,f=h.frustum.fov,p=h.frustum.near,_=h.frustum.far,m=new o$1p,g=h.heading,x=h.pitch,y=h.roll;o$1p.clone(h.position,m),e._cameraDepthBuffer.isUpdate=!0;var v=i.useLogDepth;e._cameraDepthBuffer._beginFunc=function(){i.useLogDepth=!1,d=h.frustum.aspectRatio,f=h.frustum.fov,p=h.frustum.near,_=h.frustum.far,g=h.heading,x=h.pitch,y=h.roll,o$1p.clone(h.position,m),h.frustum.aspectRatio=o,h.frustum.fov=o>=1?n:r,h.frustum.near=1,h.frustum.far=a,v&&(h.frustum.near=.1,h.frustum.far=1e8),h.setView({destination:c,orientation:{heading:s,pitch:l,roll:u}}),p$1d.multiply(h.frustum.projectionMatrix,h.viewMatrix,e._viewProjMatrix),p$1d.clone(h.inverseViewMatrix,e._invertViewMatrix),o$1p.clone(o$1p.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,i$1d.transform(e._boundingSphere,e._invertViewMatrix,e._boundingSphere)},e._cameraDepthBuffer._endFunc=function(){h.setView({destination:m,orientation:{heading:g,pitch:x,roll:y},convert:!1}),h.frustum.aspectRatio=d,h.frustum.fov=f,h.frustum.near=p,h.frustum.far=_,i.useLogDepth=v,e._cameraDepthBuffer.isUpdate=!1}}_0x82fa20(),Object.defineProperties(_0x337a3e.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},roll:{get:function(){return this._roll},set:function(e){this._roll=e,this._update=!0}},horizontalFov:{get:function(){return this._horizontalFov},set:function(e){this._horizontalFov=e,this._update=!0}},verticalFov:{get:function(){return this._verticalFov},set:function(e){this._verticalFov=e,this._update=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$15("the distance is greater than 0.0");this._distance=e,this._update=!0}},featheringScale:{get:function(){return this._featheringScale},set:function(e){if(e<0||e>1)throw new t$15("the distance is greater than 0.0 an less than 1.0");this._featheringScale=e}},hintLineColor:{get:function(){var e=new e$1X;return e.red=this._hintLineColor.x,e.green=this._hintLineColor.y,e.blue=this._hintLineColor.z,e.alpha=this._hintLineColor.w,e},set:function(e){this._hintLineColor.x=e.red,this._hintLineColor.y=e.green,this._hintLineColor.z=e.blue,this._hintLineColor.w=e.alpha}},hintLineVisible:{get:function(){return this._hintLineVisible},set:function(e){this._hintLineVisible=e}},brightness:{get:function(){return this._brightness},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.brightness",e,0),this._brightness=e}},contrast:{get:function(){return this._contrast},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.contrast",e,0),this._contrast=e}},hue:{get:function(){return this._hue},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.hue",e,0),this._hue=e}},saturation:{get:function(){return this._saturation},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.saturation",e,0),this._saturation=e}},gamma:{get:function(){return this._gamma},set:function(e){o$1q.typeOf.number.greaterThan("ProjectionImage.gamma",e,0),this._gamma=e}},visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("ProjectionImage.visible",e),this._visible=e}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){o$1q.typeOf.number("ProjectionImage.visibleDistance",e),this._visibleDistanceMax=e}},mode:{get:function(){return this._mode},set:function(e){this._mode=e}},projectEvent:{get:function(){return this._projectEvent}},fusionAlpha:{get:function(){return this._fusionAlpha},set:function(e){this._fusionAlpha=e}}});var _0x1152f2=new e$2c,_0x2a0e7d=new e$2c(1,1/255,1/65025,1/16581375);function _0x3c0965(e,t,i,n,r,o){var a=t.context.readPixels({x:i,y:n,width:1,height:1,framebuffer:e._cameraDepthBuffer._framebuffer}),s=e$2c.unpack(a,0,_0x1152f2);e$2c.divideByScalar(s,255,s);var l=e$2c.dot(s,_0x2a0e7d);0!==l?e._minDepth=Math.min(e._minDepth,l):l=e._minDepth;var u=new e$2c(r,o,2*l-1,1),c=new e$2c,h=p$1d.inverse(e._viewProjMatrix,new p$1d),d=p$1d.multiplyByVector(h,u,c),f=1/d.w;return o$1p.multiplyByScalar(d,f,d)}function _0x3155cf(e,t){var i=e._scene,n=i.screenSpaceCameraController;n.enableFusion||(n.enableFusion=!0),e$2e(t.curFusionViewMatrix)||(t.curFusionViewMatrix=p$1d.clone(t.uniformState.view,new p$1d));var r=_0x3c0965(e,i,0,0,-1,-1),o=_0x3c0965(e,i,i.drawingBufferWidth-1,0,1,-1),a=_0x3c0965(e,i,i.drawingBufferWidth-1,i.drawingBufferHeight-1,1,1),s=_0x3c0965(e,i,0,i.drawingBufferHeight-1,-1,1);if(s$R.wgs84ToDrawingBufferCoordinates(i,r,r),s$R.wgs84ToDrawingBufferCoordinates(i,o,o),s$R.wgs84ToDrawingBufferCoordinates(i,a,a),s$R.wgs84ToDrawingBufferCoordinates(i,s,s),e$2e(r)&&e$2e(o)&&e$2e(a)&&e$2e(s)){e$2e(n.panOffset)&&(r.x+=n.panOffset.x,o.x+=n.panOffset.x,a.x+=n.panOffset.x,s.x+=n.panOffset.x,r.y+=n.panOffset.y,o.y+=n.panOffset.y,a.y+=n.panOffset.y,s.y+=n.panOffset.y),n.zoomDirty=!1,n.panDirty=!1;for(var l=[r.x,r.y,o.x,o.y,a.x,a.y,s.x,s.y],u=i.drawingBufferWidth,c=i.drawingBufferHeight,h=0,d=l.length;h<d;h++){var f=l[h];f=2*(f=h%2==0?f/u:1-f/c)-1,l[h]=f}var p=new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:l}),textureCoordinates:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:W$18.TRIANGLES}),_=new i$$({vertexArray:c$13.fromGeometry({context:t,geometry:p,attributeLocations:{position:0,textureCoordinates:1},bufferUsage:A$18.STATIC_DRAW,interleave:!0}),primitiveType:W$18.TRIANGLES,renderState:d$1m.fromCache({blending:Ee$r.ALPHA_BLEND}),shaderProgram:r$14.fromCache({name:"ProjectionImagePlane",context:t,vertexShaderSource:"\n attribute vec4 position;\n attribute vec2 textureCoordinates;\n varying vec2 v_textureCoordinates;\n void main() \n {\n gl_Position = position;\n v_textureCoordinates = textureCoordinates;\n }\n ",fragmentShaderSource:"\n uniform sampler2D u_Texture;\n uniform float uFusionAlpha;\n varying vec2 v_textureCoordinates;\n void main()\n {\n gl_FragColor = texture2D(u_Texture, v_textureCoordinates);\n gl_FragColor.a = uFusionAlpha;\n }\n ",attributeLocations:{position:0,textureCoordinates:1}}),uniformMap:{u_Texture:function(){return e._texture},uFusionAlpha:function(){return e._fusionAlpha}},owner:e});_.pass=Le$q.OVERLAY_AGAINST_DEPTH,e._planeCommand=_}}function _0x6cb510(e,t,i){for(var n=(e._segmentCount+1)*(e._segmentCount+1)+1,r=S$14.createTypedArray(S$14.FLOAT,3*n),o=3,a=e._horizontalFov*e$2d.RADIANS_PER_DEGREE,s=e._verticalFov*e$2d.RADIANS_PER_DEGREE,l=Math.tan(.5*a),u=Math.tan(.5*s),c=(e._distance,e._distance*u),h=Math.PI-.5*a,d=0,f=0,p=a/e._segmentCount,_=0;_<e._segmentCount+1;_++){d=h+_*p;for(var m=c/(e._distance/Math.cos(d)),g=Math.atan(m),x=-g,y=2*g/e._segmentCount,v=0;v<e._segmentCount+1;v++)f=x+v*y,r[o++]=e._distance*Math.cos(f)*Math.sin(d),r[o++]=e._distance*Math.sin(f),r[o++]=e._distance*Math.cos(f)*Math.cos(d)}var $=2*(4+5*e._segmentCount+2*e._segmentCount*3),b=e._segmentCount*e._segmentCount*3*2+3*e._segmentCount*4,T=S$14.createTypedArray(S$14.UNSIGNED_SHORT,$),C=S$14.createTypedArray(S$14.UNSIGNED_SHORT,b),S=0;for(_=0;_<e._segmentCount;_++)for(v=0;v<e._segmentCount;v++)C[S++]=1+_+v*(e._segmentCount+1),C[S++]=1+_+1+v*(e._segmentCount+1),C[S++]=1+_+(v+1)*(e._segmentCount+1),C[S++]=1+_+1+v*(e._segmentCount+1),C[S++]=1+_+1+(v+1)*(e._segmentCount+1),C[S++]=1+_+(v+1)*(e._segmentCount+1);for(_=0;_<e._segmentCount;_++)C[S++]=_+1+1,C[S++]=_+1,C[S++]=0,C[S++]=0,C[S++]=_+e._segmentCount*(e._segmentCount+1)+1,C[S++]=_+1+e._segmentCount*(e._segmentCount+1)+1;for(_=0;_<e._segmentCount;_++)C[S++]=0,C[S++]=_*(e._segmentCount+1)+1,C[S++]=(_+1)*(e._segmentCount+1)+1,C[S++]=e._segmentCount+(_+1)*(e._segmentCount+1)+1,C[S++]=e._segmentCount+_*(e._segmentCount+1)+1,C[S++]=0;S=0,T[S++]=0,T[S++]=1,T[S++]=0,T[S++]=e._segmentCount+1,T[S++]=0,T[S++]=e._segmentCount*(e._segmentCount+1)+1,T[S++]=0,T[S++]=(e._segmentCount+1)*(e._segmentCount+1);for(_=0;_<5;_++)for(v=0;v<e._segmentCount;v++)T[S++]=1+v+5*(e._segmentCount+1)*_,T[S++]=1+(v+1)+5*(e._segmentCount+1)*_;for(_=0;_<5;_++)for(v=0;v<e._segmentCount;v++)T[S++]=1+(e._segmentCount+1)*v+5*_,T[S++]=1+(e._segmentCount+1)*(v+1)+5*_;var w=t$X.createVertexBuffer({context:t,typedArray:r,usage:A$18.STATIC_DRAW}),E=[],P={aPosition:0};e._attributeLocations=P,E.push({name:"aPosition",index:P.aPosition,vertexBuffer:w,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var A=t$X.createIndexBuffer({context:t,typedArray:T,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),L=t$X.createIndexBuffer({context:t,typedArray:C,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});e._lineCommand=new i$$({primitiveType:W$18.LINES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!0}),e._lineCommand.vertexArray=new c$13({context:t,attributes:E,indexBuffer:A}),e._lineCommand.shaderProgram=r$14.fromCache({name:"ProjectionImageLine",context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:P}),e._lineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var M=[];for(_=0;_<6;_++)M[_]=new e$2c(0,0,0,0);e._lineCommand.uniformMap={uDiffuseColor:function(){return e._hintLineColor},clip_mode:function(){return 0},clip_planes:function(){return M},clip_line_color:function(){return e$2c.UNIT_W}},e._stencilCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ProjectionImage,owner:e,cull:!0}),e._stencilCommand.vertexArray=new c$13({context:t,attributes:E,indexBuffer:L}),e._stencilCommand.shaderProgram=r$14.fromCache({name:"ProjectionImageStencil",context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:P});var R=e._mode===_0x403af5.ProjectToPlane?{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},reference:0,mask:1}:{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.INCREMENT_WRAP},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:65535};e._stencilCommand.renderState=d$1m.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:R,stencilMask:1}),e._stencilCommand.uniformMap={uDiffuseColor:function(){return e$2c.UNIT_W},clip_mode:function(){return 0},clip_planes:function(){return M},clip_line_color:function(){return e$2c.UNIT_W}},e._colorCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ProjectionImage,owner:e,cull:!0}),e._colorCommand.vertexArray=new c$13({context:t,attributes:E,indexBuffer:L});var O=new s$V({name:"ViewShedAnalysisVp",sources:[_0x56b405]});e._colorCommand.shaderProgram=r$14.fromCache({name:"ProjectionImageColor",context:t,vertexShaderSource:O,fragmentShaderSource:_0x287c41,attributeLocations:P}),R=e._mode===_0x403af5.ProjectToPlane?{enabled:!0,frontFunction:m$Z.EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:3,mask:3}:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.NOT_EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:65535},e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:R,blending:Ee$r.ALPHA_BLEND}),e._colorCommand.uniformMap={uRenderTextureMatrix:function(){return e._renderTextureMatrix},uPolygonTextureMatrix:function(){return e._polygonTextureMatrix},uTexture1_size:function(){var t=e._cameraDepthBuffer.depthTexture;return new o$1o(t.width,t.height)},uTexture1:function(){return e._cameraDepthBuffer.depthTexture},uDiffuseTexture:function(){return e._texture},uPolygonTexture:function(){return e._polygonTexture},uPolygonMode:function(){return e._polygonMode},uBrightness:function(){return e._brightness},uContrast:function(){return e._contrast},uHue:function(){return e._hue},uSaturation:function(){return e._saturation},uOneOverGamma:function(){return 1/e._gamma},uFeatheringScale:function(){return e._featheringScale},uV3AffineX:function(){return e._v3AffineX},uV3AffineY:function(){return e._v3AffineY}}}function _0x895bc8(e,t,i){return o$1p.distance(e.positionWC,t.center)>i||e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC).computeVisibility(t)===Ae$w.OUTSIDE}function _0x3dee3a(e){var t=s$T.queryStringValue(e,"VideoName"),i=s$T.queryFirstNode(e,"Fov"),n=s$T.queryNumericValue(i,"Horizontal"),r=s$T.queryNumericValue(i,"Vertical"),o=s$T.queryNumericValue(e,"Distance"),a=s$T.queryNumericValue(e,"Heading"),s=s$T.queryNumericValue(e,"Pitch"),l=s$T.queryNumericValue(e,"Roll"),u=s$T.queryFirstNode(e,"ViewPosition"),c=[0,0,0];c[0]=s$T.queryNumericValue(u,"X"),c[1]=s$T.queryNumericValue(u,"Y"),c[2]=s$T.queryNumericValue(u,"Z");var h=s$T.queryFirstNode(e,"Matrix"),d=s$T.queryStringValue(h,"U"),f=s$T.queryStringValue(h,"V");s$T.queryStringValue(h,"W");var p=d.split(","),_=new o$1p(parseFloat(p[0]),parseFloat(p[1]),parseFloat(p[2])),m=f.split(","),g=new o$1p(parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])),x=s$T.queryFirstNode(e,"Bounds"),y=void 0;if(x){var v=e$2d.toRadians(s$T.queryNumericValue(x,"Left")),$=e$2d.toRadians(s$T.queryNumericValue(x,"Top")),b=e$2d.toRadians(s$T.queryNumericValue(x,"Right")),T=new h$18(v,e$2d.toRadians(s$T.queryNumericValue(x,"Bottom")),b,$),C=o*Math.cos(e$2d.toRadians(s));C=s<0?-C:C;var S=c[2]+C;y=i$1d.fromRectangle3D(T,void 0,S)}return{videoName:t,viewPosition:c,heading:a,pitch:s,roll:l,horizontalFov:n,verticalFov:r,matrixU:_,matrixV:g,distance:o,boundingSphere:y}}function _0x1eb5d1(e,t){var i=document.getElementById("projection-image");e$2e(i)||((i=document.createElement("div")).setAttribute("id","projection-image"),document.body.appendChild(i));var n=document.createElement("video");return n.style="visibility:hidden;position:absolute;top:0px;left:0px;",n.setAttribute("width","320"),n.setAttribute("height","240"),n.setAttribute("autoplay","autoplay"),n.setAttribute("loop","loop"),n.setAttribute("crossorigin","crossorigin"),n.setAttribute("src",e),n.setAttribute("id","projection-image-"+t),i.appendChild(n),n}function _0x735ac(e,t){for(var i=o$1p.fromDegreesArrayHeights(t),n=new U$18({polygonHierarchy:{positions:i},vertexFormat:{bitangent:!1,color:!1,normal:!1,position:!0,st:!1,tangent:!1},perPositionHeight:!0}),r=U$18.createGeometry(n),o=[],a=1;a<i.length-1;a++)o.push(0),o.push(a),o.push(a+1);r.indices=o;var s=new p$1d;p$1d.inverse(e._invertViewMatrix,s),f$Z.updateGeometry(r,t,s);var l=new f$Z;return l._geometry=r,l}function _0xec6f2e(e,t,i){if(e._polygonUpdate&&0!==e._polygonRegions.values.length){e._polygonUpdate=!1;var n=new t$W({color:new e$1X(0,0,0,0),depth:1});n.framebuffer=new t$V({context:t,colorTextures:[e._polygonTexture],destroyAttachments:!1}),n.renderState=d$1m.fromCache(),n.execute(t);for(var r=0;r<e._polygonRegions.values.length;r++){var o=e._polygonRegions.values[r];_0x3f2329(e,t,o,e._polygonTexture),o._command.execute(t)}n.framebuffer.destroy()}}function _0x3f2329(e,t,i,n){if(e$2e(i)&&!e$2e(i._command)){var r=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix});i._command=r;var o={position:0};r.vertexArray=c$13.fromGeometry({context:t,geometry:i._geometry,attributeLocations:o,bufferUsage:A$18.STATIC_DRAW,interleave:!0});var a=new s$V({sources:["attribute vec4 position;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n}\n"]}),s=new s$V({sources:["void main()\n{\n gl_FragColor = vec4(1.0);\n}\n"]});r.shaderProgram=r$14.fromCache({name:"ProjectionImageRasterRegion",context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:o}),r.framebuffer=new t$V({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=d$1m.fromCache({cull:{enabled:!1}})}}function _0x590c2a(e,t){if(e$2e(e._colorCommand)){var i=e._scene._context,n=e._colorCommand.shaderProgram.name,r=e._colorCommand.shaderProgram.fragmentShaderSource,o=e._colorCommand.shaderProgram.vertexShaderSource,a=r.defines.indexOf("CLIPPOLYGON");t?a<0&&r.defines.push("CLIPPOLYGON"):a>=0&&r.defines.splice(a,1),e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=r$14.fromCache({name:n,context:i,vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:e._attributeLocations})}}function p$_(){if(!e$2e(i$W._canTransferArrayBuffer)){var e=new Worker(w$U("Workers/transferTypedArrayTest.js"));e.postMessage=u$Z(e.webkitPostMessage,e.postMessage);var t=new Int8Array([99]);try{e.postMessage({array:t},[t.buffer])}catch{return i$W._canTransferArrayBuffer=!1,i$W._canTransferArrayBuffer}var i=o$1l.defer();e.onmessage=function(t){var n=t.data.array,r=e$2e(n)&&99===n[0];i.resolve(r),e.terminate(),i$W._canTransferArrayBuffer=r},i$W._canTransferArrayBuffer=i.promise}return i$W._canTransferArrayBuffer}_0x337a3e.prototype.update=function(e,t,i){if(!t._fboState.enabled&&this._visible){var n=t.camera;if(!n.bReflect&&(!e$2e(this._boundingSphereFromXML)||!_0x895bc8(n,this._boundingSphereFromXML,this._visibleDistanceMax))&&(0===this._boundingSphere.radius||this._update||!_0x895bc8(n,this._boundingSphere,this._visibleDistanceMax))&&(p$1d.multiply(this._viewProjMatrix,n.inverseViewMatrix,this._renderTextureMatrix),p$1d.multiply(this._polygonViewProjMatrix,n.inverseViewMatrix,this._polygonTextureMatrix),e$2e(this._video)&&this._video.readyState>=2&&(e$2e(this._texture)&&this._texture!==e.defaultTexture?this._texture.copyFrom(this._video):this._texture=new t$U({context:e,source:this._video})),e$2e(this._texture))){var r=this._scene;if(this._update&&(this._frameState=t,e$2e(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new s$U(e),this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),this._update=!1,_0x3d42bd(this),_0x3480f4(this,e,t),_0x6cb510(this,e)),this._polygonUpdate&&_0xec6f2e(this,e),e$2e(this._cameraDepthBuffer.depthTexture)){if(!e$2e(this._planeCommand)&&this._mode===_0x403af5.ProjectToPlane&&(_0x3155cf(this,e),e$2e(this._fusionLayers)&&this._fusionLayers.length>0))for(var o=0,a=this._fusionLayers.length;o<a;o++){var s=this._fusionLayers[o];s.enableFusion=!0,s.panOffset=r.screenSpaceCameraController.panOffset}if(e$2e(this._planeCommand)&&this._mode===_0x403af5.ProjectToPlane)return(r.screenSpaceCameraController.panDirty||r.screenSpaceCameraController.zoomDirty)&&(this._planeCommand.vertexArray=this._planeCommand.vertexArray&&this._planeCommand.vertexArray.destroy(),this._planeCommand.shaderProgram=this._planeCommand.shaderProgram&&this._planeCommand.shaderProgram.destroy(),_0x3155cf(this,e)),void i.push(this._planeCommand);e$2e(this._clearStencilCommand)&&i.push(this._clearStencilCommand),e$2e(this._stencilCommand)&&i.push(this._stencilCommand),e$2e(this._colorCommand)&&i.push(this._colorCommand),e$2e(this._lineCommand)&&this._hintLineVisible&&i.push(this._lineCommand)}}}},_0x337a3e.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~3");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,e$2e(this._cameraDepthBuffer)&&(this._cameraDepthBuffer._visibleViewport=this._visibleViewport)},_0x337a3e.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~3");return 1<<e&this._visibleViewport},_0x337a3e.prototype.setImage=function(e){if(LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.url)&&!e$2e(e.video)&&!e$2e(e.image))throw new t$15("options.url or options.video or options.image are required.");if(e$2e(e.url)){var t=e.url,i=this;o$1l(t$S(t),(function(e){i._texture!==i._scene._context.defaultTexture&&(i._texture=i._texture&&i._texture.destroy()),i._texture=new t$U({context:i._scene._context,source:e})}))}else e$2e(e.image)?e$2e(this._texture)?this._texture.copyFrom(e.image):this._texture=new t$U({context:this._scene._context,source:e.image}):this._video=e.video},_0x337a3e.prototype.setDistDirByPoint=function(e){if(LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),e[0]===this._viewPosition[0]&&e[1]===this._viewPosition[1]&&e[2]===this._viewPosition[2])throw new t$15("the position is [longitude, latitude ,height] and is not equals viewPosition");var t,i,n=(l=this._scene._frameState.camera)._projection;if(this._scene.mode===C$14.SCENE3D)t=o$1p.fromDegreesArrayHeights(e)[0],i=o$1p.fromDegreesArrayHeights(this._viewPosition)[0];else{var r=a$18.fromDegrees(e[0],e[1],e[2]);t=n.project(r,new o$1p);var o=a$18.fromDegrees(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]);i=n.project(o,new o$1p)}var a=new o$1p;o$1p.subtract(t,i,a);var s=o$1p.magnitude(a);o$1p.normalize(a,a),this.distance=s;var l,u=(l=this._scene._frameState.camera).heading,c=l.pitch,h=l.roll,d=new o$1p;o$1p.clone(l.position,d);var f=a.clone(),p=i.clone();p=o$1p.normalize(p,p),Math.abs(o$1p.dot(p,f))>=1&&(p=Math.abs(o$1p.dot(f,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,p):o$1p.clone(o$1p.UNIT_Z,p));var _=new o$1p;o$1p.cross(p,f,_),_=o$1p.normalize(_,_),o$1p.cross(f,_,p),p=o$1p.normalize(p,p),l.setView({destination:i,orientation:{direction:f,up:p},convert:!1}),this.direction=l.heading*e$2d.DEGREES_PER_RADIAN,this.pitch=l.pitch*e$2d.DEGREES_PER_RADIAN,l.setView({destination:d,orientation:{heading:u,pitch:c,roll:h},convert:!1})},_0x337a3e.prototype.pixelToWorldCoordinates=function(e,t){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");var i=this._scene.context,n=this._texture.width,r=this._texture.height,o=e/n*i.drawingBufferWidth,a=i.drawingBufferHeight-t/r*i.drawingBufferHeight;i.drawingBufferHeight;var s=i.readPixels({x:o,y:a,width:1,height:1,framebuffer:this._cameraDepthBuffer.framebuffer}),l=e$2c.unpack(s,0,_0x1152f2);e$2c.divideByScalar(l,255,l);var u=e$2c.dot(l,_0x2a0e7d),c=p$1d.inverse(this._viewProjMatrix,new p$1d),h=new e$2c,d=this._scene._view.passState.viewport;h.x=(o-d.x)/d.width*2-1,h.y=(a-d.y)/d.height*2-1,i.webgpu?h.z=u:h.z=2*u-1,h.w=1;var f=p$1d.multiplyByVector(c,h,new e$2c);n=1/f.w;return o$1p.multiplyByScalar(f,n,f),o$1p.fromCartesian4(f,new o$1p)},_0x337a3e.prototype.pixelToWorldCoordinates=function(e,t){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");var i=this._scene.context,n=this._texture.width,r=this._texture.height,o=e/n*i.drawingBufferWidth,a=i.drawingBufferHeight-t/r*i.drawingBufferHeight,s=this;return i.readPixelsAsync({x:o,y:a,width:1,height:1,framebuffer:s._cameraDepthBuffer.framebuffer}).then((e=>{var t=e$2c.unpack(e,0,_0x1152f2);e$2c.divideByScalar(t,255,t);var n=e$2c.dot(t,_0x2a0e7d),r=p$1d.inverse(s._viewProjMatrix,new p$1d),l=new e$2c,u=s._scene._view.passState.viewport;l.x=(o-u.x)/u.width*2-1,l.y=(a-u.y)/u.height*2-1,i.webgpu?l.z=n:l.z=2*n-1,l.w=1;var c=p$1d.multiplyByVector(r,l,new e$2c),h=1/c.w;o$1p.multiplyByScalar(c,h,c),Promise.resolve(o$1p.fromCartesian4(c,new o$1p))}))},_0x337a3e.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),""===this._name&&(this._name="projectionimage"+this._scene._analyst3D._layerIndex,this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},_0x337a3e.prototype.setInfo=function(e){if(LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),!e$2e(e))throw new t$15("No url provided.");var t=this;return d$1f(e).then((function(e){var i=_0x3dee3a(e.firstChild);t.direction=i.heading,t.pitch=u$Z(i.pitch,t.pitch),t._roll=u$Z(i.roll,t._roll),t.horizontalFov=i.horizontalFov,t.verticalFov=i.verticalFov,o$1p.clone(i.matrixU,t._v3AffineX),o$1p.clone(i.matrixV,t._v3AffineY),t.distance=i.distance,t.viewPosition=i.viewPosition,t._boundingSphereFromXML=i.boundingSphere})).otherwise((function(e){console.error(e)}))},_0x337a3e.fromInfo=function(e,t,i){if(!e$2e(e))throw new t$15("No scene provided.");if(!e$2e(t))throw new t$15("No url provided.");return d$1f(t).then((function(n){for(var r={},o=n.firstChild,a=0,s=o.children.length;a<s;a++){var l=_0x3dee3a(o.children[a]),u=l.videoName;u=e$2e(i)?n$1a(i)+l.videoName:t.slice(0,t.lastIndexOf("/")+1)+l.videoName;var c=new _0x337a3e(e),h=_0x1eb5d1(u,c._guid);c.viewPosition=l.viewPosition,c.direction=l.heading,c.pitch=l.pitch,c.horizontalFov=l.horizontalFov,c.verticalFov=l.verticalFov,o$1p.clone(l.matrixU,c._v3AffineX),o$1p.clone(l.matrixV,c._v3AffineY),c.distance=l.distance,c.setImage({video:h}),c._boundingSphereFromXML=l.boundingSphere,h.addEventListener("loadeddata",function(e){e.build()}.bind(h,c)),r[l.videoName]=c}return r})).otherwise((function(e){console.error(e)}))},_0x337a3e.prototype.destroy=function(){var e=document.getElementById("projection-image-"+this._guid);if(e){var t=e.parentNode;t.removeChild(e),0===t.children.length&&t.parentNode.removeChild(t)}e$2e(this._frameState)&&(e$2e(this._cameraDepthBuffer)&&delete this._frameState._framebufferList[this._cameraName],this._frameState=void 0),this._cameraDepthBuffer=this._cameraDepthBuffer&&this._cameraDepthBuffer.destroy(),_0x3d42bd(this),this._clearStencilCommand=void 0,this._texture!==this._scene._context.defaultTexture&&(this._texture=this._texture&&this._texture.destroy());for(var i=0;i<this._polygonRegions.values.length;i++)this._polygonRegions.values[i].destroy(),this._polygonRegions.values[i]=null;if(e$2e(this._polygonTexture)&&(this._polygonTexture.destroy(),this._polygonTexture=null),this._scene._analyst3D.remove(this._name,!0),this._scene.context.curFusionViewMatrix=void 0,this._scene.screenSpaceCameraController.enableFusion=!1,e$2e(this._fusionLayers)){i=0;for(var n=this._fusionLayers.length;i<n;i++){var r=this._fusionLayers[i];r.enableFusion&&(r.enableFusion=!1)}}return this._fusionLayers=void 0,i$11(this)},_0x337a3e.prototype.setClipMode=function(e){this._polygonMode=e},_0x337a3e.prototype.addClipRegion=function(e){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");var t=e.name,i=e.position;if(!e$2e(t)||!e$2e(i))return!1;if(e$2e(this._polygonRegions.get(t)))return!1;var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;e$2e(this._polygonTexture)||(this._polygonTexture=new t$U({context:this._scene._context,width:n,height:r,pixelFormat:V$12.RGBA}));var o=_0x735ac(this,i);this._polygonRegions.set(t,o),this._polygonUpdate=!0;var a=this._frameState.camera;return p$1d.multiply(a.frustum.projectionMatrix,a.viewMatrix,this._polygonViewProjMatrix),_0x590c2a(this,!0),!0},_0x337a3e.prototype.removeClipRegion=function(e){return LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),!!this._polygonRegions.remove(e)&&(this._polygonUpdate=!0,0===this._polygonRegions.values.length&&_0x590c2a(this,!1),!0)},_0x337a3e.prototype.removeAllClipRegion=function(){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");for(var e=0;e<this._polygonRegions.values.length;e++)this._polygonRegions.values[e].destroy(),this._polygonRegions.values[e]=null;this._polygonRegions.removeAll(),this._polygonUpdate=!0,_0x590c2a(this,!1)},_0x337a3e.prototype.setFusionLayers=function(e){LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),Array.isArray(e)||(e=[e]),this._fusionLayers=e};var c$12=new o$1h,k$X;function v$M(e,t){"indexedDBWorker"===e._workerName?--e._activeIndexedDBTasks:"websocketTaskProcessor"!=e._workerName&&--e._activeTasks;var i=t.id;if(e$2e(i)){var n=e._deferreds,r=n[i];if(e$2e(t.error)){var o=t.error;"RuntimeError"===o.name?(o=new t$13(t.error.message)).stack=t.error.stack:"DeveloperError"===o.name&&((o=new t$15(t.error.message)).stack=t.error.stack),c$12.raiseEvent(o),r.reject(o)}else c$12.raiseEvent(),r.resolve(t.result);delete n[i]}}function w$U(e){var t=n$17(e);if(i$19(t)){var i,n='importScripts("'+t+'");';try{i=new Blob([n],{type:"application/javascript"})}catch{var r=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);r.append(n),i=r.getBlob("application/javascript")}t=(window.URL||window.webkitURL).createObjectURL(i)}return t}function x$15(){return e$2e(k$X)||(k$X=w$U("Workers/workerBootstrapper.js")),k$X}function h$_(e){var t=new Worker(x$15());t.postMessage=u$Z(t.webkitPostMessage,t.postMessage);var i={loaderConfig:{paths:{Workers:n$17("Workers")},baseUrl:n$17.getCesiumBaseUrl().url},workerModule:i$W._workerModulePrefix+e._workerName};return t.postMessage(i),t.onmessage=function(t){v$M(e,t.data)},t}function P$Y(e,t){var i={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};return s$Z.supportsWebAssembly()?(i.modulePath=n$17(t.modulePath),i.wasmBinaryFile=n$17(t.wasmBinaryFile),t$10.fetchArrayBuffer({url:i.wasmBinaryFile}).then((function(e){return i.wasmBinary=e,i}))):(i.modulePath=n$17(t.fallbackModulePath),o$1l.resolve(i))}function i$W(e,t){this._workerName=e,this._maximumActiveTasks=u$Z(t,5),this._activeTasks=0,this._deferreds={},this._activeIndexedDBTasks=0,this._nextID=0}var D$_=[];i$W.prototype.scheduleTask=function(e,t){if(e$2e(this._worker)||(this._worker=h$_(this)),"indexedDBWorker"===this._workerName){if(this._activeIndexedDBTasks>=this._maximumActiveTasks)return;++this._activeIndexedDBTasks}else{if(this._activeTasks>=this._maximumActiveTasks)return;"websocketTaskProcessor"!=this._workerName&&++this._activeTasks}var i=this;return o$1l(p$_(),(function(n){e$2e(t)?n||(t.length=0):t=D$_;var r=i._nextID++,o=o$1l.defer();return i._deferreds[r]=o,i._worker.postMessage({id:r,parameters:e,canTransferArrayBuffer:n},t),o.promise}))},i$W.prototype.initWebAssemblyModule=function(e){e$2e(this._worker)||(this._worker=h$_(this));var t=o$1l.defer(),i=this,n=this._worker;return P$Y(this,e).then((function(e){return o$1l(p$_(),(function(r){var o,a=e.wasmBinary;e$2e(a)&&r&&(o=[a]),n.onmessage=function(e){n.onmessage=function(e){v$M(i,e.data)},t.resolve(e.data)},n.postMessage({webAssemblyConfig:e},o)}))})),t},i$W.prototype.isDestroyed=function(){return!1},i$W.prototype.destroy=function(){return e$2e(this._worker)&&this._worker.terminate(),i$11(this)},i$W.taskCompletedEvent=c$12,i$W._defaultWorkerModulePrefix="Workers/",i$W._workerModulePrefix=i$W._defaultWorkerModulePrefix,i$W._canTransferArrayBuffer=void 0;var _0x3993e9=(_0x376627=!0,function(e,t){var i=_0x376627?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x376627=!1,i}),_0x2bd584=_0x3993e9(void 0,(function(){return _0x2bd584.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bd584).search("(((.+)+)+)+$")})),_0x376627;_0x2bd584();var _0x126a39="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nattribute vec2 offset;\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying vec2 vOffset;\n\nfloat computerOnePixelLength(vec4 viewPos)\n{\n vec4 winPos = czm_projection * viewPos;\n float dwidth = czm_metersPerPixel(viewPos);\n winPos.x = winPos.x - 2.0 * dwidth;\n vec4 newViewPos = czm_inverseProjection * winPos;\n return length(viewPos - newViewPos);\n}\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n float radius = 10.0;\n vec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n viewPos.xy = viewPos.xy + offset * computerOnePixelLength(viewPos) * radius;\n gl_Position = czm_projection * viewPos;\n vTexCoord = aTexCoord0.xy;\n vOffset = offset;\n //clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n}",_0x230123=(_0x5ecb58=!0,function(e,t){var i=_0x5ecb58?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ecb58=!1,i}),_0x329bcc=_0x230123(void 0,(function(){return _0x329bcc.toString().search("(((.+)+)+)+$").toString().constructor(_0x329bcc).search("(((.+)+)+)+$")})),_0x5ecb58;_0x329bcc();var _0x46d19a="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uTexture0;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying vec2 vOffset;\n\nfloat fade(in float low, in float high, in float value)\n{\n\tfloat mid = (low + high) * 0.5;\n\tfloat range = (high - low) * 0.5;\n\tfloat x = 1.0 - clamp(abs(mid - value) / range, 0.0, 1.0);\n\treturn x;\n}\n\nvec3 getColor(in float intensity)\n{\n\tvec3 blue = vec3(0.0, 0.0, 1.0);\n\tvec3 cyan = vec3(0.0, 1.0, 1.0);\n\tvec3 green = vec3(0.0, 1.0, 0.0);\n\tvec3 yellow = vec3(1.0, 1.0, 0.0);\n\tvec3 red = vec3(1.0, 0.0, 0.0);\n\tvec3 color = fade(-0.25, 0.25, intensity) * blue + fade(0.0, 0.5, intensity) * cyan + fade(0.25, 0.75, intensity) * green + \n\t\t\t\tfade(0.5, 1.0, intensity) * yellow + smoothstep(0.75, 1.0, intensity) * red;\n\treturn color;\n}\n#ifdef COLOR_TABLE\nuniform sampler2D uHypsometricTexture;\nvec4 getContourMapColor(in float intensity){\n float count = floor(intensity * 16.0);\n float y = (count * 2.0 + 1.0) / 32.0;\n float x = fract(intensity * 16.0);\n return texture2D(uHypsometricTexture, vec2(x, y));\n}\n#endif\n\nvoid main()\n{\n\tvec2 texcoord = vTexCoord.xy * 0.5 + 0.5;\n\tfloat fIntensity = czm_unpackDepth(texture2D(uTexture0, texcoord.xy));\n float dist = 1.0 - length(vOffset);\n\tif(dist < 0.5)\n\t{\n\t\tdiscard;\n\t}\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef COLOR_TABLE\n\tgl_FragColor = getContourMapColor(fIntensity);\n#else\n\tgl_FragColor = vec4(getColor(fIntensity), 1.0);\n#endif\n}",_0x3afa7f=(_0x9c3677=!0,function(e,t){var i=_0x9c3677?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x9c3677=!1,i}),_0xd13cd1=_0x3afa7f(void 0,(function(){return _0xd13cd1.toString().search("(((.+)+)+)+$").toString().constructor(_0xd13cd1).search("(((.+)+)+)+$")})),_0x9c3677;_0xd13cd1();var _0x1f9203="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nattribute vec2 offset;\n\nvarying vec4 vPositionEC;\nvarying vec2 vTexcoord;\n\nfloat computerOnePixelLength(vec4 viewPos)\n{\n vec4 winPos = czm_projection * viewPos;\n float dwidth = czm_metersPerPixel(viewPos);\n winPos.x = winPos.x - 2.0 * dwidth;\n vec4 newViewPos = czm_inverseProjection * winPos;\n return length(viewPos - newViewPos);\n}\n\nvoid main()\n{\n\tvTexcoord = aTexCoord0.xy * 0.5 + 0.5;\n\t//vTexcoord.y = 1.0 - vTexcoord.y;\n\tvPositionEC = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec2 pixelLength = 1.0 / czm_viewport.zw;\n\tgl_Position = vec4(aTexCoord0.xy + pixelLength * offset * 4.0, 0.5, 1.0);\n}",_0x19dfbd=(_0x1a9262=!0,function(e,t){var i=_0x1a9262?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a9262=!1,i}),_0x33c12b=_0x19dfbd(void 0,(function(){return _0x33c12b.toString().search("(((.+)+)+)+$").toString().constructor(_0x33c12b).search("(((.+)+)+)+$")})),_0x1a9262;_0x33c12b();var _0x138bac="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform float uSpacing;\nuniform sampler2D shadowMap_texture;\nuniform sampler2D uAssisTexture;\n\nvarying vec4 vPositionEC;\nvarying vec2 vTexcoord;\n\n#define inline\nfloat sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture2D(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\n\n\n#define inline\nfloat shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, sampleShadowMap(shadowMap, uv));\n}\n\nvoid main()\n{\n\tgl_FragColor = texture2D(uAssisTexture, vTexcoord);\n\tvec4 positionEC = vPositionEC;\n\tfloat depth = -positionEC.z;\n\tvec4 weights = czm_cascadeWeights(depth);\n\tvec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;\n\tfloat visibility = shadowDepthCompare(shadowMap_texture, shadowPosition.xy, shadowPosition.z);\n\tif(visibility < 0.001)\n\t{\n\t\treturn;\n\t}\n\tif(depth > shadowMap_cascadeSplits[1].w)\n\t{\n\t\treturn;\n\t}\n\tfloat oldIntensity = czm_unpackDepth(gl_FragColor);\n\tfloat intensity = oldIntensity + uSpacing;\n\tintensity = clamp(intensity, 0.0, 0.9999);\n\tgl_FragColor = czm_packDepth(intensity);\n}",B$X=new o$1p;function o$17(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).minimum,i=e.maximum;if(o$1q.typeOf.object("min",t),o$1q.typeOf.object("max",i),e$2e(e.offsetAttribute)&&e.offsetAttribute===_0x39c22a.TOP)throw new t$15("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=o$1p.clone(t),this._max=o$1p.clone(i),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}o$17.fromDimensions=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).dimensions;o$1q.typeOf.object("dimensions",t),o$1q.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=o$1p.multiplyByScalar(t,.5,new o$1p);return new o$17({minimum:o$1p.negate(i,new o$1p),maximum:i,offsetAttribute:e.offsetAttribute})},o$17.fromAxisAlignedBoundingBox=function(e){return o$1q.typeOf.object("boundindBox",e),new o$17({minimum:e.minimum,maximum:e.maximum})},o$17.packedLength=2*o$1p.packedLength+1,o$17.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),o$1p.pack(e._min,t,i),o$1p.pack(e._max,t,i+o$1p.packedLength),t[i+2*o$1p.packedLength]=u$Z(e._offsetAttribute,-1),t};var y$T=new o$1p,A$15=new o$1p,v$L={minimum:y$T,maximum:A$15,offsetAttribute:void 0};function o$16(e,t,i,n){e=u$Z(e,1),t=u$Z(t,1),i=u$Z(i,1),n=u$Z(n,1),this.value=new Uint8Array([e$1X.floatToByte(e),e$1X.floatToByte(t),e$1X.floatToByte(i),e$1X.floatToByte(n)])}function l$10(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=u$Z(e.near,1),this._near=this.near,this.far=u$Z(e.far,5e8),this._far=this.far,this._cullingVolume=new i$X,this._perspectiveMatrix=new p$1d,this._infinitePerspective=new p$1d}function z$V(e){if(!(e$2e(e.right)&&e$2e(e.left)&&e$2e(e.top)&&e$2e(e.bottom)&&e$2e(e.near)&&e$2e(e.far)))throw new t$15("right, left, top, bottom, near, or far parameters are not set.");var t=e.top,i=e.bottom,n=e.right,r=e.left,o=e.near,a=e.far;if(t!==e._top||i!==e._bottom||r!==e._left||n!==e._right||o!==e._near||a!==e._far){if(e.near<=0||e.near>e.far)throw new t$15("near must be greater than zero and less than far.");e._left=r,e._right=n,e._top=t,e._bottom=i,e._near=o,e._far=a,e._perspectiveMatrix=p$1d.computePerspectiveOffCenter(r,n,i,t,o,a,e._perspectiveMatrix),e._infinitePerspective=p$1d.computeInfinitePerspectiveOffCenter(r,n,i,t,o,e._infinitePerspective)}}o$17.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=o$1p.unpack(e,t,y$T),r=o$1p.unpack(e,t+o$1p.packedLength,A$15),o=e[t+2*o$1p.packedLength];return e$2e(i)?(i._min=o$1p.clone(n,i._min),i._max=o$1p.clone(r,i._max),i._offsetAttribute=-1===o?void 0:o,i):(v$L.offsetAttribute=-1===o?void 0:o,new o$17(v$L))},o$17.createGeometry=function(e){var t=e._min,i=e._max;if(!o$1p.equals(t,i)){var n=new a$_,r=new Uint16Array(24),o=new Float64Array(24);o[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=i.x,o[4]=t.y,o[5]=t.z,o[6]=i.x,o[7]=i.y,o[8]=t.z,o[9]=t.x,o[10]=i.y,o[11]=t.z,o[12]=t.x,o[13]=t.y,o[14]=i.z,o[15]=i.x,o[16]=t.y,o[17]=i.z,o[18]=i.x,o[19]=i.y,o[20]=i.z,o[21]=t.x,o[22]=i.y,o[23]=i.z,n.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:o}),r[0]=4,r[1]=5,r[2]=5,r[3]=6,r[4]=6,r[5]=7,r[6]=7,r[7]=4,r[8]=0,r[9]=1,r[10]=1,r[11]=2,r[12]=2,r[13]=3,r[14]=3,r[15]=0,r[16]=0,r[17]=4,r[18]=1,r[19]=5,r[20]=2,r[21]=6,r[22]=3,r[23]=7;var a=o$1p.subtract(i,t,B$X),s=.5*o$1p.magnitude(a);if(e$2e(e._offsetAttribute)){var l=o.length,u=new Uint8Array(l/3);d$1s(u,e._offsetAttribute===_0x39c22a.NONE?0:1),n.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return new I$1p({attributes:n,indices:r,primitiveType:W$18.LINES,boundingSphere:new i$1d(o$1p.ZERO,s),offsetAttribute:e._offsetAttribute})}},Object.defineProperties(o$16.prototype,{componentDatatype:{get:function(){return S$14.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}}),o$16.fromColor=function(e){if(!e$2e(e))throw new t$15("color is required.");return new o$16(e.red,e.green,e.blue,e.alpha)},o$16.toValue=function(e,t){if(!e$2e(e))throw new t$15("color is required.");return e$2e(t)?e.toBytes(t):new Uint8Array(e.toBytes())},o$16.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]},Object.defineProperties(l$10.prototype,{projectionMatrix:{get:function(){return z$V(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return z$V(this),this._infinitePerspective}}});var B$W=new o$1p,O$L=new o$1p,S$T=new o$1p,V$V=new o$1p;function o$15(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._offCenterFrustum=new l$10,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=u$Z(e.near,1),this._near=this.near,this.far=u$Z(e.far,5e8),this._far=this.far,this.xOffset=u$Z(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=u$Z(e.yOffset,0),this._yOffset=this.yOffset,this.reflect=!1}function f$Y(e){if(!(e$2e(e.fov)&&e$2e(e.aspectRatio)&&e$2e(e.near)&&e$2e(e.far)))throw new t$15("fov, aspectRatio, near, or far parameters are not set.");var t=e._offCenterFrustum;if(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset){if(e.fov<0||e.fov>=Math.PI)throw new t$15("fov must be in the range [0, PI).");if(e.aspectRatio<0)throw new t$15("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new t$15("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset}}l$10.prototype.resetProjectionMatrix=function(){if(!(e$2e(this.right)&&e$2e(this.left)&&e$2e(this.top)&&e$2e(this.bottom)&&e$2e(this.near)&&e$2e(this.far)))throw new t$15("right, left, top, bottom, near, or far parameters are not set.");var e=this.top,t=this.bottom,i=this.right,n=this.left,r=this.near,o=this.far;if(this.near<=0||this.near>this.far)throw new t$15("near must be greater than zero and less than far.");this._left=n,this._right=i,this._top=e,this._bottom=t,this._near=r,this._far=o,this._perspectiveMatrix=p$1d.computePerspectiveOffCenter(n,i,t,e,r,o,this._perspectiveMatrix),this._infinitePerspective=p$1d.computeInfinitePerspectiveOffCenter(n,i,t,e,r,this._infinitePerspective)},l$10.prototype.computeCullingVolume=function(e,t,i,n){if(!e$2e(e))throw new t$15("position is required.");if(!e$2e(t))throw new t$15("direction is required.");if(!e$2e(i))throw new t$15("up is required.");var r=this._cullingVolume.planes,o=u$Z(n,0);o=Math.min(o,.5),o=Math.max(o,0);var a=this.top+this.top*o,s=this.bottom-this.top*o,l=this.right+this.right*o,u=this.left-this.right*o,c=this.near,h=this.far,d=o$1p.cross(t,i,B$W),f=O$L;o$1p.multiplyByScalar(t,c,f),o$1p.add(e,f,f);var p=S$T;o$1p.multiplyByScalar(t,h,p),o$1p.add(e,p,p);var _=V$V;o$1p.multiplyByScalar(d,u,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.normalize(_,_),o$1p.cross(_,i,_),o$1p.normalize(_,_);var m=r[0];return e$2e(m)||(m=r[0]=new e$2c),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),o$1p.multiplyByScalar(d,l,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.cross(i,_,_),o$1p.normalize(_,_),e$2e(m=r[1])||(m=r[1]=new e$2c),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),o$1p.multiplyByScalar(i,s,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.cross(d,_,_),o$1p.normalize(_,_),e$2e(m=r[2])||(m=r[2]=new e$2c),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),o$1p.multiplyByScalar(i,a,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.cross(_,d,_),o$1p.normalize(_,_),e$2e(m=r[3])||(m=r[3]=new e$2c),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),e$2e(m=r[4])||(m=r[4]=new e$2c),m.x=t.x,m.y=t.y,m.z=t.z,m.w=-o$1p.dot(t,f),o$1p.negate(t,_),e$2e(m=r[5])||(m=r[5]=new e$2c),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,p),this._cullingVolume},l$10.prototype.getPixelDimensions=function(e,t,i,n,r){if(z$V(this),!e$2e(e)||!e$2e(t))throw new t$15("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new t$15("drawingBufferWidth must be greater than zero.");if(t<=0)throw new t$15("drawingBufferHeight must be greater than zero.");if(!e$2e(i))throw new t$15("distance is required.");if(!e$2e(n))throw new t$15("pixelRatio is required");if(n<=0)throw new t$15("pixelRatio must be greater than zero.");if(!e$2e(r))throw new t$15("A result object is required.");var o=1/this.near,a=this.top*o,s=2*n*i*a/t,l=2*n*i*(a=this.right*o)/e;return r.x=l,r.y=s,r},l$10.prototype.clone=function(e){return e$2e(e)||(e=new l$10),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},l$10.prototype.equals=function(e){return e$2e(e)&&e instanceof l$10&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},l$10.prototype.equalsEpsilon=function(e,t,i){return e===this||e$2e(e)&&e instanceof l$10&&e$2d.equalsEpsilon(this.right,e.right,t,i)&&e$2d.equalsEpsilon(this.left,e.left,t,i)&&e$2d.equalsEpsilon(this.top,e.top,t,i)&&e$2d.equalsEpsilon(this.bottom,e.bottom,t,i)&&e$2d.equalsEpsilon(this.near,e.near,t,i)&&e$2d.equalsEpsilon(this.far,e.far,t,i)},o$15.isNDCHalfZRange=!1,o$15.packedLength=6,o$15.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.fov,t[i++]=e.aspectRatio,t[i++]=e.near,t[i++]=e.far,t[i++]=e.xOffset,t[i]=e.yOffset,t},o$15.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new o$15),i.fov=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t++],i.xOffset=e[t++],i.yOffset=e[t],i},Object.defineProperties(o$15.prototype,{projectionMatrix:{get:function(){return f$Y(this),this.reflect&&x$14(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return f$Y(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return f$Y(this),this._fovy}},sseDenominator:{get:function(){return f$Y(this),this._sseDenominator}}}),o$15.prototype.resetProjectionMatrix=function(){return this._offCenterFrustum.resetProjectionMatrix()},o$15.prototype.computeCullingVolume=function(e,t,i,n){return f$Y(this),this._offCenterFrustum.computeCullingVolume(e,t,i,n)},o$15.prototype.getPixelDimensions=function(e,t,i,n,r){return f$Y(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n,r)},o$15.prototype.clone=function(e){return e$2e(e)||(e=new o$15),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e.reflect=this.reflect,e.clipPlane=this.clipPlane,e.currentViewMatrix=this.currentViewMatrix,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},o$15.prototype.equals=function(e){return!!(e$2e(e)&&e instanceof o$15)&&(f$Y(this),f$Y(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},o$15.prototype.equalsEpsilon=function(e,t,i){return!!(e$2e(e)&&e instanceof o$15)&&(f$Y(this),f$Y(e),e$2d.equalsEpsilon(this.fov,e.fov,t,i)&&e$2d.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))};var r$$=new o$1m(o$1p.UNIT_Z,1),h$Z=new e$2c,c$11=new e$2c,s$Q=new e$2c;function x$14(e){if(e$2e(e.clipPlane)&&e$2e(e.currentViewMatrix)){var t=e.currentViewMatrix,i=e._offCenterFrustum.projectionMatrix;p$1d.multiplyByPlane(t,e.clipPlane,r$$),h$Z.x=(e$2d.sign(r$$.normal.x)+i[8])/i[0],h$Z.y=(e$2d.sign(r$$.normal.y)+i[9])/i[5],h$Z.z=-1,h$Z.w=(1+i[10])/i[14],c$11.x=r$$.normal.x,c$11.y=r$$.normal.y,c$11.z=r$$.normal.z,c$11.w=r$$.distance,e$2c.multiplyByScalar(c$11,2/e$2c.dot(c$11,h$Z),s$Q),i[2]=s$Q.x,i[6]=s$Q.y,i[10]=s$Q.z+1,i[14]=s$Q.w,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,i,i)}}var mi$6=new o$1p(1,1,1),B$V=Math.cos,S$S=Math.sin;function x$13(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.radii,mi$6),i=u$Z(e.innerRadii,t),n=u$Z(e.minimumClock,0),r=u$Z(e.maximumClock,e$2d.TWO_PI),o=u$Z(e.minimumCone,0),a=u$Z(e.maximumCone,e$2d.PI),s=Math.round(u$Z(e.stackPartitions,10)),l=Math.round(u$Z(e.slicePartitions,8)),u=Math.round(u$Z(e.subdivisions,128));if(s<1)throw new t$15("options.stackPartitions cannot be less than 1");if(l<0)throw new t$15("options.slicePartitions cannot be less than 0");if(u<0)throw new t$15("options.subdivisions must be greater than or equal to zero.");if(e$2e(e.offsetAttribute)&&e.offsetAttribute===_0x39c22a.TOP)throw new t$15("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=o$1p.clone(t),this._innerRadii=o$1p.clone(i),this._minimumClock=n,this._maximumClock=r,this._minimumCone=o,this._maximumCone=a,this._stackPartitions=s,this._slicePartitions=l,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}x$13.packedLength=2*o$1p.packedLength+8,x$13.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),o$1p.pack(e._radii,t,i),i+=o$1p.packedLength,o$1p.pack(e._innerRadii,t,i),i+=o$1p.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i++]=e._subdivisions,t[i]=u$Z(e._offsetAttribute,-1),t};var K$U=new o$1p,Q$$=new o$1p,b$16={radii:K$U,innerRadii:Q$$,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};function a$U(e){var t=u$Z(e.radius,1),i={radii:new o$1p(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new x$13(i),this._workerName="createSphereOutlineGeometry"}x$13.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n=o$1p.unpack(e,t,K$U);t+=o$1p.packedLength;var r=o$1p.unpack(e,t,Q$$);t+=o$1p.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return e$2e(i)?(i._radii=o$1p.clone(n,i._radii),i._innerRadii=o$1p.clone(r,i._innerRadii),i._minimumClock=o,i._maximumClock=a,i._minimumCone=s,i._maximumCone=l,i._stackPartitions=u,i._slicePartitions=c,i._subdivisions=h,i._offsetAttribute=-1===d?void 0:d,i):(b$16.minimumClock=o,b$16.maximumClock=a,b$16.minimumCone=s,b$16.maximumCone=l,b$16.stackPartitions=u,b$16.slicePartitions=c,b$16.subdivisions=h,b$16.offsetAttribute=-1===d?void 0:d,new x$13(b$16))},x$13.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._subdivisions,l=t$12.fromCartesian3(t),u=e._slicePartitions+1,c=e._stackPartitions+1;(u=Math.round(u*Math.abs(r-n)/e$2d.TWO_PI))<2&&(u=2),(c=Math.round(c*Math.abs(a-o)/e$2d.PI))<2&&(c=2);var h=0,d=1,f=i.x!==t.x||i.y!==t.y||i.z!==t.z,p=!1,_=!1;f&&(d=2,o>0&&(p=!0,h+=u),a<Math.PI&&(_=!0,h+=u));var m,g,x,y,v=s*d*(c+u),$=new Float64Array(3*v),b=2*(v+h-(u+c)*d),T=ce$z.createTypedArray(v,b),C=0,S=new Array(c),w=new Array(c);for(m=0;m<c;m++)y=o+m*(a-o)/(c-1),S[m]=S$S(y),w[m]=B$V(y);var E=new Array(s),P=new Array(s);for(m=0;m<s;m++)x=n+m*(r-n)/(s-1),E[m]=S$S(x),P[m]=B$V(x);for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(S.length=s,w.length=s,m=0;m<s;m++)y=o+m*(a-o)/(s-1),S[m]=S$S(y),w[m]=B$V(y);for(E.length=u,P.length=u,m=0;m<u;m++)x=n+m*(r-n)/(u-1),E[m]=S$S(x),P[m]=B$V(x);for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(C=0,m=0;m<c*d;m++){var A=m*s;for(g=0;g<s-1;g++)T[C++]=A+g,T[C++]=A+g+1}var L=c*s*d;for(m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f)for(L=c*s*d+u*s,m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f){var M=c*s*d,R=M+s*u;if(p)for(m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m;if(_)for(M+=s*u-u,R+=s*u-u,m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m}var O=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:$})});if(e$2e(e._offsetAttribute)){var D=$.length,I=new Uint8Array(D/3);d$1s(I,e._offsetAttribute===_0x39c22a.NONE?0:1),O.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new I$1p({attributes:O,indices:T,primitiveType:W$18.LINES,boundingSphere:i$1d.fromEllipsoid(l),offsetAttribute:e._offsetAttribute})}}},a$U.packedLength=x$13.packedLength,a$U.pack=function(e,t,i){return o$1q.typeOf.object("value",e),x$13.pack(e._ellipsoidGeometry,t,i)};var l$$=new x$13,s$P={radius:void 0,radii:new o$1p,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};function c$10(e,t,i,n,r,o,a,s,l,u,c){this._context=e,this._texture=t,this._textureTarget=i,this._targetFace=n,this._pixelDatatype=a,this._internalFormat=r,this._pixelFormat=o,this._size=s,this._preMultiplyAlpha=l,this._flipY=u,this._initialized=c}function X$X(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t,i,n=e.context,r=e.source;if(e$2e(r)){var o=[r.positiveX,r.negativeX,r.positiveY,r.negativeY,r.positiveZ,r.negativeZ];if(!(o[0]&&o[1]&&o[2]&&o[3]&&o[4]&&o[5]))throw new t$15("options.source requires positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ faces.");t=o[0].width,i=o[0].height;for(var a=1;a<6;++a)if(Number(o[a].width)!==t||Number(o[a].height)!==i)throw new t$15("Each face in options.source must have the same width and height.")}else t=e.width,i=e.height;var s=t,l=u$Z(e.pixelFormat,V$12.RGBA),u=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),c=V$12.toInternalFormat(l,u,n);if(!e$2e(t)||!e$2e(i))throw new t$15("options requires a source field to create an initialized cube map or width and height fields to create a blank cube map.");if(t!==i)throw new t$15("Width must equal height.");if(s<=0)throw new t$15("Width and height must be greater than zero.");if(s>e$1W.maximumCubeMapSize)throw new t$15("Width and height must be less than or equal to the maximum cube map size ("+e$1W.maximumCubeMapSize+"). Check maximumCubeMapSize.");if(!V$12.validate(l))throw new t$15("Invalid options.pixelFormat.");if(V$12.isDepthFormat(l))throw new t$15("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!_$_.validate(u))throw new t$15("Invalid options.pixelDatatype.");if(u===_$_.FLOAT&&!n.floatingPointTexture)throw new t$15("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(u===_$_.HALF_FLOAT&&!n.halfFloatingPointTexture)throw new t$15("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");var h=6*V$12.textureSizeInBytes(l,u,s,s),d=e.preMultiplyAlpha||l===V$12.RGB||l===V$12.LUMINANCE,f=u$Z(e.flipY,!0);const p=u$Z(e.skipColorSpaceConversion,!1);var _=n._gl,m=_.TEXTURE_CUBE_MAP,g=_.createTexture();function x(e,i,r,o,a){var h=i.arrayBufferView;e$2e(h)||(h=i.bufferView);let d=4;e$2e(h)&&(d=V$12.alignmentInBytes(l,u,t)),_.pixelStorei(_.UNPACK_ALIGNMENT,d),a?_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,_.NONE):_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,_.BROWSER_DEFAULT_WEBGL),e$2e(h)?(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,!1),o&&(h=V$12.flipY(h,l,u,s,s)),_.texImage2D(e,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),h)):(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,o),_.texImage2D(e,0,c,l,_$_.toWebGLConstant(u,n),i))}_.activeTexture(_.TEXTURE0),_.bindTexture(m,g),e$2e(r)?(x(_.TEXTURE_CUBE_MAP_POSITIVE_X,r.positiveX,d,f,p),x(_.TEXTURE_CUBE_MAP_NEGATIVE_X,r.negativeX,d,f,p),x(_.TEXTURE_CUBE_MAP_POSITIVE_Y,r.positiveY,d,f,p),x(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,r.negativeY,d,f,p),x(_.TEXTURE_CUBE_MAP_POSITIVE_Z,r.positiveZ,d,f,p),x(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,r.negativeZ,d,f,p)):(_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_X,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_X,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Y,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Z,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),null)),_.bindTexture(m,null),this._context=n,this._textureFilterAnisotropic=n._textureFilterAnisotropic,this._textureTarget=m,this._texture=g,this._pixelFormat=l,this._pixelDatatype=u,this._size=s,this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0;var y=e$2e(r);this._positiveX=new c$10(n,g,m,_.TEXTURE_CUBE_MAP_POSITIVE_X,c,l,u,s,d,f,y),this._negativeX=new c$10(n,g,m,_.TEXTURE_CUBE_MAP_NEGATIVE_X,c,l,u,s,d,f,y),this._positiveY=new c$10(n,g,m,_.TEXTURE_CUBE_MAP_POSITIVE_Y,c,l,u,s,d,f,y),this._negativeY=new c$10(n,g,m,_.TEXTURE_CUBE_MAP_NEGATIVE_Y,c,l,u,s,d,f,y),this._positiveZ=new c$10(n,g,m,_.TEXTURE_CUBE_MAP_POSITIVE_Z,c,l,u,s,d,f,y),this._negativeZ=new c$10(n,g,m,_.TEXTURE_CUBE_MAP_NEGATIVE_Z,c,l,u,s,d,f,y),this.sampler=e$2e(e.sampler)?e.sampler:new e$1S}function y$S(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t,i,n=e.context,r=e.source;if(e$2e(r)){var o=[r.positiveX,r.negativeX,r.positiveY,r.negativeY,r.positiveZ,r.negativeZ];if(!(o[0]&&o[1]&&o[2]&&o[3]&&o[4]&&o[5]))throw new t$15("options.source requires positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ faces.");t=o[0].width,i=o[0].height;for(var a=1;a<6;++a)if(Number(o[a].width)!==t||Number(o[a].height)!==i)throw new t$15("Each face in options.source must have the same width and height.")}else t=e.width,i=e.height;var s=t,l=u$Z(e.pixelFormat,V$12.RGBA),u=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE);if(!e$2e(t)||!e$2e(i))throw new t$15("options requires a source field to create an initialized cube map or width and height fields to create a blank cube map.");if(t!==i)throw new t$15("Width must equal height.");if(s<=0)throw new t$15("Width and height must be greater than zero.");if(s>e$1W.maximumCubeMapSize)throw new t$15("Width and height must be less than or equal to the maximum cube map size ("+e$1W.maximumCubeMapSize+"). Check maximumCubeMapSize.");if(!V$12.validate(l))throw new t$15("Invalid options.pixelFormat.");if(V$12.isDepthFormat(l))throw new t$15("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!_$_.validate(u))throw new t$15("Invalid options.pixelDatatype.");if(u===_$_.FLOAT&&!n.floatingPointTexture)throw new t$15("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(u===_$_.HALF_FLOAT&&!n.halfFloatingPointTexture)throw new t$15("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");var c=6*V$12.textureSizeInBytes(l,u,s,s),h=e.preMultiplyAlpha||l===V$12.RGB||l===V$12.LUMINANCE,d=u$Z(e.flipY,!0);this._context=n,this._textureFilterAnisotropic=n._textureFilterAnisotropic,this._size=s,this._hasMipmap=!1,this._sizeInBytes=c,this._preMultiplyAlpha=h,this._flipY=d,this._sampler=e$2e(e.sampler)?e.sampler:new e$1S,this._pixelFormat=l,this._pixelDatatype=u,r&&r.positiveX&&r.positiveX.internalFormat&&(this._pixelFormat=r.positiveX.internalFormat),r&&r.positiveX&&r.positiveX.pixelDatatype&&(this._pixelDatatype=r.positiveX.pixelDatatype);var f=R$12.toPixelFormat(this._pixelFormat),p=R$12.toPixelType(this._pixelDatatype);R$12.toSamplerMode(this._pixelDatatype,this._sampler);var _=R$12.toAddressMode(this._sampler.wrapS),m=R$12.toAddressMode(this._sampler.wrapT);if(e$2e(r)){var g=e.context.engine,x=new InternalTexture(g,InternalTextureSource.Cube);if(x.wrapU=_,x.wrapV=m,this._texture=new _0x4f1603(x),x.isCube=!0,x.generateMipMaps=!1,x._useSRGBBuffer=!1,x.format=f,x.type=p,r.positiveX.bufferView||r.positiveX.arrayBufferView){var y=[];y.push(x$12(r.positiveX,d,l,u,s)),y.push(x$12(r.positiveY,d,l,u,s)),y.push(x$12(r.positiveZ,d,l,u,s)),y.push(x$12(r.negativeX,d,l,u,s)),y.push(x$12(r.negativeY,d,l,u,s)),y.push(x$12(r.negativeZ,d,l,u,s));var v=g._textureHelper.createGPUTextureForInternalTexture(x,t,i);g._textureHelper.updateCubeTextures(y,v.underlyingResource,t,i,v.format,!1,!1,0,0)}else{var $=[];$.push(createImageBitmap(r.positiveX)),$.push(createImageBitmap(r.positiveY)),$.push(createImageBitmap(r.positiveZ)),$.push(createImageBitmap(r.negativeX)),$.push(createImageBitmap(r.negativeY)),$.push(createImageBitmap(r.negativeZ)),Promise.all($).then((e=>{var n=g._textureHelper.createGPUTextureForInternalTexture(x,t,i);g._textureHelper.updateCubeTextures(e,n.underlyingResource,t,i,n.format,d,!1,0,0)})).catch((e=>{console.log("CubeMapGPU createImageBitmap failed")}))}}}function x$12(e,t,i,n,r){var o;return e.bufferView?o=e.bufferView:e.arrayBufferView&&(o=e.arrayBufferView),t&&(o=V$12.flipY(o,i,n,r,r)),o}function e$1P(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.webgpu?this._inner=new y$S(e):this._inner=new X$X(e)}a$U.unpack=function(e,t,i){var n=x$13.unpack(e,t,l$$);return s$P.stackPartitions=n._stackPartitions,s$P.slicePartitions=n._slicePartitions,s$P.subdivisions=n._subdivisions,e$2e(i)?(o$1p.clone(n._radii,s$P.radii),i._ellipsoidGeometry=new x$13(s$P),i):(s$P.radius=n._radii.x,new a$U(s$P))},a$U.createGeometry=function(e){return x$13.createGeometry(e._ellipsoidGeometry)},Object.defineProperties(c$10.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}}),c$10.prototype.copyFrom=function(e,t,i){if(t=u$Z(t,0),i=u$Z(i,0),o$1q.defined("source",e),o$1q.typeOf.number.greaterThanOrEquals("xOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",i,0),t+e.width>this._size)throw new t$15("xOffset + source.width must be less than or equal to width.");if(i+e.height>this._size)throw new t$15("yOffset + source.height must be less than or equal to height.");var n=this._gl,r=this._textureTarget,o=this._targetFace;n.activeTexture(n.TEXTURE0),n.bindTexture(r,this._texture);var a=e.width,s=e.height,l=e.arrayBufferView,u=this._size,c=this._pixelFormat,h=this._pixelDatatype,d=this._internalFormat;const f=this._preMultiplyAlpha,p=this._flipY;let _=4;e$2e(l)&&(_=V$12.alignmentInBytes(c,h,a)),n.pixelStorei(n.UNPACK_ALIGNMENT,_),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.BROWSER_DEFAULT_WEBGL);let m=!1;if(!this._initialized){if(0===t&&0===i&&a===u&&s===u)e$2e(l)?(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),p&&(l=V$12.flipY(l,c,h,u,u)),n.texImage2D(o,0,d,u,u,0,c,_$_.toWebGLConstant(h,this._context),l)):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,p),n.texImage2D(o,0,d,c,_$_.toWebGLConstant(h,this._context),e)),m=!0;else{n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const e=V$12.createTypedArray(c,h,u,u);n.texImage2D(o,0,d,u,u,0,c,_$_.toWebGLConstant(h,this._context),e)}this._initialized=!0}m||(e$2e(l)?(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),p&&(l=V$12.flipY(l,c,h,a,s)),n.texSubImage2D(o,0,t,i,a,s,c,_$_.toWebGLConstant(h,this._context),l)):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,p),n.texSubImage2D(o,0,t,i,c,_$_.toWebGLConstant(h,this._context),e))),n.bindTexture(r,null)},c$10.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){if(e=u$Z(e,0),t=u$Z(t,0),i=u$Z(i,0),n=u$Z(n,0),r=u$Z(r,this._size),o=u$Z(o,this._size),o$1q.typeOf.number.greaterThanOrEquals("xOffset",e,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",i,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",n,0),e+r>this._size)throw new t$15("xOffset + source.width must be less than or equal to width.");if(t+o>this._size)throw new t$15("yOffset + source.height must be less than or equal to height.");if(this._pixelDatatype===_$_.FLOAT)throw new t$15("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===_$_.HALF_FLOAT)throw new t$15("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");const a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.copyTexSubImage2D(this._targetFace,0,e,t,i,n,r,o),a.bindTexture(s,null),this._initialized=!0},Object.defineProperties(X$X.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$i.NEAREST_MIPMAP_NEAREST||t===tt$i.NEAREST_MIPMAP_LINEAR||t===tt$i.LINEAR_MIPMAP_NEAREST||t===tt$i.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;(o===_$_.FLOAT&&!r.textureFloatLinear||o===_$_.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$i.NEAREST_MIPMAP_NEAREST:tt$i.NEAREST,i=rt$k.NEAREST);var a=r._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.texParameteri(s,a.TEXTURE_MIN_FILTER,t),a.texParameteri(s,a.TEXTURE_MAG_FILTER,i),a.texParameteri(s,a.TEXTURE_WRAP_S,e.wrapS),a.texParameteri(s,a.TEXTURE_WRAP_T,e.wrapT),e$2e(this._textureFilterAnisotropic)&&a.texParameteri(s,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),a.bindTexture(s,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),X$X.prototype.generateMipmap=function(e){if(e=u$Z(e,I$1e.DONT_CARE),this._size>1&&!e$2d.isPowerOfTwo(this._size))throw new t$15("width and height must be a power of two to call generateMipmap().");if(!I$1e.validate(e))throw new t$15("hint is invalid.");this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},X$X.prototype.isDestroyed=function(){return!1},X$X.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=i$11(this._positiveX),this._negativeX=i$11(this._negativeX),this._positiveY=i$11(this._positiveY),this._negativeY=i$11(this._negativeY),this._positiveZ=i$11(this._positiveZ),this._negativeZ=i$11(this._negativeZ),i$11(this)},Object.defineProperties(y$S.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),y$S.prototype.generateMipmap=function(e){console.log("CubeMapGPU.prototype.generateMipmap"),this._hasMipmap=!0},y$S.prototype.isDestroyed=function(){return!1},y$S.prototype.destroy=function(){return this._texture.dispose(),i$11(this)},Object.defineProperties(e$1P.prototype,{positiveX:{get:function(){return this._inner.positiveX}},negativeX:{get:function(){return this._inner.negativeX}},positiveY:{get:function(){return this._inner.positiveY}},negativeY:{get:function(){return this._inner.negativeY}},positiveZ:{get:function(){return this._inner.positiveZ}},negativeZ:{get:function(){return this._inner.negativeZ}},sampler:{get:function(){return this._inner.sampler},set:function(e){this._inner.sampler=e}},pixelFormat:{get:function(){return this._inner.pixelFormat}},pixelDatatype:{get:function(){return this._inner.pixelDatatype}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},preMultiplyAlpha:{get:function(){return this._inner.preMultiplyAlpha}},flipY:{get:function(){return this._inner.flipY}},_target:{get:function(){return this._inner._target}},_texture:{get:function(){return this._inner._texture}}}),e$1P.prototype.generateMipmap=function(e){if(e=u$Z(e,I$1e.DONT_CARE),this._size>1&&!e$2d.isPowerOfTwo(this._size))throw new t$15("width and height must be a power of two to call generateMipmap().");if(!I$1e.validate(e))throw new t$15("hint is invalid.");this._inner.generateMipmap(e)},e$1P.prototype.isDestroyed=function(){return!1},e$1P.prototype.destroy=function(){return this._inner.destroy(),i$11(this)},void 0===Date.now&&(Date.now=function(){return(new Date).valueOf()});var f$X=f$X||function(){var e=[];return{REVISION:"13",getAll:function(){return e},removeAll:function(){e=[]},add:function(t){e.push(t)},remove:function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)},update:function(t){if(0===e.length)return!1;var i=0;for(t=void 0!==t?t:typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now();i<e.length;)e[i].update(t)?i++:e.splice(i,1);return!0}}}();f$X.Tween=function(e){var t=e,i={},n={},r={},o=1e3,a=0,s=!1,l=!1,u=0,c=null,h=f$X.Easing.Linear.None,d=f$X.Interpolation.Linear,f=[],p=null,_=!1,m=null,g=null,x=null,y=0,v=0;for(var $ in e)i[$]=parseFloat(e[$],10);this.to=function(e,t){return void 0!==t&&(o=t),n=e,this},this.start=function(e){for(var o in f$X.add(this),l=!0,_=!1,c=void 0!==e?e:typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now(),c+=u,n){if(n[o]instanceof Array){if(0===n[o].length)continue;n[o]=[t[o]].concat(n[o])}i[o]=t[o],i[o]instanceof Array||(i[o]*=1),r[o]=i[o]||0}return this},this.stop=function(){return l?(f$X.remove(this),l=!1,null!==x&&x.call(t),this.stopChainedTweens(),this):this},this.pause=function(){return l?(l=!1,y=typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now(),this):this},this.endPause=function(){return l||(l=!0,y=(typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now())-y,v+=y),this},this.stopChainedTweens=function(){for(var e=0,t=f.length;e<t;e++)f[e].stop()},this.delay=function(e){return u=e,this},this.repeat=function(e){return a=e,this},this.yoyo=function(e){return s=e,this},this.easing=function(e){return h=e,this},this.interpolation=function(e){return d=e,this},this.chain=function(){return f=arguments,this},this.onStart=function(e){return p=e,this},this.onUpdate=function(e){return m=e,this},this.onComplete=function(e){return g=e,this},this.onStop=function(e){return x=e,this},this.update=function(e){var x;if(e<c||!l)return!0;!1===_&&(null!==p&&p.call(t),_=!0);var y=(e-c-v)/o,$=h(y=y>1?1:y);for(x in n){var b=i[x]||0,T=n[x];T instanceof Array?t[x]=d(T,$):("string"==typeof T&&(T=b+parseFloat(T,10)),"number"==typeof T&&(t[x]=b+(T-b)*$))}if(null!==m&&m.call(t,$),1==y){if(v=0,a>0){for(x in isFinite(a)&&a--,r){if("string"==typeof n[x]&&(r[x]=r[x]+parseFloat(n[x],10)),s){var C=r[x];r[x]=n[x],n[x]=C}i[x]=r[x]}return c=e+u,!0}null!==g&&g.call(t);for(var S=0,w=f.length;S<w;S++)f[S].start(e);return!1}return!0}},f$X.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},Out:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},InOut:function(e){var t,i=.1,n=.4;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=n*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-f$X.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*f$X.Easing.Bounce.In(2*e):.5*f$X.Easing.Bounce.Out(2*e-1)+.5}}},f$X.Interpolation={Linear:function(e,t){var i=e.length-1,n=i*t,r=Math.floor(n),o=f$X.Interpolation.Utils.Linear;return t<0?o(e[0],e[1],n):t>1?o(e[i],e[i-1],i-n):o(e[r],e[r+1>i?i:r+1],n-r)},Bezier:function(e,t){var i,n=0,r=e.length-1,o=Math.pow,a=f$X.Interpolation.Utils.Bernstein;for(i=0;i<=r;i++)n+=o(1-t,r-i)*o(t,i)*e[i]*a(r,i);return n},CatmullRom:function(e,t){var i=e.length-1,n=i*t,r=Math.floor(n),o=f$X.Interpolation.Utils.CatmullRom;return e[0]===e[i]?(t<0&&(r=Math.floor(n=i*(1+t))),o(e[(r-1+i)%i],e[r],e[(r+1)%i],e[(r+2)%i],n-r)):t<0?e[0]-(o(e[0],e[0],e[1],e[1],-n)-e[0]):t>1?e[i]-(o(e[i],e[i],e[i-1],e[i-1],n-i)-e[i]):o(e[r?r-1:0],e[r],e[i<r+1?i:r+1],e[i<r+2?i:r+2],n-r)},Utils:{Linear:function(e,t,i){return(t-e)*i+e},Bernstein:function(e,t){var i=f$X.Interpolation.Utils.Factorial;return i(e)/i(t)/i(e-t)},Factorial:function(){var e=[1];return function(t){var i,n=1;if(e[t])return e[t];for(i=t;i>1;i--)n*=i;return e[t]=n}}(),CatmullRom:function(e,t,i,n,r){var o=.5*(i-e),a=.5*(n-t),s=r*r;return(2*t-2*i+o+a)*(r*s)+(-3*t+3*i-2*o-a)*s+o*r+t}}};var I$1c={LINEAR_NONE:f$X.Easing.Linear.None,QUADRACTIC_IN:f$X.Easing.Quadratic.In,QUADRACTIC_OUT:f$X.Easing.Quadratic.Out,QUADRACTIC_IN_OUT:f$X.Easing.Quadratic.InOut,CUBIC_IN:f$X.Easing.Cubic.In,CUBIC_OUT:f$X.Easing.Cubic.Out,CUBIC_IN_OUT:f$X.Easing.Cubic.InOut,QUARTIC_IN:f$X.Easing.Quartic.In,QUARTIC_OUT:f$X.Easing.Quartic.Out,QUARTIC_IN_OUT:f$X.Easing.Quartic.InOut,QUINTIC_IN:f$X.Easing.Quintic.In,QUINTIC_OUT:f$X.Easing.Quintic.Out,QUINTIC_IN_OUT:f$X.Easing.Quintic.InOut,SINUSOIDAL_IN:f$X.Easing.Sinusoidal.In,SINUSOIDAL_OUT:f$X.Easing.Sinusoidal.Out,SINUSOIDAL_IN_OUT:f$X.Easing.Sinusoidal.InOut,EXPONENTIAL_IN:f$X.Easing.Exponential.In,EXPONENTIAL_OUT:f$X.Easing.Exponential.Out,EXPONENTIAL_IN_OUT:f$X.Easing.Exponential.InOut,CIRCULAR_IN:f$X.Easing.Circular.In,CIRCULAR_OUT:f$X.Easing.Circular.Out,CIRCULAR_IN_OUT:f$X.Easing.Circular.InOut,ELASTIC_IN:f$X.Easing.Elastic.In,ELASTIC_OUT:f$X.Easing.Elastic.Out,ELASTIC_IN_OUT:f$X.Easing.Elastic.InOut,BACK_IN:f$X.Easing.Back.In,BACK_OUT:f$X.Easing.Back.Out,BACK_IN_OUT:f$X.Easing.Back.InOut,BOUNCE_IN:f$X.Easing.Bounce.In,BOUNCE_OUT:f$X.Easing.Bounce.Out,BOUNCE_IN_OUT:f$X.Easing.Bounce.InOut},m$Y=Object.freeze(I$1c);function a$T(e,t,i){this.heading=u$Z(e,0),this.pitch=u$Z(t,0),this.range=u$Z(i,0)}a$T.clone=function(e,t){if(e$2e(e))return e$2e(t)||(t=new a$T),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var e$1O={NONE:0,CATMULL_ROM:1},j$16=Object.freeze(e$1O),mr$5={};function Nr$5(e,t,i){var n,r,o;if(e instanceof o$15){var a=Math.tan(.5*e.fovy);return n=e.near,r=e.near*a,o=e.aspectRatio*r,Math.max(t*n/o,i*n/r)}return e instanceof l$10?(n=e.near,r=e.top,o=e.right,Math.max(t*n/o,i*n/r)):Math.max(t,i)}var yr$5=new o$1p,pr$5=new o$1p;function Sr$5(e,t,i,n){if(e$2e(n)&&i(.5)>n){var r=i(0),o=i(1),a=i(.5),s=a-r,l=a-o;return function(n){var a=i(n);if(n<=.5){var u=(a-r)/s;return e$2d.lerp(e,-e$2d.PI_OVER_TWO,u)}var c=(a-o)/l;return e$2d.lerp(-e$2d.PI_OVER_TWO,t,1-c)}}return function(i){return e$2d.lerp(e,t,i)}}function er$a(e,t,i,n,r){var o=r,a=Math.max(i,n);if(!e$2e(o)){var s=e.position,l=t,u=e.up,c=e.right,h=e.frustum,d=o$1p.subtract(s,l,yr$5),f=o$1p.magnitude(o$1p.multiplyByScalar(u,o$1p.dot(d,u),pr$5)),p=o$1p.magnitude(o$1p.multiplyByScalar(c,o$1p.dot(d,c),pr$5));o=Math.min(.2*Nr$5(h,f,p),1e9)}if(a<o){var _=1e6,m=-Math.pow((o-i)*_,1/8),g=Math.pow((o-n)*_,1/8);return function(e){var t=e*(g-m)+m;return-Math.pow(t,8)/_+o}}return function(e){return e$2d.lerp(i,n,e)}}function x$11(e,t){return e$2d.equalsEpsilon(e,e$2d.TWO_PI,e$2d.EPSILON11)&&(e=0),t>e+Math.PI?e+=e$2d.TWO_PI:t<e-Math.PI&&(e-=e$2d.TWO_PI),e}var dr$6=new o$1p;function Lr$5(e,t,i,n,r,o,a){var s=e.camera,l=o$1p.clone(s.position,dr$6),u=s.pitch,c=x$11(s.heading,n),h=x$11(s.roll,o),d=er$a(s,i,l.z,i.z,a);return function(e){var a=e.time/t;s.setView({orientation:{heading:e$2d.lerp(c,n,a),pitch:e$2d.lerp(u,r,a),roll:e$2d.lerp(h,o,a)}}),o$1o.lerp(l,i,a,s.position),s.position.z=d(a)}}function Wr$2(e,t){e.longitude<t.longitude?e.longitude+=e$2d.TWO_PI:t.longitude+=e$2d.TWO_PI}function zr$6(e,t){var i=e.longitude-t.longitude;i<-e$2d.PI?e.longitude+=e$2d.TWO_PI:i>e$2d.PI&&(t.longitude+=e$2d.TWO_PI)}var br$3=new a$18,Vr$4=new a$18;function jr$4(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x){var y=e.camera,v=e.mapProjection.ellipsoid,$=a$18.clone(y.positionCartographic,br$3),b=y.pitch,T=x$11(y.heading,n),C=x$11(y.roll,o),S=v.cartesianToCartographic(i,Vr$4);$.longitude=e$2d.zeroToTwoPi($.longitude),S.longitude=e$2d.zeroToTwoPi(S.longitude);var w=!1;if(e$2e(s)){var E=e$2d.zeroToTwoPi(s),P=Math.min($.longitude,S.longitude),A=Math.max($.longitude,S.longitude),L=E>=P&&E<=A;if(e$2e(l)){var M=Math.abs($.longitude-S.longitude),R=e$2d.TWO_PI-M;(L?M:R)<(L?R:M)*l&&!L&&(w=!0)}else L||(w=!0)}w?Wr$2($,S):zr$6($,S);var O=er$a(y,i,$.height,S.height,a),D=Sr$5(b,r,O,u);return function(){var i=$.longitude,r=S.longitude,a=$.latitude,s=S.latitude;return function(l){var u,v,$=l.time/t,b=d?y.positionCartographic.height:O($);if(m!==j$16.NONE&&e$2e(x)){if((u=g._times[x]+l.time)>g._times[g._times.length-1])return;var S=g.evaluate(u),w=a$18.fromCartesian(S);v=o$1p.fromRadians(w.longitude,w.latitude,b)}else v=o$1p.fromRadians(e$2d.lerp(i,r,$),e$2d.lerp(a,s,$),b);if(f){var E=a$18.fromCartesian(v),P=e.globe.getHeight(E);if(!e$2e(P))return;(b<P||b-P>0&&b-P<p)&&(E.height=P+p,v=a$18.toCartesian(E))}var A=c?y.heading:e$2d.lerp(T,n,$),L=h?y.pitch:D($),M=e$2d.lerp(C,o,$);if(_&&(A=c?y.heading:n,M=o),m!==j$16.NONE&&e$2e(x)){var R=u+.001;if(R>g._times[g._times.length-1])y.setView({destination:v,orientation:{heading:A,pitch:L,roll:M}});else{var I=g.evaluate(R),F=a$18.fromCartesian(I);I=o$1p.fromRadians(F.longitude,F.latitude,b);var B=new o$1p(I.x-v.x,I.y-v.y,I.z-v.z);o$1p.normalize(B,B);var N=m$19.buildUp(v,B);y.setView({destination:v,orientation:{direction:B,up:N}})}}else y.setView({destination:v,orientation:{heading:A,pitch:L,roll:M}})}}()}function Rr$4(e,t,i,n,r,o,a){var s=e.camera,l=o$1p.clone(s.position,dr$6),u=x$11(s.heading,n),c=s.frustum.right-s.frustum.left,h=er$a(s,i,c,i.z,a);return function(e){var r=e.time/t;s.setView({orientation:{heading:e$2d.lerp(u,n,r)}}),o$1o.lerp(l,i,r,s.position);var o=h(r),a=s.frustum,c=a.top/a.right,d=.5*(o-(a.right-a.left));a.right+=d,a.left-=d,a.top=c*a.right,a.bottom=-a.top}}var hr$5=new a$18,Ur$5=new o$1p;function tr$8(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function gr$6(e,t){return function(){"function"==typeof t&&t(),e.enableInputs=!0}}mr$5.createTween=function(e,t){var i=(t=u$Z(t,u$Z.EMPTY_OBJECT)).destination;if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(i))throw new t$15("destination is required.");var n=e.mode;if(n===C$14.MORPHING)return tr$8();var r=u$Z(t.convert,!0),o=e.mapProjection,a=o.ellipsoid,s=t.maximumHeight,l=t.flyOverLongitude,u=t.flyOverLongitudeWeight,c=t.pitchAdjustHeight,h=t.easingFunction,d=t.flyClampToGround,f=t.flyRelativeHeight,p=t.interpolationMode,_=t.catmullRomSpline,m=t.preStopIndex;r&&n!==C$14.SCENE3D&&(a.cartesianToCartographic(i,hr$5),i=o.project(hr$5,Ur$5));var g=e.camera,x=t.endTransform;e$2e(x)&&g._setTransform(x);var y=t.duration;e$2e(y)||(y=Math.ceil(o$1p.distance(g.position,i)/1e6)+2,y=Math.min(y,3));var v=u$Z(t.heading,0),$=u$Z(t.pitch,-e$2d.PI_OVER_TWO),b=u$Z(t.roll,0),T=u$Z(t.headingFree,!1),C=u$Z(t.pitchFree,!1),S=u$Z(t.altitudeFree,!1),w=u$Z(t.directTurning,!1),E=e.screenSpaceCameraController;E.enableInputs=t.headingFree||t.pitchFree||t.altitudeFree;var P=gr$6(E,t.complete),A=gr$6(E,t.cancel),L=g.frustum,M=e.mode===C$14.SCENE2D;if(M=(M=(M=(M=M&&o$1o.equalsEpsilon(g.position,i,e$2d.EPSILON6))&&e$2d.equalsEpsilon(Math.max(L.right-L.left,L.top-L.bottom),i.z,e$2d.EPSILON6))||e.mode!==C$14.SCENE2D&&o$1p.equalsEpsilon(i,g.position,e$2d.EPSILON10))&&e$2d.equalsEpsilon(e$2d.negativePiToPi(v),e$2d.negativePiToPi(g.heading),e$2d.EPSILON10)&&e$2d.equalsEpsilon(e$2d.negativePiToPi($),e$2d.negativePiToPi(g.pitch),e$2d.EPSILON10)&&e$2d.equalsEpsilon(e$2d.negativePiToPi(b),e$2d.negativePiToPi(g.roll),e$2d.EPSILON10))return tr$8(P,A);var R=new Array(4);if(R[C$14.SCENE2D]=Rr$4,R[C$14.SCENE3D]=jr$4,R[C$14.COLUMBUS_VIEW]=Lr$5,y<=0){return tr$8((function(){R[n](e,1,i,v,$,b,s,l,u,c)({time:1}),"function"==typeof P&&P()}),A)}var O=R[n](e,y,i,v,$,b,s,l,u,c,T,C,S,d,f,w,p,_,m);if(!e$2e(h)){var D=g.positionCartographic.height;h=D>(n===C$14.SCENE3D?a.cartesianToCartographic(i).height:i.z)&&D>11500?m$Y.CUBIC_OUT:m$Y.QUINTIC_IN_OUT}return{duration:y,easingFunction:h,startObject:{time:0},stopObject:{time:y},update:O,complete:P,cancel:A}};var e$1N={ROTATE:0,INFINITE_SCROLL:1},Rr$3=Object.freeze(e$1N);function v$K(e){if(!e$2e(e))throw new t$15("scene is required.");this._scene=e,this._transform=p$1d.clone(p$1d.IDENTITY),this._invTransform=p$1d.clone(p$1d.IDENTITY),this._actualTransform=p$1d.clone(p$1d.IDENTITY),this._actualInvTransform=p$1d.clone(p$1d.IDENTITY),this._transformChanged=!1,this.position=new o$1p,this._position=new o$1p,this._positionWC=new o$1p,this._positionCartographic=new a$18,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.direction=new o$1p,this._direction=new o$1p,this._directionWC=new o$1p,this.up=new o$1p,this._up=new o$1p,this._upWC=new o$1p,this.right=new o$1p,this._right=new o$1p,this._rightWC=new o$1p,this.frustum=new o$15,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=e$2d.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new o$1h,this._moveEnd=new o$1h,this._changed=new o$1h,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this.percentageChanged=.5,this._refinePercentageChanged=.001,this._viewMatrix=new p$1d,this._invViewMatrix=new p$1d,zt$6(this),this._mode=C$14.SCENE3D,this._modeChanged=!0;var t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new a$18(Math.PI,e$2d.PI_OVER_TWO)),this._max2Dfrustum=void 0,this._suspendTerrainAdjustment=!1,Xt$4(this,v$K.DEFAULT_VIEW_RECTANGLE,this.position,!0);var i=o$1p.magnitude(this.position);i+=i*v$K.DEFAULT_VIEW_FACTOR,o$1p.normalize(this.position,this.position),o$1p.multiplyByScalar(this.position,i,this.position),this.bReflect=!1,this._bReflect=!1,this._reflectMatrix=new p$1d,this._reflectPosition=new o$1p,this._reflectUp=new o$1p,this._reflectDirection=new o$1p,this._reflectRight=new o$1p,this._isFlyCircle=!1,this._flyCircleCenter=new o$1p,this._flyCircleLoop=!1,this._isResetFlyCircleParm=!1,this._speedRatio=1,this._flyClampToGround=!1,this._flyRelativeHeight=10,this._sensitivePosition=void 0,this._sensitivePositionRatio=0,this._sensitiveRegionRatio=0,this._endLevel=22,this._stateChanged=!0,this._preciseSensitivePosition=!1,this._enableIndoorColliDetection=!1,this.zoomLevel=1}function zt$6(e){p$1d.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),p$1d.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),p$1d.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function ui$7(e){if(e$2e(e._oldPositionWC)){e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;var t=o$1p.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=o$1p.magnitude(t),e._oldPositionWC=o$1p.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=Et$c()):e.timeSinceMoved=Math.max(Et$c()-e._lastMovedTimestamp,0)/1e3}else e._oldPositionWC=o$1p.clone(e.positionWC,e._oldPositionWC)}v$K.TRANSFORM_2D=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),v$K.TRANSFORM_2D_INVERSE=p$1d.inverseTransformation(v$K.TRANSFORM_2D,new p$1d),v$K.DEFAULT_VIEW_RECTANGLE=h$18.fromDegrees(70,0,140,60),v$K.DEFAULT_VIEW_FACTOR=.5,v$K.DEFAULT_OFFSET=new a$T(0,-e$2d.PI_OVER_FOUR,0),v$K.prototype.canPreloadFlight=function(){return e$2e(this._currentFlight)&&this._mode!==C$14.SCENE2D},v$K.prototype._updateCameraChanged=function(){var e=this;if(ui$7(e),this._stateChanged=!1,0!==e._changed.numberOfListeners){var t=e.percentageChanged,i=e._refinePercentageChanged;if(e._mode===C$14.SCENE2D){if(!e$2e(e._changedFrustum))return e._changedPosition=o$1p.clone(e.position,e._changedPosition),void(e._changedFrustum=e.frustum.clone());var n,r=e.position,o=e._changedPosition,a=e.frustum,s=e._changedFrustum,l=r.x+a.left,u=r.x+a.right,c=o.x+s.left,h=o.x+s.right,d=r.y+a.bottom,f=r.y+a.top,p=o.y+s.bottom,_=o.y+s.top,m=Math.max(l,c),g=Math.min(u,h),x=Math.max(d,p),y=Math.min(f,_);if(m>=g||x>=f)n=1;else{var v=s;l<c&&u>h&&d<p&&f>_&&(v=a),n=1-(g-m)*(y-x)/((v.right-v.left)*(v.top-v.bottom))}return void(n>t&&(e._changed.raiseEvent(n),e._changedPosition=o$1p.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum)))}if(!e$2e(e._changedDirection))return e._changedPosition=o$1p.clone(e.positionWC,e._changedPosition),void(e._changedDirection=o$1p.clone(e.directionWC,e._changedDirection));var $,b=e$2d.acosClamped(o$1p.dot(e.directionWC,e._changedDirection));$=e$2e(e.frustum.fovy)?b/(.5*e.frustum.fovy):b;var T=o$1p.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;($>t||T>t)&&(e._changed.raiseEvent(Math.max($,T)),e._changedPosition=o$1p.clone(e.positionWC,e._changedPosition),e._changedDirection=o$1p.clone(e.directionWC,e._changedDirection)),($>i||T>i)&&(e._changed.raiseEvent(Math.max($,T)),this._stateChanged=!0,e._changedPosition=o$1p.clone(e.positionWC,e._changedPosition),e._changedDirection=o$1p.clone(e.directionWC,e._changedDirection))}};var ci$8=new p$1d,fi$7=new a$18;function di$7(e){m$19.basisTo2D(e._projection,e._transform,e._actualTransform)}v$K.prototype._adjustHeightForTerrain=function(){var e=this._scene,t=e.screenSpaceCameraController,i=t.enableCollisionDetection,n=t.minimumCollisionTerrainHeight,r=t.minimumZoomDistance;if(!this._suspendTerrainAdjustment&&i){var o=this._mode,a=e.globe;if(e$2e(a)&&o!==C$14.SCENE2D&&o!==C$14.MORPHING){var s,l,u=a.ellipsoid,c=e.mapProjection;p$1d.equals(this.transform,p$1d.IDENTITY)||(s=p$1d.clone(this.transform,ci$8),l=o$1p.magnitude(this.position),this._setTransform(p$1d.IDENTITY));var h=fi$7;o===C$14.SCENE3D?u.cartesianToCartographic(this.position,h):c.unproject(this.position,h);var d=!1;if(h.height<n){var f=a.getHeight(h);e$2e(f)&&(f+=r,h.height<f&&(h.height=f,o===C$14.SCENE3D?u.cartographicToCartesian(h,this.position):c.project(h,this.position),d=!0))}e$2e(s)&&(this._setTransform(s),d&&(o$1p.normalize(this.position,this.position),o$1p.negate(this.position,this.direction),o$1p.multiplyByScalar(this.position,Math.max(l,r),this.position),o$1p.normalize(this.direction,this.direction),o$1p.cross(this.direction,this.up,this.right),o$1p.cross(this.right,this.direction,this.up)))}}};var li$7=new a$18,vi$7=new o$1p,ut$d=new o$1p,pi$8=new e$2c,gi$8=new e$2c,_i$9=new e$2c,mi$5=new e$2c,Ci$7=new e$2c;function yi$7(e){var t=e._projection,i=t.ellipsoid,n=p$1d.getColumn(e._transform,3,pi$8),r=i.cartesianToCartographic(n,li$7),o=t.project(r,vi$7),a=gi$8;a.x=o.z,a.y=o.x,a.z=o.y,a.w=1;var s=e$2c.clone(e$2c.UNIT_X,Ci$7),l=e$2c.add(p$1d.getColumn(e._transform,0,ut$d),n,ut$d);i.cartesianToCartographic(l,r),t.project(r,o);var u=_i$9;u.x=o.z,u.y=o.x,u.z=o.y,u.w=0,o$1p.subtract(u,a,u),u.x=0;var c=mi$5;if(o$1p.magnitudeSquared(u)>e$2d.EPSILON10)o$1p.cross(s,u,c);else{var h=e$2c.add(p$1d.getColumn(e._transform,1,ut$d),n,ut$d);i.cartesianToCartographic(h,r),t.project(r,o),c.x=o.z,c.y=o.x,c.z=o.y,c.w=0,o$1p.subtract(c,a,c),c.x=0,o$1p.magnitudeSquared(c)<e$2d.EPSILON10&&(e$2c.clone(e$2c.UNIT_Y,u),e$2c.clone(e$2c.UNIT_Z,c))}o$1p.cross(c,s,u),o$1p.normalize(u,u),o$1p.cross(s,u,c),o$1p.normalize(c,c),p$1d.setColumn(e._actualTransform,0,u,e._actualTransform),p$1d.setColumn(e._actualTransform,1,c,e._actualTransform),p$1d.setColumn(e._actualTransform,2,s,e._actualTransform),p$1d.setColumn(e._actualTransform,3,a,e._actualTransform)}var Tt$c=new o$1p;function D$Z(e){var t=e._mode,i=!1,n=0;t===C$14.SCENE2D&&(i=(n=e.frustum.right-e.frustum.left)!==e._positionCartographic.height);var r=e._position,o=!o$1p.equals(r,e.position)||i;o&&(r=o$1p.clone(e.position,e._position));var a=e._direction,s=!o$1p.equals(a,e.direction);s&&(o$1p.normalize(e.direction,e.direction),a=o$1p.clone(e.direction,e._direction));var l=e._up,u=!o$1p.equals(l,e.up);u&&(o$1p.normalize(e.up,e.up),l=o$1p.clone(e.up,e._up));var c=e._right,h=!o$1p.equals(c,e.right);h&&(o$1p.normalize(e.right,e.right),c=o$1p.clone(e.right,e._right));var d=!1;e.bReflect!=e._bReflect&&(e._bReflect=e.bReflect,d=!0);var f=e._transformChanged||e._modeChanged;e._transformChanged=!1,f&&(p$1d.inverseTransformation(e._transform,e._invTransform),e._mode===C$14.COLUMBUS_VIEW||e._mode===C$14.SCENE2D?p$1d.equals(p$1d.IDENTITY,e._transform)?p$1d.clone(v$K.TRANSFORM_2D,e._actualTransform):e._mode===C$14.COLUMBUS_VIEW?di$7(e):yi$7(e):p$1d.clone(e._transform,e._actualTransform),p$1d.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);var p=e._actualTransform;if(o||f)if(e._positionWC=p$1d.multiplyByPoint(p,r,e._positionWC),t===C$14.SCENE3D||t===C$14.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{var _=Tt$c;_.x=e._positionWC.y,_.y=e._positionWC.z,_.z=e._positionWC.x,t===C$14.SCENE2D&&(_.z=n),e._projection.unproject(_,e._positionCartographic)}if(s||u||h){var m=o$1p.dot(a,o$1p.cross(l,c,Tt$c));if(Math.abs(1-m)>e$2d.EPSILON2){var g=1/o$1p.magnitudeSquared(l),x=o$1p.dot(l,a)*g,y=o$1p.multiplyByScalar(a,x,Tt$c);l=o$1p.normalize(o$1p.subtract(l,y,e._up),e._up),o$1p.clone(l,e.up),c=o$1p.cross(a,l,e._right),o$1p.clone(c,e.right)}}(s||f)&&(e._directionWC=p$1d.multiplyByPointAsVector(p,a,e._directionWC),o$1p.normalize(e._directionWC,e._directionWC)),(u||f)&&(e._upWC=p$1d.multiplyByPointAsVector(p,l,e._upWC),o$1p.normalize(e._upWC,e._upWC)),(h||f)&&(e._rightWC=p$1d.multiplyByPointAsVector(p,c,e._rightWC),o$1p.normalize(e._rightWC,e._rightWC)),(o||s||u||h||f||d)&&zt$6(e)}function Bt$a(e,t){var i;return i=e$2d.equalsEpsilon(Math.abs(e.z),1,e$2d.EPSILON3)?Math.atan2(t.y,t.x)-e$2d.PI_OVER_TWO:Math.atan2(e.y,e.x)-e$2d.PI_OVER_TWO,e$2d.TWO_PI-e$2d.zeroToTwoPi(i)}function bt$a(e){return e$2d.PI_OVER_TWO-e$2d.acosClamped(e.z)}function Lt$8(e,t,i){var n=0;return e$2d.equalsEpsilon(Math.abs(e.z),1,e$2d.EPSILON3)||(n=Math.atan2(-i.z,t.z),n=e$2d.zeroToTwoPi(n+e$2d.TWO_PI)),n}var ct$c=new p$1d,ft$b=new p$1d;Object.defineProperties(v$K.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return D$Z(this),this._invTransform}},viewMatrix:{get:function(){return D$Z(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return D$Z(this),this._invViewMatrix}},positionCartographic:{get:function(){return D$Z(this),this._positionCartographic}},positionWC:{get:function(){return D$Z(this),this._positionWC}},directionWC:{get:function(){return D$Z(this),this._directionWC}},upWC:{get:function(){return D$Z(this),this._upWC}},rightWC:{get:function(){return D$Z(this),this._rightWC}},heading:{get:function(){if(this._mode!==C$14.MORPHING){var e=this._projection.ellipsoid,t=p$1d.clone(this._transform,ct$c),i=m$19.eastNorthUpToFixedFrame(this.positionWC,e,ft$b);this._setTransform(i);var n=Bt$a(this.direction,this.up);return this._setTransform(t),n}}},pitch:{get:function(){if(this._mode!==C$14.MORPHING){var e=this._projection.ellipsoid,t=p$1d.clone(this._transform,ct$c),i=m$19.eastNorthUpToFixedFrame(this.positionWC,e,ft$b);this._setTransform(i);var n=bt$a(this.direction);return this._setTransform(t),n}}},roll:{get:function(){if(this._mode!==C$14.MORPHING){var e=this._projection.ellipsoid,t=p$1d.clone(this._transform,ct$c),i=m$19.eastNorthUpToFixedFrame(this.positionWC,e,ft$b);this._setTransform(i);var n=Lt$8(this.direction,this.up,this.right);return this._setTransform(t),n}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}},flyCircleLoop:{set:function(e){this._flyCircleLoop!==e&&(this._isResetFlyCircleParm=!0),this._flyCircleLoop=e},get:function(){return this._flyCircleLoop}},speedRatio:{get:function(){return this._speedRatio},set:function(e){this._speedRatio=e}},flyClampToGround:{set:function(e){this._flyClampToGround=e},get:function(){return this._flyClampToGround}},flyRelativeHeight:{set:function(e){this._flyRelativeHeight=e},get:function(){return this._flyRelativeHeight}},sensitivePositionRatio:{set:function(e){this._sensitivePositionRatio=e$2d.clamp(e,0,1)},get:function(){return this._sensitivePositionRatio}},preciseSensitivePosition:{set:function(e){e$2e(e)&&"boolean"==typeof e&&(this._preciseSensitivePosition=e)},get:function(){return this._preciseSensitivePosition}},sensitiveRegionRatio:{set:function(e){this._sensitiveRegionRatio=e},get:function(){return this._sensitiveRegionRatio}}}),v$K.prototype._computeSensitivePosition=function(){if(this._scene.mode===C$14.SCENE3D){var e=this._scene.canvas,t=this._scene.frameState;dt$c.x=e.clientWidth/2,dt$c.y=e.clientHeight/2;var i=void 0;if(e$2e(this._scene.globe)&&this._preciseSensitivePosition&&(e$2e(i=this._scene.pickPositionWorldCoordinates(dt$c,wi$6,!0))&&(this._sensitivePosition=i)),!e$2e(i)){var n=this.getPickRay(dt$c),r=t$12.WGS84,o=r.maximumRadius;e$2e(t.averageTerrainHeight)&&0!=t.averageTerrainHeight&&(r=new t$12(o+t.averageTerrainHeight,o+t.averageTerrainHeight,o+t.averageTerrainHeight));var a=g$1j.rayEllipsoid(n,r);if(e$2e(a)){Et$b.x=e.clientWidth/2,Et$b.y=0;var s=this.getPickRay(Et$b);if(e$2e(g$1j.rayEllipsoid(s,r)))this._sensitivePosition=f$19.getPoint(n,a.start);else{var l,u=o$1p.magnitude(this.position);l=u<o?e$2d.PI_OVER_TWO:Math.asin(o/u);var c=new f$19(this.position,new o$1p(-this.position.x,-this.position.y,-this.position.z)),h=new o$1p(c.origin.x+c.direction.x,c.origin.y+c.direction.y,c.origin.z+c.direction.z),d=new o$1p(n.origin.x+n.direction.x,n.origin.y+n.direction.y,n.origin.z+n.direction.z),f=o$1p.distance(h,d),p=2*Math.asin(.5*f),_=(.5*this.frustum.fov-(l-p))/this.frustum.fov,m=e.clientHeight*(1+_)*.5;if(!Number.isNaN(m)){var g=new o$1o(.5*e.clientWidth,m),x=this.getPickRay(g),y=g$1j.rayEllipsoid(x,r);e$2e(y)?this._sensitivePosition=f$19.getPoint(x,y.start):this._sensitivePosition=void 0}}}else this._sensitivePosition=void 0}var v=t._quadtree;if(e$2e(v)){m=t.context.drawingBufferHeight;var $=this.frustum.sseDenominator;if(this._positionCartographic.height,e$2e(this._sensitivePosition)){var b=o$1p.distance(this.positionWC,this._sensitivePosition),T=v._tileProvider.getLevelMaximumGeometricError(0);this.zoomLevel=e$2d.log2(T*m/(2*v.maximumScreenSpaceError*b*$))}}}};var Et$b=new o$1o,dt$c=new o$1o,wi$6=new o$1p;v$K.prototype.update=function(e){if(!e$2e(e))throw new t$15("mode is required.");if(e===C$14.SCENE2D&&!(this.frustum instanceof l$11))throw new t$15("An OrthographicOffCenterFrustum is required in 2D.");if(!(e!==C$14.SCENE3D&&e!==C$14.COLUMBUS_VIEW||this.frustum instanceof o$15||this.frustum instanceof a$V))throw new t$15("A PerspectiveFrustum or OrthographicFrustum is required in 3D and Columbus view");var t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==C$14.MORPHING,t=this._mode===C$14.SCENE2D),t){var i=this._max2Dfrustum=this.frustum.clone();if(!(i instanceof l$11))throw new t$15("The camera frustum is expected to be orthographic for 2D camera control.");var n=i.top/i.right;i.right=2*this._maxCoord.x,i.left=-i.right,i.top=n*i.right,i.bottom=-i.top}this._mode===C$14.SCENE2D&&jt$7(this,this.position);var r=this._scene.globe,o=!e$2e(r)||r._surface.tileProvider.ready&&0===r._surface._tileLoadQueueHigh.length&&0===r._surface._tileLoadQueueMedium.length&&0===r._surface._tileLoadQueueLow.length&&0===r._surface._debug.tilesWaitingForChildren;this._suspendTerrainAdjustment&&(this._suspendTerrainAdjustment=!o),o&&this._adjustHeightForTerrain(),this._isFlyCircle&&this._flyCircle(this._flyCircleCenter)};var Ti$6=new o$1p,Ei$6=new o$1p,Pi$7=new o$1p;v$K.prototype._setTransform=function(e){var t=o$1p.clone(this.positionWC,Ti$6),i=o$1p.clone(this.upWC,Ei$6),n=o$1p.clone(this.directionWC,Pi$7);p$1d.clone(e,this._transform),this._transformChanged=!0,D$Z(this);var r=this._actualInvTransform;p$1d.multiplyByPoint(r,t,this.position),p$1d.multiplyByPointAsVector(r,n,this.direction),p$1d.multiplyByPointAsVector(r,i,this.up),o$1p.cross(this.direction,this.up,this.right),D$Z(this)};var Ri$5=new o$1o,Si$6=new f$19,Ii$5=new o$1p,Mi$6=new o$1p;v$K.prototype._adjustOrthographicFrustum=function(e){if(this.frustum instanceof a$V&&(e||!(this._positionCartographic.height<15e4))){if(!p$1d.equals(p$1d.IDENTITY,this.transform))return void(this.frustum.width=o$1p.magnitude(this.position));var t,i,n=this._scene,r=n.globe;if(e$2e(r)){var o=Ri$5;o.x=n.drawingBufferWidth/2,o.y=n.drawingBufferHeight/2;var a=this.getPickRay(o,Si$6);if(t=r.pickWorldCoordinates(a,n,Ii$5),n.pickPositionSupported&&(i=n.pickPositionWorldCoordinates(o,Mi$6)),e$2e(t)&&e$2e(i)){var s=e$2e(i)?o$1p.distance(i,this.positionWC):Number.POSITIVE_INFINITY,l=e$2e(t)?o$1p.distance(t,this.positionWC):Number.POSITIVE_INFINITY;this.frustum.width=Math.min(s,l)}else e$2e(i)?this.frustum.width=o$1p.distance(i,this.positionWC):e$2e(t)&&(this.frustum.width=o$1p.distance(t,this.positionWC))}if(!e$2e(r)||!e$2e(t)&&!e$2e(i)){var u=Math.max(this.positionCartographic.height,0);this.frustum.width=u}}};var lt$7=new o$1p,Pt$8=new p$1d,Wi$5=new p$1d,Rt$a=new n$15,St$8=new p$1e,Ht$7=new a$18;function Di$7(e,t,i){var n=p$1d.clone(e.transform,Pt$8),r=m$19.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,Wi$5);e._setTransform(r),o$1p.clone(o$1p.ZERO,e.position),i.heading=i.heading-e$2d.PI_OVER_TWO;var o=n$15.fromHeadingPitchRoll(i,Rt$a),a=p$1e.fromQuaternion(o,St$8);p$1e.getColumn(a,0,e.direction),p$1e.getColumn(a,2,e.up),o$1p.cross(e.direction,e.up,e.right),e._setTransform(n),e._adjustOrthographicFrustum(!0)}function xi$7(e,t,i,n){var r=p$1d.clone(e.transform,Pt$8);if(e._setTransform(p$1d.IDENTITY),!o$1p.equals(t,e.positionWC)){if(n){var o=e._projection,a=o.ellipsoid.cartesianToCartographic(t,Ht$7);t=o.project(a,lt$7)}o$1p.clone(t,e.position)}i.heading=i.heading-e$2d.PI_OVER_TWO;var s=n$15.fromHeadingPitchRoll(i,Rt$a),l=p$1e.fromQuaternion(s,St$8);p$1e.getColumn(l,0,e.direction),p$1e.getColumn(l,2,e.up),o$1p.cross(e.direction,e.up,e.right),e._setTransform(r),e._adjustOrthographicFrustum(!0)}function Oi$5(e,t,i,n){var r=p$1d.clone(e.transform,Pt$8);if(e._setTransform(p$1d.IDENTITY),!o$1p.equals(t,e.positionWC)){if(n){var o=e._projection,a=o.ellipsoid.cartesianToCartographic(t,Ht$7);t=o.project(a,lt$7)}o$1o.clone(t,e.position);var s=.5*-t.z,l=-s,u=e.frustum;if(l>s){var c=u.top/u.right;u.right=l,u.left=s,u.top=u.right*c,u.bottom=-u.top}}if(e._scene.mapMode2D===Rr$3.ROTATE){i.heading=i.heading-e$2d.PI_OVER_TWO,i.pitch=-e$2d.PI_OVER_TWO,i.roll=0;var h=n$15.fromHeadingPitchRoll(i,Rt$a),d=p$1e.fromQuaternion(h,St$8);p$1e.getColumn(d,2,e.up),o$1p.cross(e.direction,e.up,e.right)}e._setTransform(r)}var Ni$6=new o$1p,Ai$5=new o$1p,Fi$4=new o$1p;function Ut$8(e,t,i,n){var r=o$1p.clone(i.direction,Ni$6),o=o$1p.clone(i.up,Ai$5);if(e._scene.mode===C$14.SCENE3D){var a=e._projection.ellipsoid,s=m$19.eastNorthUpToFixedFrame(t,a,ct$c),l=p$1d.inverseTransformation(s,ft$b);p$1d.multiplyByPointAsVector(l,r,r),p$1d.multiplyByPointAsVector(l,o,o)}var u=o$1p.cross(r,o,Fi$4);return n.heading=Bt$a(r,o),n.pitch=bt$a(r),n.roll=Lt$8(r,o,u),n}var It$c={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},tt$h=new i$16;v$K.prototype.setView=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.orientation,u$Z.EMPTY_OBJECT),i=this._mode;if(i!==C$14.MORPHING){e$2e(e.endTransform)&&this._setTransform(e.endTransform);var n=u$Z(e.convert,!0),r=u$Z(e.destination,o$1p.clone(this.positionWC,lt$7));e$2e(r)&&e$2e(r.west)&&(r=this.getRectangleCameraCoordinates(r,lt$7),n=!1),e$2e(t.direction)&&(t=Ut$8(this,r,t,It$c.orientation)),tt$h.heading=u$Z(t.heading,0),tt$h.pitch=u$Z(t.pitch,-e$2d.PI_OVER_TWO),tt$h.roll=u$Z(t.roll,0),this._suspendTerrainAdjustment=!0,i===C$14.SCENE3D?Di$7(this,r,tt$h):i===C$14.SCENE2D?Oi$5(this,r,tt$h,n):xi$7(this,r,tt$h,n)}};var Vi$6=new o$1p;function jt$7(e,t){var i,n,r=e._scene.mapMode2D===Rr$3.ROTATE,o=e._maxCoord.x,a=e._maxCoord.y;r?i=-(n=o):(n=t.x-2*o,i=t.x+2*o),t.x>o&&(t.x=n),t.x<-o&&(t.x=i),t.y>a&&(t.y=a),t.y<-a&&(t.y=-a)}v$K.prototype.flyHome=function(e){var t=this._mode;if(t===C$14.MORPHING&&this._scene.completeMorph(),t===C$14.SCENE2D)this.flyTo({destination:v$K.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:p$1d.IDENTITY});else if(t===C$14.SCENE3D){var i=this.getRectangleCameraCoordinates(v$K.DEFAULT_VIEW_RECTANGLE),n=o$1p.magnitude(i);n+=n*v$K.DEFAULT_VIEW_FACTOR,o$1p.normalize(i,i),o$1p.multiplyByScalar(i,n,i),this.flyTo({destination:i,duration:e,endTransform:p$1d.IDENTITY})}else if(t===C$14.COLUMBUS_VIEW){var r=this._projection.ellipsoid.maximumRadius,o=new o$1p(0,-1,1);o=o$1p.multiplyByScalar(o$1p.normalize(o,o),5*r,o),this.flyTo({destination:o,duration:e,orientation:{heading:0,pitch:-Math.acos(o$1p.normalize(o,Vi$6).z),roll:0},endTransform:p$1d.IDENTITY,convert:!1})}},v$K.prototype.worldToCameraCoordinates=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required.");return e$2e(t)||(t=new e$2c),D$Z(this),p$1d.multiplyByVector(this._actualInvTransform,e,t)},v$K.prototype.worldToCameraCoordinatesPoint=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required.");return e$2e(t)||(t=new o$1p),D$Z(this),p$1d.multiplyByPoint(this._actualInvTransform,e,t)},v$K.prototype.worldToCameraCoordinatesVector=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required.");return e$2e(t)||(t=new o$1p),D$Z(this),p$1d.multiplyByPointAsVector(this._actualInvTransform,e,t)},v$K.prototype.cameraToWorldCoordinates=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required.");return e$2e(t)||(t=new e$2c),D$Z(this),p$1d.multiplyByVector(this._actualTransform,e,t)},v$K.prototype.cameraToWorldCoordinatesPoint=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required.");return e$2e(t)||(t=new o$1p),D$Z(this),p$1d.multiplyByPoint(this._actualTransform,e,t)},v$K.prototype.cameraToWorldCoordinatesVector=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required.");return e$2e(t)||(t=new o$1p),D$Z(this),p$1d.multiplyByPointAsVector(this._actualTransform,e,t)};var vt$c=new o$1p;v$K.prototype.move=function(e,t){if(!e$2e(e))throw new t$15("direction is required.");var i=this._scene;if(this._enableIndoorColliDetection){o$1p.multiplyByScalar(e,Math.sign(t),vt$c);var n=i.collideDetection(vt$c);if(e$2e(n))if(o$1p.distance(this.position,n)<1)return}var r=this.position;o$1p.multiplyByScalar(e,t,vt$c),o$1p.add(r,vt$c,r),this._mode===C$14.SCENE2D&&jt$7(this,r),this._adjustOrthographicFrustum(!0)},v$K.prototype.moveForward=function(e){e=u$Z(e,this.defaultMoveAmount),this._mode===C$14.SCENE2D?pt$c(this,e):this.move(this.direction,e)},v$K.prototype.moveBackward=function(e){e=u$Z(e,this.defaultMoveAmount),this._mode===C$14.SCENE2D?pt$c(this,-e):this.move(this.direction,-e)},v$K.prototype.moveUp=function(e){e=u$Z(e,this.defaultMoveAmount),this.move(this.up,e)},v$K.prototype.moveDown=function(e){e=u$Z(e,this.defaultMoveAmount),this.move(this.up,-e)},v$K.prototype.moveRight=function(e){e=u$Z(e,this.defaultMoveAmount),this.move(this.right,e)},v$K.prototype.moveLeft=function(e){e=u$Z(e,this.defaultMoveAmount),this.move(this.right,-e)},v$K.prototype.lookLeft=function(e){e=u$Z(e,this.defaultLookAmount),this._mode!==C$14.SCENE2D&&this.look(this.up,-e)},v$K.prototype.lookRight=function(e){e=u$Z(e,this.defaultLookAmount),this._mode!==C$14.SCENE2D&&this.look(this.up,e)},v$K.prototype.lookUp=function(e){e=u$Z(e,this.defaultLookAmount),this._mode!==C$14.SCENE2D&&this.look(this.right,-e)},v$K.prototype.lookDown=function(e){e=u$Z(e,this.defaultLookAmount),this._mode!==C$14.SCENE2D&&this.look(this.right,e)};var zi$6=new n$15,Bi$4=new p$1e;v$K.prototype.look=function(e,t){if(!e$2e(e))throw new t$15("axis is required.");var i=u$Z(t,this.defaultLookAmount),n=n$15.fromAxisAngle(e,-i,zi$6),r=p$1e.fromQuaternion(n,Bi$4),o=this.direction,a=this.up,s=this.right;p$1e.multiplyByVector(r,o,o),p$1e.multiplyByVector(r,a,a),p$1e.multiplyByVector(r,s,s)},v$K.prototype.twistLeft=function(e){e=u$Z(e,this.defaultLookAmount),this.look(this.direction,e)},v$K.prototype.twistRight=function(e){e=u$Z(e,this.defaultLookAmount),this.look(this.direction,-e)};var bi$7=new n$15,Li$4=new p$1e;v$K.prototype.rotate=function(e,t){if(!e$2e(e))throw new t$15("axis is required.");var i=u$Z(t,this.defaultRotateAmount),n=n$15.fromAxisAngle(e,-i,bi$7),r=p$1e.fromQuaternion(n,Li$4);p$1e.multiplyByVector(r,this.position,this.position),p$1e.multiplyByVector(r,this.direction,this.direction),p$1e.multiplyByVector(r,this.up,this.up),o$1p.cross(this.direction,this.up,this.right),o$1p.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)},v$K.prototype.rotateDown=function(e){Zt$6(this,e=u$Z(e,this.defaultRotateAmount))},v$K.prototype.rotateUp=function(e){Zt$6(this,-(e=u$Z(e,this.defaultRotateAmount)))};var Hi$5=new o$1p,Ui$5=new o$1p,ji$5=new o$1p,kt$7=new o$1p;function Zt$6(e,t){var i=e.position,n=o$1p.normalize(i,Hi$5);if(e$2e(e.constrainedAxis)){var r=o$1p.equalsEpsilon(n,e.constrainedAxis,e$2d.EPSILON2),o=o$1p.equalsEpsilon(n,o$1p.negate(e.constrainedAxis,kt$7),e$2d.EPSILON2);if(r||o)(r&&t<0||o&&t>0)&&e.rotate(e.right,t);else{var a=o$1p.normalize(e.constrainedAxis,Ui$5),s=o$1p.dot(n,a),l=e$2d.acosClamped(s);t>0&&t>l&&(t=l-e$2d.EPSILON4),s=o$1p.dot(n,o$1p.negate(a,kt$7)),l=e$2d.acosClamped(s),t<0&&-t>l&&(t=-l+e$2d.EPSILON4);var u=o$1p.cross(a,n,ji$5),c=o$1p.dot(u,e.right);if(c<0&&t>0)return;u=c<0?o$1p.negate(u,u):u,e.rotate(u,t)}}else e.rotate(e.right,t)}function Yt$7(e,t){e$2e(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function pt$c(e,t){var i,n=e.frustum;if(!(n instanceof l$11&&e$2e(n.left)&&e$2e(n.right)&&e$2e(n.bottom)&&e$2e(n.top)))throw new t$15("The camera frustum is expected to be orthographic for 2D camera control.");if(t*=.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){var r=n.top-t,o=n.bottom+t,a=e._maxCoord.y;e._scene.mapMode2D===Rr$3.ROTATE&&(a*=e.maximumZoomFactor),o>a&&(o=a,r=-a),r<=o&&(r=1,o=-1),i=n.right/n.top,n.top=r,n.bottom=o,n.right=n.top*i,n.left=-n.right}else{var s=n.right-t,l=n.left+t,u=e._maxCoord.x;e._scene.mapMode2D===Rr$3.ROTATE&&(u*=e.maximumZoomFactor),s>u&&(s=u,l=-u),s<=l&&(s=1,l=-1),i=n.top/n.right,n.right=s,n.left=l,n.top=n.right*i,n.bottom=-n.top}}function Gt$6(e,t){e.move(e.direction,t)}v$K.prototype.rotateRight=function(e){Yt$7(this,-(e=u$Z(e,this.defaultRotateAmount)))},v$K.prototype.rotateLeft=function(e){Yt$7(this,e=u$Z(e,this.defaultRotateAmount))},v$K.prototype.zoomIn=function(e){e=u$Z(e,this.defaultZoomAmount),this._mode===C$14.SCENE2D?pt$c(this,e):Gt$6(this,e)},v$K.prototype.zoomOut=function(e){e=u$Z(e,this.defaultZoomAmount),this._mode===C$14.SCENE2D?pt$c(this,-e):Gt$6(this,-e)},v$K.prototype.getMagnitude=function(){return this._mode===C$14.SCENE3D?o$1p.magnitude(this.position):this._mode===C$14.COLUMBUS_VIEW?Math.abs(this.position.z):this._mode===C$14.SCENE2D?Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom):void 0};var ki$6=new p$1d;v$K.prototype.lookAt=function(e,t){if(!e$2e(e))throw new t$15("target is required");if(!e$2e(t))throw new t$15("offset is required");if(this._mode===C$14.MORPHING)throw new t$15("lookAt is not supported while morphing.");var i=m$19.eastNorthUpToFixedFrame(e,t$12.WGS84,ki$6);this.lookAtTransform(i,t)};var Zi$4=new o$1p,Yi$4=new n$15,Gi$3=new n$15,Qi$3=new p$1e;function Qt$7(e,t,i){t=e$2d.clamp(t,-e$2d.PI_OVER_TWO,e$2d.PI_OVER_TWO),e=e$2d.zeroToTwoPi(e)-e$2d.PI_OVER_TWO;var n=n$15.fromAxisAngle(o$1p.UNIT_Y,-t,Yi$4),r=n$15.fromAxisAngle(o$1p.UNIT_Z,-e,Gi$3),o=n$15.multiply(r,n,r),a=p$1e.fromQuaternion(o,Qi$3),s=o$1p.clone(o$1p.UNIT_X,Zi$4);return p$1e.multiplyByVector(a,s,s),o$1p.negate(s,s),o$1p.multiplyByScalar(s,i,s),s}v$K.prototype.lookAtTransform=function(e,t){if(!e$2e(e))throw new t$15("transform is required");if(this._mode===C$14.MORPHING)throw new t$15("lookAtTransform is not supported while morphing.");if(this._setTransform(e),e$2e(t)){var i;if(i=e$2e(t.heading)?Qt$7(t.heading,t.pitch,t.range):t,this._mode===C$14.SCENE2D){o$1o.clone(o$1o.ZERO,this.position),o$1p.negate(i,this.up),this.up.z=0,o$1p.magnitudeSquared(this.up)<e$2d.EPSILON10&&o$1p.clone(o$1p.UNIT_Y,this.up),o$1p.normalize(this.up,this.up),this._setTransform(p$1d.IDENTITY),o$1p.negate(o$1p.UNIT_Z,this.direction),o$1p.cross(this.direction,this.up,this.right),o$1p.normalize(this.right,this.right);var n=this.frustum,r=n.top/n.right;return n.right=.5*o$1p.magnitude(i),n.left=-n.right,n.top=r*n.right,n.bottom=-n.top,void this._setTransform(e)}o$1p.clone(i,this.position),o$1p.negate(this.position,this.direction),o$1p.normalize(this.direction,this.direction),o$1p.cross(this.direction,o$1p.UNIT_Z,this.right),o$1p.magnitudeSquared(this.right)<e$2d.EPSILON10&&o$1p.clone(o$1p.UNIT_X,this.right),o$1p.normalize(this.right,this.right),o$1p.cross(this.right,this.direction,this.up),o$1p.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)}};var rt$j=new a$18,qi$4=new a$18,Xi$3=new o$1p,Ji$3=new o$1p,Ki$3=new o$1p,$i$4=new o$1p,te$E=new o$1p,ie$F=new o$1p,ee$z=new o$1p,Mt$6=new o$1p,re$J={direction:new o$1p,right:new o$1p,up:new o$1p},qt$8;function N$W(e,t,i,n){return Math.abs(o$1p.dot(t,i))/n-o$1p.dot(e,i)}function Xt$4(e,t,i,n){var r=e._projection.ellipsoid,o=n?e:re$J,a=t.north,s=t.south,l=t.east,u=t.west;u>l&&(l+=e$2d.TWO_PI);var c,h=.5*(u+l);if(s<-e$2d.PI_OVER_TWO+e$2d.RADIANS_PER_DEGREE&&a>e$2d.PI_OVER_TWO-e$2d.RADIANS_PER_DEGREE)c=0;else{var d=rt$j;d.longitude=h,d.latitude=a,d.height=0;var f=qi$4;f.longitude=h,f.latitude=s,f.height=0;var p=qt$8;(!e$2e(p)||p.ellipsoid!==r)&&(qt$8=p=new E$1t(void 0,void 0,r)),p.setEndPoints(d,f),c=p.interpolateUsingFraction(.5,rt$j).latitude}var _=rt$j;_.longitude=h,_.latitude=c,_.height=0;var m=r.cartographicToCartesian(_,ee$z),g=rt$j;g.longitude=l,g.latitude=a;var x=r.cartographicToCartesian(g,Xi$3);g.longitude=u;var y=r.cartographicToCartesian(g,Ki$3);g.longitude=h;var v=r.cartographicToCartesian(g,te$E);g.latitude=s;var $=r.cartographicToCartesian(g,ie$F);g.longitude=l;var b=r.cartographicToCartesian(g,$i$4);g.longitude=u;var T=r.cartographicToCartesian(g,Ji$3);o$1p.subtract(y,m,y),o$1p.subtract(b,m,b),o$1p.subtract(x,m,x),o$1p.subtract(T,m,T),o$1p.subtract(v,m,v),o$1p.subtract($,m,$);var C=r.geodeticSurfaceNormal(m,o.direction);o$1p.negate(C,C);var S=o$1p.cross(C,o$1p.UNIT_Z,o.right);o$1p.normalize(S,S);var w,E=o$1p.cross(S,C,o.up);if(e.frustum instanceof a$V){var P,A,L=Math.max(o$1p.distance(x,y),o$1p.distance(b,T)),M=Math.max(o$1p.distance(x,b),o$1p.distance(y,T)),R=e.frustum._offCenterFrustum.right/e.frustum._offCenterFrustum.top,O=M*R;L>O?A=(P=L)/R:(A=M,P=O),w=Math.max(P,A)}else{var D=Math.tan(.5*e.frustum.fovy),I=e.frustum.aspectRatio*D;if(w=Math.max(N$W(C,E,y,D),N$W(C,E,b,D),N$W(C,E,x,D),N$W(C,E,T,D),N$W(C,E,v,D),N$W(C,E,$,D),N$W(C,S,y,I),N$W(C,S,b,I),N$W(C,S,x,I),N$W(C,S,T,I),N$W(C,S,v,I),N$W(C,S,$,I)),s<0&&a>0){var F=rt$j;F.longitude=u,F.latitude=0,F.height=0;var B=r.cartographicToCartesian(F,Mt$6);o$1p.subtract(B,m,B),w=Math.max(w,N$W(C,E,B,D),N$W(C,S,B,I)),F.longitude=l,B=r.cartographicToCartesian(F,Mt$6),o$1p.subtract(B,m,B),w=Math.max(w,N$W(C,E,B,D),N$W(C,S,B,I))}}return o$1p.add(m,o$1p.multiplyByScalar(C,-w,Mt$6),i)}var ne$H=new a$18,oe$u=new o$1p,se$z=new o$1p;function ae$z(e,t,i){var n=e._projection;t.west>t.east&&(t=h$18.MAX_VALUE);var r=e._actualTransform,o=e._actualInvTransform,a=ne$H;a.longitude=t.east,a.latitude=t.north;var s=n.project(a,oe$u);p$1d.multiplyByPoint(r,s,s),p$1d.multiplyByPoint(o,s,s),a.longitude=t.west,a.latitude=t.south;var l=n.project(a,se$z);if(p$1d.multiplyByPoint(r,l,l),p$1d.multiplyByPoint(o,l,l),i.x=.5*(s.x-l.x)+l.x,i.y=.5*(s.y-l.y)+l.y,e$2e(e.frustum.fovy)){var u=Math.tan(.5*e.frustum.fovy),c=e.frustum.aspectRatio*u;i.z=.5*Math.max((s.x-l.x)/c,(s.y-l.y)/u)}else{var h=s.x-l.x,d=s.y-l.y;i.z=Math.max(h,d)}return i}var he$v=new a$18,ue$D=new o$1p,ce$y=new o$1p;function fe$x(e,t,i){var n=e._projection;t.west>t.east&&(t=h$18.MAX_VALUE);var r=he$v;r.longitude=t.east,r.latitude=t.north;var o=n.project(r,ue$D);r.longitude=t.west,r.latitude=t.south;var a,s,l=n.project(r,ce$y),u=.5*Math.abs(o.x-l.x),c=.5*Math.abs(o.y-l.y),h=e.frustum.right/e.frustum.top,d=c*h;return u>d?s=(a=u)/h:(s=c,a=d),c=Math.max(2*a,2*s),i.x=.5*(o.x-l.x)+l.x,i.y=.5*(o.y-l.y)+l.y,(r=n.unproject(i,r)).height=c,i=n.project(r,i)}v$K.prototype.getRectangleCameraCoordinates=function(e,t){if(!e$2e(e))throw new t$15("rectangle is required");var i=this._mode;return e$2e(t)||(t=new o$1p),i===C$14.SCENE3D?Xt$4(this,e,t):i===C$14.COLUMBUS_VIEW?ae$z(this,e,t):i===C$14.SCENE2D?fe$x(this,e,t):void 0};var de$x=new f$19;function le$x(e,t,i,n){i=u$Z(i,t$12.WGS84);var r=e.getPickRay(t,de$x),o=g$1j.rayEllipsoid(r,i);if(o){var a=o.start>0?o.start:o.stop;return f$19.getPoint(r,a,n)}}var ve$w=new f$19;function pe$C(e,t,i,n){var r=e.getPickRay(t,ve$w).origin;r.z=0;var o=i.unproject(r);if(!(o.latitude<-e$2d.PI_OVER_TWO||o.latitude>e$2d.PI_OVER_TWO))return i.ellipsoid.cartographicToCartesian(o,n)}var ge$s=new f$19;function _e$v(e,t,i,n){var r=e.getPickRay(t,ge$s),o=-r.origin.x/r.direction.x;f$19.getPoint(r,o,n);var a=i.unproject(new o$1p(n.y,n.z,0));if(!(a.latitude<-e$2d.PI_OVER_TWO||a.latitude>e$2d.PI_OVER_TWO||a.longitude<-Math.PI||a.longitude>Math.PI))return i.ellipsoid.cartographicToCartesian(a,n)}v$K.prototype.pickEllipsoid=function(e,t,i){if(!e$2e(e))throw new t$15("windowPosition is required.");var n=this._scene.canvas;if(0!==n.clientWidth&&0!==n.clientHeight){if(e$2e(i)||(i=new o$1p),t=u$Z(t,t$12.WGS84),this._mode===C$14.SCENE3D)i=le$x(this,e,t,i);else if(this._mode===C$14.SCENE2D)i=pe$C(this,e,this._projection,i);else{if(this._mode!==C$14.COLUMBUS_VIEW)return;i=_e$v(this,e,this._projection,i)}return i}};var me$y=new o$1p,Ce$k=new o$1p,ye$q=new o$1p;function we$n(e,t,i){var n=e._scene.canvas,r=n.clientWidth,o=n.clientHeight,a=Math.tan(.5*e.frustum.fovy),s=e.frustum.aspectRatio*a,l=e.frustum.near,u=2/r*t.x-1,c=2/o*(o-t.y)-1,h=e.positionWC;o$1p.clone(h,i.origin);var d=o$1p.multiplyByScalar(e.directionWC,l,me$y);o$1p.add(h,d,d);var f=o$1p.multiplyByScalar(e.rightWC,u*l*s,Ce$k),p=o$1p.multiplyByScalar(e.upWC,c*l*a,ye$q),_=o$1p.add(d,f,i.direction);return o$1p.add(_,p,_),o$1p.subtract(_,h,_),o$1p.normalize(_,_),i}var gt$9=new o$1p;function Te$q(e,t,i){var n=e._scene.canvas,r=n.clientWidth,o=n.clientHeight,a=e.frustum;e$2e(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2/r*t.x-1;s*=.5*(a.right-a.left);var l=2/o*(o-t.y)-1;l*=.5*(a.top-a.bottom);var u=i.origin;return o$1p.clone(e.position,u),o$1p.multiplyByScalar(e.right,s,gt$9),o$1p.add(gt$9,u,u),o$1p.multiplyByScalar(e.up,l,gt$9),o$1p.add(gt$9,u,u),o$1p.clone(e.directionWC,i.direction),(e._mode===C$14.COLUMBUS_VIEW||e._mode===C$14.SCENE2D)&&o$1p.fromElements(i.origin.z,i.origin.x,i.origin.y,i.origin),i}v$K.prototype.getPickRay=function(e,t){if(!e$2e(e))throw new t$15("windowPosition is required.");e$2e(t)||(t=new f$19);const i=this._scene.canvas;if(!(i.clientWidth<=0||i.clientWidth<=0)){var n=this.frustum;return e$2e(n.aspectRatio)&&e$2e(n.fov)&&e$2e(n.near)?we$n(this,e,t):Te$q(this,e,t)}};var Ee$q=new o$1p,Pe$m=new o$1p;v$K.prototype.distanceToBoundingSphere=function(e){if(!e$2e(e))throw new t$15("boundingSphere is required.");var t=o$1p.subtract(this.positionWC,e.center,Ee$q),i=o$1p.multiplyByScalar(this.directionWC,o$1p.dot(t,this.directionWC),Pe$m);return Math.max(0,o$1p.magnitude(i)-e.radius)};var Re$m=new o$1o;function Se$h(e,t,i,n,r,o){var a=o$1p.clone(t);return i.y>n?a.y-=i.y-n:i.y<-n&&(a.y+=-n-i.y),i.z>r?a.z-=i.z-r:i.z<-r&&(a.z+=-r-i.z),{easingFunction:m$Y.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:o,update:function(i){var n=o$1p.lerp(t,a,i.time,new o$1p);e.worldToCameraCoordinatesPoint(n,e.position)}}}v$K.prototype.getPixelSize=function(e,t,i){if(!e$2e(e))throw new t$15("boundingSphere is required.");if(!e$2e(t))throw new t$15("drawingBufferWidth is required.");if(!e$2e(i))throw new t$15("drawingBufferHeight is required.");var n=this.distanceToBoundingSphere(e),r=this.frustum.getPixelDimensions(t,i,n,this._scene.pixelRatio,Re$m);return Math.max(r.x,r.y)};var Ie$n=new o$1p,Jt$6=new o$1p,Me$q=new o$1p,We$l=new o$1p;function De$n(e,t){var i=e.position,n=e.direction,r=e.worldToCameraCoordinatesVector(o$1p.UNIT_X,Ie$n),o=-o$1p.dot(r,i)/o$1p.dot(r,n),a=o$1p.add(i,o$1p.multiplyByScalar(n,o,Jt$6),Jt$6);e.cameraToWorldCoordinatesPoint(a,a),i=e.cameraToWorldCoordinatesPoint(e.position,Me$q);var s=Math.tan(.5*e.frustum.fovy),l=e.frustum.aspectRatio*s,u=o$1p.magnitude(o$1p.subtract(i,a,We$l)),c=l*u,h=s*u,d=e._maxCoord.x,f=e._maxCoord.y,p=Math.max(c-d,d),_=Math.max(h-f,f);if(i.z<-p||i.z>p||i.y<-_||i.y>_){var m=a.y<-p||a.y>p,g=a.z<-_||a.z>_;if(m||g)return Se$h(e,i,a,p,_,t)}}v$K.prototype.createCorrectPositionTween=function(e){if(!e$2e(e))throw new t$15("duration is required.");if(this._mode===C$14.COLUMBUS_VIEW)return De$n(this,e)};var xe$q=new o$1p,M$10={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};function Oe$p(e,t){var i=e.frustum,n=Math.tan(.5*i.fovy),r=i.aspectRatio*n;return Math.max(t/r,t/n)}function Ne$k(e,t){var i=e.frustum;e$2e(i._offCenterFrustum)&&(i=i._offCenterFrustum);var n,r,o=i.right/i.top,a=t*o;return t>a?r=(n=t)/o:(r=t,n=a),1.5*Math.max(n,r)}v$K.prototype.cancelFlight=function(){e$2e(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)},v$K.prototype.flyTo=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).destination;if(!e$2e(t))throw new t$15("destination is required.");if(this._mode!==C$14.MORPHING){this.cancelFlight();var i=u$Z(e.orientation,u$Z.EMPTY_OBJECT);if(e$2e(i.direction)&&(i=Ut$8(this,t,i,It$c.orientation)),e$2e(e.duration)&&e.duration<=0){var n=It$c;return n.destination=e.destination,n.orientation.heading=i.heading,n.orientation.pitch=i.pitch,n.orientation.roll=i.roll,n.convert=e.convert,n.endTransform=e.endTransform,this.setView(n),void("function"==typeof e.complete&&e.complete())}var r=e$2e(t.west);r&&(t=this.getRectangleCameraCoordinates(t,xe$q));var o,a=this;M$10.destination=t,M$10.heading=i.heading,M$10.pitch=i.pitch,M$10.roll=i.roll,M$10.duration=e.duration,M$10.complete=function(){o===a._currentFlight&&(a._currentFlight=void 0),e$2e(e.complete)&&e.complete()},M$10.cancel=e.cancel,M$10.endTransform=e.endTransform,M$10.convert=!r&&e.convert,M$10.maximumHeight=e.maximumHeight,M$10.pitchAdjustHeight=e.pitchAdjustHeight,M$10.flyOverLongitude=e.flyOverLongitude,M$10.flyOverLongitudeWeight=e.flyOverLongitudeWeight,M$10.easingFunction=e.easingFunction,M$10.headingFree=u$Z(e.headingFree,!1),M$10.pitchFree=u$Z(e.pitchFree,!1),M$10.altitudeFree=u$Z(e.altitudeFree,!1),M$10.directTurning=u$Z(e.directTurning,!1),M$10.interpolationMode=u$Z(e.interpolationMode,j$16.NONE),M$10.catmullRomSpline=e.catmullRomSpline,M$10.preStopIndex=e.preStopIndex,M$10.flyClampToGround=this._flyClampToGround,M$10.flyRelativeHeight=this._flyRelativeHeight;var s=this._scene,l=mr$5.createTween(s,M$10);if(0===l.duration)return void("function"==typeof l.complete&&l.complete());o=s.tweens.add(l),this._currentFlight=o;var u=this._scene.preloadFlightCamera;this._mode!==C$14.SCENE2D&&(e$2e(u)||(u=v$K.clone(this)),u.setView({destination:t,orientation:i}),this._scene.preloadFlightCullingVolume=u.frustum.computeCullingVolume(u.positionWC,u.directionWC,u.upWC))}};var Ae$u=100;function Kt$7(e,t,i){e$2e(i)||(i=a$T.clone(v$K.DEFAULT_OFFSET));var n=e._scene.screenSpaceCameraController.minimumZoomDistance,r=e._scene.screenSpaceCameraController.maximumZoomDistance,o=i.range;if(!e$2e(o)||0===o){var a=t.radius;0===a?i.range=Ae$u:e.frustum instanceof a$V||e._mode===C$14.SCENE2D?i.range=Ne$k(e,a):i.range=Oe$p(e,a),i.range=e$2d.clamp(i.range,n,r)}return i}v$K.prototype.viewBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("boundingSphere is required.");if(this._mode===C$14.MORPHING)throw new t$15("viewBoundingSphere is not supported while morphing.");t=Kt$7(this,e,t),this.lookAt(e.center,t)};var Fe$n=new p$1d,Ve$k=new o$1p,ze$g=new o$1p,Be$n=new o$1p,be$u=new o$1p,Le$p=new e$2c,He$g=new n$15,Ue$j=new p$1e;v$K.prototype.flyToBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("boundingSphere is required.");t=u$Z(t,u$Z.EMPTY_OBJECT);var i=this._mode===C$14.SCENE2D||this._mode===C$14.COLUMBUS_VIEW;this._setTransform(p$1d.IDENTITY);var n,r=Kt$7(this,e,t.offset);n=i?o$1p.multiplyByScalar(o$1p.UNIT_Z,r.range,Ve$k):Qt$7(r.heading,r.pitch,r.range);var o,a,s=m$19.eastNorthUpToFixedFrame(e.center,t$12.WGS84,Fe$n);if(p$1d.multiplyByPoint(s,n,n),!i){if(o=o$1p.subtract(e.center,n,ze$g),o$1p.normalize(o,o),a=p$1d.multiplyByPointAsVector(s,o$1p.UNIT_Z,Be$n),1-Math.abs(o$1p.dot(o,a))<e$2d.EPSILON6){var l=n$15.fromAxisAngle(o,r.heading,He$g),u=p$1e.fromQuaternion(l,Ue$j);o$1p.fromCartesian4(p$1d.getColumn(s,1,Le$p),a),p$1e.multiplyByVector(u,a,a)}var c=o$1p.cross(o,a,be$u);o$1p.cross(c,o,a),o$1p.normalize(a,a)}this.flyTo({destination:n,orientation:{direction:o,up:a},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var $t$6=new o$1p,ti$7=new o$1p,Wt$9=new o$1p,ii$7=new o$1p,nt$e=[new o$1p,new o$1p,new o$1p,new o$1p];function je$h(e,t){var i,n,r=t.radii,o=e.positionWC,a=o$1p.multiplyComponents(t.oneOverRadii,o,$t$6),s=o$1p.magnitude(a),l=o$1p.normalize(a,ti$7);o$1p.equalsEpsilon(l,o$1p.UNIT_Z,e$2d.EPSILON10)?(i=new o$1p(0,1,0),n=new o$1p(0,0,1)):(i=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,l,Wt$9),Wt$9),n=o$1p.normalize(o$1p.cross(l,i,ii$7),ii$7));var u=Math.sqrt(o$1p.magnitudeSquared(a)-1),c=o$1p.multiplyByScalar(l,1/s,$t$6),h=u/s,d=o$1p.multiplyByScalar(i,h,ti$7),f=o$1p.multiplyByScalar(n,h,Wt$9),p=o$1p.add(c,f,nt$e[0]);o$1p.subtract(p,d,p),o$1p.multiplyComponents(r,p,p);var _=o$1p.subtract(c,f,nt$e[1]);o$1p.subtract(_,d,_),o$1p.multiplyComponents(r,_,_);var m=o$1p.subtract(c,f,nt$e[2]);o$1p.add(m,d,m),o$1p.multiplyComponents(r,m,m);var g=o$1p.add(c,f,nt$e[3]);return o$1p.add(g,d,g),o$1p.multiplyComponents(r,g,g),nt$e}var Dt$b=new o$1o,ke$h=new o$1p,q$14=[new a$18,new a$18,new a$18,new a$18];function _t$a(e,t,i,n,r,o){Dt$b.x=e,Dt$b.y=t;var a=n.pickEllipsoid(Dt$b,r,ke$h);return e$2e(a)?(q$14[i]=r.cartesianToCartographic(a,q$14[i]),1):(q$14[i]=r.cartesianToCartographic(o[i],q$14[i]),0)}function Ze$8(e,t){var i=e.distance,n=e.normal;t[0]=-2*n.x*n.x+1,t[1]=-2*n.y*n.x,t[2]=-2*n.z*n.x,t[3]=0,t[4]=-2*n.x*n.y,t[5]=-2*n.y*n.y+1,t[6]=-2*n.z*n.y,t[7]=0,t[8]=-2*n.x*n.z,t[9]=-2*n.y*n.z,t[10]=-2*n.z*n.z+1,t[11]=0,t[12]=-2*n.x*i,t[13]=-2*n.y*i,t[14]=-2*n.z*i,t[15]=1}v$K.prototype.computeViewRectangle=function(e,t){e=u$Z(e,t$12.WGS84);var i=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),n=new i$1d(o$1p.ZERO,e.maximumRadius);if(i.computeVisibility(n)!==Ae$w.OUTSIDE){var r=this._scene.canvas,o=r.clientWidth,a=r.clientHeight,s=0,l=je$h(this,e);if(s+=_t$a(0,0,0,this,e,l),s+=_t$a(0,a,1,this,e,l),s+=_t$a(o,a,2,this,e,l),(s+=_t$a(o,0,3,this,e,l))<2)return h$18.MAX_VALUE;t=h$18.fromCartographicArray(q$14,t);for(var u=0,c=q$14[3].longitude,h=0;h<4;++h){var d=q$14[h].longitude,f=Math.abs(d-c);f>e$2d.PI?u+=e$2d.TWO_PI-f:u+=f,c=d}return e$2d.equalsEpsilon(Math.abs(u),e$2d.TWO_PI,e$2d.EPSILON9)&&(t.west=-e$2d.PI,t.east=e$2d.PI,q$14[0].latitude>=0?t.north=e$2d.PI_OVER_TWO:t.south=-e$2d.PI_OVER_TWO),t}},v$K.prototype.switchToPerspectiveFrustum=function(){if(!(this._mode===C$14.SCENE2D||this.frustum instanceof o$15)){var e=this._scene;this.frustum=new o$15,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=e$2d.toRadians(60)}},v$K.prototype.switchToOrthographicFrustum=function(){if(!(this._mode===C$14.SCENE2D||this.frustum instanceof a$V)){var e=this._scene;this.frustum=new a$V,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.width=o$1p.magnitude(this.position),e$2e(this.frustum.projectionMatrix)&&this._adjustOrthographicFrustum(!0)}},v$K.clone=function(e,t){return e$2e(t)||(t=new v$K(e._scene)),o$1p.clone(e.position,t.position),o$1p.clone(e.direction,t.direction),o$1p.clone(e.up,t.up),o$1p.clone(e.right,t.right),p$1d.clone(e._transform,t.transform),t._mode=e._mode,t._transformChanged=!0,t.frustum=e.frustum.clone(),t},v$K.prototype.enableReflection=function(e){this.bReflect=!0,Ze$8(e,this._reflectMatrix),D$Z(this),this.frustum.reflect=!0,this.frustum.clipPlane=e,this.frustum.currentViewMatrix=this._viewMatrix},v$K.prototype.disableReflection=function(){this.bReflect=!1,this.frustum.reflect=!1,this.frustum instanceof o$15&&this.frustum.resetProjectionMatrix(),D$Z(this)};var Ye$i=new p$1d,Ge$h=new p$1d,J$Z=0,mt$8=!1;v$K.prototype.flyCircle=function(e){J$Z=0,mt$8=!1,this._isFlyCircle=!1,this._flyCircle(e)},v$K.prototype._flyCircle=function(e){if(this._flyCircleLoop||!mt$8){(!this._isFlyCircle||this._isResetFlyCircleParm)&&(Et$c(),J$Z=0,mt$8=!1,this._flyCircleCenter=o$1p.clone(e),this._isFlyCircle=!0,this._isResetFlyCircleParm=!1);var t=this.constrainedAxis,i=p$1d.clone(this.transform,Ge$h),n=m$19.eastNorthUpToFixedFrame(e,t$12.WGS84,Ye$i);this._setTransform(n),this.constrainedAxis=o$1p.UNIT_Z,Et$c();var r=.01;r*=this._speedRatio;var o=2*Math.PI-Math.abs(J$Z);J$Z<0&&(o*=-1),!this._flyCircleLoop&&Math.abs(J$Z)>=2*Math.PI&&(r=o,mt$8=!0),J$Z+=r,this.rotateRight(-r),this.constrainedAxis=t,this._setTransform(i)}else J$Z=0},v$K.prototype.stopFlyCircle=function(){this._isFlyCircle=!1};var t$R={FRONT:de$y.FRONT,BACK:de$y.BACK,FRONT_AND_BACK:de$y.FRONT_AND_BACK},G$1a=Object.freeze(t$R),j$15=0,I$1b=1;function z$U(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.frustum",e.frustum),o$1q.typeOf.object("options.origin",e.origin),o$1q.typeOf.object("options.orientation",e.orientation);var t,i,n=e.frustum,r=e.orientation,o=e.origin,a=u$Z(e.vertexFormat,n$13.DEFAULT),s=u$Z(e._drawNearPlane,!0);n instanceof o$15?(t=j$15,i=o$15.packedLength):n instanceof a$V&&(t=I$1b,i=a$V.packedLength),this._frustumType=t,this._frustum=n.clone(),this._origin=o$1p.clone(o),this._orientation=n$15.clone(r),this._drawNearPlane=s,this._vertexFormat=a,this._workerName="createFrustumGeometry",this.packedLength=2+i+o$1p.packedLength+n$15.packedLength+n$13.packedLength}z$U.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0);var n=e._frustumType,r=e._frustum;return t[i++]=n,n===j$15?(o$15.pack(r,t,i),i+=o$15.packedLength):(a$V.pack(r,t,i),i+=a$V.packedLength),o$1p.pack(e._origin,t,i),i+=o$1p.packedLength,n$15.pack(e._orientation,t,i),i+=n$15.packedLength,n$13.pack(e._vertexFormat,t,i),t[i+=n$13.packedLength]=e._drawNearPlane?1:0,t};var ee$y=new o$15,re$I=new a$V,ae$y=new n$15,te$D=new o$1p,oe$t=new n$13;function R$Y(e,t,i,n,r,o,a,s){for(var l=e/3*2,u=0;u<4;++u)e$2e(t)&&(t[e]=o.x,t[e+1]=o.y,t[e+2]=o.z),e$2e(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e$2e(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),e+=3;r[l]=0,r[l+1]=0,r[l+2]=1,r[l+3]=0,r[l+4]=1,r[l+5]=1,r[l+6]=0,r[l+7]=1}z$U.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n,r=e[t++];r===j$15?(n=o$15.unpack(e,t,ee$y),t+=o$15.packedLength):(n=a$V.unpack(e,t,re$I),t+=a$V.packedLength);var o=o$1p.unpack(e,t,te$D);t+=o$1p.packedLength;var a=n$15.unpack(e,t,ae$y);t+=n$15.packedLength;var s=n$13.unpack(e,t,oe$t),l=1===e[t+=n$13.packedLength];if(!e$2e(i))return new z$U({frustum:n,origin:o,orientation:a,vertexFormat:s,_drawNearPlane:l});var u=r===i._frustumType?i._frustum:void 0;return i._frustum=n.clone(u),i._frustumType=r,i._origin=o$1p.clone(o,i._origin),i._orientation=n$15.clone(a,i._orientation),i._vertexFormat=n$13.clone(s,i._vertexFormat),i._drawNearPlane=l,i};var ie$E=new p$1e,ve$v=new p$1d,q$13=new p$1d,K$T=new o$1p,W$$=new o$1p,Z$$=new o$1p,pe$B=new o$1p,ce$x=new o$1p,me$x=new o$1p,C$12=new Array(3),Y$N=new Array(4);Y$N[0]=new e$2c(-1,-1,1,1),Y$N[1]=new e$2c(1,-1,1,1),Y$N[2]=new e$2c(1,1,1,1),Y$N[3]=new e$2c(-1,1,1,1);for(var $$Y=new Array(4),J$Y=0;J$Y<4;++J$Y)$$Y[J$Y]=new e$2c;z$U._computeNearFarPlanes=function(e,t,i,n,r,o,a,s){var l=p$1e.fromQuaternion(t,ie$E),u=u$Z(o,K$T),c=u$Z(a,W$$),h=u$Z(s,Z$$);u=p$1e.getColumn(l,0,u),c=p$1e.getColumn(l,1,c),h=p$1e.getColumn(l,2,h),o$1p.normalize(u,u),o$1p.normalize(c,c),o$1p.normalize(h,h),o$1p.negate(u,u);var d,f,p=p$1d.computeView(e,h,c,u,ve$v);if(i===j$15){var _=n.projectionMatrix,m=p$1d.multiply(_,p,q$13);f=p$1d.inverse(m,q$13)}else d=p$1d.inverseTransformation(p,q$13);e$2e(f)?(C$12[0]=n.near,C$12[1]=n.far):(C$12[0]=0,C$12[1]=n.near,C$12[2]=n.far);for(var g=0;g<2;++g)for(var x=0;x<4;++x){var y=e$2c.clone(Y$N[x],$$Y[x]);if(e$2e(f)){var v=1/(y=p$1d.multiplyByVector(f,y,y)).w;o$1p.multiplyByScalar(y,v,y),o$1p.subtract(y,e,y),o$1p.normalize(y,y);var $=o$1p.dot(h,y);o$1p.multiplyByScalar(y,C$12[g]/$,y),o$1p.add(y,e,y)}else{e$2e(n._offCenterFrustum)&&(n=n._offCenterFrustum);var b=C$12[g],T=C$12[g+1];y.x=.5*(y.x*(n.right-n.left)+n.left+n.right),y.y=.5*(y.y*(n.top-n.bottom)+n.bottom+n.top),y.z=.5*(y.z*(b-T)-b-T),y.w=1,p$1d.multiplyByVector(d,y,y)}r[12*g+3*x]=y.x,r[12*g+3*x+1]=y.y,r[12*g+3*x+2]=y.z}},z$U.createGeometry=function(e){var t=e._frustumType,i=e._frustum,n=e._origin,r=e._orientation,o=e._drawNearPlane,a=e._vertexFormat,s=o?6:5,l=new Float64Array(72);z$U._computeNearFarPlanes(n,r,t,i,l);var u=24;l[u]=l[12],l[u+1]=l[13],l[u+2]=l[14],l[u+3]=l[0],l[u+4]=l[1],l[u+5]=l[2],l[u+6]=l[9],l[u+7]=l[10],l[u+8]=l[11],l[u+9]=l[21],l[u+10]=l[22],l[u+11]=l[23],l[u+=12]=l[15],l[u+1]=l[16],l[u+2]=l[17],l[u+3]=l[3],l[u+4]=l[4],l[u+5]=l[5],l[u+6]=l[0],l[u+7]=l[1],l[u+8]=l[2],l[u+9]=l[12],l[u+10]=l[13],l[u+11]=l[14],l[u+=12]=l[3],l[u+1]=l[4],l[u+2]=l[5],l[u+3]=l[15],l[u+4]=l[16],l[u+5]=l[17],l[u+6]=l[18],l[u+7]=l[19],l[u+8]=l[20],l[u+9]=l[6],l[u+10]=l[7],l[u+11]=l[8],l[u+=12]=l[6],l[u+1]=l[7],l[u+2]=l[8],l[u+3]=l[18],l[u+4]=l[19],l[u+5]=l[20],l[u+6]=l[21],l[u+7]=l[22],l[u+8]=l[23],l[u+9]=l[9],l[u+10]=l[10],l[u+11]=l[11],o||(l=l.subarray(12));var c=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:l})});if(e$2e(a.normal)||e$2e(a.tangent)||e$2e(a.bitangent)||e$2e(a.st)){var h=e$2e(a.normal)?new Float32Array(12*s):void 0,d=e$2e(a.tangent)?new Float32Array(12*s):void 0,f=e$2e(a.bitangent)?new Float32Array(12*s):void 0,p=e$2e(a.st)?new Float32Array(8*s):void 0,_=K$T,m=W$$,g=Z$$,x=o$1p.negate(_,pe$B),y=o$1p.negate(m,ce$x),v=o$1p.negate(g,me$x);u=0,o&&(R$Y(u,h,d,f,p,v,_,m),u+=12),R$Y(u,h,d,f,p,g,x,m),R$Y(u+=12,h,d,f,p,x,v,m),R$Y(u+=12,h,d,f,p,y,v,x),R$Y(u+=12,h,d,f,p,_,g,m),R$Y(u+=12,h,d,f,p,m,g,x),e$2e(h)&&(c.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:h})),e$2e(d)&&(c.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:d})),e$2e(f)&&(c.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:f})),e$2e(p)&&(c.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:p}))}for(var $=new Uint16Array(6*s),b=0;b<s;++b){var T=6*b,C=4*b;$[T]=C,$[T+1]=C+1,$[T+2]=C+2,$[T+3]=C,$[T+4]=C+2,$[T+5]=C+3}return new I$1p({attributes:c,indices:$,primitiveType:W$18.TRIANGLES,boundingSphere:i$1d.fromVertices(l)})};var d$1e=0,A$14=1;function s$O(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.frustum",e.frustum),o$1q.typeOf.object("options.origin",e.origin),o$1q.typeOf.object("options.orientation",e.orientation);var t,i,n=e.frustum,r=e.orientation,o=e.origin,a=u$Z(e._drawNearPlane,!0);n instanceof o$15?(t=d$1e,i=o$15.packedLength):n instanceof a$V&&(t=A$14,i=a$V.packedLength),this._frustumType=t,this._frustum=n.clone(),this._origin=o$1p.clone(o),this._orientation=n$15.clone(r),this._drawNearPlane=a,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+i+o$1p.packedLength+n$15.packedLength}s$O.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0);var n=e._frustumType,r=e._frustum;return t[i++]=n,n===d$1e?(o$15.pack(r,t,i),i+=o$15.packedLength):(a$V.pack(r,t,i),i+=a$V.packedLength),o$1p.pack(e._origin,t,i),i+=o$1p.packedLength,n$15.pack(e._orientation,t,i),t[i+=n$15.packedLength]=e._drawNearPlane?1:0,t};var j$14=new o$15,C$11=new a$V,E$14=new n$15,G$19=new o$1p;s$O.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n,r=e[t++];r===d$1e?(n=o$15.unpack(e,t,j$14),t+=o$15.packedLength):(n=a$V.unpack(e,t,C$11),t+=a$V.packedLength);var o=o$1p.unpack(e,t,G$19);t+=o$1p.packedLength;var a=n$15.unpack(e,t,E$14),s=1===e[t+=n$15.packedLength];if(!e$2e(i))return new s$O({frustum:n,origin:o,orientation:a,_drawNearPlane:s});var l=r===i._frustumType?i._frustum:void 0;return i._frustum=n.clone(l),i._frustumType=r,i._origin=o$1p.clone(o,i._origin),i._orientation=n$15.clone(a,i._orientation),i._drawNearPlane=s,i},s$O.createGeometry=function(e){var t=e._frustumType,i=e._frustum,n=e._origin,r=e._orientation,o=e._drawNearPlane,a=new Float64Array(24);z$U._computeNearFarPlanes(n,r,t,i,a);for(var s,l,u=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:a})}),c=o?2:1,h=new Uint16Array(8*(c+1)),d=o?0:1;d<2;++d)l=4*d,h[s=o?8*d:0]=l,h[s+1]=l+1,h[s+2]=l+1,h[s+3]=l+2,h[s+4]=l+2,h[s+5]=l+3,h[s+6]=l+3,h[s+7]=l;for(d=0;d<2;++d)l=4*d,h[s=8*(c+d)]=l,h[s+1]=l+4,h[s+2]=l+1,h[s+3]=l+5,h[s+4]=l+2,h[s+5]=l+6,h[s+6]=l+3,h[s+7]=l+7;return new I$1p({attributes:u,indices:h,primitiveType:W$18.LINES,boundingSphere:i$1d.fromVertices(a)})};var d$1d="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n vec4 color = czm_gammaCorrect(v_color);\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}\n",h$Y="attribute vec3 position;\nattribute vec3 normal;\nattribute float batchId;\nattribute vec4 color;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\n\nvoid main()\n{\n vec4 p = vec4(position, 1.0);\n\n v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_color = color;\n\n gl_Position = czm_modelViewProjection * p;\n}\n",F$10="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec4 color;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_color = color;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",d$1c="varying vec4 v_color;\n\nvoid main()\n{\n gl_FragColor = czm_gammaCorrect(v_color);\n}\n",i$V="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 color;\nattribute float batchId;\n\nvarying vec4 v_color;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_color = color;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";function a$S(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.material=e.material,this.translucent=u$Z(e.translucent,!0),this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=u$Z(e.closed,!1)}function t$Q(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.translucent,!0),i=u$Z(e.closed,!1),n=u$Z(e.flat,!1),r=u$Z(e.materialSupport,t$Q.MaterialSupport.BASIC),o=u$Z(r.name,"PerInstanceColorAppearance no name"),a=r.vertexShaderSource,s=r.fragmentShaderSource,l=r.vertexFormat;n&&(a=i$V,s=d$1c,l=t$Q.FLAT_VERTEX_FORMAT,o="PerInstanceFlatColorAppearance"),this.material=void 0,this.translucent=t,this._vertexShaderSource=u$Z(e.vertexShaderSource,a),this._fragmentShaderSource=u$Z(e.fragmentShaderSource,s),this._renderState=a$S.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._vertexFormat=l,this._flat=n,this._faceForward=u$Z(e.faceForward,!i),this.name=o}function u$O(e,t){if(!e$2e(e))throw new t$15("array is required.");if(!e$2e(t)||t<1)throw new t$15("numberOfArrays must be greater than 0.");for(var i=[],n=e.length,r=0;r<n;){var o=Math.ceil((n-r)/t--);i.push(e.slice(r,r+o)),r+=o}return i}function e$1M(e,t){this.positions=e$2e(e)?e:[],this.holes=e$2e(t)?t:[]}function e$1L(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new o$1h,this.setValue(e)}function u$N(e,t,i,n,r){return{configurable:n,get:function(){return this[t]},set:function(n){var o=this[t],a=this[i];e$2e(a)&&(a(),this[i]=void 0),void 0!==n&&(!e$2e(n)||!e$2e(n.getValue))&&e$2e(r)&&(n=r(n)),o!==n&&(this[t]=n,this._definitionChanged.raiseEvent(this,e,n,o)),e$2e(n)&&e$2e(n.definitionChanged)&&(this[i]=n.definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this,e,n,n)}),this))}}}function p$Z(e){return new e$1L(e)}function C$10(e,t,i){return u$N(e,"_"+e.toString(),"_"+e.toString()+"Subscription",u$Z(t,!1),u$Z(i,p$Z))}function r$_(){t$15.throwInstantiationError()}function t$P(e){this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(a$S.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}}}),a$S.prototype.getFragmentShaderSource=function(){var e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),e$2e(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join("\n")},a$S.prototype.isTranslucent=function(){return e$2e(this.material)&&this.material.isTranslucent()||!e$2e(this.material)&&this.translucent},a$S.prototype.getRenderState=function(){var e=this.isTranslucent(),t=l$1f(this.renderState,!1);return e?(t.depthMask=!1,t.blending=Ee$r.ALPHA_BLEND):t.depthMask=!0,t},a$S.getDefaultRenderState=function(e,t,i){var n={depthTest:{enabled:!0}};return e&&(n.depthMask=!1,n.blending=Ee$r.ALPHA_BLEND),t&&(n.cull={enabled:!0,face:G$1a.BACK}),e$2e(i)&&(n=p$19(i,n,!0)),n},Object.defineProperties(t$Q.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),t$Q.VERTEX_FORMAT=n$13.POSITION_AND_NORMAL,t$Q.FLAT_VERTEX_FORMAT=n$13.POSITION_ONLY,t$Q.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,t$Q.prototype.isTranslucent=a$S.prototype.isTranslucent,t$Q.prototype.getRenderState=a$S.prototype.getRenderState,t$Q.MaterialSupport={BASIC:Object.freeze({vertexFormat:n$13.POSITION_AND_NORMAL,vertexShaderSource:F$10,fragmentShaderSource:d$1d,name:"PerInstanceColorAppearance"}),FLAT:Object.freeze({vertexFormat:n$13.POSITION_ONLY,vertexShaderSource:i$V,fragmentShaderSource:d$1c,name:"PerInstanceFlatColorAppearance"}),FLOAT_POSITION:Object.freeze({vertexFormat:n$13.POSITION_AND_NORMAL,vertexShaderSource:h$Y,fragmentShaderSource:d$1d,name:"PerInstanceColorAppearance"})},Object.defineProperties(e$1L.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}}),e$1L.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value},e$1L.prototype.setValue=function(e){var t=this._value;if(t!==e){var i=e$2e(e),n=i&&"function"==typeof e.clone,r=i&&"function"==typeof e.equals;(!r||!e.equals(t))&&(this._hasClone=n,this._hasEquals=r,this._value=n?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}},e$1L.prototype.equals=function(e){return this===e||e instanceof e$1L&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))},e$1L.prototype.valueOf=function(){return this._value},e$1L.prototype.toString=function(){return String(this._value)},Object.defineProperties(r$_.prototype,{isConstant:{get:t$15.throwInstantiationError},definitionChanged:{get:t$15.throwInstantiationError}}),r$_.prototype.getValue=t$15.throwInstantiationError,r$_.prototype.equals=t$15.throwInstantiationError,r$_.equals=function(e,t){return e===t||e$2e(e)&&e.equals(t)},r$_.arrayEquals=function(e,t){if(e===t)return!0;if(!e$2e(e)||!e$2e(t)||e.length!==t.length)return!1;for(var i=e.length,n=0;n<i;n++)if(!r$_.equals(e[n],t[n]))return!1;return!0},r$_.isConstant=function(e){return!e$2e(e)||e.isConstant},r$_.getValueOrUndefined=function(e,t,i){return e$2e(e)?e.getValue(t,i):void 0},r$_.getValueOrDefault=function(e,t,i,n){return e$2e(e)?u$Z(e.getValue(t,n),i):i},r$_.getValueOrClonedDefault=function(e,t,i,n){var r;return e$2e(e)&&(r=e.getValue(t,n)),e$2e(r)||(r=i.clone(r)),r},Object.defineProperties(t$P.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color")}),t$P.prototype.getType=function(e){return"Color"},t$P.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,e$1X.WHITE,t.color),t},t$P.prototype.equals=function(e){return this===e||e instanceof t$P&&r$_.equals(this._color,e._color)};var f$W=new o$1o(1,1),d$1b=!1,l$_=e$1X.WHITE;function a$R(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this._unique=!1,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent,this._unique=e.unique}function a$Q(e){if(e instanceof e$1X)return new t$P(e);if("string"==typeof e||e instanceof t$10||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof t$U){var t=new a$R;return t.image=e,t}throw new t$15("Unable to infer material type: "+e)}function c$$(e,t){return C$10(e,t,a$Q)}function r$Z(e,t){e=u$Z(e,0),this._near=e,t=u$Z(t,Number.MAX_VALUE),this._far=t}Object.defineProperties(a$R.prototype,{isConstant:{get:function(){return r$_.isConstant(this._image)&&r$_.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:C$10("image"),repeat:C$10("repeat"),color:C$10("color"),transparent:C$10("transparent")}),a$R.prototype.getType=function(e){return"Image"},a$R.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.image=r$_.getValueOrUndefined(this._image,e),t.repeat=r$_.getValueOrClonedDefault(this._repeat,e,f$W,t.repeat),t.color=r$_.getValueOrClonedDefault(this._color,e,l$_,t.color),r$_.getValueOrDefault(this._transparent,e,d$1b)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t},a$R.prototype.equals=function(e){return this===e||e instanceof a$R&&r$_.equals(this._image,e._image)&&r$_.equals(this._repeat,e._repeat)&&r$_.equals(this._color,e._color)&&r$_.equals(this._transparent,e._transparent)&&!this._unique&&!e._unique},Object.defineProperties(r$Z.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}}),r$Z.packedLength=2,r$Z.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),t[i++]=e.near,t[i]=e.far,t},r$Z.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");return t=u$Z(t,0),e$2e(i)||(i=new r$Z),i.near=e[t++],i.far=e[t],i},r$Z.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.near===t.near&&e.far===t.far},r$Z.clone=function(e,t){if(e$2e(e))return e$2e(t)||(t=new r$Z),t.near=e.near,t.far=e.far,t},r$Z.prototype.clone=function(e){return r$Z.clone(this,e)},r$Z.prototype.equals=function(e){return r$Z.equals(this,e)};var Z$_="void clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane,\n out vec4 clippedPositionEC)\n{\n culledByNearPlane = false;\n clipped = false;\n\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n\n // Distance that p0 is behind the near plane. Negative means p0 is\n // in front of the near plane.\n float endPoint0Distance = czm_currentFrustum.x + p0.z;\n\n // Camera looks down -Z.\n // When moving a point along +Z: LESS VISIBLE\n // * Points in front of the camera move closer to the camera.\n // * Points behind the camrea move farther away from the camera.\n // When moving a point along -Z: MORE VISIBLE\n // * Points in front of the camera move farther away from the camera.\n // * Points behind the camera move closer to the camera.\n\n // Positive denominator: -Z, becoming more visible\n // Negative denominator: +Z, becoming less visible\n // Nearly zero: parallel to near plane\n float denominator = -direction.z;\n\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n // p0 is behind the near plane and the line to p1 is nearly parallel to\n // the near plane, so cull the segment completely.\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n // p0 is behind the near plane, and the line to p1 is moving distinctly\n // toward or away from it.\n\n // t = (-plane distance - dot(plane normal, ray origin)) / dot(plane normal, ray direction)\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n // Near plane intersection is not between the two points.\n // We already confirmed p0 is behind the naer plane, so now\n // we know the entire segment is behind it.\n culledByNearPlane = true;\n }\n else\n {\n // Segment crosses the near plane, update p0 to lie exactly on it.\n p0 = p0 + t * direction;\n\n // Numerical noise might put us a bit on the wrong side of the near plane.\n // Don't let that happen.\n p0.z = min(p0.z, -czm_currentFrustum.x);\n\n clipped = true;\n }\n }\n\n clippedPositionEC = vec4(p0, 1.0);\n positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n}\n\nvec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n{\n // expandDirection +1 is to the _left_ when looking from positionEC toward nextEC.\n\n#ifdef POLYLINE_DASH\n // Compute the window coordinates of the points.\n vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\n vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\n vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\n\n // Determine the relative screen space direction of the line.\n vec2 lineDir;\n if (usePrevious) {\n lineDir = normalize(positionWindow.xy - previousWindow.xy);\n }\n else {\n lineDir = normalize(nextWindow.xy - positionWindow.xy);\n }\n angle = atan(lineDir.x, lineDir.y) - 1.570796327; // precomputed atan(1,0)\n\n // Quantize the angle so it doesn't change rapidly between segments.\n angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n#endif\n\n vec4 clippedPrevWC, clippedPrevEC;\n bool prevSegmentClipped, prevSegmentCulled;\n clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\n\n vec4 clippedNextWC, clippedNextEC;\n bool nextSegmentClipped, nextSegmentCulled;\n clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\n\n bool segmentClipped, segmentCulled;\n vec4 clippedPositionWC, clippedPositionEC;\n clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\n\n if (segmentCulled)\n {\n return vec4(0.0, 0.0, 0.0, 1.0);\n }\n\n vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\n vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\n\n // If a segment was culled, we can't use the corresponding direction\n // computed above. We should never see both of these be true without\n // `segmentCulled` above also being true.\n if (prevSegmentCulled)\n {\n directionToPrevWC = -directionToNextWC;\n }\n else if (nextSegmentCulled)\n {\n directionToNextWC = -directionToPrevWC;\n }\n\n vec2 thisSegmentForwardWC, otherSegmentForwardWC;\n if (usePrevious)\n {\n thisSegmentForwardWC = -directionToPrevWC;\n otherSegmentForwardWC = directionToNextWC;\n }\n else\n {\n thisSegmentForwardWC = directionToNextWC;\n otherSegmentForwardWC = -directionToPrevWC;\n }\n\n vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\n\n vec2 leftWC = thisSegmentLeftWC;\n float expandWidth = width * 0.5;\n\n // When lines are split at the anti-meridian, the position may be at the\n // same location as the next or previous position, and we need to handle\n // that to avoid producing NaNs.\n if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n {\n vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\n\n vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\n float leftSumLength = length(leftSumWC);\n leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\n\n // The sine of the angle between the two vectors is given by the formula\n // |a x b| = |a||b|sin(theta)\n // which is\n // float sinAngle = length(cross(vec3(leftWC, 0.0), vec3(-thisSegmentForwardWC, 0.0)));\n // Because the z components of both vectors are zero, the x and y coordinate will be zero.\n // Therefore, the sine of the angle is just the z component of the cross product.\n vec2 u = -thisSegmentForwardWC;\n vec2 v = leftWC;\n float sinAngle = abs(u.x * v.y - u.y * v.x);\n expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n }\n\n vec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;\n return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;\n}\n\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\n vec4 positionEC = czm_modelViewRelativeToEye * position;\n vec4 prevEC = czm_modelViewRelativeToEye * previous;\n vec4 nextEC = czm_modelViewRelativeToEye * next;\n return getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);\n}\n",be$t="#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\n\nvarying vec2 v_st;\nvarying float v_alpha;\nvarying float v_clipW;\n\n#ifdef TRAIL\n#ifdef WEBGPU\nuniform float spotIntensity_4;\n#else\nuniform float spotIntensity;\n#endif\nvarying float v_Percent;\nvarying float v_SpotPercent;\n#endif\n\nvoid main()\n{\n czm_materialInput materialInput;\n\n vec2 st = v_st;\n st.t = czm_readNonPerspective(st.t, 1.0 / v_clipW);\n\n materialInput.s = st.s;\n materialInput.st = st;\n materialInput.str = vec3(st, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#ifdef VECTOR_TILE\n gl_FragColor *= u_highlightColor;\n#endif\n\n#ifdef ENABLE_DYNAMIC\n float alpha = v_alpha;\n if(bAsy_4 != 1.0){\n alpha = 0.0;\n }\n gl_FragColor.a = pow(max(0.0, sin(3.14159 * (alpha + (1.0 - 2.0*v_time_3)))), 3.5);\n#endif\n\n#ifdef TRAIL\n if(v_Percent > 1.0 || v_Percent < 0.0)\n {\n discard;\n }\n float fade = v_Percent;\n if(v_Percent > (1.0 - v_SpotPercent))\n {\n gl_FragColor.rgb *= spotIntensity_4;\n }\n gl_FragColor.a *= fade;\n#endif\n\n\n}\n",sr$7="attribute vec3 positionHigh;\nattribute vec3 positionLow;\nattribute vec3 prevPositionHigh;\nattribute vec3 prevPositionLow;\nattribute vec3 nextPositionHigh;\nattribute vec3 nextPositionLow;\nattribute vec4 texCoordExpandAndBatchIndex;\n\nvarying vec2 v_st;\nvarying float v_width;\nvarying vec4 v_pickColor;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying vec4 vColor;\nvarying float fSelected;\nvarying float v_clipW;\nvoid main()\n{\n float texCoord = texCoordExpandAndBatchIndex.x;\n float expandDir = texCoordExpandAndBatchIndex.y;\n bool usePrev = texCoordExpandAndBatchIndex.z < 0.0;\n float batchTableIndex = texCoordExpandAndBatchIndex.w;\n\n vec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);\n float width = widthAndShow.x + 0.5;\n float show = widthAndShow.y;\n\n if (width < 1.0)\n {\n show = 0.0;\n }\n\n vec4 pickColor = batchTable_getPickColor(batchTableIndex);\n\n vec4 p, prev, next;\n#ifdef SCENE_3D\n p = czm_translateRelativeToEye(positionHigh.xyz, positionLow.xyz);\n prev = czm_translateRelativeToEye(prevPositionHigh.xyz, prevPositionLow.xyz);\n next = czm_translateRelativeToEye(nextPositionHigh.xyz, nextPositionLow.xyz);\n#else\n p = czm_translateRelativeToEye(positionHigh.zxy, positionLow.zxy);\n prev = czm_translateRelativeToEye(prevPositionHigh.zxy, prevPositionLow.zxy);\n next = czm_translateRelativeToEye(nextPositionHigh.zxy, nextPositionLow.zxy);\n#endif\n\n #ifdef DISTANCE_DISPLAY_CONDITION\n vec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);\n vec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);\n vec3 centerLow = centerLowAndRadius.xyz;\n float radius = centerLowAndRadius.w;\n vec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);\n\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n vec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);\n lengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);\n }\n\n float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;\n float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;\n if (lengthSq < nearSq || lengthSq > farSq)\n {\n show = 0.0;\n }\n #endif\n\n float polylineAngle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\n gl_Position = czm_viewportOrthographic * positionWC * show;\n\n v_st.s = texCoord;\n v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);\n\n v_width = width;\n v_pickColor = pickColor;\n v_polylineAngle = polylineAngle;\n v_clipW = gl_Position.w;\n}\n";function h$X(e,t,i){if(!e$2e(e))throw new t$15("context is required");if(!e$2e(t))throw new t$15("attributes is required");if(!e$2e(i))throw new t$15("numberOfInstances is required");if(this._attributes=t,this._numberOfInstances=i,0!==t.length){var n=U$10(t),r=e.floatingPointTexture,o=n===_$_.FLOAT&&!r,a=G$18(t,o),s=X$W(a,t,o),l=Math.floor(e$1W.maximumTextureSize/s),u=Math.min(i,l),c=s*u,h=Math.ceil(i/u),d=1/c,f=.5*d,p=1/h,_=.5*p;this._textureDimensions=new o$1o(c,h),this._textureStep=new e$2c(d,f,p,_),this._pixelDatatype=o?_$_.UNSIGNED_BYTE:n,this._packFloats=o,this._offsets=a,this._stride=s,this._texture=void 0;var m=4*c*h;this._batchValues=n!==_$_.FLOAT||o?new Uint8Array(m):new Float32Array(m),this._batchValuesDirty=!1,this._suffix="",this.useForMaterial=!1}}function U$10(e){for(var t=!1,i=e.length,n=0;n<i;++n)if(e[n].componentDatatype!==S$14.UNSIGNED_BYTE){t=!0;break}return t?_$_.FLOAT:_$_.UNSIGNED_BYTE}function g$16(e,t){var i=e[t].componentsPerAttribute;return 2===i?o$1o:3===i?o$1p:4===i?e$2c:Number}function G$18(e,t){for(var i=new Array(e.length),n=0,r=e.length,o=0;o<r;++o){var a=e[o].componentDatatype;i[o]=n,a!==S$14.UNSIGNED_BYTE&&t?n+=4:++n}return i}function X$W(e,t,i){var n=e.length,r=e[n-1];return t[n-1].componentDatatype!==S$14.UNSIGNED_BYTE&&i?r+4:r+1}Object.defineProperties(h$X.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}},suffix:{get:function(){return this._suffix},set:function(e){this._suffix=e}}});var _$R=new e$2c;function P$X(e,t,i){var n=e$2c.unpack(e,t,_$R),r=e$2c.unpackFloat(n);n=e$2c.unpack(e,t+4,_$R);var o=e$2c.unpackFloat(n);n=e$2c.unpack(e,t+8,_$R);var a=e$2c.unpackFloat(n);n=e$2c.unpack(e,t+12,_$R);var s=e$2c.unpackFloat(n);return e$2c.fromElements(r,o,a,s,i)}function L$17(e,t,i){var n=e$2c.packFloat(e.x,_$R);e$2c.pack(n,t,i),n=e$2c.packFloat(e.y,n),e$2c.pack(n,t,i+4),n=e$2c.packFloat(e.z,n),e$2c.pack(n,t,i+8),n=e$2c.packFloat(e.w,n),e$2c.pack(n,t,i+12)}var w$T=new e$2c;h$X.prototype.getBatchedAttribute=function(e,t,i){if(e<0||e>=this._numberOfInstances)throw new t$15("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new t$15("attributeIndex is out of range");var n,r=this._attributes,o=this._offsets[t],a=4*this._stride*e+4*o;n=this._packFloats&&r[t].componentDatatype!==_$_.UNSIGNED_BYTE?P$X(this._batchValues,a,w$T):e$2c.unpack(this._batchValues,a,w$T);var s=g$16(r,t);return e$2e(s.fromCartesian4)?s.fromCartesian4(n,i):e$2e(s.clone)?s.clone(n,i):n.x};var R$X=[void 0,void 0,new o$1o,new o$1p,new e$2c],q$12=new e$2c;function W$_(e,t){var i=e._textureDimensions;e._texture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:e._pixelDatatype,width:i.x,height:i.y,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1})}function j$13(e){var t=e._textureDimensions;e._texture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function H$12(e){var t=e.useUBO,i=e._stride;return 1===e._textureDimensions.y?(t?"":"uniform vec4 batchTextureStep{suffix}; \n")+"vec2 computeSt{suffix}(float batchId) \n{ \n float stepX = batchTextureStep{suffix}.x; \n float centerX = batchTextureStep{suffix}.y; \n float numberOfAttributes = float("+i+"); \n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5); \n} \n":(t?"":"uniform vec4 batchTextureStep{suffix}; \nuniform vec2 batchTextureDimensions{suffix}; \n")+"vec2 computeSt{suffix}(float batchId) \n{ \n float stepX = batchTextureStep{suffix}.x; \n float centerX = batchTextureStep{suffix}.y; \n float stepY = batchTextureStep{suffix}.z; \n float centerY = batchTextureStep{suffix}.w; \n float numberOfAttributes = float("+i+"); \n float xId = mod(batchId * numberOfAttributes, batchTextureDimensions{suffix}.x); \n float yId = floor(batchId * numberOfAttributes / batchTextureDimensions{suffix}.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function J$X(e){var t=e._stride;return 1===e._textureDimensions.y?""+"fn computeSt{suffix}(batchId : f32) -> vec2<f32> \n{ \n var stepX = Mesh.batchTextureStep{suffix}.x; \n var centerX = Mesh.batchTextureStep{suffix}.y; \n var numberOfAttributes = f32("+t+"); \n return vec2<f32>(centerX + (batchId * numberOfAttributes * stepX), 0.5f); \n} \n":""+"fn computeSt{suffix}(batchId : f32) -> vec2<f32> \n{ \n var stepX = Mesh.batchTextureStep{suffix}.x; \n var centerX = Mesh.batchTextureStep{suffix}.y; \n var stepY = Mesh.batchTextureStep{suffix}.z; \n var centerY = Mesh.batchTextureStep{suffix}.w; \n var numberOfAttributes = f32("+t+"); \n var d = floor((batchId * numberOfAttributes) / Mesh.batchTextureDimensions{suffix}.x); \n var xId = batchId * numberOfAttributes - d * Mesh.batchTextureDimensions{suffix}.x; \n var yId = floor(batchId * numberOfAttributes / Mesh.batchTextureDimensions{suffix}.x); \n return vec2<f32>(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function K$S(e){return 1===e?"float":"vec"+e}function Q$_(e){return 1===e?"f32":"vec"+e+"<f32>"}function F$$(e){return 1===e?".x":2===e?".xy":3===e?".xyz":""}function Z$Z(e,t){var i=e._attributes[t],n=i.componentsPerAttribute,r=i.functionName,o=K$S(n),a=F$$(n),s=o+" "+r+"(float batchId) \n{ \n vec2 st = computeSt{suffix}(batchId); \n st.x += batchTextureStep{suffix}.x * float("+e._offsets[t]+"); \n";return e._packFloats&&i.componentDatatype!==_$_.UNSIGNED_BYTE?s+="vec4 textureValue; \ntextureValue.x = czm_unpackFloat(texture2D(batchTexture{suffix}, st)); \ntextureValue.y = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x, 0.0))); \ntextureValue.z = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x * 2.0, 0.0))); \ntextureValue.w = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x * 3.0, 0.0))); \n":s+=" vec4 textureValue = texture2D(batchTexture{suffix}, st); \n",s+=" "+o+" value = textureValue"+a+"; \n",e._pixelDatatype!==_$_.UNSIGNED_BYTE||i.componentDatatype!==S$14.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===_$_.FLOAT&&i.componentDatatype===S$14.UNSIGNED_BYTE&&i.normalize&&(s+="value /= 255.0; \n"):s+="value *= 255.0; \n",s+=" return value; \n} \n"}function $$X(e,t){var i=e._attributes[t],n=i.componentsPerAttribute,r=i.functionName,o=Q$_(n),a=F$$(n),s="fn "+r+"(batchId : f32) ->"+o+"{ \n var st = computeSt{suffix}(batchId); \n st.x += Mesh.batchTextureStep{suffix}.x * f32("+e._offsets[t]+"); \n";return e._packFloats&&i.componentDatatype!==_$_.UNSIGNED_BYTE?s+="var textureValue : vec4<f32>; \ntextureValue.x = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st, 0.0f)); \ntextureValue.y = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st + vec2<f32>(Material.batchTextureStep{suffix}.x, 0.0f), 0.0f)); \ntextureValue.z = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st + vec2<f32>(Material.batchTextureStep{suffix}.x * 2.0f, 0.0f), 0.0f)); \ntextureValue.w = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st + vec2<f32>(Material.batchTextureStep{suffix}.x * 3.0f, 0.0f), 0.0f)); \n":s+=" var textureValue = textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st, 0.0f); \n",s+=" var value = textureValue"+a+"; \n",e._pixelDatatype!==_$_.UNSIGNED_BYTE||i.componentDatatype!==S$14.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===_$_.FLOAT&&i.componentDatatype===S$14.UNSIGNED_BYTE&&i.normalize&&(s+=" value /= 255.0f; \n"):s+=" value *= 255.0f; \n",s+=" return value; \n} \n"}function e$1K(e,t,i,n,r){this._format=e,this._width=t,this._height=i,this._buffer=n,this._datatype=r}h$X.prototype.setBatchedAttribute=function(e,t,i){if(e<0||e>=this._numberOfInstances)throw new t$15("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new t$15("attributeIndex is out of range");if(!e$2e(i))throw new t$15("value is required.");var n=this._attributes,r=R$X[n[t].componentsPerAttribute],o=this.getBatchedAttribute(e,t,r),a=g$16(this._attributes,t);if(!(e$2e(a.equals)?a.equals(o,i):o===i)){var s=q$12;s.x=e$2e(i.x)?i.x:i,s.y=e$2e(i.y)?i.y:0,s.z=e$2e(i.z)?i.z:0,s.w=e$2e(i.w)?i.w:0;var l=this._offsets[t],u=4*this._stride*e+4*l;this._packFloats&&n[t].componentDatatype!==_$_.UNSIGNED_BYTE?L$17(s,this._batchValues,u):e$2c.pack(s,this._batchValues,u),this._batchValuesDirty=!0}},h$X.prototype.update=function(e){e$2e(this._texture)&&!this._batchValuesDirty||0===this._attributes.length||(this._batchValuesDirty=!1,e$2e(this._texture)||W$_(this,e.context),j$13(this))},h$X.prototype.getUniformMapCallback=function(){var e=this;return function(t){if(0===e._attributes.length)return t;var i={};return i["batchTexture"+e._suffix]=function(){return e._texture},e.useUBO||(i["batchTextureDimensions"+e._suffix]=function(){return e._textureDimensions},i["batchTextureStep"+e._suffix]=function(){return e._textureStep}),p$19(t,i)}},h$X.prototype.getVertexShaderCallback=function(e){return(e=u$Z(e,!1))?this._getWgslVertexShaderCallback():this._getGlslVertexShaderCallback()},h$X.prototype._getGlslVertexShaderCallback=function(){var e=this._attributes;if(0===e.length)return function(e){return e};var t="uniform highp sampler2D batchTexture{suffix}; \n";s$Z.isPCBroswer()&&(t="uniform sampler2D batchTexture{suffix}; \n"),t+=H$12(this)+"\n";for(var i=e.length,n=0;n<i;++n)t+=Z$Z(this,n);return t=t.replace(/\{suffix\}/g,this._suffix),function(e){var i=e.indexOf("void main"),n=e.substring(0,i),r=e.substring(i);return n+"\n"+t+"\n"+r}},h$X.prototype._getWgslVertexShaderCallback=function(){var e=this._attributes;if(0===e.length)return function(e){return e};var t="var batchTexture{suffix} : texture_2d<f32>; \nvar batchTexture{suffix}Sampler : sampler; \n";t+=J$X(this)+"\n";for(var i=e.length,n=0;n<i;++n)t+=$$X(this,n);return t=t.replace(/\{suffix\}/g,this._suffix),this.useForMaterial&&(t=t.replace(/\Mesh./g,"Material.")),function(e){var i=e.indexOf("@vertex"),n=e.substring(0,i),r=e.substring(i);return n+"\n"+t+"\n"+r}},h$X.prototype.hasMultiRow=function(){return this._textureDimensions.y>1},h$X.prototype.isDestroyed=function(){return!1},h$X.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),i$11(this)},Object.defineProperties(e$1K.prototype,{internalFormat:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},pixelDatatype:{get:function(){return this._datatype}}}),e$1K.clone=function(e){if(e$2e(e))return new e$1K(e._format,e._width,e._height,e._buffer,e._datatype)},e$1K.prototype.clone=function(){return e$1K.clone(this)};var t$O,p$Y=!1,I$1a=new i$W("transcodeCRNToDXTprevious",Number.POSITIVE_INFINITY);function a$P(e,t,i){if(i){if(!e$2e(e))throw new t$15("resourceOrUrlOrBuffer is required.");if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))n=o$1l.resolve(e);else n=t$10.createIfNeeded(e).fetchArrayBuffer();return e$2e(n)?n.then((function(e){if(e$2e(e)){var t=[];return e instanceof ArrayBuffer?t.push(e):(0===e.byteOffset&&e.byteLength===e.buffer.byteLength||(e=e.slice(0,e.length)),t.push(e.buffer)),I$1a.scheduleTask(e,t)}})).then((function(e){return e$1K.clone(e)})):void 0}if(e$2e(t$O)||(t$O=new i$W("transcodeCRNToDXT",Number.POSITIVE_INFINITY)).initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){p$Y=!0})),p$Y){if(!e$2e(e))throw new t$15("resourceOrUrlOrBuffer is required.");var n;return e$2e(n=e instanceof ArrayBuffer||ArrayBuffer.isView(e)?o$1l.resolve(e):t$10.createIfNeeded(e).fetchArrayBuffer())?n.then((function(e){if(e$2e(e)){var i=[];e instanceof ArrayBuffer?i.push(e):(0===e.byteOffset&&e.byteLength===e.buffer.byteLength||(e=e.slice(0,e.length)),i.push(e.buffer));var n=u$Z(t,!1);return t$O.scheduleTask({data:e,bMipMap:n},i)}})).then((function(e){return e$1K.clone(e)})):void 0}}function k$W(e){var t;(o$1q.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?t=o$1l.resolve(e):t=t$10.createIfNeeded(e).fetchArrayBuffer();if(e$2e(t))return t.then((function(e){if(e$2e(e))return P$W(e)}))}var c$_=[171,75,84,88,32,49,49,187,13,10,26,10],L$16=67305985,F$_=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"],n$Z=4;function P$W(e){var t,i,n,r=new Uint8Array(e),o=!0;for(t=0;t<c$_.length;++t)if(c$_[t]!==r[t]){o=!1;break}if(!o)throw new t$13("Invalid KTX file.");e$2e(e.buffer)?(i=new DataView(e.buffer),n=e.byteOffset):(i=new DataView(e),n=0),n+=12;var a=i.getUint32(n,!0);if(n+=n$Z,a!==L$16)throw new t$13("File is the wrong endianness.");var s=i.getUint32(n,!0);n+=n$Z;var l=i.getUint32(n,!0);n+=n$Z;var u=i.getUint32(n,!0);n+=n$Z;var c=i.getUint32(n,!0);n+=n$Z;var h=i.getUint32(n,!0);n+=n$Z;var d=i.getUint32(n,!0);n+=n$Z;var f=i.getUint32(n,!0);n+=n$Z;var p=i.getUint32(n,!0);n+=n$Z;var _=i.getUint32(n,!0);n+=n$Z;var m=i.getUint32(n,!0);n+=n$Z;var g=i.getUint32(n,!0);n+=n$Z;var x=i.getUint32(n,!0);n+=n$Z,n+=x;var y,v=i.getUint32(n,!0);if(n+=n$Z,y=e$2e(e.buffer)?new Uint8Array(e.buffer,n,v):new Uint8Array(e,n,v),c===de$y.RGB8?c=V$12.RGB:c===de$y.RGBA8&&(c=V$12.RGBA),!V$12.validate(c))throw new t$13("glInternalFormat is not a valid format.");if(V$12.isCompressedFormat(c)){if(0!==s)throw new t$13("glType must be zero when the texture is compressed.");if(1!==l)throw new t$13("The type size for compressed textures must be 1.");if(0!==u)throw new t$13("glFormat must be zero when the texture is compressed.")}else{if(s!==de$y.UNSIGNED_BYTE)throw new t$13("Only unsigned byte buffers are supported.");if(h!==u)throw new t$13("The base internal format must be the same as the format for uncompressed textures.")}if(0!==p)throw new t$13("3D textures are unsupported.");if(0!==_)throw new t$13("Texture arrays are unsupported.");var $=y.byteOffset,b=new Array(g);for(t=0;t<g;++t){for(var T=b[t]={},C=0;C<m;++C){var S=d>>t,w=f>>t,E=V$12.isCompressedFormat(c)?V$12.compressedTextureSizeInBytes(c,S,w):V$12.textureSizeInBytes(c,s,S,w),P=new Uint8Array(y.buffer,$,E);T[F$_[C]]=new e$1K(c,S,w,P),$+=E}$+=3-($+3)%4+4}var A=b;if(1===m)for(t=0;t<g;++t)A[t]=A[t][F$_[0]];return 1===g&&(A=A[0]),A}var Z$Y="uniform sampler2D image;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec4 rampColor = texture2D(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));\n rampColor = czm_gammaCorrect(rampColor);\n material.diffuse = rampColor.rgb;\n material.alpha = rampColor.a;\n return material;\n}\n",j$12="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n vec2 centerPixel = fract(repeat * st);\n float centerBump = texture2D(image, centerPixel).channel;\n\n float imageWidth = float(imageDimensions.x);\n vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));\n float rightBump = texture2D(image, rightPixel).channel;\n\n float imageHeight = float(imageDimensions.y);\n vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));\n float topBump = texture2D(image, leftPixel).channel;\n\n vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));\n vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\n\n material.normal = normalEC;\n material.diffuse = vec3(0.01);\n\n return material;\n}\n",J$W="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\n float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0); // 0.0 or 1.0\n\n // Find the distance from the closest separator (region between two colors)\n float scaledWidth = fract(repeat.s * st.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n float scaledHeight = fract(repeat.t * st.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n float value = min(scaledWidth, scaledHeight);\n\n vec4 currentColor = mix(lightColor, darkColor, b);\n vec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);\n\n color = czm_gammaCorrect(color);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n",$$W="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\n float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5)); // 0.0 or 1.0\n\n vec4 color = mix(lightColor, darkColor, b);\n color = czm_gammaCorrect(color);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n",q$11="#ifdef GL_OES_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 color;\nuniform float spacing;\nuniform float width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n float distanceToContour = mod(materialInput.height, spacing);\n\n#ifdef GL_OES_standard_derivatives\n float dxc = abs(dFdx(materialInput.height));\n float dyc = abs(dFdy(materialInput.height));\n float dF = max(dxc, dyc) * czm_pixelRatio * width;\n float alpha = (distanceToContour < dF) ? 1.0 : 0.0;\n#else\n float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;\n#endif\n\n vec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha));\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n\n return material;\n}\n",U$$="uniform sampler2D image;\nuniform float minimumHeight;\nuniform float maximumHeight;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);\n vec4 rampColor = texture2D(image, vec2(scaledHeight, 0.5));\n rampColor = czm_gammaCorrect(rampColor);\n material.diffuse = rampColor.rgb;\n material.alpha = rampColor.a;\n return material;\n}\n",K$R="uniform vec4 fadeInColor;\nuniform vec4 fadeOutColor;\nuniform float maximumDistance;\nuniform bool repeat;\nuniform vec2 fadeDirection;\nuniform vec2 time;\n\nfloat getTime(float t, float coord)\n{\n float scalar = 1.0 / maximumDistance;\n float q = distance(t, coord) * scalar;\n if (repeat)\n {\n float r = distance(t, coord + 1.0) * scalar;\n float s = distance(t, coord - 1.0) * scalar;\n q = min(min(r, s), q);\n }\n return clamp(q, 0.0, 1.0);\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float s = getTime(time.x, st.s) * fadeDirection.s;\n float t = getTime(time.y, st.t) * fadeDirection.t;\n\n float u = length(vec2(s, t));\n vec4 color = mix(fadeInColor, fadeOutColor, u);\n\n color = czm_gammaCorrect(color);\n material.emission = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n",Q$Z='#ifdef GL_OES_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 color;\nuniform float cellAlpha;\nuniform vec2 lineCount;\nuniform vec2 lineThickness;\nuniform vec2 lineOffset;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n float scaledWidth = fract(lineCount.s * st.s - lineOffset.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n float scaledHeight = fract(lineCount.t * st.t - lineOffset.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n\n float value;\n#ifdef GL_OES_standard_derivatives\n // Fuzz Factor - Controls blurriness of lines\n const float fuzz = 1.2;\n vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;\n\n // From "3D Engine Design for Virtual Globes" by Cozzi and Ring, Listing 4.13.\n vec2 dx = abs(dFdx(st));\n vec2 dy = abs(dFdy(st));\n vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\n value = min(\n smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\n smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n#else\n // Fuzz Factor - Controls blurriness of lines\n const float fuzz = 0.05;\n\n vec2 range = 0.5 - (lineThickness * 0.05);\n value = min(\n 1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),\n 1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));\n#endif\n\n // Edges taken from RimLightingMaterial.glsl\n // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html\n float dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));\n float sRim = smoothstep(0.8, 1.0, dRim);\n value *= (1.0 - sRim);\n\n vec4 halfColor;\n halfColor.rgb = color.rgb * 0.5;\n halfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));\n halfColor = czm_gammaCorrect(halfColor);\n material.diffuse = halfColor.rgb;\n material.emission = halfColor.rgb;\n material.alpha = halfColor.a;\n\n return material;\n}\n',V$U="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec4 textureValue = texture2D(image, fract(repeat * materialInput.st));\n vec3 normalTangentSpace = textureValue.channels;\n normalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;\n normalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);\n normalTangentSpace = normalize(normalTangentSpace);\n vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\n \n material.normal = normalEC;\n \n return material;\n}\n",ee$x="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 color;\n\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\n float slope = (p0.y - p1.y) / (p0.x - p1.x);\n return slope * (x - p0.x) + p0.y;\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;\n#else\n float base = 0.975; // 2.5% of the line will be the arrow head\n#endif\n\n vec2 center = vec2(1.0, 0.5);\n float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\n float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\n\n float halfWidth = 0.15;\n float s = step(0.5 - halfWidth, st.t);\n s *= 1.0 - step(0.5 + halfWidth, st.t);\n s *= 1.0 - step(base, st.s);\n\n float t = step(base, materialInput.st.s);\n t *= 1.0 - step(ptOnUpperLine, st.t);\n t *= step(ptOnLowerLine, st.t);\n\n // Find the distance from the closest separator (region between two colors)\n float dist;\n if (st.s < base)\n {\n float d1 = abs(st.t - (0.5 - halfWidth));\n float d2 = abs(st.t - (0.5 + halfWidth));\n dist = min(d1, d2);\n }\n else\n {\n float d1 = czm_infinity;\n if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n {\n d1 = abs(st.s - base);\n }\n float d2 = abs(st.t - ptOnUpperLine);\n float d3 = abs(st.t - ptOnLowerLine);\n dist = min(min(d1, d2), d3);\n }\n\n vec4 outsideColor = vec4(0.0);\n vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));\n vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);\n\n outColor = czm_gammaCorrect(outColor);\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n return material;\n}\n",te$C="uniform vec4 color;\nuniform vec4 gapColor;\nuniform float dashLength;\nuniform float dashPattern;\nvarying float v_polylineAngle;\n\nconst float maskLength = 16.0;\n\nmat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(\n c, s,\n -s, c\n );\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n\n // Get the relative position within the dash from 0 to 1\n float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));\n // Figure out the mask index.\n float maskIndex = floor(dashPosition * maskLength);\n // Test the bit mask.\n float maskTest = floor(dashPattern / pow(2.0, maskIndex));\n vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\n if (fragColor.a < 0.005) { // matches 0/255 and 1/255\n discard;\n }\n\n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n}\n",re$H="uniform vec4 color;\nuniform float glowPower;\nuniform float taperPower;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\n\n if (taperPower <= 0.99999) {\n glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));\n }\n\n glow = clamp(0.0, 2.0, glow);\n\n vec4 fragColor;\n fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);\n fragColor.a = clamp(0.0, 1.0, glow) * color.a;\n fragColor = czm_gammaCorrect(fragColor);\n\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n\n return material;\n}\n",R$W="uniform vec4 color;\nuniform vec4 outlineColor;\nuniform float outlineWidth;\n\nvarying float v_width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;\n float b = step(0.5 - halfInteriorWidth, st.t);\n b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\n\n // Find the distance from the closest separator (region between two colors)\n float d1 = abs(st.t - (0.5 - halfInteriorWidth));\n float d2 = abs(st.t - (0.5 + halfInteriorWidth));\n float dist = min(d1, d2);\n\n vec4 currentColor = mix(outlineColor, color, b);\n vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);\n outColor = czm_gammaCorrect(outColor);\n\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n\n return material;\n}\n",ae$x="uniform vec4 color;\nuniform vec4 rimColor;\nuniform float width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html\n float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));\n float s = smoothstep(1.0 - width, 1.0, d);\n\n vec4 outColor = czm_gammaCorrect(color);\n vec4 outRimColor = czm_gammaCorrect(rimColor);\n\n material.diffuse = outColor.rgb;\n material.emission = outRimColor.rgb * s;\n material.alpha = mix(outColor.a, outRimColor.a, s);\n\n return material;\n}\n",ie$D="uniform sampler2D image;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec4 rampColor = texture2D(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));\n rampColor = czm_gammaCorrect(rampColor);\n material.diffuse = rampColor.rgb;\n material.alpha = rampColor.a;\n return material;\n}\n",ne$G="uniform vec4 evenColor;\nuniform vec4 oddColor;\nuniform float offset;\nuniform float repeat;\nuniform bool horizontal;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // Based on the Stripes Fragment Shader in the Orange Book (11.1.2)\n float coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));\n float value = fract((coord - offset) * (repeat * 0.5));\n float dist = min(value, min(abs(value - 0.5), 1.0 - value));\n\n vec4 currentColor = mix(evenColor, oddColor, step(0.5, value));\n vec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);\n color = czm_gammaCorrect(color);\n\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n",le$w="// Thanks for the contribution Jonas\n\nuniform sampler2D specularMap;\nuniform sampler2D normalMap;\nuniform vec4 baseWaterColor;\nuniform vec4 blendColor;\nuniform float frequency;\nuniform float animationSpeed;\nuniform float amplitude;\nuniform float specularIntensity;\nuniform float fadeFactor;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n float time = czm_frameNumber * animationSpeed;\n\n // fade is a function of the distance from the fragment and the frequency of the waves\n float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);\n\n float specularMapValue = texture2D(specularMap, materialInput.st).r;\n\n // note: not using directional motion at this time, just set the angle to 0.0;\n vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);\n vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));\n\n // fade out the normal perturbation as we move further from the water surface\n normalTangentSpace.xy /= fade;\n\n // attempt to fade out the normal perturbation as we approach non water areas (low specular map value)\n normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);\n\n normalTangentSpace = normalize(normalTangentSpace);\n\n // get ratios for alignment of the new normal vector with a vector perpendicular to the tangent plane\n float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);\n\n // fade out water effect as specular map value decreases\n material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;\n\n // base color is a blend of the water and non-water color based on the value from the specular map\n // may need a uniform blend factor to better control this\n material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);\n\n // diffuse highlights are based on how perturbed the normal is\n material.diffuse += (0.1 * tsPerturbationRatio);\n\n material.diffuse = material.diffuse;\n\n material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);\n\n material.specular = specularIntensity;\n material.shininess = 10.0;\n\n return material;\n}\n",fe$w="uniform vec4 color;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = color.rgb;\n material.alpha = 1.0;\n return material;\n}",ue$C=0;function r$Y(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._minificationFilter=u$Z(e.minificationFilter,tt$i.LINEAR),this._magnificationFilter=u$Z(e.magnificationFilter,rt$k.LINEAR),this._strict=void 0,this._template=void 0,this._count=void 0,this._texturePaths={},this._loadedImages=[],this._loadedCubeMaps=[],this._textures={},this._updateFunctions=[],this._defaultTexture=void 0,this._wrapS=q$1a.CLAMP_TO_EDGE,this._wrapT=q$1a.CLAMP_TO_EDGE,pe$A(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1}}),e$2e(r$Y._uniformList[this.type])||(r$Y._uniformList[this.type]=Object.keys(this._uniforms)),this._id=ue$C++}function pe$A(e,t){e=u$Z(e,u$Z.EMPTY_OBJECT),t._strict=u$Z(e.strict,!1),t._count=u$Z(e.count,0),t._template=l$1f(u$Z(e.fabric,u$Z.EMPTY_OBJECT)),t._template.uniforms=l$1f(u$Z(t._template.uniforms,u$Z.EMPTY_OBJECT)),t._template.materials=l$1f(u$Z(t._template.materials,u$Z.EMPTY_OBJECT)),t.type=e$2e(t._template.type)?t._template.type:e$1T(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[];var i,n=r$Y._materialCache.getMaterial(t.type);if(e$2e(n)){var r=l$1f(n.fabric,!0);t._template=p$19(t._template,r,!0),i=n.translucent}de$w(t),e$2e(n)||r$Y._materialCache.addMaterial(t.type,t),_e$u(t),we$m(t),xe$p(t);var o=0===t._translucentFunctions.length||void 0;if(i=u$Z(i,o),e$2e(i=u$Z(e.translucent,i)))if("function"==typeof i){t._translucentFunctions.push((function(){return i(t)}))}else t._translucentFunctions.push(i)}function E$13(e,t,i,n){if(e$2e(e))for(var r in e)if(e.hasOwnProperty(r)){var o=-1!==t.indexOf(r);(n&&!o||!n&&o)&&i(r,t)}}function L$15(e,t){for(var i="fabric: property name '"+e+"' is not valid. It should be ",n=0;n<t.length;n++){var r="'"+t[n]+"'";i+=n===t.length-1?"or "+r+".":r+", "}throw new t$15(i)}function ce$w(e,t){throw new t$15("fabric: uniforms and materials cannot share the same property '"+e+"'")}r$Y._uniformList={},r$Y.fromType=function(e,t){if(!e$2e(r$Y._materialCache.getMaterial(e)))throw new t$15("material with type '"+e+"' does not exist.");var i=new r$Y({fabric:{type:e}});if(e$2e(t))for(var n in t)t.hasOwnProperty(n)&&(i.uniforms[n]=t[n]);return i},r$Y.prototype.isTranslucent=function(){if(e$2e(this.translucent))return"function"==typeof this.translucent?this.translucent():this.translucent;for(var e=!0,t=this._translucentFunctions,i=t.length,n=0;n<i;++n){var r=t[n];if(!(e="function"==typeof r?e&&r():e&&r))break}return e},r$Y.prototype.update=function(e){var t,i,n=this._loadedImages,r=n.length;for(t=0;t<r;++t){var o=n[t];i=o.id;var a,s=o.image,l=new e$1S({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter,wrapS:this._wrapS,wrapT:this._wrapT});a=e$2e(s.internalFormat)?new t$U({context:e,pixelFormat:s.internalFormat,width:s.width,height:s.height,source:{arrayBufferView:s.bufferView},sampler:l}):new t$U({context:e,source:s,sampler:l}),this._textures[i]=a;var u=i+"Dimensions";if(this.uniforms.hasOwnProperty(u)){var c=this.uniforms[u];c.x=a._width,c.y=a._height}}n.length=0;var h=this._loadedCubeMaps;for(r=h.length,t=0;t<r;++t){var d=h[t];i=d.id;var f=d.images,p=new e$1P({context:e,source:{positiveX:f[0],negativeX:f[1],positiveY:f[2],negativeY:f[3],positiveZ:f[4],negativeZ:f[5]},sampler:new e$1S({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter})});this._textures[i]=p}h.length=0;var _=this._updateFunctions;for(r=_.length,t=0;t<r;++t)_[t](this,e);var m=this.materials;for(var g in m)m.hasOwnProperty(g)&&m[g].update(e)},r$Y.prototype.isDestroyed=function(){return!1},r$Y.prototype.destroy=function(){var e=this._textures;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];i!==this._defaultTexture&&i.destroy()}var n=this.materials;for(var r in n)n.hasOwnProperty(r)&&n[r].destroy();return i$11(this)};var me$w=["type","materials","uniforms","components","source"],he$u=["diffuse","specular","shininess","normal","emission","alpha"];function de$w(e){var t=e._template,i=t.uniforms,n=t.materials,r=t.components;if(e$2e(r)&&e$2e(t.source))throw new t$15("fabric: cannot have source and components in the same template.");E$13(t,me$w,L$15,!0),E$13(r,he$u,L$15,!0);var o=[];for(var a in n)n.hasOwnProperty(a)&&o.push(a);E$13(i,o,ce$w,!1)}function ye$p(e,t){var i=t._template.materials;for(var n in i)if(i.hasOwnProperty(n)&&e.indexOf(n)>-1)return!0;return!1}function _e$u(e){var t=e._template.components,i=e._template.source;if(e$2e(i))e.shaderSource+=i+"\n";else{if(e.shaderSource+="czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n",e.shaderSource+="czm_material material = czm_getDefaultMaterial(materialInput);\n",e$2e(t)){var n=Object.keys(e._template.materials).length>0;for(var r in t)if(t.hasOwnProperty(r))if("diffuse"===r||"emission"===r){var o=n&&ye$p(t[r],e)?t[r]:"czm_gammaCorrect("+t[r]+")";e.shaderSource+="material."+r+" = "+o+"; \n"}else e.shaderSource+="alpha"===r?"material.alpha = "+t.alpha+"; \n":"material."+r+" = "+t[r]+";\n"}e.shaderSource+="return material;\n}\n"}}var k$V={mat2:f$15,mat3:p$1e,mat4:p$1d},ve$u=/\.ktx$/i,Te$p=/\.crn$/i;function ge$r(e){var t;return function(i,n){var r=i.uniforms,o=r[e],a=t!==o;t=o;var s,l,u=i._textures[e];if(o instanceof HTMLVideoElement)if(o.readyState>=2){if(a&&e$2e(u)&&(u!==n.defaultTexture&&u.destroy(),u=void 0),!e$2e(u)||u===n.defaultTexture)return u=new t$U({context:n,source:o,sampler:new e$1S({minificationFilter:i._minificationFilter,magnificationFilter:i._magnificationFilter})}),void(i._textures[e]=u);u.copyFrom(o)}else e$2e(u)||(i._textures[e]=n.defaultTexture);else{if(o instanceof t$U&&o!==u){i._texturePaths[e]=void 0;var c=i._textures[e];return c!==i._defaultTexture&&c.destroy(),i._textures[e]=o,s=e+"Dimensions",void(r.hasOwnProperty(s)&&(l=r[s],l.x=o._width,l.y=o._height))}if(e$2e(u)||(i._texturePaths[e]=void 0,e$2e(i._defaultTexture)||(i._defaultTexture=n.defaultTexture),u=i._textures[e]=i._defaultTexture,s=e+"Dimensions",r.hasOwnProperty(s)&&((l=r[s]).x=u._width,l.y=u._height)),o!==r$Y.DefaultImageId){var h=o instanceof t$10;if(!e$2e(i._texturePaths[e])||h&&o.url!==i._texturePaths[e].url||!h&&o!==i._texturePaths[e]){if("string"==typeof o||h){var d=h?o:t$10.createIfNeeded(o);o$1l(ve$u.test(d.url)?k$W(d):Te$p.test(d.url)?a$P(d):d.fetchImage(),(function(t){i._loadedImages.push({id:e,image:t})}))}else(o instanceof HTMLCanvasElement||o instanceof HTMLImageElement)&&i._loadedImages.push({id:e,image:o});i._texturePaths[e]=o}}}}}function Me$p(e){return function(t,i){var n=t.uniforms[e];if(n instanceof e$1P){var r=t._textures[e];return r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,void(t._textures[e]=n)}if(e$2e(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=i.defaultCubeMap),n!==r$Y.DefaultCubeMapId){var o=n.positiveX+n.negativeX+n.positiveY+n.negativeY+n.positiveZ+n.negativeZ;if(o!==t._texturePaths[e]){var a=[t$10.createIfNeeded(n.positiveX).fetchImage(),t$10.createIfNeeded(n.negativeX).fetchImage(),t$10.createIfNeeded(n.positiveY).fetchImage(),t$10.createIfNeeded(n.negativeY).fetchImage(),t$10.createIfNeeded(n.positiveZ).fetchImage(),t$10.createIfNeeded(n.negativeZ).fetchImage()];o$1l.all(a).then((function(i){t._loadedCubeMaps.push({id:e,images:i})})),t._texturePaths[e]=o}}}}function we$m(e){var t=e._template.uniforms;for(var i in t)t.hasOwnProperty(i)&&N$V(e,i)}function N$V(e,t){var i=e._strict,n=e._template.uniforms,r=n[t],o=Ce$j(r);if(!e$2e(o))throw new t$15("fabric: uniform '"+t+"' has invalid type.");if("channels"===o){if(0===C$$(e,t,r,!1)&&i)throw new t$15("strict: shader source does not use channels '"+t+"'.")}else{if("sampler2D"===o){var a=t+"Dimensions";be$s(e,a)>0&&(n[a]={type:"ivec3",x:1,y:1},N$V(e,a))}if(!new RegExp("uniform\\s+"+o+"\\s+"+t+"\\s*;").test(e.shaderSource)){var s="uniform "+o+" "+t+";";e.shaderSource=s+e.shaderSource}var l=t+"_"+e._count++;if(1===C$$(e,t,l)&&i)throw new t$15("strict: shader source does not use uniform '"+t+"'.");if(e.uniforms[t]=r,"sampler2D"===o)e._uniforms[l]=function(){var i=e._textures[t];return i&&i._texture?i:e._defaultTexture},e._updateFunctions.push(ge$r(t));else if("samplerCube"===o)e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(Me$p(t));else if(-1!==o.indexOf("mat")){var u=new k$V[o];e._uniforms[l]=function(){return k$V[o].fromColumnMajorArray(e.uniforms[t],u)}}else e._uniforms[l]=function(){return e.uniforms[t]}}}function Ce$j(e){var t=e.type;if(!e$2e(t)){var i=typeof e;if("number"===i)t="float";else if("boolean"===i)t="bool";else if("string"===i||e instanceof t$U||e instanceof t$10||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)t=/^([rgba]){1,4}$/i.test(e)?"channels":e===r$Y.DefaultCubeMapId?"samplerCube":"sampler2D";else if("object"===i)if(Array.isArray(e))(4===e.length||9===e.length||16===e.length)&&(t="mat"+Math.sqrt(e.length));else{var n=0;for(var r in e)e.hasOwnProperty(r)&&(n+=1);n>=2&&n<=4?t="vec"+n:6===n&&(t="samplerCube")}}return t}function xe$p(e){var t=e._strict,i=e._template.materials;for(var n in i)if(i.hasOwnProperty(n)){var r=new r$Y({strict:t,fabric:i[n],count:e._count});e._count=r._count,e._uniforms=p$19(e._uniforms,r._uniforms,!0),e.materials[n]=r,e._translucentFunctions=e._translucentFunctions.concat(r._translucentFunctions);var o="czm_getMaterial",a=o+"_"+e._count++;if(C$$(r,o,a),e.shaderSource=r.shaderSource+e.shaderSource,0===C$$(e,n,a+"(materialInput)")&&t)throw new t$15("strict: shader source does not use material '"+n+"'.")}}function C$$(e,t,i,n){n=u$Z(n,!0);var r=0,o=new RegExp("([\\w"+(n?".":"")+"])?"+t+"([\\w])?","g");return e.shaderSource=e.shaderSource.replace(o,(function(e,t,n){return t||n?e:(r+=1,i)})),r}function be$s(e,t,i){return C$$(e,t,t,i)}r$Y._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}},r$Y.DefaultImageId="czm_defaultImage",r$Y.DefaultCubeMapId="czm_defaultCubeMap",r$Y.ColorType="Color",r$Y._materialCache.addMaterial(r$Y.ColorType,{fabric:{type:r$Y.ColorType,uniforms:{color:new e$1X(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),r$Y.ImageType="Image",r$Y._materialCache.addMaterial(r$Y.ImageType,{fabric:{type:r$Y.ImageType,uniforms:{image:r$Y.DefaultImageId,repeat:new o$1o(1,1),color:new e$1X(1,1,1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture2D(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),r$Y.DiffuseMapType="DiffuseMap",r$Y._materialCache.addMaterial(r$Y.DiffuseMapType,{fabric:{type:r$Y.DiffuseMapType,uniforms:{image:r$Y.DefaultImageId,channels:"rgb",repeat:new o$1o(1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),r$Y.AlphaMapType="AlphaMap",r$Y._materialCache.addMaterial(r$Y.AlphaMapType,{fabric:{type:r$Y.AlphaMapType,uniforms:{image:r$Y.DefaultImageId,channel:"a",repeat:new o$1o(1,1)},components:{alpha:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!0}),r$Y.SpecularMapType="SpecularMap",r$Y._materialCache.addMaterial(r$Y.SpecularMapType,{fabric:{type:r$Y.SpecularMapType,uniforms:{image:r$Y.DefaultImageId,channel:"r",repeat:new o$1o(1,1)},components:{specular:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!1}),r$Y.EmissionMapType="EmissionMap",r$Y._materialCache.addMaterial(r$Y.EmissionMapType,{fabric:{type:r$Y.EmissionMapType,uniforms:{image:r$Y.DefaultImageId,channels:"rgb",repeat:new o$1o(1,1)},components:{emission:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),r$Y.BumpMapType="BumpMap",r$Y._materialCache.addMaterial(r$Y.BumpMapType,{fabric:{type:r$Y.BumpMapType,uniforms:{image:r$Y.DefaultImageId,channel:"r",strength:.8,repeat:new o$1o(1,1)},source:j$12},translucent:!1}),r$Y.NormalMapType="NormalMap",r$Y._materialCache.addMaterial(r$Y.NormalMapType,{fabric:{type:r$Y.NormalMapType,uniforms:{image:r$Y.DefaultImageId,channels:"rgb",strength:.8,repeat:new o$1o(1,1)},source:V$U},translucent:!1}),r$Y.GridType="Grid",r$Y._materialCache.addMaterial(r$Y.GridType,{fabric:{type:r$Y.GridType,uniforms:{color:new e$1X(0,1,0,1),cellAlpha:.1,lineCount:new o$1o(8,8),lineThickness:new o$1o(1,1),lineOffset:new o$1o(0,0)},source:Q$Z},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}}),r$Y.StripeType="Stripe",r$Y._materialCache.addMaterial(r$Y.StripeType,{fabric:{type:r$Y.StripeType,uniforms:{horizontal:!0,evenColor:new e$1X(1,1,1,.5),oddColor:new e$1X(0,0,1,.5),offset:0,repeat:5},source:ne$G},translucent:function(e){var t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}}),r$Y.CheckerboardType="Checkerboard",r$Y._materialCache.addMaterial(r$Y.CheckerboardType,{fabric:{type:r$Y.CheckerboardType,uniforms:{lightColor:new e$1X(1,1,1,.5),darkColor:new e$1X(0,0,0,.5),repeat:new o$1o(5,5)},source:J$W},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),r$Y.DotType="Dot",r$Y._materialCache.addMaterial(r$Y.DotType,{fabric:{type:r$Y.DotType,uniforms:{lightColor:new e$1X(1,1,0,.75),darkColor:new e$1X(0,1,1,.75),repeat:new o$1o(5,5)},source:$$W},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),r$Y.WaterType="Water",r$Y._materialCache.addMaterial(r$Y.WaterType,{fabric:{type:r$Y.WaterType,uniforms:{baseWaterColor:new e$1X(.2,.3,.6,1),blendColor:new e$1X(0,1,.699,1),specularMap:r$Y.DefaultImageId,normalMap:r$Y.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:le$w},translucent:function(e){var t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}}),r$Y.RimLightingType="RimLighting",r$Y._materialCache.addMaterial(r$Y.RimLightingType,{fabric:{type:r$Y.RimLightingType,uniforms:{color:new e$1X(1,0,0,.7),rimColor:new e$1X(1,1,1,.4),width:.3},source:ae$x},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}}),r$Y.FadeType="Fade",r$Y._materialCache.addMaterial(r$Y.FadeType,{fabric:{type:r$Y.FadeType,uniforms:{fadeInColor:new e$1X(1,0,0,1),fadeOutColor:new e$1X(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new o$1o(.5,.5)},source:K$R},translucent:function(e){var t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}}),r$Y.PolylineArrowType="PolylineArrow",r$Y._materialCache.addMaterial(r$Y.PolylineArrowType,{fabric:{type:r$Y.PolylineArrowType,uniforms:{color:new e$1X(1,1,1,1)},source:ee$x},translucent:!0}),r$Y.PolylineDashType="PolylineDash",r$Y._materialCache.addMaterial(r$Y.PolylineDashType,{fabric:{type:r$Y.PolylineDashType,uniforms:{color:new e$1X(1,0,1,1),gapColor:new e$1X(0,0,0,0),dashLength:16,dashPattern:255},source:te$C},translucent:!0}),r$Y.PolylineGlowType="PolylineGlow",r$Y._materialCache.addMaterial(r$Y.PolylineGlowType,{fabric:{type:r$Y.PolylineGlowType,uniforms:{color:new e$1X(0,.5,1,1),glowPower:.25,taperPower:1},source:re$H},translucent:!0}),r$Y.PolylineOutlineType="PolylineOutline",r$Y._materialCache.addMaterial(r$Y.PolylineOutlineType,{fabric:{type:r$Y.PolylineOutlineType,uniforms:{color:new e$1X(1,1,1,1),outlineColor:new e$1X(1,0,0,1),outlineWidth:1},source:R$W},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}}),r$Y.ElevationContourType="ElevationContour",r$Y._materialCache.addMaterial(r$Y.ElevationContourType,{fabric:{type:r$Y.ElevationContourType,uniforms:{spacing:100,color:new e$1X(1,0,0,1),width:1},source:q$11},translucent:!1}),r$Y.ElevationRampType="ElevationRamp",r$Y._materialCache.addMaterial(r$Y.ElevationRampType,{fabric:{type:r$Y.ElevationRampType,uniforms:{image:r$Y.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:U$$},translucent:!1}),r$Y.SlopeRampMaterialType="SlopeRamp",r$Y._materialCache.addMaterial(r$Y.SlopeRampMaterialType,{fabric:{type:r$Y.SlopeRampMaterialType,uniforms:{image:r$Y.DefaultImageId},source:ie$D},translucent:!1}),r$Y.AspectRampMaterialType="AspectRamp",r$Y._materialCache.addMaterial(r$Y.AspectRampMaterialType,{fabric:{type:r$Y.AspectRampMaterialType,uniforms:{image:r$Y.DefaultImageId},source:Z$Y},translucent:!1}),r$Y.EmissionColorType="EmissionColor",r$Y._materialCache.addMaterial(r$Y.EmissionColorType,{fabric:{type:r$Y.EmissionColorType,uniforms:{color:new e$1X(1,1,1,1)},source:fe$w},translucent:function(e){return e.uniforms.color.alpha<1}}),r$Y.PolylineDynamicType="PolylineDynamic",r$Y._materialCache.addMaterial(r$Y.PolylineDynamicType,{fabric:{type:r$Y.PolylineDynamicType,uniforms:{color:new e$1X(1,1,1,1),outlineColor:new e$1X(1,0,0,1),outlineWidth:0,v_time:1,bAsy:1},source:R$W},translucent:function(e){return!0}}),r$Y.PolylineTrailType="PolylineTrail",r$Y._materialCache.addMaterial(r$Y.PolylineTrailType,{fabric:{type:r$Y.PolylineTrailType,uniforms:{color:new e$1X(1,0,0,.5),trailTime:0,spotSize:1,trailLength:.03,spotIntensity:5,constantSpeed:0,period:1e3,startTime:0},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return!0}});var m$X={numberOfPoints:function(e,t,i){var n=o$1p.distance(e,t);return Math.ceil(n/i)},numberOfPointsRhumbLine:function(e,t,i){var n=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.ceil(Math.sqrt(n/(i*i)))}},F$Z=new a$18;m$X.extractHeights=function(e,t){for(var i=e.length,n=new Array(i),r=0;r<i;r++){var o=e[r];n[r]=t.cartesianToCartographic(o,F$Z).height}return n};var j$11=new p$1d,J$V=new o$1p,M$$=new o$1p,K$Q=new o$1m(o$1p.UNIT_X,0),X$V=new o$1p,Q$Y=new o$1m(o$1p.UNIT_X,0),$$V=new o$1p,rr$9=new o$1p,G$17=[];function Z$X(e,t,i){var n,r=G$17;if(r.length=e,t===i){for(n=0;n<e;n++)r[n]=t;return r}var o=(i-t)/e;for(n=0;n<e;n++){var a=t+n*o;r[n]=a}return r}function ar$7(e,t){var i=G$17;i.length=e;for(var n=0;n<e;n++)i[n]+=t*Math.sin(Math.PI*n/e);return i}var I$19=new a$18,N$U=new a$18,T$Z=new o$1p,B$U=new o$1p,V$T=new o$1p,H$11=new E$1t,E$12=new P$15;function er$9(e,t,i,n,r,o,a,s,l){var u=n.scaleToGeodeticSurface(e,B$U),c=n.scaleToGeodeticSurface(t,V$T),h=m$X.numberOfPoints(e,t,i),d=n.cartesianToCartographic(u,I$19),f=n.cartesianToCartographic(c,N$U),p=Z$X(h,r,o);l>0&&(p=ar$7(h,l)),H$11.setEndPoints(d,f);var _=H$11.surfaceDistance/h,m=s;d.height=r;var g=n.cartographicToCartesian(d,T$Z);o$1p.pack(g,a,m),m+=3;for(var x=1;x<h;x++){var y=H$11.interpolateUsingSurfaceDistance(x*_,N$U);y.height=p[x],g=n.cartographicToCartesian(y,T$Z),o$1p.pack(g,a,m),m+=3}return m}function tr$7(e,t,i,n,r,o,a,s){var l=n.scaleToGeodeticSurface(e,B$U),u=n.scaleToGeodeticSurface(t,V$T),c=n.cartesianToCartographic(l,I$19),h=n.cartesianToCartographic(u,N$U),d=m$X.numberOfPointsRhumbLine(c,h,i),f=Z$X(d,r,o);E$12.ellipsoid.equals(n)||(E$12=new P$15(void 0,void 0,n)),E$12.setEndPoints(c,h);var p=E$12.surfaceDistance/d,_=s;c.height=r;var m=n.cartographicToCartesian(c,T$Z);o$1p.pack(m,a,_),_+=3;for(var g=1;g<d;g++){var x=E$12.interpolateUsingSurfaceDistance(g*p,N$U);x.height=f[g],m=n.cartographicToCartesian(x,T$Z),o$1p.pack(m,a,_),_+=3}return _}m$X.wrapLongitude=function(e,t){var i=[],n=[];if(e$2e(e)&&e.length>0){t=u$Z(t,p$1d.IDENTITY);var r=p$1d.inverseTransformation(t,j$11),o=p$1d.multiplyByPoint(r,o$1p.ZERO,J$V),a=o$1p.normalize(p$1d.multiplyByPointAsVector(r,o$1p.UNIT_Y,M$$),M$$),s=o$1m.fromPointNormal(o,a,K$Q),l=o$1p.normalize(p$1d.multiplyByPointAsVector(r,o$1p.UNIT_X,X$V),X$V),u=o$1m.fromPointNormal(o,l,Q$Y),c=1;i.push(o$1p.clone(e[0]));for(var h=i[0],d=e.length,f=1;f<d;++f){var p=e[f];if(o$1m.getPointDistance(u,h)<0||o$1m.getPointDistance(u,p)<0){var _=g$1j.lineSegmentPlane(h,p,s,$$V);if(e$2e(_)){var m=o$1p.multiplyByScalar(a,5e-9,rr$9);o$1m.getPointDistance(s,h)<0&&o$1p.negate(m,m),i.push(o$1p.add(_,m,new o$1p)),n.push(c+1),o$1p.negate(m,m),i.push(o$1p.add(_,m,new o$1p)),c=1}}i.push(o$1p.clone(e[f])),c++,h=p}n.push(c)}return{positions:i,lengths:n}},m$X.generateArc=function(e){e$2e(e)||(e={});var t=e.positions;if(!e$2e(t))throw new t$15("options.positions is required.");var i=t.length,n=u$Z(e.ellipsoid,t$12.WGS84),r=u$Z(e.height,0),o=Array.isArray(r);if(i<1)return[];if(1===i){var a=n.scaleToGeodeticSurface(t[0],B$U);if(0!==(r=o?r[0]:r)){var s=n.geodeticSurfaceNormal(a,T$Z);o$1p.multiplyByScalar(s,r,s),o$1p.add(a,s,a)}return[a.x,a.y,a.z]}var l=e.minDistance;if(!e$2e(l)){var u=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE);l=e$2d.chordLength(u,n.maximumRadius)}var c,h=0;for(c=0;c<i-1;c++)h+=m$X.numberOfPoints(t[c],t[c+1],l);var d=e.hMax,f=3*(h+1),p=new Array(f),_=0;for(c=0;c<i-1;c++){_=er$9(t[c],t[c+1],l,n,o?r[c]:r,o?r[c+1]:r,p,_,d)}G$17.length=0;var m=t[i-1],g=n.cartesianToCartographic(m,I$19);g.height=o?r[i-1]:r;var x=n.cartographicToCartesian(g,T$Z);return o$1p.pack(x,p,f-3),p};var Y$M=new a$18,nr$9=new a$18;function o$14(e,t){e=u$Z(e,u$Z.EMPTY_OBJECT),this._show=u$Z(e.show,!0),this._width=u$Z(e.width,1),this._loop=u$Z(e.loop,!1),this._distanceDisplayCondition=e.distanceDisplayCondition,this._material=e.material,e$2e(this._material)||(this._material=r$Y.fromType(r$Y.ColorType,{color:new e$1X(1,1,1,1)}));var i,n=e.positions;e$2e(n)||(n=[]),this._positions=n,this._actualPositions=D$13(n,o$1p.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(o$1p.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id,e$2e(t)&&(i=p$1d.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=m$X.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(P$V),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=i$1d.fromPoints(this._actualPositions),this._boundingVolumeWC=i$1d.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new i$1d}m$X.generateRhumbArc=function(e){e$2e(e)||(e={});var t=e.positions;if(!e$2e(t))throw new t$15("options.positions is required.");var i=t.length,n=u$Z(e.ellipsoid,t$12.WGS84),r=u$Z(e.height,0),o=Array.isArray(r);if(i<1)return[];if(1===i){var a=n.scaleToGeodeticSurface(t[0],B$U);if(0!==(r=o?r[0]:r)){var s=n.geodeticSurfaceNormal(a,T$Z);o$1p.multiplyByScalar(s,r,s),o$1p.add(a,s,a)}return[a.x,a.y,a.z]}var l,u,c=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),h=0,d=n.cartesianToCartographic(t[0],Y$M);for(l=0;l<i-1;l++)u=n.cartesianToCartographic(t[l+1],nr$9),h+=m$X.numberOfPointsRhumbLine(d,u,c),d=a$18.clone(u,Y$M);var f=3*(h+1),p=new Array(f),_=0;for(l=0;l<i-1;l++){_=tr$7(t[l],t[l+1],c,n,o?r[l]:r,o?r[l+1]:r,p,_)}G$17.length=0;var m=t[i-1],g=n.cartesianToCartographic(m,I$19);g.height=o?r[i-1]:r;var x=n.cartographicToCartesian(g,T$Z);return o$1p.pack(x,p,f-3),p},m$X.generateCartesianArc=function(e){for(var t=m$X.generateArc(e),i=t.length/3,n=new Array(i),r=0;r<i;r++)n[r]=o$1p.unpack(t,3*r);return n},m$X.generateCartesianRhumbArc=function(e){for(var t=m$X.generateRhumbArc(e),i=t.length/3,n=new Array(i),r=0;r<i;r++)n[r]=o$1p.unpack(t,3*r);return n};var I$18=o$14.POSITION_INDEX=0,D$Y=o$14.SHOW_INDEX=1,w$S=o$14.WIDTH_INDEX=2,E$11=o$14.MATERIAL_INDEX=3,d$1a=o$14.POSITION_SIZE_INDEX=4,N$T=o$14.DISTANCE_DISPLAY_CONDITION=5,P$V=o$14.NUMBER_OF_PROPERTIES=6;function n$Y(e,t){++e._propertiesChanged[t];var i=e._polylineCollection;e$2e(i)&&(i._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(o$14.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2e(e))throw new t$15("value is required.");e!==this._show&&(this._show=e,n$Y(this,D$Y))}},positions:{get:function(){return this._positions},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=D$13(e,o$1p.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(o$1p.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&n$Y(this,d$1a),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=i$1d.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=i$1d.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),n$Y(this,I$18),this.update()}},material:{get:function(){return this._material},set:function(e){if(!e$2e(e))throw new t$15("material is required.");this._material!==e&&(this._material=e,n$Y(this,E$11))}},width:{get:function(){return this._width},set:function(e){if(!e$2e(e))throw new t$15("value is required.");e!==this._width&&(this._width=e,n$Y(this,w$S))}},loop:{get:function(){return this._loop},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(e!==this._loop){var t=this._actualPositions;e?t.length>2&&!o$1p.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(o$1p.clone(t[0]))):t.length>2&&o$1p.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,n$Y(this,d$1a)}}},id:{get:function(){return this._id},set:function(e){this._id=e,e$2e(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");r$Z.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=r$Z.clone(e,this._distanceDisplayCondition),n$Y(this,N$T))}}}),o$14.prototype.update=function(){var e=p$1d.IDENTITY;e$2e(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);var t=this._segments.positions.length,i=this._segments.lengths,n=this._propertiesChanged[I$18]>0||this._propertiesChanged[d$1a]>0;if((!p$1d.equals(e,this._modelMatrix)||n)&&(this._segments=m$X.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=i$1d.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=p$1d.clone(e,this._modelMatrix),this._segments.positions.length!==t)n$Y(this,d$1a);else for(var r=i.length,o=0;o<r;++o)if(i[o]!==this._segments.lengths[o]){n$Y(this,d$1a);break}},o$14.prototype.getPickId=function(e){if(!e$2e(this._pickId))if(this._polylineCollection._polygonEntityId){var t=e.getAllPickObjects();for(let i in t)t[i].id&&t[i].id.id&&t[i].id.id===this._polylineCollection._polygonEntityId&&(this._pickId=e.getPickIdByKey(i))}else this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id});return this._pickId},o$14.prototype._clean=function(){this._dirty=!1;for(var e=this._propertiesChanged,t=0;t<P$V-1;++t)e[t]=0},o$14.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var e$1J={OCCLUDED:0,OCCLUDED_TRANSLUCENT:1,NON_OCCLUDED:2},J$U=Object.freeze(e$1J),A$13={NEVER:de$y.NEVER,LESS:de$y.LESS,EQUAL:de$y.EQUAL,LESS_OR_EQUAL:de$y.LEQUAL,GREATER:de$y.GREATER,NOT_EQUAL:de$y.NOTEQUAL,GREATER_OR_EQUAL:de$y.GEQUAL,ALWAYS:de$y.ALWAYS},re$G=Object.freeze(A$13),d$19="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec2 st;\nattribute float batchId;\n\n#ifdef TRAIL\nuniform float trailTime_1;\nuniform float spotSize_2;\nuniform float constantSpeed_5;\nuniform float trailLength_3;\nuniform float period_6;\nuniform float startTime_7;\nattribute vec3 dist;\nvarying float v_Percent;\nvarying float v_SpotPercent;\n#endif\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying float v_clipW;\n\nvoid main()\n{\n float u = abs(expandAndWidth.x);\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = czm_computePosition();\n vec4 prev = czm_computePrevPosition();\n vec4 next = czm_computeNextPosition();\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n\n v_width = width;\n v_st.s = st.s;\n v_st.t = czm_writeNonPerspective(st.t, gl_Position.w);\n v_polylineAngle = angle;\n v_alpha = u;\n v_clipW = gl_Position.w;\n\n#ifdef TRAIL\n float t = 0.0;\n if(abs(constantSpeed_5) > czm_epsilon7)\n {\n t = mod((constantSpeed_5 * trailTime_1 + dist.z) / dist.y, 1.0 + trailLength_3) - trailLength_3;\n }\n else\n {\n t = mod((trailTime_1 - startTime_7) / period_6, 1.0 + trailLength_3) - trailLength_3;\n }\n float trailLen = dist.y * trailLength_3;\n v_Percent = (dist.x - t * dist.y) / trailLen;\n v_SpotPercent = spotSize_2 / dist.y;\n#endif\n}\n",i$U=Z$_+"\n"+d$19,p$X=be$t;function r$X(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.translucent,!0),i=r$X.VERTEX_FORMAT;this.material=e$2e(e.material)?e.material:r$Y.fromType(r$Y.ColorType),this.translucent=t,this._vertexShaderSource=u$Z(e.vertexShaderSource,i$U),this._fragmentShaderSource=u$Z(e.fragmentShaderSource,p$X),this._renderState=a$S.getDefaultRenderState(t,false,e.renderState),this._closed=false,this._vertexFormat=i,this._name="PolylineMaterialAppearance"}s$Z.isInternetExplorer()||(i$U="#define CLIP_POLYLINE \n"+i$U),Object.defineProperties(r$X.prototype,{vertexShaderSource:{get:function(){var e=this._vertexShaderSource;return-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&(e="#define POLYLINE_DASH\n"+e),"PolylineDynamic"==this.material.type&&(e="#define ENABLE_DYNAMIC\n"+e),"PolylineTrail"==this.material.type&&(e="#define TRAIL\n"+e),e}},fragmentShaderSource:{get:function(){var e=this._fragmentShaderSource;return"PolylineDynamic"==this.material.type&&(e="#define ENABLE_DYNAMIC\n"+e),"PolylineTrail"==this.material.type&&(e="#define TRAIL\n"+e),e}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},name:{get:function(){return this._name+"_"+this.material._id}}}),r$X.VERTEX_FORMAT=n$13.POSITION_AND_ST,r$X.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,r$X.prototype.isTranslucent=a$S.prototype.isTranslucent,r$X.prototype.getRenderState=a$S.prototype.getRenderState;var nr$8=o$14.SHOW_INDEX,lr$8=o$14.WIDTH_INDEX,Ae$t=o$14.POSITION_INDEX,_r$5=o$14.MATERIAL_INDEX,Be$m=o$14.POSITION_SIZE_INDEX,ur$6=o$14.DISTANCE_DISPLAY_CONDITION,Oe$o=o$14.NUMBER_OF_PROPERTIES,re$F={texCoordExpandAndBatchIndex:0,positionHigh:1,positionLow:2,prevPositionHigh:3,prevPositionLow:4,nextPositionHigh:5,nextPositionLow:6};function J$T(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this._opaqueRS=e.opaqueRS,this._translucentRS=e.translucentRS,this._colorCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(Oe$o),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:A$18.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=e$1X.clone(e$1X.WHITE);var t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}},this._lineDisplayType=e.lineDisplayType,this._canAlwaysPick=!1,this._polygonEntityId=u$Z(e.polygonEntityId,void 0)}function vr$5(e,t){e$2e(e._batchTable)&&e._batchTable.destroy();var i=[{functionName:"batchTable_getWidthAndShow",componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:S$14.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:S$14.FLOAT,componentsPerAttribute:2}];e._batchTable=new h$X(t,i,e._polylines.length)}Object.defineProperties(J$T.prototype,{length:{get:function(){return we$l(this),this._polylines.length}},lineDisplayType:{get:function(){return this._lineDisplayType},set:function(e){if(o$1q.typeOf.number.greaterThanOrEquals("PolylineCollection.lineDisplayType",e,0),o$1q.typeOf.number.lessThanOrEquals("PolylineCollection.lineDisplayType",e,2),this._lineDisplayType!==e){this._lineDisplayType=e;for(var t,i=this._polylines.length,n=0;n<i;n++){t=void 0;var r=this._polylines[n];if(e$2e(r)){for(var o=n+1;o<i;o++){var a=this._polylines[o];if(e$2e(a)&&a.id&&a.id===r._index+"-alpha"){t=a;break}}if(e$2e(t)||this._lineDisplayType!==J$U.OCCLUDED_TRANSLUCENT)e$2e(t)&&this._lineDisplayType!==J$U.OCCLUDED_TRANSLUCENT&&this.remove(t);else{var s={show:r.show,positions:r.positions,width:r.width,loop:r.loop,distanceDisplayCondition:r._distanceDisplayCondition},l=r$Y.fromType(r$Y.ColorType,{color:e$1X.clone(r.material.uniforms.color,new e$1X).withAlpha(.2)});l.uniforms.color.alpha=.2,s.material=l;var u=new o$14(s,this);u.material=l,u._index=this._polylines.length,u.id=r._index+"-alpha",this._polylines.push(u),this._createVertexArray=!0,this._createBatchTable=!0}}}this._lineDisplayType===J$U.OCCLUDED_TRANSLUCENT?(this._opaqueRS=d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}),this._translucentRS=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}})):this._lineDisplayType===J$U.NON_OCCLUDED?this._opaqueRS=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}}):this._lineDisplayType===J$U.OCCLUDED&&(this._opaqueRS=d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}))}}}}),J$T.prototype.add=function(e){var t=new o$14(e,this);if(t._index=this._polylines.length,this._polylines.push(t),this._lineDisplayType===J$U.OCCLUDED_TRANSLUCENT){this._opaqueRS=d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}),this._translucentRS=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}});var i=r$Y.fromType(r$Y.ColorType,{color:e$1X.clone(e.material.uniforms.color,new e$1X).withAlpha(.2)});i.uniforms.color.alpha=.2;var n=new o$14(e,this);n.material=i,n._index=this._polylines.length,n.id=t._index+"-alpha",this._polylines.push(n)}else this._lineDisplayType===J$U.NON_OCCLUDED?this._opaqueRS=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}}):this._lineDisplayType===J$U.OCCLUDED&&(this._opaqueRS=d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}));return this._createVertexArray=!0,this._createBatchTable=!0,t},J$T.prototype.remove=function(e){if(this.contains(e)){this._polylines[e._index]=void 0;var t=this._polylinesToUpdate.indexOf(e);if(-1!==t&&this._polylinesToUpdate.splice(t,1),this._polylinesRemoved=!0,this._createVertexArray=!0,this._createBatchTable=!0,e$2e(e._bucket)){var i=e._bucket;i.shaderProgram=i.shaderProgram&&i.shaderProgram.destroy()}e._destroy();for(var n,r=0,o=this._polylines.length;r<o;r++){var a=this._polylines[r];a&&a.id&&a.id===e._index+"-alpha"&&(n=a)}if(e$2e(n)){this._polylines[n._index]=void 0;var s=this._polylinesToUpdate.indexOf(e);-1!==s&&this._polylinesToUpdate.splice(s,1),n._destroy()}return!0}return!1},J$T.prototype.removeAll=function(){Ne$j(this),Ye$h(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0},J$T.prototype.contains=function(e){return e$2e(e)&&e._polylineCollection===this},J$T.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return we$l(this),this._polylines[e]};var Le$o=new i$12,Ue$i=new e$2c,Ve$j=new o$1o;J$T.prototype.update=function(e){if(we$l(this),0!==this._polylines.length){mr$4(this,e);var t,i=e.context,n=e.mapProjection,r=this._propertiesChanged;if(this._createBatchTable){if(0===e$1W.maximumVertexTextureImageUnits)throw new t$13("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");vr$5(this,i),this._createBatchTable=!1}if(this._createVertexArray||dr$5(this))ke$g(this,i,n);else if(this._polylinesUpdated){var o=this._polylinesToUpdate;if(this._mode!==C$14.SCENE3D)for(var a=o.length,s=0;s<a;++s)(t=o[s]).update();if(r[Be$m]||r[_r$5])ke$g(this,i,n);else for(var l=o.length,u=this._polylineBuckets,c=0;c<l;++c){r=(t=o[c])._propertiesChanged;var h=t._bucket,d=0;for(var f in u)if(u.hasOwnProperty(f)){if(u[f]===h){r[Ae$t]&&h.writeUpdate(d,t,this._positionBuffer,n);break}d+=u[f].lengthOfPositions}if((r[nr$8]||r[lr$8])&&this._batchTable.setBatchedAttribute(t._index,0,new o$1o(t._width,t._show)),this._batchTable.attributes.length>2){if(r[Ae$t]||r[Be$m]){var p=e.mode===C$14.SCENE2D?t._boundingVolume2D:t._boundingVolumeWC,_=i$12.fromCartesian(p.center,Le$o),m=e$2c.fromElements(_.low.x,_.low.y,_.low.z,p.radius,Ue$i);this._batchTable.setBatchedAttribute(t._index,2,_.high),this._batchTable.setBatchedAttribute(t._index,3,m)}if(r[ur$6]){var g=Ve$j;g.x=0,g.y=Number.MAX_VALUE;var x=t.distanceDisplayCondition;e$2e(x)&&(g.x=x.near,g.y=x.far),this._batchTable.setBatchedAttribute(t._index,4,g)}}t._clean()}o.length=0,this._polylinesUpdated=!1}r=this._propertiesChanged;for(var y=0;y<Oe$o;++y)r[y]=0;var v=p$1d.IDENTITY;e.mode===C$14.SCENE3D&&(v=this.modelMatrix);var $=e.passes,b=0!==e.morphTime;if(e$2e(this._opaqueRS)||(this._opaqueRS=d$1m.fromCache({depthMask:b,depthTest:{enabled:b}})),e$2e(this._translucentRS)||(this._translucentRS=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!b,depthTest:{enabled:b}})),this._batchTable.update(e),e._fboState.frameBufferType!=Qe$c.CLAMP&&($.render||$.pick))or$6(this,e,this._colorCommands,v)}};var _e$t=new i$1d,Ie$m=new i$1d;function or$6(e,t,i,n){for(var r=t.context,o=t.commandList,a=i.length,s=0,l=!0,u=e._vertexArrays,c=e.debugShowBoundingVolume,h=e._batchTable.getUniformMapCallback(),d=u.length,f=0;f<d;++f)for(var p=u[f],_=p.buckets,m=_.length,g=0;g<m;++g){for(var x,y,v,$,b,T,C=_[g],S=C.offset,w=C.bucket.shaderProgram,E=C.bucket._spDepthFail,P=C.bucket.polylines,A=P.length,L=0,M=0;M<A;++M){var R,O=P[M],D=gr$5(O._material);if(D!==x){if(e$2e(x)&&L>0){var I=y.isTranslucent();if(s>=a?(b=new i$$({owner:e}),i.push(b)):b=i[s],++s,T=p$19(h(y._uniforms),e._uniformMap),b.boundingVolume=i$1d.clone(_e$t,b.boundingVolume),b.modelMatrix=n,b.shaderProgram=w,b.vertexArray=p.va,b.renderState=I?e._translucentRS:e._opaqueRS,b.pass=y.isTranslucent()?Le$q.TRANSLUCENT:Le$q.OPAQUE,b.debugShowBoundingVolume=c,b.pickId="v_pickColor",b.uniformMap=T,b.count=L,b.offset=S,t.passes.pick&&e._canAlwaysPick&&(b.pass=Le$q.OVERLAY_AGAINST_DEPTH),o.push(b),e$2e(v)){s>=a?(b=new i$$({owner:e}),i.push(b)):b=i[s],++s;let r=new $({material:v,translucent:v.isTranslucent(),closed:!1}),l=p$19(h(v._uniforms),e._uniformMap),u=l$1f(r.getRenderState(),!1);u.depthTest.func=re$G.GREATER,b.boundingVolume=i$1d.clone(_e$t,b.boundingVolume),b.modelMatrix=n,b.vertexArray=p.va,b.renderState=d$1m.fromCache(u),b.shaderProgram=E,b.uniformMap=l,b.pass=y.isTranslucent()?Le$q.TRANSLUCENT:Le$q.OPAQUE,b.debugShowBoundingVolume=c,b.pickId="v_pickColor",b.count=L,b.offset=S,t.passes.pick&&e._canAlwaysPick&&(b.pass=Le$q.OVERLAY_AGAINST_DEPTH),o.push(b)}S+=L,L=0,l=!0}y=O._material,v=O._depthFailMaterial,$=O._depthFailMaterialAppearance,y.update(r),x=D}for(var F=O._locatorBuckets,B=F.length,N=0;N<B;++N){var G=F[N];G.locator===C&&(L+=G.count)}t.mode===C$14.SCENE3D?R=O._boundingVolumeWC:t.mode===C$14.COLUMBUS_VIEW?R=O._boundingVolume2D:t.mode===C$14.SCENE2D?e$2e(O._boundingVolume2D)&&((R=i$1d.clone(O._boundingVolume2D,Ie$m)).center.x=0):e$2e(O._boundingVolumeWC)&&e$2e(O._boundingVolume2D)&&(R=i$1d.union(O._boundingVolumeWC,O._boundingVolume2D,Ie$m)),l?(l=!1,i$1d.clone(R,_e$t)):i$1d.union(R,_e$t,_e$t)}if(e$2e(x)&&L>0){if(s>=a?(b=new i$$({owner:e}),i.push(b)):b=i[s],++s,T=p$19(h(y._uniforms),e._uniformMap),b.boundingVolume=i$1d.clone(_e$t,b.boundingVolume),b.modelMatrix=n,b.shaderProgram=w,b.vertexArray=p.va,b.renderState=y.isTranslucent()?e._translucentRS:e._opaqueRS,b.pass=y.isTranslucent()?Le$q.TRANSLUCENT:Le$q.OPAQUE,b.debugShowBoundingVolume=c,b.pickId="v_pickColor",b.uniformMap=T,b.count=L,b.offset=S,t.passes.pick&&e._canAlwaysPick&&(b.pass=Le$q.OVERLAY_AGAINST_DEPTH),o.push(b),e$2e(v)){s>=a?(b=new i$$({owner:e}),i.push(b)):b=i[s],++s;let r=new $({material:v,translucent:v.isTranslucent(),closed:!1}),l=p$19(h(v._uniforms),e._uniformMap),u=l$1f(r.getRenderState(),!1);u.depthTest.func=re$G.GREATER,b.boundingVolume=i$1d.clone(_e$t,b.boundingVolume),b.modelMatrix=n,b.vertexArray=p.va,b.renderState=d$1m.fromCache(u),b.shaderProgram=E,b.uniformMap=l,b.pass=y.isTranslucent()?Le$q.TRANSLUCENT:Le$q.OPAQUE,b.debugShowBoundingVolume=c,b.pickId="v_pickColor",b.count=L,b.offset=S,t.passes.pick&&e._canAlwaysPick&&(b.pass=Le$q.OVERLAY_AGAINST_DEPTH),o.push(b)}l=!0}x=void 0}i.length=s}function dr$5(e){var t=!1,i=e._propertiesChanged,n=e._positionBufferUsage;return i[Ae$t]?(n.bufferUsage!==A$18.STREAM_DRAW&&(t=!0,n.bufferUsage=A$18.STREAM_DRAW),n.frameCount=100):n.bufferUsage!==A$18.STATIC_DRAW&&(0===n.frameCount?(t=!0,n.bufferUsage=A$18.STATIC_DRAW):n.frameCount--),t}J$T.prototype.isDestroyed=function(){return!1},J$T.prototype.destroy=function(){return Fe$m(this),Ne$j(this),Ye$h(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$11(this)};var Me$o=[0,0,0];function ke$g(e,t,i){e._createVertexArray=!1,Ne$j(e),Fe$m(e),Tr$6(e);var n,r,o=[[]],a=o[0],s=e._batchTable,l=e._useHighlightColor,u=[0],c=0,h=[[]],d=0,f=e._polylineBuckets;for(n in f)f.hasOwnProperty(n)&&((r=f[n]).updateShader(t,s,l),d+=r.lengthOfPositions);if(d>0){var p,_=e._mode,m=new Float32Array(6*d*3),g=new Float32Array(4*d),x=0,y=0,v=0;for(n in f)if(f.hasOwnProperty(n)){(r=f[n]).write(m,g,x,y,v,s,t,i),_===C$14.MORPHING&&(e$2e(p)||(p=new Float32Array(6*d*3)),r.writeForMorph(p,x));var $=r.lengthOfPositions;x+=6*$*3,y+=4*$,v+=4*$,c=r.updateIndices(o,u,h,c)}var b,T=e._positionBufferUsage.bufferUsage,C=A$18.STATIC_DRAW;e._positionBuffer=t$X.createVertexBuffer({context:t,typedArray:m,usage:T}),e$2e(p)&&(b=t$X.createVertexBuffer({context:t,typedArray:p,usage:T})),e._texCoordExpandAndBatchIndexBuffer=t$X.createVertexBuffer({context:t,typedArray:g,usage:C});for(var S=3*Float32Array.BYTES_PER_ELEMENT,w=4*Float32Array.BYTES_PER_ELEMENT,E=0,P=o.length,A=0;A<P;++A)if((a=o[A]).length>0){var L=new Uint16Array(a),M=t$X.createIndexBuffer({context:t,typedArray:L,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});E+=u[A];var R,O,D,I,F=6*(A*(S*e$2d.SIXTY_FOUR_KILOBYTES)-E*S),B=S+F,N=S+B,G=S+N,z=S+G,U=S+z,V=A*(w*e$2d.SIXTY_FOUR_KILOBYTES)-E*w,k=[{name:"positionHigh",index:re$F.positionHigh,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:F,strideInBytes:6*S},{name:"positionLow",index:re$F.positionLow,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:B,strideInBytes:6*S},{name:"prevPositionHigh",index:re$F.prevPositionHigh,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:N,strideInBytes:6*S},{name:"prevPositionLow",index:re$F.prevPositionLow,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:G,strideInBytes:6*S},{name:"nextPositionHigh",index:re$F.nextPositionHigh,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:z,strideInBytes:6*S},{name:"nextPositionLow",index:re$F.nextPositionLow,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:U,strideInBytes:6*S},{name:"texCoordExpandAndBatchIndex",index:re$F.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:V}];_===C$14.SCENE3D?(R=e._positionBuffer,O="vertexBuffer",D=Me$o,I="value"):_===C$14.SCENE2D||_===C$14.COLUMBUS_VIEW?(R=Me$o,O="value",D=e._positionBuffer,I="vertexBuffer"):(R=b,O="vertexBuffer",D=e._positionBuffer,I="vertexBuffer"),_===C$14.SCENE3D?(k[0][O]=R,k[1][O]=R,k[2][O]=R,k[3][O]=R,k[4][O]=R,k[5][O]=R):(_===C$14.SCENE2D||_===C$14.COLUMBUS_VIEW)&&(k[0][I]=D,k[1][I]=D,k[2][I]=D,k[3][I]=D,k[4][I]=D,k[5][I]=D);var W=new c$13({context:t,attributes:k,indexBuffer:M});e._vertexArrays.push({va:W,buckets:h[A]})}}}function pr$4(e,t){return t instanceof t$U?t.id:t}var Ee$p=[];function gr$5(e){var t=r$Y._uniformList[e.type],i=t.length;Ee$p.length=2*i;for(var n=0,r=0;r<i;++r){var o=t[r];Ee$p[n]=o,Ee$p[n+1]=e._uniforms[o](),n+=2}return e.type+":"+JSON.stringify(Ee$p,pr$4)}function Tr$6(e){for(var t=e._mode,i=e._modelMatrix,n=e._polylineBuckets={},r=e._polylines,o=r.length,a=0;a<o;++a){var s=r[a];if(s._actualPositions.length>1){s.update();var l=s.material,u=s._depthFailMaterial,c=e$2e(u)?l.type+u.type:l.type,h=n[c];e$2e(h)||(h=n[c]=new j$10(l,t,i,u)),h.addPolyline(s)}}}function mr$4(e,t){var i=t.mode;(e._mode!==i||!p$1d.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=i,e._modelMatrix=p$1d.clone(e.modelMatrix),e._createVertexArray=!0)}function we$l(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;for(var t=[],i=e._polylines.length,n=0,r=0;n<i;++n){var o=e._polylines[n];e$2e(o)&&(o._index=r++,t.push(o))}e._polylines=t}}function Ne$j(e){for(var t=e._polylines,i=t.length,n=0;n<i;++n)if(e$2e(t[n])){var r=t[n]._bucket;e$2e(r)&&(r.shaderProgram=r.shaderProgram&&r.shaderProgram.destroy())}}function Fe$m(e){for(var t=e._vertexArrays.length,i=0;i<t;++i)e._vertexArrays[i].va.destroy();e._vertexArrays.length=0;var n=e._colorCommands;t=n.length;for(var r=0;r<t;++r){n[r].derivedCommands={}}}function Ye$h(e){for(var t=e._polylines,i=t.length,n=0;n<i;++n)e$2e(t[n])&&t[n]._destroy()}function Pe$l(e,t,i){this.count=e,this.offset=t,this.bucket=i}function j$10(e,t,i,n){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.depthFailMaterial=n,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=i}function We$k(e){return o$1p.dot(o$1p.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(o$1m.ORIGIN_ZX_PLANE)===Ae$w.INTERSECTING}J$T.prototype._updatePolyline=function(e,t){if("string"!=typeof e.id||"alpha"!==e.id.slice(-5)){if(this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),this._lineDisplayType===J$U.OCCLUDED_TRANSLUCENT)for(var i=0;i<this._polylines.length;i++){var n=this._polylines[i];n.id&&n.id===e._index+"-alpha"&&(n._dirty||this._polylinesToUpdate.push(n),n.positions=e.positions,++this._propertiesChanged[t])}++this._propertiesChanged[t]}},j$10.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this},j$10.prototype.updateShader=function(e,t,i){if(!e$2e(this.shaderProgram)){var n=["DISTANCE_DISPLAY_CONDITION"];i&&n.push("VECTOR_TILE"),-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&n.push("POLYLINE_DASH"),"PolylineDynamic"===this.material.type&&n.push("ENABLE_DYNAMIC"),s$Z.isInternetExplorer()||n.push("CLIP_POLYLINE"),this.mode===C$14.SCENE3D&&n.push("SCENE_3D");var r=new s$V({name:"PolylineFS",defines:n,sources:["varying vec4 v_pickColor;\n",this.material.shaderSource,be$t]}),o=t.getVertexShaderCallback()(sr$7),a=new s$V({name:"PolylineVS",defines:n,sources:[Z$_,o]});if(this.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:a,fragmentShaderSource:r,attributeLocations:re$F}),e$2e(this.depthFailMaterial)){r=new s$V({name:"PolylineFS",defines:n,sources:["varying vec4 v_pickColor;\n",this.depthFailMaterial.shaderSource,be$t]}),this._spDepthFail=r$14.fromCache({name:"depthFail_polyline",context:e,vertexShaderSource:a,fragmentShaderSource:r,attributeLocations:re$F})}}},j$10.prototype.getPolylinePositionsLength=function(e){var t;if(this.mode===C$14.SCENE3D||!We$k(e))return 4*(t=e._actualPositions.length)-4;var i=0,n=e._segments.lengths;t=n.length;for(var r=0;r<t;++r)i+=4*n[r]-4;return i};var D$X=new o$1p,W$Z=new o$1p,H$10=new o$1p,ce$v=new o$1p,Er$5=new e$2c,cr$5=new o$1o;j$10.prototype.write=function(e,t,i,n,r,o,a,s){for(var l=this.mode,u=s.ellipsoid.maximumRadius*e$2d.PI,c=this.polylines,h=c.length,d=0;d<h;++d){var f,p=c[d],_=p.width,m=p.show&&_>0,g=p._index,x=this.getSegments(p,s),y=x.positions,v=x.lengths,$=y.length,b=p.getPickId(a);f=e$2e(b)?b.color:e$1X.BLACK;for(var T,C=0,S=0,w=0;w<$;++w){0===w?p._loop?T=y[$-2]:(T=ce$v,o$1p.subtract(y[0],y[1],T),o$1p.add(y[0],T,T)):T=y[w-1],o$1p.clone(T,W$Z),o$1p.clone(y[w],D$X),w===$-1?p._loop?T=y[1]:(T=ce$v,o$1p.subtract(y[$-1],y[$-2],T),o$1p.add(y[$-1],T,T)):T=y[w+1],o$1p.clone(T,H$10);var E=v[C];w===S+E&&(S+=E,++C);var P=w-S==0,A=w===S+v[C]-1;l===C$14.SCENE2D&&(W$Z.z=0,D$X.z=0,H$10.z=0),(l===C$14.SCENE2D||l===C$14.MORPHING)&&(P||A)&&u-Math.abs(D$X.x)<1&&((D$X.x<0&&W$Z.x>0||D$X.x>0&&W$Z.x<0)&&o$1p.clone(D$X,W$Z),(D$X.x<0&&H$10.x>0||D$X.x>0&&H$10.x<0)&&o$1p.clone(D$X,H$10));for(var L=A?2:4,M=P?2:0;M<L;++M){i$12.writeElements(D$X,e,i),i$12.writeElements(W$Z,e,i+6),i$12.writeElements(H$10,e,i+12);var R=M-2<0?-1:1;t[r]=w/($-1),t[r+1]=M%2*2-1,t[r+2]=R,t[r+3]=g,i+=18,r+=4}}var O=Er$5;O.x=e$1X.floatToByte(f.red),O.y=e$1X.floatToByte(f.green),O.z=e$1X.floatToByte(f.blue),O.w=e$1X.floatToByte(f.alpha);var D=cr$5;D.x=_,D.y=m?1:0;var I=l===C$14.SCENE2D?p._boundingVolume2D:p._boundingVolumeWC,F=i$12.fromCartesian(I.center,Le$o),B=F.high,N=e$2c.fromElements(F.low.x,F.low.y,F.low.z,I.radius,Ue$i),G=Ve$j;G.x=0,G.y=Number.MAX_VALUE;var z=p.distanceDisplayCondition;e$2e(z)&&(G.x=z.near,G.y=z.far),o.setBatchedAttribute(g,0,D),o.setBatchedAttribute(g,1,O),o.attributes.length>2&&(o.setBatchedAttribute(g,2,B),o.setBatchedAttribute(g,3,N),o.setBatchedAttribute(g,4,G))}};var yr$4=new o$1p,Sr$4=new o$1p,Ar$4=new o$1p,He$f=new o$1p;j$10.prototype.writeForMorph=function(e,t){for(var i=this.modelMatrix,n=this.polylines,r=n.length,o=0;o<r;++o)for(var a=n[o],s=a._segments.positions,l=a._segments.lengths,u=s.length,c=0,h=0,d=0;d<u;++d){var f;0===d?a._loop?f=s[u-2]:(f=He$f,o$1p.subtract(s[0],s[1],f),o$1p.add(s[0],f,f)):f=s[d-1],f=p$1d.multiplyByPoint(i,f,Sr$4);var p,_=p$1d.multiplyByPoint(i,s[d],yr$4);d===u-1?a._loop?p=s[1]:(p=He$f,o$1p.subtract(s[u-1],s[u-2],p),o$1p.add(s[u-1],p,p)):p=s[d+1],p=p$1d.multiplyByPoint(i,p,Ar$4);var m=l[c];d===h+m&&(h+=m,++c);for(var g=d-h==0,x=d===h+l[c]-1?2:4,y=g?2:0;y<x;++y)i$12.writeElements(_,e,t),i$12.writeElements(f,e,t+6),i$12.writeElements(p,e,t+12),t+=18}};var wr$5=new Array(1);j$10.prototype.updateIndices=function(e,t,i,n){var r=i.length-1,o=new Pe$l(0,n,this);i[r].push(o);var a=0,s=e[e.length-1],l=0;s.length>0&&(l=s[s.length-1]+1);for(var u=this.polylines,c=u.length,h=0;h<c;++h){var d,f=u[h];if(f._locatorBuckets=[],this.mode===C$14.SCENE3D){d=wr$5;var p=f._actualPositions.length;if(!(p>0))continue;d[0]=p}else d=f._segments.lengths;var _=d.length;if(_>0){for(var m=0,g=0;g<_;++g)for(var x=d[g]-1,y=0;y<x;++y)l+4>e$2d.SIXTY_FOUR_KILOBYTES&&(f._locatorBuckets.push({locator:o,count:m}),m=0,t.push(4),s=[],e.push(s),l=0,o.count=a,a=0,n=0,o=new Pe$l(0,0,this),i[++r]=[o]),s.push(l,l+2,l+1),s.push(l+1,l+2,l+3),m+=6,a+=6,n+=6,l+=4;f._locatorBuckets.push({locator:o,count:m}),l+4>e$2d.SIXTY_FOUR_KILOBYTES&&(t.push(0),s=[],e.push(s),l=0,o.count=a,n=0,a=0,o=new Pe$l(0,0,this),i[++r]=[o])}f._clean()}return o.count=a,n},j$10.prototype.getPolylineStartIndex=function(e){for(var t=this.polylines,i=0,n=t.length,r=0;r<n;++r){var o=t[r];if(o===e)break;i+=o._actualLength}return i};var ve$t={positions:void 0,lengths:void 0},Xe$f=new Array(1),Nr$4=new o$1p,Pr$4=new a$18,qe$e;function e$1I(e){e=u$Z(e,!0),this.value=e$1I.toValue(e)}function g$15(e){e=u$Z(e,{}),this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._rectangle=u$Z(e.rectangle,h$18.MAX_VALUE),this._projection=new n$1d(this._ellipsoid),this._numberOfLevelZeroTilesX=u$Z(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=u$Z(e.numberOfLevelZeroTilesY,1),this._customDPI=e.customDPI,this._scaleDenominators=e.scaleDenominators,this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._beginLevel=u$Z(e.beginLevel,0),this._orgin=u$Z(e.orgin,void 0)}j$10.prototype.getSegments=function(e,t){var i=e._actualPositions;if(this.mode===C$14.SCENE3D)return Xe$f[0]=i.length,ve$t.positions=i,ve$t.lengths=Xe$f,ve$t;We$k(e)&&(i=e._segments.positions);for(var n,r=t.ellipsoid,o=[],a=this.modelMatrix,s=i.length,l=Nr$4,u=0;u<s;++u)n=i[u],l=p$1d.multiplyByPoint(a,n,l),o.push(t.project(r.cartesianToCartographic(l,Pr$4)));if(o.length>0){e._boundingVolume2D=i$1d.fromPoints(o,e._boundingVolume2D);var c=e._boundingVolume2D.center;e._boundingVolume2D.center=new o$1p(c.z,c.x,c.y)}return ve$t.positions=o,ve$t.lengths=e._segments.lengths,ve$t},j$10.prototype.writeUpdate=function(e,t,i,n){var r=this.mode,o=n.ellipsoid.maximumRadius*e$2d.PI,a=t._actualLength;if(a){e+=this.getPolylineStartIndex(t);var s=qe$e,l=6*a*3;!e$2e(s)||s.length<l?s=qe$e=new Float32Array(l):s.length>l&&(s=new Float32Array(s.buffer,0,l));var u,c=this.getSegments(t,n),h=c.positions,d=c.lengths,f=0,p=0,_=0;a=h.length;for(var m=0;m<a;++m){0===m?t._loop?u=h[a-2]:(u=ce$v,o$1p.subtract(h[0],h[1],u),o$1p.add(h[0],u,u)):u=h[m-1],o$1p.clone(u,W$Z),o$1p.clone(h[m],D$X),m===a-1?t._loop?u=h[1]:(u=ce$v,o$1p.subtract(h[a-1],h[a-2],u),o$1p.add(h[a-1],u,u)):u=h[m+1],o$1p.clone(u,H$10);var g=d[p];m===_+g&&(_+=g,++p);var x=m-_==0,y=m===_+d[p]-1;r===C$14.SCENE2D&&(W$Z.z=0,D$X.z=0,H$10.z=0),(r===C$14.SCENE2D||r===C$14.MORPHING)&&(x||y)&&o-Math.abs(D$X.x)<1&&((D$X.x<0&&W$Z.x>0||D$X.x>0&&W$Z.x<0)&&o$1p.clone(D$X,W$Z),(D$X.x<0&&H$10.x>0||D$X.x>0&&H$10.x<0)&&o$1p.clone(D$X,H$10));for(var v=y?2:4,$=x?2:0;$<v;++$)i$12.writeElements(D$X,s,f),i$12.writeElements(W$Z,s,f+6),i$12.writeElements(H$10,s,f+12),f+=18}i.copyFromArrayView(s,18*Float32Array.BYTES_PER_ELEMENT*e)}},Object.defineProperties(e$1I.prototype,{componentDatatype:{get:function(){return S$14.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}}),e$1I.toValue=function(e,t){if(!e$2e(e))throw new t$15("show is required.");return e$2e(t)?(t[0]=e,t):new Uint8Array([e])},Object.defineProperties(g$15.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}},beginLevel:{get:function(){return this._beginLevel}},orgin:{get:function(){return this._orgin}}}),g$15.prototype.getNumberOfXTilesAtLevel=function(e){if(e$2e(this._customDPI)&&e$2e(this._scaleDenominators)){var t=this.calculateResolution(e),i=this._tileWidth*t.x;return Math.ceil(this._rectangle.width/i)}return this._numberOfLevelZeroTilesX<<e-this._beginLevel},g$15.prototype.getNumberOfYTilesAtLevel=function(e){if(e$2e(this._customDPI)&&e$2e(this._scaleDenominators)){var t=this.calculateResolution(e),i=this._tileHeight*t.y;return Math.ceil(this._rectangle.height/i)}return this._numberOfLevelZeroTilesY<<e-this._beginLevel},g$15.prototype.rectangleToNativeRectangle=function(e,t){o$1q.defined("rectangle",e);var i=e$2d.toDegrees(e.west),n=e$2d.toDegrees(e.south),r=e$2d.toDegrees(e.east),o=e$2d.toDegrees(e.north);return e$2e(t)?(t.west=i,t.south=n,t.east=r,t.north=o,t):new h$18(i,n,r,o)},g$15.prototype.tileXYToNativeRectangle=function(e,t,i,n){var r=this.tileXYToRectangle(e,t,i,n);return r.west=e$2d.toDegrees(r.west),r.south=e$2d.toDegrees(r.south),r.east=e$2d.toDegrees(r.east),r.north=e$2d.toDegrees(r.north),r},g$15.prototype.tileXYToRectangle=function(e,t,i,n){var r=this._rectangle,o=e$2e(this._orgin)?this._orgin.longitude:r.west,a=e$2e(this._orgin)?this._orgin.latitude:r.north;if(e$2e(this._customDPI)&&e$2e(this._scaleDenominators)){var s=this.calculateResolution(i),l=o+e*this._tileWidth*s.x,u=o+(e+1)*this._tileWidth*s.x,c=a-t*this._tileHeight*s.y,h=a-(t+1)*this._tileHeight*s.y;return e$2e(n)?(n.west=l,n.south=h,n.east=u,n.north=c,n):new h$18(l,h,u,c)}var d=this.getNumberOfXTilesAtLevel(i),f=this.getNumberOfYTilesAtLevel(i),p=r.width/d,_=(l=e*p+r.west,u=(e+1)*p+r.west,r.height/f);c=r.north-t*_,h=r.north-(t+1)*_;return e$2e(n)||(n=new h$18(l,h,u,c)),n.west=l,n.south=h,n.east=u,n.north=c,n},g$15.prototype.positionToTileXY=function(e,t,i){var n=this._rectangle;if(h$18.contains(n,e)){var r=this.getNumberOfXTilesAtLevel(t),o=this.getNumberOfYTilesAtLevel(t),a=e$2e(this._orgin)?this._orgin.longitude:n.west,s=e$2e(this._orgin)?this._orgin.latitude:n.north,l=n.width/r,u=n.height/o;if(e$2e(this._customDPI)&&e$2e(this._scaleDenominators)){var c=this.calculateResolution(t);l=this._tileWidth*c.x,u=this._tileHeight*c.y}var h=e.longitude;n.east<n.west&&(h+=e$2d.TWO_PI),e$2e(this._orgin)&&(r+=this._orgin.longitude!=n.west?Math.ceil((e.longitude-this._orgin.longitude)/l):0,o+=this._orgin.latitude!=n.north?Math.ceil((this._orgin.latitude-e.latitude)/u):0);var d=(h-a)/l|0;d>=r&&(d=r-1);var f=(s-e.latitude)/u|0;return f>=o&&(f=o-1),e$2e(i)?(i.x=d,i.y=f,i):new o$1o(d,f)}},g$15.prototype.calculateResolution=function(e){var t=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.x,i=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.y,n=t$12.WGS84.maximumRadius;return new o$1o(t/n,i/n)};var _$Q=new o$1p,M$_=new o$1p,C$_=new a$18,d$18=new o$1p,X$U=new o$1p,S$R=new i$1d,z$T=new g$15,c$Z=[new a$18,new a$18,new a$18,new a$18],g$14=new o$1o,e$1H={};function L$14(e){a$18.fromRadians(e.east,e.north,0,c$Z[0]),a$18.fromRadians(e.west,e.north,0,c$Z[1]),a$18.fromRadians(e.east,e.south,0,c$Z[2]),a$18.fromRadians(e.west,e.south,0,c$Z[3]);var t,i=0,n=0,r=0,o=0,a=e$1H._terrainHeightsMaxLevel;for(t=0;t<=a;++t){for(var s=!1,l=0;l<4;++l){var u=c$Z[l];if(z$T.positionToTileXY(u,t,g$14),0===l)r=g$14.x,o=g$14.y;else if(r!==g$14.x||o!==g$14.y){s=!0;break}}if(s)break;i=r,n=o}if(0!==t)return{x:i,y:n,level:t>a?a:t-1}}function t$N(e){this._ellipsoid=u$Z(e,t$12.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}e$1H.initialize=function(){var e=e$1H._initPromise;return e$2e(e)||(e=t$10.fetchJson(n$17("Assets/approximateTerrainHeights.json")).then((function(e){e$1H._terrainHeights=e})),e$1H._initPromise=e),e},e$1H.getMinimumMaximumHeights=function(e,t){if(o$1q.defined("rectangle",e),!e$2e(e$1H._terrainHeights))throw new t$15("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=u$Z(t,t$12.WGS84);var i=L$14(e),n=e$1H._defaultMinTerrainHeight,r=e$1H._defaultMaxTerrainHeight;if(e$2e(i)){var o=i.level+"-"+i.x+"-"+i.y,a=e$1H._terrainHeights[o];e$2e(a)&&(n=a[0],r=a[1]),t.cartographicToCartesian(h$18.northeast(e,C$_),_$Q),t.cartographicToCartesian(h$18.southwest(e,C$_),M$_),o$1p.midpoint(M$_,_$Q,d$18);var s=t.scaleToGeodeticSurface(d$18,X$U);if(e$2e(s)){var l=o$1p.distance(d$18,s);n=Math.min(n,-l)}else n=e$1H._defaultMinTerrainHeight}return{minimumTerrainHeight:n=Math.max(e$1H._defaultMinTerrainHeight,n),maximumTerrainHeight:r}},e$1H.getBoundingSphere=function(e,t){if(o$1q.defined("rectangle",e),!e$2e(e$1H._terrainHeights))throw new t$15("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=u$Z(t,t$12.WGS84);var i=L$14(e),n=e$1H._defaultMaxTerrainHeight;if(e$2e(i)){var r=i.level+"-"+i.x+"-"+i.y,o=e$1H._terrainHeights[r];e$2e(o)&&(n=o[1])}var a=i$1d.fromRectangle3D(e,t,0);return i$1d.fromRectangle3D(e,t,n,S$R),i$1d.union(a,S$R,a)},e$1H._terrainHeightsMaxLevel=6,e$1H._defaultMaxTerrainHeight=9e3,e$1H._defaultMinTerrainHeight=-1e5,e$1H._terrainHeights=void 0,e$1H._initPromise=void 0,Object.defineProperties(e$1H,{initialized:{get:function(){return e$2e(e$1H._terrainHeights)}}}),Object.defineProperties(t$N.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),t$N.mercatorAngleToGeodeticLatitude=function(e){return e$2d.PI_OVER_TWO-2*Math.atan(Math.exp(-e))},t$N.geodeticLatitudeToMercatorAngle=function(e){e>t$N.MaximumLatitude?e=t$N.MaximumLatitude:e<-t$N.MaximumLatitude&&(e=-t$N.MaximumLatitude);var t=Math.sin(e);return.5*Math.log((1+t)/(1-t))},t$N.MaximumLatitude=t$N.mercatorAngleToGeodeticLatitude(Math.PI),t$N.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=t$N.geodeticLatitudeToMercatorAngle(e.latitude)*i,o=e.height;return e$2e(t)?(t.x=n,t.y=r,t.z=o,t):new o$1p(n,r,o)},t$N.prototype.unproject=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=t$N.mercatorAngleToGeodeticLatitude(e.y*i),o=e.z;return e$2e(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new a$18(n,r,o)};var Ua$4=[n$1d,t$N],Gr$3=Ua$4.length,ur$5=Math.cos(e$2d.toRadians(30)),Sr$3=Math.cos(e$2d.toRadians(150)),wr$4=0,gr$4=1e3;function aa$5(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions;if(!e$2e(t)||t.length<2)throw new t$15("At least two positions are required.");if(e$2e(e.arcType)&&e.arcType!==m$1h.GEODESIC&&e.arcType!==m$1h.RHUMB)throw new t$15("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=u$Z(e.width,1),this._positions=t,this.granularity=u$Z(e.granularity,9999),this.loop=u$Z(e.loop,!1),this.arcType=u$Z(e.arcType,m$1h.GEODESIC),this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(aa$5.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+t$12.packedLength+1+1}}}),aa$5.setProjectionAndEllipsoid=function(e,t){for(var i=0,n=0;n<Gr$3;n++)if(t instanceof Ua$4[n]){i=n;break}e._projectionIndex=i,e._ellipsoid=t.ellipsoid};var jr$3=new o$1p,Er$4=new o$1p,dr$4=new o$1p;function Xa$4(e,t,i,n,r){var o=N$S(n,e,0,jr$3),a=N$S(n,e,i,Er$4),s=N$S(n,t,0,dr$4),l=H$$(a,o,Er$4),u=H$$(s,o,dr$4);return o$1p.cross(u,l,r),o$1p.normalize(r,r)}var an$4=new a$18,rn$6=new o$1p,nn$6=new o$1p,en$5=new o$1p;function Ya$4(e,t,i,n,r,o,a,s,l,u,c){if(0!==r){var h;o===m$1h.GEODESIC?h=new E$1t(e,t,a):o===m$1h.RHUMB&&(h=new P$15(e,t,a));var d=h.surfaceDistance;if(!(d<r))for(var f=Xa$4(e,t,n,a,en$5),p=Math.ceil(d/r),_=d/p,m=_,g=p-1,x=s.length,y=0;y<g;y++){var v=h.interpolateUsingSurfaceDistance(m,an$4),$=N$S(a,v,i,rn$6),b=N$S(a,v,n,nn$6);o$1p.pack(f,s,x),o$1p.pack($,l,x),o$1p.pack(b,u,x),c.push(v.latitude),c.push(v.longitude),x+=3,m+=_}}}var Da$4=new a$18;function N$S(e,t,i,n){return a$18.clone(t,Da$4),Da$4.height=i,a$18.toCartesian(Da$4,e,n)}function H$$(e,t,i){return o$1p.subtract(e,t,i),o$1p.normalize(i,i),i}function mr$3(e,t,i,n){return n=H$$(e,t,n),n=o$1p.cross(n,i,n),n=o$1p.normalize(n,n),n=o$1p.cross(i,n,n)}aa$5.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t);var n=u$Z(i,0),r=e._positions,o=r.length;t[n++]=o;for(var a=0;a<o;++a){var s=r[a];o$1p.pack(s,t,n),n+=3}return t[n++]=e.granularity,t[n++]=e.loop?1:0,t[n++]=e.arcType,t$12.pack(e._ellipsoid,t,n),n+=t$12.packedLength,t[n++]=e._projectionIndex,t[n++]=e._scene3DOnly?1:0,t},aa$5.unpack=function(e,t,i){o$1q.defined("array",e);for(var n=u$Z(t,0),r=e[n++],o=new Array(r),a=0;a<r;a++)o[a]=o$1p.unpack(e,n),n+=3;var s=e[n++],l=1===e[n++],u=e[n++],c=t$12.unpack(e,n);n+=t$12.packedLength;var h=e[n++],d=1===e[n++];if(!e$2e(i)){var f=new aa$5({positions:o,granularity:s,loop:l,arcType:u,ellipsoid:c});return f._projectionIndex=h,f._scene3DOnly=d,f}return i._positions=o,i.granularity=s,i.loop=l,i.arcType=u,i._ellipsoid=c,i._projectionIndex=h,i._scene3DOnly=d,i};var cn$4=new o$1p,tn$6=new o$1p,on$4=new o$1p,Or$3=new o$1p,vn$4=0,pn$4=-1;function Ja$4(e,t,i,n,r){var o=H$$(i,t,Or$3),a=mr$3(e,t,o,cn$4),s=mr$3(n,t,o,tn$6);if(e$2d.equalsEpsilon(o$1p.dot(a,s),pn$4,e$2d.EPSILON5))return r=o$1p.cross(o,a,r),r=o$1p.normalize(r,r);r=o$1p.add(s,a,r),r=o$1p.normalize(r,r);var l=o$1p.cross(o,r,on$4);return o$1p.dot(s,l)<vn$4&&(r=o$1p.negate(r,r)),r}var ka$3=o$1m.fromPointNormal(o$1p.ZERO,o$1p.UNIT_Y),sn$5=new o$1p,fn$4=new o$1p,hn$5=new o$1p,ln$5=new o$1p,un$5=new o$1p,Aa$3=new o$1p,Ra$4=new a$18,Cr$4=new a$18,Ir$6=new a$18;aa$5.createGeometry=function(e){var t,i,n=!e._scene3DOnly,r=e.loop,o=e._ellipsoid,a=e.granularity,s=e.arcType,l=new Ua$4[e._projectionIndex](o),u=wr$4,c=gr$4,h=e._positions,d=h.length;2===d&&(r=!1);var f,p,_,m,g,x,y,v=new P$15(void 0,void 0,o),$=[h[0]];for(i=0;i<d-1;i++)f=h[i],p=h[i+1],e$2e(g=g$1j.lineSegmentPlane(f,p,ka$3,Aa$3))&&!o$1p.equalsEpsilon(g,f,e$2d.EPSILON7)&&!o$1p.equalsEpsilon(g,p,e$2d.EPSILON7)&&(e.arcType===m$1h.GEODESIC?$.push(o$1p.clone(g)):e.arcType===m$1h.RHUMB&&(y=o.cartesianToCartographic(g,Ra$4).longitude,_=o.cartesianToCartographic(f,Ra$4),m=o.cartesianToCartographic(p,Cr$4),v.setEndPoints(_,m),x=v.findIntersectionWithLongitude(y,Ir$6),e$2e(g=o.cartographicToCartesian(x,Aa$3))&&!o$1p.equalsEpsilon(g,f,e$2d.EPSILON7)&&!o$1p.equalsEpsilon(g,p,e$2d.EPSILON7)&&$.push(o$1p.clone(g)))),$.push(p);r&&(f=h[d-1],p=h[0],e$2e(g=g$1j.lineSegmentPlane(f,p,ka$3,Aa$3))&&!o$1p.equalsEpsilon(g,f,e$2d.EPSILON7)&&!o$1p.equalsEpsilon(g,p,e$2d.EPSILON7)&&(e.arcType===m$1h.GEODESIC?$.push(o$1p.clone(g)):e.arcType===m$1h.RHUMB&&(y=o.cartesianToCartographic(g,Ra$4).longitude,_=o.cartesianToCartographic(f,Ra$4),m=o.cartesianToCartographic(p,Cr$4),v.setEndPoints(_,m),x=v.findIntersectionWithLongitude(y,Ir$6),e$2e(g=o.cartographicToCartesian(x,Aa$3))&&!o$1p.equalsEpsilon(g,f,e$2d.EPSILON7)&&!o$1p.equalsEpsilon(g,p,e$2d.EPSILON7)&&$.push(o$1p.clone(g)))));var b=$.length,T=new Array(b);for(i=0;i<b;i++){var C=a$18.fromCartesian($[i],o);C.height=0,T[i]=C}if(!((b=(T=D$13(T,a$18.equalsEpsilon)).length)<2)){var S=[],w=[],E=[],P=[],A=sn$5,L=fn$4,M=hn$5,R=ln$5,O=un$5,D=T[0],I=T[1];for(A=N$S(o,T[b-1],u,A),R=N$S(o,I,u,R),L=N$S(o,D,u,L),M=N$S(o,D,c,M),O=r?Ja$4(A,L,M,R,O):Xa$4(D,I,c,o,O),o$1p.pack(O,w,0),o$1p.pack(L,E,0),o$1p.pack(M,P,0),S.push(D.latitude),S.push(D.longitude),Ya$4(D,I,u,c,a,s,o,w,E,P,S),i=1;i<b-1;++i){A=o$1p.clone(L,A),L=o$1p.clone(R,L);var F=T[i];N$S(o,F,c,M),N$S(o,T[i+1],u,R),Ja$4(A,L,M,R,O),t=w.length,o$1p.pack(O,w,t),o$1p.pack(L,E,t),o$1p.pack(M,P,t),S.push(F.latitude),S.push(F.longitude),Ya$4(T[i],T[i+1],u,c,a,s,o,w,E,P,S)}var B=T[b-1],N=T[b-2];if(L=N$S(o,B,u,L),M=N$S(o,B,c,M),r){var G=T[0];O=Ja$4(A=N$S(o,N,u,A),L,M,R=N$S(o,G,u,R),O)}else O=Xa$4(N,B,c,o,O);if(t=w.length,o$1p.pack(O,w,t),o$1p.pack(L,E,t),o$1p.pack(M,P,t),S.push(B.latitude),S.push(B.longitude),r){for(Ya$4(B,D,u,c,a,s,o,w,E,P,S),t=w.length,i=0;i<3;++i)w[t+i]=w[i],E[t+i]=E[i],P[t+i]=P[i];S.push(D.latitude),S.push(D.longitude)}return Wn$1(r,l,E,P,w,S,n)}};var Sn$3=new o$1p,wn$3=new p$1e,gn$4=new n$15;function Tr$5(e,t,i,n){var r=H$$(i,t,Sn$3),o=o$1p.dot(r,e);if(o>ur$5||o<Sr$3){var a=H$$(n,i,Or$3),s=o<Sr$3?e$2d.PI_OVER_TWO:-e$2d.PI_OVER_TWO,l=n$15.fromAxisAngle(a,s,gn$4),u=p$1e.fromQuaternion(l,wn$3);return p$1e.multiplyByVector(u,e,e),!0}return!1}var Lr$4=new a$18,En$4=new o$1p,_r$4=new o$1p;function da$1(e,t,i,n,r){var o=a$18.toCartesian(t,e._ellipsoid,En$4),a=o$1p.add(o,i,_r$4),s=!1,l=e._ellipsoid,u=l.cartesianToCartographic(a,Lr$4);Math.abs(t.longitude-u.longitude)>e$2d.PI_OVER_TWO&&(s=!0,a=o$1p.subtract(o,i,_r$4),u=l.cartesianToCartographic(a,Lr$4)),u.height=0;var c=e.project(u,r);return(r=o$1p.subtract(c,n,r)).z=0,r=o$1p.normalize(r,r),s&&o$1p.negate(r,r),r}var dn$4=new o$1p,kr$4=new o$1p;function Ar$3(e,t,i,n,r,o){var a=o$1p.subtract(t,e,dn$4);o$1p.normalize(a,a);var s=i-wr$4,l=o$1p.multiplyByScalar(a,s,kr$4);o$1p.add(e,l,r);var u=n-gr$4;l=o$1p.multiplyByScalar(a,u,kr$4),o$1p.add(t,l,o)}var mn$4=new o$1p;function Na$2(e,t){var i=o$1m.getPointDistance(ka$3,e),n=o$1m.getPointDistance(ka$3,t),r=mn$4;e$2d.equalsEpsilon(i,0,e$2d.EPSILON2)?(r=H$$(t,e,r),o$1p.multiplyByScalar(r,e$2d.EPSILON2,r),o$1p.add(e,r,e)):e$2d.equalsEpsilon(n,0,e$2d.EPSILON2)&&(r=H$$(e,t,r),o$1p.multiplyByScalar(r,e$2d.EPSILON2,r),o$1p.add(t,r,t))}function On$3(e,t){var i=Math.abs(e.longitude),n=Math.abs(t.longitude);if(e$2d.equalsEpsilon(i,e$2d.PI,e$2d.EPSILON11)){var r=e$2d.sign(t.longitude);return e.longitude=r*(i-e$2d.EPSILON11),1}if(e$2d.equalsEpsilon(n,e$2d.PI,e$2d.EPSILON11)){var o=e$2d.sign(e.longitude);return t.longitude=o*(n-e$2d.EPSILON11),2}return 0}var Rr$2=new a$18,Nr$3=new a$18,Pr$3=new o$1p,Ka$4=new o$1p,Fr$3=new o$1p,br$2=new o$1p,Cn$1=new o$1p,Mr$5=new o$1p,In$1=[Rr$2,Nr$3],Tn$4=new h$18,Ln$3=new o$1p,_n$4=new o$1p,kn$2=new o$1p,An$2=new o$1p,Rn$3=new o$1p,Nn$2=new o$1p,Qa$4=new o$1p,$a$4=new o$1p,Pn$2=new o$1p,Fn$2=new o$1p,bn$2=new o$1p,xr$5=new o$1p,Mn$2=new o$1p,xn$2=new o$1p,zn$1=new i$12,qn$1=new i$12,zr$5=new o$1p,yn$2=new o$1p,qr$2=new o$1p,Vn$1=[new i$1d,new i$1d],yr$3=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Vr$3=yr$3.length;function Wn$1(e,t,i,n,r,o,a){var s,l,u,c,h,d,f=t._ellipsoid,p=i.length/3-1,_=8*p,m=4*_,g=36*p,x=_>65535?new Uint32Array(g):new Uint16Array(g),y=new Float64Array(3*_),v=new Float32Array(m),$=new Float32Array(m),b=new Float32Array(m),T=new Float32Array(m),C=new Float32Array(m);a&&(u=new Float32Array(m),c=new Float32Array(m),h=new Float32Array(m),d=new Float32Array(2*_));var S=o.length/2,w=0,E=Rr$2;E.height=0;var P=Nr$3;P.height=0;var A=Pr$3,L=Ka$4;if(a)for(l=0,s=1;s<S;s++)E.latitude=o[l],E.longitude=o[l+1],P.latitude=o[l+2],P.longitude=o[l+3],A=t.project(E,A),L=t.project(P,L),w+=o$1p.distance(A,L),l+=2;var M=n.length/3;L=o$1p.unpack(n,0,L);var R,O=0;for(l=3,s=1;s<M;s++)A=o$1p.clone(L,A),L=o$1p.unpack(n,l,L),O+=o$1p.distance(A,L),l+=3;l=3;var D=0,I=0,F=0,B=0,N=!1,G=o$1p.unpack(i,0,br$2),z=o$1p.unpack(n,0,Ka$4),U=o$1p.unpack(r,0,Mr$5);e&&(Tr$5(U,o$1p.unpack(i,i.length-6,Fr$3),G,z)&&(U=o$1p.negate(U,U)));var V=0,k=0,W=0;for(s=0;s<p;s++){var H,q,j,X,Y=o$1p.clone(G,Fr$3),Z=o$1p.clone(z,Pr$3),K=o$1p.clone(U,Cn$1);if(N&&(K=o$1p.negate(K,K)),G=o$1p.unpack(i,l,br$2),z=o$1p.unpack(n,l,Ka$4),N=Tr$5(U=o$1p.unpack(r,l,Mr$5),Y,G,z),E.latitude=o[D],E.longitude=o[D+1],P.latitude=o[D+2],P.longitude=o[D+3],a){var Q=On$3(E,P);H=t.project(E,Rn$3);var J=H$$(q=t.project(P,Nn$2),H,zr$5);J.y=Math.abs(J.y),j=Qa$4,X=$a$4,0===Q||o$1p.dot(J,o$1p.UNIT_Y)>ur$5?(j=da$1(t,E,K,H,Qa$4),X=da$1(t,P,U,q,$a$4)):1===Q?(X=da$1(t,P,U,q,$a$4),j.x=0,j.y=e$2d.sign(E.longitude-Math.abs(P.longitude)),j.z=0):(j=da$1(t,E,K,H,Qa$4),X.x=0,X.y=e$2d.sign(E.longitude-P.longitude),X.z=0)}var ee=o$1p.distance(Z,z),te=i$12.fromCartesian(Y,zn$1),ie=o$1p.subtract(G,Y,Pn$2),ne=o$1p.normalize(ie,xr$5),re=o$1p.subtract(Z,Y,Fn$2);re=o$1p.normalize(re,re);var oe=o$1p.cross(ne,re,xr$5);oe=o$1p.normalize(oe,oe);var ae=o$1p.cross(re,K,Mn$2);ae=o$1p.normalize(ae,ae);var se=o$1p.subtract(z,G,bn$2);se=o$1p.normalize(se,se);var le=o$1p.cross(U,se,xn$2);le=o$1p.normalize(le,le);var ue,ce,he,de=ee/O,fe=V/O,pe=0,_e=0,me=0;if(a){pe=o$1p.distance(H,q),ue=i$12.fromCartesian(H,qn$1),ce=o$1p.subtract(q,H,zr$5);var ge=(he=o$1p.normalize(ce,yn$2)).x;he.x=he.y,he.y=-ge,_e=pe/w,me=k/w}for(R=0;R<8;R++){var xe=B+4*R,ye=I+2*R,ve=xe+3,$e=R<4?1:-1,be=2===R||3===R||6===R||7===R?1:-1;o$1p.pack(te.high,v,xe),v[ve]=ie.x,o$1p.pack(te.low,$,xe),$[ve]=ie.y,o$1p.pack(ae,b,xe),b[ve]=ie.z,o$1p.pack(le,T,xe),T[ve]=de*$e,o$1p.pack(oe,C,xe);var Te=fe*be;0===Te&&be<0&&(Te=Number.POSITIVE_INFINITY),C[ve]=Te,a&&(u[xe]=ue.high.x,u[xe+1]=ue.high.y,u[xe+2]=ue.low.x,u[xe+3]=ue.low.y,h[xe]=-j.y,h[xe+1]=j.x,h[xe+2]=X.y,h[xe+3]=-X.x,c[xe]=ce.x,c[xe+1]=ce.y,c[xe+2]=he.x,c[xe+3]=he.y,d[ye]=_e*$e,0===(Te=me*be)&&be<0&&(Te=Number.POSITIVE_INFINITY),d[ye+1]=Te)}var Ce=kn$2,Se=An$2,we=Ln$3,Ee=_n$4,Pe=h$18.fromCartographicArray(In$1,Tn$4),Ae=e$1H.getMinimumMaximumHeights(Pe,f),Le=Ae.minimumTerrainHeight,Me=Ae.maximumTerrainHeight;W+=Le,W+=Me,Ar$3(Y,Z,Le,Me,Ce,we),Ar$3(G,z,Le,Me,Se,Ee);var Re=o$1p.multiplyByScalar(oe,e$2d.EPSILON5,qr$2);o$1p.add(Ce,Re,Ce),o$1p.add(Se,Re,Se),o$1p.add(we,Re,we),o$1p.add(Ee,Re,Ee),Na$2(Ce,Se),Na$2(we,Ee),o$1p.pack(Ce,y,F),o$1p.pack(Se,y,F+3),o$1p.pack(Ee,y,F+6),o$1p.pack(we,y,F+9),Re=o$1p.multiplyByScalar(oe,-2*e$2d.EPSILON5,qr$2),o$1p.add(Ce,Re,Ce),o$1p.add(Se,Re,Se),o$1p.add(we,Re,we),o$1p.add(Ee,Re,Ee),Na$2(Ce,Se),Na$2(we,Ee),o$1p.pack(Ce,y,F+12),o$1p.pack(Se,y,F+15),o$1p.pack(Ee,y,F+18),o$1p.pack(we,y,F+21),D+=2,l+=3,I+=16,F+=24,B+=32,V+=ee,k+=pe}l=0;var Oe=0;for(s=0;s<p;s++){for(R=0;R<Vr$3;R++)x[l+R]=yr$3[R]+Oe;Oe+=8,l+=Vr$3}var De=Vn$1;i$1d.fromVertices(i,o$1p.ZERO,3,De[0]),i$1d.fromVertices(n,o$1p.ZERO,3,De[1]);var Ie=i$1d.fromBoundingSpheres(De);Ie.radius+=W/(2*p);var Fe={position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,normalize:!1,values:y}),startHiAndForwardOffsetX:ra$5(v),startLoAndForwardOffsetY:ra$5($),startNormalAndForwardOffsetZ:ra$5(b),endNormalAndTextureCoordinateNormalizationX:ra$5(T),rightNormalAndTextureCoordinateNormalizationY:ra$5(C)};return a&&(Fe.startHiLo2D=ra$5(u),Fe.offsetAndRight2D=ra$5(c),Fe.startEndNormals2D=ra$5(h),Fe.texcoordNormalization2D=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,normalize:!1,values:d})),new I$1p({attributes:Fe,indices:x,boundingSphere:Ie})}function ra$5(e){return new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}function o$13(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).componentDatatype))throw new t$15("options.componentDatatype is required.");if(!e$2e(e.componentsPerAttribute))throw new t$15("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new t$15("options.componentsPerAttribute must be between 1 and 4.");if(!e$2e(e.value))throw new t$15("options.value is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=u$Z(e.normalize,!1),this.value=e.value}aa$5._projectNormal=da$1;var Q$X='#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC; // Technically can compute distance for this here\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n\nvoid main(void)\n{\n float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_globeDepthTextureDim.xy)));\n vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\n\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n gl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n\n float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\n\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n gl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n // Check distance of the eye coordinate against start and end planes with normals in the right plane.\n // For computing unskewed lengthwise texture coordinate.\n // Can also be used for clipping extremely pointy miters, but in practice unnecessary because of miter breaking.\n\n // aligned plane: cross the right plane normal with miter plane normal, then cross the result with right again to point it more "forward"\n vec3 alignedPlaneNormal;\n\n // start aligned plane\n alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\n alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\n\n // end aligned plane\n alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\n alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n\n#ifdef PER_INSTANCE_COLOR\n gl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\n // Clamp - distance to aligned planes may be negative due to mitering,\n // so fragment texture coordinate might be out-of-bounds.\n float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\n s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\n float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\n\n czm_materialInput materialInput;\n\n materialInput.s = s;\n materialInput.st = vec2(s, t);\n materialInput.str = vec3(s, t, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n\n czm_writeDepthClampedToFarPlane();\n}\n',W$Y="varying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\n\nfloat rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {\n // We don't expect the ray to ever be parallel to the plane\n return (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);\n}\n\nvoid main(void)\n{\n vec4 eyeCoordinate = gl_FragCoord;\n eyeCoordinate /= eyeCoordinate.w;\n\n#ifdef PER_INSTANCE_COLOR\n gl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\n // Use distances for planes aligned with segment to prevent skew in dashing\n float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);\n float distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);\n\n // Clamp - distance to aligned planes may be negative due to mitering\n distanceFromStart = max(0.0, distanceFromStart);\n distanceFromEnd = max(0.0, distanceFromEnd);\n\n float s = distanceFromStart / (distanceFromStart + distanceFromEnd);\n s = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;\n\n czm_materialInput materialInput;\n\n materialInput.s = s;\n materialInput.st = vec2(s, v_texcoordT);\n materialInput.str = vec3(s, v_texcoordT, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n}\n",Y$L='attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\n\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\n\nattribute float batchId;\n\nvarying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n\n// For materials\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\n\n// Morphing planes using SLERP or NLERP doesn\'t seem to work, so instead draw the material directly on the shadow volume.\n// Morph views are from very far away and aren\'t meant to be used precisely, so this should be sufficient.\nvoid main()\n{\n v_batchId = batchId;\n\n // Start position\n vec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));\n vec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);\n vec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\n vec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\n vec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\n vec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\n\n // Start plane\n vec4 startPlane2D;\n vec4 startPlane3D;\n startPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\n startPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlane2D.w = -dot(startPlane2D.xyz, posEc2D);\n startPlane3D.w = -dot(startPlane3D.xyz, posEc3D);\n\n // Right plane\n vec4 rightPlane2D;\n vec4 rightPlane3D;\n rightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\n rightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n rightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);\n rightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);\n\n // End position\n posRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);\n posRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);\n posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\n posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\n posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\n vec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\n vec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));\n vec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));\n\n // End plane\n vec4 endPlane2D;\n vec4 endPlane3D;\n endPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\n endPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlane2D.w = -dot(endPlane2D.xyz, posEc2D);\n endPlane3D.w = -dot(endPlane3D.xyz, posEc3D);\n\n // Forward direction\n v_forwardDirectionEC = normalize(endEC - startEC);\n\n vec2 cleanTexcoordNormalization2D;\n cleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);\n cleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));\n vec2 cleanTexcoordNormalization3D;\n cleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n cleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;\n cleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));\n\n v_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#else // PER_INSTANCE_COLOR\n // For computing texture coordinates\n\n v_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);\n v_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);\n#endif // PER_INSTANCE_COLOR\n\n#ifdef WIDTH_VARYING\n float width = czm_batchTable_width(batchId);\n float halfWidth = width * 0.5;\n v_width = width;\n v_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#else\n float halfWidth = 0.5 * czm_batchTable_width(batchId);\n v_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#endif\n\n // Compute a normal along which to "push" the position out, extending the miter depending on view distance.\n // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.\n // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.\n // Since this is morphing, compute both 3D and 2D positions and then blend.\n\n // ****** 3D ******\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow); // w = 1.0, see czm_computePosition\n float absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);\n vec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Nudge the top vertex upwards to prevent flickering\n vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));\n geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);\n geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\n positionEc3D.xyz += geodeticSurfaceNormal;\n\n // Determine if this vertex is on the "left" or "right"\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n\n // A "perfect" implementation would push along normals according to the angle against forward.\n // In practice, just pushing the normal out by halfWidth is sufficient for morph views.\n positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)\n\n // ****** 2D ******\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); // w = 1.0, see czm_computePosition\n absStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));\n absEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));\n planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);\n upOrDown = normalize(cross(rightPlane2D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Nudge the top vertex upwards to prevent flickering\n geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));\n geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);\n geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\n positionEc2D.xyz += geodeticSurfaceNormal;\n\n // Determine if this vertex is on the "left" or "right"\n normalEC *= sign(texcoordNormalization2D.x);\n#ifndef PER_INSTANCE_COLOR\n // Use vertex\'s sidedness to compute its texture coordinate.\n v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);\n#endif\n\n // A "perfect" implementation would push along normals according to the angle against forward.\n // In practice, just pushing the normal out by halfWidth is sufficient for morph views.\n positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)\n\n // Blend for actual position\n gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);\n\n#ifdef ANGLE_VARYING\n // Approximate relative screen space direction of the line.\n vec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));\n approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\n v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n',q$10='attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\n\n// In 2D and in 3D, texture coordinate normalization component signs encodes:\n// * X sign - sidedness relative to right plane\n// * Y sign - is negative OR magnitude is greater than 1.0 if vertex is on bottom of volume\n#ifndef COLUMBUS_VIEW_2D\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\n#else\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\n#endif\n\nattribute float batchId;\n\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n\n// For materials\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n\nvoid main()\n{\n#ifdef COLUMBUS_VIEW_2D\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;\n\n vec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);\n vec3 ecEnd = forwardDirectionEC + ecStart;\n forwardDirectionEC = normalize(forwardDirectionEC);\n\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n\n v_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);\n v_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;\n\n#else // COLUMBUS_VIEW_2D\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\n vec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\n vec3 ecEnd = ecStart + offset;\n\n vec3 forwardDirectionEC = normalize(offset);\n\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n\n v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n\n#endif // COLUMBUS_VIEW_2D\n\n v_endEcAndStartEcX.xyz = ecEnd;\n v_endEcAndStartEcX.w = ecStart.x;\n v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#endif // PER_INSTANCE_COLOR\n\n // Compute a normal along which to "push" the position out, extending the miter depending on view distance.\n // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.\n // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.\n vec4 positionRelativeToEye = czm_computePosition();\n\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye; // w = 1.0, see czm_computePosition\n float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\n vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Extrude bottom vertices downward for far view distances, like for GroundPrimitives\n upOrDown = cross(forwardDirectionEC, normalEC);\n upOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;\n upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\n upOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;\n positionEC.xyz += upOrDown;\n\n v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\n\n // Determine distance along normalEC to push for a volume of appropriate width.\n // Make volumes about double pixel width for a conservative fit - in practice the\n // extra cost here is minimal compared to the loose volume heights.\n //\n // N = normalEC (guaranteed "right-facing")\n // R = rightEC\n // p = angle between N and R\n // w = distance to push along R if R == N\n // d = distance to push along N\n //\n // N R\n // { p| } * cos(p) = dot(N, R) = w / d\n // d | |w * d = w / dot(N, R)\n // { | }\n // o---------- polyline segment ----\x3e\n //\n float width = czm_batchTable_width(batchId);\n#ifdef WIDTH_VARYING\n v_width = width;\n#endif\n\n v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\n v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\n\n v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\n v_endPlaneNormalEcAndBatchId.w = batchId;\n\n width = width * max(0.0, czm_metersPerPixel(positionEC)); // width = distance to push along R\n width = width / dot(normalEC, v_rightPlaneEC.xyz); // width = distance to push along N\n\n // Determine if this vertex is on the "left" or "right"\n#ifdef COLUMBUS_VIEW_2D\n normalEC *= sign(texcoordNormalization2D.x);\n#else\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n#endif\n\n positionEC.xyz += width * normalEC;\n gl_Position = czm_depthClampFarPlane(czm_projection * positionEC);\n\n#ifdef ANGLE_VARYING\n // Approximate relative screen space direction of the line.\n vec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));\n approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\n v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n',e$1G={TERRAIN:0,CESIUM_3D_TILE:1,S3M_TILE:2,BOTH:3,NUMBER_OF_CLASSIFICATION_TYPES:4},_0x2b86ba=Object.freeze(e$1G),l$Z="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec4 color;\nattribute float batchId;\n\nvarying vec4 v_color;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = czm_computePosition();\n vec4 prev = czm_computePrevPosition();\n vec4 next = czm_computeNextPosition();\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n\n v_color = color;\n}\n",o$12=Z$_+"\n"+l$Z,p$W=d$1c;function e$1F(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.translucent,!0),i=e$1F.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=u$Z(e.vertexShaderSource,o$12),this._fragmentShaderSource=u$Z(e.fragmentShaderSource,p$W),this._renderState=a$S.getDefaultRenderState(t,false,e.renderState),this._closed=false,this._vertexFormat=i,this.name="PolylineColorAppearance"}s$Z.isInternetExplorer()||(o$12="#define CLIP_POLYLINE \n"+o$12),Object.defineProperties(e$1F.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),e$1F.VERTEX_FORMAT=n$13.POSITION_ONLY,e$1F.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,e$1F.prototype.isTranslucent=a$S.prototype.isTranslucent,e$1F.prototype.getRenderState=a$S.prototype.getRenderState;var t$M={CESIUM_3D_TILE_MASK:128,S3M_TILE:2,MODEL:6,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15,setCesium3DTileBit:function(){return{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.REPLACE},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.REPLACE},reference:t$M.CESIUM_3D_TILE_MASK,mask:t$M.CESIUM_3D_TILE_MASK}}},u$M=Object.freeze(t$M);function g$13(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;var t=e.appearance;e$2e(t)||(t=new r$X),this.appearance=t,this.show=u$Z(e.show,!0),this.classificationType=u$Z(e.classificationType,_0x2b86ba.BOTH),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this._debugShowShadowVolume=u$Z(e.debugShowShadowVolume,!1),this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:u$Z(e.interleave,!0),releaseGeometryInstances:u$Z(e.releaseGeometryInstances,!0),allowPicking:u$Z(e.allowPicking,!0),asynchronous:u$Z(e.asynchronous,!0),compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=G$16(0),this._renderState3DTiles=G$16(1),this._renderStateS3M=G$16(2),this._renderStateMorph=d$1m.fromCache({cull:{enabled:!0,face:G$1a.FRONT},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND,depthMask:!1}),this._polygonEntityId=u$Z(e.polygonEntityId,void 0)}function Z$W(e,t,i){var n=t.context,r=e._primitive,o=r._attributeLocations,a=r._batchTable.getVertexShaderCallback()(q$10);a=y$R._appendShowToShader(r,a),a=y$R._appendDistanceDisplayConditionToShader(r,a),a=y$R._modifyShaderPosition(e,a,t.scene3DOnly);var s=r._batchTable.getVertexShaderCallback()(Y$L);s=y$R._appendShowToShader(r,s),s=y$R._appendDistanceDisplayConditionToShader(r,s),s=y$R._modifyShaderPosition(e,s,t.scene3DOnly);var l=r._batchTable.getVertexShaderCallback()(Q$X),u=["GLOBE_MINIMUM_ALTITUDE "+t.mapProjection.ellipsoid.minimumRadius.toFixed(1)],c="",h="";e$2e(i.material)?(-1!==(h=e$2e(i.material)?i.material.shaderSource:"").search(/varying\s+float\s+v_polylineAngle;/g)&&u.push("ANGLE_VARYING"),-1!==h.search(/varying\s+float\s+v_width;/g)&&u.push("WIDTH_VARYING")):c="PER_INSTANCE_COLOR",u.push(c);var d=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",c]:[c],f=new s$V({defines:u,sources:[a],name:"PolylineShadowVolumeVS"}),p=new s$V({defines:d,sources:[h,l],name:"PolylineShadowVolumeFS"});e._sp=r$14.replaceCache({context:n,shaderProgram:r._sp,vertexShaderSource:f,fragmentShaderSource:p,attributeLocations:o});var _=n.shaderCache.getDerivedShaderProgram(e._sp,"2dColor");if(!e$2e(_)){var m=new s$V({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[a]});_=n.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:n,shaderProgram:e._sp2D,vertexShaderSource:m,fragmentShaderSource:p,attributeLocations:o})}e._sp2D=_;var g=n.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor");if(!e$2e(g)){var x=new s$V({defines:u.concat(["MAX_TERRAIN_HEIGHT "+e$1H._defaultMaxTerrainHeight.toFixed(1)]),sources:[s]}),y=new s$V({defines:d,sources:[h,l=r._batchTable.getVertexShaderCallback()(W$Y)]});g=n.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:n,shaderProgram:e._spMorph,vertexShaderSource:x,fragmentShaderSource:y,attributeLocations:o})}e._spMorph=g}function G$16(e){return d$1m.fromCache({cull:{enabled:!0},blending:Ee$r.ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e>0,frontFunction:m$Z.EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.KEEP},backFunction:m$Z.EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.KEEP},reference:2===e?u$M.S3M_TILE:u$M.CESIUM_3D_TILE_MASK,mask:u$M.CLASSIFICATION_MASK}})}function $$U(e,t,i,n,r,o){var a=e._primitive,s=a._va.length;r.length=s,o.length=s;for(var l=t instanceof e$1F?{}:i._uniforms,u=a._batchTable.getUniformMapCallback()(l),c=0;c<s;c++){var h=a._va[c],d=r[c];e$2e(d)||(d=r[c]=new i$$({owner:e,primitiveType:a._primitiveType})),d.vertexArray=h,d.renderState=e._renderState,d.shaderProgram=e._sp,d.uniformMap=u,d.pass=Le$q.TERRAIN_CLASSIFICATION,d.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";var f=i$$.shallowClone(d,d.derivedCommands.tileset);f.renderState=e._renderState3DTiles,f.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=f;var p=i$$.shallowClone(d,d.derivedCommands.S3M);p.renderState=e._renderStateS3M,p.pass=Le$q.ClampObject,d.derivedCommands.S3M=p;var _=i$$.shallowClone(d,d.derivedCommands.color2D);_.shaderProgram=e._sp2D,d.derivedCommands.color2D=_;var m=i$$.shallowClone(f,f.derivedCommands.color2D);m.shaderProgram=e._sp2D,f.derivedCommands.color2D=m;var g=i$$.shallowClone(p,p.derivedCommands.color2D);g.shaderProgram=e._sp2D,p.derivedCommands.color2D=g;var x=i$$.shallowClone(d,d.derivedCommands.colorMorph);x.renderState=e._renderStateMorph,x.shaderProgram=e._spMorph,x.pickId="czm_batchTable_pickColor(v_batchId)",d.derivedCommands.colorMorph=x}}function L$13(e,t,i,n,r,o,a){i.mode===C$14.MORPHING?t=t.derivedCommands.colorMorph:i.mode!==C$14.SCENE3D&&(t=t.derivedCommands.color2D),t&&(t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t))}function ee$w(e,t,i,n,r,o,a){var s,l=e._primitive;y$R._updateBoundingVolumes(l,t,r),t.mode===C$14.SCENE3D?s=l._boundingSphereWC:t.mode===C$14.COLUMBUS_VIEW?s=l._boundingSphereCV:t.mode===C$14.SCENE2D&&e$2e(l._boundingSphere2D)?s=l._boundingSphere2D:e$2e(l._boundingSphereMorph)&&(s=l._boundingSphereMorph);var u=t.mode===C$14.MORPHING,c=e.classificationType,h=c===_0x2b86ba.TERRAIN,d=c===_0x2b86ba.S3M_TILE,f=c===_0x2b86ba.CESIUM_3D_TILE&&!u;c===_0x2b86ba.BOTH&&(h=!0,d=!0,f=!0);var p=t.passes;if(p.render||p.pick&&l.allowPicking)for(var _=i.length,m=0;m<_;++m){var g=s[m];h&&L$13(e,i[m],t,r,o,g,a),f&&L$13(e,i[m].derivedCommands.tileset,t,r,o,g,a),d&&L$13(e,i[m].derivedCommands.S3M,t,r,o,g,a)}}function n$X(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new o$1h,this.setCallback(e,t)}function L$12(e){return Array.isArray(e)&&(e=new e$1M(e)),new e$1L(e)}function l$Y(e){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=e$1X.BLACK,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this._definitionChanged=new o$1h,this._fromDataSource=!1,this.groundBottomAltitude=void 0,this.groundExtrudedHeight=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function E$10(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}Object.defineProperties(g$13.prototype,{interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}}),g$13.initializeTerrainHeights=function(){return e$1H.initialize()},g$13.prototype.update=function(e){if(e$2e(this._primitive)||e$2e(this.geometryInstances)){if(!e$1H.initialized){if(!this.asynchronous)throw new t$15("For synchronous GroundPolylinePrimitives, you must call GroundPolylinePrimitives.initializeTerrainHeights() and wait for the returned promise to resolve.");return void g$13.initializeTerrainHeights()}var t,i=this,n=this._primitiveOptions;if(!e$2e(this._primitive)){var r,o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],a=o.length,s=new Array(a);for(t=0;t<a;++t)if(!e$2e(r=o[t].attributes)||!e$2e(r.color)){this._hasPerInstanceColors=!1;break}for(t=0;t<a;++t){var l=o[t];r={};var u=l.attributes;for(var c in u)u.hasOwnProperty(c)&&(r[c]=u[c]);e$2e(r.width)||(r.width=new o$13({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,value:[l.geometry.width]})),l.geometry._scene3DOnly=e.scene3DOnly,aa$5.setProjectionAndEllipsoid(l.geometry,e.mapProjection),s[t]=new d$1o({geometry:l.geometry,attributes:r,id:l.id,pickPrimitive:i})}n.geometryInstances=s,n.appearance=this.appearance,n._createShaderProgramFunction=function(e,t,n){Z$W(i,t,n)},n._createCommandsFunction=function(e,t,n,r,o,a,s){$$U(i,t,n,r,a,s)},n._updateAndQueueCommandsFunction=function(e,t,n,r,o,a,s,l){ee$w(i,t,n,r,o,a,s)},this._primitive=new y$R(n),this._primitive.readyPromise.then((function(e){i._ready=!0,i.releaseGeometryInstances&&(i.geometryInstances=void 0);var t=e._error;e$2e(t)?i._readyPromise.reject(t):i._readyPromise.resolve(i)}))}if(this.appearance instanceof e$1F&&!this._hasPerInstanceColors)throw new t$15("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},g$13.prototype.getGeometryInstanceAttributes=function(e){if(!e$2e(this._primitive))throw new t$15("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},g$13.isSupported=function(e){return e.frameState.context.depthTexture},g$13.prototype.isDestroyed=function(){return!1},g$13.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,i$11(this)},Object.defineProperties(n$X.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}}),n$X.prototype.getValue=function(e,t){return this._callback(e,t)},n$X.prototype.setCallback=function(e,t){if(!e$2e(e))throw new t$15("callback is required.");if(!e$2e(t))throw new t$15("isConstant is required.");var i=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,i&&this._definitionChanged.raiseEvent(this)},n$X.prototype.equals=function(e){return this===e||e instanceof n$X&&this._callback===e._callback&&this._isConstant===e._isConstant},Object.defineProperties(l$Y.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),material:c$$("material"),hierarchy:C$10("hierarchy",void 0,L$12),height:C$10("height"),heightReference:C$10("heightReference"),extrudedHeight:C$10("extrudedHeight"),extrudedHeightReference:C$10("extrudedHeightReference"),granularity:C$10("granularity"),stRotation:C$10("stRotation"),fill:C$10("fill"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),perPositionHeight:C$10("perPositionHeight"),closeTop:C$10("closeTop"),closeBottom:C$10("closeBottom"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),classificationType:C$10("classificationType"),arcType:C$10("arcType"),zIndex:C$10("zIndex"),groundBottomAltitude:C$10("groundBottomAltitude"),groundExtrudedHeight:C$10("groundExtrudedHeight")}),l$Y.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.material=this.material,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.granularity=this.granularity,e.stRotation=this.stRotation,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.arcType=this.arcType,e.zIndex=this.zIndex,e):new l$Y(this)},l$Y.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.material=u$Z(this.material,e.material),this.hierarchy=u$Z(this.hierarchy,e.hierarchy),this.height=u$Z(this.height,e.height),this.heightReference=u$Z(this.heightReference,e.heightReference),this.extrudedHeight=u$Z(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=u$Z(this.extrudedHeightReference,e.extrudedHeightReference),this.granularity=u$Z(this.granularity,e.granularity),this.stRotation=u$Z(this.stRotation,e.stRotation),this.fill=u$Z(this.fill,e.fill),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(e.outlineColor,this.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.perPositionHeight=u$Z(this.perPositionHeight,e.perPositionHeight),this.closeTop=u$Z(this.closeTop,e.closeTop),this.closeBottom=u$Z(this.closeBottom,e.closeBottom),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$Z(this.classificationType,e.classificationType),this.arcType=u$Z(this.arcType,e.arcType),this.zIndex=u$Z(this.zIndex,e.zIndex),this.groundBottomAltitude=u$Z(this.groundBottomAltitude,e.groundBottomAltitude),this.groundExtrudedHeight=u$Z(this.groundExtrudedHeight,e.groundExtrudedHeight)},l$Y.processWideOutline=function(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n._polygon;if(r instanceof l$Y){if(n.show&&e$2e(r._outline)&&r._outline._value&&r._outlineWidth>1&&!e$2e(r.outlines)){var o,a={width:r._outlineWidth._value,material:void 0,positions:[],loop:!0,distanceDisplayCondition:new r$Z(0,5e4)};if(r.definitionChanged.addEventListener((function(e,t,i,n){e$2e(r.outlines)&&r.outlines.removeAll(),r.outlines=void 0})),r.outlines=e.primitives.add(new J$T({polygonEntityId:n.id})),o=e$2e(r._hierarchy._value)?Array.isArray(r._hierarchy._value)?r._hierarchy._value:r._hierarchy._value.positions:r._hierarchy instanceof n$X?r._hierarchy.getValue(e.frameState.time).positions:r._hierarchy.polygon._positions._value,!r.perPositionHeight||r._height>0)for(var s=0;s<o.length;s++){(h=a$18.fromCartesian(o[s])).height=e$2e(r._height)?r._height._value:0,o[s]=a$18.toCartesian(h)}if(Math.abs(r._extrudedHeight)>0){var l=[];for(s=0;s<o.length;s++){(h=a$18.fromCartesian(o[s])).height=r._extrudedHeight._value;var u=a$18.toCartesian(h);l.push(u),r.outlines.add(p$19({positions:[o[s],u],loop:!1,material:r$Y.fromType(r$Y.ColorType,{color:r._outlineColor._value})},a))}r.outlines.add(p$19({positions:l,material:r$Y.fromType(r$Y.ColorType,{color:r._outlineColor._value})},a))}if(r.outlines.add(p$19({positions:o,material:r$Y.fromType(r$Y.ColorType,{color:r._outlineColor._value})},a)),e$2e(r._hierarchy._value&&r._hierarchy._value.holes))for(var c=0;c<r._hierarchy._value.holes.length;c++){if(o=r._hierarchy._value.holes[c].positions,!r.perPositionHeight||r._height>0)for(s=0;s<o.length;s++){(h=a$18.fromCartesian(o[s])).height=e$2e(r._height)?r._height._value:0,o[s]=a$18.toCartesian(h)}if(Math.abs(r._extrudedHeight)>0){for(l=[],s=0;s<o.length;s++){var h;(h=a$18.fromCartesian(o[s])).height=r._extrudedHeight._value;u=a$18.toCartesian(h);l.push(u),r.outlines.add(p$19({positions:[o[s],u],loop:!1,material:r$Y.fromType(r$Y.ColorType,{color:r._outlineColor._value})},a))}r.outlines.add(p$19({positions:l,material:r$Y.fromType(r$Y.ColorType,{color:r._outlineColor._value})},a))}r.outlines.add(p$19({positions:o,material:r$Y.fromType(r$Y.ColorType,{color:r._outlineColor._value})},a))}}if(e$2e(r.outlines))for(let e=0;e<r.outlines._polylines.length;e++)r.outlines._polylines[e].show=n.show,e$2e(n.geometry)&&(e$2e(n.geometry.outlineWidth)&&!isNaN(n.geometry.outlineWidth)&&(r.outlines._polylines[e].width=n.geometry.outlineWidth),e$2e(n.geometry.outlineColor)&&n.geometry.outlineColor instanceof e$1X&&(r.outlines._polylines[e].material.uniforms.color=n.geometry.outlineColor))}}},l$Y.processClampWideOutline=function(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n._polygon;if(!(r instanceof l$Y))return;var o=e.frameState.time;if(n.show&&e$2e(r._outline)&&r._outline.getValue(o)&&e$2e(r._outlineWidth)&&r._outlineWidth.getValue(o)>1&&!e$2e(r.clampOutlines)){var a;e$2e(r.outlineColor)||(r.outlineColor=e$1X.BLACK),r.definitionChanged.addEventListener((function(t,i,n,o){e$2e(r.clampOutlines)&&e.primitives.remove(r.clampOutlines),r.clampOutlines=void 0})),a=e$2e(r._hierarchy._value)?Array.isArray(r._hierarchy._value)?r._hierarchy._value:r._hierarchy._value.positions:r._hierarchy.polygon._positions._value;var s=new E$10;s.positions=a,o$1p.equals(a[0],a[a.length-1])||(s.loop=!0),s.width=r._outlineWidth.getValue(o)||1;var l={show:new e$1I(!0),color:o$16.fromColor(r._outlineColor.getValue(o)),width:new o$13({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,value:[s.width]})},u=new d$1o({id:n,geometry:new aa$5(s),attributes:l});r.clampOutlines=new g$13({show:!0,asynchronous:!0,geometryInstances:u,classificationType:r._classificationType?r._classificationType._value:_0x2b86ba.BOTH,appearance:new e$1F,polygonEntityId:n.id}),e.primitives.add(r.clampOutlines)}e$2e(r.clampOutlines)&&(r.clampOutlines.show=!r.show||r.show.getValue(o))}};var _0x37e91e=(_0x1102d7=!0,function(e,t){var i=_0x1102d7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1102d7=!1,i}),_0xc9206d=_0x37e91e(void 0,(function(){return _0xc9206d.toString().search("(((.+)+)+)+$").toString().constructor(_0xc9206d).search("(((.+)+)+)+$")})),_0x1102d7;function _0x49281f(){}function _0x2416bc(e){--e;for(var t=1;32>t;t<<=1)e|=e>>t;return e+1}_0xc9206d(),_0x49281f.computeNeighbors=function(e,t){for(var i=e.length/3,n=new Uint32Array(t+1),r=new Uint32Array(t+1),o=function(e,t){e<t?n[e+1]++:r[t+1]++},a=0;a<i;a++){var s=e[3*a],l=e[3*a+1],u=e[3*a+2];o(s,l),o(l,u),o(u,s)}for(a=l=s=0;a<t;a++)u=n[a+1],o=r[a+1],n[a+1]=s,r[a+1]=l,s+=u,l+=o;var c=new Uint32Array(6*i),h=n[t];for(o=function(e,t,i){if(e<t){var o=n[e+1]++;c[2*o]=t,c[2*o+1]=i}else o=r[t+1]++,c[2*h+2*o]=e,c[2*h+2*o+1]=i},a=0;a<i;a++)s=e[3*a],l=e[3*a+1],u=e[3*a+2],o(s,l,a),o(l,u,a),o(u,s,a);for(s=function(e,t){var i=2*e;for(e=t-e,t=1;t<e;t++){for(var n=c[i+2*t],r=c[i+2*t+1],o=t-1;0<=o&&c[i+2*o]>n;o--)c[i+2*o+2]=c[i+2*o],c[i+2*o+3]=c[i+2*o+1];c[i+2*o+2]=n,c[i+2*o+3]=r}},a=0;a<t;a++)s(n[a],n[a+1]),s(h+r[a],h+r[a+1]);var d=new Int32Array(3*i),f=function(t,i){return t===e[3*i]?0:t===e[3*i+1]?1:t===e[3*i+2]?2:-1};for(i=function(e,t){e=f(e,t),d[3*t+e]=-1},s=function(e,t,i,n){e=f(e,t),d[3*t+e]=n,i=f(i,n),d[3*n+i]=t},a=0;a<t;a++){l=n[a],u=n[a+1],o=r[a];for(var p=r[a+1];l<u&&o<p;){var _=c[2*l],m=c[2*h+2*o];_===m?(s(a,c[2*l+1],m,c[2*h+2*o+1]),l++,o++):_<m?(i(a,c[2*l+1]),l++):(i(m,c[2*h+2*o+1]),o++)}for(;l<u;)i(a,c[2*l+1]),l++;for(;o<p;)i(m=c[2*h+2*o],c[2*h+2*o+1]),o++}return d};var _0x52b739=null;function _0x511b25(){}function _0x5b01aa(e){return Math.acos(1<e?1:-1>e?-1:e)}function _0x1cf3a5(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),e*Math.PI/180}_0x49281f.deduplicate=function(e,t,i,n,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=e.byteLength/(4*t)),e=new Uint32Array(e,n,r*t),n=new Uint32Array(r);var o=Math.floor(1.1*r)+1;(null==_0x52b739||_0x52b739.length<2*o)&&(_0x52b739=new Uint32Array(_0x2416bc(2*o)));for(var a=0;a<2*o;a++)_0x52b739[a]=0;var s=0,l=0!==i?Math.ceil(7.84*1.96/(i*i)*i*(1-i)):r;for(a=0;a<r;a++){if(a===l){if((c=1-s/a)+1.96*Math.sqrt(c*(1-c)/a)<i)return null;l*=2}for(var u,c=a*t,h=u=0;h<t;h++)u=(u=e[c+h]+u|0)+(u<<11)+(u>>>2)|0;h=(u>>>=0)%o;for(var d=s;0!==_0x52b739[2*h+1];){if(_0x52b739[2*h]===u){var f=_0x52b739[2*h+1]-1,p=f*t;e:{for(var _=0;_<t;_++)if(e[c+_]!==e[p+_]){p=!1;break e}p=!0}if(p){d=n[f];break}}++h>=o&&(h-=o)}d===s&&(_0x52b739[2*h]=u,_0x52b739[2*h+1]=a+1,s++),n[a]=d}if(0!==i&&1-s/r<i)return null;for(i=new Uint32Array(t*s),a=s=0;a<r;a++)if(n[a]===s){for(o=e,l=a*t,c=i,u=s*t,h=t,d=0;d<h;d++)c[u+d]=o[l+d];s++}return{buffer:i.buffer,indices:n,uniqueCount:s}};var _0xa825ae=4,_0x4a3704=35,_0x436d97=_0x1cf3a5(_0xa825ae),_0x556d56=_0x1cf3a5(_0x4a3704),_0x5dbe08=Math.cos(_0x556d56),_0x190931=Math.cos(_0x436d97);function _0x29a5d6(e,t,i){var n=i.x-t.x,r=i.y-t.y;return(i=n*n+r*r+(t=i.z-t.z)*t)?(i=1/Math.sqrt(i),e.x=n*i,e.y=r*i,e.z=t*i,e):(e.x=0,e.y=0,e.z=0,e)}var _0xdae63b={position0:new o$1p,position1:new o$1p,faceNormal0:new o$1p,faceNormal1:new o$1p,cosAngle:0},_0x470f7d=new o$1p,_0x140f08=new o$1p;function _0x40c826(e,t){var i=_0x5b01aa(e.cosAngle);return _0x29a5d6(_0x140f08,e.position1,e.position0),o$1p.cross(e.faceNormal0,e.faceNormal1,_0x470f7d),i*(0<o$1p.dot(_0x470f7d,_0x140f08)?-1:1)>t}function _0x9b5d27(e){var t=e.faces.length/3,i=e.faces,n=e.neighbors,r=0,o=0;for(o=0;o<t;o++){var a=n[3*o+0],s=n[3*o+1],l=n[3*o+2],u=i[3*o+0],c=i[3*o+1],h=i[3*o+2];r+=-1===a||u<c?1:0,r+=-1===s||c<h?1:0,r+=-1===l||h<u?1:0}var d=new Int32Array(4*r),f=0;for(o=0;o<t;o++){a=n[3*o+0],s=n[3*o+1],l=n[3*o+2],u=i[3*o+0],c=i[3*o+1],h=i[3*o+2];(-1===a||u<c)&&(d[f++]=u,d[f++]=c,d[f++]=o,d[f++]=a),(-1===s||c<h)&&(d[f++]=c,d[f++]=h,d[f++]=o,d[f++]=s),(-1===l||h<u)&&(d[f++]=h,d[f++]=u,d[f++]=o,d[f++]=l)}return d}var _0x18d722=new o$1p,_0x215f18=new o$1p,_0x4c891d=new o$1p;function _0x591a3b(e){var t=e.x*e.x+e.y*e.y+e.z*e.z;t>0&&(t=1/Math.sqrt(t),e.x*=t,e.y*=t,e.z*=t)}function _0x29f326(e){for(var t=e.faces.length/3,i=e.vertices,n=e.dim,r=e.faces,o=new Float32Array(3*t),a=0;a<t;a++){var s=r[3*a+0],l=r[3*a+1],u=r[3*a+2];_0x18d722.x=i[n*s],_0x18d722.y=i[n*s+1],_0x18d722.z=i[n*s+2],_0x215f18.x=i[n*l],_0x215f18.y=i[n*l+1],_0x215f18.z=i[n*l+2],_0x4c891d.x=i[n*u],_0x4c891d.y=i[n*u+1],_0x4c891d.z=i[n*u+2],o$1p.subtract(_0x215f18,_0x18d722,_0x215f18),o$1p.subtract(_0x4c891d,_0x18d722,_0x4c891d),o$1p.cross(_0x215f18,_0x4c891d,_0x18d722),_0x591a3b(_0x18d722),o[3*a+0]=_0x18d722.x,o[3*a+1]=_0x18d722.y,o[3*a+2]=_0x18d722.z}return o}function _0x24f8d9(e,t){0===t&&(t=e,e=0);for(var i=Array(t-e),n=e;n<t;n++)i[n-e]=n;return i}_0x511b25.extractEdges=function(e){var t=e.vertices,i=e.dim,n=_0xdae63b,r=n.position0,o=n.position1,a=n.faceNormal0,s=n.faceNormal1,l=_0x29f326(e),u=_0x9b5d27(e),c=u.length/4,h=new Float32Array(9*c),d=0,f=new Float32Array(12*c),p=0,_=0,m=0,g=_0x24f8d9(0,c),x=new Float32Array(c);x.forEach((function(e,n,a){var s=u[4*n+0],l=u[4*n+1];r.x=t[s*i],r.y=t[s*i+1],r.z=t[s*i+2],o.x=t[l*i],o.y=t[l*i+1],o.z=t[l*i+2],a[n]=o$1p.distance(r,o)})),g.sort((function(e,t){return x[t]-x[e]}));for(var y=[],v=[],$=0;$<c;$++){var b=g[$],T=x[b],C=u[4*b+0],S=u[4*b+1],w=u[4*b+2],E=u[4*b+3],P=-1===E;if(r.x=t[C*i],r.y=t[C*i+1],r.z=t[C*i+2],o.x=t[S*i],o.y=t[S*i+1],o.z=t[S*i+2],P)a.x=l[3*w],a.y=l[3*w+1],a.z=l[3*w+2],s.x=a.x,s.y=a.y,s.z=a.z,n.cosAngle=o$1p.dot(a,s);else if(a.x=l[3*w],a.y=l[3*w+1],a.z=l[3*w+2],s.x=l[3*E],s.y=l[3*E+1],s.z=l[3*E+2],n.cosAngle=o$1p.dot(a,s),n.cosAngle>_0x190931)continue;_+=T,m++,P||n.cosAngle<_0x5dbe08?(h[d++]=n.position0.x,h[d++]=n.position0.y,h[d++]=n.position0.z,h[d++]=n.position1.x,h[d++]=n.position1.y,h[d++]=n.position1.z,h[d++]=n.faceNormal0.x,h[d++]=n.faceNormal0.y,h[d++]=n.faceNormal0.z,y.push(T)):_0x40c826(n,_0x436d97)&&(f[p++]=n.position0.x,f[p++]=n.position0.y,f[p++]=n.position0.z,f[p++]=n.position1.x,f[p++]=n.position1.y,f[p++]=n.position1.z,f[p++]=n.faceNormal0.x,f[p++]=n.faceNormal0.y,f[p++]=n.faceNormal0.z,f[p++]=n.faceNormal1.x,f[p++]=n.faceNormal1.y,f[p++]=n.faceNormal1.z,v.push(T))}h=h.slice(0,d),f=f.slice(0,p);var A=_/m,L=y.length,M=v.length;return{regular:{instancesData:h,instanceCount:L,edgeLength:L*A},silhouette:{instancesData:f,instanceCount:M,edgeLength:M*A},averageEdgeLength:A}};var _0x1b8b0e=(_0x2a728b=!0,function(e,t){var i=_0x2a728b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a728b=!1,i}),_0x45094d=_0x1b8b0e(void 0,(function(){return _0x45094d.toString().search("(((.+)+)+)+$").toString().constructor(_0x45094d).search("(((.+)+)+)+$")})),_0x2a728b;_0x45094d();var _0x585fdd={SVC_Vertex:1,SVC_Normal:2,SVC_VertexColor:4,SVC_SecondColor:8,SVC_TexutreCoord:16,SVC_TexutreCoordIsW:32},_0x64fca6=Object.freeze(_0x585fdd),_0x1ed676=(_0x463a03=!0,function(e,t){var i=_0x463a03?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x463a03=!1,i}),_0x142e8b=_0x1ed676(void 0,(function(){return _0x142e8b.toString().search("(((.+)+)+)+$").toString().constructor(_0x142e8b).search("(((.+)+)+)+$")})),_0x463a03;function _0x28a85f(e){}function _0x242aba(e){if(e$2e(e.cachedSidenessVertexBuffer))return e.cachedSidenessVertexBuffer;var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,e.cachedSidenessVertexBuffer=t$X.createVertexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW}),e.cachedSidenessVertexBuffer.vertexArrayDestroyable=!1,e.cachedSidenessVertexBuffer}function _0x50c0ef(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}function _0x2cb306(e,t){for(var i,n,r,o=t.componentsPerAttribute,a=e.vertCompressConstant,s=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),l=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),u=new Float32Array(3*e.verticesCount),c=0;c<e.verticesCount;c++)i=l[o*c]*a+s.x,n=l[o*c+1]*a+s.y,r=l[o*c+2]*a+s.z,u[3*c]=i,u[3*c+1]=n,u[3*c+2]=r;return u}_0x142e8b(),_0x28a85f.RegularInstanceStride=12,_0x28a85f.SilhouetteInstanceStride=15,_0x28a85f.createEdgeData=function(e,t,i){if(0==t.length)return null;var n,r=t[0];n=0===r.indexType?new Uint16Array(r.indicesTypedArray.buffer,r.indicesTypedArray.byteOffset,r.indicesTypedArray.byteLength/2):new Uint32Array(r.indicesTypedArray.buffer,r.indicesTypedArray.byteOffset,r.indicesTypedArray.byteLength/4);var o=_0x28a85f.extractEdgeInformation(e,!1,n),a=_0x511b25.extractEdges(o);return e$2e(i)&&(e$2e(a.regular.instancesData)&&i.push(a.regular.instancesData.buffer),e$2e(a.silhouette.instancesData)&&i.push(a.silhouette.instancesData.buffer)),a},_0x28a85f.createIndexBuffer=function(e){return e$2e(e.cachedSidenessIndexBuffer)||(e.cachedSidenessIndexBuffer=t$X.createIndexBuffer({context:e,typedArray:_0x50c0ef(),usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),e.cachedSidenessIndexBuffer.vertexArrayDestroyable=!1),e.cachedSidenessIndexBuffer},_0x28a85f.createRegularEdgeAttributes=function(e,t,i){if(e$2e(t.instancesData)&&0!=t.instancesData.length){var n={},r=[];t.attributeLocations=n,t.attributes=r;var o=t$X.createVertexBuffer({context:e,typedArray:t.instancesData,usage:A$18.STATIC_DRAW});t.instancesData=null;var a=S$14.getSizeInBytes(S$14.FLOAT),s=_0x242aba(e),l=0;n.aSideness=l++,r.push({name:"aSideness",index:n.aSideness,vertexBuffer:s,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:2*S$14.getSizeInBytes(S$14.FLOAT),normalize:!1});var u=i||_0x28a85f.RegularInstanceStride,c=0;n.aPosition0=l++,r.push({name:"aPosition0",index:n.aPosition0,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=3,n.aPosition1=l++,r.push({name:"aPosition1",index:n.aPosition1,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=3,n.aNormal=l++,r.push({name:"aNormal",index:n.aNormal,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=3,n.batchId=l++,r.push({name:"batchId",index:n.batchId,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=1,n.aVariantStroke=l++,r.push({name:"aVariantStroke",index:n.aVariantStroke,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=1,n.aVariantExtension=l++,r.push({name:"aVariantExtension",index:n.aVariantExtension,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=1}},_0x28a85f.createSilhouetteEdgeAttributes=function(e,t){if(e$2e(t.instancesData)&&0!=t.instancesData.length){var i={},n=[];t.attributeLocations=i,t.attributes=n;var r=t$X.createVertexBuffer({context:e,typedArray:t.instancesData,usage:A$18.STATIC_DRAW});t.instancesData=null;var o=S$14.getSizeInBytes(S$14.FLOAT),a=0;i.aSideness=a++,n.push({name:"aSideness",index:i.aSideness,vertexBuffer:_0x242aba(e),componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:2*o,normalize:!1});var s=_0x28a85f.SilhouetteInstanceStride,l=0;i.aPosition0=a++,n.push({name:"aPosition0",index:i.aPosition0,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.aPosition1=a++,n.push({name:"aPosition1",index:i.aPosition1,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.aNormalA=a++,n.push({name:"aNormalA",index:i.aNormalA,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.aNormalB=a++,n.push({name:"aNormalB",index:i.aNormalB,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.batchId=a++,n.push({name:"batchId",index:i.batchId,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=1,i.aVariantStroke=a++,n.push({name:"aVariantStroke",index:i.aVariantStroke,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=1,i.aVariantExtension=a++,n.push({name:"aVariantExtension",index:i.aVariantExtension,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=1}},_0x28a85f.extractEdgeInformation=function(e,t,i){var n,r=e.attrLocation.aPosition,o=e.vertexAttributes[r],a=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,s=o.componentsPerAttribute;a?(s=3,n=_0x2cb306(e,o)):n=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);var l=n.length/s;if(t&&i)return{faces:i,neighbors:_0x49281f.computeNeighbors(i,l),vertices:n,dim:s};var u,c=o.typedArray.buffer;u=a?n.buffer:c.slice(o.typedArray.byteOffset,o.typedArray.byteOffset+o.typedArray.byteLength);var h=_0x49281f.deduplicate(u,s),d=_0x28a85f.selectIndexData(h.indices,i);return{faces:d,neighbors:_0x49281f.computeNeighbors(d,h.uniqueCount),vertices:new Float32Array(h.buffer),dim:s}},_0x28a85f.selectIndexData=function(e,t){if(t){t=t.slice();for(var i=0;i<t.length;i++)t[i]=e[t[i]];return t}return e};var _0xa4737a=new o$1p,_0x471c03=new o$1p,_0xcce4e6=new o$1p,_0x1e3ac1=new o$1p,_0x3ee355=new o$1p,_0x3e00ee=new o$1p,_0x834020=new o$1p,_0x130aff=new o$1p;function _0x6a4059(e,t){function i(e,t,i){var n=48217*e%2147483647,r=t+n/2147483647*(i-=t);return{seed:n,result:Math.round(r)}}var n=function(e,t){var i=new Float32Array(6),n=new Uint32Array(i.buffer),r=new Uint32Array(1);i[0]=e.x,i[1]=e.y,i[2]=e.z,i[3]=t.x,i[4]=t.y,i[5]=t.z,r[0]=5381;for(var o=0;o<n.length;o++)r[0]=31*r[0]+n[o];return r[0]}(e,t);e$2e(n)||(n=2147483647*Math.random());var r=i(n,0,255);n=r.seed,r.result,n=(r=i(n,0,5)).seed;var o,a=r.result;n=(r={seed:o=48217*n%2147483647,result:o/2147483646}).seed;var s=r.result;return s=-(1-Math.min(s/.7,1))+Math.max(0,s-.7)/(1-.7),{variantStroke:a,variantExtension:s=255*(Math.abs(s)**1.2*(0>s?-1:1)*.5+.5)}}_0x28a85f.createEdgeDataByIndices=function(e,t){var i,n,r=e.attrLocation.aPosition,o=e.vertexAttributes[r],a=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,s=o.componentsPerAttribute;a?(s=3,i=_0x2cb306(e,o)):i=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var l=[],u=[],c=(n=0===t.indexType?new Uint16Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/2):new Uint32Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/4)).length,h=0,d=0,f=4*Math.floor(c/4);d<f;d+=4){var p=n[d],_=n[d+1],m=n[d+2],g=n[d+3];if(_0xa4737a.x=i[s*p],_0xa4737a.y=i[s*p+1],_0xa4737a.z=i[s*p+2],_0x471c03.x=i[s*_],_0x471c03.y=i[s*_+1],_0x471c03.z=i[s*_+2],_0xcce4e6.x=i[s*m],_0xcce4e6.y=i[s*m+1],_0xcce4e6.z=i[s*m+2],_0x1e3ac1.x=i[s*g],_0x1e3ac1.y=i[s*g+1],_0x1e3ac1.z=i[s*g+2],!(o$1p.equals(_0x471c03,_0xcce4e6)||o$1p.equals(_0x471c03,_0x1e3ac1)||o$1p.equals(_0x471c03,_0xa4737a)||o$1p.equals(_0xcce4e6,_0xa4737a)||o$1p.equals(_0x1e3ac1,_0xa4737a))){if(m===g){if(o$1p.subtract(_0x471c03,_0xa4737a,_0x3ee355),o$1p.subtract(_0xcce4e6,_0xa4737a,_0x3e00ee),o$1p.cross(_0x3ee355,_0x3e00ee,_0x3ee355),o$1p.equals(_0x3ee355,o$1p.ZERO))continue;o$1p.normalize(_0x3ee355,_0x3ee355),l.push(_0xa4737a.x),l.push(_0xa4737a.y),l.push(_0xa4737a.z),l.push(_0x471c03.x),l.push(_0x471c03.y),l.push(_0x471c03.z),l.push(_0x3ee355.x),l.push(_0x3ee355.y),l.push(_0x3ee355.z),l.push(p);var x=(v=_0x6a4059(_0xa4737a,_0x471c03)).variantStroke,y=v.variantExtension;l.push(x),l.push(y)}else{if(o$1p.subtract(_0x471c03,_0xa4737a,_0x3ee355),o$1p.subtract(_0xcce4e6,_0xa4737a,_0x3e00ee),o$1p.cross(_0x3ee355,_0x3e00ee,_0x3ee355),o$1p.equals(_0x3ee355,o$1p.ZERO)||(o$1p.normalize(_0x3ee355,_0x3ee355),o$1p.subtract(_0x471c03,_0xa4737a,_0x834020),o$1p.subtract(_0x1e3ac1,_0xa4737a,_0x130aff),o$1p.cross(_0x130aff,_0x834020,_0x834020),o$1p.equals(_0x834020,o$1p.ZERO)))continue;o$1p.normalize(_0x834020,_0x834020),u.push(_0xa4737a.x),u.push(_0xa4737a.y),u.push(_0xa4737a.z),u.push(_0x471c03.x),u.push(_0x471c03.y),u.push(_0x471c03.z),u.push(_0x3ee355.x),u.push(_0x3ee355.y),u.push(_0x3ee355.z),u.push(_0x834020.x),u.push(_0x834020.y),u.push(_0x834020.z),u.push(p);var v;x=(v=_0x6a4059(_0xa4737a,_0x471c03)).variantStroke,y=v.variantExtension;u.push(x),u.push(y)}h+=o$1p.distance(_0xa4737a,_0x471c03)}}var $=h/(c/4),b=l.length/_0x28a85f.RegularInstanceStride,T=u.length/_0x28a85f.SilhouetteInstanceStride;return{regular:{instancesData:new Float32Array(l),instanceCount:b,edgeLength:b*$},silhouette:{instancesData:new Float32Array(u),instanceCount:T,edgeLength:T},averageEdgeLength:$}};var _0x2a897a=(_0x145bdd=!0,function(e,t){var i=_0x145bdd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x145bdd=!1,i}),_0x42f995=_0x2a897a(void 0,(function(){return _0x42f995.toString().search("(((.+)+)+)+$").toString().constructor(_0x42f995).search("(((.+)+)+)+$")})),_0x145bdd;function _0x45bcf8(){}_0x42f995(),_0x45bcf8.createClampGroundColorRenderState=function(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.ZERO},backFunction:m$Z.NOT_EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.ZERO},reference:0,mask:65535},blending:Ee$r.ALPHA_BLEND}},_0x45bcf8.createClampGroundAndObjectLineRenderState=function(){return{cull:{enabled:!0},depthMask:!1}},_0x45bcf8.createClampGroundStencilRenderState=function(){return{depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0,func:re$G.GREATER},stencilTest:{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.INCREMENT_WRAP},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:65535}}},_0x45bcf8.createClampObjectColorRenderState=function(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$Z.EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:3,mask:3},blending:Ee$r.ALPHA_BLEND}},_0x45bcf8.createClampObjectStencilRenderState=function(){return{cull:{enabled:!1},depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},reference:0,mask:1},stencilMask:1}},_0x45bcf8.createClampPickStencilRenderState=function(e){var t=e?this.createClampGroundStencilRenderState():this.createClampObjectStencilRenderState();return t.blending={enabled:!1},t.polygonOffset={enabled:!0,factor:1,units:1},t},_0x45bcf8.createClampPickColorRenderState=function(e){var t=e?this.createClampGroundColorRenderState():this.createClampObjectColorRenderState();return t.blending={enabled:!1},t.depthTest={enabled:!0},t.polygonOffset={enabled:!0,factor:1,units:1},t},_0x45bcf8.createReceiveClampObjectStencilTest=function(e){return{enabled:e,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.REPLACE},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.REPLACE},reference:2,mask:2}},_0x45bcf8.createNormalColorRenderState=function(e){return{cull:{enabled:e!==W$13.NONE},depthTest:{enabled:!0,func:re$G.LESS_OR_EQUAL},blending:Ee$r.ALPHA_BLEND,frontFace:e!==W$13.NONE?e:W$13.COUNTER_CLOCKWISE}};var _0x47d8ce=(_0x441a94=!0,function(e,t){var i=_0x441a94?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x441a94=!1,i}),_0x929043=_0x47d8ce(void 0,(function(){return _0x929043.toString().search("(((.+)+)+)+$").toString().constructor(_0x929043).search("(((.+)+)+)+$")})),_0x441a94;_0x929043();var _e$s="precision highp float;\n\nvarying float vRadius;\nvarying vec3 vPosition;\nvarying vec3 vViewPosition;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\nvarying float vVariantExtension;\nvarying float fSelected;\nuniform vec4 uLineColor;\n\n// At which coverage threshold we discard a fragment completely\n#define COVERAGE_TEST_THRESHOLD 0.01\nconst float nearRange = 1000.0;\nconst float farRange = 20000.0;\n\n// Solid\nfloat calculateLineOffsetSolid()\n{\n return 0.0;\n}\nfloat calculateLinePressureSolid()\n{\n return 1.0;\n}\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSolid();\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSolid();\n}\nvec2 lineWithCapsDistance(float radius, vec2 position, float lineLength)\n{\n float lineOffset = calculateLineOffset();\n float positionX = position.x - lineOffset;\n if (radius < 1.0)\n {\n float coverageX = clamp(min(radius, positionX + 0.5) - max(-radius, positionX - 0.5), 0.0, 1.0);\n float coverageY = clamp(min(lineLength, position.y + 0.5) - max(0.0, position.y - 0.5), 0.0, 1.0);\n float coverage = min(coverageX, coverageY);\n return vec2(0.5 - coverage, 0.0);\n }\n else\n {\n // Between -radius -> 0 for start cap, 0 for line, 0 -> radius\n float positionOnCap = position.y - clamp(position.y, 0.0, lineLength);\n vec2 lineToPosition = vec2(positionX, positionOnCap);\n return vec2(length(lineToPosition) - radius, positionOnCap / radius);\n }\n}\n\nvoid main()\n{\n vec3 realPosition = czm_readNonPerspective(vPosition, gl_FragCoord.w);\n float radius = vRadius * calculateLinePressure();\n vec2 distance = lineWithCapsDistance(radius, realPosition.xy, vLineLengthPixels);\n float coverage = clamp(0.5 - distance.x, 0.0, 1.0);\n float coverageLimit = radius <= 0.5 ? COVERAGE_TEST_THRESHOLD : 0.75;\n \n if (coverage < coverageLimit || uLineColor.a < 0.1)\n {\n discard;\n }\n float alpha = uLineColor.a * coverage;\n gl_FragColor = vec4(uLineColor.rgb, alpha);\n float attenuation = 1.0 - smoothstep(nearRange, farRange, vDistanceFromEye);\n gl_FragColor.a *= attenuation;\n czm_writeLogDepth();\n}",_0x111c44=(_0x17fdcf=!0,function(e,t){var i=_0x17fdcf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17fdcf=!1,i}),_0x311fa4=_0x111c44(void 0,(function(){return _0x311fa4.toString().search("(((.+)+)+)+$").toString().constructor(_0x311fa4).search("(((.+)+)+)+$")})),_0x17fdcf;_0x311fa4();var ge$q="precision highp float;\nconst float uPixelRatio = 1.0;\n// Inputs\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\n\n#ifdef SILHOUETTE\nattribute vec3 aNormalA;\nattribute vec3 aNormalB;\n#else /* SILHOUETTE */\nattribute vec3 aNormal;\n#endif /* SILHOUETTE */\n\nattribute vec2 aSideness;\n//attribute vec2 aPackedAttributes;\n\nstruct UnpackedAttributes\n{\n vec2 sideness;\n vec2 sidenessNorm;\n float lineWidthPixels;\n float extensionLengthPixels;\n};\n\n// Output required to compute color\n// Output required to compute distance to line/caps\nvarying vec3 vPosition; \nvarying vec3 vViewPosition;\nvarying float vRadius;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\n\nuniform float uLineWidth;\nuniform vec4 uLineColor;\nuniform vec3 uTranslation;\nconst vec2 uDepthBias = vec2(0.5, -4e-4);\n\n// Utility function to check for NaN values\nbool isNaN(float val)\n{\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n // important: some nVidias failed to cope with version below.\n // Probably wrong optimization.\n /*return ( val <= 0.0 || 0.0 <= val ) ? false : true;*/\n}\n\nvec2 calculateProjectedBiasXY(vec4 projPos, vec3 worldNormal)\n{\n float offsetXY = uDepthBias.x;\n float offsetZ = uDepthBias.y;\n vec4 projNormal = czm_projection * czm_view * vec4(worldNormal, 0.0);\n return offsetXY * projPos.w * 2.0 / czm_viewport.zw * normalize(projNormal.xyz).xy;\n}\n\n// A z-offset, using a depth based heuristic.\nfloat calculateProjectedBiasZ(vec4 projPos)\n{\n float fProjZ = projPos.z / projPos.w;\n if(fProjZ < 0.1)\n {\n return 0.0;\n }\n float offsetZ = uDepthBias.y;\n return sqrt(projPos.z) * offsetZ;\n}\n\nvec4 adjustProjectedPosition(vec4 projPos, vec3 worldNormal, float lineWidth)\n{\n vec2 offsetXY = calculateProjectedBiasXY(projPos, worldNormal);\n // we currently have to do this check because some geometries come with 0 length edge normals.\n if (!isNaN(offsetXY.x) && !isNaN(offsetXY.y))\n {\n projPos.xy += offsetXY;\n }\n#ifdef LOG_DEPTH\n vDistanceFromEye = projPos.w;\n#else\n projPos.z += calculateProjectedBiasZ(projPos);\n#endif\n return projPos;\n}\n\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{}\n// Solid\nfloat calculateLineAmplitudeSolid()\n{\n return 0.0;\n}\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSolid();\n}\n\n\nuniform float uDistanceFalloffFactor;\nfloat distanceBasedPerspectiveFactor(float distance)\n{\n return clamp(sqrt(uDistanceFalloffFactor / distance), 0.0, 1.0);\n}\n\n#define COMPONENT_COLOR_FIELD_OFFSET 0.0\n#define COMPONENT_OTHER_FIELDS_OFFSET 1.0\n#define COMPONENT_FIELD_COUNT 2.0\n#define LINE_WIDTH_FRACTION_FACTOR 8.0\n#define EXTENSION_LENGTH_OFFSET 128.0\n#define COMPONENT_TEX_WIDTH 4096.0\n\nstruct ComponentData\n{\n float lineWidth;\n float extensionLength;\n float type;\n};\n\n\nComponentData readComponentData()\n{\n return ComponentData(uLineWidth, 0.0, 0.0);\n}\n\nvec3 modelToWorldNormal(vec3 normal)\n{\n return (czm_model * vec4(normal, 0.0)).xyz;\n}\n\nvec3 silhouetteWorldNormal(vec3 normalA, vec3 normalB)\n{\n return modelToWorldNormal(normalize(normalA + normalB));\n}\n\n// Fall-off extension length for shorter strokes, starting from strokes that are 256 size,\n// fall-off exponentially\nfloat calculateExtensionLength(float extensionLength, float lineLength)\n{\n return extensionLength / (log2(max(1.0, 256.0 / lineLength)) * 0.2 + 1.0);\n}\n\n#ifdef SILHOUETTE\n// #uniforms: czm_view, czm_model\nbool isSilhouetteEdge(vec4 viewPos, vec3 normalA, vec3 normalB)\n{\n// transform the two face normals\n vec3 viewNormalA = (czm_modelView * vec4(normalA, 0.0)).xyz;\n vec3 viewNormalB = (czm_modelView * vec4(normalB, 0.0)).xyz;\n// compute the direction from the edge to the camera\n vec3 viewDir = -viewPos.xyz;\n// check which of the two faces are visible\n// display the edge if exactly one of the two is visible\n float faceAVisible = dot(viewDir, viewNormalA);\n// positive if visible\n float faceBVisible = dot(viewDir, viewNormalB);\n// positive if visible\n// 1 if exactly one face visible, 0 otherwise\n return faceAVisible * faceBVisible < 0.0;\n}\n#endif /* SILHOUETTE */\n\nvoid clipLineSegmentToNearPlane(vec3 p0,vec3 p1,out bool clipped,out bool culledByNearPlane,out vec4 clippedPositionEC)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = czm_currentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -czm_currentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n}\nvec4 calculateGeometricOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vec2 sideness = unpackedAttributes.sideness;\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n vec4 clippedViewPosV0; bool clippedV0,culledV0; clipLineSegmentToNearPlane(viewPosV0.xyz, viewPosV1.xyz, clippedV0, culledV0, clippedViewPosV0); vec4 clippedViewPosV1; bool clippedV1, culledV1; clipLineSegmentToNearPlane(viewPosV1.xyz, viewPosV0.xyz, clippedV1, culledV1, clippedViewPosV1); vec4 viewPos = mix(clippedViewPosV0, clippedViewPosV1, sidenessNorm.y);\n vViewPosition = viewPos.xyz / viewPos.w;\n vec4 projPosV0 = czm_projection * clippedViewPosV0;\n vec4 projPosV1 = czm_projection * clippedViewPosV1;\n vec4 projPos = czm_projection * viewPos;\n vec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\n vec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\n vec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\n float lineLengthPixels = length(screenSpaceLinePixels);\n float dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\n vec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\n vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\n float falloffFactor = distanceBasedPerspectiveFactor(-viewPos.z) * uPixelRatio;\n float lineWidthPixels = unpackedAttributes.lineWidthPixels * falloffFactor;\n float extensionLengthPixels = calculateExtensionLength(unpackedAttributes.extensionLengthPixels, lineLengthPixels) * falloffFactor;\n float lineAmplitudePixels = calculateLineAmplitude(unpackedAttributes) * uPixelRatio;\n vSizeFalloffFactor = falloffFactor;\n float lineWidthAndAmplitudePixels = lineWidthPixels + lineAmplitudePixels + lineAmplitudePixels;\n float extendedLineLengthPixels = lineLengthPixels + extensionLengthPixels + extensionLengthPixels;\n#ifdef ANTIALIASING\n const float aaPaddingPixels = 1.0;\n // Line size with padding\n float halfAAPaddedLineWidthAndAmplitudePixels = lineWidthAndAmplitudePixels * 0.5 + aaPaddingPixels;\n float aaPaddedRoundedCapSizePixels = lineWidthPixels * 0.5 + aaPaddingPixels;\n // Line length with padding\n float aaPaddedLineLengthPixels = extendedLineLengthPixels + aaPaddingPixels + aaPaddingPixels;\n float halfAAPaddedLineLengthPixels = aaPaddedLineLengthPixels * 0.5;\n#else /* ANTIALIASING */\n // Even if there is no AA, we still want to do proper <1px rendering,\n // so we effectively clamp the pixel sizes to minimum of 1px and compute\n // coverage in the fragment shader \n float halfAAPaddedLineWidthAndAmplitudePixels = max(lineWidthAndAmplitudePixels, 1.0) * 0.5;\n float aaPaddedRoundedCapSizePixels = max(lineWidthPixels, 1.0) * 0.5;\n float halfAAPaddedLineLengthPixels = max(extendedLineLengthPixels, 1.0) * 0.5;\n#endif /* ANTIALIASING */\n // Half line width in NDC including padding for anti aliasing\n vec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\n vec2 halfAAPaddedLineWidthAndAmplitudeNDC = halfAAPaddedLineWidthAndAmplitudePixels * uPixelToNDC;\n vec2 aaPaddedRoundedCapSizeNDC = aaPaddedRoundedCapSizePixels * uPixelToNDC;\n vec2 extensionLengthNDC = extensionLengthPixels * uPixelToNDC;\n // Compute screen space position of vertex, offsetting for line size and end caps\n vec2 ndcOffset = (screenSpaceDirection * sideness.y * (aaPaddedRoundedCapSizeNDC + extensionLengthNDC) + perpendicularScreenSpaceDirection * halfAAPaddedLineWidthAndAmplitudeNDC);\n projPos.xy += ndcOffset * projPos.w;\n projPos.z += (dzPerPixel * (aaPaddedRoundedCapSizePixels + extensionLengthPixels)) * sideness.y * projPos.w;\n projPos = adjustProjectedPosition(projPos, worldNormal, 1.0 + max((lineWidthAndAmplitudePixels - 1.0) * 0.5, 0.0));\n // Line length with end caps\n float aaPaddedLineWithCapsLengthPixels = extendedLineLengthPixels + aaPaddedRoundedCapSizePixels + aaPaddedRoundedCapSizePixels;\n float pixelPositionAlongLine = aaPaddedLineWithCapsLengthPixels * sidenessNorm.y - aaPaddedRoundedCapSizePixels;\n // Position in pixels with origin at first vertex of line segment\n // The line width radius in pixels\n vRadius = lineWidthPixels * 0.5;\n vLineLengthPixels = extendedLineLengthPixels;\n vPosition = czm_writeNonPerspective(vec3(halfAAPaddedLineWidthAndAmplitudePixels * sideness.x, pixelPositionAlongLine, pixelPositionAlongLine / extendedLineLengthPixels), projPos.w);\n#ifdef SILHOUETTE\n gl_Position = isSilhouetteEdge(viewPosV0, aNormalA, aNormalB) ? projPos : vec4(10.0, 10.0, 10.0, 1.0);\n#else /* SILHOUETTE */\n gl_Position = projPos;\n#endif /* SILHOUETTE */\n\n return projPos;\n}\n\n\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float extensionLengthPixels = component.extensionLength;\n float lineWidth = component.lineWidth;\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels);\n}\nvarying float fSelected;\nvoid main()\n{\n fSelected = 0.0;\n ComponentData component = readComponentData();\n UnpackedAttributes unpackedAttributes = unpackAttributes(component);\n vec4 vertexPos0 = vec4(aPosition0, 1.0);\n vec4 vertexPos1 = vec4(aPosition1, 1.0);\n vec3 translate = uTranslation;\n vec4 worldPosV0 = czm_model * vertexPos0;\n vec4 worldPosV1 = czm_model * vertexPos1;\n vec4 viewPosV0 = czm_modelView * vertexPos0;\n vec4 viewPosV1 = czm_modelView * vertexPos1;\n#ifdef SILHOUETTE\n vec3 worldNormal = silhouetteWorldNormal(aNormalA, aNormalB);\n#else /* SILHOUETTE */\n vec3 worldNormal = modelToWorldNormal(aNormal);\n#endif /* SILHOUETTE */\n // General geometric computation for all types of edges\n vec4 projPos = calculateGeometricOutputs(viewPosV0, viewPosV1, worldPosV0, worldPosV1, worldNormal, unpackedAttributes);\n calculateStyleOutputs(unpackedAttributes);\n}";function e$1E(e,t,i){e=u$Z(e,0),t=u$Z(t,0),i=u$Z(i,0),this.value=new Float32Array([e,t,i])}function Q$W(e,t,i){var n,r=!i,o=e.length;if(!r&&o>1){var a=e[0].modelMatrix;for(n=1;n<o;++n)if(!p$1d.equals(a,e[n].modelMatrix)){r=!0;break}}if(r)for(n=0;n<o;++n)e$2e(e[n].geometry)&&k$14.transformToWorldCoordinates(e[n]);else p$1d.multiplyTransformation(t,e[0].modelMatrix,t)}function V$S(e,t){var i=e.attributes,n=i.position,r=n.values.length/n.componentsPerAttribute;i.batchId=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:1,values:new Float32Array(r)});for(var o=i.batchId.values,a=0;a<r;++a)o[a]=t}function X$T(e){for(var t=e.length,i=0;i<t;++i){var n=e[i];e$2e(n.geometry)?V$S(n.geometry,i):e$2e(n.westHemisphereGeometry)&&e$2e(n.eastHemisphereGeometry)&&(V$S(n.westHemisphereGeometry,i),V$S(n.eastHemisphereGeometry,i))}}function Y$K(e){var t,i,n,r=e.instances,o=e.projection,a=e.elementIndexUintSupported,s=e.scene3DOnly,l=e.vertexCacheOptimize,u=e.compressVertices,c=e.modelMatrix,h=r.length;for(t=0;t<h;++t)if(e$2e(r[t].geometry)){n=r[t].geometry.primitiveType;break}for(t=1;t<h;++t)if(e$2e(r[t].geometry)&&r[t].geometry.primitiveType!==n)throw new t$15("All instance geometries must have the same primitiveType.");if(Q$W(r,c,s),!s)for(t=0;t<h;++t)e$2e(r[t].geometry)&&k$14.splitLongitude(r[t]);if(X$T(r),l)for(t=0;t<h;++t){var d=r[t];e$2e(d.geometry)?(k$14.reorderForPostVertexCache(d.geometry),k$14.reorderForPreVertexCache(d.geometry)):e$2e(d.westHemisphereGeometry)&&e$2e(d.eastHemisphereGeometry)&&(k$14.reorderForPostVertexCache(d.westHemisphereGeometry),k$14.reorderForPreVertexCache(d.westHemisphereGeometry),k$14.reorderForPostVertexCache(d.eastHemisphereGeometry),k$14.reorderForPreVertexCache(d.eastHemisphereGeometry))}var f=k$14.combineInstances(r);for(h=f.length,t=0;t<h;++t){var p,_=(i=f[t]).attributes;if(s)for(p in _)_.hasOwnProperty(p)&&_[p].componentDatatype===S$14.DOUBLE&&k$14.encodeAttribute(i,p,p+"3DHigh",p+"3DLow");else for(p in _)if(_.hasOwnProperty(p)&&_[p].componentDatatype===S$14.DOUBLE){var m=p+"3D",g=p+"2D";k$14.projectTo2D(i,p,m,g,o),e$2e(i.boundingSphere)&&"position"===p&&(i.boundingSphereCV=i$1d.fromVertices(i.attributes.position2D.values)),k$14.encodeAttribute(i,m,m+"High",m+"Low"),k$14.encodeAttribute(i,g,g+"High",g+"Low")}u&&k$14.compressVertices(i)}if(!a){var x=[];for(h=f.length,t=0;t<h;++t)i=f[t],x=x.concat(k$14.fitToUnsignedShortIndices(i));f=x}return f}function I$17(e,t,i,n){var r,o,a,s=n.length-1;if(s>=0){var l=n[s];r=l.offset+l.count,o=i[a=l.index].indices.length}else r=0,o=i[a=0].indices.length;for(var u=e.length,c=0;c<u;++c){var h=e[c][t];if(e$2e(h)){var d=h.indices.length;r+d>o&&(r=0,o=i[++a].indices.length),n.push({index:a,offset:r,count:d}),r+=d}}}function Z$V(e,t){var i=[];return I$17(e,"geometry",t,i),I$17(e,"westHemisphereGeometry",t,i),I$17(e,"eastHemisphereGeometry",t,i),i}Object.defineProperties(e$1E.prototype,{componentDatatype:{get:function(){return S$14.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),e$1E.fromCartesian3=function(e){return o$1q.defined("offset",e),new e$1E(e.x,e.y,e.z)},e$1E.toValue=function(e,t){return o$1q.defined("offset",e),e$2e(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};var k$U={};function _$P(e,t){var i=e.attributes;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];e$2e(r)&&e$2e(r.values)&&t.push(r.values.buffer)}e$2e(e.indices)&&t.push(e.indices.buffer)}function $$T(e,t){for(var i=e.length,n=0;n<i;++n)_$P(e[n],t)}function q$$(e){for(var t=1,i=e.length,n=0;n<i;n++){var r=e[n];if(++t,e$2e(r)){var o=r.attributes;for(var a in t+=7+2*i$1d.packedLength+(e$2e(r.indices)?r.indices.length:0),o)if(o.hasOwnProperty(a)&&e$2e(o[a])){t+=6+o[a].values.length}}}return t}function ee$v(e,t){var i=e.length,n=new Float64Array(1+19*i),r=0;n[r++]=i;for(var o=0;o<i;o++){var a=e[o];if(p$1d.pack(a.modelMatrix,n,r),r+=p$1d.packedLength,e$2e(a.attributes)&&e$2e(a.attributes.offset)){var s=a.attributes.offset.value;n[r]=s[0],n[r+1]=s[1],n[r+2]=s[2]}r+=3}return t.push(n.buffer),n}function re$E(e){for(var t=e,i=new Array(t[0]),n=0,r=1;r<t.length;){var o,a=p$1d.unpack(t,r);e$2e(t[r+=p$1d.packedLength])&&(o={offset:new e$1E(t[r],t[r+1],t[r+2])}),r+=3,i[n++]={modelMatrix:a,attributes:o}}return i}function M$Z(e){var t=e.length,i=1+(i$1d.packedLength+1)*t,n=new Float32Array(i),r=0;n[r++]=t;for(var o=0;o<t;++o){e$2e(e[o])?(n[r++]=1,i$1d.pack(e[o],n,r)):n[r++]=0,r+=i$1d.packedLength}return n}function T$Y(e){for(var t=new Array(e[0]),i=0,n=1;n<e.length;)1===e[n++]&&(t[i]=i$1d.unpack(e,n)),++i,n+=i$1d.packedLength;return t}k$U.combineGeometry=function(e){var t,i,n,r,o=e.instances,a=o.length,s=!1;a>0&&((t=Y$K(e)).length>0&&(i=k$14.createAttributeLocations(t[0]),e.createPickOffsets&&(n=Z$V(o,t))),e$2e(o[0].attributes)&&e$2e(o[0].attributes.offset)&&(r=new Array(a),s=!0));for(var l=new Array(a),u=new Array(a),c=0;c<a;++c){var h=o[c],d=h.geometry;e$2e(d)&&(l[c]=d.boundingSphere,u[c]=d.boundingSphereCV,s&&(r[c]=h.geometry.offsetAttribute));var f=h.eastHemisphereGeometry,p=h.westHemisphereGeometry;e$2e(f)&&e$2e(p)&&(e$2e(f.boundingSphere)&&e$2e(p.boundingSphere)&&(l[c]=i$1d.union(f.boundingSphere,p.boundingSphere)),e$2e(f.boundingSphereCV)&&e$2e(p.boundingSphereCV)&&(u[c]=i$1d.union(f.boundingSphereCV,p.boundingSphereCV)))}return{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:i,pickOffsets:n,offsetInstanceExtend:r,boundingSpheres:l,boundingSpheresCV:u}},k$U.packCreateGeometryResults=function(e,t){var i=new Float64Array(q$$(e)),n=[],r={},o=e.length,a=0;i[a++]=o;for(var s=0;s<o;s++){var l=e[s],u=e$2e(l);if(i[a++]=u?1:0,u){i[a++]=l.primitiveType,i[a++]=l.geometryType,i[a++]=u$Z(l.offsetAttribute,-1);var c=e$2e(l.boundingSphere)?1:0;i[a++]=c,c&&i$1d.pack(l.boundingSphere,i,a),a+=i$1d.packedLength;var h=e$2e(l.boundingSphereCV)?1:0;i[a++]=h,h&&i$1d.pack(l.boundingSphereCV,i,a),a+=i$1d.packedLength;var d=l.attributes,f=[];for(var p in d)d.hasOwnProperty(p)&&e$2e(d[p])&&(f.push(p),e$2e(r[p])||(r[p]=n.length,n.push(p)));i[a++]=f.length;for(var _=0;_<f.length;_++){var m=f[_],g=d[m];i[a++]=r[m],i[a++]=g.componentDatatype,i[a++]=g.componentsPerAttribute,i[a++]=g.normalize?1:0,i[a++]=g.isInstanceAttribute?1:0,i[a++]=g.values.length,i.set(g.values,a),a+=g.values.length}var x=e$2e(l.indices)?l.indices.length:0;i[a++]=x,x>0&&(i.set(l.indices,a),a+=x)}}return t.push(i.buffer),{stringTable:n,packedData:i}},k$U.unpackCreateGeometryResults=function(e){for(var t,i=e.stringTable,n=e.packedData,r=new Array(n[0]),o=0,a=1;a<n.length;){if(1===n[a++]){var s,l,u=n[a++],c=n[a++],h=n[a++];-1===h&&(h=void 0),1===n[a++]&&(s=i$1d.unpack(n,a)),a+=i$1d.packedLength,1===n[a++]&&(l=i$1d.unpack(n,a)),a+=i$1d.packedLength;var d,f,p,_,m=new a$_,g=n[a++];for(t=0;t<g;t++){var x=i[n[a++]],y=n[a++];p=n[a++];var v=0!==n[a++],$=0!==n[a++];d=n[a++],f=S$14.createTypedArray(y,d);for(var b=0;b<d;b++)f[b]=n[a++];m[x]=new o$1c({componentDatatype:y,componentsPerAttribute:p,normalize:v,values:f}),$&&(m[x].isInstanceAttribute=!0)}if((d=n[a++])>0){var T=f.length/p;for(_=ce$z.createTypedArray(T,d),t=0;t<d;t++)_[t]=n[a++]}r[o++]=new I$1p({primitiveType:u,geometryType:c,boundingSphere:s,boundingSphereCV:l,indices:_,attributes:m,offsetAttribute:h})}else r[o++]=void 0}return r},k$U.packCombineGeometryParameters=function(e,t){for(var i=e.createGeometryResults,n=i.length,r=0;r<n;r++)t.push(i[r].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:ee$v(e.instances,t),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof n$1d,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}},k$U.unpackCombineGeometryParameters=function(e){for(var t=re$E(e.packedInstances),i=e.createGeometryResults,n=i.length,r=0,o=0;o<n;o++)for(var a=k$U.unpackCreateGeometryResults(i[o]),s=a.length,l=0;l<s;l++){var u=a[l];t[r].geometry=u,++r}var c=t$12.clone(e.ellipsoid);return{instances:t,ellipsoid:c,projection:e.isGeographic?new n$1d(c):new t$N(c),elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:p$1d.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}},k$U.packCombineGeometryResults=function(e,t){e$2e(e.geometries)&&$$T(e.geometries,t);var i=M$Z(e.boundingSpheres),n=M$Z(e.boundingSpheresCV);return t.push(i.buffer,n.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:i,boundingSpheresCV:n}},k$U.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:T$Y(e.boundingSpheres),boundingSpheresCV:T$Y(e.boundingSpheresCV)}};var e$1D={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6},_0x26a83e=Object.freeze(e$1D),E$$={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3,NUMBER_OF_SHADOW_MODES:4,castShadows:function(e){return e===E$$.ENABLED||e===E$$.CAST_ONLY},receiveShadows:function(e){return e===E$$.ENABLED||e===E$$.RECEIVE_ONLY},fromCastReceive:function(e,t){return e&&t?E$$.ENABLED:e?E$$.CAST_ONLY:t?E$$.RECEIVE_ONLY:E$$.DISABLED}},W$X=Object.freeze(E$$);function y$R(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.swipeEnabled=!1,this._swipeEnabled=!1,this._swipeRegion=new e$2c(0,0,1,1),this.depthFailAppearance=e.depthFailAppearance,this._depthFailAppearance=void 0,this._depthFailMaterial=void 0,this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=new p$1d,this.updateBoundingSphere=u$Z(e.updateBoundingSphere,!0),this.show=u$Z(e.show,!0),this._vertexCacheOptimize=u$Z(e.vertexCacheOptimize,!1),this._interleave=u$Z(e.interleave,!1),this._releaseGeometryInstances=u$Z(e.releaseGeometryInstances,!0),this._allowPicking=u$Z(e.allowPicking,!0),this._asynchronous=u$Z(e.asynchronous,!0),this._compressVertices=u$Z(e.compressVertices,!0),this.cull=u$Z(e.cull,!0),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.rtcCenter=e.rtcCenter,e$2e(this.rtcCenter)&&(!e$2e(this.geometryInstances)||Array.isArray(this.geometryInstances)&&1!==this.geometryInstances.length))throw new t$15("Relative-to-center rendering only supports one geometry instance.");this.shadows=u$Z(e.shadows,W$X.DISABLED),this._translucent=void 0,this._state=_0x26a83e.READY,this._geometries=[],this._error=void 0,this._numberOfInstances=0,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeCache=[],this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._depthFailAppearance=void 0,this._spDepthFail=void 0,this._frontFaceDepthFailRS=void 0,this._backFaceDepthFailRS=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._readOnlyInstanceAttributes=e._readOnlyInstanceAttributes,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._batchTable=void 0,this._batchTableAttributeIndices=void 0,this._offsetInstanceExtend=void 0,this._batchTableOffsetAttribute2DIndex=void 0,this._batchTableOffsetsUpdated=!1,this._instanceBoundingSpheres=void 0,this._instanceBoundingSpheresCV=void 0,this._tempBoundingSpheres=void 0,this._recomputeBoundingSpheres=!1,this._batchTableBoundingSpheresUpdated=!1,this._batchTableBoundingSphereAttributeIndices=void 0,this._twoPasses=e.twoPasses,this._polygonOffset={enabled:!1,value:new o$1o(0,0)},this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0,this._edgeDistanceFalloffFactor=0}function tt$g(e){var t,i=e.length,n=[],r=e[0].attributes;for(t in r)if(r.hasOwnProperty(t)&&e$2e(r[t])){for(var o=r[t],a=!0,s=1;s<i;++s){var l=e[s].attributes[t];if(!e$2e(l)||o.componentDatatype!==l.componentDatatype||o.componentsPerAttribute!==l.componentsPerAttribute||o.normalize!==l.normalize){a=!1;break}}a&&n.push(t)}return n}Object.defineProperties(y$R.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}});var nt$d=new o$1o,rt$i=new o$1p,ye$o=new e$2c;function ve$s(e){var t=e.length;return 1===t?e[0]:2===t?o$1o.unpack(e,0,nt$d):3===t?o$1p.unpack(e,0,rt$i):4===t?e$2c.unpack(e,0,ye$o):void 0}function at$e(e,t){var i=e.geometryInstances,n=Array.isArray(i)?i:[i],r=n.length;if(0!==r){var o,a,s,l,u=tt$g(n),c=u.length,h=[],d={},f={},p=n[0].attributes;for(a=0;a<c;++a)l=p[s=u[a]],d[s]=a,h.push({functionName:"czm_batchTable_"+s,componentDatatype:l.componentDatatype,componentsPerAttribute:l.componentsPerAttribute,normalize:l.normalize});-1!==u.indexOf("distanceDisplayCondition")&&(h.push({functionName:"czm_batchTable_boundingSphereCenter3DHigh",componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:S$14.FLOAT,componentsPerAttribute:1}),f.center3DHigh=h.length-5,f.center3DLow=h.length-4,f.center2DHigh=h.length-3,f.center2DLow=h.length-2,f.radius=h.length-1),-1!==u.indexOf("offset")&&(h.push({functionName:"czm_batchTable_offset2D",componentDatatype:S$14.FLOAT,componentsPerAttribute:3}),o=h.length-1),h.push({functionName:"czm_batchTable_pickColor",componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});var _=h.length,m=new h$X(t,h,r);for(a=0;a<r;++a){var g=n[a];p=g.attributes;for(var x=0;x<c;++x){var y=ve$s((l=p[s=u[x]]).value),v=d[s];m.setBatchedAttribute(a,v,y)}var $={primitive:u$Z(g.pickPrimitive,e)};e$2e(g.id)&&($.id=g.id);var b=void 0;if($.primitive._polygonEntityId){var T=t.getAllPickObjects();for(let e in T)T[e].id&&T[e].id.id&&T[e].id.id===$.primitive._polygonEntityId&&(b=t.getPickIdByKey(e))}else b=t.createPickId($);e$2e(b)&&e._pickIds.push(b);var C=e$2e(b)?b.color:e$1X.BLACK,S=ye$o;S.x=e$1X.floatToByte(C.red),S.y=e$1X.floatToByte(C.green),S.z=e$1X.floatToByte(C.blue),S.w=e$1X.floatToByte(C.alpha),m.setBatchedAttribute(a,_-1,S)}e._batchTable=m,e._batchTableAttributeIndices=d,e._batchTableBoundingSphereAttributeIndices=f,e._batchTableOffsetAttribute2DIndex=o}}function st$9(e){var t;return t=Array.isArray(e.values)?e.values.slice(0):new e.values.constructor(e.values),new o$1c({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function ot$b(e){var t,i=e.attributes,n=new a$_;for(var r in i)i.hasOwnProperty(r)&&e$2e(i[r])&&(n[r]=st$9(i[r]));if(e$2e(e.indices)){var o=e.indices;t=Array.isArray(o)?o.slice(0):new o.constructor(o)}return new I$1p({attributes:n,indices:t,primitiveType:e.primitiveType,boundingSphere:i$1d.clone(e.boundingSphere)})}function it$c(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:p$1d.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}var ct$b=/attribute\s+vec(?:3|4)\s+(.*)3DHigh;/g;function Ie$l(e){return s$V.replaceMain(e,"czm_non_pick_main")+"\nvarying vec4 v_pickColor; \nvoid main() \n{ \n czm_non_pick_main(); \n v_pickColor = czm_batchTable_pickColor(batchId); \n}"}function Ae$s(e){return"varying vec4 v_pickColor;\n"+e}function Te$o(e,t){if(!e.compressVertices)return t;var i=-1!==t.search(/attribute\s+vec3\s+normal;/g),n=-1!==t.search(/attribute\s+vec2\s+st;/g);if(!i&&!n)return t;var r=-1!==t.search(/attribute\s+vec3\s+tangent;/g),o=-1!==t.search(/attribute\s+vec3\s+bitangent;/g),a=n&&i?2:1,s="compressedAttributes",l="attribute "+((a+=r||o?1:0)>1?"vec"+a:"float")+" "+s+";",u="",c="";n&&(u+="vec2 st;\n",c+=" st = czm_decompressTextureCoordinates("+(a>1?s+".x":s)+");\n");i&&r&&o?(u+="vec3 normal;\nvec3 tangent;\nvec3 bitangent;\n",c+=" czm_octDecode("+s+"."+(n?"yz":"xy")+", normal, tangent, bitangent);\n"):(i&&(u+="vec3 normal;\n",c+=" normal = czm_octDecode("+s+(a>1?"."+(n?"y":"x"):"")+");\n"),r&&(u+="vec3 tangent;\n",c+=" tangent = czm_octDecode("+s+"."+(n&&i?"z":"y")+");\n"),o&&(u+="vec3 bitangent;\n",c+=" bitangent = czm_octDecode("+s+"."+(n&&i?"z":"y")+");\n"));var h=t;return h=(h=(h=(h=h.replace(/attribute\s+vec3\s+normal;/g,"")).replace(/attribute\s+vec2\s+st;/g,"")).replace(/attribute\s+vec3\s+tangent;/g,"")).replace(/attribute\s+vec3\s+bitangent;/g,""),[l,u,h=s$V.replaceMain(h,"czm_non_compressed_main"),"void main() \n{ \n"+c+" czm_non_compressed_main(); \n}"].join("\n")}function ut$c(e){var t=s$V.replaceMain(e,"czm_non_depth_clamp_main");return t+="varying float v_WindowZ;\nvoid main() {\n czm_non_depth_clamp_main();\n vec4 position = gl_Position;\n v_WindowZ = (0.5 * (position.z / position.w) + 0.5) * position.w;\n position.z = min(position.z, position.w);\n gl_Position = position;\n}\n"}function dt$b(e){var t=s$V.replaceMain(e,"czm_non_depth_clamp_main");return t="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n"+(t+="varying float v_WindowZ;\nvoid main() {\n czm_non_depth_clamp_main();\n#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\n gl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n")}function De$m(e,t){var i=e.vertexAttributes;for(var n in i)i.hasOwnProperty(n)&&(e$2e(t[n])||delete e.vertexAttributes[n])}function ht$a(e,t){return function(){return e[t]}}y$R._modifyShaderPosition=function(e,t,i){for(var n,r="",o="",a="";null!==(n=ct$b.exec(t));){var s=n[1],l="vec4 czm_compute"+s[0].toUpperCase()+s.substr(1)+"()";"vec4 czm_computePosition()"!==l&&(r+=l+";\n"),e$2e(e.rtcCenter)?(r+="uniform mat4 u_modifiedModelView;\n",o+="attribute vec4 position;\n",a+=l+"\n{\n return u_modifiedModelView * position;\n}\n\n",t=(t=(t=(t=t.replace(/attribute\s+vec(?:3|4)\s+position3DHigh;/g,"")).replace(/attribute\s+vec(?:3|4)\s+position3DLow;/g,"")).replace(/czm_modelViewRelativeToEye\s+\*\s+/g,"")).replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):i?a+=l+"\n{\n return czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow);\n}\n\n":(o+="attribute vec3 "+s+"2DHigh;\nattribute vec3 "+s+"2DLow;\n",a+=l+"\n{\n vec4 p;\n if (czm_morphTime == 1.0)\n {\n p = czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n p = czm_translateRelativeToEye("+s+"2DHigh.zxy, "+s+"2DLow.zxy);\n }\n else\n {\n p = czm_columbusViewMorph(\n czm_translateRelativeToEye("+s+"2DHigh.zxy, "+s+"2DLow.zxy),\n czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow),\n czm_morphTime);\n }\n return p;\n}\n\n")}return[r,o,t,a].join("\n")},y$R._appendShowToShader=function(e,t){if(!e$2e(e._batchTableAttributeIndices.show))return t;return s$V.replaceMain(t,"czm_non_show_main")+"\nvoid main() \n{ \n czm_non_show_main(); \n gl_Position *= czm_batchTable_show(batchId); \n}"},y$R._updateColorAttribute=function(e,t,i){if(!e$2e(e._batchTableAttributeIndices.color)&&!e$2e(e._batchTableAttributeIndices.depthFailColor)||-1===t.search(/attribute\s+vec4\s+color;/g))return t;if(i&&!e$2e(e._batchTableAttributeIndices.depthFailColor))throw new t$15("A depthFailColor per-instance attribute is required when using a depth fail appearance that uses a color attribute.");var n=t;return n=n.replace(/attribute\s+vec4\s+color;/g,""),n=i?n.replace(/(\b)color(\b)/g,"$1czm_batchTable_depthFailColor(batchId)$2"):n.replace(/(\b)color(\b)/g,"$1czm_batchTable_color(batchId)$2")},y$R._updatePickColorAttribute=function(e){var t=e.replace(/attribute\s+vec4\s+pickColor;/g,"");return t=t.replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2")},y$R._appendOffsetToShader=function(e,t){if(!e$2e(e._batchTableAttributeIndices.offset))return t;var i=t.replace(/attribute\s+float\s+batchId;/g,"attribute float batchId;\nattribute float applyOffset;");return" if (czm_sceneMode == czm_sceneMode3D)\n"," {\n"," $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);"," }\n"," else\n"," {\n"," $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);"," }\n",i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,"vec4 $1 = czm_computePosition();\n if (czm_sceneMode == czm_sceneMode3D)\n {\n $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0); }\n else\n {\n $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0); }\n")},y$R._appendDistanceDisplayConditionToShader=function(e,t,i){if(!e$2e(e._batchTableAttributeIndices.distanceDisplayCondition))return t;var n=s$V.replaceMain(t,"czm_non_distanceDisplayCondition_main"),r="void main() \n{ \n czm_non_distanceDisplayCondition_main(); \n vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);\n vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);\n vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);\n float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);\n";return e.updateBoundingSphere?r+=i?" vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n":" vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);\n vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);\n vec4 centerRTE;\n if (czm_morphTime == 1.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);\n }\n else\n {\n centerRTE = czm_columbusViewMorph(\n czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),\n czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),\n czm_morphTime);\n }\n":r+=" vec4 centerRTE = czm_view * vec4(boundingSphereCenter3DHigh + boundingSphereCenter3DLow, 1.0);\n",n+"\n"+(r+=" float radiusSq = boundingSphereRadius * boundingSphereRadius; \n float distanceSq; \n if (czm_sceneMode == czm_sceneMode2D) \n { \n distanceSq = czm_eyeHeight2D.y - radiusSq; \n } \n else \n { \n distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq; \n } \n distanceSq = max(distanceSq, 0.0); \n float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x; \n float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y; \n float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; \n gl_Position *= show; \n}")};var ce$u=Math.max(s$Z.hardwareConcurrency-1,1),Q$V,lt$6=new i$W("combineGeometry",Number.POSITIVE_INFINITY);function ft$a(e,t){var i,n,r,o,a=e._instanceIds;if(e._state===_0x26a83e.READY){i=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];var s,l=e._numberOfInstances=i.length,u=[],c=[];for(r=0;r<l;++r){if(n=i[r].geometry,a.push(i[r].id),!e$2e(n._workerName))throw new t$15("_workerName must be defined for asynchronous geometry.");c.push({moduleName:n._workerName,geometry:n})}if(!e$2e(Q$V))for(Q$V=new Array(ce$u),r=0;r<ce$u;r++)Q$V[r]=new i$W("createGeometry",Number.POSITIVE_INFINITY);for(c=u$O(c,ce$u),r=0;r<c.length;r++){var h,d=0,f=c[r],p=f.length;for(o=0;o<p;++o)e$2e((n=(s=f[o]).geometry).constructor.pack)&&(s.offset=d,d+=u$Z(n.constructor.packedLength,n.packedLength));if(d>0){var _=new Float64Array(d);for(h=[_.buffer],o=0;o<p;++o)e$2e((n=(s=f[o]).geometry).constructor.pack)&&(n.constructor.pack(n,_,s.offset),s.geometry=_)}u.push(Q$V[r].scheduleTask({subTasks:c[r]},h))}e._state=_0x26a83e.CREATING,o$1l.all(u,(function(t){e._createGeometryResults=t,e._state=_0x26a83e.CREATED})).otherwise((function(i){j$$(e,t,_0x26a83e.FAILED,i)}))}else if(e._state===_0x26a83e.CREATED){var m=[];i=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];var g=t.scene3DOnly,x=t.mapProjection,y=lt$6.scheduleTask(k$U.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:i,ellipsoid:x.ellipsoid,projection:x,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:g,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},m),m);e._createGeometryResults=void 0,e._state=_0x26a83e.COMBINING,o$1l(y,(function(i){var n=k$U.unpackCombineGeometryResults(i);e._geometries=n.geometries,e._attributeLocations=n.attributeLocations,e.modelMatrix=p$1d.clone(n.modelMatrix,e.modelMatrix),e._pickOffsets=n.pickOffsets,e._offsetInstanceExtend=n.offsetInstanceExtend,e._instanceBoundingSpheres=n.boundingSpheres,e._instanceBoundingSpheresCV=n.boundingSpheresCV,e$2e(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=_0x26a83e.COMBINED):j$$(e,t,_0x26a83e.FAILED,void 0)})).otherwise((function(i){j$$(e,t,_0x26a83e.FAILED,i)}))}}function pt$b(e,t){var i,n,r=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],o=e._numberOfInstances=r.length,a=new Array(o),s=e._instanceIds,l=0;for(n=0;n<o;n++){var u,c=(i=r[n]).geometry;u=e$2e(c.attributes)&&e$2e(c.primitiveType)?ot$b(c):c.constructor.createGeometry(c),a[l++]=it$c(i,u),s.push(i.id)}a.length=l;var h=t.scene3DOnly,d=t.mapProjection,f=k$U.combineGeometry({instances:a,ellipsoid:d.ellipsoid,projection:d,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:h,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets});e._geometries=f.geometries,e._attributeLocations=f.attributeLocations,e.modelMatrix=p$1d.clone(f.modelMatrix,e.modelMatrix),e._pickOffsets=f.pickOffsets,e._offsetInstanceExtend=f.offsetInstanceExtend,e._instanceBoundingSpheres=f.boundingSpheres,e._instanceBoundingSpheresCV=f.boundingSpheresCV,e$2e(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=_0x26a83e.COMBINED):j$$(e,t,_0x26a83e.FAILED,void 0)}function _t$9(e,t){var i=e._batchTableAttributeIndices.offset;if(e._recomputeBoundingSpheres&&e$2e(i)){var n,r=e._offsetInstanceExtend,o=e._instanceBoundingSpheres,a=o.length,s=e._tempBoundingSpheres;if(!e$2e(s)){for(s=new Array(a),n=0;n<a;n++)s[n]=new i$1d;e._tempBoundingSpheres=s}for(n=0;n<a;++n){var l=s[n],u=e._batchTable.getBatchedAttribute(n,i,new o$1p);ze$f(l=o[n].clone(l),u,r[n])}var c=[],h=[],d=[];for(n=0;n<a;++n){var f=s[n];f.center.x-f.radius>0||i$1d.intersectPlane(f,o$1m.ORIGIN_ZX_PLANE)!==Ae$w.INTERSECTING?c.push(f):(h.push(f),d.push(f))}var p=c[0],_=d[0],m=h[0];for(n=1;n<c.length;n++)p=i$1d.union(p,c[n]);for(n=1;n<d.length;n++)_=i$1d.union(_,d[n]);for(n=1;n<h.length;n++)m=i$1d.union(m,h[n]);var g=[];for(e$2e(p)&&g.push(p),e$2e(_)&&g.push(_),e$2e(m)&&g.push(m),n=0;n<g.length;n++){var x=g[n].clone(e._boundingSpheres[n]);e._boundingSpheres[n]=x,e._boundingSphereCV[n]=i$1d.projectTo2D(x,t.mapProjection,e._boundingSphereCV[n])}y$R._updateBoundingVolumes(e,t,e.modelMatrix,!0),e._recomputeBoundingSpheres=!1}else e._recomputeBoundingSpheres=!1}var we$k=new i$12,Se$g=new a$18,Ce$i=new o$1p,xe$o=new i$1d;function gt$8(e,t){if(e$2e(e._batchTableAttributeIndices.distanceDisplayCondition)&&!e._batchTableBoundingSpheresUpdated){for(var i=e._batchTableBoundingSphereAttributeIndices,n=i.center3DHigh,r=i.center3DLow,o=i.center2DHigh,a=i.center2DLow,s=i.radius,l=t.mapProjection,u=l.ellipsoid,c=e._batchTable,h=e._instanceBoundingSpheres,d=h.length,f=0;f<d;++f){var p=h[f];if(e$2e(p)){var _=e.modelMatrix;e$2e(_)&&e.updateBoundingSphere&&(p=i$1d.transform(p,_,xe$o));var m=p.center,g=p.radius,x=i$12.fromCartesian(m,we$k);if(c.setBatchedAttribute(f,n,x.high),c.setBatchedAttribute(f,r,x.low),!t.scene3DOnly){var y=u.cartesianToCartographic(m,Se$g),v=l.project(y,Ce$i);x=i$12.fromCartesian(v,we$k),c.setBatchedAttribute(f,o,x.high),c.setBatchedAttribute(f,a,x.low)}c.setBatchedAttribute(f,s,g)}}e._batchTableBoundingSpheresUpdated=!0}}var ue$B=new o$1p,bt$9=new o$1p;function Fe$l(e,t){if(e$2e(e._batchTableAttributeIndices.offset)&&!e._batchTableOffsetsUpdated&&!t.scene3DOnly){for(var i=e._batchTableOffsetAttribute2DIndex,n=t.mapProjection,r=n.ellipsoid,o=e._batchTable,a=e._instanceBoundingSpheres,s=a.length,l=0;l<s;++l){var u=a[l];if(e$2e(u)){var c=o.getBatchedAttribute(l,e._batchTableAttributeIndices.offset);if(o$1p.equals(c,o$1p.ZERO)){o.setBatchedAttribute(l,i,o$1p.ZERO);continue}var h=e.modelMatrix;e$2e(h)&&(u=i$1d.transform(u,h,xe$o));var d=u.center;d=r.scaleToGeodeticSurface(d,bt$9);var f=r.cartesianToCartographic(d,Se$g),p=n.project(f,Ce$i),_=o$1p.add(c,d,ue$B);f=r.cartesianToCartographic(_,f);var m=n.project(f,ue$B),g=o$1p.subtract(m,p,ue$B),x=g.x;g.x=g.z,g.z=g.y,g.y=x,o.setBatchedAttribute(l,i,g)}}e._batchTableOffsetsUpdated=!0}}function mt$7(e,t){for(var i=e._attributeLocations,n=e._geometries,r=t.scene3DOnly,o=t.context,a=[],s=n.length,l=0;l<s;++l){var u=n[l];if(Pe$k(e)){var c=U$_(o,u.attributes.batchId),h=yt$9(o),d=U$_(o,u.attributes.position2DHigh),f=U$_(o,u.attributes.position2DLow),p=U$_(o,u.attributes.position3DHigh),_=U$_(o,u.attributes.position3DLow),m=[];(i={}).sideness=0,m.push({index:i.sideness,vertexBuffer:h,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),i.position02DHigh=1,m.push({index:i.position02DHigh,vertexBuffer:d,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position12DHigh=2,m.push({index:i.position12DHigh,vertexBuffer:d,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position02DLow=3,m.push({index:i.position02DLow,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position12DLow=4,m.push({index:i.position12DLow,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position03DHigh=5,m.push({index:i.position03DHigh,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position13DHigh=6,m.push({index:i.position13DHigh,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position03DLow=7,m.push({index:i.position03DLow,vertexBuffer:_,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position13DLow=8,m.push({index:i.position13DLow,vertexBuffer:_,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.batchId=9,m.push({index:i.batchId,vertexBuffer:c,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:4,instanceDivisor:1}),i.batchId1=10,m.push({index:i.batchId1,vertexBuffer:c,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:4,strideInBytes:4,instanceDivisor:1});var g=new c$13({context:o,attributes:m,indexBuffer:It$b(o)});g._instanceCount=u.attributes.position3DHigh.values.length/u.attributes.position3DHigh.componentsPerAttribute-1,e._attributeLocations=i,a.push(g)}else{var x=Object.keys(u.attributes).length,y=!!(o.webgpu&&x>8)||e._interleave;a.push(c$13.fromGeometry({context:o,geometry:u,attributeLocations:i,bufferUsage:A$18.STATIC_DRAW,interleave:y}))}if(e$2e(e._createBoundingVolumeFunction))e._createBoundingVolumeFunction(t,u);else if(e._boundingSpheres.push(i$1d.clone(u.boundingSphere)),e._boundingSphereWC.push(new i$1d),!r&&e$2e(u.boundingSphereCV)){var v=u.boundingSphereCV.center,$=v.x,b=v.y,T=v.z;v.x=T,v.y=$,v.z=b,e._boundingSphereCV.push(i$1d.clone(u.boundingSphereCV)),e._boundingSphere2D.push(new i$1d),e._boundingSphereMorph.push(new i$1d)}}e._va=a,e._primitiveType=n[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,j$$(e,t,_0x26a83e.COMPLETE,void 0)}function Pe$k(e){return e$2e(e._attributeLocations.sideness)}var de$v=null;function yt$9(e){var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,(de$v=t$X.createVertexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW})).vertexArrayDestroyable=!1,de$v}function U$_(e,t){return t$X.createVertexBuffer({context:e,typedArray:t.values,usage:A$18.STATIC_DRAW})}function vt$b(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}var W$W=null;function It$b(e){return e$2e(W$W)||((W$W=t$X.createIndexBuffer({context:e,typedArray:vt$b(),usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1),W$W}function At$8(e,t,i,n,r){var o,a=i.getRenderState();e$2e(r)&&r?a.stencilTest=_0x45bcf8.createReceiveClampObjectStencilTest(!0):a.stencilTest={enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.ZERO},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.ZERO},reference:0,mask:65535},n?((o=l$1f(a,!1)).cull={enabled:!0,face:G$1a.BACK},e._frontFaceRS=d$1m.fromCache(o),o.cull.face=G$1a.FRONT,e._backFaceRS=d$1m.fromCache(o)):(e._frontFaceRS=d$1m.fromCache(a),e._backFaceRS=e._frontFaceRS),o=l$1f(a,!1),e$2e(e._depthFailAppearance)&&(o.depthTest.enabled=!1),e$2e(e._depthFailAppearance)&&((o=l$1f(a=e._depthFailAppearance.getRenderState(),!1)).depthTest.func=re$G.GREATER,n?(o.cull={enabled:!0,face:G$1a.BACK},e._frontFaceDepthFailRS=d$1m.fromCache(o),o.cull.face=G$1a.FRONT,e._backFaceDepthFailRS=d$1m.fromCache(o)):(e._frontFaceDepthFailRS=d$1m.fromCache(o),e._backFaceDepthFailRS=e._frontFaceRS))}function Tt$b(e,t,i){var n=t.context,r=e._attributeLocations,o=Pe$k(e),a=e._batchTable.getVertexShaderCallback()(i.vertexShaderSource);a=y$R._appendOffsetToShader(e,a),a=y$R._appendShowToShader(e,a),a=Ie$l(a=y$R._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=Te$o(e,a=y$R._updateColorAttribute(e,a,!1)),a=y$R._modifyShaderPosition(e,a,t.scene3DOnly);var s=i.getFragmentShaderSource();s=Ae$s(s),a=new s$V({sources:[a],name:i.name}),o&&a.defines.push("APPLY_SIDENESS");var l=[];e._polygonOffset.enabled&&l.push("POLYGON_OFFSET"),s=new s$V({sources:[s],defines:l,name:i.name}),e._swipeEnabled&&s.defines.push("APPLY_SWIPE"),e._sp=r$14.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:r}),De$m(e._sp,r),e$2e(e._depthFailAppearance)&&(a=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),a=y$R._appendShowToShader(e,a),a=Ie$l(a=y$R._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=Te$o(e,a=y$R._updateColorAttribute(e,a,!0)),a=ut$c(a=y$R._modifyShaderPosition(e,a,t.scene3DOnly)),s=dt$b(s=Ae$s(s=e._depthFailAppearance.getFragmentShaderSource())),e._spDepthFail=r$14.replaceCache({name:"depthFail_"+e._depthFailAppearance.name,context:n,shaderProgram:e._spDepthFail,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:r}),De$m(e._spDepthFail,r))}var q$_=new p$1d;new o$1p;var Be$l=new o$1p;function Ee$o(e,t,i,n){var r=e$2e(i)?i._uniforms:void 0,o={},a=t.uniforms;if(e$2e(a))for(var s in a)if(a.hasOwnProperty(s)){if(e$2e(r)&&e$2e(r[s]))throw new t$15("Appearance and material have a uniform with the same name: "+s);o[s]=ht$a(a,s)}var l=p$19(o,r);return(l=e._batchTable.getUniformMapCallback()(l)).u_polygonOffset=function(){return e._polygonOffset.value},l.uLineWidth=function(){return u$Z(e._outlineWidth,1)},l.uSwipeRegion=function(){var t=e._swipeRegion,i=new e$2c;return e$2c.fromElements(t.x,t.y,t.x+t.z,t.y+t.w,i),i.x=i.x*n.context.drawingBufferWidth,i.y=(1-i.y)*n.context.drawingBufferHeight,i.z=i.z*n.context.drawingBufferWidth,i.w=(1-i.w)*n.context.drawingBufferHeight,i},e$2e(e.rtcCenter)&&(l.u_modifiedModelView=function(){var t=n.context.uniformState.view;return p$1d.multiply(t,e._modelMatrix,q$_),p$1d.multiplyByPoint(q$_,e.rtcCenter,Be$l),p$1d.setTranslation(q$_,Be$l,q$_),q$_}),l}function Dt$a(e,t,i,n,r,o,a,s){var l,u=Ee$o(e,t,i,s);e$2e(e._depthFailAppearance)&&(l=Ee$o(e,e._depthFailAppearance,e._depthFailAppearance.material,s));var c=n?Le$q.TRANSLUCENT:Le$q.OPAQUE,h=r?2:1;h*=e$2e(e._depthFailAppearance)?2:1,o.length=e._va.length*h;for(var d=o.length,f=0,p=0;p<d;++p){var _;r&&(e$2e(_=o[p])||(_=o[p]=new i$$({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._backFaceRS,_.shaderProgram=e._sp,_.uniformMap=u,_.pass=c,++p),e$2e(_=o[p])||(_=o[p]=new i$$({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._frontFaceRS,_.shaderProgram=e._sp,_.uniformMap=u,_.pass=c,_.instanceCount=u$Z(_.vertexArray._instanceCount,0),e$2e(e._depthFailAppearance)&&(r&&(e$2e(_=o[++p])||(_=o[p]=new i$$({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._backFaceDepthFailRS,_.shaderProgram=e._spDepthFail,_.uniformMap=l,_.pass=c),e$2e(_=o[++p])||(_=o[p]=new i$$({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._frontFaceDepthFailRS,_.shaderProgram=e._spDepthFail,_.uniformMap=l,_.pass=c),++f}}function wt$9(e,t,i,n,r,o,a,s){if(t.mode!==C$14.SCENE3D&&!p$1d.equals(r,p$1d.IDENTITY))throw new t$15("Primitive.modelMatrix is only supported in 3D mode.");var l;y$R._updateBoundingVolumes(e,t,r),t.mode===C$14.SCENE3D?l=e.updateBoundingSphere?e._boundingSphereWC:e._boundingSpheres:t.mode===C$14.COLUMBUS_VIEW?l=e._boundingSphereCV:t.mode===C$14.SCENE2D&&e$2e(e._boundingSphere2D)?l=e._boundingSphere2D:e$2e(e._boundingSphereMorph)&&(l=e._boundingSphereMorph);var u=!0;t._fboState.frameBufferType===Qe$c.NORMAL_AND_DEPTH&&(u=!1);var c=t.commandList,h=t.passes;if(u&&(h.render||h.pick)){var d=e.allowPicking,f=W$X.castShadows(e.shadows),p=W$X.receiveShadows(e.shadows),_=i.length,m=s?2:1;m*=e$2e(e._depthFailAppearance)?2:1;for(var g=0;g<_;++g){var x=Math.floor(g/m),y=i[g];y.modelMatrix=r,y.boundingVolume=l[x],y.cull=o,y.debugShowBoundingVolume=a,y.castShadows=f,y.receiveShadows=p,y.pickId=d?"v_pickColor":void 0,c.push(y)}}}function Oe$n(e,t,i,n,r,o){if(!e$2e(i.attributes)||0==i.attributes.length||!e$2e(i.instanceCount)||0==i.instanceCount)return null;var a,s=t.position.getValue(0);a=e$2e(t.orientation)?t.orientation.getValue(0):{heading:0,pitch:0,roll:0};var l=m$19.headingPitchRollToFixedFrame(o$1p.fromDegrees(s.x,s.y,s.z),new i$16(a.heading,a.pitch,a.roll),t$12.WGS84,m$19.eastNorthUpToFixedFrame);p$1d.multiplyByPoint(l,t.boundingSphere.center,t.boundingSphere.center);var u,c,h=Le$q.OPAQUE+1,d=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:l,boundingVolume:t.boundingSphere,pass:h,owner:o,cull:!0});if(d.vertexArray=new c$13({context:e,attributes:i.attributes,indexBuffer:n}),d.instanceCount=i.instanceCount,r){var f="RegularEdge_"+t.id,p="RegularEdge_"+t.id;u=new s$V({name:f,sources:[ge$q]}),c=new s$V({name:p,sources:[_e$s]})}else{f="SilhouetteEdge_"+t.id,p="SilhouetteEdge_"+t.id;u=new s$V({name:f,sources:[ge$q]}),c=new s$V({name:p,sources:[_e$s]}),u.defines.push("SILHOUETTE"),c.defines.push("SILHOUETTE")}u.defines.push("ANTIALIASING"),c.defines.push("ANTIALIASING"),c.defines.push("POLYGON_OFFSET"),u.defines.push("BatchTable");u.defines.push("MODE 0"),c.defines.push("MODE 0"),d.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:i.attributeLocations}),d.renderState=d$1m.fromCache({depthTest:{enabled:!0,func:re$G.LESS_OR_EQUAL},cull:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var _={uLineColor:function(){return u$Z(t.geometry.outlineColor,e$1X.BLACK)},uLineWidth:function(){return t.geometry.outlineWidth},uDistanceFalloffFactor:function(){return o._edgeDistanceFalloffFactor},u_polygonOffset:function(){return new o$1o(-5,-5)}};return d.uniformMap=_,d.edgeTotalLength=i.edgeLength,d.edgeCount=i.instanceCount,d.wireframeType=3,d}y$R._updateBoundingVolumes=function(e,t,i,n){if(e.updateBoundingSphere){var r,o,a;if(n||!p$1d.equals(i,e._modelMatrix))for(p$1d.clone(i,e._modelMatrix),o=e._boundingSpheres.length,r=0;r<o;++r)e$2e(a=e._boundingSpheres[r])&&(e._boundingSphereWC[r]=i$1d.transform(a,i,e._boundingSphereWC[r]),t.scene3DOnly||(e._boundingSphere2D[r]=i$1d.clone(e._boundingSphereCV[r],e._boundingSphere2D[r]),e._boundingSphere2D[r].center.x=0,e._boundingSphereMorph[r]=i$1d.union(e._boundingSphereWC[r],e._boundingSphereCV[r])));var s=e.appearance.pixelSize;if(e$2e(s))for(o=e._boundingSpheres.length,r=0;r<o;++r){a=e._boundingSpheres[r];var l=e._boundingSphereWC[r],u=t.camera.getPixelSize(a,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*s;l.radius=a.radius+u}}},y$R.prototype.update=function(e){if(!e._fboState||!0!==e._fboState.enabled||6!==e._fboState.frameBufferType){if(e.multiViewportIndex>-1&&this._instanceIds.length>0&&e$2e(this._instanceIds[0])&&e$2e(this._instanceIds[0].entityCollection)&&e$2e(this._instanceIds[0].entityCollection.owner)){var t=this._instanceIds[0].entityCollection.owner;if(typeof t.getVisibleInViewport<"u")if(!t.getVisibleInViewport(e.multiViewportIndex))return}if(!(!e$2e(this.geometryInstances)&&0===this._va.length||e$2e(this.geometryInstances)&&Array.isArray(this.geometryInstances)&&0===this.geometryInstances.length||!e$2e(this.appearance)||e.mode!==C$14.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)){if(e$2e(this._error))throw this._error;if(e$2e(this.rtcCenter)&&!e.scene3DOnly)throw new t$15("RTC rendering is only available for 3D only scenes.");if(this._state!==_0x26a83e.FAILED){var i=e.context;if(e$2e(this._batchTable)||at$e(this,i),this._state!==_0x26a83e.COMPLETE&&this._state!==_0x26a83e.COMBINED&&(this.asynchronous?ft$a(this,e):pt$b(this,e)),this._state===_0x26a83e.COMBINED&&(gt$8(this,e),Fe$l(this,e),mt$7(this,e)),this._batchTable.attributes.length>0){if(0===e$1W.maximumVertexTextureImageUnits)throw new t$13("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}if(this.show&&this._state===_0x26a83e.COMPLETE){this._batchTableOffsetsUpdated||Fe$l(this,e),this._recomputeBoundingSpheres&&_t$9(this,e);var n=this.appearance,r=n.material,o=!1,a=!1;this._appearance!==n?(this._appearance=n,this._material=r,o=!0,a=!0):this._material!==r?(this._material=r,a=!0):this._swipeEnabled!==this.swipeEnabled&&(this._swipeEnabled=this.swipeEnabled,a=!0);var s=this.depthFailAppearance,l=e$2e(s)?s.material:void 0;this._depthFailAppearance!==s?(this._depthFailAppearance=s,this._depthFailMaterial=l,o=!0,a=!0):this._depthFailMaterial!==l&&(this._depthFailMaterial=l,a=!0);var u=this._appearance.isTranslucent();this._translucent!==u&&(this._translucent=u,o=!0),e$2e(this._material)&&this._material.update(i);var c=e$2e(this._twoPasses)?this._twoPasses:n.closed&&u,h=!1;if(e$2e(this._instanceIds[0])&&e$2e(this._instanceIds[0].receiveObjectClamp)&&this._instanceIds[0].receiveObjectClamp&&(h=!0),o)u$Z(this._createRenderStatesFunction,At$8)(this,i,n,c,h);if(a)u$Z(this._createShaderProgramFunction,Tt$b)(this,e,n);if(o||a)u$Z(this._createCommandsFunction,Dt$a)(this,n,r,u,c,this._colorCommands,this._pickCommands,e);if(e$2e(this._instanceIds[0])){!e$2e(this._instanceIds[0].polygon)||e$2e(this._instanceIds[0].polygon._perPositionHeight)&&(!e$2e(this._instanceIds[0].polygon._perPositionHeight)||this._instanceIds[0].polygon._perPositionHeight._value)||e$2e(this._instanceIds[0].polygon._height)?l$Y.processWideOutline(e.camera._scene,this._instanceIds):l$Y.processClampWideOutline(e.camera._scene,this._instanceIds);for(var d=0,f=this._instanceIds.length;d<f;d++){var p=this._instanceIds[d];if(p.show&&e$2e(p.geometry)&&p.geometry.outline.getValue(1))if(e$2e(p.regularcommand))e.commandList.push(p.regularcommand),this._addRenderedEdge(p.regularcommand.edgeTotalLength,p.regularcommand.edgeCount),null!=p.silhouettecommand&&(e.commandList.push(p.silhouettecommand),this._addRenderedEdge(p.silhouettecommand.edgeTotalLength,p.silhouettecommand.edgeCount));else{i=e.context;var _=p.edgedata;if(e$2e(_)){_0x28a85f.createRegularEdgeAttributes(i,_.regular,9),_0x28a85f.createSilhouetteEdgeAttributes(i,_.silhouette);var m=_0x28a85f.createIndexBuffer(i);p.regularcommand=Oe$n(i,p,_.regular,m,!0,this),p.silhouettecommand=Oe$n(i,p,_.silhouette,m,!1,this),null!=p.regularcommand&&(e.commandList.push(p.regularcommand),this._addRenderedEdge(p.regularcommand.edgeTotalLength,p.regularcommand.edgeCount)),null!=p.silhouettecommand&&(e.commandList.push(p.silhouettecommand),this._addRenderedEdge(p.silhouettecommand.edgeTotalLength,p.silhouettecommand.edgeCount)),delete p.edgedata}}}}u$Z(this._updateAndQueueCommandsFunction,wt$9)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,c),this._updateEdgeDistanceFalloffFactor()}}}}},y$R.prototype._addRenderedEdge=function(e,t){this._edgeCurrentTotalLength+=e,this._edgeCurrentCount+=t},y$R.prototype._updateEdgeDistanceFalloffFactor=function(){0!=this._edgeCurrentCount?(this._edgeDistanceFalloffFactor=this._edgeCurrentTotalLength/this._edgeCurrentCount*40,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0):this._edgeCurrentTotalLength=0};var St$7=new i$1d,Ct$8=new i$1d;function ze$f(e,t,i){if(i===_0x39c22a.TOP){var n=i$1d.clone(e,St$7),r=i$1d.clone(e,Ct$8);r.center=o$1p.add(r.center,t,r.center),e=i$1d.union(n,r,e)}else i===_0x39c22a.ALL&&(e.center=o$1p.add(e.center,t,e.center));return e}function xt$9(e,t,i){return function(){var n=e.getBatchedAttribute(t,i),r=e.attributes[i],o=r.componentsPerAttribute,a=S$14.createTypedArray(r.componentDatatype,o);return e$2e(n.constructor.pack)?n.constructor.pack(n,a,0):a[0]=n,a}}function Ft$8(e,t,i,n,r){return function(o){if(!e$2e(o)||!e$2e(o.length)||o.length<1||o.length>4)throw new t$15("value must be and array with length between 1 and 4.");var a=ve$s(o);e.setBatchedAttribute(t,i,a),"offset"===r&&(n._recomputeBoundingSpheres=!0,n._batchTableOffsetsUpdated=!1)}}var Pt$7=new o$1p;function Bt$9(e,t,i){t.boundingSphere={get:function(){var n=e._instanceBoundingSpheres[i];if(e$2e(n)&&e.updateBoundingSphere){n=n.clone();var r=e.modelMatrix,o=t.offset;e$2e(o)&&ze$f(n,o$1p.fromArray(o.get(),0,Pt$7),e._offsetInstanceExtend[i]),e$2e(r)&&(n=i$1d.transform(n,r))}return n}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[i]}}}function Et$a(e,t,i){t.pickId={get:function(){return e._pickIds[i]}}}function j$$(e,t,i,n){e._error=n,e._state=i,t.afterRender.push((function(){e._ready=e._state===_0x26a83e.COMPLETE||e._state===_0x26a83e.FAILED,e$2e(n)?e._readyPromise.reject(n):e._readyPromise.resolve(e)}))}function p$V(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).camera))throw new t$15("options.camera is required.");this._camera=e.camera,this._color=u$Z(e.color,e$1X.CYAN),this._updateOnChange=u$Z(e.updateOnChange,!0),this.show=u$Z(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}y$R.prototype.getGeometryInstanceAttributes=function(e){if(!e$2e(e))throw new t$15("id is required");if(!e$2e(this._batchTable))throw new t$15("must call update before calling getGeometryInstanceAttributes");for(var t=-1,i=this._lastPerInstanceAttributeIndex,n=this._instanceIds,r=n.length,o=0;o<r;++o){var a=(i+o)%r;if(e===n[a]){t=a;break}}if(-1!==t){var s=this._perInstanceAttributeCache[t];if(e$2e(s))return s;var l=this._batchTable,u=this._batchTableAttributeIndices;s={};var c={};for(var h in u)if(u.hasOwnProperty(h)){var d=u[h];c[h]={get:xt$9(l,t,d)};var f=!0,p=this._readOnlyInstanceAttributes;if(f&&e$2e(p)){r=p.length;for(var _=0;_<r;++_)if(h===p[_]){f=!1;break}}f&&(c[h].set=Ft$8(l,t,d,this,h))}return Bt$9(this,c,t),Et$a(this,c,t),Object.defineProperties(s,c),this._lastPerInstanceAttributeIndex=t,this._perInstanceAttributeCache[t]=s,s}},y$R.prototype.isDestroyed=function(){return!1},y$R.prototype.destroy=function(){var e,t;this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy();var i=this._va;for(e=i.length,t=0;t<e;++t)i[t].destroy();this._va=void 0;var n=this._pickIds;for(e=n.length,t=0;t<e;++t)n[t].destroy();return this._pickIds=void 0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._instanceIds=void 0,this._perInstanceAttributeCache=void 0,this._attributeLocations=void 0,i$11(this)},y$R.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._polygonOffset.enabled=!0,o$1o.fromElements(e,t,this._polygonOffset.value)):(this._polygonOffset.enabled=!1,o$1o.fromElements(0,0,this._polygonOffset.value))};var k$T=new o$1p,T$X=new p$1e,Y$J=new n$15,j$_=new o$15,q$Z=new l$10,B$T=new a$V,J$S=new l$11,Q$U=new e$1X,V$R=[1,1e5];function g$12(){}function T$W(e,t,i,n,r,o){var a="";return t&&(n||(a+="varying vec3 v_positionEC; \n"),a+="uniform vec4 shadowMap_lightPositionEC; \n"),i&&"vSecondColor"!==o.pickId?a+="void main() \n{ \n":a+="void main() \n{ \n czm_shadow_cast_main(); \n if (gl_FragColor.a == 0.0) \n { \n discard; \n } \n",t?a+=" float distance = length("+r+"); \n if (distance >= shadowMap_lightPositionEC.w) \n { \n discard; \n } \n distance /= shadowMap_lightPositionEC.w; // radius \n gl_FragColor = czm_packDepth(distance); \n":(e&&e$2e(o.pickId)&&"vSecondColor"===o.pickId&&(a+=" if(vColor.a < 0.1)\n {\n discard;\n }\n"),a+=" gl_FragColor = czm_packDepth(gl_FragCoord.z); \n"),a+="} \n"}function H$_(e,t,i,n,r){var o="";return t&&(n||(o+="varying v_positionEC : vec3<f32>; \n"),o+="uniform shadowMap_lightPositionEC : vec4<f32>; \n"),o+=i?"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n":"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n czm_shadow_cast_main(); \n if (gl_FragColor.a == 0.0) \n { \n discard; \n } \n",t?o+=" var distance = length("+r+"); \n if (distance >= shadowMap_lightPositionEC.w) \n { \n discard; \n } \n distance /= shadowMap_lightPositionEC.w; // radius \n gl_FragColor = czm_packDepth(distance); \n":(o+=" var d = gl_FragCoord.z; \n",o+=" d = (d + 1.0) * 0.5; \n",o+=" gl_FragColor = czm_packDepth(d); \n"),o+="} \n"}function R$V(e,t,i,n){return"vec4 getPositionEC() \n{ \n"+(i?" return vec4("+n+", 1.0); \n":t?" return vec4(v_logPositionEC, 1.0); \n":" return czm_windowToEyeCoordinates(gl_FragCoord); \n")+"} \n"}function V$Q(e,t,i){return"vec3 getNormalEC() \n{ \n"+(e?" return normalize("+t+"); \n":i?" return normalize(czm_normal*czm_computeNormal(vPositionMC.xyz)); \n":" return vec3(1.0); \n")+"} \n"}function b$15(e,t,i,n){return"fn getPositionEC() -> vec4<f32> \n{ \n"+(i?" return vec4<f32>("+n+", 1.0); \n":t?" return vec4<f32>(v_logPositionEC, 1.0); \n":" return czm_windowToEyeCoordinates(gl_FragCoord); \n")+"} \n"}function x$10(e,t,i){return"fn getNormalEC() -> vec3<f32> \n{ \n"+(e?" return normalize("+t+"); \n":i?" return normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(vPositionMC.xyz)); \n":" return vec3<f32>(1.0); \n")+"} \n"}function M$Y(){return"void main()\n {\n vec4 positionEC = getPositionEC();\n vec3 normalEC = getNormalEC();\n float depth = -positionEC.z;\n czm_shadow_receive_main();\n float visibility = getShadowVisibility(positionEC, normalEC, depth);\n gl_FragColor.rgb *= visibility;\n }"}function U$Z(){return"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n var positionEC = getPositionEC(); \n var normalEC = getNormalEC(); \n var depth = -positionEC.z; \n var visibility = getShadowVisibility(positionEC, normalEC, depth); \n czm_shadow_receive_main(); \n var fragColor = vec3<f32>(gl_FragColor.rgb) * visibility; \n gl_FragColor = vec4<f32>(fragColor, gl_FragColor.a); \n} \n"}function e$1C(e,t,i,n,r,o){this._valueCache={},this._engine=e,this._noUBO=!e.context.webgl2,this._dynamic=i,this._name=n??"no-name",this._data=t||[],this._uniformLocations={},this._uniformSizes={},this._uniformArraySizes={},this._uniformLocationPointer=0,this._needSync=!1,this._trackUbosInFrame=!1,this._noUBO?(this.updateMatrix3x3=this._updateMatrix3x3ForEffect,this.updateMatrix2x2=this._updateMatrix2x2ForEffect,this.updateFloat=this._updateFloatForEffect,this.updateFloat2=this._updateFloat2ForEffect,this.updateFloat3=this._updateFloat3ForEffect,this.updateFloat4=this._updateFloat4ForEffect,this.updateFloatArray=this._updateFloatArrayForEffect,this.updateArray=this._updateArrayForEffect,this.updateIntArray=this._updateIntArrayForEffect,this.updateMatrix=this._updateMatrixForEffect,this.updateMatrices=this._updateMatricesForEffect,this.updateVector3=this._updateVector3ForEffect,this.updateVector4=this._updateVector4ForEffect,this.updateColor3=this._updateColor3ForEffect,this.updateColor4=this._updateColor4ForEffect,this.updateDirectColor4=this._updateDirectColor4ForEffect,this.updateInt=this._updateIntForEffect,this.updateInt2=this._updateInt2ForEffect,this.updateInt3=this._updateInt3ForEffect,this.updateInt4=this._updateInt4ForEffect):(this._engine._uniformBuffers.push(this),this.updateMatrix3x3=this._updateMatrix3x3ForUniform,this.updateMatrix2x2=this._updateMatrix2x2ForUniform,this.updateFloat=this._updateFloatForUniform,this.updateFloat2=this._updateFloat2ForUniform,this.updateFloat3=this._updateFloat3ForUniform,this.updateFloat4=this._updateFloat4ForUniform,this.updateFloatArray=this._updateFloatArrayForUniform,this.updateArray=this._updateArrayForUniform,this.updateIntArray=this._updateIntArrayForUniform,this.updateMatrix=this._updateMatrixForUniform,this.updateMatrices=this._updateMatricesForUniform,this.updateVector3=this._updateVector3ForUniform,this.updateVector4=this._updateVector4ForUniform,this.updateColor3=this._updateColor3ForUniform,this.updateColor4=this._updateColor4ForUniform,this.updateDirectColor4=this._updateDirectColor4ForUniform,this.updateInt=this._updateIntForUniform,this.updateInt2=this._updateInt2ForUniform,this.updateInt3=this._updateInt3ForUniform,this.updateInt4=this._updateInt4ForUniform)}p$V.prototype.update=function(e){if(this.show){var t,i,n=this._planesPrimitives,r=this._outlinePrimitives;if(this._updateOnChange){for(i=n.length,t=0;t<i;++t)r[t]=r[t]&&r[t].destroy(),n[t]=n[t]&&n[t].destroy();n.length=0,r.length=0}if(0===n.length){var o,a=this._camera,s=a.frustum;o=s instanceof o$15?j$_:s instanceof l$10?q$Z:s instanceof a$V?B$T:J$S,o=s.clone(o);var l=e.frustumSplits,u=l.length-1;u<=0&&((l=V$R)[0]=this._camera.frustum.near,l[1]=this._camera.frustum.far,u=1);var c=a.positionWC,h=a.directionWC,d=a.upWC,f=a.rightWC;f=o$1p.negate(f,k$T);var p=T$X;p$1e.setColumn(p,0,f,p),p$1e.setColumn(p,1,d,p),p$1e.setColumn(p,2,h,p);var _=n$15.fromRotationMatrix(p,Y$J);for(n.length=r.length=u,t=0;t<u;++t)o.near=l[t],o.far=l[t+1],n[t]=new y$R({geometryInstances:new d$1o({geometry:new z$U({origin:c,orientation:_,frustum:o,_drawNearPlane:0===t}),attributes:{color:o$16.fromColor(e$1X.fromAlpha(this._color,.1,Q$U))},id:this.id,pickPrimitive:this}),appearance:new t$Q({translucent:!0,flat:!0}),asynchronous:!1}),r[t]=new y$R({geometryInstances:new d$1o({geometry:new s$O({origin:c,orientation:_,frustum:o,_drawNearPlane:0===t}),attributes:{color:o$16.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new t$Q({translucent:!1,flat:!0}),asynchronous:!1})}for(i=n.length,t=0;t<i;++t)r[t].update(e),n[t].update(e)}},p$V.prototype.isDestroyed=function(){return!1},p$V.prototype.destroy=function(){for(var e=this._planesPrimitives.length,t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return i$11(this)},g$12.getShadowCastShaderKeyword=function(e,t,i,n){return"castShadow "+(e|t<<1|i<<2|n<<3)},g$12.createShadowCastVertexShader=function(e,t,i){var n=u$Z(e.useWGSL,!1),r=e.defines.slice(0),o=e.sources.slice(0);r.push("SHADOW_MAP"),i&&r.push("GENERATE_POSITION");var a=e$2e(s$V.findPositionVarying(e));if(t&&!a){for(var s=o.length,l=0;l<s;++l)o[l]=s$V.replaceMain(o[l],"czm_shadow_cast_main",n);o.push("varying vec3 v_positionEC; \nvoid main() \n{ \n czm_shadow_cast_main(); \n v_positionEC = (czm_inverseProjection * gl_Position).xyz; \n}")}return new s$V({name:e.name+"_shadowCast",defines:r,sources:o,useWGSL:e.useWGSL})},g$12.createShadowCastFragmentShader=function(e,t,i,n,r,o){var a=u$Z(e.useWGSL,!1),s=e.defines.slice(0),l=e.sources.slice(0),u=s$V.findPositionVarying(e),c=e$2e(u);c||(u="v_positionEC");for(var h=l.length,d=0;d<h;++d)l[d]=s$V.replaceMain(l[d],"czm_shadow_cast_main",a);var f="";return f=a?H$_(i,t,n,c,u):T$W(i,t,n,c,u,r),l.push(f),new s$V({name:e.name+"_shadowCast",defines:s,sources:l,useWGSL:e.useWGSL})},g$12.getShadowReceiveShaderKeyword=function(e,t,i,n){return"receiveShadow "+(e._usesDepthTexture|e._polygonOffsetSupported<<1|e._isPointLight<<2|e._isSpotLight<<3|(e._numberOfCascades>1)<<4|e.softShadows<<5|t<<6|i<<7|n<<8)},g$12.createShadowReceiveVertexShader=function(e,t,i){var n=e.defines.slice(0),r=e.sources.slice(0);return n.push("SHADOW_MAP"),t&&(i?n.push("GENERATE_POSITION_AND_NORMAL"):n.push("GENERATE_POSITION")),new s$V({name:e.name+"_shadowReceive",defines:n,sources:r,useWGSL:e.useWGSL})},g$12.createShadowReceiveFragmentShader=function(e,t,i,n,r,o){for(var a=u$Z(e.useWGSL,!1),s=s$V.findNormalVarying(e),l=!n&&e$2e(s)||n&&r,u=s$V.findPositionVarying(e),c=e$2e(u),h=t._usesDepthTexture,d=(t._polygonOffsetSupported,t._isPointLight),f=t._isSpotLight,p=t._numberOfCascades>1,_=(t.debugCascadeColors,t.softShadows),m=t._pcss,g=t._quality,x=d?t._pointBias:n?t._terrainBias:t._primitiveBias,y=e.defines.slice(0),v=e.sources.slice(0),$=!1,b=v.length,T=0;T<b;++T)if(v[T].indexOf("<shadowReceive>")>-1){$=!0;break}if(!$)for(T=0;T<b;++T)v[T]=s$V.replaceMain(v[T],"czm_shadow_receive_main",a);if(y.push("SHADOW_MAP"),d?y.push("USE_CUBE_MAP_SHADOW"):h&&y.push("USE_SHADOW_DEPTH_TEXTURE"),_&&!d&&(y.push("USE_SOFT_SHADOWS"),m&&(y.push("USE_PCSS"),0==g?y.push("LOW_QUALITY_SHADOW"):1==g?y.push("MEDIUM_QUALITY_SHADOW"):y.push("HIGH_QUALITY_SHADOW"))),f&&y.push("SPOT_LIGHT_SHADOW"),p?y.push("HAS_CASCADES"):y.push("NO_CASCADES"),n&&y.push("IS_TERRAIN"),p&&i&&n&&(l?y.push("ENABLE_VERTEX_LIGHTING"):y.push("ENABLE_DAYNIGHT_SHADING")),i&&x.normalShading&&(l||o)&&(y.push("USE_NORMAL_SHADING"),x.normalShadingSmooth>0&&y.push("USE_NORMAL_SHADING_SMOOTH")),(x.normalOffset&&l||o)&&y.push("APPLY_NORMAL_OFFSET"),!$){var C="",S=e.defines.indexOf("LOG_DEPTH")>-1,w=a?x$10:V$Q,E=a?U$Z:M$Y;C+=(S?a?"varying v_logPositionEC : vec3<f32>; \n":"varying vec3 v_logPositionEC; \n":"\n")+(a?b$15:R$V)(e,S,c,u)+w(l,s,o)+"#include <ShadowUboDecl> \n#include <shadowReceive> \n"+E(),v.push(C)}return new s$V({name:e.name+"shadowReceive",defines:y,sources:v,useWGSL:e.useWGSL})},Object.defineProperty(e$1C.prototype,"useUbo",{get:function(){return!this._noUBO},enumerable:!1,configurable:!0}),Object.defineProperty(e$1C.prototype,"isSync",{get:function(){return!this._needSync},enumerable:!1,configurable:!0}),e$1C.prototype.isDynamic=function(){return void 0!==this._dynamic},e$1C.prototype.getData=function(){return this._bufferData},e$1C.prototype.getBuffer=function(){return this._buffer},e$1C.prototype._fillAlignment=function(e){var t;if(t=e<=2?e:4,this._uniformLocationPointer%t!=0){var i=this._uniformLocationPointer;this._uniformLocationPointer+=t-this._uniformLocationPointer%t;for(var n=this._uniformLocationPointer-i,r=0;r<n;r++)this._data.push(0)}},e$1C.prototype.addUniform=function(e,t,i){if(void 0===i&&(i=0),!this._noUBO&&void 0===this._uniformLocations[e]){var n;if(i>0){if(t instanceof Array)throw"addUniform should not be use with Array in UBO: "+e;if(this._fillAlignment(4),this._uniformArraySizes[e]={strideSize:t,arraySize:i},16==t)t*=i;else t=t*i+(4-t)*i;n=[];for(var r=0;r<t;r++)n.push(0)}else{if(t instanceof Array)t=(n=t).length;else{t=t,n=[];for(r=0;r<t;r++)n.push(0)}this._fillAlignment(t)}this._uniformSizes[e]=t,this._uniformLocations[e]=this._uniformLocationPointer,this._uniformLocationPointer+=t;for(r=0;r<t;r++)this._data.push(n[r]);this._needSync=!0}},e$1C.prototype.addMatrix=function(e,t){this.addUniform(e,Array.prototype.slice.call(t.toArray()))},e$1C.prototype.addFloat2=function(e,t,i){var n=[t,i];this.addUniform(e,n)},e$1C.prototype.addFloat3=function(e,t,i,n){var r=[t,i,n];this.addUniform(e,r)},e$1C.prototype.addColor3=function(e,t){var i=[t.r,t.g,t.b];this.addUniform(e,i)},e$1C.prototype.addColor4=function(e,t,i){var n=[t.r,t.g,t.b,i];this.addUniform(e,n)},e$1C.prototype.addVector3=function(e,t){var i=[t.x,t.y,t.z];this.addUniform(e,i)},e$1C.prototype.addMatrix3x3=function(e){this.addUniform(e,12)},e$1C.prototype.addMatrix2x2=function(e){this.addUniform(e,8)},e$1C.prototype.create=function(){this._noUBO||this._buffer||(this._fillAlignment(4),this._bufferData=new Float32Array(this._data),this._rebuild(),this._needSync=!0)},e$1C.prototype._rebuild=function(){this._noUBO||!this._bufferData||(this._buffer=this._engine.createUniformBuffer(this._bufferData))},Object.defineProperty(e$1C.prototype,"_numBuffers",{get:function(){return this._buffers.length},enumerable:!1,configurable:!0}),Object.defineProperty(e$1C.prototype,"_indexBuffer",{get:function(){return this._bufferIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e$1C.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),e$1C.prototype._buffersEqual=function(e,t){for(var i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0},e$1C.prototype._copyBuffer=function(e,t){for(var i=0;i<e.length;++i)t[i]=e[i]},e$1C.prototype.update=function(){if(!this._noUBO){if(this.bindUniformBuffer(),!this._buffer)return void this.create();if(!this._needSync)return void(this._createBufferOnWrite=!1);if(this._buffers&&this._buffers.length>1&&this._buffers[this._bufferIndex][1]){if(this._buffersEqual(this._bufferData,this._buffers[this._bufferIndex][1]))return this._needSync=!1,void(this._createBufferOnWrite=!1);this._copyBuffer(this._bufferData,this._buffers[this._bufferIndex][1])}this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._needSync=!1,this._createBufferOnWrite=!1}},e$1C.prototype._createNewBuffer=function(){this._bufferIndex+1<this._buffers.length?(this._bufferIndex++,this._buffer=this._buffers[this._bufferIndex][0],this._createBufferOnWrite=!1,this._needSync=!0):this._rebuild()},e$1C.prototype._checkNewFrame=function(){},e$1C.prototype.updateUniform=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0===n){if(this._buffer)return void _0x50f23a.Error("Cannot add an uniform after UBO has been created.");this.addUniform(e,i),n=this._uniformLocations[e]}this._buffer||this.create();for(var r=!1,o=0;o<i;o++)(16===i||this._bufferData[n+o]!==_0xd79dde.FloatRound(t[o]))&&(r=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[n+o]=t[o]);this._needSync=this._needSync||r},e$1C.prototype.updateUniformArray=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0!==n){this._buffer||this.create();for(var r=this._uniformArraySizes[e],o=!1,a=0,s=0,l=0;l<i;l++)if(this._bufferData[n+4*s+a]!==_0xd79dde.FloatRound(t[l])&&(o=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[n+4*s+a]=t[l]),++a===r.strideSize){for(;a<4;a++)this._bufferData[n+4*s+a]=0;a=0,s++}this._needSync=this._needSync||o}else _0x50f23a.Error("Cannot add an uniform Array dynamically. Please, add it using addUniform.")},e$1C.prototype._cacheMatrix=function(e,t){this._checkNewFrame();var i=this._valueCache[e],n=t.updateFlag;return(void 0===i||i!==n)&&(this._valueCache[e]=n,!0)},e$1C.prototype._updateMatrix3x3ForUniform=function(e,t){for(var i=0;i<3;i++)e$1C._TempBuffer[4*i]=t[3*i],e$1C._TempBuffer[4*i+1]=t[3*i+1],e$1C._TempBuffer[4*i+2]=t[3*i+2],e$1C._TempBuffer[4*i+3]=0;this.updateUniform(e,e$1C._TempBuffer,12)},e$1C.prototype._updateMatrix3x3ForEffect=function(e,t){this._currentEffect.setMatrix3x3(e,t)},e$1C.prototype._updateMatrix2x2ForEffect=function(e,t){this._currentEffect.setMatrix2x2(e,t)},e$1C.prototype._updateMatrix2x2ForUniform=function(e,t){for(var i=0;i<2;i++)e$1C._TempBuffer[4*i]=t[2*i],e$1C._TempBuffer[4*i+1]=t[2*i+1],e$1C._TempBuffer[4*i+2]=0,e$1C._TempBuffer[4*i+3]=0;this.updateUniform(e,e$1C._TempBuffer,8)},e$1C.prototype._updateFloatForEffect=function(e,t){this._currentEffect.setFloat(e,t)},e$1C.prototype._updateFloatForUniform=function(e,t){e$1C._TempBuffer[0]=t,this.updateUniform(e,e$1C._TempBuffer,1)},e$1C.prototype._updateFloat2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setFloat2(e+n,t,i)},e$1C.prototype._updateFloat2ForUniform=function(e,t,i){e$1C._TempBuffer[0]=t,e$1C._TempBuffer[1]=i,this.updateUniform(e,e$1C._TempBuffer,2)},e$1C.prototype._updateFloat3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setFloat3(e+r,t,i,n)},e$1C.prototype._updateFloat3ForUniform=function(e,t,i,n){e$1C._TempBuffer[0]=t,e$1C._TempBuffer[1]=i,e$1C._TempBuffer[2]=n,this.updateUniform(e,e$1C._TempBuffer,3)},e$1C.prototype._updateFloat4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setFloat4(e+o,t,i,n,r)},e$1C.prototype._updateFloat4ForUniform=function(e,t,i,n,r){e$1C._TempBuffer[0]=t,e$1C._TempBuffer[1]=i,e$1C._TempBuffer[2]=n,e$1C._TempBuffer[3]=r,this.updateUniform(e,e$1C._TempBuffer,4)},e$1C.prototype._updateFloatArrayForEffect=function(e,t){this._currentEffect.setFloatArray(e,t)},e$1C.prototype._updateFloatArrayForUniform=function(e,t){this.updateUniformArray(e,t,t.length)},e$1C.prototype._updateArrayForEffect=function(e,t){this._currentEffect.setArray(e,t)},e$1C.prototype._updateArrayForUniform=function(e,t){this.updateUniformArray(e,t,t.length)},e$1C.prototype._updateIntArrayForEffect=function(e,t){this._currentEffect.setIntArray(e,t)},e$1C.prototype._updateIntArrayForUniform=function(e,t){e$1C._TempBufferInt32View.set(t),this.updateUniformArray(e,e$1C._TempBuffer,t.length)},e$1C.prototype._updateMatrixForEffect=function(e,t){this._currentEffect.setMatrix(e,t)},e$1C.prototype._updateMatrixForUniform=function(e,t){this._cacheMatrix(e,t)&&this.updateUniform(e,t.toArray(),16)},e$1C.prototype._updateMatricesForEffect=function(e,t){this._currentEffect.setMatrices(e,t)},e$1C.prototype._updateMatricesForUniform=function(e,t){this.updateUniform(e,t,t.length)},e$1C.prototype._updateVector3ForEffect=function(e,t){this._currentEffect.setVector3(e,t)},e$1C.prototype._updateVector3ForUniform=function(e,t){e$1C._TempBuffer[0]=t.x,e$1C._TempBuffer[1]=t.y,e$1C._TempBuffer[2]=t.z,this.updateUniform(e,e$1C._TempBuffer,3)},e$1C.prototype._updateVector4ForEffect=function(e,t){this._currentEffect.setVector4(e,t)},e$1C.prototype._updateVector4ForUniform=function(e,t){e$1C._TempBuffer[0]=t.x,e$1C._TempBuffer[1]=t.y,e$1C._TempBuffer[2]=t.z,e$1C._TempBuffer[3]=t.w,this.updateUniform(e,e$1C._TempBuffer,4)},e$1C.prototype._updateColor3ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setColor3(e+i,t)},e$1C.prototype._updateColor3ForUniform=function(e,t){e$1C._TempBuffer[0]=t.r,e$1C._TempBuffer[1]=t.g,e$1C._TempBuffer[2]=t.b,this.updateUniform(e,e$1C._TempBuffer,3)},e$1C.prototype._updateColor4ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setColor4(e+n,t,i)},e$1C.prototype._updateDirectColor4ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setDirectColor4(e+i,t)},e$1C.prototype._updateColor4ForUniform=function(e,t,i){e$1C._TempBuffer[0]=t.red,e$1C._TempBuffer[1]=t.green,e$1C._TempBuffer[2]=t.blue,e$1C._TempBuffer[3]=i,this.updateUniform(e,e$1C._TempBuffer,4)},e$1C.prototype._updateDirectColor4ForUniform=function(e,t){e$1C._TempBuffer[0]=t.red,e$1C._TempBuffer[1]=t.green,e$1C._TempBuffer[2]=t.blue,e$1C._TempBuffer[3]=t.alpha,this.updateUniform(e,e$1C._TempBuffer,4)},e$1C.prototype._updateIntForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setInt(e+i,t)},e$1C.prototype._updateIntForUniform=function(e,t){e$1C._TempBufferInt32View[0]=t,this.updateUniform(e,e$1C._TempBuffer,1)},e$1C.prototype._updateInt2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setInt2(e+n,t,i)},e$1C.prototype._updateInt2ForUniform=function(e,t,i){e$1C._TempBufferInt32View[0]=t,e$1C._TempBufferInt32View[1]=i,this.updateUniform(e,e$1C._TempBuffer,2)},e$1C.prototype._updateInt3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setInt3(e+r,t,i,n)},e$1C.prototype._updateInt3ForUniform=function(e,t,i,n){e$1C._TempBufferInt32View[0]=t,e$1C._TempBufferInt32View[1]=i,e$1C._TempBufferInt32View[2]=n,this.updateUniform(e,e$1C._TempBuffer,3)},e$1C.prototype._updateInt4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setInt4(e+o,t,i,n,r)},e$1C.prototype._updateInt4ForUniform=function(e,t,i,n,r){e$1C._TempBufferInt32View[0]=t,e$1C._TempBufferInt32View[1]=i,e$1C._TempBufferInt32View[2]=n,e$1C._TempBufferInt32View[3]=r,this.updateUniform(e,e$1C._TempBuffer,4)},e$1C.prototype.setTexture=function(e,t){this._currentEffect.setTexture(e,t)},e$1C.prototype.updateUniformDirectly=function(e,t){this.updateUniform(e,t,t.length),this.update()},e$1C.prototype.bindToEffect=function(e,t){this._currentEffect=e,this._currentEffectName=t},e$1C.prototype.bindUniformBuffer=function(){!this._noUBO&&this._buffer&&this._currentEffect&&this._currentEffect.bindUniformBuffer(this._buffer,this._currentEffectName)},e$1C.prototype.unbindEffect=function(){this._currentEffect=void 0,this._currentEffectName=void 0},e$1C.prototype.setDataBuffer=function(e){if(!this._buffers)return this._buffer===e;for(var t=0;t<this._buffers.length;++t){if(this._buffers[t][0]===e)return this._bufferIndex=t,this._buffer=e,this._createBufferOnWrite=!1,this._currentEffect=void 0,!0}return!1},e$1C.prototype.dispose=function(){if(!this._noUBO){var e=this._engine._uniformBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)}},e$1C._UpdatedUbosInFrame={},e$1C._MAX_UNIFORM_SIZE=256,e$1C._TempBuffer=new Float32Array(e$1C._MAX_UNIFORM_SIZE),e$1C._TempBufferInt32View=new Uint32Array(e$1C._TempBuffer.buffer);var _0x1153cf=(_0x30a060=!0,function(e,t){var i=_0x30a060?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30a060=!1,i}),_0x43ec15=_0x1153cf(void 0,(function(){return _0x43ec15.toString().search("(((.+)+)+)+$").toString().constructor(_0x43ec15).search("(((.+)+)+)+$")})),_0x30a060;_0x43ec15();const _0x1a3179="shadowMap_texture",_0x1db7f3="shadowMap_textureCube",_0xcffe67="u_shadowDepth";function _0x32f9aa(e,t){var i=_0x37a515.call(this)||this;i._name=_0x2e0417.SHADOW,i._shadowMap=e,i._shadowMapTexture=void 0,i._shadowMapTextureCube=void 0,i._shadowMapDepthTexture=void 0,this._initUniformMap(t)}_0x37a515&&(_0x32f9aa.__proto__=_0x37a515),_0x32f9aa.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x32f9aa.prototype.constructor=_0x37a515,Object.defineProperties(_0x32f9aa.prototype,{}),_0x32f9aa.prototype._initUBOStruct=function(){this._ubo.addUniform("shadowMap_matrix",16),this._ubo.addUniform("shadowMap_texelSizeDepthBiasAndNormalShadingSmooth",4),this._ubo.addUniform("shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness",4),this._ubo.addUniform("shadowMap_cascadeMatrices",4,16),this._ubo.addUniform("shadowMap_cascadeSplits",4,2),this._ubo.addUniform("shadowMap_lightPositionEC",4),this._ubo.addUniform("shadowMap_lightDirectionEC",3),this._ubo.addUniform("shadowMap_penumbraRatio",1)},_0x32f9aa.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())};var _0x1d4426=new Float32Array(16),_0x5dbab2=new Matrix;_0x32f9aa.prototype.update=function(e){!e.webgpu&&!e.webgl2||(e$2e(this._ubo)||this._initUBO(e),this._updateUniforms(),this._updateTextures(),this._isValueDirty=!1)},_0x32f9aa.prototype._updateTextures=function(){var e=this._shadowMap;e._isPointLight?this._shadowMapTextureCube=e._shadowMapTexture:this._shadowMapTexture=e._shadowMapTexture,this._shadowMapDepthTexture=e._shadowMapDepthTexture},_0x32f9aa.prototype._updateUniforms=function(){var e=this._shadowMap;p$1d.toArray(e._shadowMapMatrix,_0x1d4426),Matrix.FromArrayToRef(_0x1d4426,0,_0x5dbab2),this._ubo.updateMatrix("shadowMap_matrix",_0x5dbab2);var t=[];e$2c.pack(e._cascadeSplits[0],t,0),e$2c.pack(e._cascadeSplits[1],t,4),this._ubo.updateFloatArray("shadowMap_cascadeSplits",t),t=[],p$1d.pack(e._cascadeMatrices[0],t,0),p$1d.pack(e._cascadeMatrices[1],t,16),p$1d.pack(e._cascadeMatrices[2],t,32),p$1d.pack(e._cascadeMatrices[3],t,48),this._ubo.updateFloatArray("shadowMap_cascadeMatrices",t),this._ubo.updateFloat3("shadowMap_lightDirectionEC",e._lightDirectionEC.x,e._lightDirectionEC.y,e._lightDirectionEC.z),this._ubo.updateFloat4("shadowMap_lightPositionEC",e._lightPositionEC.x,e._lightPositionEC.y,e._lightPositionEC.z,e._lightPositionEC.w);var i=e._primitiveBias,n=1/e._textureSize.x,r=1/e._textureSize.y;this._ubo.updateFloat4("shadowMap_texelSizeDepthBiasAndNormalShadingSmooth",n,r,i.depthBias,i.normalShadingSmooth),this._ubo.updateFloat4("shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness",i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness),this._ubo.updateFloat("shadowMap_penumbraRatio",e._pcssPenumbraRatio),this._ubo.update()},_0x32f9aa.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),this._setTextureToEffect(e,this._shadowMapTexture,_0x1a3179),this._setTextureToEffect(e,this._shadowMapTextureCube,_0x1db7f3),this._setTextureToEffect(e,this._shadowMapDepthTexture,_0xcffe67)},_0x32f9aa.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}};var _0x3c6e46=new e$2c,_0x554215=new e$2c,_0x20b6e1=new o$1o;function C$Z(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context;if(!e$2e(t))throw new t$15("context is required.");if(!e$2e(e.lightCamera))throw new t$15("lightCamera is required.");if(e$2e(e.numberOfCascades)&&1!==e.numberOfCascades&&4!==e.numberOfCascades)throw new t$15("Only one or four cascades are supported.");this._enabled=u$Z(e.enabled,!0),this._softShadows=u$Z(e.softShadows,!0),this._pcss=u$Z(e.pcss,!0),this._quality=u$Z(e.shadowQuality,0),this._normalOffset=u$Z(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=u$Z(e.fromLightSource,!0),this.darkness=u$Z(e.darkness,.5),this._darkness=this.darkness,this.maximumDistance=u$Z(e.maximumDistance,1e3),this.minimumDistance=void 0,this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;var i,n=!0;(s$Z.isInternetExplorer()||s$Z.isEdge()||(s$Z.isChrome()||s$Z.isFirefox())&&s$Z.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n,this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new p$1d,this._shadowMapTexture=void 0,this._lightDirectionEC=new o$1p,this._lightPositionEC=new e$2c,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new $$S,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new i$1d,this._isPointLight=u$Z(e.isPointLight,!1),this._pointLightRadius=u$Z(e.pointLightRadius,100),this._cascadesEnabled=!this._isPointLight&&u$Z(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?u$Z(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[5,50,500,Number.MAX_VALUE],this._textureSize=new o$1o,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new l$11:e$2e(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new e$2c,new e$2c],this._cascadeMatrices=[new p$1d,new p$1d,new p$1d,new p$1d],this._cascadeDistances=new e$2c,this._cascadeUVRange=[new e$2c,new e$2c,new e$2c,new e$2c],i=this._isPointLight?6:this._cascadesEnabled?this._numberOfCascades:1,this._passes=new Array(i);for(var r=0;r<i;++r)this._passes[r]=new et$f(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._webgpu=t.webgpu,this._usesDepthTexture=t.depthTexture&&!this._webgpu,this._isPointLight&&(this._usesDepthTexture=!1),t.webgl2,this._pcss?(this._lambda=.5,this.darkness=.2,this._darkness=this.darkness):this._lambda=.9,this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,ne$F(this),this._clearCommand=new t$W({depth:1,color:new e$1X}),this._clearPassState=new n$$(t),this._size=u$Z(e.size,2048),this.size=this._size,this._pcssPenumbraRatio=.1,this._ubo=new _0x32f9aa(this,t)}function et$f(e){this.camera=new $$S,this.passState=new n$$(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0,this.uvRange=new e$2c}function ie$C(e,t){return d$1m.fromCache({cull:{enabled:!0,face:G$1a.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function ne$F(e){var t=!e._usesDepthTexture||e._pcss;e._primitiveRenderState=ie$C(t,e._primitiveBias),e._terrainRenderState=ie$C(t,e._terrainBias),e._pointRenderState=ie$C(t,e._pointBias)}function ae$w(e){for(var t=e._passes.length,i=0;i<t;++i){var n=e._passes[i],r=n.framebuffer;e$2e(r)&&!r.isDestroyed()&&r.destroy(),n.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function X$S(e,t){return new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:e?tt$i.LINEAR:tt$i.NEAREST,magnificationFilter:e?rt$k.LINEAR:rt$k.NEAREST,comparisonFunction:t?de$y.LESS:void 0})}function tt$f(e,t){for(var i=new t$U({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$12.DEPTH_COMPONENT,pixelDatatype:_$_.UNSIGNED_SHORT}),n=new t$U({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:X$S(!0)}),r=new t$V({context:t,depthTexture:i,colorTextures:[n],destroyAttachments:!1}),o=e._passes.length,a=0;a<o;++a){var s=e._passes[a];s.framebuffer=r,s.passState.framebuffer=r}e._shadowMapTexture=n,e._depthAttachment=i,e._colorAttachment=n}function rt$h(e,t){for(var i=new t$U({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8,sampler:X$S()}),n=new t$V({context:t,depthStencilTexture:i,destroyAttachments:!1}),r=e._passes.length,o=0;o<r;++o){var a=e._passes[o];a.framebuffer=n,a.passState.framebuffer=n}e._shadowMapTexture=i,e._depthAttachment=i}function it$b(e,t){for(var i=new t$U({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:X$S(!1)}),n=new t$U({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:t.webgpu?V$12.DEPTH_COMPONENT32F:V$12.DEPTH_COMPONENT,pixelDatatype:_$_.FLOAT,sampler:X$S(!0,!0)}),r=new t$V({context:t,colorTextures:[i],depthTexture:n,destroyAttachments:!1}),o=e._passes.length,a=0;a<o;++a){var s=e._passes[a];s.framebuffer=r,s.passState.framebuffer=r}e._shadowMapDepthTexture=n,e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function nt$c(e,t){for(var i=new t$U({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$12.DEPTH_COMPONENT16,pixelDatatype:_$_.UNSIGNED_SHORT}),n=new e$1P({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:X$S(!0)}),r=[n.negativeX,n.negativeY,n.negativeZ,n.positiveX,n.positiveY,n.positiveZ],o=0;o<6;++o){var a=new t$V({context:t,depthTexture:i,colorTextures:[r[o]],destroyAttachments:!1}),s=e._passes[o];s.framebuffer=a,s.passState.framebuffer=a}e._shadowMapTexture=n,e._depthAttachment=depthRenderbuffer,e._colorAttachment=n}function we$j(e,t){e._isPointLight?nt$c(e,t):e._pcss?it$b(e,t):e._usesDepthTexture?rt$h(e,t):tt$f(e,t)}function at$d(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==de$y.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,ne$F(e),ae$w(e),we$j(e,t))}function st$8(e,t){(!e$2e(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(ae$w(e),we$j(e,t),at$d(e,t),Ee$n(e,t))}function Ee$n(e,t,i){i=u$Z(i,0),(e._isPointLight||0===i)&&(e._clearCommand.framebuffer=e._passes[i].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function ut$b(e,t){e._size=t;var i=e._passes,n=i.length,r=e._textureSize;if(e._isPointLight){t=e$1W.maximumCubeMapSize>=t?t:e$1W.maximumCubeMapSize,r.x=t,r.y=t;var o=new f$1a(0,0,t,t);i[0].passState.viewport=o,i[1].passState.viewport=o,i[2].passState.viewport=o,i[3].passState.viewport=o,i[4].passState.viewport=o,i[5].passState.viewport=o}else 1===n?(t=e$1W.maximumTextureSize>=t?t:e$1W.maximumTextureSize,r.x=t,r.y=t,i[0].passState.viewport=new f$1a(0,0,t,t)):4===n&&(t=e$1W.maximumTextureSize>=2*t?t:e$1W.maximumTextureSize/2,r.x=2*t,r.y=2*t,i[0].passState.viewport=new f$1a(0,0,t,t),i[1].passState.viewport=new f$1a(t,0,t,t),i[2].passState.viewport=new f$1a(0,t,t,t),i[3].passState.viewport=new f$1a(t,t,t,t));e._clearPassState.viewport=new f$1a(0,0,r.x,r.y);for(var a=0;a<n;++a){var s=i[a],l=s.passState.viewport,u=l.x/r.x,c=l.y/r.y,h=l.width/r.x,d=l.height/r.y;s.textureOffsets=new p$1d(h,0,0,u,0,d,0,c,0,0,1,0,0,0,0,1),s.uvRange.x=u,s.uvRange.y=u+.5,s.uvRange.z=c,s.uvRange.w=c+.5}}_0x32f9aa.prototype._initUniformMap=function(e){var t=this._shadowMap,i={};if(!e.webgl2&&!e.webgpu){var n=t._isPointLight?t._pointBias:t._primitiveBias;i.shadowMap_matrix=function(){return t._shadowMapMatrix},i.shadowMap_cascadeSplits=function(){return t._cascadeSplits},i.shadowMap_cascadeMatrices=function(){return t._cascadeMatrices},i.shadowMap_cascadeUVRange=function(){return t._cascadeUVRange},i.shadowMap_lightDirectionEC=function(){return t._lightDirectionEC},i.shadowMap_lightPositionEC=function(){return t._lightPositionEC},i.shadowMap_cascadeDistances=function(){return t._cascadeDistances},i.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth=function(){var e=_0x20b6e1;return e.x=1/t._textureSize.x,e.y=1/t._textureSize.y,e$2c.fromElements(e.x,e.y,n.depthBias,n.normalShadingSmooth,_0x3c6e46)},i.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness=function(){return e$2c.fromElements(n.normalOffsetScale,t._distance,t.maximumDistance,t._darkness,_0x554215)},i.shadowMap_penumbraRatio=function(){return t._pcssPenumbraRatio}}i.shadowMap_texture=function(){return t._shadowMapTexture},i.shadowMap_textureCube=function(){return t._shadowMapTexture},i.u_shadowDepth=function(){return t._shadowMapDepthTexture},this._uniformMap=i},_0x32f9aa.prototype.isDestroyed=function(){return!1},_0x32f9aa.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)},C$Z.MAXIMUM_DISTANCE=2e4,C$Z.NEAR_PLANE=1,C$Z.UPDATE_CASCADE_TOLERANCE_DISTANCE=1,C$Z.prototype.debugCreateRenderStates=function(){ne$F(this)},Object.defineProperties(C$Z.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){ut$b(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}},penumbraRatio:{get:function(){return this._pcssPenumbraRatio},set:function(e){this._pcssPenumbraRatio=e}}});var ot$a=new f$1a;function mt$6(e,t){var i;i=e._isPointLight?"uniform samplerCube shadowMap_textureCube; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n vec2 uv = v_textureCoordinates; \n vec3 dir; \n \n if (uv.y < 0.5) \n { \n if (uv.x < 0.333) \n { \n dir.x = -1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = -1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else \n { \n dir.z = -1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 1.0; \n } \n } \n else \n { \n if (uv.x < 0.333) \n { \n dir.x = 1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = 1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else \n { \n dir.z = 1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 3.0; \n } \n } \n \n float shadow = czm_unpackDepth(textureCube(shadowMap_textureCube, dir)); \n gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n":"uniform sampler2D shadowMap_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n"+(e._usesDepthTexture?" float shadow = texture2D(shadowMap_texture, v_textureCoordinates).r; \n":" float shadow = czm_unpackDepth(texture2D(shadowMap_texture, v_textureCoordinates)); \n")+" gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n";var n=t.createViewportQuadCommand(i,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return n.pass=Le$q.OVERLAY,n}function ft$9(e,t){var i=t.context,n=t.context.drawingBufferWidth,r=t.context.drawingBufferHeight,o=.3*Math.min(n,r),a=ot$a;a.x=n-o,a.y=0,a.width=o,a.height=o;var s=e._debugShadowViewCommand;e$2e(s)||(s=mt$6(e,i),e._debugShadowViewCommand=s),(!e$2e(s.renderState)||!f$1a.equals(s.renderState.viewport,a))&&(s.renderState=d$1m.fromCache({viewport:f$1a.clone(a)})),t.commandList.push(e._debugShadowViewCommand)}var A$12=new Array(8);A$12[0]=new e$2c(-1,-1,-1,1),A$12[1]=new e$2c(1,-1,-1,1),A$12[2]=new e$2c(1,1,-1,1),A$12[3]=new e$2c(-1,1,-1,1),A$12[4]=new e$2c(-1,-1,1,1),A$12[5]=new e$2c(1,-1,1,1),A$12[6]=new e$2c(1,1,1,1),A$12[7]=new e$2c(-1,1,1,1);for(var N$R=new p$1d,se$y=new Array(8),ue$A=0;ue$A<8;++ue$A)se$y[ue$A]=new e$2c;function ct$a(e,t){return new y$R({geometryInstances:[new d$1o({geometry:new o$17({minimum:new o$1p(-.5,-.5,-.5),maximum:new o$1p(.5,.5,.5)}),attributes:{color:o$16.fromColor(t)}}),new d$1o({geometry:new a$U({radius:.5}),attributes:{color:o$16.fromColor(t)}})],appearance:new t$Q({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var ht$9=[e$1X.RED,e$1X.GREEN,e$1X.BLUE,e$1X.MAGENTA],_t$8=new o$1p;function lt$5(e,t){ft$9(e,t);var i=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(i&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new p$V({camera:e._sceneCamera,color:e$1X.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){i&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new p$V({camera:e._shadowMapCamera,color:e$1X.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t);for(var n=0;n<e._numberOfCascades;++n)i&&(e._debugCascadeFrustums[n]=e._debugCascadeFrustums[n]&&e._debugCascadeFrustums[n].destroy(),e._debugCascadeFrustums[n]=new p$V({camera:e._passes[n].camera,color:ht$9[n],updateOnChange:!1})),e._debugCascadeFrustums[n].update(t)}}else if(e._isPointLight){if(!e$2e(e._debugLightFrustum)||e._needsUpdate){var r=e._shadowMapCamera.positionWC,o=n$15.IDENTITY,a=2*e._pointLightRadius,s=o$1p.fromElements(a,a,a,_t$8),l=p$1d.fromTranslationQuaternionRotationScale(r,o,s,N$R);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=ct$a(l,e$1X.YELLOW)}e._debugLightFrustum.update(t)}else(!e$2e(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new p$V({camera:e._shadowMapCamera,color:e$1X.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function $$S(){this.viewMatrix=new p$1d,this.inverseViewMatrix=new p$1d,this.frustum=void 0,this.positionCartographic=new a$18,this.positionWC=new o$1p,this.directionWC=o$1p.clone(o$1p.UNIT_Z),this.upWC=o$1p.clone(o$1p.UNIT_Y),this.rightWC=o$1p.clone(o$1p.UNIT_X),this.viewProjectionMatrix=new p$1d}$$S.prototype.clone=function(e){p$1d.clone(e.viewMatrix,this.viewMatrix),p$1d.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),a$18.clone(e.positionCartographic,this.positionCartographic),o$1p.clone(e.positionWC,this.positionWC),o$1p.clone(e.directionWC,this.directionWC),o$1p.clone(e.upWC,this.upWC),o$1p.clone(e.rightWC,this.rightWC)};var dt$a=new p$1d(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);$$S.prototype.getViewProjection=function(){var e=this.viewMatrix,t=this.frustum.projectionMatrix;return p$1d.multiply(t,e,this.viewProjectionMatrix),p$1d.multiply(dt$a,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var vt$a=new Array(5),gt$7=new Array(4),Ct$7=new Array(4),pt$a=new o$15,xt$8=new Array(4),Oe$m=new o$1p,Fe$k=new o$1p;function St$6(e,t){var i,n=e._shadowMapCamera,r=e._sceneCamera,o=r.frustum.near,a=r.frustum.far,s=e._numberOfCascades,l=a-o,u=a/o,c=e._lambda,h=!1;t.shadowState.closestObjectSize<200&&(h=!0,c=.95);var d=xt$8,f=vt$a;for(f[0]=o,f[s]=a,i=0;i<s;++i){var p=(i+1)/s,_=o*Math.pow(u,p),m=o+l*p,g=e$2d.lerp(m,_,c);f[i+1]=g,d[i]=g-f[i]}if(h){for(i=0;i<s;++i)d[i]=Math.min(d[i],e._maximumCascadeDistances[i]);var x=f[0];for(i=0;i<s-1;++i)x+=d[i],f[i+1]=x}var y=gt$7,v=Ct$7;for(i=0;i<s;++i)y[i]=f[i],v[i]=f[i+1],0==i?v[i]+=C$Z.UPDATE_CASCADE_TOLERANCE_DISTANCE:(y[i]-=C$Z.UPDATE_CASCADE_TOLERANCE_DISTANCE,v[i]+=2*C$Z.UPDATE_CASCADE_TOLERANCE_DISTANCE);e$2c.unpack(y,0,e._cascadeSplits[0]),e$2c.unpack(v,0,e._cascadeSplits[1]),e$2c.unpack(d,0,e._cascadeDistances);var $=n.frustum,b=$.left,T=$.right,C=$.bottom,S=$.top,w=$.near,E=$.far,P=n.positionWC,A=n.directionWC,L=n.upWC,M=r.frustum.clone(pt$a),R=n.getViewProjection();for(i=0;i<s;++i){M.near=y[i],M.far=v[i];for(var O=p$1d.multiply(M.projectionMatrix,r.viewMatrix,N$R),D=p$1d.inverse(O,N$R),I=p$1d.multiply(R,D,N$R),F=o$1p.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Oe$m),B=o$1p.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,Fe$k),N=0;N<8;++N){var G=e$2c.clone(A$12[N],se$y[N]);p$1d.multiplyByVector(I,G,G),o$1p.divideByScalar(G,G.w,G),o$1p.minimumByComponent(G,F,F),o$1p.maximumByComponent(G,B,B)}F.x=Math.max(F.x,0),F.y=Math.max(F.y,0),F.z=0,B.x=Math.min(B.x,1),B.y=Math.min(B.y,1),B.z=Math.min(B.z,1);var z=e._passes[i],U=z.camera;U.clone(n);var V=U.frustum;V.left=b+F.x*(T-b),V.right=b+B.x*(T-b),V.bottom=C+F.y*(S-C),V.top=C+B.y*(S-C),V.near=w+F.z*(E-w),V.far=w+B.z*(E-w),z.cullingVolume=U.frustum.computeCullingVolume(P,A,L)}}function bt$8(e){var t,i=e._sceneCamera,n=e._numberOfCascades;for(t=0;t<n;++t){var r=e._passes[t],o=r.camera,a=e._cascadeMatrices[t];p$1d.multiply(o.getViewProjection(),i.inverseViewMatrix,a),p$1d.multiply(r.textureOffsets,a,a),e$2c.clone(r.uvRange,e._cascadeUVRange[t])}}var yt$8=new p$1d,wt$8=new o$1p,Et$9=new o$1p,Te$n=new o$1p;function Ot$9(e,t){var i=e._shadowMapCamera,n=e._sceneCamera,r=p$1d.multiply(n.frustum.projectionMatrix,n.viewMatrix,N$R),o=p$1d.inverse(r,N$R),a=i.directionWC,s=n.directionWC,l=o$1p.cross(a,s,wt$8);s=o$1p.cross(l,a,Et$9),o$1p.normalize(s,s),o$1p.normalize(l,l);for(var u=o$1p.fromElements(0,0,0,Te$n),c=p$1d.computeView(u,a,s,l,yt$8),h=p$1d.multiply(c,o,N$R),d=o$1p.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Oe$m),f=o$1p.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,Fe$k),p=0;p<8;++p){var _=e$2c.clone(A$12[p],se$y[p]);p$1d.multiplyByVector(h,_,_),o$1p.divideByScalar(_,_.w,_),o$1p.minimumByComponent(_,d,d),o$1p.maximumByComponent(_,f,f)}f.z+=1e3,d.z-=10;var m=Te$n;m.x=-.5*(d.x+f.x),m.y=-.5*(d.y+f.y),m.z=-f.z;var g=p$1d.fromTranslation(m,N$R);c=p$1d.multiply(g,c,c);var x=.5*(f.x-d.x),y=.5*(f.y-d.y),v=f.z-d.z,$=i.frustum;$.left=-x,$.right=x,$.bottom=-y,$.top=y,$.near=e._webgpu?.01:-v,$.far=v,p$1d.clone(c,i.viewMatrix),p$1d.inverse(c,i.inverseViewMatrix),p$1d.getTranslation(i.inverseViewMatrix,i.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(i.positionWC,i.positionCartographic),o$1p.clone(a,i.directionWC),o$1p.clone(s,i.upWC),o$1p.clone(l,i.rightWC)}var Ft$7=[new o$1p(-1,0,0),new o$1p(0,-1,0),new o$1p(0,0,-1),new o$1p(1,0,0),new o$1p(0,1,0),new o$1p(0,0,1)],Tt$a=[new o$1p(0,-1,0),new o$1p(0,0,-1),new o$1p(0,-1,0),new o$1p(0,-1,0),new o$1p(0,0,1),new o$1p(0,-1,0)],At$7=[new o$1p(0,0,1),new o$1p(1,0,0),new o$1p(-1,0,0),new o$1p(0,0,-1),new o$1p(1,0,0),new o$1p(1,0,0)];function Pt$6(e,t){var i=new o$15;i.fov=e$2d.PI_OVER_TWO,i.near=1,i.far=e._pointLightRadius,i.aspectRatio=1;for(var n=0;n<6;++n){var r=e._passes[n].camera;r.positionWC=e._shadowMapCamera.positionWC,r.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(r.positionWC,r.positionCartographic),r.directionWC=Ft$7[n],r.upWC=Tt$a[n],r.rightWC=At$7[n],p$1d.computeView(r.positionWC,r.directionWC,r.upWC,r.rightWC,r.viewMatrix),p$1d.inverse(r.viewMatrix,r.inverseViewMatrix),r.frustum=i}}var Dt$9=new o$1p,Lt$7=new o$1p,Ae$r=new i$1d,Pe$j=Ae$r.center;function Vt$8(e,t){var i=e._sceneCamera,n=e._shadowMapCamera,r=Ae$r;if(e._cascadesEnabled){if(i.frustum.near>=e.maximumDistance)return e._outOfView=!0,void(e._needsUpdate=!1);var o=t.mapProjection.ellipsoid.geodeticSurfaceNormal(i.positionWC,Dt$9),a=o$1p.negate(n.directionWC,Lt$7),s=o$1p.dot(o,a),l=e$2d.clamp(s/.1,0,1);if(e._darkness=e$2d.lerp(1,e.darkness,l),s<0)return e._outOfView=!0,void(e._needsUpdate=!1);e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)r.center=n.positionWC,r.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(r)===Ae$w.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),i$1d.clone(r,e._boundingSphere);else{var u=n.frustum.far/2,c=o$1p.add(n.positionWC,o$1p.multiplyByScalar(n.directionWC,u,Pe$j),Pe$j);r.center=c,r.radius=u,e._outOfView=t.cullingVolume.computeVisibility(r)===Ae$w.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),i$1d.clone(r,e._boundingSphere)}}function Nt$8(e,t){var i=t.camera,n=e._lightCamera,r=e._sceneCamera,o=e._shadowMapCamera;e._cascadesEnabled?o$1p.clone(n.directionWC,o.directionWC):e._isPointLight?o$1p.clone(n.positionWC,o.positionWC):o.clone(n);var a,s,l=e._lightDirectionEC;p$1d.multiplyByPointAsVector(i.viewMatrix,o.directionWC,l),o$1p.normalize(l,l),o$1p.negate(l,l),p$1d.multiplyByPoint(i.viewMatrix,o.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius,e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),s=Math.min(t.shadowState.farPlane,e.maximumDistance+1),s=Math.max(s,a+1)):(a=i.frustum.near,s=e.maximumDistance),e._sceneCamera=v$K.clone(i,r),i.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=s,e._distance=s-a,Vt$8(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}function Rt$9(e,t,i,n,r,o){var a,s,l;if(e$2e(o)&&(a=o.shaderProgram,s=o.renderState,l=o.uniformMap),(o=i$$.shallowClone(i,o)).castShadows=!0,o.receiveShadows=!1,!e$2e(a)||r!==i.shaderProgram.id||t){var u=i.shaderProgram,c=i.pass===Le$q.GLOBE,h=i.pass!==Le$q.TRANSLUCENT,d=e._isPointLight,f=e._usesDepthTexture,p=i.selectCastShadows,_=g$12.getShadowCastShaderKeyword(d,c,f,h);if(!e$2e(a=n.shaderCache.getDerivedShaderProgram(u,_))){var m=u.vertexShaderSource,g=u.fragmentShaderSource,x=g$12.createShadowCastVertexShader(m,d,c),y=g$12.createShadowCastFragmentShader(g,d,f,h,o,p);a=n.shaderCache.createDerivedShaderProgram(u,_,{vertexShaderSource:x,fragmentShaderSource:y,attributeLocations:u._attributeLocations})}s=e._primitiveRenderState,d?s=e._pointRenderState:c&&(s=e._terrainRenderState),i.renderState.cull.enabled||((s=l$1f(s,!1)).cull=l$1f(s.cull,!1),s.cull.enabled=!1,s=d$1m.fromCache(s)),l=i.uniformMap}return o.shaderProgram=a,o.renderState=s,o.uniformMap=l,o}C$Z.prototype.update=function(e){if(Nt$8(this,e),this._needsUpdate)if(st$8(this,e.context),this._isPointLight&&Pt$6(this,e),this._cascadesEnabled&&(Ot$9(this,e),this._numberOfCascades>1&&St$6(this,e),this._numberOfCascades>1&&bt$8(this)),this._isPointLight)this._shadowMapCullingVolume=i$X.fromBoundingSphere(this._boundingSphere);else{var t=this._shadowMapCamera,i=t.positionWC,n=t.directionWC,r=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(i,n,r),1===this._passes.length&&this._passes[0].camera.clone(t)}if(1===this._passes.length){var o=this._sceneCamera.inverseViewMatrix;p$1d.multiply(this._shadowMapCamera.getViewProjection(),o,this._shadowMapMatrix)}this.debugShow&<$5(this,e),this._ubo.update(e.context)},C$Z.prototype.updatePass=function(e,t){Ee$n(this,e,t)},C$Z.createReceiveDerivedCommand=function(e,t,i,n,r){e$2e(r)||(r={});var o=e.length>0,a=t.shaderProgram,s=a.vertexShaderSource,l=a.fragmentShaderSource,u=t.pass===Le$q.GLOBE,c=t.pass===Le$q.S3MTiles,h=!1;if(u&&(h=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&o){var d,f;e$2e(r.receiveCommand)&&(d=r.receiveCommand.shaderProgram,f=r.receiveCommand.uniformMap);var p=!1;e$2e(r.receiveCommand)||(p=!0),r.receiveCommand=i$$.shallowClone(t,r.receiveCommand),r.castShadows=!1,r.receiveShadows=!0,p&&r.receiveCommand.addUniformBuffer(e[0]._ubo);var _=r.receiveShaderCastShadows!==t.castShadows,m=r.receiveShaderProgramId!==t.shaderProgram.id;if(!e$2e(d)||m||i||_){var g=g$12.getShadowReceiveShaderKeyword(e[0],t.castShadows,u,h);if(!e$2e(d=n.shaderCache.getDerivedShaderProgram(a,g))){var x=g$12.createShadowReceiveVertexShader(s,u,h),y=g$12.createShadowReceiveFragmentShader(l,e[0],t.castShadows,u,h,c);d=n.shaderCache.createDerivedShaderProgram(a,g,{vertexShaderSource:x,fragmentShaderSource:y,attributeLocations:a._attributeLocations})}f=e[0]._ubo._uniformMap?p$19(t.uniformMap,e[0]._ubo._uniformMap,!1):t.uniformMap}r.receiveCommand.shaderProgram=d,r.receiveCommand._uniformMap=f,r.receiveShaderProgramId=t.shaderProgram.id,r.receiveShaderCastShadows=t.castShadows}return r},C$Z.createCastDerivedCommand=function(e,t,i,n,r){if(e$2e(r)||(r={}),t.castShadows){var o=r.castCommands;e$2e(o)||(o=r.castCommands=[]);var a=r.castShaderProgramId,s=e.length;o.length=s;for(var l=0;l<s;++l)o[l]=Rt$9(e[l],i,t,n,a,o[l]);r.castShaderProgramId=t.shaderProgram.id}return r},C$Z.prototype.isDestroyed=function(){return!1},C$Z.prototype.destroy=function(){ae$w(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(var e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return i$11(this)};var _0x3dbd66=(_0x38dbd3=!0,function(e,t){var i=_0x38dbd3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38dbd3=!1,i}),_0x5ab207=_0x3dbd66(void 0,(function(){return _0x5ab207.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ab207).search("(((.+)+)+)+$")})),_0x38dbd3;_0x5ab207();var _0x352a7a=new i$W("computeShadowRatio");function _0x19393b(e){if(!e$2e(e))throw new t$15("scene are required.");if(!e.context.depthTexture)throw new t$15("the depth buffer is not supported.");this._scene=e,this._depthBuffer=void 0,this._globalDepthBuffer=void 0,this._frameState=void 0,this._qureyRegion=[],this._bottom=0,this._extend=0,this._arrPointCommand=[],this._arrRasterPointCommand=[],this._boundingSphere=new i$1d,this._bounds=[],this._worldMatrix=p$1d.IDENTITY.clone(),this._spacing=10,this._arrRasterTexture=[],this._arrAssisTexture=[],this._startTime=a$15.now(),this._endTime=a$15.now(),this._currentTime=0,this._timeInterval=1,this._timeUpdate=!1,this._update=!1,this._id=0,this._name="",this._sceneName="",this._checking=!1,this._visibleViewport=4095,this._points=[],this._queryPointsEvent=new o$1h,this._enuPoints=[],this._shadowMapParams={oriMaxDis:100,oriSize:128,analysisSize:Math.min(8192,e$1W.maximumTextureSize)},this.shadowMap=new C$Z({context:this._scene.context,lightCamera:this._scene._sunCamera,enabled:!0,maximumDistance:this._shadowMapParams.oriMaxDis,size:this._shadowMapParams.oriSize,pcss:!1,softShadows:!1}),this._shadowMapMaxDistance=this._shadowMapParams.oriMaxDis,this._isPointsVisible=!0,this._colorTable=void 0,this._hypsometricTexture=void 0,this._voxelData={},this._volDirty=!1}function _0x8baec9(e,t){var i=!1,n=t.split(" ");if(n.length>1){var r=n[0],o=n[1];for(var a in e.defines)if(-1!==e.defines[a].indexOf(r))return void(e.defines[a]=r+" "+o);e.defines.push(t)}else{for(var a in e.defines)if(e.defines[a]===t){i=!0;break}i||e.defines.push(t)}}function _0x353320(e,t,i){if(e$2e(t)){var n=t.shaderProgram.fragmentShaderSource,r=t.shaderProgram.vertexShaderSource;_0x8baec9(n,i);var o=t.shaderProgram._attributeLocations;t.shaderProgram.destroy(),t.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:o})}}function _0x36a950(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function _0x19b2b7(e,t,i){if(e$2e(t)){var n=t.shaderProgram.vertexShaderSource,r=t.shaderProgram.fragmentShaderSource;_0x36a950(r,i);var o=t.shaderProgram._attributeLocations;t.shaderProgram.destroy(),t.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:o})}}function _0x4ce7c2(e){for(var t=0;t<e._arrPointCommand.length;t++)e$2e(e._arrPointCommand[t])&&(e._arrPointCommand[t].vertexArray=e._arrPointCommand[t].vertexArray&&e._arrPointCommand[t].vertexArray.destroy(),e._arrPointCommand[t].shaderProgram=e._arrPointCommand[t].shaderProgram&&e._arrPointCommand[t].shaderProgram.destroy(),e._arrPointCommand[t]=void 0);e._arrPointCommand.length=0;for(t=0;t<e._arrRasterPointCommand.length;t++)e$2e(e._arrRasterPointCommand[t])&&(e._arrRasterPointCommand[t].vertexArray=e._arrRasterPointCommand[t].vertexArray&&e._arrRasterPointCommand[t].vertexArray.destroy(),e._arrRasterPointCommand[t].shaderProgram=e._arrRasterPointCommand[t].shaderProgram&&e._arrRasterPointCommand[t].shaderProgram.destroy(),e._arrRasterPointCommand[t]=void 0);e._arrRasterPointCommand.length=0}function _0x5afb42(e){for(var t=0;t<e._arrRasterTexture.length;t++)e$2e(e._arrRasterTexture[t])&&(e._arrRasterTexture[t].destroy(),e._arrRasterTexture[t]=null);e._arrRasterTexture.length=0;for(t=0;t<e._arrAssisTexture.length;t++)e$2e(e._arrAssisTexture[t])&&(e._arrAssisTexture[t].destroy(),e._arrAssisTexture[t]=null);e._arrAssisTexture.length=0}function _0x3c8d27(e,t){var i=t.length/2,n=0,r=0,o=0;for(n=0,r=i-1;n<i;r=n++){var a=t[2*n],s=t[2*n+1],l=t[2*r],u=t[2*r+1],c=Math.min(a,l),h=Math.max(a,l),d=Math.min(s,u),f=Math.max(s,u);if(u!=s){if(d>e.y==f<e.y){var p=(l-a)*(e.y-s)/(u-s)+a;if(e.x<p)o=!o;else if(e.x==p)return!0}}else if(e.y==s&&e.x>=c&&e.x<=h)return!0}return o}function _0x2442cc(e,t,i){var n=e._bounds[0],r=e._bounds[1],o=e._bounds[2],a=e._bounds[3],s=0,l=0,u=o$1p.fromDegrees(n,r,t),c=new i$16(0,0,0),h=new p$1d,d=new p$1d,f=new o$1p,p=new o$1p,_=new o$1p;m$19.headingPitchRollToFixedFrame(u,c,t$12.WGS84,m$19.eastNorthUpToFixedFrame,h),p$1d.inverse(h,d);var m=o$1p.fromDegrees(o,r,e._bottom);p$1d.multiplyByPoint(d,m,p);var g=o$1p.fromDegrees(n,a,e._bottom);p$1d.multiplyByPoint(d,g,_);for(var x=o$1p.distance(new o$1p(0,0,0),p),y=o$1p.distance(new o$1p(0,0,0),_),v=(Math.floor(y/e._spacing),0);v<x;v+=e._spacing){l=0;for(var $=0;$<y;$+=e._spacing){p$1d.multiplyByPoint(h,new o$1p(e._spacing*s,e._spacing*l,0),f);var b=a$18.fromCartesian(f),T=e._getVolValue(b,i);e._voxelData.values.push(T),l++}s++}e._voxelData.width=s,e._voxelData.height=l,e._voxelData.bounds={leftBottom:{x:n,y:r},rightTop:{x:o,y:a}}}function _0x3be050(e){if(0===e._qureyRegion.length/2||0===e._bounds.length)return[];if(e._enuPoints.length>0)return e._enuPoints;var t=e._bounds[0],i=e._bounds[1],n=e._bounds[2],r=e._bounds[3],o=0,a=0,s=0,l=o$1p.fromDegrees(t,i,e._bottom),u=new i$16(0,0,0),c=new p$1d,h=new p$1d,d=new o$1p,f=new o$1p,p=new o$1p;m$19.headingPitchRollToFixedFrame(l,u,t$12.WGS84,m$19.eastNorthUpToFixedFrame,c),p$1d.inverse(c,h);var _=o$1p.fromDegrees(n,i,e._bottom);p$1d.multiplyByPoint(h,_,f);var m=o$1p.fromDegrees(t,r,e._bottom);p$1d.multiplyByPoint(h,m,p);for(var g=o$1p.distance(new o$1p(0,0,0),f),x=o$1p.distance(new o$1p(0,0,0),p),y=0;y<g;y+=e._spacing){a++,s=0;for(var v=0;v<x;v+=e._spacing){s++,p$1d.multiplyByPoint(c,new o$1p(e._spacing*a,e._spacing*s,0),d);var $=a$18.fromCartesian(d),b=e$2d.toDegrees($.longitude),T=e$2d.toDegrees($.latitude);!_0x3c8d27({x:b,y:T},e._qureyRegion)||(e._enuPoints[o++]=b,e._enuPoints[o++]=T)}}return e._enuPoints}function _0x1af562(e){var t=e._qureyRegion.length/2;if(0===t)return[];if(t<3)return new i$1d;for(var i=Number.MAX_VALUE,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=-Number.MAX_VALUE,a=0;a<t;a++)i=Math.min(e._qureyRegion[2*a],i),n=Math.min(e._qureyRegion[2*a+1],n),r=Math.max(e._qureyRegion[2*a],r),o=Math.max(e._qureyRegion[2*a+1],o);e._bounds.length=0,e._bounds.push(i),e._bounds.push(n),e._bounds.push(r),e._bounds.push(o);var s=o$1p.fromDegrees(.5*(r+i),.5*(o+n),e._bottom+.5*e._extend);o$1p.clone(s,e._boundingSphere.center),p$1d.setTranslation(e._worldMatrix,s,e._worldMatrix);var l=o$1p.fromDegrees(i,n,e._bottom),u=o$1p.fromDegrees(r,o,e._bottom+e._extend);return o$1p.subtract(u,l,s),e._boundingSphere.radius=.5*o$1p.magnitude(s),e._boundingSphere}function _0x513a86(e,t,i,n){var r=i.length/2,o=S$14.createTypedArray(S$14.FLOAT,3*r),a=S$14.createTypedArray(S$14.FLOAT,2*r),s=null;ce$z.UNSIGNED_SHORT,r<65535?s=S$14.createTypedArray(S$14.UNSIGNED_SHORT,r):(s=S$14.createTypedArray(S$14.UNSIGNED_INT,r),ce$z.UNSIGNED_INT);var l=e._bounds[2]-e._bounds[0],u=e._bounds[3]-e._bounds[1],c=e._bounds[0]-.025*l,h=e._bounds[1]-.025*u;l+=.05*l,u+=.05*u;var d=new e$2c(0,0,0,1),f=new p$1d;p$1d.inverse(e._worldMatrix,f);for(var p=0;p<r;p++){var _=o$1p.fromDegrees(i[2*p],i[2*p+1],n);e._points.push(_),d.x=_.x,d.y=_.y,d.z=_.z,p$1d.multiplyByVector(f,d,d),o[3*p]=d.x,o[3*p+1]=d.y,o[3*p+2]=d.z,a[2*p]=(i[2*p]-c)/l*2-1,a[2*p+1]=(i[2*p+1]-h)/u*2-1,s[p]=p}var m=t$X.createVertexBuffer({context:t,typedArray:o,usage:A$18.STATIC_DRAW}),g=t$X.createVertexBuffer({context:t,typedArray:a,usage:A$18.STATIC_DRAW}),x=[],y={offset:0,aPosition:1,aTexCoord0:2},v=t.createBillboardOffsetVertexBuffer();x.push({name:"offset",index:y.offset,vertexBuffer:v,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var $=S$14.getSizeInBytes(S$14.FLOAT);x.push({name:"aPosition",index:y.aPosition,vertexBuffer:m,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*$,normalize:!1,instanceDivisor:1}),x.push({name:"aTexCoord0",index:y.aTexCoord0,vertexBuffer:g,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:2*$,normalize:!1,instanceDivisor:1});var b=t.createBillboardPointIndexBuffer(),T=new t$U({context:t,width:1024,height:1024,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1});e._arrRasterTexture.push(T);var C=new t$U({context:t,width:1024,height:1024,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1});e._arrAssisTexture.push(C);var S=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.OPAQUE,owner:e,cull:!0,instanceCount:r});e._arrPointCommand.push(S),S.vertexArray=new c$13({context:t,attributes:x,indexBuffer:b});var w=new s$V({name:"ShadowAnalysisVp",sources:[_0x126a39]});w.defines.push("RENDER_POINT");var E=new s$V({name:"ShadowAnalysisFp",sources:[_0x46d19a]});e$2e(e._colorTable)&&E.defines.push("COLOR_TABLE"),S.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:w,fragmentShaderSource:E,attributeLocations:y}),S.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),S.uniformMap={uPointSize:function(){return 10},uTexture0:function(){return T},uHypsometricTexture:function(){return e._hypsometricTexture}};var P=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.OPAQUE,owner:e,cull:!1,instanceCount:r});e._arrRasterPointCommand.push(P),P.vertexArray=new c$13({context:t,attributes:x,indexBuffer:b}),(w=new s$V({name:"ShadowQueryVp",sources:[_0x1f9203]})).defines.push("RENDER_POINT");var A=new s$V({name:"ShadowQueryFp",sources:[_0x138bac]});(M=e.shadowMap)._usesDepthTexture&&A.defines.push("USE_SHADOW_DEPTH_TEXTURE"),P.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:w,fragmentShaderSource:A,attributeLocations:y}),P.renderState=d$1m.fromCache({viewport:new f$1a(0,0,1024,1024),cull:{enabled:!1},depthTest:{enabled:!1}});var L=1/e._currentTime,M=e.shadowMap;P.uniformMap={uPointSize:function(){return 4},uSpacing:function(){return L},shadowMap_texture:function(){return M._shadowMapTexture},shadowMap_textureCube:function(){return M._shadowMapTexture},shadowMap_matrix:function(){return M._shadowMapMatrix},shadowMap_cascadeSplits:function(){return M._cascadeSplits},shadowMap_cascadeMatrices:function(){return M._cascadeMatrices},shadowMap_lightDirectionEC:function(){return M._lightDirectionEC},shadowMap_lightPositionEC:function(){return M._lightPositionEC},shadowMap_cascadeDistances:function(){return M._cascadeDistances},uAssisTexture:function(){return C}},P.framebuffer=new t$V({context:t,colorTextures:[T],destroyAttachments:!1})}function _0x362aaf(e,t,i){e._globalDepthBuffer.isUpdate=!0,i.camera,e._globalDepthBuffer._beginFunc=function(e){},e._globalDepthBuffer._endFunc=function(t){e._globalDepthBuffer.isUpdate=!1,e._depthBuffer.isUpdate=!0}}function _0x54d640(e,t,i){var n=i.time.clone(),r=0,o=i.useLogDepth;e._depthBuffer._beginFunc=function(){i.useLogDepth=!1,e.shadowMap.enabled=!0,n=i.time.clone(),i.time=a$15.addMinutes(e._startTime,r,new a$15),r+=e._timeInterval,i.passes.pick=!1},e._depthBuffer._endFunc=function(){i.useLogDepth=o;for(var r=[],a=0;a<e._arrRasterPointCommand.length;a++){e._arrRasterPointCommand[a].execute(t);var s=t.readPixelsAsync({x:0,y:0,width:1024,height:1024,framebuffer:e._arrRasterPointCommand[a].framebuffer});r.push(s),e._arrAssisTexture[a].copyFromTexture(e._arrRasterPointCommand[a].framebuffer.getColorTexture(0))}i.time=n,--e._currentTime<1&&(e._depthBuffer.isUpdate=!1,e._timeUpdate=!1,e.shadowMap.maximumDistance=e._shadowMapParams.oriMaxDis,e.shadowMap.minimumDistance=void 0,e.shadowMap.size=e._shadowMapParams.oriSize,Promise.all(r).then((t=>{if(e._points.length>0){var i={},n=_0x3be050(e);i.points=e._points,i.enuPoints=n,i.bounds=e._bounds,i.extend=e._extend,i.spacing=e._spacing,i.bottom=e._bottom,i.pixelsArray=t;var r=_0x352a7a.scheduleTask(i,[]);if(!e$2e(r))return[];r.then((function(t){var i=t.resultData;i.length>0&&e._queryPointsEvent.raiseEvent(i)})).otherwise((function(e){}))}else e._queryPointsEvent.raiseEvent({resultData:[]})})))}}Object.defineProperties(_0x19393b.prototype,{startTime:{get:function(){return this._startTime},set:function(e){this._startTime=e.clone(),this._update=!0}},endTime:{get:function(){return this._endTime},set:function(e){this._endTime=e.clone(),this._update=!0}},timeInterval:{get:function(){return this._timeInterval},set:function(e){this._timeInterval=e,this._update=!0}},spacing:{get:function(){return this._spacing},set:function(e){this._spacing=e,this._update=!0}},queryPointsEvent:{get:function(){return this._queryPointsEvent}},isPointsVisible:{get:function(){return this._isPointsVisible},set:function(e){this._isPointsVisible=e}},colorTable:{get:function(){return this._colorTable},set:function(e){if(e$2e(e)){e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:this._scene.context,width:1024,height:64,pixelFormat:V$12.RGBA,flipY:!1})),this._colorTable=e,this._colorTable.generateBuffer(),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._colorTable._imageBuffer});for(i=0,n=(t=this._arrPointCommand).length;i<n;i++)_0x353320(this._scene.context,t[i],"COLOR_TABLE")}else for(var t,i=0,n=(t=this._arrPointCommand).length;i<n;i++)_0x19b2b7(this._scene.context,t[i],"COLOR_TABLE")}},voxelData:{get:function(){return this._volDirty=!0,this._getVoxelData(),this._voxelData}}}),_0x19393b.prototype._getVolValue=function(e,t){var i=e.longitude,n=e.latitude,r=e.height;i=e$2d.toDegrees(i),n=e$2d.toDegrees(n);var o=this._bounds[2]-this._bounds[0],a=(r=this._bounds[3]-this._bounds[1],this._bounds[0]-.025*o),s=this._bounds[1]-.025*r;o+=.05*o,r+=.05*r;var l=parseInt((i-a)/o*1024),u=parseInt((n-s)/r*1024);l=l<1?1:l,u=u<1?1:u;for(var c=0,h=new e$2c(1,1/255,1/65025,1/160581375),d=-1;d<2;d++)for(var f=-1;f<2;f++){var p=this._scene.context.readPixels({x:l+d,y:u+f,width:1,height:1,framebuffer:this._arrRasterPointCommand[t].framebuffer}),_=e$2c.unpack(p,0);e$2c.divideByScalar(_,255,_),c=Math.max(c,e$2c.dot(_,h))}return 1-(c=c>.999?1:c)},_0x19393b.prototype.update=function(e,t,i){if(!t._fboState.enabled&&!t.camera.bReflect){if(this._update){if(!this.shadowMap.enabled)throw new t$15("ShadowQueryPoints must be shadow.");if(this._scene.mode!==C$14.SCENE3D)throw new t$15("Shadow anaylsis is not supported for non-3D scenes.");if(this._frameState=t,e$2e(this._depthBuffer)||(this._depthBuffer=new s$U(e),this._depthBuffer.environmentVisible.isSunVisible=!0,this._depthBuffer.environmentVisible.isGlobalVisible=!0,this._depthBuffer.environmentVisible.isObjectVisible=!0,this._depthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._sceneName]=this._depthBuffer),!e$2e(this._globalDepthBuffer)){this._globalDepthBuffer=new s$U(e),this._globalDepthBuffer.environmentVisible.isObjectVisible=!0,this._globalDepthBuffer.environmentVisible.isGlobalVisible=!0,this._globalDepthBuffer._visibleViewport=this._visibleViewport;var n=this._name+"_global";t._framebufferList[n]=this._globalDepthBuffer}this._update=!1,this._timeUpdate=!0,this._currentTime=1;var r=new a$15,o=0;for(this.shadowMap.maximumDistance=this._shadowMapMaxDistance;a$15.addMinutes(this._startTime,o,r),o+=this._timeInterval,!a$15.lessThan(this._endTime,r);)this._currentTime++;_0x4ce7c2(this),_0x5afb42(this);var a=_0x3be050(this);if(this._points.length=0,a.length>0){for(var s=0;s<=this._extend;s+=this._spacing)_0x513a86(this,e,a,this._bottom+s);_0x362aaf(this,e,t),_0x54d640(this,e,t)}}if(!this._timeUpdate&&this._isPointsVisible){for(var l=0;l<this._arrPointCommand.length;l++)i.push(this._arrPointCommand[l]);this._getVoxelData()}}},_0x19393b.prototype._getVoxelData=function(){if(this._arrPointCommand.length>0&&this._volDirty){this._volDirty=!1,this._voxelData={values:[]};for(var e=0,t=0;t<=this._extend;t+=this._spacing)_0x2442cc(this,t,e),e++;this._voxelData.values=new Float32Array(this._voxelData.values),this._voxelData.depth=Math.ceil(this._extend/this._spacing)+1,this._voxelData.minValue=0,this._voxelData.maxValue=1,this._voxelData.minHeight=this._bottom,this._voxelData.maxHeight=this._bottom+this._extend}},_0x19393b.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=1<<e,e$2e(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport)},_0x19393b.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0x19393b.prototype.getShadowRadio=function(e){if(!e$2e(e)||this._timeUpdate)return-1;var t=e.longitude,i=e.latitude,n=e.height;if(!e$2e(t)||!e$2e(i)||!e$2e(n)||(t=e$2d.toDegrees(t),i=e$2d.toDegrees(i),t<this._bounds[0]||t>this._bounds[2]||i<this._bounds[1]||i>this._bounds[3]))return-1;for(var r=!1,o=0,a=.1*this._spacing,s=0;s<=this._extend;s+=this._spacing){if(Math.abs(this._bottom+s-n)<a){r=!0;break}o++}if(!r)return-1;var l=_0x3be050(this);if(l.length<0)return-1;r=!1;for(var u=0;u<l.length;u+=2){var c=o$1p.fromDegrees(t,i,n),h=o$1p.fromDegrees(l[u+0],l[u+1],n);if(o$1p.distance(c,h)<a){r=!0;break}}if(!r||o>=this._arrRasterPointCommand.length)return-1;var d=this._bounds[2]-this._bounds[0],f=(n=this._bounds[3]-this._bounds[1],this._bounds[0]-.025*d),p=this._bounds[1]-.025*n;d+=.05*d,n+=.05*n;var _=parseInt((t-f)/d*1024),m=parseInt((i-p)/n*1024);_=_<1?1:_,m=m<1?1:m;var g=0,x=new e$2c(1,1/255,1/65025,1/160581375),y=this._arrRasterPointCommand[o].framebuffer;for(u=-1;u<2;u++)for(var v=-1;v<2;v++){var $=this._scene.context.readPixels({x:_+u,y:m+v,width:1,height:1,framebuffer:y}),b=e$2c.unpack($,0);e$2c.divideByScalar(b,255,b),g=Math.max(g,e$2c.dot(b,x))}return g=g>.999?1:g},_0x19393b.prototype.getShadowRadioAsync=function(e){if(!e$2e(e)||this._timeUpdate)return Promise.resolve(-1);var t=e.longitude,i=e.latitude,n=e.height;if(!e$2e(t)||!e$2e(i)||!e$2e(n)||(t=e$2d.toDegrees(t),i=e$2d.toDegrees(i),t<this._bounds[0]||t>this._bounds[2]||i<this._bounds[1]||i>this._bounds[3]))return Promise.resolve(-1);for(var r=!1,o=0,a=.1*this._spacing,s=0;s<=this._extend;s+=this._spacing){if(Math.abs(this._bottom+s-n)<a){r=!0;break}o++}if(!r||o>=this._arrRasterPointCommand.length)return Promise.resolve(-1);var l=_0x3be050(this);if(l.length<0)return Promise.resolve(-1);r=!1;for(var u=0;u<l.length;u+=2){var c=o$1p.fromDegrees(t,i,n),h=o$1p.fromDegrees(l[u+0],l[u+1],n);if(o$1p.distance(c,h)<a){r=!0;break}}if(!r)return Promise.resolve(-1);var d=this._bounds[2]-this._bounds[0],f=(n=this._bounds[3]-this._bounds[1],this._bounds[0]-.025*d),p=this._bounds[1]-.025*n;d+=.05*d,n+=.05*n;var _=parseInt((t-f)/d*1024),m=parseInt((i-p)/n*1024);_=_<1?1:_,m=m<1?1:m;var g=new e$2c(1,1/255,1/65025,1/160581375),x=[],y=this._arrRasterPointCommand[o].framebuffer;for(u=-1;u<2;u++)for(var v=-1;v<2;v++){var $=this._scene.context.readPixelsAsync({x:_+u,y:m+v,width:1,height:1,framebuffer:y});x.push($)}return Promise.all(x).then((e=>{for(var t=0,i=0;i<e.length;i++){var n=e[i],r=e$2c.unpack(n,0);e$2c.divideByScalar(r,255,r),t=Math.max(t,e$2c.dot(r,g))}return t=t>.999?1:t,Promise.resolve(t)}))},_0x19393b.prototype.qureyRegion=function(e){if(!e$2e(e)||!e$2e(e.position))throw new t$15("the options is required");this._qureyRegion=e.position,this._bottom=u$Z(e.bottom,this._bottom),this._extend=u$Z(e.extend,this._extend),this._update=!0,this._enuPoints=[];var t=_0x1af562(this),i=o$1p.distance(t.center,this._scene.camera.position);i+=this._boundingSphere.radius,this.shadowMap.maximumDistance=i,this.shadowMap.size=this._shadowMapParams.analysisSize,this._shadowMapMaxDistance=i},_0x19393b.prototype.clear=function(){_0x4ce7c2(this),this._scene._analyst3D.remove(this._name,!1)},_0x19393b.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("ShadowQueryPoints"),""!==this._name||this._checking?e$2e(this._scene._analyst3D.find(this._name))||this._scene._analyst3D.add(this):(this._name="ShadowQueryPoints"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._scene._analyst3D.add(this),this._scene._analysisShadowMap=this.shadowMap)},_0x19393b.prototype.destroy=function(){return e$2e(this._frameState)&&(e$2e(this._depthBuffer)&&delete this._frameState._framebufferList[this._sceneName],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),_0x4ce7c2(this),_0x5afb42(this),e$2e(this._hypsometricTexture)&&(this._hypsometricTexture=this._hypsometricTexture.destroy()),this._scene._analyst3D.remove(this._name,!0),e$2e(this.shadowMap)&&(this.shadowMap.destroy(),this.shadowMap=void 0,this._scene._analysisShadowMap=void 0),i$11(this)};var _0x36a553="attribute vec2 aSideness;\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\n\nuniform float uLineWidth;\nuniform mat4 uRenderTextureMatrix;\n\nvarying vec4 renderTextureCoord;\n\nvec4 resolvePosition(vec4 viewPosV0, vec4 viewPosV1, vec2 sidenessNorm) {\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n vec4 viewPos = mix(viewPosV0, viewPosV1, sidenessNorm.y);\n vec4 projPosV0 = czm_projection * viewPosV0;\n vec4 projPosV1 = czm_projection * viewPosV1;\n vec4 projPos = czm_projection * viewPos;\n vec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\n vec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\n vec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\n float lineLengthPixels = length(screenSpaceLinePixels);\n float dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\n vec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\n vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\n vec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\n float halfLineWidth = max(uLineWidth, 1.0) * 0.5;\n vec2 halfLineWidthNDC = halfLineWidth * uPixelToNDC;\n vec2 ndcOffset = screenSpaceDirection * halfLineWidthNDC + perpendicularScreenSpaceDirection * halfLineWidthNDC;\n projPos.xy += ndcOffset * projPos.w;\n projPos.z += (dzPerPixel * halfLineWidth) * sideness.y * projPos.w;\n return projPos;\n}\n\nvoid main() {\n vec4 viewPosV0 = czm_modelView * vec4(aPosition0, 1.0);\n vec4 viewPosV1 = czm_modelView * vec4(aPosition1, 1.0);\n gl_Position = resolvePosition(viewPosV0, viewPosV1, aSideness);\n vec4 viewPos = czm_inverseProjection * gl_Position;\n renderTextureCoord = uRenderTextureMatrix * viewPos;\n}",_0xca158e="uniform sampler2D uTexture0;\nuniform vec4 uVisibleColor;\nuniform vec4 uHiddenColor;\n\nvarying vec4 renderTextureCoord;\n\nvoid main() {\n vec4 resultColor = uVisibleColor;\n vec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n float depth = texCoord.z * 0.5 + 0.5;\n texCoord.xy = texCoord.xy * 0.5 + 0.5;\n float z_window = czm_unpackDepth(texture2D(uTexture0, texCoord.xy));\n#ifdef WEBGPU\n z_window = z_window * 0.5 + 0.5;\n#endif\n if(z_window < depth && z_window > 0.0 && z_window < 1.0)\n {\n resultColor = uHiddenColor;\n }\n gl_FragColor = resultColor;\n}",_0x2c1d58=(_0x1d4d19=!0,function(e,t){var i=_0x1d4d19?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d4d19=!1,i}),_0x13a59b=_0x2c1d58(void 0,(function(){return _0x13a59b.toString().search("(((.+)+)+)+$").toString().constructor(_0x13a59b).search("(((.+)+)+)+$")})),_0x1d4d19;_0x13a59b();var _0x35ab06="\nattribute vec3 aPosition0;\nuniform float uLineWidth;\nuniform mat4 uRenderTextureMatrix;\n\nvarying vec4 renderTextureCoord;\n\nvoid main() {\n vec4 viewPos = czm_modelView * vec4(aPosition0, 1.0);\n gl_Position = czm_projection * viewPos;\n renderTextureCoord = uRenderTextureMatrix * viewPos;\n}",_0x1aeb94=(_0x559c56=!0,function(e,t){var i=_0x559c56?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x559c56=!1,i}),_0x5dd3af=_0x1aeb94(void 0,(function(){return _0x5dd3af.toString().search("(((.+)+)+)+$").toString().constructor(_0x5dd3af).search("(((.+)+)+)+$")})),_0x559c56;function _0x393ad5(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._depthBuffer=void 0,this._command=void 0,this._frameState=void 0,this._viewPosition=[0,0,0],this._cameraDir=new o$1p,this._viewProjMatrix=new p$1d,this._viewProjMatrixs=new e$1Q,this._renderTextureMatrix=new p$1d,this._renderTextureMatrixs=new e$1Q,this._visibleColor=new e$2c(0,1,0,1),this._hiddenColor=new e$2c(1,0,0,1),this._targetPoints=new e$1Q,this._sightlineCameras=new e$1Q,this._update=!0,this._updateAll=!0,this._id=0,this._name="",this._visibleViewport=4095,this._barrierPointArray=new e$1Q,this._depthBuffers=new e$1Q,this._commands=new e$1Q,this._lineWidth=1}function _0x24b83f(e,t,i){var n,r=i.camera,o=r._projection;if(e._scene.mode===C$14.SCENE3D)n=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var a=a$18.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);n=o.project(a,new o$1p)}var s=new o$1p(0,0,0);e._targetPoints._hash;var l,u=0,c=e._currentTargetPoint;if(e._scene.mode===C$14.SCENE3D)l=o$1p.fromDegreesArrayHeights(c,e._scene._globe.ellipsoid)[0];else{var h=a$18.fromDegrees(c[0],c[1],c[2]);l=o.project(h,new o$1p)}var d=new o$1p;o$1p.subtract(l,n,d),o$1p.normalize(d,d),o$1p.add(s,d,s),u=Math.max(u,o$1p.distance(l,n)),o$1p.normalize(s,s),o$1p.clone(s,e._cameraDir);var f=new o$1p,p=new o$1p,_=new o$1p,m=r.frustum.fov;o$1p.clone(r.position,f),o$1p.clone(r.direction,p),o$1p.clone(r.up,_);var g=2*e$2d.PI/3,x=r.frustum.near,y=r.frustum.far,v=i.useLogDepth,$=e._currentTargetName,b=e._depthBuffers.get($);e$2e(b)||((b=new s$U(t)).environmentVisible.isObjectVisible=!0,b.environmentVisible.isGlobalVisible=!0,b._visibleViewport=e._visibleViewport,i._framebufferList[$]=b,e._depthBuffers.set($,b)),b.isUpdate=!0,b._beginFunc=function(){i.useLogDepth=!1,o$1p.clone(r.position,f),o$1p.clone(r.direction,p),o$1p.clone(r.up,_),m=r.frustum.fov,r.frustum.fov=g;var t=s,o=new o$1p;o=o$1p.clone(n,o),o=o$1p.normalize(o,o),Math.abs(o$1p.dot(o,t))>=1&&(o=Math.abs(o$1p.dot(t,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,o):o$1p.clone(o$1p.UNIT_Z,o));var a=new o$1p;o$1p.cross(o,t,a),a=o$1p.normalize(a,a),o$1p.cross(t,a,o),o=o$1p.normalize(o,o);var l={destination:n,orientation:{direction:t,up:o},convert:!1};r.setView(l),e._sightlineCameras.set($,l),r.frustum.near=1,r.frustum.far=Math.ceil(Math.max(u,10));var c=new p$1d;p$1d.multiply(r.frustum.projectionMatrix,r.viewMatrix,c),e._viewProjMatrixs.set($,c),e._renderTextureMatrixs.set($,new p$1d)},b._endFunc=function(){if(i.useLogDepth=v,r.frustum.fov=m,r.setView({destination:f,orientation:{direction:p,up:_},convert:!1}),r.frustum.near=x,r.frustum.far=y,b.isUpdate=!1,!e._update)if(t.webgpu)_0x663bac(e,$).then((t=>{e._barrierPointArray.set($,t)}));else{var n=_0x221e55(e,$);e._barrierPointArray.set($,n)}}}_0x5dd3af(),Object.defineProperties(_0x393ad5.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._updateAll=!0,this._update=!0}},visibleColor:{get:function(){var e=new e$1X;return e.red=this._visibleColor.x,e.green=this._visibleColor.y,e.blue=this._visibleColor.z,e.alpha=this._visibleColor.w,e},set:function(e){this._visibleColor.x=e.red,this._visibleColor.y=e.green,this._visibleColor.z=e.blue,this._visibleColor.w=e.alpha}},hiddenColor:{get:function(){var e=new e$1X;return e.red=this._hiddenColor.x,e.green=this._hiddenColor.y,e.blue=this._hiddenColor.z,e.alpha=this._hiddenColor.w,e},set:function(e){this._hiddenColor.x=e.red,this._hiddenColor.y=e.green,this._hiddenColor.z=e.blue,this._hiddenColor.w=e.alpha}},lineWidth:{get:function(){return this._lineWidth},set:function(e){o$1q.typeOf.number.greaterThan("Sightline.lineWidth",e,0),this._lineWidth=e}}}),_0x393ad5.prototype.addTargetPoint=function(e){LicenseChecker.LICENSECHECKER.verify("Sightline");var t=e.name,i=e.position;return!(!e$2e(t)||!e$2e(i))&&(this._targetPoints.set(t,i),this._currentTargetName=t,this._currentTargetPoint=i,this._update=!0,this._barrierPointArray.set(t,{}),!0)},_0x393ad5.prototype.removeTargetPoint=function(e){LicenseChecker.LICENSECHECKER.verify("Sightline"),this._barrierPointArray.remove(e);var t=this._targetPoints.remove(e);if(this._sightlineCameras.remove(e),!t)return!1;this._viewProjMatrixs.remove(e),this._renderTextureMatrixs.remove(e);var i=this._depthBuffers.get(e);e$2e(i)&&(i.destroy(),this._depthBuffers.remove(e),delete this._frameState._framebufferList[e]);var n=this._commands.get(e);if(e$2e(n)){for(var r=0;r<n.length;r++){var o=n[r];o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy(),o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy();var a=this._frameState.commandList.indexOf(o);-1!==a&&this._frameState.commandList.splice(a,1)}this._commands.remove(e)}return this._update=!0,!0},_0x393ad5.prototype.removeAllTargetPoint=function(){for(var e in LicenseChecker.LICENSECHECKER.verify("Sightline"),this._barrierPointArray.removeAll(),this._targetPoints.removeAll(),this._sightlineCameras.removeAll(),this._depthBuffers._hash)this._depthBuffers._hash.hasOwnProperty(e)&&(this._depthBuffers._hash[e].destroy(),delete this._frameState._framebufferList[e],delete this._frameState._framebufferList[e]);this._depthBuffers.removeAll();for(var t=0,i=this._commands.length;t<i;t++)for(var n=this._commands.values[t],r=0;r<n.length;r++){var o=n[r];o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy(),o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy()}this._commands.removeAll(),this._viewProjMatrixs.removeAll(),this._renderTextureMatrixs.removeAll(),this._update=!0};var _0x4c203c=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),_0x105576=null;function _0x4e66db(e){if(e$2e(_0x105576))return _0x105576;var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,(_0x105576=t$X.createVertexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW})).vertexArrayDestroyable=!1,_0x105576}function _0x54102d(e,t){var i=S$14.createTypedArray(S$14.FLOAT,6);return i[0]=0,i[1]=0,i[2]=0,i[3]=t.x,i[4]=t.y,i[5]=t.z,t$X.createVertexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW})}function _0x492920(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}var _0x5465df=null;function _0x11ce83(e){return e$2e(_0x5465df)||((_0x5465df=t$X.createIndexBuffer({context:e,typedArray:_0x492920(),usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1),_0x5465df}var _0x27dbef=new e$2c,_0x5cdfa3=new e$2c;function _0x1d1c54(e,t,i){var n,r=i.camera._projection;if(e._scene.mode===C$14.SCENE3D)n=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var o=a$18.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);n=r.project(o,new o$1p)}var a,s=e._currentTargetPoint;if(e._scene.mode===C$14.SCENE3D)a=o$1p.fromDegreesArrayHeights(s,e._scene._globe.ellipsoid)[0];else{var l=a$18.fromDegrees(s[0],s[1],s[2]);a=r.project(l,new o$1p)}var u=new o$1p;o$1p.subtract(a,n,u);var c=[],h={},d=W$18.TRIANGLES,f=!0;if(t.webgpu){f=!1,d=W$18.LINES;var p=_0x54102d(t,u);h.aPosition0=0,c.push({name:"aPosition0",index:h.aPosition0,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}else{d=W$18.TRIANGLES;var _=_0x4e66db(t);p=_0x54102d(t,u);h.aSideness=0,c.push({name:"aSideness",index:h.aSideness,vertexBuffer:_,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),h.aPosition0=1,c.push({name:"aPosition0",index:h.aPosition0,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),h.aPosition1=2,c.push({name:"aPosition1",index:h.aPosition1,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1})}var m=_0x11ce83(t),g=new i$$({primitiveType:d,pass:Le$q.OPAQUE,owner:e,cull:!1}),x=new p$1d;p$1d.clone(p$1d.IDENTITY,x),p$1d.setTranslation(x,n,x),e._scene.mode!==C$14.SCENE3D&&p$1d.multiply(_0x4c203c,x,x),g.modelMatrix=x,g.vertexArray=new c$13({context:t,attributes:c,indexBuffer:m}),g.shaderProgram=r$14.fromCache({name:f?"SightWideLine":"SightLine",context:t,vertexShaderSource:f?_0x36a553:_0x35ab06,fragmentShaderSource:_0xca158e,attributeLocations:h}),g.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var y=e._currentTargetName,v={uRenderTextureMatrix:function(){return e._renderTextureMatrixs.get(y)},uTexture0:function(){return e._depthBuffers.get(y).depthTexture},uVisibleColor:function(){return e._visibleColor},uHiddenColor:function(){return e._hiddenColor},uLineWidth:function(){return e._lineWidth}};g.uniformMap=v;var $=i$$.shallowClone(g);$.pass=Le$q.ANALYSIS,$.renderState=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),$.uniformMap.uHiddenColor=function(){return e$2c.clone(e._hiddenColor,_0x27dbef),_0x27dbef.w=.2,_0x27dbef},$.uniformMap.uVisibleColor=function(){return e$2c.clone(e._visibleColor,_0x5cdfa3),_0x5cdfa3.w=.2,_0x5cdfa3},e._commands.set(y,[$,g])}function _0x221e55(e,t){var i=e._targetPoints.get(t);if(e$2e(i)){var n={isViewer:!0},r=o$1p.fromDegreesArrayHeights(i,e._scene._globe.ellipsoid)[0],o=new e$2c(r.x,r.y,r.z,1),a=e._viewProjMatrixs.get(t);if(p$1d.multiplyByVector(a,o,o),e$2c.divideByScalar(o,o.w,o),o.x>1||o.x<-1||o.y>1||o.y<-1)return n;var s=e._scene.context,l=s.drawingBufferWidth,u=s.drawingBufferHeight,c=(.5*o.x+.5)*l-.5,h=(.5*o.y+.5)*u-.5;if(c<0||h<0)return n;for(var d=Math.floor(c),f=c-d,p=Math.floor(h),_=h-p,m=e._depthBuffers.get(t),g=s.readPixels({framebuffer:m.framebuffer,x:d,y:p,width:2,height:2}),x=new e$2c,y=(new o$1p,new e$2c(1/255,1/65025,1/160581375,1/4228250625)),v=[],$=(e._scene,s.uniformState.currentFrustum),b=($.x,$.y,0);b<4;b++){var T=e$2c.unpack(g,4*b,x),C=e$2c.dot(T,y);if(!(C<1&&C>0))return n;v[b]=2*C-1}var S=(1-_)*((1-f)*v[0]+f*v[1])+_*((1-f)*v[2]+f*v[3]);if(o.z-S>1e-6){var w=new p$1d;p$1d.inverse(a,w),o.z=S,p$1d.multiplyByVector(w,o,o),e$2c.divideByScalar(o,o.w,o);var E=a$18.fromCartesian(o,e._scene._globe.ellipsoid);n.position=E,n.isViewer=!1,n.st=new o$1o(d,p)}return n}}function _0x2a8fa2(e,t){LicenseChecker.LICENSECHECKER.verify("Sightline");var i=e._targetPoints.get(t);if(!e$2e(i))return Promise.resolve(null);var n={isViewer:!0},r=o$1p.fromDegreesArrayHeights(i,e._scene._globe.ellipsoid)[0],o=new e$2c(r.x,r.y,r.z,1),a=e._viewProjMatrixs.get(t);if(p$1d.multiplyByVector(a,o,o),e$2c.divideByScalar(o,o.w,o),o.x>1||o.x<-1||o.y>1||o.y<-1)return Promise.resolve(n);var s=e._scene.context,l=s.drawingBufferWidth,u=s.drawingBufferHeight,c=(.5*o.x+.5)*l-.5,h=(.5*o.y+.5)*u-.5;if(c<0||h<0)return Promise.resolve(n);var d=Math.floor(c),f=c-d,p=Math.floor(h),_=h-p,m=s.uniformState,g=o$1o.clone(m.currentFrustum),x=e._depthBuffers.get(t);return s.readPixelsAsync({framebuffer:x.framebuffer,x:d,y:p,width:2,height:2}).then((t=>{for(var i=new e$2c,r=(new o$1p,new e$2c(1/255,1/65025,1/160581375,1/4228250625)),l=[],u=(e._scene,g.x,g.y,0);u<4;u++){var c=e$2c.unpack(t,4*u,i),h=e$2c.dot(c,r);if(!(h<1&&h>0))return Promise.resolve(n);s.webgpu?l[u]=h:l[u]=2*h-1}var m=(1-f)*l[0]+f*l[1],x=(1-f)*l[2]+f*l[3],y=(1-_)*m+_*x;if(o.z-y>1e-6){var v=new p$1d;p$1d.inverse(a,v),o.z=y,p$1d.multiplyByVector(v,o,o),e$2c.divideByScalar(o,o.w,o);var $=a$18.fromCartesian(o,e._scene._globe.ellipsoid);n.position=$,n.isViewer=!1,n.st=new o$1o(d,p)}return Promise.resolve(n)}))}function _0x14a020(e,t){var i=_0x221e55(e,t);if(e$2e(i)&&e$2e(i.position)&&e$2e(i.st))return i.st}function _0x663bac(e,t){return _0x2a8fa2(e,t).then((e=>e$2e(e)&&e$2e(e.position)&&e$2e(e.st)?Promise.resolve(e.st):Promise.resolve(null)))}_0x393ad5.prototype.update=function(e,t,i){if(!t._fboState.enabled){var n=t.camera;for(var r in this._viewProjMatrixs._hash)p$1d.multiply(this._viewProjMatrixs.get(r),n.inverseViewMatrix,this._renderTextureMatrixs.get(r));if(this._update){if(this._update=!1,this._frameState=t,this._targetPoints.values.length<1)return;if(this._updateAll)for(var o in this._updateAll=!1,this._targetPoints._hash){var a=this._targetPoints.get(o);this._currentTargetPoint=a,this._currentTargetName=o,_0x24b83f(this,e,t),_0x1d1c54(this,e,t)}else _0x24b83f(this,e,t),_0x1d1c54(this,e,t)}if(!t.passes.pick){var s=this._commands.length;for(o=0;o<s;o++)if(e$2e(this._depthBuffers.values[o].framebuffer)){var l=this._commands.values[o];i.push(l[0]),i.push(l[1])}}}},_0x393ad5.prototype.setVisibleInViewport=function(e){if(LicenseChecker.LICENSECHECKER.verify("Sightline"),e>8)throw new t$15("the index is 0~8");this._visibleViewport=1<<e,e$2e(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport)},_0x393ad5.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0x393ad5.prototype.getBarrierPoint=function(e,t){var i=this._barrierPointArray.get(e);return e$2e(t)&&t.bind(null,i)(),i},_0x393ad5.prototype.getObjectIds=function(){LicenseChecker.LICENSECHECKER.verify("Sightline");for(var e={},t=Object.keys(this._targetPoints._hash),i=0,n=t.length;i<n;i++){var r=t[i];this._scene.renderIds(this._sightlineCameras.get(r));var o=this._scene._defaultView.pickFramebuffer,a=this._scene._context,s=_0x14a020(this,r);if(e$2e(s)){var l=a.readPixels({x:s.x,y:s.y,width:1,height:1,framebuffer:o._fb}),u=e$1X.byteToRgba(l[0],l[1],l[2],l[3]),c=a.getObjectByPickId(u);if(e$2e(c)){var h=c.primitive.id;u=c.id;e$2e(e[h])||(e[h]=[]),-1===e[h].indexOf(u)&&e[h].push(u)}}}return e},_0x393ad5.prototype.getObjectIdsAsync=function(){LicenseChecker.LICENSECHECKER.verify("Sightline");for(var e={},t=Object.keys(this._targetPoints._hash),i=[],n=0,r=t.length;n<r;n++){var o=t[n];this._scene.renderIds(this._sightlineCameras.get(o));var a=this._scene._defaultView.pickFramebuffer,s=this._scene._context,l=_0x663bac(this,o);i.push(l)}return Promise.all(i).then((t=>{for(var i=[],n=0;n<t.length;n++){var r=t[n];if(e$2e(r)){var o=s.readPixelsAsync({x:r.x,y:r.y,width:1,height:1,framebuffer:a._fb});i.push(o)}}return Promise.all(i).then((t=>{for(var i=0;i<t.length;i++){var n=t[i],r=e$1X.byteToRgba(n[0],n[1],n[2],n[3]),o=s.getObjectByPickId(r);if(e$2e(o)){var a=o.primitive.id;r=o.id;e$2e(e[a])||(e[a]=[]),-1===e[a].indexOf(r)&&e[a].push(r)}}return Promise.resolve(e)}))}))},_0x393ad5.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("Sightline"),""===this._name&&!this._checking&&(this._name="sightline"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},_0x393ad5.prototype.destroy=function(){return this.removeAllTargetPoint(),this._scene._analyst3D.remove(this._name,!0),i$11(this)};var _0x193cd0=(_0xd69d10=!0,function(e,t){var i=_0xd69d10?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd69d10=!1,i}),_0x259668=_0x193cd0(void 0,(function(){return _0x259668.toString().search("(((.+)+)+)+$").toString().constructor(_0x259668).search("(((.+)+)+)+$")})),_0xd69d10;_0x259668();var _0x88ad48="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\n\nvoid main()\n{\n gl_Position = czm_modelViewProjection * aPosition;\n}",_0xa8264e=(_0x270356=!0,function(e,t){var i=_0x270356?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x270356=!1,i}),_0x182123=_0xa8264e(void 0,(function(){return _0x182123.toString().search("(((.+)+)+)+$").toString().constructor(_0x182123).search("(((.+)+)+)+$")})),_0x270356;_0x182123();var _0x3315e4="uniform vec4 uSkylineColor;\n\nvoid main()\n{\n gl_FragColor = uSkylineColor;\n}",E$_={UNKNOWN:"UNKNOWN",GEOPOINT3D:"POINT3D",GEOLINE3D:"LINE3D",GEOREGION3D:"REGION3D",GEOMODEL3D:"GEOMODEL3D",GEOSPHERE:"GEOSPHERE",GEOBOX:"GEOBOX",GEOBILLBOARD:"GEOBILLBOARD",GEOELLIPSOID:"GEOELLIPSOID",GEOCYLINDER:"GEOCYLINDER",GEOCONE:"GEOCONE",GEOCIRCLE3D:"CIRCLE3D"},P$U=Object.freeze(E$_);function s$N(e,t,i){this.x=parseFloat(e)||0,this.y=parseFloat(t)||0,this.z=parseFloat(i)||0}s$N.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z};var e$1B={CENTER:0,APEX:1},O$K=Object.freeze(e$1B);function o$11(e){this.init(e)}function T$V(e,t,i,n,r){var o=t$X.createVertexBuffer({context:r,typedArray:S$14.createTypedArray(i.componentDatatype,i.values),usage:A$18.STATIC_DRAW});e.push({name:t,index:n,vertexBuffer:o,componentsPerAttribute:i.componentsPerAttribute,componentDatatype:i.componentDatatype,offsetInBytes:0,strideInBytes:0,normalize:!1})}function t$L(){this.pntArray=[]}function p$U(e){e=e||[],this.init(e)}Object.defineProperties(o$11.prototype,{geoRotationX:{get:function(){return this.rotationX},set:function(e){"number"==typeof e&&(this.rotationX=e,this._isMatrixDirty=!0)}},geoRotationY:{get:function(){return this.rotationY},set:function(e){"number"==typeof e&&(this.rotationY=e,this._isMatrixDirty=!0)}},geoRotationZ:{get:function(){return this.rotationZ},set:function(e){"number"==typeof e&&(this.rotationZ=e,this._isMatrixDirty=!0)}},geoScaleX:{get:function(){return this.scaleX},set:function(e){"number"==typeof e&&(this.scaleX=e,this._isMatrixDirty=!0)}},geoScaleY:{get:function(){return this.scaleY},set:function(e){"number"==typeof e&&(this.scaleY=e,this._isMatrixDirty=!0)}},geoScaleZ:{get:function(){return this.scaleZ},set:function(e){"number"==typeof e&&(this.scaleZ=e,this._isMatrixDirty=!0)}},geoId:{get:function(){return this.id},set:function(e){"number"==typeof e&&(this.id=e,this._isMatrixDirty=!0)}},geoType:{get:function(){return this.type},set:function(e){"number"==typeof e&&(this.type=e)}},geoPosition:{get:function(){return this.position},set:function(e){e instanceof s$N&&!s$N.equals(e,this.position)&&(this.position=e,this._isMatrixDirty=!0,this._isGeometryDirty=!0)}},modelMatrix:{get:function(){return this._isMatrixDirty&&this._computeMatrix(),this._modelMatrix}},isGeometryDirty:{get:function(){return this._isGeometryDirty},set:function(e){this._isGeometryDirty=e}},isLatLon:{get:function(){return this._isLatLon},set:function(e){this._isLatLon=e}}}),o$11.prototype.init=function(e){e=e||{},this.rotationX=u$Z(e.rotationX,0),this.rotationY=u$Z(e.rotationY,0),this.rotationZ=u$Z(e.rotationZ,0),this.scaleX=u$Z(e.scaleX,1),this.scaleY=u$Z(e.scaleY,1),this.scaleZ=u$Z(e.scaleZ,1),this.position=u$Z(e.position,new s$N(0,0,0)),this.id=u$Z(e.id,0),this.type=u$Z(e.type,P$U.UNKNOWN),this.point3Ds=[],this.parts=[],this._geometry=void 0,this._modelMatrix=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._isMatrixDirty=!0,this._isGeometryDirty=!0,this._isLatLon=!0},o$11.prototype.getBounds=function(){return null},o$11.prototype._getGeometry=function(){return(!e$2e(this._geometry)||this._isGeometryDirty)&&this._createGeometry(),this._geometry},o$11.prototype._computeMatrix=function(){if(this._isLatLon){var e=o$1p.fromDegrees(this.position.x,this.position.y,this.position.z),t=e$2d.toRadians(this.rotationX),i=e$2d.toRadians(this.rotationY),n=new i$16(e$2d.toRadians(this.rotationZ),t,i),r=new o$1p(this.scaleX,this.scaleY,this.scaleZ),o=new n$15,a=new p$1d,s=n$15.fromHeadingPitchRoll(n,o),l=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,s,r,a);if(this._modelMatrix=m$19.eastNorthUpToFixedFrame(e,t$12.WGS84,this._modelMatrix),"GEOCONE"===this.type&&this._rotateOrigin===O$K.APEX){var u,c,h;if(l=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,s,new o$1p(1,1,1),a),!e$2e(this._vertex))return void(this._isMatrixDirty=!1);var d=new p$1d;p$1d.inverse(this._modelMatrix,d);var f=p$1d.clone(this._modelMatrix),p=new p$1d;p$1d.fromScale(r,p);var _=p$1d.multiplyByPoint(d,this._vertex,new o$1p);_=p$1d.multiplyByPoint(p,_,new o$1p),_=p$1d.multiplyByPoint(f,_,new o$1p);var m=o$1p.subtract(_,e,new o$1p);u=p$1d.fromTranslation(m),p$1d.multiply(u,this._modelMatrix,this._modelMatrix),p$1d.multiply(l,this._modelMatrix,this._modelMatrix),p$1d.multiplyByScale(this._modelMatrix,r,this._modelMatrix),h=p$1d.multiplyByPoint(u,_,new o$1p),h=p$1d.multiplyByPoint(l,h,new o$1p);var g=o$1p.subtract(_,h,new o$1p);c=p$1d.fromTranslation(g),p$1d.multiply(c,this._modelMatrix,this._modelMatrix)}else p$1d.multiply(this._modelMatrix,l,this._modelMatrix)}else{e=new o$1p(this.position.x,this.position.y,this.position.z);p$1d.fromTranslation(e,this._modelMatrix,this._modelMatrix)}this._isMatrixDirty=!1},o$11.prototype._createGeometry=function(){},o$11.prototype._getVertexBuffer=function(e){let t=this._getGeometry();return(!e$2e(this._vertexBuffer)||this._vertexBuffer.isDestroyed())&&(this._vertexBuffer=t$X.createVertexBuffer({context:e,typedArray:S$14.createTypedArray(S$14.FLOAT,t.attributes.position.values),usage:A$18.STATIC_DRAW})),this._vertexBuffer},o$11.prototype.getVertexArray=function(e){let t=this._getGeometry(),i=[];i.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var n=t.attributes.normal;e$2e(n)&&T$V(i,"normal",n,1,e);var r=t.attributes.st;return e$2e(r)&&T$V(i,"st",r,2,e),new c$13({context:e,attributes:i,indexBuffer:t$X.createIndexBuffer({context:e,typedArray:t.indices,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})})},o$11.prototype.getOutlineVertexArray=function(e){},t$L.prototype.add=function(e){e instanceof s$N&&this.pntArray.push(e)},t$L.prototype.removeAll=function(){this.pntArray=[]},p$U.prototype=new o$11,p$U.prototype.constructor=p$U,p$U.prototype.parent=o$11.prototype,Object.defineProperties(p$U.prototype,{partCount:{get:function(){return this.parts.length}}}),p$U.prototype.init=function(e){this.parts=[],this.polyline={positions:[],width:10},this.points=[];for(var t=0,i=e.length;t<i;t++){var n=e[t].pntArray.length;if(this.parts.push(n),n>0)for(var r=0;r<n;r++){var o=e[t].pntArray[r];this.points.push(o),this.polyline.positions.push(o)}}this.type=P$U.GEOLINE3D},p$U.prototype.addPart=function(e){if(!(!e instanceof t$L)){for(var t=0,i=e.pntArray.length;t<i;t++)this.points.push(e.pntArray[t]),this.polyline.positions.push(e.pntArray[t]);this.parts.push(e.pntArray.length)}},p$U.prototype.getPart=function(e){if("number"!=typeof e||e>=this.partCount)return null;for(var t=new t$L,i=0,n=0;n<e;n++)i+=this.parts[n];for(n=i;n<this.parts[e];n++)t.add(new s$N(this.points[n].x,this.points[n].y,this.points[n].z));return t};var _0x328f77=(_0x38d620=!0,function(e,t){var i=_0x38d620?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38d620=!1,i}),_0x42ccb3=_0x328f77(void 0,(function(){return _0x42ccb3.toString().search("(((.+)+)+)+$").toString().constructor(_0x42ccb3).search("(((.+)+)+)+$")})),_0x38d620;function _0x733981(e){if(!e$2e(e))throw new t$15("scene are required.");if(!e.context.depthTexture)throw new t$15("the depth buffer is not supported.");if(e$1W.maximumVertexTextureImageUnits<1)throw new t$15("the max of vertexTextureImageUnits less 1, function is not supported.");this._displayMode={LINE:0,FACE:1},this._scene=e,this._depthBuffer=void 0,this._command=void 0,this._lineCommand=void 0,this._viewerCommand=void 0,this._viewerLineCommand=void 0,this._boundingSphere=new i$1d,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._displayStyle=this._displayMode.LINE,this._invertViewMatrix=new p$1d,this._invertViewProjectionMatrix=new p$1d,this._color=new e$2c(1,0,0,1),this._radius=-1,this._ignoreGlobe=!1,this._limitBodys=new e$1Q,this._update=!1,this._visibleViewport=4095,this._id=0,this._name="",this._points=[],this._lineWidth=1,this._lineStripCollection=e.primitives.add(new J$T)}function _0x5a40e5(e){e$2e(e._command)&&(e._command.vertexArray=e._command.vertexArray&&e._command.vertexArray.destroy(),e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e$2e(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0),e$2e(e._faceCommand)&&(e._faceCommand.vertexArray=e._faceCommand.vertexArray&&e._faceCommand.vertexArray.destroy(),e._faceCommand.shaderProgram=e._faceCommand.shaderProgram&&e._faceCommand.shaderProgram.destroy(),e._faceCommand=void 0)}function _0x90d6fc(e){e$2e(e._viewerCommand)&&(e._viewerCommand.vertexArray=e._viewerCommand.vertexArray&&e._viewerCommand.vertexArray.destroy(),e._viewerCommand.shaderProgram=e._viewerCommand.shaderProgram&&e._viewerCommand.shaderProgram.destroy(),e._viewerCommand=void 0),e$2e(e._viewerLineCommand)&&(e._viewerLineCommand.vertexArray=e._viewerLineCommand.vertexArray&&e._viewerLineCommand.vertexArray.destroy(),e._viewerLineCommand.shaderProgram=e._viewerLineCommand.shaderProgram&&e._viewerLineCommand.shaderProgram.destroy(),e._viewerLineCommand=void 0)}function _0x5c8249(e,t,i){var n=e._viewPosition[2],r=5e-4*n;r=r<1?1:r;var o=Math.abs(n)+6378137,a=Math.sqrt((o-6378137)*(o+6378137));n<0&&a<5e4?a=5e4:n<100&&n>0&&(a*=50);var s,l=e._direction*e$2d.RADIANS_PER_DEGREE,u=e._pitch*e$2d.RADIANS_PER_DEGREE,c=i.camera,h=c._projection;if(e._scene.mode===C$14.SCENE3D)s=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var d=a$18.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);s=h.project(d,new o$1p)}var f=c.frustum.near,p=c.frustum.far,_=new o$1p,m=c.heading,g=c.pitch;o$1p.clone(c.position,_),e._depthBuffer.isUpdate=!0,e._depthBuffer._beginFunc=function(){f=c.frustum.near,p=c.frustum.far,m=c.heading,g=c.pitch,o$1p.clone(c.position,_),c.frustum.near=r,c.frustum.far=a;var t={destination:s,orientation:{heading:l,pitch:u},convert:!1};if(c.setView(t),e.skylineCamera=t,p$1d.clone(c.inverseViewMatrix,e._invertViewMatrix),p$1d.multiply(c.frustum.projectionMatrix,c.viewMatrix,e._invertViewProjectionMatrix),p$1d.inverse(e._invertViewProjectionMatrix,e._invertViewProjectionMatrix),e._scene.mode===C$14.SCENE3D)o$1p.clone(s,e._boundingSphere.center);else{var i=m$19.convertToColumbusCartesian(o$1p.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]));o$1p.clone(i,e._boundingSphere.center)}e._boundingSphere.radius=a},e._depthBuffer._endFunc=function(){if(e$2e(e._lineCommand)){e._lineCommand.modelMatrix=e._invertViewMatrix,e._points.length=0;var i=t.uniformState,n=p$1d.clone(i.inverseProjection),r=p$1d.clone(i.viewProjection),o=o$1o.clone(i.currentFrustum),a=i.log2FarDepthFromNearPlusOne,s=a$18.clone(c.positionCartographic);t.readPixelsAsync({framebuffer:e._depthBuffer.framebuffer}).then((i=>{var l=e._lineCommand.vertexArray.getAttribute(0),u=4*(t.drawingBufferWidth+1),c=S$14.createTypedArray(l.componentDatatype,u);c[0]=0,c[1]=0,c[2]=0,c[3]=1,4*u!==l.vertexBuffer.sizeInBytes&&(_0x5a40e5(e),_0x485912(e,t),l=e._lineCommand.vertexArray.getAttribute(0));for(var h=new e$2c,d=new e$2c(1,1/255,1/65025,1/160581375),f=o.x,p=o.y,_=0;_<t.drawingBufferWidth;_++){for(var m=0,g=t.drawingBufferHeight-1;g>-1;g--){var x=4*(t.drawingBufferWidth*g+_),y=e$2c.unpack(i,x,h);if(e$2c.divideByScalar(y,255,y),(m=e$2c.dot(y,d))>0)break;m=0}if(e._scene.frameState.useLogDepth&&m>0){var v=m*a;m=p*(1-f/(Math.pow(2,v)-1+f))/(p-f)}h.x=_/t.drawingBufferWidth*2-1,h.y=g/t.drawingBufferHeight*2-1,t.webgpu?h.z=m:h.z=2*m-1,h.w=1,p$1d.multiplyByVector(n,h,h);var $=new o$1p(h.x,h.y,h.z);o$1p.divideByScalar($,h.w,$);var b=o$1p.magnitude($);e._radius>0&&b>e._radius&&(o$1p.normalize($,$),$.x*=e._radius,$.y*=e._radius,$.z*=e._radius),h.x=$.x,h.y=$.y,h.z=$.z,h.w=1;var T=o$1p.fromCartesian4(p$1d.multiplyByVector(e._invertViewMatrix,h,new e$2c));e._scene.mode===C$14.COLUMBUS_VIEW&&(T=m$19.convertTo3DCartesian(T)),e._points.push(T),c[4*(_+1)]=h.x,c[4*(_+1)+1]=h.y,c[4*(_+1)+2]=h.z,c[4*(_+1)+3]=h.w}l.vertexBuffer.copyFromArrayView(c,0);for(var C=0;C<e._limitBodys.values.length;C++)e._limitBodys.values[C].update(t,r,o,a,s);e._lineStripCollection.removeAll(),e._lineWidth>=2&&e._lineStripCollection.add({width:e._lineWidth,positions:e._points,material:r$Y.fromType(r$Y.ColorType,{color:e$1X.fromCartesian4(e._color)})})}))}e$2e(e._faceCommand)&&(e._faceCommand.modelMatrix=e._invertViewMatrix),c.setView({destination:_,orientation:{heading:m,pitch:g,roll:c.roll},convert:!1}),c.frustum.near=f,c.frustum.far=p,e._depthBuffer.isUpdate=!1}}function _0x3c37cd(e,t,i){var n=i.camera.frustum,r=10,o=2*Math.atan(n.aspectRatio*Math.tan(.5*n.fovy)),a=r*Math.tan(.5*o),s=r*Math.tan(.5*n.fovy),l=S$14.createTypedArray(S$14.UNSIGNED_SHORT,12),u=S$14.createTypedArray(S$14.UNSIGNED_SHORT,16);l[0]=0,l[1]=2,l[2]=1,l[3]=0,l[4]=4,l[5]=2,l[6]=0,l[7]=3,l[8]=4,l[9]=0,l[10]=1,l[11]=3,u[0]=0,u[1]=1,u[2]=0,u[3]=2,u[4]=0,u[5]=3,u[6]=0,u[7]=4,u[8]=1,u[9]=2,u[10]=1,u[11]=3,u[12]=2,u[13]=4,u[14]=3,u[15]=4;var c=S$14.createTypedArray(S$14.FLOAT,15);c[0]=c[1]=c[2]=0,c[3]=-a,c[4]=-s,c[5]=-10,c[6]=-a,c[7]=s,c[8]=-10,c[9]=a,c[10]=-s,c[11]=-10,c[12]=a,c[13]=s,c[14]=-10;var h=t$X.createVertexBuffer({context:t,typedArray:c,usage:A$18.STATIC_DRAW}),d=[],f={aPosition:0};d.push({name:"aPosition",index:f.aPosition,vertexBuffer:h,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var p=t$X.createIndexBuffer({context:t,typedArray:l,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),_=t$X.createIndexBuffer({context:t,typedArray:u,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});e._viewerLineCommand=new i$$({primitiveType:W$18.LINES,modelMatrix:e._invertViewMatrix,pass:Le$q.ANALYSIS,owner:e,cull:!1}),e._viewerLineCommand.vertexArray=new c$13({context:t,attributes:d,indexBuffer:_}),e._viewerLineCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:f}),e._viewerLineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});for(var m=[],g=0;g<6;g++)m[g]=new e$2c(0,0,0,0);var x=new e$2c(128/255,1,235/255,1);e._viewerLineCommand.uniformMap={uDiffuseColor:function(){return x},clip_mode:function(){return 0},clip_planes:function(){return m},clip_line_color:function(){return e$2c.UNIT_W}},e._viewerCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,pass:Le$q.ANALYSIS,owner:e,cull:!1}),e._viewerCommand.vertexArray=new c$13({context:t,attributes:d,indexBuffer:p}),e._viewerCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:f}),e._viewerCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var y=new e$2c(68/255,222/255,158/255,1);e._viewerCommand.uniformMap={uDiffuseColor:function(){return y},clip_mode:function(){return 0},clip_planes:function(){return m},clip_line_color:function(){return e$2c.UNIT_W}}}function _0x485912(e,t,i){var n=t.drawingBufferWidth+1,r=S$14.createTypedArray(S$14.FLOAT,4*n),o=S$14.createTypedArray(S$14.FLOAT,2*n),a=S$14.createTypedArray(S$14.UNSIGNED_SHORT,n-1),s=S$14.createTypedArray(S$14.UNSIGNED_SHORT,n);o[0]=-1;for(var l=1;l<n;l++)o[2*l]=l/(n-1),o[2*l+1]=0;for(l=0;l<n-1;l++)a[l]=l+1,s[l]=l;s[n-1]=n-1;var u=t$X.createVertexBuffer({context:t,typedArray:r,usage:A$18.STATIC_DRAW}),c=[],h={aPosition:0};c.push({name:"aPosition",index:h.aPosition,vertexBuffer:u,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),h.aTexCoord0=1;var d=t$X.createVertexBuffer({context:t,typedArray:o,usage:A$18.STATIC_DRAW});c.push({name:"aTexCoord0",index:h.aTexCoord0,vertexBuffer:d,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var f=t$X.createIndexBuffer({context:t,typedArray:a,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),p=t$X.createIndexBuffer({context:t,typedArray:s,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),_={uSkylineColor:function(){return e._color}};e._lineCommand=new i$$({primitiveType:W$18.LINE_STRIP,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!1}),e._lineCommand.vertexArray=new c$13({context:t,attributes:c,indexBuffer:f}),e._lineCommand.shaderProgram=r$14.fromCache({name:"Skyline",context:t,vertexShaderSource:_0x88ad48,fragmentShaderSource:_0x3315e4,attributeLocations:h}),e._lineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}}),e._lineCommand.uniformMap=_,e._faceCommand=new i$$({primitiveType:W$18.TRIANGLE_FAN,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!1}),e._faceCommand.vertexArray=new c$13({context:t,attributes:c,indexBuffer:p}),e._faceCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:_0x88ad48,fragmentShaderSource:_0x3315e4,attributeLocations:h}),e._faceCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}}),e._faceCommand.uniformMap=_}_0x42ccb3(),Object.defineProperties(_0x733981.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},color:{get:function(){var e=new e$1X;return e.red=this._color.x,e.green=this._color.y,e.blue=this._color.z,e.alpha=this._color.w,e},set:function(e){this._color.x=e.red,this._color.y=e.green,this._color.z=e.blue,this._color.w=e.alpha,this._lineWidth>=2&&(this._update=!0)}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},displayMode:{get:function(){return this._displayMode}},displayStyle:{get:function(){return this._displayStyle},set:function(e){this._displayStyle=e}},radius:{get:function(){return this._radius},set:function(e){this._radius=e,this._update=!0}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e,this._update=!0}},ignoreGlobe:{get:function(){return this._ignoreGlobe},set:function(e){this._ignoreGlobe=e,e$2e(this._depthBuffer)&&(this._depthBuffer.environmentVisible.isGlobalVisible=!this._ignoreGlobe,this._update=!0)}}}),_0x733981.prototype.update=function(e,t,i){if(!t._fboState.enabled){this._update&&(e$2e(this._depthBuffer)||(this._depthBuffer=new s$U(e),this._depthBuffer.environmentVisible.isGlobalVisible=!this._ignoreGlobe,this._depthBuffer.environmentVisible.isObjectVisible=!0,t._framebufferList[this._name]=this._depthBuffer,this._frameState=t),this._update=!1,_0x5a40e5(this),_0x90d6fc(this),_0x5c8249(this,e,t),_0x3c37cd(this,e,t),_0x485912(this,e));for(var n=0;n<this._limitBodys.values.length;n++){var r=this._limitBodys.values[n];e$2e(r)&&e$2e(r._command)&&i.push(r._command)}e$2e(this._viewerCommand),e$2e(this._viewerLineCommand),this._depthBuffer.isUpdate||(this._displayStyle===this._displayMode.LINE?e$2e(this._lineCommand)&&this._lineWidth<2&&i.push(this._lineCommand):e$2e(this._faceCommand)&&i.push(this._faceCommand))}},_0x733981.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=1<<e,e$2e(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport)},_0x733981.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0x733981.prototype.getSkyline2D=function(){if(!this._update){for(var e=this._scene.context,t=e.readPixels({framebuffer:this._depthBuffer.framebuffer}),i=(e.drawingBufferWidth,[]),n=[],r=[],o=[],a=new e$2c,s=new e$2c(1,1/255,1/65025,1/160581375),l=0;l<e.drawingBufferWidth;l++)for(var u=e.drawingBufferHeight-1;u>-1;u--){var c=4*(e.drawingBufferWidth*u+l),h=e$2c.unpack(t,c,a);if(e$2c.divideByScalar(h,255,h),e$2c.dot(h,s)>0){i.push(l/e.drawingBufferWidth),n.push(u/e.drawingBufferHeight),r.push(l),o.push(u);break}}return{x:i,y:n,drawingBufferXArr:r,drawingBufferYArr:o}}},_0x733981.prototype.getSkyline2DAsync=function(){if(this._update)return Promise.resolve(void 0);var e=this._scene.context;return e.readPixelsAsync({framebuffer:this._depthBuffer.framebuffer}).then((t=>{e.drawingBufferWidth;for(var i=[],n=[],r=[],o=[],a=new e$2c,s=new e$2c(1,1/255,1/65025,1/160581375),l=0;l<e.drawingBufferWidth;l++)for(var u=e.drawingBufferHeight-1;u>-1;u--){var c=4*(e.drawingBufferWidth*u+l),h=e$2c.unpack(t,c,a);if(e$2c.divideByScalar(h,255,h),e$2c.dot(h,s)>0){i.push(l/e.drawingBufferWidth),n.push(u/e.drawingBufferHeight),r.push(l),o.push(u);break}}var d={x:i,y:n,drawingBufferXArr:r,drawingBufferYArr:o};return Promise.resolve(d)}))},_0x733981.prototype.getSkyline3D=function(){if(!this._update&&0!==this._points.length){for(var e,t=[],i=[],n=[],r=0,o=this._points.length;r<o;r++)e=a$18.fromCartesian(this._points[r]),t.push(e.longitude*e$2d.DEGREES_PER_RADIAN),i.push(e.latitude*e$2d.DEGREES_PER_RADIAN),n.push(e.height);return{x:t,y:i,z:n}}},_0x733981.prototype.addLimitbody=function(e){var t=e.name,i=e.position;if(!e$2e(t)||!e$2e(i))return!1;var n=this._limitBodys.get(t);if(e$2e(n))return!1;n=new _0x6cc60b(i,this),this._limitBodys.set(t,n),e$2e(this._depthBuffer)&&(this._depthBuffer.isUpdate=!0)},_0x733981.prototype.removeLimitbody=function(e){return!!this._limitBodys.remove(e)},_0x733981.prototype.removeAllLimitBody=function(){for(var e=0;e<this._limitBodys.values.length;e++)this._limitBodys.values[e].destroy(),this._limitBodys.values[e]=null;this._limitBodys.removeAll()},_0x733981.prototype.clear=function(){this.removeAllLimitBody(),this._update=!1,this._lineStripCollection.removeAll(),this._points=[],_0x5a40e5(this),_0x90d6fc(this)},_0x733981.prototype.getObjectIds=function(){this._scene.renderIds(this.skylineCamera);var e=this._scene._defaultView.pickFramebuffer;if(e$2e(e)){var t=this._scene._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=t.readPixels({x:0,y:0,width:i,height:n,framebuffer:e._fb}),o=this.getSkyline2D();if(e$2e(o)){for(var a,s,l=o.drawingBufferXArr,u=o.drawingBufferYArr,c=l.length,h={};c--;){a=l[c],s=u[c];var d=e$2c.fromArray(r,4*i*s+4*a),f=e$1X.byteToRgba(d.x,d.y,d.z,d.w),p=t.getObjectByPickId(f);if(e$2e(p)){var _=p.primitive.id;f=p.id;e$2e(h[_])||(h[_]=[]),-1===h[_].indexOf(f)&&h[_].push(f)}}return h}}},_0x733981.prototype.getObjectIdsAsync=function(){this._scene.renderIds(this.skylineCamera);var e=this._scene._defaultView.pickFramebuffer;if(!e$2e(e))return Promise.resolve(void 0);var t=this._scene._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return t.readPixelsAsync({x:0,y:0,width:i,height:n,framebuffer:e._fb}).then((e=>this.getSkyline2DAsync().then((n=>{if(!e$2e(n))return Promise.resolve(void 0);for(var r,o,a=n.drawingBufferXArr,s=n.drawingBufferYArr,l=a.length,u={};l--;){r=a[l],o=s[l];var c=e$2c.fromArray(e,4*i*o+4*r),h=e$1X.byteToRgba(c.x,c.y,c.z,c.w),d=t.getObjectByPickId(h);if(e$2e(d)){var f=d.primitive.id;h=d.id;e$2e(u[f])||(u[f]=[]),-1===u[f].indexOf(h)&&u[f].push(h)}}return Promise.resolve(u)}))))},_0x733981.prototype.getSkylineSectorParameter=function(){var e=this.getSkyline3D();if(e$2e(e)){for(var t,i,n,r=e.x,o=e.y,a=e.z,s=new t$L,l=0,u=r.length;l<u;l++)t=r[l],i=o[l],n=a[l],s.add(new s$N(t,i,n));return{geoLine3D:new p$U([s]),viewPos:new s$N(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2])}}},_0x733981.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("Skyline"),""===this._name&&(this._name="skyline"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},_0x733981.prototype.destroy=function(){return e$2e(this._frameState)&&(e$2e(this._depthBuffer)&&delete this._frameState._framebufferList[this._name],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),_0x5a40e5(this),_0x90d6fc(this),this.removeAllLimitBody(),this._scene._analyst3D.remove(this._name,!0),i$11(this)};var _0x1d5ee6=(_0x196c38=!0,function(e,t){var i=_0x196c38?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x196c38=!1,i}),_0x542244=_0x1d5ee6(void 0,(function(){return _0x542244.toString().search("(((.+)+)+)+$").toString().constructor(_0x542244).search("(((.+)+)+)+$")})),_0x196c38;_0x542244();var _0x12eef8="\n#ifdef SQRESULT\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \nvarying vec4 vSecondColor; \nvarying vec4 vColor;\nvarying vec4 vSQ_clip_pos; \n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef SQRESULT\nbool isPointInObject(vec4 ndc)\n{\n vec2 depthTexCoord = ndc.xy * 0.5 + 0.5;\n bool bIn = false;\n vec4 color = texture2D(uFrontColorTexture, depthTexCoord);\n float pixelZWindow = 0.0;\n#ifdef WEBGPU\n pixelZWindow = ndc.z;\n#else\n pixelZWindow = ndc.z * 0.5 + 0.5;\n#endif\n if(color.r > 0.99 && color.g < 0.01 && color.b < 0.01)\n {\n float z_window_near = czm_unpackDepth(texture2D(uFrontDepthTexture, depthTexCoord.xy));\n z_window_near = czm_reverseLogDepth(z_window_near);\n float z_window_far = czm_unpackDepth(texture2D(uBackDepthTexture, depthTexCoord.xy));\n z_window_far = czm_reverseLogDepth(z_window_far);\n if(pixelZWindow - z_window_near > -0.0000001 && z_window_far - pixelZWindow > -0.0000001)\n {\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\n#endif\nvoid main() \n{\n#ifdef SQRESULT\n vec4 ndc = vSQ_clip_pos / vSQ_clip_pos.w; \n if(!isPointInObject(ndc)) \n { \n discard; \n } \n if(vColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = vSecondColor; \n#endif\n#ifdef DEPTH\n #ifdef LOG_DEPTH\n czm_writeLogDepth();\n gl_FragColor = czm_packDepth(gl_FragDepthEXT);\n #else\n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n #endif\n#endif\n#ifdef COLOR\n gl_FragColor = vec4(1.0,0.0,0.0,1.0);\n#endif\n}";function s$M(e){var t=new n$$(e);t.blendingEnabled=!0,t.viewport=new f$1a,this._context=e,this._pixelDatatype=_$_.UNSIGNED_BYTE,this._fb=new t$V({context:e,colorTextures:[new t$U({context:e,width:1,height:1})],depthStencilTexture:new t$U({context:e,width:1,height:1,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})}),this._passState=t,this.mrtSupport=e.drawBuffers&&e.colorBufferFloat&&e.depthTexture,this.mrt=!1,this._mrt=!1,this._width=1,this._height=1,this._clearCommand=new t$W({color:new e$1X(0,0,0,0),stencil:0,depth:1}),this._clearCommand.framebuffer=this._fb,this._generateMipmap=!1}function t$K(e){this._renderTexture=new s$M(e),this._renderTexture._passState.blendingEnabled=!1,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0},this._type=Qe$c.SQRESULT,this._beginFunc=void 0,this._endFunc=void 0}s$M.prototype.update=function(e){var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=de$y.FRAMEBUFFER_COMPLETE;if(!e$2e(this._fb)||this._width!==i||this._height!==n||this.mrt!==this._mrt){this._width=i,this._height=n,this._fb=this._fb&&this._fb.destroy();var o=[new t$U({context:t,width:i,height:n,pixelDatatype:this._pixelDatatype,sampler:new e$1S({minificationFilter:this._generateMipmap?tt$i.LINEAR_MIPMAP_LINEAR:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})];this.mrt!==this._mrt&&this.mrt&&this.mrtSupport&&o.push(new t$U({context:t,width:i,height:n,pixelDatatype:this._pixelDatatype,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}));var a=new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8});this._fb=new t$V({context:t,colorTextures:o,depthStencilTexture:a}),this._clearCommand.framebuffer=this._fb,this._passState.framebuffer=this._fb,this._mrt=this.mrt,this._fb.status!==r&&(this._fb=this._fb&&this._fb.destroy())}this._clearCommand.execute(t,this._passState)},s$M.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),i$11(this)},Object.defineProperties(t$K.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return this._type},set:function(e){this._type=e}}}),t$K.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._beginFunc&&this._beginFunc(e),this._renderTexture._passState},t$K.prototype.end=function(e){this._endFunc&&this._endFunc(e)},t$K.prototype.update=function(e,t){},t$K.prototype.isDestroyed=function(){return!1},t$K.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)};var e$1A={Disjoint:0,Intersects:1,Contains:2},j$Z=Object.freeze(e$1A),e$1z={Fill:0,WireFrame:1,Fill_And_WireFrame:2},fr$3=Object.freeze(e$1z),_0x220e1a=(_0x2e9c3a=!0,function(e,t){var i=_0x2e9c3a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e9c3a=!1,i}),_0x55ea1f=_0x220e1a(void 0,(function(){return _0x55ea1f.toString().search("(((.+)+)+)+$").toString().constructor(_0x55ea1f).search("(((.+)+)+)+$")})),_0x2e9c3a;_0x55ea1f();var _0x4c39c3="attribute vec4 aPosition;\nattribute vec4 aNormal;\nuniform vec4 uDiffuseColor;\nvarying vec4 vColor;\nvarying vec3 normalEC;\nvarying vec3 positionEC;\nvoid main()\n{\n normalEC = czm_normal * aNormal.xyz;\n positionEC = (czm_modelView * aPosition).xyz;\n vColor = uDiffuseColor;\n #ifdef USE_RelativeOrigin\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz - czm_relativeOrigin, 1.0);\n #else\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n #endif\n}",_0x407ef6=(_0xdb1c64=!0,function(e,t){var i=_0xdb1c64?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xdb1c64=!1,i}),_0x5370ec=_0x407ef6(void 0,(function(){return _0x5370ec.toString().search("(((.+)+)+)+$").toString().constructor(_0x5370ec).search("(((.+)+)+)+$")})),_0xdb1c64;_0x5370ec();var _0x37e2ae="varying vec4 vColor;\nvarying vec3 normalEC;\nvarying vec3 positionEC;\nvoid main()\n{\n vec3 positionToEyeEC = -positionEC;\n vec4 color = czm_gammaCorrect(vColor);\n czm_materialInput materialInput;\n materialInput.normalEC = normalize(normalEC);\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = vColor.rgb;\n material.alpha = vColor.a;\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}",_0x2d26af=(_0x1b1a73=!0,function(e,t){var i=_0x1b1a73?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b1a73=!1,i}),_0x4966a9=_0x2d26af(void 0,(function(){return _0x4966a9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4966a9).search("(((.+)+)+)+$")})),_0x1b1a73;_0x4966a9();var _0x4b6e8f="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TEXTURE\nattribute vec4 aTexCoord0;\n#endif\n#ifdef VertexColor\n #ifdef WEBGPU\n attribute uvec4 aColor;\n #else\n attribute vec4 aColor;\n #endif\n#endif\nattribute vec3 aPosHigh;\nattribute vec3 aPosLow;\nattribute vec4 aQuaternion;\nattribute vec4 aScaleAndRadius;\nattribute vec4 aColor2;\nattribute vec4 aPickColor;\nattribute vec3 aOffset;\n#ifdef LocalTransform\nattribute vec4 aLocalTranslation;\nattribute vec4 aLocalQuaternion;\n#endif\n#include <SceneUboDecl>\nuniform vec4 uFillColor;\nuniform mat4 uGeoMat;\nuniform float uRangeMode;\nuniform vec2 uVisibleDistance;\nuniform float uFilterPixel;\nuniform float uMixColorType;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec4 vPositionWC;\nvarying vec3 vNormalEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying mat4 vModelMatrix;\n#ifdef Volume\n attribute vec3 aRatio;\n varying vec3 vecRotioCoord;\n varying vec2 vecHypTexCoord;\n#endif\n\nmat4 transfromFromQuaternion(vec4 q, vec4 translation)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, translation.x, translation.y, translation.z, 1.0);\n}\nfloat filterTest(vec3 rte, float radius)\n{\n if(uRangeMode > 0.0)\n {\n float distance = length(rte);\n float theta = czm_piOverFour * 0.5;\n float screenPix = max(czm_globeDepthTextureDim.x, czm_globeDepthTextureDim.y) * 0.5;\n float lamat = screenPix / tan(theta);\n return lamat * radius / distance > uFilterPixel ? 1.0 : 0.0;\n }\n return length(rte) < uVisibleDistance.x && length(rte) > uVisibleDistance.y ? 1.0 : 0.0;\n}\nvec4 translateRelativeToEye(vec3 high,vec3 low) {\n vec3 highDifference = high - czm_encodedOriginCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedOriginCameraPositionMCLow;\n return vec4(highDifference + lowDifference, 1.0);\n}\nvoid main()\n{\n vec4 vertexPos = vec4(aPosition.xyz, 1.0) - vec4(aOffset.xyz,0.0);\n vec4 positionMC = uGeoMat*vertexPos;\n vec4 rte = translateRelativeToEye(aPosHigh,aPosLow);\n#ifdef TEXTURE\n vTexCoord = aTexCoord0.xy;\n#endif\n float show = filterTest(rte.xyz, aScaleAndRadius.w);\n mat4 rotationMat = transfromFromQuaternion(aQuaternion, vec4(0.0));\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMat[0].xyz,0.0);\n worldMatrix[1] = vec4(rotationMat[1].xyz,0.0);\n worldMatrix[2] = vec4(rotationMat[2].xyz,0.0);\n worldMatrix[3] = vec4(rte.x,rte.y,rte.z,1.0);\n mat4 scaleMatrix;\n vec3 scale = aScaleAndRadius.xyz;\n scaleMatrix[0] = vec4(scale.x,0,0,0.0);\n scaleMatrix[1] = vec4(0,scale.y,0,0.0);\n scaleMatrix[2] = vec4(0,0,scale.z,0.0);\n scaleMatrix[3] = vec4(0,0,0,1.0);\n mat4 modelMatrix = worldMatrix;\n#ifdef LocalTransform\n mat4 localTransformMat = transfromFromQuaternion(aLocalQuaternion, aLocalTranslation);\n modelMatrix *= localTransformMat;\n#endif\n modelMatrix *= scaleMatrix;\n mat3 rotationMatrix = mat3(modelMatrix);\n positionMC = modelMatrix * vec4(positionMC.xyz, 1.0);\n positionMC.w = 1.0;\n gl_Position = show * czm_modelViewProjectionRelativeToEye * positionMC;\n vPositionMC.xyz = positionMC.xyz;\n vPositionWC = modelMatrix * positionMC;\n vPositionMC.w = 0.0;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = aColor / 255.0;\n #endif\n#endif\n if(abs(uMixColorType) < 0.1)\n {\n vColor = vertexColor * aColor2;\n }\n else\n {\n vColor = aColor2;\n }\n vPickColor = aPickColor / 255.0;\n vModelMatrix = modelMatrix * uGeoMat;\n vPositionEC = (czm_modelViewRelativeToEye * vec4(vPositionMC.xyz, 1.0)).xyz;\n#ifdef HAS_NORMAL\n if(length(aNormal) > 0.8)\n {\n mat4 modelView = uView * vModelMatrix;\n mat4 invModelView = czm_inverseMatrix(modelView);\n mat3 invModelViewRotation = mat3(invModelView);\n mat3 normalMatrix = czm_transpose(invModelViewRotation);\n vNormalEC = normalize(normalMatrix * aNormal);\n vPositionMC.w = 1.0;\n }\n#endif\n#ifdef Volume\nvecRotioCoord = aRatio;\n#endif\n#ifdef ClampObject\n gl_Position = czm_depthClampFarPlane(czm_modelViewProjectionRelativeToEye*positionMC);\n vColor = vColor * uFillColor;\n#endif\n}\n";function o$10(e,t,i){return p$$({url:e,responseType:"arraybuffer",headers:t,request:i})}var g$11=273;function P$T(e,t,i){switch(e){case de$y.COMPRESSED_RGB_S3TC_DXT1_EXT:case de$y.COMPRESSED_RGB_ETC1_WEBGL:return(t+3>>2)*(i+3>>2)*8;case de$y.COMPRESSED_RGBA_S3TC_DXT5_EXT:return(t+3>>2)*(i+3>>2)*16;case de$y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG:case de$y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case de$y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG:case de$y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case g$11:return t*i*2;case V$12.RGBA:return t*i*4;case V$12.LUMINANCE_ALPHA:return t*i*2;default:return 0}}var o$$=function(e,t,i,n,r,o,a,s,l,u,c,h){this._context=t,this._gl=t._gl,this._width=i,this._height=n,this._imageBuffer=o,this._oriCompressType=h,this._texture=null,this._internalFormat=r,this._isCompressed=V$12.isCompressedFormat(r),this._wrapS=u$Z(s,q$1a.CLAMP_TO_EDGE),this._wrapT=u$Z(l,q$1a.CLAMP_TO_EDGE),this._pixelDataType=u$Z(u,_$_.UNSIGNED_BYTE),this._pixelDataType===_$_.FLOAT&&(this._wrapS=q$1a.CLAMP_TO_EDGE,this._wrapT=q$1a.CLAMP_TO_EDGE),this.ready=!1,this.is3D=a,this.id=e,this._target=this._gl.TEXTURE_2D,this._size=o.length,this._mipmapEnabled=u$Z(c,!0),1==this.is3D?this.init3DTexture():(this._target=this._gl.TEXTURE_2D,this._initTexture2D()),V$12.isCompressedFormat(this._internalFormat)?this._sizeInBytes=V$12.compressedTextureSizeInBytes(this._internalFormat,this._width,this._height):this._sizeInBytes=this._width*this._height*4,this._context.memorySize+=this._sizeInBytes};function M$X(e,t,i,n){var r=1;if(!e$2d.isPowerOfTwo(i)||!e$2d.isPowerOfTwo(n))return 1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=V$12.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l==o?r:1}function d$17(e,t,i){var n=e.length,r=Math.ceil(Math.sqrt(n)),o=document.createElement("canvas");o.width=t*r,o.height=i*r;var a=o.getContext("2d");a.fillStyle="#00f",a.fillRect(0,0,o.width,o.height);for(var s=0;s<n;s++){var l=e[s%n],u=s%r,c=Math.floor(s/r);a.drawImage(l,u*t,c*i)}return a.getImageData(0,0,t*r,i*r)}function g$10(e,t,i){switch(e){case de$y.COMPRESSED_RGB_S3TC_DXT1_EXT:case de$y.COMPRESSED_RGB_ETC1_WEBGL:return(t+3>>2)*(i+3>>2)*8;case de$y.COMPRESSED_RGBA_S3TC_DXT5_EXT:return(t+3>>2)*(i+3>>2)*16;case de$y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG:case de$y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case de$y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG:case de$y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case V$12.RGB:return t*i*3;case V$12.RGBA:return t*i*4;case V$12.LUMINANCE_ALPHA:return t*i*2;default:return 0}}Object.defineProperties(o$$.prototype,{width:{get:function(){return this._width}},height:{get:function(){return this._height}},size:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._sizeInBytes}},pixelDataType:{get:function(){return this._pixelDataType}}}),o$$.prototype._initTexture2D=function(){var e=this._gl;this._texture=e.createTexture(),this._uploadImageData(!1),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$$.prototype.generateMipmap=function(){var e=I$1e.NICEST;if(this._width>1&&!e$2d.isPowerOfTwo(this._width))throw new DeveloperError("width must be a power of two to call generateMipmap().");if(this._height>1&&!e$2d.isPowerOfTwo(this._height))throw new DeveloperError("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},o$$.prototype.updateTexture=function(e,t,i){this.ready=!1,this._width=i.width,this._height=i.height,this._internalFormat=i.internalFormat,this._pixelDataType=i.pixelDataType,this._wrapS=i.wrapS,this._wrapT=i.wrapT,this._mipmapEnabled=u$Z(i.mipmapEnabled,!0);var n=this._gl;this.id=e,this._size=t.length,this._target=n.TEXTURE_2D,this._imageBuffer=t,this._uploadImageData(!0),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$$.prototype._uploadImageData=function(e){var t=this._internalFormat,i=this._width,n=this._height,r=this._imageBuffer,o=this._gl;o.bindTexture(o.TEXTURE_2D,this._texture),t===V$12.LUMINANCE_ALPHA||0===this._oriCompressType?o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1):(t==V$12.RGB||t==V$12.RGBA||t===g$11)&&o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!0);var a,s=M$X(r,t,i,n);this._context.webgl2&&!e&&t!==de$y.LUMINANCE_ALPHA&&(a=t===g$11?o.RGB565:V$12.toInternalFormat(t,this._pixelDataType,this._context),o.texStorage2D(o.TEXTURE_2D,s,a,i,n));var l=s>1&&this._mipmapEnabled,u=0,c=0;do{var h,d=P$T(t,i,n);h=t==V$12.RGBA&&this._pixelDataType===_$_.FLOAT?new Float32Array(r.buffer,r.byteOffset+u,d):new Uint8Array(r.buffer,r.byteOffset+u,d),this._isCompressed?this._context.webgl2?o.compressedTexSubImage2D(o.TEXTURE_2D,c++,0,0,i,n,t,h):o.compressedTexImage2D(o.TEXTURE_2D,c++,t,i,n,0,h):this._context.webgl2?t===g$11?(o.texSubImage2D(o.TEXTURE_2D,0,0,0,i,n,o.RGB,o.UNSIGNED_SHORT_5_6_5,r),d/=2):t===V$12.LUMINANCE_ALPHA?o.texImage2D(o.TEXTURE_2D,0,t,i,n,0,t,o.UNSIGNED_BYTE,h):o.texSubImage2D(o.TEXTURE_2D,c++,0,0,i,n,t,this._pixelDataType,h):t===g$11?(o.texImage2D(o.TEXTURE_2D,0,o.RGB,i,n,0,o.RGB,o.UNSIGNED_SHORT_5_6_5,r),d/=2):o.texImage2D(o.TEXTURE_2D,c++,t,i,n,0,t,this._pixelDataType,h),i=Math.max(i>>1,1),n=Math.max(n>>1,1),u+=d}while(u<r.length&&l);c>1?(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),e$2d.isPowerOfTwo(this._width)&&e$2d.isPowerOfTwo(this._height)?o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR_MIPMAP_LINEAR):o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR)):e$2d.isPowerOfTwo(this._width)&&e$2d.isPowerOfTwo(this._height)&&t==V$12.RGBA?(this.generateMipmap(),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR_MIPMAP_LINEAR)):(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR)),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,this._wrapS),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,this._wrapT),o.bindTexture(o.TEXTURE_2D,null)},o$$.prototype.init3DTexture=function(){for(var e=this._imageBuffer,t=this._gl,i=d$17(e,this._width,this._height),n=i.width*i.height*4,r=new Uint8Array(n),o=0;o<n;o++)r[o]=i.data[o];t=this._gl;this._texture=t.createTexture(),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,this._texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),e.length,t.texImage2D(t.TEXTURE_2D,0,t.RGBA,i.width,i.height,0,t.RGBA,t.UNSIGNED_BYTE,r),t.bindTexture(t.TEXTURE_2D,null),this.ready=!0},o$$.prototype.destroy=function(){this._gl.deleteTexture(this._texture),this._texture=null,this.ready=!1,this.id=0,this._context.memorySize-=this._sizeInBytes},o$$.prototype.enable=function(){this.ready&&(this._gl.activeTexture(this._gl.TEXTURE0),this._gl.bindTexture(this._target,this._texture))},o$$.prototype.disable=function(){this.ready&&this._gl.bindTexture(this._target,null)};var o$_=function(e,t,i,n,r,o,a,s,l,u,c,h){this._context=t,this._width=i,this._height=n,this._imageBuffer=o,this._oriCompressType=h,this._texture=null,this._internalFormat=r,this._isCompressed=V$12.isCompressedFormat(r),this._wrapS=u$Z(s,q$1a.CLAMP_TO_EDGE),this._wrapT=u$Z(l,q$1a.CLAMP_TO_EDGE),this._pixelDataType=u$Z(u,_$_.UNSIGNED_BYTE),this._pixelDataType===_$_.FLOAT&&(this._wrapS=q$1a.CLAMP_TO_EDGE,this._wrapT=q$1a.CLAMP_TO_EDGE),this.ready=!1,this.is3D=a,this.id=e,this._size=o.length,this._mipmapEnabled=u$Z(c,!0),1==this.is3D||this._initTexture2D(),V$12.isCompressedFormat(this._internalFormat)?this._sizeInBytes=V$12.compressedTextureSizeInBytes(this._internalFormat,this._width,this._height):this._sizeInBytes=this._width*this._height*4,this._context.memorySize+=this._sizeInBytes};function G$15(e,t,i,n){var r=1;if(!e$2d.isPowerOfTwo(i)||!e$2d.isPowerOfTwo(n))return!1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=V$12.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l==o?r:1}Object.defineProperties(o$_.prototype,{width:{get:function(){return this._width}},height:{get:function(){return this._height}},size:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._sizeInBytes}},pixelDataType:{get:function(){return this._pixelDataType}},thinTexture:{get:function(){return this._texture}},internalTexture:{get:function(){return this._texture._texture}}}),o$_.prototype._initTexture2D=function(){this._uploadImageData(),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$_.prototype.generateMipmap=function(){console.log("DDSTextureGPU.prototype.generateMipmap")},o$_.prototype.updateTexture=function(e,t,i){this.ready=!1,this._width=i.width,this._height=i.height,this._internalFormat=i.internalFormat,this._pixelDataType=i.pixelDataType,this._wrapS=i.wrapS,this._wrapT=i.wrapT,this._mipmapEnabled=u$Z(i.mipmapEnabled,!0),this.id=e,this._size=t.length,this._imageBuffer=t,this._uploadImageData(),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$_.prototype._uploadImageData=function(){var e=this._context.engine,t=this._internalFormat,i=this._width,n=this._height,r=this._imageBuffer,o=G$15(r,t,i,n),a=o>1&&this._mipmapEnabled;t!==V$12.LUMINANCE_ALPHA&&0!==this._oriCompressType&&(t==V$12.RGB||V$12.RGBA);var s=R$12.toPixelFormat(t),l=R$12.toPixelType(this._pixelDataType),u=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE;if((this._pixelDataType==_$_.FLOAT||this._pixelDataType==_$_.HALF_FLOAT)&&(u=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE),!e$2e(this._texture)){var c=e.createRawTexture(null,i,n,s,!1,!1,u,null,l,0,!1,o);this._texture=new _0x4f1603(c)}var h=0,d=0;do{var f,p=g$10(t,i,n);f=t==V$12.RGBA&&this._pixelDataType===_$_.FLOAT?new Float32Array(r.buffer,r.byteOffset+h,p):new Uint8Array(r.buffer,r.byteOffset+h,p),e.updateSubRawTexture(this._texture._texture,f,s,!1,null,l,!1,i,n,0,0,d++),i=Math.max(i>>1,1),n=Math.max(n>>1,1),h+=p}while(h<r.length&&a)},o$_.prototype.destroy=function(){this._texture.dispose(),this.ready=!1,this.id=0,this._context.memorySize-=this._sizeInBytes},o$_.prototype.enable=function(){console.log("DDSTextureGPU.prototype.enable")},o$_.prototype.disable=function(){console.log("DDSTextureGPU.prototype.disable")};var _0x4e788a=(_0x2b528d=!0,function(e,t){var i=_0x2b528d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b528d=!1,i}),_0x14653d=_0x4e788a(void 0,(function(){return _0x14653d.toString().search("(((.+)+)+)+$").toString().constructor(_0x14653d).search("(((.+)+)+)+$")})),_0x2b528d;_0x14653d();var _0x5e76de=function(e,t,i,n,r,o,a,s,l,u,c,h){t.webgpu?this._inner=new o$_(e,t,i,n,r,o,a,s,l,u,c,h):this._inner=new o$$(e,t,i,n,r,o,a,s,l,u,c,h)};Object.defineProperties(_0x5e76de.prototype,{width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},size:{get:function(){return this._inner.size}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},pixelDataType:{get:function(){return this._inner.pixelDataType}},ready:{get:function(){return this._inner.ready}},is3D:{get:function(){return this._inner.is3D}},id:{get:function(){return this._inner.id}},context:{get:function(){return this._inner._context}},_target:{get:function(){return this._inner._target}},_texture:{get:function(){return this._inner._texture}}}),_0x5e76de.prototype.generateMipmap=function(){this._inner.generateMipmap()},_0x5e76de.prototype.updateTexture=function(e,t,i){this._inner.updateTexture(e,t,i)},_0x5e76de.prototype.init3DTexture=function(){this._inner.init3DTexture()},_0x5e76de.prototype.destroy=function(){this._inner.destroy()},_0x5e76de.prototype.enable=function(){this._inner.enable()},_0x5e76de.prototype.disable=function(){this._inner.disable()};var _0x5cc7a6=(_0x5199b2=!0,function(e,t){var i=_0x5199b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5199b2=!1,i}),_0x5ac9fa=_0x5cc7a6(void 0,(function(){return _0x5ac9fa.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ac9fa).search("(((.+)+)+)+$")})),_0x5199b2;_0x5ac9fa();var _0x128e14={encNONE:0,enrS3TCDXTN:14,enrPVRTPF_PVRTC2:19,enrPVRTPF_PVRTC:20,enrPVRTPF_PVRTC_4bpp:21,enrPVRTPF_ETC1:22},_0x22a8f5=Object.freeze(_0x128e14),_0x1e44bc=(_0x4792b6=!0,function(e,t){var i=_0x4792b6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4792b6=!1,i}),_0x31f3d0=_0x1e44bc(void 0,(function(){return _0x31f3d0.toString().search("(((.+)+)+)+$").toString().constructor(_0x31f3d0).search("(((.+)+)+)+$")})),_0x4792b6;_0x31f3d0();var _0x3d1e8e={LUMINANCE_8:1,LUMINANCE_16:2,ALPHA:3,ALPHA_4_LUMINANCE_4:4,LUMINANCE_ALPHA:5,RGB_565:6,BGR565:7,RGB:10,BGR:11,ARGB:12,ABGR:13,BGRA:14,WEBP:25,RGBA:28,DXT1:17,DXT2:18,DXT3:19,DXT4:20,DXT5:21,CRN_DXT5:26,STANDARD_CRN:27,KTX2:31},_0x2ddc8c=Object.freeze(_0x3d1e8e),e$1y={DisplayMode:{NONE:0,FACE:1,LINE:2,FACE_AND_LINE:3},AnalysisRegionMode:{ARM_NONE:0,ARM_ALL:1,ARM_REGION:2},FilterMode:{LINEAR:0,NEAREST:1}},k$S=Object.freeze(e$1y),_0x2d571e=(_0x5b25db=!0,function(e,t){var i=_0x5b25db?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b25db=!1,i}),_0x28ba46=_0x2d571e(void 0,(function(){return _0x28ba46.toString().search("(((.+)+)+)+$").toString().constructor(_0x28ba46).search("(((.+)+)+)+$")})),_0x5b25db;_0x28ba46();var _0x418acb={MIX:0,REPLACE:1,SILHOUETTE:2,ALWAYS_SHOW_SILHOUETTE:3,SILHOUETTE_EDGE:4,WIREFRAME:5},Zr$3=Object.freeze(_0x418acb);function i$T(){this._dictTable=new e$1Q,this._imageBuffer=new Uint8Array(262144),this._sortKey=[]}function d$16(e,t){return e-t}function u$L(){this._maxVisibleValue=17976931348623157e292,this._minVisibleValue=-17976931348623157e292,this._floor=0,this._ceiling=0,this._opacity=1,this._updateColorDictTable=!1,this._coverageArea=[],this._linesInterval=100,this._updatePolygon=!0,this._lineColor=new e$1X(0,1,1,1),this._displayMode=k$S.DisplayMode.FACE,this._dictColorTable=void 0,this._emissionTextureUrl="",this._emissionTextureChanged=!1,this._emissionTexCoordSpeed=new o$1p(0,0),this._emissionTexCoordScale=new o$1p(50,50),this._emissionTextureArray=[],this._loadedEmissionTexture=0,this._noValueColor=new e$1X(1,1,1,1),this._textureFilterMode=k$S.FilterMode.LINEAR,this._visibleDistanceMax=Number.MAX_VALUE,this._visibleDistanceMin=0,this._minVisibleAltitude=0,this._maxVisibleAltitude=Number.MAX_VALUE}i$T.prototype.destroy=function(){this._dictTable.removeAll(),this._imageBuffer=null,this._sortKey=null},i$T.prototype.getItem=function(e){if(e>this._dictTable.values.length-1)return null;var t=[];for(var i in this._dictTable._hash)t.push(parseFloat(i));t.sort(d$16);var n=t[e];return e$2e(n)?{altitude:n,color:this._dictTable.get(n)}:null},i$T.prototype.count=function(){return this._dictTable.values.length},i$T.prototype.insert=function(e,t){if(!e$2e(this._dictTable.get(e))){var i=e$1X.clone(t,i);this._dictTable.set(e,i)}},i$T.prototype.remove=function(e){return this._dictTable.remove(e)},i$T.prototype.clear=function(){this._dictTable.values.length=0},i$T.clone=function(e,t){if(e$2e(e)){e$2e(t)||(t=new i$T),e$1Q.clone(e._dictTable,t._dictTable);for(var i=0;i<e._imageBuffer.length;i++)t._imageBuffer[i]=e._imageBuffer[i];return t}},i$T.prototype.generateBuffer=function(){var e=[],t=0;for(var i in this._dictTable._hash)if(e$2e(i)){var n=this._dictTable.get(i);e[t++]={value:parseFloat(i),color:n}}if(!(e.length<2)){for(t=0;t<e.length-1;t++)for(var r=e[t],o=t+1;o<e.length;o++){var a=e[o];if(r.value>a.value){var s=l$1f(e[t],!0);e[t]=l$1f(e[o],!0),e[o]=s,r=e[t]}}var l=e[0].value,u=e[e.length-1].value-l,c=document.createElement("canvas");c.width=16384,c.height=1;var h=c.getContext("2d");h.beginPath();var d=h.createLinearGradient(0,0,16384,0);for(t=0;t<e.length;t++)d.addColorStop((e[t].value-l)/u,e[t].color.toCssColorString());h.fillStyle=d,h.rect(0,0,c.width,c.height),h.fill();var f=h.getImageData(0,0,c.width,1).data;for(o=0;o<16;o++)for(t=0;t<4096;t++)this._imageBuffer[t+1024*o*4*4]=f[t+1024*o*4],this._imageBuffer[t+1024*o*4*4+4096]=f[t+1024*o*4],this._imageBuffer[t+1024*o*4*4+8192]=f[t+1024*o*4],this._imageBuffer[t+1024*o*4*4+12288]=f[t+1024*o*4];for(var i in this._dictTable._hash)this._sortKey.push(parseFloat(i));return this._sortKey.sort(d$16),c}},i$T.prototype.getColor=function(e){for(var t=0;t<this._sortKey.length;t++)if(this._sortKey[t]>=e||Math.abs(this._sortKey[t]-e)<e$2d.EPSILON6)return this._dictTable.get(this._sortKey[t])},u$L.prototype.destroy=function(){this._coverageArea.length=0,e$2e(this._dictColorTable)&&this._dictColorTable.destroy()},Object.defineProperties(u$L.prototype,{MinVisibleValue:{get:function(){return this._minVisibleValue},set:function(e){this._minVisibleValue=e}},MaxVisibleValue:{get:function(){return this._maxVisibleValue},set:function(e){this._maxVisibleValue=e}},ColorTableMaxKey:{get:function(){return this._ceiling},set:function(e){this._ceiling=e}},ColorTableMinKey:{get:function(){return this._floor},set:function(e){this._floor=e}},ColorTable:{get:function(){return this._dictColorTable},set:function(e){if(e$2e(e)){this._dictColorTable=i$T.clone(e,this._dictColorTable),this._updateColorDictTable=!0;var t=this._dictColorTable.count();if(!(t<1)){new e$1X;var i=0,n=0,r=this._dictColorTable.getItem(0);e$2e(r)&&e$2e(r.altitude)&&(i=parseFloat(r.altitude)),e$2e(r=this._dictColorTable.getItem(t-1))&&e$2e(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n)}}else e$2e(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null)}},Opacity:{get:function(){return this._opacity},set:function(e){this._opacity=e}},CoverageArea:{get:function(){return this._coverageArea},set:function(e){if(this._updatePolygon=!0,this._coverageArea.length=0,e$2e(e))for(var t=0;t<e.length;t++)this._coverageArea[t]=e[t]}},DisplayMode:{get:function(){return this._displayMode},set:function(e){this._displayMode=e}},LineColor:{get:function(){return this._lineColor},set:function(e){e$1X.clone(e,this._lineColor)}},LineInterval:{get:function(){return this._linesInterval},set:function(e){this._linesInterval=e}},UpdateColorDictTable:{get:function(){return this._updateColorDictTable},set:function(e){this._updateColorDictTable=e}},UpdatePolygonRegion:{get:function(){return this._updatePolygon},set:function(e){this._updatePolygon=e}},emissionTextureUrl:{get:function(){return this._emissionTextureUrl},set:function(e){this._emissionTextureUrl=e,this._emissionTextureArray=[];var t={url:e,USpeed:this._emissionTexCoordSpeed.x,VSpeed:this._emissionTexCoordSpeed.y,UTiling:this._emissionTexCoordScale.x,VTiling:this._emissionTexCoordScale.y};this._emissionTextureArray.push(t),this._emissionTextureChanged=!0,this._loadedEmissionTexture=0}},emissionTexCoordUSpeed:{get:function(){return this._emissionTexCoordSpeed.x},set:function(e){e$2e(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].USpeed=e),this._emissionTexCoordSpeed.x=e}},emissionTexCoordVSpeed:{get:function(){return this._emissionTexCoordSpeed.y},set:function(e){e$2e(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].VSpeed=e),this._emissionTexCoordSpeed.y=e}},emissionTexCoordScale:{get:function(){return this._emissionTexCoordScale},set:function(e){e$2e(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].UTiling=e.x,this._emissionTextureArray[0].VTiling=e.y),this._emissionTexCoordScale=e}},emissionTextureArray:{get:function(){return this._emissionTextureArray},set:function(e){this._emissionTextureArray=e,this._emissionTextureChanged=!0,this._loadedEmissionTexture=0}},noValueColor:{get:function(){return this._noValueColor},set:function(e){!e$2e(e)||(this._noValueColor=e$1X.clone(e,this._noValueColor))}},filterMode:{get:function(){return this._textureFilterMode},set:function(e){this._textureFilterMode=e}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}},visibleDistanceMin:{get:function(){return this._visibleDistanceMin},set:function(e){this._visibleDistanceMin=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){this._maxVisibleAltitude=e}}}),u$L.clone=function(e,t){if(e$2e(e)){e$2e(t)||(t=new u$L),t._maxVisibleValue=e._maxVisibleValue,t._minVisibleValue=e._minVisibleValue,t._floor=e._floor,t._ceiling=e._ceiling,t._opacity=e._opacity,t._updateColorDictTable=e._updateColorDictTable,t._linesInterval=e._linesInterval,t._updatePolygon=e._updatePolygon,t._displayMode=e._displayMode,t._lineColor=e$1X.clone(e._lineColor,t._lineColor),t._dictColorTable=i$T.clone(e._dictColorTable,t._dictColorTable),t._emissionTexCoordSpeed=o$1p.clone(e._emissionTexCoordSpeed,t._emissionTexCoordSpeed),t._emissionTexCoordScale=o$1p.clone(e._emissionTexCoordScale,t._emissionTexCoordScale),t._emissionTextureUrl=e._emissionTextureUrl,t._emissionTextureArray=e._emissionTextureArray,t._loadedEmissionTexture=e._loadedEmissionTexture,t._noValueColor=e$1X.clone(e._noValueColor,t._noValueColor),t._coverageArea.length=0;for(var i=0;i<e._coverageArea.length;i++)t._coverageArea[i]=e._coverageArea[i];return t._textureFilterMode=e._textureFilterMode,t._visibleDistanceMax=e._visibleDistanceMax,t._visibleDistanceMin=e._visibleDistanceMin,t._maxVisibleAltitude=e._maxVisibleAltitude,t._minVisibleAltitude=e._minVisibleAltitude,t}};var r$W=[];u$L.prototype._getEmissionAtlasTextureRects=function(){var e=this._emissionTextureAtlas;if(!e$2e(e))return r$W;var t,i=this._emissionTextureArray.length;if(r$W.length!=i)for(r$W=[],t=0;t<i;t++)r$W.push(new e$2c);for(t=0;t<i;t++){var n=this._emissionTextureArray[t],r=e.textureCoordinates[n.textureAtlasID];e$2e(r)&&(r$W[t].x=r.x,r$W[t].y=r.y,r$W[t].z=r.x+r.width,r$W[t].w=r.y+r.height)}return r$W};var l$X=[];u$L.prototype._getEmissionTexAtlasTilingAndOffset=function(){if(!e$2e(this._emissionTextureArray))return l$X;var e,t=this._emissionTextureArray.length;if(l$X.length!=t)for(l$X=[],e=0;e<t;e++)l$X.push(new e$2c);var i=performance.now()/1e3;for(e=0;e<t;e++){var n=this._emissionTextureArray[e];l$X[e].x=n.UTiling,l$X[e].y=n.VTiling,l$X[e].z=n.USpeed*i,l$X[e].w=n.VSpeed*i}return l$X};var _0x33e8b2=(_0x176645=!0,function(e,t){var i=_0x176645?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x176645=!1,i}),_0x15ed26=_0x33e8b2(void 0,(function(){return _0x15ed26.toString().search("(((.+)+)+)+$").toString().constructor(_0x15ed26).search("(((.+)+)+)+$")})),_0x176645;_0x15ed26();var _0x302e68="attribute vec4 position;\n\nuniform vec4 uRect;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.0, 1.0);\n}",e$1x={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2},k$R=Object.freeze(e$1x),e$1w={None:0,FixedZ:1,FixedXYZ:2},yr$2=Object.freeze(e$1w),e$1v=function(){this._fillForeColor=new e$1X,this._fillStyle=fr$3.Fill,this._lineColor=new e$1X,this._lineWidth=1,this._bottomAltitude=0,this._pointSize=1,this._pointColor=new e$1X,this._altitudeMode=k$R.NONE,this._emissionColor=new e$1X(1,1,1,1),this._owner=void 0,this._dirty=!1,this._image=void 0,this._imageReady=!0,this._calloutColor=e$1X.RED,this._calloutWidth=1,this._billboardMode=yr$2.SCREEN_ALIGNED};Object.defineProperties(e$1v.prototype,{fillForeColor:{get:function(){return this._fillForeColor},set:function(e){o$1q.typeOf.object("fillForeColor value",e),e$1X.clone(e,this._fillForeColor)}},bottomAltitude:{get:function(){return this._bottomAltitude},set:function(e){o$1q.typeOf.number("bottomAltitude value",e),this._bottomAltitude!==e&&(this._bottomAltitude=e,this._dirty=!0)}},altitudeMode:{get:function(){return this._altitudeMode},set:function(e){o$1q.typeOf.number("altitudeMode value",e),this._altitudeMode=e}},fillStyle:{get:function(){return this._fillStyle},set:function(e){o$1q.typeOf.number("fillStyle value",e),this._fillStyle=e}},lineColor:{get:function(){return this._lineColor},set:function(e){o$1q.typeOf.object("line color",e),e$1X.clone(e,this._lineColor)}},lineWidth:{get:function(){return this._lineWidth},set:function(e){o$1q.typeOf.number("line width",e),this._lineWidth=e}},pointSize:{get:function(){return this._pointSize},set:function(e){o$1q.typeOf.number("point size",e),this._pointSize=e}},pointColor:{get:function(){return this._pointColor},set:function(e){o$1q.typeOf.object("point color",e),e$1X.clone(e,this._pointColor)}},emissionColor:{get:function(){return this._emissionColor},set:function(e){o$1q.typeOf.object("emission color",e),e$1X.clone(e,this._emissionColor)}},image:{get:function(){return this._image},set:function(e){this._imageReady=!1,this._image=e,"string"==typeof e?this._loadImage():this._imageReady=!0}},imageReady:{get:function(){return this._imageReady}},calloutColor:{get:function(){return this._calloutColor},set:function(e){this._calloutColor!==e&&(this._calloutColor=e)}},calloutWidth:{get:function(){return this._calloutWidth},set:function(e){this._calloutWidth!==e&&(this._calloutWidth=e)}},billboardMode:{get:function(){return this._billboardMode},set:function(e){this._billboardMode!==e&&(this._billboardMode=e)}}}),e$1v.prototype._loadImage=function(){var e=this._image;e=t$10.createIfNeeded(e).fetchImage();var t=this;o$1l(e,(function(e){t._image=e,t._imageReady=!0}))};var _0x27f7f7=(_0x291930=!0,function(e,t){var i=_0x291930?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x291930=!1,i}),_0x2aded6=_0x27f7f7(void 0,(function(){return _0x2aded6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2aded6).search("(((.+)+)+)+$")})),_0x291930;_0x2aded6();var _0x3d8f6e="attribute vec4 position;\n\nuniform vec4 uRect;\n\nvarying float fHeight;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.5, 1.0);\n fHeight = vPos.z;\n}",_0x5d1ff7=(_0x18a239=!0,function(e,t){var i=_0x18a239?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x18a239=!1,i}),_0x19d0c3=_0x5d1ff7(void 0,(function(){return _0x19d0c3.toString().search("(((.+)+)+)+$").toString().constructor(_0x19d0c3).search("(((.+)+)+)+$")})),_0x18a239;_0x19d0c3();var _0x51e90e="\n#ifdef Mode_Height\nvarying float fHeight;\n#endif\n#ifdef OVERLAY\n varying vec2 vTexCoord;\n uniform sampler2D uTexture;\n#endif\n\nvoid main()\n{\n gl_FragColor = vec4(1.0);\n#ifdef Mode_Height\n #ifdef UseFloatTexture\n gl_FragColor = vec4(fHeight, 0.0, 0.0, 1.0);\n #else\n gl_FragColor = czm_packValue(fHeight);\n #endif\n#endif\n#ifdef OVERLAY\n gl_FragColor = texture2D(uTexture,vTexCoord);\n#endif\n}";function e$1u(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}Object.defineProperties(e$1u.prototype,{style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}}}),e$1u.prototype.makeDirty=function(){this._styleDirty=!0},e$1u.prototype.applyStyle=function(e,t){if(e.ready&&(!e$2e(this._style)||this._style.ready)){var i=this._styleDirty;t.isRender&&(this._styleDirty=!1),i&&++this._lastStyleTime;for(var n=this._lastStyleTime,r=e._statistics,o=i?e._selectedTiles:e._selectedTilesToStyle,a=o.length,s=0;s<a;++s){var l=o[s];if(l.lastStyleTime!==n){var u=l.content;l.lastStyleTime=n,u.applyStyle(this._style),r.numberOfFeaturesStyled+=u.featuresLength,++r.numberOfTilesStyled}}}};var I$16="#extension GL_EXT_frag_depth : enable\n\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthGBuffer;\nuniform vec2 u_distanceAndEdlStrength;\nvarying vec2 v_textureCoordinates;\n\nvec2 neighborContribution(float log2Depth, vec2 offset)\n{\n float dist = u_distanceAndEdlStrength.x;\n vec2 texCoordOrig = v_textureCoordinates + offset * dist;\n vec2 texCoord0 = v_textureCoordinates + offset * floor(dist);\n vec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);\n\n float depthOrLogDepth0 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord0));\n float depthOrLogDepth1 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord1));\n\n // ignore depth values that are the clear depth\n if (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {\n return vec2(0.0);\n }\n\n // interpolate the two adjacent depth values\n float depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);\n return vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\n\nvoid main()\n{\n float depthOrLogDepth = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, v_textureCoordinates));\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\n eyeCoordinate /= eyeCoordinate.w;\n\n float log2Depth = log2(-eyeCoordinate.z);\n\n if (depthOrLogDepth == 0.0) // 0.0 is the clear value for the gbuffer\n {\n discard;\n }\n\n vec4 color = texture2D(u_pointCloud_colorGBuffer, v_textureCoordinates);\n\n // sample from neighbors left, right, down, up\n vec2 texelSize = 1.0 / czm_viewport.zw;\n\n vec2 responseAndCount = vec2(0.0);\n\n responseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));\n responseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));\n responseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));\n responseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));\n\n float response = responseAndCount.x / responseAndCount.y;\n float strength = u_distanceAndEdlStrength.y;\n float shade = exp(-response * 300.0 * strength);\n color.rgb *= shade;\n gl_FragColor = vec4(color);\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(1.0 + (czm_projection * vec4(eyeCoordinate.xyz, 1.0)).w);\n#else\n gl_FragDepthEXT = czm_eyeToWindowCoordinates(vec4(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n";function m$W(){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthGBuffer=void 0,this._depthTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}function s$L(){return new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}function T$U(e){var t=e._framebuffer;!e$2e(t)||(e._colorGBuffer.destroy(),e._depthGBuffer.destroy(),e._depthTexture.destroy(),t.destroy(),e._framebuffer=void 0,e._colorGBuffer=void 0,e._depthGBuffer=void 0,e._depthTexture=void 0,e._drawCommand=void 0,e._clearCommand=void 0)}function R$U(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:s$L()}),o=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:s$L()}),a=new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_COMPONENT,pixelDatatype:_$_.UNSIGNED_INT,sampler:s$L()});e._framebuffer=new t$V({context:t,colorTextures:[r,o],depthTexture:a,destroyAttachments:!1}),e._colorGBuffer=r,e._depthGBuffer=o,e._depthTexture=a}var c$Y=new o$1o;function U$Y(e,t){var i=I$16,n={u_pointCloud_colorGBuffer:function(){return e._colorGBuffer},u_pointCloud_depthGBuffer:function(){return e._depthGBuffer},u_distanceAndEdlStrength:function(){return c$Y.x=e._radius,c$Y.y=e._strength,c$Y}},r=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:u$M.setCesium3DTileBit(),stencilMask:u$M.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:Le$q.CESIUM_3D_TILE,owner:e}),e._clearCommand=new t$W({framebuffer:e._framebuffer,color:new e$1X(0,0,0,0),depth:1,renderState:d$1m.fromCache(),pass:Le$q.CESIUM_3D_TILE,owner:e})}function z$S(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=e._colorGBuffer,o=!1,a=e$2e(r)&&(r.width!==i||r.height!==n);return(!e$2e(r)||a)&&(T$U(e),R$U(e,t),U$Y(e,t),o=!0),o}function E$Z(e){return e.drawBuffers&&e.fragmentDepth}function H$Z(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"EC");if(!e$2e(i)){var n=t._attributeLocations,r=t.fragmentShaderSource.clone();r.sources=r.sources.map((function(e){return e=(e=s$V.replaceMain(e,"czm_point_cloud_post_process_main")).replace(/gl_FragColor/g,"gl_FragData[0]")})),r.sources.unshift("#extension GL_EXT_draw_buffers : enable \n"),r.sources.push("void main() \n{ \n czm_point_cloud_post_process_main(); \n#ifdef LOG_DEPTH\n czm_writeLogDepth();\n gl_FragData[1] = czm_packDepth(gl_FragDepthEXT); \n#else\n gl_FragData[1] = czm_packDepth(gl_FragCoord.z);\n#endif\n}"),i=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function o$Z(e){var t=u$Z(e,{});this.attenuation=u$Z(t.attenuation,!1),this.geometricErrorScale=u$Z(t.geometricErrorScale,1),this.maximumAttenuation=t.maximumAttenuation,this.baseResolution=t.baseResolution,this.eyeDomeLighting=u$Z(t.eyeDomeLighting,!0),this.eyeDomeLightingStrength=u$Z(t.eyeDomeLightingStrength,1),this.eyeDomeLightingRadius=u$Z(t.eyeDomeLightingRadius,1),this.backFaceCulling=u$Z(t.backFaceCulling,!1),this.normalShading=u$Z(t.normalShading,!0)}m$W.isSupported=E$Z,m$W.prototype.update=function(e,t,i){if(E$Z(e.context)){this._strength=i.eyeDomeLightingStrength,this._radius=i.eyeDomeLightingRadius*e.pixelRatio;var n,r=z$S(this,e.context),o=e.commandList,a=o.length;for(n=t;n<a;++n){var s=o[n];if(s.primitiveType===W$18.POINTS&&s.pass!==Le$q.TRANSLUCENT){var l=s.derivedCommands.pointCloudProcessor;(!e$2e(l)||s.dirty||r||l.framebuffer!==this._framebuffer)&&(l=i$$.shallowClone(s),s.derivedCommands.pointCloudProcessor=l,l.framebuffer=this._framebuffer,l.shaderProgram=H$Z(e.context,s.shaderProgram),l.castShadows=!1,l.receiveShadows=!1),o[n]=l}}var u=this._clearCommand,c=this._drawCommand;o.push(c),o.push(u)}},m$W.prototype.isDestroyed=function(){return!1},m$W.prototype.destroy=function(){return T$U(this),i$11(this)},o$Z.isSupported=function(e){return m$W.isSupported(e.context)};var e$1t={Triangle:0,Quad:1,Sketch:2,EffectOutline:3},_0x1d226a=Object.freeze(e$1t),_0x5d03bc=(_0x2a42d5=!0,function(e,t){var i=_0x2a42d5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a42d5=!1,i}),_0x530aa3=_0x5d03bc(void 0,(function(){return _0x530aa3.toString().search("(((.+)+)+)+$").toString().constructor(_0x530aa3).search("(((.+)+)+)+$")})),_0x2a42d5;_0x530aa3();var _0x1ce889={OSGBFile:0,OSGBCacheFile:1,ClampGroundPolygon:2,ClampObjectPolygon:3,ClampGroundLine:4,ClampObjectLine:5,IconPoint:6,Text:7,PointCloudFile:8,ExtendRegion3D:9,ExtendClampPolygonCache:10,PolylineEffect:11,RegionEffect:12,ClampGroundAndObjectLineCache:13,ClampGroundRealtimeRasterCache:14},p$T=Object.freeze(_0x1ce889),e$1s={ISERVER_TOKEN:"token",IPORTAL_KEY:"key"},E$Y=Object.freeze(e$1s);function n$W(e,t,i){if(!e$2e(e))throw new t$15("first is required");if(!e$2e(t))throw new t$15("second is required");if(i=u$Z(i,!0),e instanceof h$16||(e=new h$16(e)),t instanceof h$16||(t=new h$16(t)),"data"===e.scheme)return e.toString();if("data"===t.scheme)return t.toString();e$2e(t.authority)&&!e$2e(t.scheme)&&(typeof document<"u"&&e$2e(document.location)&&e$2e(document.location.href)?t.scheme=new h$16(document.location.href).scheme:t.scheme=e.scheme);var n=e;t.isAbsolute()&&(n=t);var r="";e$2e(n.scheme)&&(r+=n.scheme+":"),e$2e(n.authority)&&(r+="//"+n.authority,""!==n.path&&"/"!==n.path&&(r=r.replace(/\/?$/,"/"),n.path=n.path.replace(/^\/?/g,""),""===n.authority&&(r+="/"))),r+=n===e?i?e.path.replace(/\/?$/,"/")+t.path.replace(/^\/?/g,""):e.path+t.path:t.path;var o=e$2e(e.query),a=e$2e(t.query);o&&a?r+="?"+e.query+"&"+t.query:o&&!a?r+="?"+e.query:!o&&a&&(r+="?"+t.query);var s=e$2e(t.fragment);return e$2e(e.fragment)&&!s?r+="#"+e.fragment:s&&(r+="#"+t.fragment),r}function a$O(e,t){this._keymap={},this.addCredential(e,t)}Object.defineProperties(a$O.prototype,{value:{get:function(){return this._value},set:function(e){this._value=e}},name:{get:function(){return this._name},set:function(e){this._name=e}}}),a$O.addToken=function(e){var t,i=e.substring(0,e.indexOf("/realspace")+10);if(e$2e(a$O.CREDENTIAL._keymap[i]))switch(a$O.CREDENTIAL._keymap[i].type){case E$Y.ISERVER_TOKEN:t="?"+m$1d({token:a$O.CREDENTIAL._keymap[i].value});break;case E$Y.IPORTAL_KEY:t="?"+m$1d({key:a$O.CREDENTIAL._keymap[i].value});break;default:t=""}else switch(a$O.CREDENTIAL.name){case E$Y.ISERVER_TOKEN:t="?"+m$1d({token:a$O.CREDENTIAL.value});break;case E$Y.IPORTAL_KEY:t="?"+m$1d({key:a$O.CREDENTIAL.value});break;default:t="?"+a$O.CREDENTIAL.name+"="+a$O.CREDENTIAL.value}return n$W(e,t,!1)},a$O.addTokenWithKey=function(e,t){var i;if(e$2e(a$O.CREDENTIAL._keymap[e])){if(a$O.CREDENTIAL._keymap[e].type instanceof Array){var n,r=a$O.CREDENTIAL._keymap[e].type,o=a$O.CREDENTIAL._keymap[e].value;(s={})[r[0]]=o[0],n=n$W(t,"?"+m$1d(s),!1);for(var a=1;a<r.length;a++){(s={})[r[a]]=o[a],n=n+"&"+m$1d(s)}return n}switch(a$O.CREDENTIAL._keymap[e].type){case E$Y.ISERVER_TOKEN:i="?"+m$1d({token:a$O.CREDENTIAL._keymap[e].value});break;case E$Y.IPORTAL_KEY:i="?"+m$1d({key:a$O.CREDENTIAL._keymap[e].value});break;default:var s;(s={})[a$O.CREDENTIAL._keymap[e].type]=a$O.CREDENTIAL._keymap[e].value,i="?"+m$1d(s)}}else switch(a$O.CREDENTIAL.name){case E$Y.ISERVER_TOKEN:i="?"+m$1d({token:a$O.CREDENTIAL.value});break;case E$Y.IPORTAL_KEY:i="?"+m$1d({key:a$O.CREDENTIAL.value});break;default:i="?"+a$O.CREDENTIAL.name+"="+a$O.CREDENTIAL.value}return n$W(t,i,!1)},a$O.prototype.addCredential=function(e,t){if(e instanceof Array){for(var i=0,n=e.length;i<n;i++)if(this._keymap[e[i].rooturl]={type:e[i].type||E$Y.ISERVER_TOKEN,value:e[i].value},-1!==e[i].rooturl.indexOf("/realspace")){var r=e[i].rooturl.substring(0,e[i].rooturl.lastIndexOf("/realspace")+10);this._keymap[r]={type:e[i].type||E$Y.ISERVER_TOKEN,value:e[i].value}}}else{if(this._value=u$Z(e,""),null==e)throw new t$15("Credential.value is necessory.");this._name=u$Z(t,E$Y.ISERVER_TOKEN),this._keymap.default={type:this._name,value:this._value}}},a$O.CREDENTIAL=null;var _0x5390a8=(_0xf586dc=!0,function(e,t){var i=_0xf586dc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf586dc=!1,i}),_0x4e61da=_0x5390a8(void 0,(function(){return _0x4e61da.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e61da).search("(((.+)+)+)+$")})),_0xf586dc;_0x4e61da();var _0x4d7fda={UNLOAD:0,LOADING:1,LOADED:2,VOLLOADED:3,PARSING:4,PARSED:5,TRANSFORMING:6,TRANSFORMED:7,LOST:8,LOADVOL:9,FAILED:10,VOLFAILED:11},N$Q=Object.freeze(_0x4d7fda),E$X={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7,RENDERING:8,RENDERED:9},wt$7=Object.freeze(E$X);function o$Y(e,t,i,n){this.near=u$Z(e,0),this.nearValue=u$Z(t,0),this.far=u$Z(i,1),this.farValue=u$Z(n,0)}o$Y.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new o$Y(e.near,e.nearValue,e.far,e.farValue)},o$Y.packedLength=4,o$Y.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),t[i++]=e.near,t[i++]=e.nearValue,t[i++]=e.far,t[i]=e.farValue,t},o$Y.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");return t=u$Z(t,0),e$2e(i)||(i=new o$Y),i.near=e[t++],i.nearValue=e[t++],i.far=e[t++],i.farValue=e[t],i},o$Y.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue},o$Y.prototype.clone=function(e){return o$Y.clone(this,e)},o$Y.prototype.equals=function(e){return o$Y.equals(this,e)};var X$R='attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n\n#ifdef EXTRUDED_GEOMETRY\nattribute vec3 extrudeDirection;\n\nuniform float u_globeMinimumAltitude;\n#endif // EXTRUDED_GEOMETRY\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif // PER_INSTANCE_COLOR\n\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n\n#if defined(TEXTURE_COORDINATES) && !defined(SPHERICAL) && defined(UINT8_PACKING)\nvec4 clampAndMagnitude(vec4 sd)\n{\n vec4 d = sd;\n d.x = czm_branchFreeTernary(sd.x < 128.0, d.x, (255.0 - sd.x));\n d.x = floor(0.5 + d.x);\n d.y = floor(0.5 + d.y);\n d.z = floor(0.5 + d.z);\n d.w = floor(0.5 + d.w);\n return d;\n}\n\nfloat unpackLowLessThan100k(vec4 sd)\n{\n vec4 d = clampAndMagnitude(sd);\n return (1000.0 * d.x + 10.0 * d.y + 0.1 * d.z + 0.001 * d.w) * czm_branchFreeTernary(sd.x < 128.0, 1.0, -1.0);\n}\n\nvec3 southwest_LOW(vec4 x, vec4 y, vec4 z)\n{\n vec3 value;\n value.x = unpackLowLessThan100k(x);\n value.y = unpackLowLessThan100k(y);\n value.z = unpackLowLessThan100k(z);\n return value;\n}\n\nfloat unpackHighMagLessThan100Million(vec4 sd)\n{\n vec4 d = clampAndMagnitude(sd);\n return (1000000.0 * d.x + 10000.0 * d.y + 100.0 * d.z + d.w) * czm_branchFreeTernary(sd.x < 128.0, 1.0, -1.0);\n}\n\nvec3 southwest_HIGH(vec4 x, vec4 y, vec4 z)\n{\n vec3 value;\n value.x = unpackHighMagLessThan100Million(x);\n value.y = unpackHighMagLessThan100Million(y);\n value.z = unpackHighMagLessThan100Million(z);\n return value;\n}\n\n#ifdef COLUMBUS_VIEW_2D\nvec4 unpackPlanes2D_HIGH(vec4 x, vec4 y, vec4 z, vec4 w)\n{\n vec4 value;\n value.x = unpackHighMagLessThan100Million(x);\n value.y = unpackHighMagLessThan100Million(y);\n value.z = unpackHighMagLessThan100Million(z);\n value.w = unpackHighMagLessThan100Million(w);\n return value;\n}\n\nvec4 unpackPlanes2D_LOW(vec4 x, vec4 y, vec4 z, vec4 w)\n{\n vec4 value;\n value.x = unpackLowLessThan100k(x);\n value.y = unpackLowLessThan100k(y);\n value.z = unpackLowLessThan100k(z);\n value.w = unpackLowLessThan100k(w);\n return value;\n}\n\n#else\nfloat unpackLowLessThan1000k(vec4 sd)\n{\n vec4 d = clampAndMagnitude(sd);\n return (10000.0 * d.x + 100.0 * d.y + d.z + 0.01 * d.w) * czm_branchFreeTernary(sd.x < 128.0, 1.0, -1.0);\n}\n\nvec3 unpackExtent(vec4 x, vec4 y, vec4 z)\n{\n vec3 value;\n value.x = unpackLowLessThan1000k(x);\n value.y = unpackLowLessThan1000k(y);\n value.z = unpackLowLessThan1000k(z);\n return value;\n}\n\n#endif\n#endif\n\nvoid main()\n{\n vec4 position = czm_computePosition();\n\n#ifdef EXTRUDED_GEOMETRY\n float delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));\n delta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;\n\n //extrudeDirection is zero for the top layer\n position = position + vec4(extrudeDirection * delta, 0.0);\n#endif\n\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\n v_sphericalExtents = czm_batchTable_sphericalExtents(batchId);\n v_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);\n#else // SPHERICAL\n#ifdef COLUMBUS_VIEW_2D\n#ifdef UINT8_PACKING\n vec4 planes2D_high = unpackPlanes2D_HIGH(czm_batchTable_planes2D_HIGH_x(batchId),\n czm_batchTable_planes2D_HIGH_y(batchId),\n czm_batchTable_planes2D_HIGH_z(batchId),\n czm_batchTable_planes2D_HIGH_w(batchId));\n vec4 planes2D_low = unpackPlanes2D_LOW(czm_batchTable_planes2D_LOW_x(batchId),\n czm_batchTable_planes2D_LOW_y(batchId),\n czm_batchTable_planes2D_LOW_z(batchId),\n czm_batchTable_planes2D_LOW_w(batchId));\n#else // UINT8_PACKING\n vec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);\n vec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);\n#endif // UINT8_PACKING\n\n // If the primitive is split across the IDL (planes2D_high.x > planes2D_high.w):\n // - If this vertex is on the east side of the IDL (position3DLow.y > 0.0, comparison with position3DHigh may produce artifacts)\n // - existing "east" is on the wrong side of the world, far away (planes2D_high/low.w)\n // - so set "east" as beyond the eastmost extent of the projection (idlSplitNewPlaneHiLow)\n vec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));\n bool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;\n planes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);\n planes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);\n\n // - else, if this vertex is on the west side of the IDL (position3DLow.y < 0.0)\n // - existing "west" is on the wrong side of the world, far away (planes2D_high/low.x)\n // - so set "west" as beyond the westmost extent of the projection (idlSplitNewPlaneHiLow)\n idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;\n idlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));\n planes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);\n planes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);\n\n vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;\n vec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;\n vec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;\n#else // COLUMBUS_VIEW_2D\n // 3D case has smaller "plane extents," so planes encoded as a 64 bit position and 2 vec3s for distances/direction\n#ifdef UINT8_PACKING\n vec3 low = southwest_LOW(czm_batchTable_southWest_LOW_x(batchId), czm_batchTable_southWest_LOW_y(batchId), czm_batchTable_southWest_LOW_z(batchId));\n vec3 high = southwest_HIGH(czm_batchTable_southWest_HIGH_x(batchId), czm_batchTable_southWest_HIGH_y(batchId), czm_batchTable_southWest_HIGH_z(batchId));\n vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(high, low)).xyz;\n vec3 northWestCorner = czm_normal * unpackExtent(\n czm_batchTable_northward_x(batchId),\n czm_batchTable_northward_y(batchId),\n czm_batchTable_northward_z(batchId)) + southWestCorner;\n\n vec3 southEastCorner = czm_normal * unpackExtent(\n czm_batchTable_eastward_x(batchId),\n czm_batchTable_eastward_y(batchId),\n czm_batchTable_eastward_z(batchId)) + southWestCorner;\n#else // UINT8_PACKING\n vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;\n vec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;\n vec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;\n#endif // UINT8_PACKING\n#endif // COLUMBUS_VIEW_2D\n\n vec3 eastWard = southEastCorner - southWestCorner;\n float eastExtent = length(eastWard);\n eastWard /= eastExtent;\n\n vec3 northWard = northWestCorner - southWestCorner;\n float northExtent = length(northWard);\n northWard /= northExtent;\n\n v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\n v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\n v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n#endif // SPHERICAL\n vec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);\n vec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);\n\n v_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);\n v_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);\n v_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;\n#endif // TEXTURE_COORDINATES\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#endif\n\n gl_Position = czm_depthClampFarPlane(czm_modelViewProjectionRelativeToEye * position);\n}\n',Q$T="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\n\nvoid main(void)\n{\n#ifdef VECTOR_TILE\n gl_FragColor = czm_gammaCorrect(u_highlightColor);\n#else\n gl_FragColor = vec4(1.0);\n#endif\n czm_writeDepthClampedToFarPlane();\n}\n",V$P="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n\n#ifdef NORMAL_EC\nvec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth)\n{\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);\n return eyeCoordinate.xyz / eyeCoordinate.w;\n}\n\nvec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset)\n{\n vec2 glFragCoordXY = gl_FragCoord.xy;\n // Sample depths at both offset and negative offset\n float upOrRightLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));\n float downOrLeftLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));\n // Explicitly evaluate both paths\n // Necessary for multifrustum and for edges of the screen\n bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);\n float useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);\n float useDownOrLeft = float(useUpOrRight == 0.0);\n vec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);\n vec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);\n return (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;\n}\n#endif // NORMAL_EC\n\nvoid main(void)\n{\n#ifdef REQUIRES_EC\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_globeDepthTextureDim.xy));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n#endif\n\n#ifdef REQUIRES_WC\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n#endif\n\n#ifdef TEXTURE_COORDINATES\n vec2 uv;\n#ifdef SPHERICAL\n // Treat world coords as a sphere normal for spherical coordinates\n worldCoordinate += czm_relativeOrigin;\n vec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);\n sphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;\n sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);\n uv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;\n uv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;\n#else // SPHERICAL\n // Unpack planes and transform to eye space\n uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\n uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n#endif // SPHERICAL\n#endif // TEXTURE_COORDINATES\n\n#ifdef PICK\n#ifdef CULL_FRAGMENTS\n if (0.0 <= uv.x && uv.x <= 1.0 && 0.0 <= uv.y && uv.y <= 1.0)\n {\n gl_FragColor.a = 1.0; // 0.0 alpha leads to discard from ShaderSource.createPickFragmentShaderSource\n czm_writeDepthClampedToFarPlane();\n }\n#else // CULL_FRAGMENTS\n gl_FragColor.a = 1.0;\n#endif // CULL_FRAGMENTS\n#else // PICK\n\n#ifdef CULL_FRAGMENTS\n if (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y)\n {\n discard;\n }\n#endif\n\n#ifdef NORMAL_EC\n // Compute normal by sampling adjacent pixels in 2x2 block in screen space\n vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));\n vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));\n vec3 normalEC = normalize(cross(leftRight, downUp));\n#endif\n\n\n#ifdef PER_INSTANCE_COLOR\n\n vec4 color = czm_gammaCorrect(v_color);\n#ifdef FLAT\n gl_FragColor = color;\n#else // FLAT\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = -eyeCoordinate.xyz;\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n gl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n\n#else // PER_INSTANCE_COLOR\n\n // Material support.\n // USES_ is distinct from REQUIRES_, because some things are dependencies of each other or\n // dependencies for culling but might not actually be used by the material.\n\n czm_materialInput materialInput;\n\n#ifdef USES_NORMAL_EC\n materialInput.normalEC = normalEC;\n#endif\n\n#ifdef USES_POSITION_TO_EYE_EC\n materialInput.positionToEyeEC = -eyeCoordinate.xyz;\n#endif\n\n#ifdef USES_TANGENT_TO_EYE\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);\n#endif\n\n#ifdef USES_ST\n // Remap texture coordinates from computed (approximately aligned with cartographic space) to the desired\n // texture coordinate system, which typically forms a tight oriented bounding box around the geometry.\n // Shader is provided a set of reference points for remapping.\n materialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;\n materialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;\n#endif\n\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else // FLAT\n gl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n\n#endif // PER_INSTANCE_COLOR\n czm_writeDepthClampedToFarPlane();\n#endif // PICK\n}\n";function y$Q(e,t,i,n){o$1q.typeOf.bool("extentsCulling",e),o$1q.typeOf.bool("planarExtents",t),o$1q.typeOf.object("appearance",i),o$1q.typeOf.bool("useFloatBatchTable",n),this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""},this._useFloatBatchTable=n;var r=new Y$I;r.requiresTextureCoordinates=e,r.requiresEC=!i.flat;var o=new Y$I;if(o.requiresTextureCoordinates=e,i instanceof t$Q)r.requiresNormalEC=!i.flat;else{var a=i.material.shaderSource+"\n"+i.fragmentShaderSource;r.normalEC=-1!==a.indexOf("materialInput.normalEC")||-1!==a.indexOf("czm_getDefaultMaterial"),r.positionToEyeEC=-1!==a.indexOf("materialInput.positionToEyeEC"),r.tangentToEyeMatrix=-1!==a.indexOf("materialInput.tangentToEyeMatrix"),r.st=-1!==a.indexOf("materialInput.st")}this._colorShaderDependencies=r,this._pickShaderDependencies=o,this._appearance=i,this._extentsCulling=e,this._planarExtents=t}y$Q.prototype.createFragmentShader=function(e){o$1q.typeOf.bool("columbusView2D",e);var t=this._appearance,i=this._colorShaderDependencies,n=[];!e&&!this._planarExtents&&n.push("SPHERICAL"),i.requiresEC&&n.push("REQUIRES_EC"),i.requiresWC&&n.push("REQUIRES_WC"),i.requiresTextureCoordinates&&n.push("TEXTURE_COORDINATES"),this._extentsCulling&&n.push("CULL_FRAGMENTS"),i.requiresNormalEC&&n.push("NORMAL_EC"),t instanceof t$Q&&n.push("PER_INSTANCE_COLOR"),i.normalEC&&n.push("USES_NORMAL_EC"),i.positionToEyeEC&&n.push("USES_POSITION_TO_EYE_EC"),i.tangentToEyeMatrix&&n.push("USES_TANGENT_TO_EYE"),i.st&&n.push("USES_ST"),t.flat&&n.push("FLAT");var r="";return t instanceof t$Q||(r=t.material.shaderSource),new s$V({name:"ShadowVolumeAppearanceFS",defines:n,sources:[r,V$P]})},y$Q.prototype.createPickFragmentShader=function(e){o$1q.typeOf.bool("columbusView2D",e);var t=this._pickShaderDependencies,i=["PICK"];return!e&&!this._planarExtents&&i.push("SPHERICAL"),t.requiresEC&&i.push("REQUIRES_EC"),t.requiresWC&&i.push("REQUIRES_WC"),t.requiresTextureCoordinates&&i.push("TEXTURE_COORDINATES"),this._extentsCulling&&i.push("CULL_FRAGMENTS"),new s$V({defines:i,sources:[V$P],pickColorQualifier:"varying"})},y$Q.prototype.createVertexShader=function(e,t,i,n){return o$1q.defined("defines",e),o$1q.typeOf.string("vertexShaderSource",t),o$1q.typeOf.bool("columbusView2D",i),o$1q.defined("mapProjection",n),K$P(this._colorShaderDependencies,this._planarExtents,i,e,t,this._appearance,n,this._useFloatBatchTable,this._projectionExtentDefines)},y$Q.prototype.createPickVertexShader=function(e,t,i,n){return o$1q.defined("defines",e),o$1q.typeOf.string("vertexShaderSource",t),o$1q.typeOf.bool("columbusView2D",i),o$1q.defined("mapProjection",n),K$P(this._pickShaderDependencies,this._planarExtents,i,e,t,void 0,n,this._useFloatBatchTable,this._projectionExtentDefines)};var B$S=new o$1p,j$Y=new a$18,Q$S={high:0,low:0};function K$P(e,t,i,n,r,o,a,s,l){var u=n.slice();if(""===l.eastMostYhighDefine){var c=j$Y;c.longitude=e$2d.PI,c.latitude=0,c.height=0;var h=a.project(c,B$S),d=i$12.encode(h.x,Q$S);l.eastMostYhighDefine="EAST_MOST_X_HIGH "+d.high.toFixed((d.high+"").length+1),l.eastMostYlowDefine="EAST_MOST_X_LOW "+d.low.toFixed((d.low+"").length+1);var f=j$Y;f.longitude=-e$2d.PI,f.latitude=0,f.height=0;var p=a.project(f,B$S);d=i$12.encode(p.x,Q$S),l.westMostYhighDefine="WEST_MOST_X_HIGH "+d.high.toFixed((d.high+"").length+1),l.westMostYlowDefine="WEST_MOST_X_LOW "+d.low.toFixed((d.low+"").length+1)}return i&&(u.push(l.eastMostYhighDefine),u.push(l.eastMostYlowDefine),u.push(l.westMostYhighDefine),u.push(l.westMostYlowDefine)),e$2e(o)&&o instanceof t$Q&&u.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(u.push("TEXTURE_COORDINATES"),t||i||u.push("SPHERICAL"),i&&u.push("COLUMBUS_VIEW_2D")),s||u.push("UINT8_PACKING"),new s$V({name:"shadowVolume_Vp",defines:u,sources:[r]})}function Y$I(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}function J$R(e,t,i){return Math.abs((t.y-e.y)*i.x-(t.x-e.x)*i.y+t.x*e.y-t.y*e.x)/o$1o.distance(t,e)}Object.defineProperties(Y$I.prototype,{requiresEC:{get:function(){return this._requiresEC},set:function(e){this._requiresEC=e||this._requiresEC}},requiresWC:{get:function(){return this._requiresWC},set:function(e){this._requiresWC=e||this._requiresWC,this.requiresEC=this._requiresWC}},requiresNormalEC:{get:function(){return this._requiresNormalEC},set:function(e){this._requiresNormalEC=e||this._requiresNormalEC,this.requiresEC=this._requiresNormalEC}},requiresTextureCoordinates:{get:function(){return this._requiresTextureCoordinates},set:function(e){this._requiresTextureCoordinates=e||this._requiresTextureCoordinates,this.requiresWC=this._requiresTextureCoordinates}},normalEC:{set:function(e){this.requiresNormalEC=e,this._usesNormalEC=e},get:function(){return this._usesNormalEC}},tangentToEyeMatrix:{set:function(e){this.requiresWC=e,this.requiresNormalEC=e,this._usesTangentToEyeMat=e},get:function(){return this._usesTangentToEyeMat}},positionToEyeEC:{set:function(e){this.requiresEC=e,this._usesPositionToEyeEC=e},get:function(){return this._usesPositionToEyeEC}},st:{set:function(e){this.requiresTextureCoordinates=e,this._usesSt=e},get:function(){return this._usesSt}}});var se$x=[new o$1o,new o$1o,new o$1o,new o$1o];function Z$U(e,t){var i=se$x,n=o$1o.unpack(t,0,i[0]),r=o$1o.unpack(t,2,i[1]),o=o$1o.unpack(t,4,i[2]);e.uMaxVmax=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r.x,r.y,o.x,o.y]});var a=1/J$R(n,r,o),s=1/J$R(n,o,r);e.uvMinAndExtents=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:4,normalize:!1,value:[n.x,n.y,a,s]})}function g$$(e,t,i){var n=Math.abs(e),r=Math.floor(n/1e3);n-=1e3*r;var o=Math.floor(n/10);n-=10*o;var a=Math.floor(10*n);n-=.1*a;var s=Math.floor(1e3*n);e<0&&(r=255-r),i[t]=new o$13({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!1,value:[r,o,a,s]})}function L$11(e,t,i){var n=Math.abs(e),r=Math.floor(n/1e6);n-=1e6*r;var o=Math.floor(n/1e4);n-=1e4*o;var a=Math.floor(n/100);n-=100*a;var s=Math.floor(n);e<0&&(r=255-r),i[t]=new o$13({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!1,value:[r,o,a,s]})}function N$P(e,t,i){var n=Math.abs(e),r=Math.floor(n/1e4);n-=1e4*r;var o=Math.floor(n/100);n-=100*o;var a=Math.floor(n);n-=a;var s=Math.floor(n/.001);e<0&&(r=255-r),i[t]=new o$13({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!1,value:[r,o,a,s]})}var $$R=new a$18,b$14=new o$1p,ie$B=new o$1p,he$t=new o$1p,O$J={high:0,low:0};function U$X(e,t,i,n){var r=$$R;r.height=0,r.longitude=e.west,r.latitude=e.south;var o=t.project(r,b$14);r.latitude=e.north;var a=t.project(r,ie$B);r.longitude=e.east,r.latitude=e.south;var s,l=t.project(r,he$t);if(!n)return L$11((s=i$12.encode(o.x,O$J)).high,"planes2D_HIGH_x",i),g$$(s.low,"planes2D_LOW_x",i),L$11((s=i$12.encode(o.y,O$J)).high,"planes2D_HIGH_y",i),g$$(s.low,"planes2D_LOW_y",i),L$11((s=i$12.encode(a.y,O$J)).high,"planes2D_HIGH_z",i),g$$(s.low,"planes2D_LOW_z",i),L$11((s=i$12.encode(l.x,O$J)).high,"planes2D_HIGH_w",i),void g$$(s.low,"planes2D_LOW_w",i);var u=[0,0,0,0],c=[0,0,0,0];s=i$12.encode(o.x,O$J),u[0]=s.high,c[0]=s.low,s=i$12.encode(o.y,O$J),u[1]=s.high,c[1]=s.low,s=i$12.encode(a.y,O$J),u[2]=s.high,c[2]=s.low,s=i$12.encode(l.x,O$J),u[3]=s.high,c[3]=s.low,i.planes2D_HIGH=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:4,normalize:!1,value:u}),i.planes2D_LOW=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:4,normalize:!1,value:c})}var ue$z=new p$1d,le$v=new p$1d,ee$u=new o$1p,_e$r=new a$18,pe$z=[new a$18,new a$18,new a$18,new a$18,new a$18,new a$18,new a$18,new a$18];function fe$v(e,t,i,n,r,o){var a=h$18.center(e,_e$r);a.height=i;var s=a$18.toCartesian(a,t,ee$u),l=m$19.eastNorthUpToFixedFrame(s,t,ue$z),u=p$1d.inverse(l,le$v),c=e.west,h=e.east,d=e.north,f=e.south,p=pe$z;p[0].latitude=f,p[0].longitude=c,p[1].latitude=d,p[1].longitude=c,p[2].latitude=d,p[2].longitude=h,p[3].latitude=f,p[3].longitude=h;var _=.5*(c+h),m=.5*(d+f);p[4].latitude=f,p[4].longitude=_,p[5].latitude=d,p[5].longitude=_,p[6].latitude=m,p[6].longitude=c,p[7].latitude=m,p[7].longitude=h;for(var g=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,$=0;$<8;$++){p[$].height=i;var b=a$18.toCartesian(p[$],t,ee$u);p$1d.multiplyByPoint(u,b,b),b.z=0,g=Math.min(g,b.x),x=Math.max(x,b.x),y=Math.min(y,b.y),v=Math.max(v,b.y)}var T=n;T.x=g,T.y=y,T.z=0,p$1d.multiplyByPoint(l,T,T);var C=r;C.x=x,C.y=y,C.z=0,p$1d.multiplyByPoint(l,C,C),o$1p.subtract(C,T,r);var S=o;S.x=g,S.y=v,S.z=0,p$1d.multiplyByPoint(l,S,S),o$1p.subtract(S,T,o)}var ce$t=new o$1p,de$u=new o$1p,Ee$m=new i$12;y$Q.getPlanarTextureCoordinateAttributes=function(e,t,i,n,r,o){o$1q.typeOf.object("boundingRectangle",e),o$1q.defined("textureCoordinateRotationPoints",t),o$1q.typeOf.object("ellipsoid",i),o$1q.typeOf.object("projection",n),o$1q.typeOf.bool("useFloatBatchTable",r);var a=b$14,s=ce$t,l=de$u;fe$v(e,i,u$Z(o,0),a,s,l);var u={};Z$U(u,t);var c=i$12.fromCartesian(a,Ee$m);if(!r){var h=c.high;L$11(h.x,"southWest_HIGH_x",u),L$11(h.y,"southWest_HIGH_y",u),L$11(h.z,"southWest_HIGH_z",u);var d=c.low;return g$$(d.x,"southWest_LOW_x",u),g$$(d.y,"southWest_LOW_y",u),g$$(d.z,"southWest_LOW_z",u),N$P(s.x,"eastward_x",u),N$P(s.y,"eastward_y",u),N$P(s.z,"eastward_z",u),N$P(l.x,"northward_x",u),N$P(l.y,"northward_y",u),N$P(l.z,"northward_z",u),U$X(e,n,u,!1),u}return u.southWest_HIGH=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,normalize:!1,value:o$1p.pack(c.high,[0,0,0])}),u.southWest_LOW=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,normalize:!1,value:o$1p.pack(c.low,[0,0,0])}),u.eastward=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,normalize:!1,value:o$1p.pack(s,[0,0,0])}),u.northward=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,normalize:!1,value:o$1p.pack(l,[0,0,0])}),U$X(e,n,u,!0),u};var me$v=new o$1p;function te$B(e,t,i,n){var r=$$R;r.latitude=e,r.longitude=t,r.height=0;var o=a$18.toCartesian(r,i,me$v),a=Math.sqrt(o.x*o.x+o.y*o.y),s=e$2d.fastApproximateAtan2(a,o.z),l=e$2d.fastApproximateAtan2(o.x,o.y);return n.x=s,n.y=l,n}var re$D=new o$1o;function ve$r(e){return Math.max(e.width,e.height)>y$Q.MAX_WIDTH_FOR_PLANAR_EXTENTS}function x$$(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).geometryInstances;if(this.geometryInstances=t,this.show=u$Z(e.show,!0),this.classificationType=u$Z(e.classificationType,_0x2b86ba.BOTH),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=u$Z(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=u$Z(e._extruded,!1),this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._readyPromise=o$1l.defer(),this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:u$Z(e.vertexCacheOptimize,!1),interleave:u$Z(e.interleave,!1),releaseGeometryInstances:u$Z(e.releaseGeometryInstances,!0),allowPicking:u$Z(e.allowPicking,!0),asynchronous:u$Z(e.asynchronous,!0),compressVertices:u$Z(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0},e.geometryInstances&&e.geometryInstances.length){var i=e.geometryInstances[0].id;e$2e(i)&&i._clampToS3M&&(this.classificationType=_0x2b86ba.S3M_TILE)}}function M$W(e,t){var i=t?m$Z.EQUAL:m$Z.ALWAYS,n=u$M.CESIUM_3D_TILE_MASK;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:i,frontOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},backFunction:i,backOperation:{fail:n$_.KEEP,zFail:n$_.INCREMENT_WRAP,zPass:n$_.KEEP},reference:n,mask:n},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:re$G.LESS_OR_EQUAL},depthMask:!1}}function te$A(){return{cull:{enabled:!1},depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},reference:0,mask:1},stencilMask:1}}function U$W(e,t){var i=t?m$Z.EQUAL:m$Z.NOT_EQUAL,n=t?u$M.S3M_TILE+1:0;return{stencilTest:{enabled:e,frontFunction:i,frontOperation:{fail:n$_.ZERO,zFail:n$_.ZERO,zPass:n$_.ZERO},backFunction:i,backOperation:{fail:n$_.ZERO,zFail:n$_.ZERO,zPass:n$_.ZERO},reference:n,mask:u$M.CLASSIFICATION_MASK},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Ee$r.ALPHA_BLEND}}function ae$v(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$Z.EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:3,mask:3},blending:Ee$r.ALPHA_BLEND}}y$Q.getSphericalExtentGeometryInstanceAttributes=function(e,t,i,n,r){o$1q.typeOf.object("boundingRectangle",e),o$1q.defined("textureCoordinateRotationPoints",t),o$1q.typeOf.object("ellipsoid",i),o$1q.typeOf.object("projection",n),o$1q.typeOf.bool("useFloatBatchTable",r);var o=te$B(e.south,e.west,i,re$D),a=o.x,s=o.y,l=te$B(e.north,e.east,i,re$D),u=l.x,c=l.y,h=0;s>c&&(h=e$2d.PI-s,s=-e$2d.PI,c+=h),a-=e$2d.EPSILON5,s-=e$2d.EPSILON5,u+=e$2d.EPSILON5;var d=1/((c+=e$2d.EPSILON5)-s),f=1/(u-a),p={sphericalExtents:new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:4,normalize:!1,value:[a,s,f,d]}),longitudeRotation:new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:1,normalize:!1,value:[h]})};return Z$U(p,t),U$X(e,n,p,r),p},y$Q.hasAttributesForTextureCoordinatePlanes=function(e){var t=e$2e(e.southWest_HIGH)&&e$2e(e.southWest_LOW)&&e$2e(e.northward)&&e$2e(e.eastward)&&e$2e(e.planes2D_HIGH)&&e$2e(e.planes2D_LOW)&&e$2e(e.uMaxVmax)&&e$2e(e.uvMinAndExtents),i=e$2e(e.southWest_HIGH_x)&&e$2e(e.southWest_LOW_x)&&e$2e(e.southWest_HIGH_y)&&e$2e(e.southWest_LOW_y)&&e$2e(e.southWest_HIGH_z)&&e$2e(e.southWest_LOW_z)&&e$2e(e.northward_x)&&e$2e(e.eastward_x)&&e$2e(e.northward_y)&&e$2e(e.eastward_y)&&e$2e(e.northward_z)&&e$2e(e.eastward_z)&&e$2e(e.planes2D_HIGH_x)&&e$2e(e.planes2D_LOW_x)&&e$2e(e.planes2D_HIGH_y)&&e$2e(e.planes2D_LOW_y)&&e$2e(e.planes2D_HIGH_z)&&e$2e(e.planes2D_LOW_z)&&e$2e(e.planes2D_HIGH_w)&&e$2e(e.planes2D_LOW_w)&&e$2e(e.uMaxVmax)&&e$2e(e.uvMinAndExtents);return t||i},y$Q.hasAttributesForSphericalExtents=function(e){var t=e$2e(e.sphericalExtents)&&e$2e(e.longitudeRotation)&&e$2e(e.planes2D_HIGH)&&e$2e(e.planes2D_LOW)&&e$2e(e.uMaxVmax)&&e$2e(e.uvMinAndExtents),i=e$2e(e.sphericalExtents)&&e$2e(e.longitudeRotation)&&e$2e(e.planes2D_HIGH_x)&&e$2e(e.planes2D_LOW_x)&&e$2e(e.planes2D_HIGH_y)&&e$2e(e.planes2D_LOW_y)&&e$2e(e.planes2D_HIGH_z)&&e$2e(e.planes2D_LOW_z)&&e$2e(e.planes2D_HIGH_w)&&e$2e(e.planes2D_LOW_w)&&e$2e(e.uMaxVmax)&&e$2e(e.uvMinAndExtents);return t||i},y$Q.shouldUseSphericalCoordinates=function(e){return o$1q.typeOf.object("rectangle",e),ve$r(e)},y$Q.MAX_WIDTH_FOR_PLANAR_EXTENTS=e$2d.toRadians(1),Object.defineProperties(x$$.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}}),x$$.isSupported=function(e){return e.context.stencilBuffer};var ne$E={stencilTest:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.ZERO,zFail:n$_.ZERO,zPass:n$_.ZERO},backFunction:m$Z.NOT_EQUAL,backOperation:{fail:n$_.ZERO,zFail:n$_.ZERO,zPass:n$_.ZERO},reference:0,mask:u$M.CLASSIFICATION_MASK},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function se$w(e,t,i,n){if(!e$2e(e._rsColorPass)){var r=!e.debugShowShadowVolume;e._rsStencilDepthPass=d$1m.fromCache(M$W(r,!1)),e._rsStencilDepthPass3DTiles=d$1m.fromCache(M$W(r,!0)),e._rsStencilDepthPassS3M=d$1m.fromCache(te$A()),e._rsColorPass=d$1m.fromCache(U$W(r,!1)),e._rsColorPassS3M=d$1m.fromCache(ae$v()),e._rsPickPass=d$1m.fromCache(ne$E)}}function oe$s(e,t){if(!e.compressVertices)return t;if(-1!==t.search(/attribute\s+vec3\s+extrudeDirection;/g)){var i="compressedAttributes",n="attribute vec2 "+i+";",r="vec3 extrudeDirection;\n",o=t;return o=o.replace(/attribute\s+vec3\s+extrudeDirection;/g,""),[n,r,o=s$V.replaceMain(o,"czm_non_compressed_main"),"void main() \n{ \n extrudeDirection = czm_octDecode(compressedAttributes, 65535.0);\n czm_non_compressed_main(); \n}"].join("\n")}}function ie$A(e,t){var i=t.context,n=e._primitive,r=X$R;r=e._primitive._batchTable.getVertexShaderCallback()(r),r=y$R._appendDistanceDisplayConditionToShader(n,r),r=y$R._modifyShaderPosition(e,r,t.scene3DOnly),r=y$R._updateColorAttribute(n,r);var o=e._hasPlanarExtentsAttributes,a=o||e._hasSphericalExtentsAttribute;e._extruded&&(r=oe$s(n,r));var s=e._extruded?"EXTRUDED_GEOMETRY":"",l=new s$V({defines:[s],sources:[r]}),u=new s$V({sources:[Q$T]});e._primitive._swipeEnabled&&u.defines.push("APPLY_SWIPE");var c=e._primitive._attributeLocations,h=new y$Q(a,o,e.appearance,i.floatTextureSixPlaces);if(e._spStencil=r$14.replaceCache({context:i,shaderProgram:e._spStencil,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c}),e._primitive.allowPicking){var d=s$V.createPickVertexShaderSource(r);d=y$R._appendShowToShader(n,d),d=y$R._updatePickColorAttribute(d);var f=h.createPickFragmentShader(!1),p=h.createPickVertexShader([s],d,!1,t.mapProjection);if(e._spPick=r$14.replaceCache({name:"ClassificationPrimitive_spPick",context:i,shaderProgram:e._spPick,vertexShaderSource:p,fragmentShaderSource:f,attributeLocations:c}),a){var _=i.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!e$2e(_)){var m=h.createPickFragmentShader(!0),g=h.createPickVertexShader([s],d,!0,t.mapProjection);_=i.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:g,fragmentShaderSource:m,attributeLocations:c})}e._spPick2D=_}}else e._spPick=r$14.fromCache({name:"ClassificationPrimitive_spPick",context:i,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});l=new s$V({defines:[s],sources:[r=y$R._appendShowToShader(n,r)]}),e._sp=r$14.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});var x=h.createFragmentShader(!1),y=h.createVertexShader([s],r,!1,t.mapProjection);if(e._spColor=r$14.replaceCache({context:i,shaderProgram:e._spColor,vertexShaderSource:y,fragmentShaderSource:x,attributeLocations:c}),a){var v=i.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!e$2e(v)){var $=h.createFragmentShader(!0),b=h.createVertexShader([s],r,!0,t.mapProjection);v=i.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:b,fragmentShaderSource:$,attributeLocations:c})}e._spColor2D=v}}function de$t(e,t,i){var n=e._primitive,r=2*n._va.length;t.length=r;var o,a,s,l=0,u=n._batchTable.getUniformMapCallback()(e._uniformMap);u.uSwipeRegion=function(){var t=e._primitive._swipeRegion,n=new e$2c;return e$2c.fromElements(t.x,t.y,t.x+t.z,t.y+t.w,n),n.x=n.x*i.context.drawingBufferWidth,n.y=(1-n.y)*i.context.drawingBufferHeight,n.z=n.z*i.context.drawingBufferWidth,n.w=(1-n.w)*i.context.drawingBufferHeight,n};var c=e._needs2DShader;for(o=0;o<r;o+=2){var h=n._va[l++];e$2e(a=t[o])||(a=t[o]=new i$$({owner:e,primitiveType:n._primitiveType})),a.vertexArray=h,a.renderState=e._rsStencilDepthPass,a.shaderProgram=e._sp,a.uniformMap=u,a.pass=Le$q.TERRAIN_CLASSIFICATION,(s=i$$.shallowClone(a,a.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,s.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,a.derivedCommands.tileset=s,(s=i$$.shallowClone(a,a.derivedCommands.s3mtiles)).renderState=e._rsStencilDepthPassS3M,s.pass=Le$q.ClampObject,a.derivedCommands.s3mtiles=s,e$2e(a=t[o+1])||(a=t[o+1]=new i$$({owner:e,primitiveType:n._primitiveType})),a.vertexArray=h,a.renderState=e._rsColorPass,a.shaderProgram=e._spColor,a.pass=Le$q.TERRAIN_CLASSIFICATION;var d=e.appearance.material;if(e$2e(d)&&(u=p$19(u,d._uniforms)),a.uniformMap=u,(s=i$$.shallowClone(a,a.derivedCommands.tileset)).pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,a.derivedCommands.tileset=s,(s=i$$.shallowClone(a,a.derivedCommands.s3mtiles)).pass=Le$q.ClampObject,s.renderState=e._rsColorPassS3M,a.derivedCommands.s3mtiles=s,c){var f=i$$.shallowClone(a,a.derivedCommands.appearance2D);f.shaderProgram=e._spColor2D,a.derivedCommands.appearance2D=f,(f=i$$.shallowClone(s,s.derivedCommands.appearance2D)).shaderProgram=e._spColor2D,s.derivedCommands.appearance2D=f}}var p=e._commandsIgnoreShow,_=e._spStencil,m=0;r=p.length=r/2;for(var g=0;g<r;++g){var x=p[g]=i$$.shallowClone(t[m],p[g]);x.shaderProgram=_,x.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,m+=2}}function ue$y(e,t){var i,n,r=e._usePickOffsets,o=Le$q.TERRAIN_CLASSIFICATION,a=Le$q.CESIUM_3D_TILE_CLASSIFICATION,s=Le$q.ClampObject,l=e._primitive,u=2*l._va.length,c=0;r&&(u=2*(i=l._pickOffsets).length),t.length=u;var h,d,f,p=0,_=l._batchTable.getUniformMapCallback()(e._uniformMap),m=e._needs2DShader;for(h=0;h<u;h+=2){var g,x=l._va[p++];if(r&&(n=i[c++],x=l._va[n.index]),e$2e(d=t[h])||(d=t[h]=new i$$({owner:e,primitiveType:l._primitiveType,pickOnly:!0})),d.vertexArray=x,d.renderState=e._rsStencilDepthPass,d.shaderProgram=e._sp,d.uniformMap=_,d.pass=o,r&&(d.offset=n.offset,d.count=n.count),(f=i$$.shallowClone(d,d.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,f.pass=a,d.derivedCommands.tileset=f,(f=i$$.shallowClone(d,d.derivedCommands.s3mtiles)).renderState=e._rsStencilDepthPassS3M,f.pass=s,d.derivedCommands.s3mtiles=f,e$2e(d=t[h+1])||(d=t[h+1]=new i$$({owner:e,primitiveType:l._primitiveType,pickOnly:!0})),d.vertexArray=x,d.renderState=e._rsPickPass,d.shaderProgram=e._spPick,d.uniformMap=_,d.pass=o,r&&(d.offset=n.offset,d.count=n.count),(f=i$$.shallowClone(d,d.derivedCommands.tileset)).pass=a,d.derivedCommands.tileset=f,m)(g=i$$.shallowClone(d,d.derivedCommands.pick2D)).shaderProgram=e._spPick2D,d.derivedCommands.pick2D=g,(g=i$$.shallowClone(f,f.derivedCommands.pick2D)).shaderProgram=e._spPick2D,f.derivedCommands.pick2D=g;if((f=i$$.shallowClone(d,d.derivedCommands.s3mtiles)).pass=s,d.derivedCommands.s3mtiles=f,m)(g=i$$.shallowClone(d,d.derivedCommands.pick2D)).shaderProgram=e._spPick2D,d.derivedCommands.pick2D=g,(g=i$$.shallowClone(f,f.derivedCommands.pick2D)).shaderProgram=e._spPick2D,f.derivedCommands.pick2D=g}}function pe$y(e,t,i,n,r,o,a,s){de$t(e,o,s),ue$y(e,a)}function Z$T(e,t){return Math.floor(e%t/3)}function K$O(e,t,i,n,r,o){e.modelMatrix=i,e.boundingVolume=r,e.cull=n,e.debugShowBoundingVolume=o,t.commandList.push(e)}function j$X(e,t,i,n,r){e.modelMatrix=i,e.boundingVolume=r,e.cull=n,t.commandList.push(e)}function he$s(e,t,i,n,r,o,a,s){var l,u=e._primitive;y$R._updateBoundingVolumes(u,t,r),t.mode===C$14.SCENE3D?l=u._boundingSphereWC:t.mode===C$14.COLUMBUS_VIEW?l=u._boundingSphereCV:t.mode===C$14.SCENE2D&&e$2e(u._boundingSphere2D)?l=u._boundingSphere2D:e$2e(u._boundingSphereMorph)&&(l=u._boundingSphereMorph);var c,h,d=e.classificationType,f=d!==_0x2b86ba.CESIUM_3D_TILE,p=d!==_0x2b86ba.TERRAIN,_=t.passes;if(_.render){var m=i.length;for(c=0;c<m;++c)h=l[Z$T(c,m)],f&&K$O(i[c],t,r,o,h,a),p&&K$O(i[c].derivedCommands.tileset,t,r,o,h,a);if(t.invertClassification){var g=e._commandsIgnoreShow,x=g.length;for(c=0;c<x;++c)h=l[Math.floor(c/2)],K$O(g[c],t,r,o,h,a)}}if(_.pick){var y=n.length,v=u._pickOffsets;for(c=0;c<y;++c){h=l[v[Z$T(c,y)].index],f&&j$X(n[c],t,r,o,h),p&&j$X(n[c].derivedCommands.tileset,t,r,o,h)}}}x$$.prototype.update=function(e){if(e$2e(this._primitive)||e$2e(this.geometryInstances)){var t=this.appearance;e$2e(t)&&e$2e(t.material)&&t.material.update(e.context);var i=this,n=this._primitiveOptions;if(!e$2e(this._primitive)){var r,o,a,s,l=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],u=l.length,c=!1,h=!0,d=!1,f=!1;for(u>0&&(a=l[0].attributes,d=y$Q.hasAttributesForSphericalExtents(a),f=y$Q.hasAttributesForTextureCoordinatePlanes(a),s=a.color),r=0;r<u;r++){var p=(o=l[r]).attributes.color;if(e$2e(p))c=!0;else if(c)throw new t$15("All GeometryInstances must have color attributes to use per-instance color.");h=h&&e$2e(p)&&o$16.equals(s,p)}if(!h&&!d&&!f)throw new t$15("All GeometryInstances must have the same color attribute except via GroundPrimitives");if(c&&!e$2e(t)&&(t=new t$Q({flat:!0}),this.appearance=t),!c&&t instanceof t$Q)throw new t$15("PerInstanceColorAppearance requires color GeometryInstanceAttributes on all GeometryInstances");if(e$2e(t.material)&&!d&&!f)throw new t$15("Materials on ClassificationPrimitives are not supported except via GroundPrimitives");this._usePickOffsets=!d&&!f,this._hasSphericalExtentsAttribute=d,this._hasPlanarExtentsAttributes=f,this._hasPerColorAttribute=c;var _=new Array(u);for(r=0;r<u;++r)o=l[r],_[r]=new d$1o({geometry:o.geometry,attributes:o.attributes,modelMatrix:o.modelMatrix,id:o.id,pickPrimitive:u$Z(this._pickPrimitive,i)});n.appearance=t,n.geometryInstances=_,e$2e(this._createBoundingVolumeFunction)&&(n._createBoundingVolumeFunction=function(e,t){i._createBoundingVolumeFunction(e,t)}),n._createRenderStatesFunction=function(e,t,n,r){se$w(i)},n._createShaderProgramFunction=function(e,t,n){ie$A(i,t)},n._createCommandsFunction=function(e,t,n,r,o,a,s,l){pe$y(i,void 0,void 0,!0,!1,a,s,l)},e$2e(this._updateAndQueueCommandsFunction)?n._updateAndQueueCommandsFunction=function(e,t,n,r,o,a,s,l){i._updateAndQueueCommandsFunction(e,t,n,r,o,a,s,l)}:n._updateAndQueueCommandsFunction=function(e,t,n,r,o,a,s,l){he$s(i,t,n,r,o,a,s)},this._primitive=new y$R(n),this._primitive.readyPromise.then((function(e){i._ready=!0,i.releaseGeometryInstances&&(i.geometryInstances=void 0);var t=e._error;e$2e(t)?i._readyPromise.reject(t):i._readyPromise.resolve(i)}))}if(this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=d$1m.fromCache(M$W(!1,!1)),this._rsStencilDepthPass3DTiles=d$1m.fromCache(M$W(!1,!0)),this._rsColorPass=d$1m.fromCache(U$W(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=d$1m.fromCache(M$W(!0,!1)),this._rsStencilDepthPass3DTiles=d$1m.fromCache(M$W(!0,!0)),this._rsColorPass=d$1m.fromCache(U$W(!0))),this._primitive.appearance!==t){if(!this._hasSphericalExtentsAttribute&&!this._hasPlanarExtentsAttributes&&e$2e(t.material))throw new t$15("Materials on ClassificationPrimitives are not supported except via GroundPrimitive");if(!this._hasPerColorAttribute&&t instanceof t$Q)throw new t$15("PerInstanceColorAppearance requires color GeometryInstanceAttribute");this._primitive.appearance=t}this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},x$$.prototype.getGeometryInstanceAttributes=function(e){if(!e$2e(this._primitive))throw new t$15("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},x$$.prototype.isDestroyed=function(){return!1},x$$.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,i$11(this)};var te$z={u_globeMinimumAltitude:function(){return 55e3}};function d$15(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).appearance,i=e.geometryInstances;if(!e$2e(t)&&e$2e(i))for(var n=Array.isArray(i)?i:[i],r=n.length,o=0;o<r;o++){var a=n[o].attributes;if(e$2e(a)&&e$2e(a.color)){t=new t$Q({flat:!0});break}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=u$Z(e.show,!0),this.classificationType=u$Z(e.classificationType,_0x2b86ba.BOTH),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=u$Z(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._readyPromise=o$1l.defer(),this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=e$1H._defaultMaxTerrainHeight,this._minTerrainHeight=e$1H._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:u$Z(e.vertexCacheOptimize,!1),interleave:u$Z(e.interleave,!1),releaseGeometryInstances:u$Z(e.releaseGeometryInstances,!0),allowPicking:u$Z(e.allowPicking,!0),asynchronous:u$Z(e.asynchronous,!0),compressVertices:u$Z(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:te$z,classificationType:this.classificationType}}function z$R(e){return function(t,i){var n=i.maximumRadius,r=n/Math.cos(.5*t)-n;return e._maxHeight+r}}function L$10(e){return function(t,i){return e._minHeight}}Object.defineProperties(d$15.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),d$15.isSupported=x$$.isSupported;var se$v=new o$1p,ae$u=new o$1p,ne$D=new o$1p,oe$r=new a$18,ue$x=new h$18;function G$14(e,t){var i=e.mapProjection.ellipsoid;if(!e$2e(t.attributes)||!e$2e(t.attributes.position3DHigh))return e$2e(t.rectangle)?t.rectangle:void 0;for(var n=t.attributes.position3DHigh.values,r=t.attributes.position3DLow.values,o=n.length,a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=0;c<o;c+=3){var h=o$1p.unpack(n,c,se$v),d=o$1p.unpack(r,c,ae$u),f=o$1p.add(h,d,ne$D),p=i.cartesianToCartographic(f,oe$r),_=p.latitude,m=p.longitude;a=Math.min(a,_),s=Math.min(s,m),l=Math.max(l,_),u=Math.max(u,m)}var g=ue$x;return g.north=l,g.south=a,g.east=u,g.west=s,g}function he$r(e,t,i){var n=e$1H.getMinimumMaximumHeights(t,i);e._minTerrainHeight=n.minimumTerrainHeight,e._maxTerrainHeight=n.maximumTerrainHeight}function pe$x(e,t,i){var n=t.mapProjection.ellipsoid,r=G$14(t,i);if(e.geometryInstances){var o=Number.MIN_VALUE,a=Number.MAX_VALUE,s=!1;for(let t=0;t<e.geometryInstances.length>0;t++){var l=e.geometryInstances[t].geometry._groundBottomAltitude,u=e.geometryInstances[t].geometry._groundExtrudedHeight;if(e$2e(l)&&e$2e(u)&&(0!==l||0!==u)){var c=l+u;o=Math.max(o,c),a=Math.min(a,l),s=!0}}e._maxHeight=s?o:e._maxHeight,e._minHeight=s?a:e._minHeight}var h=(Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances])[0].geometry._granularity,d=y$Y.fromRectangle(r,L$10(e)(h,n),z$R(e)(h,n),n);if(e._boundingVolumes.push(d),!t.scene3DOnly){var f=t.mapProjection,p=i$1d.fromRectangleWithHeights2D(r,f,e._maxHeight,e._minHeight);o$1p.fromElements(p.center.z,p.center.x,p.center.y,p.center),e._boundingVolumes2D.push(p)}}function j$W(e,t){return Math.floor(e%t/3)}function O$I(e,t,i,n,r,o,a){var s=e._primitive;i.mode!==C$14.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&t.derivedCommands&&t.derivedCommands.appearance2D&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t)}function R$T(e,t,i,n,r,o){var a=e._primitive;i.mode!==C$14.SCENE3D&&t.shaderProgram===a._spPick&&a._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,i.commandList.push(t)}function me$u(e,t,i,n,r,o,a,s){var l;l=t.mode===C$14.SCENE3D?e._boundingVolumes:e._boundingVolumes2D;var u,c,h=e.classificationType,d=h!==_0x2b86ba.CESIUM_3D_TILE&&h!==_0x2b86ba.S3M_TILE,f=h!==_0x2b86ba.TERRAIN&&h!==_0x2b86ba.S3M_TILE,p=h!==_0x2b86ba.TERRAIN&&h!==_0x2b86ba.CESIUM_3D_TILE,_=t.passes,m=e._primitive;if(_.render){var g=i.length;for(u=0;u<g;++u)c=l[j$W(u,g)],d&&O$I(e,i[u],t,r,o,c,a),f&&O$I(e,i[u].derivedCommands.tileset,t,r,o,c,a),p&&O$I(e,i[u].derivedCommands.s3mtiles,t,r,o,c,a);if(t.invertClassification){var x=m._commandsIgnoreShow,y=x.length;for(u=0;u<y;++u)c=l[Math.floor(u/2)],O$I(e,x[u],t,r,o,c,a)}}if(_.pick){var v,$=n.length;for(e._useFragmentCulling||(v=m._primitive._pickOffsets),u=0;u<$;++u){if(c=l[j$W(u,$)],!e._useFragmentCulling)c=l[v[j$W(u,$)].index];d&&R$T(e,n[u],t,r,o,c),f&&R$T(e,n[u].derivedCommands.tileset,t,r,o,c),p&&O$I(e,n[u].derivedCommands.s3mtiles,t,r,o,c,a)}}}function n$V(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function n$U(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}d$15.initializeTerrainHeights=function(){return e$1H.initialize()},d$15.prototype.update=function(e){if(e$2e(this._primitive)||e$2e(this.geometryInstances)){if(!e$1H.initialized){if(!this.asynchronous)throw new t$15("For synchronous GroundPrimitives, you must call GroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");return void d$15.initializeTerrainHeights()}var t=this,i=this._classificationPrimitiveOptions;if(!e$2e(this._primitive)){var n,r,o,a,s,l=e.mapProjection.ellipsoid,u=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=u.length,h=new Array(c);for(a=0;a<c;++a){var d=G$14(e,r=(n=u[a]).geometry);e$2e(s)?e$2e(d)&&h$18.union(s,d,s):s=h$18.clone(d);var f=n.id;if(e$2e(f)&&e$2e(d)){var p=e$1H.getBoundingSphere(d,l);this._boundingSpheresKeys.push(f),this._boundingSpheres.push(p)}if(!e$2e(o=r.constructor)||!e$2e(o.createShadowVolume))throw new t$15("Not all of the geometry instances have GroundPrimitive support.")}he$r(this,s,l);var _=e.terrainExaggeration;this._minHeight=this._minTerrainHeight*_,this._maxHeight=this._maxTerrainHeight*_;var m=d$15._supportsMaterials(e.context);if(this._useFragmentCulling=m,m){var g,x=!0;for(a=0;a<c;++a)if(s=G$14(e,r=(n=u[a]).geometry),y$Q.shouldUseSphericalCoordinates(s)){x=!1;break}for(a=0;a<c;++a){o=(r=(n=u[a]).geometry).constructor;var y=G$14(e,r),v=r.textureCoordinateRotationPoints,$=e.context.floatTextureSixPlaces;g=x?y$Q.getPlanarTextureCoordinateAttributes(y,v,l,e.mapProjection,$,this._maxHeight):y$Q.getSphericalExtentGeometryInstanceAttributes(y,v,l,e.mapProjection,$);var b=n.attributes;for(var T in b)b.hasOwnProperty(T)&&(g[T]=b[T]);n.created?h[a]=new d$1o({geometry:n._groundGeometry,attributes:g,id:n.id}):(h[a]=new d$1o({geometry:o.createShadowVolume(r,L$10(this),z$R(this)),attributes:g,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0)}}else for(a=0;a<c;++a)o=(r=(n=u[a]).geometry).constructor,n.created?h[a]=new d$1o({geometry:r,attributes:n.attributes,id:n.id}):(h[a]=new d$1o({geometry:o.createShadowVolume(r,L$10(this),z$R(this)),attributes:n.attributes,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0);i.geometryInstances=h,i.appearance=this.appearance,i._createBoundingVolumeFunction=function(e,i){pe$x(t,e,i)},i._updateAndQueueCommandsFunction=function(e,i,n,r,o,a,s,l){me$u(t,i,n,r,o,a,s)},this._primitive=new x$$(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0);var i=e._error;e$2e(i)?t._readyPromise.reject(i):t._readyPromise.resolve(t)}))}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},d$15.prototype.getBoundingSphere=function(e){var t=this._boundingSpheresKeys.indexOf(e);if(-1!==t)return this._boundingSpheres[t]},d$15.prototype.getGeometryInstanceAttributes=function(e){if(!e$2e(this._primitive))throw new t$15("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},d$15.prototype.isDestroyed=function(){return!1},d$15.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$11(this)},d$15._supportsMaterials=function(e){return e.depthTexture},d$15.supportsMaterials=function(e){return o$1q.typeOf.object("scene",e),d$15._supportsMaterials(e.frameState.context)},Object.defineProperties(n$V.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),image:C$10("image"),scale:C$10("scale"),pixelOffset:C$10("pixelOffset"),eyeOffset:C$10("eyeOffset"),horizontalOrigin:C$10("horizontalOrigin"),verticalOrigin:C$10("verticalOrigin"),heightReference:C$10("heightReference"),color:C$10("color"),rotation:C$10("rotation"),alignedAxis:C$10("alignedAxis"),sizeInMeters:C$10("sizeInMeters"),width:C$10("width"),height:C$10("height"),scaleByDistance:C$10("scaleByDistance"),translucencyByDistance:C$10("translucencyByDistance"),pixelOffsetScaleByDistance:C$10("pixelOffsetScaleByDistance"),imageSubRegion:C$10("imageSubRegion"),distanceDisplayCondition:C$10("distanceDisplayCondition"),disableDepthTestDistance:C$10("disableDepthTestDistance")}),n$V.prototype.clone=function(e){return e$2e(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e):new n$V(this)},n$V.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this._show,e.show),this.image=u$Z(this._image,e.image),this.scale=u$Z(this._scale,e.scale),this.pixelOffset=u$Z(this._pixelOffset,e.pixelOffset),this.eyeOffset=u$Z(this._eyeOffset,e.eyeOffset),this.horizontalOrigin=u$Z(this._horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=u$Z(this._verticalOrigin,e.verticalOrigin),this.heightReference=u$Z(this._heightReference,e.heightReference),this.color=u$Z(this._color,e.color),this.rotation=u$Z(this._rotation,e.rotation),this.alignedAxis=u$Z(this._alignedAxis,e.alignedAxis),this.sizeInMeters=u$Z(this._sizeInMeters,e.sizeInMeters),this.width=u$Z(this._width,e.width),this.height=u$Z(this._height,e.height),this.scaleByDistance=u$Z(this._scaleByDistance,e.scaleByDistance),this.translucencyByDistance=u$Z(this._translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=u$Z(this._pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.imageSubRegion=u$Z(this._imageSubRegion,e.imageSubRegion),this.distanceDisplayCondition=u$Z(this._distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=u$Z(this._disableDepthTestDistance,e.disableDepthTestDistance)},Object.defineProperties(n$U.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),dimensions:C$10("dimensions"),heightReference:C$10("heightReference"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition")}),n$U.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.dimensions=this.dimensions,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new n$U(this)},n$U.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.dimensions=u$Z(this.dimensions,e.dimensions),this.heightReference=u$Z(this.heightReference,e.heightReference),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition)};var e$1r={FIXED:0,INERTIAL:1},Re$l=Object.freeze(e$1r);function t$J(){t$15.throwInstantiationError()}Object.defineProperties(t$J.prototype,{isConstant:{get:t$15.throwInstantiationError},definitionChanged:{get:t$15.throwInstantiationError},referenceFrame:{get:t$15.throwInstantiationError}}),t$J.prototype.getValue=t$15.throwInstantiationError,t$J.prototype.getValueInReferenceFrame=t$15.throwInstantiationError,t$J.prototype.equals=t$15.throwInstantiationError;var p$S=new p$1e;function r$V(e,t){this._definitionChanged=new o$1h,this._value=o$1p.clone(e),this._referenceFrame=u$Z(t,Re$l.FIXED)}function n$T(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function o$X(e){return e}function c$X(e,t){return C$10(e,t,o$X)}function n$S(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function n$R(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function e$1q(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._innerRadii=void 0,this._innerRadiiSubscription=void 0,this._minimumClock=void 0,this._minimumClockSubscription=void 0,this._maximumClock=void 0,this._maximumClockSubscription=void 0,this._minimumCone=void 0,this._minimumConeSubscription=void 0,this._maximumCone=void 0,this._maximumConeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function n$Q(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._showBackground=void 0,this._showBackgroundSubscription=void 0,this._backgroundColor=void 0,this._backgroundColorSubscription=void 0,this._backgroundPadding=void 0,this._backgroundPaddingSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}t$J.convertToReferenceFrame=function(e,t,i,n,r){if(!e$2e(t))return t;if(e$2e(r)||(r=new o$1p),i===n)return o$1p.clone(t,r);var o=m$19.computeIcrfToFixedMatrix(e,p$S);return e$2e(o)||(o=m$19.computeTemeToPseudoFixedMatrix(e,p$S)),i===Re$l.INERTIAL?p$1e.multiplyByVector(o,t,r):i===Re$l.FIXED?p$1e.multiplyByVector(p$1e.transpose(o,p$S),t,r):void 0},Object.defineProperties(r$V.prototype,{isConstant:{get:function(){return!e$2e(this._value)||this._referenceFrame===Re$l.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),r$V.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$l.FIXED,t)},r$V.prototype.setValue=function(e,t){var i=!1;o$1p.equals(this._value,e)||(i=!0,this._value=o$1p.clone(e)),e$2e(t)&&this._referenceFrame!==t&&(i=!0,this._referenceFrame=t),i&&this._definitionChanged.raiseEvent(this)},r$V.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2e(e))throw new t$15("time is required.");if(!e$2e(t))throw new t$15("referenceFrame is required.");return t$J.convertToReferenceFrame(e,this._value,this._referenceFrame,t,i)},r$V.prototype.equals=function(e){return this===e||e instanceof r$V&&o$1p.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame},Object.defineProperties(n$T.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),positions:C$10("positions"),width:C$10("width"),height:C$10("height"),heightReference:C$10("heightReference"),extrudedHeight:C$10("extrudedHeight"),extrudedHeightReference:C$10("extrudedHeightReference"),cornerType:C$10("cornerType"),granularity:C$10("granularity"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),classificationType:C$10("classificationType"),zIndex:C$10("zIndex")}),n$T.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new n$T(this)},n$T.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.positions=u$Z(this.positions,e.positions),this.width=u$Z(this.width,e.width),this.height=u$Z(this.height,e.height),this.heightReference=u$Z(this.heightReference,e.heightReference),this.extrudedHeight=u$Z(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=u$Z(this.extrudedHeightReference,e.extrudedHeightReference),this.cornerType=u$Z(this.cornerType,e.cornerType),this.granularity=u$Z(this.granularity,e.granularity),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$Z(this.classificationType,e.classificationType),this.zIndex=u$Z(this.zIndex,e.zIndex)},Object.defineProperties(n$S.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),length:C$10("length"),topRadius:C$10("topRadius"),bottomRadius:C$10("bottomRadius"),heightReference:C$10("heightReference"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),numberOfVerticalLines:C$10("numberOfVerticalLines"),slices:C$10("slices"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition")}),n$S.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.length=this.length,e.topRadius=this.topRadius,e.bottomRadius=this.bottomRadius,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new n$S(this)},n$S.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.length=u$Z(this.length,e.length),this.topRadius=u$Z(this.topRadius,e.topRadius),this.bottomRadius=u$Z(this.bottomRadius,e.bottomRadius),this.heightReference=u$Z(this.heightReference,e.heightReference),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=u$Z(this.numberOfVerticalLines,e.numberOfVerticalLines),this.slices=u$Z(this.slices,e.slices),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(n$R.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),semiMajorAxis:C$10("semiMajorAxis"),semiMinorAxis:C$10("semiMinorAxis"),height:C$10("height"),heightReference:C$10("heightReference"),extrudedHeight:C$10("extrudedHeight"),extrudedHeightReference:C$10("extrudedHeightReference"),rotation:C$10("rotation"),stRotation:C$10("stRotation"),granularity:C$10("granularity"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),numberOfVerticalLines:C$10("numberOfVerticalLines"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),classificationType:C$10("classificationType"),zIndex:C$10("zIndex")}),n$R.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new n$R(this)},n$R.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.semiMajorAxis=u$Z(this.semiMajorAxis,e.semiMajorAxis),this.semiMinorAxis=u$Z(this.semiMinorAxis,e.semiMinorAxis),this.height=u$Z(this.height,e.height),this.heightReference=u$Z(this.heightReference,e.heightReference),this.extrudedHeight=u$Z(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=u$Z(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=u$Z(this.rotation,e.rotation),this.stRotation=u$Z(this.stRotation,e.stRotation),this.granularity=u$Z(this.granularity,e.granularity),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=u$Z(this.numberOfVerticalLines,e.numberOfVerticalLines),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$Z(this.classificationType,e.classificationType),this.zIndex=u$Z(this.zIndex,e.zIndex)},Object.defineProperties(e$1q.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),radii:C$10("radii"),innerRadii:C$10("innerRadii"),minimumClock:C$10("minimumClock"),maximumClock:C$10("maximumClock"),minimumCone:C$10("minimumCone"),maximumCone:C$10("maximumCone"),heightReference:C$10("heightReference"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),stackPartitions:C$10("stackPartitions"),slicePartitions:C$10("slicePartitions"),subdivisions:C$10("subdivisions"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition")}),e$1q.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new e$1q(this)},e$1q.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.radii=u$Z(this.radii,e.radii),this.innerRadii=u$Z(this.innerRadii,e.innerRadii),this.minimumClock=u$Z(this.minimumClock,e.minimumClock),this.maximumClock=u$Z(this.maximumClock,e.maximumClock),this.minimumCone=u$Z(this.minimumCone,e.minimumCone),this.maximumCone=u$Z(this.maximumCone,e.maximumCone),this.heightReference=u$Z(this.heightReference,e.heightReference),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.stackPartitions=u$Z(this.stackPartitions,e.stackPartitions),this.slicePartitions=u$Z(this.slicePartitions,e.slicePartitions),this.subdivisions=u$Z(this.subdivisions,e.subdivisions),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(n$Q.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),text:C$10("text"),font:C$10("font"),style:C$10("style"),scale:C$10("scale"),showBackground:C$10("showBackground"),backgroundColor:C$10("backgroundColor"),backgroundPadding:C$10("backgroundPadding"),pixelOffset:C$10("pixelOffset"),eyeOffset:C$10("eyeOffset"),horizontalOrigin:C$10("horizontalOrigin"),verticalOrigin:C$10("verticalOrigin"),heightReference:C$10("heightReference"),fillColor:C$10("fillColor"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),translucencyByDistance:C$10("translucencyByDistance"),pixelOffsetScaleByDistance:C$10("pixelOffsetScaleByDistance"),scaleByDistance:C$10("scaleByDistance"),distanceDisplayCondition:C$10("distanceDisplayCondition"),disableDepthTestDistance:C$10("disableDepthTestDistance")}),n$Q.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.text=this.text,e.font=this.font,e.style=this.style,e.scale=this.scale,e.showBackground=this.showBackground,e.backgroundColor=this.backgroundColor,e.backgroundPadding=this.backgroundPadding,e.pixelOffset=this.pixelOffset,e.eyeOffset=this.eyeOffset,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.heightReference=this.heightReference,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e.scaleByDistance=this.scaleByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new n$Q(this)},n$Q.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.text=u$Z(this.text,e.text),this.font=u$Z(this.font,e.font),this.style=u$Z(this.style,e.style),this.scale=u$Z(this.scale,e.scale),this.showBackground=u$Z(this.showBackground,e.showBackground),this.backgroundColor=u$Z(this.backgroundColor,e.backgroundColor),this.backgroundPadding=u$Z(this.backgroundPadding,e.backgroundPadding),this.pixelOffset=u$Z(this.pixelOffset,e.pixelOffset),this.eyeOffset=u$Z(this.eyeOffset,e.eyeOffset),this.horizontalOrigin=u$Z(this.horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=u$Z(this.verticalOrigin,e.verticalOrigin),this.heightReference=u$Z(this.heightReference,e.heightReference),this.fillColor=u$Z(this.fillColor,e.fillColor),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.translucencyByDistance=u$Z(this.translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=u$Z(this.pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.scaleByDistance=u$Z(this.scaleByDistance,e.scaleByDistance),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=u$Z(this.disableDepthTestDistance,e.disableDepthTestDistance)};var e$1p=new e$1_,a$N=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=e.translation,this.rotation=e.rotation,this.scale=e.scale};Object.defineProperties(a$N.prototype,{isConstant:{get:function(){return r$_.isConstant(this._translation)&&r$_.isConstant(this._rotation)&&r$_.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:C$10("translation"),rotation:C$10("rotation"),scale:C$10("scale")}),a$N.prototype.getValue=function(e,t){return e$2e(t)||(t=new e$1_),t.translation=r$_.getValueOrClonedDefault(this._translation,e,e$1p.translation,t.translation),t.rotation=r$_.getValueOrClonedDefault(this._rotation,e,e$1p.rotation,t.rotation),t.scale=r$_.getValueOrClonedDefault(this._scale,e,e$1p.scale,t.scale),t},a$N.prototype.equals=function(e){return this===e||e instanceof a$N&&r$_.equals(this._translation,e._translation)&&r$_.equals(this._rotation,e._rotation)&&r$_.equals(this._scale,e._scale)};var f$V=function(e,t){this._propertyNames=[],this._definitionChanged=new o$1h,e$2e(e)&&this.merge(e,t)};function g$_(e){return new e$1L(e)}function _$O(e,t){var i=e._propertyNames,n=t._propertyNames,r=i.length;if(r!==n.length)return!1;for(var o=0;o<r;++o){var a=i[o];if(-1===n.indexOf(a)||!r$_.equals(e[a],t[a]))return!1}return!0}function a$M(e){return new a$N(e)}function c$W(e){return new f$V(e,a$M)}function t$I(e){this._show=void 0,this._showSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._runAnimations=void 0,this._clampAnimations=void 0,this._runAnimationsSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._silhouetteColor=void 0,this._silhouetteColorSubscription=void 0,this._silhouetteSize=void 0,this._silhouetteSizeSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._colorBlendMode=void 0,this._colorBlendModeSubscription=void 0,this._colorBlendAmount=void 0,this._colorBlendAmountSubscription=void 0,this._clippingPlanes=void 0,this._clippingPlanesSubscription=void 0,this._imageBasedLightingFactor=void 0,this._imageBasedLightingFactorSubscription=void 0,this._lightColor=void 0,this._lightColorSubscription=void 0,this._definitionChanged=new o$1h,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function i$S(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._maximumScreenSpaceError=void 0,this._maximumScreenSpaceErrorSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function n$P(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function e$1o(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function n$O(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function a$L(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function e$1n(e){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._enuCenter=void 0,this._shapeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubsription=void 0,this._definitionChanged=new o$1h,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function n$N(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distancedisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function e$1m(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._enuCenter=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}Object.defineProperties(f$V.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){for(var e=this._propertyNames,t=0,i=e.length;t<i;t++)if(!r$_.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),f$V.prototype.hasProperty=function(e){return-1!==this._propertyNames.indexOf(e)},f$V.prototype.addProperty=function(e,t,i){var n=this._propertyNames;if(!e$2e(e))throw new t$15("propertyName is required.");if(-1!==n.indexOf(e))throw new t$15(e+" is already a registered property.");n.push(e),Object.defineProperty(this,e,C$10(e,!0,u$Z(i,g$_))),e$2e(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)},f$V.prototype.removeProperty=function(e){var t=this._propertyNames.indexOf(e);if(!e$2e(e))throw new t$15("propertyName is required.");if(-1===t)throw new t$15(e+" is not a registered property.");this._propertyNames.splice(t,1),delete this[e],this._definitionChanged.raiseEvent(this)},f$V.prototype.getValue=function(e,t){if(!e$2e(e))throw new t$15("time is required.");e$2e(t)||(t={});for(var i=this._propertyNames,n=0,r=i.length;n<r;n++){var o=i[n];t[o]=r$_.getValueOrUndefined(this[o],e,t[o])}return t},f$V.prototype.merge=function(e,t){if(!e$2e(e))throw new t$15("source is required.");for(var i=this._propertyNames,n=e$2e(e._propertyNames)?e._propertyNames:Object.keys(e),r=0,o=n.length;r<o;r++){var a=n[r],s=this[a],l=e[a];void 0===s&&-1===i.indexOf(a)&&this.addProperty(a,void 0,t),void 0!==l&&(void 0!==s?e$2e(s)&&e$2e(s.merge)&&s.merge(l):e$2e(l)&&e$2e(l.merge)&&e$2e(l.clone)?this[a]=l.clone():this[a]=l)}},f$V.prototype.equals=function(e){return this===e||e instanceof f$V&&_$O(this,e)},Object.defineProperties(t$I.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),scale:C$10("scale"),minimumPixelSize:C$10("minimumPixelSize"),maximumScale:C$10("maximumScale"),incrementallyLoadTextures:C$10("incrementallyLoadTextures"),shadows:C$10("shadows"),uri:C$10("uri"),runAnimations:C$10("runAnimations"),clampAnimations:C$10("clampAnimations"),nodeTransformations:C$10("nodeTransformations",void 0,c$W),heightReference:C$10("heightReference"),distanceDisplayCondition:C$10("distanceDisplayCondition"),silhouetteColor:C$10("silhouetteColor"),silhouetteSize:C$10("silhouetteSize"),color:C$10("color"),colorBlendMode:C$10("colorBlendMode"),colorBlendAmount:C$10("colorBlendAmount"),clippingPlanes:C$10("clippingPlanes"),imageBasedLightingFactor:C$10("imageBasedLightingFactor"),lightColor:C$10("lightColor")}),t$I.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.scale=this.scale,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.shadows=this.shadows,e.uri=this.uri,e.runAnimations=this.runAnimations,e.clampAnimations=this.clampAnimations,e.nodeTransformations=this.nodeTransformations,e.heightReference=this._heightReference,e.distanceDisplayCondition=this.distanceDisplayCondition,e.silhouetteColor=this.silhouetteColor,e.silhouetteSize=this.silhouetteSize,e.color=this.color,e.colorBlendMode=this.colorBlendMode,e.colorBlendAmount=this.colorBlendAmount,e.clippingPlanes=this.clippingPlanes,e.imageBasedLightingFactor=this.imageBasedLightingFactor,e.lightColor=this.lightColor,e):new t$I(this)},t$I.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.scale=u$Z(this.scale,e.scale),this.minimumPixelSize=u$Z(this.minimumPixelSize,e.minimumPixelSize),this.maximumScale=u$Z(this.maximumScale,e.maximumScale),this.incrementallyLoadTextures=u$Z(this.incrementallyLoadTextures,e.incrementallyLoadTextures),this.shadows=u$Z(this.shadows,e.shadows),this.uri=u$Z(this.uri,e.uri),this.runAnimations=u$Z(this.runAnimations,e.runAnimations),this.clampAnimations=u$Z(this.clampAnimations,e.clampAnimations),this.heightReference=u$Z(this.heightReference,e.heightReference),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.silhouetteColor=u$Z(this.silhouetteColor,e.silhouetteColor),this.silhouetteSize=u$Z(this.silhouetteSize,e.silhouetteSize),this.color=u$Z(this.color,e.color),this.colorBlendMode=u$Z(this.colorBlendMode,e.colorBlendMode),this.colorBlendAmount=u$Z(this.colorBlendAmount,e.colorBlendAmount),this.clippingPlanes=u$Z(this.clippingPlanes,e.clippingPlanes),this.imageBasedLightingFactor=u$Z(this.imageBasedLightingFactor,e.imageBasedLightingFactor),this.lightColor=u$Z(this.lightColor,e.lightColor);var t=e.nodeTransformations;if(e$2e(t)){var i=this.nodeTransformations;e$2e(i)?i.merge(t):this.nodeTransformations=new f$V(t,a$M)}},Object.defineProperties(i$S.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),uri:C$10("uri"),maximumScreenSpaceError:C$10("maximumScreenSpaceError")}),i$S.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new i$S(this)},i$S.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.uri=u$Z(this.uri,e.uri),this.maximumScreenSpaceError=u$Z(this.maximumScreenSpaceError,e.maximumScreenSpaceError)},Object.defineProperties(n$P.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),leadTime:C$10("leadTime"),trailTime:C$10("trailTime"),width:C$10("width"),resolution:C$10("resolution"),material:c$$("material"),distanceDisplayCondition:C$10("distanceDisplayCondition")}),n$P.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e.width=this.width,e.resolution=this.resolution,e.material=this.material,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new n$P(this)},n$P.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.leadTime=u$Z(this.leadTime,e.leadTime),this.trailTime=u$Z(this.trailTime,e.trailTime),this.width=u$Z(this.width,e.width),this.resolution=u$Z(this.resolution,e.resolution),this.material=u$Z(this.material,e.material),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(e$1o.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),plane:C$10("plane"),dimensions:C$10("dimensions"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition")}),e$1o.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new e$1o(this)},e$1o.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.plane=u$Z(this.plane,e.plane),this.dimensions=u$Z(this.dimensions,e.dimensions),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(n$O.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),pixelSize:C$10("pixelSize"),heightReference:C$10("heightReference"),color:C$10("color"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),scaleByDistance:C$10("scaleByDistance"),translucencyByDistance:C$10("translucencyByDistance"),distanceDisplayCondition:C$10("distanceDisplayCondition"),disableDepthTestDistance:C$10("disableDepthTestDistance")}),n$O.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.pixelSize=this.pixelSize,e.heightReference=this.heightReference,e.color=this.color,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new n$O(this)},n$O.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.pixelSize=u$Z(this.pixelSize,e.pixelSize),this.heightReference=u$Z(this.heightReference,e.heightReference),this.color=u$Z(this.color,e.color),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.scaleByDistance=u$Z(this.scaleByDistance,e.scaleByDistance),this.translucencyByDistance=u$Z(this._translucencyByDistance,e.translucencyByDistance),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=u$Z(this.disableDepthTestDistance,e.disableDepthTestDistance)},Object.defineProperties(a$L.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),positions:C$10("positions"),width:C$10("width"),hMax:C$10("hMax"),granularity:C$10("granularity"),material:c$$("material"),depthFailMaterial:c$$("depthFailMaterial"),arcType:C$10("arcType"),clampToGround:C$10("clampToGround"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),classificationType:C$10("classificationType"),zIndex:C$10("zIndex")}),a$L.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.hMax=this.hMax,e.granularity=this.granularity,e.material=this.material,e.depthFailMaterial=this.depthFailMaterial,e.arcType=this.arcType,e.clampToGround=this.clampToGround,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new a$L(this)},a$L.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.positions=u$Z(this.positions,e.positions),this.width=u$Z(this.width,e.width),this.granularity=u$Z(this.granularity,e.granularity),this.material=u$Z(this.material,e.material),this.depthFailMaterial=u$Z(this.depthFailMaterial,e.depthFailMaterial),this.arcType=u$Z(this.arcType,e.arcType),this.clampToGround=u$Z(this.clampToGround,e.clampToGround),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$Z(this.classificationType,e.classificationType),this.zIndex=u$Z(this.zIndex,e.zIndex),this.hMax=u$Z(this.hMax,e.hMax)},Object.defineProperties(e$1n.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),material:c$$("material"),positions:C$10("positions"),shape:C$10("shape"),granularity:C$10("granularity"),fill:C$10("fill"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),cornerType:C$10("cornerType"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),enuCenter:C$10("enuCenter")}),e$1n.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.material=this.material,e.positions=this.positions,e.shape=this.shape,e.granularity=this.granularity,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.cornerType=this.cornerType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.enuCenter=this.enuCenter,e):new e$1n(this)},e$1n.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.material=u$Z(this.material,e.material),this.positions=u$Z(this.positions,e.positions),this.shape=u$Z(this.shape,e.shape),this.granularity=u$Z(this.granularity,e.granularity),this.fill=u$Z(this.fill,e.fill),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.cornerType=u$Z(this.cornerType,e.cornerType),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.enuCenter=u$Z(this.enuCenter,e.enuCenter)},Object.defineProperties(n$N.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),coordinates:C$10("coordinates"),height:C$10("height"),heightReference:C$10("heightReference"),extrudedHeight:C$10("extrudedHeight"),extrudedHeightReference:C$10("extrudedHeightReference"),rotation:C$10("rotation"),stRotation:C$10("stRotation"),granularity:C$10("granularity"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),classificationType:C$10("classificationType"),zIndex:C$10("zIndex")}),n$N.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.coordinates=this.coordinates,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new n$N(this)},n$N.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.coordinates=u$Z(this.coordinates,e.coordinates),this.height=u$Z(this.height,e.height),this.heightReference=u$Z(this.heightReference,e.heightReference),this.extrudedHeight=u$Z(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=u$Z(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=u$Z(this.rotation,e.rotation),this.stRotation=u$Z(this.stRotation,e.stRotation),this.granularity=u$Z(this.granularity,e.granularity),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$Z(this.classificationType,e.classificationType),this.zIndex=u$Z(this.zIndex,e.zIndex)},Object.defineProperties(e$1m.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),positions:C$10("positions"),minimumHeights:C$10("minimumHeights"),maximumHeights:C$10("maximumHeights"),granularity:C$10("granularity"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),enuCenter:C$10("enuCenter")}),e$1m.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.enuCenter=this.enuCenter,e):new e$1m(this)},e$1m.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.positions=u$Z(this.positions,e.positions),this.minimumHeights=u$Z(this.minimumHeights,e.minimumHeights),this.maximumHeights=u$Z(this.maximumHeights,e.maximumHeights),this.granularity=u$Z(this.granularity,e.granularity),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.enuCenter=u$Z(this.enuCenter,e.enuCenter)};var $$Q=new a$18;function ii$6(e){return new r$V(e)}function ei$6(e){return C$10(e,void 0,ii$6)}function o$W(e,t){return C$10(e,void 0,(function(e){return e instanceof t?e:new t(e)}))}function h$W(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).id;e$2e(t)||(t=e$1T()),this._availability=void 0,this._id=t,this._definitionChanged=new o$1h,this._name=e.name,this._show=u$Z(e.show,!0),this._depthTestEnabled=u$Z(e.depthTestEnabled,!0),this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall"],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._orientation=void 0,this._scale=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this._polygonOffset={enabled:!1,value:new o$1o(0,0)},this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function v$J(e,t,i){for(var n=t.length,r=0;r<n;r++){var o=t[r],a=i;o._show!==a&&(o.show=a,v$J(o,o._children,i))}e._definitionChanged.raiseEvent(e,"isShowing",i,!i)}Object.defineProperties(h$W.prototype,{availability:c$X("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:c$X("name"),show:{get:function(){return this._show},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(e!==this._show){var t=this.isShowing;this._show=e;var i=this.isShowing;t!==i&&v$J(this,this._children,i),this._definitionChanged.raiseEvent(this,"show",e,!e)}}},isShowing:{get:function(){return this._show&&(!e$2e(this.entityCollection)||this.entityCollection.show)&&(!e$2e(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){var t=this._parent;if(t!==e){var i=this.isShowing;if(e$2e(t)){var n=t._children.indexOf(this);t._children.splice(n,1)}this._parent=e,e$2e(e)&&e._children.push(this);var r=this.isShowing;i!==r&&v$J(this,this._children,r),this._definitionChanged.raiseEvent(this,"parent",e,t)}}},children:{get:function(){return this._children},set:function(e){this._children=e}},propertyNames:{get:function(){return this._propertyNames}},billboard:o$W("billboard",n$V),box:o$W("box",n$U),corridor:o$W("corridor",n$T),cylinder:o$W("cylinder",n$S),description:C$10("description"),ellipse:o$W("ellipse",n$R),ellipsoid:o$W("ellipsoid",e$1q),label:o$W("label",n$Q),model:o$W("model",t$I),orientation:C$10("orientation"),scale:C$10("scale"),path:o$W("path",n$P),plane:o$W("plane",e$1o),point:o$W("point",n$O),polygon:o$W("polygon",l$Y),polyline:o$W("polyline",a$L),polylineVolume:o$W("polylineVolume",e$1n),properties:o$W("properties",f$V),position:ei$6("position"),rectangle:o$W("rectangle",n$N),viewFrom:C$10("viewFrom"),wall:o$W("wall",e$1m)}),h$W.prototype.isAvailable=function(e){if(!e$2e(e))throw new t$15("time is required.");var t=this._availability;return!e$2e(t)||t.contains(e)},h$W.prototype.addProperty=function(e){var t=this._propertyNames;if(!e$2e(e))throw new t$15("propertyName is required.");if(-1!==t.indexOf(e))throw new t$15(e+" is already a registered property.");if(e in this)throw new t$15(e+" is a reserved property name.");t.push(e),Object.defineProperty(this,e,c$X(e,!0))},h$W.prototype.removeProperty=function(e){var t=this._propertyNames.indexOf(e);if(!e$2e(e))throw new t$15("propertyName is required.");if(-1===t)throw new t$15(e+" is not a registered property.");this._propertyNames.splice(t,1),delete this[e]},h$W.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.name=u$Z(this.name,e.name),this.availability=u$Z(e.availability,this.availability);for(var t=this._propertyNames,i=e$2e(e._propertyNames)?e._propertyNames:Object.keys(e),n=i.length,r=0;r<n;r++){var o=i[r];if("parent"!==o){var a=this[o],s=e[o];!e$2e(a)&&-1===t.indexOf(o)&&this.addProperty(o),e$2e(s)&&(e$2e(a)?e$2e(a.merge)&&a.merge(s):e$2e(s.merge)&&e$2e(s.clone)?this[o]=s.clone():this[o]=s)}}};var P$S=new p$1e,G$13=new o$1p,x$_=new n$15;h$W.prototype.computeModelMatrix=function(e,t){o$1q.typeOf.object("time",e);var i=r$_.getValueOrUndefined(this._position,e,G$13);if(e$2e(i)){var n=r$_.getValueOrUndefined(this._orientation,e,x$_);return t=e$2e(n)?p$1d.fromRotationTranslation(p$1e.fromQuaternion(n,P$S),i,t):m$19.eastNorthUpToFixedFrame(i,void 0,t)}},h$W.prototype.computeModelMatrixForHeightReference=function(e,t,i,n,r){o$1q.typeOf.object("time",e);var o=r$_.getValueOrDefault(t,e,k$R.NONE),a=r$_.getValueOrUndefined(this._position,e,G$13);if(o===k$R.NONE||!e$2e(a)||o$1p.equalsEpsilon(a,o$1p.ZERO,e$2d.EPSILON8))return this.computeModelMatrix(e,r);var s=n.cartesianToCartographic(a,$$Q);o===k$R.CLAMP_TO_GROUND?s.height=i:s.height+=i,a=n.cartographicToCartesian(s,a);var l=r$_.getValueOrUndefined(this._orientation,e,x$_);return r=e$2e(l)?p$1d.fromRotationTranslation(p$1e.fromQuaternion(l,P$S),a,r):m$19.eastNorthUpToFixedFrame(a,void 0,r)},h$W.supportsMaterialsforEntitiesOnTerrain=function(e){return d$15.supportsMaterials(e)},h$W.supportsPolylinesOnTerrain=function(e){return g$13.isSupported(e)},h$W.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._polygonOffset.enabled=!0,o$1o.fromElements(e,t,this._polygonOffset.value)):(this._polygonOffset.enabled=!1,o$1o.fromElements(0,0,this._polygonOffset.value))};var e$1l={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2},R$S=Object.freeze(e$1l),e$1k={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},S$Q=Object.freeze(e$1k),e$1j={CENTER:0,LEFT:1,RIGHT:-1},j$V=Object.freeze(e$1j);function n$M(e,t,i,n,r){if(this.imageryLayer=e,this.x=t,this.y=i,this.level=n,this.request=void 0,0!==n){var o=t/2|0,a=i/2|0,s=n-1;this.parent=e.getImageryFromCache(o,a,s)}(this.state=wt$7.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,this.isMvtTexture=!1,this.cancelCount=0,!e$2e(r)&&e.imageryProvider.ready)&&(r=e.imageryProvider.tilingScheme.tileXYToRectangle(t,i,n));this.rectangle=r,this.discard=!1}function x$Z(e,t,i,n){var r=t.getGeometry().getFlatCoordinates(),o=r[0],a=r[1],s=i[0]*o+i[2]*a+i[4],l=i[1]*o+i[3]*a+i[5],u=s/e._canvasWidth,c=l/e._canvasWidth,h=n.west+n.width*u,d=n.south+n.height*(1-c);return o$1p.fromRadians(h,d,100)}n$M.createPlaceholder=function(e){var t=new n$M(e,0,0,0);return t.addReference(),t.state=wt$7.PLACEHOLDER,t},n$M.prototype.addReference=function(){++this.referenceCount},n$M.prototype.releaseReference=function(){if(--this.referenceCount,0===this.referenceCount){if(this.imageryLayer.removeImageryFromCache(this),e$2e(this.parent)&&this.parent.releaseReference(),e$2e(this.image)&&e$2e(this.image.destroy)&&this.image.destroy(),this.release(),e$2e(this.texture)&&this.texture.destroy(),e$2e(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),e$2e(this.labelParent)){this.imageryLayer.kmlLayer.entities.remove(this.labelParent);for(var e=0,t=this.labelParent._children.length;e<t;e++)this.imageryLayer.kmlLayer.entities.remove(this.labelParent._children[e]);this.labelParent=void 0}if(e$2e(this.billboardParent)){this.imageryLayer.kmlLayer.entities.remove(this.billboardParent);for(e=0,t=this.billboardParent._children.length;e<t;e++)this.imageryLayer.kmlLayer.entities.remove(this.billboardParent._children[e]);this.billboardParent=void 0}return i$11(this),0}return this.referenceCount},new o$1o,new o$1p;var T$T=new o$Y;function m$V(e,t,i,n,r){this.bottomLeft=u$Z(e,o$1o.ZERO),this.topRight=u$Z(t,o$1o.ZERO),this.childNode1=i,this.childNode2=n,this.imageIndex=r}n$M.prototype.createLabel=function(e,t){for(var i=this.rectangle,n=this.transform,r=(t.length,0),o=t.length;r<o;r++){var a=t[r],s=a.feature,l=a.style,u=l.getText(),c=l.textSize,h=u.getText();if(""!==h){var d,f,p,_,m=u.getFont(m),g=c+"px "+m,x=u.getFill(),y=u.getStroke();e$2e(x)&&(d=x.getColor(),(d=e$1X.unpack(d)).alpha=1),e$2e(y)&&(f=y.getColor(),f=e$1X.unpack(f),p=y.getWidth(),_=R$S.FILL_AND_OUTLINE);var v=this.labelParent;e$2e(v)||(this.labelParent=v=new h$W,this.labelParent.show=!1,e.kmlLayer.entities.add(v)),T$T.near=15e3,T$T.nearValue=2,T$T.far=1e7,T$T.farValue=0,e.kmlLayer.entities.add({parent:v,position:x$Z(e.imageryProvider,s,n,i),label:{text:h,font:g,verticalOrigin:S$Q.TOP,horizontalOrigin:j$V.LEFT,fillColor:d,outlineColor:f,outlineWidth:p,style:_,pixelOffset:new o$1o(0,2*-c),heightReference:k$R.CLAMP_TO_GROUND,scaleByDistance:T$T}})}}},n$M.prototype.createBillboard=function(e,t){for(var i=this.rectangle,n=this.transform,r=(t.length,0),o=t.length;r<o;r++){var a,s=t[r],l=s.feature,u=s.style.layout;if(e$2e(u)&&e$2e(u["icon-image"])){var c=u["icon-image"],h=u$Z(u["icon-size"],1);if(e$2e(e._imageCanvas[c]))a=e._imageCanvas[c];else{var d=e.imageryProvider._subSpriteImage[c];if(!e$2e(d))continue;(a=document.createElement("canvas")).width=d.width,a.height=d.height,a.getContext("2d").putImageData(d,0,0),e._imageCanvas[c]=a}var f=this.billboardParent;e$2e(f)||(this.billboardParent=f=new h$W,e.kmlLayer.entities.add(f)),e.kmlLayer.entities.add({parent:f,position:x$Z(e.imageryProvider,l,n,i),billboard:{image:a,scale:h,heightReference:k$R.CLAMP_TO_GROUND,pixelOffset:new o$1o(0,-a.height),scaleByDistance:new o$Y(1500,1.5,8e6,0)}})}}},n$M.prototype.processStateMachine=function(e,t,i){this.state===wt$7.UNLOADED&&!i&&!this.imageryLayer._pausing&&(this.state=wt$7.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===wt$7.TRANSITIONING&&e$2e(this.request)&&e$2e(this.beginRequestTime)&&performance.now()-this.beginRequestTime>r$1b.TIMEOUT&&this.request.cancel(),this.state===wt$7.RECEIVED&&(this.state=wt$7.TRANSITIONING,this.image,this.imageryLayer._createTexture(e.context,this,e));var n=this.state===wt$7.READY&&t&&!this.texture;(this.state===wt$7.TEXTURE_LOADED||n)&&(this.state=wt$7.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))},n$M.prototype.isDestroyed=function(){return!1},n$M.prototype.showLabelAndIcon=function(e){},n$M.prototype.setVisible=function(e){},n$M.prototype.release=function(){},n$M.prototype.onAlphaChanged=function(){};var G$12=new o$1o(16,16);function v$I(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.borderWidthInPixels,1),i=u$Z(e.initialSize,G$12);if(!e$2e(e.context))throw new t$15("context is required.");if(t<0)throw new t$15("borderWidthInPixels must be greater than or equal to zero.");if(i.x<1||i.y<1)throw new t$15("initialSize must be greater than zero.");this._context=e.context,this._pixelFormat=u$Z(e.pixelFormat,V$12.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=e$1T(),this._idHash={},this._initialSize=i,this._root=void 0}function Z$S(e,t){e._context;var i=e.numberOfImages,n=e._borderWidthInPixels;if(i>0){for(var r=e._texture.width,o=e._texture.height,a=2*(r+t.width+n),s=2*(o+t.height+n),l=r/a,u=o/s,c=new m$V(new o$1o(r+n,n),new o$1o(a,o)),h=new m$V(new o$1o,new o$1o(a,o),e._root,c),d=new m$V(new o$1o(n,o+n),new o$1o(a,s)),f=new m$V(new o$1o,new o$1o(a,s),h,d),p=0;p<e._textureCoordinates.length;p++){var _=e._textureCoordinates[p];e$2e(_)&&(_.x*=l,_.y*=u,_.width*=l,_.height*=u)}var m=new t$U({context:e._context,width:a,height:s,pixelFormat:e._pixelFormat});m.copyFromTexture(e._texture,0,0,0,0,a,s),e._texture=e._texture&&e._texture.destroy(),e._texture=m,e._root=f}else{var g=2*(t.width+2*n),x=2*(t.height+2*n);g<e._initialSize.x&&(g=e._initialSize.x),x<e._initialSize.y&&(x=e._initialSize.y),e._texture=e._texture&&e._texture.destroy(),e._texture=new t$U({context:e._context,width:g,height:x,pixelFormat:e._pixelFormat}),e._root=new m$V(new o$1o(n,n),new o$1o(g,x))}}function I$15(e,t,i){if(e$2e(t)){if(!e$2e(t.childNode1)&&!e$2e(t.childNode2)){if(e$2e(t.imageIndex))return;var n=t.topRight.x-t.bottomLeft.x,r=t.topRight.y-t.bottomLeft.y,o=n-i.width,a=r-i.height;if(o<0||a<0)return;if(0===o&&0===a)return t;if(o>a){t.childNode1=new m$V(new o$1o(t.bottomLeft.x,t.bottomLeft.y),new o$1o(t.bottomLeft.x+i.width,t.topRight.y));var s=t.bottomLeft.x+i.width+e._borderWidthInPixels;s<t.topRight.x&&(t.childNode2=new m$V(new o$1o(s,t.bottomLeft.y),new o$1o(t.topRight.x,t.topRight.y)))}else{t.childNode1=new m$V(new o$1o(t.bottomLeft.x,t.bottomLeft.y),new o$1o(t.topRight.x,t.bottomLeft.y+i.height));var l=t.bottomLeft.y+i.height+e._borderWidthInPixels;l<t.topRight.y&&(t.childNode2=new m$V(new o$1o(t.bottomLeft.x,l),new o$1o(t.topRight.x,t.topRight.y)))}return I$15(e,t.childNode1,i)}return I$15(e,t.childNode1,i)||I$15(e,t.childNode2,i)}}function C$Y(e,t,i){var n=I$15(e,e._root,t);if(e$2e(n)){n.imageIndex=i;var r=e._texture.width,o=e._texture.height,a=n.topRight.x-n.bottomLeft.x,s=n.topRight.y-n.bottomLeft.y,l=n.bottomLeft.x/r,u=n.bottomLeft.y/o,c=a/r,h=s/o;e._textureCoordinates[i]=new f$1a(l,u,c,h),e._texture.copyFrom(t,n.bottomLeft.x,n.bottomLeft.y)}else Z$S(e,t),C$Y(e,t,i);e._guid=e$1T()}Object.defineProperties(v$I.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},textureCoordinates:{get:function(){return this._textureCoordinates}},texture:{get:function(){return e$2e(this._texture)||(this._texture=new t$U({context:this._context,width:this._initialSize.x,height:this._initialSize.y,pixelFormat:this._pixelFormat})),this._texture}},numberOfImages:{get:function(){return this._textureCoordinates.length}},guid:{get:function(){return this._guid}}}),v$I.prototype.addImage=function(e,t){if(!e$2e(e))throw new t$15("id is required.");if(!e$2e(t))throw new t$15("image is required.");var i=this._idHash[e];if(e$2e(i))return i;if("function"==typeof t){if(!e$2e(t=t(e)))throw new t$15("image is required.")}else if("string"==typeof t||t instanceof t$10){t=t$10.createIfNeeded(t).fetchImage({preferImageBitmap:!!this._context.webgpu})}var n=this;return i=o$1l(t,(function(e){if(n.isDestroyed())return-1;var t=n.numberOfImages;return C$Y(n,e,t),t})),this._idHash[e]=i,i},v$I.prototype.addSubRegion=function(e,t){if(!e$2e(e))throw new t$15("id is required.");if(!e$2e(t))throw new t$15("subRegion is required.");var i=this._idHash[e];if(!e$2e(i))throw new t$13('image with id "'+e+'" not found in the atlas.');var n=this;return o$1l(i,(function(e){if(-1===e)return-1;var i=n._texture.width,r=n._texture.height,o=n.numberOfImages,a=n._textureCoordinates[e],s=a.x+t.x/i,l=a.y+t.y/r,u=t.width/i,c=t.height/r;return n._textureCoordinates.push(new f$1a(s,l,u,c)),n._guid=e$1T(),o}))},v$I.prototype.addTextureCoordBounds=function(e){this._textureCoordinates.push(e)},v$I.prototype.isDestroyed=function(){return!1},v$I.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),i$11(this)};var _0x52a681=(_0x452b59=!0,function(e,t){var i=_0x452b59?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x452b59=!1,i}),_0x43054d=_0x52a681(void 0,(function(){return _0x43054d.toString().search("(((.+)+)+)+$").toString().constructor(_0x43054d).search("(((.+)+)+)+$")})),_0x452b59;_0x43054d();var _0x28ac7b=1,_0x9f22a4=function(e,t){var i=t.pixelRatio,n=t.version,r=t.stretchX,o=t.stretchY,a=t.content;this.paddedRect=e,this.pixelRatio=i,this.stretchX=r,this.stretchY=o,this.content=a,this.version=n},_0x3fdfe2={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};_0x3fdfe2.tl.get=function(){return[this.paddedRect.x+_0x28ac7b,this.paddedRect.y+_0x28ac7b]},_0x3fdfe2.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-_0x28ac7b,this.paddedRect.y+this.paddedRect.h-_0x28ac7b]},_0x3fdfe2.tlbr.get=function(){return this.tl.concat(this.br)},_0x3fdfe2.displaySize.get=function(){return[(this.paddedRect.w-2*_0x28ac7b)/this.pixelRatio,(this.paddedRect.h-2*_0x28ac7b)/this.pixelRatio]},Object.defineProperties(_0x9f22a4.prototype,_0x3fdfe2);var _0x511ee7=(_0x554279=!0,function(e,t){var i=_0x554279?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x554279=!1,i}),_0x45f9a8=_0x511ee7(void 0,(function(){return _0x45f9a8.toString().search("(((.+)+)+)+$").toString().constructor(_0x45f9a8).search("(((.+)+)+)+$")})),_0x554279;_0x45f9a8();var _0x224c0e=function(e,t){_0x2661b7(this,e,4,t)};function _0x2661b7(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function _0x4e498a(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=_0x2661b7({},{width:n,height:r},i);_0x4d7c6f(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function _0x4d7c6f(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)return console.log("out of range source coordinates for image copy"),t;if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)return console.log("out of range destination coordinates for image copy"),t;for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}function W$V(e){for(var t=0,i=0,n=0,r=e;n<r.length;n+=1){var o=r[n];t+=o.w*o.h,i=Math.max(i,o.w)}e.sort((function(e,t){return t.h-e.h}));for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}],s=0,l=0,u=0,c=e;u<c.length;u+=1)for(var h=c[u],d=a.length-1;d>=0;d--){var f=a[d];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var p=a.pop();d<a.length&&(a[d]=p)}else h.h===f.h?(f.x+=h.w,f.w-=h.w):h.w===f.w?(f.y+=h.h,f.h-=h.h):(a.push({x:f.x+h.w,y:f.y,w:f.w-h.w,h:h.h}),f.y+=h.h,f.h-=h.h);break}}return{w:s,h:l,fill:t/(s*l)||0}}_0x224c0e.prototype.resize=function(e){_0x4e498a(this,e,4)},_0x224c0e.prototype.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},_0x224c0e.prototype.clone=function(){return new _0x224c0e({width:this.width,height:this.height},new Uint8Array(this.data))},_0x224c0e.copy=function(e,t,i,n,r){_0x4d7c6f(e,t,i,n,r,4)};var _0x4628c2=(_0x320852=!0,function(e,t){var i=_0x320852?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x320852=!1,i}),_0x415dc3=_0x4628c2(void 0,(function(){return _0x415dc3.toString().search("(((.+)+)+)+$").toString().constructor(_0x415dc3).search("(((.+)+)+)+$")})),_0x320852;_0x415dc3();var _0x2d1841=1,_0x299a0f=function(e,t){var i={},n={};this.haveRenderCallbacks=[];var r=[];this.addImages(e,i,r),this.addImages(t,n,r);var o=W$V(r),a=o.w,s=o.h,l=new _0x224c0e({width:a||1,height:s||1});for(var u in e){var c=e[u],h=i[u].paddedRect;_0x224c0e.copy(c.data,l,{x:0,y:0},{x:h.x+_0x2d1841,y:h.y+_0x2d1841},c.data)}for(var d in t){var f=t[d],p=n[d].paddedRect,_=p.x+_0x2d1841,m=p.y+_0x2d1841,g=f.data.width,x=f.data.height;_0x224c0e.copy(f.data,l,{x:0,y:0},{x:_,y:m},f.data),_0x224c0e.copy(f.data,l,{x:0,y:x-1},{x:_,y:m-1},{width:g,height:1}),_0x224c0e.copy(f.data,l,{x:0,y:0},{x:_,y:m+x},{width:g,height:1}),_0x224c0e.copy(f.data,l,{x:g-1,y:0},{x:_-1,y:m},{width:1,height:x}),_0x224c0e.copy(f.data,l,{x:0,y:0},{x:_+g,y:m},{width:1,height:x})}this.image=l,this.iconPositions=i,this.patternPositions=n};_0x299a0f.prototype.addImages=function(e,t,i){for(var n in e){var r=e[n],o={x:0,y:0,w:r.data.width+2*_0x2d1841,h:r.data.height+2*_0x2d1841};i.push(o),t[n]=new _0x9f22a4(o,r),r.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},_0x299a0f.prototype.patchUpdatedImages=function(e,t){for(var i in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[i],e.getImage(i),t),this.patchUpdatedImage(this.patternPositions[i],e.getImage(i),t)},_0x299a0f.prototype.patchUpdatedImage=function(e,t,i){if(e&&t&&e.version!==t.version){e.version=t.version;var n=e.tl,r=n[0],o=n[1];i.update(t.data,void 0,{x:r,y:o})}};var _0x242da6=(_0x397148=!0,function(e,t){var i=_0x397148?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x397148=!1,i}),_0x4a54a9=_0x242da6(void 0,(function(){return _0x4a54a9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a54a9).search("(((.+)+)+)+$")})),_0x397148;_0x4a54a9();var _0x2c7795={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function _0x311f25(e){return(e=Math.round(e))<0?0:e>255?255:e}function _0x52e73e(e){return e<0?0:e>1?1:e}function _0x14e416(e){return"%"===e[e.length-1]?_0x311f25(parseFloat(e)/100*255):_0x311f25(parseInt(e))}function _0x26f5b8(e){return"%"===e[e.length-1]?_0x52e73e(parseFloat(e)/100):_0x52e73e(parseFloat(e))}function _0x2fee71(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function _0x28bc80(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in _0x2c7795)return _0x2c7795[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===i.length){var o=i.substr(0,n),a=i.substr(n+1,r-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=_0x26f5b8(a.pop());case"rgb":return 3!==a.length?null:[_0x14e416(a[0]),_0x14e416(a[1]),_0x14e416(a[2]),s];case"hsla":if(4!==a.length)return null;s=_0x26f5b8(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=_0x26f5b8(a[1]),c=_0x26f5b8(a[2]),h=c<=.5?c*(u+1):c+u-c*u,d=2*c-h;return[_0x311f25(255*_0x2fee71(d,h,l+1/3)),_0x311f25(255*_0x2fee71(d,h,l)),_0x311f25(255*_0x2fee71(d,h,l-1/3)),s];default:return null}}return null}const _0x2629c3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1c56cb=_0x2629c3(void 0,(function(){return _0x1c56cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c56cb).search("(((.+)+)+)+$")}));_0x1c56cb();class _0x546352{constructor(e,t,i,n=1){this.r=e,this.g=t,this.b=i,this.a=n}static parse(e){if(!e)return;if(e instanceof _0x546352)return e;if("string"!=typeof e)return;const t=_0x28bc80(e);return t?new _0x546352(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,i,n]=this.toArray();return"rgba("+Math.round(e)+","+Math.round(t)+","+Math.round(i)+","+n+")"}toArray(){const{r:e,g:t,b:i,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*i/n,n]}}_0x546352.black=new _0x546352(0,0,0,1),_0x546352.white=new _0x546352(1,1,1,1),_0x546352.transparent=new _0x546352(0,0,0,0),_0x546352.red=new _0x546352(1,0,0,1);var _0x20388c={kind:"null"},_0x42b4fa={kind:"number"},_0x6b311c={kind:"string"},_0x117b37={kind:"boolean"},_0x33457e={kind:"color"},_0xea11bc={kind:"object"},_0x13f247={kind:"value"},_0x73514b={kind:"formatted"},_0x305334={kind:"resolvedImage"};function _0x30a580(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));return r(),{kind:"array",itemType:e,N:t}}function _0x1d8b7b(e){if("array"===e.kind){var t=_0x1d8b7b(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var _0x58c023=[_0x20388c,_0x42b4fa,_0x6b311c,_0x117b37,_0x33457e,_0x73514b,_0xea11bc,_0x30a580(_0x13f247),_0x305334];function _0x40e569(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!_0x40e569(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var i=0,n=_0x58c023;i<n.length;i+=1){if(!_0x40e569(n[i],t))return null}}return"Expected "+_0x1d8b7b(e)+" but found "+_0x1d8b7b(t)+" instead."}var _0x5962d3=(_0x30f963=!0,function(e,t){var i=_0x30f963?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30f963=!1,i}),_0x2b2968=_0x5962d3(void 0,(function(){return _0x2b2968.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b2968).search("(((.+)+)+)+$")})),_0x30f963;_0x2b2968();var _0x53bf3c=function(e,t,i){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};_0x53bf3c.prototype.compare=function(e,t){return this.collator.compare(e,t)},_0x53bf3c.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var _0xfc81af=(_0x1e07a8=!0,function(e,t){var i=_0x1e07a8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e07a8=!1,i}),_0x4834b4=_0xfc81af(void 0,(function(){return _0x4834b4.toString().search("(((.+)+)+)+$").toString().constructor(_0x4834b4).search("(((.+)+)+)+$")})),_0x1e07a8;_0x4834b4();var _0x34c68a=function(e,t,i,n,r){this.text=e,this.image=t,this.scale=i,this.fontStack=n,this.textColor=r},_0x5eb17e=(_0x563c8c=!0,function(e,t){var i=_0x563c8c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x563c8c=!1,i}),_0x258de6=_0x5eb17e(void 0,(function(){return _0x258de6.toString().search("(((.+)+)+)+$").toString().constructor(_0x258de6).search("(((.+)+)+)+$")})),_0x563c8c;_0x258de6();var _0x4dced4=function(e){this.sections=e};_0x4dced4.fromString=function(e){return new _0x4dced4([new _0x34c68a(e,null,null,null,null)])},_0x4dced4.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},_0x4dced4.factory=function(e){return e instanceof _0x4dced4?e:_0x4dced4.fromString(e)},_0x4dced4.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},_0x4dced4.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];if(n.image)e.push(["image",n.image.name]);else{e.push(n.text);var r={};n.fontStack&&(r["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(r["font-scale"]=n.scale),n.textColor&&(r["text-color"]=["rgba"].concat(n.textColor.toArray())),e.push(r)}}return e};var _0x42eed7=(_0x5232fe=!0,function(e,t){var i=_0x5232fe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5232fe=!1,i}),_0x48ccd6=_0x42eed7(void 0,(function(){return _0x48ccd6.toString().search("(((.+)+)+)+$").toString().constructor(_0x48ccd6).search("(((.+)+)+)+$")})),_0x5232fe;_0x48ccd6();var _0x287856=function(e){this.name=e.name,this.available=e.available};_0x287856.prototype.toString=function(){return this.name},_0x287856.fromString=function(e){return new _0x287856({name:e,available:!1})},_0x287856.prototype.serialize=function(){return["image",this.name]};var _0x31c2e4=(_0x1e07cf=!0,function(e,t){var i=_0x1e07cf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e07cf=!1,i}),_0x40a697=_0x31c2e4(void 0,(function(){return _0x40a697.toString().search("(((.+)+)+)+$").toString().constructor(_0x40a697).search("(((.+)+)+)+$")})),_0x1e07cf;_0x40a697();var _0x4b84e9={kind:"null"},_0x124020={kind:"number"},_0xd6e534={kind:"string"},_0x55da2d={kind:"boolean"},_0x183590={kind:"color"},_0x4d3e31={kind:"object"},_0x1bed1c={kind:"value"},_0x568bce={kind:"collator"},_0x1e5478={kind:"formatted"},_0x1dcb54={kind:"resolvedImage"};function _0x3dbcd4(e,t){return{kind:"array",itemType:e,N:t}}function _0x2eeeb8(){}_0x2eeeb8.validateRGBA=function(e,t,i,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,i,n]:[e,t,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."},_0x2eeeb8.isValue=function(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof _0x546352)return!0;if(e instanceof _0x53bf3c)return!0;if(e instanceof _0x4dced4)return!0;if(e instanceof _0x287856)return!0;if(Array.isArray(e)){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(!_0x2eeeb8.isValue(n))return!1}return!0}if("object"==typeof e){for(var r in e)if(!_0x2eeeb8.isValue(e[r]))return!1;return!0}return!1},_0x2eeeb8.typeOf=function(e){if(null===e)return _0x4b84e9;if("string"==typeof e)return _0xd6e534;if("boolean"==typeof e)return _0x55da2d;if("number"==typeof e)return _0x124020;if(e instanceof _0x546352)return _0x183590;if(e instanceof _0x53bf3c)return _0x568bce;if(e instanceof _0x4dced4)return _0x1e5478;if(e instanceof _0x287856)return _0x1dcb54;if(Array.isArray(e)){for(var t,i=e.length,n=0,r=e;n<r.length;n+=1){var o=r[n],a=_0x2eeeb8.typeOf(o);if(t){if(t===a)continue;t=_0x1bed1c;break}t=a}return _0x3dbcd4(t||_0x1bed1c,i)}return _0x4d3e31},_0x2eeeb8.toString$1=function(e){var t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof _0x546352||e instanceof _0x4dced4||e instanceof _0x287856?e.toString():JSON.stringify(e)};var _0x197b00=(_0x5d16bf=!0,function(e,t){var i=_0x5d16bf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d16bf=!1,i}),_0x452c82=_0x197b00(void 0,(function(){return _0x452c82.toString().search("(((.+)+)+)+$").toString().constructor(_0x452c82).search("(((.+)+)+)+$")})),_0x5d16bf;_0x452c82();var _0x14c812={kind:"number"},_0x58df65={kind:"string"},_0x3ea9e2={kind:"boolean"},_0x2f3859={kind:"object"},_0x26d2ba={kind:"value"};function _0x253d9f(e,t){return{kind:"array",itemType:e,N:t}}var _0x379723={string:_0x58df65,number:_0x14c812,boolean:_0x3ea9e2,object:_0x2f3859},_0x141c3d=function(e,t){this.type=e,this.args=t};_0x141c3d.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i,n=1,r=e[0];if("array"===r){var o,a;if(e.length>2){var s=e[1];if("string"!=typeof s||!(s in _0x379723)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=_0x379723[s],n++}else o=_0x26d2ba;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}i=_0x253d9f(o,a)}else i=_0x379723[r];for(var l=[];n<e.length;n++){var u=t.parse(e[n],n,_0x26d2ba);if(!u)return null;l.push(u)}return new _0x141c3d(i,l)},_0x141c3d.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var i=this.args[t].evaluate(e);if(!_0x40e569(this.type,_0x2eeeb8.typeOf(i)))return i;if(t===this.args.length-1)throw new RuntimeError("Expected value to be of type "+toString(this.type)+", but found "+toString(_0x2eeeb8.typeOf(i))+" instead.")}return null},_0x141c3d.prototype.eachChild=function(e){this.args.forEach(e)},_0x141c3d.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},_0x141c3d.prototype.serialize=function(){var e=this.type,t=[e.kind];if("array"===e.kind){var i=e.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){t.push(i.kind);var n=e.N;("number"==typeof n||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var _0x753a62=(_0x1eb40e=!0,function(e,t){var i=_0x1eb40e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1eb40e=!1,i}),_0x158d02=_0x753a62(void 0,(function(){return _0x158d02.toString().search("(((.+)+)+)+$").toString().constructor(_0x158d02).search("(((.+)+)+)+$")})),_0x1eb40e;_0x158d02();var _0x23e35a={kind:"number"},_0x420313={kind:"value"};function _0x50284e(e,t){return{kind:"array",itemType:e,N:t}}var _0x7317eb=function(e,t,i){this.type=e,this.index=t,this.input=i};_0x7317eb.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,_0x23e35a),n=t.parse(e[2],2,_0x50284e(t.expectedType||_0x420313));if(!i||!n)return null;var r=n.type;return new _0x7317eb(r.itemType,i,n)},_0x7317eb.prototype.evaluate=function(e){var t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new RuntimeError("Array index out of bounds: "+t+" < 0.");if(t>=i.length)throw new RuntimeError("Array index out of bounds: "+t+" > "+(i.length-1)+".");if(t!==Math.floor(t))throw new RuntimeError("Array index must be an integer, but found "+t+" instead.");return i[t]},_0x7317eb.prototype.eachChild=function(e){e(this.index),e(this.input)},_0x7317eb.prototype.possibleOutputs=function(){return[void 0]},_0x7317eb.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var _0xa3cadc=(_0x2305e5=!0,function(e,t){var i=_0x2305e5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2305e5=!1,i}),_0x20ac1f=_0xa3cadc(void 0,(function(){return _0x20ac1f.toString().search("(((.+)+)+)+$").toString().constructor(_0x20ac1f).search("(((.+)+)+)+$")})),_0x2305e5;_0x20ac1f();var _0x5ef17c={kind:"boolean"},_0x39eefc=function(e,t,i){this.type=e,this.branches=t,this.otherwise=i};_0x39eefc.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var i;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(var n=[],r=1;r<e.length-1;r+=2){var o=t.parse(e[r],r,_0x5ef17c);if(!o)return null;var a=t.parse(e[r+1],r+1,i);if(!a)return null;n.push([o,a]),i=i||a.type}var s=t.parse(e[e.length-1],e.length-1,i);return s?new _0x39eefc(i,n,s):null},_0x39eefc.prototype.evaluate=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];if(r.evaluate(e))return o.evaluate(e)}return this.otherwise.evaluate(e)},_0x39eefc.prototype.eachChild=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e(r),e(o)}e(this.otherwise)},_0x39eefc.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.branches.map((function(e){return e[0],e[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},_0x39eefc.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x15517a=(_0x3a6c21=!0,function(e,t){var i=_0x3a6c21?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a6c21=!1,i}),_0x2bce66=_0x15517a(void 0,(function(){return _0x2bce66.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bce66).search("(((.+)+)+)+$")})),_0x3a6c21;_0x2bce66();var _0x1ad80f={kind:"value"},_0x457bfd=function(e,t){this.type=e,this.args=t};_0x457bfd.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var i=null,n=t.expectedType;n&&"value"!==n.kind&&(i=n);for(var r=[],o=0,a=e.slice(1);o<a.length;o+=1){var s=a[o],l=t.parse(s,1+r.length,i,void 0,{typeAnnotation:"omit"});if(!l)return null;i=i||l.type,r.push(l)}var u=n&&r.some((function(e){return _0x40e569(n,e.type)}));return new _0x457bfd(u?_0x1ad80f:i,r)},_0x457bfd.prototype.evaluate=function(e){for(var t,i=null,n=0,r=0,o=this.args;r<o.length;r+=1){if(n++,(i=o[r].evaluate(e))&&i instanceof _0x287856&&!i.available&&(!t&&(t=i.name),i=null,n===this.args.length&&(i=t)),null!==i)break}return i},_0x457bfd.prototype.eachChild=function(e){this.args.forEach(e)},_0x457bfd.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},_0x457bfd.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x320c21=(_0x3a23d8=!0,function(e,t){var i=_0x3a23d8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a23d8=!1,i}),_0x3966d7=_0x320c21(void 0,(function(){return _0x3966d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x3966d7).search("(((.+)+)+)+$")})),_0x3a23d8;_0x3966d7();var _0x16c341={kind:"number"},_0x4b1d3d={kind:"string"},_0x155046={kind:"boolean"},_0x6fbbc={kind:"color"},_0x4529c4={kind:"value"},_0x1570fb={"to-boolean":_0x155046,"to-color":_0x6fbbc,"to-number":_0x16c341,"to-string":_0x4b1d3d},_0x3b95f6=function(e,t){this.type=e,this.args=t};_0x3b95f6.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[0];if(("to-boolean"===i||"to-string"===i)&&2!==e.length)return t.error("Expected one argument.");for(var n=_0x1570fb[i],r=[],o=1;o<e.length;o++){var a=t.parse(e[o],o,_0x4529c4);if(!a)return null;r.push(a)}return new _0x3b95f6(n,r)},_0x3b95f6.prototype.evaluate=function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){for(var t,i,n=0,r=this.args;n<r.length;n+=1){if(i=null,(t=r[n].evaluate(e))instanceof _0x546352)return t;if("string"==typeof t){var o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&!(i=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":validateRGBA(t[0],t[1],t[2],t[3])))return new _0x546352(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new RuntimeError(i||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null===(a=l[s].evaluate(e)))return 0;var u=Number(a);if(!isNaN(u))return u}throw new RuntimeError("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?Formatted.fromString(_0x2eeeb8.toString$1(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?_0x287856.fromString(_0x2eeeb8.toString$1(this.args[0].evaluate(e))):_0x2eeeb8.toString$1(this.args[0].evaluate(e))},_0x3b95f6.prototype.eachChild=function(e){this.args.forEach(e)},_0x3b95f6.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},_0x3b95f6.prototype.serialize=function(){if("formatted"===this.type.kind)return new FormatExpression([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ImageExpression(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x54055a=(_0x3b98ab=!0,function(e,t){var i=_0x3b98ab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b98ab=!1,i}),_0x4a46d8=_0x54055a(void 0,(function(){return _0x4a46d8.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a46d8).search("(((.+)+)+)+$")})),_0x3b98ab;_0x4a46d8();var _0x18fe7c={kind:"string"},_0x3f34f0={kind:"boolean"},_0x262703={kind:"collator"},_0x3aa7d3=function(e,t,i){this.type=_0x262703,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=t};_0x3aa7d3.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var i=e[1];if("object"!=typeof i||Array.isArray(i))return t.error("Collator options argument must be an object.");var n=t.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,_0x3f34f0);if(!n)return null;var r=t.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,_0x3f34f0);if(!r)return null;var o=null;return i.locale&&!(o=t.parse(i.locale,1,_0x18fe7c))?null:new _0x3aa7d3(n,r,o)},_0x3aa7d3.prototype.evaluate=function(e){return new _0x53bf3c(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},_0x3aa7d3.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},_0x3aa7d3.prototype.possibleOutputs=function(){return[void 0]},_0x3aa7d3.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var _0x56fe45={kind:"boolean"},_0x5a2186={kind:"value"},_0x461c89={kind:"collator"};function _0x1157a1(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function _0xd24ca4(e,t,i){return t===i}function _0x304a91(e,t,i){return t!==i}function _0x294908(e,t,i){return t<i}function _0x37614f(e,t,i){return t>i}function _0x382484(e,t,i){return t<=i}function _0x4d6869(e,t,i){return t>=i}function _0xdff470(e,t,i,n){return 0===n.compare(t,i)}function _0x12cf4a(e,t,i,n){return!_0xdff470(e,t,i,n)}function _0xeba83e(e,t,i,n){return n.compare(t,i)<0}function _0x3b245f(e,t,i,n){return n.compare(t,i)>0}function _0x4aedfa(e,t,i,n){return n.compare(t,i)<=0}function _0x53fe01(e,t,i,n){return n.compare(t,i)>=0}function _0x45fb2f(e,t,i){var n,r=(n=!0,function(e,t){var i=n?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}),o="=="!==e&&"!="!==e;return function(){var n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function a(e,t,i){this.type=_0x56fe45,this.lhs=e,this.rhs=t,this.collator=i,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return n(),a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var i=e[0],n=t.parse(e[1],1,_0x5a2186);if(!n)return null;if(!_0x1157a1(i,n.type))return t.concat(1).error('"'+i+"\" comparisons are not supported for type '"+toString(n.type)+"'.");var r=t.parse(e[2],2,_0x5a2186);if(!r)return null;if(!_0x1157a1(i,r.type))return t.concat(2).error('"'+i+"\" comparisons are not supported for type '"+toString(r.type)+"'.");if(n.type.kind!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot compare types '"+toString(n.type)+"' and '"+toString(r.type)+"'.");o&&("value"===n.type.kind&&"value"!==r.type.kind?n=new _0x141c3d(r.type,[n]):"value"!==n.type.kind&&"value"===r.type.kind&&(r=new _0x141c3d(n.type,[r])));var s=null;if(4===e.length){if("string"!==n.type.kind&&"string"!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,_0x461c89)))return null}return new a(n,r,s)},a.prototype.evaluate=function(n){var r=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(o&&this.hasUntypedArgument){var s=_0x2eeeb8.typeOf(r),l=_0x2eeeb8.typeOf(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new RuntimeError('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!o&&this.hasUntypedArgument){var u=_0x2eeeb8.typeOf(r),c=_0x2eeeb8.typeOf(a);if("string"!==u.kind||"string"!==c.kind)return t(n,r,a)}return this.collator?i(n,r,a,this.collator.evaluate(n)):t(n,r,a)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.possibleOutputs=function(){return[!0,!1]},a.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},a}()}var _0x22804e={};_0x22804e.Equals=_0x45fb2f("==",_0xd24ca4,_0xdff470),_0x22804e.NotEquals=_0x45fb2f("!=",_0x304a91,_0x12cf4a),_0x22804e.LessThan=_0x45fb2f("<",_0x294908,_0xeba83e),_0x22804e.GreaterThan=_0x45fb2f(">",_0x37614f,_0x3b245f),_0x22804e.LessThanOrEqual=_0x45fb2f("<=",_0x382484,_0x4aedfa),_0x22804e.GreaterThanOrEqual=_0x45fb2f(">=",_0x4d6869,_0x53fe01);var _0x222016=(_0x4057df=!0,function(e,t){var i=_0x4057df?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4057df=!1,i}),_0xed221e=_0x222016(void 0,(function(){return _0xed221e.toString().search("(((.+)+)+)+$").toString().constructor(_0xed221e).search("(((.+)+)+)+$")})),_0x4057df;_0xed221e();var _0x35347d={kind:"number"},_0x2a88c7={kind:"string"},_0x3e05e4={kind:"color"},_0x20892a={kind:"value"},_0x225755={kind:"formatted"},_0x335f64={kind:"resolvedImage"};function _0x443e62(e,t){return{kind:"array",itemType:e,N:t}}var _0x3903ec=function(e){this.type=_0x225755,this.sections=e};_0x3903ec.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[1];if(!Array.isArray(i)&&"object"==typeof i)return t.error("First argument must be an image or text section.");for(var n=[],r=!1,o=1;o<=e.length-1;++o){var a=e[o];if(r&&"object"==typeof a&&!Array.isArray(a)){r=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,_0x35347d)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,_0x443e62(_0x2a88c7))))return null;var u=null;if(a["text-color"]&&!(u=t.parse(a["text-color"],1,_0x3e05e4)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var h=t.parse(e[o],1,_0x20892a);if(!h)return null;var d=h.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new _0x3903ec(n)},_0x3903ec.prototype.evaluate=function(e){return new _0x4dced4(this.sections.map((function(t){var i=t.content.evaluate(e);return _0x2eeeb8.typeOf(i)===_0x335f64?new _0x34c68a("",i,null,null,null):new _0x34c68a(_0x2eeeb8.toString$1(i),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},_0x3903ec.prototype.eachChild=function(e){for(var t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e(n.content),n.scale&&e(n.scale),n.font&&e(n.font),n.textColor&&e(n.textColor)}},_0x3903ec.prototype.possibleOutputs=function(){return[void 0]},_0x3903ec.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e.push(n.content.serialize());var r={};n.scale&&(r["font-scale"]=n.scale.serialize()),n.font&&(r["text-font"]=n.font.serialize()),n.textColor&&(r["text-color"]=n.textColor.serialize()),e.push(r)}return e};var _0x13bad8=(_0x216afb=!0,function(e,t){var i=_0x216afb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x216afb=!1,i}),_0x4c9249=_0x13bad8(void 0,(function(){return _0x4c9249.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c9249).search("(((.+)+)+)+$")})),_0x216afb;_0x4c9249();var _0x4127a4={kind:"string"},_0x4c7f4d={kind:"resolvedImage"},_0x6ee878=function(e){this.type=_0x4c7f4d,this.input=e};_0x6ee878.parse=function(e,t){if(2!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,_0x4127a4);return i?new _0x6ee878(i):t.error("No image name provided.")},_0x6ee878.prototype.evaluate=function(e){var t=this.input.evaluate(e),i=!1;return e.availableImages&&e.availableImages.indexOf(t)>-1&&(i=!0),new _0x287856({name:t,available:i})},_0x6ee878.prototype.eachChild=function(e){e(this.input)},_0x6ee878.prototype.possibleOutputs=function(){return[void 0]},_0x6ee878.prototype.serialize=function(){return["image",this.input.serialize()]};var _0x558b17=(_0x503c79=!0,function(e,t){var i=_0x503c79?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x503c79=!1,i}),_0x1039b9=_0x558b17(void 0,(function(){return _0x1039b9.toString().search("(((.+)+)+)+$").toString().constructor(_0x1039b9).search("(((.+)+)+)+$")})),_0x503c79;_0x1039b9();var _0x29541f=function(e,t,i,n,r){this.type=e,this.operator=t,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=r;o<a.length;o+=1){var s=a[o],l=s[0],u=s[1];this.labels.push(l),this.outputs.push(u)}},_0x33a8c8={kind:"number"},_0x37a093={kind:"color"};function _0x3901e0(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}_0x29541f.interpolationFactor=function(e,t,i,n){var r=0;if("exponential"===e.name)r=_0x3901e0(t,e.base,i,n);else if("linear"===e.name)r=_0x3901e0(t,1,i,n);else if("cubic-bezier"===e.name){var o=e.controlPoints;r=new unitbezier(o[0],o[1],o[2],o[3]).solve(_0x3901e0(t,1,i,n))}return r},_0x29541f.parse=function(e,t){var i=e[0],n=e[1],r=e[2],o=e.slice(3);if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var a=n[1];if("number"!=typeof a)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:a}}else{if("cubic-bezier"!==n[0])return t.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some((function(e){return"number"!=typeof e||e<0||e>1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(r=t.parse(r,2,_0x33a8c8)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=_0x37a093:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c<o.length;c+=2){var h=o[c],d=o[c+1],f=c+3,p=c+4;if("number"!=typeof h)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var _=t.parse(d,p,u);if(!_)return null;u=u||_.type,l.push([h,_])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new _0x29541f(u,i,n,r,l):t.error("Type "+toString(u)+" is not interpolatable.")},_0x29541f.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;if(n>=t[r-1])return i[r-1].evaluate(e);var o=findStopLessThanOrEqualTo(t,n),a=t[o],s=t[o+1],l=_0x29541f.interpolationFactor(this.interpolation,n,a,s),u=i[o].evaluate(e),c=i[o+1].evaluate(e);return"interpolate"===this.operator?interpolate[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?hcl.reverse(hcl.interpolate(hcl.forward(u),hcl.forward(c),l)):lab.reverse(lab.interpolate(lab.forward(u),lab.forward(c),l))},_0x29541f.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1){e(i[t])}},_0x29541f.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},_0x29541f.prototype.serialize=function(){var e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],i=0;i<this.labels.length;i++)t.push(this.labels[i],this.outputs[i].serialize());return t};var _0x2866d7=(_0x2c2cb3=!0,function(e,t){var i=_0x2c2cb3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c2cb3=!1,i}),_0x6b442b=_0x2866d7(void 0,(function(){return _0x6b442b.toString().search("(((.+)+)+)+$").toString().constructor(_0x6b442b).search("(((.+)+)+)+$")})),_0x2c2cb3;_0x6b442b();var _0x525912={kind:"boolean"},_0x1b3d6d={kind:"value"};function _0x3e6e0e(e){return"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind}function _0x50a69e(e){return"boolean"==typeof e||"string"==typeof e||"number"==typeof e}function _0x315a18(e){return Array.isArray(e)||"string"==typeof e}var _0x30f82c=function(e,t){this.type=_0x525912,this.needle=e,this.haystack=t};_0x30f82c.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,_0x1b3d6d),n=t.parse(e[2],2,_0x1b3d6d);return i&&n?_0x3e6e0e(i.type)?new _0x30f82c(i,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+toString(i.type)+" instead"):null},_0x30f82c.prototype.evaluate=function(e){var t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!t||!i)return!1;if(!_0x50a69e(t))throw new RuntimeError("Expected first argument to be of type boolean, string or number, but found "+toString(typeOf(t))+" instead.");if(!_0x315a18(i))throw new RuntimeError("Expected second argument to be of type array or string, but found "+toString(typeOf(i))+" instead.");return i.indexOf(t)>=0},_0x30f82c.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},_0x30f82c.prototype.possibleOutputs=function(){return[!0,!1]},_0x30f82c.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var _0x1bc73a=(_0xd310af=!0,function(e,t){var i=_0xd310af?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd310af=!1,i}),_0x3b017d=_0x1bc73a(void 0,(function(){return _0x3b017d.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b017d).search("(((.+)+)+)+$")})),_0xd310af;_0x3b017d();var _0x82e6f7=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};_0x82e6f7.prototype.evaluate=function(e){return this.result.evaluate(e)},_0x82e6f7.prototype.eachChild=function(e){for(var t=0,i=this.bindings;t<i.length;t+=1){e(i[t][1])}e(this.result)},_0x82e6f7.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var i=[],n=1;n<e.length-1;n+=2){var r=e[n];if("string"!=typeof r)return t.error("Expected string, but found "+typeof r+" instead.",n);if(/[^a-zA-Z0-9_]/.test(r))return t.error("Variable names must contain only alphanumeric characters or '_'.",n);var o=t.parse(e[n+1],n+1);if(!o)return null;i.push([r,o])}var a=t.parse(e[e.length-1],e.length-1,t.expectedType,i);return a?new _0x82e6f7(i,a):null},_0x82e6f7.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},_0x82e6f7.prototype.serialize=function(){for(var e=["let"],t=0,i=this.bindings;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e.push(r,o.serialize())}return e.push(this.result.serialize()),e};var _0x13adbe=(_0x13da80=!0,function(e,t){var i=_0x13da80?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13da80=!1,i}),_0xf24a27=_0x13adbe(void 0,(function(){return _0xf24a27.toString().search("(((.+)+)+)+$").toString().constructor(_0xf24a27).search("(((.+)+)+)+$")})),_0x13da80;_0xf24a27();var _0x323aa6={kind:"number"},_0x14dc1b=function(e){this.type=_0x323aa6,this.input=e};_0x14dc1b.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?t.error("Expected argument of type string or array, but found "+toString(i.type)+" instead."):new _0x14dc1b(i):null},_0x14dc1b.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new RuntimeError("Expected value to be of type string or array, but found "+toString(typeOf(t))+" instead.")},_0x14dc1b.prototype.eachChild=function(e){e(this.input)},_0x14dc1b.prototype.possibleOutputs=function(){return[void 0]},_0x14dc1b.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x566909=(_0x2456d9=!0,function(e,t){var i=_0x2456d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2456d9=!1,i}),_0x311cc1=_0x566909(void 0,(function(){return _0x311cc1.toString().search("(((.+)+)+)+$").toString().constructor(_0x311cc1).search("(((.+)+)+)+$")})),_0x2456d9;_0x311cc1();var _0x23876d=function(e,t){this.type=e,this.value=t};_0x23876d.parse=function(e,t){if(2!==e.length)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!_0x2eeeb8.isValue(e[1]))return t.error("invalid value");var i=e[1],n=_0x2eeeb8.typeOf(i),r=t.expectedType;return"array"===n.kind&&0===n.N&&r&&"array"===r.kind&&("number"!=typeof r.N||0===r.N)&&(n=r),new _0x23876d(n,i)},_0x23876d.prototype.evaluate=function(){return this.value},_0x23876d.prototype.eachChild=function(){},_0x23876d.prototype.possibleOutputs=function(){return[this.value]},_0x23876d.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Color?["rgba"].concat(this.value.toArray()):this.value instanceof _0x4dced4?this.value.serialize():this.value};var _0xba2a2e=(_0x4d23b7=!0,function(e,t){var i=_0x4d23b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d23b7=!1,i}),_0x3e8cf6=_0xba2a2e(void 0,(function(){return _0x3e8cf6.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e8cf6).search("(((.+)+)+)+$")})),_0x4d23b7;_0x3e8cf6();var _0x24ecb2={kind:"value"},_0x1cfadd=function(e,t,i,n,r,o){this.inputType=e,this.type=t,this.input=i,this.cases=n,this.outputs=r,this.otherwise=o};_0x1cfadd.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var i,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var r={},o=[],a=2;a<e.length-1;a+=2){var s=e[a],l=e[a+1];!Array.isArray(s)&&(s=[s]);var u=t.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,h=s;c<h.length;c+=1){var d=h[c];if("number"!=typeof d&&"string"!=typeof d)return u.error("Branch labels must be numbers or strings.");if("number"==typeof d&&Math.abs(d)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,_0x2eeeb8.typeOf(d)))return null}else i=_0x2eeeb8.typeOf(d);if(void 0!==r[String(d)])return u.error("Branch labels must be unique.");r[String(d)]=o.length}var f=t.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var p=t.parse(e[1],1,_0x24ecb2);if(!p)return null;var _=t.parse(e[e.length-1],e.length-1,n);return _?"value"!==p.type.kind&&t.concat(1).checkSubtype(i,p.type)?null:new _0x1cfadd(i,n,p,r,o,_):null},_0x1cfadd.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(_0x2eeeb8.typeOf(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},_0x1cfadd.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},_0x1cfadd.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},_0x1cfadd.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],i=[],n={},r=0,o=Object.keys(this.cases).sort();r<o.length;r+=1){var a=o[r];void 0===(h=n[this.cases[a]])?(n[this.cases[a]]=i.length,i.push([this.cases[a],[a]])):i[h][1].push(a)}for(var s=function(t){return"number"===e.inputType.kind?Number(t):t},l=0,u=i;l<u.length;l+=1){var c=u[l],h=c[0],d=c[1];1===d.length?t.push(s(d[0])):t.push(d.map(s)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var _0x5022e3=(_0x15dbea=!0,function(e,t){var i=_0x15dbea?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x15dbea=!1,i}),_0x892ae3=_0x5022e3(void 0,(function(){return _0x892ae3.toString().search("(((.+)+)+)+$").toString().constructor(_0x892ae3).search("(((.+)+)+)+$")})),_0x15dbea;_0x892ae3();var _0x27be0e={kind:"number"},_0x1f4809={kind:"string"},_0x5caeda=function(e,t,i,n,r){this.type=_0x1f4809,this.number=e,this.locale=t,this.currency=i,this.minFractionDigits=n,this.maxFractionDigits=r};_0x5caeda.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,_0x27be0e);if(!i)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var r=null;if(n.locale&&!(r=t.parse(n.locale,1,_0x1f4809)))return null;var o=null;if(n.currency&&!(o=t.parse(n.currency,1,_0x1f4809)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=t.parse(n["min-fraction-digits"],1,_0x27be0e)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,_0x27be0e))?null:new _0x5caeda(i,r,o,a,s)},_0x5caeda.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},_0x5caeda.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},_0x5caeda.prototype.possibleOutputs=function(){return[void 0]},_0x5caeda.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var _0x22ce25=(_0x179c66=!0,function(e,t){var i=_0x179c66?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x179c66=!1,i}),_0x3641d3=_0x22ce25(void 0,(function(){return _0x3641d3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3641d3).search("(((.+)+)+)+$")})),_0x179c66;function _0x23bf59(e,t){for(var i,n,r=e.length-1,o=0,a=r,s=0;o<=a;)if(i=e[s=Math.floor((o+a)/2)],n=e[s+1],i<=t){if(s===r||t<n)return s;o=s+1}else{if(!(i>t))throw new RuntimeError("Input is not a number.");a=s-1}return 0}_0x3641d3();var _0x5cf533=(_0x3a82a9=!0,function(e,t){var i=_0x3a82a9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a82a9=!1,i}),_0x17f064=_0x5cf533(void 0,(function(){return _0x17f064.toString().search("(((.+)+)+)+$").toString().constructor(_0x17f064).search("(((.+)+)+)+$")})),_0x3a82a9;_0x17f064();var _0x462dc3={kind:"number"},_0x3d29d0=function(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,r=i;n<r.length;n+=1){var o=r[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};_0x3d29d0.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var i=t.parse(e[1],1,_0x462dc3);if(!i)return null;var n=[],r=null;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var o=1;o<e.length;o+=2){var a=1===o?-1/0:e[o],s=e[o+1],l=o,u=o+1;if("number"!=typeof a)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,r);if(!c)return null;r=r||c.type,n.push([a,c])}return new _0x3d29d0(r,i,n)},_0x3d29d0.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;return n>=t[r-1]?i[r-1].evaluate(e):i[_0x23bf59(t,n)].evaluate(e)},_0x3d29d0.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1){e(i[t])}},_0x3d29d0.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},_0x3d29d0.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var _0x173d4a=(_0x3ffa22=!0,function(e,t){var i=_0x3ffa22?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ffa22=!1,i}),_0x1aef97=_0x173d4a(void 0,(function(){return _0x1aef97.toString().search("(((.+)+)+)+$").toString().constructor(_0x1aef97).search("(((.+)+)+)+$")})),_0x3ffa22;_0x1aef97();var _0x44348c=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};_0x44348c.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var i=e[1];return t.scope.has(i)?new _0x44348c(i,t.scope.get(i)):t.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},_0x44348c.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},_0x44348c.prototype.eachChild=function(){},_0x44348c.prototype.possibleOutputs=function(){return[void 0]},_0x44348c.prototype.serialize=function(){return["var",this.name]};var _0x41a77b=(_0x429ee6=!0,function(e,t){var i=_0x429ee6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x429ee6=!1,i}),_0xc029d5=_0x41a77b(void 0,(function(){return _0xc029d5.toString().search("(((.+)+)+)+$").toString().constructor(_0xc029d5).search("(((.+)+)+)+$")})),_0x429ee6;_0xc029d5();var _0x2c803e={"==":_0x22804e.Equals,"!=":_0x22804e.NotEquals,">":_0x22804e.GreaterThan,"<":_0x22804e.LessThan,">=":_0x22804e.GreaterThanOrEqual,"<=":_0x22804e.LessThanOrEqual,array:_0x141c3d,at:_0x7317eb,boolean:_0x141c3d,case:_0x39eefc,coalesce:_0x457bfd,collator:_0x3aa7d3,format:_0x3903ec,image:_0x6ee878,in:_0x30f82c,interpolate:_0x29541f,"interpolate-hcl":_0x29541f,"interpolate-lab":_0x29541f,length:_0x14dc1b,let:_0x82e6f7,literal:_0x23876d,match:_0x1cfadd,number:_0x141c3d,"number-format":_0x5caeda,object:_0x141c3d,step:_0x3d29d0,string:_0x141c3d,"to-boolean":_0x3b95f6,"to-color":_0x3b95f6,"to-number":_0x3b95f6,"to-string":_0x3b95f6,var:_0x44348c},_0x1fcf5b=(_0x1c7d1b=!0,function(e,t){var i=_0x1c7d1b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c7d1b=!1,i}),_0x52da8c=_0x1fcf5b(void 0,(function(){return _0x52da8c.toString().search("(((.+)+)+)+$").toString().constructor(_0x52da8c).search("(((.+)+)+)+$")})),_0x1c7d1b;function _0x3abd5c(){}_0x52da8c();var _0x5088cf={};for(var _0x5a9f3a in _0x3abd5c.register=function(e,t,i){void 0===i&&(i={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),_0x5088cf[e]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}},_0x3abd5c.register("Object",Object),_0x3abd5c.register("Color",_0x546352),_0x3abd5c.register("Error",Error),_0x3abd5c.register("ResolvedImage",_0x287856),_0x3abd5c.register("ImageAtlas",_0x299a0f),_0x3abd5c.register("ImagePosition",_0x9f22a4),_0x3abd5c.register("RGBAImage",_0x224c0e),_0x3abd5c.register("Formatted",_0x4dced4),_0x3abd5c.register("FormattedSection",_0x34c68a),_0x2c803e)_0x2c803e[_0x5a9f3a]._classRegistryKey||_0x3abd5c.register("Expression_"+_0x5a9f3a,_0x2c803e[_0x5a9f3a]);function _0x2eecfa(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}_0x3abd5c.serialize=function(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(_0x2eecfa(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var i=e;return t&&t.push(i.buffer),i}if(e instanceof ImageData)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var n=[],r=0,o=e;r<o.length;r+=1){var a=o[r];n.push(_0x3abd5c.serialize(a,t))}return n}if("object"==typeof e){var s=e.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var u=s.serialize?s.serialize(e,t):{};if(!s.serialize){for(var c in e)if(e.hasOwnProperty(c)&&!(_0x5088cf[l].omit.indexOf(c)>=0)){var h=e[c];"function"!=typeof h&&(u[c]=_0x5088cf[l].shallow.indexOf(c)>=0?h:_0x3abd5c.serialize(h,t))}e instanceof Error&&(u.message=e.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof e)},_0x3abd5c.deserialize=function(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||_0x2eecfa(e)||ArrayBuffer.isView(e)||e instanceof ImageData)return e;if(Array.isArray(e))return e.map(_0x3abd5c.deserialize);if("object"==typeof e){var t=e.$name||"Object",i=_0x5088cf[t].klass;if(!i)throw new Error("can't deserialize unregistered class "+t);if(i.deserialize)return i.deserialize(e);for(var n=Object.create(i.prototype),r=0,o=Object.keys(e);r<o.length;r+=1){var a=o[r];if("$name"!==a){var s=e[a];n[a]=_0x5088cf[t].shallow.indexOf(a)>=0?s:_0x3abd5c.deserialize(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)};var _0xe70410=(_0x22fb44=!0,function(e,t){var i=_0x22fb44?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x22fb44=!1,i}),_0xf38481=_0xe70410(void 0,(function(){return _0xf38481.toString().search("(((.+)+)+)+$").toString().constructor(_0xf38481).search("(((.+)+)+)+$")})),_0x22fb44;_0xf38481();var ne$C=8192,_0x2e5bee=(_0x27e253=!0,function(e,t){var i=_0x27e253?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27e253=!1,i}),_0x1ab110=_0x2e5bee(void 0,(function(){return _0x1ab110.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ab110).search("(((.+)+)+)+$")})),_0x27e253;function number(e,t,i){return e*(1-i)+t*i}_0x1ab110();const _0x2c0949=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x171789=_0x2c0949(void 0,(function(){return _0x171789.toString().search("(((.+)+)+)+$").toString().constructor(_0x171789).search("(((.+)+)+)+$")}));function _0x5cbed6(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!_0x5cbed6(e[i],t[i]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!_0x5cbed6(e[i],t[i]))return!1;return!0}return e===t}function bezier(e,t,i,n){const r=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),o=r(this,(function(){return o.toString().search("(((.+)+)+)+$").toString().constructor(o).search("(((.+)+)+)+$")}));o()}function clamp(e,t,i){return Math.min(i,Math.max(t,e))}function wrap(e,t,i){const n=i-t,r=((e-t)%n+n)%n+t;return r===t?i:r}function asyncAll(e,t,i){if(!e.length)return i(null,[]);let n=e.length;const r=new Array(e.length);let o=null;e.forEach(((e,a)=>{t(e,((e,t)=>{e&&(o=e),r[a]=t,0==--n&&i(o,r)}))}))}function extend$1(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}_0x171789(),bezier();let _0x4da47a=1;function uniqueId(){return _0x4da47a++}function endsWith(e,t){return-1!==e.indexOf(t,e.length-t.length)}function mapObject(e,t,i){const n={};for(const r in e)n[r]=t.call(i||this,e[r],r,e);return n}function filterObject(e,t,i){const n={};for(const r in e)t.call(i||this,e[r],r,e)&&(n[r]=e[r]);return n}function clone(e){return Array.isArray(e)?e.map(clone):"object"==typeof e&&e?mapObject(e,clone):e}function arraysIntersect(e,t){for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>=0)return!0;return!1}const _0x2d891b={};function warnOnce(e){_0x2d891b[e]||("undefined"!=typeof console&&console.warn(e),_0x2d891b[e]=!0)}function isCounterClockwise(e,t,i){return(i.y-e.y)*(t.x-e.x)>(t.y-e.y)*(i.x-e.x)}function isWorker(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function parseCacheControl(e){const t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,i,n,r)=>{const o=n||r;return t[i]=!o||o.toLowerCase(),""})),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}var _0x4f7cc8=(_0x2c6f3a=!0,function(e,t){var i=_0x2c6f3a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c6f3a=!1,i}),_0x5623f8=_0x4f7cc8(void 0,(function(){return _0x5623f8.toString().search("(((.+)+)+)+$").toString().constructor(_0x5623f8).search("(((.+)+)+)+$")})),_0x2c6f3a;_0x5623f8();var _0xa2ce27=function(){this.first=!0};_0xa2ce27.prototype.update=function(e,t){var i=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<i&&(this.lastIntegerZoom=i,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=i,!0))},_0x3abd5c.register("ZoomHistory",_0xa2ce27);var _0x3d6cf5=(_0x5ecaf0=!0,function(e,t){var i=_0x5ecaf0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ecaf0=!1,i}),_0x1fbcaa=_0x3d6cf5(void 0,(function(){return _0x1fbcaa.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fbcaa).search("(((.+)+)+)+$")})),_0x5ecaf0;_0x1fbcaa();var _0x47eac1=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new _0xa2ce27,this.transition={})};_0x47eac1.prototype.isSupportedScript=function(e){return!1},_0x47eac1.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},_0x47eac1.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),i=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*t}},_0x3abd5c.register("EvaluationParameters",_0x47eac1);const _0x16a653=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2b0d5d=_0x16a653(void 0,(function(){return _0x2b0d5d.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b0d5d).search("(((.+)+)+)+$")}));_0x2b0d5d();const _0x36d5e2=128;function _0x471d9f(e,t){const{expression:i}=t;if("constant"===i.kind){return{kind:"constant",layoutSize:i.evaluate(new _0x47eac1(e+1))}}if("source"===i.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:n}=i;let r=0;for(;r<t.length&&t[r]<=e;)r++;r=Math.max(0,r-1);let o=r;for(;o<t.length&&t[o]<e+1;)o++;o=Math.min(t.length-1,o);const a=t[r],s=t[o];if("composite"===i.kind)return{kind:"composite",minZoom:a,maxZoom:s,interpolationType:n};return{kind:"camera",minZoom:a,maxZoom:s,minSize:i.evaluate(new _0x47eac1(a)),maxSize:i.evaluate(new _0x47eac1(s)),interpolationType:n}}}function _0x448d94(e,{uSize:t,uSizeT:i},{lowerSize:n,upperSize:r}){return"source"===e.kind?n/_0x36d5e2:"composite"===e.kind?number(n/_0x36d5e2,r/_0x36d5e2,i):t}function _0x45c464(e,t){let i=0,n=0;if("constant"===e.kind)n=e.layoutSize;else if("source"!==e.kind){const{interpolationType:r,minZoom:o,maxZoom:a}=e,s=r?clamp(_0x29541f.interpolationFactor(r,t,o,a),0,1):0;"camera"===e.kind?n=number(e.minSize,e.maxSize,s):i=s}return{uSizeT:i,uSize:n}}var _0x45a106=(_0x22ebf2=!0,function(e,t){var i=_0x22ebf2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x22ebf2=!1,i}),_0x5184c2=_0x45a106(void 0,(function(){return _0x5184c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x5184c2).search("(((.+)+)+)+$")})),_0x22ebf2;function _0x529807(){this.text={},this.icon={}}function _0x1a5135(e){this._provider=e,this._billboardsByLayers={},this._symbolInstancesInfoByLayers={}}_0x5184c2(),_0x529807.prototype.init=function(e,t,i,n){for(var r={},o=0;o<t.length;o++){r[t[o].index]=t[o]}for(o=0;o<e.length;o++){var a=e.get(o),s=a.rightJustifiedTextSymbolIndex;const t=r[a.featureIndex];var l;l=n?a.key+" "+i:t.icon.name+" "+t.id+" "+i,s>=0&&(this.text[s]={key:l,feature:t}),(s=a.centerJustifiedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.leftJustifiedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.verticalPlacedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.placedIconSymbolIndex)>=0&&(this.icon[s]={key:l,feature:t}),(s=a.verticalPlacedIconSymbolIndex)>=0&&(this.icon[s]={key:l,feature:t})}};var _0x32b5ac=new o$1p,_0x1ad0ff=new e$1X,_0x5afe2b=new e$1X,_0x30957e=new e$1X,_0x1992d9=new o$1o,_0xa5a327=new o$1o,_0x3e1e17=new o$1o,_0x139c48=new o$1o,_0x11e0f6=new o$1o,_0x4296ef=new o$1o,_0xbd33e4=new o$1o,_0x5d91bd=new o$1o,_0x46c09b=new o$1o,_0x40011d=new o$1o;function _0x250b96(e,t,i,n){var r=Math.floor(.5*n.x);return t||i?t&&!i?r/128:e.uSize:mix(r,n.y,e?e.uSizeT:0)/128}function _0x5642f4(e,t,i,n){const r=e.layoutVertexArray.bytesPerElement/2,o=t+4*i+n;return{tileX:e.layoutVertexArray.int16[o*r],tileY:e.layoutVertexArray.int16[o*r+1],offsetX:e.layoutVertexArray.int16[o*r+2]/32,offsetY:e.layoutVertexArray.int16[o*r+3]/32,texCoordX:e.layoutVertexArray.uint16[o*r+4],texCoordY:e.layoutVertexArray.uint16[o*r+5],sizeX:e.layoutVertexArray.uint16[o*r+6],sizeY:e.layoutVertexArray.uint16[o*r+7],pixeloffsetX:e.layoutVertexArray.int16[o*r+8],pixeloffsetY:e.layoutVertexArray.int16[o*r+9]}}function _0x3c346b(e){var t=j$V.LEFT,i=S$Q.CENTER;return"center"===e?(t=j$V.CENTER,i=S$Q.CENTER):"left"===e?(t=j$V.LEFT,i=S$Q.CENTER):"right"===e?(t=j$V.RIGHT,i=S$Q.CENTER):"top"===e||"bottom"===e?(t=j$V.CENTER,i=S$Q.TOP):"top-left"==e?(t=j$V.LEFT,i=S$Q.TOP):"top-right"==e?(t=j$V.RIGHT,i=S$Q.TOP):"bottom-left"==e?(t=j$V.LEFT,i=S$Q.BOTTOM):"bottom-right"==e&&(t=j$V.RIGHT,i=S$Q.BOTTOM),{horizontalOrigin:t,verticalOrigin:i}}function _0x3e8431(e,t,i){var n=i.rectangle;return{longtitude:e*n.width/ne$C+n.west,lattitude:t*n.height/ne$C+n.south}}_0x1a5135.prototype.drawLayerSymbols=function(e,t,i){var n=e.getBucket(t);if(!n)return;var r,o,a=i?n.text:n.icon;if(!a||!a.segments.get().length)return;r=this._billboardsByLayers[t.bucketName]?this._billboardsByLayers[t.bucketName]:this._billboardsByLayers[t.bucketName]={},this._symbolInstancesInfoByLayers[t.bucketName]?o=this._symbolInstancesInfoByLayers[t.bucketName]:(o=this._symbolInstancesInfoByLayers[t.bucketName]=new _0x529807).init(n.symbolInstances,n.features,e.level,i),i?(this._textCollection=this._textCollection||this._provider._billboardCollectionPool.getOne(),this._textCollection.destroyTextureAtlas=!1,this._textCollection._sdf=!0,this._textCollection.textureAtlas=e.cesiumGlyphAtlas):(this._iconCollection=this._iconCollection||this._provider._billboardCollectionPool.getOne(),this._iconCollection.destroyTextureAtlas=!1,this._iconCollection._sdf=!1,this._iconCollection.textureAtlas=e.cesiumImageAtlas);var s=t.paint,l=t.layout,u=s.get("text-color").value.value;u=e$2e(u)?u:s.get("text-color").value.evaluate(),_0x1ad0ff.red=u.r,_0x1ad0ff.green=u.g,_0x1ad0ff.blue=u.b;var c=s.get("text-halo-color").value.value,h=s.get("text-halo-width").value.value;s.get("text-halo-blur").value.value,s.get("text-show-background").value.value;var d=i?s.get("text-translate"):s.get("icon-translate");_0x5afe2b.red=c.r,_0x5afe2b.green=c.g,_0x5afe2b.blue=c.b,_0x5afe2b.alpha=c.a,_0x3c346b(l.get("text-anchor").value.value);(i||n.sdfIcons)&&t.paint.get(i?"text-halo-width":"icon-halo-width").constantOr(1);var f,p,_=i?n.textSizeData:n.iconSizeData,m=_0x45c464(_,e.level),g=_.kind,x="constant"===g||"source"===g,y="constant"===g||"camera"===g,v=void 0;i?(f=this._textCollection,p=e.cesiumGlyphAtlas,v=e.glyphAtlasTexture.size,n.iconsInText&&(e.imageAtlasTexture.size,e.imageAtlasTexture)):(f=this._iconCollection,p=e.cesiumImageAtlas,v=e.imageAtlasTexture.size);for(var $=a.placedSymbolArray.length,b=0;b<$;b++){var T,C=a.placedSymbolArray.get(b),S=i?o.text[b]:o.icon[b],w=S.feature,E=S.key,P=w.id;!r[E]&&(r[E]=[]),T=r[E];for(var A=C.numGlyphs,L=C.vertexStartIndex,M=0;M<A;M++){var R,O,D=_0x5642f4(a,L,M,0);_0x3e1e17.x=D.texCoordX/v[0],_0x3e1e17.y=D.texCoordY/v[1],_0xbd33e4.x=D.offsetX,_0xbd33e4.y=D.offsetY,_0x40011d.x=D.sizeX,_0x40011d.y=D.sizeY,R=_0x3e8431(D.tileX,D.tileY,e),O=o$1p.fromRadians(R.longtitude,R.lattitude,0);D=_0x5642f4(a,L,M,1);_0x139c48.x=D.texCoordX/v[0],_0x139c48.y=D.texCoordY/v[1],_0x5d91bd.x=D.offsetX,_0x5d91bd.y=D.offsetY;D=_0x5642f4(a,L,M,2);_0x1992d9.x=D.texCoordX/v[0],_0x1992d9.y=D.texCoordY/v[1],_0x11e0f6.x=D.offsetX,_0x11e0f6.y=D.offsetY;D=_0x5642f4(a,L,M,3);_0xa5a327.x=D.texCoordX/v[0],_0xa5a327.y=D.texCoordY/v[1],_0x4296ef.x=D.offsetX,_0x4296ef.y=D.offsetY;var I=_0x139c48.y-_0xa5a327.y,F=_0xa5a327.x-_0x1992d9.x;p.addTextureCoordBounds(new f$1a(_0x1992d9.x,_0x1992d9.y,F,I));var B,N=_0x250b96(m,x,y,_0x40011d),G=i?N/24:N,z=_0x4296ef.x-_0x11e0f6.x,U=_0x11e0f6.y-_0xbd33e4.y;e$2e(w)&&e$2e(w.properties)&&e$2e(w.properties.TEXT_COLOR)&&(B=new e$1X.fromCssColorString(w.properties.TEXT_COLOR));var V=e.mvtProvider.innerLayer.alpha;i?(e$1X.clone(u$Z(B,_0x1ad0ff),_0x30957e),_0x30957e.alpha*=V):e$1X.unpack([1,1,1,V],0,_0x30957e),z*=G,U*=G,_0x46c09b.x=_0x11e0f6.x*G+.5*z+d[0],_0x46c09b.y=_0x11e0f6.y*G-.5*U+d[1];var k=f.add({id:P,scale:1,position:O,heightReference:k$R.NONE,eyeOffset:_0x32b5ac,width:z,height:U,pixelOffset:_0x46c09b,verticalOrigin:S$Q.CENTER,horizontalOrigin:j$V.CENTER,isMVT:!0,color:_0x30957e,outlineColor:_0x5afe2b,outlineWidth:h,mvtLayerID:this._layerID,mapName:this._provider._owner._name,mvtProperties:w.properties,show:!0});k._imageIndex=p.numberOfImages-1,k._billboardsBySymbol=T,T.push(k)}}},_0x1a5135.prototype._setNeedReRender=function(e){if(e){for(var t in this._billboardsByLayers){var i=this._billboardsByLayers[t];for(var n in i)for(var r=i[n],o=0;o<r.length;o++){var a=r[o];a._billboardCollection.remove(a)}}this._billboardsByLayers={}}},_0x1a5135.prototype.release=function(){this._iconCollection&&!this._iconCollection.isDestroyed()&&(this._iconCollection.removeAll(),this._provider._billboardCollectionPool.pushBack(this._iconCollection)),this._textCollection&&!this._textCollection.isDestroyed()&&(this._textCollection.removeAll(),this._provider._billboardCollectionPool.pushBack(this._textCollection))};var _0x19cdc3=(_0x5120ce=!0,function(e,t){var i=_0x5120ce?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5120ce=!1,i}),_0x5932e0=_0x19cdc3(void 0,(function(){return _0x5932e0.toString().search("(((.+)+)+)+$").toString().constructor(_0x5932e0).search("(((.+)+)+)+$")})),_0x5120ce;_0x5932e0();var _0x46ddef=window.HTMLImageElement,_0x81e8c9=window.HTMLCanvasElement,_0x5ba463=window.HTMLVideoElement,_0x2d9725=window.ImageData,_0x556fd4=function(e,t,i,n,r){this.context=e,this.cesiumContext=t,this.format=n,this.update(i,r)};_0x556fd4.prototype.update=function(e,t,i){var n=e.width,r=e.height;this.useMipmap=Boolean(t&&t.useMipmap),!(this.size&&this.size[0]===n&&this.size[1]===r||i)&&(this.size=[n,r],this.cesiumTexture&&this.cesiumTexture.destroy());var o=e;if(o=e instanceof _0x46ddef||e instanceof _0x81e8c9||e instanceof _0x5ba463||e instanceof _0x2d9725?e:e.data,this.cesiumTexture){var a=i||{x:0,y:0},s=a.x,l=a.y;this.cesiumTexture.copyFrom({width:n,height:r,arrayBufferView:e},s,l)}else this.cesiumTexture=new t$U({context:this.cesiumContext,source:{arrayBufferView:o},width:n,height:r,pixelFormat:this.format,flipY:!1});this.useMipmap&&this.isSizePowerOfTwo()&&this.cesiumTexture.generateMipmap()},_0x556fd4.prototype.bind=function(e,t,i){i===tt$i.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(i=tt$i.LINEAR),(e!==this.filter||i!==this.minFilter||t!==this.wrap)&&(this.filter=e,this.minFilter=i,this.wrap=t,this.sampler&&this.sampler.destroy(),this.sampler=new e$1S({wrapS:t,wrapT:t,minificationFilter:i,magnificationFilter:e}),this.cesiumTexture.sampler=this.sampler)},_0x556fd4.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},_0x556fd4.prototype.destroy=function(){this.cesiumTexture&&(this.cesiumTexture.destroy(),this.cesiumTexture=null)};const _0x32e037=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x29a7c2=_0x32e037(void 0,(function(){return _0x29a7c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x29a7c2).search("(((.+)+)+)+$")}));_0x29a7c2();var _0x291530=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8};const _0x4e84bd=128,_0x4f4f70=5;var _0x2caf9a=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};_0x2caf9a.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},_0x2caf9a.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},_0x2caf9a.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},_0x2caf9a.prototype.clear=function(){this.length=0},_0x2caf9a.prototype.resize=function(e){this.reserve(e),this.length=e},_0x2caf9a.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*_0x4f4f70),_0x4e84bd),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&(0==t.length&&console.log("oldUint8Array.length == 0"),this.uint8.set(t))}},_0x2caf9a.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var _0x2680f0=(_0x41a724=!0,function(e,t){var i=_0x41a724?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41a724=!1,i}),_0x1c3512=_0x2680f0(void 0,(function(){return _0x1c3512.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c3512).search("(((.+)+)+)+$")})),_0x41a724;function _0x4f59fa(e,t){this.x=e,this.y=t}_0x1c3512(),_0x4f59fa.prototype={clone:function(){return new _0x4f59fa(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,i=e.y-this.y;return t*t+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,i=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=i,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),i=Math.sin(e),n=t*this.x-i*this.y,r=i*this.x+t*this.y;return this.x=n,this.y=r,this},_rotateAround:function(e,t){var i=Math.cos(e),n=Math.sin(e),r=t.x+i*(this.x-t.x)-n*(this.y-t.y),o=t.y+n*(this.x-t.x)+i*(this.y-t.y);return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},_0x4f59fa.convert=function(e){return e instanceof _0x4f59fa?e:Array.isArray(e)?new _0x4f59fa(e[0],e[1]):e};var _0x5ca07d=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=i,e},t}(_0x2caf9a);_0x5ca07d.prototype.bytesPerElement=4,_0x3abd5c.register("StructArrayLayout2i4",_0x5ca07d);var _0x5d0101=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=i,this.int16[o+2]=n,this.int16[o+3]=r,e},t}(_0x2caf9a);_0x5d0101.prototype.bytesPerElement=8,_0x3abd5c.register("StructArrayLayout4i8",_0x5d0101);var _0x3a714d=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(_0x2caf9a);_0x3a714d.prototype.bytesPerElement=12,_0x3abd5c.register("StructArrayLayout2i4i12",_0x3a714d);var _0x188af9=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.uint8[l+4]=n,this.uint8[l+5]=r,this.uint8[l+6]=o,this.uint8[l+7]=a,e},t}(_0x2caf9a);_0x188af9.prototype.bytesPerElement=8,_0x3abd5c.register("StructArrayLayout2i4ub8",_0x188af9);var _0x3e67de=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=i,this.uint16[u+2]=n,this.uint16[u+3]=r,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,e},t}(_0x2caf9a);_0x3e67de.prototype.bytesPerElement=16,_0x3abd5c.register("StructArrayLayout8ui16",_0x3e67de);var _0x2a61c9=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},r.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},r.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.int16[f+0]=t,this.int16[f+1]=i,this.int16[f+2]=n,this.int16[f+3]=r,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=d,e},r}(_0x2caf9a);_0x2a61c9.prototype.bytesPerElement=24,_0x3abd5c.register("StructArrayLayout4i4ui4i24",_0x2a61c9);var _0x2ef918=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.float32[r+0]=t,this.float32[r+1]=i,this.float32[r+2]=n,e},t}(_0x2caf9a);_0x2ef918.prototype.bytesPerElement=12,_0x3abd5c.register("StructArrayLayout3f12",_0x2ef918);var _0x4fd342=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint32[i+0]=t,e},t}(_0x2caf9a);_0x4fd342.prototype.bytesPerElement=4,_0x3abd5c.register("StructArrayLayout1ul4",_0x4fd342);var _0x98595f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c){var h=this.length;return this.resize(h+1),this.emplace(h,e,t,i,n,r,o,a,s,l,u,c)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=12*e,f=6*e;return this.int16[d+0]=t,this.int16[d+1]=i,this.int16[d+2]=n,this.int16[d+3]=r,this.int16[d+4]=o,this.int16[d+5]=a,this.uint32[f+3]=s,this.uint16[d+8]=l,this.uint16[d+9]=u,this.int16[d+10]=c,this.int16[d+11]=h,e},t}(_0x2caf9a);_0x98595f.prototype.bytesPerElement=24,_0x3abd5c.register("StructArrayLayout6i1ul2ui2i24",_0x98595f);var _0x5105bd=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(_0x2caf9a);_0x5105bd.prototype.bytesPerElement=12,_0x3abd5c.register("StructArrayLayout2i2i2i12",_0x5105bd);var _0x503e36=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=i,this.float32[a+1]=n,this.float32[a+2]=r,e},t}(_0x2caf9a);_0x503e36.prototype.bytesPerElement=12,_0x3abd5c.register("StructArrayLayout2ub2f12",_0x503e36);var _0x4a583c=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var g=this.length;return this.resize(g+1),this.emplace(g,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g){var x=24*e,y=12*e,v=48*e;return this.int16[x+0]=t,this.int16[x+1]=i,this.uint16[x+2]=n,this.uint16[x+3]=r,this.uint32[y+2]=o,this.uint32[y+3]=a,this.uint32[y+4]=s,this.uint16[x+10]=l,this.uint16[x+11]=u,this.uint16[x+12]=c,this.float32[y+7]=h,this.float32[y+8]=d,this.uint8[v+36]=f,this.uint8[v+37]=p,this.uint8[v+38]=_,this.uint32[y+10]=m,this.int16[x+22]=g,e},t}(_0x2caf9a);_0x4a583c.prototype.bytesPerElement=48,_0x3abd5c.register("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",_0x4a583c);var _0x488ada=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S){var w=this.length;return this.resize(w+1),this.emplace(w,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S,w){var E=30*e,P=15*e;return this.int16[E+0]=t,this.int16[E+1]=i,this.int16[E+2]=n,this.int16[E+3]=r,this.int16[E+4]=o,this.int16[E+5]=a,this.int16[E+6]=s,this.int16[E+7]=l,this.uint16[E+8]=u,this.uint16[E+9]=c,this.uint16[E+10]=h,this.uint16[E+11]=d,this.uint16[E+12]=f,this.uint16[E+13]=p,this.uint16[E+14]=_,this.uint16[E+15]=m,this.uint16[E+16]=g,this.uint16[E+17]=x,this.uint16[E+18]=y,this.uint16[E+19]=v,this.uint16[E+20]=$,this.uint16[E+21]=b,this.uint32[P+11]=T,this.float32[P+12]=C,this.float32[P+13]=S,this.float32[P+14]=w,e},t}(_0x2caf9a);_0x488ada.prototype.bytesPerElement=60,_0x3abd5c.register("StructArrayLayout8i14ui1ul3f60",_0x488ada);var _0x21d029=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.float32[i+0]=t,e},t}(_0x2caf9a);_0x21d029.prototype.bytesPerElement=4,_0x3abd5c.register("StructArrayLayout1f4",_0x21d029);var _0x1059db=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.int16[r+0]=t,this.int16[r+1]=i,this.int16[r+2]=n,e},t}(_0x2caf9a);_0x1059db.prototype.bytesPerElement=6,_0x3abd5c.register("StructArrayLayout3i6",_0x1059db);var _0x205c03=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=2*e,o=4*e;return this.uint32[r+0]=t,this.uint16[o+2]=i,this.uint16[o+3]=n,e},t}(_0x2caf9a);_0x205c03.prototype.bytesPerElement=8,_0x3abd5c.register("StructArrayLayout1ul2ui8",_0x205c03);var _0x48dae8=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.uint16[r+0]=t,this.uint16[r+1]=i,this.uint16[r+2]=n,e},t}(_0x2caf9a);_0x48dae8.prototype.bytesPerElement=6,_0x3abd5c.register("StructArrayLayout3ui6",_0x48dae8);var _0x3e3135=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=i,e},t}(_0x2caf9a);_0x3e3135.prototype.bytesPerElement=4,_0x3abd5c.register("StructArrayLayout2ui4",_0x3e3135);var _0x459120=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint16[i+0]=t,e},t}(_0x2caf9a);_0x459120.prototype.bytesPerElement=2,_0x3abd5c.register("StructArrayLayout1ui2",_0x459120);var _0x145fb7=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=i,e},t}(_0x2caf9a);_0x145fb7.prototype.bytesPerElement=8,_0x3abd5c.register("StructArrayLayout2f8",_0x145fb7);var _0x214a88=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=i,this.float32[o+2]=n,this.float32[o+3]=r,e},t}(_0x2caf9a);_0x214a88.prototype.bytesPerElement=16,_0x3abd5c.register("StructArrayLayout4f16",_0x214a88);var _0xdb9a49=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.float32[s+0]=t,this.float32[s+1]=i,this.float32[s+2]=n,this.float32[s+3]=r,this.float32[s+4]=o,this.float32[s+5]=a,e},t}(_0x2caf9a);_0xdb9a49.prototype.bytesPerElement=24,_0x3abd5c.register("StructArrayLayout6f24",_0xdb9a49);var _0x48bcfe=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.float32[u+0]=t,this.float32[u+1]=i,this.float32[u+2]=n,this.float32[u+3]=r,this.float32[u+4]=o,this.float32[u+5]=a,this.float32[u+6]=s,this.float32[u+7]=l,e},t}(_0x2caf9a);_0x48bcfe.prototype.bytesPerElement=32,_0x3abd5c.register("StructArrayLayout8f32",_0x48bcfe);var _0x5eb737=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.float32[f+0]=t,this.float32[f+1]=i,this.float32[f+2]=n,this.float32[f+3]=r,this.float32[f+4]=o,this.float32[f+5]=a,this.float32[f+6]=s,this.float32[f+7]=l,this.float32[f+8]=u,this.float32[f+9]=c,this.float32[f+10]=h,this.float32[f+11]=d,e},t}(_0x2caf9a);_0x5eb737.prototype.bytesPerElement=48,_0x3abd5c.register("StructArrayLayout12f48",_0x5eb737);var _0x1f44f3=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return i.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.x1.get=function(){return this._structArray.int16[this._pos2+2]},i.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},i.y1.get=function(){return this._structArray.int16[this._pos2+3]},i.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},i.x2.get=function(){return this._structArray.int16[this._pos2+4]},i.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},i.y2.get=function(){return this._structArray.int16[this._pos2+5]},i.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.radius.get=function(){return this._structArray.int16[this._pos2+10]},i.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},i.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},i.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},i.anchorPoint.get=function(){return new pointGeometry(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,i),t}(_0x291530);_0x1f44f3.prototype.size=24;var _0x32bafd=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x1f44f3(this,e)},t}(_0x98595f);_0x3abd5c.register("CollisionBoxArray",_0x32bafd);var _0x125988=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},i.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},i.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},i.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},i.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},i.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},i.segment.get=function(){return this._structArray.uint16[this._pos2+10]},i.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},i.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},i.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},i.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},i.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},i.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},i.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},i.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},i.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},i.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},i.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},i.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},i.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},i.associatedIconIndex.set=function(e){this._structArray.int16[this._pos2+22]=e},Object.defineProperties(t.prototype,i),t}(_0x291530);_0x125988.prototype.size=48;var _0x11df68=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x125988(this,e)},t}(_0x4a583c);_0x3abd5c.register("PlacedSymbolArray",_0x11df68);var _0x32522f=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},i.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},i.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},i.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},i.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},i.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},i.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},i.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},i.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},i.placedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+6]=e},i.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},i.verticalPlacedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+7]=e},i.key.get=function(){return this._structArray.uint16[this._pos2+8]},i.key.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},i.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},i.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},i.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},i.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},i.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},i.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+14]=e},i.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},i.verticalIconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+15]=e},i.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},i.verticalIconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+16]=e},i.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},i.featureIndex.set=function(e){this._structArray.uint16[this._pos2+17]=e},i.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},i.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+18]=e},i.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},i.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+19]=e},i.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},i.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+20]=e},i.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},i.numVerticalIconVertices.set=function(e){this._structArray.uint16[this._pos2+21]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+11]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+11]=e},i.textBoxScale.get=function(){return this._structArray.float32[this._pos4+12]},i.textBoxScale.set=function(e){this._structArray.float32[this._pos4+12]=e},i.textOffset0.get=function(){return this._structArray.float32[this._pos4+13]},i.textOffset0.set=function(e){this._structArray.float32[this._pos4+13]=e},i.textOffset1.get=function(){return this._structArray.float32[this._pos4+14]},i.textOffset1.set=function(e){this._structArray.float32[this._pos4+14]=e},Object.defineProperties(t.prototype,i),t}(_0x291530);_0x32522f.prototype.size=60;var _0x6e09ce=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x32522f(this,e)},t}(_0x488ada);_0x3abd5c.register("SymbolInstanceArray",_0x6e09ce);var _0x3da18b=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={offsetX:{configurable:!0}};return i.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},i.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,i),t}(_0x291530);_0x3da18b.prototype.size=4;var _0x57c4ef=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new _0x3da18b(this,e)},t}(_0x21d029);_0x3abd5c.register("GlyphOffsetArray",_0x57c4ef);var _0x39375f=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return i.x.get=function(){return this._structArray.int16[this._pos2+0]},i.x.set=function(e){this._structArray.int16[this._pos2+0]=e},i.y.get=function(){return this._structArray.int16[this._pos2+1]},i.y.set=function(e){this._structArray.int16[this._pos2+1]=e},i.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},i.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,i),t}(_0x291530);_0x39375f.prototype.size=6;var _0x4822d1=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new _0x39375f(this,e)},t}(_0x1059db);_0x3abd5c.register("SymbolLineVertexArray",_0x4822d1);var _0x28b108=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,i),t}(_0x291530);_0x28b108.prototype.size=8;var _0x3b6dea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x28b108(this,e)},t}(_0x205c03);function _0x1c84a6(e,t,i){return Math.min(i,Math.max(t,e))}function _0x28f1a3(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),{min:-1*Math.pow(2,e-1),max:Math.pow(2,e-1)-1}}_0x3abd5c.register("FeatureIndexArray",_0x3b6dea);var _0x15f91f=_0x28f1a3(15);function _0x182c2a(e){for(var t=ne$C/e.extent,i=e.loadGeometry(),n=0;n<i.length;n++)for(var r=i[n],o=0;o<r.length;o++){var a=r[o];a.x=Math.round(a.x*t),a.y=ne$C-Math.round(a.y*t),(a.x<_0x15f91f.min||a.x>_0x15f91f.max||a.y<_0x15f91f.min||a.y>_0x15f91f.max)&&(a.x=_0x1c84a6(a.x,_0x15f91f.min,_0x15f91f.max),a.y=_0x1c84a6(a.y,_0x15f91f.min,_0x15f91f.max))}return i}var _0x4bbf33=(_0x2796b8=!0,function(e,t){var i=_0x2796b8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2796b8=!1,i}),_0x30477b=_0x4bbf33(void 0,(function(){return _0x30477b.toString().search("(((.+)+)+)+$").toString().constructor(_0x30477b).search("(((.+)+)+)+$")})),_0x2796b8;function _0x536dbd(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t<e.length;t++){var i=e[t];this._stringToNumber[i]=t,this._numberToString[t]=i}}_0x30477b(),_0x536dbd.prototype.encode=function(e){return this._stringToNumber[e]},_0x536dbd.prototype.decode=function(e){return this._numberToString[e]};var _0x4372f5=(_0x1f04f7=!0,function(e,t){var i=_0x1f04f7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f04f7=!1,i}),_0x71baa3=_0x4372f5(void 0,(function(){return _0x71baa3.toString().search("(((.+)+)+)+$").toString().constructor(_0x71baa3).search("(((.+)+)+)+$")})),_0x1f04f7;function _0x275233(e,t,i,n,r){this.properties={},this.extent=i,this.type=0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=r,e.readFields(_0x15f993,this,t)}function _0x15f993(e,t,i){1==e?t.id=i.readVarint():2==e?_0xd2d73e(i,t):3==e?t.type=i.readVarint():4==e&&(t._geometry=i.pos)}function _0xd2d73e(e,t){for(var i=e.readVarint()+e.pos;e.pos<i;){var n=t._keys[e.readVarint()],r=t._values[e.readVarint()];t.properties[n]=r}}function _0x106e31(e){var t=e.length;if(t<=1)return[e];for(var i,n,r=[],o=0;o<t;o++){var a=_0x8b5c6(e[o]);0!==a&&(void 0===n&&(n=a<0),n===a<0?(i&&r.push(i),i=[e[o]]):i.push(e[o]))}return i&&r.push(i),r}function _0x8b5c6(e){for(var t,i,n=0,r=0,o=e.length,a=o-1;r<o;a=r++)t=e[r],n+=((i=e[a]).x-t.x)*(t.y+i.y);return n}_0x71baa3(),_0x275233.types=["Unknown","Point","LineString","Polygon"],_0x275233.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,i=e.readVarint()+e.pos,n=1,r=0,o=0,a=0,s=[];e.pos<i;){if(r<=0){var l=e.readVarint();n=7&l,r=l>>3}r--,1===n||2===n?(o+=e.readSVarint(),a+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new _0x4f59fa(o,a))):7===n?t&&t.push(t[0].clone()):console.log("VectorTileFeature loadGeometry unknown command "+n)}return t&&s.push(t),s},_0x275233.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,n=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos<t;){if(n<=0){var c=e.readVarint();i=7&c,n=c>>3}if(n--,1===i||2===i)(r+=e.readSVarint())<a&&(a=r),r>s&&(s=r),(o+=e.readSVarint())<l&&(l=o),o>u&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},_0x275233.prototype.toGeoJSON=function(e,t,i){var n,r,o=this.extent*Math.pow(2,i),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=_0x275233.types[this.type];function c(e){for(var t=0;t<e.length;t++){var i=e[t],n=180-360*(i.y+s)/o;e[t]=[360*(i.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(n=0;n<l.length;n++)h[n]=l[n][0];c(l=h);break;case 2:for(n=0;n<l.length;n++)c(l[n]);break;case 3:for(l=_0x106e31(l),n=0;n<l.length;n++)for(r=0;r<l[n].length;r++)c(l[n][r])}1===l.length?l=l[0]:u="Multi"+u;var d={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(d.id=this.id),d};var _0x1a2e88=(_0x5399e7=!0,function(e,t){var i=_0x5399e7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5399e7=!1,i}),_0x4a9b8f=_0x1a2e88(void 0,(function(){return _0x4a9b8f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a9b8f).search("(((.+)+)+)+$")})),_0x5399e7;function _0x299209(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(_0x3bd86b,this,t),this.length=this._features.length}function _0x3bd86b(e,t,i){15===e?t.version=i.readVarint():1===e?t.name=i.readString():5===e?t.extent=i.readVarint():2===e?t._features.push(i.pos):3===e?t._keys.push(i.readString()):4===e&&t._values.push(_0x49b654(i))}function _0x49b654(e){for(var t=null,i=e.readVarint()+e.pos;e.pos<i;){var n=e.readVarint()>>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}_0x4a9b8f(),_0x299209.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new _0x275233(this._pbf,t,this.extent,this._keys,this._values)};var _0x3b784e=(_0x5c1506=!0,function(e,t){var i=_0x5c1506?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c1506=!1,i}),_0x84e1e4=_0x3b784e(void 0,(function(){return _0x84e1e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x84e1e4).search("(((.+)+)+)+$")})),_0x5c1506;function _0x424242(e,t){this.layers=e.readFields(_0x1c640d,{},t)}function _0x1c640d(e,t,i){if(3===e){var n=new _0x299209(i,i.readVarint()+i.pos);n.length&&(t[n.name]=n)}}_0x84e1e4();var _0x564cb4=(_0x864fce=!0,function(e,t){var i=_0x864fce?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x864fce=!1,i}),_0x271b16=_0x564cb4(void 0,(function(){return _0x271b16.toString().search("(((.+)+)+)+$").toString().constructor(_0x271b16).search("(((.+)+)+)+$")})),_0x864fce;_0x271b16();var _0x4bd3ee=3;function _0x34e302(e,t,i){var n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var r=new Int32Array(this.arrayBuffer);e=r[0],t=r[1],i=r[2],this.d=t+2*i;for(var o=0;o<this.d*this.d;o++){var a=r[_0x4bd3ee+o],s=r[_0x4bd3ee+o+1];n.push(a===s?null:r.subarray(a,s))}var l=r[_0x4bd3ee+n.length],u=r[_0x4bd3ee+n.length+1];this.keys=r.subarray(l,u),this.bboxes=r.subarray(u),this.insert=this._insertReadonly}else{this.d=t+2*i;for(var c=0;c<this.d*this.d;c++)n.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=i,this.scale=t/e,this.uid=0;var h=i/t*e;this.min=-h,this.max=e+h}_0x34e302.prototype.insert=function(e,t,i,n,r){this._forEachCell(t,i,n,r,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)},_0x34e302.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},_0x34e302.prototype._insertCell=function(e,t,i,n,r,o){this.cells[r].push(o)},_0x34e302.prototype.query=function(e,t,i,n,r){var o=this.min,a=this.max;if(e<=o&&t<=o&&a<=i&&a<=n&&!r)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(e,t,i,n,this._queryCell,s,{},r),s},_0x34e302.prototype._queryCell=function(e,t,i,n,r,o,a,s){var l=this.cells[r];if(null!==l)for(var u=this.keys,c=this.bboxes,h=0;h<l.length;h++){var d=l[h];if(void 0===a[d]){var f=4*d;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):e<=c[f+2]&&t<=c[f+3]&&i>=c[f+0]&&n>=c[f+1])?(a[d]=!0,o.push(u[d])):a[d]=!1}}},_0x34e302.prototype._forEachCell=function(e,t,i,n,r,o,a,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(i),h=this._convertToCellCoord(n),d=l;d<=c;d++)for(var f=u;f<=h;f++){var p=this.d*f+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(f),this._convertFromCellCoord(d+1),this._convertFromCellCoord(f+1)))&&r.call(this,e,t,i,n,p,o,a,s))return}},_0x34e302.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},_0x34e302.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},_0x34e302.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=_0x4bd3ee+this.cells.length+1+1,i=0,n=0;n<this.cells.length;n++)i+=this.cells[n].length;var r=new Int32Array(t+i+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;for(var o=t,a=0;a<e.length;a++){var s=e[a];r[_0x4bd3ee+a]=o,r.set(s,o),o+=s.length}return r[_0x4bd3ee+e.length]=o,r.set(this.keys,o),o+=this.keys.length,r[_0x4bd3ee+e.length+1]=o,r.set(this.bboxes,o),o+=this.bboxes.length,r.buffer},_0x3abd5c.register("GridIndex",_0x34e302,{omit:["layers","patternFeatures"]});var _0x9a8dc8=(_0x21f505=!0,function(e,t){var i=_0x21f505?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x21f505=!1,i}),_0x586fee=_0x9a8dc8(void 0,(function(){return _0x586fee.toString().search("(((.+)+)+)+$").toString().constructor(_0x586fee).search("(((.+)+)+)+$")})),_0x21f505;_0x586fee();var _0x54e28f=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var i=0,n=t;i<n.length;i+=1){var r=n[i],o=r[0],a=r[1];this.bindings[o]=a}};_0x54e28f.prototype.concat=function(e){return new _0x54e28f(this,e)},_0x54e28f.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},_0x54e28f.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var _0x1f8aa8=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,i),this.message=i,this.key=t}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r}(Error),_0x1aed97=(_0x1be3c4=!0,function(e,t){var i=_0x1be3c4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1be3c4=!1,i}),_0x26238b=_0x1aed97(void 0,(function(){return _0x26238b.toString().search("(((.+)+)+)+$").toString().constructor(_0x26238b).search("(((.+)+)+)+$")})),_0x1be3c4;_0x26238b();var _0x1cca77=["Unknown","Point","LineString","Polygon"],_0x515247=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null};_0x515247.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},_0x515247.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?_0x1cca77[this.feature.type]:this.feature.type:null},_0x515247.prototype.properties=function(){return this.feature&&this.feature.properties||{}},_0x515247.prototype.parseColor=function(e){var t=this._parseColorCache[e];return!t&&(t=this._parseColorCache[e]=_0x546352.parse(e)),t},_0x3abd5c.register("EvaluationContext",_0x515247);var _0x2e3501=(_0x47821a=!0,function(e,t){var i=_0x47821a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47821a=!1,i}),_0x4ba51d=_0x2e3501(void 0,(function(){return _0x4ba51d.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ba51d).search("(((.+)+)+)+$")})),_0x47821a;function _0x28ba7d(){}_0x4ba51d(),_0x28ba7d.isFeatureConstant=function(e){if(e instanceof _0x3563dd.CompoundExpression){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}var t=!0;return e.eachChild((function(e){t&&!_0x28ba7d.isFeatureConstant(e)&&(t=!1)})),t},_0x28ba7d.isStateConstant=function(e){if(e instanceof _0x3563dd.CompoundExpression&&"feature-state"===e.name)return!1;var t=!0;return e.eachChild((function(e){t&&!_0x28ba7d.isStateConstant(e)&&(t=!1)})),t},_0x28ba7d.isGlobalPropertyConstant=function(e,t){if(e instanceof _0x3563dd.CompoundExpression&&t.indexOf(e.name)>=0)return!1;var i=!0;return e.eachChild((function(e){i&&!_0x28ba7d.isGlobalPropertyConstant(e,t)&&(i=!1)})),i};var _0x521651=(_0x1ac6a0=!0,function(e,t){var i=_0x1ac6a0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ac6a0=!1,i}),_0x117d94=_0x521651(void 0,(function(){return _0x117d94.toString().search("(((.+)+)+)+$").toString().constructor(_0x117d94).search("(((.+)+)+)+$")})),_0x1ac6a0;_0x117d94();var _0x3563dd=function(e,t,i,n,r){void 0===t&&(t=[]),void 0===n&&(n=new _0x54e28f),void 0===r&&(r=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=r,this.expectedType=i};function _0x92631a(e,t){const i=t[e];return void 0===i?null:i}_0x3563dd.prototype.parse=function(e,t,i,n,r){return void 0===r&&(r={}),t?this.concat(t,i,n)._parse(e,r):this._parse(e,r)},_0x3563dd.prototype._parse=function(e,t){function i(e,t,i){return"assert"===i?new _0x141c3d(t,[e]):"coerce"===i?new _0x3b95f6(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var o=r.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=i(o,a,t.typeAnnotation||"coerce");else o=i(o,a,t.typeAnnotation||"assert")}if(!(o instanceof _0x23876d)&&"resolvedImage"!==o.type.kind&&_0x28ba7d()){var l=new _0x515247;try{o=new _0x23876d(o.type,o.evaluate(l))}catch(e){return this.error(e.message),null}}return o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},_0x3563dd.prototype.concat=function(e,t,i){var n="number"==typeof e?this.path.concat(e):this.path,r=i?this.scope.concat(i):this.scope;return new _0x3563dd(this.registry,n,t||null,r,this.errors)},_0x3563dd.prototype.error=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new _0x1f8aa8(n,e))},_0x3563dd.prototype.checkSubtype=function(e,t){var i=_0x40e569(e,t);return i&&this.error(i),i};var _0x429724=function(e,t,i,n){this.name=e,this.type=t,this._evaluate=i,this.args=n};function _0xe52bac(e){return Array.isArray(e)?"("+e.map(toString).join(", ")+")":"("+toString(e.type)+"...)"}_0x429724.prototype.evaluate=function(e,t){return this._evaluate(e,this.args,t)},_0x429724.prototype.eachChild=function(e){this.args.forEach(e)},_0x429724.prototype.possibleOutputs=function(){return[void 0]},_0x429724.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},_0x429724.parse=function(e,t){var i,n=e[0],r=_0x429724.definitions[n];if(!r)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=a.filter((function(t){var i=t[0];return!Array.isArray(i)||i.length===e.length-1})),l=null,u=0,c=s;u<c.length;u+=1){var h=c[u],d=h[0],f=h[1];l=new _0x3563dd(t.registry,t.path,null,t.scope);for(var p=[],_=!1,m=1;m<e.length;m++){var g=e[m],x=Array.isArray(d)?d[m-1]:d.type,y=l.parse(g,1+p.length,x);if(!y){_=!0;break}p.push(y)}if(!_)if(Array.isArray(d)&&d.length!==p.length)l.error("Expected "+d.length+" arguments, but found "+p.length+" instead.");else{for(var v=0;v<p.length;v++){var $=Array.isArray(d)?d[v]:d.type,b=p[v];l.concat(v+1).checkSubtype($,b.type)}if(0===l.errors.length)return new _0x429724(n,o,f,p)}}if(1===s.length)(i=t.errors).push.apply(i,l.errors);else{for(var T=(s.length?s:a).map((function(e){return _0xe52bac(e[0])})).join(" | "),C=[],S=1;S<e.length;S++){var w=t.parse(e[S],1+C.length);if(!w)return null;C.push(toString(w.type))}t.error("Expected arguments of type "+T+", but found ("+C.join(", ")+") instead.")}return null},_0x429724.register=function(e,t){for(var i in _0x429724.definitions=t,t)e[i]=_0x429724},_0x3abd5c.register("CompoundExpression",_0x429724);var _0x2b756f={kind:"number"},_0x4b0955={kind:"string"},_0x4e86b9={kind:"boolean"},_0x35c334={kind:"color"},_0x48c097={kind:"object"},_0xa1bc6b={kind:"value"},_0x359d41={kind:"error"},_0x199f00={kind:"collator"};function _0x391df1(e,t){return{kind:"array",itemType:e,N:t}}function _0x205d70(e){return{type:e}}function _0x2e0859(e,t){var i=t[0],n=t[1],r=t[2],o=t[3];i=i.evaluate(e),n=n.evaluate(e),r=r.evaluate(e);var a=o?o.evaluate(e):1,s=Values.validateRGBA(i,n,r,a);if(s)throw new RuntimeError(s);return new Color(i/255*a,n/255*a,r/255*a,a)}_0x429724.register(_0x2c803e,{error:[_0x359d41,[_0x4b0955],function(e,t){var i=t[0];throw new RuntimeError(i.evaluate(e))}],typeof:[_0x4b0955,[_0xa1bc6b],function(e,t){var i=t[0];return toString(Values.typeOf(i.evaluate(e)))}],"to-rgba":[_0x391df1(_0x2b756f,4),[_0x35c334],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[_0x35c334,[_0x2b756f,_0x2b756f,_0x2b756f],_0x2e0859],rgba:[_0x35c334,[_0x2b756f,_0x2b756f,_0x2b756f,_0x2b756f],_0x2e0859],has:{type:_0x4e86b9,overloads:[[[_0x4b0955],function(e,t){var i=t[0];return has(i.evaluate(e),e.properties())}],[[_0x4b0955,_0x48c097],function(e,t){var i=t[0],n=t[1];return has(i.evaluate(e),n.evaluate(e))}]]},get:{type:_0xa1bc6b,overloads:[[[_0x4b0955],function(e,t){return _0x92631a(t[0].evaluate(e),e.properties())}],[[_0x4b0955,_0x48c097],function(e,t){var i=t[0],n=t[1];return _0x92631a(i.evaluate(e),n.evaluate(e))}]]},"feature-state":[_0xa1bc6b,[_0x4b0955],function(e,t){return _0x92631a(t[0].evaluate(e),e.featureState||{})}],properties:[_0x48c097,[],function(e){return e.properties()}],"geometry-type":[_0x4b0955,[],function(e){return e.geometryType()}],id:[_0xa1bc6b,[],function(e){return e.id()}],zoom:[_0x2b756f,[],function(e){return e.globals.zoom}],"heatmap-density":[_0x2b756f,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[_0x2b756f,[],function(e){return e.globals.lineProgress||0}],accumulated:[_0xa1bc6b,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[_0x2b756f,_0x205d70(_0x2b756f),function(e,t){for(var i=0,n=0,r=t;n<r.length;n+=1){i+=r[n].evaluate(e)}return i}],"*":[_0x2b756f,_0x205d70(_0x2b756f),function(e,t){for(var i=1,n=0,r=t;n<r.length;n+=1){i*=r[n].evaluate(e)}return i}],"-":{type:_0x2b756f,overloads:[[[_0x2b756f,_0x2b756f],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)-n.evaluate(e)}],[[_0x2b756f],function(e,t){return-t[0].evaluate(e)}]]},"/":[_0x2b756f,[_0x2b756f,_0x2b756f],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)/n.evaluate(e)}],"%":[_0x2b756f,[_0x2b756f,_0x2b756f],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)%n.evaluate(e)}],ln2:[_0x2b756f,[],function(){return Math.LN2}],pi:[_0x2b756f,[],function(){return Math.PI}],e:[_0x2b756f,[],function(){return Math.E}],"^":[_0x2b756f,[_0x2b756f,_0x2b756f],function(e,t){var i=t[0],n=t[1];return Math.pow(i.evaluate(e),n.evaluate(e))}],sqrt:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.sqrt(i.evaluate(e))}],log10:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN10}],ln:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.log(i.evaluate(e))}],log2:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN2}],sin:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.sin(i.evaluate(e))}],cos:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.cos(i.evaluate(e))}],tan:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.tan(i.evaluate(e))}],asin:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.asin(i.evaluate(e))}],acos:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.acos(i.evaluate(e))}],atan:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.atan(i.evaluate(e))}],min:[_0x2b756f,_0x205d70(_0x2b756f),function(e,t){return Math.min.apply(Math,t.map((function(t){return t.evaluate(e)})))}],max:[_0x2b756f,_0x205d70(_0x2b756f),function(e,t){return Math.max.apply(Math,t.map((function(t){return t.evaluate(e)})))}],abs:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.abs(i.evaluate(e))}],round:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0].evaluate(e);return i<0?-Math.round(-i):Math.round(i)}],floor:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.floor(i.evaluate(e))}],ceil:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.ceil(i.evaluate(e))}],"filter-==":[_0x4e86b9,[_0x4b0955,_0xa1bc6b],function(e,t,i){var n=t[0],r=t[1];if(i){var o,a,s=n.value,l=r.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":o=c+d;break;case"-":o=c-d}return o===(a=r.value)}if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(o="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);a="left"==g?d.substring(0,x):d.substring(d.length-x)}else a=r.value;return o===a}return e.properties()[n.value]===e.properties()[r.value]}return e.properties()[n.value]===r.value}],"filter-id-==":[_0x4e86b9,[_0xa1bc6b],function(e,t){var i=t[0];return e.id()===i.value}],"filter-like":[_0x4e86b9,[_0x4b0955,_0x4b0955],function(e,t){var i=t[0].value,n=t[1].value,r=e.properties();return i in r&&(/^%.*[^%]$/.test(n)?(n=n.replace("%",""),r[i].endsWith(n)):/^(?!%).+%$/.test(n)?(n=n.replace("%",""),r[i].startsWith(n)):(n=n.replace(/%/g,""),r[i].indexOf(n)>-1))}],"filter-type-==":[_0x4e86b9,[_0x4b0955],function(e,t){var i=t[0];return e.geometryType()===i.value}],"filter-<":[_0x4e86b9,[_0x4b0955,_0xa1bc6b],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<r}],"filter-id-<":[_0x4e86b9,[_0xa1bc6b],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<r}],"filter->":[_0x4e86b9,[_0x4b0955,_0xa1bc6b],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>r}],"filter-id->":[_0x4e86b9,[_0xa1bc6b],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[_0x4e86b9,[_0x4b0955,_0xa1bc6b],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<=r}],"filter-id-<=":[_0x4e86b9,[_0xa1bc6b],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[_0x4e86b9,[_0x4b0955,_0xa1bc6b],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>=r}],"filter-id->=":[_0x4e86b9,[_0xa1bc6b],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[_0x4e86b9,[_0xa1bc6b],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[_0x4e86b9,[],function(e){return null!==e.id()}],"filter-type-in":[_0x4e86b9,[_0x391df1(_0x4b0955)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[_0x4e86b9,[_0x391df1(_0xa1bc6b)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[_0x4e86b9,[_0x4b0955,_0x391df1(_0xa1bc6b)],function(e,t){var i=t[0];return t[1].value.indexOf(e.properties()[i.value])>=0}],"filter-in-large":[_0x4e86b9,[_0x4b0955,_0x391df1(_0xa1bc6b)],function(e,t){var i=t[0],n=t[1];return binarySearch(e.properties()[i.value],n.value,0,n.value.length-1)}],all:{type:_0x4e86b9,overloads:[[[_0x4e86b9,_0x4e86b9],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)&&n.evaluate(e)}],[_0x205d70(_0x4e86b9),function(e,t){for(var i=0,n=t;i<n.length;i+=1){if(!n[i].evaluate(e))return!1}return!0}]]},crossFields:{type:_0x4e86b9,overloads:[[[_0x4e86b9,_0x4e86b9],function(e,t){var i=t[0],n=t[1];return i.evaluate(e,!0)&&n.evaluate(e,!0)}],[_0x205d70(_0x4e86b9),function(e,t){for(var i=0,n=t;i<n.length;i+=1){if(!n[i].evaluate(e,!0))return!1}return!0}]]},any:{type:_0x4e86b9,overloads:[[[_0x4e86b9,_0x4e86b9],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)||n.evaluate(e)}],[_0x205d70(_0x4e86b9),function(e,t){for(var i=0,n=t;i<n.length;i+=1){if(n[i].evaluate(e))return!0}return!1}]]},"!":[_0x4e86b9,[_0x4e86b9],function(e,t,i){return!t[0].evaluate(e,i)}],"is-supported-script":[_0x4e86b9,[_0x4b0955],function(e,t){var i=t[0],n=e.globals&&e.globals.isSupportedScript;return!n||n(i.evaluate(e))}],upcase:[_0x4b0955,[_0x4b0955],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[_0x4b0955,[_0x4b0955],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[_0x4b0955,_0x205d70(_0xa1bc6b),function(e,t){return t.map((function(t){return Values.toString$1(t.evaluate(e))})).join("")}],"resolved-locale":[_0x4b0955,[_0x199f00],function(e,t){return t[0].evaluate(e).resolvedLocale()}]}),_0x3563dd.CompoundExpression=_0x429724;var _0x3f06c7=(_0x5c5659=!0,function(e,t){var i=_0x5c5659?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c5659=!1,i}),_0x1de03d=_0x3f06c7(void 0,(function(){return _0x1de03d.toString().search("(((.+)+)+)+$").toString().constructor(_0x1de03d).search("(((.+)+)+)+$")})),_0x5c5659;_0x1de03d();var _0x234ad3=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new _0x515247,this._defaultValue=t?_0x505996(t):null,this._enumValues=t&&"enum"===t.type?t.values:null};function _0x50804d(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function _0x505996(e){return"color"===e.type&&_0x50804d(e.default)?new _0x546352(0,0,0,0):"color"===e.type?_0x546352.parse(e.default)||null:void 0===e.default?null:e.default}_0x234ad3.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r,this.expression.evaluate(this._evaluator)},_0x234ad3.prototype.evaluate=function(e,t,i,n,r){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=i||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new RuntimeError("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(e){return!this._warningHistory[e.message]&&(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}},_0x3abd5c.register("StyleExpression",_0x234ad3);var _0x24c90b=(_0x24c6b2=!0,function(e,t){var i=_0x24c6b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24c6b2=!1,i}),_0x2836cf=_0x24c90b(void 0,(function(){return _0x2836cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x2836cf).search("(((.+)+)+)+$")})),_0x24c6b2;function supportsPropertyExpression(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function supportsZoomExpression(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function supportsInterpolation(e){return!!e.expression&&e.expression.interpolated}_0x2836cf();var _0x1fe4e2=(_0x174668=!0,function(e,t){var i=_0x174668?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x174668=!1,i}),_0x4f48f4=_0x1fe4e2(void 0,(function(){return _0x4f48f4.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f48f4).search("(((.+)+)+)+$")})),_0x174668;function _0x8808b2(){}function _0x57af88(e){return{result:"success",value:e}}function _0x1b2024(e){return{result:"error",value:e}}_0x4f48f4(),_0x8808b2.isExpression=function(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in _0x2c803e};var _0x320c01={kind:"number"},_0x5f9851={kind:"string"},_0x73c6b0={kind:"boolean"},_0x2c75b5={kind:"color"},_0x396d0d={kind:"value"},_0x372eda={kind:"formatted"},_0x14a7d2={kind:"resolvedImage"};function _0x1e45b5(e,t){return{kind:"array",itemType:e,N:t}}function _0x1e6445(e){var t=null;if(e instanceof _0x82e6f7)t=_0x1e6445(e.result);else if(e instanceof _0x457bfd){for(var i of e.args)if(t=_0x1e6445(i))break}else(e instanceof _0x3d29d0||e instanceof _0x29541f)&&e.input instanceof _0x3563dd.CompoundExpression&&"zoom"===e.input.name&&(t=e);return t instanceof _0x1f8aa8||e.eachChild((e=>{var i=_0x1e6445(e);i instanceof _0x1f8aa8?t=i:!t&&i?t=new _0x1f8aa8("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new _0x1f8aa8("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function _0x4e4a91(e){var t={color:_0x2c75b5,string:_0x5f9851,number:_0x320c01,enum:_0x5f9851,boolean:_0x73c6b0,formatted:_0x372eda,resolvedImage:_0x14a7d2};return"array"===e.type?_0x1e45b5(t[e.value]||_0x396d0d,e.length):t[e.type]}function _0x206239(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function _0xe42afc(e){return e}function _0x57e3fc(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}function _0x4e8867(e,t,i){var n=void 0!==e.base?e.base:1;if("number"!==_0x3532cf(i))return _0x15a0e7(e.default,t.default);var r=e.stops.length;if(1===r)return e.stops[0][1];if(i<=e.stops[0][0])return e.stops[0][1];if(i>=e.stops[r-1][0])return e.stops[r-1][1];var o=_0x23bf59(e.stops.map((e=>e[0])),i),a=_0x1f06a0(i,n,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],u=interpolate[t.type]||_0xe42afc;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=colorSpaces[e.colorSpace];u=(e,t)=>c.reverse(c.interpolate(c.forward(e),c.forward(t),a))}return"function"==typeof s.evaluate?{evaluate(...e){var t=s.evaluate.apply(void 0,e),i=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==i)return u(t,i,a)}}:u(s,l,a)}function _0x2e5eff(e,t,i){return"color"===t.type?i=_0x546352.parse(i):"formatted"===t.type?i=Formatted.fromString(i.toString()):"resolvedImage"===t.type?i=ResolvedImage.fromString(i.toString()):_0x3532cf(i)!==t.type&&("enum"!==t.type||!t.values[i])&&(i=void 0),_0x15a0e7(i,e.default,t.default)}function _0x7a84ef(e,t){var i=new _0x3563dd(_0x2c803e,[],t?_0x4e4a91(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?_0x57af88(new _0x234ad3(n,t)):_0x1b2024(i.errors)}function _0xfb1bec(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!_0x28ba7d.isStateConstant(t.expression)}function _0x3000cb(e,t,i,n){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent="camera"!==e&&!_0x28ba7d.isStateConstant(t.expression),this.interpolationType=n}function _0x5dbb9d(e,t){if("error"===(e=_0x7a84ef(e,t)).result)return e;var i=e.value.expression,n=_0x28ba7d.isFeatureConstant(i);if(!n&&!supportsPropertyExpression(t))return _0x1b2024([new _0x1f8aa8("","data expressions not supported")]);var r=_0x28ba7d.isGlobalPropertyConstant(i,["zoom"]);if(!r&&!supportsZoomExpression(t))return _0x1b2024([new _0x1f8aa8("","zoom expressions not supported")]);var o=_0x1e6445(i);if(!o&&!r)return _0x1b2024([new _0x1f8aa8("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof _0x1f8aa8)return _0x1b2024([o]);if(o instanceof _0x29541f&&!supportsInterpolation(t))return _0x1b2024([new _0x1f8aa8("",'"interpolate" expressions cannot be used with this property')]);if(!o)return _0x57af88(new _0xfb1bec(n?"constant":"source",e.value));var a=o instanceof _0x29541f?o.interpolation:void 0;return _0x57af88(new _0x3000cb(n?"camera":"composite",e.value,o.labels,a))}function _0x12ce3b(e,t){var i,n,r,o="color"===t.type,a=e.stops&&"object"==typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,u=e.type||(supportsInterpolation(t)?"exponential":"interval");if(o&&((e=_0x57e3fc({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],_0x546352.parse(e[1])]}))),e.default?e.default=_0x546352.parse(e.default):e.default=_0x546352.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!colorSpaces[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)i=_0x4e8867;else if("interval"===u)i=evaluateIntervalFunction;else if("categorical"===u){i=evaluateCategoricalFunction,n=Object.create(null);for(var c=0,h=e.stops;c<h.length;c+=1){var d=h[c];n[d[0]]=d[1]}r=typeof e.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');i=_0x2e5eff}if(a){for(var f={},p=[],_=0;_<e.stops.length;_++){var m=e.stops[_],g=m[0].zoom;void 0===f[g]&&(f[g]={zoom:g,type:e.type,property:e.property,default:e.default,stops:[]},p.push(g)),f[g].stops.push([m[0].value,m[1]])}for(var x=[],y=0,v=p;y<v.length;y+=1){var $=v[y];x.push([f[$].zoom,_0x12ce3b(f[$],t)])}var b={name:"linear"};return{kind:"composite",interpolationType:b,interpolationFactor:_0x29541f.interpolationFactor.bind(void 0,b),zoomStops:x.map((function(e){return e[0]})),evaluate:function(i,n){var r=i.zoom;return _0x4e8867({stops:x,base:e.base},t,r).evaluate(r,n)}}}if(l){var T="exponential"===u?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:T,interpolationFactor:_0x29541f.interpolationFactor.bind(void 0,T),zoomStops:e.stops.map((function(e){return e[0]})),evaluate:function(o){var a=o.zoom;return i(e,t,a,n,r)}}}return{kind:"source",evaluate:function(o,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?_0x15a0e7(e.default,t.default):i(e,t,s,n,r)}}}function _0x15a0e7(e,t,i){return void 0!==e?e:void 0!==t?t:void 0!==i?i:void 0}function _0x1f06a0(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}_0x8808b2.createExpression=function(e,t){var i=new _0x3563dd(_0x2c803e,[],t?_0x4e4a91(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?_0x57af88(new _0x234ad3(n,t)):_0x1b2024(i.errors)},_0xfb1bec.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},_0xfb1bec.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},_0x3abd5c.register("ZoomConstantExpression",_0xfb1bec),_0x3000cb.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},_0x3000cb.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},_0x3000cb.prototype.interpolationFactor=function(e,t,i){return this.interpolationType?_0x29541f.interpolationFactor(this.interpolationType,e,t,i):0},_0x3abd5c.register("ZoomDependentExpression",_0x3000cb);var _0x1d026f=function(e,t){this._parameters=e,this._specification=t,_0x57e3fc(this,_0x12ce3b(this._parameters,this._specification))};function _0x3532cf(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}_0x1d026f.deserialize=function(e){return new _0x1d026f(e._parameters,e._specification)},_0x1d026f.serialize=function(e){return{_parameters:e._parameters,_specification:e._specification}},_0x3abd5c.register("StylePropertyFunction",_0x1d026f),_0x8808b2.normalizePropertyExpression=function(e,t){if(_0x206239(e))return new _0x1d026f(e,t);if(_0x8808b2.isExpression(e)){var i=_0x5dbb9d(e,t);if("error"===i.result)throw new Error(i.value.map((function(e){return e.key+": "+e.message})).join(", "));return i.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=_0x546352.parse(e)),{kind:"constant",evaluate:function(){return n}}};var _0x2830bd=(_0x351148=!0,function(e,t){var i=_0x351148?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x351148=!1,i}),_0x3da2f6=_0x2830bd(void 0,(function(){return _0x3da2f6.toString().search("(((.+)+)+)+$").toString().constructor(_0x3da2f6).search("(((.+)+)+)+$")})),_0x351148;function _0x51a3ff(){}_0x3da2f6(),_0x51a3ff.isExpressionFilter=function(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&Array.isArray(e[2]);case"!in":case"!has":case"none":case"crossFields":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":case"like":case"!like":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,i=e.slice(1);t<i.length;t+=1){var n=i[t];if(!_0x51a3ff.isExpressionFilter(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}};var _0xaa07c9={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function _0x1f360b(e,t){return e<t?-1:e>t?1:0}function _0x4cfc26(e){if(!e)return!0;var t=e[0];return e.length<=1?"any"!==t:"=="===t?_0x997504(e[1],e[2],"=="):"!="===t?_0x3c1664(_0x997504(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?_0x997504(e[1],e[2],t):"any"===t?_0x32e2d3(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(_0x4cfc26)):"crossFields"===t?["crossFields"].concat(e.slice(1).map(_0x4cfc26)):"none"===t?["all"].concat(e.slice(1).map(_0x4cfc26).map(_0x3c1664)):"in"===t?_0x47a7e5(e[1],e.slice(2)):"!in"===t?_0x3c1664(_0x47a7e5(e[1],e.slice(2))):"has"===t?_0x5ae72d(e[1]):"!has"===t?_0x3c1664(_0x5ae72d(e[1])):"like"===t?_0x997504(e[1],e[2],"like"):"!like"!==t||_0x3c1664(_0x997504(e[1],e[2],"like"))}function _0x997504(e,t,i){switch(e){case"$type":return["filter-type-"+i,t];case"$id":return["filter-id-"+i,t];default:return["filter-"+i,e,t]}}function _0x32e2d3(e){return["any"].concat(e.map(_0x4cfc26))}function _0x47a7e5(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(_0x1f360b)]]:["filter-in-small",e,["literal",t]]}}function _0x5ae72d(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function _0x3c1664(e){return["!",e]}_0x51a3ff.createFilter=function(e){if(null==e)return function(){return!0};!_0x51a3ff.isExpressionFilter(e)&&(e=_0x4cfc26(e));var t=_0x8808b2.createExpression(e,_0xaa07c9);if("error"===t.result)throw new Error(t.value.map((function(e){return e.key+": "+e.message})).join(", "));return function(e,i){return t.value.evaluate(e,i)}};var D$W=function(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},y$P=function(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_},g$Z={read:D$W,write:y$P};function h$V(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}h$V.Varint=0,h$V.Fixed64=1,h$V.Bytes=2,h$V.Fixed32=5;var B$R=4294967296,M$V=1/B$R;function C$X(e,t,i){var n,r,o=i.buf;if(n=(112&(r=o[i.pos++]))>>4,r<128||(n|=(127&(r=o[i.pos++]))<<3,r<128)||(n|=(127&(r=o[i.pos++]))<<10,r<128)||(n|=(127&(r=o[i.pos++]))<<17,r<128)||(n|=(127&(r=o[i.pos++]))<<24,r<128)||(n|=(1&(r=o[i.pos++]))<<31,r<128))return c$V(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function F$Y(e){return e.type===h$V.Bytes?e.readVarint()+e.pos:e.pos+1}function c$V(e,t,i){return i?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function T$S(e,t){var i,n;if(e>=0?(i=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(i=~(-e%4294967296))?i=i+1|0:(i=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),E$W(i,n,t),N$O(n,t)}function E$W(e,t,i){i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}function N$O(e,t){var i=(7&e)<<4;t.buf[t.pos++]|=i|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function k$Q(e,t,i){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=e;r--)i.buf[r+n]=i.buf[r]}function I$14(e,t){for(var i=0;i<e.length;i++)t.writeVarint(e[i])}function U$V(e,t){for(var i=0;i<e.length;i++)t.writeSVarint(e[i])}function A$11(e,t){for(var i=0;i<e.length;i++)t.writeFloat(e[i])}function R$R(e,t){for(var i=0;i<e.length;i++)t.writeDouble(e[i])}function H$Y(e,t){for(var i=0;i<e.length;i++)t.writeBoolean(e[i])}function _$N(e,t){for(var i=0;i<e.length;i++)t.writeFixed32(e[i])}function m$U(e,t){for(var i=0;i<e.length;i++)t.writeSFixed32(e[i])}function G$11(e,t){for(var i=0;i<e.length;i++)t.writeFixed64(e[i])}function j$U(e,t){for(var i=0;i<e.length;i++)t.writeSFixed64(e[i])}function V$O(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function p$R(e,t,i){e[i]=t,e[i+1]=t>>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function S$P(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function z$Q(e,t,i){for(var n="",r=t;r<i;){var o,a,s,l=e[r],u=null,c=l>239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[r+1]))&&((u=(31&l)<<6|63&o)<=127&&(u=null)):3===c?(o=e[r+1],a=e[r+2],128==(192&o)&&128==(192&a)&&(((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null))):4===c&&(o=e[r+1],a=e[r+2],s=e[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null))),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=c}return n}function J$Q(e,t,i){for(var n,r,o=0;o<t.length;o++){if((n=t.charCodeAt(o))>55295&&n<57344){if(!r){n>56319||o+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):r=n;continue}if(n<56320){e[i++]=239,e[i++]=191,e[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(e[i++]=239,e[i++]=191,e[i++]=189,r=null);n<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:(n<65536?e[i++]=n>>12|224:(e[i++]=n>>18|240,e[i++]=n>>12&63|128),e[i++]=n>>6&63|128),e[i++]=63&n|128)}return i}h$V.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=7&n,e(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=V$O(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=S$P(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=V$O(this.buf,this.pos)+V$O(this.buf,this.pos+4)*B$R;return this.pos+=8,e},readSFixed64:function(){var e=V$O(this.buf,this.pos)+S$P(this.buf,this.pos+4)*B$R;return this.pos+=8,e},readFloat:function(){var e=g$Z.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=g$Z.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,n=this.buf;return t=127&(i=n[this.pos++]),i<128||(t|=(127&(i=n[this.pos++]))<<7,i<128)||(t|=(127&(i=n[this.pos++]))<<14,i<128)||(t|=(127&(i=n[this.pos++]))<<21,i<128)?t:C$X(t|=(15&(i=n[this.pos]))<<28,e,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=z$Q(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var i=F$Y(this);for(e=e||[];this.pos<i;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===h$V.Varint)for(;this.buf[this.pos++]>127;);else if(t===h$V.Bytes)this.pos=this.readVarint()+this.pos;else if(t===h$V.Fixed32)this.pos+=4;else{if(t!==h$V.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var i=new Uint8Array(t);i.set(this.buf),this.buf=i,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),p$R(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),p$R(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),p$R(this.buf,-1&e,this.pos),p$R(this.buf,Math.floor(e*M$V),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),p$R(this.buf,-1&e,this.pos),p$R(this.buf,Math.floor(e*M$V),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?T$S(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=J$Q(this.buf,e,this.pos);var i=this.pos-t;i>=128&&k$Q(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),g$Z.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),g$Z.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i<t;i++)this.buf[this.pos++]=e[i]},writeRawMessage:function(e,t){this.pos++;var i=this.pos;e(t,this);var n=this.pos-i;n>=128&&k$Q(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,i){this.writeTag(e,h$V.Bytes),this.writeRawMessage(t,i)},writePackedVarint:function(e,t){this.writeMessage(e,I$14,t)},writePackedSVarint:function(e,t){this.writeMessage(e,U$V,t)},writePackedBoolean:function(e,t){this.writeMessage(e,H$Y,t)},writePackedFloat:function(e,t){this.writeMessage(e,A$11,t)},writePackedDouble:function(e,t){this.writeMessage(e,R$R,t)},writePackedFixed32:function(e,t){this.writeMessage(e,_$N,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,m$U,t)},writePackedFixed64:function(e,t){this.writeMessage(e,G$11,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,j$U,t)},writeBytesField:function(e,t){this.writeTag(e,h$V.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,h$V.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,h$V.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,h$V.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,h$V.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,h$V.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,h$V.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,h$V.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,h$V.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,h$V.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var _0x322d3d=(_0x4680e9=!0,function(e,t){var i=_0x4680e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4680e9=!1,i}),_0x202d25=_0x322d3d(void 0,(function(){return _0x202d25.toString().search("(((.+)+)+)+$").toString().constructor(_0x202d25).search("(((.+)+)+)+$")})),_0x4680e9;_0x202d25();var _0x1f7179=function(e,t,i){this.x=e.x,this.y=e.y,this.z=e.z,this.grid=t||new _0x34e302(ne$C,16,0),this.featureIndexArray=i||new _0x3b6dea};function _0x361652(e){for(var t=1/0,i=1/0,n=-1/0,r=-1/0,o=0,a=e;o<a.length;o+=1){var s=a[o];t=Math.min(t,s.x),i=Math.min(i,s.y),n=Math.max(n,s.x),r=Math.max(r,s.y)}return{minX:t,minY:i,maxX:n,maxY:r}}function _0x545dd7(e,t){return t-e}function _0x56535c(e,t,i){if(e$2e(i)&&i.realtime&&e$2e(i.zoom)){var n=i.zoom-e,r=ne$C/(t*Math.pow(2,n));return r*=t/512}return ne$C/t}_0x1f7179.prototype.insert=function(e,t,i,n,r,o,a){var s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(i,n,r);var l=this.grid;a=a||0;for(var u=0;u<t.length;u++){for(var c=t[u],h=[1/0,1/0,-1/0,-1/0],d=0;d<c.length;d++){var f=c[d];h[0]=Math.min(h[0],f.x),h[1]=Math.min(h[1],f.y),h[2]=Math.max(h[2],f.x),h[3]=Math.max(h[3],f.y)}h[0]<ne$C&&h[1]<ne$C&&h[2]>=0&&h[3]>=0&&l.insert(s,h[0]-a,h[1]-a,h[2]+a,h[3]+a)}},_0x1f7179.prototype.loadVTLayers=function(){return!this.vtLayers&&(this.vtLayers=new _0x424242(new h$V(this.rawTileData)).layers,this.sourceLayerCoder=new _0x536dbd(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},_0x1f7179.prototype.query=function(e,t,i){var n=this;this.loadVTLayers();var r=e.params||{},o=_0x56535c(this.z,e.tileSize,r),a=_0x51a3ff.createFilter(r.filter),s=e.queryGeometry,l=5,u=_0x361652(s),c=[];e$2e(r.selectTolerance)&&(l+=o*r.selectTolerance),(c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l)).sort(_0x545dd7);for(var h,d={},f=function(i){var l=c[i];if(l!==h){h=l;var u=n.featureIndexArray.get(l),f=null;n.loadMatchingFeature(d,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,a,r.layers,t,(function(t,i){!f&&(f=_0x182c2a(t));return i.queryIntersectsFeature(s,t,{},f,n.z,e.transform,o,e.pixelPosMatrix,e.adjustScale)}))}},p=0;p<c.length;p++)f(p);return d},_0x1f7179.prototype.loadMatchingFeature=function(e,t,i,n,r,o,a,s){if(e$2e(t)&&e$2e(i)&&e$2e(n)){var l=this.bucketLayerIDs[t];if(!o||arraysIntersect(o,l)){var u=this.sourceLayerCoder.decode(i),c=this.vtLayers[u].feature(n);if(r(new _0x47eac1(this.z),c))for(var h=0;h<l.length;h++){var d=l[h];if(!(o&&o.indexOf(d)<0)){var f=a[d];if(f){var p=!s||s(c,f);if(p){c.layer=f.serialize();var _=e[d];void 0===_&&(_=e[d]=[]),_.push({featureIndex:n,feature:c,intersectionZ:p})}}}}}}},_0x1f7179.prototype.lookupSymbolFeatures=function(e,t,i,n,r,o){var a={};this.loadVTLayers();for(var s=createFilter(n),l=0,u=e;l<u.length;l+=1){var c=u[l];this.loadMatchingFeature(a,t,i,c,s,r,o)}return a},_0x1f7179.prototype.hasLayer=function(e){for(var t=0,i=this.bucketLayerIDs;t<i.length;t+=1)for(var n=0,r=i[t];n<r.length;n+=1){if(e===r[n])return!0}return!1},_0x3abd5c.register("FeatureIndex",_0x1f7179,{omit:["rawTileData","sourceLayerCoder","vtLayers"]});var _0x2e57b2=(_0x4824bf=!0,function(e,t){var i=_0x4824bf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4824bf=!1,i}),_0x310027=_0x2e57b2(void 0,(function(){return _0x310027.toString().search("(((.+)+)+)+$").toString().constructor(_0x310027).search("(((.+)+)+)+$")})),_0x4824bf;_0x310027();var _0x1a19cf={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};function _0x2c23ed(e,t){void 0===t&&(t=1);var i=0,n=0;return{members:e.map((function(e){var r=_0x25e008(e.type),o=i=_0x34a9f1(i,Math.max(t,r)),a=e.components||1;return n=Math.max(n,r),i+=r*a,{name:e.name,type:e.type,components:a,offset:o}})),size:_0x34a9f1(i,Math.max(n,t)),alignment:t}}function _0x25e008(e){return _0x1a19cf[e].BYTES_PER_ELEMENT}function _0x34a9f1(e,t){return Math.ceil(e/t)*t}var _0xc03f44=(_0x4552ff=!0,function(e,t){var i=_0x4552ff?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4552ff=!1,i}),_0x410df6=_0xc03f44(void 0,(function(){return _0x410df6.toString().search("(((.+)+)+)+$").toString().constructor(_0x410df6).search("(((.+)+)+)+$")})),_0x4552ff;_0x410df6();var _0x1e8367=function(e){void 0===e&&(e=[]),this.segments=e};_0x1e8367.prototype.prepareSegment=function(e,t,i,n){var r=this.segments[this.segments.length-1];return(!r||r.vertexLength+e>_0x1e8367.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==n)&&(r={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},void 0!==n&&(r.sortKey=n),this.segments.push(r)),r},_0x1e8367.prototype.get=function(){return this.segments},_0x1e8367.prototype.destroy=function(){for(var e=0,t=this.segments;e<t.length;e+=1){var i=t[e];for(var n in i.cesiumVaos)i.cesiumVaos[n].destroy()}},_0x1e8367.simpleSegment=function(e,t,i,n){return new _0x1e8367([{vertexOffset:e,primitiveOffset:t,vertexLength:i,primitiveLength:n,vaos:{},cesiumVaos:{},drawCommands:{},sortKey:0}])},_0x1e8367.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,_0x3abd5c.register("SegmentVector",_0x1e8367);var _0x3ece5e=(_0x3cc752=!0,function(e,t){var i=_0x3cc752?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3cc752=!1,i}),_0x39c314=_0x3ece5e(void 0,(function(){return _0x39c314.toString().search("(((.+)+)+)+$").toString().constructor(_0x39c314).search("(((.+)+)+)+$")})),_0x3cc752;_0x39c314();var _0xab3045=function(e,t,i){this.property=e,this.value=t,this.parameters=i};_0xab3045.prototype.isConstant=function(){return"constant"===this.value.kind},_0xab3045.prototype.constantOr=function(e){return"constant"===this.value.kind?this.value.value:e},_0xab3045.prototype.evaluate=function(e,t,i){return this.property.evaluate(this.value,this.parameters,e,t,i)};var _0x3d809b={},_0xafdf4=function(e,t){this.gl=e.gl,this.location=t};_0x3d809b.Uniform1i=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,t,i),this.current=0}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},r}(_0xafdf4),_0x3d809b.Uniform1f=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(_0xafdf4),_0x3d809b.Uniform2f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(_0xafdf4),_0x3d809b.Uniform3f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(_0xafdf4),_0x3d809b.Uniform4f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},t}(_0xafdf4),_0x3d809b.UniformColor=function(e){function t(t,i){e.call(this,t,i),this.current=_0x546352.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(_0xafdf4);var _0x152617=new Float32Array(16);_0x3d809b.UniformMatrix4f=function(e){function t(t,i){e.call(this,t,i),this.current=_0x152617}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.gl.uniformMatrix4fv(this.location,!1,e)},t}(_0xafdf4);var _0x33a3f9=(_0x16985b=!0,function(e,t){var i=_0x16985b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16985b=!1,i}),_0x5599a9=_0x33a3f9(void 0,(function(){return _0x5599a9.toString().search("(((.+)+)+)+$").toString().constructor(_0x5599a9).search("(((.+)+)+)+$")})),_0x16985b;function _0x42145e(){}_0x5599a9(),_0x42145e.toVertexBuffer=function(e,t,i,n){var r=t$X.createVertexBuffer({context:e,typedArray:t.arrayBuffer,usage:n?A$18.DYNAMIC_DRAW:A$18.STATIC_DRAW});return r.vertexArrayDestroyable=!1,r.bytesPerElement=t.bytesPerElement,r.length=t.length,r.attributes=i,r.itemSize=t.bytesPerElement,r.dynamicDraw=n,!n&&delete t.arrayBuffer,r},_0x42145e.toIndexBuffer=function(e,t,i){if(0!==t.length){var n=t$X.createIndexBuffer({context:e,typedArray:t.arrayBuffer,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});return n.vertexArrayDestroyable=!1,n.dynamicDraw=i,!n.dynamicDraw&&delete t.arrayBuffer,n}},_0x42145e.toRenderState=function(e,t,i){var n=Ee$r.DISABLED;e.blendFunction[0]==de$y.ONE&&e.blendFunction[1]==de$y.ONE_MINUS_SRC_ALPHA&&(n=Ee$r.ALPHA_BLEND);var r={frontFace:i.frontFace,cull:{enabled:i.enable,face:i.mode},depthRange:{near:t.range[0],far:t.range[1]},depthTest:{enabled:t.func!==de$y.ALWAYS,func:t.func},depthMask:t.mask,colorMask:{red:e.mask[0],green:e.mask[1],blue:e.mask[2],alpha:e.mask[3]},blending:n};return d$1m.fromCache(r)},_0x42145e.toComponentDatatype=function(e){switch(e){case"Int8":return S$14.BYTE;case"Uint8":return S$14.UNSIGNED_BYTE;case"Int16":return S$14.SHORT;case"Uint16":return S$14.UNSIGNED_SHORT;case"Int32":return S$14.INT;case"Uint32":return S$14.UNSIGNED_INT;default:return S$14.FLOAT}},_0x42145e.mbxAttributeToCesiumVertexArrtribute=function(e,t,i,n){var r=this.toComponentDatatype(e.type);S$14.getSizeInBytes(r);var o=t.bytesPerElement,a=e.offset+o*(n||0);return{name:e.name,index:i,vertexBuffer:t,componentsPerAttribute:e.components,componentDatatype:r,offsetInBytes:a,strideInBytes:o,normalize:!1}};var _0x4b28a0=(_0x111c5d=!0,function(e,t){var i=_0x111c5d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x111c5d=!1,i}),_0x6e98c4=_0x4b28a0(void 0,(function(){return _0x6e98c4.toString().search("(((.+)+)+)+$").toString().constructor(_0x6e98c4).search("(((.+)+)+)+$")})),_0x111c5d;_0x6e98c4();var _0x1dfe29=function(){this.ids=[],this.positions=[],this.indexed=!1};function _0x2e7ec5(e,t,i,n){if(!(i>=n)){for(var r=e[i+n>>1],o=i-1,a=n+1;;){do{o++}while(e[o]<r);do{a--}while(e[a]>r);if(o>=a)break;_0x4a53f8(e,o,a),_0x4a53f8(t,3*o,3*a),_0x4a53f8(t,3*o+1,3*a+1),_0x4a53f8(t,3*o+2,3*a+2)}_0x2e7ec5(e,t,i,a),_0x2e7ec5(e,t,a+1,n)}}function _0x4a53f8(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}_0x1dfe29.prototype.add=function(e,t,i,n){this.ids.push(e),this.positions.push(t,i,n)},_0x1dfe29.prototype.getPositions=function(e){for(var t=0,i=this.ids.length-1;t<i;){var n=t+i>>1;this.ids[n]>=e?i=n:t=n+1}for(var r=[];this.ids[t]===e;){var o=this.positions[3*t],a=this.positions[3*t+1],s=this.positions[3*t+2];r.push({index:o,start:a,end:s}),t++}return r},_0x1dfe29.serialize=function(e,t){var i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return _0x2e7ec5(i,n,0,i.length-1),t&&t.push(i.buffer,n.buffer),{ids:i,positions:n}},_0x1dfe29.deserialize=function(e){var t=new _0x1dfe29;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},_0x3abd5c.register("FeaturePositionMap",_0x1dfe29);var _0x5d8abd=(_0x18230e=!0,function(e,t){var i=_0x18230e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x18230e=!1,i}),_0x1f138b=_0x5d8abd(void 0,(function(){return _0x1f138b.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f138b).search("(((.+)+)+)+$")})),_0x18230e;function _0x3fe2f3(e,t,i){return Math.min(i,Math.max(t,e))}function _0x5976b6(e,t){return 256*(e=_0x3fe2f3(Math.floor(e),0,255))+(t=_0x3fe2f3(Math.floor(t),0,255))}function _0x4b5c07(e){return[_0x5976b6(255*e.r,255*e.g),_0x5976b6(255*e.b,255*e.a)]}_0x1f138b();var _0x576981=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0};_0x576981.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},_0x576981.prototype.setConstantPatternPositions=function(){},_0x576981.prototype.populatePaintArray=function(){},_0x576981.prototype.updatePaintArray=function(){},_0x576981.prototype.upload=function(){},_0x576981.prototype.destroy=function(){},_0x576981.prototype.setUniforms=function(e,t,i,n){t.set(n.constantOr(this.value))},_0x576981.prototype.getBinding=function(e,t){return"color"===this.type?new _0x3d809b.UniformColor(e,t):new _0x3d809b.Uniform1f(e,t)},_0x576981.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){var e=n.get(i).constantOr(r.value);return"color"===r.type&&(e.red=e.r,e.green=e.g,e.blue=e.b,e.alpha=e.a),e}},_0x576981.serialize=function(e){var t=e.value,i=e.names,n=e.type;return{value:_0x3abd5c.serialize(t),names:i,type:n}},_0x576981.deserialize=function(e){var t=e.value,i=e.names,n=e.type;return new _0x576981(_0x3abd5c.deserialize(t),i,n)};var _0x4110f2=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};_0x4110f2.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},_0x4110f2.prototype.populatePaintArray=function(){},_0x4110f2.prototype.updatePaintArray=function(){},_0x4110f2.prototype.upload=function(){},_0x4110f2.prototype.destroy=function(){},_0x4110f2.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},_0x4110f2.prototype.setUniforms=function(e,t,i,n,r){var o=this.patternPositions;"u_pattern_to"===r&&o.patternTo&&t.set(e$2c(o.patternTo[0],o.patternTo[1],o.patternTo[2],o.patternTo[3])),"u_pattern_from"===r&&o.patternFrom&&t.set(e$2c(o.patternFrom[0],o.patternFrom[1],o.patternFrom[2],o.patternFrom[3]))},_0x4110f2.prototype.getBinding=function(e,t){return new _0x3d809b.Uniform4f(e,t)},_0x4110f2.prototype.setUniformMap=function(e,t,i,n){var r=this.patternPositions;e[t]=function(){return"u_pattern_to"===t&&r.patternTo?new e$2c(r.patternTo[0],r.patternTo[1],r.patternTo[2],r.patternTo[3]):"u_pattern_from"===t&&r.patternFrom?new e$2c(r.patternFrom[0],r.patternFrom[1],r.patternFrom[2],r.patternFrom[3]):void console.log("CrossFadedConstantBinder is not support")}};var _0x5ae778=function(e,t,i,n){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?2:1,offset:0}})),this.paintVertexArray=new n};_0x5ae778.prototype.defines=function(){return[]},_0x5ae778.prototype.setConstantPatternPositions=function(){},_0x5ae778.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new _0x47eac1(0),t,{},[],n);if("color"===this.type)for(var s=_0x4b5c07(a),l=o;l<e;l++)r.emplaceBack(s[0],s[1]);else{for(var u=o;u<e;u++)r.emplaceBack(a);this.maxValue=Math.max(this.maxValue,a)}},_0x5ae778.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:0},i,n);if("color"===this.type)for(var a=_0x4b5c07(o),s=e;s<t;s++)r.emplace(s,a[0],a[1]);else{for(var l=e;l<t;l++)r.emplace(l,o);this.maxValue=Math.max(this.maxValue,o)}},_0x5ae778.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=_0x42145e.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},_0x5ae778.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},_0x5ae778.prototype.setUniforms=function(e,t){t.set(0)},_0x5ae778.prototype.getBinding=function(e,t){return new _0x3d809b.Uniform1f(e,t)},_0x5ae778.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};var _0x3ba7f7=function(e,t,i,n,r,o){this.expression=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.type=i,this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?4:2,offset:0}})),this.paintVertexArray=new a};_0x3ba7f7.prototype.defines=function(){return[]},_0x3ba7f7.prototype.setConstantPatternPositions=function(){},_0x3ba7f7.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new _0x47eac1(this.zoom),t,{},[],n),s=this.expression.evaluate(new _0x47eac1(this.zoom+1),t,{},[],n);if("color"===this.type)for(var l=_0x4b5c07(a),u=_0x4b5c07(s),c=o;c<e;c++)r.emplaceBack(l[0],l[1],u[0],u[1]);else{for(var h=o;h<e;h++)r.emplaceBack(a,s);this.maxValue=Math.max(this.maxValue,a,s)}},_0x3ba7f7.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},i,n),a=this.expression.evaluate({zoom:this.zoom+1},i,n);if("color"===this.type)for(var s=_0x4b5c07(o),l=_0x4b5c07(a),u=e;u<t;u++)r.emplace(u,s[0],s[1],l[0],l[1]);else{for(var c=e;c<t;c++)r.emplace(c,o,a);this.maxValue=Math.max(this.maxValue,o,a)}},_0x3ba7f7.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=_0x42145e.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},_0x3ba7f7.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},_0x3ba7f7.prototype.interpolationFactor=function(e){return this.useIntegerZoom&&(e=Math.floor(e)),_0x3fe2f3(this.expression.interpolationFactor(e,this.zoom,this.zoom+1),0,1)},_0x3ba7f7.prototype.setUniforms=function(e,t,i){t.set(this.interpolationFactor(i.zoom))},_0x3ba7f7.prototype.getBinding=function(e,t){return new _0x3d809b.Uniform1f(e,t)},_0x3ba7f7.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){return r.interpolationFactor(0)}};var _0x417f45=function(e,t,i,n,r,o,a){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0,this.layerId=a,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:4,offset:0}})),this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o};_0x417f45.prototype.defines=function(){return[]},_0x417f45.prototype.setConstantPatternPositions=function(){},_0x417f45.prototype.populatePaintArray=function(e,t,i){var n=this.zoomInPaintVertexArray,r=this.zoomOutPaintVertexArray,o=this.layerId,a=n.length;if(n.reserve(e),r.reserve(e),i&&t.patterns&&t.patterns[o]){var s=t.patterns[o],l=s.min,u=s.mid,c=s.max,h=i[l],d=i[u],f=i[c];if(!h||!d||!f)return;for(var p=a;p<e;p++)n.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1]),r.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},_0x417f45.prototype.updatePaintArray=function(e,t,i,n,r){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(r&&i.patterns&&i.patterns[s]){var l=i.patterns[s],u=l.min,c=l.mid,h=l.max,d=r[u],f=r[c],p=r[h];if(!d||!f||!p)return;for(var _=e;_<t;_++)o.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],d.tl[0],d.tl[1],d.br[0],d.br[1]),a.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],p.tl[0],p.tl[1],p.br[0],p.br[1])}},_0x417f45.prototype.upload=function(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=_0x42145e.toVertexBuffer(e,this.zoomInPaintVertexArray,this.paintVertexAttributes),this.zoomOutPaintVertexBuffer=_0x42145e.toVertexBuffer(e,this.zoomOutPaintVertexArray,this.paintVertexAttributes))},_0x417f45.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},_0x417f45.prototype.setUniforms=function(e,t){t.set(0)},_0x417f45.prototype.getBinding=function(e,t){return new Uniform1f(e,t)},_0x417f45.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};class _0x2241e8{constructor(){this.binders={},this.cacheKey="",this._buffers=[]}static createDynamic(e,t,i){const n=new _0x2241e8,r=[];for(const o in e.paint._values){if(!i(o))continue;const a=e.paint.get(o);if(!(a instanceof _0xab3045&&supportsPropertyExpression(a.property.specification)))continue;const s=_0x1a0893(o,e.type),l=a.property.specification.type,u=a.property.useIntegerZoom;if("cross-faded"===a.property.specification["property-type"]||"cross-faded-data-driven"===a.property.specification["property-type"])if("constant"===a.value.kind)n.binders[o]=new _0x4110f2(a.value.value,s,l),r.push("/u_"+o);else{const i=_0x46c714(o,l,"source");n.binders[o]=new _0x417f45(a.value,s,l,u,t,i,e.id),r.push("/a_"+o)}else if("constant"===a.value.kind)n.binders[o]=new _0x576981(a.value.value,s,l),r.push("/u_"+o);else if("source"===a.value.kind){const e=_0x46c714(o,l,"source");n.binders[o]=new _0x5ae778(a.value,s,l,e),r.push("/a_"+o)}else{const e=_0x46c714(o,l,"composite");n.binders[o]=new _0x3ba7f7(a.value,s,l,u,t,e),r.push("/z_"+o)}}return n.cacheKey=r.sort().join(""),n}populatePaintArrays(e,t,i,n,r){for(const i in this.binders){this.binders[i].populatePaintArray(e,t,n,r)}}setConstantPatternPositions(e,t){for(const i in this.binders){this.binders[i].setConstantPatternPositions(e,t)}}updatePaintArrays(e,t,i,n,r){let o=!1;for(const a in e){const s=t.getPositions(+a);for(const t of s){const s=i.feature(t.index);for(const i in this.binders){const l=this.binders[i];if(!(l instanceof _0x576981||l instanceof _0x4110f2)&&!0===l.expression.isStateDependent){const u=n.paint.get(i);l.expression=u.value,l.updatePaintArray(t.start,t.end,s,e[a],r),o=!0}}}}return o}defines(){var e=[];for(var t in this.binders)e.push.apply(e,this.binders[t].defines());return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){const i=[];for(const n in this.binders){const r=this.binders[n];for(const o of r.uniformNames)if(t[o]){const a=r.getBinding(e,t[o]);i.push({name:o,property:n,binding:a})}}return i}setUniforms(e,t,i,n){for(const{name:r,property:o,binding:a}of t)this.binders[o].setUniforms(e,a,n,i.get(o),r)}updatePatternPaintBuffers(e){const t=[];for(const i in this.binders){const n=this.binders[i];if(n instanceof _0x417f45){const i=2===e.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;i&&t.push(i)}else(n instanceof _0x5ae778||n instanceof _0x3ba7f7)&&n.paintVertexBuffer&&t.push(n.paintVertexBuffer)}this._buffers=t}upload(e){for(const t in this.binders)this.binders[t].upload(e);const t=[];for(const e in this.binders){const i=this.binders[e];(i instanceof _0x5ae778||i instanceof _0x3ba7f7)&&i.paintVertexBuffer&&t.push(i.paintVertexBuffer)}this._buffers=t}getAttributeLocation(){for(var e=0,t={},i=0;i<this.layoutAttributes.length;i++){t[this.layoutAttributes[i].name]=i,e++}for(var n=this.getPaintVertexBuffers(),r=0;n&&r<n.length;r++)for(var o=n[r],a=0;a<o.attributes.length;a++){t[o.attributes[a].name]=e++}return t}getUniformMaps(e,t,i){for(var n in this.binders)for(var r=this.binders[n],o=0,a=r.uniformNames;o<a.length;o+=1){var s=a[o];e[s]&&r.setUniformMap(i,s,n,t)}for(var l in e)!i[l]&&l.indexOf("_t")>-1&&(i[l]=function(){return 0});return i}destroy(){for(const e in this.binders)this.binders[e].destroy()}}class ProgramConfigurationSet{constructor(e,t,i,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=_0x2241e8.createDynamic(r,i,n),this.programConfigurations[r.id].layoutAttributes=e;this.needsUpload=!1,this._featureMap=new _0x1dfe29,this._bufferOffset=0}populatePaintArrays(e,t,i,n,r){for(const o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(e,t,i,n,r);void 0!==t.id&&this._featureMap.add(+t.id,i,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,i,n){for(const r of i)this.needsUpload=this.programConfigurations[r.id].updatePaintArrays(e,this._featureMap,t,r,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function _0x1a0893(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"text-show-background":["show-background"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function _0x2ded44(e){return{"line-pattern":{source:_0x48bcfe,composite:_0x48bcfe},"fill-pattern":{source:_0x48bcfe,composite:_0x48bcfe},"fill-extrusion-pattern":{source:_0x48bcfe,composite:_0x48bcfe}}[e]}function _0x46c714(e,t,i){var n={color:{source:_0x145fb7,composite:_0x214a88},number:{source:_0x21d029,composite:_0x145fb7}},r=_0x2ded44(e);return r&&r[i]||n[t][i]}_0x3abd5c.register("ConstantBinder",_0x576981),_0x3abd5c.register("CrossFadedConstantBinder",_0x4110f2),_0x3abd5c.register("SourceExpressionBinder",_0x5ae778),_0x3abd5c.register("CrossFadedCompositeBinder",_0x417f45),_0x3abd5c.register("CompositeExpressionBinder",_0x3ba7f7),_0x3abd5c.register("ProgramConfiguration",_0x2241e8,{omit:["_buffers"]}),_0x3abd5c.register("ProgramConfigurationSet",ProgramConfigurationSet);var _0x53d274=(_0x16da73=!0,function(e,t){var i=_0x16da73?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16da73=!1,i}),_0x1bc63e=_0x53d274(void 0,(function(){return _0x1bc63e.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bc63e).search("(((.+)+)+)+$")})),_0x16da73;_0x1bc63e();var _0x208b93=_0x2c23ed([{name:"a_pos",components:2,type:"Int16"}],4),_0xc2a501=_0x208b93.members,_0x33a3a8=_0x2c23ed([{name:"a_pos",components:2,type:"Float32"}],4),_0x113bf4=_0x33a3a8.members;function _0x1164b8(e,t,i,n,r){e.emplaceBack(2*t+(n+1)/2,2*i+(r+1)/2)}var _0x159258=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this._sourceLayerIds={};var t=this;this.layerIds=this.layers.map((function(e,i){return t._sourceLayerIds[e.sourceLayer]=i,e.sourceLayer})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new _0x5ca07d,this.indexArray=new _0x48dae8,this.segments=new _0x1e8367,this.programConfigurations=new ProgramConfigurationSet(_0xc2a501,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x159258.prototype.populate=function(e,t){var i=this.layers[0],n=[],r=null;"circle"===i.type&&(r=i.layout.get("circle-sort-key"));for(var o=0,a=e;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.index,c=s.sourceLayerIndex,h=s.sourceLayerId,d=this._sourceLayerIds[h],f=this.layers[d];if(f){var p=ne$C/512,_=f.paint.get("circle-radius").value.value*p;if(this.layers[0]._featureFilter(new _0x47eac1(0),l)){var m=_0x182c2a(l),g=r?r.evaluate(l,{}):void 0,x={id:l.id,properties:l.properties,type:l.type,sourceLayerIndex:c,index:u,geometry:m,patterns:{},sortKey:g,circleRadius:_};n.push(x)}}}r&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var y=0,v=n;y<v.length;y+=1){var $=v[y],b=$,T=b.geometry,C=b.index,S=b.sourceLayerIndex,w=e[C].feature;this.addFeature($,T,C),t.featureIndex.insert(w,T,C,S,this.index,void 0,b.circleRadius)}},_0x159258.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},_0x159258.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_0x159258.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_0x159258.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=e.webgpu?_0x113bf4:_0xc2a501;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=_0x42145e.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0x42145e.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},_0x159258.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},_0x159258.prototype.clear=function(){e$2e(this.layoutVertexArray)&&(this.layoutVertexArray=null),e$2e(this.indexArray)&&(this.indexArray=null)},_0x159258.prototype.addFeature=function(e,t,i){for(var n=0,r=t;n<r.length;n+=1)for(var o=0,a=r[n];o<a.length;o+=1){var s=a[o],l=s.x,u=s.y;if(!(l<0||l>=ne$C||u<0||u>=ne$C)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),h=c.vertexLength;_0x1164b8(this.layoutVertexArray,l,u,-1,-1),_0x1164b8(this.layoutVertexArray,l,u,1,-1),_0x1164b8(this.layoutVertexArray,l,u,1,1),_0x1164b8(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,{})},_0x3abd5c.register("CircleBucket",_0x159258,{omit:["layers"]});var _0x4b0e87=(_0x2e7326=!0,function(e,t){var i=_0x2e7326?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e7326=!1,i}),_0x3c0748=_0x4b0e87(void 0,(function(){return _0x3c0748.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c0748).search("(((.+)+)+)+$")})),_0x2e7326;_0x3c0748();var _0x55570d=function(e){this.specification=e};_0x55570d.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},_0x55570d.prototype.interpolate=function(e,t,i){var n=interpolate[this.specification.type];return n?n(e,t,i):e},_0x3abd5c.register("DataConstantProperty",_0x55570d);var _0x41f8f6=(_0x2c55a8=!0,function(e,t){var i=_0x2c55a8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c55a8=!1,i}),_0xd65267=_0x41f8f6(void 0,(function(){return _0xd65267.toString().search("(((.+)+)+)+$").toString().constructor(_0xd65267).search("(((.+)+)+)+$")})),_0x2c55a8;_0xd65267();var _0xe8091e=function(e,t){this.specification=e,this.overrides=t};_0xe8091e.prototype.possiblyEvaluate=function(e,t,i){return"constant"===e.expression.kind||"camera"===e.expression.kind?new _0xab3045(this,{kind:"constant",value:e.expression.evaluate(t,null,{},i)},t):new _0xab3045(this,e.expression,t)},_0xe8091e.prototype.interpolate=function(e,t,i){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new _0xab3045(this,{kind:"constant",value:void 0},e.parameters);var n=interpolate[this.specification.type];return n?new _0xab3045(this,{kind:"constant",value:n(e.value.value,t.value.value,i)},e.parameters):e},_0xe8091e.prototype.evaluate=function(e,t,i,n,r){return"constant"===e.kind?e.value:e.evaluate(t,i,n,r)},_0x3abd5c.register("DataDrivenProperty",_0xe8091e);var _0x1a3204=(_0x472ac5=!0,function(e,t){var i=_0x472ac5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x472ac5=!1,i}),_0x508aed=_0x1a3204(void 0,(function(){return _0x508aed.toString().search("(((.+)+)+)+$").toString().constructor(_0x508aed).search("(((.+)+)+)+$")})),_0x472ac5;_0x508aed();var _0x42d187=function(e,t){this.property=e,this.value=t,this.expression=_0x8808b2.normalizePropertyExpression(void 0===t?e.specification.default:t,e.specification)};_0x42d187.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},_0x42d187.prototype.possiblyEvaluate=function(e,t){return this.property.possiblyEvaluate(this,e,t)};var _0x32472b=(_0x387fe3=!0,function(e,t){var i=_0x387fe3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x387fe3=!1,i}),_0x56000c=_0x32472b(void 0,(function(){return _0x56000c.toString().search("(((.+)+)+)+$").toString().constructor(_0x56000c).search("(((.+)+)+)+$")})),_0x387fe3;function _0x3a8331(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,i=t*e;return 4*(e<.5?i:3*(e-t)+i-.75)}_0x56000c();var _0x4a210e=function(e,t,i,n,r){this.property=e,this.value=t,this.begin=r+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=i)};_0x4a210e.prototype.possiblyEvaluate=function(e,t){var i=e.now||0,n=this.value.possiblyEvaluate(e,t),r=this.prior;if(r){if(i>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(i<this.begin)return r.possiblyEvaluate(e,t);var o=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(r.possiblyEvaluate(e,t),n,_0x3a8331(o))}return n};var _0x5e559f=(_0x379623=!0,function(e,t){var i=_0x379623?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x379623=!1,i}),_0x1a7c3c=_0x5e559f(void 0,(function(){return _0x1a7c3c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a7c3c).search("(((.+)+)+)+$")})),_0x379623;_0x1a7c3c();var _0x4e5a47=function(e){this.property=e,this.value=new _0x42d187(e,void 0)};_0x4e5a47.prototype.transitioned=function(e,t){return new _0x4a210e(this.property,this.value,t,extend$1({},e.transition,this.transition),e.now)},_0x4e5a47.prototype.untransitioned=function(){return new _0x4a210e(this.property,this.value,null,{},0)};var _0x322359=(_0xb68442=!0,function(e,t){var i=_0xb68442?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb68442=!1,i}),_0xe7325=_0x322359(void 0,(function(){return _0xe7325.toString().search("(((.+)+)+)+$").toString().constructor(_0xe7325).search("(((.+)+)+)+$")})),_0xb68442;_0xe7325();var _0x183b6f=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var i=e[t];i.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new _0x42d187(i,void 0),r=this.defaultTransitionablePropertyValues[t]=new _0x4e5a47(i);this.defaultTransitioningPropertyValues[t]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}},_0x5538dc=(_0x7a5be2=!0,function(e,t){var i=_0x7a5be2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x7a5be2=!1,i}),_0x41a94e=_0x5538dc(void 0,(function(){return _0x41a94e.toString().search("(((.+)+)+)+$").toString().constructor(_0x41a94e).search("(((.+)+)+)+$")})),_0x7a5be2;function _0x20fd4c(){}_0x41a94e(),_0x20fd4c.getMaximumPaintValue=function(e,t,i){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:i.programConfigurations.get(t.id).binders[e].maxValue},_0x20fd4c.translateDistance=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},_0x20fd4c.translate=function(e,t,i,n,r){if(!t||!t[0]&&!t[1])return e;var o=_0x4f59fa.convert(t)._mult(r);"viewport"===i&&o._rotate(-n);for(var a=[],s=0;s<e.length;s++){var l=e[s];a.push(l.sub(o))}return a};var _0x42c2f8=(_0x45de28=!0,function(e,t){var i=_0x45de28?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45de28=!1,i}),_0x544a57=_0x42c2f8(void 0,(function(){return _0x544a57.toString().search("(((.+)+)+)+$").toString().constructor(_0x544a57).search("(((.+)+)+)+$")})),_0x45de28;_0x544a57();var _0x75086b=function(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)};_0x75086b.prototype.get=function(e){return this._values[e]};var _0x4e78a6=(_0x27532a=!0,function(e,t){var i=_0x27532a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27532a=!1,i}),_0x5271cb=_0x4e78a6(void 0,(function(){return _0x5271cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x5271cb).search("(((.+)+)+)+$")})),_0x27532a;_0x5271cb();var _0x14aaff=function(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)};_0x14aaff.prototype.getValue=function(e){return clone(this._values[e].value)},_0x14aaff.prototype.setValue=function(e,t){this._values[e]=new _0x42d187(this._values[e].property,null===t?void 0:clone(t))},_0x14aaff.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r)}return e},_0x14aaff.prototype.possiblyEvaluate=function(e,t){for(var i=new _0x75086b(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i};var _0x5824de=(_0x294f0b=!0,function(e,t){var i=_0x294f0b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x294f0b=!1,i}),_0x593ee1=_0x5824de(void 0,(function(){return _0x593ee1.toString().search("(((.+)+)+)+$").toString().constructor(_0x593ee1).search("(((.+)+)+)+$")})),_0x294f0b;_0x593ee1();var _0x2448fe=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};_0x2448fe.prototype.possiblyEvaluate=function(e,t){for(var i=new _0x75086b(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i},_0x2448fe.prototype.hasTransition=function(){for(var e=0,t=Object.keys(this._values);e<t.length;e+=1){var i=t[e];if(this._values[i].prior)return!0}return!1};var _0xf6514=(_0x79cbb8=!0,function(e,t){var i=_0x79cbb8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x79cbb8=!1,i}),_0x1c4532=_0xf6514(void 0,(function(){return _0x1c4532.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c4532).search("(((.+)+)+)+$")})),_0x79cbb8;_0x1c4532();var _0x43def0=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};_0x43def0.prototype.getValue=function(e){return clone(this._values[e].value.value)},_0x43def0.prototype.setValue=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new _0x4e5a47(this._values[e].property)),this._values[e].value=new _0x42d187(this._values[e].property,null===t?void 0:clone(t))},_0x43def0.prototype.getTransition=function(e){return clone(this._values[e].transition)},_0x43def0.prototype.setTransition=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new _0x4e5a47(this._values[e].property)),this._values[e].transition=clone(t)||void 0},_0x43def0.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r);var o=this.getTransition(n);void 0!==o&&(e[n+"-transition"]=o)}return e},_0x43def0.prototype.transitioned=function(e,t){for(var i=new _0x2448fe(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].transitioned(e,t._values[o])}return i},_0x43def0.prototype.untransitioned=function(){for(var e=new _0x2448fe(this._properties),t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t];e._values[n]=this._values[n].untransitioned()}return e};var _0x1b490c=(_0x46b961=!0,function(e,t){var i=_0x46b961?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x46b961=!1,i}),_0x506d5b=_0x1b490c(void 0,(function(){return _0x506d5b.toString().search("(((.+)+)+)+$").toString().constructor(_0x506d5b).search("(((.+)+)+)+$")})),_0x46b961;_0x506d5b();var _0x1c5838="-transition";function _0x5aba43(e,t){if(this.id=e.id,this.type=e.type,"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new _0x14aaff(t.layout)),t.paint)){for(var i in this._transitionablePaint=new _0x43def0(t.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var n in e.layout)this.setLayoutProperty(n,e.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}_0x5aba43.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},_0x5aba43.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},_0x5aba43.prototype.setLayoutProperty=function(e,t,i){if(null!=t)this.id;if("visibility"===e)return this.visibility=t,void(this.config&&this.config.layout&&(this.config.layout.visibility=t));this._unevaluatedLayout.setValue(e,t)},_0x5aba43.prototype.getPaintProperty=function(e){return endsWith(e,_0x1c5838)?this._transitionablePaint.getTransition(e.slice(0,-_0x1c5838.length)):this._transitionablePaint.getValue(e)},_0x5aba43.prototype.setPaintProperty=function(e,t,i){if(null!=t)this.id;if(endsWith(e,_0x1c5838))return this._transitionablePaint.setTransition(e.slice(0,-_0x1c5838.length),t||void 0),!1;var n=this._transitionablePaint._values[e],r="cross-faded-data-driven"===n.property.specification["property-type"],o=n.value.isDataDriven(),a=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var s=this._transitionablePaint._values[e].value;return s.isDataDriven()||o||r||this._handleOverridablePaintPropertyUpdate(e,a,s)},_0x5aba43.prototype._handleSpecialPaintPropertyUpdate=function(e){},_0x5aba43.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!1},_0x5aba43.prototype.isHidden=function(e){return!!(this.minzoom&&e<this.minzoom)||(!!(this.maxzoom&&e>=this.maxzoom)||"none"===this.visibility)},_0x5aba43.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},_0x5aba43.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},_0x5aba43.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,t)},_0x5aba43.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),filterObject(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},_0x5aba43.prototype._validate=function(e,t,i,n,r){return!0},_0x5aba43.prototype.is3D=function(){return!1},_0x5aba43.prototype.isTileClipped=function(){return!1},_0x5aba43.prototype.hasOffscreenPass=function(){return!1},_0x5aba43.prototype.resize=function(){},_0x5aba43.prototype.isStateDependent=function(){return!0};var _0x1b4df7=(_0x4951d4=!0,function(e,t){var i=_0x4951d4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4951d4=!1,i}),_0x4b5ecc=_0x1b4df7(void 0,(function(){return _0x4b5ecc.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b5ecc).search("(((.+)+)+)+$")})),_0x4951d4;_0x4b5ecc();var _0x4f6965=8,_0x47f7cc={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},_0x396795={"*":{type:"source"}},_0x1d8ed3=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],_0x49f57={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},_0x2a5735={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},_0xfaf5de={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},_0x27e02e={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},_0x1f12e1={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},_0x5bcfe7={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},_0x71d783={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},_0x57f5b0=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],_0x3b46aa={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x81e45b={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0xf36542={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x5f15e9={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x10627e={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x2ec865={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x35e110={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0xf9a5e={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x44e1a6={type:"array",value:"*"},_0x1eafe1={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},_0x33b855={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},_0x310134={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},_0x3a5696={type:"array",value:"*",minimum:1},_0x5698da={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},_0x1763b2={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},_0x5800e6=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],_0x5e0f21={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},_0x4639a1={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},_0x5e8c43={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},_0x268cf5={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x1e67bc={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-show-background":{type:"boolean",default:!1,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},_0x3cf53c={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x1816ba={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x130ec7={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x31d3fb={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},_0x3d343c={$version:_0x4f6965,$root:_0x47f7cc,sources:_0x396795,source:_0x1d8ed3,source_vector:_0x49f57,source_raster:_0x2a5735,source_raster_dem:_0xfaf5de,source_geojson:_0x27e02e,source_video:_0x1f12e1,source_image:_0x5bcfe7,layer:_0x71d783,layout:_0x57f5b0,layout_background:_0x3b46aa,layout_fill:_0x81e45b,layout_circle:_0xf36542,layout_heatmap:_0x5f15e9,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:_0x10627e,layout_symbol:_0x2ec865,layout_raster:_0x35e110,layout_hillshade:_0xf9a5e,filter:_0x44e1a6,filter_operator:_0x1eafe1,geometry_type:_0x33b855,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:_0x310134,expression:_0x3a5696,expression_name:_0x5698da,light:_0x1763b2,paint:_0x5800e6,paint_fill:_0x5e0f21,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:_0x4639a1,paint_circle:_0x5e8c43,paint_heatmap:_0x268cf5,paint_symbol:_0x1e67bc,paint_raster:_0x3cf53c,paint_hillshade:_0x1816ba,paint_background:_0x130ec7,transition:_0x31d3fb,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},_0x51c853=(_0x449841=!0,function(e,t){var i=_0x449841?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x449841=!1,i}),_0x524859=_0x51c853(void 0,(function(){return _0x524859.toString().search("(((.+)+)+)+$").toString().constructor(_0x524859).search("(((.+)+)+)+$")})),_0x449841;function _0x22dd4b(){}function _0x45f458(e,t,i){if(e.length>1){if(_0x2cf157(e,t))return!0;for(var n=0;n<t.length;n++)if(_0x524860(t[n],e,i))return!0}for(var r=0;r<e.length;r++)if(_0x524860(e[r],t,i))return!0;return!1}function _0x2cf157(e,t){if(0===e.length||0===t.length)return!1;for(var i=0;i<e.length-1;i++)for(var n=e[i],r=e[i+1],o=0;o<t.length-1;o++){if(_0x67de90(n,r,t[o],t[o+1]))return!0}return!1}function _0x67de90(e,t,i,n){return isCounterClockwise(e,i,n)!==isCounterClockwise(t,i,n)&&isCounterClockwise(e,t,i)!==isCounterClockwise(e,t,n)}function _0x524860(e,t,i){var n=i*i;if(1===t.length)return e.distSqr(t[0])<n;for(var r=1;r<t.length;r++){var o=t[r-1],a=t[r];if(_0x22dd4b.distToSegmentSquared(e,o,a)<n)return!0}return!1}function _0x43133b(e,t){for(var i,n,r,o=!1,a=0;a<e.length;a++)for(var s=0,l=(i=e[a]).length-1;s<i.length;l=s++)n=i[s],r=i[l],n.y>t.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(o=!o);return o}function _0x545e12(e,t){for(var i=!1,n=0,r=e.length-1;n<e.length;r=n++){var o=e[n],a=e[r];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}_0x524859(),_0x22dd4b.polygonIntersectsPolygon=function(e,t){for(var i=0;i<e.length;i++)if(_0x545e12(t,e[i]))return!0;for(var n=0;n<t.length;n++)if(_0x545e12(e,t[n]))return!0;return!!_0x2cf157(e,t)},_0x22dd4b.polygonIntersectsBufferedPoint=function(e,t,i){return!!_0x545e12(e,t)||!!_0x524860(t,e,i)},_0x22dd4b.polygonIntersectsMultiPolygon=function(e,t){if(1===e.length)return _0x43133b(t,e[0]);for(var i=0;i<t.length;i++)for(var n=t[i],r=0;r<n.length;r++)if(_0x545e12(e,n[r]))return!0;for(var o=0;o<e.length;o++)if(_0x43133b(t,e[o]))return!0;for(var a=0;a<t.length;a++)if(_0x2cf157(e,t[a]))return!0;return!1},_0x22dd4b.polygonIntersectsBufferedMultiLine=function(e,t,i){for(var n=0;n<t.length;n++){var r=t[n];if(e.length>=3)for(var o=0;o<r.length;o++)if(_0x545e12(e,r[o]))return!0;if(_0x45f458(e,r,i))return!0}return!1},_0x22dd4b.distToSegmentSquared=function(e,t,i){var n=t.distSqr(i);if(0===n)return e.distSqr(t);var r=((e.x-t.x)*(i.x-t.x)+(e.y-t.y)*(i.y-t.y))/n;return r<0?e.distSqr(t):r>1?e.distSqr(i):e.distSqr(i.sub(t)._mult(r)._add(t))},_0x22dd4b.polygonIntersectPoint=function(e,t){return _0x545e12(e,t)};var _0x3db580=new _0x183b6f({"circle-sort-key":new _0xe8091e(_0x3d343c.layout_circle["circle-sort-key"])}),_0x18b3b3=new _0x183b6f({"circle-radius":new _0xe8091e(_0x3d343c.paint_circle["circle-radius"]),"circle-color":new _0xe8091e(_0x3d343c.paint_circle["circle-color"]),"circle-blur":new _0xe8091e(_0x3d343c.paint_circle["circle-blur"]),"circle-opacity":new _0xe8091e(_0x3d343c.paint_circle["circle-opacity"]),"circle-translate":new _0x55570d(_0x3d343c.paint_circle["circle-translate"]),"circle-translate-anchor":new _0x55570d(_0x3d343c.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new _0x55570d(_0x3d343c.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new _0x55570d(_0x3d343c.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new _0xe8091e(_0x3d343c.paint_circle["circle-stroke-width"]),"circle-stroke-color":new _0xe8091e(_0x3d343c.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new _0xe8091e(_0x3d343c.paint_circle["circle-stroke-opacity"])}),_0x5a4dd1={paint:_0x18b3b3,layout:_0x3db580},_0x45533e=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x5a4dd1)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.createBucket=function(e){return new _0x159258(e)},r.prototype.queryRadius=function(e){var t=e;return _0x20fd4c.getMaximumPaintValue("circle-radius",this,t)+_0x20fd4c.getMaximumPaintValue("circle-stroke-width",this,t)+_0x20fd4c.translateDistance(this.paint.get("circle-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a,s,l){s=_0x927af8();for(var u=_0x20fd4c.translate(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),0,a),c=this.paint.get("circle-radius")?.evaluate(t,i),h=this.paint.get("circle-stroke-width")?.evaluate(t,i),d=c+h,f="map"===this.paint.get("circle-pitch-alignment"),p=f?u:_0x2cb43e(u,s),_=f?d*a:d,m=0,g=n;m<g.length;m+=1)for(var x=0,y=g[m];x<y.length;x+=1){var v=y[x],$=f?v:_0x4ce250(v,s),b=_;if(_0x417195([],[v.x,v.y,0,1],s),"viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")||"map"===this.paint.get("circle-pitch-scale")&&this.paint.get("circle-pitch-alignment"),l=e$2e(l)?l:10,_0x22dd4b.polygonIntersectsBufferedPoint(p,$,b*l))return!0}return!1},r}(_0x5aba43);function _0x4ce250(e,t){var i=_0x417195([],[e.x,e.y,0,1],t);return new _0x4f59fa(i[0],i[1])}function _0x2cb43e(e,t){return e.map((function(e){return _0x4ce250(e,t)}))}function _0x927af8(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function _0x417195(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,e[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,e[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,e[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,e}const _0x2649e6=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4a1776=_0x2649e6(void 0,(function(){return _0x4a1776.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a1776).search("(((.+)+)+)+$")}));function _0x32573f(e,t){this._transformRequestFn=e,this._customAccessToken=t}function _0x86b94a(e){return 0===e.indexOf("mapbox:")}_0x4a1776(),_0x32573f.prototype._createSkuToken=function(){const e=createSkuToken();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},_0x32573f.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},_0x32573f.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},_0x32573f.prototype.normalizeStyleURL=function(e,t){if(!_0x86b94a(e))return e;const i=_0x3a2cd8(e);return i.path="/styles/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||t)},_0x32573f.prototype.normalizeGlyphsURL=function(e,t){if(!_0x86b94a(e))return e;const i=_0x3a2cd8(e);return i.path="/fonts/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||t)},_0x32573f.prototype.normalizeSourceURL=function(e,t){if(!_0x86b94a(e))return e;const i=_0x3a2cd8(e);return i.path="/v4/"+i.authority+".json",i.params.push("secure"),this._makeAPIURL(i,this._customAccessToken||t)},_0x32573f.prototype.normalizeSpriteURL=function(e,t,i,n){const r=_0x3a2cd8(e);return _0x86b94a(e)?(r.path="/styles/v1"+r.path+"/sprite"+t+i,this._makeAPIURL(r,this._customAccessToken||n)):(r.path+=""+t+i,_0xe08040(r))},_0x32573f.prototype.normalizeTileURL=function(e,t,i){if(this._isSkuTokenExpired()&&this._createSkuToken(),!t||!_0x86b94a(t))return e;const n=_0x3a2cd8(e),r=browser.devicePixelRatio>=2||512===i?"@2x":"",o=webpSupported.supported?".webp":"$1";return n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+r+o),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path,config.REQUIRE_ACCESS_TOKEN&&(config.ACCESS_TOKEN||this._customAccessToken)&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,this._customAccessToken)},_0x32573f.prototype.canonicalizeTileURL=function(e){const t=_0x3a2cd8(e);if(!t.path.match(/(^\/v4\/)/)||!t.path.match(/\.[\w]+$/))return e;let i="mapbox://tiles/";i+=t.path.replace("/v4/","");const n=t.params.filter((e=>!e.match(/^access_token=/)));return n.length&&(i+="?"+n.join("&")),i},_0x32573f.prototype.canonicalizeTileset=function(e,t){if(!_0x86b94a(t))return e.tiles||[];const i=[];for(const t of e.tiles){const e=this.canonicalizeTileURL(t);i.push(e)}return i},_0x32573f.prototype._makeAPIURL=function(e,t){const i=_0x3a2cd8(config.API_URL);if(e.protocol=i.protocol,e.authority=i.authority,"/"!==i.path&&(e.path=""+i.path+e.path),!config.REQUIRE_ACCESS_TOKEN)return _0xe08040(e);if(!(t=t||config.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. ");if("s"===t[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ");return e.params=e.params.filter((e=>-1===e.indexOf("access_token"))),e.params.push("access_token="+t),_0xe08040(e)};const _0x39cc93=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function _0x5cbcf2(e){return _0x39cc93.test(e)}function _0x3fee28(e){return e.indexOf("sku=")>0&&_0x5cbcf2(e)}const _0x5bdb84=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function _0x3a2cd8(e){const t=e.match(_0x5bdb84);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function _0xe08040(e){const t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}const _0x47e513=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1d4013=_0x47e513(void 0,(function(){return _0x1d4013.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d4013).search("(((.+)+)+)+$")}));_0x1d4013();const _0x4658ba="mapbox-tiles",_0x10cc94=42e4;let _0x1373f1;function _0x262968(e,t){if(void 0===_0x1373f1)try{new Response(new ReadableStream),_0x1373f1=!0}catch(e){_0x1373f1=!1}_0x1373f1?t(e.body):e.blob().then(t)}function cachePut(e,t,i){if(!window.caches)return;const n={status:t.status,statusText:t.statusText,headers:new window.Headers};t.headers.forEach(((e,t)=>n.headers.set(t,e)));const r=parseCacheControl(t.headers.get("Cache-Control")||"");if(r["no-store"])return;r["max-age"]&&n.headers.set("Expires",new Date(i+1e3*r["max-age"]).toUTCString());new Date(n.headers.get("Expires")).getTime()-i<_0x10cc94||_0x262968(t,(t=>{const i=new window.Response(t,n);window.caches.open(_0x4658ba).then((t=>t.put(_0x1a5839(e.url),i)))}))}function _0x1a5839(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function cacheGet(e,t){if(!window.caches)return t(null);const i=_0x1a5839(e.url);window.caches.open(_0x4658ba).catch(t).then((e=>{e.match(i).catch(t).then((n=>{const r=_0x205fe3(n);e.delete(i),r&&e.put(i,n.clone()),t(null,n,r)}))}))}function _0x205fe3(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")),i=parseCacheControl(e.headers.get("Cache-Control")||"");return t>Date.now()&&!i["no-cache"]}const _0x436057=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2ccc6a=_0x436057(void 0,(function(){return _0x2ccc6a.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ccc6a).search("(((.+)+)+)+$")}));_0x2ccc6a();const _0x3c9422={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(_0x3c9422);class _0x4104b6 extends Error{constructor(e,t,i){401===t&&_0x5cbcf2(i)&&(e+=": you may have provided an invalid Mapbox access token."),super(e),this.status=t,this.url=i,this.name=this.constructor.name,this.message=e}toString(){return this.name+": "+this.message+" ("+this.status+"): "+this.url}}const getReferrer=isWorker()?()=>self.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href,_0x4df7c9=e=>/^file:/.test(e)||/^file:/.test(getReferrer())&&!/^\w+:/.test(e);function _0x3aa81f(e,t){const i=isWorker()?self:window,n=new i.AbortController,r=new i.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:getReferrer(),signal:n.signal});let o=!1,a=!1;const s=_0x3fee28(r.url);"json"===e.type&&r.headers.set("Accept","application/json");const l=(n,o,l)=>{if(a)return;if(n&&"SecurityError"!==n.message&&warnOnce(n),o&&l)return u(o);const c=Date.now();i.fetch(r).then((i=>{if(i.ok){const e=s?i.clone():null;return u(i,e,c)}return t(new _0x4104b6(i.statusText,i.status,e.url))})).catch((e=>{20!==e.code&&t(new Error(e.message))}))},u=(i,n,s)=>{("arrayBuffer"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text()).then((e=>{a||(n&&s&&cachePut(r,n,s),o=!0,t(null,e,i.headers.get("Cache-Control"),i.headers.get("Expires")))})).catch((e=>t(new Error(e.message))))};return s?cacheGet(r,l):l(null,null),{cancel:()=>{a=!0,o||n.abort()}}}function _0x5ebdb0(e,t){const i=new((isWorker()?self:window).XMLHttpRequest);i.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(i.responseType="arraybuffer");for(const t in e.headers)i.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=()=>{t(new Error(i.statusText))},i.onload=()=>{if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){let n=i.response;if("json"===e.type)try{n=JSON.parse(i.response)}catch(e){return t(e)}t(null,n,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else t(new _0x4104b6(i.statusText,i.status,e.url))},i.send(e.body),{cancel:()=>i.abort()}}const makeRequest=function(e,t){const i=isWorker()?self:window;if(!_0x4df7c9(e.url)){if(i.fetch&&i.Request&&i.AbortController&&i.Request.prototype.hasOwnProperty("signal"))return _0x3aa81f(e,t);if(isWorker()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}return _0x5ebdb0(e,t)},getJSON=function(e,t){return makeRequest(extend$1(e,{type:"json"}),t)},getArrayBuffer=function(e,t){return makeRequest(extend$1(e,{type:"arrayBuffer"}),t)},_0x193ad4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let _0x221de9,_0x2b82c4;const resetImageRequestQueue=()=>{_0x221de9=[],_0x2b82c4=0};resetImageRequestQueue();const _0x3c9f90=16,getImage=function(e,t){if(_0x2b82c4>=_0x3c9f90){const i={requestParameters:e,callback:t,cancelled:!1,cancel(){this.cancelled=!0}};return _0x221de9.push(i),i}_0x2b82c4++;let i=!1;const n=()=>{if(!i)for(i=!0,_0x2b82c4--;_0x221de9.length&&_0x2b82c4<_0x3c9f90;){const e=_0x221de9.shift(),{requestParameters:t,callback:i,cancelled:n}=e;!n&&(e.cancel=getImage(t,i).cancel)}},r=getArrayBuffer(e,((e,i,r,o)=>{if(n(),e)t(e);else if(i){const e=new window.Image,n=window.URL||window.webkitURL;e.onload=()=>{t(null,e),n.revokeObjectURL(e.src)},e.onerror=()=>t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const a=new window.Blob([new Uint8Array(i)],{type:"image/png"});e.cacheControl=r,e.expires=o,e.src=i.byteLength?n.createObjectURL(a):_0x193ad4}}));return{cancel:()=>{r.cancel(),n()}}},_0x405c5e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x8e8f39=_0x405c5e(void 0,(function(){return _0x8e8f39.toString().search("(((.+)+)+)+$").toString().constructor(_0x8e8f39).search("(((.+)+)+)+$")}));_0x8e8f39();const symbolLayoutAttributes=_0x2c23ed([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),dynamicLayoutAttributes=_0x2c23ed([{name:"a_projected_pos",components:3,type:"Float32"}],4);_0x2c23ed([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),_0x2c23ed([{name:"a_fade_opacity",components:1,type:"Float32"}],4);const collisionVertexAttributes=_0x2c23ed([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);_0x2c23ed([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]);const collisionBoxLayout=_0x2c23ed([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),collisionCircleLayout=_0x2c23ed([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);_0x2c23ed([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),_0x2c23ed([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"}]),_0x2c23ed([{type:"Float32",name:"offsetX"}]),_0x2c23ed([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var _0x4bae1e=(_0x38506e=!0,function(e,t){var i=_0x38506e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38506e=!1,i}),_0x131229=_0x4bae1e(void 0,(function(){return _0x131229.toString().search("(((.+)+)+)+$").toString().constructor(_0x131229).search("(((.+)+)+)+$")})),_0x38506e;_0x131229();var _0x3de98d={"Latin-1 Supplement":function(e){return e>=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};const _0x5021b7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x50d670=_0x5021b7(void 0,(function(){return _0x50d670.toString().search("(((.+)+)+)+$").toString().constructor(_0x50d670).search("(((.+)+)+)+$")}));function allowsVerticalWritingMode(e){for(const t of e)if(charHasUprightVerticalOrientation(t.charCodeAt(0)))return!0;return!1}function charHasUprightVerticalOrientation(e){return 746===e||747===e||!(e<4352)&&(!!_0x3de98d["Bopomofo Extended"](e)||(!!_0x3de98d.Bopomofo(e)||(!(!_0x3de98d["CJK Compatibility Forms"](e)||e>=65097&&e<=65103)||(!!_0x3de98d["CJK Compatibility Ideographs"](e)||(!!_0x3de98d["CJK Compatibility"](e)||(!!_0x3de98d["CJK Radicals Supplement"](e)||(!!_0x3de98d["CJK Strokes"](e)||(!(!_0x3de98d["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||(!!_0x3de98d["CJK Unified Ideographs Extension A"](e)||(!!_0x3de98d["CJK Unified Ideographs"](e)||(!!_0x3de98d["Enclosed CJK Letters and Months"](e)||(!!_0x3de98d["Hangul Compatibility Jamo"](e)||(!!_0x3de98d["Hangul Jamo Extended-A"](e)||(!!_0x3de98d["Hangul Jamo Extended-B"](e)||(!!_0x3de98d["Hangul Jamo"](e)||(!!_0x3de98d["Hangul Syllables"](e)||(!!_0x3de98d.Hiragana(e)||(!!_0x3de98d["Ideographic Description Characters"](e)||(!!_0x3de98d.Kanbun(e)||(!!_0x3de98d["Kangxi Radicals"](e)||(!!_0x3de98d["Katakana Phonetic Extensions"](e)||(!(!_0x3de98d.Katakana(e)||12540===e)||(!(!_0x3de98d["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||(!(!_0x3de98d["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||(!!_0x3de98d["Unified Canadian Aboriginal Syllabics"](e)||(!!_0x3de98d["Unified Canadian Aboriginal Syllabics Extended"](e)||(!!_0x3de98d["Vertical Forms"](e)||(!!_0x3de98d["Yijing Hexagram Symbols"](e)||(!!_0x3de98d["Yi Syllables"](e)||!!_0x3de98d["Yi Radicals"](e))))))))))))))))))))))))))))))}function charInRTLScript(e){return e>=1424&&e<=2303||_0x3de98d["Arabic Presentation Forms-A"](e)||_0x3de98d["Arabic Presentation Forms-B"](e)}function stringContainsRTLText(e){for(const t of e)if(charInRTLScript(t.charCodeAt(0)))return!0;return!1}_0x50d670();const _0x1d4b39=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1d4b87=_0x1d4b39(void 0,(function(){return _0x1d4b87.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d4b87).search("(((.+)+)+)+$")}));_0x1d4b87();const verticalizedCharacterMap={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var _0x435140=(_0x23f07c=!0,function(e,t){var i=_0x23f07c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23f07c=!1,i}),_0x4e4ee4=_0x435140(void 0,(function(){return _0x4e4ee4.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e4ee4).search("(((.+)+)+)+$")})),_0x23f07c;_0x4e4ee4();var _0xa42d39=(_0x23a592=!0,function(e,t){var i=_0x23a592?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23a592=!1,i}),_0x5c59a7=_0xa42d39(void 0,(function(){return _0x5c59a7.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c59a7).search("(((.+)+)+)+$")})),_0x23a592;function _0x17ce8d(e){var t={},i={},n=[],r=0;function o(t){n.push(e[t]),r++}function a(e,t,r){var o=i[e];return delete i[e],i[t]=o,n[o].geometry[0].pop(),n[o].geometry[0]=n[o].geometry[0].concat(r[0]),o}function s(e,i,r){var o=t[i];return delete t[i],t[e]=o,n[o].geometry[0].shift(),n[o].geometry[0]=r[0].concat(n[o].geometry[0]),o}function l(e,t,i){var n=i?t[0][t[0].length-1]:t[0][0];return e+":"+n.x+":"+n.y}for(var u=0;u<e.length;u++){var c=e[u],h=c.geometry,d=c.text?c.text.toString():null;if(d){var f=l(d,h),p=l(d,h,!0);if(f in i&&p in t&&i[f]!==t[p]){var _=s(f,p,h),m=a(f,p,n[_].geometry);delete t[f],delete i[p],i[l(d,n[m].geometry,!0)]=m,n[_].geometry=null}else f in i?a(f,p,h):p in t?s(f,p,h):(o(u),t[f]=r-1,i[p]=r-1)}else o(u)}return n.filter((function(e){return e.geometry}))}_0x5c59a7();var _0x3bd6a0=function(e,t){void 0===t&&(t={}),extend$1(this,t),this.type=e};!function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){void 0===i&&(i={}),e.call(this,"error",extend$1({error:t},i))}n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r}(_0x3bd6a0);const _0x4993f0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x50ad45=_0x4993f0(void 0,(function(){return _0x50ad45.toString().search("(((.+)+)+)+$").toString().constructor(_0x50ad45).search("(((.+)+)+)+$")}));let _0xc1901a,_0x26bd65;_0x50ad45();const _0x3ba476={getImageData(e,t){const i=window.document.createElement("canvas"),n=i.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return i.width=e.width,i.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:e=>(_0xc1901a||(_0xc1901a=window.document.createElement("a")),_0xc1901a.href=e,_0xc1901a.href),hardwareConcurrency:window.navigator.hardwareConcurrency||4,get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(null==_0x26bd65&&(_0x26bd65=window.matchMedia("(prefers-reduced-motion: reduce)")),_0x26bd65.matches)}},_0x38fe05=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5f2188=_0x38fe05(void 0,(function(){return _0x5f2188.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f2188).search("(((.+)+)+)+$")}));_0x5f2188();var _0x4a15d8=(_0x480a64=!0,function(e,t){var i=_0x480a64?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x480a64=!1,i}),_0x31e1b5=_0x4a15d8(void 0,(function(){return _0x31e1b5.toString().search("(((.+)+)+)+$").toString().constructor(_0x31e1b5).search("(((.+)+)+)+$")})),_0x480a64;_0x31e1b5();var _0x1e70b4=(_0x4eea67=!0,function(e,t){var i=_0x4eea67?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4eea67=!1,i}),_0x4fdf64=_0x1e70b4(void 0,(function(){return _0x4fdf64.toString().search("(((.+)+)+)+$").toString().constructor(_0x4fdf64).search("(((.+)+)+)+$")})),_0x4eea67;_0x4fdf64();var _0x18147d=function(e,t){_0x3ce6f9(this,e,1,t)};function _0x3ce6f9(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function _0x1aefb(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=_0x3ce6f9({},{width:n,height:r},i);_0x28d709(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function _0x28d709(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}_0x18147d.prototype.resize=function(e){_0x1aefb(this,e,1)},_0x18147d.prototype.clone=function(){return new _0x18147d({width:this.width,height:this.height},new Uint8Array(this.data))},_0x18147d.copy=function(e,t,i,n,r){_0x28d709(e,t,i,n,r,1)},_0x3abd5c.register("AlphaImage",_0x18147d);const _0xd14542=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3c0aa8=_0xd14542(void 0,(function(){return _0x3c0aa8.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c0aa8).search("(((.+)+)+)+$")}));_0x3c0aa8();const _0x53727f=3;function _0x2190fd(e,t,i){1===e&&i.readMessage(_0x5bb137,t)}function _0x5bb137(e,t,i){if(3===e){const{id:e,bitmap:n,width:r,height:o,left:a,top:s,advance:l}=i.readMessage(_0x282bfb,{});t.push({id:e,bitmap:new _0x18147d({width:r+2*_0x53727f,height:o+2*_0x53727f},n),metrics:{width:r,height:o,left:a,top:s,advance:l}})}}function _0x282bfb(e,t,i){1===e?t.id=i.readVarint():2===e?t.bitmap=i.readBytes():3===e?t.width=i.readVarint():4===e?t.height=i.readVarint():5===e?t.left=i.readSVarint():6===e?t.top=i.readSVarint():7===e&&(t.advance=i.readVarint())}function _0x7f378d(e){return new h$V(e).readFields(_0x2190fd,[])}const _0x206565=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2bb0f5=_0x206565(void 0,(function(){return _0x2bb0f5.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bb0f5).search("(((.+)+)+)+$")}));_0x2bb0f5();const _0x2e52db={horizontal:1,vertical:2,horizontalOnly:3};var _0x50d70d=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n,r){e.call(this,t,i),this.angle=n,void 0!==r&&(this.segment=r)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.clone=function(){return new r(this.x,this.y,this.angle,this.segment)},r}(_0x4f59fa);_0x3abd5c.register("Anchor",_0x50d70d);var _0x133948=(_0x4ee099=!0,function(e,t){var i=_0x4ee099?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4ee099=!1,i}),_0x392708=_0x133948(void 0,(function(){return _0x392708.toString().search("(((.+)+)+)+$").toString().constructor(_0x392708).search("(((.+)+)+)+$")})),_0x4ee099;_0x392708();var _0x245488=(_0x5a1b90=!0,function(e,t){var i=_0x5a1b90?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a1b90=!1,i}),_0x1b6324=_0x245488(void 0,(function(){return _0x1b6324.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b6324).search("(((.+)+)+)+$")})),_0x5a1b90;_0x1b6324();var _0x2c3838=(_0x53ad5d=!0,function(e,t){var i=_0x53ad5d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53ad5d=!1,i}),_0x22a4fa=_0x2c3838(void 0,(function(){return _0x22a4fa.toString().search("(((.+)+)+)+$").toString().constructor(_0x22a4fa).search("(((.+)+)+)+$")})),_0x53ad5d;_0x22a4fa();var _0x197fdb=(_0x2acd76=!0,function(e,t){var i=_0x2acd76?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2acd76=!1,i}),_0x1eaf8e=_0x197fdb(void 0,(function(){return _0x1eaf8e.toString().search("(((.+)+)+)+$").toString().constructor(_0x1eaf8e).search("(((.+)+)+)+$")})),_0x2acd76;_0x1eaf8e();var _0x220a8c=(_0x5af0b4=!0,function(e,t){var i=_0x5af0b4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5af0b4=!1,i}),_0x1bee88=_0x220a8c(void 0,(function(){return _0x1bee88.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bee88).search("(((.+)+)+)+$")})),_0x5af0b4;_0x1bee88();var _0x5703b9=(_0x4438fd=!0,function(e,t){var i=_0x4438fd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4438fd=!1,i}),_0x5d7800=_0x5703b9(void 0,(function(){return _0x5d7800.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d7800).search("(((.+)+)+)+$")})),_0x4438fd;function s$K(e,t,i,n,r){x$Y(e,t,i||0,n||e.length-1,r||C$W)}function x$Y(e,t,i,n,r){for(;n>i;){if(n-i>600){var o=n-i+1,a=t-i+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);x$Y(e,t,Math.max(i,Math.floor(t-a*l/o+u)),Math.min(n,Math.floor(t+(o-a)*l/o+u)),r)}var c=e[t],h=i,d=n;for(e$1i(e,i,t),r(e[n],c)>0&&e$1i(e,i,n);h<d;){for(e$1i(e,h,d),h++,d--;r(e[h],c)<0;)h++;for(;r(e[d],c)>0;)d--}0===r(e[i],c)?e$1i(e,i,d):e$1i(e,++d,n),d<=t&&(i=d+1),t<=d&&(n=d-1)}}function e$1i(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function C$W(e,t){return e<t?-1:e>t?1:0}_0x5d7800();var _0x28b959=(_0x4fe302=!0,function(e,t){var i=_0x4fe302?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fe302=!1,i}),_0x181fc4=_0x28b959(void 0,(function(){return _0x181fc4.toString().search("(((.+)+)+)+$").toString().constructor(_0x181fc4).search("(((.+)+)+)+$")})),_0x4fe302;function _0xa07c1a(e){for(var t=0,i=0,n=e.length,r=n-1,o=void 0,a=void 0;i<n;r=i++)o=e[i],t+=((a=e[r]).x-o.x)*(o.y+a.y);return t}function _0x1294f3(e,t){var i=e.length;if(i<=1)return[e];for(var n,r,o=[],a=0;a<i;a++){var s=_0xa07c1a(e[a]);0!==s&&(e[a].area=Math.abs(s),void 0===r&&(r=s<0),r===s<0?(n&&o.push(n),n=[e[a]]):n.push(e[a]))}if(n&&o.push(n),t>1)for(var l=0;l<o.length;l++)o[l].length<=t||(s$K(o[l],t,1,o[l].length-1,_0x335cbf),o[l]=o[l].slice(0,t));return o}function _0x335cbf(e,t){return t.area-e.area}_0x181fc4();var _0x410e75=(_0x5a315a=!0,function(e,t){var i=_0x5a315a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a315a=!1,i}),_0x2fde92=_0x410e75(void 0,(function(){return _0x2fde92.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fde92).search("(((.+)+)+)+$")})),_0x5a315a;_0x2fde92();const _0x586b27=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xdf9ae9=_0x586b27(void 0,(function(){return _0xdf9ae9.toString().search("(((.+)+)+)+$").toString().constructor(_0xdf9ae9).search("(((.+)+)+)+$")}));_0xdf9ae9();const _0x57d579=255,_0x50f556=_0x57d579*_0x36d5e2;var _0x47de9c=(_0x3ba186=!0,function(e,t){var i=_0x3ba186?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ba186=!1,i}),_0x4a5431=_0x47de9c(void 0,(function(){return _0x4a5431.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a5431).search("(((.+)+)+)+$")})),_0x3ba186;function _0x591b8a(e,t,i){var n=t.layout.get("text-transform").evaluate(i,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),e}function _0x3f1769(e,t,i){return e.sections.forEach((function(e){e.text=_0x591b8a(e.text,t,i)})),e}_0x4a5431();var _0x40d4ff=(_0x179f05=!0,function(e,t){var i=_0x179f05?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x179f05=!1,i}),_0x411ac9=_0x40d4ff(void 0,(function(){return _0x411ac9.toString().search("(((.+)+)+)+$").toString().constructor(_0x411ac9).search("(((.+)+)+)+$")})),_0x179f05;function _0x223d44(e,t){return t.replace(/{([^{}]+)}/g,((t,i)=>i in e?String(e[i]):""))}_0x411ac9();var _0x40b324={kind:"color"},_0x3634c4={kind:"formatted"},_0x59cfe0=new _0x183b6f({"symbol-placement":new _0x55570d(_0x3d343c.layout_symbol["symbol-placement"]),"symbol-spacing":new _0x55570d(_0x3d343c.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new _0x55570d(_0x3d343c.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new _0xe8091e(_0x3d343c.layout_symbol["symbol-sort-key"]),"symbol-z-order":new _0x55570d(_0x3d343c.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new _0x55570d(_0x3d343c.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new _0x55570d(_0x3d343c.layout_symbol["icon-ignore-placement"]),"icon-optional":new _0x55570d(_0x3d343c.layout_symbol["icon-optional"]),"icon-rotation-alignment":new _0x55570d(_0x3d343c.layout_symbol["icon-rotation-alignment"]),"icon-size":new _0xe8091e(_0x3d343c.layout_symbol["icon-size"]),"icon-text-fit":new _0x55570d(_0x3d343c.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new _0x55570d(_0x3d343c.layout_symbol["icon-text-fit-padding"]),"icon-image":new _0xe8091e(_0x3d343c.layout_symbol["icon-image"]),"icon-rotate":new _0xe8091e(_0x3d343c.layout_symbol["icon-rotate"]),"icon-padding":new _0x55570d(_0x3d343c.layout_symbol["icon-padding"]),"icon-keep-upright":new _0x55570d(_0x3d343c.layout_symbol["icon-keep-upright"]),"icon-offset":new _0xe8091e(_0x3d343c.layout_symbol["icon-offset"]),"icon-anchor":new _0xe8091e(_0x3d343c.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new _0x55570d(_0x3d343c.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new _0x55570d(_0x3d343c.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new _0x55570d(_0x3d343c.layout_symbol["text-rotation-alignment"]),"text-field":new _0xe8091e(_0x3d343c.layout_symbol["text-field"]),"text-font":new _0xe8091e(_0x3d343c.layout_symbol["text-font"]),"text-size":new _0xe8091e(_0x3d343c.layout_symbol["text-size"]),"text-max-width":new _0xe8091e(_0x3d343c.layout_symbol["text-max-width"]),"text-line-height":new _0x55570d(_0x3d343c.layout_symbol["text-line-height"]),"text-letter-spacing":new _0xe8091e(_0x3d343c.layout_symbol["text-letter-spacing"]),"text-justify":new _0xe8091e(_0x3d343c.layout_symbol["text-justify"]),"text-radial-offset":new _0xe8091e(_0x3d343c.layout_symbol["text-radial-offset"]),"text-variable-anchor":new _0x55570d(_0x3d343c.layout_symbol["text-variable-anchor"]),"text-anchor":new _0xe8091e(_0x3d343c.layout_symbol["text-anchor"]),"text-max-angle":new _0x55570d(_0x3d343c.layout_symbol["text-max-angle"]),"text-writing-mode":new _0x55570d(_0x3d343c.layout_symbol["text-writing-mode"]),"text-rotate":new _0xe8091e(_0x3d343c.layout_symbol["text-rotate"]),"text-padding":new _0x55570d(_0x3d343c.layout_symbol["text-padding"]),"text-keep-upright":new _0x55570d(_0x3d343c.layout_symbol["text-keep-upright"]),"text-transform":new _0xe8091e(_0x3d343c.layout_symbol["text-transform"]),"text-offset":new _0xe8091e(_0x3d343c.layout_symbol["text-offset"]),"text-allow-overlap":new _0x55570d(_0x3d343c.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new _0x55570d(_0x3d343c.layout_symbol["text-ignore-placement"]),"text-optional":new _0x55570d(_0x3d343c.layout_symbol["text-optional"])}),_0x59894c=new _0x183b6f({"icon-opacity":new _0xe8091e(_0x3d343c.paint_symbol["icon-opacity"]),"icon-color":new _0xe8091e(_0x3d343c.paint_symbol["icon-color"]),"icon-halo-color":new _0xe8091e(_0x3d343c.paint_symbol["icon-halo-color"]),"icon-halo-width":new _0xe8091e(_0x3d343c.paint_symbol["icon-halo-width"]),"icon-halo-blur":new _0xe8091e(_0x3d343c.paint_symbol["icon-halo-blur"]),"icon-translate":new _0x55570d(_0x3d343c.paint_symbol["icon-translate"]),"icon-translate-anchor":new _0x55570d(_0x3d343c.paint_symbol["icon-translate-anchor"]),"text-opacity":new _0xe8091e(_0x3d343c.paint_symbol["text-opacity"]),"text-color":new _0xe8091e(_0x3d343c.paint_symbol["text-color"],{runtimeType:_0x40b324,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new _0xe8091e(_0x3d343c.paint_symbol["text-halo-color"]),"text-halo-width":new _0xe8091e(_0x3d343c.paint_symbol["text-halo-width"]),"text-halo-blur":new _0xe8091e(_0x3d343c.paint_symbol["text-halo-blur"]),"text-show-background":new _0xe8091e(_0x3d343c.paint_symbol["text-show-background"]),"text-translate":new _0x55570d(_0x3d343c.paint_symbol["text-translate"]),"text-translate-anchor":new _0x55570d(_0x3d343c.paint_symbol["text-translate-anchor"])}),_0x397123={paint:_0x59894c,layout:_0x59cfe0},_0x1a13f5=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x397123)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){if(e.prototype.recalculate.call(this,t,i),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"line"==this.layout.get("symbol-placement")&&"viewport"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="map"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var r=[],o=0,a=n;o<a.length;o+=1){var s=a[o];r.indexOf(s)<0&&r.push(s)}this.layout._values["text-writing-mode"]=r}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},r.prototype.getValueAndResolveTokens=function(e,t,i){var n=this.layout.get(e).evaluate(t,{},i),r=this._unevaluatedLayout._values[e];return r.isDataDriven()||_0x8808b2.isExpression(r.value)||!n?n:_0x223d44(t.properties,n)},r.prototype.createBucket=function(e){return new _0xe0cd88(e)},r.prototype.queryRadius=function(){return 0},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){return _0x22dd4b.polygonIntersectPoint(e,n[0][0])},r.prototype._setPaintOverrides=function(){for(var e=0,t=_0x397123.paint.overridableProperties;e<t.length;e+=1){var i=t[e];if(r.hasPaintOverride(this.layout,i)){var n=this.paint.get(i);new FormatSectionOverride(n);"constant"===n.value.kind||n.value.kind,this.paint._values[i]=new PossiblyEvaluatedPropertyValue(n.property,null,n.parameters)}}},r.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!(!this.layout||t.isDataDriven()||i.isDataDriven())&&r.hasPaintOverride(this.layout,e)},r.hasPaintOverride=function(e,t){var i=e.get("text-field"),n=_0x397123.paint.properties[t],r=!1,o=function(e){for(var t=0,i=e;t<i.length;t+=1){var o=i[t];if(n.overrides&&n.overrides.hasOverride(o))return void(r=!0)}};if("constant"===i.value.kind&&i.value.value instanceof _0x4dced4)o(i.value.value.sections);else if("source"===i.value.kind){var a=function(e){if(!r)if(e instanceof _0x23876d&&_0x2eeeb8.typeOf(e.value)===_0x3634c4){var t=e.value;o(t.sections)}else e instanceof _0x3903ec?o(e.sections):e.eachChild(a)},s=i.value;s._styleExpression&&a(s._styleExpression.expression)}return r},r.hasPaintOverrides=function(e){for(var t=0,i=_0x397123.paint.overridableProperties;t<i.length;t+=1){var n=i[t];if(r.hasPaintOverride(e,n))return!0}return!1},r}(_0x5aba43),_0x248740=(_0x4994a5=!0,function(e,t){var i=_0x4994a5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4994a5=!1,i}),_0x30012f=_0x248740(void 0,(function(){return _0x30012f.toString().search("(((.+)+)+)+$").toString().constructor(_0x30012f).search("(((.+)+)+)+$")})),_0x4994a5;_0x30012f();var _0x203056=["Unknown","Point","LineString","Polygon"],_0x282e77=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function _0x34f077(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=s?Math.min(_0x50f556,Math.round(s[0])):0,p=s?Math.min(_0x50f556,Math.round(s[1])):0;e.emplaceBack(t,i,Math.round(32*n),Math.round(32*r),o,a,(f<<1)+(l?1:0),p,16*u,16*c,256*h,256*d)}function _0x3b8a98(e,t,i){e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i)}function _0x31cd0c(e){for(var t=0,i=e.sections;t<i.length;t+=1){if(stringContainsRTLText(i[t].text))return!0}return!1}var _0x1ea804=function(e){this.layoutVertexArray=new _0x2a61c9,this.indexArray=new _0x48dae8,this.programConfigurations=e,this.segments=new _0x1e8367,this.dynamicLayoutVertexArray=new _0x2ef918,this.opacityVertexArray=new _0x4fd342,this.placedSymbolArray=new _0x11df68};_0x1ea804.prototype.upload=function(e,t,i,n){i&&(this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=_0x42145e.toVertexBuffer(e,this.layoutVertexArray,symbolLayoutAttributes.members)),this.indexArray.length>0&&(this.indexBuffer=_0x42145e.toIndexBuffer(e,this.indexArray,t)),this.dynamicLayoutVertexArray.length>0&&(this.dynamicLayoutVertexBuffer=_0x42145e.toVertexBuffer(e,this.dynamicLayoutVertexArray,dynamicLayoutAttributes.members,!0)),this.opacityVertexArray.length>0&&(this.opacityVertexBuffer=_0x42145e.toVertexBuffer(e,this.opacityVertexArray,_0x282e77,!0),this.opacityVertexBuffer.itemSize=1)),(i||n)&&this.programConfigurations.upload(e)},_0x1ea804.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.dynamicLayoutVertexBuffer&&(this.dynamicLayoutVertexBuffer.destroy(),this.dynamicLayoutVertexBuffer=null),this.opacityVertexBuffer&&(this.opacityVertexBuffer.destroy(),this.opacityVertexBuffer=null),this.programConfigurations.destroy(),this.segments.destroy()},_0x1ea804.prototype.clear=function(){},_0x3abd5c.register("SymbolBuffers",_0x1ea804);var _0x2fc634=function(e,t,i){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new i,this.segments=new _0x1e8367,this.collisionVertexArray=new _0x503e36};_0x2fc634.prototype.upload=function(e){this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=_0x42145e.toVertexBuffer(e,this.layoutVertexArray,this.layoutAttributes)),this.indexArray.length>0&&(this.indexBuffer=_0x42145e.toIndexBuffer(e,this.indexArray)),this.collisionVertexArray.length>0&&(this.collisionVertexBuffer=_0x42145e.toVertexBuffer(e,this.collisionVertexArray,collisionVertexAttributes.members,!0))},_0x2fc634.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.collisionVertexBuffer&&(this.collisionVertexBuffer.destroy(),this.collisionVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.segments.destroy()},_0x3abd5c.register("CollisionBuffers",_0x2fc634);var _0x13c6f8=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasPaintOverrides=!1,this.hasRTLText=!1;var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=_0x471d9f(this.zoom,t["text-size"]),this.iconSizeData=_0x471d9f(this.zoom,t["icon-size"]);var i=this.layers[0].layout,n=i.get("symbol-sort-key"),r=i.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==r&&void 0!==n.constantOr(1);var o="viewport-y"===r||"auto"===r&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map((function(e){return _0x2e52db[e]}))),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id})),this.sourceID=e.sourceID,this.overscaling=1};_0x13c6f8.prototype.createArrays=function(){const e=this.layers[0].layout;this.hasPaintOverrides=_0x1a13f5.hasPaintOverrides(e);var t=symbolLayoutAttributes.members;this.text=new _0x1ea804(new ProgramConfigurationSet(t,this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new _0x1ea804(new ProgramConfigurationSet(t,this.layers,this.zoom,(e=>/^icon/.test(e)))),this.textCollisionBox=new _0x2fc634(_0x5105bd,collisionBoxLayout.members,_0x3e3135),this.iconCollisionBox=new _0x2fc634(_0x5105bd,collisionBoxLayout.members,_0x3e3135),this.textCollisionCircle=new _0x2fc634(_0x5105bd,collisionCircleLayout.members,_0x48dae8),this.iconCollisionCircle=new _0x2fc634(_0x5105bd,collisionCircleLayout.members,_0x48dae8),this.glyphOffsetArray=new _0x57c4ef,this.lineVertexArray=new _0x4822d1,this.symbolInstances=new _0x6e09ce},_0x13c6f8.prototype.calculateGlyphDependencies=function(e,t,i,n,r){for(let o=0;o<e.length;o++)if(t[e.charCodeAt(o)]=!0,(i||n)&&r){const i=verticalizedCharacterMap[e.charAt(o)];i&&(t[i.charCodeAt(0)]=!0)}},_0x13c6f8.prototype.populate=function(e,t){var i=this.layers[0],n=i.layout,r=n.get("text-font"),o=n.get("text-field"),a=n.get("icon-image"),s=("constant"!==o.value.kind||o.value.value instanceof _0x4dced4&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&("constant"!==r.value.kind||r.value.value.length>0),l=("constant"!==a.value.kind||!!a.value.value)&&Object.keys(a.parameters).length>0,u=n.get("symbol-sort-key");if(this.features=[],s||l){for(var c=t.iconDependencies,h=t.glyphDependencies,d=t.availableImages,f=new _0x47eac1(this.zoom),p=0,_=e;p<_.length;p+=1){var m=_[p],g=m.feature,x=m.index,y=m.sourceLayerIndex;if(i._featureFilter(f,g)){var v=void 0;if(s){var $=i.getValueAndResolveTokens("text-field",g,d),b=_0x4dced4.factory($);_0x31cd0c(b)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===getRTLTextPluginStatus()||this.hasRTLText&&plugin.isParsed())&&(v=_0x3f1769(b,i,g))}var T=void 0;if(l){var C=i.getValueAndResolveTokens("icon-image",g,d);T=C instanceof _0x287856?C:_0x287856.fromString(C)}if(v||T){var S=this.sortFeaturesByKey?u.evaluate(g,{}):void 0,w={text:v,icon:T,index:x,sourceLayerIndex:y,geometry:_0x182c2a(g),properties:g.properties,type:_0x203056[g.type],sortKey:S};if(void 0!==g.id&&(w.id=g.id),this.features.push(w),T&&(c[T.name]=!0),v){var E=r.evaluate(g,{}).join(","),P="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(_0x2e52db.vertical)>=0;for(var A=0,L=v.sections;A<L.length;A+=1){var M=L[A];if(M.image)c[M.image.name]=!0;else{var R=allowsVerticalWritingMode(v.toString()),O=M.fontStack||E,D=h[O]=h[O]||{};this.calculateGlyphDependencies(M.text,D,P,this.allowVerticalPlacement,R)}}}}}}if("point"===n.get("symbol-placement"))for(p=0,_=this.features;p<_.length;p+=1){var I=_[p],F=I.geometry,B=I.index,N=I.sourceLayerIndex,G=e[B].feature;t.featureIndex.insert(G,F,B,N,this.index)}"line"===n.get("symbol-placement")&&(this.features=_0x17ce8d(this.features)),this.sortFeaturesByKey&&this.features.sort((function(e,t){return e.sortKey-t.sortKey}))}},_0x13c6f8.prototype.update=function(e,t,i){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,i),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,i))},_0x13c6f8.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},_0x13c6f8.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},_0x13c6f8.prototype.upload=function(e){this.text&&(!this.uploaded&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e),this.textCollisionCircle.upload(e),this.iconCollisionCircle.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0)},_0x13c6f8.prototype.destroy=function(){this.text&&(this.text.destroy(),this.icon.destroy(),this.textCollisionBox.destroy(),this.iconCollisionBox.destroy(),this.textCollisionCircle.destroy(),this.iconCollisionCircle.destroy())},_0x13c6f8.prototype.clear=function(){},_0x13c6f8.prototype.addToLineVertexArray=function(e,t){var i=this.lineVertexArray.length;if(void 0!==e.segment){for(var n=e.dist(t[e.segment+1]),r=e.dist(t[e.segment]),o={},a=e.segment+1;a<t.length;a++)o[a]={x:t[a].x,y:t[a].y,tileUnitDistanceFromAnchor:n},a<t.length-1&&(n+=t[a+1].dist(t[a]));for(var s=e.segment||0;s>=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:r},s>0&&(r+=t[s-1].dist(t[s]));for(var l=0;l<t.length;l++){var u=o[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:i,lineLength:this.lineVertexArray.length-i}},_0x13c6f8.prototype.addSymbols=function(e,t,i,n,r,o,a,s,l,u,c){var h=this,d=e.indexArray,f=e.layoutVertexArray,p=e.dynamicLayoutVertexArray,_=e.segments.prepareSegment(4*t.length,e.layoutVertexArray,e.indexArray,o.sortKey),m=this.glyphOffsetArray.length,g=_.vertexLength,x=this.allowVerticalPlacement&&a===_0x2e52db.vertical?Math.PI/2:0,y=function(e){var t=e.tl,n=e.tr,r=e.bl,o=e.br,a=e.tex,l=e.pixelOffsetTL,u=e.pixelOffsetBR,c=e.minFontScaleX,m=e.minFontScaleY,g=_.vertexLength,y=e.glyphOffset[1];_0x34f077(f,s.x,s.y,t.x,y+t.y,a.x,a.y+a.h,i,e.isSDF,l.x,l.y,c,m),_0x34f077(f,s.x,s.y,n.x,y+n.y,a.x+a.w,a.y+a.h,i,e.isSDF,u.x,l.y,c,m),_0x34f077(f,s.x,s.y,r.x,y+r.y,a.x,a.y,i,e.isSDF,l.x,u.y,c,m),_0x34f077(f,s.x,s.y,o.x,y+o.y,a.x+a.w,a.y,i,e.isSDF,u.x,u.y,c,m),_0x3b8a98(p,s,x),d.emplaceBack(g,g+1,g+2),d.emplaceBack(g+1,g+2,g+3),_.vertexLength+=4,_.primitiveLength+=2,h.glyphOffsetArray.emplaceBack(e.glyphOffset[0])};if(o.text&&o.text.sections){var v=o.text.sections;if(this.hasPaintOverrides){for(var $,b=function(t,i){void 0!==$&&($!==t||i)&&e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},v[$]),$=t},T=0,C=t;T<C.length;T+=1){var S=C[T];b(S.sectionIndex,!1),y(S)}b($,!0)}else{for(var w=0,E=t;w<E.length;w+=1){y(E[w])}e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},v[0])}}else{for(var P=0,A=t;P<A.length;P+=1){y(A[P])}e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{})}e.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,g,l,u,s.segment,i?i[0]:0,i?i[1]:0,n[0],n[1],a,0,!1,0,c)},_0x13c6f8.prototype._addCollisionDebugVertex=function(e,t,i,n,r,o){return t.emplaceBack(0,0),e.emplaceBack(i.x,i.y,n,r,Math.round(o.x),Math.round(o.y))},_0x13c6f8.prototype.addCollisionDebugVertices=function(e,t,i,n,r,o,a,s){var l=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),u=l.vertexLength,c=r.layoutVertexArray,h=r.collisionVertexArray,d=a.anchorX,f=a.anchorY;if(this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,n)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,n)),l.vertexLength+=4,s){var p=r.indexArray;p.emplaceBack(u,u+1,u+2),p.emplaceBack(u,u+2,u+3),l.primitiveLength+=2}else{var _=r.indexArray;_.emplaceBack(u,u+1),_.emplaceBack(u+1,u+2),_.emplaceBack(u+2,u+3),_.emplaceBack(u+3,u),l.primitiveLength+=4}},_0x13c6f8.prototype.addDebugCollisionBoxes=function(e,t,i,n){for(var r=e;r<t;r++){var o=this.collisionBoxArray.get(r),a=o.x1,s=o.y1,l=o.x2,u=o.y2,c=o.radius>0;this.addCollisionDebugVertices(a,s,l,u,c?n?this.textCollisionCircle:this.iconCollisionCircle:n?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,i,c)}},_0x13c6f8.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e<this.symbolInstances.length;e++){var t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}},_0x13c6f8.prototype._deserializeCollisionBoxesForSymbol=function(e,t,i,n,r,o,a,s,l){for(var u={},c=t;c<i;c++){var h=e.get(c);if(0===h.radius){u.textBox={x1:h.x1,y1:h.y1,x2:h.x2,y2:h.y2,anchorPointX:h.anchorPointX,anchorPointY:h.anchorPointY},u.textFeatureIndex=h.featureIndex;break}!u.textCircles&&(u.textCircles=[],u.textFeatureIndex=h.featureIndex);u.textCircles.push(h.anchorPointX,h.anchorPointY,h.radius,h.signedDistanceFromAnchor,1)}for(var d=n;d<r;d++){var f=e.get(d);if(0===f.radius){u.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalTextFeatureIndex=f.featureIndex;break}}for(var p=o;p<a;p++){var _=e.get(p);if(0===_.radius){u.iconBox={x1:_.x1,y1:_.y1,x2:_.x2,y2:_.y2,anchorPointX:_.anchorPointX,anchorPointY:_.anchorPointY},u.iconFeatureIndex=_.featureIndex;break}}for(var m=s;m<l;m++){var g=e.get(m);if(0===g.radius){u.verticalIconBox={x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,anchorPointX:g.anchorPointX,anchorPointY:g.anchorPointY},u.verticalIconFeatureIndex=g.featureIndex;break}}return u},_0x13c6f8.prototype.deserializeCollisionBoxes=function(e){this.collisionArrays=[];for(var t=0;t<this.symbolInstances.length;t++){var i=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,i.textBoxStartIndex,i.textBoxEndIndex,i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i.iconBoxStartIndex,i.iconBoxEndIndex,i.verticalIconBoxStartIndex,i.verticalIconBoxEndIndex))}},_0x13c6f8.prototype.hasTextData=function(){return this.text.segments.get().length>0},_0x13c6f8.prototype.hasIconData=function(){return this.icon.segments.get().length>0},_0x13c6f8.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},_0x13c6f8.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},_0x13c6f8.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},_0x13c6f8.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},_0x13c6f8.prototype.addIndicesForPlacedSymbol=function(e,t){for(var i=e.placedSymbolArray.get(t),n=i.vertexStartIndex+4*i.numGlyphs,r=i.vertexStartIndex;r<n;r+=4)e.indexArray.emplaceBack(r,r+1,r+2),e.indexArray.emplaceBack(r+1,r+2,r+3)},_0x13c6f8.prototype.getSortedSymbolIndexes=function(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var t=Math.sin(e),i=Math.cos(e),n=[],r=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);n.push(0|Math.round(t*s.anchorX+i*s.anchorY)),r.push(s.featureIndex)}return o.sort((function(e,t){return n[e]-n[t]||r[t]-r[e]})),o},_0x13c6f8.prototype.sortFeatures=function(e){var t=this;if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var i=0,n=this.symbolInstanceIndexes;i<n.length;i+=1){var r=n[i],o=this.symbolInstances.get(r);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(e,i,n){e>=0&&n.indexOf(e)===i&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},_0x3abd5c.register("SymbolBucket",_0x13c6f8,{omit:["layers","collisionBoxArray","compareText"]}),_0x13c6f8.MAX_GLYPHS=65535,_0x13c6f8.addDynamicAttributes=_0x3b8a98;var _0xe0cd88=_0x13c6f8,_0x2a5b18=!1,_0x2415f5=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n,r,o){this.isMVT=!0,this.mvtProvider=t.imageryProvider,this.tileSize=this.mvtProvider._canvasWidth,this._painter=this.mvtProvider._painter,this._MVTStyle=this.mvtProvider._MVTStyle,this.dispatcher=this._MVTStyle.dispatcher,this._MVTLabel=new _0x1a5135(this.mvtProvider),this.highLighting=!1,this._visible=!1,this.working=!1,this.repaintWorking=!1,this.layersToUpdate=[],this.removedIds=[],this.imageryNeedToRender={},e.call(this,t,i,n,r,o),this._isToReRender=!1,this.frameState=null,this.realtime=this.mvtProvider.realtime,this.zoomLevel=-1,this.lastCameraZoomLevel=-1,this._passState=new n$$,this._passState.viewport=new f$1a,this.hasRawData=!1,this.uid=uniqueId()}function o(e){var t=e.mvtProvider._maxImageCacheLevel-e.level,i=0,n=!1,r=e.imageryLayer._detailLevelOffset;if(t<r&&(n=!0,i=r-t),!e.hasRawData||n){var o=function(e,t){var i=e.parent,n=1,r=e.hasRawData;t>0&&(r=!1);var o=null;for(;!r&&e$2e(i);)n>=t&&((r=i.hasRawData)&&(o=i)),i=i.parent,n++;return o}(e,i);return!e$2e(o)&&e.hasRawData?e:o}return e}function a(e){return{param:{featureIndex:e.featureIndex,tileID:{x:e.requestX,y:e.requestY,z:e.requestZ},indexData:e.indexData,pickId:e.pickId,webgpu:_0x2a5b18,type:"vector",source:e.mvtProvider.name,uid:e.uid,request:e.mvtProvider._requestManager.transformRequest(e.requestUrl,_0x3c9422.Tile)},transferableObjects:[]}}function s(e,t,i){e.setBuckets(t.buckets),e.imageAtlas=t.imageAtlas,e.featureIndex=t.featureIndex,e.featureIndex.rawTileData=t.rawTileData,e.glyphAtlasImage=t.glyphAtlasImage,i?e.repaintWorking=!1:e.working=!1}function l(e,t){var i=m(e.rectangle,t.rectangle),n=e.level,r=1;if(t.realtime){var o=t.frameState.camera;e$2e(o.zoomLevel)&&o.zoomLevel!=1/0&&(n=o.zoomLevel,t.zoomLevel=n)}else r=Math.pow(2,t.level-e.level);e.targetTileSize=e.tileSize*r,u(e,t,i,n),t.state!=wt$7.READY&&(t.state=wt$7.RENDERED),c(t)}function u(e,t,i,n){var r=e._painter;for(var o in e.buckets){var a=e.buckets[o];if(a instanceof _0xe0cd88)if(!("point"!==e._MVTStyle._layers[o].layout.get("symbol-placement")))continue;a.upload(r.cesiumContext)}e$2e(e.imageAtlas)&&(e.imageAtlasTexture=new _0x556fd4(r.context,r.cesiumContext,e.imageAtlas.image,V$12.RGBA),e.cesiumImageAtlas=new v$I({pixelFormat:V$12.RGBA,context:r.cesiumContext}),e.cesiumImageAtlas._texture=e.imageAtlasTexture.cesiumTexture),e.glyphAtlasImage&&(e.glyphAtlasTexture=new _0x556fd4(r.context,r.cesiumContext,e.glyphAtlasImage,r.cesiumContext.webgpu?V$12.RED:V$12.ALPHA),e.glyphAtlasImage=null,e.cesiumGlyphAtlas=new v$I({pixelFormat:V$12.ALPHA,context:r.cesiumContext}),e.cesiumGlyphAtlas._texture=e.glyphAtlasTexture.cesiumTexture),e.viewProjection=i;var s=e$2e(e.context)?e.context:t.context,l=t.level,u=t.texture||t.textureWebMercator;t._passState.context=s,t._passState.viewport.x=0,t._passState.viewport.y=0,t._passState.viewport.width=u.width,t._passState.viewport.height=u.height;var c=u.width+"_"+u.height;!e$2e(e.mvtProvider._renderTextureList[c])&&(e.mvtProvider._renderTextureList[c]=new t$U({context:s,width:u.width,height:u.height,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8}));var h=e.mvtProvider._renderTextureList[c];!t._framebuffer&&(t._framebuffer=new t$V({context:s,colorTextures:[u],depthStencilTexture:h})),t._passState.framebuffer=t._framebuffer;try{r.renderOneTile(e._MVTStyle,e,{targetTileLevel:l,finestRenderLevel:e.mvtProvider.maximumLevel,zoom:n,lineAntialiasing:e.mvtProvider.lineAntialiasing?1:0,passState:t._passState})}catch(e){console.log(e)}s.webgpu&&s.engine.flushFramebuffer()}function c(e){e.highLighting=!1,e.imageryLayer._finalizeReprojectTexture(e.context,e.texture||e.textureWebMercator)}n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.processStateMachine=function(e,t,i){this.frameState=e,this.context=e.context,_0x2a5b18=e.context.webgpu,this.state===wt$7.UNLOADED&&!i&&!this.imageryLayer._pausing&&(this.state=wt$7.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===wt$7.RECEIVED&&(this.state=wt$7.TRANSITIONING,this.indexData=this.image.indexData,this.image,this.imageryLayer._createTexture(e.context,this,e)),this.state===wt$7.TEXTURE_LOADED&&function(e){var t=o(e);if(!e$2e(t))return e.highLighting=!1,void console.log("MVTImagery has no rawData.");var i=g(e.x,e.y,e.level);if(t.imageryNeedToRender[i]=e,e$2e(t.buckets)&&!t.repaintWorking&&!t._isToReRender)return void l(t,e);if(!t.working){if(t.repaintWorking||t._isToReRender)return;var n=a(t);function r(e,i){delete t.request,e?(console.log("loadTile tile error in worker"),t.state=wt$7.FAILED):s(t,i,!1)}t.working=!0,!t.actor&&(t.actor=t.dispatcher.getActor()),t.request=t.actor.send("loadTile",n.param,r.bind(this))}}(this);var n=this.state===wt$7.READY&&t&&!this.texture;(this.state===wt$7.RENDERED||n)&&(this.state=wt$7.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))},r.prototype.addRepaintTask=function(e,t,i){var n={};this.layersToUpdate.map((function(e){n[e.id]=!0}));var r=this;e.map((function(e){!e$2e(n[e.id])&&r.layersToUpdate.push(e)})),this.removedIds=t,this.highLighting=i},r.prototype.clearRepaintTask=function(){this.layersToUpdate=[],this.removedIds=[]},r.prototype.update=function(){this.repaint()},r.prototype.setBuckets=function(e){var t=this.buckets;if(e$2e(t))for(var i in e){if(e$2e(t[i]))t[i].destroy(),t[i]=e[i];else t[i]=e[i]}else this.buckets=e},r.prototype.repaint=function(){this.state===wt$7.READY&&(this._isToReRender&&function(e){var t=o(e);if(!e$2e(t))return;var i=g(e.x,e.y,e.level);if(e._isToReRender&&!e.working&&(l(t,e),e._setNeedReRender(!1),e$2e(t.imageryNeedToRender[i])&&delete t.imageryNeedToRender[i],0==Object.getOwnPropertyNames(t.imageryNeedToRender).length&&e$2e(t.buckets)))for(var n in t.buckets){t.buckets[n].clear()}}(this),(this.layersToUpdate.length>0||this.removedIds.length>0)&&function(e){var t=o(e);if(!e$2e(t))return e.clearRepaintTask(),void(e.highLighting=!1);var i=g(e.x,e.y,e.level),n=e.layersToUpdate;if(t.imageryNeedToRender[i]=e,t.repaintWorking){if(!t.IsPickIdSameWithCurrentPickID())return;e.clearRepaintTask()}else{if(t.working)return;n.length>0&&n[0].id.indexOf("_highlight")>-1?t.pickId=n[0].id+n[0].filter[2]:t.pickId=void 0;var r=a(t);e.clearRepaintTask(),t.repaintWorking=!0,!t.actor&&(t.actor=t.dispatcher.getActor());var l=t.featureIndex.rawTileData;function u(i,n){if(delete t.request,i)console.log("reloadTile tile error in worker");else{if(s(t,n,!0),e.featureIndex.rawTileData=l,!t.IsPickIdSameWithCurrentPickID())return;if(!t.isDestroyed())for(var r in t.imageryNeedToRender)!t.imageryNeedToRender[r].isDestroyed()&&t.imageryNeedToRender[r]._setNeedReRender(!0)}}t.request=t.actor.send("reloadTile",r.param,u.bind(this))}}(this))},r.prototype._setNeedReRender=function(e){this._isToReRender=e,this._MVTLabel._setNeedReRender(e)},r.prototype.realtimeRender=function(){if(this.state===wt$7.READY&&this.realtime&&function(e){var t=e.frameState.camera;if(!e$2e(t.zoomLevel)||t.zoomLevel==1/0)return!1;var i=!1;e.lastCameraZoomLevel!=t.zoomLevel&&(i=!0),e.lastCameraZoomLevel=t.zoomLevel;var n=Math.abs(e.zoomLevel-t.zoomLevel);return!(n<.2&&i)&&0!=n}(this)){var e=o(this);e$2e(e)&&e$2e(e.buckets)&&!this.working&&function(e,t){var i=t.frameState.camera,n=void 0;if(!e$2e(i.zoomLevel))return;n=i.zoomLevel;var r=m(e.rectangle,t.rectangle);e.mvtProvider._context,e.targetTileSize=e.tileSize,u(e,t,r,n),c(t),t.zoomLevel=n}(e,this)}},r.prototype.IsPickIdSameWithCurrentPickID=function(){return!e$2e(this.mvtProvider._currentPickID)||!e$2e(this.pickId)||this.mvtProvider._currentPickID===this.pickId},r.prototype.setVisible=function(e){this._visible=e},r.prototype.getBucket=function(e){return e$2e(e.bucketName)?this.buckets[e.bucketName]:this.buckets[e.id]};var h=new p$1d,d=new p$1d,f=new o$1p(0,0,-1),p=new o$1p(0,1,0),_=new o$1p;function m(e,t){var i=t.width/e.width;t.height,e.height;var n=ne$C*i,r=.5*-n,o=.5*n,a=.5*-n,s=.5*n;h=p$1d.computeOrthographicOffCenter(r,o,a,s,-1,400,h);var l=new o$1p(.5*((t.west-e.west)/e.width*ne$C+(t.east-e.west)/e.width*ne$C),.5*((t.north-e.south)/e.height*ne$C+(t.south-e.south)/e.height*ne$C),200);d=p$1d.computeView(l,f,p,_,d);var u=new p$1d;return p$1d.multiply(h,d,u),u}function g(e,t,i){return JSON.stringify([e,t,i])}return _=o$1p.cross(f,p,_),r.prototype.queryRenderedFeatures=function(e,t,i){if(!e$2e(this.featureIndex)||!e$2e(this.featureIndex.rawTileData))return null;var n=this.featureIndex.query({queryGeometry:t,tileSize:this.tileSize,params:i},e,null),r=!1;for(var o in n)if(e[o]instanceof _0x45533e&&n[o].length>1){r=!0;break}return r&&(n=this.featureIndex.query({queryGeometry:t,tileSize:this.tileSize,params:i,adjustScale:.1},e,null)),n},r.prototype.querySourceFeatures=function(e,t){if(e$2e(this.featureIndex)&&e$2e(this.featureIndex.rawTileData)){var i=this.featureIndex.loadVTLayers(),n=e?e.sourceLayer:"";""!==n&&(n=n.replace(/(.*)(#\d.*)/,"$1"),e.sourceLayer=n);var r=i[n];if(r)for(var o=_0x51a3ff.createFilter(e&&e.filter),a=0;a<r.length;a++){var s=r.feature(a);o(new _0x47eac1(0),s)&&t.push(s)}}},r.prototype.isTileIDLessThan=function(e){return this.level<e.level||!(this.level>e.level)&&(this.x<e.x||!(this.x>e.x)&&this.y<e.y)},r.prototype.onAlphaChanged=function(){this._setNeedReRender(!0)},r.prototype.release=function(){if(this.request&&(this.request.cancel(),delete this.request),this.actor&&(this.actor.send("abortTile",{type:"vector",source:this.mvtProvider.name,uid:this.uid},void 0),this.actor.send("removeTile",{type:"vector",source:this.mvtProvider.name,uid:this.uid},void 0)),e$2e(this.buckets)){for(var e in this.buckets){this.buckets[e].destroy()}this.buckets=null}e$2e(this.imageAtlasTexture)&&(this.imageAtlasTexture.destroy(),this.imageAtlasTexture=null),e$2e(this.glyphAtlasTexture)&&(this.glyphAtlasTexture.destroy(),this.glyphAtlasTexture=null),this._MVTLabel.release()},r}(n$M),_0x4b68b7=(_0x6e9a07=!0,function(e,t){var i=_0x6e9a07?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6e9a07=!1,i}),_0x187e93=_0x4b68b7(void 0,(function(){return _0x187e93.toString().search("(((.+)+)+)+$").toString().constructor(_0x187e93).search("(((.+)+)+)+$")})),_0x6e9a07;function _0x29d1c7(){}_0x187e93();var _0x4c9f6d=20;function _0x41f8fb(e,t){return e.priority-t.priority}s$Z.supportsWebAssembly();var _0x1aac46=new o$1g({comparator:_0x41f8fb});function _0x1e9324(e){e$2e(e.priorityFunction)&&(e.priority=e.priorityFunction())}_0x1aac46.maximumLength=_0x4c9f6d,_0x1aac46.reserve(_0x4c9f6d);var _0x3f0d35={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5};function _0x7e60ae(e){return e.state===_0x3f0d35.UNISSUED&&(e.state=_0x3f0d35.ISSUED,e.deferred=o$1l.defer()),e.deferred.promise}function _0x4957fd(e){var t=_0x29d1c7.taskProcessorMap[e.processorName];if(!_0x29d1c7.taskProcessorReady)return!1;"S3MBTilesParser"===e.processorName&&t._activeTasks>=2&&_0x29d1c7.secTaskProcessorReady&&_0x29d1c7.useMultiWebWorker&&(t=_0x29d1c7.taskProcessorMap.S3MBTilesParserSec);var i=t.scheduleTask(e.data);return!!e$2e(i)&&(e.state=_0x3f0d35.ACTIVE,i.then((function(t){e.state!==_0x3f0d35.CANCELLED&&(e.state=_0x3f0d35.RECEIVED,e.deferred.resolve(t))})).otherwise((function(t){e.state!==_0x3f0d35.CANCELLED&&(e.state=_0x3f0d35.FAILED,e.deferred.reject(t))})),!0)}_0x29d1c7.cancelTask=function(e){e.state=_0x3f0d35.CANCELLED,e$2e(e.deferred)&&e.deferred.reject()},_0x29d1c7.startTask=function(e){_0x1e9324(e);var t=_0x1aac46.insert(e);if(e$2e(t)){if(t===e)return;_0x29d1c7.cancelTask(t)}return _0x7e60ae(e)},_0x29d1c7.processTasks=function(){for(var e=_0x1aac46.internalArray,t=_0x1aac46.length,i=0;i<t;++i)_0x1e9324(e[i]);_0x1aac46.resort();for(var n;_0x1aac46.length>0;)if((n=_0x1aac46.pop()).state!==_0x3f0d35.CANCELLED&&!_0x4957fd(n))return void _0x1aac46.insert(n)},_0x29d1c7.initWebAssembly=function(){if(_0x29d1c7.init=!0,0==s$Z.supportsWebAssembly())return _0x29d1c7.taskProcessorReady=!0,void(_0x29d1c7.CRNTaskProcessorReady=!0);_0x29d1c7.S3MBTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper_new.js",wasmBinaryFile:"ThirdParty/draco_decoder_new.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(e){_0x29d1c7.taskProcessorReady=e})),_0x29d1c7.S3MBTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(e){_0x29d1c7.taskProcessorReady=e})),_0x29d1c7.S3MBTaskProcessorSec.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper_new.js",wasmBinaryFile:"ThirdParty/draco_decoder_new.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(e){_0x29d1c7.secTaskProcessorReady=e})),_0x29d1c7.S3MBTaskProcessorSec.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(e){_0x29d1c7.secTaskProcessorReady=e})),_0x29d1c7.CRNProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){_0x29d1c7.CRNTaskProcessorReady=!0})),_0x29d1c7.unzipDataTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){_0x29d1c7.CRNTaskProcessorReady=!0}))},_0x29d1c7.S3MTaskProcessor=new i$W("S3MTilesParser"),_0x29d1c7.S3MBTaskProcessor=new i$W("S3MBTilesParser"),_0x29d1c7.S3MBTaskProcessorSec=new i$W("S3MBTilesParser"),_0x29d1c7.indexTaskProcessor=new i$W("indexedDBWorker"),_0x29d1c7.CRNProcessor=new i$W("transcodeCRNToDXT",Number.POSITIVE_INFINITY),_0x29d1c7.unzipDataTaskProcessor=new i$W("UnZipData"),_0x29d1c7.taskProcessorReady=!1,_0x29d1c7.CRNTaskProcessorReady=!1,_0x29d1c7.init=!1,_0x29d1c7.taskProcessorMap={UnZipData:_0x29d1c7.unzipDataTaskProcessor,S3MBTilesParser:_0x29d1c7.S3MBTaskProcessor,S3MBTilesParserSec:_0x29d1c7.S3MBTaskProcessorSec},_0x29d1c7.useMultiWebWorker=!1;var _0x2386f0=(_0x47b58c=!0,function(e,t){var i=_0x47b58c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47b58c=!1,i}),_0x3c4c23=_0x2386f0(void 0,(function(){return _0x3c4c23.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c4c23).search("(((.+)+)+)+$")})),_0x47b58c;function _0x128750(){this._fileName=void 0,this._relativePath=void 0,this._orientedBoundingBox=void 0,this._boundingSphere=new i$1d,this._childrenPageLod=[],this._pagelodMap={},this._isLeafTile=!1,this._isRootTile=!1,this._hasLeafChild=!1,this._isEmptyTree=!0,this._s3mLoadState=N$Q.UNLOAD,this._attrLoadState=N$Q.UNLOAD,this._leafAttrLoadState=N$Q.UNLOAD,this._attrAppend=[],this._isParsed=!1,this._configLoadState=N$Q.UNLOAD,this._avgPix=0,this._disFromCamera=0,this._nLODLev=0,this._ready=!1,this._configReady=!1,this._isVisible=!0,this._owner=void 0,this.s3mBuffer=null,this.volBuffer=null,this.volImage=null,this._visibilityPlaneMask=0,this._texturesByteLength=0,this._replacementNode=null,this._volObj=null,this._volTexture=null,this._volTextures={},this.skeletonState=void 0,this.skeletonPackages=void 0,this.instancePackage=void 0,this._reloadVol=!1,this._oriBoundingSphere=null,this._isAncestorBlock=!1,this._isChildBlock=!1,this._blockKey=void 0,this._priority=1e3,this._rootBatchIdMap={},this._ancestorMap={},this._shouldSelect=!1,this._stackLength=0,this._needRefine=!0,this._selected=!1,this._readyAncestor=void 0,this._parent=void 0,this._depth=1,this._needRequest=!0,this._parentPagelod=void 0,this._leafChildren=[],this._centerZDepth=0,this._foveatedFactor=0,this._priority=0,this._hasConfig=!1,this._needLoad=!1,this._skipLevel=0,this._subdomainIndex=0,this._prepareLoad=!1,this._tmpMaterialArr=[],this.hasTranslate=!1,this.isFlatten=!1}function _0x7a4543(e,t,i){return Math.max(e$2d.normalize(e,t,i)-e$2d.EPSILON7,0)}function _0x3cdce1(e,t,i){var n=e*Math.pow(10,t);return parseInt(n)*Math.pow(10,i)}_0x3c4c23(),Object.defineProperties(_0x128750.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox||this._boundingSphere}}}),_0x128750.prototype.updatePriority=function(e){var t=e._minimumPriority,i=e._maximumPriority,n=4,r=_0x3cdce1(_0x7a4543(this._foveatedFactor,t.foveatedFactor,i.foveatedFactor),4,n);n=0;var o=_0x3cdce1(1-_0x7a4543(this._avgPix,t.pixel,i.pixel),4,n);n=8;var a=_0x3cdce1(_0x7a4543(this._disFromCamera,t.distance,i.distance),4,n);this._priority=r+o+a},_0x128750.prototype.memoryUsage=function(){for(var e=this._texturesByteLength,t=0;t<this._childrenPageLod.length;t++)for(var i=0;i<this._childrenPageLod[t]._renderEntityList.length;i++)e+=this._childrenPageLod[t]._renderEntityList[i]._geometryByteLength,e$2e(this._childrenPageLod[t]._entity)&&this._childrenPageLod[t]._entity._isChildBlock&&(e+=this._childrenPageLod[t]._entity.memoryUsage());return e},_0x128750.prototype.memoryUsageEx=function(e){e.texSize+=this._texturesByteLength;for(var t=0;t<this._childrenPageLod.length;t++)for(var i=0;i<this._childrenPageLod[t]._renderEntityList.length;i++)e.geoSize+=this._childrenPageLod[t]._renderEntityList[i]._geometryByteLength,e$2e(this._childrenPageLod[t]._entity)&&this._childrenPageLod[t]._entity._isChildBlock&&this._childrenPageLod[t]._entity.memoryUsageEx(e);return e.geoSize+e.texSize},Object.defineProperties(_0x128750.prototype,{attrLoadState:{get:function(){return this._attrLoadState},set:function(e){this._attrLoadState=e}},leafAttrLoadState:{get:function(){return this._leafAttrLoadState},set:function(e){this._leafAttrLoadState=e}}}),_0x128750.prototype.setEmptyTreeFlag=function(e){for(var t=[this];t.length;){var i=t.pop();i._isEmptyTree=e;for(var n=0,r=i._childrenPageLod.length;n<r;n++){var o=i._childrenPageLod[n];e$2e(o._entity)&&o._entity._isEmptyTree&&t.push(o._entity)}}},_0x128750.prototype.traverse=function(e){for(var t=0,i=this._childrenPageLod.length;t<i;t++){var n=this._childrenPageLod[t];e(n),n._entity&&(n._entity._s3mLoadState===N$Q.LOADING||n._entity._s3mLoadState===N$Q.LOADVOL?n._entity._s3mLoadState=N$Q.LOST:n._entity.traverse(e))}},_0x128750.prototype.transformResource=function(e,t,i){var n=e.context,r=!0;let o=!1;for(var a=0,s=this._childrenPageLod.length;a<s;a++){for(var l=!0,u=0,c=(d=this._childrenPageLod[a])._renderEntityList.length;u<c;u++){var h=d._renderEntityList[u];if(n.memorySize>i)return o=!0,o;if(!h.renderable){r=!1,l=!1;try{h.transformResource(e,t)}catch(e){console.log(e)}}}d._ready=l}for(a=0,s=this._leafChildren.length;a<s;a++){var d;for(l=!0,u=0,c=(d=this._leafChildren[a])._renderEntityList.length;u<c;u++){h=d._renderEntityList[u];if(n.memorySize>i)return o=!0,o;if(!h.renderable){r=!1,l=!1;try{h.transformResource(e,t)}catch(e){console.log(e)}}}d._ready=l}return r&&(this._ready=!0,this._s3mLoadState=N$Q.TRANSFORMED),o},_0x128750.prototype.freeResource=function(e){for(var t=0,i=this._childrenPageLod.length;t<i;t++){this._childrenPageLod[t].freeResource(e)}for(t=0,i=this._leafChildren.length;t<i;t++){this._leafChildren[t].freeResource(e)}this._leafChildren.length=0,this._ready=!1,this._s3mLoadState=N$Q.UNLOAD,this._replacementNode=void 0},_0x128750.prototype.isDestroyed=function(){return!1},_0x128750.prototype.destroy=function(e,t){for(var i=0,n=this._childrenPageLod.length;i<n;i++)this._childrenPageLod[i]=this._childrenPageLod[i]&&!this._childrenPageLod[i].isDestroyed()&&this._childrenPageLod[i].destroy(e,t);for(var r in this._childrenPageLod.length=0,this._ready=!1,this._s3mLoadState=N$Q.UNLOAD,this._avgPix=0,this._disFromCamera=0,this.s3mBuffer=null,this.volBuffer=null,this.volImage=null,this._replacementNode=null,this.skeletonState=void 0,this.skeletonPackage=void 0,this.instancePackage=void 0,e$2e(this._volObj)&&Se$e.DestroyTexture(this._volObj.id),this._volObj=null,e$2e(this._volTexture)&&this._volTexture.destroy(),this._volTexture=null,this._volTextures)if(this._volTextures.hasOwnProperty(r)){var o=this._volTextures[r];e$2e(o)&&o.destroy()}this._volTextures={},this.request=void 0,e$2e(this.task)&&_0x29d1c7.cancelTask(this.task),this.task=void 0;for(i=0,n=this._tmpMaterialArr.length;i<n;i++){var a=this._tmpMaterialArr[i];a.isDestroyed()||a.destroy()}},_0x128750.prototype.isImageryLoaded=function(e){if(!e$2e(e._imageryLayer))return!0;for(var t=!0,i=this._childrenPageLod.length,n=0;n<i;n++)for(var r=this._childrenPageLod[n]._renderEntityList,o=r.length,a=0;a<o;a++){var s=r[a]._imagerys;if(e$2e(s))for(var l=s.length,u=0;u<l;u++)s[u]instanceof _0x2415f5?s[u].state===wt$7.RENDERED||s[u].state===wt$7.READY||s[u].state===wt$7.FAILED||(t=!1):s[u].state<wt$7.TEXTURE_LOADED&&(t=!1)}return t},_0x128750.prototype.extendRadius=function(e){e*=1.5,e$2e(this._oriBoundingSphere)||(this._oriBoundingSphere=this._boundingSphere.clone()),this._boundingSphere.radius=this._oriBoundingSphere.radius+e;for(var t=0,i=this._childrenPageLod.length;t<i;t++){var n=this._childrenPageLod[t];n._boundingSphere.radius=this._oriBoundingSphere.radius+e;for(var r=0;r<n._renderEntityList.length;r++){var o=n._renderEntityList[r];o._boundingVolume.radius=this._oriBoundingSphere.radius+e,e$2e(o._colorCommand)&&(o._colorCommand._boundingVolume.radius=this._oriBoundingSphere.radius+e)}}},_0x128750.prototype.loadImagery=function(e,t){if(e$2e(e._imageryLayer)){for(var i=0,n=this._childrenPageLod.length,r=0;r<n;r++)for(var o=this._childrenPageLod[r]._renderEntityList,a=o.length,s=0;s<a;s++)if(!o[s]._imageRasterFinish){var l=o[s]._imagerys;if(e$2e(l))for(var u=l.length,c=0;c<u;c++)l[c].state<wt$7.TEXTURE_LOADED&&(l[c].processStateMachine(t,!1),i+=1)}return i}};var _0x3e466d=(_0x43a26e=!0,function(e,t){var i=_0x43a26e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43a26e=!1,i}),_0x55e22a=_0x3e466d(void 0,(function(){return _0x55e22a.toString().search("(((.+)+)+)+$").toString().constructor(_0x55e22a).search("(((.+)+)+)+$")})),_0x43a26e;_0x55e22a();var _0x336f72={DISTANCE_FROM_EYE_POINT:0,PIXEL_SIZE_ON_SCREEN:1,GEOMETRY_ERROR:2},_0x219958=Object.freeze(_0x336f72),_0x155c91=(_0x278f61=!0,function(e,t){var i=_0x278f61?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x278f61=!1,i}),_0x2d1862=_0x155c91(void 0,(function(){return _0x2d1862.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d1862).search("(((.+)+)+)+$")})),_0x278f61;_0x2d1862();var _0xe20b57={Root_Priority:0,Child_Priority:1,UsePagedLodInfo:2,Child_Priority_NonLinear:3},_0x539352=Object.freeze(_0xe20b57),_0x1b3603=(_0x534085=!0,function(e,t){var i=_0x534085?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x534085=!1,i}),_0x2a5b14=_0x1b3603(void 0,(function(){return _0x2a5b14.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a5b14).search("(((.+)+)+)+$")})),_0x534085;function _0x4d13e0(){this._orientedBoundingBox=void 0,this._boundingSphere=void 0,this._rangeList=0,this._rangeDataList=void 0,this._isLeafNode=!1,this._isLessLodDis=!0,this._entity=null,this._renderEntityList=[],this._ready=!1,this._pix=0,this._rangeMode=_0x219958.DISTANCE_FROM_EYE_POINT,this._processFileType=0,this._renderEntityVisible=[],this._fileType=p$T.OSGBFile,this._shouldSelect=!1,this._selectionDepth=0,this._stackLength=0,this._finalResolution=!0,this._isVisible=!0,this._centerZDepth=0,this._needRefine=!0}function _0x122ec7(e,t,i,n){var r=t.uniformState.resolutionScale,o=i._boundingSphere,a=o.radius,s=o.center,l=t.drawingBufferHeight,u=e$2e(i._orientedBoundingBox)?Math.sqrt(i._orientedBoundingBox.distanceSquaredTo(e.positionWC)):Math.max(o$1p.distance(e.positionWC,s)-a,1e-5),c=i._rangeList*l/(u*e.frustum.sseDenominator);if(c/=r,e$2e(n)&&(n===_0x539352.Child_Priority_NonLinear||n===_0x539352.UsePagedLodInfo)){var h=i._fileType===p$T.OSGBFile?800:300,d=Math.max(a,h);if(e$2e(i._orientedBoundingBox)&&(s=i._orientedBoundingBox.center),(u=o$1p.distance(e.positionWC,s))>d){var f=2*d/u;f<1&&(c*=f)}}return c}function pixelsPerMeter(e,t){var i=e.uniformState.resolutionScale,n=e.drawingBufferHeight/(2*Math.tan(.5*e$2d.PI_OVER_FOUR))/t;return n/=i}function _0x39256e(e,t,i,n,r){var o=0,a=i._boundingSphere,s=a.radius,l=a.center,u=o$1p.distance(e.positionWC,l);if(u=Math.max(1e-5,u),e._mode===C$14.SCENE2D&&(u=e.positionCartographic.height),o=pixelsPerMeter(t,u)*s,e$2e(n)&&(n==_0x539352.Child_Priority_NonLinear||n===_0x539352.UsePagedLodInfo)){var c=Math.max(a.radius,r);u>c&&(o*=c/u)}return Math.ceil(o)}_0x2a5b14(),_0x4d13e0.prototype.calcPixFromCam=function(e,t,i,n,r){if(this._boundingSphere){var o=e.positionWC,a=o$1p.clone(this._boundingSphere.center),s=o$1p.distance(a,o);e._mode==C$14.SCENE2D&&(s=e.positionCartographic.height),this._disFromCamera=s-this._boundingSphere.radius;var l=0;if(i/=ti$4.getQuality(),this._rangeMode==_0x219958.DISTANCE_FROM_EYE_POINT)l=s-this._boundingSphere.radius,this._isLessLodDis=l>this._rangeList*i,l=-l;else if(this._rangeMode===_0x219958.GEOMETRY_ERROR)l=_0x122ec7(e,t,this,r),this._isLessLodDis=l<=16*i;else l=2*_0x39256e(e,t,this,r,this._fileType===p$T.OSGBFile?800:300),this._isLessLodDis=l<=this._rangeList*i;this._pix=l,this._entity&&(this._entity._avgPix=l,this._entity._disFromCamera=this._disFromCamera,this._entity._isRootTile||(this._entity._disFromCamera*=n))}},_0x4d13e0.prototype.calcImageryScaleLevel=function(e,t,i,n,r){if(this._boundingSphere){var o=e.positionWC,a=o$1p.clone(this._boundingSphere.center),s=o$1p.distance(a,o);e._mode==C$14.SCENE2D&&(s=e.positionCartographic.height),this._disFromCamera=s-this._boundingSphere.radius;var l=0;return i/=ti$4.getQuality(),r==_0x219958.DISTANCE_FROM_EYE_POINT?(l=s-this._boundingSphere.radius,this._isLessLodDis=l>this._rangeList*i,l=-l,this._pix=l,Math.sqrt(this._rangeList*i/l)):r===_0x219958.GEOMETRY_ERROR?(this._rangeList=16*this._boundingSphere.radius/256,l=_0x122ec7(e,t,this,n),this._isLessLodDis=l<=16*i,this._pix=l,Math.sqrt(l/(16*i))):(l=2*_0x39256e(e,t,this,n,this._fileType===p$T.OSGBFile?800:300),this._isLessLodDis=l<=this._rangeList*i,this._pix=l,Math.sqrt(l/(this._rangeList*i)))}},_0x4d13e0.prototype.freeResource=function(e){for(var t=0,i=this._renderEntityList.length;t<i;t++){this._renderEntityList[t].destroy(!0)}this._renderEntityList.length=0,this._ready=!1},_0x4d13e0.prototype.isDestroyed=function(){return!1},_0x4d13e0.prototype.destroy=function(e,t){for(var i=0,n=this._renderEntityList.length;i<n;i++)e$2e(e)&&this._renderEntityList[i].refreshRaster(e),this._renderEntityList[i]=this._renderEntityList[i]&&!this._renderEntityList[i].isDestroyed()&&this._renderEntityList[i].destroy();return this._renderEntityList.length=0,e$2e(this._entity)&&(t||this._entity._isChildBlock)&&this._entity.destroy(e,t),this._entity=void 0,i$11(this)};var _0x300f0f=(_0xf5f8d7=!0,function(e,t){var i=_0xf5f8d7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf5f8d7=!1,i}),_0x5b97cb=_0x300f0f(void 0,(function(){return _0x5b97cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b97cb).search("(((.+)+)+)+$")})),_0xf5f8d7;_0x5b97cb();var _0x2787b1=function(){this.context=void 0,this.model=void 0,this.index=void 0};_0x2787b1.prototype.set=function(e,t,i){this.context=e,this.model=t,this.index=i},_0x2787b1.prototype.execute=function(){var e=this.context,t=this.model._layer,i=this.index,n=this.model._vertexPackage,r=n.vertexAttributes[i];if(!e$2e(r))throw new t$15("attribute is not exit");if(-1!==n.instanceIndex&&!e$2e(this.model._instanceBuffer)){if(!e$2e(n.instanceBuffer))throw new t$15("instance buffer is null");this.model._instanceBuffer=t$X.createVertexBuffer({context:e,typedArray:n.instanceBuffer,usage:A$18.STATIC_DRAW}),this.model._geometryByteLength+=this.model._instanceBuffer.sizeInBytes,ti$4._memGeometryAdded(this.model._instanceBuffer.sizeInBytes)}1!==r.instanceDivisor||e$2e(r.typedArray)?e$2e(r.vertexBuffer)||(e$2e(r.vertexBuffer)||(r.vertexBuffer=t$X.createVertexBuffer({context:e,typedArray:r.typedArray,usage:A$18.STATIC_DRAW})),t._totalMemoryUsageInBytes+=r.vertexBuffer.sizeInBytes,this.model._geometryByteLength+=r.vertexBuffer.sizeInBytes,ti$4._memGeometryAdded(r.vertexBuffer.sizeInBytes),r.typedArray=null,delete r.typedArray):r.vertexBuffer=this.model._instanceBuffer};var _0x46a054=(_0x42968f=!0,function(e,t){var i=_0x42968f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42968f=!1,i}),_0xdb0c82=_0x46a054(void 0,(function(){return _0xdb0c82.toString().search("(((.+)+)+)+$").toString().constructor(_0xdb0c82).search("(((.+)+)+)+$")})),_0x42968f;_0xdb0c82();var _0x5659c7=function(){this.model=void 0,this.context=void 0,this.index=0};_0x5659c7.prototype.set=function(e,t,i,n){this.model=t,this.context=e,this.index=i,this.verticesCount=n},_0x5659c7.prototype.execute=function(){var e=this.context,t=this.model._layer,i=this.model._arrIndexPackage[this.index];if(!e$2e(i))throw new t$15("index package is null");if(!e$2e(i.indexBuffer)){if(!e$2e(i.indicesTypedArray))throw new t$15("index buffer is null");var n=ce$z.UNSIGNED_SHORT;(1===i.indexType||this.verticesCount>=e$2d.SIXTY_FOUR_KILOBYTES)&&this.context.elementIndexUint&&(n=ce$z.UNSIGNED_INT),e$2e(i.indexBuffer)||(i.indexBuffer=t$X.createIndexBuffer({context:e,typedArray:i.indicesTypedArray,usage:A$18.STATIC_DRAW,indexDatatype:n}),t._totalMemoryUsageInBytes+=i.indexBuffer.sizeInBytes,this.model._geometryByteLength+=i.indexBuffer.sizeInBytes,ti$4._memGeometryAdded(i.indexBuffer.sizeInBytes)),i.indicesTypedArray=null,delete i.indicesTypedArray}};var _0x5d8fc7=(_0x3afe78=!0,function(e,t){var i=_0x3afe78?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3afe78=!1,i}),_0x37e381=_0x5d8fc7(void 0,(function(){return _0x37e381.toString().search("(((.+)+)+)+$").toString().constructor(_0x37e381).search("(((.+)+)+)+$")})),_0x3afe78;function _0x1451be(){this.textures={},this.textureRefCounts={},this._context=void 0}_0x37e381(),_0x1451be.createTexture=function(e){var t=e.imageUrl,i=u$Z(e.wrapS,q$1a.REPEAT),n=u$Z(e.wrapT,q$1a.REPEAT),r=u$Z(e.minificationFilter,tt$i.LINEAR),o=u$Z(e.magnificationFilter,rt$k.LINEAR),a=u$Z(e.pixelFormat,V$12.RGBA),s=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE);if(e$2e(t)){var l=t;_0xff1c43.textureRefCounts[l]?_0xff1c43.textureRefCounts[l]++:(_0xff1c43.textureRefCounts[l]=1,o$1l(t$S(t),(function(e){var t=new e$1S({wrapS:i,wrapT:n,minificationFilter:r,magnificationFilter:o}),u=new t$U({context:_0xff1c43._context,source:e,pixelFormat:a,pixelDatatype:s,sampler:t});u.generateMipmap(),_0xff1c43.textures[l]=u})))}},_0x1451be.getTexture=function(e){if(e$2e(e))return _0xff1c43.textures[e]},_0x1451be.removeTexture=function(e){e$2e(e)&&(e$2e(_0xff1c43.textureRefCounts[e])&&(_0xff1c43.textureRefCounts[e]--,0===_0xff1c43.textureRefCounts[e])&&(_0xff1c43.textures[e].destroy(),delete _0xff1c43.textures[e],delete _0xff1c43.textureRefCounts[e]))},_0x1451be.update=function(e){_0xff1c43._context=e};var _0xff1c43=new _0x1451be,_0xc1c7c8=(_0x3ccfb1=!0,function(e,t){var i=_0x3ccfb1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ccfb1=!1,i}),_0x31211f=_0xc1c7c8(void 0,(function(){return _0x31211f.toString().search("(((.+)+)+)+$").toString().constructor(_0x31211f).search("(((.+)+)+)+$")})),_0x3ccfb1;_0x31211f();var _0x1165e8={NONE:0,SELECTION:1,ALL:2},_0x325616=Object.freeze(_0x1165e8),_0x30e7e9=(_0x438dc4=!0,function(e,t){var i=_0x438dc4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x438dc4=!1,i}),_0x45940c=_0x30e7e9(void 0,(function(){return _0x45940c.toString().search("(((.+)+)+)+$").toString().constructor(_0x45940c).search("(((.+)+)+)+$")})),_0x438dc4;function _0x2c7aca(){}_0x45940c();var _0x3f12d4=[];_0x2c7aca.createUniformMapsForCompressAttributes=function(e,t){var i=e._vertexPackage,n=i.nCompressOptions;(n&_0x64fca6.SVC_Vertex)==_0x64fca6.SVC_Vertex&&(t.decode_position_min=function(){return i.minVerticesValue},t.decode_position_normConstant=function(){return i.vertCompressConstant}),(n&_0x64fca6.SVC_Normal)==_0x64fca6.SVC_Normal&&(t.normal_rangeConstant=function(){return i.normalRangeConstant}),(n&_0x64fca6.SVC_TexutreCoord)==_0x64fca6.SVC_TexutreCoord&&(i.texCoordCompressConstant.length>0&&(t.decode_texCoord0_min=function(){return i.minTexCoordValue[0]},t.decode_texCoord0_normConstant=function(){return i.texCoordCompressConstant[0]},t.decode_texCoord0_vNormConstant=function(){return i.texCoordCompressConstant[0]}),i.texCoordCompressConstant.length>1&&(t.decode_texCoord1_min=function(){return i.minTexCoordValue[1]},t.decode_texCoord1_normConstant=function(){return i.texCoordCompressConstant[1]},t.decode_texCoord1_vNormConstant=function(){return i.texCoordCompressConstant[1]}),i.texCoordCompressConstant.length>2&&(t.decode_texCoord2_min=function(){return i.minTexCoordValue[2]},t.decode_texCoord2_normConstant=function(){return i.texCoordCompressConstant[2]}),i.texCoordCompressConstant.length>3&&(t.decode_texCoord3_min=function(){return i.minTexCoordValue[3]},t.decode_texCoord3_normConstant=function(){return i.texCoordCompressConstant[3]}),i.texCoordCompressConstant.length>4&&(t.decode_texCoord4_min=function(){return i.minTexCoordValue[4]},t.decode_texCoord4_normConstant=function(){return i.texCoordCompressConstant[4]}),i.texCoordCompressConstant.length>5&&(t.decode_texCoord5_min=function(){return i.minTexCoordValue[5]},t.decode_texCoord5_normConstant=function(){return i.texCoordCompressConstant[5]}),i.texCoordCompressConstant.length>6&&(t.decode_texCoord6_min=function(){return i.minTexCoordValue[6]},t.decode_texCoord6_normConstant=function(){return i.texCoordCompressConstant[6]}),i.texCoordCompressConstant.length>7&&(t.decode_texCoord7_min=function(){return i.minTexCoordValue[7]},t.decode_texCoord7_normConstant=function(){return i.texCoordCompressConstant[7]}))};let _0x3f6919=0,_0x1e5e48=0;_0x2c7aca.createWaterUniform=function(e,t,i){if(e$2e(e.waterEffectSet)&&e.multiTemporalUseWater){var n=e._frameState._framebufferList.water;i.uReflectMap=function(){return n.renderTexture._fb.getColorTexture(0)},i.uUseRefectMap=function(){return n&&n.isUpdate?1:0},i.uNoiseMap=function(){return n._waterNormalMap},i.uTimeVal=function(){return _0x1e5e48!=e._frameState.frameNumber&&(_0x3f6919+=1/60,_0x1e5e48=e._frameState.frameNumber),_0x3f6919},i.uBumpSpeed=function(){return e.waterParameter.bumpSpeed},i.uWaterColour=function(){return e.waterParameter.waterColour},i.uWaterBrightness=function(){return e.waterParameter.waterBrightness},i.uSunColor=function(){return e._frameState.lightSource.sunLightColor}}};var _0x59e131=new o$1o,_0x54bcd5=new o$1o;const _0xf41b78=new e$2c;_0x2c7aca.createCommonLayerUniform=function(e,t){if(t.uSelColor=function(){return e.selectedColor},t.uTranslationAndBottom=function(){return _0xf41b78.x=e.selectedTranslate.x,_0xf41b78.y=e.selectedTranslate.y,_0xf41b78.z=e.selectedTranslate.z,_0xf41b78.w=e.style3D.bottomAltitude,e.selectedTranslate},t.uFillForeColor=function(){return e.style3D.fillForeColor},t.uPolygonOffset=function(){var t=e._rsColor.polygonOffset;return e$2e(t)?(_0x54bcd5.x=t.factor,_0x54bcd5.y=t.units):(_0x54bcd5.x=0,_0x54bcd5.y=0),_0x54bcd5},t.u_polygonOffset=function(){var t=0,i=0,n=e._rsColor.polygonOffset;return e$2e(n)?(t=n.factor,i=n.units):(t=0,i=0),{x:t,y:i}},t.uPointSize=function(){return e.style3D.pointSize},t.uMinMaxTransparent=function(){return _0x59e131.x=e.minTransparentAlpha,_0x59e131.y=e.maxTransparentAlpha,_0x59e131},t.uTransparentFilter=function(){return e.selectionFiltrateByTransparency},e.hasHyp){t.uHypHasAnalysisRegion=function(){return e._bUseHypRegion},t.uMixColorType=function(){return e$2e(e._mixColorType)?e._mixColorType:0},t.uDataFloor=function(){return e._fMinValue===e._fMaxValue?0:e._fMinValue},t.uDataCeil=function(){return e._fMinValue===e._fMaxValue?1:e._fMaxValue},t.uEmissionTexAtlas=function(){return e$2e(e._hypsometricSetting._emissionTextureAtlas)?e._hypsometricSetting._emissionTextureAtlas.texture:e._context.defaultTexture},t.uEmissionTexAtlasRects=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting._getEmissionAtlasTextureRects():_0x3f12d4},t.uEmissionTexAtlasTilingAndOffset=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting._getEmissionTexAtlasTilingAndOffset():_0x3f12d4},t.uHypsometricTexture=function(){return e._hypsometricTexture},t.uHypsometricRenderTexture=function(){return e._hypsometricRenderTexture},t.uHypOpacity=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.Opacity:1},t.uHypContourInterval=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.LineInterval:100};var i=new e$2c;t.uHypLineColor=function(){return e$2e(e._hypsometricSetting)?(i.x=e._hypsometricSetting.LineColor.red,i.y=e._hypsometricSetting.LineColor.green,i.z=e._hypsometricSetting.LineColor.blue,i.w=e._hypsometricSetting.LineColor.alpha,i):e$2c.ZERO},t.uHypContourFillMode=function(){var t=1;if(e$2e(e._hypsometricSetting))switch(e._hypsometricSetting.DisplayMode){case k$S.DisplayMode.NONE:t=0;break;case k$S.DisplayMode.FACE:t=1;break;case k$S.DisplayMode.LINE:t=2;break;case k$S.DisplayMode.FACE_AND_LINE:t=3}return t},t.uHypFloor=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMinKey:0},t.uHypCeil=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMaxKey:0},t.uHypMaxVisibleValue=function(){return(e$2e(e._hypsometricSetting)?e._hypsometricSetting.MaxVisibleValue:0)+e$2d.EPSILON5},t.uHypMinVisibleValue=function(){return(e$2e(e._hypsometricSetting)?e._hypsometricSetting.MinVisibleValue:0)-e$2d.EPSILON5},t.uHypRect=function(){return e._hypsometricBound},t.uNoValueColor=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.noValueColor:e$1X.WHITE},t.uHypsometricVisible=function(){return ro._isLeaf&&ro._isHypsometricVisible||e._hypsometricSetting._visibleDistanceMax===Number.MAX_VALUE&&0===e._hypsometricSetting._visibleDistanceMin&&e._hypsometricSetting._maxVisibleAltitude===Number.MAX_VALUE&&0===e._hypsometricSetting._minVisibleAltitude?1:0}}if(e._hasOverlay&&(t.uOverlayRect=function(){return e._overlayBounds},t.uOverlayTexture=function(){return e._overlayTexture}),e.hasWVisible&&(t.uMaxCategory=function(){return e._hypMaxCategory},t.uMinCategory=function(){return e._hypMinCategory},t.uCategoryWidht=function(){return e._categorieTexture&&e._categorieTexture.width||256},t.uCategoryHeight=function(){return e._categorieTexture&&e._categorieTexture.height||1},t.uCategorieTexture=function(){return e._categorieTexture}),e.hasSketch&&(t.uLineColor=function(){return e.style3D.lineColor},t.uLineWidth=function(){return e.style3D.lineWidth},t.uFillStyle=function(){return e.style3D.fillStyle},t.uNormalDepthTexture=function(){return e._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0)}),e.hasAdjustColor&&(t.uBrightness=function(){return e._brightness},t.uContrast=function(){return e._contrast},t.uHue=function(){return e._hue},t.uSaturation=function(){return e._saturation},t.uOneOverGamma=function(){return 1/e._gamma}),e.hasTransparentBackColor&&(t.uTransparentBackColor=function(){return e._transparentBackColor},t.uTransparentBackColorTolerance=function(){return e._transparentBackColorTolerance}),e.hasExcavation&&(t.uExcavationTexture=function(){return e._excavationTexture},t.uExcavationMode=function(){return e._excavationMode},t.uExcavationRect=function(){return e._excavationBounds},t.uServerExcavationMode=function(){return e._serverExcavationMode},t.uServerExcavationRect=function(){return e._serverExcavationBounds},t.uServerExcavationTexture=function(){return e._excavationTexture}),e.hasClip&&(t.clip_mode=function(){return e._clipMode},t.clip_planes=function(){return e._clipPlane},t.clip_line_color=function(){return e._clipLineColor}),e.hasSplit){t.uSplitDirection=function(){return e.splitDirection},t.uSplitPosition=function(){return e.splitPosition};var n=new e$2c;t.uSwipeRegion=function(){return n.x=e._swipeRegion.x*e._frameState.context.drawingBufferWidth,n.y=(1-e._swipeRegion.y)*e._frameState.context.drawingBufferHeight,n.z=e._swipeRegion.z*e._frameState.context.drawingBufferWidth,n.w=(1-e._swipeRegion.w)*e._frameState.context.drawingBufferHeight,n}}if(e.hasPolylineEffect&&isPolylineEffect&&(t.uEffectLineWidth=function(){return e$2e(e._effect)?e._effect._lineWidth:e.style3D.lineWidth},t.uColor=function(){return e$2e(e._effect)?e._effect._color:e.style3D.lineColor},t.uType=function(){return e$2e(e._effect)?e._effect._type:0},t.uOutlineColor=function(){return e$2e(e._effect)?e._effect._outlineColor:e.style3D.lineColor},t.uOutlineWidth=function(){return e$2e(e._effect)?e._effect._outlineWidth:0},t.uGapColor=function(){return e$2e(e._effect)?e._effect._gapColor:e.style3D.lineColor},t.uDashLength=function(){return e$2e(e._effect)?e._effect._dashLength:0},t.uDashPattern=function(){if(e$2e(e._effect)){if(e._effect._isMove){e._effect._frame>159&&(e._effect._frame=0);var t=Math.floor(e._effect._frame/10),i=e._effect._dashPattern<<t,n=e._effect._dashPattern>>16-t;return e._effect._frame++,i+n}return e._effect._dashPattern}return 0},t.uGlowPower=function(){return e$2e(e._effect)?e._effect._glowPower:0},t.uIsArrow=function(){return!!e$2e(e._effect)&&e._effect._isArrow}),e.hasRegionEffect&&isRegionEffect&&(t.uRotationAngle=function(){return e._effect._rotationAngle},t.uType=function(){return e._effect._type},t.uForeColor=function(){return e._effect._foreColor},t.uBackColor=function(){return e._effect._backColor},t.uLineWidthX=function(){return e._effect._lineWidthX},t.uLineWidthY=function(){return e._effect._lineWidthY},t.uRepeatX=function(){return e._effect._repeatX},t.uRepeatY=function(){return e._effect._repeatY},t.uOffsetX=function(){return e._effect._offsetX},t.uOffsetY=function(){return e._effect._offsetY}),e.hasFusion){var r={x:0,y:0};t.uPanOffset=function(){return e$2e(e._context.curFusionViewMatrix)?(e$2e(e.panOffset)&&(r.x=e.panOffset.x/e._context.drawingBufferWidth,r.y=e.panOffset.y/e._context.drawingBufferHeight),r):(r.x=0,r.y=0,r)},t.uModelView=function(){return e$2e(e._context.curFusionViewMatrix)?p$1d.multiply(e._context.curFusionViewMatrix,ro._matModel,_0x428705):p$1d.multiply(e._context.uniformState.view3D,ro._matModel,_0x428705)}}e.hasHorizontalLine&&(t.uHorizontalLine=function(){return e$2e(e._fHorizontalLine)?e._fHorizontalLine:0},t.uHorizontalColor=function(){return e$2e(e$2e(e._HorizontalColor))?e._HorizontalColor:new e$2c(1,1,0,0)}),e.hasFlood&&(t.uFloodFlagTexture=function(){if(e$2e(e._floodFlagTexture))return e._floodFlagTexture},t.uFloodRect=function(){if(e$2e(e._floodRect))return e._floodRect},t.uFloodMatrixInvert=function(){var t=new p$1d;return p$1d.multiply(e._matFloodInvertMatrix,ro._matModel,t),t})},_0x2c7aca.createMaterialUniform=function(e,t,i,n){const r=t._flag,o=1&r,a=r>>1&1,s=r>>2&1;if(n.uDiffuseColor=function(){return i._diffuseColor},n.uAmbientColor=function(){return i._ambientColor},a){n.uTexture=function(){var n;return e$2e(t._symbolTextureUrl)?e$2e(n=_0x1451be.getTexture(t._symbolTextureUrl))?n:e._context.defaultTexture:e$2e(i._textures[0])?(n=i._textures[0]).isTexBlock?n.renderable&&n.ready?n:e$2e(i._ancestorTexture)?i._ancestorTexture:n:n:e._context.defaultTexture},n.uTexMatrix=function(){return i._texMatrix},n.uTexture0Width=function(){return e$2e(i._textures[0])?i._textures[0]._width:1},n.uTexture1Width=function(){return e$2e(i._textures[1])?i._textures[1]._width:1};var l=new e$2c;n.uTexUVOffset=function(){l.x=0,l.y=0,l.z=1,l.w=1;var t=i._baseColorTextureMotion;if(e$2e(t)){var n=t.OffsetPeriod,r=t.OffsetSpeedU,o=t.OffsetSpeedV,a=t.TilingPeriod,s=t.TilingSpeedU,u=t.TilingSpeedV,c=performance.now()/1e3;if(n>0){var h=c%n;l.x=h*r,l.y=h*o}if(a>0){var d=c%a;l.z=1+d*s,l.w=1+d*u}}else if(0!==e._textureUVSpeed.x||0!==e._textureUVSpeed.y){var f=performance.now()/1e3;l.x=e._textureUVSpeed.x*f,l.y=e._textureUVSpeed.y*f}return l}}if(s&&(n.uSecTexture=function(){var t=i._textures[1];return t.isTexBlock?t.renderable&&t.ready?t:e$2e(i._ancestorTextureBake)?i._ancestorTextureBake:e._context.defaultTexture:t}),o){n.uBaseColorTextureIndex=function(){return i._baseColorTextureIndex>-1?i._baseColorTextureIndex:e._PBRMaterialParams.pbrMetallicRoughness.baseColorTextureIndex},n.uBaseColorFactor=function(){return i._baseColor||e._PBRMaterialParams.pbrMetallicRoughness.baseColor},n.uMetallicFactor=function(){return i._metallicFactor||e._PBRMaterialParams.pbrMetallicRoughness.metallicFactor},n.uRoughnessFactor=function(){return u$Z(i._roughnessFactor,e._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor)},n.uEmissiveFactor=function(){return i._emissiveFactor||e._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},n.uEmissionTexture=function(){if(e$2e(i.emissiveTexture))return i.emissiveTexture;var t=i._emissiveTextureIndex;return t>-1&&e$2e(i._textures[t])?i._textures[t]:e._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},n.uMetallicRoughnessTexture=function(){return e$2e(i._metallicRoughnessTextureIndex)&&i._metallicRoughnessTextureIndex>-1?e$2e(i.metallicRoughnessTexture)?i.metallicRoughnessTexture:i._textures[i._metallicRoughnessTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},n.uNormalTexture=function(){return e$2e(i._normalTextureIndex)&&i._normalTextureIndex>-1?i.normalTexture?i.normalTexture:i._textures[i._normalTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.normalTexture},n.uNormalTextureScale=function(){return e$2e(i._normalTextureScale)?i._normalTextureScale:e._PBRMaterialParams.pbrMetallicRoughness.normalTextureScale},n.uOcclusionTexture=function(){return e$2e(i._occlusionTextureIndex)&&i._occlusionTextureIndex>-1?i.occlusionTexture?i.occlusionTexture:e$2e(i._textures[i._occlusionTextureIndex])?i._textures[i._occlusionTextureIndex]:e._context.defaultTexture:e._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},n.uIndexOfRefraction=function(){return e$2e(i._indexOfRefraction)&&i._indexOfRefraction>0?i._indexOfRefraction:e._PBRMaterialParams.pbrMetallicRoughness.indexOfRefraction},n.uTransmissionFactor=function(){return e$2e(i._transmissionFactor)&&i._transmissionFactor>0?i._transmissionFactor:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.volume)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.volume.transmissionFactor)?e._PBRMaterialParams.pbrMetallicRoughness.volume.transmissionFactor:1},n.uThickness=function(){return e$2e(i._volume)?i._volume._thickness:e._PBRMaterialParams.pbrMetallicRoughness.volume.thickness},n.uSnowCoverageFactor=function(){return e$2e(i.snowEffect)&&i.snowEffect._snow_coverage>0?i.snowEffect._snow_coverage:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.snowEffect)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage)&&e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage>0?e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage:.5},n.uSnowMaskTexture=function(){return e$2e(i.snowEffect)&&e$2e(i.snowEffect._snowMaskTexture)?i.snowEffect._snowMaskTexture:e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture},n.uSnowNormalTexture=function(){return e$2e(i.snowEffect)&&e$2e(i.snowEffect._snowNormalTexture)?i.snowEffect._snowNormalTexture:e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture},n.uIntensityScale=function(){return e$2e(i._intensityScale)&&i.rainEffect._intensityScale>0?i._intensityScale:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&e._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0?e._PBRMaterialParams.pbrMetallicRoughness.intensityScale:1},n.uAnimationSpeed=function(){return e$2e(i.rainEffect)&&e$2e(i.rainEffect._animationSpeed)?i.rainEffect._animationSpeed:e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.animationSpeed},n.uRippleTexture=function(){return e$2e(i.rainEffect)&&e$2e(i.rainEffect._rippleTexture)?i.rainEffect._rippleTexture:e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture},n.uWetnessFactor=function(){return e$2e(i.rainEffect)&&i.rainEffect._wetnessFactor>0?i.rainEffect._wetnessFactor:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor:0},n.uRippleScale=function(){return e$2e(i.rainEffect)&&i.rainEffect._ripple_scale>0?i.rainEffect._ripple_scale:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale:5},n.uWindIntensity=function(){return e$2e(i.rainEffect)&&i.rainEffect._wind_intensity>0?i.rainEffect._wind_intensity:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity:0},n.uRain=function(){return e$2e(i.rainEffect)&&i.rainEffect._rain>0?i.rainEffect._rain:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain:200},n.uCameraDepth=function(){return e$2e(i.rainEffect)&&i.rainEffect._cameraDepth>0?i.rainEffect._cameraDepth:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth:.8},n.uTintColor=function(){return e$2e(i._volume)?i._volume._tintColor:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.volume)?e._PBRMaterialParams.pbrMetallicRoughness.volume.tintColor:e$1X.WHITE},n.uDiffusionDistance=function(){return e$2e(i._volume)?i._volume._diffusionDistance:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.volume)?e._PBRMaterialParams.pbrMetallicRoughness.volume.diffusionDistance:e$1X.WHITE},n.uClearcoatFactor=function(){return e$2e(i._clearcoat)?i._clearcoat._clearcoatFactor:e._PBRMaterialParams.pbrMetallicRoughness.clearcoat.clearcoatFactor},n.uClearcoatRoughnessFactor=function(){return e$2e(i._clearcoat)?i._clearcoat._clearcoatRoughnessFactor:e._PBRMaterialParams.pbrMetallicRoughness.clearcoat.clearcoatRoughnessFactor},n.uAnisotropy=function(){return e$2e(i._anisotropy)?i._anisotropy:e._PBRMaterialParams.pbrMetallicRoughness.anisotropy},n.uBaseTexture=function(){return e$2e(i._baseColorTextureIndex)&&i._baseColorTextureIndex>-1?i.baseColorTexture:e._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture};var u=i._emissiveTextureMotion||e._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion,c=new e$2c;if(n.uEmissiveUVOffsetAndTiling=function(){var e=performance.now()/1e3,t=u.OffsetPeriod,i=u.OffsetSpeedU,n=u.OffsetSpeedV,r=u.TilingPeriod,o=u.TilingSpeedU,a=u.TilingSpeedV;if(u&&t>0){var s=e%t;c.x=s*i,c.y=s*n}else c.x=0,c.y=0;if(u&&r>0){var l=e%u._tilingPeriod;c.z=1+l*o,c.w=1+l*a}else c.z=1,c.w=1;return c},i._usePBRTextureBatch){var h=new o$1o;n.uPBRTexture=function(){return i.pbrParamTexture},n.uPBRTexWH=function(){var e=i.pbrParamTexture;return h.x=e._width,h.y=e._height,h}}n.uAlphaCutoff=function(){return i._alphaCutoff}}return n},_0x2c7aca.createMeshUniform=function(e,t){e$2e(e._batchTable);return t.uModelMatrix=function(){return e._relativeModelMatrix},t.uGeoMatrix=function(){return e._geoMatrix},t};var _0x428705=new p$1d;_0x2c7aca.create=function(e,t,i,n){var r=t._fileType;r===p$T.PolylineEffect||r===p$T.ClampGroundRealtimeRasterCache&&e$2e(i._attributeLocations.aTexCoord1),p$T.RegionEffect,r===p$T.ClampGroundRealtimeRasterCache&&e$2e(i._attributeLocations.aTexCoord1),p$T.PointCloudFile;var o=i._material;if(n.uTexture=function(){var e;return e$2e(i._symbolTextureUrl)?e$2e(e=_0x1451be.getTexture(i._symbolTextureUrl))?e:t._context.defaultTexture:e$2e(o._textures[0])?(e=o._textures[0]).isTexBlock?e.renderable&&e.ready?e:e$2e(o._ancestorTexture)?o._ancestorTexture:e:e:t._context.defaultTexture},n.uSecTexture=function(){var e=o._textures[1];return e.isTexBlock?e.renderable&&e.ready?e:e$2e(o._ancestorTextureBake)?o._ancestorTextureBake:t._context.defaultTexture:e},t.isSilhouette&&(n.uNormalDepthTexture=function(){return t._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0)}),t._bUseHypColorTable&&(n.uHypsometricTexture=function(){return t._hypsometricTexture},n.uHypsometricRenderTexture=function(){return t._hypsometricRenderTexture}),t._flattening&&(n.uFlattenTexture=function(){return e.multiViewportIndex>-1?1<<e.multiViewportIndex&t._flattenVisibleViewport?t._flattenTexture:t._context.defaultTexture:t._flattenTexture}),t._hasExcavation&&(n.uExcavationTexture=function(){return t._excavationTexture}),t._hasServerExcavation&&(n.uServerExcavationTexture=function(){return t._excavationTexture}),e$2e(t._categorieTexture)&&(n.uCategorieTexture=function(){return t._categorieTexture}),(o._usePBR||t._usePBR)&&(n.uBaseTexture=function(){return e$2e(o._baseColorTextureIndex)&&o._baseColorTextureIndex>-1?o.baseColorTexture:t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture},n.uNormalTexture=function(){return e$2e(o._normalTextureIndex)&&o._normalTextureIndex>-1?o.normalTexture?o.normalTexture:o._textures[o._normalTextureIndex]:t._PBRMaterialParams.pbrMetallicRoughness.normalTexture},n.uEmissionTexture=function(){if(e$2e(o.emissiveTexture))return o.emissiveTexture;var e=o._emissiveTextureIndex;return e>-1&&e$2e(o._textures[e])?o._textures[e]:t._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},n.uMetallicRoughnessTexture=function(){return e$2e(o._metallicRoughnessTextureIndex)&&o._metallicRoughnessTextureIndex>-1?e$2e(o.metallicRoughnessTexture)?o.metallicRoughnessTexture:o._textures[o._metallicRoughnessTextureIndex]:t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},n.uOcclusionTexture=function(){return e$2e(o._occlusionTextureIndex)&&o._occlusionTextureIndex>-1?o.occlusionTexture?o.occlusionTexture:e$2e(o._textures[o._occlusionTextureIndex])?o._textures[o._occlusionTextureIndex]:t._context.defaultTexture:t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},o._usePBRTextureBatch&&(n.uPBRTexture=function(){return o.pbrParamTexture})),(e$2e(i._volTexture)||e$2e(i._volObj))&&(n.uVolumeTexture=function(){return"png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt?i._volTexture:i._volObj.volTexture}),e$2e(t._imageryLayer)&&e$2e(i._attributeLocations.img)&&(n.uImgTexture=function(){return e$2e(i._rasterImageTexture)?i._rasterImageTexture:t._context.defaultTransparentTexture}),e$2e(t.waterEffectSet)||t.multiTemporalUseWater){var a=t._frameState._framebufferList.water;n.uReflectMap=function(){return a.renderTexture._fb.getColorTexture(0)},n.uNoiseMap=function(){return a._waterNormalMap}}t._hasOverlay&&(n.uOverlayTexture=function(){return t._overlayTexture}),t._hasEmissiveTexAtlas&&(n.uEmissionTexAtlas=function(){return e$2e(t._hypsometricSetting._emissionTextureAtlas)?t._hypsometricSetting._emissionTextureAtlas.texture:t._context.defaultTexture}),t._hasSnowEffect&&(n.uSnowMaskTexture=function(){return t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture},n.uSnowNormalTexture=function(){return t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture}),t._hasRainEffect&&(n.uRippleTexture=function(){return t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture}),e$2e(i._batchTable)&&(n=i._batchTable.getUniformMapCallback()(n)),e$2e(o._batchTable)&&(o._batchTable.update(e),n=o._batchTable.getUniformMapCallback()(n)),e$2e(o._batchTableBake)&&(o._batchTableBake.update(e),n=o._batchTableBake.getUniformMapCallback()(n)),e$2e(i._dayTextures)&&i._dayTextures.length>0&&(n.uMapTexture=function(){if(e$2e(o._textures[0])){var e=o._textures[0],i=o._mapTextures[e.id];return e$2e(i)?i:e}return t._context.defaultTexture},n.uImgTexture=function(){return e$2e(i._rasterImageTexture)?i._rasterImageTexture:t._context.defaultTransparentTexture},n.uImgTextureAlpha=function(){return e$2e(t._imageryLayer)?t._imageryLayer instanceof Array?t._imageryLayer[t._imageryLayer.length-1].alpha:t._imageryLayer.show&&i._showImagerysImmediate?t._imageryLayer.alpha:0:1},n.uImgTextureBound=function(){return i._imageryTextureBound},n.u_dayTextures=function(){return i._dayTextures},n.u_dayTextureUseWebMercatorT=function(){return i._dayTextureUseWebMercatorT},n.u_dayTextureTexCoordsRectangle=function(){return i._dayTextureTexCoordsRectangle},n.u_dayTextureTranslationAndScale=function(){return i._dayTextureTranslationAndScale},n.u_transparentBackColor=function(){return i._transparentBackColor},n.u_imageryClipEnable=function(){return i._imageryClipEnable},n.u_dayTextureFlipY=function(){return i._dayTextureFlipY},n.u_dayTextureAlpha=function(){return i._dayTextureAlpha},n.u_dayTextureSize=function(){return i._dayTextureTranslationAndScale}),i._uniformMap=n};var _0x75e2f4=(_0x51f818=!0,function(e,t){var i=_0x51f818?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51f818=!1,i}),_0x432002=_0x75e2f4(void 0,(function(){return _0x432002.toString().search("(((.+)+)+)+$").toString().constructor(_0x432002).search("(((.+)+)+)+$")})),_0x51f818;_0x432002();var _0x53b856="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MeshUboDecl>\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\n#ifdef DepthEXT\nvarying float vWindowZ;\n#endif\n#include <clip>\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n #ifdef DepthEXT\n\t gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n #endif\n#endif\n#ifdef WEBGL2\n #ifdef DepthEXT\n\t gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n #endif\n#endif\n\tif(vColor.a < uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIP\n gl_FragColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n gl_FragColor = vSecondColor;\n}\n",_0x2fe254=(_0x9b9ab=!0,function(e,t){var i=_0x9b9ab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x9b9ab=!1,i}),_0x19bf0b=_0x2fe254(void 0,(function(){return _0x19bf0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x19bf0b).search("(((.+)+)+)+$")})),_0x9b9ab;_0x19bf0b();var _0x4f0656="\n#include <LayerUboDecl>\nvarying vec4 vSecondColor; \nvarying vec4 vColor;\nvoid main() \n{\n\tif(vColor.a < uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n gl_FragColor = vSecondColor; \n}",_0x3e027d=(_0x2863a4=!0,function(e,t){var i=_0x2863a4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2863a4=!1,i}),_0x2332d6=_0x3e027d(void 0,(function(){return _0x2332d6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2332d6).search("(((.+)+)+)+$")})),_0x2863a4;_0x2332d6();var _0xcc5af2="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\nvarying vSecondColor : vec4<f32>; \nvarying vColor : vec4<f32>;\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n\tif(vColor.a < Layer.uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n gl_FragColor = vSecondColor; \n}",_0x2261f0=(_0x2951bf=!0,function(e,t){var i=_0x2951bf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2951bf=!1,i}),_0x11d924=_0x2261f0(void 0,(function(){return _0x11d924.toString().search("(((.+)+)+)+$").toString().constructor(_0x11d924).search("(((.+)+)+)+$")})),_0x2951bf;_0x11d924();var _0x115b1e="\nprecision highp float;\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MeshUboDecl>\n#include <vertexLogDepthDecl>\n// Inputs\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\nattribute float batchId;\n// attribute float aVariantOffset;\nattribute float aVariantStroke;\nattribute float aVariantExtension;\n\n#ifdef SILHOUETTE\nattribute vec3 aNormalA;\nattribute vec3 aNormalB;\n#else /* SILHOUETTE */\nattribute vec3 aNormal;\n#endif /* SILHOUETTE */\n\nattribute vec2 aSideness;\n//attribute vec2 aPackedAttributes;\n\nstruct UnpackedAttributes\n{\n vec2 sideness;\n vec2 sidenessNorm;\n float lineWidthPixels;\n float extensionLengthPixels;\n#if (MODE == 2)\n float edgeType;\n#endif\n};\n\n// Output required to compute color\nvarying vec4 vColor;\n// Output required to compute distance to line/caps\nvarying vec3 vPosition; \nvarying vec3 vViewPosition;\nvarying float vRadius;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\n\nvarying vec2 vStrokeUV;\n\nconst vec2 uDepthBias = vec2(0.5, -4e-4);\n\n// Utility function to check for NaN values\nbool isNaN(float val)\n{\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n // important: some nVidias failed to cope with version below.\n // Probably wrong optimization.\n /*return ( val <= 0.0 || 0.0 <= val ) ? false : true;*/\n}\n\nvec2 calculateProjectedBiasXY(vec4 projPos, vec3 worldNormal)\n{\n float offsetXY = uDepthBias.x;\n float offsetZ = uDepthBias.y;\n vec4 projNormal = czm_projection * czm_view * vec4(worldNormal, 0.0);\n return offsetXY * projPos.w * 2.0 / czm_viewport.zw * normalize(projNormal.xyz).xy;\n}\n\n// A z-offset, using a depth based heuristic.\nfloat calculateProjectedBiasZ(vec4 projPos)\n{\n float fProjZ = projPos.z / projPos.w;\n if(fProjZ < 0.1)\n {\n return 0.0;\n }\n float offsetZ = uDepthBias.y;\n return sqrt(projPos.z) * offsetZ;\n}\n\nvec4 adjustProjectedPosition(vec4 projPos, vec3 worldNormal, float lineWidth)\n{\n vec2 offsetXY = calculateProjectedBiasXY(projPos, worldNormal);\n // we currently have to do this check because some geometries come with 0 length edge normals.\n if (!isNaN(offsetXY.x) && !isNaN(offsetXY.y))\n {\n projPos.xy += offsetXY;\n }\n#ifdef LOG_DEPTH\n vDistanceFromEye = projPos.w;\n#else\n projPos.z += calculateProjectedBiasZ(projPos);\n#endif\n return projPos;\n}\n\n#if (MODE == 0)\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{}\n#elif (MODE == 1)\nfloat strokeVariants = 6.0;\nvoid calculateStyleOutputsSketch(float lineLength, UnpackedAttributes unpackedAttributes) {\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n float lineIndex = clamp(ceil(log2(lineLength)), 0.0, uStrokesLog2Resolution);\n vStrokeUV = vec2(exp2(lineIndex) * sidenessNorm.y, lineIndex * strokeVariants + aVariantStroke + 0.5) * uStrokesTextureScale;\n}\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{\n calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);\n}\n#elif (MODE == 2)\nvarying float vType;\nvoid calculateStyleOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec4 projPos, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vType = unpackedAttributes.edgeType;\n if (unpackedAttributes.edgeType <= 0.0)\n {\n calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);\n }\n}\n#endif\n\n\n// Solid\n#if (MODE == 2 || MODE == 0)\nfloat calculateLineAmplitudeSolid()\n{\n return 0.0;\n}\n#endif\n#if (MODE == 0)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSolid();\n}\n#endif\n// Sketch\n#if (MODE == 2 || MODE == 1)\nfloat calculateLineAmplitudeSketch()\n{\n float strokesAmplitude = 6.0;\n return strokesAmplitude;\n}\n#endif\n#if (MODE == 1)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSketch();\n}\n#endif\n// Uber\n#if (MODE == 2)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n float edgeType = unpackedAttributes.edgeType;\n if (edgeType <= 0.0)\n {\n return calculateLineAmplitudeSketch();\n }\n else\n {\n return calculateLineAmplitudeSolid();\n }\n}\n#endif\n\n\nfloat distanceBasedPerspectiveFactor(float distance)\n{\n return clamp(sqrt(uDistanceFalloffFactor / distance), 0.0, 1.0);\n}\n\n#define COMPONENT_COLOR_FIELD_OFFSET 0.0\n#define COMPONENT_OTHER_FIELDS_OFFSET 1.0\n#define COMPONENT_FIELD_COUNT 2.0\n#define LINE_WIDTH_FRACTION_FACTOR 8.0\n#define EXTENSION_LENGTH_OFFSET 128.0\n#define COMPONENT_TEX_WIDTH 4096.0\n\nstruct ComponentData\n{\n float lineWidth;\n float extensionLength;\n float edgeType;\n};\n\n\nComponentData readComponentData()\n{\n return ComponentData(uLineWidth, 0.0, 0.0);\n}\n\nvec3 modelToWorldNormal(vec3 normal)\n{\n return (czm_model * vec4(normal, 0.0)).xyz;\n}\n\nvec3 silhouetteWorldNormal(vec3 normalA, vec3 normalB)\n{\n return modelToWorldNormal(normalize(normalA + normalB));\n}\n\n// Fall-off extension length for shorter strokes, starting from strokes that are 256 size,\n// fall-off exponentially\nfloat calculateExtensionLength(float extensionLength, float lineLength)\n{\n return extensionLength / (log2(max(1.0, 256.0 / lineLength)) * 0.2 + 1.0);\n}\n\n#ifdef SILHOUETTE\n// #uniforms: czm_view, czm_model\nbool isSilhouetteEdge(vec4 viewPos, vec3 normalA, vec3 normalB)\n{\n// transform the two face normals\n vec3 viewNormalA = (czm_modelView * vec4(normalA, 0.0)).xyz;\n vec3 viewNormalB = (czm_modelView * vec4(normalB, 0.0)).xyz;\n// compute the direction from the edge to the camera\n vec3 viewDir = -viewPos.xyz;\n// check which of the two faces are visible\n// display the edge if exactly one of the two is visible\n float faceAVisible = dot(viewDir, viewNormalA);\n// positive if visible\n float faceBVisible = dot(viewDir, viewNormalB);\n// positive if visible\n// 1 if exactly one face visible, 0 otherwise\n return faceAVisible * faceBVisible < 0.0;\n}\n#endif /* SILHOUETTE */\n\nvoid clipLineSegmentToNearPlane(vec3 p0,vec3 p1,out bool clipped,out bool culledByNearPlane,out vec4 clippedPositionEC)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = czm_currentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -czm_currentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n}\n\nvec4 calculateGeometricOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vec2 sideness = unpackedAttributes.sideness;\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n vec4 clippedViewPosV0; bool clippedV0,culledV0; clipLineSegmentToNearPlane(viewPosV0.xyz, viewPosV1.xyz, clippedV0, culledV0, clippedViewPosV0); vec4 clippedViewPosV1; bool clippedV1, culledV1; clipLineSegmentToNearPlane(viewPosV1.xyz, viewPosV0.xyz, clippedV1, culledV1, clippedViewPosV1); vec4 viewPos = mix(clippedViewPosV0, clippedViewPosV1, sidenessNorm.y);\n vViewPosition = viewPos.xyz / viewPos.w;\n vec4 projPosV0 = czm_projection * clippedViewPosV0;\n vec4 projPosV1 = czm_projection * clippedViewPosV1;\n vec4 projPos = czm_projection * viewPos;\n vec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\n vec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\n vec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\n float lineLengthPixels = length(screenSpaceLinePixels);\n float dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\n vec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\n vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\n float falloffFactor = distanceBasedPerspectiveFactor(-viewPos.z) * uPixelRatio;\n float lineWidthPixels = unpackedAttributes.lineWidthPixels * falloffFactor;\n float extensionLengthPixels = calculateExtensionLength(unpackedAttributes.extensionLengthPixels, lineLengthPixels) * falloffFactor;\n float lineAmplitudePixels = calculateLineAmplitude(unpackedAttributes) * uPixelRatio;\n vSizeFalloffFactor = falloffFactor;\n float lineWidthAndAmplitudePixels = lineWidthPixels + lineAmplitudePixels + lineAmplitudePixels;\n float extendedLineLengthPixels = lineLengthPixels + extensionLengthPixels + extensionLengthPixels;\n#ifdef ANTIALIASING\n const float aaPaddingPixels = 1.0;\n // Line size with padding\n float halfAAPaddedLineWidthAndAmplitudePixels = lineWidthAndAmplitudePixels * 0.5 + aaPaddingPixels;\n float aaPaddedRoundedCapSizePixels = lineWidthPixels * 0.5 + aaPaddingPixels;\n // Line length with padding\n float aaPaddedLineLengthPixels = extendedLineLengthPixels + aaPaddingPixels + aaPaddingPixels;\n float halfAAPaddedLineLengthPixels = aaPaddedLineLengthPixels * 0.5;\n#else /* ANTIALIASING */\n // Even if there is no AA, we still want to do proper <1px rendering,\n // so we effectively clamp the pixel sizes to minimum of 1px and compute\n // coverage in the fragment shader \n float halfAAPaddedLineWidthAndAmplitudePixels = max(lineWidthAndAmplitudePixels, 1.0) * 0.5;\n float aaPaddedRoundedCapSizePixels = max(lineWidthPixels, 1.0) * 0.5;\n float halfAAPaddedLineLengthPixels = max(extendedLineLengthPixels, 1.0) * 0.5;\n#endif /* ANTIALIASING */\n // Half line width in NDC including padding for anti aliasing\n vec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\n vec2 halfAAPaddedLineWidthAndAmplitudeNDC = halfAAPaddedLineWidthAndAmplitudePixels * uPixelToNDC;\n vec2 aaPaddedRoundedCapSizeNDC = aaPaddedRoundedCapSizePixels * uPixelToNDC;\n vec2 extensionLengthNDC = extensionLengthPixels * uPixelToNDC;\n // Compute screen space position of vertex, offsetting for line size and end caps\n vec2 ndcOffset = (screenSpaceDirection * sideness.y * (aaPaddedRoundedCapSizeNDC + extensionLengthNDC) + perpendicularScreenSpaceDirection * halfAAPaddedLineWidthAndAmplitudeNDC);\n projPos.xy += ndcOffset * projPos.w;\n projPos.z += (dzPerPixel * (aaPaddedRoundedCapSizePixels + extensionLengthPixels)) * sideness.y * projPos.w;\n projPos = adjustProjectedPosition(projPos, worldNormal, 1.0 + max((lineWidthAndAmplitudePixels - 1.0) * 0.5, 0.0));\n // Line length with end caps\n float aaPaddedLineWithCapsLengthPixels = extendedLineLengthPixels + aaPaddedRoundedCapSizePixels + aaPaddedRoundedCapSizePixels;\n float pixelPositionAlongLine = aaPaddedLineWithCapsLengthPixels * sidenessNorm.y - aaPaddedRoundedCapSizePixels;\n // Position in pixels with origin at first vertex of line segment\n // The line width radius in pixels\n vRadius = lineWidthPixels * 0.5;\n vLineLengthPixels = extendedLineLengthPixels;\n vPosition = czm_writeNonPerspective(vec3(halfAAPaddedLineWidthAndAmplitudePixels * sideness.x, pixelPositionAlongLine, pixelPositionAlongLine / extendedLineLengthPixels), projPos.w);\n#ifdef SILHOUETTE\n gl_Position = isSilhouetteEdge(viewPosV0, aNormalA, aNormalB) ? projPos : vec4(10.0, 10.0, 10.0, 1.0);\n#else /* SILHOUETTE */\n gl_Position = projPos;\n#endif /* SILHOUETTE */\n\n#if (MODE == 2)\n if (unpackedAttributes.edgeType <= 0.0 && lineLengthPixels <= 3.0)\n {\n gl_Position = vec4(10.0, 10.0, 10.0, 1.0);\n }\n#elif (MODE == 1)\n if (lineLengthPixels <= 3.0)\n {\n gl_Position = vec4(10.0, 10.0, 10.0, 1.0); \n }\n#endif\n return projPos;\n}\n\n\n#if (MODE == 2)\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float fType = component.edgeType;\n float extensionLengthPixels = component.extensionLength;\n float lineWidth = component.lineWidth;\n if (fType <= 0.0)\n {\n extensionLengthPixels *= aVariantExtension * 2.0 - 1.0;\n }\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels, fType);\n}\n#else /* (MODE == 2) */\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float extensionLengthPixels = component.extensionLength;\n#if (MODE == 1)\n // extensionLengthPixels = 0.05 * aVariantExtension * 2.0 - 1.0;\n extensionLengthPixels = 5.0;\n#endif\n float lineWidth = component.lineWidth;\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels);\n}\n#endif /* (MODE == 2) */\n\nvarying vec2 fSelected;\n#ifdef BatchTable\nuniform sampler2D batchTexture; \nvec2 computeSt(float batchId)\n{\n float stepX = batchTextureStep.x;\n float centerX = batchTextureStep.y;\n float numberOfAttributes = float(5);\n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);\n}\nvec4 czm_batchTable_operation(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(1);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n return value;\n}\nvec3 czm_batchTable_translate(float batchId) \n{\n vec2 st = computeSt(batchId); \n st.x += batchTextureStep.x * float(3); \n vec4 textureValue = texture2D(batchTexture, st); \n vec3 value = textureValue.xyz; \n return value; \n} \n#endif\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\nvoid s3mBatchOperation(vec4 operationType, inout vec4 vertexColor, inout vec4 vertexPos_0, inout vec4 vertexPos_1, vec3 translation, inout float fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n fSelected = 1.0;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected = 1.0;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos_0.xyz += translation;\n vertexPos_1.xyz += translation;\n }\n}\nvoid main()\n{\n fSelected = vec2(0.0);\n ComponentData component = readComponentData();\n UnpackedAttributes unpackedAttributes = unpackAttributes(component);\n vec4 vertexPos0 = vec4(aPosition0, 1.0);\n vec4 vertexPos1 = vec4(aPosition1, 1.0);\n vec3 translate = uTranslationAndBottom.xyz;\n#ifdef BatchTable\n #ifdef Translation\n translate = czm_batchTable_translate(batchId);\n #endif\n vColor = uLineColor;\n vec4 operationType = czm_batchTable_operation(batchId);\n s3mBatchOperation(operationType, vColor, vertexPos0, vertexPos1, translate, fSelected.x);\n#endif\n vec4 worldPosV0 = czm_model * vertexPos0;\n vec4 worldPosV1 = czm_model * vertexPos1;\n vec4 viewPosV0 = czm_modelView * vertexPos0;\n vec4 viewPosV1 = czm_modelView * vertexPos1;\n#ifdef SILHOUETTE\n vec3 worldNormal = silhouetteWorldNormal(aNormalA, aNormalB);\n#else /* SILHOUETTE */\n vec3 worldNormal = modelToWorldNormal(aNormal);\n#endif /* SILHOUETTE */\n // General geometric computation for all types of edges\n vec4 projPos = calculateGeometricOutputs(viewPosV0, viewPosV1, worldPosV0, worldPosV1, worldNormal, unpackedAttributes);\n calculateStyleOutputs(unpackedAttributes);\n#ifdef EXCAVATION\n vec3 vertexPos = mix(aPosition0.xyz, aPosition1.xyz, aSideness.y);\n vExcavationVertexPos = uGeoMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n vertexLogDepth();\n}\n",_0x39cceb=(_0x1a183c=!0,function(e,t){var i=_0x1a183c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a183c=!1,i}),_0x2a774b=_0x39cceb(void 0,(function(){return _0x2a774b.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a774b).search("(((.+)+)+)+$")})),_0x1a183c;_0x2a774b();var _0x59e865="\nprecision highp float;\n\n#include <SceneUboDecl>\n#include <LayerUboDecl>\nvarying vec4 vColor;\nvarying float vRadius;\nvarying vec3 vPosition;\nvarying vec3 vViewPosition;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\nvarying vec2 vStrokeUV;\nuniform sampler2D uStrokesTexture;\nvarying vec2 fSelected;\n#include <calculatePolyTexCoord>\n#include <executeExcavation>\n#include <splitClip>\n#include <clip>\n#include <writeLogDepthDecl>\n\n// At which coverage threshold we discard a fragment completely\n#define COVERAGE_TEST_THRESHOLD 0.01\nconst float nearRange = 1000.0;\nconst float farRange = 20000.0;\n\n// Sketch\n#if (MODE == 1)\nconst vec4 RGBA_2_FLOAT_FACTORS = vec4(\n 255.0 / (256.0),\n 255.0 / (256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\n return dot(rgba, RGBA_2_FLOAT_FACTORS);\n}\nfloat calculateLineOffsetSketch()\n{\n float strokesNormalizationScale = 16.0;\n float offsetNorm = rgba2float(texture2D(uStrokesTexture, vStrokeUV));\n return (offsetNorm - 0.5) * strokesNormalizationScale;\n}\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSketch();\n}\nfloat calculateLinePressureSketch() {\n return rgba2float(texture2D(uStrokesTexture, vStrokeUV + vec2(0.0, 0.5)));\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSketch();\n}\n#endif\n\n// Solid\n#if (MODE == 2 || MODE == 0)\nfloat calculateLineOffsetSolid()\n{\n return 0.0;\n}\nfloat calculateLinePressureSolid()\n{\n return 1.0;\n}\n#endif\n\n#if (MODE == 0)\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSolid();\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSolid();\n}\n#endif\n\n// Uber\n#if (MODE == 2)\nvarying float vType;\nfloat calculateLineOffset()\n{\n if (vType <= 0.0)\n {\n return calculateLineOffsetSketch();\n }\n else\n {\n return calculateLineOffsetSolid();\n }\n}\n\nfloat calculateLinePressure()\n{\n if (vType <= 0.0)\n {\n return calculateLinePressureSketch();\n }\n else\n {\n return calculateLinePressureSolid();\n }\n}\n#endif\n\nvec2 lineWithCapsDistance(float radius, vec2 position, float lineLength)\n{\n float lineOffset = calculateLineOffset();\n float positionX = position.x - lineOffset;\n if (radius < 1.0)\n {\n float coverageX = clamp(min(radius, positionX + 0.5) - max(-radius, positionX - 0.5), 0.0, 1.0);\n float coverageY = clamp(min(lineLength, position.y + 0.5) - max(0.0, position.y - 0.5), 0.0, 1.0);\n float coverage = min(coverageX, coverageY);\n return vec2(0.5 - coverage, 0.0);\n }\n else\n {\n // Between -radius -> 0 for start cap, 0 for line, 0 -> radius\n float positionOnCap = position.y - clamp(position.y, 0.0, lineLength);\n vec2 lineToPosition = vec2(positionX, positionOnCap);\n return vec2(length(lineToPosition) - radius, positionOnCap / radius);\n }\n}\n\nvoid main()\n{\n#ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(executeExcavation())\n {\n discard;\n }\n#endif\n vec3 realPosition = czm_readNonPerspective(vPosition, 1.0 / vDistanceFromEye);\n float radius = vRadius * calculateLinePressure();\n vec2 distance = lineWithCapsDistance(radius, realPosition.xy, vLineLengthPixels);\n float coverage = clamp(0.5 - distance.x, 0.0, 1.0);\n#ifdef ANTIALIASING\n const float coverageLimit = COVERAGE_TEST_THRESHOLD;\n#else\n /* ANTIALIASING */\n // Use subpixel coverage computation when lines get subpixel widths\n // so we still render them appropriately. Otherwise discard anything\n // that is not fully within the line\n float coverageLimit = radius <= 0.5 ? COVERAGE_TEST_THRESHOLD : 0.75;\n#endif /* ANTIALIASING */\n if (coverage < coverageLimit || vColor.a < 0.1)\n {\n discard;\n }\n#ifdef WIREFRAME_SELECT_TYPE\n if(fSelected.x < 0.1)\n {\n discard;\n }\n#endif\n float alpha = vColor.a * coverage;\n gl_FragColor = vec4(vColor.rgb, alpha);\n#ifdef CLIP\n gl_FragColor *= clip(vec4(vViewPosition, 1.0), 1.0);\n#endif\n float attenuation = 1.0 - smoothstep(nearRange, farRange, vDistanceFromEye);\n gl_FragColor.a *= attenuation;\n#ifdef LOG_DEPTH\n writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",tmp$1={};tmp$1=function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,(function(e){var i=t[a][1][e];return r(i||e)}),c,c.exports,e,t,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])}}return e},i.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,i,n,r){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+n),r);else for(var o=0;o<n;o++)e[r+o]=t[i+o]},flattenChunks:function(e){var t,i,n,r,o,a;for(n=0,t=0,i=e.length;t<i;t++)n+=e[t].length;for(a=new Uint8Array(n),r=0,t=0,i=e.length;t<i;t++)o=e[t],a.set(o,r),r+=o.length;return a}},o={arraySet:function(e,t,i,n,r){for(var o=0;o<n;o++)e[r+o]=t[i+o]},flattenChunks:function(e){return[].concat.apply([],e)}};i.setTyped=function(e){e?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,r)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,o))},i.setTyped(n)},{}],2:[function(e,t,i){var n=e("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var i="",a=0;a<t;a++)i+=String.fromCharCode(e[a]);return i}a[254]=a[254]=1,i.string2buf=function(e){var t,i,r,o,a,s=e.length,l=0;for(o=0;o<s;o++)55296==(64512&(i=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(r-56320),o++),l+=i<128?1:i<2048?2:i<65536?3:4;for(t=new n.Buf8(l),a=0,o=0;a<l;o++)55296==(64512&(i=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(r-56320),o++),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t},i.buf2binstring=function(e){return l(e,e.length)},i.binstring2buf=function(e){for(var t=new n.Buf8(e.length),i=0,r=t.length;i<r;i++)t[i]=e.charCodeAt(i);return t},i.buf2string=function(e,t){var i,n,r,o,s=t||e.length,u=new Array(2*s);for(n=0,i=0;i<s;)if((r=e[i++])<128)u[n++]=r;else if((o=a[r])>4)u[n++]=65533,i+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&i<s;)r=r<<6|63&e[i++],o--;o>1?u[n++]=65533:r<65536?u[n++]=r:(r-=65536,u[n++]=55296|r>>10&1023,u[n++]=56320|1023&r)}return l(u,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+a[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){function n(e,t,i,n){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==i;){i-=a=i>2e3?2e3:i;do{o=o+(r=r+t[n++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}t.exports=n},{}],4:[function(e,t,i){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,i){function n(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}var r=n();function o(e,t,i,n){var o=r,a=n+i;e^=-1;for(var s=n;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}t.exports=o},{}],6:[function(e,t,i){function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=n},{}],7:[function(e,t,i){var n=30,r=12;t.exports=function(e,t){var i,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S,w,E,P;i=e.state,o=e.next_in,E=e.input,a=o+(e.avail_in-5),s=e.next_out,P=e.output,l=s-(t-e.avail_out),u=s+(e.avail_out-257),c=i.dmax,h=i.wsize,d=i.whave,f=i.wnext,p=i.window,_=i.hold,m=i.bits,g=i.lencode,x=i.distcode,y=(1<<i.lenbits)-1,v=(1<<i.distbits)-1;e:do{m<15&&(_+=E[o++]<<m,m+=8,_+=E[o++]<<m,m+=8),$=g[_&y];t:for(;;){if(_>>>=b=$>>>24,m-=b,0==(b=$>>>16&255))P[s++]=65535&$;else{if(!(16&b)){if(0==(64&b)){$=g[(65535&$)+(_&(1<<b)-1)];continue t}if(32&b){i.mode=r;break e}e.msg="invalid literal/length code",i.mode=n;break e}T=65535&$,(b&=15)&&(m<b&&(_+=E[o++]<<m,m+=8),T+=_&(1<<b)-1,_>>>=b,m-=b),m<15&&(_+=E[o++]<<m,m+=8,_+=E[o++]<<m,m+=8),$=x[_&v];i:for(;;){if(_>>>=b=$>>>24,m-=b,!(16&(b=$>>>16&255))){if(0==(64&b)){$=x[(65535&$)+(_&(1<<b)-1)];continue i}e.msg="invalid distance code",i.mode=n;break e}if(C=65535&$,m<(b&=15)&&(_+=E[o++]<<m,(m+=8)<b&&(_+=E[o++]<<m,m+=8)),(C+=_&(1<<b)-1)>c){e.msg="invalid distance too far back",i.mode=n;break e}if(_>>>=b,m-=b,C>(b=s-l)){if((b=C-b)>d&&i.sane){e.msg="invalid distance too far back",i.mode=n;break e}if(S=0,w=p,0===f){if(S+=h-b,b<T){T-=b;do{P[s++]=p[S++]}while(--b);S=s-C,w=P}}else if(f<b){if(S+=h+f-b,(b-=f)<T){T-=b;do{P[s++]=p[S++]}while(--b);if(S=0,f<T){T-=b=f;do{P[s++]=p[S++]}while(--b);S=s-C,w=P}}}else if(S+=f-b,b<T){T-=b;do{P[s++]=p[S++]}while(--b);S=s-C,w=P}for(;T>2;)P[s++]=w[S++],P[s++]=w[S++],P[s++]=w[S++],T-=3;T&&(P[s++]=w[S++],T>1&&(P[s++]=w[S++]))}else{S=s-C;do{P[s++]=P[S++],P[s++]=P[S++],P[s++]=P[S++],T-=3}while(T>2);T&&(P[s++]=P[S++],T>1&&(P[s++]=P[S++]))}break}}break}}while(o<a&&s<u);o-=T=m>>3,_&=(1<<(m-=T<<3))-1,e.next_in=o,e.next_out=s,e.avail_in=o<a?a-o+5:5-(o-a),e.avail_out=s<u?u-s+257:257-(s-u),i.hold=_,i.bits=m}},{}],8:[function(e,t,i){var n=e("../utils/common"),r=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees"),l=0,u=1,c=2,h=4,d=5,f=6,p=0,_=1,m=2,g=-2,x=-3,y=-4,v=-5,$=8,b=1,T=2,C=3,S=4,w=5,E=6,P=7,A=8,L=9,M=10,R=11,O=12,D=13,I=14,F=15,B=16,N=17,G=18,z=19,U=20,V=21,k=22,W=23,H=24,q=25,j=26,X=27,Y=28,Z=29,K=30,Q=31,J=852,ee=592,te=15;function ie(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ne(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function re(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=b,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(J),t.distcode=t.distdyn=new n.Buf32(ee),t.sane=1,t.back=-1,p):g}function oe(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,re(e)):g}function ae(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?g:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,oe(e))):g}function se(e,t){var i,n;return e?(n=new ne,e.state=n,n.window=null,(i=ae(e,t))!==p&&(e.state=null),i):g}function le(e){return se(e,te)}var ue,ce,he=!0;function de(e){if(he){var t;for(ue=new n.Buf32(512),ce=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(u,e.lens,0,288,ue,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(c,e.lens,0,32,ce,0,e.work,{bits:5}),he=!1}e.lencode=ue,e.lenbits=9,e.distcode=ce,e.distbits=5}function fe(e,t,i,r){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),r>=a.wsize?(n.arraySet(a.window,t,i-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),n.arraySet(a.window,t,i-r,o,a.wnext),(r-=o)?(n.arraySet(a.window,t,i-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}function pe(e,t){var i,J,ee,te,ne,re,oe,ae,se,le,ue,ce,he,pe,_e,me,ge,xe,ye,ve,$e,be,Te,Ce,Se=0,we=new n.Buf8(4),Ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return g;(i=e.state).mode===O&&(i.mode=D),ne=e.next_out,ee=e.output,oe=e.avail_out,te=e.next_in,J=e.input,re=e.avail_in,ae=i.hold,se=i.bits,le=re,ue=oe,be=p;e:for(;;)switch(i.mode){case b:if(0===i.wrap){i.mode=D;break}for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(2&i.wrap&&35615===ae){i.check=0,we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0),ae=0,se=0,i.mode=T;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",i.mode=K;break}if((15&ae)!==$){e.msg="unknown compression method",i.mode=K;break}if(se-=4,$e=8+(15&(ae>>>=4)),0===i.wbits)i.wbits=$e;else if($e>i.wbits){e.msg="invalid window size",i.mode=K;break}i.dmax=1<<$e,e.adler=i.check=1,i.mode=512&ae?M:O,ae=0,se=0;break;case T:for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(i.flags=ae,(255&i.flags)!==$){e.msg="unknown compression method",i.mode=K;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=K;break}i.head&&(i.head.text=ae>>8&1),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0)),ae=0,se=0,i.mode=C;case C:for(;se<32;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.head&&(i.head.time=ae),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,we[2]=ae>>>16&255,we[3]=ae>>>24&255,i.check=o(i.check,we,4,0)),ae=0,se=0,i.mode=S;case S:for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.head&&(i.head.xflags=255&ae,i.head.os=ae>>8),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0)),ae=0,se=0,i.mode=w;case w:if(1024&i.flags){for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.length=ae,i.head&&(i.head.extra_len=ae),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0)),ae=0,se=0}else i.head&&(i.head.extra=null);i.mode=E;case E:if(1024&i.flags&&((ce=i.length)>re&&(ce=re),ce&&(i.head&&($e=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,J,te,ce,$e)),512&i.flags&&(i.check=o(i.check,J,ce,te)),re-=ce,te+=ce,i.length-=ce),i.length))break e;i.length=0,i.mode=P;case P:if(2048&i.flags){if(0===re)break e;ce=0;do{$e=J[te+ce++],i.head&&$e&&i.length<65536&&(i.head.name+=String.fromCharCode($e))}while($e&&ce<re);if(512&i.flags&&(i.check=o(i.check,J,ce,te)),re-=ce,te+=ce,$e)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=A;case A:if(4096&i.flags){if(0===re)break e;ce=0;do{$e=J[te+ce++],i.head&&$e&&i.length<65536&&(i.head.comment+=String.fromCharCode($e))}while($e&&ce<re);if(512&i.flags&&(i.check=o(i.check,J,ce,te)),re-=ce,te+=ce,$e)break e}else i.head&&(i.head.comment=null);i.mode=L;case L:if(512&i.flags){for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(ae!==(65535&i.check)){e.msg="header crc mismatch",i.mode=K;break}ae=0,se=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=O;break;case M:for(;se<32;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}e.adler=i.check=ie(ae),ae=0,se=0,i.mode=R;case R:if(0===i.havedict)return e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,m;e.adler=i.check=1,i.mode=O;case O:if(t===d||t===f)break e;case D:if(i.last){ae>>>=7&se,se-=7&se,i.mode=X;break}for(;se<3;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}switch(i.last=1&ae,se-=1,3&(ae>>>=1)){case 0:i.mode=I;break;case 1:if(de(i),i.mode=U,t===f){ae>>>=2,se-=2;break e}break;case 2:i.mode=N;break;case 3:e.msg="invalid block type",i.mode=K}ae>>>=2,se-=2;break;case I:for(ae>>>=7&se,se-=7&se;se<32;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if((65535&ae)!=(ae>>>16^65535)){e.msg="invalid stored block lengths",i.mode=K;break}if(i.length=65535&ae,ae=0,se=0,i.mode=F,t===f)break e;case F:i.mode=B;case B:if(ce=i.length){if(ce>re&&(ce=re),ce>oe&&(ce=oe),0===ce)break e;n.arraySet(ee,J,te,ce,ne),re-=ce,te+=ce,oe-=ce,ne+=ce,i.length-=ce;break}i.mode=O;break;case N:for(;se<14;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(i.nlen=257+(31&ae),ae>>>=5,se-=5,i.ndist=1+(31&ae),ae>>>=5,se-=5,i.ncode=4+(15&ae),ae>>>=4,se-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=K;break}i.have=0,i.mode=G;case G:for(;i.have<i.ncode;){for(;se<3;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.lens[Ee[i.have++]]=7&ae,ae>>>=3,se-=3}for(;i.have<19;)i.lens[Ee[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,Te={bits:i.lenbits},be=s(l,i.lens,0,19,i.lencode,0,i.work,Te),i.lenbits=Te.bits,be){e.msg="invalid code lengths set",i.mode=K;break}i.have=0,i.mode=z;case z:for(;i.have<i.nlen+i.ndist;){for(;me=(Se=i.lencode[ae&(1<<i.lenbits)-1])>>>16&255,ge=65535&Se,!((_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(ge<16)ae>>>=_e,se-=_e,i.lens[i.have++]=ge;else{if(16===ge){for(Ce=_e+2;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(ae>>>=_e,se-=_e,0===i.have){e.msg="invalid bit length repeat",i.mode=K;break}$e=i.lens[i.have-1],ce=3+(3&ae),ae>>>=2,se-=2}else if(17===ge){for(Ce=_e+3;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}se-=_e,$e=0,ce=3+(7&(ae>>>=_e)),ae>>>=3,se-=3}else{for(Ce=_e+7;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}se-=_e,$e=0,ce=11+(127&(ae>>>=_e)),ae>>>=7,se-=7}if(i.have+ce>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=K;break}for(;ce--;)i.lens[i.have++]=$e}}if(i.mode===K)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=K;break}if(i.lenbits=9,Te={bits:i.lenbits},be=s(u,i.lens,0,i.nlen,i.lencode,0,i.work,Te),i.lenbits=Te.bits,be){e.msg="invalid literal/lengths set",i.mode=K;break}if(i.distbits=6,i.distcode=i.distdyn,Te={bits:i.distbits},be=s(c,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,Te),i.distbits=Te.bits,be){e.msg="invalid distances set",i.mode=K;break}if(i.mode=U,t===f)break e;case U:i.mode=V;case V:if(re>=6&&oe>=258){e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,a(e,ue),ne=e.next_out,ee=e.output,oe=e.avail_out,te=e.next_in,J=e.input,re=e.avail_in,ae=i.hold,se=i.bits,i.mode===O&&(i.back=-1);break}for(i.back=0;me=(Se=i.lencode[ae&(1<<i.lenbits)-1])>>>16&255,ge=65535&Se,!((_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(me&&0==(240&me)){for(xe=_e,ye=me,ve=ge;me=(Se=i.lencode[ve+((ae&(1<<xe+ye)-1)>>xe)])>>>16&255,ge=65535&Se,!(xe+(_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}ae>>>=xe,se-=xe,i.back+=xe}if(ae>>>=_e,se-=_e,i.back+=_e,i.length=ge,0===me){i.mode=j;break}if(32&me){i.back=-1,i.mode=O;break}if(64&me){e.msg="invalid literal/length code",i.mode=K;break}i.extra=15&me,i.mode=k;case k:if(i.extra){for(Ce=i.extra;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.length+=ae&(1<<i.extra)-1,ae>>>=i.extra,se-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=W;case W:for(;me=(Se=i.distcode[ae&(1<<i.distbits)-1])>>>16&255,ge=65535&Se,!((_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(0==(240&me)){for(xe=_e,ye=me,ve=ge;me=(Se=i.distcode[ve+((ae&(1<<xe+ye)-1)>>xe)])>>>16&255,ge=65535&Se,!(xe+(_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}ae>>>=xe,se-=xe,i.back+=xe}if(ae>>>=_e,se-=_e,i.back+=_e,64&me){e.msg="invalid distance code",i.mode=K;break}i.offset=ge,i.extra=15&me,i.mode=H;case H:if(i.extra){for(Ce=i.extra;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.offset+=ae&(1<<i.extra)-1,ae>>>=i.extra,se-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=K;break}i.mode=q;case q:if(0===oe)break e;if(ce=ue-oe,i.offset>ce){if((ce=i.offset-ce)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=K;break}ce>i.wnext?(ce-=i.wnext,he=i.wsize-ce):he=i.wnext-ce,ce>i.length&&(ce=i.length),pe=i.window}else pe=ee,he=ne-i.offset,ce=i.length;ce>oe&&(ce=oe),oe-=ce,i.length-=ce;do{ee[ne++]=pe[he++]}while(--ce);0===i.length&&(i.mode=V);break;case j:if(0===oe)break e;ee[ne++]=i.length,oe--,i.mode=V;break;case X:if(i.wrap){for(;se<32;){if(0===re)break e;re--,ae|=J[te++]<<se,se+=8}if(ue-=oe,e.total_out+=ue,i.total+=ue,ue&&(e.adler=i.check=i.flags?o(i.check,ee,ue,ne-ue):r(i.check,ee,ue,ne-ue)),ue=oe,(i.flags?ae:ie(ae))!==i.check){e.msg="incorrect data check",i.mode=K;break}ae=0,se=0}i.mode=Y;case Y:if(i.wrap&&i.flags){for(;se<32;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(ae!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=K;break}ae=0,se=0}i.mode=Z;case Z:be=_;break e;case K:be=x;break e;case Q:return y;default:return g}return e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,(i.wsize||ue!==e.avail_out&&i.mode<K&&(i.mode<X||t!==h))&&fe(e,e.output,e.next_out,ue-e.avail_out),le-=e.avail_in,ue-=e.avail_out,e.total_in+=le,e.total_out+=ue,i.total+=ue,i.wrap&&ue&&(e.adler=i.check=i.flags?o(i.check,ee,ue,e.next_out-ue):r(i.check,ee,ue,e.next_out-ue)),e.data_type=i.bits+(i.last?64:0)+(i.mode===O?128:0)+(i.mode===U||i.mode===F?256:0),(0===le&&0===ue||t===h)&&be===p&&(be=v),be}function _e(e){if(!e||!e.state)return g;var t=e.state;return t.window&&(t.window=null),e.state=null,p}function me(e,t){var i;return e&&e.state?0==(2&(i=e.state).wrap)?g:(i.head=t,t.done=!1,p):g}function ge(e,t){var i,n=t.length;return e&&e.state?0!==(i=e.state).wrap&&i.mode!==R?g:i.mode===R&&r(1,t,n,0)!==i.check?x:fe(e,t,n,n)?(i.mode=Q,y):(i.havedict=1,p):g}i.inflateReset=oe,i.inflateReset2=ae,i.inflateResetKeep=re,i.inflateInit=le,i.inflateInit2=se,i.inflate=pe,i.inflateEnd=_e,i.inflateGetHeader=me,i.inflateSetDictionary=ge,i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,i){var n=e("../utils/common"),r=15,o=852,a=592,s=0,l=1,u=2,c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],d=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],f=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,i,p,_,m,g,x){var y,v,$,b,T,C,S,w,E,P=x.bits,A=0,L=0,M=0,R=0,O=0,D=0,I=0,F=0,B=0,N=0,G=null,z=0,U=new n.Buf16(r+1),V=new n.Buf16(r+1),k=null,W=0;for(A=0;A<=r;A++)U[A]=0;for(L=0;L<p;L++)U[t[i+L]]++;for(O=P,R=r;R>=1&&0===U[R];R--);if(O>R&&(O=R),0===R)return _[m++]=20971520,_[m++]=20971520,x.bits=1,0;for(M=1;M<R&&0===U[M];M++);for(O<M&&(O=M),F=1,A=1;A<=r;A++)if(F<<=1,(F-=U[A])<0)return-1;if(F>0&&(e===s||1!==R))return-1;for(V[1]=0,A=1;A<r;A++)V[A+1]=V[A]+U[A];for(L=0;L<p;L++)0!==t[i+L]&&(g[V[t[i+L]]++]=L);if(e===s?(G=k=g,C=19):e===l?(G=c,z-=257,k=h,W-=257,C=256):(G=d,k=f,C=-1),N=0,L=0,A=M,T=m,D=O,I=0,$=-1,b=(B=1<<O)-1,e===l&&B>o||e===u&&B>a)return 1;for(;;){S=A-I,g[L]<C?(w=0,E=g[L]):g[L]>C?(w=k[W+g[L]],E=G[z+g[L]]):(w=96,E=0),y=1<<A-I,M=v=1<<D;do{_[T+(N>>I)+(v-=y)]=S<<24|w<<16|E|0}while(0!==v);for(y=1<<A-1;N&y;)y>>=1;if(0!==y?(N&=y-1,N+=y):N=0,L++,0==--U[A]){if(A===R)break;A=t[i+g[L]]}if(A>O&&(N&b)!==$){for(0===I&&(I=O),T+=M,F=1<<(D=A-I);D+I<R&&!((F-=U[D+I])<=0);)D++,F<<=1;if(B+=1<<D,e===l&&B>o||e===u&&B>a)return 1;_[$=N&b]=O<<24|D<<16|T-m|0}}return 0!==N&&(_[T+N]=A-I<<24|64<<16|0),x.bits=O,0}},{"../utils/common":1}],10:[function(e,t,i){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,i){function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=n},{}],"/lib/inflate.js":[function(e,t,i){var n=e("./zlib/inflate"),r=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),l=e("./zlib/zstream"),u=e("./zlib/gzheader"),c=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,t.windowBits);if(i!==a.Z_OK)throw new Error(s[i]);this.header=new u,n.inflateGetHeader(this.strm,this.header)}function d(e,t){var i=new h(t);if(i.push(e,!0),i.err)throw i.msg||s[i.err];return i.result}function f(e,t){return(t=t||{}).raw=!0,d(e,t)}h.prototype.push=function(e,t){var i,s,l,u,h,d,f=this.strm,p=this.options.chunkSize,_=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=o.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(p),f.next_out=0,f.avail_out=p),(i=n.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&_&&(d="string"==typeof _?o.string2buf(_):"[object ArrayBuffer]"===c.call(_)?new Uint8Array(_):_,i=n.inflateSetDictionary(this.strm,d)),i===a.Z_BUF_ERROR&&!0===m&&(i=a.Z_OK,m=!1),i!==a.Z_STREAM_END&&i!==a.Z_OK)return this.onEnd(i),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&i!==a.Z_STREAM_END&&(0!==f.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(f.output,f.next_out),u=f.next_out-l,h=o.buf2string(f.output,l),f.next_out=u,f.avail_out=p-u,u&&r.arraySet(f.output,f.output,l,u,0),this.onData(h)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&i!==a.Z_STREAM_END);return i===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=h,i.inflate=d,i.inflateRaw=f,i.ungzip=d},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js");var nt$b=tmp$1,n$L;function w$R(e){var t=e.uint8Array,i=e.format,n=e.request,r=u$Z(e.flipY,!1);o$1q.typeOf.object("uint8Array",t),o$1q.typeOf.string("format",i);var o,a=new Blob([t],{type:i});return t$10.supportsImageBitmapOptions().then((function(e){return e?o$1l(t$10.createImageBitmapFromBlob(a,{flipY:r,premultiplyAlpha:!1})):new t$10({url:o=window.URL.createObjectURL(a),request:n}).fetchImage({flipY:r})})).then((function(e){return e$2e(o)&&window.URL.revokeObjectURL(o),e})).otherwise((function(e){return e$2e(o)&&window.URL.revokeObjectURL(o),o$1l.reject(e)}))}function h$U(e,t,i){if(!e$2e(t))throw new t$15("resourceOrUrlOrBuffer is required.");var n;t instanceof ArrayBuffer||ArrayBuffer.isView(t)?n=o$1l.resolve(t):n=t$10.createIfNeeded(t).fetchArrayBuffer();if(e$2e(n))return n.then((function(t){if(e$2e(t)){var n=[];t instanceof ArrayBuffer?n.push(t):(0===t.byteOffset&&t.byteLength===t.buffer.byteLength||(t=t.slice(0,t.length)),n.push(t.buffer));var r=u$Z(i,!1);return e.scheduleTask({data:t,bMipMap:r},n)}})).then((function(e){return e$1K.clone(e)}))}function o$V(){}function P$R(){var e=o$V._transcodeTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/basis_transcoder.js",wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then((function(){return o$V._transcodeTaskProcessor}));o$V._readyPromise=e}function f$U(e,t){var i;(o$1q.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?i=o$1l.resolve(e):i=t$10.createIfNeeded(e).fetchArrayBuffer();return i.then((function(e){return o$V.transcode(e,n$L,t)}))}o$V._transcodeTaskProcessor=new i$W("transcodeKTX2",Number.POSITIVE_INFINITY),o$V._readyPromise=void 0,o$V.transcode=function(e,t,i){return o$1q.defined("supportedTargetFormats",t),e$2e(o$V._readyPromise)||P$R(),o$V._readyPromise.then((function(n){var r;if(e instanceof ArrayBuffer){var o=new Uint8Array(e);return r={supportedTargetFormats:t,ktx2Buffer:o,testId:i},n.scheduleTask(r,[e])}return r={supportedTargetFormats:t,ktx2Buffer:e},n.scheduleTask(r)})).then((function(e){var t,i=e.length,n=Object.keys(e[0]),r=n.length;for(t=0;t<i;t++)for(var o=e[t],a=0;a<r;a++){var s=o[n[a]];o[n[a]]=new e$1K(s.internalFormat,s.width,s.height,s.levelBuffer,s.datatype)}if(1===r){for(t=0;t<i;++t)e[t]=e[t][n[0]];1===i&&(e=e[0])}return e})).otherwise((function(e){throw e}))},f$U.setKTX2SupportedFormats=function(e,t,i,n,r,o){n$L={s3tc:e,pvrtc:t,astc:i,etc:n,etc1:r,bc7:o}};var _0x4bab9e=(_0x58d183=!0,function(e,t){var i=_0x58d183?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x58d183=!1,i}),_0x1bd7f3=_0x4bab9e(void 0,(function(){return _0x1bd7f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bd7f3).search("(((.+)+)+)+$")})),_0x58d183;function _0xf77618(e){this._ambientColor=new e$1X(1,1,1,1),this._diffuseColor=new e$1X(1,1,1,1),this._specularColor=new e$1X(0,0,0,0),this._shininess=50,this._bTransparentSorting=!1,this._textures=[],this._texMatrix=p$1d.clone(p$1d.IDENTITY),this._usePBR=!1,this._isInvalidOblique=!1,this._usePBRTextureBatch=!1,this._alphaMode=void 0,this._isKTK2=!1,this._RGBTOBGR=!1,e$2e(e)&&(e$2e(e.ambient)&&(this._ambientColor=e$2c.clone(e.ambient)),e$2e(e.diffuse)&&(this._diffuseColor=e$2c.clone(e.diffuse)),e$2e(e.specular)&&(this._specularColor=e$2c.clone(e.specular)),this._shininess=e.shininess||50,this._bTransparentSorting=e.bTransparentSorting||!1,this._textures=e.textures||[]),this._mapTextures={},this.isAssociateMaterial=!1}_0x1bd7f3(),Object.defineProperties(_0xf77618.prototype,{hasTexture:{get:function(){return this._textures.length>0||(e$2e(this.baseColorTexture)||e$2e(this.normalTexture)||e$2e(this.emissiveTexture)||e$2e(this.metallicRoughnessTexture)||e$2e(this.occlusionTexture))}}}),_0xf77618.prototype.clone=function(e){for(var t in e$2e(e)||(e=new _0xf77618({})),e._ambientColor=e$1X.clone(this._ambientColor),e._diffuseColor=e$1X.clone(this._diffuseColor),e._specularColor=e$1X.clone(this._specularColor),e._bTransparentSorting=this._bTransparentSorting,e._shininess=this._shininess,e._texMatrix=p$1d.clone(this._texMatrix),e._usePBR=this._usePBR,e._alphaMode=this._alphaMode,e._isInvalidOblique=this._isInvalidOblique,e._isKTK2=this._isKTK2,e._RGBTOBGR=this._RGBTOBGR,e.isAssociateMaterial=this.isAssociateMaterial,this._usePBR&&(e._alphaCutoff=this._alphaCutoff,e._baseColor=e$1X.clone(this._baseColor),e._baseColorTextureIndex=this._baseColorTextureIndex,e._baseColorTextureCoordIndex=this._baseColorTextureCoordIndex,e._doubleSided=this._doubleSided,e._emissiveFactor=e$1X.clone(this._emissiveFactor),e._emissiveTextureIndex=this._emissiveTextureIndex,e._emissiveTextureCoordIndex=this._emissiveTextureCoordIndex,e._roughnessFactor=this._roughnessFactor,e._metallicFactor=this._metallicFactor,e._metallicRoughnessTextureIndex=this._metallicRoughnessTextureIndex,e._metallicRoughnessTextureCoordIndex=this._metallicRoughnessTextureCoordIndex,e._normalTextureIndex=this._normalTextureIndex,e._normalTextureCoordIndex=this._normalTextureCoordIndex,e._normalTextureScale=this._normalTextureScale,e._occlusionTextureIndex=this._occlusionTextureIndex,e._occlusionTextureCoordIndex=this._occlusionTextureCoordIndex,e._occlusionTextureStrength=this._occlusionTextureStrength,e._baseColorTextureMotion=new _0x3e7ab8,e._baseColorTextureMotion.clone(this._baseColorTextureMotion),e._emissiveTextureMotion=new _0x3e7ab8,e._emissiveTextureMotion.clone(this._emissiveTextureMotion),e._usePBRTextureBatch=this._usePBRTextureBatch,e.baseColorTexture=this.baseColorTexture,e.normalTexture=this.normalTexture,e.emissiveTexture=this.emissiveTexture,e.metallicRoughnessTexture=this.metallicRoughnessTexture,e.occlusionTexture=this.occlusionTexture,e.pbrParamTexture=this.pbrParamTexture),this._textures){!e$2e(i=this._textures[t])||(this._isKTK2?i._inner._context._textureCache.getTexture(i.keyword):Se$e.AddRef(i.id),e._textures[t]=this._textures[t])}for(var t in this._mapTextures){var i;!e$2e(i=this._mapTextures[t])||(Se$e.AddRef(i.id),e._mapTextures[t]=this._mapTextures[t])}},_0xf77618.prototype.requestSharedTexture=function(e,t,i,n,r,o,a,s){var l=Se$e._shareTextureCache[e];e$2e(l)||(l=o$10(e,o),Se$e._shareTextureCache[e]=l);var u=this;return o$1l(l,(function(i){var o;if(i instanceof ArrayBuffer){var l,c=new Uint32Array(i,0,6),h=c[0],d=c[1],f=c[2],p=c[3],_=c[4],m=c[5],g=new Uint8Array(i,24,m);if(m===_)l=g;else{var x=nt$b.inflate(g).buffer;l=new Uint8Array(x,0,_)}(o=Se$e.CreateTexture(t,n,d,f,p,h,l,!1,a,s)).isShared=!0,o.sharedKey=e}else o=i;var y=u._baseColorTextureIndex===r,v=u._emissiveTextureIndex===r,$=u._normalTextureIndex===r,b=u._metallicRoughnessTextureIndex===r,T=u._occlusionTextureIndex===r;y?u.baseColorTexture=o:v?u.emissiveTexture=o:$?u.normalTexture=o:b?u.metallicRoughnessTexture=o:T&&(u.occlusionTexture=o),0==r&&u._textures.length>0?u._textures.splice(0,0,o):u._textures.push(o),Se$e._shareTextureCache[e]=o})),l},_0xf77618.prototype.createWebp=function(e,t,i,n,r,o,a,s,l,u,c){var h=Se$e.textureManager.textures[e];if(c=u$Z(c,!0),e$2e(h))return this._textures.push(h),Se$e.textureManager.refCounts[e]++,h;for(var d=r.length,f=r.byteOffset,p=new DataView(r.buffer),_=0,m=[];_<d;){var g=p.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT,_+=Uint32Array.BYTES_PER_ELEMENT;var x=r.subarray(_,_+g);f+=g,_+=g;var y=w$R({uint8Array:x,format:"image/webp"});m.push(y)}var v=this;return o$1l.all(m,(function(t){var r=t[0];if(e$2e(r)){var o=!0;(!e$2d.isPowerOfTwo(r.width)||!e$2d.isPowerOfTwo(r.height))&&(s=q$1a.CLAMP_TO_EDGE,l=q$1a.CLAMP_TO_EDGE,o=!1),o=o&&c;var a=t.slice(1),u=new t$U({context:i,source:r,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({wrapS:s,wrapT:l,minificationFilter:0!==t.length&&o?tt$i.LINEAR_MIPMAP_LINEAR:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR}),mipLevels:a});u.id=e,Se$e.textureManager.textures[e]=u,Se$e.textureManager.refCounts[e]=1,0===n&&v._textures.length>0?v._textures.splice(0,0,u):v._textures.push(u)}})).otherwise((function(e){console.error(e)}))},_0xf77618.prototype.createJPGPNG=function(e,t,i,n,r,o,a){var s=Se$e.textureManager.textures[e];if(e$2e(s))return this._textures.push(s),Se$e.textureManager.refCounts[e]++,s;var l=[],u="image/jpeg";"png"===a&&(u="image/png");var c=w$R({uint8Array:n,format:u});l.push(c);var h=this,d=o$1l.defer();return o$1l.all(l,(function(n){var a=n[0];if(e$2e(a)){(!e$2d.isPowerOfTwo(a.width)||!e$2d.isPowerOfTwo(a.height))&&(r=q$1a.CLAMP_TO_EDGE,o=q$1a.CLAMP_TO_EDGE);var s=new t$U({context:t,source:a,pixelFormat:V$12.RGBA,flipY:!0,sampler:new e$1S({wrapS:r,wrapT:o,minificationFilter:(n.length,tt$i.LINEAR),magnificationFilter:rt$k.LINEAR})});s.id=e,Se$e.textureManager.textures[e]=s,Se$e.textureManager.refCounts[e]=1,ti$4._memTextureAdded(s._sizeInBytes),0===i&&h._textures.length>0?h._textures.splice(0,0,s):h._textures.push(s),d.resolve(s)}})).otherwise((function(e){console.error(e)})),d.promise},_0xf77618.prototype.createPBRParamter=function(e){if(e$2e(e.pbrMetallicRoughness)){var t=e.pbrMetallicRoughness;this._usePBR=!0,this._alphaCutoff=u$Z(t.alphaCutoff,e.alphaCutoff),this._alphaMode=u$Z(t.alphaMode,e.alphaMode),this._baseColor=new e$1X(t.baseColor.x,t.baseColor.y,t.baseColor.z,t.baseColor.w),this._baseColorTextureIndex=t.baseColorTextureIndex,this._baseColorTextureCoordIndex=t.baseColorTextureCoordIndex,this._doubleSided=t.doubleSided,this._emissiveFactor=new e$1X(t.emissiveFactor.x,t.emissiveFactor.y,t.emissiveFactor.z,1),this._emissiveTextureIndex=t.emissiveTextureIndex,this._emissiveTextureCoordIndex=t.emissiveTextureCoordIndex,this._roughnessFactor=t.roughnessFactor,this._metallicFactor=t.metallicFactor,this._metallicRoughnessTextureIndex=t.metallicRoughnessTextureIndex,this._metallicRoughnessTextureCoordIndex=t.metallicRoughnessTextureCoordIndex,this._normalTextureIndex=t.normalTextureIndex,this._normalTextureCoordIndex=t.normalTextureCoordIndex,this._normalTextureScale=t.normalTextureScale,this._occlusionTextureIndex=t.occlusionTextureIndex,this._occlusionTextureCoordIndex=t.occlusionTextureCoordIndex,this._occlusionTextureStrength=t.occlusionTextureStrength,this._baseColorTextureMotion=new _0x3e7ab8(t.baseColorTextureMotion),this._emissiveTextureMotion=new _0x3e7ab8(t.emissiveTextureMotion),this.baseColorTexture=t.baseColorTexture,this.normalTexture=t.normalTexture,this.emissiveTexture=t.emissiveTexture,this.metallicRoughnessTexture=t.metallicRoughnessTexture,this.occlusionTexture=t.occlusionTexture}},_0xf77618.prototype.createCRN=function(e,t,i,n,r,o,a,s,l,u){var c;if(l=u$Z(l,!0),s?c=a$P(r.imageBuffer,!0,!0):_0x29d1c7.CRNTaskProcessorReady&&(c=h$U(_0x29d1c7.CRNProcessor,r.imageBuffer,!0)),e$2e(c)){var h=this;return c.then((function(t){if(!h.isDestroyed()){u=u$Z(u,{});var s=Se$e.CreateTexture(e,i,r.width,r.height,r.nFormat,_0x22a8f5.enrS3TCDXTN,t.bufferView,!1,o,a,l);u.isEmissiveTex?h.emissiveTexture=s:u.isNormalTexture?h.normalTexture=s:u.isMetallicRoughnessTexture?h.metallicRoughnessTexture=s:u.isBaseColorTexture?h.baseColorTexture=s:0===n&&h._textures.length>0?h._textures.splice(0,0,s):h._textures.push(s)}})),c}},_0xf77618.prototype.createKTX2=function(e,t,i,n,r,o,a,s){this._isKTK2=!0;var l=i._textureCache.getTexture(e);if(s=u$Z(s,!0),e$2e(l))return this._textures.push(l),l;var u=f$U(r.imageBuffer,r.id);if(e$2e(u)){var c=this;return u.then((function(t){var n=i._textureCache.getTexture(e);if(e$2e(n))c._textures.push(n);else{var r,l=0;Array.isArray(t)&&(l=t.length,r=t.slice(1,t.length).map((function(e){return e.bufferView})),t=t[0]);var u=!0;(!e$2d.isPowerOfTwo(t.width)||!e$2d.isPowerOfTwo(t.height))&&(o=q$1a.CLAMP_TO_EDGE,a=q$1a.CLAMP_TO_EDGE,u=!1),s||(l=0,r=void 0,u=!1);var h=new e$1S({wrapS:o,wrapT:a,minificationFilter:0!==l&&u?tt$i.LINEAR_MIPMAP_LINEAR:tt$i.LINEAR,magnificationFilter:tt$i.LINEAR});(n=e$2e(t.internalFormat)?new t$U({context:i,pixelFormat:t.internalFormat,width:t.width,height:t.height,source:{arrayBufferView:t.bufferView,mipLevels:r},sampler:h}):new t$U({context:i,source:t,sampler:h})).keyword=e,c._textures.push(n),i._textureCache.addTexture(e,n)}})).otherwise((function(e){console.log(e)})),u}},_0xf77618.prototype.createCommonParamter=function(e){var t=u$Z(e.ambient,e$1X.WHITE);this._ambientColor=new e$1X(t.r,t.g,t.b,t.a);var i=u$Z(e.diffuse,e$1X.WHITE);this._diffuseColor=new e$1X(i.r,i.g,i.b,i.a);var n=u$Z(e.specular,e$1X.WHITE);this._specularColor=new e$1X(n.r,n.g,n.b,n.a),this._shininess=u$Z(e.shininess,10),this._bTransparentSorting=u$Z(e.transparentsorting,!1)};var _0x484e80=new e$2c;function _0x3e7ab8(e){if(!e$2e(e))return this.OffsetPeriod=0,this.OffsetSpeedU=0,this.OffsetSpeedV=0,this.TilingPeriod=0,this.TilingSpeedU=0,void(this.TilingSpeedV=0);this.OffsetPeriod=e.offsetPeriod,this.OffsetSpeedU=e.offsetSpeedU,this.OffsetSpeedV=e.offsetSpeedV,this.TilingPeriod=e.tilingPeriod,this.TilingSpeedU=e.tilingSpeedU,this.TilingSpeedV=e.tilingSpeedV}_0xf77618.prototype.createPBRUniformMap=function(){var e={};if(!this._usePBR)return e;var t=this;e.u_metallicFactor=function(){return t._metallicFactor},e.u_roughnessFactor=function(){return t._roughnessFactor},e.u_emissiveFactor=function(){return t._emissiveFactor},e.u_baseColorFactor=function(){return t._baseColor},e.u_alphaCutoff=function(){return t._alphaCutoff},e.u_baseColorTexture=function(){return t._textures[t._baseColorTextureIndex]},e.u_metallicRoughnessTexture=function(){return t._textures[t._metallicRoughnessTextureIndex]},e.u_normalTexture=function(){return t._textures[t._normalTextureIndex]},e.u_occlusionTexture=function(){return t._textures[t._occlusionTextureIndex]},e.u_emissiveTexture=function(){return t._textures[t._emissiveTextureIndex]};var i=t._emissiveTextureMotion;e.u_emissiveUVOffsetAndTiling=function(){var e=performance.now()/1e3;if(i._offsetPeriod>0){var t=e%i._offsetPeriod;_0x484e80.x=t*i._offsetSpeedU,_0x484e80.y=t*i._offsetSpeedV}else _0x484e80.x=0,_0x484e80.y=0;if(i._tilingPeriod>0){var n=e%i._tilingPeriod;_0x484e80.z=1+n*i._tilingSpeedU,_0x484e80.w=1+n*i._tilingSpeedV}else _0x484e80.z=1,_0x484e80.w=1;return _0x484e80};var n=t._baseColorTextureMotion;return e.u_baseColorUVOffsetAndTiling=function(){var e=performance.now()/1e3;if(n._offsetPeriod>0){var t=e%n._offsetPeriod;_0x484e80.x=t*n._offsetSpeedU,_0x484e80.y=t*n._offsetSpeedV}else _0x484e80.x=0,_0x484e80.y=0;if(n._tilingPeriod>0){var i=e%n._tilingPeriod;_0x484e80.z=1+i*n._tilingSpeedU,_0x484e80.w=1+i*n._tilingSpeedV}else _0x484e80.z=1,_0x484e80.w=1;return _0x484e80},e},_0xf77618.prototype.appendPBRMacroToShader=function(e,t){!this._usePBR||(e.defines.push("USE_PBR"),t.defines.push("USE_PBR"),this._baseColorTextureIndex>=0&&t.defines.push("HAS_BASECOLOR_TEXTURE"),this._normalTextureIndex>=0&&t.defines.push("HAS_NORMAL_TEXTURE"),this._metallicRoughnessTextureIndex>=0&&t.defines.push("HAS_METALLICROUGHNESS_TEXTURE"),this._occlusionTextureIndex>=0&&t.defines.push("HAS_OCCLUSION_TEXTURE"),this._emissiveTextureIndex>=0&&t.defines.push("HAS_EMISSIVE_TEXTURE"),this._doubleSided&&t.defines.push("DOUBLE_SIDED"))},_0xf77618.Default=new _0xf77618,_0xf77618.prototype.isDestroyed=function(){return!1},_0xf77618.prototype.destroy=function(){for(var e in this._ambientColor=null,this._diffuseColor=null,this._specularColor=null,this._textures){e$2e(t=this._textures[e])&&(this._isKTK2?t.destroy():Se$e.DestroyTexture(t.id))}for(var e in this._mapTextures){var t;e$2e(t=this._mapTextures[e])&&Se$e.DestroyTexture(t.id)}return i$11(this)},_0x3e7ab8.prototype.clone=function(e){this.OffsetPeriod=e.OffsetPeriod,this.OffsetSpeedU=e.OffsetSpeedU,this.OffsetSpeedV=e.OffsetSpeedV,this.TilingPeriod=e.TilingPeriod,this.TilingSpeedU=e.TilingSpeedU,this.TilingSpeedV=e.TilingSpeedV};var _0x16cd4e=(_0x3f1cb1=!0,function(e,t){var i=_0x3f1cb1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f1cb1=!1,i}),_0x23fdc8=_0x16cd4e(void 0,(function(){return _0x23fdc8.toString().search("(((.+)+)+)+$").toString().constructor(_0x23fdc8).search("(((.+)+)+)+$")})),_0x3f1cb1;_0x23fdc8();var _0x3d75a9={EXCAVATION:"EXCAVATION",FALTTEN:"FALTTEN",OVERLAY:"OVERLAY",HYPSOMETRIC:"HYPSOMETRIC",ADJUST_COLOR:"ADJUST_COLOR",TRANSPARENT_BACK_COLOR:"TRANSPARENT_BACK_COLOR",HORIZONTAL_LINE:"HORIZONTAL_LINE",COMPUTE_W_VALUE:"COMPUTE_W_VALUE",COMPUTE_TEXCOORD:"COMPUTE_TEXCOORD",HAS_LIGHT:"HAS_LIGHT",HAS_NORMAL:"HAS_NORMAL",REPLACE_SELECT_TYPE:"REPLACE_SELECT_TYPE",SILHOUETTE_SELECT_TYPE:"SILHOUETTE_SELECT_TYPE",MULTI_TEX:"MULTI_TEX",APPLY_SPLIT:"APPLY_SPLIT",APPLY_SWIPE:"APPLY_SWIPE",TEXCOORD:"TexCoord",TEXCOORD2:"TexCoord2",COMPRESS_VERTEX:"COMPRESS_VERTEX",COMPRESS_NORMAL:"COMPRESS_NORMAL",COMPRESS_COLOR:"COMPRESS_COLOR",COMPRESS_TEXCOORD:"COMPRESS_TEXCOORD",SKETCH_MODE:"SKETCH_MODE",NORMAL_AND_DEPTH:"NORMAL_AND_DEPTH",POST_EFFECT:"POST_EFFECT",CLIP_FILT_BY_ID:"CLIP_FILT_BY_ID",CLIP:"CLIP",CLIPPLANE:"CLIPPLANE",PBR:"PBR",PT_CLOUD:"PT_CLOUD",DIR_LIGHTS:"DIR_LIGHTS ",POINT_LIGHTS:"POINT_LIGHTS ",SPOT_LIGHTS:"SPOT_LIGHTS ",HEMISPHERE_LIGHTS:"HEMISPHERE_LIGHTS ",W_VISIBLE:"W_VISIBLE",EMISSION_TEXTURE_ATLAS:"EMISSION_TEXTURE_ATLAS",EMISSION_TEXTURE_COUNT:"EMISSION_TEXTURE_COUNT ",TEXTURE_MOVE:"TEXTURE_MOVE",VOLUME:"Volume",VOLUME2:"Volume2",TEXTURE_COORD_ONE_IS_W:"TEXTURE_COORD_ONE_IS_W",TRIANGLE_FILTRATE:"TRIANGLE_FILTRATE",UseInstanceSkeletonMatrix:"UseInstanceSkeletonMatrix",RGBTOBGR:"RGBTOBGR",HAS_SKELETONSELECTED:"HAS_SKELETONSELECTED",SKELETONSELECT_ENABLE:"SKELETONSELECT_ENABLE",REPLACE_COLOR_TYPE:"REPLACE_COLOR_TYPE",INVALID_OBLIQUE:"INVALID_OBLIQUE",IGNORE_NORMAL:"IGNORE_NORMAL",TextureBatch:"TextureBatch",Translation:"Translation",VOL_AND_HYP:"VOL_AND_HYP",VERTEX_CAPTURE:"VERTEX_CAPTURE",SEC_TEX_EMISSION:"SEC_TEX_EMISSION",BRDF:"BRDF",PBR_THEME:"PBR_THEME",IBL:"IBL",POINT:"POINT",HAS_BASE_TEXTURE:"HAS_BASE_TEXTURE",HAS_NORMAL_TEXTURE:"HAS_NORMAL_TEXTURE",HAS_OCCLUSION_TEXTURE:"HAS_OCCLUSION_TEXTURE",HAS_EMISSIVE_TEXTURE:"HAS_EMISSIVE_TEXTURE",USE_BatchPBR:"USE_BatchPBR",HAS_DIR_LIGHTS:"HAS_DIR_LIGHTS",HAS_POINT_LIGHTS:"HAS_POINT_LIGHTS",HAS_SPOT_LIGHTS:"HAS_SPOT_LIGHTS",HAS_HEMISPHERE_LIGHTS:"HAS_HEMISPHERE_LIGHTS",NO_TEXCOORD:"NO_TEXCOORD",FLOOD_ANALYSIS:"FLOOD_ANALYSIS",HAS_RAIN:"HAS_RAIN",HAS_WETNESS:"HAS_WETNESS",HAS_SNOW:"HAS_SNOW",HAS_MetallicRoughness_TEXTURE:"HAS_MetallicRoughness_TEXTURE",FusionMode:"FusionMode",VISIBLEDISTANCEMAX:"VISIBLEDISTANCEMAX",MASK:"MASK",LineVector:"LineVector",KtxEnvMap:"KtxEnvMap",WIREFRAME_SELECT_TYPE:"WIREFRAME_SELECT_TYPE",Has_Texture:"Has_Texture",UseFloatTexture:"UseFloatTexture",HypColorByZValue:"HypColorByZValue"},D$V=Object.freeze(_0x3d75a9),e$1h={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3},i$R=Object.freeze(e$1h),_0xd6a068=(_0xea8fab=!0,function(e,t){var i=_0xea8fab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xea8fab=!1,i}),_0x2d9fb1=_0xd6a068(void 0,(function(){return _0x2d9fb1.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d9fb1).search("(((.+)+)+)+$")})),_0xea8fab;_0x2d9fb1();var _0x2fd7a8={S3M:49,S3M4:1},_0x43b37d=Object.freeze(_0x2fd7a8),_0x1d9588=(_0x306ce1=!0,function(e,t){var i=_0x306ce1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x306ce1=!1,i}),_0x172550=_0x1d9588(void 0,(function(){return _0x172550.toString().search("(((.+)+)+)+$").toString().constructor(_0x172550).search("(((.+)+)+)+$")})),_0x306ce1;_0x172550();var _0x2ae437={RESET:0,SetColor:1,SELECTED:2,HIDE:4,OFFSET:8,CLIP:16,BLOOM:32,ALL:255},_0x27a6bb=Object.freeze(_0x2ae437),_0x35c032=(_0x1806ec=!0,function(e,t){var i=_0x1806ec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1806ec=!1,i}),_0xdf2bc4=_0x35c032(void 0,(function(){return _0xdf2bc4.toString().search("(((.+)+)+)+$").toString().constructor(_0xdf2bc4).search("(((.+)+)+)+$")})),_0x1806ec;_0xdf2bc4();var _0x31152b={MIX:0,REPLACE:1},_0x2b839f=Object.freeze(_0x31152b),_0x30bd73=(_0x27a409=!0,function(e,t){var i=_0x27a409?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27a409=!1,i}),_0x2d3b09=_0x30bd73(void 0,(function(){return _0x2d3b09.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d3b09).search("(((.+)+)+)+$")})),_0x27a409;_0x2d3b09();var _0xebc218={DIRECTIONAL:0,POINT:1,SPOT:2,HEMISPHERE:3},_0x4970c2=Object.freeze(_0xebc218),_0x9ff2bc=(_0x37706f=!0,function(e,t){var i=_0x37706f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37706f=!1,i}),_0x3f5454=_0x9ff2bc(void 0,(function(){return _0x3f5454.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f5454).search("(((.+)+)+)+$")})),_0x37706f;_0x3f5454();var _0x381996={POINT:0,VOXEL:1},_0x2c4f4b=Object.freeze(_0x381996),_0x5d57e8=(_0x3133d4=!0,function(e,t){var i=_0x3133d4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3133d4=!1,i}),_0x12c502=_0x5d57e8(void 0,(function(){return _0x12c502.toString().search("(((.+)+)+)+$").toString().constructor(_0x12c502).search("(((.+)+)+)+$")})),_0x3133d4;_0x12c502();var _0x45a114={NONE:0,TITANIUM_SCUFFED:1,METAL_PLATE:2,EMISSION:4,ROUGHNESS:8},Xe$e=Object.freeze(_0x45a114),_0x13e07d=(_0x4d0a17=!0,function(e,t){var i=_0x4d0a17?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d0a17=!1,i}),_0x4835ab=_0x13e07d(void 0,(function(){return _0x4835ab.toString().search("(((.+)+)+)+$").toString().constructor(_0x4835ab).search("(((.+)+)+)+$")})),_0x4d0a17;_0x4835ab();var _0xaa057c="\n#include <SceneUboDecl>\n\nvar uFrontColorTexture : texture_2d<f32>;\nvar uFrontColorTextureSampler : sampler;\nvar uFrontDepthTexture : texture_2d<f32>;\nvar uFrontDepthTextureSampler : sampler;\nvar uBackDepthTexture : texture_2d<f32>;\nvar uBackDepthTextureSampler : sampler;\n\nuniform uSQMode : f32;\n\nvarying vSecondColor : vec4<f32>; \nvarying vColor : vec4<f32>;\nvarying vSQ_clip_pos : vec4<f32>;\n\nfn reverseLogDepth(logZ : f32) -> f32\n{\n#ifdef LOG_DEPTH\n var near = Scene.uCurrentFrustum.x;\n var far = Scene.uCurrentFrustum.y;\n var log2Depth = logZ * Scene.uLog2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#else\n return logZ;\n#endif\n}\n\nfn unpackDepth(packedDepth : vec4<f32>) -> f32\n{\n return dot(packedDepth, vec4<f32>(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n}\n\nfn isPointInObject(ndc : vec4<f32>) -> bool\n{\n var depthTexCoord = ndc.xy * 0.5 + 0.5;\n var bIn = false;\n var color = textureSample(uFrontColorTexture, uFrontColorTextureSampler, depthTexCoord.xy);\n var pixelZWindow = ndc.z;\n if(color.r > 0.99 && color.g < 0.01 && color.b < 0.01)\n {\n var z_window_near = unpackDepth(textureSampleLevel(uFrontDepthTexture, uFrontDepthTextureSampler, depthTexCoord.xy, 0.0));\n z_window_near = reverseLogDepth(z_window_near);\n var z_window_far = unpackDepth(textureSampleLevel(uBackDepthTexture, uBackDepthTextureSampler, depthTexCoord.xy, 0.0));\n z_window_far = reverseLogDepth(z_window_far);\n if(pixelZWindow - z_window_near > -0.0000001 && z_window_far - pixelZWindow > -0.0000001)\n {\n bIn = true;\n }\n }\n if(uniforms.uSQMode < 0.5){\n return !bIn;\n }\n else{\n return bIn;\n }\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var ndc = vSQ_clip_pos / vSQ_clip_pos.w; \n if(!isPointInObject(ndc)) \n { \n discard; \n } \n if(vColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = vSecondColor; \n}",_0x23f71b=(_0x4d152c=!0,function(e,t){var i=_0x4d152c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d152c=!1,i}),_0x17db64=_0x23f71b(void 0,(function(){return _0x17db64.toString().search("(((.+)+)+)+$").toString().constructor(_0x17db64).search("(((.+)+)+)+$")})),_0x4d152c;function _0xee2f65(e,t){this._content=e,this._id=t,this._batchId=t,this._color=new e$1X(1,1,1,1),this._imageUrl="",this._vertexOffset=[],this._instanceIds=void 0,this._pbrMaterialIndex=void 0}_0x17db64(),Object.defineProperties(_0xee2f65.prototype,{show:{get:function(){return!0},set:function(e){}},color:{get:function(){return e$2e(this._color)||(this._color=new e$1X),this._color},set:function(e){this._color=e}},pbrMaterialIndex:{get:function(){return e$2e(this._pbrMaterialIndex)||(this._pbrMaterialIndex=0),this._pbrMaterialIndex},set:function(e){this._pbrMaterialIndex=e}},imageUrl:{get:function(){return this._imageUrl},set:function(e){this._imageUrl=e}},id:{get:function(){return this._id},set:function(e){this._id=e}},batchId:{get:function(){return this._batchId},set:function(e){this._batchId=e}},instanceIds:{get:function(){return this._instanceIds},set:function(e){this._instanceIds=e}}}),_0xee2f65.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},_0xee2f65.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},_0xee2f65.prototype.getProperty=function(e){return this[e]},_0xee2f65.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},_0xee2f65.prototype.addVertexOffset=function(e,t){this._vertexOffset.push({vertexCount:e,vertexOffset:t})},_0xee2f65.prototype.getVertexOffset=function(){return this._vertexOffset},_0xee2f65.prototype.getRenderBatchKey=function(){var e=this._color.toCssColorString();return this._imageUrl+"_"+e};var _0x37d1c6=(_0x3a54e1=!0,function(e,t){var i=_0x3a54e1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a54e1=!1,i}),_0x365e3b=_0x37d1c6(void 0,(function(){return _0x365e3b.toString().search("(((.+)+)+)+$").toString().constructor(_0x365e3b).search("(((.+)+)+)+$")})),_0x3a54e1;_0x365e3b();var _0x2445e0=function(){this.model=void 0,this.context=void 0,this.texture=void 0,this.subTextureInfo=void 0};_0x2445e0.prototype.set=function(e,t,i,n,r){this.model=t,this.context=e,this.texture=i,this.subTextureInfo=n,this.textureLod=r},_0x2445e0.prototype.execute=function(){var e=this.subTextureInfo;if(!this.texture.ready){if(!this.textureLod)return this.texture.arrayBufferView=e.arrayBufferView,void this.texture.init();this.texture.init()}this.texture.copyFrom({xOffset:e.xOffset,yOffset:e.yOffset,width:e.width,height:e.height,arrayBufferView:e.arrayBufferView})};var _0x2e1a14=(_0x3eba8d=!0,function(e,t){var i=_0x3eba8d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3eba8d=!1,i}),_0x23597d=_0x2e1a14(void 0,(function(){return _0x23597d.toString().search("(((.+)+)+)+$").toString().constructor(_0x23597d).search("(((.+)+)+)+$")})),_0x3eba8d;_0x23597d();var _0x21e433="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nattribute vec4 aPosition; \n#ifdef USE_VertexWeight \n attribute float aVertexWeight; \n #ifdef MultiTemporalWeight \n attribute float aVertexWeight_1; \n #endif \n#endif \n#ifdef HAS_NORMAL \n attribute vec3 aNormal; \n#endif \n#ifdef TexCoord \n attribute vec4 aTexCoord0; \n#endif \n#ifdef VertexColor \nattribute vec4 aColor; \n#endif \nvarying float v_pixelDistance; \nvarying vec4 vPosition; \n#ifdef COMPRESS_TEXCOORD \n#ifdef TexCoord \n attribute vec4 aTexCoordZ0; \n#endif \n#endif \n#ifdef COMPUTE_W_VALUE \n varying float wValue; \n#endif \n#ifdef HYPSOMETRIC \n uniform sampler2D uHypsometricTexture; \n#endif \n varying vec4 vColor; \n varying vec4 vPositionMC; \n#include <computeWValue>\n#ifdef HYPSOMETRIC \nvec4 computeContourMapColor(float fValue) \n{ \n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0); \n float contourRate = (fValue - uHypFloor) / threshold; \n float finalCoord = clamp(contourRate, 0.0, 1.0); \n float count = floor(finalCoord * 16.0); \n float y = (count*2.0 + 1.0)/32.0; \n float x = fract(finalCoord*16.0); \n if(y > 1.0) \n { \n x = 1.0; \n } \n vec2 contourCoord = vec2(x, y); \n return texture2D(uHypsometricTexture, contourCoord).rgba; \n} \nvec4 getHypsometricColor(vec4 oriColor, float fValue) \n{ \n vec4 contourMapColor = vec4(0.0); \n float finalOpacity = uHypOpacity; \n if(fValue > uHypMaxVisibleValue || fValue < uHypMinVisibleValue) \n { \n return uNoValueColor * oriColor; \n } \n contourMapColor = computeContourMapColor(fValue); \n finalOpacity *= sign(uHypContourFillMode); \n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity); \n return mixColor; \n} \n#endif \n \nvec3 realNormal; \nvoid main() \n{ \n#ifdef COMPRESS_VERTEX \n vec4 vertexPos = vec4(1.0); \n vertexPos = decode_position_min + aPosition * decode_position_normConstant; \n#else \n vec4 vertexPos = aPosition; \n#endif \n#ifdef HAS_NORMAL \n realNormal = aNormal; \n #ifdef COMPRESS_NORMAL \n realNormal = czm_octDecode(aNormal.xy, normal_rangeConstant).zxy; \n #endif \n#endif \n float oriVertexW = computeWValue(vertexPos); \n vertexPos.w = 1.0; \nvec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n #ifdef COMPRESS_COLOR \n #ifdef MeshOPT_Compress \n vertexColor = aColor; \n #else \n vertexColor = aColor / 255.0; \n #endif \n #else \n vertexColor = aColor; \n #endif \n#endif \n vColor = vertexColor*uFillForeColor; \n vPositionMC.xyz = vertexPos.xyz; \n vPositionMC.w = 0.0; \n gl_Position = uViewProjection * uModelMatrix * vertexPos; \n#ifdef HYPSOMETRIC \n vColor = getHypsometricColor(vColor, wValue); \n#endif \n v_pixelDistance = 2.0 / uPointSize;\n gl_PointSize = uPointSize; \n vPosition = uView * uModelMatrix * vertexPos; \n}",_0x58d074=(_0x38dd62=!0,function(e,t){var i=_0x38dd62?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38dd62=!1,i}),_0x5201dc=_0x58d074(void 0,(function(){return _0x5201dc.toString().search("(((.+)+)+)+$").toString().constructor(_0x5201dc).search("(((.+)+)+)+$")})),_0x38dd62;_0x5201dc();var _0x589347="#ifdef GL_OES_standard_derivatives \n#extension GL_OES_standard_derivatives : enable \n#endif \n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#ifdef COMPUTE_W_VALUE \n varying float wValue; \n#endif \nvarying vec4 vColor; \nvarying vec4 vPositionMC; \nvarying vec4 vPosition; \nvarying float v_pixelDistance; \n#include <preClipFS>\n#include <adjustColor>\n#include <clip>\nvoid main() \n{ \n preClip();\n vec4 finalColor = vColor; \n#ifdef ADJUST_COLOR \n finalColor.rgb = adjustColor(finalColor.rgb);\n#endif \n float distanceToCenter = length(gl_PointCoord - vec2(0.5)); \n float maxDistance = max(0.0, 0.5 - v_pixelDistance); \n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter); \n finalColor.a *= wholeAlpha; \n\tif(finalColor.a < 0.1) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef CLIP \n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n#ifdef PREPASS\n gl_FragData[0] = vPosition;\n gl_FragData[1] = vec4(0.0, 0.0, 0.0, 1.0);\n gl_FragData[2] = vec4(0.0, 0.0, 0.0, 1.0);\n#else\n gl_FragColor = czm_gammaCorrect(finalColor); \n#endif\n \n}",_0x467489=(_0x236f57=!0,function(e,t){var i=_0x236f57?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x236f57=!1,i}),_0x451ed6=_0x467489(void 0,(function(){return _0x451ed6.toString().search("(((.+)+)+)+$").toString().constructor(_0x451ed6).search("(((.+)+)+)+$")})),_0x236f57;_0x451ed6();var _0x2cd408="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <getMetersPerPixel>\n\n#ifdef COMPRESS_VERTEX\n attribute aPosition : vec4<u32>;\n#else\n attribute aPosition : vec4<f32>;\n#endif\n#ifdef HAS_NORMAL\n #ifdef COMPRESS_NORMAL\n attribute aNormal : vec2<i32>;\n #else\n attribute aNormal : vec3<f32>;\n #endif\n#endif\n#ifdef TexCoord\n attribute aTexCoord0 : vec4<f32>;\n#endif\n#ifdef VertexColor\n attribute aColor : vec4<u32>;\n#endif\n#ifdef USE_VertexWeight\n attribute aVertexWeight : f32;\n#endif\nattribute offset : vec2<f32>;\nvarying v_pixelDistance : f32;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vPosition : vec4<f32>;\nvarying vOffset : vec2<f32>;\n// #ifdef COMPUTE_W_VALUE\n// uniform float uHypHasColorByHeight;\n// varying float wValue;\n// #endif\n// #ifdef HYPSOMETRIC\n// uniform sampler2D uHypsometricTexture;\n// uniform float uHypOpacity;\n// uniform float uHypContourFillMode;\n// uniform float uHypFloor;\n// uniform float uHypCeil;\n// uniform float uHypMaxVisibleValue;\n// uniform float uHypMinVisibleValue;\n// uniform vec4 uNoValueColor;\n// #endif\n// #ifdef EXCAVATION\n// varying vec4 vExcavationVertexPos;\n// #endif\n// #ifdef W_VISIBLE\n// uniform sampler2D uCategorieTexture;\n// uniform float uMaxCategory;\n// uniform float uMinCategory;\n// uniform float uCategoryWidht;\n// #endif\n#ifdef COMPUTE_W_VALUE \n varying wValue : f32; \n#endif \n#ifdef HYPSOMETRIC \n var uHypsometricTexture : texture_2d<f32>;\n var uHypsometricTextureSampler : sampler;\n#endif\n#include <computeWValue> \n#ifdef HYPSOMETRIC \nfn computeContourMapColor(fValue : f32) -> vec4<f32> \n{ \n var threshold = clamp(abs(Layer.uHypCeil - Layer.uHypFloor), 0.000001, 20000.0); \n var contourRate = (fValue - Layer.uHypFloor) / threshold; \n var finalCoord = clamp(contourRate, 0.0, 1.0); \n var count = floor(finalCoord * 16.0); \n var y = (count*2.0 + 1.0)/32.0; \n var x = fract(finalCoord*16.0); \n if(y > 1.0) \n { \n x = 1.0; \n } \n var contourCoord = vec2(x, y); \n return textureSampleLevel(uHypsometricTexture, uHypsometricTextureSampler, contourCoord, 0.0f).rgba; \n} \nfn getHypsometricColor(oriColor : vec4<f32>, fValue : f32) -> vec4<f32> \n{ \n var contourMapColor = vec4<f32>(0.0); \n var finalOpacity = Layer.uHypOpacity; \n if(fValue > Layer.uHypMaxVisibleValue || fValue < Layer.uHypMinVisibleValue) \n { \n return Layer.uNoValueColor * oriColor; \n } \n contourMapColor = computeContourMapColor(fValue); \n finalOpacity *= sign(Layer.uHypContourFillMode); \n var mixColor : vec4<f32> = mix(vec4<f32>(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity); \n return mixColor; \n} \n#endif \n\n//计算偏移\nfn addScreenSpaceOffset(positionEC : vec4<f32>, offset : vec2<f32>) -> vec4<f32>\n{\n var result = positionEC;\n var width=vec2<f32>(Layer.uPointSize);\n var halfsize:vec2<f32>=width*0.5;\n halfsize*=offset*2.0;\n halfsize*=getMetersPerPixel(positionEC,Scene.uPixelRatio);\n result.x=positionEC.x+halfsize.x;\n result.y=positionEC.y+halfsize.y;\n return result;\n}\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs {\n#ifdef COMPRESS_VERTEX\n var iAPosition = vec4<f32>(aPosition);\n var vertexPos : vec4<f32>;\n vertexPos = Mesh.decode_position_min + vec4<f32>(iAPosition.xyz, 1.0f) * Mesh.decode_position_normConstant;\n#else\n var vertexPos = aPosition;\n#endif\n vOffset = offset;\n var realNormal : vec3<f32>;\n#ifdef HAS_NORMAL\n realNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n var fANormal = vec2<f32>(aNormal.xy);\n realNormal = czm_octDecode(fANormal.xy, Mesh.normal_rangeConstant).zxy;\n #endif\n#endif\n var oriVertexW = computeWValue(&vertexPos);\n vertexPos.w = 1.0;\n// #ifdef EXCAVATION\n// vExcavationVertexPos = uGeoMatrix * vertexPos;\n// #endif\n var vertexColor = vec4<f32>(1.0);\n#ifdef VertexColor\n var fColor = vec4<f32>(aColor);\n vertexColor = vec4<f32>(fColor.r / 255.0f, fColor.g / 255.0f, fColor.b / 255.0f, fColor.a / 255.0f);\n#endif\n vColor = vertexColor * Layer.uFillForeColor;\n // vPositionMC.xyz = vertexPos.xyz;\n // vPositionMC.w = 0.0;\n //point\n var positionEC= Scene.uView * Mesh.uModelMatrix *vertexPos;\n positionEC=addScreenSpaceOffset(positionEC,offset);\n vPositionMC = vec4<f32>(positionEC.xyz, 1.0f);//positionMC不能一致,否者计算法向量返回为0,导致颜色为黑色\n var originPos=Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n gl_Position=Scene.uProjection * positionEC;\n //gl_Position = Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n#ifdef HYPSOMETRIC \n vColor = getHypsometricColor(vColor, wValue); \n#endif \n// #ifdef W_VISIBLE\n// vec2 categoryTexCoord = vec2(abs(oriVertexW - uMinCategory) / uCategoryWidht + 0.5 /uCategoryWidht , 0.5);\n// float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n// vColor.a *= 1.0 - category;\n// #endif\n v_pixelDistance = 2.0 / Layer.uPointSize;\n vPosition = Scene.uView * Mesh.uModelMatrix * vertexPos;\n\n czm_vertexLogDepth();\n}",_0x369158=(_0x469388=!0,function(e,t){var i=_0x469388?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x469388=!1,i}),_0x56a022=_0x369158(void 0,(function(){return _0x56a022.toString().search("(((.+)+)+)+$").toString().constructor(_0x56a022).search("(((.+)+)+)+$")})),_0x469388;_0x56a022();var _0x138829="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\n#ifdef COMPUTE_W_VALUE \n varying wValue : f32; \n#endif \nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vPosition : vec4<f32>;\nvarying vOffset : vec2<f32>;\nvarying v_pixelDistance : f32;\n// #ifdef APPLY_SWIPE\n// uniform vec4 uSwipeRegion;\n// #endif\n\nfn sRGBToLinear(srgbIn : vec4<f32>) -> vec4<f32> {\n var linearOut = pow(vec3<f32>(srgbIn.x, srgbIn.y, srgbIn.z), vec3<f32>(2.200000048f, 2.200000048f, 2.200000048f));\n return vec4<f32>(linearOut.x, linearOut.y, linearOut.z, srgbIn.w);\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n// #ifdef APPLY_SPLIT\n// czm_splitClip();\n// #endif\n// #ifdef APPLY_SWIPE \n// czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n// #endif\n// #ifdef EXCAVATION\n// if(czm_executeExcavation())\n// {\n// discard;\n// }\n// #endif\n\t// if(vColor.a < 0.1)\n\t// {\n\t// \tdiscard;\n\t// }\n gl_FragColor = vColor;\n#ifdef ADJUST_COLOR\n\t//gl_FragColor.rgb = czm_adjustColor(gl_FragColor.rgb);\n#endif\n var distanceToCenter = length(vOffset);\n var maxDistance = max(0.0, 0.5 - v_pixelDistance);\n var wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n gl_FragColor.a *= wholeAlpha;\n\tif(gl_FragColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n// #ifdef CLIP\n// gl_FragColor *= czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n// #endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n\n#ifdef PREPASS\n // 相机坐标系坐标\n gl_FragData0 = vec4<f32>(0.0, 0.0, 0.0, 1.0);\n // 相机坐标系法线\n gl_FragData1 = vec4<f32>(0.0, 0.0, 1.0, 1.0);\n // 反射率\n gl_FragData2 = vec4<f32>(0.0, 0.0, 0.0, 1.0);\n#else\n //gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}",_0x569faf=(_0x5f573b=!0,function(e,t){var i=_0x5f573b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f573b=!1,i}),_0x4f89c2=_0x569faf(void 0,(function(){return _0x4f89c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f89c2).search("(((.+)+)+)+$")})),_0x5f573b;_0x4f89c2();var _0x359ef7="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <S3MVertexFactory>\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec2 fSelected;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvarying vec4 vIsFiltByID;\nvarying vec3 v_positionEC;\nvarying vec3 vNormalEC;\nvarying vec4 vPosition;\n\n#ifdef NORMAL_AND_DEPTH\n varying vec4 oriVertex;\n varying vec3 perVertexNormals;\n varying float depthInCamera;\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n varying float fSelectedForSilh;\n#endif\n \n#ifdef PBR_THEME\n varying float vPBRIndex;\n#endif\n\n#ifdef POINT\n varying float v_pixelDistance;\n#endif\n\n#ifdef COMPUTE_W_VALUE\n uniform float uHypHasColorByHeight;\n varying float wValue;\n#endif\n\n#include <calculatePolyTexCoord>\n#include <computeWValue>\n#include <getVertexByFlatten>\n#include <getFusionModePosition>\n#include <getUVMatrixDecl>\n#include <setAlphaByWValue>\n#include <getPBRParamFromTexture>\n#include <s3mComputeVaryings>\n#include <getNormalMatrix>\n#include <vertexLogDepthDecl>\n\nvoid main()\n{\n VertexFactoryIntermediates intermediates = getVertexFactoryIntermediates();\n vec4 vertexPos = intermediates.position;\n vec3 realNormal = intermediates.normal;\n vTexCoord.xy = intermediates.uv0.xy;\n vTexCoord.zw = intermediates.uv1.xy;\n vec4 vertexColor = intermediates.vertexColor;\n\n#ifdef FALTTEN\n vertexPos = getVertexByFlatten(vertexPos, uTranslationAndBottom.w);\n#endif\n\n vec4 localPos = uGeoMatrix * vertexPos;\n vec4 oriLocalPos = localPos;\n float oriVertexW = computeWValue(localPos);\n #ifdef MultiTemporalWeight\n vertexPos.z += localPos.z - oriLocalPos.z;\n #endif\n vertexPos.w = 1.0;\n\n#ifdef REPLACE_COLOR_TYPE\n vertexColor = uFillForeColor;\n#else\n vertexColor *= uFillForeColor;\n#endif\n vIsFiltByID = vec4(0.0);\n#ifdef BatchTable\n float batchTableID = intermediates.batchTableID;\n vSecondColor = czm_batchTable_pickColor(batchTableID);\n vec4 operationType = czm_batchTable_operation(batchTableID);\n vec4 objsColor = czm_batchTable_color(batchTableID);\n vec3 translate = uTranslationAndBottom.xyz;\n #ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(batchTableID).x + 0.1;\n #endif\n #ifdef Translation\n translate = czm_batchTable_translate(batchTableID);\n #endif\n #ifdef SILHOUETTE_SELECT_TYPE\n fSelectedForSilh = 0.0;\n czm_s3mBatchOperation(operationType, objsColor, vertexColor, vertexPos, vIsFiltByID, translate, fSelectedForSilh);\n #endif\n #ifndef SILHOUETTE_SELECT_TYPE\n fSelected = vec2(0.0);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor, vertexPos, vIsFiltByID, translate, fSelected);\n #endif\n#endif // BatchTable\n vColor = vertexColor;\n vPositionMC.xyz = vertexPos.xyz;\n vPositionMC.w = 0.0;\n vPosition = uViewProjection * uModelMatrix * vertexPos;\n#ifdef FusionMode\n gl_Position = getFusionModePosition(vertexPos);\n#else\n gl_Position = vPosition;\n#endif\n#ifdef COMPUTE_TEXCOORD\n #ifdef TextureBatch\n vec4 xywh = czm_batchTable_xywh_BaseTex(getTextureBatchId0(aTextureBatchId));\n vec4 xywh2 = vec4(0.0);\n #ifdef MULTI_TEX\n xywh2 = czm_batchTable_xywh_BakeTex(getTextureBatchId1(aTextureBatchId));\n #endif\n getUVMatrixForBatch(xywh, xywh2);\n #else\n getUVMatrix(intermediates.uv0, intermediates.uv1);\n #endif\n#endif // COMPUTE_TEXCOORD \n vec4 ec = (uView * uModelMatrix * vertexPos);\n v_positionEC = (ec / ec.w).xyz;\n vNormalEC = vec3(0.0);\n#ifdef HAS_LIGHT\n #ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n vPositionMC.w = 1.0;\n mat3 normalMatrix = getNormalMatrix(uView, uModelMatrix);\n #ifdef Instance\n vNormalEC = normalMatrix * intermediates.normalInstance;\n #else\n vNormalEC = normalMatrix * realNormal;\n #endif\n }\n #endif\n#endif\n#ifdef NORMAL_AND_DEPTH\n oriVertex = vertexPos;\n vec4 position = uView * vertexPos;\n depthInCamera = (position.z - czm_depthRange.near) / (czm_depthRange.far - czm_depthRange.near);\n perVertexNormals = vec3(0.0,0.0,0.0);\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n perVertexNormals = normalize(mat3(uView * uModelMatrix) * realNormal);\n }\n#endif\n#endif\n#ifdef W_VISIBLE\n setAlphaByWValue(oriVertexW, vColor);\n#endif\n\n#ifdef VERTEX_CAPTURE\n vSecondColor = uView * uModelMatrix * vertexPos;\n gl_PointSize = 12.0;\n#endif\n\n#ifdef POINT\n #ifndef WEBGPU\n gl_PointSize = uPointSize;\n #endif\n v_pixelDistance = 2.0 / uPointSize;\n#endif\n\n#ifdef USE_BatchPBR\n getPBRParamFromTexture(intermediates.pbrTextureUV.xy);\n#endif\n\n s3mComputeVaryings(vertexPos);\n \n vertexLogDepth();\n}",_0x5b8fb7=(_0x328a9a=!0,function(e,t){var i=_0x328a9a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x328a9a=!1,i}),_0x87854b=_0x5b8fb7(void 0,(function(){return _0x87854b.toString().search("(((.+)+)+)+$").toString().constructor(_0x87854b).search("(((.+)+)+)+$")})),_0x328a9a;_0x87854b();var _0x1931a7="#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n#endif\n#ifdef PREPASS\n#extension GL_EXT_draw_buffers : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <S3MVolumeUboDecl>\n#include <LightUboDecl>\n\nvarying vec4 vIsFiltByID;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvarying vec3 v_positionEC;\nvarying vec4 vSecondColor;\nvarying vec3 vNormalEC;\n \n#ifdef COMPUTE_W_VALUE\n varying float wValue;\n#endif\n\n#if defined(REPLACE_SELECT_TYPE) || defined(REPLACE_COLOR_TYPE)\n varying vec2 fSelected;\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n varying float fSelectedForSilh;\n#endif\n\n#ifdef SKETCH_MODE\n uniform vec4 uLineColor;\n uniform float uLineWidth;\n#endif\n\n#ifdef Height_Map\nvec4 renderHeightMap()\n{\n return czm_packValue(wValue);\n}\n#endif\n\n#include <SRGBtoLINEAR>\n#include <renderNormal>\n#include <renderNormalAndDepth>\n#include <renderPrePass>\n#include <preClipFS>\n#include <calcTexCoordDecl>\n#include <getTextureColorDecl>\n#include <getNormalMatrix>\n#include <getNormalEC>\n\n#ifdef SHADOW_MAP\n #include <ShadowUboDecl>\n #include <shadowReceive>\n#endif\n\n#ifdef HAS_LIGHT\n #include <shaderModelBase>\n #ifdef BRDF\n #include <brdf>\n #else\n #include <blinnPhong>\n #endif\n#endif\n\n#include <S3MOperationFSDecl>\n#include <HypSometric>\n#include <getEmissiveTextureAtlasColor>\n#include <adjustColor>\n#include <clip>\n#include <sketchMode>\n#include <writeLogDepthDecl>\n\nvec4 shaderModel(vec4 baseColor, vec4 realTexCoord, vec2 oriTexCoord)\n{\n#ifndef HAS_LIGHT\n #ifdef SHADOW_MAP\n float shadow = getShadowVisibility(vec4(v_positionEC, 1.0), getNormalEC(vNormalEC, uModelMatrix, vPositionMC.xyz), -v_positionEC.z);\n return vec4(LINEARtoSRGB(baseColor.rgb * shadow), baseColor.a);\n #else\n return vec4(LINEARtoSRGB(baseColor.rgb), baseColor.a);\n #endif\n#else\n #ifdef BRDF\n return brdf(baseColor, realTexCoord.xy, oriTexCoord, v_positionEC, vPositionMC.xyz, vNormalEC, uModelMatrix);\n #else\n return blinnPhong(baseColor, realTexCoord.xy, oriTexCoord, v_positionEC, vPositionMC.xyz, vNormalEC, uModelMatrix);\n #endif\n#endif\n \n}\n\nvec4 renderColor()\n{\n preClip();\n vec4 realTexCoord = vec4(0.0);\n vec2 oriTexCoord = vec2(0.0);\n vec4 baseColor = vColor;\n vec4 baseTexColor = vec4(1.0);\n vec4 finalColor;\n#ifdef Has_Texture\n baseTexColor = getTextureColorForS3M(realTexCoord);\n#endif\n\n baseColor *= baseTexColor * uDiffuseColor;\n vec2 texCoord = vec2(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n\n finalColor = shaderModel(baseColor, realTexCoord, texCoord); \n\n#ifdef ADJUST_COLOR\n finalColor.rgb = adjustColor(finalColor.rgb);\n#endif\n\n#ifdef REPLACE_COLOR_TYPE\n if(fSelected.y > 0.9)\n {\n finalColor = vColor;\n }\n#endif\n\n#ifdef REPLACE_SELECT_TYPE\n if(fSelected.x > 0.9)\n {\n finalColor = vColor;\n }\n#endif\n\n#ifdef HYPSOMETRIC\n\tif(uHypsometricVisible>0.5)\n\t{\n #ifdef Volume2\n vec4 volColor = texture2D(uVolumeTexture, vec2(vTexCoord.x, 1.0 - vTexCoord.y));\n finalColor = getHypsometricColor(finalColor, volColor);\n #else\n finalColor = getHypsometricColor(finalColor, wValue);\n #endif\n }\n#endif\n\n#ifdef VISIBLEDISTANCEMAX\n getAlphaByDistance(v_positionEC, finalColor);\n#endif\n\n#ifdef OVERLAY\n getOverlayColor(finalColor);\n#endif\n\n#ifdef HORIZONTAL_LINE\n finalColor = getHorizontalColor(finalColor, wValue);\n#endif\n\n#ifdef IMAGERY\n getImageryColor(finalColor);\n#endif\n\n#ifdef FLOOD_ANALYSIS\n getFloodWaterColor(finalColor);\n#endif\n\n#ifdef TRANSPARENT_BACK_COLOR\n transparentColorClip(finalColor);\n#endif\n\n#ifdef SKETCH_MODE\n finalColor = sketchMode(finalColor, uLineColor, uLineWidth);\n#endif // SKETCH_MODE\n\n#ifdef CLIP\n #ifdef CLIP_FILT_BY_ID\n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n #else\n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n #endif\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n if(uSelectColorType == 2.)\n {\n if(fSelectedForSilh > 0.9)\n {\n finalColor = sketchMode(finalColor, uSelColor, 3.0);\n }\n }\n else\n {\n finalColor = sketchMode(finalColor, uSelColor, 3.0);\n }\n#endif // SILHOUETTE_SELECT_TYPE\n\n#ifdef Only_LineColor\n finalColor = uLineColor;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n #ifdef TexCoord\n finalColor.rgb += getEmissiveTextureAtlasColor(wValue, vTexCoord.xy);\n #else\n finalColor.rgb += getEmissiveTextureAtlasColor(wValue);\n #endif\n#else\n finalColor.rgb *= uEmissionColor.rgb;\n#endif\n\n if(finalColor.a == 0.0)\n {\n discard;\n }\n return finalColor;\n}\nvoid main()\n{\n#ifdef Height_Map \n gl_FragColor = renderHeightMap();\n return;\n#endif\n#ifdef NORMAL\n gl_FragColor = renderNormal(vPositionMC.xyz);\n return;\n#endif\n#ifdef NORMAL_AND_DEPTH\n gl_FragColor = renderNormalAndDepth(vPositionMC.xyz);\n return;\n#endif\n\n#ifdef PREPASS\n vec2 texCoord = vec2(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n float roughness = getRoughness(texCoord);\n renderPrePass(roughness);\n#else\n gl_FragColor = renderColor();\n#endif\n#ifdef LOG_DEPTH\n writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}",_0x490ac3=(_0x5a04cc=!0,function(e,t){var i=_0x5a04cc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a04cc=!1,i}),_0x5dae44=_0x490ac3(void 0,(function(){return _0x5dae44.toString().search("(((.+)+)+)+$").toString().constructor(_0x5dae44).search("(((.+)+)+)+$")})),_0x5a04cc;_0x5dae44();var _0x36d142="\n\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\n#ifdef USE_VertexWeight\n attribute aVertexWeight : f32;\n#endif\n\n#include <S3MVertexFactory>\n\nvarying vSecondColor : vec4<f32>;\nvarying vTexCoord : vec4<f32>;\nvarying fSelected : f32;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vIsFiltByID : vec4<f32>;\nvarying v_positionEC : vec3<f32>;\nvarying vNormalEC : vec3<f32>;\n#ifdef COMPUTE_W_VALUE\n varying wValue : f32;\n#endif\n#ifdef W_VISIBLE\n #include <setAlphaByWValue>\n#endif\n#ifdef NORMAL_AND_DEPTH\n varying oriVertex : vec4<f32>;\n varying perVertexNormals : vec3<f32>;\n#endif\n#ifdef SILHOUETTE_SELECT_TYPE\n varying fSelectedForSilh : f32;\n#endif\n#include <calculatePolyTexCoord>\n#include <getUVMatrixDecl>\n#include <computeWValue>\n#include <getVertexByFlatten>\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs {\n var intermediates = GetVertexFactoryIntermediates();\n var vertexPos = intermediates.position;\n var realNormal = intermediates.normal;\n vTexCoord = vec4<f32>(intermediates.uv0.x, intermediates.uv0.y, intermediates.uv1.x, intermediates.uv1.y);\n\n var vertexColor = intermediates.vertexColor;\n\n#ifdef FALTTEN\n vertexPos = getVertexByFlatten(vertexPos, Layer.uTranslationAndBottom.w);\n#endif\n\n var localPos = Mesh.uGeoMatrix * vertexPos;\n var oriLocalPos = localPos;\n var oriVertexW = computeWValue(&localPos);\n\n vertexPos.w = 1.0f;\n\n var oldVertexColor = vertexColor;\n vertexColor = oldVertexColor * Layer.uFillForeColor;\n vIsFiltByID = vec4<f32>(0.0f);\n\n#ifdef BatchTable\n var batchTableID = intermediates.batchTableID;\n vSecondColor = czm_batchTable_pickColor(batchTableID);\n var operationType = czm_batchTable_operation(batchTableID);\n var objsColor = czm_batchTable_color(batchTableID);\n var translate = Layer.uTranslationAndBottom.xyz;\n #ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(batchTableID).x + 0.1f;\n #endif\n #ifdef Translation\n translate = czm_batchTable_translate(batchTableID);\n #endif\n var outIsFiltByID = vIsFiltByID;\n var outSelected = fSelected;\n #ifdef SILHOUETTE_SELECT_TYPE\n var outFSelectedForSilh = fSelectedForSilh;\n fSelectedForSilh = 0.0;\n czm_s3mBatchOperationForSilhouette(operationType, objsColor, &vertexColor, &vertexPos, &outIsFiltByID, translate, &outFSelectedForSilh);\n fSelectedForSilh = outFSelectedForSilh;\n #endif\n #ifndef SILHOUETTE_SELECT_TYPE\n fSelected = 0.0f;\n czm_s3mBatchOperation(operationType, objsColor, Layer.uSelColor, translate, &vertexColor, &vertexPos, &outIsFiltByID, &outSelected);\n vIsFiltByID = outIsFiltByID;\n fSelected = outSelected;\n #endif\n#endif // BatchTable\n#ifdef NORMAL_AND_DEPTH\n oriVertex = vertexPos;\n var position : vec4<f32> = Scene.uView * vertexPos;\n perVertexNormals = vec3<f32>(0.0,0.0,0.0);\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n var modelViewMat4 = Scene.uView * Mesh.uModelMatrix;\n var modelViewMat3 = mat3x3<f32>(modelViewMat4[0][0], modelViewMat4[1][0], modelViewMat4[2][0], modelViewMat4[0][1], modelViewMat4[1][1], modelViewMat4[2][1], modelViewMat4[0][2], modelViewMat4[1][2], modelViewMat4[2][2]);\n perVertexNormals = normalize(modelViewMat3 * realNormal);\n }\n#endif\n#endif\n#ifdef W_VISIBLE\n setAlphaByWValue(oriVertexW, &vertexColor);\n#endif\n\n vColor = vertexColor;\n vPositionMC = vec4<f32>(vertexPos.xyz, 1.0f);\n\n gl_Position = Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n#ifdef COMPUTE_TEXCOORD\n #ifdef TextureBatch\n var xywh = czm_batchTable_xywh_BaseTex(getTextureBatchId0(aTextureBatchId));\n var xywh2 = vec4(0.0);\n #ifdef MULTI_TEX\n xywh2 = czm_batchTable_xywh_BakeTex(getTextureBatchId1(aTextureBatchId));\n #endif\n getUVMatrixForBatch(xywh, xywh2);\n #else\n getUVMatrix(intermediates.uv0, intermediates.uv1);\n #endif\n#endif // COMPUTE_TEXCOORD\n var ec = (Scene.uView * Mesh.uModelMatrix * vertexPos);\n v_positionEC = (ec / ec.w).xyz;\n vNormalEC = vec3(0.0);\n#ifdef HAS_LIGHT\n #ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n vPositionMC.w = 1.0;\n var normalMatrix = czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix);\n #ifdef Instance\n vNormalEC = normalMatrix * intermediates.normalInstance;\n #else\n vNormalEC = normalMatrix * realNormal;\n #endif\n }\n #endif\n#endif\n\n#ifdef USE_BatchPBR\n czm_getPBRParamFromTexture(intermediates.pbrTextureUV);\n#endif\n\n czm_s3mComputeVaryings(vertexPos);\n \n czm_vertexLogDepth();\n}",_0x5a01fc=(_0x924c40=!0,function(e,t){var i=_0x924c40?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x924c40=!1,i}),_0x29e37c=_0x5a01fc(void 0,(function(){return _0x29e37c.toString().search("(((.+)+)+)+$").toString().constructor(_0x29e37c).search("(((.+)+)+)+$")})),_0x924c40;_0x29e37c();var _0x355815="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <LightUBODecl>\n\nvarying vSecondColor : vec4<f32>;\nvarying vTexCoord : vec4<f32>;\nvarying fSelected : f32;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vIsFiltByID : vec4<f32>;\nvarying v_positionEC : vec3<f32>;\nvarying vNormalEC : vec3<f32>;\nvarying vOffset : vec2<f32>;\n#include <preClipFS>\n#include <getNormalMatrix>\n#include <getNormalEC>\n\n#ifdef HAS_LIGHT\n #include <shaderModelBase>\n #ifdef BRDF\n #include <brdf>\n #else\n #include <blinnPhong>\n #endif\n#endif\n\nfn shaderModel(baseColor : vec4<f32>, realTexCoord : vec4<f32>) -> vec4<f32>\n{\n#ifndef HAS_LIGHT\n return baseColor;\n#else\n #ifdef BRDF\n return brdf(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #else\n return blinnPhong(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #endif\n#endif\n}\n\n#include <getTextureColorDecl>\n\nfn renderColor() -> vec4<f32> {\n \n var realTexCoord = vec4<f32>(0.0);\n var baseColor = vColor;\n var baseTexColor = vec4<f32>(1.0);\n var finalColor = vec4<f32>(1.0);\n#ifdef COMPUTE_TEXCOORD\n var firstColor = vec4<f32>(1.0);\n var secColor = vec4<f32>(1.0);\n baseTexColor = getTextureColorForS3M(&(realTexCoord), &(firstColor), &(secColor));\n#endif\n baseColor *= baseTexColor;\n baseColor *= Material.uDiffuseColor;\n finalColor = shaderModel(baseColor, realTexCoord);\n\n preClip();\n\n#ifdef CLIP\n #ifdef CLIP_FILT_BY_ID\n finalColor *= czm_clip(Scene.uView * Mesh.uModelMatrix * vec4<f32>(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n #else\n finalColor *= czm_clip(Scene.uView * Mesh.uModelMatrix * vec4<f32>(vPositionMC.xyz, 1.0), 1.0);\n #endif // CLIP_FILT_BY_ID\n#endif // CLIP\n\n if(vColor.a == 0.0)\n {\n discard;\n }\n\n var disFromCenter = length(vOffset);\n if(disFromCenter > 0.5){\n discard;\n }\n return finalColor;\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n#ifdef PREPASS\n var texCoord = vec2<f32>(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n var reflectivity = 0.0;\n // 相机坐标系坐标\n gl_FragData0 = vec4<f32>(v_positionEC, 1.0);\n // 相机坐标系法线\n gl_FragData1 = vec4<f32>(0.0, 0.0, 1.0, 1.0);\n // 反射率\n gl_FragData2 = vec4<f32>(reflectivity, reflectivity, reflectivity, 1.0);\n#else\n gl_FragColor = renderColor();\n#endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}",_0x545649=(_0x53194e=!0,function(e,t){var i=_0x53194e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53194e=!1,i}),_0x53f630=_0x545649(void 0,(function(){return _0x53f630.toString().search("(((.+)+)+)+$").toString().constructor(_0x53f630).search("(((.+)+)+)+$")})),_0x53194e;_0x53f630();var _0x108a30="\n\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\n#ifdef USE_VertexWeight\n attribute aVertexWeight : f32;\n#endif\n\n#include <S3MVertexFactory>\n\nattribute offset:vec2<f32>;\nvarying vSecondColor : vec4<f32>;\nvarying vTexCoord : vec4<f32>;\nvarying fSelected : f32;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vIsFiltByID : vec4<f32>;\nvarying v_positionEC : vec3<f32>;\nvarying vNormalEC : vec3<f32>;\nvarying vOffset : vec2<f32>;\n\n#include <getUVMatrixDecl>\n#include <getMetersPerPixel>\n\n//计算偏移\nfn addScreenSpaceOffset(positionWC : vec4<f32>, offset : vec2<f32>) -> vec4<f32>\n{\n var result = positionWC;\n var width=vec2<f32>(Layer.uPointSize);\n var halfsize:vec2<f32>=width*0.5;\n halfsize*=offset*2.0;\n halfsize*=getMetersPerPixel(positionWC,Scene.uPixelRatio);\n result.x=positionWC.x+halfsize.x;\n result.y=positionWC.y+halfsize.y;\n return result;\n}\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs {\n var intermediates = GetVertexFactoryIntermediates();\n var vertexPos = intermediates.position;\n var realNormal = intermediates.normal;\n vTexCoord = vec4<f32>(intermediates.uv0.x, intermediates.uv0.y, intermediates.uv1.x, intermediates.uv1.y);\n vOffset = offset;\n \n var vertexColor = intermediates.vertexColor;\n vertexPos.w = 1.0f;\n\n var oldVertexColor = vertexColor;\n vertexColor = oldVertexColor * Layer.uFillForeColor;\n vIsFiltByID = vec4<f32>(0.0f);\n\n#ifdef BatchTable\n var batchTableID = intermediates.batchTableID;\n vSecondColor = czm_batchTable_pickColor(batchTableID);\n var operationType = czm_batchTable_operation(batchTableID);\n var objsColor = czm_batchTable_color(batchTableID);\n var translate = Layer.uTranslationAndBottom.xyz;\n #ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(batchTableID).x + 0.1f;\n #endif\n #ifdef Translation\n translate = czm_batchTable_translate(batchTableID);\n #endif\n fSelected = 0.0f;\n var outIsFiltByID = vIsFiltByID;\n var outSelected = fSelected;\n czm_s3mBatchOperation(operationType, objsColor, Layer.uSelColor, translate, &vertexColor, &vertexPos, &outIsFiltByID, &outSelected);\n vIsFiltByID = outIsFiltByID;\n fSelected = outSelected;\n#endif // BatchTable\n\n //vColor = vertexColor;\n vColor = vertexColor;\n fSelected = 0.0f;\n //point\n var positionEC= Scene.uView * Mesh.uModelMatrix *vertexPos;\n positionEC=addScreenSpaceOffset(positionEC,offset);\n vPositionMC = vec4<f32>(positionEC.xyz, 1.0f);//positionMC不能一致,否者计算法向量返回为0,导致颜色为黑色\n var originPos=Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n gl_Position=Scene.uProjection * positionEC;\n#ifdef COMPUTE_TEXCOORD\n getUVMatrix(intermediates.uv0, intermediates.uv1);\n#endif // COMPUTE_TEXCOORD\n var ec = (Scene.uView * Mesh.uModelMatrix * vertexPos);\n v_positionEC = (ec / ec.w).xyz;\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n vNormalEC = czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * realNormal;\n }\n#endif\n\n#ifdef USE_BatchPBR\n czm_getPBRParamFromTexture(intermediates.pbrTextureUV);\n#endif\n\n czm_s3mComputeVaryings(vertexPos);\n \n czm_vertexLogDepth();\n}",_0x2e904c=(_0x51609b=!0,function(e,t){var i=_0x51609b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51609b=!1,i}),_0x1f7540=_0x2e904c(void 0,(function(){return _0x1f7540.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f7540).search("(((.+)+)+)+$")})),_0x51609b;_0x1f7540();var _0x4c43d7="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <LightUBODecl>\n#ifdef Volume\n#include <S3MVolumeUboDecl>\n#endif\n\nvarying vSecondColor : vec4<f32>;\nvarying vTexCoord : vec4<f32>;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vIsFiltByID : vec4<f32>;\nvarying v_positionEC : vec3<f32>;\nvarying vNormalEC : vec3<f32>;\n#ifdef COMPUTE_W_VALUE\n varying wValue : f32;\n#endif\n\n#if defined(REPLACE_SELECT_TYPE) || defined(REPLACE_COLOR_TYPE)\n varying fSelected : f32;\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n varying fSelectedForSilh : f32;\n #include <sketchMode>\n#endif\n\n#include <S3MOperationFSDecl>\n#include <HypSometric>\n#include <preClipFS>\n#include <clip>\n#include <renderNormal>\n#include <renderNormalAndDepth>\n\n#ifdef SHADOW_MAP\n #include <ShadowUboDecl>\n #include <shadowReceive>\n#endif\n\n#ifdef HAS_LIGHT\n #include <shaderModelBase>\n #ifdef BRDF\n #include <brdf>\n #else\n #include <blinnPhong>\n #endif\n#else\nfn sRGBToLinear(srgbIn : vec4<f32>) -> vec4<f32> {\n var linearOut = pow(vec3<f32>(srgbIn.x, srgbIn.y, srgbIn.z), vec3<f32>(2.200000048f, 2.200000048f, 2.200000048f));\n return vec4<f32>(linearOut.x, linearOut.y, linearOut.z, srgbIn.w);\n}\n\nfn LINEARtoSRGB(linearIn : vec3<f32>) -> vec3<f32>\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\n\n#endif\n\nfn shaderModel(baseColor : vec4<f32>, realTexCoord : vec4<f32>) -> vec4<f32>\n{\n#ifndef HAS_LIGHT\n #ifdef SHADOW_MAP\n var shadow = getShadowVisibility(vec4<f32>(v_positionEC, 1.0), getNormalEC(vNormalEC, Mesh.uModelMatrix, vPositionMC.xyz), -v_positionEC.z);\n return vec4(LINEARtoSRGB(baseColor.rgb * shadow), baseColor.a);\n #else\n return vec4(LINEARtoSRGB(baseColor.rgb), baseColor.a);\n #endif\n#else\n #ifdef BRDF\n return brdf(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #else\n return blinnPhong(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #endif\n#endif\n}\n\n#include <calcTexCoordDecl>\n#include <getTextureColorDecl>\n#include <getNormalMatrix>\n#include <getNormalEC>\n#include <getEmissiveTextureAtlasColor>\n#include <adjustColor>\n\nfn renderColor() -> vec4<f32> {\n \n var realTexCoord = vec4<f32>(0.0);\n var baseColor = vColor;\n var baseTexColor = vec4<f32>(1.0);\n var finalColor = vec4<f32>(1.0);\n#ifdef Has_Texture\n var firstColor = vec4<f32>(1.0);\n var secColor = vec4<f32>(1.0);\n baseTexColor = getTextureColorForS3M(&(realTexCoord), &(firstColor), &(secColor));\n #if !defined(INVALID_OBLIQUE) && !defined(NO_TEXCOORD)\n #ifndef TextureBatch\n if(vTexMatrix.z < 0.0){\n baseTexColor = vec4<f32>(1.0);\n }\n #endif\n #endif\n#endif\n baseColor *= baseTexColor;\n baseColor *= Material.uDiffuseColor;\n finalColor = shaderModel(baseColor, realTexCoord);\n\n preClip();\n#ifdef ADJUST_COLOR\n finalColor.r = adjustColor(finalColor.rgb).r;\n finalColor.g = adjustColor(finalColor.rgb).g;\n finalColor.b = adjustColor(finalColor.rgb).b;\n#endif\n\n\n#ifdef CLIP\n #ifdef CLIP_FILT_BY_ID\n var clipResult = clip(Scene.uView * Mesh.uModelMatrix * vec4<f32>(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n #else\n var clipResult = clip(Scene.uView * Mesh.uModelMatrix * vec4<f32>(vPositionMC.xyz, 1.0), 1.0);\n #endif // CLIP_FILT_BY_ID\n if(clipResult < -0.5){\n discard;\n }\n#endif // CLIP\n\n#ifdef SILHOUETTE_SELECT_TYPE\n var sketchModeColor = sketchMode(finalColor, Layer.uSelColor, 3.0);\n if(Layer.uSelectColorType == 2.0)\n {\n if(fSelectedForSilh > 0.9)\n {\n finalColor = sketchModeColor;\n }\n }\n else\n {\n finalColor = sketchModeColor;\n }\n#endif // SILHOUETTE_SELECT_TYPE\n\n#ifdef EMISSION_TEXTURE_ATLAS\n finalColor.r += getEmissiveTextureAtlasColor(wValue).r;\n finalColor.g += getEmissiveTextureAtlasColor(wValue).g;\n finalColor.b += getEmissiveTextureAtlasColor(wValue).b;\n#else\n finalColor.r *= Layer.uEmissionColor.r;\n finalColor.g *= Layer.uEmissionColor.g;\n finalColor.b *= Layer.uEmissionColor.b;\n#endif\n\n#ifdef HYPSOMETRIC\n\tif(Layer.uHypsometricVisible > 0.5)\n\t{\n #ifdef Volume2\n var volColor = textureSample(uVolumeTexture, uVolumeTextureSampler, vec2(vTexCoord.x, 1.0 - vTexCoord.y));\n finalColor = getHypsometricColor(finalColor, volColor);\n #else\n finalColor = getHypsometricColor(finalColor, wValue);\n #endif\n }\n#endif\n\n#ifdef OVERLAY\n getOverlayColor(&finalColor);\n#endif\n\n#ifdef IMAGERY\n getImageryColor(&finalColor);\n#endif\n\n if(finalColor.a == 0.0)\n {\n discard;\n }\n\n return finalColor;\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n\n#ifdef PREPASS\n var texCoord = vec2<f32>(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n var roughness = getRoughness(texCoord);\n var reflectivity = 1.0 - roughness;\n var normalEC = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(vPositionMC.xyz));\n // 相机坐标系坐标\n gl_FragData0 = vec4<f32>(v_positionEC, 1.0);\n // 相机坐标系法线\n gl_FragData1 = vec4<f32>(normalEC, 1.0);\n // 反射率\n gl_FragData2 = vec4<f32>(reflectivity, reflectivity, reflectivity, 1.0);\n#else\n gl_FragColor = renderColor();\n#endif\n#ifdef NORMAL\n gl_FragColor = renderNormal(vPositionMC.xyz);\n#endif\n#ifdef NORMAL_AND_DEPTH\n gl_FragColor = renderNormalAndDepth(vPositionMC.xyz);\n#endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}",_0x373b97=(_0x38c9e6=!0,function(e,t){var i=_0x38c9e6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38c9e6=!1,i}),_0x5bc7ea=_0x373b97(void 0,(function(){return _0x5bc7ea.toString().search("(((.+)+)+)+$").toString().constructor(_0x5bc7ea).search("(((.+)+)+)+$")})),_0x38c9e6;_0x5bc7ea();var _0x903893="\n#include <SceneUboDecl> \n#include <LayerUboDecl> \n#include <MeshUboDecl>\nattribute vec4 aPosition; \n#ifdef TexCoord \n varying vec4 vTexCoord; \n#endif \n\n#ifdef VertexColor\n\t#ifdef WEBGPU\n\t attribute uvec4 aColor;\n\t#else\n\t attribute vec4 aColor;\n\t#endif\n#endif\n\n#ifdef BatchTable \nattribute float batchId; \n#endif \nvarying vec4 vSecondColor; \n#ifdef REPLACE_SELECT_TYPE \nvarying float fSelected; \n#endif \n#ifdef COMPRESS_VERTEX \n uniform vec4 decode_position_min; \n uniform float decode_position_normConstant; \n#endif \nvarying vec4 vColor; \nvoid main() \n{ \n#ifdef COMPRESS_VERTEX \n vec4 vertexPos = vec4(1.0); \n vertexPos = decode_position_min + aPosition * decode_position_normConstant; \n#else \n vec4 vertexPos = aPosition; \n#endif \n#ifdef TexCoord \n vTexCoord.xy = vertexPos.xy * textureRepeat; \n#endif \n vertexPos.w = 1.0; \n vec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n vertexColor = aColor; \n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif\n#endif \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n vec4 operationType = czm_batchTable_operation(batchId); \n vec4 objsColor = czm_batchTable_color(batchId); \n#ifdef REPLACE_SELECT_TYPE \n fSelected = 0.0; \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor, fSelected); \n#else \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor); \n#endif \n#endif \n vColor = vertexColor*uFillForeColor; \n gl_Position = uViewProjection * uModelMatrix * vertexPos;\n}",_0x59d822=(_0x5edddc=!0,function(e,t){var i=_0x5edddc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5edddc=!1,i}),_0x4f4bce=_0x59d822(void 0,(function(){return _0x4f4bce.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f4bce).search("(((.+)+)+)+$")})),_0x5edddc;_0x4f4bce();var _0xb37562="\n#include <LayerUboDecl>\n#ifdef TexCoord \n uniform sampler2D uTexture; \n varying vec4 vTexCoord; \n#endif \n varying vec4 vColor; \n varying vec4 vSecondColor; \n#ifdef REPLACE_SELECT_TYPE \n varying float fSelected; \n#endif \nvoid main() \n{ \n\tif(vColor.a == 0.0) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef TexCoord \n vec4 texColor = texture2D(uTexture, vTexCoord.xy); \n gl_FragColor = texColor * vColor; \n#else \n gl_FragColor = vColor;\n#endif \n#ifdef REPLACE_SELECT_TYPE \n if(fSelected > 0.9) \n { \n gl_FragColor = vColor; \n } \n#endif \n\tif(gl_FragColor.a == 0.0) \n\t{ \n\t\tdiscard; \n\t}\n}",_0x2870bd=(_0x41186e=!0,function(e,t){var i=_0x41186e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41186e=!1,i}),_0x272702=_0x2870bd(void 0,(function(){return _0x272702.toString().search("(((.+)+)+)+$").toString().constructor(_0x272702).search("(((.+)+)+)+$")})),_0x41186e;_0x272702();var _0x43476e="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\nattribute vec3 aPosition;\n#ifdef HAS_NORMAL \nattribute vec3 aNormal;\n#endif \nattribute vec4 aTexCoord0;\n\n#ifdef TexCoord2\nattribute vec4 aTexCoord1;\n#endif \n \n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n#ifdef BatchTable \nattribute float batchId; \n#endif \n \nvarying vec4 vColor; \nvarying vec4 vSecondColor; \nvarying vec4 vTexCoord; \nvarying vec4 clip_vertex; \n \nfloat computerOnePixelLength() \n{ \n\tvec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0); \n\tviewPos.xyz *= 0.9; \n\tvec4 winPos = uProjection * viewPos; \n\tfloat dwidth = czm_metersPerPixel(viewPos); \n\t#ifdef EYE_DISTANCE_SCALING \n\t dwidth = 1.0; \n\t#endif \n\twinPos.x = winPos.x - 2.0 * dwidth; \n\tvec4 newViewPos = uInverseProjection * winPos; \n\treturn length(viewPos - newViewPos); \n} \n \nvec4 computePos(vec3 v3Normal) \n{ \n vec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0); \n\tviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength(); \n\tviewPos.xyz = viewPos.xyz * 0.9; \n\tclip_vertex = viewPos; \n\tvec4 pos = czm_projection * viewPos; \n\treturn pos; \n} \n \nvoid main() \n{ \n vTexCoord.xy = aTexCoord0.xy; \n vec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif \n#endif \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n vec4 operationType = czm_batchTable_operation(batchId); \n vec4 objsColor = czm_batchTable_color(batchId); \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor); \n#endif \n vColor = vertexColor * uDiffuseColor; \n#ifdef ICON\n#ifdef TexCoord2\n gl_Position = computePos(aTexCoord1.xyz); \n#endif\n#else \n\n#ifdef TexCoord2 \n vTexCoord.zw = aTexCoord1.xy;\n#endif \n \n #ifdef HAS_NORMAL \n \tgl_Position = computePos(aNormal);\n #else\n gl_Position = computePos(aTexCoord1.xyz);\n #endif\n#endif \n}",_0xf89e07=(_0x5c7849=!0,function(e,t){var i=_0x5c7849?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c7849=!1,i}),_0x7b884=_0xf89e07(void 0,(function(){return _0x7b884.toString().search("(((.+)+)+)+$").toString().constructor(_0x7b884).search("(((.+)+)+)+$")})),_0x5c7849;_0x7b884();var _0x258e9c="attribute vec3 aPosition;\n\n#ifndef ICON\nattribute vec3 aNormal;\n#endif\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\nattribute vec4 uv0;\n\n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\nuniform vec4 uSelColor;\nuniform vec4 uDiffuseColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nmat3 RotateZ(in float angle)\n{\n float sina = sin(angle);\n float cosa = cos(angle);\n mat3 rotMatrix = mat3(cosa, sina, 0, -sina, cosa, 0, 0, 0, 1);\n return rotMatrix;\n}\n\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n vec4 origViewPos = czm_view * vec4(0.0, 0.0, 0.0, 1.0);\n vec4 cameraViewPos = vec4(0.0, 0.0, 0.0, 1.0);\n vec4 fixedAxis = vec4(1.0);\n vec3 xAxis = vec3(1.0);\n vec3 yAxis = vec3(1.0);\n vec3 zAxis = vec3(1.0);\n vec4 cameraViewVector = vec4(1.0);\n if (czm_sceneMode != czm_sceneMode3D)\n {\n fixedAxis = czm_view * vec4(1.0, 0.0, 0.0, 1.0);\n fixedAxis = fixedAxis - origViewPos;\n zAxis = normalize(fixedAxis.xyz);\n cameraViewVector = viewPos - cameraViewPos;\n yAxis = normalize(cameraViewVector.xyz);\n xAxis = normalize(cross(yAxis, zAxis));\n yAxis = cross(zAxis, xAxis);\n }\n else\n {\n fixedAxis = viewPos - origViewPos;\n yAxis = normalize(fixedAxis.xyz);\n cameraViewVector = cameraViewPos - viewPos;\n zAxis = normalize(cameraViewVector.xyz);\n xAxis = normalize(cross(yAxis, zAxis));\n zAxis = cross(xAxis, yAxis);\n }\n mat3 matrix = mat3(xAxis, yAxis, zAxis) * RotateZ(aTexCoord0.z);\n vec3 offset = czm_sceneMode != czm_sceneMode3D ? v3Normal.xzy : v3Normal;\n offset = matrix * offset;\n\tviewPos.xyz = viewPos.xyz + offset;\n\tclip_vertex = viewPos;\n\tvec4 pos = czm_projection * viewPos;\n\treturn pos;\n}\n\nvoid main()\n{\n vTexCoord.xy = aTexCoord0.xy;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor * uDiffuseColor;\n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz);\n#else\n vTexCoord.zw = aTexCoord1.xy;\n gl_Position = computePos(aNormal);\n#endif\n}",_0xc29113=(_0x1ff7f1=!0,function(e,t){var i=_0x1ff7f1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ff7f1=!1,i}),_0x262dbe=_0xc29113(void 0,(function(){return _0x262dbe.toString().search("(((.+)+)+)+$").toString().constructor(_0x262dbe).search("(((.+)+)+)+$")})),_0x1ff7f1;_0x262dbe();var _0xe606d6="\nattribute vec3 aPosition;\n#ifndef ICON\nattribute vec3 aNormal;\n#endif\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0);\n\tvec4 winPos = uProjection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = uInverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\n\nmat3 rotateZ(in float angle)\n{\n float sina = sin(angle);\n float cosa = cos(angle);\n mat3 rotMatrix = mat3(cosa, sina, 0.0, -sina, cosa, 0.0, 0.0, 0.0, 1.0);\n return rotMatrix;\n}\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0);\n vec4 origViewPos = uView * vec4(0.0, 0.0, 0.0, 1.0);\n vec4 fixedAxis = viewPos - origViewPos;\n vec3 zAxis = normalize(fixedAxis.xyz);\n vec4 upView = vec4(0.0, 1.0, 0.0, 1.0);\n upView = uView * upView;\n vec3 upViewVector = normalize(upView.xyz - origViewPos.xyz);\n vec3 xAxis = normalize(cross(upViewVector, zAxis));\n vec3 yAxis = cross(zAxis, xAxis);\n yAxis = normalize(yAxis);\n mat3 matrix = mat3(xAxis,yAxis,zAxis);\n vec3 offset = matrix * rotateZ(-czm_piOverFour * 3.0 + aTexCoord0.z) * v3Normal;\n\tviewPos.xyz = viewPos.xyz + offset * computerOnePixelLength();\n\tclip_vertex = viewPos;\n\tvec4 pos = uProjection * viewPos;\n\treturn pos;\n}\n\nvoid main()\n{\n vTexCoord.xy = aTexCoord0.xy;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor * uDiffuseColor;\n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz);\n#else\n vTexCoord.zw = aTexCoord1.xy;\n gl_Position = computePos(aNormal);\n#endif\n}\n",_0x2d8163=(_0x12f53f=!0,function(e,t){var i=_0x12f53f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12f53f=!1,i}),_0x4e0062=_0x2d8163(void 0,(function(){return _0x4e0062.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e0062).search("(((.+)+)+)+$")})),_0x12f53f;_0x4e0062();var _0xf44c9d="\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\nuniform sampler2D uTexture; \nuniform sampler2D uSecTexture; \n \nvarying vec4 vColor; \nvarying vec4 vTexCoord; \nvarying vec4 clip_vertex; \nvarying vec4 vSecondColor; \n#include <preClipFS>\n#include <clip>\n\nvoid main() \n{ \n preClip(); \n\tvec4 texColor = vec4(vColor.rgb, min(texture2D(uTexture, vTexCoord.xy).a, vColor.a)); \n\tvec4 haloTexColor = vec4(uAmbientColor.rgb, min(texture2D(uSecTexture, vTexCoord.zw).a, uAmbientColor.a)); \n\tif(texColor.a + haloTexColor.a < 0.2) \n\t{ \n\t\tdiscard; \n\t} \n\tvec3 v3Color = mix(haloTexColor.rgb, texColor.rgb, texColor.a + 0.2); \n\tgl_FragColor = vec4(v3Color.rgb, min(1.0, texColor.a + haloTexColor.a)); \n\tif(gl_FragColor.a < 0.1) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef CLIP \n\tgl_FragColor *= clip(clip_vertex, 1.0); \n#endif \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n}",_0x19725b=(_0xc88548=!0,function(e,t){var i=_0xc88548?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc88548=!1,i}),_0x167f87=_0x19725b(void 0,(function(){return _0x167f87.toString().search("(((.+)+)+)+$").toString().constructor(_0x167f87).search("(((.+)+)+)+$")})),_0xc88548;_0x167f87();var _0x357523="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nuniform sampler2D uTexture; \nvarying vec4 vColor; \nvarying vec4 vTexCoord; \nvarying vec4 clip_vertex; \nvarying vec4 vSecondColor; \n#include <preClipFS>\n#include <clip>\n \nvoid main() \n{ \n\tpreClip();\n\tvec4 texColor = texture2D(uTexture, vTexCoord.xy); \n#ifdef RGBTOBGR \n texColor = vec4(texColor.b, texColor.g, texColor.r, texColor.a); \n#endif \n\tgl_FragColor = vColor * texColor; \n\tif(gl_FragColor.a < 0.1) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef CLIP\n gl_FragColor *= clip(uView * uModelMatrix * vec4(clip_vertex.xyz, 1.0), 1.0); \n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n}",_0x387d18=(_0x5c62f0=!0,function(e,t){var i=_0x5c62f0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c62f0=!1,i}),_0x278767=_0x387d18(void 0,(function(){return _0x278767.toString().search("(((.+)+)+)+$").toString().constructor(_0x278767).search("(((.+)+)+)+$")})),_0x5c62f0;_0x278767();var _0x4faa00="attribute vec4 aPosition;\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\n\nattribute vec4 aTexCoord2;\n\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nuniform float uLineWidth;\nuniform float uIsPicking;\nuniform vec4 uPickPosition;\nuniform mat4 uMatrixInvert;\nuniform vec4 uDiffuseColor;\nuniform vec4 uSelColor;\n#ifdef SELECTED\nvarying float fSelected;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nconst float SCREEN_VALUE = 1.0 / (2.0 * 1236.077);\n\nfloat ComputerLineWidth()\n{\n\tvec4 worldPos = czm_model * aPosition;\n\treturn uLineWidth * length(czm_viewerPositionWC - worldPos.xyz) * SCREEN_VALUE;\n}\n\nvoid main()\n{\n float shadowVolumeWidth = ComputerLineWidth();\n vec4 vertexPos = aPosition;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n if(uIsPicking > 0.0)\n {\n\t\tshadowVolumeWidth = shadowVolumeWidth * 3.0;\n\t\tvertexPos.xyz = vertexPos.xyz + aTexCoord2.xyz * shadowVolumeWidth + normalize(aTexCoord1.xyz) * uPickPosition.z;\n }\n else\n {\n\t\tvertexPos.xyz = vertexPos.xyz + aTexCoord2.xyz * shadowVolumeWidth + aTexCoord1.xyz;\n }\n vec4 v_Position = czm_modelViewProjection * vertexPos;\n vColor = vertexColor * uDiffuseColor;\n#ifdef SELECTED\n vColor = uSelColor;\n fSelected = aTexCoord0.x;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}",_0x21f257=(_0x12c76d=!0,function(e,t){var i=_0x12c76d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12c76d=!1,i}),_0x18801c=_0x21f257(void 0,(function(){return _0x18801c.toString().search("(((.+)+)+)+$").toString().constructor(_0x18801c).search("(((.+)+)+)+$")})),_0x12c76d;_0x18801c();var _0x5099e1="\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n\n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n\n#ifdef BatchTable\nattribute float batchId;\n#endif\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\nvarying vec2 v_inversePlaneExtents;\nvarying float fSelected;\n\nvoid ComputeBounds()\n{\n vec3 southWestCorner = (czm_modelView * vec4(uSouthWest, 1.0)).xyz;\n vec3 northWestCorner = czm_normal * uNorthDir + southWestCorner;\n vec3 southEastCorner = czm_normal * uEastDir + southWestCorner;\n vec3 eastWard = southEastCorner - southWestCorner;\n float eastExtent = length(eastWard);\n eastWard /= eastExtent;\n vec3 northWard = northWestCorner - southWestCorner;\n float northExtent = length(northWard);\n northWard /= northExtent;\n v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\n v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\n v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n}\nvoid main()\n{\n#ifdef HAS_TEXTURE\n ComputeBounds();\n#endif\n vec4 realPosition = aPosition;\n#ifdef COMPRESS_VERTEX\n realPosition = decode_position_min + aPosition * decode_position_normConstant;\n#endif\n vec3 vertexPos = realPosition.xyz;\n vec3 zDir = aTexCoord1.xyz;\n bool hasBaseHeight = false;\n if(length(realPosition) > 0.1){\n hasBaseHeight = true;\n }\n float topOrBottom = dot(zDir, vec3(0.0, 0.0, 1.0)) > 0.0 ? 1.0 : -1.0;\n vec3 upDir = zDir * topOrBottom;\n float fExtendHeight = 0.0;\n float minTerrainHeight = uMinMaxTerrainHeightAndPickInfo.x;\n float maxTerrainHeight = uMinMaxTerrainHeightAndPickInfo.y;\n float isPicking = uMinMaxTerrainHeightAndPickInfo.z;\n float pickPositionHeight = uMinMaxTerrainHeightAndPickInfo.w;\n if(isPicking > 0.0){\n // 顶点保存了高度,在拾取时在原始的顶点高度附近进行上下拉伸\n if(hasBaseHeight){\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, -50.0, 100.0);\n }\n else{\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, pickPositionHeight - 2.0, pickPositionHeight + 10.0);\n }\n }\n else{\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, minTerrainHeight, maxTerrainHeight);\n }\n vertexPos.xyz = realPosition.xyz + upDir * fExtendHeight;\n vec4 v_Position = uViewProjection * uModelMatrix * vec4(vertexPos, 1.0);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor \n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif \n#endif \nfSelected = 0.0;\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, vec4(1.0), vertexColor, fSelected);\n#endif\n#ifdef SELECTED\n vColor = uSelColor;\n#else\n vColor = vertexColor * uDiffuseColor * uFillForeColor;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}\n",_0x4903f3=(_0x437d42=!0,function(e,t){var i=_0x437d42?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x437d42=!1,i}),_0x363003=_0x4903f3(void 0,(function(){return _0x363003.toString().search("(((.+)+)+)+$").toString().constructor(_0x363003).search("(((.+)+)+)+$")})),_0x437d42;_0x363003();var _0xb2d90="attribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nuniform float uIsPicking;\nuniform mat4 uMatrixInvert;\nuniform vec4 uPickPosition;\nuniform vec4 uDiffuseColor;\nuniform vec4 uSelColor;\n#ifdef SELECTED\nvarying float fSelected;\n#endif\n\nvoid main()\n{\n vec3 vertexPos = aPosition;\n vertexPos.xyz = vertexPos.xyz + aTexCoord1.xyz;\n vec4 v_Position = czm_modelViewProjection * vec4(vertexPos, 1.0);\n if(uIsPicking > 0.0)\n {\n#ifdef EXTEND_OBJECT\n\t\tvec4 modelBottomPos = uMatrixInvert * czm_model * vec4(aPosition, 1.0);\n\t\tvec4 modelTopPos = uMatrixInvert * czm_model * vec4(vertexPos, 1.0);\n\t\tif(uPickPosition.z < modelBottomPos.z || uPickPosition.z > modelTopPos.z)\n\t\t{\n\t\t\tvColor.a = 0.0;\n\t\t}\n#else\n\t\tvertexPos.xyz = aPosition.xyz + normalize(aTexCoord1.xyz) * (uPickPosition.z + 10.0);\n\t\tvec4 v_Position = czm_modelViewProjection * vec4(vertexPos, 1.0);\n#endif\n }\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n#ifdef SELECTED\n vColor = uSelColor;\n fSelected = aTexCoord0.x;\n#else\n vColor = vertexColor * uDiffuseColor;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}",_0x27f2b4=(_0xbf9d44=!0,function(e,t){var i=_0xbf9d44?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xbf9d44=!1,i}),_0x5276aa=_0x27f2b4(void 0,(function(){return _0x5276aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x5276aa).search("(((.+)+)+)+$")})),_0xbf9d44;_0x5276aa();var _0x4a0943="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec4 vColor;\nvarying float vWindowZ;\nvarying float fSelected;\nvarying vec4 vSecondColor;\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#ifdef HAS_TEXTURE\nuniform sampler2D uTexture;\nuniform vec2 uLevelScale;\nuniform vec2 uRepeatTimes;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\nvarying vec2 v_inversePlaneExtents;\n#endif\n\n#ifdef HAS_TEXTURE\nvec4 getTextureColor()\n{\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n vec2 uv;\n uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\n uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n vec2 st;\n st.x = czm_lineDistance(vec2(0.0), vec2(0.0, 1.0), uv);\n st.y = czm_lineDistance(vec2(0.0), vec2(1.0, 0.0), uv);\n st.xy *= uLevelScale * uRepeatTimes;\n vec4 texColor = texture2D(uTexture, st);\n if(texColor.a < 0.01) {\n texColor.a = 1.0;\n }\n return texColor;\n}\n#endif\n#include <preClipFS>\nvoid main()\n{\npreClip();\n#ifdef SELECTED\n if(fSelected < 0.5)\n {\n discard;\n }\n#endif\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec4 texColor = vec4(1.0);\n#ifdef HAS_TEXTURE\n texColor = getTextureColor();\n#endif\n gl_FragColor = vColor * texColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}\n",_0x5854b2="#include <SceneUboDecl> \n#include <MeshUboDecl> \nattribute vec4 aPosition; \nattribute vec3 aNormal; \nattribute vec4 aTexCoord0; \n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable \nattribute float batchId;\nuniform sampler2D batchTexture; \nvec2 computeSt(float batchId)\n{\n float stepX = batchTextureStep.x;\n float centerX = batchTextureStep.y;\n float numberOfAttributes = float(5);\n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);\n}\nvec4 czm_batchTable_pickColor(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(2);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n value /= 255.0;\n return value;\n}\nvec4 czm_batchTable_operation(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(1);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n return value;\n}\n#endif \n \nvarying vec4 vMirrorCoord; \nvarying vec4 vSecondColor; \nvarying vec4 vPostionEC; \nvarying vec4 vPositionMC; \nvarying vec4 vColor;\nvarying vec2 fSelected;\n#ifdef EXCAVATION \n varying vec4 vExcavationVertexPos; \n#endif \nvoid s3mBatchOperation(vec4 operationType, inout vec4 vertexColor)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n}\n\nvoid main() \n{ \n#ifdef EXCAVATION \n vExcavationVertexPos = uGeoMatrix * vec4(aPosition.xyz, 1.0); \n#endif \n\tvec4 oPos = czm_modelViewProjection * aPosition;\n\t\n\tvPositionMC = uGeoMatrix * aPosition; \n\tmat4 textureMatrix = mat4(0.5, 0.0, 0.0, 0.0, \n\t\t\t0.0, 0.5, 0.0, 0.0, \n\t\t\t0.0, 0.0, 0.5, 0.0, \n\t\t\t0.5, 0.5, 0.5, 1.0); \n\tvMirrorCoord = textureMatrix * oPos;\n\tgl_Position = oPos; \n\tvPostionEC = czm_modelView * aPosition; \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n#endif\nvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n s3mBatchOperation(operationType, vertexColor);\n#endif\n vColor = vertexColor;\n}\n\n\n",_0x120def="#extension GL_EXT_draw_buffers : enable\n#if defined(PREPASS) && defined(WEBGPU)\nlayout(location = 0) out vec4 glFragData[3];\n#endif\n#include <LayerUboDecl>\n#include <WaterLayerUboDecl>\n#include <SceneUboDecl> \n#include <MeshUboDecl> \n#include <clip>\nuniform sampler2D uReflectMap;\nuniform sampler2D uNoiseMap;\nvarying vec4 vMirrorCoord;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\nvarying vec4 vPostionEC;\nvarying vec4 vColor;\n\nvec4 getNoise( vec2 uv ) {\n vec2 uv0 = ( uv / 103.0 ) * uWaveScale + vec2(uTimeVal / 17.0, uTimeVal / 29.0) * uFlowParameter.xy * uFlowParameter.z;\n vec2 uv1 = uv / 107.0 * uReflowWaveScale - vec2( uTimeVal / -19.0, uTimeVal / 31.0 ) * uFlowParameter.xy * uFlowParameter.z * uFlowParameter.w;\n vec2 uv2 = uv / vec2( 8907.0, 9803.0 ) * uWaveScale + vec2( uTimeVal / 101.0, uTimeVal / 97.0 ) * uFlowParameter.xy * uFlowParameter.z;\n vec2 uv3 = uv / vec2( 1091.0, 1027.0 ) * uReflowWaveScale - vec2( uTimeVal / 109.0, uTimeVal / -113.0 ) * uFlowParameter.xy * uFlowParameter.z * uFlowParameter.w;\n vec4 noise = texture2D( uNoiseMap, uv0 ) +\n texture2D( uNoiseMap, uv1 ) +\n texture2D( uNoiseMap, uv2 ) +\n texture2D( uNoiseMap, uv3 );\n return noise * 0.5 - 1.0;\n}\n \nvoid sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) \n{\n vec3 sunDirection = czm_lightDirectionEC; \n vec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) ); \n float direction = max( 0.0, dot( eyeDirection, reflection ) ); \n specularColor += pow( direction, shiny ) * uSunColor.rgb * spec; \n diffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * uSunColor.rgb * diffuse; \n} \n\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\n\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ),\n vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ),\n vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n const float toneMappingExposure = 1.0;\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return clamp( color, 0.0, 1.0);\n}\n\n#include <preClipFS>\nvoid main()\n{\n preClip();\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n vec3 worldToEye = -vPostionEC.xyz; \n float distance = length(worldToEye);\n vec4 noise = getNoise(vPositionMC.xy); \n noise.xy *= uNoiseStrength;\n vec3 surfaceNormalEC = czm_normal * normalize( noise.xyz * vec3( 1.5, 1.5, 1.0 ) );\n vec3 diffuseLight = vec3(0.0); \n vec3 specularLight = vec3(0.0); \n vec3 eyeDirection = normalize( worldToEye.xyz ); \n sunLight( surfaceNormalEC, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );\n vec2 distortion = surfaceNormalEC.xy * ( 0.001 + 1.0 / distance ) * 3.7;\n vec2 mirrorCoord = vMirrorCoord.xy / vMirrorCoord.w;\n vec3 reflectionSample = vec3( textureLod( uReflectMap, mirrorCoord + distortion, uReflectMapLod));\n float theta = max( dot( eyeDirection, surfaceNormalEC ), 0.0 ); \n float rf0 = 0.3; \n vec3 waterColor = uWaterColor.rgb * uWaterBrightness;\n float reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 ); \n vec3 scatter = max( 0.0, dot( surfaceNormalEC, eyeDirection ) ) * waterColor;\n reflectionSample *= uUseRefectMap;\n vec3 albedo = mix((uSunColor.rgb * diffuseLight * 0.3 + scatter), (vec3(0.1) + reflectionSample * 0.9 + reflectionSample * specularLight), reflectance); \n vec4 finalColor = vec4(albedo, 1.0); \n finalColor.a = uWaterColor.a;\n #ifndef HDR\n finalColor.rgb = ACESFilmicToneMapping(finalColor.rgb);\n #endif\n if(finalColor.a < 0.1)\n {\n discard;\n }\n\n#ifdef CLIP\n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n\n#ifdef PREPASS\n vec3 normalEC = normalize(czm_normal * czm_computeNormal(vPositionMC.xyz));\n normalEC += noise.xyz * 0.05;\n gl_FragData[0] = vec4(vPostionEC.xyz, 1.0);\n // 相机坐标系法线\n gl_FragData[1] = vec4(normalEC, 1.0);\n // 反射率\n gl_FragData[2] = vec4(1.0);\n#else\n gl_FragColor = finalColor;\n#endif\n\n}\n",_0x521f0d=(_0x56ebcf=!0,function(e,t){var i=_0x56ebcf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56ebcf=!1,i}),_0x29cf3e=_0x521f0d(void 0,(function(){return _0x29cf3e.toString().search("(((.+)+)+)+$").toString().constructor(_0x29cf3e).search("(((.+)+)+)+$")})),_0x56ebcf;_0x29cf3e();var _0x1dd94="\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vSecondColor;\nvarying vec2 oUV;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nuniform mat4 uTexMatrix;\nvoid main()\n{\n float fExtendHeight = aTexCoord1.x;\n\tvec3 Postion = aPosition.xyz + (aNormal.xyz * fExtendHeight).xyz;\n\tfloat u = aTexCoord0.x;\n\tfloat v = aTexCoord0.y;\n if ( aTexCoord1.y > 0.2 && aTexCoord1.y < 0.8)\n {\n if (uTexMatrix[0].x > 0.0)\n {\n float fRealSize = uTexMatrix[1].y;\n v = fExtendHeight / fRealSize;\n }\n else\n {\n float fRepeatNum = uTexMatrix[1].y;\n v = fRepeatNum;\n }\n }\n oUV = vec2(u, v);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor;\n\tgl_Position = czm_modelViewProjection * vec4(Postion, 1.0);\n\tvPositionMC = vec4(Postion, 0.0);\n}",_0x3f60ab=(_0x2adff3=!0,function(e,t){var i=_0x2adff3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2adff3=!1,i}),_0x2dbc73=_0x3f60ab(void 0,(function(){return _0x2dbc73.toString().search("(((.+)+)+)+$").toString().constructor(_0x2dbc73).search("(((.+)+)+)+$")})),_0x2adff3;_0x2dbc73();var _0x507f80="\n#ifdef HAS_TEXTURE\nuniform sampler2D uTexture;\n#endif\nvarying vec2 oUV;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvoid main()\n{\n\tvec4 mixColor = vec4(1.0);\n#ifdef HAS_TEXTURE\n mixColor = mixColor * texture2D( uTexture, oUV );\n#endif\n gl_FragColor = mixColor * vColor;\n#ifdef HAS_LIGHT\n\tgl_FragColor *= czm_computeLightColorInFP(vPositionMC.xyz, vPositionMC.w, vec3(0.0));\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x3a7302=(_0x47fc9c=!0,function(e,t){var i=_0x47fc9c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47fc9c=!1,i}),_0x1f5c0a=_0x3a7302(void 0,(function(){return _0x1f5c0a.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f5c0a).search("(((.+)+)+)+$")})),_0x47fc9c;_0x1f5c0a();var _0x33ffa2="\n#include <SceneUboDecl>\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aColor;\nvarying vec2 vTexCoord;\nvarying vec4 selectionColor;\nvarying vec3 oriVertex;\nvarying vec3 vPositionToEyeEC;\nvoid main()\n{\n vTexCoord = aTexCoord0.xy;\n oriVertex = aPosition.xyz;\n\tvec4 vVertex = vec4(aPosition.xyz, 1.0);\n\tgl_Position = uViewProjection * uModelMatrix * vVertex;\n\tselectionColor = vec4(aColor.rgb, 1.0);\n\tvec4 positionEC = uView * uModelMatrix * vVertex;\n vPositionToEyeEC = -normalize(positionEC.xyz);\n}\n",_0x32912a=(_0x2694cb=!0,function(e,t){var i=_0x2694cb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2694cb=!1,i}),_0x25eb08=_0x32912a(void 0,(function(){return _0x25eb08.toString().search("(((.+)+)+)+$").toString().constructor(_0x25eb08).search("(((.+)+)+)+$")})),_0x2694cb;_0x25eb08();var _0x3c68b9="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <RegionEffectUboDecl>\nvarying vec3 oriVertex;\nvarying vec2 vTexCoord;\nvarying vec4 selectionColor;\nvarying vec3 vPositionToEyeEC;\nconst float horizontal = 0.0;\nconst float PI = 3.1415926535897932384626;\nvec2 rotateTexCoord(vec2 oriTexCoord)\n{\n\tfloat rotationRadian = uRotationAngle * PI;\n\tvec2 n = vec2(cos(rotationRadian),-sin(rotationRadian));\n\tvec2 t = vec2(sin(rotationRadian),cos(rotationRadian));\n\tmat2 rotateZMatrix = mat2(n,t);\n\treturn rotateZMatrix * oriTexCoord;\n}\nvec4 getGridMaterial(vec2 texCoord)\n{\n\tvec2 lineCount = vec2(uRepeatX, uRepeatY);\n\tvec2 lineOffset = vec2(uOffsetX, uOffsetY);\n\tvec2 lineThickness = vec2(uLineWidthX, uLineWidthY);\n\n float scaledWidth = fract(lineCount.s * texCoord.s - lineOffset.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n\n float scaledHeight = fract(lineCount.t * texCoord.t - lineOffset.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n\n float value;\n\n const float fuzz = 1.2;\n vec2 thickness = (lineThickness * 1.0) - 1.0;\n\n vec2 dx = abs(dFdx(texCoord));\n vec2 dy = abs(dFdy(texCoord));\n vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\n\n\tif(uRepeatX < 0.5)\n\t{\n\t\tvalue = smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight);\n\t}\n\telse if(uRepeatY < 0.5)\n\t{\n\t\tvalue = smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth);\n\t}\n\telse\n\t{\n\t\tvalue = min(\n\t\t\tsmoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\n\t\t\tsmoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n\t}\n\n\tif(value < 0.5)\n\t{\n\t\treturn uForeColor;\n\t}\n\treturn uBackColor;\n}\nvec4 getStripMaterial(vec2 texCoord)\n{\n\tfloat repeat = uRepeatX;\n\tfloat offset = uOffsetX;\n\n float coord = mix(texCoord.s, texCoord.t, horizontal);\n float value = fract((coord - offset) * (repeat * 0.5));\n\n vec4 currentColor = mix(uForeColor, uBackColor, step(0.5, value)); \n\n return currentColor;\n}\nvec4 getDotMaterial(vec2 texCoord)\n{\n\tfloat dotRepeat = uRepeatX;\n\n float b = smoothstep(0.3, 0.32, length(fract(dotRepeat * texCoord.st) - 0.5));\n vec4 color = mix(uForeColor, uBackColor, b);\n return color;\n}\nvec4 getCheckBoardMaterial(vec2 texCoord)\n{\n\tvec2 checkBoardRepeat = vec2(uRepeatX, uRepeatY); \n\n float b = mod(floor(checkBoardRepeat.s * texCoord.s) + floor(checkBoardRepeat.t * texCoord.t), 2.0);\n vec4 currentColor = mix(uForeColor, uBackColor, b);\n return currentColor;\n}\n\nvoid main()\n{\n vec3 newNormal = vec3( czm_normal * czm_computeNormal( oriVertex ) );\n newNormal = normalize( newNormal );\n\tvec4 mixColor = czm_directionLight(newNormal,vPositionToEyeEC,oriVertex);\n\n\tvec2 rotateCoord = rotateTexCoord(vTexCoord);\n\n vec4 color = uForeColor;\n \n if(uType > 3.5)\n {\n \tcolor = getGridMaterial(rotateCoord);\n }\n else if(uType > 2.5)\n {\n \tcolor = getCheckBoardMaterial(rotateCoord);\n }\n else if(uType > 1.5)\n {\n \tcolor = getDotMaterial(rotateCoord);\n }\n else if(uType > 0.5)\n {\n \tcolor = getStripMaterial(rotateCoord);\n }\n \n gl_FragColor = color * mixColor * selectionColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}\n",_0x256e03=(_0x5d7399=!0,function(e,t){var i=_0x5d7399?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d7399=!1,i}),_0x4a0957=_0x256e03(void 0,(function(){return _0x4a0957.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a0957).search("(((.+)+)+)+$")})),_0x5d7399;_0x4a0957();var _0x1568b2="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <PolylineEffectUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\n#ifdef TexCoord2\n attribute vec4 aTexCoord1;\n#endif\n#ifdef VertexColor\n #ifdef WEBGPU\n attribute uvec4 aColor;\n #else\n attribute vec4 aColor;\n #endif\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying vec4 vPositionMC;\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\nvoid clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane,\n out vec4 clippedPositionEC)\n {\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = uCurrentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -uCurrentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n }\n vec4 getPolylineWindowCoordinates(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n {\n #ifdef POLYLINE_DASH\n vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\n vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\n vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\n vec2 lineDir;\n if (usePrevious) {\n lineDir = normalize(positionWindow.xy - previousWindow.xy);\n }\n else {\n lineDir = normalize(nextWindow.xy - positionWindow.xy);\n }\n angle = atan(lineDir.x, lineDir.y) - 1.570796327;\n angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n #endif\n vec4 clippedPrevWC, clippedPrevEC;\n bool prevSegmentClipped, prevSegmentCulled;\n clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\n vec4 clippedNextWC, clippedNextEC;\n bool nextSegmentClipped, nextSegmentCulled;\n clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\n bool segmentClipped, segmentCulled;\n vec4 clippedPositionWC, clippedPositionEC;\n clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\n if (segmentCulled)\n {\n return vec4(0.0, 0.0, 0.0, 1.0);\n }\n vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\n vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\n if (prevSegmentCulled)\n {\n directionToPrevWC = -directionToNextWC;\n }\n else if (nextSegmentCulled)\n {\n directionToNextWC = -directionToPrevWC;\n }\n vec2 thisSegmentForwardWC, otherSegmentForwardWC;\n if (usePrevious)\n {\n thisSegmentForwardWC = -directionToPrevWC;\n otherSegmentForwardWC = directionToNextWC;\n }\n else\n {\n thisSegmentForwardWC = directionToNextWC;\n otherSegmentForwardWC = -directionToPrevWC;\n }\n vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\n vec2 leftWC = thisSegmentLeftWC;\n float expandWidth = width * 0.5;\n if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n {\n vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\n vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\n float leftSumLength = length(leftSumWC);\n leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\n vec2 u = -thisSegmentForwardWC;\n vec2 v = leftWC;\n float sinAngle = abs(u.x * v.y - u.y * v.x);\n expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n }\n vec2 offset = leftWC * expandDirection * expandWidth * uPixelRatio;\n return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (uProjection * clippedPositionEC).w;\n }\nvoid main()\n{ \n vec4 texCoord2 = vec4(0.0);\n #ifdef TexCoord2\n texCoord2 = aTexCoord1;\n #endif\n\tvec2 expandAndWidth = texCoord2.zw;\n\texpandAndWidth.y = expandAndWidth.y * uEffectLineWidth;\n\tfloat u = abs(expandAndWidth.x);\n\tfloat expandDir = sign(expandAndWidth.x);\n#ifdef ENABLE_DYNAMIC\n\tfloat w = 0.2 + 0.3*(1.0 - pow(2.0*abs(u - 0.5), 2.0));\n\tfloat width = abs(expandAndWidth.y*w) + 0.5;\n#else\n\tfloat width = abs(expandAndWidth.y) + 0.5;\n#endif\n\tbool usePrev = expandAndWidth.y < 0.0;\n\tvPositionMC.xyz = aPosition.xyz;\n vPositionMC.w = 0.0;\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vec4(aPosition.xyz, 1.0);\n#endif\n mat4 modelView = uView * uModelMatrix;\n\tvec4 p = modelView * aPosition;\n\tvec4 prev = modelView * vec4(aNormal, 1.0);\n\tvec4 next = modelView * aTexCoord0;\n\tv_st.s = texCoord2.x;\n\tv_width = width;\n\tv_alpha = u;\n\tfloat polylineAngle;\n\tvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\n\tv_polylineAngle = polylineAngle;\n\tgl_Position = czm_viewportOrthographic * positionWC;\n\tv_st.t = czm_writeNonPerspective(clamp(texCoord2.y, 0.0, 1.0), gl_Position.w);\n\tvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n\tvColor = vertexColor;\n}\n",_0xdc0c9b=(_0x50d2af=!0,function(e,t){var i=_0x50d2af?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x50d2af=!1,i}),_0x1c8e20=_0xdc0c9b(void 0,(function(){return _0x1c8e20.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c8e20).search("(((.+)+)+)+$")})),_0x50d2af;_0x1c8e20();var _0x501956="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <PolylineEffectUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nvarying vec4 vColor;\nvarying vec2 v_st;\nvarying float v_width;\nvarying float v_polylineAngle;\nvarying vec4 vSecondColor;\nconst float maskLength = 16.0;\nvarying vec4 vPositionMC;\n\nmat2 rotate(float rad)\n{\n\tfloat c = cos(rad);\n\tfloat s = sin(rad);\n\treturn mat2(\n\t\tc, s,\n\t\t-s, c\n\t);\n}\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\n\tfloat slope = (p0.y - p1.y) / (p0.x - p1.x);\n\treturn slope * (x - p0.x) + p0.y;\n}\n\n#include <preClipFS>\n#include <clip>\nvoid main()\n{\n vec2 st = v_st;\n st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);\n preClip();\n#ifdef GL_OES_standard_derivatives\n\tfloat base = 1.0 - abs(fwidth(st.s)) * 10.0;\n#else\n\tfloat base = 0.99;\n#endif\n\tvec2 center = vec2(1.0, 0.5);\n\tfloat ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\n\tfloat ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\n\tfloat halfWidth = 0.15;\n\tfloat s = step(0.5 - halfWidth, st.t);\n\ts *= 1.0 - step(0.5 + halfWidth, st.t);\n\ts *= 1.0 - step(base, st.s);\n\tfloat t = step(base, st.s);\n\tt *= 1.0 - step(ptOnUpperLine, st.t);\n\tt *= step(ptOnLowerLine, st.t);\n\tfloat dist;\n\n\tvec4 outsideColor = vec4(0.0);\n\tvec4 currentColor;\n\tif (uIsArrow < 0.5 || st.s < base)\n\t{\n\t\tif(uType > 2.5)\n\t\t{\n\t\t\tfloat glow = uGlowPower / abs(st.t - 0.3) - (uGlowPower / 0.5);\n\t\t\tvec3 emission = max(vec3(glow - 1.0 + uColor.rgb), uColor.rgb);\n\t\t\tfloat alpha = clamp(0.0, 1.0, glow) * uColor.a;\n\t\t\tvec4 fragColor = vec4(emission, alpha);\n\t\t\tif(uIsArrow > 0.5)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, fragColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, fragColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = fragColor;\n\t\t\t}\n\t\t}\n\t\telse if(uType > 1.5)\n\t\t{\n\t\t float halfInteriorWidth = 0.5 * (v_width - uOutlineWidth) / v_width;\n\t\t\tfloat b = step(0.5 - halfInteriorWidth, st.t);\n\t\t\tb *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\n\t\t\tfloat d1 = abs(st.t - (0.5 - halfInteriorWidth));\n\t\t\tfloat d2 = abs(st.t - (0.5 + halfInteriorWidth));\n\t\t\tfloat dist = min(d1, d2);\n\t\t\tcurrentColor = mix(uOutlineColor, uColor, b);\n\t\t\tgl_FragColor = czm_antialias(uOutlineColor, uColor, currentColor, dist, 0.1);\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse if(uType == 1.0)\n\t\t{\n\t\t\tvec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n\t\t\tfloat dashPosition = fract(pos.x / uDashLength);\n\t\t\tfloat maskIndex = floor(dashPosition * maskLength);\n\t\t\tfloat maskTest = floor(uDashPattern / pow(2.0, maskIndex));\n\t\t\tvec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? uGapColor : uColor;\n\t\t\tif (fragColor.a < 0.005)\n\t\t\t{\n\t\t\t\tdiscard;\n\t\t\t}\n\t\t\tif(uIsArrow > 0.5)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, fragColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, fragColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = fragColor;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(uIsArrow > 0.5)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, uColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, uColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = uColor;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tfloat d1 = czm_infinity;\n\t\tif (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n\t\t{\n\t\t\td1 = abs(st.s - base);\n\t\t}\n\t\tfloat d2 = abs(st.t - ptOnUpperLine);\n\t\tfloat d3 = abs(st.t - ptOnLowerLine);\n\t\tdist = min(min(d1, d2), d3);\n\t\tcurrentColor = mix(outsideColor, uColor, clamp(s + t, 0.0, 1.0));\n\t\tgl_FragColor = czm_antialias(outsideColor, uColor, currentColor, dist, 0.1);\n\t}\n#ifndef REPLACE_COLOR_TYPE\n gl_FragColor = gl_FragColor * vColor;\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n if(gl_FragColor.a < 0.1){discard;}\n#ifdef LOG_DEPTH\n if(uPolygonOffset.x != 0.0 || uPolygonOffset.y != 0.0){\n float logZ = 1.0 / gl_FragCoord.w + 1.0;\n float DZ = max(dFdx(logZ), dFdy(logZ));\n logZ += DZ * uPolygonOffset.x + 0.0000001 * uPolygonOffset.y;\n czm_writeLogDepth(logZ);\n }\n else{\n czm_writeLogDepth();\n }\n#endif\n#ifdef CLIP\n gl_FragColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n}\n",_0x1aa566=(_0x3dd136=!0,function(e,t){var i=_0x3dd136?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3dd136=!1,i}),_0x247309=_0x1aa566(void 0,(function(){return _0x247309.toString().search("(((.+)+)+)+$").toString().constructor(_0x247309).search("(((.+)+)+)+$")})),_0x3dd136;_0x247309();var _0x4bddb0="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <PolylineEffectUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\n\t#ifdef WEBGPU\n\tattribute uvec4 aColor;\n\t#else\n\tattribute vec4 aColor;\n\t#endif\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying float fWindowZ;\nvarying vec4 vPositionMC;\n\nvec4 eyeToWindowCoordinates(vec4 positionEC)\n{\n vec4 q = uProjection * positionEC; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n\nvoid clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p1ToP0 = p1 - p0;\n float magnitude = length(p1ToP0);\n vec3 direction = normalize(p1ToP0);\n float endPoint0Distance = -(uCurrentFrustum.x + p0.z);\n float denominator = -direction.z;\n if (endPoint0Distance < 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance < 0.0 && abs(denominator) > czm_epsilon7)\n {\n float t = (uCurrentFrustum.x + p0.z) / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n clipped = true;\n }\n }\n positionWC = eyeToWindowCoordinates(vec4(p0, 1.0));\n}\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\n\tvec4 endPointWC, p0, p1;\n\tbool culledByNearPlane, clipped;\n\tvec4 positionEC = position;\n\tvec4 prevEC = previous;\n\tvec4 nextEC = next;\n\tvec4 positionWindow = eyeToWindowCoordinates(positionEC);\n\tvec4 previousWindow = eyeToWindowCoordinates(prevEC);\n\tvec4 nextWindow = eyeToWindowCoordinates(nextEC);\n\n\tvec2 lineDir;\n\tif (usePrevious)\n\t{\n\t\tlineDir = normalize(positionWindow.xy - previousWindow.xy);\n\t}\n\telse\n\t{\n\t\tlineDir = normalize(nextWindow.xy - positionWindow.xy);\n\t}\n\tangle = atan(lineDir.x, lineDir.y) - 1.570796327;\n\tangle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n\n\tclipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, p0, clipped, culledByNearPlane);\n\tclipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, p1, clipped, culledByNearPlane);\n\tclipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, endPointWC, clipped, culledByNearPlane);\n\tif (culledByNearPlane)\n\t{\n\t\treturn vec4(0.0, 0.0, 0.0, 1.0);\n\t}\n\tvec2 prevWC = normalize(p0.xy - endPointWC.xy);\n\tvec2 nextWC = normalize(p1.xy - endPointWC.xy);\n\tfloat expandWidth = width * 0.5;\n\tvec2 direction;\n\tif (czm_equalsEpsilon(previous.xyz - position.xyz, vec3(0.0), czm_epsilon7) || czm_equalsEpsilon(prevWC, -nextWC, czm_epsilon7))\n\t{\n\t\tdirection = vec2(-nextWC.y, nextWC.x);\n\t}\n\telse if (czm_equalsEpsilon(next.xyz - position.xyz, vec3(0.0), czm_epsilon7) || clipped)\n\t{\n\t\tdirection = vec2(prevWC.y, -prevWC.x);\n\t}\n\telse\n\t{\n\t\tvec2 normal = vec2(-nextWC.y, nextWC.x);\n\t\tdirection = normalize((nextWC + prevWC) * 0.5);\n\t\tif (dot(direction, normal) < 0.0)\n\t\t{\n\t\t\tdirection = -direction;\n\t\t}\n\t\tfloat sinAngle = abs(direction.x * nextWC.y - direction.y * nextWC.x);\n\t\texpandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n\t}\n\tvec2 offset = direction * expandDirection * expandWidth * czm_resolutionScale;\n\treturn vec4(endPointWC.xy + offset, -endPointWC.z, 1.0);\n}\nvoid main()\n{\n\tvec2 expandAndWidth = aTexCoord1.zw;\n\texpandAndWidth.y = expandAndWidth.y * uEffectLineWidth;\n\tfloat u = abs(expandAndWidth.x);\n\tfloat expandDir = sign(expandAndWidth.x);\n#ifdef ENABLE_DYNAMIC\n\tfloat w = 0.2 + 0.3*(1.0 - pow(2.0*abs(u - 0.5), 2.0));\n\tfloat width = abs(expandAndWidth.y*w) + 0.5;\n#else\n\tfloat width = abs(expandAndWidth.y) + 0.5;\n#endif\n\tbool usePrev = expandAndWidth.y < 0.0;\n\tvPositionMC.xyz = aPosition.xyz;\n vPositionMC.w = 0.0;\n mat4 modelView = uView * uModelMatrix;\n\tvec4 p = modelView * aPosition;\n\tvec4 prev = modelView * vec4(aNormal, 1.0);\n\tvec4 next = modelView * aTexCoord0;\n\tv_st = aTexCoord1.xy;\n\tv_width = width;\n\tv_alpha = u;\n\tvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, v_polylineAngle);\n\tvec4 pos = uProjection * p;\n\tfWindowZ = (0.5 * (pos.z / pos.w) + 0.5);\n\tgl_Position = czm_viewportOrthographic * positionWC;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n\t#ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n float right_2 = operationType.x * 0.5;\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fWindowZ = -1.0;\n }\n#endif\n\tvColor = vertexColor;\n}\n",_0x5b1e30=(_0x234bd6=!0,function(e,t){var i=_0x234bd6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x234bd6=!1,i}),_0x2ee6f6=_0x5b1e30(void 0,(function(){return _0x2ee6f6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ee6f6).search("(((.+)+)+)+$")})),_0x234bd6;_0x2ee6f6();var _0x48d945="\nattribute vec4 aPosition;\n#include <LayerUboDecl>\n#include <MeshUboDecl>\n#ifdef VertexColor\n attribute vec4 aColor;\n#endif\n#ifdef BatchTable\n attribute float batchId;\n#endif\n attribute vec4 aTexCoord0;\n attribute vec4 aTexCoord1;\n attribute vec4 aTexCoord2;\n attribute vec4 aTexCoord3;\n attribute vec4 aTexCoord4;\n attribute vec4 aTexCoord5;\n varying vec4 v_startPlaneNormalEcAndHalfWidth;\n varying vec4 v_endPlaneNormalEcAndBatchId;\n varying vec4 v_rightPlaneEC;\n varying vec4 v_endEcAndStartEcX;\n varying vec4 v_texcoordNormalizationAndStartEcYZ;\n varying vec4 v_vertexColor;\n varying vec4 vSecondColor;\n#ifdef COMPRESS_VERTEX\n uniform vec4 decode_position_min;\n uniform float decode_position_normConstant;\n#endif\n#ifdef COMPRESS_TEXCOORD\n uniform float decode_texCoord0_normConstant;\n uniform float decode_texCoord1_normConstant;\n uniform float decode_texCoord2_normConstant;\n uniform float decode_texCoord3_normConstant;\n uniform float decode_texCoord4_normConstant;\n uniform float decode_texCoord5_normConstant;\n uniform vec4 decode_texCoord0_min;\n uniform vec4 decode_texCoord1_min;\n uniform vec4 decode_texCoord2_min;\n uniform vec4 decode_texCoord3_min;\n uniform vec4 decode_texCoord4_min;\n uniform vec4 decode_texCoord5_min;\n#endif\n void main()\n {\n vec3 position3DHigh = aPosition.xyz;\n vec4 uncompress = vec4(1.0);\n#ifdef COMPRESS_VERTEX\n uncompress = decode_position_min + aPosition * decode_position_normConstant;\n position3DHigh = uncompress.xyz;\n#endif\n vec3 position3DLow = aTexCoord5.xyz;\n#ifdef COMPRESS_TEXCOORD\n uncompress = decode_texCoord5_min + aTexCoord5 * decode_texCoord5_normConstant;\n position3DLow = uncompress.xyz;\n#endif\n vec4 startHiAndForwardOffsetX = aTexCoord0;\n vec4 startLoAndForwardOffsetY = aTexCoord1;\n vec4 startNormalAndForwardOffsetZ = aTexCoord2;\n vec4 endNormalAndTextureCoordinateNormalizationX = aTexCoord3;\n vec4 rightNormalAndTextureCoordinateNormalizationY = aTexCoord4;\n#ifdef COMPRESS_TEXCOORD\n uncompress = decode_texCoord0_min + aTexCoord0 * decode_texCoord0_normConstant;\n startHiAndForwardOffsetX = uncompress;\n uncompress = decode_texCoord1_min + aTexCoord1 * decode_texCoord1_normConstant;\n startLoAndForwardOffsetY = uncompress;\n uncompress = decode_texCoord2_min + aTexCoord2 * decode_texCoord2_normConstant;\n startNormalAndForwardOffsetZ = uncompress;\n uncompress = decode_texCoord3_min + aTexCoord3 * decode_texCoord3_normConstant;\n endNormalAndTextureCoordinateNormalizationX = uncompress;\n uncompress = decode_texCoord4_min + aTexCoord4 * decode_texCoord4_normConstant;\n rightNormalAndTextureCoordinateNormalizationY = uncompress;\n#endif\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\n vec3 forwardOffset = vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\n vec3 offset = czm_normal * forwardOffset;\n vec3 ecEnd = ecStart + offset;\n vec3 forwardDirectionEC = normalize(offset);\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n v_endEcAndStartEcX.xyz = ecEnd;\n v_endEcAndStartEcX.w = ecStart.x;\n v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n vec4 positionRelativeToEye = czm_translateRelativeToEye(position3DHigh, position3DLow);\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye;\n float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\n vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection));\n vec3 normalEC = normalize(cross(planeDirection, upOrDown));\n upOrDown = cross(forwardDirectionEC, normalEC);\n upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\n positionEC.xyz += upOrDown;\n v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\n float width = uLineWidth;\n v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\n v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\n v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\n v_endPlaneNormalEcAndBatchId.w = 0.0;\n width = width * max(0.0, czm_metersPerPixel(positionEC));\n width = width / dot(normalEC, v_rightPlaneEC.xyz);\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n positionEC.xyz += width * normalEC;\n gl_Position = czm_depthClampFarPlane(czm_projection * positionEC);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n v_vertexColor = vertexColor * uLineColor;\n }\n ",_0x36c782=(_0x1c51f5=!0,function(e,t){var i=_0x1c51f5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c51f5=!1,i}),_0x23408c=_0x36c782(void 0,(function(){return _0x23408c.toString().search("(((.+)+)+)+$").toString().constructor(_0x23408c).search("(((.+)+)+)+$")})),_0x1c51f5;_0x23408c();var _0xfeefe2="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#include <LayerUboDecl>\n varying vec4 v_startPlaneNormalEcAndHalfWidth;\n varying vec4 v_endPlaneNormalEcAndBatchId;\n varying vec4 v_rightPlaneEC; // Technically can compute distance for this here\n varying vec4 v_endEcAndStartEcX;\n varying vec4 v_texcoordNormalizationAndStartEcYZ;\n varying vec4 v_vertexColor;\n varying vec4 vSecondColor;\n void main(void)\n {\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n discard;\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0)\n {\n discard;\n }\n gl_FragColor = v_vertexColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n// vec3 alignedPlaneNormal;\n// // start aligned plane\n// alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\n// alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n// distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\n// // end aligned plane\n// alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\n// alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n// distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n// // Clamp - distance to aligned planes may be negative due to mitering,\n// // so fragment texture coordinate might be out-of-bounds.\n// float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\n// s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\n// float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\n// czm_writeDepthClampedToFarPlane();\n }\n ",_0x591510=(_0xfe30a2=!0,function(e,t){var i=_0xfe30a2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xfe30a2=!1,i}),_0x23bbf9=_0x591510(void 0,(function(){return _0x23bbf9.toString().search("(((.+)+)+)+$").toString().constructor(_0x23bbf9).search("(((.+)+)+)+$")})),_0xfe30a2;_0x23bbf9();var _0xbba6e0={SIZE_PER_INSTANCE:20,SIZE_PER_DM_INSTANCE:35,S3MB_BIM_INSTANCE:17,S3MB_BIM_INSTANCE_2:16,S3MB_PIPE_INSTANCE:29},_0x14dd8d=Object.freeze(_0xbba6e0),_0x42537c=(_0x2c613d=!0,function(e,t){var i=_0x2c613d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c613d=!1,i}),_0x39eede=_0x42537c(void 0,(function(){return _0x39eede.toString().search("(((.+)+)+)+$").toString().constructor(_0x39eede).search("(((.+)+)+)+$")})),_0x2c613d;_0x39eede();var _0x2f187f={NONE:0,LEFT:1,RIGHT:2,TOP:-1,BOTTOM:-2},_0x2d4a08=Object.freeze(_0x2f187f),_0x2cec42=(_0x45d4e4=!0,function(e,t){var i=_0x45d4e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45d4e4=!1,i}),_0x562e10=_0x2cec42(void 0,(function(){return _0x562e10.toString().search("(((.+)+)+)+$").toString().constructor(_0x562e10).search("(((.+)+)+)+$")})),_0x45d4e4;_0x562e10();var _0x32c02e={DatasetField:0,EdgeLengthMin:1},_0x132759=Object.freeze(_0x32c02e),_0x17b0db=(_0x1f90da=!0,function(e,t){var i=_0x1f90da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f90da=!1,i}),_0x337b1d=_0x17b0db(void 0,(function(){return _0x337b1d.toString().search("(((.+)+)+)+$").toString().constructor(_0x337b1d).search("(((.+)+)+)+$")})),_0x1f90da;_0x337b1d();var _0x30f528={OPAQUE:"opaque",BLEND:"blend",MASK:"mask"},_0x36a597=Object.freeze(_0x30f528),_0x3cb69e=(_0x272257=!0,function(e,t){var i=_0x272257?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x272257=!1,i}),_0x33fe5a=_0x3cb69e(void 0,(function(){return _0x33fe5a.toString().search("(((.+)+)+)+$").toString().constructor(_0x33fe5a).search("(((.+)+)+)+$")})),_0x272257;function _0x8dd7b2(e){var t=_0x37a515.call(this)||this;t._layer=e,t._name=_0x2e0417.Polyline,this._initUniformMap()}function s$J(e){this._lightList={},this._lightList[_0x4970c2.DIRECTIONAL]=new e$1Q,this._lightList[_0x4970c2.POINT]=new e$1Q,this._lightList[_0x4970c2.SPOT]=new e$1Q,this._lightList[_0x4970c2.HEMISPHERE]=new e$1Q,this._visibleLightList={},this._visibleLightList[_0x4970c2.POINT]=new e$1Q,this._visibleLightList[_0x4970c2.SPOT]=new e$1Q,this._visiblePointLightCount=0,this._visibleSpotLightCount=0,this._visibleDirectionalLightCount=0,this._visibleHemisphereLightCount=0,this._ambientLightColor=new e$1X(0,0,0,1),this._sunLightColor=new e$1X(.8,.8,.8,1),this._sunLightON=1,this._changedLightList=new e$1Q,this._pointLightDistanceDecay=[],this._spotLightDistanceDecayCosPenumbra=[],this._context=e,this._visibleDistanceMax=1e4,this._visibleCountAllowed=100,this._enableAmbientLightColor=!1,this._enableSunLightColor=!1}_0x33fe5a(),_0x37a515&&(_0x8dd7b2.__proto__=_0x37a515),_0x8dd7b2.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x8dd7b2.prototype.constructor=_0x37a515,Object.defineProperties(_0x8dd7b2.prototype,{}),_0x8dd7b2.prototype._initUBOStruct=function(){const e=this._ubo;e.addUniform("uColor",4),e.addUniform("uOutlineColor",4),e.addUniform("uGapColor",4),e.addUniform("uEffectLineWidth",1),e.addUniform("uType",1),e.addUniform("uOutlineWidth",1),e.addUniform("uDashLength",1),e.addUniform("uDashPattern",1),e.addUniform("uGlowPower",1),e.addUniform("uIsArrow",1)},_0x8dd7b2.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),this._initUBOStruct(),this._ubo.create()},_0x8dd7b2.prototype.update=function(e){if(!e.webgpu&&!e.webgl2)return;e$2e(this._ubo)||this._initUBO(e);const t=this._layer,i=this._ubo,n=t._effect;let r=n._dashPattern;if(n._isMove){n._frame>159&&(n._frame=0);var o=Math.floor(n._frame/10),a=n._dashPattern<<o,s=n._dashPattern>>16-o;n._frame++,r=a+s}i.updateDirectColor4("uColor",n._color),i.updateDirectColor4("uOutlineColor",n._outlineColor),i.updateDirectColor4("uGapColor",n._gapColor),i.updateFloat("uEffectLineWidth",n._lineWidth),i.updateFloat("uType",n._type),i.updateFloat("uOutlineWidth",n._outlineWidth),i.updateFloat("uDashLength",n._dashLength),i.updateFloat("uDashPattern",r),i.updateFloat("uGlowPower",n._glowPower),i.updateFloat("uIsArrow",n._isArrow?1:0),i.update()},_0x8dd7b2.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(t.webgl2||t.webgpu)return;var i={};const n=e._effect;i.uColor=function(){return n._color},i.uOutlineColor=function(){return n._outlineColor},i.uGapColor=function(){return n._gapColor},i.uEffectLineWidth=function(){return n._lineWidth},i.uType=function(){return n._type},i.uOutlineWidth=function(){return n._outlineWidth},i.uDashLength=function(){return n._dashLength},i.uDashPattern=function(){let e=n._dashPattern;if(n._isMove){n._frame>159&&(n._frame=0);var t=Math.floor(n._frame/10),i=n._dashPattern<<t,r=n._dashPattern>>16-t;n._frame++,e=i+r}return e},i.uGlowPower=function(){return n._glowPower},i.uIsArrow=function(){return n._isArrow?1:0},this._uniformMap=i},_0x8dd7b2.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x8dd7b2.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x8dd7b2.prototype.isDestroyed=function(){return!1},_0x8dd7b2.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)},s$J.MaxPointLightCount=16,s$J.MaxSpotLightCount=16,s$J.MaxDirectionLightCount=4,Object.defineProperties(s$J.prototype,{pointLight:{get:function(){return this._lightList[_0x4970c2.POINT]}},spotLight:{get:function(){return this._lightList[_0x4970c2.SPOT]}},directionalLight:{get:function(){return this._lightList[_0x4970c2.DIRECTIONAL]}},hemisphereLight:{get:function(){return this._lightList[_0x4970c2.HEMISPHERE]}},ambientLightColor:{get:function(){return this._ambientLightColor},set:function(e){o$1q.defined("Light source ambientLightColor",e),e$1X.clone(e,this._ambientLightColor),this._enableAmbientLightColor=!0}},sunLightColor:{get:function(){return this._sunLightColor},set:function(e){o$1q.defined("Light source sunLightColor",e),e$1X.clone(e,this._sunLightColor),this._enableSunLightColor=!0}},sunLightON:{get:function(){return this._sunLightON},set:function(e){o$1q.typeOf.bool("Light source sun light on",e),this._sunLightON=e?1:0}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}}}),s$J.prototype.addLightSource=function(e){var t=this._lightList[e.lightType];return t.set(e.id,e),t.length},s$J.prototype.removeLightSource=function(e){var t=this._lightList[e.lightType];return t.get(e.id)?(t.remove(e.id),t.length):-1},s$J.prototype.updateVisiblities=function(e){var t,i=this._lightList[_0x4970c2.POINT].values;for(t=0;t<i.length;t++)i[t].computeVisiblityInCullingVolume(e);for(i=this._lightList[_0x4970c2.SPOT].values,t=0;t<i.length;t++)i[t].computeVisiblityInCullingVolume(e)},s$J.prototype.hasChange=function(){return this._changedLightList.values.length>0},s$J.prototype.resetChange=function(){this._changedLightList.removeAll()},s$J.prototype.combineUniformValue=function(){this._pointLightDistanceDecay=[],this._spotLightDistanceDecayCosPenumbra=[];var e,t=this._visibleLightList[_0x4970c2.POINT].values,i=t.length;for(e=0;e<i;e++){var n=new o$1o;n.x=t[e].cutoffDistance,n.y=t[e].decay,this._pointLightDistanceDecay.push(n)}var r=this._visibleLightList[_0x4970c2.SPOT].values;for(i=r.length,e=0;e<i;e++){var o=new e$2c;o.x=r[e].distance,o.y=r[e].decay,o.z=r[e].angleCos,o.w=r[e].penumbraCos,this._spotLightDistanceDecayCosPenumbra.push(o)}},s$J.prototype.createUniformMap=function(){var e={},t=this;return e.uAmbientLightColor=function(){return t.ambientLightColor},e.uSunLightColor=function(){return t.sunLightColor},e.uSunLightON=function(){return t.sunLightON},e.uDirectionalLightDirectionEC=function(){for(var e=[],i=t.directionalLight.values,n=i.length,r=0;r<n;r++)e.push(i[r].directionEC);return e},e.uDirectionalLightColor=function(){for(var e=[],i=t.directionalLight.values,n=i.length,r=0;r<n;r++)e.push(i[r].lightColor);return e},e.uPointLightPositionEC=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.POINT].values,n=i.length,r=0;r<n;r++)e.push(i[r].positionEC);return e},e.uPointLightColor=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.POINT].values,n=i.length,r=0;r<n;r++)e.push(i[r].lightColor);return e},e.uDirectionalLightDirection=function(){for(var e=[],i=t.directionalLight.values,n=0;n<i.length;n++)e.push(i[n].direction);return e},e.uPointLightDistanceAndDecay=function(){return t._pointLightDistanceDecay},e.uSpotLightColor=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].lightColor);return e},e.uSpotLightPositionEC=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].positionEC);return e},e.uSpotLightPosition=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].position);return e},e.uSpotLightDirection=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].direction);return e},e.uSpotLightDirectionEC=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].directionEC);return e},e.uSpotLightDistanceDecayCosPenumbra=function(){return t._spotLightDistanceDecayCosPenumbra},e.uSpotLightExponent=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].exponent);return e},e.uSkyColor=function(){for(var e=[],i=t._lightList[_0x4970c2.HEMISPHERE].values,n=i.length,r=0;r<n;r++)e.push(i[r].skyColor);return e},e.uGroundColor=function(){for(var e=[],i=t._lightList[_0x4970c2.HEMISPHERE].values,n=i.length,r=0;r<n;r++)e.push(i[r].groundColor);return e},e};var _0x56ab24=(_0x1349fc=!0,function(e,t){var i=_0x1349fc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1349fc=!1,i}),_0x280e51=_0x56ab24(void 0,(function(){return _0x280e51.toString().search("(((.+)+)+)+$").toString().constructor(_0x280e51).search("(((.+)+)+)+$")})),_0x1349fc;_0x280e51();var _0x3489f1="\n#extension GL_EXT_draw_buffers : enable\n#include <LayerUboDecl>\n#include <WaterLayerUboDecl>\n#include <MeshUboDecl>\nuniform sampler2D uReflectMap;\nuniform sampler2D uNoiseMap;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\nvarying vec3 v_positionEC;\nvarying vec4 vPosition;\n\n\n\nvec4 getNoise( vec2 uv ) {\n vec2 uv0 = ( uv / 103.0 ) + vec2(uTimeVal / 17.0, uTimeVal / 29.0) * uFlowParameter.z;\n vec2 uv1 = uv / 107.0 - vec2( uTimeVal / -19.0, uTimeVal / 31.0 ) * uFlowParameter.z;\n vec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( uTimeVal / 101.0, uTimeVal / 97.0 ) * uFlowParameter.z;\n vec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( uTimeVal / 109.0, uTimeVal / -113.0 ) * uFlowParameter.z;\n vec4 noise = texture2D( uNoiseMap, uv0 ) +\n texture2D( uNoiseMap, uv1 ) +\n texture2D( uNoiseMap, uv2 ) +\n texture2D( uNoiseMap, uv3 );\n return noise * 0.5 - 1.0;\n}\n \nvoid sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) \n{\n vec3 sunDirection = czm_lightDirectionEC; \n vec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) ); \n float direction = max( 0.0, dot( eyeDirection, reflection ) ); \n specularColor += pow( direction, shiny ) * uSunColor.rgb * spec; \n diffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * uSunColor.rgb * diffuse; \n} \n\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\n\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ),\n vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ),\n vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n const float toneMappingExposure = 1.0;\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return clamp( color, 0.0, 1.0);\n}\n\n#ifdef COMPUTE_W_VALUE\n varying float wValue;\n#endif\n\nvoid main()\n{\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n vec4 v_PositionMC = vPositionMC; \n v_PositionMC.w = 1.0;\n v_PositionMC = uGeoMatrix * v_PositionMC;\n mat4 scalemat = mat4(0.5, 0.0, 0.0, 0.0, \n 0.0, 0.5, 0.0, 0.0, \n 0.0, 0.0, 0.5, 0.0, \n 0.5, 0.5, 0.5, 1.0); \n vec4 proj = scalemat * vPosition; \n vec3 vMirrorCoord = proj.xyw; \n vec3 worldToEye = -v_positionEC.xyz; \n float distance = length(worldToEye);\n vec4 noise = getNoise(v_PositionMC.xy); \n noise.xy *= uNoiseStrength;\n vec3 surfaceNormalEC = czm_normal * normalize( noise.xyz * vec3( 1.5, 1.5, 1.0 ) );\n vec3 diffuseLight = vec3(0.0); \n vec3 specularLight = vec3(0.0); \n vec3 eyeDirection = normalize( worldToEye.xyz ); \n sunLight( surfaceNormalEC, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );\n\n vec2 distortion = surfaceNormalEC.xy * ( 0.001 + 1.0 / distance ) * 3.7;\n vec2 mirrorCoord = vMirrorCoord.xy / vMirrorCoord.z;\n vec3 reflectionSample = vec3( textureLod( uReflectMap, mirrorCoord + distortion, uReflectMapLod));\n float theta = max( dot( eyeDirection, surfaceNormalEC ), 0.0 ); \n float rf0 = 0.3; \n vec3 waterColor = uWaterColor.rgb * uWaterBrightness;\n float reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 ); \n vec3 scatter = max( 0.0, dot( surfaceNormalEC, eyeDirection ) ) * waterColor;\n reflectionSample *= uUseRefectMap;\n vec3 albedo = mix((uSunColor.rgb * diffuseLight * 0.3 + scatter), (vec3(0.1) + reflectionSample * 0.9 + reflectionSample * specularLight), reflectance); \n vec4 finalColor = vec4(albedo, 1.0); \n finalColor.a = uWaterColor.a;\n #ifndef HDR\n finalColor.rgb = ACESFilmicToneMapping(finalColor.rgb);\n #endif\n if(finalColor.a < 0.1)\n {\n discard;\n }\n\n#ifdef HYPSOMETRIC\n if(wValue > uMaxVisibleValue || wValue < uMinVisibleValue)\n {\n finalColor.a = 0.0;\n }\n#endif\n gl_FragColor = finalColor;\n}",_0x225fe1=(_0x2579c2=!0,function(e,t){var i=_0x2579c2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2579c2=!1,i}),_0x1c3bbc=_0x225fe1(void 0,(function(){return _0x1c3bbc.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c3bbc).search("(((.+)+)+)+$")})),_0x2579c2;function _0x273cff(e){}function _0x5342d0(e){return e.verticesCount<=8||16==e.verticesCount}function _0x25eac9(e){return 1!==e._brightness||1!==e._contrast||0!==e._hue||1!==e._saturation||1!==e._gamma}_0x1c3bbc(),_0x273cff.createShaderProgram=function(e,t,i){var n=t.layer,r=n._context;r.webgl2;var o=!1,a=n._style3D,s="S3MTilesVectex_",l="S3MTilesFragment_",u=new s$V({name:s,sources:[r.webgpu?_0x36d142:_0x359ef7],useWGSL:r.webgpu}),c=new s$V({name:l,sources:[r.webgpu?_0x4c43d7:_0x1931a7],useWGSL:r.webgpu});switch(t.fileType){case p$T.PointCloudFile:l="S3MPointCloudFp_",u=new s$V({name:s="S3MPointCloudVp_",sources:[(o=r.webgpu)?_0x2cd408:_0x21e433],useWGSL:o}),(c=new s$V({name:l,sources:[o?_0x138829:_0x589347],useWGSL:o})).defines.push(D$V.PT_CLOUD),u.defines.push(D$V.PT_CLOUD);var h=t.volTexture||t.volObj;if((n._bUseHypColorTable||h&&n._bUseHypColorTable)&&(u.defines.push(D$V.COMPUTE_W_VALUE),u.defines.push(D$V.HYPSOMETRIC),u.defines.push(D$V.VOL_AND_HYP),c.defines.push(D$V.HYPSOMETRIC),c.defines.push(D$V.COMPUTE_W_VALUE),c.defines.push(D$V.VOL_AND_HYP)),e$2e((_=t.vertexPackage).nCompressOptions))((m=_.nCompressOptions)&_0x64fca6.SVC_Vertex)==_0x64fca6.SVC_Vertex&&u.defines.push(D$V.COMPRESS_VERTEX),(m&_0x64fca6.SVC_Normal)==_0x64fca6.SVC_Normal&&u.defines.push(D$V.COMPRESS_NORMAL),((m&_0x64fca6.SVC_VertexColor)==_0x64fca6.SVC_VertexColor||"MESHOPT"===n._vertexCompressionType)&&u.defines.push(D$V.COMPRESS_COLOR),(m&_0x64fca6.SVC_TexutreCoord)==_0x64fca6.SVC_TexutreCoord&&u.defines.push(D$V.COMPRESS_TEXCOORD);e$2e(_.textureCoordIsW)&&t.hasTexCoord&&u.defines.push(D$V.TEXTURE_COORD_ONE_IS_W),n._clipping&&c.defines.push("CLIP"),n._section&&c.defines.push("CLIPPLANE");break;case p$T.OSGBFile:case p$T.OSGBCacheFile:u=new s$V({name:s,sources:[(o=r.webgpu)?_0x36d142:_0x359ef7],useWGSL:o});var d=t.materialPass._textures.length;if(t.materialPass._isInvalidOblique)(c=new s$V({name:l="S3MTilesFragment_",sources:[o?_0x4c43d7:_0x1931a7],useWGSL:o})).defines.push(D$V.INVALID_OBLIQUE);else if(t.hasTexCoord){if(d>0){if(c=new s$V({name:l="S3MTilesFragment_",sources:[o?_0x4c43d7:_0x1931a7],useWGSL:o}),e$2e(t.materialPass._batchTable)){var f=t.materialPass._batchTable.getVertexShaderCallback(o)(o?_0x36d142:_0x359ef7);(u=new s$V({name:s,sources:[f],useWGSL:o})).defines.push(D$V.TextureBatch),c.defines.push(D$V.TextureBatch)}c.defines.push(D$V.Has_Texture),d>1&&t.hasTexCoord2&&(e$2e(t.materialPass._batchTableBake)&&(u=new s$V({name:s,sources:[f=t.materialPass._batchTableBake.getVertexShaderCallback(o)(f)],useWGSL:o})).defines.push(D$V.TextureBatch),u.defines.push(D$V.MULTI_TEX),c.defines.push(D$V.MULTI_TEX),2===n.textureEmissionUnit&&c.defines.push(D$V.SEC_TEX_EMISSION))}t.materialPass.hasTexture&&(u.defines.push(D$V.COMPUTE_TEXCOORD),c.defines.push(D$V.COMPUTE_TEXCOORD)),o&&1===t.primitiveType&&(l="S3MTilesPointFragmentWGSL",u=new s$V({name:s="S3MTilesPointVectexWGSL",sources:[_0x108a30],useWGSL:o}),c=new s$V({name:s,sources:[_0x355815],useWGSL:o}))}!t.hasTexCoord&&d>0&&(c.defines.push(D$V.Has_Texture),c.defines.push(D$V.NO_TEXCOORD)),t.materialPass._usePBRTextureBatch&&(u.defines.push(D$V.USE_BatchPBR),c.defines.push(D$V.USE_BatchPBR)),n.shadowType===_0x325616.NONE&&(u.defines.push("NormalVertex"),c.defines.push("NormalVertex")),!r.webgpu&&e$1W.maximumVertexTextureImageUnits>0&&u.defines.push("VertexTextureSupport"),n._isS3MB?((t.instanceMode===_0x14dd8d.S3MB_BIM_INSTANCE||t.instanceMode===_0x14dd8d.S3MB_BIM_INSTANCE_2)&&(u.defines.push("InstanceRenderBIM"),u.defines.push("InstanceS3MB")),t.instanceMode===_0x14dd8d.S3MB_PIPE_INSTANCE&&(u.defines.push("InstanceRenderPipeline"),c.defines.push("InstanceRenderPipeline"),u.defines.push("InstanceS3MB"),_0x5342d0(i._vertexPackage)&&(u.defines.push("IS_SQUARE_PIPE"),c.defines.push("IS_SQUARE_PIPE"))),(t.instanceMode===_0x14dd8d.S3MB_BIM_INSTANCE||t.instanceMode===_0x14dd8d.S3MB_BIM_INSTANCE_2||t.instanceMode===_0x14dd8d.S3MB_PIPE_INSTANCE)&&(u.defines.push("Instance"),c.defines.push("Instance"))):(t.instanceMode===_0x14dd8d.SIZE_PER_INSTANCE&&u.defines.push("InstanceRenderBIM"),t.instanceMode===_0x14dd8d.SIZE_PER_DM_INSTANCE&&(u.defines.push("InstanceRenderPipeline"),_0x5342d0(i._vertexPackage)&&(u.defines.push("IS_SQUARE_PIPE"),c.defines.push("IS_SQUARE_PIPE"))),(t.instanceMode===_0x14dd8d.SIZE_PER_DM_INSTANCE||t.instanceMode===_0x14dd8d.SIZE_PER_INSTANCE)&&(u.defines.push("Instance"),c.defines.push("Instance"))),n._clipping&&c.defines.push("CLIP"),n._section&&c.defines.push("CLIPPLANE"),t.volObj?(u.defines.push(D$V.VOLUME),c.defines.push(D$V.VOLUME)):t.volTexture&&(u.defines.push(D$V.VOLUME2),c.defines.push(D$V.VOLUME2)),e$2e(t.materialPass._mapTextures)&&Object.getOwnPropertyNames(t.materialPass._mapTextures).length>0&&c.defines.push("Map"),_0x25eac9(n)&&c.defines.push(D$V.ADJUST_COLOR),n._hasLight&&4===t.primitiveType&&(u.defines.push(D$V.HAS_LIGHT),c.defines.push(D$V.HAS_LIGHT)),t.hasNormal&&!t.ignoreNormal&&(u.defines.push(D$V.HAS_NORMAL),c.defines.push(D$V.HAS_NORMAL)),t.ignoreNormal&&c.defines.push(D$V.IGNORE_NORMAL),n._selectColorType===Zr$3.REPLACE?(u.defines.push(D$V.REPLACE_SELECT_TYPE),c.defines.push(D$V.REPLACE_SELECT_TYPE)):n.isSilhouette()&&(u.defines.push(D$V.SILHOUETTE_SELECT_TYPE),c.defines.push(D$V.SILHOUETTE_SELECT_TYPE)),(n._operationType&_0x27a6bb.CLIP)===_0x27a6bb.CLIP&&c.defines.push(D$V.CLIP_FILT_BY_ID),n._PBRMaterialType!==Xe$e.NONE&&(u.defines.push(D$V.PBR),c.defines.push(D$V.PBR)),n._flattening&&(u.defines.push(D$V.FALTTEN),r.floatingPointTexture&&u.defines.push(D$V.UseFloatTexture)),n._hasOverlay&&(u.defines.push(D$V.OVERLAY),c.defines.push(D$V.OVERLAY));h=t.volTexture||t.volObj;if((!n._bVolume&&n._bUseHypColorTable||h&&n._bUseHypColorTable)&&(u.defines.push(D$V.COMPUTE_W_VALUE),c.defines.push(D$V.COMPUTE_W_VALUE),u.defines.push(D$V.HYPSOMETRIC),c.defines.push(D$V.HYPSOMETRIC),u.defines.push(D$V.VOL_AND_HYP),c.defines.push(D$V.VOL_AND_HYP)),n._hasEmissiveTexAtlas&&(u.defines.push(D$V.COMPUTE_W_VALUE),c.defines.push(D$V.COMPUTE_W_VALUE),u.defines.push(D$V.EMISSION_TEXTURE_ATLAS),c.defines.push(D$V.EMISSION_TEXTURE_ATLAS)),e$2e(n._categorieTexture)&&u.defines.push(D$V.W_VISIBLE),e$2e(n._vertexWeightMode)&&n._vertexWeightMode===_0x132759.EdgeLengthMin&&n._triangleFiltratePixel>0&&u.defines.push(D$V.TRIANGLE_FILTRATE),e$2e((_=t.vertexPackage).nCompressOptions))((m=_.nCompressOptions)&_0x64fca6.SVC_Vertex)==_0x64fca6.SVC_Vertex&&u.defines.push(D$V.COMPRESS_VERTEX),(m&_0x64fca6.SVC_Normal)==_0x64fca6.SVC_Normal&&u.defines.push(D$V.COMPRESS_NORMAL),((m&_0x64fca6.SVC_VertexColor)==_0x64fca6.SVC_VertexColor||"MESHOPT"===n._vertexCompressionType)&&u.defines.push(D$V.COMPRESS_COLOR),(m&_0x64fca6.SVC_TexutreCoord)==_0x64fca6.SVC_TexutreCoord&&(u.defines.push(D$V.COMPRESS_TEXCOORD),"MESHOPT"===n._vertexCompressionType&&u.defines.push("UINT_TEXCOORD0"));n._lastSelectSkeletonId>-1&&u.defines.push("HAS_SKELETONSELECTED"),(e$2e(n._imageryLayer)||n._needCoverImageryLayer)&&e$2e(i._imagerys)&&i._imagerys.length>0&&e$2e(t.attributeLocations.img)&&(u.defines.push("IMAGERY"),c.defines.push("IMAGERY")),n.partlyTransparent&&e$2e(t.materialPass._bTransparentSorting)&&c.defines.push("PARTLY_TRANSPARENT"),n._scene.pickPointEnabled&&(u.defines.push(D$V.VERTEX_CAPTURE),c.defines.push(D$V.VERTEX_CAPTURE));var p=e$2e(n.themeStyle)&&e$2e(n.themeStyle.pbrMaterialIndex);(t.materialPass._usePBR||n._usePBR||p)&&(c.defines.push(D$V.BRDF),t.context.textureFloatLinear&&c.defines.push("OES_texture_float_linear"),p&&(u.defines.push(D$V.PBR_THEME),c.defines.push(D$V.PBR_THEME),c.defines.push("NUM_PBR_MATERIALS "+e.pbrMaterialsArr.length)),(t.materialPass._baseColorTextureIndex>-1&&e$2e(t.materialPass.baseColorTexture)||e$2e(n._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture))&&t.hasTexCoord&&c.defines.push(D$V.HAS_BASE_TEXTURE),(t.materialPass._metallicRoughnessTextureIndex>-1&&e$2e(t.materialPass.metallicRoughnessTexture)||e$2e(n._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture))&&t.hasTexCoord&&c.defines.push(D$V.HAS_MetallicRoughness_TEXTURE),(t.materialPass._normalTextureIndex>-1&&e$2e(t.materialPass.normalTexture)||e$2e(n._PBRMaterialParams.pbrMetallicRoughness.normalTexture))&&t.hasTexCoord&&c.defines.push(D$V.HAS_NORMAL_TEXTURE),(t.materialPass._emissiveTextureIndex>-1&&e$2e(t.materialPass.emissiveTexture)||e$2e(n._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture))&&c.defines.push(D$V.HAS_EMISSIVE_TEXTURE),(t.materialPass._occlusionTextureIndex>-1||e$2e(n._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)&&n._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture instanceof t$U)&&t.hasTexCoord&&c.defines.push(D$V.HAS_OCCLUSION_TEXTURE),n._hasSnowEffect&&c.defines.push(D$V.HAS_SNOW),e$2e(n._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&n._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture&&n._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof t$U&&c.defines.push(D$V.HAS_RAIN),e$2e(t.materialPass._alphaMode)&&t.materialPass._alphaMode===_0x36a597.MASK&&c.defines.push(D$V.MASK),(e$2e(e.specularEnvironmentMaps)||e$2e(e.hdrEnvMap))&&(c.defines.push(D$V.IBL),e$2e(e.specularEnvironmentMaps)&&c.defines.push(D$V.KtxEnvMap)),i._isPBR=!0),n._PBRMaterialParams.pbrMetallicRoughness.emissionTextureIndex>0&&c.defines.push(D$V.SEC_TEX_EMISSION),n.visibleDistanceMax<6378137&&n.translucencyByDistance&&c.defines.push(D$V.VISIBLEDISTANCEMAX),e$2e(t.unFinalResolution)&&t.unFinalResolution&&(u.defines.push("FINAL_RESOLUTION_CLIP"),c.defines.push("FINAL_RESOLUTION_CLIP"));break;case p$T.ClampGroundPolygon:case p$T.ClampObjectPolygon:var _,m;if(e$2e((_=t.vertexPackage).clampRegionEdge))l="S3MTilesShadowVolumeFP_",u=new s$V({name:s="S3MTilesLineShadowVectex_",sources:[_0x48d945]}),c=new s$V({name:l,sources:[_0xfeefe2]});else{var g=t.materialPass._textures.length>0||t.hasSymbolTexture;l="S3MTilesShadowVolumeFP_",u=new s$V({name:s="S3MTilesRegionShadowVectex_",sources:[_0x5099e1]}),c=new s$V({name:l,sources:[_0x4a0943]}),g&&(u.defines.push("HAS_TEXTURE"),c.defines.push("HAS_TEXTURE"))}if(e$2e(_.nCompressOptions))((m=_.nCompressOptions)&_0x64fca6.SVC_Vertex)==_0x64fca6.SVC_Vertex&&u.defines.push(D$V.COMPRESS_VERTEX),(m&_0x64fca6.SVC_Normal)==_0x64fca6.SVC_Normal&&u.defines.push(D$V.COMPRESS_NORMAL),(m&_0x64fca6.SVC_TexutreCoord)==_0x64fca6.SVC_TexutreCoord&&u.defines.push(D$V.COMPRESS_TEXCOORD);break;case p$T.ExtendClampPolygonCache:l="S3MTilesShadowVolumeFP_",u=new s$V({name:s="S3MTilesExtendPolygonShadowVP_",sources:[_0xb2d90]}),c=new s$V({name:l,sources:[_0x4a0943]});break;case p$T.ClampGroundLine:l="S3MTilesClampGroundLineFP_",u=new s$V({name:s="S3MTilesClampGroundLineVectex_",sources:[_0x4faa00]}),c=new s$V({name:l,sources:[_0x4a0943]});break;case p$T.ClampGroundAndObjectLineCache:l="S3MTilesShadowVolumeFP_",u=new s$V({name:s="S3MTilesLineShadowVectex_",sources:[_0x48d945]}),c=new s$V({name:l,sources:[_0xfeefe2]});break;case p$T.ClampObjectLine:l="S3MTilesShadowVolumeFP_",u=new s$V({name:s="S3MTilesLineShadowVectex_",sources:[_0x4faa00]}),c=new s$V({name:l,sources:[_0x4a0943]});break;case p$T.IconPoint:a.billboardMode===yr$2.FixedZ?u=new s$V({name:s="BillboardAxialVp_",sources:[_0x258e9c]}):a.billboardMode===yr$2.FixedXYZ?u=new s$V({name:s="BillboardPixelSizeWithAngleVp_",sources:[_0xe606d6]}):u=new s$V({name:s="S3MTilesBillboardPixelSizeVp_",sources:[_0x43476e]}),c=new s$V({name:l="S3MTilesCommonOntTextureFP_",sources:[_0x357523]}),u.defines.push("ICON"),e$2e(a.fixedPixelSize)&&!a.fixedPixelSize&&u.defines.push("EYE_DISTANCE_SCALING"),n._clipping&&c.defines.push("CLIP"),n._section&&c.defines.push("CLIPPLANE"),t.hasNormal&&!t.ignoreNormal&&(u.defines.push(D$V.HAS_NORMAL),c.defines.push(D$V.HAS_NORMAL)),t.hasTexCoord2&&u.defines.push(D$V.TEXCOORD2);break;case p$T.Text:s="S3MTilesBillboardPixelSizeVp_",u=a.billboardMode===yr$2.FixedXYZ?new s$V({name:s,sources:[_0xe606d6]}):new s$V({name:s,sources:[_0x43476e]}),t.materialPass._textures.length>1?c=new s$V({name:l="S3MTilesFontWithHaloFp_",sources:[_0xf44c9d]}):t.materialPass._textures.length>0?c=new s$V({name:l="S3MTilesCommonOntTextureFP_",sources:[_0x357523]}):c=new s$V({name:l="S3MTilesCommonOneTextureFP_",sources:[_0x357523]}),n._clipping&&c.defines.push("CLIP"),t.layer._section&&c.defines.push("CLIPPLANE"),t.hasNormal&&!t.ignoreNormal&&(u.defines.push(D$V.HAS_NORMAL),c.defines.push(D$V.HAS_NORMAL)),t.hasTexCoord2&&(u.defines.push(D$V.TEXCOORD2),c.defines.push(D$V.TEXCOORD2));break;case p$T.ExtendRegion3D:l="DynamicExtendRegionFp_",u=new s$V({name:s="DynamicExtendRegionVp_",sources:[_0x1dd94]}),c=new s$V({name:l,sources:[_0x507f80]}),t.materialPass._textures.length>0&&c.defines.push("HAS_TEXTURE"),n._hasLight&&(u.defines.push(D$V.HAS_LIGHT),c.defines.push(D$V.HAS_LIGHT));break;case p$T.RegionEffect:l="RegionMaterialFp_",u=new s$V({name:s="RegionMaterialVp_",sources:[_0x33ffa2]}),c=new s$V({name:l,sources:[_0x3c68b9]}),n._clipping&&c.defines.push("CLIP"),n._hasExcavation&&(u.defines.push(D$V.EXCAVATION),c.defines.push(D$V.EXCAVATION)),n._hasServerExcavation&&(u.defines.push("SERVEREXCAVATION"),c.defines.push("SERVEREXCAVATION"));break;case p$T.PolylineEffect:l="PolylineFp_",u=new s$V({name:s="PolylineVp_",sources:[_0x1568b2]}),c=new s$V({name:l,sources:[_0x501956]}),n._clipping&&c.defines.push("CLIP"),n._hasExcavation&&(u.defines.push(D$V.EXCAVATION),c.defines.push(D$V.EXCAVATION)),n._hasServerExcavation&&(u.defines.push("SERVEREXCAVATION"),c.defines.push("SERVEREXCAVATION"));break;case p$T.ClampGroundRealtimeRasterCache:c=new s$V({name:l="S3MTilesFragmentRaster_",sources:[_0xb37562]}),u=new s$V({name:s="S3MTilesVectexRaster_",sources:[_0x903893]}),n._selectColorType===Zr$3.REPLACE&&(u.defines.push(D$V.REPLACE_SELECT_TYPE),c.defines.push(D$V.REPLACE_SELECT_TYPE)),(t.hasSymbolTexture||t.materialPass._textures.length>0)&&(u.defines.push(D$V.TEXCOORD),c.defines.push(D$V.TEXCOORD))}(t.fileType===p$T.ClampGroundRealtimeRasterCache&&t.hasTexCoord2&&(e$2e(n._polylineEffectUbo)||(n._polylineEffectUbo=new _0x8dd7b2(n)),l="PolylineFp_",u=new s$V({name:s="PolylineVp_",sources:[_0x4bddb0]}),c=new s$V({name:l,sources:[_0x501956]})),t.hasTexCoord&&(u.defines.push(D$V.TEXCOORD),c.defines.push(D$V.TEXCOORD)),t.hasTexCoord2&&(u.defines.push(D$V.TEXCOORD2),c.defines.push(D$V.TEXCOORD2)),n.horizontalline&&(u.defines.push(D$V.COMPUTE_W_VALUE),c.defines.push(D$V.COMPUTE_W_VALUE),c.defines.push(D$V.HORIZONTAL_LINE)),n._transparentBackColorTolerance>0&&c.defines.push(D$V.TRANSPARENT_BACK_COLOR),(n.swipeEnabled||n.splitDirection!==_0x2d4a08.NONE)&&c.defines.push(D$V.APPLY_SWIPE),"MESHOPT"===n._vertexCompressionType?u.defines.push("MeshOPT_Compress"):"DRACO"===n._vertexCompressionType&&u.defines.push("DRACO_Compress"),e$2e(t.vertexPackage.customVertexAttribute)&&e$2e(t.vertexPackage.customVertexAttribute.TextureCoordMatrix)&&u.defines.push("USE_TextureCoordMatrix"),e$2e(t.vertexPackage.customVertexAttribute)&&e$2e(t.vertexPackage.customVertexAttribute.VertexWeight)&&u.defines.push("USE_VertexWeight"),i._bMultiTemporalWeight&&(u.defines.push("MultiTemporalWeight"),c.defines.push("MultiTemporalWeight"),n.temporalSetting.changeZValue&&u.defines.push("ChangeZValue")),e$2e(e.lightSource))&&(c.defines.push("MAX_POINT_LIGHT_COUNT "+s$J.MaxPointLightCount),c.defines.push("MAX_SPOT_LIGHT_COUNT "+s$J.MaxSpotLightCount),c.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$J.MaxDirectionLightCount),e.lightSource.directionalLight.length>0&&c.defines.push(D$V.HAS_DIR_LIGHTS),e.lightSource._visibleLightList[_0x4970c2.POINT].length>0&&c.defines.push(D$V.HAS_POINT_LIGHTS),e.lightSource._visibleLightList[_0x4970c2.SPOT].length>0&&c.defines.push(D$V.HAS_SPOT_LIGHTS),e.lightSource.hemisphereLight.length>0&&c.defines.push(D$V.HAS_HEMISPHERE_LIGHTS));if(n._hasExcavation&&(u.defines.push(D$V.EXCAVATION),c.defines.push(D$V.EXCAVATION)),n._hasServerExcavation&&(u.defines.push("SERVEREXCAVATION"),c.defines.push("SERVEREXCAVATION")),t.hasInstanceSkeletonMatrix&&u.defines.push(D$V.UseInstanceSkeletonMatrix),n.mixColorType===_0x2b839f.REPLACE&&(u.defines.push(D$V.REPLACE_COLOR_TYPE),c.defines.push(D$V.REPLACE_COLOR_TYPE)),t.hasVertexColor&&u.defines.push("VertexColor"),t.isInstanceModel&&u.defines.push("InstanceModel"),t.hasTranslation&&u.defines.push(D$V.Translation),1===t.primitiveType&&(u.defines.push(D$V.POINT),c.defines.push(D$V.POINT)),2===t.primitiveType&&c.defines.push(D$V.LineVector),t.materialPass._RGBTOBGR&&c.defines.push(D$V.RGBTOBGR),n.enableFusion&&u.defines.push(D$V.FusionMode),e$2e(i._batchTable)&&(u.defines.push("BatchTable"),i._batchTable.hasMultiRow()&&u.defines.push("BatchTableMultiRow")),e$2e(n._floodFlagTexture)&&(u.defines.push(D$V.FLOOD_ANALYSIS),c.defines.push(D$V.FLOOD_ANALYSIS)),e$2e(i._batchTable)){for(var x=[f=i._batchTable.getVertexShaderCallback(o)(u.sources[0])],y=1;y<u.sources.length;y++)x.push(u.sources[y]);u=new s$V({name:s,defines:u.defines,sources:x,useWGSL:o})}return e$2e(n._effect)&&1===n._effect._type&&u.defines.push("POLYLINE_DASH"),e$2e(n._associateMaterialUrl)&&i._material.isAssociateMaterial&&c.defines.push("BaseColorReplace"),o&&(u.defines.push("WEBGPU"),c.defines.push("WEBGPU")),3===t.nVertexDim&&u.defines.push(D$V.HypColorByZValue),i._specularEnvironmentMaps=e.specularEnvironmentMaps,i._hdrEnvMap=e.hdrEnvMap,i._createImageryShader(n,c),r$14.fromCache({context:t.context,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:t.attributeLocations,useWGSL:o})},_0x273cff.createWaterShaderProgram=function(e,t,i,n){var r=new s$V({name:"FresnelVp",sources:[_0x5854b2]}),o=new s$V({name:"FresnelFp",sources:[_0x120def]});return t._clipping&&o.defines.push("CLIP"),t._section&&o.defines.push("CLIPPLANE"),e$2e(n._batchTable)&&(r.defines.push("BatchTable"),n._batchTable.hasMultiRow()&&r.defines.push("BatchTableMultiRow")),e$2e(t._rsColor.polygonOffset)&&t._rsColor.polygonOffset.enabled&&o.defines.push("POLYGON_OFFSET"),t._hasExcavation&&(r.defines.push(D$V.EXCAVATION),o.defines.push(D$V.EXCAVATION)),t._hasServerExcavation&&(r.defines.push("SERVEREXCAVATION"),o.defines.push("SERVEREXCAVATION")),(t.swipeEnabled||t.splitDirection!==_0x2d4a08.NONE)&&o.defines.push(D$V.APPLY_SWIPE),e$2e(t._effect)&&1===t._effect._type&&r.defines.push("POLYLINE_DASH"),r$14.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:i})},_0x273cff.createMultiTemporalWaterShaderProgram=function(e,t,i,n,r){var o=new s$V({name:"S3MTilesVectex",sources:[e.webgpu?_0x36d142:_0x359ef7]}),a=new s$V({name:"MultiTemporalFresnelFp",sources:[_0x3489f1]});return e$2e(n._batchTable)&&(o.defines.push("BatchTable"),n._batchTable.hasMultiRow()&&o.defines.push("BatchTableMultiRow")),e$2e(r.vertexPackage.customVertexAttribute)&&e$2e(r.vertexPackage.customVertexAttribute.VertexWeight)&&o.defines.push("USE_VertexWeight"),n._bMultiTemporalWeight&&(o.defines.push("MultiTemporalWeight"),a.defines.push("MultiTemporalWeight"),t.temporalSetting.changeZValue&&o.defines.push("ChangeZValue")),t.multiTemporalUseWater&&(o.defines.push(D$V.COMPUTE_W_VALUE),a.defines.push(D$V.COMPUTE_W_VALUE),o.defines.push(D$V.HYPSOMETRIC),a.defines.push(D$V.HYPSOMETRIC),o.defines.push(D$V.VOL_AND_HYP),a.defines.push(D$V.VOL_AND_HYP)),r$14.fromCache({context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:i})};var _0x55498e=(_0x133721=!0,function(e,t){var i=_0x133721?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x133721=!1,i}),_0x442d00=_0x55498e(void 0,(function(){return _0x442d00.toString().search("(((.+)+)+)+$").toString().constructor(_0x442d00).search("(((.+)+)+)+$")})),_0x133721;_0x442d00();var _0x5adff0=function(){this.model=void 0,this.frameState=void 0,this.layer=void 0};function o$U(){this._fProgress=0,this._nLocation=-1,this._changeZValue=!0}_0x5adff0.prototype.set=function(e,t,i){this.frameState=e,this.layer=t,this.model=i},_0x5adff0.prototype.execute=function(){var e,t=this.frameState,i=t.context,n=this.model,r=this.layer,o=n._vertexPackage,a=o.attrLocation,s=r._fileType,l=n._arrIndexPackage&&n._arrIndexPackage[0];e$2e(n._material)?e=n._material:(e$2e(l)&&"string"==typeof l.materialCode&&(l.materialCode=l.materialCode.replace(/\0/,"")),e=e$2e(l)&&e$2e(l.materialCode)?n._mapPass[l.materialCode]:_0xf77618.Default);var u={};u.primitiveType=s===p$T.PointCloudFile?W$18.POINTS:e$2e(l)?l.primitiveType:W$18.TRIANGLES,u.context=i,u.fileType=s,u.layer=r,u.instanceMode=o.instanceMode,u.volObj=n._volObj,u.volTexture=n._volTexture,u.materialPass=e,u.attributeLocations=a,u.nVertexDim=n._vertexDim,u.vertexPackage=o,u.hasNormal=e$2e(a.aNormal)&&!r._ignoreNormal,u.hasTexCoord=e$2e(a.aTexCoord0),u.hasTexCoord2=e$2e(a.aTexCoord1),u.hasSymbolTexture=e$2e(n._symbolTextureUrl),u.hasInstanceSkeletonMatrix=e$2e(n._instanceSkeletonMatrix),u.hasVertexColor=e$2e(a.aColor),u.isInstanceModel=n._isInstanceModel,u.hasTranslation=n._idsTranslateMap.length>0,u.ignoreNormal=r.ignoreNormal,e$2e(r.waterEffectSet)?n._sp=_0x273cff.createWaterShaderProgram(i,r,a,n):r.multiTemporalUseWater?n._sp=_0x273cff.createMultiTemporalWaterShaderProgram(i,r,a,n,u):(n._sp=_0x273cff.createShaderProgram(t,u,n),r.LoadingPriority===_0x539352.UsePagedLodInfo&&(u.unFinalResolution=!0,n._spUnFinalResolution=_0x273cff.createShaderProgram(t,u,n)))},Object.defineProperties(o$U.prototype,{progress:{get:function(){return this._fProgress},set:function(e){this._fProgress=e}},location:{get:function(){return this._nLocation},set:function(e){this._nLocation=e}},changeZValue:{get:function(){return this._changeZValue},set:function(e){this._changeZValue=e}}}),o$U.clone=function(e,t){if(e$2e(e))return e$2e(t)||(t=new o$U),t._fTemporalPercentage=e._fTemporalPercentage,t._nTemporalPos=e._nTemporalPos,t};var _0x23d40a=(_0x183740=!0,function(e,t){var i=_0x183740?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x183740=!1,i}),_0x32df24=_0x23d40a(void 0,(function(){return _0x32df24.toString().search("(((.+)+)+)+$").toString().constructor(_0x32df24).search("(((.+)+)+)+$")})),_0x183740;_0x32df24();const _0x144e7a="uTexture",_0x3391b3="uSecTexture",_0x167570="batchTexture",_0x5cbc58="uPBRTexture",_0x417038="uBaseTexture",_0xbeac04="uNormalTexture",_0x4a928c="uMetallicRoughnessTexture",_0x1c6db2="uEmissionTexture",_0x162a35="uOcclusionTexture",_0x38e2e4="uSnowMaskTexture",_0x64912a="uSnowNormalTexture",_0x205d5d="uRippleTexture",_0x4a1693="batchTexture_baseTex",_0x56499d="batchTexture_bakeTex",_0x4117c3="u_dayTextures",_0x43c5c0=5;function _0x4f8f70(e,t,i){var n=_0x37a515.call(this)||this;n._ro=e,n._materialPass=t,n._layer=i,n._name=_0x2e0417.MATERIAL,n._context=i._context,n._uniformState=n._context.uniformState,n._textures={},n._dayTextures=[],n._textureDirtyFrameCount=-1,this._initUniformMap()}_0x37a515&&(_0x4f8f70.__proto__=_0x37a515),_0x4f8f70.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x4f8f70.prototype.constructor=_0x37a515,Object.defineProperties(_0x4f8f70.prototype,{}),_0x4f8f70.prototype._initUBOStruct=function(){this._ubo.addUniform("uTexMatrix",16),this._ubo.addUniform("uDiffuseColor",4),this._ubo.addUniform("uAmbientColor",4),this._ubo.addUniform("uSpecularColor",4),this._ubo.addUniform("uTexUVOffset",4),this._ubo.addUniform("uTextureDim",4),this._ubo.addUniform("uTextureWidths",2),this._ubo.addUniform("batchTextureStep_baseTex",4),this._ubo.addUniform("batchTextureDimensions_baseTex",2),this._ubo.addUniform("batchTextureStep_bakeTex",4),this._ubo.addUniform("batchTextureDimensions_bakeTex",2),this._ubo.addUniform("uBaseColorFactor",4),this._ubo.addUniform("uEmissiveFactor",4),this._ubo.addUniform("uEmissiveUVOffsetAndTiling",4),this._ubo.addUniform("uMetallicRoughnessIntensityScale",3),this._ubo.addUniform("uPBRTexWH",2),this._ubo.addUniform("uNormalTextureScale",1),this._ubo.addUniform("uAlphaMode",1),this._ubo.addUniform("uAlphaCutoff",1),this._ubo.addUniform("uPbrParTextureWidth",1)},_0x4f8f70.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())};var _0x5a7513=new e$2c;_0x4f8f70.prototype._updateTexUVOffset=function(){_0x5a7513.x=0,_0x5a7513.y=0,_0x5a7513.z=1,_0x5a7513.w=1;var e=this._materialPass,t=this._layer,i=e._baseColorTextureMotion;if(e$2e(i)){var n=i.OffsetPeriod,r=i.OffsetSpeedU,o=i.OffsetSpeedV,a=i.TilingPeriod,s=i.TilingSpeedU,l=i.TilingSpeedV,u=performance.now()/1e3;if(n>0){var c=u%n;_0x5a7513.x=c*r,_0x5a7513.y=c*o}if(a>0){var h=u%a;_0x5a7513.z=1+h*s,_0x5a7513.w=1+h*l}}else if(e$2e(t._textureUVSpeed)&&(0!==t._textureUVSpeed.x||0!==t._textureUVSpeed.y)){var d=performance.now()/1e3;_0x5a7513.x=t._textureUVSpeed.x*d,_0x5a7513.y=t._textureUVSpeed.y*d}this._ubo.updateFloat4("uTexUVOffset",_0x5a7513.x,_0x5a7513.y,_0x5a7513.z,_0x5a7513.w)},_0x4f8f70.prototype._updateEmissiveUVOffsetAndTiling=function(){const e=this._materialPass,t=this._layer._PBRMaterialParams.pbrMetallicRoughness;_0x5a7513.x=0,_0x5a7513.y=0,_0x5a7513.z=1,_0x5a7513.w=1;const i=u$Z(e._emissiveTextureMotion,t.emissiveTextureMotion);if(e$2e(i)){var n=performance.now()/1e3,r=i.OffsetPeriod,o=i.OffsetSpeedU,a=i.OffsetSpeedV,s=i.TilingPeriod,l=i.TilingSpeedU,u=i.TilingSpeedV;if(i&&r>0){var c=n%r;_0x5a7513.x=c*o,_0x5a7513.y=c*a}if(i&&s>0){var h=n%s;_0x5a7513.z=1+h*l,_0x5a7513.w=1+h*u}}this._ubo.updateFloat4("uEmissiveUVOffsetAndTiling",_0x5a7513.x,_0x5a7513.y,_0x5a7513.z,_0x5a7513.w)},_0x4f8f70.prototype._updateTextureBatchTable=function(){const e=this._ubo,t=this._materialPass,i=t._batchTable;if(!e$2e(i))return;this._setTextureByType(_0x4a1693,i._texture);const n=i._textureStep;e.updateFloat4("batchTextureStep_baseTex",n.x,n.y,n.z,n.w);const r=i._textureDimensions;e.updateFloat2("batchTextureDimensions_baseTex",r.x,r.y);const o=t._batchTableBake;if(!e$2e(o))return;this._setTextureByType(_0x56499d,o._texture);const a=o._textureStep;e.updateFloat4("batchTextureStep_bakeTex",a.x,a.y,a.z,a.w);const s=o._textureDimensions;e.updateFloat2("batchTextureDimensions_bakeTex",s.x,s.y)};var _0x4afe12=new o$1p;_0x4f8f70.prototype._updateMetallicRoughnessIntensityScale=function(){var e=this._materialPass,t=this._layer;_0x4afe12.x=u$Z(e._metallicFactor,t._PBRMaterialParams.pbrMetallicRoughness.metallicFactor),_0x4afe12.y=u$Z(e._roughnessFactor,t._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor),_0x4afe12.z=1,e$2e(e._intensityScale)&&e._intensityScale>0?_0x4afe12.z=e._intensityScale:e$2e(t._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&t._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0&&(_0x4afe12.z=t._PBRMaterialParams.pbrMetallicRoughness.intensityScale),this._ubo.updateFloat3("uMetallicRoughnessIntensityScale",_0x4afe12.x,_0x4afe12.y,_0x4afe12.z)};var _0x4e0631=new o$1o;_0x4f8f70.prototype._updateTextureWidths=function(){var e=this._materialPass;e$2e(e.baseColorTexture)?this._ubo.updateFloat2("uTextureWidths",e.baseColorTexture.width,e.baseColorTexture.height):(e$2e(e._textures[0])?_0x4e0631.x=e._textures[0].width:_0x4e0631.x=1,e$2e(e._textures[1])?_0x4e0631.y=e._textures[1].width:_0x4e0631.y=1,this._ubo.updateFloat2("uTextureWidths",_0x4e0631.x,_0x4e0631.y))};var _0x1f8b4e=new e$2c;_0x4f8f70.prototype._updateBatchTextureWidths=function(){const e=this._materialPass;if(!e$2e(e._batchTable))return;let t=e._textures[0];t=t.renderable?t:e$2e(e._ancestorTexture)?e._ancestorTexture:t,_0x1f8b4e.x=t._width,_0x1f8b4e.y=t._height;let i=e._textures[1];e$2e(i)&&(i=i.renderable?i:e$2e(e._ancestorTextureBake)?e._ancestorTextureBake:i,_0x1f8b4e.z=i._width,_0x1f8b4e.w=i._height),this._ubo.updateFloat4("uTextureDim",_0x1f8b4e.x,_0x1f8b4e.y,_0x1f8b4e.z,_0x1f8b4e.w)},_0x4f8f70.prototype._updatePbrParTextureValue=function(){var e=this._materialPass,t=e.pbrParamTexture;this._ubo.updateFloat2("uPBRTexWH",t.width,t.height);let i=1;e$2e(e.baseColorTexture)?i=e.baseColorTexture.width:e$2e(e.normalTexture)?i=e.normalTexture.width:e$2e(e.metallicRoughnessTexture)?i=e.metallicRoughnessTexture.width:e$2e(e.emissiveTexture)&&(i=e.emissiveTexture.width),this._ubo.updateFloat("uPbrParTextureWidth",i)},_0x4f8f70.prototype._getFirstTexture=function(){var e;e$2e(this._ro._symbolTextureUrl)?e$2e(e=_0x1451be.getTexture(this._ro._symbolTextureUrl))?this._setTextureByType(_0x144e7a,e):this._setTextureByType(_0x144e7a,this._layer._context.defaultTexture):e$2e(this._materialPass._textures[0])?((e=this._materialPass._textures[0]).isTexBlock&&(e=e.renderable&&e.ready?e:e$2e(this._materialPass._ancestorTexture)?this._materialPass._ancestorTexture:e),this._setTextureByType(_0x144e7a,e)):this._setTextureByType(_0x144e7a,this._layer._context.defaultTexture)},_0x4f8f70.prototype._getSecTexture=function(){if(!(this._materialPass._textures.length<2)){var e=this._materialPass._textures[1];e.isTexBlock&&(e=e.renderable&&e.ready?e:e$2e(this._materialPass._ancestorTextureBake)?this._materialPass._ancestorTextureBake:this._layer._context.defaultTexture),this._setTextureByType(_0x3391b3,e)}},_0x4f8f70.prototype._getBaseColorTexture=function(){e$2e(this._materialPass._baseColorTextureIndex)&&this._materialPass._baseColorTextureIndex>-1?this._setTextureByType(_0x417038,this._materialPass.baseColorTexture):this._setTextureByType(_0x417038,this._layer._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture)},_0x4f8f70.prototype._getNormalTexture=function(){if(e$2e(this._materialPass._normalTextureIndex)&&this._materialPass._normalTextureIndex>-1)return this._materialPass.normalTexture?void this._setTextureByType(_0xbeac04,this._materialPass.normalTexture):void this._setTextureByType(_0xbeac04,this._materialPass._textures[this._materialPass._normalTextureIndex]);this._setTextureByType(_0xbeac04,this._layer._PBRMaterialParams.pbrMetallicRoughness.normalTexture)},_0x4f8f70.prototype._getEmissiveTexture=function(){if(e$2e(this._materialPass.emissiveTexture))this._setTextureByType(_0x1c6db2,this._materialPass.emissiveTexture);else{var e=this._materialPass._emissiveTextureIndex;e>-1&&e$2e(this._materialPass._textures[e])?this._setTextureByType(_0x1c6db2,this._materialPass._textures[e]):this._setTextureByType(_0x1c6db2,this._layer._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture)}},_0x4f8f70.prototype._getMetalicRoughnessTexture=function(){if(e$2e(this._materialPass._metallicRoughnessTextureIndex)&&this._materialPass._metallicRoughnessTextureIndex>-1)return e$2e(this._materialPass.metallicRoughnessTexture)?void this._setTextureByType(_0x4a928c,this._materialPass.metallicRoughnessTexture):void this._setTextureByType(_0x4a928c,this._materialPass._textures[this._materialPass._metallicRoughnessTextureIndex]);e$2e(this._layer._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture)&&this._layer._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture instanceof t$U?this._setTextureByType(_0x4a928c,this._layer._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture):this._setTextureByType(_0x4a928c,this._context.defaultTexture)},_0x4f8f70.prototype._getOcclusionTexture=function(){if(e$2e(this._materialPass._occlusionTextureIndex)&&this._materialPass._occlusionTextureIndex>-1)return this._materialPass.occlusionTexture?void this._setTextureByType(_0x162a35,this._materialPass.occlusionTexture):e$2e(this._materialPass._textures[this._materialPass._occlusionTextureIndex])?void this._setTextureByType(_0x162a35,this._materialPass._textures[this._materialPass._occlusionTextureIndex]):void this._setTextureByType(_0x162a35,this._layer._context.defaultTexture);this._setTextureByType(_0x162a35,this._layer._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)},_0x4f8f70.prototype._getSnowMaskTexture=function(){this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect&&this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture instanceof t$U?this._setTextureByType(_0x38e2e4,this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture):this._setTextureByType(_0x38e2e4,this._context.defaultTexture)},_0x4f8f70.prototype._getSnowNormalTexture=function(){this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect&&this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture instanceof t$U?this._setTextureByType(_0x64912a,this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture):this._setTextureByType(_0x64912a,this._context.defaultTexture)},_0x4f8f70.prototype._getRippleTexture=function(){this._layer._PBRMaterialParams.pbrMetallicRoughness.rainEffect&&this._layer._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof t$U?this._setTextureByType(_0x205d5d,this._layer._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture):this._setTextureByType(_0x205d5d,this._context.defaultTexture)},_0x4f8f70.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x4f8f70.prototype._isBatchTextureRenderable=function(){const e=this._materialPass;if(!e$2e(e._batchTable))return!1;let t=e._textures[0];if(!e$2e(t))return!1;let i=t.renderable,n=e._textures[1];return e$2e(n)&&(i=i&&n.renderable),!i},_0x4f8f70.prototype.update=function(e){if(!e.webgpu&&!e.webgl2||!this._isValueDirty)return;var t=this._ro;this._isTextureDirty=!1,e$2e(this._ubo)||this._initUBO(e);var i=this._materialPass,n=this._layer;_0x37a515.writeMatrix4ToUBO("uTexMatrix",this._ubo,i._texMatrix),_0x37a515.writeColorToUBO("uDiffuseColor",this._ubo,i._diffuseColor),_0x37a515.writeColorToUBO("uAmbientColor",this._ubo,i._ambientColor),_0x37a515.writeColorToUBO("uSpecularColor",this._ubo,i._specularColor);var r=i._baseColor||n._PBRMaterialParams.pbrMetallicRoughness.baseColor;e$2e(r.x)?_0x37a515.writeCartesian4ToUBO("uBaseColorFactor",this._ubo,r):e$2e(r.red)&&_0x37a515.writeColorToUBO("uBaseColorFactor",this._ubo,r);var o=i._emissiveFactor||n._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor;e$2e(o.x)?this._ubo.updateFloat4("uEmissiveFactor",o.x,o.y,o.z,o.w):e$2e(o.red)&&this._ubo.updateFloat4("uEmissiveFactor",o.red,o.green,o.blue,o.alpha),e$2e(i.pbrParamTexture)&&this._updatePbrParTextureValue(),this._ubo.updateFloat("uNormalTextureScale",1);var a=1;switch(i._alphaMode){case"opaque":a=1;break;case"mask":a=2;break;case"blend":a=3}this._ubo.updateFloat("uAlphaMode",a),this._ubo.updateFloat("uAlphaCutoff",u$Z(i._alphaCutoff,0)),this._updateMetallicRoughnessIntensityScale(),this._updateTexUVOffset(),this._updateBatchTextureWidths(),this._updateTextureWidths(),this._updateEmissiveUVOffsetAndTiling(),this._updateTextureBatchTable(),this._ubo.update(),this._getFirstTexture(),this._getSecTexture(),e$2e(this._ro._batchTable)&&this._setTextureByType(_0x167570,this._ro._batchTable._texture),this._setTextureByType(_0x5cbc58,this._materialPass.pbrParamTexture),this._getBaseColorTexture(),this._getNormalTexture(),this._getMetalicRoughnessTexture(),this._getEmissiveTexture(),this._getOcclusionTexture(),this._getSnowMaskTexture(),this._getSnowNormalTexture(),this._getRippleTexture();const s=u$Z(i._emissiveTextureMotion,n._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion);var l=e$2e(n._textureUVSpeed)&&(0!==n._textureUVSpeed.x||0!==n._textureUVSpeed.y);l=l||e$2e(s)&&(s.OffsetPeriod>0||s.TilingPeriod>0||e$2e(this._materialPass._baseColorTextureMotion)),this._isValueDirty=l||this._isBatchTextureRenderable(),e$2e(t._dayTextures)&&t._dayTextures.length>0&&(this._dayTextures!==t._dayTextures&&(this._isTextureDirty=!0),this._dayTextures=t._dayTextures)},_0x4f8f70.prototype._setTextureByType=function(e,t){var i=this._textures[e]!==t;i&&t.isTexBlock&&(this._textureDirtyFrameCount=0),this._textures[e]=t,this._isTextureDirty=this._isTextureDirty||i},_0x4f8f70.prototype._getTextureByType=function(e){return this._textures[e]},_0x4f8f70.prototype.setToEffect=function(e){(e.bindUniformBuffer(this._ubo.getBuffer(),this._name),e$2e(this._ro._batchTable))&&(this._textures[_0x167570]!==this._ro._batchTable._texture&&(this._textures[_0x167570]=this._ro._batchTable._texture));e$2e(this._ro._dayTextures)&&this._ro._dayTextures.length>0&&_0x37a515.setTextureArrayToEffect(e,this._dayTextures,_0x4117c3);for(const t in this._textures)this._setTextureToEffect(e,this._textures[t],t);this._textureDirtyFrameCount>=0?this._textureDirtyFrameCount>_0x43c5c0?(this._isTextureDirty=!1,this._textureDirtyFrameCount=-1):this._textureDirtyFrameCount++:this._isTextureDirty=!1};var _0x931668=new e$2c,_0x4d1ff9=new o$1o;_0x4f8f70.prototype._initUniformMap=function(){var e=this._context;if(!e.webgl2&&!e.webgpu){var t=this._materialPass,i=this._layer,n={uTexMatrix:function(){return t._texMatrix},uDiffuseColor:function(){return t._diffuseColor},uSpecularColor:function(){return t._specularColor},uAmbientColor:function(){return t._ambientColor},uTexUVOffset:function(){_0x5a7513.x=0,_0x5a7513.y=0,_0x5a7513.z=1,_0x5a7513.w=1;var e=t._baseColorTextureMotion;if(e$2e(e)){var n=e.OffsetPeriod,r=e.OffsetSpeedU,o=e.OffsetSpeedV,a=e.TilingPeriod,s=e.TilingSpeedU,l=e.TilingSpeedV,u=performance.now()/1e3;if(n>0){var c=u%n;_0x5a7513.x=c*r,_0x5a7513.y=c*o}if(a>0){var h=u%a;_0x5a7513.z=1+h*s,_0x5a7513.w=1+h*l}}else if(0!==i._textureUVSpeed.x||0!==i._textureUVSpeed.y){var d=performance.now()/1e3;_0x5a7513.x=i._textureUVSpeed.x*d,_0x5a7513.y=i._textureUVSpeed.y*d}return _0x5a7513},uTextureDim:function(){var e=t._textures[0].renderable?t._textures[0]:e$2e(t._ancestorTexture)?t._ancestorTexture:t._textures[0];if(_0x931668.x=e._width,_0x931668.y=e._height,e$2e(t._textures[1])){var i=t._textures[1].renderable?t._textures[1]:e$2e(t._ancestorTextureBake)?t._ancestorTextureBake:t._textures[1];_0x931668.z=i._width,_0x931668.w=i._height}return _0x931668},uTextureWidths:function(){return e$2e(t.baseColorTexture)?(_0x4d1ff9.x=t.baseColorTexture.width,_0x4d1ff9.y=t.baseColorTexture.height):(e$2e(t._textures[0])?_0x4d1ff9.x=t._textures[0].width:_0x4d1ff9.x=1,e$2e(t._textures[1])?_0x4d1ff9.y=t._textures[1].width:_0x4d1ff9.y=1),_0x4d1ff9},batchTextureStep_baseTex:function(){return t._batchTable._textureStep},batchTextureDimensions_baseTex:function(){return t._batchTable._textureDimensions},batchTextureStep_bakeTex:function(){return t._batchTableBake._textureStep},batchTextureDimensions_bakeTex:function(){return t._batchTableBake._textureDimensions},uBaseColorFactor:function(){return t._baseColor||i._PBRMaterialParams.pbrMetallicRoughness.baseColor},uEmissiveFactor:function(){return t._emissiveFactor||i._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},uEmissiveUVOffsetAndTiling:function(){var e=t._emissiveTextureMotion||i._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion,n=performance.now()/1e3,r=e.OffsetPeriod,o=e.OffsetSpeedU,a=e.OffsetSpeedV,s=e.TilingPeriod,l=e.TilingSpeedU,u=e.TilingSpeedV;if(e&&r>0){var c=n%r;_0x931668.x=c*o,_0x931668.y=c*a}else _0x931668.x=0,_0x931668.y=0;if(e&&s>0){var h=n%e._tilingPeriod;_0x931668.z=1+h*l,_0x931668.w=1+h*u}else _0x931668.z=1,_0x931668.w=1;return _0x931668},uMetallicRoughnessIntensityScale:function(){return _0x4afe12.x=u$Z(t._metallicFactor,i._PBRMaterialParams.pbrMetallicRoughness.metallicFactor),_0x4afe12.y=u$Z(t._roughnessFactor,i._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor),_0x4afe12.z=1,e$2e(t._intensityScale)&&t._intensityScale>0?_0x4afe12.z=t._intensityScale:e$2e(i._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&i._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0&&(_0x4afe12.z=i._PBRMaterialParams.pbrMetallicRoughness.intensityScale),_0x4afe12},uPBRTexWH:function(){var e=t.pbrParamTexture;return _0x4d1ff9.x=e.width,_0x4d1ff9.y=e.height,_0x4d1ff9},uNormalTextureScale:function(){return 1},uAlphaMode:function(){var e=1;switch(t._alphaMode){case"opaque":e=1;break;case"mask":e=2;break;case"blend":e=3}return e},uAlphaCutoff:function(){return u$Z(t._alphaCutoff,0)},uPbrParTextureWidth:function(){let e=1;return e$2e(t.baseColorTexture)?e=t.baseColorTexture.width:e$2e(t.normalTexture)?e=t.normalTexture.width:e$2e(t.metallicRoughnessTexture)?e=t.metallicRoughnessTexture.width:e$2e(t.emissiveTexture)&&(e=t.emissiveTexture.width),e}};this._uniformMap=n}},_0x4f8f70.prototype.isDestroyed=function(){return!1},_0x4f8f70.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};var _0x735bb6=(_0xd41f26=!0,function(e,t){var i=_0xd41f26?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd41f26=!1,i}),_0x35f977=_0x735bb6(void 0,(function(){return _0x35f977.toString().search("(((.+)+)+)+$").toString().constructor(_0x35f977).search("(((.+)+)+)+$")})),_0xd41f26;function _0x35e02f(e){var t=_0x37a515.call(this)||this;t._ro=e,t._name=_0x2e0417.MESH,this._initUniformMap()}_0x35f977(),_0x37a515&&(_0x35e02f.__proto__=_0x37a515),_0x35e02f.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x35e02f.prototype.constructor=_0x37a515,Object.defineProperties(_0x35e02f.prototype,{}),_0x35e02f.prototype._initUBOStruct=function(){this._ubo.addUniform("uModelMatrix",16),this._ubo.addUniform("uGeoMatrix",16),this._ubo.addUniform("batchTextureStep",4),this._ubo.addUniform("batchTextureDimensions",2),this._ubo.addUniform("decode_texCoord0_min",2),this._ubo.addUniform("decode_texCoord1_min",2),this._ubo.addUniform("decode_texCoord0_vNormConstant",3),this._ubo.addUniform("decode_texCoord1_vNormConstant",3),this._ubo.addUniform("decode_position_min",4),this._ubo.addUniform("decode_position_normConstant",1),this._ubo.addUniform("normal_rangeConstant",1),this._ubo.addUniform("uInverseGeoMatrix",16),this._ubo.addUniform("uSkeletonMatrix",16),this._ubo.addUniform("uSkeletonCount",1),this._ubo.addUniform("uImgTextureBound",2),this._ubo.addUniform("uImgTextureAlpha",1),this._ubo.addUniform("fMultiTemporalFactor",1),this._ubo.addUniform("uSouthWest",3),this._ubo.addUniform("uNorthDir",3),this._ubo.addUniform("uEastDir",3),this._ubo.addUniform("textureRepeat",2)},_0x35e02f.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,_0x2e0417.MESH,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,_0x2e0417.MESH,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x35e02f.prototype._updateImageryValue=function(){const e=this._ubo,t=this._ro,i=t._layer,n=t._imageryTextureBound;let r=1;const o=i._imageryLayer;Array.isArray(o)&&(r=o[o.length-1].alpha),o.show||(r=0),r=o.alpha,e.updateFloat2("uImgTextureBound",n.x,n.y),e.updateFloat("uImgTextureAlpha",r)};var _0xfe74cf=new Float32Array(16),_0x2650e2=new Matrix;_0x35e02f.prototype.update=function(e){if(!e.webgpu&&!e.webgl2||(e$2e(this._ubo)||this._initUBO(e),!this._isValueDirty))return;var t=this._ro;const i=t._layer;var n=t._vertexPackage;const r=i._fileType===p$T.ClampGroundRealtimeRasterCache&&!e$2e(t._attributeLocations.aTexCoord1);if(e$2e(t._relativeModelMatrix)&&(p$1d.toArray(t._relativeModelMatrix,_0xfe74cf),Matrix.FromArrayToRef(_0xfe74cf,0,_0x2650e2),this._ubo.updateMatrix("uModelMatrix",_0x2650e2)),e$2e(t._geoMatrix)&&(p$1d.toArray(t._geoMatrix,_0xfe74cf),Matrix.FromArrayToRef(_0xfe74cf,0,_0x2650e2),this._ubo.updateMatrix("uGeoMatrix",_0x2650e2)),e$2e(n)){var o=n.minTexCoordValue;o&&o.length>0&&(this._ubo.updateFloat2("decode_texCoord0_min",n.minTexCoordValue[0].x,n.minTexCoordValue[0].y),this._ubo.updateFloat2("decode_texCoord1_min",n.minTexCoordValue[1].x,n.minTexCoordValue[1].y));var a=n.texCoordCompressConstant;if(a&&a.length>0){var s=n.texCoordCompressConstant[0],l=n.texCoordCompressConstant[1];this._ubo.updateFloat3("decode_texCoord0_vNormConstant",s.x,s.y,s.z),this._ubo.updateFloat3("decode_texCoord1_vNormConstant",l.x,l.y,l.z)}var u=n.minVerticesValue,c=n.vertCompressConstant,h=n.normalRangeConstant;e$2e(n.minVerticesValue)&&this._ubo.updateFloat4("decode_position_min",u.x,u.y,u.z,u.w),e$2e(n.vertCompressConstant)&&this._ubo.updateFloat("decode_position_normConstant",c),e$2e(n.normalRangeConstant)&&this._ubo.updateFloat("normal_rangeConstant",h)}if(e$2e(t._batchTable)){var d=t._batchTable._textureStep;this._ubo.updateFloat4("batchTextureStep",d.x,d.y,d.z,d.w);var f=t._batchTable._textureDimensions;this._ubo.updateFloat2("batchTextureDimensions",f.x,f.y)}i._flattening&&(p$1d.toArray(t._inverseGeoMatrix,_0xfe74cf),Matrix.FromArrayToRef(_0xfe74cf,0,_0x2650e2),this._ubo.updateMatrix("uInverseGeoMatrix",_0x2650e2)),e$2e(t._instanceSkeletonMatrix)&&(p$1d.toArray(t._instanceSkeletonMatrix,_0xfe74cf),Matrix.FromArrayToRef(_0xfe74cf,0,_0x2650e2),this._ubo.updateMatrix("uSkeletonMatrix",_0x2650e2)),t._isInstanceModel&&this._ubo.updateFloat("uSkeletonCount",t.skeletonCount),e$2e(i._imageryLayer)&&e$2e(t._attributeLocations.img)&&this._updateImageryValue(),t._bMultiTemporalWeight&&this._ubo.updateFloat("fMultiTemporalFactor",t._fMultiTemporalFactor),t._isClamp&&i._fileType===p$T.ClampGroundPolygon&&(this._ubo.updateVector3("uSouthWest",t._southWestCorner),this._ubo.updateVector3("uNorthDir",t._northVector),this._ubo.updateVector3("uEastDir",t._eastVector)),r&&this._ubo.updateFloat2("textureRepeat",t._symbolTextureRepeat.x,t._symbolTextureRepeat.y),this._ubo.update(),this._isValueDirty=t._bMultiTemporalWeight},_0x35e02f.prototype._initUniformMap=function(){var e=this._ro;const t=e._layer;var i=t._context;if(!i.webgl2&&!i.webgpu){var n={},r=e._vertexPackage,o=r.nCompressOptions;n.uModelMatrix=function(){return e._relativeModelMatrix},n.uGeoMatrix=function(){return e._geoMatrix},(o&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex&&(n.decode_position_min=function(){return r.minVerticesValue},n.decode_position_normConstant=function(){return r.vertCompressConstant}),(o&_0x64fca6.SVC_Normal)===_0x64fca6.SVC_Normal&&(n.normal_rangeConstant=function(){return r.normalRangeConstant}),(o&_0x64fca6.SVC_TexutreCoord)===_0x64fca6.SVC_TexutreCoord&&(r.texCoordCompressConstant.length>0&&(n.decode_texCoord0_min=function(){return r.minTexCoordValue[0]},n.decode_texCoord0_normConstant=function(){return r.texCoordCompressConstant[0]},n.decode_texCoord0_vNormConstant=function(){return r.texCoordCompressConstant[0]}),r.texCoordCompressConstant.length>1&&(n.decode_texCoord1_min=function(){return r.minTexCoordValue[1]},n.decode_texCoord1_normConstant=function(){return r.texCoordCompressConstant[1]},n.decode_texCoord1_vNormConstant=function(){return r.texCoordCompressConstant[1]})),n.batchTextureStep=function(){return e._batchTable._textureStep},n.batchTextureDimensions=function(){return e._batchTable._textureDimensions},n.uInverseGeoMatrix=function(){return e._inverseGeoMatrix},n.uSkeletonMatrix=function(){return e._instanceSkeletonMatrix},n.uSkeletonCount=function(){return e.skeletonCount},n.fMultiTemporalFactor=function(){return e._fMultiTemporalFactor},n.uSouthWest=function(){return e._southWestCorner},n.uNorthDir=function(){return e._northVector},n.uEastDir=function(){return e._eastVector},n.textureRepeat=function(){return e._symbolTextureRepeat},n.uImgTextureBound=function(){return e._imageryTextureBound},n.uImgTextureAlpha=function(){return e$2e(t._imageryLayer)?t._imageryLayer instanceof Array?t._imageryLayer[t._imageryLayer.length-1].alpha:t._imageryLayer.show&&e._showImagerysImmediate?t._imageryLayer.alpha:0:1},this._uniformMap=n}},_0x35e02f.prototype.isDestroyed=function(){return!1},_0x35e02f.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};const _0x40b74d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x52a969=_0x40b74d(void 0,(function(){return _0x52a969.toString().search("(((.+)+)+)+$").toString().constructor(_0x52a969).search("(((.+)+)+)+$")}));_0x52a969();const _0x163288="uVolumeTexture";function _0x1f4c64(e){var t=_0x37a515.call(this)||this;t._ro=e,t._name=_0x2e0417.S3MVolume,t._textures={},this._initUniformMap()}_0x37a515&&(_0x1f4c64.__proto__=_0x37a515),_0x1f4c64.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x1f4c64.prototype.constructor=_0x37a515,Object.defineProperties(_0x1f4c64.prototype,{}),_0x1f4c64.prototype._updateVolumeValue=function(){const e=this._ubo,t=this._ro,i=t._layer,n=t._volObj;e$2e(n)&&(e.updateFloat("uVolSideBlockCount",n.nSideBlockCount),e.updateFloat("uVolBlockLength",n.nBlockLength),e.updateFloat("uVolTexLength",n.nLength),e.updateFloat("uVolWidth",n.nWidth),e.updateFloat("uVolHeight",n.nHeight),e.updateFloat("uVolDepth",n.nDepth));let r=0;const o=i._hypsometricSetting;e$2e(o)&&o.filterMode===k$S.FilterMode.NEAREST&&(r=1);const a=n.nFormat;let s=0;e$2e(a)&&(3200===a?s=0:e$2e(o)?o.filterMode===k$S.FilterMode.LINEAR&&(s=0):s=1),e.updateFloat("uVolFilterMode",r),e.updateFloat("uVolumeType",s)},_0x1f4c64.prototype._initUBOStruct=function(){this._ubo.addUniform("uVolSideBlockCount",1),this._ubo.addUniform("uVolBlockLength",1),this._ubo.addUniform("uVolTexLength",1),this._ubo.addUniform("uVolWidth",1),this._ubo.addUniform("uVolHeight",1),this._ubo.addUniform("uVolDepth",1),this._ubo.addUniform("uVolFilterMode",1),this._ubo.addUniform("uVolumeType",1)},_0x1f4c64.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x1f4c64.prototype.update=function(e){if(!e.webgpu&&!e.webgl2||(e$2e(this._ubo)||this._initUBO(e),!this._isValueDirty))return;var t=this._ro;const i=t._layer;var n;(e$2e(t._volObj)||e$2e(t._volTexture))&&this._updateVolumeValue(),this._ubo.update(),this._isValueDirty=!1,n="png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt?t._volTexture:t._volObj.volTexture,this._isLayerTextureChanged(_0x163288,n)},_0x1f4c64.prototype._isLayerTextureChanged=function(e,t){this._isTextureDirty=this._textures[e]!==t,this._textures[e]=t},_0x1f4c64.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name);for(const t in this._textures)this._setTextureToEffect(e,this._textures[t],t)},_0x1f4c64.prototype._initUniformMap=function(){var e=this._ro;const t=e._layer;var i=t._context;if(i.webgl2||i.webgpu)return;const n=e._volObj;var r={uVolSideBlockCount:function(){return n.nSideBlockCount},uVolBlockLength:function(){return n.nBlockLength},uVolTexLength:function(){return n.nLength},uVolWidth:function(){return n.nWidth},uVolHeight:function(){return n.nHeight},uVolDepth:function(){return n.nDepth},uVolFilterMode:function(){let e=0;const i=t._hypsometricSetting;return e$2e(i)&&i.filterMode===k$S.FilterMode.NEAREST&&(e=1),e},uVolumeType:function(){const e=n.nFormat;let t=0;return e$2e(e)&&(3200===e?t=0:e$2e(hypSetting)?hypSetting.filterMode===k$S.FilterMode.LINEAR&&(t=0):t=1),t}};this._uniformMap=r},_0x1f4c64.prototype.isDestroyed=function(){return!1},_0x1f4c64.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};var _0x5796de=(_0x404da3=!0,function(e,t){var i=_0x404da3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x404da3=!1,i}),_0x2e1c99=_0x5796de(void 0,(function(){return _0x2e1c99.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e1c99).search("(((.+)+)+)+$")})),_0x404da3;function _0x21df38(e,t){this._id=e,this._worldPosLeftBottom=void 0,this._worldPosLBRelativeOrigin=void 0,this._windowCoordRect=new h$18,this._weight=1e3,this._heigtRangeMax=-1,this._distanceRangeSquare=Number.POSITIVE_INFINITY,this._pixelWidth=-1,this._pixelHeight=-1,this._layer=t,this._visible=void 0}_0x2e1c99(),Object.defineProperties(_0x21df38.prototype,{windowCoordRect:{get:function(){return this._windowCoordRect}},heigtRangeMax:{get:function(){return this._heigtRangeMax},set:function(e){this._heigtRangeMax=e}},weight:{get:function(){return this._weight},set:function(e){this._weight=e}},pixelWidth:{get:function(){return this._pixelWidth},set:function(e){this._pixelWidth=e}},pixelHeight:{get:function(){return this._pixelHeight},set:function(e){this._pixelHeight=e}},worldPosLeftBottom:{get:function(){return this._worldPosLeftBottom},set:function(e){this._worldPosLeftBottom=e}},worldPosLBRelativeOrigin:{get:function(){return this._worldPosLBRelativeOrigin},set:function(e){this._worldPosLBRelativeOrigin=e}},layerName:{get:function(){return this._layer.name}},layer:{get:function(){return this._layer}},id:{get:function(){return this._id}},visible:{get:function(){return this._visible},set:function(e){(!e$2e(this._visible)||e!==this._visible)&&_0x21df38.addToChangeQueue(this,e),this._visible=e}}});var _0x2c4147=new o$1o;_0x21df38.prototype.calcWindowCoordRect=function(e,t){m$19.pointToWindowCoordinates(e,t,this._worldPosLBRelativeOrigin,_0x2c4147),this._windowCoordRect.west=_0x2c4147.x,this._windowCoordRect.east=_0x2c4147.x+this._pixelWidth,this._windowCoordRect.south=_0x2c4147.y,this._windowCoordRect.north=_0x2c4147.y-this._pixelHeight},_0x21df38.prototype.isInViewport=function(e){return this._windowCoordRect.west+200>=e.x&&this._windowCoordRect.east-this._pixelWidth<=e.x+e.width&&this._windowCoordRect.north+200>=e.y&&this._windowCoordRect.south-this._pixelHeight<=e.y+e.height},_0x21df38.prototype.isInHeightRange=function(e){return!this._layer._hasHeightRangeAttributeName||e<this._heigtRangeMax},_0x21df38.prototype.isInVisibleRange=function(e){return!this._layer._hasHeightRangeAttributeName||o$1p.distanceSquared(e,this._worldPosLeftBottom)<this._distanceRangeSquare};var _0x2da45a=new h$18,_0x3a97d2=new h$18;function _0x2fe707(e,t){e.east+=t,e.west-=t,e.south+=t,e.north-=t}_0x21df38.isIntersectionTest=function(e,t,i){h$18.clone(e,_0x2da45a),h$18.clone(t,_0x3a97d2),_0x2fe707(_0x2da45a,i),_0x2fe707(_0x3a97d2,i);var n=Math.max(_0x2da45a.west,_0x3a97d2.west),r=Math.min(_0x2da45a.south,_0x3a97d2.south),o=Math.min(_0x2da45a.east,_0x3a97d2.east);return!(r<=Math.max(_0x2da45a.north,_0x3a97d2.north)||n>=o)};var _0x4a438d=[],_0x14a147=[];function _0x2bc70b(e,t){for(var i=0,n=e._layerQueue.length;i<n;i++){var r=e._layerQueue[i];if(r.id===t)return r}}function _0x306aa2(e,t){for(var i in t){var n=e.find(i),r=n?n.iconRelatedTextLayerID:void 0;if(r){var o=i,a=_0x2bc70b(e,r);if(a){var s=t[a.name];s&&s.length>0&&(t[o]=s)}}}}_0x21df38.meetVisible=function(e,t,i){_0x4a438d.length=0,_0x14a147.length=0;e.sort((function(e,t){return e.weight-t.weight}));for(var n=[],r=0,o=e.length;r<o;r++){(p=e[r]).layerName;var a=p.layer;if(!a.iconRelatedTextLayerID||!i){var s=p.id;if(a._hasObjsVisibleMap&&!0===a._objsVisibleMap[s]){n.push(p),p.visible=!0;continue}if(a._hasObjsVisibleMap&&!1===a._objsVisibleMap[s]||a.allObjsHide){p.visible=!1;continue}for(var l=p.windowCoordRect,u=!1,c=0,h=_0x4a438d.length;c<h;c++){var d=_0x4a438d[c],f=d.windowCoordRect;if(!(p.id===d.id&&p.layer.id===d.layer.id)&&_0x21df38.isIntersectionTest(l,f,t)){u=!0;break}}u?p.visible=!1:(_0x4a438d.push(p),p.visible=!0)}}if(n.length>0)for(o=0;o<n.length;o++){(p=n[o]).layerName,l=p.windowCoordRect,u=!1;for(var p,_=0;_<_0x14a147.length;_++){f=_0x14a147[_];if(_0x21df38.isIntersectionTest(l,f,t)){s=p.id;p.visible=!1,u=!0;break}}u||_0x14a147.push(l)}},_0x21df38._visibleChangedQueue={},_0x21df38._invisibleChangedQueue={},_0x21df38.addToChangeQueue=function(e,t){var i,n=e.layerName;(i=t?_0x21df38._visibleChangedQueue:_0x21df38._invisibleChangedQueue)[n]||(i[n]=[]),i[n].push(e.id)},_0x21df38.addPotentialVisibiltyChangedLayer=function(e){_0x21df38._visibleChangedQueue[e]||(_0x21df38._visibleChangedQueue[e]=[]),_0x21df38._invisibleChangedQueue[e]||(_0x21df38._invisibleChangedQueue[e]=[])},_0x21df38.setVisibiltyChangedToLayer=function(e,t){for(var i in t&&(_0x306aa2(e,_0x21df38._visibleChangedQueue),_0x306aa2(e,_0x21df38._invisibleChangedQueue)),_0x21df38._visibleChangedQueue){var n=e.find(i);(r=_0x21df38._visibleChangedQueue[i]).length>0&&n.setOnlyObjsVisible(r,!0,!1)}for(var i in _0x21df38._invisibleChangedQueue){var r;n=e.find(i);(r=_0x21df38._invisibleChangedQueue[i]).length>0&&n.setOnlyObjsVisible(r,!1,!1)}},_0x21df38.resetVisibleChangedQueue=function(){_0x21df38._visibleChangedQueue={},_0x21df38._invisibleChangedQueue={}},_0x21df38.prototype.isDestroyed=function(){return!1},_0x21df38.prototype.destroy=function(){return i$11(this)};var _0x1ed4f5=(_0x296067=!0,function(e,t){var i=_0x296067?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x296067=!1,i}),_0x532e9a=_0x1ed4f5(void 0,(function(){return _0x532e9a.toString().search("(((.+)+)+)+$").toString().constructor(_0x532e9a).search("(((.+)+)+)+$")})),_0x296067;function _0x4881fc(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;if(!(e.arrIndexPackage&&e.vertexPackage&&e.mapPass&&e$2e(e.context)))throw new t$15("gl texture indexes vertexes is required to create RenderEntityPagelod");if(this._layer=e.layer,this._entity=e.entity,this._context=e.context,this._arrIndexPackage=t,this._vertexPackage=i,this._attributeLocations=this._vertexPackage.attrLocation,this._vertexDim=4,e$2e(i)&&e$2e(i.vertexAttributes)&&i.vertexAttributes.length>0&&(this._vertexDim=i.vertexAttributes[0].componentsPerAttribute),this._edgeGeometry=e.edgeGeometry,this._pickInfo=u$Z(e.pickInfo,{}),this._ids=Object.keys(this._pickInfo),this._vertexBufferToCreate=new r$17,this._vertexWeightBuffers=[],this._bMultiTemporalWeight=!1,this._fMultiTemporalFactor=0,this._fMultiTemporalPercentage=0,this._nFirstMultiTemporalPos=-1,this._nSecondMultiTemporalPos=-1,this._nSpecificTemporalPos=-1,this._layer._temporalCount>0&&(this._bMultiTemporalWeight=!0),this._bMultiTemporalWeight){for(var r=[],o=Object.keys(i.attrLocation),a=o.length,s=0;s<a;++s){var l=o[s];r.push(i.attrLocation[l])}r.sort((function(e,t){return e-t})),this._nFirstMultiTemporalPos=i.attrLocation.aVertexWeight,this._nSecondMultiTemporalPos=i.attrLocation.aVertexWeight_1;var u=[],c=r.length;for(s=0;s<this._vertexPackage.vertexAttributes.length;s++){if(s===i.attrLocation.aVertexWeight||s===i.attrLocation.aVertexWeight_1||s>r[c-1]){var h=new Uint8Array(this._vertexPackage.vertexAttributes[s].typedArray,0,this._vertexPackage.vertexAttributes[s].byteLength);if(this._vertexWeightBuffers.push(h),s>r[c-1])continue}u.push(this._vertexPackage.vertexAttributes[s]),this._vertexBufferToCreate.enqueue(s)}this._vertexPackage.vertexAttributes=u}else{this.isBillboardPoint(e.fileType)&&this.convertToInstanceBillboardPoint();for(s=0;s<this._vertexPackage.vertexAttributes.length;s++)this._vertexBufferToCreate.enqueue(s)}for(this._indexBufferToCreate=new r$17,s=0;s<this._arrIndexPackage.length;s++)13!==this._arrIndexPackage[s].primitiveType&&this._arrIndexPackage[s].indicesCount>0&&this._indexBufferToCreate.enqueue(s);this._subTexturesToUpload=new r$17,this._shaderProgramToCreate=new r$17,this._shaderProgramToCreate.enqueue(0),this._version=e.version||_0x43b37d.S3M,this._isS3MBlock=u$Z(e.isS3MBlock,!1),this._initialize=!1,this._matModel=e.matModel,this._iblReferenceFrameMatrix=p$1e.clone(p$1e.IDENTITY),this._tranlateMatrix=p$1d.clone(p$1d.IDENTITY),this._mapPass=n;var d=this._arrIndexPackage[0];if(this._material=e$2e(d)&&e$2e(d.materialCode)?n[d.materialCode]:_0xf77618.Default,this._colorCommand=void 0,this._pickCommand=void 0,this._wireFrameCommands={},this._stencilCommand=void 0,this._clampColorCommand=void 0,this._clipStencilCommand=void 0,this._pickRectCommand=void 0,this._spatialQueryCommand=void 0,this._waterIndex=-1,this._waterTime=0,this._boundingVolume=e.boundingVolume,this._instanceCount=i.instanceCount,this._instanceMode=i.instanceMode,this._isS3MB=u$Z(e.isS3MB,!1),this._volObj=e.volObj,this._volTexture=e.volTexture,this._geoMatrix=u$Z(e.geoMatrix,p$1d.IDENTITY),this._inverseGeoMatrix=p$1d.inverse(this._geoMatrix,new p$1d),this._instanceSkeletonMatrix=e.instanceSkeletonMatrix,this._wireFrameIndexBuffers=void 0,this._bufferPrepared=!1,this._fileType=e.fileType,e.fileType===p$T.ExtendRegion3D&&e$2e(i.attrLocation.aTexCoord1)){var f=i.vertexAttributes[i.attrLocation.aTexCoord1].typedArray,p=f.slice(f.buffer,f.byteOffset,f.byteLength);this._texCoord1=new Float32Array(p.buffer,0,p.byteLength/4)}this._selectionInforMap=void 0,this._geometryByteLength=0,this._intersectWithClipPlane=!1,this._boundingRectangle=e.boundingRectangle,this._symbolTextureUrl=e.symbolTextureUrl,this._symbolColor=e.symbolColor,this._symbolTextureRepeat=e.symbolTextureRepeat,e$2e(this._symbolTextureRepeat)||(this._symbolTextureRepeat=new o$1o(600,600)),this._clampRegionEdge=u$Z(i.clampRegionEdge,!1),e$2e(e.level)&&(this._level=e.level,this._row=e.row,this._col=e.col),this._rasterized=!1,this._groupName=e.groupName,this._ptIndexGroup=e.ptIndexGroup,this._geoName=e.geoName,this.oriPassGroup=Le$q.S3MTiles,this._labelPosArray=[],this._labelTextArray=[],this._pickIDArray=[],this._labelsCreated={},this._labelIndexs={},this._labelPromiseArr=[],this._labelReady=!1,this._batchTable=void 0,this._updateBatchTable=!0,this._idsOperationMap=new e$1Q,this._idsColorMap=new e$1Q,this._idsTranslateMap=new e$1Q,this._idsPBRIndexMap=new e$1Q,this._hasBloomOperation=!1,this._isInstanceModel=this._layer.skeletonSelectEnable&&"InstanceModel"===this._layer._dataType&&i.skeletonCount>0,this.skeletonCount=i.skeletonCount,this._imagerys=[],this._imageryLevels=[],this._showImagerysImmediate=!0,this._imageryTextureBound=new o$1o,this._isLeaf=!1,this._isHypsometricVisible=!0,this._themeDirty=!1,this._passIncrement=0,this._clipCommand=void 0,this._disFromCamera=0,this.materialPass=void 0,this.useWValue=!1,this.useLineColor=!1,this._polygons=void 0,this._polygonId=void 0,this._polygonCommands=[],this._imageRasterFinish=!1,this._isSelected=!1,this._isPBR=!1,this._specularEnvironmentMaps=void 0,this._clipBounds=[],this._scaleImagerys=[],this._visibleScaleImageryIndex=void 0,this._plusRoArray=[],this._modelMatrixDirty=!1,this._relativeOrigin=new o$1p,this._relativeModelMatrix=new p$1d,p$1d.clone(this._matModel,this._relativeModelMatrix),this._meshUBO=new _0x35e02f(this),this._materialUBO=new _0x4f8f70(this,this._material,this._layer),(e$2e(this._volObj)||e$2e(this._volTexture))&&(this._volumeUBO=new _0x1f4c64(this))}_0x532e9a(),Object.defineProperties(_0x4881fc.prototype,{renderable:{get:function(){if(!this._isS3MBlock||!e$2e(this._mapPass))return this._bufferPrepared;for(var e in this._mapPass)if(this._mapPass.hasOwnProperty(e)){var t=this._mapPass[e],i=t._textures[0];return e$2e(i)?this._bufferPrepared&&(i.renderable&&i.ready||e$2e(t._ancestorTexture)):this._bufferPrepared}return this._bufferPrepared}}}),_0x4881fc.prototype.initialize=function(){if(!this._initialize){if(this.createSelectionMap(),this.createBoundingBoxForInstance(),this._fileType===p$T.Text||this._fileType===p$T.IconPoint?this.createBillboardsBounds(this._layer):this._fileType===p$T.ClampGroundPolygon&&this.createClampGroundBounds(),e$2e(this._symbolTextureUrl)&&_0x1451be.createTexture({imageUrl:this._symbolTextureUrl}),this.prepareLabels(),!e$2e(this._batchTable)&&Object.keys(this._pickInfo).length>0){var e=this._layer,t=e._context;_0x120d8(t,this),_0x876d97(t,this,e)}this._initialize=!0}},_0x4881fc.prototype.createSelectionMap=function(){var e=this._pickInfo;if(e$2e(e)&&_0x43b37d.S3M4===this._version)for(var t in this._selectionInforMap=new e$1Q,e)!e.hasOwnProperty(t)||-1===this._vertexPackage.instanceIndex&&"0"===t||this._selectionInforMap.set(t,e[t])},_0x4881fc.prototype.createBoundingBoxForInstance=function(){var e=this._vertexPackage;if(e$2e(e)&&-1!==e.instanceIndex&&e$2e(e.instanceBounds)){var t=e.instanceBounds,i=new o$1p(t[0],t[1],t[2]),n=new o$1p(t[3],t[4],t[5]),r=o$1p.lerp(i,n,.5,new o$1p),o=o$1p.distance(r,i),a=new o$1p;p$1d.multiplyByPoint(this._matModel,r,a),this._boundingVolume.center=a,this._boundingVolume.radius=o>this._boundingVolume.radius?o:this._boundingVolume.radius,e.instanceBounds=void 0}},_0x4881fc.prototype.createClampGroundBounds=function(){var e=this._boundingRectangle.x,t=this._boundingRectangle.y,i=this._boundingRectangle.x+this._boundingRectangle.width,n=this._boundingRectangle.y+this._boundingRectangle.height,r=new o$1p(i,t,0),o=new o$1p(e,n,0);this._southWestCorner=new o$1p(e,t,0),this._eastVector=new o$1p,this._northVector=new o$1p,o$1p.subtract(r,this._southWestCorner,this._eastVector),o$1p.subtract(o,this._southWestCorner,this._northVector)},_0x4881fc.prototype.createBillboardsBounds=function(e){this._arrtextOverlapInfo=[];var t=this._matModel,i=this._selectionInforMap.values,n=this._vertexPackage.vertexAttributes[0].typedArray,r=this._vertexPackage.vertexAttributes[0].componentsPerAttribute||3;if(e$2e(n)&&e$2e(n.buffer)){var o,a,s=new Float32Array(n.buffer,n.byteOffset,n.byteLength/4);this._fileType===p$T.Text?(o=this._vertexPackage.vertexAttributes[1].typedArray,a=new Float32Array(o.buffer,o.byteOffset,o.byteLength/4)):(o=this._vertexPackage.vertexAttributes[3].typedArray,a=new Float32Array(o.buffer,o.byteOffset,o.byteLength/4));for(var l=new o$1p,u=[],c=0;c<this._vertexPackage.verticesCount;c++)o$1p.fromArray(a,3*c,l),u.push(o$1p.clone(l));for(var h,d,f,p=e$2e(e._overlapWeightAttributeName),_=e$2e(e._heightRangeAttributeName),m=a$18.toCartesian(h$18.southwest(e.layerBounds)),g=a$18.toCartesian(h$18.northeast(e.layerBounds)),x=o$1p.distance(m,g),y=x*x,v=0,$=i.length;v<$;v++){var b=new _0x21df38(this._ids[v],e);d=(h=i[v]).vertexColorOffset,f=u$Z(h.vertexCount,h.vertexColorCount);for(var T=Number.MAX_VALUE,C=Number.MIN_VALUE,S=Number.MAX_VALUE,w=Number.MIN_VALUE,E=d;E<d+f;E++){var P=u[E];T=Math.min(P.x,T),C=Math.max(P.x,C),S=Math.min(P.y,S),w=Math.max(P.y,w)}b.pixelWidth=C-T,b.pixelHeight=w-S;var A=new o$1p(s[d*r],s[d*r+1],s[d*r+2]);p$1d.multiplyByPoint(t,A,A),b.worldPosLeftBottom=A;var L=new o$1p;if(o$1p.subtract(A,this._context.relativeOrigin,L),b.worldPosLBRelativeOrigin=L,p||_){var M=this._ids[v],R=e.getAttributesById(M);e$2e(R)&&e$2e(R.then)&&this._getLabelWeightOrHeight(b,R,e._overlapWeightAttributeName,e._heightRangeAttributeName)}b._distanceRangeSquare=y,this._arrtextOverlapInfo.push(b)}}else console.log("createBillboardsBounds")},_0x4881fc.prototype._getLabelWeightOrHeight=function(e,t,i,n){t.then((t=>{if(i&&(e.weight=u$Z(t[i],1e3),e.heigtRangeMax=-1),n){var r=parseInt(t[n].split(",")[0]);e.heigtRangeMax=u$Z(r,-1)}}))};var _0x568913=new p$1d;_0x4881fc.prototype.updateBillboardsBounds=function(e,t,i){if(!e.isOverlapDisplayed){var n,r={},o=!0;if(0!=e._scene._multiViewportMode){var a=e._scene._multiViewportInfo[i.multiViewportIndex];0==a.x&&0==a.y?(o=!0,r.x=this._context.drawingBufferWidth*a.x,r.y=this._context.drawingBufferHeight*a.y,r.width=this._context.drawingBufferWidth*a.width,r.height=this._context.drawingBufferHeight*a.height,p$1d.computeViewportTransformation(r,0,1,_0x568913),n=_0x568913):o=!1}else o=!0,r=t.viewport,n=t.viewportTransformation;for(var s=this._arrtextOverlapInfo,l=i.camera._positionCartographic.height,u=i.camera.positionWC,c=t.viewProjection,h=0,d=s.length;h<d;h++){var f=s[h];f.isInHeightRange(l)?f.isInVisibleRange(u)&&(!o||(f.calcWindowCoordRect(c,n),f.isInViewport(r)))?e._scene.layers._allTextOverlap.push(f):f.visible=!1:f.visible=!1}}};var _0x518c7b=new e$2c;function _0xcca22c(e){var t,i,n,r=e._idsColorMap,o=[];if(r.length>0)for(t=0,i=r.length;t<i;t++)(n=r.values[t]).dirty&&(n.dirty=!1,o=n.color.toBytes(),_0x518c7b.x=o[0],_0x518c7b.y=o[1],_0x518c7b.z=o[2],_0x518c7b.w=o[3],e$2e(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,0,_0x518c7b):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,0,_0x518c7b)})));var a=e._idsTranslateMap;if(a.length>0)for(var s in a._hash)(n=a._hash[s]).dirty&&(n.dirty=!1,e$2e(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,3,n.translate):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,3,n.translate)})),o$1p.equals(n.translate,o$1p.ZERO)&&a.remove(s));var l=e._idsPBRIndexMap;if(l.length>0)for(t=0,i=l.length;t<i;t++)(n=l.values[t]).dirty&&(n.dirty=!1,e$2e(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,4,n.pbrMaterialIndex):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,4,n.pbrMaterialIndex)})));var u=e._idsOperationMap;if(u.length>0)for(t=0,i=u.length;t<i;t++)if((n=u.values[t]).dirty)if(n.dirty=!1,e._isInstanceModel){if(n.skeletonId>-1){var c=n.instanceIds[0]*e.skeletonCount+n.skeletonId;e._batchTable.setBatchedAttribute(c,1,n.operationValue)}}else e._instanceCount>0?Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,1,n.operationValue)})):e$2e(n.batchId)&&e._batchTable.setBatchedAttribute(n.batchId,1,n.operationValue)}function _0x120d8(e,t){var i=[];i.push({functionName:"czm_batchTable_color",componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"czm_batchTable_operation",componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4},{functionName:"czm_batchTable_pickColor",componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"czm_batchTable_translate",componentDatatype:S$14.FLOAT,componentsPerAttribute:3,normalize:!0},{functionName:"czm_batchTable_pbrMaterialIndex",componentDatatype:S$14.FLOAT,componentsPerAttribute:3,normalize:!0});var n=t._pickInfo,r=Object.keys(n),o=new h$X(e,i,t._isInstanceModel?t._instanceCount*t.skeletonCount:t._instanceCount>0?t._instanceCount:r.length);o.useUBO=!0,t._batchTable=o}function _0x876d97(e,t,i){var n=t._batchTable,r=t._selectionInforMap,o=t._selectionInforMap._hash;for(var a in o)if(o.hasOwnProperty(a)){var s=r.get(a);if(t._isInstanceModel){var l=s.instanceIds[0],u=Object.keys(s.skeletonIds).length;for(var c in s.skeletonIds)if(s.skeletonIds.hasOwnProperty(c)){var h=l*u+Number(c),d=(f=e.createPickId({primitive:i,id:a,skeletonId:Number(c)})).color;_0x518c7b.x=e$1X.floatToByte(d.red),_0x518c7b.y=e$1X.floatToByte(d.green),_0x518c7b.z=e$1X.floatToByte(d.blue),_0x518c7b.w=e$1X.floatToByte(d.alpha),n.setBatchedAttribute(h,2,_0x518c7b)}}else{var f;e$2e(f=i._pickObjs[a])||(f=e.createPickId({primitive:i,id:a}),i._pickObjs[a]=f);d=f.color;if(_0x518c7b.x=e$1X.floatToByte(d.red),_0x518c7b.y=e$1X.floatToByte(d.green),_0x518c7b.z=e$1X.floatToByte(d.blue),_0x518c7b.w=e$1X.floatToByte(d.alpha),t._instanceCount>0){s.instanceIds.map((function(e){n.setBatchedAttribute(e,2,_0x518c7b)}))}else{var p=s.batchId;n.setBatchedAttribute(p,2,_0x518c7b)}}}}function _0x12f028(e,t){for(var i=e.position.values,n=e.position.componentsPerAttribute,r=i.length/n,o=new Float32Array(3*r),a=0;a<r;a++){var s=new o$1p(i[a*n],i[a*n+1],i[a*n+2]),l=a$18.fromCartesian(s),u=e$2d.toDegrees(l.longitude),c=e$2d.toDegrees(l.latitude),h=l.height,d=(u-t.left)/t.width,f=(c-t.bottom)/t.length,p=(h-t.minHeight)/t.height;o[3*a]=d,o[3*a+1]=f,o[3*a+2]=p}e.aRatio=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:o})}_0x4881fc.prototype.updateBatchTable=function(e,t,i){_0xcca22c(this),this._batchTable.update(e),this._updateBatchTable=!1},_0x4881fc.prototype.transformResource=function(e,t){this.initialize(),this.createResources(e,t),this._bufferPrepared&&e$2e(this._sp)&&(this.createAllCommands(e,t),this.createNormalAndDepthCommand(t),this.createPostEffectCommand(t),this.createClampColorCommand(t),this.createTransparentCommand(t),(t._fileType===p$T.ClampGroundPolygon||t._fileType===p$T.ClampObjectPolygon||t._fileType===p$T.ClampGroundLine||t._fileType===p$T.ExtendClampPolygonCache)&&this.cloneSelectCommand(t))},_0x4881fc.prototype.createLazyCommand=function(e,t){if(this._bufferPrepared&&(this.createPickRectCommand(t),t.LoadingPriority===_0x539352.UsePagedLodInfo&&t._hasMixedContent&&e.context.stencilBuffer)){var i=this._colorCommand;if(!e$2e(i))return;var n=i.derivedCommands;e$2e(n)||(n=i.derivedCommands={}),this.ownerPagelod._finalResolution||(e$2e(n.zback)||(n.zback=_0x137a76(e.context,i)),t._backfaceCommands.push(n.zback)),(!e$2e(n.stencil)||this.ownerPagelod._selectionDepth!==_0x5e4157(n.stencil))&&(n.stencil=_0x486fb9(i,this.ownerPagelod._selectionDepth))}};var _0x6e0379=new o$1p(0,0,0);_0x4881fc.prototype.setPolygonOffset=function(e){for(var t=this,i=function(){return e$2e(t._layer._polygonsTranslate[t._polygonId])?t._layer._polygonsTranslate[t._polygonId]:_0x6e0379},n=function(){return _0x6e0379},r=0;r<this._polygonCommands.length;r++){var o=this._polygonCommands[r];o.uniformMap.uTranslate=i,o.uniformMap.uTranslate=r==e?i:n}},_0x4881fc.prototype.updatePolygons=function(e,t,i){if(e$2e(this._polygons)){this._polygonCommands=[];for(var n=this,r=0;r<this._polygons.length;r++)!function(){var t=U$18.createGeometry(n._polygons[r]);e$2e(n._volObj)&&_0x12f028(t.attributes,n._volObj.volBounds);for(var o=new e$2c,a=new e$2c,s=p$1d.inverse(n._matModel,new p$1d),l=t.attributes.position.values.length/t.attributes.position.componentsPerAttribute,u=0;u<l;u++)o.x=t.attributes.position.values[3*u],o.y=t.attributes.position.values[3*u+1],o.z=t.attributes.position.values[3*u+2],o.w=1,p$1d.multiplyByVector(s,o,a),t.attributes.position.values[3*u]=a.x,t.attributes.position.values[3*u+1]=a.y,t.attributes.position.values[3*u+2]=a.z;var c=new i$$({primitiveType:t.primitiveType,modelMatrix:n._matModel,boundingVolume:t.boundingSphere,pass:Le$q.S3MTiles,cull:!0}),h=n._polygonId+"_"+r,d=e.createPickId({primitive:n,id:h}).color;c.pickId="vSecondColor";c.uniformMap=l$1f(n._uniformMap),e$2e(c.uniformMap)&&(c.uniformMap.uSecondColor=function(){return d},c.uniformMap.uTranslate=function(){return _0x6e0379}),c.vertexArray=c$13.fromGeometry({context:e,geometry:t,attributeLocations:{aPosition:0,aTexCoord0:1,aNormal:2,aRatio:3},bufferUsage:A$18.STATIC_DRAW,interleave:!0});var f=["attribute vec4 aPosition;","attribute vec3 aRatio;","uniform vec4 uSecondColor;","uniform vec3 uTranslate;","varying vec4 vSecondColor;","varying vec3 vecRotioCoord;","varying vec2 vecHypTexCoord;","varying vec4 vPositionMC;","void main()","{"," vPositionMC.xyz = aPosition.xyz;"," vPositionMC.w = 0.0;"," vSecondColor = uSecondColor;"," vecRotioCoord = aRatio;"," vec4 pos = aPosition;"," pos.xyz += uTranslate;"," gl_Position = czm_modelViewProjection * pos;","}"].join("\n"),p=["#extension GL_EXT_shader_texture_lod : enable","#extension GL_OES_standard_derivatives : enable","varying vec4 vSecondColor;","varying vec4 vPositionMC;","vec4 LinearTosRGB( in vec4 value )","{"," return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );","}","void main()","{"," gl_FragColor = czm_getHypsometricColor(vec4(1.0,1.0,1.0,1.0), 0.0);"," gl_FragColor *= czm_computeLightColorInFP(vPositionMC.xyz, vPositionMC.w, vec3(0.0,0.0,0.0));"," gl_FragColor = LinearTosRGB(gl_FragColor);","}"].join("\n"),_=new s$V({sources:[f]}),m=new s$V({sources:[p]});_.defines.push("Volume"),m.defines.push("Volume"),_.defines.push("HYPSOMETRIC"),m.defines.push("HYPSOMETRIC"),m.defines.push(D$V.DIR_LIGHTS+0),m.defines.push(D$V.POINT_LIGHTS+0),m.defines.push(D$V.SPOT_LIGHTS+0),m.defines.push(D$V.HEMISPHERE_LIGHTS+0),c.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:_,fragmentShaderSource:m,attributeLocations:{aPosition:0,aTexCoord0:1,aNormal:2,aRatio:3}}),c.renderState=i._rsColor,n._polygonCommands.push(c)}();this._polygons=void 0}if(this._polygonCommands.length>0){var o={};o[this._polygonId]=4,this.updateObjsOperation(o)}for(r=0;r<this._polygonCommands.length;r++)t.push(this._polygonCommands[r])},_0x4881fc.prototype.updateVertexWeight=function(){if(this._bMultiTemporalWeight&&e$2e(this._layer._temporalSetting)){var e=this._layer._temporalSetting;if(!(this._fMultiTemporalPercentage===e.progress&&e.location<0)){var t=this._vertexWeightBuffers,i=t.length,n=this._colorCommand;if(this._nSpecificTemporalPos!==e.location){var r=t[e$2d.clamp(0,e.location,i-1)],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight)).strideInBytes+c.offsetInBytes;return c.vertexBuffer.copyFromArrayView(r,o),this._fMultiTemporalFactor=0,void(this._nSpecificTemporalPos=e.location)}if(this._nSpecificTemporalPos>-1)return;this._fMultiTemporalPercentage=e.progress;var a=this._fMultiTemporalPercentage,s=a*i,l=Math.floor(s);a=s-(l=e$2d.clamp(0,l,i-1)),this._fMultiTemporalFactor=e$2d.clamp(0,a,1);var u=Math.ceil(s);if(u=e$2d.clamp(0,u,i-1),this._nFirstMultiTemporalPos!==l){r=t[l],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight)).strideInBytes+c.offsetInBytes;c.vertexBuffer.copyFromArrayView(r,o),this._nFirstMultiTemporalPos=l}if(this._nSecondMultiTemporalPos!==u){var c;r=t[u],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight_1)).strideInBytes+c.offsetInBytes;c.vertexBuffer.copyFromArrayView(r,o),this._nSecondMultiTemporalPos=u}}}};var _0x2cde77=new o$1p;function _0x346b31(e,t){if(!e$2e(t._matModel))return p$1d.IDENTITY;var i,n;if(t._layer._fileType!==p$T.ClampGroundRealtimeRasterCache&&(p$1d.clone(t._matModel,t._relativeModelMatrix),p$1d.getTranslation(t._matModel,_0x2cde77),o$1p.subtract(_0x2cde77,e.relativeOrigin,_0x2cde77),p$1d.setTranslation(t._relativeModelMatrix,_0x2cde77,t._relativeModelMatrix)),t._arrtextOverlapInfo&&t._arrtextOverlapInfo.length>0)for(n=t._arrtextOverlapInfo.length,i=0;i<n;i++){var r=t._arrtextOverlapInfo[i];o$1p.subtract(r.worldPosLeftBottom,e.relativeOrigin,r.worldPosLBRelativeOrigin)}}function _0x71477a(e,t,i){!e$2e(i._colorCommand)||(_0x535eba.set(e,t,i),_0x535eba.execute())}function _0x532448(e,t,i,n){let r=0;const o=n._material;return r=(o._usePBR||i._usePBR)|(o._textures.length>0)<<1|(o._textures.length>1)<<2|i._flattening<<3|i._hasExcavation<<4|e$2e(i._categorieTexture)<<5|(e$2e(i._imageryLayer)&&e$2e(n._attributeLocations.img))<<6|i._hasOverlay<<7|i._hasEmissiveTexAtlas<<8|i._hasSnowEffect<<9|i._hasRainEffect<<10|i._bUseHypColorTable<<11,r}function _0x4b8c1b(e){if(!e$2e(e._colorCommand))return;const t=e._colorCommand;t.shaderProgram=e._sp,t.uniformMap=e._uniformMap,e._uniformMap=t.uniformMap,e._stencilCommand&&(e._stencilCommand.uniformMap=t.uniformMap)}var _0xd5a1a0=new p$1d;_0x4881fc.prototype.update=function(e,t,i,n){_0x44c957(this,t,n);const r=_0x532448(e,t,n,this);if(this._flag!==r&&(this._flag=r,this._uniformMap={},_0x2c7aca.create(t,n,this,this._uniformMap),e$2e(this._regularEdgeCommand)&&(this._regularEdgeCommand.uniformMap=p$19(this._regularEdgeCommand.uniformMap,this._uniformMap)),e$2e(this._silhouetteEdgeCommand)&&(this._silhouetteEdgeCommand.uniformMap=p$19(this._silhouetteEdgeCommand.uniformMap,this._uniformMap)),e$2e(this._normalAndDepthCommand)&&(this._normalAndDepthCommand.uniformMap=p$19(this._normalAndDepthCommand.uniformMap,this._uniformMap)),this._meshUBO._isValueDirty=!0),e$2e(this._volumeUBO)&&this._volumeUBO.update(e),this._bufferPrepared&&this.createPickRectCommand(n),n._fileType===p$T.ClampGroundRealtimeRasterCache&&_0x1451be.getTexture(this._symbolTextureUrl)!=this._materialUBO._getTextureByType("uTexture")&&(this._materialUBO._isValueDirty=!0,this.refreshRaster(t)),this._materialUBO.update(e),this._meshUBO.update(e),e$2e(this._colorCommand)&&e$2e(this._vertexPackage)&&e$2e(this._vertexPackage.vertexAttributes)&&(delete this._vertexPackage.vertexAttributes,this._arrIndexPackage=null),this._arrIndexPackage=null,this._isPBR&&(this._specularEnvironmentMaps!==t.specularEnvironmentMaps||this._hdrEnvMap!==t.hdrEnvMap)&&_0x71477a(t,n,this),_0x4b8c1b(this),n._fileType===p$T.PointCloudFile&&e$2e(n._pointCloudLayerVisible))if(e$2e(this._ptIndexGroup)){for(var o in this._ptIndexGroup)if(this._ptIndexGroup.hasOwnProperty(o)&&n._pointCloudLayerVisible[n._pointCloudLayerNames[o]]){this.pushCommands(t,i,n);break}}else e$2e(this._groupName)&&n._pointCloudLayerVisible[this._groupName]&&this.pushCommands(t,i,n);else this.pushCommands(t,i,n);n._fileType===p$T.PointCloudFile&&e$2e(this._colorCommand)&&(n._pointCloudShading.renderMode==_0x2c4f4b.VOXEL?this._colorCommand.renderState=d$1m.fromCache({depthTest:{enabled:!1}}):(n._pointCloudShading.eyeDomeLighting||n._pointCloudShading.performance)&&(this._colorCommand.renderState=d$1m.fromCache({depthTest:{enabled:!0}}))),(n._fileType===p$T.Text||n._fileType===p$T.IconPoint)&&this.updateBillboardsBounds(n,e.uniformState,t),this._themeDirty&&_0x38ba9a(n,this),this._layer._showLabel&&this.updateLabels(t),this._updateBatchTable&&Object.keys(this._pickInfo).length>0&&e$2e(this._batchTable)&&this.updateBatchTable(t,t.context,n),this.updatePolygons(e,i,n),e$2e(t.specularEnvironmentMaps)&&(_0xd5a1a0=p$1d.multiply(n._context.uniformState.view3D,this._matModel,_0xd5a1a0),this._iblReferenceFrameMatrix=p$1d.getMatrix3(_0xd5a1a0,this._iblReferenceFrameMatrix),this._iblReferenceFrameMatrix=p$1e.getRotation(this._iblReferenceFrameMatrix,this._iblReferenceFrameMatrix),this._iblReferenceFrameMatrix=p$1e.transpose(this._iblReferenceFrameMatrix,this._iblReferenceFrameMatrix)),this.updateVertexWeight(),(!o$1p.equals(this._relativeOrigin,n._context.relativeOrigin)||this._modelMatrixDirty)&&(this._modelMatrixDirty=!1,_0x346b31(n._context,this),e$2e(this._meshUBO)&&(this._meshUBO.valueDirty=!0,this._meshUBO.update(n._context)),o$1p.clone(n._context.relativeOrigin,this._relativeOrigin))};var _0x535eba=new _0x5adff0;function _0x1dc467(e,t,i){for(var n=i._shaderProgramToCreate;n.length&&(n.peek(),_0x535eba.set(e,t,i),e.jobScheduler.execute(_0x535eba,i$R.PROGRAM));)n.dequeue()}function _0x15e8bc(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!e$2e(i)){var n=t.fragmentShaderSource.clone();n.defines=e$2e(n.defines)?n.defines.slice(0):[],n.defines.push("POLYGON_OFFSET"),n.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),i=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:t._attributeLocations})}return i}function _0x137a76(e,t){var i=i$$.shallowClone(t),n=l$1f(i.renderState,!0);n.cull.enabled=!0,n.cull.face=G$1a.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5},n.stencilTest=u$M.setCesium3DTileBit(),n.stencilMask=u$M.CESIUM_3D_TILE_MASK,i.renderState=d$1m.fromCache(n),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=l$1f(t.uniformMap);var r=new o$1o(5,5);return i.uniformMap.u_polygonOffset=function(){return r},i.shaderProgram=_0x15e8bc(e,t.shaderProgram),i}function _0x5e4157(e){return(e.renderState.stencilTest.reference&u$M.SKIP_LOD_MASK)>>>u$M.SKIP_LOD_BIT_SHIFT}function _0x486fb9(e,t){var i=i$$.shallowClone(e),n=l$1f(i.renderState,!0);return n.cull.enabled=!0,n.stencilTest.enabled=!0,n.stencilTest.mask=u$M.SKIP_LOD_MASK,n.stencilTest.reference=u$M.CESIUM_3D_TILE_MASK|t<<u$M.SKIP_LOD_BIT_SHIFT|2,n.stencilTest.frontFunction=m$Z.GREATER_OR_EQUAL,n.stencilTest.frontOperation.zPass=n$_.REPLACE,n.stencilTest.backFunction=m$Z.GREATER_OR_EQUAL,n.stencilTest.backOperation.zPass=n$_.REPLACE,n.stencilMask=u$M.CESIUM_3D_TILE_MASK|u$M.SKIP_LOD_MASK|2,i.renderState=d$1m.fromCache(n),i}function _0xda32c8(e,t){return{uMaxClip:function(){return e},uMinClip:function(){return t}}}function _0xe2a67e(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1Q;for(var a in e$1Q.clone(n,o),r._hash)if(r._hash.hasOwnProperty(a)){var s=r.get(a),l=u$Z(o.get(a),new e$1X),u=e$1X.multiply(l,s,new e$1X);o.set(a,u)}for(var a in i._hash)if(i._hash.hasOwnProperty(a)){var c=i._hash[a],h=(l=u$Z(o.get(a),new e$1X),e$1X.multiply(c,l,new e$1X));o.set(a,h)}o.length>0&&t.updateObjsColor(o,e.selectColorType,!0)}function _0x445d61(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1Q,a=e$1Q.clone(r);for(var s in n._hash)if(n._hash.hasOwnProperty(s)){var l=n._hash[s];e$1X.equals(e$1X.WHITE,l)?a.set(s,l):o.set(s,l)}for(var s in i._hash)if(i._hash.hasOwnProperty(s)){l=i._hash[s];e$1X.equals(e$1X.WHITE,l)?a.set(s,l):o.set(s,l)}for(var s in o._hash)if(o._hash.hasOwnProperty(s)&&r.contains(s)){var u=o.get(s),c=(l=r.get(s),e$1X.multiply(u,l,new e$1X));o.set(s,c),a.remove(s)}a.length>0&&t.updateObjsColor(a,Zr$3.MIX,!0),o.length>0&&t.updateObjsColor(o,Zr$3.REPLACE,!0)}function _0x193cbb(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1Q;for(var a in e$1Q.clone(n,o),r._hash)if(r._hash.hasOwnProperty(a)){var s=r.get(a),l=u$Z(o.get(a),new e$1X),u=e$1X.multiply(l,s,new e$1X);o.set(a,u)}o.length>0&&t.updateObjsColor(o,Zr$3.MIX,!0),i.length>0&&t.updateObjsColor(i,e.selectColorType,!0)}function _0x109c04(e,t){var i=t._pickInfo,n=[];for(var r in i)if(i.hasOwnProperty(r)&&"0"!==r){var o=new _0xee2f65(t,r);Object.assign(o,e._layerScheduler._attributes[r]),o.id=r,o.batchId=i[r].batchId,o.instanceIds=i[r].instanceIds,n.push(o)}return n}_0x4881fc.prototype.createResources=function(e,t){if(this._bufferPrepared||_0x416d97(this,e,t,t._context),e$2e(this._sp)||_0x1dc467(e,t,this),_0x44c957(this,e,t),t._fileType===p$T.ClampGroundRealtimeRasterCache)return this._bufferPrepared},_0x4881fc.prototype.pushClampCommands=function(e,t,i){var n=this._colorCommand;e$2e(this._clampSelected)&&this._clampSelected?(i._fileType===p$T.ClampGroundPolygon||i._fileType===p$T.ClampGroundLine?(n.pass=Le$q.GLOBE+1,this._stencilCommand.pass=Le$q.GLOBE+1,e$2e(this._selectedStencilCommand)&&e$2e(this._selectedColorCommand)&&(this._selectedStencilCommand.pass=Le$q.GLOBE+1,this._selectedColorCommand.pass=Le$q.GLOBE+1)):i._fileType===p$T.ClampObjectPolygon&&(n.pass=Le$q.ClampObject,this._stencilCommand.pass=Le$q.ClampObject,e$2e(this._selectedStencilCommand)&&e$2e(this._selectedColorCommand)&&(this._selectedStencilCommand.pass=Le$q.ClampObject,this._selectedColorCommand.pass=Le$q.ClampObject)),t.push(this._stencilCommand),t.push(n),e$2e(this._selectedStencilCommand)&&e$2e(this._selectedColorCommand)&&(t.push(this._selectedStencilCommand),t.push(this._selectedColorCommand))):(i._fileType===p$T.ClampGroundPolygon||i._fileType===p$T.ClampGroundLine?(n.pass=Le$q.GLOBE+1,this._stencilCommand.pass=Le$q.GLOBE+1):i._fileType===p$T.ClampObjectPolygon&&(n.pass=Le$q.ClampObject,this._stencilCommand.pass=Le$q.ClampObject),t.push(this._stencilCommand),t.push(n))},_0x4881fc.prototype.isTransparent=function(e){return e._style3D.fillForeColor.alpha<e.maxTransparentAlpha&&e._pointCloudShading.renderMode!==_0x2c4f4b.VOXEL&&e.orderIndependentTranslucency},_0x4881fc.prototype.pushCommandsForNormalAndDepthFrameBuffer=function(e,t){!e$2e(this._normalAndDepthCommand)||(e.isSilhouette()?e$2e(this._hasSilhouette)&&this._hasSilhouette&&t.push(this._normalAndDepthCommand):t.push(this._normalAndDepthCommand))},_0x4881fc.prototype.pushCommandsForPostEffectFrameBuffer=function(e,t){!e.bloomEnable||!e$2e(this._postEffectCommand)||(e.bloomEnable&&e$2e(this._postEffectCommand)||this._hasBloomOperation)&&t.push(this._postEffectCommand)},_0x4881fc.prototype.pushCommandsForClampFrameBuffer=function(e,t){!this._intersectWithClipPlane||!e$2e(this._clampColorCommand)||(t.push(this._clipStencilCommand),t.push(this._clampColorCommand))},_0x4881fc.prototype.pushCommandsForFrameBuffer=function(e,t,i,n){t==Qe$c.NORMAL_AND_DEPTH?this.pushCommandsForNormalAndDepthFrameBuffer(e,i):t==Qe$c.POSTEFFECT_FILTER?this.pushCommandsForPostEffectFrameBuffer(e,i):t==Qe$c.CLAMP?this.pushCommandsForClampFrameBuffer(e,i):t==Qe$c.PICKRECT?this.pushCommandsForPickRectBuffer(e,i):t==Qe$c.SQRESULT?this.pushCommandsForSpatialQueryBuffer(e,i):t==Qe$c.RASTER&&this.pushCommandsForRasterHeightMap(n,e,i)},_0x4881fc.prototype.isNeedRasterized=function(e){for(var t in e){if(!e$2e(this._layerImagerys[t])||this._layerImagerys[t].length!=e[t].length)return!0;for(var i=0;i<e[t].length;i++)if(this._layerImagerys[t][i].level!=e[t][i].level||this._layerImagerys[t][i].x!=e[t][i].x||this._layerImagerys[t][i].y!=e[t][i].y)return!0}return!1},_0x4881fc.prototype.pushCommands=function(e,t,i){if(e$2e(this._colorCommand)){if(e$2e(i._imageryLayer)&&e$2e(this._cartographic)&&e$2e(this._imagerys)&&!this._imageRasterFinish&&this.updateImageryTexture(i,e),e$2e(this._dayTextureAlpha)&&e$2e(this._imagerys))for(var n=0;n<this._imagerys.length;n++){var r=this._imagerys[n].imageryLayer;this._dayTextureAlpha[n]=r.alpha}if(e.passes.pick&&e$2e(this._stencilCommand))return t.push(this._stencilCommand),void(this._pickCommand&&t.push(this._pickCommand));if(i._spatialClipEnable)return e$2e(this._clipCommand)||this.createSpatialClipCommand(e,i),void t.push(this._clipCommand);if(!e.passes.depth||i._fileType!==p$T.IconPoint&&i._fileType!==p$T.Text){var o=e._fboState.frameBufferType;if(e$2e(o)&&(o===Qe$c.NORMAL_AND_DEPTH||o===Qe$c.POSTEFFECT_FILTER||o===Qe$c.CLAMP||o===Qe$c.PICKRECT||o===Qe$c.SQRESULT||o===Qe$c.RASTER&&(4&e.useType)>0))return void this.pushCommandsForFrameBuffer(i,o,t,e);if(i._style3D.fillStyle!==fr$3.WireFrame||i._fileType===p$T.ClampGroundPolygon){i.LoadingPriority,_0x539352.UsePagedLodInfo;var a=this._colorCommand,s=Le$q.S3MTiles,l=this._mapPass,u=!1;if(a.renderState=i._rsColor,e$2e(this.materialPass)&&this.materialPass._alphaMode===_0x36a597.BLEND&&!e$2e(i.waterEffectSet))u=!0;else if(i._isTransparencyOptimization){for(var c in l)if(l[c]._bTransparentSorting){u=!0;break}}else for(var c in l)if(l[c]._bTransparentSorting){s+=1;break}if(this._isSelected&&i.selectedColor.alpha<1&&(u=!0),!(e.passes.pick&&i._scene.pickPointEnabled)&&(this.isTransparent(i)||u)&&(i.partlyTransparent?t.push(this._transparentCommand):s=i.orderIndependentTranslucency?Le$q.TRANSLUCENT:s),i._fileType===p$T.IconPoint||i._fileType===p$T.Text?s=Le$q.Label_Billboard:i._pointCloudShading.renderMode==_0x2c4f4b.VOXEL&&(s=Le$q.Voxel_Billboard),e$2e(this._stencilCommand))this.pushClampCommands(e,t,i);else if(this.oriPassGroup!==Le$q.OVERLAY&&(a.pass=i.receiveObjectClamp?s:Le$q.NonClampObject,a.pass+=this._passIncrement),i._fileType===p$T.ClampGroundRealtimeRasterCache)e$2e(this._level)&&(a._globeIndex={level:this._level,row:this._row,col:this._col}),e$2e(a)&&this._updateBatchTable&&Object.keys(this._pickInfo).length>0&&this.updateBatchTable(e,e.context,i),a&&e.commandListRealtimeRaster.push(a);else if(this._clipBounds.length>0)for(n=0;n<this._clipBounds.length;n++){var h=this._clipBounds[n].max,d=this._clipBounds[n].min,f=i$$.shallowClone(a);if(void 0!==h&&void 0!==d){var p=_0xda32c8(h,d);f._uniformMap=p$19(p,a._uniformMap),f.shaderProgram=this._spUnFinalResolution,t.push(f)}}else if(this._plusRoArray.length>0){var _=this._plusRoArray.length-1,m=this._plusRoArray[_];for(n=0;n<m.length;n++)t.push(m[n].command)}else a&&t.push(a)}i._style3D.fillStyle!==fr$3.Fill?i.wireFrameMode===_0x1d226a.EffectOutline||i.wireFrameMode===_0x1d226a.Sketch?(e$2e(this._regularEdgeCommand)&&(t.push(this._regularEdgeCommand),i._addRenderedEdge(this._regularEdgeCommand.edgeTotalLength,this._regularEdgeCommand.edgeCount)),e$2e(this._silhouetteEdgeCommand)&&(t.push(this._silhouetteEdgeCommand),i._addRenderedEdge(this._silhouetteEdgeCommand.edgeTotalLength,this._silhouetteEdgeCommand.edgeCount))):i.wireFrameMode===_0x1d226a.Quad?e$2e(this._wireFrameCommands.quad)&&t.push(this._wireFrameCommands.quad):i.wireFrameMode===_0x1d226a.Triangle&&e$2e(this._wireFrameCommands.triangle)&&t.push(this._wireFrameCommands.triangle):e$2e(this._regularEdgeCommand)&&this._isSelected&&i._selectColorType===Zr$3.WIREFRAME&&(t.push(this._regularEdgeCommand),i._addRenderedEdge(this._regularEdgeCommand.edgeTotalLength,this._regularEdgeCommand.edgeCount)),this._rasterized||i._fileType===p$T.ClampGroundRealtimeRasterCache&&this.refreshRaster(e),this._rasterized=!0}}};var _0x2c07df=new e$1X;function _0x38ba9a(e,t){var i=e.themeStyle;if(e$2e(i)){if(!e$2e(i.color)&&e$2e(i.pbrMaterialIndex)){e$2e(t._featureArray)||(t._featureArray=_0x109c04(e,t));for(var n=t._featureArray,r=0;r<n.length;r++){var o=n[r];Object.assign(o,e._layerScheduler._attributes[o.id]);var a=i.pbrMaterialIndex.evaluate(o);e$2e(a)||(a=-1),t._idsPBRIndexMap.set(o.id,{batchId:o.batchId,instanceIds:o.instanceIds,pbrMaterialIndex:a,dirty:!0})}t._updateBatchTable=!0,t._themeDirty=!1}e$2e(t._featureArray)||(t._featureArray=_0x109c04(e,t));for(n=t._featureArray,r=0;r<n.length;r++){o=n[r];Object.assign(o,e._layerScheduler._attributes[o.id]);var s=void 0;e$2e(i.color)&&(s=i.color.evaluateColor(o,_0x2c07df));var l=void 0;e$2e(i.show)&&(l=i.show.evaluate(o));var u=t._idsOperationMap.get(o.id);if(e$2e(u)||(u={batchId:o.batchId,instanceIds:o.instanceIds,skeletonId:-1,operationValue:new e$2c,dirty:!0},t._idsOperationMap.set(o.id,u)),e$2e(s)&&(t._idsColorMap.set(o.id,{batchId:o.batchId,instanceIds:o.instanceIds,color:e$1X.clone(s),dirty:!0}),u.operationValue.x=1&u.operationValue.x|_0x27a6bb.SetColor,u.dirty=!0),e$2e(l)){if(l){var c=_0x27a6bb.ALL^_0x27a6bb.HIDE;u.operationValue.x&=c}else u.operationValue.x=1&u.operationValue.x|_0x27a6bb.HIDE;u.dirty=!0}}t._updateBatchTable=!0,t._themeDirty=!1}}function _0x416d97(e,t,i,n){_0x2f7f72(e,t,n),_0x24bc87(e,t,i,n),0===e._vertexBufferToCreate.length&&0===e._indexBufferToCreate.length&&(e._bufferPrepared=!0,e._instanceBuffer=void 0)}_0x4881fc.prototype.initLayerSetting=function(e){if(this._isClamp=_0x454d12(e,this),e$2e(e.waterEffectSet)||e.multiTemporalUseWater){let i=e.multiTemporalUseWater?e.waterParameter.averageHeight:e.waterEffectSet[0].averageHeight;var t={boundingVolume:this._boundingVolume,distance:e.height+e.style3D.bottomAltitude+i};this._waterIndex=e.addWaterPlane(t)}e.allObjsHide&&this.updateAllObjsVisible(e,!e.allObjsHide),Object.keys(e._objsOperationList).length>0&&this.updateObjsOperation(e._objsOperationList),e.themeStyle&&_0x38ba9a(e,this),Object.keys(e._objsColorList).length>0&&this.updateObjsColor(e._objsColorList),Object.keys(e._objsOffsetList).length>0&&this.updateObjsTranslate(e._objsOffsetList)},_0x4881fc.prototype.initLayerSettingBak=function(e){if(this._isClamp=_0x454d12(e,this),e$2e(e.waterEffectSet)){var t={boundingVolume:this._boundingVolume,distance:e.height+e.style3D.bottomAltitude+e.waterEffectSet[0].averageHeight};this._waterIndex=e.addWaterPlane(t)}if(e.allObjsHide&&this.updateAllObjsVisible(!e.allObjsHide),e.selectColorType===Zr$3.REPLACE?_0x445d61(e,this):e.selectColorType===Zr$3.MIX?_0xe2a67e(e,this):(this.updateObjsColor(e._selections,e.selectColorType,!0),_0x193cbb(e,this)),e._objsVisibleList.length>0&&this.updateObjsVisible(e._objsVisibleList,e._objsVisibleList.values[0]),e$2e(e._objsHeightList)&&e._objsHeightList.length>0&&this.updateExtendHeight(e._objsHeightList),Object.keys(e._objsOperationList).length>0){var i=Math.max(Math.abs(e.selectedTranslate.x),Math.abs(e.selectedTranslate.y),Math.abs(e.selectedTranslate.z));this.updateObjsOperation(e._objsOperationList,i)}},_0x4881fc.prototype.createAllCommands=function(e,t){e$2e(this._colorCommand)||(e$2e(t.waterEffectSet)||t.multiTemporalUseWater?this.createWater(t):this.createCommand(e,t),this.initLayerSetting(t))};var _0x3ad3ec=new _0x2787b1,_0x57d2e7=new _0x5659c7;function _0x2f7f72(e,t,i){for(var n=e._vertexBufferToCreate;n.length;){var r=n.peek();if(_0x3ad3ec.set(i,e,r),!t.jobScheduler.execute(_0x3ad3ec,i$R.BUFFER))break;n.dequeue()}}function _0x24bc87(e,t,i,n){!e$2e(e._wireFrameIndexBuffers)&&i.wireFrameMode===_0x1d226a.Triangle&&i.style3D.fillStyle!==fr$3.Fill&&(e._wireFrameIndexBuffers=e.createWireframeIndexBuffer(n));for(var r=e._vertexPackage.verticesCount,o=e._indexBufferToCreate;o.length;){var a=o.peek();if(_0x57d2e7.set(n,e,a,r),!t.jobScheduler.execute(_0x57d2e7,i$R.BUFFER))break;o.dequeue()}}var _0x318374=new _0x2445e0;function _0x44c957(e,t,i){if(i._isS3MBlock){for(var n in e._mapPass)if(e._mapPass.hasOwnProperty(n)){(l=e._mapPass[n]).initTexture(),l.initBakeTexture(),l.requestSubTextures(t,t.context,i,e._subTexturesToUpload),l.requestBakeSubTextures(t,t.context,i,e._subTexturesToUpload)}for(var r=e._subTexturesToUpload;r.length;){var o=r.peek(),a=o.texture,s=o.subTextureInfo;if(_0x318374.set(t.context,e,a,s,i._textureLod),!t.jobScheduler.execute(_0x318374,i$R.TEXTURE))break;r.dequeue()}if(0===r.length)for(var n in e._mapPass)if(e._mapPass.hasOwnProperty(n)){var l;(l=e._mapPass[n]).enableTextureRenderable(),l.enableBakeTextureRenderable()}}}function _0x12c8b7(e){var t=e._fileType;return e.shadowType!=_0x325616.NONE&&(t===p$T.OSGBFile||t===p$T.OSGBCacheFile||t===p$T.PointCloudFile)}function _0x454d12(e,t){var i=e._fileType,n=i==p$T.ClampGroundPolygon||i==p$T.ClampObjectPolygon||i==p$T.ExtendClampPolygonCache||i==p$T.ClampGroundLine||i==p$T.ClampObjectLine;return t._clampRegionEdge&&(n=!1),n}_0x4881fc.prototype.createWater=function(e){var t=this._arrIndexPackage[0];if(e$2e(t)){var i=e._context,n=this._vertexPackage,r=n.vertexAttributes;this._instanceCount=n.instanceCount,this._instanceMode=n.instanceMode,this._attributeLocations=n.attrLocation;var o=Le$q.S3MTiles;_0x1a3769(n);var a=this._mapPass[t.materialCode],s=W$18.TRIANGLES;switch(t.primitiveType){case 1:s=W$18.POINTS;break;case 2:s=W$18.LINES;break;case 4:s=W$18.TRIANGLES}var l=new i$$({primitiveType:s,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:o,count:t.indicesCount,cull:!0});l.addUniformBuffer(e._context.uniformState._sceneUBO),l.addUniformBuffer(e._layerUBO),l.addUniformBuffer(e._waterLayerUbo),l.addUniformBuffer(this._meshUBO),l.addUniformBuffer(this._materialUBO),l.pickId="vSecondColor",l.vertexArray=new c$13({context:i,attributes:r,indexBuffer:t.indexBuffer}),this.materialPass=a,l.shaderProgram=this._sp,l.renderState=e._rsColor,l.castShadows=!1,l.receiveShadows=!1,l.selectCastShadows=!1,this._uniformMap={},_0x2c7aca.create(e._frameState,e,this,this._uniformMap),l.uniformMap=this._uniformMap,this._colorCommand=l}},_0x4881fc.prototype.createWireframeIndexBuffer=function(e){var t,i,n;if(e$2e(t=this._arrIndexPackage[0])&&e$2e(t.indicesTypedArray)){i={indices:0===t.indexType?new Uint16Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesCount):new Uint32Array(t.indicesTypedArray),primitiveType:W$18.TRIANGLES},k$14.toWireframe(i),n=i.indices;var r=ce$z.UNSIGNED_SHORT;return this._vertexPackage.verticesCount>e$2d.SIXTY_FOUR_KILOBYTES?(r=ce$z.UNSIGNED_INT,n=new Uint32Array(n)):n=new Uint16Array(n),t$X.createIndexBuffer({context:e,typedArray:n,usage:A$18.STATIC_DRAW,indexDatatype:r})}},_0x4881fc.prototype.createStencilCommandForClampLayer=function(e,t){var i=void 0;(i=i$$.shallowClone(e)).renderState=t,this._stencilCommand=i},_0x4881fc.prototype.createClampColorCommand=function(e){e._context;var t=this._colorCommand;if(e$2e(t)&&e.isRenderClipSection()&&!e$2e(this._clampColorCommand)){this._intersectWithClipPlane=this.isIntersectWithClipPlane(e);var i=i$$.shallowClone(t);i.renderState=e._rsClampColor,this._clampColorCommand=i;var n=i$$.shallowClone(t);n.renderState=e._rsStencil,this._clipStencilCommand=n}};var _0x5147ab=new h$18;function _0x1a3769(e){for(var t in e.attrLocation){var i=e.attrLocation[t];e.vertexAttributes[i].name=t}}_0x4881fc.prototype.refreshRasterTile=function(e,t){var i=e._rectangle;e$2e(h$18.intersection(t,i,_0x5147ab))&&(e._rasterized=!1),e$2e(e._southwestChild)&&this.refreshRasterTile(e._southwestChild,t),e$2e(e._southeastChild)&&this.refreshRasterTile(e._southeastChild,t),e$2e(e._northwestChild)&&this.refreshRasterTile(e._northwestChild,t),e$2e(e._northeastChild)&&this.refreshRasterTile(e._northeastChild,t)},_0x4881fc.prototype.refreshRasterTile2=function(e,t,i,n){var r=!1;if(e._level>=t){var o=Math.pow(2,e._level-t),a=Math.floor(e.y/o),s=Math.floor(e.x/o);a===i&&s===n&&(r=!0)}else{o=Math.pow(2,t-e._level),a=Math.floor(i/o),s=Math.floor(n/o);a===e.y&&s===e.x&&(r=!0)}r&&(e._rasterized=!1,e$2e(e._southwestChild)&&this.refreshRasterTile2(e._southwestChild,t,i,n),e$2e(e._southeastChild)&&this.refreshRasterTile2(e._southeastChild,t,i,n),e$2e(e._northwestChild)&&this.refreshRasterTile2(e._northwestChild,t,i,n),e$2e(e._northeastChild)&&this.refreshRasterTile2(e._northeastChild,t,i,n))},_0x4881fc.prototype.refreshRaster=function(e,t){if(this._layer._fileType===p$T.ClampGroundRealtimeRasterCache)if(e$2e(this._level)&&!e$2e(t))this.refreshRasterTile2(e._quadtree._levelZeroTiles[0],this._level,this._row,this._col),this.refreshRasterTile2(e._quadtree._levelZeroTiles[1],this._level,this._row,this._col);else if(e$2e(e._quadtree._levelZeroTiles)){var i=new h$18(this._boundingVolume.center.x-this._boundingVolume.radius,this._boundingVolume.center.y-this._boundingVolume.radius,this._boundingVolume.center.x+this._boundingVolume.radius,this._boundingVolume.center.y+this._boundingVolume.radius);i.west=e$2d.toRadians(i.west),i.north=e$2d.toRadians(i.north),i.east=e$2d.toRadians(i.east),i.south=e$2d.toRadians(i.south),this.refreshRasterTile(e._quadtree._levelZeroTiles[0],i),this.refreshRasterTile(e._quadtree._levelZeroTiles[1],i)}},_0x4881fc.prototype.createSpatialClipCommand=function(e,t){if(!e$2e(this._clipCommand)){var i=this._colorCommand,n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push("SQCLIP"),r.defines.push("SQCLIP"),e.useLogDepth&&r.defines.push("LOG_DEPTH");var o=i$$.shallowClone(i);o.uniformMap.uFrontDepthTexture=function(){return t._sqTextures[0]},o.uniformMap.uBackDepthTexture=function(){return t._sqTextures[1]},o.uniformMap.uFrontColorTexture=function(){return t._sqTextures[2]},o.uniformMap.uSQMode=function(){return t._sqMode},o.shaderProgram=r$14.fromCache({context:t._context,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),this._clipCommand=o}},_0x4881fc.prototype.createCommand=function(e,t){if(e$2e(this._sp)){var i=t._context;if(!i.webgpu||!this._clampRegionEdge){var n=this._vertexPackage;if(e$2e(n.vertexAttributes)){e$2e(this._vertexArray)||_0x1a3769(n);var r=n.vertexAttributes;this._instanceCount=n.instanceCount,this._instanceMode=n.instanceMode,this._attributeLocations=n.attrLocation;var o=Le$q.S3MTiles,a=this._clampRegionEdge?t._rsClampLineColor:t._rsColor,s=t._fileType,l=this._arrIndexPackage[0];t._hasWireframe||this._arrIndexPackage.length>1&&(t._hasWireframe=!0);var u,c=_0xf77618.Default,h=n.verticesCount,d=W$18.POINTS;if(e$2e(l))switch(!0===(c=u$Z(this._mapPass[l.materialCode],_0xf77618.Default))._bTransparentSorting&&(o=Le$q.S3MTiles+1),u=l.indexBuffer,l.primitiveType){case 1:d=W$18.POINTS;break;case 2:d=W$18.LINES;break;case 4:d=W$18.TRIANGLES}else if(e$2e(this._ptIndexGroup)){var f,p,_,m,g,x=0;for(g in this._ptIndexGroup)this._ptIndexGroup.hasOwnProperty(g)&&(p=t._pointCloudLayerNames[g],t._pointCloudLayerVisible[p]&&(_=this._ptIndexGroup[g].start,x+=(m=this._ptIndexGroup[g].end)-_+1));if(x>0){var y=ce$z.createTypedArray(n.verticesCount,x),v=0;for(g in this._ptIndexGroup)if(this._ptIndexGroup.hasOwnProperty(g)&&(p=t._pointCloudLayerNames[g],t._pointCloudLayerVisible[p]))for(_=this._ptIndexGroup[g].start,m=this._ptIndexGroup[g].end,f=_;f<=m;)y[v++]=f++;var $=n.verticesCount>=e$2d.SIXTY_FOUR_KILOBYTES&&i.elementIndexUint?ce$z.UNSIGNED_INT:ce$z.UNSIGNED_SHORT;u=t$X.createIndexBuffer({context:i,typedArray:y,usage:A$18.STATIC_DRAW,indexDatatype:$}),this.isBillboardPoint()&&(u=this._context.createBillboardPointIndexBuffer())}else h=1}this.isBillboardPoint()&&(d=W$18.TRIANGLES),this.materialPass=c,this.useWValue=4===r[0].componentsPerAttribute,e$2e(this._attributeLocations.aVertexWeight)&&(this.useWValue=1),(1===d||s===p$T.ClampGroundRealtimeRasterCache&&e$2e(this._attributeLocations.aTexCoord1))&&(this.useLineColor=!0),this.oriPassGroup=o;var b=new i$$({primitiveType:d,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:o,count:e$2e(u)?void 0:h,cull:!0,occlude:!1});this._entity&&this._entity.isFlatten&&(b.cull=!1),b.opaquePass=Le$q.S3MTiles,t._fileType===p$T.ClampGroundRealtimeRasterCache&&(b.layerId=t.id),b.pickId="vSecondColor",s===p$T.PointCloudFile&&(b.pickId="vPosition"),b.instanceCount=this._instanceCount,this.isBillboardPoint()&&(b.instanceCount=this._vertexPackage.verticesCount),b.vertexArray=new c$13({context:i,attributes:r,indexBuffer:u}),b.shaderProgram=this._sp,_0x454d12(t,this)&&((t._fileType===p$T.ClampGroundPolygon||t._fileType===p$T.ClampObjectPolygon||t._fileType===p$T.ClampGroundLine||t._fileType===p$T.ExtendClampPolygonCache)&&(b.pickId=void 0),this._isClamp=!0),b.renderState=a,b.uniformMap=this._uniformMap,s===p$T.ClampGroundRealtimeRasterCache&&(b.useRelativeOrigin=!1),b.addUniformBuffer(t._context.uniformState._sceneUBO),b.addUniformBuffer(t._context.uniformState._lightUBO),b.addUniformBuffer(t._layerUBO),b.addUniformBuffer(this._meshUBO),b.addUniformBuffer(this._materialUBO),e$2e(t._polylineEffectUbo)?b.addUniformBuffer(t._polylineEffectUbo):e$2e(t._regionEffectUbo)&&b.addUniformBuffer(t._regionEffectUbo),e$2e(this._volumeUBO)&&b.addUniformBuffer(this._volumeUBO),_0x454d12(t,this)&&this.createStencilCommandForClampLayer(b,t._rsStencil);var T=_0x12c8b7(t);b.castShadows=T,b.receiveShadows=T,b.selectCastShadows=!0,b.owner=this,(s==p$T.IconPoint||s===p$T.Text)&&(b.cull=!1),this._colorCommand=b,this.createWireFrameCommand(t,r)}}}},_0x4881fc.prototype.createOneEdgeCommand=function(e,t,i,n,r){if(!e$2e(i.attributes)||0==i.attributes.length||!e$2e(i.instanceCount)||0==i.instanceCount)return null;var o,a,s=Le$q.OPAQUE+1,l=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:s,owner:this,cull:!0});if(l.vertexArray=new c$13({context:e,attributes:i.attributes,indexBuffer:n}),l.instanceCount=i.instanceCount,r){var u="RegularEdge_"+t.id,c="RegularEdge_"+t.id;o=new s$V({name:u,sources:[_0x115b1e]}),a=new s$V({name:c,sources:[_0x59e865]})}else{u="SilhouetteEdge_"+t.id,c="SilhouetteEdge_"+t.id;o=new s$V({name:u,sources:[_0x115b1e]}),a=new s$V({name:c,sources:[_0x59e865]}),o.defines.push("SILHOUETTE"),a.defines.push("SILHOUETTE")}o.defines.push("ANTIALIASING"),a.defines.push("ANTIALIASING"),a.defines.push("POLYGON_OFFSET"),t._hasExcavation&&(o.defines.push(D$V.EXCAVATION),a.defines.push(D$V.EXCAVATION)),t._hasServerExcavation&&(o.defines.push("SERVEREXCAVATION"),a.defines.push("SERVEREXCAVATION")),t.swipeEnabled&&a.defines.push(D$V.APPLY_SWIPE),t._clipping&&a.defines.push("CLIP"),t._section&&a.defines.push("CLIPPLANE"),this._batchTable&&(o.defines.push("BatchTable"),-1===o.defines.indexOf("BatchTableMultiRow")&&o.defines.push("BatchTableMultiRow")),t._selectColorType===Zr$3.WIREFRAME&&t._style3D.fillStyle===fr$3.Fill&&a.defines.push(D$V.WIREFRAME_SELECT_TYPE);var h=0;t.wireFrameMode===_0x1d226a.Sketch&&(h=1),o.defines.push("MODE "+h),a.defines.push("MODE "+h),l.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:i.attributeLocations}),l.renderState=d$1m.fromCache({depthTest:{enabled:!0,func:re$G.LESS_OR_EQUAL},cull:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var d={uStrokesTexture:function(){return e$2e(t._edgeStrokesTexture)||t._initEdgeTexture(),t._edgeStrokesTexture}};return l.uniformMap=p$19(d,this._colorCommand.uniformMap),l.edgeTotalLength=i.edgeLength,l.edgeCount=i.instanceCount,l.wireframeType=t.wireFrameMode,l.addUniformBuffer(t._context.uniformState._sceneUBO),l.addUniformBuffer(t._layerUBO),l.addUniformBuffer(this._meshUBO),l},_0x4881fc.prototype.createEdgeCommands=function(e){if(e$2e(this._edgeGeometry)){var t=e._context,i=this._edgeGeometry;_0x28a85f.createRegularEdgeAttributes(t,i.regular),_0x28a85f.createSilhouetteEdgeAttributes(t,i.silhouette);var n=_0x28a85f.createIndexBuffer(t);this._regularEdgeCommand=this.createOneEdgeCommand(t,e,i.regular,n,!0),this._silhouetteEdgeCommand=this.createOneEdgeCommand(t,e,i.silhouette,n,!1),(e$2e(this._regularEdgeCommand)||e$2e(this._silhouetteEdgeCommand))&&e.wireFrameMode===_0x1d226a.Quad&&(e.wireFrameMode=_0x1d226a.EffectOutline)}},_0x4881fc.prototype.createTrangleWireFrameCommand=function(e,t){if(e$2e(this._arrIndexPackage[0])&&e$2e(this._colorCommand)){var i=e._context;this._arrIndexPackage[0].indicesCount;var n=i$$.shallowClone(this._colorCommand);n.primitiveType=W$18.LINES,n.vertexArray=new c$13({context:i,attributes:t,indexBuffer:this._wireFrameIndexBuffers}),this._wireFrameCommands.triangle=n}},_0x4881fc.prototype.createQuadWireFrameCommand=function(e,t,i){var n=e._context,r=2===i.primitiveType?W$18.LINES:W$18.LINE_STRIP,o=i$$.shallowClone(this._colorCommand);o.pass=Le$q.LOG_DEPTH_OVERLAY,o.count=void 0,o.primitiveType=r,o.vertexArray=new c$13({context:n,attributes:t,indexBuffer:i.indexBuffer});var a=this._colorCommand.shaderProgram.vertexShaderSource.clone(),s=this._colorCommand.shaderProgram.fragmentShaderSource.clone(),l=a.defines.indexOf(D$V.SKETCH_MODE);l>0&&a.defines.splice(l,1),(l=a.defines.indexOf(D$V.COMPUTE_W_VALUE))>0&&a.defines.splice(l,1),(l=a.defines.indexOf(D$V.EMISSION_TEXTURE_ATLAS))>0&&a.defines.splice(l,1),(l=s.defines.indexOf(D$V.SKETCH_MODE))>0&&s.defines.splice(l,1),(l=s.defines.indexOf(D$V.COMPUTE_W_VALUE))>0&&s.defines.splice(l,1),(l=s.defines.indexOf(D$V.EMISSION_TEXTURE_ATLAS))>0&&s.defines.splice(l,1),a.defines.push("QUAD_OUTLINE"),s.defines.push("QUAD_OUTLINE"),s.defines.push("Only_LineColor"),o.shaderProgram=r$14.fromCache({context:n,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations}),o.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),this._wireFrameCommands.quad=o},_0x4881fc.prototype.createWireFrameCommand=function(e,t){if(!this._isClamp&&e._fileType!==p$T.ClampGroundPolygon){if(this._arrIndexPackage.length>1)if(13==this._arrIndexPackage[1].primitiveType)this.createEdgeCommands(e);else if(2==this._arrIndexPackage[1].primitiveType){var i=this._arrIndexPackage[1];this.createQuadWireFrameCommand(e,t,i)}e.wireFrameMode===_0x1d226a.Triangle&&e.style3D.fillStyle!==fr$3.Fill&&this.createTrangleWireFrameCommand(e,t)}},_0x4881fc.prototype.updateTheme=function(e){_0x38ba9a(e,this)},_0x4881fc.prototype.updateObjsColor=function(e){if(this._initialize&&e$2e(this._selectionInforMap)&&_0x43b37d.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&e$2e(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)){var n=e[i];if(e$2e(n)){var r=t[i];this._updateBatchTable=!0;var o=r.batchId,a=r.instanceIds;this._idsColorMap.set(i,{batchId:o,instanceIds:a,color:n,dirty:!0});var s=this._idsOperationMap.get(i);e$2e(s)||(s={batchId:o,instanceIds:a,operationValue:new e$2c,dirty:!0}),s.dirty=!0,s.operationValue.x=n===e$1X.TRANSPARENT?254&s.operationValue.x:1|s.operationValue.x,this._passIncrement=n.alpha<1?1:0,this._idsOperationMap.set(i,s)}}}},_0x4881fc.prototype._radiusToExpand=function(e){if(!this._selectionInforMap||!this._initialize||!e$2e(this._colorCommand))return 0;var t=this._selectionInforMap._hash,i=0;for(var n in t)!t.hasOwnProperty(n)||!e[n]||(i=Math.max(o$1p.magnitude(e[n]),i),this._oriBoundingSphere||(this._oriBoundingSphere=this._boundingVolume.clone()),this._colorCommand.boundingVolume.radius=this._oriBoundingSphere.radius+i,this._boundingVolume.radius=this._oriBoundingSphere.radius+i);return i},_0x4881fc.prototype.updateObjsTranslate=function(e){if(this._initialize&&e$2e(this._selectionInforMap)&&_0x43b37d.S3M!==this._version){var t=this._selectionInforMap.length,i=this._colorCommand;if(!(t<1)&&e$2e(i)){var n=this._selectionInforMap._hash,r=this._idsTranslateMap.length,o=!1;for(var a in n)if(n.hasOwnProperty(a)){var s=e[a];if(s){var l=n[a];this._updateBatchTable=!0;var u=l.batchId,c=l.instanceIds;this._idsTranslateMap.set(a,{batchId:u,instanceIds:c,translate:s,dirty:!0});var h=this._idsOperationMap.get(a);e$2e(h)||(h={batchId:u,instanceIds:c,operationValue:new o$1p,dirty:!0}),h.dirty=!0,o$1p.equals(s,o$1p.ZERO)?(h.operationValue.x=h.operationValue.x&(_0x27a6bb.ALL^_0x27a6bb.OFFSET),this._idsOperationMap.set(a,h)):(h.operationValue.x=h.operationValue.x|_0x27a6bb.OFFSET,o=!0)}}e$2e(this._entity)&&(this._entity.hasTranslate=o),i.cull=!o;var d=this._idsTranslateMap.length;(d>0&&0===r||r>0&&0===d)&&d>0&&0===r&&this.appendProgramDefine({layer:this._layer},!0,!1,D$V.Translation,!0,!1)}}},_0x4881fc.prototype.updateAllObjsVisible=function(e,t){if(this._initialize&&e$2e(this._selectionInforMap)&&_0x43b37d.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&e$2e(this._colorCommand))){var i=this._selectionInforMap._hash;for(var n in i)if(i.hasOwnProperty(n)&&!e._objsVisibleList.contains(n)){var r=i[n];this._updateBatchTable=!0;var o=r.batchId,a=r.instanceIds,s=this._idsOperationMap.get(n);e$2e(s)||(s={batchId:o,instanceIds:a,operationValue:new e$2c,dirty:!0}),s.dirty=!0,s.operationValue.x=t?s.operationValue.x&(_0x27a6bb.ALL^_0x27a6bb.HIDE):s.operationValue.x|_0x27a6bb.HIDE,this._idsOperationMap.set(n,s),s.operationValue.x===_0x27a6bb.RESET?delete e._objsOperationList[n]:(e._objsOperationList[n]=s.operationValue.x,e._objsHideList.set(n,!0))}}},_0x4881fc.prototype.removeAllExtendHeight=function(){this._initialize&&e$2e(this._texCoord1)&&e$2e(this._colorCommand)&&this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1).vertexBuffer.copyFromArrayView(this._texCoord1)},_0x4881fc.prototype.removeExtendHeight=function(e){if(this._initialize&&e$2e(this._texCoord1)&&(!(this._selectionInforMap.length<1)&&e$2e(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)&&-1!=e.indexOf(parseInt(i))){var n,r,o,a,s=t[i];n=this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1),r=(a=s.vertexColorOffset*n.componentsPerAttribute)*S$14.getSizeInBytes(n.componentDatatype),o=s.vertexColorCount*n.componentsPerAttribute;var l=this._texCoord1.slice(a,o);n.vertexBuffer.copyFromArrayView(l,r)}}},_0x4881fc.prototype.updateExtendHeight=function(e){if(this._initialize&&e$2e(this._texCoord1)&&(!(this._selectionInforMap.length<1)&&e$2e(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)&&e.contains(i)){var n,r,o,a,s=t[i],l=e.get(i);n=this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1),r=(a=s.vertexColorOffset*n.componentsPerAttribute)*S$14.getSizeInBytes(n.componentDatatype),o=s.vertexColorCount*n.componentsPerAttribute;for(var u=S$14.createTypedArray(n.componentDatatype,o),c=0;c<s.vertexColorCount;c++)this._texCoord1[2*c+1+a]>.3&&this._texCoord1[2*c+1+a]<.8?(u[2*c]=l,u[2*c+1]=.5):this._texCoord1[2*c+1+a]>.8?(u[2*c]=l,u[2*c+1]=1):(u[2*c]=this._texCoord1[2*c+a],u[2*c+1]=0);n.vertexBuffer.copyFromArrayView(u,r)}}},_0x4881fc.prototype.updateObjsOperation=function(e,t){if(this._initialize&&e$2e(this._selectionInforMap)&&_0x43b37d.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&e$2e(this._colorCommand))){var i=this._selectionInforMap._hash,n=!1,r=_0x454d12(this._layer,this),o=!1,a=this._layer.isSilhouette(),s=!1,l=!1;for(var u in i)if(i.hasOwnProperty(u)){var c=e[u];if(e$2e(c)){var h=i[u];this._updateBatchTable=!0;var d=this._layer._lastSelectSkeletonId,f=d>-1?u+"_"+d:u,p=h.batchId,_=h.instanceIds,m=this._idsOperationMap.get(f);e$2e(m)||(m={batchId:p,instanceIds:_,skeletonId:d,operationValue:new e$2c,dirty:!0}),m.dirty=!0,m.operationValue.x=1&m.operationValue.x|c,this._idsOperationMap.set(f,m),(m.operationValue.x&_0x27a6bb.BLOOM)>0&&(n=!0),r&&(m.operationValue.x&_0x27a6bb.SELECTED)>0&&(o=!0),a&&(m.operationValue.x&_0x27a6bb.SELECTED)>0&&(s=!0),(m.operationValue.x&_0x27a6bb.SELECTED)>0&&(l=!0)}}this._hasBloomOperation=n,this._clampSelected=o,this._hasSilhouette=s,this._isSelected=l}};var _0x3d7a57=new o$1m(new o$1p(1,0,0),0);function _0x88c4f6(e,t){return o$1p.distance(e.center,t.center)<=e.radius+t.radius}function _0xb28f92(e,t){var i=!1,n=t.split(" "),r=!1;if(n.length>1){var o=n[0],a=n[1];for(var s in e.defines)if(-1!==e.defines[s].indexOf(o))return e.defines[s]=o+" "+a,!0;r=!0,e.defines.push(t)}else{for(var l=0,u=e.defines.length;l<u;l++)if(e.defines[l]===t){i=!0;break}i||(r=!0,e.defines.push(t))}return r}function _0x2cb26f(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function _0x3c43ee(e,t){e$2e(t)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),t.renderState=void 0,t.uniformMap=void 0,t.removeAllUniformBuffer())}function _0x13e4b7(e,t,i,n){if(!e$2e(i._labelPromiseArr[n])){var r=e._s3MTilesLabelStyle._textField;e.getAttributesById(t).then((function(e){if(i._labelPromiseArr[n]=void 0,e.hasOwnProperty(r)){var o=e[r];i._labelTextArray[n]=o,i._labelsCreated[t]=!0}}))}}_0x4881fc.prototype.isIntersectWithClipPlane=function(e){return!!e.isRenderClipSection()&&this._boundingVolume.intersectPlane(o$1m.fromCartesian4(e._oriClipPlane[0],_0x3d7a57))===Ae$w.INTERSECTING},_0x4881fc.prototype.setCustomClipBox=function(e,t){var i={layer:e};t?(this.appendProgramDefine(i,!1,!0,D$V.CLIP),e._section&&this.appendProgramDefine(i,!1,!0,D$V.CLIPPLANE)):(this.removeProgramDefine(i,!1,!0,D$V.CLIP),e._section&&this.removeProgramDefine(i,!1,!0,D$V.CLIPPLANE)),e$2e(this._clampColorCommand)&&(!this._clampColorCommand.shaderProgram.isDestroyed()&&this._clampColorCommand.shaderProgram.destroy(),this._clampColorCommand=void 0),e$2e(this._clipStencilCommand)&&(!this._clipStencilCommand.shaderProgram.isDestroyed()&&this._clipStencilCommand.shaderProgram.destroy(),this._clipStencilCommand=void 0)},_0x4881fc.prototype.updateShadow=function(e){var t=_0x12c8b7(this),i=this._colorCommand;!e$2e(i)||(i.castShadows=t,i.receiveShadows=t,i.selectCastShadows=!e$2e(e.waterEffectSet))},_0x4881fc.prototype.cloneSelectCommand=function(e){var t=e._context,i=new s$V({name:"S3MTilesSelection",sources:[_0x53b856]});e._clipping&&i.defines.push("CLIP"),i.defines.push("DepthEXT");var n=this._colorCommand;if(e$2e(n)){var r=n.shaderProgram.vertexShaderSource.clone(),o=void 0;if((o=i$$.shallowClone(n,o)).shaderProgram=r$14.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:i,attributeLocations:this._attributeLocations}),this._pickCommand=o,this._pickCommand.pass=Le$q.ClampObject,e$2e(this._stencilCommand)){var a=this._stencilCommand.shaderProgram.vertexShaderSource.clone(),s=this._stencilCommand.shaderProgram.fragmentShaderSource.clone();a.defines.push("SELECTED"),s.defines.push("SELECTED"),this._selectedStencilCommand=i$$.shallowClone(this._stencilCommand),this._selectedStencilCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations}),this._selectedColorCommand=i$$.shallowClone(this._colorCommand),this._selectedColorCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations})}}},_0x4881fc.prototype.createNormalAndDepthCommand=function(e){var t=e._context,i=this._colorCommand;if(e.isSilhouette()&&e$2e(i)&&!e$2e(this._normalAndDepthCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push(D$V.NORMAL_AND_DEPTH),r.defines.push(D$V.NORMAL_AND_DEPTH),e.isSilhouette()&&(n.defines.push(D$V.SILHOUETTE_SELECT_TYPE),r.defines.push(D$V.SILHOUETTE_SELECT_TYPE));var o=void 0;(o=i$$.shallowClone(i,o)).shaderProgram=r$14.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),this._normalAndDepthCommand=o}},_0x4881fc.prototype.createTransparentCommand=function(e){var t=e._context,i=this._colorCommand;if(e.partlyTransparent&&e$2e(i)&&!e$2e(this._transparentCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();r.defines.push("TRANSPARENT_PASS");var o=void 0;(o=i$$.shallowClone(i,o)).shaderProgram=r$14.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.pass=Le$q.TRANSLUCENT,this._transparentCommand=o}},_0x4881fc.prototype.createPostEffectCommand=function(e){var t=e._context,i=this._colorCommand;if(e.bloomEnable&&e$2e(i)&&!e$2e(this._postEffectCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push(D$V.POST_EFFECT),r.defines.push(D$V.POST_EFFECT);var o=void 0;(o=i$$.shallowClone(i,o)).shaderProgram=r$14.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.pass=Le$q.S3MTiles,this._postEffectCommand=o}},_0x4881fc.prototype.enableAjustTransparentBackColor=function(e){this.appendProgramDefine(e,!1,!0,D$V.TRANSPARENT_BACK_COLOR)},_0x4881fc.prototype.disableAjustTransparentBackColor=function(e){this.removeProgramDefine(e,!1,!0,D$V.TRANSPARENT_BACK_COLOR)},_0x4881fc.prototype.enableAdjustColor=function(e){this.appendProgramDefine(e,!1,!0,D$V.ADJUST_COLOR)},_0x4881fc.prototype.enableVertexCapture=function(e){this.appendProgramDefine(e,!0,!0,D$V.VERTEX_CAPTURE)},_0x4881fc.prototype.disableVertexCapture=function(e){this.removeProgramDefine(e,!0,!0,D$V.VERTEX_CAPTURE)},_0x4881fc.prototype.enableExcavation=function(e){this.appendProgramDefine(e,!0,!0,D$V.EXCAVATION)},_0x4881fc.prototype.disableExcavation=function(e){this.removeProgramDefine(e,!0,!0,D$V.EXCAVATION)},_0x4881fc.prototype.enableServerExcavation=function(e){this.appendProgramDefine(e,!0,!0,"SERVEREXCAVATION")},_0x4881fc.prototype.disableServerExcavation=function(e){this.removeProgramDefine(e,!0,!0,"SERVEREXCAVATION")},_0x4881fc.prototype.enableFlatten=function(e){e$2e(e.entity)&&e$2e(e.entity._boundingSphere)&&e$2e(e.boundingSphere)&&(_0x88c4f6(e.entity._boundingSphere,e.boundingSphere)&&(e.entity.isFlatten=!0,e$2e(this._colorCommand)&&(this._colorCommand.cull=!1)));this.appendProgramDefine(e,!0,!1,D$V.FALTTEN),this.appendProgramDefine(e,!0,!1,D$V.UseFloatTexture)},_0x4881fc.prototype.enableOverlay=function(e){this.appendProgramDefine(e,!0,!0,D$V.OVERLAY)},_0x4881fc.prototype.disableOverlay=function(e){this.removeProgramDefine(e,!1,!0,D$V.OVERLAY)},_0x4881fc.prototype.disableFlatten=function(e){e$2e(e.entity)&&(e.entity.isFlatten=!1),e$2e(this._colorCommand)&&(this._colorCommand.cull=!0),this.removeProgramDefine(e,!0,!1,D$V.FALTTEN),this.removeProgramDefine(e,!0,!1,D$V.UseFloatTexture)},_0x4881fc.prototype.enableHypsometric=function(e){this.appendProgramDefine(e,!0,!0,D$V.COMPUTE_W_VALUE),this.appendProgramDefine(e,!0,!0,D$V.HYPSOMETRIC)},_0x4881fc.prototype.disableHypsometric=function(e){this.removeProgramDefine(e,!0,!0,D$V.COMPUTE_W_VALUE),this.removeProgramDefine(e,!0,!0,D$V.EMISSION_TEXTURE_ATLAS),this.removeProgramDefine(e,!0,!0,D$V.HYPSOMETRIC)},_0x4881fc.prototype.hasLightChange=function(e){e.enable?this.appendProgramDefine(e,!0,!0,D$V.HAS_LIGHT):this.removeProgramDefine(e,!0,!0,D$V.HAS_LIGHT)},_0x4881fc.prototype.skeletonSelectedChange=function(e){e.enable?this.appendProgramDefine(e,!0,!0,D$V.HAS_SKELETONSELECTED):this.removeProgramDefine(e,!0,!0,D$V.HAS_SKELETONSELECTED)},_0x4881fc.prototype.skeletonSelectEnable=function(e){e.enable?this.appendProgramDefine(e,!0,!0,D$V.SKELETONSELECT_ENABLE):this.removeProgramDefine(e,!0,!0,D$V.SKELETONSELECT_ENABLE)},_0x4881fc.prototype.selectColorTypeChange=function(e){e.selectColorType==Zr$3.REPLACE?(this.appendProgramDefine(e,!0,!0,D$V.REPLACE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,D$V.SILHOUETTE_SELECT_TYPE)):e.selectColorType==Zr$3.SILHOUETTE||e.selectColorType==Zr$3.ALWAYS_SHOW_SILHOUETTE?(this.appendProgramDefine(e,!0,!0,D$V.SILHOUETTE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,D$V.REPLACE_SELECT_TYPE)):(this.removeProgramDefine(e,!0,!0,D$V.REPLACE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,D$V.SILHOUETTE_SELECT_TYPE))},_0x4881fc.prototype.mixColorTypeChange=function(e){e.mixColorType===_0x2b839f.REPLACE?this.appendProgramDefine(e,!0,!0,D$V.REPLACE_COLOR_TYPE):this.removeProgramDefine(e,!0,!0,D$V.REPLACE_COLOR_TYPE)},_0x4881fc.prototype.splitDirectionChange=function(e){e.enableSplit?this.appendProgramDefine(e,!1,!0,D$V.APPLY_SPLIT):this.removeProgramDefine(e,!1,!0,D$V.APPLY_SPLIT)},_0x4881fc.prototype.swipeStateChange=function(e){e.enableSwipe?this.appendProgramDefine(e,!1,!0,D$V.APPLY_SWIPE):this.removeProgramDefine(e,!1,!0,D$V.APPLY_SWIPE)},_0x4881fc.prototype.edgeWireFrameModeChange=function(e){this.appendProgramDefineForCommand(this._regularEdgeCommand,e,!0,!0,"MODE "+e.edgeMode,!1),this.appendProgramDefineForCommand(this._silhouetteEdgeCommand,e,!0,!0,"MODE "+e.edgeMode,!1)},_0x4881fc.prototype.PBRMaterialTypeChange=function(e){e.PBRType===Xe$e.NONE?this.removeProgramDefine(e,!0,!0,D$V.PBR):this.appendProgramDefine(e,!0,!0,D$V.PBR)},_0x4881fc.prototype.emissionTextureChange=function(e){e.enable?(this.appendProgramDefine(e,!0,!0,D$V.COMPUTE_W_VALUE),this.appendProgramDefine(e,!0,!0,D$V.EMISSION_TEXTURE_ATLAS)):this.removeProgramDefine(e,!0,!0,D$V.EMISSION_TEXTURE_ATLAS)},_0x4881fc.prototype.enableTextureMove=function(e){e.enable?this.appendProgramDefine(e,!0,!0,D$V.TEXTURE_MOVE):this.removeProgramDefine(e,!0,!0,D$V.TEXTURE_MOVE)},_0x4881fc.prototype.enableTriangleFiltrate=function(e){e.enable?this.appendProgramDefine(e,!0,!1,D$V.TRIANGLE_FILTRATE):this.removeProgramDefine(e,!0,!1,D$V.TRIANGLE_FILTRATE)},_0x4881fc.prototype.enableClipFilt=function(e){e.enable?this.appendProgramDefine(e,!1,!0,D$V.CLIP_FILT_BY_ID):this.removeProgramDefine(e,!1,!0,D$V.CLIP_FILT_BY_ID)},_0x4881fc.prototype.enableFlood=function(e){this.appendProgramDefine(e,!0,!0,D$V.FLOOD_ANALYSIS)},_0x4881fc.prototype.disableFlood=function(e){this.removeProgramDefine(e,!0,!0,D$V.FLOOD_ANALYSIS)},_0x4881fc.prototype.emissionTextureUnitChange=function(e){e.enable?this.appendProgramDefine(e,!0,!1,D$V.SEC_TEX_EMISSION):this.removeProgramDefine(e,!0,!1,D$V.SEC_TEX_EMISSION)},_0x4881fc.prototype.pbrParameterChange=function(e){if(e.enable){this._materialUBO.valueDirty=!0,this._materialUBO.update(e.layer._context);var t=e.layer,i=(t._pbrParameter&Xe$e.ROUGHNESS)>0||t._PBRMaterialParams.loadingTexture,n=e$2e(t.themeStyle)&&e$2e(t.themeStyle.pbrMaterialIndex),r=[];if(i||n){r.push(D$V.BRDF);var o=e$2e(this._attributeLocations.aTexCoord0);n&&(r.push(D$V.PBR_THEME),r.push("NUM_PBR_MATERIALS "+t._frameState.pbrMaterialsArr.length)),e$2e(t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture instanceof t$U&&o&&r.push(D$V.HAS_BASE_TEXTURE),o&&e$2e(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2e(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor)&&e$2e(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof t$U&&r.push(D$V.HAS_RAIN),o&&e$2e(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect)&&e$2e(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture instanceof t$U&&e$2e(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture instanceof t$U&&r.push(D$V.HAS_SNOW),(e$2e(this.materialPass)&&this.materialPass._metallicRoughnessTextureIndex>-1||e$2e(t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture instanceof t$U)&&o&&r.push(D$V.HAS_MetallicRoughness_TEXTURE),(e$2e(this.materialPass)&&this.materialPass._normalTextureIndex>-1||e$2e(t._PBRMaterialParams.pbrMetallicRoughness.normalTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.normalTexture instanceof t$U)&&o&&r.push(D$V.HAS_NORMAL_TEXTURE),(e$2e(this.materialPass)&&this.materialPass._occlusionTextureIndex>-1||e$2e(t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture instanceof t$U)&&o&&r.push(D$V.HAS_OCCLUSION_TEXTURE),e$2e(this.materialPass)&&this.materialPass._emissiveTextureIndex>-1&&r.push(D$V.HAS_EMISSIVE_TEXTURE),e$2e(t._frameState.specularEnvironmentMaps)&&r.push(D$V.IBL),this.appendProgramDefinesForCommand(this._colorCommand,e,!1,!0,r,!0,!0)}else r=[D$V.BRDF,"NUM_PBR_MATERIALS "+t._frameState.pbrMaterialsArr.length,D$V.HAS_BASE_TEXTURE,D$V.HAS_NORMAL_TEXTURE,D$V.HAS_EMISSIVE_TEXTURE,D$V.IBL,D$V.HAS_MetallicRoughness_TEXTURE,D$V.HAS_SNOW,D$V.HAS_RAIN],this.removeProgramDefinesForCommand(this._colorCommand,e,!1,!0,r)}},_0x4881fc.prototype.enableFusionChange=function(e){e.enable?this.appendProgramDefine(e,!0,!1,D$V.FusionMode):this.removeProgramDefine(e,!0,!1,D$V.FusionMode)},_0x4881fc.prototype.appendProgramDefine=function(e,t,i,n,r,o){r=u$Z(r,!0),o=u$Z(o,!0),this.appendProgramDefineForCommand(this._colorCommand,e,t,i,n,r,o),this.appendProgramDefineForCommand(this._regularEdgeCommand,e,t,i,n,!1,o),this.appendProgramDefineForCommand(this._silhouetteEdgeCommand,e,t,i,n,!1,o),this.appendProgramDefineForCommand(this._wireFrameCommands.quad,e,!1,!0,n,!1,o),this.appendProgramDefineForCommand(this._wireFrameCommands.triangle,e,!1,!0,n,!1,o)},_0x4881fc.prototype.appendProgramDefineForCommand=function(e,t,i,n,r,o,a){if(o=u$Z(o,!0),a=u$Z(a,!0),e$2e(e)){l=t.layer._context,u=e.shaderProgram.fragmentShaderSource.clone(),c=e.shaderProgram.vertexShaderSource.clone();e$2e(u.name)||(u.name="fpCustomName"+t.layer.id),e$2e(c.name)||(c.name="vpCustomName"+t.layer.id),i&&_0xb28f92(c,r),n&&_0xb28f92(u,r);h=e.shaderProgram._attributeLocations;a&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());var s=r$14.fromCache({context:l,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h});o&&(this._sp=s),e.shaderProgram=s,e$2e(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x15e8bc(l,e.shaderProgram))}else if(o&&e$2e(this._sp)){var l=t.layer._context,u=this._sp.fragmentShaderSource.clone(),c=this._sp.vertexShaderSource.clone();e$2e(u.name)||(u.name="fpCustomName"+t.layer.id),e$2e(c.name)||(c.name="vpCustomName"+t.layer.id),i&&_0xb28f92(c,r),n&&_0xb28f92(u,r);var h=this._attributeLocations;this._sp.destroy(),this._sp=r$14.fromCache({context:l,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h})}},_0x4881fc.prototype.appendProgramDefinesForCommand=function(e,t,i,n,r,o,a){o=u$Z(o,!0),a=u$Z(a,!0);var s=t.layer._context;if(e$2e(e)){u=e.shaderProgram.fragmentShaderSource.clone(),c=e.shaderProgram.vertexShaderSource.clone();e$2e(u.name)||(u.name="fpCustomName"+t.layer.id),e$2e(c.name)||(c.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0xb28f92(c,e),n&&_0xb28f92(u,e)}));h=e.shaderProgram._attributeLocations;a&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());var l=r$14.fromCache({context:s,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h});o&&(this._sp=l),e.shaderProgram=l,e$2e(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x15e8bc(s,e.shaderProgram))}else if(o&&e$2e(this._sp)){var u=this._sp.fragmentShaderSource.clone(),c=this._sp.vertexShaderSource.clone();e$2e(u.name)||(u.name="fpCustomName"+t.layer.id),e$2e(c.name)||(c.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0xb28f92(c,e),n&&_0xb28f92(u,e)}));var h=this._attributeLocations;this._sp.destroy(),this._sp=r$14.fromCache({context:s,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h})}},_0x4881fc.prototype.removeProgramDefine=function(e,t,i,n){this.removeProgramDefineForCommand(this._colorCommand,e,t,i,n),e$2e(this._regularEdgeCommand)&&this.removeProgramDefineForCommand(this._regularEdgeCommand,e,t,i,n,!1),e$2e(this._silhouetteEdgeCommand)&&this.removeProgramDefineForCommand(this._silhouetteEdgeCommand,e,t,i,n,!1),e$2e(this._wireFrameCommands.quad)&&this.removeProgramDefineForCommand(this._wireFrameCommands.quad,e,!1,!0,n,!1),e$2e(this._wireFrameCommands.triangle)&&this.removeProgramDefineForCommand(this._wireFrameCommands.triangle,e,!1,!0,n,!1)},_0x4881fc.prototype.removeProgramDefineForCommand=function(e,t,i,n,r,o){if(o=u$Z(o,!0),e$2e(e)){s=t.layer._context,l=e.shaderProgram.fragmentShaderSource.clone(),u=e.shaderProgram.vertexShaderSource.clone();e$2e(l.name)||(l.name="fpCustomName"+t.layer.id),e$2e(u.name)||(u.name="vpCustomName"+t.layer.id),i&&_0x2cb26f(u,r),n&&_0x2cb26f(l,r);c=e.shaderProgram._attributeLocations;e.shaderProgram.destroy();var a=r$14.fromCache({context:s,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c});e.shaderProgram=a,o&&(this._sp=a),e$2e(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x15e8bc(s,e.shaderProgram))}else if(o&&e$2e(this._sp)){var s=t.layer._context,l=this._sp.fragmentShaderSource.clone(),u=this._sp.vertexShaderSource.clone();e$2e(l.name)||(l.name="fpCustomName"+t.layer.id),e$2e(u.name)||(u.name="vpCustomName"+t.layer.id),i&&_0x2cb26f(u,r),n&&_0x2cb26f(l,r);var c=this._attributeLocations;this._sp.destroy(),this._sp=r$14.fromCache({context:s,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c})}},_0x4881fc.prototype.removeProgramDefinesForCommand=function(e,t,i,n,r,o){var a=t.layer._context;if(o=u$Z(o,!0),e$2e(e)){l=e.shaderProgram.fragmentShaderSource.clone(),u=e.shaderProgram.vertexShaderSource.clone();e$2e(l.name)||(l.name="fpCustomName"+t.layer.id),e$2e(u.name)||(u.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x2cb26f(u,e),n&&_0x2cb26f(l,e)}));c=e.shaderProgram._attributeLocations;e.shaderProgram.destroy();var s=r$14.fromCache({context:a,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c});e.shaderProgram=s,o&&(this._sp=s),e$2e(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x15e8bc(a,e.shaderProgram))}else if(o&&e$2e(this._sp)){var l=this._sp.fragmentShaderSource.clone(),u=this._sp.vertexShaderSource.clone();e$2e(l.name)||(l.name="fpCustomName"+t.layer.id),e$2e(u.name)||(u.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x2cb26f(u,e),n&&_0x2cb26f(l,e)}));var c=this._attributeLocations;this._sp.destroy(),this._sp=r$14.fromCache({context:a,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c})}},_0x4881fc.prototype.lightSourceChanged=function(e){if(e$2e(this._colorCommand)){var t=e.changedList,i=this._layer._scene._lightSource;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n],o=r.type,a=r.count;switch(o){case _0x4970c2.DIRECTIONAL:i.directionalLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_DIR_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_DIR_LIGHTS);break;case _0x4970c2.POINT:i.pointLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_POINT_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_POINT_LIGHTS);break;case _0x4970c2.SPOT:i.spotLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_SPOT_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_SPOT_LIGHTS);break;case _0x4970c2.HEMISPHERE:i.hemisphereLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_HEMISPHERE_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_HEMISPHERE_LIGHTS)}}}},_0x4881fc.prototype.enableCategoryVisible=function(e){this.appendProgramDefine(e,!0,!1,D$V.W_VISIBLE)},_0x4881fc.prototype.isDestroyed=function(){return!1},_0x4881fc.prototype.destroyScaleImagerys=function(){if(e$2e(this._scaleImagerys)){for(var e=0;e<this._scaleImagerys.length;e++){var t=this._scaleImagerys[e];if(e$2e(t))for(var i=0;i<t.length;i++)t[i].releaseReference()}this._scaleImagerys.length=0}},_0x4881fc.prototype.destroy=function(){var e=e$2e(this._layer.instanceSkeletonManager)&&"InstanceModel"===this._layer._dataType;if(e$2e(this._vertexPackage)&&e$2e(this._vertexPackage.vertexAttributes)&&!e)for(var t=this._vertexPackage.vertexAttributes,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.vertexBuffer)&&!r.vertexBuffer.isDestroyed()&&r.vertexBuffer.vertexArrayDestroyable&&!r.vertexBuffer.isDestroyed()&&r.vertexBuffer.destroy()}if(e$2e(this._arrIndexPackage)&&!e)for(i=0,n=this._arrIndexPackage.length;i<n;i++){var o=this._arrIndexPackage[i];e$2e(o.indexBuffer)&&!o.indexBuffer.isDestroyed()&&o.indexBuffer.destroy()}e$2e(this._wireFrameIndexBuffers)&&this._wireFrameIndexBuffers.destroy();var a=this._context,s=this._layer;if(s._isS3MBlock)for(var l in this._mapPass)this._mapPass.hasOwnProperty(l)&&s.materialManager.free(s,l);else for(var l in this._mapPass)if(this._mapPass.hasOwnProperty(l)){var u=this._mapPass[l];!u.isDestroyed()&&u.destroy()}if(this._mapPass=void 0,this._sp=void 0,this._instanceMode>0){if(e$2e(this._colorCommand)){var c=this._colorCommand;c.vertexArray=c.vertexArray&&!c.vertexArray.isDestroyed()&&c.vertexArray.destroy(),c.shaderProgram=c.shaderProgram&&!c.shaderProgram.isDestroyed()&&c.shaderProgram.destroy(),c.renderState=void 0,c.uniformMap=void 0,this._colorCommand=void 0}}else _0x3c43ee(a,this._colorCommand),this._colorCommand=void 0,this._wireFrameCommands.triangle&&_0x3c43ee(a,this._wireFrameCommands.triangle),this._wireFrameCommands.quad&&_0x3c43ee(this._wireFrameCommands.quad),this._wireFrameCommands={},_0x3c43ee(a,this._pickCommand),this._pickCommand=void 0,this._stencilCommand=void 0,_0x3c43ee(a,this._selectedStencilCommand),this._selectedStencilCommand=void 0,_0x3c43ee(a,this._selectedColorCommand),this._selectedColorCommand=void 0,_0x3c43ee(a,this._normalAndDepthCommand),this._normalAndDepthCommand=void 0,_0x3c43ee(a,this._postEffectCommand),this._postEffectCommand=void 0,_0x3c43ee(a,this._pickRectCommand),this._pickRectCommand=void 0,_0x3c43ee(a,this._clipCommand),this._clipCommand=void 0,_0x3c43ee(a,this._regularEdgeCommand),this._regularEdgeCommand=void 0,_0x3c43ee(a,this._silhouetteEdgeCommand),this._silhouetteEdgeCommand=void 0;if(this._clampColorCommand=void 0,this._clipStencilCommand=void 0,e$2e(this._selectionInforMap)&&this._selectionInforMap.removeAll(),this._vertexPackage=void 0,this._vertexColor=void 0,this._texCoord1=void 0,this._vertexColorInstance=void 0,this._arrIndexPackage=void 0,e$2e(this._volObj)&&(this._volObj=void 0),e$2e(this._volTexture)&&(this._volTexture=void 0),e$2e(this._symbolTextureUrl)&&_0x1451be.removeTexture(this._symbolTextureUrl),this._waterIndex,this.s3mbuffer&&(this.s3mbuffer=null),e$2e(this._batchTable)&&(this._batchTable=this._batchTable.destroy()),e$2e(this._imagerys)){for(var h=this._imagerys,d=(i=0,h.length);i<d;++i)h[i].releaseReference();this._imagerys.length=0}if(this.destroyScaleImagerys(),e$2e(this._plusRoArray)){for(i=0;i<this._plusRoArray.length;i++){var f=this._plusRoArray[i];if(e$2e(f))for(n=0;n<f.length;n++)f[n].shaderProgram.destroy(),f[n].uniformMap=void 0}this._plusRoArray.length=0}return this._vertexWeightBuffers.length=0,e$2e(this._meshUBO)&&(this._meshUBO.destroy(),this._meshUBO=null),e$2e(this._materialUBO)&&(this._materialUBO.destroy(),this._materialUBO=null),this._layer._totalMemoryUsageInBytes-=this._geometryByteLength,i$11(this)},_0x4881fc.prototype.createPickRectCommand=function(e){if(e$2e(this._colorCommand)&&!e$2e(this._pickRectCommand)&&"FresnelVp"!==this._colorCommand.shaderProgram.vertexShaderSource.name&&"FresnelFp"!==this._colorCommand.shaderProgram.fragmentShaderSource.name){var t=this._colorCommand.shaderProgram._useWGSL;if(e._selectUpdate){var i=e._context,n=new s$V({name:"S3MTilesRectSelection",sources:[t?_0xcc5af2:_0x4f0656],useWGSL:t}),r=this._colorCommand;if(!e$2e(r))return;var o=r.shaderProgram.vertexShaderSource.clone(),a=void 0;(a=i$$.shallowClone(r,a)).shaderProgram=r$14.fromCache({context:i,vertexShaderSource:o,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._pickRectCommand=a}}},_0x4881fc.prototype.prepareLabels=function(){if(!this._labelReady){var e=this._pickInfo,t=this._vertexPackage;if(e$2e(e)&&Object.keys(e).length===t.verticesCount&&"InstanceModel"!==this._layer._dataType){for(var i in e)!e.hasOwnProperty(i)||"0"===i||(this._pickIDArray.push(i),this._labelsCreated[i]=!1);this._layer._labelCollection;var n,r,o=new o$1p,a=t.vertexAttributes[0],s=a.componentsPerAttribute,l=e$2e(t.nCompressOptions)&&(t.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,u=1;if(e$2e(a.typedArray)){l?(u=t.vertCompressConstant,n=new o$1p(t.minVerticesValue.x,t.minVerticesValue.y,t.minVerticesValue.z),r=new Uint16Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/2)):r=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var c=this._matModel,h=0;h<t.verticesCount;h++)o$1p.fromArray(r,s*h,o),l&&(o=o$1p.multiplyByScalar(o,u,o),o=o$1p.add(o,n,o)),p$1d.multiplyByPoint(c,o,o),this._labelPosArray.push(o$1p.clone(o));this._labelTextArray=new Array(this._labelPosArray.length),this._labelReady=!0}}}},_0x4881fc.prototype.isNoExistAllLabels=function(){var e=this._layer._labelCollection;if(0===e._labels.length)return!0;for(var t=!0,i=0;i<this._labelPosArray.length;i++){var n=this._pickIDArray[i];if(e._labelsID.hasOwnProperty(n)){t=!1;break}}return t};var _0x198196=new o$1o;_0x4881fc.prototype.updateLabels=function(e){if(e.camera,this.isNoExistAllLabels()&&e$2e(this._labelIndexs)&&Object.keys(this._labelIndexs).length>0&&(this._labelIndexs={}),e$2e(this._layer._layerScheduler._indexedDBScheduler)&&0!==this._pickIDArray.length&&0!==this._labelPosArray.length&&!(this._labelPosArray.length<=Object.keys(this._labelIndexs).length)){var t=this._layer,i=t._labelCollection,n=[],r=t._iconCollection,o=[],a=k$R.RELATIVE_TO_GROUND;if(t.showIcon){if(!e$2e(t.style3D)||!t.style3D.imageReady)return;a=t.style3D.altitudeMode,t._showLabel&&(_0x198196.y=-t.style3D.image.height/2,a=t._s3MTilesLabelStyle.heightReference)}t._s3MTilesLabelStyle._textField;for(var s=0;s<this._labelPosArray.length;s++){var l=this._pickIDArray[s];if(l=Number(l),this._labelsCreated[l]){var u=this._labelPosArray[s],c=this._labelTextArray[s];if(i.containsLabel(l))this._labelIndexs.hasOwnProperty(l)||(this._labelIndexs[l]=!0);else{var h=r.add({position:u,id:l,image:t.style3D.image,billboardStyle:t.style3D,heightReference:a,show:!0});o.push(h._index);var d=i.add({position:u,id:l,text:c,s3MTilesLabelStyle:t._s3MTilesLabelStyle,pixelOffset:_0x198196,show:!1});n.push(d._index)}}else _0x13e4b7(t,l,this,s)}for(var f=0,p=n.length;f<p;f++)this._labelIndexs[l]=!0}},_0x4881fc.prototype.pushCommandsForPickRectBuffer=function(e,t){"FresnelVp"===this._colorCommand.shaderProgram.vertexShaderSource.name||"FresnelFp"===this._colorCommand.shaderProgram.fragmentShaderSource.name||!e$2e(this._pickRectCommand)||t.push(this._pickRectCommand)},_0x4881fc.prototype.pushCommandsForSpatialQueryBuffer=function(e,t,i){if(e._spatialQueryEnable&&"FresnelVp"!==this._colorCommand.shaderProgram.vertexShaderSource.name&&"FresnelFp"!==this._colorCommand.shaderProgram.fragmentShaderSource.name){if(!e$2e(this._spatialQueryCommand)){var n=this._colorCommand,r=n.shaderProgram.vertexShaderSource.clone();r.defines.push("SQRESULT");var o=new s$V({name:"SpatialQueryFp",sources:[r.useWGSL?_0xaa057c:_0x12eef8],useWGSL:r.useWGSL});o.defines.push("SQRESULT");var a=i$$.shallowClone(n);a.uniformMap.uTransparentFilter=function(){return e.selectionFiltrateByTransparency},a.uniformMap.uFrontDepthTexture=function(){return e._sqTextures[0]},a.uniformMap.uBackDepthTexture=function(){return e._sqTextures[1]},a.uniformMap.uFrontColorTexture=function(){return e._sqTextures[2]},a.uniformMap.uSQMode=function(){return e._sqMode};var s=new p$1d,l=this._matModel;a.uniformMap.uSQViewProj=function(){var t=new p$1d;return p$1d.multiply(e._sqViewMatirx,l,t),p$1d.multiply(e._sqPrjMatirx,t,s),s},a.shaderProgram=r$14.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),this._spatialQueryCommand=a,a.owner="sqResultTexture"}t.push(this._spatialQueryCommand)}},_0x4881fc.prototype.pushCommandsForRasterHeightMap=function(e,t,i){if(e$2e(this._colorCommand)){if(!e$2e(this._rasterHeightCommand)){var n=i$$.shallowClone(this._colorCommand,new i$$),r=this._colorCommand.shaderProgram.vertexShaderSource.clone(),o=this._colorCommand.shaderProgram.fragmentShaderSource.clone();r.defines.push("Height_Map"),o.defines.push("Height_Map"),r.defines.push("COMPUTE_W_VALUE"),o.defines.push("COMPUTE_W_VALUE"),n.shaderProgram=r$14.fromCache({context:e.context,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),this._rasterHeightCommand=n}i.push(this._rasterHeightCommand)}},_0x4881fc.prototype.setImagerys=function(e,t){if(this._cartographic=t,this._imagerys=e,e$2e(e))if(e$2e(this._sp)){for(var i=this._sp.fragmentShaderSource,n=-1,r=0;r<i.defines.length;r++)if(i.defines[r].includes("TEXTURE_UNITS")){n=r;break}n<0&&this._imagerys.length>0||e$2e(this._dayTextures)&&e.length>this._dayTextures.length||!e$2e(this._dayTextures)?this._refreshImageryShader():this._computeImageryParameter(this._layer)}else this._computeImageryParameter(this._layer)},_0x4881fc.prototype.hasScaleImagerys=function(e){return e$2e(this._scaleImagerys[e-1])},_0x4881fc.prototype.setScaleImagerys=function(e,t){!e$2e(e)||t<1||(this._scaleImagerys[t-1]=e)},_0x4881fc.prototype.resetScaleImagerys=function(e,t){if(this._imageRasterFinish&&e$2e(this._sp)){if(this._scaleImagerys.length>e){for(var i=e;i<this._scaleImagerys.length;i++){if(e$2e(a=this._scaleImagerys[i]))for(var n=0;n<a.length;n++)a[n].releaseReference()}this._scaleImagerys.length=e}if(this._plusRoArray.length>e){for(i=e;i<this._plusRoArray.length;i++){if(e$2e(H=this._plusRoArray[i]))for(n=0;n<H.length;n++)H[n].uniformMap=void 0,H[n].shaderProgram.destroy()}this._plusRoArray.length=e}var r=void 0;for(i=0;i<this._scaleImagerys.length;i++){if(e$2e(a=this._scaleImagerys[i])){var o=!0;for(n=0;n<a.length;n++)a[n].processStateMachine(t,!1),a[n]instanceof _0x2415f5?a[n].state===wt$7.RENDERED||a[n].state===wt$7.READY||a[n].state===wt$7.FAILED||(o=!1):a[n].state<wt$7.TEXTURE_LOADED&&(o=!1);o&&(r=i)}}if(r!=this._visibleScaleImageryIndex){var a=void 0;if(e$2e(r)&&(a=this._scaleImagerys[r]),e$2e(r)&&e$2e(a)&&a.length>0){if(this._visibleScaleImageryIndex=r,!e$2e(this._plusRoArray[r])){var s=this._layer,l=this._sp.fragmentShaderSource.clone();for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("GRIDTEXTURE_UNITS")){l.defines.splice(i,1);break}for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("TEXTURE_UNITS")){l.defines.splice(i,1);break}for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("APPLY_ALPHA")){l.defines.splice(i,1);break}for(i=0;i<l.sources.length;i++)if(l.sources[i].includes("czm_sampleAndBlend")){l.sources.splice(i,1);break}var u=this._sp.vertexShaderSource.clone(),c=!1;for(i=0;i<u.defines.length;i++)if(u.defines[i].includes("IMAGERY")){c=!0;break}c||u.defines.push("IMAGERY");for(var h=0,d=a.length,f=0;d>0;){var p,_=d;p=0===(d-=_=Math.min(_,e$1W._maximumTextureImageUnits-2))?l:l.clone(),h>0&&p.defines.push("MULTIBATCH");var m=[],g=[],x=[],y=[],v=[],$=[],b=[],T=[],C=!1;e$2e(_0xcfbbe9)||(_0xcfbbe9=new h$18),_0xcfbbe9.west=this._cartographic.min.longitude,_0xcfbbe9.east=this._cartographic.max.longitude,_0xcfbbe9.north=this._cartographic.max.latitude,_0xcfbbe9.south=this._cartographic.min.latitude,this._imageryTextureBound.x=this._cartographic.max.longitude-this._cartographic.min.longitude,this._imageryTextureBound.y=this._cartographic.max.latitude-this._cartographic.min.latitude;for(i=0;i<_;i++){var S=a[f+i],w=S.imageryLayer,E=w._imageryProvider.tilingScheme.projection instanceof t$N&&_0xcfbbe9.north<t$N.MaximumLatitude&&_0xcfbbe9.south>-t$N.MaximumLatitude;g.push(E);var P=E?S.textureWebMercator:S.texture;e$2e(P)||(P=s._context.defaultTransparentTexture),m.push(P);var A=u$Z(w._imageryProvider.flipY,!1);b.push(A);var L=this._calculateTextureTranslationAndScale(_0xcfbbe9,S.rectangle,E,w._imageryProvider._tilingScheme),M=this._calculateTextureTexCoordsRectangle(_0xcfbbe9,S.rectangle,E,w._imageryProvider._tilingScheme);x.push(M),y.push(L);var R=new e$2c;R.x=w.transparentBackColor.red,R.y=w.transparentBackColor.green,R.z=w.transparentBackColor.blue,R.w=w.transparentBackColorTolerance,v.push(R),$.push(w.enableImageryClip),T.push(w.alpha),C=C||w.alpha<.999}f+=_;var O="",D="";(I=!1)&&(D="APPLY_IMAGERY_CUTOUT");var I,F=[],B={mixIndex:!0,mixDirection:0},N="#ifdef IMAGERY\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\nvec4 color = initialColor;\n";N+="vec2 realTextureCoord;\nvec4 currentTextureColor;\n",(I=!1)&&(N+="vec4 cutoutAndColorResult;\nbool texelUnclipped;\n");for(i=0;i<_;++i){if(N+="realTextureCoord = computeTextureCoord(\n",N+="u_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTranslationAndScale["+i+"],\nu_dayTextureSize["+i+"],\nu_dayTextureFlipY["+i+"]);\ncurrentTextureColor = texture2D(u_dayTextures["+i+"], realTextureCoord);\n\n",e$2e(z=_0xc579c6(F,i)))(U=i+1)==_&&(U=i),N+="color = mvtTextureSampleAndBlend(\ncolor,\nu_dayTextures["+i+"],\nu_dayTextures["+U+"],\nu_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTexCoordsRectangle["+i+"],\nu_dayTextureTranslationAndScale["+i+"],\n"+converColorToVec4(z)+",\n"+(this._applyAlpha?"u_dayTextureAlpha["+i+"]":"1.0")+",\n0.0,\nvec4(0.0,0.0,0.0,0.0)\n);\n",i++;else N+=I?"cutoutAndColorResult = u_dayTextureCutoutRectangles["+i+"];\ntexelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\ncutoutAndColorResult = czm_sampleAndBlend(\n":i===B.mixIndex&&B.mixDirection>0?"color = sampleAndBlendParent(\n":"color = czm_sampleAndBlend(\n",N+="currentTextureColor,\ncolor,\nu_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTexCoordsRectangle["+i+"],\nu_transparentBackColor["+i+"],\nu_imageryClipEnable["+i+"],\n"+(this._applyAlpha?"u_dayTextureAlpha["+i+"]":"1.0")+",\n0.0,\n0.0,\n0.0,\n0.0,\n0.0,\nvec2(0.0,0.0),\nvec4(0.0,0.0,0.0,0.0)\n);\n",I&&(N+="color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(i=0;i<0;++i)N+="color = gridTextureSampleAndBlend(\ncolor,\nu_gridTextures["+i+"],\nu_gridTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_gridTextureTexCoordsRectangle["+i+"],\nu_gridTextureTranslationAndScale["+i+"]);\n";if(N+="return color;\n}\n#endif",this._context.webgpu){var G=" #ifdef IMAGERY\n fn computeDayColor(initialColor : vec4<f32>, textureCoordinates : vec3<f32>) -> vec4<f32>\n {\n var color : vec4<f32> = initialColor;\n";G+=" var realTextureCoord : vec2<f32>;\n var currentTextureColor : vec4<f32>;\n",I&&(G+=" var cutoutAndColorResult : vec4<f32>;\n var texelUnclipped : bool;\n");for(i=0;i<_;++i){var z,U;if(G+=" realTextureCoord = computeTextureCoord(\n",G+=" select(textureCoordinates.xy, textureCoordinates.xz, vec2<bool>(bool(uniforms.u_dayTextureUseWebMercatorT["+i+"]))),\n uniforms.u_dayTextureTranslationAndScale["+i+"],\n uniforms.u_dayTextureSize["+i+"],\n bool(uniforms.u_dayTextureFlipY["+i+"]));\n currentTextureColor = textureSample(u_dayTextures"+i+", u_dayTexturesSampler, realTextureCoord);\n \n",e$2e(z=_0xc579c6(F,i)))(U=i+1)==_&&(U=i),G+=" color = mvtTextureSampleAndBlend(\n color,\n u_dayTextures["+i+"],\n u_dayTextures["+U+"],\n u_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+i+"],\n u_dayTextureTranslationAndScale["+i+"],\n "+converColorToVec4(z)+",\n "+(this._applyAlpha?"u_dayTextureAlpha["+i+"]":"1.0")+",\n 0.0,\n vec4(0.0,0.0,0.0,0.0)\n );\n",i++;else G+=I?" cutoutAndColorResult = uniforms.u_dayTextureCutoutRectangles["+i+"];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = czm_sampleAndBlend(\n":i===B.mixIndex&&B.mixDirection>0?" color = sampleAndBlendParent(\n":" color = czm_sampleAndBlend(\n",G+=" currentTextureColor,\n color,\n select(textureCoordinates.xy, textureCoordinates.xz, vec2<bool>(bool(uniforms.u_dayTextureUseWebMercatorT["+i+"]))),\n uniforms.u_dayTextureTexCoordsRectangle["+i+"],\n uniforms.u_transparentBackColor["+i+"],\n bool(uniforms.u_imageryClipEnable["+i+"]),\n "+(this._applyAlpha?"uniforms.u_dayTextureAlpha["+i+"]":"1.0")+",\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n vec2(0.0,0.0),\n vec4(0.0,0.0,0.0,0.0)\n );\n",I&&(G+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(i=0;i<0;++i)G+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+i+"],\n select(textureCoordinates.xy, textureCoordinates.xz, u_dayTextureUseWebMercatorT["+i+"]),\n u_gridTextureTexCoordsRectangle["+i+"],\n u_gridTextureTranslationAndScale["+i+"]);\n";G+=" return color;\n }\n #endif ",p.sources.unshift(G)}else p.sources.push(N);for(c=!1,i=0;i<p.defines.length;i++)if(p.defines[i].includes("IMAGERY")){c=!0;break}c||p.defines.push("IMAGERY"),this._applyAlpha&&p.defines.push("APPLY_ALPHA"),p.defines.push("TEXTURE_UNITS "+_),""!=O&&p.defines.push(O),""!=D&&p.defines.push(D),p.defines.push("GRIDTEXTURE_UNITS 0");var V=this._sp._attributeLocations,k=r$14.fromCache({context:s._context,vertexShaderSource:u,fragmentShaderSource:p,attributeLocations:V}),W=this;(function(e){var t=l$1f(W._colorCommand._uniformMap),i=W._plusRoArray;t.u_dayTextures=function(){return i[r][e].dayTextures},t.u_dayTextureUseWebMercatorT=function(){return W._context.webgpu&&(W._dayTextures=i[r][e].dayTextures,W._materialUBO._isValueDirty=!0,W._materialUBO.update(s._context)),i[r][e].dayTextureUseWebMercatorT},t.u_dayTextureTexCoordsRectangle=function(){return i[r][e].dayTextureTexCoordsRectangle},t.u_dayTextureTranslationAndScale=function(){return i[r][e].dayTextureTranslationAndScale},t.u_transparentBackColor=function(){return i[r][e].transparentBackColor},t.u_imageryClipEnable=function(){return i[r][e].imageryClipEnable},t.u_dayTextureFlipY=function(){return i[r][e].dayTextureFlipY},t.u_dayTextureAlpha=function(){return i[r][e].dayTextureAlpha};var n=i$$.shallowClone(W._colorCommand);n.shaderProgram=k,n._uniformMap=t;var o={command:n,shaderProgram:k,uniformMap:t,dayTextures:m,dayTextureUseWebMercatorT:g,dayTextureTexCoordsRectangle:x,dayTextureTranslationAndScale:y,transparentBackColor:R,imageryClipEnable:$,dayTextureFlipY:b,dayTextureAlpha:T};e$2e(W._plusRoArray[r])||(W._plusRoArray[r]=[]),W._plusRoArray[r].push(o)})(h),h+=1}}}else{this._visibleScaleImageryIndex=void 0;for(i=0;i<this._plusRoArray.length;i++){var H;if(e$2e(H=this._plusRoArray[i]))for(n=0;n<H.length;n++)H[n].shaderProgram.destroy(),H[n].uniformMap=void 0}this._plusRoArray=[];l=this._sp.fragmentShaderSource;var q=-1;for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("TEXTURE_UNITS")){q=i;break}q<0&&this._imagerys.length>0||e$2e(this._dayTextures)&&this._imagerys.length>this._dayTextures.length||!e$2e(this._dayTextures)?this._refreshImageryShader():this._computeImageryParameter(this._layer)}}}};var _0x1812a6=new o$1p,_0x469234=new o$1p,_0x33eeb9=new o$1p;_0x4881fc.prototype.setRealtimeRasterCamera=function(e,t){var i=f$1a.clone(t.context.uniformState._viewport);this._imageryTextureBound.x=e.max.longitude-e.min.longitude,this._imageryTextureBound.y=e.max.latitude-e.min.latitude;var n=e$2d.toDegrees(e.min.longitude),r=e$2d.toDegrees(e.max.longitude),o=e$2d.toDegrees(e.max.latitude),a=e$2d.toDegrees(e.min.latitude),s=r-n,l=o-a,u=t.camera,c=u.frustum.clipPlane;1===t._fboState.frameBufferType&&u.disableReflection(),o$1p.clone(u.position,_0x1812a6),o$1p.clone(u.direction,_0x469234),o$1p.clone(u.up,_0x33eeb9);var h=u._scene._mode;u._mode=C$14.SCENE3D,u._scene._mode=C$14.SCENE3D,u.setView({destination:new o$1p(.5*(n+r),.5*(o+a),50),orientation:{direction:new o$1p(0,0,-1),up:new o$1p(0,1,0)},convert:!1}),u._mode=h,u._scene._mode=h;var d=new a$V({width:s,aspectRatio:s/l,near:1,far:100});return t.context.uniformState.update(t),t.context.uniformState.updateFrustum(d),{position:_0x1812a6,direction:_0x469234,upDirection:_0x33eeb9,viewport:i,waterPlane:c}},_0x4881fc.prototype.resetCamera=function(e,t){var i=t.camera;1===t._fboState.frameBufferType&&e.waterPlane&&i.enableReflection(e.waterPlane),i.setView({destination:e.position,orientation:{direction:e.direction,up:e.upDirection},convert:!1}),t.context.uniformState.update(t),t.context.uniformState.updateFrustum(i.frustum),t.context.uniformState.viewport=e.viewport},_0x4881fc.prototype.isImageryLoaded=function(e){for(var t=!0,i=this._imagerys.length,n=0;n<i;n++)this._imagerys[n]instanceof _0x2415f5?this._imagerys[n].state===wt$7.RENDERED||this._imagerys[n].state===wt$7.READY||this._imagerys[n].state===wt$7.FAILED||(t=!1):this._imagerys[n].state<wt$7.TEXTURE_LOADED&&(t=!1);return t},_0x4881fc.prototype.updateImageryTexture=function(e,t){if(this.isImageryLoaded(t)){for(var i=[],n=0;n<this._imagerys.length;n++)e$2e(this._imagerys[n].texture)&&i.push(this._imagerys[n]);i.length>0&&(this._imageRasterFinish=!0,this._computeImageryParameter(e))}else{this._imageryLevels.length!=this._imagerys.length&&(this._imageryLevels.length=this._imagerys.length);i=[];var r=[];for(n=0;n<this._imagerys.length;n++){for(var o=this._imagerys[n],a=o.rectangle;o.state!=wt$7.READY&&e$2e(o.parent)&&o.imageryLayer._imageryProvider.minimumLevel<o.level;)o=o.parent;e$2e(o.texture)&&o.state==wt$7.READY&&(i.push(o),r.push(a))}var s=!1;if(i.length==this._imagerys.length)for(n=0;n<i.length;n++)i[n].level!=this._imageryLevels[n]&&(s=!0,this._imageryLevels[n]=i[n].level);s&&i.length>0&&this._computeImageryParameter(e,i,r)}},_0x4881fc.prototype.convertToInstanceBillboardPoint=function(){const e=this._vertexPackage,t=e.vertexAttributes;for(var i=0;i<t.length;i++)t[i].instanceDivisor=1;e.attrLocation.offset=e.vertexAttributes.length,e.vertexAttributes.push({name:"offset",index:e.vertexAttributes.length,componentDatatype:S$14.FLOAT,componentsPerAttribute:2,vertexBuffer:this._context.createBillboardOffsetVertexBuffer(),normalize:!1,offsetInBytes:0,strideInBytes:8});const n=new Uint16Array([0,1,2,0,2,3]),r=this._arrIndexPackage;for(i=0;i<r.length;i++)r[i].indicesTypedArray=n},_0x4881fc.prototype.isBillboardPoint=function(e){const t=e|this._fileType,i=this._arrIndexPackage[0];return this._context.webgpu&&(i&&1===i.primitiveType||t==p$T.PointCloudFile)};var _0x1ad686=new h$18,_0x312651=new h$18;_0x4881fc.prototype._calculateTextureTranslationAndScale=function(e,t,i,n){var r=t,o=e;i&&(r=n.rectangleToNativeRectangle(r,_0x1ad686),o=n.rectangleToNativeRectangle(o,_0x312651));var a=o.width,s=o.height,l=a/r.width,u=s/r.height;return new e$2c(l*(o.west-r.west)/a,u*(o.south-r.south)/s,l,u)},_0x4881fc.prototype._calculateTextureTexCoordsRectangle=function(e,t,i,n){var r=t,o=e;i&&(r=n.rectangleToNativeRectangle(r,_0x1ad686),o=n.rectangleToNativeRectangle(o,_0x312651));var a=o.width,s=o.height;return new e$2c((r.west-o.west)/a,(r.south-o.south)/s,(r.east-o.west)/a,(r.north-o.south)/s)};var _0xcfbbe9=void 0,_0xd953f1=new e$2c;function _0xc579c6(e,t){if(!e$2e(e)||0==e.length)return null;for(var i=e.length,n=0;n<i;n++)if(e[n].textureIndex===t)return e[n].selectColor;return null}_0x4881fc.prototype._computeImageryParameter=function(e,t,i){var n=t;e$2e(n)||(n=this._imagerys);var r=0;e$2e(this._dayTextures)&&this._dayTextures.length>0&&(r=this._dayTextures.length-n.length),this._dayTextures=[],this._dayTextureUseWebMercatorT=[],this._dayTextureTexCoordsRectangle=[],this._dayTextureTranslationAndScale=[],this._transparentBackColor=[],this._imageryClipEnable=[],this._dayTextureFlipY=[],this._dayTextureAlpha=[],this._applyAlpha=!1,e$2e(_0xcfbbe9)||(_0xcfbbe9=new h$18),_0xcfbbe9.west=this._cartographic.min.longitude,_0xcfbbe9.east=this._cartographic.max.longitude,_0xcfbbe9.north=this._cartographic.max.latitude,_0xcfbbe9.south=this._cartographic.min.latitude,this._imageryTextureBound.x=this._cartographic.max.longitude-this._cartographic.min.longitude,this._imageryTextureBound.y=this._cartographic.max.latitude-this._cartographic.min.latitude;for(var o=0;o<n.length;o++){var a=n[o].imageryLayer,s=a._imageryProvider.tilingScheme.projection instanceof t$N&&_0xcfbbe9.north<t$N.MaximumLatitude&&_0xcfbbe9.south>-t$N.MaximumLatitude;this._dayTextureUseWebMercatorT.push(s);var l=s?n[o].textureWebMercator:n[o].texture;(!e$2e(l)||n[o]instanceof _0x2415f5&&n[o].state!==wt$7.READY)&&(l=e._context.defaultTransparentTexture),this._dayTextures.push(l);var u=u$Z(a._imageryProvider.flipY,!1);this._dayTextureFlipY.push(u);var c,h=this._calculateTextureTranslationAndScale(_0xcfbbe9,n[o].rectangle,s,a._imageryProvider._tilingScheme);c=e$2e(i)?this._calculateTextureTexCoordsRectangle(_0xcfbbe9,i[o],s,a._imageryProvider._tilingScheme):this._calculateTextureTexCoordsRectangle(_0xcfbbe9,n[o].rectangle,s,a._imageryProvider._tilingScheme),this._dayTextureTexCoordsRectangle.push(c),this._dayTextureTranslationAndScale.push(h);var d=new e$2c;d.x=a.transparentBackColor.red,d.y=a.transparentBackColor.green,d.z=a.transparentBackColor.blue,d.w=a.transparentBackColorTolerance,this._transparentBackColor.push(d),this._imageryClipEnable.push(a.enableImageryClip),this._dayTextureAlpha.push(a.alpha),this._applyAlpha=this._applyAlpha||a.alpha<.999}if(r>0)for(o=0;o<r;o++)this._dayTextures.push(e._context.defaultTransparentTexture),this._dayTextureUseWebMercatorT.push(!1),this._dayTextureTexCoordsRectangle.push(_0xd953f1),this._dayTextureTranslationAndScale.push(_0xd953f1),this._transparentBackColor.push(_0xd953f1),this._imageryClipEnable.push(!1),this._dayTextureFlipY.push(!1),this._dayTextureAlpha.push(1);this._context.webgpu&&(this._materialUBO._isValueDirty=!0,this._materialUBO.update(this._context))},_0x4881fc.prototype._createImageryShader=function(e,t){if(e$2e(this._imagerys)&&this._imagerys.length>0){this._computeImageryParameter(e);var i="",n="";(o=!1)&&(n="APPLY_IMAGERY_CUTOUT");var r=this._imagerys.length;r=Math.min(r,e$1W._maximumTextureImageUnits-2);var o,a=[],s={mixIndex:!0,mixDirection:0},l="#ifdef IMAGERY\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\n vec4 color = initialColor;\n";l+=" vec2 realTextureCoord;\n vec4 currentTextureColor;\n",(o=!1)&&(l+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(var u=0;u<r;++u){if(l+="realTextureCoord = computeTextureCoord(\n",l+="u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTranslationAndScale["+u+"],\nu_dayTextureSize["+u+"],\nu_dayTextureFlipY["+u+"]);\ncurrentTextureColor = texture2D(u_dayTextures["+u+"], realTextureCoord);\n\n",e$2e(h=_0xc579c6(a,u)))(d=u+1)==r&&(d=u),l+=" color = mvtTextureSampleAndBlend(\n color,\n u_dayTextures["+u+"],\n u_dayTextures["+d+"],\n u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+u+"],\n u_dayTextureTranslationAndScale["+u+"],\n "+converColorToVec4(h)+",\n "+(this._applyAlpha?"u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n vec4(0.0,0.0,0.0,0.0)\n );\n",u++;else l+=o?" cutoutAndColorResult = u_dayTextureCutoutRectangles["+u+"];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = czm_sampleAndBlend(\n":u===s.mixIndex&&s.mixDirection>0?" color = sampleAndBlendParent(\n":" color = czm_sampleAndBlend(\n",l+=" currentTextureColor,\n color,\n u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+u+"],\n u_transparentBackColor["+u+"],\n u_imageryClipEnable["+u+"],\n "+(this._applyAlpha?"u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n vec2(0.0,0.0),\n vec4(0.0,0.0,0.0,0.0)\n );\n",o&&(l+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(u=0;u<0;++u)l+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+u+"],\n u_gridTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_gridTextureTexCoordsRectangle["+u+"],\n u_gridTextureTranslationAndScale["+u+"]);\n";if(l+=" return color;\n}\n#endif",this._context.webgpu){var c=" #ifdef IMAGERY\n fn computeDayColor(initialColor : vec4<f32>, textureCoordinates : vec3<f32>) -> vec4<f32>\n {\n var color : vec4<f32> = initialColor;\n";c+=" var realTextureCoord : vec2<f32>;\n var currentTextureColor : vec4<f32>;\n",o&&(c+=" var cutoutAndColorResult : vec4<f32>;\n var texelUnclipped : bool;\n");for(u=0;u<r;++u){var h,d;if(c+=" realTextureCoord = computeTextureCoord(\n",c+=" select(textureCoordinates.xy, textureCoordinates.xz, vec2<bool>(bool(uniforms.u_dayTextureUseWebMercatorT["+u+"]))),\n uniforms.u_dayTextureTranslationAndScale["+u+"],\n uniforms.u_dayTextureSize["+u+"],\n bool(uniforms.u_dayTextureFlipY["+u+"]));\n currentTextureColor = textureSample(u_dayTextures"+u+", u_dayTexturesSampler, realTextureCoord);\n \n",e$2e(h=_0xc579c6(a,u)))(d=u+1)==r&&(d=u),c+=" color = mvtTextureSampleAndBlend(\n color,\n u_dayTextures["+u+"],\n u_dayTextures["+d+"],\n u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+u+"],\n u_dayTextureTranslationAndScale["+u+"],\n "+converColorToVec4(h)+",\n "+(this._applyAlpha?"u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n vec4(0.0,0.0,0.0,0.0)\n );\n",u++;else c+=o?" cutoutAndColorResult = uniforms.u_dayTextureCutoutRectangles["+u+"];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = czm_sampleAndBlend(\n":u===s.mixIndex&&s.mixDirection>0?" color = sampleAndBlendParent(\n":" color = czm_sampleAndBlend(\n",c+=" currentTextureColor,\n color,\n select(textureCoordinates.xy, textureCoordinates.xz, vec2<bool>(bool(uniforms.u_dayTextureUseWebMercatorT["+u+"]))),\n uniforms.u_dayTextureTexCoordsRectangle["+u+"],\n uniforms.u_transparentBackColor["+u+"],\n bool(uniforms.u_imageryClipEnable["+u+"]),\n "+(this._applyAlpha?"uniforms.u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n vec2(0.0,0.0),\n vec4(0.0,0.0,0.0,0.0)\n );\n",o&&(c+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(u=0;u<0;++u)c+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+u+"],\n select(textureCoordinates.xy, textureCoordinates.xz, u_dayTextureUseWebMercatorT["+u+"]),\n u_gridTextureTexCoordsRectangle["+u+"],\n u_gridTextureTranslationAndScale["+u+"]);\n";c+=" return color;\n }\n #endif ",t.sources.unshift(c)}else t.sources.push(l);var f=!1;for(u=0;u<t.defines.length;u++)if(t.defines[u].includes("IMAGERY")){f=!0;break}f||t.defines.push("IMAGERY"),this._applyAlpha&&t.defines.push("APPLY_ALPHA"),t.defines.push("TEXTURE_UNITS "+r),""!=i&&t.defines.push(i),""!=n&&t.defines.push(n),t.defines.push("GRIDTEXTURE_UNITS 0")}},_0x4881fc.prototype._refreshImageryShader=function(){for(var e=this._layer,t=this._sp.fragmentShaderSource.clone(),i=this._sp.vertexShaderSource.clone(),n=0;n<t.defines.length;n++)if(t.defines[n].includes("GRIDTEXTURE_UNITS")){t.defines.splice(n,1);break}for(n=0;n<t.defines.length;n++)if(t.defines[n].includes("TEXTURE_UNITS")){t.defines.splice(n,1);break}for(n=0;n<t.defines.length;n++)if(t.defines[n].includes("APPLY_ALPHA")){t.defines.splice(n,1);break}for(n=0;n<t.sources.length;n++)if(t.sources[n].includes("czm_sampleAndBlend")){t.sources.splice(n,1);break}this._createImageryShader(e,t);var r=!1;for(n=0;n<i.defines.length;n++)if(i.defines[n].includes("IMAGERY")){r=!0;break}r||i.defines.push("IMAGERY");var o=this._sp._attributeLocations;this._sp=this._sp&&this._sp.destroy();var a=r$14.fromCache({context:e._context,vertexShaderSource:i,fragmentShaderSource:t,attributeLocations:o});this._sp=a,e$2e(this._colorCommand)&&(this._colorCommand.shaderProgram=a)};var _0x1b3e66=(_0x3b35a0=!0,function(e,t){var i=_0x3b35a0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b35a0=!1,i}),_0x17f2d3=_0x1b3e66(void 0,(function(){return _0x17f2d3.toString().search("(((.+)+)+)+$").toString().constructor(_0x17f2d3).search("(((.+)+)+)+$")})),_0x3b35a0;function _0x3ad44f(){}function _0x29cef1(e){var t=new i$1d,i=e.instanceBounds;if(!e$2e(i))return t;var n=new o$1p(i[0],i[1],i[2]),r=new o$1p(i[3],i[4],i[5]),o=o$1p.lerp(n,r,.5,new o$1p),a=o$1p.distance(o,n);return t.center=o,t.radius=a,t}function _0x318266(e){var t,i,n=new i$1d,r=new o$1p,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,l=1;s?(l=e.vertCompressConstant,t=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),i=new Uint16Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/2)):i=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var u=[],c=0;c<e.verticesCount;c++)o$1p.fromArray(i,a*c,r),s&&(r=o$1p.multiplyByScalar(r,l,r),r=o$1p.add(r,t,r)),u.push(o$1p.clone(r));return i$1d.fromPoints(u,n),u.length=0,n}function _0x1bbafd(e){var t,i,n=new i$1d,r=new o$1p,o=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,a=e.vertexAttributes[0],s=a.componentsPerAttribute,l=1;o?(l=e.vertCompressConstant,i=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),t=new Uint16Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/2)):t=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var u=[],c=0;c<e.verticesCount;c++)o$1p.fromArray(t,s*c,r),o&&(r=o$1p.multiplyByScalar(r,l,r),r=o$1p.add(r,i,r)),u.push(o$1p.clone(r));return i$1d.fromPoints(u,n),u.length=0,n}function _0x9da2f5(e){var t,i,n=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,r=new f$1a,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=1;n?(s=e.vertCompressConstant,i=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),t=new Uint16Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/2)):t=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var l=[],u=0;u<e.verticesCount;u++){var c=t[a*u],h=t[a*u+1];n&&(c=s*c+i.x,h=s*h+i.y),l.push(new o$1o(c,h))}return f$1a.fromPoints(l,r),l.length=0,r}function _0x40b3fa(e){var t,i,n=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,r=new i$1d,o=new o$1p,a=new o$1p,s=e.vertexAttributes[0],l=s.componentsPerAttribute,u=e.attrLocation.aPosition,c=e.vertexAttributes[u],h=e.attrLocation.aTexCoord5,d=e.vertexAttributes[h],f=d.componentsPerAttribute;n?(l=3,f=3,t=_0x35ba52(e,c),i=_0x351395(e,d,5)):(t=new Float32Array(s.typedArray.buffer,s.typedArray.byteOffset,s.typedArray.byteLength/4),i=new Float32Array(d.typedArray.buffer,d.typedArray.byteOffset,d.typedArray.byteLength/4));for(var p=[],_=0;_<e.verticesCount;_++)o$1p.fromArray(t,l*_,o),o$1p.fromArray(i,f*_,a),o$1p.add(o,a,o),p.push(o$1p.clone(o));return i$1d.fromPoints(p,r),p.length=0,r}function _0x18cd5c(e){var t=W$18.TRIANGLES;switch(e){case 1:t=W$18.POINTS;break;case 2:t=W$18.LINES;break;case 3:t=W$18.LINE_STRIP;break;case 4:t=W$18.TRIANGLES}return t}function _0x307853(e,t,i,n){var r,o={};o.indicesCount=6*(e-t),o.indexType=n>65535?1:0,o.primitiveType=W$18.TRIANGLES,r=0===o.indexType?new Uint16Array(o.indicesCount):new Uint32Array(o.indicesCount);for(var a=0,s=0;s<t;s++){for(var l=0;l<i[s]-1;l++)r[6*(a-s+l)]=4*(a-s+l),r[6*(a-s+l)+1]=4*(a-s+l)+2,r[6*(a-s+l)+2]=4*(a-s+l)+1,r[6*(a-s+l)+3]=4*(a-s+l)+1,r[6*(a-s+l)+4]=4*(a-s+l)+2,r[6*(a-s+l)+5]=4*(a-s+l)+3;a+=i[s]}return o.indicesTypedArray=r,o}function _0x35ba52(e,t){for(var i,n,r,o=t.componentsPerAttribute,a=e.vertCompressConstant,s=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),l=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),u=new Float32Array(3*e.verticesCount),c=0;c<e.verticesCount;c++)i=l[o*c]*a+s.x,n=l[o*c+1]*a+s.y,r=l[o*c+2]*a+s.z,u[3*c]=i,u[3*c+1]=n,u[3*c+2]=r;return u}function _0x351395(e,t,i){for(var n,r,o,a=t.componentsPerAttribute,s=e.texCoordCompressConstant[i],l=new e$2c(e.minTexCoordValue[i].x,e.minTexCoordValue[i].y,e.minTexCoordValue[i].z,e.minTexCoordValue[i].w),u=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),c=new Float32Array(3*e.verticesCount),h=0;h<e.verticesCount;h++)n=u[a*h]*s+l.x,r=u[a*h+1]*s+l.y,o=u[a*h+2]*s+l.z,c[3*h]=n,c[3*h+1]=r,c[3*h+2]=o;return c}function _0x117f68(e){for(var t=[],i=e.length,n=0;n<i;n++){var r=_0x18cd5c(e[n].primitiveType);(r===W$18.LINES||r===W$18.LINE_STRIP)&&t.push(e[n])}return t}function _0x31d251(e){for(var t=0,i=e.length,n=0;n<i;n++){var r=e[n],o=_0x18cd5c(r.primitiveType);o==W$18.LINES?t+=r.indicesCount/2:o==W$18.LINE_STRIP&&t++}return t}function _0x475f06(e){for(var t=0,i=e.length,n=0;n<i;n++){t+=e[n].indicesCount}return t}function _0x5deb75(e,t,i){for(var n,r=[],o=i.length,a=0;a<o;a++){var s,l=i[a];s=0===l.indexType?new Uint16Array(l.indicesTypedArray.buffer,l.indicesTypedArray.byteOffset,l.indicesTypedArray.byteLength/2):new Uint32Array(l.indicesTypedArray.buffer,l.indicesTypedArray.byteOffset,l.indicesTypedArray.byteLength/4);var u=_0x18cd5c(l.primitiveType);if(u==W$18.LINES)for(n=0;n<l.indicesCount;n+=2){var c=[],h=new o$1p;h.x=e[s[n]*t],h.y=e[s[n]*t+1],h.z=e[s[n]*t+2],c.push(h);var d=new o$1p;d.x=e[s[n+1]*t],d.y=e[s[n+1]*t+1],d.z=e[s[n+1]*t+2],c.push(d),r.push(c)}else if(u==W$18.LINE_STRIP){c=[];for(n=0;n<l.indicesCount;n++){var f=new o$1p;f.x=e[s[n]*t],f.y=e[s[n]*t+1],f.z=e[s[n]*t+2],c.push(f)}r.push(c)}}return r}_0x17f2d3(),_0x3ad44f.calcBoundingSphereInWorker=function(e,t){return t.instanceIndex>-1?_0x29cef1(t):e$2e(t.clampRegionEdge)?_0x40b3fa(t):e>=p$T.ClampGroundPolygon&&e<=p$T.ClampObjectLine?_0x1bbafd(t):e==p$T.ClampGroundAndObjectLineCache?_0x40b3fa(t):_0x318266(t)},_0x3ad44f.calcBoundingSphere=function(e,t,i){var n,r=e._fileType;return n=t.instanceIndex>-1?_0x29cef1(t):e$2e(t.clampRegionEdge)?_0x40b3fa(t):r>=p$T.ClampGroundPolygon&&r<=p$T.ClampObjectLine?_0x1bbafd(t):r==p$T.ClampGroundAndObjectLineCache?_0x40b3fa(t):_0x318266(t),i$1d.transform(n,i,n),n},_0x3ad44f.calcBoundingRectangle=function(e,t){var i;return e._fileType===p$T.ClampGroundPolygon&&(i=_0x9da2f5(t)),i},_0x3ad44f.createEdge=function(e,t){if(!(t.length<1)){var i=_0x117f68(t);if(0!=i.length){var n,r=_0x31d251(i),o=e.attrLocation.aPosition,a=e.vertexAttributes[o],s=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,l=a.componentsPerAttribute;s?(l=3,n=_0x35ba52(e,a)):n=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var u=_0x475f06(i),c=_0x5deb75(n,l,i),h=4*u-4*r,d=new Float32Array(3*h),f=new Float32Array(3*h),p=new Float32Array(3*h),_=new Int8Array(2*h),m=0,g=0;g<r;g++){for(var x=c[g].length,y=0;y<x;y++){var v=4*m-4*g,$=3*v+12*y,b=c[g][y];0!=y&&(d[$-6]=b.x,d[$-5]=b.y,d[$-4]=b.z,d[$-3]=b.x,d[$-2]=b.y,d[$-1]=b.z),y!=x-1&&(d[$]=b.x,d[$+1]=b.y,d[$+2]=b.z,d[$+3]=b.x,d[$+4]=b.y,d[$+5]=b.z);var T=b;y+1<x&&(T=c[g][y+1]),0!=y&&(p[$-6]=T.x,p[$-5]=T.y,p[$-4]=T.z,p[$-3]=T.x,p[$-2]=T.y,p[$-1]=T.z),y!=x-1&&(p[$]=T.x,p[$+1]=T.y,p[$+2]=T.z,p[$+3]=T.x,p[$+4]=T.y,p[$+5]=T.z);var C=b;y>=1&&(C=c[g][y-1]),0!=y&&(f[$-6]=C.x,f[$-5]=C.y,f[$-4]=C.z,f[$-3]=C.x,f[$-2]=C.y,f[$-1]=C.z),y!=x-1&&(f[$]=C.x,f[$+1]=C.y,f[$+2]=C.z,f[$+3]=C.x,f[$+4]=C.y,f[$+5]=C.z),$=2*v+8*y,0!=y&&(_[$-4]=-1,_[$-3]=-1,_[$-2]=1,_[$-1]=-1),y!=x-1&&(_[$]=-1,_[$+1]=1,_[$+2]=1,_[$+3]=1)}m+=c[g].length}var S={vertexAttributes:[],attrLocation:{}},w=S.vertexAttributes,E=S.attrLocation;S.instanceCount=0,S.instanceMode=0,E.aPosition=0,w.push({index:E.aPosition,typedArray:d,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),E.aNormal=1,w.push({index:E.aNormal,typedArray:f,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),E.aTexCoord0=2,w.push({index:E.aTexCoord0,typedArray:p,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),E.aTexCoord1=3,w.push({index:E.aTexCoord1,typedArray:_,componentsPerAttribute:2,componentDatatype:S$14.BYTE,offsetInBytes:0,strideInBytes:2*Int8Array.BYTES_PER_ELEMENT,normalize:!1});for(var P=[],A=0;A<c.length;A++)P.push(c[A].length);return{vertexPackage:S,indexPackage:_0x307853(u,r,P,h)}}}};var _0x494be5=(_0x27c74b=!0,function(e,t){var i=_0x27c74b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27c74b=!1,i}),_0x27ee63=_0x494be5(void 0,(function(){return _0x27ee63.toString().search("(((.+)+)+)+$").toString().constructor(_0x27ee63).search("(((.+)+)+)+$")})),_0x27c74b;function _0x1a0b3c(){}_0x27ee63(),Object.defineProperties(_0x1a0b3c.prototype,{});var _0x37c972=new e$1X,_0x298bda=e$1X.WHITE,_0x33fafd=void 0,_0x1a5e14=600;function _0x475a4b(e,t){var i=[];for(var n in e)if(e.hasOwnProperty(n)&&"0"!==n){var r=new _0xee2f65(this,n);Object.assign(r,t._layerScheduler._attributes[n]);var o=e[n];Array.isArray(o)||(o=[o]);for(var a=0,s=o.length;a<s;a++)r.addVertexOffset(o[a].vertexColorCount,o[a].vertexColorOffset);i.push(r)}return i}function _0x3ad7ec(e,t){for(var i=t.length,n=!1,r=0;r<i&&!n;r++)for(var o=t[r],a=o.span,s=0;s<a.length;s++){var l=a[s],u=l.vertexOffset,c=l.vertexOffset+l.vertexCount;if(e>=u&&e<c){o.indexValue.push(e),n=!0;break}}}function _0x4296e0(e,t){if(1!=t.length){var i=0,n=e.indicesCount,r=0===e.indexType?Uint16Array:Uint32Array,o=new r(e.indicesTypedArray.buffer,e.indicesTypedArray.byteOffset,n);for(i=0;i<n;i++){_0x3ad7ec(o[i],t)}for(i=0;i<t.length;i++){var a,s=t[i],l=s.indexValue.length;a=new r(l);for(var u=0;u<l;u++)a[u]=s.indexValue[u];s.indexPackage={indexType:e.indexType,indicesCount:l,indicesTypedArray:a,materialCode:e.materialCode,primitiveType:e.primitiveType}}}else t[0].indexPackage=e}function _0x153eb3(e){for(var t=e._array,i=0;i<t.length;i++){var n=t[i],r=n.batchFeatures;if(e$2e(r)&&!(r.length<1))for(var o=0;o<r.length;o++){var a=r[o];n.span=n.span.concat(a.getVertexOffset())}}}_0x1a0b3c.createRenderEntityPageLOD=function(e,t){var i=t.themeStyle,n=e.pickInfo,r=e.arrIndexPackage;if(this._fileType===p$T.Text&&this.createBillboardsBounds(),!e$2e(i)||!e$2e(n))return[new _0x4881fc(e)];if(e$2e(i.image)){for(var o=_0x475a4b(n,t),a=new e$1Q,s=0;s<o.length;s++){var l=o[s],u=e$2e(i.color)?i.color.evaluateColor(l,_0x37c972):_0x298bda,c=e$2e(i.image)?i.image.evaluate(l):_0x33fafd,h=e$2e(i.imageRepeatX)?i.imageRepeatX.evaluate(l):_0x1a5e14,d=e$2e(i.imageRepeatY)?i.imageRepeatY.evaluate(l):_0x1a5e14;e$2e(h)||(h=_0x1a5e14),e$2e(d)||(d=_0x1a5e14);var f=new o$1o(h,d);l.color=u,l.imageUrl=c;var p=l.getRenderBatchKey();if(!a.contains(p)){var _=new e$1X;_=e$1X.clone(u),a.set(p,{color:_,imageUrl:c,imageRepeat:f,batchFeatures:[],span:[],indexValue:[]})}a.get(p).batchFeatures.push(l)}var m=a._array;_0x153eb3(a),_0x4296e0(r[0],m);for(var g=[],x=0;x<m.length;x++){e.symbolTextureUrl=m[x].imageUrl,e.symbolColor=m[x].color,e.arrIndexPackage=[m[x].indexPackage],e.symbolTextureRepeat=m[x].imageRepeat;var y=new _0x4881fc(e);g.push(y)}return g}};var c$U={};function d$14(e,t,i){e$2e(t)||(t=e.width),e$2e(i)||(i=e.height);var n=c$U[t];e$2e(n)||(n={},c$U[t]=n);var r=n[i];if(!e$2e(r)){var o=document.createElement("canvas");o.width=t,o.height=i,(r=o.getContext("2d")).globalCompositeOperation="copy",n[i]=r}return r.drawImage(e,0,0,t,i),r.getImageData(0,0,t,i).data}if(typeof WebAssembly<"u"){let e=function(e){return n$K.locateFile?n$K.locateFile(e,v$H):v$H+e},t=function(e,t){e||R("Assertion failed: "+t)},i=function(e){var i=n$K["_"+e];return t(i,"Cannot call unknown function "+e+", make sure it is exported"),i},n=function(e,t,n,r,o){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=en$4(i),l(e,t,i)}return t},array:function(e){var t=en$4(e.length);return u(e,t),t}};var c=i(e),h=[],d=0;if(r)for(var f=0;f<r.length;f++){var p=s[n[f]];p?(0===d&&(d=Kn$1()),h[f]=p(r[f])):h[f]=r[f]}var _=c.apply(null,h);return _=function(e){return"string"===t?a(e):"boolean"===t?Boolean(e):e}(_),0!==d&&Fn$1(d),_},r=function(e,t,r,o){var a=(r=r||[]).every((function(e){return"number"===e}));return"string"!==t&&a&&!o?i(e):function(){return n(e,t,r,arguments)}},o=function(e,t,i){for(var n=t+i,r=t;e[r]&&!(r>=n);)++r;if(r-t>16&&e.subarray&&O$H)return O$H.decode(e.subarray(t,r));for(var o="";t<r;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var l=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|l:(7&a)<<18|s<<12|l<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var u=a-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},a=function(e,t){return e?o(X$Q,e,t):""},s=function(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+3>=o)break;t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r},l=function(e,t,i){return s(e,X$Q,t,i)},u=function(e,t){W$U.set(e,t)},c=function(e,t){return e%t>0&&(e+=t-e%t),e},h=function(){n$K.HEAP8=W$U=new Int8Array(c$T),n$K.HEAP16=new Int16Array(c$T),n$K.HEAP32=x$X=new Int32Array(c$T),n$K.HEAPU8=X$Q=new Uint8Array(c$T),n$K.HEAPU16=new Uint16Array(c$T),n$K.HEAPU32=new Uint32Array(c$T),n$K.HEAPF32=new Float32Array(c$T),n$K.HEAPF64=new Float64Array(c$T)},d=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?n$K.dynCall_v(i):n$K.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},f=function(){if(n$K.preRun)for("function"==typeof n$K.preRun&&(n$K.preRun=[n$K.preRun]);n$K.preRun.length;)g(n$K.preRun.shift());d(N$N)},p=function(){nn$5||(nn$5=!0,d(Qn$1))},_=function(){d(Zn$1)},m=function(){if(n$K.postRun)for("function"==typeof n$K.postRun&&(n$K.postRun=[n$K.postRun]);n$K.postRun.length;)x(n$K.postRun.shift());d(M$U)},g=function(e){N$N.unshift(e)},x=function(e){M$U.unshift(e)},y=function(e){b$13++,n$K.monitorRunDependencies&&n$K.monitorRunDependencies(b$13)},v=function(e){if(b$13--,n$K.monitorRunDependencies&&n$K.monitorRunDependencies(b$13),0==b$13&&(null!==J$P&&(clearInterval(J$P),J$P=null),R$Q)){var t=R$Q;R$Q=null,t()}},$=function(e){return String.prototype.startsWith?e.startsWith(rn$5):0===e.indexOf(rn$5)},b=function(){try{if(n$K.wasmBinary)return new Uint8Array(n$K.wasmBinary);if(n$K.readBinary)return n$K.readBinary(m$T);throw"both async and sync fetching of the wasm failed"}catch(e){R(e)}},T=function(){return n$K.wasmBinary||!_$M&&!h$T||"function"!=typeof fetch?new Promise((function(e,t){e(b())})):fetch(m$T,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+m$T+"'";return e.arrayBuffer()})).catch((function(){return b()}))},C=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Bn$2};function i(e,t){var i=e.exports;n$K.asm=i,v()}function n(e){i(e.instance)}function r(e){return T().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(y(),n$K.instantiateWasm)try{return n$K.instantiateWasm(t,i)}catch{return!1}return function(){if(n$K.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||$(m$T)||"function"!=typeof fetch)return r(n);fetch(m$T,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(n,(function(e){r(n)}))}))}(),{}},S=function(){return W$U.length},w=function(e){return n$K.___errno_location&&(x$X[n$K.___errno_location()>>2]=e),e},E=function(e){R("OOM")},P=function(e){e=c(e,65536);var t=c$T.byteLength;try{return-1!==P$Q.grow((e-t)/65536)&&(c$T=P$Q.buffer,!0)}catch{return!1}},A=function(e){var t=S(),i=65536,n=2147418112;if(e>n)return!1;for(var r=Math.max(t,16777216);r<e;)r=r<=536870912?c(2*r,i):Math.min(c((3*r+2147483648)/4,i),n);return!!P(r)&&(h(),!0)},L=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},M=function(e){function t(){n$K.calledRun||(n$K.calledRun=!0,!d$13&&(p(),_(),n$K.onRuntimeInitialized&&n$K.onRuntimeInitialized(),m()))}e=e||n$K.arguments,b$13>0||(f(),b$13>0)||n$K.calledRun||(n$K.setStatus?(n$K.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n$K.setStatus("")}),1),t()}),1)):t())},R=function(e){n$K.onAbort&&n$K.onAbort(e),e=void 0!==e?'"'+e+'"':"",d$13=!0};var n$K=typeof n$K<"u"?n$K:{},A$10={},l$W;for(l$W in n$K)n$K.hasOwnProperty(l$W)&&(A$10[l$W]=n$K[l$W]);n$K.arguments=[],n$K.thisProgram="./this.program",n$K.quit=function(e,t){throw t},n$K.preRun=[],n$K.postRun=[];var _$M=!1,h$T=!1,L$$=!1,D$U=!1,V$N=!1;_$M="object"==typeof window,h$T="function"==typeof importScripts,D$U="object"==typeof process&&"function"==typeof require,L$$=D$U&&!_$M&&!h$T,V$N=!_$M&&!L$$&&!h$T;var v$H="",H$X,U$U;if(L$$)v$H=__dirname+"/",n$K.read=function(e,t){var i;return H$X||(H$X=require("fs")),U$U||(U$U=require("path")),e=U$U.normalize(e),i=H$X.readFileSync(e),t?i:i.toString()},n$K.readBinary=function(e){var i=n$K.read(e,!0);return i.buffer||(i=new Uint8Array(i)),t(i.buffer),i},process.argv.length>1&&(n$K.thisProgram=process.argv[1].replace(/\\/g,"/")),n$K.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=n$K),process.on("uncaughtException",(function(e){if(!(e instanceof L))throw e})),process.on("unhandledRejection",R),n$K.quit=function(e){process.exit(e)},n$K.inspect=function(){return"[Emscripten Module object]"};else V$N?(typeof read<"u"&&(n$K.read=function(e){return read(e)}),n$K.readBinary=function(e){var i;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(i=read(e,"binary"),t("object"==typeof i),i)},typeof scriptArgs<"u"?n$K.arguments=scriptArgs:typeof arguments<"u"&&(n$K.arguments=arguments),"function"==typeof quit&&(n$K.quit=function(e){quit(e)})):(_$M||h$T)&&(h$T?v$H=self.location.href:document.currentScript&&(v$H=document.currentScript.src),v$H=0!==v$H.indexOf("blob:")?v$H.substr(0,v$H.lastIndexOf("/")+1):"",n$K.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h$T&&(n$K.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),n$K.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},n$K.setWindowTitle=function(e){document.title=e});var Sn$2=n$K.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),Gn$1=n$K.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||Sn$2);for(l$W in A$10)A$10.hasOwnProperty(l$W)&&(n$K[l$W]=A$10[l$W]);A$10=void 0;var Bn$2={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var P$Q,d$13=!1,O$H=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Ln$2=65536,c$T,W$U,X$Q,x$X,Jn$1=5246e3,E$V=3088,I$13=5242880,S$O=n$K.TOTAL_MEMORY||16777216;S$O<I$13&&Gn$1("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+S$O+"! (TOTAL_STACK="+I$13+")"),n$K.buffer?c$T=n$K.buffer:"object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(P$Q=new WebAssembly.Memory({initial:S$O/Ln$2}),c$T=P$Q.buffer):c$T=new ArrayBuffer(S$O),h(),x$X[E$V>>2]=Jn$1;var N$N=[],Qn$1=[],Zn$1=[],M$U=[],nn$5=!1,b$13=0,J$P=null,R$Q=null;n$K.preloadedImages={},n$K.preloadedAudios={};var rn$5="data:application/octet-stream;base64,",m$T,$n$1=typeof window>"u"?self:window;m$T=$n$1.location.href.endsWith(".openrealspace")?"../../static/Build/SuperMap3D/ThirdParty/Module.wasm":"ThirdParty/Module.wasm",$(m$T)||(m$T=e(m$T)),n$K.asm=function(e,t,i){return t.memory=P$Q,t.table=new WebAssembly.Table({initial:23,maximum:23,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0,C(t)};var Yn$1={},kn$1={b:R,c:w,f:S,e:A,d:E,a:E$V},tn$5=n$K.asm(Yn$1,kn$1,c$T);n$K.asm=tn$5,n$K.___errno_location=function(){return n$K.asm.g.apply(null,arguments)},n$K._floatToTextureColor=function(){return n$K.asm.h.apply(null,arguments)},n$K._free=function(){return n$K.asm.i.apply(null,arguments)},n$K._free_result=function(){return n$K.asm.j.apply(null,arguments)},n$K._malloc=function(){return n$K.asm.k.apply(null,arguments)};var en$4=n$K.stackAlloc=function(){return n$K.asm.n.apply(null,arguments)},Fn$1=n$K.stackRestore=function(){return n$K.asm.o.apply(null,arguments)},Kn$1=n$K.stackSave=function(){return n$K.asm.p.apply(null,arguments)};if(n$K.dynCall_v=function(){return n$K.asm.l.apply(null,arguments)},n$K.dynCall_vi=function(){return n$K.asm.m.apply(null,arguments)},n$K.asm=tn$5,n$K.cwrap=r,L.prototype=new Error,L.prototype.constructor=L,R$Q=function e(){n$K.calledRun||M(),n$K.calledRun||(R$Q=e)},n$K.run=M,n$K.abort=R,n$K.preInit)for("function"==typeof n$K.preInit&&(n$K.preInit=[n$K.preInit]);n$K.preInit.length>0;)n$K.preInit.pop()();n$K.noExitRuntime=!0,M()}else var n$K=null;var _0x3c481f=n$K;function I$12(){t$15.throwInstantiationError()}Object.defineProperties(I$12.prototype,{errorEvent:{get:t$15.throwInstantiationError},credit:{get:t$15.throwInstantiationError},tilingScheme:{get:t$15.throwInstantiationError},ready:{get:t$15.throwInstantiationError},readyPromise:{get:t$15.throwInstantiationError},hasWaterMask:{get:t$15.throwInstantiationError},hasVertexNormals:{get:t$15.throwInstantiationError},availability:{get:t$15.throwInstantiationError}});var A$$=[];I$12.getRegularGridIndices=function(e,t){if(e*t>=e$2d.FOUR_GIGABYTES)throw new t$15("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=A$$[e];e$2e(i)||(A$$[e]=i=[]);var n=i[t];return e$2e(n)||b$12(e,t,n=e*t<e$2d.SIXTY_FOUR_KILOBYTES?i[t]=new Uint16Array((e-1)*(t-1)*6+3*(e+t-2)):i[t]=new Uint32Array((e-1)*(t-1)*6+3*(e+t-2)),0),n},I$12.getRegularGridIndicesForReproject=function(e,t){if(e*t>=e$2d.FOUR_GIGABYTES)throw new t$15("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=A$$[e];e$2e(i)||(A$$[e]=i=[]);var n=i[t];return e$2e(n)||b$12(e,t,n=e*t<e$2d.SIXTY_FOUR_KILOBYTES?i[t]=new Uint16Array((e-1)*(t-1)*6):i[t]=new Uint32Array((e-1)*(t-1)*6),0),n};var U$T=[];I$12.getRegularGridIndicesAndEdgeIndices=function(e,t){if(e*t>=e$2d.FOUR_GIGABYTES)throw new t$15("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=U$T[e];e$2e(i)||(U$T[e]=i=[]);var n=i[t];if(!e$2e(n)){var r=I$12.getRegularGridIndices(e,t),o=O$G(e,t),a=o.westIndicesSouthToNorth,s=o.southIndicesEastToWest,l=o.eastIndicesNorthToSouth,u=o.northIndicesWestToEast;n=i[t]={indices:r,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:l,northIndicesWestToEast:u}}return n};var N$M=[];function O$G(e,t){var i,n=new Array(t),r=new Array(e),o=new Array(t),a=new Array(e);for(i=0;i<e;++i)a[i]=i,r[i]=e*t-1-i;for(i=0;i<t;++i)o[i]=(i+1)*e-1,n[i]=(t-i-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:r,eastIndicesNorthToSouth:o,northIndicesWestToEast:a}}function b$12(e,t,i,n){for(var r=0,o=0;o<t-1;++o){for(var a=0;a<e-1;++a){var s=r,l=s+e,u=l+1,c=s+1;i[n++]=s,i[n++]=l,i[n++]=c,i[n++]=c,i[n++]=l,i[n++]=u,++r}++r}var h=(t-1)/2,d=(e-1)/2;r=0;for(a=0;a<d;a++)i[n++]=r,i[n++]=r+1,i[n++]=r+2,r+=2;r=e*(t-1);for(a=0;a<d;a++)i[n++]=r+1,i[n++]=r,i[n++]=r+2,r+=2;r=0;for(a=0;a<h;a++)i[n++]=r+e,i[n++]=r,i[n++]=r+2*e,r+=2*e;r=e-1;for(a=0;a<h;a++)i[n++]=r,i[n++]=r+e,i[n++]=r+2*e,r+=2*e}function S$N(e,t,i,n,r){for(var o=e$2e(r),a=e[0],s=e.length,l=1;l<s;++l){var u=e[l];!o||r[a+"_"+u]?(i[n++]=a,i[n++]=u,i[n++]=t,i[n++]=t,i[n++]=u,i[n++]=t+1,a=u,++t):(a=u,++t)}return n}function f$T(e){var t,i=e.name,n=e.message;t=e$2e(i)&&e$2e(n)?i+": "+n:e.toString();var r=e.stack;return e$2e(r)&&(t+="\n"+r),t}function l$V(e,t,i,n,r,o,a){this.provider=e,this.message=t,this.x=i,this.y=n,this.level=r,this.timesRetried=u$Z(o,0),this.retry=!1,this.error=a}function t$H(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.persists=u$Z(e.persists,!1),this.pass=Le$q.COMPUTE,this.renderState=e.renderState,this.clear=u$Z(e.clear,!0),this.owner=e.owner,this.name=u$Z(e.name,""),e.name||console.log("ComputeCommand need a name.")}I$12.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){if(e*t>=e$2d.FOUR_GIGABYTES)throw new t$15("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=N$M[e];e$2e(i)||(N$M[e]=i=[]);var n=i[t];if(!e$2e(n)){var r=e*t,o=(e-1)*(t-1)*6,a=2*e+2*t,s=r+a,l=3*(e+t-2),u=o+6*Math.max(0,a-4)+l,c=O$G(e,t),h=c.westIndicesSouthToNorth,d=c.southIndicesEastToWest,f=c.eastIndicesNorthToSouth,p=c.northIndicesWestToEast,_=ce$z.createTypedArray(s,u);b$12(e,t,_,0),I$12.addSkirtIndices(h,d,f,p,r,_,o+l),n=i[t]={indices:_,westIndicesSouthToNorth:h,southIndicesEastToWest:d,eastIndicesNorthToSouth:f,northIndicesWestToEast:p,indexCountWithoutSkirts:o}}return n},I$12.addSkirtIndices=function(e,t,i,n,r,o,a,s){var l=r;a=S$N(e,l,o,a,s),a=S$N(t,l+=e.length,o,a,s),a=S$N(i,l+=t.length,o,a,s),S$N(n,l+=i.length,o,a,s)},I$12.heightmapTerrainQuality=.25,I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,i){return 2*e.maximumRadius*Math.PI*I$12.heightmapTerrainQuality/(t*i)},I$12.prototype.requestTileGeometry=t$15.throwInstantiationError,I$12.prototype.getLevelMaximumGeometricError=t$15.throwInstantiationError,I$12.prototype.getTileDataAvailable=t$15.throwInstantiationError,I$12.prototype.loadTileDataAvailability=t$15.throwInstantiationError,l$V.handleError=function(e,t,i,n,r,o,a,s,l){var u=e;return e$2e(e)?(u.provider=t,u.message=n,u.x=r,u.y=o,u.level=a,u.retry=!1,u.error=l,++u.timesRetried):u=new l$V(t,n,r,o,a,0,l),i.numberOfListeners>0?i.raiseEvent(u):console.log('An error occurred in "'+t.constructor.name+'": '+f$T(n)),u.retry&&e$2e(s)&&s(),u},l$V.handleSuccess=function(e){e$2e(e)&&(e.timesRetried=-1)},t$H.prototype.execute=function(e){e.execute(this)};var Ve$i="uniform sampler2D u_texture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",je$g="attribute vec4 position;\nattribute float webMercatorT;\n\nuniform vec2 u_textureDimensions;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n v_textureCoordinates = vec2(position.x, webMercatorT);\n gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));\n}\n",e$1g={LEFT:-1,BOTTOM:-1,NONE:0,RIGHT:1,TOP:1},Xe$d=Object.freeze(e$1g);function o$T(e,t,i,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i,this.flipY=n,this.imageryLayer=void 0,this.morphingAlpha=void 0}function c$S(e){if(e=u$Z(e,{}),this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._numberOfLevelZeroTilesX=u$Z(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=u$Z(e.numberOfLevelZeroTilesY,1),this._projection=u$Z(e.projection,new t$N(this._ellipsoid)),e$2e(e.rectangleSouthwestInMeters)&&e$2e(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{var t=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new o$1o(-t,-t),this._rectangleNortheastInMeters=new o$1o(t,t)}var i=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new h$18(i.longitude,i.latitude,n.longitude,n.latitude),this._customDPI=e.customDPI,this._scaleDenominators=e.scaleDenominators,this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._orgin=u$Z(e.orgin,void 0)}o$T.prototype.freeResources=function(){e$2e(this.readyImagery)&&this.readyImagery.releaseReference(),e$2e(this.loadingImagery)&&this.loadingImagery.releaseReference()},o$T.prototype.processStateMachine=function(e,t,i){var n=this.loadingImagery,r=n.imageryLayer;if(n.processStateMachine(t,!this.useWebMercatorT,i),n.state===wt$7.READY)return e$2e(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this),this.morphingBeginTime=performance.now(),!0;for(var o,a=n.parent;e$2e(a)&&(a.state!==wt$7.READY||!this.useWebMercatorT&&!e$2e(a.texture));)a.state!==wt$7.FAILED&&a.state!==wt$7.INVALID&&(o=o||a),a=a.parent;return this.readyImagery!==a&&(e$2e(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=a,e$2e(a)&&(a.addReference(),this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this))),(n.state===wt$7.FAILED||n.state===wt$7.INVALID)&&(e$2e(o)?(o.processStateMachine(t,!this.useWebMercatorT,i),!1):(n.imageryLayer&&!1===n.imageryLayer.enableUpsample&&(this.discard=!0),!0))},Object.defineProperties(c$S.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}},orgin:{get:function(){return this._orgin}}}),c$S.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},c$S.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},c$S.prototype.rectangleToNativeRectangle=function(e,t){var i=this._projection,n=i.project(h$18.southwest(e)),r=i.project(h$18.northeast(e));return e$2e(t)?(t.west=n.x,t.south=n.y,t.east=r.x,t.north=r.y,t):new h$18(n.x,n.y,r.x,r.y)},c$S.prototype.tileXYToNativeRectangle=function(e,t,i,n){var r=e$2e(this._orgin)?this._orgin.x:this._rectangleSouthwestInMeters.x,o=e$2e(this._orgin)?this._orgin.y:this._rectangleNortheastInMeters.y;if(e$2e(this._customDPI)&&e$2e(this._scaleDenominators)){var a=this.calculateResolution(i),s=r+e*this._tileWidth*a.x,l=r+(e+1)*this._tileWidth*a.x,u=o-t*this._tileHeight*a.y,c=o-(t+1)*this._tileHeight*a.y;return e$2e(n)?(n.west=s,n.south=c,n.east=l,n.north=u,n):new h$18(s,c,l,u)}var h=this.getNumberOfXTilesAtLevel(i),d=this.getNumberOfYTilesAtLevel(i),f=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/h,p=(s=this._rectangleSouthwestInMeters.x+e*f,l=this._rectangleSouthwestInMeters.x+(e+1)*f,(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/d);u=this._rectangleNortheastInMeters.y-t*p,c=this._rectangleNortheastInMeters.y-(t+1)*p;return e$2e(n)?(n.west=s,n.south=c,n.east=l,n.north=u,n):new h$18(s,c,l,u)},c$S.prototype.tileXYToRectangle=function(e,t,i,n){var r=this.tileXYToNativeRectangle(e,t,i,n),o=this._projection,a=o.unproject(new o$1o(r.west,r.south)),s=o.unproject(new o$1o(r.east,r.north));return r.west=a.longitude,r.south=a.latitude,r.east=s.longitude,r.north=s.latitude,r},c$S.prototype.positionToTileXY=function(e,t,i){var n=this._rectangle;if(h$18.contains(n,e)){var r=this.getNumberOfXTilesAtLevel(t),o=this.getNumberOfYTilesAtLevel(t),a=e$2e(this._orgin)?this._orgin.x:this._rectangleSouthwestInMeters.x,s=e$2e(this._orgin)?this._orgin.y:this._rectangleNortheastInMeters.y,l=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/r,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/o;if(e$2e(this._customDPI)&&e$2e(this._scaleDenominators)){var c=this.calculateResolution(t);l=this._tileWidth*c.x,u=this._tileHeight*c.y}var h=this._projection.project(e),d=h.x-a,f=s-h.y;e$2e(this._orgin)&&(r+=this._orgin.x!=this._rectangleSouthwestInMeters.x?Math.ceil((h.x-this._orgin.x)/l):0,o+=this._orgin.y!=this._rectangleSouthwestInMeters.y?Math.ceil((this._orgin.y-h.y)/u):0);var p=d/l|0;p>=r&&(p=r-1);var _=f/u|0;return _>=o&&(_=o-1),e$2e(i)?(i.x=p,i.y=_,i):new o$1o(p,_)}},c$S.prototype.calculateResolution=function(e){return new o$1o(.0254*this._scaleDenominators[e]/this._customDPI.x,.0254*this._scaleDenominators[e]/this._customDPI.y)};var _0xe11a5c=(_0xc405e0=!0,function(e,t){var i=_0xc405e0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc405e0=!1,i}),_0x373afc=_0xe11a5c(void 0,(function(){return _0x373afc.toString().search("(((.+)+)+)+$").toString().constructor(_0x373afc).search("(((.+)+)+)+$")})),_0xc405e0;_0x373afc();var _0x21acd2=1029,_0x55a76b=2305,_0x14ded5=function(e,t,i){this.enable=e,this.mode=t,this.frontFace=i};_0x14ded5.disabled=new _0x14ded5(!1,_0x21acd2,_0x55a76b),_0x14ded5.backCCW=new _0x14ded5(!0,_0x21acd2,_0x55a76b);var _0x52bf7b=(_0x13d174=!0,function(e,t){var i=_0x13d174?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13d174=!1,i}),_0x31d34a=_0x52bf7b(void 0,(function(){return _0x31d34a.toString().search("(((.+)+)+)+$").toString().constructor(_0x31d34a).search("(((.+)+)+)+$")})),_0x13d174;_0x31d34a();var _0x1fcde5=519,_0x4a9140=function(e,t,i){this.func=e,this.mask=t,this.range=i};_0x4a9140.ReadOnly=!1,_0x4a9140.ReadWrite=!0,_0x4a9140.disabled=new _0x4a9140(_0x1fcde5,_0x4a9140.ReadOnly,[0,1]);var _0x32ed41=(_0x23de7e=!0,function(e,t){var i=_0x23de7e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23de7e=!1,i}),_0x4856b3=_0x32ed41(void 0,(function(){return _0x4856b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x4856b3).search("(((.+)+)+)+$")})),_0x23de7e;function _0x2ddbe2(e,t,i){if(e.realtime&&e$2e(i)&&e$2e(i.zoom)){var n=i.zoom;e$2e(i.drawFillPattern)&&(n=Math.floor(n+.5));var r=i.zoom-e.level,o=t*(ne$C/(e.targetTileSize*Math.pow(2,r)));o*=e.targetTileSize/512;var a=i.zoom-i.finestRenderLevel;return a>0&&(o*=Math.pow(2,a)),o}return t*(ne$C/e.targetTileSize)}_0x4856b3();var _0x1ea0f2=(_0x15d7c2=!0,function(e,t){var i=_0x15d7c2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x15d7c2=!1,i}),_0x5b63a6=_0x1ea0f2(void 0,(function(){return _0x5b63a6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b63a6).search("(((.+)+)+)+$")})),_0x15d7c2;_0x5b63a6();var _0x36a80a={circleUniforms:function(e,t){return{u_camera_to_center_distance:new _0x3d809b.Uniform1f(e,t.u_camera_to_center_distance),u_scale_with_map:new _0x3d809b.Uniform1i(e,t.u_scale_with_map),u_pitch_with_map:new _0x3d809b.Uniform1i(e,t.u_pitch_with_map),u_extrude_scale:new _0x3d809b.Uniform2f(e,t.u_extrude_scale),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix)}},circleUniformValues:function(e,t,i){var n,r;if(e.transform,"map"===i.paint.get("circle-pitch-alignment")){var o=_0x2ddbe2(t,1);n=!0,r=[o,o]}else n=!1,r=_0x8a287b(t);return{u_camera_to_center_distance:1,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:_0x199f61(t),u_pitch_with_map:+n,u_device_pixel_ratio:1,u_extrude_scale:r}},circleUniformMap:function(e,t,i){var n,r;if("map"===i.paint.get("circle-pitch-alignment")){var o=_0x2ddbe2(t,1);n=!0,r=[o,o]}else n=!1,r=_0x8a287b(t);var a={u_camera_to_center_distance:function(){return 1},u_scale_with_map:function(){return+("map"===i.paint.get("circle-pitch-scale"))},u_matrix:function(){return _0x199f61(t)},u_pitch_with_map:function(){return+n},u_device_pixel_ratio:function(){return 1},u_extrude_scale:function(){return r},u_mapbox_alpha:function(){return void 0===e.alpha?1:e.alpha}};return a}},_0x25d54b=new Float32Array(16);function _0x199f61(e){var t=e.viewProjection;return p$1d.toArray(t,_0x25d54b)}function _0x8a287b(e){return[2/e.tileSize,-2/e.tileSize]}var _0x3edba8=(_0x34a075=!0,function(e,t){var i=_0x34a075?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x34a075=!1,i}),_0x4b957a=_0x3edba8(void 0,(function(){return _0x4b957a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b957a).search("(((.+)+)+)+$")})),_0x34a075;function _0x3ac934(e,t,i,n){if("translucent"===e.renderPass){var r=i.paint.get("circle-opacity"),o=i.paint.get("circle-stroke-width"),a=i.paint.get("circle-stroke-opacity"),s=void 0!==i.layout.get("circle-sort-key").constantOr(1);if(0!==r.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1)){var l=e.depthModeForSublayer(0,_0x4a9140.ReadOnly),u=e.colorModeForRenderPass(),c=[],h=t.getBucket(i);if(h){var d=h.programConfigurations.get(i.id),f=e.useProgram("circle",d),p=f.program,_=h.layoutVertexBuffer,m=h.indexBuffer,g=_0x36a80a.circleUniformMap(e,t,i),x=f.cesiumProgram,y=x.allUniforms;g=d.getUniformMaps(y,i.paint,g);var v={programConfiguration:d,program:p,layoutVertexBuffer:_,indexBuffer:m,uniformMap:g};if(s)for(var $=0,b=h.segments.get();$<b.length;$+=1){var T=b[$];c.push({segments:new _0x1e8367([T]),sortKey:T.sortKey,state:v})}else c.push({segments:h.segments,sortKey:0,state:v});s&&c.sort((function(e,t){return e.sortKey-t.sortKey}));for(var C=0,S=c;C<S.length;C+=1){var w=0;for(b=S[C].segments.get();w<b.length;w+=1){var E=((T=b[w]).drawCommands||(T.drawCommands={}))[i.id];if(!E){E=new i$$({cull:!1,primitiveType:W$18.TRIANGLES,count:3*T.primitiveLength,offset:3*T.primitiveOffset}),T.drawCommands[i.id]=E;for(var P=T.cesiumVaos||(T.cesiumVaos={}),A=[],L=(_=h.layoutCesiumVertexBuffer,0);L<_.attributes.length;L++){var M=_.attributes[L],R=_0x42145e.mbxAttributeToCesiumVertexArrtribute(M,_,L,T.vertexOffset);A.push(R)}var O=P[i.id]||(P[i.id]=new c$13({context:e.cesiumContext,attributes:A,indexBuffer:h.cesiumIndexBuffer}));E.vertexArray=O}g.u_depthRange=function(){return l.range[0]},E.uniformMap=g,E.renderState=_0x42145e.toRenderState(u,l,_0x14ded5.disabled),E.shaderProgram=x,E.execute(e.cesiumContext,n.passState)}}}}}}_0x4b957a();var _0x5f1873=(_0x4ffecc=!0,function(e,t){var i=_0x4ffecc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4ffecc=!1,i}),_0x112047=_0x5f1873(void 0,(function(){return _0x112047.toString().search("(((.+)+)+)+$").toString().constructor(_0x112047).search("(((.+)+)+)+$")})),_0x4ffecc;_0x112047();var _0x18cbef={lineUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_ratio:new _0x3d809b.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_units_to_pixels:new _0x3d809b.Uniform2f(e,t.u_units_to_pixels),u_antialiasing:new _0x3d809b.Uniform1f(e,t.u_antialiasing)}},lineGradientUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_ratio:new _0x3d809b.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_units_to_pixels:new _0x3d809b.Uniform2f(e,t.u_units_to_pixels),u_image:new _0x3d809b.Uniform1i(e,t.u_image)}},linePatternUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_ratio:new _0x3d809b.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_image:new _0x3d809b.Uniform1i(e,t.u_image),u_units_to_pixels:new _0x3d809b.Uniform2f(e,t.u_units_to_pixels),u_scale:new _0x3d809b.Uniform4f(e,t.u_scale),u_fade:new _0x3d809b.Uniform1f(e,t.u_fade)}},lineSDFUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_ratio:new _0x3d809b.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_units_to_pixels:new _0x3d809b.Uniform2f(e,t.u_units_to_pixels),u_patternscale_a:new _0x3d809b.Uniform2f(e,t.u_patternscale_a),u_patternscale_b:new _0x3d809b.Uniform2f(e,t.u_patternscale_b),u_sdfgamma:new _0x3d809b.Uniform1f(e,t.u_sdfgamma),u_image:new _0x3d809b.Uniform1i(e,t.u_image),u_tex_y_a:new _0x3d809b.Uniform1f(e,t.u_tex_y_a),u_tex_y_b:new _0x3d809b.Uniform1f(e,t.u_tex_y_b),u_mix:new _0x3d809b.Uniform1f(e,t.u_mix)}},lineUniformValues:function(e,t,i,n){e.transform;var r=_0x1d8a3d(t),o=_0x2ddbe2(t,1,n);return{u_matrix:_0x8da6b4(e,t),u_ratio:1/o,u_device_pixel_ratio:1,u_units_to_pixels:[1/r[0],1/r[1]],u_antialiasing:n.lineAntialiasing}},lineGradientUniformValues:function(e,t,i,n){return extend$1(_0x18cbef.lineUniformValues(e,t,i,n),{u_image:0})},linePatternUniformValues:function(e,t,i,n,r){e.transform;var o=_0x175659(t,r);return{u_matrix:_0x8da6b4(e,t),u_texsize:t.imageAtlasTexture.size,u_ratio:1/_0x2ddbe2(t,1,r),u_device_pixel_ratio:1,u_image:0,u_scale:[ref_properties.browser.devicePixelRatio,o,n.fromScale,n.toScale],u_fade:n.t,u_units_to_pixels:_0x1d8a3d(t)}},lineSDFUniformValues:function(e,t,i,n,r,o){e.transform;var a=e.lineAtlas,s=_0x175659(t,o),l="round"===i.layout.get("line-cap"),u=a.getDash(n.from,l),c=a.getDash(n.to,l),h=u.width*r.fromScale,d=c.width*r.toScale;return extend$1(_0x18cbef.lineUniformValues(e,t,i,o),{u_patternscale_a:[s/h,-u.height/2],u_patternscale_b:[s/d,-c.height/2],u_sdfgamma:a.width/(256*Math.min(h,d))/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:c.y,u_mix:r.t})}},_0x55a21f=new o$1o;_0x18cbef.lineUniformMap=function(e,t,i,n){e.transform;var r=_0x1d8a3d(t),o=_0x2ddbe2(t,1,n),a={u_matrix:function(){return _0x8da6b4(e,t)},u_ratio:function(){return 1/o},u_device_pixel_ratio:function(){return 1},u_units_to_pixels:function(){return _0x55a21f.x=1/r[0],_0x55a21f.y=1/r[1],_0x55a21f},u_antialiasing:function(){return e.lineAntialiasing?1:0}};return a},_0x18cbef.lineGradientUniformMap=function(e,t,i,n){var r=_0x18cbef.lineUniformMap(e,t,i,n);return r.u_image=function(){return n.image},r};var _0x1e6e9b=new e$2c;_0x18cbef.linePatternUniformMap=function(e,t,i,n,r){e.transform;var o=_0x175659(t,r),a={u_matrix:function(){return _0x8da6b4(e,t)},u_texsize:function(){return t.imageAtlasTexture.size},u_ratio:function(){return 1/_0x2ddbe2(t,1,r)},u_device_pixel_ratio:function(){return 1},u_image:function(){return r.image},u_scale:function(){return _0x1e6e9b.x=ref_properties.browser.devicePixelRatio,_0x1e6e9b.y=o,_0x1e6e9b.z=n.fromScale,_0x1e6e9b.w=n.toScale,_0x1e6e9b},u_fade:function(){return n.t},u_units_to_pixels:function(){return _0x1d8a3d(t)}};return a};var _0x5cb7fd=new o$1o,_0x36383d=new o$1o;function _0x175659(e,t){return 1/_0x2ddbe2(e,1,t)}function _0x1d8a3d(e){return[2/e.tileSize,-2/e.tileSize]}_0x18cbef.lineSDFUniformMap=function(e,t,i,n,r,o){var a=_0x18cbef.lineUniformMap(e,t,i,o);e.transform;var s=e.lineAtlas,l=_0x175659(t,o),u="round"===i.layout.get("line-cap"),c=s.getDash(n.from,u),h=s.getDash(n.to,u),d=c.width*r.fromScale,f=h.width*r.toScale;return a.u_patternscale_a=function(){return _0x5cb7fd.x=l/d,_0x5cb7fd.y=-c.height/2,_0x5cb7fd},a.u_patternscale_b=function(){return _0x36383d.x=l/f,_0x36383d.y=-h.height/2,_0x36383d},a.u_sdfgamma=function(){return s.width/(256*Math.min(d,f))/2},a.u_image=function(){return o.image},a.u_tex_y_a=function(){return c.y},a.u_tex_y_b=function(){return h.y},a.u_mix=function(){return r.t},a};var _0x9bd56c=new Float32Array(16);function _0x8da6b4(e,t,i){var n=t.viewProjection;return p$1d.toArray(n,_0x9bd56c)}var _0x586e66=(_0x1c18ca=!0,function(e,t){var i=_0x1c18ca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c18ca=!1,i}),_0xdd5153=_0x586e66(void 0,(function(){return _0xdd5153.toString().search("(((.+)+)+)+$").toString().constructor(_0xdd5153).search("(((.+)+)+)+$")})),_0x1c18ca;function _0x32f715(e,t,i,n){if("translucent"===e.renderPass&&e$2e(i)&&e$2e(i.paint)){var r=i.paint.get("line-opacity"),o=i.paint.get("line-width");if(0!==r.constantOr(1)&&0!==o.constantOr(1)){var a=e.depthModeForSublayer(0,_0x4a9140.ReadOnly),s=e.colorModeForRenderPass(),l=i.paint.get("line-dasharray"),u=i.paint.get("line-pattern"),c=u&&u.constantOr(1),h=i.paint.get("line-gradient"),d=i.getCrossfadeParameters(),f=l?"lineSDF":c?"linePattern":h?"lineGradient":"line",p=e.context,_=e.cesiumContext;if(h){var m=i.gradientTexture;if(!i.gradient)return;!m&&(m=i.gradientTexture=new _0x556fd4(p,_,i.gradient,de$y.RGBA)),m.bind(de$y.LINEAR,de$y.CLAMP_TO_EDGE)}var g=t.getBucket(i);if(g){var x=g.programConfigurations.get(i.id),y=e.useProgram(f,x).cesiumProgram,v=u.constantOr(null);if(v&&t.imageAtlas){var $=t.imageAtlas,b=$.patternPositions[v.to.toString()],T=$.patternPositions[v.from.toString()];b&&T&&x.setConstantPatternPositions(b,T)}var C=o.value.value,S=C;S*=e._globalLineWidthScale,i.paint._values["line-width"].value.value=S,l?n.image=e.lineAtlas.getTexture(_):c&&(t.imageAtlasTexture.bind(de$y.LINEAR,de$y.CLAMP_TO_EDGE),n.image=t.imageAtlasTexture.cesiumTexture,x.updatePatternPaintBuffers(d));var w=l?_0x18cbef.lineSDFUniformMap(e,t,i,l,d,n):c?_0x18cbef.linePatternUniformMap(e,t,i,d,n):h?_0x18cbef.lineGradientUniformMap(e,t,i,n):_0x18cbef.lineUniformMap(e,t,i,n),E=y.allUniforms;w=x.getUniformMaps(E,i.paint,w);for(var P=x.getAttributeLocation(),A=0,L=g.segments.get();A<L.length;A+=1){var M=L[A],R=(M.drawCommands||(M.drawCommands={}))[i.id];if(!R){R=new i$$({cull:!1,primitiveType:W$18.TRIANGLES,count:3*M.primitiveLength,offset:3*M.primitiveOffset}),M.drawCommands[i.id]=R;for(var O=M.cesiumVaos||(M.cesiumVaos={}),D=[],I=0;I<g.layoutCesiumVertexBuffer.attributes.length;I++){var F=g.layoutCesiumVertexBuffer.attributes[I],B=_0x42145e.mbxAttributeToCesiumVertexArrtribute(F,g.layoutCesiumVertexBuffer,P[F.name],M.vertexOffset);D.push(B)}var N=x.getPaintVertexBuffers();if(e$2e(N))for(var G=0;G<N.length;G++)for(var z=N[G],U=0;U<z.attributes.length;U++){var V=z.attributes[U];B=_0x42145e.mbxAttributeToCesiumVertexArrtribute(V,z,P[V.name],M.vertexOffset);D.push(B)}var k=O[i.id]||(O[i.id]=new c$13({context:_,attributes:D,indexBuffer:g.cesiumIndexBuffer}));R.vertexArray=k}w.u_depthRange=function(){return 1-a.range[0]},R.uniformMap=w,R.renderState=_0x42145e.toRenderState(s,a,_0x14ded5.disabled),R.shaderProgram=y,R.execute(_,n.passState)}i.paint._values["line-width"].value.value=C}}}}_0xdd5153();var _0x2f0753=(_0x93273f=!0,function(e,t){var i=_0x93273f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x93273f=!1,i}),_0x15f9b0=_0x2f0753(void 0,(function(){return _0x15f9b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x15f9b0).search("(((.+)+)+)+$")})),_0x93273f;function _0x3430ce(e,t,i,n){n.drawFillPattern=!0;var r=1/_0x2ddbe2(i,1,n);i.realtime&&(r*=2);var o=i.targetTileSize*i.x,a=i.targetTileSize*i.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[1,r,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[o>>16,a>>16],u_pixel_coord_lower:[65535&o,65535&a]}}_0x15f9b0();var _0x5f0fff=new e$2c,_0x13af2=new o$1o,_0x89f934=new o$1o,_0x6d75ff=new o$1o;function _0x21ea54(e,t,i,n){n.drawFillPattern=!0;var r=1/_0x2ddbe2(i,1,n);i.realtime&&(r*=2);var o=i.targetTileSize*i.x,a=i.targetTileSize*i.y;return e.u_image=function(){return n.image},e.u_texsize=function(){return _0x6d75ff.x=i.imageAtlasTexture.size[0],_0x6d75ff.y=i.imageAtlasTexture.size[1],_0x6d75ff},e.u_scale=function(){return _0x5f0fff.x=1,_0x5f0fff.y=r,_0x5f0fff.z=t.fromScale,_0x5f0fff.w=t.toScale,_0x5f0fff},e.u_fade=function(){return t.t},e.u_pixel_coord_lower=function(){return _0x13af2.x=65535&o,_0x13af2.y=65535&a,_0x13af2},e.u_pixel_coord_upper=function(){return _0x89f934.x=o>>16,_0x89f934.y=a>>16,_0x89f934},e}var _0x33b7f1={fillUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix)}},fillPatternUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_image:new _0x3d809b.Uniform1i(e,t.u_image),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_pixel_coord_upper:new _0x3d809b.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x3d809b.Uniform2f(e,t.u_pixel_coord_lower),u_scale:new _0x3d809b.Uniform4f(e,t.u_scale),u_fade:new _0x3d809b.Uniform1f(e,t.u_fade)}},fillOutlineUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_world:new _0x3d809b.Uniform2f(e,t.u_world)}},fillOutlinePatternUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_world:new _0x3d809b.Uniform2f(e,t.u_world),u_image:new _0x3d809b.Uniform1i(e,t.u_image),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_pixel_coord_upper:new _0x3d809b.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x3d809b.Uniform2f(e,t.u_pixel_coord_lower),u_scale:new _0x3d809b.Uniform4f(e,t.u_scale),u_fade:new _0x3d809b.Uniform1f(e,t.u_fade)}},fillUniformValues:function(e){return{u_matrix:e}},fillPatternUniformValues:function(e,t,i,n,r){return extend$1(_0x33b7f1.fillUniformValues(e),_0x3430ce(i,t,n,r))},fillOutlineUniformValues:function(e,t){return{u_matrix:e,u_world:t}},fillOutlinePatternUniformValues:function(e,t,i,n,r,o){return extend$1(_0x33b7f1.fillPatternUniformValues(e,t,i,n,o),{u_world:r})},fillUniformMap:function(e){var t={u_matrix:function(){return e}};return t},fillPatternUniformMap:function(e,t,i,n,r){var o=_0x33b7f1.fillUniformMap(e);return o=_0x21ea54(o,i,n,r)}},_0x4ad45b=new o$1o;_0x33b7f1.fillOutlineUniformMap=function(e,t){var i={u_matrix:function(){return e},u_world:function(){return _0x4ad45b.x=t[0],_0x4ad45b.y=t[1],_0x4ad45b}};return i},_0x33b7f1.fillOutlinePatternUniformMap=function(e,t,i,n,r,o){var a={};return(a=_0x33b7f1.fillPatternUniformMap(e,t,i,n,o)).u_world=function(){return _0x4ad45b.x=r[0],_0x4ad45b.y=r[1],_0x4ad45b},a};var _0x40efea=(_0x155751=!0,function(e,t){var i=_0x155751?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x155751=!1,i}),_0x435bd3=_0x40efea(void 0,(function(){return _0x435bd3.toString().search("(((.+)+)+)+$").toString().constructor(_0x435bd3).search("(((.+)+)+)+$")})),_0x155751;_0x435bd3();var _0xe6a69b=new Float32Array(16),_0x62ca62={};function _0x2f9946(e,t,i,n,r,o,a){var s,l,u,c,h=i.paint.get("fill-pattern"),d=h&&h.constantOr(1),f=i.getCrossfadeParameters(),p={};o?(l=d&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=W$18.LINES):(l=d?"fillPattern":"fill",s=W$18.TRIANGLES);var _=t.getBucket(i);if(_){var m=_.programConfigurations.get(i.id);d&&(t.imageAtlasTexture.bind(de$y.LINEAR,de$y.CLAMP_TO_EDGE),a.image=t.imageAtlasTexture.cesiumTexture,m.updatePatternPaintBuffers(f));var g=h.constantOr(null);if(g&&t.imageAtlas){var x=t.imageAtlas,y=x.patternPositions[g.to.toString()],v=x.patternPositions[g.from.toString()];y&&v&&m.setConstantPatternPositions(y,v)}var $=e.useProgram(l,m).cesiumProgram,b=t.viewProjection,T=p$1d.toArray(b,_0xe6a69b);if(o){c=_.cesiumIndexBuffer2,u=_.segments2;var C=[t.tileSize,t.tileSize];p="fillOutlinePattern"===l&&d?_0x33b7f1.fillOutlinePatternUniformMap(T,e,f,t,C,a):_0x33b7f1.fillOutlineUniformMap(T,C)}else c=_.cesiumIndexBuffer,u=_.segments,p=d?_0x33b7f1.fillPatternUniformMap(T,e,f,t,a):_0x33b7f1.fillUniformMap(T);var S=$.allUniforms;p=m.getUniformMaps(S,i.paint,p);for(var w=m.getPaintVertexBuffers(),E=m.getAttributeLocation(),P=0,A=u.get();P<A.length;P+=1){var L=A[P],M=(L.drawCommands||(L.drawCommands={}))[i.id];if(!M){var R=_0x62ca62[s];M=new i$$({cull:!1,primitiveType:s,count:L.primitiveLength*R,offset:L.primitiveOffset*R}),L.drawCommands[i.id]=M;for(var O=L.cesiumVaos||(L.cesiumVaos={}),D=[],I=0;I<_.layoutCesiumVertexBuffer.attributes.length;I++){var F=_.layoutCesiumVertexBuffer.attributes[I],B=_0x42145e.mbxAttributeToCesiumVertexArrtribute(F,_.layoutCesiumVertexBuffer,E[F.name],L.vertexOffset);D.push(B)}D.length;for(var N=0;N<w.length;N++)for(var G=w[N],z=0;z<G.attributes.length;z++){F=G.attributes[z],B=_0x42145e.mbxAttributeToCesiumVertexArrtribute(F,G,E[F.name],L.vertexOffset);D.push(B)}var U=O[i.id]||(O[i.id]=new c$13({context:e.cesiumContext,attributes:D,indexBuffer:c}));M.vertexArray=U}p.u_depthRange=function(){return 1-n.range[0]},M.uniformMap=p,M.renderState=_0x42145e.toRenderState(r,n,_0x14ded5.disabled),M.shaderProgram=$,M.execute(e.cesiumContext,a.passState)}}}function _0x107c4c(e,t,i,n){var r=i.paint.get("fill-color"),o=i.paint.get("fill-opacity"),a=o.value.value;if(o.value.value=0!==o.value.value?.5*o.value.value+.5:0,0!==o.constantOr(1)){var s=e.colorModeForRenderPass(),l=i.paint.get("fill-pattern").constantOr(1)||1!==r.constantOr(_0x546352.transparent).a||1!==o.constantOr(0)?"translucent":"opaque";if(e.renderPass===l){var u=e.depthModeForSublayer(1,"opaque"===e.renderPass?_0x4a9140.ReadWrite:_0x4a9140.ReadOnly);_0x2f9946(e,t,i,u,s,!1,n)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){var c=e.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,_0x4a9140.ReadOnly);_0x2f9946(e,t,i,c,s,!0,n)}o.value.value=a}}_0x62ca62[W$18.LINES]=2,_0x62ca62[W$18.TRIANGLES]=3,_0x62ca62[W$18.LINE_STRIP]=1;var _0x1d8edc=(_0xb25c9=!0,function(e,t){var i=_0xb25c9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb25c9=!1,i}),_0x472cf9=_0x1d8edc(void 0,(function(){return _0x472cf9.toString().search("(((.+)+)+)+$").toString().constructor(_0x472cf9).search("(((.+)+)+)+$")})),_0xb25c9;_0x472cf9();var _0x59678c=519,_0x55d1a3=7680,_0x7ad9f8=function(e,t,i,n,r,o){this.test=e,this.ref=t,this.mask=i,this.fail=n,this.depthFail=r,this.pass=o};_0x7ad9f8.disabled=new _0x7ad9f8({func:_0x59678c,mask:0},0,0,_0x55d1a3,_0x55d1a3,_0x55d1a3);var _0x2431d9=(_0x5d9ef5=!0,function(e,t){var i=_0x5d9ef5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d9ef5=!1,i}),_0x146408=_0x2431d9(void 0,(function(){return _0x146408.toString().search("(((.+)+)+)+$").toString().constructor(_0x146408).search("(((.+)+)+)+$")})),_0x5d9ef5;function _0x3fdff7(){}_0x146408();var _0x5709ba=1e-6,_0x478b64="undefined"!=typeof Float32Array?Float32Array:Array,_0x25d59d=Math.random;function _0x8ad248(e){_0x478b64=e}var _0x5efcb1=Math.PI/180;function _0x5657ed(e){return e*_0x5efcb1}function _0x161e6f(e,t){return Math.abs(e-t)<=_0x5709ba*Math.max(1,Math.abs(e),Math.abs(t))}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var _0xacb5eb=Object.freeze({EPSILON:_0x5709ba,get ARRAY_TYPE(){return _0x478b64},RANDOM:_0x25d59d,setMatrixArrayType:_0x8ad248,toRadian:_0x5657ed,equals:_0x161e6f});function _0x4d0990(){var e=new _0x478b64(4);return _0x478b64!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function _0x50eef9(e){var t=new _0x478b64(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function _0x2c70cf(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function _0x15bb2a(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e}function _0x1fca77(e,t,i,n){var r=new _0x478b64(4);return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function _0x44aafd(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e}function _0x3a2bc0(e,t){if(e===t){var i=t[1];e[1]=t[2],e[2]=i}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e}function _0x1b8ca3(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*o-r*n;return a?(a=1/a,e[0]=o*a,e[1]=-n*a,e[2]=-r*a,e[3]=i*a,e):null}function _0x59c235(e,t){var i=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=i,e}function _0x428c8d(e){return e[0]*e[3]-e[2]*e[1]}function _0xdc17a9(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*s+o*l,e[1]=r*s+a*l,e[2]=n*u+o*c,e[3]=r*u+a*c,e}function _0x40e99c(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+o*s,e[1]=r*l+a*s,e[2]=n*-s+o*l,e[3]=r*-s+a*l,e}function _0xdcb2c9(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1];return e[0]=n*s,e[1]=r*s,e[2]=o*l,e[3]=a*l,e}function _0xeca681(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=-i,e[3]=n,e}function _0x3e1fb5(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e}function _0x4e2ec4(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function _0x241736(e){return Math.hypot(e[0],e[1],e[2],e[3])}function _0xaabb0d(e,t,i,n){return e[2]=n[2]/n[0],i[0]=n[0],i[1]=n[1],i[3]=n[3]-e[2]*i[1],[e,t,i]}function _0x2e9752(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e}function _0x32e372(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e}function _0x43a072(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function _0x2c4b9e(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t[2],u=t[3];return Math.abs(i-a)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-s)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-l)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-u)<=_0x5709ba*Math.max(1,Math.abs(o),Math.abs(u))}function _0x6dcad9(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e}function _0xf83d92(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e}var _0x257578=_0xdc17a9,_0x8082eb=_0x32e372,_0x1b6186=Object.freeze({create:_0x4d0990,clone:_0x50eef9,copy:_0x2c70cf,identity:_0x15bb2a,fromValues:_0x1fca77,set:_0x44aafd,transpose:_0x3a2bc0,invert:_0x1b8ca3,adjoint:_0x59c235,determinant:_0x428c8d,multiply:_0xdc17a9,rotate:_0x40e99c,scale:_0xdcb2c9,fromRotation:_0xeca681,fromScaling:_0x3e1fb5,str:_0x4e2ec4,frob:_0x241736,LDU:_0xaabb0d,add:_0x2e9752,subtract:_0x32e372,exactEquals:_0x43a072,equals:_0x2c4b9e,multiplyScalar:_0x6dcad9,multiplyScalarAndAdd:_0xf83d92,mul:_0x257578,sub:_0x8082eb});function _0x58480f(){var e=new _0x478b64(6);return _0x478b64!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function _0x53e1b7(e){var t=new _0x478b64(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function _0x264847(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function _0x384039(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function _0x58bce6(e,t,i,n,r,o){var a=new _0x478b64(6);return a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=r,a[5]=o,a}function _0x387d13(e,t,i,n,r,o,a){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e}function _0x97989f(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=i*o-n*r;return l?(l=1/l,e[0]=o*l,e[1]=-n*l,e[2]=-r*l,e[3]=i*l,e[4]=(r*s-o*a)*l,e[5]=(n*a-i*s)*l,e):null}function _0x25a4d4(e){return e[0]*e[3]-e[1]*e[2]}function _0x53a372(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=i[0],c=i[1],h=i[2],d=i[3],f=i[4],p=i[5];return e[0]=n*u+o*c,e[1]=r*u+a*c,e[2]=n*h+o*d,e[3]=r*h+a*d,e[4]=n*f+o*p+s,e[5]=r*f+a*p+l,e}function _0x12385a(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=Math.sin(i),c=Math.cos(i);return e[0]=n*c+o*u,e[1]=r*c+a*u,e[2]=n*-u+o*c,e[3]=r*-u+a*c,e[4]=s,e[5]=l,e}function _0xb2e115(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=i[0],c=i[1];return e[0]=n*u,e[1]=r*u,e[2]=o*c,e[3]=a*c,e[4]=s,e[5]=l,e}function _0x374caa(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=i[0],c=i[1];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=n*u+o*c+s,e[5]=r*u+a*c+l,e}function _0xfc544(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=-i,e[3]=n,e[4]=0,e[5]=0,e}function _0x575621(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function _0x22d373(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function _0x505322(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function _0x524e35(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],1)}function _0x421cd8(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e}function _0x4f19e5(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e}function _0xddec23(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e}function _0x3a41e8(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e}function _0x2ff38a(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function _0x44c514(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],u=t[1],c=t[2],h=t[3],d=t[4],f=t[5];return Math.abs(i-l)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(n-u)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(r-c)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(o-h)<=_0x5709ba*Math.max(1,Math.abs(o),Math.abs(h))&&Math.abs(a-d)<=_0x5709ba*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(s-f)<=_0x5709ba*Math.max(1,Math.abs(s),Math.abs(f))}var _0x19a1df=_0x53a372,_0x4c3476=_0x4f19e5,_0x376082=Object.freeze({create:_0x58480f,clone:_0x53e1b7,copy:_0x264847,identity:_0x384039,fromValues:_0x58bce6,set:_0x387d13,invert:_0x97989f,determinant:_0x25a4d4,multiply:_0x53a372,rotate:_0x12385a,scale:_0xb2e115,translate:_0x374caa,fromRotation:_0xfc544,fromScaling:_0x575621,fromTranslation:_0x22d373,str:_0x505322,frob:_0x524e35,add:_0x421cd8,subtract:_0x4f19e5,multiplyScalar:_0xddec23,multiplyScalarAndAdd:_0x3a41e8,exactEquals:_0x2ff38a,equals:_0x44c514,mul:_0x19a1df,sub:_0x4c3476});function _0x165677(){var e=new _0x478b64(9);return _0x478b64!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function _0x3cc0e4(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function _0x263ce8(e){var t=new _0x478b64(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function _0x500b24(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function _0x2ec246(e,t,i,n,r,o,a,s,l){var u=new _0x478b64(9);return u[0]=e,u[1]=t,u[2]=i,u[3]=n,u[4]=r,u[5]=o,u[6]=a,u[7]=s,u[8]=l,u}function _0x51ce8d(e,t,i,n,r,o,a,s,l,u){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e[8]=u,e}function _0x11a5d2(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _0x405464(e,t){if(e===t){var i=t[1],n=t[2],r=t[5];e[1]=t[3],e[2]=t[6],e[3]=i,e[5]=t[7],e[6]=n,e[7]=r}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function _0xe55b52(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=c*a-s*u,d=-c*o+s*l,f=u*o-a*l,p=i*h+n*d+r*f;return p?(p=1/p,e[0]=h*p,e[1]=(-c*n+r*u)*p,e[2]=(s*n-r*a)*p,e[3]=d*p,e[4]=(c*i-r*l)*p,e[5]=(-s*i+r*o)*p,e[6]=f*p,e[7]=(-u*i+n*l)*p,e[8]=(a*i-n*o)*p,e):null}function _0x5b8a66(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8];return e[0]=a*c-s*u,e[1]=r*u-n*c,e[2]=n*s-r*a,e[3]=s*l-o*c,e[4]=i*c-r*l,e[5]=r*o-i*s,e[6]=o*u-a*l,e[7]=n*l-i*u,e[8]=i*a-n*o,e}function _0x1bbb27(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8];return t*(u*o-a*l)+i*(-u*r+a*s)+n*(l*r-o*s)}function _0x330f12(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=i[0],f=i[1],p=i[2],_=i[3],m=i[4],g=i[5],x=i[6],y=i[7],v=i[8];return e[0]=d*n+f*a+p*u,e[1]=d*r+f*s+p*c,e[2]=d*o+f*l+p*h,e[3]=_*n+m*a+g*u,e[4]=_*r+m*s+g*c,e[5]=_*o+m*l+g*h,e[6]=x*n+y*a+v*u,e[7]=x*r+y*s+v*c,e[8]=x*o+y*l+v*h,e}function _0x1fcec8(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=i[0],f=i[1];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=d*n+f*a+u,e[7]=d*r+f*s+c,e[8]=d*o+f*l+h,e}function _0x3d4eb8(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=Math.sin(i),f=Math.cos(i);return e[0]=f*n+d*a,e[1]=f*r+d*s,e[2]=f*o+d*l,e[3]=f*a-d*n,e[4]=f*s-d*r,e[5]=f*l-d*o,e[6]=u,e[7]=c,e[8]=h,e}function _0x278612(e,t,i){var n=i[0],r=i[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function _0x5c0771(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function _0x115457(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=0,e[3]=-i,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _0x1d0d22(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _0xd27f02(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function _0x43e84e(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i+i,s=n+n,l=r+r,u=i*a,c=n*a,h=n*s,d=r*a,f=r*s,p=r*l,_=o*a,m=o*s,g=o*l;return e[0]=1-h-p,e[3]=c-g,e[6]=d+m,e[1]=c+g,e[4]=1-u-p,e[7]=f-_,e[2]=d-m,e[5]=f+_,e[8]=1-u-h,e}function _0x284203(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15],x=i*s-n*a,y=i*l-r*a,v=i*u-o*a,$=n*l-r*s,b=n*u-o*s,T=r*u-o*l,C=c*_-h*p,S=c*m-d*p,w=c*g-f*p,E=h*m-d*_,P=h*g-f*_,A=d*g-f*m,L=x*A-y*P+v*E+$*w-b*S+T*C;return L?(L=1/L,e[0]=(s*A-l*P+u*E)*L,e[1]=(l*w-a*A-u*S)*L,e[2]=(a*P-s*w+u*C)*L,e[3]=(r*P-n*A-o*E)*L,e[4]=(i*A-r*w+o*S)*L,e[5]=(n*w-i*P-o*C)*L,e[6]=(_*T-m*b+g*$)*L,e[7]=(m*v-p*T-g*y)*L,e[8]=(p*b-_*v+g*x)*L,e):null}function _0x168004(e,t,i){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/i,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function _0x123a99(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function _0x25589f(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function _0xae246e(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e[8]=t[8]+i[8],e}function _0x3bcbe6(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e[6]=t[6]-i[6],e[7]=t[7]-i[7],e[8]=t[8]-i[8],e}function _0x4660c6(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*i,e}function _0x37c2dc(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e[6]=t[6]+i[6]*n,e[7]=t[7]+i[7]*n,e[8]=t[8]+i[8]*n,e}function _0x236319(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]}function _0x19ed66(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=t[0],d=t[1],f=t[2],p=t[3],_=t[4],m=t[5],g=t[6],x=t[7],y=t[8];return Math.abs(i-h)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(n-d)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(r-f)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-p)<=_0x5709ba*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-_)<=_0x5709ba*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(s-m)<=_0x5709ba*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(l-g)<=_0x5709ba*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(u-x)<=_0x5709ba*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(c-y)<=_0x5709ba*Math.max(1,Math.abs(c),Math.abs(y))}var _0x404431=_0x330f12,_0xcd49f7=_0x3bcbe6,_0x499ef9=Object.freeze({create:_0x165677,fromMat4:_0x3cc0e4,clone:_0x263ce8,copy:_0x500b24,fromValues:_0x2ec246,set:_0x51ce8d,identity:_0x11a5d2,transpose:_0x405464,invert:_0xe55b52,adjoint:_0x5b8a66,determinant:_0x1bbb27,multiply:_0x330f12,translate:_0x1fcec8,rotate:_0x3d4eb8,scale:_0x278612,fromTranslation:_0x5c0771,fromRotation:_0x115457,fromScaling:_0x1d0d22,fromMat2d:_0xd27f02,fromQuat:_0x43e84e,normalFromMat4:_0x284203,projection:_0x168004,str:_0x123a99,frob:_0x25589f,add:_0xae246e,subtract:_0x3bcbe6,multiplyScalar:_0x4660c6,multiplyScalarAndAdd:_0x37c2dc,exactEquals:_0x236319,equals:_0x19ed66,mul:_0x404431,sub:_0xcd49f7});function _0x148135(){var e=new _0x478b64(16);return _0x478b64!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function _0x2485dc(e){var t=new _0x478b64(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function _0x1e89b9(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function _0x48a726(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=new _0x478b64(16);return m[0]=e,m[1]=t,m[2]=i,m[3]=n,m[4]=r,m[5]=o,m[6]=a,m[7]=s,m[8]=l,m[9]=u,m[10]=c,m[11]=h,m[12]=d,m[13]=f,m[14]=p,m[15]=_,m}function _0x8dbbe7(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e[8]=u,e[9]=c,e[10]=h,e[11]=d,e[12]=f,e[13]=p,e[14]=_,e[15]=m,e}function _0x39dd51(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x23fe50(e,t){if(e===t){var i=t[1],n=t[2],r=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=i,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=o,e[11]=t[14],e[12]=r,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function _0x641fbd(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15],x=i*s-n*a,y=i*l-r*a,v=i*u-o*a,$=n*l-r*s,b=n*u-o*s,T=r*u-o*l,C=c*_-h*p,S=c*m-d*p,w=c*g-f*p,E=h*m-d*_,P=h*g-f*_,A=d*g-f*m,L=x*A-y*P+v*E+$*w-b*S+T*C;return L?(L=1/L,e[0]=(s*A-l*P+u*E)*L,e[1]=(r*P-n*A-o*E)*L,e[2]=(_*T-m*b+g*$)*L,e[3]=(d*b-h*T-f*$)*L,e[4]=(l*w-a*A-u*S)*L,e[5]=(i*A-r*w+o*S)*L,e[6]=(m*v-p*T-g*y)*L,e[7]=(c*T-d*v+f*y)*L,e[8]=(a*P-s*w+u*C)*L,e[9]=(n*w-i*P-o*C)*L,e[10]=(p*b-_*v+g*x)*L,e[11]=(h*v-c*b-f*x)*L,e[12]=(s*S-a*E-l*C)*L,e[13]=(i*E-n*S+r*C)*L,e[14]=(_*y-p*$-m*x)*L,e[15]=(c*$-h*y+d*x)*L,e):null}function _0x5b852d(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15];return e[0]=s*(d*g-f*m)-h*(l*g-u*m)+_*(l*f-u*d),e[1]=-(n*(d*g-f*m)-h*(r*g-o*m)+_*(r*f-o*d)),e[2]=n*(l*g-u*m)-s*(r*g-o*m)+_*(r*u-o*l),e[3]=-(n*(l*f-u*d)-s*(r*f-o*d)+h*(r*u-o*l)),e[4]=-(a*(d*g-f*m)-c*(l*g-u*m)+p*(l*f-u*d)),e[5]=i*(d*g-f*m)-c*(r*g-o*m)+p*(r*f-o*d),e[6]=-(i*(l*g-u*m)-a*(r*g-o*m)+p*(r*u-o*l)),e[7]=i*(l*f-u*d)-a*(r*f-o*d)+c*(r*u-o*l),e[8]=a*(h*g-f*_)-c*(s*g-u*_)+p*(s*f-u*h),e[9]=-(i*(h*g-f*_)-c*(n*g-o*_)+p*(n*f-o*h)),e[10]=i*(s*g-u*_)-a*(n*g-o*_)+p*(n*u-o*s),e[11]=-(i*(s*f-u*h)-a*(n*f-o*h)+c*(n*u-o*s)),e[12]=-(a*(h*m-d*_)-c*(s*m-l*_)+p*(s*d-l*h)),e[13]=i*(h*m-d*_)-c*(n*m-r*_)+p*(n*d-r*h),e[14]=-(i*(s*m-l*_)-a*(n*m-r*_)+p*(n*l-r*s)),e[15]=i*(s*d-l*h)-a*(n*d-r*h)+c*(n*l-r*s),e}function _0x548f9f(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],f=e[12],p=e[13],_=e[14],m=e[15];return(t*a-i*o)*(h*m-d*_)-(t*s-n*o)*(c*m-d*p)+(t*l-r*o)*(c*_-h*p)+(i*s-n*a)*(u*m-d*f)-(i*l-r*a)*(u*_-h*f)+(n*l-r*s)*(u*p-c*f)}function _0x3f870d(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=t[9],f=t[10],p=t[11],_=t[12],m=t[13],g=t[14],x=t[15],y=i[0],v=i[1],$=i[2],b=i[3];return e[0]=y*n+v*s+$*h+b*_,e[1]=y*r+v*l+$*d+b*m,e[2]=y*o+v*u+$*f+b*g,e[3]=y*a+v*c+$*p+b*x,y=i[4],v=i[5],$=i[6],b=i[7],e[4]=y*n+v*s+$*h+b*_,e[5]=y*r+v*l+$*d+b*m,e[6]=y*o+v*u+$*f+b*g,e[7]=y*a+v*c+$*p+b*x,y=i[8],v=i[9],$=i[10],b=i[11],e[8]=y*n+v*s+$*h+b*_,e[9]=y*r+v*l+$*d+b*m,e[10]=y*o+v*u+$*f+b*g,e[11]=y*a+v*c+$*p+b*x,y=i[12],v=i[13],$=i[14],b=i[15],e[12]=y*n+v*s+$*h+b*_,e[13]=y*r+v*l+$*d+b*m,e[14]=y*o+v*u+$*f+b*g,e[15]=y*a+v*c+$*p+b*x,e}function _0x42cc51(e,t,i){var n,r,o,a,s,l,u,c,h,d,f,p,_=i[0],m=i[1],g=i[2];return t===e?(e[12]=t[0]*_+t[4]*m+t[8]*g+t[12],e[13]=t[1]*_+t[5]*m+t[9]*g+t[13],e[14]=t[2]*_+t[6]*m+t[10]*g+t[14],e[15]=t[3]*_+t[7]*m+t[11]*g+t[15]):(n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=n*_+s*m+h*g+t[12],e[13]=r*_+l*m+d*g+t[13],e[14]=o*_+u*m+f*g+t[14],e[15]=a*_+c*m+p*g+t[15]),e}function _0x7eea2a(e,t,i){var n=i[0],r=i[1],o=i[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function _0x51a64c(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S,w,E,P=n[0],A=n[1],L=n[2],M=Math.hypot(P,A,L);return M<_0x5709ba?null:(P*=M=1/M,A*=M,L*=M,r=Math.sin(i),a=1-(o=Math.cos(i)),s=t[0],l=t[1],u=t[2],c=t[3],h=t[4],d=t[5],f=t[6],p=t[7],_=t[8],m=t[9],g=t[10],x=t[11],y=P*P*a+o,v=A*P*a+L*r,$=L*P*a-A*r,b=P*A*a-L*r,T=A*A*a+o,C=L*A*a+P*r,S=P*L*a+A*r,w=A*L*a-P*r,E=L*L*a+o,e[0]=s*y+h*v+_*$,e[1]=l*y+d*v+m*$,e[2]=u*y+f*v+g*$,e[3]=c*y+p*v+x*$,e[4]=s*b+h*T+_*C,e[5]=l*b+d*T+m*C,e[6]=u*b+f*T+g*C,e[7]=c*b+p*T+x*C,e[8]=s*S+h*w+_*E,e[9]=l*S+d*w+m*E,e[10]=u*S+f*w+g*E,e[11]=c*S+p*w+x*E,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function _0x42f943(e,t,i){var n=Math.sin(i),r=Math.cos(i),o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*r+u*n,e[5]=a*r+c*n,e[6]=s*r+h*n,e[7]=l*r+d*n,e[8]=u*r-o*n,e[9]=c*r-a*n,e[10]=h*r-s*n,e[11]=d*r-l*n,e}function _0x3a801d(e,t,i){var n=Math.sin(i),r=Math.cos(i),o=t[0],a=t[1],s=t[2],l=t[3],u=t[8],c=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*r-u*n,e[1]=a*r-c*n,e[2]=s*r-h*n,e[3]=l*r-d*n,e[8]=o*n+u*r,e[9]=a*n+c*r,e[10]=s*n+h*r,e[11]=l*n+d*r,e}function _0x29a78d(e,t,i){var n=Math.sin(i),r=Math.cos(i),o=t[0],a=t[1],s=t[2],l=t[3],u=t[4],c=t[5],h=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*r+u*n,e[1]=a*r+c*n,e[2]=s*r+h*n,e[3]=l*r+d*n,e[4]=u*r-o*n,e[5]=c*r-a*n,e[6]=h*r-s*n,e[7]=d*r-l*n,e}function _0x5dba4d(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function _0x3066b8(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x296965(e,t,i){var n,r,o,a=i[0],s=i[1],l=i[2],u=Math.hypot(a,s,l);return u<_0x5709ba?null:(a*=u=1/u,s*=u,l*=u,n=Math.sin(t),o=1-(r=Math.cos(t)),e[0]=a*a*o+r,e[1]=s*a*o+l*n,e[2]=l*a*o-s*n,e[3]=0,e[4]=a*s*o-l*n,e[5]=s*s*o+r,e[6]=l*s*o+a*n,e[7]=0,e[8]=a*l*o+s*n,e[9]=s*l*o-a*n,e[10]=l*l*o+r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function _0xc4ed47(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=i,e[7]=0,e[8]=0,e[9]=-i,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x114fe9(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-i,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=i,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x547bdd(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=0,e[3]=0,e[4]=-i,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x4c1ff5(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=n+n,l=r+r,u=o+o,c=n*s,h=n*l,d=n*u,f=r*l,p=r*u,_=o*u,m=a*s,g=a*l,x=a*u;return e[0]=1-(f+_),e[1]=h+x,e[2]=d-g,e[3]=0,e[4]=h-x,e[5]=1-(c+_),e[6]=p+m,e[7]=0,e[8]=d+g,e[9]=p-m,e[10]=1-(c+f),e[11]=0,e[12]=i[0],e[13]=i[1],e[14]=i[2],e[15]=1,e}function _0x5d2f5a(e,t){var i=new _0x478b64(3),n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=n*n+r*r+o*o+a*a;return h>0?(i[0]=2*(s*a+c*n+l*o-u*r)/h,i[1]=2*(l*a+c*r+u*n-s*o)/h,i[2]=2*(u*a+c*o+s*r-l*n)/h):(i[0]=2*(s*a+c*n+l*o-u*r),i[1]=2*(l*a+c*r+u*n-s*o),i[2]=2*(u*a+c*o+s*r-l*n)),_0x4c1ff5(e,t,i),e}function _0x13f7d5(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function _0x13b0ab(e,t){var i=t[0],n=t[1],r=t[2],o=t[4],a=t[5],s=t[6],l=t[8],u=t[9],c=t[10];return e[0]=Math.hypot(i,n,r),e[1]=Math.hypot(o,a,s),e[2]=Math.hypot(l,u,c),e}function _0x390d2d(e,t){var i=new _0x478b64(3);_0x13b0ab(i,t);var n=1/i[0],r=1/i[1],o=1/i[2],a=t[0]*n,s=t[1]*r,l=t[2]*o,u=t[4]*n,c=t[5]*r,h=t[6]*o,d=t[8]*n,f=t[9]*r,p=t[10]*o,_=a+c+p,m=0;return _>0?(m=2*Math.sqrt(_+1),e[3]=.25*m,e[0]=(h-f)/m,e[1]=(d-l)/m,e[2]=(s-u)/m):a>c&&a>p?(m=2*Math.sqrt(1+a-c-p),e[3]=(h-f)/m,e[0]=.25*m,e[1]=(s+u)/m,e[2]=(d+l)/m):c>p?(m=2*Math.sqrt(1+c-a-p),e[3]=(d-l)/m,e[0]=(s+u)/m,e[1]=.25*m,e[2]=(h+f)/m):(m=2*Math.sqrt(1+p-a-c),e[3]=(s-u)/m,e[0]=(d+l)/m,e[1]=(h+f)/m,e[2]=.25*m),e}function _0x4e6248(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=t[3],l=r+r,u=o+o,c=a+a,h=r*l,d=r*u,f=r*c,p=o*u,_=o*c,m=a*c,g=s*l,x=s*u,y=s*c,v=n[0],$=n[1],b=n[2];return e[0]=(1-(p+m))*v,e[1]=(d+y)*v,e[2]=(f-x)*v,e[3]=0,e[4]=(d-y)*$,e[5]=(1-(h+m))*$,e[6]=(_+g)*$,e[7]=0,e[8]=(f+x)*b,e[9]=(_-g)*b,e[10]=(1-(h+p))*b,e[11]=0,e[12]=i[0],e[13]=i[1],e[14]=i[2],e[15]=1,e}function _0x565c90(e,t,i,n,r){var o=t[0],a=t[1],s=t[2],l=t[3],u=o+o,c=a+a,h=s+s,d=o*u,f=o*c,p=o*h,_=a*c,m=a*h,g=s*h,x=l*u,y=l*c,v=l*h,$=n[0],b=n[1],T=n[2],C=r[0],S=r[1],w=r[2],E=(1-(_+g))*$,P=(f+v)*$,A=(p-y)*$,L=(f-v)*b,M=(1-(d+g))*b,R=(m+x)*b,O=(p+y)*T,D=(m-x)*T,I=(1-(d+_))*T;return e[0]=E,e[1]=P,e[2]=A,e[3]=0,e[4]=L,e[5]=M,e[6]=R,e[7]=0,e[8]=O,e[9]=D,e[10]=I,e[11]=0,e[12]=i[0]+C-(E*C+L*S+O*w),e[13]=i[1]+S-(P*C+M*S+D*w),e[14]=i[2]+w-(A*C+R*S+I*w),e[15]=1,e}function _0x146f85(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i+i,s=n+n,l=r+r,u=i*a,c=n*a,h=n*s,d=r*a,f=r*s,p=r*l,_=o*a,m=o*s,g=o*l;return e[0]=1-h-p,e[1]=c+g,e[2]=d-m,e[3]=0,e[4]=c-g,e[5]=1-u-p,e[6]=f+_,e[7]=0,e[8]=d+m,e[9]=f-_,e[10]=1-u-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x3aac28(e,t,i,n,r,o,a){var s=1/(i-t),l=1/(r-n),u=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(i+t)*s,e[9]=(r+n)*l,e[10]=(a+o)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*u,e[15]=0,e}function _0x39f49a(e,t,i,n,r){var o,a=1/Math.tan(t/2);return e[0]=a/i,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=r&&r!==1/0?(o=1/(n-r),e[10]=(r+n)*o,e[14]=2*r*n*o):(e[10]=-1,e[14]=-2*n),e}function _0x3642c0(e,t,i,n){var r=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(r+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(r-o)*u*.5,e[10]=n/(i-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*i/(i-n),e[15]=0,e}function _0x786534(e,t,i,n,r,o,a){var s=1/(t-i),l=1/(n-r),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+i)*s,e[13]=(r+n)*l,e[14]=(a+o)*u,e[15]=1,e}function _0x3f49b6(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p=t[0],_=t[1],m=t[2],g=n[0],x=n[1],y=n[2],v=i[0],$=i[1],b=i[2];return Math.abs(p-v)<_0x5709ba&&Math.abs(_-$)<_0x5709ba&&Math.abs(m-b)<_0x5709ba?_0x39dd51(e):(c=p-v,h=_-$,d=m-b,r=x*(d*=f=1/Math.hypot(c,h,d))-y*(h*=f),o=y*(c*=f)-g*d,a=g*h-x*c,(f=Math.hypot(r,o,a))?(r*=f=1/f,o*=f,a*=f):(r=0,o=0,a=0),s=h*a-d*o,l=d*r-c*a,u=c*o-h*r,(f=Math.hypot(s,l,u))?(s*=f=1/f,l*=f,u*=f):(s=0,l=0,u=0),e[0]=r,e[1]=s,e[2]=c,e[3]=0,e[4]=o,e[5]=l,e[6]=h,e[7]=0,e[8]=a,e[9]=u,e[10]=d,e[11]=0,e[12]=-(r*p+o*_+a*m),e[13]=-(s*p+l*_+u*m),e[14]=-(c*p+h*_+d*m),e[15]=1,e)}function _0x1e920f(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=n[0],l=n[1],u=n[2],c=r-i[0],h=o-i[1],d=a-i[2],f=c*c+h*h+d*d;f>0&&(c*=f=1/Math.sqrt(f),h*=f,d*=f);var p=l*d-u*h,_=u*c-s*d,m=s*h-l*c;return(f=p*p+_*_+m*m)>0&&(p*=f=1/Math.sqrt(f),_*=f,m*=f),e[0]=p,e[1]=_,e[2]=m,e[3]=0,e[4]=h*m-d*_,e[5]=d*p-c*m,e[6]=c*_-h*p,e[7]=0,e[8]=c,e[9]=h,e[10]=d,e[11]=0,e[12]=r,e[13]=o,e[14]=a,e[15]=1,e}function _0x3bb774(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function _0x1a9bc2(e){return Math.hypot(e[0],e[1],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function _0x5e7983(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e[8]=t[8]+i[8],e[9]=t[9]+i[9],e[10]=t[10]+i[10],e[11]=t[11]+i[11],e[12]=t[12]+i[12],e[13]=t[13]+i[13],e[14]=t[14]+i[14],e[15]=t[15]+i[15],e}function _0x1520e1(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e[6]=t[6]-i[6],e[7]=t[7]-i[7],e[8]=t[8]-i[8],e[9]=t[9]-i[9],e[10]=t[10]-i[10],e[11]=t[11]-i[11],e[12]=t[12]-i[12],e[13]=t[13]-i[13],e[14]=t[14]-i[14],e[15]=t[15]-i[15],e}function _0x3c83c6(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12]*i,e[13]=t[13]*i,e[14]=t[14]*i,e[15]=t[15]*i,e}function _0x2b17e7(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e[6]=t[6]+i[6]*n,e[7]=t[7]+i[7]*n,e[8]=t[8]+i[8]*n,e[9]=t[9]+i[9]*n,e[10]=t[10]+i[10]*n,e[11]=t[11]+i[11]*n,e[12]=t[12]+i[12]*n,e[13]=t[13]+i[13]*n,e[14]=t[14]+i[14]*n,e[15]=t[15]+i[15]*n,e}function _0x64253b(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function _0x5428fd(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],p=e[12],_=e[13],m=e[14],g=e[15],x=t[0],y=t[1],v=t[2],$=t[3],b=t[4],T=t[5],C=t[6],S=t[7],w=t[8],E=t[9],P=t[10],A=t[11],L=t[12],M=t[13],R=t[14],O=t[15];return Math.abs(i-x)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(n-y)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-v)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-$)<=_0x5709ba*Math.max(1,Math.abs(o),Math.abs($))&&Math.abs(a-b)<=_0x5709ba*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(s-T)<=_0x5709ba*Math.max(1,Math.abs(s),Math.abs(T))&&Math.abs(l-C)<=_0x5709ba*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(u-S)<=_0x5709ba*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-w)<=_0x5709ba*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(h-E)<=_0x5709ba*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-P)<=_0x5709ba*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(f-A)<=_0x5709ba*Math.max(1,Math.abs(f),Math.abs(A))&&Math.abs(p-L)<=_0x5709ba*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(_-M)<=_0x5709ba*Math.max(1,Math.abs(_),Math.abs(M))&&Math.abs(m-R)<=_0x5709ba*Math.max(1,Math.abs(m),Math.abs(R))&&Math.abs(g-O)<=_0x5709ba*Math.max(1,Math.abs(g),Math.abs(O))}var _0x58ecd9=_0x3f870d,_0x5f2858=_0x1520e1,_0x479473=Object.freeze({create:_0x148135,clone:_0x2485dc,copy:_0x1e89b9,fromValues:_0x48a726,set:_0x8dbbe7,identity:_0x39dd51,transpose:_0x23fe50,invert:_0x641fbd,adjoint:_0x5b852d,determinant:_0x548f9f,multiply:_0x3f870d,translate:_0x42cc51,scale:_0x7eea2a,rotate:_0x51a64c,rotateX:_0x42f943,rotateY:_0x3a801d,rotateZ:_0x29a78d,fromTranslation:_0x5dba4d,fromScaling:_0x3066b8,fromRotation:_0x296965,fromXRotation:_0xc4ed47,fromYRotation:_0x114fe9,fromZRotation:_0x547bdd,fromRotationTranslation:_0x4c1ff5,fromQuat2:_0x5d2f5a,getTranslation:_0x13f7d5,getScaling:_0x13b0ab,getRotation:_0x390d2d,fromRotationTranslationScale:_0x4e6248,fromRotationTranslationScaleOrigin:_0x565c90,fromQuat:_0x146f85,frustum:_0x3aac28,perspective:_0x39f49a,perspectiveFromFieldOfView:_0x3642c0,ortho:_0x786534,lookAt:_0x3f49b6,targetTo:_0x1e920f,str:_0x3bb774,frob:_0x1a9bc2,add:_0x5e7983,subtract:_0x1520e1,multiplyScalar:_0x3c83c6,multiplyScalarAndAdd:_0x2b17e7,exactEquals:_0x64253b,equals:_0x5428fd,mul:_0x58ecd9,sub:_0x5f2858});function _0x1ed7cc(){var e=new _0x478b64(3);return _0x478b64!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function _0x2565bd(e){var t=new _0x478b64(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function _0x70ae2b(e){var t=e[0],i=e[1],n=e[2];return Math.hypot(t,i,n)}function _0x4da1cb(e,t,i){var n=new _0x478b64(3);return n[0]=e,n[1]=t,n[2]=i,n}function _0x4382b2(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function _0x4983a6(e,t,i,n){return e[0]=t,e[1]=i,e[2]=n,e}function _0x5b4689(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e}function _0x4a4fe0(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e}function _0x560fbd(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e}function _0x6fb566(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e}function _0x465caf(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function _0x5280ed(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function _0x354fa8(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e}function _0x3d057f(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e}function _0x4b35d9(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function _0x35de5d(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function _0x25afdb(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e}function _0x46578a(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return Math.hypot(i,n,r)}function _0x50140c(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return i*i+n*n+r*r}function _0x27de00(e){var t=e[0],i=e[1],n=e[2];return t*t+i*i+n*n}function _0x4f2176(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function _0x38c858(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function _0x4ab974(e,t){var i=t[0],n=t[1],r=t[2],o=i*i+n*n+r*r;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function _0x1dd150(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function _0x2cf175(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[0],s=i[1],l=i[2];return e[0]=r*l-o*s,e[1]=o*a-n*l,e[2]=n*s-r*a,e}function _0x4f5131(e,t,i,n){var r=t[0],o=t[1],a=t[2];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e[2]=a+n*(i[2]-a),e}function _0x38746a(e,t,i,n,r,o){var a=o*o,s=a*(2*o-3)+1,l=a*(o-2)+o,u=a*(o-1),c=a*(3-2*o);return e[0]=t[0]*s+i[0]*l+n[0]*u+r[0]*c,e[1]=t[1]*s+i[1]*l+n[1]*u+r[1]*c,e[2]=t[2]*s+i[2]*l+n[2]*u+r[2]*c,e}function _0x5d4752(e,t,i,n,r,o){var a=1-o,s=a*a,l=o*o,u=s*a,c=3*o*s,h=3*l*a,d=l*o;return e[0]=t[0]*u+i[0]*c+n[0]*h+r[0]*d,e[1]=t[1]*u+i[1]*c+n[1]*h+r[1]*d,e[2]=t[2]*u+i[2]*c+n[2]*h+r[2]*d,e}function _0x4886b6(e,t){t=t||1;var i=2*_0x25d59d()*Math.PI,n=2*_0x25d59d()-1,r=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(i)*r,e[1]=Math.sin(i)*r,e[2]=n*t,e}function _0x1fd49b(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,e[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,e[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,e[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,e}function _0x3b721b(e,t,i){var n=t[0],r=t[1],o=t[2];return e[0]=n*i[0]+r*i[3]+o*i[6],e[1]=n*i[1]+r*i[4]+o*i[7],e[2]=n*i[2]+r*i[5]+o*i[8],e}function _0x4856c5(e,t,i){var n=i[0],r=i[1],o=i[2],a=i[3],s=t[0],l=t[1],u=t[2],c=r*u-o*l,h=o*s-n*u,d=n*l-r*s,f=r*d-o*h,p=o*c-n*d,_=n*h-r*c,m=2*a;return c*=m,h*=m,d*=m,f*=2,p*=2,_*=2,e[0]=s+c+f,e[1]=l+h+p,e[2]=u+d+_,e}function _0xaeb89d(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[0],o[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),o[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x117593(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),o[1]=r[1],o[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x13f5a0(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),o[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),o[2]=r[2],e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x3cd2cd(e,t){var i=_0x4da1cb(e[0],e[1],e[2]),n=_0x4da1cb(t[0],t[1],t[2]);_0x4ab974(i,i),_0x4ab974(n,n);var r=_0x1dd150(i,n);return r>1?0:r<-1?Math.PI:Math.acos(r)}function _0x41cff5(e){return e[0]=0,e[1]=0,e[2]=0,e}function _0x4caa61(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function _0x1f5072(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function _0x5ed1fd(e,t){var i=e[0],n=e[1],r=e[2],o=t[0],a=t[1],s=t[2];return Math.abs(i-o)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-a)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(s))}var _0x19d537=_0x4a4fe0,_0xcac922=_0x560fbd,_0x55e30e=_0x6fb566,_0x5df16c=_0x46578a,_0x98693a=_0x50140c,_0x68b465=_0x70ae2b,_0x2a3068=_0x27de00,_0x168a10=(_0xae561a=_0x1ed7cc(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=3),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a<s;a+=t)_0xae561a[0]=e[a],_0xae561a[1]=e[a+1],_0xae561a[2]=e[a+2],r(_0xae561a,_0xae561a,o),e[a]=_0xae561a[0],e[a+1]=_0xae561a[1],e[a+2]=_0xae561a[2];return e}),_0x56f8e5=Object.freeze({create:_0x1ed7cc,clone:_0x2565bd,length:_0x70ae2b,fromValues:_0x4da1cb,copy:_0x4382b2,set:_0x4983a6,add:_0x5b4689,subtract:_0x4a4fe0,multiply:_0x560fbd,divide:_0x6fb566,ceil:_0x465caf,floor:_0x5280ed,min:_0x354fa8,max:_0x3d057f,round:_0x4b35d9,scale:_0x35de5d,scaleAndAdd:_0x25afdb,distance:_0x46578a,squaredDistance:_0x50140c,squaredLength:_0x27de00,negate:_0x4f2176,inverse:_0x38c858,normalize:_0x4ab974,dot:_0x1dd150,cross:_0x2cf175,lerp:_0x4f5131,hermite:_0x38746a,bezier:_0x5d4752,random:_0x4886b6,transformMat4:_0x1fd49b,transformMat3:_0x3b721b,transformQuat:_0x4856c5,rotateX:_0xaeb89d,rotateY:_0x117593,rotateZ:_0x13f5a0,angle:_0x3cd2cd,zero:_0x41cff5,str:_0x4caa61,exactEquals:_0x1f5072,equals:_0x5ed1fd,sub:_0x19d537,mul:_0xcac922,div:_0x55e30e,dist:_0x5df16c,sqrDist:_0x98693a,len:_0x68b465,sqrLen:_0x2a3068,forEach:_0x168a10}),_0xae561a;function _0x436525(){var e=new _0x478b64(4);return _0x478b64!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function _0x433c65(e){var t=new _0x478b64(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function _0x53d10d(e,t,i,n){var r=new _0x478b64(4);return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function _0x3d5978(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function _0x806771(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e}function _0x54364d(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e}function _0x471a58(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e}function _0xb85b76(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e[3]=t[3]*i[3],e}function _0x53b3af(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e[3]=t[3]/i[3],e}function _0x29e796(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e}function _0x58e4df(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e}function _0xb76ff6(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e[3]=Math.min(t[3],i[3]),e}function _0x121a7f(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e[3]=Math.max(t[3],i[3]),e}function _0x494bd4(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function _0x37329b(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e}function _0x851f28(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e}function _0x4ccef9(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2],o=t[3]-e[3];return Math.hypot(i,n,r,o)}function _0x53e554(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2],o=t[3]-e[3];return i*i+n*n+r*r+o*o}function _0x4597fa(e){var t=e[0],i=e[1],n=e[2],r=e[3];return Math.hypot(t,i,n,r)}function _0x33ce4b(e){var t=e[0],i=e[1],n=e[2],r=e[3];return t*t+i*i+n*n+r*r}function _0x6eb73f(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}function _0x5394dc(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}function _0x2ed8cd(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*i+n*n+r*r+o*o;return a>0&&(a=1/Math.sqrt(a)),e[0]=i*a,e[1]=n*a,e[2]=r*a,e[3]=o*a,e}function _0xa4f7e9(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function _0x1b8947(e,t,i,n){var r=i[0]*n[1]-i[1]*n[0],o=i[0]*n[2]-i[2]*n[0],a=i[0]*n[3]-i[3]*n[0],s=i[1]*n[2]-i[2]*n[1],l=i[1]*n[3]-i[3]*n[1],u=i[2]*n[3]-i[3]*n[2],c=t[0],h=t[1],d=t[2],f=t[3];return e[0]=h*u-d*l+f*s,e[1]=-c*u+d*a-f*o,e[2]=c*l-h*a+f*r,e[3]=-c*s+h*o-d*r,e}function _0x133150(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=t[3];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e[2]=a+n*(i[2]-a),e[3]=s+n*(i[3]-s),e}function _0x1b67e2(e,t){var i,n,r,o,a,s;t=t||1;do{a=(i=2*_0x25d59d()-1)*i+(n=2*_0x25d59d()-1)*n}while(a>=1);do{s=(r=2*_0x25d59d()-1)*r+(o=2*_0x25d59d()-1)*o}while(s>=1);var l=Math.sqrt((1-a)/s);return e[0]=t*i,e[1]=t*n,e[2]=t*r*l,e[3]=t*o*l,e}function _0x275420(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3];return e[0]=i[0]*n+i[4]*r+i[8]*o+i[12]*a,e[1]=i[1]*n+i[5]*r+i[9]*o+i[13]*a,e[2]=i[2]*n+i[6]*r+i[10]*o+i[14]*a,e[3]=i[3]*n+i[7]*r+i[11]*o+i[15]*a,e}function _0x267a1b(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[0],s=i[1],l=i[2],u=i[3],c=u*n+s*o-l*r,h=u*r+l*n-a*o,d=u*o+a*r-s*n,f=-a*n-s*r-l*o;return e[0]=c*u+f*-a+h*-l-d*-s,e[1]=h*u+f*-s+d*-a-c*-l,e[2]=d*u+f*-l+c*-s-h*-a,e[3]=t[3],e}function _0x445147(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function _0x500aa7(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function _0x2ece3d(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function _0x1186c6(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t[2],u=t[3];return Math.abs(i-a)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-s)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-l)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-u)<=_0x5709ba*Math.max(1,Math.abs(o),Math.abs(u))}var _0xfaf62f=_0x471a58,_0x36e185=_0xb85b76,_0x4e1cf5=_0x53b3af,_0x3b7a4f=_0x4ccef9,_0xc29a8=_0x53e554,_0x4ec86a=_0x4597fa,_0x530e2c=_0x33ce4b,_0x282b2e=(_0x492b83=_0x436525(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=4),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a<s;a+=t)_0x492b83[0]=e[a],_0x492b83[1]=e[a+1],_0x492b83[2]=e[a+2],_0x492b83[3]=e[a+3],r(_0x492b83,_0x492b83,o),e[a]=_0x492b83[0],e[a+1]=_0x492b83[1],e[a+2]=_0x492b83[2],e[a+3]=_0x492b83[3];return e}),_0x281f3d=Object.freeze({create:_0x436525,clone:_0x433c65,fromValues:_0x53d10d,copy:_0x3d5978,set:_0x806771,add:_0x54364d,subtract:_0x471a58,multiply:_0xb85b76,divide:_0x53b3af,ceil:_0x29e796,floor:_0x58e4df,min:_0xb76ff6,max:_0x121a7f,round:_0x494bd4,scale:_0x37329b,scaleAndAdd:_0x851f28,distance:_0x4ccef9,squaredDistance:_0x53e554,length:_0x4597fa,squaredLength:_0x33ce4b,negate:_0x6eb73f,inverse:_0x5394dc,normalize:_0x2ed8cd,dot:_0xa4f7e9,cross:_0x1b8947,lerp:_0x133150,random:_0x1b67e2,transformMat4:_0x275420,transformQuat:_0x267a1b,zero:_0x445147,str:_0x500aa7,exactEquals:_0x2ece3d,equals:_0x1186c6,sub:_0xfaf62f,mul:_0x36e185,div:_0x4e1cf5,dist:_0x3b7a4f,sqrDist:_0xc29a8,len:_0x4ec86a,sqrLen:_0x530e2c,forEach:_0x282b2e}),_0x492b83;function _0x204a1a(){var e=new _0x478b64(4);return _0x478b64!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function _0x544935(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function _0x550603(e,t,i){i*=.5;var n=Math.sin(i);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(i),e}function _0x37eacf(e,t){var i=2*Math.acos(t[3]),n=Math.sin(i/2);return n>_0x5709ba?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),i}function _0x5c7f68(e,t){var i=_0x428f89(e,t);return Math.acos(2*i*i-1)}function _0x15320a(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*c+a*s+r*u-o*l,e[1]=r*c+a*l+o*s-n*u,e[2]=o*c+a*u+n*l-r*s,e[3]=a*c-n*s-r*l-o*u,e}function _0x25bc96(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+a*s,e[1]=r*l+o*s,e[2]=o*l-r*s,e[3]=a*l-n*s,e}function _0x53eb22(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l-o*s,e[1]=r*l+a*s,e[2]=o*l+n*s,e[3]=a*l-r*s,e}function _0x183f85(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+r*s,e[1]=r*l-n*s,e[2]=o*l+a*s,e[3]=a*l-o*s,e}function _0x5011ef(e,t){var i=t[0],n=t[1],r=t[2];return e[0]=i,e[1]=n,e[2]=r,e[3]=Math.sqrt(Math.abs(1-i*i-n*n-r*r)),e}function _0x2c56c6(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=Math.sqrt(i*i+n*n+r*r),s=Math.exp(o),l=a>0?s*Math.sin(a)/a:0;return e[0]=i*l,e[1]=n*l,e[2]=r*l,e[3]=s*Math.cos(a),e}function _0x451869(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=Math.sqrt(i*i+n*n+r*r),s=a>0?Math.atan2(a,o)/a:0;return e[0]=i*s,e[1]=n*s,e[2]=r*s,e[3]=.5*Math.log(i*i+n*n+r*r+o*o),e}function _0xf75c0f(e,t,i){return _0x451869(e,t),_0x3bd2dd(e,e,i),_0x2c56c6(e,e),e}function _0x30a7cb(e,t,i,n){var r,o,a,s,l,u=t[0],c=t[1],h=t[2],d=t[3],f=i[0],p=i[1],_=i[2],m=i[3];return(o=u*f+c*p+h*_+d*m)<0&&(o=-o,f=-f,p=-p,_=-_,m=-m),1-o>_0x5709ba?(r=Math.acos(o),a=Math.sin(r),s=Math.sin((1-n)*r)/a,l=Math.sin(n*r)/a):(s=1-n,l=n),e[0]=s*u+l*f,e[1]=s*c+l*p,e[2]=s*h+l*_,e[3]=s*d+l*m,e}function _0x501f36(e){var t=_0x25d59d(),i=_0x25d59d(),n=_0x25d59d(),r=Math.sqrt(1-t),o=Math.sqrt(t);return e[0]=r*Math.sin(2*Math.PI*i),e[1]=r*Math.cos(2*Math.PI*i),e[2]=o*Math.sin(2*Math.PI*n),e[3]=o*Math.cos(2*Math.PI*n),e}function _0x3b046e(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*i+n*n+r*r+o*o,s=a?1/a:0;return e[0]=-i*s,e[1]=-n*s,e[2]=-r*s,e[3]=o*s,e}function _0x1a34f1(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function _0x4fa40f(e,t){var i,n=t[0]+t[4]+t[8];if(n>0)i=Math.sqrt(n+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{var r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*a+a]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+a]-t[3*a+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[a]=(t[3*a+r]+t[3*r+a])*i}return e}function _0x160fb3(e,t,i,n){var r=.5*Math.PI/180;t*=r,i*=r,n*=r;var o=Math.sin(t),a=Math.cos(t),s=Math.sin(i),l=Math.cos(i),u=Math.sin(n),c=Math.cos(n);return e[0]=o*l*c-a*s*u,e[1]=a*s*c+o*l*u,e[2]=a*l*u-o*s*c,e[3]=a*l*c+o*s*u,e}function _0x262611(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var _0x5d36c6=_0x433c65,_0x271c4c=_0x53d10d,_0x32c848=_0x3d5978,_0x3a88c4=_0x806771,_0x1850e7=_0x54364d,_0x565697=_0x15320a,_0x3bd2dd=_0x37329b,_0x428f89=_0xa4f7e9,_0x49124b=_0x133150,_0x389f9f=_0x4597fa,_0xc68334=_0x389f9f,_0x51efdf=_0x33ce4b,_0x341797=_0x51efdf,_0x5e82da=_0x2ed8cd,_0x4bae90=_0x2ece3d,_0x3e6b79=_0x1186c6,_0x30574b=(_0x260b9e=_0x1ed7cc(),_0x454875=_0x4da1cb(1,0,0),_0x57496b=_0x4da1cb(0,1,0),function(e,t,i){var n=_0x1dd150(t,i);return n<-.999999?(_0x2cf175(_0x260b9e,_0x454875,t),_0x68b465(_0x260b9e)<1e-6&&_0x2cf175(_0x260b9e,_0x57496b,t),_0x4ab974(_0x260b9e,_0x260b9e),_0x550603(e,_0x260b9e,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(_0x2cf175(_0x260b9e,t,i),e[0]=_0x260b9e[0],e[1]=_0x260b9e[1],e[2]=_0x260b9e[2],e[3]=1+n,_0x5e82da(e,e))}),_0x28e103=(_0x457f90=_0x204a1a(),_0x4b5b55=_0x204a1a(),function(e,t,i,n,r,o){return _0x30a7cb(_0x457f90,t,r,o),_0x30a7cb(_0x4b5b55,i,n,o),_0x30a7cb(e,_0x457f90,_0x4b5b55,2*o*(1-o)),e}),_0x2aff5b=(_0x2072d9=_0x165677(),function(e,t,i,n){return _0x2072d9[0]=i[0],_0x2072d9[3]=i[1],_0x2072d9[6]=i[2],_0x2072d9[1]=n[0],_0x2072d9[4]=n[1],_0x2072d9[7]=n[2],_0x2072d9[2]=-t[0],_0x2072d9[5]=-t[1],_0x2072d9[8]=-t[2],_0x5e82da(e,_0x4fa40f(e,_0x2072d9))}),_0x2523a8=Object.freeze({create:_0x204a1a,identity:_0x544935,setAxisAngle:_0x550603,getAxisAngle:_0x37eacf,getAngle:_0x5c7f68,multiply:_0x15320a,rotateX:_0x25bc96,rotateY:_0x53eb22,rotateZ:_0x183f85,calculateW:_0x5011ef,exp:_0x2c56c6,ln:_0x451869,pow:_0xf75c0f,slerp:_0x30a7cb,random:_0x501f36,invert:_0x3b046e,conjugate:_0x1a34f1,fromMat3:_0x4fa40f,fromEuler:_0x160fb3,str:_0x262611,clone:_0x5d36c6,fromValues:_0x271c4c,copy:_0x32c848,set:_0x3a88c4,add:_0x1850e7,mul:_0x565697,scale:_0x3bd2dd,dot:_0x428f89,lerp:_0x49124b,length:_0x389f9f,len:_0xc68334,squaredLength:_0x51efdf,sqrLen:_0x341797,normalize:_0x5e82da,exactEquals:_0x4bae90,equals:_0x3e6b79,rotationTo:_0x30574b,sqlerp:_0x28e103,setAxes:_0x2aff5b}),_0x2072d9,_0x457f90,_0x4b5b55,_0x260b9e,_0x454875,_0x57496b;function _0x4cd018(){var e=new _0x478b64(8);return _0x478b64!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0),e[3]=1,e}function _0x4f49dc(e){var t=new _0x478b64(8);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function _0x183693(e,t,i,n,r,o,a,s){var l=new _0x478b64(8);return l[0]=e,l[1]=t,l[2]=i,l[3]=n,l[4]=r,l[5]=o,l[6]=a,l[7]=s,l}function _0x200f43(e,t,i,n,r,o,a){var s=new _0x478b64(8);s[0]=e,s[1]=t,s[2]=i,s[3]=n;var l=.5*r,u=.5*o,c=.5*a;return s[4]=l*n+u*i-c*t,s[5]=u*n+c*e-l*i,s[6]=c*n+l*t-u*e,s[7]=-l*e-u*t-c*i,s}function _0x2e26f6(e,t,i){var n=.5*i[0],r=.5*i[1],o=.5*i[2],a=t[0],s=t[1],l=t[2],u=t[3];return e[0]=a,e[1]=s,e[2]=l,e[3]=u,e[4]=n*u+r*l-o*s,e[5]=r*u+o*a-n*l,e[6]=o*u+n*s-r*a,e[7]=-n*a-r*s-o*l,e}function _0x9ef73e(e,t){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=.5*t[0],e[5]=.5*t[1],e[6]=.5*t[2],e[7]=0,e}function _0x3c738f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function _0x5d6255(e,t){var i=_0x204a1a();_0x390d2d(i,t);var n=new _0x478b64(3);return _0x13f7d5(n,t),_0x2e26f6(e,i,n),e}function _0x24b9fc(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e}function _0x461fdd(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function _0x6ad5b8(e,t,i,n,r,o,a,s,l){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e}var _0xb6f463=_0x32c848;function _0x4c3e27(e,t){return e[0]=t[4],e[1]=t[5],e[2]=t[6],e[3]=t[7],e}var _0x5ee0fa=_0x32c848;function _0x3538f8(e,t){return e[4]=t[0],e[5]=t[1],e[6]=t[2],e[7]=t[3],e}function _0x21d245(e,t){var i=t[4],n=t[5],r=t[6],o=t[7],a=-t[0],s=-t[1],l=-t[2],u=t[3];return e[0]=2*(i*u+o*a+n*l-r*s),e[1]=2*(n*u+o*s+r*a-i*l),e[2]=2*(r*u+o*l+i*s-n*a),e}function _0x429d4b(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=.5*i[0],l=.5*i[1],u=.5*i[2],c=t[4],h=t[5],d=t[6],f=t[7];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=a*s+r*u-o*l+c,e[5]=a*l+o*s-n*u+h,e[6]=a*u+n*l-r*s+d,e[7]=-n*s-r*l-o*u+f,e}function _0x3231de(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x25bc96(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x475433(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x53eb22(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x17e092(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x183f85(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0xb32012(e,t,i){var n=i[0],r=i[1],o=i[2],a=i[3],s=t[0],l=t[1],u=t[2],c=t[3];return e[0]=s*a+c*n+l*o-u*r,e[1]=l*a+c*r+u*n-s*o,e[2]=u*a+c*o+s*r-l*n,e[3]=c*a-s*n-l*r-u*o,s=t[4],l=t[5],u=t[6],c=t[7],e[4]=s*a+c*n+l*o-u*r,e[5]=l*a+c*r+u*n-s*o,e[6]=u*a+c*o+s*r-l*n,e[7]=c*a-s*n-l*r-u*o,e}function _0x19bd04(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*c+a*s+r*u-o*l,e[1]=r*c+a*l+o*s-n*u,e[2]=o*c+a*u+n*l-r*s,e[3]=a*c-n*s-r*l-o*u,s=i[4],l=i[5],u=i[6],c=i[7],e[4]=n*c+a*s+r*u-o*l,e[5]=r*c+a*l+o*s-n*u,e[6]=o*c+a*u+n*l-r*s,e[7]=a*c-n*s-r*l-o*u,e}function _0x5d6eb4(e,t,i,n){if(Math.abs(n)<_0x5709ba)return _0x24b9fc(e,t);var r=Math.hypot(i[0],i[1],i[2]);n*=.5;var o=Math.sin(n),a=o*i[0]/r,s=o*i[1]/r,l=o*i[2]/r,u=Math.cos(n),c=t[0],h=t[1],d=t[2],f=t[3];e[0]=c*u+f*a+h*l-d*s,e[1]=h*u+f*s+d*a-c*l,e[2]=d*u+f*l+c*s-h*a,e[3]=f*u-c*a-h*s-d*l;var p=t[4],_=t[5],m=t[6],g=t[7];return e[4]=p*u+g*a+_*l-m*s,e[5]=_*u+g*s+m*a-p*l,e[6]=m*u+g*l+p*s-_*a,e[7]=g*u-p*a-_*s-m*l,e}function _0x20723a(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e}function _0x488b7c(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[4],l=i[5],u=i[6],c=i[7],h=t[4],d=t[5],f=t[6],p=t[7],_=i[0],m=i[1],g=i[2],x=i[3];return e[0]=n*x+a*_+r*g-o*m,e[1]=r*x+a*m+o*_-n*g,e[2]=o*x+a*g+n*m-r*_,e[3]=a*x-n*_-r*m-o*g,e[4]=n*c+a*s+r*u-o*l+h*x+p*_+d*g-f*m,e[5]=r*c+a*l+o*s-n*u+d*x+p*m+f*_-h*g,e[6]=o*c+a*u+n*l-r*s+f*x+p*g+h*m-d*_,e[7]=a*c-n*s-r*l-o*u+p*x-h*_-d*m-f*g,e}var _0x4af7d7=_0x488b7c;function _0x36c4b7(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e}var _0xe1e00=_0x428f89;function _0x754b92(e,t,i,n){var r=1-n;return _0xe1e00(t,i)<0&&(n=-n),e[0]=t[0]*r+i[0]*n,e[1]=t[1]*r+i[1]*n,e[2]=t[2]*r+i[2]*n,e[3]=t[3]*r+i[3]*n,e[4]=t[4]*r+i[4]*n,e[5]=t[5]*r+i[5]*n,e[6]=t[6]*r+i[6]*n,e[7]=t[7]*r+i[7]*n,e}function _0x19e509(e,t){var i=_0x34f0b6(t);return e[0]=-t[0]/i,e[1]=-t[1]/i,e[2]=-t[2]/i,e[3]=t[3]/i,e[4]=-t[4]/i,e[5]=-t[5]/i,e[6]=-t[6]/i,e[7]=t[7]/i,e}function _0x30b687(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=t[7],e}var _0x57e1bb=_0x389f9f,_0x829123=_0x57e1bb,_0x34f0b6=_0x51efdf,_0x43dbf5=_0x34f0b6;function _0x4c35d4(e,t){var i=_0x34f0b6(t);if(i>0){i=Math.sqrt(i);var n=t[0]/i,r=t[1]/i,o=t[2]/i,a=t[3]/i,s=t[4],l=t[5],u=t[6],c=t[7],h=n*s+r*l+o*u+a*c;e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=(s-n*h)/i,e[5]=(l-r*h)/i,e[6]=(u-o*h)/i,e[7]=(c-a*h)/i}return e}function _0x7f6559(e){return"quat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+")"}function _0x4ea65a(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]}function _0xca66ed(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=t[0],h=t[1],d=t[2],f=t[3],p=t[4],_=t[5],m=t[6],g=t[7];return Math.abs(i-c)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(n-h)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-d)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(d))&&Math.abs(o-f)<=_0x5709ba*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(a-p)<=_0x5709ba*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(s-_)<=_0x5709ba*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(l-m)<=_0x5709ba*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(u-g)<=_0x5709ba*Math.max(1,Math.abs(u),Math.abs(g))}var _0x170acc=Object.freeze({create:_0x4cd018,clone:_0x4f49dc,fromValues:_0x183693,fromRotationTranslationValues:_0x200f43,fromRotationTranslation:_0x2e26f6,fromTranslation:_0x9ef73e,fromRotation:_0x3c738f,fromMat4:_0x5d6255,copy:_0x24b9fc,identity:_0x461fdd,set:_0x6ad5b8,getReal:_0xb6f463,getDual:_0x4c3e27,setReal:_0x5ee0fa,setDual:_0x3538f8,getTranslation:_0x21d245,translate:_0x429d4b,rotateX:_0x3231de,rotateY:_0x475433,rotateZ:_0x17e092,rotateByQuatAppend:_0xb32012,rotateByQuatPrepend:_0x19bd04,rotateAroundAxis:_0x5d6eb4,add:_0x20723a,multiply:_0x488b7c,mul:_0x4af7d7,scale:_0x36c4b7,dot:_0xe1e00,lerp:_0x754b92,invert:_0x19e509,conjugate:_0x30b687,length:_0x57e1bb,len:_0x829123,squaredLength:_0x34f0b6,sqrLen:_0x43dbf5,normalize:_0x4c35d4,str:_0x7f6559,exactEquals:_0x4ea65a,equals:_0xca66ed});function _0x79b23f(){var e=new _0x478b64(2);return _0x478b64!=Float32Array&&(e[0]=0,e[1]=0),e}function _0x923ff7(e){var t=new _0x478b64(2);return t[0]=e[0],t[1]=e[1],t}function _0x3830a7(e,t){var i=new _0x478b64(2);return i[0]=e,i[1]=t,i}function _0x185d48(e,t){return e[0]=t[0],e[1]=t[1],e}function _0x224ad6(e,t,i){return e[0]=t,e[1]=i,e}function _0x23c67a(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e}function _0x884672(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e}function _0x32a79e(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e}function _0x561673(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e}function _0x39e646(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function _0x37784a(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function _0x38c8bb(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e}function _0x31feef(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e}function _0xa0558e(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function _0x31bb20(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e}function _0x2d0d90(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e}function _0x5b2ddf(e,t){var i=t[0]-e[0],n=t[1]-e[1];return Math.hypot(i,n)}function _0x5d9e91(e,t){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function _0x4e36e0(e){var t=e[0],i=e[1];return Math.hypot(t,i)}function _0x3560af(e){var t=e[0],i=e[1];return t*t+i*i}function _0x4e545d(e,t){return e[0]=-t[0],e[1]=-t[1],e}function _0x18c22f(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function _0x41d38e(e,t){var i=t[0],n=t[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r)),e[0]=t[0]*r,e[1]=t[1]*r,e}function _0x552e0f(e,t){return e[0]*t[0]+e[1]*t[1]}function _0x225134(e,t,i){var n=t[0]*i[1]-t[1]*i[0];return e[0]=e[1]=0,e[2]=n,e}function _0x203c84(e,t,i,n){var r=t[0],o=t[1];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e}function _0x1a609c(e,t){t=t||1;var i=2*_0x25d59d()*Math.PI;return e[0]=Math.cos(i)*t,e[1]=Math.sin(i)*t,e}function _0x49ce96(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[2]*r,e[1]=i[1]*n+i[3]*r,e}function _0x5dd6bf(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[2]*r+i[4],e[1]=i[1]*n+i[3]*r+i[5],e}function _0x88bea8(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[3]*r+i[6],e[1]=i[1]*n+i[4]*r+i[7],e}function _0x135bd1(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[4]*r+i[12],e[1]=i[1]*n+i[5]*r+i[13],e}function _0xacba30(e,t,i,n){var r=t[0]-i[0],o=t[1]-i[1],a=Math.sin(n),s=Math.cos(n);return e[0]=r*s-o*a+i[0],e[1]=r*a+o*s+i[1],e}function _0x43105b(e,t){var i=e[0],n=e[1],r=t[0],o=t[1],a=i*i+n*n;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var l=(i*r+n*o)*a*s;return l>1?0:l<-1?Math.PI:Math.acos(l)}function _0x293330(e){return e[0]=0,e[1]=0,e}function _0x5cc1a8(e){return"vec2("+e[0]+", "+e[1]+")"}function _0x27dede(e,t){return e[0]===t[0]&&e[1]===t[1]}function _0x4472ab(e,t){var i=e[0],n=e[1],r=t[0],o=t[1];return Math.abs(i-r)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(r))&&Math.abs(n-o)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(o))}var _0xa6fe00=_0x4e36e0,_0x90c598=_0x884672,_0x1ad3b7=_0x32a79e,_0x3f5f08=_0x561673,_0x27dcf4=_0x5b2ddf,_0xda44a2=_0x5d9e91,_0x23151f=_0x3560af,_0x5b17ba=(_0x42caa8=_0x79b23f(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=2),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a<s;a+=t)_0x42caa8[0]=e[a],_0x42caa8[1]=e[a+1],r(_0x42caa8,_0x42caa8,o),e[a]=_0x42caa8[0],e[a+1]=_0x42caa8[1];return e}),_0x50cf07=Object.freeze({create:_0x79b23f,clone:_0x923ff7,fromValues:_0x3830a7,copy:_0x185d48,set:_0x224ad6,add:_0x23c67a,subtract:_0x884672,multiply:_0x32a79e,divide:_0x561673,ceil:_0x39e646,floor:_0x37784a,min:_0x38c8bb,max:_0x31feef,round:_0xa0558e,scale:_0x31bb20,scaleAndAdd:_0x2d0d90,distance:_0x5b2ddf,squaredDistance:_0x5d9e91,length:_0x4e36e0,squaredLength:_0x3560af,negate:_0x4e545d,inverse:_0x18c22f,normalize:_0x41d38e,dot:_0x552e0f,cross:_0x225134,lerp:_0x203c84,random:_0x1a609c,transformMat2:_0x49ce96,transformMat2d:_0x5dd6bf,transformMat3:_0x88bea8,transformMat4:_0x135bd1,rotate:_0xacba30,angle:_0x43105b,zero:_0x293330,str:_0x5cc1a8,exactEquals:_0x27dede,equals:_0x4472ab,len:_0xa6fe00,sub:_0x90c598,mul:_0x1ad3b7,div:_0x3f5f08,dist:_0x27dcf4,sqrDist:_0xda44a2,sqrLen:_0x23151f,forEach:_0x5b17ba}),_0x42caa8;_0x3fdff7.glMatrix=_0xacb5eb,_0x3fdff7.mat2=_0x1b6186,_0x3fdff7.mat2d=_0x376082,_0x3fdff7.mat3=_0x499ef9,_0x3fdff7.mat4=_0x479473,_0x3fdff7.quat=_0x2523a8,_0x3fdff7.quat2=_0x170acc,_0x3fdff7.vec2=_0x50cf07,_0x3fdff7.vec3=_0x56f8e5,_0x3fdff7.vec4=_0x281f3d;const _0x3e0ce0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x156524=_0x3e0ce0(void 0,(function(){return _0x156524.toString().search("(((.+)+)+)+$").toString().constructor(_0x156524).search("(((.+)+)+)+$")}));function _0x32124d(e,t,i,n,r){const o=_0x3fdff7.mat4.create();return t?(_0x3fdff7.mat4.scale(o,o,[1/r,1/r,1]),!i&&_0x3fdff7.mat4.rotateZ(o,o,n.angle)):_0x3fdff7.mat4.multiply(o,n.labelPlaneMatrix,e),o}function _0x5e9fcb(e,t,i,n,r){if(t){const t=_0x3fdff7.mat4.clone(e);return _0x3fdff7.mat4.scale(t,t,[r,r,1]),!i&&_0x3fdff7.mat4.rotateZ(t,t,-n.angle),t}return n.glCoordMatrix}function _0x88ac55(e,t){const i=[e.x,e.y,0,1];_0xfe5cb(i,i,t);const n=i[3];return{point:new _0x4f59fa(i[0]/n,i[1]/n),signedDistanceFromCamera:n}}function _0x3475cf(e,t){const i=e[0]/e[3],n=e[1]/e[3];return i>=-t[0]&&i<=t[0]&&n>=-t[1]&&n<=t[1]}function _0x3ca165(e,t,i,n,r,o,a,s){const l=n?e.textSizeData:e.iconSizeData,u=_0x45c464(l,i.transform.zoom),c=[256/i.width*2+1,256/i.height*2+1],h=n?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();const d=e.lineVertexArray,f=n?e.text.placedSymbolArray:e.icon.placedSymbolArray,p=i.transform.width/i.transform.height;let _=!1;for(let n=0;n<f.length;n++){const a=f.get(n);if(a.hidden||a.writingMode===_0x2e52db.vertical&&!_){_0x5ecf1c(a.numGlyphs,h);continue}_=!1;const m=[a.anchorX,a.anchorY,0,1];if(_0x3fdff7.vec4.transformMat4(m,m,t),!_0x3475cf(m,c)){_0x5ecf1c(a.numGlyphs,h);continue}m[3];i.transform.cameraToCenterDistance;const g=1.5*_0x448d94(l,u,a),x=new _0x4f59fa(a.anchorX,a.anchorY),y=_0x88ac55(x,r).point,v={},$=_0x3ac321(a,g,!1,s,t,r,o,e.glyphOffsetArray,d,h,y,x,v,p);_=$.useVertical,($.notEnoughRoom||_||$.needsFlipping&&_0x3ac321(a,g,!0,s,t,r,o,e.glyphOffsetArray,d,h,y,x,v,p).notEnoughRoom)&&_0x5ecf1c(a.numGlyphs,h)}n?e.text.dynamicLayoutVertexBuffer.copyFromArrayView(h.arrayBuffer):e.icon.dynamicLayoutVertexBuffer.copyFromArrayView(h.arrayBuffer)}function _0x51b7d0(e,t,i,n,r,o,a,s,l,u,c,h){const d=s.glyphStartIndex+s.numGlyphs,f=s.lineStartIndex,p=s.lineStartIndex+s.lineLength,_=t.getoffsetX(s.glyphStartIndex),m=t.getoffsetX(d-1),g=_0x5cc47b(e*_,i,n,r,o,a,s.segment,f,p,l,u,c,h);if(!g)return null;const x=_0x5cc47b(e*m,i,n,r,o,a,s.segment,f,p,l,u,c,h);return x?{first:g,last:x}:null}function _0x227f82(e,t,i,n){if(e===_0x2e52db.horizontal){if(Math.abs(i.y-t.y)>Math.abs(i.x-t.x)*n)return{useVertical:!0}}return(e===_0x2e52db.vertical?t.y<i.y:t.x>i.x)?{needsFlipping:!0}:null}function _0x3ac321(e,t,i,n,r,o,a,s,l,u,c,h,d,f){const p=t/24,_=e.lineOffsetX*p,m=e.lineOffsetY*p;let g;if(e.numGlyphs>1){const t=e.glyphStartIndex+e.numGlyphs,r=e.lineStartIndex,u=e.lineStartIndex+e.lineLength,x=_0x51b7d0(p,s,_,m,i,c,h,e,l,o,d,!1);if(!x)return{notEnoughRoom:!0};const y=_0x88ac55(x.first.point,a).point,v=_0x88ac55(x.last.point,a).point;n&&!i&&_0x227f82(e.writingMode,y,v,f),g=[x.first];for(let n=e.glyphStartIndex+1;n<t-1;n++)g.push(_0x5cc47b(p*s.getoffsetX(n),_,m,i,c,h,e.segment,r,u,l,o,d,!1));g.push(x.last)}else{if(n&&!i){const t=_0x88ac55(h,r).point,i=e.lineStartIndex+e.segment+1,n=new _0x4f59fa(l.getx(i),l.gety(i)),o=_0x88ac55(n,r),a=o.signedDistanceFromCamera>0?o.point:_0x157240(h,n,t,1,r),s=_0x227f82(e.writingMode,t,a,f);if(s)return s}const t=_0x5cc47b(p*s.getoffsetX(e.glyphStartIndex),_,m,i,c,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,l,o,d,!1);if(!t)return{notEnoughRoom:!0};g=[t]}for(const e of g){_0x3b8a98(u,_0x88ac55(e.point,a).point,e.angle)}return{}}function _0x157240(e,t,i,n,r){const o=_0x88ac55(e.add(e.sub(t)._unit()),r).point,a=i.sub(o);return i.add(a._mult(n/a.mag()))}function _0x5cc47b(e,t,i,n,r,o,a,s,l,u,c,h,d){const f=n?e-t:e+t;let p=f>0?1:-1,_=0;n&&(p*=-1,_=Math.PI),p<0&&(_+=Math.PI);let m=p>0?s+a:s+a+1;const g=m;let x=r,y=r,v=0,$=0;const b=Math.abs(f);for(;v+$<=b;){if(m+=p,m<s||m>=l)return null;if(y=x,x=h[m],void 0===x){const e=new _0x4f59fa(u.getx(m),u.gety(m)),t=_0x88ac55(e,c);if(t.signedDistanceFromCamera>0)x=h[m]=t.point;else{const t=m-p;x=_0x157240(0===v?o:new _0x4f59fa(u.getx(t),u.gety(t)),e,y,b-v+1,c)}}v+=$,$=y.dist(x)}const T=(b-v)/$,C=x.sub(y),S=C.mult(T)._add(y);S._add(C._unit()._perp()._mult(i*p));return{point:S,angle:_+Math.atan2(x.y-y.y,x.x-y.x),tileDistance:d?{prevTileDistance:m-p===g?0:u.gettileUnitDistanceFromAnchor(m-p),lastSegmentViewportDistance:b-v}:null}}_0x156524();const _0x42ca22=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function _0x5ecf1c(e,t){for(let i=0;i<e;i++){const e=t.length;t.resize(e+4),t.float32.set(_0x42ca22,3*e)}}function _0xfe5cb(e,t,i){const n=t[0],r=t[1];return e[0]=i[0]*n+i[4]*r+i[12],e[1]=i[1]*n+i[5]*r+i[13],e[3]=i[3]*n+i[7]*r+i[15],e}var _0x20edb8=(_0x13fc96=!0,function(e,t){var i=_0x13fc96?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13fc96=!1,i}),_0x3593c5=_0x20edb8(void 0,(function(){return _0x3593c5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3593c5).search("(((.+)+)+)+$")})),_0x13fc96;_0x3593c5();var _0x1c04ac={symbolIconUniforms:function(e,t){return{u_is_size_zoom_constant:new _0x3d809b.Uniform1i(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new _0x3d809b.Uniform1i(e,t.u_is_size_feature_constant),u_size_t:new _0x3d809b.Uniform1f(e,t.u_size_t),u_size:new _0x3d809b.Uniform1f(e,t.u_size),u_camera_to_center_distance:new _0x3d809b.Uniform1f(e,t.u_camera_to_center_distance),u_pitch:new _0x3d809b.Uniform1f(e,t.u_pitch),u_rotate_symbol:new _0x3d809b.Uniform1i(e,t.u_rotate_symbol),u_aspect_ratio:new _0x3d809b.Uniform1f(e,t.u_aspect_ratio),u_fade_change:new _0x3d809b.Uniform1f(e,t.u_fade_change),u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_label_plane_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_label_plane_matrix),u_coord_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_coord_matrix),u_is_text:new _0x3d809b.Uniform1f(e,t.u_is_text),u_pitch_with_map:new _0x3d809b.Uniform1i(e,t.u_pitch_with_map),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_texture:new _0x3d809b.Uniform1i(e,t.u_texture)}},symbolSDFUniforms:function(e,t){return{u_is_size_zoom_constant:new _0x3d809b.Uniform1i(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new _0x3d809b.Uniform1i(e,t.u_is_size_feature_constant),u_size_t:new _0x3d809b.Uniform1f(e,t.u_size_t),u_size:new _0x3d809b.Uniform1f(e,t.u_size),u_camera_to_center_distance:new _0x3d809b.Uniform1f(e,t.u_camera_to_center_distance),u_pitch:new _0x3d809b.Uniform1f(e,t.u_pitch),u_rotate_symbol:new _0x3d809b.Uniform1i(e,t.u_rotate_symbol),u_aspect_ratio:new _0x3d809b.Uniform1f(e,t.u_aspect_ratio),u_fade_change:new _0x3d809b.Uniform1f(e,t.u_fade_change),u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_label_plane_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_label_plane_matrix),u_coord_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_coord_matrix),u_is_text:new _0x3d809b.Uniform1f(e,t.u_is_text),u_pitch_with_map:new _0x3d809b.Uniform1i(e,t.u_pitch_with_map),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_texture:new _0x3d809b.Uniform1i(e,t.u_texture),u_gamma_scale:new _0x3d809b.Uniform1f(e,t.u_gamma_scale),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_is_halo:new _0x3d809b.Uniform1f(e,t.u_is_halo)}},symbolTextAndIconUniforms:function(e,t){return{u_is_size_zoom_constant:new _0x3d809b.Uniform1i(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new _0x3d809b.Uniform1i(e,t.u_is_size_feature_constant),u_size_t:new _0x3d809b.Uniform1f(e,t.u_size_t),u_size:new _0x3d809b.Uniform1f(e,t.u_size),u_camera_to_center_distance:new _0x3d809b.Uniform1f(e,t.u_camera_to_center_distance),u_pitch:new _0x3d809b.Uniform1f(e,t.u_pitch),u_rotate_symbol:new _0x3d809b.Uniform1i(e,t.u_rotate_symbol),u_aspect_ratio:new _0x3d809b.Uniform1f(e,t.u_aspect_ratio),u_fade_change:new _0x3d809b.Uniform1f(e,t.u_fade_change),u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_label_plane_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_label_plane_matrix),u_coord_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_coord_matrix),u_is_text:new _0x3d809b.Uniform1f(e,t.u_is_text),u_pitch_with_map:new _0x3d809b.Uniform1i(e,t.u_pitch_with_map),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_texsize_icon:new _0x3d809b.Uniform2f(e,t.u_texsize_icon),u_texture:new _0x3d809b.Uniform1i(e,t.u_texture),u_texture_icon:new _0x3d809b.Uniform1i(e,t.u_texture_icon),u_gamma_scale:new _0x3d809b.Uniform1f(e,t.u_gamma_scale),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_is_halo:new _0x3d809b.Uniform1f(e,t.u_is_halo)}},symbolIconUniformValues:function(e,t,i,n,r,o,a,s,l,u){var c=r.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:c.width/c.height,u_fade_change:r.options.fadeDuration?r.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:u,u_texture:0}},symbolSDFUniformValues:function(e,t,i,n,r,o,a,s,l,u,c){var h=r.transform;return extend$1(_0x1c04ac.symbolIconUniformValues(e,t,i,n,r,o,a,s,l,u),{u_gamma_scale:n?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:1,u_is_halo:+c})},symbolTextAndIconUniformValues:function(e,t,i,n,r,o,a,s,l,u){return extend$1(_0x1c04ac.symbolSDFUniformValues(e,t,i,n,r,o,a,s,!0,l,!0),{u_texsize_icon:u,u_texture_icon:1})}},_0x7e032e=new o$1o;_0x1c04ac.symbolIconUniformMap=function(e,t,i,n,r,o,a,s,l,u){var c={},h=r.transform;return c.u_is_size_zoom_constant=function(){return+("constant"===e||"source"===e)},c.u_is_size_feature_constant=function(){return+("constant"===e||"camera"===e)},c.u_size_t=function(){return t?t.uSizeT:0},c.u_size=function(){return t?t.uSize:0},c.u_camera_to_center_distance=function(){return h.cameraToCenterDistance},c.u_pitch=function(){return h.pitch/360*2*Math.PI},c.u_rotate_symbol=function(){return+i},c.u_aspect_ratio=function(){return h.width/h.height},c.u_fade_change=function(){return r.options.fadeDuration?r.symbolFadeChange:1},c.u_matrix=function(){return o},c.u_label_plane_matrix=function(){return a},c.u_coord_matrix=function(){return s},c.u_is_text=function(){return+l},c.u_pitch_with_map=function(){return+n},c.u_texsize=function(){return _0x7e032e.x=u[0],_0x7e032e.y=u[1],_0x7e032e},c.u_texture=function(){return 0},c},_0x1c04ac.symbolSDFUniformMap=function(e,t,i,n,r,o,a,s,l,u,c){var h=_0x1c04ac.symbolIconUniformMap(e,t,i,n,r,o,a,s,l,u),d=r.transform;return h.u_gamma_scale=function(){return n?Math.cos(d._pitch)*d.cameraToCenterDistance:1},h.u_device_pixel_ratio=function(){return 1},h.u_is_halo=function(){return+c},h},_0x1c04ac.symbolTextAndIconUniformMap=function(e,t,i,n,r,o,a,s,l,u){var c=_0x1c04ac.symbolIconUniformMap(e,t,i,n,r,o,a,s,!0,l,!0);return c.u_texsize_icon=function(){return u},c.u_texture_icon=function(){return 1},c};var _0x3a2a53=_0x324df6(new Float32Array(16)),_0x27bfa3=new Float32Array(16);function _0x13d16f(e,t,i,n){if("translucent"===e.renderPass){var r=_0x7ad9f8.disabled,o=e.colorModeForRenderPass();i.layout.get("text-variable-anchor"),0!==i.paint.get("icon-opacity").constantOr(1)&&_0x5af0f9(e,t,i,!1,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),i.layout.get("icon-rotation-alignment"),i.layout.get("icon-pitch-alignment"),i.layout.get("icon-keep-upright"),r,o,n),0!==i.paint.get("text-opacity").constantOr(1)&&_0x5af0f9(e,t,i,!0,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.layout.get("text-keep-upright"),r,o,n)}}function _0x2772e9(e,t,i){return i.iconsInText&&t?"symbolTextAndIcon":e?"symbolSDF":"symbolIcon"}function _0x5af0f9(e,t,i,n,r,o,a,s,l,u,c,h){var d="map"===a,f="map"===s,p=d&&"point"!==i.layout.get("symbol-placement");if(p){var _,m=d&&!f&&!p,g=void 0!==i.layout.get("symbol-sort-key").constantOr(1),x=e.depthModeForSublayer(0,_0x4a9140.ReadOnly),y=i.layout.get("text-variable-anchor"),v=[],$=t.getBucket(i);if($){var b=n?$.text:$.icon;if(b&&b.segments.get().length){for(var T=b.programConfigurations.get(i.id),C=T.getAttributeLocation(),S=Object.keys(C).length,w=0;w<b.dynamicLayoutVertexBuffer.attributes.length;w++){C[b.dynamicLayoutVertexBuffer.attributes[w].name]=S++}var E=n||$.sdfIcons,P=n?$.textSizeData:$.iconSizeData,A=e.useProgram(_0x2772e9(E,n,$),T,C).cesiumProgram;_=_0x45c464(P,t.level);var L=void 0,M=[0,0],R=void 0,O=void 0,D=null,I=void 0;if(n){if(R=t.glyphAtlasTexture,O=de$y.LINEAR,L=t.glyphAtlasTexture.size,$.iconsInText){M=t.imageAtlasTexture.size,D=t.imageAtlasTexture;var F="composite"===P.kind||"camera"===P.kind;I=e.options.rotating||e.options.zooming||F?de$y.LINEAR:de$y.NEAREST}}else{var B=1!==i.layout.get("icon-size").constantOr(0)||$.iconsNeedLinear;R=t.imageAtlasTexture,O=E||e.options.rotating||e.options.zooming||B?de$y.LINEAR:de$y.NEAREST,L=t.imageAtlasTexture.size}var N=_0x2ddbe2(t,1,t.level),G=p$1d.toArray(t.viewProjection,_0x27bfa3);_0x32124d(G,f,d,e.transform,N);var z=_0x5e9fcb(G,f,d,e.transform,N),U=y&&$.hasTextData();if("none"!==i.layout.get("icon-text-fit")&&U&&$.hasIconData(),p)_0x3ca165($,G,e,n,_0x32124d(_0x3a2a53,f,d,e.transform,N),_0x5e9fcb(_0x3a2a53,f,d,e.transform,N),f,l);var V=p$1d.toArray(G,_0x27bfa3),k=_0x3a2a53,W=e.translatePosMatrix(z,t,r,o,!0),H=E&&0!==i.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(1);_.uSize=512*_.uSize/t.targetTileSize,_.uSizeT=512*_.uSizeT/t.targetTileSize;var q={},j={program:A,buffers:b,uniformMap:q=E?$.iconsInText?_0x1c04ac.symbolTextAndIconUniformMap(P.kind,_,m,f,e,V,k,W,L,M):_0x1c04ac.symbolSDFUniformMap(P.kind,_,m,f,e,V,k,W,n,L,!0):_0x1c04ac.symbolIconUniformMap(P.kind,_,m,f,e,V,k,W,n,L),atlasTexture:R,atlasTextureIcon:D,atlasInterpolation:O,atlasInterpolationIcon:I,isSDF:E,hasHalo:H};if(g){w=0;for(var X=b.segments.get();w<X.length;w+=1){var Y=X[w];v.push({segments:new _0x1e8367([Y]),sortKey:Y.sortKey,state:j})}}else v.push({segments:b.segments,sortKey:0,state:j});g&&v.sort((function(e,t){return e.sortKey-t.sortKey}));for(var Z=0,K=v;Z<K.length;Z+=1){var Q=K[Z],J=Q.state;if(J.atlasTexture.bind(J.atlasInterpolation,de$y.CLAMP_TO_EDGE),q.u_texture=function(){return J.atlasTexture.cesiumTexture},J.atlasTextureIcon&&(J.atlasTextureIcon.bind(J.atlasInterpolationIcon,de$y.CLAMP_TO_EDGE),q.u_texture_icon=function(){return J.atlasInterpolationIcon.cesiumTexture}),J.isSDF){q=J.uniformMap;J.hasHalo&&(q.u_is_halo=function(){return 1},_0x32bb51(J.buffers,Q.segments,i,e,J.program,x,u,c,q,h.passState,C)),q.u_is_halo=function(){return 0}}_0x32bb51(J.buffers,Q.segments,i,e,J.program,x,u,c,J.uniformMap,h.passState,C)}}}}else t._MVTLabel.drawLayerSymbols(t,i,n)}function _0x32bb51(e,t,i,n,r,o,a,s,l,u,c){var h=e.programConfigurations.get(i.id),d=r.allUniforms;l=h.getUniformMaps(d,i.paint,l);for(var f=h.getPaintVertexBuffers(),p=0,_=t.get();p<_.length;p+=1){var m=_[p],g=(m.drawCommands||(m.drawCommands={}))[i.id];if(!g){g=new i$$({cull:!1,primitiveType:de$y.TRIANGLES,count:3*m.primitiveLength,offset:3*m.primitiveOffset}),m.drawCommands[i.id]=g;for(var x=m.cesiumVaos||(m.cesiumVaos={}),y=[],v=0;v<e.layoutVertexBuffer.attributes.length;v++){var $=e.layoutVertexBuffer.attributes[v],b=_0x42145e.mbxAttributeToCesiumVertexArrtribute($,e.layoutVertexBuffer,c[$.name],m.vertexOffset);y.push(b)}for(v=0;v<e.dynamicLayoutVertexBuffer.attributes.length;v++){$=e.dynamicLayoutVertexBuffer.attributes[v],b=_0x42145e.mbxAttributeToCesiumVertexArrtribute($,e.dynamicLayoutVertexBuffer,c[$.name],m.vertexOffset);y.push(b)}for(var T=0;T<f.length;T++)for(var C=f[T],S=0;S<C.attributes.length;S++){$=C.attributes[S],b=_0x42145e.mbxAttributeToCesiumVertexArrtribute($,C,c[$.name],m.vertexOffset);y.push(b)}var w=x[i.id]||(x[i.id]=new c$13({context:n.cesiumContext,attributes:y,indexBuffer:e.indexBuffer}));g.vertexArray=w}l.u_depthRange=function(){return 1-o.range[0]},g.uniformMap=l,g.renderState=_0x42145e.toRenderState(s,o,_0x14ded5.disabled),g.shaderProgram=r,g.execute(n.cesiumContext,u)}}function _0x324df6(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}var _0x2c9f95=(_0x303666=!0,function(e,t){var i=_0x303666?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x303666=!1,i}),_0x1a3163=_0x2c9f95(void 0,(function(){return _0x1a3163.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a3163).search("(((.+)+)+)+$")})),_0x303666;_0x1a3163();var _0x2be876=(_0x874b62=!0,function(e,t){var i=_0x874b62?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x874b62=!1,i}),_0x3896c6=_0x2be876(void 0,(function(){return _0x3896c6.toString().search("(((.+)+)+)+$").toString().constructor(_0x3896c6).search("(((.+)+)+)+$")})),_0x874b62;_0x3896c6();var _0x444986="\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n",_0xb56ce9=(_0x3d651d=!0,function(e,t){var i=_0x3d651d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3d651d=!1,i}),_0x3979a0=_0xb56ce9(void 0,(function(){return _0x3979a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x3979a0).search("(((.+)+)+)+$")})),_0x3d651d;_0x3979a0();var _0x2c690e="\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main() {\n gl_FragColor = u_color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x191425=(_0x437ec3=!0,function(e,t){var i=_0x437ec3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x437ec3=!1,i}),_0x10add8=_0x191425(void 0,(function(){return _0x10add8.toString().search("(((.+)+)+)+$").toString().constructor(_0x10add8).search("(((.+)+)+)+$")})),_0x437ec3;_0x10add8();var _0x1303ea="\nuniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n",_0xee945=(_0x4f190d=!0,function(e,t){var i=_0x4f190d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f190d=!1,i}),_0x175a5d=_0xee945(void 0,(function(){return _0x175a5d.toString().search("(((.+)+)+)+$").toString().constructor(_0x175a5d).search("(((.+)+)+)+$")})),_0x4f190d;_0x175a5d();var _0x4754b3="\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x2f0f54=(_0x52ddbc=!0,function(e,t){var i=_0x52ddbc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x52ddbc=!1,i}),_0xc573a5=_0x2f0f54(void 0,(function(){return _0xc573a5.toString().search("(((.+)+)+)+$").toString().constructor(_0xc573a5).search("(((.+)+)+)+$")})),_0x52ddbc;_0xc573a5();var _0x359195="\nattribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\nattribute vec2 a_shift;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = clamp(\n 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n 0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\n 4.0);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n gl_Position.xy += (a_extrude + a_shift) * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n}\n",_0x1b6472=(_0x15dc99=!0,function(e,t){var i=_0x15dc99?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x15dc99=!1,i}),_0x1726cb=_0x1b6472(void 0,(function(){return _0x1726cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x1726cb).search("(((.+)+)+)+$")})),_0x15dc99;_0x1726cb();var _0x3eaba3="\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n\n float alpha = 0.5;\n\n // Red = collision, hide label\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n // Blue = no collision, label is showing\n if (v_placed > 0.5) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n gl_FragColor *= .1;\n }\n}\n",_0x2899dd=(_0x4307c1=!0,function(e,t){var i=_0x4307c1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4307c1=!1,i}),_0x268267=_0x2899dd(void 0,(function(){return _0x268267.toString().search("(((.+)+)+)+$").toString().constructor(_0x268267).search("(((.+)+)+)+$")})),_0x4307c1;_0x268267();var _0x2bc406="\nattribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\n\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = clamp(\n 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n 0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\n 4.0);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n\n highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\n gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\n\n v_extrude = a_extrude * padding_factor;\n v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\n}\n",_0x44f8bc=(_0x40bcc4=!0,function(e,t){var i=_0x40bcc4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40bcc4=!1,i}),_0x40fb0a=_0x44f8bc(void 0,(function(){return _0x40fb0a.toString().search("(((.+)+)+)+$").toString().constructor(_0x40fb0a).search("(((.+)+)+)+$")})),_0x40bcc4;_0x40fb0a();var _0x500184="\nuniform float u_overscale_factor;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n float alpha = 0.5;\n\n // Red = collision, hide label\n vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n // Blue = no collision, label is showing\n if (v_placed > 0.5) {\n color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n color *= .2;\n }\n\n float extrude_scale_length = length(v_extrude_scale);\n float extrude_length = length(v_extrude) * extrude_scale_length;\n float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor;\n float radius = v_radius * extrude_scale_length;\n\n float distance_to_edge = abs(extrude_length - radius);\n float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\n\n gl_FragColor = opacity_t * color;\n}\n",_0x216d83=(_0x22c31e=!0,function(e,t){var i=_0x22c31e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x22c31e=!1,i}),_0x30f3a0=_0x216d83(void 0,(function(){return _0x30f3a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x30f3a0).search("(((.+)+)+)+$")})),_0x22c31e;_0x30f3a0();var _0x3cca03="uniform mat4 u_matrix;\n uniform bool u_scale_with_map;\n uniform bool u_pitch_with_map;\n uniform vec2 u_extrude_scale;\n uniform lowp float u_device_pixel_ratio;\n uniform highp float u_camera_to_center_distance;\n\n attribute vec2 a_pos;\n\n varying vec3 v_data;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\n void main(void) {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec2 circle_center = floor(a_pos * 0.5);\n\n vec2 corner_position = circle_center;\n \n corner_position += extrude * (radius + stroke_width) * 16.0;\n gl_Position = u_matrix * vec4(corner_position, 0.0, 1.0);\n \n // if (u_pitch_with_map) {\n // vec2 corner_position = circle_center;\n // if (u_scale_with_map) {\n // corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\n // } else {\n // // Pitching the circle with the map effectively scales it with the map\n // // To counteract the effect for pitch-scale: viewport, we rescale the\n // // whole circle based on the pitch scaling effect at its central point\n // vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\n // corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\n // }\n\n // gl_Position = u_matrix * vec4(circle_center, 0, 1);\n // } else {\n // gl_Position = u_matrix * vec4(circle_center, 0, 1);\n\n // if (u_scale_with_map) {\n // gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\n // } else {\n // gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\n // }\n // }\n\n // This is a minimum blur distance that serves as a faux-antialiasing for\n // the circle. since blur is a ratio of the circle's size and the intent is\n // to keep the blur at roughly 1px, the two are inversely related.\n lowp float antialiasblur = 1.0 / u_device_pixel_ratio / (radius + stroke_width);\n\n v_data = vec3(extrude.x, extrude.y, antialiasblur);\n }\n",_0x4aca20=(_0x5a8f80=!0,function(e,t){var i=_0x5a8f80?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a8f80=!1,i}),_0x135e5b=_0x4aca20(void 0,(function(){return _0x135e5b.toString().search("(((.+)+)+)+$").toString().constructor(_0x135e5b).search("(((.+)+)+)+$")})),_0x5a8f80;_0x135e5b();var _0x3ed702="varying vec3 v_data;\nuniform float u_mapbox_alpha;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n vec2 extrude = v_data.xy;\n float extrude_length = length(extrude);\n\n lowp float antialiasblur = v_data.z;\n float antialiased_blur = -max(blur, antialiasblur);\n\n float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\n\n float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\n antialiased_blur,\n 0.0,\n extrude_length - radius * 16.0 / (radius * 16.0 + stroke_width * 16.0)\n );\n\n gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t) * u_mapbox_alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x4f5e0f=(_0x2915de=!0,function(e,t){var i=_0x2915de?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2915de=!1,i}),_0x298c31=_0x4f5e0f(void 0,(function(){return _0x298c31.toString().search("(((.+)+)+)+$").toString().constructor(_0x298c31).search("(((.+)+)+)+$")})),_0x2915de;_0x298c31();var _0x5efcb0="\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n",_0x54b170=(_0x5ecf4a=!0,function(e,t){var i=_0x5ecf4a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ecf4a=!1,i}),_0x48d869=_0x54b170(void 0,(function(){return _0x48d869.toString().search("(((.+)+)+)+$").toString().constructor(_0x48d869).search("(((.+)+)+)+$")})),_0x5ecf4a;_0x48d869();var _0x11df66="\nvoid main() {\n gl_FragColor = vec4(1.0);\n}\n",_0x5cf356=(_0x129098=!0,function(e,t){var i=_0x129098?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x129098=!1,i}),_0x41b5c=_0x5cf356(void 0,(function(){return _0x41b5c.toString().search("(((.+)+)+)+$").toString().constructor(_0x41b5c).search("(((.+)+)+)+$")})),_0x129098;_0x41b5c();var _0xbbc853="\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n",_0x1fd143=(_0x299f77=!0,function(e,t){var i=_0x299f77?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x299f77=!1,i}),_0x2284c7=_0x1fd143(void 0,(function(){return _0x2284c7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2284c7).search("(((.+)+)+)+$")})),_0x299f77;_0x2284c7();var _0x2b8ca3="\nuniform highp vec4 u_color;\n\nvoid main() {\n gl_FragColor = u_color;\n}\n",_0xf469d5=(_0x3e41be=!0,function(e,t){var i=_0x3e41be?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3e41be=!1,i}),_0x1c48f0=_0xf469d5(void 0,(function(){return _0x1c48f0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c48f0).search("(((.+)+)+)+$")})),_0x3e41be;_0x1c48f0();var _0x13f02c="\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n uniform mat4 u_matrix;\n uniform float u_depthRange;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\n gl_Position = u_matrix * vec4(float(a_pos.x), float(a_pos.y), u_depthRange, 1);\n }\n",_0x20fc3c=(_0x30502e=!0,function(e,t){var i=_0x30502e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30502e=!1,i}),_0x37b0a0=_0x20fc3c(void 0,(function(){return _0x37b0a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x37b0a0).search("(((.+)+)+)+$")})),_0x30502e;_0x37b0a0();var _0x3e9c32="#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n gl_FragColor = color * opacity;\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x54c62b=(_0x5e10c0=!0,function(e,t){var i=_0x5e10c0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e10c0=!1,i}),_0x209442=_0x54c62b(void 0,(function(){return _0x209442.toString().search("(((.+)+)+)+$").toString().constructor(_0x209442).search("(((.+)+)+)+$")})),_0x5e10c0;_0x209442();var _0x1bc3a8="\nuniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\nuniform float u_vertical_gradient;\nuniform lowp float u_opacity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n #pragma mapbox: initialize highp float base\n #pragma mapbox: initialize highp float height\n #pragma mapbox: initialize highp vec4 color\n\n vec3 normal = a_normal_ed.xyz;\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(normal.x, 2.0);\n\n gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\n\n // Relative luminance (how dark/bright is the surface color?)\n float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\n\n v_color = vec4(0.0, 0.0, 0.0, 1.0);\n\n // Add slight ambient lighting so no extrusions are totally black\n vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\n color += ambientlight;\n\n // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\n float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);\n\n // Adjust directional so that\n // the range of values for highlight/shading is narrower\n // with lower light intensity\n // and with lighter/brighter surface colors\n directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\n\n // Add gradient along z axis of side surfaces\n if (normal.y != 0.0) {\n // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient,\n // and otherwise calculates the gradient based on base + height\n directional *= (\n (1.0 - u_vertical_gradient) +\n (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0)));\n }\n\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n // with lower bounds adjusted to hue of light\n // so that shading is tinted with the complementary (opposite) color to the light color\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n v_color *= u_opacity;\n}\n",_0x4d01bb=(_0x2883a9=!0,function(e,t){var i=_0x2883a9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2883a9=!1,i}),_0x388652=_0x4d01bb(void 0,(function(){return _0x388652.toString().search("(((.+)+)+)+$").toString().constructor(_0x388652).search("(((.+)+)+)+$")})),_0x2883a9;_0x388652();var _0xe7dc5e="\nvarying vec4 v_color;\n\nvoid main() {\n gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x522f07=(_0x52191e=!0,function(e,t){var i=_0x52191e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x52191e=!1,i}),_0x33eac6=_0x522f07(void 0,(function(){return _0x33eac6.toString().search("(((.+)+)+)+$").toString().constructor(_0x33eac6).search("(((.+)+)+)+$")})),_0x52191e;_0x33eac6();var _0xeadf54="\nuniform mat4 u_matrix;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_height_factor;\nuniform vec4 u_scale;\nuniform float u_vertical_gradient;\nuniform lowp float u_opacity;\n\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec3 normal = a_normal_ed.xyz;\n float edgedistance = a_normal_ed.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(normal.x, 2.0);\n float z = t > 0.0 ? height : base;\n\n gl_Position = u_matrix * vec4(a_pos, z, 1);\n\n vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0\n ? a_pos // extrusion top\n : vec2(edgedistance, z * u_height_factor); // extrusion side\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, pos);\n\n v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\n float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);\n directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\n\n if (normal.y != 0.0) {\n // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient,\n // and otherwise calculates the gradient based on base + height\n directional *= (\n (1.0 - u_vertical_gradient) +\n (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0)));\n }\n\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n v_lighting *= u_opacity;\n}\n",_0x441aec=(_0x64d099=!0,function(e,t){var i=_0x64d099?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x64d099=!1,i}),_0x550c25=_0x441aec(void 0,(function(){return _0x550c25.toString().search("(((.+)+)+)+$").toString().constructor(_0x550c25).search("(((.+)+)+)+$")})),_0x64d099;_0x550c25();var _0x517460="\nuniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n vec4 mixedColor = mix(color1, color2, u_fade);\n\n gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x43b54d=(_0x51f838=!0,function(e,t){var i=_0x51f838?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51f838=!1,i}),_0x5b6229=_0x43b54d(void 0,(function(){return _0x5b6229.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b6229).search("(((.+)+)+)+$")})),_0x51f838;_0x5b6229();var _0x2f636c="\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n uniform mat4 u_matrix;\n uniform vec2 u_world;\n uniform float u_depthRange;\n varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n void main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n gl_Position = u_matrix * vec4(vec2(a_pos), u_depthRange, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n }\n",_0x27233f=(_0x441f7a=!0,function(e,t){var i=_0x441f7a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x441f7a=!1,i}),_0xb5b95f=_0x27233f(void 0,(function(){return _0xb5b95f.toString().search("(((.+)+)+)+$").toString().constructor(_0xb5b95f).search("(((.+)+)+)+$")})),_0x441f7a;_0xb5b95f();var _0x2afea5="varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n void main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x382558=(_0x233585=!0,function(e,t){var i=_0x233585?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x233585=!1,i}),_0x17da4d=_0x382558(void 0,(function(){return _0x17da4d.toString().search("(((.+)+)+)+$").toString().constructor(_0x17da4d).search("(((.+)+)+)+$")})),_0x233585;_0x17da4d();var _0x33b767="uniform mat4 u_matrix;\n uniform vec2 u_pixel_coord_upper;\n uniform vec2 u_pixel_coord_lower;\n uniform vec4 u_scale;\n uniform float u_depthRange;\n\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = vec2(pattern_from.xy);\n vec2 pattern_br_a = vec2(pattern_from.zw);\n vec2 pattern_tl_b = vec2(pattern_to.xy);\n vec2 pattern_br_b = vec2(pattern_to.zw);\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n gl_Position = u_matrix * vec4(vec2(a_pos), u_depthRange, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileZoomRatio, vec2(a_pos));\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileZoomRatio, vec2(a_pos));\n }\n",_0x39d68d=(_0xce6505=!0,function(e,t){var i=_0xce6505?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xce6505=!1,i}),_0x43b45a=_0x39d68d(void 0,(function(){return _0x43b45a.toString().search("(((.+)+)+)+$").toString().constructor(_0x43b45a).search("(((.+)+)+)+$")})),_0xce6505;_0x43b45a();var _0x25229e="uniform vec2 u_texsize;\n uniform float u_fade;\n\n uniform sampler2D u_image;\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_fade) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x102a7e=(_0x3fd86f=!0,function(e,t){var i=_0x3fd86f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3fd86f=!1,i}),_0x4c2c14=_0x102a7e(void 0,(function(){return _0x4c2c14.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c2c14).search("(((.+)+)+)+$")})),_0x3fd86f;_0x4c2c14();var _0x4faa5e="uniform mat4 u_matrix;\n uniform vec2 u_world;\n uniform vec2 u_pixel_coord_upper;\n uniform vec2 u_pixel_coord_lower;\n uniform vec4 u_scale;\n uniform float u_depthRange;\n\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n varying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n gl_Position = u_matrix * vec4(vec2(a_pos), u_depthRange, 1);\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, vec2(a_pos));\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, vec2(a_pos));\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n }\n",_0x30c2d4=(_0x1974b1=!0,function(e,t){var i=_0x1974b1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1974b1=!1,i}),_0x388c39=_0x30c2d4(void 0,(function(){return _0x388c39.toString().search("(((.+)+)+)+$").toString().constructor(_0x388c39).search("(((.+)+)+)+$")})),_0x1974b1;_0x388c39();var _0x27c613="uniform vec2 u_texsize;\n uniform sampler2D u_image;\n uniform float u_fade;\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n varying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = mix(color1, color2, u_fade) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x154d28=(_0x5020fe=!0,function(e,t){var i=_0x5020fe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5020fe=!1,i}),_0x557059=_0x154d28(void 0,(function(){return _0x557059.toString().search("(((.+)+)+)+$").toString().constructor(_0x557059).search("(((.+)+)+)+$")})),_0x5020fe;_0x557059();var _0x28d69d="\nuniform mat4 u_matrix;\nuniform float u_extrude_scale;\nuniform float u_opacity;\nuniform float u_intensity;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_extrude;\n\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\n\n// Effective \"0\" in the kernel density texture to adjust the kernel size to;\n// this empirically chosen number minimizes artifacts on overlapping kernels\n// for typical heatmap cases (assuming clustered source)\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main(void) {\n #pragma mapbox: initialize highp float weight\n #pragma mapbox: initialize mediump float radius\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // This 'extrude' comes in ranging from [-1, -1], to [1, 1]. We'll use\n // it to produce the vertices of a square mesh framing the point feature\n // we're adding to the kernel density texture. We'll also pass it as\n // a varying, so that the fragment shader can determine the distance of\n // each fragment from the point feature.\n // Before we do so, we need to scale it up sufficiently so that the\n // kernel falls effectively to zero at the edge of the mesh.\n // That is, we want to know S such that\n // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\n // Which solves to:\n // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\n float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\n\n // Pass the varying in units of radius\n v_extrude = S * unscaled_extrude;\n\n // Scale by radius and the zoom-based scale factor to produce actual\n // mesh position\n vec2 extrude = v_extrude * radius * u_extrude_scale;\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\n\n gl_Position = u_matrix * pos;\n}\n",_0x5a1374=(_0x5695af=!0,function(e,t){var i=_0x5695af?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5695af=!1,i}),_0x39b599=_0x5a1374(void 0,(function(){return _0x39b599.toString().search("(((.+)+)+)+$").toString().constructor(_0x39b599).search("(((.+)+)+)+$")})),_0x5695af;_0x39b599();var _0x259751="\nuniform highp float u_intensity;\n\nvarying vec2 v_extrude;\n\n#pragma mapbox: define highp float weight\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main() {\n #pragma mapbox: initialize highp float weight\n\n // Kernel density estimation with a Gaussian kernel of size 5x5\n float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\n float val = weight * u_intensity * GAUSS_COEF * exp(d);\n\n gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x1069d8=(_0x4453ed=!0,function(e,t){var i=_0x4453ed?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4453ed=!1,i}),_0x39bd4a=_0x1069d8(void 0,(function(){return _0x39bd4a.toString().search("(((.+)+)+)+$").toString().constructor(_0x39bd4a).search("(((.+)+)+)+$")})),_0x4453ed;_0x39bd4a();var _0x1e1a3d="\nuniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n v_pos.x = a_pos.x;\n v_pos.y = 1.0 - a_pos.y;\n}\n",_0x5a6dbb=(_0xb594f3=!0,function(e,t){var i=_0xb594f3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb594f3=!1,i}),_0x25cb2c=_0x5a6dbb(void 0,(function(){return _0x25cb2c.toString().search("(((.+)+)+)+$").toString().constructor(_0x25cb2c).search("(((.+)+)+)+$")})),_0xb594f3;_0x25cb2c();var _0x945930="\nuniform sampler2D u_image;\nuniform sampler2D u_color_ramp;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n float t = texture2D(u_image, v_pos).r;\n vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\n gl_FragColor = color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(0.0);\n#endif\n}\n",_0x3aa5c5=(_0xa540a=!0,function(e,t){var i=_0xa540a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa540a=!1,i}),_0x505a62=_0x3aa5c5(void 0,(function(){return _0x505a62.toString().search("(((.+)+)+)+$").toString().constructor(_0x505a62).search("(((.+)+)+)+$")})),_0xa540a;_0x505a62();var _0x5d667b="\nuniform mat4 u_matrix;\nuniform vec2 u_dimension;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n highp vec2 epsilon = 1.0 / u_dimension;\n float scale = (u_dimension.x - 2.0) / u_dimension.x;\n v_pos = (a_texture_pos / 8192.0) * scale + epsilon;\n}\n",_0x31fb74=(_0x448062=!0,function(e,t){var i=_0x448062?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x448062=!1,i}),_0x51c46d=_0x31fb74(void 0,(function(){return _0x51c46d.toString().search("(((.+)+)+)+$").toString().constructor(_0x51c46d).search("(((.+)+)+)+$")})),_0x448062;_0x51c46d();var _0x417ed7="\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D u_image;\nvarying vec2 v_pos;\nuniform vec2 u_dimension;\nuniform float u_zoom;\nuniform float u_maxzoom;\nuniform vec4 u_unpack;\n\nfloat getElevation(vec2 coord, float bias) {\n // Convert encoded elevation value to meters\n vec4 data = texture2D(u_image, coord) * 255.0;\n data.a = -1.0;\n return dot(data, u_unpack) / 4.0;\n}\n\nvoid main() {\n vec2 epsilon = 1.0 / u_dimension;\n\n // queried pixels:\n // +-----------+\n // | | | |\n // | a | b | c |\n // | | | |\n // +-----------+\n // | | | |\n // | d | e | f |\n // | | | |\n // +-----------+\n // | | | |\n // | g | h | i |\n // | | | |\n // +-----------+\n\n float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\n float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\n float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\n float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\n float e = getElevation(v_pos, 0.0);\n float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\n float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\n float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\n float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\n\n // here we divide the x and y slopes by 8 * pixel size\n // where pixel size (aka meters/pixel) is:\n // circumference of the world / (pixels per tile * number of tiles)\n // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\n // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\n // we want to vertically exaggerate the hillshading though, because otherwise\n // it is barely noticeable at low zooms. to do this, we multiply this by some\n // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value\n // Here we use a=0.3 which works out to the expression below. see \n // nickidlugash's awesome breakdown for more info\n float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;\n\n vec2 deriv = vec2(\n (c + f + f + i) - (a + d + d + g),\n (g + h + h + i) - (a + b + b + c)\n ) / pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom);\n\n gl_FragColor = clamp(vec4(\n deriv.x / 2.0 + 0.5,\n deriv.y / 2.0 + 0.5,\n 1.0,\n 1.0), 0.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x405919=(_0x58f8a4=!0,function(e,t){var i=_0x58f8a4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x58f8a4=!1,i}),_0x374232=_0x405919(void 0,(function(){return _0x374232.toString().search("(((.+)+)+)+$").toString().constructor(_0x374232).search("(((.+)+)+)+$")})),_0x58f8a4;_0x374232();var _0x383025="\nuniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = a_texture_pos / 8192.0;\n}\n",_0x2f6903=(_0x57508a=!0,function(e,t){var i=_0x57508a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57508a=!1,i}),_0x3b837e=_0x2f6903(void 0,(function(){return _0x3b837e.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b837e).search("(((.+)+)+)+$")})),_0x57508a;_0x3b837e();var _0x59637f="\nuniform sampler2D u_image;\nvarying vec2 v_pos;\n\nuniform vec2 u_latrange;\nuniform vec2 u_light;\nuniform vec4 u_shadow;\nuniform vec4 u_highlight;\nuniform vec4 u_accent;\n\n#define PI 3.141592653589793\n\nvoid main() {\n vec4 pixel = texture2D(u_image, v_pos);\n\n vec2 deriv = ((pixel.rg * 2.0) - 1.0);\n\n // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\n // to account for mercator projection distortion. see #4807 for details\n float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\n // We also multiply the slope by an arbitrary z-factor of 1.25\n float slope = atan(1.25 * length(deriv) / scaleFactor);\n float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0);\n\n float intensity = u_light.x;\n // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\n // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\n // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\n float azimuth = u_light.y + PI;\n\n // We scale the slope exponentially based on intensity, using a calculation similar to\n // the exponential interpolation function in the style spec:\n // so that higher intensity values create more opaque hillshading.\n float base = 1.875 - intensity * 1.75;\n float maxValue = 0.5 * PI;\n float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\n\n // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\n // so that the accent color's rate of change eases in while the shade color's eases out.\n float accent = cos(scaledSlope);\n // We multiply both the accent and shade color by a clamped intensity value\n // so that intensities >= 0.5 do not additionally affect the color values\n // while intensity values < 0.5 make the overall color more transparent.\n vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\n float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\n vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\n gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x5a2ceb=(_0xbec1=!0,function(e,t){var i=_0xbec1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xbec1=!1,i}),_0x3acd60=_0x5a2ceb(void 0,(function(){return _0x3acd60.toString().search("(((.+)+)+)+$").toString().constructor(_0x3acd60).search("(((.+)+)+)+$")})),_0xbec1;_0x3acd60();var _0x1a380c="// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also special normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n #define scale 0.015873016\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\n uniform mat4 u_matrix;\n uniform mediump float u_ratio;\n uniform vec2 u_units_to_pixels;\n uniform lowp float u_device_pixel_ratio;\n uniform float u_depthRange;\n\n varying vec2 v_normal;\n varying vec2 v_width2;\n varying float v_gamma_scale;\n varying highp float v_linesofar;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n\n v_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * 2.0;\n\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, u_depthRange, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n }\n",_0x2cd255=(_0x543b15=!0,function(e,t){var i=_0x543b15?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x543b15=!1,i}),_0x112cfb=_0x2cd255(void 0,(function(){return _0x112cfb.toString().search("(((.+)+)+)+$").toString().constructor(_0x112cfb).search("(((.+)+)+)+$")})),_0x543b15;_0x112cfb();var _0x3141f6="uniform lowp float u_device_pixel_ratio;\n\n varying vec2 v_width2;\n varying vec2 v_normal;\n varying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0xe1e943=(_0xd33752=!0,function(e,t){var i=_0xd33752?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd33752=!1,i}),_0x4a38d0=_0xe1e943(void 0,(function(){return _0x4a38d0.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a38d0).search("(((.+)+)+)+$")})),_0xd33752;_0x4a38d0();var _0x5a8c9b="// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also special normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n #define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n #define LINE_DISTANCE_SCALE 2.0\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\n uniform mat4 u_matrix;\n uniform mediump float u_ratio;\n uniform lowp float u_device_pixel_ratio;\n uniform vec2 u_patternscale_a;\n uniform float u_tex_y_a;\n uniform vec2 u_patternscale_b;\n uniform float u_tex_y_b;\n uniform vec2 u_units_to_pixels;\n uniform float u_depthRange;\n\n varying vec2 v_normal;\n varying vec2 v_width2;\n varying vec2 v_tex_a;\n varying vec2 v_tex_b;\n varying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n float a_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * LINE_DISTANCE_SCALE;\n\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist =outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, u_depthRange, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n #ifndef WEBGPU\n v_tex_a.y = 1.0 - v_tex_a.y;\n v_tex_b.y = 1.0 - v_tex_b.y;\n#endif\n\n v_width2 = vec2(outset, inset);\n }\n",_0x4ed1c3=(_0x29684b=!0,function(e,t){var i=_0x29684b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29684b=!1,i}),_0x14f01b=_0x4ed1c3(void 0,(function(){return _0x14f01b.toString().search("(((.+)+)+)+$").toString().constructor(_0x14f01b).search("(((.+)+)+)+$")})),_0x29684b;_0x14f01b();var _0xebc087="uniform lowp float u_device_pixel_ratio;\n uniform sampler2D u_image;\n uniform float u_sdfgamma;\n uniform float u_mix;\n uniform lowp float u_antialiasing;\n\n varying vec2 v_normal;\n varying vec2 v_width2;\n varying vec2 v_tex_a;\n varying vec2 v_tex_b;\n varying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n if(alpha > 0.1){\n alpha = max(1.0 - u_antialiasing, alpha);\n }\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x4c869e=(_0x253277=!0,function(e,t){var i=_0x253277?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x253277=!1,i}),_0x334cde=_0x4c869e(void 0,(function(){return _0x334cde.toString().search("(((.+)+)+)+$").toString().constructor(_0x334cde).search("(((.+)+)+)+$")})),_0x253277;_0x334cde();var _0x5d2796="\n// the attribute conveying progress along a line is scaled to [0, 2^15)\n#define MAX_LINE_DISTANCE 32767.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec2 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform lowp float u_device_pixel_ratio;\nuniform vec2 u_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\n\n vec2 pos = floor(a_pos_normal * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = a_pos_normal - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n}\n",_0x5ef3a3=(_0x3db86d=!0,function(e,t){var i=_0x3db86d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3db86d=!1,i}),_0x244d02=_0x5ef3a3(void 0,(function(){return _0x244d02.toString().search("(((.+)+)+)+$").toString().constructor(_0x244d02).search("(((.+)+)+)+$")})),_0x3db86d;_0x244d02();var _0x26549d="\nuniform lowp float u_device_pixel_ratio;\nuniform sampler2D u_image;\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n // For gradient lines, v_lineprogress is the ratio along the entire line,\n // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\n vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x1d100f=(_0x5b3e56=!0,function(e,t){var i=_0x5b3e56?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b3e56=!1,i}),_0x983f5f=_0x1d100f(void 0,(function(){return _0x983f5f.toString().search("(((.+)+)+)+$").toString().constructor(_0x983f5f).search("(((.+)+)+)+$")})),_0x5b3e56;_0x983f5f();var _0x2f0b1a="\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_units_to_pixels;\nuniform mediump float u_ratio;\nuniform lowp float u_device_pixel_ratio;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n float a_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * LINE_DISTANCE_SCALE;\n // float tileRatio = u_scale.y;\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_linesofar = a_linesofar;\n v_width2 = vec2(outset, inset);\n}\n",_0x327ffa=(_0xa9ed13=!0,function(e,t){var i=_0xa9ed13?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa9ed13=!1,i}),_0x17908c=_0x327ffa(void 0,(function(){return _0x17908c.toString().search("(((.+)+)+)+$").toString().constructor(_0x17908c).search("(((.+)+)+)+$")})),_0xa9ed13;_0x17908c();var _0xf358a8="\nuniform lowp float u_device_pixel_ratio;\nuniform vec2 u_texsize;\nuniform float u_fade;\nuniform mediump vec4 u_scale;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n vec2 pattern_size_a = vec2(display_size_a.x * fromScale / tileZoomRatio, display_size_a.y);\n vec2 pattern_size_b = vec2(display_size_b.x * toScale / tileZoomRatio, display_size_b.y);\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / pattern_size_b.x, 1.0);\n\n // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\n // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\n // to ensure we don't sample outside the designated symbol on the sprite sheet.\n // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\n // the texture coordinate\n float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_a.y + 2.0) / 2.0) / pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_b.y + 2.0) / 2.0) / pattern_size_b.y);\n vec2 pos_a = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, vec2(x_a, y_a));\n vec2 pos_b = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0xf21aa8=(_0x2b68d7=!0,function(e,t){var i=_0x2b68d7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b68d7=!1,i}),_0x245c5f=_0xf21aa8(void 0,(function(){return _0x245c5f.toString().search("(((.+)+)+)+$").toString().constructor(_0x245c5f).search("(((.+)+)+)+$")})),_0x2b68d7;_0x245c5f();var _0x132eff="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\nattribute ivec4 a_pixeloffset;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec4 a_pixeloffset;\n#endif\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform float u_fade_change;\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\nuniform float u_depthRange;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n vec2 a_pxoffset = vec2(a_pixeloffset.xy);\n vec2 a_minFontScale = vec2(a_pixeloffset.zw) / 256.0;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // See comments in symbol_sdf.vertex\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // See comments in symbol_sdf.vertex\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * max(a_minFontScale, fontScale) + a_pxoffset / 16.0), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n\n v_tex = a_tex / u_texsize;\n // vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n // float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n // v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n v_fade_opacity = 1.0;\n}\n",_0x2768b0=(_0xc58fb3=!0,function(e,t){var i=_0xc58fb3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc58fb3=!1,i}),_0x522fa0=_0x2768b0(void 0,(function(){return _0x522fa0.toString().search("(((.+)+)+)+$").toString().constructor(_0x522fa0).search("(((.+)+)+)+$")})),_0xc58fb3;_0x522fa0();var _0x5d1a62="\nuniform sampler2D u_texture;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n //lowp float alpha = opacity * v_fade_opacity;\n gl_FragColor = texture2D(u_texture, vec2(v_tex.x, 1.0 - v_tex.y)) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x24fc1f=(_0x2a405f=!0,function(e,t){var i=_0x2a405f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a405f=!1,i}),_0x37ca53=_0x24fc1f(void 0,(function(){return _0x37ca53.toString().search("(((.+)+)+)+$").toString().constructor(_0x37ca53).search("(((.+)+)+)+$")})),_0x2a405f;_0x37ca53();var _0x25e36e="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\nattribute ivec4 a_pixeloffset;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec4 a_pixeloffset;\n#endif\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\nuniform vec2 u_texsize;\nuniform float u_depthRange;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n vec2 a_pxoffset = vec2(a_pixeloffset.xy);\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n //vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale + a_pxoffset), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n float gamma_scale = gl_Position.w;\n\n //vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n //float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n //float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0 = a_tex / u_texsize;\n v_data1 = vec3(gamma_scale, size, 1.0);\n}\n",_0x5dacf2=(_0x3c3270=!0,function(e,t){var i=_0x3c3270?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3c3270=!1,i}),_0x5912df=_0x5dacf2(void 0,(function(){return _0x5912df.toString().search("(((.+)+)+)+$").toString().constructor(_0x5912df).search("(((.+)+)+)+$")})),_0x3c3270;_0x5912df();var _0x59e3ab="\n#define SDF_PX 8.0\n\nuniform bool u_is_halo;\nuniform sampler2D u_texture;\nuniform highp float u_gamma_scale;\nuniform lowp float u_device_pixel_ratio;\nuniform bool u_is_text;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n float EDGE_GAMMA = 0.105 / u_device_pixel_ratio;\n\n vec2 tex = v_data0.xy;\n float gamma_scale = v_data1.x;\n float size = v_data1.y;\n float fade_opacity = v_data1[2];\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n lowp vec4 color = fill_color;\n highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n lowp float buff = (256.0 - 64.0) / 256.0;\n if (u_is_halo) {\n color = halo_color;\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n buff = (6.0 - halo_width / fontScale) / SDF_PX;\n }\n\n#ifdef WEBGPU\n float dist = texture2D(u_texture, tex).r;\n#else\n float dist = texture2D(u_texture, tex).a;\n#endif\n highp float gamma_scaled = gamma * gamma_scale;\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n //gl_FragColor = color * (alpha * opacity * fade_opacity);\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x220de6=(_0x3cab7b=!0,function(e,t){var i=_0x3cab7b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3cab7b=!1,i}),_0x5cfb87=_0x220de6(void 0,(function(){return _0x5cfb87.toString().search("(((.+)+)+)+$").toString().constructor(_0x5cfb87).search("(((.+)+)+)+$")})),_0x3cab7b;_0x5cfb87();var _0x52c4e1="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\n#endif\n\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\nuniform vec2 u_texsize;\nuniform vec2 u_texsize_icon;\nuniform float u_depthRange;\n\nvarying vec4 v_data0;\nvarying vec4 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n float is_sdf = a_size[0] - 2.0 * a_size_min;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = size / 24.0;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n float gamma_scale = gl_Position.w;\n\n // vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n // float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n // float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0.xy = a_tex / u_texsize;\n v_data0.zw = a_tex / u_texsize_icon;\n //v_data1 = vec4(gamma_scale, size, interpolated_fade_opacity, is_sdf);\n v_data1 = vec4(gamma_scale, size, 1.0, is_sdf); \n}\n",_0x214f06=(_0x1bd117=!0,function(e,t){var i=_0x1bd117?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1bd117=!1,i}),_0x275bad=_0x214f06(void 0,(function(){return _0x275bad.toString().search("(((.+)+)+)+$").toString().constructor(_0x275bad).search("(((.+)+)+)+$")})),_0x1bd117;_0x275bad();var _0x438ae7="\n#define SDF_PX 8.0\n\n#define SDF 1.0\n#define ICON 0.0\n\nuniform bool u_is_halo;\nuniform sampler2D u_texture;\nuniform sampler2D u_texture_icon;\nuniform highp float u_gamma_scale;\nuniform lowp float u_device_pixel_ratio;\n\nvarying vec4 v_data0;\nvarying vec4 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n// float fade_opacity = v_data1[2];\n\n// if (v_data1.w == ICON) {\n// vec2 tex_icon = v_data0.zw;\n// lowp float alpha = opacity * fade_opacity;\n// gl_FragColor = texture2D(u_texture_icon, tex_icon) * alpha;\n\n// #ifdef OVERDRAW_INSPECTOR\n// gl_FragColor = vec4(1.0);\n// #endif\n// return;\n// }\n\n// vec2 tex = v_data0.xy;\n\n// float EDGE_GAMMA = 0.105 / u_device_pixel_ratio;\n\n// float gamma_scale = v_data1.x;\n// float size = v_data1.y;\n\n// float fontScale = size / 24.0;\n\n// lowp vec4 color = fill_color;\n// highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n// lowp float buff = (256.0 - 64.0) / 256.0;\n// if (u_is_halo) {\n// color = halo_color;\n// gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n// buff = (6.0 - halo_width / fontScale) / SDF_PX;\n// }\n\n// lowp float dist = texture2D(u_texture, tex).a;\n// highp float gamma_scaled = gamma * gamma_scale;\n// highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n// gl_FragColor = color * (alpha * opacity * fade_opacity);\n\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x164064=(_0x3a0033=!0,function(e,t){var i=_0x3a0033?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a0033=!1,i}),_0x58695b=_0x164064(void 0,(function(){return _0x58695b.toString().search("(((.+)+)+)+$").toString().constructor(_0x58695b).search("(((.+)+)+)+$")})),_0x3a0033;_0x58695b();var _0x1b5d6a="\n#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n int packedIntValue = int(packedValue);\n int v0 = packedIntValue / 256;\n return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec2 unpack_opacity(const float packedOpacity) {\n int intOpacity = int(packedOpacity) / 2;\n return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\n}\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n// floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n return vec4(\n unpack_float(encodedColor[0]) / 255.0,\n unpack_float(encodedColor[1]) / 255.0\n );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_color(const vec4 packedColors, const float t) {\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n",_0x5bb18e=(_0x5b14d9=!0,function(e,t){var i=_0x5b14d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b14d9=!1,i}),_0x4cf219=_0x5bb18e(void 0,(function(){return _0x4cf219.toString().search("(((.+)+)+)+$").toString().constructor(_0x4cf219).search("(((.+)+)+)+$")})),_0x5b14d9;_0x4cf219();var _0x3c7324="\n#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n",_0x4e054d=(_0x395baf=!0,function(e,t){var i=_0x395baf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x395baf=!1,i}),_0x498396=_0x4e054d(void 0,(function(){return _0x498396.toString().search("(((.+)+)+)+$").toString().constructor(_0x498396).search("(((.+)+)+)+$")})),_0x395baf;_0x498396();var _0x4cc805="\nuniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n // We are using Int16 for texture position coordinates to give us enough precision for\n // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n // as an arbitrarily high number to preserve adequate precision when rendering.\n // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n // so math for modifying either is consistent.\n v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n",_0x19308f=(_0xaf8521=!0,function(e,t){var i=_0xaf8521?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xaf8521=!1,i}),_0x1a8f40=_0x19308f(void 0,(function(){return _0x1a8f40.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a8f40).search("(((.+)+)+)+$")})),_0xaf8521;_0x1a8f40();var _0x17b5bc="\nuniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n if (color0.a > 0.0) {\n color0.rgb = color0.rgb / color0.a;\n }\n if (color1.a > 0.0) {\n color1.rgb = color1.rgb / color1.a;\n }\n vec4 color = mix(color0, color1, u_fade_t);\n color.a *= u_opacity;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x59d184=(_0xab264a=!0,function(e,t){var i=_0xab264a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xab264a=!1,i}),_0x2f9e04=_0x59d184(void 0,(function(){return _0x2f9e04.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f9e04).search("(((.+)+)+)+$")})),_0xab264a;_0x2f9e04(),_0x2c23ed([{name:"a_pos",type:"Int16",components:2}]);var _0x94ffbf=_0x39d2e1(_0x3c7324,_0x1b5d6a),_0xda7a9a=_0x39d2e1(_0x2c690e,_0x444986),_0x249cc1=_0x39d2e1(_0x4754b3,_0x1303ea),_0x10e65c=_0x39d2e1(_0x3ed702,_0x3cca03),_0x5f2183=_0x39d2e1(_0x11df66,_0x5efcb0),_0x4097cd=_0x39d2e1(_0x259751,_0x28d69d),_0x13f5c5=_0x39d2e1(_0x945930,_0x1e1a3d),_0x2fcd71=_0x39d2e1(_0x3eaba3,_0x359195),_0x3d7132=_0x39d2e1(_0x500184,_0x2bc406),_0x106f83=_0x39d2e1(_0x2b8ca3,_0xbbc853),_0x252baa=_0x39d2e1(_0x3e9c32,_0x13f02c),_0x40f8b7=_0x39d2e1(_0x2afea5,_0x2f636c),_0xe56400=_0x39d2e1(_0x27c613,_0x4faa5e),_0x101022=_0x39d2e1(_0x25229e,_0x33b767),_0x47b03f=_0x39d2e1(_0xe7dc5e,_0x1bc3a8),_0xb0b111=_0x39d2e1(_0x517460,_0xeadf54),_0xf72395=_0x39d2e1(_0x417ed7,_0x5d667b),_0x4da50c=_0x39d2e1(_0x59637f,_0x383025),_0x366a41=_0x39d2e1(_0x3141f6,_0x1a380c),_0x535500=_0x39d2e1(_0x26549d,_0x5d2796),_0x274d09=_0x39d2e1(_0xf358a8,_0x2f0b1a),_0x22c7d7=_0x39d2e1(_0xebc087,_0x5a8c9b),_0x4d57f1=_0x39d2e1(_0x17b5bc,_0x4cc805),_0x40678a=_0x39d2e1(_0x5d1a62,_0x132eff),_0x13077c=_0x39d2e1(_0x59e3ab,_0x25e36e),_0x4e001c=_0x39d2e1(_0x438ae7,_0x52c4e1);function _0x39d2e1(e,t){var i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:e=e.replace(i,(function(e,t,i,r,o){return n[o]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+i+" "+r+" "+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n"})),vertexSource:t=t.replace(i,(function(e,t,i,r,o){var a="float"===r?"vec2":"vec4",s=o.match(/color/)?"color":a;return n[o]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\nvarying "+i+" "+r+" "+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = a_"+o+";\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n"}))}}var _0xc7a06=Object.freeze({__proto__:null,prelude:_0x94ffbf,background:_0xda7a9a,backgroundPattern:_0x249cc1,circle:_0x10e65c,clippingMask:_0x5f2183,heatmap:_0x4097cd,heatmapTexture:_0x13f5c5,collisionBox:_0x2fcd71,collisionCircle:_0x3d7132,debug:_0x106f83,fill:_0x252baa,fillOutline:_0x40f8b7,fillOutlinePattern:_0xe56400,fillPattern:_0x101022,fillExtrusion:_0x47b03f,fillExtrusionPattern:_0xb0b111,hillshadePrepare:_0xf72395,hillshade:_0x4da50c,line:_0x366a41,lineGradient:_0x535500,linePattern:_0x274d09,lineSDF:_0x22c7d7,raster:_0x4d57f1,symbolIcon:_0x40678a,symbolSDF:_0x13077c,symbolTextAndIcon:_0x4e001c}),_0x183689=(_0x2f5d66=!0,function(e,t){var i=_0x2f5d66?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f5d66=!1,i}),_0x3b948b=_0x183689(void 0,(function(){return _0x3b948b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b948b).search("(((.+)+)+)+$")})),_0x2f5d66;_0x3b948b();var _0x3a6e82=(_0x12a61f=!0,function(e,t){var i=_0x12a61f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12a61f=!1,i}),_0x434206=_0x3a6e82(void 0,(function(){return _0x434206.toString().search("(((.+)+)+)+$").toString().constructor(_0x434206).search("(((.+)+)+)+$")})),_0x12a61f;_0x434206();var _0x2f0fc8={clippingMaskUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix)}},clippingMaskUniformValues:function(e){return{u_matrix:e}}},_0x46945f=(_0x1ca51f=!0,function(e,t){var i=_0x1ca51f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ca51f=!1,i}),_0xdbd80d=_0x46945f(void 0,(function(){return _0xdbd80d.toString().search("(((.+)+)+)+$").toString().constructor(_0xdbd80d).search("(((.+)+)+)+$")})),_0x1ca51f;_0xdbd80d();var _0x4e49d6={backgroundUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_opacity:new _0x3d809b.Uniform1f(e,t.u_opacity),u_color:new _0x3d809b.UniformColor(e,t.u_color)}},backgroundPatternUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_opacity:new _0x3d809b.Uniform1f(e,t.u_opacity),u_image:new _0x3d809b.Uniform1i(e,t.u_image),u_pattern_tl_a:new _0x3d809b.Uniform2f(e,t.u_pattern_tl_a),u_pattern_br_a:new _0x3d809b.Uniform2f(e,t.u_pattern_br_a),u_pattern_tl_b:new _0x3d809b.Uniform2f(e,t.u_pattern_tl_b),u_pattern_br_b:new _0x3d809b.Uniform2f(e,t.u_pattern_br_b),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_mix:new _0x3d809b.Uniform1f(e,t.u_mix),u_pattern_size_a:new _0x3d809b.Uniform2f(e,t.u_pattern_size_a),u_pattern_size_b:new _0x3d809b.Uniform2f(e,t.u_pattern_size_b),u_scale_a:new _0x3d809b.Uniform1f(e,t.u_scale_a),u_scale_b:new _0x3d809b.Uniform1f(e,t.u_scale_b),u_pixel_coord_upper:new _0x3d809b.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x3d809b.Uniform2f(e,t.u_pixel_coord_lower),u_tile_units_to_pixels:new _0x3d809b.Uniform1f(e,t.u_tile_units_to_pixels)}},backgroundUniformValues:function(e,t,i){return{u_matrix:e,u_opacity:t,u_color:i}},backgroundPatternUniformValues:function(e,t,i,n,r,o){return extend$1(bgPatternUniformValues(n,o,i,r),{u_matrix:e,u_opacity:t})}},_0x2666d5=(_0x438993=!0,function(e,t){var i=_0x438993?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x438993=!1,i}),_0x2e985c=_0x2666d5(void 0,(function(){return _0x2e985c.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e985c).search("(((.+)+)+)+$")})),_0x438993;_0x2e985c(),_0x33b7f1.fillUniforms,_0x33b7f1.fillPatternUniforms,_0x33b7f1.fillOutlineUniforms,_0x33b7f1.fillOutlinePatternUniforms,_0x36a80a.circleUniforms,_0x2f0fc8.clippingMaskUniforms,_0x18cbef.lineUniforms,_0x18cbef.lineGradientUniforms,_0x18cbef.linePatternUniforms,_0x18cbef.lineSDFUniforms,_0x1c04ac.symbolIconUniforms,_0x1c04ac.symbolSDFUniforms,_0x1c04ac.symbolTextAndIconUniforms,_0x4e49d6.backgroundUniforms,_0x4e49d6.backgroundPatternUniforms;var _0x1eeb0d=(_0x1b8562=!0,function(e,t){var i=_0x1b8562?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b8562=!1,i}),_0x403c61=_0x1eeb0d(void 0,(function(){return _0x403c61.toString().search("(((.+)+)+)+$").toString().constructor(_0x403c61).search("(((.+)+)+)+$")})),_0x1b8562;_0x403c61();var _0x457823=0,_0x53ebd8=1,_0x31f0f3=771,_0x2441d7=function(e,t,i){this.blendFunction=e,this.blendColor=t,this.mask=i};_0x2441d7.Replace=[_0x53ebd8,_0x457823],_0x2441d7.disabled=new _0x2441d7(_0x2441d7.Replace,_0x546352.transparent,[!1,!1,!1,!1]),_0x2441d7.unblended=new _0x2441d7(_0x2441d7.Replace,_0x546352.transparent,[!0,!0,!0,!0]),_0x2441d7.alphaBlended=new _0x2441d7([_0x53ebd8,_0x31f0f3],_0x546352.transparent,[!0,!0,!0,!0]);var _0x4a3410=(_0x533646=!0,function(e,t){var i=_0x533646?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x533646=!1,i}),_0x4ab52a=_0x4a3410(void 0,(function(){return _0x4ab52a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ab52a).search("(((.+)+)+)+$")})),_0x533646;_0x4ab52a();var _0x386772=function(e,t,i){this.context=e;var n=e.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(i),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),!this.dynamicDraw&&delete t.arrayBuffer};_0x386772.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},_0x386772.prototype.updateData=function(e){var t=this.context.gl;this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)},_0x386772.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var _0x5c652c=(_0x4e1def=!0,function(e,t){var i=_0x4e1def?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e1def=!1,i}),_0x657459=_0x5c652c(void 0,(function(){return _0x657459.toString().search("(((.+)+)+)+$").toString().constructor(_0x657459).search("(((.+)+)+)+$")})),_0x4e1def;_0x657459();var _0x129318={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},_0x4246eb=function(e,t,i,n){this.length=t.length,this.attributes=i,this.itemSize=t.bytesPerElement,this.dynamicDraw=n,this.context=e;var r=e.gl;this.buffer=r.createBuffer(),e.bindVertexBuffer.set(this.buffer),r.bufferData(r.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),!this.dynamicDraw&&delete t.arrayBuffer};_0x4246eb.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},_0x4246eb.prototype.updateData=function(e){var t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)},_0x4246eb.prototype.enableAttributes=function(e,t){for(var i=0;i<this.attributes.length;i++){var n=this.attributes[i],r=t.attributes[n.name];void 0!==r&&e.enableVertexAttribArray(r)}},_0x4246eb.prototype.setVertexAttribPointers=function(e,t,i){for(var n=0;n<this.attributes.length;n++){var r=this.attributes[n],o=t.attributes[r.name];void 0!==o&&e.vertexAttribPointer(o,r.components,e[_0x129318[r.type]],!1,this.itemSize,r.offset+this.itemSize*(i||0))}},_0x4246eb.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var _0x43d3ae=function(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};_0x43d3ae.prototype.get=function(){return this.current},_0x43d3ae.prototype.set=function(e){},_0x43d3ae.prototype.getDefault=function(){return this.default},_0x43d3ae.prototype.setDefault=function(){this.set(this.default)};var _0x256146={};_0x256146.ClearColor=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return _0x546352.transparent},t.prototype.set=function(e){this.current,this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1},t}(_0x43d3ae),_0x256146.ClearDepth=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 1},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.ClearStencil=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.ColorMask=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[!0,!0,!0,!0]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.DepthMask=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.StencilMask=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 255},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.StencilFunc=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return{func:de$y.ALWAYS,ref:0,mask:255}},t.prototype.set=function(e){var t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.StencilOp=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl,[de$y.KEEP,de$y.KEEP,de$y.KEEP]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.StencilTest=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$y.STENCIL_TEST):t.disable(de$y.STENCIL_TEST),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.DepthRange=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[0,1]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.DepthTest=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$y.DEPTH_TEST):t.disable(de$y.DEPTH_TEST),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.DepthFunc=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$y.LESS},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.Blend=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$y.BLEND):t.disable(de$y.BLEND),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.BlendFunc=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return[de$y.ONE,de$y.ZERO]},r.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)},r}(_0x43d3ae),_0x256146.BlendColor=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return _0x546352.transparent},t.prototype.set=function(e){var t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.BlendEquation=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$y.FUNC_ADD},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.CullFace=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$y.CULL_FACE):t.disable(de$y.CULL_FACE),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.CullFaceSide=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$y.BACK},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.FrontFace=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$y.CCW},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.Program=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.ActiveTextureUnit=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$y.TEXTURE0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.Viewport=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[0,0,1,1]},t.prototype.set=function(e){this.current,this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1},t}(_0x43d3ae),_0x256146.BindFramebuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.BindRenderbuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.BindTexture=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.BindVertexBuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.BindElementBuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1},t}(_0x43d3ae),_0x256146.BindVertexArrayOES=function(e){function t(t){e.call(this,t),this.vao=t.extVertexArrayObject}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){this.vao&&(e!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.BindVertexArray=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.bindVertexArray(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.PixelStoreUnpack=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 4},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.PixelStoreUnpackPremultiplyAlpha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.PixelStoreUnpackFlipY=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.FramebufferAttachment=function(e){function t(t,i){e.call(this,t),this.context=t,this.parent=i}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t}(_0x43d3ae),_0x256146.ColorAttachment=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setDirty=function(){this.dirty=!0},t.prototype.set=function(e){if(e!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}},t}(_0x256146.FramebufferAttachment),_0x256146.DepthAttachment=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){if(e!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t}(_0x256146.FramebufferAttachment);var _0x116d19=(_0x1a0991=!0,function(e,t){var i=_0x1a0991?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a0991=!1,i}),_0x404c8c=_0x116d19(void 0,(function(){return _0x404c8c.toString().search("(((.+)+)+)+$").toString().constructor(_0x404c8c).search("(((.+)+)+)+$")})),_0x1a0991;_0x404c8c();var _0x2b0751=function(e){var t=e._gl;this.webgl2=e.webgl2,this.gl=t,this.clearColor=new _0x256146.ClearColor(this),this.clearDepth=new _0x256146.ClearDepth(this),this.clearStencil=new _0x256146.ClearStencil(this),this.colorMask=new _0x256146.ColorMask(this),this.depthMask=new _0x256146.DepthMask(this),this.stencilMask=new _0x256146.StencilMask(this),this.stencilFunc=new _0x256146.StencilFunc(this),this.stencilOp=new _0x256146.StencilOp(this),this.stencilTest=new _0x256146.StencilTest(this),this.depthRange=new _0x256146.DepthRange(this),this.depthTest=new _0x256146.DepthTest(this),this.depthFunc=new _0x256146.DepthFunc(this),this.blend=new _0x256146.Blend(this),this.blendFunc=new _0x256146.BlendFunc(this),this.blendColor=new _0x256146.BlendColor(this),this.blendEquation=new _0x256146.BlendEquation(this),this.cullFace=new _0x256146.CullFace(this),this.cullFaceSide=new _0x256146.CullFaceSide(this),this.frontFace=new _0x256146.FrontFace(this),this.program=new _0x256146.Program(this),this.activeTexture=new _0x256146.ActiveTextureUnit(this),this.viewport=new _0x256146.Viewport(this),this.bindFramebuffer=new _0x256146.BindFramebuffer(this),this.bindRenderbuffer=new _0x256146.BindRenderbuffer(this),this.bindTexture=new _0x256146.BindTexture(this),this.bindVertexBuffer=new _0x256146.BindVertexBuffer(this),this.bindElementBuffer=new _0x256146.BindElementBuffer(this),this.webgl2?this.bindVertexArray=new _0x256146.BindVertexArray(this):this.bindVertexArray=this.extVertexArrayObject&&new _0x256146.BindVertexArrayOES(this),this.pixelStoreUnpack=new _0x256146.PixelStoreUnpack(this),this.pixelStoreUnpackPremultiplyAlpha=new _0x256146.PixelStoreUnpackPremultiplyAlpha(this),this.pixelStoreUnpackFlipY=new _0x256146.PixelStoreUnpackFlipY(this),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTimerQuery=!1};function _0x213a3c(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!_0x213a3c(e[i],t[i]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!_0x213a3c(e[n],t[n]))return!1;return!0}return e===t}_0x2b0751.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},_0x2b0751.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray&&(this.bindVertexArray.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},_0x2b0751.prototype.createIndexBuffer=function(e,t){return new _0x386772(this,e,t)},_0x2b0751.prototype.createVertexBuffer=function(e,t,i){return new _0x4246eb(this,e,t,i)},_0x2b0751.prototype.createRenderbuffer=function(e,t,i){var n=this.gl,r=n.createRenderbuffer();return this.bindRenderbuffer.set(r),n.renderbufferStorage(n.RENDERBUFFER,e,t,i),this.bindRenderbuffer.set(null),r},_0x2b0751.prototype.createFramebuffer=function(e,t){return new Framebuffer(this,e,t)},_0x2b0751.prototype.clear=function(e){var t=e.color,i=e.depth,n=this.gl,r=0;t&&(r|=n.COLOR_BUFFER_BIT,this.clearColor.set(t),this.colorMask.set([!0,!0,!0,!0])),void 0!==i&&(r|=n.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(i),this.depthMask.set(!0)),n.clear(r)},_0x2b0751.prototype.setCullFace=function(e){!1===e.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))},_0x2b0751.prototype.setDepthMode=function(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)},_0x2b0751.prototype.setStencilMode=function(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)},_0x2b0751.prototype.setColorMode=function(e){_0x213a3c(e.blendFunction,_0x2441d7.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},_0x2b0751.prototype.unbindVAO=function(){this.bindVertexArray&&this.bindVertexArray.set(null)};var _0x3ef04a=(_0x42cff6=!0,function(e,t){var i=_0x42cff6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42cff6=!1,i}),_0xb6f098=_0x3ef04a(void 0,(function(){return _0xb6f098.toString().search("(((.+)+)+)+$").toString().constructor(_0xb6f098).search("(((.+)+)+)+$")})),_0x42cff6;_0xb6f098();var _0x225ec4={circle:_0x3ac934,line:_0x32f715,fill:_0x107c4c,symbol:_0x13d16f},_0x24cf89=_0x2c23ed([{name:"a_pos",type:"Int16",components:2}]),_0x3fc49d=function(e,t,i){this.cesiumContext=e,this.context=new _0x2b0751(e),this.width=i,this.height=i,this.transform=t,this.transform.resize(this.width,this.height),this._globalLineWidthScale=1,this.setup(),this.numSublayers=1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new _0x2241e8,this.clearCommand=new t$W({color:new e$1X(0,0,0,0),depth:1})};function _0x4530c9(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function _0x195096(e,t,i,n,r,o,a){var s=1/(t-i),l=1/(n-r),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+i)*s,e[13]=(r+n)*l,e[14]=(a+o)*u,e[15]=1,e}function _0x232e8d(e,t,i){var n=i[0],r=i[1],o=i[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}_0x3fc49d.prototype.resize=function(e,t){var i=this.context.gl;if(this.width=e,this.height=t,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,r=this.style._order;n<r.length;n+=1){var o=r[n];this.style._layers[o].resize()}this.depthRbo&&(i.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},_0x3fc49d.prototype.setup=function(){this.context;var e=new _0x5ca07d;e.emplaceBack(0,0),e.emplaceBack(ne$C,0),e.emplaceBack(0,ne$C),e.emplaceBack(ne$C,ne$C),this.tileExtentBuffer=_0x42145e.toVertexBuffer(this.cesiumContext,e,_0x24cf89.members),this.tileExtentSegments=_0x1e8367.simpleSegment(0,0,4,2);var t=new _0x5ca07d;t.emplaceBack(0,0),t.emplaceBack(ne$C,0),t.emplaceBack(0,ne$C),t.emplaceBack(ne$C,ne$C),this.debugBuffer=_0x42145e.toVertexBuffer(this.cesiumContext,t,_0x24cf89.members),this.debugSegments=_0x1e8367.simpleSegment(0,0,4,5);var i=new _0x5ca07d;i.emplaceBack(0,0),i.emplaceBack(1,0),i.emplaceBack(0,1),i.emplaceBack(1,1),this.viewportBuffer=_0x42145e.toVertexBuffer(this.cesiumContext,i,_0x24cf89.members),this.viewportSegments=_0x1e8367.simpleSegment(0,0,4,2);var n=new _0x459120;n.emplaceBack(0),n.emplaceBack(1),n.emplaceBack(3),n.emplaceBack(2),n.emplaceBack(0),this.tileBorderIndexBuffer=_0x42145e.toIndexBuffer(this.cesiumContext,n);var r=new _0x48dae8;r.emplaceBack(0,1,2),r.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=_0x42145e.toIndexBuffer(this.cesiumContext,r),this.context.gl,this.stencilClearMode=new _0x7ad9f8({func:de$y.ALWAYS,mask:0},0,255,de$y.ZERO,de$y.ZERO,de$y.ZERO)},_0x3fc49d.prototype.clearStencil=function(){var e=this.context,t=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var i=_0x4530c9();_0x195096(i,0,this.width,this.height,0,0,1),_0x232e8d(i,i,[this.width,this.height,0]),this.useProgram("clippingMask").draw(e,t.TRIANGLES,_0x4a9140.disabled,this.stencilClearMode,_0x2441d7.disabled,_0x14ded5.disabled,_0x2f0fc8.clippingMaskUniformValues(i),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},_0x3fc49d.prototype._renderTileClippingMasks=function(e,t){if(this.currentStencilSource!==e.source&&e.isTileClipped()&&t&&t.length){this.currentStencilSource=e.source;var i=this.context,n=i.gl;this.nextStencilID+t.length>256&&this.clearStencil(),i.setColorMode(_0x2441d7.disabled),i.setDepthMode(_0x4a9140.disabled);var r=this.useProgram("clippingMask").program;this._tileClippingMaskIDs={};for(var o=0,a=t;o<a.length;o+=1){var s=a[o],l=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;r.draw(i,n.TRIANGLES,_0x4a9140.disabled,new _0x7ad9f8({func:n.ALWAYS,mask:0},l,255,n.KEEP,n.KEEP,n.REPLACE),_0x2441d7.disabled,_0x14ded5.disabled,_0x2f0fc8.clippingMaskUniformValues(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},_0x3fc49d.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new _0x7ad9f8({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},_0x3fc49d.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new _0x7ad9f8({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},_0x3fc49d.prototype.colorModeForRenderPass=function(){var e=this.context.gl;if(this._showOverdrawInspector){var t=1/8;return new _0x2441d7([e.CONSTANT_COLOR,e.ONE],new _0x546352(t,t,t,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?_0x2441d7.unblended:_0x2441d7.alphaBlended},_0x3fc49d.prototype.depthModeForSublayer=function(e,t,i){if(!this.opaquePassEnabledForLayer())return _0x4a9140.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new _0x4a9140(i||de$y.LEQUAL,t,[n,n])},_0x3fc49d.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},_0x3fc49d.prototype.renderOneTile=function(e,t,i){this.style=e,this.options=i,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager;var n=this.style._order;for(this.clearCommand.execute(this.cesiumContext,i.passState),this._showOverdrawInspector=!1,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.opaquePassCutoff=1/0,this.renderPass="opaque",this.currentLayer=n.length-1;this.currentLayer>=0;this.currentLayer--){var r=this.style._layers[n[this.currentLayer]];this.renderLayerForOneTile(this,t,r,i)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<n.length;this.currentLayer++){var o=this.style._layers[n[this.currentLayer]];this.renderLayerForOneTile(this,t,o,i)}},_0x3fc49d.prototype.render=function(e,t){this.style=e,this.options=t,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(ref_properties.browser.now()),this.imageManager.beginFrame();var i=this.style._order,n=this.style.sourceCaches;for(var r in n){var o=n[r];o.used&&o.prepare(this.context)}var a={},s={},l={};for(var u in n){var c=n[u];a[u]=c.getVisibleCoordinates(),s[u]=a[u].slice().reverse(),l[u]=c.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var h=0;h<i.length;h++){var d=i[h];if(this.style._layers[d].is3D()){this.opaquePassCutoff=h;break}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:t.showOverdrawInspector?_0x546352.black:_0x546352.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=t.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){var f=this.style._layers[i[this.currentLayer]],p=n[f.source],_=a[f.source];this._renderTileClippingMasks(f,_),this.renderLayer(this,p,f,_)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<i.length;this.currentLayer++){var m=this.style._layers[i[this.currentLayer]],g=n[m.source],x=("symbol"===m.type?l:s)[m.source];this._renderTileClippingMasks(m,a[m.source]),this.renderLayer(this,g,m,x)}this.context.setDefault()},_0x3fc49d.prototype.setupOffscreenDepthRenderbuffer=function(){var e=this.context;!this.depthRbo&&(this.depthRbo=e.createRenderbuffer(e.gl.DEPTH_COMPONENT16,this.width,this.height))},_0x3fc49d.prototype.renderLayerForOneTile=function(e,t,i,n){null!=i&&(i.isHidden(t.requestZ)||(this.id=i.id,_0x225ec4[i.type](e,t,i,n)))},_0x3fc49d.prototype.renderLayer=function(e,t,i,n){i.isHidden(this.transform.zoom)||("background"===i.type||"custom"===i.type||n.length)&&(this.id=i.id,_0x225ec4[i.type](e,t,i,n,this.style.placement.variableOffsets))},_0x3fc49d.prototype.translatePosMatrix=function(e,t,i,n,r){if(!i[0]&&!i[1])return e;var o=r?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(o){var a=Math.sin(o),s=Math.cos(o);i=[i[0]*s-i[1]*a,i[0]*a+i[1]*s]}var l=[r?i[0]:pixelsToTileUnits(t,i[0],this.transform.zoom),r?i[1]:pixelsToTileUnits(t,i[1],this.transform.zoom),0],u=new Float32Array(16);return _0x3fdff7.mat4.translate(u,e,l),u},_0x3fc49d.prototype.isPatternMissing=function(e){if(!e)return!1;var t=this.imageManager.getPattern(e.from.toString()),i=this.imageManager.getPattern(e.to.toString());return!t||!i},_0x3fc49d.prototype.useProgram=function(e,t,i){void 0===t&&(t=this.emptyProgramConfiguration),this.cache=this.cache||{};var n=""+e+(t.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");if(!this.cache[n]){var r=_0xc7a06[e];this.cache[n]={};var o=t.defines(),a=_0xc7a06.prelude.vertexSource.concat(r.vertexSource),s=_0xc7a06.prelude.fragmentSource.concat(r.fragmentSource),l=new s$V({name:e+"_vp",defines:o,sources:[a]}),u=new s$V({name:e+"_fp",defines:o,sources:[s]}),c=i||t.getAttributeLocation(),h=r$14.fromCache({name:n,context:this.cesiumContext,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});this.cache[n].cesiumProgram=h}return this.cache[n]},_0x3fc49d.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},_0x3fc49d.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)};var _0x466ead=(_0x42d0cf=!0,function(e,t){var i=_0x42d0cf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42d0cf=!1,i}),_0x5b2e15=_0x466ead(void 0,(function(){return _0x5b2e15.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b2e15).search("(((.+)+)+)+$")})),_0x42d0cf;function _0x23b08c(e,t,i,n,r){for(var o=r.patternDependencies,a=0,s=t;a<s.length;a+=1){var l=s[a],u=l.paint.get(e+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:n-1},i,{},r.availableImages),h=u.evaluate({zoom:n},i,{},r.availableImages),d=u.evaluate({zoom:n+1},i,{},r.availableImages);c=c&&c.name?c.name:c,h=h&&h.name?h.name:h,d=d&&d.name?d.name:d,o[c]=!0,o[h]=!0,o[d]=!0,i.patterns[l.id]={min:c,mid:h,max:d}}}return i}_0x5b2e15();var _0x39f71c=(_0x23f518=!0,function(e,t){var i=_0x23f518?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23f518=!1,i}),_0x3d2877=_0x39f71c(void 0,(function(){return _0x3d2877.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d2877).search("(((.+)+)+)+$")})),_0x23f518;function _0x4db9cd(e,t,i){for(var n=i.patternDependencies,r=!1,o=0,a=t;o<a.length;o+=1){var s=a[o].paint.get(e+"-pattern");!s.isConstant()&&(r=!0);var l=s.constantOr(null);l&&(r=!0,n[l.to]=!0,n[l.from]=!0)}return r}if(_0x3d2877(),typeof WebAssembly<"u"){let e=function(e){return t$G.locateFile?t$G.locateFile(e,O$F):O$F+e},t=function(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1)},i=function(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return _$L[e>>0];case"i16":return A$_[e>>1];case"i32":case"i64":return w$Q[e>>2];case"float":return _e$q[e>>2];case"double":return pe$w[e>>3];default:de("invalid type for getValue: "+t)}return null},n=function(e,t){e||de("Assertion failed: "+t)},r=function(e){var t=t$G["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=z$P(i),c(e,t,i)}return t},array:function(e){var t=z$P(e.length);return h(e,t),t}};var u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p<o.length;p++){var _=s[i[p]];_?(0===f&&(f=de$s()),d[p]=_(o[p])):d[p]=o[p]}var m=u.apply(null,d);return m=function(e){return"string"===t?l(e):"boolean"===t?Boolean(e):e}(m),0!==f&&Je$9(f),m},a=function(e,t,i,n){return function(){return o(e,t,i,arguments)}},s=function(e,i,n){for(var r=i+n,o=i;e[o]&&!(o>=r);)++o;if(o-i>16&&e.subarray&&ke$f)return ke$f.decode(e.subarray(i,o));for(var a="";i<o;){var s=e[i++];if(128&s){var l=63&e[i++];if(192!=(224&s)){var u=63&e[i++];if(224==(240&s)?s=(15&s)<<12|l<<6|u:(240!=(248&s)&&t("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),s=(7&s)<<18|l<<12|u<<6|63&e[i++]),s<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(b$11,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343)l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s);if(l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,b$11,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),_$L.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return t$G.extraStackTrace&&(e+="\n"+t$G.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){t$G.HEAP8=_$L=new Int8Array(E$U),t$G.HEAP16=A$_=new Int16Array(E$U),t$G.HEAP32=w$Q=new Int32Array(E$U),t$G.HEAPU8=b$11=new Uint8Array(E$U),t$G.HEAPU16=new Uint16Array(E$U),t$G.HEAPU32=D$T=new Uint32Array(E$U),t$G.HEAPF32=_e$q=new Float32Array(E$U),t$G.HEAPF64=pe$w=new Float64Array(E$U)},g=function(){n(0==(3&N$L)),D$T[(N$L>>2)-1]=34821223,D$T[(N$L>>2)-2]=2310721022},x=function(){(34821223!=D$T[(N$L>>2)-1]||2310721022!=D$T[(N$L>>2)-2])&&de("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+D$T[(N$L>>2)-2].toString(16)+" "+D$T[(N$L>>2)-1].toString(16)),1668509029!==w$Q[0]&&de("Runtime error: The application has corrupted its heap memory area (address zero)!")},y=function(e){de("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(N$L-de$s()+e)+" bytes available!")},v=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?t$G.dynCall_v(i):t$G.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},$=function(){if(t$G.preRun)for("function"==typeof t$G.preRun&&(t$G.preRun=[t$G.preRun]);t$G.preRun.length;)S(t$G.preRun.shift());v(je$f)},b=function(){x(),!u$K&&(u$K=!0,v(Ge$g))},T=function(){x(),v(We$j)},C=function(){if(x(),t$G.postRun)for("function"==typeof t$G.postRun&&(t$G.postRun=[t$G.postRun]);t$G.postRun.length;)w(t$G.postRun.shift());v(qe$d)},S=function(e){je$f.unshift(e)},w=function(e){qe$d.unshift(e)},E=function(e){C$V++,t$G.monitorRunDependencies&&t$G.monitorRunDependencies(C$V),e&&(n(!P$P[e]),P$P[e]=1,null===k$P&&typeof setInterval<"u"&&(k$P=setInterval((function(){if(ne$B)return clearInterval(k$P),void(k$P=null)}),1e4)))},P=function(e){if(C$V--,t$G.monitorRunDependencies&&t$G.monitorRunDependencies(C$V),e&&(n(P$P[e]),delete P$P[e]),0==C$V&&(null!==k$P&&(clearInterval(k$P),k$P=null),$$P)){var t=$$P;$$P=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(Ve$h):0===e.indexOf(Ve$h)},L=function(){try{if(t$G.wasmBinary)return new Uint8Array(t$G.wasmBinary);if(t$G.readBinary)return t$G.readBinary(S$M);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}},M=function(){return t$G.wasmBinary||!V$M&&!I$11||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(S$M,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+S$M+"'";return e.arrayBuffer()})).catch((function(){return L()}))},R=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Yt$6};function i(e,t){var i=e.exports;t$G.asm=i,P("wasm-instantiate")}E("wasm-instantiate");var r=t$G;function o(e){n(t$G===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(t$G.instantiateWasm)try{return t$G.instantiateWasm(t,i)}catch{return!1}return function(){if(t$G.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(S$M)||"function"!=typeof fetch)return a(o);fetch(S$M,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},O=function(e){return ie$z(e)},D=function(e){e&&B$Q[e].refcount++},I=function(e){if(!e||B$Q[e])return e;for(var t in B$Q)for(var i=+t,n=B$Q[i].adjusted,r=n.length,o=0;o<r;o++)if(n[o]===e)return i;return e},F=function(e){var t=B$Q[e];return t&&!t.caught&&(t.caught=!0,K$N.uncaught_exception--),t&&(t.rethrown=!1),rn$4.push(e),D(I(e)),e},B=function(e,t,i){throw B$Q[e]={ptr:e,adjusted:[e],type:t,destructor:i,refcount:0,caught:!1,rethrown:!1},"uncaught_exception"in K$N?K$N.uncaught_exception++:K$N.uncaught_exception=1,e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."},N=function(){return!!K$N.uncaught_exception},G=function(){},z=function(){},U=function(e,t){d$12.varargs=t;try{d$12.getStreamFromFD(),d$12.get(),d$12.get(),d$12.get(),d$12.get();return de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$O>"u"||!(e instanceof y$O.ErrnoError))&&de(e),-e.errno}},V=function(){var e=t$G._fflush;e&&e(0);var t=d$12.buffers;t[1].length&&d$12.printChar(1,10),t[2].length&&d$12.printChar(2,10)},k=function(e,t){d$12.varargs=t;try{for(var i=d$12.get(),n=d$12.get(),r=d$12.get(),o=0,a=0;a<r;a++){for(var s=w$Q[n+8*a>>2],l=w$Q[n+(8*a+4)>>2],u=0;u<l;u++)d$12.printChar(i,b$11[s+u]);o+=l}return o}catch(e){return(typeof y$O>"u"||!(e instanceof y$O.ErrnoError))&&de(e),-e.errno}},W=function(e,t){d$12.varargs=t;try{return 0}catch(e){return(typeof y$O>"u"||!(e instanceof y$O.ErrnoError))&&de(e),-e.errno}},H=function(e,t){d$12.varargs=t;try{d$12.getStreamFromFD();return de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$O>"u"||!(e instanceof y$O.ErrnoError))&&de(e),-e.errno}},q=function(){},j=function(){t$G.abort()},X=function(){return _$L.length},Y=function(e,t,i){b$11.set(b$11.subarray(t,t+i),e)},Z=function(e){if(!t$G.___errno_location)return e;w$Q[t$G.___errno_location()>>2]=e},K=function(e){de("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+_$L.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},Q=function(e){e=_(e,65536);var t=E$U.byteLength;try{return-1!==Y$H.grow((e-t)/65536)&&(E$U=Y$H.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},J=function(e){var i=X();n(e>i);var r=65536,o=2147418112;if(e>o)return!1;for(var a=Math.max(i,16777216);a<e;)(a=a<=536870912?_(2*a,r):Math.min(_((3*a+2147483648)/4,r),o))===i&&t("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+_$L.length);return!!Q(a)&&(m(),!0)},ee=function(e){T$R("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},te=function(e){T$R("Invalid function pointer called with signature 'iidiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},ie=function(e){T$R("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},ne=function(e){T$R("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},re=function(e){T$R("Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},oe=function(e){T$R("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},ae=function(e){T$R("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},se=function(e){T$R("Invalid function pointer called with signature 'viiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},le=function(e){T$R("Invalid function pointer called with signature 'viiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},ue=function(e){T$R("Invalid function pointer called with signature 'viiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},ce=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},he=function(e){function t(){t$G.calledRun||(t$G.calledRun=!0,!ne$B&&(b(),T(),t$G.onRuntimeInitialized&&t$G.onRuntimeInitialized(),n(!t$G._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),C()))}e=e||t$G.arguments,C$V>0||(g(),$(),C$V>0)||t$G.calledRun||(t$G.setStatus?(t$G.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t$G.setStatus("")}),1),t()}),1)):t(),x())},de=function(e){t$G.onAbort&&t$G.onAbort(e),ne$B=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw Ye$g&&Ye$g.forEach((function(i){t=i(t,e)})),t};var t$G=typeof t$G<"u"?t$G:{},q$Y={},U$S;for(U$S in t$G)t$G.hasOwnProperty(U$S)&&(q$Y[U$S]=t$G[U$S]);t$G.arguments=[],t$G.thisProgram="./this.program",t$G.quit=function(e,t){throw t},t$G.preRun=[],t$G.postRun=[];var V$M=!1,I$11=!1,fe$u=!1,Ae$q=!1,Ne$i=!1;if(V$M="object"==typeof window,I$11="function"==typeof importScripts,Ae$q="object"==typeof process&&"function"==typeof require,fe$u=Ae$q&&!V$M&&!I$11,Ne$i=!V$M&&!fe$u&&!I$11,t$G.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var O$F="",ce$s,le$u;if(fe$u)O$F=__dirname+"/",t$G.read=function(e,t){var i;return ce$s||(ce$s=require("fs")),le$u||(le$u=require("path")),e=le$u.normalize(e),i=ce$s.readFileSync(e),t?i:i.toString()},t$G.readBinary=function(e){var t=t$G.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(t$G.thisProgram=process.argv[1].replace(/\\/g,"/")),t$G.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=t$G),process.on("uncaughtException",(function(e){if(!(e instanceof ce))throw e})),process.on("unhandledRejection",de),t$G.quit=function(e){process.exit(e)},t$G.inspect=function(){return"[Emscripten Module object]"};else if(Ne$i)typeof read<"u"&&(t$G.read=function(e){return read(e)}),t$G.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?t$G.arguments=scriptArgs:typeof arguments<"u"&&(t$G.arguments=arguments),"function"==typeof quit&&(t$G.quit=function(e){quit(e)});else{if(!V$M&&!I$11)throw new Error("environment detection error");I$11?O$F=self.location.href:document.currentScript&&(O$F=document.currentScript.src),O$F=0!==O$F.indexOf("blob:")?O$F.substr(0,O$F.lastIndexOf("/")+1):"",t$G.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},I$11&&(t$G.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),t$G.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},t$G.setWindowTitle=function(e){document.title=e}}var J$O=t$G.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),T$R=t$G.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||J$O);for(U$S in q$Y)q$Y.hasOwnProperty(U$S)&&(t$G[U$S]=q$Y[U$S]);q$Y=void 0,n(typeof t$G.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$G.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$G.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$G.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),de$s=Je$9=z$P=function(){de("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Yt$6={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var Ie$k=0,Zt$5=function(e){Ie$k=e},$t$5=function(){return Ie$k};"object"!=typeof WebAssembly&&de("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Y$H,ne$B=!1,ke$f=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Qe$b=65536,E$U,_$L,b$11,A$_,w$Q,D$T,_e$q,pe$w,Pe$i=5872,N$L=5248752,Be$k=5248752,Z$R=5840;n(Pe$i%16==0,"stack must start aligned"),n(Be$k%16==0,"heap must start aligned");var Te$m=5242880;t$G.TOTAL_STACK&&n(Te$m===t$G.TOTAL_STACK,"the stack size can no longer be determined at runtime");var X$P=t$G.TOTAL_MEMORY||16777216;if(X$P<Te$m&&T$R("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+X$P+"! (TOTAL_STACK="+Te$m+")"),n(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),t$G.buffer?(E$U=t$G.buffer,n(E$U.byteLength===X$P,"provided buffer should be "+X$P+" bytes, but it is "+E$U.byteLength)):("object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(n(X$P%Qe$b==0),Y$H=new WebAssembly.Memory({initial:X$P/Qe$b}),E$U=Y$H.buffer):E$U=new ArrayBuffer(X$P),n(E$U.byteLength===X$P)),m(),w$Q[Z$R>>2]=Be$k,w$Q[0]=1668509029,A$_[1]=25459,115!==b$11[2]||99!==b$11[3])throw"Runtime error: expected the system to be little-endian!";var je$f=[],Ge$g=[],We$j=[],qe$d=[],u$K=!1,h$S=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var C$V=0,k$P=null,$$P=null,P$P={};t$G.preloadedImages={},t$G.preloadedAudios={};var y$O={error:function(){de("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){y$O.error()},createDataFile:function(){y$O.error()},createPreloadedFile:function(){y$O.error()},createLazyFile:function(){y$O.error()},open:function(){y$O.error()},mkdev:function(){y$O.error()},registerDevice:function(){y$O.error()},analyzePath:function(){y$O.error()},loadFilesFromDB:function(){y$O.error()},ErrnoError:function(){y$O.error()}};t$G.FS_createDataFile=y$O.createDataFile,t$G.FS_createPreloadedFile=y$O.createPreloadedFile;var Ve$h="data:application/octet-stream;base64,",S$M,nn$4=typeof window>"u"?self:window;S$M=nn$4.location.href.endsWith(".openrealspace")?"../../static/Build/SuperMap3D/ThirdParty/earcut.wasm":"ThirdParty/earcut.wasm",A(S$M)||(S$M=e(S$M)),t$G.asm=function(e,t,i){t.memory=Y$H,t.table=new WebAssembly.Table({initial:260,maximum:260,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=R(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var F$X=5856;n(F$X%8==0);var B$Q={},rn$4=[],d$12={buffers:[null,[],[]],printChar:function(e,t){var i=d$12.buffers[e];n(i),0===t||10===t?((1===e?J$O:T$R)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return d$12.varargs+=4,w$Q[d$12.varargs-4>>2]},getStr:function(){return l(d$12.get())},get64:function(){var e=d$12.get(),t=d$12.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===d$12.get())}},sn$4={},fn$3={abort:de,setTempRet0:Zt$5,getTempRet0:$t$5,abortStackOverflow:y,nullFunc_ii:ee,nullFunc_iidiiii:te,nullFunc_iiii:ie,nullFunc_jiji:ne,nullFunc_v:re,nullFunc_vi:oe,nullFunc_vii:ae,nullFunc_viiii:se,nullFunc_viiiii:le,nullFunc_viiiiii:ue,___cxa_allocate_exception:O,___cxa_begin_catch:F,___cxa_throw:B,___cxa_uncaught_exception:N,___exception_addRef:D,___exception_deAdjust:I,___gxx_personality_v0:G,___lock:z,___setErrNo:Z,___syscall140:U,___syscall146:k,___syscall54:W,___syscall6:H,___unlock:q,_abort:j,_emscripten_get_heap_size:X,_emscripten_memcpy_big:Y,_emscripten_resize_heap:J,abortOnCannotGrowMemory:K,emscripten_realloc_buffer:Q,flush_NO_FILESYSTEM:V,tempDoublePtr:F$X,DYNAMICTOP_PTR:Z$R},p$Q=t$G.asm(sn$4,fn$3,E$U),cn$3=p$Q.__ZSt18uncaught_exceptionv;p$Q.__ZSt18uncaught_exceptionv=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),cn$3.apply(null,arguments)};var ln$4=p$Q.___cxa_can_catch;p$Q.___cxa_can_catch=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ln$4.apply(null,arguments)};var un$4=p$Q.___cxa_is_pointer_type;p$Q.___cxa_is_pointer_type=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),un$4.apply(null,arguments)};var hn$4=p$Q.___errno_location;p$Q.___errno_location=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),hn$4.apply(null,arguments)};var _n$3=p$Q._earcut;p$Q._earcut=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),_n$3.apply(null,arguments)};var pn$3=p$Q._fflush;p$Q._fflush=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),pn$3.apply(null,arguments)};var Tn$3=p$Q._free;p$Q._free=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Tn$3.apply(null,arguments)};var dn$3=p$Q._llvm_maxnum_f64;p$Q._llvm_maxnum_f64=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),dn$3.apply(null,arguments)};var gn$3=p$Q._llvm_minnum_f64;p$Q._llvm_minnum_f64=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),gn$3.apply(null,arguments)};var vn$3=p$Q._malloc;p$Q._malloc=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),vn$3.apply(null,arguments)};var mn$3=p$Q._sbrk;p$Q._sbrk=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),mn$3.apply(null,arguments)};var yn$1=p$Q.establishStackSpace;p$Q.establishStackSpace=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),yn$1.apply(null,arguments)};var wn$2=p$Q.stackAlloc;p$Q.stackAlloc=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wn$2.apply(null,arguments)};var En$3=p$Q.stackRestore;p$Q.stackRestore=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),En$3.apply(null,arguments)};var Rn$2=p$Q.stackSave;p$Q.stackSave=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Rn$2.apply(null,arguments)},t$G.asm=p$Q;var K$N=t$G.__ZSt18uncaught_exceptionv=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.__ZSt18uncaught_exceptionv.apply(null,arguments)};t$G.___cxa_can_catch=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.___cxa_can_catch.apply(null,arguments)},t$G.___cxa_is_pointer_type=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.___cxa_is_pointer_type.apply(null,arguments)},t$G.___errno_location=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.___errno_location.apply(null,arguments)},t$G._earcut=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._earcut.apply(null,arguments)},t$G._emscripten_replace_memory=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._emscripten_replace_memory.apply(null,arguments)},t$G._fflush=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._fflush.apply(null,arguments)},t$G._free=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._free.apply(null,arguments)},t$G._llvm_maxnum_f64=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._llvm_maxnum_f64.apply(null,arguments)},t$G._llvm_minnum_f64=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._llvm_minnum_f64.apply(null,arguments)};var ie$z=t$G._malloc=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._malloc.apply(null,arguments)};t$G._memcpy=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._memcpy.apply(null,arguments)},t$G._memset=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._memset.apply(null,arguments)},t$G._sbrk=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._sbrk.apply(null,arguments)},t$G.establishStackSpace=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.establishStackSpace.apply(null,arguments)};var z$P=t$G.stackAlloc=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.stackAlloc.apply(null,arguments)},Je$9=t$G.stackRestore=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.stackRestore.apply(null,arguments)},de$s=t$G.stackSave=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.stackSave.apply(null,arguments)};t$G.dynCall_ii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_ii.apply(null,arguments)},t$G.dynCall_iidiiii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_iidiiii.apply(null,arguments)},t$G.dynCall_iiii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_iiii.apply(null,arguments)},t$G.dynCall_jiji=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_jiji.apply(null,arguments)},t$G.dynCall_v=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_v.apply(null,arguments)},t$G.dynCall_vi=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_vi.apply(null,arguments)},t$G.dynCall_vii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_vii.apply(null,arguments)},t$G.dynCall_viiii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_viiii.apply(null,arguments)},t$G.dynCall_viiiii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_viiiii.apply(null,arguments)},t$G.dynCall_viiiiii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_viiiiii.apply(null,arguments)},t$G.asm=p$Q,t$G.intArrayFromString||(t$G.intArrayFromString=function(){de("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.intArrayToString||(t$G.intArrayToString=function(){de("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.ccall=o,t$G.cwrap=a,t$G.setValue||(t$G.setValue=function(){de("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getValue=i,t$G.allocate||(t$G.allocate=function(){de("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getMemory||(t$G.getMemory=function(){de("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.AsciiToString||(t$G.AsciiToString=function(){de("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToAscii||(t$G.stringToAscii=function(){de("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF8ArrayToString||(t$G.UTF8ArrayToString=function(){de("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF8ToString||(t$G.UTF8ToString=function(){de("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF8Array||(t$G.stringToUTF8Array=function(){de("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF8||(t$G.stringToUTF8=function(){de("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.lengthBytesUTF8||(t$G.lengthBytesUTF8=function(){de("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF16ToString||(t$G.UTF16ToString=function(){de("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF16||(t$G.stringToUTF16=function(){de("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.lengthBytesUTF16||(t$G.lengthBytesUTF16=function(){de("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF32ToString||(t$G.UTF32ToString=function(){de("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF32||(t$G.stringToUTF32=function(){de("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.lengthBytesUTF32||(t$G.lengthBytesUTF32=function(){de("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.allocateUTF8||(t$G.allocateUTF8=function(){de("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackTrace||(t$G.stackTrace=function(){de("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnPreRun||(t$G.addOnPreRun=function(){de("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnInit||(t$G.addOnInit=function(){de("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnPreMain||(t$G.addOnPreMain=function(){de("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnExit||(t$G.addOnExit=function(){de("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnPostRun||(t$G.addOnPostRun=function(){de("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.writeStringToMemory||(t$G.writeStringToMemory=function(){de("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.writeArrayToMemory||(t$G.writeArrayToMemory=function(){de("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.writeAsciiToMemory||(t$G.writeAsciiToMemory=function(){de("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addRunDependency||(t$G.addRunDependency=function(){de("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.removeRunDependency||(t$G.removeRunDependency=function(){de("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.ENV||(t$G.ENV=function(){de("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.FS||(t$G.FS=function(){de("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.FS_createFolder||(t$G.FS_createFolder=function(){de("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createPath||(t$G.FS_createPath=function(){de("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createDataFile||(t$G.FS_createDataFile=function(){de("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createPreloadedFile||(t$G.FS_createPreloadedFile=function(){de("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createLazyFile||(t$G.FS_createLazyFile=function(){de("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createLink||(t$G.FS_createLink=function(){de("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createDevice||(t$G.FS_createDevice=function(){de("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_unlink||(t$G.FS_unlink=function(){de("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.GL||(t$G.GL=function(){de("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.dynamicAlloc||(t$G.dynamicAlloc=function(){de("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.warnOnce||(t$G.warnOnce=function(){de("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.loadDynamicLibrary||(t$G.loadDynamicLibrary=function(){de("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.loadWebAssemblyModule||(t$G.loadWebAssemblyModule=function(){de("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getLEB||(t$G.getLEB=function(){de("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getFunctionTables||(t$G.getFunctionTables=function(){de("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.alignFunctionTables||(t$G.alignFunctionTables=function(){de("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.registerFunctions||(t$G.registerFunctions=function(){de("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addFunction||(t$G.addFunction=function(){de("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.removeFunction||(t$G.removeFunction=function(){de("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getFuncWrapper||(t$G.getFuncWrapper=function(){de("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.prettyPrint||(t$G.prettyPrint=function(){de("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.makeBigInt||(t$G.makeBigInt=function(){de("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.dynCall||(t$G.dynCall=function(){de("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getCompilerSetting||(t$G.getCompilerSetting=function(){de("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackSave||(t$G.stackSave=function(){de("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackRestore||(t$G.stackRestore=function(){de("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackAlloc||(t$G.stackAlloc=function(){de("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.establishStackSpace||(t$G.establishStackSpace=function(){de("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.print||(t$G.print=function(){de("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.printErr||(t$G.printErr=function(){de("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getTempRet0||(t$G.getTempRet0=function(){de("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.setTempRet0||(t$G.setTempRet0=function(){de("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.Pointer_stringify||(t$G.Pointer_stringify=function(){de("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.ALLOC_NORMAL||Object.defineProperty(t$G,"ALLOC_NORMAL",{get:function(){de("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$G.ALLOC_STACK||Object.defineProperty(t$G,"ALLOC_STACK",{get:function(){de("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$G.ALLOC_DYNAMIC||Object.defineProperty(t$G,"ALLOC_DYNAMIC",{get:function(){de("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$G.ALLOC_NONE||Object.defineProperty(t$G,"ALLOC_NONE",{get:function(){de("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),ce.prototype=new Error,ce.prototype.constructor=ce,$$P=function e(){t$G.calledRun||he(),t$G.calledRun||($$P=e)},t$G.run=he;var Ye$g=[];if(t$G.abort=de,t$G.preInit)for("function"==typeof t$G.preInit&&(t$G.preInit=[t$G.preInit]);t$G.preInit.length>0;)t$G.preInit.pop()();t$G.noExitRuntime=!0,he()}else var t$G=null;var _0x53e246=t$G,_0x55912a=(_0x34e54c=!0,function(e,t){var i=_0x34e54c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x34e54c=!1,i}),_0x30e2da=_0x55912a(void 0,(function(){return _0x30e2da.toString().search("(((.+)+)+)+$").toString().constructor(_0x30e2da).search("(((.+)+)+)+$")})),_0x34e54c;_0x30e2da();var _0x491cd4=!1;if(e$2e(_0x53e246)){_0x53e246.onRuntimeInitialized=function(){_0x491cd4=!0};var _0x54c521=_0x53e246.cwrap("earcut","number",["number","number","number","number","number","number"])}var _0x784323=_0x2c23ed([{name:"a_pos",components:2,type:"Int16"}],4),_0x151ffd=_0x784323.members,_0x7cc9d8=500,_0x2c9633=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _0x5ca07d,this.indexArray=new _0x48dae8,this.indexArray2=new _0x3e3135,this.programConfigurations=new ProgramConfigurationSet(_0x151ffd,e.layers,e.zoom),this.segments=new _0x1e8367,this.segments2=new _0x1e8367,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x2c9633.prototype.populate=function(e,t){this.hasPattern=_0x4db9cd("fill",this.layers,t);for(var i=[],n=0,r=e;n<r.length;n+=1){var o=r[n],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(this.layers[0]._featureFilter(new _0x47eac1(0),a)){var u=_0x182c2a(a),c={id:a.id,properties:a.properties,type:a.type,sourceLayerIndex:l,index:s,geometry:u,patterns:{},sortKey:undefined};i.push(c)}}for(var h=0,d=i;h<d.length;h+=1){var f=d[h],p=f,_=p.geometry,m=p.index,g=p.sourceLayerIndex;if(this.hasPattern){var x=_0x23b08c("fill",this.layers,f,this.zoom,t);this.patternFeatures.push(x)}else this.addFeature(f,_,m,{},t.indexData);var y=e[m].feature;t.featureIndex.insert(y,_,m,g,this.index)}},_0x2c9633.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},_0x2c9633.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},_0x2c9633.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_0x2c9633.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_0x2c9633.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=_0x151ffd;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=_0x42145e.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0x42145e.toIndexBuffer(e,this.indexArray),this.cesiumIndexBuffer2=_0x42145e.toIndexBuffer(e,this.indexArray2))}this.programConfigurations.upload(e),this.uploaded=!0},_0x2c9633.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer?.destroy(),this.cesiumIndexBuffer2?.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},_0x2c9633.prototype.clear=function(){e$2e(this.layoutVertexArray)&&(this.layoutVertexArray=null),e$2e(this.indexArray)&&(this.indexArray=null),e$2e(this.indexArray2)&&(this.indexArray2=null)},_0x2c9633.prototype.addFeature=function(e,t,i,n,r){for(var o=0,a=_0x1294f3(t,_0x7cc9d8);o<a.length;o+=1){for(var s=a[o],l=0,u=0,c=s;u<c.length;u+=1){l+=c[u].length}for(var h,d=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),f=d.vertexLength,p=[],_=[],m=0,g=s;m<g.length;m+=1){var x=g[m];if(0!==x.length){x!==s[0]&&_.push(p.length/2);var y=this.segments2.prepareSegment(x.length,this.layoutVertexArray,this.indexArray2),v=y.vertexLength;this.layoutVertexArray.emplaceBack(x[0].x,x[0].y),this.indexArray2.emplaceBack(v+x.length-1,v),p.push(x[0].x),p.push(x[0].y);for(var $=1;$<x.length;$++)this.layoutVertexArray.emplaceBack(x[$].x,x[$].y),this.indexArray2.emplaceBack(v+$-1,v+$),p.push(x[$].x),p.push(x[$].y);y.vertexLength+=x.length,y.primitiveLength+=x.length}}if(e$2e(r)&&e$2e(r[e.id]))h=r[e.id];else if(!0===_0x491cd4){var b=new Int32Array(p),T=b.length,C=_0x53e246._malloc(Int32Array.BYTES_PER_ELEMENT*T);_0x53e246.HEAP32.set(b,C/Int32Array.BYTES_PER_ELEMENT);var S=new Int32Array(_),w=S.length,E=_0x53e246._malloc(Int32Array.BYTES_PER_ELEMENT*w);_0x53e246.HEAP32.set(S,E/Int32Array.BYTES_PER_ELEMENT);var P=new Int32Array(10*T),A=_0x53e246._malloc(Int32Array.BYTES_PER_ELEMENT*T*10);_0x53e246.HEAP32.set(P,A/Int32Array.BYTES_PER_ELEMENT);var L=_0x54c521(C,T,E,w,2,A),M=new Int32Array(_0x53e246.HEAP32.buffer,A,L);h=new Int32Array(M),_0x53e246._free(C),_0x53e246._free(E),_0x53e246._free(A)}else h=z$$(p,_);for(var R=0;R<h.length;R+=3)this.indexArray.emplaceBack(f+h[R],f+h[R+1],f+h[R+2]);d.vertexLength+=l,d.primitiveLength+=h.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,n)},_0x3abd5c.register("FillBucket",_0x2c9633,{omit:["layers","patternFeatures"]});var _0x512a93=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.possiblyEvaluate=function(e,t,i){if(void 0===e.value)return new _0xab3045(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i),r="resolvedImage"===e.property.specification.type&&"string"!=typeof n?n.name:n,o=this._calculate(r,r,r,t);return new _0xab3045(this,{kind:"constant",value:o},t)}if("camera"===e.expression.kind){var a=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new _0xab3045(this,{kind:"constant",value:a},t)}return new _0xab3045(this,e.expression,t)},r.prototype.evaluate=function(e,t,i,n,r){if("source"===e.kind){var o=e.evaluate(t,i,n,r);return this._calculate(o,o,o,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},i,n),e.evaluate({zoom:Math.floor(t.zoom)},i,n),e.evaluate({zoom:Math.floor(t.zoom)+1},i,n),t):e.value},r.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},r.prototype.interpolate=function(e){return e},r}(_0xe8091e);_0x3abd5c.register("DataDrivenProperty",_0xe8091e);var _0x13acff=new _0x183b6f({"fill-sort-key":new _0xe8091e(_0x3d343c.layout_fill["fill-sort-key"])}),_0x2d51df=new _0x183b6f({"fill-antialias":new _0x55570d(_0x3d343c.paint_fill["fill-antialias"]),"fill-opacity":new _0xe8091e(_0x3d343c.paint_fill["fill-opacity"]),"fill-color":new _0xe8091e(_0x3d343c.paint_fill["fill-color"]),"fill-outline-color":new _0xe8091e(_0x3d343c.paint_fill["fill-outline-color"]),"fill-translate":new _0x55570d(_0x3d343c.paint_fill["fill-translate"]),"fill-translate-anchor":new _0x55570d(_0x3d343c.paint_fill["fill-translate-anchor"]),"fill-pattern":new _0x512a93(_0x3d343c.paint_fill["fill-pattern"])}),_0x949536={paint:_0x2d51df,layout:_0x13acff},_0x304cf3=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x949536)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},r.prototype.createBucket=function(e){return new _0x2c9633(e)},r.prototype.queryRadius=function(){return _0x20fd4c.translateDistance(this.paint.get("fill-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){var s=_0x20fd4c.translate(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),0,a);return _0x22dd4b.polygonIntersectsMultiPolygon(s,n)},r.prototype.isTileClipped=function(){return!0},r}(_0x5aba43),_0x2879f5=(_0x26c053=!0,function(e,t){var i=_0x26c053?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x26c053=!1,i}),_0x35ca25=_0x2879f5(void 0,(function(){return _0x35ca25.toString().search("(((.+)+)+)+$").toString().constructor(_0x35ca25).search("(((.+)+)+)+$")})),_0x26c053;_0x35ca25();var _0x25eb6b=["Unknown","Point","LineString","Polygon"],_0x4ed5c8=_0x2c23ed([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),_0x14cb06=_0x4ed5c8.members,_0x57641e=63,_0xd010a=Math.cos(Math.PI/180*37.5),_0x12e7d5=15,_0x51440d=20,_0x44ecdd=15,_0x5a6889=.5,_0x482ea4=Math.pow(2,_0x44ecdd-1)/_0x5a6889,_0x3ef083=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _0x188af9,this.indexArray=new _0x48dae8,this.programConfigurations=new ProgramConfigurationSet(_0x14cb06,e.layers,e.zoom),this.segments=new _0x1e8367,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x3ef083.prototype.populate=function(e,t){this.hasPattern=!1;for(var i=this.layers[0].layout.get("line-sort-key"),n=[],r=0,o=e;r<o.length;r+=1){var a=o[r],s=a.feature,l=a.index,u=a.sourceLayerIndex;if(this.layers[0]._featureFilter(new _0x47eac1(0),s)){var c=_0x182c2a(s),h=i?i.evaluate(s,{}):void 0,d={id:s.id,properties:s.properties,type:s.type,sourceLayerIndex:u,index:l,geometry:c,patterns:{},sortKey:h};n.push(d)}}i&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var f=0,p=n;f<p.length;f+=1){var _=p[f],m=_,g=m.geometry,x=m.index,y=m.sourceLayerIndex;if(this.hasPattern){var v=_0x23b08c("line",this.layers,_,this.zoom,t);this.patternFeatures.push(v)}else this.addFeature(_,g,x,{});var $=e[x].feature;t.featureIndex.insert($,g,x,y,this.index)}},_0x3ef083.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},_0x3ef083.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},_0x3ef083.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_0x3ef083.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_0x3ef083.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=_0x14cb06;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=_0x42145e.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0x42145e.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},_0x3ef083.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy()),this.programConfigurations.destroy(),this.segments.destroy())},_0x3ef083.prototype.clear=function(){e$2e(this.layoutVertexArray)&&(this.layoutVertexArray=null),e$2e(this.indexArray)&&(this.indexArray=null)},_0x3ef083.prototype.addFeature=function(e,t,i,n){for(var r=this.layers[0].layout,o=r.get("line-join").evaluate(e,{}),a=r.get("line-cap"),s=r.get("line-miter-limit"),l=r.get("line-round-limit"),u=0,c=t;u<c.length;u+=1){var h=c[u];this.addLine(h,e,o,a,s,l,i,n)}},_0x3ef083.prototype.addLine=function(e,t,i,n,r,o,a,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+t.properties.mapbox_clip_start,this.clipEnd=+t.properties.mapbox_clip_end;for(var l=0;l<e.length-1;l++)this.totalDistance+=e[l].dist(e[l+1])}for(var u="Polygon"===_0x25eb6b[t.type],c=e.length;c>=2&&e[c-1].equals(e[c-2]);)c--;for(var h=0;h<c-1&&e[h].equals(e[h+1]);)h++;if(!(c<(u?3:2))){"bevel"===i&&(r=1.05);var d,f=this.overscaling<=16?_0x12e7d5*ne$C/(512*this.overscaling):0,p=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray),_=void 0,m=void 0,g=void 0,x=void 0;this.e1=this.e2=-1,u&&(d=e[c-2],x=e[h].sub(d)._unit()._perp());for(var y=h;y<c;y++)if(!(m=u&&y===c-1?e[h+1]:e[y+1])||!e[y].equals(m)){x&&(g=x),d&&(_=d),d=e[y],x=m?m.sub(d)._unit()._perp():g;var v=(g=g||x).add(x);(0!==v.x||0!==v.y)&&v._unit();var $=g.x*x.x+g.y*x.y,b=v.x*x.x+v.y*x.y,T=0!==b?1/b:1/0,C=2*Math.sqrt(2-2*b),S=b<_0xd010a&&_&&m,w=g.x*x.y-g.y*x.x>0;if(S&&y>h){var E=d.dist(_);if(E>2*f){var P=d.sub(d.sub(_)._mult(f/E)._round());this.updateDistance(_,P),this.addCurrentVertex(P,g,0,0,p),_=P}}var A=_&&m,L=A?i:u?"butt":n;if(A&&"round"===L&&(T<o?L="miter":T<=2&&(L="fakeround")),"miter"===L&&T>r&&(L="bevel"),"bevel"===L&&(T>2&&(L="flipbevel"),T<r&&(L="miter")),_&&this.updateDistance(_,d),"miter"===L)v._mult(T),this.addCurrentVertex(d,v,0,0,p);else if("flipbevel"===L){if(T>100)v=x.mult(-1);else{var M=T*g.add(x).mag()/g.sub(x).mag();v._perp()._mult(M*(w?-1:1))}this.addCurrentVertex(d,v,0,0,p),this.addCurrentVertex(d,v.mult(-1),0,0,p)}else if("bevel"===L||"fakeround"===L){var R=-Math.sqrt(T*T-1),O=w?R:0,D=w?0:R;if(_&&this.addCurrentVertex(d,g,O,D,p),"fakeround"===L)for(var I=Math.round(180*C/Math.PI/_0x51440d),F=1;F<I;F++){var B=F/I;if(.5!==B){var N=B-.5;B+=B*N*(B-1)*((1.0904+$*($*(3.55645-1.43519*$)-3.2452))*N*N+(.848013+$*(.215638*$-1.06021)))}var G=x.sub(g)._mult(B)._add(g)._unit()._mult(w?-1:1);this.addHalfVertex(d,G.x,G.y,!1,w,0,p)}m&&this.addCurrentVertex(d,x,-O,-D,p)}else if("butt"===L)this.addCurrentVertex(d,v,0,0,p);else if("square"===L){var z=_?1:-1;this.addCurrentVertex(d,v,z,z,p)}else"round"===L&&(_&&(this.addCurrentVertex(d,g,0,0,p),this.addCurrentVertex(d,g,1,1,p,!0)),m&&(this.addCurrentVertex(d,x,-1,-1,p,!0),this.addCurrentVertex(d,x,0,0,p)));if(S&&y<c-1){var U=d.dist(m);if(U>2*f){var V=d.add(m.sub(d)._mult(f/U)._round());this.updateDistance(d,V),this.addCurrentVertex(V,x,0,0,p),d=V}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,a,s)}},_0x3ef083.prototype.addCurrentVertex=function(e,t,i,n,r,o){void 0===o&&(o=!1);var a=t.x+t.y*i,s=t.y-t.x*i,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,a,s,o,!1,i,r),this.addHalfVertex(e,l,u,o,!0,-n,r),this.distance>_0x482ea4/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,i,n,r,o))},_0x3ef083.prototype.addHalfVertex=function(e,t,i,n,r,o,a){var s=e.x,l=e.y,u=this.scaledDistance*_0x5a6889;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(r?1:0),Math.round(_0x57641e*t)+128,Math.round(_0x57641e*i)+128,1+(0===o?0:o<0?-1:1)|(63&u)<<2,u>>6);var c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),a.primitiveLength++),r?this.e2=c:this.e1=c},_0x3ef083.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(_0x482ea4-1):this.distance},_0x3abd5c.register("LineBucket",_0x3ef083,{omit:["layers","patternFeatures"]});var _0x57fb6e=(_0x500589=!0,function(e,t){var i=_0x500589?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x500589=!1,i}),_0x12ec8e=_0x57fb6e(void 0,(function(){return _0x12ec8e.toString().search("(((.+)+)+)+$").toString().constructor(_0x12ec8e).search("(((.+)+)+)+$")})),_0x500589;_0x12ec8e();var _0x20f347=function(e){this.specification=e};_0x20f347.prototype.possiblyEvaluate=function(e,t,i){if(void 0!==e.value){if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new _0x47eac1(Math.floor(t.zoom-1),t)),e.expression.evaluate(new _0x47eac1(Math.floor(t.zoom),t)),e.expression.evaluate(new _0x47eac1(Math.floor(t.zoom+1),t)),t)}},_0x20f347.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},_0x20f347.prototype.interpolate=function(e){return e},_0x3abd5c.register("CrossFadedProperty",_0x20f347);var _0x3a29b2=(_0x55aac5=!0,function(e,t){var i=_0x55aac5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55aac5=!1,i}),_0x3e4118=_0x3a29b2(void 0,(function(){return _0x3e4118.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e4118).search("(((.+)+)+)+$")})),_0x55aac5;_0x3e4118();var _0x32c87a=function(e){this.specification=e};_0x32c87a.prototype.possiblyEvaluate=function(e,t,i){return!!e.expression.evaluate(t,null,{},i)},_0x32c87a.prototype.interpolate=function(){return!1},_0x3abd5c.register("ColorRampProperty",_0x32c87a);var _0x2ec976=new _0x183b6f({"line-cap":new _0x55570d(_0x3d343c.layout_line["line-cap"]),"line-join":new _0xe8091e(_0x3d343c.layout_line["line-join"]),"line-miter-limit":new _0x55570d(_0x3d343c.layout_line["line-miter-limit"]),"line-round-limit":new _0x55570d(_0x3d343c.layout_line["line-round-limit"]),"line-sort-key":new _0xe8091e(_0x3d343c.layout_line["line-sort-key"])}),_0x172f28=new _0x183b6f({"line-opacity":new _0xe8091e(_0x3d343c.paint_line["line-opacity"]),"line-color":new _0xe8091e(_0x3d343c.paint_line["line-color"]),"line-translate":new _0x55570d(_0x3d343c.paint_line["line-translate"]),"line-translate-anchor":new _0x55570d(_0x3d343c.paint_line["line-translate-anchor"]),"line-width":new _0xe8091e(_0x3d343c.paint_line["line-width"]),"line-gap-width":new _0xe8091e(_0x3d343c.paint_line["line-gap-width"]),"line-offset":new _0xe8091e(_0x3d343c.paint_line["line-offset"]),"line-blur":new _0xe8091e(_0x3d343c.paint_line["line-blur"]),"line-dasharray":new _0x20f347(_0x3d343c.paint_line["line-dasharray"]),"line-pattern":new _0x512a93(_0x3d343c.paint_line["line-pattern"]),"line-gradient":new _0x32c87a(_0x3d343c.paint_line["line-gradient"])}),_0x15c6fd={paint:_0x172f28,layout:_0x2ec976},_0x549103=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,i){return i=new _0x47eac1(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),e.prototype.possiblyEvaluate.call(this,t,i)},t.prototype.evaluate=function(t,i,n,r){return i=extend({},i,{zoom:Math.floor(i.zoom)}),e.prototype.evaluate.call(this,t,i,n,r)},t}(_0xe8091e),_0x22cf1d=new _0x549103(_0x15c6fd.paint.properties["line-width"].specification);_0x22cf1d.useIntegerZoom=!0;var _0x11ec06=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x15c6fd)}function o(e,t){return t>0?t+2*e:e}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},r.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=renderColorRamp(e,"lineProgress"),this.gradientTexture=null},r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i),this.paint._values["line-floorwidth"]=_0x22cf1d.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},r.prototype.createBucket=function(e){return new _0x3ef083(e)},r.prototype.queryRadius=function(e){var t=e,i=o(_0x20fd4c.getMaximumPaintValue("line-width",this,t),_0x20fd4c.getMaximumPaintValue("line-gap-width",this,t)),n=_0x20fd4c.getMaximumPaintValue("line-offset",this,t);return i/2+Math.abs(n)+_0x20fd4c.translateDistance(this.paint.get("line-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,a,s){var l=_0x20fd4c.translate(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),0,s),u=o(this.paint.get("line-width")?.evaluate(t,i),this.paint.get("line-gap-width")?.evaluate(t,i)),c=s/2*(u=Math.max(u,5)),h=this.paint.get("line-offset")?.evaluate(t,i);return h&&(n=function(e,t){for(var i=[],n=new _0x4f59fa(0,0),r=0;r<e.length;r++){for(var o=e[r],a=[],s=0;s<o.length;s++){var l=o[s-1],u=o[s],c=o[s+1],h=0===s?n:u.sub(l)._unit()._perp(),d=s===o.length-1?n:c.sub(u)._unit()._perp(),f=h._add(d)._unit(),p=f.x*d.x+f.y*d.y;f._mult(1/p),a.push(f._mult(t)._add(u))}i.push(a)}return i}(n,h*s)),_0x22dd4b.polygonIntersectsBufferedMultiLine(l,n,c)},r.prototype.isTileClipped=function(){return!0},r}(_0x5aba43),_0x33b736=(_0x33ff51=!0,function(e,t){var i=_0x33ff51?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33ff51=!1,i}),_0x7a86c9=_0x33b736(void 0,(function(){return _0x7a86c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x7a86c9).search("(((.+)+)+)+$")})),_0x33ff51;_0x7a86c9();var _0x4af8ae={circle:_0x45533e,fill:_0x304cf3,line:_0x11ec06,symbol:_0x1a13f5};function _0x1f5d3a(e){return _0x4af8ae[e.type]?new _0x4af8ae[e.type](e):null}const _0x49e65b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x10a9d7=_0x49e65b(void 0,(function(){return _0x10a9d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x10a9d7).search("(((.+)+)+)+$")}));function _0x1fe793(e,t,i){let n,r,o;const a=_0x3ba476.devicePixelRatio>1?"@2x":"";let s=getJSON(t.transformRequest(t.normalizeSpriteURL(e,a,".json"),_0x3c9422.SpriteJSON),((e,t)=>{s=null,!o&&(o=e,n=t,u())})),l=getImage(t.transformRequest(t.normalizeSpriteURL(e,a,".png"),_0x3c9422.SpriteImage),((e,t)=>{l=null,!o&&(o=e,r=t,u())}));function u(){if(o)i(o);else if(n&&r){const e=_0x3ba476.getImageData(r,0),t={};for(const i in n){const{width:r,height:o,x:a,y:s,sdf:l,pixelRatio:u,stretchX:c,stretchY:h,content:d}=n[i],f=new _0x224c0e({width:r,height:o});_0x224c0e.copy(e,f,{x:a,y:s},{x:0,y:0},{width:r,height:o}),t[i]={data:f,pixelRatio:u,sdf:l,stretchX:c,stretchY:h,content:d}}i(null,t)}}return{cancel(){s&&(s.cancel(),s=null),l&&(l.cancel(),l=null)}}}_0x10a9d7();var _0x3845bc=(_0x3cbf3e=!0,function(e,t){var i=_0x3cbf3e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3cbf3e=!1,i}),_0xaf65e3=_0x3845bc(void 0,(function(){return _0xaf65e3.toString().search("(((.+)+)+)+$").toString().constructor(_0xaf65e3).search("(((.+)+)+)+$")})),_0x3cbf3e;_0xaf65e3();var _0x404faf=1;function _0x2fed99(){this.images={},this.imageCount=0,this.imageList=[],this.imagesCanvas={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new _0x224c0e({width:1,height:1}),this.dirty=!0}_0x2fed99.prototype.isLoaded=function(){return this.loaded},_0x2fed99.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,i=this.requestors;t<i.length;t+=1){var n=i[t],r=n.ids,o=n.callback;this._notify(r,o)}this.requestors=[]}},_0x2fed99.prototype.getImage=function(e){return this.images[e]},_0x2fed99.prototype.addImage=function(e,t){this._validate(e,t)&&(this.images[e]=t,this.imageCount++)},_0x2fed99.prototype.getImageCanvas=function(e){if(!e$2e(this.images[e]))return null;if(!e$2e(this.imagesCanvas[e])){var t=document.createElement("canvas"),i=this.images[e].data;t.width=i.width,t.height=i.height;for(var n=t.getContext("2d"),r=n.createImageData(i.width,i.height),o=i.width*i.height,a=0;a<o;a++)r.data[4*a]=i.data[4*a],r.data[4*a+1]=i.data[4*a+1],r.data[4*a+2]=i.data[4*a+2],r.data[4*a+3]=i.data[4*a+3];n.putImageData(r,0,0),this.imagesCanvas[e]=t}return this.imagesCanvas[e]},_0x2fed99.prototype._validate=function(e,t){var i=!0;return!this._validateStretch(t.stretchX,t.data&&t.data.width)&&(i=!1),!this._validateStretch(t.stretchY,t.data&&t.data.height)&&(i=!1),!this._validateContent(t.content,t)&&(i=!1),i},_0x2fed99.prototype._validateStretch=function(e,t){if(!e)return!0;for(var i=0,n=0,r=e;n<r.length;n+=1){var o=r[n];if(o[0]<i||o[1]<o[0]||t<o[1])return!1;i=o[1]}return!0},_0x2fed99.prototype._validateContent=function(e,t){return!e||4===e.length&&(!(e[0]<0||t.data.width<e[0])&&(!(e[1]<0||t.data.height<e[1])&&(!(e[2]<0||t.data.width<e[2])&&(!(e[3]<0||t.data.height<e[3])&&(!(e[2]<e[0])&&!(e[3]<e[1]))))))},_0x2fed99.prototype.updateImage=function(e,t){var i=this.images[e];t.version=i.version+1,this.images[e]=t,this.updatedImages[e]=!0},_0x2fed99.prototype.removeImage=function(e){var t=this.images[e];delete this.images[e],delete this.patterns[e],this.imageCount--,this.imageCount<0&&(this.imageCount=0),t.userImage&&t.userImage.onRemove&&t.userImage.onRemove()},_0x2fed99.prototype.listImages=function(){return this.imageList.length!=this.imageCount&&(this.imageList=Object.keys(this.images)),this.imageList},_0x2fed99.prototype.getImages=function(e,t){var i=!0;if(!this.isLoaded())for(var n=0,r=e;n<r.length;n+=1){var o=r[n];!this.images[o]&&(i=!1)}this.isLoaded()||i?this._notify(e,t):this.requestors.push({ids:e,callback:t})},_0x2fed99.prototype._notify=function(e,t){for(var i={},n=0,r=e;n<r.length;n+=1){var o=r[n];!this.images[o]&&console.log("styleimagemissing",{id:o});var a=this.images[o];a?i[o]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf,version:a.version,stretchX:a.stretchX,stretchY:a.stretchY,content:a.content,hasRenderCallback:Boolean(a.userImage&&a.userImage.render)}:console.warn('Image "'+o+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}t(null,i)},_0x2fed99.prototype.getAllImages=function(e){var t={};for(var i in this.images){var n=this.images[i],r=n.data.clone();e.push(r.data.buffer),t[i]={data:r,pixelRatio:n.pixelRatio,hasRenderCallback:Boolean(n.userImage&&n.userImage.render)}}return t},_0x2fed99.prototype.getPixelSize=function(){var e=this.atlasImage;return{width:e.width,height:e.height}},_0x2fed99.prototype.getPattern=function(e){var t=this.patterns[e],i=this.getImage(e);if(!i)return null;if(t&&t.position.version===i.version)return t.position;if(t)t.position.version=i.version;else{var n={w:i.data.width+2*_0x404faf,h:i.data.height+2*_0x404faf,x:0,y:0},r=new _0x9f22a4(n,i);this.patterns[e]={bin:n,position:r}}return this._updatePatternAtlas(),this.patterns[e].position},_0x2fed99.prototype.bind=function(e){e.gl,this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):(console.log("ImageManager.prototype.bind"),this.atlasTexture=new _0x556fd4(e,this.atlasImage,de$y.RGBA)),this.atlasTexture.bind(de$y.LINEAR,de$y.CLAMP_TO_EDGE)},_0x2fed99.prototype._updatePatternAtlas=function(){var e=[];for(var t in this.patterns)e.push(this.patterns[t].bin);var i=W$V(e),n=i.w,r=i.h,o=this.atlasImage;for(var a in o.resize({width:n||1,height:r||1}),this.patterns){var s=this.patterns[a].bin,l=s.x+_0x404faf,u=s.y+_0x404faf,c=this.images[a].data,h=c.width,d=c.height;_0x224c0e.copy(c,o,{x:0,y:0},{x:l,y:u},{width:h,height:d}),_0x224c0e.copy(c,o,{x:0,y:d-1},{x:l,y:u-1},{width:h,height:1}),_0x224c0e.copy(c,o,{x:0,y:0},{x:l,y:u+d},{width:h,height:1}),_0x224c0e.copy(c,o,{x:h-1,y:0},{x:l-1,y:u},{width:1,height:d}),_0x224c0e.copy(c,o,{x:0,y:0},{x:l+h,y:u},{width:1,height:d})}this.dirty=!0},_0x2fed99.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},_0x2fed99.prototype.dispatchRenderCallbacks=function(e){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(!this.callbackDispatchedThisFrame[n]){this.callbackDispatchedThisFrame[n]=!0;var r=this.images[n];renderStyleImage(r)&&this.updateImage(n,r)}}};const _0x5efefa=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x342929=_0x5efefa(void 0,(function(){return _0x342929.toString().search("(((.+)+)+)+$").toString().constructor(_0x342929).search("(((.+)+)+)+$")}));function _0x37a872(e,t,i,n,r){const o=256*t,a=o+255,s=n.transformRequest(n.normalizeGlyphsURL(i).replace("{fontstack}",e).replace("{range}",o+"-"+a),_0x3c9422.Glyphs);getArrayBuffer(s,((e,t)=>{if(e)r(e);else if(t){const e={};for(const i of _0x7f378d(t))e[i.id]=i;r(null,e)}}))}_0x342929();var _0x46b9da=(_0x3e7c08=!0,function(e,t){var i=_0x3e7c08?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3e7c08=!1,i}),_0x587b82=_0x46b9da(void 0,(function(){return _0x587b82.toString().search("(((.+)+)+)+$").toString().constructor(_0x587b82).search("(((.+)+)+)+$")})),_0x3e7c08;_0x587b82();var _0x4666a2=1e20;function _0x2f5430(e,t,i,n,r,o){this.fontSize=e||24,this.buffer=void 0===t?3:t,this.cutoff=n||.25,this.fontFamily=r||"sans-serif",this.fontWeight=o||"normal",this.radius=i||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function _0x1ea437(e,t,i,n,r,o,a){for(var s=0;s<t;s++){for(var l=0;l<i;l++)n[l]=e[l*t+s];for(_0xa41da4(n,r,o,a,i),l=0;l<i;l++)e[l*t+s]=r[l]}for(l=0;l<i;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(_0xa41da4(n,r,o,a,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(r[s])}}function _0xa41da4(e,t,i,n,r){i[0]=0,n[0]=-_0x4666a2,n[1]=+_0x4666a2;for(var o=1,a=0;o<r;o++){for(var s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);s<=n[a];)a--,s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);i[++a]=o,n[a]=s,n[a+1]=+_0x4666a2}for(o=0,a=0;o<r;o++){for(;n[a+1]<o;)a++;t[o]=(o-i[a])*(o-i[a])+e[i[a]]}}_0x2f5430.prototype.draw=function(e){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(e,this.buffer,this.middle);for(var t=this.ctx.getImageData(0,0,this.size,this.size),i=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var r=t.data[4*n+3]/255;this.gridOuter[n]=1===r?0:0===r?_0x4666a2:Math.pow(Math.max(0,.5-r),2),this.gridInner[n]=1===r?_0x4666a2:0===r?0:Math.pow(Math.max(0,r-.5),2)}for(_0x1ea437(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),_0x1ea437(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var o=this.gridOuter[n]-this.gridInner[n];i[n]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return i};const _0xf52bfb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x23fa6a=_0xf52bfb(void 0,(function(){return _0x23fa6a.toString().search("(((.+)+)+)+$").toString().constructor(_0x23fa6a).search("(((.+)+)+)+$")}));function _0x175ad1(e,t){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={}}_0x23fa6a(),_0x175ad1.prototype.setURL=function(e){this.url=e},_0x175ad1.prototype.getGlyphs=function(e,t){const i=[];for(const t in e)for(const n of e[t])i.push({stack:t,id:n});asyncAll(i,(({stack:e,id:t},i)=>{let n=this.entries[e];!n&&(n=this.entries[e]={glyphs:{},requests:{}});let r=n.glyphs[t];if(void 0!==r)return void i(null,{stack:e,id:t,glyph:r});if(r=this._tinySDF(n,e,t),r)return n.glyphs[t]=r,void i(null,{stack:e,id:t,glyph:r});const o=Math.floor(t/256);if(256*o>65535)return void i(new Error("glyphs > 65535 not supported"));let a=n.requests[o];!a&&(a=n.requests[o]=[],_0x175ad1.loadGlyphRange(e,o,this.url,this.requestManager,((e,t)=>{if(t)for(const e in t)!this._doesCharSupportLocalGlyph(+e)&&(n.glyphs[+e]=t[+e]);for(const i of a)i(e,t);delete n.requests[o]}))),a.push(((n,r)=>{n?i(n):r&&i(null,{stack:e,id:t,glyph:r[t]||null})}))}),((e,i)=>{if(e)t(e);else if(i){const e={};for(const{stack:t,id:n,glyph:r}of i)(e[t]||(e[t]={}))[n]=r&&{id:r.id,bitmap:r.bitmap.clone(),metrics:r.metrics};t(null,e)}}))},_0x175ad1.prototype._doesCharSupportLocalGlyph=function(e){return!!this.localIdeographFontFamily&&(_0x3de98d["CJK Unified Ideographs"](e)||_0x3de98d["Hangul Syllables"](e)||_0x3de98d.Hiragana(e)||_0x3de98d.Katakana(e))},_0x175ad1.prototype._tinySDF=function(e,t,i){const n=this.localIdeographFontFamily;if(!n)return;if(!this._doesCharSupportLocalGlyph(i))return;let r=e.tinySDF;if(!r){let i="400";/bold/i.test(t)?i="900":/medium/i.test(t)?i="500":/light/i.test(t)&&(i="200"),r=e.tinySDF=new _0x175ad1.TinySDF(24,3,8,.25,n,i)}return{id:i,bitmap:new _0x18147d({width:30,height:30},r.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}},_0x175ad1.loadGlyphRange=_0x37a872,_0x175ad1.TinySDF=_0x2f5430;var _0x3d095b=(_0x412162=!0,function(e,t){var i=_0x412162?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x412162=!1,i}),_0x7e61c2=_0x3d095b(void 0,(function(){return _0x7e61c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x7e61c2).search("(((.+)+)+)+$")})),_0x412162;_0x7e61c2();var _0x262d0c=function(e,t){this.width=e,this.height=t,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};_0x262d0c.prototype.getDash=function(e,t){var i=e.join(",")+String(t);return!this.positions[i]&&(this.positions[i]=this.addDash(e,t)),this.positions[i]},_0x262d0c.prototype.addDash=function(e,t){var i=t?7:0,n=2*i+1;if(this.nextRow+n>this.height)return null;for(var r=0,o=0;o<e.length;o++)r+=e[o];for(var a=this.width/r,s=a/2,l=e.length%2==1,u=-i;u<=i;u++)for(var c=this.nextRow+i+u,h=this.width*c,d=l?-e[e.length-1]:0,f=e[0],p=1,_=0;_<this.width;_++){for(;f<_/a;)d=f,f+=e[p],l&&p===e.length-1&&(f+=e[0]),p++;var m=Math.abs(_-d*a),g=Math.abs(_-f*a),x=Math.min(m,g),y=p%2==1,v=void 0;if(t){var $=i?u/i*(s+1):0;if(y){var b=s-Math.abs($);v=Math.sqrt(x*x+b*b)}else v=s-Math.sqrt(x*x+$*$)}else v=(y?1:-1)*x;this.data[3+4*(h+_)]=Math.max(0,Math.min(255,v+128))}var T={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:r};return this.nextRow+=n,this.dirty=!0,T},_0x262d0c.prototype.bind=function(e){var t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.RGBA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,this.data))},_0x262d0c.prototype.getTexture=function(e){return this.cesiumTexture?this.dirty&&(this.dirty=!1,this.cesiumTexture.copyFrom({width:this.width,height:this.height,arrayBufferView:this.data})):this.cesiumTexture=new t$U({context:e,source:{arrayBufferView:this.data},width:this.width,height:this.height,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT})}),this.cesiumTexture};var _0x5e2a8a=(_0xeb37d9=!0,function(e,t){var i=_0xeb37d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xeb37d9=!1,i}),_0x4c8b9f=_0x5e2a8a(void 0,(function(){return _0x4c8b9f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c8b9f).search("(((.+)+)+)+$")})),_0xeb37d9;_0x4c8b9f();const _0x5e1e07=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function _0x262613(e){var t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var i="[",n=0,r=e;n<r.length;n+=1){i+=_0x262613(r[n])+","}return i+"]"}for(var o=Object.keys(e).sort(),a="{",s=0;s<o.length;s++)a+=JSON.stringify(o[s])+":"+_0x262613(e[o[s]])+",";return a+"}"}function _0x33986e(e){for(var t="",i=0,n=_0x5e1e07;i<n.length;i+=1){t+="/"+_0x262613(e[n[i]])}return t}function _0x1c61c4(e,t){for(var i={},n=0;n<e.length;n++){var r=t&&t[e[n].id]||_0x33986e(e[n]);t&&(t[e[n].id]=r);var o=i[r];!o&&(o=i[r]=[]),o.push(e[n])}var a=[];for(var s in i)a.push(i[s]);return a}var _0x4b2039=(_0x2bef37=!0,function(e,t){var i=_0x2bef37?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2bef37=!1,i}),_0x39d2be=_0x4b2039(void 0,(function(){return _0x39d2be.toString().search("(((.+)+)+)+$").toString().constructor(_0x39d2be).search("(((.+)+)+)+$")})),_0x2bef37;_0x39d2be();var _0x30db1c=function(e){this.keyCache={},e&&this.replace(e)};function _0x3a0046(e){var t=[];for(var i in e)t.push(e[i]);return t}_0x30db1c.prototype.replace=function(e){this._layerConfigs={},this._layers={},this.update(e,[])},_0x30db1c.prototype.update=function(e,t){for(var i=this,n=0,r=e;n<r.length;n+=1){var o=r[n];this._layerConfigs[o.id]=o;var a=_0x1f5d3a(o);null!=a&&(this._layers[o.id]=a,a._featureFilter=_0x51a3ff.createFilter(a.filter),this.keyCache[o.id]&&delete this.keyCache[o.id])}for(var s=0,l=t;s<l.length;s+=1){var u=l[s];delete this.keyCache[u],delete this._layerConfigs[u],delete this._layers[u]}this.familiesBySource={};for(var c=0,h=_0x1c61c4(_0x3a0046(this._layerConfigs),this.keyCache);c<h.length;c+=1){var d=h[c].map((function(e){return i._layers[e.id]})),f=d[0];if(null!=f&&"none"!==f.visibility){var p=f.source||"",_=this.familiesBySource[p];!_&&(_=this.familiesBySource[p]={});var m=f.sourceLayer,g=_[m];!g&&(g=_[m]=[]),g.push(d)}}};var _0x49b963=(_0x2b23b9=!0,function(e,t){var i=_0x2b23b9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b23b9=!1,i}),_0x5056ff=_0x49b963(void 0,(function(){return _0x5056ff.toString().search("(((.+)+)+)+$").toString().constructor(_0x5056ff).search("(((.+)+)+)+$")})),_0x2b23b9;function _0x361a0e(e){this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}_0x5056ff(),_0x361a0e.prototype.trigger=function(){!this._triggered&&(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))};const _0x13475f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4589a8=_0x13475f(void 0,(function(){return _0x4589a8.toString().search("(((.+)+)+)+$").toString().constructor(_0x4589a8).search("(((.+)+)+)+$")}));function _0x3cc294(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function _0x83f691(e,t,i){this.target=e,this.parent=t,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},_0x3cc294(["receive","process"],this),this.invoker=new _0x361a0e(this.process),this.target.addEventListener("message",this.receive,!1)}_0x4589a8(),_0x83f691.prototype.send=function(e,t,i,n){const r=++_0x83f691.taskId;i&&(this.callbacks[r]=i);const o=[];return this.target.postMessage({id:r,type:e,hasCallback:!!i,targetMapId:n,sourceMapId:this.mapId,data:_0x3abd5c.serialize(t,o)},o),{cancel:()=>{i&&delete this.callbacks[r],this.target.postMessage({id:r,type:"<cancel>",targetMapId:n,sourceMapId:this.mapId})}}},_0x83f691.prototype.receive=function(e){const t=e.data,i=t.id;if(i&&(!t.targetMapId||this.mapId===t.targetMapId))if("<cancel>"===t.type){delete this.tasks[i];const e=this.cancelCallbacks[i];delete this.cancelCallbacks[i],e&&e()}else this.tasks[i]=t,this.taskQueue.push(i),this.invoker.trigger()},_0x83f691.prototype.process=function(){if(!this.taskQueue.length)return;const e=this.taskQueue.shift(),t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t)if("<response>"===t.type){const i=this.callbacks[e];delete this.callbacks[e],i&&(t.error?i(_0x3abd5c.deserialize(t.error)):i(null,_0x3abd5c.deserialize(t.data)))}else{let i=!1;const n=t.hasCallback?(t,n)=>{i=!0,delete this.cancelCallbacks[e];const r=[];this.target.postMessage({id:e,type:"<response>",sourceMapId:this.mapId,error:t?_0x3abd5c.serialize(t):null,data:_0x3abd5c.serialize(n,r)},r)}:e=>{i=!0};let r=null;const o=_0x3abd5c.deserialize(t.data);if(this.parent[t.type])r=this.parent[t.type](t.sourceMapId,o,n);else if(this.parent.getWorkerSource){const e=t.type.split(".");r=this.parent.getWorkerSource(t.sourceMapId,e[0],o.source)[e[1]](o,n)}else n(new Error("Could not find function "+t.type));!i&&r&&r.cancel&&(this.cancelCallbacks[e]=r.cancel)}},_0x83f691.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},_0x83f691.taskId=0;const _0x55f1ab=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x53ab15=_0x55f1ab(void 0,(function(){return _0x53ab15.toString().search("(((.+)+)+)+$").toString().constructor(_0x53ab15).search("(((.+)+)+)+$")}));function _0x184837(e,t){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=uniqueId();const i=this.workerPool.acquire(this.id);for(let e=0;e<i.length;e++){const n=i[e],r=new _0x184837.Actor(n,t,this.id);r.name="Worker "+e,this.actors.push(r)}}_0x53ab15(),_0x184837.prototype.broadcast=function(e,t,i){i=i||function(){},asyncAll(this.actors,((i,n)=>{i.send(e,t,n)}),i)},_0x184837.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},_0x184837.prototype.remove=function(){this.actors.forEach((e=>{e.remove()})),this.actors=[],this.workerPool.release(this.id)},_0x184837.Actor=_0x83f691;const _0x3cd6f6=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1210b8=_0x3cd6f6(void 0,(function(){return _0x1210b8.toString().search("(((.+)+)+)+$").toString().constructor(_0x1210b8).search("(((.+)+)+)+$")}));function _0x4790f0(){this.active={}}_0x1210b8(),_0x4790f0.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length<_0x4790f0.workerCount;)this.workers.push(new window.Worker(window.mvtWorkerUrl));return this.active[e]=!0,this.workers.slice()},_0x4790f0.prototype.release=function(e){delete this.active[e],0===Object.keys(this.active).length&&(this.workers.forEach((e=>{e.terminate()})),this.workers=[])};const _0x311dfe=Math.floor(s$Z.hardwareConcurrency/2);_0x4790f0.workerCount=Math.max(Math.min(_0x311dfe,6),1);const _0x3b31ab=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2c28f3=_0x3b31ab(void 0,(function(){return _0x2c28f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c28f3).search("(((.+)+)+)+$")}));let _0x1c008f;function _0x194ba2(){return!_0x1c008f&&(_0x1c008f=new _0x4790f0),_0x1c008f}function n$J(e,t){if(e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).billboardStyle)){var i=e.billboardStyle;e.image=u$Z(i.image,void 0)}if(e$2e(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$15("disableDepthTestDistance must be greater than or equal to 0.0.");var n=e.translucencyByDistance,r=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,a=e.distanceDisplayCondition;if(e$2e(n)){if(n.far<=n.near)throw new t$15("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=o$Y.clone(n)}if(e$2e(r)){if(r.far<=r.near)throw new t$15("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");r=o$Y.clone(r)}if(e$2e(o)){if(o.far<=o.near)throw new t$15("scaleByDistance.far must be greater than scaleByDistance.near.");o=o$Y.clone(o)}if(e$2e(a)){if(a.far<=a.near)throw new t$15("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");a=r$Z.clone(a)}this._show=u$Z(e.show,!0),this._position=o$1p.clone(u$Z(e.position,o$1p.ZERO)),this._actualPosition=o$1p.clone(this._position),this._volTexCoord=o$1p.clone(u$Z(e.volTexCoord,o$1p.ZERO)),this._pixelOffset=o$1o.clone(u$Z(e.pixelOffset,o$1o.ZERO)),this._translate=new o$1o(0,0),this._eyeOffset=o$1p.clone(u$Z(e.eyeOffset,o$1p.ZERO)),this._heightReference=u$Z(e.heightReference,k$R.NONE),this._verticalOrigin=u$Z(e.verticalOrigin,S$Q.CENTER),this._horizontalOrigin=u$Z(e.horizontalOrigin,j$V.CENTER),this._scale=u$Z(e.scale,1),this._color=e$1X.clone(u$Z(e.color,e$1X.WHITE)),this._rotation=u$Z(e.rotation,0),this._alignedAxis=o$1p.clone(u$Z(e.alignedAxis,o$1p.ZERO)),this._width=e.width,this._height=e.height,this._scaleByDistance=o,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=r,this._sizeInMeters=u$Z(e.sizeInMeters,!1),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=u$Z(e.collection,t),this._pickId=void 0,this._pickPrimitive=u$Z(e._pickPrimitive,this),this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageIndex=-1,this._imageIndexPromise=void 0,this._imageId=void 0,this._image=u$Z(e.image,void 0),this._imageSubRegion=void 0,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0,this._mvtLayerID=e.mvtLayerID,this._mapName=e.mapName,this._mvtProperties=e.mvtProperties,this._associativeMvtLabel=void 0;var s=e.image,l=e.imageId;e$2e(s)&&(e$2e(l)||(l="string"==typeof s?s:e$2e(s.src)?s.src:e$1T()),this._imageId=l,this._image=s),e$2e(e.imageSubRegion)&&(this._imageId=l,this._imageSubRegion=e.imageSubRegion),e$2e(this._billboardCollection._textureAtlas)&&this._loadImage(),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=C$14.SCENE3D,this._clusterShow=!0,this._outlineColor=e$1X.clone(u$Z(e.outlineColor,e$1X.BLACK)),this._outlineWidth=u$Z(e.outlineWidth,0),this._updateClamping(),this._screenSpacePosition=new o$1o,this._opacityState={opacity:0,placed:!1}}_0x2c28f3();var L$_=n$J.SHOW_INDEX=0,T$Q=n$J.POSITION_INDEX=1,F$W=n$J.PIXEL_OFFSET_INDEX=2,Z$Q=n$J.EYE_OFFSET_INDEX=3,U$R=n$J.HORIZONTAL_ORIGIN_INDEX=4,j$T=n$J.VERTICAL_ORIGIN_INDEX=5,J$N=n$J.SCALE_INDEX=6,w$P=n$J.IMAGE_INDEX_INDEX=7,z$O=n$J.COLOR_INDEX=8,K$M=n$J.ROTATION_INDEX=9,Q$R=n$J.ALIGNED_AXIS_INDEX=10,$$O=n$J.SCALE_BY_DISTANCE_INDEX=11,ii$5=n$J.TRANSLUCENCY_BY_DISTANCE_INDEX=12,ei$5=n$J.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,ti$6=n$J.DISTANCE_DISPLAY_CONDITION=14,ni$5=n$J.DISABLE_DEPTH_DISTANCE=15;n$J.TEXTURE_COORDINATE_BOUNDS=16;var si$6=n$J.VOL_TEXCOORD_INDEX=17,W$T=n$J.SDF_INDEX=18,ai$6=n$J.OPACITY_STATE_INDEX=19;function o$S(e,t){var i=e._billboardCollection;e$2e(i)&&(i._updateBillboard(e,t),e._dirty=!0)}n$J.NUMBER_OF_PROPERTIES=20,Object.defineProperties(n$J.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._show!==e&&(this._show=e,o$S(this,L$_))}},position:{get:function(){return this._position},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._position;o$1p.equals(t,e)||(o$1p.clone(e,t),o$1p.clone(e,this._actualPosition),this._updateClamping(),o$S(this,T$Q))}},heightReference:{get:function(){return this._heightReference},set:function(e){if(!e$2e(e))throw new t$15("value is required.");e!==this._heightReference&&(this._heightReference=e,this._updateClamping(),o$S(this,T$Q))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._pixelOffset;o$1o.equals(t,e)||(o$1o.clone(e,t),o$S(this,F$W))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._scaleByDistance;o$Y.equals(t,e)||(this._scaleByDistance=o$Y.clone(e,t),o$S(this,$$O))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._translucencyByDistance;o$Y.equals(t,e)||(this._translucencyByDistance=o$Y.clone(e,t),o$S(this,ii$5))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._pixelOffsetScaleByDistance;o$Y.equals(t,e)||(this._pixelOffsetScaleByDistance=o$Y.clone(e,t),o$S(this,ei$5))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._eyeOffset;o$1p.equals(t,e)||(o$1p.clone(e,t),o$S(this,Z$Q))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._horizontalOrigin!==e&&(this._horizontalOrigin=e,o$S(this,U$R))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._verticalOrigin!==e&&(this._verticalOrigin=e,o$S(this,j$T))}},scale:{get:function(){return this._scale},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._scale!==e&&(this._scale=e,o$S(this,J$N))}},color:{get:function(){return this._color},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._color;e$1X.equals(t,e)||(e$1X.clone(e,t),o$S(this,z$O))}},rotation:{get:function(){return this._rotation},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._rotation!==e&&(this._rotation=e,o$S(this,K$M))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._alignedAxis;o$1p.equals(t,e)||(o$1p.clone(e,t),o$S(this,Q$R))}},width:{get:function(){return u$Z(this._width,this._imageWidth)},set:function(e){this._width!==e&&(this._width=e,o$S(this,w$P))}},height:{get:function(){return u$Z(this._height,this._imageHeight)},set:function(e){this._height!==e&&(this._height=e,o$S(this,w$P))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,o$S(this,z$O))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!r$Z.equals(e,this._distanceDisplayCondition)){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");this._distanceDisplayCondition=r$Z.clone(e,this._distanceDisplayCondition),o$S(this,ti$6)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(e$2e(e)&&e<0)throw new t$15("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,o$S(this,ni$5)}}},volTextureCoord:{get:function(){return this._volTexCoord},set:function(e){this._volTexCoord!==e&&(this._volTexCoord=e,o$S(this,si$6))}},id:{get:function(){return this._id},set:function(e){this._id=e,e$2e(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,e$2e(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageId},set:function(e){e$2e(e)?"string"==typeof e?this.setImage(e,e):e instanceof t$10?this.setImage(e.url,e):e$2e(e.src)?this.setImage(e.src,e):this.setImage(e$1T(),e):(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=void 0,this._image=void 0,this._imageIndexPromise=void 0,o$S(this,w$P))}},ready:{get:function(){return-1!==this._imageIndex}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=o$1p.clone(e,this._actualClampedPosition),o$S(this,T$Q)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,o$S(this,L$_))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._outlineColor;e$1X.equals(t,e)||(e$1X.clone(e,t),o$S(this,W$T))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,o$S(this,W$T))}},opacityState:{get:function(){return this._opacityState},set:function(e){(this._opacityState.opacity!==e.opacity||this._opacityState.placed!==e.placed)&&(this._opacityState={opacity:e.opacity,placed:e.placed},o$S(this,ai$6))}}}),n$J.prototype.getPickId=function(e){return e$2e(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId},n$J.prototype._updateClamping=function(){n$J._updateClamping(this._billboardCollection,this)};var C$U=new a$18,b$10=new o$1p;n$J._updateClamping=function(e,t){var i=e._scene;if(e$2e(i)&&e$2e(i.globe)){var n=i.globe,r=n.ellipsoid,o=n._surface,a=i.frameState.mode,s=a!==t._mode;if(t._mode=a,(t._heightReference===k$R.NONE||s)&&e$2e(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference!==k$R.NONE&&e$2e(t._position)){var l=r.cartesianToCartographic(t._position);if(e$2e(l)){e$2e(t._removeCallbackFunc)&&t._removeCallbackFunc();e=u$Z(t._labelCollection,t._billboardCollection);t._removeCallbackFunc=o.updateHeight(l,c,e$2e(e)&&e._isMVT?void 0:i),a$18.clone(l,C$U);var u=n.getHeight(l);e$2e(u)&&(C$U.height=u),r.cartographicToCartesian(C$U,b$10),a!==C$14.SCENE3D&&(b$10=m$19.convertToColumbusCartesian(b$10)),c(b$10)}else t._actualClampedPosition=void 0}}else if(t._heightReference!==k$R.NONE)throw new t$15("Height reference is not supported without a scene and globe.");function c(e){if(t._heightReference===k$R.RELATIVE_TO_GROUND)if(t._mode===C$14.SCENE3D){var i=r.cartesianToCartographic(e,C$U);i.height+=l.height,r.cartographicToCartesian(i,e)}else e.x+=l.height;t._clampedPosition=o$1p.clone(e,t._clampedPosition)}},n$J.prototype._loadImage=function(){var e,t=this._billboardCollection._textureAtlas,i=this._imageId,n=this._image,r=this._imageSubRegion;if(e$2e(n)&&(e=t.addImage(i,n)),e$2e(r)&&(e=t.addSubRegion(i,r)),this._imageIndexPromise=e,e$2e(e)){var o=this;e.then((function(e){if(o._imageId===i&&o._image===n&&f$1a.equals(o._imageSubRegion,r)){var a=t.textureCoordinates[e];o._imageWidth=t.texture.width*a.width,o._imageHeight=t.texture.height*a.height,o._imageIndex=e,o._ready=!0,o._image=void 0,o._imageIndexPromise=void 0,o$S(o,w$P)}})).otherwise((function(e){console.error("Error loading image for billboard: "+e),o._imageIndexPromise=void 0}))}},n$J.prototype.setImage=function(e,t){if(!e$2e(e))throw new t$15("id is required.");if(!e$2e(t))throw new t$15("image is required.");this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,e$2e(this._billboardCollection._textureAtlas)&&this._loadImage())},n$J.prototype.setImageSubRegion=function(e,t){if(!e$2e(e))throw new t$15("id is required.");if(!e$2e(t))throw new t$15("subRegion is required.");this._imageId===e&&f$1a.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=f$1a.clone(t),e$2e(this._billboardCollection._textureAtlas)&&this._loadImage())},n$J.prototype._setTranslate=function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._translate;o$1o.equals(t,e)||(o$1o.clone(e,t),o$S(this,F$W))},n$J.prototype._getActualPosition=function(){return e$2e(this._clampedPosition)?this._clampedPosition:this._actualPosition},n$J.prototype._setActualPosition=function(e){e$2e(this._clampedPosition)||o$1p.clone(e,this._actualPosition),o$S(this,T$Q)};var H$W=new e$2c;n$J._computeActualPosition=function(e,t,i,n){return e$2e(e._clampedPosition)?(i.mode!==e._mode&&e._updateClamping(),e._clampedPosition):i.mode===C$14.SCENE3D?t:(p$1d.multiplyByPoint(n,t,H$W),s$R.computeActualWgs84Position(i,H$W))};var M$T=new o$1p;n$J._computeScreenSpacePosition=function(e,t,i,n,r,o){var a=p$1d.multiplyByPoint(e,t,M$T),s=s$R.wgs84WithEyeOffsetToWindowCoordinates(r,a,i,o);if(e$2e(s))return o$1o.add(s,n,s),s};var v$G=new o$1o(0,0);n$J.prototype.computeScreenSpacePosition=function(e,t){var i=this._billboardCollection;if(e$2e(t)||(t=this._screenSpacePosition),!e$2e(i))throw new t$15("Billboard must be in a collection. Was it removed?");if(!e$2e(e))throw new t$15("scene is required.");o$1o.clone(this._pixelOffset,v$G),o$1o.add(v$G,this._translate,v$G);var n=i.modelMatrix,r=this._position;if(e$2e(this._clampedPosition)&&(r=this._clampedPosition,e.mode!==C$14.SCENE3D)){var o=e.mapProjection,a=o.ellipsoid,s=o.unproject(r,C$U);r=a.cartographicToCartesian(s,M$T),n=p$1d.IDENTITY}return n$J._computeScreenSpacePosition(n,r,this._eyeOffset,v$G,e,t)},n$J.getScreenSpaceBoundingBox=function(e,t,i){var n=e.width,r=e.height,o=e.scale;n*=o,r*=o;var a=t.x;e.horizontalOrigin===j$V.RIGHT?a-=n:e.horizontalOrigin===j$V.CENTER&&(a-=.5*n);var s=t.y;return e.verticalOrigin===S$Q.BOTTOM||e.verticalOrigin===S$Q.BASELINE?s-=r:e.verticalOrigin===S$Q.CENTER&&(s-=.5*r),e$2e(i)||(i=new f$1a),i.x=a,i.y=s,i.width=n,i.height=r,i},n$J.prototype.equals=function(e){return this===e||e$2e(e)&&this._id===e._id&&o$1p.equals(this._position,e._position)&&this._imageId===e._imageId&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&f$1a.equals(this._imageSubRegion,e._imageSubRegion)&&e$1X.equals(this._color,e._color)&&o$1o.equals(this._pixelOffset,e._pixelOffset)&&o$1o.equals(this._translate,e._translate)&&o$1p.equals(this._eyeOffset,e._eyeOffset)&&o$Y.equals(this._scaleByDistance,e._scaleByDistance)&&o$Y.equals(this._translucencyByDistance,e._translucencyByDistance)&&o$Y.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&r$Z.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},n$J.prototype._destroy=function(){e$2e(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),e$2e(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0},n$J.prototype.setBillboardStyle=function(e){!e$2e(e)||(this.image=u$Z(e.image,this._image))};const _0x13b492=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3c1aea=_0x13b492(void 0,(function(){return _0x3c1aea.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c1aea).search("(((.+)+)+)+$")}));_0x3c1aea();class _0x694f71{constructor(e,t,i){const n=this.boxCells=[],r=this.circleCells=[];this.xCellCount=Math.ceil(e/i),this.yCellCount=Math.ceil(t/i);for(let e=0;e<this.xCellCount*this.yCellCount;e++)n.push([]),r.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=t,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/t,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,t,i,n,r){this._forEachCell(t,i,n,r,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)}insertCircle(e,t,i,n){this._forEachCell(t-n,i-n,t+n,i+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(i),this.circles.push(n)}_insertBoxCell(e,t,i,n,r,o){this.boxCells[r].push(o)}_insertCircleCell(e,t,i,n,r,o){this.circleCells[r].push(o)}_query(e,t,i,n,r,o){if(i<0||e>this.width||n<0||t>this.height)return!r&&[];const a=[];if(e<=0&&t<=0&&this.width<=i&&this.height<=n){if(r)return!0;for(let e=0;e<this.boxKeys.length;e++)a.push({key:this.boxKeys[e],x1:this.bboxes[4*e],y1:this.bboxes[4*e+1],x2:this.bboxes[4*e+2],y2:this.bboxes[4*e+3]});for(let e=0;e<this.circleKeys.length;e++){const t=this.circles[3*e],i=this.circles[3*e+1],n=this.circles[3*e+2];a.push({key:this.circleKeys[e],x1:t-n,y1:i-n,x2:t+n,y2:i+n})}return o?a.filter(o):a}{const s={hitTest:r,seenUids:{box:{},circle:{}}};return this._forEachCell(e,t,i,n,this._queryCell,a,s,o),r?a.length>0:a}}_queryCircle(e,t,i,n,r){const o=e-i,a=e+i,s=t-i,l=t+i;if(a<0||o>this.width||l<0||s>this.height)return!n&&[];const u=[],c={hitTest:n,circle:{x:e,y:t,radius:i},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,u,c,r),n?u.length>0:u}query(e,t,i,n,r){return this._query(e,t,i,n,!1,r)}hitTest(e,t,i,n,r){return this._query(e,t,i,n,!0,r)}hitTestCircle(e,t,i,n){return this._queryCircle(e,t,i,!0,n)}_queryCell(e,t,i,n,r,o,a,s){const l=a.seenUids,u=this.boxCells[r];if(null!==u){const r=this.bboxes;for(const c of u)if(!l.box[c]){l.box[c]=!0;const u=4*c;if(e<=r[u+2]&&t<=r[u+3]&&i>=r[u+0]&&n>=r[u+1]&&(!s||s(this.boxKeys[c]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[c],x1:r[u],y1:r[u+1],x2:r[u+2],y2:r[u+3]})}}}const c=this.circleCells[r];if(null!==c){const r=this.circles;for(const u of c)if(!l.circle[u]){l.circle[u]=!0;const c=3*u;if(this._circleAndRectCollide(r[c],r[c+1],r[c+2],e,t,i,n)&&(!s||s(this.circleKeys[u]))){if(a.hitTest)return o.push(!0),!0;{const e=r[c],t=r[c+1],i=r[c+2];o.push({key:this.circleKeys[u],x1:e-i,y1:t-i,x2:e+i,y2:t+i})}}}}}_queryCellCircle(e,t,i,n,r,o,a,s){const l=a.circle,u=a.seenUids,c=this.boxCells[r];if(null!==c){const e=this.bboxes;for(const t of c)if(!u.box[t]){u.box[t]=!0;const i=4*t;if(this._circleAndRectCollide(l.x,l.y,l.radius,e[i+0],e[i+1],e[i+2],e[i+3])&&(!s||s(this.boxKeys[t])))return o.push(!0),!0}}const h=this.circleCells[r];if(null!==h){const e=this.circles;for(const t of h)if(!u.circle[t]){u.circle[t]=!0;const i=3*t;if(this._circlesCollide(e[i],e[i+1],e[i+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[t])))return o.push(!0),!0}}}_forEachCell(e,t,i,n,r,o,a,s){const l=this._convertToXCellCoord(e),u=this._convertToYCellCoord(t),c=this._convertToXCellCoord(i),h=this._convertToYCellCoord(n);for(let d=l;d<=c;d++)for(let l=u;l<=h;l++){const u=this.xCellCount*l+d;if(r.call(this,e,t,i,n,u,o,a,s))return}}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,i,n,r,o){const a=n-e,s=r-t,l=i+o;return l*l>a*a+s*s}_circleAndRectCollide(e,t,i,n,r,o,a){const s=(o-n)/2,l=Math.abs(e-(n+s));if(l>s+i)return!1;const u=(a-r)/2,c=Math.abs(t-(r+u));if(c>u+i)return!1;if(l<=s||c<=u)return!0;const h=l-s,d=c-u;return h*h+d*d<=i*i}}const _0x52cda4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2ea4d3=_0x52cda4(void 0,(function(){return _0x2ea4d3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ea4d3).search("(((.+)+)+)+$")}));_0x2ea4d3();const _0xe23e71=100;class _0x5091d4{constructor(e,t,i,n,r){this.transform=i,this.grid=n||new _0x694f71(e+2*_0xe23e71,t+2*_0xe23e71,25),this.ignoredGrid=r||new _0x694f71(e+2*_0xe23e71,t+2*_0xe23e71,25),this.pitchfactor=Math.cos(i._pitch)*i.cameraToCenterDistance,this.screenRightBoundary=e+_0xe23e71,this.screenBottomBoundary=t+_0xe23e71,this.gridRightBoundary=e+2*_0xe23e71,this.gridBottomBoundary=t+2*_0xe23e71}placeCollisionBox(e,t,i){const n=e.x1,r=e.y1,o=e.x2,a=e.y2;return!this.isInsideGrid(n,r,o,a)||!t&&this.grid.hitTest(n,r,o,a,i)?{box:[],offscreen:!1}:{box:[n,r,o,a],offscreen:this.isOffscreen(n,r,o,a)}}approximateTileDistance(e,t,i,n,r){const o=r?1:n/this.pitchfactor,a=e.lastSegmentViewportDistance*i;return e.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(t))}placeCollisionCircles(e,t,i,n,r,o,a,s,l,u,c,h,d){const f=[],p=this.projectAnchor(l,r.anchorX,r.anchorY),_=s/24,m=r.lineOffsetX*s,g=r.lineOffsetY*s,x=new Point(r.anchorX,r.anchorY),y=projection.project(x,u).point,v=projection.placeFirstAndLastGlyph(_,a,m,g,!1,y,x,r,o,u,{},!0);let $=!1,b=!1,T=!0;const C=p.perspectiveRatio*n,S=1/(n*i);let w=0,E=0;v&&(w=this.approximateTileDistance(v.first.tileDistance,v.first.angle,S,p.cameraDistance,h),E=this.approximateTileDistance(v.last.tileDistance,v.last.angle,S,p.cameraDistance,h));for(let i=0;i<e.length;i+=5){const n=e[i],r=e[i+1],o=e[i+2],a=e[i+3];if(!v||a<-w||a>E){_0x4ce3c2(e,i,!1);continue}const s=this.projectPoint(l,n,r),u=o*C;if(f.length>0){const t=s.x-f[f.length-4],n=s.y-f[f.length-3];if(u*u*2>t*t+n*n){if(i+8<e.length){const t=e[i+8];if(t>-w&&t<E){_0x4ce3c2(e,i,!1);continue}}}}const h=i/5;f.push(s.x,s.y,u,h),_0x4ce3c2(e,i,!0);const p=s.x-u,_=s.y-u,m=s.x+u,g=s.y+u;if(T=T&&this.isOffscreen(p,_,m,g),b=b||this.isInsideGrid(p,_,m,g),!t&&this.grid.hitTestCircle(s.x,s.y,u,d)){if(!c)return{circles:[],offscreen:!1};$=!0}}return{circles:$||!b?[]:f,offscreen:T}}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const t=[];let i=1/0,n=1/0,r=-1/0,o=-1/0;for(const a of e){const e=new Point(a.x+_0xe23e71,a.y+_0xe23e71);i=Math.min(i,e.x),n=Math.min(n,e.y),r=Math.max(r,e.x),o=Math.max(o,e.y),t.push(e)}const a=this.grid.query(i,n,r,o).concat(this.ignoredGrid.query(i,n,r,o)),s={},l={};for(const e of a){const i=e.key;if(void 0===s[i.bucketInstanceId]&&(s[i.bucketInstanceId]={}),s[i.bucketInstanceId][i.featureIndex])continue;(void 0)(t,[new Point(e.x1,e.y1),new Point(e.x2,e.y1),new Point(e.x2,e.y2),new Point(e.x1,e.y2)])&&(s[i.bucketInstanceId][i.featureIndex]=!0,void 0===l[i.bucketInstanceId]&&(l[i.bucketInstanceId]=[]),l[i.bucketInstanceId].push(i.featureIndex))}return l}insertCollisionBox(e,t,i,n,r){const o={bucketInstanceId:i,featureIndex:n,collisionGroupID:r};(t?this.ignoredGrid:this.grid).insert(o,e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,i,n,r){const o=t?this.ignoredGrid:this.grid,a={bucketInstanceId:i,featureIndex:n,collisionGroupID:r};for(let t=0;t<e.length;t+=4)o.insertCircle(a,e[t],e[t+1],e[t+2])}projectAnchor(e,t,i){const n=[t,i,0,1];return projection.xyTransformMat4(n,n,e),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5,cameraDistance:n[3]}}projectPoint(e,t,i){const n=[t,i,0,1];return projection.xyTransformMat4(n,n,e),new Point((n[0]/n[3]+1)/2*this.transform.width+_0xe23e71,(-n[1]/n[3]+1)/2*this.transform.height+_0xe23e71)}projectAndGetPerspectiveRatio(e,t,i){const n=[t,i,0,1];projection.xyTransformMat4(n,n,e);return{point:new Point((n[0]/n[3]+1)/2*this.transform.width+_0xe23e71,(-n[1]/n[3]+1)/2*this.transform.height+_0xe23e71),perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5}}isOffscreen(e,t,i,n){return i<_0xe23e71||e>=this.screenRightBoundary||n<_0xe23e71||t>this.screenBottomBoundary}isInsideGrid(e,t,i,n){return i>=0&&e<this.gridRightBoundary&&n>=0&&t<this.gridBottomBoundary}}function _0x4ce3c2(e,t,i){e[t+4]=i?1:0}var _0x26ef01=(_0x4b4d1e=!0,function(e,t){var i=_0x4b4d1e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4b4d1e=!1,i}),_0x37ef62=_0x26ef01(void 0,(function(){return _0x37ef62.toString().search("(((.+)+)+)+$").toString().constructor(_0x37ef62).search("(((.+)+)+)+$")})),_0x4b4d1e;_0x37ef62(),new e$1X;class _0xc33885{constructor(e,t,i,n){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):n&&i?1:0,this.placed=i}isHidden(){return 0===this.opacity&&!this.placed}}class _0x46372e{constructor(e,t,i,n,r){this.text=new _0xc33885(e?e.text:null,t,i,r),this.icon=new _0xc33885(e?e.icon:null,t,n,r)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class _0x1e2b8c{constructor(e,t,i){this.text=e,this.icon=t,this.skipFade=i}}class Placement{constructor(e,t,i,n,r){this.scene=e,this.transform=t.clone(),this.collisionIndex=new _0x5091d4(e.drawingBufferWidth,e.drawingBufferHeight,this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=i,this.isOverlapDisplayed=r,this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}placeLayerTile(e,t){var i=this,n=t._MVTLabel._billboardsByLayers[e.id],r=this.isOverlapDisplayed,o=this.scene.frameState.frameNumber;for(var a in n){for(var s=n[a],l=void 0,u=0;u<s.length;u++){var c=s[u];if(c.collisionFrameNumber!==o){c.collisionFrameNumber=o;var h=c.computeScreenSpacePosition(i.scene);if(h)if(l){var d=n$J.getScreenSpaceBoundingBox(c,h);f$1a.union(l,d,l)}else l=new f$1a,n$J.getScreenSpaceBoundingBox(c,h,l)}}if(!l)continue;var f={x1:l.x,y1:l.y,x2:l.x+l.width,y2:l.y+l.height,anchorPointX:0,anchorPointY:0};const e=i.collisionIndex.placeCollisionBox(f,r);if(e.box&&e.box.length>0&&t._visible){i.collisionIndex.insertCollisionBox(e.box,!1,a),this.placements[a]=new _0x1e2b8c(!0,!1,e.offscreen)}}}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const t=this.prevPlacement;let i=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;const n=t?t.symbolFadeChange(e):1,r=t?t.opacities:{};for(const e in this.placements){const t=this.placements[e],o=r[e];o?(this.opacities[e]=new _0x46372e(o,n,t.text,t.icon),i=i||t.text!==o.text.placed||t.icon!==o.icon.placed):(this.opacities[e]=new _0x46372e(null,n,t.text,t.icon,t.skipFade),i=i||t.text||t.icon)}for(const e in r){const t=r[e];if(!this.opacities[e]){const r=new _0x46372e(t,n,!1,!1);!r.isHidden()&&(this.opacities[e]=r,i=i||t.text.placed||t.icon.placed)}}i?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){const i=new _0x46372e(null,0,!1,!1,!0);for(var n=0;n<t.length;n++){var r=t[n]._MVTLabel._billboardsByLayers[e.id];if(r)for(var o in r){var a=r[o];let e=this.opacities[o];!e&&(e=i,this.opacities[o]=e);for(var s=0;s<a.length;s++){a[s].opacityState=e.text}}}}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,t){let i;if(this.zoomAtLastRecencyCheck===t){i=1-this.zoomAdjustment(t)}else i=1;this.zoomAtLastRecencyCheck=t;return this.commitTime+this.fadeDuration*i>e}setStale(){this.stale=!0}}const _0x1b6945=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x198816=_0x1b6945(void 0,(function(){return _0x198816.toString().search("(((.+)+)+)+$").toString().constructor(_0x198816).search("(((.+)+)+)+$")}));_0x198816();class _0x2c3885{constructor(){this._currentTileIndex=0}continuePlacement(e,t,i,n){for(;this._currentTileIndex<e.length;){const r=e[this._currentTileIndex];if(t.placeLayerTile(i,r),this._currentTileIndex++,n())return!0}}}class _0x23011e{constructor(e,t,i,n,r,o,a){this.placement=new Placement(e,t,r,o,a),this._currentPlacementIndex=i.length-1,this._forceFullPlacement=n,this._done=!1}isDone(){return this._done}continuePlacement(e,t,i){const n=performance.now(),r=()=>{const e=performance.now()-n;return!this._forceFullPlacement&&e>2};for(;this._currentPlacementIndex>=0;){const n=t[e[this._currentPlacementIndex]];if(n){if(this.placement.collisionIndex.transform.zoom,"symbol"===n.type){if("point"!==n.layout.get("symbol-placement")){this._currentPlacementIndex--;continue}!this._inProgressLayer&&(this._inProgressLayer=new _0x2c3885);if(this._inProgressLayer.continuePlacement(i,this.placement,n,r))return;delete this._inProgressLayer}this._currentPlacementIndex--}else this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}var _0xd3ba80=(_0x2dcfb2=!0,function(e,t){var i=_0x2dcfb2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2dcfb2=!1,i}),_0x5666d6=_0xd3ba80(void 0,(function(){return _0x5666d6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5666d6).search("(((.+)+)+)+$")})),_0x2dcfb2;function _0x2e0b01(e){this.dispatcher=new _0x184837(_0x194ba2(),this),this._layers={},this._order=[],this.sourceCaches={},this._loaded=!1,this.highLighting=!1,this.imageManager=new _0x2fed99,this.glyphManager=new _0x175ad1(e._requestManager,e._localIdeographFontFamily),this.lineAtlas=new _0x262d0c(256,512),this.map=e,this._resetUpdates()}_0x5666d6(),_0x2e0b01.prototype._load=function(e){for(var t in this._loaded=!0,this.stylesheet=e,e.sources);var i;e$2e(e.sprite)?i=e.sprite.slice(0,e.sprite.indexOf("/sprites/sprite")):e$2e(e.glyphs)&&(i=e.glyphs.slice(0,e.glyphs.indexOf("/fonts/{fontstack}/{range}"))),e$2e(a$O.CREDENTIAL)&&(e$2e(a$O.CREDENTIAL._keymap[i])?(e.sprite=a$O.addTokenWithKey(i,e.sprite),e.glyphs=a$O.addTokenWithKey(i,e.glyphs)):(e.sprite=a$O.addToken(e.sprite),e.glyphs=a$O.addToken(e.glyphs))),e.sprite?this._spriteRequest=_0x1fe793(e.sprite,this.map._requestManager,((e,t)=>{if(this._spriteRequest=null,e);else if(t)for(const e in t)this.imageManager.addImage(e,t[e]);this.imageManager.setLoaded(!0),this.dispatcher.broadcast("setImages",this.imageManager.listImages()),this.map._resourceReady=!0})):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var n=this.stylesheet.layers;this._order=n.map((function(e){return e.id})),this._layers={};for(var r=0,o=n;r<o.length;r+=1){var a=f=o[r];if(null!=(f=_0x1f5d3a(f))){f.config=a,f.config.originalFilter=clone(f.filter);var s=new _0x47eac1(0);f.recalculate(s),this._layers[f.id]=f}}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order));var l=this._layers,u=new _0x30db1c(n);for(var c in u.familiesBySource){var h=u.familiesBySource[c];for(var d in h)for(r=0,o=h[d];r<o.length;r+=1){var f,p=o[r],_=(f=p[0]).id;p.map((function(e){l[e.id].bucketName=_}))}}},_0x2e0b01.prototype.update=function(e){if(this._loaded){var t=new _0x47eac1(0);if(this._changed,this._changed){var i=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var r in(i.length||n.length)&&this._updateWorkerLayers(e,i,n),this._updatedPaintProps)this._layers[r].updateTransitions(t);this._resetUpdates()}for(var o in this.sourceCaches)this.sourceCaches[o].used=!1;for(var a=0,s=this._order;a<s.length;a+=1){var l=s[a],u=this._layers[l];null!=u&&null!=u&&u.recalculate(t,this.imageManager.listImages())}}},_0x2e0b01.prototype._updateWorkerLayers=function(e,t,i){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:i});for(var n=[],r=0;r<t.length;r++){var o=t[r],a=this._layers[o];e$2e(a)&&n.push(a.config)}for(var s in e){e[s].addRepaintTask(n,i,this.highLighting)}this.highLighting=!1},_0x2e0b01.prototype.addLayer=function(e,t,i){var n=e.id;if(this.getLayer(n))console.log('Layer with id "'+n+'" already exists on this map');else{var r=_0x1f5d3a(e);r.config=e;var o=t?this._order.indexOf(t):this._order.length;t&&-1===o?console.log('Layer with id "'+t+'" does not exist on this map.'):(this._order.splice(o,0,n),this._layerOrderChanged=!0,this._layers[n]=r,this._updateLayer(r))}},_0x2e0b01.prototype.moveLayer=function(e,t){if(this._changed=!0,this._layers[e]){if(e!==t){var i=this._order.indexOf(e);this._order.splice(i,1);var n=t?this._order.indexOf(t):this._order.length;t&&-1===n?console.log('Layer with id "'+t+'" does not exist on this map.'):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}}else console.log("The layer '"+e+"' does not exist in the map's style and cannot be moved.")},_0x2e0b01.prototype.loaded=function(){if(!this._loaded)return!1;if(id!==before){var e=this._order.indexOf(id);this._order.splice(e,1);var t=before?this._order.indexOf(before):this._order.length;before&&-1===t||(this._order.splice(t,0,id),this._layerOrderChanged=!0)}},_0x2e0b01.prototype.removeLayer=function(e){var t=this._layers[e];if(t){var i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],t.onRemove&&t.onRemove(this.map)}else console.log("The layer '"+e+"' does not exist in the map's style and cannot be removed.")},_0x2e0b01.prototype.getLayer=function(e){return this._layers[e]},_0x2e0b01.prototype.setFilter=function(e,t,i){var n=this.getLayer(e);if(n){if(!_0x5cbed6(n.filter,t)){if(null==t)e$2e(n.config.originalFilter)?(n.filter=n.config.originalFilter,n.config.filter=n.config.originalFilter):(n.filter=void 0,n.config.filter=null);else if(e$2e(n.filter)&&Array.isArray(n.filter)&&"all"===n.filter[0]){var r=!1;if("in"===t[0])for(var o=0;o<n.filter.length;o++)"in"===n.filter[o][0]&&(n.filter[o]=t,r=!0);!r&&(n.filter.push(t),n.config.filter=n.filter)}else n.filter=clone(t),n.config.filter=n.filter;this._updateLayer(n)}}else console.log("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")},_0x2e0b01.prototype.getFilter=function(e){return clone(this.getLayer(e).filter)},_0x2e0b01.prototype.setLayoutProperty=function(e,t,i,n){void 0===n&&(n={});var r=this.getLayer(e);r?_0x5cbed6(r.getLayoutProperty(t),i)||(r.setLayoutProperty(t,i,n),this._updateLayer(r)):console.log("The layer '"+e+"' does not exist in the map's style and cannot be styled.")},_0x2e0b01.prototype.getLayoutProperty=function(e,t){var i=this.getLayer(e);if(i)return i.getLayoutProperty(t);console.log("The layer '"+e+"' does not exist in the map's style.")},_0x2e0b01.prototype.setPaintProperty=function(e,t,i,n){void 0===n&&(n={});var r=this.getLayer(e);r?_0x5cbed6(r.getPaintProperty(t),i)||(r.setPaintProperty(t,i,n),this._updateLayer(r),this._changed=!0,this._updatedPaintProps[e]=!0):console.log("The layer '"+e+"' does not exist in the map's style and cannot be styled.")},_0x2e0b01.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},_0x2e0b01.prototype._serializeLayers=function(e){for(var t=[],i=0,n=e;i<n.length;i+=1){var r=n[i],o=this._layers[r];e$2e(o)&&("custom"!==o.type&&t.push(o.serialize()))}return t},_0x2e0b01.prototype.serialize=function(){return filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},_0x2e0b01.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},_0x2e0b01.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,this._changed=!0},_0x2e0b01.prototype.setHighLight=function(e,t){var i=this._findHighLightFeature(e);if(!e$2e(i))return e$2e(this.lastHighLightLayerID)&&(this.removeLayer(this.lastHighLightLayerID),this.lastHighLightLayerID=null,this.highLighting=!0),void(t._currentPickID=void 0);e.featureID=i.id,e.layerID=i.layer.id;var n=i.layer,r=n["source-layer"]+"_"+n.type+"_highlight",o=this._layers[r];if(t._currentPickID=r+e.featureID,!e$2e(o)){var a={};a["source-layer"]=n["source-layer"],a.source=n.source,a.id=r;var s=n.paint["fill-color"]&&0===e$1X.fromCssColorString(n.paint["fill-color"]).alpha||0===n.paint["fill-opacity"],l={};"circle"==n.type?(a.type="circle",l["circle-color"]=t._selectedColor.toCssColorString(),l["circle-radius"]=n.paint["circle-radius"]||5):"fill"!=n.type||s?(a.type="line",l["line-color"]=t._selectedColor.toCssColorString(),l["line-width"]=2):(a.type="fill",l["fill-color"]=t._selectedColor.toCssColorString()),a.paint=l,this.addLayer(a)}var u=["in","$id",i.id];this.setFilter(r,u),e$2e(this.lastHighLightLayerID)&&this.lastHighLightLayerID!==r&&this.removeLayer(this.lastHighLightLayerID),this.lastHighLightLayerID=r,this.highLighting=!0},_0x2e0b01.prototype.cancelHighLight=function(e){e$2e(this.lastHighLightLayerID)&&(this.removeLayer(this.lastHighLightLayerID),this.lastHighLightLayerID=null,this.highLighting=!0),e._currentPickID=void 0},_0x2e0b01.prototype._findHighLightFeature=function(e){for(var t={},i=0;i<this._order.length;i++){t[this._order[i]]=i}var n=null,r=0;for(var o in e)for(var a=e[o],s=0;s<a.length;s++){var l=a[s].feature;if(1==l.type||2==l.type||3==l.type){var u=t[l.layer.id];u>=r&&(n=l,r=u)}}return n},_0x2e0b01.prototype._updatePlacement=function(e,t,i){let n=!1;var r=this.map.innerLayer._imageryCache,o=[];for(var a in r)o.push(r[a]);o.sort((function(e,t){return t.level-e.level||(e.isTileIDLessThan(t)?-1:1)}));const s=this._layerOrderChanged||0===i;if((s||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(window.performance.now(),t.zoom))&&(this.pauseablePlacement=new _0x23011e(e,t,this._order,s,i,this.placement,this.map._isOverlapDisplayed),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,o),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(window.performance.now()),n=!0)),n)for(const e of this._order){const t=this._layers[e];t&&"symbol"===t.type&&this.placement.updateLayerOpacities(t,o)}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(performance.now())},_0x2e0b01.prototype.getImages=function(e,t,i){this.imageManager.getImages(t.icons,i)},_0x2e0b01.prototype.getGlyphs=function(e,t,i){this.glyphManager.getGlyphs(t.stacks,i)},_0x2e0b01.prototype.getResource=function(e,t,i){return makeRequest(t,i)};const _0x2e891d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x38dc1c=_0x2e891d(void 0,(function(){return _0x38dc1c.toString().search("(((.+)+)+)+$").toString().constructor(_0x38dc1c).search("(((.+)+)+)+$")}));_0x38dc1c();class _0x493221{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))}setNorthEast(e){return this._ne=e instanceof _0x30fc78?new _0x30fc78(e.lng,e.lat):_0x30fc78.convert(e),this}setSouthWest(e){return this._sw=e instanceof _0x30fc78?new _0x30fc78(e.lng,e.lat):_0x30fc78.convert(e),this}extend(e){const t=this._sw,i=this._ne;let n,r;if(e instanceof _0x30fc78)n=e,r=e;else{if(!(e instanceof _0x493221))return Array.isArray(e)?e.every(Array.isArray)?this.extend(_0x493221.convert(e)):this.extend(_0x30fc78.convert(e)):this;if(n=e._sw,r=e._ne,!n||!r)return this}return t||i?(t.lng=Math.min(n.lng,t.lng),t.lat=Math.min(n.lat,t.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new _0x30fc78(n.lng,n.lat),this._ne=new _0x30fc78(r.lng,r.lat)),this}getCenter(){return new _0x30fc78((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new _0x30fc78(this.getWest(),this.getNorth())}getSouthEast(){return new _0x30fc78(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"}isEmpty(){return!(this._sw&&this._ne)}contains(e){const{lng:t,lat:i}=_0x30fc78.convert(e),n=this._sw.lat<=i&&i<=this._ne.lat;let r=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(r=this._sw.lng>=t&&t>=this._ne.lng),n&&r}static convert(e){return!e||e instanceof _0x493221?e:new _0x493221(e)}}const _0x50f535=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5b9948=_0x50f535(void 0,(function(){return _0x5b9948.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b9948).search("(((.+)+)+)+$")}));_0x5b9948();class _0x30fc78{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new _0x30fc78(wrap(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return"LngLat("+this.lng+", "+this.lat+")"}toBounds(e){const t=360*e/40075017,i=t/Math.cos(Math.PI/180*this.lat);return new _0x493221(new _0x30fc78(this.lng-i,this.lat-t),new _0x30fc78(this.lng+i,this.lat+t))}static convert(e){if(e instanceof _0x30fc78)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new _0x30fc78(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new _0x30fc78(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const _0x194165=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5b084d=_0x194165(void 0,(function(){return _0x5b084d.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b084d).search("(((.+)+)+)+$")}));_0x5b084d();const _0x5d9e20=2*Math.PI*6378137;function _0x28fee4(e){return _0x5d9e20*Math.cos(e*Math.PI/180)}function mercatorXfromLng(e){return(180+e)/360}function mercatorYfromLat(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function mercatorZfromAltitude(e,t){return e/_0x28fee4(t)}function lngFromMercatorX(e){return 360*e-180}function latFromMercatorY(e){const t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}function altitudeFromMercatorZ(e,t){return e*_0x28fee4(latFromMercatorY(t))}function mercatorScale(e){return 1/Math.cos(e*Math.PI/180)}class _0x3c4a3b{constructor(e,t,i=0){this.x=+e,this.y=+t,this.z=+i}static fromLngLat(e,t=0){const i=_0x30fc78.convert(e);return new _0x3c4a3b(mercatorXfromLng(i.lng),mercatorYfromLat(i.lat),mercatorZfromAltitude(t,i.lat))}toLngLat(){return new _0x30fc78(lngFromMercatorX(this.x),latFromMercatorY(this.y))}toAltitude(){return altitudeFromMercatorZ(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/_0x5d9e20*mercatorScale(latFromMercatorY(this.y))}}const _0x840ad5=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x120a05=_0x840ad5(void 0,(function(){return _0x120a05.toString().search("(((.+)+)+)+$").toString().constructor(_0x120a05).search("(((.+)+)+)+$")}));_0x120a05();class _0x36e095{constructor(e,t,i,n,r){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===r||r,this._minZoom=e||0,this._maxZoom=t||26,this._minPitch=null==i?0:i,this._maxPitch=null==n?60:n,this.setMaxBounds(),this.width=0,this.height=0,this._center=new _0x30fc78(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const e=new _0x36e095(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._calcMatrices(),e}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get centerPoint(){return this.size._div(2)}get size(){return new _0x4f59fa(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(e){const t=-wrap(e,-180,180)*Math.PI/180;this.angle!==t&&(this._unmodified=!1,this.angle=t,this._calcMatrices(),this.rotationMatrix=mat2.create(),mat2.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(e){const t=clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==t&&(this._unmodified=!1,this._pitch=t,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(e){const t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())}get center(){return this._center}set center(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}coveringZoomLevel(e){const t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)}getVisibleUnwrappedCoordinates(e){const t=[new UnwrappedTileID(0,e)];if(this._renderWorldCopies){const i=this.pointCoordinate(new _0x4f59fa(0,0)),n=this.pointCoordinate(new _0x4f59fa(this.width,0)),r=this.pointCoordinate(new _0x4f59fa(this.width,this.height)),o=this.pointCoordinate(new _0x4f59fa(0,this.height)),a=Math.floor(Math.min(i.x,n.x,r.x,o.x)),s=Math.floor(Math.max(i.x,n.x,r.x,o.x)),l=1;for(let i=a-l;i<=s+l;i++)0!==i&&t.push(new UnwrappedTileID(i,e))}return t}coveringTiles(e){let t=this.coveringZoomLevel(e);const i=t;if(void 0!==e.minzoom&&t<e.minzoom)return[];void 0!==e.maxzoom&&t>e.maxzoom&&(t=e.maxzoom);const n=_0x3c4a3b.fromLngLat(this.center),r=Math.pow(2,t),o=new _0x4f59fa(r*n.x-.5,r*n.y-.5),a=[this.pointCoordinate(new _0x4f59fa(0,0)),this.pointCoordinate(new _0x4f59fa(this.width,0)),this.pointCoordinate(new _0x4f59fa(this.width,this.height)),this.pointCoordinate(new _0x4f59fa(0,this.height))];return tileCover(t,a,e.reparseOverscaled?i:t,this._renderWorldCopies).sort(((e,t)=>o.dist(e.canonical)-o.dist(t.canonical)))}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(e){const t=clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new _0x4f59fa(mercatorXfromLng(e.lng)*this.worldSize,mercatorYfromLat(t)*this.worldSize)}unproject(e){return new _0x3c4a3b(e.x/this.worldSize,e.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}setLocationAtPoint(e,t){const i=this.pointCoordinate(t),n=this.pointCoordinate(this.centerPoint),r=this.locationCoordinate(e),o=new _0x3c4a3b(r.x-(i.x-n.x),r.y-(i.y-n.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(e){return this.coordinatePoint(this.locationCoordinate(e))}pointLocation(e){return this.coordinateLocation(this.pointCoordinate(e))}locationCoordinate(e){return _0x3c4a3b.fromLngLat(e)}coordinateLocation(e){return e.toLngLat()}pointCoordinate(e){const t=[e.x,e.y,0,1],i=[e.x,e.y,1,1];vec4.transformMat4(t,t,this.pixelMatrixInverse),vec4.transformMat4(i,i,this.pixelMatrixInverse);const n=t[3],r=i[3],o=t[1]/n,a=i[1]/r,s=t[2]/n,l=i[2]/r,u=s===l?0:(0-s)/(l-s);return new _0x3c4a3b(interpolate(t[0]/n,i[0]/r,u)/this.worldSize,interpolate(o,a,u)/this.worldSize)}coordinatePoint(e){const t=[e.x*this.worldSize,e.y*this.worldSize,0,1];return vec4.transformMat4(t,t,this.pixelMatrix),new _0x4f59fa(t[0]/t[3],t[1]/t[3])}getBounds(){return(new _0x493221).extend(this.pointLocation(new _0x4f59fa(0,0))).extend(this.pointLocation(new _0x4f59fa(this.width,0))).extend(this.pointLocation(new _0x4f59fa(this.width,this.height))).extend(this.pointLocation(new _0x4f59fa(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new _0x493221([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}setMaxBounds(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(e,t=!1){const i=e.key,n=t?this._alignedPosMatrixCache:this._posMatrixCache;if(n[i])return n[i];const r=e.canonical,o=this.worldSize/this.zoomScale(r.z),a=r.x+Math.pow(2,r.z)*e.wrap,s=_0x3fdff7.mat4.identity(new Float64Array(16));return _0x3fdff7.mat4.translate(s,s,[a*o,r.y*o,0]),_0x3fdff7.mat4.scale(s,s,[o/ne$C,o/ne$C,1]),_0x3fdff7.mat4.multiply(s,t?this.alignedProjMatrix:this.projMatrix,s),n[i]=new Float32Array(s),n[i]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let e,t,i,n,r=-90,o=90,a=-180,s=180;const l=this.size,u=this._unmodified;if(this.latRange){const t=this.latRange;r=mercatorYfromLat(t[1])*this.worldSize,o=mercatorYfromLat(t[0])*this.worldSize,e=o-r<l.y?l.y/(o-r):0}if(this.lngRange){const e=this.lngRange;a=mercatorXfromLng(e[0])*this.worldSize,s=mercatorXfromLng(e[1])*this.worldSize,t=s-a<l.x?l.x/(s-a):0}const c=this.point,h=Math.max(t||0,e||0);if(h)return this.center=this.unproject(new _0x4f59fa(t?(s+a)/2:c.x,e?(o+r)/2:c.y)),this.zoom+=this.scaleZoom(h),this._unmodified=u,void(this._constraining=!1);if(this.latRange){const e=c.y,t=l.y/2;e-t<r&&(n=r+t),e+t>o&&(n=o-t)}if(this.lngRange){const e=c.x,t=l.x/2;e-t<a&&(i=a+t),e+t>s&&(i=s-t)}(void 0!==i||void 0!==n)&&(this.center=this.unproject(new _0x4f59fa(void 0!==i?i:c.x,void 0!==n?n:c.y))),this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;const e=this._fov/2,t=Math.PI/2+this._pitch,i=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-t-e),n=this.point,r=n.x,o=n.y,a=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),s=this.height/50;let l=new Float64Array(16);_0x3fdff7.mat4.perspective(l,this._fov,this.width/this.height,s,a),_0x3fdff7.mat4.scale(l,l,[1,-1,1]),_0x3fdff7.mat4.translate(l,l,[0,0,-this.cameraToCenterDistance]),_0x3fdff7.mat4.rotateX(l,l,this._pitch),_0x3fdff7.mat4.rotateZ(l,l,this.angle),_0x3fdff7.mat4.translate(l,l,[-r,-o,0]),this.mercatorMatrix=_0x3fdff7.mat4.scale([],l,[this.worldSize,this.worldSize,this.worldSize]),_0x3fdff7.mat4.scale(l,l,[1,1,mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=l;const u=this.width%2/2,c=this.height%2/2,h=Math.cos(this.angle),d=Math.sin(this.angle),f=r-Math.round(r)+h*u+d*c,p=o-Math.round(o)+h*c+d*u,_=new Float64Array(l);if(_0x3fdff7.mat4.translate(_,_,[f>.5?f-1:f,p>.5?p-1:p,0]),this.alignedProjMatrix=_,l=_0x3fdff7.mat4.create(),_0x3fdff7.mat4.scale(l,l,[this.width/2,-this.height/2,1]),_0x3fdff7.mat4.translate(l,l,[1,-1,0]),this.labelPlaneMatrix=l,l=_0x3fdff7.mat4.create(),_0x3fdff7.mat4.scale(l,l,[1,-1,1]),_0x3fdff7.mat4.translate(l,l,[-1,-1,0]),_0x3fdff7.mat4.scale(l,l,[2/this.width,2/this.height,1]),this.glCoordMatrix=l,this.pixelMatrix=_0x3fdff7.mat4.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),l=_0x3fdff7.mat4.invert(new Float64Array(16),this.pixelMatrix),!l)throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const e=this.pointCoordinate(new _0x4f59fa(0,0)),t=[e.x*this.worldSize,e.y*this.worldSize,0,1];return vec4.transformMat4(t,t,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const e=this._pitch,t=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new _0x4f59fa(0,t))}getCameraQueryGeometry(e){const t=this.getCameraPoint();if(1===e.length)return[e[0],t];{let i=t.x,n=t.y,r=t.x,o=t.y;for(const t of e)i=Math.min(i,t.x),n=Math.min(n,t.y),r=Math.max(r,t.x),o=Math.max(o,t.y);return[new _0x4f59fa(i,n),new _0x4f59fa(r,n),new _0x4f59fa(r,o),new _0x4f59fa(i,o),new _0x4f59fa(i,n)]}}}function i$Q(e,t){return 0!=(e&t)}var e$1f={None:0,QuadKey:1},Z$P=Object.freeze(e$1f);function a$K(e,t,i,n){if(!e$2e(e))throw new t$15("uint8Array is required.");if(t<0)throw new t$15("byteOffset cannot be negative.");if(i<0)throw new t$15("byteLength cannot be negative.");if(t+i>e.byteLength)throw new t$15("sub-region exceeds array bounds.");return t=u$Z(t,0),i=u$Z(i,e.byteLength-t),n=u$Z(n,"utf-8"),e=e.subarray(t,t+i),a$K.decode(e,n)}function f$S(e,t,i){return t<=e&&e<=i}function g$Y(e){for(var t=0,i=0,n=0,r=128,o=191,a=[],s=e.length,l=0;l<s;++l){var u=e[l];if(0===n){if(f$S(u,0,127)){a.push(u);continue}if(f$S(u,194,223)){n=1,t=31&u;continue}if(f$S(u,224,239)){224===u&&(r=160),237===u&&(o=159),n=2,t=15&u;continue}if(f$S(u,240,244)){240===u&&(r=144),244===u&&(o=143),n=3,t=7&u;continue}throw new t$13("String decoding failed.")}f$S(u,r,o)?(r=128,o=191,t=t<<6|63&u,++i===n&&(a.push(t),t=n=i=0)):(t=n=i=0,r=128,o=191,--l)}return a}a$K.decodeWithTextDecoder=function(e,t){return new TextDecoder(t).decode(e)},a$K.decodeWithFromCharCode=function(e){for(var t="",i=g$Y(e),n=i.length,r=0;r<n;++r){var o=i[r];o<=65535?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode(55296+(o>>10),56320+(1023&o)))}return t},typeof TextDecoder<"u"?a$K.decode=a$K.decodeWithTextDecoder:a$K.decode=a$K.decodeWithFromCharCode;var ke$e=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642478e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],B$P=0;function M$S(e,t){t=u$Z(t,{}),this._name=t.name,this._tilingScheme=t.tilingScheme,this._owner=void 0,this._hasTileWith=!1,e$2e(t.tileWidth)&&e$2e(t.tileHeight)&&(this._hasTileWith=!0),this._tileWidth=u$Z(parseInt(t.tileWidth)||void 0,512),this._tileHeight=u$Z(parseInt(t.tileHeight)||void 0,512),this._canvasWidth=u$Z(parseInt(t.canvasWidth)||void 0,512),this._canvasWidth=e$2d.clamp(this._canvasWidth,128,1024),e$2e(t.minimumLevel)&&e$2e(t.maximumLevel)&&(this._hasLevel=!0),this._minimumLevel=u$Z(parseInt(t.minimumLevel)||void 0,0),this._maximumLevel=parseInt(t.maximumLevel)||void 0,this.minimumTerrainLevel=parseInt(t.minimumTerrainLevel)||void 0,this.maximumTerrainLevel=parseInt(t.maximumTerrainLevel)||void 0,this._styleName=u$Z(t.styleName,""),this._mapboxStyle=t.mapboxStyle,this._colDiff=0,this._rowDiff=0,this._ready=!1,this._resourceReady=!1,this._requestMetadataSuccess=!1,this._requestStyleSuccess=!1,this._readyPromise=o$1l.defer(),this._layers={},this._selectEnabled=u$Z(t.selectEnabled,!0),this._selectedColor=u$Z(t.selectedColor,e$1X.fromCssColorString("#00FFFF")),this._overlapDisplayedThreshold=0,this._localIdeographFontFamily=u$Z(t.localIdeographFontFamily,!1),this._key=u$Z(t.key,""),this._url=u$Z(t.url,""),this._url.length>0&&0===this._url.indexOf("//")&&(this._url=window.location.protocol+this._url),this._labelScaleByDistance=t.labelScaleByDistance,this._resource=t$10.createIfNeeded(this._url),this._context=e,this._transform=new _0x36e095(0,22,0,60),this._painter=new _0x3fc49d(e,this._transform,this._canvasWidth),this._painter.lineAntialiasing=t.lineAntialiasing,this._requestManager=new _0x32573f((e=>({url:e,headers:t.customRequestHeaders}))),this._MVTStyle=new _0x2e0b01(this),this._viewer=t.viewer,this._iswmts=-1!==this._url.indexOf("wmts"),this._isgeoserver=-1!==this._url.indexOf("/geoserver/"),this._isRealspace=-1!==this._url.indexOf("rest/realspace"),this._isTdt=u$Z(t.isTdt,!1),this._packingRequest=this._isRealspace?t.packingRequest:void 0,this._hasIndex=t.hasIndex||!1,this._isTdt?(this._urlTiles=this._url+"?t=vt&z={z}&x={x}&y={y}",this.tablename=this._url):this._iswmts?(this._layer=u$Z(t.layer,""),this._format=u$Z(t.format,"mvt"),this._tilematrixset=u$Z(t.tilematrixset,""),this._minimumLevel=u$Z(parseInt(t.minimumLevel)||void 0,0),this._maximumLevel=u$Z(parseInt(t.maximumLevel)||void 0,0),this.tablename=this._layer+this._tilematrixset):this._isRealspace?(this._urlTiles=this._url+"/data/index/{y}/{x}.mvt?level={z}",this.tablename=this._url):(this._urlTiles=this._url+"/tiles/{z}/{x}/{y}.mvt",this.tablename=this._url),this._tileCache={},this._scales=u$Z(t.scales,ke$e),this._id=-1,this._errorEvent=new o$1h,this._pausing=!1,this._selectEnabled=!0,this._maxImageCacheLevel=0,this.minificationFilter=t.minificationFilter,this.magnificationFilter=t.magnificationFilter,this._renderTextureList={"512_512":new t$U({context:e,width:512,height:512,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})},this._isOverlapDisplayed=u$Z(t.isOverlapDisplayed,!1),this._enableMorphing=!1,this.realtime=u$Z(t.realtime,!1),this._billboardMode=u$Z(t.billboardMode,yr$2.None),this.selectTolerance=.2,this._customRequestHeaders=t.customRequestHeaders;var i=this;function n(){if(i._iswmts){var e=t.url+"?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities";e$2e(a$O.CREDENTIAL)&&(e=e$2e(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),o$1l(d$1f(e,i._customRequestHeaders),a,u)}else if(i._isRealspace){e=t.url+"/config";e$2e(a$O.CREDENTIAL)&&(e=e$2e(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),o$1l(u$Q(e,i._customRequestHeaders),r,u)}else{var n=t.url+".json";e$2e(a$O.CREDENTIAL)&&(n=e$2e(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,n):a$O.addToken(n)),o$1l(u$P(n,i._customRequestHeaders),l,u)}}function r(e){var t=function(e){e=o.parseFromString(e,"application/xml");for(var t="http://www.supermap.com/SuperMapCache/sci3d",n=e.childNodes[0],r=Qe$a(j$S(n,"Levels",t),"Level",t),a=[],s=0,l=r.length;s<l;s++)a.push(parseInt(r[s].textContent,10));var u=j$S(n,"Bounds",t),c=D$S(u,"Left",t),h=D$S(u,"Right",t),d=D$S(u,"Top",t),f=D$S(u,"Bottom",t),p=de$r(n,"FileExtentName",t),_=D$S(n,"CellWidth",t),m=D$S(n,"CellHeight",t),g=de$r(n,"CacheName",t);return i._name||(i._name=g||""),{left:c,right:h,top:d,bottom:f,fileExtentName:p,levels:a,imageSizeWidth:_,imageSizeHeight:m}}(e);i._fileExtension=u$Z(t.fileExtentName,"mvt"),i._tileWidth=u$Z(t.imageSizeWidth,256),i._tileHeight=u$Z(t.imageSizeHeight,256),i._coordUnit="DEGREE";var n=t.levels,r=n.length;i._minimumLevel=u$Z(n[0],0),i._maximumLevel=u$Z(n[r-1],r-1),e$2e(i._tilingScheme)||(i._tilingScheme=new g$15);var a,s,l,u,c=i._tilingScheme;e$2e(i._rectangle)||t.left&&t.right&&t.top&&t.bottom&&(a=e$2d.toRadians(t.left),l=e$2d.toRadians(t.right),s=e$2d.toRadians(t.bottom),u=e$2d.toRadians(t.top),i._rectangle=new h$18(a,s,l,u));i._rectangle.west<c.rectangle.west&&(i._rectangle.west=c.rectangle.west),i._rectangle.east>c.rectangle.east&&(i._rectangle.east=c.rectangle.east),i._rectangle.south<c.rectangle.south&&(i._rectangle.south=c.rectangle.south),i._rectangle.north>c.rectangle.north&&(i._rectangle.north=c.rectangle.north),i._tilingScheme=c,i._urlTemplate=i._url+"data/index/{y}/{x}.{fileExtension}?level={level}",i._ready=!0,i._requestMetadataSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}this._subdomains=t.subdomains,e$2e(this._subdomains)&&(t.url=t.url.replace(/({.*?})/g,(function(e,t){if(!e$2e(i._subdomains.length))throw new t$15("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?i._subdomains[0]:e}))),this._isTdt?function(e){if(!e._hasLevel){var t=30,i=-1;if(!e$2e(e._mapboxStyle))throw new t$15("tdt mapbox style should be passed.");for(var n in e._mapboxStyle.sources){var r=e._mapboxStyle.sources[n];t=Math.min(r.minZoom,t),i=Math.max(r.maxZoom,i)}e._minimumLevel=t,e._maximumLevel=i}e$2e(e._tilingScheme)||(e._tilingScheme=new g$15),e._coordUnit=e._tilingScheme instanceof g$15?"DEGREE":"METER",e._rectangle=h$18.clone(e._tilingScheme._rectangle),e._urlTemplate=e._url+"?t=vt&z={z}&x={x}&y={y}",e._requestMetadataSuccess=!0,A$Z(e,e._mapboxStyle),e._requestStyleSuccess=!0,e._readyPromise.resolve(!0)}(this):(n(),this._isgeoserver||function(){var e;if(e$2e(i._mapboxStyle))A$Z(i,i._mapboxStyle);else if(i._isRealspace)e=t.url+"/data/path/style.json",e$2e(a$O.CREDENTIAL)&&(e=e$2e(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),n=u$P(e,i._customRequestHeaders);else{var n;e=i._iswmts?t.url+"?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetStyle&STYLENAME="+i._styleName:t.url+"/style.json",e$2e(a$O.CREDENTIAL)&&(e=e$2e(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),n=u$P(e,i._customRequestHeaders)}o$1l(n,(function(e){e$2e(e)?(i._mapboxStyle=e,A$Z(i,e),i._requestStyleSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)):console.log("style request failed")}),(function(n){e=t.url+"/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true",e$2e(a$O.CREDENTIAL)&&(e=e$2e(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),u$P(e,i._customRequestHeaders).then((function(e){i._mapboxStyle=e,A$Z(i,e),i._tileFeature=!0,i._urlTiles=i._url+"/tileFeature.mvt?returnAttributes=true&x={x}&y={y}&width=512&height=512&scale={scale}&origin={'x':-180,'y':90}"})),u()}))}());var o=new DOMParser;function a(e){var n=function(e){var t,n,r=e.firstChild,o=r.namespace,a=s$T.queryFirstNode(r,"Contents",o),s=s$T.queryNodes(a,"Layer",o);if(s.length>1)for(var l=0,u=s.length;l<u;l++){var c=s$T.queryFirstNode(s[l],"Title",o),h=s$T.queryStringValue(c),d=s$T.queryFirstNode(s[l],"Identifier",o),f=s$T.queryStringValue(d);if(h===i._layer||f===i._layer){t=s[l],n=h;break}}else t=s$T.queryFirstNode(a,"Layer",o);var p,_,m,g,x=s$T.queryFirstNode(t,"WGS84BoundingBox",o),y=s$T.queryStringValue(x,"LowerCorner",o),v=s$T.queryStringValue(x,"UpperCorner",o),$=y.split(" "),b=v.split(" ");m=parseFloat(b[0]),g=parseFloat(b[1]),p=parseFloat($[0]),_=parseFloat($[1]);var T=s$T.queryFirstNode(a,"TileMatrixSet",o),C=s$T.queryFirstNode(T,"TileMatrix",o),S=s$T.queryNumericValue(C,"TileWidth",o),w=s$T.queryNumericValue(C,"TileHeight",o);return{left:p,right:m,top:g,bottom:_,width:S,height:w,styleName:n}}(e);e$2e(i._tilingScheme)||(i._tilingScheme=new g$15);var r={};r.left=e$2d.clamp(n.left,-180,180),r.bottom=e$2d.clamp(n.bottom,-90,90),r.right=e$2d.clamp(n.right,-180,180),r.top=e$2d.clamp(n.top,-90,90),i._rectangle=h$18.fromDegrees(r.left,r.bottom,r.right,r.top),i._hasTileWith||(i._tileWidth=n.width,i._tileHeight=n.height),i._urlTiles=i._url+"?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER="+i._layer+"&FORMAT="+i._format+"&TILEMATRIXSET="+i._tilematrixset+"&WIDTH="+i._tileWidth+"&HEIGHT="+i._tileHeight+"&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}",i._rectangle||(i._rectangle=u$Z(t.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._requestMetadataSuccess=!0,i._isgeoserver&&(e$2e(i._mapboxStyle)||(i._mapboxStyle={version:8,name:n.styleName,layers:[{id:n.styleName+"_fill",source:n.styleName,"source-layer":n.styleName,type:"fill",layout:{visibility:"visible"},paint:{"fill-color":"rgba(224,207,226,1.00)","fill-antialias":!0},filter:["all",["==","$type","Polygon"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}},{id:n.styleName+"_outline",source:n.styleName,"source-layer":n.styleName,type:"line",layout:{visibility:"visible"},paint:{"line-width":1,"line-color":"rgba(102,102,102,1.00)"},filter:["all",["==","$type","Polygon"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}},{id:n.styleName+"line",source:n.styleName,"source-layer":n.styleName,type:"line",layout:{visibility:"visible"},paint:{"line-width":.38,"line-color":"rgba(149,55,52,1.00)"},filter:["all",["==","$type","LineString"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}},{id:n.styleName+"point",source:n.styleName,"source-layer":n.styleName,type:"circle",layout:{visibility:"visible"},paint:{"circle-radius":2.27,"circle-color":"rgba(54,96,146,1.00)"},filter:["all",["==","$type","Point"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}}]}),A$Z(i,i._mapboxStyle),i._requestStyleSuccess=!0,i._urlTiles=i._url+"?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER="+i._layer+"&FORMAT="+i._format+"&TILEMATRIXSET="+i._tilematrixset+"&WIDTH="+i._tileWidth+"&HEIGHT="+i._tileHeight+"&TILEMATRIX=EPSG:4326:{z}&TILEROW={y}&TILECOL={x}&&STYLE="),i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}function s(e,t){var i=[],n=Math.abs(e)/512;n=function(e,t,i){var n=e*t*39.37007874015748*Xe$c(i);return 1/n}(n,96,t);for(var r=0;r<22;r++)0!=r?(n*=2,i[r]=n):i[r]=n;return i}function l(e){var n=e.prjCoordSys.coordUnit;i._coordUnit=n;var r=e.bounds,o=e.viewer.width,a=e.viewer.height;if(i._hasTileWith||(i._tileWidth=o,i._tileHeight=a),i._hasLevel||function(e,t){e._minimumLevel=0,e._maximumLevel=22;var i,n=[];if(i=3857==t.prjCoordSys.epsgCode?[1/295829355.454566,1/147914677.727283,1/73957338.8636414,1/36978669.4318207,1/18489334.7159103,1/9244667.35795517,1/4622333.67897759,1/2311166.83948879,1/1155583.4197444,1/577791.709872198,1/288895.854936099,1/144447.92746805,1/72223.9637340248,1/36111.9818670124,1/18055.9909335062,1/9027.9954667531,1/4513.99773337655,1/2256.99886668828,1/1128.49943334414,1/564.249716672069,1/282.124858336034,1/141.062429168017]:"DEGREE"==t.prjCoordSys.coordUnit?s(360,t.prjCoordSys.coordUnit):s(40075016.6855785,t.prjCoordSys.coordUnit),t.visibleScales&&t.visibleScales.length>0){for(var r,o=null,a=null,l=0;l<t.visibleScales.length;l++){for(var u=0;u<=i.length-1;u++)if(0!=u){if(!(a>(r=Math.abs(t.visibleScales[l]-i[u]))))break;a=r,o=u}else a=Math.abs(t.visibleScales[l]-i[u]),o=0;o>=0&&n.push(o)}e._minimumLevel=n[0],e._maximumLevel=n[n.length-1]}}(i,e),"DEGREE"==n)e$2e(i._tilingScheme)||(i._tilingScheme=new g$15),r.left=e$2d.clamp(r.left,-180,180),r.bottom=e$2d.clamp(r.bottom,-90,90),r.right=e$2d.clamp(r.right,-180,180),r.top=e$2d.clamp(r.top,-90,90),i._rectangle=h$18.fromDegrees(r.left,r.bottom,r.right,r.top),i._urlTemplate=i._url+"/tiles/{z}/{x}/{y}.mvt";else{var l=new o$1p(r.left,r.bottom,0);l.x=Math.max(-20037508.342789244,l.x),l.y=Math.max(-20037508.342789244,l.y);var u=new o$1p(r.right,r.top,0);if(u.x=Math.min(20037508.342789244,u.x),u.y=Math.min(20037508.342789244,u.y),!e$2e(i._tilingScheme)){var c=e$2e(e.prjCoordSys)&&(3857==e.prjCoordSys.epsgCode||e$2e(e.prjCoordSys.projection)&&("PRJ_SPHERE_MERCATOR"===e.prjCoordSys.projection.type||"PRJ_TRANSVERSE_MERCATOR"===e.prjCoordSys.projection.type));i._tilingScheme=new c$S({rectangleSouthwestInMeters:c?void 0:l,rectangleNortheastInMeters:c?void 0:u})}var h=i._tilingScheme._projection.unproject(l),d=i._tilingScheme._projection.unproject(u);i._rectangle=new h$18(h.longitude,h.latitude,d.longitude,d.latitude),i._urlTemplate=i._url+"/tiles/{z}/{x}/{y}.mvt"}i._rectangle||(i._rectangle=u$Z(t.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._requestMetadataSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}function u(e){var t,r="An error occurred while accessing "+i._url+".";t=l$V.handleError(t,i,i._errorEvent,r,void 0,void 0,void 0,n),i._readyPromise.reject(new RuntimeError(r))}}function Oe$l(e,t){if(e$2e(t.metadata)&&e$2e(t.metadata.indexbounds)){var i=-180,n=90,r=360;e$2e(t.metadata.epsgcode)&&("3857"==t.metadata.epsgcode||t.metadata.indexbounds[0]<-180)&&(i=-20037508.3427892,n="METER"==e._coordUnit?20037508.3427892:30056262.5141838,r=40075016.6855784);var o=t.metadata.indexbounds,a=(o[0]-i)/r,s=(o[3]-n)/r;e._colDiff=a,e._rowDiff=s}}function A$Z(e,t){e._MVTStyle._load(t),Oe$l(e,t)}function he$q(e,t,i){var n=Math.pow(2,t);return e+Math.round(n*i)}function He$e(e){e.priority=B$P,e.throttle=!0,(B$P+=.001)>100&&(B$P=0)}function fe$t(e,t,i){return{mvt:!0,colorTexture:new t$U({context:e._context,width:e._canvasWidth,height:e._canvasWidth,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,generateMipmap:!0,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:u$Z(e.minificationFilter,tt$i.LINEAR_MIPMAP_LINEAR),magnificationFilter:u$Z(e.magnificationFilter,rt$k.LINEAR)})}),rawData:t,indexData:i}}Object.defineProperties(M$S.prototype,{name:{get:function(){return this._name}},proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel>18?this._maximumLevel:18}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},isOverlapDisplayed:{get:function(){return this._isOverlapDisplayed},set:function(e){this._isOverlapDisplayed=e}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready&&this._resourceReady}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}},mapboxStyle:{get:function(){return this._mapboxStyle},set:function(e){this._mapboxStyle=e,e$2e(this._mapboxStyle)&&A$Z(this,this._mapboxStyle)}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2e(e)&&!e$2e(e.length))throw new t$15("Excepted MvtProvider.subdomains to be type of Array.");this._subdomains=e}},globalLineWidthScale:{get:function(){return this._painter._globalLineWidthScale},set:function(e){this._painter._globalLineWidthScale=e}},lineAntialiasing:{get:function(){return this._painter._lineAntialiasing},set:function(e){this._painter._lineAntialiasing=e}},enableMorphing:{get:function(){return this._enableMorphing},set:function(e){this._enableMorphing=e}},billboardMode:{get:function(){return this._billboardMode}},selectedColor:{get:function(){return this._selectedColor},set:function(e){this._selectedColor=e}}}),M$S.prototype.getTileCredits=function(e,t,i){},M$S.prototype.resetVisible=function(){var e=this.innerLayer._imageryCache;for(var t in e)e[t]._visible=!1},M$S.prototype.update=function(e,t,i){var n=this.innerLayer._imageryCache;this._MVTStyle.update(n);var r=[];for(var o in n)r.push(n[o]);r.sort((function(e,t){return e.level<t.level?1:e.level>t.level?-1:0})),this._maxImageCacheLevel=0;for(var a=[],s=[],l=r.length,u=0;u<l;u++){var c=r[u];if(this._maxImageCacheLevel=Math.max(this._maxImageCacheLevel,c.level),c.update(),c._visible&&this.realtime&&(c.realtimeRender(),a.push(c)),t.passes.pick||c._visible){var h=c._MVTLabel;h._textCollection&&s.push(h._textCollection),h._iconCollection&&s.push(h._iconCollection)}}var d=1;t.passes.pick||(this._transform.zoom=this._viewer.scene.camera.zoomLevel,this._MVTStyle._updatePlacement(this._viewer.scene,this._transform,500),d=this._MVTStyle.placement.symbolFadeChange(performance.now()));for(u=0;u<s.length;u++)t.passes.pick||(s[u].fadeChage=d),s[u].update(t,e,i)},M$S.prototype.removeTile=function(e,t,i){},M$S.prototype.requestImage=function(e,t,i,n,r,o){He$e(n);var a=this,s=i+1;return this.tilingScheme instanceof c$S&&(s=i),this._tileFeature&&(s+=1),this._isgeoserver&&(s-=1),i>a._maximumLevel?(o.hasRawData=!1,fe$t(a,null)):(o.hasRawData=!0,ze$e(o,n,e,t,s,a),fe$t(a))};var Ve$g=/({.*?})/g;function ze$e(e,t,i,n,r,o){var a=o._urlTiles;if(-1===a.indexOf("http://")&&-1===a.indexOf("https://")&&(a=a.startsWith("/")?window.origin+a:window.origin+"/"+a),o.tilingScheme instanceof c$S||(i=he$q(i,r,o._colDiff),n=he$q(n,r,o._rowDiff)),e.requestX=i,e.requestY=n,e.requestZ=r,t.quadKey=Ye$f(i,n,r),o._packingRequest===Z$P.QuadKey&&(t.type=U$1f.PACK,t.providerName=o._name,t.throttle=!0),o._tileFeature){var s=o._scales[r];a=a.replace("{x}",i).replace("{y}",n).replace("{scale}",s)}else a=a.replace("{x}",i).replace("{y}",n).replace("{z}",r);if(e$2e(o._subdomains)){var l=o._subdomains,u=l[(i+n+r)%l.length];a=a.replace(Ve$g,(function(e,t){return"{s}"===t?u:e}))}e$2e(a$O.CREDENTIAL)&&(e$2e(a$O.CREDENTIAL._keymap[o._url])?o._isTdt?a+="&tk="+a$O.CREDENTIAL._keymap[o._url]:a=a$O.addTokenWithKey(o._url,a):o._isTdt?a+="&tk="+a$O.CREDENTIAL._value:a=a$O.addToken(a)),e.requestUrl=a}function Ue$h(e,t){for(var i=!1,n=0,r=e.length-1;n<e.length;r=n++){var o=e[n],a=e[r];o.latitude>t.latitude!=a.latitude>t.latitude&&t.longitude<(a.longitude-o.longitude)*(t.latitude-o.latitude)/(a.latitude-o.latitude)+o.longitude&&(i=!i)}return i}function Be$j(e,t,i){var n=i[0],r=i[2];if(e.longitude<n.longitude&&t.longitude<n.longitude||e.longitude>r.longitude&&t.longitude>r.longitude||e.latitude<n.latitude&&t.latitude<n.latitude||e.latitude>r.latitude&&t.latitude>r.latitude)return!1;var o=G$10(e,t,i[0]);return o!==G$10(e,t,i[1])||o!==G$10(e,t,i[2])||o!==G$10(e,t,i[3])}function Ge$f(e,t){for(var i=0,n=e;i<n.length;i+=1){var r=n[i];if(t.south<=r.latitude&&t.west<=r.longitude&&t.north>=r.latitude&&t.east>=r.longitude)return!0}var o=[new a$18(t.west,t.north),new a$18(t.east,t.north),new a$18(t.east,t.south),new a$18(t.west,t.south)];if(e.length>2)for(var a=0,s=o;a<s.length;a+=1){if(Ue$h(e,s[a]))return!0}for(var l=0;l<e.length-1;l++){if(Be$j(e[l],e[l+1],o))return!0}}function G$10(e,t,i){return(i.latitude-e.latitude)*(t.longitude-e.longitude)>(t.latitude-e.latitude)*(i.longitude-e.longitude)}function je$e(e,t,i){var n=[];for(var r in t){var o=t[r];o.level==i._maxImageCacheLevel&&Ge$f(e,o.rectangle)&&e$2e(o.featureIndex)&&n.push(o)}return n}function Ke$c(e,t){Array.isArray(e)||(e=[e]);var i=null;for(var n in t){for(var r=t[n],o=!0,a=0;a<e.length;a++)if(!h$18.contains(r.rectangle,e[a])){o=!1;break}if(o)if(null==i)i=r;else{var s=i.rectangle.width;r.rectangle.width<s&&(i=r)}}for(;e$2e(i)&&!e$2e(i.featureIndex);)i=i.parent;return i}function ce$r(e,t,i){var n=i.rectangle;return new _0x4f59fa((e-n.west)/n.width*ne$C,(t-n.south)/n.height*ne$C)}function Xe$c(e){var t;return"METER"==e?t=1:"DEGREE"==e?t=2*Math.PI*6378137/360:"KILOMETER"==e?t=.001:"INCH"==e?t=1/.025399999918:"FOOT"==e&&(t=.3048),t}function Ye$f(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function j$S(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function Qe$a(e,t,i){if(e$2e(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function D$S(e,t,i){var n=j$S(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function de$r(e,t,i){var n=j$S(e,t,i);if(e$2e(n))return n.textContent.trim()}function e$1e(e,t,i,n){this.quadKey=t,this.data=i,this.provider=e,this.promise=n}function v$F(e,t,i,n){if(o$1q.defined("context",e),!t||0===t.length)throw new t$15("At least one attribute is required.");var r=v$F._verifyAttributes(t);i=u$Z(i,0);for(var o,a,s=[],l={},u=r.length,c=0;c<u;++c){var h=r[c];h.vertexBuffer?s.push(h):(e$2e(o=l[a=h.usage])||(o=l[a]=[]),o.push(h))}function d(e,t){return S$14.getSizeInBytes(t.componentDatatype)-S$14.getSizeInBytes(e.componentDatatype)}for(a in this._allBuffers=[],l)if(l.hasOwnProperty(a)){(o=l[a]).sort(d);var f=v$F._vertexSizeInBytes(o),p={vertexSizeInBytes:f,vertexBuffer:void 0,usage:o[0].usage,needsCommit:!1,arrayBuffer:void 0,arrayViews:v$F._createArrayViews(o,f)};this._allBuffers.push(p)}this._size=0,this._instanced=u$Z(n,!1),this._precreated=s,this._context=e,this.writers=void 0,this.va=void 0,this.resize(i)}M$S.prototype.pick=function(e){var t=Ke$c(e,this.innerLayer._imageryCache);if(null!=t&&e$2e(t.featureIndex)){var i=[];i.push(ce$r(e.longitude,e.latitude,t));var n={};for(var r in this._MVTStyle._layers){var o=this._MVTStyle._layers[r];e$2e(o)&&(e$2e(o.visibility)?"none"!=o.visibility&&(n[r]=o):n[r]=o)}var a=null;if(e$2e(t.frameState)){var s=t.frameState.camera;e$2e(s)&&e$2e(s.zoomLevel)&&s.zoomLevel!=1/0&&(a=s.zoomLevel)}var l={realtime:this.realtime,zoom:a,selectTolerance:this.selectTolerance},u=t.queryRenderedFeatures(n,i,l);if(this._MVTStyle.setHighLight(u,this),e$2e(u))return Object.keys(u).length>0?u:void 0}},M$S.prototype.queryRenderedFeatures=function(e,t){var i=[],n=je$e(e,this.innerLayer._imageryCache,this);if(!e$2e(n))return i;for(var r,o,a,s=0;s<n.length;s++){var l=n[s],u=[];for(r=0,a=e.length;r<a;r++)u.push(ce$r(e[r].longitude,e[r].latitude,l));i.push(l.queryRenderedFeatures(this._MVTStyle._layers,u,t))}var c=[],h=[];for(r=0,a=i.length;r<a;r++){var d=i[r];for(var f in d){var p=d[f];for(o=0;o<p.length;o++)-1==h.indexOf(p[o].feature.id)&&(c.push(p[o]),h.push(p[o].feature.id))}}return c},M$S.prototype.onAlphaChanged=function(){this._painter.alpha=this.innerLayer.alpha;let e=this.innerLayer._imageryCache;for(let t in e)e[t].onAlphaChanged()},M$S.prototype.querySourceFeatures=function(e){var t=[];if("string"==typeof e.filter[2]&&e.filter[2].indexOf("%")>-1){var i=this._viewer.scene.camera.computeViewRectangle();if(!e$2e(i))return t;for(var n=h$18.southwest(i),r=h$18.southeast(i),o=h$18.northeast(i),a=h$18.northwest(i),s=this.queryRenderedFeatures([n,r,o,a],{layers:[e.sourceLayer]}),l=_0x51a3ff.createFilter(e&&e.filter),u=0;u<s.length;u++){var c=s[u].feature;l(new _0x47eac1(0),c)&&t.push(c)}}else{var h=this.innerLayer._imageryCache;for(var d in h){h[d].querySourceFeatures(e,t)}}return t},e$1e.prototype.free=function(){delete this.provider.blockCache[this.quadKey]},v$F._verifyAttributes=function(e){for(var t=[],i=0;i<e.length;++i){var n=e[i],r={index:u$Z(n.index,i),name:u$Z(n.name,""),enabled:u$Z(n.enabled,!0),componentsPerAttribute:n.componentsPerAttribute,componentDatatype:u$Z(n.componentDatatype,S$14.FLOAT),normalize:u$Z(n.normalize,!1),vertexBuffer:n.vertexBuffer,usage:u$Z(n.usage,A$18.STATIC_DRAW)};if(t.push(r),1!==r.componentsPerAttribute&&2!==r.componentsPerAttribute&&3!==r.componentsPerAttribute&&4!==r.componentsPerAttribute)throw new t$15("attribute.componentsPerAttribute must be in the range [1, 4].");var o=r.componentDatatype;if(!S$14.validate(o))throw new t$15("Attribute must have a valid componentDatatype or not specify it.");if(!A$18.validate(r.usage))throw new t$15("Attribute must have a valid usage or not specify it.")}for(var a=new Array(t.length),s=0;s<t.length;++s){var l=t[s].index;if(a[l])throw new t$15("Index "+l+" is used by more than one attribute.");a[l]=!0}return t},v$F._vertexSizeInBytes=function(e){for(var t=0,i=e.length,n=0;n<i;++n){var r=e[n];t+=r.componentsPerAttribute*S$14.getSizeInBytes(r.componentDatatype)}var o=i>0?S$14.getSizeInBytes(e[0].componentDatatype):0,a=o>0?t%o:0;return t+=0===a?0:o-a},v$F._createArrayViews=function(e,t){for(var i=[],n=0,r=e.length,o=0;o<r;++o){var a=e[o],s=a.componentDatatype;i.push({index:a.index,name:a.name,enabled:a.enabled,componentsPerAttribute:a.componentsPerAttribute,componentDatatype:s,normalize:a.normalize,offsetInBytes:n,vertexSizeInComponentType:t/S$14.getSizeInBytes(s),view:void 0}),n+=a.componentsPerAttribute*S$14.getSizeInBytes(s)}return i},v$F.prototype.resize=function(e){this._size=e;var t=this._allBuffers;this.writers=[];for(var i=0,n=t.length;i<n;++i){var r=t[i];v$F._resize(r,this._size),v$F._appendWriters(this.writers,r)}B$O(this)},v$F._resize=function(e,t){if(e.vertexSizeInBytes>0){var i=new ArrayBuffer(t*e.vertexSizeInBytes);if(e$2e(e.arrayBuffer))for(var n=new Uint8Array(i),r=new Uint8Array(e.arrayBuffer),o=r.length,a=0;a<o;++a)n[a]=r[a];for(var s=e.arrayViews,l=s.length,u=0;u<l;++u){var c=s[u];c.view=S$14.createArrayBufferView(c.componentDatatype,i,c.offsetInBytes)}e.arrayBuffer=i}};var T$P=[function(e,t,i){return function(n,r){t[n*i]=r,e.needsCommit=!0}},function(e,t,i){return function(n,r,o){var a=n*i;t[a]=r,t[a+1]=o,e.needsCommit=!0}},function(e,t,i){return function(n,r,o,a){var s=n*i;t[s]=r,t[s+1]=o,t[s+2]=a,e.needsCommit=!0}},function(e,t,i){return function(n,r,o,a,s){var l=n*i;t[l]=r,t[l+1]=o,t[l+2]=a,t[l+3]=s,e.needsCommit=!0}}];function U$Q(e,t){if(t.needsCommit&&t.vertexSizeInBytes>0){t.needsCommit=!1;var i=t.vertexBuffer,n=e._size*t.vertexSizeInBytes,r=e$2e(i);if(!r||i.sizeInBytes<n)return r&&i.destroy(),t.vertexBuffer=t$X.createVertexBuffer({context:e._context,typedArray:t.arrayBuffer,usage:t.usage}),t.vertexBuffer.vertexArrayDestroyable=!1,!0;t.vertexBuffer.copyFromArrayView(t.arrayBuffer)}return!1}function O$E(e,t,i){if(e.needsCommit&&e.vertexSizeInBytes>0){var n=e.vertexSizeInBytes*t,r=e.vertexSizeInBytes*i;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,n,r),n)}}function B$O(e){var t=e.va;if(e$2e(t)){for(var i=t.length,n=0;n<i;++n)t[n].va.destroy();e.va=void 0}}v$F._appendWriters=function(e,t){for(var i=t.arrayViews,n=i.length,r=0;r<n;++r){var o=i[r];e[o.index]=T$P[o.componentsPerAttribute-1](t,o.view,o.vertexSizeInComponentType)}},v$F.prototype.commit=function(e){var t,i,n,r=!1,o=this._allBuffers;for(i=0,n=o.length;i<n;++i)r=U$Q(this,t=o[i])||r;if(r||!e$2e(this.va)){B$O(this);for(var a=this.va=[],s=e$2e(e)?Math.ceil(this._size/(e$2d.SIXTY_FOUR_KILOBYTES-1)):1,l=0;l<s;++l){var u=[];for(i=0,n=o.length;i<n;++i){var c=l*((t=o[i]).vertexSizeInBytes*(e$2d.SIXTY_FOUR_KILOBYTES-1));v$F._appendAttributes(u,t,c,this._instanced)}u=u.concat(this._precreated),a.push({va:new c$13({context:this._context,attributes:u,indexBuffer:e}),indicesCount:1.5*(l!==s-1?e$2d.SIXTY_FOUR_KILOBYTES-1:this._size%(e$2d.SIXTY_FOUR_KILOBYTES-1))})}}},v$F._appendAttributes=function(e,t,i,n){for(var r=t.arrayViews,o=r.length,a=0;a<o;++a){var s=r[a];e.push({index:s.index,name:s.name,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:s.componentDatatype,normalize:s.normalize,vertexBuffer:t.vertexBuffer,offsetInBytes:i+s.offsetInBytes,strideInBytes:t.vertexSizeInBytes,instanceDivisor:n?1:0})}},v$F.prototype.subCommit=function(e,t){if(e<0||e>=this._size)throw new t$15("offsetInVertices must be greater than or equal to zero and less than the vertex array size.");if(e+t>this._size)throw new t$15("offsetInVertices + lengthInVertices cannot exceed the vertex array size.");for(var i=this._allBuffers,n=0,r=i.length;n<r;++n)O$E(i[n],e,t)},v$F.prototype.endSubCommits=function(){for(var e=this._allBuffers,t=0,i=e.length;t<i;++t)e[t].needsCommit=!1},v$F.prototype.isDestroyed=function(){return!1},v$F.prototype.destroy=function(){for(var e=this._allBuffers,t=0,i=e.length;t<i;++t){var n=e[t];n.vertexBuffer=n.vertexBuffer&&n.vertexBuffer.destroy()}return B$O(this),i$11(this)};var Lt$6='#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D u_atlas;\n\n#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\n\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\n\nvarying float v_depth;\nvarying vec2 v_textureCoordinates;\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds; // the min and max x and y values for the texture coordinates\nvarying vec4 v_originTextureCoordinateAndTranslate; // texture coordinate at the origin, billboard translate (used for label glyphs)\nvarying vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize\nvarying mat2 v_rotationMatrix;\n\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT1 = 2.0;\n\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\n\nfloat getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, vec2 dimensions, vec2 imageSize)\n{\n vec2 lookupVector = imageSize * (depthLookupST - adjustedST);\n lookupVector = v_rotationMatrix * lookupVector;\n vec2 labelOffset = (dimensions - imageSize) * (depthLookupST - vec2(0.0, v_originTextureCoordinateAndTranslate.y)); // aligns label glyph with bounding rectangle. Will be zero for billboards because dimensions and imageSize will be equal\n\n vec2 translation = v_originTextureCoordinateAndTranslate.zw;\n\n if (applyTranslate)\n {\n // this is only needed for labels where the horizontal origin is not LEFT\n // it moves the label back to where the "origin" should be since all label glyphs are set to HorizontalOrigin.LEFT\n translation += (dimensions * v_originTextureCoordinateAndTranslate.xy * vec2(1.0, 0.0));\n }\n\n vec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw;\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, st));\n\n if (logDepthOrDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\n\n\n#ifdef SDF\n\n// Get the distance from the edge of a glyph at a given position sampling an SDF texture.\nfloat getDistance(vec2 position)\n{\n#if defined(MVT) && !defined(WEBGPU)\n return texture2D(u_atlas, position).a;\n#else\n return texture2D(u_atlas, position).r;\n#endif\n}\n\n// Samples the sdf texture at the given position and produces a color based on the fill color and the outline.\nvec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)\n{\n float distance = getDistance(position);\n if (outlineWidth > 0.0)\n {\n // Don\'t get the outline edge exceed the SDF_EDGE\n float outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);\n float outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\n vec4 sdfColor = mix(outlineColor, v_color, outlineFactor);\n float alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);\n return vec4(sdfColor.rgb, sdfColor.a * alpha);\n }\n else\n {\n float alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\n return vec4(v_color.rgb, v_color.a * alpha);\n }\n}\n#endif\n\nvoid main()\n{\n#ifdef APPLY_SWIPE\n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n vec4 color = texture2D(u_atlas, v_textureCoordinates);\n#ifdef SDF\n float outlineWidth = v_outlineWidth;\n vec4 outlineColor = v_outlineColor;\n\n // Get the current distance\n float distance = getDistance(v_textureCoordinates);\n\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2) || defined(WEBGPU)\n float smoothing = fwidth(distance);\n // Get an offset that is approximately half the distance to the neighbor pixels\n // 0.354 is approximately half of 1/sqrt(2)\n vec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));\n\n // Sample the center point\n vec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n\n // Sample the 4 neighbors\n vec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\n vec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\n vec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\n vec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\n\n // Equally weight the center sample and the 4 neighboring samples\n color = (center + color1 + color2 + color3 + color4)/5.0;\n#else\n // Just do a single sample\n float smoothing = 1.0/32.0;\n color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n#endif\n color = czm_gammaCorrect(color);\n#else\n color = czm_gammaCorrect(color);\n color *= czm_gammaCorrect(v_color);\n#endif\n//end SDF\n\n// Fully transparent parts of the billboard are not pickable.\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\n if (color.a < 0.005) // matches 0/255 and 1/255\n {\n discard;\n }\n#else\n// The billboard is rendered twice. The opaque pass discards translucent fragments\n// and the translucent pass discards opaque fragments.\n#ifdef OPAQUE\n if (color.a < 0.995) // matches < 254/255\n {\n discard;\n }\n#else\n if (color.a >= 0.995) // matches 254/255 and 255/255\n {\n discard;\n }\n#endif\n#endif\n\n#ifdef VECTOR_TILE\n color *= u_highlightColor;\n#endif\n\n#ifdef PARTICLESYSTEM\n #ifdef LOG_DEPTH\n float fDepth = log2(v_depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n #else\n float fDepth = gl_FragCoord.z;\n #endif\n gl_FragColor = vec4(fDepth, fDepth * fDepth, 1.0, 1.0);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth();\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\n float temp = v_compressed.y;\n\n temp = temp * SHIFT_RIGHT1;\n\n float temp2 = (temp - floor(temp)) * SHIFT_LEFT1;\n bool enableDepthTest = temp2 != 0.0;\n bool applyTranslate = floor(temp) != 0.0;\n\n if (enableDepthTest) {\n temp = v_compressed.z;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 dimensions;\n dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\n dimensions.x = floor(temp);\n\n temp = v_compressed.w;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 imageSize;\n imageSize.y = (temp - floor(temp)) * SHIFT_LEFT12;\n imageSize.x = floor(temp);\n\n vec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy;\n adjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y);\n\n float epsilonEyeDepth = v_compressed.x + czm_epsilon1;\n float globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize);\n\n // negative values go into the screen\n if (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth)\n {\n float globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize); // top left corner\n if (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth)\n {\n float globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize); // top right corner\n if (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth)\n {\n discard;\n }\n }\n }\n }\n#endif\n\n}\n',Vt$7="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nattribute vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)\nattribute vec4 compressedAttribute1; // aligned axis, translucency by distance, image width\nattribute vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free\nattribute vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)\nattribute vec4 scaleByDistance; // near, nearScale, far, farScale\nattribute vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale\nattribute vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions\nattribute vec2 sdf; // sdf outline color (rgb) and width (w)\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\nattribute vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates\n#endif\n#ifdef VECTOR_TILE\nattribute float a_batchId;\n#endif\n#ifdef MVT\nattribute vec4 a_fade_opacity;\n#endif\n\nuniform float u_eyeOffsetZ;\nuniform float u_fade_change;\nvarying float v_depth;\nvarying vec2 v_textureCoordinates;\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize\nvarying mat2 v_rotationMatrix;\n#endif\n\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\n\nconst float UPPER_BOUND = 32768.0;\n\nconst float SHIFT_LEFT16 = 65536.0;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_LEFT7 = 128.0;\nconst float SHIFT_LEFT5 = 32.0;\nconst float SHIFT_LEFT3 = 8.0;\nconst float SHIFT_LEFT2 = 4.0;\nconst float SHIFT_LEFT1 = 2.0;\n\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT7 = 1.0 / 128.0;\nconst float SHIFT_RIGHT5 = 1.0 / 32.0;\nconst float SHIFT_RIGHT3 = 1.0 / 8.0;\nconst float SHIFT_RIGHT2 = 1.0 / 4.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\n\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)\n{\n // Note the halfSize cannot be computed in JavaScript because it is sent via\n // compressed vertex attributes that coerce it to an integer.\n vec2 halfSize = imageSize * scale * 0.5;\n halfSize *= ((direction * 2.0) - 1.0);\n\n vec2 originTranslate = origin * abs(halfSize);\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n if (validAlignedAxis || rotation != 0.0)\n {\n float angle = rotation;\n if (validAlignedAxis)\n {\n vec4 projectedAlignedAxis = czm_modelViewProjection * vec4(alignedAxis, 0.0);\n angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /\n (projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));\n }\n\n float cosTheta = cos(angle);\n float sinTheta = sin(angle);\n rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\n halfSize = rotationMatrix * halfSize;\n }\n else\n {\n rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n }\n#endif\n\tmpp = czm_metersPerPixel(positionEC);\n#ifdef FixedXYZ\n\tvec4 origViewPos = czm_view * vec4(0.0, 0.0, 0.0, 1.0);\n vec4 fixedAxis = positionEC - origViewPos;\n vec3 zAxis = normalize(fixedAxis.xyz);\n vec3 upViewVector = vec3(0.0, 1.0, 0.0);\n vec3 xAxis = normalize(cross(upViewVector, zAxis));\n vec3 yAxis = cross(zAxis, xAxis);\n yAxis = normalize(yAxis);\n mat3 matrix = mat3(xAxis,yAxis,zAxis);\n\tvec3 tmp = matrix * vec3((originTranslate + halfSize + translate + pixelOffset), 0.0);\n\ttmp *= czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\n\tpositionEC.xy += tmp.xy;\n#else\n positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\n positionEC.xy += (translate + pixelOffset) * mpp;\n#endif\n\n return positionEC;\n}\n\n#ifdef VERTEX_DEPTH_CHECK\nfloat getGlobeDepth(vec4 positionEC)\n{\n vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n\n float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n\n if (globeDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\nvoid main()\n{\n // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition\n\n // unpack attributes\n vec3 positionHigh = positionHighAndScale.xyz;\n vec3 positionLow = positionLowAndRotation.xyz;\n float scale = positionHighAndScale.w;\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n float rotation = positionLowAndRotation.w;\n#else\n float rotation = 0.0;\n#endif\n\n float compressed = compressedAttribute0.x;\n\n vec2 pixelOffset;\n pixelOffset.x = floor(compressed * SHIFT_RIGHT7);\n compressed -= pixelOffset.x * SHIFT_LEFT7;\n pixelOffset.x -= UPPER_BOUND;\n\n vec2 origin;\n origin.x = floor(compressed * SHIFT_RIGHT5);\n compressed -= origin.x * SHIFT_LEFT5;\n\n origin.y = floor(compressed * SHIFT_RIGHT3);\n compressed -= origin.y * SHIFT_LEFT3;\n\n#ifdef FRAGMENT_DEPTH_CHECK\n vec2 depthOrigin = origin.xy;\n#endif\n origin -= vec2(1.0);\n\n float show = floor(compressed * SHIFT_RIGHT2);\n compressed -= show * SHIFT_LEFT2;\n\n#ifdef INSTANCED\n vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\n vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\n #ifdef MVT\n vec2 textureCoordinates;\n textureCoordinates.x = textureCoordinatesBottomLeft.x + direction.x * textureCoordinatesRange.x;\n textureCoordinates.y = textureCoordinatesBottomLeft.y - direction.y * textureCoordinatesRange.y;\n #else\n vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n #endif\n#else\n vec2 direction;\n direction.x = floor(compressed * SHIFT_RIGHT1);\n direction.y = compressed - direction.x * SHIFT_LEFT1;\n\n vec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n#endif\n\n float temp = compressedAttribute0.y * SHIFT_RIGHT8;\n pixelOffset.y = -(floor(temp) - UPPER_BOUND);\n\n vec2 translate;\n translate.y = (temp - floor(temp)) * SHIFT_LEFT16;\n\n temp = compressedAttribute0.z * SHIFT_RIGHT8;\n translate.x = floor(temp) - UPPER_BOUND;\n\n translate.y += (temp - floor(temp)) * SHIFT_LEFT8;\n translate.y -= UPPER_BOUND;\n\n temp = compressedAttribute1.x * SHIFT_RIGHT8;\n float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);\n\n vec2 imageSize = vec2(floor(temp), temp2);\n\n#ifdef FRAGMENT_DEPTH_CHECK\n float labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));\n float applyTranslate = 0.0;\n if (labelHorizontalOrigin != 0.0) // is a billboard, so set apply translate to false\n {\n applyTranslate = 1.0;\n labelHorizontalOrigin -= 2.0;\n depthOrigin.x = labelHorizontalOrigin + 1.0;\n }\n\n depthOrigin = vec2(1.0) - (depthOrigin * 0.5);\n#endif\n\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n vec4 translucencyByDistance;\n translucencyByDistance.x = compressedAttribute1.z;\n translucencyByDistance.z = compressedAttribute1.w;\n\n translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\n temp = compressedAttribute1.y * SHIFT_RIGHT8;\n translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\n temp = compressedAttribute3.w;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 dimensions;\n dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\n dimensions.x = floor(temp);\n#endif\n\n#ifdef ALIGNED_AXIS\n vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\n temp = compressedAttribute2.z * SHIFT_RIGHT5;\n bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n#else\n vec3 alignedAxis = vec3(0.0);\n bool validAlignedAxis = false;\n#endif\n\n vec4 pickColor;\n vec4 color;\n\n temp = compressedAttribute2.y;\n temp = temp * SHIFT_RIGHT8;\n pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor.r = floor(temp);\n\n temp = compressedAttribute2.x;\n temp = temp * SHIFT_RIGHT8;\n color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n color.r = floor(temp);\n\n temp = compressedAttribute2.z * SHIFT_RIGHT8;\n bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\n temp = floor(temp) * SHIFT_RIGHT8;\n\n pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor /= 255.0;\n\n color.a = floor(temp);\n color /= 255.0;\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n\n#if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK)\n float eyeDepth = positionEC.z;\n#endif\n\n#ifdef MVT\n // 实现MVT文字的显隐渐变\n vec2 fade_opacity = a_fade_opacity.xy;\n float placed = fade_opacity.x;\n float fade_change = placed > 0.5 ? u_fade_change : -u_fade_change;\n float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity.y + fade_change));\n color.a *= interpolated_fade_opacity;\n // MVT中eyeOffset的y值存储的是布告板的像素高度的一半。根据这个值在相机空间中抬高一点,以免一半被埋入地下\n // u_eyeOffsetZ是相机当前俯仰角计算出的需要在相机空间中拉近的距离,以免被地形挡住\n vec3 realEyeOffset = eyeOffset.xyz;\n float meterPerPixel = czm_metersPerPixel(positionEC);\n realEyeOffset.y = meterPerPixel * eyeOffset.y;\n realEyeOffset.z = u_eyeOffsetZ;\n positionEC = czm_eyeOffset(positionEC, realEyeOffset.xyz);\n if (interpolated_fade_opacity == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#else\n positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\n#endif\n\n ///////////////////////////////////////////////////////////////////////////\n\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n // 2D camera distance is a special case\n // treat all billboards as flattened to the z=0.0 plane\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n lengthSq = dot(positionEC.xyz, positionEC.xyz);\n }\n#endif\n\n#ifdef EYE_DISTANCE_SCALING\n float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);\n scale *= distanceScale;\n translate *= distanceScale;\n // push vertex behind near plane for clipping\n if (scale == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n float translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (translucency == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n#ifdef EYE_DISTANCE_PIXEL_OFFSET\n float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\n pixelOffset *= pixelOffsetScale;\n#endif\n\n#ifdef DISTANCE_DISPLAY_CONDITION\n float nearSq = compressedAttribute3.x;\n float farSq = compressedAttribute3.y;\n if (lengthSq < nearSq || lengthSq > farSq)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n mat2 rotationMatrix;\n float mpp;\n\n#ifdef DISABLE_DEPTH_DISTANCE\n float disableDepthTestDistance = compressedAttribute3.z;\n#endif\n\n#ifdef VERTEX_DEPTH_CHECK\nif (lengthSq < disableDepthTestDistance) {\n float depthsilon = 10.0;\n\n vec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy;\n vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth1 = getGlobeDepth(pEC1);\n\n if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)\n {\n vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth2 = getGlobeDepth(pEC2);\n\n if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)\n {\n vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth3 = getGlobeDepth(pEC3);\n if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)\n {\n positionEC.xyz = vec3(0.0);\n }\n }\n }\n}\n#endif\n\n positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n positionEC.xyz *= show;\n gl_Position = czm_projection * positionEC;\n v_textureCoordinates = textureCoordinates;\n\n#ifdef LOG_DEPTH\n czm_vertexLogDepth();\n v_depth = 1.0 - czm_currentFrustum.x + gl_Position.w;\n#endif\n\n#ifdef DISABLE_DEPTH_DISTANCE\n if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n {\n disableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n }\n\n if (disableDepthTestDistance != 0.0)\n {\n // Don't try to \"multiply both sides\" by w. Greater/less-than comparisons won't work for negative values of w.\n float zclip = gl_Position.z / gl_Position.w;\n\n#ifdef WEBGPU \n bool clipped = (zclip < 0.0 || zclip > 1.0);\n#else\n bool clipped = (zclip < -1.0 || zclip > 1.0);\n#endif\n if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n {\n // Position z on the near plane.\n#ifdef WEBGPU\n gl_Position.z = 0.0;\n#else\n gl_Position.z = -gl_Position.w;\n#endif\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0;\n#endif\n }\n }\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\n if (sizeInMeters) {\n translate /= mpp;\n dimensions /= mpp;\n imageSize /= mpp;\n }\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n v_rotationMatrix = rotationMatrix;\n#else\n v_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n#endif\n\n float enableDepthCheck = 0.0;\n if (lengthSq < disableDepthTestDistance)\n {\n enableDepthCheck = 1.0;\n }\n\n float dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12));\n float dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12));\n\n float iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12));\n float ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12));\n\n v_compressed.x = eyeDepth;\n v_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck;\n v_compressed.z = dw * SHIFT_LEFT12 + dh;\n v_compressed.w = iw * SHIFT_LEFT12 + ih;\n v_originTextureCoordinateAndTranslate.xy = depthOrigin;\n v_originTextureCoordinateAndTranslate.zw = translate;\n v_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate;\n\n#endif\n\n#ifdef SDF\n vec4 outlineColor;\n float outlineWidth;\n\n temp = sdf.x;\n temp = temp * SHIFT_RIGHT8;\n outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.r = floor(temp);\n\n temp = sdf.y;\n temp = temp * SHIFT_RIGHT8;\n float temp3 = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.a = floor(temp);\n outlineColor /= 255.0;\n\n v_outlineWidth = outlineWidth / 255.0;\n v_outlineColor = outlineColor;\n#endif\n\n v_pickColor = pickColor;\n\n v_color = color;\n v_color.a *= translucency;\n\n}\n",e$1d={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2},S$L=Object.freeze(e$1d),e$1c={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},V$L=Object.freeze(e$1c);function O$D(e,t,i,n,r){return new F$V(e,t,i,n,r)}function F$V(e,t,i,n,r){t=t||P$O,i=i||Q$Q,r=r||Array,this.nodeSize=n||64,this.points=e,this.ids=new r(e.length),this.coords=new r(2*e.length);for(var o=0;o<e.length;o++)this.ids[o]=o,this.coords[2*o]=t(e[o]),this.coords[2*o+1]=i(e[o]);K$L(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function P$O(e){return e[0]}function Q$Q(e){return e[1]}function J$M(e,t,i,n,r,o){var a=r-i,s=o-n,l={x:e-.5*a,y:t-.5*s,width:a,height:s},u={x:i,y:n,width:a,height:s},c=l.x,h=l.y,d=u.x,f=u.y;return!(c>d+u.width||c+l.width<d||h+l.height<f||h>f+u.height)}function R$P(e,t,i,n,r,o,a,s,l,u,c){for(var h,d,f=[0,e.length-1,0],p=[];f.length;){var _=f.pop(),m=f.pop(),g=f.pop(),x=void 0;if(m-g<=a)for(var y=g;y<=m;y++)h=t[2*y],d=t[2*y+1],void 0!==s&&s.length>y&&(x=l(s[e[y]])),void 0!==u?u(h,d,i,n,r,o,s[e[y]],x,c)&&p.push(e[y]):J$M(h,d,i,n,r,o)&&p.push(e[y]);else{var v=Math.floor((g+m)/2);h=t[2*v],d=t[2*v+1],void 0!==s&&s.length>v&&(x=l(s[e[v]])),void 0!==u?u(h,d,i,n,r,o,s[e[v]],x,c)&&p.push(e[v]):J$M(h,d,i,n,r,o)&&p.push(e[v]);var $=(_+1)%2;(0===_?i<=h:n<=d)&&(f.push(g),f.push(v-1),f.push($)),(0===_?r>=h:o>=d)&&(f.push(v+1),f.push(m),f.push($))}}return p}function U$P(e,t,i,n,r,o,a){for(var s,l,u=[0,e.length-1,0],c=[];u.length;){var h=u.pop(),d=u.pop(),f=u.pop();if(d-f<=a)for(var p=f;p<=d;p++)s=t[2*p],l=t[2*p+1],s>=i&&s<=r&&l>=n&&l<=o&&c.push(e[p]);else{var _=Math.floor((f+d)/2);s=t[2*_],l=t[2*_+1],s>=i&&s<=r&&l>=n&&l<=o&&c.push(e[_]);var m=(h+1)%2;(0===h?i<=s:n<=l)&&(u.push(f),u.push(_-1),u.push(m)),(0===h?r>=s:o>=l)&&(u.push(_+1),u.push(d),u.push(m))}}return c}function K$L(e,t,i,n,r,o){if(!(r-n<=i)){var a=Math.floor((n+r)/2);L$Z(e,t,a,n,r,o%2),K$L(e,t,i,n,a-1,o+1),K$L(e,t,i,a+1,r,o+1)}}function L$Z(e,t,i,n,r,o){for(;r>n;){if(r-n>600){var a=r-n+1,s=i-n+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);L$Z(e,t,i,Math.max(n,Math.floor(i-s*u/a+c)),Math.min(r,Math.floor(i+(a-s)*u/a+c)),o)}var h=t[2*i+o],d=n,f=r;for(B$N(e,t,n,i),t[2*r+o]>h&&B$N(e,t,n,r);d<f;){for(B$N(e,t,d,f),d++,f--;t[2*d+o]<h;)d++;for(;t[2*f+o]>h;)f--}t[2*n+o]===h?B$N(e,t,n,f):B$N(e,t,++f,r),f<=i&&(n=f+1),i<=f&&(r=f-1)}}function B$N(e,t,i,n){C$T(e,i,n),C$T(t,2*i,2*n),C$T(t,2*i+1,2*n+1)}function C$T(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function V$K(e,t,i,n,r,o){for(var a=[0,e.length-1,0],s=[],l=r*r;a.length;){var u=a.pop(),c=a.pop(),h=a.pop();if(c-h<=o)for(var d=h;d<=c;d++)N$K(t[2*d],t[2*d+1],i,n)<=l&&s.push(e[d]);else{var f=Math.floor((h+c)/2),p=t[2*f],_=t[2*f+1];N$K(p,_,i,n)<=l&&s.push(e[f]);var m=(u+1)%2;(0===u?i-r<=p:n-r<=_)&&(a.push(h),a.push(f-1),a.push(m)),(0===u?i+r>=p:n+r>=_)&&(a.push(f+1),a.push(c),a.push(m))}}return s}function N$K(e,t,i,n){var r=e-i,o=t-n;return r*r+o*o}F$V.prototype={range:function(e,t,i,n){return U$P(this.ids,this.coords,e,t,i,n,this.nodeSize)},within:function(e,t,i){return V$K(this.ids,this.coords,e,t,i,this.nodeSize)},intersect:function(e,t,i,n,r,o,a,s){return R$P(this.ids,this.coords,e,t,i,n,this.nodeSize,r,o,a,s)}};var _0x325d8b=(_0x219d28=!0,function(e,t){var i=_0x219d28?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x219d28=!1,i}),_0x3fcd1b=_0x325d8b(void 0,(function(){return _0x3fcd1b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3fcd1b).search("(((.+)+)+)+$")})),_0x219d28;_0x3fcd1b();var X$O="\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute float aColor;\nuniform float uLineWidth;\nvarying float vColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nvoid main()\n{\n bool bUsePre = aTexCoord0.x < 0.1;\n float offset = bUsePre ? -uLineWidth : uLineWidth;\n vec4 viewPos1 = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tviewPos1.x = viewPos1.x + offset * computerOnePixelLength();\n\tgl_Position = czm_projection * viewPos1;\n\tvColor = aColor;\n}";function _$K(e){this._point3Ds={},this._points=[],this._style=void 0,this._billboardCollection=void 0,this._isInitialize=!1,this._pointsChanged=!0,this._colorCommand=void 0,this._worldMatrix=p$1d.clone(p$1d.IDENTITY),this._boundingSphere=new i$1d,this._isVisible=!1,this._frameState=void 0,this._colors=void 0,this._isUpdateColor=!1}function G$$(e,t,i){A$Y(e);var n=q$X(e,i.mode);H$V(e),Y$G(e,t,n),e._isInitialize=!0}function A$Y(e){e$2e(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0)}function Y$G(e,t,i){A$Y(e);var n=t$X.createVertexBuffer({context:t,typedArray:i.vertices,usage:A$18.STATIC_DRAW}),r=t$X.createVertexBuffer({context:t,typedArray:i.texcoords,usage:A$18.STATIC_DRAW}),o=t$X.createVertexBuffer({context:t,typedArray:i.colors,usage:A$18.STATIC_DRAW}),a=[],s={aPosition:0,aTexCoord0:1,aColor:2};a.push({index:s.aPosition,vertexBuffer:n,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),a.push({index:s.aTexCoord0,vertexBuffer:r,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),a.push({index:s.aColor,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$14.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:1,normalize:!1});var l=t$X.createIndexBuffer({context:t,typedArray:i.indexPackage,usage:A$18.STATIC_DRAW,indexDatatype:i.indexDataType});e._colorCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.S3MTiles,owner:e}),e._colorCommand.vertexArray=new c$13({context:t,attributes:a,indexBuffer:l});var u=new s$V({sources:[X$O]}),c=new s$V({sources:["uniform vec4 uFillColor;\nvarying float vColor;\nvoid main()\n{\n if(vColor < 0.1)\n {\n discard;\n return;\n }\n gl_FragColor = uFillColor;\n}\n"]});e._colorCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:s}),e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),e._colorCommand.uniformMap={uLineWidth:function(){return e._style._calloutWidth},uFillColor:function(){return e._style._calloutColor}}}function q$X(e){for(var t=0,i=0,n=0,r=0,o=2*e._points.length,a=S$14.createTypedArray(S$14.FLOAT,3*o),s=S$14.createTypedArray(S$14.FLOAT,2*o),l=new Uint8Array(o),u=o/2*3,c=o>65535?ce$z.UNSIGNED_INT:ce$z.UNSIGNED_SHORT,h=S$14.createTypedArray(c,u),d=0;d<e._points.length/2;d++){var f=e._points[2*d],p=e._points[2*d+1],_=t/3;a[t++]=p.x,a[t++]=p.y,a[t++]=p.z;var m=t/3;a[t++]=p.x,a[t++]=p.y,a[t++]=p.z;var g=t/3;a[t++]=f.x,a[t++]=f.y,a[t++]=f.z;var x=t/3;a[t++]=f.x,a[t++]=f.y,a[t++]=f.z,s[i++]=0,s[i++]=0,s[i++]=1,s[i++]=0,s[i++]=1,s[i++]=1,s[i++]=0,s[i++]=1,h[n++]=_,h[n++]=m,h[n++]=g,h[n++]=_,h[n++]=g,h[n++]=x}for(d=0;d<o;d++)l[r++]=255;return e._colors=l,{vertices:a,texcoords:s,colors:l,indexPackage:h,indexDataType:c}}function H$V(e,t){for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0;l<e._points.length;l++){var u=e._points[l];n=Math.max(n,u.x),i=Math.min(i,u.x),o=Math.max(o,u.y),r=Math.min(r,u.y),s=Math.max(s,u.z),a=Math.min(a,u.z)}SuperMap3D.Math.equalsEpsilon(n,i,SuperMap3D.Math.EPSILON6)&&(n=i+.1),SuperMap3D.Math.equalsEpsilon(o,r,SuperMap3D.Math.EPSILON6)&&(o=r+.1),SuperMap3D.Math.equalsEpsilon(s,a,SuperMap3D.Math.EPSILON6)&&(s=a+.1);var c=new o$1p((n+i)/2,(o+r)/2,(s+a)/2),h=Math.max(Math.max(s-a,o-r),n-i);e._boundingSphere=new i$1d(c,h/2)}function E$T(e){if(e._pointsChanged){if(e._points=[],e._frameState.mode===C$14.SCENE3D)for(var t in e._point3Ds)for(var i=e._point3Ds[t],n=0;n<i.length;n++){var r=i[n].position,o=new o$1p;o$1p.normalize(r,o),o$1p.multiplyByScalar(o,6378137,o),i[n].dataIndex=2*e._points.length,e._points.push(r),e._points.push(o)}else for(var t in e._point3Ds)for(i=e._point3Ds[t],n=0;n<i.length;n++){o=new o$1p((r=i[n].position).x,r.y,0);i[n].dataIndex=2*e._points.length,e._points.push(r),e._points.push(o)}e._pointsChanged=!1}}function Z$O(e){if(e._isUpdateColor&&e$2e(e._colors)){for(var t in e._point3Ds)for(var i=e._point3Ds[t],n=0;n<i.length;n++){var r=i[n].dataIndex;e._colors[r]=i[n].show?255:0,e._colors[r+1]=e._colors[r],e._colors[r+2]=e._colors[r],e._colors[r+3]=e._colors[r]}e._colorCommand.vertexArray.getAttribute(2).vertexBuffer.copyFromArrayView(e._colors),e._isUpdateColor=!1}}Object.defineProperties(_$K.prototype,{style:{get:function(){return this._style},set:function(e){this._style=e}},count:{get:function(){return this._points.length}},isVisible:{get:function(){return this._isVisible},set:function(e){this._isVisible=e}}}),_$K.prototype.destroy=function(){return A$Y(this),i$11(this)},_$K.prototype.addPoint=function(e,t,i){var n={id:e,position:o$1p.clone(i),index:t,dataIndex:0,show:!0};e$2e(this._point3Ds[e])||(this._point3Ds[e]=[]),this._point3Ds[e].push(n),this._isInitialize=!1,this._pointsChanged=!0},_$K.prototype.remove=function(e,t){var i=this.getByID(e);if(null!=i){for(var n=0;n<i.length;n++)i[n].index===t&&(delete i[n],i[n]=null);var r=[];for(n=0;n<i.length;n++)null!==i[n]&&r.push(i[n]);0===r.length?delete this._point3Ds[e]:this._point3Ds[e]=r}this._pointsChanged=!0,this._isInitialize=!0},_$K.prototype.getByID=function(e){return e$2e(this._point3Ds[e])?this._point3Ds[e]:null},_$K.prototype._setVisibleByID=function(e,t,i){if(E$T(this),!e$2e(this._point3Ds[e])||0===this._point3Ds[e].length)return null;for(var n=this._point3Ds[e],r=0;r<n.length;r++)n[r].index===t&&n[r].show!==i&&(n[r].show=i,this._isUpdateColor=!0)},_$K.prototype._updateIndex=function(e,t,i){var n=this._point3Ds[e];if(e$2e(n))for(var r=0;r<n.length;r++)n[r].index===t&&(n[r].index=i)},_$K.prototype.update=function(e,t,i){this._frameState=t,this._pointsChanged&&E$T(this),0!==this._points.length&&this._points.length%2==0&&this._isVisible&&(this._isInitialize||G$$(this,e,t),Z$O(this),e$2e(this._colorCommand)&&i.push(this._colorCommand))};var it$a=n$J.SHOW_INDEX,re$C=n$J.POSITION_INDEX,Le$n=n$J.PIXEL_OFFSET_INDEX,Ve$f=n$J.EYE_OFFSET_INDEX,st$7=n$J.HORIZONTAL_ORIGIN_INDEX,rt$g=n$J.VERTICAL_ORIGIN_INDEX,at$c=n$J.SCALE_INDEX,ae$t=n$J.IMAGE_INDEX_INDEX,be$r=n$J.COLOR_INDEX,nt$a=n$J.ROTATION_INDEX,ht$8=n$J.ALIGNED_AXIS_INDEX,Fe$j=n$J.SCALE_BY_DISTANCE_INDEX,Me$n=n$J.TRANSLUCENCY_BY_DISTANCE_INDEX,Ue$g=n$J.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,He$d=n$J.DISTANCE_DISPLAY_CONDITION,Gt$5=n$J.DISABLE_DEPTH_DISTANCE,ot$9=n$J.TEXTURE_COORDINATE_BOUNDS,_t$7=n$J.SDF_INDEX,dt$9=n$J.OPACITY_STATE_INDEX,Ae$p=n$J.NUMBER_OF_PROPERTIES,m$S,Wt$8={positionHighAndScale:0,positionLowAndRotation:1,compressedAttribute0:2,compressedAttribute1:3,compressedAttribute2:4,eyeOffset:5,scaleByDistance:6,pixelOffsetScaleByDistance:7,compressedAttribute3:8,textureCoordinateBoundsOrLabelTranslate:9,a_batchId:10,sdf:11,a_fade_opacity:12},zt$5={direction:0,positionHighAndScale:1,positionLowAndRotation:2,compressedAttribute0:3,compressedAttribute1:4,compressedAttribute2:5,eyeOffset:6,scaleByDistance:7,pixelOffsetScaleByDistance:8,compressedAttribute3:9,textureCoordinateBoundsOrLabelTranslate:10,a_batchId:11,sdf:12,a_fade_opacity:13},Yt$5={enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.SOURCE_ALPHA,functionDestinationRgb:l$13.ONE,functionSourceAlpha:l$13.ONE,functionDestinationAlpha:l$13.ONE},Ge$e;function w$O(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._spTranslucent=void 0,this._spParticleSystem=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._rsParticleSystem=void 0,this._vaf=void 0,this._billboardsID={},this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._shaderRotation=!1,this._compiledShaderRotation=!1,this._shaderAlignedAxis=!1,this._compiledShaderAlignedAxis=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderPixelOffsetScaleByDistance=!1,this._compiledShaderPixelOffsetScaleByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._shaderClampToGround=!1,this._compiledShaderClampToGround=!1,this._propertiesChanged=new Uint32Array(Ae$p),this._maxSize=0,this._maxEyeOffset=0,this._maxScale=1,this._maxPixelOffset=0,this._allHorizontalCenter=!0,this._allVerticalCenter=!0,this._allSizedInMeters=!0,this._baseVolume=new i$1d,this._baseVolumeWC=new i$1d,this._baseVolume2D=new i$1d,this._boundingVolume=new i$1d,this._boundingVolumeDirty=!1,this._colorCommands=[],this._depthTestEnable=u$Z(e.depthTestEnable,!0),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.debugShowTextureAtlas=u$Z(e.debugShowTextureAtlas,!1),this.blendOption=u$Z(e.blendOption,S$L.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._isParticleSystem=e.particleSystem,this._isMVT=u$Z(e.isMVT,!1),this._ignoreShow=e.ignoreShow,this._fadeChange=1,this._mode=C$14.SCENE3D,this._buffersUsage=new Array(Ae$p),this._buffersUsage[it$a]=A$18.STATIC_DRAW,this._buffersUsage[re$C]=A$18.STATIC_DRAW,this._buffersUsage[Le$n]=A$18.STATIC_DRAW,this._buffersUsage[Ve$f]=A$18.STATIC_DRAW,this._buffersUsage[st$7]=A$18.STATIC_DRAW,this._buffersUsage[rt$g]=A$18.STATIC_DRAW,this._buffersUsage[at$c]=A$18.STATIC_DRAW,this._buffersUsage[ae$t]=A$18.STATIC_DRAW,this._buffersUsage[be$r]=A$18.STATIC_DRAW,this._buffersUsage[nt$a]=A$18.STATIC_DRAW,this._buffersUsage[ht$8]=A$18.STATIC_DRAW,this._buffersUsage[Fe$j]=A$18.STATIC_DRAW,this._buffersUsage[Me$n]=A$18.STATIC_DRAW,this._buffersUsage[Ue$g]=A$18.STATIC_DRAW,this._buffersUsage[He$d]=A$18.STATIC_DRAW,this._buffersUsage[ot$9]=A$18.STATIC_DRAW,this._buffersUsage[dt$9]=A$18.DYNAMIC_DRAW,this._highlightColor=e$1X.clone(e$1X.WHITE);var t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture},u_highlightColor:function(){return t._highlightColor},u_eyeOffsetZ:function(){if(!e$2e(t._scene)||!e$2e(t._scene.camera))return 0;var e=t._scene.camera;return.01*e.positionCartographic.height*Math.sin(e.pitch)},u_fade_change:function(){return t._fadeChange}};var i=this._scene;e$2e(i)&&e$2e(i.terrainProviderChanged)&&(this._removeCallbackFunc=i.terrainProviderChanged.addEventListener((function(){for(var e=this._billboards,t=e.length,i=0;i<t;++i)e[i]._updateClamping()}),this)),this._lineCallout=new _$K,this._style3D=u$Z(e.style3D,void 0),this._lineCallout.style=this._style3D,this._visibleViewport=4095,this._swipeEnabled=u$Z(e.swipeEnabled,!1),this._swipeRegion=u$Z(e.swipeRegion,new f$1a(0,0,1,1)),this._compiledSwipeEnabled=!1,this._compiledSwipeRegion=new f$1a(0,0,1,1),this._billboardMode=u$Z(e.billboardMode,yr$2.None)}function ft$8(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function Xe$b(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;for(var t=[],i=e._billboards,n=i.length,r=0,o=0;r<n;++r){var a=i[r];if(a){var s=a._index;a._index=o++,t.push(a),e._lineCallout._updateIndex(a.id,s,a._index)}}e._billboards=t}}function kt$6(e){var t=e.cache.billboardCollection_indexBufferBatched;if(e$2e(t))return t;for(var i=new Uint16Array(98298),n=0,r=0;n<98298;n+=6,r+=4)i[n]=r,i[n+1]=r+1,i[n+2]=r+2,i[n+3]=r+0,i[n+4]=r+2,i[n+5]=r+3;return(t=t$X.createIndexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=t,t}function Kt$6(e){var t=e.cache.billboardCollection_indexBufferInstanced;return e$2e(t)||((t=t$X.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function Qt$6(e){var t=e.cache.billboardCollection_vertexBufferInstanced;return e$2e(t)||((t=t$X.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:A$18.STATIC_DRAW})).vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}function qt$7(e,t,i,n,r,o,a){var s=[{index:m$S.positionHighAndScale,name:"positionHighAndScale",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[re$C]},{index:m$S.positionLowAndRotation,name:"positionLowAndRotation",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[re$C]},{index:m$S.compressedAttribute0,name:"compressedAttribute0",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Le$n]},{index:m$S.compressedAttribute1,name:"compressedAttribute1",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Me$n]},{index:m$S.compressedAttribute2,name:"compressedAttribute2",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[be$r]},{index:m$S.eyeOffset,name:"eyeOffset",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Ve$f]},{index:m$S.scaleByDistance,name:"scaleByDistance",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Fe$j]},{index:m$S.pixelOffsetScaleByDistance,name:"pixelOffsetScaleByDistance",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Ue$g]},{index:m$S.compressedAttribute3,name:"compressedAttribute3",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[He$d]},{index:m$S.textureCoordinateBoundsOrLabelTranslate,name:"textureCoordinateBoundsOrLabelTranslate",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[ot$9]}];return n&&s.push({index:m$S.direction,name:"direction",componentsPerAttribute:2,componentDatatype:S$14.FLOAT,vertexBuffer:Qt$6(e)}),e$2e(r)&&s.push({index:m$S.a_batchId,name:"a_batchId",componentsPerAttribute:1,componentDatatyps:S$14.FLOAT,bufferUsage:A$18.STATIC_DRAW}),o&&s.push({index:m$S.sdf,name:"sdf",componentsPerAttribute:2,componentDatatype:S$14.FLOAT,usage:i[_t$7]}),a&&s.push({index:m$S.a_fade_opacity,name:"a_fade_opacity",componentsPerAttribute:2,componentDatatype:S$14.FLOAT,usage:A$18.STATIC_DRAW}),new v$F(e,s,n?t:4*t,n)}Object.defineProperties(w$O.prototype,{length:{get:function(){return Xe$b(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}},style3D:{get:function(){return this._style3D},set:function(e){this._style3D=e,this.setBillboardImage(this._style3D),this._lineCallout.style=e}},showCallout:{get:function(){return this._lineCallout.isVisible},set:function(e){this._lineCallout.isVisible=e}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(e$2e(e)&&e instanceof f$1a))throw new t$15("Expected BillboardCollection.swipeRegion to be type of BoundingRectangle.");f$1a.equals(e,this._swipeRegion)||f$1a.clone(e,this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){o$1q.typeOf.bool("BillboardCollection.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e)}},fadeChage:{get:function(){return this._fadeChange},set:function(e){e!==this._fadeChange&&(this._fadeChange=e)}}}),w$O.prototype.add=function(e){var t=new n$J(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,e$2e(t.id)&&(this._billboardsID[t.id]=t),e$2e(e)&&e$2e(e.position)&&this._lineCallout.addPoint(t.id,t._index,e.position),t},w$O.prototype.remove=function(e){return!!this.contains(e)&&(e$2e(e.id)&&delete this._billboardsID[e.id],this._billboards[e._index]=null,this._billboardsRemoved=!0,this._createVertexArray=!0,this._lineCallout.remove(e.id,e._index),e._destroy(),!0)},w$O.prototype.removeAll=function(){ft$8(this._billboards),this._billboards=[],this._billboardsID={},this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},w$O.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},w$O.prototype.contains=function(e){return e$2e(e)&&e._billboardCollection===this},w$O.prototype.containsByID=function(e){return this._billboardsID.hasOwnProperty(e)},w$O.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return Xe$b(this),this._billboards[e]},w$O.prototype.getById=function(e){if(!e$2e(e))throw new t$15("id is required.");return e$2e(this._billboardsID[e])?this._billboardsID[e]:null},w$O.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,n=0;n<Ae$p;++n){var r=0===i[n]?A$18.STATIC_DRAW:A$18.STREAM_DRAW;t=t||e[n]!==r,e[n]=r}return t};var We$i=new i$12;function ut$a(e,t,i,n,r){var o,a=n[m$S.positionHighAndScale],s=n[m$S.positionLowAndRotation],l=r._getActualPosition();e._mode===C$14.SCENE3D&&(i$1d.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),i$12.fromCartesian(l,We$i);var u=r.scale,c=r.rotation;0!==c&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,u);var h=We$i.high,d=We$i.low;e._instanced?(a(o=r._index,h.x,h.y,h.z,u),s(o,d.x,d.y,d.z,c)):(a((o=4*r._index)+0,h.x,h.y,h.z,u),a(o+1,h.x,h.y,h.z,u),a(o+2,h.x,h.y,h.z,u),a(o+3,h.x,h.y,h.z,u),s(o+0,d.x,d.y,d.z,c),s(o+1,d.x,d.y,d.z,c),s(o+2,d.x,d.y,d.z,c),s(o+3,d.x,d.y,d.z,c))}var b$$=new o$1o,F$U=32768,ne$A=65536,ze$d=4096,z$N=256,Zt$4=128,Jt$5=32,$t$4=8,pt$9=4,jt$6=1/256,ct$9=0,lt$4=2,mt$5=3,Tt$9=1;function vt$9(e,t,i,n,r){var o,a=n[m$S.compressedAttribute0],s=r.pixelOffset,l=s.x,u=s.y,c=r._translate,h=c.x,d=c.y;e._maxPixelOffset=Math.max(e._maxPixelOffset,Math.abs(l+h),Math.abs(-u+d));var f=r.horizontalOrigin,p=r._verticalOrigin,_=r.show&&r.clusterShow;0===r.color.alpha&&(_=!1),p===S$Q.BASELINE&&(p=S$Q.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&f===j$V.CENTER,e._allVerticalCenter=e._allVerticalCenter&&p===S$Q.CENTER;var m=0,g=0,x=0,y=0,v=r._imageIndex;if(-1!==v){var $=i[v];if(!e$2e($))throw new t$15("Invalid billboard image index: "+v);m=$.x,g=$.y,x=$.width,y=$.height}var b=m+x,T=g+y,C=Math.floor(e$2d.clamp(l,-F$U,F$U)+F$U)*Zt$4;C+=(f+1)*Jt$5,C+=(p+1)*$t$4,C+=(_?1:0)*pt$9;var S=Math.floor(e$2d.clamp(u,-F$U,F$U)+F$U)*z$N,w=Math.floor(e$2d.clamp(h,-F$U,F$U)+F$U)*z$N,E=(e$2d.clamp(d,-F$U,F$U)+F$U)*jt$6,P=Math.floor(E);if(S+=P,w+=Math.floor((E-P)*z$N),e._isMVT){var A=T;T=g,g=A}b$$.x=m,b$$.y=g;var L=t$$.compressTextureCoordinates(b$$);b$$.x=b;var M=t$$.compressTextureCoordinates(b$$);b$$.y=T;var R=t$$.compressTextureCoordinates(b$$);b$$.x=m;var O=t$$.compressTextureCoordinates(b$$);e._instanced?a(o=r._index,C,S,w,L):(a((o=4*r._index)+0,C+ct$9,S,w,L),a(o+1,C+lt$4,S,w,M),a(o+2,C+mt$5,S,w,R),a(o+3,C+Tt$9,S,w,O))}function xt$7(e,t,i,n,r){var o,a=n[m$S.compressedAttribute1],s=r.alignedAxis;o$1p.equals(s,o$1p.ZERO)||(e._shaderAlignedAxis=!0);var l=0,u=1,c=1,h=1,d=r.translucencyByDistance;e$2e(d)&&(l=d.near,u=d.nearValue,c=d.far,h=d.farValue,(1!==u||1!==h)&&(e._shaderTranslucencyByDistance=!0));var f=0,p=r._imageIndex;if(-1!==p){var _=i[p];if(!e$2e(_))throw new t$15("Invalid billboard image index: "+p);f=_.width}var m=e._textureAtlas.texture.width,g=Math.round(u$Z(r.width,m*f));e._maxSize=Math.max(e._maxSize,g);var x=e$2d.clamp(g,0,ne$A),y=0;Math.abs(o$1p.magnitudeSquared(s)-1)<e$2d.EPSILON6&&(y=t$$.octEncodeFloat(s)),u=e$2d.clamp(u,0,1),x=x*z$N+(u=1===u?255:255*u|0),h=e$2d.clamp(h,0,1),y=y*z$N+(h=1===h?255:255*h|0),e._instanced?a(o=r._index,x,y,l,c):(a((o=4*r._index)+0,x,y,l,c),a(o+1,x,y,l,c),a(o+2,x,y,l,c),a(o+3,x,y,l,c))}function Ye$e(e,t,i,n,r){var o,a=n[m$S.compressedAttribute2],s=r.color,l=e$2e(e._batchTable)?e$1X.WHITE:r.getPickId(t).color,u=r.sizeInMeters?1:0,c=Math.abs(o$1p.magnitudeSquared(r.alignedAxis)-1)<e$2d.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&1===u;var h=0,d=r._imageIndex;if(-1!==d){var f=i[d];if(!e$2e(f))throw new t$15("Invalid billboard image index: "+d);h=f.height}var p=e._textureAtlas.texture.dimensions,_=Math.round(u$Z(r.height,p.y*h));e._maxSize=Math.max(e._maxSize,_);var m=u$Z(r._labelHorizontalOrigin,-2),g=_*pt$9+(m+=2),x=e$1X.floatToByte(s.red),y=e$1X.floatToByte(s.green),v=e$1X.floatToByte(s.blue),$=x*ne$A+y*z$N+v;x=e$1X.floatToByte(l.red),y=e$1X.floatToByte(l.green),v=e$1X.floatToByte(l.blue);var b=x*ne$A+y*z$N+v,T=e$1X.floatToByte(s.alpha)*ne$A+e$1X.floatToByte(l.alpha)*z$N;T+=2*u+c,e._instanced?a(o=r._index,$,b,T,g):(a((o=4*r._index)+0,$,b,T,g),a(o+1,$,b,T,g),a(o+2,$,b,T,g),a(o+3,$,b,T,g))}function ke$d(e,t,i,n,r){var o,a=n[m$S.eyeOffset],s=r.eyeOffset,l=s.z;if(r._heightReference!==k$R.NONE&&(l*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(s.x),Math.abs(s.y),Math.abs(l)),e._instanced){var u=0,c=0,h=r._imageIndex;if(-1!==h){var d=i[h];if(!e$2e(d))throw new t$15("Invalid billboard image index: "+h);u=d.width,c=d.height}b$$.x=u,b$$.y=c;var f=t$$.compressTextureCoordinates(b$$);a(o=r._index,s.x,s.y,l,f)}else a((o=4*r._index)+0,s.x,s.y,l,0),a(o+1,s.x,s.y,l,0),a(o+2,s.x,s.y,l,0),a(o+3,s.x,s.y,l,0)}function Dt$8(e,t,i,n,r){var o,a=n[m$S.scaleByDistance],s=0,l=1,u=1,c=1,h=r.scaleByDistance;e$2e(h)&&(s=h.near,l=h.nearValue,u=h.far,c=h.farValue,(1!==l||1!==c)&&(e._shaderScaleByDistance=!0)),e._instanced?a(o=r._index,s,l,u,c):(a((o=4*r._index)+0,s,l,u,c),a(o+1,s,l,u,c),a(o+2,s,l,u,c),a(o+3,s,l,u,c))}function At$6(e,t,i,n,r){var o,a=n[m$S.pixelOffsetScaleByDistance],s=0,l=1,u=1,c=1,h=r.pixelOffsetScaleByDistance;e$2e(h)&&(s=h.near,l=h.nearValue,u=h.far,c=h.farValue,(1!==l||1!==c)&&(e._shaderPixelOffsetScaleByDistance=!0)),e._instanced?a(o=r._index,s,l,u,c):(a((o=4*r._index)+0,s,l,u,c),a(o+1,s,l,u,c),a(o+2,s,l,u,c),a(o+3,s,l,u,c))}function Et$8(e,t,i,n,r){var o,a=n[m$S.compressedAttribute3],s=0,l=Number.MAX_VALUE,u=r.distanceDisplayCondition;e$2e(u)&&(s=u.near,l=u.far,s*=s,l*=l,e._shaderDistanceDisplayCondition=!0);var c,h,d=r.disableDepthTestDistance,f=r.heightReference===k$R.CLAMP_TO_GROUND&&e._scene.context.depthTexture;if(e$2e(d)||(d=f?5e3:0),d*=d,(f||d>0)&&(e._shaderDisableDepthDistance=!0,d===Number.POSITIVE_INFINITY&&(d=-1)),e$2e(r._labelDimensions))h=r._labelDimensions.x,c=r._labelDimensions.y;else{var p=0,_=0,m=r._imageIndex;if(-1!==m){var g=i[m];if(!e$2e(g))throw new t$15("Invalid billboard image index: "+m);p=g.height,_=g.width}c=Math.round(u$Z(r.height,e._textureAtlas.texture.dimensions.y*p));var x=e._textureAtlas.texture.width;h=Math.round(u$Z(r.width,x*_))}var y=Math.floor(e$2d.clamp(h,0,ze$d)),v=Math.floor(e$2d.clamp(c,0,ze$d)),$=y*ze$d+v;e._instanced?a(o=r._index,s,l,d,$):(a((o=4*r._index)+0,s,l,d,$),a(o+1,s,l,d,$),a(o+2,s,l,d,$),a(o+3,s,l,d,$))}function St$5(e,t,i,n,r){r.heightReference===k$R.CLAMP_TO_GROUND&&(e._shaderClampToGround=e._scene.context.depthTexture);var o,a=n[m$S.textureCoordinateBoundsOrLabelTranslate];if(e$1W.maximumVertexTextureImageUnits>0){var s=0,l=0;return e$2e(r._labelTranslate)&&(s=r._labelTranslate.x,l=r._labelTranslate.y),void(e._instanced?(o=r._index,a(o,s,l,0,0)):(o=4*r._index,a(o+0,s,l,0,0),a(o+1,s,l,0,0),a(o+2,s,l,0,0),a(o+3,s,l,0,0)))}var u=0,c=0,h=0,d=0,f=r._imageIndex;if(-1!==f){var p=i[f];if(!e$2e(p))throw new t$15("Invalid billboard image index: "+f);u=p.x,c=p.y,h=p.width,d=p.height}var _=u+h,m=c+d;e._instanced?a(o=r._index,u,c,_,m):(a((o=4*r._index)+0,u,c,_,m),a(o+1,u,c,_,m),a(o+2,u,c,_,m),a(o+3,u,c,_,m))}function ei$4(e,t,i,n,r){if(e$2e(e._batchTable)){var o,a=n[m$S.a_batchId],s=r._batchIndex;e._instanced?a(o=r._index,s):(a((o=4*r._index)+0,s),a(o+1,s),a(o+2,s),a(o+3,s))}}function yt$7(e,t,i,n,r){if(e._sdf){var o,a=n[m$S.sdf],s=r.outlineColor,l=r.outlineWidth,u=e$1X.floatToByte(s.red),c=e$1X.floatToByte(s.green),h=e$1X.floatToByte(s.blue),d=u*ne$A+c*z$N+h,f=l/V$L.RADIUS,p=e$1X.floatToByte(s.alpha)*ne$A+e$1X.floatToByte(f)*z$N;e._instanced?a(o=r._index,d,p):(o=4*r._index,t.webgpu?(a(o+0,d,p),a(o+1,d,p),a(o+2,d,p),a(o+3,d,p)):(a(o+0,d+ct$9,p),a(o+1,d+lt$4,p),a(o+2,d+mt$5,p),a(o+3,d+Tt$9,p)))}}function It$a(e,t,i,n,r){if(e._isMVT){var o,a=n[m$S.a_fade_opacity],s=r.opacityState,l=s.placed?1:0,u=s.opacity;e._instanced?a(o=r._index,l,u):(a((o=4*r._index)+0,l,u),a(o+1,l,u),a(o+2,l,u),a(o+3,l,u))}}function ti$5(e,t,i,n,r){ut$a(e,t,i,n,r),vt$9(e,t,i,n,r),xt$7(e,t,i,n,r),Ye$e(e,t,i,n,r),ke$d(e,t,i,n,r),Dt$8(e,t,i,n,r),At$6(e,t,i,n,r),Et$8(e,t,i,n,r),St$5(e,t,i,n,r),ei$4(e,t,i,n,r),yt$7(e,t,i,n,r),It$a(e,t,i,n,r)}function Ke$b(e,t,i,n,r,o){var a;n.mode===C$14.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=n$J._computeActualPosition(u,c,n,r);e$2e(h)&&(u._setActualPosition(h),o?s.push(h):i$1d.expand(a,h,a))}o&&i$1d.fromPoints(s,a)}function ii$4(e,t){var i=t.mode,n=e._billboards,r=e._billboardsToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==C$14.SCENE3D&&!p$1d.equals(o,e.modelMatrix)?(e._mode=i,p$1d.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===C$14.SCENE3D||i===C$14.SCENE2D||i===C$14.COLUMBUS_VIEW)&&Ke$b(e,n,n.length,t,o,!0)):i===C$14.MORPHING?Ke$b(e,n,n.length,t,o,!0):(i===C$14.SCENE2D||i===C$14.COLUMBUS_VIEW)&&Ke$b(e,r,e._billboardsToUpdateIndex,t,o,!1)}function si$5(e,t,i){var n=1;(!e._allSizedInMeters||0!==e._maxPixelOffset)&&(n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight));var r=n*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(r*=.5);var o=n*e._maxPixelOffset+e._maxEyeOffset;i.radius+=r+o}function ri$4(e,t){var i=t.createViewportQuadCommand("uniform sampler2D billboard_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n gl_FragColor = texture2D(billboard_texture, v_textureCoordinates); \n} \n",{uniformMap:{billboard_texture:function(){return e._textureAtlas.texture}}});return i.pass=Le$q.OVERLAY,i}w$O.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},w$O.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport};var ai$5=[],Y$F=new e$2c;w$O.prototype.update=function(e,t,i){if(!e.passes.offscreen&&!e.camera.bReflect){if(this._lineCallout.update(t,e,i),e.multiViewportIndex>-1&&this._billboards.length>0){if(e$2e(this._billboards[0])&&e$2e(this._billboards[0]._id)&&e$2e(this._billboards[0]._id.entityCollection)){var n=this._billboards[0]._id.entityCollection.owner;if(typeof n.getVisibleInViewport<"u")if(!n.getVisibleInViewport(e.multiViewportIndex))return}if(!this.getVisibleInViewport(e.multiViewportIndex))return}Xe$b(this);var r=this._billboards,o=r.length;t=e.context;this._instanced=t.instancedArrays,m$S=this._instanced?zt$5:Wt$8,Ge$e=this._instanced?Kt$6:kt$6;var a=this._textureAtlas;if(!e$2e(a)){a=this._textureAtlas=new v$I({context:t});for(var s=0;s<o;++s)r[s]._loadImage()}var l=a.textureCoordinates;if(0!==l.length){ii$4(this,e),o=(r=this._billboards).length;var u=this._billboardsToUpdate,c=this._billboardsToUpdateIndex,h=this._propertiesChanged,d=a.guid,f=this._createVertexArray||this._textureAtlasGUID!==d;this._textureAtlasGUID=d;var p,_=e.passes,m=_.pick;if(f||!m&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var g=0;g<Ae$p;++g)h[g]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),o>0){this._vaf=qt$7(t,o,this._buffersUsage,this._instanced,this._batchTable,this._sdf,this._isMVT),p=this._vaf.writers;for(var x=0;x<o;++x){var y=this._billboards[x];y._dirty=!1,ti$5(this,t,l,p,y)}this._vaf.commit(Ge$e(t))}this._billboardsToUpdateIndex=0}else if(c>0){var v=ai$5;v.length=0,(h[re$C]||h[nt$a]||h[at$c])&&v.push(ut$a),(h[ae$t]||h[Le$n]||h[st$7]||h[rt$g]||h[it$a])&&(v.push(vt$9),this._instanced&&v.push(ke$d)),(h[ae$t]||h[ht$8]||h[Me$n])&&(v.push(xt$7),v.push(Ye$e)),(h[ae$t]||h[be$r])&&v.push(Ye$e),h[Ve$f]&&v.push(ke$d),h[Fe$j]&&v.push(Dt$8),h[Ue$g]&&v.push(At$6),(h[He$d]||h[Gt$5]||h[ae$t]||h[re$C])&&v.push(Et$8),(h[ae$t]||h[re$C])&&v.push(St$5),h[_t$7]&&v.push(yt$7),h[dt$9]&&v.push(It$a);var $=v.length;if(p=this._vaf.writers,c/o>.1){for(var b=0;b<c;++b){var T=u[b];T._dirty=!1;for(var C=0;C<$;++C)v[C](this,t,l,p,T)}this._vaf.commit(Ge$e(t))}else{for(var S=0;S<c;++S){var w=u[S];w._dirty=!1;for(var E=0;E<$;++E)v[E](this,t,l,p,w);this._instanced?this._vaf.subCommit(w._index,1):this._vaf.subCommit(4*w._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(c>1.5*o&&(u.length=o),e$2e(this._vaf)&&e$2e(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,i$1d.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var P,A=p$1d.IDENTITY;e.mode===C$14.SCENE3D?(A=this.modelMatrix,P=i$1d.clone(this._baseVolumeWC,this._boundingVolume)):P=i$1d.clone(this._baseVolume2D,this._boundingVolume),si$5(this,e,P);var L=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,L){this._blendOption===S$L.OPAQUE||this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=d$1m.fromCache({depthTest:{enabled:this._depthTestEnable,func:de$y.LESS},depthMask:!0}):this._rsOpaque=void 0;var M=this._blendOption===S$L.TRANSLUCENT;this._blendOption===S$L.TRANSLUCENT||this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=d$1m.fromCache({depthTest:{enabled:this._depthTestEnable,func:M?de$y.LEQUAL:de$y.LESS},depthMask:M,blending:Ee$r.ALPHA_BLEND}):this._rsTranslucent=void 0}this._isParticleSystem&&(this._rsParticleSystem=d$1m.fromCache({depthTest:{enabled:!1,func:de$y.LESS},depthMask:!1,blending:Yt$5})),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance;var R,O,D,I,F,B=e$1W.maximumVertexTextureImageUnits>0;if(L||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF||this._swipeEnabled!==this._compiledSwipeEnabled||!e$2c.equals(this._swipeRegion,this._compiledSwipeRegion)){R=Vt$7,O=Lt$6,F=[],e$2e(this._batchTable)&&(F.push("VECTOR_TILE"),R=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(R),O=this._batchTable.getFragmentShaderCallback(!1,void 0)(O)),D=new s$V({defines:F,sources:[R],name:"BillboardCollectionVS"}),this._instanced&&D.defines.push("INSTANCED"),this._shaderRotation&&D.defines.push("ROTATION"),this._shaderAlignedAxis&&D.defines.push("ALIGNED_AXIS"),this._billboardMode===yr$2.FixedXYZ&&D.defines.push("FixedXYZ"),this._shaderScaleByDistance&&D.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&D.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&D.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&D.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&D.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(B?D.defines.push("VERTEX_DEPTH_CHECK"):D.defines.push("FRAGMENT_DEPTH_CHECK")),this._ignoreShow&&D.defines.push("IGNORE_SHOW"),this._isMVT&&D.defines.push("MVT");var N=1-V$L.CUTOFF;this._sdf&&D.defines.push("SDF");var G=e$2e(this._batchTable)?"VECTOR_TILE":"";if(this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT&&(I=new s$V({defines:["OPAQUE",G],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(B?I.defines.push("VERTEX_DEPTH_CHECK"):I.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(I.defines.push("SDF"),I.defines.push("SDF_EDGE "+N)),this._isMVT&&I.defines.push("MVT"),this._swipeEnabled&&I.defines.push("APPLY_SWIPE"),this._sp=r$14.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:D,fragmentShaderSource:I,attributeLocations:m$S}),I=new s$V({defines:["TRANSLUCENT",G],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(B?I.defines.push("VERTEX_DEPTH_CHECK"):I.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(I.defines.push("SDF"),I.defines.push("SDF_EDGE "+N)),this._isMVT&&I.defines.push("MVT"),this._swipeEnabled&&I.defines.push("APPLY_SWIPE"),this._spTranslucent=r$14.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:D,fragmentShaderSource:I,attributeLocations:m$S})),this._blendOption===S$L.OPAQUE&&(I=new s$V({defines:[G],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(B?I.defines.push("VERTEX_DEPTH_CHECK"):I.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(I.defines.push("SDF"),I.defines.push("SDF_EDGE "+N)),this._isMVT&&I.defines.push("MVT"),this._swipeEnabled&&I.defines.push("APPLY_SWIPE"),this._sp=r$14.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:D,fragmentShaderSource:I,attributeLocations:m$S})),this._blendOption===S$L.TRANSLUCENT&&(I=new s$V({defines:[G],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(B?I.defines.push("VERTEX_DEPTH_CHECK"):I.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(I.defines.push("SDF"),I.defines.push("SDF_EDGE "+N)),this._isMVT&&I.defines.push("MVT"),this._swipeEnabled&&I.defines.push("APPLY_SWIPE"),this._spTranslucent=r$14.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:D,fragmentShaderSource:I,attributeLocations:m$S})),this._swipeEnabled&&!e$2e(this._uniforms.uSwipeRegion)){var z=this;this._uniforms.uSwipeRegion=function(){var t=z._swipeRegion;return e$2c.fromElements(t.x,t.y,t.x+t.width,t.y+t.height,Y$F),Y$F.x=Y$F.x*e.context.drawingBufferWidth,Y$F.y=(1-Y$F.y)*e.context.drawingBufferHeight,Y$F.z=Y$F.z*e.context.drawingBufferWidth,Y$F.w=(1-Y$F.w)*e.context.drawingBufferHeight,Y$F}}this._isParticleSystem&&(I=new s$V({defines:[G],sources:[O],name:"BillboardCollectionFS"}),this._spParticleSystem=r$14.replaceCache({context:t,shaderProgram:this._spParticleSystem,vertexShaderSource:D,fragmentShaderSource:I,attributeLocations:m$S})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf,this._compiledSwipeEnabled=this._swipeEnabled,f$1a.clone(this._swipeRegion,this._compiledSwipeRegion)}i=e.commandList;var U=!0;if(e._fboState.frameBufferType===Qe$c.NORMAL_AND_DEPTH&&(U=!1),U&&(_.render||_.pick)){var V,k=this._colorCommands,W=this._blendOption===S$L.OPAQUE,H=this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT,q=this._vaf.va,j=q.length,X=this._uniforms;e$2e(this._batchTable)?(X=this._batchTable.getUniformMapCallback()(X),V=this._batchTable.getPickId()):V="v_pickColor",k.length=j;for(var Y=H?2*j:j,Z=0;Z<Y;++Z){var K=k[Z];e$2e(K)||(K=k[Z]=new i$$);var Q=W||H&&Z%2==0;K.owner=this;var J=H?Math.floor(Z/2):Z;K.boundingVolume=P,K.modelMatrix=A,K.count=q[J].indicesCount,K.uniformMap=X,K.vertexArray=q[J].va,this._isParticleSystem?(K.pass=Le$q.Particle,K.renderState=this._rsParticleSystem,K.shaderProgram=this._spParticleSystem,K.pickId=void 0):(K.pass=Q||!H?Le$q.Label_Billboard:Le$q.TRANSLUCENT,K.renderState=Q?this._rsOpaque:this._rsTranslucent,K.shaderProgram=Q?this._sp:this._spTranslucent,K.pickId=V),K.debugShowBoundingVolume=this.debugShowBoundingVolume,this._instanced&&(K.count=6,K.instanceCount=o),i.push(K)}this.debugShowTextureAtlas&&(e$2e(this.debugCommand)||(this.debugCommand=ri$4(this,e.context)),i.push(this.debugCommand))}}}}},w$O.prototype.isDestroyed=function(){return!1},w$O.prototype.destroy=function(){return e$2e(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),ft$8(this._billboards),i$11(this)},w$O.prototype.setBillboardImage=function(e){for(var t=this._billboards.length,i=0;i<t;++i){var n=this._billboards[i];n.isDestroyed()||n.setBillboardStyle(e)}};var u$J=function(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},F$T=function(e,t,i,n){var r=e.measureText(t),o=u$J(e.canvas,"font-family"),a=u$J(e.canvas,"font-size").replace("px",""),s=u$J(e.canvas,"font-style"),l=u$J(e.canvas,"font-weight"),u=!/\S/.test(t);r.fontsize=a;var c=document.createElement("div");c.style.position="absolute",c.style.opacity=0,c.style.font=s+" "+l+" "+a+"px "+o,c.innerHTML=t+"<br/>"+t,document.body.appendChild(c),r.leading=1.2*a;var h=u$J(c,"height");if((h=h.replace("px",""))>=2*a&&(r.leading=h/2|0),document.body.removeChild(c),u)r.ascent=0,r.descent=0,r.bounds={minx:0,maxx:r.width,miny:0,maxy:0},r.height=0;else{var d=document.createElement("canvas"),f=100;d.width=r.width+f,d.height=3*a,d.style.opacity=1,d.style.fontFamily=o,d.style.fontSize=a,d.style.fontStyle=s,d.style.fontWeight=l;var p=d.getContext("2d");p.font=s+" "+l+" "+a+"px "+o;var _=d.width,m=d.height,g=m/2;p.fillStyle="white",p.fillRect(-1,-1,_+2,m+2),i&&(p.strokeStyle="black",p.lineWidth=e.lineWidth,p.strokeText(t,50,g)),n&&(p.fillStyle="black",p.fillText(t,50,g));for(var x=p.getImageData(0,0,_,m).data,y=0,v=4*_,$=x.length;++y<$&&255===x[y];);var b=y/v|0;for(y=$-1;--y>0&&255===x[y];);var T=y/v|0;for(y=0;y<$&&255===x[y];)(y+=v)>=$&&(y=y-$+4);var C=y%v/4|0,S=1;for(y=$-3;y>=0&&255===x[y];)(y-=v)<0&&(y=$-3-4*S++);var w=y%v/4+1|0;r.ascent=g-b,r.descent=T-g,r.bounds={minx:C-50,maxx:w-50,miny:0,maxy:T-b},r.height=T-b+1}return r},o$R;function x$W(e,t){if(!e$2e(e))throw new t$15("text is required.");if(""!==e){t=u$Z(t,u$Z.EMPTY_OBJECT);var i=u$Z(t.font,"10px sans-serif"),n=u$Z(t.stroke,!1),r=u$Z(t.fill,!0),o=u$Z(t.strokeWidth,1),a=u$Z(t.backgroundColor,e$1X.TRANSPARENT),s=u$Z(t.padding,0),l=2*s,u=document.createElement("canvas");u.width=1,u.height=1,u.style.font=i;var c=u.getContext("2d",{willReadFrequently:!0});e$2e(o$R)||(e$2e(c.imageSmoothingEnabled)?o$R="imageSmoothingEnabled":e$2e(c.mozImageSmoothingEnabled)?o$R="mozImageSmoothingEnabled":e$2e(c.webkitImageSmoothingEnabled)?o$R="webkitImageSmoothingEnabled":e$2e(c.msImageSmoothingEnabled)&&(o$R="msImageSmoothingEnabled")),c.font=i,c.lineJoin="round",c.lineWidth=o,c[o$R]=!1,c.textBaseline=u$Z(t.textBaseline,"bottom"),u.style.visibility="hidden",document.body.appendChild(u);var h=F$T(c,e,n,r);u.dimensions=h,document.body.removeChild(u),u.style.visibility="";var d=-h.bounds.minx,f=Math.ceil(h.width)+d+l,p=h.height+l,_=p-(p-h.ascent+s)+l;if(u.width=f,u.height=p,c.font=i,c.lineJoin="round",c.lineWidth=o,c[o$R]=!1,a!==e$1X.TRANSPARENT&&(c.fillStyle=a.toCssColorString(),c.fillRect(0,0,u.width,u.height)),n){var m=u$Z(t.strokeColor,e$1X.BLACK);c.strokeStyle=m.toCssColorString(),c.strokeText(e,d+s,_)}if(r){var g=u$Z(t.fillColor,e$1X.WHITE);c.fillStyle=g.toCssColorString(),c.fillText(e,d+s,_)}return u}}var c$R=1e20;function R$O(e,t,i){return t<i?e<t?t:e>i?i:e:e<i?i:e>t?t:e}function b$_(e,t){t||(t={});var i,n,r,o,a,s,l,u,c,h,d,f=null==t.cutoff?.25:t.cutoff,p=null==t.radius?8:t.radius,_=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,n=t.height,o=e,s=t.stride?t.stride:Math.floor(e.length/i/n)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(l=(u=e).getContext("2d"),i=u.width,n=u.height,o=(c=l.getImageData(0,0,i,n)).data,s=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(l=e,i=(u=e.canvas).width,n=u.height,o=(c=l.getImageData(0,0,i,n)).data,s=4):window.ImageData&&e instanceof window.ImageData&&(c=e,i=e.width,n=e.height,o=c.data,s=4);if(r=Math.max(i,n),window.Uint8ClampedArray&&o instanceof window.Uint8ClampedArray||window.Uint8Array&&o instanceof window.Uint8Array)for(a=o,o=Array(i*n),h=0,d=a.length;h<d;h++)o[h]=a[h*s+_]/255;else if(1!==s)throw Error("Raw data can have only 1 value per pixel");var m=Array(i*n),g=Array(i*n),x=Array(r),y=Array(r),v=Array(r+1),$=Array(r);for(h=0,d=i*n;h<d;h++){var b=o[h];m[h]=1===b?0:0===b?c$R:Math.pow(Math.max(0,.5-b),2),g[h]=1===b?c$R:0===b?0:Math.pow(Math.max(0,b-.5),2)}U$O(m,i,n,x,y,$,v),U$O(g,i,n,x,y,$,v);var T=window.Float32Array?new Float32Array(i*n):new Array(i*n);for(h=0,d=i*n;h<d;h++)T[h]=R$O(1-((m[h]-g[h])/p+f),0,1);return T}function U$O(e,t,i,n,r,o,a){for(var s=0;s<t;s++){for(var l=0;l<i;l++)n[l]=e[l*t+s];for(s$I(n,r,o,a,i),l=0;l<i;l++)e[l*t+s]=r[l]}for(l=0;l<i;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(s$I(n,r,o,a,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(r[s])}}function s$I(e,t,i,n,r){i[0]=0,n[0]=-c$R,n[1]=+c$R;for(var o=1,a=0;o<r;o++){for(var s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);s<=n[a];)a--,s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);i[++a]=o,n[a]=s,n[a+1]=+c$R}for(o=0,a=0;o<r;o++){for(;n[a+1]<o;)a++;t[o]=(o-i[a])*(o-i[a])+e[i[a]]}}var g$X=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function w$N(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function q$W(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function x$V(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function I$10(e){var t=document.createElement("div");t.style.position="absolute",t.style.opacity=0,/bold/i.test(e._font)?(e._font=e._font.replace(/\sbold/i,""),t.style.font=e._font,t.style.fontWeight="bold"):t.style.font=e._font,document.body.appendChild(t),e._fontFamily=x$V(t,"font-family"),e._fontSize=(e$2e(t.style.fontSize)&&""!==t.style.fontSize&&/\d+px/.test(t.style.fontSize)?t.style.fontSize:x$V(t,"font-size")).replace("px",""),e._fontStyle=x$V(t,"font-style"),e._fontWeight=x$V(t,"font-weight"),document.body.removeChild(t)}function D$R(e,t){if(e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).s3MTilesLabelStyle)){var i=e.s3MTilesLabelStyle;e.font=i.font,e.fillColor=i.fillColor,e.outlineColor=i.outlineColor,e.outlineWidth=i.outlineWidth,e.showBackground=i.showBackground,e.backgroundColor=i.backgroundColor,e.backgroundPadding=i.backgroundPadding,e.style=i.fillStyle,e.verticalOrigin=i.verticalOrigin,e.horizontalOrigin=i.horizontalOrigin,e.pixelOffset=i.pixelOffset,e.eyeOffset=i.eyeOffset,e.scale=i.scale,e.translucencyByDistance=i.translucencyByDistance,e.pixelOffsetScaleByDistance=i.pixelOffsetScaleByDistance,e.scaleByDistance=i.scaleByDistance,e.heightReference=i.heightReference,e.distanceDisplayCondition=i.distanceDisplayCondition,e.disableDepthTestDistance=i.disableDepthTestDistance}if(e$2e(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$15("disableDepthTestDistance must be greater than 0.0.");var n=e.translucencyByDistance,r=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,a=e.distanceDisplayCondition;if(e$2e(n)){if(n.far<=n.near)throw new t$15("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=o$Y.clone(n)}if(e$2e(r)){if(r.far<=r.near)throw new t$15("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");r=o$Y.clone(r)}if(e$2e(o)){if(o.far<=o.near)throw new t$15("scaleByDistance.far must be greater than scaleByDistance.near.");o=o$Y.clone(o)}if(e$2e(a)){if(a.far<=a.near)throw new t$15("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");a=r$Z.clone(a)}this._renderedText=void 0,this._text=void 0,this._show=u$Z(e.show,!0),this._font=u$Z(e.font,"30px sans-serif"),this._fillColor=e$1X.clone(u$Z(e.fillColor,e$1X.WHITE)),this._oriFillColor=e$1X.clone(this._fillColor),this._outlineColor=e$1X.clone(u$Z(e.outlineColor,e$1X.BLACK)),this._outlineWidth=u$Z(e.outlineWidth,1),this._showBackground=u$Z(e.showBackground,!1),this._backgroundColor=u$Z(e.backgroundColor,new e$1X(.165,.165,.165,.8)),this._backgroundPadding=u$Z(e.backgroundPadding,new o$1o(7,5)),this._backgroundImage=u$Z(e.backgroundImage,null),this._style=u$Z(e.style,R$S.FILL),this._verticalOrigin=u$Z(e.verticalOrigin,S$Q.BASELINE),this._horizontalOrigin=u$Z(e.horizontalOrigin,j$V.CENTER),this._pixelOffset=o$1o.clone(u$Z(e.pixelOffset,o$1o.ZERO)),this._eyeOffset=o$1p.clone(u$Z(e.eyeOffset,o$1p.ZERO)),this._position=o$1p.clone(u$Z(e.position,o$1p.ZERO)),this._scale=u$Z(e.scale,1),this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=r,this._scaleByDistance=o,this._heightReference=u$Z(e.heightReference,k$R.NONE),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=u$Z(e.text,""),this._relativeSize=1,this._index=u$Z(e.index,0),this._isPicked=!1,this._screenSpacePosition=new o$1o,this._localScreenSpaceBBox=new f$1a,this._mvtLayerID=e.mvtLayerID,this._mapName=e.mapName,this._mvtProperties=e.mvtProperties,I$10(this),this._updateClamping(),this._opacityState={opacity:0,placed:!1}}function j$R(e,t){for(var i=/[a-zA-Z0-9]/,n=/[()[\]{}<>]/,r=[],o="",a=g$X.LTR,s="",l=e.length,u=0;u<l;++u){var c=e.charAt(u);s=t.test(c)?g$X.RTL:i.test(c)?g$X.LTR:n.test(c)?g$X.BRACKETS:g$X.WEAK,0===u&&(a=s),a===s&&s!==g$X.BRACKETS?o+=c:(""!==o&&r.push({Type:a,Word:o}),a=s,o=c)}return r.push({Type:s,Word:o}),r}function J$L(e){return e.split("").reverse().join("")}function A$X(e,t,i){return e.slice(0,t)+i+e.slice(t)}function Q$P(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}Object.defineProperties(D$R.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(this._show!==e){this._show=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i].billboard;e$2e(r)&&(r.show=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.show=e)}}},position:{get:function(){return this._position},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._position;if(!o$1p.equals(t,e)){o$1p.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n].billboard;e$2e(o)&&(o.position=e)}var a=this._backgroundBillboard;e$2e(a)&&(a.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(e!==this._heightReference){this._heightReference=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i].billboard;e$2e(r)&&(r.heightReference=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.heightReference=e),q$W(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._text!==e&&(this._text=e,this._renderedText=D$R.enableRightToLeftDetection?X$N(e):e,w$N(this))}},font:{get:function(){return this._font},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._font!==e&&(this._font=e,w$N(this),I$10(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._fillColor;e$1X.equals(t,e)||(this._oriFillColor=e$1X.clone(t),e$1X.clone(e,t),w$N(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._outlineColor;e$1X.equals(t,e)||(e$1X.clone(e,t),w$N(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,w$N(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._showBackground!==e&&(this._showBackground=e,w$N(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._backgroundColor;if(!e$1X.equals(t,e)){e$1X.clone(e,t);var i=this._backgroundBillboard;e$2e(i)&&(i.color=t)}}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._backgroundPadding;o$1o.equals(t,e)||(o$1o.clone(e,t),q$W(this))}},style:{get:function(){return this._style},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._style!==e&&(this._style=e,w$N(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._pixelOffset;if(!o$1o.equals(t,e)){o$1o.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2e(o.billboard)&&(o.billboard.pixelOffset=e)}var a=this._backgroundBillboard;e$2e(a)&&(a.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._translucencyByDistance;if(!o$Y.equals(t,e)){this._translucencyByDistance=o$Y.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2e(o.billboard)&&(o.billboard.translucencyByDistance=e)}var a=this._backgroundBillboard;e$2e(a)&&(a.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._pixelOffsetScaleByDistance;if(!o$Y.equals(t,e)){this._pixelOffsetScaleByDistance=o$Y.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2e(o.billboard)&&(o.billboard.pixelOffsetScaleByDistance=e)}var a=this._backgroundBillboard;e$2e(a)&&(a.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._scaleByDistance;if(!o$Y.equals(t,e)){this._scaleByDistance=o$Y.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2e(o.billboard)&&(o.billboard.scaleByDistance=e)}var a=this._backgroundBillboard;e$2e(a)&&(a.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._eyeOffset;if(!o$1p.equals(t,e)){o$1p.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2e(o.billboard)&&(o.billboard.eyeOffset=e)}var a=this._backgroundBillboard;e$2e(a)&&(a.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._horizontalOrigin!==e&&(this._horizontalOrigin=e,q$W(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(this._verticalOrigin!==e){this._verticalOrigin=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.verticalOrigin=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.verticalOrigin=e),q$W(this)}}},scale:{get:function(){return this._scale},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(this._scale!==e){this._scale=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.scale=e*this._relativeSize)}var o=this._backgroundBillboard;e$2e(o)&&(o.scale=e*this._relativeSize),q$W(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far must be greater than near");if(!r$Z.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=r$Z.clone(e,this._distanceDisplayCondition);for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.distanceDisplayCondition=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(e$2e(e)&&e<0)throw new t$15("disableDepthTestDistance must be greater than 0.0.");this._disableDepthTestDistance=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.disableDepthTestDistance=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.id=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.id=e)}}},pickId:{get:function(){if(0!==this._glyphs.length&&e$2e(this._glyphs[0].billboard))return this._glyphs[0].billboard.pickId}},isPicked:{get:function(){return this._isPicked},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._isPicked=e}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=o$1p.clone(e,this._actualClampedPosition),e$2e(e)&&this._mode===C$14.COLUMBUS_VIEW&&(e=m$19.convertToColumbusCartesian(e));for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard._clampedPosition=e)}var o=this._backgroundBillboard;e$2e(o)&&(o._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.clusterShow=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.clusterShow=e)}}},opacityState:{get:function(){return this._opacityState},set:function(e){if(this._opacityState.opacity!==e.opacity||this._opacityState.placed!==e.placed){this._opacityState=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.opacityState=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.opacityState=e)}}}}),D$R.prototype._updateClamping=function(){n$J._updateClamping(this._labelCollection,this)},D$R.prototype.computeScreenSpacePosition=function(e,t){if(!e$2e(e))throw new t$15("scene is required.");e$2e(t)||(t=this._screenSpacePosition);var i=this._labelCollection.modelMatrix,n=e$2e(this._actualClampedPosition)?this._actualClampedPosition:this._position;return n$J._computeScreenSpacePosition(i,n,this._eyeOffset,this._pixelOffset,e,t)},D$R.prototype.computeLocalScreenSpaceBoundingBox=function(e,t){var i=0,n=0,r=0,o=0,a=e.totalScale,s=e._backgroundBillboard;if(e$2e(s))i=s._translate.x,n=-s._translate.y,r=s.width*a,o=s.height*a,e.verticalOrigin===S$Q.BOTTOM||e.verticalOrigin===S$Q.BASELINE?n-=o:e.verticalOrigin===S$Q.CENTER&&(n-=.5*o);else{i=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(var l=0,u=0,c=e._glyphs,h=c.length,d=0;d<h;++d){var f=c[d],p=f.billboard;if(e$2e(p)){var _=p._translate.x,m=-p._translate.y,g=f.dimensions.width*a,x=f.dimensions.height*a;e.verticalOrigin===S$Q.BOTTOM||e.verticalOrigin===S$Q.BASELINE?m-=x:e.verticalOrigin===S$Q.CENTER&&(m-=.5*x),e._verticalOrigin===S$Q.TOP?m+=V$L.PADDING*a:(e._verticalOrigin===S$Q.BOTTOM||e._verticalOrigin===S$Q.BASELINE)&&(m-=V$L.PADDING*a),i=Math.min(i,_),n=Math.min(n,m),l=Math.max(l,_+g),u=Math.max(u,m+x)}}r=l-i,o=u-n}return e$2e(t)||(t=new f$1a),t.x=i,t.y=n,t.width=r,t.height=o,e._text.indexOf("\n")>-1&&(t.height*=e._text.split("\n").length),t},D$R.prototype.getScreenSpaceBoundingBox=function(e,t,i){return e$2e(i)||(i=new f$1a),this.computeLocalScreenSpaceBoundingBox(e,i),i.x+=t.x,i.y+=t.y,i},D$R.getScreenSpaceBoundingBox=function(e,t,i){var n=0,r=0,o=0,a=0,s=e.totalScale,l=e._backgroundBillboard;if(e$2e(l))n=t.x+l._translate.x,r=t.y-l._translate.y,o=l.width*s,a=l.height*s,e.verticalOrigin===S$Q.BOTTOM||e.verticalOrigin===S$Q.BASELINE?r-=a:e.verticalOrigin===S$Q.CENTER&&(r-=.5*a);else{n=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(var u=0,c=0,h=e._glyphs,d=h.length,f=0;f<d;++f){var p=h[f],_=p.billboard;if(e$2e(_)){var m=t.x+_._translate.x,g=t.y-_._translate.y,x=p.dimensions.width*s,y=p.dimensions.height*s;e.verticalOrigin===S$Q.BOTTOM||e.verticalOrigin===S$Q.BASELINE?g-=y:e.verticalOrigin===S$Q.CENTER&&(g-=.5*y),e._verticalOrigin===S$Q.TOP?g+=V$L.PADDING*s:(e._verticalOrigin===S$Q.BOTTOM||e._verticalOrigin===S$Q.BASELINE)&&(g-=V$L.PADDING*s),n=Math.min(n,m),r=Math.min(r,g),u=Math.max(u,m+x),c=Math.max(c,g+y)}}o=u-n,a=c-r}return e$2e(i)||(i=new f$1a),i.x=n,i.y=r,i.width=o,i.height=a,i},D$R.prototype.equals=function(e){return this===e||e$2e(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&o$1p.equals(this._position,e._position)&&e$1X.equals(this._fillColor,e._fillColor)&&e$1X.equals(this._outlineColor,e._outlineColor)&&e$1X.equals(this._backgroundColor,e._backgroundColor)&&o$1o.equals(this._backgroundPadding,e._backgroundPadding)&&o$1o.equals(this._pixelOffset,e._pixelOffset)&&o$1p.equals(this._eyeOffset,e._eyeOffset)&&o$Y.equals(this._translucencyByDistance,e._translucencyByDistance)&&o$Y.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&o$Y.equals(this._scaleByDistance,e._scaleByDistance)&&r$Z.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id},D$R.prototype.isDestroyed=function(){return!1},D$R.prototype.restFillColor=function(){var e=e$1X.clone(this._fillColor),t=this._oriFillColor;e$1X.equals(e,t)||(this._fillColor=e$1X.clone(t),w$N(this))},D$R.prototype.setLabelStyle=function(e){!e$2e(e)||(this._font=u$Z(e.font,this._font),this._fillColor=e$1X.clone(u$Z(e.fillColor,this._fillColor)),this._oriFillColor=e$1X.clone(this._fillColor),this._outlineColor=e$1X.clone(u$Z(e.outlineColor,this._outlineColor)),this._outlineWidth=u$Z(e.outlineWidth,this._outlineWidth),this._showBackground=u$Z(e.showBackground,this._showBackground),this._backgroundColor=e$1X.clone(u$Z(e.backgroundColor,this._backgroundColor)),this._backgroundPadding=u$Z(e.backgroundPadding,this._backgroundPadding),this._style=u$Z(e.fillStyle,this._style),this._verticalOrigin=u$Z(e.verticalOrigin,this._verticalOrigin),this._horizontalOrigin=u$Z(e.horizontalOrigin,this._horizontalOrigin),this._pixelOffset=o$1o.clone(u$Z(e.pixelOffset,this._pixelOffset)),this._eyeOffset=o$1p.clone(u$Z(e.eyeOffset,this._eyeOffset)),this._scale=u$Z(e.scale,this._scale),this._translucencyByDistance=o$Y.clone(u$Z(e.translucencyByDistance,this._translucencyByDistance)),this._pixelOffsetScaleByDistance=o$Y.clone(u$Z(e.pixelOffsetScaleByDistance,this._pixelOffsetScaleByDistance)),this._scaleByDistance=o$Y.clone(u$Z(e.scaleByDistance,this._scaleByDistance)),this._heightReference=u$Z(e.heightReference,this._heightReference),this._distanceDisplayCondition=r$Z.clone(u$Z(e.distanceDisplayCondition,this._distanceDisplayCondition)),this._disableDepthTestDistance=u$Z(e.disableDepthTestDistance,this._disableDepthTestDistance),I$10(this),w$N(this))},D$R.enableRightToLeftDetection=!1;var $$N="א-ת",H$U="؀-ۿݐ-ݿࢠ-ࣿ",L$Y=new RegExp("["+$$N+H$U+"]");function X$N(e){for(var t=e.split("\n"),i="",n=0;n<t.length;n++){for(var r=t[n],o=L$Y.test(r.charAt(0)),a=j$R(r,L$Y),s=0,l="",u=0;u<a.length;++u){var c=a[u],h=c.Type===g$X.BRACKETS?Q$P(c.Word):J$L(c.Word);o?c.Type===g$X.RTL?(l=h+l,s=0):c.Type===g$X.LTR?(l=A$X(l,s,c.Word),s+=c.Word.length):(c.Type===g$X.WEAK||c.Type===g$X.BRACKETS)&&(c.Type===g$X.WEAK&&a[u-1].Type===g$X.BRACKETS?l=h+l:a[u-1].Type===g$X.RTL?(l=h+l,s=0):a.length>u+1?a[u+1].Type===g$X.RTL?(l=h+l,s=0):(l=A$X(l,s,c.Word),s+=c.Word.length):l=A$X(l,0,h)):c.Type===g$X.RTL?l=A$X(l,s,h):c.Type===g$X.LTR?s=(l+=c.Word).length:(c.Type===g$X.WEAK||c.Type===g$X.BRACKETS)&&(u>0&&a[u-1].Type===g$X.RTL?a.length>u+1?a[u+1].Type===g$X.RTL?l=A$X(l,s,h):s=(l+=c.Word).length:l+=c.Word:s=(l+=c.Word).length)}i+=l,n<t.length-1&&(i+="\n")}return i}function T$O(){var e=3,t=4,i=12,n=13,r=16,o=17;function a(e,t){return 55296<=e.charCodeAt(t)&&e.charCodeAt(t)<=56319&&56320<=e.charCodeAt(t+1)&&e.charCodeAt(t+1)<=57343}function s(e,t){void 0===t&&(t=0);var i=e.charCodeAt(t);if(55296<=i&&i<=56319&&t<e.length-1){var n=i;return 56320<=(r=e.charCodeAt(t+1))&&r<=57343?1024*(n-55296)+(r-56320)+65536:n}if(56320<=i&&i<=57343&&t>=1){var r=i;return 55296<=(n=e.charCodeAt(t-1))&&n<=56319?1024*(n-55296)+(r-56320)+65536:r}return i}function l(a,s,l){var u=[a].concat(s).concat([l]),c=u[u.length-2],h=l,d=u.lastIndexOf(14);if(d>1&&u.slice(1,d).every((function(t){return t==e}))&&-1==[e,n,o].indexOf(a))return 2;var f=u.lastIndexOf(t);if(f>0&&u.slice(1,f).every((function(e){return e==t}))&&-1==[i,t].indexOf(c))return u.filter((function(e){return e==t})).length%2==1?3:4;if(0==c&&1==h)return 0;if(2==c||0==c||1==c)return 14==h&&s.every((function(t){return t==e}))?2:1;if(2==h||0==h||1==h)return 1;if(6==c&&(6==h||7==h||9==h||10==h))return 0;if(!(9!=c&&7!=c||7!=h&&8!=h))return 0;if((10==c||8==c)&&8==h)return 0;if(h==e||15==h)return 0;if(5==h)return 0;if(c==i)return 0;var p=-1!=u.indexOf(e)?u.lastIndexOf(e)-1:u.length-2;return-1!=[n,o].indexOf(u[p])&&u.slice(p+1,-1).every((function(t){return t==e}))&&14==h||15==c&&-1!=[r,o].indexOf(h)?0:-1!=s.indexOf(t)?2:c==t&&h==t?0:1}function u(a){return 1536<=a&&a<=1541||1757==a||1807==a||2274==a||3406==a||69821==a||70082<=a&&a<=70083||72250==a||72326<=a&&a<=72329||73030==a?i:13==a?0:10==a?1:0<=a&&a<=9||11<=a&&a<=12||14<=a&&a<=31||127<=a&&a<=159||173==a||1564==a||6158==a||8203==a||8206<=a&&a<=8207||8232==a||8233==a||8234<=a&&a<=8238||8288<=a&&a<=8292||8293==a||8294<=a&&a<=8303||55296<=a&&a<=57343||65279==a||65520<=a&&a<=65528||65529<=a&&a<=65531||113824<=a&&a<=113827||119155<=a&&a<=119162||917504==a||917505==a||917506<=a&&a<=917535||917632<=a&&a<=917759||918e3<=a&&a<=921599?2:768<=a&&a<=879||1155<=a&&a<=1159||1160<=a&&a<=1161||1425<=a&&a<=1469||1471==a||1473<=a&&a<=1474||1476<=a&&a<=1477||1479==a||1552<=a&&a<=1562||1611<=a&&a<=1631||1648==a||1750<=a&&a<=1756||1759<=a&&a<=1764||1767<=a&&a<=1768||1770<=a&&a<=1773||1809==a||1840<=a&&a<=1866||1958<=a&&a<=1968||2027<=a&&a<=2035||2070<=a&&a<=2073||2075<=a&&a<=2083||2085<=a&&a<=2087||2089<=a&&a<=2093||2137<=a&&a<=2139||2260<=a&&a<=2273||2275<=a&&a<=2306||2362==a||2364==a||2369<=a&&a<=2376||2381==a||2385<=a&&a<=2391||2402<=a&&a<=2403||2433==a||2492==a||2494==a||2497<=a&&a<=2500||2509==a||2519==a||2530<=a&&a<=2531||2561<=a&&a<=2562||2620==a||2625<=a&&a<=2626||2631<=a&&a<=2632||2635<=a&&a<=2637||2641==a||2672<=a&&a<=2673||2677==a||2689<=a&&a<=2690||2748==a||2753<=a&&a<=2757||2759<=a&&a<=2760||2765==a||2786<=a&&a<=2787||2810<=a&&a<=2815||2817==a||2876==a||2878==a||2879==a||2881<=a&&a<=2884||2893==a||2902==a||2903==a||2914<=a&&a<=2915||2946==a||3006==a||3008==a||3021==a||3031==a||3072==a||3134<=a&&a<=3136||3142<=a&&a<=3144||3146<=a&&a<=3149||3157<=a&&a<=3158||3170<=a&&a<=3171||3201==a||3260==a||3263==a||3266==a||3270==a||3276<=a&&a<=3277||3285<=a&&a<=3286||3298<=a&&a<=3299||3328<=a&&a<=3329||3387<=a&&a<=3388||3390==a||3393<=a&&a<=3396||3405==a||3415==a||3426<=a&&a<=3427||3530==a||3535==a||3538<=a&&a<=3540||3542==a||3551==a||3633==a||3636<=a&&a<=3642||3655<=a&&a<=3662||3761==a||3764<=a&&a<=3769||3771<=a&&a<=3772||3784<=a&&a<=3789||3864<=a&&a<=3865||3893==a||3895==a||3897==a||3953<=a&&a<=3966||3968<=a&&a<=3972||3974<=a&&a<=3975||3981<=a&&a<=3991||3993<=a&&a<=4028||4038==a||4141<=a&&a<=4144||4146<=a&&a<=4151||4153<=a&&a<=4154||4157<=a&&a<=4158||4184<=a&&a<=4185||4190<=a&&a<=4192||4209<=a&&a<=4212||4226==a||4229<=a&&a<=4230||4237==a||4253==a||4957<=a&&a<=4959||5906<=a&&a<=5908||5938<=a&&a<=5940||5970<=a&&a<=5971||6002<=a&&a<=6003||6068<=a&&a<=6069||6071<=a&&a<=6077||6086==a||6089<=a&&a<=6099||6109==a||6155<=a&&a<=6157||6277<=a&&a<=6278||6313==a||6432<=a&&a<=6434||6439<=a&&a<=6440||6450==a||6457<=a&&a<=6459||6679<=a&&a<=6680||6683==a||6742==a||6744<=a&&a<=6750||6752==a||6754==a||6757<=a&&a<=6764||6771<=a&&a<=6780||6783==a||6832<=a&&a<=6845||6846==a||6912<=a&&a<=6915||6964==a||6966<=a&&a<=6970||6972==a||6978==a||7019<=a&&a<=7027||7040<=a&&a<=7041||7074<=a&&a<=7077||7080<=a&&a<=7081||7083<=a&&a<=7085||7142==a||7144<=a&&a<=7145||7149==a||7151<=a&&a<=7153||7212<=a&&a<=7219||7222<=a&&a<=7223||7376<=a&&a<=7378||7380<=a&&a<=7392||7394<=a&&a<=7400||7405==a||7412==a||7416<=a&&a<=7417||7616<=a&&a<=7673||7675<=a&&a<=7679||8204==a||8400<=a&&a<=8412||8413<=a&&a<=8416||8417==a||8418<=a&&a<=8420||8421<=a&&a<=8432||11503<=a&&a<=11505||11647==a||11744<=a&&a<=11775||12330<=a&&a<=12333||12334<=a&&a<=12335||12441<=a&&a<=12442||42607==a||42608<=a&&a<=42610||42612<=a&&a<=42621||42654<=a&&a<=42655||42736<=a&&a<=42737||43010==a||43014==a||43019==a||43045<=a&&a<=43046||43204<=a&&a<=43205||43232<=a&&a<=43249||43302<=a&&a<=43309||43335<=a&&a<=43345||43392<=a&&a<=43394||43443==a||43446<=a&&a<=43449||43452==a||43493==a||43561<=a&&a<=43566||43569<=a&&a<=43570||43573<=a&&a<=43574||43587==a||43596==a||43644==a||43696==a||43698<=a&&a<=43700||43703<=a&&a<=43704||43710<=a&&a<=43711||43713==a||43756<=a&&a<=43757||43766==a||44005==a||44008==a||44013==a||64286==a||65024<=a&&a<=65039||65056<=a&&a<=65071||65438<=a&&a<=65439||66045==a||66272==a||66422<=a&&a<=66426||68097<=a&&a<=68099||68101<=a&&a<=68102||68108<=a&&a<=68111||68152<=a&&a<=68154||68159==a||68325<=a&&a<=68326||69633==a||69688<=a&&a<=69702||69759<=a&&a<=69761||69811<=a&&a<=69814||69817<=a&&a<=69818||69888<=a&&a<=69890||69927<=a&&a<=69931||69933<=a&&a<=69940||70003==a||70016<=a&&a<=70017||70070<=a&&a<=70078||70090<=a&&a<=70092||70191<=a&&a<=70193||70196==a||70198<=a&&a<=70199||70206==a||70367==a||70371<=a&&a<=70378||70400<=a&&a<=70401||70460==a||70462==a||70464==a||70487==a||70502<=a&&a<=70508||70512<=a&&a<=70516||70712<=a&&a<=70719||70722<=a&&a<=70724||70726==a||70832==a||70835<=a&&a<=70840||70842==a||70845==a||70847<=a&&a<=70848||70850<=a&&a<=70851||71087==a||71090<=a&&a<=71093||71100<=a&&a<=71101||71103<=a&&a<=71104||71132<=a&&a<=71133||71219<=a&&a<=71226||71229==a||71231<=a&&a<=71232||71339==a||71341==a||71344<=a&&a<=71349||71351==a||71453<=a&&a<=71455||71458<=a&&a<=71461||71463<=a&&a<=71467||72193<=a&&a<=72198||72201<=a&&a<=72202||72243<=a&&a<=72248||72251<=a&&a<=72254||72263==a||72273<=a&&a<=72278||72281<=a&&a<=72283||72330<=a&&a<=72342||72344<=a&&a<=72345||72752<=a&&a<=72758||72760<=a&&a<=72765||72767==a||72850<=a&&a<=72871||72874<=a&&a<=72880||72882<=a&&a<=72883||72885<=a&&a<=72886||73009<=a&&a<=73014||73018==a||73020<=a&&a<=73021||73023<=a&&a<=73029||73031==a||92912<=a&&a<=92916||92976<=a&&a<=92982||94095<=a&&a<=94098||113821<=a&&a<=113822||119141==a||119143<=a&&a<=119145||119150<=a&&a<=119154||119163<=a&&a<=119170||119173<=a&&a<=119179||119210<=a&&a<=119213||119362<=a&&a<=119364||121344<=a&&a<=121398||121403<=a&&a<=121452||121461==a||121476==a||121499<=a&&a<=121503||121505<=a&&a<=121519||122880<=a&&a<=122886||122888<=a&&a<=122904||122907<=a&&a<=122913||122915<=a&&a<=122916||122918<=a&&a<=122922||125136<=a&&a<=125142||125252<=a&&a<=125258||917536<=a&&a<=917631||917760<=a&&a<=917999?e:127462<=a&&a<=127487?t:2307==a||2363==a||2366<=a&&a<=2368||2377<=a&&a<=2380||2382<=a&&a<=2383||2434<=a&&a<=2435||2495<=a&&a<=2496||2503<=a&&a<=2504||2507<=a&&a<=2508||2563==a||2622<=a&&a<=2624||2691==a||2750<=a&&a<=2752||2761==a||2763<=a&&a<=2764||2818<=a&&a<=2819||2880==a||2887<=a&&a<=2888||2891<=a&&a<=2892||3007==a||3009<=a&&a<=3010||3014<=a&&a<=3016||3018<=a&&a<=3020||3073<=a&&a<=3075||3137<=a&&a<=3140||3202<=a&&a<=3203||3262==a||3264<=a&&a<=3265||3267<=a&&a<=3268||3271<=a&&a<=3272||3274<=a&&a<=3275||3330<=a&&a<=3331||3391<=a&&a<=3392||3398<=a&&a<=3400||3402<=a&&a<=3404||3458<=a&&a<=3459||3536<=a&&a<=3537||3544<=a&&a<=3550||3570<=a&&a<=3571||3635==a||3763==a||3902<=a&&a<=3903||3967==a||4145==a||4155<=a&&a<=4156||4182<=a&&a<=4183||4228==a||6070==a||6078<=a&&a<=6085||6087<=a&&a<=6088||6435<=a&&a<=6438||6441<=a&&a<=6443||6448<=a&&a<=6449||6451<=a&&a<=6456||6681<=a&&a<=6682||6741==a||6743==a||6765<=a&&a<=6770||6916==a||6965==a||6971==a||6973<=a&&a<=6977||6979<=a&&a<=6980||7042==a||7073==a||7078<=a&&a<=7079||7082==a||7143==a||7146<=a&&a<=7148||7150==a||7154<=a&&a<=7155||7204<=a&&a<=7211||7220<=a&&a<=7221||7393==a||7410<=a&&a<=7411||7415==a||43043<=a&&a<=43044||43047==a||43136<=a&&a<=43137||43188<=a&&a<=43203||43346<=a&&a<=43347||43395==a||43444<=a&&a<=43445||43450<=a&&a<=43451||43453<=a&&a<=43456||43567<=a&&a<=43568||43571<=a&&a<=43572||43597==a||43755==a||43758<=a&&a<=43759||43765==a||44003<=a&&a<=44004||44006<=a&&a<=44007||44009<=a&&a<=44010||44012==a||69632==a||69634==a||69762==a||69808<=a&&a<=69810||69815<=a&&a<=69816||69932==a||70018==a||70067<=a&&a<=70069||70079<=a&&a<=70080||70188<=a&&a<=70190||70194<=a&&a<=70195||70197==a||70368<=a&&a<=70370||70402<=a&&a<=70403||70463==a||70465<=a&&a<=70468||70471<=a&&a<=70472||70475<=a&&a<=70477||70498<=a&&a<=70499||70709<=a&&a<=70711||70720<=a&&a<=70721||70725==a||70833<=a&&a<=70834||70841==a||70843<=a&&a<=70844||70846==a||70849==a||71088<=a&&a<=71089||71096<=a&&a<=71099||71102==a||71216<=a&&a<=71218||71227<=a&&a<=71228||71230==a||71340==a||71342<=a&&a<=71343||71350==a||71456<=a&&a<=71457||71462==a||72199<=a&&a<=72200||72249==a||72279<=a&&a<=72280||72343==a||72751==a||72766==a||72873==a||72881==a||72884==a||94033<=a&&a<=94078||119142==a||119149==a?5:4352<=a&&a<=4447||43360<=a&&a<=43388?6:4448<=a&&a<=4519||55216<=a&&a<=55238?7:4520<=a&&a<=4607||55243<=a&&a<=55291?8:44032==a||44060==a||44088==a||44116==a||44144==a||44172==a||44200==a||44228==a||44256==a||44284==a||44312==a||44340==a||44368==a||44396==a||44424==a||44452==a||44480==a||44508==a||44536==a||44564==a||44592==a||44620==a||44648==a||44676==a||44704==a||44732==a||44760==a||44788==a||44816==a||44844==a||44872==a||44900==a||44928==a||44956==a||44984==a||45012==a||45040==a||45068==a||45096==a||45124==a||45152==a||45180==a||45208==a||45236==a||45264==a||45292==a||45320==a||45348==a||45376==a||45404==a||45432==a||45460==a||45488==a||45516==a||45544==a||45572==a||45600==a||45628==a||45656==a||45684==a||45712==a||45740==a||45768==a||45796==a||45824==a||45852==a||45880==a||45908==a||45936==a||45964==a||45992==a||46020==a||46048==a||46076==a||46104==a||46132==a||46160==a||46188==a||46216==a||46244==a||46272==a||46300==a||46328==a||46356==a||46384==a||46412==a||46440==a||46468==a||46496==a||46524==a||46552==a||46580==a||46608==a||46636==a||46664==a||46692==a||46720==a||46748==a||46776==a||46804==a||46832==a||46860==a||46888==a||46916==a||46944==a||46972==a||47e3==a||47028==a||47056==a||47084==a||47112==a||47140==a||47168==a||47196==a||47224==a||47252==a||47280==a||47308==a||47336==a||47364==a||47392==a||47420==a||47448==a||47476==a||47504==a||47532==a||47560==a||47588==a||47616==a||47644==a||47672==a||47700==a||47728==a||47756==a||47784==a||47812==a||47840==a||47868==a||47896==a||47924==a||47952==a||47980==a||48008==a||48036==a||48064==a||48092==a||48120==a||48148==a||48176==a||48204==a||48232==a||48260==a||48288==a||48316==a||48344==a||48372==a||48400==a||48428==a||48456==a||48484==a||48512==a||48540==a||48568==a||48596==a||48624==a||48652==a||48680==a||48708==a||48736==a||48764==a||48792==a||48820==a||48848==a||48876==a||48904==a||48932==a||48960==a||48988==a||49016==a||49044==a||49072==a||49100==a||49128==a||49156==a||49184==a||49212==a||49240==a||49268==a||49296==a||49324==a||49352==a||49380==a||49408==a||49436==a||49464==a||49492==a||49520==a||49548==a||49576==a||49604==a||49632==a||49660==a||49688==a||49716==a||49744==a||49772==a||49800==a||49828==a||49856==a||49884==a||49912==a||49940==a||49968==a||49996==a||50024==a||50052==a||50080==a||50108==a||50136==a||50164==a||50192==a||50220==a||50248==a||50276==a||50304==a||50332==a||50360==a||50388==a||50416==a||50444==a||50472==a||50500==a||50528==a||50556==a||50584==a||50612==a||50640==a||50668==a||50696==a||50724==a||50752==a||50780==a||50808==a||50836==a||50864==a||50892==a||50920==a||50948==a||50976==a||51004==a||51032==a||51060==a||51088==a||51116==a||51144==a||51172==a||51200==a||51228==a||51256==a||51284==a||51312==a||51340==a||51368==a||51396==a||51424==a||51452==a||51480==a||51508==a||51536==a||51564==a||51592==a||51620==a||51648==a||51676==a||51704==a||51732==a||51760==a||51788==a||51816==a||51844==a||51872==a||51900==a||51928==a||51956==a||51984==a||52012==a||52040==a||52068==a||52096==a||52124==a||52152==a||52180==a||52208==a||52236==a||52264==a||52292==a||52320==a||52348==a||52376==a||52404==a||52432==a||52460==a||52488==a||52516==a||52544==a||52572==a||52600==a||52628==a||52656==a||52684==a||52712==a||52740==a||52768==a||52796==a||52824==a||52852==a||52880==a||52908==a||52936==a||52964==a||52992==a||53020==a||53048==a||53076==a||53104==a||53132==a||53160==a||53188==a||53216==a||53244==a||53272==a||53300==a||53328==a||53356==a||53384==a||53412==a||53440==a||53468==a||53496==a||53524==a||53552==a||53580==a||53608==a||53636==a||53664==a||53692==a||53720==a||53748==a||53776==a||53804==a||53832==a||53860==a||53888==a||53916==a||53944==a||53972==a||54e3==a||54028==a||54056==a||54084==a||54112==a||54140==a||54168==a||54196==a||54224==a||54252==a||54280==a||54308==a||54336==a||54364==a||54392==a||54420==a||54448==a||54476==a||54504==a||54532==a||54560==a||54588==a||54616==a||54644==a||54672==a||54700==a||54728==a||54756==a||54784==a||54812==a||54840==a||54868==a||54896==a||54924==a||54952==a||54980==a||55008==a||55036==a||55064==a||55092==a||55120==a||55148==a||55176==a?9:44033<=a&&a<=44059||44061<=a&&a<=44087||44089<=a&&a<=44115||44117<=a&&a<=44143||44145<=a&&a<=44171||44173<=a&&a<=44199||44201<=a&&a<=44227||44229<=a&&a<=44255||44257<=a&&a<=44283||44285<=a&&a<=44311||44313<=a&&a<=44339||44341<=a&&a<=44367||44369<=a&&a<=44395||44397<=a&&a<=44423||44425<=a&&a<=44451||44453<=a&&a<=44479||44481<=a&&a<=44507||44509<=a&&a<=44535||44537<=a&&a<=44563||44565<=a&&a<=44591||44593<=a&&a<=44619||44621<=a&&a<=44647||44649<=a&&a<=44675||44677<=a&&a<=44703||44705<=a&&a<=44731||44733<=a&&a<=44759||44761<=a&&a<=44787||44789<=a&&a<=44815||44817<=a&&a<=44843||44845<=a&&a<=44871||44873<=a&&a<=44899||44901<=a&&a<=44927||44929<=a&&a<=44955||44957<=a&&a<=44983||44985<=a&&a<=45011||45013<=a&&a<=45039||45041<=a&&a<=45067||45069<=a&&a<=45095||45097<=a&&a<=45123||45125<=a&&a<=45151||45153<=a&&a<=45179||45181<=a&&a<=45207||45209<=a&&a<=45235||45237<=a&&a<=45263||45265<=a&&a<=45291||45293<=a&&a<=45319||45321<=a&&a<=45347||45349<=a&&a<=45375||45377<=a&&a<=45403||45405<=a&&a<=45431||45433<=a&&a<=45459||45461<=a&&a<=45487||45489<=a&&a<=45515||45517<=a&&a<=45543||45545<=a&&a<=45571||45573<=a&&a<=45599||45601<=a&&a<=45627||45629<=a&&a<=45655||45657<=a&&a<=45683||45685<=a&&a<=45711||45713<=a&&a<=45739||45741<=a&&a<=45767||45769<=a&&a<=45795||45797<=a&&a<=45823||45825<=a&&a<=45851||45853<=a&&a<=45879||45881<=a&&a<=45907||45909<=a&&a<=45935||45937<=a&&a<=45963||45965<=a&&a<=45991||45993<=a&&a<=46019||46021<=a&&a<=46047||46049<=a&&a<=46075||46077<=a&&a<=46103||46105<=a&&a<=46131||46133<=a&&a<=46159||46161<=a&&a<=46187||46189<=a&&a<=46215||46217<=a&&a<=46243||46245<=a&&a<=46271||46273<=a&&a<=46299||46301<=a&&a<=46327||46329<=a&&a<=46355||46357<=a&&a<=46383||46385<=a&&a<=46411||46413<=a&&a<=46439||46441<=a&&a<=46467||46469<=a&&a<=46495||46497<=a&&a<=46523||46525<=a&&a<=46551||46553<=a&&a<=46579||46581<=a&&a<=46607||46609<=a&&a<=46635||46637<=a&&a<=46663||46665<=a&&a<=46691||46693<=a&&a<=46719||46721<=a&&a<=46747||46749<=a&&a<=46775||46777<=a&&a<=46803||46805<=a&&a<=46831||46833<=a&&a<=46859||46861<=a&&a<=46887||46889<=a&&a<=46915||46917<=a&&a<=46943||46945<=a&&a<=46971||46973<=a&&a<=46999||47001<=a&&a<=47027||47029<=a&&a<=47055||47057<=a&&a<=47083||47085<=a&&a<=47111||47113<=a&&a<=47139||47141<=a&&a<=47167||47169<=a&&a<=47195||47197<=a&&a<=47223||47225<=a&&a<=47251||47253<=a&&a<=47279||47281<=a&&a<=47307||47309<=a&&a<=47335||47337<=a&&a<=47363||47365<=a&&a<=47391||47393<=a&&a<=47419||47421<=a&&a<=47447||47449<=a&&a<=47475||47477<=a&&a<=47503||47505<=a&&a<=47531||47533<=a&&a<=47559||47561<=a&&a<=47587||47589<=a&&a<=47615||47617<=a&&a<=47643||47645<=a&&a<=47671||47673<=a&&a<=47699||47701<=a&&a<=47727||47729<=a&&a<=47755||47757<=a&&a<=47783||47785<=a&&a<=47811||47813<=a&&a<=47839||47841<=a&&a<=47867||47869<=a&&a<=47895||47897<=a&&a<=47923||47925<=a&&a<=47951||47953<=a&&a<=47979||47981<=a&&a<=48007||48009<=a&&a<=48035||48037<=a&&a<=48063||48065<=a&&a<=48091||48093<=a&&a<=48119||48121<=a&&a<=48147||48149<=a&&a<=48175||48177<=a&&a<=48203||48205<=a&&a<=48231||48233<=a&&a<=48259||48261<=a&&a<=48287||48289<=a&&a<=48315||48317<=a&&a<=48343||48345<=a&&a<=48371||48373<=a&&a<=48399||48401<=a&&a<=48427||48429<=a&&a<=48455||48457<=a&&a<=48483||48485<=a&&a<=48511||48513<=a&&a<=48539||48541<=a&&a<=48567||48569<=a&&a<=48595||48597<=a&&a<=48623||48625<=a&&a<=48651||48653<=a&&a<=48679||48681<=a&&a<=48707||48709<=a&&a<=48735||48737<=a&&a<=48763||48765<=a&&a<=48791||48793<=a&&a<=48819||48821<=a&&a<=48847||48849<=a&&a<=48875||48877<=a&&a<=48903||48905<=a&&a<=48931||48933<=a&&a<=48959||48961<=a&&a<=48987||48989<=a&&a<=49015||49017<=a&&a<=49043||49045<=a&&a<=49071||49073<=a&&a<=49099||49101<=a&&a<=49127||49129<=a&&a<=49155||49157<=a&&a<=49183||49185<=a&&a<=49211||49213<=a&&a<=49239||49241<=a&&a<=49267||49269<=a&&a<=49295||49297<=a&&a<=49323||49325<=a&&a<=49351||49353<=a&&a<=49379||49381<=a&&a<=49407||49409<=a&&a<=49435||49437<=a&&a<=49463||49465<=a&&a<=49491||49493<=a&&a<=49519||49521<=a&&a<=49547||49549<=a&&a<=49575||49577<=a&&a<=49603||49605<=a&&a<=49631||49633<=a&&a<=49659||49661<=a&&a<=49687||49689<=a&&a<=49715||49717<=a&&a<=49743||49745<=a&&a<=49771||49773<=a&&a<=49799||49801<=a&&a<=49827||49829<=a&&a<=49855||49857<=a&&a<=49883||49885<=a&&a<=49911||49913<=a&&a<=49939||49941<=a&&a<=49967||49969<=a&&a<=49995||49997<=a&&a<=50023||50025<=a&&a<=50051||50053<=a&&a<=50079||50081<=a&&a<=50107||50109<=a&&a<=50135||50137<=a&&a<=50163||50165<=a&&a<=50191||50193<=a&&a<=50219||50221<=a&&a<=50247||50249<=a&&a<=50275||50277<=a&&a<=50303||50305<=a&&a<=50331||50333<=a&&a<=50359||50361<=a&&a<=50387||50389<=a&&a<=50415||50417<=a&&a<=50443||50445<=a&&a<=50471||50473<=a&&a<=50499||50501<=a&&a<=50527||50529<=a&&a<=50555||50557<=a&&a<=50583||50585<=a&&a<=50611||50613<=a&&a<=50639||50641<=a&&a<=50667||50669<=a&&a<=50695||50697<=a&&a<=50723||50725<=a&&a<=50751||50753<=a&&a<=50779||50781<=a&&a<=50807||50809<=a&&a<=50835||50837<=a&&a<=50863||50865<=a&&a<=50891||50893<=a&&a<=50919||50921<=a&&a<=50947||50949<=a&&a<=50975||50977<=a&&a<=51003||51005<=a&&a<=51031||51033<=a&&a<=51059||51061<=a&&a<=51087||51089<=a&&a<=51115||51117<=a&&a<=51143||51145<=a&&a<=51171||51173<=a&&a<=51199||51201<=a&&a<=51227||51229<=a&&a<=51255||51257<=a&&a<=51283||51285<=a&&a<=51311||51313<=a&&a<=51339||51341<=a&&a<=51367||51369<=a&&a<=51395||51397<=a&&a<=51423||51425<=a&&a<=51451||51453<=a&&a<=51479||51481<=a&&a<=51507||51509<=a&&a<=51535||51537<=a&&a<=51563||51565<=a&&a<=51591||51593<=a&&a<=51619||51621<=a&&a<=51647||51649<=a&&a<=51675||51677<=a&&a<=51703||51705<=a&&a<=51731||51733<=a&&a<=51759||51761<=a&&a<=51787||51789<=a&&a<=51815||51817<=a&&a<=51843||51845<=a&&a<=51871||51873<=a&&a<=51899||51901<=a&&a<=51927||51929<=a&&a<=51955||51957<=a&&a<=51983||51985<=a&&a<=52011||52013<=a&&a<=52039||52041<=a&&a<=52067||52069<=a&&a<=52095||52097<=a&&a<=52123||52125<=a&&a<=52151||52153<=a&&a<=52179||52181<=a&&a<=52207||52209<=a&&a<=52235||52237<=a&&a<=52263||52265<=a&&a<=52291||52293<=a&&a<=52319||52321<=a&&a<=52347||52349<=a&&a<=52375||52377<=a&&a<=52403||52405<=a&&a<=52431||52433<=a&&a<=52459||52461<=a&&a<=52487||52489<=a&&a<=52515||52517<=a&&a<=52543||52545<=a&&a<=52571||52573<=a&&a<=52599||52601<=a&&a<=52627||52629<=a&&a<=52655||52657<=a&&a<=52683||52685<=a&&a<=52711||52713<=a&&a<=52739||52741<=a&&a<=52767||52769<=a&&a<=52795||52797<=a&&a<=52823||52825<=a&&a<=52851||52853<=a&&a<=52879||52881<=a&&a<=52907||52909<=a&&a<=52935||52937<=a&&a<=52963||52965<=a&&a<=52991||52993<=a&&a<=53019||53021<=a&&a<=53047||53049<=a&&a<=53075||53077<=a&&a<=53103||53105<=a&&a<=53131||53133<=a&&a<=53159||53161<=a&&a<=53187||53189<=a&&a<=53215||53217<=a&&a<=53243||53245<=a&&a<=53271||53273<=a&&a<=53299||53301<=a&&a<=53327||53329<=a&&a<=53355||53357<=a&&a<=53383||53385<=a&&a<=53411||53413<=a&&a<=53439||53441<=a&&a<=53467||53469<=a&&a<=53495||53497<=a&&a<=53523||53525<=a&&a<=53551||53553<=a&&a<=53579||53581<=a&&a<=53607||53609<=a&&a<=53635||53637<=a&&a<=53663||53665<=a&&a<=53691||53693<=a&&a<=53719||53721<=a&&a<=53747||53749<=a&&a<=53775||53777<=a&&a<=53803||53805<=a&&a<=53831||53833<=a&&a<=53859||53861<=a&&a<=53887||53889<=a&&a<=53915||53917<=a&&a<=53943||53945<=a&&a<=53971||53973<=a&&a<=53999||54001<=a&&a<=54027||54029<=a&&a<=54055||54057<=a&&a<=54083||54085<=a&&a<=54111||54113<=a&&a<=54139||54141<=a&&a<=54167||54169<=a&&a<=54195||54197<=a&&a<=54223||54225<=a&&a<=54251||54253<=a&&a<=54279||54281<=a&&a<=54307||54309<=a&&a<=54335||54337<=a&&a<=54363||54365<=a&&a<=54391||54393<=a&&a<=54419||54421<=a&&a<=54447||54449<=a&&a<=54475||54477<=a&&a<=54503||54505<=a&&a<=54531||54533<=a&&a<=54559||54561<=a&&a<=54587||54589<=a&&a<=54615||54617<=a&&a<=54643||54645<=a&&a<=54671||54673<=a&&a<=54699||54701<=a&&a<=54727||54729<=a&&a<=54755||54757<=a&&a<=54783||54785<=a&&a<=54811||54813<=a&&a<=54839||54841<=a&&a<=54867||54869<=a&&a<=54895||54897<=a&&a<=54923||54925<=a&&a<=54951||54953<=a&&a<=54979||54981<=a&&a<=55007||55009<=a&&a<=55035||55037<=a&&a<=55063||55065<=a&&a<=55091||55093<=a&&a<=55119||55121<=a&&a<=55147||55149<=a&&a<=55175||55177<=a&&a<=55203?10:9757==a||9977==a||9994<=a&&a<=9997||127877==a||127938<=a&&a<=127940||127943==a||127946<=a&&a<=127948||128066<=a&&a<=128067||128070<=a&&a<=128080||128110==a||128112<=a&&a<=128120||128124==a||128129<=a&&a<=128131||128133<=a&&a<=128135||128170==a||128372<=a&&a<=128373||128378==a||128400==a||128405<=a&&a<=128406||128581<=a&&a<=128583||128587<=a&&a<=128591||128675==a||128692<=a&&a<=128694||128704==a||128716==a||129304<=a&&a<=129308||129310<=a&&a<=129311||129318==a||129328<=a&&a<=129337||129341<=a&&a<=129342||129489<=a&&a<=129501?n:127995<=a&&a<=127999?14:8205==a?15:9792==a||9794==a||9877<=a&&a<=9878||9992==a||10084==a||127752==a||127806==a||127859==a||127891==a||127908==a||127912==a||127979==a||127981==a||128139==a||128187<=a&&a<=128188||128295==a||128300==a||128488==a||128640==a||128658==a?r:128102<=a&&a<=128105?o:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var i=u(s(e,t)),n=[],r=t+1;r<e.length;r++)if(!a(e,r-1)){var o=u(s(e,r));if(l(i,n,o))return r;n.push(o)}return e.length},this.splitGraphemes=function(e){for(var t,i=[],n=0;(t=this.nextBreak(e,n))<e.length;)i.push(e.slice(n,t)),n=t;return n<e.length&&i.push(e.slice(n)),i},this.iterateGraphemes=function(e){var t=0,i={next:function(){var i,n;return(n=this.nextBreak(e,t))<e.length?(i=e.slice(t,n),t=n,{value:i,done:!1}):t<e.length?(i=e.slice(t),t=e.length,{value:i,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(i[Symbol.iterator]=function(){return i}),i},this.countGraphemes=function(e){for(var t,i=0,n=0;(t=this.nextBreak(e,n))<e.length;)n=t,i++;return n<e.length&&i++,i},this}function ue$w(){this.textureInfo=void 0,this.dimensions=void 0,this.billboard=void 0}function pe$v(e,t,i){this.labelCollection=e,this.index=t,this.dimensions=i}var ge$p=1.2,ie$y="ID_WHITE_PIXEL",q$V=new o$1o(4,4),ve$q=new f$1a(1,1,1,1);function ye$n(e,t){var i=document.createElement("canvas");i.width=q$V.x,i.height=q$V.y;var n=i.getContext("2d");n.fillStyle="#fff",n.fillRect(0,0,i.width,i.height),e.addImage(ie$y,i).then((function(e){t._whitePixelIndex=e}))}var D$Q={};function me$t(e,t,i,n,r,o,a){return D$Q.font=t,D$Q.fillColor=i,D$Q.strokeColor=n,D$Q.strokeWidth=r,D$Q.padding=V$L.PADDING,a===S$Q.CENTER?D$Q.textBaseline="middle":a===S$Q.TOP?D$Q.textBaseline="top":D$Q.textBaseline="bottom",D$Q.fill=o===R$S.FILL||o===R$S.FILL_AND_OUTLINE,D$Q.stroke=o===R$S.OUTLINE||o===R$S.FILL_AND_OUTLINE,D$Q.backgroundColor=e$1X.BLACK,x$W(e,D$Q)}function Z$N(e,t){t.textureInfo=void 0,t.dimensions=void 0;var i=t.billboard;e$2e(i)&&(i.show=!1,i.image=void 0,e$2e(i._removeCallbackFunc)&&(i._removeCallbackFunc(),i._removeCallbackFunc=void 0),e._spareBillboards.push(i),t.billboard=void 0)}function xe$n(e,t,i,n){e.addImage(t,i).then((function(e){n.index=e}))}var we$i=new T$O,J$K=new o$1p;function be$q(e,t){var i,n,r,o=t._renderedText,a=we$i.splitGraphemes(o),s=a.length,l=t._glyphs,u=l.length;if(t._relativeSize=t._fontSize/V$L.FONT_SIZE,s<u)for(n=s;n<u;++n)Z$N(e,l[n]);l.length=s;var c=t._showBackground&&o.split("\n").join("").length>0,h=t._backgroundBillboard,d=e._backgroundBillboardCollection;c?(e$2e(h)||(h=e$2e(t._backgroundImage)?d.add({collection:e,image:t._backgroundImage}):d.add({collection:e,image:ie$y,imageSubRegion:ve$q}),t._backgroundBillboard=h),e$2e(t._backgroundImage)||(h.color=t._backgroundColor),h.show=t._show,h.position=t._position,h.eyeOffset=t._eyeOffset,h.pixelOffset=t._pixelOffset,h.horizontalOrigin=j$V.LEFT,h.verticalOrigin=t._verticalOrigin,h.heightReference=t._heightReference,h.scale=t.totalScale,h.pickPrimitive=t,h.id=t._id,h.translucencyByDistance=t._translucencyByDistance,h.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,h.scaleByDistance=t._scaleByDistance,h.distanceDisplayCondition=t._distanceDisplayCondition,h.disableDepthTestDistance=t._disableDepthTestDistance,h.opacityState=t._opacityState):e$2e(h)&&(d.remove(h),t._backgroundBillboard=h=void 0);var f=e._glyphTextureCache,p=[0],_=0;for(r=0;r<s;++r){var m=a[r],g=t._verticalOrigin,x=JSON.stringify([m,t._fontFamily,t._fontStyle,t._fontWeight,+g]),y=f[x];if(!e$2e(y)){var v=me$t(m,t._fontStyle+" "+t._fontWeight+" "+V$L.FONT_SIZE+"px "+t._fontFamily,e$1X.WHITE,e$1X.WHITE,0,R$S.FILL,g);if(y=new pe$v(e,-1,v.dimensions),f[x]=y,v.width>0&&v.height>0){for(var $=b$_(v,{cutoff:V$L.CUTOFF,radius:V$L.RADIUS}),b=v.getContext("2d"),T=v.width,C=v.height,S=b.getImageData(0,0,T,C),w=0;w<T;w++)for(var E=0;E<C;E++){var P=E*T+w,A=255*$[P],L=4*P;S.data[L+0]=A,S.data[L+1]=A,S.data[L+2]=A,S.data[L+3]=A}b.putImageData(S,0,0)," "!==m&&xe$n(e._textureAtlas,x,v,y)}}if("\n"===m?p[++_]=0:p[_]=Math.max(p[_],y.dimensions.height),e$2e(i=l[r])?-1===y.index?Z$N(e,i):e$2e(i.textureInfo)&&(i.textureInfo=void 0):(i=new ue$w,l[r]=i),i.textureInfo=y,i.dimensions=y.dimensions,-1!==y.index){var M=i.billboard,R=e._spareBillboards;e$2e(M)||(R.length>0?M=R.pop():((M=e._billboardCollection.add({collection:e}))._labelDimensions=new o$1o,M._labelTranslate=new o$1o),i.billboard=M),M.show=t._show,M._heightReference=t._heightReference,M.position=t._position,M.eyeOffset=t._eyeOffset,M.pixelOffset=t._pixelOffset,M.horizontalOrigin=j$V.LEFT,M.verticalOrigin=t._verticalOrigin,M.scale=t.totalScale,M.pickPrimitive=t,M.id=t._id,M.image=x,M.translucencyByDistance=t._translucencyByDistance,M.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,M.scaleByDistance=t._scaleByDistance,M.distanceDisplayCondition=t._distanceDisplayCondition,M.disableDepthTestDistance=t._disableDepthTestDistance,M._batchIndex=t._batchIndex,M.outlineColor=t.outlineColor,M.opacityState=t._opacityState,t.style===R$S.FILL_AND_OUTLINE?(M.color=t._fillColor,M.outlineWidth=t.outlineWidth):t.style===R$S.FILL?(M.color=t._fillColor,M.outlineWidth=0):t.style===R$S.OUTLINE&&(M.color=e$1X.TRANSPARENT,M.outlineWidth=t.outlineWidth)}}e._isMVT&&Te$l(t,h,l,s,p),t._repositionAllGlyphs=!0}function Te$l(e,t,i,n,r){for(var o=0,a=0;a<r.length;a++)o+=r[a];for(var s=0;s<n;++s){var l=i[s];if(e$2e(l)&&e$2e(l.billboard)){var u=l.billboard,c=.2*o;J$K.y=c,u.eyeOffset=J$K,e$2e(t)&&(t.eyeOffset=J$K)}}}function ne$z(e,t,i){return t===j$V.CENTER?-e/2:t===j$V.RIGHT?-(e+i.x):i.x}var c$Q=new o$1o,Ce$h=new o$1o;function Ie$j(e){var t,i,n,r=e._glyphs,o=e._renderedText,a=0,s=0,l=[],u=Number.NEGATIVE_INFINITY,c=0,h=1,d=r.length,f=e._backgroundBillboard,p=o$1o.clone(e$2e(f)?e._backgroundPadding:o$1o.ZERO,Ce$h);for(p.x/=e._relativeSize,p.y/=e._relativeSize,n=0;n<d;++n)"\n"===o.charAt(n)?(l.push(a),++h,a=0):(i=(t=r[n]).dimensions,c=Math.max(c,i.height-i.descent),u=Math.max(u,i.descent),a+=i.width-i.bounds.minx,n<d-1&&(a+=r[n+1].dimensions.bounds.minx),s=Math.max(s,a));l.push(a);var _=c+u,m=e.totalScale,g=e._horizontalOrigin,x=e._verticalOrigin,y=0,v=l[y],$=ne$z(v,g,p),b=ge$p*_,T=b*(h-1),C=s,S=_+T;e$2e(f)&&(C+=2*p.x,S+=2*p.y,f._labelHorizontalOrigin=g),c$Q.x=$*m,c$Q.y=0;var w=!0,E=0;for(n=0;n<d;++n)if("\n"===o.charAt(n))E+=b,$=ne$z(v=l[++y],g,p),c$Q.x=$*m,w=!0;else if(i=(t=r[n]).dimensions,x===S$Q.TOP?(c$Q.y=i.height-c-p.y,c$Q.y+=V$L.PADDING):x===S$Q.CENTER?c$Q.y=(T+i.height-c)/2:x===S$Q.BASELINE?(c$Q.y=T,c$Q.y-=V$L.PADDING):(c$Q.y=T+u+p.y,c$Q.y-=V$L.PADDING),c$Q.y=(c$Q.y-i.descent-E)*m,w&&(c$Q.x-=V$L.PADDING*m,w=!1),e$2e(t.billboard)&&(t.billboard._setTranslate(c$Q),t.billboard._labelDimensions.x=C,t.billboard._labelDimensions.y=S,t.billboard._labelHorizontalOrigin=g),n<d-1){var P=r[n+1];c$Q.x+=(i.width-i.bounds.minx+P.dimensions.bounds.minx)*m}if(e$2e(f)&&o.split("\n").join("").length>0&&($=g===j$V.CENTER?-s/2-p.x:g===j$V.RIGHT?-(s+2*p.x):0,c$Q.x=$*m,x===S$Q.TOP?c$Q.y=_-c-u:x===S$Q.CENTER?c$Q.y=(_-c)/2-u:x===S$Q.BASELINE?c$Q.y=-p.y-u:c$Q.y=0,c$Q.y=c$Q.y*m,f.width=C,f.height=S,f._setTranslate(c$Q),f._labelTranslate=o$1o.clone(c$Q,f._labelTranslate)),e.heightReference===k$R.CLAMP_TO_GROUND)for(n=0;n<d;++n){var A=(t=r[n]).billboard;e$2e(A)&&(A._labelTranslate=o$1o.clone(c$Q,A._labelTranslate))}}function se$u(e,t){for(var i=t._glyphs,n=0,r=i.length;n<r;++n)Z$N(e,i[n]);e$2e(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,e$2e(t._removeCallbackFunc)&&t._removeCallbackFunc(),i$11(t)}function g$W(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._id=e.id,this._s3MlayerId=-1,this._scene=e.scene,this._isMVT=e.isMVT,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._backgroundTextureAtlas=void 0,this._whitePixelIndex=void 0,this._swipeEnabled=u$Z(e.swipeEnabled,!1),this._swipeRegion=u$Z(e.swipeRegion,new f$1a(0,0,1,1)),this._billboardMode=u$Z(e.billboardMode,yr$2.None),this._backgroundBillboardCollection=new w$O({scene:this._scene,isMVT:this._isMVT,depthTestEnable:e.depthTestEnable,swipeEnabled:this._swipeEnabled,swipeRegion:this._swipeRegion,billboardMode:this._billboardMode}),this._backgroundBillboardCollection.destroyTextureAtlas=!1,this._billboardCollection=new w$O({scene:this._scene,batchTable:this._batchTable,isMVT:this._isMVT,depthTestEnable:e.depthTestEnable,swipeEnabled:this._swipeEnabled,swipeRegion:this._swipeRegion,billboardMode:this._billboardMode}),this._billboardCollection.destroyTextureAtlas=!1,this._billboardCollection._sdf=!0,this._spareBillboards=[],this._glyphTextureCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=e$1X.clone(e$1X.WHITE),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.blendOption=u$Z(e.blendOption,S$L.OPAQUE_AND_TRANSLUCENT),this._isS3MTileLabels=u$Z(e.isS3MTileLabels,!1),this._labelsID={},this._pickedlabelsID=[],this._isPicked=!1,this._selectedColor=e$1X.clone(u$Z(e.selectedColor,new e$1X(.7,.7,1,1))),this._labelSelected=new o$1h,this._visibleViewport=4095}function De$l(e){return e.coord.x}function Oe$k(e){return e.coord.y}Object.defineProperties(g$W.prototype,{length:{get:function(){return this._labels.length}},s3MlayerId:{get:function(){return this._s3MlayerId},set:function(e){o$1q.defined("labelCollection Id value",e),this._s3MlayerId=e}},selectedColor:{get:function(){return this._selectedColor},set:function(e){o$1q.defined("selectedColor value",e),e$1X.clone(e,this._selectedColor)}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(e$2e(e)&&e instanceof f$1a))throw new t$15("Expected LabelCollection.swipeRegion to be type of BoundingRectangle.");f$1a.equals(e,this._swipeRegion)||(f$1a.clone(e,this._swipeRegion),this._billboardCollection.swipeRegion=this._swipeRegion,this._backgroundBillboardCollection.swipeRegion=this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){o$1q.typeOf.bool("LabelCollection.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e,this._billboardCollection.swipeEnabled=e,this._backgroundBillboardCollection.swipeEnabled=e)}},billboardMode:{get:function(){return this._billboardMode}},fadeChage:{get:function(){return this._billboardCollection.fadeChage},set:function(e){this._billboardCollection.fadeChage=e}}}),g$W.prototype.add=function(e){e=u$Z(e,{});var t=this._labels.length;e.index=t;var i=new D$R(e,this);return this._labels.push(i),this._labelsToUpdate.push(i),e$2e(i.id)&&(this._labelsID[i.id]=i),i},g$W.prototype.remove=function(e){if(e$2e(e)&&e._labelCollection===this){var t=this._labels.indexOf(e);if(-1!==t)return this._labels.splice(t,1),se$u(this,e),e$2e(e.id)&&Object.keys(this._labelsID).length>0&&delete this._labelsID[e.id],!0}return!1},g$W.prototype.removeAll=function(){for(var e=this._labels,t=0,i=e.length;t<i;++t)se$u(this,e[t]);e.length=0,this._labelsID={},this._pickedlabelsID.length=0,this._isPicked=!1},g$W.prototype.contains=function(e){return e$2e(e)&&e._labelCollection===this},g$W.prototype.containsLabel=function(e){return this._labelsID.hasOwnProperty(e)},g$W.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return this._labels[e]},g$W.prototype.getById=function(e){if(!e$2e(e))throw new t$15("id is required.");return e$2e(this._labelsID[e])?this._labelsID[e]:null},g$W.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},g$W.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},g$W.prototype.update=function(e,t,i){if(e.multiViewportIndex>-1&&this._labels.length>0){if(e$2e(this._labels[0]._id)&&e$2e(this._labels[0]._id.entityCollection)){var n=this._labels[0]._id.entityCollection.owner;if(typeof n.getVisibleInViewport<"u")if(!n.getVisibleInViewport(e.multiViewportIndex))return}if(!this.getVisibleInViewport(e.multiViewportIndex))return}var r=this._billboardCollection,o=this._backgroundBillboardCollection;r.modelMatrix=this.modelMatrix,r.debugShowBoundingVolume=this.debugShowBoundingVolume,o.modelMatrix=this.modelMatrix,o.debugShowBoundingVolume=this.debugShowBoundingVolume;t=e.context;e$2e(this._textureAtlas)||(this._textureAtlas=new v$I({context:t}),r.textureAtlas=this._textureAtlas),e$2e(this._backgroundTextureAtlas)||(this._backgroundTextureAtlas=new v$I({context:t,initialSize:q$V}),o.textureAtlas=this._backgroundTextureAtlas,ye$n(this._backgroundTextureAtlas,this));for(var a=this._labelsToUpdate.length,s=0;s<a;++s){var l=this._labelsToUpdate[s];if(!l.isDestroyed()){var u=l._glyphs.length;l._rebindAllGlyphs&&(be$q(this,l),l._rebindAllGlyphs=!1),l._repositionAllGlyphs&&(Ie$j(l),l._repositionAllGlyphs=!1),l.computeLocalScreenSpaceBoundingBox(l,l._localScreenSpaceBBox);var c=l._glyphs.length-u;this._totalGlyphCount+=c}}var h=o.length>0?S$L.TRANSLUCENT:this.blendOption;r.blendOption=h,o.blendOption=h,r._highlightColor=this._highlightColor,o._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,o.update(e,t,i),r.update(e,t,i)},g$W.prototype.isDestroyed=function(){return!1},g$W.prototype.destroy=function(){return this.removeAll(),this._billboardCollection=this._billboardCollection.destroy(),this._textureAtlas=this._textureAtlas&&this._textureAtlas.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),this._backgroundTextureAtlas=this._backgroundTextureAtlas&&this._backgroundTextureAtlas.destroy(),i$11(this)},g$W.prototype.setLabelStyle=function(e){for(var t=this._labels.length,i=0;i<t;++i){var n=this._labels[i];n.isDestroyed()||n.setLabelStyle(e)}},g$W.prototype.setLabelVisible=function(e,t){if(!e$2e(e))throw new t$15("index is required.");this._labels[e].show=t},g$W.prototype.setAllLabelsVisible=function(e){for(var t=this._labels.length,i=0;i<t;++i){var n=this._labels[i];n.isDestroyed()||(n.show=e)}},g$W.prototype.setVisibleIndex=function(e){for(var t={},i=0,n=e.length;i<n;i++)t[e[i]]=!0;for(var r in this._labelsID)e$2e(t[r])?this._labelsID[r].show=!0:this._labelsID[r].show=!1},g$W.prototype.setVisibleLabels=function(e){if(0!==e.length&&0!==this._labels.length){for(var t=this._scene._view.viewport,i=t.x,n=t.x+t.width,r=t.y,o=t.y+t.height,a=[],s=0,l=e.length;s<l;++s){var u=e[s];if(e$2e(this._labelsID[u])){var c,h=(_=this._labelsID[u]).computeScreenSpacePosition(this._scene,c);!e$2e(h)||h.x>=i&&h.x<=n&&h.y>=r&&h.y<=o&&a.push({index:u,clustered:!0,coord:h})}}var d=O$D(a,De$l,Oe$k,4096,Int32Array),f=[],p=a.length;for(s=0;s<p;++s){for(var _,m=a[s],g=m.index,x=m.coord,y=(_=this._labelsID[g]).getScreenSpaceBoundingBox(_,x,c),v=d.intersect(y.x,y.y,y.x+y.width,y.y+y.height),$=v.length,b=0,T=0;T<$;++T){var C=v[T],S=a[C];s!==C&&!S.clustered&&++b}b<1&&(m.clustered=!1,f.push(g))}this.setVisibleIndex(f)}},g$W.prototype.setSelection=function(e){if(this.releaseSelection(),0!==Object.keys(this._labelsID).length){if(this._labelsID.hasOwnProperty(e)){var t=this._labelsID[e];if(t.isDestroyed())return;if(t.id===e){t.isPicked=!0;var i=e$1X.clone(this._selectedColor);t.fillColor=i,this._pickedlabelsID.push(e),this._labelSelected.raiseEvent({id:t.id,text:t.text,scale:t.scale,font:t.font,fillColor:t.fillColor})}}this._isPicked=!0}},g$W.prototype.releaseSelection=function(){if(this._isPicked&&0!==Object.keys(this._labelsID).length){for(var e=this._pickedlabelsID.length,t=0;t<e;++t){var i=this._pickedlabelsID[t];if(this._labelsID.hasOwnProperty(i)){var n=this._labelsID[i];n.isDestroyed()||(n.isPicked&&n.restFillColor(),n.isPicked=!1)}}this._pickedlabelsID=[]}};const _0x542d63=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3e5512=_0x542d63(void 0,(function(){return _0x3e5512.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e5512).search("(((.+)+)+)+$")}));function BillboardCollectionPool(e,t){this._use=[],this._unUse=[],this._owner=t,this._scene=e.scene,this._showCallout=u$Z(e.showCallout,!1)}function i$P(e){if(!e$2e(e.provider))throw new t$15("options.provder and options.viewer is required.");this._layerConfig=e.layerConfig,this._provider=e.provider,this._provider.lineAntialiasing=e.lineAntialiasing||!1,this._inner=e.layer,this._imagelayerCollection=e.imagelayerCollection,this._name=e.name,e$2e(e.layerConfig)&&e$2e(e.layerConfig.id)&&(this._name=e.layerConfig.id),this._style3D=u$Z(e.style3D,new e$1v),this._swipeEnabled=u$Z(e.swipeEnabled,!1),this._billboardMode=u$Z(e.billboardMode,yr$2.None),this._labelDepthTestEnabled=u$Z(e.labelDepthTestEnabled,!0),this._swipeRegion=u$Z(e.swipeRegion,new f$1a(0,0,1,1)),this._provider.enableMorphing=u$Z(e.enableMorphing,!1),this._isTdt=!1,this._inner.swipeEnabled=this._swipeEnabled,this._inner.swipeRegion=this._swipeRegion,this._provider._style3D=this._style3D,this.labelSelected=new o$1h,this._visibleViewport=4095,this._selectedColor=this._provider._selectedColor,this._overlapDisplayedThreshold=this._provider._overlapDisplayedThreshold,this._billboardCollectionPool=new BillboardCollectionPool(e,this),this._provider._billboardCollectionPool=this._billboardCollectionPool}_0x3e5512(),Object.defineProperties(BillboardCollectionPool.prototype,{showCallout:{get:function(){return!1},set:function(e){}},swipeRegion:{get:function(){return!1},set:function(e){}},swipeEnabled:{get:function(){return!1},set:function(e){}}}),BillboardCollectionPool.prototype.pushBack=function(e){let t=this._use.indexOf(e);-1!=t&&(this._use.splice(t,1),this._unUse.push(e))},BillboardCollectionPool.prototype.getOne=function(){let e;return this._unUse.length>0?(e=this._unUse[0],this._unUse.splice(0,1),this._use.push(e),e):(e=new w$O({scene:this._scene,style3D:this._owner._style3D,isMVT:!0,swipeEnabled:this._owner._swipeEnabled,swipeRegion:this._owner._swipeRegion,billboardMode:this._owner._billboardMode,depthTestEnable:!1}),e.showCallout=this._showCallout,this._use.push(e),e)},BillboardCollectionPool.prototype.setVisibleInViewport=function(e,t){},BillboardCollectionPool.prototype.getVisibleInViewport=function(e){return 0},BillboardCollectionPool.prototype.destroy=function(){for(var e=0;e<this._use.length;e++)this._use[e].destroy();for(e=0;e<this._unUse.length;e++)this._unUse[e].destroy();this._use=[],this._unUse=[]},Object.defineProperties(i$P.prototype,{detailLevelOffset:{get:function(){return this._inner._detailLevelOffset},set:function(e){e$2e(e)&&"number"==typeof e&&(this._inner._detailLevelOffset=e)}},tileWidth:{get:function(){return this._provider._tileWidth}},tileHeight:{get:function(){return this._provider._tileHeight}},maximumLevel:{get:function(){return this._provider._ready?this._provider._maximumLevel:-1}},minimumLevel:{get:function(){return this._provider._ready?this._provider._minimumLevel:-1}},tilingScheme:{get:function(){return this._provider._tilingScheme}},rectangle:{get:function(){return this._provider._ready?this._provider._rectangle:null}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._provider._errorEvent}},ready:{get:function(){return this._provider._ready}},readyPromise:{get:function(){return this._provider.readyPromise}},hasAlphaChannel:{get:function(){return!0}},show:{get:function(){return this._inner.show},set:function(e){this._inner.show=e}},mapboxStyle:{get:function(){return this._provider instanceof M$S?this._provider._MVTStyle.serialize():this._provider.mapboxStyle},set:function(e){this._provider.mapboxStyle=e}},alpha:{get:function(){return this._inner.alpha},set:function(e){o$1q.defined("alpha",e),o$1q.typeOf.number("alpha",e),this._inner.alpha=e$2d.clamp(e,0,1)}},selectedColor:{get:function(){return this._provider._selectedColor},set:function(e){e instanceof e$1X&&(this._provider._selectedColor=e)}},overlapDisplayedThreshold:{get:function(){return this._provider._overlapDisplayedThreshold},set:function(e){o$1q.typeOf.number("vectortilesmap overlapDisplayedThreshold",e),this._provider._overlapDisplayedThreshold=e}},name:{get:function(){return this._name},set:function(e){this._name=e}},pausing:{get:function(){return this._inner._pausing},set:function(e){this._inner._pausing=e,this._provider._pausing=e}},indexedDBSetting:{get:function(){return this._provider._indexedDBSetting},set:function(e){e$2e(e)&&"boolean"==typeof e.isOpen&&(this._provider._indexedDBSetting.isOpen=e.isOpen)}},layerConfig:{get:function(){return this._layerConfig}},selectEnabled:{get:function(){return this._selectEnabled},set:function(e){this._selectEnabled=e,this._provider._selectEnabled=e}},showCallout:{get:function(){return this._showCallout},set:function(e){this._billboardCollectionPool.showCallout=e}},style3D:{get:function(){return this._style3D},set:function(e){this._style3D=e,this._provider._style3D=this._style3D,this._billboardCollectionPool.style3D=this._style3D}},globalLineWidthExpand:{get:function(){return 0},set:function(e){}},globalLineWidthScale:{get:function(){return this._provider.globalLineWidthScale},set:function(e){e<=0&&(e=.01),e>100&&(e=100),this._provider.globalLineWidthScale=e}},lineAntialiasing:{get:function(){return this._provider.lineAntialiasing},set:function(e){this._provider.lineAntialiasing=e}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(e$2e(e)&&e instanceof f$1a))throw new t$15("Expected VectorTilesMap.swipeRegion to be type of BoundingRectangle.");f$1a.equals(e,this._swipeRegion)||(f$1a.clone(e,this._swipeRegion),this._billboardCollectionPool.swipeRegion=this._swipeRegion,this._inner.swipeRegion=this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){o$1q.typeOf.bool("VectorTilesMap.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e,this._billboardCollectionPool.swipeEnabled=e,this._inner.swipeEnabled=this._swipeEnabled)}},isOverlapDisplayed:{get:function(){return this._provider.isOverlapDisplayed},set:function(e){this._provider.isOverlapDisplayed=e}},enableMorphing:{get:function(){return this._provider.enableMorphing},set:function(e){this._provider.enableMorphing=e}},queryTolerance:{get:function(){return this._provider.selectTolerance},set:function(e){this._provider.selectTolerance=e}},imageryLayer:{get:function(){return this._inner}}}),i$P.prototype.addLayer=function(e,t,i){this._provider._MVTStyle.addLayer(e,t,i)},i$P.prototype.removeLayer=function(e){this._provider._MVTStyle.removeLayer(e)},i$P.prototype.setFilter=function(e,t,i){if(!0===i){var n=[],r=this._provider._viewer.scene.camera.computeViewRectangle();if(e$2e(r)){var o=h$18.southwest(r),a=h$18.southeast(r),s=h$18.northeast(r),l=h$18.northwest(r);n=this._provider.queryRenderedFeatures([o,a,s,l],{layers:[e.replace(/(.*)(_highlight)/,"$1")]});for(var u=["in","$id"],c=(t=_0x51a3ff.createFilter(t),0);c<n.length;c++){var h=n[c].feature;t(new _0x47eac1(0),h)&&u.push(h.id)}this.setFilter(e,u)}}else this._provider._currentPickID=void 0,this._provider._MVTStyle.setFilter(e,t)},i$P.prototype.getFilter=function(e){return this._provider._MVTStyle.getFilter(e)},i$P.prototype.setLayoutProperty=function(e,t,i,n){this._provider._MVTStyle.setLayoutProperty(e,t,i,n)},i$P.prototype.getLayoutProperty=function(e,t){return this._provider._MVTStyle.getLayoutProperty(e,t)},i$P.prototype.setPaintProperty=function(e,t,i,n){this._provider._MVTStyle.setPaintProperty(e,t,i,n)},i$P.prototype.getPaintProperty=function(e,t){return this._provider._MVTStyle.getPaintProperty(e,t)},i$P.prototype.queryRenderedFeatures=function(e,t){for(var i=[],n=0,r=e.length;n<r;n++){var o=e[n],a=a$18.fromCartesian(o);i.push(a)}return this._provider.queryRenderedFeatures(i,t)},i$P.prototype.querySourceFeatures=function(e){return this._provider.querySourceFeatures(e)},i$P.prototype.update=function(e,t){},i$P.prototype.getProperty=function(e){return this._provider.getProperty(e)},i$P.prototype.setVisibleInViewport=function(e,t){e$2e(this._inner)&&this._inner.setVisibleInViewport(e,t),this._billboardCollectionPool.setVisibleInViewport(e,t)},i$P.prototype.getVisibleInViewport=function(e){e$2e(this._inner)&&this._inner.getVisibleInViewport(e),this._billboardCollectionPool.getVisibleInViewport(e)},i$P.prototype.refresh=function(){var e=this._inner._imageryCache;for(var t in e)e[t].isRendered=!1;for(var i of(this._imagelayerCollection.remove(this._inner,!0,!0),this._inner=this._imagelayerCollection.addImageryProvider(this._provider),this._provider.innerLayer=this._inner,this._provider._viewer.scene.layers.layerQueue))i._imageryLayer===this&&(i._removeCoverImageryLayer(),i.coverImageryLayer=this)},i$P.prototype.isDestroyed=function(){return!1},i$P.prototype.destroy=function(){return this._provider._billboardCollectionPool=null,e$2e(this._billboardCollectionPool)&&(this._billboardCollectionPool.destroy(),this._billboardCollectionPool=null),this._imagelayerCollection.remove(this._inner,!0,!0),i$11(this)},i$P.prototype.releaseSelection=function(){this._provider._MVTStyle.cancelHighLight(this._provider)};var ce$q=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],ve$p=["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"],he$p=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"],Te$k=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],Ae$o=["#text"],_e$p=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],q$U=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"],ge$o=["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"],M$R=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"];function o$Q(e,t){for(var i=t.length;i--;)"string"==typeof t[i]&&(t[i]=t[i].toLowerCase()),e[t[i]]=!0;return e}function ye$m(e){var t={},i=void 0;for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}var We$h=/\{\{[\s\S]*|[\s\S]*\}\}/gm,Be$i=/<%[\s\S]*|[\s\S]*%>/gm,Ge$d=/^data-[\-\w.\u00B7-\uFFFF]/,$e$b=/^aria-[\-\w]+$/,qe$c=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,Ve$e=/^(?:\w+script|data):/i,Xe$a=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,x$U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function c$P(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var Ye$d=function(){return typeof window>"u"?null:window};function Ee$l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ye$d(),t=function(e){return Ee$l(e)};if(t.version="1.0.8",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var i=e.document,n=!1,r=!1,o=e.document,a=e.DocumentFragment,s=e.HTMLTemplateElement,l=e.Node,u=e.NodeFilter,c=e.NamedNodeMap,h=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,d=e.Text,f=e.Comment,p=e.DOMParser;if("function"==typeof s){var _=o.createElement("template");_.content&&_.content.ownerDocument&&(o=_.content.ownerDocument)}var m=o,g=m.implementation,x=m.createNodeIterator,y=m.getElementsByTagName,v=m.createDocumentFragment,$=i.importNode,b={};t.isSupported=g&&typeof g.createHTMLDocument<"u"&&9!==o.documentMode;var T=We$h,C=Be$i,S=Ge$d,w=$e$b,E=Ve$e,P=Xe$a,A=qe$c,L=null,M=o$Q({},[].concat(c$P(ce$q),c$P(ve$p),c$P(he$p),c$P(Te$k),c$P(Ae$o))),R=null,O=o$Q({},[].concat(c$P(_e$p),c$P(q$U),c$P(ge$o),c$P(M$R))),D=null,I=null,F=!0,B=!0,N=!1,G=!1,z=!1,U=!1,V=!1,k=!1,W=!1,H=!1,q=!1,j=!0,X=!0,Y=!1,Z={},K=o$Q({},["audio","head","math","script","style","template","svg","video"]),Q=o$Q({},["audio","video","img","source","image"]),J=o$Q({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ee=null,te=o.createElement("form"),ie=function(e){"object"!==(typeof e>"u"?"undefined":x$U(e))&&(e={}),L="ALLOWED_TAGS"in e?o$Q({},e.ALLOWED_TAGS):M,R="ALLOWED_ATTR"in e?o$Q({},e.ALLOWED_ATTR):O,D="FORBID_TAGS"in e?o$Q({},e.FORBID_TAGS):{},I="FORBID_ATTR"in e?o$Q({},e.FORBID_ATTR):{},Z="USE_PROFILES"in e&&e.USE_PROFILES,F=!1!==e.ALLOW_ARIA_ATTR,B=!1!==e.ALLOW_DATA_ATTR,N=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=e.SAFE_FOR_JQUERY||!1,z=e.SAFE_FOR_TEMPLATES||!1,U=e.WHOLE_DOCUMENT||!1,W=e.RETURN_DOM||!1,H=e.RETURN_DOM_FRAGMENT||!1,q=e.RETURN_DOM_IMPORT||!1,k=e.FORCE_BODY||!1,j=!1!==e.SANITIZE_DOM,X=!1!==e.KEEP_CONTENT,Y=e.IN_PLACE||!1,A=e.ALLOWED_URI_REGEXP||A,z&&(B=!1),H&&(W=!0),Z&&(L=o$Q({},[].concat(c$P(Ae$o))),R=[],!0===Z.html&&(o$Q(L,ce$q),o$Q(R,_e$p)),!0===Z.svg&&(o$Q(L,ve$p),o$Q(R,q$U),o$Q(R,M$R)),!0===Z.svgFilters&&(o$Q(L,he$p),o$Q(R,q$U),o$Q(R,M$R)),!0===Z.mathMl&&(o$Q(L,Te$k),o$Q(R,ge$o),o$Q(R,M$R))),e.ADD_TAGS&&(L===M&&(L=ye$m(L)),o$Q(L,e.ADD_TAGS)),e.ADD_ATTR&&(R===O&&(R=ye$m(R)),o$Q(R,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&o$Q(J,e.ADD_URI_SAFE_ATTR),X&&(L["#text"]=!0),U&&o$Q(L,["html","head","body"]),L.table&&o$Q(L,["tbody"]),Object&&"freeze"in Object&&Object.freeze(e),ee=e},ne=function(e){t.removed.push({element:e});try{e.parentNode.removeChild(e)}catch{e.outerHTML=""}},re=function(e,i){try{t.removed.push({attribute:i.getAttributeNode(e),from:i})}catch{t.removed.push({attribute:null,from:i})}i.removeAttribute(e)},oe=function(e){var t=void 0,i=void 0;if(k)e="<remove></remove>"+e;else{var a=e.match(/^[\s]+/);(i=a&&a[0])&&(e=e.slice(i.length))}if(n)try{t=(new p).parseFromString(e,"text/html")}catch{}if(r&&o$Q(D,["title"]),!t||!t.documentElement){var s=(t=g.createHTMLDocument("")).body;s.parentNode.removeChild(s.parentNode.firstElementChild),s.outerHTML=e}return i&&t.body.insertBefore(o.createTextNode(i),t.body.childNodes[0]||null),y.call(t,U?"html":"body")[0]};t.isSupported&&(function(){try{oe('<svg><p><style><img src="</style><img src=x onerror=alert(1)//">').querySelector("svg img")&&(n=!0)}catch{}}(),function(){try{oe("<x/><title></title><img>").querySelector("title").textContent.match(/<\/title/)&&(r=!0)}catch{}}());var ae=function(e){return x.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},se=function(e){return!(e instanceof d||e instanceof f)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute)},le=function(e){return"object"===(typeof l>"u"?"undefined":x$U(l))?e instanceof l:e&&"object"===(typeof e>"u"?"undefined":x$U(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ue=function(e,i,n){!b[e]||b[e].forEach((function(e){e.call(t,i,n,ee)}))},ce=function(e){var i=void 0;if(ue("beforeSanitizeElements",e,null),se(e))return ne(e),!0;var n=e.nodeName.toLowerCase();if(ue("uponSanitizeElement",e,{tagName:n,allowedTags:L}),!L[n]||D[n]){if(X&&!K[n]&&"function"==typeof e.insertAdjacentHTML)try{e.insertAdjacentHTML("AfterEnd",e.innerHTML)}catch{}return ne(e),!0}return G&&!e.firstElementChild&&(!e.content||!e.content.firstElementChild)&&/</g.test(e.textContent)&&(t.removed.push({element:e.cloneNode()}),e.innerHTML?e.innerHTML=e.innerHTML.replace(/</g,"<"):e.innerHTML=e.textContent.replace(/</g,"<")),z&&3===e.nodeType&&(i=(i=(i=e.textContent).replace(T," ")).replace(C," "),e.textContent!==i&&(t.removed.push({element:e.cloneNode()}),e.textContent=i)),ue("afterSanitizeElements",e,null),!1},he=function(e,t,i){if(j&&("id"===t||"name"===t)&&(i in o||i in te))return!1;if(!(z&&(i=i.replace(T," "),i=i.replace(C," ")),B&&S.test(t)||F&&w.test(t))){if(!R[t]||I[t])return!1;if(!J[t]&&!A.test(i.replace(P,""))&&("src"!==t&&"xlink:href"!==t||"script"===e||0!==i.indexOf("data:")||!Q[e])&&(!N||E.test(i.replace(P,"")))&&i)return!1}return!0},de=function(e){var i=void 0,n=void 0,r=void 0,o=void 0,a=void 0;ue("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R};for(a=s.length;a--;){var u=i=s[a],c=u.name,h=u.namespaceURI;if(n=i.value.trim(),r=c.toLowerCase(),l.attrName=r,l.attrValue=n,l.keepAttr=!0,ue("uponSanitizeAttribute",e,l),n=l.attrValue,"name"===r&&"IMG"===e.nodeName&&s.id)o=s.id,s=Array.prototype.slice.apply(s),re("id",e),re(c,e),s.indexOf(o)>a&&e.setAttribute("id",o.value);else{if("INPUT"===e.nodeName&&"type"===r&&"file"===n&&(R[r]||!I[r]))continue;"id"===c&&e.setAttribute(c,""),re(c,e)}if(l.keepAttr){var d=e.nodeName.toLowerCase();if(he(d,r,n))try{h?e.setAttributeNS(h,c,n):e.setAttribute(c,n),t.removed.pop()}catch{}}}ue("afterSanitizeAttributes",e,null)}},fe=function e(t){var i=void 0,n=ae(t);for(ue("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)ue("uponSanitizeShadowNode",i,null),!ce(i)&&(i.content instanceof a&&e(i.content),de(i));ue("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(n,r){var o=void 0,s=void 0,u=void 0,c=void 0,h=void 0;if(n||(n="\x3c!--\x3e"),"string"!=typeof n&&!le(n)){if("function"!=typeof n.toString)throw new TypeError("toString is not a function");if("string"!=typeof(n=n.toString()))throw new TypeError("dirty is not a string, aborting")}if(!t.isSupported){if("object"===x$U(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof n)return e.toStaticHTML(n);if(le(n))return e.toStaticHTML(n.outerHTML)}return n}if(V||ie(r),t.removed=[],!Y)if(n instanceof l)1===(s=(o=oe("\x3c!--\x3e")).ownerDocument.importNode(n,!0)).nodeType&&"BODY"===s.nodeName?o=s:o.appendChild(s);else{if(!W&&!U&&-1===n.indexOf("<"))return n;if(!(o=oe(n)))return W?null:""}o&&k&&ne(o.firstChild);for(var d=ae(Y?n:o);u=d.nextNode();)3===u.nodeType&&u===c||ce(u)||(u.content instanceof a&&fe(u.content),de(u),c=u);if(Y)return n;if(W){if(H)for(h=v.call(o.ownerDocument);o.firstChild;)h.appendChild(o.firstChild);else h=o;return q&&(h=$.call(i,h,!0)),h}return U?o.outerHTML:o.innerHTML},t.setConfig=function(e){ie(e),V=!0},t.clearConfig=function(){ee=null,V=!1},t.isValidAttribute=function(e,t,i){ee||ie({});var n=e.toLowerCase(),r=t.toLowerCase();return he(n,r,i)},t.addHook=function(e,t){"function"==typeof t&&(b[e]=b[e]||[],b[e].push(t))},t.removeHook=function(e){b[e]&&b[e].pop()},t.removeHooks=function(e){b[e]&&(b[e]=[])},t.removeAllHooks=function(){b={}},t}var je$d=Ee$l(),a$J=0,l$U={};function r$U(e,t){o$1q.typeOf.string("html",e);var i,n=e;e$2e(l$U[n])?i=l$U[n]:(i=a$J++,l$U[n]=i),t=u$Z(t,!1),this._id=i,this._html=e,this._showOnScreen=t,this._element=void 0}function f$R(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.typeOf.object("options.clock",e.clock),o$1q.typeOf.object("options.times",e.times),o$1q.typeOf.func("options.requestImageFunction",e.requestImageFunction),o$1q.typeOf.func("options.reloadFunction",e.reloadFunction),this._tileCache={},this._tilesRequestedForInterval=[];var t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}function _$J(e,t,i){return e+"-"+t+"-"+i}function F$S(e){var t=e.split("-");if(3===t.length)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function k$O(e){var t=e._times;if(e$2e(t)){var i=e._clock,n=i.currentTime,r=i.canAnimate&&i.shouldAnimate,o=i.multiplier;if(r||0===o){var a,s=t.indexOf(n);if(!(s<0)){var l=t.get(s);return o>0?(a=a$15.secondsDifference(l.stop,n),++s):(a=a$15.secondsDifference(l.start,n),--s),a/=o,s>=0&&a<=5?t.get(s):void 0}}}}function I$$(e,t,i){var n=e._times.indexOf(i.start),r=e._tileCache,o=r[n];e$2e(o)||(o=r[n]={});var a=t.key;if(e$2e(o[a]))return!0;var s=F$S(a),l=new r$1c({throttle:!0,throttleByServer:!0,type:U$1f.IMAGERY,priorityFunction:t.priorityFunction}),u=e._requestImageFunction(s.x,s.y,s.level,l,i);return!!e$2e(u)&&(o[a]={promise:u,request:l},!0)}function B$M(e){var t;(o$1q.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?t=o$1l.resolve(e):t=t$10.createIfNeeded(e).fetchArrayBuffer();if(e$2e(t))return t.then((function(e){if(e$2e(e))return U$N(e)}))}function U$N(e){var t=new DataView(e),i=0,n=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT,t.getUint32(i,!0),i+=Uint32Array.BYTES_PER_ELEMENT;var r=32===n?V$12.RGBA_DXT5:V$12.RGB_DXT1,o=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var a=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT,t.getUint32(i,!0),i+=Uint32Array.BYTES_PER_ELEMENT;var s=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var l=new Uint8Array(e,i,s),u=nt$b.inflate(l).buffer;return new e$1K(r,o,a,new Uint8Array(u))}Object.defineProperties(r$U.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen}},element:{get:function(){if(!e$2e(this._element)){var e=je$d.sanitize(this._html),t=document.createElement("div");t._creditId=this._id,t.style.display="inline",t.innerHTML=e;for(var i=t.querySelectorAll("a"),n=0;n<i.length;n++)i[n].setAttribute("target","_blank");this._element=t}return this._element}}}),r$U.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e._id===t._id},r$U.prototype.equals=function(e){return r$U.equals(this,e)},r$U.getIonCredit=function(e){var t=e$2e(e.collapsible)&&!e.collapsible,i=new r$U(e.html,t);return i._isIon=-1!==i.html.indexOf("logo.png"),i},r$U.clone=function(e){if(e$2e(e))return new r$U(e.html,e.showOnScreen)},Object.defineProperties(f$R.prototype,{clock:{get:function(){return this._clock},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}}),f$R.prototype.getFromCache=function(e,t,i,n){var r,o=_$J(e,t,i),a=this._tileCache[this._currentIntervalIndex];if(e$2e(a)&&e$2e(a[o])){var s=a[o];r=s.promise.otherwise((function(e){throw n.state=s.request.state,e})),delete a[o]}return r},f$R.prototype.checkApproachingInterval=function(e,t,i,n){var r=_$J(e,t,i),o=this._tilesRequestedForInterval,a=k$O(this),s={key:r,priorityFunction:n.priorityFunction};(!e$2e(a)||!I$$(this,s,a))&&o.push(s),o.length>=512&&o.splice(0,256)},f$R.prototype._clockOnTick=function(e){var t=e.currentTime,i=this._times.indexOf(t),n=this._currentIntervalIndex;if(i!==n){var r=this._tileCache[n];for(var o in r)r.hasOwnProperty(o)&&r[o].request.cancel();return delete this._tileCache[n],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,void this._reloadFunction()}var a=k$O(this);if(e$2e(a))for(var s=this._tilesRequestedForInterval,l=!0;l&&0!==s.length;){var u=s.pop();(l=I$$(this,u,a))||s.push(u)}};var Y$E=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function v$E(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url))throw new t$15("options.url is required.");if(!e$2e(e.layer))throw new t$15("options.layer is required.");if(!e$2e(e.style))throw new t$15("options.style is required.");if(!e$2e(e.tileMatrixSetID))throw new t$15("options.tileMatrixSetID is required.");if(e$2e(e.times)&&!e$2e(e.clock))throw new t$15("options.times was specified, so options.clock is required.");this._baseUrl=e.url;var t=t$10.createIfNeeded(e.url),i=e.style,n=e.tileMatrixSetID;if(t.url.indexOf("{")>=0){var r={style:i,Style:i,TileMatrixSet:n};t.setTemplateValues(r),this._useKvp=!1}else t.setQueryParameters(Y$E),this._useKvp=!0;this._resource=t,this._layer=e.layer,this._style=i,this._tileMatrixSetID=n,this._tileMatrixLabels=e.tileMatrixLabels,this._format=u$Z(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=e$2e(e.tilingScheme)?e.tilingScheme:new c$S({ellipsoid:e.ellipsoid}),this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._minimumLevel=u$Z(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=u$Z(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;var o=this;this._reload=void 0;var a=this._baseUrl;this.tablename=this._layer,new l$14({name:a}).then((function(e){e.checkObjectStoreExit(o.tablename)?o._indexedDBScheduler=e:e.createObjectStore(o.tablename).then((function(){o._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){o._indexedDBScheduler.clear(o.tablename)},cache:[]},e$2e(e.times)&&(this._timeDynamicImagery=new f$R({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,n,r){return D$P(o,e,t,i,n,r)},reloadFunction:function(){e$2e(o._reload)&&o._reload()}})),this._readyPromise=o$1l.resolve(!0);var s=this._tilingScheme.positionToTileXY(h$18.southwest(this._rectangle),this._minimumLevel),l=this._tilingScheme.positionToTileXY(h$18.northeast(this._rectangle),this._minimumLevel);Math.abs(l.x-s.x),Math.abs(l.y-s.y),u$Z(e.limitLevelZeroTilesCount,!0),this._errorEvent=new o$1h;var u=e.credit;this._credit="string"==typeof u?new r$U(u):u,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():e$2e(this._subdomains)&&this._subdomains.length>0?this._subdomains=[this._subdomains]:this._subdomains=["a","b","c"],this._customRequestHeaders=e.customRequestHeaders}function D$P(e,t,i,n,r,o){var a,s=e._tileMatrixLabels,l=e$2e(s)?s[n]:n.toString(),u=e._subdomains,c=e._dimensions,h=e$2e(o)?o.data:void 0;if(e._useKvp){var d={};d.tilematrix=l,d.layer=e._layer,d.style=e._style,d.tilerow=i,d.tilecol=t,d.tilematrixset=e._tileMatrixSetID,d.format=e._format,e$2e(c)&&(d=p$19(d,c)),e$2e(h)&&(d=p$19(d,h)),a=e._resource.getDerivedResource({queryParameters:d,request:r})}else{var f={TileMatrix:l,TileRow:i.toString(),TileCol:t.toString(),s:u[(t+i+n)%u.length]};(a=e._resource.getDerivedResource({request:r})).setTemplateValues(f),e$2e(c)&&a.setTemplateValues(c),e$2e(h)&&a.setTemplateValues(h)}return e$2e(a$O.CREDENTIAL)&&(e$2e(a$O.CREDENTIAL._keymap[e._baseUrl])?a.url=a$O.addTokenWithKey(e._baseUrl,a.url):a.url=a$O.addToken(a.url)),V$J(e,a)}function A$W(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(v$E.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},format:{get:function(){return this._format}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,e$2e(this._reload)&&this._reload())}}}),v$E.prototype.getTileCredits=function(e,t,i){},v$E.prototype.requestImage=function(e,t,i,n){var r,o,a=this._timeDynamicImagery;if(e$2e(a)&&(o=a.currentInterval,r=a.getFromCache(e,t,i,n)),n.quadKey=A$W(e,t,i),!0===this._indexedDBSetting.isOpen&&!e$2e(r)&&!0===n.cacheEnable){if(e$2e(this._indexedDBScheduler)){var s=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2e(s)?s.then((function(e){return e$2e(e)?e:"cacheError"}),(function(e){return"cacheError"})):D$P(this,e,t,i,n,o)}return D$P(this,e,t,i,n,o)}return e$2e(r)||(n.cacheEnable=!1,r=D$P(this,e,t,i,n,o)),e$2e(r)&&e$2e(a)&&a.checkApproachingInterval(e,t,i,n),r},v$E.prototype.pickFeatures=function(e,t,i,n,r){};var j$Q=/\.ktx$/i,F$R=/\.crn$/i,N$J=/\.dxtz$/i;function V$J(e,t){o$1q.defined("url",t);var i=t$10.createIfNeeded(t);return j$Q.test(i.url)?k$W(i):F$R.test(i.url)?a$P(i):N$J.test(i.url)?(e.flipY=!0,B$M(i)):e$2e(e.tileDiscardPolicy)?i.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(e$2e(e._customRequestHeaders)&&(i.headers=p$19(i.headers,e._customRequestHeaders)),!0===e._indexedDBSetting.isOpen?i.fetchBlob():i.fetchImage({preferImageBitmap:!0,flipY:!0}))}var W$S=new i$W("indexedDBWorker"),Ee$k=-1;function h$R(e,t){this._imageryProvider=e,t=u$Z(t,{}),this._alpha=u$Z(t.alpha,u$Z(e.defaultAlpha,1)),this.brightness=u$Z(t.brightness,u$Z(e.defaultBrightness,h$R.DEFAULT_BRIGHTNESS)),this.contrast=u$Z(t.contrast,u$Z(e.defaultContrast,h$R.DEFAULT_CONTRAST)),this.hue=u$Z(t.hue,u$Z(e.defaultHue,h$R.DEFAULT_HUE)),this.saturation=u$Z(t.saturation,u$Z(e.defaultSaturation,h$R.DEFAULT_SATURATION)),this.gamma=u$Z(t.gamma,u$Z(e.defaultGamma,h$R.DEFAULT_GAMMA)),this.transparentBackColor=u$Z(t.transparentBackColor,u$Z(e.defaultTransparentBackColor,h$R.DEFAULT_TRANSPARENTBACKCOLOR)),this.transparentBackColorTolerance=u$Z(t.transparentBackColorTolerance,u$Z(e.defaultTransparentBackColorTolerance,h$R.DEFAULT_TRANSPARENTBACKCOLORTOLERANCE));var i=u$Z(t.splitDirection,u$Z(e.defaultSplit,h$R.DEFAULT_SPLIT)),n=u$Z(t.splitDirection,u$Z(e.defaultSplit,h$R.DEFAULT_SPLIT));this.splitDirection=new o$1o(i,n),this.minificationFilter=u$Z(t.minificationFilter,u$Z(e.defaultMinificationFilter,h$R.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=u$Z(t.magnificationFilter,u$Z(e.defaultMagnificationFilter,h$R.DEFAULT_MAGNIFICATION_FILTER)),this.show=u$Z(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=u$Z(t.rectangle,h$18.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new o$T(n$M.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this._visibleViewport=4095,this.colorToAlpha=t.colorToAlpha,this._selectColor=new e$1X(0,0,1,1),this.colorToAlphaThreshold=u$Z(t.colorToAlphaThreshold,h$R.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD),this._pausing=!1,e$2e(e._indexedDBSetting)?this._indexedDBSetting=e._indexedDBSetting:this._indexedDBSetting={isOpen:!1},this._imageCanvas={},this._swipeRegion=new e$2c(0,0,1,1),this._swipeEnabled=!1,this._lodOffset=0,this._detailLevelOffset=0,this._featherEdgesEnabled=!1,this._minHeight=Number.NEGATIVE_INFINITY,this._maxHeight=1/0,this._inVisibleHeightRange=1,this.enableUpsample=!0,this.enableImageryClip=!1}Object.defineProperties(h$R.prototype,{alpha:{get:function(){return this._alpha},set:function(e){this._alpha!==e&&(this._alpha=e,this._imageryProvider.onAlphaChanged&&this._imageryProvider.onAlphaChanged())}},featherEdgesEnabled:{get:function(){return this._featherEdgesEnabled},set:function(e){e$2e(e)&&"boolean"==typeof e&&(this._featherEdgesEnabled=e)}},lodOffset:{get:function(){return this._lodOffset},set:function(e){e$2e(e)&&"number"==typeof e&&(this._lodOffset=e)}},imageryProvider:{get:function(){return this._imageryProvider}},rectangle:{get:function(){return this._rectangle}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){e$2e(e)&&"boolean"==typeof e.isOpen&&(this._indexedDBSetting.isOpen=e.isOpen)}},swipeRegion:{get:function(){return new f$1a(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2e(e)){if(!(e instanceof f$1a))throw new t$15("swipeRegion must be a instance of BoundingRectangle.");e$2c.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?o$1o.fromElements(0,0,this.splitDirection):e$2c.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e)}},minHeight:{get:function(){return this._minHeight},set:function(e){this._minHeight=e}},maxHeight:{get:function(){return this._maxHeight},set:function(e){return this._maxHeight=e}}}),h$R.DEFAULT_BRIGHTNESS=1,h$R.DEFAULT_CONTRAST=1,h$R.DEFAULT_HUE=0,h$R.DEFAULT_SATURATION=1,h$R.DEFAULT_GAMMA=1,h$R.DEFAULT_TRANSPARENTBACKCOLOR=e$1X.BLACK,h$R.DEFAULT_TRANSPARENTBACKCOLORTOLERANCE=0,h$R.DEFAULT_SPLIT=Xe$d.NONE,h$R.DEFAULT_MINIFICATION_FILTER=tt$i.LINEAR,h$R.DEFAULT_MAGNIFICATION_FILTER=rt$k.LINEAR,h$R.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004,h$R.prototype.isBaseLayer=function(){return this._isBaseLayer&&!e$2e(this._imageryProvider._scales)&&!e$2e(this._imageryProvider._useKvp)},h$R.prototype.isDestroyed=function(){return!1},h$R.prototype.destroy=function(){return i$11(this)};var Ae$n=new h$18,Le$m=new h$18,se$t=new h$18,xe$m=new h$18;function ye$l(e,t,i){if(e$2e(e._imageryProvider._indexedDBScheduler)){var n={blob:i,key:t.quadKey,tablename:e._imageryProvider.tablename,dbname:e._imageryProvider._indexedDBScheduler.dbname};W$S.scheduleTask(n,[])}}function Re$k(e,t,i,n,r){var o=new DataView(e),a=0,s=o.getUint32(a,!0);if(t>s-1||s>256)throw new t$15("pack imagery index invalid");a+=4;var l,u,c=[];for(l=0;l<s;l++)u=o.getUint32(a,!0),c.push(u),a+=4;for(l=0;l<s;l++){if(u=c[l],l===t){if(0===u)return void(!0===i._indexedDBSetting.isOpen&&ye$l(i,n,Ee$k));if(!e$2e(r)){var h=new Uint8Array(e,a,u);return new Uint8Array(h).buffer}return et$e({uint8Array:new Uint8Array(e,a,u),format:r,flipY:!0,layer:i,imagery:n})}a+=u}}h$R.prototype.getViewableRectangle=function(){var e=this._imageryProvider,t=this._rectangle;return e.readyPromise.then((function(){return h$18.intersection(e.rectangle,t)}))},h$R.prototype._createTileImagerySkeletons=function(e,t,i){var n=e.data;if(e$2e(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||e$2e(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;var r=this._imageryProvider;if(e$2e(i)||(i=n.imagery.length),!r.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),n.imagery.splice(i,0,this._skeletonPlaceholder),!0;var o=r.tilingScheme.projection instanceof t$N&&e.rectangle.north<t$N.MaximumLatitude&&e.rectangle.south>-t$N.MaximumLatitude,a=h$18.intersection(r.rectangle,this._rectangle,Ae$n),s=h$18.intersection(e.rectangle,a,Le$m);if(!e$2e(s)){if(!this.isBaseLayer())return!1;var l=a,u=e.rectangle;s=Le$m,u.south>=l.north?s.north=s.south=l.north:u.north<=l.south?s.north=s.south=l.south:(s.south=Math.max(u.south,l.south),s.north=Math.min(u.north,l.north)),u.west>=l.east?s.west=s.east=l.east:u.east<=l.west?s.west=s.east=l.west:(s.west=Math.max(u.west,l.west),s.east=Math.min(u.east,l.east))}var c=0;s.south>0?c=s.south:s.north<0&&(c=s.north);var h=nt$9(this,1*t.getLevelMaximumGeometricError(e.level),c,e$2e(this._imageryProvider.resolution)?this._imageryProvider.resolution:1);h=Math.max(0,h);var d=r.maximumLevel;if(h>d&&(h=d),e$2e(r.minimumLevel)&&!(r instanceof M$S)){var f=r.minimumLevel;h<f&&(h=f)}var p=r.tilingScheme,_=p.positionToTileXY(h$18.northwest(s),h),m=p.positionToTileXY(h$18.southeast(s),h),g=e.rectangle.width/512,x=e.rectangle.height/512,y=p.tileXYToRectangle(_.x,_.y,h);Math.abs(y.south-e.rectangle.north)<x&&_.y<m.y&&++_.y,Math.abs(y.east-e.rectangle.west)<g&&_.x<m.x&&++_.x;var v=p.tileXYToRectangle(m.x,m.y,h);Math.abs(v.north-e.rectangle.south)<x&&m.y>_.y&&--m.y,Math.abs(v.west-e.rectangle.east)<g&&m.x>_.x&&--m.x,y.east<r.rectangle.west&&++_.x,y.south>r.rectangle.north&&++_.y,v.west>r.rectangle.east&&--m.x,v.north<r.rectangle.south&&--m.y;var $,b=h$18.clone(e.rectangle,xe$m),T=p.tileXYToRectangle(_.x,_.y,h),C=h$18.intersection(T,a,se$t);o?(p.rectangleToNativeRectangle(b,b),p.rectangleToNativeRectangle(T,T),p.rectangleToNativeRectangle(C,C),p.rectangleToNativeRectangle(a,a),$=p.tileXYToNativeRectangle.bind(p),g=b.width/512,x=b.height/512):$=p.tileXYToRectangle.bind(p);var S,w,E=0,P=1;!this.isBaseLayer()&&Math.abs(C.west-b.west)>=g&&(E=Math.min(1,(C.west-b.west)/b.width)),!this.isBaseLayer()&&Math.abs(C.north-b.north)>=x&&(P=Math.max(0,(C.north-b.south)/b.height));for(var A=P,L=u$Z(this._imageryProvider.flipY,!1),M=_.x;M<=m.x;M++)if(S=E,T=$(M,_.y,h),e$2e(C=h$18.simpleIntersection(T,a,se$t))){E=Math.min(1,(C.east-b.west)/b.width),M===m.x&&(this.isBaseLayer()||Math.abs(C.east-b.east)<g)&&(E=1),P=A;for(var R=_.y;R<=m.y;R++)if(w=P,T=$(M,R,h),e$2e(C=h$18.simpleIntersection(T,a,se$t))){P=Math.max(0,(C.south-b.south)/b.height),R===m.y&&(this.isBaseLayer()||Math.abs(C.south-b.south)<x)&&(P=0);var O=new e$2c(S,P,E,w),D=this.getImageryFromCache(M,R,h);if(n.imagery.splice(i,0,new o$T(D,O,o,L)),++i,this._imageryProvider.enableMorphing&&e$2e(D.mvtProvider)&&e$2e(D.parent)){var I=new o$T(this.getImageryFromCache(D.parent.x,D.parent.y,D.parent.level),O,o,L);I.morphingAlpha=.9,n.imagery.splice(i,0,I),++i}}}return!0},h$R.prototype._calculateTextureTranslationAndScale=function(e,t){var i=t.readyImagery.rectangle,n=e.rectangle;if(t.useWebMercatorT){var r=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;i=r.rectangleToNativeRectangle(i,Ae$n),n=r.rectangleToNativeRectangle(n,xe$m)}var o=n.width,a=n.height,s=o/i.width,l=a/i.height;return new e$2c(s*(n.west-i.west)/o,l*(n.south-i.south)/a,s,l)};var Je$8=/\.dxtz/i;function be$p(e,t,i){var n=new DataView(e),r=0;n.getUint32(r,!0),r+=4;var o=n.getUint32(r,!0);r+=4;for(var a=t.col,s=t.row*t.blockSize+a,l=0,u=0,c=0;c<o;c++){if(c<s)l+=n.getUint32(r,!0);else if(c===s){u=n.getUint32(r,!0),r+=4;break}r+=4}if(r=8+4*o,0!==u){r+=l;var h=o$1l.defer(),d=t.url;return Je$8.test(d)?h.resolve($e$a(e,r,u)):w$R({uint8Array:new Uint8Array(e,r,u),format:i,flipY:!0})}}function $e$a(e,t,i){var n=new DataView(e,t,i),r=0,o=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var a=32===o?V$12.RGBA_DXT5:V$12.RGB_DXT1,s=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var l=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var u=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var c=new Uint8Array(e,r+t,u),h=nt$b.inflate(c).buffer;return new e$1K(a,s,l,new Uint8Array(h))}function et$e(e){var t=e.uint8Array,i=e.format,n=e.request,r=u$Z(e.flipY,!1),o=e.layer,a=e.imagery;o$1q.typeOf.object("uint8Array",t),o$1q.typeOf.string("format",i);var s,l=new Blob([t],{type:i});return!0===o._indexedDBSetting.isOpen&&ye$l(o,a,l),t$10.supportsImageBitmapOptions().then((function(e){return e?o$1l(t$10.createImageBitmapFromBlob(l,{flipY:r,premultiplyAlpha:!1})):new t$10({url:s=window.URL.createObjectURL(l),request:n}).fetchImage({flipY:r})})).then((function(e){return e$2e(s)&&window.URL.revokeObjectURL(s),e})).otherwise((function(e){return e$2e(s)&&window.URL.revokeObjectURL(s),o$1l.reject(e)}))}function tt$e(e,t){var i=document.createElement("canvas");i.getContext("bitmaprenderer").transferFromImageBitmap(e),i.toBlob(t)}function De$k(e,t){var i=e.slice(0),n=new Int8Array(i);for(var r=t.split("").map((function(e){return e.charCodeAt(0)})),o=0;o<r.length;o++)n[o]=n[o]^r[o];return n.buffer}var rt$f={webp:"image/webp",png:"image/png"};function Ie$i(e,t,i){return e+":"+t+":"+i}function ue$v(e,t,i){return JSON.stringify([e,t,i])}h$R.prototype._requestImagery=function(e){var t=this._imageryProvider,i=this;function n(n){if(!e.isDestroyed()){if(!e$2e(n))return r();if(n===Ee$k)return void(e.state=wt$7.FAILED);if("cacheError"===n)return void o(!1);if(n instanceof ArrayBuffer&&e$2e(t._cacheKey)&&t._cacheKey.length>0&&e.request.type!==U$1f.BLOCK){var a=De$k(n,t._cacheKey);n=e.request.type===U$1f.PACK?a:new Blob([new Uint8Array(a,0,a.byteLength)],{type:t._fileExtension||"image/png"})}if(e.request.type!==U$1f.PACK&&!n.mvt&&e.request.type!==U$1f.BLOCK&&e.request.type!==U$1f.BLOCKPACK){if(n instanceof Blob){if(!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2e(i._imageryProvider._indexedDBScheduler)){e.quadKey=e.request.quadKey;var s={blob:n,key:e.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};W$S.scheduleTask(s,[])}return void t$10.supportsImageBitmapOptions().then((function(t){if(t)t$10.createImageBitmapFromBlob(n,{flipY:!0,premultiplyAlpha:!1}).then((function(t){e.image=t,e.state=wt$7.RECEIVED,e.request=void 0,l$V.handleSuccess(i._requestImageError)}));else{var r=window.URL.createObjectURL(n);t$S(r,!1).then((function(e){return window.URL.revokeObjectURL(r),e}),(function(e){return window.URL.revokeObjectURL(r),o$1l.reject(e)})).then((function(t){e.image=t,e.state=wt$7.RECEIVED,e.request=void 0,l$V.handleSuccess(i._requestImageError)}))}}))}!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2e(i._imageryProvider._indexedDBScheduler)&&(e.quadKey=e.request.quadKey,createImageBitmap(n,{imageOrientation:"flipY",premultiplyAlpha:"none"}).then((function(t){tt$e(t,(function(t){var n={blob:t,key:e.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};W$S.scheduleTask(n,[])}))})))}var l=rt$f[t._fileExtension];if(e.request.type!==U$1f.BLOCKPACK||n.mvt)if(e.request.type!==U$1f.PACK||n.mvt)if(e.request.type===U$1f.BLOCK){if(!e$2e((c=t.blockCache[e.request.quadKey]).data)&&(c.data=n,!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2e(i._imageryProvider._indexedDBScheduler))){s={blob:n.slice(0),key:e.request.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};W$S.scheduleTask(s,[])}t.blockCacheQueue.touch(c),t.blockCacheQueue.trim(t.blockCacheSize),e$2e(t._cacheKey)&&t._cacheKey.length>0&&(n=De$k(n,t._cacheKey)),e$2e(h=be$p(n,e.request.blockInfo,l))||(e.state=wt$7.FAILED),h.then((function(t){e.image=t,e.state=wt$7.RECEIVED})).otherwise((function(t){e.state=wt$7.FAILED}))}else e.image=n,e.state=wt$7.RECEIVED;else{if(n instanceof Blob&&e.request.cacheEnable&&!0===i._indexedDBSetting.isOpen)return void t$10.supportsImageBitmapOptions().then((function(t){if(t)t$10.createImageBitmapFromBlob(n,{flipY:!0,premultiplyAlpha:!1}).then((function(t){e.image=t,e.state=wt$7.RECEIVED,e.request=void 0,l$V.handleSuccess(i._requestImageError)}));else{var r=window.URL.createObjectURL(n);t$S(r,!1).then((function(e){return window.URL.revokeObjectURL(r),e}),(function(e){return window.URL.revokeObjectURL(r),o$1l.reject(e)})).then((function(t){e.image=t,e.state=wt$7.RECEIVED,e.request=void 0,l$V.handleSuccess(i._requestImageError)}))}}));e.quadKey=e.request.quadKey,l=u$Z(l,"image/png");var u=Re$k(n,e.request.quadKeyIndex,i,e,l);if(!e$2e(u))return void(e.state=wt$7.FAILED);u.then((function(t){e.image=t,e.state=wt$7.RECEIVED})).otherwise((function(t){e.state=wt$7.FAILED}))}else if(!e$2e(e.request.quadKeyIndex)&&e$2e(e.request.blockRequest)&&(e.request.quadKeyIndex=e.request.blockRequest.quadKeyIndex),e$2e(e.request.quadKeyIndex)&&(n=Re$k(n,e.request.quadKeyIndex,i,e)),e$2e(n)){var c,h;if(!e$2e(c=t.blockCache[e.request.quadKey])&&(c=new e$1e(t,e.request.quadKey,n),t.blockCache[e.request.quadKey]=c,!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2e(i._imageryProvider._indexedDBScheduler))){var s={blob:n.slice(0),key:e.request.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:5};W$S.scheduleTask(s,[])}t.blockCacheQueue.touch(c),t.blockCacheQueue.trim(t.blockCacheSize),e$2e(h=be$p(n,e.request.blockInfo,l))||(e.state=wt$7.FAILED),h.then((function(t){e.image=t,e.state=wt$7.RECEIVED})).otherwise((function(t){e.state=wt$7.FAILED}))}else e.state=wt$7.FAILED;e.request=void 0,l$V.handleSuccess(i._requestImageError)}}function r(n){if(!e.isDestroyed()){if(e.request.state===W$1c.CANCELLED)return e.state=wt$7.UNLOADED,void(e.request=void 0);e.state=wt$7.FAILED,e.request=void 0;var r="Failed to obtain image tile X: "+e.x+" Y: "+e.y+" Level: "+e.level+".";i._requestImageError=l$V.handleError(i._requestImageError,t,t.errorEvent,r,e.x,e.y,e.level,o,n)}}function o(i){var o=new r$1c({throttle:!1,throttleByServer:!0,type:U$1f.IMAGERY});o.cacheEnable=i,e.request=o,e.state=wt$7.TRANSITIONING;var a=t.requestImage(e.x,e.y,e.level,o,e.rectangle,e);if(!e$2e(a))return e.state=wt$7.UNLOADED,void(e.request=void 0);e$2e(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),e.beginRequestTime=performance.now(),o$1l(a,n,r)}o(!0)},h$R.prototype._createTextureWebGL=function(e,t){var i=new e$1S({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),n=t.image;return e$2e(n.internalFormat)?new t$U({context:e,pixelFormat:n.internalFormat,width:n.width,height:n.height,source:{arrayBufferView:n.bufferView},sampler:i}):e$2e(n.mvt)?n.colorTexture:new t$U({context:e,source:n,pixelFormat:this._imageryProvider.hasAlphaChannel?V$12.RGBA:V$12.RGB,sampler:i})},h$R.prototype._createTexture=function(e,t,i){var n=this._imageryProvider,r=t.image;if(e$2e(n.tileDiscardPolicy)){var o=n.tileDiscardPolicy;if(e$2e(o)){if(!o.isReady())return void(t.state=wt$7.RECEIVED);if(o.shouldDiscardImage(r))return void(t.state=wt$7.INVALID)}}if(this.minificationFilter!==tt$i.NEAREST&&this.minificationFilter!==tt$i.LINEAR)throw new t$15("ImageryLayer minification filter must be NEAREST or LINEAR");var a=this._createTextureWebGL(e,t);e$2e(r.mvt)&&(t.isMvtTexture=!0,t.iconImageObjects=r.iconImageObjects,t.textObjects=r.textObjects,t.tile=r.tile,t.transform=r.transform,t.isRendered=!1),n.tilingScheme.projection instanceof t$N?t.textureWebMercator=a:t.texture=a,t.image=void 0,t.state=wt$7.TEXTURE_LOADED},h$R.prototype._finalizeReprojectTexture=function(e,t){var i=this.minificationFilter,n=this.magnificationFilter;if(i===tt$i.LINEAR&&n===rt$k.LINEAR&&!V$12.isCompressedFormat(t.pixelFormat)&&e$2d.isPowerOfTwo(t.width)&&e$2d.isPowerOfTwo(t.height)){i=tt$i.LINEAR_MIPMAP_LINEAR;var r=e$1W.maximumTextureFilterAnisotropy,o=Math.min(r,u$Z(this._maximumAnisotropy,r)),a=Ie$i(i,n,o),s=e.cache.imageryLayerMipmapSamplers;e$2e(s)||(s={},e.cache.imageryLayerMipmapSamplers=s);var l=s[a];e$2e(l)||(l=s[a]=new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n,maximumAnisotropy:o})),t.generateMipmap(I$1e.NICEST),t.sampler=l,t.samplerKey=a}else{var u=Ie$i(i,n,0),c=e.cache.imageryLayerNonMipmapSamplers;e$2e(c)||(c={},e.cache.imageryLayerNonMipmapSamplers=c);var h=c[u];e$2e(h)||(h=c[u]=new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n})),t.sampler=h,t.samplerKey=u}},h$R.prototype._reprojectTexture=function(e,t,i){var n=t.textureWebMercator||t.texture,r=t.rectangle,o=e.context;if((i=u$Z(i,!0))&&!(this._imageryProvider.tilingScheme.projection instanceof n$1d)&&r.width/n.width>1e-5){var a=this;t.addReference();var s=new t$H({name:"imageReprojectTexture",persists:!0,owner:this,preExecute:function(e){at$b(e,o,n,t.rectangle)},postExecute:function(e){o.webgpu&&o.engine.flushFramebuffer(),t.texture=e,a._finalizeReprojectTexture(o,e),t.state=wt$7.READY,t.releaseReference()}});this._reprojectComputeCommands.push(s)}else i&&(t.texture=n),this._finalizeReprojectTexture(o,n),t.state=wt$7.READY},h$R.prototype.queueReprojectionCommands=function(e){for(var t=this._reprojectComputeCommands,i=t.length,n=0;n<i;++n)e.commandList.push(t[n]);t.length=0},h$R.prototype.cancelReprojections=function(){this._reprojectComputeCommands.length=0},h$R.prototype.getImageryFromCache=function(e,t,i,n){var r=ue$v(e,t,i),o=this._imageryCache[r];return e$2e(o)||(o=this._imageryProvider instanceof M$S?new _0x2415f5(this,e,t,i,n):new n$M(this,e,t,i,n),this._imageryCache[r]=o),o.addReference(),o},h$R.prototype.getReadyImageryFromCache=function(e,t,i){for(var n=void 0,r=i;r>0&&!e$2e(n);){r--;var o=ue$v(e,t,i);e$2e(n=this._imageryCache[o])&&n.state!=wt$7.READY&&(n=void 0)}return n},h$R.prototype.removeImageryFromCache=function(e){var t=ue$v(e.x,e.y,e.level);delete this._imageryCache[t]};var te$y={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new o$1o,texture:void 0},it$9=s$Z.supportsTypedArrays()?new Float32Array(128):void 0;function at$b(e,t,i,n){var r=t.cache.imageryLayer_reproject;if(!e$2e(r)){r=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){e$2e(this.framebuffer)&&this.framebuffer.destroy(),e$2e(this.vertexArray)&&this.vertexArray.destroy(),e$2e(this.shaderProgram)&&this.shaderProgram.destroy()}};for(var o=new Float32Array(256),a=0,s=0;s<64;++s){var l=s/63;o[a++]=0,o[a++]=l,o[a++]=1,o[a++]=l}var u={position:0,webMercatorT:1},c=I$12.getRegularGridIndicesForReproject(2,64),h=t$X.createIndexBuffer({context:t,typedArray:c,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});r.vertexArray=new c$13({context:t,attributes:[{name:"position",index:u.position,vertexBuffer:t$X.createVertexBuffer({context:t,typedArray:o,usage:A$18.STATIC_DRAW}),componentsPerAttribute:2},{name:"webMercatorT",index:u.webMercatorT,vertexBuffer:t$X.createVertexBuffer({context:t,sizeInBytes:512,usage:A$18.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:h});var d=new s$V({sources:[je$g]});r.shaderProgram=r$14.fromCache({name:"ReprojectWebMercator",context:t,vertexShaderSource:d,fragmentShaderSource:Ve$i,attributeLocations:u}),r.sampler=new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}i.sampler=r.sampler;var f=i.width,p=i.height;te$y.textureDimensions.x=f,te$y.textureDimensions.y=p,te$y.texture=i;var _=Math.sin(n.south),m=.5*Math.log((1+_)/(1-_));_=Math.sin(n.north);var g=1/(.5*Math.log((1+_)/(1-_))-m),x=new t$U({context:t,width:f,height:p,pixelFormat:t.webgpu&&i.pixelFormat===V$12.RGB?V$12.RGBA:i.pixelFormat,pixelDatatype:i.pixelDatatype,preMultiplyAlpha:i.preMultiplyAlpha,generateMipmap:e$2d.isPowerOfTwo(f)&&e$2d.isPowerOfTwo(p)});e$2d.isPowerOfTwo(f)&&e$2d.isPowerOfTwo(p)&&x.generateMipmap(I$1e.NICEST);for(var y=n.south,v=n.north,$=it$9,b=0,T=0;T<64;++T){var C=T/63,S=e$2d.lerp(y,v,C);_=Math.sin(S);var w=(.5*Math.log((1+_)/(1-_))-m)*g;$[b++]=w,$[b++]=w}r.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView($),e.shaderProgram=r.shaderProgram,e.outputTexture=x,e.uniformMap=te$y,e.vertexArray=r.vertexArray}function nt$9(e,t,i,n){var r=e._imageryProvider,o=r.tilingScheme,a=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof n$1d?1:Math.cos(i),l=o.rectangle,u=o.getNumberOfXTilesAtLevel(0);e$2e(o._suggest)&&o._suggest?u=o._numberOfLevelZeroTilesX:0!==e._lodOffset&&(e._lodOffset>0?u/=1<<Math.floor(e._lodOffset):u*=1<<Math.floor(-e._lodOffset));var c=l.width,h=a.maximumRadius*c*s/(r.tileWidth*u/n);if(e$2e(o._scaleDenominators)&&o._scaleDenominators.length>0){var d;d=o.tileXYToRectangle(0,0,0,d);var f=o.getNumberOfXTilesAtLevel(0)*d.width;h=a.maximumRadius*c*s/(c/f*r.tileWidth*u/n)}var p=h/t,_=Math.log(p)/Math.log(2);return 0|Math.round(_)}h$R.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},h$R.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},h$R.prototype.saveLocalCache=function(){if(!0===this._indexedDBSetting.isOpen&&e$2e(this._imageryProvider._indexedDBScheduler)){var e={tablename:this._imageryProvider.tablename,dbname:this._imageryProvider._indexedDBScheduler.dbname};W$S.scheduleTask(e,[])}};var L$X=void 0,b$Z=void 0;h$R.prototype.getImagery=function(e,t){var i=1;e$2e(t)&&(i<<=t);var n=[],r=this._imageryProvider;if(e$2e(b$Z)||(b$Z=new h$18),!e$2e(e)||(b$Z.west=e.min.longitude,b$Z.south=e.min.latitude,b$Z.east=e.max.longitude,b$Z.north=e.max.latitude,!e$2e(h$18.intersection(r.rectangle,b$Z))))return n;var o,a,s=0,l=23;for(e$2e(r._maximumLevel)&&(l=r._maximumLevel);s<=l&&(o=r._tilingScheme.positionToTileXY(e.max,s),a=r._tilingScheme.positionToTileXY(e.min,s),e$2e(o)||(o=new o$1o(r._tilingScheme.getNumberOfXTilesAtLevel(s),0)),e$2e(a)||(a=new o$1o(0,r._tilingScheme.getNumberOfYTilesAtLevel(s))),s!==l&&(e$2e(L$X)||(L$X=new h$18),r._tilingScheme.tileXYToRectangle(a.x,a.y,s,L$X),!e$2e(L$X)||!(L$X.width*i<2*(e.max.longitude-e.min.longitude)||L$X.height*i<2*(e.max.latitude-e.min.latitude))));s++);for(var u=a.x;u<=o.x;u++)for(var c=a.y;c>=o.y;c--)e$2e(L$X)||(L$X=new h$18),r._tilingScheme.tileXYToRectangle(u,c,s,L$X),e$2e(h$18.intersection(L$X,r.rectangle))&&e$2e(h$18.intersection(L$X,b$Z))&&n.push(this.getImageryFromCache(u,c,s));return n},h$R.prototype.getMaxScaleLevel=function(e){var t=1,i=0,n=this._imageryProvider;if(e$2e(b$Z)||(b$Z=new h$18),b$Z.west=e.min.longitude,b$Z.south=e.min.latitude,b$Z.east=e.max.longitude,b$Z.north=e.max.latitude,!e$2e(h$18.intersection(n.rectangle,b$Z)))return[];var r,o,a=0,s=23;for(e$2e(n._maximumLevel)&&(s=n._maximumLevel);a<=s&&(r=n._tilingScheme.positionToTileXY(e.max,a),o=n._tilingScheme.positionToTileXY(e.min,a),e$2e(r)||(r=new o$1o(n._tilingScheme.getNumberOfXTilesAtLevel(a),0)),e$2e(o)||(o=new o$1o(0,n._tilingScheme.getNumberOfYTilesAtLevel(a))),a!==s);a++)e$2e(L$X)||(L$X=new h$18),n._tilingScheme.tileXYToRectangle(o.x,o.y,a,L$X),e$2e(L$X)&&(L$X.width*t<2*(e.max.longitude-e.min.longitude)||L$X.height*t<2*(e.max.latitude-e.min.latitude))&&(i+=1,t*=2);return i},h$R.prototype.refresh=function(){var e=this._imageryLayers;if(e$2e(e)){for(var t in this._imageryCache){var i=this._imageryCache[t];this.removeImageryFromCache(i)}var n=e.indexOf(this);e.remove(this,!1,!0),e.add(this,n)}},h$R.prototype.setLayerStatusParameters=function(e){var t=o$1l.defer();return this._imageryProvider.setLayerStatusParameters(e).then((e=>{this.refresh(),t.resolve(e)})).otherwise((e=>{t.reject(e)})),t.promise};var _0x335aae=(_0x21ead8=!0,function(e,t){var i=_0x21ead8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x21ead8=!1,i}),_0x55d25e=_0x335aae(void 0,(function(){return _0x55d25e.toString().search("(((.+)+)+)+$").toString().constructor(_0x55d25e).search("(((.+)+)+)+$")})),_0x21ead8;_0x55d25e();var _0x5258fa=null,_0x393f86=null;function _0x46f77a(){}null!==_0x3c481f&&(_0x5258fa=_0x3c481f.cwrap("floatToTextureColor","number",["number","number","number","number","number","number","number"]),_0x393f86=_0x3c481f.cwrap("free_result",null,["number"]));var _0x3ab573=new s$T;function _0x53e3f1(e,t){for(var i=new Uint8Array(4*e.length),n=t._ceiling-t._floor,r=0,o=e.length;r<o;r++){var a=e[r],s=4*r;if(a<0||a>1)i[s+0]=255,i[s+1]=255,i[s+2]=255,i[s+3]=255;else{a=a*n+t._floor;var l=t._dictColorTable.getColor(a);i[s+0]=255*l.red,i[s+1]=255*l.green,i[s+2]=255*l.blue,i[s+3]=255*l.alpha}}return i}function _0x3637eb(e,t){var i=e,n=i.length,r=_0x3c481f._malloc(Float32Array.BYTES_PER_ELEMENT*n);_0x3c481f.HEAPF32.set(i,r/Float32Array.BYTES_PER_ELEMENT);var o=t._ceiling,a=t._floor,s=t._dictColorTable._dictTable._hash,l=[],u=[];for(var c in s)l.push(parseFloat(c));l.sort((function(e,t){return e-t}));for(var h=0,d=l.length;h<d;h++)u.push(s[l[h]]);var f=new ArrayBuffer(4*l.length),p=new Uint8Array(f),_=0;for(d=l.length;_<d;_++){var m=u[_];p[4*_]=255*m.red,p[4*_+1]=255*m.green,p[4*_+2]=255*m.blue,p[4*_+3]=255*m.alpha}var g=new Float32Array(f),x=(c=new Float32Array(l)).length,y=_0x3c481f._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x3c481f.HEAPF32.set(c,y/Float32Array.BYTES_PER_ELEMENT);var v=_0x3c481f._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x3c481f.HEAPF32.set(g,v/Float32Array.BYTES_PER_ELEMENT);var $=_0x5258fa(r,n,o,a,y,v,x),b=new Uint8Array(_0x3c481f.HEAPU8.buffer,$,4*n);return _0x393f86($),_0x3c481f._free(r),_0x3c481f._free(y),_0x3c481f._free(v),b}function _0x39510f(e,t){var i=e.length/4;return _0x3637eb(new Float32Array(e.buffer,e.byteOffset,i),t)}function _0x4212ce(e,t){for(var i=e.length/4,n=new Float32Array(e.buffer,e.byteOffset,i),r=0;r<n.length;r++){var o=n[r],a=4*r;if(o<0||o>1)e[a+0]=255,e[a+1]=255,e[a+2]=255,e[a+3]=255;else{o=o*(t._ceiling-t._floor)+t._floor;var s=t._dictColorTable.getColor(o);e[a+0]=255*s.red,e[a+1]=255*s.green,e[a+2]=255*s.blue,e[a+3]=255*s.alpha}}return new Uint8Array(e.buffer,0,e.length)}function _0x28d8f1(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function _0x36c972(e,t,i){for(var n=new Uint8Array(4*e.length),r=0;r<e.length;r++){var o,a,s,l,u=e[r],c=4*r,h=new e$2c(0,0,0,0);if(u>=0&&u<=1){var d=_0x28d8f1(u);h.x=d.x,h.y=d.y,h.z=d.z,h.w=1}o=255*h.x,a=255*h.y,s=255*h.z,l=255*h.w,e$2e(i)&&!0===i?(n[c+0]=parseInt(s),n[c+1]=parseInt(a),n[c+2]=parseInt(o),n[c+3]=parseInt(l)):(n[c+0]=parseInt(o),n[c+1]=parseInt(a),n[c+2]=parseInt(s),n[c+3]=parseInt(l))}return n}function _0xc4b138(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a,s,l,u,c=r[o],h=4*o,d=new e$2c(0,0,0,0);if(c>=0&&c<=1){c<e$2d.EPSILON9?c=e$2d.EPSILON9:1-c<e$2d.EPSILON9&&(c=1-e$2d.EPSILON9);var f=_0x28d8f1(c);d.x=f.x,d.y=f.y,d.z=f.z,d.w=1}a=255*d.x,s=255*d.y,l=255*d.z,u=255*d.w,e$2e(i)&&!0===i?(e[h+0]=l,e[h+1]=s,e[h+2]=a,e[h+3]=u):(e[h+0]=a,e[h+1]=s,e[h+2]=l,e[h+3]=u)}return new Uint8Array(e.buffer,0,e.length)}function _0x331de8(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(e$2e(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function _0x5972bf(e,t,i){if(!e$2e(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];e$2e(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function _0x22be74(e,t,i){var n=_0x331de8(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function _0x32cd4c(e,t,i){var n=_0x331de8(e,t,i);if(e$2e(n))return n.textContent.trim()}function _0x1a3be2(e,t,i){var n=_0x331de8(e,t,i);if(e$2e(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function _0x8415d6(e,t,i,n){var r=p$1d.multiply(t,i,new p$1d),o=e.vertexAttributes[0],a=o.typedArray,s=new Float32Array(a.buffer,a.byteOffset,a.byteLength/4),l=o.componentsPerAttribute,u=e.verticesCount,c=new Float32Array(3*u),h=e.attrLocation;h.aRatio=Object.keys(h).length;for(var d=0;d<u;d++){var f=new o$1p(s[d*l],s[d*l+1],s[d*l+2]),p=new o$1p;p$1d.multiplyByPoint(r,f,p);var _=a$18.fromCartesian(p),m=e$2d.toDegrees(_.longitude),g=e$2d.toDegrees(_.latitude),x=_.height,y=(m-n.left)/n.width,v=(g-n.bottom)/n.length,$=(x-n.minHeight)/n.height;c[3*d]=y,c[3*d+1]=v,c[3*d+2]=$}e.vertexAttributes.push({index:h.aRatio,typedArray:c,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0x1347ff(e,t){for(var i=[],n=Math.max(t.max.longitude-t.min.longitude,t.max.latitude-t.min.latitude),r=0,o=Math.PI;r<23&&!(n>o);)o*=.5,r++;r--;var a=e,s=a._imageryProvider;e instanceof i$P&&(s=a._provider,a=a._inner);var l=new g$15,u=l.positionToTileXY(t.max,r),c=l.positionToTileXY(t.min,r);if(!e$2e(s._minimumLevel)||r>s._minimumLevel){var h=s._maximumLevel;if(e instanceof i$P&&h--,e$2e(h)){var d=r-h;d>0&&(c.x=Math.floor(c.x/Math.pow(2,d)),c.y=Math.floor(c.y/Math.pow(2,d)),u.x=Math.floor(u.x/Math.pow(2,d)),u.y=Math.floor(u.y/Math.pow(2,d)),r=h)}for(var f=c.x;f<=u.x;f++)for(var p=c.y;p>=u.y;p--)i.push(a.getImageryFromCache(f,p,r))}return i}_0x46f77a.convertFloat=function(e,t,i){i===k$S.FilterMode.NEAREST?null===_0x5258fa?_0x4212ce(e.imageArray,t):e.imageArray=_0x39510f(e.imageArray,t):_0xc4b138(e.imageArray)},_0x46f77a.convertFloatTexture=function(e,t,i){return i===k$S.FilterMode.LINEAR?_0x36c972(e.imageArray,t,!0):null===_0x5258fa?_0x53e3f1(e.imageArray,t):_0x3637eb(e.imageArray,t)},_0x46f77a.parseResult=function(e,t,i,n){if(i.isDestroyed())return i.s3mBuffer=null,i.volBuffer=null,void(i.task=void 0);var r=i._fileName.split("_"),o=parseInt(r[1]),a=parseInt(r[2]);o=Math.pow(2,t._level)-o-1,t._version=e.version;for(var s=t._gl,l=_0x3ab573.read(e.xmlDoc).firstChild,u=l.namespaceURI,c=_0x5972bf(_0x331de8(l,"Material3Ds",u),"material",u),h={},d=[],f=t._context,p=0,_=c.length;p<_;p++){var m=c[p],g=_0x32cd4c(m,"name",u),x=new _0xf77618({});h[g]=x;var y=_0x331de8(m,"Ambient",u),v=u$Z(_0x22be74(y,"AmbientR",u),_0x22be74(y,"R",u)),$=u$Z(_0x22be74(y,"AmbientG",u),_0x22be74(y,"G",u)),b=u$Z(_0x22be74(y,"AmbientB",u),_0x22be74(y,"B",u)),T=u$Z(_0x22be74(y,"AmbientA",u),_0x22be74(y,"A",u));x._ambientColor=new e$1X(v,$,b,T);var C=_0x331de8(m,"Diffuse",u);v=u$Z(_0x22be74(C,"DiffuseR",u),_0x22be74(C,"R",u)),$=u$Z(_0x22be74(C,"DiffuseG",u),_0x22be74(C,"G",u)),b=u$Z(_0x22be74(C,"DiffuseB",u),_0x22be74(C,"B",u)),T=u$Z(_0x22be74(C,"DiffuseA",u),_0x22be74(C,"A",u)),x._diffuseColor=new e$1X(v,$,b,T);var S=_0x331de8(m,"Specular",u);v=u$Z(_0x22be74(S,"SpecularR",u),_0x22be74(S,"R",u)),$=u$Z(_0x22be74(S,"SpecularG",u),_0x22be74(S,"G",u)),b=u$Z(_0x22be74(S,"SpecularB",u),_0x22be74(S,"B",u)),T=u$Z(_0x22be74(S,"SpecularA",u),_0x22be74(S,"A",u)),x._specularColor=new e$1X(v,$,b,T);var w=_0x22be74(m,"Shininess",u);x._shininess=w,x._bTransparentSorting=_0x1a3be2(m,"TransparentSorting",u);var E=_0x5972bf(m,"texture",u);0===E.length&&t._fileType===p$T.OSGBFile&&(x._isInvalidOblique=!0);for(var P=0;P<E.length;P++){var A=E[P],L=_0x32cd4c(A,"name",u),M=_0x32cd4c(A,"TextureName",u),R=_0x331de8(A,"AddressMode",u),O=_0x32cd4c(R,"u",u),D=_0x32cd4c(R,"v",u);O="TAM_WRAP"===O?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,D="TAM_WRAP"===D?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;for(var I=_0x32cd4c(A,"TexModMatrix",u).split(","),F=16;F--;)I[F]=parseFloat(I[F]);x._texMatrix=p$1d.unpack(I);var B=e.texturePackage[L],N=L+t._id+f._id+i._relativePath.path;if(e$2e(B)&&(N+=B.imageBuffer.length),e$2e(B)&&B.width>0&&B.height>0&&e$2e(B.imageBuffer)&&B.imageBuffer.byteLength>0)switch(0===B.compressType&&(t._supportCompressType=0),i._texturesByteLength+=B.imageBuffer.length,B.compressType){case _0x2ddc8c.WEBP:var G=x.createWebp(N,M,f,P,B.imageBuffer,B.width,B.height,t.mipmapEnabled);d.push(G),x._isWEBP=!0;break;case _0x2ddc8c.CRN_DXT5:var z=x.createCRN(N,M,f,P,B,O,D,t.mipmapEnabled);d.push(z);break;default:var U=Se$e.CreateTexture(N,f,B.width,B.height,B.nFormat,B.compressType,B.imageBuffer,!1,O,D,t.mipmapEnabled);x._textures.push(U)}else if(t._isTextureShare){var V=t._baseUri+"Texture/"+M;e$2e(a$O.CREDENTIAL)&&(V=a$O.addToken(V));var k=x.requestSharedTexture(V,L,M,f,P,t.customRequestHeaders,O,D);d.push(k)}if("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt){var W=L+"_"+i._fileName;W=""!==t._volName?W+"_"+t._volName:W,"vol_texture_mapping"===t._strVolumeExt?W+=".vol":W+=".png";var H=i._relativePath.resolve(t._baseUri)+W;if(0!=t.urlType){var q=t._urlArguments,j=H.indexOf("datas")+5,X=q.layer3DName,Y=H.substring(H.indexOf("/path/")+6).split("/"),Z=q.scene3DName,K=Y[0],Q=Y[1].substring(0,Y[1].indexOf(".")),J=Y[1].substring(Y[1].indexOf(".")+1,Y[1].length);H=H.substring(0,j)+"?layerName="+X+"&rootTile="+K+"&tile="+Q+"&suffix="+J+"&scene3DName="+Z+"&layer3DName="+X}var ee=void 0;"vol_texture_mapping"===t._strVolumeExt?e$2e(ee=o$10(H,void 0))&&function(e,n,r){e.then((function(e){var o;if(e$2e(e)){var a=void 0,s=new Uint8Array(e,8),l=nt$b.inflate(s).buffer;if(1===new Float64Array(l,0,1)[0]){var u=new Uint32Array(l,8,4),c=u[0],h=u[1],d=u[2];a={nFormat:c,nWidth:h,nHeight:d,nPixelSize:u[3],imageArray:new Float32Array(l,24,h*d)}}if(e$2e(a)){var f,p=tt$i.LINEAR,_=rt$k.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(p=tt$i.NEAREST,_=rt$k.NEAREST),f=t._hypsometricSetting.filterMode===k$S.FilterMode.LINEAR?_0x36c972(a.imageArray,t._hypsometricSetting,!0):null===_0x5258fa?_0x53e3f1(a.imageArray,t._hypsometricSetting):_0x3637eb(a.imageArray,t._hypsometricSetting),(o=new t$U({context:t._context,width:a.nWidth,height:a.nHeight,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({minificationFilter:p,magnificationFilter:_})})).copyFrom({width:a.nWidth,height:a.nHeight,arrayBufferView:f}),i._volTextures[n]=o,r.texID2Vol=n}e=null}}),(function(e){}))}(ee,N,x):"png"===t._strVolumeExt&&(e$2e(ee=t$S(H))&&function(e,n,r){e.then((function(e){var o;if(e$2e(e)){var a,s=tt$i.LINEAR,l=rt$k.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(s=tt$i.NEAREST,l=rt$k.NEAREST),a=t._hypsometricSetting.filterMode===k$S.FilterMode.LINEAR?_0xc4b138(d$14(e),t._hypsometricSetting,!0):null===_0x5258fa?_0x4212ce(d$14(e),t._hypsometricSetting):_0x39510f(d$14(e),t._hypsometricSetting),(o=new t$U({context:t._context,width:e.width,height:e.height,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({minificationFilter:s,magnificationFilter:l})})).copyFrom({width:e.width,height:e.height,arrayBufferView:a}),e=null,i._volTextures[n]=o,r.texID2Vol=n}}),(function(e){}))}(ee,N,x)),d.push(ee)}}}o$1l.all(d,(function(){var n,r;if(e$2e(t._volData)){n=t._volData._volBounds;var c=t._context._id+"_"+t.id+"_layerVol",d=k$S.FilterMode.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(d=k$S.FilterMode.NEAREST),e$2e(t._hypsometricSetting)&&e$2e(t._volData._buffer)&&(d===k$S.FilterMode.NEAREST?null===_0x5258fa?_0x4212ce(t._volData._buffer,t._hypsometricSetting):t._volData._buffer=_0x39510f(t._volData._buffer,t._hypsometricSetting):_0xc4b138(t._volData._buffer,t._hypsometricSetting));var f={};f.nLength=t._volData._nLength,f.imageArray=t._volData._buffer;var p=Se$e.CreateVolumeTexture(c,s,t._context,f,d);delete t._volData._buffer,t._volData._buffer=void 0,r={volTexture:p,nFormat:3201,nSideBlockCount:t._volData._nSideBlockCount,nBlockLength:t._volData._nBlockLength,nLength:t._volData._nLength,nWidth:t._volData._width,nHeight:t._volData._height,nDepth:t._volData._depth,id:c,dataFloor:t._volData._minValue,dataCeil:t._volData._maxValue,volBounds:n},i._volObj=r}else if("vol"===t._strVolumeExt)if(e.volImageBuffer){n=e.volBounds;c=t._context._id+"_"+t.id+"_"+i._relativePath.resolve(t._baseUri)+"_"+i._fileName,d=k$S.FilterMode.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(d=k$S.FilterMode.NEAREST),3201===e.volImageBuffer.nFormat&&e$2e(t._hypsometricSetting)&&(d===k$S.FilterMode.NEAREST?null===_0x5258fa?_0x4212ce(e.volImageBuffer.imageArray,t._hypsometricSetting):e.volImageBuffer.imageArray=_0x39510f(e.volImageBuffer.imageArray,t._hypsometricSetting):_0xc4b138(e.volImageBuffer.imageArray,t._hypsometricSetting)),r={volTexture:p=Se$e.CreateVolumeTexture(c,s,t._context,e.volImageBuffer,d),nFormat:e.volImageBuffer.nFormat,nSideBlockCount:e.volImageBuffer.nSideBlockCount,nBlockLength:e.volImageBuffer.nBlockLength,nLength:e.volImageBuffer.nLength,nWidth:e.volImageBuffer.nWidth,nHeight:e.volImageBuffer.nHeight,nDepth:e.volImageBuffer.nDepth,id:c,dataFloor:t._fMinValue,dataCeil:t._fMaxValue,volBounds:n},delete e.volImageBuffer.imageArray,e.volImageBuffer.imageArray=null,e$2e(i._volObj)&&Se$e.DecRef(i._volObj.id),i._volObj=r}else t._bVolume&&(e$2e(r=i._volObj)&&(n=i._volObj.volBounds));var _=_0x331de8(l,"PageLods",u),m=_0x5972bf(_,"PagedLOD",u),g=t._matModel;if(m.length>0){for(var x=0;x<m.length;x++){(re=new _0x4d13e0)._fileType=t._fileType;var y=m[x],v=_0x32cd4c(y,"RangeDataList",u);v?v=v.replace(/.osgb$/,"").replace(/.s3m$/,""):i._isLeafTile=!0;var $=_0x32cd4c(y,"RangeMode",u),b=_0x22be74(y,"RangeList",u),T=_0x331de8(y,"BoundingSphere",u),C=_0x22be74(T,"x",u),S=_0x22be74(T,"y",u),w=_0x22be74(T,"z",u),E=_0x22be74(T,"radius",u),P=new o$1p(C,S,w);re._rangeMode="DISTANCE_FROM_EYE_POINT"==$?_0x219958.DISTANCE_FROM_EYE_POINT:_0x219958.PIXEL_SIZE_ON_SCREEN,re._rangeDataList=v,0===re._rangeDataList.indexOf("Root")&&(re._processFileType=1),re._rangeList=b,re._boundingSphere=new i$1d(P,E),re._originalBS=new i$1d(P,E),i$1d.transform(re._boundingSphere,t._matModel,re._boundingSphere);for(var A=_0x5972bf(y,"Geode",u),L=[],M=[],R=0;R<A.length;R++){for(var O=_0x32cd4c(ae=A[R],"GeoDeModMatrix",u).split(","),D=0;D<16;D++)O[D]=parseFloat(O[D]);if(O=p$1d.unpack(O),1===t._heightScale)se=p$1d.multiply(g,O,new p$1d);else{var I=p$1d.multiplyByScale(O,new o$1p(1,1,t._heightScale),new p$1d);se=p$1d.multiply(g,I,new p$1d)}for(var F=_0x5972bf(ae,"GeoName"),B=0;B<F.length;B++){var N=F[B].textContent.trim();if(!((ue=(le=e.geoPackage[N]).vertexPackage).verticesCount<1)){var G=le.arrIndexPackage,z=le.pickInfo,U={};for(R=0;R<G.length;R++){if(e$2e(ce=G[R])){var V=ce.materialCode,k=h[V],W=new _0xf77618({});e$2e(k)&&k.clone(W),U[V]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&e$2e(k.texID2Vol)&&(p=i._volTextures[k.texID2Vol])}}r&&(_0x8415d6(ue,t._oriMatModel,O,n),Se$e.AddRef(i._fileName));var H=re._boundingSphere;if(re._boundingSphere.radius<0){H=_0x3ad44f.calcBoundingSphere(t,ue,se);var q=i$1d.transform(H,p$1d.inverse(se,new p$1d),new i$1d);i$1d.transform(q,O,q),L.push(H),M.push(q)}var j={context:t._context,vertexPackage:ue,arrIndexPackage:G,edgeGeometry:le.edgeGeometry,pickInfo:z,version:e.version,mapPass:U,layer:t,matModel:se,boundingVolume:H,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:O,level:t._level,row:o,col:a,geoName:N,entity:i};if(e$2e(t.themeStyle)&&e$2e(t.themeStyle._image)){var X=_0x1a0b3c.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(X)}else{var Y=new _0x4881fc(j);if(t._imageryLayer instanceof Array){for(var Z=[],K=0;K<t._imageryLayer.length;K++){if(e$2e(he=t._imageryLayer[K])&&(he instanceof h$R||he instanceof i$P)){var Q=_0x1347ff(he,le.cartographicBounds);Z=Z.concat(Q)}}Z.length>0&&Y.setImagerys(Z,le.cartographicBounds)}else{if(e$2e(t._imageryLayer)&&(t._imageryLayer instanceof h$R||t._imageryLayer instanceof i$P))(Z=_0x1347ff(t._imageryLayer,le.cartographicBounds)).length>0&&Y.setImagerys(Z,le.cartographicBounds)}re._renderEntityList.push(Y)}}}}re._boundingSphere.radius<0&&(re._boundingSphere=i$1d.fromBoundingSpheres(L,new i$1d),re._originalBS=i$1d.fromBoundingSpheres(M,new i$1d)),e$2e(i._pagelodMap[v])?(i._pagelodMap[v]._renderEntityList=re._renderEntityList,i._pagelodMap[v]._ready=!0):(i._childrenPageLod.push(re),t.LoadingPriority===_0x539352.UsePagedLodInfo&&(re._isLeafNode=!0))}if((A=_0x5972bf(_,"Geode",u)).length>0){L=[],M=[];(re=new _0x4d13e0)._fileType=t._fileType,re._isLeafNode=!0;for(R=0;R<A.length;R++){for(O=_0x32cd4c(ae=A[R],"GeoDeModMatrix",u).split(","),D=0;D<16;D++)O[D]=parseFloat(O[D]);if(1===t._heightScale)se=p$1d.multiply(g,O,new p$1d);else{I=p$1d.multiplyByScale(O,new o$1p(1,1,t._heightScale),new p$1d);se=p$1d.multiply(g,I,new p$1d)}for(var J=_0x5972bf(ae,"GeoName",u),ee=0;ee<J.length;ee++){N=J[ee].textContent.trim();if(!((ue=(le=e.geoPackage[N]).vertexPackage).verticesCount<1)){z=le.pickInfo;var te=_0x3ad44f.calcBoundingSphere(t,ue,se);q=i$1d.transform(te,p$1d.inverse(se,new p$1d),new i$1d);i$1d.transform(q,O,q),L.push(te),M.push(q);var ie=_0x3ad44f.calcBoundingRectangle(t,ue);G=le.arrIndexPackage,U={};for(var ne in G){if(e$2e(ce=G[ne])){V=ce.materialCode,k=h[V],W=new _0xf77618({});e$2e(k)&&k.clone(W),U[V]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&e$2e(k.texID2Vol)&&(p=i._volTextures[k.texID2Vol])}}r&&(_0x8415d6(ue,t._oriMatModel,O,n),Se$e.AddRef(i._fileName));j={context:t._context,vertexPackage:ue,arrIndexPackage:G,edgeGeometry:le.edgeGeometry,pickInfo:z,version:e.version,mapPass:U,layer:t,matModel:se,boundingVolume:te,boundingRectangle:ie,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:O,level:t._level,row:o,col:a,geoName:N,entity:i};if(e$2e(t.themeStyle)){X=_0x1a0b3c.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(X)}else{Y=new _0x4881fc(j);if(t._imageryLayer instanceof Array){for(Z=[],K=0;K<t._imageryLayer.length;K++){if(e$2e(he=t._imageryLayer[K])&&(he instanceof h$R||he instanceof i$P)){Q=_0x1347ff(he,le.cartographicBounds);Z=Z.concat(Q)}}Z.length>0&&Y.setImagerys(Z,le.cartographicBounds)}else{if(e$2e(t._imageryLayer)&&(t._imageryLayer instanceof h$R||t._imageryLayer instanceof i$P))(Z=_0x1347ff(t._imageryLayer,le.cartographicBounds)).length>0&&Y.setImagerys(Z,le.cartographicBounds)}re._renderEntityList.push(Y)}}}}re._boundingSphere=i$1d.fromBoundingSpheres(L,new i$1d),re._originalBS=i$1d.fromBoundingSpheres(M,new i$1d),re._ready=!0,i._childrenPageLod.push(re)}}else{var re;i._isLeafTile=!0,(re=new _0x4d13e0)._isLeafNode=!0,re._fileType=t._fileType;var oe=_0x5972bf(_,"Geode");for(L=[],M=[],x=0;x<oe.length;x++){var ae;for(O=_0x32cd4c(ae=oe[x],"GeoDeModMatrix",u).split(","),D=0;D<16;D++)O[D]=parseFloat(O[D]);var se;if(O=p$1d.unpack(O),1===t._heightScale)se=p$1d.multiply(g,O,new p$1d);else{I=p$1d.multiplyByScale(O,new o$1p(1,1,t._heightScale),new p$1d);se=p$1d.multiply(g,I,new p$1d)}for(J=_0x5972bf(ae,"GeoName",u),ee=0;ee<J.length;ee++){var le,ue;N=J[ee].textContent.trim();if(!((ue=(le=e.geoPackage[N]).vertexPackage).verticesCount<1)){z=le.pickInfo,te=_0x3ad44f.calcBoundingSphere(t,ue,se),q=i$1d.transform(te,p$1d.inverse(se,new p$1d),new i$1d);i$1d.transform(q,O,q),L.push(te),M.push(te);for(ie=_0x3ad44f.calcBoundingRectangle(t,ue),G=le.arrIndexPackage,U={},R=0;R<G.length;R++){var ce;if(e$2e(ce=G[R])){V=ce.materialCode,k=h[V],W=new _0xf77618({});e$2e(k)&&k.clone(W),U[V]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&e$2e(k.texID2Vol)&&(p=i._volTextures[k.texID2Vol])}}r&&(_0x8415d6(ue,t._oriMatModel,O,n),Se$e.AddRef(i._fileName));j={context:t._context,vertexPackage:ue,arrIndexPackage:G,edgeGeometry:le.edgeGeometry,pickInfo:z,version:e.version,mapPass:U,layer:t,matModel:se,boundingVolume:te,boundingRectangle:ie,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:O,level:t._level,row:o,col:a,geoName:N,entity:i};if(e$2e(t.themeStyle)&&e$2e(t.themeStyle._image)){X=_0x1a0b3c.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(X)}else{Y=new _0x4881fc(j);if(t._imageryLayer instanceof Array){for(Z=[],K=0;K<t._imageryLayer.length;K++){var he;if(e$2e(he=t._imageryLayer[K])&&(he instanceof h$R||he instanceof i$P)){Q=_0x1347ff(he,le.cartographicBounds);Z=Z.concat(Q)}}Z.length>0&&Y.setImagerys(Z,le.cartographicBounds)}else{if(e$2e(t._imageryLayer)&&(t._imageryLayer instanceof h$R||t._imageryLayer instanceof i$P))(Z=_0x1347ff(t._imageryLayer,le.cartographicBounds)).length>0&&Y.setImagerys(Z,le.cartographicBounds)}re._renderEntityList.push(Y)}}}}re._boundingSphere=i$1d.fromBoundingSpheres(L,new i$1d),re._originalBS=i$1d.fromBoundingSpheres(M,new i$1d),re._ready=!0,i._childrenPageLod.push(re)}if(!e$2e(i._boundingSphere)||i._isLeafTile){for(var de=[],fe=0;fe<i._childrenPageLod.length;fe++)de.push(i._childrenPageLod[fe]._boundingSphere);i._boundingSphere=i$1d.fromBoundingSpheres(de),i._oriBoundingSphere=i$1d.clone(i._boundingSphere)}if(!o$1p.equals(t._boundingSphereOffset,o$1p.ZERO)){var pe=Math.max(Math.abs(t._boundingSphereOffset.x),Math.abs(t._boundingSphereOffset.y),Math.abs(t._boundingSphereOffset.z));i.extendRadius(pe)}for(var _e in h){var me=h[_e];!e$2e(me)||(me.destroy(),h[_e]=null)}r&&Se$e.DecRef(i._fileName),i._s3mLoadState=N$Q.PARSED,i._isParsed=!0,t.LoadingPriority===_0x539352.UsePagedLodInfo&&i._isEmptyTree&&i.setEmptyTreeFlag(!1)}))},_0x46f77a.binaryDataParser=function(e,t,i,n){if(t._s3mLoadState===N$Q.UNLOAD)return t.s3mBuffer=null,t.volBuffer=null,void(t.task=void 0);var r;e$2e(e._imageryLayer)&&(r=e._fileType!==p$T.OSGBFile&&e._fileType!==p$T.OSGBCacheFile||e$2e(e.waterEffectSet)?void 0:p$1d.pack(e._matModel,new Array(16)));var o={buffer:i,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,bVolume:!1,modelMatrix:r,isCoverImageryLayer:e$2e(e._imageryLayer)},a=[i];e$2e(n)&&"vol"===e._strVolumeExt&&(o.bVolume=!0,o.volbuffer=n,a.push(n)),_0x29d1c7.init||_0x29d1c7.initWebAssembly();var s=_0x29d1c7.S3MTaskProcessor.scheduleTask(o,a);!e$2e(s)||(t._s3mLoadState=N$Q.PARSING,e._layerScheduler._statistics.numberOfProcessingAttempted=0,e._layerScheduler._statistics.numberOfTilesProcessing++,t.s3mBuffer=null,t.volBuffer=null,s.then((function(i){if(e$2e(window.Proxy)){var r=t._relativePath.toString()+t._fileName;if((!0===e._indexedDBSetting.isGeoTilesSave||e._indexedDBSetting.isGeoTilesRootNodeSave&&e._layerScheduler._isRootNode(r))&&e$2e(e._layerScheduler._indexedDBScheduler)){if(e$2e(e._layerScheduler._indexedDBScheduler.cachestatus)&&e$2e(e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename])&&(1===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]||2===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]))return;var o={blob:i,key:r,tablename:e._layerScheduler.tablename,dbname:e._layerScheduler._indexedDBScheduler.dbname};_0x29d1c7.indexTaskProcessor.scheduleTask(o,[])}}e._layerScheduler._statistics.numberOfTilesProcessing--,_0x46f77a.parseResult(i,e,t,n)})).otherwise((function(i){if(e._layerScheduler._statistics.numberOfTilesProcessing--,t.task=void 0,t._s3mLoadState==N$Q.UNLOAD)return t.s3mBuffer=null,void(t.volBuffer=null);e$2e(i)?(t.s3mBuffer=null,t.volBuffer=null,t._s3mLoadState=N$Q.FAILED,console.log(i)):t._s3mLoadState=N$Q.LOADED})))};var _0x1aa04c=(_0x7562d6=!0,function(e,t){var i=_0x7562d6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x7562d6=!1,i}),_0x364884=_0x1aa04c(void 0,(function(){return _0x364884.toString().search("(((.+)+)+)+$").toString().constructor(_0x364884).search("(((.+)+)+)+$")})),_0x7562d6;function _0x13fd1b(){this.skeletons=new e$1Q,this.bufferCache={},this.vertexJob=new _0x1ecee2,this.indexJob=new _0x2894b0}_0x364884(),_0x13fd1b.STATE={SkeletonParsing:0,SkeletonReady:1};var _0x2b550f={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,PARSED:4,CREATING:5,READY:6,LOADFAILED:7,PARSFAILED:8};function _0x1ecee2(){this.context=void 0,this.geoPackage=void 0,this.index=0}function _0x2894b0(){this.geoPackage=void 0,this.context=void 0,this.index=0}function _0x411a6b(e,t,i){if(!e$2e(t.request)){let o=i.split("#");var n=new h$16("./ModelFile/"+(encodeURIComponent(o[0])+(o[1]?"#"+o[1]:""))).resolve(e._baseUri).toString();e$2e(a$O.CREDENTIAL)&&(n=a$O.addToken(n));var r=new r$1c({url:n,throttle:!0,throttleByServer:!0,serverKey:r$1b.getServerKey(n),priorityFunction:function(){return 1e3}});t.request=r}var o=o$10(t.request.url,void 0,t.request);!e$2e(o)||(t.state=_0x2b550f.LOADING,o.then((function(e){t.request=void 0,t.buffer=e,t.state=_0x2b550f.LOADED})).otherwise((function(e){e$2e(e)?t.state=_0x2b550f.LOADFAILED:(t.state=_0x2b550f.UNLOAD,t.request=void 0)})))}function _0x2c7158(e,t,i){var n={buffer:i,isS3MZ:!1,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,isJsonScp:e._isJsonScp,createEdge:!1},r=[i];if(_0x29d1c7.init||_0x29d1c7.initWebAssembly(),_0x29d1c7.taskProcessorReady){var o=_0x29d1c7.S3MBTaskProcessor.scheduleTask(n,r);!e$2e(o)||(t.buffer=void 0,t.state=_0x2b550f.PARSING,o.then((function(e){t.state=_0x2b550f.PARSED,t.skeletonPackage=e})).otherwise((function(e){t.state=_0x2b550f.PARSFAILED})))}}function _0x46ee09(e,t,i,n){var r=e._context,o=i.skeletonPackage.geoPackage;for(var a in delete o.ignoreNormal,o)if(o.hasOwnProperty(a)){for(var s=o[a],l=s.vertexPackage.vertexAttributes.length,u=new r$17,c=0;c<l;c++)u.enqueue(c);i.vertexBufferToCreate.set(a,u);var h=s.arrIndexPackage[0];if(e$2e(h)){ce$z.UNSIGNED_SHORT,(1===h.indexType||s.vertexPackage.verticesCount>=e$2d.SIXTY_FOUR_KILOBYTES)&&r.elementIndexUint&&ce$z.UNSIGNED_INT;var d=new r$17;d.enqueue(0),i.indexBufferToCreate.set(a,d)}t.bufferCache[n+"_"+a]=1}i.state=_0x2b550f.CREATING}function _0x1b6118(e,t,i,n){var r=!0;for(var o in i.vertexBufferToCreate._hash){for(var a=i.vertexBufferToCreate._hash[o];a.length;){var s=a.peek();if(t.vertexJob.set(e._context,i.skeletonPackage.geoPackage[o],s),!e._frameState.jobScheduler.execute(t.vertexJob,i$R.BUFFER))break;a.dequeue()}r=r&&0===a.length}for(var o in i.indexBufferToCreate._hash){for(a=i.indexBufferToCreate._hash[o];a.length;){s=a.peek();if(t.indexJob.set(e._context,i.skeletonPackage.geoPackage[o],s),!e._frameState.jobScheduler.execute(t.indexJob,i$R.BUFFER))break;a.dequeue()}r=r&&0===a.length}r&&(i.vertexBufferToCreate=void 0,i.indexBufferToCreate=void 0,i.state=_0x2b550f.READY)}_0x1ecee2.prototype.set=function(e,t,i){this.context=e,this.geoPackage=t,this.index=i},_0x1ecee2.prototype.execute=function(){var e=this.context,t=this.index,i=this.geoPackage.vertexPackage.vertexAttributes[t];e$2e(i.vertexBuffer)||(i.vertexBuffer=t$X.createVertexBuffer({context:e,typedArray:i.typedArray,usage:A$18.STATIC_DRAW}),delete i.typedArray,i.vertexBuffer.vertexArrayDestroyable=!1)},_0x2894b0.prototype.set=function(e,t,i){this.geoPackage=t,this.context=e,this.index=i},_0x2894b0.prototype.execute=function(){var e=this.context;this.index;var t=this.geoPackage.arrIndexPackage[0],i=this.geoPackage.vertexPackage.verticesCount,n=ce$z.UNSIGNED_SHORT;(1===t.indexType||i>=e$2d.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(n=ce$z.UNSIGNED_INT);var r=t$X.createIndexBuffer({context:e,typedArray:t.indicesTypedArray,usage:A$18.STATIC_DRAW,indexDatatype:n});r.vertexArrayDestroyable=!1,delete t.indicesTypedArray,t.indexBuffer=r},_0x13fd1b.prototype.getSkeleton=function(e,t,i){var n=t.skeletonPackages,r=i.indexOf("#"),o=i;r>-1&&(o=i.substring(0,r));var a=this.skeletons.get(o);return e$2e(a)||(a={state:_0x2b550f.UNLOAD,skeletonPackage:void 0,vertexBufferToCreate:new e$1Q,indexBufferToCreate:new e$1Q},this.skeletons.set(o,a)),a.state===_0x2b550f.UNLOAD?_0x411a6b(e,a,i):a.state===_0x2b550f.LOADED?_0x2c7158(e,a,a.buffer):a.state===_0x2b550f.PARSED?_0x46ee09(e,this,a,o):a.state===_0x2b550f.CREATING&&_0x1b6118(e,this,a),a.state===_0x2b550f.READY&&(n.contains(o)||n.set(o,a.skeletonPackage)),a},_0x13fd1b.prototype.remove=function(e){var t=this.skeletons.get(e);if(e$2e(t)&&e$2e(t.skeletonPackage)){var i=t.skeletonPackage.geoPackage;for(var n in i)if(i.hasOwnProperty(n)){for(var r=i[n],o=r.vertexPackage.vertexAttributes,a=o.length,s=0;s<a;s++){var l=o[s];if(e$2e(l.vertexBuffer)){var u=l.vertexBuffer;l.vertexBuffer.vertexArrayDestroyable=!0,e$2e(u)&&!u.isDestroyed()&&u.vertexArrayDestroyable&&u.destroy(),l.vertexBuffer=void 0}}var c=r.arrIndexPackage[0];if(e$2e(c)){var h=c.indexBuffer;h.vertexArrayDestroyable=!0,e$2e(h)&&!h.isDestroyed()&&h.vertexArrayDestroyable&&h.destroy(),c.indexBuffer=void 0}delete this.bufferCache[e+"_"+n]}this.skeletons.remove(e)}},_0x13fd1b.parse=function(e,t){var i=t.instancePackage.geoPackage;delete i.ignoreNormal;var n=!0;for(var r in e$2e(t.skeletonPackages)||(t.skeletonPackages=new e$1Q),i)if(i.hasOwnProperty(r)){n=e.instanceSkeletonManager.getSkeleton(e,t,r).state===_0x2b550f.READY&&n}n&&(t.skeletonState=_0x13fd1b.STATE.SkeletonReady)};var y$N=1,l$T=2,B$L=4,P$N=32;function H$T(e,t,i,n){var r=e|t<<8,o=r>>11&31,a=r>>5&63,s=31&r;return i[n+0]=o<<3|o>>2,i[n+1]=a<<2|a>>4,i[n+2]=s<<3|s>>2,i[n+3]=255,r}function M$Q(e,t,i,n){for(var r=new Uint8Array(16),o=H$T(t[i+0],t[i+1],r,0),a=H$T(t[i+2],t[i+3],r,4),s=0;s<3;s++){var l=r[s],u=r[4+s];n&&o<=a?(r[8+s]=(l+u)/2,r[12+s]=0):(r[8+s]=(2*l+u)/3,r[12+s]=(l+2*u)/3)}r[11]=255,r[15]=n&&o<=a?0:255;var c=new Uint8Array(16);for(s=0;s<4;++s){var h=t[i+4+s];c[4*s+0]=3&h,c[4*s+1]=h>>2&3,c[4*s+2]=h>>4&3,c[4*s+3]=h>>6&3}for(s=0;s<16;++s)for(var d=4*c[s],f=0;f<4;++f)e[4*s+f]=r[d+f]}function N$I(e,t,i){for(var n=0;n<8;++n){var r=bytes[i+n],o=15&r,a=240&r;e[8*n+3]=o|o<<4,e[8*n+7]=a|a>>4}}function W$R(e,t,i){var n=t[i+0],r=t[i+1],o=new Uint8Array(8);if(o[0]=n,o[1]=r,n<=r){for(var a=1;a<5;++a)o[1+a]=((5-a)*n+a*r)/5;o[6]=0,o[7]=255}else for(a=1;a<7;++a)o[1+a]=((7-a)*n+a*r)/7;var s=new Uint8Array(16),l=(i=i+2,0);for(a=0;a<2;++a){for(var u=0,c=0;c<3;++c){u|=t[i++]<<8*c}for(c=0;c<8;++c){var h=u>>3*c&7;s[l++]=h}}for(a=0;a<16;++a)e[4*a+3]=o[s[a]]}function E$S(e,t,i,n){var r=0;0!=(n&(l$T|B$L))&&(r=8),M$Q(e,t,i+r,0!=(n&y$N)),0!=(n&l$T)?N$I(e,t,i):0!=(n&B$L)&&W$R(e,t,i)}function G$_(e,t,i,n){for(var r=new Uint16Array(4),o=e,a=0,s=0,l=0,u=0,c=0,h=0,d=0,f=0,p=0,_=t/4,m=i/4,g=0;g<m;g++)for(var x=0;x<_;x++)l=4*((m-g)*_+x),r[0]=n[l],r[1]=n[l+1],u=31&r[0],c=2016&r[0],h=63488&r[0],d=31&r[1],f=2016&r[1],p=63488&r[1],r[2]=5*u+3*d>>3|5*c+3*f>>3&2016|5*h+3*p>>3&63488,r[3]=5*d+3*u>>3|5*f+3*c>>3&2016|5*p+3*h>>3&63488,a=n[l+2],o[s=4*g*t+4*x]=r[3&a],o[s+1]=r[a>>2&3],o[s+2]=r[a>>4&3],o[s+3]=r[a>>6&3],o[s+=t]=r[a>>8&3],o[s+1]=r[a>>10&3],o[s+2]=r[a>>12&3],o[s+3]=r[a>>14],a=n[l+3],o[s+=t]=r[3&a],o[s+1]=r[a>>2&3],o[s+2]=r[a>>4&3],o[s+3]=r[a>>6&3],o[s+=t]=r[a>>8&3],o[s+1]=r[a>>10&3],o[s+2]=r[a>>12&3],o[s+3]=r[a>>14];return o}function R$N(e,t,i,n,r){for(var o=0!=(r&y$N)?8:16,a=0,s=0;s<i;s+=4)for(var l=0;l<t;l+=4){var u=new Uint8Array(64);E$S(u,n,a,r);for(var c=0,h=0;h<4;++h)for(var d=0;d<4;++d){var f=l+d,p=s+h;if(f<t&&p<i)for(var _=4*(t*(i-p)+f),m=0;m<4;++m)e[_++]=u[c++];else c+=4}a+=o}}function L$W(e){}L$W.decode=function(e,t,i,n,r){if(null!=e&&null!=n&&0!=i&&0!=t){var o=0;(o=r>_0x2ddc8c.BGR||r===_0x2ddc8c.LUMINANCE_ALPHA?B$L:y$N|P$N)&y$N&&o&P$N?G$_(e,t,i,n):R$N(e,t,i,n,o)}};var _0xa2c5a2=(_0x56f058=!0,function(e,t){var i=_0x56f058?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56f058=!1,i}),_0x35fb8c=_0xa2c5a2(void 0,(function(){return _0x35fb8c.toString().search("(((.+)+)+)+$").toString().constructor(_0x35fb8c).search("(((.+)+)+)+$")})),_0x56f058;_0x35fb8c();var _0x296c30=4369,_0x5c81a4=6410;function _0x5c31bd(e){this.context=e.context,this.contextId=e.context.id,this.layerId=e.layerId,this.rootName=e.rootName,this.textureId=e.textureId,this._width=e.width,this._height=e.height,this._compressType=e.compressType,this._supportCompressType=e.supportCompressType,this._pixelFormat=e.pixelFormat,this._internalFormat=e.internalFormat,this.wrapS=u$Z(e.wrapS,q$1a.CLAMP_TO_EDGE),this.wrapT=u$Z(e.wrapT,q$1a.CLAMP_TO_EDGE),this.arrayBufferView=e.arrayBufferView,this._inner=void 0,this.size=this._width*this._height,this.refCount=1,this.ready=!1,this.renderable=!1,this.isTexBlock=!0,e$2e(this.arrayBufferView)&&this.init(),this._sizeInBytes=V$12.compressedTextureSizeInBytes(this._internalFormat,this._width,this._height),this.context.memorySize+=this._sizeInBytes}function _0x16f9db(e,t,i,n){var r=1;if(!e$2d.isPowerOfTwo(i)||!e$2d.isPowerOfTwo(n))return!1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=V$12.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l===o?r:1}Object.defineProperties(_0x5c31bd.prototype,{_texture:{get:function(){return this._inner._texture}},_target:{get:function(){return this._inner._target}}}),_0x5c31bd.prototype.init=function(){if(this._compressType===_0x22a8f5.enrS3TCDXTN&&1!=this._supportCompressType){if(e$2e(this.arrayBufferView)){var e=null;L$W.decode(e,this._width,this._height,this.arrayBufferView,this._pixelFormat),e=this._pixelFormat>_0x2ddc8c.BGR||this._pixelFormat===_0x2ddc8c.LUMINANCE_ALPHA?new Uint8Array(this._width*this._height*4):new Uint16Array(this._width*this._height),L$W.decode(e,this._width,this._height,this.arrayBufferView,this._pixelFormat),this.arrayBufferView=e}this._internalFormat=_0x296c30}var t,i,n,r=!1,o=this._internalFormat,a=0,s={};if(e$2e(this.arrayBufferView)){var l=this._width,u=this._height,c=_0x16f9db(this.arrayBufferView,o,this._width,this._height)>1,h=this.arrayBufferView.byteLength,d=0;(o===_0x5c81a4||o===_0x296c30)&&(r=!0);var f=[];do{var p=V$12.compressedTextureSizeInBytes(o,l,u),_=new Uint8Array(this.arrayBufferView.buffer,this.arrayBufferView.byteOffset+d,p);0==a?s.arrayBufferView=_:f.push(_),a++,l=Math.max(l>>1,1),u=Math.max(u>>1,1),d+=p}while(c&&d<h);s.mipLevels=f}else{var m=V$12.compressedTextureSizeInBytes(o,this._width,this._height);s.arrayBufferView=o===_0x296c30?new Uint8Array(this._width*this._height*4):new Uint8Array(m)}a>1?(i=rt$k.LINEAR,t=e$2d.isPowerOfTwo(this._width)&&e$2d.isPowerOfTwo(this._height)?tt$i.LINEAR_MIPMAP_LINEAR:tt$i.LINEAR):(i=rt$k.LINEAR,t=tt$i.LINEAR),n=this._internalFormat==_0x296c30?V$12.RGBA:this._internalFormat==_0x5c81a4?V$12.LUMINANCE_ALPHA:this._internalFormat,this._inner=new t$U({context:this.context,width:this._width,height:this._height,pixelFormat:n,pixelDatatype:_$_.UNSIGNED_BYTE,flipY:r,source:s,sampler:new e$1S({wrapS:this.wrapS,wrapT:this.wrapT,minificationFilter:t,magnificationFilter:i,maximumAnisotropy:e$1W.maximumTextureFilterAnisotropy})}),this.arrayBufferView=void 0,this.ready=!0},_0x5c31bd.prototype.copyFrom=function(e){var t=e.xOffset,i=e.yOffset,n=e.width,r=e.height,o=e.arrayBufferView,a=this._internalFormat;if(this._compressType===_0x22a8f5.enrS3TCDXTN&&1!=this._supportCompressType){var s=null;a=this._pixelFormat;L$W.decode(s,n,r,o,a),s=a>_0x2ddc8c.BGR||a===_0x2ddc8c.LUMINANCE_ALPHA?new Uint8Array(n*r*4):new Uint16Array(n*r),L$W.decode(s,n,r,o,a),o=s,this._internalFormat=_0x296c30,this._inner.copyFrom({width:n,height:r,arrayBufferView:o},t,i)}else{var l=V$12.compressedTextureSizeInBytes(a,n,r),u=new Uint8Array(o.buffer,o.byteOffset,l);this._inner.copyFrom({width:n,height:r,arrayBufferView:u},t,i)}},_0x5c31bd.prototype.update=function(e){this.context=e.context,this.contextId=e.context.id,this.layerId=e.layerId,this.rootName=e.rootName,this.textureId=e.textureId,this._width=e.width,this._height=e.height,this._internalFormat=e.internalFormat,this.arrayBufferView=e.arrayBufferView,this.refCount=1,this.ready=!1,this.renderable=!1,e$2e(this.arrayBufferView)&&this.init()},_0x5c31bd.prototype.destroy=function(){this._inner&&this._inner.destroy(),this._inner=null,this.refCount=0,this.ready=!1,this.renderable=!1,this.context.memorySize-=this._sizeInBytes};var _0x576c50=(_0x41c7b7=!0,function(e,t){var i=_0x41c7b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41c7b7=!1,i}),_0x505f5e=_0x576c50(void 0,(function(){return _0x505f5e.toString().search("(((.+)+)+)+$").toString().constructor(_0x505f5e).search("(((.+)+)+)+$")})),_0x41c7b7;_0x505f5e();var _0xa08fda={cache:{},cacheSize:0,freeCache:{},freeQueue:new r$17,freeCacheSize:0,throttleSize:52428800,getCache:function(e,t,i){var n=this.cache[e];e$2e(n)||(n=this.cache[e]={});var r=n[t];e$2e(r)||(r=n[t]={});var o=r[i];return e$2e(o)||(o=r[i]={}),o},get:function(e,t,i,n){var r=this.getCache(e,t,i)[n];if(e$2e(r))return r.refCount++,r},create:function(e){var t=e.context,i=t.id,n=e.layerId,r=e.rootName,o=e.textureId,a=this.getCache(i,n,r),s=a[o];if(e$2e(s))return s.refCount++,s;var l=e.width,u=e.height,c=e.compressType,h=e.supportCompressType,d=e.pixelFormat,f=e.arrayBufferView;return s=new _0x5c31bd({context:t,layerId:n,rootName:r,textureId:o,width:l,height:u,compressType:c,supportCompressType:h,pixelFormat:d,internalFormat:e.internalFormat,arrayBufferView:f}),a[o]=s,s},del:function(e){if(e$2e(e.contextId)){var t=this.getCache(e.contextId,e.layerId,e.rootName);!e$2e(t[e.textureId])||0==--e.refCount&&(delete t[e.textureId],e.destroy())}}},_0x20af70=(_0xc35db5=!0,function(e,t){var i=_0xc35db5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc35db5=!1,i}),_0x21575e=_0x20af70(void 0,(function(){return _0x21575e.toString().search("(((.+)+)+)+$").toString().constructor(_0x21575e).search("(((.+)+)+)+$")})),_0xc35db5;function _0x1772f5(){this.isRoot=!1,this.isLeaf=!1,this.ownerLayerName=void 0,this._refCount=0,this.ownerEntity=void 0,this._ambientColor=new e$2c(1,1,1,1),this._diffuseColor=new e$2c(1,1,1,1),this._specularColor=new e$2c(0),this._texMatrix=p$1d.clone(p$1d.IDENTITY,new p$1d),this._shininess=50,this._bTransparentSorting=!1,this._textures=[],this._created=!1,this._createdBaker=!1,this._subRequested=!1,this._subRequestedBaker=!1,this._subRequestNames=void 0,this._subRequestNamesBake=void 0,this._subTextureNames=void 0,this._subTextureNamesBake=void 0,this._subBatchValues=void 0,this._oriTextureBake=void 0,this._batchTable=void 0,this._batchTableBake=void 0,this._ancestorTexture=void 0,this._oriTexture=void 0,this.textureParameter=void 0,this.textureParameterBake=void 0,this.textureInitilized=!1,this.textureBakeInitilized=!1,this.textureRenderableFlag=!1,this.textureBakeRenderableFlag=!1,this.isCrnTexture=!1,this.taskMap={},this._usePBR=!1}function _0x44af5c(e){if(!e$2e(e))return this._offsetPeriod=0,this._offsetSpeedU=0,this._offsetSpeedV=0,this._tilingPeriod=0,this._tilingSpeedU=0,void(this._tilingSpeedV=0);this._offsetPeriod=e.OffsetPeriod,this._offsetSpeedU=e.OffsetSpeedU,this._offsetSpeedV=e.OffsetSpeedV,this._tilingPeriod=e.TilingPeriod,this._tilingSpeedU=e.TilingSpeedU,this._tilingSpeedV=e.TilingSpeedV}_0x21575e(),Object.defineProperties(_0x1772f5.prototype,{hasTexture:{get:function(){return this._textures.length>0||(e$2e(this.baseColorTexture)||e$2e(this.normalTexture)||e$2e(this.emissiveTexture)||e$2e(this.metallicRoughnessTexture)||e$2e(this.occlusionTexture))}}}),_0x1772f5.prototype.createPBRParamter=function(e){if(e$2e(e.pbrMetallicRoughness)&&!this._usePBR){var t=e.pbrMetallicRoughness;this._usePBR=!0,this._alphaCutoff=u$Z(t.alphaCutoff,e.alphaCutoff),this._alphaMode=u$Z(t.alphaMode,e.alphaMode),this._baseColor=new e$1X(t.baseColor.x,t.baseColor.y,t.baseColor.z,t.baseColor.w),this._baseColorTextureIndex=t.baseColorTextureIndex,this._baseColorTextureCoordIndex=t.baseColorTextureCoordIndex,this._doubleSided=t.doubleSided,this._emissiveFactor=new e$1X(t.emissiveFactor.x,t.emissiveFactor.y,t.emissiveFactor.z,1),this._emissiveTextureIndex=t.emissiveTextureIndex,this._emissiveTextureCoordIndex=t.emissiveTextureCoordIndex,this._roughnessFactor=t.roughnessFactor,this._metallicFactor=t.metallicFactor,this._metallicRoughnessTextureIndex=t.metallicRoughnessTextureIndex,this._metallicRoughnessTextureCoordIndex=t.metallicRoughnessTextureCoordIndex,this._normalTextureIndex=t.normalTextureIndex,this._normalTextureCoordIndex=t.normalTextureCoordIndex,this._normalTextureScale=t.normalTextureScale,this._occlusionTextureIndex=t.occlusionTextureIndex,this._occlusionTextureCoordIndex=t.occlusionTextureCoordIndex,this._occlusionTextureStrength=t.occlusionTextureStrength,this._baseColorTextureMotion=new _0x44af5c(t.baseColorTextureMotion),this._emissiveTextureMotion=new _0x44af5c(t.emissiveTextureMotion)}};var _0x408d87={};function _0x4656d1(e,t,i){for(var n in i)if(i.hasOwnProperty(n)){var r=i[n],o=Number(n);t.setBatchedAttribute(o,0,r)}t.update(e)}function _0x244ea9(e,t,i,n,r,o){var a=r[n];if(e$2e(a)){for(var s=_0xa08fda.get(e,t,i,a);e$2e(a)&&e$2e(s)&&!s.renderable;)s.refCount--,a=r[a],s=_0xa08fda.get(e,t,i,a);return o.name=a,s}}function _0x4e95ec(e){var t=e.indexOf(".");return e.substr(0,t)}_0x1772f5.prototype.createBakeTexture=function(e,t,i,n,r,o,a,s){if(!this._createdBaker){this.textureParameterBake={context:e,layer:t,isRoot:i,rootName:n,curTextureName:r,textureInfo:o,rootBatchIdMap:a,ancestorMap:s};var l=t._textureLod;this._createdBaker=!0,this._subRequestedBaker=i&&l;var u=o.textureData,c=V$12.RGBA_DXT5,h=_0xa08fda.create({context:e,layerId:t.id,rootName:n,textureId:o.id,width:o.width,height:o.height,compressType:o.compressType,supportCompressType:t._supportCompressType,pixelFormat:o.format,internalFormat:c,arrayBufferView:u});h.renderable=i&&l;var d=o.subTexInfos.length,f=a[o.rootTextureName];if(this._textures.push(h),l){var p=[{functionName:"czm_batchTable_xywh_BakeTex",componentDatatype:S$14.FLOAT,componentsPerAttribute:4}],_=e$2e(f)?Object.keys(f).length:d;this._batchTableBake=new h$X(e,p,_),this._batchTableBake.useUBO=!0,this._batchTableBake.useForMaterial=!0,this._batchTableBake.suffix="_bakeTex";var m=_0x408d87[t.name];e$2e(m)||(m=_0x408d87[t.name]={});var g=m[n];e$2e(g)||(g=m[n]={});var x=g[r];e$2e(x)||(x=g[r]={});for(var y=o.subTexInfos,v=0;v<d;v++){var $=y[v],b=$.subName.split("_")[0],T=new e$2c($.offsetX,$.offsetY,$.width,$.height);x[b]=T}}if(!i||!l){this._subRequestNamesBake=[];for(v=0;v<o.requestNames.length;v++){var C=o.requestNames[v],S=_0x4e95ec(C);if("Tex"===S.split("_")[0]){var w=C.split("#"),E=_0x4e95ec(w[0]);if(w.length>1)for(var P=w[1],A=P.length,L=0;L<A;L+=3){var M=E+"_"+P.substring(L,L+3);this._subRequestNamesBake.push(M)}}else this._subRequestNamesBake.push(S)}}return this._oriTextureBake=h,h}},_0x1772f5.prototype.initTexture=function(){if(!this.textureInitilized&&e$2e(this.textureParameter)){this.textureInitilized=!0;var e=this.textureParameter.context,t=this.textureParameter.layer,i=this.textureParameter.isRoot,n=this.textureParameter.rootName,r=this.textureParameter.curTextureName,o=this.textureParameter.textureInfo,a=this.textureParameter.rootBatchIdMap,s=this.textureParameter.ancestorMap;this.textureParameter=void 0;var l={},u=a[o.rootTextureName],c=i||!t._textureLod?void 0:_0x244ea9(e.id,t.id,n,r,s,l),h=_0x408d87[t.name];e$2e(h)||(h=_0x408d87[t.name]={});var d=h[n];e$2e(d)||(d=h[n]={});var f=d[r];e$2e(f)||(f=d[r]={});for(var p=i?void 0:e$2e(l.name)?d[l.name]:void 0,_={},m=o.subTexInfos,g=[],x=o.subTexInfos.length,y=0;y<x;y++){var v=m[y];if(g.push(v.subName),t._textureLod){var $=v.subName.split("_")[0],b=new e$2c(v.offsetX,v.offsetY,v.width,v.height),T=e$2e(u)?u[$]:y,C=i?void 0:e$2e(p)?p[$]:void 0,S=e$2e(C)?C:b;this._batchTable.setBatchedAttribute(T,0,S),_[T]=b,f[$]=b}}this._subTexInfos=m,this._subTextureNames=g,this._subBatchValues=_,this._ancestorTexture=c}},_0x1772f5.prototype.initBakeTexture=function(){if(!this.textureBakeInitilized&&e$2e(this.textureParameterBake)){this.textureBakeInitilized=!0;var e=this.textureParameterBake.context,t=this.textureParameterBake.layer,i=this.textureParameterBake.isRoot,n=this.textureParameterBake.rootName,r=this.textureParameterBake.curTextureName,o=this.textureParameterBake.textureInfo,a=this.textureParameterBake.rootBatchIdMap,s=this.textureParameterBake.ancestorMap;this.textureParameterBake=void 0;var l={},u=a[o.rootTextureName],c=i||!t._textureLod?void 0:_0x244ea9(e.id,t.id,n,r,s,l),h=_0x408d87[t.name];e$2e(h)||(h=_0x408d87[t.name]={});var d=h[n];e$2e(d)||(d=h[n]={});var f=d[r];e$2e(f)||(f=d[r]={});for(var p=i?void 0:e$2e(l.name)?d[l.name]:void 0,_={},m=o.subTexInfos,g=[],x=o.subTexInfos.length,y=0;y<x;y++){var v=m[y];if(g.push(v.subName),t._textureLod){var $=v.subName.split("_")[0],b=new e$2c(v.offsetX,v.offsetY,v.width,v.height),T=e$2e(u)?u[$]:y,C=i?void 0:e$2e(p)?p[$]:void 0,S=e$2e(C)?C:b;this._batchTableBake.setBatchedAttribute(T,0,S),_[T]=b,f[$]=b}}this._subTexInfosBake=m,this._subTextureNamesBake=g,this._subBatchValuesBake=_,this._ancestorTextureBake=c}},_0x1772f5.prototype.createTexture=function(e,t,i,n,r,o,a,s){if(!this._created){this.isCrnTexture=o.compressType===_0x2ddc8c.CRN_DXT5,this.textureParameter={context:e,layer:t,isRoot:i,rootName:n,curTextureName:r,textureInfo:o,rootBatchIdMap:a,ancestorMap:s};var l=t._textureLod;this.isRoot=i&&l,this._created=!0,this._subRequested=i&&l;var u=o.textureData,c=V$12.RGBA_DXT5,h=_0xa08fda.create({context:e,layerId:t.id,rootName:n,textureId:o.id,width:o.width,height:o.height,compressType:o.compressType,supportCompressType:t._supportCompressType,pixelFormat:o.format,internalFormat:c,arrayBufferView:u});h.renderable=i&&l;var d=o.subTexInfos.length,f=a[o.rootTextureName];if(this._textures.push(h),l){var p=[{functionName:"czm_batchTable_xywh_BaseTex",componentDatatype:S$14.FLOAT,componentsPerAttribute:4}],_=e$2e(f)?Object.keys(f).length:d;this._batchTable=new h$X(e,p,_),this._batchTable.useUBO=!0,this._batchTable.useForMaterial=!0,this._batchTable.suffix="_baseTex";var m=_0x408d87[t.name];e$2e(m)||(m=_0x408d87[t.name]={});var g=m[n];e$2e(g)||(g=m[n]={});var x=g[r];e$2e(x)||(x=g[r]={});for(var y=o.subTexInfos,v=0;v<d;v++){var $=y[v],b=$.subName.split("_")[0],T=new e$2c($.offsetX,$.offsetY,$.width,$.height);x[b]=T}}if(!i||!l){this._subRequestNames=[];for(v=0;v<o.requestNames.length;v++){var C=o.requestNames[v],S=_0x4e95ec(C);if("Tex"===S.split("_")[0]){var w=C.split("#"),E=_0x4e95ec(w[0]);if(w.length>1)for(var P=w[1],A=P.length,L=0;L<A;L+=3){var M=E+"_"+P.substring(L,L+3);this._subRequestNames.push(M)}}else this._subRequestNames.push(S)}}return this.isLeaf=!(i&&l||1===o.requestNames.length&&o.requestNames[0]===r),this._oriTexture=h,h}},_0x1772f5.prototype.requestSubTextures=function(e,t,i,n){if(!this._subRequested&&e$2e(this._subRequestNames)){for(var r=this._subRequestNames,o=this._subTexInfos,a=this._subTextureNames,s=this._subBatchValues,l=this._oriTexture,u=[],c=i._baseUri,h=t._subTextureManager,d=0,f=r.length;d<f;d++){var p=r[d];if(e$2e(g=h.get(i._id,c,p,this))){var _=g.result;for(var m in u.push(d),_)if(_.hasOwnProperty(m)){var g=_[m],x=a.indexOf(m);if(x<0&&this.isLeaf)continue;var y=0,v=0,$=g.width,b=g.height;if(x>=0){var T=o[x];y=T.offsetX,v=T.offsetY}this.isLeaf?n.enqueue({texture:l,subTextureInfo:{xOffset:y,yOffset:v,width:$,height:b,arrayBufferView:g.arrayBufferView}}):l.arrayBufferView=g.arrayBufferView}}}if(u.length===r.length)r.length=0;else{var C=0;for(d=0,f=u.length;d<f;d++)r.splice(u[d]-C,1),C++}0===r.length&&(this.textureRenderableFlag=!0,this.isLeaf||l.init(),i._textureLod&&_0x4656d1(e,this._batchTable,s),this._subRequested=!0,this._subRequestNames=void 0,this._subTextureNames=void 0,this._subBatchValues=void 0,this._subTexInfos=void 0)}},_0x1772f5.prototype.requestBakeSubTextures=function(e,t,i,n){if(!this._subRequestedBaker&&e$2e(this._subRequestNamesBake)){for(var r=this._subRequestNamesBake,o=this._subTexInfosBake,a=this._subTextureNamesBake,s=this._subBatchValuesBake,l=this._oriTextureBake,u=[],c=i._baseUri,h=t._subTextureManager,d=0,f=r.length;d<f;d++){var p=r[d];if(e$2e(g=h.get(i._id,c,p,this))){var _=g.result;for(var m in u.push(d),_)if(_.hasOwnProperty(m)){var g=_[m],x=a.indexOf(m);if(x<0&&this.isLeaf)continue;var y=0,v=0,$=g.width,b=g.height;if(x>=0){var T=o[x];y=T.offsetX,v=T.offsetY}n.enqueue({texture:l,subTextureInfo:{xOffset:y,yOffset:v,width:$,height:b,arrayBufferView:g.arrayBufferView}})}}}if(u.length===r.length)r.length=0;else{var C=0;for(d=0,f=u.length;d<f;d++)r.splice(u[d]-C,1),C++}0===r.length&&(this.textureBakeRenderableFlag=!0,this.isLeaf||l.init(),this._subRequestedBaker=!0,this._subRequestNamesBake=void 0,this._subTextureNamesBake=void 0,this._subBatchValuesBake=void 0,this._subTexInfosBake=void 0,i._textureLod&&_0x4656d1(e,this._batchTableBake,s))}},_0x1772f5.prototype.enableTextureRenderable=function(){if(this.textureRenderableFlag){this.textureRenderableFlag=!1;var e=this._oriTexture;e.renderable=!0,e$2e(this._ancestorTexture)&&this._ancestorTexture.textureId!==e.textureId&&_0xa08fda.del(this._ancestorTexture),this._textures[0]=e,this._oriTexture=void 0,this._ancestorTexture=void 0}},_0x1772f5.prototype.enableBakeTextureRenderable=function(){if(this.textureBakeRenderableFlag){this.textureBakeRenderableFlag=!1;var e=this._oriTextureBake;e.renderable=!0,e$2e(this._ancestorTextureBake)&&this._ancestorTextureBake.textureId!==e.textureId&&_0xa08fda.del(this._ancestorTextureBake),this._textures[1]=e,this._oriTextureBake=void 0,this._ancestorTextureBake=void 0}},_0x1772f5.prototype.isDestroyed=function(){return!1},_0x1772f5.prototype.destroy=function(e){this._ambientColor=null,this._diffuseColor=null,this._specularColor=null;for(var t=0,i=this._textures.length;t<i;t++){var n=this._textures[t];_0xa08fda.del(n)}this._textures.length=0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._batchTableBake=this._batchTableBake&&this._batchTableBake.destroy(),this._subTexInfos=void 0,this._subTextureNames=void 0,this._subBatchValues=void 0,this._subTextureNamesBake=void 0,this._subTexInfosBake=void 0,e$2e(this._ancestorTexture)&&this._ancestorTexture.textureId!==this._oriTexture.textureId&&_0xa08fda.del(this._ancestorTexture),this._oriTexture=void 0,this._ancestorTexture=void 0,this.ownerEntity=void 0,this.textureParameter=void 0,this._oriTextureBake=void 0;var r=e._context;if(e$2e(this._subRequestNames)){for(t=0,i=this._subRequestNames.length;t<i;t++){var o=(a=this._subRequestNames[t]).split(".")[0];o=(s=a.indexOf("%23"))>-1?o+a.substring(s):o,r._subTextureManager.del(e._id,o)}this._subRequestNames=void 0}if(e$2e(this._subRequestNamesBake)){for(t=0,i=this._subRequestNamesBake.length;t<i;t++){var a,s;o=(a=this._subRequestNamesBake[t]).split(".")[0];o=(s=a.indexOf("%23"))>-1?o+a.substring(s):o,r._subTextureManager.del(e._id,o)}this._subRequestNames=void 0}if(e$2e(this.taskMap))for(var l in this.taskMap)if(this.taskMap.hasOwnProperty(l)){var u=this.taskMap[l];_0x29d1c7.cancelTask(u)}return this.taskMap=void 0,i$11(this)};var _0x1d7c4a=(_0x3892d7=!0,function(e,t){var i=_0x3892d7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3892d7=!1,i}),_0x1e6a32=_0x1d7c4a(void 0,(function(){return _0x1e6a32.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e6a32).search("(((.+)+)+)+$")})),_0x3892d7;function _0x27114a(){this.cache={}}function h$Q(){this.head=void 0,this.tail=void 0,this._length=0}function r$T(e,t,i){this.item=e,this.previous=t,this.next=i}function n$I(e,t){e$2e(t.previous)&&e$2e(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):e$2e(t.previous)?(t.previous.next=void 0,e.tail=t.previous):e$2e(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}_0x1e6a32(),_0x27114a.prototype.create=function(e){var t=this.cache[e];return e$2e(t)?t._refCount++:(t=new _0x1772f5,this.cache[e]=t),t},_0x27114a.prototype.free=function(e,t){var i=this.cache[t];!e$2e(i)||0==--i._refCount&&(delete this.cache[t],i.destroy(e))},Object.defineProperties(h$Q.prototype,{length:{get:function(){return this._length}}}),h$Q.prototype.add=function(e){var t=new r$T(e,this.tail,void 0);return e$2e(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t},h$Q.prototype.addToHead=function(e){var t=new r$T(e,void 0,this.head);return e$2e(this.head)?(this.head.previous=t,this.head=t):(this.head=t,this.tail=t),++this._length,t},h$Q.prototype.remove=function(e){!e$2e(e)||(n$I(this,e),--this._length)},h$Q.prototype.splice=function(e,t){if(e!==t&&e$2e(e)){n$I(this,t);var i=e.next;e.next=t,this.tail===e?this.tail=t:e$2e(i)&&(i.previous=t),t.next=i,t.previous=e}},h$Q.prototype.moveNodeBefore=function(e,t){if(e!==t){n$I(this,t);var i=e.previous;e.previous=t,this.head===e?this.head=t:i.next=t,t.next=e,t.previous=i}};var _0x52c300=(_0x30fb2d=!0,function(e,t){var i=_0x30fb2d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30fb2d=!1,i}),_0xff0221=_0x52c300(void 0,(function(){return _0xff0221.toString().search("(((.+)+)+)+$").toString().constructor(_0xff0221).search("(((.+)+)+)+$")})),_0x30fb2d;_0xff0221();var _0x3b8128={UnLoad:0,Loading:1,Loaded:2,Parsing:3,Ready:4,Failed:5};function _0x57fbd1(){this.state={},this.cache={},this.zipBufferCache={},this.list=new h$Q,this.requests=[],this.requestPriorityMap={},this.requestMap={},this.parseTaskMap={},this.tablenames=[],this.indexedDBSchedulers=[]}var _0x5f224e=0,_0x49c5af=209715200;_0x57fbd1.prototype.prepareRequest=function(e,t,i,n,r){var o=e+"_"+i;if(!e$2e(this.requestMap[o])){var a=t+i+".texblock",s=new r$1c({url:a,throttle:!0,throttleByServer:!0,type:4,priorityFunction:function(){return n._disFromCamera}});s.quadKey=i,s.providerName=r.ownerLayerName;var l=this.requestPriorityMap[n._priority];e$2e(l)||(l=this.requestPriorityMap[n._priority]=[]),l.push({request:s,url:a,keyWord:o,priority:s.priorityFunction()}),this.requestMap[o]=s}};var _0x5d4209=function(e,t){return e.priority-t.priority};function _0x5b7899(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(!(t>r-1||r>256)){n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e).slice(n,n+a).buffer;n+=a}}}function _0x113d87(e){return function(){return e._disFromCamera}}function f$Q(e){if(!e$2e(e))throw new t$15("uri is required.");var t=new h$16(e);t.normalize();var i=t.path,n=i.lastIndexOf("/");return-1!==n&&(i=i.substr(n+1)),i}_0x57fbd1.prototype.processRequests=function(e){var t=0;for(var i in this.requestPriorityMap)if(this.requestPriorityMap.hasOwnProperty(i)){if(t===r$1b.perPacketCount){for(var n=0,r=(a=this.requestPriorityMap[i]).length;n<r;n++){var o=a[n];delete this.requestMap[o.keyWord]}continue}var a;(a=this.requestPriorityMap[i]).sort(_0x5d4209);for(n=0,r=a.length;n<r;n++){o=a[n];if(this.load(o,e),++t===r$1b.perPacketCount)break}for(;n<r;n++){o=a[n];delete this.requestMap[o.keyWord]}}this.requestPriorityMap={}},_0x57fbd1.prototype.load=function(e,t){var i=this.tablenames[t.id];if(!e$2e(i))return this.request(e,t);var n=e.keyWord,r=this,o=n.indexOf("_"),a=this.indexedDBSchedulers[t.id].getElementFromDB(i,n.slice(o+1));return e$2e(a)?a.then((function(i){if(!e$2e(i))return r.request(e,t);var o={keyWord:t.id+"_"+i.keyWord,result:i.result,byteLength:i.byteLength},a=r.list.add(o);r.cache[n]=a,r.state[n]=_0x3b8128.Ready,delete r.state[n],delete r.parseTaskMap[n],_0x5f224e+=i.byteLength;for(var s=r.list.head;_0x5f224e>_0x49c5af;){var l=s,u=s.item.keyWord,c=r.cache[u].item;_0x5f224e-=c.byteLength,delete r.cache[u],s=s.next,r.list.remove(l)}}),(function(i){return r.request(e,t)})):r.request(e,t)},_0x57fbd1.prototype.request=function(e,t){var i=e.keyWord,n=e.request,r=o$10(e.url,void 0,n);if(e$2e(r)){this.state[i]=_0x3b8128.Loading;var o=this;r.then((function(e){if(t._layerScheduler._prepareLoaded||t._layerScheduler.dealWithPrepareLoad(e.byteLength),delete o.requestMap[i],e$2e(o.state[i])){o.state[i]=_0x3b8128.Loaded;var r=_0x5b7899(e,n.quadKeyIndex);if(!e$2e(r))return delete o.requestMap[i],void(o.state[i]=_0x3b8128.Failed);var a=new Uint8Array(r),s=new DataView(r),l=0,u=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT,o.zipBufferCache[i]=[];for(var c=0;c<u;c++){var h=s.getUint32(l,!0),d=a$K(a,l+=Uint32Array.BYTES_PER_ELEMENT,h);l+=h;var f=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var p=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var _=new Uint8Array(r).slice(l,l+p);o.zipBufferCache[i].push({unzipLength:f,zippedLength:p,zipBuffer:_,name:d}),l+=p}}}),(function(e){delete o.requestMap[i],o.state[i]=e$2e(e)?_0x3b8128.Failed:_0x3b8128.UnLoad}))}else delete this.requestMap[i]},_0x57fbd1.prototype.parse=function(e,t){if(!this.parseTaskMap[e]){var i=this.zipBufferCache[e];if(!e$2e(i))return void(this.state[e]=_0x3b8128.UnLoad);var n=t.taskMap[e];e$2e(n)||(n=t.taskMap[e]={data:{data:i,isCRN:t.isCrnTexture},priority:t.ownerEntity._disFromCamera,state:0,priorityFunction:_0x113d87(t.ownerEntity),processorName:"UnZipData"});var r=_0x29d1c7.startTask(n);if(e$2e(r)){this.parseTaskMap[e]=!0,this.state[e]=_0x3b8128.Parsing;var o=this;r.then((function(i){try{delete o.zipBufferCache[e],delete t.taskMap[e];for(var n=i.data,r={},a=0;a<n.length;a++){var s=n[a],l=s.name,u=new Uint8Array(s.unzipBuffer).buffer,c=new DataView(u),h=0;c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var d=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var f=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var p=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var _=new Uint8Array(u,h,p);h+=p,r[l]={width:d,height:f,arrayBufferView:_}}var m={keyWord:e,result:r,byteLength:u.byteLength},g=o.list.add(m);o.cache[e]=g,o.state[e]=_0x3b8128.Ready;var x=e.indexOf("_"),y=e.slice(0,x),v=e.slice(x+1);if(e$2e(o.indexedDBSchedulers[y])){var $={blob:{keyWord:v,result:r,byteLength:u.byteLength},key:v,tablename:o.tablenames[y],dbname:o.indexedDBSchedulers[y].dbname};_0x29d1c7.indexTaskProcessor.scheduleTask($,[])}delete o.state[e],delete t.taskMap[e],delete o.parseTaskMap[e],_0x5f224e+=u.byteLength;for(var b=o.list.head;_0x5f224e>_0x49c5af;){var T=b.item,C=b,S=T.keyWord,w=o.cache[S].item;_0x5f224e-=w.byteLength,delete o.cache[S],b=b.next,o.list.remove(C)}}catch(e){console.log(e),console.log(t.ownerEntity)}})).otherwise((function(i){delete t.taskMap[e],delete o.parseTaskMap[e],e$2e(o.state)&&(e$2e(i)?(console.log(i),o.state[e]=_0x3b8128.Failed):o.state[e]=_0x3b8128.Loaded)}))}}},_0x57fbd1.prototype.get=function(e,t,i,n){var r=e+"_"+i,o=this.cache[r];if(e$2e(o))return this.list.splice(this.list.tail,o),o.item;var a=this.state[r];e$2e(a)||(a=this.state[r]=_0x3b8128.UnLoad),a===_0x3b8128.UnLoad&&this.prepareRequest(e,t,i,n.ownerEntity,n),a===_0x3b8128.Loaded&&this.parse(r,n)},_0x57fbd1.prototype.del=function(e,t){var i=e+"_"+t;delete this.state[i],delete this.zipBufferCache[i];var n=this.requestMap[i];e$2e(n)&&(n.cancelled=!0,delete this.requestMap[i])};var _0x32121c=(_0x4d1aeb=!0,function(e,t){var i=_0x4d1aeb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d1aeb=!1,i}),_0x4f506a=_0x32121c(void 0,(function(){return _0x4f506a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f506a).search("(((.+)+)+)+$")})),_0x4d1aeb;_0x4f506a();var _0x4650ab=null,_0x3fb3db=null;function _0x1393e5(){this._taskProcessorReady=!1}function _0x374b51(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a,s,l,u,c=r[o],h=4*o,d=new e$2c(0,0,0,0);if(c>=0&&c<=1){c<e$2d.EPSILON9?c=e$2d.EPSILON9:1-c<e$2d.EPSILON9&&(c=1-e$2d.EPSILON9);var f=_0x3544ae(c);d.x=f.x,d.y=f.y,d.z=f.z,d.w=1}a=255*d.x,s=255*d.y,l=255*d.z,u=255*d.w,e$2e(i)&&!0===i?(e[h+0]=l,e[h+1]=s,e[h+2]=a,e[h+3]=u):(e[h+0]=a,e[h+1]=s,e[h+2]=l,e[h+3]=u)}return new Uint8Array(e.buffer,0,e.length)}function _0x1f936b(e,t,i){for(var n=new Uint8Array(4*e.length),r=0;r<e.length;r++){var o,a,s,l,u=e[r],c=4*r,h=new e$2c(0,0,0,0);if(u>=0&&u<=1){var d=_0x3544ae(u);h.x=d.x,h.y=d.y,h.z=d.z,h.w=1}o=255*h.x,a=255*h.y,s=255*h.z,l=255*h.w,e$2e(i)&&!0===i?(n[c+0]=parseInt(s),n[c+1]=parseInt(a),n[c+2]=parseInt(o),n[c+3]=parseInt(l)):(n[c+0]=parseInt(o),n[c+1]=parseInt(a),n[c+2]=parseInt(s),n[c+3]=parseInt(l))}return n}function _0x5cba00(e,t){for(var i=e.length/4,n=new Float32Array(e.buffer,e.byteOffset,i),r=0;r<n.length;r++){var o=n[r],a=4*r;if(o<0||o>1)e[a+0]=255,e[a+1]=255,e[a+2]=255,e[a+3]=255;else{o=o*(t._ceiling-t._floor)+t._floor;var s=t._dictColorTable.getColor(o);e[a+0]=255*s.red,e[a+1]=255*s.green,e[a+2]=255*s.blue,e[a+3]=255*s.alpha}}return new Uint8Array(e.buffer,0,e.length)}function _0x1529b5(e,t){var i=e.length/4;return _0x170c57(new Float32Array(e.buffer,e.byteOffset,i),t)}function _0x3544ae(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function _0x38d644(e,t){for(var i=new Uint8Array(4*e.length),n=t._ceiling-t._floor,r=0,o=e.length;r<o;r++){var a=e[r],s=4*r;if(a<0||a>1)i[s+0]=255,i[s+1]=255,i[s+2]=255,i[s+3]=255;else{a=a*n+t._floor;var l=t._dictColorTable.getColor(a);i[s+0]=255*l.red,i[s+1]=255*l.green,i[s+2]=255*l.blue,i[s+3]=255*l.alpha}}return i}function _0x170c57(e,t){var i=e,n=i.length,r=_0x3c481f._malloc(Float32Array.BYTES_PER_ELEMENT*n);_0x3c481f.HEAPF32.set(i,r/Float32Array.BYTES_PER_ELEMENT);var o=t._ceiling,a=t._floor,s=t._dictColorTable._dictTable._hash,l=[],u=[];for(var c in s)l.push(parseFloat(c));l.sort((function(e,t){return e-t}));for(var h=0,d=l.length;h<d;h++)u.push(s[l[h]]);var f=new ArrayBuffer(4*l.length),p=new Uint8Array(f),_=0;for(d=l.length;_<d;_++){var m=u[_];p[4*_]=255*m.red,p[4*_+1]=255*m.green,p[4*_+2]=255*m.blue,p[4*_+3]=255*m.alpha}var g=new Float32Array(f),x=(c=new Float32Array(l)).length,y=_0x3c481f._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x3c481f.HEAPF32.set(c,y/Float32Array.BYTES_PER_ELEMENT);var v=_0x3c481f._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x3c481f.HEAPF32.set(g,v/Float32Array.BYTES_PER_ELEMENT);var $=_0x4650ab(r,n,o,a,y,v,x),b=new Uint8Array(_0x3c481f.HEAPU8.buffer,$,4*n);return _0x3fb3db($),_0x3c481f._free(r),_0x3c481f._free(y),_0x3c481f._free(v),b}function _0x38792f(e,t,i,n){var r=p$1d.multiply(t,i,new p$1d),o=e.vertexAttributes[0],a=o.typedArray,s=new Float32Array(a.buffer,a.byteOffset,a.byteLength/4),l=o.componentsPerAttribute,u=e.verticesCount,c=new Float32Array(3*u),h=e.attrLocation;h.aRatio=Object.keys(h).length;for(var d=0;d<u;d++){var f=new o$1p(s[d*l],s[d*l+1],s[d*l+2]),p=new o$1p;p$1d.multiplyByPoint(r,f,p);var _=a$18.fromCartesian(p),m=e$2d.toDegrees(_.longitude),g=e$2d.toDegrees(_.latitude),x=_.height,y=(m-n.left)/n.width,v=(g-n.bottom)/n.length,$=(x-n.minHeight)/n.height;c[3*d]=y,c[3*d+1]=v,c[3*d+2]=$}e.vertexAttributes.push({index:h.aRatio,typedArray:c,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0x5d6a23(e,t,i){e._version=i.version,e._dataVersion=i.dataVersion,e._gl;var n=i.groupNode,r=i.geoPackage,o=i.matrials.material,a=e._context,s=e.materialManager;if(e$2e(s)||(s=e.materialManager=new _0x27114a),e$2e(a._subTextureManager)||(a._subTextureManager=new _0x57fbd1),e.indexedDBSetting.isGeoTilesSave&&!e$2e(a._subTextureManager.indexedDBSchedulers[e.id])&&e$2e(e._layerScheduler._indexedDBScheduler)&&(a._subTextureManager.indexedDBSchedulers[e.id]=e._layerScheduler._indexedDBScheduler,a._subTextureManager.tablenames[e.id]=e._layerScheduler.tablename+"Texture"),e._layerScheduler._prepareLoaded||!t._prepareLoad)for(var l=0,u=o.length;l<u;l++){var c=o[l].material,h=c.id,d=s.create(h);d.createPBRParamter(c),d.ownerLayerName=e.name,d.ownerEntity=t;var f=c.ambient;e$2e(f)&&(d._ambientColor=new e$1X(f.r,f.g,f.b,f.a));var p=c.diffuse;e$2e(p)&&(d._diffuseColor=new e$1X(p.r,p.g,p.b,p.a));var _=c.specular;e$2e(_)&&(d._specularColor=new e$1X(_.r,_.g,_.b,_.a)),d._shininess=u$Z(c.shininess,d._shininess),d._bTransparentSorting=u$Z(c.transparentsorting,!1),d.id=h;for(var m=c.textureunitstates,g=0;g<m.length;g++){var x=m[g].textureunitstate,y=x.id;0===x.addressmode.u?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,0===x.addressmode.v?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;var v,$=i.texturePackage[y];if(e$2e($))e$2e(v=0===g?d.createTexture(a,e,t._isRootTile,t._rootName,y,$,i.rootBatchIdMap,i.ancestorMap):d.createBakeTexture(a,e,t._isRootTile,t._rootName,y,$,i.rootBatchIdMap,i.ancestorMap))&&(t._texturesByteLength+=v._sizeInBytes)}}var b=e._matModel,T=n.pageLods,C=!0;for(l=0;l<T.length;l++){var S=new _0x4d13e0;S._fileType=e._fileType;var w=T[l];if(""===w.childTile?S._isLeafNode=!0:C=!1,S._rangeMode=w.rangeMode,S._rangeDataList=w.childTile,S._rangeList=w.rangeList,-1===w.boundingSphere.radius&&(w.boundingSphere.radius=6378137),S._isLeafNode||(S._boundingSphere=new i$1d(w.boundingSphere.center,w.boundingSphere.radius),i$1d.transform(S._boundingSphere,e._matModel,S._boundingSphere)),e$2e(w._obb)){var E=o$1p.fromElements(w._obb.obbCenter.x,w._obb.obbCenter.y,w._obb.obbCenter.z);p$1d.multiplyByPoint(e._matModel,E,E);var P=e$2c.fromElements(w._obb.xExtent.x,w._obb.xExtent.y,w._obb.xExtent.z,0),A=e$2c.fromElements(w._obb.yExtent.x,w._obb.yExtent.y,w._obb.yExtent.z,0),L=e$2c.fromElements(w._obb.zExtent.x,w._obb.zExtent.y,w._obb.zExtent.z,0);p$1d.multiplyByVector(e._matModel,P,P),p$1d.multiplyByVector(e._matModel,A,A),p$1d.multiplyByVector(e._matModel,L,L),e$2c.equals(P,e$2c.ZERO)&&(P=new e$2c(1,0,0,0)),e$2c.equals(A,e$2c.ZERO)&&(A=new e$2c(0,1,0,0)),e$2c.equals(L,e$2c.ZERO)&&(L=new e$2c(0,0,1,0));var M=new p$1e(P.x,A.x,L.x,P.y,A.y,L.y,P.z,A.z,L.z);S._orientedBoundingBox=new y$Y(E,M)}var R=w.geodes,O=[];if(e._layerScheduler._prepareLoaded||!t._prepareLoad)for(var D=0;D<R.length;D++){var I,F=R[D],B=F.matrix;if(1===e._heightScale)I=p$1d.multiply(b,B,new p$1d);else{var N=p$1d.multiplyByScale(B,new o$1p(1,1,e._heightScale),new p$1d);I=p$1d.multiply(b,N,new p$1d)}B=p$1d.unpack(B);for(var G=F.skeletonNames,z=0;z<G.length;z++){var U=G[z],V=r[U],k=V.vertexPackage;if(_0x22f70b(V,e)){var W;if(S._isLeafNode){var H=k.boundingSphere;e$2e(H)?(W=new i$1d(H.center,H.radius),i$1d.transform(W,I,W)):W=_0x3ad44f.calcBoundingSphere(e,k,I),O.push(W)}var q=_0x3ad44f.calcBoundingRectangle(e,k),j=V.arrIndexPackage,X=V.pickInfo,Y={};for(u=0;u<j.length&&u<1;u++){var Z=j[u];if(e$2e(Z)){h=Z.materialCode;var K=s.create(h);Y[h]=K}}var Q={context:e._context,vertexPackage:k,arrIndexPackage:j,edgeGeometry:V.edgeGeometry,pickInfo:X,version:i.version,mapPass:Y,layer:e,entity:t,matModel:I,boundingVolume:S._boundingSphere?S._boundingSphere:W,boundingRectangle:q,volObj:null,fileType:e._fileType,isS3MB:e._isS3MB,geoMatrix:B,dataType:e._dataType,level:e._level,geoName:U,isS3MBlock:!0};if(e$2e(e.themeStyle)){var J=_0x1a0b3c.createRenderEntityPageLOD(Q,e);S._renderEntityList=S._renderEntityList.concat(J)}else{var ee=new _0x4881fc(Q);if(e._imageryLayer instanceof Array){for(var te=[],ie=0;ie<e._imageryLayer.length;ie++){var ne=e._imageryLayer[ie];if(e$2e(ne)&&(ne instanceof h$R||ne instanceof i$P)){var re=ne.getImagery(V.cartographicBounds);te=te.concat(re)}}te.length>0&&ee.setImagerys(te,V.cartographicBounds)}else{if(e$2e(e._imageryLayer)&&(e._imageryLayer instanceof h$R||e._imageryLayer instanceof i$P))((te=e._imageryLayer.getImagery(V.cartographicBounds)).length>0||e._needCoverImageryLayer)&&ee.setImagerys(te,V.cartographicBounds)}S._renderEntityList.push(ee)}}}}S._isLeafNode&&(S._boundingSphere=i$1d.fromBoundingSpheres(O,new i$1d)),e$2e(t._pagelodMap[w.childTile])?(t._pagelodMap[w.childTile]._renderEntityList=S._renderEntityList,t._pagelodMap[w.childTile]._ready=!0):(t._childrenPageLod.push(S),e.LoadingPriority===_0x539352.UsePagedLodInfo&&(S._ready=!0,t._childrenPageLod.shift(),S._isLeafNode=!0))}if(t._isLeafTile=C,!e$2e(t._boundingSphere)||t._isLeafTile){for(var oe=[],ae=t._childrenPageLod.length;ae--;)oe.push(t._childrenPageLod[ae]._boundingSphere);t._boundingSphere=i$1d.fromBoundingSpheres(oe),t._oriBoundingSphere=i$1d.clone(t._boundingSphere)}t._s3mLoadState=N$Q.PARSED}function _0x23f2b5(e,t,i){var n=e[i._fileName];if(e$2e(n)){i._blockKey=i._fileName,i._isAncestorBlock=!0,i._rootBatchIdMap=n.rootBatchIdMap,i._ancestorMap=n.ancestorMap,_0x5d6a23(t,i,n);for(var r=[i];r.length;)for(var o=r.pop(),a=o._childrenPageLod,s=0,l=a.length;s<l;s++){var u=a[s],c=u._rangeDataList;if(""!==c){var h=new _0x128750;if(h.layer=o.layer,h._subdomainIndex=o._subdomainIndex+s+1,h._priority=o._priority-1,h._rootBatchIdMap=e$2e(n)?n.rootBatchIdMap:o._rootBatchIdMap,h._ancestorMap=e$2e(n)?n.ancestorMap:o._ancestorMap,h._rootName=o._rootName,c.indexOf("/")>-1){var d=c.lastIndexOf("/"),f=c.substring(0,d+1);h._fileName=c.substring(d+1),h._relativePath=new Uri(f).resolve(o._relativePath)}else h._relativePath=o._relativePath,h._fileName=c;h._boundingSphere=u._boundingSphere,h._originalBS=u._originalBS,h._orientedBoundingBox=u._orientedBoundingBox,u._entity=h,e$2e(n=e[h._fileName])?(h._blockKey=o._blockKey,h._isChildBlock=!0,_0x5d6a23(t,h,n),r.push(h)):(h._isAncestorBlock=!0,h._blockKey=h._fileName)}}}}function _0x428e80(e){return function(){return e._disFromCamera}}function _0x59d604(e){return e$2e(e.clampRegionEdge)&&e.clampRegionEdge}function _0x22f70b(e,t){var i=e.vertexPackage;if(i.verticesCount<1)return!1;if(t._fileType===p$T.ClampGroundPolygon){var n=t.style3D.fillStyle;return n===fr$3.WireFrame?_0x59d604(i):n!==fr$3.Fill||!_0x59d604(i)}return!0}null!==_0x3c481f&&(_0x4650ab=_0x3c481f.cwrap("floatToTextureColor","number",["number","number","number","number","number","number","number"]),_0x3fb3db=_0x3c481f.cwrap("free_result",null,["number"])),_0x1393e5.parseResult=function(e,t,i,n){t._version=e.version,t._dataVersion=e.dataVersion;var r=t._gl,o=e.groupNode,a=e.geoPackage,s=e.matrials.material,l={},u=[],c=t._context;t._RGBTOBGR;var h=i._fileName.split("_"),d=parseInt(h[1]),f=parseInt(h[2]);if(d=Math.pow(2,t._level)-d-1,t._layerScheduler._prepareLoaded||!i._prepareLoad){if(e$2e(t._imageryLayer))if(t._imageryLayer instanceof Array)for(var p=0;p<t._imageryLayer.length;p++)u.push(t._imageryLayer[p]._imageryProvider._readyPromise);else(t._imageryLayer instanceof h$R||t._imageryLayer instanceof i$P)&&u.push(t._imageryLayer._imageryProvider._readyPromise);for(var _=0,m=s.length;_<m;_++){var g=s[_].material,x=g.id,y=!1;if(e$2e(t._materialMap)){var v=t._materialMap[x];e$2e(v)&&(g=v.material,y=!0)}var $=new _0xf77618({});$.isAssociateMaterial=y,i._tmpMaterialArr.push($),$.createPBRParamter(g),l[x]=$;var b=u$Z(g.ambient,e$1X.WHITE);$._ambientColor=new e$1X(b.r,b.g,b.b,b.a);var T=u$Z(g.diffuse,e$1X.WHITE);$._diffuseColor=new e$1X(T.r,T.g,T.b,T.a);var C=u$Z(g.specular,e$1X.WHITE);$._specularColor=new e$1X(C.r,C.g,C.b,C.a),$._shininess=u$Z(g.shininess,10),$._bTransparentSorting=u$Z(g.transparentsorting,!1),$._alphaMode=g.alphaMode;var S=g.textureunitstates;0===S.length&&t._fileType===p$T.OSGBFile&&($._isInvalidOblique=!0);for(var w=0;w<S.length;w++){var E=S[w].textureunitstate,P=E.id,A=P.indexOf("PBRMaterialParam")>-1,L=$._baseColorTextureIndex===w,M=$._emissiveTextureIndex===w,R=$._normalTextureIndex===w,O=$._metallicRoughnessTextureIndex===w,D=$._occlusionTextureIndex===w;A&&($._usePBRTextureBatch=!0);var I=0===E.addressmode.u?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,F=0===E.addressmode.v?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;0===w&&($._texMatrix=p$1d.unpack(E.texmodmatrix));var B=e.texturePackage[P]||e.texturePackage[P+"\0"],N=P+t._id+t._context._id+i._relativePath.path+i._fileName;if(e$2e(B)&&(N+=B.imageBuffer.length),e$2e(B)&&B.width>0&&B.height>0&&B.imageBuffer.length>0){var G={isPBRMaterialParam:A,isEmissiveTex:M,isNormalTexture:R,isMetallicRoughnessTexture:O,isBaseColorTexture:L};switch(B.compressType){case _0x2ddc8c.WEBP:$._RGBTOBGR=B.nFormat===_0x2ddc8c.ABGR;var z=$.createWebp(N,P,c,w,B.imageBuffer,B.width,B.height,I,F,B.mipmapLevel,t.mipmapEnabled);u.push(z);break;case _0x2ddc8c.CRN_DXT5:if(!e$2e(U=$.createCRN(N,P,c,w,B,I,F,!1,t.mipmapEnabled,G)))return void i.parsingResult;u.push(U);break;case _0x2ddc8c.STANDARD_CRN:var U;if(!e$2e(U=$.createCRN(N,P,c,w,B,I,F,!0,t.mipmapEnabled)))return void i.parsingResult;u.push(U);break;case _0x2ddc8c.KTX2:var V=$.createKTX2(N,P,c,w,B,I,F,t.mipmapEnabled);e$2e(V)&&u.push(V);break;default:var k=Se$e.CreateTexture(N,c,B.width,B.height,B.nFormat,B.compressType,B.imageBuffer,!1,I,F,t.mipmapEnabled,B.oriCompressType);A?$.pbrParamTexture=k:M?$.emissiveTexture=k:R?$.normalTexture=k:O?$.metallicRoughnessTexture=k:D?$.occlusionTexture=k:L?$.baseColorTexture=k:$._textures.push(k)}}else if(t._isTextureShare&&!e$2e(t._materialMap)){N=P+t._id+t._context._id,P.lastIndexOf("\\")>-1&&(P=f$Q(P.replace(/\\/g,"/").replace("png","dxtz"))),P.lastIndexOf("/")>-1&&(P=f$Q(P.replace("png","dxtz")));var W=t._baseUri+"Texture/"+P;e$2e(a$O.CREDENTIAL)&&(W=a$O.addToken(W));var H=$.requestSharedTexture(W,N,P,c,w,t.customRequestHeaders,I,F);if(e$2e(H)&&H instanceof _0x5e76de){k=H;L?$.baseColorTexture=k:M?$.emissiveTexture=k:R?$.normalTexture=k:O?$.metallicRoughnessTexture=k:D&&($.occlusionTexture=k),0==w&&$._textures.length>0?$._textures.splice(0,0,k):$._textures.push(k)}else e$2e(H)&&u.push(H)}if(e$2e(t._maps)&&t._maps.mapNames.length>0){var q=P.substring(0,P.indexOf("."))+"_"+i._fileName+"."+t._maps.mapExts[0],j=i._relativePath.path;i._relativePath.path=t._maps.mapNames[0]+"/"+i._relativePath.path;var X=i._relativePath.resolve(t._baseUri)+q;i._relativePath.path=j,X=X.replace(/\+/g,"%2b");var Y=o$1l.defer(),Z=Y.promise;u.push(Z);var K=o$10(X,void 0);e$2e(K)?function(e,t,i,n){e.then((function(e){if(e$2e(e)){var r=w$R({uint8Array:e,format:"image/webp"});e$2e(r)?(o=t,a=i,s=n,r.then((function(e){if(e$2e(e)){var t=new t$U({context:c,source:e,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({wrapS:I,wrapT:F,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})});t.id=o+"map",a._mapTextures[o]=t,Se$e.textureManager.textures[t.id]=t,Se$e.textureManager.refCounts[t.id]=1}s.resolve(X)}),(function(e){s.resolve()}))):n.resolve(),e=null}else n.resolve();var o,a,s}),(function(e){n.resolve()}))}(K,N,$,Y):Y.resolve()}if("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt){var Q=x+"_"+i._fileName;Q=""!==t._volName?Q+"_"+t._volName:Q,"vol_texture_mapping"===t._strVolumeExt?Q+=".vol":Q+=".png";var J=i._relativePath.resolve(t._baseUri)+Q;if(0!==t.urlType){var ee=t._urlArguments,te=J.indexOf("datas")+5,ie=ee.layer3DName,ne=J.substring(J.indexOf("/path/")+6).split("/"),re=ee.scene3DName,oe=ne[0],ae=ne[1].substring(0,ne[1].indexOf(".")),se=ne[1].substring(ne[1].indexOf(".")+1,ne[1].length);J=J.substring(0,te)+"?layerName="+ie+"&rootTile="+oe+"&tile="+ae+"&suffix="+se+"&scene3DName="+re+"&layer3DName="+ie}var le=void 0;"vol_texture_mapping"===t._strVolumeExt?e$2e(le=o$10(J,void 0))&&function(e,n,r){e.then((function(e){var o;if(e$2e(e)){var a=void 0,s=new Uint8Array(e,8),l=nt$b.inflate(s).buffer;if(1===new Float64Array(l,0,1)[0]){var u=new Uint32Array(l,8,4),c=u[0],h=u[1];u[2];var d=u[3];a={nFormat:c,nWidth:h,nHeight:d,nPixelSize:d,imageArray:new Float32Array(l,24,nCount)}}if(e$2e(a)){var f,p=tt$i.LINEAR,_=rt$k.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(p=tt$i.NEAREST,_=rt$k.NEAREST),t._hypsometricSetting.filterMode===k$S.FilterMode.LINEAR?f=_0x1f936b(a.imageArray,t._hypsometricSetting,!0):(f=null===_0x4650ab?_0x38d644(a.imageArray,t._hypsometricSetting):_0x170c57(a.imageArray,t._hypsometricSetting),(o=new t$U({context:t._context,width:a.nWidth,height:a.nHeight,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({minificationFilter:p,magnificationFilter:_})})).copyForm({width:a.nWidth,height:a.nHeight,arrayBufferView:f}),i._volTexures[n]=o,r.texID2Vol=texureId),e=null}}}),(function(e){}))}(le,N,$):"png"===t._strVolumeExt&&(e$2e(le=t$S(J))&&(e$2e(le=t$S(J))&&function(e,n,r){e.then((function(e){var o;if(e$2e(e)){var a,s=tt$i.LINEAR,l=rt$k.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(s=tt$i.NEAREST,l=rt$k.NEAREST),a=t._hypsometricSetting.filterMode===k$S.FilterMode.LINEAR?_0x1f936b(d$14(e),t._hypsometricSetting,!0):null==_0x4650ab?_0x5cba00(d$14(e),t._hypsometricSetting):_0x1529b5(d$14(e),t._hypsometricSetting),(o=new t$U({context:t._context,width:e.width,height:e.height,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({minificationFilter:s,magnificationFilter:l})})).copyFrom({width:e.width,height:e.height,arrayBufferView:a}),e=null,i._volTextures[n]=o,r.texID2Vol=n}}),(function(e){}))}(le,N,$)))}}}}o$1l.all(u,(function(){if(i._tmpMaterialArr.length=0,i._s3mLoadState!==N$Q.UNLOAD){var n,s;if(e$2e(t._volData)){n=t._volData._volBounds;var u=t._context._id+"_"+t.id+"_layerVol",c=k$S.FilterMode.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(c=k$S.FilterMode.NEAREST),e$2e(t._hypsometricSetting)&&e$2e(t._volData._buffer)&&(c===k$S.FilterMode.NEAREST?null===_0x4650ab?_0x5cba00(t._volData._buffer,t._hypsometricSetting):t._volData._buffer=_0x1529b5(t._volData._buffer,t._hypsometricSetting):_0x374b51(t._volData._buffer,t._hypsometricSetting));var h={};h.nLength=t._volData._nLength,h.imageArray=t._volData._buffer;var p=Se$e.CreateVolumeTexture(u,r,t._context,h,c);delete t._volData._buffer,t._volData._buffer=void 0,s={volTexture:p,nFormat:3201,nSideBlockCount:t._volData._nSideBlockCount,nBlockLength:t._volData._nBlockLength,nLength:t._volData._nLength,nWidth:t._volData._width,nHeight:t._volData._height,nDepth:t._volData._depth,id:u,dataFloor:t._volData._minValue,dataCeil:t._volData._maxValue,volBounds:n},i._volObj=s}else if("vol"===t._strVolumeExt)if(e.volImageBuffer){n=e.volBounds;u=t._context._id+"_"+t.id+"_"+i._relativePath.resolve(t._baseUri)+"_"+i._fileName,c=k$S.FilterMode.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(c=k$S.FilterMode.NEAREST),3201===e.volImageBuffer.nFormat&&e$2e(t._hypsometricSetting)&&(c===k$S.FilterMode.NEAREST?null===_0x4650ab?_0x5cba00(e.volImageBuffer.imageArray,t._hypsometricSetting):e.volImageBuffer.imageArray=_0x1529b5(e.volImageBuffer.imageArray,t._hypsometricSetting):_0x374b51(e.volImageBuffer.imageArray,t._hypsometricSetting)),s={volTexture:p=Se$e.CreateVolumeTexture(u,r,t._context,e.volImageBuffer,c),nFormat:e.volImageBuffer.nFormat,nSideBlockCount:e.volImageBuffer.nSideBlockCount,nBlockLength:e.volImageBuffer.nBlockLength,nLength:e.volImageBuffer.nLength,nWidth:e.volImageBuffer.nWidth,nHeight:e.volImageBuffer.nHeight,nDepth:e.volImageBuffer.nDepth,id:u,dataFloor:t._fMinValue,dataCeil:t._fMaxValue,volBounds:n},delete e.volImageBuffer.imageArray,e.volImageBuffer.imageArray=null,e$2e(i._volObj)&&Se$e.DecRef(i._volObj.id),i._volObj=s}else t._bVolume&&(e$2e(s=i._volObj)&&(n=i._volObj.volBounds));for(var _=t._matModel,m=o.pageLods,g=!0,x=0;x<m.length;x++){var y=new _0x4d13e0;y._fileType=t._fileType;var v=m[x];if(""===v.childTile?y._isLeafNode=!0:g=!1,y._rangeMode=v.rangeMode,y._rangeDataList=v.childTile,y._rangeList=v.rangeList,-1===v.boundingSphere.radius&&(v.boundingSphere.radius=6378137),v.boundingSphere&&(t._dataVersion>2||!y._isLeafNode)&&(y._boundingSphere=new i$1d(v.boundingSphere.center,v.boundingSphere.radius),y._originalBS=new i$1d(v.boundingSphere.center,v.boundingSphere.radius),i$1d.transform(y._boundingSphere,t._matModel,y._boundingSphere)),e$2e(v._obb)){var $=o$1p.fromElements(v._obb.obbCenter.x,v._obb.obbCenter.y,v._obb.obbCenter.z),b=e$2c.fromElements(v._obb.xExtent.x,v._obb.xExtent.y,v._obb.xExtent.z,0),T=e$2c.fromElements(v._obb.yExtent.x,v._obb.yExtent.y,v._obb.yExtent.z,0),C=e$2c.fromElements(v._obb.zExtent.x,v._obb.zExtent.y,v._obb.zExtent.z,0),S=new p$1e(b.x,T.x,C.x,b.y,T.y,C.y,b.z,T.z,C.z);y._orientedBoundingBox=new y$Y($,S),y._orientedBoundingBox._updateBBox(),y.min=y._orientedBoundingBox.bbox[0].clone(),y.max=y._orientedBoundingBox.bbox[0].clone();for(var w,E=1;E<8;E++)w=y._orientedBoundingBox.bbox[E],y.min.x>w.x&&(y.min.x=w.x),y.min.y>w.y&&(y.min.y=w.y),y.min.z>w.z&&(y.min.z=w.z),y.max.x<w.x&&(y.max.x=w.x),y.max.y<w.y&&(y.max.y=w.y),y.max.z<w.z&&(y.max.z=w.z);p$1d.multiplyByPoint(t._matModel,$,$),p$1d.multiplyByVector(t._matModel,b,b),p$1d.multiplyByVector(t._matModel,T,T),p$1d.multiplyByVector(t._matModel,C,C),S[0]=b.x,S[1]=b.y,S[2]=b.z,S[3]=T.x,S[4]=T.y,S[5]=T.z,S[6]=C.x,S[7]=C.y,S[8]=C.z,y._orientedBoundingBox.center=$,y._orientedBoundingBox.halfAxes=S,y._orientedBoundingBox.areaDirty=1}else if(e$2e(v.min)){var P=[];P.push(new o$1p(v.min.x,v.min.y,v.min.z)),P.push(new o$1p(v.min.x,v.min.y,v.max.z)),P.push(new o$1p(v.min.x,v.max.y,v.min.z)),P.push(new o$1p(v.min.x,v.max.y,v.max.z)),P.push(new o$1p(v.max.x,v.min.y,v.min.z)),P.push(new o$1p(v.max.x,v.min.y,v.max.z)),P.push(new o$1p(v.max.x,v.max.y,v.min.z)),P.push(new o$1p(v.max.x,v.max.y,v.max.z)),y.obbMin=v.min,y.obbMax=v.max;for(var A=0;A<8;A++)P[A]=p$1d.multiplyByPoint(t._matModel,P[A],P[A]);y._orientedBoundingBox=y$Y.fromPoints(P,y._orientedBoundingBox)}var L=v.geodes,M=[],R=[];if(t._layerScheduler._prepareLoaded||!i._prepareLoad)for(var O=0;O<L.length;O++){var D,I=L[O],F=I.matrix;if(1===t._heightScale)D=p$1d.multiply(_,F,new p$1d);else{var B=p$1d.multiplyByScale(F,new o$1p(1,1,t._heightScale),new p$1d);D=p$1d.multiply(_,B,new p$1d)}F=p$1d.unpack(F);for(var N=I.skeletonNames,G=0;G<N.length;G++){var z=N[G],U=a[z],V=U.vertexPackage;if(_0x22f70b(U,t)){var k,W;if(y._isLeafNode&&!e$2e(y._boundingSphere)){var H=V.boundingSphere;e$2e(H)?(W=new i$1d(H.center,H.radius),k=i$1d.transform(W,D,new i$1d),W=i$1d.transform(W,F,W)):(k=_0x3ad44f.calcBoundingSphere(t,V,D),W=i$1d.transform(k,p$1d.inverse(D,new p$1d),new i$1d),i$1d.transform(W,F,W)),M.push(k),R.push(W)}for(var q=_0x3ad44f.calcBoundingRectangle(t,V),j=U.arrIndexPackage,X=U.pickInfo,Y={},Z=0;Z<j.length;Z++){var K=j[Z];if(e$2e(K)){var Q=K.materialCode;if(e$2e(Q)){var J=new _0xf77618({});Q=Q.replace(/\0/,"");var ee=l[Q];e$2e(ee)&&ee.clone(J),Y[Q]=J;for(let e=0;e<J._textures.length;e++){let t=J._textures[e];i._texturesByteLength+=t.sizeInBytes,e$2e(J.normalTexture)&&(i._texturesByteLength+=J.normalTexture._sizeInBytes),e$2e(J.baseColorTexture)&&(i._texturesByteLength+=J.baseColorTexture._sizeInBytes),e$2e(J.emissiveTexture)&&(i._texturesByteLength+=J.emissiveTexture._sizeInBytes),e$2e(J.metallicRoughnessTexture)&&(i._texturesByteLength+=J.metallicRoughnessTexture._sizeInBytes),e$2e(J.occlusionTexture)&&(i._texturesByteLength+=J.occlusionTexture._sizeInBytes)}}}}s&&(_0x38792f(V,t._oriMatModel,F,n),Se$e.AddRef(i._fileName));var te=u$Z(y$Y.clone(y._orientedBoundingBox),i$1d.clone(y._boundingSphere));te=u$Z(te,k);var ie={context:t._context,vertexPackage:V,arrIndexPackage:j,edgeGeometry:U.edgeGeometry,pickInfo:X,version:e.version,mapPass:Y,layer:t,entity:i,matModel:D,boundingVolume:te,boundingRectangle:q,volObj:s,volTexture:p,fileType:t._fileType,isS3MB:t._isS3MB,geoMatrix:F,dataType:t._dataType,level:t._level,row:d,col:f,geoName:z};if(t._fileType===p$T.PointCloudFile){var ne=z.split("#");if(ne.length>0&&"SupermapPointCloud"===ne[0]){for(var re={},oe=1;oe<ne.length;oe++){var ae=ne[oe].split("%");if(2===ae.length){var se=ae[0],le=ae[1].split("_");if(2===le.length){var ue=le[0],ce=le[1];re[se]={start:parseInt(ue),end:parseInt(ce)}}}}ie.ptIndexGroup=re}else if(z.lastIndexOf("_")>-1){var he=z.substring(0,z.lastIndexOf("_"));ie.groupName=he}}if(e$2e(t.themeStyle)&&e$2e(t.themeStyle._image)){var de=_0x1a0b3c.createRenderEntityPageLOD(ie,t);y._renderEntityList=y._renderEntityList.concat(de)}else if(V.vertexAttributes.length>0){var fe=new _0x4881fc(ie);if(t._imageryLayer instanceof Array){for(var pe=[],_e=0;_e<t._imageryLayer.length;_e++){var me=t._imageryLayer[_e];if(e$2e(me)&&(me instanceof h$R||me instanceof i$P)){var ge=me.getImagery(U.cartographicBounds);pe=pe.concat(ge)}}pe.length>0&&fe.setImagerys(pe,U.cartographicBounds)}else{if(e$2e(t._imageryLayer)&&(t._imageryLayer instanceof h$R||t._imageryLayer instanceof i$P))((pe=t._imageryLayer.getImagery(U.cartographicBounds)).length>0||t._needCoverImageryLayer)&&fe.setImagerys(pe,U.cartographicBounds)}y._renderEntityList.push(fe)}}}}if(y._isLeafNode&&!e$2e(y._boundingSphere)&&(y._boundingSphere=i$1d.fromBoundingSpheres(M,new i$1d),y._originalBS=i$1d.fromBoundingSpheres(R,new i$1d)),t.LoadingPriority===_0x539352.UsePagedLodInfo){var xe=i._fileName;0===xe.indexOf("./")&&(xe=xe.substring(2));_e=xe.lastIndexOf("/");var ye=v.childTile;_e>0&&""!=ye&&(ye=xe.substring(0,_e+1)+ye),e$2e(i._pagelodMap[ye])?i._pagelodMap[ye]._renderEntityList=y._renderEntityList:(i._leafChildren.push(y),y._isLeafNode=!0)}else i._childrenPageLod.push(y)}if(i._isLeafTile=g,!e$2e(i._boundingSphere)||i._isLeafTile||i._hasLeafChild){for(var ve=[],$e=i._childrenPageLod.length;$e--;)ve.push(i._childrenPageLod[$e]._boundingSphere);for(var be=i._leafChildren.length;be--;)ve.push(i._leafChildren[be]._boundingSphere);i._boundingSphere=i$1d.fromBoundingSpheres(ve),i._oriBoundingSphere=i$1d.clone(i._boundingSphere)}for(var Te in l)if(l.hasOwnProperty(Te)){var Ce=l[Te];if(!e$2e(Ce))continue;Ce.destroy(),l[Te]=null}i._s3mLoadState=N$Q.PARSED}}))},_0x1393e5.parseResultInstance=function(e,t){var i=t.instancePackage,n=t.skeletonPackages;e._version=i.version,e._gl;var r={},o=e._context,a=i.groupNode;for(C=0;C<n.length;C++){var s=(H=n.values[C]).matrials.material;for(N=0;N<s.length;N++){var l=s[N].material,u=l.id;(Se=new _0xf77618({})).createPBRParamter(l),r[u]=Se;var c=l.ambient;e$2e(c)&&(Se._ambientColor=new e$1X(c.r,c.g,c.b,c.a));var h=l.diffuse;e$2e(h)&&(Se._diffuseColor=new e$1X(h.r,h.g,h.b,h.a));var d=l.specular;e$2e(d)&&(Se._specularColor=new e$1X(d.r,d.g,d.b,d.a)),Se._shininess=u$Z(l.shininess,Se._shininess),Se._bTransparentSorting=u$Z(l.transparentsorting,Se._bTransparentSorting);var f=l.textureunitstates;for(X=0;X<f.length;X++){var p=f[X].textureunitstate,_=p.id,m=0===p.addressmode.u?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,g=0===p.addressmode.v?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;Se._texMatrix=p$1d.unpack(p.texmodmatrix);var x=H.texturePackage[_],y=_+e._id+e._context._id;if(e$2e(x)&&x.width>0&&x.height>0&&x.imageBuffer.length>0){0===x.compressType&&(e._supportCompressType=0);var v=Se$e.CreateTexture(y,o,x.width,x.height,x.nFormat,x.compressType,x.imageBuffer,!1,m,g);Se._textures.push(v)}}}}for(var $=e._matModel,b=a.pageLods,T=!0,C=0;C<b.length;C++){var S=new _0x4d13e0;S._fileType=e._fileType;var w=b[C];if(""===w.childTile?S._isLeafNode=!0:T=!1,S._rangeMode=w.rangeMode,S._rangeDataList=w.childTile,S._rangeList=w.rangeList,-1===w.boundingSphere.radius&&(w.boundingSphere.radius=6378137),w.boundingSphere&&(S._boundingSphere=new i$1d(w.boundingSphere.center,w.boundingSphere.radius),S._originalBS=new i$1d(w.boundingSphere.center,w.boundingSphere.radius),i$1d.transform(S._boundingSphere,e._matModel,S._boundingSphere)),e$2e(w._obb)){var E=o$1p.fromElements(w._obb.obbCenter.x,w._obb.obbCenter.y,w._obb.obbCenter.z),P=e$2c.fromElements(w._obb.xExtent.x,w._obb.xExtent.y,w._obb.xExtent.z,0),A=e$2c.fromElements(w._obb.yExtent.x,w._obb.yExtent.y,w._obb.yExtent.z,0),L=e$2c.fromElements(w._obb.zExtent.x,w._obb.zExtent.y,w._obb.zExtent.z,0),M=new p$1e(P.x,A.x,L.x,P.y,A.y,L.y,P.z,A.z,L.z);if(o$1p.equals(o$1p.ZERO,P)||o$1p.equals(o$1p.ZERO,A)||o$1p.equals(o$1p.ZERO,L))S._orientedBoundingBox=void 0;else{S._orientedBoundingBox=new y$Y(E,M),S._orientedBoundingBox._updateBBox(),S.min=S._orientedBoundingBox.bbox[0].clone(),S.max=S._orientedBoundingBox.bbox[0].clone();for(var R,O=1;O<8;O++)R=S._orientedBoundingBox.bbox[O],S.min.x>R.x&&(S.min.x=R.x),S.min.y>R.y&&(S.min.y=R.y),S.min.z>R.z&&(S.min.z=R.z),S.max.x<R.x&&(S.max.x=R.x),S.max.y<R.y&&(S.max.y=R.y),S.max.z<R.z&&(S.max.z=R.z);p$1d.multiplyByPoint(e._matModel,E,E),p$1d.multiplyByVector(e._matModel,P,P),p$1d.multiplyByVector(e._matModel,A,A),p$1d.multiplyByVector(e._matModel,L,L),M[0]=P.x,M[1]=P.y,M[2]=P.z,M[3]=A.x,M[4]=A.y,M[5]=A.z,M[6]=L.x,M[7]=L.y,M[8]=L.z,S._orientedBoundingBox.center=E,S._orientedBoundingBox.halfAxes=M,S._orientedBoundingBox.areaDirty=1}}else if(e$2e(w.min)){var D=[];D.push(new o$1p(w.min.x,w.min.y,w.min.z)),D.push(new o$1p(w.min.x,w.min.y,w.max.z)),D.push(new o$1p(w.min.x,w.max.y,w.min.z)),D.push(new o$1p(w.min.x,w.max.y,w.max.z)),D.push(new o$1p(w.max.x,w.min.y,w.min.z)),D.push(new o$1p(w.max.x,w.min.y,w.max.z)),D.push(new o$1p(w.max.x,w.max.y,w.min.z)),D.push(new o$1p(w.max.x,w.max.y,w.max.z)),S.obbMin=w.min,S.obbMax=w.max;for(var I=0;I<8;I++)D[I]=p$1d.multiplyByPoint(e._matModel,D[I],D[I]);S._orientedBoundingBox=y$Y.fromPoints(D,S._orientedBoundingBox)}S._isLeafNode||(S._boundingSphere=new i$1d(w.boundingSphere.center,w.boundingSphere.radius),i$1d.transform(S._boundingSphere,e._matModel,S._boundingSphere));for(var F=w.geodes,B=[],N=0;N<F.length;N++){var G,z=F[N],U=z.matrix;if(1===e._heightScale)G=p$1d.multiply($,U,new p$1d);else{var V=p$1d.multiplyByScale(U,new o$1p(1,1,e._heightScale),new p$1d);G=p$1d.multiply($,V,new p$1d)}U=p$1d.unpack(U);for(var k=z.skeletonNames,W=0;W<k.length;W++){var H,q=k[W],j=q;if((Me=q.indexOf("#"))>-1&&(j=q.substring(0,Me)),e$2e(H=n.get(j))){var X,Y,Z=[],K={};for(X=0;X<H.groupNode.pageLods.length;X++){var Q=H.groupNode.pageLods[X].geodes;for(Y=0;Y<Q.length;Y++)for(var J=Q[Y],ee=p$1d.unpack(J.matrix,0,new p$1d),te=0;te<J.skeletonNames.length;te++){var ie=J.skeletonNames[te];K[ie]=ee,Z.push(ie)}}for(X=0;X<Z.length;X++){var ne=Z[X],re=K[ne],oe=H.geoPackage[ne];if(e$2e(oe)){var ae=i.geoPackage[q],se=l$1f(ae.pickInfo),le=e$2e(oe.pickInfo)?Object.keys(oe.pickInfo):[],ue=le.length;for(var ce in se)se.hasOwnProperty(ce)&&(se[ce].skeletonIds=le);var he=ae.vertexPackage,de=oe.vertexPackage,fe={},pe=[],_e=de.vertexAttributes.length;for(Y=0;Y<de.vertexAttributes.length;Y++){var me=p$19({},ge=de.vertexAttributes[Y]);pe.push(me)}for(Y=0;Y<he.vertexAttributes.length;Y++){var ge;if((ge=he.vertexAttributes[Y]).instanceDivisor>0)(me=p$19({},ge)).index=_e++,pe.push(me)}for(var xe in _e=de.vertexAttributes.length,delete he.attrLocation.aColor,fe=p$19({},de.attrLocation),he.attrLocation)fe[xe]=he.attrLocation[xe]+_e;var ye,ve={attrLocation:fe,minVerticesValue:de.minVerticesValue,nCompressOptions:de.nCompressOptions,vertCompressConstant:de.vertCompressConstant,vertexAttributes:pe,vertexColor:de.vertexColor,verticesCount:de.verticesCount,skeletonCount:ue};if(ve.instanceIndex=he.instanceIndex,ve.instanceCount=he.instanceCount,ve.instanceMode=he.instanceMode,ve.instanceBuffer=he.instanceBuffer,ve.instanceBounds=he.instanceBounds,delete he.attrLocation.aColor,S._isLeafNode&&!e$2e(S._boundingSphere)){var $e=ve.boundingSphere;e$2e($e)?(ye=new i$1d($e.center,$e.radius),i$1d.transform(ye,G,ye)):ye=_0x3ad44f.calcBoundingSphere(e,ve,G),B.push(ye),_0x3ad44f.calcBoundingRectangle(e,ve)}var be=u$Z(e$2e(S._orientedBoundingBox)?y$Y.clone(S._orientedBoundingBox):void 0,i$1d.clone(S._boundingSphere));be=u$Z(be,ye);var Te=oe.arrIndexPackage,Ce={},Se=r[u=Te[0].materialCode],we=new _0xf77618({});e$2e(Se)&&Se.clone(we),Ce[u]=we;var Ee={context:e._context,version:i.version,vertexPackage:ve,arrIndexPackage:Te,pickInfo:se,mapPass:Ce,layer:e,entity:t,matModel:G,boundingVolume:be,fileType:e._fileType,isS3MB:e._isS3MB,geoMatrix:U,instanceSkeletonMatrix:re,dataType:e._dataType,instanceSkeletonManager:e.instanceSkeletonManager,geoName:ne,skeletonUrl:j};if(e$2e(e.themeStyle)){var Pe=_0x1a0b3c.createRenderEntityPageLOD(Ee,e);S._renderEntityList=S._renderEntityList.concat(Pe)}else{var Ae=new _0x4881fc(Ee);if(e._imageryLayer instanceof Array){for(var Le=[],Me=0;Me<e._imageryLayer.length;Me++){var Re=e._imageryLayer[Me];if(e$2e(Re)&&(Re instanceof h$R||Re instanceof i$P)){var Oe=Re.getImagery(oe.cartographicBounds);Le=Le.concat(Oe)}}Le.length>0&&Ae.setImagerys(Le,oe.cartographicBounds)}else{if(e$2e(e._imageryLayer)&&(e._imageryLayer instanceof h$R||e._imageryLayer instanceof i$P))((Le=e._imageryLayer.getImagery(oe.cartographicBounds)).length>0||e._needCoverImageryLayer)&&Ae.setImagerys(Le,oe.cartographicBounds)}S._renderEntityList.push(Ae)}}}}}}if(S._isLeafNode&&!e$2e(S._boundingSphere)){S._boundingSphere=i$1d.fromBoundingSpheres(B,new i$1d);for(var De=0;De<S._renderEntityList.length;De++)S._renderEntityList[De]._boundingVolume=S._boundingSphere}t._childrenPageLod.push(S)}if(t._isLeafTile=T,!e$2e(t._boundingSphere)||t._isLeafTile){for(var Ie=[],Fe=t._childrenPageLod.length;Fe--;)Ie.push(t._childrenPageLod[Fe]._boundingSphere);t._boundingSphere=i$1d.fromBoundingSpheres(Ie)}if(!o$1p.equals(e._boundingSphereOffset,o$1p.ZERO)){var Be=Math.max(Math.abs(e._boundingSphereOffset.x),Math.abs(e._boundingSphereOffset.y),Math.abs(e._boundingSphereOffset.z));t.extendRadius(Be)}for(var Ne in r)if(r.hasOwnProperty(Ne)){var Ge=r[Ne];if(!e$2e(Ge))continue;Ge.destroy(),r[Ne]=null}t._s3mLoadState=N$Q.PARSED,t.instancePackage=void 0,t.skeletonPackages=void 0,t.skeletonState=void 0},_0x1393e5.parseChildGroup=_0x23f2b5,_0x1393e5.binaryDataParser=function(e,t,i,n){if(t._s3mLoadState===N$Q.UNLOAD)return t.s3mBuffer=null,t.volBuffer=null,void(t.task=void 0);var r;(e._computeHeight||e._needCoverImageryLayer)&&(r=e._fileType!==p$T.OSGBFile&&e._fileType!==p$T.OSGBCacheFile||e$2e(e.waterEffectSet)?void 0:p$1d.pack(e._matModel,new Array(16)));var o,a=e._frameState.mode===C$14.SCENE3D&&e._fileType!=p$T.ClampGroundRealtimeRasterCache&&e._fileType!=p$T.PolylineEffect;if(6378137!==t$12.WGS84.radii.z&&"Ellipsoid_WGS84"!==e._globeType&&a&&!e$2e(e._animationInfo.duration)){var s=new t$12(6378137,6378137,6378137),l=o$1p.fromDegrees(e.lon,e.lat,e.height+e.style3D.bottomAltitude,s);o={sphereMatrix:m$19.eastNorthUpToFixedFrame(l,s),ellipsoidMatrix:e._matModel}}var u={buffer:i,isS3MZ:e._isS3MZ,fileType:e._fileType,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,isJsonScp:e._isJsonScp,isRoot:t._isRootTile,rootBatchIdMap:t._rootBatchIdMap,ancestorMap:t._ancestorMap,isS3MBlock:e._isS3MBlock,modelMatrix:r,materialType:e._materialType,isOSGB:e._isOSGB,isCoverImageryLayer:e._needCoverImageryLayer,fileName:t._fileName,transformPar:o,ellipsoid:6378137!==t$12.WGS84.radii.z&&"Ellipsoid_WGS84"===e._globeType},c=[i];if(e$2e(n)&&(u.bVolume=!0,u.volbuffer=n,c.push(n)),_0x29d1c7.init||_0x29d1c7.initWebAssembly(),_0x29d1c7.taskProcessorReady){e$2e(t.task)||(t.task={data:u,transferableObjects:e._isS3MBlock?void 0:c,priority:t._disFromCamera,state:0,priorityFunction:_0x428e80(t),processorName:"S3MBTilesParser"});var h=_0x29d1c7.startTask(t.task);!e$2e(h)||(t._s3mLoadState=N$Q.PARSING,e._layerScheduler._statistics.numberOfProcessingAttempted=0,e._layerScheduler._statistics.numberOfTilesProcessing++,h.then((function(i){if(t.s3mBuffer=null,t.volBuffer=null,t.task=void 0,t._s3mLoadState!==N$Q.UNLOAD){if(e$2e(window.Proxy)){var r=t._relativePath.toString()+t._fileName;if((!0===e._indexedDBSetting.isGeoTilesSave||e._indexedDBSetting.isGeoTilesRootNodeSave&&e._layerScheduler._isRootNode(r))&&e$2e(e._layerScheduler._indexedDBScheduler)){if(e$2e(e._layerScheduler._indexedDBScheduler.cachestatus)&&e$2e(e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename])&&(1===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]||2===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]))return;var o={blob:i,key:r,tablename:e._layerScheduler.tablename,dbname:e._layerScheduler._indexedDBScheduler.dbname,reserveCount:e._localCacheMemoryReserveCount};_0x29d1c7.indexTaskProcessor.scheduleTask(o,[])}e.offlineDownload&&e$2e(e._layerScheduler._indexedDBScheduler)&&(sumEntity++,e._layerScheduler._indexedDBScheduler.putElementInDB(e._layerScheduler.tablename,r,i).then((function(){savedEntity++,sumEntity===savedEntity&&console.log("complete")})).otherwise((function(e){})))}e._layerScheduler._statistics.numberOfTilesProcessing--,null==i&&(t._s3mLoadState,N$Q.UNLOAD),"InstanceModel"===e._dataType?(t.skeletonState=_0x13fd1b.STATE.SkeletonParsing,t.instancePackage=i):e._isS3MBlock?_0x23f2b5(i,e,t):_0x1393e5.parseResult(i,e,t,n)}})).otherwise((function(i){if(e._layerScheduler._statistics.numberOfTilesProcessing--,t.task=void 0,t._s3mLoadState==N$Q.UNLOAD)return t.s3mBuffer=null,void(t.volBuffer=null);e$2e(i)?(t.s3mBuffer=null,t.volBuffer=null,t._s3mLoadState=N$Q.FAILED,console.log(i)):t._s3mLoadState=N$Q.LOADED})))}},_0x1393e5.saveLocalCache=function(e,t){var i={tablename:e,dbname:t};_0x29d1c7.indexTaskProcessor.scheduleTask(i,[])};var _0x4e8b5c=(_0x30e964=!0,function(e,t){var i=_0x30e964?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30e964=!1,i}),_0x3d6306=_0x4e8b5c(void 0,(function(){return _0x3d6306.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d6306).search("(((.+)+)+)+$")})),_0x30e964;_0x3d6306();var _0x10c72e={REST:0,KEY_VALUE:1},Tr$4=Object.freeze(_0x10c72e);if(typeof WebAssembly<"u"&&"object"!=typeof window){let e=function(e){return t$F.locateFile?t$F.locateFile(e,g$V):g$V+e},t=function(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1,p$P(e))},i=function(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return D$O[e>>0];case"i16":return m$R[e>>1];case"i32":case"i64":return w$M[e>>2];case"float":return ct$8[e>>2];case"double":return Et$7[e>>3];default:C("invalid type for getValue: "+t)}return null},n=function(e,t){e||C("Assertion failed: "+t)},r=function(e){var t=t$F["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=K$K(i),c(e,t,i)}return t},array:function(e){var t=K$K(e.length);return h(e,t),t}};var u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p<o.length;p++){var _=s[i[p]];_?(0===f&&(f=Se$f()),d[p]=_(o[p])):d[p]=o[p]}var m=u.apply(null,d);return m=function(e){return"string"===t?l(e):"boolean"===t?Boolean(e):e}(m),0!==f&&le$t(f),m},a=function(e,t,i,n){return function(){return o(e,t,i,arguments)}},s=function(e,i,n){for(var r=i+n,o=i;e[o]&&!(o>=r);)++o;if(o-i>16&&e.subarray&&ut$9)return ut$9.decode(e.subarray(i,o));for(var a="";i<o;){var s=e[i++];if(128&s){var l=63&e[i++];if(192!=(224&s)){var u=63&e[i++];if(224==(240&s)?s=(15&s)<<12|l<<6|u:(240!=(248&s)&&t("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),s=(7&s)<<18|l<<12|u<<6|63&e[i++]),s<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(P$M,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343)l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s);if(l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,P$M,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),D$O.set(e,t)},d=function(e,t){return e%t>0&&(e+=t-e%t),e},f=function(e){st$6=e,t$F.HEAP8=D$O=new Int8Array(e),t$F.HEAP16=m$R=new Int16Array(e),t$F.HEAP32=w$M=new Int32Array(e),t$F.HEAPU8=P$M=new Uint8Array(e),t$F.HEAPU16=new Uint16Array(e),t$F.HEAPU32=G$Z=new Uint32Array(e),t$F.HEAPF32=ct$8=new Float32Array(e),t$F.HEAPF64=Et$7=new Float64Array(e)},p=function(){var e=Rt$8();n(0==(3&e)),G$Z[1+(e>>2)]=34821223,G$Z[2+(e>>2)]=2310721022,w$M[0]=1668509029},_=function(){if(!L$V){var e=Rt$8(),t=G$Z[1+(e>>2)],i=G$Z[2+(e>>2)];(34821223!=t||2310721022!=i)&&C("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+i.toString(16)+" "+t.toString(16)),1668509029!==w$M[0]&&C("Runtime error: The application has corrupted its heap memory area (address zero)!")}},m=function(){if(t$F.preRun)for("function"==typeof t$F.preRun&&(t$F.preRun=[t$F.preRun]);t$F.preRun.length;)v(t$F.preRun.shift());R(It$9)},g=function(){_(),n(!Ot$8),Ot$8=!0,R(pt$8)},x=function(){_(),R(Ut$7)},y=function(){if(_(),t$F.postRun)for("function"==typeof t$F.postRun&&(t$F.postRun=[t$F.postRun]);t$F.postRun.length;)$(t$F.postRun.shift());R(Nt$7)},v=function(e){It$9.unshift(e)},$=function(e){Nt$7.unshift(e)},b=function(e){v$D++,t$F.monitorRunDependencies&&t$F.monitorRunDependencies(v$D),e?(n(!I$_[e]),I$_[e]=1,null===X$M&&typeof setInterval<"u"&&(X$M=setInterval((function(){if(L$V)return clearInterval(X$M),void(X$M=null);var e=!1;for(var t in I$_)e||(e=!0,p$P("still waiting on run dependencies:")),p$P("dependency: "+t);e&&p$P("(end of list)")}),1e4))):p$P("warning: run dependency added without ID")},T=function(e){if(v$D--,t$F.monitorRunDependencies&&t$F.monitorRunDependencies(v$D),e?(n(I$_[e]),delete I$_[e]):p$P("warning: run dependency removed without ID"),0==v$D&&(null!==X$M&&(clearInterval(X$M),X$M=null),W$Q)){var t=W$Q;W$Q=null,t()}},C=function(e){throw t$F.onAbort&&t$F.onAbort(e),p$P(e+=""),L$V=!0,e="abort("+e+") at "+F(),new WebAssembly.RuntimeError(e)},S=function(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)},w=function(e){return S(e,ye$k)},E=function(e){return S(e,be$o)},P=function(e,t){return function(){var i=e,r=t;return t||(r=t$F.asm),n(Ot$8,"native function `"+i+"` called before runtime initialization"),n(!jt$5,"native function `"+i+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),r[e]||n(r[e],"exported native function `"+i+"` not found"),r[e].apply(null,arguments)}},A=function(e){try{if(e==O$C&&H$S)return new Uint8Array(H$S);if(Q$O)return Q$O(e);throw"both async and sync fetching of the wasm failed"}catch(e){C(e)}},L=function(){if(!H$S&&(q$T||S$K)){if("function"==typeof fetch&&!E(O$C))return fetch(O$C,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+O$C+"'";return e.arrayBuffer()})).catch((function(){return A(O$C)}));if(rt$e)return new Promise((function(e,t){rt$e(O$C,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return A(O$C)}))},M=function(){var e={env:Ct$6,wasi_snapshot_preview1:Ct$6};function t(e,t){var i=e.exports;t$F.asm=i,k$N=t$F.asm.memory,n(k$N,"memory not found in wasm exports"),f(k$N.buffer),h$P=t$F.asm.__indirect_function_table,n(h$P,"table not found in wasm exports"),T("wasm-instantiate")}b("wasm-instantiate");var i=t$F;function r(e){n(t$F===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,t(e.instance)}function o(t){return L().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){p$P("failed to asynchronously prepare wasm: "+e),E(O$C)&&p$P("warning: Loading from a file URI ("+O$C+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),C(e)}))}if(t$F.instantiateWasm)try{return t$F.instantiateWasm(e,t)}catch(e){return p$P("Module.instantiateWasm callback failed with error: "+e),!1}return H$S||"function"!=typeof WebAssembly.instantiateStreaming||w(O$C)||E(O$C)||"function"!=typeof fetch?o(r):fetch(O$C,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return p$P("wasm streaming compile failed: "+e),p$P("falling back to ArrayBuffer instantiation"),o(r)}))})),{}},R=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?h$P.get(i)():h$P.get(i)(t.arg):i(void 0===t.arg?null:t.arg)}else t(t$F)}},O=function(e){return t("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e},D=function(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=O(e);return e===t?e:t+" ["+e+"]"}))},I=function(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},F=function(){var e=I();return t$F.extraStackTrace&&(e+="\n"+t$F.extraStackTrace()),D(e)},B=function(e,t,i){P$M.copyWithin(e,t,t+i)},N=function(){return P$M.length},G=function(e){try{return k$N.grow(e-st$6.byteLength+65535>>>16),f(k$N.buffer),1}catch(t){console.error("emscripten_realloc_buffer: Attempted to grow heap from "+st$6.byteLength+" bytes to "+e+" bytes, but got error: "+t)}},z=function(e){var t=N();n(e>t);var i=2147483648;if(e>i)return p$P("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+i+" bytes!"),!1;for(var r=1;r<=4;r*=2){var o=t*(1+.2/r);o=Math.min(o,e+100663296);var a=Math.min(i,d(Math.max(e,o),65536));if(G(a))return!0}return p$P("Failed to grow the heap from "+t+" bytes to "+a+" bytes, not enough memory!"),!1},U=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},V=function(){Ht$6(),p()},k=function(e){function t(){Z$M||(Z$M=!0,t$F.calledRun=!0,!L$V&&(g(),x(),t$F.onRuntimeInitialized&&t$F.onRuntimeInitialized(),n(!t$F._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),y()))}v$D>0||(V(),m(),v$D>0)||(t$F.setStatus?(t$F.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t$F.setStatus("")}),1),t()}),1)):t(),_())};var t$F=typeof t$F<"u"?t$F:{},j$P={},F$Q;for(F$Q in t$F)t$F.hasOwnProperty(F$Q)&&(j$P[F$Q]=t$F[F$Q]);var q$T=!1,S$K=!1,et$d=!1,St$4=!1;if(q$T="object"==typeof window,S$K="function"==typeof importScripts,et$d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,St$4=!q$T&&!et$d&&!S$K,t$F.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var g$V="",J$J,rt$e,Q$O,nt$8,it$8;if(et$d)g$V=S$K?require("path").dirname(g$V)+"/":__dirname+"/",J$J=function(e,t){return nt$8||(nt$8=require("fs")),it$8||(it$8=require("path")),e=it$8.normalize(e),nt$8.readFileSync(e,t?null:"utf8")},Q$O=function(e){var t=J$J(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),typeof module<"u"&&(module.exports=t$F),process.on("uncaughtException",(function(e){if(!(e instanceof U))throw e})),process.on("unhandledRejection",C),t$F.inspect=function(){return"[Emscripten Module object]"};else if(St$4)typeof read<"u"&&(J$J=function(e){return read(e)}),Q$O=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?scriptArgs:typeof arguments<"u"&&arguments,typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print);else{if(!q$T&&!S$K)throw new Error("environment detection error");S$K?g$V=self.location.href:typeof document<"u"&&document.currentScript&&(g$V=document.currentScript.src),g$V=0!==g$V.indexOf("blob:")?g$V.substr(0,g$V.lastIndexOf("/")+1):"",J$J=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},S$K&&(Q$O=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),rt$e=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)}}t$F.print||console.log.bind(console);var p$P=t$F.printErr||console.warn.bind(console),H$S;for(F$Q in j$P)j$P.hasOwnProperty(F$Q)&&(t$F[F$Q]=j$P[F$Q]);j$P=null,t$F.arguments&&t$F.arguments,Object.getOwnPropertyDescriptor(t$F,"arguments")||Object.defineProperty(t$F,"arguments",{configurable:!0,get:function(){C("Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),t$F.thisProgram&&t$F.thisProgram,Object.getOwnPropertyDescriptor(t$F,"thisProgram")||Object.defineProperty(t$F,"thisProgram",{configurable:!0,get:function(){C("Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),t$F.quit&&t$F.quit,Object.getOwnPropertyDescriptor(t$F,"quit")||Object.defineProperty(t$F,"quit",{configurable:!0,get:function(){C("Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),n(typeof t$F.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$F.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$F.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$F.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),n(typeof t$F.read>"u","Module.read option was removed (modify read_ in JS)"),n(typeof t$F.readAsync>"u","Module.readAsync option was removed (modify readAsync in JS)"),n(typeof t$F.readBinary>"u","Module.readBinary option was removed (modify readBinary in JS)"),n(typeof t$F.setWindowTitle>"u","Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),n(typeof t$F.TOTAL_MEMORY>"u","Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Object.getOwnPropertyDescriptor(t$F,"read")||Object.defineProperty(t$F,"read",{configurable:!0,get:function(){C("Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(t$F,"readAsync")||Object.defineProperty(t$F,"readAsync",{configurable:!0,get:function(){C("Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(t$F,"readBinary")||Object.defineProperty(t$F,"readBinary",{configurable:!0,get:function(){C("Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(t$F,"setWindowTitle")||Object.defineProperty(t$F,"setWindowTitle",{configurable:!0,get:function(){C("Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),t$F.wasmBinary&&(H$S=t$F.wasmBinary),Object.getOwnPropertyDescriptor(t$F,"wasmBinary")||Object.defineProperty(t$F,"wasmBinary",{configurable:!0,get:function(){C("Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),t$F.noExitRuntime,Object.getOwnPropertyDescriptor(t$F,"noExitRuntime")||Object.defineProperty(t$F,"noExitRuntime",{configurable:!0,get:function(){C("Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),"object"!=typeof WebAssembly&&C("no native wasm support detected");var k$N,L$V=!1,ut$9=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var st$6,D$O,P$M,m$R,w$M,G$Z,ct$8,Et$7,ft$7=5242880;t$F.TOTAL_STACK&&n(ft$7===t$F.TOTAL_STACK,"the stack size can no longer be determined at runtime");var Tt$8=t$F.INITIAL_MEMORY||16777216,h$P;Object.getOwnPropertyDescriptor(t$F,"INITIAL_MEMORY")||Object.defineProperty(t$F,"INITIAL_MEMORY",{configurable:!0,get:function(){C("Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),n(Tt$8>=ft$7,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+Tt$8+"! (TOTAL_STACK="+ft$7+")"),n(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),n(!t$F.wasmMemory,"Use of `wasmMemory` detected. Use -s IMPORTED_MEMORY to define wasmMemory externally"),n(16777216==Tt$8,"Detected runtime INITIAL_MEMORY setting. Use -s IMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!"}();var It$9=[],pt$8=[],Ut$7=[],Nt$7=[],Ot$8=!1,jt$5=!1;pt$8.push({func:function(){Fe$i()}}),n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var v$D=0,X$M=null,W$Q=null,I$_={};t$F.preloadedImages={},t$F.preloadedAudios={};var d$11={error:function(){C("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){d$11.error()},createDataFile:function(){d$11.error()},createPreloadedFile:function(){d$11.error()},createLazyFile:function(){d$11.error()},open:function(){d$11.error()},mkdev:function(){d$11.error()},registerDevice:function(){d$11.error()},analyzePath:function(){d$11.error()},loadFilesFromDB:function(){d$11.error()},ErrnoError:function(){d$11.error()}};t$F.FS_createDataFile=d$11.createDataFile,t$F.FS_createPreloadedFile=d$11.createPreloadedFile;var ye$k="data:application/octet-stream;base64,",be$o="file://",O$C="ThirdParty/unzip.wasm";w(O$C)||(O$C=e(O$C));var Ct$6={emscripten_memcpy_big:B,emscripten_resize_heap:z};M();var Fe$i=t$F.___wasm_call_ctors=P("__wasm_call_ctors");t$F._unzip=P("unzip"),t$F._freePointer=P("freePointer"),t$F._malloc=P("malloc"),t$F._free=P("free"),t$F.___errno_location=P("__errno_location"),t$F._fflush=P("fflush");var Se$f=t$F.stackSave=P("stackSave"),le$t=t$F.stackRestore=P("stackRestore"),K$K=t$F.stackAlloc=P("stackAlloc"),Ht$6=t$F._emscripten_stack_init=function(){return(Ht$6=t$F._emscripten_stack_init=t$F.asm.emscripten_stack_init).apply(null,arguments)};t$F._emscripten_stack_get_free=function(){return(t$F._emscripten_stack_get_free=t$F.asm.emscripten_stack_get_free).apply(null,arguments)};var Rt$8=t$F._emscripten_stack_get_end=function(){return(Rt$8=t$F._emscripten_stack_get_end=t$F.asm.emscripten_stack_get_end).apply(null,arguments)},Z$M;if(Object.getOwnPropertyDescriptor(t$F,"intArrayFromString")||(t$F.intArrayFromString=function(){C("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"intArrayToString")||(t$F.intArrayToString=function(){C("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$F.ccall=o,t$F.cwrap=a,Object.getOwnPropertyDescriptor(t$F,"setValue")||(t$F.setValue=function(){C("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$F.getValue=i,Object.getOwnPropertyDescriptor(t$F,"allocate")||(t$F.allocate=function(){C("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"UTF8ArrayToString")||(t$F.UTF8ArrayToString=function(){C("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"UTF8ToString")||(t$F.UTF8ToString=function(){C("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stringToUTF8Array")||(t$F.stringToUTF8Array=function(){C("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stringToUTF8")||(t$F.stringToUTF8=function(){C("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"lengthBytesUTF8")||(t$F.lengthBytesUTF8=function(){C("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stackTrace")||(t$F.stackTrace=function(){C("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addOnPreRun")||(t$F.addOnPreRun=function(){C("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addOnInit")||(t$F.addOnInit=function(){C("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addOnPreMain")||(t$F.addOnPreMain=function(){C("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addOnExit")||(t$F.addOnExit=function(){C("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addOnPostRun")||(t$F.addOnPostRun=function(){C("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeStringToMemory")||(t$F.writeStringToMemory=function(){C("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeArrayToMemory")||(t$F.writeArrayToMemory=function(){C("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeAsciiToMemory")||(t$F.writeAsciiToMemory=function(){C("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addRunDependency")||(t$F.addRunDependency=function(){C("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"removeRunDependency")||(t$F.removeRunDependency=function(){C("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"FS_createFolder")||(t$F.FS_createFolder=function(){C("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"FS_createPath")||(t$F.FS_createPath=function(){C("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"FS_createDataFile")||(t$F.FS_createDataFile=function(){C("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"FS_createPreloadedFile")||(t$F.FS_createPreloadedFile=function(){C("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"FS_createLazyFile")||(t$F.FS_createLazyFile=function(){C("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"FS_createLink")||(t$F.FS_createLink=function(){C("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"FS_createDevice")||(t$F.FS_createDevice=function(){C("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"FS_unlink")||(t$F.FS_unlink=function(){C("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"getLEB")||(t$F.getLEB=function(){C("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getFunctionTables")||(t$F.getFunctionTables=function(){C("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"alignFunctionTables")||(t$F.alignFunctionTables=function(){C("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerFunctions")||(t$F.registerFunctions=function(){C("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addFunction")||(t$F.addFunction=function(){C("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"removeFunction")||(t$F.removeFunction=function(){C("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getFuncWrapper")||(t$F.getFuncWrapper=function(){C("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"prettyPrint")||(t$F.prettyPrint=function(){C("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"makeBigInt")||(t$F.makeBigInt=function(){C("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"dynCall")||(t$F.dynCall=function(){C("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getCompilerSetting")||(t$F.getCompilerSetting=function(){C("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"print")||(t$F.print=function(){C("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"printErr")||(t$F.printErr=function(){C("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getTempRet0")||(t$F.getTempRet0=function(){C("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"setTempRet0")||(t$F.setTempRet0=function(){C("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"callMain")||(t$F.callMain=function(){C("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"abort")||(t$F.abort=function(){C("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stringToNewUTF8")||(t$F.stringToNewUTF8=function(){C("'stringToNewUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"setFileTime")||(t$F.setFileTime=function(){C("'setFileTime' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"emscripten_realloc_buffer")||(t$F.emscripten_realloc_buffer=function(){C("'emscripten_realloc_buffer' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"ENV")||(t$F.ENV=function(){C("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"ERRNO_CODES")||(t$F.ERRNO_CODES=function(){C("'ERRNO_CODES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"ERRNO_MESSAGES")||(t$F.ERRNO_MESSAGES=function(){C("'ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"setErrNo")||(t$F.setErrNo=function(){C("'setErrNo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"inetPton4")||(t$F.inetPton4=function(){C("'inetPton4' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"inetNtop4")||(t$F.inetNtop4=function(){C("'inetNtop4' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"inetPton6")||(t$F.inetPton6=function(){C("'inetPton6' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"inetNtop6")||(t$F.inetNtop6=function(){C("'inetNtop6' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"readSockaddr")||(t$F.readSockaddr=function(){C("'readSockaddr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeSockaddr")||(t$F.writeSockaddr=function(){C("'writeSockaddr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"DNS")||(t$F.DNS=function(){C("'DNS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getHostByName")||(t$F.getHostByName=function(){C("'getHostByName' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"GAI_ERRNO_MESSAGES")||(t$F.GAI_ERRNO_MESSAGES=function(){C("'GAI_ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"Protocols")||(t$F.Protocols=function(){C("'Protocols' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"Sockets")||(t$F.Sockets=function(){C("'Sockets' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getRandomDevice")||(t$F.getRandomDevice=function(){C("'getRandomDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"traverseStack")||(t$F.traverseStack=function(){C("'traverseStack' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"UNWIND_CACHE")||(t$F.UNWIND_CACHE=function(){C("'UNWIND_CACHE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"withBuiltinMalloc")||(t$F.withBuiltinMalloc=function(){C("'withBuiltinMalloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"readAsmConstArgsArray")||(t$F.readAsmConstArgsArray=function(){C("'readAsmConstArgsArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"readAsmConstArgs")||(t$F.readAsmConstArgs=function(){C("'readAsmConstArgs' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"mainThreadEM_ASM")||(t$F.mainThreadEM_ASM=function(){C("'mainThreadEM_ASM' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"jstoi_q")||(t$F.jstoi_q=function(){C("'jstoi_q' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"jstoi_s")||(t$F.jstoi_s=function(){C("'jstoi_s' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getExecutableName")||(t$F.getExecutableName=function(){C("'getExecutableName' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"listenOnce")||(t$F.listenOnce=function(){C("'listenOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"autoResumeAudioContext")||(t$F.autoResumeAudioContext=function(){C("'autoResumeAudioContext' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"dynCallLegacy")||(t$F.dynCallLegacy=function(){C("'dynCallLegacy' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getDynCaller")||(t$F.getDynCaller=function(){C("'getDynCaller' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"dynCall")||(t$F.dynCall=function(){C("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"callRuntimeCallbacks")||(t$F.callRuntimeCallbacks=function(){C("'callRuntimeCallbacks' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"reallyNegative")||(t$F.reallyNegative=function(){C("'reallyNegative' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"unSign")||(t$F.unSign=function(){C("'unSign' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"reSign")||(t$F.reSign=function(){C("'reSign' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"formatString")||(t$F.formatString=function(){C("'formatString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"PATH")||(t$F.PATH=function(){C("'PATH' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"PATH_FS")||(t$F.PATH_FS=function(){C("'PATH_FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SYSCALLS")||(t$F.SYSCALLS=function(){C("'SYSCALLS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"syscallMmap2")||(t$F.syscallMmap2=function(){C("'syscallMmap2' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"syscallMunmap")||(t$F.syscallMunmap=function(){C("'syscallMunmap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getSocketFromFD")||(t$F.getSocketFromFD=function(){C("'getSocketFromFD' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getSocketAddress")||(t$F.getSocketAddress=function(){C("'getSocketAddress' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"JSEvents")||(t$F.JSEvents=function(){C("'JSEvents' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerKeyEventCallback")||(t$F.registerKeyEventCallback=function(){C("'registerKeyEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"specialHTMLTargets")||(t$F.specialHTMLTargets=function(){C("'specialHTMLTargets' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"maybeCStringToJsString")||(t$F.maybeCStringToJsString=function(){C("'maybeCStringToJsString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"findEventTarget")||(t$F.findEventTarget=function(){C("'findEventTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"findCanvasEventTarget")||(t$F.findCanvasEventTarget=function(){C("'findCanvasEventTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getBoundingClientRect")||(t$F.getBoundingClientRect=function(){C("'getBoundingClientRect' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillMouseEventData")||(t$F.fillMouseEventData=function(){C("'fillMouseEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerMouseEventCallback")||(t$F.registerMouseEventCallback=function(){C("'registerMouseEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerWheelEventCallback")||(t$F.registerWheelEventCallback=function(){C("'registerWheelEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerUiEventCallback")||(t$F.registerUiEventCallback=function(){C("'registerUiEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerFocusEventCallback")||(t$F.registerFocusEventCallback=function(){C("'registerFocusEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillDeviceOrientationEventData")||(t$F.fillDeviceOrientationEventData=function(){C("'fillDeviceOrientationEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerDeviceOrientationEventCallback")||(t$F.registerDeviceOrientationEventCallback=function(){C("'registerDeviceOrientationEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillDeviceMotionEventData")||(t$F.fillDeviceMotionEventData=function(){C("'fillDeviceMotionEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerDeviceMotionEventCallback")||(t$F.registerDeviceMotionEventCallback=function(){C("'registerDeviceMotionEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"screenOrientation")||(t$F.screenOrientation=function(){C("'screenOrientation' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillOrientationChangeEventData")||(t$F.fillOrientationChangeEventData=function(){C("'fillOrientationChangeEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerOrientationChangeEventCallback")||(t$F.registerOrientationChangeEventCallback=function(){C("'registerOrientationChangeEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillFullscreenChangeEventData")||(t$F.fillFullscreenChangeEventData=function(){C("'fillFullscreenChangeEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerFullscreenChangeEventCallback")||(t$F.registerFullscreenChangeEventCallback=function(){C("'registerFullscreenChangeEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerRestoreOldStyle")||(t$F.registerRestoreOldStyle=function(){C("'registerRestoreOldStyle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"hideEverythingExceptGivenElement")||(t$F.hideEverythingExceptGivenElement=function(){C("'hideEverythingExceptGivenElement' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"restoreHiddenElements")||(t$F.restoreHiddenElements=function(){C("'restoreHiddenElements' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"setLetterbox")||(t$F.setLetterbox=function(){C("'setLetterbox' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"currentFullscreenStrategy")||(t$F.currentFullscreenStrategy=function(){C("'currentFullscreenStrategy' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"restoreOldWindowedStyle")||(t$F.restoreOldWindowedStyle=function(){C("'restoreOldWindowedStyle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"softFullscreenResizeWebGLRenderTarget")||(t$F.softFullscreenResizeWebGLRenderTarget=function(){C("'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"doRequestFullscreen")||(t$F.doRequestFullscreen=function(){C("'doRequestFullscreen' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillPointerlockChangeEventData")||(t$F.fillPointerlockChangeEventData=function(){C("'fillPointerlockChangeEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerPointerlockChangeEventCallback")||(t$F.registerPointerlockChangeEventCallback=function(){C("'registerPointerlockChangeEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerPointerlockErrorEventCallback")||(t$F.registerPointerlockErrorEventCallback=function(){C("'registerPointerlockErrorEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"requestPointerLock")||(t$F.requestPointerLock=function(){C("'requestPointerLock' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillVisibilityChangeEventData")||(t$F.fillVisibilityChangeEventData=function(){C("'fillVisibilityChangeEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerVisibilityChangeEventCallback")||(t$F.registerVisibilityChangeEventCallback=function(){C("'registerVisibilityChangeEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerTouchEventCallback")||(t$F.registerTouchEventCallback=function(){C("'registerTouchEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillGamepadEventData")||(t$F.fillGamepadEventData=function(){C("'fillGamepadEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerGamepadEventCallback")||(t$F.registerGamepadEventCallback=function(){C("'registerGamepadEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerBeforeUnloadEventCallback")||(t$F.registerBeforeUnloadEventCallback=function(){C("'registerBeforeUnloadEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillBatteryEventData")||(t$F.fillBatteryEventData=function(){C("'fillBatteryEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"battery")||(t$F.battery=function(){C("'battery' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerBatteryEventCallback")||(t$F.registerBatteryEventCallback=function(){C("'registerBatteryEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"setCanvasElementSize")||(t$F.setCanvasElementSize=function(){C("'setCanvasElementSize' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getCanvasElementSize")||(t$F.getCanvasElementSize=function(){C("'getCanvasElementSize' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"polyfillSetImmediate")||(t$F.polyfillSetImmediate=function(){C("'polyfillSetImmediate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"demangle")||(t$F.demangle=function(){C("'demangle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"demangleAll")||(t$F.demangleAll=function(){C("'demangleAll' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"jsStackTrace")||(t$F.jsStackTrace=function(){C("'jsStackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stackTrace")||(t$F.stackTrace=function(){C("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getEnvStrings")||(t$F.getEnvStrings=function(){C("'getEnvStrings' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"checkWasiClock")||(t$F.checkWasiClock=function(){C("'checkWasiClock' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"flush_NO_FILESYSTEM")||(t$F.flush_NO_FILESYSTEM=function(){C("'flush_NO_FILESYSTEM' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeI53ToI64")||(t$F.writeI53ToI64=function(){C("'writeI53ToI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeI53ToI64Clamped")||(t$F.writeI53ToI64Clamped=function(){C("'writeI53ToI64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeI53ToI64Signaling")||(t$F.writeI53ToI64Signaling=function(){C("'writeI53ToI64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeI53ToU64Clamped")||(t$F.writeI53ToU64Clamped=function(){C("'writeI53ToU64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeI53ToU64Signaling")||(t$F.writeI53ToU64Signaling=function(){C("'writeI53ToU64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"readI53FromI64")||(t$F.readI53FromI64=function(){C("'readI53FromI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"readI53FromU64")||(t$F.readI53FromU64=function(){C("'readI53FromU64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"convertI32PairToI53")||(t$F.convertI32PairToI53=function(){C("'convertI32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"convertU32PairToI53")||(t$F.convertU32PairToI53=function(){C("'convertU32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"uncaughtExceptionCount")||(t$F.uncaughtExceptionCount=function(){C("'uncaughtExceptionCount' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"exceptionLast")||(t$F.exceptionLast=function(){C("'exceptionLast' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"exceptionCaught")||(t$F.exceptionCaught=function(){C("'exceptionCaught' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"ExceptionInfoAttrs")||(t$F.ExceptionInfoAttrs=function(){C("'ExceptionInfoAttrs' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"ExceptionInfo")||(t$F.ExceptionInfo=function(){C("'ExceptionInfo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"CatchInfo")||(t$F.CatchInfo=function(){C("'CatchInfo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"exception_addRef")||(t$F.exception_addRef=function(){C("'exception_addRef' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"exception_decRef")||(t$F.exception_decRef=function(){C("'exception_decRef' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"Browser")||(t$F.Browser=function(){C("'Browser' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"funcWrappers")||(t$F.funcWrappers=function(){C("'funcWrappers' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getFuncWrapper")||(t$F.getFuncWrapper=function(){C("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"setMainLoop")||(t$F.setMainLoop=function(){C("'setMainLoop' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"FS")||(t$F.FS=function(){C("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"mmapAlloc")||(t$F.mmapAlloc=function(){C("'mmapAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"MEMFS")||(t$F.MEMFS=function(){C("'MEMFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"TTY")||(t$F.TTY=function(){C("'TTY' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"PIPEFS")||(t$F.PIPEFS=function(){C("'PIPEFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SOCKFS")||(t$F.SOCKFS=function(){C("'SOCKFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"_setNetworkCallback")||(t$F._setNetworkCallback=function(){C("'_setNetworkCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"tempFixedLengthArray")||(t$F.tempFixedLengthArray=function(){C("'tempFixedLengthArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"miniTempWebGLFloatBuffers")||(t$F.miniTempWebGLFloatBuffers=function(){C("'miniTempWebGLFloatBuffers' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"heapObjectForWebGLType")||(t$F.heapObjectForWebGLType=function(){C("'heapObjectForWebGLType' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"heapAccessShiftForWebGLHeap")||(t$F.heapAccessShiftForWebGLHeap=function(){C("'heapAccessShiftForWebGLHeap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"GL")||(t$F.GL=function(){C("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"emscriptenWebGLGet")||(t$F.emscriptenWebGLGet=function(){C("'emscriptenWebGLGet' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"computeUnpackAlignedImageSize")||(t$F.computeUnpackAlignedImageSize=function(){C("'computeUnpackAlignedImageSize' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"emscriptenWebGLGetTexPixelData")||(t$F.emscriptenWebGLGetTexPixelData=function(){C("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"emscriptenWebGLGetUniform")||(t$F.emscriptenWebGLGetUniform=function(){C("'emscriptenWebGLGetUniform' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"emscriptenWebGLGetVertexAttrib")||(t$F.emscriptenWebGLGetVertexAttrib=function(){C("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeGLArray")||(t$F.writeGLArray=function(){C("'writeGLArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"AL")||(t$F.AL=function(){C("'AL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SDL_unicode")||(t$F.SDL_unicode=function(){C("'SDL_unicode' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SDL_ttfContext")||(t$F.SDL_ttfContext=function(){C("'SDL_ttfContext' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SDL_audio")||(t$F.SDL_audio=function(){C("'SDL_audio' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SDL")||(t$F.SDL=function(){C("'SDL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SDL_gfx")||(t$F.SDL_gfx=function(){C("'SDL_gfx' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"GLUT")||(t$F.GLUT=function(){C("'GLUT' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"EGL")||(t$F.EGL=function(){C("'EGL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"GLFW_Window")||(t$F.GLFW_Window=function(){C("'GLFW_Window' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"GLFW")||(t$F.GLFW=function(){C("'GLFW' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"GLEW")||(t$F.GLEW=function(){C("'GLEW' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"IDBStore")||(t$F.IDBStore=function(){C("'IDBStore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"runAndAbortIfError")||(t$F.runAndAbortIfError=function(){C("'runAndAbortIfError' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"warnOnce")||(t$F.warnOnce=function(){C("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stackSave")||(t$F.stackSave=function(){C("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stackRestore")||(t$F.stackRestore=function(){C("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stackAlloc")||(t$F.stackAlloc=function(){C("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"AsciiToString")||(t$F.AsciiToString=function(){C("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stringToAscii")||(t$F.stringToAscii=function(){C("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"UTF16ToString")||(t$F.UTF16ToString=function(){C("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stringToUTF16")||(t$F.stringToUTF16=function(){C("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"lengthBytesUTF16")||(t$F.lengthBytesUTF16=function(){C("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"UTF32ToString")||(t$F.UTF32ToString=function(){C("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stringToUTF32")||(t$F.stringToUTF32=function(){C("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"lengthBytesUTF32")||(t$F.lengthBytesUTF32=function(){C("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"allocateUTF8")||(t$F.allocateUTF8=function(){C("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"allocateUTF8OnStack")||(t$F.allocateUTF8OnStack=function(){C("'allocateUTF8OnStack' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$F.writeStackCookie=p,t$F.checkStackCookie=_,Object.getOwnPropertyDescriptor(t$F,"ALLOC_NORMAL")||Object.defineProperty(t$F,"ALLOC_NORMAL",{configurable:!0,get:function(){C("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(t$F,"ALLOC_STACK")||Object.defineProperty(t$F,"ALLOC_STACK",{configurable:!0,get:function(){C("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),W$Q=function e(){Z$M||k(),Z$M||(W$Q=e)},t$F.run=k,t$F.preInit)for("function"==typeof t$F.preInit&&(t$F.preInit=[t$F.preInit]);t$F.preInit.length>0;)t$F.preInit.pop()();k()}else var t$F=null;var _0x5f4c81=t$F;function r$S(e){e=u$Z(e,0),this._array=new Array(e),this._length=e}Object.defineProperties(r$S.prototype,{length:{get:function(){return this._length},set:function(e){this._length=e,e>this._array.length&&(this._array.length=e)}},values:{get:function(){return this._array}}}),r$S.prototype.get=function(e){return o$1q.typeOf.number.lessThan("index",e,this._array.length),this._array[e]},r$S.prototype.set=function(e,t){o$1q.typeOf.number("index",e),e>=this.length&&(this.length=e+1),this._array[e]=t},r$S.prototype.peek=function(){return this._array[this._length-1]},r$S.prototype.push=function(e){var t=this.length++;this._array[t]=e},r$S.prototype.pop=function(){return this._array[--this.length]},r$S.prototype.reserve=function(e){o$1q.typeOf.number.greaterThanOrEquals("length",e,0),e>this._array.length&&(this._array.length=e)},r$S.prototype.resize=function(e){o$1q.typeOf.number.greaterThanOrEquals("length",e,0),this.length=e},r$S.prototype.trim=function(e){e=u$Z(e,this.length),this._array.length=e};var _0x1f7052=(_0xec5e62=!0,function(e,t){var i=_0xec5e62?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xec5e62=!1,i}),_0x26a353=_0x1f7052(void 0,(function(){return _0x26a353.toString().search("(((.+)+)+)+$").toString().constructor(_0x26a353).search("(((.+)+)+)+$")})),_0xec5e62;_0x26a353();var _0x549321={Normal:0,Add:1};function _0x50b7d6(e){return function(){return e._disFromCamera}}function _0x496421(e){return function(){return e._priority}}function _0x52d5dd(e,t){return function(){var i=t._currentMaxLevel,n=1/Math.pow(2,i-e._nLODLev);return e._disFromCamera*n}}var _0x408010=function(e){e=e||{},this._context=e.context,this._layer=e.layer,this._customRequestHeaders=e.customRequestHeaders,this._renderQueue=[],this._cache=new e$1Q,this._rootEntities=[],this._cameraPos=new o$1p,this._cameraDir=new o$1p,this._cameraUp=new o$1p,this._cacheEntityCount=u$Z(e.cacheEntityCount,0),this._sceneMode=C$14.SCENE3D,this._projection=null,this._oriRootEntities=e.rootEntities,this._initializeRootEntities(e.rootEntities),this._nLoadingPriority=_0x539352.Child_Priority_NonLinear,this.createPriorityFunction=_0x50b7d6,this._currentMaxLevel=0,this._replacementList=new h$Q,this._replacementSentinel=this._replacementList.add(),this._cacheKey=e.cacheKey;var t=this._layer._baseUri.toString(),i=t.substring(0,t.indexOf("/datas"));this.tablename=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),this._indexedDBSetting=this._layer._indexedDBSetting;var n=this,r=o$1l.defer();if(n._attributes={_errorNum:0,_reStoreTimes:0,_memoryCache:0,_redownload:!1,status:{promise:r.promise,needDownload:void 0}},this._scpUrl=e.scpUrl,e$2e(window.Proxy)){var o=o$1l.defer();n._dpPromise=o.promise,new l$14({name:i+this.tablename}).then((function(e){e.checkObjectStoreExit(n.tablename)?e.checkObjectStoreExit(n.tablename+"Texture")?(_0x4b0aca(e,n,r),n._indexedDBScheduler=e,o.resolve(!0)):(_0x4b0aca(e,n,r),e.createObjectStore(n.tablename+"Texture"),n._indexedDBScheduler=e,o.resolve(!0)):e.createObjectStore(n.tablename).then((function(){e.checkObjectStoreExit(n.tablename+"Texture")?(_0x4b0aca(e,n,r),n._indexedDBScheduler=e,o.resolve(!0)):(_0x4b0aca(e,n,r),e.createObjectStore(n.tablename+"Texture"),n._indexedDBScheduler=e,o.resolve(!0))}))}))}this._rasterFrequency=0,this._statistics={numberOfPendingRequests:0,numberOfAttemptedRequests:0,numberOfTilesProcessing:0,numberOfProcessingAttempted:0,lastLoadedTrigger:{time:Date.now(),done:!1},numberOfColorChangePending:0,numberOfColorChangeAttempted:0,numberOfColorChangeProcessing:0,lastColorChangeTrigger:{time:Date.now(),done:!1}},this._statisticsLastRender=p$19({},this._statistics),this._packingRequest=!1,this._packRequestEntities=[],this._parsingEntities=[],this._attrloaded=!1,this._selectEntities=[],this._requestEntities=[],this.attrsave=!1,this._extrudedId=void 0,this._polygons=void 0,this._indexedDBRequestNum=0,this._indexedDBRequestLimit=3,this._requestByteLength=0,this._prepareLoaded=!0,this._prepareRatio=0,this._associatedFieldName=void 0,this._entityObjectId={},this._objectIdChange=!1,this._isFineLayer=!1,this._entityModelId={},this._stopLoadImagery=!1,this._savetoIndexDBDatas=[]};function _0x4b0aca(e,t,i){e.checkObjectStoreExit("attributes")?!0===t._indexedDBSetting.isAttributesSave&&e.getElementFromDB("attributes","queryFieldNames").then((function(n){if("ALL"===n&&(t._attributes.status.needDownload=!1,i.resolve(!0)),e$2e(t._layer.queryFieldNames)){for(var r=0;r<t._layer.queryFieldNames.length;r++)if(-1===n.indexOf(t._layer.queryFieldNames[r]))return t._attributes.status.needDownload=!0,e.updateElementInDB("attributes","queryFieldNames",n.concat(t._layer.queryFieldNames)),void i.resolve(!0);t._attributes.status.needDownload=!1,i.resolve(!0)}})).otherwise((function(){!0===t._indexedDBSetting.isAttributesSave&&(e$2e(t._layer.queryFieldNames)?e.putElementInDB("attributes","queryFieldNames",t._layer.queryFieldNames):e.putElementInDB("attributes","queryFieldNames","ALL"),t._attributes.status.needDownload=!0,i.resolve(!0))})):e.createObjectStore("attributes").then((function(){i.resolve(!0),!0===t._indexedDBSetting.isAttributesSave&&(e$2e(t._layer.queryFieldNames)?e.putElementInDB("attributes","queryFieldNames",t._layer.queryFieldNames):e.putElementInDB("attributes","queryFieldNames","ALL"),t._attributes.status.needDownload=!0)}))}function _0x28571b(e,t){!e._indexedDBSetting.isAttributesSave||(e$2e(e._indexedDBScheduler)?_0x3f2724(e,t):e._dpPromise.then((function(){_0x3f2724(e,t)})))}function _0x3f2724(e,t){var i=new TextEncoder("utf-8"),n=[],r=o$1l.defer();if(e._indexedDBScheduler.checkObjectStoreExit("attributes")){for(var o in t){try{var a=JSON.stringify(t[o]);a=i.encode(a).join(256)}catch{return r.reject(null),r.promise}n.push(e._indexedDBScheduler.putElementInDB("attributes",o,a))}o$1l.all(n,(function(t){0===e._savetoIndexDBDatas.length&&e._indexedDBScheduler.putElementInDB("attributes","saved",!0)}),(function(i){t._reStoreTimes<=3&&(t._reStoreTimes++,setTimeout((function(){_0x28571b(e,t)}),2e3))}))}else e._indexedDBScheduler.createObjectStore("attributes").then((function(){for(var o in t){try{var a=JSON.stringify(t[o]);a=i.encode(a).join(256)}catch{return r.reject(null),r.promise}n.push(e._indexedDBScheduler.putElementInDB("attributes",o,a))}o$1l.all(n,(function(t){0===e._savetoIndexDBDatas.length&&e._indexedDBScheduler.putElementInDB("attributes","saved",!0)}),(function(i){t._reStoreTimes<=3&&(t._reStoreTimes++,setTimeout((function(){_0x28571b(e,t)}),2e3))}))}))}function _0x6716ca(e,t){if(Array.isArray(e)){for(var i={},n=e.length,r=0;r<n;r++){o=e$2e(t._layer.idFieldName)?e[r][t._layer.idFieldName]:e[r].id||e[r].SmID||e[r].SMID||e[r].smid,!t._attributes.hasOwnProperty(o)&&(t._attributes[o]=e[r],i[o]=e[r],n>500&&r&&r%500==0&&(t._savetoIndexDBDatas.push(i),i={}))}t._savetoIndexDBDatas.push(i)}else{var o;e$2e(o=e.id||e.SmID||e.SMID)&&(t._attributes[o]=e)}t._attributes._memoryCache=1}function _0x1aa4b7(e,t){var i=[],n=e._layer,r="attribute"===n._attributeExtentName?".attribute":n._isS3MB?".s3md":".scvd",o=()=>{};e$2e(a$O.CREDENTIAL)&&(o=e$2e(a$O.CREDENTIAL._keymap[e._scpUrl])?t=>a$O.addTokenWithKey(e._scpUrl,t):e=>a$O.addToken(e));var a="";".attribute"===r&&(a=Object.keys(n._fieldsInfo._hash).join(";"),a=n._fieldsInfo._hash.hasOwnProperty("smid")?"?fields=smid;"+a.replace("smid;",""):"?fields=SmID;"+a.replace("SmID;",""));var s="",l=n._indexInfoAttributeMap;if(e$2e(l)){var u=n._baseUri.toString();for(var c in l)for(var h=l[c],d=0;d<h.length;d++)o(s=u+h[d].url+a),i.push(o$10(s,e._customRequestHeaders))}else for(var f=0,p=e._rootEntities.length;f<p;f++)s=n._isS3MBlock?e._rootEntities[f]._relativePath.resolve(n._baseUri).toString()+e._rootEntities[f]._fileName:e._rootEntities[f]._relativePath.resolve(n._baseUri).toString()+f$Q(e._rootEntities[f]._relativePath.toString().replace(/\/$/,"")),o(s+=r+a),i.push(o$10(s,e._customRequestHeaders));o$1l.all(i,(function(e){n.attrDatas=e}),(function(t){for(var i=0,o=e._rootEntities.length;i<o;i++){var a;if(a=n._isS3MBlock?e._rootEntities[i]._relativePath.resolve(n._baseUri).toString()+e._rootEntities[i]._fileName+r:e._rootEntities[i]._relativePath.resolve(n._baseUri).toString()+f$Q(e._rootEntities[i]._relativePath.toString().replace(/\/$/,""))+r,".attribute"===r){var s=Object.keys(n._fieldsInfo._hash).join(";");n._fieldsInfo._hash.hasOwnProperty("smid")?a=a+"?fields=smid;"+(s=s.replace("smid;","")):a=a+"?fields=SmID;"+(s=s.replace("SmID;",""))}e$2e(a$O.CREDENTIAL)&&(a=e$2e(a$O.CREDENTIAL._keymap[e._scpUrl])?a$O.addTokenWithKey(e._scpUrl,a):a$O.addToken(a)),o$10(a,e._customRequestHeaders).then((function(e){n.attrDatas=[e]}))}}))}Object.defineProperties(_0x408010.prototype,{LoadingPriority:{get:function(){return this._nLoadingPriority},set:function(e){this._nLoadingPriority=e,this.createPriorityFunction=this._nLoadingPriority===_0x539352.Root_Priority?_0x52d5dd:_0x50b7d6,this._nLoadingPriority===_0x539352.UsePagedLodInfo&&(this.createPriorityFunction=_0x496421)}}}),_0x408010.prototype._updatingTiles=function(){return this._statistics.numberOfPendingRequests+this._statistics.numberOfAttemptedRequests+this._statistics.numberOfTilesProcessing},_0x408010.prototype._requestAllScvd=function(){var e=this;e$2e(this._indexedDBScheduler)?_0x1aa4b7(e,e._layer._isS3MB):this._dpPromise.then((function(){_0x1aa4b7(e,e._layer._isS3MB)}))},_0x408010.prototype.getAttributesById=function(e){var t=new TextDecoder("utf-8"),i=o$1l.defer();if(e$2e(this._attributes[e]))return i.resolve(this._attributes[e]),i.promise;if(!this._indexedDBSetting.isAttributesSave&&!this._layer._showLabel||!e$2e(this._indexedDBScheduler)||!this._indexedDBScheduler.checkObjectStoreExit("attributes"))return i.resolve(null),i.promise;var n=this;return this._indexedDBScheduler.getElementFromDB("attributes",e.toString()).then((function(r){if(null!==r){r=r.split(256);var o=new Uint8Array(r);r=t.decode(o),r=JSON.parse(r)}else n._attributes._errorNum++,n._attributes._errorNum>3&&(_0x1aa4b7(n,n._layer._isS3MB),n._attributes._errorNum=0);n._attributes[e]=r,i.resolve(r)}),(function(e){n._attributes._errorNum++,n._attributes._errorNum>3&&!n._attributes._redownload&&(_0x1aa4b7(n,n._layer._isS3MB),n._attributes._redownload=!0),i.resolve(null)})),i.promise},_0x408010.prototype._downloadAttributes=function(){for(var e=[],t=o$1l.defer(),i="attribute"===this._layer._attributeExtentName?".attribute":this._layer._isS3MB?".s3md":".scvd",n=this,r=this._layer,o=0,a=this._rootEntities.length;o<a;o++){var s=this._rootEntities[o];if(e$2e(r._indexInfoMap)){var l=s._fileName,u=r._indexInfoMap[l];if(e$2e(u))for(var c=0;c<u.length;c++){var h=new h$16(u[c].url).resolve(r._baseUri).toString(),d=Object.keys(this._layer._fieldsInfo._hash).join(";");r._fieldsInfo._hash.hasOwnProperty("smid")?h=h+"?fields=smid;"+(d=d.replace("smid;","")):h=h+"?fields=SmID;"+(d=d.replace("SmID;","")),e$2e(a$O.CREDENTIAL)&&(h=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,h):a$O.addToken(h)),e.push(o$10(h,this._customRequestHeaders))}}else{h=this._rootEntities[o]._relativePath.resolve(this._layer._baseUri).toString()+f$Q(this._rootEntities[o]._relativePath.toString().replace(/\/$/,""))+i,d=Object.keys(this._layer._fieldsInfo._hash).join(";");this._layer._fieldsInfo._hash.hasOwnProperty("smid")?h=h+"?fields=smid;"+(d=d.replace("smid;","")):h=h+"?fields=SmID;"+(d=d.replace("SmID;","")),e$2e(a$O.CREDENTIAL)&&(h=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,h):a$O.addToken(h)),e.push(o$10(h,this._customRequestHeaders))}}return o$1l.all(e,(function(e){for(var r=[],o=0,a=e.length;o<a;o++)r.push(_0x276877(e[o],i,n._layer._fieldsInfo));for(var s=0;s<r.length;s++)_0x6716ca(r[s],n);n._attrloaded||(n._attrloaded=!0,n._layer.attributeDownloaded.raiseEvent(n._layer.name+" attribute downloaded.")),t.resolve(!0)}),(function(e){for(var r=0,o=n._rootEntities.length;r<o;r++){var a=n._rootEntities[r]._relativePath.resolve(n._layer._baseUri).toString()+f$Q(n._rootEntities[r]._relativePath.toString().replace(/\/$/,""))+i;e$2e(a$O.CREDENTIAL)&&(a=e$2e(a$O.CREDENTIAL._keymap[n._scpUrl])?a$O.addTokenWithKey(n._scpUrl,a):a$O.addToken(a)),o$10(a,n._customRequestHeaders).then((function(e){var r=[];r.push(_0x276877(e,i,n._layer._fieldsInfo)),_0x6716ca(r[0],n),t.resolve(!0)}))}})),t.promise};var _0xec343c=null,_0x5862de=null,_0x3673b8=!1;function _0x385a58(e){var t=4*e.length,i=_0x5f4c81._malloc(Uint8Array.BYTES_PER_ELEMENT*t),n=new Uint8Array(t);_0x5f4c81.HEAPU8.set(n,i/Uint8Array.BYTES_PER_ELEMENT);var r,o=_0x5f4c81._malloc(Uint8Array.BYTES_PER_ELEMENT*e.length);for(_0x5f4c81.HEAPU8.set(e,o/Uint8Array.BYTES_PER_ELEMENT);0==(r=_0xec343c(i,t,o,e.length));)_0x5862de(i),t*=4,i=_0x5f4c81._malloc(Uint8Array.BYTES_PER_ELEMENT*t),n=new Uint8Array(t),_0x5f4c81.HEAPU8.set(n,i/Uint8Array.BYTES_PER_ELEMENT);var a=new Uint8Array(_0x5f4c81.HEAPU8.buffer,i,r);e=null,n=null;var s=new Uint8Array(a).buffer;return _0x5862de(i),_0x5862de(o),s}function _0x276877(e,t,i){if(".attribute"===t){var n=new Int32Array(e,0,1);n=n[0];for(var r=new Int32Array(e,4,n),o=[],a=0;a<n;a++)o.push(r[a]);var s=Math.floor(o[0]/4.125),l=g=Math.ceil(s/8),u=new Int8Array(e,4*(n+1)+g,4*s),c=u.subarray(0,4*s),h=new Int8Array(c);u=new Int32Array(h.buffer);var d=4*(n+1)+o[0],f=[];for(a=1;a<n;a++){var p=(i=i)._array[a],_=p.type,m=Number(p.size);s=Math.floor(o[a]/(m+.125));var g=Math.ceil(s/8);(10==_||"ntext"===_||"text"===_)&&(m=1,g=l,s=o[a]-g);var x=new Int8Array(e,d+g,s*m).subarray(0,s*m);h=new Int8Array(x);if(4==_||"int32"===_)x=new Int32Array(h.buffer);else if(16==_||"int64"===_)x=new BigInt64Array(h.buffer);else if(6==_||"float"===_)x=new Float32Array(h.buffer);else if(7==_||"double"===_)x=new Float64Array(h.buffer);else if(10==_||"ntext"===_||"text"===_){for(var y=new DataView(x.buffer),v=0,$=[];v+x.byteOffset<y.byteLength;){var b=y.getInt32(v+x.byteOffset,!0);if((v+=4)+b>h.buffer.byteLength||b<0)break;var T=new Uint8Array(h.buffer,v,b);v+=b;var C=a$K(T,void 0,void 0,"gbk");$.push(C)}x=$}d+=o[a],f.push(x)}var S=Object.keys(i._hash),w=[];for(a=0;a<u.length;a++){(O={})[S[0]]=u[a];for(var E=0;E<f.length;E++)O[S[E+1]]=f[E][a];w.push(O)}return w}var P,A=new Uint8Array(e,8);if(null!==_0xec343c&&!0===_0x3673b8)try{P=_0x385a58(A)}catch{return[]}else P=nt$b.inflate(A).buffer;h=new Uint8Array(P);var L=new TextDecoder("utf-8").decode(h);if(".s3md"===t){var M,R=L.substring(4);try{M=JSON.parse(R)}catch{R=L.substring(L.indexOf("{")),M=JSON.parse(R)}for(var O=[],D=0,I=M.layerInfos.length;D<I;D++)for(var F=M.layerInfos[D].records,B=(a=0,F.length);a<B;a++){for(var N={},G=(E=0,(U=F[a]).values.length);E<G;E++)N[U.values[E].name]=U.values[E].field,N[U.values[E].name]=!isNaN(1*N[U.values[E].name])&1*N[U.values[E].name]<Number.MAX_SAFE_INTEGER?1*N[U.values[E].name]:N[U.values[E].name];O.push(N)}return O}O=[];var z=(new s$T).read(L).getElementsByTagName("Record");for(a=0,B=z.length;a<B;a++){for(N={},h=z[a].innerHTML.split("\n"),E=0;E<h.length;E++){var U;if(""!==(U=h[E]))if(-1!==U.indexOf("<ID>"))N.id=U.substring(U.indexOf(">")+1,U.indexOf("</"));else{var V=U.indexOf('"');V=U.indexOf('"',V+1);var k=U.substring(U.indexOf("Name=")+6,V);-1!==U.indexOf("/>")?N[k]="":N[k]=U.substring(U.indexOf(">")+1,U.indexOf("</"))}}O.push(N)}return O}function _0x2a3c92(e,t){var i=new Int8Array(e);for(var n=t.split("").map((function(e){return e.charCodeAt(0)})),r=0;r<n.length;r++)i[r]=i[r]^n[r];return i.buffer}typeof WebAssembly<"u"&&e$2e(_0x5f4c81)&&(_0x5f4c81.onRuntimeInitialized=function(){_0x3673b8=!0},_0xec343c=_0x5f4c81.cwrap("unzip","number",["number","number","number","number"]),_0x5862de=_0x5f4c81.cwrap("freePointer",null,["number"])),_0x408010.prototype._updateRootBoundingSphere=function(e,t){for(var i=0,n=e.length;i<n;i++){var r=e[i],o=this._rootEntities[i];if(e$2e(r.bSphere)&&r.bSphere.radius>0&&(o._boundingSphere=i$1d.transform(r.bSphere,t,new i$1d),e$2e(r.min))){var a=[];a.push(new o$1p(r.min.x,r.min.y,r.min.z)),a.push(new o$1p(r.min.x,r.min.y,r.max.z)),a.push(new o$1p(r.min.x,r.max.y,r.min.z)),a.push(new o$1p(r.min.x,r.max.y,r.max.z)),a.push(new o$1p(r.max.x,r.min.y,r.min.z)),a.push(new o$1p(r.max.x,r.min.y,r.max.z)),a.push(new o$1p(r.max.x,r.max.y,r.min.z)),a.push(new o$1p(r.max.x,r.max.y,r.max.z));for(var s=0;s<8;s++)a[s]=p$1d.multiplyByPoint(t,a[s],a[s]);o._orientedBoundingBox=y$Y.fromPoints(a,o._orientedBoundingBox)}}},_0x408010.prototype._initializeRootEntities=function(e){if(e$2e(e)){this._rootNodeNameList=[];for(var t=this._layer,i=t._fileType,n=i===p$T.ClampGroundPolygon||i===p$T.ClampObjectPolygon||i===p$T.ClampGroundLine||i===p$T.ClampObjectLine,r=new o$1p,o=new o$1p,a=!1,s=[],l=0,u=e.length;l<u;l++){var c=e[l],h=new _0x128750;h.layer=t,h._isAncestorBlock=t._isS3MBlock,h._fileName=c.name,h._relativePath=c.relativePath,h._isRootTile=!0,h._nLODLev=0;var d=h._relativePath.toString()+h._fileName;if(this._rootNodeNameList.push(d),e$2e(c.bSphere)&&c.bSphere.radius>0){if(h._originalBS=c.bSphere,h._boundingSphere=i$1d.transform(c.bSphere,t._matModel,new i$1d),h._oriBoundingSphere=i$1d.clone(h._boundingSphere),s.push(h._boundingSphere),e$2e(c.min)&&!t._isS3MBlock){var f=[];f.push(new o$1p(c.min.x,c.min.y,c.min.z)),f.push(new o$1p(c.min.x,c.min.y,c.max.z)),f.push(new o$1p(c.min.x,c.max.y,c.min.z)),f.push(new o$1p(c.min.x,c.max.y,c.max.z)),f.push(new o$1p(c.max.x,c.min.y,c.min.z)),f.push(new o$1p(c.max.x,c.min.y,c.max.z)),f.push(new o$1p(c.max.x,c.max.y,c.min.z)),f.push(new o$1p(c.max.x,c.max.y,c.max.z));for(var p=0;p<8;p++)f[p]=p$1d.multiplyByPoint(t._matModel,f[p],f[p]);h._orientedBoundingBox=y$Y.fromPoints(f,h._orientedBoundingBox),h.obbMin=c.min,h.obbMax=c.max,0==l?(r=c.max.clone(),o=c.min.clone()):(r.x=Math.max(r.x,c.max.x),r.y=Math.max(r.y,c.max.y),r.z=Math.max(r.z,c.max.z),o.x=Math.min(o.x,c.min.x),o.y=Math.min(o.y,c.min.y),o.z=Math.min(o.z,c.min.z),a=!0)}}else if(e$2e(c.obb)){var _=c.obb,m=new p$1e,g=new o$1p(_.center.x,_.center.y,_.center.z),x=new e$2c(_.xExtent.x,_.xExtent.y,_.xExtent.z,0),y=new e$2c(_.yExtent.x,_.yExtent.y,_.yExtent.z,0),v=new e$2c(_.zExtent.x,_.zExtent.y,_.zExtent.z,0);p$1e.setColumn(m,0,x,m),p$1e.setColumn(m,1,y,m),p$1e.setColumn(m,2,v,m);var $=new y$Y(g,m);h._oriBoundingSphere=i$1d.fromOrientedBoundingBox($,new i$1d),h._boundingSphere=i$1d.transform(h._oriBoundingSphere,t._matModel,new i$1d),g=p$1d.multiplyByPoint(t._matModel,g,g),x=p$1d.multiplyByVector(t._matModel,x,x),y=p$1d.multiplyByVector(t._matModel,y,y),v=p$1d.multiplyByVector(t._matModel,v,v),p$1e.setColumn(m,0,x,m),p$1e.setColumn(m,1,y,m),p$1e.setColumn(m,2,v,m),h._orientedBoundingBox=new y$Y(g,m),h.obbMin=x,h.obbMax=y}n&&e$2e(h._boundingSphere)&&(h._boundingSphere.radius+=9e3),h._subdomainIndex=l,this._rootEntities.push(h)}this._layer.max=r,this._layer.min=o,t._oriBoundingSphere=new i$1d,a?i$1d.fromCornerPoints(o,r,t._oriBoundingSphere):s.length>0&&i$1d.fromBoundingSpheres(s,t._oriBoundingSphere),t._boundingSphere=i$1d.transform(t._oriBoundingSphere,t._matModel,new i$1d)}},_0x408010.prototype._isRootNode=function(e){return!!e$2e(this._rootNodeNameList)&&-1!==this._rootNodeNameList.indexOf(e)},_0x408010.prototype.appendQueryFieldName=function(e){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i],o="attribute"===e._attributeExtentName?".attribute":this._layer._isS3MB?".s3md":".scvd",a=r._relativePath.resolve(this._layer._baseUri).toString()+f$Q(r._relativePath.toString().replace(/\/$/,""))+o,s=e._queryFieldNames,l=s.join(";"),u=this;if("attribute"===e._attributeExtentName){var c;if(e._fieldsInfo._hash.hasOwnProperty("smid")?(a=a+"?fields=smid;"+l,c="smid"):(a=a+"?fields=SmID;"+l,c="SmID"),e._urlType===Tr$4.KEY_VALUE){var h=r._relativePath.path.replace(/\//g,"").replace(".",""),d=e._urlArguments,f={layerName:e.name,rootTile:h,tile:r._fileName,suffix:"attribute",fields:c+";"+l},p=m$1d(f=Object.assign(f,d),!0);(g=a.match(/(\S*)\/datas/)).length>0&&(a=g[0]+"?"+p)}e$2e(a$O.CREDENTIAL)&&(a=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,a):a$O.addToken(a));var _=new r$1c({url:a,throttle:!1,throttleByServer:!1,serverKey:r$1b.getServerKey(a)}),m=o$10(a,this._customRequestHeaders,_);e$2e(promies)&&(m.then((function(e){var t=new Int32Array(e,0,1);t=t[0];for(var i=new Int32Array(e,4,t),n=[],r=0;r<t;r++)n.push(i[r]);var o=Math.floor(n[0]/4.125),a=Math.ceil(o/8),l=new Int8Array(e,4*(t+1)+a,4*o),c=l.subarray(0,4*o),h=new Int8Array(c);l=new Int32Array(h.buffer);var d=4*(t+1)+n[0],f=[];for(r=1;r<t;r++){var p=u._layer._fieldsInfo._array[r],_=p.type,m=Number(p.size);o=Math.floor(n[r]/(m+.125));a=Math.ceil(o/8);var g=new Int8Array(e,d+a,o*m).subarray(0,o*m);h=new Int8Array(g);4==_||16==_?g=new Int32Array(h.buffer):6==_?g=new Float32Array(h.buffer):7==_&&(g=new Float64Array(h.buffer)),d+=n[r],f.push(g)}for(r=0;r<l.length;r++){for(var x={},y=0;y<f.length;y++)x[s[y]]=f[y][r];Object.assign(u._attributes[l[r]],x)}})),t.push(m))}else{if(a=a+"?fields="+l,e._urlType===Tr$4.KEY_VALUE){var g;h=r._relativePath.path.replace(/\//g,"").replace(".",""),d=e._urlArguments,f={layerName:e.name,rootTile:h,tile:r._fileName,suffix:e._attributeExtentName,fields:l},p=m$1d(f=Object.assign(f,d),!0);(g=a.match(/(\S*)\/datas/)).length>0&&(a=g[0]+"?"+p)}e$2e(a$O.CREDENTIAL)&&(a=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,a):a$O.addToken(a));m=u$P(a,this._customRequestHeaders).then((function(e){for(var t=e.Records,i=0;i<t.length;i++){var n=t[i].ID||t[i].id||t[i].SmID||t[i].SMID;u._attributes.hasOwnProperty(n)||Object.assign(u._attributes[n],t[i])}}));t.push(m)}}return t};var _0x1d7821=void 0;function _0x4ff005(e,t){if(e$2e(e.xExtent)){var i=o$1p.fromElements(e.center.x,e.center.y,e.center.z),n=e$2c.fromElements(e.xExtent.x,e.xExtent.y,e.xExtent.z,0),r=e$2c.fromElements(e.yExtent.x,e.yExtent.y,e.yExtent.z,0),o=e$2c.fromElements(e.zExtent.x,e.zExtent.y,e.zExtent.z,0);if(e$2c.equals(n,e$2c.ZERO)&&(n=new e$2c(1,0,0,0)),e$2c.equals(r,e$2c.ZERO)&&(r=new e$2c(0,1,0,0)),e$2c.equals(o,e$2c.ZERO)&&(o=new e$2c(0,0,1,0)),p$1d.multiplyByPoint(t,i,i),p$1d.multiplyByVector(t,n,n),p$1d.multiplyByVector(t,r,r),p$1d.multiplyByVector(t,o,o),e$2e(_0x1d7821))_0x1d7821.center=i,_0x1d7821.halfAxes[0]=n.x,_0x1d7821.halfAxes[1]=n.y,_0x1d7821.halfAxes[2]=n.z,_0x1d7821.halfAxes[3]=r.x,_0x1d7821.halfAxes[4]=r.y,_0x1d7821.halfAxes[5]=r.z,_0x1d7821.halfAxes[6]=o.x,_0x1d7821.halfAxes[7]=o.y,_0x1d7821.halfAxes[8]=o.z,_0x1d7821.areaDirty=1;else{var a=new p$1e(n.x,r.x,o.x,n.y,r.y,o.y,n.z,r.z,o.z);_0x1d7821=new y$Y(i,a)}_0x1d7821._updateBBox();var s=o$1p.distance(_0x1d7821.center,_0x1d7821.bbox[0]);return m=new i$1d(_0x1d7821.center,s)}var l=e.min.x,u=e.min.y,c=e.min.z,h=e.max.x,d=e.max.y,f=e.max.z,p=new o$1p(l,u,c),_=new o$1p(h,d,f),m=new i$1d;return i$1d.fromCornerPoints(p,_,m),i$1d.transform(m,t,m),m}function _0x51a487(e,t){var i,n=[];n.push(new o$1p(e.min.x,e.min.y,e.min.z)),n.push(new o$1p(e.min.x,e.min.y,e.max.z)),n.push(new o$1p(e.min.x,e.max.y,e.min.z)),n.push(new o$1p(e.min.x,e.max.y,e.max.z)),n.push(new o$1p(e.max.x,e.min.y,e.min.z)),n.push(new o$1p(e.max.x,e.min.y,e.max.z)),n.push(new o$1p(e.max.x,e.max.y,e.min.z)),n.push(new o$1p(e.max.x,e.max.y,e.max.z));for(var r=0;r<8;r++)n[r]=p$1d.multiplyByPoint(t,n[r],n[r]);return i=y$Y.fromPoints(n,i)}function _0x49af2f(e,t,i,n,r,o){if(e$2e(n)){var a=new _0x128750;if(i._entity=a,a._parent=t,a._relativePath=o,a._boundingSphere=i._boundingSphere,a._orientedBoundingBox=i._orientedBoundingBox,a._fileName=n.modelPath,a._fileName=a._fileName.replace(/.s3mb*|.s3m*../g,""),a._parentPagelod=i,a._depth=i._depth+1,a._index=t._childrenPageLod.length-1,a._rootName=t._rootName,a._subdomainIndex=t._subdomainIndex+a._index+1,a._indexFilePath=n.indexFilePath,e$2e(n.state)&&"PartLeaf"===n.state&&(a._hasLeafChild=!0),e$2e(n.state)&&"AllLeaf"===n.state)return void(a._isLeafTile=!0);if(e$2e(n.indexFilePath))return void(a._hasConfig=!0);var s=n.children;if(!e$2e(s))return a._isLeafTile=!0,void(a._boundingSphere=void 0);for(var l=0,u=s.length;l<u;l++){var c=s[l];if(e$2e(c.tileInfo)){if(""===c.tileInfo.modelPath){a._hasLeafChild=!0;continue}var h=new _0x4d13e0;if(h._fileType=e._fileType,h._rangeList=c.tileInfo.rangeValue,h._rangeDataList=c.tileInfo.modelPath,h._rangeDataList=h._rangeDataList.replace(/.s3mb*|.s3m*../g,""),0===h._rangeDataList.indexOf("./")&&(h._rangeDataList=h._rangeDataList.substring(2)),"pixelSizeOnScreen"===c.tileInfo.rangeMode?h._rangeMode=_0x219958.PIXEL_SIZE_ON_SCREEN:"geometricError"===c.tileInfo.rangeMode&&(h._rangeMode=_0x219958.GEOMETRY_ERROR),c.tileInfo.boundingBox.xExtent){var d=c.tileInfo.boundingBox,f=o$1p.fromElements(d.center.x,d.center.y,d.center.z),p=e$2c.fromElements(d.xExtent.x,d.xExtent.y,d.xExtent.z,0),_=e$2c.fromElements(d.yExtent.x,d.yExtent.y,d.yExtent.z,0),m=e$2c.fromElements(d.zExtent.x,d.zExtent.y,d.zExtent.z,0);e$2c.equals(p,e$2c.ZERO)&&(p=new e$2c(1,0,0,0)),e$2c.equals(_,e$2c.ZERO)&&(_=new e$2c(0,1,0,0)),e$2c.equals(m,e$2c.ZERO)&&(m=new e$2c(0,0,1,0));var g=new p$1e(p.x,_.x,m.x,p.y,_.y,m.y,p.z,_.z,m.z);h._orientedBoundingBox=new y$Y(f,g),h._orientedBoundingBox._updateBBox(),h.min=h._orientedBoundingBox.bbox[0].clone(),h.max=h._orientedBoundingBox.bbox[0].clone();for(var x,y=1;y<8;y++)x=h._orientedBoundingBox.bbox[y],h.min.x>x.x&&(h.min.x=x.x),h.min.y>x.y&&(h.min.y=x.y),h.min.z>x.z&&(h.min.z=x.z),h.max.x<x.x&&(h.max.x=x.x),h.max.y<x.y&&(h.max.y=x.y),h.max.z<x.z&&(h.max.z=x.z);var v=o$1p.distance(h._orientedBoundingBox.center,h._orientedBoundingBox.bbox[0]);p$1d.multiplyByPoint(r,f,f),p$1d.multiplyByVector(r,p,p),p$1d.multiplyByVector(r,_,_),p$1d.multiplyByVector(r,m,m),h._orientedBoundingBox.center=f,h._orientedBoundingBox.halfAxes[0]=p.x,h._orientedBoundingBox.halfAxes[1]=p.y,h._orientedBoundingBox.halfAxes[2]=p.z,h._orientedBoundingBox.halfAxes[3]=_.x,h._orientedBoundingBox.halfAxes[4]=_.y,h._orientedBoundingBox.halfAxes[5]=_.z,h._orientedBoundingBox.halfAxes[6]=m.x,h._orientedBoundingBox.halfAxes[7]=m.y,h._orientedBoundingBox.halfAxes[8]=m.z,h._orientedBoundingBox.areaDirty=1,h._boundingSphere=new i$1d(f,v)}else h._boundingSphere=_0x4ff005(c.tileInfo.boundingBox,r),h._orientedBoundingBox=_0x51a487(c.tileInfo.boundingBox,r),h.max=o$1p.fromElements(c.tileInfo.boundingBox.max.x,c.tileInfo.boundingBox.max.y,c.tileInfo.boundingBox.max.z),h.min=o$1p.fromElements(c.tileInfo.boundingBox.min.x,c.tileInfo.boundingBox.min.y,c.tileInfo.boundingBox.min.z);h._parent=a._parentPagelod,h._depth=a._depth,(!e$2e(n.state)||"AllLeaf"!=n.state)&&(a._childrenPageLod.push(h),a._pagelodMap[h._rangeDataList]=h,_0x49af2f(e,a,h,c.tileInfo,r,o))}}}}function _0xc3aea2(e,t,i){for(var n=[],r=0;r<e._childrenPageLod.length;r++)e._childrenPageLod[r]._entity._skipLevel=i,n.push(e._childrenPageLod[r]._entity);for(;n.length<t&&n.length>0;){for(var o=[],a=0;a<n.length;a++)for(var s=0;s<n[a]._childrenPageLod.length;s++)n[a]._childrenPageLod[s]._entity._skipLevel=i,o.push(n[a]._childrenPageLod[s]._entity);n=o}if(n.length>0)for(s=0;s<n.length;s++)n[s]._needLoad=!0,_0xc3aea2(n[s],t,i+1)}function _0x549b26(e){1==e._childrenPageLod.length?_0x549b26(e._childrenPageLod[0]._entity):e._needLoad=!0}function _0x4f4bd4(e,t,i){var n=i._matModel;t._configReady=!0,t._configLoadState=N$Q.LOADED;var r=t._relativePath;if(e$2e(e.lodTreeExport.tileInfo.children))for(var o=0,a=e.lodTreeExport.tileInfo.children.length;o<a;o++){t._boundingSphere=_0x4ff005(e.lodTreeExport.tileInfo.boundingBox,n);var s=e.lodTreeExport.tileInfo.children[o];if(e$2e(s.tileInfo)&&(""===s.tileInfo.modelPath&&(t._hasLeafChild=!0),""!==s.tileInfo.modelPath)){var l=new _0x4d13e0;if(l._fileType=i._fileType,l._rangeList=s.tileInfo.rangeValue,l._rangeDataList=s.tileInfo.modelPath,l._rangeDataList=l._rangeDataList.replace(/.s3mb*/g,""),0===l._rangeDataList.indexOf("./")&&(l._rangeDataList=l._rangeDataList.substring(2)),"pixelSizeOnScreen"===s.tileInfo.rangeMode?l._rangeMode=_0x219958.PIXEL_SIZE_ON_SCREEN:"geometricError"===s.tileInfo.rangeMode&&(l._rangeMode=_0x219958.GEOMETRY_ERROR),s.tileInfo.boundingBox.xExtent){var u=s.tileInfo.boundingBox,c=o$1p.fromElements(u.center.x,u.center.y,u.center.z),h=e$2c.fromElements(u.xExtent.x,u.xExtent.y,u.xExtent.z,0),d=e$2c.fromElements(u.yExtent.x,u.yExtent.y,u.yExtent.z,0),f=e$2c.fromElements(u.zExtent.x,u.zExtent.y,u.zExtent.z,0);e$2c.equals(h,e$2c.ZERO)&&(h=new e$2c(1,0,0,0)),e$2c.equals(d,e$2c.ZERO)&&(d=new e$2c(0,1,0,0)),e$2c.equals(f,e$2c.ZERO)&&(f=new e$2c(0,0,1,0));var p=new p$1e(h.x,d.x,f.x,h.y,d.y,f.y,h.z,d.z,f.z);l._orientedBoundingBox=new y$Y(c,p),l._orientedBoundingBox._updateBBox(),l.min=l._orientedBoundingBox.bbox[0].clone(),l.max=l._orientedBoundingBox.bbox[0].clone();for(var _,m=1;m<8;m++)_=l._orientedBoundingBox.bbox[m],l.min.x>_.x&&(l.min.x=_.x),l.min.y>_.y&&(l.min.y=_.y),l.min.z>_.z&&(l.min.z=_.z),l.max.x<_.x&&(l.max.x=_.x),l.max.y<_.y&&(l.max.y=_.y),l.max.z<_.z&&(l.max.z=_.z);var g=o$1p.distance(l._orientedBoundingBox.center,l._orientedBoundingBox.bbox[0]);p$1d.multiplyByPoint(n,c,c),p$1d.multiplyByVector(n,h,h),p$1d.multiplyByVector(n,d,d),p$1d.multiplyByVector(n,f,f),l._orientedBoundingBox.center=c,l._orientedBoundingBox.halfAxes[0]=h.x,l._orientedBoundingBox.halfAxes[1]=h.y,l._orientedBoundingBox.halfAxes[2]=h.z,l._orientedBoundingBox.halfAxes[3]=d.x,l._orientedBoundingBox.halfAxes[4]=d.y,l._orientedBoundingBox.halfAxes[5]=d.z,l._orientedBoundingBox.halfAxes[6]=f.x,l._orientedBoundingBox.halfAxes[7]=f.y,l._orientedBoundingBox.halfAxes[8]=f.z,l._orientedBoundingBox.areaDirty=1,l._boundingSphere=new i$1d(c,g)}else l._boundingSphere=_0x4ff005(s.tileInfo.boundingBox,n),l._orientedBoundingBox=_0x51a487(s.tileInfo.boundingBox,n),l.max=o$1p.fromElements(s.tileInfo.boundingBox.max.x,s.tileInfo.boundingBox.max.y,s.tileInfo.boundingBox.max.z),l.min=o$1p.fromElements(s.tileInfo.boundingBox.min.x,s.tileInfo.boundingBox.min.y,s.tileInfo.boundingBox.min.z);l._parent=void 0,l._depth=t._depth,t._childrenPageLod.push(l),t._pagelodMap[l._rangeDataList]=l,e$2e(t._parent)?t._rootName=t._parent._rootName:t._rootName=t._fileName,l._rootName=t._rootName,_0x49af2f(i,t,l,s.tileInfo,n,r)}}_0xc3aea2(t,i._maxSkipNum,t._skipLevel),t._isRootTile&&_0x549b26(t)}function _0x484265(e,t){var i=u$Z(e._indexFilePath,e._fileName);i=i.replace(".json","");var n,r,o=e._relativePath.resolve(t._baseUri)+i+".json";(o=o.replace(/\+/g,"%2B"),e$2e(t._wstTaskProcessor))?(r=t._isS3MBlock?o.substring(o.indexOf("data/path/")+9):o.substring(o.indexOf("/data/")+5),r=decodeURIComponent(r),n=t._wstTaskProcessor.scheduleTask({data:r,dataType:"json"})):(e$2e(a$O.CREDENTIAL)&&(o=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,o):a$O.addToken(o)),n=u$P(o,void 0,new r$1c({url:o,throttle:!1,throttleByServer:!0,serverKey:r$1b.getServerKey(o)})));e$2e(n)&&(e._configLoadState=N$Q.LOADING,n.then((function(i){if(e$2e(i)){if(e._needLoad=!1,_0x4f4bd4(i,e,t),e$2e(t._layerScheduler._indexedDBScheduler)){var n={blob:i,key:e._relativePath.toString()+e._fileName+".json",tablename:t._layerScheduler.tablename,dbname:t._layerScheduler._indexedDBScheduler.dbname};_0x29d1c7.indexTaskProcessor.scheduleTask(n,[])}}else e._configLoadState=N$Q.UNLOAD}),(function(t){e$2e(t)?e._configLoadState=N$Q.FAILED:e._configLoadState=N$Q.UNLOAD})))}_0x408010.prototype.loadConfig=function(e){if(e._configLoadState===N$Q.UNLOAD){var t=this._layer,i=u$Z(e._indexFilePath,e._fileName);i=i.replace(".json","");var n=e._relativePath.toString()+i+".json";if(e$2e(window.Proxy)&&(!0===this._indexedDBSetting.isGeoTilesSave||this._indexedDBSetting.isGeoTilesRootNodeSave&&this._isRootNode(n)))if(e$2e(this._indexedDBScheduler)){var r=this._indexedDBScheduler.getElementFromDB(this.tablename,n);e$2e(r)?(e._configLoadState=N$Q.LOADING,r.then((function(i){e$2e(i)?_0x4f4bd4(i,e,t):(e._configLoadState=N$Q.UNLOAD,_0x484265(e,t))}),(function(i){e._configLoadState=N$Q.UNLOAD,_0x484265(e,t)}))):(e._configLoadState=N$Q.UNLOAD,_0x484265(e,t))}else _0x484265(e,t);else _0x484265(e,t)}},_0x408010.prototype.loadEntity=function(e){var t=e._s3mLoadState,i=this._layer;this._cacheKey;var n,r,o,a,s=this;if(_0x2f6e82(e,i._frameState)){if(N$Q.UNLOAD===t)if(i._isS3MBlock&&i._blockCache.contains(i._id,e._blockKey))e.s3mBuffer=i._blockCache.get(i._id,e._blockKey),t=e._s3mLoadState=N$Q.LOADED;else{if(!e$2e(e.request)){var l=".s3m",u="s3m";i._isS3MBlock?l=".s3mblock":i._isS3MB?(l=i._isS3MZ?".s3mbz":".s3mb",u=i._isS3MZ?"s3mbz":"s3mb"):i._isOSGB&&(l=".osgb",l=".osgb"),e._fileName=e._fileName.replace(/\0/,"");var c=e._relativePath.resolve(i._baseUri)+e._fileName+l;if(i.subdomains&&(c=c.replace(/(.*realspace)/,i._subdomainsUrlScheme)),c=c.replace(/\+/g,"%2B"),i._urlType===Tr$4.KEY_VALUE){n=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),r=i._urlArguments;var h={layerName:i.name,rootTile:n,tile:e._fileName,suffix:u};o=m$1d(h=Object.assign(h,r),!0),(a=c.match(/(\S*)\/datas/)).length>0&&(c=a[0]+"?"+o)}e.request=new r$1c({url:c,throttle:!0,throttleByServer:!0,serverKey:r$1b.getServerKey(c),priorityFunction:this.createPriorityFunction(e,this)})}var d=e._relativePath.toString()+e._fileName;if(e$2e(window.Proxy)&&(!0===this._indexedDBSetting.isGeoTilesSave||this._indexedDBSetting.isGeoTilesRootNodeSave&&this._isRootNode(d)))if(e$2e(this._indexedDBScheduler)&&this._indexedDBRequestNum<this._indexedDBRequestLimit){this._indexedDBRequestNum++;s=this;var f=this._indexedDBScheduler.getElementFromDB(this.tablename,d);e$2e(f)?(e._s3mLoadState=N$Q.LOADING,f.then((function(t){s._indexedDBRequestNum--,e$2e(t)?(e._s3mLoadState=N$Q.PARSING,e.s3mBuffer=null,e.volBuffer=null,i._isS3MB?i._isS3MBlock?_0x1393e5.parseChildGroup(t,s._layer,e):_0x1393e5.parseResult(t,s._layer,e):_0x46f77a.parseResult(t,s._layer,e,e.volBuffer)):(e._s3mLoadState=N$Q.UNLOAD,_0x42e6cd(e,s))}),(function(t){s._indexedDBRequestNum--,e._s3mLoadState=N$Q.UNLOAD,_0x42e6cd(e,s)}))):(this._indexedDBRequestNum--,e._s3mLoadState=N$Q.UNLOAD,_0x42e6cd(e,s))}else _0x42e6cd(e,s);else this._packingRequest?this._packRequestEntities.push(e):_0x42e6cd(e,s)}if(N$Q.PARSING===t&&"InstanceModel"===i._dataType&&(e.skeletonState===_0x13fd1b.STATE.SkeletonParsing?_0x13fd1b.parse(i,e):e.skeletonState===_0x13fd1b.STATE.SkeletonReady&&_0x1393e5.parseResultInstance(i,e)),N$Q.PARSING===t&&e$2e(e.parsingResult)&&(i._isS3MB?i._isS3MBlock?_0x1393e5.parseChildGroup(e.parsingResult,i,e):_0x1393e5.parseResult(e.parsingResult,i,e):_0x46f77a.parseResult(e.parsingResult,i,e,e.volBuffer),e.parsingResult=null),N$Q.LOADED===t&&(!1!==i._bVolume&&i.loadVolumeData?e._s3mLoadState===N$Q.LOST?e._s3mLoadState=N$Q.UNLOAD:e._s3mLoadState=N$Q.LOADVOL:this._packingRequest?this._parsingEntities.push(e):i._isS3MB||i._isOSGB?_0x1393e5.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer):_0x46f77a.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer),i._S3MTileLoadedEvent.raiseEvent(e._boundingSphere)),N$Q.PARSED===t&&e.transformResource(i._frameState,i,Number.MAX_VALUE),N$Q.LOADVOL===t&&"vol"===i._strVolumeExt){var p,_,m;if(""===i._volName?(p=e._relativePath.resolve(i._baseUri)+e._fileName+"."+i._strVolumeExt,_=e._fileName):(p=e._relativePath.resolve(i._baseUri)+e._fileName+"_"+i._volName+"."+i._strVolumeExt,_=e._fileName+"_"+i._volName),i._urlType===Tr$4.KEY_VALUE){n=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),r=i._urlArguments;h={layerName:i.name,rootTile:n,tile:_,suffix:i._strVolumeExt};o=m$1d(h=Object.assign(h,r),!0),(a=p.match(/(\S*)\/datas/)).length>0&&(p=a[0]+"?"+o)}e$2e(a$O.CREDENTIAL)&&(p=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,p):a$O.addToken(p)),e$2e(e.request)||(e.request=new r$1c({url:p,throttle:!0,throttleByServer:!0,serverKey:r$1b.getServerKey(p),priorityFunction:this.createPriorityFunction(e,this)})),e$2e(m="png"===i._strVolumeExt?t$S(e.request.url,this._customRequestHeaders,e.request):o$10(e.request.url,this._customRequestHeaders,e.request))&&(e._s3mLoadState=N$Q.LOADING,this._statistics.numberOfPendingRequests++,e.request=null,m.then((function(t){e._s3mLoadState=N$Q.VOLLOADED,"png"===i._strVolumeExt?e.volImage=t:e.volBuffer=t,s._statistics.numberOfPendingRequests--,s._statistics.numberOfProcessingAttempted++}),(function(t){e$2e(t)?(s._statistics.numberOfPendingRequests--,e._s3mLoadState=N$Q.VOLFAILED):(s._statistics.numberOfAttemptedRequests++,s._statistics.numberOfPendingRequests--,e._s3mLoadState=N$Q.LOADVOL)})))}else N$Q.LOADVOL===t&&("png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt)&&(e._s3mLoadState=N$Q.VOLLOADED);(N$Q.VOLLOADED===t||N$Q.VOLFAILED===t)&&e$2e(e.s3mBuffer)&&("png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt?i._isS3MB?_0x1393e5.binaryDataParser(i,e,e.s3mBuffer,e.volImage):_0x46f77a.binaryDataParser(i,e,e.s3mBuffer,e.volImage):i._isS3MB?_0x1393e5.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer):_0x46f77a.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer))}},_0x408010.prototype.reloadVol=function(e){var t,i,n,r,o=this._layer;if(this._cacheKey,"vol"===o._strVolumeExt){var a,s,l;if(""===o._volName?(a=e._relativePath.resolve(o._baseUri)+e._fileName+"."+o._strVolumeExt,s=e._fileName):(a=e._relativePath.resolve(o._baseUri)+e._fileName+"_"+o._volName+"."+o._strVolumeExt,s=e._fileName+"_"+o._volName),o._urlType===Tr$4.KEY_VALUE){t=e._relativePath.path.replace(/\//g,"").replace(".",""),i=o._urlArguments;var u={layerName:o.name,rootTile:t,tile:s,suffix:o._strVolumeExt};n=m$1d(u=Object.assign(u,i),!0),(r=a.match(/(\S*)\/datas/)).length>0&&(a=r[0]+"?"+n)}if(e$2e(a$O.CREDENTIAL)&&(a=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,a):a$O.addToken(a)),e$2e(e.request)||(e.request=new r$1c({url:a,throttle:!0,throttleByServer:!0,serverKey:r$1b.getServerKey(a),priorityFunction:this.createPriorityFunction(e,this)})),l="png"===o._strVolumeExt?t$S(e.request.url,this._customRequestHeaders,e.request):o$10(e.request.url,this._customRequestHeaders,e.request),this._statistics.numberOfColorChangeProcessing++,e$2e(l)){e.request=null,e._reloadVol=!1,this._statistics.numberOfColorChangePending++;var c=this;l.then((function(t){if(c._statistics.numberOfColorChangePending--,"vol"===o._strVolumeExt&&e$2e(t)&&t.byteLength>7&&e$2e(e._volObj)){var i,n=new Uint8Array(t,8);i=null!=_0xec343c?_0x385a58(n):nt$b.inflate(n).buffer;var r=new Float64Array(i,0,1),a=new Uint32Array(i,48,1);if(0===r[0]||3200===a[0]||3201===a[0]){var s=0;0===r[0]&&(s=8);var l=new Float64Array(i,s,6),u=l[0],h=l[1],d=l[2],f=l[3],p=l[4]<l[5]?l[4]:l[5],_=l[4]>l[5]?l[4]:l[5],m={left:u,top:h,right:d,bottom:f,minHeight:p,maxHeight:_,width:d-u,length:h-f,height:_-p},g=new Uint32Array(i,48+s,7),x=g[0],y=g[1],v=g[2],$=g[3],b={nFormat:x,nSideBlockCount:y,nBlockLength:v,nLength:$,nWidth:g[4],nHeight:g[5],nDepth:g[6],imageArray:new Uint8Array(i,76+s,$*$*4)},T=o._context._id+"_"+o.id+"_"+e._relativePath.resolve(o._baseUri)+"_"+e._fileName,C=k$S.FilterMode.LINEAR;e$2e(o._hypsometricSetting)&&o._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(C=k$S.FilterMode.NEAREST),3201===b.nFormat&&e$2e(o._hypsometricSetting)&&_0x46f77a.convertFloat(b,o._hypsometricSetting,C);var S=Se$e.ReloadVolumeTexture(T,o._gl,o._context,b,C);e._volObj.volTexture=S,e._volObj.nFormat=b.nFormat,e._volObj.nSideBlockCount=b.nSideBlockCount,e._volObj.nBlockLength=b.nBlockLength,e._volObj.nLength=b.nLength,e._volObj.nWidth=b.nWidth,e._volObj.nHeight=b.nHeight,e._volObj.nDepth=b.nDepth,e._volObj.id=T,e._volObj.dataFloor=o._fMinValue,e._volObj.dataCeil=o._fMaxValue,e._volObj.volBounds=m}}c._statistics.numberOfColorChangeProcessing--}),(function(t){e$2e(t)||(c._statistics.numberOfColorChangeAttempted++,e._reloadVol=!0),c._statistics.numberOfColorChangePending--,c._statistics.numberOfColorChangeProcessing--}))}else this._statistics.numberOfColorChangeProcessing--}},_0x408010.prototype.reloadVolMapping=function(e){var t=this._layer;if("vol_texture_mapping"===t._strVolumeExt){var i=t._context;for(var n in e._volTextures){this._statistics.numberOfColorChangeProcessing++;var r=n,o=e._volTextures[r],a=t._id+i._id,s=r.substring(0,r.length-a.length)+"_"+e._fileName;s=""!==t._volName?s+"_"+t._volName:s,s+=".vol";var l=e._relativePath.resolve(t._baseUri)+s;if(0!=t.urlType){var u=t._urlArguments,c=l.indexOf("datas")+5,h=u.layer3DName,d=l.substring(l.indexOf("/path/")+6).split("/"),f=d[0],p=d[1].substring(0,d[1].indexOf(".")),_=d[1].substring(d[1].indexOf(".")+1,d[1].length);for(var n in l=l.substring(0,c)+"?layerName="+h+"&rootTile="+f+"&tile="+p+"&suffix="+_,u)l=l+"&"+n+"="+u[n]}var m=o$10(l,this._customRequestHeaders);if(e$2e(m)){this._statistics.numberOfColorChangePending++;var g=this;m.then((function(i){if(g._statistics.numberOfColorChangePending--,e$2e(i)){var n,r=void 0,a=new Uint8Array(i,8);if(n=null!=_0xec343c?_0x385a58(a):nt$b.inflate(a).buffer,1===new Float64Array(n,0,1)[0]){var s=new Uint32Array(n,8,4),l=s[0],u=s[1],c=s[2];r={nFormat:l,nWidth:u,nHeight:c,nPixelSize:s[3],imageArray:new Float32Array(n,24,u*c)}}if(e$2e(r)){var h=_0x46f77a.convertFloatTexture(r,t._hypsometricSetting,t._hypsometricSetting.filterMode);o.copyFrom({width:r.nWidth,height:r.nHeight,arrayBufferView:h})}g._statistics.numberOfColorChangeProcessing--,i=null,e._reloadVol=!1}}),(function(e){g._statistics.numberOfColorChangePending--,g._statistics.numberOfColorChangeAttempted++,g._statistics.numberOfColorChangeProcessing--}))}else this._statistics.numberOfColorChangeProcessing--}}},_0x408010.prototype.dealWithPrepareLoad=function(e){if(this._requestByteLength+=e,this._requestByteLength>this._layer._prepareLoadSize)this._layer._prepareLoadEvent.raiseEvent(100),this._prepareLoaded=!0,this.refreshPrepareLoad();else{var t=Math.floor(100*this._requestByteLength/this._layer._prepareLoadSize);t>this._prepareRatio&&(this._prepareRatio=t,this._layer._prepareLoadEvent.raiseEvent(t))}};var _0x432792=/({.*?})/g;function _0x42e6cd(e,t){var i,n=e.request.url;if(e$2e(t._layer._wstTaskProcessor)){var r;r=t._layer._isS3MBlock?e.request.url.substring(e.request.url.indexOf("data/path/")+9):e.request.url.substring(e.request.url.indexOf("/data/")+5),r=decodeURIComponent(r),i=t._layer._wstTaskProcessor.scheduleTask({dataType:"arraybuffer",data:r})}else{if(e$2e(t._layer._subdomains)){var o=t._layer._subdomains,a=o[e._subdomainIndex%o.length];n=n.replace(_0x432792,(function(e,t){return"{s}"===t?a:e}))}e$2e(a$O.CREDENTIAL)&&(n=e$2e(a$O.CREDENTIAL._keymap[n])?a$O.addTokenWithKey(t._scpUrl,n):a$O.addToken(n)),i=o$10(n,t._customRequestHeaders,e.request)}e$2e(i)?(e._s3mLoadState=N$Q.LOADING,t._statistics.numberOfPendingRequests++,i.then((function(i){if(e$2e(t._layer._wstTaskProcessor)&&(!e$2e(i)||!e._isVisible||!ti$4.update(t._layer._context.memorySize)))return e._s3mLoadState=N$Q.UNLOAD,void(e.request=null);t._prepareLoaded||t.dealWithPrepareLoad(i.byteLength),e.request=null,t._statistics.numberOfPendingRequests--,e._s3mLoadState===N$Q.LOADING&&(t._layer._isS3MBlock&&t._layer._blockCache.set(t._layer._id,e._blockKey,i),0!=t._cacheKey.length?e.s3mBuffer=_0x2a3c92(i,t._cacheKey):e.s3mBuffer=i,e._s3mLoadState=N$Q.LOADED,t._statistics.numberOfProcessingAttempted++)}),(function(i){e.request=null,e$2e(i)?(t._statistics.numberOfPendingRequests--,e._s3mLoadState=N$Q.FAILED):(t._statistics.numberOfAttemptedRequests++,t._statistics.numberOfPendingRequests--,e._s3mLoadState=N$Q.UNLOAD)}))):e.request=null}function _0x1ec436(e,t,i){var n=t._layer;if(n.hasAttributeIndex&&i){if(e.leafAttrLoadState===N$Q.LOADED)return}else if(t.attrsave||e.attrLoadState===N$Q.LOADED)return;var r=t;e$2e(n._queryFieldNames)&&"attribute"===n._attributeExtentName&&(i||(e.attrLoadState=N$Q.LOADING),r._indexedDBSetting.isAttributesSave?r._indexedDBScheduler.checkObjectStoreExit(e._fileName)?r._indexedDBScheduler.getElementFromDB(e._fileName,"saved").then((function(i){1==i?r._indexedDBScheduler.db.transaction(e._fileName).objectStore(e._fileName).get("obj").onsuccess=function(i){var n=i.target.result.value,r=new FileReader;r.onload=function(){var i=JSON.parse(r.result);t._attributes=Object.assign(t._attributes,i),e.attrLoadState=N$Q.LOADED},r.readAsText(n)}:_0x417972(e,t)})).otherwise((function(){_0x417972(e,t)})):_0x417972(e,t):_0x417972(e,t,i))}function _0x417972(e,t,i){var n=t._layer;if((!t.attrsave||n.hasAttributeIndex)&&e$2e(n._queryFieldNames)){var r="attribute"===n._attributeExtentName?".attribute":n._isS3MB?".s3md":".scvd",o=t,a=e._attrAppend.length>0?e._attrAppend:n._queryFieldNames,s=a.join(";"),l=()=>{};e$2e(a$O.CREDENTIAL)&&(l=e$2e(a$O.CREDENTIAL._keymap[o._scpUrl])?e=>a$O.addTokenWithKey(o._scpUrl,e):e=>a$O.addToken(e));var u=r;if(n.hasAttributeIndex&&i&&(u="_1"+r),".attribute"===r){var c="";c=n._fieldsInfo._hash.hasOwnProperty("smid")?"?fields=smid;"+s:"?fields=SmID;"+s;var h="",d=[],f=n._baseUri.toString(),p=n._indexInfoAttributeMap;if(e$2e(p))for(var _=p[e._relativePath.path+e._fileName],m=0;m<_.length;m++)l(h=f+_[m].url+c),d.push(o$10(h,o._customRequestHeaders));else{if(h=""===e._relativePath.toString()?f+e._rootName:e._relativePath.resolve(n._baseUri).toString()+f$Q(e._relativePath.toString().replace(/\/$/,"")),h+=u+c,n._urlType===Tr$4.KEY_VALUE){var g=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),x=n._urlArguments,y={layerName:n.name,rootTile:g,tile:e._fileName,suffix:"attribute",fields:s},v=m$1d(y=Object.assign(y,x),!0),$=h.match(/(\S*)\/datas/);$.length>0&&(h=$[0]+"?"+v)}l(h),d.push(o$10(h,o._customRequestHeaders))}d.length>0?(n.hasAttributeIndex&&i?e.leafAttrLoadState=N$Q.LOADING:e.attrLoadState=N$Q.LOADING,o$1l.all(d,(function(t){o.attrsave=!0,n.hasAttributeIndex&&i?e.leafAttrLoadState=N$Q.LOADED:e.attrLoadState=N$Q.LOADED,e._attrAppend=[];for(let i=0;i<t.length;i++){var r=t[i],s=new Int32Array(r,0,1);s=s[0];for(var l=new Int32Array(r,4,s),u=[],c=0;c<s;c++)u.push(l[c]);var h=Math.floor(u[0]/4.125),d=C=Math.ceil(h/8),f=new Int8Array(r,4*(s+1)+C,4*h),p=f.subarray(0,4*h),_=new Int8Array(p);f=new Int32Array(_.buffer);var m=4*(s+1)+u[0],g=[],x=[];for(c=1;c<=a.length;c++){var y=o._layer._fieldsInfo,v=a[c-1],$=y.get(v),b=$.type,T=Number($.size);h=Math.floor(u[c]/(T+.125));var C=Math.ceil(h/8);(10==b||"ntext"===b||"text"===b)&&(T=1,C=d,h=u[c]-C);var S=new Uint8Array(r,m,C);g.push(S);var w=new Int8Array(r,m+C,h*T).subarray(0,h*T);_=new Int8Array(w);if(4==b||"int32"===b)w=new Int32Array(_.buffer);else if("int16"===b)w=new Int16Array(_.buffer);else if(16==b||"int64"===b)w=new BigInt64Array(_.buffer);else if(6==b||"float"===b)w=new Float32Array(_.buffer);else if(7==b||"double"===b)w=new Float64Array(_.buffer);else if(10==b||"ntext"===b||"text"===b){for(var E=new DataView(w.buffer.slice(m+C,m+C+h*T)),P=0,A=[];P<E.byteLength;){var L=E.getInt32(P,!0);if((P+=4)+L>_.buffer.byteLength||L<0)break;var M=new Uint8Array(_.buffer,P,L);P+=L;var R=a$K(M,void 0,void 0,"gbk");A.push(R)}w=A}m+=u[c],x.push(w)}var O={};for(c=0;c<f.length;c++){for(var D={},I=0;I<x.length;I++){0!=(g[I][Math.floor(c/8)]>>7-c%8&1)?D[a[I]]=x[I][c]:D[a[I]]=null}e$2e(o._attributes[f[c]])&&(D=p$19(D,o._attributes[f[c]])),o._attributes[f[c]]=D,O[f[c]]=D}if(o._indexedDBSetting.isAttributesSave){var F=new Blob([JSON.stringify(O)],{type:"application/json"});if(o._indexedDBScheduler.checkObjectStoreExit(e._fileName))o._indexedDBScheduler.putElementInDB(e._fileName,"obj",F).then((function(){o.attrsave=!1,o._indexedDBScheduler.putElementInDB(e._fileName,"saved",!0),f=null})).otherwise((function(){o._indexedDBScheduler.clear(e._fileName),o.attrsave=!1,f=null}));else o._indexedDBScheduler.createObjectStore(e._fileName).then((function(){o._indexedDBScheduler.putElementInDB(e._fileName,"obj",F).then((function(){o.attrsave=!1,o._indexedDBScheduler.putElementInDB(e._fileName,"saved",!0),f=null})).otherwise((function(){o.attrsave=!1,f=null}))})).otherwise((function(e){o.attrsave=!1,f=null}))}else o.attrsave=!1}if(e$2e(n.themeStyle))for(var B,N=[e];B=N.pop();)for(var G=0;G<B._childrenPageLod.length;G++)for(var z=B._childrenPageLod[G],U=0;U<z._renderEntityList.length;U++){z._renderEntityList[U].updateTheme(n),e$2e(z._entity)&&N.push(z._entity)}})).otherwise((function(t){o.attrsave=!1,e$2e(t)?n.hasAttributeIndex&&i?e.leafAttrLoadState=N$Q.FAILED:e.attrLoadState=N$Q.FAILED:n.hasAttributeIndex&&i?e.leafAttrLoadState=N$Q.UNLOAD:e.attrLoadState=N$Q.UNLOAD}))):n.hasAttributeIndex&&i?e.leafAttrLoadState=N$Q.UNLOAD:e.attrLoadState=N$Q.UNLOAD}}}function _0xa2e6cb(e,t){if(e$2e(t._cartographic))if(e instanceof Array){for(var i=[],n=0;n<e.length;n++){var r=e[n];if(e$2e(r)&&(r instanceof h$R||r instanceof i$P)){var o=r.getImagery(t._cartographic);i=i.concat(o)}}i.length>0&&(t.setImagerys(i,t._cartographic),t._imageRasterFinish=!1,t._imageryLevels=[])}else{if(e$2e(e)&&(e instanceof h$R||e instanceof i$P))(i=e.getImagery(t._cartographic)).length>0&&(t.setImagerys(i,t._cartographic),t._imageRasterFinish=!1,t._imageryLevels=[])}}function _0x45bc09(e){const t=e._layer,i=t.attrDatas;if(!e$2e(i)||0===i.length)return;const n=t._fieldsInfo,r="attribute"===t._attributeExtentName?".attribute":t._isS3MB?".s3md":".scvd",o=performance.now();for(;i.length;){if(_0x6716ca(_0x276877(i.pop(),r,n),e),performance.now()-o>10)break}}function _0x1bcd86(e){const t=e._layer,i=t.attrDatas,n=e._savetoIndexDBDatas;if(e$2e(i)&&0===i.length&&0!==n.length&&0===i.length){e._attrloaded||(e._attrloaded=!0,t.attributeDownloaded.raiseEvent(t.name+" attribute downloaded."));const i=performance.now();for(;n.length;){if(_0x28571b(e,n.pop()),performance.now()-i>1)break}}}function _0x417359(e,t){var i=e._statistics,n=e._statisticsLastRender,r=i.numberOfPendingRequests,o=i.numberOfTilesProcessing,a=n.numberOfPendingRequests,s=n.numberOfTilesProcessing,l=r!==a||o!==s,u=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests&&0===i.numberOfProcessingAttempted,c=i.numberOfColorChangePending,h=n.numberOfColorChangePending,d=i.numberOfColorChangeProcessing,f=n.numberOfColorChangeProcessing,p=(c!==h||d!==f)&&0===i.numberOfColorChangeAttempted&&0===c&&0===d;Date.now()-i.lastLoadedTrigger.time>2e3&&i.lastLoadedTrigger.done&&t.afterRender.push((function(){e._layer._allTilesLoaded.raiseEvent(),i.lastLoadedTrigger.done=!1})),l&&u&&(i.lastLoadedTrigger.done=!0,i.lastLoadedTrigger.time=Date.now()),Date.now()-i.lastColorChangeTrigger.time>2e3&&i.lastColorChangeTrigger.done&&t.afterRender.push((function(){e._layer._colorTableChanged.raiseEvent(),i.lastColorChangeTrigger.done=!1})),p&&u&&(i.lastColorChangeTrigger.done=!0,i.lastColorChangeTrigger.time=Date.now())}_0x408010.prototype._clearIndexedDBCache=function(){e$2e(this._indexedDBScheduler)&&this._indexedDBScheduler.clear(this.tablename)},_0x408010.prototype._refreshVolume=function(){if(this._layer._bVolume){var e=[],t={};if("vol"===this._layer._strVolumeExt){for(var i=0,n=this._rootEntities.length;i<n;i++){e$2e(r=this._rootEntities[i])&&e$2e(r._fileName)&&(t[r._relativePath.resolve(this._layer._baseUri)+r._fileName]=r,e.push(r))}for(;s=e.pop();)for(i=0,n=s._childrenPageLod.length;i<n;i++){if(e$2e((o=s._childrenPageLod[i])._entity)&&e$2e(o._entity._fileName))e$2e(t[u=o._entity._relativePath.resolve(this._layer._baseUri)+o._entity._fileName])||(t[u]=o._entity),e.push(o._entity)}}else if("vol_texture_mapping"===this._layer._strVolumeExt){for(i=0,n=this._rootEntities.length;i<n;i++){var r;e$2e((r=this._rootEntities[i])._volTextures)&&(t[r.name]=r,e.push(r))}for(;s=e.pop();)for(i=0,n=s._childrenPageLod.length;i<n;i++){var o;e$2e((o=s._childrenPageLod[i])._entity)&&e$2e(o._entity._volTextures)&&(t[r.name]=o._entity,e.push(o._entity))}}if(this._layer._refreshVolume)for(var a in this._layer._refreshVolume=!1,t)t[a]._reloadVol=!0;if("vol"===this._layer._strVolumeExt)for(var a in t){var s;if(e$2e(s=t[a])&&s._isParsed&&e$2e(s._volObj)&&s._reloadVol){var l=this._layer,u=l._context._id+"_"+l.id+"_"+s._relativePath.resolve(l._baseUri)+"_"+s._fileName;s._volObj.id==u&&this.reloadVol(s)}}else if("vol_texture_mapping"===this._layer._strVolumeExt)for(var a in t)t[a]._reloadVol&&this.reloadVolMapping(t[a]);e.length=0,t=[]}},_0x408010.prototype._refreshImage=function(){if(e$2e(this._layer._imageryLayer)){for(var e=[],t={},i=0;i<this._rootEntities.length;i++){var n=this._rootEntities[i];if(e$2e(n)&&e$2e(n._fileName))for(var r=0;r<n._childrenPageLod.length;r++)for(var o=n._childrenPageLod[r],a=0;a<o._renderEntityList.length;a++){_0xa2e6cb(this._layer._imageryLayer,o._renderEntityList[a]);for(var s=o._renderEntityList[a]._imagerys.length,l=0;l<s;l++){for(var u=o._renderEntityList[a]._imagerys[l];e$2e(u.parent)&&u.level>u.imageryLayer._imageryProvider.minimumLevel&&!(u=u.parent).rectangle.contains(this._layer.layerBounds););t[JSON.stringify([u.x,u.y,u.level,u.imageryLayer._layerIndex])]=u}e$2e(o._entity)&&e$2e(o._entity._fileName)&&e.push(o._entity)}}for(var c in t)t[c].processStateMachine(this._layer._frameState,!1);for(var h;h=e.pop();)for(i=0,r=h._childrenPageLod.length;i<r;i++){for(o=h._childrenPageLod[i],a=0;a<o._renderEntityList.length;a++)_0xa2e6cb(this._layer._imageryLayer,o._renderEntityList[a]);e$2e(o._entity)&&e$2e(o._entity._fileName)&&e.push(o._entity)}e.length=0}},_0x408010.prototype._hideImage=function(e){if(e$2e(this._layer._imageryLayer)){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i];e$2e(r)&&e$2e(r._fileName)&&t.push(r)}for(var o;o=t.pop();)for(i=0,n=o._childrenPageLod.length;i<n;i++){for(var a=o._childrenPageLod[i],s=0;s<a._renderEntityList.length;s++)a._renderEntityList[s]._showImagerysImmediate=!1;e$2e(a._entity)&&e$2e(a._entity._fileName)&&t.push(a._entity)}t.length=0}},_0x408010.prototype.update=function(e,t,i){this._updateSceneMode(t.camera);var n=t.passes.pick;this._statistics.numberOfAttemptedRequests=0,this._statistics.numberOfColorChangeAttempted=0,!n&&!t._fboState.enabled&&(this.LoadingPriority===_0x539352.UsePagedLodInfo?this._scheduleSkip(t):this._schedule(t)),this._refreshVolume(),this._updatePolygons(),this._updateRenderQueue(e,t,i),t.passes.render&&_0x417359(this,t),this._statisticsLastRender=p$19({},this._statistics),this.traverseRenderEntityRecursionForObjsTranslate(),_0x45bc09(this),_0x1bcd86(this)},_0x408010.prototype._updateRenderQueue=function(e,t,i){if(this.LoadingPriority,_0x539352.UsePagedLodInfo,i.length,this._layer._fileType===p$T.ClampGroundRealtimeRasterCache){this._rasterFrequency++,40==this._rasterFrequency&&(this._rasterFrequency=0),t.rasterPerFrame=this._layer.rasterPerFrame;for(var n=0,r=this._renderQueue.length;n<r;n++){(o=this._renderQueue[n]).isDestroyed()||o.update(e,t,i,this._layer)}}else for(n=0,r=this._renderQueue.length;n<r;n++){var o;(o=this._renderQueue[n]).isDestroyed()||o.update(e,t,i,this._layer)}},_0x408010.prototype._updatePolygons=function(){if(e$2e(this._extrudedId)&&e$2e(this._polygons)){for(var e=0,t=this._renderQueue.length;e<t;e++){var i=this._renderQueue[e],n=i._selectionInforMap._hash;if(e$2e(i._polygonId)){var r={};r[i._polygonId]=0,i.updateObjsOperation(r)}e$2e(n[this._extrudedId])?(i._polygons=this._polygons,i._polygonId=this._extrudedId):(i._polygons=void 0,i._polygonId=void 0,i._polygonCommands=[])}this._polygons=void 0}},_0x408010.prototype.saveLocalCache=function(e){if((!0===this._layer._indexedDBSetting.isGeoTilesSave||!0===this._layer._indexedDBSetting.isGeoTilesRootNodeSave||!0===this._layer._indexedDBSetting.isAttributesSave)&&e$2e(this._indexedDBScheduler)){var t={tablename:this.tablename,dbname:this._indexedDBScheduler.dbname};if(e.push(t),this._layer._isS3MBlock){t={tablename:this.tablename+"Texture",dbname:this._indexedDBScheduler.dbname};e.push(t)}}};var _0x933fa2=function(e,t){return e._disFromCamera-t._disFromCamera};function _0xfdd3f2(e){e._readyAncestor=void 0;var t=e._parentPagelod;if(e$2e(t)){e._readyAncestor=t._ready?t:t._readyAncestor;for(var i=e._childrenPageLod,n=i.length,r=0;r<n;r++){i[r]._readyAncestor=e._readyAncestor}var o=e._leafChildren;for(n=o.length,r=0;r<n;r++){o[r]._readyAncestor=e._readyAncestor}}}function _0x1de79c(e){return!e._isLeafTile&&e._needRefine}var _0x3a9378=new o$1p,_0x49699b=new o$1p;function _0x131171(e,t,i){var n=i._boundingSphere;if(e$2e(n)){var r;if(i._isRootTile){var o=e.cullingVolume,a=e$2e(i._orientedBoundingBox)?i._orientedBoundingBox:n,s=i$X.MASK_INDETERMINATE;i._visibilityPlaneMask=o.computeVisibilityWithPlaneMask(a,s),r=i._visibilityPlaneMask!==i$X.MASK_OUTSIDE}else r=!0;var l=o$1p.distance(n.center,e.camera.position)-n.radius;l=Math.max(0,l),i._disFromCamera=l;var u=o$1p.subtract(n.center,e.camera.positionWC,_0x3a9378);i._centerZDepth=o$1p.dot(e.camera.directionWC,u),i._isVisible=r&&l<=t._visibleDistanceMax&&l>=t._visibleDistanceMin;var c=e.camera,h=n.radius,d=o$1p.multiplyByScalar(c.directionWC,i._centerZDepth,_0x49699b),f=o$1p.add(c.positionWC,d,_0x49699b),p=o$1p.subtract(f,n.center,_0x49699b);if(o$1p.magnitude(p)>h){var _=o$1p.normalize(p,_0x49699b),m=o$1p.multiplyByScalar(_,h,_0x49699b),g=o$1p.add(n.center,m,_0x49699b),x=o$1p.subtract(g,c.positionWC,_0x49699b),y=o$1p.normalize(x,_0x49699b);i._foveatedFactor=1-Math.abs(o$1p.dot(c.directionWC,y))}else i._foveatedFactor=0}else i._isVisible=!0}function _0x163866(e,t,i,n){if(e$2e(i._boundingSphere)){var r=e$2e(i._orientedBoundingBox)?i._orientedBoundingBox:i._boundingSphere,o=e.cullingVolume.computeVisibilityWithPlaneMask(r,n),a=o!==i$X.MASK_OUTSIDE;e$2e(i._entity)&&(i._entity._visibilityPlaneMask=o);var s=o$1p.subtract(i._boundingSphere.center,e.camera.positionWC,_0x3a9378);i._centerZDepth=o$1p.dot(e.camera.directionWC,s),i._isVisible=a}else i._isVisible=!0}function _0xd98a24(e,t){e._maximumPriority.distance=Math.max(t._disFromCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t._disFromCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t._skipLevel,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t._skipLevel,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t._foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t._foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.pixel=Math.max(t._avgPix,e._maximumPriority.pixel),e._minimumPriority.pixel=Math.min(t._avgPix,e._minimumPriority.pixel)}function _0x209987(e,t,i){var n=e.positionWC,r=t.radius,o=t.center,a=o$1p.distance(o,n),s=.5*e$2d.PI_OVER_FOUR;return 2*(.5*i/Math.tan(s)*r/a)}function _0x443088(e,t,i){_0x131171(e,t,i),i._shouldSelect=!1,i._selected=!1,i._needRequest=!0,i._needRefine=!1;for(var n=i._childrenPageLod,r=n.length,o=0;o<r;o++){(s=n[o])._selected=!1,s._shouldSelect=!1,s._selectionDepth=0,s._stackLength=0,s._finalResolution=!0,s._needRefine=!1,_0x163866(e,t,s,i._visibilityPlaneMask),s._isVisible&&(s.calcPixFromCam(e.camera,t._context,t._lodRangeScale,t._fileType,t.LoadingPriority),t._layerScheduler._prepareLoaded||(pageLod._isLessLodDis&&(i._prepareLoad=!0),pageLod._isLessLodDis=!1),s._isLessLodDis||(i._needRefine=!0,s._needRefine=!0))}i._isRootTile&&(i._avgPix=_0x209987(e.camera,i._boundingSphere,t._context.drawingBufferHeight));var a=i._leafChildren;for(r=a.length,o=0;o<r;o++){var s;(s=a[o])._shouldSelect=!1,_0x163866(e,t,s,i._visibilityPlaneMask),s._selected=!1,s._needRefine=!1}_0xd98a24(t,i)}function _0x453b8c(e){return e._isVisible}function _0x2fe368(e,t,i,n){var r=t._layer;if(n._depth>r._maxSkipLevel&&!n._ready)return!0;var o,a=n._childrenPageLod,s=a.length,l=[],u=!1;for(o=0;o<s;o++){var c=a[o];if(c._isVisible){var h=c._entity;e$2e(h)?(_0x443088(e,r,h),c._isLessLodDis?u=!0:l.push(h)):u=!0}}n._childrenPageLod.sort(_0x17e86b),s=(a=n._leafChildren).length,n._leafChildren.sort(_0x17e86b),(n._hasLeafChild||n._leafChildren.length>0)&&(u=!0),s=l.length;var d,f=!1;for(o=0;o<s;o++)_0x453b8c(d=l[o])&&(i.push(d),f=!0);return!f||u}function _0xf82594(e,t,i){var n=i._boundingVolume;i._isVisible=e.cullingVolume.computeVisibility(n)!==Ae$w.OUTSIDE}function _0x104d84(e){if(e._renderEntityList.length>0&&e._ready)return{state:0};var t=[];if(_0x6cce0e(e)){for(var i=!1,n=e._entity._childrenPageLod,r=n.length,o=0,a=0,s=0;s<r;++s){if((u=n[s])._isVisible)1===(c=_0x104d84(u)).state?(t=t.concat(c.clipBounds),o++):2===c.state&&(t=t.concat(c.clipBounds),i=!0);else o++,a++}var l=(n=e._entity._leafChildren).length;for(s=0;s<l;++s){var u,c;if((u=n[s])._isVisible)0===r&&!e$2e(u.max)&&(u.max=e.max,u.min=e.min),1===(c=_0x104d84(u)).state?(t=t.concat(c.clipBounds),o++):2===c.state&&(t=t.concat(c.clipBounds),i=!0);else o++,a++}var h=l+r;return 0===l&&0===r||h===a?((t=[]).push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t}):0===t.length?{state:0}:i||o!==h?{state:2,clipBounds:t}:((t=[]).push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t})}return t.push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t}}function _0x22f6e1(e,t,i){if(!i._selected){i._selected=!0;for(var n=i._renderEntityList,r=n.length,o=0;o<r;o++){var a=n[o];if(a.ownerPagelod=i,_0xf82594(e,t,a),a._isVisible)if(a._clipBounds=[],i._finalResolution)t._renderQueue.push(a);else{for(var s=i._entity._childrenPageLod,l=s.length,u=0;u<l;++u){var c=s[u];if(c._isVisible){var h=_0x104d84(c);0!=h.state&&(a._clipBounds=a._clipBounds.concat(h.clipBounds))}}a._clipBounds.length>0&&t._renderQueue.push(a)}}}}function _0x212a16(e,t,i){var n=t._layer,r=[];r.push(i);for(var o=!1;r.length>0;)for(var a=r.pop(),s=a._childrenPageLod,l=s.length,u=0;u<l;++u){_0x163866(e,n,s[u],a._visibilityPlaneMask);var c=s[u]._entity;e$2e(c)&&_0x453b8c(s[u])&&(s[u]._needRefine=!0,_0x3eb61f(t,c),c._ready?(o=!0,_0x443088(e,n,c),_0x3f755a(e,t,c)):r.push(c))}return o}function _0x3f755a(e,t,i){if(!i._selected){i._selected=!0;for(var n=i._childrenPageLod,r=n.length,o=0;o<r;o++){!(s=n[o])._isVisible||(s._isLessLodDis||!e$2e(s._entity)||s._shouldSelect)&&(s._shouldSelect=!0)}var a=i._leafChildren;for(r=a.length,o=0;o<r;o++){var s;(s=a[o])._isVisible&&(s._shouldSelect=!0)}}}function _0x212b5d(e,t,i){if(i._ready)_0x3f755a(e,t,i);else{var n=i._readyAncestor;e$2e(n)&&(n._shouldSelect=!0),_0x212a16(e,t,i)}}function _0x2f6e82(e,t){var i=e._boundingSphere;if(!e$2e(i))return!0;!e$2e(i)&&e$2e(e._orientedBoundingBox)&&(i=e._boundingSphere=i$1d.fromOrientedBoundingBox(e._orientedBoundingBox));var n=Math.max(2*i.radius,1),r=t.camera;return 60*(0!==r.positionWCDeltaMagnitude?r.positionWCDeltaMagnitude:r.positionWCDeltaMagnitudeLastFrame)/n<1}function _0x414a3b(e,t,i){!i._ready&&i._needRequest&&_0x2f6e82(i,e)&&(i._hasConfig&&!i._configReady&&(i._needLoad=!0,t.loadConfig(i)),e$2e(i._parent)&&0==i._skipLevel&&(i._parent._hasConfig?i._skipLevel=i._parent._skipLevel+1:i._skipLevel=i._parent._skipLevel),i._needRequest=!1,t._requestEntities.push({entity:i,priority:i._priority,owner:t}))}function _0x3eb61f(e,t){var i=e._replacementList,n=e._replacementSentinel;e$2e(t._replacementNode)?i.splice(n,t._replacementNode):t._replacementNode=i.add(t)}function _0x6cce0e(e){if(e$2e(e._entity)&&e._entity._hasLeafChild)for(var t=0;t<e._entity._leafChildren.length;t++){if(!e._entity._leafChildren[t]._ready)return!1}return e._needRefine&&!e._isLeafNode}var _0x5db3c7={stack:new r$S,stackMaximumLength:0,ancestorStack:new r$S,ancestorStackMaximumLength:0};function _0x519f69(e,t,i){var n,r=e._layer,o=_0x5db3c7.stack,a=_0x5db3c7.ancestorStack;for(o.push(i);o.length>0||a.length>0;){if(_0x5db3c7.stackMaximumLength=Math.max(_0x5db3c7.stackMaximumLength,o.length),_0x5db3c7.ancestorStackMaximumLength=Math.max(_0x5db3c7.ancestorStackMaximumLength,a.length),a.length>0){var s=a.peek();if(s._stackLength===o.length){a.pop(),s!==n&&(s._finalResolution=!1),_0x22f6e1(t,e,s);continue}}var l=o.pop(),u=l._shouldSelect,c=_0x6cce0e(l);if(u){if(l._selectionDepth=a.length,l._selectionDepth>0&&(r._hasMixedContent=!0),n=l,!c){_0x22f6e1(t,e,l);continue}a.push(l),l._stackLength=o.length}if(c){for(var h=l._entity._childrenPageLod,d=h.length,f=0;f<d;++f){(p=h[f])._isVisible&&o.push(p)}d=(h=l._entity._leafChildren).length;for(f=0;f<d;++f){var p;(p=h[f])._isVisible&&o.push(p)}}}}var _0x17e86b=function(e,t){return 0===e._disFromCamera&&0===t._disFromCamera?e._centerZDepth-t._centerZDepth:e._disFromCamera-t._disFromCamera};function _0x45dc9c(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function _0x54b0d0(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(!(t>r-1)){n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e,n,a);n+=a}}}function _0x165f50(e,t){var i=t._fileName.split("_"),n=t.request.url;t.request.throttle=!0,t.request.throttleByServer=!0,t.request.type=U$1f.PACK,t.request.quadKey=_0x45dc9c(i[2],i[1],i[0]),t.request.providerName=n.substring(n.indexOf("datas/")+6,n.indexOf("/data/"));var r=t$10.createIfNeeded(n).getDerivedResource({url:n,request:t.request}).fetchArrayBuffer();e$2e(r)?(t._s3mLoadState=N$Q.LOADING,e._statistics.numberOfPendingRequests++,r.then((function(i){var n=_0x54b0d0(i,t.request.quadKeyIndex);e$2e(n)?(i=new Uint8Array(n).buffer,0!=e._cacheKey.length?t.s3mBuffer=_0x2a3c92(i,e._cacheKey):t.s3mBuffer=i,t._s3mLoadState=N$Q.LOADED,e._statistics.numberOfPendingRequests--,e._statistics.numberOfProcessingAttempted++,t.request=null):t._s3mLoadState=N$Q.FAILED}),(function(i){e$2e(i)?(e._statistics.numberOfPendingRequests--,t._s3mLoadState=N$Q.FAILED):(e._statistics.numberOfAttemptedRequests++,e._statistics.numberOfPendingRequests--,t._s3mLoadState=N$Q.UNLOAD,t.request=null)}))):t.request=null}function _0x635350(e,t,i){e._isS3MBlock&&!i._isAncestorBlock||(e$2e(i._replacementNode)?t.splice(t.tail,i._replacementNode):i._replacementNode=t.add(i))}function _0x4555bd(e,t,i){var n=e._nLODLev;const r=new _0x128750;r.layer=e.layer,r._subdomainIndex=e._subdomainIndex+i+1,!e$2e(r._volObj)&&e$2e(e._volObj)&&(r._volObj=e._volObj,Se$e.AddRef(e._volObj.id));var o=t._rangeDataList;if(o.indexOf("/")>-1){var a=o.lastIndexOf("/"),s=o.substring(0,a+1);r._fileName=o.substring(a+1),r._relativePath=new h$16(s).resolve(e._relativePath)}else r._relativePath=e._relativePath,r._fileName=o;return r._avgPix=t._pix,r._disFromCamera=t._disFromCamera,r._nLODLev=n+1,r._boundingSphere=t._boundingSphere,r._originalBS=t._originalBS,r._orientedBoundingBox=t._orientedBoundingBox,r}function _0x397cfd(e,t){e$2e(e._entityObjectId[t._fileName])&&(e._entityObjectId[t._fileName]=void 0,e._objectIdChange=!0),e$2e(e._entityModelId[t._fileName])&&(e._entityModelId[t._fileName]=void 0,e._objectIdChange=!0)}function _0x5edf26(e,t){if(e$2e(e._associatedFieldName)&&e$2e(e._entityObjectId[t._fileName])){for(var i={},n=0;n<t._childrenPageLod.length;n++)for(var r=0;r<t._childrenPageLod[n]._renderEntityList.length;r++){var o=t._childrenPageLod[n]._renderEntityList[r];for(var a in o._selectionInforMap._hash)i[a]=e._attributes[a][e._associatedFieldName]}e._entityObjectId[t._fileName]=i,e._objectIdChange=!0}}function _0x1054cd(e,t){if(e._isFineLayer&&e$2e(e._entityModelId[t._fileName])){for(var i={},n=0;n<t._childrenPageLod.length;n++)for(var r=0;r<t._childrenPageLod[n]._renderEntityList.length;r++){var o=t._childrenPageLod[n]._renderEntityList[r];for(var a in o._selectionInforMap._hash)i[a]=a}e._entityModelId[t._fileName]=i,e._objectIdChange=!0}}function _0x3e9a4b(e,t,i){if(e$2e(t._hypsometricSetting))for(var n=e.positionWC,r=_0x4ba37f(i,t._hypsometricSetting,n)&&_0x45183e(t._hypsometricSetting,e),o=0;o<i._renderEntityList.length;o++){i._renderEntityList[o]._isHypsometricVisible=r}}function _0x509541(e,t){!e$2e(t._entity._volObj)&&e$2e(e._volObj)&&(t._entity._volObj=e._volObj,Se$e.AddRef(e._volObj.id))}function _0x57331c(e,t){return o$1p.distance(e.center,t.center)<=e.radius+t.radius}function _0xa25db0(e,t){if(e._flattening){var i=t._boundingSphere;if(e$2e(i))for(var n=e._flattenRegions.values,r=0,o=n.length;r<o;r++){var a=n[r].boundingSphere;if(e$2e(a)&&_0x57331c(i,a)){t.isFlatten=!0;break}}}}function _0x43c2ea(e,t,i,n){var r,o=[];if(t instanceof Array)for(var a=0;a<t.length;a++){if(!t[a].imageryProvider.ready)return;var s=t[a].getMaxScaleLevel(e._cartographic);o.push(s),r=0===a?s:Math.max(r,s)}else{if(!t.imageryProvider.ready)return;r=t.getMaxScaleLevel(e._cartographic)}var l=Math.min(i,r);if(l>0&&!e.hasScaleImagerys(l)){var u=[];if(t instanceof Array)for(a=0;a<t.length;a++){var c=t[a].getImagery(e._cartographic,Math.min(o[a],l));u=u.concat(c)}else u=t.getImagery(e._cartographic,l);u.length>0&&e.setScaleImagerys(u,l)}e.resetScaleImagerys(l,n)}function _0x3e93d8(e,t,i,n){var r=t._layer;0===e._rangeList&&(e._rangeList=2*n._parentPagelod._rangeList);var o=e.calcImageryScaleLevel(i.camera,i.context,r._lodRangeScale,t._nLoadingPriority,e._rangeMode);o=Math.ceil(o)-1;for(var a=0;a<e._renderEntityList.length;a++){var s=e._renderEntityList[a];if(i.cullingVolume.computeVisibility(s._boundingVolume)!=Ae$w.OUTSIDE&&e$2e(s._cartographic))_0x43c2ea(s,r._imageryLayer instanceof i$P?r._imageryLayer._inner:r._imageryLayer,o,i)}}function _0x4a17eb(e,t){if(!e)return 0;for(var i=0,n=0,r=e._childrenPageLod.length;n<r;n++){var o=e._childrenPageLod[n],a=_0x143942(o,t);o._oriBoundingSphere||(o._oriBoundingSphere=o._boundingSphere.clone()),o._boundingSphere.radius=o._oriBoundingSphere.radius+a,i+=a=Math.max(a,_0x4a17eb(o._entity,t))}return i}function _0x143942(e,t){for(var i=0,n=0;n<e._renderEntityList.length;n++)if(e$2e(e._renderEntityList[n])){var r=e._renderEntityList[n];i=Math.max(r._radiusToExpand(t),i)}return i}function _0x4f2327(e,t){var i=t.positionCartographic.height;return(i=i<0?0:i)<=e._maxVisibleAltitude&&i>=e._minVisibleAltitude}function _0x4ba37f(e,t,i){var n=o$1p.distance(e._boundingSphere.center,i)-e._boundingSphere.radius;return(n=n<0?0:n)<=t._visibleDistanceMax&&n>=t._visibleDistanceMin}function _0x45183e(e,t){var i=t.positionCartographic.height;return(i=i<0?0:i)<=e._maxVisibleAltitude&&i>=e._minVisibleAltitude}function _0x555b86(e,t,i){const n=t._maximumScreenSpaceError;var r,o=t._context,a=e._boundingSphere,s=e._orientedBoundingBox,l=1;if(t._fileType===p$T.ClampGroundRealtimeRasterCache){var u=a.center,c=a.radius,h=o$1p.fromRadians(e$2d.toRadians(u.x),e$2d.toRadians(u.y),u.z),d=o$1p.fromRadians(e$2d.toRadians(u.x),e$2d.toRadians(u.y-c),u.z),f=o$1p.distance(h,d);r=o$1p.distance(h,i)-f,l=f}else e$2e(a)?(r=o$1p.distance(a.center,i)-a.radius,l=a.radius):r=Math.sqrt(y$Y.distanceSquaredTo(s,i));if(r<0)return!0;var p=pixelsPerMeter(o,r)*l;e._disFromCamera=r;var _=t._translucencyByDistance?t._visibleDistanceMax+2e3:t._visibleDistanceMax;return r>=t._visibleDistanceMin&&r<=_&&p>n}_0x408010.prototype._scheduleSkip=function(e){var t=this._layer;this._selectEntities.length=0,this._renderQueue.length=0,this._replacementList.splice(this._replacementList.tail,this._replacementSentinel);var i,n,r,o=[],a=[];for(i=0,n=this._rootEntities.length;i<n;i++){var s=this._rootEntities[i];if(_0x443088(e,t,s),t.residentRootTile||_0x453b8c(s)){if(!s._configReady){this.loadConfig(s);continue}o.push(s),a.push(s)}}for(a.sort(_0x17e86b),o.sort(_0x933fa2);r=o.pop();){_0xfdd3f2(r);var l=!0;_0x1de79c(r)&&(l=_0x2fe368(e,this,o,r)),r._isLeafTile&&_0x443088(e,t,r),(l||r._needLoad||t.residentRootTile&&r._isRootTile)&&(_0x212b5d(e,this,r),_0x414a3b(e,this,r)),_0x3eb61f(this,r)}for(i=0,n=a.length;i<n;i++){for(var u=a[i],c=0,h=u._childrenPageLod.length;c<h;c++){_0x519f69(this,e,u._childrenPageLod[c])}for(var d=0,f=u._leafChildren.length;d<f;d++){_0x519f69(this,e,u._leafChildren[d])}}this.freeResource(e);var p=this._requestEntities.length;for(i=0;i<p;i++)this._requestEntities[i].entity.updatePriority(t),e.requests.push(this._requestEntities[i]);this._requestEntities.length=0},_0x408010.prototype._processPackRequests=function(){var e=this._packRequestEntities,t=e.length;if(!(t<1)){e.sort(_0x933fa2);for(var i=0;i<t;i++){_0x165f50(this,e[i])}this._packRequestEntities.length=0}},_0x408010.prototype._processParsingEntities=function(){var e=this._parsingEntities,t=e.length;if(!(t<1)){e.sort(_0x933fa2);for(var i=this._layer,n=i._isS3MB?_0x1393e5.binaryDataParser:_0x46f77a.binaryDataParser,r=0;r<t;r++){var o=e[r];n(i,o,o.s3mBuffer,o.volBuffer)}this._parsingEntities.length=0}},_0x408010.prototype._schedule=function(e){this._renderQueue.length=0;var t=e.camera,i=t.positionWC,n=e.cullingVolume,r=this._layer,o=this._context,a=_0x4f2327(r,t),s=[],l=e.requests;const u=[],c=e.processingTiles,h=e.replacementList;var d=this;if(!a)return void(r._fileType===p$T.ClampGroundRealtimeRasterCache&&this.refreshRaster(e));var f=0,p=[];const _=i$X.MASK_INDETERMINATE,m=r._fileType===p$T.ClampGroundRealtimeRasterCache,g=e$2e(r.themeStyle)&&e$2e(r.queryFieldNames);for(var x=0,y=this._rootEntities.length;x<y;x++){if((T=this._rootEntities[x])._rootName=T._fileName,T._blockKey=T._fileName,!_0x555b86(T,r,i)){_0x397cfd(this,T);continue}const e=T.boundingVolume;(T._visibilityPlaneMask=n.computeVisibilityWithPlaneMask(e,_),T.isVisible=T.isFlatten||T.hasTranslate||T._visibilityPlaneMask!==i$X.MASK_OUTSIDE||m,T.isVisible)?(e$2e(r._queryFieldNames)&&T.attrLoadState!=N$Q.LOADED&&T.attrLoadState!=N$Q.LOADING&&(!0===d._indexedDBSetting.isAttributesSave?d._attributes.status.promise.then((function(){T.attrLoadState!=N$Q.LOADED&&T.attrLoadState!=N$Q.LOADING&&_0x1ec436(T,d)})):p.push(T)),T.attrLoadState===N$Q.LOADED&&f++,g&&T.attrLoadState!==N$Q.LOADED?T.isVisible=!1:(_0x635350(r,h,T),T._s3mLoadState!==N$Q.PARSED?T._ready?(s.push(T),_0x5edf26(this,T),_0x1054cd(this,T)):(l.push({entity:T,priority:T._disFromCamera,owner:this}),_0x397cfd(this,T)):c.push(T))):_0x397cfd(this,T)}f===y&&!this._attrloaded&&(this._attrloaded=!0,r.attributeDownloaded.raiseEvent(r.name+" attribute downloaded."));for(var v;v=s.pop();){_0x635350(r,h,v);const i=v._visibilityPlaneMask;for(let a=0,d=v._childrenPageLod.length;a<d;a++){const d=v._childrenPageLod[a];if(_0x3e9a4b(t,r,d),d._isLeafNode){e$2e(r._imageryLayer)&&_0x3e93d8(d,this,e,v),u.push(d);continue}if(d.calcPixFromCam(t,o,r._lodRangeScale,r._adjustedLodRangeScale,this._nLoadingPriority),this._prepareLoaded||(d._isLessLodDis&&e$2e(d._entity)&&(d._entity._prepareLoad=!0),d._isLessLodDis=!1),d._isLessLodDis){u.push(d);continue}if(!e$2e(d._entity)){var $=_0x4555bd(v,d,a);$._parentPagelod=d,_0xa25db0(r,$),this._currentMaxLevel=Math.max(this._currentMaxLevel,$._nLODLev),d._entity=$,u.push(d),_0x635350(r,h,$);continue}const f=d._entity,p=f.boundingVolume;if(f._visibilityPlaneMask=n.computeVisibilityWithPlaneMask(p,i),f.isVisible=f.isFlatten||f.hasTranslate||f._visibilityPlaneMask!==i$X.MASK_OUTSIDE,this._beginToLoadLeaf=!0,this._prepareLoaded||(f.isVisible||(d._entity._prepareLoad=!0),f.isVisible=!0),f.isVisible){if(_0x635350(r,h,f),f._s3mLoadState===N$Q.PARSED){c.push(f),u.push(d);continue}if(f._s3mLoadState===N$Q.TRANSFORMED){r._nProcessType===_0x549321.Add&&u.push(d),s.push(f);continue}_0x509541(v,d),u.push(d),l.push({entity:f,priority:f._disFromCamera,owner:this})}}}let b=[];for(let e=0,t=u.length;e<t;e++){const t=u[e];b=b.concat(t._renderEntityList)}if(this._renderQueue=b,!this._indexedDBSetting.isAttributesSave){for(p.sort(_0x933fa2),x=0;x<p.length;x++)p[x].attrLoadState===N$Q.UNLOAD&&_0x1ec436(p[x],this,!1);if(this._beginToLoadLeaf&&r.hasAttributeIndex)for(x=0,y=this._rootEntities.length;x<y;x++){var T;((T=this._rootEntities[x]).leafAttrLoadState===N$Q.UNLOAD||T.leafAttrLoadState===N$Q.FAILED)&&_0x1ec436(T,this,!0)}}if(r._showLabel||r._showIcon){const e=[];for(let t=0,i=b.length;t<i;t++){const i=b[t];for(let t in i._labelIndexs)i._labelIndexs.hasOwnProperty(t)&&e.push(t)}r._showLabel&&this._layer._labelCollection.setVisibleLabels(e),r._showIcon&&this._layer._iconCollection.setVisibleLabels(e)}this._packingRequest&&(this._processPackRequests(),this._processParsingEntities())},_0x408010.prototype.loadImagery=function(e,t){if(!this._stopLoadImagery){for(var i=0,n=[],r=0,o=this._rootEntities.length;r<o;r++){var a=this._rootEntities[r];n.push(a)}for(var s;s=n.pop();){if((i+=s.loadImagery(e,t))>10)return;for(r=0,o=s._childrenPageLod.length;r<o;r++){var l=s._childrenPageLod[r];e$2e(l._entity)&&(l._entity.loadImagery(e,t),n.push(l._entity))}}}},_0x408010.prototype._getCameraChanged=function(e){var t=!o$1p.equals(this._cameraPos,e.positionWC)||!o$1p.equals(this._cameraDir,e.directionWC)||!o$1p.equals(this._cameraUp,e.upWC);(this._cameraPos=o$1p.clone(e.position,this._cameraPos),this._cameraDir=o$1p.clone(e.direction,this._cameraDir),this._cameraUp=o$1p.clone(e.up,this._cameraUp),t)?e._clockStart=(new Date).getTime():(new Date).getTime()-e._clockStart<200&&(t=!0);return t},_0x408010.prototype.refresh=function(){this._renderQueue.length=0;for(var e=0,t=this._rootEntities.length;e<t;e++){for(var i=this._rootEntities[e],n=0;n<i._childrenPageLod.length;n++){var r=i._childrenPageLod[n];r=r&&!r.isDestroyed()&&r.destroy()}i._childrenPageLod.length=0,i.attributeBuffer=i.attributeBuffer&&!i.attributeBuffer.isDestroyed()&&i.attributeBuffer.destroy(),i._ready=!1,i._s3mLoadState=N$Q.UNLOAD}},_0x408010.prototype.refreshPrepareLoad=function(){for(var e=[],t=0,i=this._rootEntities.length;t<i;t++){var n=this._rootEntities[t];n._ready&&e.push(n)}for(var r;r=e.pop();)if(r._prepareLoad){for(var o=0;o<r._childrenPageLod.length;o++){var a=r._childrenPageLod[o];a=a&&!a.isDestroyed()&&a.destroy()}r._childrenPageLod.length=0,r.attributeBuffer=r.attributeBuffer&&!r.attributeBuffer.isDestroyed()&&r.attributeBuffer.destroy(),r._ready=!1,r._s3mLoadState=N$Q.UNLOAD}else for(t=0,i=r._childrenPageLod.length;t<i;t++){var s=r._childrenPageLod[t];r._isLeafTile||s._entity&&e.push(s._entity)}},_0x408010.prototype.getRenderQueueSize=function(){return this._renderQueue.length},_0x408010.prototype._updateSceneMode=function(e){if(e._mode!==this._sceneMode){var t=this._layer,i=new p$1d;p$1d.inverse(t._matModel,i),this._sceneMode=e._mode,this._projection=e._projection,t.refresh();for(var n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];!e$2e(o)||!e$2e(o._boundingSphere)||(i$1d.transform(o._boundingSphere,i,o._boundingSphere),i$1d.transform(o._boundingSphere,t._matModel,o._boundingSphere),e$2e(o._orientedBoundingBox)&&(p$1d.multiplyByPoint(i,o._orientedBoundingBox.center,o._orientedBoundingBox.center),p$1d.multiplyByPoint(t._matModel,o._orientedBoundingBox.center,o._orientedBoundingBox.center)))}}},_0x408010.prototype.traverseRenderEntity=function(e,t){for(var i=[],n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];i.push(o)}for(var a;a=i.pop();)for(n=0,r=a._childrenPageLod.length;n<r;n++){for(var s=a._childrenPageLod[n],l=0;l<s._renderEntityList.length;l++)!e$2e(s._renderEntityList[l])||(e.entity=a,t(s._renderEntityList[l],e));s._entity&&i.push(s._entity)}},_0x408010.prototype.traverseRenderEntityRecursionForObjsTranslate=function(){if(!(Object.keys(this._layer._objsOffsetList).length<1))for(var e=0,t=this._rootEntities.length;e<t;e++){var i=this._rootEntities[e];if(i._ready){var n=_0x4a17eb(i,this._layer._objsOffsetList);i._oriBoundingSphere||(i._oriBoundingSphere=i._boundingSphere.clone()),i._boundingSphere.radius=i._oriBoundingSphere.radius+n}}},_0x408010.prototype.refreshRasterById=function(e,t){for(var i=[],n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];o._ready&&i.push(o)}for(var a;a=i.pop();)for(n=0,r=a._childrenPageLod.length;n<r;n++){for(var s=a._childrenPageLod[n],l=0;l<s._renderEntityList.length;l++)if(e$2e(s._renderEntityList[l])){var u=s._renderEntityList[l]._selectionInforMap;if(e$2e(u))for(var c in u._hash){if(parseInt(c)===parseInt(e)){s._renderEntityList[l].refreshRaster(t,!0);break}}}a._isLeafTile||s._entity&&i.push(s._entity)}},_0x408010.prototype.refreshRaster=function(e){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i];r._ready&&t.push(r)}for(var o;o=t.pop();)for(i=0,n=o._childrenPageLod.length;i<n;i++){for(var a=o._childrenPageLod[i],s=0;s<a._renderEntityList.length;s++)!e$2e(a._renderEntityList[s])||a._renderEntityList[s].refreshRaster(e,!0);o._isLeafTile||a._entity&&t.push(a._entity)}},_0x408010.prototype._getMemoryUsageInBytes=function(){for(var e=0,t=this._replacementList.head;e$2e(t)&&(e$2e(t.item)||e$2e(t.next));){var i=t.item;e$2e(i)&&(e+=i.memoryUsage()),t=t.next}return e},_0x408010.prototype._getCacheMemoryUsageInBytes=function(){for(var e=0,t=this._replacementList.head;t!==this._replacementSentinel;){var i=t.item;e$2e(i)&&(e+=i.memoryUsage()),t=t.next}return e},_0x408010.prototype.freeResource=function(e){for(var t=this._getCacheMemoryUsageInBytes(),i=1024*ti$4.getCacheSize()*1024,n=this._replacementList.head;e$2e(n)&&n!==this._replacementSentinel&&(this._layer._clearMemoryImmediately||t>i);){var r=n.item;if(n=n.next,e$2e(r)&&(this._replacementList.remove(r._replacementNode),r._replacementNode=null,!r._isRootTile||!this._layer.residentRootTile)){var o={geoSize:0,texSize:0},a=r.memoryUsageEx(o);ti$4._memGeometryRemoved(o.geoSize),r.freeResource(e),t-=a}}},_0x408010.prototype.isDestroyed=function(){return!1},_0x408010.prototype.destroy=function(){this._renderQueue.length=0,this._replacementList.splice(this._replacementList.tail,this._replacementSentinel);var e=this._layer,t=void 0;e._fileType===p$T.ClampGroundRealtimeRasterCache&&(t=e._frameState);for(var i=this._replacementList.head;i!==this._replacementSentinel;){var n=i.item,r={geoSize:0,texSize:0};n.memoryUsageEx(r),ti$4._memGeometryRemoved(r.geoSize),i=i.next,this._replacementList.remove(n._replacementNode),n.destroy(t)}return i$11(this)};var _0x188a6c=(_0x340ddf=!0,function(e,t){var i=_0x340ddf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x340ddf=!1,i}),_0x469949=_0x188a6c(void 0,(function(){return _0x469949.toString().search("(((.+)+)+)+$").toString().constructor(_0x469949).search("(((.+)+)+)+$")})),_0x340ddf;_0x469949();var _0x57c608="attribute vec4 position;\nuniform vec4 uRect;\nuniform vec4 uSingleRegion;\nvarying float fHeight;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vTexCoord = (vPos.xy - uSingleRegion.xy) / (uSingleRegion.zw - uSingleRegion.xy);\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.5, 1.0);\n fHeight = vPos.z;\n}",k$M=Math.cos,z$M=Math.sin,H$R=Math.sqrt,j$O={computePosition:function(e,t,i,n,r,o,a){var s=t.radiiSquared,l=e.nwCorner,u=e.boundingRectangle,c=l.latitude-e.granYCos*n+r*e.granXSin,h=k$M(c),d=z$M(c),f=s.z*d,p=l.longitude+n*e.granYSin+r*e.granXCos,_=h*k$M(p),m=h*z$M(p),g=s.x*_,x=s.y*m,y=H$R(g*_+x*m+f*d);if(o.x=g/y,o.y=x/y,o.z=f/y,i){var v=e.stNwCorner;e$2e(v)?(c=v.latitude-e.stGranYCos*n+r*e.stGranXSin,p=v.longitude+n*e.stGranYSin+r*e.stGranXCos,a.x=(p-e.stWest)*e.lonScalar,a.y=(c-e.stSouth)*e.latScalar):(a.x=(p-u.west)*e.lonScalar,a.y=(c-u.south)*e.latScalar)}}},J$I=new f$15,h$O=new o$1p,K$J=new a$18,E$R=new o$1p,q$S=new n$1d;function Z$L(e,t,i,n,r,o,a){var s=Math.cos(t),l=n*s,u=i*s,c=Math.sin(t),h=n*c,d=i*c;h$O=q$S.project(e,h$O),h$O=o$1p.subtract(h$O,E$R,h$O);var f=f$15.fromRotation(t,J$I);h$O=f$15.multiplyByVector(f,h$O,h$O),h$O=o$1p.add(h$O,E$R,h$O),o-=1,a-=1;var p=(e=q$S.unproject(h$O,e)).latitude,_=p+o*d,m=p-l*a,g=p-l*a+o*d,x=Math.max(p,_,m,g),y=Math.min(p,_,m,g),v=e.longitude,$=v+o*u,b=v+a*h,T=v+a*h+o*u;return{north:x,south:y,east:Math.max(v,$,b,T),west:Math.min(v,$,b,T),granYCos:l,granYSin:h,granXCos:u,granXSin:d,nwCorner:e}}j$O.computeOptions=function(e,t,i,n,r,o,a){var s=e.east,l=e.west,u=e.north,c=e.south,h=!1,d=!1;u===e$2d.PI_OVER_TWO&&(h=!0),c===-e$2d.PI_OVER_TWO&&(d=!0);var f,p,_,m,g,x=u-c;_=(g=l>s?e$2d.TWO_PI-l+s:s-l)/((f=Math.ceil(g/t)+1)-1),m=x/((p=Math.ceil(x/t)+1)-1);var y=h$18.northwest(e,o),v=h$18.center(e,K$J);(0!==i||0!==n)&&(v.longitude<y.longitude&&(v.longitude+=e$2d.TWO_PI),E$R=q$S.project(v,E$R));var $=m,b=_,T=h$18.clone(e,r),C={granYCos:$,granYSin:0,granXCos:b,granXSin:0,nwCorner:y,boundingRectangle:T,width:f,height:p,northCap:h,southCap:d};if(0!==i){var S=Z$L(y,i,_,m,v,f,p);if(u=S.north,c=S.south,s=S.east,l=S.west,u<-e$2d.PI_OVER_TWO||u>e$2d.PI_OVER_TWO||c<-e$2d.PI_OVER_TWO||c>e$2d.PI_OVER_TWO)throw new t$15("Rotated rectangle is invalid. It crosses over either the north or south pole.");C.granYCos=S.granYCos,C.granYSin=S.granYSin,C.granXCos=S.granXCos,C.granXSin=S.granXSin,T.north=u,T.south=c,T.east=s,T.west=l}if(0!==n){i-=n;var w=h$18.northwest(T,a),E=Z$L(w,i,_,m,v,f,p);C.stGranYCos=E.granYCos,C.stGranXCos=E.granXCos,C.stGranYSin=E.granYSin,C.stGranXSin=E.granXSin,C.stNwCorner=w,C.stWest=E.west,C.stSouth=E.south}return C};var Lt$5=new o$1p,Bt$8=new o$1p,Yt$4=new o$1p,qt$6=new o$1p,Xt$3=new h$18,ne$y=new o$1o,ie$x=new i$1d,oe$q=new i$1d;function Wt$7(e,t){var i=new I$1p({attributes:new a$_,primitiveType:W$18.TRIANGLES});return i.attributes.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(i.attributes.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(i.attributes.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(i.attributes.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:t.bitangents})),i}function ue$u(e,t,i,n){var r=e.length,o=t.normal?new Float32Array(r):void 0,a=t.tangent?new Float32Array(r):void 0,s=t.bitangent?new Float32Array(r):void 0,l=0,u=qt$6,c=Yt$4,h=Bt$8;if(t.normal||t.tangent||t.bitangent)for(var d=0;d<r;d+=3){var f=o$1p.fromArray(e,d,Lt$5),p=l+1,_=l+2;h=i.geodeticSurfaceNormal(f,h),(t.tangent||t.bitangent)&&(o$1p.cross(o$1p.UNIT_Z,h,c),p$1e.multiplyByVector(n,c,c),o$1p.normalize(c,c),t.bitangent&&o$1p.normalize(o$1p.cross(h,c,u),u)),t.normal&&(o[l]=h.x,o[p]=h.y,o[_]=h.z),t.tangent&&(a[l]=c.x,a[p]=c.y,a[_]=c.z),t.bitangent&&(s[l]=u.x,s[p]=u.y,s[_]=u.z),l+=3}return Wt$7(t,{positions:e,normals:o,tangents:a,bitangents:s})}var Tt$7=new o$1p,jt$4=new o$1p;function se$s(e,t,i){var n=e.length,r=t.normal?new Float32Array(n):void 0,o=t.tangent?new Float32Array(n):void 0,a=t.bitangent?new Float32Array(n):void 0,s=0,l=0,u=0,c=!0,h=qt$6,d=Yt$4,f=Bt$8;if(t.normal||t.tangent||t.bitangent)for(var p=0;p<n;p+=6){var _=o$1p.fromArray(e,p,Lt$5),m=o$1p.fromArray(e,(p+6)%n,Tt$7);if(c){var g=o$1p.fromArray(e,(p+3)%n,jt$4);o$1p.subtract(m,_,m),o$1p.subtract(g,_,g),f=o$1p.normalize(o$1p.cross(g,m,f),f),c=!1}o$1p.equalsEpsilon(m,_,e$2d.EPSILON10)&&(c=!0),(t.tangent||t.bitangent)&&(h=i.geodeticSurfaceNormal(_,h),t.tangent&&(d=o$1p.normalize(o$1p.cross(h,f,d),d))),t.normal&&(r[s++]=f.x,r[s++]=f.y,r[s++]=f.z,r[s++]=f.x,r[s++]=f.y,r[s++]=f.z),t.tangent&&(o[l++]=d.x,o[l++]=d.y,o[l++]=d.z,o[l++]=d.x,o[l++]=d.y,o[l++]=d.z),t.bitangent&&(a[u++]=h.x,a[u++]=h.y,a[u++]=h.z,a[u++]=h.x,a[u++]=h.y,a[u++]=h.z)}return Wt$7(t,{positions:e,normals:r,tangents:o,bitangents:a})}function Jt$4(e,t){var i=e._vertexFormat,n=e._ellipsoid,r=t.height,o=t.width,a=t.northCap,s=t.southCap,l=0,u=r,c=r,h=0;a&&(l=1,c-=1,h+=1),s&&(u-=1,c-=1,h+=1),h+=o*c;for(var d=i.position?new Float64Array(3*h):void 0,f=i.st?new Float32Array(2*h):void 0,p=0,_=0,m=Lt$5,g=ne$y,x=Number.MAX_VALUE,y=Number.MAX_VALUE,v=-Number.MAX_VALUE,$=-Number.MAX_VALUE,b=l;b<u;++b)for(var T=0;T<o;++T)j$O.computePosition(t,n,i.st,b,T,m,g),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(f[_++]=g.x,f[_++]=g.y,x=Math.min(x,g.x),y=Math.min(y,g.y),v=Math.max(v,g.x),$=Math.max($,g.y));if(a&&(j$O.computePosition(t,n,i.st,0,0,m,g),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(f[_++]=g.x,f[_++]=g.y,x=g.x,y=g.y,v=g.x,$=g.y)),s&&(j$O.computePosition(t,n,i.st,r-1,0,m,g),d[p++]=m.x,d[p++]=m.y,d[p]=m.z,i.st&&(f[_++]=g.x,f[_]=g.y,x=Math.min(x,g.x),y=Math.min(y,g.y),v=Math.max(v,g.x),$=Math.max($,g.y))),i.st&&(x<0||y<0||v>1||$>1))for(var C=0;C<f.length;C+=2)f[C]=(f[C]-x)/(v-x),f[C+1]=(f[C+1]-y)/($-y);var S=ue$u(d,i,n,t.tangentRotationMatrix),w=6*(o-1)*(c-1);a&&(w+=3*(o-1)),s&&(w+=3*(o-1));var E,P=ce$z.createTypedArray(h,w),A=0,L=0;for(E=0;E<c-1;++E){for(var M=0;M<o-1;++M){var R=A,O=R+o,D=O+1,I=R+1;P[L++]=R,P[L++]=O,P[L++]=I,P[L++]=I,P[L++]=O,P[L++]=D,++A}++A}if(a||s){var F,B,N=h-1,G=h-1;if(a&&s&&(N=h-2),A=0,a)for(E=0;E<o-1;E++)B=(F=A)+1,P[L++]=N,P[L++]=F,P[L++]=B,++A;if(s)for(A=(c-1)*o,E=0;E<o-1;E++)B=(F=A)+1,P[L++]=F,P[L++]=G,P[L++]=B,++A}return S.indices=P,i.st&&(S.attributes.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:f})),S}function ct$7(e,t,i,n,r){return e[t++]=n[i],e[t++]=n[i+1],e[t++]=n[i+2],e[t++]=r[i],e[t++]=r[i+1],e[t]=r[i+2],e}function ht$7(e,t,i,n){return e[t++]=n[i],e[t++]=n[i+1],e[t++]=n[i],e[t]=n[i+1],e}var Ht$5=new n$13;function fe$s(e,t){var i,n=e._shadowVolume,r=e._offsetAttribute,o=e._vertexFormat,a=e._extrudedHeight,s=e._surfaceHeight,l=e._ellipsoid,u=t.height,c=t.width;if(n){var h=n$13.clone(o,Ht$5);h.normal=!0,e._vertexFormat=h}var d=Jt$4(e,t);n&&(e._vertexFormat=o);var f=A$1f.scaleToGeodeticHeight(d.attributes.position.values,s,l,!1),p=(f=new Float64Array(f)).length,_=2*p,m=new Float64Array(_);m.set(f);var g=A$1f.scaleToGeodeticHeight(d.attributes.position.values,a,l);m.set(g,p),d.attributes.position.values=m;var x,y,v=o.normal?new Float32Array(_):void 0,$=o.tangent?new Float32Array(_):void 0,b=o.bitangent?new Float32Array(_):void 0,T=o.st?new Float32Array(_/3*2):void 0;if(o.normal){for(y=d.attributes.normal.values,v.set(y),i=0;i<p;i++)y[i]=-y[i];v.set(y,p),d.attributes.normal.values=v}if(n){y=d.attributes.normal.values,o.normal||(d.attributes.normal=void 0);var C=new Float32Array(_);for(i=0;i<p;i++)y[i]=-y[i];C.set(y,p),d.attributes.extrudeDirection=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:C})}var S=e$2e(r);if(S){var w=p/3*2,E=new Uint8Array(w);r===_0x39c22a.TOP?E=d$1s(E,1,0,w/2):E=d$1s(E,r===_0x39c22a.NONE?0:1),d.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}if(o.tangent){var P=d.attributes.tangent.values;for($.set(P),i=0;i<p;i++)P[i]=-P[i];$.set(P,p),d.attributes.tangent.values=$}if(o.bitangent){var A=d.attributes.bitangent.values;b.set(A),b.set(A,p),d.attributes.bitangent.values=b}o.st&&(x=d.attributes.st.values,T.set(x),T.set(x,p/3*2),d.attributes.st.values=T);var L=d.indices,M=L.length,R=p/3,O=ce$z.createTypedArray(_/3,2*M);for(O.set(L),i=0;i<M;i+=3)O[i+M]=L[i+2]+R,O[i+1+M]=L[i+1]+R,O[i+2+M]=L[i]+R;d.indices=O;var D=t.northCap,I=t.southCap,F=u,B=2,N=0,G=4,z=4;D&&(B-=1,F-=1,N+=1,G-=2,z-=1),I&&(B-=1,F-=1,N+=1,G-=2,z-=1);var U=2*((N+=B*c+2*F-G)+z),V=new Float64Array(3*U),k=n?new Float32Array(3*U):void 0,W=S?new Uint8Array(U):void 0,H=o.st?new Float32Array(2*U):void 0,q=r===_0x39c22a.TOP;S&&!q&&(W=d$1s(W,r===_0x39c22a.ALL?1:0));var j,X=0,Y=0,Z=0,K=0,Q=c*F;for(i=0;i<Q;i+=c)V=ct$7(V,X,j=3*i,f,g),X+=6,o.st&&(H=ht$7(H,Y,2*i,x),Y+=4),n&&(Z+=3,k[Z++]=y[j],k[Z++]=y[j+1],k[Z++]=y[j+2]),q&&(W[K++]=1,K+=1);if(I){var J=D?Q+1:Q;for(j=3*J,i=0;i<2;i++)V=ct$7(V,X,j,f,g),X+=6,o.st&&(H=ht$7(H,Y,2*J,x),Y+=4),n&&(Z+=3,k[Z++]=y[j],k[Z++]=y[j+1],k[Z++]=y[j+2]),q&&(W[K++]=1,K+=1)}else for(i=Q-c;i<Q;i++)V=ct$7(V,X,j=3*i,f,g),X+=6,o.st&&(H=ht$7(H,Y,2*i,x),Y+=4),n&&(Z+=3,k[Z++]=y[j],k[Z++]=y[j+1],k[Z++]=y[j+2]),q&&(W[K++]=1,K+=1);for(i=Q-1;i>0;i-=c)V=ct$7(V,X,j=3*i,f,g),X+=6,o.st&&(H=ht$7(H,Y,2*i,x),Y+=4),n&&(Z+=3,k[Z++]=y[j],k[Z++]=y[j+1],k[Z++]=y[j+2]),q&&(W[K++]=1,K+=1);if(D){var ee=Q;for(j=3*ee,i=0;i<2;i++)V=ct$7(V,X,j,f,g),X+=6,o.st&&(H=ht$7(H,Y,2*ee,x),Y+=4),n&&(Z+=3,k[Z++]=y[j],k[Z++]=y[j+1],k[Z++]=y[j+2]),q&&(W[K++]=1,K+=1)}else for(i=c-1;i>=0;i--)V=ct$7(V,X,j=3*i,f,g),X+=6,o.st&&(H=ht$7(H,Y,2*i,x),Y+=4),n&&(Z+=3,k[Z++]=y[j],k[Z++]=y[j+1],k[Z++]=y[j+2]),q&&(W[K++]=1,K+=1);var te=se$s(V,o,l);o.st&&(te.attributes.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:H})),n&&(te.attributes.extrudeDirection=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:k})),S&&(te.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:W}));var ie,ne,re,oe,ae=ce$z.createTypedArray(U,6*N);p=V.length/3;var se=0;for(i=0;i<p-1;i+=2){oe=((ie=i)+2)%p;var le=o$1p.fromArray(V,3*ie,Tt$7),ue=o$1p.fromArray(V,3*oe,jt$4);o$1p.equalsEpsilon(le,ue,e$2d.EPSILON10)||(re=((ne=(ie+1)%p)+2)%p,ae[se++]=ie,ae[se++]=ne,ae[se++]=oe,ae[se++]=oe,ae[se++]=ne,ae[se++]=re)}return te.indices=ae,(te=k$14.combineInstances([new d$1o({geometry:d}),new d$1o({geometry:te})]))[0]}var ve$o=[new o$1p,new o$1p,new o$1p,new o$1p],Qt$5=new a$18,le$s=new a$18;function Ot$7(e,t,i,n,r){if(0===i)return h$18.clone(e,r);var o=j$O.computeOptions(e,t,i,0,Xt$3,Qt$5),a=o.height,s=o.width,l=ve$o;return j$O.computePosition(o,n,!1,0,0,l[0]),j$O.computePosition(o,n,!1,0,s-1,l[1]),j$O.computePosition(o,n,!1,a-1,0,l[2]),j$O.computePosition(o,n,!1,a-1,s-1,l[3]),h$18.fromCartesianArray(l,n,r)}function j$N(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).rectangle;if(o$1q.typeOf.object("rectangle",t),h$18.validate(t),t.north<t.south)throw new t$15("options.rectangle.north must be greater than or equal to options.rectangle.south");var i=u$Z(e.height,0),n=u$Z(e.extrudedHeight,i);this._rectangle=h$18.clone(t),this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._surfaceHeight=Math.max(i,n),this._rotation=u$Z(e.rotation,0),this._stRotation=u$Z(e.stRotation,0),this._vertexFormat=n$13.clone(u$Z(e.vertexFormat,n$13.DEFAULT)),this._extrudedHeight=Math.min(i,n),this._shadowVolume=u$Z(e.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}j$N.packedLength=h$18.packedLength+t$12.packedLength+n$13.packedLength+7,j$N.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),h$18.pack(e._rectangle,t,i),i+=h$18.packedLength,t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=u$Z(e._offsetAttribute,-1),t};var Zt$3=new h$18,Kt$5=t$12.clone(t$12.UNIT_SPHERE),tt$d={rectangle:Zt$3,ellipsoid:Kt$5,vertexFormat:Ht$5,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};j$N.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=h$18.unpack(e,t,Zt$3);t+=h$18.packedLength;var r=t$12.unpack(e,t,Kt$5);t+=t$12.packedLength;var o=n$13.unpack(e,t,Ht$5);t+=n$13.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=1===e[t++],d=e[t];return e$2e(i)?(i._rectangle=h$18.clone(n,i._rectangle),i._ellipsoid=t$12.clone(r,i._ellipsoid),i._vertexFormat=n$13.clone(o,i._vertexFormat),i._granularity=a,i._surfaceHeight=s,i._rotation=l,i._stRotation=u,i._extrudedHeight=c,i._shadowVolume=h,i._offsetAttribute=-1===d?void 0:d,i):(tt$d.granularity=a,tt$d.height=s,tt$d.rotation=l,tt$d.stRotation=u,tt$d.extrudedHeight=c,tt$d.shadowVolume=h,tt$d.offsetAttribute=-1===d?void 0:d,new j$N(tt$d))},j$N.computeRectangle=function(e,t){var i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).rectangle;if(o$1q.typeOf.object("rectangle",i),h$18.validate(i),i.north<i.south)throw new t$15("options.rectangle.north must be greater than or equal to options.rectangle.south");var n=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),r=u$Z(e.ellipsoid,t$12.WGS84);return Ot$7(i,n,u$Z(e.rotation,0),r,t)};var ce$p=new p$1e,$t$3=new n$15,he$o=new a$18;j$N.createGeometry=function(e){if(!e$2d.equalsEpsilon(e._rectangle.north,e._rectangle.south,e$2d.EPSILON10)&&!e$2d.equalsEpsilon(e._rectangle.east,e._rectangle.west,e$2d.EPSILON10)){var t=e._rectangle,i=e._ellipsoid,n=e._rotation,r=e._stRotation,o=e._vertexFormat,a=j$O.computeOptions(t,e._granularity,n,r,Xt$3,Qt$5,le$s),s=ce$p;if(0!==r||0!==n){var l=h$18.center(t,he$o),u=i.geodeticSurfaceNormalCartographic(l,Tt$7);n$15.fromAxisAngle(u,-r,$t$3),p$1e.fromQuaternion($t$3,s)}else p$1e.clone(p$1e.IDENTITY,s);var c,h,d=e._surfaceHeight,f=e._extrudedHeight,p=!e$2d.equalsEpsilon(d,f,0,e$2d.EPSILON2);if(a.lonScalar=1/e._rectangle.width,a.latScalar=1/e._rectangle.height,a.tangentRotationMatrix=s,t=e._rectangle,p){c=fe$s(e,a);var _=i$1d.fromRectangle3D(t,i,d,oe$q),m=i$1d.fromRectangle3D(t,i,f,ie$x);h=i$1d.union(_,m)}else{if((c=Jt$4(e,a)).attributes.position.values=A$1f.scaleToGeodeticHeight(c.attributes.position.values,d,i,!1),e$2e(e._offsetAttribute)){var g=c.attributes.position.values.length,x=new Uint8Array(g/3);d$1s(x,e._offsetAttribute===_0x39c22a.NONE?0:1),c.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}h=i$1d.fromRectangle3D(t,i,d)}return o.position||delete c.attributes.position,new I$1p({attributes:c.attributes,indices:c.indices,primitiveType:c.primitiveType,boundingSphere:h,offsetAttribute:e._offsetAttribute})}},j$N.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new j$N({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:r,stRotation:e._stRotation,granularity:n,extrudedHeight:a,height:o,vertexFormat:n$13.POSITION_ONLY,shadowVolume:!0})};var It$8=new h$18,de$q=[new o$1o,new o$1o,new o$1o],me$s=new f$15,ge$n=new a$18;function pe$u(e){if(0===e._stRotation)return[0,0,0,1,1,0];var t=h$18.clone(e._rectangle,It$8),i=e._granularity,n=e._ellipsoid,r=Ot$7(t,i,e._rotation-e._stRotation,n,It$8),o=de$q;o[0].x=r.west,o[0].y=r.south,o[1].x=r.west,o[1].y=r.north,o[2].x=r.east,o[2].y=r.south;for(var a=e.rectangle,s=f$15.fromRotation(e._stRotation,me$s),l=h$18.center(a,ge$n),u=0;u<3;++u){var c=o[u];c.x-=l.longitude,c.y-=l.latitude,f$15.multiplyByVector(s,c,c),c.x+=l.longitude,c.y+=l.latitude,c.x=(c.x-a.west)/a.width,c.y=(c.y-a.south)/a.height}var h=o[0],d=o[1],f=o[2],p=new Array(6);return o$1o.pack(h,p),o$1o.pack(d,p,2),o$1o.pack(f,p,4),p}Object.defineProperties(j$N.prototype,{rectangle:{get:function(){return e$2e(this._rotatedRectangle)||(this._rotatedRectangle=Ot$7(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return e$2e(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=pe$u(this)),this._textureCoordinateRotationPoints}}});var _0x4a1361=(_0x305cad=!0,function(e,t){var i=_0x305cad?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x305cad=!1,i}),_0x9b13db=_0x4a1361(void 0,(function(){return _0x9b13db.toString().search("(((.+)+)+)+$").toString().constructor(_0x9b13db).search("(((.+)+)+)+$")})),_0x305cad;function _0x3c2cd7(e){e=e||{},this._font=u$Z(e.font,"30px sans-serif"),this._fillColor=u$Z(e.fillColor,e$1X.WHITE),this._outlineColor=u$Z(e.outlineColor,e$1X.BLACK),this._outlineWidth=u$Z(e.outlineWidth,1),this._showBackground=u$Z(e.showBackground,!1),this._backgroundColor=u$Z(e.backgroundColor,new e$1X(.165,.165,.165,.8)),this._style=u$Z(e.fillStyle,R$S.FILL),this._pixelOffset=o$1o.clone(u$Z(e.pixelOffset,o$1o.ZERO)),this._scale=u$Z(e.scale,1),this._textField=u$Z(e.textField,"Name"),this._heightReference=u$Z(e.heightReference,k$R.NONE),this._distanceDisplayCondition=e.distanceDisplayCondition,this._textFieldChanged=!1}_0x9b13db(),Object.defineProperties(_0x3c2cd7.prototype,{font:{get:function(){return this._font},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._font!==e&&(this._font=e)}},fillColor:{get:function(){return this._fillColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._fillColor=e}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._outlineColor=e}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e)}},showBackground:{get:function(){return this._showBackground},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._showBackground!==e&&(this._showBackground=e)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._backgroundColor=e}},fillStyle:{get:function(){return this._style},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._style!==e&&(this._style=e)}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._pixelOffset=e}},scale:{get:function(){return this._scale},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._scale!==e&&(this._scale=e)}},textField:{get:function(){return this._textField},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._textField!==e?(this._textField=e,this._textFieldChanged=!0):this._textFieldChanged=!1}},heightReference:{get:function(){return this._heightReference},set:function(e){this._heightReference=e}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=e}}});var _0x5c6037=(_0x2ce1f9=!0,function(e,t){var i=_0x2ce1f9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ce1f9=!1,i}),_0x1c7009=_0x5c6037(void 0,(function(){return _0x1c7009.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c7009).search("(((.+)+)+)+$")})),_0x2ce1f9;_0x1c7009();var _0x13b412={Hide:0,Visible:1,ResetAll:2},_0x70e866=Object.freeze(_0x13b412),_0x17d2a3=(_0x1f6bec=!0,function(e,t){var i=_0x1f6bec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f6bec=!1,i}),_0x5cf334=_0x17d2a3(void 0,(function(){return _0x5cf334.toString().search("(((.+)+)+)+$").toString().constructor(_0x5cf334).search("(((.+)+)+)+$")})),_0x1f6bec;function _0x2226fe(e,t,i){this._id=e,this._type=t,this._pointCounts=i}_0x5cf334(),Object.defineProperties(_0x2226fe.prototype,{id:{get:function(){return this._id},set:function(e){o$1q.defined("PointCloudClassificationInfo id",e),this._id=e}},type:{get:function(){return this._type},set:function(e){o$1q.defined("PointCloudClassificationInfo type",e),this._type=e}},pointCounts:{get:function(){return this._pointCounts},set:function(e){o$1q.defined("PointCloudClassificationInfo pointCounts",e),this._pointCounts=e}}}),_0x2226fe.prototype.isDestroyed=function(){return!1},_0x2226fe.prototype.destroy=function(){return i$11(this)};var _0x141923=(_0x59204f=!0,function(e,t){var i=_0x59204f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59204f=!1,i}),_0x2cd2de=_0x141923(void 0,(function(){return _0x2cd2de.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cd2de).search("(((.+)+)+)+$")})),_0x59204f;_0x2cd2de();var _0x596e07={NONE:0,COLOR:1,MODEL_COLOR:2},_0x1f23e7=Object.freeze(_0x596e07),_0x3526ca=(_0x42d7ca=!0,function(e,t){var i=_0x42d7ca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42d7ca=!1,i}),_0x381168=_0x3526ca(void 0,(function(){return _0x381168.toString().search("(((.+)+)+)+$").toString().constructor(_0x381168).search("(((.+)+)+)+$")})),_0x42d7ca;_0x381168();var _0x104159={NONE:0,STRIP:1,DOT:2,CHECKBOARD:3,GRID:4};function _0x2adae6(){this._rotationAngle=0,this._foreColor=new e$2c(1,1,0,1),this._backColor=new e$2c(1,0,1,1),this._type=_0x104159.DOT,this._lineWidthX=2,this._lineWidthY=2,this._offsetX=0,this._offsetY=0,this._repeatX=20,this._repeatY=20}_0x2adae6.prototype.setValue=function(e,t){"ForeColor"===e&&(this._foreColor=t),"BackColor"===e&&(this._backColor=t),"RegionType"===e&&(this._type=t),"RotationAngle"===e&&(this._rotationAngle=t),"WidthX"===e&&(this._lineWidthX=t),"WidthY"===e&&(this._lineWidthY=t),"OffsetX"===e&&(this._offsetX=t),"OffsetY"===e&&(this._offsetY=t),"RepeatX"===e&&(this._repeatX=t),"RepeatY"===e&&(this._repeatY=t)},_0x2adae6.prototype.getEffectSetting=function(){return[{name:"ForeColor",value:new e$2c(1,1,0,1),description:"Region Fore Color",max:new e$2c(1,1,1,1),min:new e$2c(0,0,0,0),type:e$2c},{name:"BackColor",value:new e$2c(1,0,1,1),description:"Region Back Color",max:new e$2c(1,1,1,1),min:new e$2c(0,0,0,0),type:e$2c},{name:"RegionType",value:_0x104159.DOT,description:"Region Effect Type",max:4,min:0,type:_0x104159},{name:"RotationAngle",value:0,description:"Region RotationAngle",max:0,min:1,type:Number},{name:"WidthX",value:2,description:"Region horizontal Line Width",max:20,min:1,type:Number},{name:"WidthY",value:2,description:"Region vertical Line Width",max:20,min:1,type:Number},{name:"OffsetX",value:0,description:"Region horizontal Offset",max:20,min:0,type:Number},{name:"OffsetY",value:0,description:"Region vertical Offset",max:20,min:0,type:Number},{name:"RepeatX",value:20,description:"Region horizontal Repeat",max:20,min:1,type:Number},{name:"RepeatY",value:20,description:"Region vertical Repeat",max:20,min:1,type:Number}]};var _0x1c7d3f=(_0x3785c4=!0,function(e,t){var i=_0x3785c4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3785c4=!1,i}),_0x5829e4=_0x1c7d3f(void 0,(function(){return _0x5829e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x5829e4).search("(((.+)+)+)+$")})),_0x3785c4;_0x5829e4();var _0x5771a6={NONE:0,DASH:1,OUTLINE:2,GLOW:3};function _0x5175d0(){this._lineWidth=1,this._color=new e$2c(1,1,1,1),this._type=_0x5771a6.NONE,this._outlineColor=new e$2c(0,0,0,1),this._outlineWidth=1,this._gapColor=new e$2c(1,1,1,0),this._dashLength=16,this._dashPattern=255,this._glowPower=.25,this._isArrow=!1,this._isMove=!1,this._frame=0}_0x5175d0.prototype.setValue=function(e,t){"Color"===e&&(this._color=t),"Width"===e&&(this._lineWidth=t),"PolylineType"===e&&(this._type=t),"OutlineColor"===e&&(this._outlineColor=t),"OutlineWidth"===e&&(this._outlineWidth=t),"GapColor"===e&&(this._gapColor=t),"DashLength"===e&&(this._dashLength=t),"DashPattern"===e&&(this._dashPattern=t),"GlowPower"===e&&(this._glowPower=t),"IsArrow"===e&&(this._isArrow=t),"IsMove"===e&&(this._isMove=t)},_0x5175d0.prototype.getEffectSetting=function(){return[{name:"Color",value:new e$2c(1,1,1,1),description:"Polyline Color",max:new e$2c(1,1,1,1),min:new e$2c(0,0,0,0),type:e$2c},{name:"Width",value:5,description:"Polyline Width",max:20,min:1,type:Number},{name:"PolylineType",value:_0x5771a6.DASH,description:"Polyline Type",max:3,min:0,type:_0x5771a6},{name:"OutlineColor",value:new e$2c(0,0,0,1),description:"Polyline Outline Color",max:new e$2c(1,1,1,1),min:new e$2c(0,0,0,0),type:e$2c},{name:"OutlineWidth",value:1,description:"Polyline Outline Width",max:10,min:1,type:Number},{name:"GapColor",value:new e$2c(1,1,1,0),description:"Polyline Gap Color",max:new e$2c(1,1,1,1),min:new e$2c(0,0,0,0),type:e$2c},{name:"DashLength",value:16,description:"Polyline Gap Dash Length",max:64,min:1,type:Number},{name:"DashPattern",value:255,description:"Polyline Gap Dash Pattern",max:65535,min:0,type:Number},{name:"GlowPower",value:.25,description:"Polyline Glow Power",max:1,min:0,type:Number},{name:"IsArrow",value:!1,description:"Polyline Is Have Arrow",max:!0,min:!1,type:Boolean},{name:"IsMove",value:!1,description:"Polyline Is Moving",max:!0,min:!1,type:Boolean}]};var _0x25fadc=(_0x49877c=!0,function(e,t){var i=_0x49877c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49877c=!1,i}),_0x450160=_0x25fadc(void 0,(function(){return _0x450160.toString().search("(((.+)+)+)+$").toString().constructor(_0x450160).search("(((.+)+)+)+$")})),_0x49877c;function _0x3b1e53(){}_0x450160();var _0x571646="Assets/Textures/PBR_Material/",_0x12c529="",_0x1833e9="",_0x885ad5="",_0x343ca9="",_0xa04845="",_0x26383a="";_0x3b1e53.getMaterial=function(e){return e===Xe$e.TITANIUM_SCUFFED?(_0x12c529="titanium_scuffed/Titanium-Scuffed_metallic.png",_0x1833e9="titanium_scuffed/Titanium-Scuffed_roughness.png",_0x885ad5="titanium_scuffed/Titanium-Scuffed_basecolor.png"):e===Xe$e.METAL_PLATE&&(_0x12c529="metal_plate/metal_plate_disp_1k.jpg",_0x1833e9="metal_plate/metal_plate_rough_1k.jpg",_0x885ad5="metal_plate/metal_plate_diff_1k.jpg"),_0x343ca9=n$17(_0x571646+_0x12c529),_0xa04845=n$17(_0x571646+_0x1833e9),_0x26383a=n$17(_0x571646+_0x885ad5),{metalTextureUrl:_0x343ca9,roughTextureUrl:_0xa04845,albedoTextureUrl:_0x26383a}};var _0x275445=(_0x17bd83=!0,function(e,t){var i=_0x17bd83?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17bd83=!1,i}),_0x188c28=_0x275445(void 0,(function(){return _0x188c28.toString().search("(((.+)+)+)+$").toString().constructor(_0x188c28).search("(((.+)+)+)+$")})),_0x17bd83;_0x188c28();var _0x23a343="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthTexture;\nuniform vec3 u_distancesAndEdlStrength;\nvarying vec2 v_textureCoordinates;\n\nvec2 neighborContribution(float log2Depth, vec2 padding)\n{\nfloat depthOrLogDepth = texture2D(u_pointCloud_depthTexture, v_textureCoordinates + padding).r;\nif (depthOrLogDepth == 1.0) {\nreturn vec2(0.0);\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(v_textureCoordinates + padding, depthOrLogDepth);\nreturn vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\nvoid main()\n{\nfloat depthOrLogDepth = texture2D(u_pointCloud_depthTexture, v_textureCoordinates).r;\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat log2Depth = log2(-eyeCoordinate.z);\nif (depthOrLogDepth == 1.0)\n{\ndiscard;\n}\nvec4 color = texture2D(u_pointCloud_colorGBuffer, v_textureCoordinates);\n#ifdef EDL_SHADING\nfloat distX = u_distancesAndEdlStrength.x;\nfloat distY = u_distancesAndEdlStrength.y;\nvec2 responseAndCount = vec2(0.0);\nresponseAndCount += neighborContribution(log2Depth, vec2(0, distY));\nresponseAndCount += neighborContribution(log2Depth, vec2(distX, 0));\nresponseAndCount += neighborContribution(log2Depth, vec2(0, -distY));\nresponseAndCount += neighborContribution(log2Depth, vec2(-distX, 0));\nfloat response = responseAndCount.x / responseAndCount.y;\nfloat shade = exp(-response * 300.0 * u_distancesAndEdlStrength.z);\ncolor.rgb *= shade;\n#endif\ngl_FragColor = vec4(color);\ngl_FragColor.a = 1.0;\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + (czm_projection * vec4(eyeCoordinate.xyz, 1.0)).w);\n#else\ngl_FragDepthEXT = czm_eyeToWindowCoordinates(vec4(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n",_0x29d426=(_0x22379c=!0,function(e,t){var i=_0x22379c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x22379c=!1,i}),_0x54edea=_0x29d426(void 0,(function(){return _0x54edea.toString().search("(((.+)+)+)+$").toString().constructor(_0x54edea).search("(((.+)+)+)+$")})),_0x22379c;_0x54edea();var _0x248cf1="\n#include <SceneUboDecl>\nvar u_pointCloud_colorGBuffer : texture_2d<f32>;\nvar u_pointCloud_colorGBufferSampler : sampler;\n\nvar u_pointCloud_depthTexture : texture_depth_2d;\nvar u_pointCloud_depthTextureSampler : sampler;\n\nuniform u_distancesAndEdlStrength : vec3<f32>;\nvarying v_textureCoordinates : vec2<f32>;\n\nfn windowToEyeCoordinates_v4(fragmentCoordinate : vec4<f32>) -> vec4<f32>\n{\n // Reconstruct NDC coordinates\n var x = 2.0 * (fragmentCoordinate.x - Scene.uViewport.x) / Scene.uViewport.z - 1.0;\n var y = 2.0 * (fragmentCoordinate.y - Scene.uViewport.y) / Scene.uViewport.w - 1.0;\n var z = (fragmentCoordinate.z - uniforms.czm_viewportTransformation[3][2]) / uniforms.czm_viewportTransformation[2][2];\n var q = vec4<f32>(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= fragmentCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n q = Scene.uInverseProjection * q;\n\n return q;\n}\n\n\nfn windowToEyeCoordinates(fragmentCoordinateXY : vec2<f32>, depthOrLogDepth : f32) -> vec4<f32>\n{\n var eyeCoordinate : vec4<f32>;\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#ifdef LOG_DEPTH\n var near = Scene.uCurrentFrustum.x;\n var far = Scene.uCurrentFrustum.y;\n var log2Depth = depthOrLogDepth * Scene.uLog2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n var depthFromCamera = depthFromNear + near;\n var windowCoord = vec4<f32>(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n eyeCoordinate = windowToEyeCoordinates_v4(windowCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n#else\n var windowCoord = vec4<f32>(fragmentCoordinateXY, depthOrLogDepth, 1.0);\n eyeCoordinate = windowToEyeCoordinates_v4(windowCoord);\n#endif\n return eyeCoordinate;\n}\n\nfn eyeToWindowCoordinates(positionEC : vec4<f32>) -> vec4<f32>\n{\n var q = Scene.uProjection * positionEC; // clip coordinates\n var qxyz = q.xyz;\n q = vec4<f32>(qxyz / q.w, q.w); // normalized device coordinates\n q = vec4<f32>((uniforms.czm_viewportTransformation * vec4<f32>(q.xyz, 1.0)).xyz, q.w); // window coordinates\n return q;\n}\n\nfn neighborContribution(log2Depth : f32, padding : vec2<f32>) -> vec2<f32>\n{\n var depthOrLogDepth = textureSample(u_pointCloud_depthTexture, u_pointCloud_depthTextureSampler, v_textureCoordinates + padding);\n if (depthOrLogDepth == 1.0) \n {\n return vec2<f32>(0.0);\n }\n var eyeCoordinate = windowToEyeCoordinates(v_textureCoordinates + padding, depthOrLogDepth);\n return vec2<f32>(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var depthOrLogDepth = textureSample(u_pointCloud_depthTexture, u_pointCloud_depthTextureSampler, v_textureCoordinates);\n var eyeCoordinate = windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\n eyeCoordinate /= eyeCoordinate.w;\n var log2Depth = log2(-eyeCoordinate.z);\n if (depthOrLogDepth == 1.0)\n {\n discard;\n }\n var color = textureSample(u_pointCloud_colorGBuffer, u_pointCloud_colorGBufferSampler, v_textureCoordinates);\n#ifdef EDL_SHADING\n var distX = uniforms.u_distancesAndEdlStrength.x;\n var distY = uniforms.u_distancesAndEdlStrength.y;\n var responseAndCount = vec2<f32>(0.0);\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(0, distY));\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(distX, 0));\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(0, -distY));\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(-distX, 0));\n var response = responseAndCount.x / responseAndCount.y;\n var shade = exp(-response * 300.0 * uniforms.u_distancesAndEdlStrength.z);\n color.r *= shade;\n color.g *= shade;\n color.b *= shade;\n#endif\n gl_FragColor = vec4<f32>(color);\n gl_FragColor.a = 1.0;\n#ifdef LOG_DEPTH\n czm_writeLogDepth(1.0 + (Scene.uProjection * vec4<f32>(eyeCoordinate.xyz, 1.0)).w);\n#else\n gl_FragDepth = czm_eyeToWindowCoordinates(vec4<f32>(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n",y$M="#define SAMPLES 8\n\nuniform float delta;\nuniform float sigma;\nuniform float direction; // 0.0 for x direction, 1.0 for y direction\n\nuniform sampler2D colorTexture;\n\n#ifdef USE_STEP_SIZE\nuniform float stepSize;\n#else\nuniform vec2 step;\n#endif\n\nvarying vec2 v_textureCoordinates;\n\n// Incremental Computation of the Gaussian:\n// https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch40.html\n\nvoid main()\n{\n vec2 st = v_textureCoordinates;\n vec2 dir = vec2(1.0 - direction, direction);\n\n#ifdef USE_STEP_SIZE\n vec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));\n#else\n vec2 step = step;\n#endif\n\n vec3 g;\n g.x = 1.0 / (sqrt(czm_twoPi) * sigma);\n g.y = exp((-0.5 * delta * delta) / (sigma * sigma));\n g.z = g.y * g.y;\n\n vec4 result = texture2D(colorTexture, st) * g.x;\n for (int i = 1; i < SAMPLES; ++i)\n {\n g.xy *= g.yz;\n\n vec2 offset = float(i) * dir * step;\n result += texture2D(colorTexture, st - offset) * g.x;\n result += texture2D(colorTexture, st + offset) * g.x;\n }\n\n gl_FragColor = result;\n}\n",_0x17cb2c=(_0x599782=!0,function(e,t){var i=_0x599782?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x599782=!1,i}),_0x47686a=_0x17cb2c(void 0,(function(){return _0x47686a.toString().search("(((.+)+)+)+$").toString().constructor(_0x47686a).search("(((.+)+)+)+$")})),_0x599782,_0x23f6b7;function _0x50e2f4(e){return new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:e,magnificationFilter:e})}function _0x460335(){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthTexture=void 0,this._blurXFrameBuffer=void 0,this._blurXTexture=void 0,this._blurYFrameBuffer=void 0,this._blurYTexture=void 0,this._useCount=0}_0x47686a(),_0x460335._useCount=0,_0x460335.addRef=function(){this._useCount++},_0x460335.removeRef=function(){if(this._useCount--,0==this._useCount){var e=_0x23f6b7._framebuffer;if(!e$2e(e))return;_0x23f6b7._colorGBuffer.destroy(),_0x23f6b7._depthTexture.destroy(),e.destroy()}this._useCount=Math.max(0,this._useCount)},_0x460335.setCurrentFrameBuffer=function(e){_0x23f6b7=e},_0x460335.createFrameBuffer=function(e,t){var i=e.drawingBufferWidth*t,n=e.drawingBufferHeight*t,r=new t$U({context:e,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:_0x50e2f4(tt$i.LINEAR)});new t$U({context:e,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:_0x50e2f4(tt$i.NEAREST)});var o=new t$U({context:e,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8,sampler:_0x50e2f4(tt$i.NEAREST)});_0x23f6b7._framebuffer=new t$V({context:e,colorTextures:[r],depthStencilTexture:o,destroyAttachments:!1}),_0x23f6b7._colorGBuffer=r,_0x23f6b7._depthTexture=o,_0x23f6b7._blurXTexture=new t$U({context:e,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:_0x50e2f4(tt$i.LINEAR)}),_0x23f6b7._blurXFrameBuffer=new t$V({context:e,colorTextures:[_0x23f6b7._blurXTexture],destroyAttachments:!1}),_0x23f6b7._blurYTexture=new t$U({context:e,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:_0x50e2f4(tt$i.LINEAR)}),_0x23f6b7._blurYFrameBuffer=new t$V({context:e,colorTextures:[_0x23f6b7._blurYTexture],destroyAttachments:!1})},_0x460335.getColorGBuffer=function(){return _0x23f6b7._colorGBuffer},_0x460335.getDepthTexture=function(){return _0x23f6b7._depthTexture},_0x460335.getFrameBuffer=function(){return _0x23f6b7._framebuffer},_0x460335.getBlurXFrameBuffer=function(){return _0x23f6b7._blurXFrameBuffer},_0x460335.getBlurYFrameBuffer=function(){return _0x23f6b7._blurYFrameBuffer},_0x460335.getBlurXTexture=function(){return _0x23f6b7._blurXTexture},_0x460335.getBlurYTexture=function(){return _0x23f6b7._blurYTexture},_0x460335.destroyFrameBuffer=function(){var e=_0x23f6b7._framebuffer;!e$2e(e)||(_0x23f6b7._colorGBuffer.destroy(),_0x23f6b7._depthTexture.destroy(),e.destroy(),_0x23f6b7._blurXTexture.destroy(),_0x23f6b7._blurYTexture.destroy(),_0x23f6b7._blurXFrameBuffer.destroy(),_0x23f6b7._blurYFrameBuffer.destroy())};var _0x366566=(_0x474513=!0,function(e,t){var i=_0x474513?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x474513=!1,i}),_0x82bc90=_0x366566(void 0,(function(){return _0x82bc90.toString().search("(((.+)+)+)+$").toString().constructor(_0x82bc90).search("(((.+)+)+)+$")})),_0x474513;_0x82bc90();var _0x3a2989=.5;function _0x153701(e){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthTexture=void 0,this._blurXFrameBuffer=void 0,this._blurXTexture=void 0,this._blurYFrameBuffer=void 0,this._blurYTexture=void 0,this._blurXCommand=void 0,this._blurYCommand=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this.edlShading=!1,this._edlShading=!1,this._performance=!1,this._strength=1,this._radius=1,this._passType=Le$q.S3MTiles,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},_0x460335.addRef(),this.textureScale=_0x3a2989}var _0x36ef61=new o$1p,_0x3c2395=new o$1o;function _0x8921e(e,t){_0x3c2395.x=1/e._colorGBuffer.width,_0x3c2395.y=1/e._colorGBuffer.height;var i={delta:function(){return 1},sigma:function(){return 2},stepSize:function(){return 1},direction:function(){return 0},colorTexture:function(){return e._colorGBuffer}},n={delta:function(){return 1},sigma:function(){return 2},stepSize:function(){return 1},direction:function(){return 1},colorTexture:function(){return e._blurXTexture}},r="#define USE_STEP_SIZE\n"+y$M;e._blurXCommand=t.createViewportQuadCommand(r,{shaderProgramName:"blurX",uniformMap:i,pass:e._passType,owner:e}),e._blurXCommand.framebuffer=e._blurXFrameBuffer,e._blurXCommand.renderState=d$1m.fromCache({viewport:_0x19328b}),e._blurYCommand=t.createViewportQuadCommand(r,{shaderProgramName:"blurY",uniformMap:n,pass:e._passType,owner:e}),e._blurYCommand.framebuffer=e._blurYFrameBuffer,e._blurYCommand.renderState=d$1m.fromCache({viewport:_0x19328b});var o={u_pointCloud_colorGBuffer:function(){return e._performance?e._blurYTexture:e._colorGBuffer},u_pointCloud_depthTexture:function(){return e._depthTexture},u_distancesAndEdlStrength:function(){return _0x36ef61.x=e._radius/(t.drawingBufferWidth*_0x3a2989),_0x36ef61.y=e._radius/(t.drawingBufferHeight*_0x3a2989),_0x36ef61.z=e._strength,_0x36ef61}},a=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0}}),s=new s$V({name:"S3MPointCloudEDLFp",sources:[t.webgpu?_0x248cf1:_0x23a343],useWGSL:t.webgpu});e._edlShading&&s.defines.push("EDL_SHADING"),e._drawCommand=t.createViewportQuadCommand(s,{shaderProgramName:"S3MPointCloudEDL",uniformMap:o,renderState:a,pass:e._passType,owner:e,useWGSL:t.webgpu}),e._drawCommand.addUniformBuffer(t.uniformState._sceneUBO),e._clearCommand=new t$W({framebuffer:e._framebuffer,color:new e$1X(0,0,0,0),depth:1,renderState:d$1m.fromCache(),pass:e._passType,owner:e})}function _0x3f9fa3(e,t){var i=t.drawingBufferWidth*_0x3a2989,n=t.drawingBufferHeight*_0x3a2989;_0x19328b.width=i,_0x19328b.height=n;var r=_0x460335.getColorGBuffer(),o=!1,a=e$2e(r)&&(r.width!==i||r.height!==n);(!e$2e(r)||a)&&(_0x460335.destroyFrameBuffer(),_0x460335.createFrameBuffer(t,_0x3a2989));var s=e._edlShading!=e.edlShading;e._edlShading=e.edlShading;var l=e._colorGBuffer;return a=e._screenWidth!==i||e._screenHeight!==n,(!e$2e(l)||a||s)&&(e._colorGBuffer=_0x460335.getColorGBuffer(),e._depthTexture=_0x460335.getDepthTexture(),e._framebuffer=_0x460335.getFrameBuffer(),e._blurXFrameBuffer=_0x460335.getBlurXFrameBuffer(),e._blurYFrameBuffer=_0x460335.getBlurYFrameBuffer(),e._blurXTexture=_0x460335.getBlurXTexture(),e._blurYTexture=_0x460335.getBlurYTexture(),_0x8921e(e,t),o=!0),e._screenWidth=i,e._screenHeight=n,o}function _0xab2b55(e){return e.drawBuffers&&e.fragmentDepth}_0x153701.isSupported=_0xab2b55;var _0x19328b=new f$1a;function _0x3968fe(e,t){var i=e[t.id];if(!e$2e(i)||i.viewport.width!=_0x19328b.width||i.viewport.height!=_0x19328b.height){var n=d$1m.getState(t);n.viewport=_0x19328b,i=d$1m.fromCache(n),e[t.id]=i}return i}_0x153701.prototype.update=function(e,t,i){if(_0xab2b55(e.context)){_0x460335.setCurrentFrameBuffer(e.context._sharedEDL),this._strength=i.eyeDomeLightingStrength,this._radius=i.eyeDomeLightingRadius,this._performance=i.performance,this.edlShading=i.eyeDomeLighting,_0x3a2989=i.performance?.5:1,this.textureScale=_0x3a2989;var n,r=_0x3f9fa3(this,e.context),o=e.commandList,a=o.length;for(n=t;n<a;++n){var s=o[n];if(s.owner._layer._fileType===p$T.PointCloudFile){var l=s.derivedCommands.pointCloudProcessor;(!e$2e(l)||s.dirty||r||l.framebuffer!==this._framebuffer)&&(l=i$$.shallowClone(s),s.derivedCommands.pointCloudProcessor=l,l.framebuffer=this._framebuffer,l.renderState=_0x3968fe(this._renderStateCache,l.renderState),l.castShadows=!1,l.receiveShadows=!1,l._pointCloudEyeDomeLighting=!0),o[n]=l}}var u=this._clearCommand,c=this._drawCommand;i.performance&&(o.push(this._blurXCommand),o.push(this._blurYCommand)),o.push(c),o.push(u)}},_0x153701.prototype.isDestroyed=function(){return!1},_0x153701.prototype.destroy=function(){return _0x460335.removeRef(),i$11(this)};var _0x490c14=(_0x8d87c0=!0,function(e,t){var i=_0x8d87c0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8d87c0=!1,i}),_0x1ac57f=_0x490c14(void 0,(function(){return _0x1ac57f.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ac57f).search("(((.+)+)+)+$")})),_0x8d87c0;_0x1ac57f();var R$M="attribute vec4 aPosition;\n#ifdef HAS_TEXTURECOORD\nattribute vec3 aTexCoord;\n#endif\n#ifdef Volume\n attribute vec3 aRatio;\n varying vec3 vecRotioCoord;\n\tvarying vec2 vecHypTexCoord;\n#endif\n#ifdef GEOCYLINDER\n uniform float uGeometryHeight;\n#endif\nvarying vec2 v_texCoord;\nvarying float v_face;\nvoid main()\n{\n#ifdef HAS_TEXTURECOORD\n v_texCoord = aTexCoord.xy;\n v_face = aTexCoord.z;\n#endif\n#ifdef GEOCYLINDER\n v_texCoord.y = aPosition.z / uGeometryHeight;\n#endif\n#ifdef Volume\nvecRotioCoord = aRatio;\n#endif\n#ifdef USE_RelativeOrigin\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz - czm_relativeOrigin, 1.0);\n#else\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n#endif\n}",_0x5a115b=(_0x1a1d1d=!0,function(e,t){var i=_0x1a1d1d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a1d1d=!1,i}),_0x4eda50=_0x5a115b(void 0,(function(){return _0x4eda50.toString().search("(((.+)+)+)+$").toString().constructor(_0x4eda50).search("(((.+)+)+)+$")})),_0x1a1d1d;_0x4eda50();var _0x2e70eb="uniform sampler2D uClampTexture;\nuniform vec4 uClipPlaneColor;\nuniform float uUseColor;\nvoid main()\n{\nvec2 center = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\nvec4 clampColor = texture2D(uClampTexture, center);\nif(clampColor.r < 0.01 && clampColor.g < 0.01 && clampColor.b < 0.01)\n{\n discard;\n}\ngl_FragColor = mix(clampColor, uClipPlaneColor, uUseColor);\n}",_0x215925=(_0x5d23e8=!0,function(e,t){var i=_0x5d23e8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d23e8=!1,i}),_0x5db693=_0x215925(void 0,(function(){return _0x5db693.toString().search("(((.+)+)+)+$").toString().constructor(_0x5db693).search("(((.+)+)+)+$")})),_0x5d23e8;_0x5db693();var _0x162bd8="void main()\n{\ngl_FragColor = vec4(1.0);\n}",_0x51a843=(_0x315704=!0,function(e,t){var i=_0x315704?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x315704=!1,i}),_0x3a8f07=_0x51a843(void 0,(function(){return _0x3a8f07.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a8f07).search("(((.+)+)+)+$")})),_0x315704;function _0x597498(e){this._layer=e,this._colorCommand=void 0,this._depthCommand=void 0,this._firstPoint=void 0,this._secondPoint=void 0,this._thirdPoint=void 0,this._boundingSphere=new i$1d(new o$1p(0,0,0),6378137),this._matModel=p$1d.IDENTITY,this._attributeLocations={}}_0x3a8f07(),Object.defineProperties(_0x597498.prototype,{}),_0x597498.prototype.initialize=function(e,t){this._initialize||(this.createCommand(e,t),this._initialize=!0)},_0x597498.prototype.update=function(e,t,i){if(this.initialize(e,t),!t.passes.pick&&!t.passes.depth){if(t._fboState.frameBufferType==Qe$c.CLAMP)return void(e$2e(this._depthCommand)&&i.push(this._depthCommand));e$2e(this._colorCommand)&&i.push(this._colorCommand)}};var _0x372e0e=new o$1p;function _0x3b3f51(e){e$2e(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}_0x597498.prototype.createVertices=function(e){var t=S$14.createTypedArray(S$14.FLOAT,9),i=0,n=1e3;return t[i++]=(this._firstPoint.x-e.x)*n,t[i++]=(this._firstPoint.y-e.y)*n,t[i++]=(this._firstPoint.z-e.z)*n,t[i++]=(this._secondPoint.x-e.x)*n,t[i++]=(this._secondPoint.y-e.y)*n,t[i++]=(this._secondPoint.z-e.z)*n,t[i++]=(this._thirdPoint.x-e.x)*n,t[i++]=(this._thirdPoint.y-e.y)*n,t[i++]=(this._thirdPoint.z-e.z)*n,t},_0x597498.prototype.createCommand=function(e,t){_0x3b3f51(this._colorCommand),_0x3b3f51(this._depthCommand);var i=S$14.createTypedArray(S$14.UNSIGNED_SHORT,3);i[0]=0,i[1]=1,i[2]=2,_0x372e0e.x=(this._firstPoint.x+this._secondPoint.x+this._thirdPoint.x)/3,_0x372e0e.y=(this._firstPoint.y+this._secondPoint.y+this._thirdPoint.y)/3,_0x372e0e.z=(this._firstPoint.z+this._secondPoint.z+this._thirdPoint.z)/3;var n=this.createVertices(_0x372e0e),r=t$X.createVertexBuffer({context:e,typedArray:n,usage:A$18.STATIC_DRAW}),o=[];this._attributeLocations.aPosition=0,o.push({name:"aPosition",index:this._attributeLocations.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var a=t$X.createIndexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),s={};p$1d.fromRotationTranslation(p$1e.IDENTITY,_0x372e0e,s),this._matModel=s,this._depthCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matModel,boundingVolume:this._boundingSphere,pass:Le$q.S3MTiles,cull:!1}),this._depthCommand.vertexArray=new c$13({context:e,attributes:o,indexBuffer:a}),this._depthCommand.shaderProgram=r$14.fromCache({name:"ClipPlaneDepth",context:e,vertexShaderSource:R$M,fragmentShaderSource:_0x162bd8,attributeLocations:this._attributeLocations}),this._depthCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!0,colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this.createColorCommand(e,t)},_0x597498.prototype.createColorCommand=function(e,t){var i=i$$.shallowClone(this._depthCommand),n=this._depthCommand.shaderProgram.vertexShaderSource.clone();i.shaderProgram=r$14.fromCache({name:"ClipPlaneColor",context:e,vertexShaderSource:n,fragmentShaderSource:_0x2e70eb,attributeLocations:this._attributeLocations});var r=this;i.uniformMap={uClampTexture:function(){var i=t._framebufferList.clampTexture;return e$2e(i)?i.renderTexture._fb.getColorTexture(0):e.defaultTexture},uClipPlaneColor:function(){return r._layer._clipPlaneColor},uUseColor:function(){var e=r._layer._clipPlaneMode;return e===_0x1f23e7.COLOR?1:(_0x1f23e7.MODEL_COLOR,0)}},i.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!0}),i.pass=Le$q.S3MTiles-1,this._colorCommand=i},_0x597498.prototype.setPoints=function(e,t,i){this._initialize=!1,this._firstPoint=e,this._secondPoint=t,this._thirdPoint=i},_0x597498.prototype.destroy=function(){return _0x3b3f51(this._colorCommand),this._colorCommand=void 0,_0x3b3f51(this._depthCommand),this._depthCommand=void 0,i$11(this)};var _0x4700ba=(_0x31f322=!0,function(e,t){var i=_0x31f322?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31f322=!1,i}),_0x9c4c7a=_0x4700ba(void 0,(function(){return _0x9c4c7a.toString().search("(((.+)+)+)+$").toString().constructor(_0x9c4c7a).search("(((.+)+)+)+$")})),_0x31f322;function _0x37a6f4(e){this._enable=!1,this._speed=100,this._period=0,this._layer=e}_0x9c4c7a(),Object.defineProperties(_0x37a6f4.prototype,{enable:{get:function(){return this._enable},set:function(e){e!=this._enable&&(this._enable=e,this._layer.bloomEnableChange(e))}},speed:{get:function(){return this._speed},set:function(e){this._speed=e}},period:{get:function(){return this._period/1e3},set:function(e){this._period=1e3*e}},maxBloomHeight:{get:function(){if(0==this._period)return Number.MAX_VALUE;var e=performance.now()%this._period;return this._speed*e/1e3}}});var _0x5afab0=(_0x44c4fa=!0,function(e,t){var i=_0x44c4fa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x44c4fa=!1,i}),_0x3ddfa3=_0x5afab0(void 0,(function(){return _0x3ddfa3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ddfa3).search("(((.+)+)+)+$")})),_0x44c4fa;function _0x24cbe4(){this._cache={},this._queue=new r$17}_0x3ddfa3();var _0x37c9e4=0,_0x3ffe9d=104857600;_0x24cbe4.prototype.set=function(e,t,i){var n=e+"_"+t;if(!e$2e(this._cache[n])){var r={id:n,buffer:i};for(this._cache[n]=r,this._queue.enqueue(n),_0x37c9e4+=i.byteLength;_0x37c9e4>_0x3ffe9d;){var o=this._queue.dequeue(),a=this._cache[o];_0x37c9e4-=a.buffer.byteLength,delete this._cache[o]}}},_0x24cbe4.prototype.get=function(e,t){var i=e+"_"+t,n=this._cache[i];if(e$2e(n))return n.buffer},_0x24cbe4.prototype.contains=function(e,t){var i=e+"_"+t;return e$2e(this._cache[i])},_0x24cbe4._singleInstance=void 0,_0x24cbe4.getSingleInstance=function(){return e$2e(_0x24cbe4._singleInstance)||(_0x24cbe4._singleInstance=new _0x24cbe4),_0x24cbe4._singleInstance};var e$1b={KeepOutside:1,KeepInside:2},R$L=Object.freeze(e$1b),_0x153f6b=(_0x4776fe=!0,function(e,t){var i=_0x4776fe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4776fe=!1,i}),_0x25401f=_0x153f6b(void 0,(function(){return _0x25401f.toString().search("(((.+)+)+)+$").toString().constructor(_0x25401f).search("(((.+)+)+)+$")})),_0x4776fe;_0x25401f();var Z$K="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nattribute vec2 aTexCoord1;\nvarying float vHeight;\nvarying float regionHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vHeight = aPosition.w;\n vTexCoord0 = aTexCoord0.xy;\n vTexCoord1 = aTexCoord1;\n regionHeight = aTexCoord0.z;\n gl_Position = pos;\n v_positionMC = vec4(aPosition.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\n}",_0x1dec54=(_0x23333c=!0,function(e,t){var i=_0x23333c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23333c=!1,i}),_0x541741=_0x1dec54(void 0,(function(){return _0x541741.toString().search("(((.+)+)+)+$").toString().constructor(_0x541741).search("(((.+)+)+)+$")})),_0x23333c;_0x541741();var $$M="uniform sampler2D uColorTexture;\nuniform sampler2D uRasterTexture;\n#ifdef IsExtract\nuniform float uExtractHeight;\n#endif\nvarying float vHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying float regionHeight;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uRasterTexture, vTexCoord0));\n if(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n }\n if (vHeight > terrainHeight || vHeight < regionHeight) { \n discard;\n }\n#ifdef IsExtract\n if (vHeight < uExtractHeight) { \n discard;\n }\n#endif\n vec4 baseColorWithAlpha = texture2D(uColorTexture, vTexCoord1);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(vTexCoord1.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(vTexCoord1.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, vTexCoord1.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n if(gl_FrontFacing)\n {\n n = -n;\n }\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}";function t$E(e){if(this._renderTexture=new s$M(e),this._context=e,this._isUpdate=!0,this._beginFunc=void 0,this._endFunc=void 0,this._useColor=!0,this._useHeight=!0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!1,isUnderGlobeVisible:!1,isOnlyS3MObjectVisible:!1},!e.webgpu){var t=e._gl,i=e$2e(e._currentFramebuffer)?e._currentFramebuffer._inner._framebuffer:null;e.webgpu||t.bindFramebuffer(t.FRAMEBUFFER,i)}}Object.defineProperties(t$E.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},useType:{get:function(){return this._useHeight<<2|this._useColor<<1|this._isDepth},set:function(e){this._useHeight=(4&e)>0?1:0,this._useColor=(2&e)>0?1:0,this._isDepth=1&e}},frameBufferType:{get:function(){return Qe$c.RASTER}}}),t$E.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._beginFunc&&this._beginFunc(e),this._renderTexture._passState},t$E.prototype.end=function(e){this._endFunc&&this._endFunc(e)},t$E.prototype.update=function(e,t){},t$E.prototype.isDestroyed=function(){return!1},t$E.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)};var e$1a={NONE:0,BITS12:1},ye$j=Object.freeze(e$1a),e$19={NONE:-1,PARTIAL:0,FULL:1},fe$r=Object.freeze(e$19),e$18={DisplayMode:{NONE:0,FACE:1,ARROW:2,FACE_AND_ARROW:3}},_0x25bb47=Object.freeze(e$18),e$17={NONE:0,LERC:1},T$N=Object.freeze(e$17);function s$H(e,t){o$1q.typeOf.object("ellipsoid",e),this._ellipsoid=e,this._cameraPosition=new o$1p,this._cameraPositionInScaledSpace=new o$1p,this._distanceToLimbInScaledSpaceSquared=0,e$2e(t)&&(this.cameraPosition=t)}Object.defineProperties(s$H.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){var t=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=o$1p.magnitudeSquared(t)-1;o$1p.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=t,this._distanceToLimbInScaledSpaceSquared=i}}});var _$I=new o$1p;s$H.prototype.isPointVisible=function(e){return h$N(this._ellipsoid.transformPositionToScaledSpace(e,_$I),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},s$H.prototype.isScaledSpacePointVisible=function(e){return h$N(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var w$L=new o$1p;s$H.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){var i,n,r=this._ellipsoid;return e$2e(t)&&t<0&&r.minimumRadius>-t?((n=w$L).x=this._cameraPosition.x/(r.radii.x+t),n.y=this._cameraPosition.y/(r.radii.y+t),n.z=this._cameraPosition.z/(r.radii.z+t),i=n.x*n.x+n.y*n.y+n.z*n.z-1):(n=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),h$N(e,n,i)},s$H.prototype.computeHorizonCullingPoint=function(e,t,i){return q$R(this._ellipsoid,e,t,i)};var b$Y=t$12.clone(t$12.UNIT_SPHERE);s$H.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,i,n){return q$R(z$L(this._ellipsoid,i,b$Y),e,t,n)},s$H.prototype.computeHorizonCullingPointFromVertices=function(e,t,i,n,r){return E$Q(this._ellipsoid,e,t,i,n,r)},s$H.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,i,n,r,o){return E$Q(z$L(this._ellipsoid,r,b$Y),e,t,i,n,o)};var O$B=[];s$H.prototype.computeHorizonCullingPointFromRectangle=function(e,t,i){o$1q.typeOf.object("rectangle",e);var n=h$18.subsample(e,t,0,O$B),r=i$1d.fromPoints(n);if(!(o$1p.magnitude(r.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(r.center,n,i)};var R$K=new o$1p;function z$L(e,t,i){if(e$2e(t)&&t<0&&e.minimumRadius>-t){var n=o$1p.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,R$K);e=t$12.fromCartesian3(n,i)}return e}function q$R(e,t,i,n){o$1q.typeOf.object("directionToPoint",t),o$1q.defined("positions",i),e$2e(n)||(n=new o$1p);for(var r=C$S(e,t),o=0,a=0,s=i.length;a<s;++a){var l=g$U(e,i[a],r);if(l<0)return;o=Math.max(o,l)}return x$T(r,o,n)}var m$Q=new o$1p;function E$Q(e,t,i,n,r,o){o$1q.typeOf.object("directionToPoint",t),o$1q.defined("vertices",i),o$1q.typeOf.number("stride",n),e$2e(o)||(o=new o$1p),n=u$Z(n,3),r=u$Z(r,o$1p.ZERO);for(var a=C$S(e,t),s=0,l=0,u=i.length;l<u;l+=n){m$Q.x=i[l]+r.x,m$Q.y=i[l+1]+r.y,m$Q.z=i[l+2]+r.z;var c=g$U(e,m$Q,a);if(c<0)return;s=Math.max(s,c)}return x$T(a,s,o)}function h$N(e,t,i){var n=t,r=i,o=o$1p.subtract(e,n,_$I),a=-o$1p.dot(o,n);return!(r<0?a>0:a>r&&a*a/o$1p.magnitudeSquared(o)>r)}var V$I=new o$1p,k$L=new o$1p;function g$U(e,t,i){var n=e.transformPositionToScaledSpace(t,V$I),r=o$1p.magnitudeSquared(n),o=Math.sqrt(r),a=o$1p.divideByScalar(n,o,k$L);r=Math.max(1,r);var s=1/(o=Math.max(1,o));return 1/(o$1p.dot(a,i)*s-o$1p.magnitude(o$1p.cross(a,i,a))*(Math.sqrt(r-1)*s))}function x$T(e,t,i){if(!(t<=0||t===1/0||t!=t))return o$1p.multiplyByScalar(e,t,i)}var P$L=new o$1p;function C$S(e,t){return o$1p.equals(t,o$1p.ZERO)?t:(e.transformPositionToScaledSpace(t,P$L),o$1p.normalize(P$L,P$L))}var N$H=new o$1p,B$K=new o$1p,c$O=new o$1o,M$P=new p$1d,I$Z=new p$1d,g$T=Math.pow(2,12);function h$M(e,t,i,n,r,o){var a,s,l,u=ye$j.NONE;if(e$2e(e)&&e$2e(t)&&e$2e(i)&&e$2e(n)){var c=e.minimum,h=e.maximum,d=o$1p.subtract(h,c,B$K),f=i-t;u=Math.max(o$1p.maximumComponent(d),f)<g$T-1?ye$j.BITS12:ye$j.NONE,u=ye$j.NONE,a=e.center,s=p$1d.inverseTransformation(n,new p$1d);var p=o$1p.negate(c,N$H);p$1d.multiply(p$1d.fromTranslation(p,M$P),s,s);var _=N$H;_.x=1/d.x,_.y=1/d.y,_.z=1/d.z,p$1d.multiply(p$1d.fromScale(_,M$P),s,s),l=p$1d.clone(n),p$1d.setTranslation(l,o$1p.ZERO,l),n=p$1d.clone(n,new p$1d);var m=p$1d.fromTranslation(c,M$P),g=p$1d.fromScale(d,I$Z),x=p$1d.multiply(m,g,M$P);p$1d.multiply(n,x,n),p$1d.multiply(l,x,l)}this.quantization=u,this.minimumHeight=t,this.maximumHeight=i,this.center=a,this.toScaledENU=s,this.fromScaledENU=n,this.matrix=l,this.hasVertexNormals=r,this.hasWebMercatorT=u$Z(o,!1)}h$M.prototype.encode=function(e,t,i,n,r,o,a){var s=n.x,l=n.y;if(this.quantization===ye$j.BITS12){(i=p$1d.multiplyByPoint(this.toScaledENU,i,N$H)).x=e$2d.clamp(i.x,0,1),i.y=e$2d.clamp(i.y,0,1),i.z=e$2d.clamp(i.z,0,1);var u=this.maximumHeight-this.minimumHeight,c=e$2d.clamp((r-this.minimumHeight)/u,0,1);o$1o.fromElements(i.x,i.y,c$O);var h=t$$.compressTextureCoordinates(c$O);o$1o.fromElements(i.z,c,c$O);var d=t$$.compressTextureCoordinates(c$O);o$1o.fromElements(s,l,c$O);var f=t$$.compressTextureCoordinates(c$O);if(e[t++]=h,e[t++]=d,e[t++]=f,this.hasWebMercatorT){o$1o.fromElements(a,0,c$O);var p=t$$.compressTextureCoordinates(c$O);e[t++]=p}}else o$1p.subtract(i,this.center,N$H),e[t++]=N$H.x,e[t++]=N$H.y,e[t++]=N$H.z,e[t++]=r,e[t++]=s,e[t++]=l,this.hasWebMercatorT&&(e[t++]=a);return this.hasVertexNormals&&(e[t++]=t$$.octPackFloat(o)),t},h$M.prototype.decodePosition=function(e,t,i){if(e$2e(i)||(i=new o$1p),t*=this.getStride(),this.quantization===ye$j.BITS12){var n=t$$.decompressTextureCoordinates(e[t],c$O);i.x=n.x,i.y=n.y;var r=t$$.decompressTextureCoordinates(e[t+1],c$O);return i.z=r.x,p$1d.multiplyByPoint(this.fromScaledENU,i,i)}return i.x=e[t],i.y=e[t+1],i.z=e[t+2],o$1p.add(i,this.center,i)},h$M.prototype.decodeTextureCoordinates=function(e,t,i){return e$2e(i)||(i=new o$1o),t*=this.getStride(),this.quantization===ye$j.BITS12?t$$.decompressTextureCoordinates(e[t+2],i):o$1o.fromElements(e[t+4],e[t+5],i)},h$M.prototype.decodeHeight=function(e,t){return t*=this.getStride(),this.quantization===ye$j.BITS12?t$$.decompressTextureCoordinates(e[t+1],c$O).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]},h$M.prototype.decodeWebMercatorT=function(e,t){return t*=this.getStride(),this.quantization===ye$j.BITS12?t$$.decompressTextureCoordinates(e[t+3],c$O).x:e[t+6]},h$M.prototype.getOctEncodedNormal=function(e,t,i){var n=e[t=(t+1)*this.getStride()-1]/256,r=Math.floor(n),o=256*(n-r);return o$1o.fromElements(r,o,i)},h$M.prototype.getStride=function(){var e;if(this.quantization===ye$j.BITS12)e=3;else e=6;return this.hasWebMercatorT&&++e,this.hasVertexNormals&&++e,e};var H$Q={position3DAndHeight:0,textureCoordAndEncodedNormals:1},F$P={compressed0:0,compressed1:1};h$M.prototype.getAttributes=function(e){var t,i=S$14.FLOAT,n=S$14.getSizeInBytes(i);if(this.quantization===ye$j.NONE){var r=2;this.hasWebMercatorT&&++r,this.hasVertexNormals&&++r,t=(4+r)*n;var o=[{index:H$Q.position3DAndHeight,name:"position3DAndHeight",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:4,offsetInBytes:0,strideInBytes:t},{index:H$Q.textureCoordAndEncodedNormals,name:"textureCoordAndEncodedNormals",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:r,offsetInBytes:4*n,strideInBytes:t}];return o}var a=3,s=0;return(this.hasWebMercatorT||this.hasVertexNormals)&&++a,this.hasWebMercatorT&&this.hasVertexNormals?(t=(a+ ++s)*n,[{index:o.compressed0,name:"compressed0",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a,offsetInBytes:0,strideInBytes:t},{index:o.compressed1,name:"compressed1",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:s,offsetInBytes:a*n,strideInBytes:t}]):[{index:o.compressed0,name:"compressed0",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a}]},h$M.prototype.getAttributeLocations=function(){return this.quantization===ye$j.NONE?H$Q:F$P},h$M.clone=function(e,t){return e$2e(t)||(t=new h$M),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=o$1p.clone(e.center),t.toScaledENU=p$1d.clone(e.toScaledENU),t.fromScaledENU=p$1d.clone(e.fromScaledENU),t.matrix=p$1d.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t};var m$P={};m$P.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var lr$7=new o$1p,sa$4=new p$1d,ua$3=new o$1p,Ta$3=new o$1p;function T$M(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x){this.center=e,this.vertices=t,this.stride=u$Z(u,6),this.indexCountWithoutSkirts=n,this.vertexCountWithoutSkirts=r,this.indices=i,this.minimumHeight=o,this.maximumHeight=a,this.boundingSphere3D=s,this.occludeePointInScaledSpace=l,this.orientedBoundingBox=c,this.validOrientedBoundingBox=x,this.encoding=h,this.exaggeration=d,this.westIndicesSouthToNorth=f,this.southIndicesEastToWest=p,this.eastIndicesNorthToSouth=_,this.northIndicesWestToEast=m,this.invalid=u$Z(g,!1)}function T$L(e){if(!e$2e(e)||!e$2e(e.buffer))throw new t$15("options.buffer is required.");if(!e$2e(e.width))throw new t$15("options.width is required.");if(!e$2e(e.height))throw new t$15("options.height is required.");this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=u$Z(e.childTileMask,15),this._encoding=u$Z(e.encoding,T$N.NONE),this._valid=u$Z(e.valid,!0),e$2e(e.childTileMaskExt)&&(this._childTileMaskExt=e.childTileMaskExt,this._level=e.level,this._x=e.x,this._y=e.y);var t=m$P.DEFAULT_STRUCTURE,i=e.structure;e$2e(i)?i!==t&&(i.heightScale=u$Z(i.heightScale,t.heightScale),i.heightOffset=u$Z(i.heightOffset,t.heightOffset),i.elementsPerHeight=u$Z(i.elementsPerHeight,t.elementsPerHeight),i.stride=u$Z(i.stride,t.stride),i.elementMultiplier=u$Z(i.elementMultiplier,t.elementMultiplier),i.isBigEndian=u$Z(i.isBigEndian,t.isBigEndian)):i=t,this._structure=i,this._createdByUpsampling=u$Z(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===T$N.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0,this._skirtMode=u$Z(e.skirtMode,!0),this._skirtScale=u$Z(e.skirtScale,.1),this._releaseBuffer=!0,e$2e(e.releaseBuffer)&&(this._releaseBuffer=e.releaseBuffer),this._normalTexture=e.normalTexture}m$P.computeVertices=function(e){if(!e$2e(e)||!e$2e(e.heightmap))throw new t$15("options.heightmap is required.");if(!e$2e(e.width)||!e$2e(e.height))throw new t$15("options.width and options.height are required.");if(!e$2e(e.nativeRectangle))throw new t$15("options.nativeRectangle is required.");if(!e$2e(e.skirtHeight))throw new t$15("options.skirtHeight is required.");var t,i,n,r,o=Math.cos,a=Math.sin,s=Math.sqrt,l=Math.atan,u=Math.exp,c=e$2d.PI_OVER_TWO,h=e$2d.toRadians,d=e.heightmap,f=e.width,p=e.height,_=e.skirtHeight,m=u$Z(e.isGeographic,!0),g=u$Z(e.ellipsoid,t$12.WGS84),x=1/g.maximumRadius,y=e.nativeRectangle,v=e.rectangle;e$2e(v)?(t=v.west,i=v.south,n=v.east,r=v.north):m?(t=h(y.west),i=h(y.south),n=h(y.east),r=h(y.north)):(t=y.west*x,i=c-2*l(u(-y.south*x)),n=y.east*x,r=c-2*l(u(-y.north*x)));var $=e.relativeToCenter,b=e$2e($);$=b?$:o$1p.ZERO;var T=u$Z(e.exaggeration,1),C=u$Z(e.includeWebMercatorT,!1),S=u$Z(e.structure,m$P.DEFAULT_STRUCTURE),w=u$Z(S.heightScale,m$P.DEFAULT_STRUCTURE.heightScale),E=u$Z(S.heightOffset,m$P.DEFAULT_STRUCTURE.heightOffset),P=u$Z(S.elementsPerHeight,m$P.DEFAULT_STRUCTURE.elementsPerHeight),A=u$Z(S.stride,m$P.DEFAULT_STRUCTURE.stride),L=u$Z(S.elementMultiplier,m$P.DEFAULT_STRUCTURE.elementMultiplier),M=u$Z(S.isBigEndian,m$P.DEFAULT_STRUCTURE.isBigEndian),R=h$18.computeWidth(y),O=h$18.computeHeight(y),D=R/(f-1),I=O/(p-1);m||(R*=x,O*=x);var F,B,N=g.radiiSquared,G=N.x,z=N.y,U=N.z,V=65536,k=-65536,W=m$19.eastNorthUpToFixedFrame($,g),H=p$1d.inverseTransformation(W,sa$4);C&&(F=t$N.geodeticLatitudeToMercatorAngle(i),B=1/(t$N.geodeticLatitudeToMercatorAngle(r)-F));var q=ua$3;q.x=Number.POSITIVE_INFINITY,q.y=Number.POSITIVE_INFINITY,q.z=Number.POSITIVE_INFINITY;var j=Ta$3;j.x=Number.NEGATIVE_INFINITY,j.y=Number.NEGATIVE_INFINITY,j.z=Number.NEGATIVE_INFINITY;var X=Number.POSITIVE_INFINITY,Y=f*p,Z=Y+(_>0?2*f+2*p:0),K=new Array(Z),Q=new Array(Z),J=new Array(Z),ee=C?new Array(Z):[],te=0,ie=p,ne=0,re=f;_>0&&(--te,++ie,--ne,++re);for(var oe=1e-5,ae=te;ae<ie;++ae){var se=ae;se<0&&(se=0),se>=p&&(se=p-1);var le=y.north-I*se,ue=((le=m?h(le):c-2*l(u(-le*x)))-i)/(r-i);ue=e$2d.clamp(ue,0,1);var ce=ae===te,he=ae===ie-1;_>0&&(ce?le+=oe*O:he&&(le-=oe*O));var de,fe=o(le),pe=a(le),_e=U*pe;C&&(de=(t$N.geodeticLatitudeToMercatorAngle(le)-F)*B);for(var me=ne;me<re;++me){var ge=me;ge<0&&(ge=0),ge>=f&&(ge=f-1);var xe,ye,ve=se*(f*A)+ge*A;if(1===P)xe=d[ve];else if(xe=0,M)for(ye=0;ye<P;++ye)xe=xe*L+d[ve+ye];else for(ye=P-1;ye>=0;--ye)xe=xe*L+d[ve+ye];xe=(xe*w+E)*T,k=Math.max(k,xe),V=Math.min(V,xe);var $e=y.west+D*ge;m?$e=h($e):$e*=x;var be=($e-t)/(n-t);be=e$2d.clamp(be,0,1);var Te=se*f+ge;if(_>0){var Ce=me===ne,Se=me===re-1,we=ce||he||Ce||Se;if((ce||he)&&(Ce||Se))continue;we&&(xe-=_,Ce?(Te=Y+(p-se-1),$e-=oe*R):he?Te=Y+p+(f-ge-1):Se?(Te=Y+p+f+se,$e+=oe*R):ce&&(Te=Y+p+f+p+ge))}var Ee=fe*o($e),Pe=fe*a($e),Ae=G*Ee,Le=z*Pe,Me=1/s(Ae*Ee+Le*Pe+_e*pe),Re=Ae*Me,Oe=Le*Me,De=_e*Me,Ie=new o$1p;Ie.x=Re+Ee*xe,Ie.y=Oe+Pe*xe,Ie.z=De+pe*xe,K[Te]=Ie,Q[Te]=xe,J[Te]=new o$1o(be,ue),C&&(ee[Te]=de),p$1d.multiplyByPoint(H,Ie,lr$7),o$1p.minimumByComponent(lr$7,q,q),o$1p.maximumByComponent(lr$7,j,j),X=Math.min(X,xe)}}var Fe,Be,Ne=i$1d.fromPoints(K);(e$2e(v)&&(Fe=y$Y.fromRectangle(v,V,k,g)),b)&&(Be=new s$H(g).computeHorizonCullingPointPossiblyUnderEllipsoid($,K,V));for(var Ge=new h$M(new e$29(q,j,$),X,k,W,!1,C),ze=new Float32Array(Z*Ge.getStride()),Ue=0,Ve=0;Ve<Z;++Ve)Ue=Ge.encode(ze,Ue,K[Ve],J[Ve],Q[Ve],void 0,ee[Ve]);return{vertices:ze,maximumHeight:k,minimumHeight:V,encoding:Ge,boundingSphere3D:Ne,orientedBoundingBox:Fe,occludeePointInScaledSpace:Be}},Object.defineProperties(T$L.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return e$2e(this._mesh)}},normalTexture:{get:function(){return this._normalTexture}}});var Q$N=new i$W("createVerticesFromHeightmap");T$L.prototype.createMesh=function(e,t,i,n,r){if(!e$2e(e))throw new t$15("tilingScheme is required.");if(!e$2e(t))throw new t$15("x is required.");if(!e$2e(i))throw new t$15("y is required.");if(!e$2e(n))throw new t$15("level is required.");var o=e.ellipsoid,a=e.tileXYToNativeRectangle(t,i,n),s=e.tileXYToRectangle(t,i,n);r=u$Z(r,1);var l=o.cartographicToCartesian(h$18.center(s)),u=this._structure,c=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<n);if(this._skirtMode)if(e.isSct){var h=Math.min.apply(null,this._buffer),d=Math.max.apply(null,this._buffer);this._skirtHeight=this._skirtScale*(d-h),0===this._skirtHeight&&(this._skirtHeight=Math.min(4*c,1e3))}else this._skirtHeight=Math.min(4*c,1e3);else this._skirtHeight=0;var f=Q$N.scheduleTask({heightmap:this._buffer,structure:u,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:a,rectangle:s,relativeToCenter:l,ellipsoid:o,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof n$1d,exaggeration:r,encoding:this._encoding});if(e$2e(f)){var p=this;return o$1l(f,(function(e){var t;t=p._skirtHeight>0?I$12.getRegularGridAndSkirtIndicesAndEdgeIndices(e.gridWidth,e.gridHeight):I$12.getRegularGridIndicesAndEdgeIndices(e.gridWidth,e.gridHeight);var i=e.gridWidth*e.gridHeight;return p._mesh=new T$M(l,new Float32Array(e.vertices),t.indices,t.indexCountWithoutSkirts,i,e.minimumHeight,e.maximumHeight,i$1d.clone(e.boundingSphere3D),o$1p.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,y$Y.clone(e.orientedBoundingBox),h$M.clone(e.encoding),r,t.westIndicesSouthToNorth,t.southIndicesEastToWest,t.eastIndicesNorthToSouth,t.northIndicesWestToEast),p._buffer=void 0,p._mesh}))}},T$L.prototype._createMeshSync=function(e,t,i,n,r){if(!e$2e(e))throw new t$15("tilingScheme is required.");if(!e$2e(t))throw new t$15("x is required.");if(!e$2e(i))throw new t$15("y is required.");if(!e$2e(n))throw new t$15("level is required.");var o=e.ellipsoid,a=e.tileXYToNativeRectangle(t,i,n),s=e.tileXYToRectangle(t,i,n);r=u$Z(r,1);var l=o.cartographicToCartesian(h$18.center(s)),u=this._structure,c=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<n);this._skirtHeight=Math.min(4*c,1e3);var h,d=m$P.computeVertices({heightmap:this._buffer,structure:u,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:a,rectangle:s,relativeToCenter:l,ellipsoid:o,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof n$1d,exaggeration:r});this._buffer=void 0,h=this._skirtHeight>0?I$12.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):I$12.getRegularGridIndicesAndEdgeIndices(this._width,this._height);var f=d.gridWidth*d.gridHeight;return new T$M(l,d.vertices,h.indices,h.indexCountWithoutSkirts,f,d.minimumHeight,d.maximumHeight,d.boundingSphere3D,d.occludeePointInScaledSpace,d.encoding.getStride(),d.orientedBoundingBox,d.encoding,r,h.westIndicesSouthToNorth,h.southIndicesEastToWest,h.eastIndicesNorthToSouth,h.northIndicesWestToEast)},T$L.prototype.interpolateHeight=function(e,t,i){var n,r=this._width,o=this._height,a=this._structure,s=a.stride,l=a.elementsPerHeight,u=a.elementMultiplier,c=a.isBigEndian,h=a.heightOffset,d=a.heightScale;e$2e(this._mesh)?n=G$Y(this._mesh.vertices,this._mesh.encoding,h,d,e,r,o,t,i,this._mesh.exaggeration):n=(n=ee$t(this._buffer,l,u,s,c,e,r,o,t,i))*d+h;return n};var y$L=33,$$L=new Float32Array(y$L*y$L);function ee$t(e,t,i,n,r,o,a,s,l,u){var c=(l-o.west)*(a-1)/(o.east-o.west),h=(u-o.south)*(s-1)/(o.north-o.south),d=0|c,f=d+1;f>=a&&(f=a-1,d=a-2);var p=0|h,_=p+1;return _>=s&&(_=s-1,p=s-2),_=s-1-_,D$N(c-d,h-p,A$V(e,t,i,n,r,(p=s-1-p)*a+d),A$V(e,t,i,n,r,p*a+f),A$V(e,t,i,n,r,_*a+d),A$V(e,t,i,n,r,_*a+f))}function G$Y(e,t,i,n,r,o,a,s,l,u){var c=(s-r.west)*(o-1)/(r.east-r.west),h=(l-r.south)*(a-1)/(r.north-r.south),d=0|c,f=d+1;f>=o&&(f=o-1,d=o-2);var p=0|h,_=p+1;_>=a&&(_=a-1,p=a-2);var m=h-p;return p=a-1-p,_=a-1-_,D$N(c-d,m,(t.decodeHeight(e,p*o+d)/u-i)/n,(t.decodeHeight(e,p*o+f)/u-i)/n,(t.decodeHeight(e,_*o+d)/u-i)/n,(t.decodeHeight(e,_*o+f)/u-i)/n)}function D$N(e,t,i,n,r,o){return t<e?i+e*(n-i)+t*(o-n):i+e*(o-r)+t*(r-i)}function A$V(e,t,i,n,r,o){o*=n;var a,s=0;if(r)for(a=0;a<t;++a)s=s*i+e[o+a];else for(a=t-1;a>=0;--a)s=s*i+e[o+a];return s}function re$B(e,t,i,n,r,o,a,s){var l;if(a*=r,o)for(l=0;l<t-1;++l)e[a+l]=s/n|0,s-=e[a+l]*n,n/=i;else for(l=t-1;l>0;--l)e[a+l]=s/n|0,s-=e[a+l]*n,n/=i;e[a+l]=s}function r$R(){this.head=void 0,this.tail=void 0,this.count=0}function t$D(e,t){var i=t.previous,n=t.next;t===e.head?e.head=n:i.next=n,t===e.tail?e.tail=i:n.previous=i,t.previous=void 0,t.next=void 0,--e.count}function se$r(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).urls))throw new t$15("options.urls is required.");this._urls=e.urls;for(var t=0;t<this._urls.length;t++)this._urls[t].length>0&&"/"!==this._urls[t][this._urls[t].length-1]&&(this._urls[t]+="/");var i=e.urls[0].indexOf("wmts100");this._useConfigFile=u$Z(e.useConfigFile,!0),this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer(),this._isCreateSkirt=e.isCreateSkirt,this._skirtScale=e.skirtScale,this._isSkirtDirty=!1,this._proxy=e.proxy,this._terrainDataStructure={heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1};var n=e.credit;"string"==typeof n&&(n=new r$U({text:n})),this._credit=n,this._tilingScheme=void 0,this._rectangles=[],this._levels=[],this._compressType="NONE",this._quadtree=void 0,this._packingRequest=e.packingRequest,this._combiInfo={},this._isBlock=!1,this._blockCache={},this._blockCacheQueue=new r$R,this._blockCacheSize=100,this._blockScale=0;var r,o=this,a=u$Z(e.ellipsoid,t$12.WGS84);this._hasNormalBuffer=!1,this._requestVertexNormals=u$Z(e.requestVertexNormals,!1);var s=0;function l(e){if(1===parseFloat(e.getElementsByTagName("sml:Version")[0].textContent)){var t=e.getElementsByTagName("sml:StoreType",void 0);o._blockScale=t[0].getAttribute("BlockScale"),e$2e(o._blockScale)&&o._blockScale>0&&(o._isBlock=!0)}o._compressType=e.getElementsByTagName("sml:CompressType")[0].textContent,o._heightmapWidth=parseInt(e.getElementsByTagName("sml:CellWidth")[0].textContent),o._heightmapHeight=parseInt(e.getElementsByTagName("sml:CellHeight")[0].textContent),o._tilingScheme=new g$15({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,2*Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0));var i=e.getElementsByTagName("sml:Bounds")[0],n=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Left")[0].textContent)),r=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Bottom")[0].textContent)),u=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Right")[0].textContent)),h=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Top")[0].textContent));o._rectangles.push(new h$18(n,r,u,h));for(var d=e.getElementsByTagName("sml:Levels")[0].getElementsByTagName("sml:Level"),f=[],p=0;p<d.length;++p){var _=d[p];f.push(parseInt(_.textContent))}if(o._levels.push(f),o._ready=!0,o._readyPromise.resolve(!0),s<o._urls.length){var m=o._urls[s++],g=m.substring(0,m.length-1),x=m+"config";e$2e(a$O.CREDENTIAL)&&(x=e$2e(a$O.CREDENTIAL._keymap[g])?a$O.addTokenWithKey(g,x):a$O.addToken(x)),o$1l(d$1f(x),l,c)}}function u(t){var i=(new s$T).read(t).documentElement,n=s$T.queryFirstNode(i,"Contents",void 0),r=s$T.queryFirstNode(n,"Layer",void 0);o._tempLayerName=s$T.queryStringValue(r,"Title",void 0);var h=s$T.queryFirstNode(n,"TileMatrixSet",void 0);o._wmtstileMatrixSet=s$T.queryStringValue(h,"Identifier",void 0);var d=s$T.queryFirstNode(r,"BoundingBox",void 0),f=s$T.queryStringValue(d,"LowerCorner",void 0),p=s$T.queryStringValue(d,"UpperCorner",void 0),_=f.split(" "),m=p.split(" "),g=parseFloat(_[0]),x=parseFloat(m[0]),y=parseFloat(_[1]),v=parseFloat(m[1]);g&&x&&y&&v&&o._rectangles.push(new h$18(g,y,x,v));var $=s$T.queryFirstNode(n,"TileMatrixSet",void 0),b=(h=s$T.queryChildNodes($,"TileMatrix",void 0),s$T.queryNumericValue(h[0],"ScaleDenominator",void 0)),T=s$T.queryNumericValue(h[h.length-1],"ScaleDenominator",void 0),C=s$T.queryNumericValue(h[0],"Identifier",void 0);b=1/b,T=1/T;var S=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],w=S.indexOf(b),E=S.indexOf(T);for(let e=0;e<S.length;e++)b>S[e]&&S[e+1]&&b<S[e+1]&&(w=e-1),T>S[e]&&S[e+1]&&T<S[e+1]&&(E=e-1);w=Math.max(w,0),o.wmts_sub=u$Z(w-C,0);for(var P=[],A=w;A<=E;A++)P.push(A);if(o._levels.push(P),e.blockscale>0&&(o._blockScale=1*e.blockscale,o._isBlock=!0),o._compressType="ZIP",o._heightmapWidth=e.cellWidth||32,o._heightmapHeight=e.cellHeight||32,o._tilingScheme=new g$15({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,2*Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0)),o._ready=!0,o._readyPromise.resolve(!0),s<o._urls.length){var L=o._urls[s++];if(-1!==L.indexOf("wmts100")){o$1l(u$Q(R=L+"1.0.0/WMTSCapabilities.xml"),u,c)}else{var M=L.substring(0,L.length-1),R=L+"config";e$2e(a$O.CREDENTIAL)&&(R=e$2e(a$O.CREDENTIAL._keymap[M])?a$O.addTokenWithKey(M,R):a$O.addToken(R)),o$1l(d$1f(R),l,c)}}}function c(e){var t=u$Z(e,"An error occurred while accessing "+o._url+".");r=l$V.handleError(r,o,o._errorEvent,t,void 0,void 0,void 0,h)}function h(){if(!e$2e(e.rectangles)||!e$2e(e.levels))throw new t$15("options.rectangles,options.levels is required.");o._compressType=u$Z(e.compressType,"ZIP"),o._heightmapWidth=u$Z(e.heightmapWidth,32),o._heightmapHeight=u$Z(e.heightmapHeight,32),o._tilingScheme=new g$15({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0)),o._rectangles=e.rectangles,o._levels=e.levels,o._ready=!0,o._readyPromise.resolve(!0)}this._useConfigFile?function(){if(-1!==i){o$1l(u$Q(n=(e=o._urls[s++])+"1.0.0/WMTSCapabilities.xml"),u,c)}else{var e,t=(e=o._urls[s++]).substring(0,e.length-1),n=e+"config";e$2e(a$O.CREDENTIAL)&&(n=e$2e(a$O.CREDENTIAL._keymap[t])?a$O.addTokenWithKey(t,n):a$O.addToken(n)),o$1l(d$1f(n),l,c)}}():h()}function qe$b(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function Me$m(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(t>r-1)throw new t$15("pack imagery index invalid");n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e,n,a);n+=a}}function Re$j(e,t,i,n){var r=Math.min(e._blockScale,n),o=Math.pow(2,r),a=t%o;return{x:Math.floor(t/o),y:Math.floor(i/o),col:a,row:i%o,level:n,blockSize:o}}function We$g(e,t){var i=new DataView(e),n=0;i.getUint32(n,!0),n+=4;var r=i.getUint32(n,!0);n+=4;for(var o=t.col,a=t.row*t.blockSize+o,s=0,l=0,u=0;u<r;u++){if(u<a)s+=i.getUint32(n,!0);else if(u===a){l=i.getUint32(n,!0),n+=4;break}n+=4}if(n=8+4*r,0!==l)return n+=s,new Uint8Array(e).slice(n,n+l).buffer}T$L.prototype.upsample=function(e,t,i,n,r,o,a){if(!e$2e(e))throw new t$15("tilingScheme is required.");if(!e$2e(t))throw new t$15("thisX is required.");if(!e$2e(i))throw new t$15("thisY is required.");if(!e$2e(n))throw new t$15("thisLevel is required.");if(!e$2e(r))throw new t$15("descendantX is required.");if(!e$2e(o))throw new t$15("descendantY is required.");if(!e$2e(a))throw new t$15("descendantLevel is required.");if(a-n>1)throw new t$15("Upsampling through more than one level at a time is not currently supported.");if(!this._valid){var s=16,l=16;return new T$L({buffer:new Uint8Array(s*l),width:s,height:l,skirtMode:this._skirtMode,skirtScale:this._skirtScale,childTileMask:0,structure:this._structure,createdByUpsampling:!0,valid:!1})}var u=this._mesh;if(e$2e(u)){s=this._width,l=this._height;e$2e(this._valid)&&!this._valid&&(s=Math.max(Math.floor(.5*this._width+1),y$L),l=Math.max(Math.floor(.5*this._height+1),y$L));for(var c=this._structure,h=c.stride,d=new this._bufferType(s*l*h),f=u.vertices,p=u.encoding,_=e.tileXYToRectangle(t,i,n),m=e.tileXYToRectangle(r,o,a),g=c.heightOffset,x=c.heightScale,y=u.exaggeration,v=c.elementsPerHeight,$=c.elementMultiplier,b=c.isBigEndian,T=Math.pow($,v-1),C=0;C<l;++C)for(var S=e$2d.lerp(m.north,m.south,C/(l-1)),w=0;w<s;++w){var E=G$Y(f,p,g,x,_,s,l,e$2d.lerp(m.west,m.east,w/(s-1)),S,y);re$B(d,v,$,T,h,b,C*s+w,E=(E=E<c.lowestEncodedHeight?c.lowestEncodedHeight:E)>c.highestEncodedHeight?c.highestEncodedHeight:E)}if(!this._structure.isBigEndian){var P=!1;for(w=0;w<d.length;w++)if(Math.abs(d[w])>e$2d.EPSILON3){P=!0;break}P||(l=y$L,s=y$L,d=$$L)}return new T$L({buffer:d,width:s,height:l,skirtMode:this._skirtMode,skirtScale:this._skirtScale,childTileMask:0,structure:this._structure,createdByUpsampling:!0,valid:this._valid})}},T$L.prototype.isChildAvailable=function(e,t,i,n){if(!e$2e(e))throw new t$15("thisX is required.");if(!e$2e(t))throw new t$15("thisY is required.");if(!e$2e(i))throw new t$15("childX is required.");if(!e$2e(n))throw new t$15("childY is required.");var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},T$L.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling},r$R.prototype.trim=function(e){for(var t=this.tail;this.count>e&&e$2e(t);){var i=t.previous;t.free(),t$D(this,t),t=i}},r$R.prototype.touch=function(e){var t=this.head;if(t!==e){if(++this.count,!e$2e(t))return e.previous=void 0,e.next=void 0,this.head=e,void(this.tail=e);(e$2e(e.previous)||e$2e(e.next))&&t$D(this,e),e.previous=void 0,e.next=t,t.previous=e,this.head=e}},Object.defineProperties(se$r.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$15("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}},skirtScale:{get:function(){return this._skirtScale},set:function(e){e!==this._skirtScale&&(this._isSkirtDirty=!0),this._skirtScale=e}},hasNormalBuffer:{get:function(){return this._hasNormalBuffer}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}}}),se$r.prototype.division=function(e,t,i,n,r){for(var o=[],a=0;a<r;a++)for(var s=0;s<r;s++){var l=(i+n*(r-1-a)/(r-1))*(r-1),u=(t+n*s/(r-1))*(r-1),c=Math.floor(l),h=Math.ceil(l),d=Math.floor(u),f=Math.ceil(u),p=e[(r-1-c)*r+d],_=e[(r-1-c)*r+f],m=e[(r-1-h)*r+d],g=e[(r-1-h)*r+f],x=m*(l-c)+p*(h-l),y=g*(l-c)+_*(h-l);c===h&&(x=m,y=g);var v=y*(u-d)+x*(f-u);d===f&&(v=y),o[a*r+s]=v}return o};var ue$t=new h$18;function Qe$9(e,t,i,n,r){if(null!=e){for(var o=new Uint8Array(t*i*3),a=6378137,s=n.width,l=n.height,u=e,c=0;c<t;c++)for(var h=0;h<i;h++){var d=h*t+c;u[h*t+c];var f=c,p=h;r>13&&(c=(c=0==c?c+1:c)==t-1?t-2:c,h=(h=0==h?h+1:h)==i-1?i-2:h);var _=Math.max(c-1,0),m=h,g=u[m*t+_],x=u[(m=h)*t+(_=Math.min(c+1,t-1))];_=c;var y=u[(m=Math.min(h+1,i-1))*t+_];_=c;var v=u[(m=Math.max(h-1,0))*t+_];c=f,h=p;var $=n.south+l*(512-2*h-1)/512,b=new o$1p((g-x)/(a*Math.cos($)*s/t),(v-y)/(a*l/i),2);o$1p.normalize(b,b),o[3*d+0]=255*(.5*b.x+.5),o[3*d+1]=255*(.5*b.y+.5),o[3*d+2]=255*(.5*b.z+.5)}return o}}se$r.prototype.requestTileGeometry=function(e,t,i,n,r){if(!this.ready)throw new t$15("requestTileGeometry must not be called before ready returns true.");if(0===i){var o=new Array(this._heightmapWidth*this._heightmapHeight);return o.fill(0),this._hasNormalBuffer=!1,new T$L({buffer:o,width:this._heightmapWidth,height:this._heightmapHeight,skirtMode:this._isCreateSkirt,skirtScale:this._skirtScale,childTileMask:Ie$h(this,e,t,i),structure:this._terrainDataStructure,valid:!1})}var a=[],s=this._tilingScheme.tileXYToRectangle(e,t,i),l=this,u=!1,c=this._rectangles.length-1,h=this._levels[c][this._levels[c].length-1];c=0;var d=this._levels[c][this._levels[c].length-1];if(e$2e(r)||!(i>d)){var f=this,p=!1;(e$2e(f._packingRequest)&&f._packingRequest===Z$P.QuadKey||f._isBlock)&&(p=!0);for(var _=0;_<this._rectangles.length;_++){var m=h$18.intersection(this._rectangles[_],s,ue$t);if(e$2e(r)&&!p){var g=r[this._urls[_]];if(e$2e(g)&&(1===g&&(u=!0),0===g||2===g))continue}if(0===a.length&&_===this._rectangles.length-1&&i>h)break;if(e$2e(m)){var x=this._levels[_][0],y=this._levels[_][this._levels[_].length-1],v=!1;if(i>=x&&i<=d&&(v=!0),v){var $=0,b=0,T=1,C=e,S=t,w=i;w>y&&(T=1/Math.pow(2,w-y));for(var E=T;w>y;)C%2==1&&($+=E),S%2==0&&(b+=E),E*=2,w--,C=Math.floor(.5*C),S=Math.floor(.5*S);var P={srcX:$,srcY:b,width:T,dataName:l._urls[_]},A=i+"_"+e+"_"+t;e$2e(l._combiInfo[A])?l._combiInfo[A].push(P):l._combiInfo[A]=[P],function(e){var t,i=l._urls[e];if(-1!==i.indexOf("wmts100")){var n=w-l.wmts_sub;t=i.substring(0,i.lastIndexOf("/"))+"?tilematrix="+n+"&layer="+l._tempLayerName+"&tilerow="+S+"&tilecol="+C+"&tilematrixset="+l._wmtstileMatrixSet+"&service=WMTS&request=GetTile"}else{var r=i.substring(0,i.length-1);t=l._urls[e]+"data/index/"+S+"/"+C+".bil?level="+w}var o=l._proxy;e$2e(o)&&(t=o.getURL(t));var s=new r$1c({throttle:!0,throttleByServer:!1,type:U$1f.TERRAIN}),u=void 0;if(e$2e(f._packingRequest)&&f._packingRequest===Z$P.QuadKey&&f._isBlock){s.type=U$1f.BLOCKPACK;var c=Re$j(f,C,S,w);s.quadKey=qe$b(c.x,c.y,c.level),s.blockInfo=c,s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),e$2e(h=f.blockCache[s.quadKey+"_"+s.providerName])&&(f.blockCacheQueue.touch(h),u={buffer:h.data})}else if(e$2e(f._packingRequest)&&f._packingRequest===Z$P.QuadKey)s.type=U$1f.PACK,s.quadKey=qe$b(C,S,w),s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/"));else if(f._isBlock){s.type=U$1f.BLOCK;var h;c=Re$j(f,C,S,w);s.quadKey=qe$b(c.x,c.y,c.level),s.blockInfo=c,s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),e$2e(h=f.blockCache[s.quadKey+"_"+s.providerName])&&(f.blockCacheQueue.touch(h),u={buffer:h.data})}if(!e$2e(u)){e$2e(a$O.CREDENTIAL)&&(t=e$2e(a$O.CREDENTIAL._keymap[r])?a$O.addTokenWithKey(r,t):a$O.addToken(t));var d=t$10.createIfNeeded(t),p=t;e$2e(s.blockInfo)&&(p=l._urls[e]+"data/index/"+c.y+"/"+c.x+".bil?level="+w),u=d.getDerivedResource({url:p,request:s}).fetchArrayBuffer()}e$2e(u)&&(u.id=e,u.url=t,u.subRequest=s),a.push(u)}(_)}if(u)break}}if(!(a.indexOf(void 0)>-1))return this._hasNormalBuffer=!0,o$1l.allSettled(a,(function(n){if(!(n.length<1)){for(var r=[],o=0;o<n.length;o++){var u=n[o];if(e$2e(u)){if(e$2e(u.buffer)&&(u=u.buffer),0!==i){if(f._isBlock&&e$2e(f._packingRequest)&&f._packingRequest===Z$P.QuadKey)!e$2e(a[o].subRequest.quadKeyIndex)&&e$2e(a[o].subRequest.blockRequest)&&(a[o].subRequest.quadKeyIndex=a[o].subRequest.blockRequest.quadKeyIndex),e$2e(a[o].subRequest.quadKeyIndex)&&(u=Me$m(u,a[o].subRequest.quadKeyIndex),u=new Uint8Array(u).buffer),e$2e(c=f.blockCache[a[o].subRequest.quadKey])||(c=new e$1e(f,a[o].subRequest.quadKey,u),f.blockCache[a[o].subRequest.quadKey+"_"+a[o].subRequest.providerName]=c),f.blockCacheQueue.touch(c),f.blockCacheQueue.trim(f.blockCacheSize),u=We$g(u,a[o].subRequest.blockInfo);else if(e$2e(f._packingRequest)&&f._packingRequest===Z$P.QuadKey)u=Me$m(u,a[o].subRequest.quadKeyIndex);else if(f._isBlock){var c;e$2e(c=f.blockCache[a[o].subRequest.quadKey])||(c=new e$1e(f,a[o].subRequest.quadKey,u),f.blockCache[a[o].subRequest.quadKey+"_"+a[o].subRequest.providerName]=c),f.blockCacheQueue.touch(c),f.blockCacheQueue.trim(f.blockCacheSize),u=We$g(u,a[o].subRequest.blockInfo)}if(!e$2e(u)){if(0===o&&n.length>1){var h=i+"_"+e+"_"+t;if(1!=(g=l._combiInfo[h])[o+1].width)return void delete l._combiInfo[h]}continue}}var d,p;if(2===(d="ZIP"===l._compressType?nt$b.inflate(u).buffer:u).byteLength/(l._heightmapWidth*l._heightmapHeight)){var _=new Int16Array(d,0,l._heightmapWidth*l._heightmapHeight);p=[];for(var m=0;m<_.length;m++)p.push(parseFloat(_[m]))}else p=new Float32Array(d,0,l._heightmapWidth*l._heightmapHeight);r.push(p)}else r.push(void 0)}h=i+"_"+e+"_"+t;var g=l._combiInfo[h];if(delete l._combiInfo[h],r.length>1)for(o=0;o<r.length;o++)if(e$2e(r[o])&&(0!=g[o].srcX||0!=g[o].srcY||1!=g[o].width)){_=l.division(r[o],g[o].srcX,g[o].srcY,g[o].width,l._heightmapWidth);r[o]=_}var x=[{},{},{},{}];for(o=0;o<r.length;o++)if(e$2e(r[o])){var y=g[o].dataName,v=-1,$=-1,b=-1,T=-1;v=0==r[o][0]?2:1,$=0==r[o][l._heightmapWidth-1]?2:1,b=0==r[o][(l._heightmapHeight-1)*l._heightmapWidth]?2:1,T=0==r[o][l._heightmapHeight*l._heightmapWidth-1]?2:1;for(var C=.5*l._heightmapWidth,S=.5*l._heightmapHeight,w=0;w<r[o].length;w++){var E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E<S&&P<C){var A=r[o][w];if(1===v){if(0==A){v=3;break}}else if(0!=A){v=3;break}}}x[0][y]=v;for(w=0;w<r[o].length;w++){E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E<S&&P>=C){A=r[o][w];if(1===$){if(0==A){$=3;break}}else if(0!=A){$=3;break}}}x[1][y]=$;for(w=0;w<r[o].length;w++){E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E>=S&&P<C){A=r[o][w];if(1===b){if(0==A){b=3;break}}else if(0!=A){b=3;break}}}x[2][y]=b;for(w=0;w<r[o].length;w++){E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E>=S&&P>=C){A=r[o][w];if(1===T){if(0==A){T=3;break}}else if(0!=A){T=3;break}}}if(x[3][y]=T,1===v&&1===$&&1===b&&1===T)break}var L=[];for(o=0;o<r.length;o++)e$2e(r[o])&&L.push(r[o]);if(0!==L.length){var M=L[0];if(L.length>1)for(w=0;w<M.length;w++)if(0==M[w])for(o=1;o<L.length;o++)if(0!=L[o][w]){M[w]=L[o][w];break}var R=!1;for(o=0;o<M.length;o++)if(Math.abs(M[o])>e$2d.EPSILON3){R=!0;break}var O=l._heightmapWidth,D=l._heightmapHeight,I=void 0;return l._requestVertexNormals&&(I=Qe$9(M,O,D,s,i)),new T$L({buffer:M,width:O,height:D,skirtMode:l._isCreateSkirt,skirtScale:l._skirtScale,childTileMask:Ie$h(l,e,t,i),structure:l._terrainDataStructure,valid:R,childTileMaskExt:x,normalTexture:I,level:i,x:e,y:t})}}}),(function(e){return o$1l.reject(e)}))}},se$r.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var ue$t=new h$18;function Ie$h(e,t,i,n){for(var r=e._tilingScheme,o=r.tileXYToRectangle(t,i,n),a=0,s=0;s<e._rectangles.length;s++){var l=e._rectangles[s];e$2e(h$18.intersection(l,o,ue$t))&&(ge$m(r,l,2*t,2*i,n+1)&&(a|=4),ge$m(r,l,2*t+1,2*i,n+1)&&(a|=8),ge$m(r,l,2*t,2*i+1,n+1)&&(a|=1),ge$m(r,l,2*t+1,2*i+1,n+1)&&(a|=2))}return a}function ge$m(e,t,i,n,r){var o=e.tileXYToRectangle(i,n,r);return e$2e(h$18.intersection(o,t,ue$t))}se$r.prototype.getTileDataAvailable=function(e,t,i){if(0===i)return!0;for(var n=this._tilingScheme.tileXYToRectangle(e,t,i),r=0;r<this._rectangles.length;r++){if(e$2e(h$18.intersection(this._rectangles[r],n,ue$t))&&i>=this._levels[r][0]&&i<=this._levels[r][this._levels[r].length-1])return!0}return!1},se$r.prototype.loadTileDataAvailability=function(e,t,i){};var ot$8="attribute vec4 aPosition;\nattribute vec2 textureCoordinates;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main() \n{\n gl_Position = aPosition;\n v_textureCoordinates = textureCoordinates;\n}\n",fa$3="uniform sampler2D u_LineTexture;\nuniform float u_texelOffset;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 maxValues = vec4(0.0);\n float halfCoreSize = float(CORESIZE) / 2.0;\n for(int y = 0; y < CORESIZE; y++){\n for(int x = 0; x < CORESIZE; x++){\n float offsetX = (-halfCoreSize + float(x)) * u_texelOffset;\n float offsetY = (-halfCoreSize + float(y)) * u_texelOffset;\n vec2 realTexCoord = v_textureCoordinates + vec2(offsetX, offsetY);\n if(realTexCoord.x > 1.0 || realTexCoord.x < 0.0 || realTexCoord.y > 1.0 || realTexCoord.y < 0.0){\n continue;\n }\n vec4 color = texture2D(u_LineTexture, realTexCoord);\n maxValues = max(maxValues, color);\n }\n }\n if(maxValues.a < 0.01){\n discard;\n }\n gl_FragColor = maxValues;\n}",pa$2="varying vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nvoid main()\n{\n vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\n vec4 color = FxaaPixelShader(\n v_textureCoordinates,\n colorTexture,\n fxaaQualityRcpFrame,\n fxaaQualitySubpix,\n fxaaQualityEdgeThreshold,\n fxaaQualityEdgeThresholdMin);\n float alpha = texture2D(colorTexture, v_textureCoordinates).a;\n gl_FragColor = vec4(color.rgb, alpha);\n}\n",k$K="/**\n * @license\n * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of NVIDIA CORPORATION nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// NVIDIA GameWorks Graphics Samples GitHub link: https://github.com/NVIDIAGameWorks/GraphicsSamples\n// Original FXAA 3.11 shader link: https://github.com/NVIDIAGameWorks/GraphicsSamples/blob/master/samples/es3-kepler/FXAA/FXAA3_11.h\n\n// Steps used to integrate into SuperMap3D:\n// * The following defines are set:\n// #define FXAA_PC 1\n// #define FXAA_WEBGL_1 1\n// #define FXAA_GREEN_AS_LUMA 1\n// #define FXAA_EARLY_EXIT 1\n// #define FXAA_GLSL_120 1\n// * All other preprocessor directives besides the FXAA_QUALITY__P* directives were removed.\n// * Double underscores are invalid for preprocessor directives so replace them with a single underscore. Replace\n// /FXAA_QUALITY__P(.*)/g with /FXAA_QUALITY__P$1/.\n// * There are no implicit conversions from ivec* to vec* so replace:\n// #define FxaaInt2 ivec2\n// with\n// #define FxaaInt2 vec2\n// * The texture2DLod function is only available in vertex shaders so replace:\n// #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)\n// #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)\n// with\n// #define FxaaTexTop(t, p) texture2D(t, p)\n// #define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r))\n// * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future.\n// * The following parameters to FxaaPixelShader are unused and can be removed:\n// fxaaConsolePosPos\n// fxaaConsoleRcpFrameOpt\n// fxaaConsoleRcpFrameOpt2\n// fxaaConsole360RcpFrameOpt2\n// fxaaConsoleEdgeSharpness\n// fxaaConsoleEdgeThreshold\n// fxaaConsoleEdgeThresholdMi\n// fxaaConsole360ConstDir\n\n//\n// Choose the quality preset.\n// This needs to be compiled into the shader as it effects code.\n// Best option to include multiple presets is to\n// in each shader define the preset, then include this file.\n//\n// OPTIONS\n// -----------------------------------------------------------------------\n// 10 to 15 - default medium dither (10=fastest, 15=highest quality)\n// 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)\n// 39 - no dither, very expensive\n//\n// NOTES\n// -----------------------------------------------------------------------\n// 12 = slightly faster then FXAA 3.9 and higher edge quality (default)\n// 13 = about same speed as FXAA 3.9 and better than 12\n// 23 = closest to FXAA 3.9 visually and performance wise\n// _ = the lowest digit is directly related to performance\n// _ = the highest digit is directly related to style\n//\n//#define FXAA_QUALITY_PRESET 12\n\n\n#if (FXAA_QUALITY_PRESET == 10)\n #define FXAA_QUALITY_PS 3\n #define FXAA_QUALITY_P0 1.5\n #define FXAA_QUALITY_P1 3.0\n #define FXAA_QUALITY_P2 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 11)\n #define FXAA_QUALITY_PS 4\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 3.0\n #define FXAA_QUALITY_P3 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 12)\n #define FXAA_QUALITY_PS 5\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 4.0\n #define FXAA_QUALITY_P4 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 13)\n #define FXAA_QUALITY_PS 6\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 4.0\n #define FXAA_QUALITY_P5 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 14)\n #define FXAA_QUALITY_PS 7\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 4.0\n #define FXAA_QUALITY_P6 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 15)\n #define FXAA_QUALITY_PS 8\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 4.0\n #define FXAA_QUALITY_P7 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 20)\n #define FXAA_QUALITY_PS 3\n #define FXAA_QUALITY_P0 1.5\n #define FXAA_QUALITY_P1 2.0\n #define FXAA_QUALITY_P2 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 21)\n #define FXAA_QUALITY_PS 4\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 22)\n #define FXAA_QUALITY_PS 5\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 23)\n #define FXAA_QUALITY_PS 6\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 24)\n #define FXAA_QUALITY_PS 7\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 3.0\n #define FXAA_QUALITY_P6 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 25)\n #define FXAA_QUALITY_PS 8\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 4.0\n #define FXAA_QUALITY_P7 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 26)\n #define FXAA_QUALITY_PS 9\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 4.0\n #define FXAA_QUALITY_P8 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 27)\n #define FXAA_QUALITY_PS 10\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 4.0\n #define FXAA_QUALITY_P9 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 28)\n #define FXAA_QUALITY_PS 11\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 4.0\n #define FXAA_QUALITY_P10 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 29)\n #define FXAA_QUALITY_PS 12\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 2.0\n #define FXAA_QUALITY_P10 4.0\n #define FXAA_QUALITY_P11 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 39)\n #define FXAA_QUALITY_PS 12\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.0\n #define FXAA_QUALITY_P2 1.0\n #define FXAA_QUALITY_P3 1.0\n #define FXAA_QUALITY_P4 1.0\n #define FXAA_QUALITY_P5 1.5\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 2.0\n #define FXAA_QUALITY_P10 4.0\n #define FXAA_QUALITY_P11 8.0\n#endif\n\n#define FxaaBool bool\n#define FxaaFloat float\n#define FxaaFloat2 vec2\n#define FxaaFloat3 vec3\n#define FxaaFloat4 vec4\n#define FxaaHalf float\n#define FxaaHalf2 vec2\n#define FxaaHalf3 vec3\n#define FxaaHalf4 vec4\n#define FxaaInt2 vec2\n#define FxaaTex sampler2D\n\n#define FxaaSat(x) clamp(x, 0.0, 1.0)\n#define FxaaTexTop(t, p) texture2D(t, p)\n#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r))\n\nFxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }\n\nFxaaFloat4 FxaaPixelShader(\n //\n // Use noperspective interpolation here (turn off perspective interpolation).\n // {xy} = center of pixel\n FxaaFloat2 pos,\n //\n // Input color texture.\n // {rgb_} = color in linear or perceptual color space\n // if (FXAA_GREEN_AS_LUMA == 0)\n // {___a} = luma in perceptual color space (not linear)\n FxaaTex tex,\n //\n // Only used on FXAA Quality.\n // This must be from a constant/uniform.\n // {x_} = 1.0/screenWidthInPixels\n // {_y} = 1.0/screenHeightInPixels\n FxaaFloat2 fxaaQualityRcpFrame,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_SUBPIX define.\n // It is here now to allow easier tuning.\n // Choose the amount of sub-pixel aliasing removal.\n // This can effect sharpness.\n // 1.00 - upper limit (softer)\n // 0.75 - default amount of filtering\n // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)\n // 0.25 - almost off\n // 0.00 - completely off\n FxaaFloat fxaaQualitySubpix,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.\n // It is here now to allow easier tuning.\n // The minimum amount of local contrast required to apply algorithm.\n // 0.333 - too little (faster)\n // 0.250 - low quality\n // 0.166 - default\n // 0.125 - high quality\n // 0.063 - overkill (slower)\n FxaaFloat fxaaQualityEdgeThreshold,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.\n // It is here now to allow easier tuning.\n // Trims the algorithm from processing darks.\n // 0.0833 - upper limit (default, the start of visible unfiltered edges)\n // 0.0625 - high quality (faster)\n // 0.0312 - visible limit (slower)\n // Special notes when using FXAA_GREEN_AS_LUMA,\n // Likely want to set this to zero.\n // As colors that are mostly not-green\n // will appear very dark in the green channel!\n // Tune by looking at mostly non-green content,\n // then start at zero and increase until aliasing is a problem.\n FxaaFloat fxaaQualityEdgeThresholdMin\n) {\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posM;\n posM.x = pos.x;\n posM.y = pos.y;\n FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);\n #define lumaM rgbyM.y\n FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));\n/*--------------------------------------------------------------------------*/\n FxaaFloat maxSM = max(lumaS, lumaM);\n FxaaFloat minSM = min(lumaS, lumaM);\n FxaaFloat maxESM = max(lumaE, maxSM);\n FxaaFloat minESM = min(lumaE, minSM);\n FxaaFloat maxWN = max(lumaN, lumaW);\n FxaaFloat minWN = min(lumaN, lumaW);\n FxaaFloat rangeMax = max(maxWN, maxESM);\n FxaaFloat rangeMin = min(minWN, minESM);\n FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\n FxaaFloat range = rangeMax - rangeMin;\n FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\n FxaaBool earlyExit = range < rangeMaxClamped;\n/*--------------------------------------------------------------------------*/\n if(earlyExit)\n return rgbyM;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNS = lumaN + lumaS;\n FxaaFloat lumaWE = lumaW + lumaE;\n FxaaFloat subpixRcpRange = 1.0/range;\n FxaaFloat subpixNSWE = lumaNS + lumaWE;\n FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\n FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNESE = lumaNE + lumaSE;\n FxaaFloat lumaNWNE = lumaNW + lumaNE;\n FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\n FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNWSW = lumaNW + lumaSW;\n FxaaFloat lumaSWSE = lumaSW + lumaSE;\n FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\n FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\n FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\n FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\n FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\n FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;\n/*--------------------------------------------------------------------------*/\n FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;\n FxaaFloat lengthSign = fxaaQualityRcpFrame.x;\n FxaaBool horzSpan = edgeHorz >= edgeVert;\n FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\n/*--------------------------------------------------------------------------*/\n if(!horzSpan) lumaN = lumaW;\n if(!horzSpan) lumaS = lumaE;\n if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;\n FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;\n/*--------------------------------------------------------------------------*/\n FxaaFloat gradientN = lumaN - lumaM;\n FxaaFloat gradientS = lumaS - lumaM;\n FxaaFloat lumaNN = lumaN + lumaM;\n FxaaFloat lumaSS = lumaS + lumaM;\n FxaaBool pairN = abs(gradientN) >= abs(gradientS);\n FxaaFloat gradient = max(abs(gradientN), abs(gradientS));\n if(pairN) lengthSign = -lengthSign;\n FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posB;\n posB.x = posM.x;\n posB.y = posM.y;\n FxaaFloat2 offNP;\n offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\n offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\n if(!horzSpan) posB.x += lengthSign * 0.5;\n if( horzSpan) posB.y += lengthSign * 0.5;\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posN;\n posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;\n posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;\n FxaaFloat2 posP;\n posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;\n posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;\n FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;\n FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));\n FxaaFloat subpixE = subpixC * subpixC;\n FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));\n/*--------------------------------------------------------------------------*/\n if(!pairN) lumaNN = lumaSS;\n FxaaFloat gradientScaled = gradient * 1.0/4.0;\n FxaaFloat lumaMM = lumaM - lumaNN * 0.5;\n FxaaFloat subpixF = subpixD * subpixE;\n FxaaBool lumaMLTZero = lumaMM < 0.0;\n/*--------------------------------------------------------------------------*/\n lumaEndN -= lumaNN * 0.5;\n lumaEndP -= lumaNN * 0.5;\n FxaaBool doneN = abs(lumaEndN) >= gradientScaled;\n FxaaBool doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;\n FxaaBool doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;\n/*--------------------------------------------------------------------------*/\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 3)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 4)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 5)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 6)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 7)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 8)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 9)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 10)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 11)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 12)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n/*--------------------------------------------------------------------------*/\n FxaaFloat dstN = posM.x - posN.x;\n FxaaFloat dstP = posP.x - posM.x;\n if(!horzSpan) dstN = posM.y - posN.y;\n if(!horzSpan) dstP = posP.y - posM.y;\n/*--------------------------------------------------------------------------*/\n FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\n FxaaFloat spanLength = (dstP + dstN);\n FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\n FxaaFloat spanLengthRcp = 1.0/spanLength;\n/*--------------------------------------------------------------------------*/\n FxaaBool directionN = dstN < dstP;\n FxaaFloat dst = min(dstN, dstP);\n FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;\n FxaaFloat subpixG = subpixF * subpixF;\n FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\n FxaaFloat subpixH = subpixG * fxaaQualitySubpix;\n/*--------------------------------------------------------------------------*/\n FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\n FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\n if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;\n if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;\n return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);\n}\n";function a$I(e,t){o$1q.typeOf.object("normal",e),o$1q.typeOf.number("distance",t),this._distance=t,this._normal=new s$G(e,this),this.onChangeCallback=void 0,this.index=-1}function s$G(e,t){this._clippingPlane=t,this._cartesian3=o$1p.clone(e)}function h$L(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=u$Z(e.enabled,!0),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this.edgeColor=e$1X.clone(u$Z(e.edgeColor,e$1X.WHITE)),this.edgeWidth=u$Z(e.edgeWidth,0),this.planeAdded=new o$1h,this.planeRemoved=new o$1h,this._owner=void 0;var t=u$Z(e.unionClippingRegions,!1);this._unionClippingRegions=t,this._testIntersection=t?C$R:P$K,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;var i=e.planes;if(e$2e(i))for(var n=i.length,r=0;r<n;++r)this.add(i[r])}function C$R(e){return e===Ae$w.OUTSIDE}function P$K(e){return e===Ae$w.INSIDE}function F$O(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||-1!==e._dirtyIndex&&e._dirtyIndex!==t,e._dirtyIndex=t}function D$M(e,t){for(var i=e.length,n=0;n<i;++n)if(o$1m.equals(e[n],t))return n;return-1}Object.defineProperties(a$I.prototype,{distance:{get:function(){return this._distance},set:function(e){o$1q.typeOf.number("value",e),e$2e(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){o$1q.typeOf.object("value",e),e$2e(this.onChangeCallback)&&!o$1p.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),o$1p.clone(e,this._normal._cartesian3)}}}),a$I.fromPlane=function(e,t){return o$1q.typeOf.object("plane",e),e$2e(t)?(t.normal=e.normal,t.distance=e.distance):t=new a$I(e.normal,e.distance),t},a$I.clone=function(e,t){return e$2e(t)?(t.normal=e.normal,t.distance=e.distance,t):new a$I(e.normal,e.distance)},Object.defineProperties(s$G.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){o$1q.typeOf.number("value",e),e$2e(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){o$1q.typeOf.number("value",e),e$2e(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){o$1q.typeOf.number("value",e),e$2e(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}}),Object.defineProperties(h$L.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?C$R:P$K)}},enabled:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e)}},texture:{get:function(){return this._clippingPlanesTexture}},owner:{get:function(){return this._owner}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}}),h$L.prototype.add=function(e){var t=this._planes.length,i=this;e.onChangeCallback=function(e){F$O(i,e)},e.index=t,F$O(this,t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)},h$L.prototype.get=function(e){return o$1q.typeOf.number("index",e),this._planes[e]},h$L.prototype.contains=function(e){return-1!==D$M(this._planes,e)},h$L.prototype.remove=function(e){var t=this._planes,i=D$M(t,e);if(-1===i)return!1;e instanceof a$I&&(e.onChangeCallback=void 0,e.index=-1);for(var n=t.length-1,r=i;r<n;++r){var o=t[r+1];t[r]=o,o instanceof a$I&&(o.index=r)}return this._multipleDirtyPlanes=!0,t.length=n,this.planeRemoved.raiseEvent(e,i),!0},h$L.prototype.removeAll=function(){for(var e=this._planes,t=e.length,i=0;i<t;++i){var n=e[i];n instanceof a$I&&(n.onChangeCallback=void 0,n.index=-1),this.planeRemoved.raiseEvent(n,i)}this._multipleDirtyPlanes=!0,this._planes=[]};var j$M=new e$2c,k$J=new e$2c;function V$H(e,t,i){for(var n=e._uint8View,r=e._planes,o=0,a=t;a<i;++a){var s=r[a],l=t$$.octEncodeToCartesian4(s.normal,k$J);n[o]=l.x,n[o+1]=l.y,n[o+2]=l.z,n[o+3]=l.w;var u=e$2c.packFloat(s.distance,j$M);n[o+4]=u.x,n[o+5]=u.y,n[o+6]=u.z,n[o+7]=u.w,o+=8}}function M$O(e,t,i){for(var n=e._float32View,r=e._planes,o=0,a=t;a<i;++a){var s=r[a],l=s.normal;n[o]=l.x,n[o+1]=l.y,n[o+2]=l.z,n[o+3]=s.distance,o+=4}}function b$X(e,t){var i=e$1W.maximumTextureSize;return t.x=Math.min(e,i),t.y=Math.ceil(e/t.x),t}var H$P=new o$1o;h$L.prototype.update=function(e){var t=this._clippingPlanesTexture,i=e.context,n=h$L.useFloatTexture(i),r=n?this.length:2*this.length;if(e$2e(t)){var o=t.width*t.height;(o<r||r<.25*o)&&(t.destroy(),t=void 0,this._clippingPlanesTexture=void 0)}if(0!==this.length){if(!e$2e(t)){var a=b$X(r,H$P);a.y*=2;var s=new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST});n?(t=new t$U({context:i,width:a.x,height:a.y,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT,sampler:s,flipY:!1}),this._float32View=new Float32Array(a.x*a.y*4)):(t=new t$U({context:i,width:a.x,height:a.y,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:s,flipY:!1}),this._uint8View=new Uint8Array(a.x*a.y*4)),this._clippingPlanesTexture=t,this._multipleDirtyPlanes=!0}var l=this._dirtyIndex;if(this._multipleDirtyPlanes||-1!==l){if(this._multipleDirtyPlanes)n?(M$O(this,0,this._planes.length),t.copyFrom({width:t.width,height:t.height,arrayBufferView:this._float32View})):(V$H(this,0,this._planes.length),t.copyFrom({width:t.width,height:t.height,arrayBufferView:this._uint8View}));else{var u=0,c=0;n?(c=Math.floor(l/t.width),u=Math.floor(l-c*t.width),M$O(this,l,l+1),t.copyFrom({width:1,height:1,arrayBufferView:this._float32View},u,c)):(c=Math.floor(2*l/t.width),u=Math.floor(2*l-c*t.width),V$H(this,l,l+1),t.copyFrom({width:2,height:1,arrayBufferView:this._uint8View},u,c))}this._multipleDirtyPlanes=!1,this._dirtyIndex=-1}}};var J$H=new p$1d,S$J=new o$1m(o$1p.UNIT_X,0);h$L.prototype.computeIntersectionWithBoundingVolume=function(e,t){var i=this._planes,n=i.length,r=this.modelMatrix;e$2e(t)&&(r=p$1d.multiply(t,r,J$H));var o=Ae$w.INSIDE;!this.unionClippingRegions&&n>0&&(o=Ae$w.OUTSIDE);for(var a=0;a<n;++a){var s=i[a];o$1m.transform(s,r,S$J);var l=e.intersectPlane(S$J);if(l===Ae$w.INTERSECTING)o=l;else if(this._testIntersection(l))return l}return o},h$L.setOwner=function(e,t,i){if(e!==t[i]&&(t[i]=t[i]&&t[i].destroy(),e$2e(e))){if(e$2e(e._owner))throw new t$15("ClippingPlaneCollection should only be assigned to one object");e._owner=t,t[i]=e}},h$L.useFloatTexture=function(e){return e.floatingPointTexture},h$L.getTextureResolution=function(e,t,i){var n=e.texture;if(e$2e(n))return i.x=n.width,i.y=n.height,i;var r=b$X(h$L.useFloatTexture(t)?e.length:2*e.length,i);return r.y*=2,r},h$L.prototype.isDestroyed=function(){return!1},h$L.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),i$11(this)};var e$16={START:0,LOADING:1,DONE:2,FAILED:3},re$A=Object.freeze(e$16),I$Y={FAILED:0,UNLOADED:1,RECEIVING:2,UNZIP:3,UNZIPING:4,RECEIVED:5,TRANSFORMING:6,TRANSFORMED:7,READY:8,INVALID:9},Ee$j=Object.freeze(I$Y),Q$M=new i$1d,X$L=new i$1d,Z$J=new o$1p,$$K=new h$18;function Y$D(e,t){var i=e._ellipsoid,n=t.height,r=t.width,o=t.northCap,a=t.southCap,s=n,l=2,u=0,c=4;o&&(l-=1,s-=1,u+=1,c-=2),a&&(l-=1,s-=1,u+=1,c-=2),u+=l*r+2*s-c;var h,d=new Float64Array(3*u),f=0,p=0,_=Z$J;if(o)j$O.computePosition(t,i,!1,p,0,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;else for(h=0;h<r;h++)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(h=r-1,p=1;p<n;p++)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;if(p=n-1,!a)for(h=r-2;h>=0;h--)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(h=0,p=n-2;p>0;p--)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(var m=d.length/3*2,g=ce$z.createTypedArray(d.length/3,m),x=0,y=0;y<d.length/3-1;y++)g[x++]=y,g[x++]=y+1;g[x++]=d.length/3-1,g[x++]=0;var v=new I$1p({attributes:new a$_,primitiveType:W$18.LINES});return v.attributes.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:d}),v.indices=g,v}function G$X(e,t){var i=e._surfaceHeight,n=e._extrudedHeight,r=e._ellipsoid,o=n,a=i,s=Y$D(e,t),l=t.height,u=t.width,c=A$1f.scaleToGeodeticHeight(s.attributes.position.values,a,r,!1),h=c.length,d=new Float64Array(2*h);d.set(c);var f=A$1f.scaleToGeodeticHeight(s.attributes.position.values,o,r);d.set(f,h),s.attributes.position.values=d;var p=t.northCap,_=t.southCap,m=4;p&&(m-=1),_&&(m-=1);var g,x=2*(d.length/3+m),y=ce$z.createTypedArray(d.length/3,x);h=d.length/6;for(var v=0,$=0;$<h-1;$++)y[v++]=$,y[v++]=$+1,y[v++]=$+h,y[v++]=$+h+1;if(y[v++]=h-1,y[v++]=0,y[v++]=h+h-1,y[v++]=h,y[v++]=0,y[v++]=h,p)g=l-1;else{var b=u-1;y[v++]=b,y[v++]=b+h,g=u+l-2}if(y[v++]=g,y[v++]=g+h,!_){var T=u+g-1;y[v++]=T,y[v]=T+h}return s.indices=y,s}function k$I(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).rectangle,i=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),n=u$Z(e.ellipsoid,t$12.WGS84),r=u$Z(e.rotation,0);if(!e$2e(t))throw new t$15("rectangle is required.");if(h$18.validate(t),t.north<t.south)throw new t$15("options.rectangle.north must be greater than options.rectangle.south");var o=u$Z(e.height,0),a=u$Z(e.extrudedHeight,o);this._rectangle=h$18.clone(t),this._granularity=i,this._ellipsoid=n,this._surfaceHeight=Math.max(o,a),this._rotation=r,this._extrudedHeight=Math.min(o,a),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}k$I.packedLength=h$18.packedLength+t$12.packedLength+5,k$I.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),h$18.pack(e._rectangle,t,i),i+=h$18.packedLength,t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._extrudedHeight,t[i]=u$Z(e._offsetAttribute,-1),t};var V$G=new h$18,J$G=t$12.clone(t$12.UNIT_SPHERE),D$L={rectangle:V$G,ellipsoid:J$G,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};k$I.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n=h$18.unpack(e,t,V$G);t+=h$18.packedLength;var r=t$12.unpack(e,t,J$G);t+=t$12.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t];return e$2e(i)?(i._rectangle=h$18.clone(n,i._rectangle),i._ellipsoid=t$12.clone(r,i._ellipsoid),i._surfaceHeight=a,i._rotation=s,i._extrudedHeight=l,i._offsetAttribute=-1===u?void 0:u,i):(D$L.granularity=o,D$L.height=a,D$L.rotation=s,D$L.extrudedHeight=l,D$L.offsetAttribute=-1===u?void 0:u,new k$I(D$L))};var I$X=new a$18;function y$K(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.rectangle",e.rectangle),this.rectangle=h$18.clone(e.rectangle),this.minimumHeight=u$Z(e.minimumHeight,0),this.maximumHeight=u$Z(e.maximumHeight,0),this.southwestCornerCartesian=new o$1p,this.northeastCornerCartesian=new o$1p,this.westNormal=new o$1p,this.southNormal=new o$1p,this.eastNormal=new o$1p,this.northNormal=new o$1p;var t=u$Z(e.ellipsoid,t$12.WGS84);tt$c(this,e.rectangle,t),u$Z(e.computeBoundingVolumes,!0)&&(this._orientedBoundingBox=y$Y.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,t),this._boundingSphere=i$1d.fromOrientedBoundingBox(this._orientedBoundingBox))}k$I.createGeometry=function(e){var t,i,n=e._rectangle,r=e._ellipsoid,o=j$O.computeOptions(n,e._granularity,e._rotation,0,$$K,I$X);if(!e$2d.equalsEpsilon(n.north,n.south,e$2d.EPSILON10)&&!e$2d.equalsEpsilon(n.east,n.west,e$2d.EPSILON10)){var a=e._surfaceHeight,s=e._extrudedHeight;if(!e$2d.equalsEpsilon(a,s,0,e$2d.EPSILON2)){if(t=G$X(e,o),e$2e(e._offsetAttribute)){var l=t.attributes.position.values.length/3,u=new Uint8Array(l);e._offsetAttribute===_0x39c22a.TOP?u=d$1s(u,1,0,l/2):u=d$1s(u,e._offsetAttribute===_0x39c22a.NONE?0:1),t.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}var c=i$1d.fromRectangle3D(n,r,a,X$L),h=i$1d.fromRectangle3D(n,r,s,Q$M);i=i$1d.union(c,h)}else{if((t=Y$D(e,o)).attributes.position.values=A$1f.scaleToGeodeticHeight(t.attributes.position.values,a,r,!1),e$2e(e._offsetAttribute)){var d=t.attributes.position.values.length,f=new Uint8Array(d/3);d$1s(f,e._offsetAttribute===_0x39c22a.NONE?0:1),t.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}i=i$1d.fromRectangle3D(n,r,a)}return new I$1p({attributes:t.attributes,indices:t.indices,primitiveType:W$18.LINES,boundingSphere:i,offsetAttribute:e._offsetAttribute})}},Object.defineProperties(y$K.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});var z$K=new o$1p,M$N=new o$1p,E$P=new o$1p,$$J=new o$1p,F$N=new o$1p,B$J=new o$1p,o$P=new a$18,G$W=new o$1m(o$1p.UNIT_X,0),f$P=new f$19;function tt$c(e,t,i){i.cartographicToCartesian(h$18.southwest(t),e.southwestCornerCartesian),i.cartographicToCartesian(h$18.northeast(t),e.northeastCornerCartesian),o$P.longitude=t.west,o$P.latitude=.5*(t.south+t.north),o$P.height=0;var n=i.cartographicToCartesian(o$P,F$N),r=o$1p.cross(n,o$1p.UNIT_Z,z$K);o$1p.normalize(r,e.westNormal),o$P.longitude=t.east;var o=i.cartographicToCartesian(o$P,B$J),a=o$1p.cross(o$1p.UNIT_Z,o,z$K);o$1p.normalize(a,e.eastNormal);var s,l=o$1p.subtract(n,o,z$K),u=o$1p.normalize(l,$$J),c=t.south;if(c>0){o$P.longitude=.5*(t.west+t.east),o$P.latitude=c;var h=i.cartographicToCartesian(o$P,f$P.origin);o$1p.clone(u,f$P.direction);var d=o$1m.fromPointNormal(e.southwestCornerCartesian,e.westNormal,G$W);g$1j.rayPlane(f$P,d,e.southwestCornerCartesian),s=i.geodeticSurfaceNormal(h,M$N)}else s=i.geodeticSurfaceNormalCartographic(h$18.southeast(t),M$N);var f=o$1p.cross(s,l,E$P);o$1p.normalize(f,e.southNormal);var p,_=t.north;if(_<0){o$P.longitude=.5*(t.west+t.east),o$P.latitude=_;var m=i.cartographicToCartesian(o$P,f$P.origin);o$1p.negate(u,f$P.direction);var g=o$1m.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,G$W);g$1j.rayPlane(f$P,g,e.northeastCornerCartesian),p=i.geodeticSurfaceNormal(m,M$N)}else p=i.geodeticSurfaceNormalCartographic(h$18.northwest(t),M$N);var x=o$1p.cross(l,p,E$P);o$1p.normalize(x,e.northNormal)}var rt$d=new o$1p,et$c=new o$1p,it$7=new o$1p(0,-1,0),at$a=new o$1p(0,0,-1),Z$I=new o$1p;y$K.prototype.distanceToCamera=function(e){o$1q.defined("frameState",e);var t=e.camera,i=new o$1p,n=new a$18;if(e$2e(t._sensitivePosition)&&t._sensitivePositionRatio>0){var r=a$18.fromCartesian(t._sensitivePosition);n.latitude=r.latitude*t._sensitivePositionRatio+t.positionCartographic.latitude*(1-t._sensitivePositionRatio),n.longitude=r.longitude*t._sensitivePositionRatio+t.positionCartographic.longitude*(1-t._sensitivePositionRatio),n.height=t.positionCartographic.height,i=a$18.toCartesian(n)}else i=t.positionWC,n=t.positionCartographic;var o,a,s,l=0;if(!h$18.contains(this.rectangle,n)){var u=this.southwestCornerCartesian,c=this.northeastCornerCartesian,h=this.westNormal,d=this.southNormal,f=this.eastNormal,p=this.northNormal;e.mode!==C$14.SCENE3D&&((u=e.mapProjection.project(h$18.southwest(this.rectangle),rt$d)).z=u.y,u.y=u.x,u.x=0,(c=e.mapProjection.project(h$18.northeast(this.rectangle),et$c)).z=c.y,c.y=c.x,c.x=0,h=it$7,f=o$1p.UNIT_Y,d=at$a,p=o$1p.UNIT_Z);var _=o$1p.subtract(i,u,Z$I),m=o$1p.dot(_,h),g=o$1p.dot(_,d),x=o$1p.subtract(i,c,Z$I),y=o$1p.dot(x,f),v=o$1p.dot(x,p);m>0?l+=m*m:y>0&&(l+=y*y),g>0?l+=g*g:v>0&&(l+=v*v)}e.mode===C$14.SCENE3D?(o=n.height,a=this.minimumHeight,s=this.maximumHeight):(o=i.x,a=this.minimumHeight,s=this.maximumHeight);var $=0;if(o>s){var b=o-s;$=b*b}else if(o<a){var T=a-o;$=T*T}return l>t._sensitiveRegionRatio*$?l+=$:l=$,Math.sqrt(l)},y$K.prototype.intersectPlane=function(e){return o$1q.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)},y$K.prototype.createDebugVolume=function(e){o$1q.defined("color",e);var t=new p$1d.clone(p$1d.IDENTITY);return new y$R({geometryInstances:new d$1o({geometry:new k$I({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),id:"outline",modelMatrix:t,attributes:{color:o$16.fromColor(e)}}),appearance:new t$Q({translucent:!1,flat:!0}),asynchronous:!1})};var d$10={};function p$O(e){if(!e$2e(e)||!e$2e(e.quantizedVertices))throw new t$15("options.quantizedVertices is required.");if(!e$2e(e.indices))throw new t$15("options.indices is required.");if(!e$2e(e.minimumHeight))throw new t$15("options.minimumHeight is required.");if(!e$2e(e.maximumHeight))throw new t$15("options.maximumHeight is required.");if(!e$2e(e.boundingSphere))throw new t$15("options.boundingSphere is required.");if(!e$2e(e.horizonOcclusionPoint))throw new t$15("options.horizonOcclusionPoint is required.");if(!e$2e(e.westIndices))throw new t$15("options.westIndices is required.");if(!e$2e(e.southIndices))throw new t$15("options.southIndices is required.");if(!e$2e(e.eastIndices))throw new t$15("options.eastIndices is required.");if(!e$2e(e.northIndices))throw new t$15("options.northIndices is required.");if(!e$2e(e.westSkirtHeight))throw new t$15("options.westSkirtHeight is required.");if(!e$2e(e.southSkirtHeight))throw new t$15("options.southSkirtHeight is required.");if(!e$2e(e.eastSkirtHeight))throw new t$15("options.eastSkirtHeight is required.");if(!e$2e(e.northSkirtHeight))throw new t$15("options.northSkirtHeight is required.");this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;var t=this._quantizedVertices.length/3,i=this._uValues=this._quantizedVertices.subarray(0,t),n=this._vValues=this._quantizedVertices.subarray(t,2*t);function r(e,t){return n[e]-n[t]}function o(e,t){return i[e]-i[t]}this._heightValues=this._quantizedVertices.subarray(2*t,3*t),this._westIndices=y$J(e.westIndices,r,t),this._southIndices=y$J(e.southIndices,o,t),this._eastIndices=y$J(e.eastIndices,r,t),this._northIndices=y$J(e.northIndices,o,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=u$Z(e.childTileMask,15),this._createdByUpsampling=u$Z(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0,this._normalTexture=e.normalTexture,this.invalid=u$Z(e.invalid,!1),0===this._maximumHeight&&(this.invalid=!0),this.rasterIndex=e.rasterIndex,this.rasterVertex=e.rasterVertex,this.modelMatrix=e.modelMatrix,this.hasInvalid=e.hasInvalid,this._validMinimumHeight=e.validMinimumHeight,this._validMaximumHeight=e.validMaximumHeight,this._validOrientedBoundingBox=e.validOrientedBoundingBox}d$10.clipTriangleAtAxisAlignedThreshold=function(e,t,i,n,r,o){if(!e$2e(e))throw new t$15("threshold is required.");if(!e$2e(t))throw new t$15("keepAbove is required.");if(!e$2e(i))throw new t$15("u0 is required.");if(!e$2e(n))throw new t$15("u1 is required.");if(!e$2e(r))throw new t$15("u2 is required.");var a,s,l;e$2e(o)?o.length=0:o=[],t?(a=i<e,s=n<e,l=r<e):(a=i>e,s=n>e,l=r>e);var u,c,h,d,f,p,_=a+s+l;return 1===_?a?(u=(e-i)/(n-i),c=(e-i)/(r-i),o.push(1),o.push(2),1!==c&&(o.push(-1),o.push(0),o.push(2),o.push(c)),1!==u&&(o.push(-1),o.push(0),o.push(1),o.push(u))):s?(h=(e-n)/(r-n),d=(e-n)/(i-n),o.push(2),o.push(0),1!==d&&(o.push(-1),o.push(1),o.push(0),o.push(d)),1!==h&&(o.push(-1),o.push(1),o.push(2),o.push(h))):l&&(f=(e-r)/(i-r),p=(e-r)/(n-r),o.push(0),o.push(1),1!==p&&(o.push(-1),o.push(2),o.push(1),o.push(p)),1!==f&&(o.push(-1),o.push(2),o.push(0),o.push(f))):2===_?a||i===e?s||n===e?!l&&r!==e&&(c=(e-i)/(r-i),h=(e-n)/(r-n),o.push(2),o.push(-1),o.push(0),o.push(2),o.push(c),o.push(-1),o.push(1),o.push(2),o.push(h)):(p=(e-r)/(n-r),u=(e-i)/(n-i),o.push(1),o.push(-1),o.push(2),o.push(1),o.push(p),o.push(-1),o.push(0),o.push(1),o.push(u)):(d=(e-n)/(i-n),f=(e-r)/(i-r),o.push(0),o.push(-1),o.push(1),o.push(0),o.push(d),o.push(-1),o.push(2),o.push(0),o.push(f)):3!==_&&(o.push(0),o.push(1),o.push(2)),o},d$10.computeBarycentricCoordinates=function(e,t,i,n,r,o,a,s,l){if(!e$2e(e))throw new t$15("x is required.");if(!e$2e(t))throw new t$15("y is required.");if(!e$2e(i))throw new t$15("x1 is required.");if(!e$2e(n))throw new t$15("y1 is required.");if(!e$2e(r))throw new t$15("x2 is required.");if(!e$2e(o))throw new t$15("y2 is required.");if(!e$2e(a))throw new t$15("x3 is required.");if(!e$2e(s))throw new t$15("y3 is required.");var u=i-a,c=a-r,h=o-s,d=n-s,f=1/(h*u+c*d),p=t-s,_=e-a,m=(h*_+c*p)*f,g=(-d*_+u*p)*f,x=1-m-g;return e$2e(l)?(l.x=m,l.y=g,l.z=x,l):new o$1p(m,g,x)},d$10.computeLineSegmentLineSegmentIntersection=function(e,t,i,n,r,o,a,s,l){o$1q.typeOf.number("x00",e),o$1q.typeOf.number("y00",t),o$1q.typeOf.number("x01",i),o$1q.typeOf.number("y01",n),o$1q.typeOf.number("x10",r),o$1q.typeOf.number("y10",o),o$1q.typeOf.number("x11",a),o$1q.typeOf.number("y11",s);var u=(s-o)*(i-e)-(a-r)*(n-t);if(0!==u){var c=((a-r)*(t-o)-(s-o)*(e-r))/u,h=((i-e)*(t-o)-(n-t)*(e-r))/u;if(c>=0&&c<=1&&h>=0&&h<=1)return e$2e(l)||(l=new o$1o),l.x=e+c*(i-e),l.y=t+c*(n-t),l}},Object.defineProperties(p$O.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return e$2e(this._mesh)}},normalTexture:{get:function(){return this._normalTexture}}});var B$I=[];function y$J(e,t,i){B$I.length=e.length;for(var n=!1,r=0,o=e.length;r<o;++r)B$I[r]=e[r],n=n||r>0&&t(e[r-1],e[r])>0;return n?(B$I.sort(t),ce$z.createTypedArray(i,B$I)):e}var F$M=new i$W("createVerticesFromQuantizedTerrainMesh");p$O.prototype.createMesh=function(e,t,i,n,r){if(!e$2e(e))throw new t$15("tilingScheme is required.");if(!e$2e(t))throw new t$15("x is required.");if(!e$2e(i))throw new t$15("y is required.");if(!e$2e(n))throw new t$15("level is required.");var o=e.ellipsoid,a=e.tileXYToRectangle(t,i,n);r=u$Z(r,1);var s=F$M.scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,validMinimumHeight:this._validMinimumHeight,validMaximumHeight:this._validMaximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:a,relativeToCenter:this._boundingSphere.center,ellipsoid:o,exaggeration:r,level:n});if(e$2e(s)){var l=this;return o$1l(s,(function(e){var t=l._quantizedVertices.length/3,i=t+l._westIndices.length+l._southIndices.length+l._eastIndices.length+l._northIndices.length,n=ce$z.createTypedArray(i,e.indices),o=new Float32Array(e.vertices),a=e.center,s=e.minimumHeight,u=e.maximumHeight,c=u$Z(i$1d.clone(e.boundingSphere),l._boundingSphere),h=u$Z(y$Y.clone(e.orientedBoundingBox),l._orientedBoundingBox),d=u$Z(y$Y.clone(e.validOrientedBoundingBox),l._validOrientedBoundingBox),f=u$Z(o$1p.clone(e.occludeePointInScaledSpace),l._horizonOcclusionPoint),p=e.vertexStride,_=h$M.clone(e.encoding),m=0===n.length||0===u||l.invalid;return l._mesh=new T$M(a,o,n,e.indexCountWithoutSkirts,t,s,u,c,f,p,h,_,r,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast,m,d),l._quantizedVertices=void 0,l._encodedNormals=void 0,l._indices=void 0,l._uValues=void 0,l._vValues=void 0,l._heightValues=void 0,l._westIndices=void 0,l._southIndices=void 0,l._eastIndices=void 0,l._northIndices=void 0,l._mesh}))}};var X$K=new i$W("upsampleQuantizedTerrainMesh");p$O.prototype.upsample=function(e,t,i,n,r,o,a){if(!e$2e(e))throw new t$15("tilingScheme is required.");if(!e$2e(t))throw new t$15("thisX is required.");if(!e$2e(i))throw new t$15("thisY is required.");if(!e$2e(n))throw new t$15("thisLevel is required.");if(!e$2e(r))throw new t$15("descendantX is required.");if(!e$2e(o))throw new t$15("descendantY is required.");if(!e$2e(a))throw new t$15("descendantLevel is required.");if(a-n>1)throw new t$15("Upsampling through more than one level at a time is not currently supported.");var s=this._mesh;if(e$2e(this._mesh)){var l=2*t!==r,u=2*i===o,c=e.ellipsoid,h=e.tileXYToRectangle(r,o,a),d=X$K.scheduleTask({vertices:s.vertices,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,validMinimumHeight:this._validMinimumHeight,validMaximumHeight:this._validMaximumHeight,isEastChild:l,isNorthChild:u,childRectangle:h,ellipsoid:c,exaggeration:s.exaggeration});if(e$2e(d)){var f=Math.min(this._westSkirtHeight,this._eastSkirtHeight);f=Math.min(f,this._southSkirtHeight),f=Math.min(f,this._northSkirtHeight);var p=l?.5*f:this._westSkirtHeight,_=u?.5*f:this._southSkirtHeight,m=l?this._eastSkirtHeight:.5*f,g=u?this._northSkirtHeight:.5*f,x=this._credits;return o$1l(d).then((function(e){var t,i=new Uint16Array(e.vertices),n=ce$z.createTypedArray(i.length/3,e.indices);if(e$2e(e.encodedNormals)&&(t=new Uint8Array(e.encodedNormals)),e$2e(e.horizonOcclusionPoint))return new p$O({quantizedVertices:i,indices:n,encodedNormals:t,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:i$1d.clone(e.boundingSphere),orientedBoundingBox:y$Y.clone(e.orientedBoundingBox),horizonOcclusionPoint:o$1p.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:p,southSkirtHeight:_,eastSkirtHeight:m,northSkirtHeight:g,childTileMask:0,credits:x,createdByUpsampling:!0,validMaximumHeight:e.validMaximumHeight,validMinimumHeight:e.validMinimumHeight,validOrientedBoundingBox:e.validOrientedBoundingBox})}))}}};var N$G=32767,E$O=new o$1p;function R$J(e,t,i,n,r,o,a,s){var l=Math.min(i,r,a),u=Math.max(i,r,a),c=Math.min(n,o,s),h=Math.max(n,o,s);return e>=l&&e<=u&&t>=c&&t<=h}p$O.prototype.interpolateHeight=function(e,t,i){var n=e$2d.clamp((t-e.west)/e.width,0,1),r=n*N$G,o=e$2d.clamp((i-e.south)/e.height,0,1),a=o*N$G;return e$2e(this._mesh)?J$F(this,n,o):K$I(this,r,a)};var Y$C=new o$1o,D$K=new o$1o,G$V=new o$1o;function J$F(e,t,i){for(var n=e._mesh,r=n.vertices,o=n.encoding,a=n.indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=o.decodeTextureCoordinates(r,u,Y$C),f=o.decodeTextureCoordinates(r,c,D$K),p=o.decodeTextureCoordinates(r,h,G$V);if(R$J(t,i,d.x,d.y,f.x,f.y,p.x,p.y)){var _=d$10.computeBarycentricCoordinates(t,i,d.x,d.y,f.x,f.y,p.x,p.y,E$O);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){var m=o.decodeHeight(r,u),g=o.decodeHeight(r,c),x=o.decodeHeight(r,h);return _.x*m+_.y*g+_.z*x}}}}function K$I(e,t,i){for(var n=e._uValues,r=e._vValues,o=e._heightValues,a=e._indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=n[u],f=n[c],p=n[h],_=r[u],m=r[c],g=r[h];if(R$J(t,i,d,_,f,m,p,g)){var x=d$10.computeBarycentricCoordinates(t,i,d,_,f,m,p,g,E$O);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){var y=x.x*o[u]+x.y*o[c]+x.z*o[h];return e$2d.lerp(e._minimumHeight,e._maximumHeight,y/N$G)}}}}p$O.prototype.isChildAvailable=function(e,t,i,n){if(!e$2e(e))throw new t$15("thisX is required.");if(!e$2e(t))throw new t$15("thisY is required.");if(!e$2e(i))throw new t$15("childX is required.");if(!e$2e(n))throw new t$15("childY is required.");var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},p$O.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var D$J={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=D$J.RENDERED_AND_KICKED},originalResult:function(e){return 3&e},kick:function(e){return 4|e}},w$K=32767,P$J=w$K/2|0,ie$w=new o$1p,ot$7=new o$1p,ht$6=new o$1p,h$K=new a$18,qe$a=new o$1o,dt$8=[],Ge$c=[],ut$8=[],ft$6=[],ct$6=[],vt$8=[],gt$6=[],lt$3=new o$1p,mt$4=new i$1d,pt$7=new y$Y,It$7=new o$1o;function Ne$h(){}function wt$6(e){var t,i=e.length,n=0;for(t=0;t<i;t++){n+=(s=e[t]).indices.length}var r=new Uint16Array(n),o=0,a=0;for(t=0;t<i;t++){for(var s,l=(s=e[t]).indices.length,u=0;u<l;u++)r[o+u]=s.indices[u]+a;o+=l,a+=s.attributes.position.values.length/3}return r}function Be$h(e,t){var i;return"function"==typeof e.slice&&("function"!=typeof(i=e.slice()).sort&&(i=void 0)),e$2e(i)||(i=Array.prototype.slice.call(e)),i.sort(t),i}function Ae$m(e,t,i,n,r,o,a,s,l,u,c){var h=s.north,d=s.south,f=s.east,p=s.west;f<p&&(f+=e$2d.TWO_PI);for(var _=i.length,m=0;m<_;++m){var g=i[m],x=r[g],y=o[g];h$K.longitude=e$2d.lerp(p,f,y.x)+u,h$K.latitude=e$2d.lerp(d,h,y.y)+c,h$K.height=x-l;var v=a.cartographicToCartesian(h$K,ie$w);t=n.encode(e,t,v,y,h$K.height,qe$a,0)}}function x$S(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}x$S.prototype.clone=function(e){return e$2e(e)||(e=new x$S),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},x$S.prototype.initializeIndexed=function(e,t,i,n){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=i,this.index=n,this.first=void 0,this.second=void 0,this.ratio=void 0},x$S.prototype.initializeFromClipResult=function(e,t,i){var n=t+1;return-1!==e[t]?i[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=i[e[n]],++n,this.second=i[e[n]],++n,this.ratio=e[n],++n),n},x$S.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},x$S.prototype.isIndexed=function(){return e$2e(this.index)},x$S.prototype.getH=function(){return e$2e(this.index)?this.heightBuffer[this.index]:e$2d.lerp(this.first.getH(),this.second.getH(),this.ratio)},x$S.prototype.getU=function(){return e$2e(this.index)?this.uBuffer[this.index]:e$2d.lerp(this.first.getU(),this.second.getU(),this.ratio)},x$S.prototype.getV=function(){return e$2e(this.index)?this.vBuffer[this.index]:e$2d.lerp(this.first.getV(),this.second.getV(),this.ratio)};var N$F=[];function We$f(e,t,i,n,r,o,a){if(0!==o.length){for(var s=0,l=0;l<o.length;)l=N$F[s++].initializeFromClipResult(o,l,a);for(var u=0;u<s;++u){var c=N$F[u];if(c.isIndexed())c.newIndex=r[c.index],c.uBuffer=e,c.vBuffer=t,c.heightBuffer=i;else{var h=c.getKey();if(e$2e(r[h]))c.newIndex=r[h];else{var d=e.length;e.push(c.getU()),t.push(c.getV()),i.push(c.getH()),c.newIndex=d,r[h]=d}}}3===s?(n.push(N$F[0].newIndex),n.push(N$F[1].newIndex),n.push(N$F[2].newIndex)):4===s&&(n.push(N$F[0].newIndex),n.push(N$F[1].newIndex),n.push(N$F[2].newIndex),n.push(N$F[0].newIndex),n.push(N$F[2].newIndex),n.push(N$F[3].newIndex))}}N$F.push(new x$S),N$F.push(new x$S),N$F.push(new x$S),N$F.push(new x$S),Ne$h.createTerrainMesh=function(e,t){var i=e.tilingScheme.ellipsoid,n=e.rectangle,r=t._quantizedVertices,o=r.length/3,a=t._westIndices.length+t._eastIndices.length+t._southIndices.length+t._northIndices.length,s=n.west,l=n.south,u=n.east,c=n.north,h=1*t._minimumHeight,d=1*t._maximumHeight,f=t$N.geodeticLatitudeToMercatorAngle(l),p=1/(t$N.geodeticLatitudeToMercatorAngle(c)-f),_=t._boundingSphere.center,m=r.subarray(0,o),g=r.subarray(o,2*o),x=r.subarray(2*o,3*o),y=new Array(o),v=new Array(o),$=new Array(o),b=new Array(o),T=ot$7;T.x=Number.POSITIVE_INFINITY,T.y=Number.POSITIVE_INFINITY,T.z=Number.POSITIVE_INFINITY;var C=ht$6;C.x=Number.NEGATIVE_INFINITY,C.y=Number.NEGATIVE_INFINITY,C.z=Number.NEGATIVE_INFINITY;for(var S=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,E=Number.POSITIVE_INFINITY,P=Number.NEGATIVE_INFINITY,A=0;A<o;++A){var L,M;if(t.wasCreatedByUpsampling()){var R=m[A],O=g[A];L=R/w$K,M=O/w$K,h$K.longitude=e$2d.lerp(s,u,L),h$K.latitude=e$2d.lerp(l,c,M),h$K.height=x[A]}else h$K.longitude=m[A],h$K.latitude=g[A],h$K.height=x[A],L=(h$K.longitude-s)/n.width,M=(h$K.latitude-l)/n.height;S=Math.min(h$K.longitude,S),w=Math.max(h$K.longitude,w),E=Math.min(h$K.latitude,E),P=Math.max(h$K.latitude,P);var D=i.cartographicToCartesian(h$K);y[A]=new o$1o(L,M),v[A]=h$K.height,$[A]=D,b[A]=(t$N.geodeticLatitudeToMercatorAngle(h$K.latitude)-f)*p}var I,F,B=Be$h(t._westIndices,(function(e,t){return y[e].y-y[t].y})),N=Be$h(t._eastIndices,(function(e,t){return y[t].y-y[e].y})),G=Be$h(t._southIndices,(function(e,t){return y[t].x-y[e].x})),z=Be$h(t._northIndices,(function(e,t){return y[e].x-y[t].x}));F=i$1d.fromPoints($),I=y$Y.fromRectangle(n,h,d,i),_=o$1p.clone(F.center);var U=m$19.eastNorthUpToFixedFrame(_,i),V=p$1d.inverseTransformation(U,new p$1d);for(A=0;A<o;A++){D=$[A];p$1d.multiplyByPoint(V,D,ie$w),o$1p.minimumByComponent(ie$w,T,T),o$1p.maximumByComponent(ie$w,C,C)}for(var k=new h$M(new e$29(T,C,_),h,d,U,!1,!0),W=k.getStride(),H=new Float32Array(o*W+a*W),q=0,j=0;j<o;++j)q=k.encode(H,q,$[j],y[j],v[j],qe$a,b[j]);var X=Math.max(0,2*(a-4)),Y=t._indices.length+3*X,Z=ce$z.createTypedArray(o+a,Y);Z.set(t._indices,0);var K=1e-4,Q=(w-S)*K,J=(P-E)*K,ee=-Q,te=Q,ie=J,ne=-J,re=o*W;Ae$m(H,re,B,k,v,y,i,n,t._westSkirtHeight,ee,0),Ae$m(H,re+=t._westIndices.length*W,G,k,v,y,i,n,t._southSkirtHeight,0,ne),Ae$m(H,re+=t._southIndices.length*W,N,k,v,y,i,n,t._eastSkirtHeight,te,0),Ae$m(H,re+=t._eastIndices.length*W,z,k,v,y,i,n,t._northSkirtHeight,0,ie),I$12.addSkirtIndices(B,G,N,z,o,Z,t._indices.length,void 0);var oe=t._quantizedVertices.length/3,ae=oe+t._westIndices.length+t._southIndices.length+t._eastIndices.length+t._northIndices.length,se=ce$z.createTypedArray(ae,Z.buffer),le=0===se.length;return t._mesh=new T$M(_,H,se,t._indices.length,oe,h,d,F,void 0,W,I,k,1,B,G,N,z,le),t._quantizedVertices=void 0,t._encodedNormals=void 0,t._indices=void 0,t._uValues=void 0,t._vValues=void 0,t._heightValues=void 0,t._westIndices=void 0,t._southIndices=void 0,t._eastIndices=void 0,t._northIndices=void 0,t._mesh},Ne$h.upsampleTerrainData=function(e){var t=e.parent;if(e$2e(t)&&e$2e(t.data)&&e$2e(t.data.modifyTerrainData)){var i=t.data.modifyTerrainData,n=t.x,r=t.y;t.level;var o=i._mesh;if(e$2e(o)){var a=2*n!==e.x,s=2*r===e.y,l=e.tilingScheme,u=l.ellipsoid,c=l.tileXYToRectangle(e.x,e.y,e.level),h=a?P$J:0,d=a?w$K:P$J,f=s?P$J:0,p=s?w$K:P$J,_=ft$6,m=ct$6,g=vt$8;_.length=0,m.length=0,g.length=0;var x=gt$6;x.length=0;var y={},v=o.vertices,$=o.indices;$=$.subarray(0,o.indexCountWithoutSkirts);var b=o.encoding,T=o.exaggeration,C=0,S=o.vertexCountWithoutSkirts;i._minimumHeight,i._maximumHeight;var w,E,P,A,L,M=new Array(S),R=new Array(S),O=new Array(S);for(E=0,P=0;E<S;++E,P+=2){var D=b.decodeTextureCoordinates(v,E,It$7);w=b.decodeHeight(v,E)/T,A=e$2d.clamp(D.x*w$K|0,0,w$K),L=e$2d.clamp(D.y*w$K|0,0,w$K),O[E]=w,A<20&&(A=0),L<20&&(L=0),w$K-A<20&&(A=w$K),w$K-L<20&&(L=w$K),M[E]=A,R[E]=L,(a&&A>=P$J||!a&&A<=P$J)&&(s&&L>=P$J||!s&&L<=P$J)&&(y[E]=C,_.push(A),m.push(L),g.push(O[E]),++C)}var I=[];I.push(new x$S),I.push(new x$S),I.push(new x$S);var F,B=[];for(B.push(new x$S),B.push(new x$S),B.push(new x$S),E=0;E<$.length;E+=3){var N=$[E],G=$[E+1],z=$[E+2],U=M[N],V=M[G],k=M[z];I[0].initializeIndexed(M,R,O,N),I[1].initializeIndexed(M,R,O,G),I[2].initializeIndexed(M,R,O,z);var W=d$10.clipTriangleAtAxisAlignedThreshold(P$J,a,U,V,k,dt$8);!((F=0)>=W.length)&&(!((F=B[0].initializeFromClipResult(W,F,I))>=W.length)&&(!((F=B[1].initializeFromClipResult(W,F,I))>=W.length)&&(F=B[2].initializeFromClipResult(W,F,I),We$f(_,m,g,x,y,d$10.clipTriangleAtAxisAlignedThreshold(P$J,s,B[0].getV(),B[1].getV(),B[2].getV(),Ge$c),B),F<W.length&&(B[2].clone(B[1]),B[2].initializeFromClipResult(W,F,I),We$f(_,m,g,x,y,d$10.clipTriangleAtAxisAlignedThreshold(P$J,s,B[0].getV(),B[1].getV(),B[2].getV(),Ge$c),B)))))}var H=a?-w$K:0,q=s?-w$K:0,j=[],X=[],Y=[],Z=[],K=Number.MAX_VALUE,Q=-K,J=ut$8;J.length=0;var ee=c,te=ee.north,ie=ee.south,ne=ee.east,re=ee.west;for(ne<re&&(ne+=e$2d.TWO_PI),E=0;E<_.length;++E)(A=Math.round(_[E]))<=h?(j.push(E),A=0):A>=d?(Y.push(E),A=w$K):A=2*A+H,_[E]=A,(L=Math.round(m[E]))<=f?(X.push(E),L=0):L>=p?(Z.push(E),L=w$K):L=2*L+q,m[E]=L,(w=g[E])<K&&(K=w),w>Q&&(Q=w),g[E]=w,h$K.longitude=e$2d.lerp(re,ne,A/w$K),h$K.latitude=e$2d.lerp(ie,te,L/w$K),h$K.height=w,u.cartographicToCartesian(h$K,ie$w),J.push(ie$w.x),J.push(ie$w.y),J.push(ie$w.z);var oe=i$1d.fromVertices(J,o$1p.ZERO,3,mt$4),ae=y$Y.fromRectangle(ee,K,Q,u,pt$7),se=new s$H(u).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(oe.center,J,3,oe.center,K,lt$3),le=new Float64Array(_.length+m.length+g.length);for(E=0;E<_.length;++E)le[E]=_[E];var ue=_.length;for(E=0;E<m.length;++E)le[ue+E]=m[E];for(ue+=m.length,E=0;E<g.length;++E)le[ue+E]=g[E];var ce=ce$z.createTypedArray(_.length,x),he=new Float64Array(le.buffer),de=ce$z.createTypedArray(he.length/3,ce.buffer),fe=Math.min(i._westSkirtHeight,i._eastSkirtHeight);fe=Math.min(fe,i._southSkirtHeight),fe=Math.min(fe,i._northSkirtHeight);var pe=a?.5*fe:i._westSkirtHeight,_e=s?.5*fe:i._southSkirtHeight,me=a?i._eastSkirtHeight:.5*fe,ge=s?i._northSkirtHeight:.5*fe,xe=i._credits;if(0!==he.length)return new p$O({quantizedVertices:he,indices:de,minimumHeight:K,maximumHeight:Q,boundingSphere:oe,orientedBoundingBox:ae,horizonOcclusionPoint:se,westIndices:j,southIndices:X,eastIndices:Y,northIndices:Z,westSkirtHeight:pe,southSkirtHeight:_e,eastSkirtHeight:me,northSkirtHeight:ge,childTileMask:0,credits:xe,createdByUpsampling:!0})}}},Ne$h.createTerrainData=function(e,t,i,n,r){var o=t.length;if(!(o<1)){e.data,e.rectangle;for(var a=[],s=0;s<o;s++){var l=t[s].attributes;a=a.concat(o$1p.unpackArray(l.position.values))}var u=a.length,c=new Float64Array(3*u);for(s=0;s<u;s++){var h=a[s];a$18.fromCartesian(h,void 0,h$K);var d=h$K.height;if(e$2e(r)){var f=yt$6(e,h$K);d=r+(f>0?f:0)}c[s]=h$K.longitude,c[u+s]=h$K.latitude,c[2*u+s]=d}return new p$O({quantizedVertices:c,indices:o>1?wt$6(t):t[0].indices,encodedNormals:void 0,minimumHeight:i,maximumHeight:n,boundingSphere:new i$1d,orientedBoundingBox:new y$Y,horizonOcclusionPoint:new o$1p,westIndices:[],southIndices:[],eastIndices:[],northIndices:[],westSkirtHeight:0,southSkirtHeight:0,eastSkirtHeight:0,northSkirtHeight:0,childTileMask:0,credits:void 0,createdByUpsampling:!1})}};var xt$6=new o$1p,Ke$a=new o$1p,St$3=new a$18,Tt$6=new f$19;function yt$6(e,t){if(!e$2e(t))throw new DeveloperError("cartographic is required");for(;e._lastSelectionResult===D$J.REFINED;)e=Ye$c(e.southwestChild,t)||Ye$c(e.southeastChild,t)||Ye$c(e.northwestChild,t)||e.northeastChild;if(e$2e(e.data)&&e$2e(e.data.renderedMesh)){var i=e.tilingScheme.ellipsoid,n=o$1p.fromRadians(t.longitude,t.latitude,0,i,xt$6),r=Tt$6,o=i.geodeticSurfaceNormal(n,r.direction);if(!e$2e(i.getSurfaceNormalIntersectionWithZAxis(n,11500,r.origin))){var a=Math.min(defaultValue(e.data.minimumHeight,0),-11500),s=o$1p.multiplyByScalar(o,Math.abs(a)+1,Ke$a);o$1p.subtract(n,s,r.origin)}if(e$2e(e.data.terrainData)&&e.data.terrainData instanceof p$O)return e.data.terrainData.interpolateHeight(e.rectangle,t.longitude,t.latitude);var l=e.data.pick(r,void 0,void 0,!1,Ke$a);if(e$2e(l))return i.cartesianToCartographic(l,St$3).height}}function Ye$c(e,t){return h$18.contains(e.rectangle,t)?e:void 0}function x$R(e){this.terrainLayer=e,this.terrainData=void 0,this.vertexArray=void 0,this.terrainState=Ee$j.UNLOADED,this.mesh=void 0,this.orientedBoundingBox=void 0,this.occludeePointInScaledSpace=new o$1p,this._rasterTerrainFBO=void 0,this._rasterTerrainTexture=void 0,this._rasterized=!1,this._rasterTextureSize=256}function $$I(e,t,i,n,r){function o(i){e.request=void 0,e$2e(i)?"cacheError"!==i?"cacheInvalid"!==i?(e.terrainData=i,e.terrainState=Ee$j.RECEIVED,t._isTerrainZ&&0!==r&&(e.terrainState=Ee$j.UNZIP,e.zipTerrainData=i,e.terrainData=void 0)):e.terrainState=Ee$j.FAILED:s(!1):e.terrainState=Ee$j.FAILED}function a(){if(e.request.state===W$1c.CANCELLED)return e.terrainData=void 0,e.terrainState=Ee$j.UNLOADED,void(e.request=void 0);e.terrainState=Ee$j.FAILED,e.request=void 0;var o="Failed to obtain terrain tile X: "+i+" Y: "+n+" Level: "+r+".";t._requestError=l$V.handleError(t._requestError,t,t.errorEvent,o,i,n,r,s)}function s(s){var l=new r$1c({throttle:!1,throttleByServer:!0,type:U$1f.TERRAIN});l.cacheEnable=s,e.request=l;var u=t.requestTileGeometry(i,n,r,l);e$2e(u)?(e.terrainState=Ee$j.RECEIVING,o$1l(u,o,a)):(e.terrainState=Ee$j.UNLOADED,e.request=void 0)}s(!0)}function ee$s(e,t,i,n,r,o,a){var s=t.parent;if(s){var l=s.data.terrain[e.terrainLayer.terrainProvider.tablename];if(e$2e(l)){var u=l.terrainData,c=s.x,h=s.y,d=s.level;if(e$2e(u)){var f=u.upsample(n.tilingScheme,c,h,d,r,o,a);!e$2e(f)||(e.terrainState=Ee$j.RECEIVING,o$1l(f,(function(t){if(e$2e(t)){var i=u.rasterVertex,n=u.rasterIndex,a=void 0,s=u.hasInvalid;if(e$2e(i)){var l=new p$1d(2,0,0,0,0,2,0,0,0,0,1,0,0,0,0,1);r%c==1&&(l[12]=-32767),o%h==0&&(l[13]=-32767),e$2e(u.modelMatrix)?(a=new p$1d,a=p$1d.multiply(l,u.modelMatrix,a)):a=l,t.rasterVertex=i,t.rasterIndex=n,t.modelMatrix=a,t.hasInvalid=s}e.terrainData=t,e.terrainState=Ee$j.RECEIVED}else e.terrainState=Ee$j.INVALID}),(function(){e.terrainState=Ee$j.FAILED})))}}}else t.state=QuadtreeTileLoadState.FAILED}function re$z(e,t,i,n,r){var o=t.unzip(e.zipTerrainData.buffer);e$2e(o)&&(e.terrainState=Ee$j.UNZIPING,o$1l(o,(function(i){if(!e$2e(i))return e.terrainState=Ee$j.FAILED,e.zipTerrainData=void 0,void(e.terrainData=void 0);e.terrainState=Ee$j.RECEIVED,e.terrainData=t.createTerrainData(e.zipTerrainData,i.data.buffer,!0),e.zipTerrainData=void 0}),(function(t){e.terrainState=Ee$j.FAILED})))}function te$x(e,t,i,n,r,o){var a=i.tilingScheme,s=e.terrainData.createMesh(a,n,r,o,t.terrainExaggeration);!e$2e(s)||(e.terrainState=Ee$j.TRANSFORMING,o$1l(s,(function(t){e.mesh=t,e.orientedBoundingBox=y$Y.clone(t.orientedBoundingBox,e.orientedBoundingBox),e.occludeePointInScaledSpace=o$1p.clone(t.occludeePointInScaledSpace,e.occludeePointInScaledSpace),e.terrainState=Ee$j.TRANSFORMED}),(function(){e.terrainState=Ee$j.FAILED})))}function R$I(){this.context=void 0,this.tileTerrain=void 0,this.mesh=void 0}x$R.prototype.freeResources=function(){this._rasterTerrainTexture=this._rasterTerrainTexture&&!this._rasterTerrainTexture.isDestroyed()&&this._rasterTerrainTexture.destroy(),this._rasterTerrainFBO=this._rasterTerrainFBO&&!this._rasterTerrainFBO.isDestroyed()&&this._rasterTerrainFBO.destroy(),this._rasterTerrainFBO=void 0},Object.defineProperties(x$R.prototype,{name:{get:function(){return this.terrainLayer.terrainProvider.tablename}}}),x$R.prototype.processStateMachine=function(e,t){var i=this.terrainLayer.terrainProvider;if(i._ready){var n=e.parent;if(e$2e(n)&&e$2e(n.data)){var r=n.data.terrain[i.tablename];if(e$2e(r)&&this.terrainState===Ee$j.FAILED)void 0!==r.terrainData&&!1!==r.terrainData.canUpsample||r.processStateMachine(n,t)}this.terrainState===Ee$j.FAILED&&ee$s(this,e,t,i,e.x,e.y,e.level),this.terrainState===Ee$j.UNLOADED&&$$I(this,i,e.x,e.y,e.level),this.terrainState===Ee$j.UNZIP&&re$z(this,i,e.x,e.y,e.level),this.terrainState===Ee$j.RECEIVED&&te$x(this,t,i,e.x,e.y,e.level),this.terrainState===Ee$j.TRANSFORMED&&ae$s(t,this,t.context,i,e.x,e.y,e.level),this.terrainState,Ee$j.INVALID}},R$I.prototype.set=function(e,t,i,n){this.context=e,this.tileTerrain=t,this.mesh=i,this.terrainProvider=n},R$I.prototype.execute=function(){var e=this.context,t=this.mesh,i=this.tileTerrain;!1===this.terrainProvider.isShowGlobe&&t.invalid?i.vertexArray=void 0:i.vertexArray=v$C._createVertexArrayForMesh(e,t)};var C$Q=new R$I;function ae$s(e,t,i,n,r,o,a){C$Q.set(i,t,t.mesh,n),e.jobScheduler.execute(C$Q,2)&&(t.terrainState=Ee$j.READY)}x$R.prototype.createRealtimeRasterTerrainFBO=function(e){this._rasterTerrainTexture=new t$U({context:e.context,width:this._rasterTextureSize,height:this._rasterTextureSize,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}),this._rasterTerrainFBO=new t$V({context:e.context,colorTextures:[this._rasterTerrainTexture],destroyAttachments:!1})};var ie$v=new f$1a(0,0,256,256);function v$C(){this.terrain={},this.imagery=[],this.gridImagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new e$2c(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.orientedBoundingBox=void 0,this.boundingVolumeSourceTile=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new o$1p,this.tileTerrainOrientedBoundingBox=void 0,this.terrainState=Ee$j.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new i$1d,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1,this.normalTexture=void 0,this.normalTextureTranslationAndScale=new e$2c(0,0,1,1),this.modifyTerrainData=void 0,this.modifyTerrainMesh=void 0,this.modifyTerrainVertexArray=void 0,this.modifyOrientedBoundingBox=void 0,this.subDivisionMesh=void 0,this.subDivisionVertexArray=void 0,this.invalid=!1,this.invalidMesh=void 0,this.invalidOrientedBoundingBox=void 0,this.invalidOccludeePointInScaledSpace=void 0,this.invalidVertexArray=void 0,this.invalidTerrainData=void 0}function C$P(e,t,i,n,r,o){if(e.decodePosition(n,r,o),e$2e(t)&&t!==C$14.SCENE3D){var a=i.ellipsoid.cartesianToCartographic(o);i.project(a,o),o$1p.fromElements(o.z,o.x,o.y,o)}return o}x$R.prototype.realtimeRasterValidTerrain=function(e,t,i){if(!(this._rasterized||i.level<2)&&e$2e(this.terrainData)){this._rasterized=!0;var n=void 0,r=void 0,o=p$1d.IDENTITY;if(e$2e(this.terrainData)){n=this.terrainData.rasterIndex,r=this.terrainData.rasterVertex;e$2e(this.terrainData.modelMatrix)&&(o=this.terrainData.modelMatrix)}if(!e$2e(r))return void(e$2e(this._rasterTerrainFBO)&&(i._clearCommand.framebuffer=this._rasterTerrainFBO,i._clearCommand.execute(e.context)));e$2e(this._rasterTerrainTexture)||this.createRealtimeRasterTerrainFBO(e);var a=t._rasterAAFBOs[0];i._clearCommand.framebuffer=a,i._clearCommand.execute(e.context),i._clearCommand.framebuffer=this._rasterTerrainFBO,i._clearCommand.execute(e.context);var s=i.setRasterValidTerrainCamera(i,e);if(e$2e(r)){var l=t$X.createVertexBuffer({context:e.context,typedArray:r,usage:A$18.STATIC_DRAW}),u=t$X.createIndexBuffer({context:e.context,typedArray:n,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.fromSizeInBytes(n.BYTES_PER_ELEMENT)});u.vertexArrayDestroyable=!1,u.referenceCount=1;var c,h=[{index:0,vertexBuffer:l,componentDatatype:S$14.SHORT,componentsPerAttribute:3,offsetInBytes:0,strideInBytes:3*S$14.getSizeInBytes(S$14.SHORT)}],d=new c$13({context:e.context,attributes:h,indexBuffer:u}),f=["attribute vec4 position;","void main()","{"," gl_Position = czm_modelViewProjection * vec4(position.xy, 0.0, 1.0);","}"].join("\n"),p=["void main()","{"," gl_FragColor = czm_packValue(0.0);","}"].join("\n"),_=new s$V({sources:[f]}),m=new s$V({sources:[p]});(c=new i$$).cull=!1,c.boundingVolume=new i$1d(o$1p.ZERO,65535),c.shaderProgram=r$14.fromCache({context:e.context,vertexShaderSource:_,fragmentShaderSource:m,attributeLocations:{position:0}}),c.modelMatrix=o,c.primitiveType=W$18.TRIANGLES,c.vertexArray=d,c.count=n.length,c.pass=2,c.renderState=d$1m.fromCache({viewport:ie$v}),c.framebuffer=this._rasterTerrainFBO,c.execute(e.context)}i.resetCamera(e,s)}},Object.defineProperties(v$C.prototype,{eligibleForUnloading:{get:function(){for(var e=this.terrainState,t=!(e===Ee$j.RECEIVING||e===Ee$j.TRANSFORMING),i=this.imagery,n=0,r=i.length;t&&n<r;++n){var o=i[n];t=!e$2e(o.loadingImagery)||o.loadingImagery.state!==wt$7.TRANSITIONING}return t}},renderedMesh:{get:function(){return e$2e(this.subDivisionVertexArray)?this.subDivisionMesh:e$2e(this.vertexArray)?this.mesh:e$2e(this.fill)?this.fill.mesh:void 0}}});var ae$r=new o$1p,te$w=new o$1p,ie$u=new o$1p;function ne$x(e,t,i,n){var r=t.getTileDataAvailable(e.x,e.y,e.level);if(!e$2e(r)&&e$2e(e.parent)){var o=e.parent,a=o.data;e$2e(a)&&e$2e(a.terrainData)&&(r=a.terrainData.isChildAvailable(o.x,o.y,e.x,e.y))}!1===r&&(e.data.terrainState=Ee$j.FAILED);for(var s=0,l=n.length;s<l;++s){var u=n.get(s);u.show&&u._createTileImagerySkeletons(e,t)}}function oe$p(e){var t=void 0;return e$2e(e.parent)&&e$2e(e.parent._childTileMaskExt)&&(t=e.x%e.parent.x==0?e.y%e.parent.y==0?e.parent._childTileMaskExt[0]:e.parent._childTileMaskExt[2]:e.y%e.parent.y==0?e.parent._childTileMaskExt[1]:e.parent._childTileMaskExt[3]),t}function de$p(e,t,i,n,r,o){var a=e.data,s=e.parent,l=!1;for(var u in a.terrain)a.terrain[u].processStateMachine(e,t),a.terrain[u].terrainState===Ee$j.FAILED&&(l=!0);if((a.terrainState===Ee$j.FAILED||l)&&void 0!==s)if(void 0!==s.data&&void 0!==s.data.terrainData&&!1!==s.data.terrainData.canUpsample){if(l)for(var u in s.data.terrain)(!e$2e(s.data.terrain[u].terrainData)||0==s.data.terrain[u].terrainData.canUpsample)&&s.data.terrain[u].processStateMachine(s,t)}else v$C.processStateMachine(s,t,i,n,r,!0);if(a.terrainState===Ee$j.FAILED&&se$q(a,e,t,i,e.x,e.y,e.level),a.terrainState===Ee$j.UNLOADED){var c=oe$p(e);fe$q(a,i,e.x,e.y,e.level,c)}if(a.terrainState===Ee$j.UNZIP&&ue$s(a,i,e.x,e.y,e.level),a.terrainState===Ee$j.RECEIVED&&(e$2e(a.terrainData)&&(e._childTileMaskExt=a.terrainData._childTileMaskExt),e.showInvalid&&!a.invalid&&a.setShowInvalid(),he$n(a,t,i,e.x,e.y,e.level)),a.terrainState===Ee$j.TRANSFORMED&&me$r(t,a,t.context,i,e.x,e.y,e.level,o),a.terrainState!==Ee$j.INVALID){var h;if(a.terrainState>=Ee$j.RECEIVED&&void 0===a.waterMaskTexture&&i.hasWaterMask)if(void 0!==a.terrainData.waterMask)ce$o(t.context,a);else e$2e(h=a._findAncestorTileWithTerrainData(e))&&e$2e(h.data.waterMaskTexture)&&(a.waterMaskTexture=h.data.waterMaskTexture,++a.waterMaskTexture.referenceCount,a._computeWaterMaskTranslationAndScale(e,h,a.waterMaskTranslationAndScale));if(a.terrainState>=Ee$j.RECEIVED&&void 0===a.normalTexture&&i.hasNormalBuffer)if(void 0!==a.terrainData._normalTexture)xe$l(t.context,a);else e$2e(h=a._findAncestorTileWithTerrainData(e))&&e$2e(h.data.normalTexture)&&(a.normalTexture=h.data.normalTexture,++a.normalTexture.referenceCount,a._computeNormalTextureTranslationAndScale(e,h,a.normalTextureTranslationAndScale))}}function se$q(e,t,i,n,r,o,a){var s=t.parent;if(s){var l=s.data.terrainData,u=s.x,c=s.y,h=s.level;if(e$2e(l)){var d=l.upsample(n.tilingScheme,u,c,h,r,o,a);!e$2e(d)||(e.terrainState=Ee$j.RECEIVING,o$1l(d,(function(t){if(e$2e(t)){e.terrainData=t;var i=s.data.invalidTerrainData;if(e$2e(i)){var l=i.upsample(n.tilingScheme,u,c,h,r,o,a);if(!e$2e(l))return void(e.terrainState=Ee$j.FAILED);o$1l(l,(function(t){e$2e(t)?(e.invalidTerrainData=t,e.terrainState=Ee$j.RECEIVED,e.invalid=s.data.invalid):e.terrainState=Ee$j.INVALID}))}else e.terrainState=Ee$j.RECEIVED,e.invalid=s.data.invalid}else e.terrainState=Ee$j.INVALID}),(function(){e.terrainState=Ee$j.FAILED})))}}else t.state=re$A.FAILED}function fe$q(e,t,i,n,r,o){function a(i){e.request=void 0,e$2e(i)?"cacheError"!==i?"cacheInvalid"!==i?(e.terrainData=i,e.terrainState=Ee$j.RECEIVED,t._isTerrainZ&&0!==r&&(e.terrainState=Ee$j.UNZIP,e.zipTerrainData=i,e.terrainData=void 0)):e.terrainState=Ee$j.FAILED:l(!1):e.terrainState=Ee$j.FAILED}function s(){if(e.request.state===W$1c.CANCELLED)return e.terrainData=void 0,e.terrainState=Ee$j.UNLOADED,void(e.request=void 0);e.terrainState=Ee$j.FAILED,e.request=void 0;var o="Failed to obtain terrain tile X: "+i+" Y: "+n+" Level: "+r+".";t._requestError=l$V.handleError(t._requestError,t,t.errorEvent,o,i,n,r,l)}function l(l){var u=new r$1c({throttle:!1,throttleByServer:!0,type:U$1f.TERRAIN});u.cacheEnable=l,e.request=u;var c=t.requestTileGeometry(i,n,r,u,o);e$2e(c)?(e.terrainState=Ee$j.RECEIVING,o$1l(c,a,s)):(e.terrainState=Ee$j.UNLOADED,e.request=void 0)}l(!0)}function ue$s(e,t,i,n,r){var o=t.unzip(e.zipTerrainData.buffer);e$2e(o)&&(e.terrainState=Ee$j.UNZIPING,o$1l(o,(function(i){if(!e$2e(i))return e.terrainState=Ee$j.FAILED,e.zipTerrainData=void 0,void(e.terrainData=void 0);e.terrainState=Ee$j.RECEIVED,e.terrainData=t.createTerrainData(e.zipTerrainData,i.data.buffer),t._invisibility&&(e.invalidTerrainData=new T$L({buffer:new Uint8Array(256),width:16,height:16,skirtMode:!0,valid:!1})),e.zipTerrainData=void 0}),(function(t){e.terrainState=Ee$j.FAILED})))}function he$n(e,t,i,n,r,o){var a=i.tilingScheme,s=e.terrainData.createMesh(a,n,r,o,t.terrainExaggeration);!e$2e(s)||(e.terrainState=Ee$j.TRANSFORMING,o$1l(s,(function(s){if(i._isSct&&i._extrudeTileBoundingBox&&i._levels[0]>12&&s.maximumHeight<1&&(s.maximumHeight=Math.max(i._maxHeight,s.maximumHeight)),e.mesh=s,e.orientedBoundingBox=y$Y.clone(s.orientedBoundingBox,e.orientedBoundingBox),e.occludeePointInScaledSpace=o$1p.clone(s.occludeePointInScaledSpace,e.occludeePointInScaledSpace),i._enablePrjArea&&(e$2e(s.validOrientedBoundingBox)?e.tileBoundingRegion._orientedBoundingBox=y$Y.clone(s.validOrientedBoundingBox,e.tileBoundingRegion._orientedBoundingBox):e.tileBoundingRegion._orientedBoundingBox=y$Y.clone(e.orientedBoundingBox,e.tileBoundingRegion._orientedBoundingBox),e.tileBoundingRegion._boundingSphere=i$1d.fromOrientedBoundingBox(e.tileBoundingRegion._orientedBoundingBox)),e$2e(e.invalidTerrainData)){var l=e.invalidTerrainData.createMesh(a,n,r,o,t.terrainExaggeration);if(!e$2e(l))return void(e.terrainState=Ee$j.RECEIVED);o$1l(l,(function(t){e.invalidMesh=t,e.invalidOrientedBoundingBox=y$Y.clone(t.orientedBoundingBox,e.invalidOrientedBoundingBox),e.invalidOccludeePointInScaledSpace=o$1p.clone(t.occludeePointInScaledSpace,e.invalidOccludeePointInScaledSpace),e.terrainState=Ee$j.TRANSFORMED}))}else e.terrainState=Ee$j.TRANSFORMED}),(function(){e.terrainState=Ee$j.FAILED})))}function b$W(){this.context=void 0,this.surfaceTile=void 0,this.mesh=void 0}v$C.prototype.pick=function(e,t,i,n,r){var o=this.renderedMesh;if(e$2e(o)){for(var a=o.vertices,s=o.indices,l=o.encoding,u=s.length,c=Number.MAX_VALUE,h=0;h<u;h+=3){var d=s[h],f=s[h+1],p=s[h+2],_=C$P(l,t,i,a,d,ae$r),m=C$P(l,t,i,a,f,te$w),g=C$P(l,t,i,a,p,ie$u),x=g$1j.rayTriangleParametric(e,_,m,g,n);e$2e(x)&&x<c&&x>=0&&(c=x)}return c!==Number.MAX_VALUE?f$19.getPoint(e,c,r):void 0}},v$C.prototype.freeResources=function(){e$2e(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),e$2e(this.normalTexture)&&(--this.normalTexture.referenceCount,0===this.normalTexture.referenceCount&&this.normalTexture.destroy(),this.normalTexture=void 0),this.terrainData=void 0,this.modifyTerrainData=void 0,this.terrainState=Ee$j.UNLOADED,this.mesh=void 0,this.modifyTerrainMesh=void 0,this.subDivisionMesh=void 0,this.fill=this.fill&&this.fill.destroy();for(var e=this.imagery,t=0,i=e.length;t<i;++t)e[t].freeResources();for(var n in this.imagery.length=0,this.terrain)this.terrain[n].freeResources();this.terrain={};var r=this.gridImagery;for(t=0,i=r.length;t<i;++t)r[t].freeResources();this.gridImagery.length=0,this.freeVertexArray(),this.invalid=!1,this.invalidMesh=void 0,this.invalidOrientedBoundingBox=void 0,this.invalidOccludeePointInScaledSpace=void 0,this.invalidVertexArray=void 0,this.invalidTerrainData=void 0},v$C.prototype.freeVertexArray=function(){v$C._freeVertexArray(this.vertexArray),this.vertexArray=void 0,v$C._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0,v$C._freeVertexArray(this.modifyTerrainVertexArray),this.modifyTerrainVertexArray=void 0,v$C._freeVertexArray(this.subDivisionVertexArray),this.subDivisionVertexArray=void 0},v$C.initialize=function(e,t,i,n){var r=e.data;e$2e(r)||(r=e.data=new v$C),e.state===re$A.START&&(ne$x(e,t,i,n),e.state=re$A.LOADING)},v$C.processStateMachine=function(e,t,i,n,r,o,a){v$C.initialize(e,i,n,r);var s=e.data;if(e.state===re$A.LOADING&&de$p(e,t,i,n,r,o),!a||0==e.level){var l=e.renderable;e.renderable=e$2e(s.vertexArray)||!1===i.isShowGlobe&&e$2e(s.mesh)&&s.mesh.invalid;var u=s.terrainState===Ee$j.READY;for(var c in s.terrain)if(s.terrain[c].terrainState!==Ee$j.READY){u=!1;break}e.upsampledFromParent=e$2e(s.terrainData)&&s.terrainData.wasCreatedByUpsampling();var h=!0,d=r._maxDetailLevelOffset();if(d>0){var f=e.level-d;f=Math.max(0,f);for(var p=e.level,_=e;p>f&&e$2e(_);)e$2e(_=_.parent)&&(v$C.initialize(_,i,n,r),h=s.processImagery(_,i,t)&&h),p=_.level}var m=s.processImagery(e,i,t)&&h,g=s.processGridTile(e,t);if(u&&m&&g||s.terrainState===Ee$j.INVALID){var x=e._loadedCallbacks,y={};for(var v in x)x.hasOwnProperty(v)&&(x[v](e)||(y[v]=x[v]));e._loadedCallbacks=y,e.state=re$A.DONE}l&&(e.renderable=!0)}},v$C.prototype.processImagery=function(e,t,i,n){var r,o,a=e.data,s=e.upsampledFromParent,l=!1,u=!0,c=a.imagery,h=!1,d=!1;for(r=0,o=c.length;r<o;++r){var f=c[r];if(!e$2e(f.loadingImagery)&&!e$2e(f.readyImagery)&&e$2e(f.imageryLayer)&&(f.loadingImagery=f.imageryLayer.getImageryFromCache(e.x,e.y,e.level),f.imageryLayer=void 0),e$2e(f.loadingImagery)){if(f.loadingImagery.state===wt$7.PLACEHOLDER){var p=f.loadingImagery.imageryLayer;if(p.imageryProvider.ready){f.freeResources(),c.splice(r,1),p._createTileImagerySkeletons(e,t,r),--r,o=c.length;continue}s=!1}var _,m=void 0;if(f.loadingImagery.imageryLayer._imageryProvider instanceof M$S&&(m=f.loadingImagery.imageryLayer._imageryProvider,h=!0),i.camera._scene._mvtVisibleControl){var g=i.camera._scene._mvtVisibleLevel;!e$2e(m)||e._level>i.camera._endLevel-g?(_=f.processStateMachine(e,i,n))&&e$2e(m)&&(d=!0):_=!0}else _=f.processStateMachine(e,i,n);u=u&&_,l=l||_||e$2e(f.readyImagery),s=s&&e$2e(f.loadingImagery)&&(f.loadingImagery.state===wt$7.FAILED||f.loadingImagery.state===wt$7.INVALID)}else s=!1}return(!h||d)&&(e._mvtLoaded=!0),e.upsampledFromParent=s,e.renderable=e.renderable&&(l||u),u},new h$18,b$W.prototype.set=function(e,t,i,n){this.context=e,this.surfaceTile=t,this.mesh=i,this.terrainProvider=n},b$W.prototype.execute=function(){var e=this.context,t=this.mesh,i=this.surfaceTile;!1===this.terrainProvider.isShowGlobe&&t.invalid?i.vertexArray=void 0:(i.vertexArray=v$C._createVertexArrayForMesh(e,t),e$2e(i.invalidMesh)&&(i.invalidVertexArray=v$C._createVertexArrayForMesh(e,i.invalidMesh)))};var H$O=new b$W;function me$r(e,t,i,n,r,o,a,s){H$O.set(i,t,t.mesh,n),e.jobScheduler.execute(H$O,2)&&(t.terrainState=Ee$j.READY,t.fill=t.fill&&t.fill.destroy(s))}function ve$n(e){var t=e.cache.tile_waterMaskData;if(!e$2e(t)){var i=t$U.create({context:e,pixelFormat:e.webgpu?V$12.RED:V$12.LUMINANCE,pixelDatatype:_$_.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});i.referenceCount=1,t={allWaterTexture:i,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR}),destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function ce$o(e,t){var i,n=t.terrainData.waterMask,r=ve$n(e),o=n.length;if(1===o){if(0===n[0])return;i=r.allWaterTexture}else{var a=Math.sqrt(o);(i=t$U.create({context:e,pixelFormat:e.webgpu?V$12.RED:V$12.LUMINANCE,pixelDatatype:_$_.UNSIGNED_BYTE,source:{width:a,height:a,arrayBufferView:n},sampler:r.sampler,flipY:!1})).referenceCount=0}++i.referenceCount,t.waterMaskTexture=i,e$2c.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}function le$r(e){var t=e.cache.tile_normalTextureData;if(!e$2e(t)){var i=new t$U({context:e,pixelFormat:e.webgpu?V$12.RGBA:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([0,0,255]),width:1,height:1}});i.referenceCount=1,t={allNormalTexture:i,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR}),destroy:function(){this.allNormalTexture.destroy()}},e.cache.tile_normalTextureData=t}return t}function xe$l(e,t){var i=t.normalTexture;if(e$2e(i)&&(--i.referenceCount,0===i.referenceCount&&i.destroy(),t.normalTexture=void 0),e$2e(t.terrainData)){var n=t.terrainData.normalTexture;if(e$2e(n)){var r,o=le$r(e),a=n.length/3,s=Math.sqrt(a);e.webgpu&&(n=V$12.RGBToRGBA(n,_$_.UNSIGNED_BYTE,s,s)),(r=new t$U({context:e,pixelFormat:e.webgpu?V$12.RGBA:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:o.sampler})).referenceCount=0,++r.referenceCount,t.normalTexture=r,e$2c.fromElements(0,0,1,1,t.normalTextureTranslationAndScale)}}}function pe$t(e,t){for(var i=(t=e.data).modifyTerrainMesh.minimumHeight,n=t.modifyTerrainMesh.maximumHeight,r=t.mesh,o=e.parent;!e$2e(r)&&e$2e(o)&&e$2e(o.data);)r=(t=o.data).mesh,o=o.parent;if(!e$2e(r))return t.modifyTerrainMesh.orientedBoundingBox;var a=Math.min(r.minimumHeight,i),s=Math.max(r.maximumHeight,n);return y$Y.fromRectangle(e.rectangle,a,s)}function ge$l(e,t){var i=t.data;i.modifyTerrainVertexArray=v$C._createVertexArrayForMesh(e,i.modifyTerrainMesh),i.modifyOrientedBoundingBox=pe$t(t,i),t.isModified=!0}v$C.prototype.processGridTile=function(e,t,i){for(var n=!0,r=e.data.gridImagery,o=0;o<r.length;o++){var a=r[o]._processStateMachine(e,t,i);n=n&&a}return n},v$C._createVertexArrayForMesh=function(e,t){var i=t.vertices,n=t$X.createVertexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW}),r=t.encoding.getAttributes(n),o=t.indices.indexBuffers||{},a=o[e.id];if(!e$2e(a)||a.isDestroyed()){var s=t.indices;(a=t$X.createIndexBuffer({context:e,typedArray:s,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.fromSizeInBytes(s.BYTES_PER_ELEMENT)})).vertexArrayDestroyable=!1,a.referenceCount=1,o[e.id]=a,t.indices.indexBuffers=o}else++a.referenceCount;return new c$13({context:e,attributes:r,indexBuffer:a})},v$C._freeVertexArray=function(e){if(e$2e(e)){var t=e.indexBuffer;e.destroy(),e$2e(t)&&!t.isDestroyed()&&e$2e(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}},v$C.prototype._findAncestorTileWithTerrainData=function(e){for(var t=e.parent;e$2e(t)&&(!e$2e(t.data)||!e$2e(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t},v$C.prototype._computeWaterMaskTranslationAndScale=function(e,t,i){var n=t.rectangle,r=e.rectangle,o=r.width,a=r.height,s=o/n.width,l=a/n.height;return i.x=s*(r.west-n.west)/o,i.y=l*(r.south-n.south)/a,i.z=s,i.w=l,i},v$C.prototype._computeNormalTextureTranslationAndScale=function(e,t,i){var n=t.rectangle,r=e.rectangle,o=r.width,a=r.height,s=o/n.width,l=a/n.height;return i.x=s*(r.west-n.west)/o,i.y=l*(r.south-n.south)/a,i.z=s,i.w=l,i},v$C.prototype.createModifyVertexArray=function(e,t,i,n,r,o,a){var s;if(e$2e(this.modifyTerrainVertexArray)&&(this.modifyTerrainData=void 0,this.modifyTerrainMesh=void 0,this.modifyTerrainVertexArray=!this.modifyTerrainVertexArray.isDestroyed()&&this.modifyTerrainVertexArray.destroy()),e$2e(s=a?Ne$h.upsampleTerrainData(i):Ne$h.createTerrainData(i,n,r,o,t._extractExtendHeight))){this.modifyTerrainData=s,this.modifyTerrainMesh=Ne$h.createTerrainMesh(i,s),ge$l(e,i);var l=i._level+" "+i._x+i._y;t._modifyTilesMap[l]=i}},v$C.prototype.freeModifyResource=function(){v$C._freeVertexArray(this.modifyTerrainVertexArray),this.modifyTerrainVertexArray=void 0,v$C._freeVertexArray(this.subDivisionVertexArray),this.subDivisionVertexArray=void 0,this.modifyTerrainData=void 0,this.modifyOrientedBoundingBox=void 0,this.subDivisionMesh=void 0},v$C.prototype.setShowInvalid=function(e){if(this.invalid!==e){if(e$2e(this.vertexArray)&&e$2e(this.invalidVertexArray)){var t=this.invalidOrientedBoundingBox,i=this.invalidOccludeePointInScaledSpace,n=this.invalidVertexArray,r=this.invalidMesh,o=this.invalidTerrainData;this.invalidOrientedBoundingBox=this.orientedBoundingBox,this.invalidOccludeePointInScaledSpace=this.occludeePointInScaledSpace,this.invalidVertexArray=this.vertexArray,this.invalidMesh=this.mesh,this.invalidTerrainData=this.terrainData,this.orientedBoundingBox=t,this.occludeePointInScaledSpace=i,this.vertexArray=n,this.mesh=r,this.terrainData=o,this.invalid=e}else if(this.terrainState===Ee$j.RECEIVED){if(e$2e(this.terrainData)&&e$2e(this.invalidTerrainData)){o=this.invalidTerrainData;this.invalidTerrainData=this.terrainData,this.terrainData=o,this.invalid=e}}else if(this.terrainState===Ee$j.TRANSFORMED&&e$2e(this.mesh)&&e$2e(this.invalidMesh)){t=this.invalidOrientedBoundingBox,i=this.invalidOccludeePointInScaledSpace,r=this.invalidMesh,o=this.invalidTerrainData;this.invalidOrientedBoundingBox=this.orientedBoundingBox,this.invalidOccludeePointInScaledSpace=this.occludeePointInScaledSpace,this.invalidMesh=this.mesh,this.invalidTerrainData=this.terrainData,this.orientedBoundingBox=t,this.occludeePointInScaledSpace=i,this.mesh=r,this.terrainData=o,this.invalid=e}this.boundingVolumeSourceTile=void 0}};var T$K={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7};function Q$L(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new e$2c}Q$L.prototype.update=function(e,t,i){this.changedThisFrame&&(Le$l(e,t,this.tile,i),this.changedThisFrame=!1)},Q$L.prototype.destroy=function(e){e$2e(this.vertexArray)&&(e$2e(e)?e.push(this.vertexArray):v$C._freeVertexArray(this.vertexArray,e),this.vertexArray=void 0),e$2e(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};var Qe$8=new r$17;function k$H(e,t,i,n,r,o,a,s,l){if(void 0!==n){for(var u=n;u&&(u._lastSelectionResultFrame!==r||D$J.wasKicked(u._lastSelectionResult)||D$J.originalResult(u._lastSelectionResult)===D$J.CULLED);){if(a)return;var c=u.parent;if(o>=T$K.NORTHWEST&&void 0!==c)switch(o){case T$K.NORTHWEST:u=u===c.northwestChild?c:void 0;break;case T$K.NORTHEAST:u=u===c.northeastChild?c:void 0;break;case T$K.SOUTHWEST:u=u===c.southwestChild?c:void 0;break;case T$K.SOUTHEAST:u=u===c.southeastChild?c:void 0}else u=c}if(void 0!==u){if(u._lastSelectionResult===D$J.RENDERED){if(e$2e(u.data.vertexArray))return;return void De$j(e,t,i,u,o,r,s,l)}if(D$J.originalResult(n._lastSelectionResult)!==D$J.CULLED)switch(o){case T$K.WEST:k$H(e,t,i,n.northwestChild,r,o,!0,s,l),k$H(e,t,i,n.southwestChild,r,o,!0,s,l);break;case T$K.EAST:k$H(e,t,i,n.southeastChild,r,o,!0,s,l),k$H(e,t,i,n.northeastChild,r,o,!0,s,l);break;case T$K.SOUTH:k$H(e,t,i,n.southwestChild,r,o,!0,s,l),k$H(e,t,i,n.southeastChild,r,o,!0,s,l);break;case T$K.NORTH:k$H(e,t,i,n.northeastChild,r,o,!0,s,l),k$H(e,t,i,n.northwestChild,r,o,!0,s,l);break;case T$K.NORTHWEST:k$H(e,t,i,n.northwestChild,r,o,!0,s,l);break;case T$K.NORTHEAST:k$H(e,t,i,n.northeastChild,r,o,!0,s,l);break;case T$K.SOUTHWEST:k$H(e,t,i,n.southwestChild,r,o,!0,s,l);break;case T$K.SOUTHEAST:k$H(e,t,i,n.southeastChild,r,o,!0,s,l);break;default:throw new t$15("Invalid edge")}}}}function De$j(e,t,i,n,r,o,a,s){var l=n.data;if(void 0===l.fill)l.fill=new Q$L(n);else if(l.fill.visitedFrame===o)return;l.fill.enqueuedFrame!==o&&(l.fill.enqueuedFrame=o,l.fill.changedThisFrame=!1,a.enqueue(n)),ye$i(e,t,i,n,r,s)}function ye$i(e,t,i,n,r,o){var a,s,l,u=n.data.fill,c=i.data.fill;switch(e$2e(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(Le$l(e,t,i,o),c.changedThisFrame=!1),a=i.data.fill.mesh):a=i.data.mesh,r){case T$K.WEST:s=u.westMeshes,l=u.westTiles;break;case T$K.SOUTH:s=u.southMeshes,l=u.southTiles;break;case T$K.EAST:s=u.eastMeshes,l=u.eastTiles;break;case T$K.NORTH:s=u.northMeshes,l=u.northTiles;break;case T$K.NORTHWEST:return u.changedThisFrame=u.changedThisFrame||u.northwestMesh!==a,u.northwestMesh=a,void(u.northwestTile=i);case T$K.NORTHEAST:return u.changedThisFrame=u.changedThisFrame||u.northeastMesh!==a,u.northeastMesh=a,void(u.northeastTile=i);case T$K.SOUTHWEST:return u.changedThisFrame=u.changedThisFrame||u.southwestMesh!==a,u.southwestMesh=a,void(u.southwestTile=i);case T$K.SOUTHEAST:return u.changedThisFrame=u.changedThisFrame||u.southeastMesh!==a,u.southeastMesh=a,void(u.southeastTile=i)}if(i.level<=n.level)return u.changedThisFrame=u.changedThisFrame||s[0]!==a||1!==s.length,s[0]=a,l[0]=i,s.length=1,void(l.length=1);var h,d,f,p,_=i.rectangle,m=n.rectangle;switch(r){case T$K.WEST:for(p=(m.north-m.south)*e$2d.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2d.greaterThan(_.north,f.south,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2d.greaterThanOrEquals(_.south,f.north,p));++d);break;case T$K.SOUTH:for(p=(m.east-m.west)*e$2d.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2d.lessThan(_.west,f.east,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2d.lessThanOrEquals(_.east,f.west,p));++d);break;case T$K.EAST:for(p=(m.north-m.south)*e$2d.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2d.lessThan(_.south,f.north,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2d.lessThanOrEquals(_.north,f.south,p));++d);break;case T$K.NORTH:for(p=(m.east-m.west)*e$2d.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2d.greaterThan(_.east,f.west,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2d.greaterThanOrEquals(_.west,f.east,p));++d);}d-h==1?(u.changedThisFrame=u.changedThisFrame||s[h]!==a,s[h]=a,l[h]=i):(u.changedThisFrame=!0,s.splice(h,d-h,a),l.splice(h,d-h,i))}Q$L.updateFillTiles=function(e,t,i,n){var r=e._quadtree,o=r._levelZeroTiles,a=r._lastSelectionFrameNumber,s=Qe$8;s.clear();for(var l=0;l<t.length;++l){e$2e(t[l].data.vertexArray)&&s.enqueue(t[l])}for(var u=s.dequeue();void 0!==u;){var c=u.findTileToWest(o),h=u.findTileToSouth(o),d=u.findTileToEast(o),f=u.findTileToNorth(o);k$H(e,i,u,c,a,T$K.EAST,!1,s,n),k$H(e,i,u,h,a,T$K.NORTH,!1,s,n),k$H(e,i,u,d,a,T$K.WEST,!1,s,n),k$H(e,i,u,f,a,T$K.SOUTH,!1,s,n);var p=c.findTileToNorth(o),_=c.findTileToSouth(o),m=d.findTileToNorth(o),g=d.findTileToSouth(o);k$H(e,i,u,p,a,T$K.SOUTHEAST,!1,s,n),k$H(e,i,u,m,a,T$K.SOUTHWEST,!1,s,n),k$H(e,i,u,_,a,T$K.NORTHEAST,!1,s,n),k$H(e,i,u,g,a,T$K.NORTHWEST,!1,s,n),u=s.dequeue()}};var G$U=new a$18,xe$k=new a$18,$$H=new o$1p,ke$c=new o$1p,de$o=new o$1o,Te$j=new o$1o,C$O=new o$1o;function re$y(){this.height=0,this.encodedNormal=new o$1o}function he$m(e,t,i,n,r,o,a,s,l){if(e$2e(r))return r;var u;if(e$2e(o)&&e$2e(a))u=.5*(o.height+a.height);else if(e$2e(o))u=o.height;else if(e$2e(a))u=a.height;else if(e$2e(s))u=s.height;else{var c=e.tile.data.tileBoundingRegion,h=0,d=0;e$2e(c)&&(h=c.minimumHeight,d=c.maximumHeight),u=.5*(h+d)}return Ce$g(e,t,i,n,u,l),l}var et$b={minimumHeight:0,maximumHeight:0},pe$s=new re$y,We$e=new re$y,be$n=new re$y,Ue$f=new re$y,tt$b=typeof Uint8Array<"u"?new Uint8Array(81):void 0;function Le$l(e,t,i,n){v$C.initialize(i,e.terrainProvider,e._terrainLayers,e._imageryLayers);var r=i.data,o=r.fill,a=i.rectangle,s=i.tilingScheme.ellipsoid,l=ne$w(o,s,0,1,o.northwestTile,o.northwestMesh,o.northTiles,o.northMeshes,o.westTiles,o.westMeshes,be$n),u=ne$w(o,s,0,0,o.southwestTile,o.southwestMesh,o.westTiles,o.westMeshes,o.southTiles,o.southMeshes,pe$s),c=ne$w(o,s,1,0,o.southeastTile,o.southeastMesh,o.southTiles,o.southMeshes,o.eastTiles,o.eastMeshes,We$e),h=ne$w(o,s,1,1,o.northeastTile,o.northeastMesh,o.eastTiles,o.eastMeshes,o.northTiles,o.northMeshes,Ue$f);l=he$m(o,s,0,1,l,u,h,c,be$n),u=he$m(o,s,0,0,u,l,c,h,pe$s),c=he$m(o,s,1,1,c,u,h,l,We$e),h=he$m(o,s,1,1,h,c,l,u,Ue$f);var d,f,p=u.height,_=c.height,m=l.height,g=h.height,x=Math.min(p,_,m,g),y=Math.max(p,_,m,g),v=.5*(x+y),$=e.getLevelMaximumGeometricError(i.level),b=s.maximumRadius-$,T=4*Math.acos(b/s.maximumRadius);if(T*=1.5,a.width>T&&y-x<=$){var C=new T$L({width:9,height:9,buffer:tt$b,structure:{heightOffset:y}});o.mesh=C._createMeshSync(i.tilingScheme,i.x,i.y,i.level,1)}else{var S=new h$M(void 0,void 0,void 0,void 0,!0,!0),w=xe$k;w.longitude=.5*(a.east+a.west),w.latitude=.5*(a.north+a.south),w.height=v,S.center=s.cartographicToCartesian(w,S.center);var E,P=5;for(d=0,f=(E=o.westMeshes).length;d<f;++d)e$2e(E[d])&&(P+=E[d].eastIndicesNorthToSouth.length);for(d=0,f=(E=o.southMeshes).length;d<f;++d)e$2e(E[d])&&(P+=E[d].northIndicesWestToEast.length);for(d=0,f=(E=o.eastMeshes).length;d<f;++d)e$2e(E[d])&&(P+=E[d].westIndicesSouthToNorth.length);for(d=0,f=(E=o.northMeshes).length;d<f;++d)e$2e(E[d])&&(P+=E[d].southIndicesEastToWest.length);var A=et$b;A.minimumHeight=x,A.maximumHeight=y;var L=S.getStride(),M=new Float32Array(P*L),R=0,O=R;e$2e(l.height)&&!isNaN(l.height)&&(R=ce$n(o,s,S,M,R=ie$t(s,a,S,M,R,0,1,l.height,l.encodedNormal,1,A),o.westTiles,o.westMeshes,T$K.EAST,A));var D=R;e$2e(u.height)&&!isNaN(u.height)&&(R=ce$n(o,s,S,M,R=ie$t(s,a,S,M,R,0,0,u.height,u.encodedNormal,0,A),o.southTiles,o.southMeshes,T$K.NORTH,A));var I=R;e$2e(c.height)&&!isNaN(c.height)&&(R=ce$n(o,s,S,M,R=ie$t(s,a,S,M,R,1,0,c.height,c.encodedNormal,0,A),o.eastTiles,o.eastMeshes,T$K.WEST,A));var F=R;e$2e(h.height)&&!isNaN(h.height)&&(R=ce$n(o,s,S,M,R=ie$t(s,a,S,M,R,1,1,h.height,h.encodedNormal,1,A),o.northTiles,o.northMeshes,T$K.SOUTH,A)),x=isNaN(A.minimumHeight)?0:A.minimumHeight,y=isNaN(A.maximumHeight)?0:A.maximumHeight;var B=y$Y.fromRectangle(a,x,y,i.tilingScheme.ellipsoid),N=t$N.geodeticLatitudeToMercatorAngle(a.south),G=1/(t$N.geodeticLatitudeToMercatorAngle(a.north)-N),z=(t$N.geodeticLatitudeToMercatorAngle(w.latitude)-N)*G;s.geodeticSurfaceNormalCartographic(G$U,ke$c);var U=t$$.octEncode(ke$c,de$o),V=R;S.encode(M,R*L,B.center,o$1o.fromElements(.5,.5,C$O),v,U,z);var k,W=++R,H=3*(W-1),q=H*(W<256?1:2);if((M.length-W*L)*Float32Array.BYTES_PER_ELEMENT>=q){var j=W*L*Float32Array.BYTES_PER_ELEMENT;k=W<256?new Uint8Array(M.buffer,j,H):new Uint16Array(M.buffer,j,H)}else k=W<256?new Uint8Array(H):new Uint16Array(H);M=new Float32Array(M.buffer,0,W*L);var X=0;for(d=0;d<W-2;++d)k[X++]=V,k[X++]=d,k[X++]=d+1;k[X++]=V,k[X++]=d,k[X++]=0;var Y=[];for(d=D;d>=O;--d)Y.push(d);var Z=[];for(d=I;d>=D;--d)Z.push(d);var K=[];for(d=F;d>=I;--d)K.push(d);var Q=[];for(Q.push(0),d=V-1;d>=F;--d)Q.push(d);o.mesh=new T$M(S.center,M,k,H,W,x,y,i$1d.fromOrientedBoundingBox(B),nt$7(e,B.center,a,x,y),S.getStride(),B,S,t.terrainExaggeration,Y,Z,K,Q)}var J=t.context;e$2e(o.vertexArray)&&(e$2e(n)?0!==o.mesh.vertices.length&&0!==o.mesh.indices.length&&n.push(o.vertexArray):v$C._freeVertexArray(o.vertexArray)),0!==o.mesh.vertices.length&&0!==o.mesh.indices.length&&(o.vertexArray=v$C._createVertexArrayForMesh(J,o.mesh)),r.processImagery(i,e.terrainProvider,t,!0);var ee=o.waterMaskTexture;if(o.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){var te=r._findAncestorTileWithTerrainData(i);e$2e(te)&&e$2e(te.data.waterMaskTexture)&&(o.waterMaskTexture=te.data.waterMaskTexture,++o.waterMaskTexture.referenceCount,r._computeWaterMaskTranslationAndScale(i,te,o.waterMaskTranslationAndScale))}e$2e(ee)&&(--ee.referenceCount,0===ee.referenceCount&&ee.destroy())}function ie$t(e,t,i,n,r,o,a,s,l,u,c){var h=G$U;h.longitude=e$2d.lerp(t.west,t.east,o),h.latitude=e$2d.lerp(t.south,t.north,a),h.height=s;var d=e.cartographicToCartesian(h,$$H),f=Te$j;return f.x=o,f.y=a,i.encode(n,r*i.getStride(),d,f,s,l,u),c.minimumHeight=Math.min(c.minimumHeight,s),c.maximumHeight=Math.max(c.maximumHeight,s),r+1}var oe$o=new h$18;function D$I(e,t,i,n){var r=e.rectangle,o=t.rectangle;0===t.x&&1===i.x&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?((r=h$18.clone(e.rectangle,oe$o)).west-=e$2d.TWO_PI,r.east-=e$2d.TWO_PI):0===e.x&&0===i.x&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&((r=h$18.clone(e.rectangle,oe$o)).west+=e$2d.TWO_PI,r.east+=e$2d.TWO_PI);var a=r.east-r.west,s=(o.west-r.west)/a,l=(o.east-r.west)/a,u=r.north-r.south,c=(o.south-r.south)/u,h=(o.north-r.south)/u,d=(i.x-s)/(l-s),f=(i.y-c)/(h-c);return Math.abs(d)<Math.EPSILON5?d=0:Math.abs(d-1)<Math.EPSILON5&&(d=1),Math.abs(f)<Math.EPSILON5?f=0:Math.abs(f-1)<Math.EPSILON5&&(f=1),n.x=d,n.y=f,n}var at$9=new o$1o;function ge$k(e,t,i,n,r){var o=e.encoding,a=e.vertices;if(r.height=o.decodeHeight(a,t),o.hasVertexNormals)o.getOctEncodedNormal(a,t,r.encodedNormal);else{var s=r.encodedNormal;s.x=0,s.y=0}}var st$5=new o$1o,rt$c=new o$1p;function ht$5(e,t,i,n,r,o,a,s,l,u){var c,h=n.encoding,d=n.vertices,f=D$I(t,i,h.decodeTextureCoordinates(d,r,C$O),C$O),p=D$I(t,i,h.decodeTextureCoordinates(d,o,Te$j),Te$j);c=l?(a-f.x)/(p.x-f.x):(s-f.y)/(p.y-f.y);var _,m=h.decodeHeight(d,r),g=h.decodeHeight(d,o),x=i.rectangle;if(G$U.longitude=e$2d.lerp(x.west,x.east,a),G$U.latitude=e$2d.lerp(x.south,x.north,s),u.height=G$U.height=e$2d.lerp(m,g,c),!h.isModify)if(h.hasVertexNormals){var y=h.getOctEncodedNormal(d,r,at$9),v=h.getOctEncodedNormal(d,o,st$5),$=t$$.octDecode(y.x,y.y,$$H),b=t$$.octDecode(v.x,v.y,rt$c);_=o$1p.lerp($,b,c,$$H),o$1p.normalize(_,_),t$$.octEncode(_,u.encodedNormal)}else _=e.geodeticSurfaceNormalCartographic(G$U,$$H),t$$.octEncode(_,u.encodedNormal)}function Ce$g(e,t,i,n,r,o){o.height=r;var a=t.geodeticSurfaceNormalCartographic(G$U,$$H);t$$.octEncode(a,o.encodedNormal)}function ne$w(e,t,i,n,r,o,a,s,l,u,c){var h;return _e$o(e,t,s,a,!1,i,n,c)||_e$o(e,t,u,l,!0,i,n,c)?c:ve$m(r,o)?(ge$k(o,0===i?0===n?o.eastIndicesNorthToSouth[0]:o.southIndicesEastToWest[0]:0===n?o.northIndicesWestToEast[0]:o.westIndicesSouthToNorth[0],i,n,c),c):e$2e(h=0===i?0===n?fe$p(e.westMeshes,e.westTiles,T$K.EAST,e.southMeshes,e.southTiles,T$K.NORTH):fe$p(e.northMeshes,e.northTiles,T$K.SOUTH,e.westMeshes,e.westTiles,T$K.EAST):0===n?fe$p(e.southMeshes,e.southTiles,T$K.NORTH,e.eastMeshes,e.eastTiles,T$K.WEST):fe$p(e.eastMeshes,e.eastTiles,T$K.WEST,e.northMeshes,e.northTiles,T$K.SOUTH))?(Ce$g(e,t,i,n,h,c),c):void 0}function fe$p(e,t,i,n,r,o,a,s){var l=Re$i(e,t,!1,i),u=Re$i(n,r,!0,o);return e$2e(l)&&e$2e(u)?.5*(l+u):e$2e(l)?l:u}function ce$n(e,t,i,n,r,o,a,s,l){for(var u=0;u<o.length;++u)e$2e(a[u])&&(r=it$6(e,t,i,n,r,o[u],a[u],s,l));return r}function it$6(e,t,i,n,r,o,a,s,l){var u=o.rectangle;s===T$K.EAST&&0===e.tile.x?((u=h$18.clone(o.rectangle,oe$o)).west-=e$2d.TWO_PI,u.east-=e$2d.TWO_PI):s===T$K.WEST&&0===o.x&&((u=h$18.clone(o.rectangle,oe$o)).west+=e$2d.TWO_PI,u.east+=e$2d.TWO_PI);var c,h,d,f,p=e.tile.rectangle;switch(r>0&&(i.decodeTextureCoordinates(n,r-1,C$O),c=C$O.x,h=C$O.y),s){case T$K.WEST:d=a.westIndicesSouthToNorth,f=!1;break;case T$K.NORTH:d=a.northIndicesWestToEast,f=!0;break;case T$K.EAST:d=a.eastIndicesNorthToSouth,f=!1;break;case T$K.SOUTH:d=a.southIndicesEastToWest,f=!0}var _,m,g=o,x=e.tile,y=a.encoding,v=a.vertices,$=i.getStride();y.hasWebMercatorT&&(_=t$N.geodeticLatitudeToMercatorAngle(p.south),m=1/(t$N.geodeticLatitudeToMercatorAngle(p.north)-_));for(var b=0;b<d.length;++b){var T=d[b],C=y.decodeTextureCoordinates(v,T,C$O);D$I(g,x,C,C);var S=C.x,w=C.y,E=f?S:w;if(!(E<0||E>1||Math.abs(S-c)<e$2d.EPSILON5&&Math.abs(w-h)<e$2d.EPSILON5)){var P=Math.abs(S)<e$2d.EPSILON5||Math.abs(S-1)<e$2d.EPSILON5,A=Math.abs(w)<e$2d.EPSILON5||Math.abs(w-1)<e$2d.EPSILON5;if(!P||!A){var L,M=y.decodePosition(v,T,$$H),R=y.decodeHeight(v,T);y.hasVertexNormals?L=y.getOctEncodedNormal(v,T,de$o):((L=de$o).x=0,L.y=0);var O=w;if(y.hasWebMercatorT){var D=e$2d.lerp(p.south,p.north,w);O=(t$N.geodeticLatitudeToMercatorAngle(D)-_)*m}i.encode(n,r*$,M,C,R,L,O),l.minimumHeight=Math.min(l.minimumHeight,R),l.maximumHeight=Math.max(l.maximumHeight,R),++r}}}return r}function Re$i(e,t,i,n,r,o){var a,s,l;i?(a=0,s=e.length,l=1):(a=e.length-1,s=-1,l=-1);for(var u=a;u!==s;u+=l){var c=e[u];if(ve$m(t[u],c)){var h;switch(n){case T$K.WEST:h=c.westIndicesSouthToNorth;break;case T$K.SOUTH:h=c.southIndicesEastToWest;break;case T$K.EAST:h=c.eastIndicesNorthToSouth;break;case T$K.NORTH:h=c.northIndicesWestToEast}var d=h[i?0:h.length-1];if(e$2e(d))return c.encoding.decodeHeight(c.vertices,d)}}}function ve$m(e,t){return e$2e(t)&&(!e$2e(e.data.fill)||!e.data.fill.changedThisFrame)}function _e$o(e,t,i,n,r,o,a,s){var l,u,c,h,d,f=n[r?0:i.length-1],p=i[r?0:i.length-1];if(ve$m(f,p)&&(0===o?0===a?(l=r?p.northIndicesWestToEast:p.eastIndicesNorthToSouth,u=r,c=r):(l=r?p.eastIndicesNorthToSouth:p.southIndicesEastToWest,u=!r,c=!1):0===a?(l=r?p.westIndicesSouthToNorth:p.northIndicesWestToEast,u=!r,c=!0):(l=r?p.southIndicesEastToWest:p.westIndicesSouthToNorth,u=r,c=!r),l.length>0)){d=l[h=r?0:l.length-1],p.encoding.decodeTextureCoordinates(p.vertices,d,C$O);var _=D$I(f,e.tile,C$O,C$O);if(_.x===o&&_.y===a)return ge$k(p,d,o,a,s),!0;if(h=a$17(l,u?o:a,(function(t,i){p.encoding.decodeTextureCoordinates(p.vertices,t,C$O);var n=D$I(f,e.tile,C$O,C$O);return c?u?n.x-o:n.y-a:u?o-n.x:a-n.y})),!(h<0))return ge$k(p,l[h],o,a,s),!0;if((h=~h)>0&&h<l.length)return ht$5(t,f,e.tile,p,l[h-1],l[h],o,a,u,s),!0}return!1}var ot$6=[new o$1p,new o$1p,new o$1p,new o$1p];function nt$7(e,t,i,n,r,o){var a=e.quadtree._occluders.ellipsoid,s=a.ellipsoid,l=ot$6;return o$1p.fromRadians(i.west,i.south,r,s,l[0]),o$1p.fromRadians(i.east,i.south,r,s,l[1]),o$1p.fromRadians(i.west,i.north,r,s,l[2]),o$1p.fromRadians(i.east,i.north,r,s,l[3]),a.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,n,o)}var _0x587024=(_0xe55824=!0,function(e,t){var i=_0xe55824?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe55824=!1,i}),_0x4d586f=_0x587024(void 0,(function(){return _0x4d586f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d586f).search("(((.+)+)+)+$")})),_0xe55824;_0x4d586f();var Ra$3="attribute vec4 position;\nattribute vec2 st;\nvarying vec2 v_texCoord;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n v_texCoord = st;\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n v_positionMC = vec4(position.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(position.xyz, 1.0)).xyz;\n}",_0x39cac9=(_0x8dc155=!0,function(e,t){var i=_0x8dc155?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8dc155=!1,i}),_0x98a45a=_0x39cac9(void 0,(function(){return _0x98a45a.toString().search("(((.+)+)+)+$").toString().constructor(_0x98a45a).search("(((.+)+)+)+$")})),_0x8dc155;_0x98a45a();var Ca$2="varying vec2 v_texCoord;\nuniform sampler2D texture1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n vec4 baseColorWithAlpha = texture2D(texture1, v_texCoord);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(v_texCoord.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(v_texCoord.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, v_texCoord.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}",_0x5711ba=(_0x2f871f=!0,function(e,t){var i=_0x2f871f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f871f=!1,i}),_0x3eafe7=_0x5711ba(void 0,(function(){return _0x3eafe7.toString().search("(((.+)+)+)+$").toString().constructor(_0x3eafe7).search("(((.+)+)+)+$")})),_0x2f871f;_0x3eafe7();const _0x4621a7="u_dayTextures",_0x4aa0d3="u_gridTextures",_0x1e2c4f="u_waterMask",_0x3ca47e="u_oceanNormalMap",_0x136868="uModifyRasterTexture",_0x3be577="TileUBO",_0x55be02=16;function _0x5c8da9(e){var t=_0x37a515.call(this)||this;t._context=e,t._dayTextures=[],t._dayTexturesSampleKey=[],t._gridTextures=[],t._waterMask=void 0,t._oceanNormalMap=void 0,t._modifyRasterTexture=void 0,t._center=new o$1p,t._tileBounds=new e$2c,t._modifiedModelView=new p$1d,t._modifiedModelViewProjection=new p$1d,t._dayTextureTranslationAndScale=[];for(var i=0;i<_0x55be02;i++)t._dayTextureTranslationAndScale.push(0),t._dayTextureTranslationAndScale.push(0),t._dayTextureTranslationAndScale.push(0),t._dayTextureTranslationAndScale.push(0);t._dayTextureSize=[];for(i=0;i<_0x55be02;i++)t._dayTextureSize.push(0),t._dayTextureSize.push(0),t._dayTextureSize.push(0),t._dayTextureSize.push(0);t._dayTextureTexCoordsRectangle=[];for(i=0;i<_0x55be02;i++)t._dayTextureTexCoordsRectangle.push(0),t._dayTextureTexCoordsRectangle.push(0),t._dayTextureTexCoordsRectangle.push(0),t._dayTextureTexCoordsRectangle.push(0);t._name=_0x3be577}_0x37a515&&(_0x5c8da9.__proto__=_0x37a515),_0x5c8da9.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x5c8da9.prototype.constructor=_0x37a515,Object.defineProperties(_0x5c8da9.prototype,{}),_0x5c8da9.prototype._initUBO=function(e){this._ubo=new _0x5c4ccd(e.engine,void 0,!1,_0x3be577,!1,!1),this._ubo.addUniform("u_modifiedModelView",16),this._ubo.addUniform("u_modifiedModelViewProjection",16),this._ubo.addUniform("u_dayTextureTranslationAndScale",4,_0x55be02),this._ubo.addUniform("u_dayTextureSize",4,_0x55be02),this._ubo.addUniform("u_dayTextureTexCoordsRectangle",4,_0x55be02),this._ubo.addUniform("u_dayTextureUseWebMercatorT",1,_0x55be02),this._ubo.addUniform("u_dayTextureFlipY",1,_0x55be02),this._ubo.addUniform("u_normalTextureTranslationAndScale",4),this._ubo.addUniform("uTileBounds",4),this._ubo.addUniform("u_tileRectangle",4),this._ubo.addUniform("u_center3D",3),this._ubo.addUniform("u_southAndNorthLatitude",2),this._ubo.addUniform("u_southMercatorYAndOneOverHeight",2),this._ubo.addUniform("u_useNormalTexture",1),this._ubo.create()},_0x5c8da9.prototype._textureDirty=function(e){if(this._dayTextures.length!=e.dayTextures.length)return!0;var t;for(t=0;t<this._dayTextures.length;t++)if(this._dayTextures[t].id!=e.dayTextures[t].id||this._dayTexturesSampleKey[t]!=e.dayTextures[t].samplerKey)return!0;if(this._gridTextures.length!=e.gridTextures.length)return!0;for(t=0;t<this._gridTextures.length;t++)if(this._gridTextures[t].id!=e.gridTextures[t].id)return!0;return this._waterMask!=e.waterMask||this._oceanNormalMap!=e.oceanNormalMap},_0x5c8da9.prototype.updateFromProperties=function(e){if(this._context.webgpu){var t;for(e$2e(this._ubo)||this._initUBO(this._context),this._updateUniform(e),this._ubo.updateFloatArray("u_dayTextureTranslationAndScale",this._dayTextureTranslationAndScale),this._ubo.updateFloatArray("u_dayTextureSize",this._dayTextureSize),this._ubo.updateFloatArray("u_dayTextureTexCoordsRectangle",this._dayTextureTexCoordsRectangle),this._ubo.updateFloatArray("u_dayTextureUseWebMercatorT",e.dayTextureUseWebMercatorT),this._ubo.updateFloatArray("u_dayTextureFlipY",e.dayTextureFlipY),_0x37a515.writeCartesian4ToUBO("u_normalTextureTranslationAndScale",this._ubo,e.normalTextureTranslationAndScale),_0x37a515.writeMatrix4ToUBO("u_modifiedModelView",this._ubo,this._modifiedModelView),_0x37a515.writeMatrix4ToUBO("u_modifiedModelViewProjection",this._ubo,this._modifiedModelViewProjection),_0x37a515.writeCartesian4ToUBO("uTileBounds",this._ubo,e.tileBounds),_0x37a515.writeCartesian4ToUBO("u_tileRectangle",this._ubo,e.tileRectangle),_0x37a515.writeCartesian3ToUBO("u_center3D",this._ubo,e.center3D),_0x37a515.writeCartesian2ToUBO("u_southAndNorthLatitude",this._ubo,e.southAndNorthLatitude),_0x37a515.writeCartesian2ToUBO("u_southMercatorYAndOneOverHeight",this._ubo,e.southMercatorYAndOneOverHeight),this._ubo.updateFloat("u_useNormalTexture",e.normalTexture?1:0),this._ubo.update(),this._isTextureDirty=this._textureDirty(e),this._dayTextures=e.dayTextures,this._dayTexturesSampleKey=[],t=0;t<this._dayTextures.length;t++)this._dayTexturesSampleKey.push(this._dayTextures[t].samplerKey);this._gridTextures=e.gridTextures,this._waterMask=e.waterMask,this._oceanNormalMap=e.oceanNormalMap,this._modifyRasterTexture=e.modifyRasterTexture}};var _0x29fe17=new o$1p,_0x46b2ff=new o$1p;_0x5c8da9.prototype._updateUniform=function(e){var t=this._context.uniformState.view;_0x46b2ff=o$1p.subtract(e.rtc,this._context.relativeOrigin,_0x46b2ff);var i=p$1d.multiplyByPoint(t,_0x46b2ff,_0x29fe17);p$1d.setTranslation(t,i,this._modifiedModelView);var n=this._context.uniformState.projection;p$1d.multiply(n,this._modifiedModelView,this._modifiedModelViewProjection),e.dayTextureTranslationAndScale.length>_0x55be02&&console.log("GlobeTileUBO max day texture is "+_0x55be02+", used day textures is "+e.dayTextureTranslationAndScale.length);for(var r=0;r<e.dayTextureTranslationAndScale.length;r++){var o=e.dayTextureTranslationAndScale[r];e$2c.pack(o,this._dayTextureTranslationAndScale,4*r)}for(r=0;r<e.dayTextureSize.length;r++){var a=e.dayTextureSize[r];e$2c.pack(a,this._dayTextureSize,4*r)}for(r=0;r<e.dayTextureTexCoordsRectangle.length;r++){var s=e.dayTextureTexCoordsRectangle[r];e$2c.pack(s,this._dayTextureTexCoordsRectangle,4*r)}},_0x5c8da9.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),_0x37a515.setTextureArrayToEffect(e,this._dayTextures,_0x4621a7),_0x37a515.setTextureArrayToEffect(e,this._gridTextures,_0x4aa0d3),_0x37a515.setTextureToEffect(e,this._waterMask,_0x1e2c4f),_0x37a515.setTextureToEffect(e,this._oceanNormalMap,_0x3ca47e),_0x37a515.setTextureToEffect(e,this._modifyRasterTexture,_0x136868)},_0x5c8da9.prototype.isDestroyed=function(){return!1},_0x5c8da9.prototype.destroy=function(){return i$11(this)};var L$U="varying vec2 v_textureCoordinates;\n\nuniform sampler2D colorTexture;\n\nconst float fxaaQualitySubpix = 1.0;\nconst float fxaaQualityEdgeThreshold = 0.166;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nconst vec3 kLumaCoefficients = vec3(0.2126, 0.7152, 0.0722);\n\n#define FxaaLuma(rgba) dot(rgba.rgb, kLumaCoefficients)\n\nvoid main(){\n vec2 texelSize = vec2(1.0) / czm_viewport.zw;\n\n vec2 sampleCoordS = v_textureCoordinates + vec2( 0.0, 1.0) * texelSize;\n\tvec2 sampleCoordE = v_textureCoordinates + vec2( 1.0, 0.0) * texelSize;\n\tvec2 sampleCoordN = v_textureCoordinates + vec2( 0.0,-1.0) * texelSize;\n\tvec2 sampleCoordW = v_textureCoordinates + vec2(-1.0, 0.0) * texelSize;\n\n\tvec2 sampleCoordNW = v_textureCoordinates + vec2(-1.0,-1.0) * texelSize;\n\tvec2 sampleCoordSE = v_textureCoordinates + vec2( 1.0, 1.0) * texelSize;\n\tvec2 sampleCoordNE = v_textureCoordinates + vec2( 1.0,-1.0) * texelSize;\n\tvec2 sampleCoordSW = v_textureCoordinates + vec2(-1.0, 1.0) * texelSize;\n\n\tvec2 posM;\n\n\tposM.x = v_textureCoordinates.x;\n\tposM.y = v_textureCoordinates.y;\n\n\tvec4 rgbyM = texture2D(colorTexture, v_textureCoordinates, 0.0);\n\tfloat lumaM = FxaaLuma(rgbyM);\n\tfloat lumaS = FxaaLuma(texture2D(colorTexture, sampleCoordS, 0.0));\n\tfloat lumaE = FxaaLuma(texture2D(colorTexture, sampleCoordE, 0.0));\n\tfloat lumaN = FxaaLuma(texture2D(colorTexture, sampleCoordN, 0.0));\n\tfloat lumaW = FxaaLuma(texture2D(colorTexture, sampleCoordW, 0.0));\n\tfloat maxSM = max(lumaS, lumaM);\n\tfloat minSM = min(lumaS, lumaM);\n\tfloat maxESM = max(lumaE, maxSM);\n\tfloat minESM = min(lumaE, minSM);\n\tfloat maxWN = max(lumaN, lumaW);\n\tfloat minWN = min(lumaN, lumaW);\n\tfloat rangeMax = max(maxWN, maxESM);\n\tfloat rangeMin = min(minWN, minESM);\n\tfloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\n\tfloat range = rangeMax - rangeMin;\n\tfloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\n\n// #ifndef MALI\n// \tif(range < rangeMaxClamped) \n// \t{\n// \t\tgl_FragColor = rgbyM;\n// \t\treturn;\n// \t}\n// #endif\n\n\tfloat lumaNW = FxaaLuma(texture2D(colorTexture, sampleCoordNW, 0.0));\n\tfloat lumaSE = FxaaLuma(texture2D(colorTexture, sampleCoordSE, 0.0));\n\tfloat lumaNE = FxaaLuma(texture2D(colorTexture, sampleCoordNE, 0.0));\n\tfloat lumaSW = FxaaLuma(texture2D(colorTexture, sampleCoordSW, 0.0));\n\tfloat lumaNS = lumaN + lumaS;\n\tfloat lumaWE = lumaW + lumaE;\n\tfloat subpixRcpRange = 1.0 / range;\n\tfloat subpixNSWE = lumaNS + lumaWE;\n\tfloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\n\tfloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\n\tfloat lumaNESE = lumaNE + lumaSE;\n\tfloat lumaNWNE = lumaNW + lumaNE;\n\tfloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\n\tfloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\n\tfloat lumaNWSW = lumaNW + lumaSW;\n\tfloat lumaSWSE = lumaSW + lumaSE;\n\tfloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\n\tfloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\n\tfloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\n\tfloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\n\tfloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\n\tfloat edgeVert = abs(edgeVert3) + edgeVert4;\n\tfloat subpixNWSWNESE = lumaNWSW + lumaNESE;\n\tfloat lengthSign = texelSize.x;\n\tbool horzSpan = edgeHorz >= edgeVert;\n\tfloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\n\n\tif (!horzSpan)\n\t{\n\t\tlumaN = lumaW;\n\t}\n\n\tif (!horzSpan) \n\t{\n\t\tlumaS = lumaE;\n\t}\n\n\tif (horzSpan) \n\t{\n\t\tlengthSign = texelSize.y;\n\t}\n\n\tfloat subpixB = (subpixA * (1.0 / 12.0)) - lumaM;\n\tfloat gradientN = lumaN - lumaM;\n\tfloat gradientS = lumaS - lumaM;\n\tfloat lumaNN = lumaN + lumaM;\n\tfloat lumaSS = lumaS + lumaM;\n\tbool pairN = abs(gradientN) >= abs(gradientS);\n\tfloat gradient = max(abs(gradientN), abs(gradientS));\n\n\tif (pairN)\n\t{\n\t\tlengthSign = -lengthSign;\n\t}\n\n\tfloat subpixC = clamp(abs(subpixB) * subpixRcpRange, 0.0, 1.0);\n\tvec2 posB;\n\n\tposB.x = posM.x;\n\tposB.y = posM.y;\n\n\tvec2 offNP;\n\n\toffNP.x = (!horzSpan) ? 0.0 : texelSize.x;\n\toffNP.y = (horzSpan) ? 0.0 : texelSize.y;\n\n\tif (!horzSpan) \n\t{\n\t\tposB.x += lengthSign * 0.5;\n\t}\n\n\tif (horzSpan)\n\t{\n\t\tposB.y += lengthSign * 0.5;\n\t}\n\n\tvec2 posN;\n\n\tposN.x = posB.x - offNP.x * 1.5;\n\tposN.y = posB.y - offNP.y * 1.5;\n\n\tvec2 posP;\n\n\tposP.x = posB.x + offNP.x * 1.5;\n\tposP.y = posB.y + offNP.y * 1.5;\n\n\tfloat subpixD = ((-2.0) * subpixC) + 3.0;\n\tfloat lumaEndN = FxaaLuma(texture2D(colorTexture, posN, 0.0));\n\tfloat subpixE = subpixC * subpixC;\n\tfloat lumaEndP = FxaaLuma(texture2D(colorTexture, posP, 0.0));\n\n\tif (!pairN) \n\t{\n\t\tlumaNN = lumaSS;\n\t}\n\n\tfloat gradientScaled = gradient * 1.0 / 4.0;\n\tfloat lumaMM = lumaM - lumaNN * 0.5;\n\tfloat subpixF = subpixD * subpixE;\n\tbool lumaMLTZero = lumaMM < 0.0;\n\n\tlumaEndN -= lumaNN * 0.5;\n\tlumaEndP -= lumaNN * 0.5;\n\n\tbool doneN = abs(lumaEndN) >= gradientScaled;\n\tbool doneP = abs(lumaEndP) >= gradientScaled;\n\n\tif (!doneN) \n\t{\n\t\tposN.x -= offNP.x * 3.0;\n\t}\n\n\tif (!doneN) \n\t{\n\t\tposN.y -= offNP.y * 3.0;\n\t}\n\n\tbool doneNP = (!doneN) || (!doneP);\n\n\tif (!doneP) \n\t{\n\t\tposP.x += offNP.x * 3.0;\n\t}\n\n\tif (!doneP)\n\t{\n\t\tposP.y += offNP.y * 3.0;\n\t}\n\n vec4 t0 = texture2D(colorTexture, posN.xy, 0.0);\n vec4 t1 = texture2D(colorTexture, posN.xy, 0.0);\n\tif (doneNP)\n\t{\n\t\tif (!doneN) lumaEndN = FxaaLuma(t0);\n\t\tif (!doneP) lumaEndP = FxaaLuma(t1);\n\t\tif (!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n\t\tif (!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n\t\n\t\tdoneN = abs(lumaEndN) >= gradientScaled;\n\t\tdoneP = abs(lumaEndP) >= gradientScaled;\n\t\n\t\tif (!doneN) posN.x -= offNP.x * 12.0;\n\t\tif (!doneN) posN.y -= offNP.y * 12.0;\n\t\n\t\tdoneNP = (!doneN) || (!doneP);\n\t\n\t\tif (!doneP) posP.x += offNP.x * 12.0;\n\t\tif (!doneP) posP.y += offNP.y * 12.0;\n\t}\n\n\tfloat dstN = posM.x - posN.x;\n\tfloat dstP = posP.x - posM.x;\n\n\tif (!horzSpan)\n\t{\n\t\tdstN = posM.y - posN.y;\n\t}\n\tif (!horzSpan) \n\t{\n\t\tdstP = posP.y - posM.y;\n\t}\n\n\tbool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\n\tfloat spanLength = (dstP + dstN);\n\tbool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\n\tfloat spanLengthRcp = 1.0 / spanLength;\n\tbool directionN = dstN < dstP;\n\tfloat dst = min(dstN, dstP);\n\tbool goodSpan = directionN ? goodSpanN : goodSpanP;\n\tfloat subpixG = subpixF * subpixF;\n\tfloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\n\tfloat subpixH = subpixG * fxaaQualitySubpix;\n\tfloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\n\tfloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\n\n\tif (!horzSpan)\n\t{\n\t\tposM.x += pixelOffsetSubpix * lengthSign;\n\t}\n\n\tif (horzSpan)\n\t{\n\t\tposM.y += pixelOffsetSubpix * lengthSign;\n\t}\n\n#ifdef MALI\n\tif(range < rangeMaxClamped) \n\t{\n\t\tgl_FragColor = rgbyM;\n\t}\n\telse\n\t{\n\t\tgl_FragColor = texture2D(colorTexture, posM, 0.0);\n\t}\n#else\n\tgl_FragColor = texture2D(colorTexture, posM, 0.0);\n#endif\n}";function R$H(e){if(!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.terrainProvider))throw new t$15("options.terrainProvider is required.");if(!e$2e(e.imageryLayers))throw new t$15("options.imageryLayers is required.");if(!e$2e(e.surfaceShaderSet))throw new t$15("options.surfaceShaderSet is required.");this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=W$X.RECEIVE_ONLY,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=0,this.undergroundColorAlphaByDistance=0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._terrainLayers=e.terrainLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._pickRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new o$1h,this._imageryLayers.layerAdded.addEventListener(R$H.prototype._onLayerAdded,this),this._imageryLayers.layerRemoved.addEventListener(R$H.prototype._onLayerRemoved,this),this._imageryLayers.layerMoved.addEventListener(R$H.prototype._onLayerMoved,this),this._imageryLayers.layerShownOrHidden.addEventListener(R$H.prototype._onLayerShownOrHidden,this),this._imageryLayers.layerUpdate.addEventListener(R$H.prototype._onLayerUpdate,this),this._tileLoadedEvent=new o$1h,this._imageryLayersUpdatedEvent=new o$1h,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._pickCommands=[],this._usedDrawCommands=0,this._usedPickCommands=0,this._drawCommandsByTile={},this._modifyDrawCommandsByTile={},this._uniformMapsByTile={},this._modifyUniformMapsByTile={},this._modifyUsedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new e$1X(0,0,.5,1),this._clippingPlanes=void 0,this.cartographicLimitRectangle=h$18.clone(h$18.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._flattenTextureWidth=1024,this._flattenTexture=void 0,this._hypsometricSetting=void 0,this._hypsometricTexture=void 0,this._hypsometricRenderTexture=void 0,this._hypsometricRegion=void 0,this._hypsometricBound=new e$2c,this._bUseHypColorTable=!1,this._bUseHypRegion=!1,this._hypsometricRegionUpdate=!1,this._hypAnalysisMode=k$S.AnalysisRegionMode.ARM_NONE,this._hypMaxInstensity=e.MaxInstensity,this._hypMinInstensity=e.MinInstensity,this._hypMaxHeight=e.MaxHeight,this._hypMinHeight=e.MinHeight,this._hypUseColorByHeight=!0,this._geoBounds=new e$2c,this._style3D=new e$1v,this._slopeSetting=void 0,this._slopeColorTexture=void 0,this._slopeArrowsTexture=void 0,this._slopePolygonTexture=void 0,this._slopeRegion=void 0,this._slopeBound=new e$2c,this._bUseSlopeColorTable=!1,this._slopeRegionUpdate=!1,this._slopeAnalysisMode=k$S.AnalysisRegionMode.ARM_NONE,this._slopeArrowUrl=n$17("Assets/Textures/arrow.png"),this._excavateRectangle=new h$18,this._clipRasterTilesMap={},this._modifyRegions=new e$1Q,this._modifyTilesMap={},this._modifyRegionUpdate=!1,this.clippingType=R$L.KeepOutside,this._excavateRegions=new e$1Q,this._excavateRegionUpdate=!1,this._extractRegions=new e$1Q,this._extractRegionsUpdate=!1,this._imageryClipRegions=new e$1Q,this._imageryClipRegionUpate=!1,this._oriClipPlane=[],this._clipPlane=[];for(var t=0;t<6;t++)this._clipPlane[t]=new e$2c(0,0,0,0),this._oriClipPlane[t]=new e$2c(0,0,0,0);this._clipMode=0,this._clipLineColor=new e$2c(1,0,0,1),this._clipping=!1,this._splitDirection=new o$1o,this._cullEnabled=!0,this._rasterTextureSizes=[256,512],this._rasterLineWidth=1,this._rasterLineFBOs=[],this._rasterAAFBOs=[],this._rasterCurrentFBOIdx=0,this._lineExpandCommand=void 0,this._lineFXAACommand=void 0,this._swipeRegion=new e$2c(0,0,1,1),this._swipeEnabled=!1,this._polygonOffset={enabled:!1,value:new o$1o(0,0)},this._excavateRegionCommands=new e$1Q,this._pbrParameter=Xe$e.NONE,this._PBRMaterialParams={metallic:0,roughness:0,baseColorFactor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissionFactor:o$1p.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1},this._excavationSideTextureUrl=n$17("Assets/Textures/excavationregion_side.jpg"),this._excavationBottomTextureUrl=n$17("Assets/Textures/excavationregion_top.jpg")}function Fa$3(e,t){var i=e.loadingImagery;e$2e(i)||(i=e.readyImagery);var n=t.loadingImagery;return e$2e(n)||(n=t.readyImagery),i.imageryLayer._layerIndex-n.imageryLayer._layerIndex}function Da$3(e){var t=e.indexBuffer;e.destroy(),!t.isDestroyed()&&e$2e(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}function Ia$3(e,t){var i=t.creditDisplay;e._terrainProvider.ready&&e$2e(e._terrainProvider.credit)&&i.addCredit(e._terrainProvider.credit);for(var n=e._imageryLayers,r=0,o=n.length;r<o;++r){var a=n.get(r).imageryProvider;e$2e(a)&&a.ready&&e$2e(a.credit)&&i.addCredit(a.credit);var s=n.get(r).gridProvider;e$2e(s)&&s.ready&&e$2e(s.credit)&&i.addCredit(s.credit)}}function oi$4(e,t){var i=t.data.mesh;if(e$2e(i)&&!i.isModified){for(var n=e.context,r=i.encoding,o=i.vertices,a=(new o$1o,new o$1p),s=new o$1p,l=i.center,u=new a$18,c=i.stride,h=o.length,d=new Array(h/c),f=0;f<h;f+=c){var p=f/c;d[p]=o$1p.unpack(o,f,d[p]),d[p]=o$1p.add(d[p],l,d[p])}for(var _=t.rectangle.width/50,m=new Array(i.indices.length),g=(f=0,m.length);f<g;f++)m[f]=i.indices[f];var x=A$1f.computeSubdivision(t$12.WGS84,d,m,_,!0),y=x.attributes.position.values;h=y.length;var v=t.rectangle,$=v.width,b=v.height,T=new Float32Array(h/3*c),C=t$N.geodeticLatitudeToMercatorAngle(v.south),S=1/(t$N.geodeticLatitudeToMercatorAngle(v.north)-C),w=0;for(f=0;f<h;f+=3){o$1p.unpack(y,f,a),a$18.fromCartesian(a,void 0,u);var E=(u.longitude-v.west)/$,P=(u.latitude-v.south)/b,A={x:E=e$2d.clamp(E,0,1),y:P=e$2d.clamp(P,0,1)};o$1p.fromRadians(u.longitude,u.latitude,0,void 0,s);var L=(t$N.geodeticLatitudeToMercatorAngle(u.latitude)-C)*S;w=r.encode(T,w,a,A,u.height,new o$1o,L)}var M=new T$M;M.encoding=i.encoding,M.vertices=T,M.indices=new Uint16Array(x.indices),M.center=o$1p.clone(l),t.data.subDivisionMesh=M,t.data.subDivisionVertexArray=t.data.subDivisionVertexArray&&t.data.subDivisionVertexArray.destroy(),t.data.subDivisionVertexArray=v$C._createVertexArrayForMesh(n,t.data.subDivisionMesh),i.isModified=!0}}Object.defineProperties(R$H.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._baseColor=e,this._firstPassInitialColor=e$2c.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._quadtree=e}},ready:{get:function(){return this._terrainProvider.ready&&(0===this._imageryLayers.length||this._imageryLayers.get(0).imageryProvider.ready)}},tilingScheme:{get:function(){return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},tileLoadedEvent:{get:function(){return this._tileLoadedEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){if(this._terrainProvider!==e||e._isSkirtDirty){if(!e$2e(e))throw new t$15("terrainProvider is required.");this._terrainProvider=e,this._terrainProvider instanceof se$r&&(this._terrainProvider._quadtree=this._quadtree),e$2e(this._quadtree)&&this._quadtree.invalidateAllTiles()}}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){h$L.setOwner(e,this,"_clippingPlanes")}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection.x=e.x,this._splitDirection.y=e.y}},excavationSideTextureUrl:{get:function(){return this._excavationSideTextureUrl},set:function(e){this._excavationSideTextureUrl=e}},excavationBottomTextureUrl:{get:function(){return this._excavationBottomTextureUrl},set:function(e){this._excavationBottomTextureUrl=e}}}),R$H.prototype.update=function(e){this._imageryLayers._update(),this.terrainProvider._isSkirtDirty&&(this.terrainProvider=this.terrainProvider,this.terrainProvider._isSkirtDirty=!1)},R$H.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile((function(e){e.data.imagery.sort(Fa$3)}))),Ia$3(this,e);for(var t=this._vertexArraysToDestroy,i=t.length,n=0;n<i;++n)Da$3(t[n]);t.length=0,e._quadtree=this._quadtree},R$H.prototype.beginUpdate=function(e){for(var t=this._tilesToRenderByTextureCount,i=0,n=t.length;i<n;++i){var r=t[i];e$2e(r)&&(r.length=0)}var o=this._clippingPlanes;e$2e(o)&&o.enabled&&o.update(e),this._usedDrawCommands=0,this._modifyUsedDrawCommands=0,this._drawCommands=[]},R$H.prototype.createTexture=function(e){if(e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:e,width:1024,height:64,pixelFormat:V$12.RGBA,flipY:!1}),e$2e(this._hypsometricSetting)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer})),e$2e(this._slopeColorTexture)||(this._slopeColorTexture=new t$U({context:e,width:1024,height:64,pixelFormat:V$12.RGBA,flipY:!1}),e$2e(this._slopeSetting)&&this._slopeColorTexture.copyFrom({width:1024,height:64,arrayBufferView:this._slopeSetting.ColorTable._imageBuffer})),!e$2e(this._slopeArrowsTexture)&&(this._slopeArrowsTexture=this._slopeArrowsTexture&&this._slopeArrowsTexture.destroy(),e$2e(this._slopeArrowUrl))){var t=this;o$1l(t$S(this._slopeArrowUrl),(function(i){t._slopeArrowUrl==t._slopeArrowUrl&&(t._slopeArrowsTexture=new t$U({context:e,source:i,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT})}))}))}},R$H.prototype.updateHypRegionFrameBuffer=function(e){if(this._hypsometricRegionUpdate){if(!e$2e(this._hypsometricRegion))return void(this._bUseHypRegion=!1);this._hypsometricRegionUpdate=!1,this._bUseHypRegion=!0,Ie$g(e.context,this._hypsometricRegion)}},R$H.prototype.updateSlopeRegionFrameBuffer=function(e){if(this._slopeRegionUpdate){if(!e$2e(this._slopeRegion))return void(this._bUseSlopeRegion=!1);this._slopeRegionUpdate=!1,this._bUseSlopeRegion=!0,Ie$g(e.context,this._slopeRegion)}},R$H.prototype.endUpdate=function(e){if(!e$2e(this._renderState)){this._renderState=d$1m.fromCache({cull:{enabled:this._cullEnabled},depthTest:{enabled:!0,func:re$G.LESS}}),this._blendRenderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:re$G.LESS_OR_EQUAL},blending:Ee$r.ALPHA_BLEND});let e=l$1f(this._renderState,!0);e.cull.enabled=!1,this._disableCullingRenderState=d$1m.fromCache(e),e=l$1f(this._blendRenderState,!0),e.cull.enabled=!1,this._disableCullingBlendRenderState=d$1m.fromCache(e)}if(e._fboState.frameBufferType!=Qe$c.CLAMP){this.createTexture(e.context),this.updateHypRegionFrameBuffer(e),this.updateSlopeRegionFrameBuffer(e),this._updateExcavateRegions(e),this._updateModifyRegions(e),this._updateImageryClipRegions(e),this._updateExtractRegions(e),dn$2(this,e),hn$3(this,e),e.rasterLineWidth>1&&e$2e(e.commandListRealtimeRaster)&&e.commandListRealtimeRaster.length>0&&(un$3(this,e),ln$3(this,e)),this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&!1!==this.terrainProvider.isShowGlobe&&Q$L.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);for(var t=0,i=this._tilesToRenderByTextureCount,n=0,r=i.length;n<r;++n){var o=i[n];if(e$2e(o)){var a=0;o.length>0&&(a=o[o.length-1]._level);for(var s=0,l=o.length;s<l;++s){o[s].realtimeRasterVectors(e,this),o[s].renderVectorBy2DCanvas(e,this);var u=o[s],c=u.data.tileBoundingRegion;if(u.data.terrainState!==Ee$j.INVALID){u.rasterClipRegion(e,this),e$2e(u.data.modifyTerrainVertexArray)&&(!e._fboState.enabled||e._fboState.name.indexOf("_excavationGlobeHeight2")>-1)&&(sr$6(this,u,void 0,a,e,!0),oi$4(e,u));for(var h=void 0,d=!1,f=e.camera._scene.terrainLayers._layers,p=1;p<f.length;p++){var _=f[p]._terrainProvider.tablename,m=u.data.terrain[_];if(e$2e(m)){if(e$2e(m.terrainData)&&e$2e(m.terrainData.hasInvalid)){if(!m.terrainData.hasInvalid){e$2e(m.terrainData)&&e$2e(m.vertexArray)&&e$2e(m.mesh)&&(u.data.terrainData=m.terrainData,u.data.vertexArray=m.vertexArray,u.data.mesh=m.mesh);break}d=!0}sr$6(this,u,m,a,e,!1,h),e$2e(m)&&(e$2e(m.mesh)&&!m.mesh.invalid&&e$2e(m.vertexArray)?(m.realtimeRasterValidTerrain(e,this,u),h=m._rasterTerrainTexture):h=void 0)}}d&&oi$4(e,u),sr$6(this,u,void 0,a,e,!1,h),e$2e(u.data)&&e$2e(u.data.terrainData)&&e$2e(u.data.terrainData._maximumHeight)&&e$2e(u.data.terrainData._minimumHeight)&&(0==s?t=.5*(u.data.terrainData._maximumHeight+u.data.terrainData._minimumHeight):t+=.5*(u.data.terrainData._maximumHeight+u.data.terrainData._minimumHeight))}e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,c.minimumHeight)}l>1&&(t/=l,e.averageTerrainHeight=t)}}if(e.commandListRealtimeRaster.length=0,!e.camera.bReflect)for(var g in this._excavateRegionCommands._hash)if((e$2e(this._excavationSideTextureUrl)||!(g.indexOf("side")>-1))&&(e$2e(this._excavationBottomTextureUrl)||!(g.indexOf("bottom")>-1))){var x=this._excavateRegionCommands._hash[g];e.commandList.push(x)}if(this._clipping){var y=e.camera.inverseViewMatrix,v=new p$1d;p$1d.transpose(y,v);for(p=0;p<6;p++)p$1d.multiplyByVector(v,this._oriClipPlane[p],this._clipPlane[p])}}},R$H.prototype.updateForPick=function(e){for(var t=this._drawCommands,i=0,n=this._usedDrawCommands;i<n;++i)e.commandList.push(t[i])},R$H.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()},R$H.prototype.getLevelMaximumGeometricError=function(e){return this._terrainProvider.getLevelMaximumGeometricError(e)},R$H.prototype.loadTile=function(e,t){var i=t.parent,n=t.data;if(e$2e(i)&&e$2e(i.data)&&i.data.terrainState===Ee$j.INVALID)return n.terrainState=Ee$j.INVALID,void(t.state=re$A.DONE);var r,o=!0;e$2e(n)&&(o=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===D$J.CULLED_BUT_NEEDED,r=n.terrainState),v$C.processStateMachine(t,e,this.terrainProvider,this._terrainLayers,this._imageryLayers,this._vertexArraysToDestroy,o),n=t.data,o&&r!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)&&n.boundingVolumeSourceTile===t&&(o=!1,v$C.processStateMachine(t,e,this.terrainProvider,this._terrainLayers,this._imageryLayers,this._vertexArraysToDestroy,o)),t.renderable&&this._tileLoadedEvent.raiseEvent(t)};var Ha$2=new i$1d,si$4=new h$18,Ma$3=new h$18,Ua$3=new a$18;function nr$7(e,t){if(t.west<t.east)return t;var i=h$18.clone(t,Ma$3);return h$18.center(e,Ua$3).longitude>0?i.east=e$2d.PI:i.west=-e$2d.PI,i}function ui$6(e,t){if(t.cameraUnderground||t.globeTranslucencyState.translucent)return!0;if(e.backFaceCulling)return!1;const i=e._clippingPlanes;return!!(e$2e(i)&&i.enabled||!h$18.equals(e.cartographicLimitRectangle,h$18.MAX_VALUE))}R$H.prototype.computeTileVisibility=function(e,t,i){var n=this.computeDistanceToTile(e,t);e._distance=n;const r=ui$6(this,t);if(t.fog.enabled&&!r&&e$2d.fog(n,t.fog.density)>=1)return fe$r.NONE;var o=e.data,a=o.tileBoundingRegion;if(void 0===o.boundingVolumeSourceTile)return fe$r.PARTIAL;var s=t.cullingVolume,l=u$Z(o.modifyOrientedBoundingBox,o.orientedBoundingBox);if(!e$2e(l)&&e$2e(o.renderedMesh))for(var u in l=o.renderedMesh.boundingSphere3D,o.terrain)l=i$1d.union(e,o.terrain[u].mesh.boundingSphere3D,l,l);o.clippedByBoundaries=!1;var c=nr$7(e.rectangle,this.cartographicLimitRectangle),h=h$18.simpleIntersection(c,e.rectangle,si$4);if(!e$2e(h))return fe$r.NONE;if(h$18.equals(h,e.rectangle)||(o.clippedByBoundaries=!0),t.mode!==C$14.SCENE3D)for(var u in l=Ha$2,i$1d.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,a.minimumHeight,a.maximumHeight,l),o$1p.fromElements(l.center.z,l.center.x,l.center.y,l.center),t.mode===C$14.MORPHING&&e$2e(o.renderedMesh)&&(l=i$1d.union(o.renderedMesh.boundingSphere3D,l,l)),o.terrain)l=i$1d.union(e,o.terrain[u].mesh.boundingSphere3D,l,l);var d=this._clippingPlanes;if(e$2e(d)&&d.enabled&&e$2e(l)){var f=d.computeIntersectionWithBoundingVolume(l);if(e.isClipped=f!==Ae$w.INSIDE,f===Ae$w.OUTSIDE)return fe$r.NONE}var p=Ae$w.INTERSECTING;if(e$2e(l)){if((p=s.computeVisibility(l))===Ae$w.OUTSIDE)for(var u in o.terrain)if(e$2e(l=o.terrain[u].orientedBoundingBox)||(l=o.tileTerrainOrientedBoundingBox),e$2e(l)&&(p=s.computeVisibility(l))!==Ae$w.OUTSIDE)break;if(p===Ae$w.OUTSIDE)return e$2e(e.parent)&&e$2e(e.parent.data.modifyOrientedBoundingBox)?s.computeVisibility(e.parent.data.modifyOrientedBoundingBox):fe$r.NONE}if(e.isModified)return p;var _=t.mode===C$14.SCENE3D&&t.camera.frustum instanceof a$V;if(t.mode===C$14.SCENE3D&&!_&&e$2e(i)&&!r){var m=o.occludeePointInScaledSpace;return!e$2e(m)||i.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(m,a.minimumHeight)?p:fe$r.NONE}return p},R$H.prototype.canRefine=function(e){return!!e$2e(e.data.terrainData)||void 0!==this.terrainProvider.getTileDataAvailable(2*e.x,2*e.y,e.level+1)};var Va$2=[],Na$1=[];R$H.prototype.canRenderWithoutLosingDetail=function(e,t){var i=e.data,n=Va$2;n.length=this._imageryLayers.length;var r,o,a,s=!1,l=!1;for(e$2e(i)&&(s=i.terrainState===Ee$j.READY,l=!0,r=i.imagery),o=0,a=n.length;o<a;++o)n[o]=l;if(e$2e(r))for(o=0,a=r.length;o<a;++o){var u=r[o];if(!e$2e(u.imageryLayer)){var c=u.loadingImagery,h=!e$2e(c)||c.state===wt$7.FAILED||c.state===wt$7.INVALID,d=(u.loadingImagery||u.readyImagery).imageryLayer._layerIndex;n[d]=h&&n[d]}}var f=this.quadtree._lastSelectionFrameNumber,p=Na$1;for(p.length=0,p.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);p.length>0;){var _=p.pop(),m=_._lastSelectionResultFrame===f?_._lastSelectionResult:D$J.NONE;if(m===D$J.RENDERED){if(!e$2e(_.data))continue;if(!s&&_.data.terrainState===Ee$j.READY)return!1;var g=_.data.imagery;for(o=0,a=g.length;o<a;++o){var x=g[o];if(!e$2e(x.imageryLayer)){var y=x.loadingImagery,v=!e$2e(y)||y.state===wt$7.FAILED||y.state===wt$7.INVALID,$=(x.loadingImagery||x.readyImagery).imageryLayer._layerIndex;if(v&&!n[$])return!1}}}else m===D$J.REFINED&&p.push(_.southwestChild,_.southeastChild,_.northwestChild,_.northeastChild)}return!0};var Oa$2=new o$1p;R$H.prototype.computeTileLoadPriority=function(e,t){var i=e.data;if(void 0===i)return 0;var n=i.orientedBoundingBox;if(void 0===n)return 0;var r=t.camera.positionWC,o=t.camera.directionWC,a=o$1p.subtract(n.center,r,Oa$2),s=o$1p.magnitude(a);return s<e$2d.EPSILON5?0:(o$1p.divideByScalar(a,s,a),(1-o$1p.dot(a,o))*e._distance)};var di$6=new p$1d,Rt$7=new p$1d,za$3=new e$2c,Ga$3=new e$2c,Wa$2=new o$1p,li$6=new o$1p,ka$2=new o$1p,qa$3=new o$1p,De$i=new o$1p;R$H.prototype.showTileThisFrame=function(e,t){for(var i=0,n=e.data.imagery,r=0,o=n.length;r<o;++r){var a=n[r];e$2e(a.readyImagery)&&0!==a.readyImagery.imageryLayer.alpha&&++i}var s=this._tilesToRenderByTextureCount[i];e$2e(s)||(s=[],this._tilesToRenderByTextureCount[i]=s),s.push(e),e$2e(e.data.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;var l=this._debug;++l.tilesRendered,l.texturesRendered+=i};var Ya$3=[new o$1p,new o$1p,new o$1p,new o$1p];function Xa$3(e,t,i,n,r,o){var a=e.quadtree._occluders.ellipsoid,s=a.ellipsoid,l=Ya$3;return o$1p.fromRadians(i.west,i.south,r,s,l[0]),o$1p.fromRadians(i.east,i.south,r,s,l[1]),o$1p.fromRadians(i.west,i.north,r,s,l[2]),o$1p.fromRadians(i.east,i.north,r,s,l[3]),a.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,n,o)}function Qa$3(e,t,i){var n=e.data;void 0===n&&(n=e.data=new v$C),void 0===n.tileBoundingRegion&&(n.tileBoundingRegion=new y$K({computeBoundingVolumes:t._enablePrjArea,rectangle:e.rectangle,ellipsoid:e.tilingScheme.ellipsoid,minimumHeight:0,maximumHeight:.1}));var r=n.terrainData,o=n.mesh,a=n.tileBoundingRegion,s=!1;for(var l in void 0!==o&&void 0!==o.minimumHeight&&void 0!==o.maximumHeight?(a.minimumHeight=o.minimumHeight,a.maximumHeight=o.maximumHeight,s=!0):void 0!==r&&void 0!==r._minimumHeight&&void 0!==r._maximumHeight?(a.minimumHeight=r._minimumHeight*i.terrainExaggeration,a.maximumHeight=r._maximumHeight*i.terrainExaggeration,s=!0):e.showInvalid&&(a.minimumHeight=0,a.maximumHeight=0,s=!0),n.terrain)e$2e(n.terrain[l].mesh)?(a.minimumHeight=Math.min(n.terrain[l].mesh.minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(n.terrain[l].mesh.maximumHeight,a.maximumHeight)):e$2e(n.terrain[l].terrainData)?(a.minimumHeight=Math.min(n.terrain[l].terrainData._minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(n.terrain[l].terrainData._maximumHeight,a.maximumHeight)):s=!1;if(s)return e;a.minimumHeight=Number.NaN,a.maximumHeight=Number.NaN;for(var u=e.parent;void 0!==u;){var c=u.data;if(void 0!==c){var h=c.mesh;if(void 0!==h&&void 0!==h.minimumHeight&&void 0!==h.maximumHeight)a.minimumHeight=h.minimumHeight,a.maximumHeight=h.maximumHeight,s=!0;else{var d=c.terrainData;void 0!==d&&void 0!==d._minimumHeight&&void 0!==d._maximumHeight&&(a.minimumHeight=d._minimumHeight*i.terrainExaggeration,a.maximumHeight=d._maximumHeight*i.terrainExaggeration,s=!0)}for(var l in c.terrain)e$2e(c.terrain[l].mesh)?(a.minimumHeight=Math.min(c.terrain[l].mesh.minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(c.terrain[l].mesh.maximumHeight,a.maximumHeight)):e$2e(c.terrain[l].terrainData)?(a.minimumHeight=Math.min(c.terrain[l].terrainData._minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(c.terrain[l].terrainData._maximumHeight,a.maximumHeight)):s=!1;if(s)return u}u=u.parent}}function hi$6(e,t,i){return function(n){var r,o,a,s=-1,l=n.data.imagery,u=l.length;for(a=0;a<u;++a)if((o=u$Z((r=l[a]).readyImagery,r.loadingImagery)).imageryLayer===t){s=a;break}if(-1!==s){var c=s+e;if(o=e$2e(r=l[c])?u$Z(r.readyImagery,r.loadingImagery):void 0,!e$2e(o)||o.imageryLayer!==t)return!t._createTileImagerySkeletons(n,i,c);for(a=s;a<c;++a)l[a].freeResources();l.splice(s,e)}return!0}}R$H.prototype.computeDistanceToTile=function(e,t){var i=Qa$3(e,this.terrainProvider,t),n=e.data,r=n.tileBoundingRegion;if(void 0===i)return 9999999999;n.boundingVolumeSourceTile!==i&&(n.boundingVolumeSourceTile=i,e$2e(e.rectangle)&&(n.orientedBoundingBox=y$Y.fromRectangle(e.rectangle,r.minimumHeight,r.maximumHeight,e.tilingScheme.ellipsoid,n.orientedBoundingBox),n.occludeePointInScaledSpace=Xa$3(this,n.orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,n.occludeePointInScaledSpace),n.tileTerrainOrientedBoundingBox=new y$Y(n.orientedBoundingBox.center,n.orientedBoundingBox.halfAxes)));var o=r.minimumHeight,a=r.maximumHeight;if(n.boundingVolumeSourceTile!==e){var s=t.camera.positionCartographic.height;Math.abs(s-o)>Math.abs(s-a)?(r.minimumHeight=o,r.maximumHeight=o):(r.minimumHeight=a,r.maximumHeight=a)}var l=r.distanceToCamera(t);return r.minimumHeight=o,r.maximumHeight=a,l},R$H.prototype._onLayerAdded=function(e,t){e.show&&(this._terrainProvider,this._imageLayerAdded(e,t),this._gridLayerAdded(e,t))},R$H.prototype._onLayerRemoved=function(e,t){e$2e(e.imageryProvider)&&(this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.imagery,n=-1,r=0,o=0,a=i.length;o<a;++o){var s=i[o],l=s.loadingImagery;if(e$2e(l)||(l=s.readyImagery),l.imageryLayer===e)-1===n&&(n=o),s.freeResources(),++r;else if(-1!==n)break}-1!==n&&i.splice(n,r)})),e$2e(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()),e$2e(e.gridProvider)&&(this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.gridImagery,n=-1,r=0,o=0,a=i.length;o<a;++o){var s=i[o],l=s.loadingGrid;if(e$2e(l)||(l=s.readyGrid),l.gridLayer===e)-1===n&&(n=o),s.freeResources(),++r;else if(-1!==n)break}-1!==n&&i.splice(n,r)})),e$2e(e.gridProvider)&&(e.gridProvider._reload=void 0))},R$H.prototype._onLayerMoved=function(e,t,i){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()},R$H.prototype._onLayerShownOrHidden=function(e,t,i){i?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)},R$H.prototype._imageLayerAdded=function(e,t){var i=this._terrainProvider,n=this,r=e.imageryProvider;if(e$2e(r)){var o=this._imageryLayersUpdatedEvent;r._reload=function(){e._imageryCache={},n._quadtree.forEachLoadedTile((function(t){if(!e$2e(t._loadedCallbacks[e._layerIndex])){var n,r=t.data.imagery,o=r.length,a=-1,s=0;for(n=0;n<o;++n){var l=r[n];if(u$Z(l.readyImagery,l.loadingImagery).imageryLayer===e)-1===a&&(a=n),++s;else if(-1!==a)break}if(-1!==a){var u=a+s;e._createTileImagerySkeletons(t,i,u)&&(t._loadedCallbacks[e._layerIndex]=hi$6(s,e,i),t.state=re$A.LOADING)}}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=re$A.LOADING,0!==t.level&&(t._lastSelectionResultFrame!==n.quadtree._lastSelectionFrameNumber||t._lastSelectionResult!==D$J.RENDERED)&&(t.renderable=!1))})),this._layerOrderChanged=!0,o.raiseEvent()}},R$H.prototype._gridLayerAdded=function(e,t){var i=this._terrainProvider,n=this,r=e.gridProvider;if(e$2e(r)){var o=this._imageryLayersUpdatedEvent;r._reload=function(){e._gridCache={},n._quadtree.forEachLoadedTile((function(t){if(!e$2e(t._loadedCallbacks[e._layerIndex])){var n,r=t.data.gridImagery,o=r.length,a=-1,s=0;for(n=0;n<o;++n){var l=r[n];if(u$Z(l.readyGrid,l.loadingGrid).gridLayer===e)-1===a&&(a=n),++s;else if(-1!==a)break}if(-1!==a){var u=a+s;e._createTileImagerySkeletons(t,i,u)&&(t._loadedCallbacks[e._layerIndex]=hi$6(s,e,i),t.state=re$A.LOADING)}}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=re$A.LOADING,0!==t.level&&(t._lastSelectionResultFrame!==n.quadtree._lastSelectionFrameNumber||t._lastSelectionResult!==D$J.RENDERED)&&(t.renderable=!1))})),this._layerOrderChanged=!0,o.raiseEvent()}},R$H.prototype._onLayerUpdate=function(e,t){e$2e(e.gridProvider)&&(this._quadtree.forEachLoadedTile((function(e){e.data.gridImagery.length>0&&(e.state=re$A.LOADING)})),e._isUpdate=!1)};var Ka$3=new p$1d,$e$9=new e$2c,ci$7,fi$6,Ct$5;function Za$3(e,t){var i={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){var t=e.context.uniformState.view;De$i=o$1p.subtract(this.properties.rtc,e.context.relativeOrigin,De$i);var i=p$1d.multiplyByPoint(t,De$i,li$6);return p$1d.setTranslation(t,i,di$6),di$6},u_modifiedModelViewProjection:function(){var t=e.context.uniformState.view,i=e.context.uniformState.projection;De$i=o$1p.subtract(this.properties.rtc,e.context.relativeOrigin,De$i);var n=p$1d.multiplyByPoint(t,De$i,li$6);return p$1d.setTranslation(t,n,Rt$7),p$1d.multiply(i,Rt$7,Rt$7),Rt$7},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureSize:function(){return this.properties.dayTextureSize},u_transparentBackColor:function(){return this.properties.transparentBackColor},u_imageryClipEnable:function(){return this.properties.imageryClipEnable},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureFlipY:function(){return this.properties.dayTextureFlipY},u_dayTextureAlpha:function(){var e=this.properties.morphingParentIndex;if(e>0){this.properties.morphingBeginTime<0&&(this.properties.morphingBeginTime=performance.now());var t=(performance.now()-this.properties.morphingBeginTime)/1e3;t=Math.min(t,1),this.properties.dayTextureAlpha[e]=1-t}return this.properties.dayTextureAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureSwipeRegion:function(){return this.properties.dayTextureSwipeRegion},u_normalTexture:function(){return this.properties.normalTexture?this.properties.normalTexture:e.context.defaultTexture},u_useNormalTexture:function(){return e$2e(this.properties.normalTexture)?1:0},u_normalTextureTranslationAndScale:function(){return this.properties.normalTextureTranslationAndScale},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){var i=t._clippingPlanes;return e$2e(i)&&e$2e(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){var i=t._clippingPlanes;return e$2e(i)?p$1d.multiply(e.context.uniformState.view,i.modelMatrix,Ka$3):p$1d.IDENTITY},u_clippingPlanesEdgeStyle:function(){var e=this.properties.clippingPlanesEdgeColor;return e.alpha=this.properties.clippingPlanesEdgeWidth,e},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_GlobeSplitDirection:function(){return this.properties.globeSplitDirection},u_GlobeSwipeRegion:function(){return $e$9.x=this.properties.globeSwipeRegion.x*e.context.drawingBufferWidth,$e$9.y=(1-this.properties.globeSwipeRegion.y)*e.context.drawingBufferHeight,$e$9.z=this.properties.globeSwipeRegion.z*e.context.drawingBufferWidth,$e$9.w=(1-this.properties.globeSwipeRegion.w)*e.context.drawingBufferHeight,$e$9},u_polygonOffset:function(){return this.properties.polygonOffset},uHypContourFillMode:function(){return this.properties.hypContourFillMode},uHypContourInterval:function(){return this.properties.hypContourInterval},uHypFloor:function(){return this.properties.hypFloor},uHypCeil:function(){return this.properties.hypCeil},uHypOpacity:function(){return this.properties.hypOpacity},uHypLineColor:function(){return this.properties.hypLineColor},uHypsometricTexture:function(){return this.properties.hypsometricTexture},uHypsometricRenderTexture:function(){return this.properties.hypsometricRenderTexture},uHypHasAnalysisRegion:function(){return this.properties.hypHasAnalysisRegion},uHypRect:function(){return this.properties.hypRect},uHypMaxVisibleValue:function(){return this.properties.hypMaxVisibleValue},uHypMinVisibleValue:function(){return this.properties.hypMinVisibleValue},uHypHasColorTable:function(){return this.properties.hypHasColorTable},uSlopeFillMode:function(){return this.properties.slopeFillMode},uSlopeRect:function(){return this.properties.slopeRect},uSlopeFloor:function(){return this.properties.slopeFloor},uSlopeCeil:function(){return this.properties.slopeCeil},uSlopeOpacity:function(){return this.properties.slopeOpacity},uSlopeColorTexture:function(){return this.properties.slopeColorTexture},uSlopePolygonTexture:function(){return this.properties.slopePolygonTexture},uSlopeArrowsTexture:function(){return this.properties.slopeArrowsTexture},uHasSlopeRegion:function(){return this.properties.hasSlopeRegion},uSlopeMaxVisibleValue:function(){return this.properties.slopeMaxVisibleValue},uSlopeMinVisibleValue:function(){return this.properties.slopeMinVisibleValue},uSlopeHasColorTable:function(){return this.properties.slopeHasColorTable},uLevel:function(){return this.properties.level},uTopLevel:function(){return this.properties.topLevel},clip_mode:function(){return this.properties.clip_mode},clip_planes:function(){return this.properties.clip_planes},clip_line_color:function(){return this.properties.clip_line_color},flattenTexture:function(){return this.properties.flattenTexture},uTileBounds:function(){return this.properties.tileBounds},u_gridTextures:function(){return this.properties.gridTextures},u_gridTextureTranslationAndScale:function(){return this.properties.gridTextureTranslationAndScale},u_gridTextureUseWebMercatorT:function(){return this.properties.gridTextureUseWebMercatorT},u_gridTextureTexCoordsRectangle:function(){return this.properties.gridTextureTexCoordsRectangle},uModifyRasterTexture:function(){return this.properties.modifyRasterTexture},uParentMixDirection:function(){return this.properties.parentMixDirection},uBaseColorFactor:function(){return this.properties.baseColorFactor},uMetallicFactor:function(){return this.properties.metallic},uRoughnessFactor:function(){return this.properties.roughness},uEmissionFactor:function(){return this.properties.emissionFactor},uFloodTexture:function(){return this.properties.floodTexture},uFloodRect:function(){return this.properties.floodRect},u_sunLightColor:function(){return this.properties.sunLightColor},u_ambientLightColor:function(){return this.properties.ambientLightColor},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},properties:{tileUBO:new _0x5c8da9(e.context),initialColor:new e$2c(0,0,.5,1),fillHighlightColor:new e$1X(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new o$1o(65e5,9e6),nightFadeDistance:new o$1o(1e7,4e7),hsbShift:new o$1p,center3D:void 0,rtc:new o$1p,modifiedModelView:new p$1d,tileRectangle:new e$2c,dayTextures:[],dayTextureTranslationAndScale:[],dayTextureSize:[],transparentBackColor:[],imageryClipEnable:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureFlipY:[],dayTextureAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureSwipeRegion:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new o$1o,southMercatorYAndOneOverHeight:new o$1o,waterMask:void 0,waterMaskTranslationAndScale:new e$2c,minMaxHeight:new o$1o,scaleAndBias:new p$1d,clippingPlanesEdgeColor:e$1X.clone(e$1X.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new e$2c,normalTexture:void 0,normalTextureTranslationAndScale:new e$2c,tileBounds:new e$2c,hypContourFillMode:0,uHypContourInterval:0,hypFloor:0,hypCeil:0,hypOpacity:1,hypLineColor:new e$1X,hypsometricTexture:void 0,hypsometricRenderTexture:void 0,hypHasAnalysisRegion:new e$2c,hypRect:new e$2c,hypMaxVisibleValue:0,hypMinVisibleValue:0,hypHasColorTable:!1,slopeFillMode:0,slopeRect:new e$2c,slopeFloor:0,slopeCeil:0,slopeOpacity:1,slopeColorTexture:void 0,slopePolygonTexture:void 0,slopeArrowsTexture:void 0,hasSlopeRegion:!1,slopeMaxVisibleValue:0,slopeMinVisibleValue:0,slopeHasColorTable:!1,level:0,topLevel:0,clip_mode:0,clip_planes:void 0,clip_line_color:new e$1X,flattenTexture:void 0,gridTextures:[],gridTextureTranslationAndScale:[],gridTextureTexCoordsRectangle:[],gridTextureUseWebMercatorT:[],modifyRasterTexture:void 0,morphingParentIndex:-1,morphingBeginTime:-1,parentMixDirection:0,baseColorFactor:new e$2c(1,1,1,1),metallic:0,roughness:0,emissionFactor:o$1p.UNIT_XYZ,floodRect:new e$2c,floodTexture:void 0,sunLightColor:new e$1X,ambientLightColor:new e$1X,frontFaceAlphaByDistance:new e$2c,backFaceAlphaByDistance:new e$2c,undergroundColor:e$1X.clone(e$1X.TRANSPARENT),undergroundColorAlphaByDistance:new e$2c}};return i}function $a$3(e,t,i){var n,r,o=i.data;if(e$2e(o.vertexArray)?(n=o.mesh,r=o.vertexArray):e$2e(o.fill)&&e$2e(o.fill.vertexArray)&&(n=o.fill.mesh,r=o.fill.vertexArray),e$2e(n)&&e$2e(r)){if(e$2e(o.wireframeVertexArray)){if(o.wireframeVertexArray.mesh===n)return;o.wireframeVertexArray.destroy(),o.wireframeVertexArray=void 0}o.wireframeVertexArray=ja$2(e,r,n),o.wireframeVertexArray.mesh=n}}function ja$2(e,t,i){var n={indices:i.indices,primitiveType:W$18.TRIANGLES};k$14.toWireframe(n);var r=n.indices,o=t$X.createIndexBuffer({context:e,typedArray:r,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new c$13({context:e,attributes:t._attributes,indexBuffer:o})}!function(){var e,t,i=new d$1o({geometry:o$17.fromDimensions({dimensions:new o$1p(2,2,2)})}),n=new d$1o({geometry:new a$U({radius:1})}),r=new p$1d;function o(e){return new y$R({geometryInstances:e,appearance:new t$Q({translucent:!1,flat:!0}),asynchronous:!1})}ci$7=function(n,a){return n===e||(Ct$5(),e=n,r=p$1d.fromRotationTranslation(n.halfAxes,n.center,r),i.modelMatrix=r,i.attributes.color=o$16.fromColor(a),t=o(i)),t},fi$6=function(i,a){return i===e||(Ct$5(),e=i,r=p$1d.fromTranslation(i.center,r),r=p$1d.multiplyByUniformScale(r,i.radius,r),n.modelMatrix=r,n.attributes.color=o$16.fromColor(a),t=o(n)),t},Ct$5=function(){e$2e(t)&&(t.destroy(),t=void 0,e=void 0)}}();var Ja$3=new e$2c(0,0,0,0),Pa$2={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applySplit:void 0,applySwipe:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,numberOfGridTextures:void 0,gridUpdate:!1};function en$3(e,t){const i=t.globeTranslucencyState;if(i.translucent){const n=e.renderState.blending.enabled;i.pushDerivedCommands(e,n,t)}else t.commandList.push(e)}var je$c=new e$2c,tn$4=e$1X.TRANSPARENT,rn$3=new o$Y;function sr$6(e,t,i,n,r,o,a){var s=t.data;if(s.terrainState===Ee$j.INVALID||!1===e.terrainProvider.isShowGlobe&&(!e$2e(s.mesh)||s.mesh.invalid)||e$2e(i)&&(!e$2e(i.mesh)||i.mesh.invalid||!e$2e(i.vertexArray))||!e$2e(s.vertexArray)&&(void 0===s.fill&&(s.fill=new Q$L(t)),s.fill.update(e,r),!e$2e(t.data.fill.vertexArray)))return;var l=r.creditDisplay,u=s.terrainData;if(e$2e(i))u=i.terrainData;if(e$2e(u)&&e$2e(u.credits))for(var c=u.credits,h=0,d=c.length;h<d;++h)l.addCredit(c[h]);var f=e$1W.maximumTextureImageUnits-1,p=s.waterMaskTexture,_=s.waterMaskTranslationAndScale;!e$2e(p)&&e$2e(s.fill)&&(p=s.fill.waterMaskTexture,_=s.fill.waterMaskTranslationAndScale);const m=r.cameraUnderground,g=r.globeTranslucencyState,x=g.translucent,y=g.frontFaceAlphaByDistance,v=g.backFaceAlphaByDistance;g.rectangle;const $=u$Z(e.undergroundColor,tn$4),b=u$Z(e.undergroundColorAlphaByDistance,rn$3),T=ui$6(e,r)&&r.mode===C$14.SCENE3D&&$.alpha>0&&(b.nearValue>0||b.farValue>0);var C=e.hasWaterMask&&e$2e(p),S=e.oceanNormalMap,w=C&&e$2e(S),E=e.terrainProvider.ready&&e.terrainProvider.hasVertexNormals,P=e$2e(e._PBRMaterialParams)&&e._PBRMaterialParams.roughness>0,A=r.fog.enabled,L=e.showGroundAtmosphere,M=W$X.castShadows(e.shadows)&&!x,R=W$X.receiveShadows(e.shadows)&&!x,O=e.hueShift,D=e.saturationShift,I=e.brightnessShift,F=!(e$2d.equalsEpsilon(O,0,e$2d.EPSILON7)&&e$2d.equalsEpsilon(D,0,e$2d.EPSILON7)&&e$2d.equalsEpsilon(I,0,e$2d.EPSILON7)),B=!1;if(L){var N,G=r.mode,z=r.camera;N=G===C$14.SCENE2D||G===C$14.COLUMBUS_VIEW?z.positionCartographic.height:o$1p.magnitude(z.positionWC);var U=e.nightFadeOutDistance;G!==C$14.SCENE3D&&(U-=r.mapProjection.ellipsoid.maximumRadius),B=N>U}var V=s.normalTexture,k=e$2e(V),W=e$2e(e._slopeSetting)&&e._slopeSetting.DisplayMode!==_0x25bb47.DisplayMode.NONE&&e._bUseSlopeColorTable,H=e$2e(e._hypsometricSetting)&&e._hypsometricSetting.DisplayMode!==k$S.DisplayMode.NONE&&e._bUseHypColorTable,q=e$2e(r.camera._scene.globe._floodFlagTexture);C&&--f,w&&--f,k&&--f,W&&(f-=3),H&&(f-=2),r.shadowMaps.length>0&&--f,q&&--f;var j=!o&&t._clipRegionRasterized&&t.isModified,X=!o&&t._clipRegionRasterized&&(e._excavateRegions.length>0||e._extractRegions.length>0),Y=!o&&t._clipRegionRasterized&&e._extractRegions.length>0,Z=!o&&t._clipRegionRasterized&&!t.isModified&&e._imageryClipRegions.length>0,K=!o&&W&&!t.isModified&&e$2e(e._slopeRegion),Q=!o&&H&&!t.isModified&&e$2e(e._hypsometricRegion)&&e$2e(t._clipRasterTexture),J=!1,ee=!1;X&&-1===r._fboState.name.indexOf("_excavationGlobeHeight")&&(--f,J=e.clippingType===R$L.KeepOutside,ee=e.clippingType===R$L.KeepInside),j||(j=!e$2e(i)&&e$2e(a)),J||(J=!e$2e(i)&&e$2e(a)),Z&&--f;var te=o?s.modifyTerrainMesh:s.renderedMesh;e$2e(i)&&i.mesh&&(te=i.mesh);var ie=te.center,ne=te.encoding,re=za$3,oe=0,ae=0,se=0,le=0,ue=!1;if(r.mode!==C$14.SCENE3D){var ce=r.mapProjection,he=ce.project(h$18.southwest(t.rectangle),ka$2),de=ce.project(h$18.northeast(t.rectangle),qa$3);if(re.x=he.x,re.y=he.y,re.z=de.x,re.w=de.y,r.mode!==C$14.MORPHING&&((ie=Wa$2).x=0,ie.y=.5*(re.z+re.x),ie.z=.5*(re.w+re.y),re.x-=ie.y,re.y-=ie.z,re.z-=ie.y,re.w-=ie.z),r.mode===C$14.SCENE2D&&ne.quantization===ye$j.BITS12){var fe=1/(Math.pow(2,12)-1)*.5,pe=(re.z-re.x)*fe,_e=(re.w-re.y)*fe;re.x-=pe,re.y-=_e,re.z+=pe,re.w+=_e}ce instanceof t$N&&(oe=t.rectangle.south,ae=t.rectangle.north,se=t$N.geodeticLatitudeToMercatorAngle(oe),le=1/(t$N.geodeticLatitudeToMercatorAngle(ae)-se),ue=!0)}var me=Pa$2;me.frameState=r,me.surfaceTile=s,me.showReflectiveOcean=C,me.showOceanWaves=w,me.enableLighting=e.enableLighting,me.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,me.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,me.showGroundAtmosphere=L,me.perFragmentGroundAtmosphere=B,me.hasVertexNormals=E,me.hasRoughness=P,me.useWebMercatorProjection=ue,me.clippedByBoundaries=s.clippedByBoundaries,me.applyModify=j,me.applyExtract=Y,me.excavationRegion=J,me.excavationOuter=ee;var ge=s.imagery,xe=[];if(t._useParentImage){ge=[];for(var ye=0;ye<s.imagery.length;ye++){var ve=!1,$e=s.imagery[ye].readyImagery;if(e$2e($e)&&$e.imageryLayer.featherEdgesEnabled){var be=t.parent;if(e$2e(be))for(var Te=$e.imageryLayer.imageryProvider.tablename,Ce=0;Ce<be.data.imagery.length;Ce++){var Se=be.data.imagery[Ce],we=Se.readyImagery;if(e$2e(we))if((At=we.imageryLayer).imageryProvider.tablename===Te){xe[ye]=At._calculateTextureTranslationAndScale(t,Se),ge.push(Se),ve=!0;break}}}ve||ge.push(s.imagery[ye])}}var Ee=0,Pe=0,Ae=ge.length,Le=s.gridImagery,Me=Le.length,Re=[],Oe=[],De=[];e$2e(t._rasterTexture)&&(Re.push(t._rasterTexture),Oe.push(new e$2c(0,0,0,0)),De.push(1),Ae+=1),e$2e(t._2DRasterTexture)&&(Re.push(t._2DRasterTexture),Oe.push(new e$2c(0,0,0,.1)),De.push(t._2DRasterTexture.textureAlpha),Ae+=1);const Ie=e.showSkirts&&!m&&!x,Fe=e.backFaceCulling&&!m&&!x;var Be=Re.length,Ne=Fe?e._renderState:e._disableCullingRenderState,Ge=Fe?e._blendRenderState:e._disableCullingBlendRenderState,ze=Ne,Ue=e._firstPassInitialColor,Ve=r.context;e$2e(e._debug.boundingSphereTile)||Ct$5();var ke=(4&r.useType)>0?1:0;ke&&--f;var We=(2&r.useType)>0?1:0;We&&--f,e$2e(r.mvtLayerCount)&&r.mvtLayerCount>0&&f--;var He=r.multiViewportIndex>-1,qe=e._drawCommands,je=o?e._modifyDrawCommandsByTile:e._drawCommandsByTile,Xe=o?e._modifyUniformMapsByTile:e._uniformMapsByTile,Ye=0;do{var Ze,Ke,Qe=0,Je=`${t.x}:${t.y}:${t.level}:${Ye}`;Ye++,je[Je]?(Ze=je[Je],Ke=Xe[Je]):((Ze=new i$$).owner=t,Ze.cull=!1,Ze.boundingVolume=new i$1d,Ze.orientedBoundingBox=void 0,Ke=Za$3(r,e),Ve.webgpu&&Ze.addUniformBuffer(Ke.properties.tileUBO),je[Je]=Ze,Xe[Je]=Ke),qe.push(Ze),Ze.owner=t,o?++e._modifyUsedDrawCommands:++e._usedDrawCommands,t===e._debug.boundingSphereTile&&(e$2e(s.orientedBoundingBox)?ci$7(s.orientedBoundingBox,e$1X.RED).update(r):e$2e(s.boundingSphere3D)&&fi$6(s.boundingSphere3D,e$1X.RED).update(r));var et=Ke.properties;e$2c.clone(Ue,et.initialColor),e$1X.clone(r.lightSource.sunLightColor,et.sunLightColor),e$1X.clone(r.lightSource.ambientLightColor,et.ambientLightColor),et.oceanNormalMap=S,et.lightingFadeDistance.x=e.lightingFadeOutDistance,et.lightingFadeDistance.y=e.lightingFadeInDistance,et.nightFadeDistance.x=e.nightFadeOutDistance,et.nightFadeDistance.y=e.nightFadeInDistance,et.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity,et.tileBounds.x=t.rectangle.west,et.tileBounds.y=t.rectangle.south,et.tileBounds.z=t.rectangle.east,et.tileBounds.w=t.rectangle.north,e$2e(e._hypsometricSetting)&&(et.hypContourFillMode=e._hypsometricSetting.DisplayMode,et.hypContourInterval=e._hypsometricSetting.LineInterval,et.hypFloor=e._hypsometricSetting.ColorTableMinKey,et.hypCeil=e._hypsometricSetting.ColorTableMaxKey,et.hypOpacity=e._hypsometricSetting.Opacity,et.hypLineColor=e._hypsometricSetting.LineColor,et.hypsometricTexture=e._hypsometricTexture,et.hypsometricRenderTexture=e._hypsometricRenderTexture,et.hypHasAnalysisRegion=e._bUseHypRegion,et.hypRect=e._geoBounds,et.hypMaxVisibleValue=e._hypsometricSetting.MaxVisibleValue,et.hypMinVisibleValue=e._hypsometricSetting.MinVisibleValue,et.hypHasColorTable=e._bUseHypColorTable&&!We),P&&(et.baseColorFactor=e._PBRMaterialParams.baseColorFactor,et.metallic=e._PBRMaterialParams.metallic,et.roughness=e._PBRMaterialParams.roughness,et.emissionFactor=e._PBRMaterialParams.emissionFactor),e$2e(e._slopeSetting)&&(et.slopeFillMode=e._slopeSetting.DisplayMode,et.slopeRect=e._slopeBound,et.slopeFloor=e$2d.toRadians(e._slopeSetting.ColorTableMinKey),et.slopeCeil=e$2d.toRadians(e._slopeSetting.ColorTableMaxKey),et.slopeOpacity=e._slopeSetting.Opacity,et.slopeColorTexture=e._slopeColorTexture,et.slopePolygonTexture=e._slopePolygonTexture,et.slopeArrowsTexture=e._slopeArrowsTexture,et.hasSlopeRegion=e._bUseSlopeRegion,et.slopeMaxVisibleValue=e$2d.toRadians(e._slopeSetting.MaxVisibleValue),et.slopeMinVisibleValue=e$2d.toRadians(e._slopeSetting.MinVisibleValue),et.slopeHasColorTable=e._bUseSlopeColorTable,et.level=t.level,et.topLevel=n),e$2e(r.camera._scene.globe._floodFlagTexture)&&(et.floodRect=r.camera._scene.globe._floodRect,et.floodTexture=r.camera._scene.globe._floodFlagTexture),e$2e(t._clipRasterTexture)?et.modifyRasterTexture=t._clipRasterTexture:!e$2e(i)&&e$2e(a)&&(et.modifyRasterTexture=a),et.clip_mode=e._clipMode,et.clip_planes=e._clipPlane,et.clip_line_color=e._clipLineColor,et.flattenTexture=e._flattenTexture;var tt=!e$2e(s.vertexArray)&&e$2e(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;tt&&e$1X.clone(e.fillHighlightColor,et.fillHighlightColor),et.center3D=te.center,o$1p.clone(ie,et.rtc),e$2c.clone(re,et.tileRectangle),et.southAndNorthLatitude.x=oe,et.southAndNorthLatitude.y=ae,et.southMercatorYAndOneOverHeight.x=se,et.southMercatorYAndOneOverHeight.y=le,et.globeSplitDirection=e.splitDirection,et.globeSwipeRegion=e._swipeRegion,et.polygonOffset=e._polygonOffset.value;const u=m?v:y,c=m?y:v;e$2e(u)&&(e$2c.fromElements(u.near,u.nearValue,u.far,u.farValue,et.frontFaceAlphaByDistance),e$2c.fromElements(c.near,c.nearValue,c.far,c.farValue,et.backFaceAlphaByDistance)),e$2c.fromElements(b.near,b.nearValue,b.far,b.farValue,et.undergroundColorAlphaByDistance),e$1X.clone($,et.undergroundColor);var it=Ga$3,nt=nr$7(t.rectangle,e.cartographicLimitRectangle);o$1p.fromElements(O,D,I,et.hsbShift);var rt=t.rectangle,ot=1/rt.width,at=1/rt.height;it.x=(nt.west-rt.west)*ot,it.y=(nt.south-rt.south)*at,it.z=(nt.east-rt.west)*ot,it.w=(nt.north-rt.south)*at,e$2c.clone(it,et.localizedCartographicLimitRectangle);var st=A;!r.context.webgpu&&e$2d.fog(t._distance,r.fog.density)<e$2d.EPSILON3&&(st=!1),F=F&&(st||L);for(var lt=!1,ut=!1,ct=!1,ht=!1,dt=!1,ft=!1,pt=!1,_t=!1,mt=!1,gt=!1,xt=!o$1o.equals(e.splitDirection,o$1o.ZERO),yt=e._swipeEnabled,vt=[],$t=e._polygonOffset.enabled;Qe<f&&Ee<Ae;)if(Ee!=Ae-Be||0==Be){var bt=ge[Ee],Tt=xe[Ee],Ct=bt.readyImagery;if(++Ee,!e$2e(Ct)||bt.discard)continue;var St=r.camera._positionCartographic.height,wt=Ct.imageryLayer.maxHeight,Et=Ct.imageryLayer.minHeight;if(Ct.imageryLayer._inVisibleHeightRange=St>wt||St<Et?0:1,Ct.imageryLayer.alpha*Ct.imageryLayer._inVisibleHeightRange==0||(Ct.setVisible(!0),He&&!Ct.imageryLayer._isBaseLayer&&!Ct.imageryLayer.getVisibleInViewport(r.multiViewportIndex)))continue;if(r.camera._scene._mvtVisibleControl){var Pt=r.camera._scene._mvtVisibleLevel;if(e$2e(Ct.isMvtTexture)&&Ct.isMvtTexture&&!(t._level>r.camera._endLevel-Pt))continue}if(!e$2e(Ht=bt.useWebMercatorT?Ct.textureWebMercator:Ct.texture))throw new t$15("readyImagery is not actually ready!");var At=Ct.imageryLayer;if(e$2e(Ct.isMvtTexture)&&Ct.isMvtTexture){var Lt=Ct.imageryLayer._selectColor;vt.push({textureIndex:Qe,selectColor:Lt})}if(e$2e(bt.textureTranslationAndScale)||(bt.textureTranslationAndScale=At._calculateTextureTranslationAndScale(t,bt)),!e$2e(bt.dayTextureSize)){var Mt=new e$2c(Ht.width,Ht.height,1/Ht.width,1/Ht.height);bt.dayTextureSize=Mt}et.dayTextures[Qe]=Ht,et.dayTextureTranslationAndScale[Qe]=bt.textureTranslationAndScale,et.dayTextureTexCoordsRectangle[Qe]=bt.textureCoordinateRectangle,et.dayTextureSize[Qe]=bt.dayTextureSize,e$2e(Tt)&&(et.dayTextureTranslationAndScale[Qe]=Tt,et.dayTextureTexCoordsRectangle[Qe]=new e$2c(0,0,1,1)),et.dayTextureUseWebMercatorT[Qe]=bt.useWebMercatorT,et.dayTextureFlipY[Qe]=bt.flipY;var Rt=new e$2c;if(Rt.x=At.transparentBackColor.red,Rt.y=At.transparentBackColor.green,Rt.z=At.transparentBackColor.blue,Rt.w=At.transparentBackColorTolerance,et.transparentBackColor[Qe]=Rt,et.imageryClipEnable[Qe]=At.enableImageryClip,et.dayTextureAlpha[Qe]=u$Z(bt.morphingAlpha,At.alpha),ft=ft||1!==et.dayTextureAlpha[Qe],bt.morphingAlpha<1){var Ot=ge[Ee-1];e$2e(Ot)&&!e$2e(Ot.loadingImagery)&&(et.morphingParentIndex=Qe,et.morphingBeginTime=Ot.morphingBeginTime)}et.dayTextureBrightness[Qe]=At.brightness,lt=lt||et.dayTextureBrightness[Qe]!==h$R.DEFAULT_BRIGHTNESS,et.dayTextureContrast[Qe]=At.contrast,ut=ut||et.dayTextureContrast[Qe]!==h$R.DEFAULT_CONTRAST,et.dayTextureHue[Qe]=At.hue,ct=ct||et.dayTextureHue[Qe]!==h$R.DEFAULT_HUE,et.dayTextureSaturation[Qe]=At.saturation,ht=ht||et.dayTextureSaturation[Qe]!==h$R.DEFAULT_SATURATION,et.dayTextureOneOverGamma[Qe]=1/At.gamma,dt=dt||et.dayTextureOneOverGamma[Qe]!==1/h$R.DEFAULT_GAMMA,et.dayTextureSplit[Qe]=At.splitDirection,je$c.x=At._swipeRegion.x*r.context.drawingBufferWidth,je$c.y=(1-At._swipeRegion.y)*r.context.drawingBufferHeight,je$c.z=At._swipeRegion.z*r.context.drawingBufferWidth,je$c.w=(1-At._swipeRegion.w)*r.context.drawingBufferHeight,et.dayTextureSwipeRegion[Qe]=e$2c.clone(je$c,new e$2c),pt=pt||!o$1o.equals(et.dayTextureSplit[Qe],o$1o.ZERO),_t=_t||At.swipeEnabled;var Dt=et.dayTextureCutoutRectangles[Qe];if(e$2e(Dt)||(Dt=et.dayTextureCutoutRectangles[Qe]=new e$2c),e$2c.clone(e$2c.ZERO,Dt),e$2e(At.cutoutRectangle)){var It=nr$7(rt,At.cutoutRectangle);mt=e$2e(h$18.simpleIntersection(It,rt,si$4))||mt,Dt.x=(It.west-rt.west)*ot,Dt.y=(It.south-rt.south)*at,Dt.z=(It.east-rt.west)*ot,Dt.w=(It.north-rt.south)*at}var Ft=et.colorsToAlpha[Qe];e$2e(Ft)||(Ft=et.colorsToAlpha[Qe]=new e$2c);var Bt=e$2e(At.colorToAlpha)&&At.colorToAlphaThreshold>0;if(gt=gt||Bt,Bt){var Nt=At.colorToAlpha;Ft.x=Nt.red,Ft.y=Nt.green,Ft.z=Nt.blue,Ft.w=At.colorToAlphaThreshold}else Ft.w=-1;if(++Qe,e$2e(Ct.credits))for(var Gt=Ct.credits,zt=0,Ut=Gt.length;zt<Ut;++zt)l.addCredit(Gt[zt])}else{if(++Ee,!e$2e(Ht=Re[Pe]))throw new t$15("readyImagery is not actually ready!");et.dayTextures[Qe]=Ht,et.dayTextureTranslationAndScale[Qe]=new e$2c(0,0,1,1),et.dayTextureSize[Qe]=new e$2c(Ht.width,Ht.height,1/Ht.width,1/Ht.height),et.transparentBackColor[Qe]=Oe[Pe],et.dayTextureTexCoordsRectangle[Qe]=new e$2c(0,0,1,1),et.dayTextureUseWebMercatorT[Qe]=!1,et.dayTextureAlpha[Qe]=De[Pe],ft=ft||1!==De[Pe],et.dayTextureBrightness[Qe]=1,lt=!1,et.dayTextureContrast[Qe]=1,ut=!1,et.dayTextureHue[Qe]=0,ct=!1,et.dayTextureSaturation[Qe]=1,ht=!1,et.dayTextureOneOverGamma[Qe]=1,dt=!1,et.dayTextureSplit[Qe]=new o$1o(0,0),et.dayTextureSwipeRegion[Qe]=r.realtimeRasterSwipeParams.swipeRegion,pt=!0,_t=r.realtimeRasterSwipeParams.swipeEnabled,Pe++,++Qe}for(var Vt=0,kt=0,Wt=!1;Vt<f-Qe&&kt<Me;){var Ht,qt=Le[kt],jt=qt.readyGrid;if(++kt,null!=jt&&(!He||jt.gridLayer.getVisibleInViewport(r.multiViewportIndex)))if(null!=(Ht=qt.useWebMercatorT?jt.textureWebMercator:jt.texture)){jt.needUpdate&&(Wt=!0,jt.needUpdate=!1);var Xt=jt.gridLayer;e$2e(qt.textureTranslationAndScale)||(qt.textureTranslationAndScale=Xt._calculateTextureTranslationAndScale(t,qt)),et.gridTextures[Vt]=Ht,et.gridTextureTranslationAndScale[Vt]=qt.textureTranslationAndScale,et.gridTextureTexCoordsRectangle[Vt]=qt.textureCoordinateRectangle,et.gridTextureUseWebMercatorT[Vt]=qt.useWebMercatorT,Vt++}}et.gridTextures.length=Vt,et.dayTextures.length=Qe,et.waterMask=p,e$2c.clone(_,et.waterMaskTranslationAndScale),et.minMaxHeight.x=ne.minimumHeight,et.minMaxHeight.y=ne.maximumHeight,p$1d.clone(ne.matrix,et.scaleAndBias);var Yt=e._clippingPlanes,Zt=e$2e(Yt)&&Yt.enabled&&t.isClipped;Zt&&(et.clippingPlanesEdgeColor=e$1X.clone(Yt.edgeColor,et.clippingPlanesEdgeColor),et.clippingPlanesEdgeWidth=Yt.edgeWidth),e$2e(e.uniformMap)&&(Ke=p$19(Ke,e.uniformMap)),me.numberOfDayTextures=Qe,me.applyBrightness=lt,me.applyContrast=ut,me.applyHue=ct,me.applySaturation=ht,me.applyGamma=dt,me.applyAlpha=ft,me.applySplit=pt,me.applySwipe=_t,me.applyGlobeSwipe=yt,me.applyGlobeSplit=xt,me.enableFog=st,me.enableClippingPlanes=Zt,me.clippingPlanes=Yt,me.hasImageryLayerCutout=mt,me.colorCorrect=F,me.isHeight=ke,me.isColor=We,me.hasNormalMap=k,me.hasHypsometricSetting=H,me.hasSlopeAnalysis=W,me.highlightFillTile=tt,me.colorToAlpha=gt,me.mvtTextureObj=vt,me.numberOfGridTextures=Vt,me.gridUpdate=Wt,me.applyPolygonOffset=$t,me.mixDirection=0,me.mixIndex=0,me.hasFlood=q,me.applyImageryClip=Z,me.hasHypsometricRegion=Q,me.applySlopeRegion=K,me.translucent=x,me.showUndergroundColor=T;var Kt=te.indices.length;Ie||(Kt=te.indexCountWithoutSkirts),Kt=o?s.modifyTerrainVertexArray.indexBuffer.numberOfIndices:Kt,et.normalTexture=V,e$2c.clone(s.normalTextureTranslationAndScale,et.normalTextureTranslationAndScale),Ze.shaderProgram=e._surfaceShaderSet.getShaderProgram(me),Ze.castShadows=M,Ze.receiveShadows=R,Ze.renderState=ze,Ze.primitiveType=W$18.TRIANGLES,e$2e(i)?Ze.vertexArray=o?s.modifyTerrainVertexArray:i.vertexArray:Ze.vertexArray=o?s.modifyTerrainVertexArray:s.subDivisionVertexArray||s.vertexArray||s.fill.vertexArray,Ze.count=Kt,Ze.uniformMap=Ke,Ze.pass=Le$q.GLOBE,e._debug.wireframe&&($a$3(Ve,e,t),e$2e(s.wireframeVertexArray)&&(Ze.vertexArray=s.wireframeVertexArray,Ze.primitiveType=W$18.LINES));var Qt=Ze.boundingVolume,Jt=Ze.orientedBoundingBox;if(r.mode!==C$14.SCENE3D){var ei=s.tileBoundingRegion;i$1d.fromRectangleWithHeights2D(t.rectangle,r.mapProjection,ei.minimumHeight,ei.maximumHeight,Qt),o$1p.fromElements(Qt.center.z,Qt.center.x,Qt.center.y,Qt.center),r.mode===C$14.MORPHING&&(Qt=i$1d.union(te.boundingSphere3D,Qt,Qt))}else Ze.boundingVolume=i$1d.clone(te.boundingSphere3D,Qt),Ze.orientedBoundingBox=y$Y.clone(s.orientedBoundingBox,Jt),e$2e(Ze.boundingVolume)||(Ze.boundingVolume=i$1d.fromOrientedBoundingBox(Ze.orientedBoundingBox));Ze.invalid=u$Z(t.invalid,!1),x&&g.updateDerivedCommands(Ze,r),en$3(Ze,r),ze=Ge,Ue=Ja$3,Ke.properties.tileUBO.updateFromProperties(Ke.properties)}while(Ee<Ae)}var pi$7=new o$1p,bt$7=new a$18;function an$3(e,t){for(var i=p$1d.getTranslation(t,new o$1p),n=e.attributes.position.values,r=n.length,o=0;o<r;o+=3){o$1p.unpack(n,o,pi$7),a$18.fromCartesian(pi$7,void 0,bt$7);var a=e$2d.toDegrees(bt$7.longitude);a-=i.x;var s=e$2d.toDegrees(bt$7.latitude);s-=i.y,n[o]=a,n[o+1]=s,n[o+2]=bt$7.height-1}}function Ie$g(e,t){if(!e$2e(t.command)){var i=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:t.modelMatrix});an$3(t.worldGeometry,t.modelMatrix),i.vertexArray=c$13.fromGeometry({context:e,geometry:t.worldGeometry,attributeLocations:{position:0},bufferUsage:A$18.STATIC_DRAW,interleave:!0});var n=["attribute vec4 position;","varying float vHeight;","void main()","{"," vHeight = position.z;"," gl_Position = czm_modelViewProjection * vec4(position.xy, 0.0, 1.0);","}"].join("\n"),r=["varying float vHeight;","void main()","{"," gl_FragColor = czm_packValue(vHeight);","}"].join("\n"),o=new s$V({sources:[n]}),a=new s$V({sources:[r]});i.shaderProgram=r$14.fromCache({name:"ClipRasterTerrain",context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:{position:0}}),i.useRelativeOrigin=!1,t.command=i}}function He$c(e){var t=e._clipRasterTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1}}function ur$4(e,t){var i=e._clipRasterTilesMap;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];e$2e(h$18.intersection(t,r.rectangle))||(r._clipRasterTexture=r._clipRasterTexture&&!r._clipRasterTexture.isDestroyed()&&r._clipRasterTexture.destroy(),r._clipRasterFbo=r._clipRasterFbo&&!r._clipRasterFbo.isDestroyed()&&r._clipRasterFbo.destroy(),r._clipRegionsCount=0,r._clipRegionRasterized=!1)}}function dr$3(e,t,i){if(i){var n=e.camera._projection.project(a$18.fromDegrees(t.positions[0],t.positions[1]));n=new o$1p(n.z,n.x,n.y),t._excavateMatrix=p$1d.fromTranslation(n)}else t._excavateMatrix=m$19.eastNorthUpToFixedFrame(o$1p.fromDegrees(t.positions[0],t.positions[1]))}function mi$4(e,t){!t._excavationSideTexture&&e$2e(t._excavationSideTextureUrl)&&o$1l(t$10.createIfNeeded(t._excavationSideTextureUrl).fetchImage(),(function(i){t._excavationSideTexture=new t$U({context:e.context,source:i,sampler:new e$1S({wrapS:t._excavateTextureWrap,wrapT:t._excavateTextureWrap})}),t._excavationSideTexture.generateMipmap(I$1e.NICEST)}))}function gi$7(e,t){!t._excavationBottomTexture&&e$2e(t._excavationBottomTextureUrl)&&o$1l(t$10.createIfNeeded(t._excavationBottomTextureUrl).fetchImage(),(function(i){t._excavationBottomTexture=new t$U({context:e.context,source:i})}))}function yi$6(e,t){!t._excavationNormalTexture&&e$2e(t.excavationNormalTextureUrl)&&o$1l(t$10.createIfNeeded(t.excavationNormalTextureUrl).fetchImage(),(function(i){t._excavationNormalTexture=new t$U({context:e.context,source:i})}));!t._excavationSideNormalTexture&&e$2e(t.excavationSideNormalTextureUrl)&&o$1l(t$10.createIfNeeded(t.excavationSideNormalTextureUrl).fetchImage(),(function(i){t._excavationSideNormalTexture=new t$U({context:e.context,source:i,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT})})}))}R$H.prototype._updateExcavateRegions=function(e){if(!(!this._excavateRegionUpdate||e.camera.bReflect||this._tilesToRenderByTextureCount.length<1)){for(var t in this._excavateRegionUpdate=!1,e._framebufferList)t.indexOf("_excavationGlobeHeight")>-1&&!e$2e(this._excavateRegions.get(t.slice(22)))&&(e._framebufferList[t]=!e._framebufferList[t].isDestroyed()&&e._framebufferList[t].destroy(),delete e._framebufferList[t]);if(this._excavateRegions.length<1)return void He$c(this);this._onceExcavateRegionsEmpty&&(He$c(this),this._onceExcavateRegionsEmpty=!1);var i=!1;e.camera._scene.mode===C$14.COLUMBUS_VIEW&&(i=!0);var n=Je$7(this._excavateRegions.values);ur$4(this,n),this._excavateRectangle=n,mi$4(e,this),gi$7(e,this),yi$6(e,this);for(var r=this._excavateRegions.length,o=0;o<r;o++){var a=this._excavateRegions.values[o];dr$3(e,a,i),Ie$g(e.context,a),this._excavateTransparent||(lr$6(e,this,a,i),hr$4(e,this,a,i))}}},R$H.prototype._updateExtractRegions=function(e){if(this._extractRegionsUpdate&&!e.camera.bReflect){for(var t in this._extractRegionsUpdate=!1,e._framebufferList)t.indexOf("_excavationGlobeHeight")>-1&&!e$2e(this._extractRegions.get(t.slice(22)))&&(e._framebufferList[t]=!e._framebufferList[t].isDestroyed()&&e._framebufferList[t].destroy(),delete e._framebufferList[t]);if(this._extractRegions.length<1)He$c(this);else{this._onceExcavateRegionsEmpty&&(He$c(this),this._onceExcavateRegionsEmpty=!1);var i=!1;e.camera._scene.mode===C$14.COLUMBUS_VIEW&&(i=!0);var n=Je$7(this._extractRegions.values);ur$4(this,n),this._excavateRectangle=n,mi$4(e,this),gi$7(e,this),yi$6(e,this);for(var r=this._extractRegions.length,o=0;o<r;o++){dr$3(e,d=this._extractRegions.values[o],i),Ie$g(e.context,d),this._extractTransparent||(lr$6(e,this,d,i),hr$4(e,this,d,i),lr$6(e,this,d,i,!0),hr$4(e,this,d,i,!0))}if(0!==this._quadtree._tilesToRender.length&&!(this._quadtree._tilesToRender[0].level<10)){if(r<1)return void vi$6(this);_i$8(this,n);var a=cr$4(this._quadtree._tilesToRender,n);if(e$2e(a)&&e$2e(a.data)){var s=a.data,l=e.context,u=[],c=Number.MAX_VALUE,h=Number.MIN_VALUE;for(o=0;o<r;o++){var d=this._extractRegions.values[o];u.push(d.geometry_extract),c=Math.min(c,d.minimumHeight),h=Math.max(h,d.maximumHeight)}s.createModifyVertexArray(l,this,a,u,c,h,!1),e$2e(s.modifyTerrainVertexArray)&&_e$n(l,this,a,n,u,c,h,!0)}}}}else this._extractRegions.length>0&&this._updateModifyTiles(e,this._extractRegions.values,!0)},R$H.prototype._updateImageryClipRegions=function(e){if(this._imageryClipRegionUpate&&!e.camera.bReflect){if(this._imageryClipRegionUpate=!1,this._imageryClipRegions.length<1)return void He$c(this);this._onceImageryClipRegionsEmpty&&(He$c(this),this._onceImageryClipRegionsEmpty=!1),ur$4(this,Je$7(this._imageryClipRegions.values));for(var t=this._imageryClipRegions.length,i=0;i<t;i++){var n=this._imageryClipRegions.values[i];dr$3(e,n,false),Ie$g(e.context,n)}}},R$H.prototype._removeAllExcavationCommands=function(){for(var e=Object.keys(this._excavateRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this._removeExcavationCommands(n)}},R$H.prototype._removeAllExtractCommands=function(){for(var e=Object.keys(this._extractRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this._removeExtractCommands(n)}this.modifyParentTiles=void 0},R$H.prototype._removeExcavationCommands=function(e){var t=this._excavateRegions.get(e);t.heightBuffer=t.heightBuffer&&!t.heightBuffer.isDestroyed()&&t.heightBuffer.destroy();var i=this._excavateRegionCommands.get(e+"side"),n=this._excavateRegionCommands.get(e+"bottom");i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),n&&(n.vertexArray=n.vertexArray&&!n.vertexArray.isDestroyed()&&n.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom")},R$H.prototype._removeExtractCommands=function(e){var t=this._extractRegions.get(e);t.heightBuffer=t.heightBuffer&&!t.heightBuffer.isDestroyed()&&t.heightBuffer.destroy(),t.heightBuffer2=t.heightBuffer2&&!t.heightBuffer2.isDestroyed()&&t.heightBuffer2.destroy();var i=this._excavateRegionCommands.get(e+"side"),n=this._excavateRegionCommands.get(e+"side_extract"),r=this._excavateRegionCommands.get(e+"bottom"),o=this._excavateRegionCommands.get(e+"bottom_extract");i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),n&&(n.vertexArray=n.vertexArray&&!n.vertexArray.isDestroyed()&&n.vertexArray.destroy()),r&&(r.vertexArray=r.vertexArray&&!r.vertexArray.isDestroyed()&&r.vertexArray.destroy()),o&&(o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom"),this._excavateRegionCommands.remove(e+"side_extract"),this._excavateRegionCommands.remove(e+"bottom_extract"),this.modifyParentTiles=void 0};var ve$l=new a$V,nn$3=new o$15;function on$3(e,t,i,n){var r=e.camera._projection,o=e.camera;if(!o.bReflect){var a=t,s=a.width,l=a.height,u=6378137*Math.cos(a.south+.5*l)*Math.sin(s)*.5,c=6378137*Math.sin(l)*.5;if(s=u,l=c,n){var h=r.project(new a$18(a.west,a.south)),d=r.project(new a$18(a.east,a.north));s=(d.x-h.x)/2,l=(d.y-h.y)/2}var f=o.frustum.clone(nn$3),p=o._scene.globe.globeAlpha,_=new o$1p,m=new o$1p,g=new o$1p,x=new p$1d;i.isUpdate=!0,e$2e(i._beginFunc)||(i._beginFunc=function(){p=o._scene.globe.globeAlpha,o._scene.globe.globeAlpha=1,o$1p.clone(o.position,_),o$1p.clone(o.direction,m),o$1p.clone(o.up,g),p$1d.clone(o.transform,x),o._setTransform(p$1d.IDENTITY),o.setView({destination:o$1p.fromRadians(a.west+.5*a.width,a.south+.5*a.height,1e4)}),ve$l.width=2*s,ve$l.height=2*l,ve$l.near=1,ve$l.far=1e6,ve$l.aspectRatio=s/l,o.frustum=ve$l,e.context.uniformState.updateFrustum(ve$l)}),e$2e(i._endFunc)||(i._endFunc=function(){o._scene.globe.globeAlpha=p,i.isUpdate=!1,o.frustum=f,o._setTransform(x),o$1p.clone(_,o.position),o$1p.clone(m,o.direction),o$1p.clone(g,o.up),o$1p.cross(m,g,o.right),e.context.uniformState.updateFrustum(o.frustum)})}}function lr$6(e,t,i,n,r){var o=e.camera._projection,a=t._excavateRegionCommands;if((!a.contains(i.name+"side")||r)&&(!a.contains(i.name+"side_extract")||!r)){var s=e.context,l=p$1d.inverse(i._excavateMatrix,new p$1d),u=i.positions,c=i.rectangle,h=c.east-c.west,d=c.north-c.south,f=u.length/3,p=new Float32Array(8*f),_=new Float32Array(6*f),m=new Float32Array(4*f),g=new Uint16Array(6*f),x=new o$1p,y=f$1a.fromRectangle(i.rectangle),v=Math.max(y.width/100,1),$=Math.max(y.height/100,1),b=Math.max(v,$);b=Math.floor(b),b=Math.min(b,10);for(var T=0;T<f;T++){var C,S;n?(C=new o$1p((C=o.project(a$18.fromDegrees(u[3*T+0],u[3*T+1],-1e4))).z,C.x,C.y),S=new o$1p((S=o.project(a$18.fromDegrees(u[3*T+0],u[3*T+1],1e4))).z,S.x,S.y)):(C=o$1p.fromDegrees(u[3*T+0],u[3*T+1],-1e4),S=o$1p.fromDegrees(u[3*T+0],u[3*T+1],1e4)),x.x=C.x,x.y=C.y,x.z=C.z,x.w=1,p$1d.multiplyByVector(l,x,x),C.x=x.x,C.y=x.y,C.z=x.z,x.x=S.x,x.y=S.y,x.z=S.z,x.w=1,p$1d.multiplyByVector(l,x,x),S.x=x.x,S.y=x.y,S.z=x.z,p[8*T]=S.x,p[8*T+1]=S.y,p[8*T+2]=S.z,p[8*T+3]=1e4,p[8*T+4]=C.x,p[8*T+5]=C.y,p[8*T+6]=C.z,p[8*T+7]=-1e4,_[6*T+0]=_[6*T+3]=(e$2d.toRadians(u[3*T+0])-c.west)/h,_[6*T+1]=_[6*T+4]=(e$2d.toRadians(u[3*T+1])-c.south)/d,_[6*T+2]=_[6*T+5]=i.height,m[4*T+0]=b*(T%2),m[4*T+1]=t._excavateTextureWrap===q$1a.CLAMP_TO_EDGE?1:200,m[4*T+2]=b*(T%2),m[4*T+3]=0}for(T=0;T<f-1;T++)g[6*T+0]=0+2*T,g[6*T+1]=2+2*T,g[6*T+2]=3+2*T,g[6*T+3]=0+2*T,g[6*T+4]=3+2*T,g[6*T+5]=1+2*T;g[6*(f-1)+0]=0+2*(f-1),g[6*(f-1)+1]=0,g[6*(f-1)+2]=1,g[6*(f-1)+3]=0+2*(f-1),g[6*(f-1)+4]=1,g[6*(f-1)+5]=1+2*(f-1);var w=t$X.createVertexBuffer({context:s,typedArray:p,usage:A$18.STATIC_DRAW}),E=t$X.createVertexBuffer({context:s,typedArray:_,usage:A$18.STATIC_DRAW}),P=t$X.createVertexBuffer({context:s,typedArray:m,usage:A$18.STATIC_DRAW}),A=[],L={aPosition:0,aTexCoord0:1,aTexCoord1:2};A.push({name:"aPosition",index:L.aPosition,vertexBuffer:w,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),A.push({name:"aTexCoord0",index:L.aTexCoord0,vertexBuffer:E,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),A.push({name:"aTexCoord1",index:L.aTexCoord1,vertexBuffer:P,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var M=t$X.createIndexBuffer({context:s,typedArray:g,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),R=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:i._excavateMatrix,pass:Le$q.TERRAIN_CLASSIFICATION,owner:t,cull:!1});R.vertexArray=new c$13({context:s,attributes:A,indexBuffer:M});var O=new s$V({sources:[Z$K]}),D=new s$V({sources:[$$M]});r&&D.defines.push("IsExtract"),e$2e(t.excavationNormalTextureUrl)&&D.defines.push("NormalTexture"),R.shaderProgram=r$14.fromCache({name:"SideExcavation",context:s,vertexShaderSource:O,fragmentShaderSource:D,attributeLocations:L}),R.renderState=d$1m.fromCache({cull:{enabled:!1,face:de$y.BACK},depthTest:{enabled:!0}}),R.uniformMap={uRasterTexture:function(){return r?i.heightBuffer2._renderTexture._fb.getColorTexture(0):i.heightBuffer._renderTexture._fb.getColorTexture(0)},uColorTexture:function(){return e$2e(t._excavationSideTexture)?t._excavationSideTexture:s.defaultTexture},uNormalTexture:function(){return t._excavationSideNormalTexture||s.defaultTexture},uExtractHeight:function(){return i.height+t._extractExtendHeight}};var I=new t$E(e.context);I.useType=4,I.environmentVisible.isGlobalVisible=!0,on$3(e,i.rectangle,I,n),e$2e(i.removeListenerFunc)||(i.removeListenerFunc=t.tileLoadedEvent.addEventListener((function(e){e$2e(h$18.intersection(e.rectangle,i.rectangle))&&(I.isUpdate=!0)}))),r?(a.set(i.name+"side_extract",R),i.heightBuffer2=I,e._framebufferList["_excavationGlobeHeight2"+i.name]=I):(a.set(i.name+"side",R),i.heightBuffer=I,e._framebufferList["_excavationGlobeHeight"+i.name]=I)}}function hr$4(e,t,i,n,r){var o=e.camera._projection,a=t._excavateRegionCommands;if((!a.contains(i.name+"bottom")||r)&&(!a.contains(i.name+"bottom_extract")||!r)){for(var s=i._excavateMatrix,l=e.context,u=new i$$({primitiveType:W$18.TRIANGLES,pass:Le$q.TERRAIN_CLASSIFICATION,modelMatrix:s}),c=new o$1p,h=[],d=i.worldGeometry,f=p$1d.getTranslation(i.modelMatrix,new o$1p),p=0;p<d.attributes.position.values.length;p+=3)h.push(d.attributes.position.values[p]+f.x),h.push(d.attributes.position.values[p+1]+f.y),h.push(i.height);var _=p$1d.inverse(s,new p$1d),m=[];if(n){p=0;for(var g=h.length;p<g;p+=3){var x=o.project(a$18.fromDegrees(h[p],h[p+1],h[p+2]));m.push(new o$1p(x.z,x.x,x.y))}}else m=o$1p.fromDegreesArrayHeights(h);var y=new Float32Array(4*m.length);for(p=0;p<m.length;p++)c.x=m[p].x,c.y=m[p].y,c.z=m[p].z,c.w=1,p$1d.multiplyByVector(_,c,c),y[4*p]=c.x,y[4*p+1]=c.y,y[4*p+2]=c.z,y[4*p+3]=c.z;var v=i.colorGeometry.attributes.position;v.values=y,v.componentsPerAttribute=4,v.componentDatatype=S$14.FLOAT,u.vertexArray=c$13.fromGeometry({context:l,geometry:i.colorGeometry,attributeLocations:{position:0,st:1},bufferUsage:A$18.STATIC_DRAW,interleave:!0});var $=new s$V({sources:[Ra$3]}),b=new s$V({sources:[Ca$2]});if(e$2e(t.excavationNormalTextureUrl)&&b.defines.push("NormalTexture"),u.shaderProgram=r$14.fromCache({name:"BottomExcavation",context:l,vertexShaderSource:$,fragmentShaderSource:b,attributeLocations:{position:0,st:1}}),u.uniformMap={texture1:function(){return e$2e(t._excavationBottomTexture)?t._excavationBottomTexture:l.defaultTexture},uNormalTexture:function(){return t._excavationNormalTexture||l.defaultTexture}},u.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),r){var T=t._extractExtendHeight,C=o$1p.fromArray([0,0,T]),S=p$1d.fromTranslation(C);p$1d.multiply(u.modelMatrix,S,S),u.modelMatrix=S,a.set(i.name+"bottom_extract",u)}else a.set(i.name+"bottom",u)}}function Je$7(e){for(var t=h$18.clone(e[0].rectangle),i=1,n=e.length;i<n;i++){var r=e[i];t=h$18.union(t,r.rectangle)}return t}function cr$4(e,t){for(var i,n=!1,r=0,o=e.length;r<o;r++){if(i=e[r],e$2e(h$18.simpleIntersection(i.rectangle,t))){n=!0;break}}if(e$2e(i)&&n)for(;e$2e(i);){if(i.rectangle.contains(t))return i;i=i.parent}}function _e$n(e,t,i,n,r,o,a,s){var l=i._southwestChild;e$2e(l)&&e$2e(l.data)&&(e$2e(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2e(l.data.modifyTerrainVertexArray)&&_e$n(e,t,l,n,r,o,a,s))),e$2e(l=i._southeastChild)&&e$2e(l.data)&&(e$2e(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2e(l.data.modifyTerrainVertexArray)&&_e$n(e,t,l,n,r,o,a,s))),e$2e(l=i._northwestChild)&&e$2e(l.data)&&(e$2e(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2e(l.data.modifyTerrainVertexArray)&&_e$n(e,t,l,n,r,o,a,s))),e$2e(l=i._northeastChild)&&e$2e(l.data)&&(e$2e(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2e(l.data.modifyTerrainVertexArray)&&_e$n(e,t,l,n,r,o,a,s)))}function sn$3(e,t){return t.modifyParentTiles?!(e.level<12):!(!e$2e(e.parent)||!e.parent.isModified)||(e._southwestChild.isModified||e._southeastChild.isModified||e._northwestChild.isModified||e._northeastChild.isModified)}function vi$6(e){var t=e._modifyTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1,n.isModified=!1,n.data.mesh&&(n.data.mesh.isModified=!1),n.data.freeModifyResource()}e._modifyTilesMap={}}function _i$8(e,t){var i=e._modifyTilesMap;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];h$18.intersection(t,r.rectangle)||(r._clipRasterTexture=r._clipRasterTexture&&!r._clipRasterTexture.isDestroyed()&&r._clipRasterTexture.destroy(),r._clipRasterFbo=r._clipRasterFbo&&!r._clipRasterFbo.isDestroyed()&&r._clipRasterFbo.destroy(),r._clipRegionsCount=0,r._clipRegionRasterized=!1,r.isModified=!1,r.data.freeModifyResource(),delete i[n])}}function Me$l(e,t,i){var n=new o$1p,r=new o$1p;o$1p.subtract(t,e,n),o$1p.subtract(i,e,r);var o=new o$1p;o$1p.cross(n,r,o),o$1p.normalize(o,o);var a=-o$1p.dot(o,e);return new e$2c(o.x,o.y,o.z,a)}function xi$6(e,t){var i=t.context;return new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:e,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})],destroyAttachments:!0,depthStencilTexture:new t$U({context:i,width:e,height:e,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})})}function un$3(e,t){if(!(e._rasterLineFBOs.length>0))for(var i=0;i<e._rasterTextureSizes.length;i++)e._rasterLineFBOs.push(xi$6(e._rasterTextureSizes[i],t))}function dn$2(e,t){if(!(e._rasterAAFBOs.length>0))for(var i=0;i<e._rasterTextureSizes.length;i++)e._rasterAAFBOs.push(xi$6(e._rasterTextureSizes[i],t))}function ln$3(e,t){if(!e$2e(e._lineExpandCommand)||e._rasterLineWidth!==t.rasterLineWidth){e._rasterLineWidth=t.rasterLineWidth;var i=t.context,n=Math.ceil(t.rasterLineWidth),r="#define CORESIZE "+n+"\n",o=new s$V({name:"RasterImageExpandFS_width_"+n,sources:[r+=fa$3]}),a=new s$V({name:"ViewportQuadVS",sources:[ot$8]});e._lineExpandCommand=i.createCustomViewportQuadCommand(a,o,{uniformMap:{},owner:e}),e._lineExpandCommand.uniformMap.u_LineTexture=function(){return e._rasterLineFBOs[e._rasterCurrentFBOIdx].getColorTexture(0)},e._lineExpandCommand.uniformMap.u_texelOffset=function(){return 1/e._rasterTextureSizes[e._rasterCurrentFBOIdx]}}}function hn$3(e,t){if(!e$2e(e._lineFXAACommand)){var i=t.context,n="#define FXAA_QUALITY_PRESET 39 \n#define FXAA_QUALITY_PS 12 \n#define FXAA_QUALITY_P0 1.0 \n#define FXAA_QUALITY_P1 1.0 \n#define FXAA_QUALITY_P2 1.0 \n#define FXAA_QUALITY_P3 1.0 \n#define FXAA_QUALITY_P4 1.0 \n#define FXAA_QUALITY_P5 1.5 \n#define FXAA_QUALITY_P6 2.0 \n#define FXAA_QUALITY_P7 2.0 \n#define FXAA_QUALITY_P8 2.0 \n#define FXAA_QUALITY_P9 2.0 \n#define FXAA_QUALITY_P10 2.0 \n#define FXAA_QUALITY_P11 8.0 \n"+k$K+"\n"+pa$2,r=L$U;e._lineFXAACommand=i.createViewportQuadCommand(i.webgpu?r:n,{shaderProgramName:"RasterLineFXAA",uniformMap:{},owner:e}),e._lineFXAACommand.uniformMap.colorTexture=function(){return e._rasterAAFBOs[e._rasterCurrentFBOIdx].getColorTexture(0)}}}function b$V(){}new o$1p,R$H.prototype._updateModifyTiles=function(e,t,i){for(var n=this._quadtree._tilesToRender,r=n.length,o=!1,a=0;a<r;a++)if(sn$3(n[a],this)){o=!0;break}if(o){var s=Je$7(t),l=cr$4(n,s);if(e$2e(l)&&e$2e(l.data)){!e$2e(this.modifyParentTiles)&&i&&(this.modifyParentTiles=l);for(var u=l.data,c=e.context,h=[],d=Number.MAX_VALUE,f=Number.MIN_VALUE,p=(a=0,t.length);a<p;a++){var _=t[a],m=i?_.geometry_extract:_.geometry;h.push(m),d=Math.min(d,_.minimumHeight),f=Math.max(f,_.maximumHeight)}if(l.isModified||u.createModifyVertexArray(c,this,l,h,d,f,!1),e$2e(u.modifyTerrainVertexArray)){if(this.modifyParentTiles&&l.level<this.modifyParentTiles.level)return;_e$n(c,this,l,s,h,d,f,!1)}}}},R$H.prototype._updateModifyRegions=function(e){if(this._modifyRegionUpdate){if(0!==this._quadtree._tilesToRender.length&&!(this._quadtree._tilesToRender[0].level<10)){this._modifyRegionUpdate=!1;var t=this._modifyRegions.values,i=t.length;if(i<1)return void vi$6(this);var n=Je$7(t);_i$8(this,n),this._excavateRectangle=n;for(var r=0;r<i;r++){var o=t[r];Ie$g(e.context,o)}var a=cr$4(this._quadtree._tilesToRender,n);if(e$2e(a)&&e$2e(a.data)){var s=a.data,l=e.context,u=[],c=Number.MAX_VALUE,h=Number.MIN_VALUE;for(r=0;r<i;r++){o=t[r];u.push(o.geometry),c=Math.min(c,o.minimumHeight),h=Math.max(h,o.maximumHeight)}s.createModifyVertexArray(l,this,a,u,c,h,!1),e$2e(s.modifyTerrainVertexArray)&&_e$n(l,this,a,n,u,c,h,!0)}}}else this._modifyRegions.length>0&&this._updateModifyTiles(e,this._modifyRegions.values)},R$H.prototype.clearCustomClipBox=function(){this._clipping=!1,this._clipMode=0},R$H.prototype.setCustomClipBox=function(e){if(!((e=e||{}).dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$15("dimensions position is required to create CustomClipBox");if(this._clipMode=2,e$2e(e.clipMode))switch(e.clipMode){case"clip_behind_any_plane":this._clipMode=1;break;case"clip_behind_all_plane":this._clipMode=2;break;case"only_keep_line":this._clipMode=3}if(e.clipLineColor&&e.clipLineColor instanceof e$1X&&(this._clipLineColor=new e$2c(e.clipLineColor.red,e.clipLineColor.green,e.clipLineColor.blue,e.clipLineColor.alpha)),e.dimensions){var t=new p$1d,i=e.position,n=new i$16(e.heading||0,e.pitch||0,e.roll||0);m$19.headingPitchRollToFixedFrame(i,n,t$12.WGS84,t);var r=.5*e.dimensions.x,o=.5*e.dimensions.y,a=.5*e.dimensions.z,s=[];s[0]=new e$2c,s[0].x=-r,s[0].y=o,s[0].z=a,s[0].w=1,s[1]=new e$2c,s[1].x=r,s[1].y=o,s[1].z=a,s[1].w=1,s[2]=new e$2c,s[2].x=r,s[2].y=-o,s[2].z=a,s[2].w=1,s[3]=new e$2c,s[3].x=-r,s[3].y=-o,s[3].z=a,s[3].w=1,s[4]=new e$2c,s[4].x=-r,s[4].y=o,s[4].z=-a,s[4].w=1,s[5]=new e$2c,s[5].x=r,s[5].y=o,s[5].z=-a,s[5].w=1,s[6]=new e$2c,s[6].x=r,s[6].y=-o,s[6].z=-a,s[6].w=1,s[7]=new e$2c,s[7].x=-r,s[7].y=-o,s[7].z=-a,s[7].w=1;for(var l=0;l<8;l++)p$1d.multiplyByVector(t,s[l],s[l]);this._oriClipPlane[0]=e$2c.clone(Me$l(s[0],s[1],s[2])),this._oriClipPlane[1]=e$2c.clone(Me$l(s[0],s[4],s[1])),this._oriClipPlane[2]=e$2c.clone(Me$l(s[0],s[3],s[4])),this._oriClipPlane[3]=e$2c.clone(Me$l(s[6],s[2],s[5])),this._oriClipPlane[4]=e$2c.clone(Me$l(s[6],s[7],s[2])),this._oriClipPlane[5]=e$2c.clone(Me$l(s[6],s[5],s[7]))}else for(l=0;l<e.planePos.length;l++){var u=e.planePos[l],c=e.planeNormal[l];this._oriClipPlane[l].x=c.x,this._oriClipPlane[l].y=c.y,this._oriClipPlane[l].z=c.z,this._oriClipPlane[l].w=-o$1p.dot(u,c)}this._clipping=!0},R$H.prototype.removeAllModifyRegion=function(){for(var e=this._modifyRegions.values,t=0;t<e.length;t++){var i=e[t];e$2e(i.command)&&(i.command.vertexArray=i.command.vertexArray&&!i.command.vertexArray.isDestroyed()&&i.command.vertexArray.destroy(),i.command.shaderProgram=i.command.shaderProgram&&!i.command.shaderProgram.isDestroyed()&&i.command.shaderProgram.destroy()),i.command=void 0}this._modifyRegions.removeAll(),this._modifyTilesMap={},this._modifyRegionUpdate=!1},R$H.prototype.removeAllExcavationRegion=function(){},R$H.prototype.removeAllExtractRegion=function(){},R$H.prototype.isDestroyed=function(){return!1},R$H.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this.removeAllExcavationRegion(),this.removeAllModifyRegion(),this.removeAllExtractRegion(),this._hypsometricTexture=this._hypsometricTexture&&this._hypsometricTexture.destroy(),this._slopeArrowsTexture=this._slopeArrowsTexture&&this._slopeArrowsTexture.destroy(),this._slopeColorTexture=this._slopeColorTexture&&this._slopeColorTexture.destroy();for(var e=0;e<this._rasterTextureSizes.length;e++)e$2e(this._rasterLineFBOs[e])&&this._rasterLineFBOs[e].destroy(),this._rasterAAFBOs.length>0&&this._rasterAAFBOs[e].destroy();return i$11(this)};var _$H=new a$V,ne$v=new o$15,se$p=new o$1p;function ue$r(e,t,i){if(!(u=e.camera).bReflect){var n=t,r=n.width,o=n.height,a=6378137*Math.cos(n.south+.5*o)*Math.sin(r)*.5,s=6378137*Math.sin(o)*.5;r=a,o=s;var l=u.frustum.clone(ne$v),u=e.camera;i.isUpdate=!0,e$2e(i._beginFunc)||(i._beginFunc=function(){i.oldCameraParameter={destination:o$1p.clone(u.position,se$p),orientation:{heading:u.heading,pitch:u.pitch,roll:u.roll}},u.setView({destination:o$1p.fromRadians(n.west+.5*n.width,n.south+.5*n.height,1e3)}),_$H.width=2*r,_$H.height=2*o,_$H.near=1,_$H.far=1e4,_$H.aspectRatio=r/o,u.frustum=_$H,e.context.uniformState.updateFrustum(_$H)}),e$2e(i._endFunc)||(i._endFunc=function(){i.isUpdate=!1,u.frustum=l,u.setView(i.oldCameraParameter),e.context.uniformState.updateFrustum(u.frustum)})}}function n$H(){this.times=void 0,this.points=void 0,t$15.throwInstantiationError()}function r$Q(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).points,i=e.times;if(!e$2e(t)||!e$2e(i))throw new t$15("points and times are required.");if(t.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$15("times.length must be equal to points.length.");this._times=i,this._points=t,this._lastTimeIndex=0}function c$N(e){var t=e.points,i=e.times;return function(n,r){e$2e(r)||(r=new n$15);var o=e._lastTimeIndex=e.findTimeInterval(n,e._lastTimeIndex),a=(n-i[o])/(i[o+1]-i[o]),s=t[o],l=t[o+1];return n$15.fastSlerp(s,l,a,r)}}function r$P(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).points,i=e.times;if(!e$2e(t)||!e$2e(i))throw new t$15("points and times are required.");if(t.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$15("times.length must be equal to points.length.");this._times=i,this._points=t,this._evaluateFunction=c$N(this),this._lastTimeIndex=0}function n$G(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).points,i=e.times;if(!e$2e(t)||!e$2e(i))throw new t$15("points and times are required.");if(2!==i.length)throw new t$15("times.length must be equal to 2.");if(2!==t.length)throw new t$15("points.length must be equal to 2.");this._mode=u$Z(e.mode,0),this._acceleration=2*o$1p.distance(t[1],t[0])/((i[1]-i[0])*(i[1]-i[0])),this._points=t,this._times=i,this._direction=o$1p.subtract(t[1],t[0],new o$1p),this._duration=this._times[1]-this._times[0],o$1p.normalize(this._direction,this._direction)}b$V._createExcavationSideCommand=function(e,t,i){var n=t._excavateRegionCommands;if(!n.contains(i.name+"side")){for(var r=e.context,o=p$1d.inverse(i._excavateMatrix,new p$1d),a=i.positions,s=i.rectangle,l=s.east-s.west,u=s.north-s.south,c=a.length/3,h=new Float32Array(8*c),d=new Float32Array(6*c),f=new Float32Array(4*c),p=new Uint16Array(6*c),_=new o$1p,m=0;m<c;m++){var g=o$1p.fromDegrees(a[3*m+0],a[3*m+1],-1e3),x=o$1p.fromDegrees(a[3*m+0],a[3*m+1],1e3);_.x=g.x,_.y=g.y,_.z=g.z,_.w=1,p$1d.multiplyByVector(o,_,_),g.x=_.x,g.y=_.y,g.z=_.z,_.x=x.x,_.y=x.y,_.z=x.z,_.w=1,p$1d.multiplyByVector(o,_,_),x.x=_.x,x.y=_.y,x.z=_.z,h[8*m]=x.x,h[8*m+1]=x.y,h[8*m+2]=x.z,h[8*m+3]=1e3,h[8*m+4]=g.x,h[8*m+5]=g.y,h[8*m+6]=g.z,h[8*m+7]=-1e3,d[6*m+0]=d[6*m+3]=(e$2d.toRadians(a[3*m+0])-s.west)/l,d[6*m+1]=d[6*m+4]=(e$2d.toRadians(a[3*m+1])-s.south)/u,d[6*m+2]=d[6*m+5]=i.height,f[4*m+0]=m/(c-1),f[4*m+1]=1,f[4*m+2]=m/(c-1),f[4*m+3]=0}for(m=0;m<c-1;m++)p[6*m+0]=0+2*m,p[6*m+1]=2+2*m,p[6*m+2]=3+2*m,p[6*m+3]=0+2*m,p[6*m+4]=3+2*m,p[6*m+5]=1+2*m;p[6*(c-1)+0]=0+2*(c-1),p[6*(c-1)+1]=0,p[6*(c-1)+2]=1,p[6*(c-1)+3]=0+2*(c-1),p[6*(c-1)+4]=1,p[6*(c-1)+5]=1+2*(c-1);var y=t$X.createVertexBuffer({context:r,typedArray:h,usage:A$18.STATIC_DRAW}),v=t$X.createVertexBuffer({context:r,typedArray:d,usage:A$18.STATIC_DRAW}),$=t$X.createVertexBuffer({context:r,typedArray:f,usage:A$18.STATIC_DRAW}),b=[],T={aPosition:0,aTexCoord0:1,aTexCoord1:2};b.push({name:"aPosition",index:T.aPosition,vertexBuffer:y,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),b.push({name:"aTexCoord0",index:T.aTexCoord0,vertexBuffer:v,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),b.push({name:"aTexCoord1",index:T.aTexCoord1,vertexBuffer:$,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var C=t$X.createIndexBuffer({context:r,typedArray:p,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),S=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:i._excavateMatrix,pass:Le$q.OPAQUE,owner:t,cull:!1});S.vertexArray=new c$13({context:r,attributes:b,indexBuffer:C});var w=new s$V({name:"ExcavationRegionSideVp",sources:[Z$K]}),E=new s$V({name:"ExcavationRegionSideFp",sources:[$$M]});S.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:w,fragmentShaderSource:E,attributeLocations:T}),S.renderState=d$1m.fromCache({cull:{enabled:!1,face:de$y.BACK},depthTest:{enabled:!0}}),S.uniformMap={uRasterTexture:function(){return window.texture11=i.heightBuffer._renderTexture._fb.getColorTexture(0),window.texture11},uColorTexture:function(){return e$2e(t._excavationSideTexture)?t._excavationSideTexture:r.defaultTexture}},n.set(i.name+"side",S);var P=new t$E(e.context);i.heightBuffer=P,P.useType=4,P.environmentVisible.isOnlyS3MObjectVisible=!0;var A=t instanceof R$H?"Globe":"Layer";e._framebufferList["_excavationHeight"+A+i.name]=P,ue$r(e,i.rectangle,P)}},b$V._createExcavationBottomCommand=function(e,t,i){var n=t._excavateRegionCommands;if(!n.contains(i.name+"bottom")){var r=e.context,o=new i$$({primitiveType:W$18.TRIANGLES,pass:Le$q.OPAQUE,modelMatrix:i._excavateMatrix});n.set(i.name+"bottom",o);for(var a=new o$1p,s=[],l=i._geometry,u=0;u<l.attributes.position.values.length;u+=3)a.x=l.attributes.position.values[u],a.y=l.attributes.position.values[u+1],a.z=l.attributes.position.values[u+2],p$1d.multiplyByPoint(t._matModel,a,a),a=a$18.fromCartesian(a),s.push(e$2d.toDegrees(a.longitude)),s.push(e$2d.toDegrees(a.latitude)),s.push(i.height);var c=p$1d.inverse(i._excavateMatrix,new p$1d),h=o$1p.fromDegreesArrayHeights(s),d=new Float32Array(4*h.length);for(u=0;u<h.length;u++)a.x=h[u].x,a.y=h[u].y,a.z=h[u].z,a.w=1,p$1d.multiplyByVector(c,a,a),d[4*u]=a.x,d[4*u+1]=a.y,d[4*u+2]=a.z,d[4*u+3]=a.z;var f=i.colorGeometry.attributes.position;f.values=d,f.componentsPerAttribute=4,f.componentDatatype=S$14.FLOAT,o.vertexArray=c$13.fromGeometry({context:r,geometry:i.colorGeometry,attributeLocations:{position:0,st:1,normal:2},bufferUsage:A$18.STATIC_DRAW,interleave:!0});var p=["attribute vec3 position;","attribute vec2 texCoord;","varying vec2 v_texCoord;","void main()","{"," v_texCoord = texCoord;"," gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);","}"].join("\n"),_=["varying vec2 v_texCoord;","uniform sampler2D texture1;","void main()","{"," gl_FragColor = texture2D(texture1, v_texCoord);","}"].join("\n"),m=new s$V({sources:[p]}),g=new s$V({sources:[_]});o.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:m,fragmentShaderSource:g,attributeLocations:{position:0,texCoord:1}}),o.uniformMap={texture1:function(){return e$2e(t._excavationBottomTexture)?t._excavationBottomTexture:r.defaultTexture}},o.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND})}},b$V.createExcavationSideTexture=function(e,t){t._excavationSideTexture||o$1l(t$10.createIfNeeded(n$17("Assets/Textures/excavationregion_side.jpg")).fetchImage(),(function(i){t._excavationSideTexture=new t$U({context:e.context,source:i})}))},b$V.createExcavationBottomTexture=function(e,t){t._excavationBottomTexture||o$1l(t$10.createIfNeeded(n$17("Assets/Textures/excavationregion_top.jpg")).fetchImage(),(function(i){t._excavationBottomTexture=new t$U({context:e.context,source:i})}))},n$H.prototype.evaluate=t$15.throwInstantiationError,n$H.prototype.findTimeInterval=function(e,t){var i,n=this.times,r=n.length;if(!e$2e(e))throw new t$15("time is required.");if(e<n[0]||e>n[r-1])throw new t$15("time is out of range.");if(e>=n[t=u$Z(t,0)]){if(t+1<r&&e<n[t+1])return t;if(t+2<r&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;if(e>n[t])for(i=t;i<r-1&&!(e>=n[i]&&e<n[i+1]);++i);else for(i=t-1;i>=0&&!(e>=n[i]&&e<n[i+1]);--i);return i===r-1&&(i=r-2),i},n$H.prototype.wrapTime=function(e){o$1q.typeOf.number("time",e);var t=this.times,i=t[t.length-1],n=t[0],r=i-n;return e<n&&(e+=(Math.floor((n-e)/r)+1)*r),e>i&&(e-=(Math.floor((e-i)/r)+1)*r),e},n$H.prototype.clampTime=function(e){o$1q.typeOf.number("time",e);var t=this.times;return e$2d.clamp(e,t[0],t[t.length-1])},Object.defineProperties(r$Q.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),r$Q.prototype.findTimeInterval=n$H.prototype.findTimeInterval,r$Q.prototype.wrapTime=n$H.prototype.wrapTime,r$Q.prototype.clampTime=n$H.prototype.clampTime,r$Q.prototype.evaluate=function(e,t){var i=this.points,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);return e$2e(t)||(t=new o$1p),o$1p.lerp(i[r],i[r+1],o,t)},Object.defineProperties(r$P.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),r$P.prototype.findTimeInterval=n$H.prototype.findTimeInterval,r$P.prototype.wrapTime=n$H.prototype.wrapTime,r$P.prototype.clampTime=n$H.prototype.clampTime,r$P.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},Object.defineProperties(n$G.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),n$G.prototype.clampTime=function(e){return e},n$G.prototype.evaluate=function(e,t){e$2e(t)||(t=new o$1p);var i,n=this._points;(e-=this._times[0],0===this._mode)?i=.5*this._acceleration*e*e:i=this._acceleration*this._duration*e-.5*this._acceleration*e*e;return o$1p.multiplyByScalar(this._direction,i,t),o$1p.add(n[0],t,t),t};var _0xb72f03=(_0xf9e1af=!0,function(e,t){var i=_0xf9e1af?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf9e1af=!1,i}),_0x5d5833=_0xb72f03(void 0,(function(){return _0x5d5833.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d5833).search("(((.+)+)+)+$")})),_0xf9e1af;_0x5d5833();var _0x49ad20={Linear:0,Acceleration:1,Deceleration:2,CubicSpline:3,SmoothStep:4},_0x301856=Object.freeze(_0x49ad20),m$O={solve:function(e,t,i,n){if(!(e$2e(e)&&e instanceof Array))throw new t$15("The array lower is required.");if(!(e$2e(t)&&t instanceof Array))throw new t$15("The array diagonal is required.");if(!(e$2e(i)&&i instanceof Array))throw new t$15("The array upper is required.");if(!(e$2e(n)&&n instanceof Array))throw new t$15("The array right is required.");if(t.length!==n.length)throw new t$15("diagonal and right must have the same lengths.");if(e.length!==i.length)throw new t$15("lower and upper must have the same lengths.");if(e.length!==t.length-1)throw new t$15("lower and upper must be one less than the length of diagonal.");var r,o,a=new Array(i.length),s=new Array(n.length),l=new Array(n.length);for(r=0;r<s.length;r++)s[r]=new o$1p,l[r]=new o$1p;for(a[0]=i[0]/t[0],s[0]=o$1p.multiplyByScalar(n[0],1/t[0],s[0]),r=1;r<a.length;++r)o=1/(t[r]-a[r-1]*e[r-1]),a[r]=i[r]*o,s[r]=o$1p.subtract(n[r],o$1p.multiplyByScalar(s[r-1],e[r-1],s[r]),s[r]),s[r]=o$1p.multiplyByScalar(s[r],o,s[r]);for(o=1/(t[r]-a[r-1]*e[r-1]),s[r]=o$1p.subtract(n[r],o$1p.multiplyByScalar(s[r-1],e[r-1],s[r]),s[r]),s[r]=o$1p.multiplyByScalar(s[r],o,s[r]),l[l.length-1]=s[s.length-1],r=l.length-2;r>=0;--r)l[r]=o$1p.subtract(s[r],o$1p.multiplyByScalar(l[r+1],a[r],l[r]),l[r]);return l}},y$I=[],b$U=[],_$G=[],B$H=[];function C$N(e,t,i){var n,r=y$I,o=_$G,a=b$U,s=B$H;r.length=o.length=e.length-1,a.length=s.length=e.length,r[0]=a[0]=1,o[0]=0;var l=s[0];for(e$2e(l)||(l=s[0]=new o$1p),o$1p.clone(t,l),n=1;n<r.length-1;++n)r[n]=o[n]=1,a[n]=4,e$2e(l=s[n])||(l=s[n]=new o$1p),o$1p.subtract(e[n+1],e[n-1],l),o$1p.multiplyByScalar(l,3,l);return r[n]=0,o[n]=1,a[n]=4,e$2e(l=s[n])||(l=s[n]=new o$1p),o$1p.subtract(e[n+1],e[n-1],l),o$1p.multiplyByScalar(l,3,l),a[n+1]=1,e$2e(l=s[n+1])||(l=s[n+1]=new o$1p),o$1p.clone(i,l),m$O.solve(r,a,o,s)}function q$Q(e){var t,i=y$I,n=_$G,r=b$U,o=B$H;i.length=n.length=e.length-1,r.length=o.length=e.length,i[0]=n[0]=1,r[0]=2;var a=o[0];for(e$2e(a)||(a=o[0]=new o$1p),o$1p.subtract(e[1],e[0],a),o$1p.multiplyByScalar(a,3,a),t=1;t<i.length;++t)i[t]=n[t]=1,r[t]=4,e$2e(a=o[t])||(a=o[t]=new o$1p),o$1p.subtract(e[t+1],e[t-1],a),o$1p.multiplyByScalar(a,3,a);return r[t]=2,e$2e(a=o[t])||(a=o[t]=new o$1p),o$1p.subtract(e[t],e[t-1],a),o$1p.multiplyByScalar(a,3,a),m$O.solve(i,r,n,o)}function m$N(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).points,i=e.times,n=e.inTangents,r=e.outTangents;if(!(e$2e(t)&&e$2e(i)&&e$2e(n)&&e$2e(r)))throw new t$15("times, points, inTangents, and outTangents are required.");if(t.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$15("times.length must be equal to points.length.");if(n.length!==r.length||n.length!==t.length-1)throw new t$15("inTangents and outTangents must have a length equal to points.length - 1.");this._times=i,this._points=t,this._inTangents=n,this._outTangents=r,this._lastTimeIndex=0}Object.defineProperties(m$N.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}}),m$N.createC1=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).times,i=e.points,n=e.tangents;if(!e$2e(i)||!e$2e(t)||!e$2e(n))throw new t$15("points, times and tangents are required.");if(i.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(t.length!==i.length||t.length!==n.length)throw new t$15("times, points and tangents must have the same length.");var r=n.slice(0,n.length-1);return new m$N({times:t,points:i,inTangents:n.slice(1,n.length),outTangents:r})},m$N.createNaturalCubic=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).times,i=e.points;if(!e$2e(i)||!e$2e(t))throw new t$15("points and times are required.");if(i.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(t.length!==i.length)throw new t$15("times.length must be equal to points.length.");if(i.length<3)return new r$Q({points:i,times:t});var n=q$Q(i),r=n.slice(0,n.length-1);return new m$N({times:t,points:i,inTangents:n.slice(1,n.length),outTangents:r})},m$N.createClampedCubic=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).times,i=e.points,n=e.firstTangent,r=e.lastTangent;if(!(e$2e(i)&&e$2e(t)&&e$2e(n)&&e$2e(r)))throw new t$15("points, times, firstTangent and lastTangent are required.");if(i.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(t.length!==i.length)throw new t$15("times.length must be equal to points.length.");if(i.length<3)return new r$Q({points:i,times:t});var o=C$N(i,n,r),a=o.slice(0,o.length-1);return new m$N({times:t,points:i,inTangents:o.slice(1,o.length),outTangents:a})},m$N.hermiteCoefficientMatrix=new p$1d(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0),m$N.prototype.findTimeInterval=n$H.prototype.findTimeInterval;var x$Q=new e$2c,c$M=new o$1p;m$N.prototype.wrapTime=n$H.prototype.wrapTime,m$N.prototype.clampTime=n$H.prototype.clampTime,m$N.prototype.evaluate=function(e,t){e$2e(t)||(t=new o$1p);var i=this.points,n=this.times,r=this.inTangents,o=this.outTangents,a=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),s=(e-n[a])/(n[a+1]-n[a]),l=x$Q;l.z=s,l.y=s*s,l.x=l.y*s,l.w=1;var u=p$1d.multiplyByVector(m$N.hermiteCoefficientMatrix,l,l);return t=o$1p.multiplyByScalar(i[a],u.x,t),o$1p.multiplyByScalar(i[a+1],u.y,c$M),o$1p.add(t,c$M,t),o$1p.multiplyByScalar(o[a],u.z,c$M),o$1p.add(t,c$M,t),o$1p.multiplyByScalar(r[a],u.w,c$M),o$1p.add(t,c$M,t)};var M$M=new e$2c,C$M=new o$1p,s$F=new o$1p;function V$F(e){var t=e.points,i=e.times;if(t.length<3){var n=i[0],r=1/(i[1]-n),o=t[0],a=t[1];return function(e,t){e$2e(t)||(t=new o$1p);var i=(e-n)*r;return o$1p.lerp(o,a,i,t)}}return function(n,r){e$2e(r)||(r=new o$1p);var o,a,s,l,u,c=e._lastTimeIndex=e.findTimeInterval(n,e._lastTimeIndex),h=(n-i[c])/(i[c+1]-i[c]),d=M$M;return d.z=h,d.y=h*h,d.x=d.y*h,d.w=1,0===c?(o=t[0],a=t[1],s=e.firstTangent,l=o$1p.subtract(t[2],o,C$M),o$1p.multiplyByScalar(l,.5,l),u=p$1d.multiplyByVector(m$N.hermiteCoefficientMatrix,d,d)):c===t.length-2?(o=t[c],a=t[c+1],l=e.lastTangent,s=o$1p.subtract(a,t[c-1],C$M),o$1p.multiplyByScalar(s,.5,s),u=p$1d.multiplyByVector(m$N.hermiteCoefficientMatrix,d,d)):(o=t[c-1],a=t[c],s=t[c+1],l=t[c+2],u=p$1d.multiplyByVector(c$L.catmullRomCoefficientMatrix,d,d)),r=o$1p.multiplyByScalar(o,u.x,r),o$1p.multiplyByScalar(a,u.y,s$F),o$1p.add(r,s$F,r),o$1p.multiplyByScalar(s,u.z,s$F),o$1p.add(r,s$F,r),o$1p.multiplyByScalar(l,u.w,s$F),o$1p.add(r,s$F,r)}}var O$A=new o$1p,E$N=new o$1p;function c$L(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).points,i=e.times,n=e.firstTangent,r=e.lastTangent;if(o$1q.defined("points",t),o$1q.defined("times",i),o$1q.typeOf.number.greaterThanOrEquals("points.length",t.length,2),o$1q.typeOf.number.equals("times.length","points.length",i.length,t.length),t.length>2&&(e$2e(n)||(n=O$A,o$1p.multiplyByScalar(t[1],2,n),o$1p.subtract(n,t[2],n),o$1p.subtract(n,t[0],n),o$1p.multiplyByScalar(n,.5,n)),!e$2e(r))){var o=t.length-1;r=E$N,o$1p.multiplyByScalar(t[o-1],2,r),o$1p.subtract(t[o],r,r),o$1p.add(r,t[o-2],r),o$1p.multiplyByScalar(r,.5,r)}this._times=i,this._points=t,this._firstTangent=o$1p.clone(n),this._lastTangent=o$1p.clone(r),this._evaluateFunction=V$F(this),this._lastTimeIndex=0}function r$O(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).points,i=e.times;if(!e$2e(t)||!e$2e(i))throw new t$15("points and times are required.");if(t.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$15("times.length must be equal to points.length.");this._times=i,this._points=t,this._lastTimeIndex=0}Object.defineProperties(c$L.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}}),c$L.catmullRomCoefficientMatrix=new p$1d(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0),c$L.prototype.findTimeInterval=n$H.prototype.findTimeInterval,c$L.prototype.wrapTime=n$H.prototype.wrapTime,c$L.prototype.clampTime=n$H.prototype.clampTime,c$L.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},Object.defineProperties(r$O.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),r$O.prototype.findTimeInterval=n$H.prototype.findTimeInterval,r$O.prototype.wrapTime=n$H.prototype.wrapTime,r$O.prototype.clampTime=n$H.prototype.clampTime,r$O.prototype.evaluate=function(e,t){var i=this.points,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);return o*=(3-2*o)*o,e$2e(t)||(t=new o$1p),o$1p.lerp(i[r],i[r+1],o,t)};var _0x4b74a8=(_0x2ba416=!0,function(e,t){var i=_0x2ba416?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ba416=!1,i}),_0x53069b=_0x4b74a8(void 0,(function(){return _0x53069b.toString().search("(((.+)+)+)+$").toString().constructor(_0x53069b).search("(((.+)+)+)+$")})),_0x2ba416;_0x53069b();var _0x27f870={None:0,First:1,Second:2},_0x3a711b=Object.freeze(_0x27f870),j$L=[],D$H=[];function Q$K(e,t,i,n,r){var o=f$16.fromPoints(t,e).projectPointsOntoPlane(t,j$L);A$1f.computeWindingOrder2D(o)===W$13.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var a,s,l=t.length,u=0;if(n)for(a=new Float64Array(2*l*3),s=0;s<l;s++){var c=t[s],h=t[(s+1)%l];a[u++]=c.x,a[u++]=c.y,a[u++]=c.z,a[u++]=h.x,a[u++]=h.y,a[u++]=h.z}else{var d=0;if(r===m$1h.GEODESIC)for(s=0;s<l;s++)d+=y$Z.subdivideLineCount(t[s],t[(s+1)%l],i);else if(r===m$1h.RHUMB)for(s=0;s<l;s++)d+=y$Z.subdivideRhumbLineCount(e,t[s],t[(s+1)%l],i);for(a=new Float64Array(3*d),s=0;s<l;s++){var f;r===m$1h.GEODESIC?f=y$Z.subdivideLine(t[s],t[(s+1)%l],i,D$H):r===m$1h.RHUMB&&(f=y$Z.subdivideRhumbLine(e,t[s],t[(s+1)%l],i,D$H));for(var p=f.length,_=0;_<p;++_)a[u++]=f[_]}}var m=2*(l=a.length/3),g=ce$z.createTypedArray(l,m);for(u=0,s=0;s<l-1;s++)g[u++]=s,g[u++]=s+1;return g[u++]=l-1,g[u++]=0,new d$1o({geometry:new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:a})}),indices:g,primitiveType:W$18.LINES})})}function V$E(e,t,i,n,r){var o=f$16.fromPoints(t,e).projectPointsOntoPlane(t,j$L);A$1f.computeWindingOrder2D(o)===W$13.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var a,s,l=t.length,u=new Array(l),c=0;if(n)for(a=new Float64Array(2*l*3*2),s=0;s<l;++s){u[s]=c/3;var h=t[s],d=t[(s+1)%l];a[c++]=h.x,a[c++]=h.y,a[c++]=h.z,a[c++]=d.x,a[c++]=d.y,a[c++]=d.z}else{var f=0;if(r===m$1h.GEODESIC)for(s=0;s<l;s++)f+=y$Z.subdivideLineCount(t[s],t[(s+1)%l],i);else if(r===m$1h.RHUMB)for(s=0;s<l;s++)f+=y$Z.subdivideRhumbLineCount(e,t[s],t[(s+1)%l],i);for(a=new Float64Array(3*f*2),s=0;s<l;++s){var p;u[s]=c/3,r===m$1h.GEODESIC?p=y$Z.subdivideLine(t[s],t[(s+1)%l],i,D$H):r===m$1h.RHUMB&&(p=y$Z.subdivideRhumbLine(e,t[s],t[(s+1)%l],i,D$H));for(var _=p.length,m=0;m<_;++m)a[c++]=p[m]}}l=a.length/6;var g=u.length,x=2*(2*l+g),y=ce$z.createTypedArray(l,x);for(c=0,s=0;s<l;++s)y[c++]=s,y[c++]=(s+1)%l,y[c++]=s+l,y[c++]=(s+1)%l+l;for(s=0;s<g;s++){var v=u[s];y[c++]=v,y[c++]=v+l}return new d$1o({geometry:new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:a})}),indices:y,primitiveType:W$18.LINES})})}function A$U(e){if(o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&e$2e(e.height))throw new t$15("Cannot use both options.perPositionHeight and options.height");if(e$2e(e.arcType)&&e.arcType!==m$1h.GEODESIC&&e.arcType!==m$1h.RHUMB)throw new t$15("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var t=e.polygonHierarchy,i=u$Z(e.ellipsoid,t$12.WGS84),n=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),r=u$Z(e.perPositionHeight,!1),o=r&&e$2e(e.extrudedHeight),a=u$Z(e.arcType,m$1h.GEODESIC),s=u$Z(e.height,0),l=u$Z(e.extrudedHeight,s);if(!o){var u=Math.max(s,l);l=Math.min(s,l),s=u}this._ellipsoid=t$12.clone(i),this._granularity=n,this._height=s,this._extrudedHeight=l,this._arcType=a,this._polygonHierarchy=t,this._perPositionHeight=r,this._perPositionHeightExtrude=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=y$Z.computeHierarchyPackedLength(t)+t$12.packedLength+8}A$U.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),i=y$Z.packPolygonHierarchy(e._polygonHierarchy,t,i),t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._arcType,t[i++]=u$Z(e._offsetAttribute,-1),t[i]=e.packedLength,t};var X$J=t$12.clone(t$12.UNIT_SPHERE),Z$H={polygonHierarchy:{}};function n$F(e){e=e||[],this._extrudedHeight=void 0,this._closeTop=!0,this._closeBottom=!0,this.init(e)}function c$K(e){for(var t=Number.MAX_VALUE,i=-Number.MAX_VALUE,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=0;o<e.length;o++){var a=e[o];t=Math.min(a.x,t),i=Math.max(a.x,i),n=Math.min(a.y,n),r=Math.max(a.y,r)}return{minLon:t,maxLon:i,minLat:n,maxLat:r}}A$U.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=y$Z.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=t$12.unpack(e,t,X$J);t+=t$12.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=1===e[t++],u=1===e[t++],c=e[t++],h=e[t++],d=e[t];return e$2e(i)||(i=new A$U(Z$H)),i._polygonHierarchy=n,i._ellipsoid=t$12.clone(r,i._ellipsoid),i._height=o,i._extrudedHeight=a,i._granularity=s,i._perPositionHeight=u,i._perPositionHeightExtrude=l,i._arcType=c,i._offsetAttribute=-1===h?void 0:h,i.packedLength=d,i},A$U.fromPositions=function(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new A$U({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute})},A$U.createGeometry=function(e){var t=e._ellipsoid,i=e._granularity,n=e._polygonHierarchy,r=e._perPositionHeight,o=e._arcType,a=y$Z.polygonOutlinesFromHierarchy(n,!r,t);if(0!==a.length){var s,l,u=[],c=e$2d.chordLength(i,t.maximumRadius),h=e._height,d=e._extrudedHeight;if(e._perPositionHeightExtrude||!e$2d.equalsEpsilon(h,d,0,e$2d.EPSILON2))for(l=0;l<a.length;l++){if((s=V$E(t,a[l],c,r,o)).geometry=y$Z.scaleToGeodeticHeightExtruded(s.geometry,h,d,t,r),e$2e(e._offsetAttribute)){var f=s.geometry.attributes.position.values.length/3,p=new Uint8Array(f);e._offsetAttribute===_0x39c22a.TOP?p=d$1s(p,1,0,f/2):p=d$1s(p,e._offsetAttribute===_0x39c22a.NONE?0:1),s.geometry.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}u.push(s)}else for(l=0;l<a.length;l++){if((s=Q$K(t,a[l],c,r,o)).geometry.attributes.position.values=A$1f.scaleToGeodeticHeight(s.geometry.attributes.position.values,h,t,!r),e$2e(e._offsetAttribute)){var _=s.geometry.attributes.position.values.length,m=new Uint8Array(_/3);d$1s(m,e._offsetAttribute===_0x39c22a.NONE?0:1),s.geometry.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}u.push(s)}var g=k$14.combineInstances(u)[0],x=i$1d.fromVertices(g.attributes.position.values);return new I$1p({attributes:g.attributes,indices:g.indices,primitiveType:g.primitiveType,boundingSphere:x,offsetAttribute:e._offsetAttribute})}},n$F.prototype=new o$11,n$F.prototype.constructor=n$F,n$F.prototype.parent=o$11.prototype,Object.defineProperties(n$F.prototype,{partCount:{get:function(){return this.parts.length}},extrudedHeight:{get:function(){return this._extrudedHeight},set:function(e){this._extrudedHeight=e,this.polygon.extrudedHeight=e,this._isGeometryDirty=!0}},closeTop:{set:function(e){this._closeTop=e,this.polygon.closeTop=e,this._isGeometryDirty=!0}},closeBottom:{set:function(e){this._closeBottom=e,this.polygon.closeBottom=e,this._isGeometryDirty=!0}},bottomAltitude:{get:function(){return this.polygon.height},set:function(e){this.polygon.height=e,this.polygon.perPositionHeight=!1,this._isGeometryDirty=!0}}}),n$F.prototype.init=function(e){this.type=P$U.GEOREGION3D,this.parts=[],this.points=[],this.polygon={positions:[],extrudedHeight:this.extrudedHeight,closeTop:this._closeTop,closeBottom:this._closeBottom,perPositionHeight:!0};for(var t=0,i=e.length;t<i;t++){var n=e[t].pntArray.length;if(this.parts.push(n),n>0)for(var r=0;r<n;r++)this.polygon.positions.push(o$1p.fromDegrees(e[t].pntArray[r].x,e[t].pntArray[r].y,e[t].pntArray[r].z)),this.points.push(new s$N(e[t].pntArray[r].x,e[t].pntArray[r].y,e[t].pntArray[r].z))}this.type=P$U.GEOREGION3D;var o=c$K(this.points),a=o$1p.fromDegrees(o.minLon,o.maxLat,0),s=o$1p.fromDegrees(o.maxLon,o.maxLat,0),l=o$1p.fromDegrees(o.minLon,o.minLat,0);this.width=o$1p.distance(a,s),this.height=o$1p.distance(a,l)},n$F.prototype.addPart=function(e){if(!(!e instanceof t$L)){for(var t=0,i=e.pntArray.length;t<i;t++){var n=e.pntArray[t];this.points.push(n),this.polygon.positions.push(o$1p.fromDegrees(n.x,n.y,n.z))}this.parts.push(e.pntArray.length)}},n$F.prototype.getPart=function(e){if("number"!=typeof e||e>=this.partCount)return null;for(var t=new t$L,i=0,n=0;n<e;n++)i+=this.parts[n];for(n=i;n<this.parts[e];n++)t.add(new s$N(this.points[n].x,this.points[n].y,this.points[n].z));return t},n$F.prototype._createGeometry=function(){var e=U$18.fromPositions(this.polygon);this._geometry=U$18.createGeometry(e),this._isGeometryDirty=!1};const _0x15f553=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x36a0f9=_0x15f553(void 0,(function(){return _0x36a0f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x36a0f9).search("(((.+)+)+)+$")}));_0x36a0f9();const _0x4e8357="uExcavationTexture",_0x284166="uEmissionTexAtlas",_0x383653="uFrontColorTexture",_0x565ea2="uFrontDepthTexture",_0x368f4f="uBackDepthTexture",_0x5abea4="uCategorieTexture",_0x17675c="uOverlayTexture",_0xdff1cd="uFlattenTexture",_0x3f1b0f="uHypsometricTexture",_0x5b8167="uHypsometricRenderTexture",_0x39bf40="uNormalDepthTexture";function _0x12db87(e){var t=_0x37a515.call(this)||this;t._layer=e,t._hasExcavation=e._hasExcavation,t._textures={},t._name=_0x2e0417.LAYER,t._lastTextureUpdateFrame=-1,this._initUniformMap()}function _0x3640a5(e){return 1!==e._brightness||1!==e._contrast||0!==e._hue||1!==e._saturation||1!==e._gamma}function _0x261fca(e){var t=e._fileType;return t===p$T.ClampGroundPolygon||t===p$T.ClampObjectPolygon||t===p$T.ExtendClampPolygonCache||t===p$T.ClampGroundLine||t===p$T.ClampObjectLine}_0x37a515&&(_0x12db87.__proto__=_0x37a515),_0x12db87.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x12db87.prototype.constructor=_0x37a515,Object.defineProperties(_0x12db87.prototype,{}),_0x12db87.prototype._initUBOStruct=function(){this._ubo.addUniform("uSelColor",4),this._ubo.addUniform("uTranslationAndBottom",4),this._ubo.addUniform("uFillForeColor",4),this._ubo.addUniform("uPolygonOffset",4),this._ubo.addUniform("uPointSize",1),this._ubo.addUniform("uMinMaxTransparent",2),this._ubo.addUniform("uTransparentFilter",1),this._ubo.addUniform("uHypLineColor",4),this._ubo.addUniform("uNoValueColor",4),this._ubo.addUniform("uHypRect",4),this._ubo.addUniform("uHypHasAnalysisRegion",1),this._ubo.addUniform("uMixColorType",1),this._ubo.addUniform("uHypOpacity",1),this._ubo.addUniform("uHypContourInterval",1),this._ubo.addUniform("uHypContourFillMode",1),this._ubo.addUniform("uHypFloor",1),this._ubo.addUniform("uHypCeil",1),this._ubo.addUniform("uDataFloor",1),this._ubo.addUniform("uDataCeil",1),this._ubo.addUniform("uHypMaxVisibleValue",1),this._ubo.addUniform("uHypMinVisibleValue",1),this._ubo.addUniform("uHypsometricVisible",1),this._ubo.addUniform("uRect",4),this._ubo.addUniform("uCameraHeight",1),this._ubo.addUniform("uExcavationRect",4),this._ubo.addUniform("uServerExcavationRect",4),this._ubo.addUniform("uExcavationMode",1),this._ubo.addUniform("uServerExcavationMode",1),this._ubo.addUniform("uSwipeRegion",4),this._ubo.addUniform("uBrightness",1),this._ubo.addUniform("uContrast",1),this._ubo.addUniform("uHue",1),this._ubo.addUniform("uSaturation",1),this._ubo.addUniform("uOneOverGamma",1),this._ubo.addUniform("uClipPlanes",4,6),this._ubo.addUniform("uClipLineColor",4),this._ubo.addUniform("uClipMode",1),this._ubo.addUniform("uMaxCategory",1),this._ubo.addUniform("uMinCategory",1),this._ubo.addUniform("uCategoryWidht",1),this._ubo.addUniform("uCategoryHeight",1),this._ubo.addUniform("uLineColor",4),this._ubo.addUniform("uLineWidth",1),this._ubo.addUniform("uFillStyle",1),this._ubo.addUniform("uTransparentBackColor",4),this._ubo.addUniform("uTransparentBackColorTolerance",1),this._ubo.addUniform("uVisibleDistanceMax",1),this._ubo.addUniform("uHorizontalColor",4),this._ubo.addUniform("uHorizontalLine",1),this._ubo.addUniform("uDistanceFalloffFactor",1),this._ubo.addUniform("uStrokesTextureScale",2),this._ubo.addUniform("uStrokesLog2Resolution",1),this._ubo.addUniform("uMinMaxTerrainHeightAndPickInfo",4),this._ubo.addUniform("uOverlayRect",4),this._ubo.addUniform("uEmissionTexAtlasTilingAndOffset",4,10),this._ubo.addUniform("uEmissionTexAtlasRects",4,10),this._ubo.addUniform("uEmissionColor",4),this._ubo.addUniform("uLayerBounds",4),this._ubo.addUniform("uLayerCornerLength",1),this._ubo.addUniform("uMaxCategoryOrHypCeil",1),this._ubo.addUniform("uMinCategoryOrHypFloor",1),this._ubo.addUniform("uEmissionTexAtlasCount",1),this._ubo.addUniform("uSnowCoverageFactor",1),this._ubo.addUniform("uAnimationSpeed",1),this._ubo.addUniform("uRippleScale",1),this._ubo.addUniform("uWindIntensity",1),this._ubo.addUniform("uRain",1),this._ubo.addUniform("uCameraDepth",1),this._ubo.addUniform("uWetnessFactor",1),this._ubo.addUniform("uSelectColorType",1)},_0x12db87.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x12db87.prototype._updateHypData=function(){const e=this._layer,t=e._hypsometricSetting,i=t.LineColor,n=t.noValueColor,r=e._hypsometricBound;this._ubo.updateFloat4("uHypLineColor",i.red,i.green,i.blue,i.alpha),this._ubo.updateFloat4("uNoValueColor",n.red,n.green,n.blue,n.alpha),this._ubo.updateFloat4("uHypRect",r.x,r.y,r.z,r.w),this._ubo.updateFloat("uHypHasAnalysisRegion",e._bUseHypRegion),this._ubo.updateFloat("uMixColorType",e._mixColorType),this._ubo.updateFloat("uHypOpacity",t.Opacity),this._ubo.updateFloat("uHypContourInterval",t.LineInterval);let o=1;switch(t.DisplayMode){case k$S.DisplayMode.NONE:o=0;break;case k$S.DisplayMode.FACE:o=1;break;case k$S.DisplayMode.LINE:o=2;break;case k$S.DisplayMode.FACE_AND_LINE:o=3}this._ubo.updateFloat("uHypContourFillMode",o),this._ubo.updateFloat("uHypFloor",t.ColorTableMinKey),this._ubo.updateFloat("uHypCeil",t.ColorTableMaxKey);let a=e._fMinValue===e._fMaxValue?0:e._fMinValue,s=e._fMinValue===e._fMaxValue?1:e._fMaxValue;this._ubo.updateFloat("uDataFloor",a),this._ubo.updateFloat("uDataCeil",s),this._ubo.updateFloat("uHypMaxVisibleValue",t.MaxVisibleValue),this._ubo.updateFloat("uHypMinVisibleValue",t.MinVisibleValue+e$2d.EPSILON5),this._ubo.updateFloat("uHypsometricVisible",1)},_0x12db87.prototype._updateWVisibleData=function(){this._ubo.updateVector4("uMaxCategory",this._layer._bUseHypRegion),this._ubo.updateVector4("uMinCategory",this._layer._bUseHypRegion),this._ubo.updateVector4("uCategoryWidht",this._layer._bUseHypRegion),this._ubo.updateVector4("uCategoryHeight",this._layer._bUseHypRegion)},_0x12db87.prototype._updateSwipe=function(){const e=this._layer,t=this._ubo,i=e._frameState.context,n=e._swipeRegion,r=i.drawingBufferWidth,o=e._frameState.context.drawingBufferHeight,a=n.x*r,s=(1-n.y)*o,l=n.z*r,u=(1-n.w)*o;t.updateFloat4("uSwipeRegion",a,s,l,u)},_0x12db87.prototype._updateEmissive=function(){const e=this._layer,t=this._ubo,i=e._layerModelBounds,n=i.x,r=i.y,o=i.z-i.x,a=i.w-i.y,s=Math.sqrt(i.z*i.z+i.w*i.w);let l=100,u=0;const c=e._hypsometricSetting;if(e$2e(c)&&(0!==c._floor||0!==c._ceiling)&&(l=c._ceiling,u=c._floor),t.updateFloat4("uLayerBounds",n,r,o,a),t.updateFloat("uLayerCornerLength",s),t.updateFloat("uMaxCategoryOrHypCeil",l),t.updateFloat("uMinCategoryOrHypFloor",u),e$2e(c)){var h=c._getEmissionAtlasTextureRects(),d=c._getEmissionTexAtlasTilingAndOffset(),f=[],p=[];let e=Math.min(10,h.length);for(let t=0;t<e;t++){let e=h[t];e$2c.pack(e,f,4*t);let i=d[t];e$2c.pack(i,p,4*t)}t.updateFloatArray("uEmissionTexAtlasRects",f),t.updateFloatArray("uEmissionTexAtlasTilingAndOffset",p),t.updateFloat("uEmissionTexAtlasCount",e)}},_0x12db87.prototype._updateClipValue=function(){const e=this._layer,t=this._ubo,i=e._clipLineColor,n=e._clipPlane,r=n.length,o=new Array(4*r);for(let e=0;e<r;e++){const t=n[e];o[4*e]=t.x,o[4*e+1]=t.y,o[4*e+2]=t.z,o[4*e+3]=t.w}t.updateFloatArray("uClipPlanes",o),t.updateFloat4("uClipLineColor",i.x,i.y,i.z,i.w),t.updateFloat("uClipMode",e._clipMode)},_0x12db87.prototype._updateWireFrameSketch=function(){const e=this._layer,t=this._ubo;e$2e(e._edgeStrokesTexture)||e._initEdgeTexture(),t.updateFloat2("uStrokesTextureScale",e._strokesTextureScale.x,e._strokesTextureScale.y),t.updateFloat("uStrokesLog2Resolution",e._strokesLog2Resolution)},_0x12db87.prototype.update=function(e,t){if(!e.webgpu&&!e.webgl2)return;e$2e(this._ubo)||this._initUBO(e);const i=this._layer,n=this._ubo,r=i.style3D,o=i.selectedColor,a=i.selectedTranslate,s=r.fillForeColor,l=r.emissionColor;this._ubo.updateFloat4("uSelColor",o.red,o.green,o.blue,o.alpha),this._ubo.updateFloat4("uTranslationAndBottom",a.x,a.y,a.z,r.bottomAltitude),this._ubo.updateFloat4("uFillForeColor",s.red,s.green,s.blue,s.alpha),this._ubo.updateFloat4("uEmissionColor",l.red,l.green,l.blue,l.alpha);var u=this._layer._rsColor.polygonOffset,c=0,h=0;e$2e(u)&&(c=u.factor,h=u.units),this._ubo.updateFloat4("uPolygonOffset",c,h,-5,-5),this._ubo.updateFloat("uPointSize",this._layer.style3D.pointSize);const d=r.lineColor,f=r.lineWidth;if(this._ubo.updateFloat4("uLineColor",d.red,d.green,d.blue,d.alpha),this._ubo.updateFloat("uLineWidth",f),this._layer._hasExcavation&&(this._ubo.updateFloat2("uExcavationMode",this._layer._excavationMode),this._ubo.updateFloat4("uExcavationRect",this._layer._excavationBounds.x,this._layer._excavationBounds.y,this._layer._excavationBounds.z,this._layer._excavationBounds.w)),n.updateFloat2("uMinMaxTransparent",i.minTransparentAlpha,i.maxTransparentAlpha),i._flattening&&(this._ubo.updateVector4("uRect",i._flattenBounds),this._ubo.updateFloat("uCameraHeight",i._frameState.camera.positionCartographic.height)),i._bUseHypColorTable&&this._updateHypData(),i._hasExcavation&&(n.updateVector4("uExcavationRect",i._excavationBounds),n.updateFloat("uExcavationMode",i._excavationMode)),i._hasServerExcavation&&(n.updateVector4("uServerExcavationRect",i._serverExcavationBounds),n.updateFloat("uServerExcavationMode",i._serverExcavationMode)),i.swipeEnabled&&this._updateSwipe(),i._hasEmissiveTexAtlas&&this._updateEmissive(),_0x3640a5(i)&&(n.updateFloat("uBrightness",i._brightness),n.updateFloat("uContrast",i._contrast),n.updateFloat("uHue",i._hue),n.updateFloat("uSaturation",i._saturation),n.updateFloat("uOneOverGamma",1/i._gamma)),i._clipping&&this._updateClipValue(),e$2e(i._categorieTexture)&&(n.updateFloat("uMaxCategory",i._hypMaxCategory),n.updateFloat("uMinCategory",i._hypMinCategory),n.updateFloat("uCategoryWidht",i._categorieTexture&&i._categorieTexture.width||256),n.updateFloat("uCategoryHeight",i._categorieTexture&&i._categorieTexture.height||1)),n.updateFloat("uFillStyle",i.style3D.fillStyle),i._transparentBackColorTolerance>0&&(n.updateColor("uTransparentBackColor",i._transparentBackColor),n.updateFloat("uTransparentBackColorTolerance",i._transparentBackColorTolerance)),i.visibleDistanceMax<6378137&&i.translucencyByDistance&&n.updateFloat("uVisibleDistanceMax",i._visibleDistanceMax),i.horizontalline&&(n.updateVector4("uHorizontalColor",i._HorizontalColor),n.updateFloat("uHorizontalLine",i._fHorizontalLine)),n.updateFloat("uDistanceFalloffFactor",i._edgeDistanceFalloffFactor),i.wireFrameMode===_0x1d226a.Sketch&&this._updateWireFrameSketch(),_0x261fca(i)&&n.updateFloat4("uMinMaxTerrainHeightAndPickInfo",i._shadowVolumeBottomHeight,i._shadowVolumeTopHeight,i._picking,i._context._pickPositionHeight),i._hasOverlay&&n.updateVector4("uOverlayRect",i._overlayBounds),i._hasSnowEffect){const e=i._PBRMaterialParams.pbrMetallicRoughness.snowEffect;let t=e.snow_coverage>0?e.snow_coverage:.5;n.updateFloat("uSnowCoverageFactor",t)}if(i._hasRainEffect){const e=i._PBRMaterialParams.pbrMetallicRoughness.rainEffect,t=e.ripple_scale>0?e.ripple_scale:5,r=e.rain>0?e.rain:200,o=e.cameraDepth>0?e.cameraDepth:.8,a=e.wetnessFactor>0?e.wetnessFactor:0;n.updateFloat("uAnimationSpeed",e.animationSpeed),n.updateFloat("uRippleScale",t),n.updateFloat("uWindIntensity",e.wind_intensity),n.updateFloat("uRain",r),n.updateFloat("uCameraDepth",o),n.updateFloat("uWetnessFactor",a)}n.updateFloat("uSelectColorType",i.selectColorType),n.updateFloat("uTransparentFilter",i.selectionFiltrateByTransparency),this._ubo.update(),this._setLayerTextureToUBO(t)},_0x12db87.prototype._setLayerTextureToUBO=function(e){e.frameNumber!=this._lastTextureUpdateFrame&&(e$2e(this._layer._sqTextures)&&this._layer._sqTextures.length>0?(this._isLayerTextureChanged(_0x565ea2,this._layer._sqTextures[0]),this._isLayerTextureChanged(_0x368f4f,this._layer._sqTextures[1]),this._isLayerTextureChanged(_0x383653,this._layer._sqTextures[2])):(this._isLayerTextureChanged(_0x565ea2,void 0),this._isLayerTextureChanged(_0x368f4f,void 0),this._isLayerTextureChanged(_0x383653,void 0)),this._isLayerTextureChanged(_0x284166,this._layer._hasEmissiveTexAtlas?this._layer._hypsometricSetting._emissionTextureAtlas.texture:void 0),this._isLayerTextureChanged(_0x5abea4,this._layer._categorieTexture),this._isLayerTextureChanged(_0x4e8357,this._layer._excavationTexture),this._isLayerTextureChanged(_0x17675c,this._layer._overlayTexture),this._isLayerTextureChanged(_0xdff1cd,this._layer._flattenTexture),this._isLayerTextureChanged(_0x3f1b0f,this._layer._hypsometricTexture),this._isLayerTextureChanged(_0x5b8167,this._layer._hypsometricRenderTexture),this._isLayerTextureChanged(_0x39bf40,this._layer.isSilhouette()?this._layer._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0):void 0),this._lastTextureUpdateFrame=e.frameNumber)},_0x12db87.prototype._isLayerTextureChanged=function(e,t){this._isTextureDirty=this._textures[e]!==t,this._textures[e]=t},_0x12db87.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name);for(const t in this._textures)this._setTextureToEffect(e,this._textures[t],t)},_0x12db87.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}};var _0x42d8ba=new o$1o,_0x208962=new o$1o;const _0x3c7329=new e$2c;_0x12db87.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(!t.webgl2&&!t.webgpu){var i={uSelColor:function(){return e.selectedColor},uTranslationAndBottom:function(){return _0x3c7329.x=e.selectedTranslate.x,_0x3c7329.y=e.selectedTranslate.y,_0x3c7329.z=e.selectedTranslate.z,_0x3c7329.w=e.style3D.bottomAltitude,e.selectedTranslate},uFillForeColor:function(){return e.style3D.fillForeColor},uPolygonOffset:function(){var t=e._rsColor.polygonOffset;return e$2e(t)?(_0x208962.x=t.factor,_0x208962.y=t.units):(_0x208962.x=0,_0x208962.y=0),_0x208962},uPointSize:function(){return e.style3D.pointSize},uMinMaxTransparent:function(){return _0x42d8ba.x=e.minTransparentAlpha,_0x42d8ba.y=e.maxTransparentAlpha,_0x42d8ba},uTransparentFilter:function(){return e.selectionFiltrateByTransparency},uHypLineColor:function(){return e$2e(e._hypsometricSetting)?(_0x3c7329.x=e._hypsometricSetting.LineColor.red,_0x3c7329.y=e._hypsometricSetting.LineColor.green,_0x3c7329.z=e._hypsometricSetting.LineColor.blue,_0x3c7329.w=e._hypsometricSetting.LineColor.alpha,_0x3c7329):e$2c.ZERO},uNoValueColor:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.noValueColor:Color.WHITE},uHypRect:function(){return e._hypsometricBound},uHypHasAnalysisRegion:function(){return e._bUseHypRegion},uMixColorType:function(){return e$2e(e._mixColorType)?e._mixColorType:0},uHypOpacity:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.Opacity:1},uHypContourInterval:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.LineInterval:100},uHypContourFillMode:function(){var t=1;if(e$2e(e._hypsometricSetting))switch(e._hypsometricSetting.DisplayMode){case k$S.DisplayMode.NONE:t=0;break;case k$S.DisplayMode.FACE:t=1;break;case k$S.DisplayMode.LINE:t=2;break;case k$S.DisplayMode.FACE_AND_LINE:t=3}return t},uHypFloor:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMaxKey:0},uDataFloor:function(){return e._fMinValue===e._fMaxValue?0:e._fMinValue},uDataCeil:function(){return e._fMinValue===e._fMaxValue?1:e._fMaxValue},uHypMaxVisibleValue:function(){return(e$2e(e._hypsometricSetting)?e._hypsometricSetting.MaxVisibleValue:0)+e$2d.EPSILON5},uHypMinVisibleValue:function(){return(e$2e(e._hypsometricSetting)?e._hypsometricSetting.MinVisibleValue:0)-e$2d.EPSILON5},uHypsometricVisible:function(){return 1},uRect:function(){return e._flattenBounds},uCameraHeight:function(){return e._frameState.camera.positionCartographic.height},uExcavationMode:function(){return e._excavationMode},uExcavationRect:function(){return e._excavationBounds},uServerExcavationMode:function(){return e._serverExcavationMode},uServerExcavationRect:function(){return e._serverExcavationBounds},uSwipeRegion:function(){return _0x3c7329.x=e._swipeRegion.x*e._frameState.context.drawingBufferWidth,_0x3c7329.y=(1-e._swipeRegion.y)*e._frameState.context.drawingBufferHeight,_0x3c7329.z=e._swipeRegion.z*e._frameState.context.drawingBufferWidth,_0x3c7329.w=(1-e._swipeRegion.w)*e._frameState.context.drawingBufferHeight,_0x3c7329},uBrightness:function(){return e._brightness},uContrast:function(){return e._contrast},uHue:function(){return e._hue},uSaturation:function(){return e._saturation},uOneOverGamma:function(){return 1/e._gamma},uClipMode:function(){return e._clipMode},uClipPlanes:function(){return e._clipPlane},uClipLineColor:function(){return e._clipLineColor},uMaxCategory:function(){return e._hypMaxCategory},uMinCategory:function(){return e._hypMinCategory},uCategoryWidht:function(){return e._categorieTexture&&e._categorieTexture.width||256},uCategoryHeight:function(){return e._categorieTexture&&e._categorieTexture.height||1},uLineColor:function(){return e.style3D.lineColor},uLineWidth:function(){return e.style3D.lineWidth},uFillStyle:function(){return e.style3D.fillStyle},uTransparentBackColor:function(){return e._transparentBackColor},uTransparentBackColorTolerance:function(){return e._transparentBackColorTolerance},uVisibleDistanceMax:function(){return e._visibleDistanceMax},uHorizontalColor:function(){return e$2e(e$2e(e._HorizontalColor))?e._HorizontalColor:new e$2c(1,1,0,0)},uHorizontalLine:function(){return e$2e(e._fHorizontalLine)?e._fHorizontalLine:0},uDistanceFalloffFactor:function(){return e._edgeDistanceFalloffFactor},uStrokesTextureScale:function(){return e._strokesTextureScale},uStrokesLog2Resolution:function(){return e._strokesLog2Resolution},uMinMaxTerrainHeightAndPickInfo:function(){return _0x3c7329.x=e._shadowVolumeBottomHeight,_0x3c7329.x=e._shadowVolumeTopHeight,_0x3c7329.x=e._picking,_0x3c7329.x=e._context._pickPositionHeight,_0x3c7329},uOverlayRect:function(){return e._overlayBounds},uEmissionTexAtlasTilingAndOffset:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting._getEmissionTexAtlasTilingAndOffset():[]},uEmissionTexAtlasRects:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting._getEmissionAtlasTextureRects():[]},uEmissionColor:function(){return e.style3D.emissionColor},uLayerBounds:function(){return _0x3c7329.x=e._layerModelBounds.x,_0x3c7329.y=e._layerModelBounds.y,_0x3c7329.z=e._layerModelBounds.z-e._layerModelBounds.x,_0x3c7329.w=e._layerModelBounds.w-e._layerModelBounds.y,_0x3c7329},uLayerCornerLength:function(){return Math.sqrt(e._layerModelBounds.z*e._layerModelBounds.z+e._layerModelBounds.w*e._layerModelBounds.w)},uMaxCategoryOrHypCeil:function(){var t=e._hypMaxCategory;return e$2e(e._hypsometricSetting)&&(0!=e._hypsometricSetting._floor||0!=e._hypsometricSetting._ceiling)&&(t=e._hypsometricSetting._ceiling),e$2e(t)||(t=100),t},uMinCategoryOrHypFloor:function(){var t=e._hypMinCategory;return e$2e(e._hypsometricSetting)&&(0!=e._hypsometricSetting._floor||0!=e._hypsometricSetting._ceiling)&&(t=e._hypsometricSetting._floor),e$2e(t)||(t=0),t},uEmissionTexAtlasCount:function(){const t=e._hypsometricSetting;if(e$2e(t)){var i=t._getEmissionAtlasTextureRects();return Math.min(10,i.length)}return 0},uSnowCoverageFactor:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.snowEffect;return t.snow_coverage>0?t.snow_coverage:.5},uAnimationSpeed:function(){return e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.animationSpeed},uRippleScale:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.ripple_scale>0?t.ripple_scale:5},uWindIntensity:function(){return e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity},uRain:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.rain>0?t.rain:200},uCameraDepth:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.cameraDepth>0?t.cameraDepth:.8},uWetnessFactor:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.wetnessFactor>0?t.wetnessFactor:0}};this._uniformMap=i}},_0x12db87.prototype.isDestroyed=function(){return!1},_0x12db87.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};const _0x17bb8f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2a7a75=_0x17bb8f(void 0,(function(){return _0x2a7a75.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a7a75).search("(((.+)+)+)+$")}));function _0x44ae93(e){var t=_0x37a515.call(this)||this;t._layer=e,t._name=_0x2e0417.WaterLayer,this._initUniformMap()}_0x2a7a75(),_0x37a515&&(_0x44ae93.__proto__=_0x37a515),_0x44ae93.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x44ae93.prototype.constructor=_0x37a515,Object.defineProperties(_0x44ae93.prototype,{}),_0x44ae93.prototype._initUBOStruct=function(){this._ubo.addUniform("uWaterColor",4),this._ubo.addUniform("uSunColor",4),this._ubo.addUniform("uFlowParameter",4),this._ubo.addUniform("uTimeVal",1),this._ubo.addUniform("uWaterBrightness",1),this._ubo.addUniform("uUseRefectMap",1),this._ubo.addUniform("uWaveScale",1),this._ubo.addUniform("uReflowWaveScale",1),this._ubo.addUniform("uNoiseStrength",1),this._ubo.addUniform("uMinVisibleValue",1),this._ubo.addUniform("uMaxVisibleValue",1),this._ubo.addUniform("uReflectMapLod",1)},_0x44ae93.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())};let _0x41fca4=0,_0xad0db4=0;_0x44ae93.prototype.update=function(e){if(!e.webgpu&&!e.webgl2)return;e$2e(this._ubo)||this._initUBO(e);const t=this._layer,i=this._ubo,n=t.waterParameter,r=n.color,o=t._frameState.lightSource.sunLightColor,a=n.speed,s=n.waveScale,l=n.reflowWaveScale,u=n.noiseStrength||1,c=n.waveDirection,h=null!==c?0:1,d=c*Math.PI/180,f=-Math.sin(d),p=-Math.cos(d);_0xad0db4!==t._frameState.frameNumber&&(_0x41fca4+=1/60,_0xad0db4=t._frameState.frameNumber);const _=t._frameState._framebufferList.water;let m=_&&_.isUpdate?1:0;i.updateFloat4("uWaterColor",r.x,r.y,r.z,r.w),i.updateFloat4("uSunColor",o.red,o.green,o.blue,o.alpha),i.updateFloat4("uFlowParameter",f,p,a,h),i.updateFloat("uTimeVal",_0x41fca4),i.updateFloat("uWaterBrightness",n.brightness),i.updateFloat("uUseRefectMap",m),i.updateFloat("uWaveScale",s),i.updateFloat("uReflowWaveScale",l),i.updateFloat("uNoiseStrength",u),i.updateFloat("uMinVisibleValue",t._hypMinCategory+e$2d.EPSILON5),i.updateFloat("uMaxVisibleValue",t._hypMaxCategory),i.updateFloat("uReflectMapLod",5-_.distinctQuality),this._ubo.update()},_0x44ae93.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x44ae93.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x44ae93.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(t.webgl2||t.webgpu)return;const i=e.waterParameter;this._uniformMap={},this._uniformMap.uWaterColor=function(){return i.color},this._uniformMap.uSunColor=function(){return e._frameState.lightSource.sunLightColor},this._uniformMap.uFlowParameter=function(){const e=i.waveDirection,t=null!==e?0:1,n=e*Math.PI/180;return new e$2c(-Math.sin(n),-Math.cos(n),i.speed,t)},this._uniformMap.uTimeVal=function(){return _0xad0db4!==e._frameState.frameNumber&&(_0x41fca4+=1/60,_0xad0db4=e._frameState.frameNumber),_0x41fca4},this._uniformMap.uWaterBrightness=function(){return i.brightness},this._uniformMap.uUseRefectMap=function(){const t=e._frameState._framebufferList.water;return t&&t.isUpdate?1:0},this._uniformMap.uWaveScale=function(){return i.waveScale},this._uniformMap.uReflowWaveScale=function(){return i.reflowWaveScale},this._uniformMap.uNoiseStrength=function(){return i.noiseStrength||1},this._uniformMap.uMaxVisibleValue=function(){return e._hypMaxCategory},this._uniformMap.uMinVisibleValue=function(){return e._hypMinCategory+e$2d.EPSILON5}},_0x44ae93.prototype.isDestroyed=function(){return!1},_0x44ae93.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};var e$15={SMALL:0,MEDIUM:1,LARGE:2},s$E=Object.freeze(e$15),e$14={CALM:0,SLIGHT:1,MILD:2,MODERATE:3},i$O=Object.freeze(e$14);function h$J(){this._waterColour=new e$2c(3/255,.6,98/255,1),this._waveDirection=180,this._bumpSpeed=1.2,this._waveScale=80,this._reflowWaveScale=1,this._noiseStrength=.6,this._fresnelPower=.1,this._maxFresnel=1,this._minFresnel=0,this._timeVal=.05,this._waterBrightness=.7,this._averageHeight=3.7,this._waterbodySize=s$E.MEDIUM,this._waveStrength=i$O.MILD,this._update=!1,this._waterEffect={[s$E.SMALL]:{[i$O.CALM]:()=>n$E(this,.1,120,30,.1),[i$O.SLIGHT]:()=>n$E(this,.7,320,30,.2),[i$O.MILD]:()=>n$E(this,1,280,15,.5),[i$O.MODERATE]:()=>n$E(this,1,240,15,.75)},[s$E.MEDIUM]:{[i$O.CALM]:()=>n$E(this,.2,80,1,.1),[i$O.SLIGHT]:()=>n$E(this,.7,120,1,.35),[i$O.MILD]:()=>n$E(this,1.2,80,1,.6),[i$O.MODERATE]:()=>n$E(this,1.2,40,1,.9)},[s$E.LARGE]:{[i$O.CALM]:()=>n$E(this,.5,40,2,.1),[i$O.SLIGHT]:()=>n$E(this,1.1,80,2,.25),[i$O.MILD]:()=>n$E(this,1.3,30,2,.6),[i$O.MODERATE]:()=>n$E(this,1.5,20,1,1.4)}}}function n$E(e,t,i,n,r){e.speed=t,e.waveScale=i,e.reflowWaveScale=n,e.noiseStrength=r}function f$O(e){e._update&&(e._waterEffect[e._waterbodySize][e._waveStrength](),e._update=!1)}Object.defineProperties(h$J.prototype,{color:{get:function(){return this._waterColour},set:function(e){if(o$1q.defined("value",e),!(e instanceof e$1X))throw new DeveloperError("Expected waterColor to be typeof color");let t=new e$2c;t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,this._waterColour=t}},waveDirection:{get:function(){return this._waveDirection},set:function(e){this._waveDirection=e}},waterbodySize:{get:function(){return this._waterbodySize},set:function(e){this._waterbodySize=e,this._update=!0,f$O(this)}},waveStrength:{get:function(){return this._waveStrength},set:function(e){this._waveStrength=e,this._update=!0,f$O(this)}},noiseStrength:{get:function(){return this._noiseStrength},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._noiseStrength=e}},speed:{get:function(){return this._bumpSpeed},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._bumpSpeed=e}},waveScale:{get:function(){return this._waveScale},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._waveScale=e}},reflowWaveScale:{get:function(){return this._reflowWaveScale},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._reflowWaveScale=e}},fresnelPower:{get:function(){return this._fresnelPower},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._fresnelPower=e}},maxFresnel:{get:function(){return this._maxFresnel},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._maxFresnel=e}},minFresnel:{get:function(){return this._minFresnel},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._minFresnel=e}},timeVal:{get:function(){return this._timeVal},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._timeVal=e}},brightness:{get:function(){return this._waterBrightness},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._waterBrightness=e}},averageHeight:{get:function(){return this._averageHeight},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._averageHeight=e}}});var _0x16b14f=(_0x3775bf=!0,function(e,t){var i=_0x3775bf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3775bf=!1,i}),_0x23364=_0x16b14f(void 0,(function(){return _0x23364.toString().search("(((.+)+)+)+$").toString().constructor(_0x23364).search("(((.+)+)+)+$")})),_0x3775bf;_0x23364(),new a$18;var _0x120895=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),_0x577081={CLIP_NOTHING:0,CLIP_BEHIND_ANY_PLANE:1,CLIP_BEHIND_ALL_PLANE:2,ONLY_KEEP_LINE:3},_0x2c45b2={Altitude:0,Color:1,Texture:2},_0x1733b9={Normal:0,Add:1},_0x1c85b1={LOD_Loading:0,All_Loading:1},_0x277a12={DEGREE:"Degree",METER:"Meter"},_0x3feb92=-1e3,_0x11b5bb=9e3,_0x1a71e8=function(e){var t=(e=e||{}).gl,i=e.name,n=e.position;if(this._materialType=e.materialType,this._isS3MB=e.isS3MB,this._isOSGB=e.isOSGB,this._isS3MZ=e.isS3MZ,this._isS3MBlock=e.isS3MBlock,this._context=e.context,this._gl=t,this._name=i,this._globeType=e.globeType,this._groupName=e.groupName,this._id=-1,this._version=void 0,this._baseUri=e.baseUri,this._dataType=e.dataType,this._isTextureShare=u$Z(e.isTextureShare,!1),this._associateMaterialUrl=e.associateMaterialUrl,this._isTransparencyOptimization=u$Z(e.isTransparencyOptimization,!1),this._vertexCompressionType=e.vertexCompressionType,e$2e(e.vertexWeightMode))switch(e.vertexWeightMode){case"DatasetField":default:this._vertexWeightMode=_0x132759.DatasetField;break;case"EdgeLengthMin":this._vertexWeightMode=_0x132759.EdgeLengthMin}if(this._triangleFiltratePixel=0,this._urlType=u$Z(e.urlType,Tr$4.REST),this._urlArguments=e.urlArguments,this._fileType=p$T.OSGBFile,this._RGBTOBGR=!1,this._S3MTileLoadedEvent=new o$1h,this._allTilesLoaded=new o$1h,this._colorTableChanged=new o$1h,this._attributeDownloaded=new o$1h,this._prepareLoadSize=0,this._prepareLoadEvent=void 0,e.pointCloudLayerNames&&e.pointCloudLayerNames.length>0){this._pointCloudLayerVisible={};for(var r=0,o=e.pointCloudLayerNames.length;r<o;r++)this._pointCloudLayerVisible[e.pointCloudLayerNames[r]]=!0;this._pointCloudLayerNames=e.pointCloudLayerNames.slice(0)}if(e$2e(e.fileType))switch(e.fileType){case"ClampGroundLineCache":this._fileType=p$T.ClampGroundLine;break;case"ClampObjectLineCache":this._fileType=p$T.ClampObjectLine;break;case"ClampGroundPolygonCache":this._fileType=p$T.ClampGroundPolygon;break;case"ClampObjectPolygonCache":this._fileType=p$T.ClampObjectPolygon;break;case"ExtendClampPolygonCache":this._fileType=p$T.ExtendClampPolygonCache;break;case"IconPointCache":this._fileType=p$T.IconPoint;break;case"TextCache":this._fileType=p$T.Text;break;case"PointCloudFile":this._fileType=p$T.PointCloudFile;break;case"OSGBCacheFile":this._fileType=p$T.OSGBCacheFile;break;case"ExtendRegionCache":this._fileType=p$T.ExtendRegion3D;break;case"RegionEffect":this._fileType=p$T.RegionEffect;break;case"PolylineEffect":this._fileType=p$T.PolylineEffect;break;case"ClampGroundAndObjectLineCache":this._fileType=p$T.ClampGroundAndObjectLineCache;break;case"ClampGroundRealtimeRasterCache":this._fileType=p$T.ClampGroundRealtimeRasterCache}this._supportCompressType=e.supportCompressType,this.lon=n.lon,this.lat=n.lat,this.height=n.height,this.positionUnits=n.units,this._layerBounds=e.layerBounds;var a=.5*(this._layerBounds.north+this._layerBounds.south);this._layerRange=a$18.sphericalDistance(e$2d.toDegrees(this._layerBounds.east),e$2d.toDegrees(a),e$2d.toDegrees(this._layerBounds.west),e$2d.toDegrees(a)),this._style3D=u$Z(e.style3D,new e$1v),this._style3D._owner=this,this._lodRangeScale=u$Z(e.lodRangeScale,1),this._adjustedLodRangeScale=this._lodRangeScale,this._maximumScreenSpaceError=5,this._selectColorType=Zr$3.MIX,this._mixColorType=_0x2b839f.MIX,this._brightness=u$Z(e.brightness,1),this._contrast=u$Z(e.constrast,1),this._hue=u$Z(e.hue,0),this._saturation=u$Z(e.saturation,1),this._gamma=u$Z(e.gamma,1),this._visibleDistanceMax=u$Z(e.maxVisibleDistance,Number.MAX_VALUE),this._visibleDistanceMin=u$Z(e.minVisibleDistance,0),this._minVisibleAltitude=u$Z(e.minVisibleAltitude,0),this._maxVisibleAltitude=u$Z(e.maxVisibleAltitude,Number.MAX_VALUE),this._hasLight=!(this._fileType===p$T.OSGBFile||this._fileType===p$T.PointCloudFile),this._selectEnabled=u$Z(e.selectEnable,!0),this._enableHighlight=u$Z(e.enableHighlight,!0),this._heading=u$Z(e.heading,0),this._cullEnabled=u$Z(e.cullEnabled,!1);let s=e.cullMode;switch(s){case"CW":s=W$13.CLOCKWISE;break;case"CCW":s=W$13.COUNTER_CLOCKWISE;break;default:s=W$13.NONE}this._cullMode=u$Z(s,W$13.NONE),this._shadowType=u$Z(e.shadowType,_0x325616.NONE),this._visibleViewport=4095,this._visible=u$Z(e.isVisible,!0),this._sceneMode=u$Z(e.sceneMode,C$14.SCENE3D),this._selections=[],this._multiChoose=!1,this._selectedColor=new e$1X(.7,.7,1,1),this._selectedLineColor=new e$1X(1,1,1),this._skeletonSelectedColor=new e$1X(1,0,0,1),this._selectedTranslate=new o$1p(0,0,0),this._objsColorList={},this._objsOffsetList={},this._objsVisibleList=new e$1Q,this._objsHideList=new e$1Q,this._objsVisibleMap={},this._objsOperationList={},this._operationType=_0x27a6bb.RESET,this._fileType===p$T.ExtendRegion3D&&(this._objsHeightList=new e$1Q),e$2e(e.effect)?this._effect=e.effect:this._fileType===p$T.RegionEffect?this._effect=new _0x2adae6:this._fileType===p$T.PolylineEffect&&(this._effect=new _0x5175d0),this._bloomEffect=new _0x37a6f4(this),this.waterEffectSet=e.waterEffectSet,this._noiseMapUrl=n$17("Assets/Textures/noise.png"),this._noiseMapTexture=void 0,this._flattenTextureWidth=1024,this._flattening=!1,this._flattenBounds=new e$2c,this._flattenTexture=void 0,this._flattenRegions=new e$1Q,this._flattenUpdate=!1,this._flattenVisibleViewport=255,this._hasExcavation=!1,this._hasServerExcavation=!1,this._excavationBounds=new e$2c,this._excavationTexture=void 0,this._excavationRegions=new e$1Q,this._excavationUpdate=!1,this._excavationMode=_0x454473.CLIP_INSIDE,this._serverExcavationMode=_0x454473.CLIP_OUTSIDE,this._serverExcavationBounds=new e$2c,this._serverExcavationRegions=new e$1Q,this._hasOverlay=!1,this._overlayBounds=new e$2c,this._overlayRegions=new e$1Q,this._overlayTextures=new e$1Q,this._overlayTexture=void 0,this.__overlayUpdate=!1,this._hypsometricSetting=void 0,this._hypsometricTexture=void 0,this._hypsometricRenderTexture=void 0,this._hypsometricRegion=void 0,this._hypsometricBound=new e$2c,this._bUseHypColorTable=!1,this._bUseHypRegion=!1,this._hypsometricRegionUpdate=!1,this._hypAnalysisMode=k$S.AnalysisRegionMode.ARM_NONE,this._hypMaxInstensity=e.maxInstensity,this._hypMinInstensity=e.minInstensity,this._hypMaxHeight=e.maxHeight,this._hypMinHeight=e.minHeight,this._hypMaxCategory=e.maxCategory,this._hypMinCategory=e.minCategory,this._hypUseColorByHeight=!0,this._MultiTemporalUseWater=!1,this._categorieTexture=void 0,this._categoryHideList=new e$1Q,this._fHorizontalLine=e.horizontalLine,this._oriClipPlane=[],this._renderClipPlaneArray=new e$1Q,this._clipPlane=[];for(r=0;r<6;r++)this._clipPlane[r]=new e$2c(0,0,0,0),this._oriClipPlane[r]=new e$2c(0,0,0,0);this._clipMode=_0x577081.CLIP_NOTHING,this._clipLineColor=new e$2c(1,0,0,0),this._clipping=!1,this._section=!1,this._clipPlaneMode=_0x1f23e7.NONE,this._clipPlaneColor=new e$2c(1,0,0,1),this._matModel=new p$1d,this._oriMatModel=new p$1d,this._bReleaseColor=u$Z(e.bReleaseColor,!1),this._ignoreNormal=u$Z(e.ignoreNormal,!1),this._fileType===p$T.OSGBFile&&(this._ignoreNormal=!0),this._textureLod=u$Z(e.textureLod,!0);var l=u$Z(e.processType,"Normal");if(this._nProcessType="Normal"===l?_0x1733b9.Normal:_0x1733b9.Add,this._nLoadingMode=_0x1c85b1.All_Loading,this._clockStart=0,this._polygonOffsetConfig=e.polygonOffset,this._wireFrameType=_0x1d226a.Quad,this._bVolume=!1,e$2e(e.volumeObj)&&(this._bVolume=e.volumeObj.bVolume,this._strVolumeExts=e.volumeObj.strVolumeExts,this._volNames=e.volumeObj.volNames,this._maxVolumeValues=e.volumeObj.maxValues,this._minVolumeValues=e.volumeObj.minValues,this._volName=this._volNames[0],this._fMaxValue=this._maxVolumeValues[0],this._fMinValue=this._minVolumeValues[0],this._strVolumeExt=this._strVolumeExts[0]),this._maps=e.maps,this._volData=void 0,this._splitDirection=u$Z(e.splitDirection,_0x2d4a08.NONE),this._splitPosition=u$Z(e.splitPosition,.5*this._context.drawingBufferWidth),this._pickPosition=new e$2c,this._selectionFiltrateByTransparency=.01,this._receiveObjectClamp=!0,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0,this._edgeDistanceFalloffFactor=0,this._enableDepthTest=!0,this.initialize(),e$2e(window.Proxy)){var u=this,c={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1,clear:function(){u._layerScheduler._clearIndexedDBCache()}};this._indexedDBSetting=new Proxy(c,{get:function(e,t){return e[t]},set:function(e,t,i){return"isAttributesSave"===t&&!1===e.isAttributesSave&&!0===i&&!e$2e(u._queryFieldNames)&&(e$2e(u._layerScheduler._indexedDBScheduler)?u._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()}),(function(){0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()})):u._layerScheduler._dpPromise.then((function(){u._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()}),(function(){0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()}))}))),e[t]=i,!0}}),this._isJsonScp=e._isJson||!1}this._queryFieldNames=e.queryFieldNames,this._fieldsInfo=e.fieldsInfo,this._indexInfoMap=e.indexInfoMap,this._indexInfoAttributeMap=e.indexInfoAttributeMap,this._attributeExtentName=u$Z(e.attributeExtentName,""),this._layerScheduler=new _0x408010({context:this._context,layer:this,rootEntities:e.rootEntities,cacheEntityCount:e.cacheEntityCount,cacheKey:u$Z(e.cacheKey,""),customRequestHeaders:e.customRequestHeaders,scpUrl:e.scpUrl}),this._clearMemoryImmediately=!1,this._totalMemoryUsageInBytes=0,this._maximumMemoryUsage=512,this._PBRMaterialType=Xe$e.NONE,this._pbrMetalTexture=void 0,this._pbrRoughTexture=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:o$1p.ZERO,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}},this._usePBR=!1,this._localCacheMemoryReserveCount=500,this._fileType===p$T.Text&&(this._id2RectangleList=new e$1Q),this._textureUVSpeed=new o$1o(0,0),this._pointCloudEyeDomeLighting=new _0x153701(this._context),this._pointCloudShading=new o$Z({attenuation:!0,geometricErrorScale:1,maximumAttenuation:8,eyeDomeLighting:!0}),this._pointCloudClassificationInfos=void 0,this._styleEngine=new e$1u,this._manualShadowVolumeBottomHeight=_0x3feb92,this._manualShadowVolumeTopHeight=_0x11b5bb,this._shadowVolumeBottomHeight=_0x3feb92,this._shadowVolumeTopHeight=_0x11b5bb,"InstanceModel"===this._dataType&&(this.instanceSkeletonManager=new _0x13fd1b),this._level=e.level,this._refreshVolume=!1,this._useMercatorProject=u$Z(e.useMercatorProject,!1),this._groupNameBounds=e.groupNameBounds,this._skeletonSelectEnable=!1,this._lastSelectSkeletonId=-1,this._minTransparentAlpha=.1,this._maxTransparentAlpha=.98,this._selectRect=void 0,this._selectUpdate=!1,this._matSelectViewProj=new p$1d,this._useOIT=!0,this._partlyTransparent=!1,this._showLabel=!1,this._s3MTilesLabelStyle=new _0x3c2cd7,this._labelCollection=new g$W({scene:e.scene,isS3MTileLabels:!0,selectedColor:this._selectedColor}),this._scene=e.scene,this._transparentBackColor=u$Z(e.transparentBackColor,_0x1a71e8.DEFAULT_TRANSPARENT_BACK_COLOR),this._transparentBackColorTolerance=u$Z(e.transparentBackColorTolerance,_0x1a71e8.DEFAULT_TRANSPARENT_BACK_COLOR_TOLERANCE),this._shadowDarkness=.5,this._spatialQueryEnable=!1,this._spatialClipEnable=!1,this._sqTextures=[],this._sqViewMatirx=new p$1d,this._sqPrjMatirx=new p$1d,this._sqMode=j$Z.Disjoint,this._swipeRegion=new e$2c(0,0,1,1),this._swipeEnabled=!1,this._allObjsHide=!1,this._residentRootTile=!1,this._idFieldName=u$Z(e.idFieldName,"SmID"),this._imageryLayer=void 0,this._needCoverImageryLayer=!1,this._iconCollection=new w$O({scene:e.scene,style3D:this._style3D}),this._showIcon=u$Z(e.showIcon,!1),this._boundingSphereOffset=o$1p.ZERO,this._loadVolumeData=u$Z(e.loadVolumeData,!0),this._hasWireframe=!1,this._edgeStrokesTexture=void 0;var h=u$Z(e.subdomainConfig,{});this._subdomains=h.subdomains,this._subdomainsUrlScheme=h.urlScheme,this._isOverlapDisplayed=!1,this._iconRelatedTextLayerID=void 0,this._priorityScale=u$Z(e.priorityScale,1),this._blockCache=_0x24cbe4.getSingleInstance(),this._clippingType=R$L.KeepOutside,this._spatialQuery=void 0,this._pickObjs={},this._hasMixedContent=!1,this._backfaceCommands=[],this._excavateRegionCommands=new e$1Q,this._rasterPerFrame=!1,this._animationInfo={startTime:void 0,array:[],defers:void 0,duration:void 0,defaultInterpolation:void 0,done:!0},this._textureEmissionUnit=_0x3a711b.None,this._pbrParameter=Xe$e.NONE,this._maxSkipNum=256,this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,pixel:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,pixel:Number.MAX_VALUE},this._computeHeight=!1,this._polygonsTranslate={},this._maxSkipLevel=22,this._mipmapEnabled=!0,this._enableFusion=!1,this._floodFlagTexture=void 0,this._floodRect=void 0,this._matFloodInvertMatrix=p$1d.IDENTITY,this._heightScale=1,this._useRasterCull=!1,this._temporalCount=e$2e(e.temporalCount)?e.temporalCount:0,this._temporalSetting=void 0,this._translucencyByDistance=!1,this._overlapWeightAttributeName=void 0,this._heightRangeAttributeName=void 0,this.hasAttributeIndex=e.hasAttributeIndex,this._historicalRecord=e.historicalRecord,this._layerUBO=new _0x12db87(this),e$2e(this.waterEffectSet)&&(this._waterLayerUbo=new _0x44ae93(this)),this._fileType===p$T.PolylineEffect&&(this._polylineEffectUbo=new _0x8dd7b2(this)),this._fileType===p$T.RegionEffect&&(this._regionEffectUbo=new S3MRegionEffectUBO(this)),this._envMapIntensity=1,this._hasEmissiveTexAtlas=!1,this._hasSnowEffect=!1,this._hasRainEffect=!1};function _0x41fca9(e,t,i,n){for(var r={times:[],points:[],interpolations:[]},o=0,a=i.length;o<a;o++){var s=i[o],l=+s.slice(0,-1)/100*e.duration,u=n[s],c=u$Z(u.interpolationType,e.defaultInterpolation);(h=u[t])&&(r.times.push(l),r.points.push(h),r.interpolations.push(c))}var h=_0x309d2d(r=_0x1d520d(r),e,t);return e.array.push(h),r}function _0x1d520d(e){var t=e.interpolations,i=e.times,n=e.points;e=[];for(var r=0,o=t.length-1;r<o;r++)e.push({times:[i[r],i[r+1]],points:[n[r],n[r+1]],interpolationType:t[r]});return e}function _0x309d2d(e,t,i){for(var n=[],r=0,o=e.length;r<o;r++){var a=e[r];n.push(_0x1b1fa6(i,a.interpolationType,a.times,a.points))}return{type:i,splines:n}}function _0x1b1fa6(e,t,i,n){var r;if("rotation"===e)return n.forEach((function(e,t){n[t]=n$15.fromHeadingPitchRoll(e)})),new r$P({times:i,points:n});switch(t){case _0x301856.Linear:r=new r$Q({times:i,points:n});break;case _0x301856.Acceleration:r=new n$G({times:i,points:n,mode:0});break;case _0x301856.Deceleration:r=new n$G({times:i,points:n,mode:1});break;case _0x301856.CubicSpline:r=new c$L({times:i,points:n});break;case _0x301856.SmoothStep:r=new r$O({times:i,points:n});break;default:r=new r$Q({times:i,points:n})}return r}function _0x4724c3(e,t){!t||!e$2e(h$18.intersection(e.layerBounds,t.rectangle))||(t._rasterized=!1,_0x4724c3(e,t._southwestChild),_0x4724c3(e,t._southeastChild),_0x4724c3(e,t._northwestChild),_0x4724c3(e,t._northeastChild))}function _0x4f1f81(e){var t=0;e$2e(e.style3D)&&(t=e.style3D.bottomAltitude);var i=e.height+t;if(e._sceneMode===C$14.SCENE3D)if(e._fileType===p$T.ClampGroundRealtimeRasterCache)e._position=new o$1p(e.lon,e.lat,i),p$1d.fromTranslation(e._position,e._matModel);else{var n=o$1p.fromDegrees(e.lon,e.lat,i),r=o$1p.fromDegrees(e.lon,e.lat,e.height);e._position=n;var o=new i$16(e._heading,0,0);m$19.headingPitchRollToFixedFrame(n,o,t$12.WGS84,m$19.eastNorthUpToFixedFrame,e._matModel),m$19.headingPitchRollToFixedFrame(r,o,t$12.WGS84,m$19.eastNorthUpToFixedFrame,e._oriMatModel)}else if(e._fileType!==p$T.ClampGroundRealtimeRasterCache){if(e.lon>180||e.lon<-180||e.lat>180||e.lat<-180||e.positionUnits===_0x277a12.METER)if(e.useMercatorProject){var a=(u=new t$N).unproject(new o$1p(e.lon,e.lat,0));e._position=e._scene.camera._projection.project(a)}else{var s=e.lon,l=e.lat;s>20037508.342789244&&(o$1p.globalOffset.x=20037508.342789244*Math.floor(s/20037508.342789244),s-=o$1p.globalOffset.x),l>10018754.171394622&&(o$1p.globalOffset.y=20037508.342789244*Math.floor((l+10018754.171394622)/20037508.342789244),l-=o$1p.globalOffset.y),e._position=new o$1p(s,l,i)}else{var u=new n$1d;n=o$1p.fromDegrees(e.lon,e.lat,i),a=u.ellipsoid.cartesianToCartographic(n);e._position=u.project(a)}p$1d.fromTranslation(e._position,e._matModel),p$1d.multiply(_0x120895,e._matModel,e._matModel)}else e._position=new o$1p(e.lon,e.lat,i),p$1d.fromTranslation(e._position,e._matModel);e._style3D._dirty&&e$2e(e._layerScheduler)&&(e._layerScheduler._updateRootBoundingSphere(e._layerScheduler._oriRootEntities,e._matModel),e._style3D._dirty=!1),e$2e(e._layerScheduler)&&e._layerScheduler.traverseRenderEntity({},(function(t){!t._colorCommand||(t._colorCommand.modelMatrix=p$1d.multiply(e._matModel,t._geoMatrix,t._colorCommand.modelMatrix))}))}function _0x29597e(e,t){var i=e._hypsometricSetting;if(e$2e(i)){if(i._emissionTextureChanged){e$2e(i._emissionTextureAtlas)&&!i._emissionTextureAtlas.isDestroyed()&&i._emissionTextureAtlas.destroy(),i._emissionTextureAtlas=new v$I({context:t});var n={};n.layer=e,n.textureCount=1,e$2e(i._emissionTextureArray)&&i._emissionTextureArray.length>0?i._emissionTextureArray.map((function(t){i._emissionTextureAtlas.addImage(t.url,t.url).then((function(r){t.textureAtlasID=r,i._loadedEmissionTexture++,i._loadedEmissionTexture==i._emissionTextureArray.length&&(e._hasEmissiveTexAtlas=!0,n.enable=!0,n.textureCount=i._loadedEmissionTexture,e.traverseRenderEntity(n,_0x1030ef))}))})):(n.enable=!1,n.textureCount=0,e.traverseRenderEntity(n,_0x1030ef)),i._emissionTextureChanged=!1}}else e._hasEmissiveTexAtlas=!1}function _0x4d109b(e,t){e._manualShadowVolumeBottomHeight===_0x3feb92&&e._manualShadowVolumeTopHeight===_0x11b5bb?0===t.minTerrainHeight&&0===t.maxTerrainHeight?(e._shadowVolumeBottomHeight=_0x3feb92,e._shadowVolumeTopHeight=_0x11b5bb):(e._shadowVolumeBottomHeight=t.minTerrainHeight-10,e._shadowVolumeTopHeight=t.maxTerrainHeight+10):(e._shadowVolumeBottomHeight=e._manualShadowVolumeBottomHeight,e._shadowVolumeTopHeight=e._manualShadowVolumeTopHeight)}function _0xade8aa(e,t,i,n,r){var o=t$10.createIfNeeded(t).fetchImage().then((function(t){var o=new t$U({context:e,source:t,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.LINEAR_MIPMAP_LINEAR,magnificationFilter:tt$i.LINEAR}),generateMipmap:!0});!e$2d.isPowerOfTwo(o.width)||!e$2d.isPowerOfTwo(o.height)||o.generateMipmap(I$1e.NICEST),n[r]=o,i.readyTextureCount++})).otherwise((function(){i.pendingTextureCount--}));n[r]=o}function _0x137ce1(e){if(!e._animationInfo.done){var t=(Date.now()-e._animationInfo.startTime)/1e3;t>=e._animationInfo.duration&&(e._animationInfo.defer.resolve(),e._animationInfo.done=!0,t=e._animationInfo.duration);for(var i=0,n=e._animationInfo.array.length;i<n;i++){var r=e._animationInfo.array[i];_0x5f3498(e,r,t),_0x43306d(e,r,t),_0x43e23f(e,r,t)}e.traverseRenderEntity({},(function(e,t){e._modelMatrixDirty=!0})),_0x4b07f6(e)}}_0x1a71e8.DEFAULT_TRANSPARENT_BACK_COLOR=e$1X.BLACK,_0x1a71e8.DEFAULT_TRANSPARENT_BACK_COLOR_TOLERANCE=0,Object.defineProperties(_0x1a71e8.prototype,{overlapWeightAttributeName:{get:function(){return this._overlapWeightAttributeName},set:function(e){this._overlapWeightAttributeName=e}},heightRangeAttributeName:{get:function(){return this._heightRangeAttributeName},set:function(e){this._heightRangeAttributeName=e}},urlType:{get:function(){return this._urlType},set:function(e){this._urlType=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){o$1q.typeOf.number("min visible altitude",e),this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){o$1q.typeOf.number("max visible altitude",e),this._maxVisibleAltitude=e}},heading:{get:function(){return this._heading},set:function(e){o$1q.typeOf.number("heading",e),this._heading=e,this.initialize()}},lodRangeScale:{get:function(){return this._lodRangeScale},set:function(e){this._lodRangeScale=e}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){this._maximumScreenSpaceError=e}},priorityScale:{get:function(){return this._priorityScale},set:function(e){this._priorityScale=e}},customRequestHeaders:{get:function(){return this._layerScheduler._customRequestHeaders},set:function(e){this._layerScheduler._customRequestHeaders=e}},style3D:{get:function(){return this._style3D},set:function(e){e&&(this._style3D=e,this._style3D._owner=this,this._iconCollection.style3D=this._style3D)}},themeStyle:{get:function(){return this._styleEngine.style},set:function(e){var t=this;if(e$2e(this._queryFieldNames)||0!==t._layerScheduler._attributes._memoryCache){if(e$2e(t.themeStyle)&&e$2e(t.themeStyle.pbrMaterialIndex)){var i={enable:!0};i.layer=t,t.traverseRenderEntity(i,_0x5b4d78)}t._styleEngine.style=e}else t._layerScheduler._downloadAttributes().then((function(){if(t._styleEngine.style=e,e$2e(t.themeStyle)&&e$2e(t.themeStyle.pbrMaterialIndex)){var i={enable:!0};i.layer=t,t.traverseRenderEntity(i,_0x5b4d78)}}));this.traverseRenderEntity({},(function(e){e._themeDirty=!0}))}},wireFrameMode:{get:function(){return this._wireFrameType},set:function(e){if(e!==this._wireFrameType){if(e===_0x1d226a.Quad&&(e=_0x1d226a.EffectOutline),e===_0x1d226a.Sketch||this._wireFrameType===_0x1d226a.Sketch){var t={};t.edgeMode=e===_0x1d226a.Sketch?1:0,t.layer=this,this.traverseRenderEntity(t,_0x5ea874)}this._wireFrameType=e}}},visible:{get:function(){return this._visible},set:function(e){this._fileType===p$T.ClampGroundRealtimeRasterCache&&this._visible!=e&&this._layerScheduler.refreshRaster(this._frameState),this._visible=e}},dataMaxValue:{get:function(){return e$2e(this._hypMaxCategory)?this._hypMaxCategory:this._hypMaxHeight}},dataMinValue:{get:function(){return e$2e(this._hypMinCategory)?this._hypMinCategory:this._hypMinHeight}},ColorDictTableMode:{set:function(e){this._hypUseColorByHeight=e}},hypsometricSetting:{get:function(){return LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_hypsometricSetting"),{hypsometricSetting:this._hypsometricSetting,analysisMode:this._hypAnalysisMode}},set:function(e){LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_hypsometricSetting"),this._bUseHypColorTable=!1,this._hypsometricRegionUpdate=!0,e$2e(this._hypsometricRegion)&&(this._hypsometricRegion.destroy(),this._hypsometricRegion=null),e$2e(this._hypsometricRenderTexture)||(this._hypsometricRenderTexture=new t$U({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$12.RGBA})),e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:this._context,width:1024,height:64,pixelFormat:V$12.RGBA,flipY:!1}));var t={};if(t.layer=this,!e$2e(e)||!e$2e(e.hypsometricSetting))return e$2e(this._hypsometricSetting)&&(this._hypsometricSetting.destroy(),this._hypsometricSetting=void 0),void this.traverseRenderEntity(t,_0xbff5a0);if(this._hypAnalysisMode=e.analysisMode||this._hypAnalysisMode,this._hypsometricSetting=u$L.clone(e.hypsometricSetting,this._hypsometricSetting),this._hypsometricSetting._emissionTextureChanged=!0,e$2e(this._hypsometricSetting.ColorTable)&&(this._hypsometricSetting.ColorTable.generateBuffer(),e$2e(this._hypsometricTexture)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer})),this._hypAnalysisMode!==k$S.AnalysisRegionMode.ARM_NONE?(this._bUseHypColorTable=!0,this.traverseRenderEntity(t,_0xc784ce)):this.traverseRenderEntity(t,_0xbff5a0),this._hypsometricSetting.UpdatePolygonRegion&&this._hypAnalysisMode===k$S.AnalysisRegionMode.ARM_REGION&&this._hypsometricSetting.CoverageArea.length>0){var i=this._hypsometricSetting.CoverageArea,n=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),r=U$18.createGeometry(n),o=new p$1d;p$1d.inverse(this._matModel,o),f$Z.updateGeometry(r,i,o,this._frameState.mode===C$14.COLUMBUS_VIEW);var a=f$Z.updateGeoBounds(r),s=.01*(a.z-a.x);a.w,a.y,this._hypsometricRegion=new f$Z,this._hypsometricRegion._geometry=r,this._hypsometricRegion._bounds.x=a.x-s,this._hypsometricRegion._bounds.y=a.y-s,this._hypsometricRegion._bounds.z=a.z+s,this._hypsometricRegion._bounds.w=a.w+s,e$2c.clone(this._hypsometricRegion._bounds,this._hypsometricBound)}this._bVolume||this._colorTableChanged.raiseEvent()}},multiTemporalUseWater:{get:function(){return this._MultiTemporalUseWater},set:function(e){this._MultiTemporalUseWater=e,e$2e(this._waterLayerUbo)||(this._waterLayerUbo=new _0x44ae93(this)),this._waterParameter=new h$J}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e}},LoadingMode:{get:function(){return this._nLoadingMode},set:function(e){this._nLoadingMode=e}},LoadingPriority:{get:function(){return e$2e(this._layerScheduler)?this._layerScheduler.LoadingPriority:_0x539352.Child_Priority},set:function(e){e$2e(this._layerScheduler)&&(this._layerScheduler.LoadingPriority=e)}},bReleaseColor:{get:function(){return this._bReleaseColor},set:function(e){this._bReleaseColor=e}},ignoreNormal:{get:function(){return this._ignoreNormal},set:function(e){this._ignoreNormal!==e&&(this._ignoreNormal=e,this.refresh())}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}},visibleDistanceMin:{get:function(){return this._visibleDistanceMin},set:function(e){this._visibleDistanceMin=e}},clipLineColor:{get:function(){return new e$1X(this._clipLineColor.x,this._clipLineColor.y,this._clipLineColor.z,this._clipLineColor.w)},set:function(e){e instanceof e$1X&&(this._clipLineColor=new e$2c(e.red,e.green,e.blue,e.alpha))}},clipPlaneColor:{get:function(){return new e$1X(this._clipPlaneColor.x,this._clipPlaneColor.y,this._clipPlaneColor.z,this._clipPlaneColor.w)},set:function(e){e instanceof e$1X&&(this._clipPlaneColor=new e$2c(e.red,e.green,e.blue,e.alpha))}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this.updateShadow())}},horizontalline:{get:function(){return this._fHorizontalLine},set:function(e){this._fHorizontalLine=e}},horizontalColor:{get:function(){return new e$1X(this._HorizontalColor.x,this._HorizontalColor.y,this._HorizontalColor.z,this._HorizontalColor.w)},set:function(e){e instanceof e$1X&&(this._HorizontalColor=new e$2c(e.red,e.green,e.blue,e.alpha))}},hasLight:{get:function(){return this._hasLight},set:function(e){if(e$2e(e)){this._hasLight=e;var t={};t.layer=this,t.enable=e,this.traverseRenderEntity(t,_0x50a49b)}}},cullEnabled:{get:function(){return this._cullEnabled},set:function(e){this.cullMode=e?W$13.COUNTER_CLOCKWISE:W$13.NONE}},cullMode:{get:function(){return this._cullMode},set:function(e){this._cullMode=e;var t=d$1m.getState(this._rsColor);t.cull.enabled=e!==W$13.NONE,t.frontFace=e!==W$13.NONE?e:W$13.COUNTER_CLOCKWISE,this._rsColor=d$1m.fromCache(t)}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){this._enableDepthTest=e;var t=d$1m.getState(this._rsColor);t.depthTest.enabled=e,this._rsColor=d$1m.fromCache(t)}},selectColorType:{get:function(){return this._selectColorType},set:function(e){if(this._selectColorType!==e){this._selectColorType=e,this.isSilhouette()?this._context.numNormalAndDepthObject++:(this._context.numNormalAndDepthObject--,this._context.numNormalAndDepthObject=Math.max(this._context.numNormalAndDepthObject,0));var t={};t.layer=this,t.selectColorType=e,this.traverseRenderEntity(t,_0x1cc863)}}},mixColorType:{get:function(){return this._mixColorType},set:function(e){if(this._mixColorType!==e){this._mixColorType=e;var t={layer:this,mixColorType:e};this.traverseRenderEntity(t,_0x72a589)}}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},groupName:{get:function(){return this._groupName}},selectEnabled:{get:function(){return this._selectEnabled},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._selectEnabled=e}},enableHighlight:{get:function(){return this._enableHighlight},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._enableHighlight=e}},skeletonSelectEnable:{get:function(){return this._skeletonSelectEnable},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._skeletonSelectEnable=e,this.refresh()}},selectedColor:{get:function(){return this._selectedColor},set:function(e){o$1q.defined("selectedColor value",e),this._selectedColor=e$1X.clone(e),this._labelCollection.selectedColor=e$1X.clone(e)}},selectedLineColor:{get:function(){return this._selectedLineColor},set:function(e){o$1q.defined("selectedColor value",e),this._selectedLineColor=e$1X.clone(e)}},skeletonSelectedColor:{get:function(){return this._skeletonSelectedColor},set:function(e){o$1q.defined("skeletonSelectedColor value",e),this._skeletonSelectedColor=e$1X.clone(e)}},selectedSkeletonId:{get:function(){return this._lastSelectSkeletonId},set:function(e){o$1q.defined("selectSkeletonId value",e),this._lastSelectSkeletonId=e}},multiChoose:{get:function(){return this._multiChoose},set:function(e){o$1q.defined("multiChoose",e),o$1q.typeOf.bool("multiChoose",e),this._multiChoose=e}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x54ab03)}},contrast:{get:function(){return this._contrast},set:function(e){this._contrast=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x54ab03)}},hue:{get:function(){return this._hue},set:function(e){this._hue=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x54ab03)}},saturation:{get:function(){return this._saturation},set:function(e){this._saturation=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x54ab03)}},gamma:{get:function(){return this._gamma},set:function(e){this._gamma=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x54ab03)}},transparentBackColor:{get:function(){return this._transparentBackColor},set:function(e){if(this._transparentBackColor!==e){this._transparentBackColor=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x3020ee)}}},transparentBackColorTolerance:{get:function(){return this._transparentBackColorTolerance},set:function(e){if(this._transparentBackColorTolerance!==e){this._transparentBackColorTolerance=e;var t={};t.layer=this,0===this._transparentBackColorTolerance?this.traverseRenderEntity(t,_0x599bbd):this.traverseRenderEntity(t,_0x3020ee)}}},volName:{get:function(){return this._volName},set:function(e){for(var t=0;t<this._volNames.length;t++)this._volNames[t]==e&&(this._volName=e,this._fMaxValue=this._maxVolumeValues[t],this._fMinValue=this._minVolumeValues[t],this._strVolumeExt=this._strVolumeExts[t],this.refreshVolume())}},coverImageryLayer:{get:function(){return this._imageryLayer},set:function(e){if(e$2e(e))if(e$2e(this._imageryLayer)){!(this._imageryLayer instanceof Array)&&!this._imageryLayer.show&&this._layerScheduler._hideImage(),this._imageryLayer=e;var t=this;if(this._imageryLayer instanceof Array){for(var i=[],n=0;n<this._imageryLayer.length;n++)i.push(this._imageryLayer[n]._imageryProvider._readyPromise);t._layerScheduler._stopLoadImagery=!0,Promise.all(i).then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1}))}else t._layerScheduler._stopLoadImagery=!0,this._imageryLayer._imageryProvider._readyPromise.then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1}))}else{if(!this._needCoverImageryLayer)return this.refresh(),this._imageryLayer=e,void(this._needCoverImageryLayer=!0);var r=!1;e$2e(this._imageryLayer)||(r=!0),this._imageryLayer=e;t=this;if(this._imageryLayer instanceof Array){for(i=[],n=0;n<this._imageryLayer.length;n++)i.push(this._imageryLayer[n]._imageryProvider._readyPromise);t._layerScheduler._stopLoadImagery=!0,Promise.all(i).then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1,r&&t._updateCoverImageryLayer(!1)}))}else t._layerScheduler._stopLoadImagery=!0,this._imageryLayer._imageryProvider._readyPromise.then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1,r&&t._updateCoverImageryLayer(!1)}));this._needCoverImageryLayer=!0}else e$2e(this._imageryLayer)&&(this._updateCoverImageryLayer(!0),this._imageryLayer=void 0,this._needCoverImageryLayer=!1)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){if(o$1q.typeOf.number("splitDirection",e),this._splitDirection!==e){this._splitDirection=e;var t={layer:this,enableSplit:e!==_0x2d4a08.NONE};this.traverseRenderEntity(t,_0x26857d)}}},splitPosition:{get:function(){return this._splitPosition},set:function(e){o$1q.typeOf.number("splitPosition",e),this._splitPosition=e}},selectionFiltrateByTransparency:{get:function(){return this._selectionFiltrateByTransparency},set:function(e){o$1q.typeOf.number("selectionFiltrateByTransparency value",e),this._selectionFiltrateByTransparency=e}},effect:{get:function(){return this._effect},set:function(e){this._effect=e}},bloomEffect:{get:function(){return e$2e(this._bloomEffect)||(this._bloomEffect=new _0x37a6f4),this._bloomEffect}},bloomEnable:{get:function(){return!!e$2e(this._bloomEffect)&&this._bloomEffect.enable}},selectedTranslate:{get:function(){return this._selectedTranslate},set:function(e){o$1q.typeOf.object("selected translate",e),!o$1p.equals(e,this._selectedTranslate)&&(this._selectedTranslate=e)}},clearMemoryImmediately:{get:function(){return this._clearMemoryImmediately},set:function(e){this._clearMemoryImmediately=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMemoryUsage=e}},PBRMaterialType:{get:function(){return this._PBRMaterialType},set:function(e){if(this._PBRMaterialType!==e){this._PBRMaterialType=e;var t=_0x3b1e53.getMaterial(e),i=this;e$2e(this._pbrMetalTexture)&&(this._pbrMetalTexture.destroy(),this._pbrMetalTexture=null),e$2e(this._pbrRoughTexture)&&(this._pbrRoughTexture.destroy(),this._pbrRoughTexture=null),o$1l(t$S(t.metalTextureUrl),(function(e){i._pbrMetalTexture=new t$U({context:i._frameState.context,source:e,pixelFormat:V$12.LUMINANCE,pixelDatatype:_$_.UNSIGNED_BYTE})})),o$1l(t$S(t.roughTextureUrl),(function(e){i._pbrRoughTexture=new t$U({context:i._frameState.context,source:e,pixelFormat:V$12.LUMINANCE,pixelDatatype:_$_.UNSIGNED_BYTE})}));var n={};n.layer=this,n.PBRType=e,this.traverseRenderEntity(n,_0x4fa236)}}},PBRMetallic:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.metallicFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.metallicFactor=e}},PBRRoughness:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor=e}},emissiveFactor:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor=e}},rainEffect:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.rainEffect},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.rainEffect=e}},textureUVSpeed:{get:function(){return this._textureUVSpeed},set:function(e){o$1q.typeOf.object("textureUVSpeed value",e),o$1o.clone(e,this._textureUVSpeed);var t={};t.layer=this,t.enable=0!==this._textureUVSpeed.x||0!==this._textureUVSpeed.y,this.traverseRenderEntity(t,_0x2c2177)}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){if(e$2e(window.Proxy)){var t=this;if(e$2e(e)&&"boolean"==typeof e.isGeoTilesSave&&"boolean"==typeof e.isAttributesSave&&"boolean"==typeof e.isGeoTilesRootNodeSave){(i={}).isGeoTilesSave=e.isGeoTilesSave,i.isAttributesSave=e.isAttributesSave,i.isGeoTilesRootNodeSave=e.isGeoTilesRootNodeSave,i.clear=function(){t._layerScheduler._clearIndexedDBCache()};var i={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1,clear:function(){t._layerScheduler._clearIndexedDBCache()}};this._indexedDBSetting=new Proxy(i,{get:function(e,t){return e[t]},set:function(e,i,n){"isAttributesSave"===i&&!1===e.isAttributesSave&&!0===n&&(e$2e(t._layerScheduler._indexedDBScheduler)?t._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}),(function(){0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()})):t._layerScheduler._dpPromise.then((function(){t._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}),(function(){0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}))}))),e[i]=n}}),this._layerScheduler._indexedDBSetting=this._indexedDBSetting}}else this._indexedDBSetting={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1},this._layerScheduler._indexedDBSetting=this._indexedDBSetting}},pointCloudShading:{get:function(){return this._pointCloudShading}},shadowVolumeTopHeight:{get:function(){return this._manualShadowVolumeTopHeight},set:function(e){this._manualShadowVolumeTopHeight=e}},shadowVolumeBottomHeight:{get:function(){return this._manualShadowVolumeBottomHeight},set:function(e){this._manualShadowVolumeBottomHeight=e}},triangleFiltratePixel:{get:function(){return this._triangleFiltratePixel},set:function(e){var t=parseFloat(e),i=this._triangleFiltratePixel>0,n=t>0;if(this._triangleFiltratePixel=t,this._vertexWeightMode===_0x132759.EdgeLengthMin&&i!=n){var r={};r.layer=this,r.enable=n,this.traverseRenderEntity(r,_0x2c542a)}}},useMercatorProject:{get:function(){return this._useMercatorProject},set:function(e){this._useMercatorProject=e,this.refresh()}},minTransparentAlpha:{get:function(){return this._minTransparentAlpha},set:function(e){this._minTransparentAlpha=e}},maxTransparentAlpha:{get:function(){return this._maxTransparentAlpha},set:function(e){this._maxTransparentAlpha=e}},selectBound:{get:function(){return this._selectRect},set:function(e){this._selectRect=e,this._selectUpdate=!0,this._selectEnabled=!0}},S3MTileLoadedEvent:{get:function(){return this._S3MTileLoadedEvent}},attributeDownloaded:{get:function(){return this._attributeDownloaded}},allTilesLoaded:{get:function(){return this._allTilesLoaded}},prepareLoadEvent:{get:function(){return this._prepareLoadEvent}},prepareLoadDataSize:{get:function(){return this._prepareLoadSize},set:function(e){o$1q.typeOf.number("value",e),e>0&&(this._prepareLoadSize=e,e$2e(this._prepareLoadEvent)||(this._prepareLoadEvent=new o$1h),this._layerScheduler._prepareLoaded=!1)}},colorTableChanged:{get:function(){return this._colorTableChanged}},receiveObjectClamp:{get:function(){return this._receiveObjectClamp},set:function(e){this._receiveObjectClamp=e;var t=d$1m.getState(this._rsColor);t.stencilTest=_0x45bcf8.createReceiveClampObjectStencilTest(e),this._rsColor=d$1m.fromCache(t)}},orderIndependentTranslucency:{get:function(){return this._useOIT},set:function(e){o$1q.typeOf.bool("value",e),this._useOIT=e}},partlyTransparent:{get:function(){return this._partlyTransparent},set:function(e){o$1q.typeOf.bool("value",e),this._partlyTransparent=e}},showLabel:{get:function(){return this._showLabel},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._showLabel=e,this._showLabel&&0===Object.keys(this._layerScheduler._attributes).length&&this._layerScheduler._requestAllScvd()}},labelStyle:{get:function(){return this._s3MTilesLabelStyle},set:function(e){o$1q.defined("value",e),(this._s3MTilesLabelStyle._textFieldChanged||e$2e(e._textField)&&this._s3MTilesLabelStyle._textField!==e._textField)&&this._labelCollection.removeAll(),this._s3MTilesLabelStyle=e,e$2e(this._labelCollection)&&this._labelCollection.setLabelStyle(this._s3MTilesLabelStyle)}},swipeRegion:{get:function(){return new f$1a(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2e(e)){if(!(e instanceof f$1a))throw new t$15("swipeRegion must be a instance of BoundingRectangle.");e$2c.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?this.splitDirection=_0x2d4a08.NONE:e$2c.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e,this.traverseRenderEntity({layer:this,enableSwipe:e},_0x543584))}},allObjsHide:{get:function(){return this._allObjsHide}},residentRootTile:{get:function(){return this._residentRootTile},set:function(e){o$1q.typeOf.bool("residentRootTile",e),this._residentRootTile=e}},idFieldName:{get:function(){return this._idFieldName}},loadVolumeData:{get:function(){return this._loadVolumeData},set:function(e){this._loadVolumeData=e}},showIcon:{get:function(){return this._showIcon},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._showIcon=e}},showCallout:{get:function(){return this._iconCollection.showCallout},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._iconCollection.showCallout=e}},waterParameter:{get:function(){return this._waterParameter&&this._waterParameter}},attributeFieldNames:{get:function(){return e$2e(this._fieldsInfo)?Object.keys(this._fieldsInfo._hash):void 0}},queryFieldNames:{get:function(){return this._queryFieldNames},set:function(e){if(e$2e(this._queryFieldNames)&&this._queryFieldNames.sort().toString()!==e.sort().toString())for(var t=e.filter((e=>!this._queryFieldNames.includes(e))),i=this._layerScheduler,n=0;n<i._rootEntities.length;n++){var r=i._rootEntities[n];r._attrAppend=t,r.attrLoadState=N$Q.UNLOAD}this._queryFieldNames=e}},hasWireframe:{get:function(){return this._hasWireframe}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2e(e)&&!e$2e(e.length))throw new t$15("Excepted S3MTilesLayer.subdomains to be type of Array.");this._subdomains=e}},iconRelatedTextLayerID:{get:function(){return this._iconRelatedTextLayerID},set:function(e){if(typeof e<"u"&&"number"!=typeof e)throw new t$15("Excepted S3MTilesLayer.iconRelatedTextLayerID to be type of number or undefined");this._iconRelatedTextLayerID=e}},isOverlapDisplayed:{get:function(){return this._isOverlapDisplayed},set:function(e){o$1q.typeOf.bool("isOverlapDisplayed",e),this._isOverlapDisplayed=e,this._isOverlapDisplayed?this.setOnlyObjsVisible([],!1,!0,!0):this.setOnlyObjsVisible([],!0,!1)}},clippingType:{get:function(){return this._clippingType},set:function(e){o$1q.defined("clipping type",e),this._clippingType=e,e$2e(this._spatialQuery)&&(this._spatialQuery.positionMode=_0x243acb(e))}},rasterPerFrame:{get:function(){return this._rasterPerFrame&&this._fileType===p$T.ClampGroundRealtimeRasterCache},set:function(e){o$1q.typeOf.bool("rasterPerFrame",e),this._rasterPerFrame=e}},RGBTOBGR:{get:function(){return this._RGBTOBGR},set:function(e){o$1q.typeOf.bool("RGBTOBGR",e),this._RGBTOBGR=e}},textureEmissionUnit:{get:function(){return this._textureEmissionUnit},set:function(e){this._textureEmissionUnit=e}},computeHeight:{get:function(){return this._computeHeight},set:function(e){this._computeHeight=e}},mipmapEnabled:{get:function(){return this._mipmapEnabled},set:function(e){this._mipmapEnabled=e}},enableFusion:{get:function(){return this._enableFusion},set:function(e){e!==this._enableFusion&&(this._enableFusion=e,this.traverseRenderEntity({enable:e,layer:this},_0x333d89))}},heightScale:{get:function(){return this._heightScale},set:function(e){if(e!==this._heightScale){e=Math.max(e,1e-5),this._heightScale=e;var t=p$1d.fromScale(new o$1p(1,1,e),new p$1d);this.traverseRenderEntity({scaleMatrix:t,layerMatrix:this._matModel},_0x4d4de9)}}},temporalCount:{get:function(){return this._temporalCount}},temporalSetting:{get:function(){return this._temporalSetting},set:function(e){this._temporalSetting=e}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=e}}}),_0x1a71e8.prototype.initialize=function(){_0x4f1f81(this);var e,t=this._fileType,i=_0x45bcf8.createClampGroundStencilRenderState();if(t===p$T.ClampGroundLine||t===p$T.ClampGroundPolygon||t===p$T.ExtendClampPolygonCache?(e=_0x45bcf8.createClampGroundColorRenderState(),i=_0x45bcf8.createClampGroundStencilRenderState()):t===p$T.ClampObjectPolygon||t===p$T.ClampObjectLine?(e=_0x45bcf8.createClampObjectColorRenderState(),i=_0x45bcf8.createClampObjectStencilRenderState()):t===p$T.ClampGroundAndObjectLineCache?e=_0x45bcf8.createClampGroundAndObjectLineRenderState():(e=_0x45bcf8.createNormalColorRenderState(this.cullMode)).stencilTest=_0x45bcf8.createReceiveClampObjectStencilTest(this._receiveObjectClamp),e$2e(this._polygonOffsetConfig)&&!0===this._polygonOffsetConfig.enabled&&(e.polygonOffset=this._polygonOffsetConfig),this._rsColor=d$1m.fromCache(e),this._rsClampColor=d$1m.fromCache(_0x45bcf8.createClampGroundColorRenderState()),this._rsClampLineColor=d$1m.fromCache(_0x45bcf8.createClampGroundAndObjectLineRenderState()),this._rsStencil=d$1m.fromCache(i),e$2e(this.waterEffectSet)&&!e$2e(this._waterParameter)){this._waterPlanes=new e$1Q,this._waterParameter=new h$J;for(var n=0;n<this.waterEffectSet[0].gpuProgramParameters.length;n++){for(var r=this.waterEffectSet[0].gpuProgramParameters[n],o=0;o<r.atuoConstants.length;o++){var a=r.atuoConstants[o];if("timeVal"===a.name){this._waterParameter[a.name]=a.fData;break}}for(o=0;o<r.gpuConstants.length;o++){var s=r.gpuConstants[o],l=null;switch(s.arraySize){case 1:l=s.arrayFloat[0];break;case 2:l=new o$1o,o$1o.unpack(s.arrayFloat,0,l);break;case 3:l=new o$1p,o$1p.unpack(s.arrayFloat,0,l);break;case 4:l=new e$2c,e$2c.unpack(s.arrayFloat,0,l)}if(!e$2e(l))continue;let e=s.name;if("bumpSpeed"===e){let e=l.x,t=l.y;this._waterParameter.waveDirection=180*Math.atan2(e,t)/Math.PI+180,this._waterParameter.speed=o$1o.magnitude(new o$1o(e,t))}else"scale"===e?this._waterParameter.waveScale=l:"noiseScale"===e?this._waterParameter.noiseStrength=l:"waterColour"===e?this._waterParameter.color=e$1X.fromCartesian4(l):"waterBrightness"===e?this._waterParameter.brightness=l:this._waterParameter[s.name]=l}}}this._computeLayerModelBounds()},_0x1a71e8.prototype._updateCoverImageryLayer=function(e){for(var t=this._layerScheduler,i=[],n=0;n<t._rootEntities.length;n++){var r=t._rootEntities[n];i.push(r)}for(var o,a={layer:this};o=i.pop();)for(var s=0;s<o._childrenPageLod.length;s++){for(var l=o._childrenPageLod[s]._renderEntityList,u=l.length,c=0;c<u;c++)e?(l[c]._imagerys=void 0,l[c].removeProgramDefineForCommand(l[c]._colorCommand,a,!0,!0,"IMAGERY"),l[c]._imageRasterFinish=!1,l[c]._imageryLevels=[],l[c].destroyScaleImagerys()):l[c].appendProgramDefineForCommand(l[c]._colorCommand,a,!0,!0,"IMAGERY");o._childrenPageLod[s]._entity&&i.push(o._childrenPageLod[s]._entity)}},_0x1a71e8.prototype.appendQueryFieldName=function(e){e$2e(e.length)||new t$15("Expected value to be type of Array");for(var t=this._queryFieldNames,i=[],n=0,r=e.length;n<r;n++){var o=e[n];-1===t.indexOf(o)&&i.push(o)}if(0===i.length)return o$1l.resolve();this._queryFieldNames=i;var a=this;return o$1l.all(this._layerScheduler.appendQueryFieldName(this)).then((function(){a._queryFieldNames=t.concat(i)}))},_0x1a71e8.prototype.getPointCloudClassificationInfos=function(){if(e$2e(this._pointCloudClassificationInfos))return this._pointCloudClassificationInfos;if(this._isS3MB){var e=u$P(i=new h$16("./attribute.json").resolve(this._baseUri).toString()),t=this;return e.then((function(e){var i=[];if(!e$2e(e.classificationInfos))return t._pointCloudClassificationInfos=i,i;for(var n=0,r=e.classificationInfos.length;n<r;n++){var o=e.classificationInfos[n].id,a=e.classificationInfos[n].name,s=e.classificationInfos[n].pointCount;i.push(new _0x2226fe(o,a,s))}return t._pointCloudClassificationInfos=i,i})).otherwise((function(e){console.log(e)}))}var i=new h$16("./indexData.dat").resolve(this._baseUri).toString();e$2e(a$O.CREDENTIAL)&&(i=a$O.addToken(i));e=d$1f(i),t=this;return e.then((function(e){for(var i=e.firstChild,n=i.namespaceURI,r=s$T.queryNodes(i,"PointCloudClassification",n),o=[],a=0,s=r.length;a<s;a++){var l=r[a],u=s$T.queryStringAttribute(l,"ID"),c=s$T.queryStringAttribute(l,"Name"),h=s$T.queryNumericAttribute(l,"PointCounts");o.push(new _0x2226fe(u,c,h))}return t._pointCloudClassificationInfos=o,o})).otherwise((function(e){console.log(e)}))},_0x1a71e8.prototype.setPolygonoffset=function(e,t){if(this._rsColor._applyFunctions.length=0,this._rsColor.polygonOffset.factor!==e||this._rsColor.polygonOffset.units!==t){var i=d$1m.getState(this._rsColor);i.polygonOffset={enabled:!0,factor:u$Z(e,0),units:u$Z(t,0)},this._rsColor=d$1m.fromCache(i)}},_0x1a71e8.prototype.getVolNames=function(){return this._volNames},_0x1a71e8.prototype.setQueryParameter=function(e){if(!e$2e((e=e||{}).url))throw new t$15("options.url is required!");if(!e$2e(e.dataSourceName))throw new t$15("options.dataSourceName is required!");if(!e$2e(e.dataSetName)&&!0!==e.isMerge)throw new t$15("options.dataSetName is required or isMerge must be true!");if(e.keyWord=u$Z(e.keyWord,"SmID"),e.hasGeometry=u$Z(e.hasGeometry,!1),this.queryParameter=l$1f(e),!e$2e(this.queryParameter.dataSetName)&&1==this.queryParameter.isMerge){var t=this;this.datasetInfo().then((function(e){t.queryParameter.datasetList=e}))}},_0x1a71e8.prototype.getQueryParameter=function(){return this.queryParameter},_0x1a71e8.prototype.datasetInfo=function(){var e=o$1l.defer();if(this._isS3MB){var t=this._baseUri+"attribute.json";e$2e(a$O.CREDENTIAL)&&(t=a$O.addToken(t)),u$P(t).then((function(t){for(var i=t.layerInfos,n=new Array,r=0;r<i.length;r++){var o=i[r],a={};a.datasetName=o.layerName,a.startID=parseInt(o.idRange.minID),a.endID=parseInt(o.idRange.maxID),n.push(a)}e.resolve(n)}))}else{var i=this._baseUri+"indexData.dat";e$2e(a$O.CREDENTIAL)&&(i=a$O.addToken(i));e=o$1l.defer();o$1l(d$1f(i),(function(t){for(var i=s$T.getElementsByTagNameNS(t,"*","DatasetName"),n=s$T.getElementsByTagNameNS(t,"*","DatasetIDRange"),r=new Array,o=0;o<i.length;o++){var a={};a.datasetName=i[o].innerHTML;var s=n[o].innerHTML,l=s.indexOf("_");a.startID=parseInt(s.substr(0,l)),a.endID=parseInt(s.substr(l+1,s.length-l-1)),r.push(a)}e.resolve(r)}))}return e.promise},_0x1a71e8.prototype.getLodRangeScale=function(){return this._lodRangeScale},_0x1a71e8.prototype.setAnimation=function(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.keyframes",e.keyframes),o$1q.typeOf.number.greaterThan("options.duration",e.duration,0);var t=e.keyframes,i=e.duration,n=e.interpolationType;if("0%"in t){var r=t["0%"];r.scale=u$Z(r.scale,new o$1p(1,1,1)),r.rotation=u$Z(r.rotation,new i$16(this._heading,0,0)),r.translation=u$Z(r.translation,o$1p.fromDegrees(this.lon,this.lat,this.style3D.bottomAltitude))}else t["0%"]={translation:o$1p.fromDegrees(this.lon,this.lat,this.style3D.bottomAltitude),scale:new o$1p(1,1,1),rotation:new i$16(this._heading,0,0)};var o=Object.keys(t);return(o=o.filter((function(e){return"%"===e[e.length-1]}))).sort((function(e,t){return(e=+e.slice(0,-1))-(t=+t.slice(0,-1))})),this._animationInfo={startTime:Date.now(),array:[],duration:i,defer:o$1l.defer(),defaultInterpolation:u$Z(n,_0x301856.Linear),done:!1},_0x41fca9(this._animationInfo,"rotation",o,t),_0x41fca9(this._animationInfo,"scale",o,t),_0x41fca9(this._animationInfo,"translation",o,t),this._animationInfo.defer},_0x1a71e8.prototype.setLodRangeScale=function(e){this._lodRangeScale=e},_0x1a71e8.prototype.refreshRaster=function(){if(e$2e(this._frameState)){var e=this._frameState._quadtree._levelZeroTiles;e[0]&&_0x4724c3(this,e[0]),e[1]&&_0x4724c3(this,e[1])}},_0x1a71e8.prototype._isNeedUpdate=function(e,t){return!(!e$2e(e)||!e$2e(t)||!this._visible||(e$2e(this.waterEffectSet)||this.multiTemporalUseWater)&&t._fboState.enabled&&"water"===t._fboState.name)},_0x1a71e8.prototype._loadMaterialTexture=function(e,t){e.loadingTexture=!0;var i=e.pbrMetallicRoughness,n=e.textureunitstates,r=i.baseColorTextureIndex;e$2e(e.pendingTextureCount)||(e.pendingTextureCount=0),e$2e(e.readyTextureCount)||(e.readyTextureCount=0);var o=this._context,a=e$2e(t)?t:this._baseUri+this._materialRelativePath;r>-1&&!e$2e(i.baseColorTexture)&&(_0xade8aa(o,a+n[r].textureunitstate.url,e,e.pbrMetallicRoughness,"baseColorTexture"),e.pendingTextureCount++);var s=i.emissiveTextureIndex;s>-1&&!e$2e(i.emissiveTexture)&&(_0xade8aa(o,a+n[s].textureunitstate.url,e,e.pbrMetallicRoughness,"emissiveTexture"),e.pendingTextureCount++);var l=i.normalTextureIndex;l>-1&&!e$2e(i.normalTexture)&&(_0xade8aa(o,a+n[l].textureunitstate.url,e,e.pbrMetallicRoughness,"normalTexture"),e.pendingTextureCount++);var u=i.metallicRoughnessTextureIndex;u>-1&&!e$2e(i.metallicRoughnessTexture)&&(_0xade8aa(o,a+n[u].textureunitstate.url,e,e.pbrMetallicRoughness,"metallicRoughnessTexture"),e.pendingTextureCount++);var c=i.occlusionTextureIndex;c>-1&&!e$2e(i.occlusionTexture)&&(_0xade8aa(o,a+n[c].textureunitstate.url,e,e.pbrMetallicRoughness,"occlusionTexture"),e.pendingTextureCount++)},_0x1a71e8.prototype._loadMaterial=function(e,t,i){var n=this;t$10.createIfNeeded(e).fetchJson().then((function(e){if(e$2e(n._materialMap)||(n._materialMap={}),e.material.ready=!1,e$2e(i)&&e.material.textureunitstates.length>0){var r=e.material.textureunitstates[0].textureunitstate.texmodmatrix,o=p$1d.unpack(r),a=new o$1p(i.ScaleU,i.ScaleV,1);p$1d.fromScale(a,o),p$1d.pack(o,r)}n._materialMap[t]=e,n.readyMaterialCount++}))},_0x1a71e8.prototype._loadMaterialMap=function(e){if(e$2e(this._materialMapInfo)){this.readyMaterialCount=0;for(var t=0,i=this._materialMapInfo.length;t<i;t++){var n=this._materialMapInfo[t],r=this._baseUri+this._materialRelativePath+n.AssociateMaterial+".json";this._loadMaterial(r,n.OriginalMaterial,n.UVTransformation)}this.pendingMaterialCount=this._materialMapInfo.length,this._materialMapInfo=void 0}if(e$2e(this._materialMap)&&this.pendingMaterialCount===this.readyMaterialCount){var o=!0;for(var a in this._materialMap)if(this._materialMap.hasOwnProperty(a)){var s=this._materialMap[a].material;s.loadingTexture||this._loadMaterialTexture(s),s.pendingTextureCount===s.readyTextureCount&&(s.ready=!0),o=o&&s.ready}this._materialMapReady=o}if(!e$2e(this._associateMaterialPromise)){var l=this,u=e.lastIndexOf("/");this._materialRelativePath=e.substring(0,u+1),e=this._baseUri+e;var c=t$10.createIfNeeded(e);this._associateMaterialPromise=c.fetchJson().then((function(e){l._materialMapInfo=e.Scenes[0].Layers[0].Materials.MaterialExportedMap}))}},_0x1a71e8.prototype.update=function(e,t,i,n){if(this._fileType!==p$T.Text&&this._fileType!==p$T.IconPoint||!t.passes.pick||!t.passes.offscreen){if(e$2e(this._associateMaterialUrl)&&!this._materialMapReady)return void this._loadMaterialMap(this._associateMaterialUrl);if(this._PBRMaterialParams.loadingTexture&&this._updatePBRMaterial(),_0x137ce1(this),this._isNeedUpdate(e,t)){this._style3D._dirty&&(this.refresh(),_0x4f1f81(this),this._style3D._dirty=!1),this._style3D.billboardMode===yr$2.FixedXYZ&&(this._isOverlapDisplayed=!0),_0x29597e(this,e);var r=t.camera;this._sceneMode=r._mode,this._projection=r._projection,this._picking=t.passes.pick,this._frameState=t,this._backfaceCommands.length=0,this._hasMixedContent=!1;var o,a=i.length;for(h=0,o=this._renderClipPlaneArray.length;h<o;h++){this._renderClipPlaneArray.values[h].update(e,t,i)}var s=this._objsVisibleMap;this._hasObjsVisibleMap=Object.keys(s).length>0,this._hasHeightRangeAttributeName=e$2e(this._heightRangeAttributeName);var l=this._PBRMaterialParams.pbrMetallicRoughness.snowEffect,u=this._PBRMaterialParams.pbrMetallicRoughness.rainEffect;if(this._hasSnowEffect=e$2e(l)&&e$2e(l.snowMaskTexture)&&e$2e(l.snowNormalTexture),this._hasRainEffect=e$2e(u)&&e$2e(u.rippleTexture),this._layerScheduler.update(e,t,i),this._shadowDarkness=t.shadowDarkness,this._showIcon&&this._iconCollection.length>0&&this._iconCollection.update(t,e,i),n=u$Z(n,!1),this._showLabel&&!0!==n&&(this._labelCollection.s3MlayerId=this._id,this._labelCollection.update(t,e,i)),this._fileType===p$T.PointCloudFile&&t.passes.render)i.length-a>0&&(this._pointCloudShading.eyeDomeLighting||this._pointCloudShading.performance)&&this._pointCloudEyeDomeLighting.update(t,a,this._pointCloudShading);this._fileType===p$T.ClampGroundRealtimeRasterCache&&(t.rasterLineWidth=this.style3D.lineWidth),_0x4d109b(this,t),this._updateEdgeDistanceFalloffFactor();for(var c=this._excavateRegionCommands.values.length,h=0;h<c;h++){var d=this._excavateRegionCommands.values[h];t.commandList.push(d)}_0x529e85(t,this),this._layerUBO.update(e,t),e$2e(this._waterLayerUbo)&&this._waterLayerUbo.update(e),e$2e(this._polylineEffectUbo)&&this._polylineEffectUbo.update(e),e$2e(this._regionEffectUbo)&&this._regionEffectUbo.update(e)}}};var _0x2b1f40=new p$1d;function _0x4b07f6(e){for(var t=[],i=0,n=e._layerScheduler._rootEntities.length;i<n;i++){var r=e._layerScheduler._rootEntities[i];t.push(r)}for(;t.length;){if(e$2e(r=t.pop())){e$2e(r._originalBS)&&(i$1d.transform(r._originalBS,e._matModel,r._boundingSphere),_0x345634(r,e._matModel));for(i=0,n=r._childrenPageLod.length;i<n;i++){var o=r._childrenPageLod[i];_0x345634(o,e._matModel),e$2e(o._originalBS)&&i$1d.transform(o._originalBS,e._matModel,o._boundingSphere);for(var a=0,s=o._renderEntityList.length;a<s;a++){var l=o._renderEntityList[a];!e$2e(l)||!e$2e(l._colorCommand)||(p$1d.inverse(l._colorCommand.modelMatrix,_0x2b1f40),i$1d.transform(l._boundingVolume,_0x2b1f40,l._boundingVolume),p$1d.multiply(e._matModel,l._geoMatrix,l._colorCommand.modelMatrix),i$1d.transform(l._boundingVolume,l._colorCommand.modelMatrix,l._boundingVolume),l._colorCommand._boundingVolume=l._boundingVolume)}t.push(o._entity)}}}}function _0x345634(e,t){if(e$2e(e.obbMin)){var i=e.obbMin,n=e.obbMax,r=[];r.push(new o$1p(i.x,i.y,i.z)),r.push(new o$1p(i.x,i.y,n.z)),r.push(new o$1p(i.x,n.y,i.z)),r.push(new o$1p(i.x,n.y,n.z)),r.push(new o$1p(n.x,i.y,i.z)),r.push(new o$1p(n.x,i.y,n.z)),r.push(new o$1p(n.x,n.y,i.z)),r.push(new o$1p(n.x,n.y,n.z));for(var o=0;o<8;o++)r[o]=p$1d.multiplyByPoint(t,r[o],r[o]);e._orientedBoundingBox=y$Y.fromPoints(r,e._orientedBoundingBox)}}function _0x5dd93f(e,t,i){for(var n,r=0,o=e.length;r<o;r++){var a=e[r],s=a.times;if(t>=s[0]&&t<=s[s.length-1]){n=a;break}}n&&n.evaluate(t,i)}var _0x169cbf=n$15.clone(n$15.IDENTITY),_0x1be8db=new i$16,_0x5c5867=new p$1d,_0x4fcef7=new p$1e,_0x5b1305=new p$1e,_0x4221b3=new o$1p;function _0x5f3498(e,t,i){"rotation"===t.type&&(_0x5dd93f(t.splines,i,_0x169cbf),p$1e.fromQuaternion(_0x169cbf,_0x5b1305),m$19.headingPitchRollToFixedFrame(e._position,_0x1be8db,t$12.WGS84,m$19.eastNorthUpToFixedFrame,_0x5c5867),p$1d.getRotation(_0x5c5867,_0x4fcef7),p$1e.multiply(_0x4fcef7,_0x5b1305,_0x4fcef7),p$1d.getTranslation(e._matModel,_0x4221b3),p$1d.fromRotationTranslation(_0x4fcef7,_0x4221b3,e._matModel))}var _0x152474=new o$1p(1,1,1);function _0x43306d(e,t,i){"scale"===t.type&&(_0x5dd93f(t.splines,i,_0x152474),p$1d.setScale(e._matModel,_0x152474,e._matModel))}function _0x43e23f(e,t,i){"translation"===t.type&&(_0x5dd93f(t.splines,i,e._position),p$1d.setTranslation(e._matModel,e._position,e._matModel))}var _0x1ea467=new e$2c;function _0x529e85(e,t){e$2e(e.realtimeRasterSwipeParams)||(e.realtimeRasterSwipeParams={}),_0x1ea467.x=t._swipeRegion.x*e.context.drawingBufferWidth,_0x1ea467.y=(1-t._swipeRegion.y)*e.context.drawingBufferHeight,_0x1ea467.z=t._swipeRegion.z*e.context.drawingBufferWidth,_0x1ea467.w=(1-t._swipeRegion.w)*e.context.drawingBufferHeight,e.realtimeRasterSwipeParams.swipeRegion=_0x1ea467,e.realtimeRasterSwipeParams.swipeEnabled=t._swipeEnabled}var _0x213422=new e$2c;function _0x239d23(e,t){e.updateAllObjsVisible(t.layer,t.isVisible)}function _0x1a1914(e,t){e.updateTheme(t.layer)}function _0x2f2515(e,t){e.updateObjsColor(t.ids)}function _0x5103f4(e,t){e.updateObjsTranslate(t.ids)}function _0x33aca7(e,t){e.updateExtendHeight(t.ids)}function _0x317b8a(e,t){e.removeExtendHeight(t.ids)}function _0x1a976d(e,t){e.removeAllExtendHeight()}function _0x4a54bc(e,t){e.updateObjsOperation(t.ids,t)}function _0x5e87f9(e,t,i){var n=new o$1p,r=new o$1p;o$1p.subtract(t,e,n),o$1p.subtract(i,e,r);var o=new o$1p;o$1p.cross(n,r,o),o$1p.normalize(o,o);var a=-o$1p.dot(o,e);return new e$2c(o.x,o.y,o.z,a)}function _0x2405e7(e,t){var i=e._projection,n=i.ellipsoid,r=new o$1p,o=new a$18;return n.cartesianToCartographic(t,o),i.project(o,r),o$1p.fromElements(r.z,r.x,r.y)}_0x1a71e8.prototype.render=function(e,t){if(e$2e(e)&&e$2e(t)){if(t.passes.pick){_0x213422.x=e._pickPosition[0],_0x213422.y=e._pickPosition[1],_0x213422.z=e._pickPosition[2],_0x213422.w=1;var i=new p$1d;p$1d.inverse(this._matModel,i),p$1d.multiplyByVector(i,_0x213422,_0x213422),_0x213422.z=_0x213422.z+this.height<0?2:_0x213422.z+this.height,e$2c.clone(_0x213422,this._pickPosition)}if(this._picking=t.passes.pick,this.updateFlattenFrameBuffer(e,t),this._updateExcavationFrameBuffer(e,t),this.updateHypRegionFrameBuffer(e,t),this.updateOverlayFrameBuffer(e,t),this._clipping){var n=t.camera.inverseViewMatrix,r=new p$1d;p$1d.transpose(n,r);for(var o=0;o<6;o++)p$1d.multiplyByVector(r,this._oriClipPlane[o],this._clipPlane[o])}this._spatialClipEnable&&e$2e(this._spatialQuery)&&this._spatialQuery._updateTextures(e,t)}},_0x1a71e8.prototype.setSelection=function(e,t){if(_0x43b37d.S3M!==this._version&&(o$1q.defined("setSelection ids",e),this._selectEnabled&&this._enableHighlight)){if(Array.isArray(e)||(e=[e]),this.multiChoose||this.releaseSelection(),this._lastSelectSkeletonId=u$Z(t,-1),this._fileType===p$T.ClampGroundRealtimeRasterCache)for(var i=0,n=e.length;i<n;i++)this._layerScheduler.refreshRasterById(e[i],this._frameState);this._scene._layers.setSelectedLayer(this),this._selections=this._selections.concat(e),this.setObjectsOperationByID(e,_0x27a6bb.SELECTED)}},_0x1a71e8.prototype.getSelection=function(){return[].concat(this._selections)},_0x1a71e8.prototype.releaseSelection=function(){if(_0x43b37d.S3M!==this._version&&(this._showLabel&&this._labelCollection.releaseSelection(),!(this._selections.length<1))){if(this._fileType===p$T.ClampGroundRealtimeRasterCache)for(var e=0,t=this._selections.length;e<t;e++)this._layerScheduler.refreshRasterById(this._selections[e],this._frameState);this.removeObjectsOperation(this._selections,_0x27a6bb.SELECTED),this._selections.length=0}},_0x1a71e8.prototype.setSkeletonSelection=function(e){},_0x1a71e8.prototype.setRenderSelectionTexBySkeletonId=function(e){var t={};t.layer=this,t.enable=e,this.traverseRenderEntity(t,_0x553e9d)},_0x1a71e8.prototype.setObjsColor=function(e,t){if(_0x43b37d.S3M!==this._version&&this._fileType!==p$T.ClampObjectPolygon){o$1q.defined("setObjsColor ids",e),o$1q.defined("setObjsColor color",t),o$1q.typeOf.object("setObjsColor color",t),Array.isArray(e)||(e=[e]);for(var i={},n=0,r=e.length;n<r;n++){var o=e[n]+"";!e$2e(o)||(this._objsColorList[o]=t,i[o]=t)}this.updateObjsColor(i)}},_0x1a71e8.prototype.getObjsColor=function(e){if(!e$2e(e))throw new Error("id is required");return _0x43b37d.S3M===this._version?null:this._objsColorList[e]},_0x1a71e8.prototype.removeObjsColor=function(e){o$1q.defined("removeObjsColor ids",e),Array.isArray(e)||(e=[e]);for(var t={},i=0,n=e.length;i<n;i++){var r=e[i];e$2e(this._objsColorList[r])&&(t[r]=e$1X.TRANSPARENT,delete this._objsColorList[r])}this.removeObjectsOperation(e,_0x27a6bb.SetColor),this.updateObjsColor(t)},_0x1a71e8.prototype.removeAllObjsColor=function(){if(!(Object.keys(this._objsColorList).length<1)){var e={};for(var t in this._objsColorList)this._objsColorList.hasOwnProperty(t)&&(e[t]=e$1X.TRANSPARENT);this._objsColorList={},this.updateObjsColor(e)}},_0x1a71e8.prototype.setObjsExtendHeight=function(e,t){if(_0x43b37d.S3M!=this._version&&e$2e(this._objsHeightList)){o$1q.defined("setObjsExtendHeight ids",e),o$1q.defined("setObjsExtendHeight height",t),Array.isArray(e)||(e=[e]);for(var i=new e$1Q,n=0,r=e.length;n<r;n++){var o=e[n];this._objsHeightList.set(o,t),i.set(o,t)}this.updateExtendHeight(i)}},_0x1a71e8.prototype.removeAllObjsExtendHeight=function(){!e$2e(this._objsHeightList)||(this._objsHeightList.removeAll(),this.removeAllExtendHeight())},_0x1a71e8.prototype.removeObjsExtendHeight=function(e){if(e$2e(this._objsHeightList)){o$1q.defined("removeObjsExtendHeight ids",e),Array.isArray(e)||(e=[e]);for(var t=0,i=e.length;t<i;t++){var n=e[t];this._objsHeightList.remove(n)}this.removeExtendHeight(e)}},_0x1a71e8.prototype.setOnlyObjsVisible=function(e,t,i,n){if(i=u$Z(i,!0),n=u$Z(n,!1),_0x43b37d.S3M===this._version)return null;if(o$1q.defined("setOnlyObjsVisible ids",e),o$1q.typeOf.bool("setOnlyObjsVisible isVisible",t),Array.isArray(e)||(e=[e]),0===e.length){this._allObjsHide=t,this._objsVisibleList.removeAll();var r=Object.keys(this._objsHideList._hash);return this.removeObjectsOperation(r,_0x27a6bb.HIDE),this._objsHideList.removeAll(),i&&!n&&(this._objsVisibleMap={}),void this.updateAllObjsVisible(!t)}var o=this._objsVisibleList,a=this._objsHideList,s=this._objsVisibleMap;t?(e.map((function(e){o.set(e,!0),a.remove(e),i&&(s[e]=!0)})),this.removeObjectsOperation(e,_0x27a6bb.HIDE)):(e.map((function(e){o.remove(e),a.set(e,!0),i&&(s[e]=!1)})),this.setObjectsOperationByID(e,_0x27a6bb.HIDE))},_0x1a71e8.prototype.setObjsVisible=function(e,t,i){0!==e.length?(this.setOnlyObjsVisible([],t,i),this.setOnlyObjsVisible(e,t,i)):this.setOnlyObjsVisible([],t,i)},_0x1a71e8.prototype.setPointCloudGroupsVisible=function(e,t){if(this._fileType===p$T.PointCloudFile&&e$2e(this._pointCloudLayerVisible)){o$1q.defined("setPointCloudGroupsVisible groupNames",e),o$1q.typeOf.bool("setPointCloudGroupsVisible isVisible",t),Array.isArray(e)||(e=[e]);for(var i=0,n=e.length;i<n;i++)this._pointCloudLayerVisible.hasOwnProperty(e[i])&&(this._pointCloudLayerVisible[e[i]]=t)}},_0x1a71e8.prototype.getPointCloudGroupInfos=function(){if(this._fileType!==p$T.PointCloudFile)return[];if(!e$2e(this._pointCloudLayerVisible))return[];var e=[];for(var t in this._pointCloudLayerVisible)this._pointCloudLayerVisible.hasOwnProperty(t)&&e.push(t);return e},_0x1a71e8.prototype.getPointCloudGroupBounds=function(e){if(this._fileType===p$T.PointCloudFile&&e$2e(this._groupNameBounds))return this._groupNameBounds.get(e)},_0x1a71e8.prototype.getObjsVisible=function(e){if(!this.visible)return!1;if(_0x43b37d.S3M===this._version)return!0;var t=this._objsColorList[e],i=!0;return e$2e(t)&&(i&=t.alpha),i},_0x1a71e8.prototype.setObjsOffset=function(e){if(e$2e(this._layerScheduler._extrudedId))if(Array.isArray(e))for(var t=0;t<e.length;t++)this._polygonsTranslate[e[t]]=o$1p.clone(this._selectedTranslate);else this._polygonsTranslate[e]=o$1p.clone(this._selectedTranslate);else this._boundingSphereOffset=o$1p.clone(this._selectedTranslate),this.setObjectsOperationByID(e,_0x27a6bb.OFFSET)},_0x1a71e8.prototype.setObjsTranslate=function(e,t){if(_0x43b37d.S3M!==this._version){o$1q.defined("setObjsTranslate ids",e),o$1q.defined("setObjsTranslate translate",t),o$1q.typeOf.object("setObjsTranslate translate",t),Array.isArray(e)||(e=[e]);for(var i={},n=0,r=e.length;n<r;n++){var o=e[n];!e$2e(o)||(this._objsOffsetList[o]=t,i[o]=t)}Object.keys(i).length>0&&(this.traverseRenderEntity({ids:i},_0x5103f4),this.setObjectsOperationByID(e,_0x27a6bb.OFFSET))}},_0x1a71e8.prototype.setBatchObjsTranslate=function(e){_0x43b37d.S3M!==this._version&&(o$1q.defined("setObjsTranslate option",e),Object.getPrototypeOf(e)===Object.prototype&&(Object.assign(this._objsOffsetList,e),Object.keys(e).length>0&&(this.traverseRenderEntity({ids:e},_0x5103f4),this.setObjectsOperationByID(Object.keys(e),_0x27a6bb.OFFSET))))},_0x1a71e8.prototype.removeObjsTranslate=function(e){o$1q.defined("removeObjsTranslate ids",e),Array.isArray(e)||(e=[e]);for(var t={},i=0,n=e.length;i<n;i++){var r=e[i];e$2e(this._objsOffsetList[r])&&(delete this._objsOffsetList[r],t[r]=o$1p.ZERO)}this.removeObjectsOperation(e,_0x27a6bb.OFFSET),Object.keys(t).length>0&&this.traverseRenderEntity({ids:t},_0x5103f4)},_0x1a71e8.prototype.removeAllObjsTranslate=function(){var e={};for(var t in this._objsOffsetList)this._objsOffsetList.hasOwnProperty(t)&&(e[t]=o$1p.ZERO);this.traverseRenderEntity({ids:e},_0x5103f4),this._objsOffsetList={}},_0x1a71e8.prototype.removeObjsOffset=function(e){this.removeObjectsOperation(e,_0x27a6bb.OFFSET)},_0x1a71e8.prototype.removeAllObjsOffset=function(){this._boundingSphereOffset=o$1p.ZERO,this.removeAllObjectsOperation(_0x27a6bb.OFFSET)},_0x1a71e8.prototype.setObjectsOperationByID=function(e,t){if(_0x43b37d.S3M!==this._version){o$1q.defined("set Objs Operation ids",e),o$1q.defined("set Objs Operation operationType",t),Array.isArray(e)||(e=[e]),t===_0x27a6bb.CLIP&&(this._operationType&_0x27a6bb.CLIP)===_0x27a6bb.RESET&&(this._operationType|=t,this.traverseRenderEntity({layer:this,enable:!0},_0x358acf));for(var i,n=new e$1Q,r=0,o=e.length;r<o;r++)if(e$2e(i=e[r])){var a=u$Z(this._objsOperationList[i],0);a!==t&&(a|=t,this._objsOperationList[i]=a,n.set(i,a))}n.length>0&&this.updateObjsOperation(n._hash)}},_0x1a71e8.prototype.removeObjectsOperation=function(e,t){if(_0x43b37d.S3M!==this._version){o$1q.defined("set Objs Operation ids",e),Array.isArray(e)||(e=[e]);for(var i,n=_0x27a6bb.ALL^t,r=new e$1Q,o=0,a=e.length;o<a;o++){i=e[o];var s=this._objsOperationList[i];!e$2e(s)||((s&=n)===_0x27a6bb.RESET?delete this._objsOperationList[i]:this._objsOperationList[i]=s,r.set(i,s))}r.length>0&&this.updateObjsOperation(r._hash)}},_0x1a71e8.prototype.removeAllObjectsOperation=function(e){if(_0x43b37d.S3M!==this._version&&!(Object.keys(this._objsOperationList).length<1)){var t=_0x27a6bb.ALL^e,i=new e$1Q,n=this._objsOperationList;for(var r in n)if(n.hasOwnProperty(r)){var o=this._objsOperationList[r];if(!e$2e(o))continue;(o&=t)===_0x27a6bb.RESET?delete this._objsOperationList[r]:this._objsOperationList[r]=o,i.set(r,o)}i.length>0&&this.updateObjsOperation(i._hash)}},_0x1a71e8.prototype.setCategoriesVisible=function(e,t){o$1q.defined("set Categories Visible",e),Array.isArray(e)||(e=[e]);var i=this._hypMaxCategory,n=this._hypMinCategory,r=256,o=Math.max(Math.ceil((i-n)/r),1);e$2e(this._categorieTexture)||(this._categorieTexture=new t$U({context:this._context,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,width:r,height:o,flipY:!1,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),this.traverseRenderEntity({layer:this},_0x93ed4));var a=new Uint8Array(r*o*4);if(t!==_0x70e866.ResetAll){var s,l,u;if(t===_0x70e866.Hide)for(s=0,l=e.length;s<l;s++)u=e[s],this._categoryHideList.set(u,u);else for(s=0,l=e.length;s<l;s++)u=e[s],this._categoryHideList.contains(u)&&this._categoryHideList.remove(u);for(s=0;s<this._categoryHideList.values.length;s++){var c=(u=this._categoryHideList.values[s])-n;a[4*c]=255,a[4*c+1]=255,a[4*c+2]=255,a[4*c+3]=255}this._categorieTexture.copyFrom({width:r,height:o,arrayBufferView:a})}else this._categorieTexture.copyFrom({width:r,height:o,arrayBufferView:a})},_0x1a71e8.prototype.addFlattenRegion=function(e){var t=e.name,i=e.position;if(!e$2e(t)||!e$2e(i))return!1;if(e$2e(this._flattenRegions.get(t)))return!1;e$2e(this._flattenTexture)||(this._flattenTexture=new t$U({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$12.RGBA,pixelDatatype:this._context.floatingPointTexture?_$_.FLOAT:void 0}));var n=this._createRasterRegion(i),r=o$1p.fromDegreesArrayHeights(i),o=i$1d.fromPoints(r,new i$1d);if(n.boundingSphere=o,this._flattenRegions.set(t,n),this._flattenUpdate=!0,this._flattening=!0,1===this._flattenRegions.values.length){var a={};a.layer=this,a.boundingSphere=o,this.traverseRenderEntity(a,_0x1bd9b5)}return!0},_0x1a71e8.prototype.removeFlattenRegion=function(e){if(!this._flattenRegions.remove(e))return!1;if(this._flattenUpdate=!0,0===this._flattenRegions.values.length){this._flattenUpdate=!1,this._flattening=!1;var t={};t.layer=this,this.traverseRenderEntity(t,_0x2f1f1e)}return!0},_0x1a71e8.prototype.removeAllFlattenRegion=function(){for(var e=0;e<this._flattenRegions.values.length;e++)this._flattenRegions.values[e].destroy(),this._flattenRegions.values[e]=null;this._flattenRegions.removeAll(),this._flattening=!1;var t={};t.layer=this,this.traverseRenderEntity(t,_0x2f1f1e)},_0x1a71e8.prototype.addOverlayImage=function(e){var t=(e=u$Z(e,{})).name,i=e.bounds,n=e.image;if(!e$2e(t)||!e$2e(i)||!e$2e(e.image))return!1;var r=this._overlayRegions.get(t);if(e$2e(r))return!1;e$2e(this._overlayTexture)||(this._overlayTexture=new t$U({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$12.RGBA}));var o=new t$U({context:this._context,width:n.width,height:n.height,pixelFormat:V$12.RGBA,source:n});if(this._overlayTextures.set(t,o),r=this._createRasterBounds(i),this._overlayRegions.set(t,r),this._overlayUpdate=!0,this._hasOverlay=!0,1===this._overlayRegions.values.length){var a={};a.layer=this,this.traverseRenderEntity(a,_0x3e3e7e)}return!0},_0x1a71e8.prototype.removeOverlayImage=function(e){if(!e$2e(e))return!1;if(!e$2e(this._overlayRegions.get(e)))return!1;if(this._overlayTextures.remove(e),this._overlayRegions.remove(e),this._overlayUpdate=!0,0===this._overlayRegions.values.length){var t={};t.layer=this,this.traverseRenderEntity(t,_0x2da71f)}return!0},_0x1a71e8.prototype.setModifyRegions=function(e,t){if(this.clearModifyRegions(),t==_0x454473.CLIP_INSIDE||t==_0x454473.CLIP_OUTSIDE)for(var i=e.length,n=0;n<i;n++){var r={position:e[n],name:"modify_"+n};this.addExcavationRegion(r)}this._excavationMode=t},_0x1a71e8.prototype._setServerClipRegions=function(e,t){for(var i=0,n=e.length;i<n;i++){var r={position:e[i],name:"server_clipregion_"+i};this._addServerExcavationRegion(r)}this._serverExcavationMode=u$Z(t,_0x454473.CLIP_OUTSIDE)},_0x1a71e8.prototype.setClipRegions=function(e){if(!(e instanceof Array))throw new t$15("regions must be a georegion3d array");var t=this._baseUri.toString();new t$10(a={url:t.substring(0,t.indexOf("/data/path"))+"/config",method:"POST",data:JSON.stringify({clipRegions:e})})._makeRequest({method:"POST",data:a.data});for(var i=0;i<e.length;i++){for(var n=[],r=e[i],o=0;o<r.points.length;o++)n.push(r.points[o].x),n.push(r.points[o].y),n.push(r.points[o].z);var a={position:n,name:"server_clipregion_x"+i};this._addServerExcavationRegion(a)}},_0x1a71e8.prototype.clearModifyRegions=function(){for(var e=Object.keys(this._excavationRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];n.startsWith("modify_")&&this.removeExcavationRegion(n)}},_0x1a71e8.prototype.addExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(e$2e(t)||o$1q.typeOf.string("options.name",t),e$2e(i)||o$1q.typeOf.string("options.position",i),e$2e(this._excavationRegions.get(t)))return!1;e$2e(this._excavationTexture)||(this._excavationTexture=new t$U({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$12.RGBA}));var r=this._createRasterRegion(i,n,e$2e(n));if(r.name=t,this._excavationRegions.set(t,r),this._excavationUpdate=!0,this._hasExcavation=!0,1===this._excavationRegions.values.length){var o={};o.layer=this,this.traverseRenderEntity(o,_0x567d8c)}return!0},_0x1a71e8.prototype._addServerExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(e$2e(t)||o$1q.typeOf.string("options.name",t),e$2e(i)||o$1q.typeOf.string("options.position",i),e$2e(this._serverExcavationRegions.get(t)))return!1;e$2e(this._excavationTexture)||(this._excavationTexture=new t$U({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$12.RGBA}));var r=this._createRasterRegion(i,n,e$2e(n));if(r.name=t,this._serverExcavationRegions.set(t,r),this._excavationUpdate=!0,this._hasServerExcavation=!0,1===this._serverExcavationRegions.values.length){var o={};o.layer=this,this.traverseRenderEntity(o,_0x11b6a1)}return!0},_0x1a71e8.prototype.removeExcavationRegion=function(e){var t=this._excavationRegions.get(e);if(!this._excavationRegions.remove(e))return!1;if(t.destroy(),this._removeExcavationCommands(e),this._excavationUpdate=!0,0===this._excavationRegions.values.length){this._hasExcavation=!1,this._excavationUpdate=!1;var i={};i.layer=this,this.traverseRenderEntity(i,_0x1070e5)}return!0},_0x1a71e8.prototype._removeServerExcavationRegion=function(e){var t=this._serverExcavationRegions.get(e);if(!this._serverExcavationRegions.remove(e))return!1;if(t.destroy(),this._removeExcavationCommands(e),this._excavationUpdate=!0,0===this._serverExcavationRegions.values.length){this._excavationUpdate=!1,this._hasExcavation=!1;var i={};i.layer=this,this.traverseRenderEntity(i,_0x5d6745)}return!0},_0x1a71e8.prototype._removeExcavationCommands=function(e){var t=this._excavateRegionCommands.get(e+"side"),i=this._excavateRegionCommands.get(e+"bottom");t&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy()),i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom")},_0x1a71e8.prototype.removeAllExcavationRegion=function(){this._hasExcavation=!1;for(var e=Object.keys(this._excavationRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this.removeExcavationRegion(n)}this._excavationRegions.removeAll()},_0x1a71e8.prototype._createRasterRegion=function(e,t,i){var n=o$1p.fromDegreesArrayHeights(e);if(this._sceneMode!==C$14.SCENE3D)for(var r=0;r<n.length;r++)n[r]=_0x2405e7(this,n[r]);var o=new U$18({polygonHierarchy:{positions:n},perPositionHeight:!0}),a=U$18.createGeometry(o),s=new p$1d;p$1d.inverse(this._matModel,s),f$Z.updateGeometry(a,e,s);var l=new f$Z;if(l._geometry=a,l._bounds=f$Z.updateGeoBounds(a),i){l.worldGeometry=U$18.createGeometry(o),l.colorGeometry=U$18.createGeometry(o);var u=o$1p.fromDegrees(e[0],e[1],0),c=new i$16(0,0,0);l._excavateMatrix=m$19.headingPitchRollToFixedFrame(u,c,t$12.WGS84),l.modelMatrix=p$1d.fromTranslation(new o$1p(e[0],e[1],0),new p$1d);for(var h=Number.MAX_VALUE,d=(r=0,e.length);r<d;r+=3)h=Math.min(h,e[r+2]);l.height=h-t,l.rectangle=h$18.fromCartesianArray(n),l.positions=e}return l},_0x1a71e8.prototype._createRasterBounds=function(e){var t=new j$N({rectangle:e}),i=j$N.createGeometry(t),n=new p$1d;if(p$1d.inverse(this._matModel,n),this._sceneMode===C$14.COLUMBUS_VIEW)for(var r=0;r<i.attributes.position.values.length;r+=i.attributes.position.componentsPerAttribute){var o=new o$1p(i.attributes.position.values[r],i.attributes.position.values[r+1],i.attributes.position.values[r+2]),a=a$18.fromCartesian(o),s=new o$1p;this._projection.project(a,s),i.attributes.position.values[r]=s.z,i.attributes.position.values[r+1]=s.x,i.attributes.position.values[r+2]=s.y}f$Z.updateGeometry(i,void 0,n);var l=new f$Z;return l._geometry=i,l._bounds=f$Z.updateGeoBounds(i),l},_0x1a71e8.prototype._computeLayerModelBounds=function(){var e=new o$1p.fromRadians(this._layerBounds.west,this._layerBounds.south,0),t=new o$1p.fromRadians(this._layerBounds.west,this._layerBounds.north,0),i=new o$1p.fromRadians(this._layerBounds.east,this._layerBounds.south,0),n=new o$1p.fromRadians(this._layerBounds.east,this._layerBounds.north,0),r=[];r.push(e),r.push(t),r.push(i),r.push(n);var o=new p$1d;p$1d.inverse(this._matModel,o),this._layerModelBounds=new e$2c(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(var a=0;a<4;a++)p$1d.multiplyByPoint(o,r[a],r[a]),this._layerModelBounds.x=Math.min(r[a].x,this._layerModelBounds.x),this._layerModelBounds.y=Math.min(r[a].y,this._layerModelBounds.y),this._layerModelBounds.z=Math.max(r[a].x,this._layerModelBounds.z),this._layerModelBounds.w=Math.max(r[a].y,this._layerModelBounds.w)},_0x1a71e8.prototype._combineRegionBounds=function(e){for(var t=new e$2c(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),i=0;i<e.length;i++){var n=e[i]._bounds;t.x=Math.min(n.x,t.x),t.y=Math.min(n.y,t.y),t.z=Math.max(n.z,t.z),t.w=Math.max(n.w,t.w)}return t},_0x1a71e8.prototype.createRasterRegionDrawCommand=function(e,t,i,n){if(e$2e(t)&&!e$2e(t._command)){var r=new i$$({primitiveType:W$18.TRIANGLES});t._command=r;var o={position:0};r.vertexArray=c$13.fromGeometry({context:e,geometry:t._geometry,attributeLocations:o,bufferUsage:A$18.STATIC_DRAW,interleave:!0});var a=new s$V({sources:[_0x51e90e]});n==_0x2c45b2.Altitude?(a.defines.push("Mode_Height"),i.pixelDatatype===_$_.FLOAT&&a.defines.push("UseFloatTexture"),r.shaderProgram=r$14.fromCache({name:"RegionAltitudeSp",context:e,vertexShaderSource:_0x3d8f6e,fragmentShaderSource:a,attributeLocations:o})):n==_0x2c45b2.Texture?(a.defines.push("OVERLAY"),r.shaderProgram=r$14.fromCache({name:"RegionTextureSp",context:e,vertexShaderSource:_0x57c608,fragmentShaderSource:a,attributeLocations:o})):r.shaderProgram=r$14.fromCache({name:"RegionRasterSp",context:e,vertexShaderSource:_0x302e68,fragmentShaderSource:a,attributeLocations:o}),r.framebuffer=new t$V({context:e,colorTextures:[i],destroyAttachments:!1}),r.renderState=d$1m.fromCache({viewport:new f$1a(0,0,this._flattenTextureWidth,this._flattenTextureWidth)})}},_0x1a71e8.prototype.updateHypRegionFrameBuffer=function(e,t){if(this._hypsometricRegionUpdate){if(!e$2e(this._hypsometricRegion))return void(this._bUseHypRegion=!1);this._bUseHypRegion=!0,this._hypsometricRegionUpdate=!1;var i=new t$W({color:new e$1X(0,0,0,0),depth:1});i.framebuffer=new t$V({context:e,colorTextures:[this._hypsometricRenderTexture],destroyAttachments:!1}),i.renderState=d$1m.fromCache(),i.execute(e),this.createRasterRegionDrawCommand(e,this._hypsometricRegion,this._hypsometricRenderTexture,_0x2c45b2.Color);var n=this;this._hypsometricRegion._command.uniformMap={uRect:function(){return n._hypsometricBound}},this._hypsometricRegion._command.execute(e),i.framebuffer.destroy()}},_0x1a71e8.prototype.updateFlattenFrameBuffer=function(e,t){if(this._flattenUpdate){this._flattening=!0,this._flattenUpdate=!1,this._flattenBounds=this._combineRegionBounds(this._flattenRegions.values);var i=new t$W({color:new e$1X(0,0,0,0),depth:1});e$2e(this._flattenTexture)||(this._flattenTexture=new t$U({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$12.RGBA,pixelDatatype:this._context.floatingPointTexture?_$_.FLOAT:void 0})),i.framebuffer=new t$V({context:e,colorTextures:[this._flattenTexture],destroyAttachments:!1}),i.renderState=d$1m.fromCache(),i.execute(e);var n=this._flattenRegions.values.length;n<1&&(this._flattening=!1);for(var r=0;r<n;r++){var o=this._flattenRegions.values[r];this.createRasterRegionDrawCommand(e,o,this._flattenTexture,_0x2c45b2.Altitude);var a=this;o._command.uniformMap={uRect:function(){return a._flattenBounds}},o._command.execute(e)}i.framebuffer.destroy()}},_0x1a71e8.prototype.updateOverlayFrameBuffer=function(e,t){if(this._overlayUpdate){this._overlayUpdate=!1,this._overlayBounds=this._combineRegionBounds(this._overlayRegions.values),this._hasOverlay=this._overlayRegions.length>0;var i=new t$W({color:new e$1X(1,1,1,1),depth:1});i.framebuffer=new t$V({context:e,colorTextures:[this._overlayTexture],destroyAttachments:!1}),i.renderState=d$1m.fromCache(),i.execute(e);for(var n=this._overlayRegions.values.length,r=0;r<n;r++){var o=this._overlayRegions.values[r],a=this._overlayTextures.values[r];this.createRasterRegionDrawCommand(e,o,this._overlayTexture,_0x2c45b2.Texture),o._command.uniformMap=s(this._overlayBounds,a,o._bounds),o._command.execute(e)}i.framebuffer.destroy()}function s(e,t,i){return{uRect:function(){return e},uTexture:function(){return t},uSingleRegion:function(){return i}}}},_0x1a71e8.prototype._updateExcavationFrameBuffer=function(e,t){if(this._excavationUpdate){for(var i in t._framebufferList)i.indexOf("_excavationHeightLayer")>-1&&!e$2e(this._excavationRegions.get(i.slice(22)))&&(t._framebufferList[i]=!t._framebufferList[i].isDestroyed()&&t._framebufferList[i].destroy(),delete t._framebufferList[i]);var n=this._excavationRegions.values.length;this._hasExcavation=n>0,this._excavationUpdate=!1,this._excavationBounds=this._combineRegionBounds(this._excavationRegions.values);var r=this._serverExcavationRegions.values.length;if(this._hasServerExcavation=r>0,this._serverExcavationBounds=this._combineRegionBounds(this._serverExcavationRegions.values),0!=n||0!=r){var o=new t$W({color:new e$1X(0,0,0,0),depth:1});o.framebuffer=new t$V({context:e,colorTextures:[this._excavationTexture],destroyAttachments:!1}),o.renderState=d$1m.fromCache(),o.execute(e),b$V.createExcavationSideTexture(t,this),b$V.createExcavationBottomTexture(t,this);for(var a=0;a<n;a++){var s=this._excavationRegions.values[a];this.createRasterRegionDrawCommand(e,s,this._excavationTexture,_0x2c45b2.Color),e$2e(s.height)&&(b$V._createExcavationSideCommand(t,this,s),b$V._createExcavationBottomCommand(t,this,s));var l=this;s._command.uniformMap={uRect:function(){return l._excavationBounds}},s._command.execute(e)}for(var u=0;u<r;u++){s=this._serverExcavationRegions.values[u];this.createRasterRegionDrawCommand(e,s,this._excavationTexture,_0x2c45b2.Color),e$2e(s.height)&&(b$V._createExcavationSideCommand(t,this,s),b$V._createExcavationBottomCommand(t,this,s));l=this;s._command.uniformMap={uRect:function(){return l._serverExcavationBounds}},s._command.execute(e)}o.framebuffer.destroy()}}},_0x1a71e8.prototype.updateAllObjsVisible=function(e){this.traverseRenderEntity({layer:this,isVisible:e},_0x239d23)},_0x1a71e8.prototype.updateObjsTheme=function(){var e={layer:this};this.traverseRenderEntity(e,_0x1a1914)},_0x1a71e8.prototype.updateObjsColor=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x2f2515)},_0x1a71e8.prototype.updateExtendHeight=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x33aca7)},_0x1a71e8.prototype.removeExtendHeight=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x317b8a)},_0x1a71e8.prototype.removeAllExtendHeight=function(){this.traverseRenderEntity({},_0x1a976d)},_0x1a71e8.prototype.updateObjsOperation=function(e){var t={ids:e,offset:Math.max(Math.abs(this.selectedTranslate.x),Math.abs(this.selectedTranslate.y),Math.abs(this.selectedTranslate.z))};this.traverseRenderEntity(t,_0x4a54bc)},_0x1a71e8.prototype.refresh=function(){this._layerScheduler.refresh(),this.initialize()},_0x1a71e8.prototype.refreshVolume=function(){this._refreshVolume=!0},_0x1a71e8.prototype.clearCustomClipBox=function(){this.isRenderClipSection()&&this._context.numClampClipPlaneLayer--;for(var e=0,t=this._renderClipPlaneArray.values.length;e<t;e++)this._renderClipPlaneArray.values[e].destroy(),this._renderClipPlaneArray.values[e]=null;this._renderClipPlaneArray.removeAll(),this._clipping=!1;var i={layer:this,enable:!1};this.traverseRenderEntity(i,_0x17d53e),this._section=!1};var _0xc879f9=new a$18;function _0x243acb(e){return e===R$L.KeepOutside?j$Z.Disjoint:j$Z.Intersects}function _0x40e599(e,t){e.lightSourceChanged(t)}function _0x14db7e(e,t){e.updateShadow(t.layer)}function _0x17d53e(e,t){e.setCustomClipBox(t.layer,t.enable)}function _0x54ab03(e,t){e.enableAdjustColor(t)}function _0x567d8c(e,t){e.enableExcavation(t)}function _0x1070e5(e,t){e.disableExcavation(t)}function _0x11b6a1(e,t){e.enableServerExcavation(t)}function _0x5d6745(e,t){e.disableServerExcavation(t)}function _0x1bd9b5(e,t){e.enableFlatten(t)}function _0x3e3e7e(e,t){e.enableOverlay(t)}function _0x2da71f(e,t){e.disableOverlay(t)}function _0x3020ee(e,t){e.enableAjustTransparentBackColor(t)}function _0x599bbd(e,t){e.disableAjustTransparentBackColor(t)}function _0x2f1f1e(e,t){e.disableFlatten(t)}function _0xc784ce(e,t){e.enableHypsometric(t)}function _0xbff5a0(e,t){e.disableHypsometric(t)}function _0x50a49b(e,t){e.hasLightChange(t)}function _0x553e9d(e,t){e.skeletonSelectEnable(t)}function _0x1cc863(e,t){e.selectColorTypeChange(t)}function _0x72a589(e,t){e.mixColorTypeChange(t)}function _0x26857d(e,t){e.splitDirectionChange(t)}function _0x543584(e,t){e.swipeStateChange(t)}function _0x4fa236(e,t){e.PBRMaterialTypeChange(t)}function _0x93ed4(e,t){e.enableCategoryVisible(t)}function _0x1030ef(e,t){e.emissionTextureChange(t)}function _0x2c2177(e,t){e.enableTextureMove(t)}function _0x2c542a(e,t){e.enableTriangleFiltrate(t)}function _0x358acf(e,t){e.enableClipFilt(t)}function _0x333d89(e,t){e.enableFusionChange(t)}function _0x25702b(e,t){e.enableFlood(t)}function _0x15cbc8(e,t){e.disableFlood(t)}function _0x2a3c4e(e){for(var t=1;t<e;)t<<=1;return t}function _0x58a6f5(e,t){e.emissionTextureUnitChange(t)}function _0x4d4de9(e,t){var i=p$1d.multiply(e._geoMatrix,t.scaleMatrix,new p$1d);p$1d.multiply(t.layerMatrix,i,e._matModel),e._modelMatrixDirty=!0}function _0x5b4d78(e,t){e.pbrParameterChange(t)}function _0x5ea874(e,t){e.edgeWireFrameModeChange(t)}function _0x278a45(e,t){var i=t,n=i._PBRMaterialParams.baseUri;i._PBRMaterialParams=e.material,i._PBRMaterialParams.baseUri=n,i._loadMaterialTexture(i._PBRMaterialParams,n);var r=i._PBRMaterialParams.pbrMetallicRoughness,o=i._PBRMaterialParams.textureunitstates;if(e$2e(r.snowEffect)&&-1!==r.snowEffect.snowNormalTextureIndex){var a=n+o[r.snowEffect.snowNormalTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0xade8aa(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.snowEffect,"snowNormalTexture")}if(e$2e(r.snowEffect)&&-1!==r.snowEffect.snowMaskTextureIndex){a=n+o[r.snowEffect.snowMaskTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0xade8aa(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.snowEffect,"snowMaskTexture")}if(e$2e(r.rainEffect)&&-1!==r.rainEffect.rippleTextureIndex){a=n+o[r.rainEffect.rippleTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0xade8aa(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.rainEffect,"rippleTexture")}}function _0x4f0461(e,t){return e.find((e=>t.url.includes(e._fileName)))}function _0x3dbd12(e,t){e._historicalRecord.rootTiles.forEach((i=>{let n=_0x4f0461(e._layerScheduler._rootEntities,i);if(n){let a=i.History[t];if(!a||(a=a.replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,""),a==n._fileName))return;n._fileName=f$Q(a);for(var r=0;r<n._childrenPageLod.length;r++){var o=n._childrenPageLod[r];o=o&&!o.isDestroyed()&&o.destroy()}n._childrenPageLod.length=0,n.attributeBuffer=n.attributeBuffer&&!n.attributeBuffer.isDestroyed()&&n.attributeBuffer.destroy(),e._layerScheduler.LoadingPriority==_0x539352.UsePagedLodInfo&&n._isRootTile?(n._configReady=!1,n._configLoadState=N$Q.UNLOAD):(n._ready=!1,n._s3mLoadState=N$Q.UNLOAD)}}))}_0x1a71e8.prototype.setCustomClipBox=function(e){if(!((e=e||{}).dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$15("dimensions position is required to create CustomClipBox");if(this._clipMode=_0x577081.CLIP_BEHIND_ALL_PLANE,e$2e(e.clipMode))switch(e.clipMode){case"clip_behind_any_plane":this._clipMode=_0x577081.CLIP_BEHIND_ANY_PLANE;break;case"clip_behind_all_plane":this._clipMode=_0x577081.CLIP_BEHIND_ALL_PLANE;break;case"only_keep_line":this._clipMode=_0x577081.ONLY_KEEP_LINE}if(e.dimensions){var t=new p$1d,i=e.position,n=new i$16(e.heading||0,e.pitch||0,e.roll||0);t=m$19.headingPitchRollToFixedFrame(i,n,t$12.WGS84);var r=.5*e.dimensions.x,o=.5*e.dimensions.y,a=.5*e.dimensions.z,s=[];s[0]=new e$2c,s[0].x=-r,s[0].y=o,s[0].z=a,s[0].w=1,s[1]=new e$2c,s[1].x=r,s[1].y=o,s[1].z=a,s[1].w=1,s[2]=new e$2c,s[2].x=r,s[2].y=-o,s[2].z=a,s[2].w=1,s[3]=new e$2c,s[3].x=-r,s[3].y=-o,s[3].z=a,s[3].w=1,s[4]=new e$2c,s[4].x=-r,s[4].y=o,s[4].z=-a,s[4].w=1,s[5]=new e$2c,s[5].x=r,s[5].y=o,s[5].z=-a,s[5].w=1,s[6]=new e$2c,s[6].x=r,s[6].y=-o,s[6].z=-a,s[6].w=1,s[7]=new e$2c,s[7].x=-r,s[7].y=-o,s[7].z=-a,s[7].w=1;for(var l=0;l<8;l++)p$1d.multiplyByVector(t,s[l],s[l]);if(this._sceneMode!==C$14.SCENE3D){var u=new n$1d;for(l=0;l<8;l++){var c=s[l],h=a$18.fromCartesian(c,void 0,_0xc879f9),d=u.project(h,s[l]);p$1d.multiplyByPoint(_0x120895,d,s[l])}}this._oriClipPlane[0]=e$2c.clone(_0x5e87f9(s[0],s[1],s[2])),this._oriClipPlane[1]=e$2c.clone(_0x5e87f9(s[0],s[4],s[1])),this._oriClipPlane[2]=e$2c.clone(_0x5e87f9(s[0],s[3],s[4])),this._oriClipPlane[3]=e$2c.clone(_0x5e87f9(s[6],s[2],s[5])),this._oriClipPlane[4]=e$2c.clone(_0x5e87f9(s[6],s[7],s[2])),this._oriClipPlane[5]=e$2c.clone(_0x5e87f9(s[6],s[5],s[7]))}else for(l=0;l<e.planePos.length;l++){var f=e.planePos[l],p=e.planeNormal[l];this._oriClipPlane[l].x=p.x,this._oriClipPlane[l].y=p.y,this._oriClipPlane[l].z=p.z,this._oriClipPlane[l].w=-o$1p.dot(f,p)}if(!this._clipping){e={layer:this,enable:!0};this.traverseRenderEntity(e,_0x17d53e)}this._clipping=!0},_0x1a71e8.prototype.setClipSection=function(e,t,i,n){var r=u$Z(n,_0x1f23e7.NONE);if(this._clipPlaneMode!==r&&(r!==_0x1f23e7.NONE?this._context.numClampClipPlaneLayer++:this._context.numClampClipPlaneLayer--),this._clipPlaneMode=r,this.isRenderClipSection()){var o=this._renderClipPlaneArray.get(0);e$2e(o)||(o=new _0x597498(this),this._renderClipPlaneArray.set(0,o)),o.setPoints(e,t,i),this._section||this._context.numClampClipPlaneLayer++}},_0x1a71e8.prototype.setCustomClipPlane=function(e,t,i,n){if(this._sceneMode===C$14.COLUMBUS_VIEW&&(e=_0x2405e7(this,e),t=_0x2405e7(this,t),i=_0x2405e7(this,i)),this.setClipSection(e,t,i,n),this._oriClipPlane[0]=_0x5e87f9(e,t,i),this._clipMode=_0x577081.CLIP_BEHIND_ALL_PLANE,this._section=!0,!this._clipping){var r={layer:this,enable:!0};this.traverseRenderEntity(r,_0x17d53e)}this._clipping=!0},_0x1a71e8.prototype.setCustomClipGeometry=function(e){var t=(e=e||{}).geometry;this._spatialClipEnable=!0;var i=e.spatialQuery,n=e.clippingType;i.geometry=t,i.positionMode=_0x243acb(n),i._profile=!0,i._clipLayers.set(this.name,this),this._sqMode=i.positionMode,this._spatialQuery=i,this._clippingType=n},_0x1a71e8.prototype.clearCustomClipGeometry=function(){this._spatialClipEnable=!1},_0x1a71e8.prototype.setCustomClipCross=function(e){if(!(e=e||{}).dimensions||!e.position)throw new t$15("dimensions position is required to create CustomClipBox");this._clipMode=_0x577081.CLIP_BEHIND_ALL_PLANE;var t,i,n,r=new p$1d,o=e.position;t=e.heading||0,i=e.pitch||0,n=e.roll||0;var a,s,l,u=u$Z(e.extrudeDistance,.1),c=new i$16(e$2d.toRadians(t),e$2d.toRadians(i),e$2d.toRadians(n));if(this._sceneMode===C$14.SCENE3D)r=m$19.headingPitchRollToFixedFrame(o,c,t$12.WGS84);else{var h=_0x2405e7(this,o);p$1d.setTranslation(p$1d.clone(p$1d.IDENTITY),h,r);var d=p$1e.fromHeadingPitchRoll(c);p$1d.multiplyByMatrix3(r,d,r)}a=.5*e.dimensions.x,s=.5*e.dimensions.y,l=u;var f=[];f[0]=new e$2c,f[0].x=-a,f[0].y=s,f[0].z=l,f[0].w=1,f[1]=new e$2c,f[1].x=a,f[1].y=s,f[1].z=l,f[1].w=1,f[2]=new e$2c,f[2].x=a,f[2].y=-s,f[2].z=l,f[2].w=1,f[3]=new e$2c,f[3].x=-a,f[3].y=-s,f[3].z=l,f[3].w=1,f[4]=new e$2c,f[4].x=-a,f[4].y=s,f[4].z=-l,f[4].w=1,f[5]=new e$2c,f[5].x=a,f[5].y=s,f[5].z=-l,f[5].w=1,f[6]=new e$2c,f[6].x=a,f[6].y=-s,f[6].z=-l,f[6].w=1,f[7]=new e$2c,f[7].x=-a,f[7].y=-s,f[7].z=-l,f[7].w=1;for(var p=0;p<8;p++)p$1d.multiplyByVector(r,f[p],f[p]);this._oriClipPlane[0]=new e$2c(0,0,0,0),this._oriClipPlane[1]=e$2c.clone(_0x5e87f9(f[0],f[4],f[1])),this._oriClipPlane[2]=e$2c.clone(_0x5e87f9(f[0],f[3],f[4])),this._oriClipPlane[3]=e$2c.clone(_0x5e87f9(f[6],f[2],f[5])),this._oriClipPlane[4]=e$2c.clone(_0x5e87f9(f[6],f[7],f[2])),this._oriClipPlane[5]=e$2c.clone(_0x5e87f9(f[6],f[5],f[7])),this._clipping||this.traverseRenderEntity({layer:this,enable:!0},_0x17d53e),this._clipping=!0},_0x1a71e8.prototype.getClipRegion=function(){if(this._clipping){var e=o$1m.fromCartesian4(this._oriClipPlane[0]),t=this._layerBounds;if(e$2e(t)){var i=h$18.southwest(t),n=h$18.northwest(t),r=h$18.northeast(t),o=h$18.southeast(t);i=o$1p.fromRadians(i.longitude,i.latitude,i.height),n=o$1p.fromRadians(n.longitude,n.latitude,n.height),r=o$1p.fromRadians(r.longitude,r.latitude,r.height),o=o$1p.fromRadians(o.longitude,o.latitude,o.height);var a=new o$1p(0,0,0),s=o$1p.normalize(i,new o$1p),l=o$1p.normalize(n,new o$1p),u=o$1p.normalize(r,new o$1p),c=o$1p.normalize(o,new o$1p),h=new f$19(a,s),d=new f$19(a,l),f=new f$19(a,u),p=new f$19(a,c),_=g$1j.rayPlane(h,e),m=g$1j.rayPlane(d,e),g=g$1j.rayPlane(f,e),x=g$1j.rayPlane(p,e);if(e$2e(_)&&e$2e(m)&&e$2e(g)&&e$2e(x))return{polygon:{hierarchy:[_,m,g,x],material:e$1X.WHITE.withAlpha(.5),perPositionHeight:!0}}}}},_0x1a71e8.prototype.addWaterPlane=function(e){if(!(e=e||{}).boundingVolume)throw new t$15("position radius distance is required to add the plane");this._waterPlanes=this._waterPlanes?this._waterPlanes:new e$1Q;var t=this._waterPlanes.length;return this._waterPlanes.set(t,e),t},_0x1a71e8.prototype.removeWaterPlane=function(e){this._waterPlanes.remove(e)},_0x1a71e8.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x1a71e8.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~3");return 1<<e&this._visibleViewport},_0x1a71e8.prototype.setFlattenRegionVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._flattenVisibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x1a71e8.prototype.updateShadow=function(){var e={layer:this};this.traverseRenderEntity(e,_0x14db7e)},_0x1a71e8.prototype.isSilhouette=function(){return this._selectColorType===Zr$3.SILHOUETTE||this._selectColorType===Zr$3.ALWAYS_SHOW_SILHOUETTE},_0x1a71e8.prototype.isRenderClipSection=function(){return this._clipPlaneMode!==_0x1f23e7.NONE},_0x1a71e8.prototype.bloomEnableChange=function(e){e?this._context.numPostEffectFilterObject++:this._context.numPostEffectFilterObject--},_0x1a71e8.prototype.lightSourceChanged=function(e){this.traverseRenderEntity({changedList:e,layer:this},_0x40e599)},_0x1a71e8.prototype.getAttributesById=function(e){if(0!==parseInt(e)&&!parseInt(e))throw new t$15("id must be a number!");return this._layerScheduler.getAttributesById(e)},_0x1a71e8.prototype.traverseRenderEntity=function(e,t){this._layerScheduler.traverseRenderEntity(e,t)},_0x1a71e8.prototype.isDestroyed=function(){return!1},_0x1a71e8.prototype.destroy=function(){this.residentRootTile=!1,this.clearMemoryImmediately=!0,e$2e(this._layerScheduler)&&(this._layerScheduler.destroy(),this._layerScheduler=null);for(var e=0;e<this._flattenRegions.values.length;e++)this._flattenRegions.values[e].destroy(),this._flattenRegions.values[e]=null;this._flattenRegions.removeAll(),delete this._flattenBounds,this._flattenBounds=null,e$2e(this._flattenTexture)&&(this._flattenTexture.destroy(),this._flattenTexture=null);for(var t=Object.keys(this._excavationRegions._hash),i=(e=0,t.length);e<i;e++){var n=t[e];this._excavationRegions.get(n).destroy(),this._removeExcavationCommands(n)}if(this._excavationRegions.removeAll(),delete this._excavationBounds,this._excavationBounds=null,e$2e(this._excavationTexture)&&(this._excavationTexture.destroy(),this._excavationTexture=null),e$2e(this._excavationSideTexture)&&(this._excavationSideTexture.destroy(),this._excavationSideTexture=null),e$2e(this._excavationBottomTexture)&&(this._excavationBottomTexture.destroy(),this._excavationBottomTexture=null),e$2e(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),e$2e(this._hypsometricRenderTexture)&&(this._hypsometricRenderTexture.destroy(),this._hypsometricRenderTexture=null),e$2e(this._hypsometricSetting)&&(this._hypsometricSetting.destroy(),this._hypsometricSetting=null),e$2e(this._hypsometricRegion)&&(this._hypsometricRegion.destroy(),this._hypsometricRegion=null),e$2e(this._noiseMapTexture)&&(this._noiseMapTexture.destroy(),this._noiseMapTexture=null),e$2e(this._pbrMetalTexture)&&(this._pbrMetalTexture.destroy(),this._pbrMetalTexture=null),e$2e(this._pbrRoughTexture)&&(this._pbrRoughTexture.destroy(),this._pbrRoughTexture=null),this._fileType===p$T.ClampGroundRealtimeRasterCache&&this.refreshRaster(),e$2e(this._spatialQuery)&&e$2e(this._spatialQuery._clipLayers)&&this._spatialQuery._clipLayers.remove(this.name),e$2e(this._commonLayerUniformBuffer)&&(this._commonLayerUniformBuffer.destroy(),this._commonLayerUniformBuffer=null),e$2e(this._materialMap))for(var r in this._materialMap)if(this._materialMap.hasOwnProperty(r)){var o=this._materialMap[r].material.pbrMetallicRoughness;if(!e$2e(o))continue;e$2e(o.baseColorTexture)&&o.baseColorTexture.destroy(),e$2e(o.normalTexture)&&o.normalTexture.destroy(),e$2e(o.emissiveTexture)&&o.emissiveTexture.destroy(),e$2e(o.metallicRoughnessTexture)&&o.metallicRoughnessTexture.destroy(),e$2e(o.occlusionTexture)&&o.occlusionTexture.destroy()}if(e$2e(this._spatialQuery)&&e$2e(this._spatialQuery._clipLayers)&&this._spatialQuery._clipLayers.remove(this.name),e$2e(this.instanceSkeletonManager)){for(var r in this.instanceSkeletonManager.skeletons._hash)this.instanceSkeletonManager.skeletons._hash.hasOwnProperty(r)&&this.instanceSkeletonManager.remove(r);this.instanceSkeletonManager=void 0}return e$2e(this._layerUBO)&&(this._layerUBO.destroy(),this._layerUBO=null),i$11(this)},_0x1a71e8.prototype.setVolume=function(e){if(!(e$2e(e.values)&&e$2e(e.width)&&e$2e(e.height)&&e$2e(e.depth)&&e$2e(e.maxValue)&&e$2e(e.minValue)&&e$2e(e.maxHeight)&&e$2e(e.minHeight)&&e$2e(e.bounds)))throw new t$15("invalid volume object");this._volData={};var t=e.width,i=e.height,n=e.depth,r=Math.ceil(Math.sqrt(n));this._volData._nSideBlockCount=r;var o=Math.max(t,i)+2;this._volData._nBlockLength=o;var a=_0x2a3c4e(o*r-2);this._volData._nLength=a;var s=e.maxValue,l=e.minValue;this._volData._maxValue=s,this._volData._minValue=l,this._volData._width=t,this._volData._height=i,this._volData._depth=n;var u=e.bounds.leftBottom.x,c=e.bounds.rightTop.y,h=e.bounds.rightTop.x,d=e.bounds.leftBottom.y;this._volData._volBounds={left:u,top:c,right:h,bottom:d,minHeight:e.minHeight,maxHeight:e.maxHeight,width:h-u,length:c-d,height:e.maxHeight-e.minHeight};var f=a*a,p=new Array(f);p.fill(-1);for(var _=s-l,m=0;m<n;m++)for(var g=parseInt(m/r)*o,x=m%r*o,y=0;y<o-2;y++)for(var v=0;v<o-2;v++){var $=Math.min(v,t-1),b=m*i*t+(i-1-Math.min(y,i-1))*t+$,T=e.values[b];new e$2c(0,0,0,0),-9999!=T&&(T=(T-l)/_,p[b=(g+y)*a+x+v]=T)}var C=new Float32Array(p,0,f);this._volData._buffer=new Uint8Array(C.buffer,0,4*f),this._fMaxValue=s,this._fMinValue=l},_0x1a71e8.prototype._setSQTextures=function(e){this._sqTextures=e},_0x1a71e8.prototype._setSQViewPrjMatrix=function(e,t){this._sqViewMatirx=e,this._sqPrjMatirx=t},_0x1a71e8.prototype._setSQMode=function(e){this._sqMode=e},_0x1a71e8.prototype._updateEdgeDistanceFalloffFactor=function(){0!=this._edgeCurrentCount?(this._edgeDistanceFalloffFactor=this._edgeCurrentTotalLength/this._edgeCurrentCount*40,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0):this._edgeCurrentTotalLength=0},_0x1a71e8.prototype._addRenderedEdge=function(e,t){this._edgeCurrentTotalLength+=e,this._edgeCurrentCount+=t},_0x1a71e8.prototype.setTextureEmissive=function(e){if(e!==this.textureEmissionUnit){this.textureEmissionUnit=e;var t={enable:!0};t.layer=this,this.traverseRenderEntity(t,_0x58a6f5)}},_0x1a71e8.prototype.setPBRMaterial=function(e){LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_setPBRMaterial");var t=this._pbrParameter;if(this._pbrParameter|=e,t!==this._pbrParameter){var i={enable:!0};i.layer=this,this.traverseRenderEntity(i,_0x5b4d78)}},_0x1a71e8.prototype.setPBRMaterialFromJSON=function(e){if(LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_setPBRMaterial"),this._pbrParameter===Xe$e.NONE){var t=this,i="string"==typeof e;t._PBRMaterialParams.baseUri=i?i$1b(e):"",i?u$P(e).then((function(e){_0x278a45(e,t)})):_0x278a45(e,t),this._usePBR=!0}},_0x1a71e8.prototype._updatePBRMaterial=function(){if(e$2e(this._PBRMaterialParams)&&e$2e(this._PBRMaterialParams.pendingTextureCount)&&this._PBRMaterialParams.pendingTextureCount===this._PBRMaterialParams.readyTextureCount){var e={enable:!0};e.layer=this,this.traverseRenderEntity(e,_0x5b4d78),this._PBRMaterialParams.loadingTexture=!1}},_0x1a71e8.prototype.removePBRMaterial=function(){var e=this._PBRMaterialParams.pbrMetallicRoughness;for(var t in e)e.hasOwnProperty(t)&&e[t]instanceof t$U&&e[t].destroy();this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:0,baseColor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:o$1p.ZERO,emissiveTextureIndex:-1,occlusionTextureIndex:-1,metallicRoughnessTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0,intensityScale:1,snowEffect:void 0,rainEffect:void 0},loadingTexture:void 0},this._usePBR=!1;var i={enable:!0};i.layer=this,this.traverseRenderEntity(i,_0x5b4d78)},_0x1a71e8.prototype.setExtrudedPolygons=function(e,t){this._layerScheduler._extrudedId=e,this._layerScheduler._polygons=t},_0x1a71e8.prototype._initEdgeTexture=function(){var e=[1,256,65536,16777216];function t(t,i,n){var r,o,a,s;n=u$Z(n,0),r=t,o=0,a=1,t=Math.min(Math.max(r,o),a);for(var l=0;l<4;l++)i[n+l]=Math.floor(256*((s=t*e[l])-Math.floor(s)))}const i=8,n=256,r=[{distance:[-1.59027,-1.59426,-1.59674,-1.59766,-1.59702,-1.59479,-1.59095,-1.5855,-1.57843,-1.56973,-1.55942,-1.5475,-1.53398,-1.5189,-1.50226,-1.4841,-1.46446,-1.44337,-1.42088,-1.39703,-1.37188,-1.34547,-1.31786,-1.28912,-1.2593,-1.22847,-1.19668,-1.16402,-1.13053,-1.09629,-1.06137,-1.02582,-.98972,-.95313,-.91611,-.87872,-.84102,-.80306,-.76488,-.72654,-.68807,-.64952,-.61092,-.57232,-.53375,-.49527,-.45692,-.41874,-.38078,-.34309,-.3057,-.26867,-.23204,-.19585,-.16015,-.12497,-.09036,-.05634,-.02296,.00977,.04183,.07321,.10389,.13386,.16313,.19169,.21956,.24672,.27321,.299,.32413,.34858,.37237,.3955,.41798,.43981,.461,.48154,.50145,.52073,.53939,.55744,.57488,.5917,.6079,.62347,.63837,.65259,.66609,.67885,.69083,.70201,.71235,.72183,.73042,.73812,.7449,.75076,.7557,.75973,.76284,.76507,.76642,.76692,.76659,.76545,.76352,.76083,.7574,.75324,.74837,.74279,.73652,.72959,.72199,.71377,.70493,.69553,.68558,.67515,.66426,.65298,.64135,.62944,.6173,.60499,.59257,.58008,.56759,.55513,.54275,.5305,.51842,.50654,.4949,.48353,.47246,.4617,.45128,.44121,.43149,.42213,.41313,.40448,.39617,.38818,.3805,.37309,.36594,.35902,.35229,.34572,.33927,.33292,.32663,.32035,.31407,.30774,.30135,.29486,.28824,.28148,.27454,.26739,.26002,.25241,.24454,.23639,.22796,.21922,.21016,.20076,.19098,.18082,.17023,.1592,.14768,.13566,.1231,.10996,.09624,.08188,.06688,.05121,.03485,.01778,0,-.0185,-.03771,-.05763,-.07824,-.09952,-.12144,-.14396,-.16706,-.19069,-.21481,-.23938,-.26436,-.28971,-.31539,-.34136,-.36759,-.39404,-.42067,-.44746,-.47437,-.50136,-.52839,-.55544,-.58248,-.60948,-.63642,-.66329,-.6901,-.71684,-.74352,-.77015,-.79675,-.82332,-.84988,-.87644,-.90301,-.92958,-.95615,-.98272,-1.00926,-1.03575,-1.06217,-1.08847,-1.11463,-1.1406,-1.16633,-1.19178,-1.2169,-1.24164,-1.26595,-1.28979,-1.31312,-1.3359,-1.35809,-1.37963,-1.4005,-1.42064,-1.44,-1.45853,-1.47616,-1.49285,-1.50853,-1.52313,-1.53659,-1.54886,-1.55986,-1.56955,-1.57788,-1.5848],pressure:[-.01365,-.00206,.01025,.02327,.03696,.05129,.06619,.08163,.09755,.11393,.1307,.14784,.16531,.18308,.20111,.21938,.23786,.25651,.2753,.29419,.31315,.33215,.35115,.37015,.38913,.40806,.42694,.44576,.46449,.48313,.50167,.5201,.53839,.55653,.57448,.59222,.60971,.62692,.6438,.66033,.67648,.69221,.70753,.72242,.73688,.75093,.76456,.77779,.79063,.80309,.81517,.82686,.83817,.84911,.85967,.86987,.87972,.88924,.89845,.90734,.91594,.92425,.93229,.94005,.94754,.95475,.96166,.96826,.97451,.9804,.98588,.99092,.99549,.99957,.99685,.99381,.99131,.98936,.98796,.98711,.98681,.98706,.98787,.98923,.99113,.99357,.99654,1,.99607,.99171,.98695,.98181,.97634,.97057,.96452,.95824,.95175,.94506,.93818,.93113,.92389,.91647,.90887,.90109,.89314,.88501,.87672,.86831,.85978,.85119,.84256,.83393,.82533,.8168,.80836,.80002,.79181,.78374,.77582,.7681,.76059,.75331,.74629,.73955,.73311,.72697,.72116,.71568,.71054,.70572,.70121,.697,.69304,.68931,.68576,.68236,.67905,.67582,.67262,.66941,.66619,.66291,.65957,.65613,.65259,.64892,.6451,.6411,.6369,.63248,.62783,.62295,.61783,.61247,.60688,.60104,.59498,.58868,.58216,.57542,.56845,.56125,.5538,.5461,.53813,.52986,.52129,.51239,.50316,.49359,.4837,.47349,.46299,.45223,.44124,.43005,.41869,.40719,.39557,.38386,.37207,.36023,.34836,.33648,.32464,.31287,.30119,.28963,.27822,.26698,.25594,.2451,.23448,.22409,.21391,.20394,.19415,.18452,.17503,.16565,.15636,.14713,.13794,.1288,.11968,.11058,.10151,.09247,.08346,.07447,.06552,.05659,.0477,.03885,.03007,.02137,.01278,.00433,-.00393,-.012,-.01983,-.02738,-.03463,-.04155,-.0481,-.05429,-.0601,-.06553,-.07057,-.07524,-.07954,-.08347,-.08703,-.09022,-.09303,-.09544,-.09744,-.09898,-.10004,-.10059,-.1006,-.10005,-.09892,-.0972,-.09487,-.09192,-.08833,-.08409,-.07918,-.07357,-.06724,-.06019,-.0524,-.04386,-.03455,-.02448]},{distance:[-3.46259,-3.47131,-3.47668,-3.47863,-3.47712,-3.4721,-3.46352,-3.45138,-3.43566,-3.41635,-3.39347,-3.36704,-3.33709,-3.30368,-3.26684,-3.22667,-3.18322,-3.1366,-3.08689,-3.0342,-2.97865,-2.92036,-2.85946,-2.79607,-2.73034,-2.66241,-2.59242,-2.52052,-2.44686,-2.37159,-2.29485,-2.2168,-2.13757,-2.05731,-1.97616,-1.89426,-1.81174,-1.72875,-1.64543,-1.56191,-1.47833,-1.39483,-1.3115,-1.22847,-1.14581,-1.06361,-.98193,-.90083,-.82036,-.74054,-.66141,-.583,-.50532,-.4284,-.35228,-.277,-.20261,-.12916,-.05672,.01463,.08485,.15384,.22153,.28784,.35269,.41602,.47776,.53787,.59629,.653,.70799,.76123,.81274,.86253,.9106,.95698,1.0017,1.04477,1.0862,1.126,1.16415,1.20065,1.23546,1.26857,1.29994,1.32953,1.35731,1.38321,1.40719,1.42921,1.44922,1.46719,1.48309,1.49691,1.50862,1.51825,1.52581,1.53133,1.53486,1.53644,1.53616,1.53409,1.53031,1.52493,1.51803,1.50972,1.50009,1.48924,1.47725,1.46421,1.45019,1.43527,1.4195,1.40295,1.38568,1.36778,1.34929,1.3303,1.31087,1.29108,1.27099,1.25066,1.23018,1.2096,1.18898,1.16838,1.14785,1.12745,1.10721,1.08719,1.06741,1.04791,1.02871,1.00986,.99136,.97324,.95551,.93819,.92127,.90476,.88866,.87296,.85767,.84277,.82823,.81406,.80022,.7867,.77346,.76049,.74774,.73519,.72278,.71049,.69827,.68606,.67381,.66145,.64893,.63618,.62313,.60973,.5959,.5816,.56675,.5513,.53516,.51826,.50053,.4819,.46231,.44169,.42002,.39725,.37336,.34834,.32219,.2949,.2665,.23698,.20638,.17469,.14193,.10809,.07316,.03714,0,-.03827,-.07772,-.11836,-.16022,-.20332,-.24768,-.29332,-.34024,-.38844,-.43788,-.48854,-.54036,-.59329,-.64724,-.70211,-.75782,-.81425,-.87128,-.92881,-.98674,-1.04498,-1.10346,-1.1621,-1.22086,-1.27969,-1.33854,-1.3974,-1.45625,-1.51511,-1.57396,-1.63283,-1.69173,-1.75067,-1.80968,-1.86875,-1.9279,-1.98712,-2.04639,-2.10568,-2.16495,-2.22416,-2.28322,-2.34208,-2.40063,-2.4588,-2.51647,-2.57354,-2.62989,-2.68543,-2.74002,-2.79357,-2.84597,-2.89711,-2.94689,-2.99521,-3.04195,-3.087,-3.13023,-3.17152,-3.21075,-3.24779,-3.28252,-3.3148,-3.34451,-3.37154,-3.39577,-3.41709,-3.43539,-3.45059],pressure:[.87183,.87151,.87129,.87118,.87117,.87128,.87149,.87182,.87225,.8728,.87347,.87424,.87513,.87613,.87723,.87845,.87978,.88122,.88276,.88441,.88616,.88801,.88996,.892,.89414,.89637,.89868,.90108,.90356,.90611,.90874,.91144,.91421,.91704,.91993,.92287,.92587,.92892,.93201,.93514,.93831,.94151,.94474,.94799,.95126,.95456,.95786,.96118,.9645,.96783,.97116,.97448,.9778,.98111,.98441,.9877,.99096,.99421,.99742,.99938,.99622,.9931,.99001,.98697,.98397,.98101,.97811,.97526,.97246,.96972,.96703,.96441,.96185,.95935,.95691,.95455,.95225,.95002,.94786,.94577,.94376,.94182,.93995,.93817,.93646,.93483,.93328,.93181,.93042,.92911,.92788,.92673,.92566,.92467,.92376,.92293,.92217,.92149,.92088,.92034,.91987,.91947,.91913,.91886,.91864,.91849,.91838,.91833,.91834,.91839,.91849,.91863,.91883,.91907,.91935,.91968,.92005,.92046,.92092,.92142,.92195,.92253,.92314,.9238,.92449,.92521,.92598,.92677,.9276,.92847,.92936,.93029,.93125,.93224,.93325,.9343,.93537,.93646,.93758,.93872,.93988,.94106,.94225,.94346,.94469,.94593,.94718,.94844,.94971,.95098,.95226,.95354,.95482,.9561,.95738,.95867,.95995,.96122,.9625,.96377,.96504,.9663,.96757,.96883,.97009,.97135,.97261,.97387,.97513,.9764,.97767,.97895,.98023,.98153,.98284,.98416,.98549,.98684,.98821,.9896,.99101,.99244,.99389,.99537,.99688,.99842,1,.99839,.99675,.99508,.99336,.99161,.98982,.98799,.98613,.98422,.98228,.98029,.97827,.97622,.97414,.97202,.96987,.9677,.96551,.9633,.96107,.95882,.95656,.9543,.95202,.94975,.94747,.94519,.94292,.94065,.93838,.93613,.93388,.93164,.92941,.9272,.92499,.9228,.92062,.91846,.91631,.91418,.91207,.90998,.90792,.90588,.90387,.90189,.89995,.89804,.89617,.89434,.89256,.89083,.88914,.88752,.88595,.88443,.88299,.88161,.8803,.87907,.87791,.87683,.87584,.87494,.87412,.8734,.87278,.87225]},{distance:[.39335,.43437,.47737,.52234,.56923,.61801,.66864,.72109,.7753,.83123,.88882,.94801,1.00875,1.07097,1.13461,1.1996,1.26586,1.33333,1.40193,1.47158,1.54221,1.61373,1.68607,1.75913,1.83284,1.90711,1.98186,2.05699,2.13243,2.20809,2.28387,2.35971,2.4355,2.51117,2.58663,2.66179,2.73658,2.81092,2.88473,2.95792,3.03043,3.10217,3.17308,3.24309,3.31211,3.3801,3.44697,3.51267,3.57712,3.64028,3.70208,3.76247,3.8214,3.87881,3.93467,3.98892,4.04152,4.09244,4.14164,4.18908,4.23474,4.27859,4.32061,4.36077,4.39905,4.43544,4.46992,4.50249,4.53314,4.56185,4.58864,4.61349,4.63642,4.65745,4.67657,4.69381,4.7092,4.72274,4.73447,4.74441,4.75259,4.75903,4.76376,4.76682,4.76822,4.768,4.76618,4.76279,4.75786,4.75142,4.74348,4.73409,4.72326,4.71102,4.69739,4.68241,4.6661,4.64849,4.6296,4.60948,4.58816,4.56567,4.54204,4.51732,4.49154,4.46473,4.43694,4.4082,4.37854,4.348,4.31662,4.28443,4.25145,4.21773,4.1833,4.14819,4.11243,4.07606,4.03912,4.00162,3.96361,3.92512,3.88618,3.84683,3.80708,3.76697,3.72653,3.68579,3.64478,3.60351,3.56202,3.52033,3.47845,3.43642,3.39425,3.35196,3.30957,3.2671,3.22455,3.18196,3.13933,3.09668,3.05402,3.01136,2.96873,2.92613,2.88357,2.84108,2.79865,2.75631,2.71407,2.67195,2.62994,2.58807,2.54634,2.50477,2.46338,2.42216,2.38114,2.34032,2.29971,2.25933,2.21916,2.17923,2.13954,2.10008,2.06087,2.02189,1.98316,1.94468,1.90644,1.86845,1.83069,1.79316,1.75586,1.71877,1.68189,1.6452,1.60868,1.57232,1.53611,1.50004,1.46407,1.4282,1.39241,1.35668,1.321,1.28535,1.24972,1.2141,1.17849,1.14286,1.10723,1.07158,1.03593,1.00028,.96464,.92902,.89344,.85793,.8225,.78719,.75203,.71705,.68231,.64784,.61369,.57991,.54656,.51368,.48134,.44959,.41849,.3881,.35848,.32967,.30174,.27474,.24872,.22373,.19982,.17702,.15539,.13497,.11579,.09791,.08137,.06621,.05248,.04022,.02948,.02029,.01271,.00677,.00252,0,-76e-5,27e-5,.00314,.00788,.01451,.02307,.03357,.04604,.0605,.07697,.09546,.11599,.13858,.16322,.18992,.21869,.24952,.28241,.31735,.35434],pressure:[.95248,.95236,.95228,.95223,.95222,.95224,.95231,.95241,.95256,.95274,.95296,.95322,.95352,.95385,.95423,.95465,.9551,.9556,.95613,.9567,.95731,.95796,.95864,.95936,.96012,.96091,.96173,.96259,.96348,.9644,.96535,.96633,.96734,.96838,.96944,.97053,.97164,.97277,.97393,.9751,.97629,.9775,.97873,.97997,.98122,.98249,.98376,.98505,.98634,.98763,.98893,.99023,.99154,.99284,.99414,.99544,.99673,.99802,.9993,.99942,.99816,.99691,.99568,.99445,.99324,.99205,.99087,.98972,.98858,.98746,.98636,.98528,.98423,.9832,.98219,.98121,.98025,.97931,.9784,.97752,.97666,.97582,.97501,.97423,.97347,.97274,.97203,.97135,.9707,.97007,.96948,.9689,.96836,.96784,.96735,.96689,.96646,.96605,.96567,.96533,.965,.96471,.96445,.96421,.964,.96382,.96367,.96355,.96346,.96339,.96335,.96334,.96336,.9634,.96348,.96358,.9637,.96385,.96403,.96423,.96446,.96471,.96499,.96529,.96561,.96595,.96631,.96669,.96709,.96751,.96795,.9684,.96887,.96935,.96984,.97035,.97087,.9714,.97194,.97249,.97304,.97361,.97418,.97476,.97534,.97592,.97651,.97711,.9777,.9783,.9789,.9795,.9801,.9807,.9813,.9819,.9825,.98309,.98369,.98428,.98486,.98545,.98603,.98661,.98718,.98775,.98832,.98888,.98944,.99,.99056,.99112,.99167,.99223,.99279,.99335,.99392,.99449,.99507,.99565,.99624,.99684,.99745,.99807,.9987,.99934,1,.99933,.99866,.99797,.99727,.99656,.99583,.9951,.99435,.99359,.99283,.99205,.99126,.99046,.98966,.98885,.98803,.9872,.98637,.98554,.9847,.98387,.98303,.98219,.98134,.9805,.97967,.97883,.978,.97717,.97634,.97552,.97471,.97389,.97309,.97229,.9715,.97071,.96993,.96915,.96838,.96762,.96687,.96612,.96539,.96466,.96395,.96324,.96255,.96187,.9612,.96055,.95991,.95929,.95869,.95811,.95754,.957,.95648,.95599,.95552,.95508,.95467,.95428,.95393,.9536,.95331,.95305,.95283,.95264]},{distance:[2.85606,2.86149,2.86432,2.8645,2.862,2.85686,2.84912,2.83886,2.82618,2.81117,2.79393,2.77456,2.75314,2.72975,2.70447,2.67734,2.64844,2.61784,2.58564,2.55196,2.5169,2.48057,2.44305,2.40438,2.36462,2.32383,2.28208,2.23943,2.19591,2.15153,2.10628,2.06016,2.01321,1.96548,1.91702,1.86793,1.8183,1.76829,1.71803,1.66767,1.61737,1.56726,1.51746,1.46803,1.41902,1.37044,1.32228,1.27452,1.22716,1.18023,1.13376,1.08781,1.04244,.99769,.95357,.91003,.86701,.82447,.78238,.74069,.69938,.65836,.61758,.57699,.53656,.49627,.45611,.41611,.37632,.33683,.29776,.25924,.22141,.18441,.14839,.11346,.07972,.04727,.01619,-.01348,-.0417,-.0684,-.09351,-.11698,-.13875,-.1588,-.17713,-.19381,-.20889,-.22242,-.23444,-.24501,-.25421,-.26216,-.26897,-.27473,-.27951,-.28336,-.28631,-.28836,-.28948,-.28963,-.28873,-.28673,-.28355,-.27916,-.27354,-.26673,-.25878,-.2498,-.23992,-.22929,-.21802,-.20623,-.19398,-.18134,-.16836,-.1551,-.14163,-.12809,-.11461,-.1013,-.08826,-.07557,-.06335,-.0517,-.04077,-.03065,-.02143,-.01321,-.00606,0,.00496,.00888,.01181,.01385,.01511,.0157,.01574,.01533,.01458,.01358,.0124,.01112,.00979,.00851,.00738,.0065,.006,.00596,.00646,.00754,.00924,.01161,.01471,.01858,.02323,.02865,.03481,.04169,.0493,.05765,.06677,.07671,.08754,.09934,.11222,.12628,.14159,.15823,.17624,.19561,.21632,.23828,.26142,.28563,.31083,.33696,.36397,.39185,.42057,.4501,.48036,.51125,.54264,.5744,.60646,.63871,.67105,.70337,.73556,.76751,.79918,.83048,.86139,.8919,.92202,.95184,.98144,1.01094,1.04045,1.0701,1.10002,1.13029,1.16103,1.1923,1.22416,1.25664,1.28979,1.32364,1.35824,1.39363,1.42985,1.4669,1.50475,1.54332,1.58252,1.62227,1.6625,1.70312,1.744,1.78501,1.82598,1.8668,1.90734,1.94754,1.98732,2.02666,2.06555,2.10402,2.1421,2.17985,2.2173,2.25448,2.29139,2.328,2.36424,2.4,2.43515,2.46955,2.50309,2.53565,2.56717,2.59761,2.62692,2.65505,2.68191,2.7074,2.73138,2.75375,2.7744,2.79324,2.81017,2.82504,2.83772,2.8481],pressure:[.22758,.23641,.24578,.25568,.26609,.27699,.28835,.30016,.31237,.32495,.33789,.35113,.36466,.37843,.39241,.40658,.4209,.43535,.44989,.4645,.47916,.49385,.50853,.5232,.53784,.55243,.56696,.58141,.59578,.61004,.62419,.63821,.65209,.6658,.67934,.69268,.70582,.71873,.73139,.7438,.75594,.76779,.77935,.79061,.80156,.81221,.82254,.83258,.84231,.85176,.86091,.86978,.87837,.88669,.89473,.9025,.91,.91725,.92425,.931,.93752,.9438,.94985,.95566,.96124,.96658,.97168,.97652,.98109,.98539,.98939,.99309,.99646,.99949,.99783,.99552,.99361,.99209,.99098,.99029,.99003,.99019,.99079,.99181,.99324,.9951,.99735,1,.99698,.99361,.98992,.98592,.98163,.97709,.97231,.96731,.96212,.95676,.95122,.94554,.93973,.93378,.92773,.92157,.91532,.90899,.90258,.89612,.88961,.88308,.87653,.87,.8635,.85705,.85068,.8444,.83823,.83219,.82628,.82052,.81493,.80952,.8043,.79929,.7945,.78994,.78561,.78151,.77765,.77402,.77062,.76742,.76443,.76161,.75896,.75645,.75406,.75175,.74951,.7473,.74511,.74289,.74064,.73833,.73592,.73341,.73078,.728,.72507,.72197,.71869,.71522,.71156,.70769,.70363,.69936,.69489,.69021,.68533,.68023,.67492,.66939,.66363,.65765,.65145,.64501,.63833,.63143,.62428,.61691,.60931,.60148,.59344,.58521,.57679,.5682,.55948,.55063,.54167,.53264,.52354,.51439,.50522,.49603,.48686,.47773,.46865,.45964,.45072,.44192,.43324,.42469,.41629,.40804,.39994,.392,.3842,.37655,.36903,.36164,.35437,.3472,.34012,.33312,.3262,.31933,.31251,.30574,.299,.2923,.28563,.27899,.27239,.26583,.25933,.25288,.24652,.24025,.2341,.22808,.22221,.21653,.21104,.20576,.20072,.19592,.19138,.18712,.18313,.17943,.17602,.17292,.17013,.16766,.16551,.16369,.16222,.1611,.16036,.16001,.16007,.16055,.16148,.16286,.16471,.16705,.16988,.17321,.17706,.18144,.18636,.19182,.19785,.20443,.21158,.2193]},{distance:[-2.31317,-2.3191,-2.32189,-2.32154,-2.31811,-2.31174,-2.30254,-2.29062,-2.27609,-2.25904,-2.23954,-2.21767,-2.19355,-2.16732,-2.13907,-2.10885,-2.07672,-2.04268,-2.00677,-1.96911,-1.92985,-1.88914,-1.84713,-1.80397,-1.75979,-1.71467,-1.66864,-1.62171,-1.57395,-1.52546,-1.47625,-1.42628,-1.3755,-1.32384,-1.27131,-1.218,-1.16408,-1.10972,-1.05508,-1.00031,-.94551,-.89077,-.83615,-.7817,-.72757,-.6739,-.62076,-.56821,-.51625,-.46484,-.41397,-.36366,-.314,-.26506,-.21689,-.16957,-.12316,-.07766,-.03301,.01085,.05399,.09643,.13827,.17967,.22079,.26176,.30265,.34342,.38397,.42414,.46381,.50285,.54115,.57863,.61524,.65093,.6856,.71914,.75153,.78275,.81283,.84182,.86972,.89651,.92208,.94634,.96919,.99052,1.01025,1.02835,1.04484,1.05976,1.07309,1.08479,1.09492,1.1036,1.11096,1.11714,1.12224,1.12627,1.12916,1.13083,1.13125,1.13036,1.12816,1.12466,1.11992,1.11397,1.10677,1.09827,1.08849,1.07746,1.06527,1.05203,1.03786,1.02283,1.00695,.99025,.97279,.9546,.93573,.9163,.8965,.8765,.85647,.83652,.81687,.79775,.77939,.76199,.74568,.73049,.71635,.70316,.69082,.67925,.66834,.65804,.64831,.63911,.63032,.62184,.61363,.60564,.59788,.59036,.58308,.57597,.5689,.56177,.55447,.5469,.53896,.53062,.5219,.51283,.5034,.49355,.48335,.47287,.46223,.45154,.44085,.43012,.41923,.40805,.39648,.38441,.37176,.35849,.34458,.32999,.31461,.29833,.28109,.26288,.2437,.22361,.20265,.18082,.15807,.13434,.1096,.0838,.0569,.02894,0,-.0298,-.0604,-.09173,-.12364,-.15594,-.18843,-.22092,-.25331,-.28559,-.31781,-.35006,-.38244,-.41502,-.44785,-.48098,-.5144,-.54811,-.58218,-.61666,-.65153,-.68677,-.72232,-.75807,-.79397,-.83002,-.86628,-.90281,-.93968,-.97693,-1.01465,-1.05282,-1.09139,-1.13031,-1.16956,-1.20917,-1.24905,-1.28907,-1.32908,-1.36891,-1.40844,-1.44765,-1.48658,-1.52527,-1.56376,-1.60206,-1.64016,-1.67801,-1.71552,-1.75264,-1.78936,-1.8257,-1.86161,-1.89702,-1.93182,-1.96584,-1.99894,-2.03102,-2.06203,-2.0919,-2.12056,-2.14794,-2.17397,-2.19852,-2.22138,-2.24235,-2.26129,-2.27805,-2.29243,-2.30422],pressure:[.9681,.97424,.98046,.98674,.99309,.9995,.99404,.98754,.981,.97444,.96785,.96124,.95462,.94801,.94139,.93479,.92822,.92167,.91515,.90868,.90225,.89589,.88959,.88336,.87722,.87115,.86519,.85932,.85356,.84792,.84239,.83699,.83173,.8266,.82162,.81679,.81211,.80759,.80324,.79906,.79505,.79121,.78756,.78409,.78081,.77771,.77481,.77211,.76959,.76728,.76516,.76324,.76153,.76001,.75869,.75757,.75665,.75593,.7554,.75507,.75493,.75498,.75523,.75565,.75627,.75706,.75803,.75917,.76049,.76197,.76361,.76541,.76737,.76947,.77172,.77409,.7766,.77923,.78198,.78484,.7878,.79086,.79401,.79724,.80055,.80394,.8074,.81092,.8145,.81813,.82182,.82556,.82934,.83317,.83703,.84093,.84487,.84884,.85284,.85687,.86094,.86503,.86915,.87329,.87746,.88166,.88587,.89011,.89436,.89863,.90291,.9072,.91149,.91579,.92009,.92438,.92867,.93295,.9372,.94144,.94566,.94985,.954,.95812,.96219,.96623,.97021,.97415,.97802,.98184,.9856,.9893,.99293,.9965,1,.99657,.9932,.98991,.98668,.98352,.98042,.97738,.9744,.97148,.9686,.96577,.96298,.96023,.95751,.95482,.95214,.94949,.94684,.9442,.94156,.93892,.93627,.93361,.93094,.92825,.92555,.92284,.9201,.91735,.91458,.91179,.90899,.90616,.90332,.90047,.8976,.89472,.89183,.88893,.88603,.88314,.88024,.87735,.87448,.87162,.86878,.86597,.86319,.86044,.85774,.85508,.85247,.84993,.84744,.84503,.84269,.84042,.83825,.83616,.83417,.83227,.83048,.8288,.82724,.82578,.82445,.82324,.82215,.82119,.82037,.81967,.81911,.81868,.81839,.81824,.81823,.81835,.81862,.81903,.81957,.82026,.82109,.82206,.82317,.82443,.82583,.82737,.82906,.83089,.83287,.83499,.83726,.83968,.84223,.84494,.84778,.85077,.8539,.85717,.86058,.86412,.86781,.87163,.87559,.87968,.88391,.88826,.89275,.89737,.90211,.90698,.91198,.91709,.92233,.92768,.93315,.93873,.94441,.95019,.95607,.96205]},{distance:[4.72925,4.81721,4.9037,4.98859,5.07177,5.15311,5.23249,5.3098,5.38491,5.45772,5.52811,5.59598,5.66122,5.72375,5.78346,5.84028,5.8941,5.94486,5.99248,6.03689,6.07803,6.11584,6.15028,6.18128,6.20882,6.23285,6.25336,6.27031,6.28369,6.29348,6.29969,6.3023,6.30133,6.29678,6.28867,6.27703,6.26187,6.24324,6.22116,6.19567,6.16683,6.13468,6.09928,6.06068,6.01896,5.97417,5.92639,5.87569,5.82217,5.76589,5.70696,5.64545,5.58147,5.5151,5.44644,5.37559,5.30265,5.2277,5.15085,5.0722,4.99184,4.90987,4.82639,4.74151,4.65533,4.56794,4.47945,4.38996,4.29959,4.20843,4.11658,4.02416,3.93125,3.83796,3.74437,3.65057,3.55666,3.46272,3.36884,3.27509,3.18155,3.08831,2.99545,2.90303,2.81114,2.71984,2.62922,2.53933,2.45026,2.36207,2.27484,2.18862,2.10349,2.01951,1.93675,1.85528,1.77515,1.69644,1.61919,1.54348,1.46935,1.39685,1.32605,1.25698,1.18967,1.12417,1.06049,.99863,.93862,.88044,.82408,.76953,.71676,.66574,.61644,.56882,.52282,.47841,.43553,.39413,.35414,.31551,.27817,.24206,.20712,.17328,.14048,.10866,.07776,.04772,.01848,-.00999,-.03776,-.06487,-.09134,-.11721,-.14251,-.16725,-.19144,-.21509,-.2382,-.26076,-.28275,-.30416,-.32496,-.34511,-.36459,-.38334,-.40134,-.41852,-.43485,-.45026,-.46471,-.47815,-.49052,-.50179,-.51189,-.52081,-.52849,-.5349,-.54003,-.54383,-.54627,-.54734,-.54702,-.54528,-.54211,-.53752,-.53149,-.52403,-.51515,-.50487,-.4932,-.48015,-.46575,-.45001,-.43297,-.41463,-.39503,-.37419,-.35213,-.32887,-.30443,-.27885,-.25214,-.22432,-.19541,-.16544,-.13442,-.10235,-.06926,-.03514,0,.03616,.07336,.11159,.15088,.19125,.23272,.27531,.31906,.36401,.41019,.45764,.5064,.55651,.60802,.66096,.71538,.77129,.82874,.88776,.94836,1.01056,1.07438,1.13982,1.20687,1.27554,1.34581,1.41766,1.49107,1.56599,1.64239,1.72025,1.79951,1.88013,1.96209,2.04532,2.12979,2.21546,2.30226,2.39017,2.47911,2.56905,2.65991,2.75164,2.84416,2.93742,3.03133,3.12582,3.2208,3.31619,3.41191,3.50785,3.60393,3.70006,3.79612,3.89202,3.98765,4.08291,4.17767,4.27182,4.36525,4.45783,4.54944,4.63995],pressure:[.30942,.30838,.30765,.30724,.30715,.30738,.30795,.30884,.31007,.31164,.31354,.31578,.31837,.32129,.32455,.32815,.33209,.33636,.34097,.34591,.35117,.35675,.36265,.36887,.37539,.38221,.38933,.39674,.40442,.41238,.4206,.42907,.43779,.44675,.45593,.46533,.47493,.48473,.49471,.50486,.51517,.52563,.53623,.54694,.55777,.5687,.57971,.59079,.60194,.61313,.62435,.6356,.64686,.65811,.66935,.68056,.69174,.70286,.71391,.72489,.73579,.74659,.75728,.76785,.7783,.7886,.79876,.80877,.81861,.82827,.83776,.84706,.85617,.86507,.87378,.88227,.89056,.89863,.90649,.91412,.92153,.92872,.93568,.94241,.94892,.95519,.96122,.96702,.97258,.97791,.98299,.98783,.99242,.99677,.99911,.99525,.99164,.98827,.98515,.98228,.97966,.97728,.97514,.97324,.97159,.97017,.96898,.96801,.96727,.96674,.96641,.96629,.96635,.96661,.96703,.96762,.96838,.96928,.97032,.97149,.97279,.9742,.97572,.97734,.97905,.98085,.98273,.98468,.98669,.98877,.99091,.99311,.99535,.99765,1,.9976,.99516,.99267,.99014,.98755,.98491,.98222,.97947,.97666,.97378,.97083,.96781,.96471,.96153,.95826,.9549,.95144,.94787,.9442,.94042,.93651,.93249,.92834,.92407,.91966,.91512,.91045,.90564,.90069,.8956,.89037,.885,.87949,.87384,.86806,.86214,.85608,.84988,.84356,.83711,.83053,.82383,.81702,.81009,.80306,.79594,.78872,.78141,.77403,.76657,.75905,.75148,.74385,.73619,.72849,.72076,.71302,.70526,.69749,.68972,.68195,.67419,.66644,.65871,.65099,.64329,.63561,.62795,.62032,.61271,.60512,.59755,.59001,.58248,.57497,.56749,.56002,.55256,.54512,.5377,.5303,.52291,.51554,.50819,.50087,.49358,.48632,.4791,.47192,.4648,.45773,.45072,.44378,.43692,.43015,.42346,.41687,.41039,.40403,.39779,.39168,.38571,.37989,.37423,.36873,.36342,.35828,.35335,.34862,.34409,.3398,.33573,.3319,.32831,.32498,.32192,.31912,.3166,.31436,.31242,.31077]}];function o(e,t){if(!e)return null;var i=e.length/2;const n=.1*i;i=Array(i);let r=0;t=1===t;for(let o=0;o<e.length;o+=2){const a=(e[o]+e[o+1])/2;i[r++]=t?Math.min(n,1-.5*(1-a)):Math.min(n,.5*a)}return i}var a=function(){var e=n,a=e/2;const s=new Uint8Array(4*e*e),l=4*e*a,u=2*(a=i),c=4*e,h=r.length;let d=8*h*c;for(var f of r){var p=f.distance,_=f.pressure;let e=d;for(let i=0;i<9;i++){0!==i&&(p=o(p,0),_=o(_,1));for(let i=0;i<n;i++){const n=_?_[i%_.length]:1;t(.5+(p?p[i%p.length]/u:0),s,e),t(n,s,e+l),e+=4}e-=c*(h+1)}d+=c}return s}(),s=new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR});this._edgeStrokesTexture=new t$U({context:this._frameState.context,source:{width:256,height:256,arrayBufferView:a},sampler:s,flipY:!1});var l=this._edgeStrokesTexture.width,u=this._edgeStrokesTexture.height;this._strokesLog2Resolution=e$2d.log2(l),this._strokesTextureScale=new o$1o(1/l,1/u)},_0x1a71e8.prototype._setFloodTexture=function(e,t,i){this._floodFlagTexture=e,this._floodRect=t;var n=new p$1d;p$1d.inverse(i,n),this._matFloodInvertMatrix=n;var r={};r.layer=this,this.traverseRenderEntity(r,_0x25702b)},_0x1a71e8.prototype._removeFloodTexture=function(){this._floodFlagTexture=void 0,this._floodRect=void 0,this._matFloodInvertMatrix=p$1d.IDENTITY;var e={};e.layer=this,this.traverseRenderEntity(e,_0x15cbc8)},_0x1a71e8.prototype.setHistoryDataByKey=function(e){if(e$2e(this._historicalRecord))if(e$2e(this._historicalRecord.rootTiles))_0x3dbd12(this,e);else{u$P(this._baseUri.toString()+this._historicalRecord,this.customRequestHeaders).then((t=>{this._historicalRecord=t,_0x3dbd12(this,e)}))}},_0x1a71e8.prototype.getHistoryDataKeys=function(){if(!e$2e(this._historicalRecord))return Promise.resolve();if(e$2e(this._historicalRecord.rootTiles))return Promise.resolve(Object.keys(this._historicalRecord.rootTiles[0].History));return u$P(this._baseUri.toString()+this._historicalRecord,this.customRequestHeaders).then((e=>(this._historicalRecord=e,Object.keys(this._historicalRecord.rootTiles[0].History))))};var r$N=function(){if(this._layers=null,this.minQuality=1,this._jsHeapSizeLimitRatio=1,this._maxMemory=1024,s$Z.isPCBroswer()&&(this._maxMemory=4096),window.performance&&window.performance.memory){var e=window.performance.memory.usedJSHeapSize/1048576,t=window.performance.memory.jsHeapSizeLimit/1048576;this._maxMemory=(t-e)*this._jsHeapSizeLimitRatio}this._cacheSize=1024,this._memoryUsed=0,this._memoryPredicted=0,this._quality=1,this._canFastRecover=0,this._downscaleMemoryUsed=this._stableQuality=0,this._QualityShrinkRatio=1.3,this._QualityIncreaseStep=.01,this._updating=0,this._geoMemoryEstimate=0,this._texMemoryEstimate=0,this._EMA=0,this._learningWeight=.9,this._beta=1-this._learningWeight,this._logTime=0,this._showMemoryInfo=!1};r$N.showMemoryInfo=function(e){e$13._showMemoryInfo=e},r$N.setCacheSize=function(e){e$13._cacheSize=Math.min(e,e$13._maxMemory)},r$N.getCacheSize=function(){return e$13._cacheSize},r$N.reAllocateMaxMemory=function(e){if(e$13._jsHeapSizeLimitRatio=e,window.performance&&window.performance.memory){var t=window.performance.memory.usedJSHeapSize/1048576,i=window.performance.memory.jsHeapSizeLimit/1048576;e$13._maxMemory=(i-t)*e$13._jsHeapSizeLimitRatio}},r$N.setMaxMemory=function(e){e$13._maxMemory=e},r$N.getMaxMemory=function(){return e$13._maxMemory};const d$$={GeForce:{1050:3,1060:3,1070:8,1080:8,1650:4,1660:6,2060:6,2070:8,2080:8,3050:8,3060:8,3080:12,3090:24,4070:12,4080:16,4090:24},AMD:{7900:24,7600:8,6950:16,6900:16,6800:16,6750:12,6700:12,6650:8,6600:8,6500:4,6400:4,5700:8,5600:6,5500:8,64:8,56:8,590:8,580:4,570:4,560:4,550:4,480:4,470:4,390:8,380:4,7990:6,7970:3,7950:3,6990:4}};r$N._autoSetMaxMemory=function(e){var t=e.split(" "),i=t.filter((function(e,t){return/^[1-9]/g.test(e)}));if(i.length>0){var n,r=t.indexOf("GeForce")>-1,o=t.indexOf("AMD")>-1,a=i[0];r?n=d$$.GeForce[a]:o&&(n=d$$.AMD[a]),n=e$2e(n)?.9*n:2,n*=1024,r$N.setMaxMemory(n)}},r$N.setMinQuality=function(e){e$13.minQuality=Math.min(e,1)},r$N.getMinQuality=function(){return e$13.minQuality},r$N._memGeometryAdded=function(e){e$13._geoMemoryEstimate+=e},r$N._memGeometryRemoved=function(e){e$13._geoMemoryEstimate-=e},r$N._memTextureAdded=function(e){e$13._texMemoryEstimate+=e},r$N._memTextureRemoved=function(e){e$13._texMemoryEstimate-=e},r$N._attachLayers=function(e){e$13._layers=e},r$N._updateMemory=function(e){var t=1048576*e$13._maxMemory,i=e$13._memoryUsed*t;if(e$13._memoryUsed=e,e$13._memoryPredicted=e$13._memoryUsed-i,e$13._memoryPredicted=0==e$13._EMA?e$13._memoryPredicted:e$13._memoryPredicted*e$13._learningWeight+e$13._EMA*(1-e$13._learningWeight),e$13._EMA=e$13._memoryPredicted,e$13._showMemoryInfo&&e$13._memoryUsed>t){var n=Et$c();n-e$13._logTime>1e4&&(console.log(r$N.getStatistics()),e$13._logTime=n)}e$13._memoryPredicted=(e$13._memoryUsed+e$13._memoryPredicted)/t,e$13._memoryUsed=e$13._memoryUsed/t},r$N.getStatistics=function(){var e="内存上限(MB): "+e$13._maxMemory,t=e$13._memoryUsed;e$13._memoryUsed<1&&(t=1048576*e$13._maxMemory*t);for(var i="当前占用内存(MB): "+t/1048576,n="缓存上限(MB): "+e$13._cacheSize,r="当前缓存占用(MB): ",o=0;o<e$13._layers._layerQueue.length;o++){var a=e$13._layers._layerQueue[o];if(a instanceof _0x1a71e8){var s=a._layerScheduler._getCacheMemoryUsageInBytes()/1048576;r+="第"+o+"层, 图层名:"+a._name+",缓存占用:"+s+","}}var l=e+","+i+","+("渲染质量:"+e$13._quality)+"\n"+n+","+r;if(window.performance&&window.performance.memory){var u=window.performance.memory.totalJSHeapSize/1048576,c=window.performance.memory.usedJSHeapSize/1048576;l+="\n浏览器最大内存(MB):"+window.performance.memory.jsHeapSizeLimit/1048576+",已分配内存(MB):"+c+",堆活跃内存(MB):"+u}return l},r$N.getMemoryUsed=function(){return e$13._memoryUsed},r$N.getQuality=function(){return e$13._quality},r$N._updateQuality=function(e){return(e=Math.min(Math.max(e,e$13.minQuality),1))===e$13._quality?0:(e$13._quality=e,1)},r$N._layersUpdating=function(){for(var e=e$13._layers._layerQueue.length,t=0;t<e;t++){var i=e$13._layers._layerQueue[t];if(i instanceof _0x1a71e8&&i._layerScheduler._updatingTiles()>0)return!0}return!1},r$N.update=function(e){e$13._layers._setMaxMemory(e$13._maxMemory),e$13._layers._setCacheMemory(e$13._cacheSize),this._updateMemory(e);var t=!0;if(e$13._memoryPredicted>0||e$13._updating){var i=this._layersUpdating();e$13._memoryPredicted<.6&&e$13._canFastRecover?(e$13._stableQuality=e$13._downscaleMemoryUsed=0,e$13._canFastRecover=0,this._updateQuality(1)):i?(e$13._memoryPredicted>1.1||e$13._memoryUsed>1)&&(e$13._stableQuality>0?(e$13._downscaleMemoryUsed=0,this._updateQuality(e$13._stableQuality)):e$13._quality>e$13.minQuality&&e$13._downscaleMemoryUsed<e$13._memoryUsed?(t=i=this._updateQuality(e$13._quality/e$13._QualityShrinkRatio),e$13._downscaleMemoryUsed=e$13._memoryUsed,e$13._canFastRecover=0):t=!1):(i=this._layersUpdating(),e$13._downscaleMemoryUsed=0,e$13._memoryUsed>1?(e$13._stableQuality=0,e$13._canFastRecover=0,t=i=this._updateQuality(e$13._quality/e$13._QualityShrinkRatio),e$13._downscaleMemoryUsed=e$13._memoryPredicted):e$13._stableQuality!=e$13._quality&&(e$13._memoryUsed<.8&&e$13._quality<1?(e$13._stableQuality=e$13._quality,i=this._updateQuality(e$13._quality+e$13._QualityIncreaseStep)):e$13._quality<1&&(e$13._canFastRecover=1))),e$13._updating=i}return t};var e$13=new r$N;r$N.memManager=e$13;var ti$4=r$N,_0x1c25d9=(_0x2c57f0=!0,function(e,t){var i=_0x2c57f0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c57f0=!1,i}),_0x5abfb3=_0x1c25d9(void 0,(function(){return _0x5abfb3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5abfb3).search("(((.+)+)+)+$")})),_0x2c57f0;_0x5abfb3();var _0x2f55cb=273,_0x3b4364=function(){this.textures={},this.refCounts={},this.unUsedTextures={},this.unUsedSize=0};_0x3b4364.reservedMemorySize=50,_0x3b4364.CreateTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=_0x356ff1.textures[e];if(d)_0x356ff1.refCounts[e]++;else{var f=null;switch(o){case _0x22a8f5.enrS3TCDXTN:f=r===_0x2ddc8c.BGR||r===_0x2ddc8c.RGB?V$12.RGB_DXT1:V$12.RGBA_DXT5;break;case _0x22a8f5.enrPVRTPF_PVRTC2:case _0x22a8f5.enrPVRTPF_PVRTC:f=r===_0x2ddc8c.BGR||r===_0x2ddc8c.RGB?V$12.RGB_PVRTC_2BPPV1:V$12.RGBA_PVRTC_2BPPV1;break;case _0x22a8f5.enrPVRTPF_PVRTC_4bpp:f=V$12.RGBA_PVRTC_4BPPV1;break;case _0x22a8f5.enrPVRTPF_ETC1:f=V$12.RGB_ETC1;break;case _0x22a8f5.encNONE:f=r===_0x2ddc8c.BGR||r===_0x2ddc8c.RGB?_0x2f55cb:r===_0x2ddc8c.LUMINANCE_ALPHA?V$12.LUMINANCE_ALPHA:V$12.RGBA}var p=25===r?_$_.FLOAT:_$_.UNSIGNED_BYTE;e$2e(_0x356ff1.unUsedTextures[e])?(d=_0x356ff1.unUsedTextures[e],_0x356ff1.unUsedSize-=d.size,delete _0x356ff1.unUsedTextures[e]):(s||(d=this.UseTexture(e,t,i,n,f,a,l,u,p)),null==d&&(d=new _0x5e76de(e,t,i,n,f,a,s,l,u,p,c,h),ti$4._memTextureAdded(d.sizeInBytes))),_0x356ff1.refCounts[e]=1,_0x356ff1.textures[e]=d}return d},_0x3b4364.UseTexture=function(e,t,i,n,r,o,a,s,l){for(var u in _0x356ff1.unUsedTextures)if(_0x356ff1.unUsedTextures[u].size===o.length){var c=_0x356ff1.unUsedTextures[u];if(c.context.id!==t.id)return;if(t.webgl2&&(i!==c.width||n!==c.height)||e$2e(t.engine))continue;_0x356ff1.unUsedSize-=c.size,delete _0x356ff1.unUsedTextures[u];var h={width:i,height:n,internalFormat:r,wrapS:u$Z(a,q$1a.CLAMP_TO_EDGE),wrapT:u$Z(s,q$1a.CLAMP_TO_EDGE),pixelDataType:u$Z(l,_$_.UNSIGNED_BYTE)};return c.pixelDataType===_$_.FLOAT&&(h.wrapS=q$1a.CLAMP_TO_EDGE,h.wrapT=q$1a.CLAMP_TO_EDGE),c.updateTexture(e,o,h),c}},_0x3b4364.CreateVolumeTexture=function(e,t,i,n,r){var o=_0x356ff1.textures[e],a=tt$i.LINEAR,s=rt$k.LINEAR;if(r===k$S.FilterMode.NEAREST&&(a=tt$i.NEAREST,s=rt$k.NEAREST),o&&!e$2e(n.imageArray))_0x356ff1.refCounts[e]++,o.sampler=new e$1S({minificationFilter:a,magnificationFilter:s});else{var l=n.nLength,u=n.imageArray;(o=new t$U({context:i,width:l,height:l,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({minificationFilter:a,magnificationFilter:s})})).copyFrom({width:l,height:l,arrayBufferView:u}),_0x356ff1.refCounts[e]=1,_0x356ff1.textures[e]=o,ti$4._memTextureAdded(o.sizeInBytes)}return o},_0x3b4364.ReloadVolumeTexture=function(e,t,i,n,r){var o=_0x356ff1.textures[e];if(o){var a=n.nLength,s=n.imageArray;o.copyFrom({width:a,height:a,arrayBufferView:s})}return o},_0x3b4364.AddRef=function(e){_0x356ff1.refCounts[e]++},_0x3b4364.DecRef=function(e){_0x356ff1.refCounts[e]--},_0x3b4364.DestroyTexture=function(e){var t=_0x356ff1.refCounts[e];_0x356ff1.refCounts[e]=t-1,0==_0x356ff1.refCounts[e]&&(_0x356ff1.textures[e].is3D||e$2e(_0x356ff1.textures[e].sampler)?(ti$4._memTextureRemoved(_0x356ff1.textures[e].sizeInBytes),_0x356ff1.textures[e].destroy()):(_0x356ff1.unUsedTextures[e]=_0x356ff1.textures[e],_0x356ff1.unUsedSize+=_0x356ff1.textures[e].size),delete _0x356ff1.textures[e],delete _0x356ff1.refCounts[e])},_0x3b4364.GetUnusedSize=function(){return _0x356ff1.unUsedSize},_0x3b4364.DeleteUnusedTextures=function(){for(var e in _0x356ff1.unUsedTextures)_0x356ff1.unUsedTextures[e].is3D&&(_0x356ff1.unUsedSize-=_0x356ff1.unUsedTextures[e].size,ti$4._memTextureRemoved(_0x356ff1.textures[e].sizeInBytes),_0x356ff1.unUsedTextures[e].destroy(),delete _0x356ff1.unUsedTextures[e]);var t=1024*_0x3b4364.reservedMemorySize*1024;for(var e in _0x356ff1.unUsedTextures){if(t>_0x356ff1.unUsedSize)break;var i=_0x356ff1.unUsedTextures[e];_0x356ff1.unUsedSize-=i.size,ti$4._memTextureRemoved(i.sizeInBytes),i.destroy(),delete _0x356ff1.unUsedTextures[e],i.isShared&&delete _0x3b4364._shareTextureCache[i.sharedKey]}};var _0x356ff1=new _0x3b4364;_0x3b4364.textureManager=_0x356ff1,_0x3b4364._shareTextureCache={};var Se$e=_0x3b4364,n$D={},v$B=typeof document<"u"?new h$16(document.location.href):new h$16;function f$N(e){var t=new h$16(e).resolve(v$B);t.normalize();var i=t.authority;return/:/.test(i)||(i=i+":"+("https"===t.scheme?"443":"80")),i}function o$O(e,t){var i=f$N(e),n=u$Z(n$D[i],0);if(!(n>=o$O.maximumRequestsPerServer))return n$D[i]=n+1,o$1l(t(e),(function(e){return n$D[i]--,e})).otherwise((function(e){return n$D[i]--,o$1l.reject(e)}))}o$O.maximumRequestsPerServer=6;var _0x843645=(_0x534c15=!0,function(e,t){var i=_0x534c15?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x534c15=!1,i}),_0x3d774b=_0x843645(void 0,(function(){return _0x3d774b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d774b).search("(((.+)+)+)+$")})),_0x534c15;_0x3d774b();var _0x59e1ca={INSTANCED_LAYER:"Instanced_Layer",INSTANCED_OBJECT:"Instanced_Object"},bt$6=Object.freeze(_0x59e1ca),_0x2694d=(_0x28565a=!0,function(e,t){var i=_0x28565a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28565a=!1,i}),_0x345830=_0x2694d(void 0,(function(){return _0x345830.toString().search("(((.+)+)+)+$").toString().constructor(_0x345830).search("(((.+)+)+)+$")})),_0x28565a;_0x345830();var _0x56d301=new e$1X(.7,.7,1,1);function _0x24f13b(e,t,i,n){n=u$Z(n,u$Z.EMPTY_OBJECT),o$1q.defined("options.position",n.position),this._type=bt$6.INSTANCED_OBJECT,this._ownerGroup=i,this._position=n.position,this._color=u$Z(n.color,new e$1X),this._scale=u$Z(n.scale,new o$1p(1,1,1)),this._offset=u$Z(n.offset,new o$1p(0,0,0));var r=u$Z(n.hpr,new i$16);this._hpr=r,this._feature=u$Z(n.feature,u$Z.EMPTY_OBJECT);var o=a$18.fromCartesian(this._position);o.longitude+=this._offset.x,o.latitude+=this._offset.y,o.height+=this._offset.z,this._offsetPosition=o$1p.fromRadians(o.longitude,o.latitude,o.height),this._mode=n.sceneMode,this._mode===C$14.COLUMBUS_VIEW&&(this._position=m$19.convertToColumbusCartesian(this._position),this._offsetPosition=m$19.convertToColumbusCartesian(this._offsetPosition)),this._quaternion=m$19.headingPitchRollQuaternion(this._position,r);var a={id:t,primitive:this},s=e.createPickId(a).color,l=new e$1X;l.x=e$1X.floatToByte(s.red),l.y=e$1X.floatToByte(s.green),l.z=e$1X.floatToByte(s.blue),l.w=e$1X.floatToByte(s.alpha),this._pickColor=l,this._isSelected=!1,this._preColor=e$1X.clone(this._color),this._oriCenter=void 0,this._oriRadius=1,this._boundingSphere=void 0,this._id=t,this._index=-1,this._isDeleted=!1,this._visible=u$Z(n.visible,!0),this._distanceVisible=!0,this._localTransform=void 0,this._localTranslation=void 0,this._localQuaternion=void 0}Object.defineProperties(_0x24f13b.prototype,{type:{get:function(){return this._type}},position:{get:function(){return this._position}},color:{get:function(){return this._color}},scale:{get:function(){return this._scale}},hpr:{get:function(){return this._hpr}},visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("S3M Instance visible",e),e!==this._visible&&(this._visible=e,this.updatePosition(this._position))}},show:{get:function(){return this.visible},set:function(e){this.visible=e}},distanceVisible:{get:function(){return this._distanceVisible},set:function(e){o$1q.typeOf.bool("S3M Instance distanceVisible",e),e!==this._distanceVisible&&(this._distanceVisible=e,this.updatePosition(this._position))}},offset:{get:function(){return this._offset}},feature:{get:function(){return this._feature}},isSelected:{get:function(){return this._isSelected}},oriCenter:{get:function(){return this._oriCenter},set:function(e){!e$2e(e)||(this._oriCenter=e)}},oriRadius:{get:function(){return this._oriRadius},set:function(e){!e$2e(e)||(this._oriRadius=e)}},boundingSphere:{get:function(){return this._boundingSphere},set:function(e){!e$2e(e)||(this._boundingSphere=e)}},index:{get:function(){return this._index},set:function(e){this._index=e}},id:{get:function(){return this._id},set:function(e){!e$2e(e)||(this._id=e)}},isDeleted:{get:function(){return this._isDeleted},set:function(e){e$2e(e)&&(this._isDeleted=e)}},localTransform:{get:function(){return this._localTransform}},localTranslation:{get:function(){return this._localTranslation}},localQuaternion:{get:function(){return this._localQuaternion}}}),_0x24f13b.prototype.updatePosition=function(e){if(e$2e(e)){var t=this._index;this._position=o$1p.clone(e);var i=a$18.fromCartesian(this._position);i.longitude+=this._offset.x,i.latitude+=this._offset.y,i.height+=this._offset.z,this._offsetPosition=o$1p.fromRadians(i.longitude,i.latitude,i.height);var n=this._ownerGroup.renderEntities;if(e$2e(n)&&!(n.length<1)){for(var r=this._visible&&this._distanceVisible?1:0,o=o$1p.multiplyByScalar(e,r,new o$1p),a=0,s=n.length;a<s;a++){var l=n[a],u=l._colorCommand.vertexArray.getAttribute(l._attributeLocations.aPosHigh),c=t*u.strideInBytes+u.offsetInBytes,h=S$14.createTypedArray(u.componentDatatype,2*u.componentsPerAttribute),d=i$12.fromCartesian(o),f=d.high,p=d.low;h[0]=f.x,h[1]=f.y,h[2]=f.z,h[3]=p.x,h[4]=p.y,h[5]=p.z,u.vertexBuffer.copyFromArrayView(h,c)}o$1p.clone(e,this._boundingSphere.center)}}},_0x24f13b.prototype.updateColor=function(e){if(e$2e(e)&&!this._isDeleted){var t=this._index;if(!e$1X.equals(this._color,e)){this._color=e$1X.clone(e,this._color),this._preColor=e$1X.clone(e);var i=this._ownerGroup.renderEntities;if(e$2e(i)&&!(i.length<1))for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aColor2),s=t*a.strideInBytes+a.offsetInBytes,l=S$14.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=e.red,l[1]=e.green,l[2]=e.blue,l[3]=e.alpha,a.vertexBuffer.copyFromArrayView(l,s)}}}},_0x24f13b.prototype.updateScale=function(e){if(e$2e(e)){var t=this._index;if(!o$1p.equals(this._scale,e)){this._scale=o$1p.clone(e);var i=this._ownerGroup.renderEntities;if(e$2e(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aScaleAndRadius),s=t*a.strideInBytes+a.offsetInBytes,l=S$14.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=e.x,l[1]=e.y,l[2]=e.z,l[3]=this._oriRadius,a.vertexBuffer.copyFromArrayView(l,s)}var u=o$1p.maximumComponent(e);this._boundingSphere.radius=this.oriRadius*u}}}},_0x24f13b.prototype.updateRotation=function(e){if(e$2e(e)){var t=this._index;if(!i$16.equals(this._hpr,e)){if(this._hpr=i$16.clone(e),this._quaternion=m$19.headingPitchRollQuaternion(this._position,e),this._mode===C$14.COLUMBUS_VIEW){var i=p$1e.fromRotationY(-Math.PI/2),n=n$15.fromRotationMatrix(i);this._quaternion=n$15.multiply(this._quaternion,n,this._quaternion)}var r=this._ownerGroup.renderEntities;if(e$2e(r)&&!(r.length<1))for(var o=0,a=r.length;o<a;o++){var s=r[o],l=s._colorCommand.vertexArray.getAttribute(s._attributeLocations.aQuaternion),u=t*l.strideInBytes+l.offsetInBytes,c=S$14.createTypedArray(l.componentDatatype,l.componentsPerAttribute);c[0]=this._quaternion.x,c[1]=this._quaternion.y,c[2]=this._quaternion.z,c[3]=this._quaternion.w,l.vertexBuffer.copyFromArrayView(c,u)}}}},_0x24f13b.prototype.updateModelMatrix=function(e){var t=p$1d.getScale(e,new o$1p);this.updateScale(t),this._localTransform=p$1d.clone(e),this._localTranslation=p$1d.getTranslation(e,new o$1p);var i=p$1d.setScale(e,new o$1p(1,1,1),new p$1d),n=p$1d.getRotation(i,new p$1e);this._localQuaternion=n$15.fromRotationMatrix(n,new n$15)},_0x24f13b.prototype.setSelected=function(){var e=this._index;if(e$2e(e)&&!(e<0)&&!e$1X.equals(this._color,_0x56d301)){var t=e$1X.multiply(_0x56d301,this._preColor,new e$1X),i=this._ownerGroup.renderEntities;if(e$2e(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aColor2),s=e*a.strideInBytes+a.offsetInBytes,l=S$14.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=t.red,l[1]=t.green,l[2]=t.blue,l[3]=t.alpha,a.vertexBuffer.copyFromArrayView(l,s)}this._isSelected=!0}}},_0x24f13b.prototype.setUnSelected=function(){var e=this._index;if(e$2e(e)&&!(e<0)&&this._isSelected){this._isSelected=!1,this._color=e$1X.clone(this._preColor);var t=this._ownerGroup.renderEntities;if(e$2e(t)&&!(t.length<1))for(var i=0,n=t.length;i<n;i++){var r=t[i],o=r._colorCommand.vertexArray.getAttribute(r._attributeLocations.aColor2),a=e*o.strideInBytes+o.offsetInBytes,s=S$14.createTypedArray(o.componentDatatype,o.componentsPerAttribute);s[0]=this._preColor.red,s[1]=this._preColor.green,s[2]=this._preColor.blue,s[3]=this._preColor.alpha,o.vertexBuffer.copyFromArrayView(s,a)}}};var _0x1afe8d=(_0x3b756d=!0,function(e,t){var i=_0x3b756d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b756d=!1,i}),_0x5a3853=_0x1afe8d(void 0,(function(){return _0x5a3853.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a3853).search("(((.+)+)+)+$")})),_0x3b756d;_0x5a3853();var _0x47b2f7="\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#extension GL_EXT_shader_texture_lod : enable\n#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef ClampObject\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n #ifdef WEBGPU\n layout(location = 0) out vec4 glFragData[2];\n #endif\n#endif\n\n#include <SceneUboDecl>\n#include <LightUboDecl>\n#include <MaterialUboDecl>\n#include <getNormalMatrix>\n#include <getNormalEC>\n\n#ifdef TEXTURE\nuniform sampler2D uTexture;\n#endif\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec3 vNormalEC;\nvarying mat4 vModelMatrix;\n\n#ifdef SQRESULT\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \n#endif\n#ifdef Volume2\nvarying vec3 vecRotioCoord;\n#endif\nfloat computeDepth()\n{\n#ifdef LOG_DEPTH\n return log2(v_depthFromNearPlusOne) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\n return gl_FragCoord.z;\n#endif\n}\n#ifdef SQRESULT\nbool isPointInObject(vec2 texCoord)\n{\n bool bIn = false;\n vec4 colorInClipTexture = texture2D(uFrontColorTexture,texCoord.xy);\n if(colorInClipTexture.r > 0.99 && colorInClipTexture.g < 0.01 && colorInClipTexture.b < 0.01)\n {\n float depthNear = czm_unpackDepth(textureLod(uFrontDepthTexture, texCoord.xy, 0.0)) - 0.00001;\n float depthFar = czm_unpackDepth(textureLod(uBackDepthTexture, texCoord.xy, 0.0)) + 0.00001;\n float currentDepth = computeDepth();\n if(currentDepth > depthNear && currentDepth < depthFar){\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\n#endif\n\nvec4 SRGBtoLinear(vec4 srgbIn) \n{\n return vec4(pow(srgbIn.rgb, vec3(2.2)), srgbIn.a);\n}\nvec4 LineartoSRGB(vec4 linearIn) \n{\n#ifndef HDR \n return vec4(pow(linearIn.rgb, vec3(1.0/2.2)), linearIn.a);\n#else \n return linearIn;\n#endif \n}\n\n#include <SRGBtoLINEAR>\n#include <shaderModelBase>\n#include <brdf>\n#include <blinnPhong>\n\nvoid main()\n{\n#ifdef ClampObject\n czm_writeDepthClampedToFarPlane();\n#endif\n vec4 color = vColor;\n#ifdef ClampObject\n #ifdef PROFILE\n #ifdef MRT\n gl_FragData[0] = vec4(vPickColor.xyz, 1.0);\n gl_FragData[1] = color;\n #else\n gl_FragColor = vec4(vPickColor.xyz, 1.0);\n #endif\n #else\n gl_FragColor = color;\n #endif\n#else\n vec2 vecTexCoord = vec2(0.0);\n #ifdef SQRESULT\n vec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\n if(!isPointInObject(texCoord)) \n { \n discard; \n } \n #endif\n \n\t#ifdef TEXTURE\n #ifdef FLIP_Y\n vecTexCoord = vec2(vTexCoord.x,1.0-vTexCoord.y);\n #else\n vecTexCoord = vec2(vTexCoord.x,vTexCoord.y);\n #endif\n #endif\n \n #ifdef TEXTURE\n color = SRGBtoLinear(texture2D(uTexture, vecTexCoord.xy, 0.0)) * color;\n #endif\n vec3 normalEC;\n if(vPositionMC.w > 0.9)\n {\n normalEC = normalize(vNormalEC);\n }\n #ifndef HAS_NORMAL\n vec3 normalMC = czm_computeNormal(vPositionMC.xyz);\n mat4 modelViewMatrix4 = uView * vModelMatrix;\n modelViewMatrix4 = czm_inverseMatrix(modelViewMatrix4);\n mat3 modelViewMatrix3 = mat3(modelViewMatrix4);\n modelViewMatrix3 = czm_transpose(modelViewMatrix3);\n normalEC = normalize(modelViewMatrix3 * normalMC);\n #endif\n \n #ifdef BRDF\n gl_FragColor = brdf(color, vecTexCoord, vTexCoord, vPositionEC, vPositionMC.xyz, normalEC, vModelMatrix);\n #else\n gl_FragColor = blinnPhong(color, vecTexCoord, vTexCoord, vPositionEC, vPositionMC.xyz, normalEC, vModelMatrix);\n #ifdef TEXTURE\n gl_FragColor = LineartoSRGB(gl_FragColor);\n #endif\n #endif\n \n #ifdef Volume\n #ifdef Volume2\n if((vecRotioCoord.x < 1.0 && vecRotioCoord.x >0.0) && (vecRotioCoord.y < 1.0 && vecRotioCoord.y >0.0) && (vecRotioCoord.z < 1.0 && vecRotioCoord.z >0.0))\n {\n vec4 volumeColor = czm_getVolumeValue(vecRotioCoord);\n if (volumeColor.r * volumeColor.g * volumeColor.b * volumeColor.a < 0.99) {\n gl_FragColor = volumeColor;\n }\n }\n #else\n float wValue = 0.0;\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, wValue);\n #endif\n #endif\n#endif\n\n#ifndef MRT\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n#endif\n}",_0x1dac7c=(_0x540dd0=!0,function(e,t){var i=_0x540dd0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x540dd0=!1,i}),_0x325008=_0x1dac7c(void 0,(function(){return _0x325008.toString().search("(((.+)+)+)+$").toString().constructor(_0x325008).search("(((.+)+)+)+$")})),_0x540dd0;_0x325008();var _0x680f96={getDataShape:function(e,t){for(var i=-1/0,n=0,r=0,o=0,a=0;a<e.length;a++){var s=0;if(e[a].value&&(s=e[a].value[3]),s<i){if(o&&o!==r)throw new Error("Invalid data. data should be a row major 2d array.");o=r,r=0,n++}i=s,r++}return{row:n+1,column:r}}},_0xe980d9=[],_0x462c59=[],_0x35c43f=[];function _0x5e3388(e){var t;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)?(3==(t=e.substring(1).split("")).length&&(t=[t[0],t[0],t[1],t[1],t[2],t[2]]),[((t="0x"+t.join(""))>>16&255)/255,(t>>8&255)/255,(255&t)/255,1]):[255,255,255,1]}_0x680f96.updateSurfaceMesh=function(e,t,i){for(var n=new Float32Array(3*e.length),r=-900,o=900,a=-900,s=900,l=-900,u=900,c=0;c<e.length;c+=3)r=Math.max(e[c].value[0],r),o=Math.min(e[c].value[0],o),a=Math.max(e[c].value[1],a),s=Math.min(e[c].value[1],s),l=Math.max(e[c].value[2],l),u=Math.min(e[c].value[2],u);var h=_0x190f78(o,r);_0xe980d9=_0x2dd6bc(o,r,h);var d=_0x190f78(s,a);_0x462c59=_0x2dd6bc(s,a,d);var f=_0x190f78(u,l);_0x35c43f=_0x2dd6bc(u,l,f);var p=0;e.forEach((function(e){e.value&&e.value instanceof Array&&_0x200604(e.value[0],e.value[1],e.value[2],p,n),p++}));var _=_0xcc9c43(0,null,[-50,50],_0xe980d9),m=_0xcc9c43(0,null,[50,-50],_0x462c59),g=_0xcc9c43(0,null,[-50,50],_0x35c43f),x=null,y=null,v=null,$=null,b=null,T=t.row,C=t.column,S=(T-1)*(C-1)*4;x=new Float32Array(3*S),$=new Float32Array(4*S),b=new Float32Array(4*S),v=new Float32Array(2*S);var w,E,P,A,L,M,R,O,D,I,F,B,N,G,z,U=[0,3,1,1,3,2],V=[[1,1,0,0],[0,1,0,1],[1,0,0,1],[1,0,1,0]],k=new(S>65535?Uint32Array:Uint16Array)((T-1)*(C-1)*6),W=function(e,t,i){i[1]=e*C+t,i[0]=e*C+t+1,i[3]=(e+1)*C+t+1,i[2]=(e+1)*C+t},H=[],q=[],j=0;y=new Float32Array(3*S);var X=[[],[],[]],Y=[],Z=[],K=[0,0,0],Q=function(e,t,i){var n=3*t;return i[0]=e[n],i[1]=e[n+1],i[2]=e[n+2],i},J=new Float32Array(n.length),ee=new Float32Array(n.length/3*4),te=[0,0,0,1];for(c=0;c<e.length;c++){e[c].itemStyle&&"string"==typeof e[c].itemStyle.color?te=ue=_0x5e3388(e[c].itemStyle.color):ue=te;ue[3]*=1,ue[3];for(var ie=0;ie<4;ie++)ee[4*c+ie]=ue[ie]}for(c=0;c<T-1;c++)for(var ne=0;ne<C-1;ne++){var re=4*(c*(C-1)+ne)*3;W(c,ne,H);for(ie=0;ie<4;ie++)Q(n,H[ie],q);for(ie=0;ie<4;ie++)Q(n,H[ie],q),x.set(q,re+3*ie),$.set(V[ie],re/3*4+ie);for(ie=0;ie<6;ie++)k[j++]=U[ie]+re/3;for(ie=0;ie<2;ie++){for(var oe=3*ie,ae=0;ae<3;ae++){Q(n,he=H[U[oe]+ae],X[ae])}var se=function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e};se(Y,X[0],X[1]),se(Z,X[1],X[2]);R=K,D=Z,I=void 0,F=void 0,B=void 0,N=void 0,G=void 0,z=void 0,I=(O=Y)[0],F=O[1],B=O[2],N=D[0],G=D[1],z=D[2],R[0]=F*z-B*G,R[1]=B*N-I*z,R[2]=I*G-F*N;for(ae=0;ae<3;ae++){var le=3*H[U[oe]+ae];J[le]=J[le]+K[0],J[le+1]=J[le+1]+K[1],J[le+2]=J[le+2]+K[2]}}}for(c=0;c<J.length/3;c++){Q(J,c,K);w=K,P=void 0,A=void 0,L=void 0,M=void 0,P=(E=K)[0],A=E[1],L=E[2],(M=P*P+A*A+L*L)>0&&(M=1/Math.sqrt(M),w[0]=E[0]*M,w[1]=E[1]*M,w[2]=E[2]*M),J[3*c]=K[0],J[3*c+1]=K[1],J[3*c+2]=K[2]}var ue=[],ce=[];for(c=0;c<T-1;c++)for(ne=0;ne<C-1;ne++){re=4*(c*(C-1)+ne)*4;W(c,ne,H);for(ie=0;ie<4;ie++){for(ae=0;ae<4;ae++)ue[ae]=ee[4*H[ie]+ae];b.set(ue,re+4*ie),Q(J,H[ie],K),y.set(K,re/4*3+3*ie);var he=H[ie];ce[0]=he%C/(C-1),ce[1]=Math.floor(he/C)/(T-1),v.set(ce,re/4*2+2*ie)}0}for(c=0;c<x.length;c+=3){x[c]-=_,x[c+1]-=m,x[c+2]-=g;var de=x[c+1],fe=x[c+2];x[c+2]=de,x[c+1]=fe}return{positionAttr:x,normalAttr:y,texcoordAttr:v,barycentricAttr:$,colorAttr:b,indices:k,vertexColors:ee,vertexNormals:J,vertexCount:S}};var _0xa94ed=[0,1];function _0x4bfdbc(e,t,i,n){return(i=i||[])[0]=_0xcc9c43(e[0],n,[-50,50],_0xe980d9),i[1]=_0xcc9c43(e[1],n,[50,-50],_0x462c59),i[2]=_0xcc9c43(e[2],n,[-50,50],_0x35c43f),i}function _0xcc9c43(e,t,i,n){return _0x3c0bea(e=_0x456411(e,n),_0xa94ed,i,t)}function _0x456411(e,t){var i=t;return i[1]===i[0]?.5:(e-i[0])/(i[1]-i[0])}function _0x3c0bea(e,t,i,n){var r=t[1]-t[0],o=i[1]-i[0];if(0===r)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(e<=t[0])return i[0];if(e>=t[1])return i[1]}else{if(e>=t[0])return i[0];if(e<=t[1])return i[1]}else{if(e===t[0])return i[0];if(e===t[1])return i[1]}return(e-t[0])/r*o+i[0]}function _0x200604(e,t,i,n,r,o){var a;a=_0x4bfdbc([e,t,i]),r[3*n]=a[0],r[3*n+1]=a[1],r[3*n+2]=a[2]}function _0x190f78(e,t){var i=(t-e)/5,n=_0x215c91(i),r=Math.pow(10,n),o=i/r;return i=(o<1.5?1:o<2.5?2:o<4?3:o<7?5:10)*r,n>=-20?+i.toFixed(n<0?-n:0):i}function _0x215c91(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function _0x2dd6bc(e,t,i){var n=[];return n[0]=_0x226c39(Math.floor(e/i)*i),n[1]=_0x226c39(Math.ceil(t/i)*i),n}function _0x226c39(e,t,i){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),i?e:+e}var _0x54c2e6=(_0x18d465=!0,function(e,t){var i=_0x18d465?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x18d465=!1,i}),_0x42a531=_0x54c2e6(void 0,(function(){return _0x42a531.toString().search("(((.+)+)+)+$").toString().constructor(_0x42a531).search("(((.+)+)+)+$")})),_0x18d465;_0x42a531();var _0x383013={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,READY:4,LOST:5},_0x3a220c=new s$T,_0x447b75=25;function _0x2cb481(e,t,i){var n=e.vertexAttributes[0],r=n.typedArray,o=new Float32Array(r.buffer,r.byteOffset,r.byteLength/4),a=n.componentsPerAttribute,s=e.verticesCount,l=new Float32Array(3*s),u=e.attrLocation;u.aRatio=Object.keys(u).length;for(var c=0;c<s;c++){var h=new o$1p(o[c*a],o[c*a+1],o[c*a+2]),d=new o$1p;p$1d.multiplyByPoint(t,h,d);var f=a$18.fromCartesian(d),p=e$2d.toDegrees(f.longitude),_=e$2d.toDegrees(f.latitude),m=f.height,g=(p-i.left)/(i.right-i.left),x=(_-i.bottom)/(i.top-i.bottom),y=(m-i.minHeight)/(i.maxHeight-i.minHeight);l[3*c]=g,l[3*c+1]=x,l[3*c+2]=y}e.vertexAttributes.push({index:u.aRatio,typedArray:l,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0xd633a7(e){if(!e$2e(e))throw new t$15("context is required.");this._context=e,this._gl=e._gl,this._type=bt$6.INSTANCED_LAYER,this._group={},this._visible=!0,this._picking=!1,this._clampToObject=!1,this._profile=!1,this._visibleViewport=4095,this._maxVisibleAltitude=Number.MAX_VALUE,this._maxVisibleDistance=Number.MAX_VALUE,this._minVisibleAltitude=0,this._minVisibleDistance=0,this._filterMode=_0x219958.DISTANCE_FROM_EYE_POINT,this._filterPixel=0,null!==e.s3tc?this._supportCompressType=1:null!==e.pvrtc?this._supportCompressType=2:null!==e.etc1&&(this._supportCompressType=3),this._isOverLay=!1,this._spatialQueryEnable=!1,this._sqTextures=[],this._sqMode=j$Z.Disjoint,this._allColorCommand=[],this._shadowType=_0x325616.NONE,this._needToRender=!0,this._addedEvent=new o$1h,this._volume=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:new o$1p,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}},this._pbrParameter=Xe$e.NONE,this._mixColorType=_0x2b839f.MIX,_0x29d1c7.S3MBTaskProcessor.scheduleTask({})}function _0xbe0258(e,t,i){if(e$2e(e._profileCommand)||e.createProfileCommand(t),e._profileCommand.derivedCommands={},i){var n=_0x45bcf8.createClampObjectColorRenderState();e._profileCommand.renderState=d$1m.fromCache(n),e._profileCommand.pass=Le$q.ClampObject,e$2e(e._stencilCommand)||e.createClampCommand()}else e._profileCommand.renderState=d$1m.fromCache({cull:{enabled:group.cullEnabled,face:group.cullFace},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),e.removeProgramDefine(!0,!0,"ClampObject",!0)}function _0x47a2a8(e,t){var i=e._group[t],n=e.customRequestHeaders,r=i.state;if(_0x383013.UNLOAD==r){var o=o$O(t,(function(e){return o$10(e,n)}));e$2e(o)&&(i.state=_0x383013.LOADING,o.then((function(e){i._arrayBuffer=e,t.endsWith(".obj")?o$10(t.replace(".obj",".mtl")).then((function(e){i.mtlbuffer=e,i.state=_0x383013.LOADED})).otherwise((function(){i.state=_0x383013.LOADED})):i.state=_0x383013.LOADED}),(function(e){i.state=_0x383013.LOST})))}_0x383013.LOADED==r&&(e$2e(i._arrayBuffer)?_0x509aeb(e,i,i._arrayBuffer):e$2e(i._threedmodeling)&&_0x268bca(e,i._threedmodeling,i))}function _0x2b3d89(e){return e._shadowType==_0x325616.SELECTION||e._shadowType==_0x325616.ALL}function _0x509d8b(e,t){var i=e.instances.length,n=e.renderEntities;if(n&&!(n.length<1)&&0!==i){var r=e.instances.values[0];if(e$2e(r)){var o=e$2e(r.localTransform)?_0x447b75+8:_0x447b75,a=e.oriCenter,s=e.oriRadius;e.instanceBuffer&&e.instanceBuffer.destroy();for(var l=new Float32Array(i*o),u=0;u<i;u++){(m=e.instances.values[u]).index=u,_0x1e4fb8(t,l,m,u*o)}e.instanceBuffer=t$X.createVertexBuffer({context:t,typedArray:l,usage:A$18.STATIC_DRAW}),e.instanceBuffer.vertexArrayDestroyable=!1;u=0;for(var c=n.length;u<c;u++){var h=n[u],d=h._colorCommand;d.vertexArray.destroy();for(var f=0;f<h.attributes.length;f++){var p=h.attributes[f];e$2e(p.instanceDivisor)&&p.instanceDivisor>0&&(p.vertexBuffer=e.instanceBuffer)}d.vertexArray=new c$13({context:t,attributes:h.attributes,indexBuffer:h.indexBuffer}),d.instanceCount=i;for(var _=0;_<i;_++){var m;if((m=e.instances.values[_]).index=_,m.oriCenter=a,m.oriRadius=s,!e$2e(m.boundingSphere)){m.boundingSphere=new i$1d;var g=o$1p.maximumComponent(m.scale);m.boundingSphere.radius=s*g;var x=m$19.eastNorthUpToFixedFrame(m.position,t$12.WGS84,new p$1d);p$1d.multiplyByPoint(x,a,m.boundingSphere.center)}}}e.instanceCount=i,e.dirty=!1}}}function _0x1e4fb8(e,t,i,n){var r=o$1p.clone(i._offsetPosition),o=i._quaternion;if(i._mode===C$14.COLUMBUS_VIEW){var a=p$1e.fromRotationY(-Math.PI/2),s=n$15.fromRotationMatrix(a);n$15.multiply(o,s,o)}var l=i._scale,u=i$12.fromCartesian(r),c=i.visible?u.high:o$1p.ZERO,h=i.visible?u.low:o$1p.ZERO,d=i._color,f=i._pickColor,p=i._offset,_=i.oriRadius,m=i.localTranslation,g=i.localQuaternion,x=0;t[n+x++]=c.x,t[n+x++]=c.y,t[n+x++]=c.z,t[n+x++]=h.x,t[n+x++]=h.y,t[n+x++]=h.z,t[n+x++]=o.x,t[n+x++]=o.y,t[n+x++]=o.z,t[n+x++]=o.w,t[n+x++]=l.x,t[n+x++]=l.y,t[n+x++]=l.z,t[n+x++]=_,t[n+x++]=d.red,t[n+x++]=d.green,t[n+x++]=d.blue,t[n+x++]=d.alpha,t[n+x++]=f.x,t[n+x++]=f.y,t[n+x++]=f.z,t[n+x++]=f.w,t[n+x++]=p.x,t[n+x++]=p.y,t[n+x++]=p.z,e$2e(m)&&(t[n+x++]=m.x,t[n+x++]=m.y,t[n+x++]=m.z,t[n+x++]=1),e$2e(g)&&(t[n+x++]=g.x,t[n+x++]=g.y,t[n+x++]=g.z,t[n+x++]=g.w)}function _0x526522(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;if(!(e.arrIndexPackage&&e.vertexPackage&&e.collection&&e.mapPass))throw new t$15("gl texture indexes vertexes collection is required to create RenderEntityPagelod");this._arrIndexPackage=t,this._vertexPackage=i,this._collection=e.collection,this._layer=this._collection,this._attributeLocations={},this._initialize=!1,this._geoMatrix=u$Z(e.geoMatrix,p$1d.IDENTITY),this._mapPass=n,this._colorCommand=void 0,this._stencilCommand=void 0,this._profileCommand=void 0,this._spatialQueryCommand=void 0,this._boundingVolume=e.boundingVolume,this._ownerGroup=e.ownerGroup;var r=this._arrIndexPackage[0];this._material=e$2e(r)&&e$2e(r.materialCode)?n[r.materialCode]:_0xf77618.Default,this._materialUBO=new _0x4f8f70(this,this._material,this._collection)}function _0x268bca(e,t,i){i.state=_0x383013.PARSING;for(var n=new o$1p,r=[],o=Number.MAX_VALUE,a=Number.MIN_VALUE,s=0;s<t.vertexCount;s++)o$1p.fromArray(t.positionAttr,3*s,n),r.push(o$1p.clone(n)),o=Math.min(o,n.y),a=Math.max(a,n.y);var l=p$1d.clone(p$1d.IDENTITY,new p$1d),u=i$1d.fromPoints(r,new i$1d);i$1d.transform(u,l,u);var c=new _0x526522({vertexPackage:{vertexAttributes:[{index:0,typedArray:t.positionAttr,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1},{index:1,typedArray:t.colorAttr,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:0},{index:2,typedArray:t.normalAttr,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:0}],attrLocation:{aPosition:0,aColor:1,aNormal:2},instanceCount:0,instanceMode:0,instanceIndex:-1,verticesCount:t.vertexCount},arrIndexPackage:[{indicesTypedArray:t.indices,indexType:0,primitiveType:4}],mapPass:{},boundingVolume:u,collection:e,ownerGroup:i,geoMatrix:l});c.initialize(e),i.renderEntities.push(c),i._threedmodeling=void 0,i.state=_0x383013.READY,i.ready=!0,e._addedEvent.raiseEvent(i.url)}function _0x4dbf0f(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function _0x48c024(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function _0x509aeb(e,t,i){var n,r={buffer:i,supportCompressType:e._supportCompressType},o=!1;if(t.url.endsWith("s3mb")||/\.(x|X|dae|DAE|osgb|obj)$/.test(t.url)){if(/\.(x|X|osgb)$/.test(t.url)&&(r.isOSGB=!0),/\.(obj|dae|DAE)$/.test(t.url)&&(r.mtlbuffer=t.mtlbuffer,r.useAssimp=!0),r.suffix=t.url.substring(t.url.lastIndexOf(".")+1),o=!0,_0x29d1c7.init||_0x29d1c7.initWebAssembly(),!_0x29d1c7.taskProcessorReady)return;n=_0x29d1c7.S3MBTaskProcessor.scheduleTask(r,[i])}else n=_0x29d1c7.S3MTaskProcessor.scheduleTask(r,[i]);e$2e(n)?(t.state=_0x383013.PARSING,t._arrayBuffer=void 0,n.then((function(i){i&&i.result?(o?_0x1c8b9c(i,t,e):_0x224496(i,t,e),t.ready=!0,t.dirty=!1,t.state=_0x383013.READY):t.state=_0x383013.UNLOAD})).otherwise((function(e){console.log(e)})).then((function(){e._addedEvent.raiseEvent(t.url)}))):t.state=_0x383013.LOADED}function _0x1c8b9c(e,t,i){i._gl;var n=i._context,r=e.groupNode,o=e.geoPackage,a=e.matrials.material,s={},l=0,u=0,c=o$1l.defer();a.map((function(i){var r=i.material,o=r.id,a=new _0xf77618({});s[o]=a,a.createCommonParamter(r),a.createPBRParamter(r);var h=r.textureunitstates;l+=h.length;for(var d=0;d<h.length;d++){var f=h[d].textureunitstate,p=f.id,_=0===f.addressmode.u?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,m=0===f.addressmode.v?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;a._texMatrix=p$1d.unpack(f.texmodmatrix);var g=e.texturePackage[p],x=p;if(e$2e(g)&&!n.webgl2)(!e$2d.isPowerOfTwo(g.width)||!e$2d.isPowerOfTwo(g.height))&&(_=q$1a.CLAMP_TO_EDGE,m=q$1a.CLAMP_TO_EDGE);if(e$2e(g)||!p.endsWith("jpg")&&!p.endsWith("png")){if(e$2e(g)&&g.width>0&&g.height>0&&g.imageBuffer.length>0){var y=Se$e.CreateTexture(x,n,g.width,g.height,g.nFormat,g.compressType,g.imageBuffer,!1,_,m),v=p.indexOf("PBRMaterialParam")>-1,$=a._emissiveTextureIndex===d,b=a._normalTextureIndex===d,T=a._metallicRoughnessTextureIndex===d,C=a._occlusionTextureIndex===d;v?(a._usePBRTextureBatch=!0,a.pbrParamTexture=y):$?a.emissiveTexture=y:b?a.normalTexture=y:T?a.metallicRoughnessTexture=y:C?a.occlusionTexture=y:a._textures.push(y)}c.resolve()}else{var S=t.url.substring(0,t.url.lastIndexOf("/")+1)+p;o$10(S).then((function(e){var t=S.endsWith("jpg")?"jpg":"png";a.createJPGPNG(x,n,d,e,_,m,t).then((function(e){++u==l&&c.resolve()})).otherwise((function(){++u==l&&c.resolve()}))})).otherwise((function(){++u==l&&c.resolve()}))}}0===h.length&&(++u==l&&c.resolve())})),c.promise.then((function(){var n=r.pageLods,a=[],l=new i$1d;if(e$2e(n)){n.forEach((e=>{e.boundingSphere&&a.push(e.boundingSphere)})),i$1d.fromBoundingSpheres(a,l);for(var u=0;u<n.length;u++){n[u].geodes.map((function(n){for(var r=n.matrix,a=n.skeletonNames,u=0;u<t.instances.length;u++){var c=t.instances.values[u];c.oriCenter=o$1p.clone(l.center),c.oriRadius=l.radius,e$2e(t.oriCenter)||(t.oriCenter=c.oriCenter,t.oriRadius=c.oriRadius);var h=c.position,d=m$19.eastNorthUpToFixedFrame(h,t$12.WGS84,new p$1d),f=i$1d.transform(l,d,new i$1d);c.boundingSphere=f}for(var p=0;p<a.length;p++){for(var _=a[p],m=o[_],g=m.vertexPackage,x=m.arrIndexPackage,y={},v=0;v<x.length;v++){var $=x[v];if(e$2e($)){var b=$.materialCode,T=s[b];y[b]=T}}var C=new _0x526522({vertexPackage:g,arrIndexPackage:x,version:e.version,mapPass:y,collection:i,ownerGroup:t,geoMatrix:r});C.initialize(i),t.renderEntities.push(C)}}))}}else{for(var c=0;c<t.instances.length;c++){var h=t.instances.values[c];h.oriCenter=o$1p.clone(l.center),h.oriRadius=l.radius,e$2e(t.oriCenter)||(t.oriCenter=h.oriCenter,t.oriRadius=h.oriRadius);var d=h.position,f=m$19.eastNorthUpToFixedFrame(d,t$12.WGS84,new p$1d),p=i$1d.transform(l,f,new i$1d);h.boundingSphere=p}var _=[];for(var m in o){var g=($=o[m]).vertexPackage,x=new Float32Array(g.vertexAttributes[0].typedArray.buffer);p=i$1d.fromVertices(x);_.push(p)}i$1d.fromBoundingSpheres(_,l),t.instances.values[0].boundingSphere=i$1d.transform(l,f,new i$1d);var y=0;for(var v in o){g=($=o[v]).vertexPackage;for(var $,b=$.arrIndexPackage,T={},C=0;C<b.length;C++){var S=b[C];if(e$2e(S)){var w=S.materialCode,E=s[w];T[w]=E}}var P=e$2e(e.mats[y])?e.mats[y]:e.mats[0];y++;var A=new _0x526522({vertexPackage:g,arrIndexPackage:b,version:e.version,mapPass:T,collection:i,ownerGroup:t,geoMatrix:p$1d.unpack(P)});A.initialize(i),t.renderEntities.push(A)}}}))}function _0x224496(e,t,i){i._gl;for(var n=i._context,r=_0x3a220c.read(e.xmlDoc).firstChild,o=r.namespaceURI,a=_0x2493ff(_0x11f496(r,"Material3Ds",o),"material",o),s={},l=0,u=a.length;l<u;l++){var c=a[l],h=_0x82a482(c,"name",o),d=new _0xf77618({});s[h]=d;var f=_0x11f496(c,"Ambient",o),p=_0x5123ec(f,"AmbientR",o),_=_0x5123ec(f,"AmbientG",o),m=_0x5123ec(f,"AmbientB",o),g=_0x5123ec(f,"AmbientA",o);d._ambientColor=new e$1X(p,_,m,g);var x=_0x11f496(c,"Diffuse",o);p=_0x5123ec(x,"DiffuseR",o),_=_0x5123ec(x,"DiffuseG",o),m=_0x5123ec(x,"DiffuseB",o),g=_0x5123ec(x,"DiffuseA",o),d._diffuseColor=new e$1X(p,_,m,g);var y=_0x11f496(c,"Specular",o);p=_0x5123ec(y,"SpecularR",o),_=_0x5123ec(y,"SpecularG",o),m=_0x5123ec(y,"SpecularB",o),g=_0x5123ec(y,"SpecularA",o),d._specularColor=new e$1X(p,_,m,g);var v=_0x5123ec(c,"Shininess",o);d._shininess=v,_0x11f496(c,"TransparentSorting",o),d._bTransparentSorting=_0x292af8(c,"TransparentSorting",o)||d._diffuseColor.alpha<1;var $=_0x11f496(c,"texture",o),b=_0x82a482($,"name",o),T=_0x11f496($,"AddressMode",o),C=_0x82a482(T,"u",o),S=_0x82a482(T,"v",o);C="TAM_WRAP"===C?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,S="TAM_WRAP"===S?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;var w=e.texturePackage[b];if(e$2e(w)){b=n._id+"_"+b,(!e$2d.isPowerOfTwo(w.width)||!e$2d.isPowerOfTwo(w.height))&&(C=q$1a.CLAMP_TO_EDGE,S=q$1a.CLAMP_TO_EDGE);var E=Se$e.CreateTexture(b,n,w.width,w.height,w.nFormat,w.compressType,w.imageBuffer,!1,C,S);d._textures.push(E),0===w.compressType&&(i._supportCompressType=0)}}var P=_0x3ffe87(_0x11f496(r,"PageLods",o),"Geode",o);for(l=0,u=P.length;l<u;l++){for(var A=[],L=P[l],M=_0x82a482(L,"GeoDeModMatrix",o).split(","),R=0;R<16;R++)M[R]=parseFloat(M[R]);M=p$1d.unpack(M,0);for(var O=_0x3ffe87(L,"GeoName",o),D=[],I=0,F=O.length;I<F;I++){var B=O[I].textContent.trim();-1===D.indexOf(B)&&D.push(B)}for(var N=new i$1d,G=0;G<D.length;G++){if(e$2e(J=e.geoPackage[D[G]])){var z=_0x3fb4b8(ee=J.vertexPackage,M);A.push(z)}}if(A.length>0){var U=i$1d.fromBoundingSpheres(A,new i$1d),V=!1;t.instances.length>0&&e$2e(t.instances.values[0].localTransform)&&(i$1d.transform(U,t.instances.values[0].localTransform,U),V=!0);for(var k=[],W=0;W<t.instances.length;W++){var H=t.instances.values[W];H.oriCenter=o$1p.clone(U.center),H.oriRadius=U.radius,e$2e(t.oriCenter)||(t.oriCenter=H.oriCenter,t.oriRadius=H.oriRadius);var q=H.position,j=m$19.eastNorthUpToFixedFrame(q,t$12.WGS84,new p$1d),X=i$1d.transform(U,j,new i$1d),Y=V?2:o$1p.maximumComponent(H.scale);X.radius=X.radius*Y,H.boundingSphere=X,k.push(X)}i$1d.fromBoundingSpheres(k,N)}var Z=new p$1d;if(e$2e(i._volume)){var K=t.instances.values[0]._offsetPosition,Q=new i$16;j=m$19.headingPitchRollToFixedFrame(K,Q,t$12.WGS84,m$19.eastNorthUpToFixedFrame);Z=p$1d.multiply(j,M,Z),Z=p$1d.multiplyByScale(Z,t.instances.values[0].scale,Z)}for(F=0;F<D.length;F++){var J;if(e$2e(J=e.geoPackage[D[F]])){var ee=J.vertexPackage,te=J.arrIndexPackage,ie={};for(var ne in te){var re=te[ne];if(e$2e(re)){d=s[h=re.materialCode];ie[h]=d}}e$2e(i._volume)&&_0x2cb481(ee,Z,i._volume._volBounds);var oe=new _0x526522({vertexPackage:ee,arrIndexPackage:te,version:e.version,mapPass:ie,boundingVolume:N,collection:i,ownerGroup:t,geoMatrix:M});oe.initialize(i),t.renderEntities.push(oe)}}}}function _0x3fb4b8(e,t){for(var i=[],n=new i$1d,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1d.fromPoints(i,n),i.length=0,i$1d.transform(n,t,n),n}function _0x11f496(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(e$2e(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function _0x3ffe87(e,t,i){if(e$2e(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];e$2e(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}}function _0x2493ff(e,t,i){if(!e$2e(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];e$2e(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function _0x5123ec(e,t,i){var n=_0x11f496(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function _0x82a482(e,t,i){var n=_0x11f496(e,t,i);if(e$2e(n))return n.textContent.trim()}function _0x292af8(e,t,i){var n=_0x11f496(e,t,i);if(e$2e(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function _0x4b14bd(e,t,i,n,r){var o=e$2e(r)?_0x447b75+8:_0x447b75,a=S$14.getSizeInBytes(S$14.FLOAT),s=0;t.aPosHigh=i++,e.push({name:"aPosHigh",index:t.aPosHigh,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:s,strideInBytes:a*o,instanceDivisor:1}),s+=3,t.aPosLow=i++,e.push({name:"aPosLow",index:t.aPosLow,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=3,t.aQuaternion=i++,e.push({name:"aQuaternion",index:t.aQuaternion,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aScaleAndRadius=i++,e.push({name:"aScaleAndRadius",index:t.aScaleAndRadius,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aColor2=i++,e.push({name:"aColor2",index:t.aColor2,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aPickColor=i++,e.push({name:"aPickColor",index:t.aPickColor,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aOffset=i++,e.push({name:"aOffset",index:t.aOffset,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=3,e$2e(r)&&(t.aLocalTranslation=i++,e.push({name:"aLocalTranslation",index:t.aLocalTranslation,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aLocalQuaternion=i++,e.push({name:"aLocalQuaternion",index:t.aLocalQuaternion,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4)}function _0x2d0304(e,t,i){var n=t.layer,r={uTexture:function(){return t.texture||n._context._defaultTexture},uHasNormal:function(){return t.hasNormal},uAmbientColor:function(){return n._mixColorType===_0x2b839f.REPLACE?e$1X.WHITE:t.ambientColor},uDiffuseColor:function(){return n._mixColorType===_0x2b839f.REPLACE?e$1X.WHITE:t.diffuseColor},uSpecularColor:function(){return t.specularColor},uShininess:function(){return t.shininess},uPicking:function(){return t.layer._picking},uGeoMat:function(){return t.geoMat},uRangeMode:function(){return n.filterMode},uVisibleDistance:function(){return new o$1o(n.maxVisibleDistance,n.minVisibleDistance)},uFilterPixel:function(){return n.filterPixel},uFillColor:function(){return t.diffuseColor},uVolumeTexture:function(){return n._volume._volTexture},width:function(){return n._volume._volImageBuffer.nWidth},height:function(){return n._volume._volImageBuffer.nHeight},depth:function(){return n._volume._volImageBuffer.nDepth},sideBlockCount:function(){return n._volume._volImageBuffer.nSideBlockCount},blockLength:function(){return n._volume._volImageBuffer.nBlockLength},texLength:function(){return n._volume._volImageBuffer.nLength},uFilterMode:function(){var e=0;return e$2e(n._volume.hypsometricSetting)&&n._volume.hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(e=1),e},uMixColorType:function(){return n._mixColorType},uDataFloor:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMinKey:0},uDataCeil:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMaxKey:0},uVolumeType:function(){return e$2e(n._volume.hypsometricSetting)&&n._volume.hypsometricSetting.filterMode===k$S.FilterMode.LINEAR?0:1},uHypOpacity:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.Opacity:1},uHypContourInterval:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.LineInterval:100},uHypLineColor:function(){var e=new e$2c(0,1,1,1);return e$2e(n._volume.hypsometricSetting)&&(e.x=n._volume.hypsometricSetting.LineColor.red,e.y=n._volume.hypsometricSetting.LineColor.green,e.z=n._volume.hypsometricSetting.LineColor.blue,e.w=n._volume.hypsometricSetting.LineColor.alpha),e},uHypContourFillMode:function(){var e=1;if(e$2e(n._volume.hypsometricSetting))switch(n._volume.hypsometricSetting.DisplayMode){case k$S.DisplayMode.NONE:e=0;break;case k$S.DisplayMode.FACE:e=1;break;case k$S.DisplayMode.LINE:e=2;break;case k$S.DisplayMode.FACE_AND_LINE:e=3}return e},uHypFloor:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMaxKey:0},uHypMaxVisibleValue:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.MaxVisibleValue:0},uHypMinVisibleValue:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.MinVisibleValue:0},uNoValueColor:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.noValueColor:e$1X.WHITE},uHypsometricVisible:function(){return 1},uHypHasAnalysisRegion:function(){return 0},uHypsometricRenderTexture:function(){return 0},uHypsometricTexture:function(){return n._volume._hypsometricTexture},uBaseColorFactor:function(){return e$2e(i._baseColor)?i._baseColor:n._PBRMaterialParams[t.groupName].baseColorFactor},uBaseColorTextureIndex:function(){return i._baseColorTextureIndex>-1?i._baseColorTextureIndex:n._PBRMaterialParams[t.groupName].baseColorTextureIndex},uMetallicFactor:function(){return e$2e(i._metallicFactor)?i._metallicFactor:n._PBRMaterialParams[t.groupName].metallic},uRoughnessFactor:function(){return e$2e(i._roughnessFactor)?i._roughnessFactor:n._PBRMaterialParams[t.groupName].roughness},uEmissiveFactor:function(){return e$2e(i._emissiveFactor)?i._emissiveFactor:n._PBRMaterialParams[t.groupName].emissionFactor},uEmissionTexture:function(){return e$2e(i.emissiveTexture)&&i._emissiveTextureIndex>-1?i.emissiveTexture:n._PBRMaterialParams[t.groupName].emissiveTexture},uEmissiveUVOffsetAndTiling:function(){var e=i._emissiveTextureMotion,t=new e$2c,n=performance.now()/1e3;if(e._offsetPeriod>0){var r=n%e._offsetPeriod;t.x=r*e._offsetSpeedU,t.y=r*e._offsetSpeedV}else t.x=0,t.y=0;if(e._tilingPeriod>0){var o=n%e._tilingPeriod;t.z=1+o*e._tilingSpeedU,t.w=1+o*e._tilingSpeedV}else t.z=1,t.w=1;return t},uBaseTexture:function(){return e$2e(i.baseColorTexture)&&i._baseColorTextureIndex>-1?i.baseColorTexture:n._PBRMaterialParams[t.groupName].baseTexture},uNormalTexture:function(){return e$2e(i.normalTexture)&&i._normalTextureIndex>-1?i.normalTexture:n._PBRMaterialParams[t.groupName].normalTexture},uMetallicRoughnessTexture:function(){return e$2e(i.metallicRoughnessTexture)&&i._metallicRoughnessTextureIndex>-1?i.metallicRoughnessTexture:n._PBRMaterialParams[t.groupName].metallicRoughnessTexture},uOcclusionTexture:function(){return e$2e(i.occlusionTexture)&&i._occlusionTextureIndex>-1?i.occlusionTexture:n._PBRMaterialParams[t.groupName].occlusionTexture}};r=p$19(r,i.createPBRUniformMap()),r=p$19(r,n._frameState.lightSource.createUniformMap()),e.uniformMap=r}function _0x376c35(e,t,i,n){var r=t$10.createIfNeeded(t).fetchImage().then((function(t){var r=new t$U({context:e,source:t,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.LINEAR_MIPMAP_LINEAR,magnificationFilter:tt$i.LINEAR})});!e$2d.isPowerOfTwo(r.width)||!e$2d.isPowerOfTwo(r.height)||r.generateMipmap(I$1e.NICEST),i[n]=r})).otherwise((function(){i[n]=void 0}));i[n]=r}function _0x2362db(e,t){if(e$2e(e._group[t])&&e._group[t].renderEntities.length>0)for(var i=e._group[t].renderEntities,n=0;n<i.length;n++)e$2e(i[n]._colorCommand)&&(e$2e(e._PBRMaterialParams[t])&&e$2e(e._PBRMaterialParams[t].roughness)?(i[n].appendProgramDefine(!1,!0,D$V.BRDF,!1),e._PBRMaterialParams[t].baseColorTextureIndex>-1&&e$2e(e._PBRMaterialParams[t].baseTexture)&&i[n].appendProgramDefine(!1,!0,D$V.HAS_BASE_TEXTURE,!1),e._PBRMaterialParams[t].normalTextureIndex>-1&&e$2e(e._PBRMaterialParams[t].normalTexture)&&i[n].appendProgramDefine(!1,!0,D$V.HAS_NORMAL_TEXTURE,!1),e._PBRMaterialParams[t].emissionTextureIndex>-1&&i[n].appendProgramDefine(!1,!0,D$V.HAS_EMISSIVE_TEXTURE,!1),e$2e(e._frameState.specularEnvironmentMaps)&&i[n].appendProgramDefine(!1,!0,D$V.IBL,!1)):(i[n].removeProgramDefine(!1,!0,D$V.BRDF,!1),i[n].removeProgramDefine(!1,!0,D$V.HAS_BASE_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,D$V.HAS_NORMAL_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,D$V.HAS_EMISSIVE_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,D$V.IBL,!1)))}Object.defineProperties(_0xd633a7.prototype,{type:{get:function(){return this._type}},group:{get:function(){return this._group}},visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("value",e),this._visible=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){o$1q.typeOf.number("maxVisibleAltitude",e),this._maxVisibleAltitude=e}},maxVisibleDistance:{get:function(){return this._maxVisibleDistance},set:function(e){o$1q.typeOf.number("maxVisibleDistance",e),this._maxVisibleDistance=e}},minVisibleDistance:{get:function(){return this._minVisibleDistance},set:function(e){o$1q.typeOf.number("minVisibleDistance",e),this._minVisibleDistance=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){o$1q.typeOf.number("minVisibleAltitude",e),this._minVisibleAltitude=e}},filterMode:{get:function(){return this._filterMode},set:function(e){o$1q.typeOf.number("filterMode",e),this._filterMode=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){o$1q.typeOf.number("filterPixel",e),this._filterPixel=e}},isOverLay:{get:function(){return this._isOverLay},set:function(e){o$1q.typeOf.bool("value",e),this._isOverLay=e}},clampToObject:{get:function(){return this._clampToObject},set:function(e){if(o$1q.typeOf.bool("value",e),this._clampToObject!==e){this._clampToObject=e;var t=this._group;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];if(!n.ready)continue;for(var r=0,o=n.renderEntities.length;r<o;r++){var a=n.renderEntities[r];this._profile?_0xbe0258(a,this,e):e$2e(a._colorCommand)&&(a._colorCommand.derivedCommands={},a.createColorRenderState(n,e),e?(a._colorCommand.pass=Le$q.ClampObject,e$2e(a._stencilCommand)||a.createClampCommand(),a.appendProgramDefine(!0,!0,"ClampObject",!1)):a.removeProgramDefine(!0,!0,"ClampObject",!1))}}}}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}},addedEvent:{get:function(){return this._addedEvent}},mixColorType:{get:function(){return this._mixColorType},set:function(e){this._mixColorType!==e&&(this._mixColorType=e)}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders!==e&&(this._customRequestHeaders=e)}}}),_0xd633a7.prototype.add=function(e,t,i,n){o$1q.defined("url",e),o$1q.typeOf.string("url",e),o$1q.defined("attrs",t),Array.isArray(t)||(t=[t]),e$2e(this._group[e])||(this._group[e]={instances:new e$1Q,ready:!1,state:e$2e(i)?_0x383013.LOADED:_0x383013.UNLOAD,instanceCount:0,instanceBuffer:void 0,renderEntities:[],cullEnabled:!1,cullFace:G$1a.BACK,oriCenter:void 0,oriRadius:void 0,dirty:!1,url:e});for(var r=this._group[e],o=this._context,a=0,s=t.length;a<s;a++){var l=t[a],u=u$Z(l.id,r.instances.length);if(r.instances.contains(u))console.log("id "+u+" exist");else{l.sceneMode=this._context._us._mode;var c=new _0x24f13b(o,u,r,l);r.instances.set(u,c)}}if(e$2e(i))if(n=u$Z(n,!0),i instanceof Blob){var h=new FileReader,d=this;h.addEventListener("load",(function(){if(n){var t=new Uint8Array(h.result).buffer;d._group[e]._arrayBuffer=t}else d._group[e]._arrayBuffer=h.result})),h.addEventListener("error",(function(){})),h.readAsArrayBuffer(i)}else if(i instanceof ArrayBuffer)if(n){var f=i;this._group[e]._arrayBuffer=f}else this._group[e]._arrayBuffer=i;else{var p=_0x680f96.getDataShape(i);r=_0x680f96.updateSurfaceMesh(i,p,!0);this._group[e]._threedmodeling=r}r.dirty=!0},_0xd633a7.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0xd633a7.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0xd633a7.prototype.removeCollection=function(e){o$1q.defined("removeCollection url",e);var t=this._group[e];if(!e$2e(t))return!1;for(var i=0,n=t.renderEntities.length;i<n;i++)t.renderEntities[i].destroy();return t.renderEntities.length=0,t.instances.removeAll(),this._group[e]=null,delete this._group[e],!0},_0xd633a7.prototype.getInstance=function(e,t){o$1q.defined("S3MInstanceCollection getInstance url",e),o$1q.defined("S3MInstanceCollection getInstance id",t);var i=this._group[e];if(e$2e(i))return i.instances.get(t)},_0xd633a7.prototype.removeInstance=function(e,t){o$1q.defined("removeInstance url",e),o$1q.defined("removeInstance ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(!e$2e(i))return!1;for(var n,r=0,o=t.length;r<o;r++){var a=t[r];e$2e(n=i.instances.get(a))&&(n.updateColor(e$1X.WHITE.withAlpha(0),n.id),n.isDeleted=!0,i.instances.remove(a),n=null,this._group[e].dirty=!0)}return!0},_0xd633a7.prototype.setCullEnabled=function(e,t){o$1q.typeOf.string("S3MInstanceCollection setCullEnabled url",e),t=u$Z(t,G$1a.BACK);var i=this._group[e];if(e$2e(i)&&(!i.cullEnabled||i.cullFace!==t)&&(i.cullEnabled=!0,i.cullFace=t,i.ready))for(var n=0,r=i.renderEntities.length;n<r;n++){var o=i.renderEntities[n],a=d$1m.getState(o._colorCommand.renderState);a.cull.enabled=!0,a.cull.face=t,o._colorCommand.renderState=d$1m.fromCache(a)}},_0xd633a7.prototype.setUnSelected=function(){var e=this._group;if(e$2e(e))for(var t in e){var i=e[t];if(e$2e(i.instances)&&!(i.instances.length<1))for(var n=0,r=i.instances.length;n<r;n++){i.instances.values[n].setUnSelected()}}},_0xd633a7.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;if(this._visible){if(e$2e(this._volume)){if(!this._volume._ready)return;this._volume.loadTexture(this._context)}var t=e.camera;if(!(t.positionCartographic.height>this._maxVisibleAltitude||t.positionCartographic.height<this._minVisibleAltitude)){this._frameState=e;var i=e.commandList,n=this._group,r=e.passes;for(var o in this._picking=r.pick,this._allColorCommand=[],n){var a=n[o];if(_0x47a2a8(this,o),a.ready){a.dirty&&_0x509d8b(a,this._context);for(var s=[],l=!1,u=0;u<a.instances.length;u++){var c=a.instances.values[u];0===u&&(l=c.color.alpha<1);var h=c.boundingSphere;s.push(h)}for(var d=i$1d.fromBoundingSpheres(s,new i$1d),f=0,p=a.renderEntities.length;f<p;f++){var _=a.renderEntities[f];if(_._materialUBO.update(this._context),this._clampToObject&&this._profile){if(e._fboState.frameBufferType===Qe$c.CLAMP)_._stencilCommand.boundingVolume=d,i.push(_._stencilCommand),_._profileCommand.boundingVolume=d,_._profileCommand.instanceCount=a.instanceCount,_._profileCommand.pass=Le$q.ClampObject,i.push(_._profileCommand);else if(this._spatialQueryEnable){e$2e(_._spatialQueryCommand)||_.createSpatialQueryCommand(this);var m=3===this._sqTextures.length?_._spatialQueryCommand:_._colorCommand;m.boundingVolume=d,m.instanceCount=a.instanceCount,m.pass=this._isOverLay?Le$q.OVERLAY_AGAINST_DEPTH:l?Le$q.TRANSLUCENT:Le$q.OPAQUE,e._fboState.enabled||i.push(m)}}else this._clampToObject&&(_._stencilCommand.boundingVolume=d,i.push(_._stencilCommand)),_._colorCommand.boundingVolume=d,_._colorCommand.instanceCount=a.instanceCount,_._colorCommand.pass=this._isOverLay?Le$q.OVERLAY_AGAINST_DEPTH:this._clampToObject?Le$q.ClampObject:l?Le$q.TRANSLUCENT:Le$q.OPAQUE,this._needToRender&&i.push(_._colorCommand),this._allColorCommand.push(_._colorCommand)}}}}}},_0xd633a7.prototype.isDestroyed=function(){return!1},_0xd633a7.prototype._updateShadow=function(e){var t=_0x2b3d89(e),i=e._group;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s._colorCommand.castShadows=t,s._colorCommand.receiveShadows=t}}},_0xd633a7.prototype.destroy=function(){for(var e in this._group){var t=this._group[e];if(t.ready){for(var i=0;i<t.renderEntities.length;i++){var n=t.renderEntities[i]._colorCommand;if(e$2e(n.vertexArray)&&!n.vertexArray.isDestroyed()){n.vertexArray._inner._indexBuffer.vertexArrayDestroyable=!0;for(var r=0;r<n.vertexArray._inner._attributes.length;r++){n.vertexArray._inner._attributes[r].vertexBuffer.vertexArrayDestroyable=!0}n.vertexArray=n.vertexArray.destroy()}n.shaderProgram=n.shaderProgram&&n.shaderProgram.destroy()}t.instanceBuffer=t.instanceBuffer&&!t.instanceBuffer.isDestroyed()&&t.instanceBuffer.destroy()}}return this._group=void 0,this._allColorCommand=[],i$11(this)},_0x526522.prototype.initialize=function(e){this._initialize||(this.createCommand(e),this._initialize=!0)},_0x526522.prototype.createVertexData=function(e){for(var t=this._vertexPackage.vertexAttributes,i=0,n=t.length;i<n;i++){var r=t[i];!e$2e(r.typedArray)||(r.vertexBuffer=t$X.createVertexBuffer({context:e,typedArray:r.typedArray,usage:A$18.STATIC_DRAW}),r.vertexBuffer.vertexArrayDestroyable=!1,r.typedArray=null,delete r.typedArray)}if(!e$2e(this._ownerGroup.instanceBuffer)){var o=this._ownerGroup.instances,a=void 0;o.length>0&&(a=o.values[0].localTransform);var s=o.length;this._ownerGroup.instanceCount=s;var l=e$2e(a)?_0x447b75+8:_0x447b75,u=new Float32Array(s*l);for(i=0;i<s;i++){var c=o.values[i];c.index=i,_0x1e4fb8(e,u,c,i*l)}this._ownerGroup.instanceBuffer=t$X.createVertexBuffer({context:e,typedArray:u,usage:A$18.STATIC_DRAW})}for(var h in this._attributeLocations=this._vertexPackage.attrLocation,this._attributeLocations){t[d=this._attributeLocations[h]].name=h}var d=Object.keys(this._attributeLocations).length;return _0x4b14bd(t,this._attributeLocations,d,this._ownerGroup,a),t},_0x526522.prototype.createCommand=function(e){var t=e._context,i=this.createVertexData(t),n=Le$q.OPAQUE;if(!e$2e(this._arrIndexPackage)||!e$2e(this._arrIndexPackage[0]))return;var r=this._arrIndexPackage[0],o=this._vertexPackage.verticesCount,a=ce$z.UNSIGNED_SHORT;(1===r.indexType||o>=e$2d.SIXTY_FOUR_KILOBYTES)&&t.elementIndexUint&&(a=ce$z.UNSIGNED_INT);var s=t$X.createIndexBuffer({context:t,typedArray:r.indicesTypedArray,usage:A$18.STATIC_DRAW,indexDatatype:a});s.vertexArrayDestroyable=!1,this.indexBuffer=s,this.attributes=i;var l=this._mapPass[r.materialCode]||_0xf77618.Default;this._arrIndexPackage[0]=null,!0===l._bTransparentSorting&&(n=Le$q.TRANSLUCENT);var u=W$18.TRIANGLES;switch(r.primitiveType){case 1:u=W$18.POINTS;break;case 2:u=W$18.LINES;break;case 4:u=W$18.TRIANGLES}n=e._isOverLay?Le$q.OVERLAY_AGAINST_DEPTH:n;var c=new i$$({primitiveType:u,boundingVolume:this._boundingVolume,pass:n,owner:this,cull:!0}),h=e._context.uniformState;c.addUniformBuffer(h._sceneUBO),c.addUniformBuffer(h._lightUBO),c.addUniformBuffer(this._materialUBO),e._shadowType===_0x325616.ALL||e._shadowType===_0x325616.SELECTION?(c.castShadows=!0,c.receiveShadows=!0):(c.castShadows=!1,c.receiveShadows=!1),c.pickId="vPickColor",c.instanceCount=this._ownerGroup.instances.length,c.vertexArray=new c$13({context:t,attributes:i,indexBuffer:s});var d=new s$V({name:"S3MInstanceCollectionVertex",sources:[_0x4b6e8f]}),f=new s$V({name:"S3ModelFP",sources:[_0x47b2f7]});0===this._collection._supportCompressType&&f.defines.push("FLIP_Y"),e$2e(this._attributeLocations.aColor)&&d.defines.push("VertexColor"),l._textures.length>0&&e$2e(this._attributeLocations.aTexCoord0)&&(d.defines.push("TEXTURE"),f.defines.push("TEXTURE")),e$2e(this._attributeLocations.aNormal)&&(d.defines.push(D$V.HAS_NORMAL),f.defines.push(D$V.HAS_NORMAL)),e$2e(e._volume)&&(d.defines.push(D$V.VOLUME),f.defines.push(D$V.VOLUME),e._volume.hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(d.defines.push(D$V.VOLUME2),f.defines.push(D$V.VOLUME2))),this._collection.clampToObject&&(d.defines.push("ClampObject"),f.defines.push("ClampObject"));const p=e._frameState.lightSource;e$2e(p)&&(f.defines.push("MAX_POINT_LIGHT_COUNT "+s$J.MaxPointLightCount),f.defines.push("MAX_SPOT_LIGHT_COUNT "+s$J.MaxSpotLightCount),f.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$J.MaxDirectionLightCount),p.directionalLight.length>0&&f.defines.push(D$V.HAS_DIR_LIGHTS),p._visibleLightList[_0x4970c2.POINT].length>0&&f.defines.push(D$V.HAS_POINT_LIGHTS),p._visibleLightList[_0x4970c2.SPOT].length>0&&f.defines.push(D$V.HAS_SPOT_LIGHTS),p.hemisphereLight.length>0&&f.defines.push(D$V.HAS_HEMISPHERE_LIGHTS));this._ownerGroup.instances.length>0&&e$2e(this._ownerGroup.instances.values[0].localTransform)&&d.defines.push("LocalTransform");var _=this._ownerGroup.url;(l._usePBR||e$2e(e._PBRMaterialParams[_])&&e._PBRMaterialParams[_].roughness>0)&&(f.defines.push(D$V.BRDF),(l.baseColorTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_].baseColorTextureIndex>-1&&e$2e(e._PBRMaterialParams[_].baseTexture))&&f.defines.push(D$V.HAS_BASE_TEXTURE),(l.uNormalTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_].normalTextureIndex>-1&&e$2e(e._PBRMaterialParams[_].normalTexture))&&f.defines.push(D$V.HAS_NORMAL_TEXTURE),(l.emissiveTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_].emissionTextureIndex>-1)&&f.defines.push(D$V.HAS_EMISSIVE_TEXTURE),(l.metallicRoughnessTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_]._metallicRoughnessTextureIndex>-1)&&f.defines.push(D$V.HAS_MetallicRoughness_TEXTURE),(l.occlusionTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_]._occlusionTextureIndex>-1)&&f.defines.push(D$V.HAS_OCCLUSION_TEXTURE),(e$2e(e._frameState.specularEnvironmentMaps)||e$2e(e._frameState.hdrEnvMap))&&(f.defines.push(D$V.IBL),e$2e(e._frameState.specularEnvironmentMaps)&&f.defines.push(D$V.KtxEnvMap)),e$2e(l._alphaMode)&&l._alphaMode===_0x36a597.MASK&&f.defines.push(D$V.MASK)),l.appendPBRMacroToShader(d,f);var m=e$2e(this._attributeLocations.aNormal);c.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:f,attributeLocations:this._attributeLocations});var g=l._diffuseColor,x=l._diffuseColor,y=l._specularColor,v=l._shininess;_0x2d0304(c,{texture:l._textures[0],hasNormal:m,ambientColor:g,diffuseColor:x,specularColor:y,shininess:v,layer:this._collection,geoMat:this._geoMatrix,groupName:_},l),this._texture=l._textures[0],this._colorCommand=c,this._vertexPackage=void 0,this._arrIndexPackage.length=0,this.createColorRenderState(this._ownerGroup,this._collection._clampToObject),this._collection._clampToObject&&(c.pass=Le$q.ClampObject,this.createClampCommand())},_0x526522.prototype.appendProgramDefine=function(e,t,i,n){var r=this._collection._context,o=n?this._profileCommand:this._colorCommand;if(e$2e(o)){var a=o.shaderProgram.fragmentShaderSource,s=o.shaderProgram.vertexShaderSource;e&&_0x4dbf0f(s,i),t&&_0x4dbf0f(a,i),o.shaderProgram.destroy(),o.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:this._attributeLocations}),e$2e(this._stencilCommand)&&(this._stencilCommand.shaderProgram=o.shaderProgram)}},_0x526522.prototype.removeProgramDefine=function(e,t,i,n){var r=this._collection._context,o=n?this._profileCommand:this._colorCommand;if(e$2e(o)){var a=o.shaderProgram.fragmentShaderSource,s=o.shaderProgram.vertexShaderSource;e&&_0x48c024(s,i),t&&_0x48c024(a,i),o.shaderProgram.destroy(),o.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:this._attributeLocations})}},_0x526522.prototype.createColorRenderState=function(e,t){if(t){var i=_0x45bcf8.createClampObjectColorRenderState();this._colorCommand.renderState=d$1m.fromCache(i)}else this._colorCommand.renderState=d$1m.fromCache({cull:{enabled:e.cullEnabled,face:e.cullFace},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND})},_0x526522.prototype.createClampCommand=function(){if(!e$2e(this._stencilCommand)){var e=_0x45bcf8.createClampObjectStencilRenderState(),t=e$2e(this._profileCommand)?this._profileCommand:this._colorCommand,i=i$$.shallowClone(t);i.renderState=d$1m.fromCache(e),this._stencilCommand=i}},_0x526522.prototype.createProfileCommand=function(e){if(!e$2e(this._profileCommand)){var t=this._colorCommand,i=t.shaderProgram.vertexShaderSource.clone(),n=t.shaderProgram.fragmentShaderSource.clone();i.defines.push("ClampObject"),n.defines.push("ClampObject"),i.defines.push("PROFILE"),n.defines.push("PROFILE");var r=e._context;r.drawBuffers&&r.colorBufferFloat&&r.depthTexture&&n.defines.push("MRT");var o=i$$.shallowClone(t);o.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._profileCommand=o}},_0x526522.prototype.createSpatialQueryCommand=function(e){if(!e$2e(this._spatialQueryCommand)){var t=this._colorCommand,i=t.shaderProgram.vertexShaderSource.clone(),n=t.shaderProgram.fragmentShaderSource.clone();i.defines.push("SQRESULT"),n.defines.push("SQRESULT"),e._frameState.useLogDepth&&n.defines.push("LOG_DEPTH");var r=i$$.shallowClone(t);r.uniformMap.uFrontDepthTexture=function(){return e._sqTextures[0]},r.uniformMap.uBackDepthTexture=function(){return e._sqTextures[1]},r.uniformMap.uFrontColorTexture=function(){return e._sqTextures[2]},r.uniformMap.uSQMode=function(){return e._sqMode},r.shaderProgram=r$14.fromCache({context:e._context,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._spatialQueryCommand=r}},_0x526522.prototype.destroy=function(){for(var e in this._mapPass)this._mapPass.hasOwnProperty(e)&&(this._mapPass[e]=this._mapPass[e]&&!this._mapPass[e].isDestroyed()&&this._mapPass[e].destroy());this._mapPass=void 0;var t=this._colorCommand;e$2e(t)&&(t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy(),this._colorCommand=void 0),e$2e(t=this._stencilCommand)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),this._stencilCommand=void 0),e$2e(t=this._profileCommand)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),this._profileCommand=void 0),this._vertexPackage=null,this._arrIndexPackage.length=0},_0xd633a7.prototype._setSQTextures=function(e){this._sqTextures=e},_0xd633a7.prototype._setSQMode=function(e){this._sqMode=e},_0xd633a7.prototype._getAllColorCommand=function(){return this._allColorCommand},_0xd633a7.prototype.setPBRMaterialFromJSON=function(e,t){if(this._pbrParameter===Xe$e.NONE){var i=this;e in i._PBRMaterialParams||(i._PBRMaterialParams[e]={metallic:0,roughness:0,baseColorFactor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,baseTexture:void 0,emissionFactor:o$1p.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseUri:""}),i._PBRMaterialParams[e].baseUri=i$1b(t),u$P(t).then((function(t){var n=t.material,r=n.pbrMetallicRoughness,o=n.textureunitstates;if(i._PBRMaterialParams[e].baseColorFactor=e$2e(r.baseColor)?e$2c.fromElements(r.baseColor.x,r.baseColor.y,r.baseColor.z,r.baseColor.w):i._PBRMaterialParams[e].baseColorFactor,i._PBRMaterialParams[e].baseColorTextureIndex=e$2e(r.baseColorTextureIndex)?r.baseColorTextureIndex:-1,i._PBRMaterialParams[e].emissionFactor=e$2e(r.emissiveFactor)?o$1p.fromElements(r.emissiveFactor.x,r.emissiveFactor.y,r.emissiveFactor.z):o$1p.UNIT_XYZ,i._PBRMaterialParams[e].emissionTextureIndex=e$2e(r.emissiveTextureIndex)?r.emissiveTextureIndex:i._PBRMaterialParams[e].emissionTextureIndex,i._PBRMaterialParams[e].metallic=e$2e(r.metallicFactor)?r.metallicFactor:i._PBRMaterialParams[e].metallic,i._PBRMaterialParams[e].roughness=e$2e(r.roughnessFactor)?r.roughnessFactor:i._PBRMaterialParams[e].roughness,i._PBRMaterialParams[e].occlusionTextureIndex=e$2e(r.occlusionTextureIndex)?r.occlusionTextureIndex:-1,i._PBRMaterialParams[e].normalTextureIndex=e$2e(r.normalTextureIndex)?r.normalTextureIndex:-1,-1!==r.baseColorTextureIndex){var a=i._PBRMaterialParams[e].baseUri+o[r.baseColorTextureIndex].textureunitstate.url;_0x376c35(i._context,a,i._PBRMaterialParams[e],"baseTexture")}if(-1!==r.normalTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.normalTextureIndex].textureunitstate.url;_0x376c35(i._context,a,i._PBRMaterialParams[e],"normalTexture")}if(-1!==r.emissiveTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.emissiveTextureIndex].textureunitstate.url;_0x376c35(i._context,a,i._PBRMaterialParams[e],"emissiveTexture")}if(-1!==r.metallicRoughnessTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.metallicRoughnessTextureIndex].textureunitstate.url;_0x376c35(i._context,a,i._PBRMaterialParams[e],"metallicRoughnessTexture")}if(-1!==r.occlusionTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.occlusionTextureIndex].textureunitstate.url;_0x376c35(i._context,a,i._PBRMaterialParams[e],"occlusionTexture")}_0x2362db(i,e)}))}},_0xd633a7.prototype.removePBRMaterial=function(e){delete this._PBRMaterialParams[e],_0x2362db(this,e)};var _0x48062a=(_0x209021=!0,function(e,t){var i=_0x209021?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x209021=!1,i}),_0xf2286=_0x48062a(void 0,(function(){return _0xf2286.toString().search("(((.+)+)+)+$").toString().constructor(_0xf2286).search("(((.+)+)+)+$")})),_0x209021;function _0x16da97(e){if(!e$2e(e))throw new t$15("scene are required.");if(!e.context.depthTexture)throw new t$15("the depth buffer is not supported.");this._scene=e,this._name="",this._frameState=void 0,this._isInitlized=!1,this._depthDirty=!1,this._bufferDirty=!1,this._updateIDs=!1,this._disjointIDs=[],this._intersectsIDs=[],this._ids=[],this._textures=[],this._depthBuffers=[],this._resultBuffer=void 0,this._disjointBuffer=void 0,this._worldMatrix=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._matDepthView=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._matDepthProject=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._boundingSphere=new i$1d,this._depthCommands=[],this._colorCommand=void 0,this._clearCommand=new t$W({color:new e$1X(0,0,0,0),stencil:0,depth:1}),this._geometry=void 0,this._layers=[],this._fillColor=new e$1X(1,1,0,.5),this._outlineColor=new e$1X(1,0,0,1),this._positionMode=j$Z.Disjoint,this._fillStyle=fr$3.Fill,this._positionMode=j$Z.Disjoint,this._beQueryCollection=void 0,this._queryCollection=void 0,this._allS3MColorCommand=[],this._profile=!1,this._clipLayers=new e$1Q,this._curFrameNumber=-1,this._width=1,this._height=1}function _0x17bab6(e){e$2e(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&!e._colorCommand.vertexArray.isDestroyed()&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&!e._colorCommand.shaderProgram.isDestroyed()&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0);for(var t=0;t<e._depthCommands.length;t++)e._depthCommands[t].vertexArray=e._depthCommands[t].vertexArray&&!e._depthCommands[t].vertexArray.isDestroyed()&&e._depthCommands[t].vertexArray.destroy(),e._depthCommands[t].shaderProgram=e._depthCommands[t].shaderProgram&&!e._depthCommands[t].shaderProgram.isDestroyed()&&e._depthCommands[t].shaderProgram.destroy(),e._depthCommands[t]=void 0;e._depthCommands=[],e$2e(e._outlineCommand)&&(e._outlineCommand.vertexArray=e._outlineCommand.vertexArray&&!e._outlineCommand.vertexArray.isDestroyed()&&e._outlineCommand.vertexArray.destroy(),e._outlineCommand.shaderProgram=e._outlineCommand.shaderProgram&&!e._outlineCommand.shaderProgram.isDestroyed()&&e._outlineCommand.shaderProgram.destroy(),e._outlineCommand=void 0)}function _0x993af9(e){for(var t=0;t<e._textures.length;t++)e$2e(e._textures[t])&&(e._textures[t]=e._textures[t]&&e._textures[t].destroy(),e._textures[t]=null);e._textures=[]}function _0x2cbe11(e){e$2e(e._frameState)&&(e$2e(e._disjointBuffer)&&delete e._frameState._framebufferList.sqDisjoinTexture,e$2e(e._resultBuffer)&&delete e._frameState._framebufferList.sqResultTexture,e._frameState=void 0),e._disjointBuffer=e._disjointBuffer&&e._disjointBuffer.destroy(),e._resultBuffer=e._resultBuffer&&e._resultBuffer.destroy();for(var t=0;t<e._depthBuffers.length;t++)e._depthBuffers[t]=e._depthBuffers[t]&&e._depthBuffers[t].destroy();e._depthBuffers=[]}function _0x4c0abe(e){return!!e$2e(e)&&(e.geoType===P$U.GEOCONE||e.geoType===P$U.GEOBOX||e.geoType===P$U.GEOCYLINDER||e.geoType===P$U.GEOSPHERE||e.geoType===P$U.GEOREGION3D||e.geoType===P$U.GEOELLIPSOID||e.geoType===P$U.GEOMODEL3D||e instanceof y$R)}function _0x58dbe(e,t,i){_0x17bab6(e);var n=t.drawingBufferWidth,r=t.drawingBufferHeight,o=!0;if(e._textures.length>0){var a=e._textures[0];o=n!=a.width||r!=a.height}o&&(_0x2cbe11(e),_0x993af9(e),_0x45f8d4(e,t,i),_0x4f5ed3(e,t)),_0x45c68e(e,t,i);for(var s=0;s<e._layers.length;s++)e._layers[s]._spatialQueryEnable=!0,e._layers[s]._setSQTextures(e._textures),e._layers[s].selectEnabled=!0;s=0;for(var l=e._clipLayers.length;s<l;s++){e._clipLayers.values[s]._setSQTextures(e._textures)}e._isInitlized=!0}function _0x45f8d4(e,t,i){var n=t.drawingBufferWidth,r=t.drawingBufferHeight;if(0===e._textures.length)for(var o=0;o<3;o++){var a=new t$U({context:t,width:n,height:r,pixelFormat:V$12.UNSIGNED_BYTE,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})});e._textures.push(a)}var s=new t$K(t);s.isUpdate=!1,i._framebufferList.sqResultTexture=s,e._resultBuffer=s;var l=new t$K(t);l.isUpdate=!1,i._framebufferList.sqDisjoinTexture=l,e._disjointBuffer=l}function _0x45c68e(e,t,i){if(!e$2e(e._colorCommand)||!e$2e(e._outlineCommand))if(_0x17bab6(e),e._allS3MColorCommand.length>0)for(var n=0;n<e._allS3MColorCommand.length;n++)_0x5a4c6e(e,t,i,e._allS3MColorCommand[n]);else _0x3763d0(e,t,i)}function _0x3763d0(e,t,i){var n=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.TRANSLUCENT,owner:e}),r={aPosition:0,aNormal:1},o=new s$V({sources:[_0x4c39c3]});p$1d.equals(e._worldMatrix,p$1d.IDENTITY)&&o.defines.push("USE_RelativeOrigin"),n.vertexArray=e._geometry.getVertexArray(t),n.shaderProgram=r$14.fromCache({name:"spatialQuerySimple",context:t,vertexShaderSource:o,fragmentShaderSource:_0x37e2ae,attributeLocations:r}),n.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),n.uniformMap={uDiffuseColor:function(){return e._fillColor}},e._colorCommand=n,_0x5a4c6e(e,t,i,n);var a=new i$$({primitiveType:W$18.LINES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.TRANSLUCENT,owner:e});a.vertexArray=e._geometry.getOutlineVertexArray(t),a.shaderProgram=r$14.fromCache({name:"spatialQueryOutline",context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:r}),a.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),a.uniformMap={uDiffuseColor:function(){return e._outlineColor}},e._outlineCommand=a}function _0x5a4c6e(e,t,i,n){var r=n.shaderProgram.vertexShaderSource.clone(),o=new s$V({name:"SpatialQueryFp",sources:[_0x12eef8]});if(o.defines.push("DEPTH"),i.useLogDepth){r.defines.push("LOG_DEPTH");for(var a=r.sources,s=0;s<a.length;++s)a[s]=s$V.replaceMain(a[s],"czm_log_depth_main");a.push("\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n"),o.defines.push("LOG_DEPTH")}var l=n.shaderProgram._attributeLocations,u=i$$.shallowClone(n);u.renderState=d$1m.fromCache({depthTest:{enabled:!0},cull:{enabled:!0,face:de$y.BACK}}),u.shaderProgram=r$14.fromCache({name:"spatialQueryFrontDepth",context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:l}),u.framebuffer=e._depthBuffers[0],e._depthCommands.push(u);var c=i$$.shallowClone(n);c.renderState=d$1m.fromCache({depthTest:{enabled:!0},cull:{enabled:!0,face:de$y.FRONT}}),c.shaderProgram=r$14.fromCache({name:"spatialQueryBackDepth",context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:l}),c.framebuffer=e._depthBuffers[1],e._depthCommands.push(c);var h=i$$.shallowClone(n),d=new s$V({name:"SpatialQueryFp",sources:[_0x12eef8]});d.defines.push("COLOR"),h.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1}}),h.shaderProgram=r$14.fromCache({name:"spatialQueryFrontColor",context:t,vertexShaderSource:r,fragmentShaderSource:d,attributeLocations:l}),h.framebuffer=e._depthBuffers[2],e._depthCommands.push(h)}function _0x4f5ed3(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=new t$V({context:t,colorTextures:[e._textures[0]],destroyAttachments:!1,depthStencilTexture:new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})});e._depthBuffers.push(r);var o=new t$V({context:t,colorTextures:[e._textures[1]],destroyAttachments:!1,depthStencilTexture:new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})});e._depthBuffers.push(o);var a=new t$V({context:t,colorTextures:[e._textures[2]],destroyAttachments:!1,depthStencilTexture:new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})});e._depthBuffers.push(a)}function _0x5564ce(e,t,i,n){if(!e$2e(i))return Promise.resolve(!1);var r=[];return _0x220290(e._scene._context,i,e._layers,n,r).then((t=>{if(e._positionMode===j$Z.Intersects)for(var i=Object.keys(n),o=0;o<i.length;o++){var a=r[i[o]],s=e._layers[a],l=n[i[o]];l.length>0&&s.setSelection(l)}return Promise.resolve(t)}))}function _0x220290(e,t,i,n,r){if(!e$2e(t)||!t.isUpdate)return Promise.resolve(!1);var o=t.renderTexture._width,a=t.renderTexture._height;return e.readPixelsAsync({framebuffer:t.renderTexture._fb,x:0,y:0,width:o,height:a}).then((t=>{for(var s=[],l=0;l<i.length;l++){var u=_0x44af25(_=i[l].id);r[u]=l,s.push(u),n[u]=[]}for(var c=0;c<o;c++)for(var h=0;h<a;h++){var d=4*(h*o+c);if(0!==t[d]||0!==t[d+1]||0!==t[d+2]){var f=e$1X.byteToRgba(t[d],t[d+1],t[d+2],t[d+3]),p=e.getObjectByPickId(f);if(e$2e(p)){var _=p.primitive.id,m=p.id,g=(u=_0x44af25(_),s.indexOf(u));if(!(g<0))if(i[r[u]],0==n[u].length){var x=[];x.push(m),n[u]=x}else(g=n[u].indexOf(m))<0&&n[u].push(m)}}}return Promise.resolve(!0)}))}function _0x44af25(e){return"id_"+e}function _0x585d32(e,t,i){if(e._profile){e$2e(e._beQueryCollection)&&e._beQueryCollection._setSQMode(e._positionMode);for(var n=0,r=e._clipLayers.length;n<r;n++){e._clipLayers.values[n]._setSQMode(e._positionMode)}}else e._frameState=i,0!==e._textures.length&&e._bufferDirty&&!e._depthDirty&&(e._resultBuffer.isUpdate=!0,e._resultBuffer._beginFunc=function(t){for(var i=0;i<e._layers.length;i++)e._layers[i]._setSQMode(j$Z.Intersects)},e._resultBuffer._endFunc=function(t){e._intersectsIDs=[],_0x5564ce(e,t,e._resultBuffer,e._intersectsIDs).then((t=>{e._updateIDs=!0})),e._resultBuffer.isUpdate=!1},e._positionMode!==j$Z.Intersects&&(e._disjointBuffer.isUpdate=!0,e._disjointBuffer._beginFunc=function(t){for(var i=0;i<e._layers.length;i++)e._layers[i]._setSQMode(j$Z.Disjoint)},e._disjointBuffer._endFunc=function(t){e._disjointIDs=[],_0x5564ce(e,t,e._disjointBuffer,e._disjointIDs).then((t=>{_0x6d6686(e),_0x4fa567(e),e._updateIDs=!0})),e._disjointBuffer.isUpdate=!1}),e._bufferDirty=!1)}function _0x6d6686(e){if(e._positionMode===j$Z.Disjoint)for(var t=Object.keys(e._disjointIDs),i=Object.keys(e._intersectsIDs),n=0;n<e._layers.length;n++){var r=e._layers[n],o=_0x44af25(r.id);if(!(t.indexOf(o)<0)){if(i.indexOf(o)<0){r.setSelection(e._disjointIDs[o]);continue}for(var a=e._intersectsIDs[o],s=e._disjointIDs[o],l=0;l<a.length;l++){var u=s.indexOf(a[l]);u>=0&&s.splice(u,1)}r.setSelection(s)}}}function _0x4fa567(e){if(e._positionMode===j$Z.Contains)for(var t=Object.keys(e._disjointIDs),i=Object.keys(e._intersectsIDs),n=0;n<e._layers.length;n++){var r=e._layers[n],o=_0x44af25(r.id);if(!(i.indexOf(o)<0)){if(t.indexOf(o)<0){r.setSelection(e._intersectsIDs[o]);continue}for(var a=e._intersectsIDs[o],s=e._disjointIDs[o],l=0;l<s.length;l++){var u=a.indexOf(s[l]);u>=0&&a.splice(u,1)}r.setSelection(a)}}}_0xf2286(),Object.defineProperties(_0x16da97.prototype,{geometry:{get:function(){return this._geometry},set:function(e){if(LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),this._geometry&&this._geometry.type===P$U.GEOMODEL3D&&(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[],this._queryCollection=void 0),this._geometry=e,this._depthDirty=!0,this._isInitlized=!1,this._geometry.type===P$U.GEOMODEL3D)e$2e(this._queryCollection)&&(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[]),this._queryCollection=new _0xd633a7(this._scene.context),this._queryCollection._needToRender=!1,this._requestModel(e);else if(e$2e(this._geometry._shape)){var t=new y$R({geometryInstances:new d$1o({attributes:{color:new o$16},geometry:this._geometry}),appearance:new t$Q({translucent:!1})});this._scene.primitives.add(t),this._geometry=t}}},layers:{get:function(){return this._layers},set:function(e){for(var t=0;t<this._layers.length;t++)this._layers[t]._spatialQueryEnable=!1;this._layers=e,this._bufferDirty=!0}},fillColor:{get:function(){return this._fillColor},set:function(e){this._fillColor=e}},outlineColor:{get:function(){return this._outlineColor},set:function(e){this._outlineColor=e}},positionMode:{get:function(){return this._positionMode},set:function(e){this._positionMode=e,this._bufferDirty=!0}},fillStyle:{get:function(){return this._fillStyle},set:function(e){this._fillStyle=e}}}),_0x16da97.prototype.destroy=function(){return LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),_0x2cbe11(this),_0x17bab6(this),_0x993af9(this),e$2e(this._geometry)&&this._geometry.type===P$U.GEOMODEL3D?(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[]):this._beQueryCollection=void 0,this._profile=!1,this._scene._analyst3D.remove(this._name,!0),i$11(this)},_0x16da97.prototype.clear=function(){LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),this._scene._analyst3D.remove(this._name,!1)},_0x16da97.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),""===this._name?(this._name="spatialQuery3D"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this)):e$2e(this._scene._analyst3D.find(this._name))||this._scene._analyst3D.add(this)},_0x16da97.prototype.update=function(e,t,i){if(this._curFrameNumber!==t.frameNumber&&(this._curFrameNumber=t,!t._fboState.enabled&&e$2e(this._geometry)&&(0!==this._clipLayers.length||0!==this._layers.length||e$2e(this._beQueryCollection)))){if(!_0x4c0abe(this._geometry))throw new t$15("the geometry type is not supported.");var n=e.drawingBufferWidth,r=e.drawingBufferHeight;if((this._width!==n||this._height!==r)&&(this._geometry.isGeometryDirty=!0,this._width=n,this._height=r),this._geometry.isGeometryDirty&&(this._isInitlized=!1),this._geometry.type===P$U.GEOMODEL3D){if(this._queryCollection.update(t),this._allS3MColorCommand=this._queryCollection._getAllColorCommand(),0===this._allS3MColorCommand.length)return}else if(this._geometry instanceof y$R){if(this._allS3MColorCommand=this._geometry._colorCommands,0===this._allS3MColorCommand.length)return;this._geometry._state=_0x26a83e.FAILED}else{p$1d.equalsEpsilon(this._worldMatrix,this._geometry.modelMatrix,e$2d.EPSILON8)?0==this._boundingSphere.radius&&(this._boundingSphere=this.geometry._getGeometry().boundingSphere):(p$1d.clone(this._geometry.modelMatrix,this._worldMatrix),i$1d.transform(this.geometry._getGeometry().boundingSphere,this._worldMatrix,this._boundingSphere),this._depthDirty=!0)}this._isInitlized||(_0x58dbe(this,e,t),this._geometry.isGeometryDirty=!1),this._profile||this._updateTextures(e,t),_0x585d32(this,e,t),e$2e(this._colorCommand)&&(this.fillStyle===fr$3.Fill||this.fillStyle===fr$3.Fill_And_WireFrame)&&!this._profile&&i.push(this._colorCommand),e$2e(this._outlineCommand)&&(this.fillStyle===fr$3.WireFrame||this.fillStyle===fr$3.Fill_And_WireFrame)&&i.push(this._outlineCommand)}},_0x16da97.prototype.getQueryIDs=function(){if(LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),!this._updateIDs)return this._ids;var e=o$1l.defer();this._ids=[],this._bufferDirty=!0,this._resultBuffer.isUpdate=!0,this._scene.initializeFrame();var t=this;return this._scene._renderForQueryAsync().then((function(){for(var i=new e$1Q;;){for(var n=!1,r=0;r<t._layers.length;r++){var o=(u=t._layers[r]).getSelection();if(!(o.length<=0)){if(i.contains(u.id)){var a;a=o.concat(i.get(u.id).ids),o=a}var s={layerName:u.name,layerIndex:r,ids:o};i.set(u.id,s),n=!0,u.releaseSelection(),u.setObjsVisible(o,!1)}}if(!n){t._bufferDirty=!1,t._resultBuffer.isUpdate=!1;break}}for(var l=0;l<i.values.length;l++){var u;(u=t._layers[i.values[l].layerIndex]).setObjsVisible([],!1);var c={layerName:i.values[l].layerName,ids:i.values[l].ids};t._ids.push(c)}t._updateIDs=!1,e.resolve(t._ids)})),e.promise},_0x16da97.prototype._requestModel=function(){var e=this,t=this._geometry.geoModel;if(e$2e(t)){var i=new Uint8Array(t.model);this._queryCollection.add(this._name,{position:o$1p.fromDegrees(t.position.x,t.position.y,t.position.z),id:this._dataIndex,color:this._fillColor,scale:new o$1p(t.scaleX,t.scaleY,t.scaleZ)},i.buffer)}else if(""!==this._geometry.geoFilePath){var n=this._geometry.geoFilePath,r=n.replace(/\?returnContent=.*$/,"");".json"===(r=r.substring(r.length-5).toLowerCase())?u$P(this._geometry.geoFilePath).then((function(t){if(null!=t.geometry){e._geometry.geoModel=t.geometry;var i=new Uint8Array(t.geometry.model);e._queryCollection.add(e._name,{position:o$1p.fromDegrees(t.geometry.position.x,t.geometry.position.y,t.geometry.position.z),id:e._dataIndex,color:e._fillColor,scale:new o$1p(t.geometry.scaleX,t.geometry.scaleY,t.geometry.scaleZ)},i.buffer)}})):o$10(n).then((function(t){var i=new DataView(t),r=0,o=i.getInt32(r,!0);r+=4;var a=a$K(new Uint8Array(t,r,o)),s=JSON.parse(a).geometry;if(null!=s){r+=o;var l=i.getInt32(r,!0);r+=4;var u,c,h=[];for(u=0;u<l;u++)c=i.getInt32(r,!0),h.push(c),r+=4;var d=[];for(u=0;u<l;u++){if(0===(c=h[u]))d.push(null);else{var f=new Uint8Array(t,r,c);d.push(new Uint8Array(f).buffer)}r+=c}e._queryCollection.add(n,{position:o$1p.fromDegrees(s.position.x,s.position.y,s.position.z),id:e._dataIndex,scale:new o$1p(s.scaleX,s.scaleY,s.scaleZ),hpr:i$16.fromDegrees(-s.rotationZ,s.rotationX,s.rotationY)},d[0],!1)}}))}},_0x16da97.prototype._updateTextures=function(e,t){if(this._curFrameNumber!==t.frameNumber&&(this._curFrameNumber=t,!(!this._depthDirty||e$2e(this._resultBuffer)&&this._resultBuffer.isUpdate||e$2e(this._disjointBuffer)&&this._disjointBuffer.isUpdate)||this._profile)){for(var i=t.camera,n=0;n<this._textures.length;n++)this._clearCommand.framebuffer=this._depthBuffers[n],this._clearCommand.execute(e),this._depthCommands[n].execute(e);e$2e(this._beQueryCollection)&&3===this._textures.length&&this._beQueryCollection._setSQTextures(this._textures),this._clearCommand.framebuffer=void 0,p$1d.clone(i.viewMatrix,this._matDepthView),p$1d.clone(e.uniformState.projection,this._matDepthProject);for(n=0;n<this._layers.length;n++)this._layers[n]._setSQViewPrjMatrix(this._matDepthView,this._matDepthProject);this._depthDirty=!1,this._bufferDirty=!0}};var _0x3fe7d3=(_0x1a9340=!0,function(e,t){var i=_0x1a9340?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a9340=!1,i}),_0x4d0fee=_0x3fe7d3(void 0,(function(){return _0x4d0fee.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d0fee).search("(((.+)+)+)+$")})),_0x1a9340;_0x4d0fee();var _0x48338c="\nattribute vec4 aPosition;\nuniform mat4 uTexWorldViewProjMatrix0;\nuniform mat4 uTexWorldViewProjMatrix1;\nuniform mat4 uTexWorldViewProjMatrix2;\nuniform mat4 uTexWorldViewProjMatrix3;\nuniform mat4 uTexWorldViewProjMatrix4;\n\nuniform float uRadius;\n\nvarying vec4 clip_pos0;\nvarying vec4 clip_pos1;\nvarying vec4 clip_pos2;\nvarying vec4 clip_pos3;\nvarying vec4 clip_pos4;\n\n// vec4 GetUV(const mat4 renderTextureMatrix)\n// {\n// \tvec4 texCoord = renderTextureMatrix * vec4(vexPos.xyz, 1.0);\n// \ttexCoord = texCoord / texCoord.w;\n// \ttexCoord.xyz = texCoord.xyz * 0.5 + 0.5;\n// \treturn texCoord;\n// }\n\nvoid main()\n{\t\n vec3 newPos = vec3(aPosition.xyz);\n\tnewPos = newPos * uRadius;\n\tvec4 vexPos = vec4(newPos.xyz, 1.0);\n\tclip_pos0 = uTexWorldViewProjMatrix0 * vexPos;\n\tclip_pos1 = uTexWorldViewProjMatrix1 * vexPos;\n\tclip_pos2 = uTexWorldViewProjMatrix2 * vexPos;\n\tclip_pos3 = uTexWorldViewProjMatrix3 * vexPos;\n\tclip_pos4 = uTexWorldViewProjMatrix4 * vexPos;\n\n\tgl_Position = czm_modelViewProjection * vexPos;\n\t\n}",_0x4e91f3=(_0x1fbf8a=!0,function(e,t){var i=_0x1fbf8a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fbf8a=!1,i}),_0x38ba39=_0x4e91f3(void 0,(function(){return _0x38ba39.toString().search("(((.+)+)+)+$").toString().constructor(_0x38ba39).search("(((.+)+)+)+$")})),_0x1fbf8a;_0x38ba39();var _0x2232ed="\nuniform sampler2D uDepthMap0;\nuniform sampler2D uDepthMap1;\nuniform sampler2D uDepthMap2;\nuniform sampler2D uDepthMap3;\nuniform sampler2D uDepthMap4;\nuniform int uDomeType;\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\n\n\nvarying vec4 clip_pos0;\nvarying vec4 clip_pos1;\nvarying vec4 clip_pos2;\nvarying vec4 clip_pos3;\nvarying vec4 clip_pos4;\n\nbool IsValidNDC(vec4 ndc)\n{\n\tfloat minNDCZ = -1.0;\n#ifdef WEBGPU\n\tminNDCZ = 0.0;\n#endif\n\tif ((ndc.x<=1.0)&&(ndc.x>=-1.0)&&(ndc.y<=1.0)&&(ndc.y>=-1.0)&&(ndc.z<=1.0)&&(ndc.z>=minNDCZ))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}\n\nbool IsVisible(float depth, vec4 ndc)\n{\n bool isVisible = true;\n\tfloat tolerance = 0.00001;\n\tif(depth < tolerance)\n {\n return isVisible;\n }\n#ifdef WEBGPU\n\tfloat compareNDCZ = depth;\n#else\n\tfloat compareNDCZ = depth * 2.0 - 1.0;\n#endif\n\tif(ndc.z > (compareNDCZ + tolerance))\n {\n isVisible = false;\n }\n\treturn isVisible;\n}\n\nvoid main()\n{\n\tvec4 ndc0 = clip_pos0 / clip_pos0.w;\n\tvec4 ndc1 = clip_pos1 / clip_pos1.w;\n\tvec4 ndc2 = clip_pos2 / clip_pos2.w;\n\tvec4 ndc3 = clip_pos3 / clip_pos3.w;\n\tvec4 ndc4 = clip_pos4 / clip_pos4.w;\n\n\tvec2 texCoord0 = ndc0.xy * 0.5 + 0.5;\n\tvec2 texCoord1 = ndc1.xy * 0.5 + 0.5;\n\tvec2 texCoord2 = ndc2.xy * 0.5 + 0.5;\n\tvec2 texCoord3 = ndc3.xy * 0.5 + 0.5;\n\tvec2 texCoord4 = ndc4.xy * 0.5 + 0.5;\n\n\tfloat depth0 = czm_unpackDepth(texture2D(uDepthMap0, texCoord0.xy));\n\tfloat depth1 = czm_unpackDepth(texture2D(uDepthMap1, texCoord1.xy));\n\tfloat depth2 = czm_unpackDepth(texture2D(uDepthMap2, texCoord2.xy));\n\tfloat depth3 = czm_unpackDepth(texture2D(uDepthMap3, texCoord3.xy));\n\tfloat depth4 = czm_unpackDepth(texture2D(uDepthMap4, texCoord4.xy));\n\t\n\tbool isVisible = true;\n\tif(IsValidNDC(ndc0))\n\t{\n\t\tisVisible = IsVisible(depth0, ndc0);\n\t}\n\telse if(IsValidNDC(ndc1))\n\t{\n\t\tisVisible = IsVisible(depth1, ndc1);\n\t}\n\telse if(IsValidNDC(ndc2))\n\t{\n\t\tisVisible = IsVisible(depth2, ndc2);\n\t}\n\telse if(IsValidNDC(ndc3))\n\t{\n\t\tisVisible = IsVisible(depth3, ndc3);\n\t}\n\telse if(IsValidNDC(ndc4))\n\t{\n\t\tisVisible = IsVisible(depth4, ndc4);\n\t}\n\n\tif(uDomeType == 0)\n\t{\n if (!isVisible)\n {\n discard;\n }\n else\n {\n gl_FragColor = uVisibleAreaColor;\n }\n\t}\n\telse if(uDomeType == 1)\n\t{\n\t\tif (!isVisible)\n\t\t{\n\t\t\tgl_FragColor = uHiddenAreaColor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdiscard;\n\t\t}\n\t}\n\telse\n\t{\n\t if (!isVisible)\n\t\t{\n\t\t\tgl_FragColor = uHiddenAreaColor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgl_FragColor = uVisibleAreaColor;\n\t\t}\n\t}\n}",_0x4ed431=(_0x11e9d9=!0,function(e,t){var i=_0x11e9d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x11e9d9=!1,i}),_0x210f7d=_0x4ed431(void 0,(function(){return _0x210f7d.toString().search("(((.+)+)+)+$").toString().constructor(_0x210f7d).search("(((.+)+)+)+$")})),_0x11e9d9;_0x210f7d();var _0x26472f={VISIBLEDOME:0,HIDDENDOME:1,ALLDOME:2},_0x19446b=Object.freeze(_0x26472f),_0x2c54d9=(_0x12c52d=!0,function(e,t){var i=_0x12c52d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12c52d=!1,i}),_0x9fb993=_0x2c54d9(void 0,(function(){return _0x9fb993.toString().search("(((.+)+)+)+$").toString().constructor(_0x9fb993).search("(((.+)+)+)+$")})),_0x12c52d;_0x9fb993();var _0x544b20=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function _0x4036ab(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._cameraDepthBuffer=[],this._cameraNames=[],this._renderTextureMatrix=[],this._texWorldViewMatrix=[],this._texPrjMatrix=[],this._dirRadian=[],this._dPitch=[],this._colorCommand=void 0,this._boundingSphere=new i$1d,this._frameState=void 0,this._viewPosition=[0,0,0],this._startAngle=0,this._endAngle=360,this._visibleAreaColor=new e$2c(0,1,0,.5),this._hiddenAreaColor=new e$2c(1,0,0,.5),this._domeType=_0x19446b.ALLDOME,this._quality=0,this._displayMode=0,this._name="",this._checking=!1,this._sceneName="",this._updateCamera=!0,this._isRecreateTexture=!0,this._targetPoints=[],this._worldMatrix=p$1d.IDENTITY.clone(),this._initialize=!1,this._id=0,this._isUpdateCommand=!1,this._textureFinish=!1,this._isClosed=!1}function _0x3cb2e5(e){e$2e(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0)}function _0x3c803c(e){if(e$2e(e._frameState)){for(var t in e._cameraDepthBuffer)e$2e(e._cameraDepthBuffer[t])&&delete e._frameState._framebufferList[t];e._frameState=void 0}for(var t in e._cameraDepthBuffer)e._cameraDepthBuffer[t]=e._cameraDepthBuffer[t]&&e._cameraDepthBuffer[t].destroy()}function _0x48aa18(e,t,i){var n=i.camera,r=n.frustum.aspectRatio,o=n.frustum.fov,a=n.frustum.near,s=n.frustum.far,l=new o$1p,u=n.heading,c=n.pitch,h=e._scene.globe.cullEnabled;o$1p.clone(n.position,l);for(var d=0;d<5;d++){var f=90*e$2d.RADIANS_PER_DEGREE,p=90*e$2d.RADIANS_PER_DEGREE,_=Math.tan(.5*f)/Math.tan(.5*p),m=.001*e._distance,g=Math.max(e._distance,10),x=o$1p.fromDegreesArrayHeights(e._viewPosition)[0],y=e._cameraNames[d];e._cameraDepthBuffer[y].isUpdate=!0;var v=i.useLogDepth;e._cameraDepthBuffer[y]._beginFunc=function(t){e._scene.globe.cullEnabled=!1,t.useLogDepth=!1,e._textureFinish=!1;var i=t._fboState.name,r=e._dirRadian[i]*e$2d.RADIANS_PER_DEGREE,o=e._dPitch[i]*e$2d.RADIANS_PER_DEGREE;n.frustum.aspectRatio=_,n.frustum.fov=f,n.frustum.near=m,n.frustum.far=g+100,n.setView({destination:x,orientation:{heading:r,pitch:o,roll:n.roll}}),p$1d.multiply(n.viewMatrix,e._worldMatrix,e._texWorldViewMatrix[i]),p$1d.multiply(n.frustum.projectionMatrix,e._texWorldViewMatrix[i],e._renderTextureMatrix[i]),p$1d.clone(n.frustum.projectionMatrix,e._texPrjMatrix[i])},e._cameraDepthBuffer[y]._endFunc=function(i){n.setView({destination:l,orientation:{heading:u,pitch:c,roll:n.roll},convert:!1}),e._scene.globe.cullEnabled=h,n.frustum.aspectRatio=r,n.frustum.fov=o,n.frustum.near=a,n.frustum.far=s;var d=i._fboState.name;for(var f in e._cameraDepthBuffer[d]._isUpdate=!1,e._cameraDepthBuffer)if(e._cameraDepthBuffer[f]._isUpdate)return void(i.useLogDepth=v);if(e._textureFinish=!0,e._textureFinish){if(!e$2e(e._colorCommand))return;var p=e._colorCommand.shaderProgram.fragmentShaderSource,_=e._colorCommand.shaderProgram.vertexShaderSource,m={aPosition:0};e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=r$14.fromCache({name:"viewDome",context:t,vertexShaderSource:_,fragmentShaderSource:p,attributeLocations:m})}i.useLogDepth=v}}}function _0x28a0a6(e,t){var i=_0x491f18(e);_0x3ccd00(e),_0x185ef6(e,t),_0x5dd64d(e,t,i.vertexPackage,i.indexPackage)}function _0x491f18(e){return{vertexPackage:_0x2ce469(129,129,1,e._startAngle,e._endAngle,e._isClosed),indexPackage:_0x146371(129,129,e._startAngle,e._endAngle,e._isClosed)}}function _0x2ce469(e,t,i,n,r,o){var a=e,s=t,l=(r-n)*e$2d.RADIANS_PER_DEGREE/s,u=Math.PI/(2*a),c=0,h=0,d=!1;o&&(0!=n||360!=r)&&(d=!0);for(var f=0,p=d?(e+1)*t+1:(e+1)*t,_=S$14.createTypedArray(S$14.FLOAT,3*p),m=0;m<s;m++){h=m*l+n*e$2d.RADIANS_PER_DEGREE;for(var g=0;g<=a;g++){c=g*u;var x=i*Math.sin(c)*Math.cos(h),y=i*Math.sin(c)*Math.sin(h),v=i*Math.cos(c);_[f++]=y,_[f++]=x,_[f++]=v}}return d&&(_[f++]=0,_[f++]=0,_[f++]=0),_}function _0x146371(e,t,i,n,r){for(var o=[],a=0==i&&360==n?t:t-1,s=0;s<e;s++)for(var l=0;l<a;l++){var u=s+l*(e+1),c=u+1,h=l==t-1?s+1:u+e+2;o.push(u),o.push(c),o.push(h),o.push(u),o.push(h),o.push(h-1)}if(r&&(0!=i||360!=n)){var d=(e+1)*t,f=a*(e+1);for(s=0;s<e;s++)o.push(s),o.push(s+1),o.push(d),o.push(s+f+1),o.push(s+f),o.push(d)}for(var p=0,_=S$14.createTypedArray(S$14.UNSIGNED_SHORT,o.length),m=0;m<o.length;m++)_[p++]=o[m];return _}function _0x3ccd00(e){if(e._scene.mode===C$14.SCENE3D){var t=o$1p.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]),i=new i$16(0,0,0);m$19.headingPitchRollToFixedFrame(t,i,t$12.WGS84,m$19.eastNorthUpToFixedFrame,e._worldMatrix)}else if(e._viewPosition[0]>180||e._viewPosition[0]<-180||e._viewPosition[1]>180||e._viewPosition[1]<-180)layer._position=new o$1p(layer.lon,layer.lat,height);else{var n=e._scene._frameState.camera._projection,r=o$1p.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]),o=n.ellipsoid.cartesianToCartographic(r);r=n.project(o),p$1d.fromTranslation(r,e._worldMatrix),p$1d.multiply(_0x544b20,e._worldMatrix,e._worldMatrix)}o$1p.clone(o$1p.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,i$1d.transform(e._boundingSphere,e._worldMatrix,e._boundingSphere)}function _0x185ef6(e,t){if(e._isRecreateTexture){var i=e._frameState;_0x3c803c(e),e._frameState=i;for(var n=0;n<5;n++){var r=new s$U(t);r.environmentVisible.isObjectVisible=!0,r.environmentVisible.isGlobalVisible=!0,r._visibleViewport=e._visibleViewport;var o=e._cameraNames[n];e._cameraDepthBuffer[o]=r,e._frameState._framebufferList[o]=e._cameraDepthBuffer[o],e._renderTextureMatrix[o]=new p$1d,e._texWorldViewMatrix[o]=new p$1d,e._texPrjMatrix[o]=new p$1d,e._dirRadian[o]=90*n,e._dPitch[o]=4==n?90:0}e._isRecreateTexture=!1}}function _0x5dd64d(e,t,i,n){var r=t$X.createVertexBuffer({context:t,typedArray:i,usage:A$18.STATIC_DRAW}),o=[],a={aPosition:0};o.push({name:"aPosition",index:a.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var s=t$X.createIndexBuffer({context:t,typedArray:n,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});e._colorCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!1}),e._colorCommand.vertexArray=new c$13({context:t,attributes:o,indexBuffer:s});var l=new s$V({name:"ViewDomeVp",sources:[_0x48338c]}),u=new s$V({name:"ViewDomeFp",sources:[_0x2232ed]});e._colorCommand.shaderProgram=r$14.fromCache({name:"viewDome",context:t,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:a}),e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),e._colorCommand.uniformMap={uVisibleAreaColor:function(){return e._visibleAreaColor},uHiddenAreaColor:function(){return e._hiddenAreaColor},uTexWorldViewProjMatrix0:function(){return e._renderTextureMatrix[e._cameraNames[0]]},uTexWorldViewProjMatrix1:function(){return e._renderTextureMatrix[e._cameraNames[1]]},uTexWorldViewProjMatrix2:function(){return e._renderTextureMatrix[e._cameraNames[2]]},uTexWorldViewProjMatrix3:function(){return e._renderTextureMatrix[e._cameraNames[3]]},uTexWorldViewProjMatrix4:function(){return e._renderTextureMatrix[e._cameraNames[4]]},uTexWorldViewMatrix0:function(){return e._texWorldViewMatrix[e._cameraNames[0]]},uTexWorldViewMatrix1:function(){return e._texWorldViewMatrix[e._cameraNames[1]]},uTexWorldViewMatrix2:function(){return e._texWorldViewMatrix[e._cameraNames[2]]},uTexWorldViewMatrix3:function(){return e._texWorldViewMatrix[e._cameraNames[3]]},uTexWorldViewMatrix4:function(){return e._texWorldViewMatrix[e._cameraNames[4]]},uTexProjMatrix0:function(){return e._texPrjMatrix[e._cameraNames[0]]},uTexProjMatrix1:function(){return e._texPrjMatrix[e._cameraNames[1]]},uTexProjMatrix2:function(){return e._texPrjMatrix[e._cameraNames[2]]},uTexProjMatrix3:function(){return e._texPrjMatrix[e._cameraNames[3]]},uTexProjMatrix4:function(){return e._texPrjMatrix[e._cameraNames[4]]},uDepthMap0:function(){return e._cameraDepthBuffer[e._cameraNames[0]].depthTexture},uDepthMap1:function(){return e._cameraDepthBuffer[e._cameraNames[1]].depthTexture},uDepthMap2:function(){return e._cameraDepthBuffer[e._cameraNames[2]].depthTexture},uDepthMap3:function(){return e._cameraDepthBuffer[e._cameraNames[3]].depthTexture},uDepthMap4:function(){return e._cameraDepthBuffer[e._cameraNames[4]].depthTexture},uRadius:function(){return e._distance},uDomeType:function(){return e._domeType}}}Object.defineProperties(_0x4036ab.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._updateCamera=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$15("the distance is greater than 0.0");this._distance=e,this._updateCamera=!0}},startAngle:{get:function(){return this._startAngle},set:function(e){this._startAngle=e,this._initialize=!1,this._updateCamera=!0}},endAngle:{get:function(){return this._endAngle},set:function(e){this._endAngle=e,this._initialize=!1,this._updateCamera=!0}},visibleAreaColor:{get:function(){var e=new e$1X;return e.red=this._visibleAreaColor.x,e.green=this._visibleAreaColor.y,e.blue=this._visibleAreaColor.z,e.alpha=this._visibleAreaColor.w,e},set:function(e){this._visibleAreaColor.x=e.red,this._visibleAreaColor.y=e.green,this._visibleAreaColor.z=e.blue,this._visibleAreaColor.w=e.alpha}},hiddenAreaColor:{get:function(){var e=new e$1X;return e.red=this._hiddenAreaColor.x,e.green=this._hiddenAreaColor.y,e.blue=this._hiddenAreaColor.z,e.alpha=this._hiddenAreaColor.w,e},set:function(e){this._hiddenAreaColor.x=e.red,this._hiddenAreaColor.y=e.green,this._hiddenAreaColor.z=e.blue,this._hiddenAreaColor.w=e.alpha}},domeType:{get:function(){return this._domeType},set:function(e){this._domeType=e}},isClosed:{get:function(){return this._isClosed},set:function(e){this._isClosed=e,this._initialize=!1,this._updateCamera=!0,this._isRecreateTexture=!0}}}),_0x4036ab.prototype.destroy=function(){return _0x3c803c(this),_0x3cb2e5(this),this._scene.farToNearRatio=1e3,this._scene._analyst3D.remove(this._name,!0),i$11(this)},_0x4036ab.prototype.build=function(){if(LicenseChecker.LICENSECHECKER.verify("ViewDome"),""===this._name&&!this._checking){this._name="ViewDome"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene";for(var e=0;e<5;e++)this._cameraNames.push(this._name+"_camera"+e);this._scene._analyst3D.add(this)}},_0x4036ab.prototype.update=function(e,t,i){"water"===t._fboState.name||t.passes.pick||t._fboState.enabled||(t.camera.bReflect||(this._initialize||(this._frameState=t,_0x28a0a6(this,e),this._initialize=!0,this._textureFinish=!1),this._updateCamera&&(this._frameState=t,this._isRecreateTexture&&(_0x185ef6(this),this._isRecreateTexture=!1),_0x48aa18(this,e,this._frameState),this._update=!1,this._updateCamera=!1),e$2e(this._colorCommand)&&this._textureFinish&&i.push(this._colorCommand)))},_0x4036ab.prototype.clear=function(){this._scene._analyst3D.remove(this._name,!1)};var _0xb433d2=(_0x36ec39=!0,function(e,t){var i=_0x36ec39?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x36ec39=!1,i}),_0x59d0c9=_0xb433d2(void 0,(function(){return _0x59d0c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x59d0c9).search("(((.+)+)+)+$")})),_0x36ec39;_0x59d0c9();var _0x55e263="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\nuniform mat4 uRenderTextureMatrix;\nuniform vec2 uTexture1_size;\nuniform sampler2D uTexture1;\nuniform sampler2D uGlobalDepthTexture;\nuniform vec2 uGlobeTextureSize;\nvarying vec4 vClip_pos;\n\nfloat getDepth(in vec4 depth)\n{\n float z_window = czm_unpackDepth(depth);\n#ifdef WEBGPU\n\treturn z_window;\n#else\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n#endif\n}\n\nfloat getDepthFromShadowMap(in vec2 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(uTexture1, t00));\n\tfloat z10 = getDepth(texture2D(uTexture1, t01));\n\tfloat z01 = getDepth(texture2D(uTexture1, t10));\n\tfloat z11 = getDepth(texture2D(uTexture1, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n\n#ifdef CLIPPOLYGON\nuniform sampler2D uPolygonTexture;\nuniform mat4 uPolygonTextureMatrix;\nuniform float uPolygonMode;\nbool isClipValid(vec2 texcoord)\n{\n bool keepInside = (uPolygonMode > 1.5);\n if(keepInside)\n {\n return texture2D(uPolygonTexture, texcoord).r > 0.5;\n }\n else\n {\n return texture2D(uPolygonTexture, texcoord).r < 0.5;\n }\n}\n#endif\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n// #ifdef LOG_DEPTH\n// depthTexCoord.x = depthTexCoord.x * czm_viewport.z / uGlobeTextureSize.x + czm_viewport.x / uGlobeTextureSize.x;\n// depthTexCoord.y = depthTexCoord.y * czm_viewport.w / uGlobeTextureSize.y + czm_viewport.y / uGlobeTextureSize.y;\n// #endif\n\tfloat sceneDepth = czm_unpackDepth(texture2D(uGlobalDepthTexture, depthTexCoord.xy));\n// #ifdef LOG_DEPTH\n// sceneDepth = czm_reverseLogDepth(sceneDepth);\n// #endif\n\n#ifndef WEBGPU\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n#endif\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\t//vec4 viewPos = czm_inverseProjection * pos;\n\tvec4 renderTextureCoord = uRenderTextureMatrix * pos;\n\tvec4 ndcInDepthScene = renderTextureCoord / renderTextureCoord.w;\n\tvec2 texCoord = ndcInDepthScene.xy * 0.5 + 0.5;\n\tfloat depth = getDepthFromShadowMap(texCoord);\n\n\tfloat dxc = abs(dFdx(ndcInDepthScene.z));\n\tfloat dyc = abs(dFdy(ndcInDepthScene.z));\n\tfloat dF = max(dxc, dyc) * 3.0;\n\tfloat bias = 1.0e-6 + dF;\n#ifdef WEBGPU\n\tbias *= 2.0;\n#endif\n\tfloat c = float(depth + bias < ndcInDepthScene.z);\n\tvec4 resultColor = mix(uVisibleAreaColor, uHiddenAreaColor, vec4(c));\n\tif(resultColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIPPOLYGON\n vec4 polygonTextureCoord = uPolygonTextureMatrix * pos;\n\tvec4 texCoordPolygon = polygonTextureCoord / polygonTextureCoord.w;\n\ttexCoordPolygon.xyz = texCoordPolygon.xyz * 0.5 + 0.5;\n\tif(texCoordPolygon.x < 0.0 || texCoordPolygon.x > 1.0 || texCoordPolygon.y < 0.0 || texCoordPolygon.y > 1.0)\n\t{\n\t\tdiscard;\n }\n\tif(!isClipValid(texCoordPolygon.xy))\n {\n discard;\n }\n#endif\n\tgl_FragColor = resultColor;\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x1706dc=(_0x206e7f=!0,function(e,t){var i=_0x206e7f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x206e7f=!1,i}),_0x9d7acb=_0x1706dc(void 0,(function(){return _0x9d7acb.toString().search("(((.+)+)+)+$").toString().constructor(_0x9d7acb).search("(((.+)+)+)+$")})),_0x206e7f;_0x9d7acb();var _0x20cd45="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\nuniform vec2 uTexture1_size;\n#if TEXTURE_UNITS > 0\nuniform sampler2D uTextures[TEXTURE_UNITS];\nuniform mat4 uRenderTextureMatrixs[TEXTURE_UNITS];\n#endif\nuniform sampler2D uGlobalDepthTexture;\nuniform vec2 uGlobeTextureSize;\nuniform int textureCount;\nvarying vec4 vClip_pos;\n\nfloat getDepth(in vec4 depth)\n{\n float z_window = czm_unpackDepth(depth);\n#ifdef WEBGPU\n\treturn z_window;\n#else\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n#endif\n}\n\n#define inline\nfloat getDepthFromShadowMap(in sampler2D viewShedTexture, in vec4 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(viewShedTexture, t00));\n\tfloat z10 = getDepth(texture2D(viewShedTexture, t01));\n\tfloat z01 = getDepth(texture2D(viewShedTexture, t10));\n\tfloat z11 = getDepth(texture2D(viewShedTexture, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n\n#define inline\nfloat isVisibleForOneViewShed(in sampler2D viewShedTexture, in vec4 viewPos, in mat4 renderTextureMatrix1)\n{\n vec4 renderTextureCoord = renderTextureMatrix1 * viewPos;\n\tvec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n\ttexCoord.xyz = texCoord.xyz * 0.5 + 0.5;\n\n if (texCoord.x<0.0 || texCoord.x>1.0\n || texCoord.y<0.0 || texCoord.y>1.0)\n {\n return 1.0;\n }\n\n float depth = getDepthFromShadowMap(viewShedTexture, texCoord);\n depth = depth * 0.5 + 0.5;\n float dxc = abs(dFdx(texCoord.z));\n float dyc = abs(dFdy(texCoord.z));\n float dF = max(dxc, dyc) * 3.0;\n float bias = 1.0e-6 + dF;\n#ifdef WEBGPU\n\tbias *= 2.0;\n#endif\n float c = float(depth+bias < texCoord.z);\n return c;\n}\n\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n\tdepthTexCoord.x = depthTexCoord.x * czm_viewport.z / uGlobeTextureSize.x + czm_viewport.x / uGlobeTextureSize.x;\n\tdepthTexCoord.y = depthTexCoord.y * czm_viewport.w / uGlobeTextureSize.y + czm_viewport.y / uGlobeTextureSize.y;\n\tfloat sceneDepth = czm_unpackDepth(texture2D(uGlobalDepthTexture, depthTexCoord.xy));\n // sceneDepth = czm_reverseLogDepth(sceneDepth);\n#ifndef WEBGPU\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n#endif\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\t//vec4 viewPos = czm_inverseProjection * pos;\n float c = isVisibleForMultiViewShed(pos);\n\tvec4 resultColor = mix(uVisibleAreaColor, uHiddenAreaColor, vec4(c));\n\tif(resultColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = resultColor;\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x12330c=(_0xa95ec=!0,function(e,t){var i=_0xa95ec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa95ec=!1,i}),_0x2f6c7e=_0x12330c(void 0,(function(){return _0x2f6c7e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f6c7e).search("(((.+)+)+)+$")})),_0xa95ec;function _0x13f223(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._globalDepthBuffer=void 0,this._cameraDepthBuffer=void 0,this._clearStencilCommand=new t$W({stencil:0}),this._clearStencilCommand.pass=Le$q.ANALYSIS,this._lineCommand=void 0,this._stencilCommand=void 0,this._colorCommand=void 0,this._boundingSphere=new i$1d,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._horizontalFov=90,this._verticalFov=60,this._distance=200,this._visibleAreaColor=new e$2c(0,1,0,.5),this._hiddenAreaColor=new e$2c(1,0,0,.5),this._hintLineColor=new e$2c(1,1,1,1),this._segmentCount=20,this._invertViewMatrix=new p$1d,this._viewProjMatrix=new p$1d,this._matProj=new p$1d,this._renderTextureMatrix=new p$1d,this._update=!0,this._id=0,this._name="",this._sceneName="",this._cameraName="",this._checking=!1,this._visibleViewport=4095,this._targetPoints=[],this._multiNames=[],this._isUpdateCommand=!1,this._isShowLine=!0,this._polygonTexture=void 0,this._polygonRegions=new e$1Q,this._polygonTextureMatrix=new p$1d,this._polygonViewProjMatrix=new p$1d,this._polygonUpdate=!1,this._polygonMode=R$L.KeepInside,this._attributeLocations={aPosition:0}}function _0x3f2e42(e){e$2e(e._stencilCommand)&&(e._stencilCommand.vertexArray=e._stencilCommand.vertexArray&&e._stencilCommand.vertexArray.destroy(),e._stencilCommand.shaderProgram=e._stencilCommand.shaderProgram&&e._stencilCommand.shaderProgram.destroy(),e._stencilCommand=void 0),e$2e(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),e$2e(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0)}function _0x16656e(e,t,i){var n=e._horizontalFov*e$2d.RADIANS_PER_DEGREE,r=e._verticalFov*e$2d.RADIANS_PER_DEGREE,o=Math.tan(.5*n)/Math.tan(.5*r);e._distance;var a=Math.max(e._distance,10),s=e._direction*e$2d.RADIANS_PER_DEGREE,l=e._pitch*e$2d.RADIANS_PER_DEGREE,u=o$1p.fromDegreesArrayHeights(e._viewPosition)[0],c=i.camera,h=c.frustum.aspectRatio,d=c.frustum.fov,f=c.frustum.near,p=c.frustum.far,_=new o$1p,m=c.heading,g=c.pitch,x=p$1d.clone(c.transform,x);o$1p.clone(c.position,_),e._cameraDepthBuffer.isUpdate=!0;var y=i.useLogDepth,v=e._scene.globe.depthTestAgainstTerrain;e._cameraDepthBuffer._beginFunc=function(t){t.useLogDepth=!1,e._scene.globe.depthTestAgainstTerrain=!0,h=c.frustum.aspectRatio,d=c.frustum.fov,f=c.frustum.near,p=c.frustum.far,m=c.heading,g=c.pitch,x=p$1d.clone(c.transform,x),c._setTransform(p$1d.IDENTITY),o$1p.clone(c.position,_),c.frustum.aspectRatio=o,c.frustum.fov=n,c.frustum.near=1,c.frustum.far=a+100,c.setView({destination:u,orientation:{heading:s,pitch:l,roll:c.roll}}),p$1d.multiply(c.frustum.projectionMatrix,c.viewMatrix,e._viewProjMatrix),p$1d.clone(c.inverseViewMatrix,e._invertViewMatrix),p$1d.clone(c.frustum.projectionMatrix,e._matProj),o$1p.clone(o$1p.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,i$1d.transform(e._boundingSphere,e._invertViewMatrix,e._boundingSphere)},e._cameraDepthBuffer._endFunc=function(t){c.setView({destination:_,orientation:{heading:m,pitch:g,roll:c.roll},convert:!1}),c.frustum.aspectRatio=h,c.frustum.fov=d,c.frustum.near=f,c.frustum.far=p,c._setTransform(x),e._cameraDepthBuffer.isUpdate=!1,t.useLogDepth=y,e._scene.globe.depthTestAgainstTerrain=v},e$2e(e._globalDepthBuffer)&&(e._globalDepthBuffer.isUpdate=!0,e._globalDepthBuffer._beginFunc=function(t){e._scene.globe.depthTestAgainstTerrain=!0,t.useLogDepth=!1;var i=o$1p.distance(c.positionWC,e._boundingSphere.center),n=i<e._boundingSphere.radius?2:i-e._boundingSphere.radius,r=i+e._boundingSphere.radius;c.frustum.near=n,c.frustum.far=r,e._globalDepthProjMatrix=c.frustum.projectionMatrix,e._globalDepthProjMatrixInv=p$1d.inverse(e._globalDepthProjMatrix,new p$1d);var o=p$1d.multiply(c.inverseViewMatrix,e._globalDepthProjMatrixInv,new p$1d);p$1d.multiply(e._viewProjMatrix,o,e._renderTextureMatrix),e$2e(e._polygonViewProjMatrix)&&p$1d.multiply(e._polygonViewProjMatrix,o,e._polygonTextureMatrix)},e._globalDepthBuffer._endFunc=function(t){t.useLogDepth=y,c.frustum.near=f,c.frustum.far=p,e._scene.globe.depthTestAgainstTerrain=v})}function _0x275715(e,t,i){var n=(e._segmentCount+1)*(e._segmentCount+1)+1,r=S$14.createTypedArray(S$14.FLOAT,3*n),o=3,a=e._horizontalFov*e$2d.RADIANS_PER_DEGREE,s=e._verticalFov*e$2d.RADIANS_PER_DEGREE,l=(Math.tan(.5*a),Math.tan(.5*s));e._distance;var u=e._distance*l,c=Math.PI-.5*a,h=0,d=0,f=a/e._segmentCount;e._targetPoints.length=0;for(var p=0;p<e._segmentCount+1;p++){h=c+p*f;for(var _=u/(e._distance/Math.cos(h)),m=Math.atan(_),g=-m,x=2*m/e._segmentCount,y=new t$L,v=0;v<e._segmentCount+1;v++){d=g+v*x;var $=e._distance*Math.cos(d)*Math.sin(h),b=e._distance*Math.sin(d),T=e._distance*Math.cos(d)*Math.cos(h);r[o++]=$,r[o++]=b,r[o++]=T,y.add(new s$N($,b,T))}e._targetPoints.push(y)}e._targetPoints.reverse();var C=2*(4+5*e._segmentCount+2*e._segmentCount*3),S=e._segmentCount*e._segmentCount*3*2+3*e._segmentCount*4,w=S$14.createTypedArray(S$14.UNSIGNED_SHORT,C),E=S$14.createTypedArray(S$14.UNSIGNED_SHORT,S),P=0;for(p=0;p<e._segmentCount;p++)for(v=0;v<e._segmentCount;v++)E[P++]=1+p+v*(e._segmentCount+1),E[P++]=1+p+1+v*(e._segmentCount+1),E[P++]=1+p+(v+1)*(e._segmentCount+1),E[P++]=1+p+1+v*(e._segmentCount+1),E[P++]=1+p+1+(v+1)*(e._segmentCount+1),E[P++]=1+p+(v+1)*(e._segmentCount+1);for(p=0;p<e._segmentCount;p++)E[P++]=p+1+1,E[P++]=p+1,E[P++]=0,E[P++]=0,E[P++]=p+e._segmentCount*(e._segmentCount+1)+1,E[P++]=p+1+e._segmentCount*(e._segmentCount+1)+1;for(p=0;p<e._segmentCount;p++)E[P++]=0,E[P++]=p*(e._segmentCount+1)+1,E[P++]=(p+1)*(e._segmentCount+1)+1,E[P++]=e._segmentCount+(p+1)*(e._segmentCount+1)+1,E[P++]=e._segmentCount+p*(e._segmentCount+1)+1,E[P++]=0;P=0,w[P++]=0,w[P++]=1,w[P++]=0,w[P++]=e._segmentCount+1,w[P++]=0,w[P++]=e._segmentCount*(e._segmentCount+1)+1,w[P++]=0,w[P++]=(e._segmentCount+1)*(e._segmentCount+1);for(p=0;p<5;p++)for(v=0;v<e._segmentCount;v++)w[P++]=1+v+5*(e._segmentCount+1)*p,w[P++]=1+(v+1)+5*(e._segmentCount+1)*p;for(p=0;p<5;p++)for(v=0;v<e._segmentCount;v++)w[P++]=1+(e._segmentCount+1)*v+5*p,w[P++]=1+(e._segmentCount+1)*(v+1)+5*p;var A=t$X.createVertexBuffer({context:t,typedArray:r,usage:A$18.STATIC_DRAW}),L=[],M=e._attributeLocations;L.push({name:"aPosition",index:M.aPosition,vertexBuffer:A,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var R=t$X.createIndexBuffer({context:t,typedArray:w,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),O=t$X.createIndexBuffer({context:t,typedArray:E,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});e._lineCommand=new i$$({primitiveType:W$18.LINES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!0}),e._lineCommand.vertexArray=new c$13({context:t,attributes:L,indexBuffer:R}),e._lineCommand.shaderProgram=r$14.fromCache({name:"viewshed_lineCommand_SP",context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:M}),e._lineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var D=[];for(p=0;p<6;p++)D[p]=new e$2c(0,0,0,0);e._lineCommand.uniformMap={uDiffuseColor:function(){return e._hintLineColor},clip_mode:function(){return 0},clip_planes:function(){return D},clip_line_color:function(){return e$2c.UNIT_W}},e._stencilCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!0}),e._stencilCommand.vertexArray=new c$13({context:t,attributes:L,indexBuffer:O}),e._stencilCommand.shaderProgram=r$14.fromCache({name:"viewshed_stencilCommand_SP",context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:M}),e._stencilCommand.renderState=d$1m.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0,func:re$G.GREATER},stencilTest:{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.INCREMENT_WRAP},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:65535}}),e._stencilCommand.uniformMap={uDiffuseColor:function(){return e$2c.UNIT_W},clip_mode:function(){return 0},clip_planes:function(){return D},clip_line_color:function(){return e$2c.UNIT_W}},e._colorCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!0}),e._colorCommand.vertexArray=new c$13({context:t,attributes:L,indexBuffer:O});var I=void 0,F=new s$V({name:"ViewShedAnalysisVp",sources:[_0x56b405]});if(e._multiNames.length>1){let t=_0x20cd45.indexOf("void main");var B="#define inline\n float isVisibleForMultiViewShed(vec4 viewPos) {\n float c = 1.0;\n #if TEXTURE_UNITS > 0\n";for(let t=0;t<e._multiNames.length;t++)B+=" c = isVisibleForOneViewShed(uTextures["+t+"], \n viewPos, uRenderTextureMatrixs["+t+"]);\n if(c == 0.0 || textureCount == 1)\n {\n return c;\n }\n";B+=" #endif\n return c;\n }",I=new s$V({sources:[_0x20cd45.slice(0,t)+B+_0x20cd45.slice(t)]})}else I=new s$V({sources:[_0x55e263]});e._colorCommand.shaderProgram=r$14.fromCache({name:"viewshed_colorCommand_SP",context:t,vertexShaderSource:F,fragmentShaderSource:I,attributeLocations:M}),e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.NOT_EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:65535},blending:Ee$r.ALPHA_BLEND}),e._multiNames.length<=1?(e._colorCommand.uniformMap={uVisibleAreaColor:function(){return e._visibleAreaColor},uHiddenAreaColor:function(){return e._hiddenAreaColor},uRenderTextureMatrix:function(){return e._renderTextureMatrix},uTexture1_size:function(){var t=e._cameraDepthBuffer.depthTexture;return new o$1o(t.width,t.height)},uTexture1:function(){return e._cameraDepthBuffer.depthTexture},uGlobalDepthTexture:function(){return e._globalDepthBuffer.depthTexture},uGlobeTextureSize:function(){return new o$1o(e._globalDepthBuffer.depthTexture.width,e._globalDepthBuffer.depthTexture.height)},uPolygonTexture:function(){return e._polygonTexture},uPolygonMode:function(){return e._polygonMode},uPolygonTextureMatrix:function(){return e._polygonTextureMatrix}},e._colorCommand._isViewShed=!0):(I.defines.push("TEXTURE_UNITS "+e._multiNames.length),e._isUpdateCommand=!0)}function _0x4a06d9(e,t,i,n){if(e$2e(i)&&!e$2e(i._command)){var r=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix});i._command=r;var o={position:0};r.vertexArray=c$13.fromGeometry({context:t,geometry:i._geometry,attributeLocations:o,bufferUsage:A$18.STATIC_DRAW,interleave:!0});var a=new s$V({sources:["attribute vec4 position;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n}\n"]}),s=new s$V({sources:["void main()\n{\n gl_FragColor = vec4(1.0);\n}\n"]});r.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:o}),r.framebuffer=new t$V({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=d$1m.fromCache({cull:{enabled:!1}})}}function _0x2ab250(e,t,i){if(e._polygonUpdate&&0!==e._polygonRegions.length){e._polygonUpdate=!1;var n=new t$W({color:new e$1X(0,0,0,0),depth:1});n.framebuffer=new t$V({context:t,colorTextures:[e._polygonTexture],destroyAttachments:!1}),n.renderState=d$1m.fromCache(),n.execute(t);for(var r=0;r<e._polygonRegions.values.length;r++){var o=e._polygonRegions.values[r];_0x4a06d9(e,t,o,e._polygonTexture),o._command.execute(t)}n.framebuffer.destroy()}}_0x2f6c7e(),Object.defineProperties(_0x13f223.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},horizontalFov:{get:function(){return this._horizontalFov},set:function(e){this._horizontalFov=e,this._update=!0}},verticalFov:{get:function(){return this._verticalFov},set:function(e){this._verticalFov=e,this._update=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$15("the distance is greater than 0.0");this._distance=e,this._update=!0}},visibleAreaColor:{get:function(){var e=new e$1X;return e.red=this._visibleAreaColor.x,e.green=this._visibleAreaColor.y,e.blue=this._visibleAreaColor.z,e.alpha=this._visibleAreaColor.w,e},set:function(e){this._visibleAreaColor.x=e.red,this._visibleAreaColor.y=e.green,this._visibleAreaColor.z=e.blue,this._visibleAreaColor.w=e.alpha}},hiddenAreaColor:{get:function(){var e=new e$1X;return e.red=this._hiddenAreaColor.x,e.green=this._hiddenAreaColor.y,e.blue=this._hiddenAreaColor.z,e.alpha=this._hiddenAreaColor.w,e},set:function(e){this._hiddenAreaColor.x=e.red,this._hiddenAreaColor.y=e.green,this._hiddenAreaColor.z=e.blue,this._hiddenAreaColor.w=e.alpha}},hintLineColor:{get:function(){var e=new e$1X;return e.red=this._hintLineColor.x,e.green=this._hintLineColor.y,e.blue=this._hintLineColor.z,e.alpha=this._hintLineColor.w,e},set:function(e){this._hintLineColor.x=e.red,this._hintLineColor.y=e.green,this._hintLineColor.z=e.blue,this._hintLineColor.w=e.alpha}},isShowLine:{get:function(){return this._isShowLine},set:function(e){this._isShowLine=e}}}),_0x13f223.prototype.destroy=function(){return e$2e(this._frameState)&&(e$2e(this._globalDepthBuffer)&&delete this._frameState._framebufferList[this._sceneName],e$2e(this._cameraDepthBuffer)&&delete this._frameState._framebufferList[this._cameraName],this._frameState=void 0),this._globalDepthBuffer=this._globalDepthBuffer&&this._globalDepthBuffer.destroy(),this._cameraDepthBuffer=this._cameraDepthBuffer&&this._cameraDepthBuffer.destroy(),_0x3f2e42(this),this._clearStencilCommand=void 0,this._scene.farToNearRatio=1e3,this._scene._analyst3D.remove(this._name,!0),e$2e(this._polygonTexture)&&(this._polygonTexture.destroy(),this._polygonTexture=null),i$11(this)},_0x13f223.prototype.clear=function(){this._scene._analyst3D.remove(this._name,!1)},_0x13f223.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("ViewShed3D"),""===this._name&&!this._checking&&(this._name="viewshed3d"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_global",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},_0x13f223.prototype.setDistDirByPoint=function(e){if(e[0]===this._viewPosition[0]&&e[1]===this._viewPosition[1]&&e[2]===this._viewPosition[2])throw new t$15("the position is [longitude, latitude ,height] and is not equals viewPosition");var t,i,n=this._scene._frameState.camera,r=n._projection;if(this._scene.mode===C$14.SCENE3D)t=o$1p.fromDegreesArrayHeights(e)[0],i=o$1p.fromDegreesArrayHeights(this._viewPosition)[0];else{var o=a$18.fromDegrees(e[0],e[1],e[2]);t=r.project(o,new o$1p);var a=a$18.fromDegrees(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]);i=r.project(a,new o$1p)}var s=new o$1p;o$1p.subtract(t,i,s);var l=o$1p.magnitude(s);o$1p.normalize(s,s),this.distance=l;var u=n.heading,c=n.pitch,h=n.roll,d=new o$1p;o$1p.clone(n.position,d);var f=s.clone(),p=i.clone();p=o$1p.normalize(p,p),Math.abs(o$1p.dot(p,f))>=1&&(p=Math.abs(o$1p.dot(f,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,p):o$1p.clone(o$1p.UNIT_Z,p));var _=new o$1p;o$1p.cross(p,f,_),_=o$1p.normalize(_,_),o$1p.cross(f,_,p),p=o$1p.normalize(p,p),n.setView({destination:i,orientation:{direction:f,up:p},convert:!1}),this.direction=n.heading*e$2d.DEGREES_PER_RADIAN,this.pitch=n.pitch*e$2d.DEGREES_PER_RADIAN,n.setView({destination:d,orientation:{heading:u,pitch:c,roll:h},convert:!1})},_0x13f223.prototype.update=function(e,t,i){if("normal"===t._fboState.name&&!t.passes.pick){if(t._fboState.enabled&&(t._fboState.name===this._sceneName||t._fboState.name===this._cameraName))return void(t._fboState.name===this._sceneName&&e$2e(this._stencilCommand)&&i.push(this._stencilCommand));if(!t.camera.bReflect&&(this._update&&(this._frameState=t,e$2e(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new s$U(e),this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),e$2e(this._globalDepthBuffer)||(this._globalDepthBuffer=new s$U(e),this._globalDepthBuffer.environmentVisible.isObjectVisible=!0,this._globalDepthBuffer.environmentVisible.isGlobalVisible=!0,this._globalDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._sceneName]=this._globalDepthBuffer),this._update=!1,_0x3f2e42(this),_0x16656e(this,e,t),_0x275715(this,e)),e$2e(this._cameraDepthBuffer.framebuffer))){var n=i.pop();!e$2e(n)||(e$2e(this._clearStencilCommand)&&i.push(this._clearStencilCommand),e$2e(this._stencilCommand)&&i.push(this._stencilCommand),e$2e(this._colorCommand)&&i.push(this._colorCommand),e$2e(this._lineCommand)&&this._isShowLine&&i.push(this._lineCommand),i.push(n))}}},_0x13f223.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=1<<e,e$2e(this._cameraDepthBuffer)&&(this._cameraDepthBuffer._visibleViewport=this._visibleViewport)},_0x13f223.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0x13f223.prototype.getViewshedParameter=function(){for(var e=[],t=this._invertViewMatrix,i=0,n=this._targetPoints.length;i<n;i++){for(var r=this._targetPoints[i].pntArray,o=new t$L,a=0,s=r.length;a<s;a++){var l=this.getBarrierPoint(r[a]);if(e$2e(l))o.add(l);else{var u=p$1d.multiplyByPoint(t,r[a],new o$1p),c=a$18.fromCartesian(u),h=c.longitude*e$2d.DEGREES_PER_RADIAN,d=c.latitude*e$2d.DEGREES_PER_RADIAN;o.add(new s$N(h,d,c.height))}}e.push(o)}return{viewPosition:new s$N(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]),point3DList:e,distance:this._distance}};var _0x4ffd48=new e$2c(1/255,1/65025,1/160581375,1/4228250625);function _0x585beb(e,t){for(var i=o$1p.fromDegreesArrayHeights(t),n=new U$18({polygonHierarchy:{positions:i},vertexFormat:{bitangent:!1,color:!1,normal:!1,position:!0,st:!1,tangent:!1},perPositionHeight:!0}),r=U$18.createGeometry(n),o=o$1p.fromDegreesArrayHeights(t),a=h$18.fromCartesianArray(o),s=[],l=1;l<i.length-1;l++)s.push(0),s.push(l),s.push(l+1);r.indices=s;var u=new p$1d;p$1d.inverse(e._invertViewMatrix,u),f$Z.updateGeometry(r,t,u);var c=new f$Z;return c._geometry=r,c._rectangle=a,c}function _0x27adc5(e,t){if(e$2e(e._colorCommand)){var i=e._scene._context,n=e._colorCommand.shaderProgram.fragmentShaderSource,r=e._colorCommand.shaderProgram.vertexShaderSource,o=n.defines.indexOf("CLIPPOLYGON");t?o<0&&n.defines.push("CLIPPOLYGON"):o>=0&&n.defines.splice(o,1),e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=r$14.fromCache({context:i,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:e._attributeLocations})}}function m$M(e){if(e=u$Z(e,{}),this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._rectangle=u$Z(e.rectangle,h$18.MAX_VALUE),this._projection=new n$1d(this._ellipsoid),this._numberOfLevelZeroTilesX=u$Z(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=u$Z(e.numberOfLevelZeroTilesY,1),e.hasOwnProperty("tileInfo")&&(this._tileInfo=e.tileInfo),this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._beginLevel=0,this._suggest=void 0,e$2e(e.resolutions)){this._resolutions=e.resolutions;for(var t=0,i=6378137*Math.PI/this._tileWidth;i>this._resolutions[0];)i*=.5,t++;this._beginLevel=t-1,this._dataBounds=e.dataBounds,this._tileBounds=[];for(var n=this._dataBounds.east-this._tileInfo.origin.x,r=this._tileInfo.origin.y-this._dataBounds.south,o=this._dataBounds.west-this._tileInfo.origin.x,a=this._tileInfo.origin.y-this._dataBounds.north,s=0;s<this._resolutions.length;s++){var l=this._resolutions[s]*this._tileInfo.cols,u=this._resolutions[s]*this._tileInfo.rows,c=Math.floor(o/l),h=Math.floor(a/u),d=Math.floor(n/l),f=Math.floor(r/u);this._tileBounds.push(new h$18(c,f,d,h))}}}function n$C(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}_0x13f223.prototype.getBarrierPoint=function(e){var t=new e$2c(e.x,e.y,e.z,1);if(p$1d.multiplyByVector(this._matProj,t,t),e$2c.divideByScalar(t,t.w,t),!(t.x>1||t.x<-1||t.y>1||t.y<-1)){var i=this._scene.context,n=i.drawingBufferWidth,r=i.drawingBufferHeight,o=(.5*t.x+.5)*n-.5,a=(.5*t.y+.5)*r-.5;if(!(o<0||a<0)){for(var s=Math.floor(o),l=o-s,u=Math.floor(a),c=a-u,h=i.readPixels({framebuffer:this._cameraDepthBuffer.framebuffer,x:s,y:u,width:2,height:2}),d=new e$2c,f=[],p=0;p<4;p++){var _=e$2c.unpack(h,4*p,d);if(f[p]=2*e$2c.dot(_,_0x4ffd48)-1,!(f[p]<1&&f[p]>0))return}var m=(1-c)*((1-l)*f[0]+l*f[1])+c*((1-l)*f[2]+l*f[3]);if(t.z-m>1e-6){var g=new p$1d;p$1d.inverse(this._viewProjMatrix,g),t.z=m,p$1d.multiplyByVector(g,t,t),e$2c.divideByScalar(t,t.w,t);var x=a$18.fromCartesian(t);return new s$N(x.longitude*e$2d.DEGREES_PER_RADIAN,x.latitude*e$2d.DEGREES_PER_RADIAN,x.height)}}}},_0x13f223.prototype._setMultiViewShedNames=function(e){if(this._multiNames.length!=e.length)return this._update=!0,void(this._multiNames=e);for(var t=0;t<this._multiNames.length;t++)if(this._multiNames[t]!=e[t])return this._update=!0,void(this._multiNames=e)},_0x13f223.prototype.addClipRegion=function(e){var t=e.name,i=e.position;if(!e$2e(t)||!e$2e(i))return!1;if(e$2e(this._polygonRegions.get(t)))return!1;var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;e$2e(this._polygonTexture)||(this._polygonTexture=new t$U({context:this._scene._context,width:n,height:r}));var o=_0x585beb(this,i);this._polygonRegions.set(t,o),this._polygonUpdate=!0;var a=this._frameState.camera,s=o._rectangle,l=new o$1p,u=a.heading,c=a.pitch,h=a._positionCartographic.height;o$1p.clone(a.position,l),a.setView({destination:o$1p.fromRadians(s.west+.5*s.width,s.south+.5*s.height,h+1e3)}),p$1d.multiply(a.frustum.projectionMatrix,a.viewMatrix,this._polygonViewProjMatrix),this._scene._context.uniformState.update(this._frameState),_0x2ab250(this,this._scene._context,this._frameState),_0x27adc5(this,!0),a.setView({destination:l,orientation:{heading:u,pitch:c,roll:a.roll}})},_0x13f223.prototype.removeClipRegion=function(e){return!!this._polygonRegions.remove(e)&&(this._polygonUpdate=!0,0===this._polygonRegions.values.length&&_0x27adc5(this,!1),!0)},_0x13f223.prototype.removeAllClipRegion=function(){for(var e=0;e<this._polygonRegions.values.length;e++)this._polygonRegions.values[e].destroy(),this._polygonRegions.values[e]=null;this._polygonRegions.removeAll(),this._polygonUpdate=!0,_0x27adc5(this,!1)},_0x13f223.prototype.setClipMode=function(e){this._polygonMode=e},Object.defineProperties(m$M.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),m$M.prototype.getNumberOfXTilesAtLevel=function(e){if(e$2e(this._resolutions)){if(e<this._beginLevel)return this._numberOfLevelZeroTilesX<<e;var t=this._dataBounds.east-this._tileInfo.origin.x,i=e$2d.clamp(e-this._beginLevel,0,this._resolutions.length-1),n=this._resolutions[i]*this._tileInfo.cols;return Math.ceil(t/n)}if(e$2e(this._tileInfo)){var r=this._tileInfo.lods.filter((function(t){return t.level===e})),o=e$2d.toDegrees(this._rectangle.east)-this._tileInfo.origin.x,a=r[0].resolution;return Math.ceil(o/(this._tileInfo.rows*a))}return this._numberOfLevelZeroTilesX<<e},m$M.prototype.getNumberOfYTilesAtLevel=function(e){if(e$2e(this._resolutions)){if(e<this._beginLevel)return this._numberOfLevelZeroTilesY<<e;var t=this._tileInfo.origin.y-this._dataBounds.south,i=e$2d.clamp(e-this._beginLevel,0,this._resolutions.length-1),n=this._resolutions[i]*this._tileInfo.rows;return Math.ceil(t/n)}if(e$2e(this._tileInfo)){var r=this._tileInfo.lods.filter((function(t){return t.level===e})),o=this._tileInfo.origin.y-e$2d.toDegrees(this._rectangle.south),a=r[0].resolution;return Math.ceil(o/(this._tileInfo.cols*a))}return this._numberOfLevelZeroTilesY<<e},m$M.prototype.rectangleToNativeRectangle=function(e,t){o$1q.defined("rectangle",e);var i=e$2d.toDegrees(e.west),n=e$2d.toDegrees(e.south),r=e$2d.toDegrees(e.east),o=e$2d.toDegrees(e.north);return e$2e(t)?(t.west=i,t.south=n,t.east=r,t.north=o,t):new h$18(i,n,r,o)},m$M.prototype.tileXYToNativeRectangle=function(e,t,i,n){var r=this.tileXYToRectangle(e,t,i,n);return r.west=e$2d.toDegrees(r.west),r.south=e$2d.toDegrees(r.south),r.east=e$2d.toDegrees(r.east),r.north=e$2d.toDegrees(r.north),r},m$M.prototype.tileXYToRectangle=function(e,t,i,n){var r=this._rectangle;if(e$2e(this._resolutions)){var o=this._resolutions[i-this._beginLevel],a=this._tileInfo.origin.x,s=this._tileInfo.origin.y,l=a+e*this._tileWidth*o,u=a+(e+1)*this._tileWidth*o,c=s-t*this._tileHeight*o,h=s-(t+1)*this._tileHeight*o;return e$2e(n)?(n.west=l,n.south=h,n.east=u,n.north=c,n):new h$18(l/6378137,h/6378137,u/6378137,c/6378137)}if(e$2e(this._tileInfo)){o=this._tileInfo.lods[i].resolution*e$2d.TWO_PI/360;a=e$2d.toRadians(this._tileInfo.origin.x),s=e$2d.toRadians(this._tileInfo.origin.y);l=a+e*this._tileWidth*o,u=a+(e+1)*this._tileWidth*o,c=s-t*this._tileHeight*o,h=s-(t+1)*this._tileHeight*o;return e$2e(n)?(n.west=l,n.south=h,n.east=u,n.north=c,n):new h$18(l,h,u,c)}var d=this.getNumberOfXTilesAtLevel(i),f=this.getNumberOfYTilesAtLevel(i),p=r.width/d,_=(l=e*p+r.west,u=(e+1)*p+r.west,r.height/f);c=r.north-t*_,h=r.north-(t+1)*_;return e$2e(n)||(n=new h$18(l,h,u,c)),n.west=l,n.south=h,n.east=u,n.north=c,n},m$M.prototype.positionToTileXY=function(e,t,i){var n=this._rectangle;if(h$18.contains(n,e)){var r=this.getNumberOfXTilesAtLevel(t),o=this.getNumberOfYTilesAtLevel(t),a=n.width/r,s=n.height/o;if(e$2e(this._resolutions)){var l=this._resolutions[t-this._beginLevel];a=this._tileWidth*l,s=this._tileHeight*l}else if(e$2e(this._tileInfo)){l=this._tileInfo.lods[t].resolution*e$2d.TWO_PI/360;a=this._tileWidth*l,s=this._tileHeight*l}var u,c,h=e.longitude;n.east<n.west&&(h+=e$2d.TWO_PI);var d=(h-(u=e$2e(this._resolutions)?this._tileInfo.origin.x:e$2e(this._tileInfo)?e$2d.toRadians(this._tileInfo.origin.x):n.west))/a|0;e$2e(this._resolutions)&&(d=(6378137*h-u)/a|0,d=e$2d.clamp(d,this._tileBounds[t-this._beginLevel].west,this._tileBounds[t-this._beginLevel].east)),d>=r&&(d=r-1);var f=((c=e$2e(this._resolutions)?this._tileInfo.origin.y:e$2e(this._tileInfo)?e$2d.toRadians(this._tileInfo.origin.y):n.north)-e.latitude)/s|0;return e$2e(this._resolutions)&&(f=(c-6378137*e.latitude)/s|0,f=e$2d.clamp(f,this._tileBounds[t-this._beginLevel].north,this._tileBounds[t-this._beginLevel].south)),f>=o&&(f=o-1),e$2e(i)?(i.x=d,i.y=f,i):new o$1o(d,f)}};var l$S=new h$18;function S$I(e,t,i,n){for(var r=n.length,o=0;o<r;++o){var a=n[o];if(a.x===t&&a.y===i&&a.level===e)return!0}return!1}n$C.prototype.addAvailableTileRange=function(e,t,i,n,r){var o=this._tilingScheme,a=this._rootNodes;if(0===e)for(var s=i;s<=r;++s)for(var l=t;l<=n;++l)S$I(e,l,s,a)||a.push(new _$F(o,void 0,0,l,s));o.tileXYToRectangle(t,i,e,l$S);var u=l$S.west,c=l$S.north;o.tileXYToRectangle(n,r,e,l$S);for(var h=l$S.east,d=new Y$B(e,u,l$S.south,h,c),f=0;f<a.length;++f){var p=a[f];L$T(p.extent,d)&&j$K(this._maximumLevel,p,d)}},n$C.prototype.computeMaximumLevelAtPosition=function(e){for(var t,i=0;i<this._rootNodes.length;++i){var n=this._rootNodes[i];if(m$L(n.extent,e)){t=n;break}}return e$2e(t)?x$P(void 0,t,e):-1};var W$P=[],b$T=[],Q$J=new h$18,X$I=new h$18;n$C.prototype.computeBestAvailableLevelOverRectangle=function(e){var t=W$P;t.length=0,e.east<e.west?(t.push(h$18.fromRadians(-Math.PI,e.south,e.east,e.north,Q$J)),t.push(h$18.fromRadians(e.west,e.south,Math.PI,e.north,X$I))):t.push(e);var i,n=b$T;for(n.length=0,i=0;i<this._rootNodes.length;++i)M$L(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(e$2e(n[i])&&0===n[i].length)return i;return 0};var o$N=new a$18;function _$F(e,t,i,n,r){this.tilingScheme=e,this.parent=t,this.level=i,this.x=n,this.y=r,this.extent=e.tileXYToRectangle(n,r,i),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}function Y$B(e,t,i,n,r){this.level=e,this.west=t,this.south=i,this.east=n,this.north=r}function L$T(e,t){var i=Math.max(e.west,t.west),n=Math.max(e.south,t.south),r=Math.min(e.east,t.east);return n<Math.min(e.north,t.north)&&i<r}function j$K(e,t,i){for(;t.level<e;)if(A$T(t.nw.extent,i))t=t.nw;else if(A$T(t.ne.extent,i))t=t.ne;else if(A$T(t.sw.extent,i))t=t.sw;else{if(!A$T(t.se.extent,i))break;t=t.se}if(0===t.rectangles.length||t.rectangles[t.rectangles.length-1].level<=i.level)t.rectangles.push(i);else{var n=a$17(t.rectangles,i.level,I$W);n<=0&&(n=~n),t.rectangles.splice(n,0,i)}}function I$W(e,t){return e.level-t}function A$T(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function m$L(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function x$P(e,t,i){for(var n=0,r=!1;!r;){var o=t._nw&&m$L(t._nw.extent,i),a=t._ne&&m$L(t._ne.extent,i),s=t._sw&&m$L(t._sw.extent,i),l=t._se&&m$L(t._se.extent,i);if(o+a+s+l>1){o&&(n=Math.max(n,x$P(t,t._nw,i))),a&&(n=Math.max(n,x$P(t,t._ne,i))),s&&(n=Math.max(n,x$P(t,t._sw,i))),l&&(n=Math.max(n,x$P(t,t._se,i)));break}o?t=t._nw:a?t=t._ne:s?t=t._sw:l?t=t._se:r=!0}for(;t!==e;){for(var u=t.rectangles,c=u.length-1;c>=0&&u[c].level>n;--c){var h=u[c];m$L(h,i)&&(n=h.level)}t=t.parent}return n}function M$L(e,t,i){if(t){var n,r=!1;for(n=0;n<i.length;++n)r=r||L$T(t.extent,i[n]);if(r){var o=t.rectangles;for(n=0;n<o.length;++n){var a=o[n];e[a.level]||(e[a.level]=i),e[a.level]=q$P(e[a.level],a)}M$L(e,t._nw,i),M$L(e,t._ne,i),M$L(e,t._sw,i),M$L(e,t._se,i)}}}function q$P(e,t){for(var i=[],n=0;n<e.length;++n){var r=e[n];L$T(r,t)?(r.west<t.west&&i.push(new h$18(r.west,r.south,t.west,r.north)),r.east>t.east&&i.push(new h$18(t.east,r.south,r.east,r.north)),r.south<t.south&&i.push(new h$18(Math.max(t.west,r.west),r.south,Math.min(t.east,r.east),t.south)),r.north>t.north&&i.push(new h$18(Math.max(t.west,r.west),t.north,Math.min(t.east,r.east),r.north))):i.push(r)}return i}n$C.prototype.isTileAvailable=function(e,t,i){var n=this._tilingScheme.tileXYToRectangle(t,i,e,l$S);return h$18.center(n,o$N),this.computeMaximumLevelAtPosition(o$N)>=e},n$C.prototype.computeChildMaskForTile=function(e,t,i){var n=e+1;if(n>=this._maximumLevel)return 0;var r=0;return r|=this.isTileAvailable(n,2*t,2*i+1)?1:0,r|=this.isTileAvailable(n,2*t+1,2*i+1)?2:0,r|=this.isTileAvailable(n,2*t,2*i)?4:0,r|=this.isTileAvailable(n,2*t+1,2*i)?8:0},Object.defineProperties(_$F.prototype,{nw:{get:function(){return this._nw||(this._nw=new _$F(this.tilingScheme,this,this.level+1,2*this.x,2*this.y)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new _$F(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new _$F(this.tilingScheme,this,this.level+1,2*this.x,2*this.y+1)),this._sw}},se:{get:function(){return this._se||(this._se=new _$F(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y+1)),this._se}}});var j$J=15;function _$E(e){if(!e$2e(e)||!e$2e(e.url))throw new t$15("options.url is required.");this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;var t=e.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};var i=this,n=u$Z(e.ellipsoid,t$12.WGS84);this._readyPromise=o$1l(e.url).then((function(e){var n=t$10.createIfNeeded(e);return n.appendForwardSlash(),e$2e(t)&&(n=n.getDerivedResource({queryParameters:{token:t}})),i._resource=n,n.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()})).then((function(e){var t=e.copyrightText;e$2e(t)&&(i._credit=new r$U(t));var r=e.spatialReference,o=u$Z(r.latestWkid,r.wkid),a=e.extent,s={ellipsoid:n};if(4326===o)s.rectangle=h$18.fromDegrees(a.xmin,a.ymin,a.xmax,a.ymax),i._tilingScheme=new g$15(s);else{if(3857!==o)return o$1l.reject(new t$13("Invalid spatial reference"));s.rectangleSouthwestInMeters=new o$1o(a.xmin,a.ymin),s.rectangleNortheastInMeters=new o$1o(a.xmax,a.ymax),i._tilingScheme=new c$S(s)}var l=e.tileInfo;return e$2e(l)?(i._width=l.rows+1,i._height=l.cols+1,i._encoding="LERC"===l.format?T$N.LERC:T$N.NONE,i._lodCount=l.lods.length-1,(i._hasAvailability=-1!==e.capabilities.indexOf("Tilemap"))&&(i._tilesAvailable=new n$C(i._tilingScheme,i._lodCount),i._tilesAvailable.addAvailableTileRange(0,0,0,i._tilingScheme.getNumberOfXTilesAtLevel(0),i._tilingScheme.getNumberOfYTilesAtLevel(0)),i._tilesAvailablityLoaded=new n$C(i._tilingScheme,i._lodCount)),i._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(i._tilingScheme.ellipsoid,i._width,i._tilingScheme.getNumberOfXTilesAtLevel(0)),e.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),i._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:e.minValues[0],highestEncodedHeight:e.maxValues[0]},i._ready=!0,!0):o$1l.reject(new t$13("tileInfo is required"))})).otherwise((function(e){var t="An error occurred while accessing "+i._resource.url+".";return l$V.handleError(void 0,i,i._errorEvent,t),o$1l.reject(e)})),this._errorEvent=new o$1h}function w$J(e,t,i,n){if(e._hasAvailability){var r=e._tilesAvailablityLoaded,o=e._tilesAvailable;if(t>e._lodCount)return!1;if(o.isTileAvailable(t,i,n))return!0;if(r.isTileAvailable(t,i,n))return!1}}function H$N(e,t,i,n){for(var r=t-1,o=i-1,a=n[e.y*t+e.x],s=[],l={startX:e.x,startY:e.y,endX:0,endY:0},u=new o$1o(e.x+1,e.y+1),c=!1,h=!1;!c||!h;){var d=u.x,f=h?u.y+1:u.y;if(!c){for(var p=e.y;p<f;++p)if(n[p*t+u.x]!==a){c=!0;break}c?(s.push(new o$1o(u.x,e.y)),--u.x,--d,l.endX=u.x):u.x===r?(l.endX=u.x,c=!0):++u.x}if(!h){for(var _=u.y*t,m=e.x;m<=d;++m)if(n[_+m]!==a){h=!0;break}h?(s.push(new o$1o(e.x,u.y)),--u.y,l.endY=u.y):u.y===o?(l.endY=u.y,h=!0):++u.y}}return{endingIndices:s,range:l,value:a}}function V$D(e,t,i,n,r){var o=[],a=r.every((function(e){return e===r[0]}));if(a)return 1===r[0]&&o.push({startX:e,startY:t,endX:e+i-1,endY:t+n-1}),o;for(var s=[new o$1o(0,0)];s.length>0;){var l=H$N(s.pop(),i,n,r);if(1===l.value){var u=l.range;u.startX+=e,u.endX+=e,u.startY+=t,u.endY+=t,o.push(u)}var c=l.endingIndices;c.length>0&&(s=s.concat(c))}return o}function L$S(e,t,i,n){if(!e._hasAvailability)return{};var r=128*Math.floor(i/128),o=128*Math.floor(n/128),a=Math.min(1<<t,128),s="tilemap/"+t+"/"+o+"/"+r+"/"+a+"/"+a,l=e._availableCache;if(e$2e(l[s]))return l[s];var u=new r$1c({throttle:!0,throttleByServer:!0,type:U$1f.TERRAIN}),c=e._resource.getDerivedResource({url:s,request:u}).fetchJson();return e$2e(c)?(c=c.then((function(s){var l=V$D(r,o,a,a,s.data);e._tilesAvailablityLoaded.addAvailableTileRange(r,o,r+a,o+a);for(var u=e._tilesAvailable,c=0;c<l.length;++c){var h=l[c];u.addAvailableTileRange(t,h.startX,h.startY,h.endX,h.endY)}return w$J(e,t,i,n)})),l[s]={promise:c,request:u},c=c.always((function(e){return delete l[s],e})),{promise:c,request:u}):{}}function l$R(e,t,i){if(o$1q.defined("array",e),e$2e(t)&&o$1q.typeOf.number("begin",t),e$2e(i)&&o$1q.typeOf.number("end",i),"function"==typeof e.slice)return e.slice(t,i);for(var n=Array.prototype.slice.call(e,t,i),r=s$Z.typedArrayTypes,o=r.length,a=0;a<o;++a)if(e instanceof r[a]){n=new r[a](n);break}return n}Object.defineProperties(_$E.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this.ready)throw new t$15("credit must not be called before ready returns true.");return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$15("tilingScheme must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),_$E.prototype.requestTileGeometry=function(e,t,i,n){if(!this._ready)throw new t$15("requestTileGeometry must not be called before the terrain provider is ready.");var r,o=this._resource.getDerivedResource({url:"tile/"+i+"/"+t+"/"+e,request:n}),a=this._hasAvailability,s=o$1l.resolve(!0);if(a&&!e$2e(w$J(this,i+1,2*e,2*t))){var l=L$S(this,i+1,2*e,2*t);s=l.promise,r=l.request}var u=o.fetchArrayBuffer();if(e$2e(u)&&e$2e(s)){var c=this,h=this._tilesAvailable;return o$1l.join(u,s).then((function(n){return new T$L({buffer:n[0],width:c._width,height:c._height,childTileMask:a?h.computeChildMaskForTile(i,e,t):j$J,structure:c._terrainDataStructure,encoding:c._encoding})})).otherwise((function(e){return e$2e(r)&&r.state===W$1c.CANCELLED?(n.cancel(),n.deferred.promise.always((function(){return n.state=W$1c.CANCELLED,o$1l.reject(e)}))):o$1l.reject(e)}))}},_$E.prototype.getLevelMaximumGeometricError=function(e){if(!this.ready)throw new t$15("getLevelMaximumGeometricError must not be called before ready returns true.");return this._levelZeroMaximumGeometricError/(1<<e)},_$E.prototype.getTileDataAvailable=function(e,t,i){if(this._hasAvailability){var n=w$J(this,i,e,t);if(e$2e(n))return n;L$S(this,i,e,t)}},_$E.prototype.loadTileDataAvailability=function(e,t,i){};var e$12={defaultKey:void 0,getKey:function(e){return e$2e(e)?e:e$12.defaultKey}},i$N="";function o$M(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).key;this._key=e$12.getKey(t),this._resource=new t$10({url:i$N,queryParameters:{key:this._key}})}Object.defineProperties(o$M.prototype,{url:{get:function(){return i$N}},key:{get:function(){return this._key}}}),o$M.prototype.geocode=function(e){return o$1q.typeOf.string("query",e),this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then((function(e){return 0===e.resourceSets.length?[]:e.resourceSets[0].resources.map((function(e){var t=e.bbox,i=t[0],n=t[1],r=t[2],o=t[3];return{displayName:e.name,destination:h$18.fromDegrees(n,i,o,r)}}))}))};var W$O=new o$1p;function O$z(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).minimum,i=e.maximum;if(o$1q.typeOf.object("min",t),o$1q.typeOf.object("max",i),e$2e(e.offsetAttribute)&&e.offsetAttribute===_0x39c22a.TOP)throw new t$15("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");var n=u$Z(e.vertexFormat,n$13.DEFAULT);this._minimum=o$1p.clone(t),this._maximum=o$1p.clone(i),this._vertexFormat=n,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}O$z.fromDimensions=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).dimensions;o$1q.typeOf.object("dimensions",t),o$1q.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=o$1p.multiplyByScalar(t,.5,new o$1p);return new O$z({minimum:o$1p.negate(i,new o$1p),maximum:i,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},O$z.fromAxisAlignedBoundingBox=function(e){return o$1q.typeOf.object("boundingBox",e),new O$z({minimum:e.minimum,maximum:e.maximum})},O$z.packedLength=2*o$1p.packedLength+n$13.packedLength+1,O$z.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),o$1p.pack(e._minimum,t,i),o$1p.pack(e._maximum,t,i+o$1p.packedLength),n$13.pack(e._vertexFormat,t,i+2*o$1p.packedLength),t[i+2*o$1p.packedLength+n$13.packedLength]=u$Z(e._offsetAttribute,-1),t};var N$E=new o$1p,U$M=new o$1p,G$T=new n$13,S$H={minimum:N$E,maximum:U$M,vertexFormat:G$T,offsetAttribute:void 0},u$I,n$B;function t$C(e){n$B(e)}function N$D(){}O$z.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=o$1p.unpack(e,t,N$E),r=o$1p.unpack(e,t+o$1p.packedLength,U$M),o=n$13.unpack(e,t+2*o$1p.packedLength,G$T),a=e[t+2*o$1p.packedLength+n$13.packedLength];return e$2e(i)?(i._minimum=o$1p.clone(n,i._minimum),i._maximum=o$1p.clone(r,i._maximum),i._vertexFormat=n$13.clone(o,i._vertexFormat),i._offsetAttribute=-1===a?void 0:a,i):(S$H.offsetAttribute=-1===a?void 0:a,new O$z(S$H))},O$z.createGeometry=function(e){var t=e._minimum,i=e._maximum,n=e._vertexFormat;if(!o$1p.equals(t,i)){var r,o,a=new a$_;if(n.position&&(n.st||n.normal||n.tangent||n.bitangent)){if(n.position&&((o=new Float64Array(72))[0]=t.x,o[1]=t.y,o[2]=i.z,o[3]=i.x,o[4]=t.y,o[5]=i.z,o[6]=i.x,o[7]=i.y,o[8]=i.z,o[9]=t.x,o[10]=i.y,o[11]=i.z,o[12]=t.x,o[13]=t.y,o[14]=t.z,o[15]=i.x,o[16]=t.y,o[17]=t.z,o[18]=i.x,o[19]=i.y,o[20]=t.z,o[21]=t.x,o[22]=i.y,o[23]=t.z,o[24]=i.x,o[25]=t.y,o[26]=t.z,o[27]=i.x,o[28]=i.y,o[29]=t.z,o[30]=i.x,o[31]=i.y,o[32]=i.z,o[33]=i.x,o[34]=t.y,o[35]=i.z,o[36]=t.x,o[37]=t.y,o[38]=t.z,o[39]=t.x,o[40]=i.y,o[41]=t.z,o[42]=t.x,o[43]=i.y,o[44]=i.z,o[45]=t.x,o[46]=t.y,o[47]=i.z,o[48]=t.x,o[49]=i.y,o[50]=t.z,o[51]=i.x,o[52]=i.y,o[53]=t.z,o[54]=i.x,o[55]=i.y,o[56]=i.z,o[57]=t.x,o[58]=i.y,o[59]=i.z,o[60]=t.x,o[61]=t.y,o[62]=t.z,o[63]=i.x,o[64]=t.y,o[65]=t.z,o[66]=i.x,o[67]=t.y,o[68]=i.z,o[69]=t.x,o[70]=t.y,o[71]=i.z,a.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:o})),n.normal){var s=new Float32Array(72);s[0]=0,s[1]=0,s[2]=1,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=1,s[9]=0,s[10]=0,s[11]=1,s[12]=0,s[13]=0,s[14]=-1,s[15]=0,s[16]=0,s[17]=-1,s[18]=0,s[19]=0,s[20]=-1,s[21]=0,s[22]=0,s[23]=-1,s[24]=1,s[25]=0,s[26]=0,s[27]=1,s[28]=0,s[29]=0,s[30]=1,s[31]=0,s[32]=0,s[33]=1,s[34]=0,s[35]=0,s[36]=-1,s[37]=0,s[38]=0,s[39]=-1,s[40]=0,s[41]=0,s[42]=-1,s[43]=0,s[44]=0,s[45]=-1,s[46]=0,s[47]=0,s[48]=0,s[49]=1,s[50]=0,s[51]=0,s[52]=1,s[53]=0,s[54]=0,s[55]=1,s[56]=0,s[57]=0,s[58]=1,s[59]=0,s[60]=0,s[61]=-1,s[62]=0,s[63]=0,s[64]=-1,s[65]=0,s[66]=0,s[67]=-1,s[68]=0,s[69]=0,s[70]=-1,s[71]=0,a.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:s})}if(n.st){var l=new Float32Array(72),u=0;l[u++]=0,l[u++]=0,l[u++]=-1,l[u++]=1,l[u++]=0,l[u++]=-1,l[u++]=1,l[u++]=1,l[u++]=-1,l[u++]=0,l[u++]=1,l[u++]=-1,l[u++]=1,l[u++]=0,l[u++]=-1,l[u++]=0,l[u++]=0,l[u++]=-1,l[u++]=0,l[u++]=1,l[u++]=-1,l[u++]=1,l[u++]=1,l[u++]=-1,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,a.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:l})}if(n.tangent){var c=new Float32Array(72);c[0]=1,c[1]=0,c[2]=0,c[3]=1,c[4]=0,c[5]=0,c[6]=1,c[7]=0,c[8]=0,c[9]=1,c[10]=0,c[11]=0,c[12]=-1,c[13]=0,c[14]=0,c[15]=-1,c[16]=0,c[17]=0,c[18]=-1,c[19]=0,c[20]=0,c[21]=-1,c[22]=0,c[23]=0,c[24]=0,c[25]=1,c[26]=0,c[27]=0,c[28]=1,c[29]=0,c[30]=0,c[31]=1,c[32]=0,c[33]=0,c[34]=1,c[35]=0,c[36]=0,c[37]=-1,c[38]=0,c[39]=0,c[40]=-1,c[41]=0,c[42]=0,c[43]=-1,c[44]=0,c[45]=0,c[46]=-1,c[47]=0,c[48]=-1,c[49]=0,c[50]=0,c[51]=-1,c[52]=0,c[53]=0,c[54]=-1,c[55]=0,c[56]=0,c[57]=-1,c[58]=0,c[59]=0,c[60]=1,c[61]=0,c[62]=0,c[63]=1,c[64]=0,c[65]=0,c[66]=1,c[67]=0,c[68]=0,c[69]=1,c[70]=0,c[71]=0,a.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:c})}if(n.bitangent){var h=new Float32Array(72);h[0]=0,h[1]=1,h[2]=0,h[3]=0,h[4]=1,h[5]=0,h[6]=0,h[7]=1,h[8]=0,h[9]=0,h[10]=1,h[11]=0,h[12]=0,h[13]=1,h[14]=0,h[15]=0,h[16]=1,h[17]=0,h[18]=0,h[19]=1,h[20]=0,h[21]=0,h[22]=1,h[23]=0,h[24]=0,h[25]=0,h[26]=1,h[27]=0,h[28]=0,h[29]=1,h[30]=0,h[31]=0,h[32]=1,h[33]=0,h[34]=0,h[35]=1,h[36]=0,h[37]=0,h[38]=1,h[39]=0,h[40]=0,h[41]=1,h[42]=0,h[43]=0,h[44]=1,h[45]=0,h[46]=0,h[47]=1,h[48]=0,h[49]=0,h[50]=1,h[51]=0,h[52]=0,h[53]=1,h[54]=0,h[55]=0,h[56]=1,h[57]=0,h[58]=0,h[59]=1,h[60]=0,h[61]=0,h[62]=1,h[63]=0,h[64]=0,h[65]=1,h[66]=0,h[67]=0,h[68]=1,h[69]=0,h[70]=0,h[71]=1,a.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:h})}(r=new Uint16Array(36))[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=6,r[7]=5,r[8]=4,r[9]=7,r[10]=6,r[11]=4,r[12]=8,r[13]=9,r[14]=10,r[15]=8,r[16]=10,r[17]=11,r[18]=14,r[19]=13,r[20]=12,r[21]=15,r[22]=14,r[23]=12,r[24]=18,r[25]=17,r[26]=16,r[27]=19,r[28]=18,r[29]=16,r[30]=20,r[31]=21,r[32]=22,r[33]=20,r[34]=22,r[35]=23}else(o=new Float64Array(24))[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=i.x,o[4]=t.y,o[5]=t.z,o[6]=i.x,o[7]=i.y,o[8]=t.z,o[9]=t.x,o[10]=i.y,o[11]=t.z,o[12]=t.x,o[13]=t.y,o[14]=i.z,o[15]=i.x,o[16]=t.y,o[17]=i.z,o[18]=i.x,o[19]=i.y,o[20]=i.z,o[21]=t.x,o[22]=i.y,o[23]=i.z,a.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:o}),(r=new Uint16Array(36))[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;var d=o$1p.subtract(i,t,W$O),f=.5*o$1p.magnitude(d);if(e$2e(e._offsetAttribute)){var p=o.length,_=new Uint8Array(p/3);d$1s(_,e._offsetAttribute===_0x39c22a.NONE?0:1),a.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new I$1p({attributes:a,indices:r,primitiveType:W$18.TRIANGLES,boundingSphere:new i$1d(o$1p.ZERO,f),offsetAttribute:e._offsetAttribute})}},O$z.getUnitBox=function(){return e$2e(u$I)||(u$I=O$z.createGeometry(O$z.fromDimensions({dimensions:new o$1p(1,1,1),vertexFormat:n$13.POSITION_ONLY}))),u$I},typeof cancelAnimationFrame<"u"&&(n$B=cancelAnimationFrame),function(){if(!e$2e(n$B)&&typeof window<"u")for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!e$2e(n$B);)e$2e(n$B=window[e[t]+"CancelAnimationFrame"])||(n$B=window[e[t]+"CancelRequestAnimationFrame"]),++t;e$2e(n$B)||(n$B=clearTimeout)}(),N$D.prototype.geocode=function(e){o$1q.typeOf.string("query",e);var t=e.match(/[^\s,\n]+/g);if(2===t.length||3===t.length){var i=+t[0],n=+t[1],r=3===t.length?+t[2]:300;if(isNaN(i)&&isNaN(n))for(var o=/^(\d+.?\d*)([nsew])/i,a=0;a<t.length;++a){var s=t[a].match(o);o.test(t[a])&&3===s.length&&(/^[ns]/i.test(s[2])?n=/^[n]/i.test(s[2])?+s[1]:-s[1]:/^[ew]/i.test(s[2])&&(i=/^[e]/i.test(s[2])?+s[1]:-s[1]))}if(!isNaN(i)&&!isNaN(n)&&!isNaN(r)){var l={displayName:e,destination:o$1p.fromDegrees(i,n,r)};return o$1l.resolve([l])}}return o$1l.resolve([])};var C$L={},b$S=new o$1p,Q$I=new o$1p,G$S=new n$15,N$C=new p$1e;function W$N(e,t,i,n,r,o,a,s,l,u){var c=e+t;o$1p.multiplyByScalar(n,Math.cos(c),b$S),o$1p.multiplyByScalar(i,Math.sin(c),Q$I),o$1p.add(b$S,Q$I,b$S);var h=Math.cos(e);h*=h;var d=Math.sin(e);d*=d;var f=o/Math.sqrt(a*h+r*d)/s;return n$15.fromAxisAngle(b$S,f,G$S),p$1e.fromQuaternion(G$S,N$C),p$1e.multiplyByVector(N$C,l,u),o$1p.normalize(u,u),o$1p.multiplyByScalar(u,s,u),u}var U$L=new o$1p,Z$G=new o$1p,j$I=new o$1p,D$G=new o$1p;C$L.raisePositionsToHeight=function(e,t,i){for(var n=t.ellipsoid,r=t.height,o=t.extrudedHeight,a=i?e.length/3*2:e.length/3,s=new Float64Array(3*a),l=e.length,u=i?l:0,c=0;c<l;c+=3){var h=c+1,d=c+2,f=o$1p.fromArray(e,c,U$L);n.scaleToGeodeticSurface(f,f);var p=o$1p.clone(f,Z$G),_=n.geodeticSurfaceNormal(f,D$G),m=o$1p.multiplyByScalar(_,r,j$I);o$1p.add(f,m,f),i&&(o$1p.multiplyByScalar(_,o,m),o$1p.add(p,m,p),s[c+u]=p.x,s[h+u]=p.y,s[d+u]=p.z),s[c]=f.x,s[h]=f.y,s[d]=f.z}return s};var J$E=new o$1p,K$H=new o$1p,X$H=new o$1p;C$L.computeEllipsePositions=function(e,t,i){var n=e.semiMinorAxis,r=e.semiMajorAxis,o=e.rotation,a=e.center,s=8*e.granularity,l=n*n,u=r*r,c=r*n,h=o$1p.magnitude(a),d=o$1p.normalize(a,J$E),f=o$1p.cross(o$1p.UNIT_Z,a,K$H);f=o$1p.normalize(f,f);var p=o$1p.cross(d,f,X$H),_=1+Math.ceil(e$2d.PI_OVER_TWO/s),m=e$2d.PI_OVER_TWO/(_-1),g=e$2d.PI_OVER_TWO-_*m;g<0&&(_-=Math.ceil(Math.abs(g)/m));var x,y,v,$,b,T=t?new Array(3*(_*(_+2)*2)):void 0,C=0,S=U$L,w=Z$G,E=4*_*3,P=E-1,A=0,L=i?new Array(E):void 0;for(S=W$N(g=e$2d.PI_OVER_TWO,o,p,f,l,c,u,h,d,S),t&&(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z),i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x),g=e$2d.PI_OVER_TWO-m,x=1;x<_+1;++x){if(S=W$N(g,o,p,f,l,c,u,h,d,S),w=W$N(Math.PI-g,o,p,f,l,c,u,h,d,w),t){for(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z,v=2*x+2,y=1;y<v-1;++y)$=y/(v-1),b=o$1p.lerp(S,w,$,j$I),T[C++]=b.x,T[C++]=b.y,T[C++]=b.z;T[C++]=w.x,T[C++]=w.y,T[C++]=w.z}i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,L[A++]=w.x,L[A++]=w.y,L[A++]=w.z),g=e$2d.PI_OVER_TWO-(x+1)*m}for(x=_;x>1;--x){if(S=W$N(-(g=e$2d.PI_OVER_TWO-(x-1)*m),o,p,f,l,c,u,h,d,S),w=W$N(g+Math.PI,o,p,f,l,c,u,h,d,w),t){for(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z,v=2*(x-1)+2,y=1;y<v-1;++y)$=y/(v-1),b=o$1p.lerp(S,w,$,j$I),T[C++]=b.x,T[C++]=b.y,T[C++]=b.z;T[C++]=w.x,T[C++]=w.y,T[C++]=w.z}i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,L[A++]=w.x,L[A++]=w.y,L[A++]=w.z)}S=W$N(-(g=e$2d.PI_OVER_TWO),o,p,f,l,c,u,h,d,S);var M={};return t&&(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z,M.positions=T,M.numPts=_),i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,M.outerPositions=L),M};var te$v=new o$1p,xe$j=new o$1p,pe$r=new o$1p,Me$k=new o$1p,p$N=new o$1o,Te$i=new p$1e,Ye$b=new p$1e,_e$m=new n$15,Ee$i=new o$1p,Ne$g=new o$1p,Fe$h=new o$1p,le$q=new a$18,Se$d=new o$1p,Oe$j=new o$1o,Ce$f=new o$1o;function Pe$h(e,t,i){var n=t.vertexFormat,r=t.center,o=t.semiMajorAxis,a=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,u=i?e.length/3*2:e.length/3,c=t.shadowVolume,h=n.st?new Float32Array(2*u):void 0,d=n.normal?new Float32Array(3*u):void 0,f=n.tangent?new Float32Array(3*u):void 0,p=n.bitangent?new Float32Array(3*u):void 0,_=c?new Float32Array(3*u):void 0,m=0,g=Ee$i,x=Ne$g,y=Fe$h,v=new n$1d(s),$=v.project(s.cartesianToCartographic(r,le$q),Se$d),b=s.scaleToGeodeticSurface(r,te$v);s.geodeticSurfaceNormal(b,b);var T=Te$i,C=Ye$b;if(0!==l){var S=n$15.fromAxisAngle(b,l,_e$m);T=p$1e.fromQuaternion(S,T),S=n$15.fromAxisAngle(b,-l,_e$m),C=p$1e.fromQuaternion(S,C)}else T=p$1e.clone(p$1e.IDENTITY,T),C=p$1e.clone(p$1e.IDENTITY,C);for(var w=o$1o.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Oe$j),E=o$1o.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Ce$f),P=e.length,A=i?P:0,L=A/3*2,M=0;M<P;M+=3){var R=M+1,O=M+2,D=o$1p.fromArray(e,M,te$v);if(n.st){var I=p$1e.multiplyByVector(T,D,xe$j),F=v.project(s.cartesianToCartographic(I,le$q),pe$r);o$1p.subtract(F,$,F),p$N.x=(F.x+o)/(2*o),p$N.y=(F.y+a)/(2*a),w.x=Math.min(p$N.x,w.x),w.y=Math.min(p$N.y,w.y),E.x=Math.max(p$N.x,E.x),E.y=Math.max(p$N.y,E.y),i&&(h[m+L]=p$N.x,h[m+1+L]=p$N.y),h[m++]=p$N.x,h[m++]=p$N.y}(n.normal||n.tangent||n.bitangent||c)&&(g=s.geodeticSurfaceNormal(D,g),c&&(_[M+A]=-g.x,_[R+A]=-g.y,_[O+A]=-g.z),(n.normal||n.tangent||n.bitangent)&&((n.tangent||n.bitangent)&&(x=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,g,x),x),p$1e.multiplyByVector(C,x,x)),n.normal&&(d[M]=g.x,d[R]=g.y,d[O]=g.z,i&&(d[M+A]=-g.x,d[R+A]=-g.y,d[O+A]=-g.z)),n.tangent&&(f[M]=x.x,f[R]=x.y,f[O]=x.z,i&&(f[M+A]=-x.x,f[R+A]=-x.y,f[O+A]=-x.z)),n.bitangent&&(y=o$1p.normalize(o$1p.cross(g,x,y),y),p[M]=y.x,p[R]=y.y,p[O]=y.z,i&&(p[M+A]=y.x,p[R+A]=y.y,p[O+A]=y.z))))}if(n.st){P=h.length;for(var B=0;B<P;B+=2)h[B]=(h[B]-w.x)/(E.x-w.x),h[B+1]=(h[B+1]-w.y)/(E.y-w.y)}var N=new a$_;if(n.position){var G=C$L.raisePositionsToHeight(e,t,i);N.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:G})}if(n.st&&(N.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:h})),n.normal&&(N.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:d})),n.tangent&&(N.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:f})),n.bitangent&&(N.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:p})),c&&(N.extrudeDirection=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:_})),i&&e$2e(t.offsetAttribute)){var z=new Uint8Array(u);if(t.offsetAttribute===_0x39c22a.TOP)z=d$1s(z,1,0,u/2);else z=d$1s(z,t.offsetAttribute===_0x39c22a.NONE?0:1);N.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}return N}function Ie$f(e){var t,i,n,r,o,a=new Array(e*(e+1)*12-6),s=0;for(t=0,n=1,r=0;r<3;r++)a[s++]=n++,a[s++]=t,a[s++]=n;for(r=2;r<e+1;++r){for(n=r*(r+1)-1,t=(r-1)*r-1,a[s++]=n++,a[s++]=t,a[s++]=n,i=2*r,o=0;o<i-1;++o)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;a[s++]=n++,a[s++]=t,a[s++]=n}for(i=2*e,++n,++t,r=0;r<i-1;++r)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;for(a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t++,a[s++]=t,++t,r=e-1;r>1;--r){for(a[s++]=t++,a[s++]=t,a[s++]=n,i=2*r,o=0;o<i-1;++o)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;a[s++]=t++,a[s++]=t++,a[s++]=n++}for(r=0;r<3;r++)a[s++]=t++,a[s++]=t,a[s++]=n;return a}var $$G=new o$1p;function ke$b(e){var t=e.center;$$G=o$1p.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,$$G),e.height,$$G);var i=new i$1d($$G=o$1p.add(t,$$G,$$G),e.semiMajorAxis),n=C$L.computeEllipsePositions(e,!0,!1),r=n.positions,o=n.numPts,a=Pe$h(r,e,!1),s=Ie$f(o);return{boundingSphere:i,attributes:a,indices:s=ce$z.createTypedArray(r.length/3,s)}}function Ue$e(e,t){var i=t.vertexFormat,n=t.center,r=t.semiMajorAxis,o=t.semiMinorAxis,a=t.ellipsoid,s=t.height,l=t.extrudedHeight,u=t.stRotation,c=e.length/3*2,h=new Float64Array(3*c),d=i.st?new Float32Array(2*c):void 0,f=i.normal?new Float32Array(3*c):void 0,p=i.tangent?new Float32Array(3*c):void 0,_=i.bitangent?new Float32Array(3*c):void 0,m=t.shadowVolume,g=m?new Float32Array(3*c):void 0,x=0,y=Ee$i,v=Ne$g,$=Fe$h,b=new n$1d(a),T=b.project(a.cartesianToCartographic(n,le$q),Se$d),C=a.scaleToGeodeticSurface(n,te$v);a.geodeticSurfaceNormal(C,C);for(var S=n$15.fromAxisAngle(C,u,_e$m),w=p$1e.fromQuaternion(S,Te$i),E=o$1o.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Oe$j),P=o$1o.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Ce$f),A=e.length,L=A/3*2,M=0;M<A;M+=3){var R,O=M+1,D=M+2,I=o$1p.fromArray(e,M,te$v);if(i.st){var F=p$1e.multiplyByVector(w,I,xe$j),B=b.project(a.cartesianToCartographic(F,le$q),pe$r);o$1p.subtract(B,T,B),p$N.x=(B.x+r)/(2*r),p$N.y=(B.y+o)/(2*o),E.x=Math.min(p$N.x,E.x),E.y=Math.min(p$N.y,E.y),P.x=Math.max(p$N.x,P.x),P.y=Math.max(p$N.y,P.y),d[x+L]=p$N.x,d[x+1+L]=p$N.y,d[x++]=p$N.x,d[x++]=p$N.y}I=a.scaleToGeodeticSurface(I,I),R=o$1p.clone(I,xe$j),y=a.geodeticSurfaceNormal(I,y),m&&(g[M+A]=-y.x,g[O+A]=-y.y,g[D+A]=-y.z);var N=o$1p.multiplyByScalar(y,s,Me$k);if(I=o$1p.add(I,N,I),N=o$1p.multiplyByScalar(y,l,N),R=o$1p.add(R,N,R),i.position&&(h[M+A]=R.x,h[O+A]=R.y,h[D+A]=R.z,h[M]=I.x,h[O]=I.y,h[D]=I.z),i.normal||i.tangent||i.bitangent){$=o$1p.clone(y,$);var G=o$1p.fromArray(e,(M+3)%A,Me$k);o$1p.subtract(G,I,G);var z=o$1p.subtract(R,I,pe$r);y=o$1p.normalize(o$1p.cross(z,G,y),y),i.normal&&(f[M]=y.x,f[O]=y.y,f[D]=y.z,f[M+A]=y.x,f[O+A]=y.y,f[D+A]=y.z),i.tangent&&(v=o$1p.normalize(o$1p.cross($,y,v),v),p[M]=v.x,p[O]=v.y,p[D]=v.z,p[M+A]=v.x,p[M+1+A]=v.y,p[M+2+A]=v.z),i.bitangent&&(_[M]=$.x,_[O]=$.y,_[D]=$.z,_[M+A]=$.x,_[O+A]=$.y,_[D+A]=$.z)}}if(i.st){A=d.length;for(var U=0;U<A;U+=2)d[U]=(d[U]-E.x)/(P.x-E.x),d[U+1]=(d[U+1]-E.y)/(P.y-E.y)}var V=new a$_;if(i.position&&(V.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:h})),i.st&&(V.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:d})),i.normal&&(V.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:f})),i.tangent&&(V.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:p})),i.bitangent&&(V.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:_})),m&&(V.extrudeDirection=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:g})),e$2e(t.offsetAttribute)){var k=new Uint8Array(c);if(t.offsetAttribute===_0x39c22a.TOP)k=d$1s(k,1,0,c/2);else k=d$1s(k,t.offsetAttribute===_0x39c22a.NONE?0:1);V.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:k})}return V}function We$d(e){for(var t=e.length/3,i=ce$z.createTypedArray(t,6*t),n=0,r=0;r<t;r++){var o=r,a=r+t,s=(o+1)%t,l=s+t;i[n++]=o,i[n++]=a,i[n++]=s,i[n++]=s,i[n++]=a,i[n++]=l}return i}var de$n=new i$1d,Ae$l=new i$1d;function qe$9(e){var t=e.center,i=e.ellipsoid,n=e.semiMajorAxis,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,te$v),e.height,te$v);de$n.center=o$1p.add(t,r,de$n.center),de$n.radius=n,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,r),e.extrudedHeight,r),Ae$l.center=o$1p.add(t,r,Ae$l.center),Ae$l.radius=n;var o=C$L.computeEllipsePositions(e,!0,!0),a=o.positions,s=o.numPts,l=o.outerPositions,u=i$1d.union(de$n,Ae$l),c=Pe$h(a,e,!0),h=Ie$f(s),d=h.length;h.length=2*d;for(var f=a.length/3,p=0;p<d;p+=3)h[p+d]=h[p+2]+f,h[p+1+d]=h[p+1]+f,h[p+2+d]=h[p]+f;var _=new I$1p({attributes:c,indices:ce$z.createTypedArray(2*f/3,h),primitiveType:W$18.TRIANGLES}),m=Ue$e(l,e);h=We$d(l);var g=new I$1p({attributes:m,indices:ce$z.createTypedArray(2*l.length/3,h),primitiveType:W$18.TRIANGLES}),x=k$14.combineInstances([new d$1o({geometry:_}),new d$1o({geometry:g})]);return{boundingSphere:u,attributes:x[0].attributes,indices:x[0].indices}}function Re$h(e,t,i,n,r,o,a){for(var s=C$L.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:i,rotation:n,granularity:r},!1,!0).outerPositions,l=s.length/3,u=new Array(l),c=0;c<l;++c)u[c]=o$1p.fromArray(s,3*c);var h=h$18.fromCartesianArray(u,o,a);return h.width>e$2d.PI&&(h.north=h.north>0?e$2d.PI_OVER_TWO-e$2d.EPSILON7:h.north,h.south=h.south<0?e$2d.EPSILON7-e$2d.PI_OVER_TWO:h.south,h.east=e$2d.PI,h.west=-e$2d.PI),h}function Y$A(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).center,i=u$Z(e.ellipsoid,t$12.WGS84),n=e.semiMajorAxis,r=e.semiMinorAxis,o=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),a=u$Z(e.vertexFormat,n$13.DEFAULT);if(o$1q.defined("options.center",t),o$1q.typeOf.number("options.semiMajorAxis",n),o$1q.typeOf.number("options.semiMinorAxis",r),n<r)throw new t$15("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(o<=0)throw new t$15("granularity must be greater than zero.");var s=u$Z(e.height,0),l=u$Z(e.extrudedHeight,s);this._center=o$1p.clone(t),this._semiMajorAxis=n,this._semiMinorAxis=r,this._ellipsoid=t$12.clone(i),this._rotation=u$Z(e.rotation,0),this._stRotation=u$Z(e.stRotation,0),this._height=Math.max(l,s),this._granularity=o,this._vertexFormat=n$13.clone(a),this._extrudedHeight=Math.min(l,s),this._shadowVolume=u$Z(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}Y$A.packedLength=o$1p.packedLength+t$12.packedLength+n$13.packedLength+9,Y$A.pack=function(e,t,i){return o$1q.defined("value",e),o$1q.defined("array",t),i=u$Z(i,0),o$1p.pack(e._center,t,i),i+=o$1p.packedLength,t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=u$Z(e._offsetAttribute,-1),t};var je$b=new o$1p,De$h=new t$12,Ve$d=new n$13,k$G={center:je$b,ellipsoid:De$h,vertexFormat:Ve$d,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};function Qe$7(e){var t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];for(var i=C$L.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,n=i.length/3,r=new Array(n),o=0;o<n;++o)r[o]=o$1p.fromArray(i,3*o);var a=e._ellipsoid,s=e.rectangle;return I$1p._textureCoordinateRotationPoints(r,t,a,s)}function n$A(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).radius;o$1q.typeOf.number("radius",t);var i={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new Y$A(i),this._workerName="createCircleGeometry"}Y$A.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=o$1p.unpack(e,t,je$b);t+=o$1p.packedLength;var r=t$12.unpack(e,t,De$h);t+=t$12.packedLength;var o=n$13.unpack(e,t,Ve$d);t+=n$13.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=1===e[t++],p=e[t];return e$2e(i)?(i._center=o$1p.clone(n,i._center),i._ellipsoid=t$12.clone(r,i._ellipsoid),i._vertexFormat=n$13.clone(o,i._vertexFormat),i._semiMajorAxis=a,i._semiMinorAxis=s,i._rotation=l,i._stRotation=u,i._height=c,i._granularity=h,i._extrudedHeight=d,i._shadowVolume=f,i._offsetAttribute=-1===p?void 0:p,i):(k$G.height=c,k$G.extrudedHeight=d,k$G.granularity=h,k$G.stRotation=u,k$G.rotation=l,k$G.semiMajorAxis=a,k$G.semiMinorAxis=s,k$G.shadowVolume=f,k$G.offsetAttribute=-1===p?void 0:p,new Y$A(k$G))},Y$A.computeRectangle=function(e,t){var i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).center,n=u$Z(e.ellipsoid,t$12.WGS84),r=e.semiMajorAxis,o=e.semiMinorAxis,a=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),s=u$Z(e.rotation,0);if(o$1q.defined("options.center",i),o$1q.typeOf.number("options.semiMajorAxis",r),o$1q.typeOf.number("options.semiMinorAxis",o),r<o)throw new t$15("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(a<=0)throw new t$15("granularity must be greater than zero.");return Re$h(i,r,o,s,a,n,t)},Y$A.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,n=!e$2d.equalsEpsilon(t,i,0,e$2d.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var r,o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation};if(n)o.extrudedHeight=i,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=qe$9(o);else if(r=ke$b(o),e$2e(e._offsetAttribute)){var a=r.attributes.position.values.length,s=new Uint8Array(a/3);d$1s(s,e._offsetAttribute===_0x39c22a.NONE?0:1),r.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:s})}return new I$1p({attributes:r.attributes,indices:r.indices,primitiveType:W$18.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})}},Y$A.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new Y$A({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:r,rotation:e._rotation,stRotation:e._stRotation,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$13.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(Y$A.prototype,{rectangle:{get:function(){return e$2e(this._rectangle)||(this._rectangle=Re$h(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e$2e(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Qe$7(this)),this._textureCoordinateRotationPoints}}}),n$A.packedLength=Y$A.packedLength,n$A.pack=function(e,t,i){return o$1q.typeOf.object("value",e),Y$A.pack(e._ellipseGeometry,t,i)};var x$O=new Y$A({center:new o$1p,semiMajorAxis:1,semiMinorAxis:1}),t$B={center:new o$1p,radius:void 0,ellipsoid:t$12.clone(t$12.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new n$13,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};n$A.unpack=function(e,t,i){var n=Y$A.unpack(e,t,x$O);return t$B.center=o$1p.clone(n._center,t$B.center),t$B.ellipsoid=t$12.clone(n._ellipsoid,t$B.ellipsoid),t$B.height=n._height,t$B.extrudedHeight=n._extrudedHeight,t$B.granularity=n._granularity,t$B.vertexFormat=n$13.clone(n._vertexFormat,t$B.vertexFormat),t$B.stRotation=n._stRotation,t$B.shadowVolume=n._shadowVolume,e$2e(i)?(t$B.semiMajorAxis=n._semiMajorAxis,t$B.semiMinorAxis=n._semiMinorAxis,i._ellipseGeometry=new Y$A(t$B),i):(t$B.radius=n._semiMajorAxis,new n$A(t$B))},n$A.createGeometry=function(e){return Y$A.createGeometry(e._ellipseGeometry)},n$A.createShadowVolume=function(e,t,i){var n=e._ellipseGeometry._granularity,r=e._ellipseGeometry._ellipsoid,o=t(n,r),a=i(n,r);return new n$A({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:r,stRotation:e._ellipseGeometry._stRotation,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$13.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(n$A.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var V$C=new o$1p,g$S=new o$1p;function F$L(e){var t=e.center;g$S=o$1p.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,g$S),e.height,g$S);var i=new i$1d(g$S=o$1p.add(t,g$S,g$S),e.semiMajorAxis),n=C$L.computeEllipsePositions(e,!1,!0).outerPositions,r=u$Z(e.outlineWidth,1);r>1&&n.push(n[0],n[1],n[2]);var o=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:C$L.raisePositionsToHeight(n,e,!1)})});r>1&&(o.sideness=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:new Float32Array([0,0,0,1,1,1,1,0])}),o.sideness.isInstanceAttribute=!0);for(var a=n.length/3,s=ce$z.createTypedArray(a,2*a),l=0,u=0;u<a;++u)s[l++]=u,s[l++]=(u+1)%a;return{boundingSphere:i,attributes:o,indices:s}}var N$B=new i$1d,j$H=new i$1d;function Y$z(e){var t=e.center,i=e.ellipsoid,n=e.semiMajorAxis,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,V$C),e.height,V$C);N$B.center=o$1p.add(t,r,N$B.center),N$B.radius=n,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,r),e.extrudedHeight,r),j$H.center=o$1p.add(t,r,j$H.center),j$H.radius=n;var o=C$L.computeEllipsePositions(e,!1,!0).outerPositions,a=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:C$L.raisePositionsToHeight(o,e,!0)})});o=a.position.values;var s=i$1d.union(N$B,j$H),l=o.length/3;if(e$2e(e.offsetAttribute)){var u=new Uint8Array(l);if(e.offsetAttribute===_0x39c22a.TOP)u=d$1s(u,1,0,l/2);else u=d$1s(u,e.offsetAttribute===_0x39c22a.NONE?0:1);a.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}var c=u$Z(e.numberOfVerticalLines,16);c=e$2d.clamp(c,0,l/2);var h=ce$z.createTypedArray(l,2*l+2*c);l/=2;var d,f,p=0;for(d=0;d<l;++d)h[p++]=d,h[p++]=(d+1)%l,h[p++]=d+l,h[p++]=(d+1)%l+l;if(c>0){var _=Math.min(c,l);f=Math.round(l/_);var m=Math.min(f*c,l);for(d=0;d<m;d+=f)h[p++]=d,h[p++]=d+l}return{boundingSphere:s,attributes:a,indices:h}}function M$K(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).center,i=u$Z(e.ellipsoid,t$12.WGS84),n=e.semiMajorAxis,r=e.semiMinorAxis,o=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE);if(!e$2e(t))throw new t$15("center is required.");if(!e$2e(n))throw new t$15("semiMajorAxis is required.");if(!e$2e(r))throw new t$15("semiMinorAxis is required.");if(n<r)throw new t$15("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(o<=0)throw new t$15("granularity must be greater than zero.");var a=u$Z(e.height,0),s=u$Z(e.extrudedHeight,a);this._center=o$1p.clone(t),this._semiMajorAxis=n,this._semiMinorAxis=r,this._ellipsoid=t$12.clone(i),this._rotation=u$Z(e.rotation,0),this._height=Math.max(s,a),this._granularity=o,this._extrudedHeight=Math.min(s,a),this._numberOfVerticalLines=Math.max(u$Z(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._outlineWidth=u$Z(e.outlineWidth,1),this._workerName="createEllipseOutlineGeometry"}M$K.packedLength=o$1p.packedLength+t$12.packedLength+9,M$K.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),o$1p.pack(e._center,t,i),i+=o$1p.packedLength,t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i++]=u$Z(e._offsetAttribute,-1),t[i]=e._outlineWidth,t};var B$G=new o$1p,q$O=new t$12,A$S={center:B$G,ellipsoid:q$O,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0,outlineWidth:void 0};function a$H(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).radius;o$1q.typeOf.number("radius",t);var i={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new M$K(i),this._workerName="createCircleOutlineGeometry"}M$K.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n=o$1p.unpack(e,t,B$G);t+=o$1p.packedLength;var r=t$12.unpack(e,t,q$O);t+=t$12.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=e[t];return e$2e(i)?(i._center=o$1p.clone(n,i._center),i._ellipsoid=t$12.clone(r,i._ellipsoid),i._semiMajorAxis=o,i._semiMinorAxis=a,i._rotation=s,i._height=l,i._granularity=u,i._extrudedHeight=c,i._numberOfVerticalLines=h,i._offsetAttribute=-1===d?void 0:d,i._outlineWidth=f,i):(A$S.height=l,A$S.extrudedHeight=c,A$S.granularity=u,A$S.rotation=s,A$S.semiMajorAxis=o,A$S.semiMinorAxis=a,A$S.numberOfVerticalLines=h,A$S.offsetAttribute=-1===d?void 0:d,A$S.outlineWidth=f,new M$K(A$S))},M$K.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,n=!e$2d.equalsEpsilon(t,i,0,e$2d.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var r,o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,outlineWidth:e._outlineWidth,numberOfVerticalLines:e._numberOfVerticalLines};if(n)o.extrudedHeight=i,o.offsetAttribute=e._offsetAttribute,r=Y$z(o);else if(r=F$L(o),e$2e(e._offsetAttribute)){var a=r.attributes.position.values.length,s=new Uint8Array(a/3);d$1s(s,e._offsetAttribute===_0x39c22a.NONE?0:1),r.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:s})}return new I$1p({attributes:r.attributes,indices:r.indices,primitiveType:e._outlineWidth>1?W$18.TRIANGLES:W$18.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})}},a$H.packedLength=M$K.packedLength,a$H.pack=function(e,t,i){return o$1q.typeOf.object("value",e),M$K.pack(e._ellipseGeometry,t,i)};var c$J=new M$K({center:new o$1p,semiMajorAxis:1,semiMinorAxis:1}),i$M={center:new o$1p,radius:void 0,ellipsoid:t$12.clone(t$12.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};a$H.unpack=function(e,t,i){var n=M$K.unpack(e,t,c$J);return i$M.center=o$1p.clone(n._center,i$M.center),i$M.ellipsoid=t$12.clone(n._ellipsoid,i$M.ellipsoid),i$M.height=n._height,i$M.extrudedHeight=n._extrudedHeight,i$M.granularity=n._granularity,i$M.numberOfVerticalLines=n._numberOfVerticalLines,e$2e(i)?(i$M.semiMajorAxis=n._semiMajorAxis,i$M.semiMinorAxis=n._semiMinorAxis,i._ellipseGeometry=new M$K(i$M),i):(i$M.radius=n._semiMajorAxis,new a$H(i$M))},a$H.createGeometry=function(e){return M$K.createGeometry(e._ellipseGeometry)};var e$11={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},tt$a=Object.freeze(e$11),e$10={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},g$R=Object.freeze(e$10);function u$H(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).currentTime,i=e.startTime,n=e.stopTime;if(t=e$2e(t)?a$15.clone(t):e$2e(i)?a$15.clone(i):e$2e(n)?a$15.addDays(n,-1,new a$15):a$15.now(),i=e$2e(i)?a$15.clone(i):a$15.clone(t),n=e$2e(n)?a$15.clone(n):a$15.addDays(i,1,new a$15),a$15.greaterThan(i,n))throw new t$15("startTime must come before stopTime.");this.startTime=i,this.stopTime=n,this.clockRange=u$Z(e.clockRange,tt$a.UNBOUNDED),this.canAnimate=u$Z(e.canAnimate,!0),this.onTick=new o$1h,this.onStop=new o$1h,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Et$c(),this.currentTime=t,this.multiplier=u$Z(e.multiplier,1),this.shouldAnimate=u$Z(e.shouldAnimate,!1),this.clockStep=u$Z(e.clockStep,g$R.SYSTEM_CLOCK_MULTIPLIER)}function S$G(e,t,i,n,r){this.aabb=e,this.axis=t,this.d=i,this.midStartIndex=n,this.rightStartIndex=r}function w$I(e,t,i,n){this.globalTriangleVertexIndices=e,this.firstTriangleIndex=t,this.positionAttribute=n,this._rayDirection=[0,0,0],this._rayOrigin=[0,0,0],this.bspNodeTree=[];var r=i-t,o=65535>=r?new Uint16Array(r):new Uint32Array(r);this.indices=o;for(var a=0;a<r;++a)o[a]=a;var s=H$M(e,t,i,n.data,n.stride),l=e$2d.clamp(Math.log2(r/40),2,10),u=(e,t,i)=>{var n,r=Q$H(o,s,e,t),a=t-e;if(a<=40)return n=new S$G(r,0,0,e,t),this.bspNodeTree.push(n),n;var c=J$D(r),h=K$G(o,s,e,t,c.axis,c.midValue),d=(e,t)=>{if(!(i>l)){var n=t-e;if(!(40>n||n>=.8*a))return u(e,t,i+1)}};return n=new S$G(r,c.axis,c.midValue,h.next,h.mid),this.bspNodeTree.push(n),n.leftNode=d(e,h.next),n.rightNode=d(h.mid,t),n};u(0,r,0),this.triangleVertexIndices=G$R(o,e,t,r)}Object.defineProperties(u$H.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){a$15.equals(this._currentTime,e)||(this._clockStep===g$R.SYSTEM_CLOCK&&(this._clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===g$R.SYSTEM_CLOCK&&(this._clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===g$R.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=a$15.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===g$R.SYSTEM_CLOCK&&(this._clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}}),u$H.prototype.tick=function(){var e=Et$c(),t=a$15.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){var i=this._clockStep;if(i===g$R.SYSTEM_CLOCK)t=a$15.now(t);else{var n=this._multiplier;if(i===g$R.TICK_DEPENDENT)t=a$15.addSeconds(t,n,t);else{var r=e-this._lastSystemTime;t=a$15.addSeconds(t,n*(r/1e3),t)}var o=this.clockRange,a=this.startTime,s=this.stopTime;if(o===tt$a.CLAMPED)a$15.lessThan(t,a)?t=a$15.clone(a,t):a$15.greaterThan(t,s)&&(t=a$15.clone(s,t),this.onStop.raiseEvent(this));else if(o===tt$a.LOOP_STOP)for(a$15.lessThan(t,a)&&(t=a$15.clone(a,t));a$15.greaterThan(t,s);)t=a$15.addSeconds(a,a$15.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t},Object.defineProperties(w$I.prototype,{estimatedMemoryUsage:{get:function(){return this.triangleVertexIndices.byteLength+this.indices.byteLength}}});var R$G=[1/0,1/0,1/0],V$B=[-1/0,-1/0,-1/0];w$I.numFacesTested=0,w$I.componentMinimalSizeForIntersectionData=200;var E$M=new o$1p,z$J=new o$1p,O$y=new o$1p,F$K=new o$1p,C$K=new o$1p,L$R=new o$1p,k$F=new o$1p,U$K=new o$1p;function Q$H(e,t,i,n){if(n<=i)return new e$29(new o$1p(NaN,NaN,NaN),new o$1p(NaN,NaN,NaN));for(var r=6*e[i],o=0;o<3;++o)R$G[o]=t[r+0+o],V$B[o]=t[r+3+o];for(i+=1;i<n;++i)for(r=6*e[i],o=0;o<3;++o)R$G[o]=Math.min(R$G[o],t[r+0+o]),V$B[o]=Math.max(V$B[o],t[r+3+o]);return new e$29(new o$1p(R$G[0],R$G[1],R$G[2]),new o$1p(V$B[0],V$B[1],V$B[2]))}function G$R(e,t,i,n){for(var r=n-i,o=0,a=[],s=i;s<n;++s)for(var l=0;l<3;++l)o=Math.max(t[3*s+l],o);for(a=65535>=o?new Uint16Array(3*r):new Uint32Array(3*r),o=0;o<r;++o)for(var u=3*(e[o]+i),c=0;c<3;++c)a[3*o+c]=t[u+c];return a}function H$M(e,t,i,n,r){i-=t;for(var o=new Float32Array(6*i),a=0;a<i;++a){var s=3*(a+t);const i=e[s]*r,u=e[s+1]*r,c=e[s+2]*r;for(var l=0;l<3;++l){const e=n[i+l],t=n[u+l],r=n[c+l];o[6*a+l]=Math.min(e,t,r),o[6*a+3+l]=Math.max(e,t,r)}}return o}function J$D(e){var t=o$1p.packArray([e.minimum,e.maximum]),i=t[3]-t[0],n=t[4]-t[1],r=t[5]-t[2],o=i>n?i>r?0:n>r?1:2:n>r?1:r>i?2:0;return{axis:o,midValue:(t[o]+t[o+3])/2}}function K$G(e,t,i,n,r,o){for(var a=n,s=0;i<a;)t[6*(s=e[i])+r+3]<=o?++i:(--a,e[i]=e[a],e[a]=s);for(s=i,a=n;s<a;)t[6*(n=e[a-1])+r]>=o?--a:(e[a-1]=e[s],e[s]=n,++s);return{next:i,mid:s}}function W$M(e,t,i){for(var n=0,r=1/0,o=0;3>o;++o){var a=o$1p.packArray([e.minimum,e.maximum]),s=a[o];if(t[o]<s){if(1e-6>=i[o])return!1;n=Math.max(n,(s-t[o])/i[o])}else-1e-6>=i[o]&&(r=Math.min(r,(s-t[o])/i[o]));if(n>r)return!1;if(s=a[o+3],t[o]>s){if(-1e-6<=i[o])return!1;n=Math.max(n,(s-t[o])/i[o])}else 1e-6<=i[o]&&(r=Math.min(r,(s-t[o])/i[o]));if(n>r)return!1}return!0}w$I.prototype.intersectRayTriangleRange=function(e,t){if(!(e>=t)){for(var i=this.triangleVertexIndices,n=this.positionAttribute.data,r=this.positionAttribute.stride,o=new o$1p(this._rayOrigin[0],this._rayOrigin[1],this._rayOrigin[2]),a=new o$1p(this._rayDirection[0],this._rayDirection[1],this._rayDirection[2]),s=e,l=3*e;s<t;++s){var u=i[l++]*r,c=o$1p.fromElements(n[u++],n[u++],n[u],L$R);u=i[l++]*r;var h=o$1p.fromElements(n[u++],n[u++],n[u],k$F);u=i[l++]*r;var d,f,p,_,m,g=o$1p.fromElements(n[u++],n[u++],n[u],U$K),x=o$1p.subtract(h,c,E$M),y=o$1p.subtract(g,c,z$J),v=o$1p.cross(a,y,O$y),$=o$1p.dot(x,v);if(!(Math.abs($)<=Number.EPSILON)){if(d=o$1p.subtract(o,c,F$K),p=o$1p.dot(d,v),0<$){if(0>p||p>$)continue}else if(0<p||p<$)continue;if(f=o$1p.cross(d,x,C$K),_=o$1p.dot(a,f),0<$){if(0>_||p+_>$)continue}else if(0<_||p+_<$)continue;if(0<=(m=o$1p.dot(y,f)/$)){var b=this.indices[s]+this.firstTriangleIndex,T=o$1p.cross(x,y,O$y);T=o$1p.normalize(T,O$y),this._callback(m,T,b,!1)}}}w$I.numFacesTested+=t-e}},w$I.prototype.intersectRay=function(e,t){w$I.numFacesTested=0;var i=e.origin,n=e.direction,r=n.x,o=n.y,a=n.z;if(r*r+o*o+a*a>e$2d.EPSILON6){this._rayOrigin[0]=i.x,this._rayOrigin[1]=i.y,this._rayOrigin[2]=i.z,this._rayDirection[0]=r,this._rayDirection[1]=o,this._rayDirection[2]=a;var s=this.triangleVertexIndices.length/3;this._callback=t,this.intersectRayBSP(this.bspNodeTree[0],0,s)}},w$I.prototype.intersectRayBSP=function(e,t,i){var n=this._rayOrigin,r=this._rayDirection;if(W$M(e.aabb,n,r)){var o=e.axis,a=e.d;if(n[o]<a||0>r[o]){const i=e.midStartIndex;if(t<i){const n=e.leftNode;void 0!==n?this.intersectRayBSP(n,t,i):this.intersectRayTriangleRange(t,i)}}this.intersectRayTriangleRange(e.midStartIndex,e.rightStartIndex),(n[o]>a||0<r[o])&&((t=e.rightStartIndex)<i&&(void 0!==(e=e.rightNode)?this.intersectRayBSP(e,t,i):this.intersectRayTriangleRange(t,i)))}};const e$$={Webgl1:1,Webgl2:2,WebGPU:3};var Me$j=Object.freeze(e$$),g$Q={},B$F=new o$1p,C$J=new o$1p,y$H=new o$1p,P$I=new o$1p,M$J=new y$Y;function w$H(e,t,i,n,r){var o=o$1p.subtract(e,t,B$F),a=o$1p.dot(i,o),s=o$1p.dot(n,o);return o$1o.fromElements(a,s,r)}g$Q.validOutline=function(e){o$1q.defined("positions",e);var t=y$Y.fromPoints(e,M$J).halfAxes,i=p$1e.getColumn(t,0,C$J),n=p$1e.getColumn(t,1,y$H),r=p$1e.getColumn(t,2,P$I),o=o$1p.magnitude(i),a=o$1p.magnitude(n),s=o$1p.magnitude(r);return!(0===o&&(0===a||0===s)||0===a&&0===s)},g$Q.computeProjectTo2DArguments=function(e,t,i,n){o$1q.defined("positions",e),o$1q.defined("centerResult",t),o$1q.defined("planeAxis1Result",i),o$1q.defined("planeAxis2Result",n);var r,o,a=y$Y.fromPoints(e,M$J),s=a.halfAxes,l=p$1e.getColumn(s,0,C$J),u=p$1e.getColumn(s,1,y$H),c=p$1e.getColumn(s,2,P$I),h=o$1p.magnitude(l),d=o$1p.magnitude(u),f=o$1p.magnitude(c),p=Math.min(h,d,f);return(0!==h||0!==d&&0!==f)&&(0!==d||0!==f)&&((p===d||p===f)&&(r=l),p===h?r=u:p===f&&(o=u),(p===h||p===d)&&(o=c),o$1p.normalize(r,i),o$1p.normalize(o,n),o$1p.clone(a.center,t),!0)},g$Q.createProjectPointsTo2DFunction=function(e,t,i){return function(n){for(var r=new Array(n.length),o=0;o<n.length;o++)r[o]=w$H(n[o],e,t,i);return r}},g$Q.createProjectPointTo2DFunction=function(e,t,i){return function(n,r){return w$H(n,e,t,i,r)}};var ce$m=new o$1p,pe$q=new f$1a,se$o=new o$1o,me$q=new o$1o,le$p=new o$1p,ve$k=new o$1p,fe$o=new o$1p,C$I=new o$1p,ye$h=new o$1p,he$l=new o$1p,W$L=new n$15,ue$q=new p$1e,de$m=new p$1e,ge$j=new o$1p;function we$h(e,t,i,n,r,o,a,s){var l=e.positions,u=A$1f.triangulate(e.positions2D,e.holes);u.length<3&&(u=[0,1,2]);var c=ce$z.createTypedArray(l.length,u.length);c.set(u);var h=ue$q;if(0!==n){var d=n$15.fromAxisAngle(o,n,W$L);if(h=p$1e.fromQuaternion(d,h),t.tangent||t.bitangent){d=n$15.fromAxisAngle(o,-n,W$L);var f=p$1e.fromQuaternion(d,de$m);a=o$1p.normalize(p$1e.multiplyByVector(f,a,a),a),t.bitangent&&(s=o$1p.normalize(o$1p.cross(o,a,s),s))}}else h=p$1e.clone(p$1e.IDENTITY,h);var p=me$q;t.st&&(p.x=i.x,p.y=i.y);for(var _=l.length,m=3*_,g=new Float64Array(m),x=t.normal?new Float32Array(m):void 0,y=t.tangent?new Float32Array(m):void 0,v=t.bitangent?new Float32Array(m):void 0,$=t.st?new Float32Array(2*_):void 0,b=0,T=0,C=0,S=0,w=0,E=0;E<_;E++){var P=l[E];if(g[b++]=P.x,g[b++]=P.y,g[b++]=P.z,t.st){var A=r(p$1e.multiplyByVector(h,P,ce$m),se$o);o$1o.subtract(A,p,A);var L=e$2d.clamp(A.x/i.width,0,1),M=e$2d.clamp(A.y/i.height,0,1);$[w++]=L,$[w++]=M}t.normal&&(x[T++]=o.x,x[T++]=o.y,x[T++]=o.z),t.tangent&&(y[S++]=a.x,y[S++]=a.y,y[S++]=a.z),t.bitangent&&(v[C++]=s.x,v[C++]=s.y,v[C++]=s.z)}var R=new a$_;return t.position&&(R.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:g})),t.normal&&(R.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:x})),t.tangent&&(R.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:y})),t.bitangent&&(R.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:v})),t.st&&(R.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:$})),new I$1p({attributes:R,indices:c,primitiveType:W$18.TRIANGLES})}function P$H(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).polygonHierarchy;o$1q.defined("options.polygonHierarchy",t);var i=u$Z(e.vertexFormat,n$13.DEFAULT);this._vertexFormat=n$13.clone(i),this._polygonHierarchy=t,this._stRotation=u$Z(e.stRotation,0),this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._workerName="createCoplanarPolygonGeometry",this.packedLength=y$Z.computeHierarchyPackedLength(t)+n$13.packedLength+t$12.packedLength+2}P$H.fromPositions=function(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new P$H({polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid})},P$H.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),i=y$Z.packPolygonHierarchy(e._polygonHierarchy,t,i),t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._stRotation,t[i]=e.packedLength,t};var Pe$g=t$12.clone(t$12.UNIT_SPHERE),Ae$k=new n$13,be$m={polygonHierarchy:{}};function T$J(e){for(var t=e.length,i=new Float64Array(3*t),n=ce$z.createTypedArray(t,2*t),r=0,o=0,a=0;a<t;a++){var s=e[a];i[r++]=s.x,i[r++]=s.y,i[r++]=s.z,n[o++]=a,n[o++]=(a+1)%t}return new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:i})}),indices:n,primitiveType:W$18.LINES})}function a$G(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).polygonHierarchy;o$1q.defined("options.polygonHierarchy",t),this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=y$Z.computeHierarchyPackedLength(t)+1}P$H.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=y$Z.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=t$12.unpack(e,t,Pe$g);t+=t$12.packedLength;var o=n$13.unpack(e,t,Ae$k);t+=n$13.packedLength;var a=e[t++],s=e[t];return e$2e(i)||(i=new P$H(be$m)),i._polygonHierarchy=n,i._ellipsoid=t$12.clone(r,i._ellipsoid),i._vertexFormat=n$13.clone(o,i._vertexFormat),i._stRotation=a,i.packedLength=s,i},P$H.createGeometry=function(e){var t=e._vertexFormat,i=e._polygonHierarchy,n=e._stRotation,r=i.positions;if(!((r=D$13(r,o$1p.equalsEpsilon,!0)).length<3)){var o=le$p,a=ve$k,s=fe$o,l=ye$h,u=he$l;if(g$Q.computeProjectTo2DArguments(r,C$I,l,u)){if(o=o$1p.cross(l,u,o),o=o$1p.normalize(o,o),!o$1p.equalsEpsilon(C$I,o$1p.ZERO,e$2d.EPSILON6)){var c=e._ellipsoid.geodeticSurfaceNormal(C$I,ge$j);o$1p.dot(o,c)<0&&(o=o$1p.negate(o,o),l=o$1p.negate(l,l))}var h=g$Q.createProjectPointsTo2DFunction(C$I,l,u),d=g$Q.createProjectPointTo2DFunction(C$I,l,u);t.tangent&&(a=o$1p.clone(l,a)),t.bitangent&&(s=o$1p.clone(u,s));var f=y$Z.polygonsFromHierarchy(i,h,!1),p=f.hierarchy,_=f.polygons;if(0!==p.length){r=p[0].outerRing;for(var m=i$1d.fromPoints(r),g=y$Z.computeBoundingRectangle(o,d,r,n,pe$q),x=[],y=0;y<_.length;y++){var v=new d$1o({geometry:we$h(_[y],t,g,n,d,o,a,s)});x.push(v)}var $=k$14.combineInstances(x)[0];$.attributes.position.values=new Float64Array($.attributes.position.values),$.indices=ce$z.createTypedArray($.attributes.position.values.length/3,$.indices);var b=$.attributes;return t.position||delete b.position,new I$1p({attributes:b,indices:$.indices,primitiveType:$.primitiveType,boundingSphere:m})}}}},a$G.fromPositions=function(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new a$G({polygonHierarchy:{positions:e.positions}})},a$G.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i=y$Z.packPolygonHierarchy(e._polygonHierarchy,t,i)]=e.packedLength,t};var C$H={polygonHierarchy:{}};a$G.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=y$Z.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=e[t];return e$2e(i)||(i=new a$G(C$H)),i._polygonHierarchy=n,i.packedLength=r,i},a$G.createGeometry=function(e){var t=e._polygonHierarchy,i=t.positions;if(!((i=D$13(i,o$1p.equalsEpsilon,!0)).length<3)&&g$Q.validOutline(i)){var n=y$Z.polygonOutlinesFromHierarchy(t,!1);if(0!==n.length){for(var r=[],o=0;o<n.length;o++){var a=new d$1o({geometry:T$J(n[o])});r.push(a)}var s=k$14.combineInstances(r)[0],l=i$1d.fromPoints(t.positions);return new I$1p({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:l})}}};var e$_={ROUNDED:0,MITERED:1,BEVELED:2},ar$6=Object.freeze(e$_),g$P=[new o$1p,new o$1p],hr$3=new o$1p,gr$3=new o$1p,dr$2=new o$1p,pr$3=new o$1p,wr$3=new o$1p,Sr$2=new o$1p,Br$3=new o$1p,xr$4=new o$1p,Er$3=new o$1p,X$G=new o$1p,er$8=new o$1p,J$C={},ur$3=new a$18;function Tr$3(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++){var r=e[n];ur$3=t.cartesianToCartographic(r,ur$3),i[n]=ur$3.height,e[n]=t.scaleToGeodeticSurface(r,r)}return i}function $$F(e,t,i,n){var r,o=e[0],a=e[1],s=o$1p.angleBetween(o,a),l=Math.ceil(s/n),u=new Array(l);if(t===i){for(r=0;r<l;r++)u[r]=t;return u.push(i),u}var c=(i-t)/l;for(r=1;r<l;r++){var h=t+r*c;u[r]=h}return u[0]=t,u.push(i),u}var nr$6=new o$1p,tr$6=new o$1p;function zr$4(e,t,i,n){var r=new f$16(i,n),o=r.projectPointOntoPlane(o$1p.add(i,e,nr$6),nr$6),a=r.projectPointOntoPlane(o$1p.add(i,t,tr$6),tr$6),s=o$1o.angleBetween(o,a);return a.x*o.y-a.y*o.x>=0?-s:s}var Ar$2=new o$1p(-1,0,0),D$F=p$1d.clone(p$1d.IDENTITY),Cr$3=new p$1d,R$F=new p$1e,Nr$2=p$1e.IDENTITY.clone(),Fr$2=new o$1p,Lr$3=new e$2c,vr$4=new o$1p;function I$V(e,t,i,n,r,o,a,s){var l=Fr$2,u=Lr$3;D$F=m$19.eastNorthUpToFixedFrame(e,r,D$F),l=p$1d.multiplyByPointAsVector(D$F,Ar$2,l);var c=zr$4(l=o$1p.normalize(l,l),t,e,r);R$F=p$1e.fromRotationZ(c,R$F),vr$4.z=o,D$F=p$1d.multiplyTransformation(D$F,p$1d.fromRotationTranslation(R$F,vr$4,Cr$3),D$F);var h=Nr$2;h[0]=a;for(var d=0;d<s;d++)for(var f=0;f<i.length;f+=3)u=o$1p.fromArray(i,f,u),u=p$1e.multiplyByVector(h,u,u),u=p$1d.multiplyByPoint(D$F,u,u),n.push(u.x,u.y,u.z);return n}function k$E(e,t,i,n,r,o,a,s,l){var u=Fr$2,c=Lr$3;D$F=m$19.eastNorthUpToFixedFrame(e,r,D$F),u=p$1d.multiplyByPointAsVector(D$F,Ar$2,u);var h=zr$4(u=o$1p.normalize(u,u),t,e,r);R$F=p$1e.fromRotationZ(h,R$F),vr$4.z=o,D$F=p$1d.multiplyTransformation(D$F,p$1d.fromRotationTranslation(R$F,vr$4,Cr$3),D$F);var d=Nr$2;d[0]=a;for(var f=0;f<s;f++)for(var p=0;p<i.length;p+=3)c=o$1p.fromArray(i,p,c),c=p$1e.multiplyByVector(d,c,c),c=p$1d.multiplyByPoint(D$F,c,c),c=p$1d.multiplyByPoint(l,c,c),n.push(c.x,c.y,c.z);return n}var Dr$2=new o$1p;function rr$8(e,t,i,n,r,o,a){for(var s=0;s<e.length;s+=3){n=I$V(o$1p.fromArray(e,s,Dr$2),t,i,n,r,o[s/3],a,1)}return n}function Ir$5(e,t,i,n,r,o,a,s){for(var l=0;l<e.length;l+=3){n=k$E(o$1p.fromArray(e,l,Dr$2),t,i,n,r,o[l/3],a,1,s)}return n}function Vr$2(e,t){var i=e.length,n=new Array(6*i),r=0,o=t.x+t.width/2,a=t.y+t.height/2,s=e[0];n[r++]=s.x-o,n[r++]=0,n[r++]=s.y-a;for(var l=1;l<i;l++){var u=(s=e[l]).x-o,c=s.y-a;n[r++]=u,n[r++]=0,n[r++]=c,n[r++]=u,n[r++]=0,n[r++]=c}return s=e[0],n[r++]=s.x-o,n[r++]=0,n[r++]=s.y-a,n}function lr$5(e,t){for(var i=e.length,n=new Array(3*i),r=0,o=t.x+t.width/2,a=t.y+t.height/2,s=0;s<i;s++)n[r++]=e[s].x-o,n[r++]=0,n[r++]=e[s].y-a;return n}var Mr$4=new n$15,Or$2=new o$1p,Gr$2=new p$1e;function or$5(e,t,i,n,r,o,a,s,l,u){var c,h,d=o$1p.angleBetween(o$1p.subtract(t,e,X$G),o$1p.subtract(i,e,er$8)),f=n===ar$6.BEVELED?0:Math.ceil(d/e$2d.toRadians(5));if(c=r?p$1e.fromQuaternion(n$15.fromAxisAngle(o$1p.negate(e,X$G),d/(f+1),Mr$4),Gr$2):p$1e.fromQuaternion(n$15.fromAxisAngle(e,d/(f+1),Mr$4),Gr$2),t=o$1p.clone(t,Or$2),f>0)for(var p=u?2:1,_=0;_<f;_++)t=p$1e.multiplyByVector(c,t,t),h=o$1p.subtract(t,e,X$G),h=o$1p.normalize(h,h),r||(h=o$1p.negate(h,h)),a=I$V(o.scaleToGeodeticSurface(t,er$8),h,s,a,o,l,1,p);else h=o$1p.subtract(t,e,X$G),h=o$1p.normalize(h,h),r||(h=o$1p.negate(h,h)),a=I$V(o.scaleToGeodeticSurface(t,er$8),h,s,a,o,l,1,1),i=o$1p.clone(i,Or$2),h=o$1p.subtract(i,e,X$G),h=o$1p.normalize(h,h),r||(h=o$1p.negate(h,h)),a=I$V(o.scaleToGeodeticSurface(i,er$8),h,s,a,o,l,1,1);return a}J$C.removeDuplicatesFromShape=function(e){for(var t=e.length,i=[],n=t-1,r=0;r<t;n=r++){var o=e[n],a=e[r];o$1o.equals(o,a)||i.push(a)}return i},J$C.angleIsGreaterThanPi=function(e,t,i,n){var r=new f$16(i,n),o=r.projectPointOntoPlane(o$1p.add(i,e,nr$6),nr$6),a=r.projectPointOntoPlane(o$1p.add(i,t,tr$6),tr$6);return a.x*o.y-a.y*o.x>=0};var Ur$4=new o$1p,_r$3=new o$1p;J$C.computePositions=function(e,t,i,n,r){var o=n._ellipsoid,a=Tr$3(e,o),s=n._granularity,l=n._cornerType,u=r?Vr$2(t,i):lr$5(t,i),c=r?lr$5(t,i):void 0,h=i.height/2,d=i.width/2,f=e.length,p=[],_=r?[]:void 0,m=hr$3,g=gr$3,x=dr$2,y=pr$3,v=wr$3,$=Sr$2,b=Br$3,T=xr$4,C=Er$3,S=e[0],w=e[1];y=o.geodeticSurfaceNormal(S,y),m=o$1p.subtract(w,S,m),m=o$1p.normalize(m,m),T=o$1p.cross(y,m,T),T=o$1p.normalize(T,T);var E=a[0],P=a[1];r&&(_=I$V(S,T,c,_,o,E+h,1,1)),C=o$1p.clone(S,C),S=w,g=o$1p.negate(m,g);for(var A,L=1;L<f-1;L++){var M=r?2:1;w=e[L+1],m=o$1p.subtract(w,S,m),m=o$1p.normalize(m,m),x=o$1p.add(m,g,x),x=o$1p.normalize(x,x),y=o.geodeticSurfaceNormal(S,y);var R=o$1p.multiplyByScalar(y,o$1p.dot(m,y),Ur$4);o$1p.subtract(m,R,R),o$1p.normalize(R,R);var O=o$1p.multiplyByScalar(y,o$1p.dot(g,y),_r$3);if(o$1p.subtract(g,O,O),o$1p.normalize(O,O),!e$2d.equalsEpsilon(Math.abs(o$1p.dot(R,O)),1,e$2d.EPSILON7)){x=o$1p.cross(x,y,x),x=o$1p.cross(y,x,x),x=o$1p.normalize(x,x);var D=1/Math.max(.25,o$1p.magnitude(o$1p.cross(x,g,X$G))),I=J$C.angleIsGreaterThanPi(m,g,S,o);I?(v=o$1p.add(S,o$1p.multiplyByScalar(x,D*d,x),v),$=o$1p.add(v,o$1p.multiplyByScalar(T,d,$),$),g$P[0]=o$1p.clone(C,g$P[0]),g$P[1]=o$1p.clone($,g$P[1]),A=$$F(g$P,E+h,P+h,s),p=rr$8(m$X.generateArc({positions:g$P,granularity:s,ellipsoid:o}),T,u,p,o,A,1),T=o$1p.cross(y,m,T),T=o$1p.normalize(T,T),b=o$1p.add(v,o$1p.multiplyByScalar(T,d,b),b),l===ar$6.ROUNDED||l===ar$6.BEVELED?or$5(v,$,b,l,I,o,p,u,P+h,r):p=I$V(S,x=o$1p.negate(x,x),u,p,o,P+h,D,M),C=o$1p.clone(b,C)):(v=o$1p.add(S,o$1p.multiplyByScalar(x,D*d,x),v),$=o$1p.add(v,o$1p.multiplyByScalar(T,-d,$),$),g$P[0]=o$1p.clone(C,g$P[0]),g$P[1]=o$1p.clone($,g$P[1]),A=$$F(g$P,E+h,P+h,s),p=rr$8(m$X.generateArc({positions:g$P,granularity:s,ellipsoid:o}),T,u,p,o,A,1),T=o$1p.cross(y,m,T),T=o$1p.normalize(T,T),b=o$1p.add(v,o$1p.multiplyByScalar(T,-d,b),b),l===ar$6.ROUNDED||l===ar$6.BEVELED?or$5(v,$,b,l,I,o,p,u,P+h,r):p=I$V(S,x,u,p,o,P+h,D,M),C=o$1p.clone(b,C)),g=o$1p.negate(m,g)}else p=I$V(C,T,u,p,o,E+h,1,1),C=S;E=P,P=a[L+1],S=w}g$P[0]=o$1p.clone(C,g$P[0]),g$P[1]=o$1p.clone(S,g$P[1]),A=$$F(g$P,E+h,P+h,s),p=rr$8(m$X.generateArc({positions:g$P,granularity:s,ellipsoid:o}),T,u,p,o,A,1),r&&(_=I$V(S,T,c,_,o,P+h,1,1)),f=p.length;var F=r?f+_.length:f,B=new Float64Array(F);return B.set(p),r&&B.set(_,f),B},J$C.computeLocalPositions=function(e,t,i,n,r,o){var a=n._ellipsoid,s=Tr$3(e,a),l=n._granularity,u=n._cornerType,c=r?Vr$2(t,i):lr$5(t,i),h=r?lr$5(t,i):void 0,d=i.width/2,f=e.length,p=[],_=r?[]:void 0,m=hr$3,g=gr$3,x=dr$2,y=pr$3,v=wr$3,$=Sr$2,b=Br$3,T=xr$4,C=Er$3,S=m$19.eastNorthUpToFixedFrame(o,a,new p$1d),w=p$1d.inverse(S,new p$1d),E=e[0],P=e[1];y=a.geodeticSurfaceNormal(E,y),m=o$1p.subtract(P,E,m),m=o$1p.normalize(m,m),T=o$1p.cross(y,m,T),T=o$1p.normalize(T,T);var A=s[0],L=s[1];r&&(_=k$E(E,T,h,_,a,A+0,1,1,w)),C=o$1p.clone(E,C),E=P,g=o$1p.negate(m,g);for(var M,R=1;R<f-1;R++){var O=r?2:1;P=e[R+1],m=o$1p.subtract(P,E,m),m=o$1p.normalize(m,m),x=o$1p.add(m,g,x),x=o$1p.normalize(x,x),y=a.geodeticSurfaceNormal(E,y);var D=o$1p.multiplyByScalar(y,o$1p.dot(m,y),Ur$4);o$1p.subtract(m,D,D),o$1p.normalize(D,D);var I=o$1p.multiplyByScalar(y,o$1p.dot(g,y),_r$3);if(o$1p.subtract(g,I,I),o$1p.normalize(I,I),!e$2d.equalsEpsilon(Math.abs(o$1p.dot(D,I)),1,e$2d.EPSILON7)){x=o$1p.cross(x,y,x),x=o$1p.cross(y,x,x),x=o$1p.normalize(x,x);var F=1/Math.max(.25,o$1p.magnitude(o$1p.cross(x,g,X$G))),B=J$C.angleIsGreaterThanPi(m,g,E,a);B?(v=o$1p.add(E,o$1p.multiplyByScalar(x,F*d,x),v),$=o$1p.add(v,o$1p.multiplyByScalar(T,d,$),$),g$P[0]=o$1p.clone(C,g$P[0]),g$P[1]=o$1p.clone($,g$P[1]),M=$$F(g$P,A+0,L+0,l),p=rr$8(m$X.generateArc({positions:g$P,granularity:l,ellipsoid:a}),T,c,p,a,M,1,fromEnu),T=o$1p.cross(y,m,T),T=o$1p.normalize(T,T),b=o$1p.add(v,o$1p.multiplyByScalar(T,d,b),b),u===ar$6.ROUNDED||u===ar$6.BEVELED?or$5(v,$,b,u,B,a,p,c,L+0,r):p=k$E(E,x=o$1p.negate(x,x),c,p,a,L+0,F,O,w),C=o$1p.clone(b,C)):(v=o$1p.add(E,o$1p.multiplyByScalar(x,F*d,x),v),$=o$1p.add(v,o$1p.multiplyByScalar(T,-d,$),$),g$P[0]=o$1p.clone(C,g$P[0]),g$P[1]=o$1p.clone($,g$P[1]),M=$$F(g$P,A+0,L+0,l),p=rr$8(m$X.generateArc({positions:g$P,granularity:l,ellipsoid:a}),T,c,p,a,M,1),T=o$1p.cross(y,m,T),T=o$1p.normalize(T,T),b=o$1p.add(v,o$1p.multiplyByScalar(T,-d,b),b),u===ar$6.ROUNDED||u===ar$6.BEVELED?or$5(v,$,b,u,B,a,p,c,L+0,r):p=k$E(E,x,c,p,a,L+0,F,O,w),C=o$1p.clone(b,C)),g=o$1p.negate(m,g)}else p=k$E(C,T,c,p,a,A+0,1,1,w),C=E;A=L,L=s[R+1],E=P}g$P[0]=o$1p.clone(C,g$P[0]),g$P[1]=o$1p.clone(E,g$P[1]),M=$$F(g$P,A+0,L+0,l),p=Ir$5(m$X.generateArc({positions:g$P,granularity:l,ellipsoid:a}),T,c,p,a,M,1,w),r&&(_=k$E(E,T,h,_,a,L+0,1,1,w)),f=p.length;var N=r?f+_.length:f,G=new Float64Array(N);return G.set(p),r&&G.set(_,f),G};var b$R={},A$R=new o$1p,H$L=new o$1p,P$G=new o$1p,I$U=new o$1p,g$O=[new o$1p,new o$1p],J$B=new o$1p,K$F=new o$1p,W$K=new o$1p,rr$7=new o$1p,ar$5=new o$1p,er$7=new o$1p,nr$5=new o$1p,ir$6=new o$1p,lr$4=new o$1p,tr$5=new o$1p,X$F=new n$15,Y$y=new p$1e;function V$A(e,t,i,n,r){var o,a=o$1p.angleBetween(o$1p.subtract(t,e,A$R),o$1p.subtract(i,e,H$L)),s=n===ar$6.BEVELED?1:Math.ceil(a/e$2d.toRadians(5))+1,l=3*s,u=new Array(l);u[l-3]=i.x,u[l-2]=i.y,u[l-1]=i.z,o=r?p$1e.fromQuaternion(n$15.fromAxisAngle(o$1p.negate(e,A$R),a/s,X$F),Y$y):p$1e.fromQuaternion(n$15.fromAxisAngle(e,a/s,X$F),Y$y);var c=0;t=o$1p.clone(t,A$R);for(var h=0;h<s;h++)t=p$1e.multiplyByVector(o,t,t),u[c++]=t.x,u[c++]=t.y,u[c++]=t.z;return u}function or$4(e){var t=J$B,i=K$F,n=W$K,r=e[1];i=o$1p.fromArray(e[1],r.length-3,i),n=o$1p.fromArray(e[0],0,n);var o=V$A(t=o$1p.midpoint(i,n,t),i,n,ar$6.ROUNDED,!1),a=e.length-1,s=e[a-1];return r=e[a],i=o$1p.fromArray(s,s.length-3,i),n=o$1p.fromArray(r,0,n),[o,V$A(t=o$1p.midpoint(i,n,t),i,n,ar$6.ROUNDED,!1)]}function Z$F(e,t,i,n){var r=A$R;return n||(t=o$1p.negate(t,t)),[(r=o$1p.add(e,t,r)).x,r.y,r.z,i.x,i.y,i.z]}function q$N(e,t,i,n){for(var r=new Array(e.length),o=new Array(e.length),a=o$1p.multiplyByScalar(t,i,A$R),s=o$1p.negate(a,H$L),l=0,u=e.length-1,c=0;c<e.length;c+=3){var h=o$1p.fromArray(e,c,P$G),d=o$1p.add(h,s,I$U);r[l++]=d.x,r[l++]=d.y,r[l++]=d.z;var f=o$1p.add(h,a,I$U);o[u--]=f.z,o[u--]=f.y,o[u--]=f.x}return n.push(r,o),n}b$R.addAttribute=function(e,t,i,n){var r=t.x,o=t.y,a=t.z;e$2e(i)&&(e[i]=r,e[i+1]=o,e[i+2]=a),e$2e(n)&&(e[n]=a,e[n-1]=o,e[n-2]=r)};var vr$3=new o$1p,sr$5=new o$1p;b$R.computePositions=function(e){var t=e.granularity,i=e.positions,n=e.ellipsoid,r=e.width/2,o=e.cornerType,a=e.saveAttributes,s=J$B,l=K$F,u=W$K,c=rr$7,h=ar$5,d=er$7,f=nr$5,p=ir$6,_=lr$4,m=tr$5,g=[],x=a?[]:void 0,y=a?[]:void 0,v=i[0],$=i[1];l=o$1p.normalize(o$1p.subtract($,v,l),l),s=n.geodeticSurfaceNormal(v,s),c=o$1p.normalize(o$1p.cross(s,l,c),c),a&&(x.push(c.x,c.y,c.z),y.push(s.x,s.y,s.z)),f=o$1p.clone(v,f),v=$,u=o$1p.negate(l,u);var b,T,C=[],S=i.length;for(b=1;b<S-1;b++){s=n.geodeticSurfaceNormal(v,s),$=i[b+1],l=o$1p.normalize(o$1p.subtract($,v,l),l),h=o$1p.normalize(o$1p.add(l,u,h),h);var w=o$1p.multiplyByScalar(s,o$1p.dot(l,s),vr$3);o$1p.subtract(l,w,w),o$1p.normalize(w,w);var E=o$1p.multiplyByScalar(s,o$1p.dot(u,s),sr$5);if(o$1p.subtract(u,E,E),o$1p.normalize(E,E),!e$2d.equalsEpsilon(Math.abs(o$1p.dot(w,E)),1,e$2d.EPSILON7)){h=o$1p.cross(h,s,h),h=o$1p.cross(s,h,h),h=o$1p.normalize(h,h);var P=r/Math.max(.25,o$1p.magnitude(o$1p.cross(h,u,A$R))),A=J$C.angleIsGreaterThanPi(l,u,v,n);h=o$1p.multiplyByScalar(h,P,h),A?(p=o$1p.add(v,h,p),m=o$1p.add(p,o$1p.multiplyByScalar(c,r,m),m),_=o$1p.add(p,o$1p.multiplyByScalar(c,2*r,_),_),g$O[0]=o$1p.clone(f,g$O[0]),g$O[1]=o$1p.clone(m,g$O[1]),g=q$N(m$X.generateArc({positions:g$O,granularity:t,ellipsoid:n}),c,r,g),a&&(x.push(c.x,c.y,c.z),y.push(s.x,s.y,s.z)),d=o$1p.clone(_,d),c=o$1p.normalize(o$1p.cross(s,l,c),c),_=o$1p.add(p,o$1p.multiplyByScalar(c,2*r,_),_),f=o$1p.add(p,o$1p.multiplyByScalar(c,r,f),f),o===ar$6.ROUNDED||o===ar$6.BEVELED?C.push({leftPositions:V$A(p,d,_,o,A)}):C.push({leftPositions:Z$F(v,o$1p.negate(h,h),_,A)})):(_=o$1p.add(v,h,_),m=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,r,m),m),m),p=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,2*r,p),p),p),g$O[0]=o$1p.clone(f,g$O[0]),g$O[1]=o$1p.clone(m,g$O[1]),g=q$N(m$X.generateArc({positions:g$O,granularity:t,ellipsoid:n}),c,r,g),a&&(x.push(c.x,c.y,c.z),y.push(s.x,s.y,s.z)),d=o$1p.clone(p,d),c=o$1p.normalize(o$1p.cross(s,l,c),c),p=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,2*r,p),p),p),f=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,r,f),f),f),o===ar$6.ROUNDED||o===ar$6.BEVELED?C.push({rightPositions:V$A(_,d,p,o,A)}):C.push({rightPositions:Z$F(v,h,p,A)})),u=o$1p.negate(l,u)}v=$}return s=n.geodeticSurfaceNormal(v,s),g$O[0]=o$1p.clone(f,g$O[0]),g$O[1]=o$1p.clone(v,g$O[1]),g=q$N(m$X.generateArc({positions:g$O,granularity:t,ellipsoid:n}),c,r,g),a&&(x.push(c.x,c.y,c.z),y.push(s.x,s.y,s.z)),o===ar$6.ROUNDED&&(T=or$4(g)),{positions:g,corners:C,lefts:x,normals:y,endPositions:T}};var Be$g=new o$1p,Ye$a=new o$1p,Le$k=new o$1p,Ne$f=new o$1p,Pe$f=new o$1p,We$c=new o$1p,fe$n=new o$1p,me$p=new o$1p;function Ge$b(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function j$G(e,t,i,n,r,o){var a=e.normals,s=e.tangents,l=e.bitangents,u=o$1p.normalize(o$1p.cross(i,t,fe$n),fe$n);o.normal&&b$R.addAttribute(a,t,n,r),o.tangent&&b$R.addAttribute(s,u,n,r),o.bitangent&&b$R.addAttribute(l,i,n,r)}function qe$8(e,t,i){var n,r,o,a=e.positions,s=e.corners,l=e.endPositions,u=e.lefts,c=e.normals,h=new a$_,d=0,f=0,p=0;for(r=0;r<a.length;r+=2)d+=o=a[r].length-3,p+=2*o,f+=a[r+1].length-3;for(d+=3,f+=3,r=0;r<s.length;r++){n=s[r];var _=s[r].leftPositions;e$2e(_)?(d+=o=_.length,p+=o):(f+=o=s[r].rightPositions.length,p+=o)}var m,g=e$2e(l);g&&(d+=m=l[0].length-3,f+=m,p+=6*(m/=3));var x,y,v,$,b,T,C=d+f,S=new Float64Array(C),w={normals:t.normal?new Float32Array(C):void 0,tangents:t.tangent?new Float32Array(C):void 0,bitangents:t.bitangent?new Float32Array(C):void 0},E=0,P=C-1,A=Be$g,L=Ye$a,M=m/2,R=ce$z.createTypedArray(C/3,p),O=0;if(g){T=Le$k,b=Ne$f;var D=l[0];for(A=o$1p.fromArray(c,0,A),L=o$1p.fromArray(u,0,L),r=0;r<M;r++)T=o$1p.fromArray(D,3*(M-1-r),T),b=o$1p.fromArray(D,3*(M+r),b),b$R.addAttribute(S,b,E),b$R.addAttribute(S,T,void 0,P),j$G(w,A,L,E,P,t),$=(y=E/3)+1,v=(x=(P-2)/3)-1,R[O++]=x,R[O++]=y,R[O++]=v,R[O++]=v,R[O++]=y,R[O++]=$,E+=3,P-=3}var I,F,B=0,N=0,G=a[B++],z=a[B++];for(S.set(G,E),S.set(z,P-z.length+1),L=o$1p.fromArray(u,N,L),o=z.length-3,r=0;r<o;r+=3)I=i.geodeticSurfaceNormal(o$1p.fromArray(G,r,fe$n),fe$n),F=i.geodeticSurfaceNormal(o$1p.fromArray(z,o-r,me$p),me$p),j$G(w,A=o$1p.normalize(o$1p.add(I,F,A),A),L,E,P,t),$=(y=E/3)+1,v=(x=(P-2)/3)-1,R[O++]=x,R[O++]=y,R[O++]=v,R[O++]=v,R[O++]=y,R[O++]=$,E+=3,P-=3;for(I=i.geodeticSurfaceNormal(o$1p.fromArray(G,o,fe$n),fe$n),F=i.geodeticSurfaceNormal(o$1p.fromArray(z,o,me$p),me$p),A=o$1p.normalize(o$1p.add(I,F,A),A),N+=3,r=0;r<s.length;r++){var U,V,k,W=(n=s[r]).leftPositions,H=n.rightPositions,q=We$c,j=Le$k,X=Ne$f;if(A=o$1p.fromArray(c,N,A),e$2e(W)){for(j$G(w,A,L,void 0,P,t),P-=3,V=$,k=v,U=0;U<W.length/3;U++)q=o$1p.fromArray(W,3*U,q),R[O++]=V,R[O++]=k-U-1,R[O++]=k-U,b$R.addAttribute(S,q,void 0,P),j=o$1p.fromArray(S,3*(k-U-1),j),X=o$1p.fromArray(S,3*V,X),j$G(w,A,L=o$1p.normalize(o$1p.subtract(j,X,L),L),void 0,P,t),P-=3;q=o$1p.fromArray(S,3*V,q),j=o$1p.subtract(o$1p.fromArray(S,3*k,j),q,j),X=o$1p.subtract(o$1p.fromArray(S,3*(k-U),X),q,X),j$G(w,A,L=o$1p.normalize(o$1p.add(j,X,L),L),E,void 0,t),E+=3}else{for(j$G(w,A,L,E,void 0,t),E+=3,V=v,k=$,U=0;U<H.length/3;U++)q=o$1p.fromArray(H,3*U,q),R[O++]=V,R[O++]=k+U,R[O++]=k+U+1,b$R.addAttribute(S,q,E),j=o$1p.fromArray(S,3*V,j),X=o$1p.fromArray(S,3*(k+U),X),j$G(w,A,L=o$1p.normalize(o$1p.subtract(j,X,L),L),E,void 0,t),E+=3;q=o$1p.fromArray(S,3*V,q),j=o$1p.subtract(o$1p.fromArray(S,3*(k+U),j),q,j),X=o$1p.subtract(o$1p.fromArray(S,3*k,X),q,X),j$G(w,A,L=o$1p.normalize(o$1p.negate(o$1p.add(X,j,L),L),L),void 0,P,t),P-=3}for(G=a[B++],z=a[B++],G.splice(0,3),z.splice(z.length-3,3),S.set(G,E),S.set(z,P-z.length+1),o=z.length-3,N+=3,L=o$1p.fromArray(u,N,L),U=0;U<z.length;U+=3)I=i.geodeticSurfaceNormal(o$1p.fromArray(G,U,fe$n),fe$n),F=i.geodeticSurfaceNormal(o$1p.fromArray(z,o-U,me$p),me$p),j$G(w,A=o$1p.normalize(o$1p.add(I,F,A),A),L,E,P,t),y=($=E/3)-1,x=(v=(P-2)/3)+1,R[O++]=x,R[O++]=y,R[O++]=v,R[O++]=v,R[O++]=y,R[O++]=$,E+=3,P-=3;E-=3,P+=3}if(j$G(w,A=o$1p.fromArray(c,c.length-3,A),L,E,P,t),g){E+=3,P-=3,T=Le$k,b=Ne$f;var Y=l[1];for(r=0;r<M;r++)T=o$1p.fromArray(Y,3*(m-r-1),T),b=o$1p.fromArray(Y,3*r,b),b$R.addAttribute(S,T,void 0,P),b$R.addAttribute(S,b,E),j$G(w,A,L,E,P,t),y=($=E/3)-1,x=(v=(P-2)/3)+1,R[O++]=x,R[O++]=y,R[O++]=v,R[O++]=v,R[O++]=y,R[O++]=$,E+=3,P-=3}if(h.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:S}),t.st){var Z,K,Q=new Float32Array(C/3*2),J=0;if(g){d/=3,f/=3;var ee=Math.PI/(m+1);K=1/(d-m+1),Z=1/(f-m+1);var te,ie=m/2;for(r=ie+1;r<m+1;r++)te=e$2d.PI_OVER_TWO+ee*r,Q[J++]=Z*(1+Math.cos(te)),Q[J++]=.5*(1+Math.sin(te));for(r=1;r<f-m+1;r++)Q[J++]=r*Z,Q[J++]=0;for(r=m;r>ie;r--)te=e$2d.PI_OVER_TWO-r*ee,Q[J++]=1-Z*(1+Math.cos(te)),Q[J++]=.5*(1+Math.sin(te));for(r=ie;r>0;r--)te=e$2d.PI_OVER_TWO-ee*r,Q[J++]=1-K*(1+Math.cos(te)),Q[J++]=.5*(1+Math.sin(te));for(r=d-m;r>0;r--)Q[J++]=r*K,Q[J++]=1;for(r=1;r<ie+1;r++)te=e$2d.PI_OVER_TWO+ee*r,Q[J++]=K*(1+Math.cos(te)),Q[J++]=.5*(1+Math.sin(te))}else{for(K=1/((d/=3)-1),Z=1/((f/=3)-1),r=0;r<f;r++)Q[J++]=r*Z,Q[J++]=0;for(r=d;r>0;r--)Q[J++]=(r-1)*K,Q[J++]=1}h.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:Q})}return t.normal&&(h.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:w.normals})),t.tangent&&(h.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:w.tangents})),t.bitangent&&(h.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:w.bitangents})),{attributes:h,indices:R}}function xe$i(e,t){if(!(t.normal||t.tangent||t.bitangent||t.st))return e;var i,n,r=e.position.values;(t.normal||t.bitangent)&&(i=e.normal.values,n=e.bitangent.values);var o,a=e.position.values.length/18,s=3*a,l=2*a,u=2*s;if(t.normal||t.bitangent||t.tangent){var c=t.normal?new Float32Array(6*s):void 0,h=t.tangent?new Float32Array(6*s):void 0,d=t.bitangent?new Float32Array(6*s):void 0,f=Be$g,p=Ye$a,_=Le$k,m=Ne$f,g=Pe$f,x=We$c,y=u;for(o=0;o<s;o+=3){var v=y+u;f=o$1p.fromArray(r,o,f),p=o$1p.fromArray(r,o+s,p),_=o$1p.fromArray(r,(o+3)%s,_),p=o$1p.subtract(p,f,p),_=o$1p.subtract(_,f,_),m=o$1p.normalize(o$1p.cross(p,_,m),m),t.normal&&(b$R.addAttribute(c,m,v),b$R.addAttribute(c,m,v+3),b$R.addAttribute(c,m,y),b$R.addAttribute(c,m,y+3)),(t.tangent||t.bitangent)&&(x=o$1p.fromArray(i,o,x),t.bitangent&&(b$R.addAttribute(d,x,v),b$R.addAttribute(d,x,v+3),b$R.addAttribute(d,x,y),b$R.addAttribute(d,x,y+3)),t.tangent&&(g=o$1p.normalize(o$1p.cross(x,m,g),g),b$R.addAttribute(h,g,v),b$R.addAttribute(h,g,v+3),b$R.addAttribute(h,g,y),b$R.addAttribute(h,g,y+3))),y+=6}if(t.normal){for(c.set(i),o=0;o<s;o+=3)c[o+s]=-i[o],c[o+s+1]=-i[o+1],c[o+s+2]=-i[o+2];e.normal.values=c}else e.normal=void 0;if(t.bitangent?(d.set(n),d.set(n,s),e.bitangent.values=d):e.bitangent=void 0,t.tangent){var $=e.tangent.values;h.set($),h.set($,s),e.tangent.values=h}}if(t.st){var b=e.st.values,T=new Float32Array(6*l);T.set(b),T.set(b,l);for(var C=2*l,S=0;S<2;S++){for(T[C++]=b[0],T[C++]=b[1],o=2;o<l;o+=2){var w=b[o],E=b[o+1];T[C++]=w,T[C++]=E,T[C++]=w,T[C++]=E}T[C++]=b[0],T[C++]=b[1]}e.st.values=T}return e}function Oe$i(e,t,i){i[t++]=e[0],i[t++]=e[1],i[t++]=e[2];for(var n=3;n<e.length;n+=3){var r=e[n],o=e[n+1],a=e[n+2];i[t++]=r,i[t++]=o,i[t++]=a,i[t++]=r,i[t++]=o,i[t++]=a}return i[t++]=e[0],i[t++]=e[1],i[t++]=e[2],i}function er$6(e,t){var i=new n$13({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),n=e.ellipsoid,r=qe$8(b$R.computePositions(e),i,n),o=e.height,a=e.extrudedHeight,s=r.attributes,l=r.indices,u=s.position.values,c=u.length,h=new Float64Array(6*c),d=new Float64Array(c);d.set(u);var f=new Float64Array(4*c);f=Oe$i(u=A$1f.scaleToGeodeticHeight(u,o,n),0,f),f=Oe$i(d=A$1f.scaleToGeodeticHeight(d,a,n),2*c,f),h.set(u),h.set(d,c),h.set(f,2*c),s.position.values=h,s=xe$i(s,t);var p,_=c/3;if(e.shadowVolume){var m=s.normal.values;c=m.length;var g=new Float32Array(6*c);for(p=0;p<c;p++)m[p]=-m[p];g.set(m,c),g=Oe$i(m,4*c,g),s.extrudeDirection=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:g}),t.normal||(s.normal=void 0)}if(e$2e(e.offsetAttribute)){var x=new Uint8Array(6*_);if(e.offsetAttribute===_0x39c22a.TOP)x=d$1s(x,1,0,_),x=d$1s(x,1,2*_,4*_);else x=d$1s(x,e.offsetAttribute===_0x39c22a.NONE?0:1);s.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}var y=l.length,v=_+_,$=ce$z.createTypedArray(h.length/3,2*y+3*v);$.set(l);var b,T,C,S,w=y;for(p=0;p<y;p+=3){var E=l[p],P=l[p+1],A=l[p+2];$[w++]=A+_,$[w++]=P+_,$[w++]=E+_}for(p=0;p<v;p+=2)C=(b=p+v)+1,S=(T=b+v)+1,$[w++]=b,$[w++]=T,$[w++]=C,$[w++]=C,$[w++]=T,$[w++]=S;return{attributes:s,indices:$}}var Je$6=new o$1p,pe$p=new o$1p,X$E=new a$18;function Ke$9(e,t,i,n,r,o){var a=o$1p.subtract(t,e,Je$6);o$1p.normalize(a,a);var s=i.geodeticSurfaceNormal(e,pe$p),l=o$1p.cross(a,s,Je$6);o$1p.multiplyByScalar(l,n,l);var u=r.latitude,c=r.longitude,h=o.latitude,d=o.longitude;o$1p.add(e,l,pe$p),i.cartesianToCartographic(pe$p,X$E);var f=X$E.latitude,p=X$E.longitude;u=Math.min(u,f),c=Math.min(c,p),h=Math.max(h,f),d=Math.max(d,p),o$1p.subtract(e,l,pe$p),i.cartesianToCartographic(pe$p,X$E),f=X$E.latitude,p=X$E.longitude,u=Math.min(u,f),c=Math.min(c,p),h=Math.max(h,f),d=Math.max(d,p),r.latitude=u,r.longitude=c,o.latitude=h,o.longitude=d}var Z$E=new o$1p,_e$l=new o$1p,G$Q=new a$18,q$M=new a$18;function Qe$6(e,t,i,n,r){var o=D$13(e=Ge$b(e,t),o$1p.equalsEpsilon),a=o.length;if(a<2||i<=0)return new h$18;var s,l,u=.5*i;if(G$Q.latitude=Number.POSITIVE_INFINITY,G$Q.longitude=Number.POSITIVE_INFINITY,q$M.latitude=Number.NEGATIVE_INFINITY,q$M.longitude=Number.NEGATIVE_INFINITY,n===ar$6.ROUNDED){var c=o[0];o$1p.subtract(c,o[1],Z$E),o$1p.normalize(Z$E,Z$E),o$1p.multiplyByScalar(Z$E,u,Z$E),o$1p.add(c,Z$E,_e$l),t.cartesianToCartographic(_e$l,X$E),s=X$E.latitude,l=X$E.longitude,G$Q.latitude=Math.min(G$Q.latitude,s),G$Q.longitude=Math.min(G$Q.longitude,l),q$M.latitude=Math.max(q$M.latitude,s),q$M.longitude=Math.max(q$M.longitude,l)}for(var h=0;h<a-1;++h)Ke$9(o[h],o[h+1],t,u,G$Q,q$M);var d=o[a-1];o$1p.subtract(d,o[a-2],Z$E),o$1p.normalize(Z$E,Z$E),o$1p.multiplyByScalar(Z$E,u,Z$E),o$1p.add(d,Z$E,_e$l),Ke$9(d,_e$l,t,u,G$Q,q$M),n===ar$6.ROUNDED&&(t.cartesianToCartographic(_e$l,X$E),s=X$E.latitude,l=X$E.longitude,G$Q.latitude=Math.min(G$Q.latitude,s),G$Q.longitude=Math.min(G$Q.longitude,l),q$M.latitude=Math.max(q$M.latitude,s),q$M.longitude=Math.max(q$M.longitude,l));var f=e$2e(r)?r:new h$18;return f.north=q$M.latitude,f.south=G$Q.latitude,f.east=q$M.longitude,f.west=G$Q.longitude,f}function P$F(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,i=e.width;o$1q.defined("options.positions",t),o$1q.defined("options.width",i);var n=u$Z(e.height,0),r=u$Z(e.extrudedHeight,n);this._positions=t,this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._vertexFormat=n$13.clone(u$Z(e.vertexFormat,n$13.DEFAULT)),this._width=i,this._height=Math.max(n,r),this._extrudedHeight=Math.min(n,r),this._cornerType=u$Z(e.cornerType,ar$6.ROUNDED),this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._shadowVolume=u$Z(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*o$1p.packedLength+t$12.packedLength+n$13.packedLength+7}P$F.pack=function(e,t,i){o$1q.defined("value",e),o$1q.defined("array",t),i=u$Z(i,0);var n=e._positions,r=n.length;t[i++]=r;for(var o=0;o<r;++o,i+=o$1p.packedLength)o$1p.pack(n[o],t,i);return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i++]=e._shadowVolume?1:0,t[i]=u$Z(e._offsetAttribute,-1),t};var Xe$9=t$12.clone(t$12.UNIT_SPHERE),Ze$7=new n$13,x$N={positions:void 0,ellipsoid:Xe$9,vertexFormat:Ze$7,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};P$F.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);for(var n=e[t++],r=new Array(n),o=0;o<n;++o,t+=o$1p.packedLength)r[o]=o$1p.unpack(e,t);var a=t$12.unpack(e,t,Xe$9);t+=t$12.packedLength;var s=n$13.unpack(e,t,Ze$7);t+=n$13.packedLength;var l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=1===e[t++],p=e[t];return e$2e(i)?(i._positions=r,i._ellipsoid=t$12.clone(a,i._ellipsoid),i._vertexFormat=n$13.clone(s,i._vertexFormat),i._width=l,i._height=u,i._extrudedHeight=c,i._cornerType=h,i._granularity=d,i._shadowVolume=f,i._offsetAttribute=-1===p?void 0:p,i):(x$N.positions=r,x$N.width=l,x$N.height=u,x$N.extrudedHeight=c,x$N.cornerType=h,x$N.granularity=d,x$N.shadowVolume=f,x$N.offsetAttribute=-1===p?void 0:p,new P$F(x$N))},P$F.computeRectangle=function(e,t){var i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,n=e.width;return o$1q.defined("options.positions",i),o$1q.defined("options.width",n),Qe$6(i,u$Z(e.ellipsoid,t$12.WGS84),n,u$Z(e.cornerType,ar$6.ROUNDED),t)},P$F.createGeometry=function(e){var t=e._positions,i=e._width,n=e._ellipsoid,r=D$13(t=Ge$b(t,n),o$1p.equalsEpsilon);if(!(r.length<2||i<=0)){var o,a=e._height,s=e._extrudedHeight,l=!e$2d.equalsEpsilon(a,s,0,e$2d.EPSILON2),u=e._vertexFormat,c={ellipsoid:n,positions:r,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0};if(l)c.height=a,c.extrudedHeight=s,c.shadowVolume=e._shadowVolume,c.offsetAttribute=e._offsetAttribute,o=er$6(c,u);else if((o=qe$8(b$R.computePositions(c),u,n)).attributes.position.values=A$1f.scaleToGeodeticHeight(o.attributes.position.values,a,n),e$2e(e._offsetAttribute)){var h=e._offsetAttribute===_0x39c22a.NONE?0:1,d=o.attributes.position.values.length,f=new Uint8Array(d/3);d$1s(f,h),o.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}var p=o.attributes,_=i$1d.fromVertices(p.position.values,void 0,3);return u.position||(o.attributes.position.values=void 0),new I$1p({attributes:p,indices:o.indices,primitiveType:W$18.TRIANGLES,boundingSphere:_,offsetAttribute:e._offsetAttribute})}},P$F.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new P$F({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:r,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$13.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(P$F.prototype,{rectangle:{get:function(){return e$2e(this._rectangle)||(this._rectangle=Qe$6(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var te$u=new o$1p,ie$s=new o$1p,pe$o=new o$1p;function ue$p(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function re$x(e,t){var i,n,r,o=[],a=e.positions,s=e.corners,l=e.endPositions,u=new a$_,c=0,h=0,d=0;for(n=0;n<a.length;n+=2)c+=r=a[n].length-3,d+=r/3*4,h+=a[n+1].length-3;for(c+=3,h+=3,n=0;n<s.length;n++){i=s[n];var f=s[n].leftPositions;e$2e(f)?(c+=r=f.length,d+=r/3*2):(h+=r=s[n].rightPositions.length,d+=r/3*2)}var p,_=e$2e(l);_&&(c+=p=l[0].length-3,h+=p,d+=4*(p/=3));var m,g,x,y,v,$,b=c+h,T=new Float64Array(b),C=0,S=b-1,w=p/2,E=ce$z.createTypedArray(b/3,d+4),P=0;if(E[P++]=C/3,E[P++]=(S-2)/3,_){o.push(C/3),$=te$u,v=ie$s;var A=l[0];for(n=0;n<w;n++)$=o$1p.fromArray(A,3*(w-1-n),$),v=o$1p.fromArray(A,3*(w+n),v),b$R.addAttribute(T,v,C),b$R.addAttribute(T,$,void 0,S),y=(g=C/3)+1,x=(m=(S-2)/3)-1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=y,C+=3,S-=3}var L=0,M=a[L++],R=a[L++];for(T.set(M,C),T.set(R,S-R.length+1),r=R.length-3,o.push(C/3,(S-2)/3),n=0;n<r;n+=3)y=(g=C/3)+1,x=(m=(S-2)/3)-1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=y,C+=3,S-=3;for(n=0;n<s.length;n++){var O,D,I=(i=s[n]).leftPositions,F=i.rightPositions,B=pe$o;if(e$2e(I)){for(S-=3,D=x,o.push(y),O=0;O<I.length/3;O++)B=o$1p.fromArray(I,3*O,B),E[P++]=D-O-1,E[P++]=D-O,b$R.addAttribute(T,B,void 0,S),S-=3;o.push(D-Math.floor(I.length/6)),t===ar$6.BEVELED&&o.push((S-2)/3+1),C+=3}else{for(C+=3,D=y,o.push(x),O=0;O<F.length/3;O++)B=o$1p.fromArray(F,3*O,B),E[P++]=D+O,E[P++]=D+O+1,b$R.addAttribute(T,B,C),C+=3;o.push(D+Math.floor(F.length/6)),t===ar$6.BEVELED&&o.push(C/3-1),S-=3}for(M=a[L++],R=a[L++],M.splice(0,3),R.splice(R.length-3,3),T.set(M,C),T.set(R,S-R.length+1),r=R.length-3,O=0;O<R.length;O+=3)g=(y=C/3)-1,m=(x=(S-2)/3)+1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=y,C+=3,S-=3;C-=3,S+=3,o.push(C/3,(S-2)/3)}if(_){C+=3,S-=3,$=te$u,v=ie$s;var N=l[1];for(n=0;n<w;n++)$=o$1p.fromArray(N,3*(p-n-1),$),v=o$1p.fromArray(N,3*n,v),b$R.addAttribute(T,$,void 0,S),b$R.addAttribute(T,v,C),g=(y=C/3)-1,m=(x=(S-2)/3)+1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=y,C+=3,S-=3;o.push(C/3)}else o.push(C/3,(S-2)/3);return E[P++]=C/3,E[P++]=(S-2)/3,u.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:T}),{attributes:u,indices:E,wallIndices:o}}function de$l(e){var t=e.ellipsoid,i=re$x(b$R.computePositions(e),e.cornerType),n=i.wallIndices,r=e.height,o=e.extrudedHeight,a=i.attributes,s=i.indices,l=a.position.values,u=l.length,c=new Float64Array(u);c.set(l);var h=new Float64Array(2*u);if(l=A$1f.scaleToGeodeticHeight(l,r,t),c=A$1f.scaleToGeodeticHeight(c,o,t),h.set(l),h.set(c,u),a.position.values=h,u/=3,e$2e(e.offsetAttribute)){var d=new Uint8Array(2*u);if(e.offsetAttribute===_0x39c22a.TOP)d=d$1s(d,1,0,u);else d=d$1s(d,e.offsetAttribute===_0x39c22a.NONE?0:1);a.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}var f,p=s.length,_=ce$z.createTypedArray(h.length/3,2*(p+n.length));_.set(s);var m,g,x=p;for(f=0;f<p;f+=2){var y=s[f],v=s[f+1];_[x++]=y+u,_[x++]=v+u}for(f=0;f<n.length;f++)g=(m=n[f])+u,_[x++]=m,_[x++]=g;return{attributes:a,indices:_}}function V$z(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,i=e.width;o$1q.typeOf.object("options.positions",t),o$1q.typeOf.number("options.width",i);var n=u$Z(e.height,0),r=u$Z(e.extrudedHeight,n);this._positions=t,this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._width=i,this._height=Math.max(n,r),this._extrudedHeight=Math.min(n,r),this._cornerType=u$Z(e.cornerType,ar$6.ROUNDED),this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*o$1p.packedLength+t$12.packedLength+6}V$z.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.typeOf.object("array",t),i=u$Z(i,0);var n=e._positions,r=n.length;t[i++]=r;for(var o=0;o<r;++o,i+=o$1p.packedLength)o$1p.pack(n[o],t,i);return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i]=u$Z(e._offsetAttribute,-1),t};var oe$n=t$12.clone(t$12.UNIT_SPHERE),R$E={positions:void 0,ellipsoid:oe$n,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};function i$L(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}function d$_(e,t){var i=t.replacementPrevious,n=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=n),t===e.head?e.head=n:i.replacementNext=n,t===e.tail?e.tail=i:n.replacementPrevious=i,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}V$z.unpack=function(e,t,i){o$1q.typeOf.object("array",e),t=u$Z(t,0);for(var n=e[t++],r=new Array(n),o=0;o<n;++o,t+=o$1p.packedLength)r[o]=o$1p.unpack(e,t);var a=t$12.unpack(e,t,oe$n);t+=t$12.packedLength;var s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return e$2e(i)?(i._positions=r,i._ellipsoid=t$12.clone(a,i._ellipsoid),i._width=s,i._height=l,i._extrudedHeight=u,i._cornerType=c,i._granularity=h,i._offsetAttribute=-1===d?void 0:d,i):(R$E.positions=r,R$E.width=s,R$E.height=l,R$E.extrudedHeight=u,R$E.cornerType=c,R$E.granularity=h,R$E.offsetAttribute=-1===d?void 0:d,new V$z(R$E))},V$z.createGeometry=function(e){var t=e._positions,i=e._width,n=e._ellipsoid,r=D$13(t=ue$p(t,n),o$1p.equalsEpsilon);if(!(r.length<2||i<=0)){var o,a=e._height,s=e._extrudedHeight,l=!e$2d.equalsEpsilon(a,s,0,e$2d.EPSILON2),u={ellipsoid:n,positions:r,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1};if(l)u.height=a,u.extrudedHeight=s,u.offsetAttribute=e._offsetAttribute,o=de$l(u);else if((o=re$x(b$R.computePositions(u),u.cornerType)).attributes.position.values=A$1f.scaleToGeodeticHeight(o.attributes.position.values,a,n),e$2e(e._offsetAttribute)){var c=o.attributes.position.values.length,h=new Uint8Array(c/3);d$1s(h,e._offsetAttribute===_0x39c22a.NONE?0:1),o.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}var d=o.attributes,f=i$1d.fromVertices(d.position.values,void 0,3);return new I$1p({attributes:d,indices:o.indices,primitiveType:W$18.LINES,boundingSphere:f,offsetAttribute:e._offsetAttribute})}},i$L.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head},i$L.prototype.trimTiles=function(e,t){for(var i=this.tail,n=!0;n&&e$2e(this._lastBeforeStartOfFrame)&&this.count>e&&e$2e(i);){n=i!==this._lastBeforeStartOfFrame;var r=i.replacementPrevious;i.eligibleForUnloading&&(i.freeResources(),d$_(this,i)),i=r}for(this._lastBeforeStartOfFrame&&(i=this._lastBeforeStartOfFrame.replacementNext);t&&i;)i=i.replacementNext;for(;i;){if(i&&i.data)for(var o=i.data.imagery,a=0,s=o.length;a<s;++a){var l=o[a];l.readyImagery&&l.readyImagery.imageryLayer._imageryProvider instanceof M$S&&e$2e(l.readyImagery)&&(l.imageryLayer=l.readyImagery.imageryLayer,l.readyImagery.releaseReference(),l.readyImagery=void 0,i.state=re$A.LOADING)}i=i.replacementNext}},i$L.prototype.markTileRendered=function(e){var t=this.head;if(t!==e)return++this.count,e$2e(t)?((e$2e(e.replacementPrevious)||e$2e(e.replacementNext))&&d$_(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,void(this.head=e)):(e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,void(this.tail=e));e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext)};var De$g=-1;function et$a(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.availabilityPromiseCache={},this.subLevel=e.subLevel}function ne$u(e){if(!e$2e(e)||!e$2e(e.url))throw new t$15("options.url is required.");var t=-1;if(this._isSct=u$Z(e.isSct,!0),"string"==typeof e.url){this._baseUrl=e.url;var i=e.url;t=i.indexOf("wmts100");var n=i.substring(0,i.indexOf("/datas"));this.tablename=i.substring(i.indexOf("datas/")+6,i.length);var r=this;new l$14({name:n+this.tablename}).then((function(e){e.checkObjectStoreExit(r.tablename)?r._indexedDBScheduler=e:e.createObjectStore(r.tablename).then((function(){r._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){e$2e(r._indexedDBScheduler)&&r._indexedDBScheduler.clear(r.tablename)},cache:[]}}else this._isSct=!1;this._tilingScheme=new g$15({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid}),this._heightmapWidth=65,this._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,this._heightmapWidth,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._packingRequest=e.packingRequest,this._isBlock=!1,this._extrudeTileBoundingBox=!1,this._blockCache={},this._blockCacheQueue=new r$R,this._blockCacheSize=100,this._blockScale=0,this._subdomains=e.subdomains,this._requestVertexNormals=u$Z(e.requestVertexNormals,!1),this._requestWaterMask=u$Z(e.requestWaterMask,!1),this._requestMetadata=u$Z(e.requestMetadata,!0),this._cacheKey=u$Z(e.cacheKey,""),this._originOffset=u$Z(e.originOffset,new o$1o(0,0)),this._errorEvent=new o$1h;var o=e.credit;"string"==typeof o&&(o=new r$U(o)),this._credit=o,this._availability=void 0;var a=o$1l.defer();this._ready=!1,this._readyPromise=a,this._tileCredits=void 0,this._bounds=null,this._isCreateSkirt=u$Z(e.isCreateSkirt,!0),this._urlType=u$Z(e.urlType,Tr$4.REST),this._isShowGlobe=!0,this._isTerrainZ=!1,this._hasNormalBuffer=!1,this._currentVersion=null,this._needRefresh=!1,this._isSct&&(this._isShowGlobe=u$Z(e.isShowGlobe,!0)),this._isSkirtDirty=!1,this._customRequestHeaders=e.customRequestHeaders,this._invisibility=u$Z(e.invisibility,!1),this._visible=!0,this._offset={_x:0,_y:0,_level:0},this._enablePrjArea=u$Z(e.enablePrjArea,!1);var s,l,u;r=this;e$2e(this._subdomains)&&(i=i.replace(/({.*?})/g,(function(e,t){if(!e$2e(r._subdomains.length))throw new t$15("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?r._subdomains[0]:e})));var c=this._layers=[],h="",d=[],f=0;if(this._isSct&&-1===t){var p;if(r._hasWaterMask=!0,r._urlType===Tr$4.KEY_VALUE){var _=e.url,m=_.replace(_.substring(_.indexOf("datas")+5,_.indexOf("scene3DName")),"?");r._tileUrlTemplates=[m+"&tile1={z}&tile2={x}&tile3={y}&ext=terrainz&v=1.16389.0"],p=_}else{r._tileUrlTemplates=[e.url+"/data/path/{z}/{x}/{y}.terrain?v=1.16389.0"];var g=e.url.split("/");g[g.length-1],p=n$W(i,"config")}e$2e(a$O.CREDENTIAL)&&(p=e$2e(a$O.CREDENTIAL._keymap[r._baseUrl])?a$O.addTokenWithKey(r._baseUrl,p):a$O.addToken(p)),LicenseChecker.LICENSECHECKER.getLicense(p).then((function(e){LicenseChecker.LICENSECHECKER.check(e)})),o$1l(u$Q(p,this._customRequestHeaders),(function(t){t=t.replace("<SuperMapCache>",'<SuperMapCache xmlns:sml="http://www.supermap.com/SuperMapCache">');var i=(new s$T).read(t).documentElement;if(2===s$T.queryNumericValue(i,"Version",void 0)){var n=s$T.queryFirstNode(i,"StoreType",void 0);r._blockScale=s$T.queryNumericAttribute(n,"BlockScale",void 0),e$2e(r._blockScale)&&r._blockScale>0&&(r._isBlock=!0)}var o,a=s$T.queryStringValue(i,"FileExtentName",void 0);if(a=a.toLowerCase(),r._isTerrainZ="terrainz"===a,r._urlType===Tr$4.KEY_VALUE){var s=e.url;o=s.replace(s.substring(s.indexOf("datas")+5,s.indexOf("scene3DName")),"?"),o+="&tile1={z}&tile2={x}&tile3={y}&ext={fileExtent}&v=1.16389.0"}else o=e.url+"/data/path/{z}/{x}/{y}.{fileExtent}?v=1.16389.0";o=o.replace("{fileExtent}",a),r._tileUrlTemplates=[o];var l=s$T.queryFirstNode(i,"HeightRange",void 0),u=s$T.queryNumericValue(l,"MaxHeight",void 0),h=s$T.queryNumericValue(l,"MinHeight",void 0);r._maxHeight=u,r._minHeight=h;var f=s$T.queryFirstNode(i,"Bounds",void 0),p=s$T.queryNumericValue(f,"Left",void 0),_=s$T.queryNumericValue(f,"Right",void 0),m=s$T.queryNumericValue(f,"Bottom",void 0),g=s$T.queryNumericValue(f,"Top",void 0),x=s$T.queryFirstNode(i,"PlaneBounds",void 0);if(e$2e(x)){p>180&&(r._offset._x=Math.floor(p/180)),g>90&&(r._offset._y=Math.floor((g+90)/180));var y=t$12.WGS84.maximumRadius,v=r._offset._x*Math.PI*y,$=r._offset._y*Math.PI*y;p=s$T.queryNumericValue(x,"Left",void 0),p-=v,_=s$T.queryNumericValue(x,"Right",void 0),_-=v,m=s$T.queryNumericValue(x,"Bottom",void 0),m-=$,g=s$T.queryNumericValue(x,"Top",void 0),g-=$;var b=new o$1p(p,m,0),T=new o$1p(_,g,0),C=new n$1d,S=C.unproject(b),w=C.unproject(T);p=e$2d.toDegrees(S.longitude),_=e$2d.toDegrees(w.longitude),m=e$2d.toDegrees(S.latitude),g=e$2d.toDegrees(w.latitude),Math.abs(v)>e$2d.EPSILON1&&(o$1p.globalOffset.x=v),Math.abs($)>e$2d.EPSILON1&&(o$1p.globalOffset.y=$)}p&&_&&m&&g&&(r._bounds=new h$18(p,m,_,g),r._boundsRadians=h$18.fromDegrees(p,m,_,g));for(var E=s$T.queryFirstNode(i,"Levels",void 0),P=s$T.queryChildNodes(E,"Level",void 0),A=[],L=0,M=P.length;L<M;L++){var R=parseInt(P[L].textContent);A.push(R)}var O=s$T.queryFirstNode(i,"History",void 0);if(null!=O){var D=s$T.queryChildNodes(O,"Version",void 0),I=[];for(L=0,M=D.length;L<M;L++){R=D[L].textContent;I.push(R)}r._historyVersions=I}var F=A[0],B=A[A.length-1],N=s$T.queryFirstNode(i,"Available",void 0);if(e$2e(N)){var G=s$T.queryChildNodes(N,"TilesBounds",void 0),z=F>0?A.length+1:A.length,U=new Array(z);for(L=0;L<F;L++)U[L]=[];for(L=0,M=G.length;L<M;L++){var V=G[L],k=[];U[ie=s$T.queryNumericAttribute(V,"level",void 0)]=k;for(var W=s$T.queryChildNodes(V,"TileBounds",void 0),H=0,q=W.length;H<q;H++){var j=W[H],X=s$T.queryNumericValue(j,"StartCol",void 0),Y=s$T.queryNumericValue(j,"StartRow",void 0),Z=s$T.queryNumericValue(j,"EndCol",void 0),K=s$T.queryNumericValue(j,"EndRow",void 0);if(ie>=r._offset._level){var Q=1<<ie-r._offset._level,J=r._offset._x*Q;X-=J,Z-=J;var ee=r._offset._y*Q;Y-=ee,K-=ee}k.push({startX:X,startY:Y,endX:Z,endY:K})}}U[0]=[{startX:0,startY:0,endX:1,endY:1}];for(var te=new n$C(r._tilingScheme,B),ie=0;ie<U.length;++ie){var ne=U[ie],re=r._tilingScheme.getNumberOfYTilesAtLevel(ie);if(e$2e(d[ie])||(d[ie]=[]),e$2e(ne))for(var oe=0;oe<ne.length;++oe){var ae=ne[oe],se=re-ae.endY-1,le=re-ae.startY-1;d[ie].push([ae.startX,se,ae.endX,le]),te.addAvailableTileRange(ie,ae.startX,se,ae.endX,le)}}r._availability=te}c.push(new et$a({resource:t$10.createIfNeeded(e.url),version:"",isHeightmap:!1,tileUrlTemplates:r._tileUrlTemplates,availability:te,hasVertexNormals:!1,hasWaterMask:!0,hasMetadata:!1,availabilityLevels:0,availabilityTilesLoaded:!1,littleEndianExtensionSize:!0})),r._levels=A,r._ready=!0,r._readyPromise.resolve(!0)}),(function(){r._readyPromise.reject(!1)}))}else if(t>-1){var x=i+"/1.0.0/WMTSCapabilities.xml";r._wmtslayer=e.layer||null,r._wmtsformat=e.format||"binary",r._wmtstileMatrixSet=e.tilematrixset||null,e.blockscale>0&&(r._blockScale=1*e.blockscale,r._isBlock=!0),o$1l(u$Q(x),(function(t){var i=(new s$T).read(t).documentElement,n=s$T.queryFirstNode(i,"Contents",void 0),o=s$T.queryFirstNode(n,"Layer",void 0);r._tempLayerName=s$T.queryStringValue(o,"Title",void 0);var a=s$T.queryFirstNode(n,"TileMatrixSet",void 0);r._wmtstileMatrixSet=s$T.queryStringValue(a,"Identifier",void 0),r._tileUrlTemplates=[e.url+"?tilematrix={z}&layer="+(r._wmtslayer||r._tempLayerName)+"&tilerow={y}&tilecol={x}&tilematrixset="+r._wmtstileMatrixSet+"&service=WMTS&request=GetTile"];var s=s$T.queryFirstNode(o,"BoundingBox",void 0),l=s$T.queryStringValue(s,"LowerCorner",void 0),u=s$T.queryStringValue(s,"UpperCorner",void 0),h=l.split(" "),d=u.split(" "),f=parseFloat(h[0]),p=parseFloat(d[0]),_=parseFloat(h[1]),m=parseFloat(d[1]);f&&p&&_&&m&&(r._bounds=new h$18(f,_,p,m),r._boundsRadians=h$18.fromDegrees(f,_,p,m));var g=s$T.queryFirstNode(n,"TileMatrixSet",void 0),x=(a=s$T.queryChildNodes(g,"TileMatrix",void 0),s$T.queryNumericValue(a[0],"ScaleDenominator",void 0)),y=s$T.queryNumericValue(a[a.length-1],"ScaleDenominator",void 0),v=s$T.queryNumericValue(a[0],"Identifier",void 0);x=1/x,y=1/y;var $=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],b=$.indexOf(x),T=$.indexOf(y);for(let e=0;e<$.length;e++)x>$[e]&&$[e+1]&&x<$[e+1]&&(b=e-1),y>$[e]&&$[e+1]&&y<$[e+1]&&(T=e-1);for(var C=u$Z((b=Math.max(b,0))-v,0),S=[],w=b;w<=T;w++)S.push(w);r._isTerrainZ="terrainz",c.push(new et$a({resource:t$10.createIfNeeded(e.url),version:"",isHeightmap:!1,tileUrlTemplates:r._tileUrlTemplates,hasVertexNormals:!1,hasWaterMask:!0,hasMetadata:!1,availabilityLevels:0,availabilityTilesLoaded:!1,littleEndianExtensionSize:!0,subLevel:C})),r._levels=S,r._ready=!0,r._readyPromise.resolve(!0)}),(function(){r._readyPromise.reject(!1)}))}else o$1l(e.url).then((function(e){var t=t$10.createIfNeeded(e);t.appendForwardSlash(),l=(s=t).getDerivedResource({url:"layer.json"}),r._tileCredits=t.credits,T()})).otherwise((function(e){a.reject(e)}));function y(e){var t;if(!e.format)return t="The tile format is not specified in the layer.json file.",void(u=l$V.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T));if(!e.tiles||0===e.tiles.length)return t="The layer.json file does not specify any tile URL templates.",void(u=l$V.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T));var i=!1,n=!1,o=!1,a=!0,p=!1;if("heightmap-1.0"===e.format)p=!0,e$2e(r._heightmapStructure)||(r._heightmapStructure={heightScale:.2,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:65535}),n=!0,r._requestWaterMask=!0;else if(0!==e.format.indexOf("quantized-mesh-1."))return t='The tile format "'+e.format+'" is invalid or not supported.',void(u=l$V.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T));var _,m=e.tiles,g=e.maxzoom;f=Math.max(f,g),e$2e(e.extensions)&&-1!==e.extensions.indexOf("octvertexnormals")?i=!0:e$2e(e.extensions)&&-1!==e.extensions.indexOf("vertexnormals")&&(i=!0,a=!1),e$2e(e.extensions)&&-1!==e.extensions.indexOf("watermask")&&(n=!0),e$2e(e.extensions)&&-1!==e.extensions.indexOf("metadata")&&(o=!0);var x,$=e.metadataAvailability,b=e.available;if(e$2e(b)&&!e$2e($)){x=new n$C(r._tilingScheme,b.length);for(var C=0;C<b.length;++C){var S=b[C],w=r._tilingScheme.getNumberOfYTilesAtLevel(C);e$2e(d[C])||(d[C]=[]);for(var E=0;E<S.length;++E){var P=S[E],A=w-P.endY-1,L=w-P.startY-1;d[C].push([P.startX,A,P.endX,L]),x.addAvailableTileRange(C,P.startX,A,P.endX,L)}}}else e$2e($)&&(_=new n$C(r._tilingScheme,g),x=new n$C(r._tilingScheme,g),d[0]=[[0,0,1,0]],x.addAvailableTileRange(0,0,0,1,0));r._hasWaterMask=r._hasWaterMask||n,r._hasVertexNormals=r._hasVertexNormals||i,r._hasMetadata=r._hasMetadata||o,e$2e(e.attribution)&&(h.length>0&&(h+=" "),h+=e.attribution),c.push(new et$a({resource:s,version:e.version,isHeightmap:p,tileUrlTemplates:m,availability:x,hasVertexNormals:i,hasWaterMask:n,hasMetadata:o,availabilityLevels:$,availabilityTilesLoaded:_,littleEndianExtensionSize:a}));var M=e.parentUrl;return e$2e(M)?e$2e(x)?((s=s.getDerivedResource({url:M})).appendForwardSlash(),o$1l((l=s.getDerivedResource({url:"layer.json"})).fetchJson(),y,v)):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),o$1l.resolve()):o$1l.resolve()}function v(e){var t="An error occurred while accessing "+l.url+".";u=l$V.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T)}function $(e){y(e).then((function(){if(!e$2e(u)){var e=d.length;if(e>0)for(var t=r._availability=new n$C(r._tilingScheme,f),i=0;i<e;++i)for(var n=d[i],o=0;o<n.length;++o){var a=n[o];t.addAvailableTileRange(i,a[0],a[1],a[2],a[3])}if(h.length>0){var s=new r$U(h);e$2e(r._tileCredits)?r._tileCredits.push(s):r._tileCredits=[s]}r._ready=!0,r._readyPromise.resolve(!0)}}))}function b(e){e$2e(e)&&404===e.statusCode?$({tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]}):v()}function T(){o$1l(l.fetchJson()).then($).otherwise(b)}}var Ye$9={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4,INVALID_FLAG:127};function vt$7(e){return e$2e(e)&&0!==e.length?{Accept:"application/vnd.quantized-mesh;extensions="+e.join("-")+",application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}}function tt$9(e,t,i,n,r,o){var a=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new T$L({buffer:a,childTileMask:new Uint8Array(t,a.byteLength,1)[0],waterMask:new Uint8Array(t,a.byteLength+1,t.byteLength-a.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function We$b(e,t,i,n,r,o,a,s){var l=a.littleEndianExtensionSize,u=0,c=3*Float64Array.BYTES_PER_ELEMENT,h=4*Float64Array.BYTES_PER_ELEMENT,d=3*Uint16Array.BYTES_PER_ELEMENT,f=Uint16Array.BYTES_PER_ELEMENT,p=3*f,_=new DataView(t),m=new o$1p(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0));u+=c;var g=_.getFloat32(u,!0);u+=Float32Array.BYTES_PER_ELEMENT;var x=_.getFloat32(u,!0);u+=Float32Array.BYTES_PER_ELEMENT;var y=x,v=g,$=new i$1d(new o$1p(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0)),_.getFloat64(u+c,!0));u+=h;var b=new o$1p(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0));u+=c;var T=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var C=new Uint16Array(t,u,3*T);u+=T*d,T>65536&&(p=3*(f=Uint32Array.BYTES_PER_ELEMENT));var S=C.subarray(0,T),w=C.subarray(T,2*T),E=C.subarray(2*T,3*T);t$$.zigZagDeltaDecode(S,w,E),u%f!=0&&(u+=f-u%f);var P=_.getUint32(u,!0),A=u+=Uint32Array.BYTES_PER_ELEMENT,L=ce$z.createTypedArrayFromArrayBuffer(T,t,u,3*P);u+=P*p;for(var M=0,R=L.length,O=0;O<R;++O){var D=L[O];L[O]=M-D,0===D&&++M}var I=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var F=ce$z.createTypedArrayFromArrayBuffer(T,t,u,I);u+=I*f;var B=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var N=ce$z.createTypedArrayFromArrayBuffer(T,t,u,B);u+=B*f;var G=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var z=ce$z.createTypedArrayFromArrayBuffer(T,t,u,G);u+=G*f;var U=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var V=ce$z.createTypedArrayFromArrayBuffer(T,t,u,U);u+=U*f;var k,W,H,q,j=!1,X=!1,Y=void 0,Z=void 0;!1===e._isShowGlobe&&(0===x||u>=_.byteLength)&&(j=!0);for(var K=0;u<_.byteLength;){var Q=_.getUint8(u,!0);if(0!==Q){u+=Uint8Array.BYTES_PER_ELEMENT;var J=_.getUint32(u,l);if(u+=Uint32Array.BYTES_PER_ELEMENT,Q===Ye$9.OCT_VERTEX_NORMALS&&e._requestVertexNormals)k=new Uint8Array(t,u,2*T);else if(Q===Ye$9.WATER_MASK&&e._requestWaterMask)W=new Uint8Array(t,u,J);else if(Q===Ye$9.METADATA&&e._requestMetadata&&!e._isSct){var ee=_.getUint32(u,!0);if(ee>0){var te=a$K(new Uint8Array(t),u+Uint32Array.BYTES_PER_ELEMENT,ee),ie=JSON.parse(te).available;if(e$2e(ie))for(var ne=0;ne<ie.length;++ne)for(var re=i+ne+1,oe=ie[ne],ae=e._tilingScheme.getNumberOfYTilesAtLevel(re),se=0;se<oe.length;++se){var le=oe[se],ue=ae-le.endY-1,ce=ae-le.startY-1;e.availability.addAvailableTileRange(re,le.startX,ue,le.endX,ce),a.availability.addAvailableTileRange(re,le.startX,ue,le.endX,ce)}}a.availabilityTilesLoaded.addAvailableTileRange(i,n,r,n,r)}else if(Q===Ye$9.INVALID_FLAG){if((K=_.getUint32(u,!0))>0){var he=0,de=32767;for(O=0;O<K;O++)he=Math.max(he,E[L[O]]),de=Math.min(de,E[L[O]]);he<32767&&(y=g+(x-g)*he/32767),de>0&&(v=g+(x-g)*de/32767)}(!1===e._isShowGlobe||e$2e(s))&&(!1===e._isShowGlobe&&(0===K?j=!0:L=ce$z.createTypedArrayFromArrayBuffer(T,t,A,K)),(3*P!=K||0==K)&&(X=!0),e$2e(s)&&K>0&&(0===(Y=ce$z.createTypedArrayFromArrayBuffer(T,t,A,K)).length&&(Y=void 0)))}else if(125===Q){var fe=J/4;H=new Uint8Array(3*fe);var pe=u,_e=new o$1p;for(O=0;O<fe;O++){var me=_.getInt16(pe,!0);pe+=Int16Array.BYTES_PER_ELEMENT;var ge=_.getInt16(pe,!0);pe+=Int16Array.BYTES_PER_ELEMENT,t$$.octShortDecode(me,ge,_e),H[3*O]=255*(.5*_e.x+.5),H[3*O+1]=255*(.5*_e.y+.5),H[3*O+2]=255*(.5*_e.z+.5)}}u+=J}else u+=1}if(e$2e(Y)){Z=new Uint16Array(3*T);for(O=0;O<T;O++)Z[3*O]=C[O],Z[3*O+1]=C[T+O],Z[3*O+2]=C[2*T+O]}!1===e._isShowGlobe&&(q=0);var xe,ye,ve=e._tilingScheme.tileXYToRectangle(n,r,i);return ve.width<e$2d.PI_OVER_TWO+e$2d.EPSILON5&&(xe=y$Y.fromRectangle(ve,g,x,e._tilingScheme.ellipsoid),ye=y$Y.fromRectangle(ve,v,y,e._tilingScheme.ellipsoid)),q=e._isCreateSkirt?5*e.getLevelMaximumGeometricError(i):0,e._hasNormalBuffer=e$2e(H),new p$O({center:m,minimumHeight:g,maximumHeight:x,boundingSphere:$,orientedBoundingBox:xe,validMinimumHeight:v,validMaximumHeight:y,validOrientedBoundingBox:ye,horizonOcclusionPoint:b,quantizedVertices:C,encodedNormals:k,indices:L,westIndices:F,southIndices:N,eastIndices:z,northIndices:V,westSkirtHeight:q,southSkirtHeight:q,eastSkirtHeight:q,northSkirtHeight:q,childTileMask:e._isSct||!e$2e(e.availability)?15:e.availability.computeChildMaskForTile(i,n,r),waterMask:W,credits:e._tileCredits,normalTexture:H,invalid:j,rasterIndex:Y,rasterVertex:Z,hasInvalid:X})}function Ne$e(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function _t$6(e,t,i,n){var r=Math.min(e._blockScale,n),o=Math.pow(2,r),a=t%o;return{x:Math.floor(t/o),y:Math.floor(i/o),col:a,row:i%o,level:n,blockSize:o}}ne$u.prototype.requestTileGeometry=function(e,t,i,n,r){if(!this._ready)throw new t$15("requestTileGeometry must not be called before the terrain provider is ready.");if(0===i&&this._isSct){for(var o=new Uint16Array(12288),a=0;a<64;a++)for(var s=0;s<64;s++)o[64*a+s]=Math.floor(32767*a/63),o[4096+64*a+s]=Math.floor(32767*s/63),o[8192+64*a+s]=0;var l=new Uint16Array(23814);for(a=0;a<63;a++)for(s=0;s<63;s++)l[6*(63*a+s)]=64*a+s,l[6*(63*a+s)+1]=64*(a+1)+s+1,l[6*(63*a+s)+2]=64*a+s+1,l[6*(63*a+s)+3]=64*(a+1)+s,l[6*(63*a+s)+4]=64*(a+1)+s+1,l[6*(63*a+s)+5]=64*a+s;var u=new Uint16Array(0),c=new o$1p(NaN,-1/0,NaN),h=new o$1p(0,-3189068.5,0);1===e&&(h.y=3189068.5,c.y=1/0);var d=this;return o$1l.resolve(new p$O({center:h,minimumHeight:0,maximumHeight:0,boundingSphere:new i$1d(h,9567205.5),horizonOcclusionPoint:c,quantizedVertices:o,indices:l,westIndices:u,southIndices:u,eastIndices:u,northIndices:u,westSkirtHeight:0,southSkirtHeight:0,eastSkirtHeight:0,northSkirtHeight:0,childTileMask:d._isSct||!e$2e(d.availability)?15:d.availability.computeChildMaskForTile(i,e,t),invalid:!1,hasInvalid:!1}))}var f,p=this._layers,_=p.length;if(1===_)f=p[0];else for(a=0;a<_;++a){var m=p[a];if(!e$2e(m.availability)||m.availability.isTileAvailable(i,e,t)){f=m;break}}return yt$5(this,e,t,i,f,n,r)};var Dt$7=/({.*?})/g;function yt$5(e,t,i,n,r,o,a){if(!e$2e(r))return o$1l.reject(new t$13("Terrain tile doesn't exist"));var s=r.tileUrlTemplates;if(0!==s.length){var l=e._tilingScheme.getNumberOfYTilesAtLevel(n)-i-1,u=[];e._requestVertexNormals&&r.hasVertexNormals&&u.push(r.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&r.hasWaterMask&&u.push("watermask"),e._requestMetadata&&r.hasMetadata&&u.push("metadata");var c,h,d=s[(t+l+n)%s.length];e$2e(e._currentVersion)&&(d+="&dataVersion="+e._currentVersion),e._isSct&&0===n&&(d=n$17("Assets/Terrain/"+n+"/"+t+"/"+i+".terrain"));var f,p=r.resource;if(e$2e(p._ionEndpoint)&&!e$2e(p._ionEndpoint.externalType)?(0!==u.length&&(h={extensions:u.join("-")}),c=vt$7(void 0)):(c=vt$7(u),e$2e(e._customRequestHeaders)&&(c=p$19(c,e._customRequestHeaders))),0!==n&&(e$2e(e._packingRequest)||e._isBlock))if(e._isBlock&&e$2e(e._packingRequest)&&e._packingRequest===Z$P.QuadKey&&!a){if(o.type=U$1f.BLOCKPACK,o.throttle=!0,o.providerName=e.tablename,f=_t$6(e,t,l,n),o.quadKey=Ne$e(f.x,f.y,f.level),o.blockInfo=f,e$2e(x=e.blockCache[o.quadKey])&&e$2e(x.data))return e.blockCacheQueue.touch(x),e$2e(_=Fe$g(x.data,f))?{buffer:_,layerToUse:r,level:n,x:t,y:i,tmsY:l}:"cacheInvalid"}else if(e._packingRequest!==Z$P.QuadKey||a){if(e._isBlock){var _;if(o.type=U$1f.BLOCK,o.providerName=e.tablename,f=_t$6(e,t,l,n),o.quadKey=Ne$e(f.x,f.y,f.level),o.blockInfo=f,e$2e(x=e.blockCache[o.quadKey])&&e$2e(x.data)&&!a)return e.blockCacheQueue.touch(x),e$2e(_=Fe$g(x.data,f))?{buffer:_,layerToUse:r,level:n,x:t,y:i,tmsY:l}:"cacheInvalid";if(!0===e._indexedDBSetting.isOpen&&e$2e(e._indexedDBScheduler)&&!0===o.cacheEnable)return e$2e(v=e._indexedDBScheduler.getElementFromDB(e.tablename,o.quadKey))?v.then((function(a){if(e$2e(a)){if(a===De$g)return"cacheInvalid";var s=new e$1e(e,o.quadKey,a);e.blockCache[o.quadKey]=s;var u=Fe$g(a,f);return e$2e(u)?e._isTerrainZ&&0!==n?{buffer:u,layerToUse:r,level:n,x:t,y:i,tmsY:l}:e$2e(e._heightmapStructure)?tt$9(e,u):We$b(e,u,n,t,i,l,r):"cacheError"}return"cacheError"}),(function(e){return"cacheError"})):"cacheError"}}else o.type=U$1f.PACK,o.providerName=e.tablename,o.quadKey=Ne$e(t,l,n),o.throttle=!0;if(!e$2e(e._indexedDBSetting)||!0!==e._indexedDBSetting.isOpen||!0!==o.cacheEnable){let s=function(s){var u;if(e$2e(u=0!==e._cacheKey.length?Ot$6(s,e._cacheKey):s)){if(0!==n&&(e$2e(e._packingRequest)||e._isBlock)){if(e._isBlock&&e$2e(e._packingRequest)&&e._packingRequest===Z$P.QuadKey&&!a){!e$2e(o.quadKeyIndex)&&e$2e(o.blockRequest)&&(o.quadKeyIndex=o.blockRequest.quadKeyIndex);var c=gt$5(s,o.quadKeyIndex);e$2e(h=e.blockCache[o.quadKey])&&(h.data=s),e.blockCacheQueue.touch(h),e.blockCacheQueue.trim(e.blockCacheSize),u=Fe$g(c,o.blockInfo)}else if(e._packingRequest!==Z$P.QuadKey||a){if(e._isBlock){var h;if(!e$2e((h=e.blockCache[o.quadKey]).data)&&(h.data=s,!0===e._indexedDBSetting.isOpen&&e$2e(e._indexedDBScheduler)&&!o.cacheEnable)){var d=o.quadKey,f={blob:s.slice(0),key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname,cacheSize:5};Ge$a.scheduleTask(f,[])}e.blockCacheQueue.touch(h),e.blockCacheQueue.trim(e.blockCacheSize),u=Fe$g(s,o.blockInfo)}}else u=gt$5(s,o.quadKeyIndex);if(!e$2e(u))return;if(u===De$g){d=Ne$e(t,l,n),f={blob:De$g,key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname};return void Ge$a.scheduleTask(f,[])}}if(e$2e(e._indexedDBSetting)&&!0===e._indexedDBSetting.isOpen&&!e._isBlock&&e$2e(e._indexedDBScheduler)&&e$2e(u)){d=Ne$e(t,l,n),f={blob:u.slice(0),key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname};Ge$a.scheduleTask(f,[])}return e._isTerrainZ&&0!==n?{buffer:u,layerToUse:r,level:n,x:t,y:i,tmsY:l}:e$2e(e._heightmapStructure)?tt$9(e,u):We$b(e,u,n,t,i,l,r)}};if(e$2e(e._subdomains)&&0!==n){var m=e._subdomains,g=m[(t+i+n)%m.length];d=d.replace(Dt$7,(function(e,t){return"{s}"===t?g:e}))}var x,y;return e._isBlock?e$2e(x=e.blockCache[o.quadKey||n+""+t+i])?x.promise.then(s):(y=bt$5(p,d,r,n,t,i,l,h,c,o,e,a,f))?(x=new e$1e(e,o.quadKey||n+""+t+i),e.blockCache[o.quadKey]=x,x.promise=y,y.then(s)):void 0:(y=bt$5(p,d,r,n,t,i,l,h,c,o,e,a,f))?y.then(s):void 0}if(e$2e(e._indexedDBScheduler)){var v,$=Ne$e(t,l,n);return e$2e(v=e._indexedDBScheduler.getElementFromDB(e.tablename,$))?v.then((function(o){return e$2e(o)?o===De$g?"cacheInvalid":e._isTerrainZ&&0!==n?{buffer:o,layerToUse:r,level:n,x:t,y:i,tmsY:l}:e$2e(e._heightmapStructure)?tt$9(e,o):We$b(e,o,n,t,i,l,r):"cacheError"}),(function(e){return"cacheError"})):"cacheError"}}}function gt$5(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(t>r-1)throw new t$15("pack imagery index invalid");n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?De$g:new Uint8Array(e).slice(n,n+a).buffer;n+=a}}function Fe$g(e,t){var i=new DataView(e),n=0;i.getUint32(n,!0),n+=4;var r=i.getUint32(n,!0);n+=4;for(var o=t.col,a=t.row*t.blockSize+o,s=0,l=0,u=0;u<r;u++){if(u<a)s+=i.getUint32(n,!0);else if(u===a){l=i.getUint32(n,!0),n+=4;break}n+=4}if(n=8+4*r,0!==l)return n+=s,new Uint8Array(e).slice(n,n+l).buffer}var Ge$a=new i$W("indexedDBWorker");function bt$5(e,t,i,n,r,o,a,s,l,u,c,h,d){var f,p=t.substring(0,t.lastIndexOf("/realspace/")+10);if(e$2e(a$O.CREDENTIAL)&&(t=e$2e(a$O.CREDENTIAL._keymap[p])?a$O.addTokenWithKey(p,t):a$O.addToken(t)),e$2e(d)){var _=d.x,m=d.y;if(n>=c._offset._level){var g=1<<n-c._offset._level;_+=c._offset._x*g/d.blockSize,m+=c._offset._y*g/d.blockSize}f=e.getDerivedResource({url:t,templateValues:{version:i.version,z:n,x:_,y:m},queryParameters:s,headers:l,request:u}).fetchArrayBuffer()}else{var x=u$Z(i.subLevel,0);f=e.getDerivedResource({url:t,templateValues:{version:i.version,z:n-x,x:r,y:a},queryParameters:s,headers:l,request:u}).fetchArrayBuffer()}return f}var Pt$5=new i$W("UnZipTerrainData");ne$u.prototype.unzip=function(e){return Pt$5.scheduleTask({data:e},[e])},ne$u.prototype.createTerrainData=function(e,t,i){return We$b(this,t,e.level,e.x,e.y,e.tmsY,e.layerToUse,i)},Object.defineProperties(ne$u.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this._ready)throw new t$15("credit must not be called before the terrain provider is ready.");return this._credit}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the terrain provider is ready.");return this._tilingScheme}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){if(!this._ready)throw new t$15("hasWaterMask must not be called before the terrain provider is ready.");return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){if(!this._ready)throw new t$15("hasVertexNormals must not be called before the terrain provider is ready.");return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){if(!this._ready)throw new t$15("hasMetadata must not be called before the terrain provider is ready.");return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){if(!this._ready)throw new t$15("availability must not be called before the terrain provider is ready.");return this._availability}},isShowGlobe:{get:function(){return this._isShowGlobe}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){e$2e(e)&&"boolean"==typeof e.isOpen&&(this._indexedDBSetting.isOpen=e.isOpen)}},hasNormalBuffer:{get:function(){return this._hasNormalBuffer}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2e(e)&&!e$2e(e.length))throw new t$15("Excepted SuperMapTerrainProvider.subdomains to be type of Array.");this._subdomains=e}},currentVersion:{get:function(){return this._currentVersion},set:function(e){this._currentVersion=e,this._blockCache={},this._needRefresh=!0}},historyVersions:{get:function(){return this._historyVersions}},visible:{get:function(){return this._visible},set:function(e){this._visible=e}},extrudeTileBoundingBox:{get:function(){return this._extrudeTileBoundingBox},set:function(e){this._extrudeTileBoundingBox=e}}}),ne$u.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var Ut$6=new h$18;function rt$b(e,t,i,n){if(0!==n){var r=e.availabilityLevels,o=n%r==0?n-r:(n/r|0)*r,a=1<<n-o;return{level:o,x:t/a|0,y:i/a|0}}}function Et$6(e,t,i,n,r,o){if(!e$2e(r.availabilityLevels))return{result:!1};for(var a,s=function(){delete r.availabilityPromiseCache[a]},l=r.availabilityTilesLoaded,u=r.availability,c=rt$b(r,t,i,n);e$2e(c);){if(u.isTileAvailable(c.level,c.x,c.y)&&!l.isTileAvailable(c.level,c.x,c.y)){var h;if(!o&&(a=c.level+"-"+c.x+"-"+c.y,!e$2e(h=r.availabilityPromiseCache[a]))){var d=new r$1c({throttle:!0,throttleByServer:!0,type:U$1f.TERRAIN});e$2e(h=yt$5(e,c.x,c.y,c.level,r,d))&&(r.availabilityPromiseCache[a]=h,h.then(s))}return{result:!0,promise:h}}c=rt$b(r,c.x,c.y,c.level)}return{result:!1}}function Ot$6(e,t){var i=new Int8Array(e);for(var n=t.split("").map((function(e){return e.charCodeAt(0)})),r=0;r<n.length;r++)i[r]=i[r]^n[r];return i.buffer}ne$u.prototype.getTileDataAvailable=function(e,t,i){if(e$2e(this._availability)){if(i>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(i,e,t))return!0;if(!this._hasMetadata)return!1;for(var n=this._layers,r=n.length,o=0;o<r;++o){if(Et$6(this,e,t,i,n[o],0===o).result)return}return!1}if(this._isSct&&0!==i){if(-1!==this._levels.indexOf(i)){var a=this._tilingScheme.tileXYToRectangle(e,t,i);return e$2e(h$18.intersection(this._boundsRadians,a,Ut$6))}return!1}},ne$u.prototype.loadTileDataAvailability=function(e,t,i){if(!(!e$2e(this._availability)||i>this._availability._maximumLevel||this._availability.isTileAvailable(i,e,t))&&this._hasMetadata)for(var n=this._layers,r=n.length,o=0;o<r;++o){var a=Et$6(this,e,t,i,n[o],0===o);if(e$2e(a.promise))return a.promise}},ne$u.prototype.saveLocalCache=function(){if(e$2e(this._indexedDBSetting)&&!0===this._indexedDBSetting.isOpen&&e$2e(this._indexedDBScheduler)){var e={tablename:this.tablename,dbname:this._indexedDBScheduler.dbname};Ge$a.scheduleTask(e,[])}},ne$u._getAvailabilityTile=rt$b;var n$z,r$M="",e$Z={};function n$y(e,t){o$1q.defined("endpoint",e),o$1q.defined("endpointResource",t);var i,n=e.externalType,r=e$2e(n);if(r){if("3DTILES"!==n&&"STK_TERRAIN_SERVER"!==n)throw new t$13("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");i={url:e.options.url}}else i={url:e.url,retryAttempts:1,retryCallback:_$D};t$10.call(this,i),this._ionEndpoint=e,this._ionEndpointDomain=r?void 0:new h$16(e.url).authority,this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=r}function _$D(e,t){var i=u$Z(e._ionRoot,e),n=i._ionEndpointResource;return e$2e(t)&&(401===t.statusCode||t.target instanceof Image)?(e$2e(i._pendingPromise)||(i._pendingPromise=n.fetchJson().then((function(e){return i._ionEndpoint=e,e})).always((function(e){return i._pendingPromise=void 0,e}))),i._pendingPromise.then((function(t){return e._ionEndpoint=t,!0}))):o$1l.resolve(!1)}function u$G(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),new ne$u({url:n$y.fromAssetId(1),requestVertexNormals:u$Z(e.requestVertexNormals,!1),requestWaterMask:u$Z(e.requestWaterMask,!1)})}e$Z.defaultAccessToken=r$M,e$Z.defaultServer=new t$10({url:""}),e$Z.getDefaultTokenCredit=function(e){if(e===r$M){if(!e$2e(n$z)){n$z=new r$U("<b> This application is using SuperMap3D's default ion access token. Please assign <i>SuperMap3D.Ion.defaultAccessToken</i> with an access token from your ion account before making any SuperMap3D API calls. You can sign up for a free ion account at .</b>",!0)}return n$z}},e$2e(Object.create)&&(n$y.prototype=Object.create(t$10.prototype),n$y.prototype.constructor=n$y),n$y.fromAssetId=function(e,t){var i=n$y._createEndpointResource(e,t);return i.fetchJson().then((function(e){return new n$y(e,i)}))},Object.defineProperties(n$y.prototype,{credits:{get:function(){return e$2e(this._ionRoot)?this._ionRoot.credits:(e$2e(this._credits)||(this._credits=n$y.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource)),this._credits)}}}),n$y.getCreditsFromEndpoint=function(e,t){var i=e.attributions.map(r$U.getIonCredit),n=e$Z.getDefaultTokenCredit(t.queryParameters.access_token);return e$2e(n)&&i.push(r$U.clone(n)),i},n$y.prototype.clone=function(e){var t=u$Z(this._ionRoot,this);return e$2e(e)||(e=new n$y(t._ionEndpoint,t._ionEndpointResource)),(e=t$10.prototype.clone.call(this,e))._ionRoot=t,e._isExternal=this._isExternal,e},n$y.prototype.fetchImage=function(e){if(!this._isExternal){var t=e;e={preferBlob:!0},e$2e(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return t$10.prototype.fetchImage.call(this,e)},n$y.prototype._makeRequest=function(e){return this._isExternal||new h$16(this.url).authority!==this._ionEndpointDomain||(e$2e(e.headers)||(e.headers={}),e.headers.Authorization="Bearer "+this._ionEndpoint.accessToken),t$10.prototype._makeRequest.call(this,e)},n$y._createEndpointResource=function(e,t){o$1q.defined("assetId",e),t=u$Z(t,u$Z.EMPTY_OBJECT);var i=u$Z(t.server,e$Z.defaultServer),n=u$Z(t.accessToken,e$Z.defaultAccessToken);i=t$10.createIfNeeded(i);var r={url:"v1/assets/"+e+"/endpoint"};return e$2e(n)&&(r.queryParameters={access_token:n}),i.getDerivedResource(r)};var Pa$1=function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]},Y$x=1,tt$8=2,wa$1=4,Ot$5=5,ot$5=484813681109536e-20,m$K=Math.PI/2,Sa$1=.16666666666666666,Ia$2=.04722222222222222,Ra$2=.022156084656084655,_$C=1e-10,$$E=.017453292519943295,H$K=57.29577951308232,w$G=Math.PI/4,qt$5=2*Math.PI,R$D=3.14159265359,z$I={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},Oa$1={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},Ft$6=/[\s_\-\/\(\)]/g;function X$D(e,t){if(e[t])return e[t];for(var i,n=Object.keys(e),r=t.toLowerCase().replace(Ft$6,""),o=-1;++o<n.length;)if((i=n[o]).toLowerCase().replace(Ft$6,"")===r)return e[i]}var Tt$5=function(e){var t,i,n,r={},o=e.split("+").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var i=t.split("=");return i.push(!0),e[i[0].toLowerCase()]=i[1],e}),{}),a={proj:"projName",datum:"datumCode",rf:function(e){r.rf=parseFloat(e)},lat_0:function(e){r.lat0=e*$$E},lat_1:function(e){r.lat1=e*$$E},lat_2:function(e){r.lat2=e*$$E},lat_ts:function(e){r.lat_ts=e*$$E},lon_0:function(e){r.long0=e*$$E},lon_1:function(e){r.long1=e*$$E},lon_2:function(e){r.long2=e*$$E},alpha:function(e){r.alpha=parseFloat(e)*$$E},lonc:function(e){r.longc=e*$$E},x_0:function(e){r.x0=parseFloat(e)},y_0:function(e){r.y0=parseFloat(e)},k_0:function(e){r.k0=parseFloat(e)},k:function(e){r.k0=parseFloat(e)},a:function(e){r.a=parseFloat(e)},b:function(e){r.b=parseFloat(e)},r_a:function(){r.R_A=!0},zone:function(e){r.zone=parseInt(e,10)},south:function(){r.utmSouth=!0},towgs84:function(e){r.datum_params=e.split(",").map((function(e){return parseFloat(e)}))},to_meter:function(e){r.to_meter=parseFloat(e)},units:function(e){r.units=e;var t=X$D(Oa$1,e);t&&(r.to_meter=t.to_meter)},from_greenwich:function(e){r.from_greenwich=e*$$E},pm:function(e){var t=X$D(z$I,e);r.from_greenwich=(t||parseFloat(e))*$$E},nadgrids:function(e){"@null"===e?r.datumCode="none":r.nadgrids=e},axis:function(e){var t="ewnsud";3===e.length&&-1!==t.indexOf(e.substr(0,1))&&-1!==t.indexOf(e.substr(1,1))&&-1!==t.indexOf(e.substr(2,1))&&(r.axis=e)}};for(t in o)i=o[t],t in a?"function"==typeof(n=a[t])?n(i):r[n]=i:r[t]=i;return"string"==typeof r.datumCode&&"WGS84"!==r.datumCode&&(r.datumCode=r.datumCode.toLowerCase()),r},lt$2=1,jt$3=2,Qt$4=3,xt$5=4,Wt$6=5,$t$2=-1,qa$2=/\s/,Ta$2=/[A-Za-z]/,$a$2=/[A-Za-z84]/,bt$4=/[,\]]/,Ht$4=/[\d\.E\-\+]/;function Q$G(e){if("string"!=typeof e)throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=lt$2}function La$2(e){return new Q$G(e).output()}function Xt$2(e,t,i){Array.isArray(t)&&(i.unshift(t),t=null);var n=t?{}:e,r=i.reduce((function(e,t){return at$8(t,e),e}),n);t&&(e[t]=r)}function at$8(e,t){if(Array.isArray(e)){var i=e.shift();if("PARAMETER"===i&&(i=e.shift()),1===e.length)return Array.isArray(e[0])?(t[i]={},void at$8(e[0],t[i])):void(t[i]=e[0]);if(e.length)if("TOWGS84"!==i){if("AXIS"===i)return i in t||(t[i]=[]),void t[i].push(e);var n;switch(Array.isArray(i)||(t[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return t[i]={name:e[0].toLowerCase(),convert:e[1]},void(3===e.length&&at$8(e[2],t[i]));case"SPHEROID":case"ELLIPSOID":return t[i]={name:e[0],a:e[1],rf:e[2]},void(4===e.length&&at$8(e[3],t[i]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return e[0]=["name",e[0]],void Xt$2(t,i,e);default:for(n=-1;++n<e.length;)if(!Array.isArray(e[n]))return at$8(e,t[i]);return Xt$2(t,i,e)}}else t[i]=e;else t[i]=!0}else t[e]=!0}Q$G.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==xt$5)for(;qa$2.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case lt$2:return this.neutral(e);case jt$3:return this.keyword(e);case xt$5:return this.quoted(e);case Wt$6:return this.afterquote(e);case Qt$4:return this.number(e);case $t$2:return}},Q$G.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=xt$5);if(bt$4.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},Q$G.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=lt$2)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=lt$2,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=$t$2))):void 0},Q$G.prototype.number=function(e){if(!Ht$4.test(e)){if(bt$4.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},Q$G.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=Wt$6},Q$G.prototype.keyword=function(e){if($a$2.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=lt$2)}if(!bt$4.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},Q$G.prototype.neutral=function(e){if(Ta$2.test(e))return this.word=e,void(this.state=jt$3);if('"'===e)return this.word="",void(this.state=xt$5);if(Ht$4.test(e))return this.word=e,void(this.state=Qt$4);if(!bt$4.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},Q$G.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===$t$2)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var Ga$2=.017453292519943295;function za$2(e,t){var i=t[0],n=t[1];!(i in e)&&n in e&&(e[i]=e[n],3===t.length&&(e[i]=t[2](e[i])))}function W$J(e){return e*Ga$2}function Da$2(e){if("GEOGCS"===e.type?e.projName="longlat":"LOCAL_CS"===e.type?(e.projName="identity",e.local=!0):"object"==typeof e.PROJECTION?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",i=0,n=e.AXIS.length;i<n;++i){var r=e.AXIS[i][0].toLowerCase();-1!==r.indexOf("north")?t+="n":-1!==r.indexOf("south")?t+="s":-1!==r.indexOf("east")?t+="e":-1!==r.indexOf("west")&&(t+="w")}2===t.length&&(t+="u"),3===t.length&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.UNIT.convert&&("GEOGCS"===e.type?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var o=e.GEOGCS;function a(t){return t*(e.to_meter||1)}"GEOGCS"===e.type&&(o=e),o&&(o.DATUM?e.datumCode=o.DATUM.name.toLowerCase():e.datumCode=o.name.toLowerCase(),"d_"===e.datumCode.slice(0,2)&&(e.datumCode=e.datumCode.slice(2)),("new_zealand_geodetic_datum_1949"===e.datumCode||"new_zealand_1949"===e.datumCode)&&(e.datumCode="nzgd49"),("wgs_1984"===e.datumCode||"world_geodetic_system_1984"===e.datumCode)&&("Mercator_Auxiliary_Sphere"===e.PROJECTION&&(e.sphere=!0),e.datumCode="wgs84"),"_ferro"===e.datumCode.slice(-6)&&(e.datumCode=e.datumCode.slice(0,-6)),"_jakarta"===e.datumCode.slice(-8)&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(e.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===e.ellps.toLowerCase().slice(0,13)&&(e.ellps="intl"),e.a=o.DATUM.SPHEROID.a,e.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(e.datum_params=o.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),"ch1903+"===e.datumCode&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a);[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",W$J],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",W$J],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",W$J],["lat0","latitude_of_origin",W$J],["lat0","standard_parallel_1",W$J],["lat1","standard_parallel_1",W$J],["lat2","standard_parallel_2",W$J],["azimuth","Azimuth"],["alpha","azimuth",W$J],["srsCode","name"]].forEach((function(t){return za$2(e,t)})),!e.long0&&e.longc&&("Albers_Conic_Equal_Area"===e.projName||"Lambert_Azimuthal_Equal_Area"===e.projName)&&(e.long0=e.longc),!e.lat_ts&&e.lat1&&("Stereographic_South_Pole"===e.projName||"Polar Stereographic (variant B)"===e.projName)&&(e.lat0=W$J(e.lat1>0?90:-90),e.lat_ts=e.lat1)}var Kt$4=function(e){var t=La$2(e),i=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",i]);var r={};return at$8(t,r),Da$2(r),r};function L$Q(e){var t=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?L$Q[e]=Tt$5(arguments[1]):L$Q[e]=Kt$4(arguments[1]):L$Q[e]=i}else if(1===arguments.length){if(Array.isArray(e))return e.map((function(e){Array.isArray(e)?L$Q.apply(t,e):L$Q(e)}));if("string"==typeof e){if(e in L$Q)return L$Q[e]}else"EPSG"in e?L$Q["EPSG:"+e.EPSG]=e:"ESRI"in e?L$Q["ESRI:"+e.ESRI]=e:"IAU2000"in e?L$Q["IAU2000:"+e.IAU2000]=e:console.log(e);return}}function ka$1(e){return"string"==typeof e}function pa$1(e){return e in L$Q}Pa$1(L$Q);var Ua$2=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Ba$2(e){return Ua$2.some((function(t){return e.indexOf(t)>-1}))}var Fa$2=["3857","900913","3785","102113"];function ja$1(e){var t=X$D(e,"authority");if(t){var i=X$D(t,"epsg");return i&&Fa$2.indexOf(i)>-1}}function Qa$2(e){var t=X$D(e,"extension");if(t)return X$D(t,"proj4")}function Wa$1(e){return"+"===e[0]}function Ha$1(e){if(!ka$1(e))return e;if(pa$1(e))return L$Q[e];if(Ba$2(e)){var t=Kt$4(e);if(ja$1(t))return L$Q["EPSG:3857"];var i=Qa$2(t);return i?Tt$5(i):t}return Wa$1(e)?Tt$5(e):void 0}var Jt$3=function(e,t){var i,n;if(e=e||{},!t)return e;for(n in t)void 0!==(i=t[n])&&(e[n]=i);return e},F$J=function(e,t,i){var n=e*t;return i/Math.sqrt(1-n*n)},ft$5=function(e){return e<0?-1:1},g$N=function(e){return Math.abs(e)<=R$D?e:e-ft$5(e)*qt$5},U$J=function(e,t,i){var n=e*i,r=.5*e;return n=Math.pow((1-n)/(1+n),r),Math.tan(.5*(m$K-t))/n},Mt$5=function(e,t){for(var i,n,r=.5*e,o=m$K-2*Math.atan(t),a=0;a<=15;a++)if(i=e*Math.sin(o),o+=n=m$K-2*Math.atan(t*Math.pow((1-i)/(1+i),r))-o,Math.abs(n)<=1e-10)return o;return-9999};function Xa$2(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=F$J(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Ka$2(e){var t,i,n=e.x,r=e.y;if(r*H$K>90&&r*H$K<-90&&n*H$K>180&&n*H$K<-180)return null;if(Math.abs(Math.abs(r)-m$K)<=_$C)return null;if(this.sphere)t=this.x0+this.a*this.k0*g$N(n-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(w$G+.5*r));else{var o=Math.sin(r),a=U$J(this.e,r,o);t=this.x0+this.a*this.k0*g$N(n-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=i,e}function Ja$2(e){var t,i,n=e.x-this.x0,r=e.y-this.y0;if(this.sphere)i=m$K-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var o=Math.exp(-r/(this.a*this.k0));if(-9999===(i=Mt$5(this.e,o)))return null}return t=g$N(this.long0+n/(this.a*this.k0)),e.x=t,e.y=i,e}var Za$2=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],Va$1={init:Xa$2,forward:Ka$2,inverse:Ja$2,names:Za$2};function Ya$2(){}function Zt$2(e){return e}var ts=["longlat","identity"],as={init:Ya$2,forward:Zt$2,inverse:Zt$2,names:ts},ss=[Va$1,as],Ct$4={},Et$5=[];function Vt$6(e,t){var i=Et$5.length;return e.names?(Et$5[i]=e,e.names.forEach((function(e){Ct$4[e.toLowerCase()]=i})),this):(console.log(t),!0)}function is(e){if(!e)return!1;var t=e.toLowerCase();return typeof Ct$4[t]<"u"&&Et$5[Ct$4[t]]?Et$5[Ct$4[t]]:void 0}function hs(){ss.forEach(Vt$6)}var es={start:hs,add:Vt$6,get:is},b$Q={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},rs=b$Q.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};function ns(e,t,i,n){var r=e*e,o=t*t,a=(r-o)/r,s=0;return n?(r=(e*=1-a*(Sa$1+a*(Ia$2+a*Ra$2)))*e,a=0):s=Math.sqrt(a),{es:a,e:s,ep2:(r-o)/o}}function os(e,t,i,n,r){if(!e){var o=X$D(b$Q,n);o||(o=rs),e=o.a,t=o.b,i=o.rf}return i&&!t&&(t=(1-1/i)*e),(0===i||Math.abs(e-t)<_$C)&&(r=!0,t=e),{a:e,b:t,rf:i,sphere:r}}b$Q.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var q$L={};function ls(e,t,i,n,r,o){var a={};return a.datum_type=void 0===e||"none"===e?Ot$5:wa$1,t&&(a.datum_params=t.map(parseFloat),(0!==a.datum_params[0]||0!==a.datum_params[1]||0!==a.datum_params[2])&&(a.datum_type=Y$x),a.datum_params.length>3&&(0!==a.datum_params[3]||0!==a.datum_params[4]||0!==a.datum_params[5]||0!==a.datum_params[6])&&(a.datum_type=tt$8,a.datum_params[3]*=ot$5,a.datum_params[4]*=ot$5,a.datum_params[5]*=ot$5,a.datum_params[6]=a.datum_params[6]/1e6+1)),a.a=i,a.b=n,a.es=r,a.ep2=o,a}function j$F(e,t){if(!(this instanceof j$F))return new j$F(e);t=t||function(e){if(e)throw e};var i=Ha$1(e);if("object"==typeof i){var n=j$F.projections.get(i.projName);if(n){if(i.datumCode&&"none"!==i.datumCode){var r=X$D(q$L,i.datumCode);r&&(i.datum_params=r.towgs84?r.towgs84.split(","):null,i.ellps=r.ellipse,i.datumName=r.datumName?r.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84";var o=os(i.a,i.b,i.rf,i.ellps,i.sphere),a=ns(o.a,o.b,o.rf,i.R_A),s=i.datum||ls(i.datumCode,i.datum_params,o.a,o.b,a.es,a.ep2);Jt$3(this,i),Jt$3(this,n),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=s,this.init(),t(null,this)}else t(e)}else t(e)}function fs(e,t){return!(e.datum_type!==t.datum_type||e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===Y$x?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==tt$8||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}function Yt$3(e,t,i){var n,r,o,a,s=e.x,l=e.y,u=e.z?e.z:0;if(l<-m$K&&l>-1.001*m$K)l=-m$K;else if(l>m$K&&l<1.001*m$K)l=m$K;else{if(l<-m$K)return{x:-1/0,y:-1/0,z:e.z};if(l>m$K)return{x:1/0,y:1/0,z:e.z}}return s>Math.PI&&(s-=2*Math.PI),r=Math.sin(l),a=Math.cos(l),o=r*r,{x:((n=i/Math.sqrt(1-t*o))+u)*a*Math.cos(s),y:(n+u)*a*Math.sin(s),z:(n*(1-t)+u)*r}}function ta$3(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y=1e-12,v=e.x,$=e.y,b=e.z?e.z:0;if(r=Math.sqrt(v*v+$*$),o=Math.sqrt(v*v+$*$+b*b),r/i<y){if(g=0,o/i<y)return m$K,x=-n,{x:e.x,y:e.y,z:e.z}}else g=Math.atan2($,v);a=b/o,h=(s=r/o)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*s*s)),d=a*l,m=0;do{m++,u=t*(c=i/Math.sqrt(1-t*d*d))/(c+(x=r*h+b*d-c*(1-t*d*d))),_=(p=a*(l=1/Math.sqrt(1-u*(2-u)*s*s)))*h-(f=s*(1-u)*l)*d,h=f,d=p}while(_*_>1e-24&&m<30);return{x:g,y:Math.atan(p/Math.abs(f)),z:x}}function Ms(e,t,i){if(t===Y$x)return{x:e.x+i[0],y:e.y+i[1],z:e.z+i[2]};if(t===tt$8){var n=i[0],r=i[1],o=i[2],a=i[3],s=i[4],l=i[5],u=i[6];return{x:u*(e.x-l*e.y+s*e.z)+n,y:u*(l*e.x+e.y-a*e.z)+r,z:u*(-s*e.x+a*e.y+e.z)+o}}}function vs(e,t,i){if(t===Y$x)return{x:e.x-i[0],y:e.y-i[1],z:e.z-i[2]};if(t===tt$8){var n=i[0],r=i[1],o=i[2],a=i[3],s=i[4],l=i[5],u=i[6],c=(e.x-n)/u,h=(e.y-r)/u,d=(e.z-o)/u;return{x:c+l*h-s*d,y:-l*c+h+a*d,z:s*c-a*h+d}}}function At$5(e){return e===Y$x||e===tt$8}q$L.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},q$L.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},q$L.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},q$L.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},q$L.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},q$L.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},q$L.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},q$L.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},q$L.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},q$L.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},q$L.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},q$L.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},q$L.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},q$L.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},q$L.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},q$L.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},q$L.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},j$F.projections=es,j$F.projections.start();var us=function(e,t,i){return fs(e,t)||e.datum_type===Ot$5||t.datum_type===Ot$5||e.es===t.es&&e.a===t.a&&!At$5(e.datum_type)&&!At$5(t.datum_type)?i:(i=Yt$3(i,e.es,e.a),At$5(e.datum_type)&&(i=Ms(i,e.datum_type,e.datum_params)),At$5(t.datum_type)&&(i=vs(i,t.datum_type,t.datum_params)),ta$3(i,t.es,t.a,t.b))},aa$4=function(e,t,i){var n,r,o,a=i.x,s=i.y,l=i.z||0,u={};for(o=0;o<3;o++)if(!t||2!==o||void 0!==i.z)switch(0===o?(n=a,r=-1!=="ew".indexOf(e.axis[o])?"x":"y"):1===o?(n=s,r=-1!=="ns".indexOf(e.axis[o])?"y":"x"):(n=l,r="z"),e.axis[o]){case"e":case"w":case"n":case"s":u[r]=n;break;case"u":void 0!==i[r]&&(u.z=n);break;case"d":void 0!==i[r]&&(u.z=-n);break;default:return null}return u},sa$3=function(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t},cs=function(e){ia$3(e.x),ia$3(e.y)};function ia$3(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function ms(e,t){return(e.datum.datum_type===Y$x||e.datum.datum_type===tt$8)&&"WGS84"!==t.datumCode||(t.datum.datum_type===Y$x||t.datum.datum_type===tt$8)&&"WGS84"!==e.datumCode}function Nt$6(e,t,i){var n;return Array.isArray(i)&&(i=sa$3(i)),cs(i),e.datum&&t.datum&&ms(e,t)&&(i=Nt$6(e,n=new j$F("WGS84"),i),e=n),"enu"!==e.axis&&(i=aa$4(e,!1,i)),"longlat"===e.projName?i={x:i.x*$$E,y:i.y*$$E,z:i.z||0}:(e.to_meter&&(i={x:i.x*e.to_meter,y:i.y*e.to_meter,z:i.z||0}),i=e.inverse(i)),e.from_greenwich&&(i.x+=e.from_greenwich),i=us(e.datum,t.datum,i),t.from_greenwich&&(i={x:i.x-t.from_greenwich,y:i.y,z:i.z||0}),"longlat"===t.projName?i={x:i.x*H$K,y:i.y*H$K,z:i.z||0}:(i=t.forward(i),t.to_meter&&(i={x:i.x/t.to_meter,y:i.y/t.to_meter,z:i.z||0})),"enu"!==t.axis?aa$4(t,!0,i):i}var ha$3=j$F("WGS84");function Lt$4(e,t,i){var n,r,o;return Array.isArray(i)?(n=Nt$6(e,t,i)||{x:NaN,y:NaN},i.length>2?typeof e.name<"u"&&"geocent"===e.name||typeof t.name<"u"&&"geocent"===t.name?"number"==typeof n.z?[n.x,n.y,n.z].concat(i.splice(3)):[n.x,n.y,i[2]].concat(i.splice(3)):[n.x,n.y].concat(i.splice(2)):[n.x,n.y]):(r=Nt$6(e,t,i),2===(o=Object.keys(i)).length||o.forEach((function(n){if(typeof e.name<"u"&&"geocent"===e.name||typeof t.name<"u"&&"geocent"===t.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;r[n]=i[n]})),r)}function ea$5(e){return e instanceof j$F?e:e.oProj?e.oProj:j$F(e)}function k$D(e,t,i){e=ea$5(e);var n,r=!1;return typeof t>"u"?(t=e,e=ha$3,r=!0):(typeof t.x<"u"||Array.isArray(t))&&(i=t,t=e,e=ha$3,r=!0),t=ea$5(t),i?Lt$4(e,t,i):(n={forward:function(i){return Lt$4(e,t,i)},inverse:function(i){return Lt$4(t,e,i)}},r&&(n.oProj=t),n)}var ra$4=6,na$3="AJSAJS",oa$4="AFAFAF",st$4=65,D$E=73,p$M=79,vt$6=86,ut$7=90,ds={forward:la$3,inverse:ys,toPoint:fa$2};function la$3(e,t){return t=t||5,xs(_s({lat:e[1],lon:e[0]}),t)}function ys(e){var t=zt$4(ua$2(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function fa$2(e){var t=zt$4(ua$2(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Gt$4(e){return e*(Math.PI/180)}function Ma$2(e){return e/Math.PI*180}function _s(e){var t,i,n,r,o,a,s,l=e.lat,u=e.lon,c=6378137,h=.00669438,d=.9996,f=Gt$4(l),p=Gt$4(u);s=Math.floor((u+180)/6)+1,180===u&&(s=60),l>=56&&l<64&&u>=3&&u<12&&(s=32),l>=72&&l<84&&(u>=0&&u<9?s=31:u>=9&&u<21?s=33:u>=21&&u<33?s=35:u>=33&&u<42&&(s=37)),a=Gt$4(6*(s-1)-180+3),t=h/(1-h),i=c/Math.sqrt(1-h*Math.sin(f)*Math.sin(f)),n=Math.tan(f)*Math.tan(f),r=t*Math.cos(f)*Math.cos(f);var _=d*i*((o=Math.cos(f)*(p-a))+(1-n+r)*o*o*o/6+(5-18*n+n*n+72*r-58*t)*o*o*o*o*o/120)+5e5,m=d*(c*(.9983242984503243*f-.002514607064228144*Math.sin(2*f)+2639046602129982e-21*Math.sin(4*f)-35*h*h*h/3072*Math.sin(6*f))+i*Math.tan(f)*(o*o/2+(5-n+9*r+4*r*r)*o*o*o*o/24+(61-58*n+n*n+600*r-330*t)*o*o*o*o*o*o/720));return l<0&&(m+=1e7),{northing:Math.round(m),easting:Math.round(_),zoneNumber:s,zoneLetter:gs(l)}}function zt$4(e){var t=e.northing,i=e.easting,n=e.zoneLetter,r=e.zoneNumber;if(r<0||r>60)return null;var o,a,s,l,u,c,h,d,f,p=.9996,_=6378137,m=.00669438,g=(1-Math.sqrt(1-m))/(1+Math.sqrt(1-m)),x=i-5e5,y=t;n<"N"&&(y-=1e7),h=6*(r-1)-180+3,o=m/(1-m),f=(d=y/p/6367449.145945056)+(3*g/2-27*g*g*g/32)*Math.sin(2*d)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*d)+151*g*g*g/96*Math.sin(6*d),a=_/Math.sqrt(1-m*Math.sin(f)*Math.sin(f)),s=Math.tan(f)*Math.tan(f),l=o*Math.cos(f)*Math.cos(f),u=_*(1-m)/Math.pow(1-m*Math.sin(f)*Math.sin(f),1.5),c=x/(a*p);var v=f-a*Math.tan(f)/u*(c*c/2-(5+3*s+10*l-4*l*l-9*o)*c*c*c*c/24+(61+90*s+298*l+45*s*s-252*o-3*l*l)*c*c*c*c*c*c/720);v=Ma$2(v);var $,b=(c-(1+2*s+l)*c*c*c/6+(5-2*l+28*s-3*l*l+8*o+24*s*s)*c*c*c*c*c/120)/Math.cos(f);if(b=h+Ma$2(b),e.accuracy){var T=zt$4({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});$={top:T.lat,right:T.lon,bottom:v,left:b}}else $={lat:v,lon:b};return $}function gs(e){var t="Z";return 84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C"),t}function xs(e,t){var i="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+bs(e.easting,e.northing,e.zoneNumber)+i.substr(i.length-5,t)+n.substr(n.length-5,t)}function bs(e,t,i){var n=va$1(i);return Cs(Math.floor(e/1e5),Math.floor(t/1e5)%20,n)}function va$1(e){var t=e%ra$4;return 0===t&&(t=ra$4),t}function Cs(e,t,i){var n=i-1,r=na$3.charCodeAt(n),o=oa$4.charCodeAt(n),a=r+e-1,s=o+t,l=!1;return a>ut$7&&(a=a-ut$7+st$4-1,l=!0),(a===D$E||r<D$E&&a>D$E||(a>D$E||r<D$E)&&l)&&a++,(a===p$M||r<p$M&&a>p$M||(a>p$M||r<p$M)&&l)&&(++a===D$E&&a++),a>ut$7&&(a=a-ut$7+st$4-1),s>vt$6?(s=s-vt$6+st$4-1,l=!0):l=!1,(s===D$E||o<D$E&&s>D$E||(s>D$E||o<D$E)&&l)&&s++,(s===p$M||o<p$M&&s>p$M||(s>p$M||o<p$M)&&l)&&(++s===D$E&&s++),s>vt$6&&(s=s-vt$6+st$4-1),String.fromCharCode(a)+String.fromCharCode(s)}function ua$2(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,i=e.length,n=null,r="",o=0;!/[A-Z]/.test(t=e.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+e;r+=t,o++}var a=parseInt(r,10);if(0===o||o+3>i)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(o++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+e;n=e.substring(o,o+=2);for(var l=va$1(a),u=Es(n.charAt(0),l),c=As(n.charAt(1),l);c<Ns(s);)c+=2e6;var h=i-o;if(h%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+e;var d,f,p,_=h/2,m=0,g=0;return _>0&&(d=1e5/Math.pow(10,_),f=e.substring(o,o+_),m=parseFloat(f)*d,p=e.substring(o+_),g=parseFloat(p)*d),{easting:m+u,northing:g+c,zoneLetter:s,zoneNumber:a,accuracy:d}}function Es(e,t){for(var i=na$3.charCodeAt(t-1),n=1e5,r=!1;i!==e.charCodeAt(0);){if(++i===D$E&&i++,i===p$M&&i++,i>ut$7){if(r)throw"Bad character: "+e;i=st$4,r=!0}n+=1e5}return n}function As(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var i=oa$4.charCodeAt(t-1),n=0,r=!1;i!==e.charCodeAt(0);){if(++i===D$E&&i++,i===p$M&&i++,i>vt$6){if(r)throw"Bad character: "+e;i=st$4,r=!0}n+=1e5}return n}function Ns(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function it$5(e,t,i){if(!(this instanceof it$5))return new it$5(e,t,i);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&typeof t>"u"){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}it$5.fromMGRS=function(e){return new it$5(fa$2(e))},it$5.prototype.toMGRS=function(e){return la$3([this.x,this.y],e)};var Ps=1,ws=.25,ca$1=.046875,ma$2=.01953125,da=.01068115234375,Ss=.75,Is=.46875,Rs=.013020833333333334,Os=.007120768229166667,qs=.3645833333333333,Ts=.005696614583333333,$s=.3076171875,ya$1=function(e){var t=[];t[0]=Ps-e*(ws+e*(ca$1+e*(ma$2+e*da))),t[1]=e*(Ss-e*(ca$1+e*(ma$2+e*da)));var i=e*e;return t[2]=i*(Is-e*(Rs+e*Os)),i*=e,t[3]=i*(qs-e*Ts),t[4]=i*e*$s,t},Pt$4=function(e,t,i,n){return i*=t,t*=t,n[0]*e-i*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))},Ls=20,_a$2=function(e,t,i){for(var n=1/(1-t),r=e,o=Ls;o;--o){var a=Math.sin(r),s=1-t*a*a;if(r-=s=(Pt$4(r,a,Math.cos(r),i)-e)*(s*Math.sqrt(s))*n,Math.abs(s)<_$C)return r}return r};function Gs(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=ya$1(this.es),this.ml0=Pt$4(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function zs(e){var t,i,n,r=e.x,o=e.y,a=g$N(r-this.long0),s=Math.sin(o),l=Math.cos(o);if(this.es){var u=l*a,c=Math.pow(u,2),h=this.ep2*Math.pow(l,2),d=Math.pow(h,2),f=Math.abs(l)>_$C?Math.tan(o):0,p=Math.pow(f,2),_=Math.pow(p,2);t=1-this.es*Math.pow(s,2),u/=Math.sqrt(t);var m=Pt$4(o,s,l,this.en);i=this.a*(this.k0*u*(1+c/6*(1-p+h+c/20*(5-18*p+_+14*h-58*p*h+c/42*(61+179*_-_*p-479*p)))))+this.x0,n=this.a*(this.k0*(m-this.ml0+s*a*u/2*(1+c/12*(5-p+9*h+4*d+c/30*(61+_-58*p+270*h-330*p*h+c/56*(1385+543*_-_*p-3111*p))))))+this.y0}else{var g=l*Math.sin(a);if(Math.abs(Math.abs(g)-1)<_$C)return 93;if(i=.5*this.a*this.k0*Math.log((1+g)/(1-g))+this.x0,n=l*Math.cos(a)/Math.sqrt(1-Math.pow(g,2)),(g=Math.abs(n))>=1){if(g-1>_$C)return 93;n=0}else n=Math.acos(n);o<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return e.x=i,e.y=n,e}function Ds(e){var t,i,n,r,o=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,i=_a$2(t,this.es,this.en),Math.abs(i)<m$K){var s=Math.sin(i),l=Math.cos(i),u=Math.abs(l)>_$C?Math.tan(i):0,c=this.ep2*Math.pow(l,2),h=Math.pow(c,2),d=Math.pow(u,2),f=Math.pow(d,2);t=1-this.es*Math.pow(s,2);var p=o*Math.sqrt(t)/this.k0,_=Math.pow(p,2);n=i-(t*=u)*_/(1-this.es)*.5*(1-_/12*(5+3*d-9*c*d+c-4*h-_/30*(61+90*d-252*c*d+45*f+46*c-_/56*(1385+3633*d+4095*f+1574*f*d)))),r=g$N(this.long0+p*(1-_/6*(1+2*d+c-_/20*(5+28*d+24*f+8*c*d+6*c-_/42*(61+662*d+1320*f+720*f*d))))/l)}else n=m$K*ft$5(a),r=0;else{var m=Math.exp(o/this.k0),g=.5*(m-1/m),x=this.lat0+a/this.k0,y=Math.cos(x);t=Math.sqrt((1-Math.pow(y,2))/(1+Math.pow(g,2))),n=Math.asin(t),a<0&&(n=-n),r=0===g&&0===y?0:g$N(Math.atan2(g,y)+this.long0)}return e.x=r,e.y=n,e}var ks=["Transverse_Mercator","Transverse Mercator","tmerc"],ps={init:Gs,forward:zs,inverse:Ds,names:ks},ga$2=function(e){var t=Math.exp(e);return t=(t-1/t)/2},Dt$6=function(e,t){e=Math.abs(e),t=Math.abs(t);var i=Math.max(e,t),n=Math.min(e,t)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))},Us=function(e){var t=1+e,i=t-1;return 0===i?e:e*Math.log(t)/i},Bs=function(e){var t=Math.abs(e);return t=Us(t*(1+t/(Dt$6(1,t)+1))),e<0?-t:t},kt$5=function(e,t){for(var i,n=2*Math.cos(2*t),r=e.length-1,o=e[r],a=0;--r>=0;)i=n*o-a+e[r],a=o,o=i;return t+i*Math.sin(2*t)},Fs=function(e,t){for(var i,n=2*Math.cos(t),r=e.length-1,o=e[r],a=0;--r>=0;)i=n*o-a+e[r],a=o,o=i;return Math.sin(t)*i},js=function(e){var t=Math.exp(e);return t=(t+1/t)/2},xa$2=function(e,t,i){for(var n,r,o=Math.sin(t),a=Math.cos(t),s=ga$2(i),l=js(i),u=2*a*l,c=-2*o*s,h=e.length-1,d=e[h],f=0,p=0,_=0;--h>=0;)n=p,r=f,d=u*(p=d)-n-c*(f=_)+e[h],_=c*p-r+u*f;return[(u=o*l)*d-(c=a*s)*_,u*_+c*d]};function Qs(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),i=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),i*=t,this.cgb[1]=i*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),i*=t,this.cgb[2]=i*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=i*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),i*=t,this.cgb[3]=i*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=i*(1237/630+t*(t*(-24832/14175)-2.4)),i*=t,this.cgb[4]=i*(4174/315+t*(-144838/6237)),this.cbg[4]=i*(-734/315+t*(109598/31185)),i*=t,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=i*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=i*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),i*=t,this.utg[2]=i*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=i*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),i*=t,this.utg[3]=i*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=i*(49561/161280+t*(-179/168+t*(6601661/7257600))),i*=t,this.utg[4]=i*(-4583/161280+t*(108847/3991680)),this.gtu[4]=i*(34729/80640+t*(-3418889/1995840)),i*=t,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var n=kt$5(this.cbg,this.lat0);this.Zb=-this.Qn*(n+Fs(this.gtu,2*n))}function Ws(e){var t=g$N(e.x-this.long0),i=e.y;i=kt$5(this.cbg,i);var n=Math.sin(i),r=Math.cos(i),o=Math.sin(t),a=Math.cos(t);i=Math.atan2(n,a*r),t=Math.atan2(o*r,Dt$6(n,r*a)),t=Bs(Math.tan(t));var s,l,u=xa$2(this.gtu,2*i,2*t);return i+=u[0],t+=u[1],Math.abs(t)<=2.623395162778?(s=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*i+this.Zb)+this.y0):(s=1/0,l=1/0),e.x=s,e.y=l,e}function Hs(e){var t,i,n=(e.x-this.x0)*(1/this.a),r=(e.y-this.y0)*(1/this.a);if(r=(r-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var o=xa$2(this.utg,2*r,2*n);r+=o[0],n+=o[1],n=Math.atan(ga$2(n));var a=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);r=Math.atan2(a*u,Dt$6(l,u*s)),n=Math.atan2(l,u*s),t=g$N(n+this.long0),i=kt$5(this.cgb,r)}else t=1/0,i=1/0;return e.x=t,e.y=i,e}var Xs=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"],wt$5={init:Qs,forward:Ws,inverse:Hs,names:Xs},Ks=function(e,t){if(void 0===e){if((e=Math.floor(30*(g$N(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e},Js="etmerc";function Zs(){var e=Ks(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*$$E,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,wt$5.init.apply(this),this.forward=wt$5.forward,this.inverse=wt$5.inverse}var Vs=["Universal Transverse Mercator System","utm"],Ys={init:Zs,names:Vs,dependsOn:Js},pt$6=function(e,t){return Math.pow((1-e)/(1+e),t)},ti$3=20;function ai$4(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+w$G)/(Math.pow(Math.tan(.5*this.lat0+w$G),this.C)*pt$6(this.e*e,this.ratexp))}function si$3(e){var t=e.x,i=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+w$G),this.C)*pt$6(this.e*Math.sin(i),this.ratexp))-m$K,e.x=this.C*t,e}function ii$3(e){for(var t=e.x/this.C,i=e.y,n=Math.pow(Math.tan(.5*i+w$G)/this.K,1/this.C),r=ti$3;r>0&&(i=2*Math.atan(n*pt$6(this.e*Math.sin(e.y),-.5*this.e))-m$K,!(Math.abs(i-e.y)<1e-14));--r)e.y=i;return r?(e.x=t,e.y=i,e):null}var hi$5=["gauss"],Ut$5={init:ai$4,forward:si$3,inverse:ii$3,names:hi$5};function ei$3(){Ut$5.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function ri$3(e){var t,i,n,r;return e.x=g$N(e.x-this.long0),Ut$5.forward.apply(this,[e]),t=Math.sin(e.y),i=Math.cos(e.y),n=Math.cos(e.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*i*n),e.x=r*i*Math.sin(e.x),e.y=r*(this.cosc0*t-this.sinc0*i*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function ni$4(e){var t,i,n,r,o;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,o=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(o,this.R2);t=Math.sin(a),i=Math.cos(a),r=Math.asin(i*this.sinc0+e.y*t*this.cosc0/o),n=Math.atan2(e.x*t,o*this.cosc0*i-e.y*this.sinc0*t)}else r=this.phic0,n=0;return e.x=n,e.y=r,Ut$5.inverse.apply(this,[e]),e.x=g$N(e.x+this.long0),e}var oi$3=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],li$5={init:ei$3,forward:ri$3,inverse:ni$4,names:oi$3};function fi$5(e,t,i){return t*=i,Math.tan(.5*(m$K+e))*Math.pow((1-t)/(1+t),.5*i)}function Mi$5(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=_$C&&(this.k0=.5*(1+ft$5(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=_$C&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=_$C&&(this.k0=.5*this.cons*F$J(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/U$J(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=F$J(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-m$K,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function vi$5(e){var t,i,n,r,o,a,s=e.x,l=e.y,u=Math.sin(l),c=Math.cos(l),h=g$N(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=_$C&&Math.abs(l+this.lat0)<=_$C?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*u+this.coslat0*c*Math.cos(h)),e.x=this.a*t*c*Math.sin(h)+this.x0,e.y=this.a*t*(this.coslat0*u-this.sinlat0*c*Math.cos(h))+this.y0,e):(i=2*Math.atan(this.ssfn_(l,u,this.e))-m$K,r=Math.cos(i),n=Math.sin(i),Math.abs(this.coslat0)<=_$C?(o=U$J(this.e,l*this.con,this.con*u),a=2*this.a*this.k0*o/this.cons,e.x=this.x0+a*Math.sin(s-this.long0),e.y=this.y0-this.con*a*Math.cos(s-this.long0),e):(Math.abs(this.sinlat0)<_$C?(t=2*this.a*this.k0/(1+r*Math.cos(h)),e.y=t*n):(t=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*n+this.cosX0*r*Math.cos(h))),e.y=t*(this.cosX0*n-this.sinX0*r*Math.cos(h))+this.y0),e.x=t*r*Math.sin(h)+this.x0,e))}function ui$5(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,o,a=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var s=2*Math.atan(a/(2*this.a*this.k0));return t=this.long0,i=this.lat0,a<=_$C?(e.x=t,e.y=i,e):(i=Math.asin(Math.cos(s)*this.sinlat0+e.y*Math.sin(s)*this.coslat0/a),t=Math.abs(this.coslat0)<_$C?this.lat0>0?g$N(this.long0+Math.atan2(e.x,-1*e.y)):g$N(this.long0+Math.atan2(e.x,e.y)):g$N(this.long0+Math.atan2(e.x*Math.sin(s),a*this.coslat0*Math.cos(s)-e.y*this.sinlat0*Math.sin(s))),e.x=t,e.y=i,e)}if(Math.abs(this.coslat0)<=_$C){if(a<=_$C)return i=this.lat0,t=this.long0,e.x=t,e.y=i,e;e.x*=this.con,e.y*=this.con,n=a*this.cons/(2*this.a*this.k0),i=this.con*Mt$5(this.e,n),t=this.con*g$N(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else r=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=_$C?o=this.X0:(o=Math.asin(Math.cos(r)*this.sinX0+e.y*Math.sin(r)*this.cosX0/a),t=g$N(this.long0+Math.atan2(e.x*Math.sin(r),a*this.cosX0*Math.cos(r)-e.y*this.sinX0*Math.sin(r)))),i=-1*Mt$5(this.e,Math.tan(.5*(m$K+o)));return e.x=t,e.y=i,e}var ci$6=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],mi$3={init:Mi$5,forward:vi$5,inverse:ui$5,names:ci$6,ssfn_:fi$5};function di$5(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),i=this.a,n=1/this.rf,r=2*n-Math.pow(n,2),o=this.e=Math.sqrt(r);this.R=this.k0*i*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+o*t)/(1-o*t));this.K=a-this.alpha*s+this.alpha*o/2*l}function yi$5(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+i)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(o))),s=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(o));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e}function _i$7(e){for(var t=e.x-this.x0,i=e.y-this.y0,n=t/this.R,r=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),s=this.lambda0+a/this.alpha,l=0,u=o,c=-1e3,h=0;Math.abs(u-c)>1e-7;){if(++h>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=s,e.y=u,e}var gi$6=["somerc"],xi$5={init:di$5,forward:yi$5,inverse:_i$7,names:gi$6};function bi$6(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var e=Math.sin(this.lat0),t=Math.cos(this.lat0),i=this.e*e;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(t,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-i*i);var n,r,o=U$J(this.e,this.lat0,e),a=this.bl/t*Math.sqrt((1-this.es)/(1-i*i));if(a*a<1&&(a=1),isNaN(this.longc)){var s=U$J(this.e,this.lat1,Math.sin(this.lat1)),l=U$J(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(a+Math.sqrt(a*a-1))*Math.pow(o,this.bl):this.el=(a-Math.sqrt(a*a-1))*Math.pow(o,this.bl);var u=Math.pow(s,this.bl),c=Math.pow(l,this.bl);r=.5*((n=this.el/u)-1/n);var h=(this.el*this.el-c*u)/(this.el*this.el+c*u),d=(c-u)/(c+u),f=g$N(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(h*Math.tan(.5*this.bl*f)/d)/this.bl,this.long0=g$N(this.long0);var p=g$N(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*p)/r),this.alpha=Math.asin(a*Math.sin(this.gamma0))}else n=this.lat0>=0?a+Math.sqrt(a*a-1):a-Math.sqrt(a*a-1),this.el=n*Math.pow(o,this.bl),r=.5*(n-1/n),this.gamma0=Math.asin(Math.sin(this.alpha)/a),this.long0=this.longc-Math.asin(r*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha))}function Ci$6(e){var t,i,n,r=e.x,o=e.y,a=g$N(r-this.long0);if(Math.abs(Math.abs(o)-m$K)<=_$C)n=o>0?-1:1,i=this.al/this.bl*Math.log(Math.tan(w$G+n*this.gamma0*.5)),t=-1*n*m$K*this.al/this.bl;else{var s=U$J(this.e,o,Math.sin(o)),l=this.el/Math.pow(s,this.bl),u=.5*(l-1/l),c=.5*(l+1/l),h=Math.sin(this.bl*a),d=(u*Math.sin(this.gamma0)-h*Math.cos(this.gamma0))/c;i=Math.abs(Math.abs(d)-1)<=_$C?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-d)/(1+d))/this.bl,t=Math.abs(Math.cos(this.bl*a))<=_$C?this.al*this.bl*a:this.al*Math.atan2(u*Math.cos(this.gamma0)+h*Math.sin(this.gamma0),Math.cos(this.bl*a))/this.bl}return this.no_rot?(e.x=this.x0+t,e.y=this.y0+i):(t-=this.uc,e.x=this.x0+i*Math.cos(this.alpha)+t*Math.sin(this.alpha),e.y=this.y0+t*Math.cos(this.alpha)-i*Math.sin(this.alpha)),e}function Ei$5(e){var t,i;this.no_rot?(i=e.y-this.y0,t=e.x-this.x0):(i=(e.x-this.x0)*Math.cos(this.alpha)-(e.y-this.y0)*Math.sin(this.alpha),t=(e.y-this.y0)*Math.cos(this.alpha)+(e.x-this.x0)*Math.sin(this.alpha),t+=this.uc);var n=Math.exp(-1*this.bl*i/this.al),r=.5*(n-1/n),o=.5*(n+1/n),a=Math.sin(this.bl*t/this.al),s=(a*Math.cos(this.gamma0)+r*Math.sin(this.gamma0))/o,l=Math.pow(this.el/Math.sqrt((1+s)/(1-s)),1/this.bl);return Math.abs(s-1)<_$C?(e.x=this.long0,e.y=m$K):Math.abs(s+1)<_$C?(e.x=this.long0,e.y=-1*m$K):(e.y=Mt$5(this.e,l),e.x=g$N(this.long0-Math.atan2(r*Math.cos(this.gamma0)-a*Math.sin(this.gamma0),Math.cos(this.bl*t/this.al))/this.bl)),e}var Ai$4=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"],Ni$5={init:bi$6,forward:Ci$6,inverse:Ei$5,names:Ai$4};function Pi$6(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<_$C)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),i=Math.cos(this.lat1),n=F$J(this.e,t,i),r=U$J(this.e,this.lat1,t),o=Math.sin(this.lat2),a=Math.cos(this.lat2),s=F$J(this.e,o,a),l=U$J(this.e,this.lat2,o),u=U$J(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>_$C?this.ns=Math.log(n/s)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function wi$5(e){var t=e.x,i=e.y;Math.abs(2*Math.abs(i)-Math.PI)<=_$C&&(i=ft$5(i)*(m$K-2*_$C));var n,r,o=Math.abs(Math.abs(i)-m$K);if(o>_$C)n=U$J(this.e,i,Math.sin(i)),r=this.a*this.f0*Math.pow(n,this.ns);else{if((o=i*this.ns)<=0)return null;r=0}var a=this.ns*g$N(t-this.long0);return e.x=this.k0*(r*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,e}function Si$5(e){var t,i,n,r,o,a=(e.x-this.x0)/this.k0,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+s*s),i=1):(t=-Math.sqrt(a*a+s*s),i=-1);var l=0;if(0!==t&&(l=Math.atan2(i*a,i*s)),0!==t||this.ns>0){if(i=1/this.ns,n=Math.pow(t/(this.a*this.f0),i),-9999===(r=Mt$5(this.e,n)))return null}else r=-m$K;return o=g$N(l/this.ns+this.long0),e.x=o,e.y=r,e}var Ii$4=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"],Ri$4={init:Pi$6,forward:wi$5,inverse:Si$5,names:Ii$4};function Oi$4(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function qi$3(e){var t,i,n,r,o,a,s,l=e.x,u=e.y,c=g$N(l-this.long0);return t=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),o=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(r)),a=this.n*o,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e}function Ti$5(e){var t,i,n,r,o,a,s,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),o=Math.sqrt(e.x*e.x+e.y*e.y),r=Math.atan2(e.y,e.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),i=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(t)),e.x=this.long0-i/this.alfa,a=t,s=0;var u=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,u+=1}while(0===s&&u<15);return u>=15?null:e}var $i$3=["Krovak","krovak"],Li$3={init:Oi$4,forward:qi$3,inverse:Ti$5,names:$i$3},G$P=function(e,t,i,n,r){return e*r-t*Math.sin(2*r)+i*Math.sin(4*r)-n*Math.sin(6*r)},ct$5=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},mt$3=function(e){return.375*e*(1+.25*e*(1+.46875*e))},dt$7=function(e){return.05859375*e*e*(1+.75*e)},yt$4=function(e){return e*e*e*(35/3072)},ht$4=function(e,t,i){var n=t*i;return e/Math.sqrt(1-n*n)},et$9=function(e){return Math.abs(e)<m$K?e:e-ft$5(e)*Math.PI},St$2=function(e,t,i,n,r){var o,a;o=e/t;for(var s=0;s<15;s++)if(o+=a=(e-(t*o-i*Math.sin(2*o)+n*Math.sin(4*o)-r*Math.sin(6*o)))/(t-2*i*Math.cos(2*o)+4*n*Math.cos(4*o)-6*r*Math.cos(6*o)),Math.abs(a)<=1e-10)return o;return NaN};function Gi$2(){this.sphere||(this.e0=ct$5(this.es),this.e1=mt$3(this.es),this.e2=dt$7(this.es),this.e3=yt$4(this.es),this.ml0=this.a*G$P(this.e0,this.e1,this.e2,this.e3,this.lat0))}function zi$5(e){var t,i,n=e.x,r=e.y;if(n=g$N(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(r),Math.cos(n))-this.lat0);else{var o=Math.sin(r),a=Math.cos(r),s=ht$4(this.a,this.e,o),l=Math.tan(r)*Math.tan(r),u=n*Math.cos(r),c=u*u,h=this.es*a*a/(1-this.es);t=s*u*(1-c*l*(1/6-(8-l+8*h)*c/120)),i=this.a*G$P(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+s*o/a*c*(.5+(5-l+6*h)*c/24)}return e.x=t+this.x0,e.y=i+this.y0,e}function Di$6(e){e.x-=this.x0,e.y-=this.y0;var t,i,n=e.x/this.a,r=e.y/this.a;if(this.sphere){var o=r+this.lat0;t=Math.asin(Math.sin(o)*Math.cos(n)),i=Math.atan2(Math.tan(n),Math.cos(o))}else{var a=this.ml0/this.a+r,s=St$2(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-m$K)<=_$C)return e.x=this.long0,e.y=m$K,r<0&&(e.y*=-1),e;var l=ht$4(this.a,this.e,Math.sin(s)),u=l*l*l/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(s),2),h=n*this.a/l,d=h*h;t=s-l*Math.tan(s)/u*h*h*(.5-(1+3*c)*h*h/24),i=h*(1-d*(c/3+(1+3*c)*c*d/15))/Math.cos(s)}return e.x=g$N(i+this.long0),e.y=et$9(t),e}var ki$5=["Cassini","Cassini_Soldner","cass"],pi$6={init:Gi$2,forward:zi$5,inverse:Di$6,names:ki$5},K$E=function(e,t){var i;return e>1e-7?(1-e*e)*(t/(1-(i=e*t)*i)-.5/e*Math.log((1-i)/(1+i))):2*t},Ui$4=1,Bi$3=2,Fi$3=3,ji$4=4;function Qi$2(){var e,t=Math.abs(this.lat0);if(Math.abs(t-m$K)<_$C?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<_$C?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=K$E(this.e,1),this.mmf=.5/(1-this.es),this.apa=th(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=K$E(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function Wi$4(e){var t,i,n,r,o,a,s,l,u,c,h=e.x,d=e.y;if(h=g$N(h-this.long0),this.sphere){if(o=Math.sin(d),c=Math.cos(d),n=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+c*n:1+this.sinph0*o+this.cosph0*c*n)<=_$C)return null;t=(i=Math.sqrt(2/i))*c*Math.sin(h),i*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.phi0)<_$C)return null;i=w$G-.5*d,t=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(h),i*=n}}else{switch(s=0,l=0,u=0,n=Math.cos(h),r=Math.sin(h),o=Math.sin(d),a=K$E(this.e,o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(s=a/this.qp,l=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:u=1+this.sinb1*s+this.cosb1*l*n;break;case this.EQUIT:u=1+l*n;break;case this.N_POLE:u=m$K+d,a=this.qp-a;break;case this.S_POLE:u=d-m$K,a=this.qp+a}if(Math.abs(u)<_$C)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:u=Math.sqrt(2/u),i=this.mode===this.OBLIQ?this.ymf*u*(this.cosb1*s-this.sinb1*l*n):(u=Math.sqrt(2/(1+l*n)))*s*this.ymf,t=this.xmf*u*l*r;break;case this.N_POLE:case this.S_POLE:a>=0?(t=(u=Math.sqrt(a))*r,i=n*(this.mode===this.S_POLE?u:-u)):t=i=0}}return e.x=this.a*t+this.x0,e.y=this.a*i+this.y0,e}function Hi$4(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,o,a,s,l=e.x/this.a,u=e.y/this.a;if(this.sphere){var c,h=0,d=0;if((i=.5*(c=Math.sqrt(l*l+u*u)))>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=Math.sin(i),h=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=_$C?0:Math.asin(u*d/c),l*=d,u=h*c;break;case this.OBLIQ:i=Math.abs(c)<=_$C?this.phi0:Math.asin(h*this.sinph0+u*d*this.cosph0/c),l*=d*this.cosph0,u=(h-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:u=-u,i=m$K-i;break;case this.S_POLE:i-=m$K}t=0!==u||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(l,u):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(l/=this.dd,u*=this.dd,(a=Math.sqrt(l*l+u*u))<_$C)return e.x=0,e.y=this.phi0,e;r=2*Math.asin(.5*a/this.rq),n=Math.cos(r),l*=r=Math.sin(r),this.mode===this.OBLIQ?(s=n*this.sinb1+u*r*this.cosb1/a,o=this.qp*s,u=a*this.cosb1*n-u*this.sinb1*r):(s=u*r/a,o=this.qp*s,u=a*n)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(u=-u),!(o=l*l+u*u))return e.x=0,e.y=this.phi0,e;s=1-o/this.qp,this.mode===this.S_POLE&&(s=-s)}t=Math.atan2(l,u),i=ah(Math.asin(s),this.apa)}return e.x=g$N(this.long0+t),e.y=i,e}var Xi$2=.3333333333333333,Ki$2=.17222222222222222,Ji$2=.10257936507936508,Zi$3=.06388888888888888,Vi$5=.0664021164021164,Yi$3=.016415012942191543;function th(e){var t,i=[];return i[0]=e*Xi$2,t=e*e,i[0]+=t*Ki$2,i[1]=t*Zi$3,t*=e,i[0]+=t*Ji$2,i[1]+=t*Vi$5,i[2]=t*Yi$3,i}function ah(e,t){var i=e+e;return e+t[0]*Math.sin(i)+t[1]*Math.sin(i+i)+t[2]*Math.sin(i+i+i)}var sh=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],ih={init:Qi$2,forward:Wi$4,inverse:Hi$4,names:sh,S_POLE:Ui$4,N_POLE:Bi$3,EQUIT:Fi$3,OBLIQ:ji$4},J$A=function(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)};function hh(){Math.abs(this.lat1+this.lat2)<_$C||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=F$J(this.e3,this.sin_po,this.cos_po),this.qs1=K$E(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=F$J(this.e3,this.sin_po,this.cos_po),this.qs2=K$E(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=K$E(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>_$C?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function eh(e){var t=e.x,i=e.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=K$E(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*g$N(t-this.long0),a=r*Math.sin(o)+this.x0,s=this.rh-r*Math.cos(o)+this.y0;return e.x=a,e.y=s,e}function rh(e){var t,i,n,r,o,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),r=0,0!==t&&(r=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,i)),o=g$N(r/this.ns0+this.long0),e.x=o,e.y=a,e}function nh(e,t){var i,n,r,o,a=J$A(.5*t);if(e<_$C)return a;for(var s=e*e,l=1;l<=25;l++)if(a+=o=.5*(r=1-(n=e*(i=Math.sin(a)))*n)*r/Math.cos(a)*(t/(1-s)-i/r+.5/e*Math.log((1-n)/(1+n))),Math.abs(o)<=1e-7)return a;return null}var oh=["Albers_Conic_Equal_Area","Albers","aea"],lh={init:hh,forward:eh,inverse:rh,names:oh,phi1z:nh};function fh(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Mh(e){var t,i,n,r,o,a,s,l=e.x,u=e.y;return n=g$N(l-this.long0),t=Math.sin(u),i=Math.cos(u),r=Math.cos(n),1,(o=this.sin_p14*t+this.cos_p14*i*r)>0||Math.abs(o)<=_$C?(a=this.x0+1*this.a*i*Math.sin(n)/o,s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*i*r)/o):(a=this.x0+this.infinity_dist*i*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*i*r)),e.x=a,e.y=s,e}function vh(e){var t,i,n,r,o,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(r=Math.atan2(t,this.rc),i=Math.sin(r),n=Math.cos(r),a=J$A(n*this.sin_p14+e.y*i*this.cos_p14/t),o=Math.atan2(e.x*i,t*this.cos_p14*n-e.y*this.sin_p14*i),o=g$N(this.long0+o)):(a=this.phic0,o=0),e.x=o,e.y=a,e}var uh=["gnom"],ch={init:fh,forward:Mh,inverse:vh,names:uh},mh=function(e,t){var i=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-i)<1e-6)return t<0?-1*m$K:m$K;for(var n,r,o,a,s=Math.asin(.5*t),l=0;l<30;l++)if(r=Math.sin(s),o=Math.cos(s),a=e*r,s+=n=Math.pow(1-a*a,2)/(2*o)*(t/(1-e*e)-r/(1-a*a)+.5/e*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return s;return NaN};function dh(){this.sphere||(this.k0=F$J(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function yh(e){var t,i,n=e.x,r=e.y,o=g$N(n-this.long0);if(this.sphere)t=this.x0+this.a*o*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var a=K$E(this.e,Math.sin(r));t=this.x0+this.a*this.k0*o,i=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=i,e}function _h(e){var t,i;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=g$N(this.long0+e.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(i=mh(this.e,2*e.y*this.k0/this.a),t=g$N(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=i,e}var gh=["cea"],xh={init:dh,forward:yh,inverse:_h,names:gh};function bh(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Ch(e){var t=e.x,i=e.y,n=g$N(t-this.long0),r=et$9(i-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*r,e}function Eh(e){var t=e.x,i=e.y;return e.x=g$N(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=et$9(this.lat0+(i-this.y0)/this.a),e}var Ah=["Equirectangular","Equidistant_Cylindrical","eqc"],Nh={init:bh,forward:Ch,inverse:Eh,names:Ah},ba$1=20;function Ph(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ct$5(this.es),this.e1=mt$3(this.es),this.e2=dt$7(this.es),this.e3=yt$4(this.es),this.ml0=this.a*G$P(this.e0,this.e1,this.e2,this.e3,this.lat0)}function wh(e){var t,i,n,r=e.x,o=e.y,a=g$N(r-this.long0);if(n=a*Math.sin(o),this.sphere)Math.abs(o)<=_$C?(t=this.a*a,i=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(o),i=this.a*(et$9(o-this.lat0)+(1-Math.cos(n))/Math.tan(o)));else if(Math.abs(o)<=_$C)t=this.a*a,i=-1*this.ml0;else{var s=ht$4(this.a,this.e,Math.sin(o))/Math.tan(o);t=s*Math.sin(n),i=this.a*G$P(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+s*(1-Math.cos(n))}return e.x=t+this.x0,e.y=i+this.y0,e}function Sh(e){var t,i,n,r,o,a,s,l,u;if(n=e.x-this.x0,r=e.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=_$C)t=g$N(n/this.a+this.long0),i=0;else{var c;for(a=this.lat0+r/this.a,s=n*n/this.a/this.a+a*a,l=a,o=ba$1;o;--o)if(l+=u=-1*(a*(l*(c=Math.tan(l))+1)-l-.5*(l*l+s)*c)/((l-a)/c-1),Math.abs(u)<=_$C){i=l;break}t=g$N(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(r+this.ml0)<=_$C)i=0,t=g$N(this.long0+n/this.a);else{var h,d,f,p,_;for(a=(this.ml0+r)/this.a,s=n*n/this.a/this.a+a*a,l=a,o=ba$1;o;--o)if(_=this.e*Math.sin(l),h=Math.sqrt(1-_*_)*Math.tan(l),d=this.a*G$P(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=u=(a*(h*(p=d/this.a)+1)-p-.5*h*(p*p+s))/(this.es*Math.sin(2*l)*(p*p+s-2*a*p)/(4*h)+(a-p)*(h*f-2/Math.sin(2*l))-f),Math.abs(u)<=_$C){i=l;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),t=g$N(this.long0+Math.asin(n*h/this.a)/Math.sin(i))}return e.x=t,e.y=i,e}var Ih=["Polyconic","poly"],Rh={init:Ph,forward:wh,inverse:Sh,names:Ih};function Oh(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function qh(e){var t,i=e.x,n=e.y-this.lat0,r=i-this.long0,o=n/ot$5*1e-5,a=r,s=1,l=0;for(t=1;t<=10;t++)s*=o,l+=this.A[t]*s;var u,c=l,h=a,d=1,f=0,p=0,_=0;for(t=1;t<=6;t++)u=f*c+d*h,d=d*c-f*h,f=u,p=p+this.B_re[t]*d-this.B_im[t]*f,_=_+this.B_im[t]*d+this.B_re[t]*f;return e.x=_*this.a+this.x0,e.y=p*this.a+this.y0,e}function Th(e){var t,i,n=e.x,r=e.y,o=n-this.x0,a=(r-this.y0)/this.a,s=o/this.a,l=1,u=0,c=0,h=0;for(t=1;t<=6;t++)i=u*a+l*s,l=l*a-u*s,u=i,c=c+this.C_re[t]*l-this.C_im[t]*u,h=h+this.C_im[t]*l+this.C_re[t]*u;for(var d=0;d<this.iterations;d++){var f,p=c,_=h,m=a,g=s;for(t=2;t<=6;t++)f=_*c+p*h,p=p*c-_*h,_=f,m+=(t-1)*(this.B_re[t]*p-this.B_im[t]*_),g+=(t-1)*(this.B_im[t]*p+this.B_re[t]*_);p=1,_=0;var x=this.B_re[1],y=this.B_im[1];for(t=2;t<=6;t++)f=_*c+p*h,p=p*c-_*h,_=f,x+=t*(this.B_re[t]*p-this.B_im[t]*_),y+=t*(this.B_im[t]*p+this.B_re[t]*_);var v=x*x+y*y;c=(m*x+g*y)/v,h=(g*x-m*y)/v}var $=c,b=h,T=1,C=0;for(t=1;t<=9;t++)T*=$,C+=this.D[t]*T;var S=this.lat0+C*ot$5*1e5,w=this.long0+b;return e.x=w,e.y=S,e}var $h=["New_Zealand_Map_Grid","nzmg"],Lh={init:Oh,forward:qh,inverse:Th,names:$h};function Gh(){}function zh(e){var t=e.x,i=e.y,n=g$N(t-this.long0),r=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return e.x=r,e.y=o,e}function Dh(e){e.x-=this.x0,e.y-=this.y0;var t=g$N(this.long0+e.x/this.a),i=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=i,e}var kh=["Miller_Cylindrical","mill"],ph={init:Gh,forward:zh,inverse:Dh,names:kh},Uh=20;function Bh(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=ya$1(this.es)}function Fh(e){var t,i,n=e.x,r=e.y;if(n=g$N(n-this.long0),this.sphere){if(this.m)for(var o=this.n*Math.sin(r),a=Uh;a;--a){var s=(this.m*r+Math.sin(r)-o)/(this.m+Math.cos(r));if(r-=s,Math.abs(s)<_$C)break}else r=1!==this.n?Math.asin(this.n*Math.sin(r)):r;t=this.a*this.C_x*n*(this.m+Math.cos(r)),i=this.a*this.C_y*r}else{var l=Math.sin(r),u=Math.cos(r);i=this.a*Pt$4(r,l,u,this.en),t=this.a*n*u/Math.sqrt(1-this.es*l*l)}return e.x=t,e.y=i,e}function jh(e){var t,i,n,r;return e.x-=this.x0,n=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,n/=this.C_x*(this.m+Math.cos(t)),this.m?t=J$A((this.m*t+Math.sin(t))/this.n):1!==this.n&&(t=J$A(Math.sin(t)/this.n)),n=g$N(n+this.long0),t=et$9(t)):(t=_a$2(e.y/this.a,this.es,this.en),(r=Math.abs(t))<m$K?(r=Math.sin(t),i=this.long0+e.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),n=g$N(i)):r-_$C<m$K&&(n=this.long0)),e.x=n,e.y=t,e}var Qh=["Sinusoidal","sinu"],Wh={init:Bh,forward:Fh,inverse:jh,names:Qh};function Hh(){}function Xh(e){for(var t=e.x,i=e.y,n=g$N(t-this.long0),r=i,o=Math.PI*Math.sin(i);;){var a=-(r+Math.sin(r)-o)/(1+Math.cos(r));if(r+=a,Math.abs(a)<_$C)break}r/=2,Math.PI/2-Math.abs(i)<_$C&&(n=0);var s=.900316316158*this.a*n*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return e.x=s,e.y=l,e}function Kh(e){var t,i;e.x-=this.x0,e.y-=this.y0,i=e.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),t=Math.asin(i);var n=g$N(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*t+Math.sin(2*t))/Math.PI,Math.abs(i)>1&&(i=1);var r=Math.asin(i);return e.x=n,e.y=r,e}var Jh=["Mollweide","moll"],Zh={init:Hh,forward:Xh,inverse:Kh,names:Jh};function Vh(){Math.abs(this.lat1+this.lat2)<_$C||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ct$5(this.es),this.e1=mt$3(this.es),this.e2=dt$7(this.es),this.e3=yt$4(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=F$J(this.e,this.sinphi,this.cosphi),this.ml1=G$P(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<_$C?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=F$J(this.e,this.sinphi,this.cosphi),this.ml2=G$P(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=G$P(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function Yh(e){var t,i=e.x,n=e.y;if(this.sphere)t=this.a*(this.g-n);else{var r=G$P(this.e0,this.e1,this.e2,this.e3,n);t=this.a*(this.g-r)}var o=this.ns*g$N(i-this.long0),a=this.x0+t*Math.sin(o),s=this.y0+this.rh-t*Math.cos(o);return e.x=a,e.y=s,e}function te$t(e){var t,i,n,r;e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns>=0?(i=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(i=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var o=0;if(0!==i&&(o=Math.atan2(t*e.x,t*e.y)),this.sphere)return r=g$N(this.long0+o/this.ns),n=et$9(this.g-i/this.a),e.x=r,e.y=n,e;var a=this.g-i/this.a;return n=St$2(a,this.e0,this.e1,this.e2,this.e3),r=g$N(this.long0+o/this.ns),e.x=r,e.y=n,e}var ae$q=["Equidistant_Conic","eqdc"],se$n={init:Vh,forward:Yh,inverse:te$t,names:ae$q};function ie$r(){this.R=this.a}function he$k(e){var t,i,n=e.x,r=e.y,o=g$N(n-this.long0);Math.abs(r)<=_$C&&(t=this.x0+this.R*o,i=this.y0);var a=J$A(2*Math.abs(r/Math.PI));(Math.abs(o)<=_$C||Math.abs(Math.abs(r)-m$K)<=_$C)&&(t=this.x0,i=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var s=.5*Math.abs(Math.PI/o-o/Math.PI),l=s*s,u=Math.sin(a),c=Math.cos(a),h=c/(u+c-1),d=h*h,f=h*(2/u-1),p=f*f,_=Math.PI*this.R*(s*(h-p)+Math.sqrt(l*(h-p)*(h-p)-(p+l)*(d-p)))/(p+l);o<0&&(_=-_),t=this.x0+_;var m=l+h;return _=Math.PI*this.R*(f*m-s*Math.sqrt((p+l)*(l+1)-m*m))/(p+l),i=r>=0?this.y0+_:this.y0-_,e.x=t,e.y=i,e}function ee$r(e){var t,i,n,r,o,a,s,l,u,c,h,d;return e.x-=this.x0,e.y-=this.y0,h=Math.PI*this.R,o=(n=e.x/h)*n+(r=e.y/h)*r,h=3*(r*r/(l=-2*(a=-Math.abs(r)*(1+o))+1+2*r*r+o*o)+(2*(s=a-2*r*r+n*n)*s*s/l/l/l-9*a*s/l/l)/27)/(u=(a-s*s/3/l)/l)/(c=2*Math.sqrt(-u/3)),Math.abs(h)>1&&(h=h>=0?1:-1),d=Math.acos(h)/3,i=e.y>=0?(-c*Math.cos(d+Math.PI/3)-s/3/l)*Math.PI:-(-c*Math.cos(d+Math.PI/3)-s/3/l)*Math.PI,t=Math.abs(n)<_$C?this.long0:g$N(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-r*r)+o*o))/2/n),e.x=t,e.y=i,e}var re$w=["Van_der_Grinten_I","VanDerGrinten","vandg"],ne$t={init:ie$r,forward:he$k,inverse:ee$r,names:re$w};function oe$m(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function le$o(e){var t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T=e.x,C=e.y,S=Math.sin(e.y),w=Math.cos(e.y),E=g$N(T-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=_$C?(e.x=this.x0+this.a*(m$K-C)*Math.sin(E),e.y=this.y0-this.a*(m$K-C)*Math.cos(E),e):Math.abs(this.sin_p12+1)<=_$C?(e.x=this.x0+this.a*(m$K+C)*Math.sin(E),e.y=this.y0+this.a*(m$K+C)*Math.cos(E),e):(x=this.sin_p12*S+this.cos_p12*w*Math.cos(E),g=(m=Math.acos(x))/Math.sin(m),e.x=this.x0+this.a*g*w*Math.sin(E),e.y=this.y0+this.a*g*(this.cos_p12*S-this.sin_p12*w*Math.cos(E)),e):(t=ct$5(this.es),i=mt$3(this.es),n=dt$7(this.es),r=yt$4(this.es),Math.abs(this.sin_p12-1)<=_$C?(o=this.a*G$P(t,i,n,r,m$K),a=this.a*G$P(t,i,n,r,C),e.x=this.x0+(o-a)*Math.sin(E),e.y=this.y0-(o-a)*Math.cos(E),e):Math.abs(this.sin_p12+1)<=_$C?(o=this.a*G$P(t,i,n,r,m$K),a=this.a*G$P(t,i,n,r,C),e.x=this.x0+(o+a)*Math.sin(E),e.y=this.y0+(o+a)*Math.cos(E),e):(s=S/w,l=ht$4(this.a,this.e,this.sin_p12),u=ht$4(this.a,this.e,S),c=Math.atan((1-this.es)*s+this.es*l*this.sin_p12/(u*w)),y=0===(h=Math.atan2(Math.sin(E),this.cos_p12*Math.tan(c)-this.sin_p12*Math.cos(E)))?Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.abs(Math.abs(h)-Math.PI)<=_$C?-Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.asin(Math.sin(E)*Math.cos(c)/Math.sin(h)),d=this.e*this.sin_p12/Math.sqrt(1-this.es),m=l*y*(1-(v=y*y)*(_=(f=this.e*this.cos_p12*Math.cos(h)/Math.sqrt(1-this.es))*f)*(1-_)/6+($=v*y)/8*(p=d*f)*(1-2*_)+(b=$*y)/120*(_*(4-7*_)-3*d*d*(1-7*_))-b*y/48*p),e.x=this.x0+m*Math.sin(h),e.y=this.y0+m*Math.cos(h),e))}function fe$m(e){var t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=Math.sqrt(e.x*e.x+e.y*e.y))>2*m$K*this.a?void 0:(i=t/this.a,n=Math.sin(i),r=Math.cos(i),o=this.long0,Math.abs(t)<=_$C?a=this.lat0:(a=J$A(r*this.sin_p12+e.y*n*this.cos_p12/t),s=Math.abs(this.lat0)-m$K,o=Math.abs(s)<=_$C?this.lat0>=0?g$N(this.long0+Math.atan2(e.x,-e.y)):g$N(this.long0-Math.atan2(-e.x,e.y)):g$N(this.long0+Math.atan2(e.x*n,t*this.cos_p12*r-e.y*this.sin_p12*n))),e.x=o,e.y=a,e):(l=ct$5(this.es),u=mt$3(this.es),c=dt$7(this.es),h=yt$4(this.es),Math.abs(this.sin_p12-1)<=_$C?(d=this.a*G$P(l,u,c,h,m$K),t=Math.sqrt(e.x*e.x+e.y*e.y),a=St$2((d-t)/this.a,l,u,c,h),o=g$N(this.long0+Math.atan2(e.x,-1*e.y)),e.x=o,e.y=a,e):Math.abs(this.sin_p12+1)<=_$C?(d=this.a*G$P(l,u,c,h,m$K),t=Math.sqrt(e.x*e.x+e.y*e.y),a=St$2((t-d)/this.a,l,u,c,h),o=g$N(this.long0+Math.atan2(e.x,e.y)),e.x=o,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),_=Math.atan2(e.x,e.y),f=ht$4(this.a,this.e,this.sin_p12),m=Math.cos(_),x=-(g=this.e*this.cos_p12*m)*g/(1-this.es),y=3*this.es*(1-x)*this.sin_p12*this.cos_p12*m/(1-this.es),b=1-x*($=(v=t/f)-x*(1+x)*Math.pow(v,3)/6-y*(1+3*x)*Math.pow(v,4)/24)*$/2-v*$*$*$/6,p=Math.asin(this.sin_p12*Math.cos($)+this.cos_p12*Math.sin($)*m),o=g$N(this.long0+Math.asin(Math.sin(_)*Math.sin($)/Math.cos(p))),a=Math.atan((1-this.es*b*this.sin_p12/Math.sin(p))*Math.tan(p)/(1-this.es)),e.x=o,e.y=a,e))}var Me$i=["Azimuthal_Equidistant","aeqd"],ve$j={init:oe$m,forward:le$o,inverse:fe$m,names:Me$i};function ue$o(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function ce$l(e){var t,i,n,r,o,a,s,l=e.x,u=e.y;return n=g$N(l-this.long0),t=Math.sin(u),i=Math.cos(u),r=Math.cos(n),1,((o=this.sin_p14*t+this.cos_p14*i*r)>0||Math.abs(o)<=_$C)&&(a=1*this.a*i*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*i*r)),e.x=a,e.y=s,e}function me$o(e){var t,i,n,r,o,a,s;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),i=J$A(t/this.a),n=Math.sin(i),r=Math.cos(i),a=this.long0,Math.abs(t)<=_$C?(s=this.lat0,e.x=a,e.y=s,e):(s=J$A(r*this.sin_p14+e.y*n*this.cos_p14/t),o=Math.abs(this.lat0)-m$K,Math.abs(o)<=_$C?(a=this.lat0>=0?g$N(this.long0+Math.atan2(e.x,-e.y)):g$N(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=s,e):(a=g$N(this.long0+Math.atan2(e.x*n,t*this.cos_p14*r-e.y*this.sin_p14*n)),e.x=a,e.y=s,e))}var de$k=["ortho"],ye$g={init:ue$o,forward:ce$l,inverse:me$o,names:de$k},I$T={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},P$E={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function _e$k(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=m$K-w$G/2?this.face=I$T.TOP:this.lat0<=-(m$K-w$G/2)?this.face=I$T.BOTTOM:Math.abs(this.long0)<=w$G?this.face=I$T.FRONT:Math.abs(this.long0)<=m$K+w$G?this.face=this.long0>0?I$T.RIGHT:I$T.LEFT:this.face=I$T.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function ge$i(e){var t,i,n,r,o,a,s={x:0,y:0},l={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,i=e.x,this.face===I$T.TOP)r=m$K-t,i>=w$G&&i<=m$K+w$G?(l.value=P$E.AREA_0,n=i-m$K):i>m$K+w$G||i<=-(m$K+w$G)?(l.value=P$E.AREA_1,n=i>0?i-R$D:i+R$D):i>-(m$K+w$G)&&i<=-w$G?(l.value=P$E.AREA_2,n=i+m$K):(l.value=P$E.AREA_3,n=i);else if(this.face===I$T.BOTTOM)r=m$K+t,i>=w$G&&i<=m$K+w$G?(l.value=P$E.AREA_0,n=-i+m$K):i<w$G&&i>=-w$G?(l.value=P$E.AREA_1,n=-i):i<-w$G&&i>=-(m$K+w$G)?(l.value=P$E.AREA_2,n=-i-m$K):(l.value=P$E.AREA_3,n=i>0?-i+R$D:-i-R$D);else{var u,c,h,d,f,p;this.face===I$T.RIGHT?i=rt$a(i,+m$K):this.face===I$T.BACK?i=rt$a(i,+R$D):this.face===I$T.LEFT&&(i=rt$a(i,-m$K)),d=Math.sin(t),f=Math.cos(t),p=Math.sin(i),u=f*Math.cos(i),c=f*p,h=d,this.face===I$T.FRONT?n=It$6(r=Math.acos(u),h,c,l):this.face===I$T.RIGHT?n=It$6(r=Math.acos(c),h,-u,l):this.face===I$T.BACK?n=It$6(r=Math.acos(-u),h,-c,l):this.face===I$T.LEFT?n=It$6(r=Math.acos(-c),h,u,l):(r=n=0,l.value=P$E.AREA_0)}return a=Math.atan(12/R$D*(n+Math.acos(Math.sin(n)*Math.cos(w$G))-m$K)),o=Math.sqrt((1-Math.cos(r))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),l.value===P$E.AREA_1?a+=m$K:l.value===P$E.AREA_2?a+=R$D:l.value===P$E.AREA_3&&(a+=1.5*R$D),s.x=o*Math.cos(a),s.y=o*Math.sin(a),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,e.x=s.x,e.y=s.y,e}function xe$h(e){var t,i,n,r,o,a,s,l,u,c,h,d,f={lam:0,phi:0},p={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,i=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?p.value=P$E.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(p.value=P$E.AREA_1,t-=m$K):e.x<0&&-e.x>=Math.abs(e.y)?(p.value=P$E.AREA_2,t=t<0?t+R$D:t-R$D):(p.value=P$E.AREA_3,t+=m$K),u=R$D/12*Math.tan(t),o=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(o),(s=1-(n=Math.cos(t))*n*(r=Math.tan(i))*r*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?s=-1:s>1&&(s=1),this.face===I$T.TOP)l=Math.acos(s),f.phi=m$K-l,p.value===P$E.AREA_0?f.lam=a+m$K:p.value===P$E.AREA_1?f.lam=a<0?a+R$D:a-R$D:p.value===P$E.AREA_2?f.lam=a-m$K:f.lam=a;else if(this.face===I$T.BOTTOM)l=Math.acos(s),f.phi=l-m$K,p.value===P$E.AREA_0?f.lam=-a+m$K:p.value===P$E.AREA_1?f.lam=-a:p.value===P$E.AREA_2?f.lam=-a-m$K:f.lam=a<0?-a-R$D:-a+R$D;else{var _,m,g;u=(_=s)*_,m=(u+=(g=u>=1?0:Math.sqrt(1-u)*Math.sin(a))*g)>=1?0:Math.sqrt(1-u),p.value===P$E.AREA_1?(u=m,m=-g,g=u):p.value===P$E.AREA_2?(m=-m,g=-g):p.value===P$E.AREA_3&&(u=m,m=g,g=-u),this.face===I$T.RIGHT?(u=_,_=-m,m=u):this.face===I$T.BACK?(_=-_,m=-m):this.face===I$T.LEFT&&(u=_,_=m,m=-u),f.phi=Math.acos(-g)-m$K,f.lam=Math.atan2(m,_),this.face===I$T.RIGHT?f.lam=rt$a(f.lam,-m$K):this.face===I$T.BACK?f.lam=rt$a(f.lam,-R$D):this.face===I$T.LEFT&&(f.lam=rt$a(f.lam,+m$K))}0!==this.es&&(c=f.phi<0?1:0,h=Math.tan(f.phi),d=this.b/Math.sqrt(h*h+this.one_minus_f_squared),f.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),c&&(f.phi=-f.phi));return f.lam+=this.long0,e.x=f.lam,e.y=f.phi,e}function It$6(e,t,i,n){var r;return e<_$C?(n.value=P$E.AREA_0,r=0):(r=Math.atan2(t,i),Math.abs(r)<=w$G?n.value=P$E.AREA_0:r>w$G&&r<=m$K+w$G?(n.value=P$E.AREA_1,r-=m$K):r>m$K+w$G||r<=-(m$K+w$G)?(n.value=P$E.AREA_2,r=r>=0?r-R$D:r+R$D):(n.value=P$E.AREA_3,r+=m$K)),r}function rt$a(e,t){var i=e+t;return i<-R$D?i+=qt$5:i>+R$D&&(i-=qt$5),i}var be$l=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],Ce$e={init:_e$k,forward:ge$i,inverse:xe$h,names:be$l},Bt$7=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],_t$5=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ca$1=.8487,Ea$2=1.3523,Aa$2=H$K/5,Ee$h=1/Aa$2,nt$6=18,Rt$6=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},Ae$j=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};function Ne$d(e,t,i,n){for(var r=t;n;--n){var o=e(r);if(r-=o,Math.abs(o)<i)break}return r}function Pe$e(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function we$g(e){var t=g$N(e.x-this.long0),i=Math.abs(e.y),n=Math.floor(i*Aa$2);n<0?n=0:n>=nt$6&&(n=nt$6-1),i=H$K*(i-Ee$h*n);var r={x:Rt$6(Bt$7[n],i)*t,y:Rt$6(_t$5[n],i)};return e.y<0&&(r.y=-r.y),r.x=r.x*this.a*Ca$1+this.x0,r.y=r.y*this.a*Ea$2+this.y0,r}function Se$c(e){var t={x:(e.x-this.x0)/(this.a*Ca$1),y:Math.abs(e.y-this.y0)/(this.a*Ea$2)};if(t.y>=1)t.x/=Bt$7[nt$6][0],t.y=e.y<0?-m$K:m$K;else{var i=Math.floor(t.y*nt$6);for(i<0?i=0:i>=nt$6&&(i=nt$6-1);;)if(_t$5[i][0]>t.y)--i;else{if(!(_t$5[i+1][0]<=t.y))break;++i}var n=_t$5[i],r=5*(t.y-n[0])/(_t$5[i+1][0]-n[0]);r=Ne$d((function(e){return(Rt$6(n,e)-t.y)/Ae$j(n,e)}),r,_$C,100),t.x/=Rt$6(Bt$7[i],r),t.y=(5*i+r)*$$E,e.y<0&&(t.y=-t.y)}return t.x=g$N(t.x+this.long0),t}var Ie$e=["Robinson","robin"],Re$g={init:Pe$e,forward:we$g,inverse:Se$c,names:Ie$e};function Oe$h(){this.name="geocent"}function qe$7(e){return Yt$3(e,this.es,this.a)}function Te$h(e){return ta$3(e,this.es,this.a,this.b)}var $e$8=["Geocentric","geocentric","geocent","Geocent"],Le$j={init:Oe$h,forward:qe$7,inverse:Te$h,names:$e$8},Ge$9=function(e){e.Proj.projections.add(ps),e.Proj.projections.add(wt$5),e.Proj.projections.add(Ys),e.Proj.projections.add(li$5),e.Proj.projections.add(mi$3),e.Proj.projections.add(xi$5),e.Proj.projections.add(Ni$5),e.Proj.projections.add(Ri$4),e.Proj.projections.add(Li$3),e.Proj.projections.add(pi$6),e.Proj.projections.add(ih),e.Proj.projections.add(lh),e.Proj.projections.add(ch),e.Proj.projections.add(xh),e.Proj.projections.add(Nh),e.Proj.projections.add(Rh),e.Proj.projections.add(Lh),e.Proj.projections.add(ph),e.Proj.projections.add(Wh),e.Proj.projections.add(Zh),e.Proj.projections.add(se$n),e.Proj.projections.add(ne$t),e.Proj.projections.add(ve$j),e.Proj.projections.add(ye$g),e.Proj.projections.add(Ce$e),e.Proj.projections.add(Re$g),e.Proj.projections.add(Le$j)};function p$L(e){e=u$Z(e,{});var t=u$Z(e.name,"tmerc"),i=u$Z(e.centralMeridian,117),n=u$Z(e.primeMeridian,0),r=u$Z(e.standardParallel_1,0),o=u$Z(e.standardParallel_2,0),a=u$Z(e.eastFalse,5e5),s=u$Z(e.northFalse,0),l=u$Z(e.semimajorAxis,6378137),u=u$Z(e.inverseFlattening,298.257222101),c=(1-1/u)*l,h=e.ellps;if(e$2e(h))d="+proj={name} +lon_0={lon_0} +lat_0={lat_0} +lat_1={lat_1} +lat_2={lat_2} +x_0={x_0} +y_0={y_0} +ellps={ellps}",this._projection=d.replace("{name}",t).replace("{lon_0}",i).replace("{lat_0}",n).replace("{lat_1}",r).replace("{lat_2}",o).replace("{x_0}",a).replace("{y_0}",s).replace("{ellps}",h);else{var d="+proj={name} +lon_0={lon_0} +lat_0={lat_0} +lat_1={lat_1} +lat_2={lat_2} +x_0={x_0} +y_0={y_0} +a={a} +b={b} +rf={rf}";this._projection=d.replace("{name}",t).replace("{lon_0}",i).replace("{lat_0}",n).replace("{lat_1}",r).replace("{lat_2}",o).replace("{x_0}",a).replace("{y_0}",s).replace("{a}",l).replace("{b}",c).replace("{rf}",u)}}k$D.defaultDatum="WGS84",k$D.Proj=j$F,k$D.WGS84=new k$D.Proj("WGS84"),k$D.Point=it$5,k$D.toPoint=sa$3,k$D.defs=L$Q,k$D.transform=Nt$6,k$D.mgrs=ds,k$D.version="2.6.1",Ge$9(k$D),Object.defineProperties(p$L.prototype,{projection:{get:function(){return this._projection}}}),p$L.prototype.project=function(e,t){var i=k$D(this._projection,[e$2d.toDegrees(e.longitude),e$2d.toDegrees(e.latitude)]);return e$2e(t)?(t.x=i[0],t.y=i[1],t.z=e.height,t):new o$1p(i[0],i[1],e.height)},p$L.prototype.unproject=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required");var i=k$D(this._projection).inverse([e.x,e.y]),n=e$2d.toRadians(i[0]),r=e$2d.toRadians(i[1]);return e$2e(t)?(t.longitude=n,t.latitude=r,t):new a$18(n,r)};var I$S={computePositions:function(e,t,i,n,r){var o,a=.5*e,s=-a,l=n+n,u=new Float64Array(3*(r?2*l:l)),c=0,h=0,d=r?3*l:0,f=r?3*(l+n):3*n;for(o=0;o<n;o++){var p=o/n*e$2d.TWO_PI,_=Math.cos(p),m=Math.sin(p),g=_*i,x=m*i,y=_*t,v=m*t;u[h+d]=g,u[h+d+1]=x,u[h+d+2]=s,u[h+f]=y,u[h+f+1]=v,u[h+f+2]=a,h+=3,r&&(u[c++]=g,u[c++]=x,u[c++]=s,u[c++]=y,u[c++]=v,u[c++]=a)}return u}},M$I=new o$1o,at$7=new o$1p,ut$6=new o$1p,mt$2=new o$1p,vt$5=new o$1p;function l$Q(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=u$Z(e.vertexFormat,n$13.DEFAULT),o=u$Z(e.slices,128);if(!e$2e(t))throw new t$15("options.length must be defined.");if(!e$2e(i))throw new t$15("options.topRadius must be defined.");if(!e$2e(n))throw new t$15("options.bottomRadius must be defined.");if(o<3)throw new t$15("options.slices must be greater than or equal to 3.");if(e$2e(e.offsetAttribute)&&e.offsetAttribute===_0x39c22a.TOP)throw new t$15("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=i,this._bottomRadius=n,this._vertexFormat=n$13.clone(r),this._slices=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}l$Q.packedLength=n$13.packedLength+5,l$Q.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=u$Z(e._offsetAttribute,-1),t};var H$J=new n$13,E$L={vertexFormat:H$J,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0},G$O;l$Q.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n=n$13.unpack(e,t,H$J);t+=n$13.packedLength;var r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return e$2e(i)?(i._vertexFormat=n$13.clone(n,i._vertexFormat),i._length=r,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._offsetAttribute=-1===l?void 0:l,i):(E$L.length=r,E$L.topRadius=o,E$L.bottomRadius=a,E$L.slices=s,E$L.offsetAttribute=-1===l?void 0:l,new l$Q(E$L))},l$Q.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._vertexFormat,o=e._slices;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=o+o,l=o+s,u=s+s,c=I$S.computePositions(t,i,n,o,!0),h=r.st?new Float32Array(2*u):void 0,d=r.normal?new Float32Array(3*u):void 0,f=r.tangent?new Float32Array(3*u):void 0,p=r.bitangent?new Float32Array(3*u):void 0,_=r.normal||r.tangent||r.bitangent;if(_){var m=r.tangent||r.bitangent,g=0,x=0,y=0,v=Math.atan2(n-i,t),$=at$7;$.z=Math.sin(v);var b=Math.cos(v),T=mt$2,C=ut$6;for(a=0;a<o;a++){var S=a/o*e$2d.TWO_PI,w=b*Math.cos(S),E=b*Math.sin(S);_&&($.x=w,$.y=E,m&&(T=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,$,T),T)),r.normal&&(d[g++]=$.x,d[g++]=$.y,d[g++]=$.z,d[g++]=$.x,d[g++]=$.y,d[g++]=$.z),r.tangent&&(f[x++]=T.x,f[x++]=T.y,f[x++]=T.z,f[x++]=T.x,f[x++]=T.y,f[x++]=T.z),r.bitangent&&(C=o$1p.normalize(o$1p.cross($,T,C),C),p[y++]=C.x,p[y++]=C.y,p[y++]=C.z,p[y++]=C.x,p[y++]=C.y,p[y++]=C.z))}for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=-1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[y++]=0,p[y++]=-1,p[y++]=0);for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[y++]=0,p[y++]=1,p[y++]=0)}var P=12*o-12,A=ce$z.createTypedArray(u,P),L=0,M=0;for(a=0;a<o-1;a++)A[L++]=M,A[L++]=M+2,A[L++]=M+3,A[L++]=M,A[L++]=M+3,A[L++]=M+1,M+=2;for(A[L++]=s-2,A[L++]=0,A[L++]=1,A[L++]=s-2,A[L++]=1,A[L++]=s-1,a=1;a<o-1;a++)A[L++]=s+a+1,A[L++]=s+a,A[L++]=s;for(a=1;a<o-1;a++)A[L++]=l,A[L++]=l+a,A[L++]=l+a+1;var R=0;if(r.st){var O=Math.max(i,n);for(a=0;a<u;a++){var D=o$1p.fromArray(c,3*a,vt$5);h[R++]=(D.x+O)/(2*O),h[R++]=(D.y+O)/(2*O)}}var I=new a$_;r.position&&(I.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:c})),r.normal&&(I.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:d})),r.tangent&&(I.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:f})),r.bitangent&&(I.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:p})),r.st&&(I.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:h})),M$I.x=.5*t,M$I.y=Math.max(n,i);var F=new i$1d(o$1p.ZERO,o$1o.magnitude(M$I));if(e$2e(e._offsetAttribute)){t=c.length;var B=new Uint8Array(t/3);d$1s(B,e._offsetAttribute===_0x39c22a.NONE?0:1),I.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}return new I$1p({attributes:I,indices:A,primitiveType:W$18.TRIANGLES,boundingSphere:F,offsetAttribute:e._offsetAttribute})}},l$Q.getUnitCylinder=function(){return e$2e(G$O)||(G$O=l$Q.createGeometry(new l$Q({topRadius:1,bottomRadius:1,length:1,vertexFormat:n$13.POSITION_ONLY}))),G$O};var l$P=new o$1o;function d$Z(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=u$Z(e.slices,128),o=Math.max(u$Z(e.numberOfVerticalLines,16),0);if(o$1q.typeOf.number("options.positions",t),o$1q.typeOf.number("options.topRadius",i),o$1q.typeOf.number("options.bottomRadius",n),o$1q.typeOf.number.greaterThanOrEquals("options.slices",r,3),e$2e(e.offsetAttribute)&&e.offsetAttribute===_0x39c22a.TOP)throw new t$15("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=i,this._bottomRadius=n,this._slices=r,this._numberOfVerticalLines=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}d$Z.packedLength=6,d$Z.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i++]=e._numberOfVerticalLines,t[i]=u$Z(e._offsetAttribute,-1),t};var b$P={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};d$Z.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=e[t++],r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return e$2e(i)?(i._length=n,i._topRadius=r,i._bottomRadius=o,i._slices=a,i._numberOfVerticalLines=s,i._offsetAttribute=-1===l?void 0:l,i):(b$P.length=n,b$P.topRadius=r,b$P.bottomRadius=o,b$P.slices=a,b$P.numberOfVerticalLines=s,b$P.offsetAttribute=-1===l?void 0:l,new d$Z(b$P))},d$Z.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._slices,o=e._numberOfVerticalLines;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=2*r,l=I$S.computePositions(t,i,n,r,!1),u=2*r;if(o>0){var c=Math.min(o,r);a=Math.round(r/c),u+=c}var h,d=ce$z.createTypedArray(s,2*u),f=0;for(h=0;h<r-1;h++)d[f++]=h,d[f++]=h+1,d[f++]=h+r,d[f++]=h+1+r;if(d[f++]=r-1,d[f++]=0,d[f++]=r+r-1,d[f++]=r,o>0)for(h=0;h<r;h+=a)d[f++]=h,d[f++]=h+r;var p=new a$_;p.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:l}),l$P.x=.5*t,l$P.y=Math.max(n,i);var _=new i$1d(o$1p.ZERO,o$1o.magnitude(l$P));if(e$2e(e._offsetAttribute)){t=l.length;var m=new Uint8Array(t/3);d$1s(m,e._offsetAttribute===_0x39c22a.NONE?0:1),p.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return new I$1p({attributes:p,indices:d,primitiveType:W$18.LINES,boundingSphere:_,offsetAttribute:e._offsetAttribute})}};var w$F=1953029805,c$I=2917034100;function f$M(e,t){if(f$M.passThroughDataForTesting)return t;o$1q.typeOf.object("key",e),o$1q.typeOf.object("data",t);var i=e.byteLength;if(0===i||i%4!=0)throw new t$13("The length of key must be greater than 0 and a multiple of 4.");var n=new DataView(t),r=n.getUint32(0,!0);if(r===w$F||r===c$I)return t;for(var o,a=new DataView(e),s=0,l=t.byteLength,u=l-l%8,c=i,h=8;s<u;)for(o=h=(h+8)%24;s<u&&o<c;)n.setUint32(s,n.getUint32(s,!0)^a.getUint32(o,!0),!0),n.setUint32(s+4,n.getUint32(s+4,!0)^a.getUint32(o+4,!0),!0),s+=8,o+=24;if(s<l)for(o>=c&&(o=h=(h+8)%24);s<l;)n.setUint8(s,n.getUint8(s)^a.getUint8(o)),s++,o++}function o$L(e){this.proxy=e}function t$A(e,t){if(e=u$Z(e,0),(t=u$Z(t,Number.MAX_VALUE))<=e)throw new t$15("far distance must be greater than near distance.");this.value=new Float32Array([e,t])}f$M.passThroughDataForTesting=!1,o$L.prototype.getURL=function(e){var t=-1===this.proxy.indexOf("?")?"?":"";return this.proxy+t+encodeURIComponent(e)},Object.defineProperties(t$A.prototype,{componentDatatype:{get:function(){return S$14.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}}),t$A.fromDistanceDisplayCondition=function(e){if(!e$2e(e))throw new t$15("distanceDisplayCondition is required.");if(e.far<=e.near)throw new t$15("distanceDisplayCondition.far distance must be greater than distanceDisplayCondition.near distance.");return new t$A(e.near,e.far)},t$A.toValue=function(e,t){if(!e$2e(e))throw new t$15("distanceDisplayCondition is required.");return e$2e(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Ni$4=new o$1p,zi$4=new o$1p,Di$5=new o$1p,Si$4=new o$1p,Ui$3=new o$1p(1,1,1),_i$6=Math.cos,Ci$5=Math.sin;function b$O(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.radii,Ui$3),i=u$Z(e.innerRadii,t),n=u$Z(e.minimumClock,0),r=u$Z(e.maximumClock,e$2d.TWO_PI),o=u$Z(e.minimumCone,0),a=u$Z(e.maximumCone,e$2d.PI),s=Math.round(u$Z(e.stackPartitions,64)),l=Math.round(u$Z(e.slicePartitions,64)),u=u$Z(e.vertexFormat,n$13.DEFAULT);if(l<3)throw new t$15("options.slicePartitions cannot be less than three.");if(s<3)throw new t$15("options.stackPartitions cannot be less than three.");this._radii=o$1p.clone(t),this._innerRadii=o$1p.clone(i),this._minimumClock=n,this._maximumClock=r,this._minimumCone=o,this._maximumCone=a,this._stackPartitions=s,this._slicePartitions=l,this._vertexFormat=n$13.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}b$O.packedLength=2*o$1p.packedLength+n$13.packedLength+7,b$O.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),o$1p.pack(e._radii,t,i),i+=o$1p.packedLength,o$1p.pack(e._innerRadii,t,i),i+=o$1p.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=u$Z(e._offsetAttribute,-1),t};var ki$4=new o$1p,li$4=new o$1p,Pi$5=new n$13,O$x={radii:ki$4,innerRadii:li$4,vertexFormat:Pi$5,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0},ni$3;function t$z(e){e=u$Z(e,{}),this._tilingScheme=e.tilingScheme,e$2e(this._tilingScheme)||(this._tilingScheme=new g$15({ellipsoid:u$Z(e.ellipsoid,t$12.WGS84)})),this._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new o$1h,this._isCreateSkirt=e.isCreateSkirt,this._isSkirtDirty=!1,this._readyPromise=o$1l.resolve(!0)}function n$x(){this._removalFunctions=[]}b$O.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n=o$1p.unpack(e,t,ki$4);t+=o$1p.packedLength;var r=o$1p.unpack(e,t,li$4);t+=o$1p.packedLength;var o=n$13.unpack(e,t,Pi$5);t+=n$13.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return e$2e(i)?(i._radii=o$1p.clone(n,i._radii),i._innerRadii=o$1p.clone(r,i._innerRadii),i._vertexFormat=n$13.clone(o,i._vertexFormat),i._minimumClock=a,i._maximumClock=s,i._minimumCone=l,i._maximumCone=u,i._stackPartitions=c,i._slicePartitions=h,i._offsetAttribute=-1===d?void 0:d,i):(O$x.minimumClock=a,O$x.maximumClock=s,O$x.minimumCone=l,O$x.maximumCone=u,O$x.stackPartitions=c,O$x.slicePartitions=h,O$x.offsetAttribute=-1===d?void 0:d,new b$O(O$x))},b$O.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._vertexFormat,l=e._slicePartitions+1,u=e._stackPartitions+1;(l=Math.round(l*Math.abs(r-n)/e$2d.TWO_PI))<2&&(l=2),(u=Math.round(u*Math.abs(a-o)/e$2d.PI))<2&&(u=2);var c,h,d=0,f=[o],p=[n];for(c=0;c<u;c++)f.push(o+c*(a-o)/(u-1));for(f.push(a),h=0;h<l;h++)p.push(n+h*(r-n)/(l-1));p.push(r);var _=f.length,m=p.length,g=0,x=1,y=i.x!==t.x||i.y!==t.y||i.z!==t.z,v=!1,$=!1,b=!1;y&&(x=2,o>0&&(v=!0,g+=l-1),a<Math.PI&&($=!0,g+=l-1),(r-n)%e$2d.TWO_PI?(b=!0,g+=2*(u-1)+1):g+=1);var T=m*_*x,C=new Float64Array(3*T),S=d$1s(new Array(T),!1),w=d$1s(new Array(T),!1),E=l*u*x,P=6*(E+g+1-(l+u)*x),A=ce$z.createTypedArray(E,P),L=s.normal?new Float32Array(3*T):void 0,M=s.tangent?new Float32Array(3*T):void 0,R=s.bitangent?new Float32Array(3*T):void 0,O=s.st?new Float32Array(2*T):void 0,D=new Array(_),I=new Array(_);for(c=0;c<_;c++)D[c]=Ci$5(f[c]),I[c]=_i$6(f[c]);var F=new Array(m),B=new Array(m);for(h=0;h<m;h++)B[h]=_i$6(p[h]),F[h]=Ci$5(p[h]);for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=t.x*D[c]*B[h],C[d++]=t.y*D[c]*F[h],C[d++]=t.z*I[c];var N,G,z,U,V=T/2;if(y)for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=i.x*D[c]*B[h],C[d++]=i.y*D[c]*F[h],C[d++]=i.z*I[c],S[V]=!0,c>0&&c!==_-1&&0!==h&&h!==m-1&&(w[V]=!0),V++;for(d=0,c=1;c<_-2;c++)for(N=c*m,G=(c+1)*m,h=1;h<m-2;h++)A[d++]=G+h,A[d++]=G+h+1,A[d++]=N+h+1,A[d++]=G+h,A[d++]=N+h+1,A[d++]=N+h;if(y){var k=_*m;for(c=1;c<_-2;c++)for(N=k+c*m,G=k+(c+1)*m,h=1;h<m-2;h++)A[d++]=G+h,A[d++]=N+h,A[d++]=N+h+1,A[d++]=G+h,A[d++]=N+h+1,A[d++]=G+h+1}if(y){if(v)for(U=_*m,c=1;c<m-2;c++)A[d++]=c,A[d++]=c+1,A[d++]=U+c+1,A[d++]=c,A[d++]=U+c+1,A[d++]=U+c;if($)for(z=_*m-m,U=_*m*x-m,c=1;c<m-2;c++)A[d++]=z+c+1,A[d++]=z+c,A[d++]=U+c,A[d++]=z+c+1,A[d++]=U+c,A[d++]=U+c+1}if(b){for(c=1;c<_-2;c++)U=m*_+m*c,z=m*c,A[d++]=U,A[d++]=z+m,A[d++]=z,A[d++]=U,A[d++]=U+m,A[d++]=z+m;for(c=1;c<_-2;c++)U=m*_+m*(c+1)-1,z=m*(c+1)-1,A[d++]=z+m,A[d++]=U,A[d++]=z,A[d++]=z+m,A[d++]=U+m,A[d++]=U}var W=new a$_;s.position&&(W.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:C}));var H,q=0,j=0,X=0,Y=0,Z=T/2,K=t$12.fromCartesian3(t),Q=t$12.fromCartesian3(i);if(s.st||s.normal||s.tangent||s.bitangent){for(c=0;c<T;c++){H=S[c]?Q:K;var J=o$1p.fromArray(C,3*c,Ni$4),ee=H.geodeticSurfaceNormal(J,zi$4);if(s.st){var te=Math.atan2(ee.y,ee.x);te<0&&(te+=e$2d.TWO_PI),O[q++]=te/e$2d.TWO_PI,O[q++]=Math.asin(ee.z)/Math.PI+.5}if(s.normal&&(w[c]&&o$1p.negate(ee,ee),L[j++]=ee.x,L[j++]=ee.y,L[j++]=ee.z),s.tangent||s.bitangent){var ie,ne=Di$5,re=0;if(S[c]&&(re=Z),ie=!v&&c>=re&&c<re+2*m?o$1p.UNIT_X:o$1p.UNIT_Z,o$1p.cross(ie,ee,ne),o$1p.normalize(ne,ne),s.tangent&&(M[X++]=ne.x,M[X++]=ne.y,M[X++]=ne.z),s.bitangent){var oe=o$1p.cross(ee,ne,Si$4);o$1p.normalize(oe,oe),R[Y++]=oe.x,R[Y++]=oe.y,R[Y++]=oe.z}}}s.st&&(W.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:O})),s.normal&&(W.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:L})),s.tangent&&(W.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:M})),s.bitangent&&(W.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:R}))}if(e$2e(e._offsetAttribute)){var ae=C.length,se=new Uint8Array(ae/3);d$1s(se,e._offsetAttribute===_0x39c22a.NONE?0:1),W.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:se})}return new I$1p({attributes:W,indices:A,primitiveType:W$18.TRIANGLES,boundingSphere:i$1d.fromEllipsoid(K),offsetAttribute:e._offsetAttribute})}}},b$O.getUnitEllipsoid=function(){return e$2e(ni$3)||(ni$3=b$O.createGeometry(new b$O({radii:new o$1p(1,1,1),vertexFormat:n$13.POSITION_ONLY}))),ni$3},Object.defineProperties(t$z.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}}}),t$z.prototype.requestTileGeometry=function(e,t,i,n){return o$1l.resolve(new T$L({buffer:new Uint8Array(256),width:16,height:16,skirtMode:this._isCreateSkirt}))},t$z.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},t$z.prototype.getTileDataAvailable=function(e,t,i){},t$z.prototype.loadTileDataAvailability=function(e,t,i){},n$x.prototype.add=function(e,t,i){if(!e$2e(e))throw new t$15("event is required");var n=e.addEventListener(t,i);this._removalFunctions.push(n);var r=this;return function(){n();var e=r._removalFunctions;e.splice(e.indexOf(n),1)}},n$x.prototype.removeAll=function(){for(var e=this._removalFunctions,t=0,i=e.length;t<i;++t)e[t]();e.length=0};var e$Y={NONE:0,HOLD:1,EXTRAPOLATE:2},_0x1015ec=Object.freeze(e$Y);function o$K(){}o$K.prototype.geocode=t$15.throwInstantiationError;var e$X={SEARCH:0,AUTOCOMPLETE:1},c$H=Object.freeze(e$X);function a$F(e,t){return a$K(e,t=u$Z(t,0),Math.min(4,e.length))}function g$M(){this.PI=3.14159265358979,this.param_a=0,this.param_d=1e-12,this.p=206264.8062471,this.a=6378137,this.b=6356752.31414036,this.alpha=.003352810681182319,this.e2=.0066943800229,this.e21=.00673949677548,this.c=6399593.62586,this.K0=1.57048761144159e-7,this.K1=.00505250178820567,this.K2=298472900956587e-19,this.K3=2.41626669230084e-7,this.K4=2.22241238938534e-9,this.alpha=1/298.257222101,this.e4=Math.pow(this.e2,2),this.e6=Math.pow(this.e2,3),this.e8=Math.pow(this.e2,4),this.A=1+.5*this.e2+.375*this.e4+.3125*this.e6+630/2304*this.e8,this.B=1/6*this.e2+15/80*this.e4+.1875*this.e6+420/2304*this.e8,this.C=3/80*this.e4+7/112*this.e6+.078125*this.e8,this.D=1/112*this.e6+45/2304*this.e8,this.E=5/2304*this.e8}function x$M(){this.PI=3.14159265358979,this.param_a=0,this.param_d=1e-12,this.p=206264.8062471,this.a=6378140,this.b=6356755.288157528,this.alpha=.0033528131778969143,this.e2=.00669438499958795,this.e21=.00673950181947292,this.c=6399596.65198801,this.K0=1.57048687472752e-7,this.K1=.00505250559291393,this.K2=298473350966158e-19,this.K3=2.41627215981336e-7,this.K4=2.22241909461273e-9,this.e4=Math.pow(this.e2,2),this.e6=Math.pow(this.e2,3),this.e8=Math.pow(this.e2,4),this.A=1+.5*this.e2+.375*this.e4+.3125*this.e6+630/2304*this.e8,this.B=1/6*this.e2+15/80*this.e4+.1875*this.e6+420/2304*this.e8,this.C=3/80*this.e4+7/112*this.e6+.078125*this.e8,this.D=1/112*this.e6+45/2304*this.e8,this.E=5/2304*this.e8}function E$K(e,t,i,n,r,o){var a=0;a=t>1e6?t-5e5-1e6*r:t-5e5;var s=o.K0*e,l=Math.sin(s),u=s+Math.cos(s)*(o.K1*l-o.K2*Math.pow(l,3)+o.K3*Math.pow(l,5)-o.K4*Math.pow(l,7)),c=Math.tan(u),h=o.e21*Math.pow(Math.cos(u),2),d=Math.sqrt(1+h),f=a/(o.c/d),p=Math.pow(d,2)*c,_=Math.pow(c,2);i.B=u-p*Math.pow(f,2)/2+(5+3*_+h-9*h*_)*p*Math.pow(f,4)/24-(61+90*_+45*Math.pow(_,2))*p*Math.pow(f,6)/720;var m=1/Math.cos(u);i.L=m*f-(1+2*_+h)*m*Math.pow(f,3)/6+(5+28*_+24*Math.pow(_,2)+6*h+8*h*_)*m*Math.pow(f,5)/120+n}function G$N(e,t,i,n,r,o){var a=(t-e)/2,s=(t+e)/2,l=(n+i)/2,u=2*o.b*o.b*l,c=Math.cos(s),h=Math.sin(a),d=[];return d[0]=u*o.A*h*c,d[1]=u*o.B*Math.sin(3*a)*Math.cos(3*s),d[2]=u*o.C*Math.sin(5*a)*Math.cos(5*s),d[3]=u*o.D*Math.sin(7*a)*Math.cos(7*s),d[4]=u*o.E*Math.sin(9*a)*Math.cos(9*s),d[0]-d[1]+d[2]-d[3]+d[4]}function q$K(e,t,i,n){for(var r=0,o=0;o<e.length-1;o++)for(var a=e[o],s=e[o+1],l=a.x,u=a.y,c=s.x,h=s.y,d=s.x-a.x,f=s.y-a.y,p=Math.pow(Math.abs(d),2),_=Math.pow(Math.abs(f),2),m=Math.sqrt(p+_),g=Math.floor(m/70),x=1;x<=g+1;x++){var y=0,v=0;x<g+1?(y=a.x+d*x/(g+1),v=a.y+f*x/(g+1)):(y=c,v=h);var $={B:0,L:0},b={B:0,L:0};E$K(u,l,$,t,i,n),E$K(v,y,b,t,i,n),r+=G$N($.B,b.B,$.L,b.L,t,n),l=y,u=v}return Math.abs(r)}function I$R(e,t,i,n){for(var r=0,o=0;o<e.length-1;o++){var a={B:0,L:0},s={B:0,L:0};E$K(e[o].y,e[o].x,a,t,i,n),E$K(e[o+1].y,e[o+1].x,s,t,i,n);var l=[],u=(s.B-a.B)/2,c=(s.B+a.B)/2,h=(s.L+a.L)/2,d=2*n.b*n.b*h,f=Math.cos(c),p=Math.sin(u);l[0]=d*n.A*f*p,l[1]=d*n.B*Math.sin(3*u)*Math.cos(3*c),l[2]=d*n.C*Math.sin(5*u)*Math.cos(5*c),l[3]=d*n.D*Math.sin(7*u)*Math.cos(7*c),l[4]=d*n.E*Math.sin(9*u)*Math.cos(9*c),r+=l[0]-l[1]+l[2]-l[3]+l[4]}return Math.abs(r)}function R$C(e,t,i,n,r){var o=0,a=e$2d.toRadians(i);if("China2000"===t)o=q$K(e,a,n,new g$M);else if("Xian1980"===t){o=I$R(e,a,n,new x$M)}return o}var tmp={};(function(global,undefined$1){!function(e,t,i){global.protobuf=function i(n){var r=t[n];return r||e[n][0].call(r=t[n]={exports:{}},i,r,r.exports),r.exports}(7)}({1:[function(e,t,i){t.exports=function(e,t){for(var i=[],n=2;n<arguments.length;)i.push(arguments[n++]);var r=!0;return new Promise((function(n,o){i.push((function(e){if(r)if(r=!1,e)o(e);else{for(var t=[],i=1;i<arguments.length;)t.push(arguments[i++]);n.apply(null,t)}}));try{e.apply(t||this,i)}catch(e){r&&(r=!1,o(e))}}))}},{}],2:[function(e,t,i){var n=i;n.length=function(e){var t=e.length;if(!t)return 0;for(var i=0;--t%4>1&&"="===e.charAt(t);)++i;return Math.ceil(3*e.length)/4-i};for(var r=new Array(64),o=new Array(123),a=0;a<64;)o[r[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;n.encode=function(e,t,i){for(var n,o=[],a=0,s=0;t<i;){var l=e[t++];switch(s){case 0:o[a++]=r[l>>2],n=(3&l)<<4,s=1;break;case 1:o[a++]=r[n|l>>4],n=(15&l)<<2,s=2;break;case 2:o[a++]=r[n|l>>6],o[a++]=r[63&l],s=0}}return s&&(o[a++]=r[n],o[a]=61,1===s&&(o[a+1]=61)),String.fromCharCode.apply(String,o)};var s="invalid encoding";n.decode=function(e,t,i){for(var n,r=i,a=0,l=0;l<e.length;){var u=e.charCodeAt(l++);if(61===u&&a>1)break;if((u=o[u])===undefined$1)throw Error(s);switch(a){case 0:n=u,a=1;break;case 1:t[i++]=n<<2|(48&u)>>4,n=u,a=2;break;case 2:t[i++]=(15&n)<<4|(60&u)>>2,n=u,a=3;break;case 3:t[i++]=(3&n)<<6|u,a=0}}if(1===a)throw Error(s);return i-r},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{}],3:[function(e,t,i){function n(){this._listeners={}}t.exports=n,n.prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this},n.prototype.off=function(e,t){if(e===undefined$1)this._listeners={};else if(t===undefined$1)this._listeners[e]=[];else for(var i=this._listeners[e],n=0;n<i.length;)i[n].fn===t?i.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var i=[],n=1;n<arguments.length;)i.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,i)}return this}},{}],4:[function(require,module,exports){function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],5:[function(e,t,i){t.exports=function(e,t,i){var n=i||8192,r=n>>>1,o=null,a=n;return function(i){if(i<1||i>r)return e(i);a+i>n&&(o=e(n),a=0);var s=t.call(o,a,a+=i);return 7&a&&(a=1+(7|a)),s}}},{}],6:[function(e,t,i){var n=i;n.length=function(e){for(var t=0,i=0,n=0;n<e.length;++n)(i=e.charCodeAt(n))<128?t+=1:i<2048?t+=2:55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,i){if(i-t<1)return"";for(var n,r=null,o=[],a=0;t<i;)(n=e[t++])<128?o[a++]=n:n>191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,o)),a=0);return r?(a&&r.push(String.fromCharCode.apply(String,o.slice(0,a))),r.join("")):String.fromCharCode.apply(String,o.slice(0,a))},n.write=function(e,t,i){for(var n,r,o=i,a=0;a<e.length;++a)(n=e.charCodeAt(a))<128?t[i++]=n:n<2048?(t[i++]=n>>6|192,t[i++]=63&n|128):55296==(64512&n)&&56320==(64512&(r=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&r),++a,t[i++]=n>>18|240,t[i++]=n>>12&63|128,t[i++]=n>>6&63|128,t[i++]=63&n|128):(t[i++]=n>>12|224,t[i++]=n>>6&63|128,t[i++]=63&n|128);return i-o}},{}],7:[function(e,t,i){var n=i;function r(){n.Reader._configure(n.BufferReader),n.util._configure()}n.build="minimal",n.roots={},n.Writer=e(14),n.BufferWriter=e(15),n.Reader=e(8),n.BufferReader=e(9),n.util=e(13),n.rpc=e(10),n.configure=r,n.Writer._configure(n.BufferWriter),r()},{10:10,13:13,14:14,15:15,8:8,9:9}],8:[function(e,t,i){t.exports=l;var n,r=e(13),o=r.LongBits,a=r.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var u=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")};function c(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw s(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}l.create=r.Buffer?function(e){return(l.create=function(e){return r.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u,l.prototype._slice=r.Array.prototype.subarray||r.Array.prototype.slice,l.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return h(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|h(this.buf,this.pos+=4)};var f=typeof Float32Array<"u"?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(i,n){return t[0]=i[n],t[1]=i[n+1],t[2]=i[n+2],t[3]=i[n+3],e[0]}:function(i,n){return t[0]=i[n+3],t[1]=i[n+2],t[2]=i[n+1],t[3]=i[n],e[0]}}():function(e,t){var i=h(e,t+4),n=2*(i>>31)+1,r=i>>>23&255,o=8388607&i;return 255===r?o?NaN:n*(1/0):0===r?1401298464324817e-60*n*o:n*Math.pow(2,r-150)*(o+8388608)};l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=f(this.buf,this.pos);return this.pos+=4,e};var p=typeof Float64Array<"u"?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(i,n){return t[0]=i[n],t[1]=i[n+1],t[2]=i[n+2],t[3]=i[n+3],t[4]=i[n+4],t[5]=i[n+5],t[6]=i[n+6],t[7]=i[n+7],e[0]}:function(i,n){return t[0]=i[n+7],t[1]=i[n+6],t[2]=i[n+5],t[3]=i[n+4],t[4]=i[n+3],t[5]=i[n+2],t[6]=i[n+1],t[7]=i[n],e[0]}}():function(e,t){var i=h(e,t+4),n=h(e,t+8),r=2*(n>>31)+1,o=n>>>20&2047,a=4294967296*(1048575&n)+i;return 2047===o?a?NaN:r*(1/0):0===o?5e-324*r*a:r*Math.pow(2,o-1075)*(a+4503599627370496)};l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=p(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,i=this.pos+e;if(i>this.len)throw s(this,e);return this.pos+=e,t===i?new this.buf.constructor(0):this._slice.call(this.buf,t,i)},l.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4==(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){n=e;var t=r.Long?"toLong":"toNumber";r.merge(l.prototype,{int64:function(){return c.call(this)[t](!1)},uint64:function(){return c.call(this)[t](!0)},sint64:function(){return c.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},{13:13}],9:[function(e,t,i){t.exports=o;var n=e(8);(o.prototype=Object.create(n.prototype)).constructor=o;var r=e(13);function o(e){n.call(this,e)}r.Buffer&&(o.prototype._slice=r.Buffer.prototype.slice),o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{13:13,8:8}],10:[function(e,t,i){i.Service=e(11)},{11:11}],11:[function(e,t,i){t.exports=r;var n=e(13);function r(e,t,i){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(i)}(r.prototype=Object.create(n.EventEmitter.prototype)).constructor=r,r.prototype.rpcCall=function e(t,i,r,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,i,r,o);if(!s.rpcImpl)return setTimeout((function(){a(Error("already ended"))}),0),undefined$1;try{return s.rpcImpl(t,i[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,i){if(e)return s.emit("error",e,t),a(e);if(null===i)return s.end(!0),undefined$1;if(!(i instanceof r))try{i=r[s.responseDelimited?"decodeDelimited":"decode"](i)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",i,t),a(null,i)}))}catch(e){return s.emit("error",e,t),setTimeout((function(){a(e)}),0),undefined$1}},r.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{13:13}],12:[function(e,t,i){t.exports=r;var n=e(13);function r(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=r.zero=new r(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var i=e>>>0,n=(e-i)/4294967296>>>0;return t&&(n=~n>>>0,i=~i>>>0,++i>4294967295&&(i=0,++n>4294967295&&(n=0))),new r(i,n)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if(n.isString(e)){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):o},r.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,i=~this.hi>>>0;return t||(i=i+1>>>0),-(t+4294967296*i)}return this.lo+4294967296*this.hi},r.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;r.fromHash=function(e){return e===a?o:new r((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},r.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},r.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:i<128?9:10}},{13:13}],13:[function(e,t,i){var n=i;function r(e,t,i){for(var n=Object.keys(t),r=0;r<n.length;++r)(e[n[r]]===undefined$1||!i)&&(e[n[r]]=t[n[r]]);return e}function o(e){function t(e,i){if(!(this instanceof t))return new t(e,i);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),i&&r(this,i)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=e(1),n.base64=e(2),n.EventEmitter=e(3),n.inquire=e(4),n.utf8=e(6),n.pool=e(5),n.LongBits=e(12),n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)},n.Array=typeof Uint8Array<"u"?Uint8Array:Array,n.Long=global.dcodeIO&&global.dcodeIO.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var i=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(i.lo,i.hi,t):i.toNumber(Boolean(t))},n.merge=r,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},i=0;i<e.length;++i)t[e[i]]=1;return function(){for(var e=Object.keys(this),i=e.length-1;i>-1;--i)if(1===t[e[i]]&&this[e[i]]!==undefined$1&&null!==this[e[i]])return e[i]}},n.oneOfSetter=function(e){return function(t){for(var i=0;i<e.length;++i)e[i]!==t&&delete this[e[i]]}},n.lazyResolve=function(e,t){for(var i=0;i<t.length;++i)for(var n=Object.keys(t[i]),r=0;r<n.length;++r){for(var o=t[i][n[r]].split("."),a=e;o.length;)a=a[o.shift()];t[i][n[r]]=a}},n.toJSONOptions={longs:String,enums:String,bytes:String},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,i){return new e(t,i)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},{1:1,12:12,2:2,3:3,4:4,5:5,6:6}],14:[function(e,t,i){t.exports=h;var n,r=e(13),o=r.LongBits,a=r.base64,s=r.utf8;function l(e,t,i){this.fn=e,this.len=t,this.next=undefined$1,this.val=i}function u(){}function c(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function h(){this.len=0,this.head=new l(u,0,0),this.tail=this.head,this.states=null}function d(e,t,i){t[i]=255&e}function f(e,t){this.len=e,this.next=undefined$1,this.val=t}function p(e,t,i){for(;e.hi;)t[i++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[i++]=127&e.lo|128,e.lo=e.lo>>>7;t[i++]=e.lo}function _(e,t,i){t[i++]=255&e,t[i++]=e>>>8&255,t[i++]=e>>>16&255,t[i]=e>>>24}h.create=r.Buffer?function(){return(h.create=function(){return new n})()}:function(){return new h},h.alloc=function(e){return new r.Array(e)},r.Array!==Array&&(h.alloc=r.pool(h.alloc,r.Array.prototype.subarray)),h.prototype.push=function(e,t,i){return this.tail=this.tail.next=new l(e,t,i),this.len+=t,this},f.prototype=Object.create(l.prototype),f.prototype.fn=function(e,t,i){for(;e>127;)t[i++]=127&e|128,e>>>=7;t[i]=e},h.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},h.prototype.int32=function(e){return e<0?this.push(p,10,o.fromNumber(e)):this.uint32(e)},h.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},h.prototype.uint64=function(e){var t=o.from(e);return this.push(p,t.length(),t)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this.push(p,t.length(),t)},h.prototype.bool=function(e){return this.push(d,1,e?1:0)},h.prototype.fixed32=function(e){return this.push(_,4,e>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(e){var t=o.from(e);return this.push(_,4,t.lo).push(_,4,t.hi)},h.prototype.sfixed64=h.prototype.fixed64;var m=typeof Float32Array<"u"?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(i,n,r){e[0]=i,n[r++]=t[0],n[r++]=t[1],n[r++]=t[2],n[r]=t[3]}:function(i,n,r){e[0]=i,n[r++]=t[3],n[r++]=t[2],n[r++]=t[1],n[r]=t[0]}}():function(e,t,i){var n=e<0?1:0;if(n&&(e=-e),0===e)_(1/e>0?0:2147483648,t,i);else if(isNaN(e))_(2147483647,t,i);else if(e>34028234663852886e22)_((n<<31|2139095040)>>>0,t,i);else if(e<11754943508222875e-54)_((n<<31|Math.round(e/1401298464324817e-60))>>>0,t,i);else{var r=Math.floor(Math.log(e)/Math.LN2);_((n<<31|r+127<<23|8388607&Math.round(e*Math.pow(2,-r)*8388608))>>>0,t,i)}};h.prototype.float=function(e){return this.push(m,4,e)};var g=typeof Float64Array<"u"?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(i,n,r){e[0]=i,n[r++]=t[0],n[r++]=t[1],n[r++]=t[2],n[r++]=t[3],n[r++]=t[4],n[r++]=t[5],n[r++]=t[6],n[r]=t[7]}:function(i,n,r){e[0]=i,n[r++]=t[7],n[r++]=t[6],n[r++]=t[5],n[r++]=t[4],n[r++]=t[3],n[r++]=t[2],n[r++]=t[1],n[r]=t[0]}}():function(e,t,i){var n=e<0?1:0;if(n&&(e=-e),0===e)_(0,t,i),_(1/e>0?0:2147483648,t,i+4);else if(isNaN(e))_(4294967295,t,i),_(2147483647,t,i+4);else if(e>17976931348623157e292)_(0,t,i),_((n<<31|2146435072)>>>0,t,i+4);else{var r;if(e<22250738585072014e-324)_((r=e/5e-324)>>>0,t,i),_((n<<31|r/4294967296)>>>0,t,i+4);else{var o=Math.floor(Math.log(e)/Math.LN2);1024===o&&(o=1023),_(4503599627370496*(r=e*Math.pow(2,-o))>>>0,t,i),_((n<<31|o+1023<<20|1048576*r&1048575)>>>0,t,i+4)}}};h.prototype.double=function(e){return this.push(g,8,e)};var x=r.Array.prototype.set?function(e,t,i){t.set(e,i)}:function(e,t,i){for(var n=0;n<e.length;++n)t[i+n]=e[n]};h.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this.push(d,1,0);if(r.isString(e)){var i=h.alloc(t=a.length(e));a.decode(e,i,0),e=i}return this.uint32(t).push(x,t,e)},h.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t).push(s.write,t,e):this.push(d,1,0)},h.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(u,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},h.prototype.ldelim=function(){var e=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=e.next,this.tail=t,this.len+=i),this},h.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),i=0;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t},h._configure=function(e){n=e}},{13:13}],15:[function(e,t,i){t.exports=a;var n=e(14);(a.prototype=Object.create(n.prototype)).constructor=a;var r=e(13),o=r.Buffer;function a(){n.call(this)}a.alloc=function(e){return(a.alloc=r._Buffer_allocUnsafe)(e)};var s=o&&o.prototype instanceof Uint8Array&&"set"===o.prototype.set.name?function(e,t,i){t.set(e,i)}:function(e,t,i){if(e.copy)e.copy(t,i,0,e.length);else for(var n=0;n<e.length;)t[i++]=e[n++]};function l(e,t,i){e.length<40?r.utf8.write(e,t,i):t.utf8Write(e,i)}a.prototype.bytes=function(e){r.isString(e)&&(e=r._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(s,t,e),this},a.prototype.string=function(e){var t=o.byteLength(e);return this.uint32(t),t&&this.push(l,t,e),this}},{13:13,14:14}]},{})})(tmp);var R$B=tmp.protobuf,d$Y=[1,2,4,8],a$E=15,m$J=16,p$K=64,y$G=128;function e$W(e,t,i,n,r,o){this._bits=e,this.cnodeVersion=t,this.imageryVersion=i,this.terrainVersion=n,this.imageryProvider=r,this.terrainProvider=o,this.ancestorHasTerrain=!1,this.terrainState=void 0}function U$I(e){for(var t=e.length,i=new ArrayBuffer(t),n=new Uint8Array(i),r=0;r<t;++r)n[r]=e.charCodeAt(r);return i}e$W.clone=function(e,t){return e$2e(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new e$W(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t},e$W.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},e$W.prototype.hasSubtree=function(){return i$Q(this._bits,m$J)},e$W.prototype.hasImagery=function(){return i$Q(this._bits,p$K)},e$W.prototype.hasTerrain=function(){return i$Q(this._bits,y$G)},e$W.prototype.hasChildren=function(){return i$Q(this._bits,a$E)},e$W.prototype.hasChild=function(e){return i$Q(this._bits,d$Y[e])},e$W.prototype.getChildBitmask=function(){return this._bits&a$E};var X$C=U$I('Eô½\vyâjE"’,ÍqøIFgQ\0B%Æèa,f)\bÆ4Üjb%y\nwmiÖðœk“¡½NuàA[ß@V\fÙ»r›|3SîOlÔq°{ÀEVZ­wUe\v3’*¬l5Å0sø3>mF8J´Ýð.ÝuڌDt"úa"\f3"So¯9D\vŒ9Ù9L¹¿«\\ŒP_Ÿ"uxéq‘h;Áěð<VqH‚\'UfYNe˜u£aF}a?A\0Ÿ×´4M·F°Õ¸Š\'{‹Ü+»Mg0ÈÑö\\Pú[/F›n5/\'C.ë\n\f^¥se4ål.jC\'c#U©?q{gC}:¯ÍâTUœýKÆâŸ/(íË\\Æ-fˆ§;/*"N°k.Ý\r•}}GºC²²+>Mª>}æÎI‰Ææx\fa1-¤O¥~q ˆì\r1èN\v\0nPh}=\b\r•¦n£h—$[kó#ó¶s³\r\v@ÀŸØQ]ú".jßI\0¹ wUÆïj¿{GLƒîÜÜF…©­S+S4ÿ”Yä8è1ƒN¹XFkË-#†’p\x005ˆ"Ï1²&/çÃu-6,rt°#G·ÓÑ&…7râ\0ŒDÏÚ3-Þ`†i#i*|ÍKQ\r•T9w.)ê¦P¢joP™\\>TûïP[\vE‰m(w7ێJfJo™ åpâ¹q~\fmI-zþrÇòY0»]såÉ êxì ðŠB|G`°½&·q¶ÇŸÑ3‚=Ó«îc™È+S D\\qÆÌD2O<ÊÀ)=RÓaX©}e´ÜÏ\rô=ñ\b©BÚ#\tØ¿^PIøMÀËGLO÷{+ØÅ1’;µoÜl\r’ˆўÛ?âéÚ_ԄâFaZÞUϤ\0¾ýÎgñJi—æ HØ]~®q N®ÀV©‘<‚rçvì)IÖ]-ƒãÛ6©;f—‡jÕ¶=P^R¹KÇsWxÉô.Y•“oÐKW>\'\'Ç`Û;íšSD>?’mw¢\në?R¨ÆU^1I7…ôÅ&-©¿‹\'TÚÃj å*x°Öprª‹h½ˆ÷_H±~ÀXL?fù>áeÀp§Ï8i¯ðVldIœ\'­xtO‡ÞV9\0Úw\vË-‰û5Oõ\bQ`Á\nZGM&30xÚÀœFGâ[y`In7gS\n>éìF9²ñ4\rƄSuná\fYÙÞ)…{II¥wy¾IV.6ç\v:»Ob{ÒM1•/½8{¨O!áìFpv•})"xˆ\nÝ\\ÚÞQÏðüYRe|3ßóHÚ»*uÛ`²Ôüíì5¨ÿ(1-È܈F|Š["');function c$G(e){o$1q.defined("resourceOrUrl",e);var t=e;"string"!=typeof t&&!(t instanceof t$10)&&(o$1q.typeOf.string("resourceOrUrl.url",e.url),t=e.url);var i=t$10.createIfNeeded(t);i.appendForwardSlash(),this._resource=i,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=e$2d.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};var n=this;this._readyPromise=z$H(this).then((function(){return n.getQuadTreePacket("",n._quadPacketVersion)})).then((function(){return!0})).otherwise((function(e){var t="An error occurred while accessing "+B$E(n,"",1).url+".";return o$1l.reject(new t$13(t))}))}Object.defineProperties(c$G.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}}),c$G.tileXYToQuadKey=function(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n},c$G.quadKeyToTileXY=function(e){for(var t=0,i=0,n=e.length-1,r=n;r>=0;--r){var o=1<<r,a=+e[n-r];i$Q(a,2)?i$Q(a,1)||(t|=o):(i|=o,i$Q(a,1)&&(t|=o))}return{x:t,y:i,level:n}},c$G.prototype.isValid=function(e){var t=this.getTileInformationFromQuadKey(e);if(e$2e(t))return null!==t;for(var i,n=!0,r=e;r.length>1;){if(i=r.substring(r.length-1),r=r.substring(0,r.length-1),e$2e(t=this.getTileInformationFromQuadKey(r))){!t.hasSubtree()&&!t.hasChild(parseInt(i))&&(n=!1);break}if(null===t){n=!1;break}}return n};var k$C=new i$W("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY),w$E,I$Q;function P$D(e,t,i){var n=e._tileInfo,r=t,o=n[r];if(e$2e(o)&&(!o.hasSubtree()||o.hasChildren()))return o;for(;void 0===o&&r.length>1;)o=n[r=r.substring(0,r.length-1)];var a,s=e._subtreePromises,l=s[r];return e$2e(l)?l.then((function(){return a=new r$1c({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),P$D(e,t,a)})):e$2e(o)&&o.hasSubtree()?e$2e(l=e.getQuadTreePacket(r,o.cnodeVersion,i))?(s[r]=l,l.then((function(){return a=new r$1c({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),P$D(e,t,a)})).always((function(){delete s[r]}))):void 0:o$1l.reject(new t$13("Couldn't load metadata for tile "+t))}function B$E(e,t,i,n){return e._resource.getDerivedResource({url:"flatfile?q2-0"+t+"-q."+i.toString(),request:n})}function z$H(e){var t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!e$2e(I$Q)){var i=n$17("ThirdParty/google-earth-dbroot-parser.js"),n=window.cesiumGoogleEarthDbRootParser;I$Q=a$11(i).then((function(){w$E=window.cesiumGoogleEarthDbRootParser(R$B),e$2e(n)?window.cesiumGoogleEarthDbRootParser=n:delete window.cesiumGoogleEarthDbRootParser}))}return I$Q.then((function(){return t.fetchArrayBuffer()})).then((function(t){var i=w$E.EncryptedDbRootProto.decode(new Uint8Array(t)),n=i.encryptionData,r=n.byteOffset,o=r+n.byteLength,a=e.key=n.buffer.slice(r,o);o=(r=(n=i.dbrootData).byteOffset)+n.byteLength;var s=n.buffer.slice(r,o);return k$C.scheduleTask({buffer:s,type:"DbRoot",key:a},[s])})).then((function(t){var i=w$E.DbRootProto.decode(new Uint8Array(t.buffer));if(e.imageryPresent=u$Z(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=u$Z(i.terrainPresent,e.terrainPresent),e$2e(i.endSnippet)&&e$2e(i.endSnippet.model)){var n=i.endSnippet.model;e.negativeAltitudeExponentBias=u$Z(n.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=u$Z(n.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)}e$2e(i.databaseVersion)&&(e._quadPacketVersion=u$Z(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));for(var r=e.providers,o=u$Z(i.providerInfo,[]),a=o.length,s=0;s<a;++s){var l=o[s],u=l.copyrightString;e$2e(u)&&(r[l.providerId]=new r$U(u.value))}})).otherwise((function(){console.log("Failed to retrieve "+t.url+". Using defaults."),e.key=X$C}))}function T$I(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.typeOf.object("options.buffer",e.buffer),o$1q.typeOf.number("options.negativeAltitudeExponentBias",e.negativeAltitudeExponentBias),o$1q.typeOf.number("options.negativeElevationThreshold",e.negativeElevationThreshold),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;var t=u$Z(e.childTileMask,15),i=3&t;i|=4&t?8:0,i|=8&t?4:0,this._childTileMask=i,this._createdByUpsampling=u$Z(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}c$G.prototype.getQuadTreePacket=function(e,t,i){t=u$Z(t,1);var n=B$E(this,e=u$Z(e,""),t,i).fetchArrayBuffer();if(e$2e(n)){var r=this._tileInfo,o=this.key;return n.then((function(t){return k$C.scheduleTask({buffer:t,quadKey:e,type:"Metadata",key:o},[t]).then((function(t){var i,n=-1;if(""!==e){n=e.length+1;var o=t[e];(i=r[e])._bits|=o._bits,delete t[e]}var a=Object.keys(t);a.sort((function(e,t){return e.length-t.length}));for(var s=a.length,l=0;l<s;++l){var u=a[l];if(null!==t[u]){var c=e$W.clone(t[u]),h=u.length;if(h===n)c.setParent(i);else if(h>1){var d=r[u.substring(0,u.length-1)];c.setParent(d)}r[u]=c}else r[u]=null}}))}))}},c$G.prototype.populateSubtree=function(e,t,i,n){return P$D(this,c$G.tileXYToQuadKey(e,t,i),n)},c$G.prototype.getTileInformation=function(e,t,i){var n=c$G.tileXYToQuadKey(e,t,i);return this._tileInfo[n]},c$G.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]},Object.defineProperties(T$I.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var te$s=new i$W("createVerticesFromGoogleEarthEnterpriseBuffer"),F$I=new h$18,z$G=new h$18;T$I.prototype.createMesh=function(e,t,i,n,r){o$1q.typeOf.object("tilingScheme",e),o$1q.typeOf.number("x",t),o$1q.typeOf.number("y",i),o$1q.typeOf.number("level",n);var o=e.ellipsoid;e.tileXYToNativeRectangle(t,i,n,F$I),e.tileXYToRectangle(t,i,n,z$G),r=u$Z(r,1);var a=o.cartographicToCartesian(h$18.center(z$G)),s=40075.16/(1<<n);this._skirtHeight=Math.min(8*s,1e3);var l=te$s.scheduleTask({buffer:this._buffer,nativeRectangle:F$I,rectangle:z$G,relativeToCenter:a,ellipsoid:o,skirtHeight:this._skirtHeight,exaggeration:r,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(e$2e(l)){var u=this;return l.then((function(e){return u._mesh=new T$M(a,new Float32Array(e.vertices),new Uint16Array(e.indices),e.indexCountWithoutSkirts,e.vertexCountWithoutSkirts,e.minimumHeight,e.maximumHeight,i$1d.clone(e.boundingSphere3D),o$1p.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,y$Y.clone(e.orientedBoundingBox),h$M.clone(e.encoding),r,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast),u._minimumHeight=e.minimumHeight,u._maximumHeight=e.maximumHeight,u._buffer=void 0,u._mesh}))}},T$I.prototype.interpolateHeight=function(e,t,i){var n=e$2d.clamp((t-e.west)/e.width,0,1),r=e$2d.clamp((i-e.south)/e.height,0,1);return e$2e(this._mesh)?oe$l(this,n,r):de$j(this,n,r,e)};var ie$q=new i$W("upsampleQuantizedTerrainMesh");T$I.prototype.upsample=function(e,t,i,n,r,o,a){if(o$1q.typeOf.object("tilingScheme",e),o$1q.typeOf.number("thisX",t),o$1q.typeOf.number("thisY",i),o$1q.typeOf.number("thisLevel",n),o$1q.typeOf.number("descendantX",r),o$1q.typeOf.number("descendantY",o),o$1q.typeOf.number("descendantLevel",a),a-n>1)throw new t$15("Upsampling through more than one level at a time is not currently supported.");var s=this._mesh;if(e$2e(this._mesh)){var l=2*t!==r,u=2*i===o,c=e.ellipsoid,h=e.tileXYToRectangle(r,o,a),d=ie$q.scheduleTask({vertices:s.vertices,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:l,isNorthChild:u,childRectangle:h,ellipsoid:c,exaggeration:s.exaggeration});if(e$2e(d)){var f=this;return d.then((function(e){var t=new Uint16Array(e.vertices),i=ce$z.createTypedArray(t.length/3,e.indices),n=f._skirtHeight;return new p$O({quantizedVertices:t,indices:i,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:i$1d.clone(e.boundingSphere),orientedBoundingBox:y$Y.clone(e.orientedBoundingBox),horizonOcclusionPoint:o$1p.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:n,southSkirtHeight:n,eastSkirtHeight:n,northSkirtHeight:n,childTileMask:0,createdByUpsampling:!0,credits:f._credits})}))}}},T$I.prototype.isChildAvailable=function(e,t,i,n){o$1q.typeOf.number("thisX",e),o$1q.typeOf.number("thisY",t),o$1q.typeOf.number("childX",i),o$1q.typeOf.number("childY",n);var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},T$I.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var re$v=new o$1o,ne$s=new o$1o,ae$p=new o$1o,Y$w=new o$1p;function oe$l(e,t,i){for(var n=e._mesh,r=n.vertices,o=n.encoding,a=n.indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=o.decodeTextureCoordinates(r,u,re$v),f=o.decodeTextureCoordinates(r,c,ne$s),p=o.decodeTextureCoordinates(r,h,ae$p),_=d$10.computeBarycentricCoordinates(t,i,d.x,d.y,f.x,f.y,p.x,p.y,Y$w);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){var m=o.decodeHeight(r,u),g=o.decodeHeight(r,c),x=o.decodeHeight(r,h);return _.x*m+_.y*g+_.z*x}}}var se$m=Uint16Array.BYTES_PER_ELEMENT,L$P=Uint32Array.BYTES_PER_ELEMENT,P$C=Int32Array.BYTES_PER_ELEMENT,he$j=Float32Array.BYTES_PER_ELEMENT,U$H=Float64Array.BYTES_PER_ELEMENT;function de$j(e,t,i,n){var r=e._buffer,o=0,a=0,s=0;i>.5?(t>.5?(o=2,a=.5):o=3,s=.5):t>.5&&(o=1,a=.5);for(var l=new DataView(r),u=0,c=0;c<o;++c)u+=l.getUint32(u,!0),u+=L$P;u+=L$P,u+=2*U$H;var h=e$2d.toRadians(180*l.getFloat64(u,!0));u+=U$H;var d=e$2d.toRadians(180*l.getFloat64(u,!0));u+=U$H;var f=n.width/h/2,p=n.height/d/2,_=l.getInt32(u,!0);u+=P$C;var m=3*l.getInt32(u,!0);u+=P$C,u+=P$C;var g,x=new Array(_),y=new Array(_),v=new Array(_);for(g=0;g<_;++g)x[g]=a+l.getUint8(u++)*f,y[g]=s+l.getUint8(u++)*p,v[g]=6371010*l.getFloat32(u,!0),u+=he$j;var $=new Array(m);for(g=0;g<m;++g)$[g]=l.getUint16(u,!0),u+=se$m;for(g=0;g<m;g+=3){var b=$[g],T=$[g+1],C=$[g+2],S=x[b],w=x[T],E=x[C],P=y[b],A=y[T],L=y[C],M=d$10.computeBarycentricCoordinates(t,i,S,P,w,A,E,L,Y$w);if(M.x>=-1e-15&&M.y>=-1e-15&&M.z>=-1e-15)return M.x*v[b]+M.y*v[T]+M.z*v[C]}}var d$X={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},S$F=new a$15;function I$P(){this._terrainCache={},this._lastTidy=a$15.now()}function _$B(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url)&&!e$2e(e.metadata))throw new t$15("options.url or options.metadata is required.");var t;if(e$2e(e.metadata))t=e.metadata;else{var i=t$10.createIfNeeded(e.url);t=new c$G(i)}this._metadata=t,this._tilingScheme=new g$15({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new h$18(-e$2d.PI,-e$2d.PI,e$2d.PI,e$2d.PI),ellipsoid:e.ellipsoid});var n=e.credit;"string"==typeof n&&(n=new r$U(n)),this._credit=n,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new I$P,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new o$1h,this._ready=!1;var r,o=this;this._readyPromise=t.readyPromise.then((function(e){if(!t.terrainPresent){var i=new t$13("The server "+t.url+" doesn't have terrain");return r=l$V.handleError(r,o,o._errorEvent,i.message,void 0,void 0,void 0,i),o$1l.reject(i)}return l$V.handleSuccess(r),o._ready=e,e})).otherwise((function(e){return r=l$V.handleError(r,o,o._errorEvent,e.message,void 0,void 0,void 0,e),o$1l.reject(e)}))}I$P.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:a$15.now()}},I$P.prototype.get=function(e){var t=this._terrainCache[e];if(e$2e(t))return delete this._terrainCache[e],t.buffer},I$P.prototype.tidy=function(){if(a$15.now(S$F),a$15.secondsDifference(S$F,this._lastTidy)>10){for(var e=this._terrainCache,t=Object.keys(e),i=t.length,n=0;n<i;++n){var r=t[n],o=e[r];a$15.secondsDifference(S$F,o.timestamp)>10&&delete e[r]}a$15.clone(S$F,this._lastTidy)}},Object.defineProperties(_$B.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var z$F=new i$W("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY);function G$M(e,t,i){var n=t.getChildBitmask();if(t.terrainState===d$X.PARENT){n=0;for(var r=0;r<4;++r){var o=i.getTileInformationFromQuadKey(e+r.toString());e$2e(o)&&o.hasTerrain()&&(n|=1<<r)}}return n}function $$D(e,t,i,n){return i=e$2e(i)&&i>0?i:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1c-0"+t+"-t."+i.toString(),request:n})}_$B.prototype.requestTileGeometry=function(e,t,i,n){if(!this._ready)throw new t$15("requestTileGeometry must not be called before the terrain provider is ready.");var r=c$G.tileXYToQuadKey(e,t,i),o=this._terrainCache,a=this._metadata,s=a.getTileInformationFromQuadKey(r);if(!e$2e(s))return o$1l.reject(new t$13("Terrain tile doesn't exist"));var l=s.terrainState;e$2e(l)||(l=s.terrainState=d$X.UNKNOWN);var u=o.get(r);if(e$2e(u)){var c=a.providers[s.terrainProvider];return o$1l.resolve(new T$I({buffer:u,childTileMask:G$M(r,s,a),credits:e$2e(c)?[c]:void 0,negativeAltitudeExponentBias:a.negativeAltitudeExponentBias,negativeElevationThreshold:a.negativeAltitudeThreshold}))}if(o.tidy(),!s.ancestorHasTerrain)return o$1l.resolve(new T$L({buffer:new Uint8Array(256),width:16,height:16}));if(l===d$X.NONE)return o$1l.reject(new t$13("Terrain tile doesn't exist"));var h,d=r,f=-1;switch(l){case d$X.SELF:f=s.terrainVersion;break;case d$X.PARENT:d=d.substring(0,d.length-1),f=(h=a.getTileInformationFromQuadKey(d)).terrainVersion;break;case d$X.UNKNOWN:s.hasTerrain()?f=s.terrainVersion:(d=d.substring(0,d.length-1),e$2e(h=a.getTileInformationFromQuadKey(d))&&h.hasTerrain()&&(f=h.terrainVersion))}if(f<0)return o$1l.reject(new t$13("Terrain tile doesn't exist"));var p,_,m=this._terrainPromises,g=this._terrainRequests;if(e$2e(m[d]))p=m[d],_=g[d];else{var x=$$D(this,d,f,_=n).fetchArrayBuffer();if(!e$2e(x))return;p=x.then((function(e){return e$2e(e)?z$F.scheduleTask({buffer:e,type:"Terrain",key:a.key},[e]).then((function(e){var t=a.getTileInformationFromQuadKey(d);t.terrainState=d$X.SELF,o.add(d,e[0]);for(var i=t.terrainProvider,n=e.length-1,r=0;r<n;++r){var s=d+r.toString(),l=a.getTileInformationFromQuadKey(s);e$2e(l)&&(o.add(s,e[r+1]),l.terrainState=d$X.PARENT,0===l.terrainProvider&&(l.terrainProvider=i))}})):o$1l.reject(new t$13("Failed to load terrain."))})),m[d]=p,g[d]=_,p=p.always((function(){delete m[d],delete g[d]}))}return p.then((function(){var e=o.get(r);if(e$2e(e)){var t=a.providers[s.terrainProvider];return new T$I({buffer:e,childTileMask:G$M(r,s,a),credits:e$2e(t)?[t]:void 0,negativeAltitudeExponentBias:a.negativeAltitudeExponentBias,negativeElevationThreshold:a.negativeAltitudeThreshold})}return o$1l.reject(new t$13("Failed to load terrain."))})).otherwise((function(e){return _.state===W$1c.CANCELLED?(n.state=_.state,o$1l.reject(e)):(s.terrainState=d$X.NONE,o$1l.reject(e))}))},_$B.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},_$B.prototype.getTileDataAvailable=function(e,t,i){var n=this._metadata,r=c$G.tileXYToQuadKey(e,t,i),o=n.getTileInformation(e,t,i);if(null===o)return!1;if(e$2e(o)){if(!o.ancestorHasTerrain)return!0;var a=o.terrainState;if(a===d$X.NONE)return!1;if(!(e$2e(a)&&a!==d$X.UNKNOWN||(o.terrainState=d$X.UNKNOWN,o.hasTerrain()))){r=r.substring(0,r.length-1);var s=n.getTileInformationFromQuadKey(r);if(!e$2e(s)||!s.hasTerrain())return!1}return!0}if(n.isValid(r)){var l=new r$1c({throttle:!0,throttleByServer:!0,type:U$1f.TERRAIN});n.populateSubtree(e,t,i,l)}return!1},_$B.prototype.loadTileDataAvailability=function(e,t,i){};var K$D=e$2d.factorial;function k$B(e,t,i,n,r,o){var a,s,l,u=0;if(n>0){for(s=0;s<r;s++){for(a=!1,l=0;l<o.length&&!a;l++)s===o[l]&&(a=!0);a||(o.push(s),u+=k$B(e,t,i,n-1,r,o),o.splice(o.length-1,1))}return u}for(u=1,s=0;s<r;s++){for(a=!1,l=0;l<o.length&&!a;l++)s===o[l]&&(a=!0);a||(u*=e-i[t[s]])}return u}var E$J={type:"Hermite",getRequiredDataPoints:function(e,t){if(t=u$Z(t,0),!e$2e(e))throw new t$15("degree is required.");if(e<0)throw new t$15("degree must be 0 or greater.");if(t<0)throw new t$15("inputOrder must be 0 or greater.");return Math.max(Math.floor((e+1)/(t+1)),2)},interpolateOrderZero:function(e,t,i,n,r){e$2e(r)||(r=new Array(n));var o,a,s,l,u,c=t.length,h=new Array(n);for(o=0;o<n;o++){r[o]=0;var d=new Array(c);for(h[o]=d,a=0;a<c;a++)d[a]=[]}var f=c,p=new Array(f);for(o=0;o<f;o++)p[o]=o;var _=c-1;for(l=0;l<n;l++){for(a=0;a<f;a++)u=p[a]*n+l,h[l][0].push(i[u]);for(o=1;o<f;o++){var m=!1;for(a=0;a<f-o;a++){var g,x=t[p[a]],y=t[p[a+o]];y-x<=0?(g=i[u=p[a]*n+n*o+l],h[l][o].push(g/K$D(o))):(g=h[l][o-1][a+1]-h[l][o-1][a],h[l][o].push(g/(y-x))),m=m||0!==g}m||(_=o-1)}}for(s=0,0;s<=0;s++)for(o=s;o<=_;o++){var v=k$B(e,p,t,s,o,[]);for(l=0;l<n;l++){var $=h[l][o][0];r[l+s*n]+=$*v}}return r}},Q$F=[];function U$G(e,t,i,n,r,o){for(var a,s,l=-1,u=t.length,c=u*(u+1)/2,h=0;h<r;h++){var d=Math.floor(h*c);for(a=0;a<u;a++)s=t[a]*r*(o+1)+h,e[d+a]=n[s];for(var f=1;f<u;f++){var p=0,_=Math.floor(f*(1-f)/2)+u*f,m=!1;for(a=0;a<u-f;a++){var g,x,y=i[t[a]],v=i[t[a+f]];if(v-y<=0)x=(g=n[s=t[a]*r*(o+1)+r*f+h])/e$2d.factorial(f),e[d+_+p]=x,p++;else{var $=Math.floor((f-1)*(2-f)/2)+u*(f-1);x=(g=e[d+$+a+1]-e[d+$+a])/(v-y),e[d+_+p]=x,p++}m=m||0!==g}m&&(l=Math.max(l,f))}}return l}function o$J(e,t,i,n){this.rightAscension=e,this.declination=t,this.rotation=i,this.rotationRate=n}E$J.interpolate=function(e,t,i,n,r,o,a){var s=n*(o+1);e$2e(a)||(a=new Array(s));for(var l=0;l<s;l++)a[l]=0;var u,c=t.length,h=new Array(c*(r+1));for(u=0;u<c;u++)for(var d=0;d<r+1;d++)h[u*(r+1)+d]=u;for(var f=h.length,p=Q$F,_=U$G(p,h,t,i,n,r),m=[],g=f*(f+1)/2,x=Math.min(_,o),y=0;y<=x;y++)for(u=y;u<=_;u++){m.length=0;for(var v=k$B(e,h,t,y,u,m),$=Math.floor(u*(1-u)/2)+f*u,b=0;b<n;b++){var T=p[Math.floor(b*g)+$];a[b+y*n]+=T*v}}return a};var y$F={},_0=32.184,h0$1=2451545,L$O=-.0529921,b$N=-.1059842,j$E=13.0120009,k$A=13.3407154,q$J=.9856003,z$E=26.4057084,B$D=13.064993,F$H=.3287146,H$I=1.7484877,K$C=-.1589763,Q$E=.0036096,V$y=.1643573,W$I=12.9590088,s$D=new a$15;function h$I(e){(!e$2e(e)||"function"!=typeof e)&&(e=y$F.ComputeMoon),this._computeFunction=e}y$F.ComputeMoon=function(e,t){e$2e(e)||(e=a$15.now()),s$D=a$15.addSeconds(e,_0,s$D);var i=a$15.totalDays(s$D)-h0$1,n=i/h$17.DAYS_PER_JULIAN_CENTURY,r=(125.045+L$O*i)*e$2d.RADIANS_PER_DEGREE,o=(250.089+b$N*i)*e$2d.RADIANS_PER_DEGREE,a=(260.008+j$E*i)*e$2d.RADIANS_PER_DEGREE,s=(176.625+k$A*i)*e$2d.RADIANS_PER_DEGREE,l=(357.529+q$J*i)*e$2d.RADIANS_PER_DEGREE,u=(311.589+z$E*i)*e$2d.RADIANS_PER_DEGREE,c=(134.963+B$D*i)*e$2d.RADIANS_PER_DEGREE,h=(276.617+F$H*i)*e$2d.RADIANS_PER_DEGREE,d=(34.226+H$I*i)*e$2d.RADIANS_PER_DEGREE,f=(15.134+K$C*i)*e$2d.RADIANS_PER_DEGREE,p=(119.743+Q$E*i)*e$2d.RADIANS_PER_DEGREE,_=(239.961+V$y*i)*e$2d.RADIANS_PER_DEGREE,m=(25.053+W$I*i)*e$2d.RADIANS_PER_DEGREE,g=Math.sin(r),x=Math.sin(o),y=Math.sin(a),v=Math.sin(s),$=Math.sin(l),b=Math.sin(u),T=Math.sin(c),C=Math.sin(h),S=Math.sin(d),w=Math.sin(f),E=Math.sin(p),P=Math.sin(_),A=Math.sin(m),L=Math.cos(r),M=Math.cos(o),R=Math.cos(a),O=Math.cos(s),D=Math.cos(l),I=Math.cos(u),F=Math.cos(c),B=Math.cos(h),N=Math.cos(d),G=Math.cos(f),z=Math.cos(p),U=Math.cos(_),V=Math.cos(m),k=(269.9949+.0031*n-3.8787*g-.1204*x+.07*y-.0172*v+.0072*b-.0052*w+.0043*A)*e$2d.RADIANS_PER_DEGREE,W=(66.5392+.013*n+1.5419*L+.0239*M-.0278*R+.0068*O-.0029*I+9e-4*F+8e-4*G-9e-4*V)*e$2d.RADIANS_PER_DEGREE,H=(38.3213+13.17635815*i-14e-13*i*i+3.561*g+.1208*x-.0642*y+.0158*v+.0252*$-.0066*b-.0047*T-.0046*C+.0028*S+.0052*w+.004*E+.0019*P-.0044*A)*e$2d.RADIANS_PER_DEGREE,q=(13.17635815-2*i*14e-13+3.561*L*L$O+.1208*M*b$N-.0642*R*j$E+.0158*O*k$A+.0252*D*q$J-.0066*I*z$E-.0047*F*B$D-.0046*B*F$H+.0028*N*H$I+.0052*G*K$C+.004*z*Q$E+.0019*U*V$y-.0044*V*W$I)/86400*e$2d.RADIANS_PER_DEGREE;return e$2e(t)||(t=new o$J),t.rightAscension=k,t.declination=W,t.rotation=H,t.rotationRate=q,t};var y$E=new o$1p,A$Q=new o$1p,w$D=new o$1p;function z$D(e,t,i){var n=y$E;n.x=Math.cos(e+e$2d.PI_OVER_TWO),n.y=Math.sin(e+e$2d.PI_OVER_TWO),n.z=0;var r=Math.cos(t),o=w$D;o.x=r*Math.cos(e),o.y=r*Math.sin(e),o.z=Math.sin(t);var a=o$1p.cross(o,n,A$Q);return e$2e(i)||(i=new p$1e),i[0]=n.x,i[1]=a.x,i[2]=o.x,i[3]=n.y,i[4]=a.y,i[5]=o.y,i[6]=n.z,i[7]=a.z,i[8]=o.z,i}var u$F=new p$1e,_$A=new n$15;h$I.prototype.evaluate=function(e,t){e$2e(e)||(e=a$15.now());var i=this._computeFunction(e),n=z$D(i.rightAscension,i.declination,t),r=e$2d.zeroToTwoPi(i.rotation),o=n$15.fromAxisAngle(o$1p.UNIT_Z,r,_$A),a=p$1e.fromQuaternion(n$15.conjugate(o,o),u$F);return p$1e.multiply(a,n,n)};var r$L={};function i$K(e){o$1q.defined("url",e),this._url=t$10.createIfNeeded(e),this._url.appendForwardSlash()}function s$C(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.typeOf.object("options.scene",e.scene);var t=u$Z(e.accessToken,e$Z.defaultAccessToken),i=t$10.createIfNeeded(u$Z(e.server,e$Z.defaultServer));i.appendForwardSlash();var n=e$Z.getDefaultTokenCredit(t);e$2e(n)&&e.scene.frameState.creditDisplay.addDefaultCredit(r$U.clone(n));var r=i.getDerivedResource({url:"v1/geocode"});e$2e(t)&&r.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=i,this._pelias=new i$K(r)}function d$W(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.start=e$2e(e.start)?a$15.clone(e.start):new a$15,this.stop=e$2e(e.stop)?a$15.clone(e.stop):new a$15,this.data=e.data,this.isStartIncluded=u$Z(e.isStartIncluded,!0),this.isStopIncluded=u$Z(e.isStopIncluded,!0)}r$L.type=void 0,r$L.getRequiredDataPoints=t$15.throwInstantiationError,r$L.interpolateOrderZero=t$15.throwInstantiationError,r$L.interpolate=t$15.throwInstantiationError,Object.defineProperties(i$K.prototype,{url:{get:function(){return this._url}}}),i$K.prototype.geocode=function(e,t){return o$1q.typeOf.string("query",e),this._url.getDerivedResource({url:t===c$H.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then((function(e){return e.features.map((function(e){var t,i=e.bbox;if(e$2e(i))t=h$18.fromDegrees(i[0],i[1],i[2],i[3]);else{var n=e.geometry.coordinates[0],r=e.geometry.coordinates[1];t=o$1p.fromDegrees(n,r)}return{displayName:e.properties.label,destination:t}}))}))},s$C.prototype.geocode=function(e,t){return this._pelias.geocode(e,t)},Object.defineProperties(d$W.prototype,{isEmpty:{get:function(){var e=a$15.compare(this.stop,this.start);return e<0||0===e&&(!this.isStartIncluded||!this.isStopIncluded)}}});var I$O={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};d$W.fromIso8601=function(e,t){o$1q.typeOf.object("options",e),o$1q.typeOf.string("options.iso8601",e.iso8601);var i=e.iso8601.split("/");if(2!==i.length)throw new t$15("options.iso8601 is an invalid ISO 8601 interval.");var n=a$15.fromIso8601(i[0]),r=a$15.fromIso8601(i[1]),o=u$Z(e.isStartIncluded,!0),a=u$Z(e.isStopIncluded,!0),s=e.data;return e$2e(t)?(t.start=n,t.stop=r,t.isStartIncluded=o,t.isStopIncluded=a,t.data=s,t):(I$O.start=n,I$O.stop=r,I$O.isStartIncluded=o,I$O.isStopIncluded=a,I$O.data=s,new d$W(I$O))},d$W.toIso8601=function(e,t){return o$1q.typeOf.object("timeInterval",e),a$15.toIso8601(e.start,t)+"/"+a$15.toIso8601(e.stop,t)},d$W.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new d$W(e)},d$W.equals=function(e,t,i){return e===t||e$2e(e)&&e$2e(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&a$15.equals(e.start,t.start)&&a$15.equals(e.stop,t.stop)&&(e.data===t.data||e$2e(i)&&i(e.data,t.data)))},d$W.equalsEpsilon=function(e,t,i,n){return o$1q.typeOf.number("epsilon",i),e===t||e$2e(e)&&e$2e(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&a$15.equalsEpsilon(e.start,t.start,i)&&a$15.equalsEpsilon(e.stop,t.stop,i)&&(e.data===t.data||e$2e(n)&&n(e.data,t.data)))},d$W.intersect=function(e,t,i,n){if(o$1q.typeOf.object("left",e),o$1q.typeOf.object("result",i),!e$2e(t))return d$W.clone(d$W.EMPTY,i);var r=e.start,o=e.stop,a=t.start,s=t.stop,l=a$15.greaterThanOrEquals(a,r)&&a$15.greaterThanOrEquals(o,a),u=!l&&a$15.lessThanOrEquals(a,r)&&a$15.lessThanOrEquals(r,s);if(!l&&!u)return d$W.clone(d$W.EMPTY,i);var c=e.isStartIncluded,h=e.isStopIncluded,d=t.isStartIncluded,f=t.isStopIncluded,p=a$15.lessThan(o,s);return i.start=l?a:r,i.isStartIncluded=c&&d||!a$15.equals(a,r)&&(l&&d||u&&c),i.stop=p?o:s,i.isStopIncluded=p?h:h&&f||!a$15.equals(s,o)&&f,i.data=e$2e(n)?n(e.data,t.data):e.data,i},d$W.contains=function(e,t){if(o$1q.typeOf.object("timeInterval",e),o$1q.typeOf.object("julianDate",t),e.isEmpty)return!1;var i=a$15.compare(e.start,t);if(0===i)return e.isStartIncluded;var n=a$15.compare(t,e.stop);return 0===n?e.isStopIncluded:i<0&&n<0},d$W.prototype.clone=function(e){return d$W.clone(this,e)},d$W.prototype.equals=function(e,t){return d$W.equals(this,e,t)},d$W.prototype.equalsEpsilon=function(e,t,i){return d$W.equalsEpsilon(this,e,t,i)},d$W.prototype.toString=function(){return d$W.toIso8601(this)},d$W.EMPTY=Object.freeze(new d$W({start:new a$15,stop:new a$15,isStartIncluded:!1,isStopIncluded:!1}));var M$H=Object.freeze(a$15.fromIso8601("0000-01-01T00:00:00Z")),r$K=Object.freeze(a$15.fromIso8601("9999-12-31T24:00:00Z")),t$y=Object.freeze(new d$W({start:M$H,stop:r$K})),o$I={MINIMUM_VALUE:M$H,MAXIMUM_VALUE:r$K,MAXIMUM_INTERVAL:t$y},e$V={SHIFT:0,CTRL:1,ALT:2},Aa$1=Object.freeze(e$V),i$J={type:"Lagrange",getRequiredDataPoints:function(e){return Math.max(e+1,2)},interpolateOrderZero:function(e,t,i,n,r){e$2e(r)||(r=new Array(n));var o,a,s=t.length;for(o=0;o<n;o++)r[o]=0;for(o=0;o<s;o++){var l=1;for(a=0;a<s;a++)if(a!==o){var u=t[o]-t[a];l*=(e-t[a])/u}for(a=0;a<n;a++)r[a]+=l*i[o*n+a]}return r}},v$A={type:"Linear"};function l$O(e,t,i){return p$$({url:e,responseType:"blob",headers:t,request:i})}v$A.getRequiredDataPoints=function(e){return 2},v$A.interpolateOrderZero=function(e,t,i,n,r){if(2!==t.length)throw new t$15("The xTable provided to the linear interpolator must have exactly two elements.");if(n<=0)throw new t$15("There must be at least 1 dependent variable for each independent variable.");e$2e(r)||(r=new Array(n));var o,a,s,l=t[0],u=t[1];if(l===u)throw new t$15("Divide by zero error: xTable[0] and xTable[1] are equal");for(o=0;o<n;o++)a=i[o],s=i[o+n],r[o]=((s-a)*e+u*a-l*s)/(u-l);return r};var p$J=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch{return!1}}();function c$F(e,t){if(!p$J||e$26(e))return t$S(e,void 0,t);var i=l$O(e,void 0,t);return e$2e(i)?i.then((function(e){var t=window.URL.createObjectURL(e);return t$S(t,!1).then((function(i){return i.blob=e,window.URL.revokeObjectURL(t),i}),(function(e){return window.URL.revokeObjectURL(t),o$1l.reject(e)}))})):void 0}function d$V(e,t,i){if(!e$2e(e))throw new t$15("url is required.");var n;t=u$Z(t,u$Z.EMPTY_OBJECT);do{n="loadJsonp"+Math.random().toString().substring(2,8)}while(e$2e(window[n]));var r=new h$16(e),o=m$1c(u$Z(r.query,""));e$2e(t.parameters)&&(o=p$19(t.parameters,o)),o[u$Z(t.callbackParameterName,"callback")]=n,r.query=m$1d(o),e=r.toString();var a=t.proxy;return e$2e(a)&&(e=a.getURL(e)),(i=e$2e(i)?i:new r$1c).url=e,i.requestFunction=function(){var t=o$1l.defer();return window[n]=function(e){t.resolve(e);try{delete window[n]}catch{window[n]=void 0}},d$V.loadAndExecuteScript(e,n,t),t.promise},r$1b.request(i)}d$V.loadAndExecuteScript=function(e,t,i){var n=document.createElement("script");n.async=!0,n.src=e;var r=document.getElementsByTagName("head")[0];n.onload=function(){n.onload=void 0,r.removeChild(n)},n.onerror=function(e){i.reject(e)},r.appendChild(n)},d$V.defaultLoadAndExecuteScript=d$V.loadAndExecuteScript;var e$U={defaultAccessToken:void 0},n$w=!1,o$H,a$D="<b>This application is using SuperMap3D's default Mapbox access token. Please create a new access token for the application as soon as possible and prior to deployment , and provide your token to SuperMap3D by setting the SuperMap3D.MapboxApi.defaultAccessToken property before constructing the Widget or any other object that uses the Mapbox API.</b>";function r$J(){t$15.throwInstantiationError()}e$U.getAccessToken=function(e){return e$2e(e)?e:e$2e(e$U.defaultAccessToken)?e$U.defaultAccessToken:(n$w||(console.log(a$D),n$w=!0),"")},e$U.getErrorCredit=function(e){if(!e$2e(e)&&!e$2e(e$U.defaultAccessToken))return e$2e(o$H)||(o$H=new r$U(a$D,!0)),o$H},Object.defineProperties(r$J.prototype,{ellipsoid:{get:t$15.throwInstantiationError}}),r$J.prototype.project=t$15.throwInstantiationError,r$J.prototype.unproject=t$15.throwInstantiationError;var l$N=[],c$E=[];function M$G(e,t,i,n,r,o){var a,s,l=r-n+1,u=o-r,c=l$N,h=c$E;for(a=0;a<l;++a)c[a]=e[n+a];for(s=0;s<u;++s)h[s]=e[r+s+1];a=0,s=0;for(var d=n;d<=o;++d){var f=c[a],p=h[s];a<l&&(s>=u||t(f,p,i)<=0)?(e[d]=f,++a):s<u&&(e[d]=p,++s)}}function u$E(e,t,i,n,r){if(!(n>=r)){var o=Math.floor(.5*(n+r));u$E(e,t,i,n,o),u$E(e,t,i,o+1,r),M$G(e,t,i,n,o,r)}}function m$I(e,t,i){if(!e$2e(e))throw new t$15("array is required.");if(!e$2e(t))throw new t$15("comparator is required.");var n=e.length,r=Math.ceil(.5*n);l$N.length=r,c$E.length=r,u$E(e,t,i,0,n-1),l$N.length=0,c$E.length=0}function d$U(e,t){if(!e$2e(e))throw new t$15("occluderBoundingSphere is required.");if(!e$2e(t))throw new t$15("camera position is required.");this._occluderPosition=o$1p.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var m$H=new o$1p;Object.defineProperties(d$U.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){if(!e$2e(e))throw new t$15("cameraPosition is required.");e=o$1p.clone(e,this._cameraPosition);var t,i,n,r=o$1p.subtract(this._occluderPosition,e,m$H),o=o$1p.magnitudeSquared(r),a=this._occluderRadius*this._occluderRadius;if(o>a){t=Math.sqrt(o-a),o=1/Math.sqrt(o),i=o$1p.multiplyByScalar(r,o,m$H);var s=t*t*o;n=o$1p.add(e,o$1p.multiplyByScalar(i,s,m$H),m$H)}else t=Number.MAX_VALUE;this._horizonDistance=t,this._horizonPlaneNormal=i,this._horizonPlanePosition=n,this._cameraPosition=e}}}),d$U.fromBoundingSphere=function(e,t,i){if(!e$2e(e))throw new t$15("occluderBoundingSphere is required.");if(!e$2e(t))throw new t$15("camera position is required.");return e$2e(i)?(o$1p.clone(e.center,i._occluderPosition),i._occluderRadius=e.radius,i.cameraPosition=t,i):new d$U(e,t)};var L$N=new o$1p;d$U.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){var t=o$1p.subtract(e,this._occluderPosition,L$N),i=this._occluderRadius;if((i=o$1p.magnitudeSquared(t)-i*i)>0)return i=Math.sqrt(i)+this._horizonDistance,t=o$1p.subtract(e,this._cameraPosition,t),i*i>o$1p.magnitudeSquared(t)}return!1};var X$B=new o$1p;d$U.prototype.isBoundingSphereVisible=function(e){var t=o$1p.clone(e.center,X$B),i=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){var n=o$1p.subtract(t,this._occluderPosition,L$N),r=this._occluderRadius-i;if(r=o$1p.magnitudeSquared(n)-r*r,i<this._occluderRadius)return r>0&&(r=Math.sqrt(r)+this._horizonDistance,n=o$1p.subtract(t,this._cameraPosition,n),r*r+i*i>o$1p.magnitudeSquared(n));if(r>0){n=o$1p.subtract(t,this._cameraPosition,n);var o=o$1p.magnitudeSquared(n),a=this._occluderRadius*this._occluderRadius,s=i*i;return(this._horizonDistance*this._horizonDistance+a)*s>o*a||(r=Math.sqrt(r)+this._horizonDistance)*r+s>o}return!0}return!1};var j$D=new o$1p;d$U.prototype.computeVisibility=function(e){if(!e$2e(e))throw new t$15("occludeeBS is required.");var t=o$1p.clone(e.center),i=e.radius;if(i>this._occluderRadius)return fe$r.FULL;if(this._horizonDistance!==Number.MAX_VALUE){var n=o$1p.subtract(t,this._occluderPosition,j$D),r=this._occluderRadius-i,o=o$1p.magnitudeSquared(n);if((r=o-r*r)>0){r=Math.sqrt(r)+this._horizonDistance,n=o$1p.subtract(t,this._cameraPosition,n);var a=o$1p.magnitudeSquared(n);return r*r+i*i<a?fe$r.NONE:(r=o-(r=this._occluderRadius+i)*r)>0?a<(r=Math.sqrt(r)+this._horizonDistance)*r+i*i?fe$r.FULL:fe$r.PARTIAL:(n=o$1p.subtract(t,this._horizonPlanePosition,n),o$1p.dot(n,this._horizonPlaneNormal)>-i?fe$r.PARTIAL:fe$r.FULL)}}return fe$r.NONE};var b$M=new o$1p;d$U.computeOccludeePoint=function(e,t,i){if(!e$2e(e))throw new t$15("occluderBoundingSphere is required.");if(!e$2e(i))throw new t$15("positions is required.");if(0===i.length)throw new t$15("positions must contain at least one element");var n=o$1p.clone(t),r=o$1p.clone(e.center),o=e.radius,a=i.length;if(o$1p.equals(r,t))throw new t$15("occludeePosition must be different than occluderBoundingSphere.center");var s=o$1p.normalize(o$1p.subtract(n,r,b$M),b$M),l=-o$1p.dot(s,r),u=d$U._anyRotationVector(r,s,l),c=d$U._horizonToPlaneNormalDotProduct(e,s,l,u,i[0]);if(c){for(var h,d=1;d<a;++d){if(!(h=d$U._horizonToPlaneNormalDotProduct(e,s,l,u,i[d])))return;h<c&&(c=h)}if(!(c<.0017453283658983088)){var f=o/c;return o$1p.add(r,o$1p.multiplyByScalar(s,f,b$M),b$M)}}};var B$C=[];d$U.computeOccludeePointFromRectangle=function(e,t){if(!e$2e(e))throw new t$15("rectangle is required.");t=u$Z(t,t$12.WGS84);var i=h$18.subsample(e,t,0,B$C),n=i$1d.fromPoints(i),r=o$1p.ZERO;if(!o$1p.equals(r,n.center))return d$U.computeOccludeePoint(new i$1d(r,t.minimumRadius),n.center,i)};var Z$D=new o$1p;d$U._anyRotationVector=function(e,t,i){var n=o$1p.abs(t,Z$D),r=n.x>n.y?0:1;(0===r&&n.z>n.x||1===r&&n.z>n.y)&&(r=2);var o,a=new o$1p;0===r?(n.x=e.x,n.y=e.y+1,n.z=e.z+1,o=o$1p.UNIT_X):1===r?(n.x=e.x+1,n.y=e.y,n.z=e.z+1,o=o$1p.UNIT_Y):(n.x=e.x+1,n.y=e.y+1,n.z=e.z,o=o$1p.UNIT_Z);var s=(o$1p.dot(t,n)+i)/-o$1p.dot(t,o);return o$1p.normalize(o$1p.subtract(o$1p.add(n,o$1p.multiplyByScalar(o,s,a),n),e,n),n)};var G$L=new o$1p;d$U._rotationVector=function(e,t,i,n,r){var o=o$1p.subtract(n,e,G$L);if(o=o$1p.normalize(o,o),o$1p.dot(t,o)<.9999999847691291){var a=o$1p.cross(t,o,o);if(o$1p.magnitude(a)>e$2d.EPSILON13)return o$1p.normalize(a,new o$1p)}return r};var S$E=new o$1p,W$H=new o$1p,q$I=new o$1p,T$H=new o$1p;function s$B(e,t,i){o$1q.defined("url",e),o$1q.defined("apiKey",t),e$2e(i)&&o$1q.typeOf.object("params",i),(e=t$10.createIfNeeded(e)).appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=u$Z(i,{})}d$U._horizonToPlaneNormalDotProduct=function(e,t,i,n,r){var o=o$1p.clone(r,S$E),a=o$1p.clone(e.center,W$H),s=e.radius,l=o$1p.subtract(a,o,q$I),u=o$1p.magnitudeSquared(l),c=s*s;if(u<c)return!1;var h=u-c,d=Math.sqrt(h),f=d*(1/Math.sqrt(u))*d;l=o$1p.normalize(l,l);var p=o$1p.add(o,o$1p.multiplyByScalar(l,f,T$H),T$H),_=Math.sqrt(h-f*f),m=this._rotationVector(a,t,i,o,n),g=o$1p.fromElements(m.x*m.x*l.x+(m.x*m.y-m.z)*l.y+(m.x*m.z+m.y)*l.z,(m.x*m.y+m.z)*l.x+m.y*m.y*l.y+(m.y*m.z-m.x)*l.z,(m.x*m.z-m.y)*l.x+(m.y*m.z+m.x)*l.y+m.z*m.z*l.z,S$E);g=o$1p.normalize(g,g);var x=o$1p.multiplyByScalar(g,_,S$E);m=o$1p.normalize(o$1p.subtract(o$1p.add(p,x,q$I),a,q$I),q$I);var y=o$1p.dot(t,m);m=o$1p.normalize(o$1p.subtract(o$1p.subtract(p,x,m),a,m),m);var v=o$1p.dot(t,m);return y<v?y:v},Object.defineProperties(s$B.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}}),s$B.prototype.geocode=function(e){return o$1q.typeOf.string("query",e),this._url.getDerivedResource({url:"json",queryParameters:p$19(this._params,{q:e})}).fetchJson().then((function(e){return e.results.map((function(e){var t,i=e.bounds;if(e$2e(i))t=h$18.fromDegrees(i.southwest.lng,i.southwest.lat,i.northeast.lng,i.northeast.lat);else{var n=e.geometry.lat,r=e.geometry.lng;t=o$1p.fromDegrees(n,r)}return{displayName:e.formatted,destination:t}}))}))};var t$x={packedLength:void 0,pack:t$15.throwInstantiationError,unpack:t$15.throwInstantiationError},o$G={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:t$15.throwInstantiationError,unpackInterpolationResult:t$15.throwInstantiationError},e$T={BASECOLOR_UV_OFFSET_AND_TILING:0,EMISSIVE_UV_OFFSET_AND_TILING:1},ie$p=Object.freeze(e$T);function s$A(){this._cache={}}s$A.prototype.fromColor=function(e,t){if(!e$2e(e))throw new t$15("color is required");if(!e$2e(t))throw new t$15("size is required");return h$H(void 0,void 0,e,t,this._cache)},s$A.prototype.fromUrl=function(e,t,i){if(!e$2e(e))throw new t$15("url is required");if(!e$2e(t))throw new t$15("color is required");if(!e$2e(i))throw new t$15("size is required");return h$H(e,void 0,t,i,this._cache)},s$A.prototype.fromMakiIconId=function(e,t,i){if(!e$2e(e))throw new t$15("id is required");if(!e$2e(t))throw new t$15("color is required");if(!e$2e(i))throw new t$15("size is required");return h$H(n$17("Assets/Textures/maki/"+encodeURIComponent(e)+".png"),void 0,t,i,this._cache)},s$A.prototype.fromText=function(e,t,i){if(!e$2e(e))throw new t$15("text is required");if(!e$2e(t))throw new t$15("color is required");if(!e$2e(i))throw new t$15("size is required");return h$H(void 0,e,t,i,this._cache)};var q$H=new e$1X;function b$L(e,t,i){e.save(),e.scale(i/24,i/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,q$H).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function C$G(e,t,i){var n=i/2.5,r=n,o=n;t.width>t.height?o=n*(t.height/t.width):t.width<t.height&&(r=n*(t.width/t.height));var a=Math.round((i-r)/2),s=Math.round(7/24*i-o/2);e.globalCompositeOperation="destination-out",e.drawImage(t,a-1,s,r,o),e.drawImage(t,a,s-1,r,o),e.drawImage(t,a+1,s,r,o),e.drawImage(t,a,s+1,r,o),e.globalCompositeOperation="destination-over",e.fillStyle=e$1X.BLACK.toCssColorString(),e.fillRect(a-1,s-1,r+2,o+2),e.globalCompositeOperation="destination-out",e.drawImage(t,a,s,r,o),e.globalCompositeOperation="destination-over",e.fillStyle=e$1X.WHITE.toCssColorString(),e.fillRect(a-1,s-2,r+2,o+2)}var l$M=new Array(4);function h$H(e,t,i,n,r){l$M[0]=e,l$M[1]=t,l$M[2]=i,l$M[3]=n;var o=JSON.stringify(l$M),a=r[o];if(e$2e(a))return a;var s=document.createElement("canvas");s.width=n,s.height=n;var l=s.getContext("2d");if(b$L(l,i,n),e$2e(e)){var u=t$10.createIfNeeded(e).fetchImage().then((function(e){return C$G(l,e,n),r[o]=s,s}));return r[o]=u,u}if(e$2e(t)){var c=x$W(t,{font:"bold "+n+"px sans-serif"});C$G(l,c,n)}return r[o]=s,s}function f$L(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.vertexFormat,n$13.DEFAULT);this._vertexFormat=t,this._workerName="createPlaneGeometry"}f$L.packedLength=n$13.packedLength,f$L.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),n$13.pack(e._vertexFormat,t,i),t};var T$G=new n$13,G$K={vertexFormat:T$G};f$L.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=n$13.unpack(e,t,T$G);return e$2e(i)?(i._vertexFormat=n$13.clone(n,i._vertexFormat),i):new f$L(G$K)};var w$C=new o$1p(-.5,-.5,0),A$P=new o$1p(.5,.5,0);function i$I(){this._workerName="createPlaneOutlineGeometry"}f$L.createGeometry=function(e){var t,i,n=e._vertexFormat,r=new a$_;if(n.position){if((i=new Float64Array(12))[0]=w$C.x,i[1]=w$C.y,i[2]=0,i[3]=A$P.x,i[4]=w$C.y,i[5]=0,i[6]=A$P.x,i[7]=A$P.y,i[8]=0,i[9]=w$C.x,i[10]=A$P.y,i[11]=0,r.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:i}),n.normal){var o=new Float32Array(12);o[0]=0,o[1]=0,o[2]=1,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=1,o[9]=0,o[10]=0,o[11]=1,r.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:o})}if(n.st){var a=new Float32Array(8);a[0]=0,a[1]=0,a[2]=1,a[3]=0,a[4]=1,a[5]=1,a[6]=0,a[7]=1,r.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:a})}if(n.tangent){var s=new Float32Array(12);s[0]=1,s[1]=0,s[2]=0,s[3]=1,s[4]=0,s[5]=0,s[6]=1,s[7]=0,s[8]=0,s[9]=1,s[10]=0,s[11]=0,r.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:s})}if(n.bitangent){var l=new Float32Array(12);l[0]=0,l[1]=1,l[2]=0,l[3]=0,l[4]=1,l[5]=0,l[6]=0,l[7]=1,l[8]=0,l[9]=0,l[10]=1,l[11]=0,r.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:l})}(t=new Uint16Array(6))[0]=0,t[1]=1,t[2]=2,t[3]=0,t[4]=2,t[5]=3}return new I$1p({attributes:r,indices:t,primitiveType:W$18.TRIANGLES,boundingSphere:new i$1d(o$1p.ZERO,Math.sqrt(2))})},i$I.packedLength=0,i$I.pack=function(e,t){return o$1q.defined("value",e),o$1q.defined("array",t),t},i$I.unpack=function(e,t,i){return o$1q.defined("array",e),e$2e(i)?i:new i$I};var r$I=new o$1p(-.5,-.5,0),o$F=new o$1p(.5,.5,0);i$I.createGeometry=function(){var e=new a$_,t=new Uint16Array(8),i=new Float64Array(12);return i[0]=r$I.x,i[1]=r$I.y,i[2]=r$I.z,i[3]=o$F.x,i[4]=r$I.y,i[5]=r$I.z,i[6]=o$F.x,i[7]=o$F.y,i[8]=r$I.z,i[9]=r$I.x,i[10]=o$F.y,i[11]=r$I.z,e.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:i}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new I$1p({attributes:e,indices:t,primitiveType:W$18.LINES,boundingSphere:new i$1d(o$1p.ZERO,Math.sqrt(2))})};var r$H=new o$1p;function c$D(e,t,i,n){return S$$(e,t,i,n,r$H),r$H.x>0&&r$H.y>0&&r$H.z>0}var fe$l=[];function xe$g(e,t,i,n,r){var o=fe$l;o.length=r;var a,s=i.red,l=i.green,u=i.blue,c=i.alpha,h=n.red,d=n.green,f=n.blue,p=n.alpha;if(e$1X.equals(i,n)){for(a=0;a<r;a++)o[a]=e$1X.clone(i);return o}var _=(h-s)/r,m=(d-l)/r,g=(f-u)/r,x=(p-c)/r;for(a=0;a<r;a++)o[a]=new e$1X(s+a*_,l+a*m,u+a*g,c+a*x);return o}function R$A(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,i=e.colors,n=u$Z(e.width,1),r=u$Z(e.hMax,-1),o=u$Z(e.colorsPerVertex,!1);if(!e$2e(t)||t.length<2)throw new t$15("At least two positions are required.");if("number"!=typeof n)throw new t$15("width must be a number");if(e$2e(i)&&(o&&i.length<t.length||!o&&i.length<t.length-1))throw new t$15("colors has an invalid length.");this._positions=t,this._colors=i,this._width=n,this._hMax=r,this._colorsPerVertex=o,this._dist=e.dist,this._period=e.period,this._vertexFormat=n$13.clone(u$Z(e.vertexFormat,n$13.DEFAULT)),this._followSurface=u$Z(e.followSurface,!0),e$2e(e.followSurface)&&(t$11("PolylineGeometry.followSurface","PolylineGeometry.followSurface is deprecated and will be removed in SuperMap3D. Use PolylineGeometry.arcType instead."),e.arcType=e.followSurface?m$1h.GEODESIC:m$1h.NONE),this._arcType=u$Z(e.arcType,m$1h.GEODESIC),this._followSurface=this._arcType!==m$1h.NONE,this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._workerName="createPolylineGeometry";var a=1+t.length*o$1p.packedLength;a+=e$2e(i)?1+i.length*e$1X.packedLength:1,this.packedLength=a+t$12.packedLength+n$13.packedLength+4+2}R$A.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");i=u$Z(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._colors;for(o=e$2e(a)?a.length:0,t[i++]=o,n=0;n<o;++n,i+=e$1X.packedLength)e$1X.pack(a[n],t,i);return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._width,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i++]=e._granularity,t[i++]=e._hMax,t[i++]=e._dist,t[i]=e._period,t};var le$n=t$12.clone(t$12.UNIT_SPHERE),se$l=new n$13,P$B={positions:void 0,colors:void 0,ellipsoid:le$n,vertexFormat:se$l,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};R$A.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);var a=(r=e[t++])>0?new Array(r):void 0;for(n=0;n<r;++n,t+=e$1X.packedLength)a[n]=e$1X.unpack(e,t);var s=t$12.unpack(e,t,le$n);t+=t$12.packedLength;var l=n$13.unpack(e,t,se$l);t+=n$13.packedLength;var u=e[t++],c=1===e[t++],h=e[t++],d=e[t++],f=e[t++],p=1==e[t++],_=e[t];return e$2e(i)?(i._positions=o,i._colors=a,i._ellipsoid=t$12.clone(s,i._ellipsoid),i._vertexFormat=n$13.clone(l,i._vertexFormat),i._width=u,i._colorsPerVertex=c,i._arcType=h,i._granularity=d,i._hMax=f,i._dist=p,i._period=_,i):(P$B.positions=o,P$B.colors=a,P$B.width=u,P$B.colorsPerVertex=c,P$B.arcType=h,P$B.granularity=d,P$B.hMax=f,P$B.dist=p,P$B.period=_,new R$A(P$B))};var de$i=new o$1p,me$n=new o$1p,_e$j=new o$1p,ue$n=new o$1p;function ae$o(e,t,i,n){var r=e.combinedPositions,o=e.combinedLocalPositions,a=new a$_;n.position&&(a.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:r}));var s,l,u,c,h,d,f=t.length,p=r.length/3,_=(p-2*f)/(2*f),m=A$1f.triangulate(t),g=(_-1)*f*6+2*m.length,x=ce$z.createTypedArray(p,g),y=2*f,v=0;for(s=0;s<_-1;s++){for(l=0;l<f-1;l++)d=(u=2*l+s*f*2)+y,h=(c=u+1)+y,x[v++]=c,x[v++]=u,x[v++]=h,x[v++]=h,x[v++]=u,x[v++]=d;h=(c=(u=2*f-2+s*f*2)+1)+y,d=u+y,x[v++]=c,x[v++]=u,x[v++]=h,x[v++]=h,x[v++]=u,x[v++]=d}if(n.st||n.tangent||n.bitangent){var $,b,T=new Float32Array(2*p),C=1/(_-1),S=1/i.height,w=i.height/2,E=0;for(s=0;s<_;s++){for($=s*C,b=S*(t[0].y+w),T[E++]=$,T[E++]=b,l=1;l<f;l++)b=S*(t[l].y+w),T[E++]=$,T[E++]=b,T[E++]=$,T[E++]=b;b=S*(t[0].y+w),T[E++]=$,T[E++]=b}for(l=0;l<f;l++)$=0,b=S*(t[l].y+w),T[E++]=$,T[E++]=b;for(l=0;l<f;l++)$=(_-1)*C,b=S*(t[l].y+w),T[E++]=$,T[E++]=b;a.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:new Float32Array(T)})}var P=p-2*f;for(s=0;s<m.length;s+=3){var A=m[s]+P,L=m[s+1]+P,M=m[s+2]+P;x[v++]=A,x[v++]=L,x[v++]=M,x[v++]=M+f,x[v++]=L+f,x[v++]=A+f}var R=new I$1p({attributes:a,indices:x,boundingSphere:i$1d.fromVertices(r),primitiveType:W$18.TRIANGLES});if(n.normal&&(R=k$14.computeNormal(R)),n.tangent||n.bitangent){try{R=k$14.computeTangentAndBitangent(R)}catch{e$22("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}n.tangent||(R.attributes.tangent=void 0),n.bitangent||(R.attributes.bitangent=void 0),n.st||(R.attributes.st=void 0)}return e$2e(o)&&(R.attributes.position.values=o,R.attributes.position.componentDatatype=S$14.FLOAT),R}function N$A(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;if(!e$2e(t))throw new t$15("options.polylinePositions is required.");if(!e$2e(i))throw new t$15("options.shapePositions is required.");this._positions=t,this._shape=i,this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._cornerType=u$Z(e.cornerType,ar$6.ROUNDED),this._vertexFormat=n$13.clone(u$Z(e.vertexFormat,n$13.DEFAULT)),this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry",this.enuCenter=u$Z(e.enuCenter,o$1p.ZERO);var n=1+t.length*o$1p.packedLength;n+=1+i.length*o$1o.packedLength+o$1p.packedLength,this.packedLength=n+t$12.packedLength+n$13.packedLength+2}R$A.createGeometry=function(e){var t,i,n,r=e._width,o=e._hMax,a=e._vertexFormat,s=e._colors,l=e._colorsPerVertex,u=e._arcType,c=e._granularity,h=e._ellipsoid,d=e._dist,f=e._period,p=D$13(e._positions,o$1p.equalsEpsilon),_=p.length;if(!(_<2||r<=0)){if(u===m$1h.GEODESIC||u===m$1h.RHUMB){var m,g;u===m$1h.GEODESIC?(m=e$2d.chordLength(c,h.maximumRadius),g=m$X.numberOfPoints):(m=c,g=m$X.numberOfPointsRhumbLine);var x=m$X.extractHeights(p,h);if(e$2e(s)){var y=1;for(t=0;t<_-1;++t)y+=g(p[t],p[t+1],m);var v=new Array(y),$=0;for(t=0;t<_-1;++t){var b=p[t],T=p[t+1],C=s[t],S=g(b,T,m);if(l&&t<y){var w=xe$g(b,T,C,s[t+1],S),E=w.length;for(i=0;i<E;++i)v[$++]=w[i]}else for(i=0;i<S;++i)v[$++]=e$1X.clone(C)}v[$]=e$1X.clone(s[s.length-1]),s=v,fe$l.length=0}p=u===m$1h.GEODESIC?m$X.generateCartesianArc({positions:p,minDistance:m,ellipsoid:h,height:x,hMax:o}):m$X.generateCartesianRhumbArc({positions:p,granularity:m,ellipsoid:h,height:x})}var P,A=4*(_=p.length)-4,L=new Float64Array(3*A),M=new Float64Array(3*A),R=new Float64Array(3*A),O=new Float32Array(2*A),D=a.st?new Float32Array(2*A):void 0,I=e$2e(s)?new Uint8Array(4*A):void 0,F=d?new Float32Array(3*A):void 0,B=0,N=0,G=0,z=0,U=0,V=0;for(i=0;i<_;++i){var k,W;0===i?(P=de$i,o$1p.subtract(p[0],p[1],P),o$1p.add(p[0],P,P)):P=p[i-1],o$1p.clone(P,_e$j),o$1p.clone(p[i],me$n),i===_-1?(P=de$i,o$1p.subtract(p[_-1],p[_-2],P),o$1p.add(p[_-1],P,P)):P=p[i+1],o$1p.clone(P,ue$n),e$2e(I)&&(k=0===i||l?s[i]:s[i-1],i!==_-1&&(W=s[i]));var H=i===_-1?2:4;for(n=0===i?2:0;n<H;++n){o$1p.pack(me$n,L,B),o$1p.pack(_e$j,M,B),o$1p.pack(ue$n,R,B),B+=3;var q=n-2<0?-1:1,j=n%2*2-1,X=j*i/_;if(O[N++]=o>0?X:j,O[N++]=q*r,a.st&&(D[G++]=i/(_-1),D[G++]=Math.max(O[N-2],0)),e$2e(I)){var Y=n<2?k:W;I[z++]=e$1X.floatToByte(Y.red),I[z++]=e$1X.floatToByte(Y.green),I[z++]=e$1X.floatToByte(Y.blue),I[z++]=e$1X.floatToByte(Y.alpha)}d&&(F[3*U]=V,U++)}V+=o$1p.distance(P,p[i])}if(d){var Z=V,K=Math.random()*(f>0?f:Z);for(i=0;i<A;i++)F[3*i+1]=Z,F[3*i+2]=K}var Q=new a$_;Q.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:L}),Q.prevPosition=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:M}),Q.nextPosition=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:R}),Q.expandAndWidth=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:O}),a.st&&(Q.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:D})),e$2e(I)&&(Q.color=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,values:I,normalize:!0})),d&&(Q.dist=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:F}));var J=ce$z.createTypedArray(A,6*_-6),ee=0,te=0,ie=_-1;for(i=0;i<ie;++i)J[te++]=ee,J[te++]=ee+2,J[te++]=ee+1,J[te++]=ee+1,J[te++]=ee+2,J[te++]=ee+3,ee+=4;return new I$1p({attributes:Q,indices:J,primitiveType:W$18.TRIANGLES,boundingSphere:i$1d.fromPoints(p),geometryType:Me$s.POLYLINES})}},N$A.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");i=u$Z(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._shape;for(o=a.length,t[i++]=o,n=0;n<o;++n,i+=o$1o.packedLength)o$1o.pack(a[n],t,i);return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._cornerType,t[i++]=e._granularity,o$1p.pack(e.enuCenter,t,i),t};var z$C=t$12.clone(t$12.UNIT_SPHERE),Q$D=new n$13,C$F={polylinePositions:void 0,shapePositions:void 0,ellipsoid:z$C,vertexFormat:Q$D,cornerType:void 0,granularity:void 0,enuCenter:void 0};N$A.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);r=e[t++];var a=new Array(r);for(n=0;n<r;++n,t+=o$1o.packedLength)a[n]=o$1o.unpack(e,t);var s=t$12.unpack(e,t,z$C);t+=t$12.packedLength;var l=n$13.unpack(e,t,Q$D);t+=n$13.packedLength;var u,c=e[t++],h=e[t++];return u=o$1p.unpack(e,t),e$2e(i)?(i._positions=o,i._shape=a,i._ellipsoid=t$12.clone(s,i._ellipsoid),i._vertexFormat=n$13.clone(l,i._vertexFormat),i._cornerType=c,i._granularity=h,i.enuCenter=u,i):(C$F.polylinePositions=o,C$F.shapePositions=a,C$F.cornerType=c,C$F.granularity=h,C$F.enuCenter=u,new N$A(C$F))};var pe$n=new f$1a;function U$F(e,t){var i=new a$_;i.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:e});var n,r,o=t.length,a=i.position.values.length/3,s=e.length/3/o,l=ce$z.createTypedArray(a,2*o*(s+1)),u=0,c=(n=0)*o;for(r=0;r<o-1;r++)l[u++]=r+c,l[u++]=r+c+1;for(l[u++]=o-1+c,l[u++]=c,c=(n=s-1)*o,r=0;r<o-1;r++)l[u++]=r+c,l[u++]=r+c+1;for(l[u++]=o-1+c,l[u++]=c,n=0;n<s-1;n++){var h=o*n,d=h+o;for(r=0;r<o;r++)l[u++]=r+h,l[u++]=r+d}return new I$1p({attributes:i,indices:ce$z.createTypedArray(a,l),boundingSphere:i$1d.fromVertices(e),primitiveType:W$18.LINES})}function _$z(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;if(!e$2e(t))throw new t$15("options.polylinePositions is required.");if(!e$2e(i))throw new t$15("options.shapePositions is required.");this._positions=t,this._shape=i,this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._cornerType=u$Z(e.cornerType,ar$6.ROUNDED),this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";var n=1+t.length*o$1p.packedLength;n+=1+i.length*o$1o.packedLength,this.packedLength=n+t$12.packedLength+2}N$A.createGeometry=function(e){for(var t=D$13(e._positions,o$1p.equalsEpsilon),i=t.length,n=new Array(i),r=0;r<i;r++)n[r]=o$1p.clone(t[r]);var o=e._shape;if(o=J$C.removeDuplicatesFromShape(o),!(t.length<2||o.length<3)){A$1f.computeWindingOrder2D(o)===W$13.CLOCKWISE&&o.reverse();var a=f$1a.fromPoints(o,pe$n),s={};if(s.combinedPositions=J$C.computePositions(n,o,a,e,!0),!o$1p.equals(e.enuCenter,o$1p.ZERO)){var l=new Array(i);for(r=0;r<i;r++)l[r]=o$1p.clone(t[r]);s.combinedLocalPositions=J$C.computeLocalPositions(l,o,a,e,!0,e.enuCenter)}return ae$o(s,o,a,e._vertexFormat)}},_$z.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");i=u$Z(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._shape;for(o=a.length,t[i++]=o,n=0;n<o;++n,i+=o$1o.packedLength)o$1o.pack(a[n],t,i);return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,t[i++]=e._cornerType,t[i]=e._granularity,t};var L$M=t$12.clone(t$12.UNIT_SPHERE),P$A={polylinePositions:void 0,shapePositions:void 0,ellipsoid:L$M,height:void 0,cornerType:void 0,granularity:void 0};_$z.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);r=e[t++];var a=new Array(r);for(n=0;n<r;++n,t+=o$1o.packedLength)a[n]=o$1o.unpack(e,t);var s=t$12.unpack(e,t,L$M);t+=t$12.packedLength;var l=e[t++],u=e[t];return e$2e(i)?(i._positions=o,i._shape=a,i._ellipsoid=t$12.clone(s,i._ellipsoid),i._cornerType=l,i._granularity=u,i):(P$A.polylinePositions=o,P$A.shapePositions=a,P$A.cornerType=l,P$A.granularity=u,new _$z(P$A))};var V$x=new f$1a;_$z.createGeometry=function(e){var t=D$13(e._positions,o$1p.equalsEpsilon),i=e._shape;if(i=J$C.removeDuplicatesFromShape(i),!(t.length<2||i.length<3)){A$1f.computeWindingOrder2D(i)===W$13.CLOCKWISE&&i.reverse();var n=f$1a.fromPoints(i,V$x);return U$F(J$C.computePositions(t,i,n,e,!1),i)}};var e$S={TMERC:"tmerc",ALBERS:"aea",LCC:"lcc",UTM:"utm"},ProjectionName=Object.freeze(e$S);function B$B(e,t){if(!(this instanceof B$B))return new B$B(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function w$B(e,t,i){if(!i)return t.indexOf(e);for(var n=0;n<t.length;n++)if(i(e,t[n]))return n;return-1}function u$D(e,t){x$L(e,0,e.children.length,t,e)}function x$L(e,t,i,n,r){r||(r=m$G(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=t;a<i;a++)o=e.children[a],p$I(r,e.leaf?n(o):o);return r}function p$I(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function g$L(e,t){return e.minX-t.minX}function v$z(e,t){return e.minY-t.minY}function X$A(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d$T(e){return e.maxX-e.minX+(e.maxY-e.minY)}function S$D(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function A$O(e,t){var i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}function Y$v(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function M$F(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function m$G(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y$D(e,t,i,n,r){for(var o,a=[t,i];a.length;)!((i=a.pop())-(t=a.pop())<=n)&&(s$K(e,o=t+Math.ceil((i-t)/n/2)*n,t,i,r),a.push(t,o,o,i))}function r$G(){this._tree=B$B()}function n$v(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}function d$S(e,t){return e.id===t.id}B$B.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,i=[],n=this.toBBox;if(!M$F(e,t))return i;for(var r,o,a,s,l=[];t;){for(r=0,o=t.children.length;r<o;r++)a=t.children[r],M$F(e,s=t.leaf?n(a):a)&&(t.leaf?i.push(a):Y$v(e,s)?this._all(a,i):l.push(a));t=l.pop()}return i},collides:function(e){var t=this.data,i=this.toBBox;if(!M$F(e,t))return!1;for(var n,r,o,a,s=[];t;){for(n=0,r=t.children.length;n<r;n++)if(o=t.children[n],M$F(e,a=t.leaf?i(o):o)){if(t.leaf||Y$v(e,a))return!0;s.push(o)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=m$G([]),this},remove:function(e,t){if(!e)return this;for(var i,n,r,o,a=this.data,s=this.toBBox(e),l=[],u=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=u.pop(),o=!0),a.leaf&&-1!==(r=w$B(e,a.children,t)))return a.children.splice(r,1),l.push(a),this._condense(l),this;o||a.leaf||!Y$v(a,s)?n?(i++,a=n.children[i],o=!1):a=null:(l.push(a),u.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:g$L,compareMinY:v$z,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},_build:function(e,t,i,n){var r,o=i-t+1,a=this._maxEntries;if(o<=a)return u$D(r=m$G(e.slice(t,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=m$G([])).leaf=!1,r.height=n;var s,l,u,c,h=Math.ceil(o/a),d=h*Math.ceil(Math.sqrt(a));for(y$D(e,t,i,d,this.compareMinX),s=t;s<=i;s+=d)for(y$D(e,s,u=Math.min(s+d-1,i),h,this.compareMinY),l=s;l<=u;l+=h)c=Math.min(l+h-1,u),r.children.push(this._build(e,l,c,n-1));return u$D(r,this.toBBox),r},_chooseSubtree:function(e,t,i,n){for(var r,o,a,s,l,u,c,h;n.push(t),!t.leaf&&n.length-1!==i;){for(c=h=1/0,r=0,o=t.children.length;r<o;r++)l=X$A(a=t.children[r]),(u=S$D(e,a)-l)<h?(h=u,c=l<c?l:c,s=a):u===h&&l<c&&(c=l,s=a);t=s||t.children[0]}return t},_insert:function(e,t,i){var n=this.toBBox,r=i?e:n(e),o=[],a=this._chooseSubtree(r,this.data,t,o);for(a.children.push(e),p$I(a,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},_split:function(e,t){var i=e[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=m$G(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,u$D(i,this.toBBox),u$D(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(e,t){this.data=m$G([e,t]),this.data.height=e.height+1,this.data.leaf=!1,u$D(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,i){var n,r,o,a,s,l,u,c;for(l=u=1/0,n=t;n<=i-t;n++)a=A$O(r=x$L(e,0,n,this.toBBox),o=x$L(e,n,i,this.toBBox)),s=X$A(r)+X$A(o),a<l?(l=a,c=n,u=s<u?s:u):a===l&&s<u&&(u=s,c=n);return c},_chooseSplitAxis:function(e,t,i){var n=e.leaf?this.compareMinX:g$L,r=e.leaf?this.compareMinY:v$z;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)},_allDistMargin:function(e,t,i,n){e.children.sort(n);var r,o,a=this.toBBox,s=x$L(e,0,t,a),l=x$L(e,i-t,i,a),u=d$T(s)+d$T(l);for(r=t;r<i-t;r++)o=e.children[r],p$I(s,e.leaf?a(o):o),u+=d$T(s);for(r=i-t-1;r>=t;r--)o=e.children[r],p$I(l,e.leaf?a(o):o),u+=d$T(l);return u},_adjustParentBBoxes:function(e,t,i){for(var n=i;n>=0;n--)p$I(t[n],e)},_condense:function(e){for(var t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children).splice(t.indexOf(e[i]),1):this.clear():u$D(e[i],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}},n$v.fromRectangleAndId=function(e,t,i){return i.minX=t.west,i.minY=t.south,i.maxX=t.east,i.maxY=t.north,i.id=e,i},r$G.prototype.insert=function(e,t){o$1q.typeOf.string("id",e),o$1q.typeOf.object("rectangle",t);var i=n$v.fromRectangleAndId(e,t,new n$v);this._tree.insert(i)};var h$G=new n$v;r$G.prototype.remove=function(e,t){o$1q.typeOf.string("id",e),o$1q.typeOf.object("rectangle",t);var i=n$v.fromRectangleAndId(e,t,h$G);this._tree.remove(i,d$S)};var m$F=new n$v,e$R;function p$H(e){return e$R(e)}function y$C(e,t,i){return o$1q.typeOf.object("terrainProvider",e),o$1q.typeOf.number("level",t),o$1q.defined("positions",i),e.readyPromise.then((function(){return b$K(e,t,i)}))}function b$K(e,t,i){var n,r=e.tilingScheme,o=[],a={};for(n=0;n<i.length;++n){var s=r.positionToTileXY(i[n],t),l=s.toString();if(!a.hasOwnProperty(l)){var u={x:s.x,y:s.y,level:t,tilingScheme:r,terrainProvider:e,positions:[]};a[l]=u,o.push(u)}a[l].positions.push(i[n])}var c=[];for(n=0;n<o.length;++n){var h=o[n],d=new r$1c({throttle:!1,throttleByServer:!1,type:U$1f.TERRAIN}),f=h.terrainProvider.requestTileGeometry(h.x,h.y,h.level,d,!0).then(w$A(h,e)).otherwise(x$K(h));c.push(f)}return o$1l.all(c,(function(){return i}))}function w$A(e,t){var i=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(e){if(t._isSct&&t._isTerrainZ)for(var r=nt$b.inflate(e.buffer).buffer,o=t.createTerrainData(e,r),a=0;a<i.length;++a){(s=i[a]).height=o.interpolateHeight(n,s.longitude,s.latitude)}else for(a=0;a<i.length;++a){var s;(s=i[a]).height=e.interpolateHeight(n,s.longitude,s.latitude)}}}function x$K(e){var t=e.positions;return function(){for(var e=0;e<t.length;++e){t[e].height=void 0}}}r$G.prototype.collides=function(e){o$1q.typeOf.object("rectangle",e);var t=n$v.fromRectangleAndId("",e,m$F);return this._tree.collides(t)},typeof requestAnimationFrame<"u"&&(e$R=requestAnimationFrame),function(){if(!e$2e(e$R)&&typeof window<"u")for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!e$2e(e$R);)e$R=window[e[t]+"RequestAnimationFrame"],++t;if(!e$2e(e$R)){var n=0;e$R=function(e){var t=Et$c(),i=Math.max(16.666666666666668-(t-n),0);return n=t+i,setTimeout((function(){e(n)}),i)}}}();var o$E=new o$1o;function y$B(e,t){if(!e$2e(e))throw new t$15("terrainProvider is required.");if(!e$2e(t))throw new t$15("positions is required.");return e.readyPromise.then((function(){var i=[],n=[],r=e.availability;if(!e$2e(r)&&!e._isSct)throw new t$15("sampleTerrainMostDetailed requires a terrain provider that has tile availability.");for(var o=[],a=0;a<t.length;++a){var s=t[a],l=e$2e(r)?r.computeMaximumLevelAtPosition(s):e._levels[e._levels.length-1];if(n[a]=l,0===l){e.tilingScheme.positionToTileXY(s,1,o$E);var u=e.loadTileDataAvailability(o$E.x,o$E.y,1);e$2e(u)&&o.push(u)}var c=i[l];e$2e(c)||(i[l]=c=[]),c.push(s)}return o$1l.all(o).then((function(){return o$1l.all(i.map((function(t,i){if(e$2e(t))return y$C(e,i,t)})))})).then((function(){for(var i=[],o=0;o<t.length;++o){var a=t[o];(e$2e(r)?r.computeMaximumLevelAtPosition(a):e._levels[e._levels.length-1])!==n[o]&&i.push(a)}if(i.length>0)return y$B(e,i)})).then((function(){return t}))}))}var E$I={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},G$J=Object.freeze(E$I);function w$z(e,t,i){let n=e._element,r=n.offsetWidth/n.getBoundingClientRect().width,o=n.offsetHeight/n.getBoundingClientRect().height;if(n===document)return i.x=t.clientX*r,i.y=t.clientY*o,i;var a=n.getBoundingClientRect();return i.x=(t.clientX-a.left)*r,i.y=(t.clientY-a.top)*o,i}function R$z(e,t){var i=e;return e$2e(t)&&(i+="+"+t),i}function y$A(e){return e.shiftKey?Aa$1.SHIFT:e.ctrlKey?Aa$1.CTRL:e.altKey?Aa$1.ALT:void 0}var l$L={LEFT:0,MIDDLE:1,RIGHT:2};function T$F(e,t,i,n){function r(t){n(e,t)}i.addEventListener(t,r,!1),e._removalFunctions.push((function(){i.removeEventListener(t,r,!1)}))}function ho$1(e){var t=e._element,i=e$2e(t.disableRootEvents)?t:document;s$Z.supportsPointerEvents()?(T$F(e,"pointerdown",t,go$1),T$F(e,"pointerup",t,W$G),T$F(e,"pointermove",t,ao$1),T$F(e,"pointercancel",t,W$G)):(T$F(e,"mousedown",t,j$C),T$F(e,"mouseup",i,K$B),T$F(e,"mousemove",i,Q$C),T$F(e,"touchstart",t,To$1),T$F(e,"touchend",i,$$C),T$F(e,"touchmove",i,Po$1),T$F(e,"touchcancel",i,$$C)),T$F(e,"dblclick",t,lo$1),T$F(e,"onwheel"in t?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",t,mo$1)}function _o$1(e){for(var t=e._removalFunctions,i=0;i<t.length;++i)t[i]()}var Y$u={position:new o$1o};function O$w(e){e._lastSeenTouchEvent=Et$c()}function k$z(e){return Et$c()-e._lastSeenTouchEvent>g$K.mouseEmulationIgnoreMilliseconds}function d$R(e,t,i){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)<i}function j$C(e,t){if(k$z(e)){var i,n=t.button;if(e._buttonDown[n]=!0,n===l$L.LEFT)i=G$J.LEFT_DOWN;else if(n===l$L.MIDDLE)i=G$J.MIDDLE_DOWN;else{if(n!==l$L.RIGHT)return;i=G$J.RIGHT_DOWN}var r=w$z(e,t,e._primaryPosition);o$1o.clone(r,e._primaryStartPosition),o$1o.clone(r,e._primaryPreviousPosition);var o=y$A(t),a=e.getInputAction(i,o);e$2e(a)&&(o$1o.clone(r,Y$u.position),a(Y$u),t.preventDefault())}}var z$B={position:new o$1o},J$z={position:new o$1o};function G$I(e,t,i,n){var r=y$A(n),o=e.getInputAction(t,r),a=e.getInputAction(i,r);if(e$2e(o)||e$2e(a)){var s=w$z(e,n,e._primaryPosition);if(e$2e(o)&&(o$1o.clone(s,z$B.position),o(z$B)),e$2e(a))d$R(e._primaryStartPosition,s,e._clickPixelTolerance)&&(o$1o.clone(s,J$z.position),a(J$z))}}function K$B(e,t){if(k$z(e)){var i=t.button;i!==l$L.LEFT&&i!==l$L.MIDDLE&&i!==l$L.RIGHT||(e._buttonDown[l$L.LEFT]&&(G$I(e,G$J.LEFT_UP,G$J.LEFT_CLICK,t),e._buttonDown[l$L.LEFT]=!1),e._buttonDown[l$L.MIDDLE]&&(G$I(e,G$J.MIDDLE_UP,G$J.MIDDLE_CLICK,t),e._buttonDown[l$L.MIDDLE]=!1),e._buttonDown[l$L.RIGHT]&&(G$I(e,G$J.RIGHT_UP,G$J.RIGHT_CLICK,t),e._buttonDown[l$L.RIGHT]=!1))}}var U$E={startPosition:new o$1o,endPosition:new o$1o};function Q$C(e,t){if(k$z(e)){var i=y$A(t),n=w$z(e,t,e._primaryPosition),r=e._primaryPreviousPosition,o=e.getInputAction(G$J.MOUSE_MOVE,i);e$2e(o)&&(o$1o.clone(r,U$E.startPosition),o$1o.clone(n,U$E.endPosition),o(U$E,t)),o$1o.clone(n,r),(e._buttonDown[l$L.LEFT]||e._buttonDown[l$L.MIDDLE]||e._buttonDown[l$L.RIGHT])&&t.preventDefault()}}var Z$C={position:new o$1o};function lo$1(e,t){var i;if(t.button===l$L.LEFT){i=G$J.LEFT_DOUBLE_CLICK;var n=y$A(t),r=e.getInputAction(i,n);e$2e(r)&&(w$z(e,t,Z$C.position),r(Z$C))}}function mo$1(e,t){var i;if(e$2e(t.deltaY)){var n=t.deltaMode;i=n===t.DOM_DELTA_PIXEL?-t.deltaY:n===t.DOM_DELTA_LINE?40*-t.deltaY:120*-t.deltaY}else i=t.detail>0?-120*t.detail:t.wheelDelta;if(e$2e(i)){var r=y$A(t),o=e.getInputAction(G$J.WHEEL,r);e$2e(o)&&(o(i),t.preventDefault())}}function To$1(e,t){O$w(e);var i,n,r,o=t.changedTouches,a=o.length,s=e._positions;for(i=0;i<a;++i)r=(n=o[i]).identifier,s.set(r,w$z(e,n,new o$1o));p$G(e,t);var l=e._previousPositions;for(i=0;i<a;++i)r=(n=o[i]).identifier,l.set(r,o$1o.clone(s.get(r)))}function $$C(e,t){O$w(e);var i,n,r=t.changedTouches,o=r.length,a=e._positions;for(i=0;i<o;++i)n=r[i].identifier,a.remove(n);p$G(e,t);var s=e._previousPositions;for(i=0;i<o;++i)n=r[i].identifier,s.remove(n)}var X$z={position:new o$1o},N$z={position1:new o$1o,position2:new o$1o},e$Q={position:new o$1o},E$H={position:new o$1o},H$H={position:new o$1o};function p$G(e,t){var i,n,r=y$A(t),o=e._positions,a=o.length,s=e._isPinching;if(1!==a&&e._buttonDown[l$L.LEFT]){if(e._buttonDown[l$L.LEFT]=!1,e$2e(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),e$2e(i=e.getInputAction(G$J.LEFT_UP,r))&&(o$1o.clone(e._primaryPosition,e$Q.position),i(e$Q)),0===a&&!e._isTouchHolding&&e$2e(n=e.getInputAction(G$J.LEFT_CLICK,r)))d$R(e._primaryStartPosition,e._previousPositions.values[0],e._clickPixelTolerance)&&(o$1o.clone(e._primaryPosition,E$H.position),n(E$H));e._isTouchHolding=!1}if(0===a&&s&&(e._isPinching=!1,e$2e(i=e.getInputAction(G$J.PINCH_END,r))&&i()),1===a&&!s){var l=o.values[0];o$1o.clone(l,e._primaryPosition),o$1o.clone(l,e._primaryStartPosition),o$1o.clone(l,e._primaryPreviousPosition),e._buttonDown[l$L.LEFT]=!0,e$2e(i=e.getInputAction(G$J.LEFT_DOWN,r))&&(o$1o.clone(l,X$z.position),i(X$z)),e._touchHoldTimer=setTimeout((function(){!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,e$2e(n=e.getInputAction(G$J.RIGHT_CLICK,r)))&&(d$R(e._primaryStartPosition,e._previousPositions.values[0],e._holdPixelTolerance)&&(o$1o.clone(e._primaryPosition,H$H.position),n(H$H)))}),g$K.touchHoldDelayMilliseconds),t.preventDefault()}2===a&&!s&&(e._isPinching=!0,e$2e(i=e.getInputAction(G$J.PINCH_START,r))&&(o$1o.clone(o.values[0],N$z.position1),o$1o.clone(o.values[1],N$z.position2),i(N$z),t.preventDefault()))}function Po$1(e,t){O$w(e);var i,n,r,o=t.changedTouches,a=o.length,s=e._positions;for(i=0;i<a;++i){r=(n=o[i]).identifier;var l=s.get(r);e$2e(l)&&w$z(e,n,l)}S$C(e,t);var u=e._previousPositions;for(i=0;i<a;++i)r=(n=o[i]).identifier,o$1o.clone(s.get(r),u.get(r))}var c$C={startPosition:new o$1o,endPosition:new o$1o},L$L={distance:{startPosition:new o$1o,endPosition:new o$1o},angleAndHeight:{startPosition:new o$1o,endPosition:new o$1o}};function S$C(e,t){var i,n=y$A(t),r=e._positions,o=e._previousPositions,a=r.length;if(1===a&&e._buttonDown[l$L.LEFT]){var s=r.values[0];o$1o.clone(s,e._primaryPosition);var l=e._primaryPreviousPosition;e$2e(i=e.getInputAction(G$J.MOUSE_MOVE,n))&&(o$1o.clone(l,c$C.startPosition),o$1o.clone(s,c$C.endPosition),i(c$C,t)),o$1o.clone(s,l),t.preventDefault()}else if(2===a&&e._isPinching&&e$2e(i=e.getInputAction(G$J.PINCH_MOVE,n))){var u=r.values[0],c=r.values[1],h=o.values[0],d=o.values[1],f=c.x-u.x,p=c.y-u.y,_=.25*Math.sqrt(f*f+p*p),m=d.x-h.x,g=d.y-h.y,x=.25*Math.sqrt(m*m+g*g),y=.125*(c.y+u.y),v=.125*(d.y+h.y),$=Math.atan2(p,f),b=Math.atan2(g,m);o$1o.fromElements(0,x,L$L.distance.startPosition),o$1o.fromElements(0,_,L$L.distance.endPosition),o$1o.fromElements(b,v,L$L.angleAndHeight.startPosition),o$1o.fromElements($,y,L$L.angleAndHeight.endPosition),i(L$L)}}function go$1(e,t){if(t.target.setPointerCapture(t.pointerId),"touch"===t.pointerType){var i=e._positions,n=t.pointerId;i.set(n,w$z(e,t,new o$1o)),p$G(e,t),e._previousPositions.set(n,o$1o.clone(i.get(n)))}else j$C(e,t)}function W$G(e,t){if("touch"===t.pointerType){var i=e._positions,n=t.pointerId;i.remove(n),p$G(e,t),e._previousPositions.remove(n)}else K$B(e,t)}function ao$1(e,t){if("touch"===t.pointerType){var i=e._positions,n=t.pointerId,r=i.get(n);if(!e$2e(r))return;w$z(e,t,r),S$C(e,t);var o=e._previousPositions;o$1o.clone(i.get(n),o.get(n))}else Q$C(e,t)}function g$K(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-g$K.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new o$1o,this._primaryPosition=new o$1o,this._primaryPreviousPosition=new o$1o,this._positions=new e$1Q,this._previousPositions=new e$1Q,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=u$Z(e,document),ho$1(this)}g$K.prototype.setInputAction=function(e,t,i){if(!e$2e(e))throw new t$15("action is required.");if(!e$2e(t))throw new t$15("type is required.");var n=R$z(t,i);this._inputEvents[n]=e},g$K.prototype.getInputAction=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=R$z(e,t);return this._inputEvents[i]},g$K.prototype.removeInputAction=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=R$z(e,t);delete this._inputEvents[i]},g$K.prototype.registerListenersForWindowTop=function(){var e=window.top,t=e$2e(e.disableRootEvents)?e:document;s$Z.supportsPointerEvents()?T$F(this,"pointerup",e,W$G):T$F(this,"mouseup",t,K$B)},g$K.prototype.isDestroyed=function(){return!1},g$K.prototype.destroy=function(){return _o$1(this),i$11(this)},g$K.mouseEmulationIgnoreMilliseconds=800,g$K.touchHoldDelayMilliseconds=1500;var F$G={};function wa(e){var t=6.239996+.0172019696544*e;return.001657*Math.sin(t+.01671*Math.sin(t))}var Ta$1=32.184,la$2=2451545;function K$A(e,t){t=a$15.addSeconds(e,Ta$1,t);var i=a$15.totalDays(t)-la$2;return t=a$15.addSeconds(t,wa(i),t)}var B$A=new a$15(2451545,0,H$1d.TAI),ga$1=1e3,S$B=e$2d.RADIANS_PER_DEGREE,p$F=e$2d.RADIANS_PER_ARCSECOND,f$K=14959787e4,X$y=new p$1e;function k$y(e,t,i,n,r,o,a){if(i<0&&(i=-i,r+=e$2d.PI),i<0||i>e$2d.PI)throw new t$15("The inclination is out of range. Inclination must be greater than or equal to zero and less than or equal to Pi radians.");var s=e*(1-t),l=n-r,u=r,c=Aa(o-n,t);if("Hyperbolic"===Ea$1(t,0)&&Math.abs(e$2d.negativePiToPi(c))>=Math.acos(-1/t))throw new t$15("The true anomaly of the hyperbolic orbit lies outside of the bounds of the hyperbola.");ba(l,i,u,X$y);var h=s*(1+t),d=Math.cos(c),f=Math.sin(c),p=1+t*d;if(p<=e$2d.Epsilon10)throw new t$15("elements cannot be converted to cartesian");var _=h/p;return e$2e(a)?(a.x=_*d,a.y=_*f,a.z=0):a=new o$1p(_*d,_*f,0),p$1e.multiplyByVector(X$y,a,a)}function Ea$1(e,t){if(e<0)throw new t$15("eccentricity cannot be negative.");return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function Aa(e,t){if(t<0||t>=1)throw new t$15("eccentricity out of range.");return _a$1(Oa(e,t),t)}var G$H=50,Ia$1=e$2d.EPSILON8;function Oa(e,t){if(t<0||t>=1)throw new t$15("eccentricity out of range.");var i,n=Math.floor(e/e$2d.TWO_PI),r=(e-=n*e$2d.TWO_PI)+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE;for(i=0;i<G$H&&Math.abs(o-r)>Ia$1;++i){r=(o=r)-(o-t*Math.sin(o)-e)/(1-t*Math.cos(o))}if(i>=G$H)throw new t$15("Kepler equation did not converge");return o=r+n*e$2d.TWO_PI}function _a$1(e,t){if(t<0||t>=1)throw new t$15("eccentricity out of range.");var i=Math.floor(e/e$2d.TWO_PI);e-=i*e$2d.TWO_PI;var n=Math.cos(e)-t,r=Math.sin(e)*Math.sqrt(1-t*t),o=Math.atan2(r,n);return o=e$2d.zeroToTwoPi(o),e<0&&(o-=e$2d.TWO_PI),o+=i*e$2d.TWO_PI}function ba(e,t,i,n){if(t<0||t>e$2d.PI)throw new t$15("inclination out of range");var r=Math.cos(e),o=Math.sin(e),a=Math.cos(t),s=Math.sin(t),l=Math.cos(i),u=Math.sin(i);return e$2e(n)?(n[0]=l*r-u*o*a,n[1]=u*r+l*o*a,n[2]=o*s,n[3]=-l*o-u*r*a,n[4]=-u*o+l*r*a,n[5]=r*s,n[6]=u*s,n[7]=-l*s,n[8]=a):n=new p$1e(l*r-u*o*a,-l*o-u*r*a,u*s,u*r+l*o*a,-u*o+l*r*a,-l*s,o*s,r*s,a),n}var Da$1=1.0000010178*f$K,Na=100.46645683*S$B,ya=1295977422.83429*p$F,Q$B=16002,Z$B=21863,$$B=32004,j$B=10931,aa$3=14529,ra$3=16368,ta$2=15318,oa$3=32794,Ra$1=64*1e-7*f$K,qa$1=1e-7*-152*f$K,xa$1=62*1e-7*f$K,La$1=-8e-7*f$K,Wa=32*1e-7*f$K,Ya$1=1e-7*-41*f$K,Ua$1=19*1e-7*f$K,Ba$1=1e-7*-11*f$K,Va=1e-7*-150*f$K,Fa$1=1e-7*-46*f$K,Ja$1=68*1e-7*f$K,za$1=54*1e-7*f$K,Ha=14*1e-7*f$K,Ka$1=24*1e-7*f$K,Xa$1=1e-7*-28*f$K,ka=22*1e-7*f$K,na$2=10,ea$4=16002,ia$2=21863,sa$2=10931,ha$2=1473,va=32004,Ma$1=4387,ca=73,Ga$1=1e-7*-325,Qa$1=1e-7*-322,Za$1=1e-7*-79,$a$1=232*1e-7,ja=1e-7*-52,a0=97*1e-7,r0=55*1e-7,t0$1=1e-7*-41,o0=1e-7*-105,n0=1e-7*-137,e0=258*1e-7,i0=35*1e-7,s0=1e-7*-116,h0=1e-7*-88,v0=1e-7*-112,M0=1e-7*-80,b$J=new a$15(0,0,H$1d.TAI);function c0(e,t){K$A(e,b$J);var i=(b$J.dayNumber-B$A.dayNumber+(b$J.secondsOfDay-B$A.secondsOfDay)/h$17.SECONDS_PER_DAY)/(10*h$17.DAYS_PER_JULIAN_CENTURY),n=.3595362*i,r=Da$1+Ra$1*Math.cos(Q$B*n)+Va*Math.sin(Q$B*n)+qa$1*Math.cos(Z$B*n)+Fa$1*Math.sin(Z$B*n)+xa$1*Math.cos($$B*n)+Ja$1*Math.sin($$B*n)+La$1*Math.cos(j$B*n)+za$1*Math.sin(j$B*n)+Wa*Math.cos(aa$3*n)+Ha*Math.sin(aa$3*n)+Ya$1*Math.cos(ra$3*n)+Ka$1*Math.sin(ra$3*n)+Ua$1*Math.cos(ta$2*n)+Xa$1*Math.sin(ta$2*n)+Ba$1*Math.cos(oa$3*n)+ka*Math.sin(oa$3*n),o=Na+ya*i+Ga$1*Math.cos(na$2*n)+o0*Math.sin(na$2*n)+Qa$1*Math.cos(ea$4*n)+n0*Math.sin(ea$4*n)+Za$1*Math.cos(ia$2*n)+e0*Math.sin(ia$2*n)+$a$1*Math.cos(sa$2*n)+i0*Math.sin(sa$2*n)+ja*Math.cos(ha$2*n)+s0*Math.sin(ha$2*n)+a0*Math.cos(va*n)+h0*Math.sin(va*n)+r0*Math.cos(Ma$1*n)+v0*Math.sin(Ma$1*n)+t0$1*Math.cos(ca*n)+M0*Math.sin(ca*n);return k$y(r,.0167086342-.0004203654*i,469.97289*p$F*i,102.93734808*S$B+11612.3529*p$F*i,174.87317577*S$B-8679.27034*p$F*i,o,t)}function fa$1(e,t){K$A(e,b$J);var i=(b$J.dayNumber-B$A.dayNumber+(b$J.secondsOfDay-B$A.secondsOfDay)/h$17.SECONDS_PER_DAY)/h$17.DAYS_PER_JULIAN_CENTURY,n=i*i,r=n*i,o=r*i,a=383397.7725+.004*i,s=.055545526-16e-9*i,l=5.15668983*S$B,u=-8e-5*i+.02966*n-42e-6*r-13e-8*o,c=83.35324312*S$B,h=14643420.2669*i-38.2702*n-.045047*r+21301e-8*o,d=125.04455501*S$B,f=-6967919.3631*i+6.3602*n+.007625*r-3586e-8*o,p=218.31664563*S$B,_=1732559343.4847*i-6.391*n+.006588*r-3169e-8*o,m=297.85019547*S$B+p$F*(1602961601.209*i-6.3706*n+.006593*r-3169e-8*o),g=134.96340251*S$B+p$F*(1717915923.2178*i+31.8792*n+.051635*r-2447e-7*o),x=357.52910918*S$B+p$F*(129596581.0481*i-.5532*n+136e-6*r-1149e-8*o),y=310.17137918*S$B-p$F*(6967051.436*i+6.2068*n+.007618*r-3219e-8*o),v=2*m,$=4*m,b=6*m,T=2*g,C=3*g,S=4*g,w=2*(93.27209062*S$B+p$F*(1739527262.8478*i-12.7512*n-.001037*r+417e-8*o));a+=3400.4*Math.cos(v)-635.6*Math.cos(v-g)-235.6*Math.cos(g)+218.1*Math.cos(v-x)+181*Math.cos(v+g),s+=.014216*Math.cos(v-g)+.008551*Math.cos(v-T)-.001383*Math.cos(g)+.001356*Math.cos(v+g)-.001147*Math.cos($-C)-914e-6*Math.cos($-T)+869e-6*Math.cos(v-x-g)-627e-6*Math.cos(v)-394e-6*Math.cos($-S)+282e-6*Math.cos(v-x-T)-279e-6*Math.cos(m-g)-236e-6*Math.cos(T)+231e-6*Math.cos($)+229e-6*Math.cos(b-S)-201e-6*Math.cos(T-w),u+=486.26*Math.cos(v-w)-40.13*Math.cos(v)+37.51*Math.cos(w)+25.73*Math.cos(T-w)+19.97*Math.cos(v-x-w),h+=-55609*Math.sin(v-g)-34711*Math.sin(v-T)-9792*Math.sin(g)+9385*Math.sin($-C)+7505*Math.sin($-T)+5318*Math.sin(v+g)+3484*Math.sin($-S)-3417*Math.sin(v-x-g)-2530*Math.sin(b-S)-2376*Math.sin(v)-2075*Math.sin(v-C)-1883*Math.sin(T)-1736*Math.sin(b-5*g)+1626*Math.sin(x)-1370*Math.sin(b-C),f+=-5392*Math.sin(v-w)-540*Math.sin(x)-441*Math.sin(v)+423*Math.sin(w)-288*Math.sin(T-w),_+=-3332.9*Math.sin(v)+1197.4*Math.sin(v-g)-662.5*Math.sin(x)+396.3*Math.sin(g)-218*Math.sin(v-x);var E=2*y,P=3*y;u+=46.997*Math.cos(y)*i-.614*Math.cos(v-w+y)*i+.614*Math.cos(v-w-y)*i-.0297*Math.cos(E)*n-.0335*Math.cos(y)*n+.0012*Math.cos(v-w+E)*n-16e-5*Math.cos(y)*r+4e-5*Math.cos(P)*r+4e-5*Math.cos(E)*r;var A=2.116*Math.sin(y)*i-.111*Math.sin(v-w-y)*i-.0015*Math.sin(y)*n;return h+=A,_+=A,f+=-520.77*Math.sin(y)*i+13.66*Math.sin(v-w+y)*i+1.12*Math.sin(v-y)*i-1.06*Math.sin(w-y)*i+.66*Math.sin(E)*n+.371*Math.sin(y)*n-.035*Math.sin(v-w+E)*n-.015*Math.sin(v-w+y)*n+.0014*Math.sin(y)*r-.0011*Math.sin(P)*r-9e-4*Math.sin(E)*r,k$y(a*=ga$1,s,l+u*p$F,c+h*p$F,d+f*p$F,p+_*p$F,t)}var ua$1=.012300034,f0=ua$1/(ua$1+1)*-1;function u0(e,t){return t=fa$1(e,t),o$1p.multiplyByScalar(t,f0,t)}var ma$1=new p$1e(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),R$y=new o$1p;function ae$n(e,t,i,n,r,o,a){var s,l=m$X.numberOfPoints(e,t,r),u=i.red,c=i.green,h=i.blue,d=i.alpha,f=n.red,p=n.green,_=n.blue,m=n.alpha;if(e$1X.equals(i,n)){for(s=0;s<l;s++)o[a++]=e$1X.floatToByte(u),o[a++]=e$1X.floatToByte(c),o[a++]=e$1X.floatToByte(h),o[a++]=e$1X.floatToByte(d);return a}var g=(f-u)/l,x=(p-c)/l,y=(_-h)/l,v=(m-d)/l,$=a;for(s=0;s<l;s++)o[$++]=e$1X.floatToByte(u+s*g),o[$++]=e$1X.floatToByte(c+s*x),o[$++]=e$1X.floatToByte(h+s*y),o[$++]=e$1X.floatToByte(d+s*v);return $}function S$A(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,i=e.colors,n=u$Z(e.colorsPerVertex,!1);if(!e$2e(t)||t.length<2)throw new t$15("At least two positions are required.");if(e$2e(i)&&(n&&i.length<t.length||!n&&i.length<t.length-1))throw new t$15("colors has an invalid length.");this._positions=t,this._colors=i,this._colorsPerVertex=n,this._arcType=u$Z(e.arcType,m$1h.GEODESIC),this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._workerName="createSimplePolylineGeometry";var r=1+t.length*o$1p.packedLength;r+=e$2e(i)?1+i.length*e$1X.packedLength:1,this.packedLength=r+t$12.packedLength+3}F$G.computeSunPositionInEarthInertialFrame=function(e,t){return e$2e(e)||(e=a$15.now()),e$2e(t)||(t=new o$1p),R$y=c0(e,R$y),t=o$1p.negate(R$y,t),u0(e,R$y),o$1p.subtract(t,R$y,t),p$1e.multiplyByVector(ma$1,t,t),t},F$G.computeMoonPositionInEarthInertialFrame=function(e,t){return e$2e(e)||(e=a$15.now()),t=fa$1(e,t),p$1e.multiplyByVector(ma$1,t,t),t},S$A.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");i=u$Z(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._colors;for(o=e$2e(a)?a.length:0,t[i++]=o,n=0;n<o;++n,i+=e$1X.packedLength)e$1X.pack(a[n],t,i);return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i]=e._granularity,t},S$A.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);var a=(r=e[t++])>0?new Array(r):void 0;for(n=0;n<r;++n,t+=e$1X.packedLength)a[n]=e$1X.unpack(e,t);var s=t$12.unpack(e,t);t+=t$12.packedLength;var l=1===e[t++],u=e[t++],c=e[t];return e$2e(i)?(i._positions=o,i._colors=a,i._ellipsoid=s,i._colorsPerVertex=l,i._arcType=u,i._granularity=c,i):new S$A({positions:o,colors:a,ellipsoid:s,colorsPerVertex:l,arcType:u,granularity:c})};var U$D=new Array(2),q$G=new Array(2),te$r={positions:U$D,height:q$G,ellipsoid:void 0,minDistance:void 0,granularity:void 0};function l$K(){this._maxVisibleValue=17976931348623157e292,this._minVisibleValue=-17976931348623157e292,this._floor=0,this._ceiling=0,this._opacity=1,this._updateColorDictTable=!1,this._coverageArea=[],this._updatePolygon=!0,this._displayMode=_0x25bb47.DisplayMode.FACE,this._dictColorTable=void 0}function n$u(e){var t=u$Z(e.radius,1),i={radii:new o$1p(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new b$O(i),this._workerName="createSphereGeometry"}S$A.createGeometry=function(e){var t,i,n,r,o,a=e._positions,s=e._colors,l=e._colorsPerVertex,u=e._arcType,c=e._granularity,h=e._ellipsoid,d=e$2d.chordLength(c,h.maximumRadius),f=e$2e(s)&&!l,p=a.length,_=0;if(u===m$1h.GEODESIC||u===m$1h.RHUMB){var m,g,x;u===m$1h.GEODESIC?(m=e$2d.chordLength(c,h.maximumRadius),g=m$X.numberOfPoints,x=m$X.generateArc):(m=c,g=m$X.numberOfPointsRhumbLine,x=m$X.generateRhumbArc);var y=m$X.extractHeights(a,h),v=te$r;if(u===m$1h.GEODESIC?v.minDistance=d:v.granularity=c,v.ellipsoid=h,f){var $=0;for(t=0;t<p-1;t++)$+=g(a[t],a[t+1],m)+1;i=new Float64Array(3*$),r=new Uint8Array(4*$),v.positions=U$D,v.height=q$G;var b=0;for(t=0;t<p-1;++t){U$D[0]=a[t],U$D[1]=a[t+1],q$G[0]=y[t],q$G[1]=y[t+1];var T=x(v);if(e$2e(s)){var C=T.length/3;o=s[t];for(var S=0;S<C;++S)r[b++]=e$1X.floatToByte(o.red),r[b++]=e$1X.floatToByte(o.green),r[b++]=e$1X.floatToByte(o.blue),r[b++]=e$1X.floatToByte(o.alpha)}i.set(T,_),_+=T.length}}else if(v.positions=a,v.height=y,i=new Float64Array(x(v)),e$2e(s)){for(r=new Uint8Array(i.length/3*4),t=0;t<p-1;++t){_=ae$n(a[t],a[t+1],s[t],s[t+1],d,r,_)}var w=s[p-1];r[_++]=e$1X.floatToByte(w.red),r[_++]=e$1X.floatToByte(w.green),r[_++]=e$1X.floatToByte(w.blue),r[_++]=e$1X.floatToByte(w.alpha)}}else{n=f?2*p-2:p,i=new Float64Array(3*n),r=e$2e(s)?new Uint8Array(4*n):void 0;var E=0,P=0;for(t=0;t<p;++t){var A=a[t];if(f&&t>0&&(o$1p.pack(A,i,E),E+=3,o=s[t-1],r[P++]=e$1X.floatToByte(o.red),r[P++]=e$1X.floatToByte(o.green),r[P++]=e$1X.floatToByte(o.blue),r[P++]=e$1X.floatToByte(o.alpha)),f&&t===p-1)break;o$1p.pack(A,i,E),E+=3,e$2e(s)&&(o=s[t],r[P++]=e$1X.floatToByte(o.red),r[P++]=e$1X.floatToByte(o.green),r[P++]=e$1X.floatToByte(o.blue),r[P++]=e$1X.floatToByte(o.alpha))}}var L=new a$_;L.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:i}),e$2e(s)&&(L.color=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,values:r,normalize:!0}));var M=2*((n=i.length/3)-1),R=ce$z.createTypedArray(n,M),O=0;for(t=0;t<n-1;++t)R[O++]=t,R[O++]=t+1;return new I$1p({attributes:L,indices:R,primitiveType:W$18.LINES,boundingSphere:i$1d.fromPoints(a)})},l$K.prototype.destroy=function(){this._coverageArea.length=0,e$2e(this._dictColorTable)&&this._dictColorTable.destroy()},Object.defineProperties(l$K.prototype,{MinVisibleValue:{get:function(){return this._minVisibleValue},set:function(e){this._minVisibleValue=e}},MaxVisibleValue:{get:function(){return this._maxVisibleValue},set:function(e){this._maxVisibleValue=e}},ColorTableMaxKey:{get:function(){return this._ceiling},set:function(e){this._ceiling=e}},ColorTableMinKey:{get:function(){return this._floor},set:function(e){this._floor=e}},ColorTable:{get:function(){return this._dictColorTable},set:function(e){if(e$2e(e)){this._dictColorTable=i$T.clone(e,this._dictColorTable),this._updateColorDictTable=!0;var t=this._dictColorTable.count();if(!(t<1)){new e$1X;var i=0,n=0,r=this._dictColorTable.getItem(0);e$2e(r)&&e$2e(r.altitude)&&(i=parseFloat(r.altitude)),e$2e(r=this._dictColorTable.getItem(t-1))&&e$2e(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n)}}else e$2e(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null)}},Opacity:{get:function(){return this._opacity},set:function(e){this._opacity=e}},CoverageArea:{get:function(){return this._coverageArea},set:function(e){if(this._updatePolygon=!0,this._coverageArea.length=0,e$2e(e))for(var t=0;t<e.length;t++)this._coverageArea[t]=e[t]}},DisplayMode:{get:function(){return this._displayMode},set:function(e){this._displayMode=e}},UpdateColorDictTable:{get:function(){return this._updateColorDictTable},set:function(e){this._updateColorDictTable=e}},UpdatePolygonRegion:{get:function(){return this._updatePolygon},set:function(e){this._updatePolygon=e}}}),l$K.clone=function(e,t){if(e$2e(e)){e$2e(t)||(t=new l$K),t._maxVisibleValue=e._maxVisibleValue,t._minVisibleValue=e._minVisibleValue,t._floor=e._floor,t._ceiling=e._ceiling,t._opacity=e._opacity,t._updateColorDictTable=e._updateColorDictTable,t._updatePolygon=e._updatePolygon,t._displayMode=e._displayMode,t._dictColorTable=i$T.clone(e._dictColorTable,t._dictColorTable),t._coverageArea.length=0;for(var i=0;i<e._coverageArea.length;i++)t._coverageArea[i]=e._coverageArea[i];return t}},n$u.packedLength=b$O.packedLength,n$u.pack=function(e,t,i){return o$1q.typeOf.object("value",e),b$O.pack(e._ellipsoidGeometry,t,i)};var p$E=new b$O,r$F={radius:void 0,radii:new o$1p,vertexFormat:new n$13,stackPartitions:void 0,slicePartitions:void 0};function c$B(e,t,i){this.clock=u$Z(e,0),this.cone=u$Z(t,0),this.magnitude=u$Z(i,1)}function f$J(e){this.url=u$Z(e.url,"")}function r$E(){t$15.throwInstantiationError()}function o$D(e){throw new t$15("This type should not be instantiated directly. Instead, use WebMercatorTilingScheme or GeographicTilingScheme.")}function D$D(e,t){return a$15.compare(e.start,t.start)}function c$A(e){if(this._intervals=[],this._changedEvent=new o$1h,e$2e(e))for(var t=e.length,i=0;i<t;i++)this.addInterval(e[i])}n$u.unpack=function(e,t,i){var n=b$O.unpack(e,t,p$E);return r$F.vertexFormat=n$13.clone(n._vertexFormat,r$F.vertexFormat),r$F.stackPartitions=n._stackPartitions,r$F.slicePartitions=n._slicePartitions,e$2e(i)?(o$1p.clone(n._radii,r$F.radii),i._ellipsoidGeometry=new b$O(r$F),i):(r$F.radius=n._radii.x,new n$u(r$F))},n$u.createGeometry=function(e){return b$O.createGeometry(e._ellipsoidGeometry)},c$B.fromCartesian3=function(e,t){o$1q.typeOf.object("cartesian3",e);var i=e.x,n=e.y,r=e.z,o=i*i+n*n;return e$2e(t)||(t=new c$B),t.clock=Math.atan2(n,i),t.cone=Math.atan2(Math.sqrt(o),r),t.magnitude=Math.sqrt(o+r*r),t},c$B.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new c$B(e.clock,e.cone,e.magnitude)},c$B.normalize=function(e,t){return o$1q.typeOf.object("spherical",e),e$2e(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new c$B(e.clock,e.cone,1)},c$B.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude},c$B.equalsEpsilon=function(e,t,i){return i=u$Z(i,0),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e.clock-t.clock)<=i&&Math.abs(e.cone-t.cone)<=i&&Math.abs(e.magnitude-t.magnitude)<=i},c$B.prototype.equals=function(e){return c$B.equals(this,e)},c$B.prototype.clone=function(e){return c$B.clone(this,e)},c$B.prototype.equalsEpsilon=function(e,t){return c$B.equalsEpsilon(this,e,t)},c$B.prototype.toString=function(){return"("+this.clock+", "+this.cone+", "+this.magnitude+")"},f$J.checkSptialLicense=function(e){if(!e$2e(e))throw new t$15("url is required");if("string"!=typeof e)throw new t$15("url must be a string");var t=e.lastIndexOf("realspace");if(-1===t)return o$1l.resolve(!1).then((function(){return!1})).otherwise((function(){return!1}));var i=e.substring(0,t);return e=i+"realspace/spatiallicense.xml",e$2e(a$O.CREDENTIAL)&&(e=a$O.addToken(e)),p$$({url:e,responseType:"text"}).then((function(e){return-1!==e.indexOf("<boolean>true</boolean>")})).otherwise((function(e){return!1}))},Object.defineProperties(r$E.prototype,{credits:{get:t$15.throwInstantiationError},waterMask:{get:t$15.throwInstantiationError}}),r$E.prototype.interpolateHeight=t$15.throwInstantiationError,r$E.prototype.isChildAvailable=t$15.throwInstantiationError,r$E.prototype.createMesh=t$15.throwInstantiationError,r$E.prototype.upsample=t$15.throwInstantiationError,r$E.prototype.wasCreatedByUpsampling=t$15.throwInstantiationError,Object.defineProperties(o$D.prototype,{ellipsoid:{get:t$15.throwInstantiationError},rectangle:{get:t$15.throwInstantiationError},projection:{get:t$15.throwInstantiationError}}),o$D.prototype.getNumberOfXTilesAtLevel=t$15.throwInstantiationError,o$D.prototype.getNumberOfYTilesAtLevel=t$15.throwInstantiationError,o$D.prototype.rectangleToNativeRectangle=t$15.throwInstantiationError,o$D.prototype.tileXYToNativeRectangle=t$15.throwInstantiationError,o$D.prototype.tileXYToRectangle=t$15.throwInstantiationError,o$D.prototype.positionToTileXY=t$15.throwInstantiationError,Object.defineProperties(c$A.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){var e=this._intervals;return 0===e.length?void 0:e[0].start}},isStartIncluded:{get:function(){var e=this._intervals;return 0!==e.length&&e[0].isStartIncluded}},stop:{get:function(){var e=this._intervals,t=e.length;return 0===t?void 0:e[t-1].stop}},isStopIncluded:{get:function(){var e=this._intervals,t=e.length;return 0!==t&&e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return 0===this._intervals.length}}}),c$A.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof c$A))return!1;var i=this._intervals,n=e._intervals,r=i.length;if(r!==n.length)return!1;for(var o=0;o<r;o++)if(!d$W.equals(i[o],n[o],t))return!1;return!0},c$A.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return this._intervals[e]},c$A.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))},c$A.prototype.findIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t]:void 0},c$A.prototype.findDataForIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0},c$A.prototype.contains=function(e){return this.indexOf(e)>=0};var q$F=new d$W;c$A.prototype.indexOf=function(e){if(!e$2e(e))throw new t$15("date is required");var t=this._intervals;q$F.start=e,q$F.stop=e;var i=a$17(t,q$F,D$D);return i>=0?t[i].isStartIncluded?i:i>0&&t[i-1].stop.equals(e)&&t[i-1].isStopIncluded?i-1:~i:(i=~i)>0&&i-1<t.length&&d$W.contains(t[i-1],e)?i-1:~i},c$A.prototype.findInterval=function(e){for(var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).start,i=e.stop,n=e.isStartIncluded,r=e.isStopIncluded,o=this._intervals,a=0,s=o.length;a<s;a++){var l=o[a];if((!e$2e(t)||l.start.equals(t))&&(!e$2e(i)||l.stop.equals(i))&&(!e$2e(n)||l.isStartIncluded===n)&&(!e$2e(r)||l.isStopIncluded===r))return o[a]}},c$A.prototype.addInterval=function(e,t){if(!e$2e(e))throw new t$15("interval is required");if(!e.isEmpty){var i=this._intervals;if(0===i.length||a$15.greaterThan(e.start,i[i.length-1].stop))return i.push(e),void this._changedEvent.raiseEvent(this);var n,r=a$17(i,e,D$D);for(r<0?r=~r:r>0&&e.isStartIncluded&&i[r-1].isStartIncluded&&i[r-1].start.equals(e.start)?--r:r<i.length&&!e.isStartIncluded&&i[r].isStartIncluded&&i[r].start.equals(e.start)&&++r,r>0&&(((n=a$15.compare(i[r-1].stop,e.start))>0||0===n&&(i[r-1].isStopIncluded||e.isStartIncluded))&&((e$2e(t)?t(i[r-1].data,e.data):i[r-1].data===e.data)?(e=a$15.greaterThan(e.stop,i[r-1].stop)?new d$W({start:i[r-1].start,stop:e.stop,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):new d$W({start:i[r-1].start,stop:i[r-1].stop,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:i[r-1].isStopIncluded||e.stop.equals(i[r-1].stop)&&e.isStopIncluded,data:e.data}),i.splice(r-1,1),--r):(((n=a$15.compare(i[r-1].stop,e.stop))>0||0===n&&i[r-1].isStopIncluded&&!e.isStopIncluded)&&i.splice(r,0,new d$W({start:e.stop,stop:i[r-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[r-1].isStopIncluded,data:i[r-1].data})),i[r-1]=new d$W({start:i[r-1].start,stop:e.start,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:i[r-1].data}))));r<i.length&&((n=a$15.compare(e.stop,i[r].start))>0||0===n&&(e.isStopIncluded||i[r].isStartIncluded));)if(e$2e(t)?t(i[r].data,e.data):i[r].data===e.data)e=new d$W({start:e.start,stop:a$15.greaterThan(i[r].stop,e.stop)?i[r].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:a$15.greaterThan(i[r].stop,e.stop)?i[r].isStopIncluded:e.isStopIncluded,data:e.data}),i.splice(r,1);else{if(i[r]=new d$W({start:e.stop,stop:i[r].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[r].isStopIncluded,data:i[r].data}),!i[r].isEmpty)break;i.splice(r,1)}i.splice(r,0,e),this._changedEvent.raiseEvent(this)}},c$A.prototype.removeInterval=function(e){if(!e$2e(e))throw new t$15("interval is required");if(e.isEmpty)return!1;var t=this._intervals,i=a$17(t,e,D$D);i<0&&(i=~i);var n=!1;for(i>0&&(a$15.greaterThan(t[i-1].stop,e.start)||t[i-1].stop.equals(e.start)&&t[i-1].isStopIncluded&&e.isStartIncluded)&&(n=!0,(a$15.greaterThan(t[i-1].stop,e.stop)||t[i-1].isStopIncluded&&!e.isStopIncluded&&t[i-1].stop.equals(e.stop))&&t.splice(i,0,new d$W({start:e.stop,stop:t[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i-1].isStopIncluded,data:t[i-1].data})),t[i-1]=new d$W({start:t[i-1].start,stop:e.start,isStartIncluded:t[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[i-1].data})),i<t.length&&!e.isStartIncluded&&t[i].isStartIncluded&&e.start.equals(t[i].start)&&(n=!0,t.splice(i,0,new d$W({start:t[i].start,stop:t[i].start,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data})),++i);i<t.length&&a$15.greaterThan(e.stop,t[i].stop);)n=!0,t.splice(i,1);return i<t.length&&e.stop.equals(t[i].stop)&&(n=!0,!e.isStopIncluded&&t[i].isStopIncluded?i+1<t.length&&t[i+1].start.equals(e.stop)&&t[i].data===t[i+1].data?(t.splice(i,1),t[i]=new d$W({start:t[i].start,stop:t[i].stop,isStartIncluded:!0,isStopIncluded:t[i].isStopIncluded,data:t[i].data})):t[i]=new d$W({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data}):t.splice(i,1)),i<t.length&&(a$15.greaterThan(e.stop,t[i].start)||e.stop.equals(t[i].start)&&e.isStopIncluded&&t[i].isStartIncluded)&&(n=!0,t[i]=new d$W({start:e.stop,stop:t[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i].isStopIncluded,data:t[i].data})),n&&this._changedEvent.raiseEvent(this),n},c$A.prototype.intersect=function(e,t,i){if(!e$2e(e))throw new t$15("other is required.");for(var n=new c$A,r=0,o=0,a=this._intervals,s=e._intervals;r<a.length&&o<s.length;){var l=a[r],u=s[o];if(a$15.lessThan(l.stop,u.start))++r;else if(a$15.lessThan(u.stop,l.start))++o;else{if(e$2e(i)||e$2e(t)&&t(l.data,u.data)||!e$2e(t)&&u.data===l.data){var c=d$W.intersect(l,u,new d$W,i);c.isEmpty||n.addInterval(c,t)}a$15.lessThan(l.stop,u.stop)||l.stop.equals(u.stop)&&!l.isStopIncluded&&u.isStopIncluded?++r:++o}}return n},c$A.fromJulianDateArray=function(e,t){if(!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.julianDates))throw new t$15("options.iso8601Array is required.");e$2e(t)||(t=new c$A);var i,n=e.julianDates,r=n.length,o=e.dataCallback,a=u$Z(e.isStartIncluded,!0),s=u$Z(e.isStopIncluded,!0),l=u$Z(e.leadingInterval,!1),u=u$Z(e.trailingInterval,!1),c=0;l&&(++c,(i=new d$W({start:o$I.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!a})).data=e$2e(o)?o(i,t.length):t.length,t.addInterval(i));for(var h=0;h<r-1;++h){var d=n[h],f=n[h+1];(i=new d$W({start:d,stop:f,isStartIncluded:t.length!==c||a,isStopIncluded:h===r-2&&s})).data=e$2e(o)?o(i,t.length):t.length,t.addInterval(i),d=f}return u&&((i=new d$W({start:n[r-1],stop:o$I.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0})).data=e$2e(o)?o(i,t.length):t.length,t.addInterval(i)),t};var I$N=new d$1r,m$E=[0,31,28,31,30,31,30,31,31,30,31,30,31];function _$y(e,t,i){e$2e(i)||(i=new a$15),a$15.toGregorianDate(e,I$N);var n=I$N.millisecond+t.millisecond,r=I$N.second+t.second,o=I$N.minute+t.minute,a=I$N.hour+t.hour,s=I$N.day+t.day,l=I$N.month+t.month,u=I$N.year+t.year;for(n>=1e3&&(r+=Math.floor(n/1e3),n%=1e3),r>=60&&(o+=Math.floor(r/60),r%=60),o>=60&&(a+=Math.floor(o/60),o%=60),a>=24&&(s+=Math.floor(a/24),a%=24),m$E[2]=i$1c(u)?29:28;s>m$E[l]||l>=13;)s>m$E[l]&&(s-=m$E[l],++l),l>=13&&(--l,u+=Math.floor(l/12),l%=12,++l),m$E[2]=i$1c(u)?29:28;return I$N.millisecond=n,I$N.second=r,I$N.minute=o,I$N.hour=a,I$N.day=s,I$N.month=l,I$N.year=u,a$15.fromGregorianDate(I$N,i)}var k$x=new a$15,N$y=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function A$N(e,t){if(!e$2e(e)||0===e.length)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,"P"===e[0]){var i=e.match(N$y);if(!e$2e(i))return!1;if(e$2e(i[1])&&(t.year=Number(i[1].replace(",","."))),e$2e(i[2])&&(t.month=Number(i[2].replace(",","."))),e$2e(i[3])&&(t.day=7*Number(i[3].replace(",","."))),e$2e(i[4])&&(t.day+=Number(i[4].replace(",","."))),e$2e(i[5])&&(t.hour=Number(i[5].replace(",","."))),e$2e(i[6])&&(t.minute=Number(i[6].replace(",","."))),e$2e(i[7])){var n=Number(i[7].replace(",","."));t.second=Math.floor(n),t.millisecond=n%1*1e3}}else"Z"!==e[e.length-1]&&(e+="Z"),a$15.toGregorianDate(a$15.fromIso8601(e,k$x),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var w$y=new d$1r;function n$t(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=u$Z(e.epoch,o$I.MINIMUM_VALUE),this.tolerance=u$Z(e.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}function p$D(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}function B$z(e,t){this.rectangle=e,this.maxLevel=t}function l$J(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url))throw new t$15("options.url is required.");var t=t$10.createIfNeeded(e.url);this._resource=t,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer(),this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:16777215};var i=e.credit;"string"==typeof i&&(i=new r$U(i)),this._credit=i,this._tilingScheme=void 0,this._rectangles=[];var n,r=this,o=u$Z(e.ellipsoid,t$12.WGS84);function a(e){var t=e.getElementsByTagName("SRS")[0].textContent;if("EPSG:4326"===t){r._tilingScheme=new g$15({ellipsoid:o});var i=e.getElementsByTagName("TileFormat")[0];r._heightmapWidth=parseInt(i.getAttribute("width"),10),r._heightmapHeight=parseInt(i.getAttribute("height"),10),r._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,Math.min(r._heightmapWidth,r._heightmapHeight),r._tilingScheme.getNumberOfXTilesAtLevel(0));for(var n=e.getElementsByTagName("DataExtent"),a=0;a<n.length;++a){var l=n[a],u=e$2d.toRadians(parseFloat(l.getAttribute("minx"))),c=e$2d.toRadians(parseFloat(l.getAttribute("miny"))),h=e$2d.toRadians(parseFloat(l.getAttribute("maxx"))),d=e$2d.toRadians(parseFloat(l.getAttribute("maxy"))),f=parseInt(l.getAttribute("maxlevel"),10);r._rectangles.push(new B$z(new h$18(u,c,h,d),f))}r._ready=!0,r._readyPromise.resolve(!0)}else s("SRS "+t+" is not supported.")}function s(e){var t=u$Z(e,"An error occurred while accessing "+r._resource.url+".");n=l$V.handleError(n,r,r._errorEvent,t,void 0,void 0,void 0,l)}function l(){o$1l(r._resource.fetchXML(),a,s)}l()}c$A.fromIso8601=function(e,t){if(!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.iso8601))throw new t$15("options.iso8601 is required.");var i=e.iso8601.split("/"),n=a$15.fromIso8601(i[0]),r=a$15.fromIso8601(i[1]),o=[];if(A$N(i[2],w$y)){var a=a$15.clone(n);for(o.push(a);a$15.compare(a,r)<0;){a=_$y(a,w$y),a$15.compare(r,a)<=0&&a$15.clone(r,a),o.push(a)}}else o.push(n,r);return c$A.fromJulianDateArray({julianDates:o,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},c$A.fromIso8601DateArray=function(e,t){if(!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.iso8601Dates))throw new t$15("options.iso8601Dates is required.");return c$A.fromJulianDateArray({julianDates:e.iso8601Dates.map((function(e){return a$15.fromIso8601(e)})),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},c$A.fromIso8601DurationArray=function(e,t){if(!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.epoch))throw new t$15("options.epoch is required.");if(!e$2e(e.iso8601Durations))throw new t$15("options.iso8601Durations is required.");for(var i,n,r=e.epoch,o=e.iso8601Durations,a=u$Z(e.relativeToPrevious,!1),s=[],l=o.length,u=0;u<l;++u)(A$N(o[u],w$y)||0===u)&&(i=a&&e$2e(n)?_$y(n,w$y):_$y(r,w$y),s.push(i),n=i);return c$A.fromJulianDateArray({julianDates:s,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},Object.defineProperties(n$t.prototype,{clock:{get:function(){return this._clock},set:function(e){var t=this._clock;t!==e&&(e$2e(t)&&(this._clockSubscription(),this._clockSubscription=void 0),e$2e(e)&&(this._clockSubscription=e.onTick.addEventListener(n$t.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){var t=this._element;t!==e&&(e$2e(t)&&t.removeEventListener("seeked",this._seekFunction,!1),e$2e(e)&&(this._seeking=!1,this._seekFunction=p$D(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}}),n$t.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,i$11(this)},n$t.prototype.isDestroyed=function(){return!1},n$t.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate!==e.multiplier){var t=this._element;try{t.playbackRate=e.multiplier}catch{t.playbackRate=0}this._lastPlaybackRate=e.multiplier}},n$t.prototype._onTick=function(e){var t=this._element;if(e$2e(t)&&!(t.readyState<2)){var i=t.paused,n=e.shouldAnimate;if(n===i&&(n?t.play():t.pause()),this._seeking||this._firstTickAfterSeek)return void(this._firstTickAfterSeek=!1);this._trySetPlaybackRate(e);var r,o=e.currentTime,a=u$Z(this.epoch,o$I.MINIMUM_VALUE),s=a$15.secondsDifference(o,a),l=t.duration,u=t.currentTime;t.loop?((s%=l)<0&&(s=l-s),r=s):r=s>l?l:s<0?0:s;var c=n?u$Z(this.tolerance,1):.001;Math.abs(r-u)>c&&(this._seeking=!0,t.currentTime=r)}},Object.defineProperties(l$J.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$15("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),l$J.prototype.requestTileGeometry=function(e,t,i,n){if(!this.ready)throw new t$15("requestTileGeometry must not be called before ready returns true.");var r=this._tilingScheme.getNumberOfYTilesAtLevel(i),o=this._resource.getDerivedResource({url:i+"/"+e+"/"+(r-t-1)+".tif",queryParameters:{supermap3d:!0},request:n}).fetchImage({preferImageBitmap:!0});if(e$2e(o)){var a=this;return o$1l(o).then((function(n){return new T$L({buffer:d$14(n),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:W$F(a,e,t,i),structure:a._terrainDataStructure})}))}},l$J.prototype.getLevelMaximumGeometricError=function(e){if(!this.ready)throw new t$15("requestTileGeometry must not be called before ready returns true.");return this._levelZeroMaximumGeometricError/(1<<e)};var S$z=new h$18;function W$F(e,t,i,n){for(var r=e._tilingScheme,o=e._rectangles,a=r.tileXYToRectangle(t,i,n),s=0,l=0;l<o.length&&15!==s;++l){var u=o[l];if(!(u.maxLevel<=n)){var c=u.rectangle;e$2e(h$18.intersection(c,a,S$z))&&(y$z(r,c,2*t,2*i,n+1)&&(s|=4),y$z(r,c,2*t+1,2*i,n+1)&&(s|=8),y$z(r,c,2*t,2*i+1,n+1)&&(s|=1),y$z(r,c,2*t+1,2*i+1,n+1)&&(s|=2))}}return s}function y$z(e,t,i,n,r){var o=e.tileXYToRectangle(i,n,r);return e$2e(h$18.intersection(o,t,S$z))}l$J.prototype.getTileDataAvailable=function(e,t,i){},l$J.prototype.loadTileDataAvailability=function(e,t,i){};var _$x={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},VulkanConstants=Object.freeze(_$x),D$C={};function x$J(e,t){return e$2d.equalsEpsilon(e.latitude,t.latitude,e$2d.EPSILON10)&&e$2d.equalsEpsilon(e.longitude,t.longitude,e$2d.EPSILON10)}var M$E=new a$18,R$x=new a$18;function U$C(e,t,i,n){var r=(t=D$13(t,o$1p.equalsEpsilon)).length;if(!(r<2)){var o=e$2e(n),a=e$2e(i),s=!0,l=new Array(r),u=new Array(r),c=new Array(r),h=t[0];l[0]=h;var d=e.cartesianToCartographic(h,M$E);a&&(d.height=i[0]),s=s&&0==d.height,u[0]=d.height,c[0]=o?n[0]:0;for(var f=1,p=1;p<r;++p){var _=t[p],m=e.cartesianToCartographic(_,R$x);a&&(m.height=i[p]),s=s&&0==m.height,x$J(d,m)?d.height<m.height&&(u[f-1]=m.height):(l[f]=_,u[f]=m.height,c[f]=o?n[p]:0,a$18.clone(m,d),++f)}if(!(s||f<2))return l.length=f,u.length=f,c.length=f,{positions:l,topHeights:u,bottomHeights:c}}}var z$A=new Array(2),G$G=new Array(2),W$E={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};function O$v(e,t){for(var i=new Array(e.length),n=0;n<e.length;n+=3){var r=new o$1p(e[n],e[n+1],e[n+2]);p$1d.multiplyByPoint(t,r,r),i[n]=r.x,i[n+1]=r.y,i[n+2]=r.z}return i}D$C.computePositions=function(e,t,i,n,r,o,a){var s=U$C(e,t,i,n);if(e$2e(s)){var l=m$19.eastNorthUpToFixedFrame(s.positions[0],e,new p$1d),u=p$1d.inverse(l,new p$1d);t=s.positions,i=s.topHeights,n=s.bottomHeights;var c,h,d,f,p=t.length,_=p-2,m=e$2d.chordLength(r,e.maximumRadius),g=W$E;if(g.minDistance=m,g.ellipsoid=e,o){var x,y=0;for(x=0;x<p-1;x++)y+=m$X.numberOfPoints(t[x],t[x+1],m)+1;c=new Float64Array(3*y),h=new Float64Array(3*y),e$2e(a)&&(d=new Float64Array(3*y),f=new Float64Array(3*y));var v=z$A,$=G$G;g.positions=v,g.height=$;var b=0;for(x=0;x<p-1;x++){v[0]=t[x],v[1]=t[x+1],$[0]=i[x],$[1]=i[x+1];var T=m$X.generateArc(g);c.set(T,b),e$2e(a)&&d.set(O$v(T,u),b),$[0]=n[x],$[1]=n[x+1],h.set(m$X.generateArc(g),b),e$2e(a)&&f.set(O$v(m$X.generateArc(g),u),b),b+=T.length}}else g.positions=t,g.height=i,c=new Float64Array(m$X.generateArc(g)),e$2e(a)&&(d=new Float64Array(O$v(m$X.generateArc(g)))),g.height=n,h=new Float64Array(m$X.generateArc(g)),e$2e(a)&&(f=new Float64Array(O$v(m$X.generateArc(g))));var C={pos:{bottomPositions:h,topPositions:c,numCorners:_}};return e$2e(a)&&(C.localPos={bottomPositions:f,topPositions:d,numCorners:_}),C}};var $$A=new o$1p,U$B=new o$1p,re$u=new o$1p,ye$f=new o$1p,ne$r=new o$1p,be$k=new o$1p,Fe$f=new o$1p,Ce$d=new o$1p;function E$G(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,i=e.maximumHeights,n=e.minimumHeights;if(!e$2e(t))throw new t$15("options.positions is required.");if(e$2e(i)&&i.length!==t.length)throw new t$15("options.positions and options.maximumHeights must have the same length.");if(e$2e(n)&&n.length!==t.length)throw new t$15("options.positions and options.minimumHeights must have the same length.");var r=u$Z(e.vertexFormat,n$13.DEFAULT),o=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),a=u$Z(e.ellipsoid,t$12.WGS84);this._positions=t,this._minimumHeights=n,this._maximumHeights=i,this._vertexFormat=n$13.clone(r),this._granularity=o,this._ellipsoid=t$12.clone(a),this._enuCenter=e.enuCenter,this._workerName="createWallGeometry";var s=1+t.length*o$1p.packedLength+2;e$2e(n)&&(s+=n.length),e$2e(i)&&(s+=i.length),this.packedLength=s+t$12.packedLength+n$13.packedLength+1,this.packedLength+=o$1p.packedLength}E$G.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");i=u$Z(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._minimumHeights;if(o=e$2e(a)?a.length:0,t[i++]=o,e$2e(a))for(n=0;n<o;++n)t[i++]=a[n];var s=e._maximumHeights;if(o=e$2e(s)?s.length:0,t[i++]=o,e$2e(s))for(n=0;n<o;++n)t[i++]=s[n];return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._granularity,e$2e(e._enuCenter)?o$1p.pack(e._enuCenter,t,i):o$1p.pack(o$1p.ZERO,t,i),t};var ae$m=t$12.clone(t$12.UNIT_SPHERE),oe$k=new n$13,N$x={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:ae$m,vertexFormat:oe$k,granularity:void 0,enuCenter:void 0};E$G.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n,r,o,a=e[t++],s=new Array(a);for(n=0;n<a;++n,t+=o$1p.packedLength)s[n]=o$1p.unpack(e,t);if((a=e[t++])>0)for(r=new Array(a),n=0;n<a;++n)r[n]=e[t++];if((a=e[t++])>0)for(o=new Array(a),n=0;n<a;++n)o[n]=e[t++];var l=t$12.unpack(e,t,ae$m);t+=t$12.packedLength;var u=n$13.unpack(e,t,oe$k);t+=n$13.packedLength;var c=e[t++],h=o$1p.unpack(e,t);return o$1p.equals(h,o$1p.ZERO)&&(h=void 0),e$2e(i)?(i._positions=s,i._minimumHeights=r,i._maximumHeights=o,i._ellipsoid=t$12.clone(l,i._ellipsoid),i._vertexFormat=n$13.clone(u,i._vertexFormat),i._granularity=c,i._enuCenter=h,i):(N$x.positions=s,N$x.minimumHeights=r,N$x.maximumHeights=o,N$x.granularity=c,N$x.enuCenter=h,new E$G(N$x))},E$G.fromConstantHeights=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions;if(!e$2e(t))throw new t$15("options.positions is required.");var i,n,r=e.minimumHeight,o=e.maximumHeight,a=e$2e(r),s=e$2e(o);if(a||s){var l=t.length;i=a?new Array(l):void 0,n=s?new Array(l):void 0;for(var u=0;u<l;++u)a&&(i[u]=r),s&&(n[u]=o)}return new E$G({positions:t,maximumHeights:n,minimumHeights:i,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat})},E$G.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,n=e._maximumHeights,r=e._vertexFormat,o=e._granularity,a=e._ellipsoid,s=e._enuCenter,l=D$C.computePositions(a,t,n,i,o,!0,s);if(e$2e(l.pos)){var u;e$2e(s)&&(u=m$19.eastNorthUpToFixedFrame(s));var c,h=l.pos.bottomPositions,d=l.pos.topPositions,f=l.pos.numCorners,p=d.length,_=2*p,m=r.position?new Float64Array(_):void 0,g=r.normal?new Float32Array(_):void 0,x=r.tangent?new Float32Array(_):void 0,y=r.bitangent?new Float32Array(_):void 0,v=r.st?new Float32Array(_/3*2):void 0,$=0,b=0,T=0,C=0,S=0,w=Ce$d,E=Fe$f,P=be$k,A=!0,L=0,M=1/((p/=3)-t.length+1);for(c=0;c<p;++c){var R=3*c,O=o$1p.fromArray(d,R,$$A),D=o$1p.fromArray(h,R,U$B);if(r.position&&(m[$++]=D.x,m[$++]=D.y,m[$++]=D.z,m[$++]=O.x,m[$++]=O.y,m[$++]=O.z),r.st&&(v[S++]=L,v[S++]=0,v[S++]=L,v[S++]=1),r.normal||r.tangent||r.bitangent){var I,F=o$1p.clone(o$1p.ZERO,ne$r),B=a.scaleToGeodeticSurface(o$1p.fromArray(d,R,U$B),U$B);if(c+1<p&&(I=a.scaleToGeodeticSurface(o$1p.fromArray(d,R+3,re$u),re$u),F=o$1p.fromArray(d,R+3,ne$r)),A){var N=o$1p.subtract(F,O,ye$f),G=o$1p.subtract(B,O,$$A);w=o$1p.normalize(o$1p.cross(G,N,w),w),A=!1}o$1p.equalsEpsilon(I,B,e$2d.EPSILON10)?A=!0:(L+=M,r.tangent&&(E=o$1p.normalize(o$1p.subtract(I,B,E),E)),r.bitangent&&(P=o$1p.normalize(o$1p.cross(w,E,P),P))),r.normal&&(e$2e(s)&&(p$1d.multiplyByPoint(u,w,w),o$1p.normalize(w,w)),g[b++]=w.x,g[b++]=w.y,g[b++]=w.z,g[b++]=w.x,g[b++]=w.y,g[b++]=w.z),r.tangent&&(x[C++]=E.x,x[C++]=E.y,x[C++]=E.z,x[C++]=E.x,x[C++]=E.y,x[C++]=E.z),r.bitangent&&(y[T++]=P.x,y[T++]=P.y,y[T++]=P.z,y[T++]=P.x,y[T++]=P.y,y[T++]=P.z)}}var z=new a$_;r.position&&(z.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:m})),r.normal&&(z.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:g})),r.tangent&&(z.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:x})),r.bitangent&&(z.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:y})),r.st&&(z.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:v}));var U=_/3;_-=6*(f+1);var V=ce$z.createTypedArray(U,_),k=0;for(c=0;c<U-2;c+=2){var W=c,H=c+2,q=o$1p.fromArray(m,3*W,$$A),j=o$1p.fromArray(m,3*H,U$B);if(!o$1p.equalsEpsilon(q,j,e$2d.EPSILON10)){var X=c+1,Y=c+3;V[k++]=X,V[k++]=W,V[k++]=Y,V[k++]=Y,V[k++]=W,V[k++]=H}}var Z=new I$1p({attributes:z,indices:V,primitiveType:W$18.TRIANGLES,boundingSphere:new i$1d.fromVertices(m)});return e$2e(e._enuCenter)&&(Z.attributes.position.values.set(l.localPos.topPositions,0),Z.attributes.position.values.set(l.localPos.bottomPositions,Z.attributes.position.values.length/2),Z.attributes.position.componentDatatype=S$14.FLOAT),Z}};var S$y=new o$1p,q$E=new o$1p;function w$x(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,i=e.maximumHeights,n=e.minimumHeights;if(!e$2e(t))throw new t$15("options.positions is required.");if(e$2e(i)&&i.length!==t.length)throw new t$15("options.positions and options.maximumHeights must have the same length.");if(e$2e(n)&&n.length!==t.length)throw new t$15("options.positions and options.minimumHeights must have the same length.");var r=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),o=u$Z(e.ellipsoid,t$12.WGS84);this._positions=t,this._minimumHeights=n,this._maximumHeights=i,this._granularity=r,this._ellipsoid=t$12.clone(o),this._workerName="createWallOutlineGeometry";var a=1+t.length*o$1p.packedLength+2;e$2e(n)&&(a+=n.length),e$2e(i)&&(a+=i.length),this.packedLength=a+t$12.packedLength+1}w$x.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");i=u$Z(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._minimumHeights;if(o=e$2e(a)?a.length:0,t[i++]=o,e$2e(a))for(n=0;n<o;++n)t[i++]=a[n];var s=e._maximumHeights;if(o=e$2e(s)?s.length:0,t[i++]=o,e$2e(s))for(n=0;n<o;++n)t[i++]=s[n];return t$12.pack(e._ellipsoid,t,i),t[i+=t$12.packedLength]=e._granularity,t};var G$F=t$12.clone(t$12.UNIT_SPHERE),A$M={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:G$F,granularity:void 0};function t$w(e){switch(e){case de$y.FLOAT:return"float";case de$y.FLOAT_VEC2:return"vec2";case de$y.FLOAT_VEC3:return"vec3";case de$y.FLOAT_VEC4:return"vec4";case de$y.FLOAT_MAT2:return"mat2";case de$y.FLOAT_MAT3:return"mat3";case de$y.FLOAT_MAT4:return"mat4";case de$y.SAMPLER_2D:return"sampler2D";case de$y.BOOL:return"bool"}}w$x.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n,r,o,a=e[t++],s=new Array(a);for(n=0;n<a;++n,t+=o$1p.packedLength)s[n]=o$1p.unpack(e,t);if((a=e[t++])>0)for(r=new Array(a),n=0;n<a;++n)r[n]=e[t++];if((a=e[t++])>0)for(o=new Array(a),n=0;n<a;++n)o[n]=e[t++];var l=t$12.unpack(e,t,G$F),u=e[t+=t$12.packedLength];return e$2e(i)?(i._positions=s,i._minimumHeights=r,i._maximumHeights=o,i._ellipsoid=t$12.clone(l,i._ellipsoid),i._granularity=u,i):(A$M.positions=s,A$M.minimumHeights=r,A$M.maximumHeights=o,A$M.granularity=u,new w$x(A$M))},w$x.fromConstantHeights=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions;if(!e$2e(t))throw new t$15("options.positions is required.");var i,n,r=e.minimumHeight,o=e.maximumHeight,a=e$2e(r),s=e$2e(o);if(a||s){var l=t.length;i=a?new Array(l):void 0,n=s?new Array(l):void 0;for(var u=0;u<l;++u)a&&(i[u]=r),s&&(n[u]=o)}return new w$x({positions:t,maximumHeights:n,minimumHeights:i,ellipsoid:e.ellipsoid})},w$x.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,n=e._maximumHeights,r=e._granularity,o=e._ellipsoid,a=D$C.computePositions(o,t,n,i,r,!1);if(e$2e(a)){var s,l=a.pos.bottomPositions,u=a.pos.topPositions,c=u.length,h=2*c,d=new Float64Array(h),f=0;for(c/=3,s=0;s<c;++s){var p=3*s,_=o$1p.fromArray(u,p,S$y),m=o$1p.fromArray(l,p,q$E);d[f++]=m.x,d[f++]=m.y,d[f++]=m.z,d[f++]=_.x,d[f++]=_.y,d[f++]=_.z}var g=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:d})}),x=h/3;h=2*x-4+x;var y=ce$z.createTypedArray(x,h),v=0;for(s=0;s<x-2;s+=2){var $=s,b=s+2,T=o$1p.fromArray(d,3*$,S$y),C=o$1p.fromArray(d,3*b,q$E);if(!o$1p.equalsEpsilon(T,C,e$2d.EPSILON10)){var S=s+1,w=s+3;y[v++]=S,y[v++]=$,y[v++]=S,y[v++]=w,y[v++]=$,y[v++]=b}}return y[v++]=x-2,y[v++]=x-1,new I$1p({attributes:g,indices:y,primitiveType:W$18.LINES,boundingSphere:new i$1d.fromVertices(d)})}};var u$C={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3};function l$I(e,t,i){this._url=e,this._maximumActiveTasks=u$Z(i.maximumActiveTasks,100),this._activeTasks=0,this._deferreds={},this._nextID=0,this._event=t,this._enableHeartCheck=u$Z(i.enableHeartCheck,!1),this._heartTimeOut=u$Z(i.heartTimeOut,1e4),this._createWS(t)}function x$I(e,t){if(t instanceof ArrayBuffer){--e._activeTasks;var i=new DataView(t).getInt32(0,!0);if(!e$2e(i))return;var n=e._deferreds,r=n[i];if(e$2e(r)){if("blob"===r.binaryType)4===t.byteLength?r.reject(404):r.resolve(new Blob([t.slice(4,t.byteLength)]));else if("arraybuffer"===r.binaryType)if(4===t.byteLength)r.reject(404);else{var o=t.slice(4,t.byteLength);r.extratiles?r.progress(o):r.resolve(o)}else{t=t.slice(4,t.byteLength);var a=a$K(new Uint8Array(t));if("json"===r.binaryType){var s=JSON.parse(a);r.resolve(s)}else r.resolve(a)}!0!==r.extratiles&&delete n[i]}}}function m$D(e,t,i,n){var r;return-1!==t.indexOf("extratiles=")?(n.extratiles=!0,r={id:e,binaryType:u$Z(i,"blob"),tileName:t.substring(0,t.indexOf("?")),extraTiles:t.substring(t.indexOf("extratiles=")+11)}):(n.extratiles=!1,r={id:e,binaryType:u$Z(i,"blob"),tileName:t}),JSON.stringify(r)}function r$D(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).weights,i=e.times;if(o$1q.defined("weights",t),o$1q.defined("times",i),o$1q.typeOf.number.greaterThanOrEquals("weights.length",t.length,3),t.length%i.length!=0)throw new t$15("times.length must be a factor of weights.length.");this._times=i,this._weights=t,this._count=t.length/i.length,this._lastTimeIndex=0}function e$P(e,t,i){if("function"!=typeof t)throw new t$15("oldFunction is required to be a function.");if("function"!=typeof i)throw new t$15("oldFunction is required to be a function.");return function(){i.apply(e,arguments),t.apply(e,arguments)}}l$I.prototype.scheduleTask=function(e,t){var i=this;if(!this.isOpened()){var n=o$1l.defer();return this._event.addEventListener((function(r){if(r===u$C.OPEN){++i._activeTasks;var o=i,a=o._nextID++;o._deferreds[a]=n,n.binaryType=t;var s=m$D(a,e,t,n);o._ws.send(s)}})),n.promise}if(!(this._activeTasks>=this._maximumActiveTasks)){++this._activeTasks;var r=this,o=r._nextID++;n=o$1l.defer();r._deferreds[o]=n,n.binaryType=t;var a=m$D(o,e,t,n);return r._ws.send(a),n.promise}},l$I.prototype._createWS=function(e){this._ws=new WebSocket(this._url),this._ws.binaryType="arraybuffer";var t=this;this._ws.onopen=function(){e.raiseEvent(u$C.OPEN)},this._ws.onclose=function(){e.raiseEvent(u$C.CLOSED)},this._ws.onerror=function(){error=new t$13("open failure"),e.raiseEvent(error)},this._ws.onmessage=function(e){x$I(t,e.data)}},l$I.prototype.isOpened=function(){return this._ws&&this._ws.readyState===u$C.OPEN},l$I.prototype.close=function(){this._ws.close()},Object.defineProperties(r$D.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}}),r$D.prototype.findTimeInterval=n$H.prototype.findTimeInterval,r$D.prototype.wrapTime=n$H.prototype.wrapTime,r$D.prototype.clampTime=n$H.prototype.clampTime,r$D.prototype.evaluate=function(e,t){var i=this.weights,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);e$2e(t)||(t=new Array(this._count));for(var a=0;a<this._count;a++){var s=r*this._count+a;t[a]=i[s]*(1-o)+i[s+this._count]*o}return t};var e$O={DONE:0,PENDING:1,FAILED:2},R$w=Object.freeze(e$O),U$A=e$1X.WHITE,z$z=o$1p.ZERO,A$L=k$R.NONE,I$M=o$1o.ZERO,P$z=1,q$D=0,H$G=o$1p.ZERO,T$E=j$V.CENTER,L$K=S$Q.CENTER,M$D=!1,Z$A=new o$1p,F$F=new e$1X,j$A=new o$1p,W$D=new o$1o,k$w=new o$Y,J$y=new o$Y,K$z=new o$Y,Q$A=new f$1a,X$x=new r$Z;function C$E(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function g$J(e,t){if(!e$2e(e))throw new t$15("entityCluster is required.");if(!e$2e(t))throw new t$15("entityCollection is required.");t.collectionChanged.addEventListener(g$J.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1Q,this._onCollectionChanged(t,t.values,[],[])}function p$C(e,t,i){e$2e(e)&&(e.billboard=void 0,i.removeBillboard(t))}g$J.prototype.update=function(e){if(!e$2e(e))throw new t$15("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a,s=t[n],l=s.entity,u=l._billboard,c=s.billboard,h=l.isShowing&&l.isAvailable(e)&&r$_.getValueOrDefault(u._show,e,!0);if(h&&(a=r$_.getValueOrUndefined(l._position,e,Z$A),o=r$_.getValueOrUndefined(u._image,e),h=e$2e(a)&&e$2e(o)),h){r$_.isConstant(l._position)||(i._clusterDirty=!0),e$2e(c)||((c=i.getBillboard(l)).id=l,c.image=void 0,s.billboard=c),c.show=h,(!e$2e(c.image)||s.textureValue!==o)&&(c.image=o,s.textureValue=o),c.position=a,c.color=r$_.getValueOrDefault(u._color,e,U$A,F$F),c.eyeOffset=r$_.getValueOrDefault(u._eyeOffset,e,z$z,j$A),c.heightReference=r$_.getValueOrDefault(u._heightReference,e,A$L),c.pixelOffset=r$_.getValueOrDefault(u._pixelOffset,e,I$M,W$D),c.scale=r$_.getValueOrDefault(u._scale,e,P$z),c.rotation=r$_.getValueOrDefault(u._rotation,e,q$D),c.alignedAxis=r$_.getValueOrDefault(u._alignedAxis,e,H$G),c.horizontalOrigin=r$_.getValueOrDefault(u._horizontalOrigin,e,T$E),c.verticalOrigin=r$_.getValueOrDefault(u._verticalOrigin,e,L$K),c.width=r$_.getValueOrUndefined(u._width,e),c.height=r$_.getValueOrUndefined(u._height,e),c.scaleByDistance=r$_.getValueOrUndefined(u._scaleByDistance,e,k$w),c.translucencyByDistance=r$_.getValueOrUndefined(u._translucencyByDistance,e,J$y),c.pixelOffsetScaleByDistance=r$_.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,K$z),c.sizeInMeters=r$_.getValueOrDefault(u._sizeInMeters,e,M$D),c.distanceDisplayCondition=r$_.getValueOrUndefined(u._distanceDisplayCondition,e,X$x),c.disableDepthTestDistance=r$_.getValueOrUndefined(u._disableDepthTestDistance,e);var d=r$_.getValueOrUndefined(u._imageSubRegion,e,Q$A);e$2e(d)&&c.setImageSubRegion(c._imageId,d)}else p$C(s,l,i)}return!0},g$J.prototype.getBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("entity is required.");if(!e$2e(t))throw new t$15("result is required.");var i=this._items.get(e.id);if(!e$2e(i)||!e$2e(i.billboard))return R$w.FAILED;var n=i.billboard;if(n.heightReference===k$R.NONE)t.center=o$1p.clone(n.position,t.center);else{if(!e$2e(n._clampedPosition))return R$w.PENDING;t.center=o$1p.clone(n._clampedPosition,t.center)}return t.radius=0,R$w.DONE},g$J.prototype.isDestroyed=function(){return!1},g$J.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(g$J.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return i$11(this)},g$J.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)e$2e((o=t[r])._billboard)&&e$2e(o._position)&&a.set(o.id,new C$E(o));for(r=n.length-1;r>-1;r--)e$2e((o=n[r])._billboard)&&e$2e(o._position)?a.contains(o.id)||a.set(o.id,new C$E(o)):(p$C(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],p$C(a.get(o.id),o,s),a.remove(o.id)};var f$I="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = tangentToEyeMatrix;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",d$Q="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec3 tangent;\nattribute vec3 bitangent;\nattribute vec2 st;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_tangentEC = czm_normal * tangent; // tangent in eye coordinates\n v_bitangentEC = czm_normal * bitangent; // bitangent in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",i$H="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",l$H="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",m$C="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",h$F="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",_$w="attribute vec3 position;\nattribute vec3 normal;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = vec4(position, 1.0);\n\n v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n\n gl_Position = czm_modelViewProjection * p;\n}\n",g$I="attribute vec3 position;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = vec4(position, 1.0);\n\n v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjection * p;\n}\n";function t$v(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.translucent,!0),i=u$Z(e.closed,!1),n=u$Z(e.materialSupport,t$v.MaterialSupport.TEXTURED);this.material=e$2e(e.material)?e.material:r$Y.fromType(r$Y.ColorType),this.translucent=t,this._vertexShaderSource=u$Z(e.vertexShaderSource,n.vertexShaderSource),this._fragmentShaderSource=u$Z(e.fragmentShaderSource,n.fragmentShaderSource),this._renderState=a$S.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._materialSupport=n,this._vertexFormat=n.vertexFormat,this._flat=u$Z(e.flat,!1),this._faceForward=u$Z(e.faceForward,!i)}function r$C(){t$15.throwInstantiationError()}function a$C(e,t,i){o$1q.defined("geometryUpdater",e),o$1q.defined("primitives",t),o$1q.defined("orderedGroundPrimitives",i),this._primitives=t,this._orderedGroundPrimitives=i,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}Object.defineProperties(t$v.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),t$v.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,t$v.prototype.isTranslucent=a$S.prototype.isTranslucent,t$v.prototype.getRenderState=a$S.prototype.getRenderState,t$v.MaterialSupport={BASIC:Object.freeze({vertexFormat:n$13.POSITION_AND_NORMAL,vertexShaderSource:l$H,fragmentShaderSource:i$H}),BASICMODEL:Object.freeze({vertexFormat:n$13.POSITION_AND_NORMAL,vertexShaderSource:_$w,fragmentShaderSource:i$H}),TEXTURED:Object.freeze({vertexFormat:n$13.POSITION_NORMAL_AND_ST,vertexShaderSource:h$F,fragmentShaderSource:m$C}),TEXTUREDMODEL:Object.freeze({vertexFormat:n$13.POSITION_NORMAL_AND_ST,vertexShaderSource:g$I,fragmentShaderSource:m$C}),ALL:Object.freeze({vertexFormat:n$13.ALL,vertexShaderSource:d$Q,fragmentShaderSource:f$I})},Object.defineProperties(r$C.prototype,{isConstant:{get:t$15.throwInstantiationError},definitionChanged:{get:t$15.throwInstantiationError}}),r$C.prototype.getType=t$15.throwInstantiationError,r$C.prototype.getValue=t$15.throwInstantiationError,r$C.prototype.equals=t$15.throwInstantiationError,r$C.getValue=function(e,t,i){var n;return e$2e(t)&&e$2e(n=t.getType(e))?((!e$2e(i)||i.type!==n)&&(i=r$Y.fromType(n)),t.getValue(e,i.uniforms),i):((!e$2e(i)||i.type!==r$Y.ColorType)&&(i=r$Y.fromType(r$Y.ColorType)),e$1X.clone(e$1X.WHITE,i.uniforms.color),i)},a$C.prototype._isHidden=function(e,t,i){return!e.isShowing||!e.isAvailable(i)||!r$_.getValueOrDefault(t.show,i,!0)},a$C.prototype._setOptions=t$15.throwInstantiationError,a$C.prototype.update=function(e){o$1q.defined("time",e);var t=this._geometryUpdater,i=t._onTerrain,n=this._primitives,r=this._orderedGroundPrimitives;r.remove(this._primitive),n.removeAndDestroy(this._primitive),n.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0,this._primitive=void 0;var o=this._entity,a=o[this._geometryUpdater._geometryPropertyName];if(this._setOptions(o,a,e),!this._isHidden(o,a,e)){var s=this._geometryUpdater.shadowsProperty.getValue(e),l=this._options;if(!e$2e(a.fill)||a.fill.getValue(e)){var u,c=t.fillMaterialProperty,h=c instanceof t$P,d=t._getIsClosed(l);if(h)u=new t$Q({closed:d,flat:i&&!t._supportsMaterialsforEntitiesOnTerrain});else{var f=r$C.getValue(e,c,this._material);this._material=f,u=new t$v({material:f,translucent:f.isTranslucent(),closed:d})}if(i)l.vertexFormat=t$Q.VERTEX_FORMAT,this._primitive=r.add(new d$15({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:u,asynchronous:!1,shadows:s,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),r$_.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{l.vertexFormat=u.vertexFormat;var p=this._geometryUpdater.createFillGeometryInstance(e);h&&(u.translucent=255!==p.attributes.color.value[3]),this._primitive=n.add(new y$R({geometryInstances:p,appearance:u,asynchronous:!1,shadows:s}))}}if(!i&&e$2e(a.outline)&&a.outline.getValue(e)){var _=this._geometryUpdater.createOutlineGeometryInstance(e),m=r$_.getValueOrDefault(a.outlineWidth,e,1);this._outlinePrimitive=n.add(new y$R({geometryInstances:_,appearance:new t$Q({flat:!0,translucent:255!==_.attributes.color.value[3],renderState:{lineWidth:t._scene.clampLineWidth(m)}}),asynchronous:!1,shadows:s}))}}},a$C.prototype.getBoundingSphere=function(e){if(!e$2e(e))throw new t$15("result is required.");var t,i=this._entity,n=this._primitive,r=this._outlinePrimitive;return e$2e(n)&&n.show&&n.ready&&(e$2e(t=n.getGeometryInstanceAttributes(i))&&e$2e(t.boundingSphere))||e$2e(r)&&r.show&&r.ready&&(e$2e(t=r.getGeometryInstanceAttributes(i))&&e$2e(t.boundingSphere))?(i$1d.clone(t.boundingSphere,e),R$w.DONE):e$2e(n)&&!n.ready||e$2e(r)&&!r.ready?R$w.PENDING:R$w.FAILED},a$C.prototype.isDestroyed=function(){return!1},a$C.prototype.destroy=function(){var e=this._primitives;this._orderedGroundPrimitives.remove(this._primitive),e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),i$11(this)};var M$C=new t$P(e$1X.WHITE),D$B=new e$1L(!0),V$w=new e$1L(!0),N$w=new e$1L(!1),U$z=new e$1L(e$1X.BLACK),A$K=new e$1L(W$X.DISABLED),L$J=new e$1L(new r$Z),S$x=new e$1L(_0x2b86ba.BOTH);function i$G(e){o$1q.defined("options.entity",e.entity),o$1q.defined("options.scene",e.scene),o$1q.defined("options.geometryOptions",e.geometryOptions),o$1q.defined("options.geometryPropertyName",e.geometryPropertyName),o$1q.defined("options.observedPropertyNames",e.observedPropertyNames);var t=e.entity,i=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new o$1h,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=i,this._id=i+"-"+t.id,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=h$W.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(i$G.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!e$2e(this._entity.availability)&&r$_.isConstant(this._showProperty)&&r$_.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!e$2e(this._entity.availability)&&r$_.isConstant(this._showProperty)&&r$_.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),i$G.prototype.isOutlineVisible=function(e){var t=this._entity;return u$Z(this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e),!1)},i$G.prototype.isFilled=function(e){var t=this._entity;return u$Z(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e),!1)},i$G.prototype.createFillGeometryInstance=t$15.throwInstantiationError,i$G.prototype.createOutlineGeometryInstance=t$15.throwInstantiationError,i$G.prototype.isDestroyed=function(){return!1},i$G.prototype.destroy=function(){i$11(this)},i$G.prototype._isHidden=function(e,t){var i=t.show;return e$2e(i)&&i.isConstant&&!i.getValue(o$I.MINIMUM_VALUE)},i$G.prototype._isOnTerrain=function(e,t){return!1},i$G.prototype._getIsClosed=function(e){return!0},i$G.prototype._isDynamic=t$15.throwInstantiationError,i$G.prototype._setStaticOptions=t$15.throwInstantiationError,i$G.prototype._onEntityPropertyChanged=function(e,t,i,n){if(-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(!e$2e(r))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var o=r.fill,a=!e$2e(o)||!o.isConstant||o.getValue(o$I.MINIMUM_VALUE),s=r.outline,l=e$2e(s);if(l&&s.isConstant&&(l=s.getValue(o$I.MINIMUM_VALUE)),!a&&!l)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var u=r.show;if(this._isHidden(e,r))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));this._materialProperty=u$Z(r.material,M$C),this._fillProperty=u$Z(o,V$w),this._showProperty=u$Z(u,D$B),this._showOutlineProperty=u$Z(r.outline,N$w),this._outlineColorProperty=l?u$Z(r.outlineColor,U$z):void 0,this._shadowsProperty=u$Z(r.shadows,A$K),this._distanceDisplayConditionProperty=u$Z(r.distanceDisplayCondition,L$J),this._classificationTypeProperty=u$Z(r.classificationType,S$x),this._fillEnabled=a;var c=this._isOnTerrain(e,r)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof t$P);if(l&&c&&(e$22(e$22.geometryOutlines),l=!1),this._onTerrain=c,this._outlineEnabled=l,this._isDynamic(e,r))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,r),this._isClosed=this._getIsClosed(this._options);var h=r.outlineWidth;this._outlineWidth=e$2e(h)?h.getValue(o$I.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}}},i$G.prototype.createDynamicUpdater=function(e,t){if(o$1q.defined("primitives",e),o$1q.defined("groundPrimitives",t),!this._dynamic)throw new t$15("This instance does not represent dynamic geometry.");return new this.constructor.DynamicGeometryUpdater(this,e,t)};var m$B=new o$1p,H$F=new a$18;function h$E(e,t,i,n){o$1q.defined("scene",e),o$1q.defined("positionProperty",t),this._scene=e,this._heightReference=i,this._extrudedHeightReference=n,this._positionProperty=t,this._position=new o$1p,this._cartographicPosition=new a$18,this._normal=new o$1p,this._definitionChanged=new o$1h,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;var r=this;if(e$2e(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener((function(){r._updateClamping()})),this._removeModeListener=e.morphComplete.addEventListener((function(){r._updateClamping()}))),t.isConstant){var o=t.getValue(o$I.MINIMUM_VALUE,m$B);if(!e$2e(o)||o$1p.equals(o,o$1p.ZERO)||!e$2e(e.globe))return;this._position=o$1p.clone(o,this._position),this._updateClamping(),this._normal=e.globe.ellipsoid.geodeticSurfaceNormal(o,this._normal)}}function a$B(e,t,i,n){if(i$G.prototype._onEntityPropertyChanged.call(this,e,t,i,n),-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(e$2e(r)){e$2e(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);var o=r.heightReference;if(e$2e(o)){var a=new n$X(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new h$E(this._scene,a,o)}}}}Object.defineProperties(h$E.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),h$E.prototype._updateClamping=function(){e$2e(this._removeCallbackFunc)&&this._removeCallbackFunc();var e=this._scene,t=e.globe,i=this._position;if(e$2e(t)&&!o$1p.equals(i,o$1p.ZERO)){var n=t.ellipsoid,r=t._surface,o=this,a=n.cartesianToCartographic(i,this._cartographicPosition),s=t.getHeight(a);e$2e(s)?this._terrainHeight=s:this._terrainHeight=0,this._removeCallbackFunc=r.updateHeight(a,(function(t){if(e.mode===C$14.SCENE3D){var i=n.cartesianToCartographic(t,H$F);o._terrainHeight=i.height}else o._terrainHeight=t.x;o.definitionChanged.raiseEvent()}))}else this._terrainHeight=0},h$E.prototype.getValue=function(e,t){var i=r$_.getValueOrDefault(this._heightReference,e,k$R.NONE),n=r$_.getValueOrDefault(this._extrudedHeightReference,e,k$R.NONE);if(i===k$R.NONE&&n!==k$R.RELATIVE_TO_GROUND)return this._position=o$1p.clone(o$1p.ZERO,this._position),o$1p.clone(o$1p.ZERO,t);if(this._positionProperty.isConstant)return o$1p.multiplyByScalar(this._normal,this._terrainHeight,t);var r=this._scene,o=this._positionProperty.getValue(e,m$B);if(!e$2e(o)||o$1p.equals(o,o$1p.ZERO)||!e$2e(r.globe))return o$1p.clone(o$1p.ZERO,t);if(o$1p.equalsEpsilon(this._position,o,e$2d.EPSILON10))return o$1p.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=o$1p.clone(o,this._position),this._updateClamping();var a=r.globe.ellipsoid.geodeticSurfaceNormal(o,this._normal);return o$1p.multiplyByScalar(a,this._terrainHeight,t)},h$E.prototype.isDestroyed=function(){return!1},h$E.prototype.destroy=function(){return e$2e(this._removeEventListener)&&this._removeEventListener(),e$2e(this._removeModeListener)&&this._removeModeListener(),e$2e(this._removeCallbackFunc)&&this._removeCallbackFunc(),i$11(this)};var V$v=o$1p.ZERO,E$F=new o$1p,N$v=new o$1p,G$E=new e$1X;function H$E(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function i$F(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new H$E(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}function p$B(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(i$F.prototype=Object.create(i$G.prototype),i$F.prototype.constructor=i$F),Object.defineProperties(i$F.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),i$F.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:t$A.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,G$E)),e$2e(t)||(t=e$1X.WHITE),a.color=o$16.fromColor(t));return e$2e(this._options.offsetAttribute)&&(a.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,V$v,E$F))),new d$1o({id:i,geometry:O$z.fromDimensions(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:a})},i$F.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,G$E),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r),offset:void 0};return e$2e(this._options.offsetAttribute)&&(o.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,V$v,E$F))),new d$1o({id:t,geometry:o$17.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:o})},i$F.prototype._computeCenter=function(e,t){return r$_.getValueOrUndefined(this._entity.position,e,t)},i$F.prototype._isHidden=function(e,t){return!e$2e(t.dimensions)||!e$2e(e.position)||i$G.prototype._isHidden.call(this,e,t)},i$F.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$_.isConstant(e.orientation)&&t.dimensions.isConstant&&r$_.isConstant(t.outlineWidth))},i$F.prototype._setStaticOptions=function(e,t){var i=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$P?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,n.dimensions=t.dimensions.getValue(o$I.MINIMUM_VALUE,n.dimensions),n.offsetAttribute=i!==k$R.NONE?_0x39c22a.ALL:void 0},i$F.prototype._onEntityPropertyChanged=a$B,i$F.DynamicGeometryUpdater=p$B,e$2e(Object.create)&&(p$B.prototype=Object.create(a$C.prototype),p$B.prototype.constructor=p$B),p$B.prototype._isHidden=function(e,t,i){var n=r$_.getValueOrUndefined(e.position,i,N$v),r=this._options.dimensions;return!e$2e(n)||!e$2e(r)||a$C.prototype._isHidden.call(this,e,t,i)},p$B.prototype._setOptions=function(e,t,i){var n=r$_.getValueOrDefault(t.heightReference,i,k$R.NONE),r=this._options;r.dimensions=r$_.getValueOrUndefined(t.dimensions,i,r.dimensions),r.offsetAttribute=n!==k$R.NONE?_0x39c22a.ALL:void 0};var a$A={X:0,Y:1,Z:2,Y_UP_TO_Z_UP:p$1d.fromRotationTranslation(p$1e.fromRotationX(e$2d.PI_OVER_TWO)),Z_UP_TO_Y_UP:p$1d.fromRotationTranslation(p$1e.fromRotationX(-e$2d.PI_OVER_TWO)),X_UP_TO_Z_UP:p$1d.fromRotationTranslation(p$1e.fromRotationY(-e$2d.PI_OVER_TWO)),Z_UP_TO_X_UP:p$1d.fromRotationTranslation(p$1e.fromRotationY(e$2d.PI_OVER_TWO)),X_UP_TO_Y_UP:p$1d.fromRotationTranslation(p$1e.fromRotationZ(e$2d.PI_OVER_TWO)),Y_UP_TO_X_UP:p$1d.fromRotationTranslation(p$1e.fromRotationZ(-e$2d.PI_OVER_TWO)),fromName:function(e){return o$1q.typeOf.string("name",e),a$A[e]}},v$y=Object.freeze(a$A),A$J={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"},Q$z=Object.freeze(A$J),e$N={HIGHLIGHT:0,REPLACE:1,MIX:2},L$I=Object.freeze(e$N),T$D={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},c$z={SCALAR:void 0,VEC2:o$1o,VEC3:o$1p,VEC4:e$2c,MAT2:f$15,MAT3:p$1e,MAT4:p$1d};function M$B(e){var t,i=e.componentType;t="string"==typeof i?S$14.fromName(i):i;var n=T$D[e.type],r=c$z[e.type];return{componentsPerAttribute:n,classType:r,createArrayBufferView:function(e,i,r){return S$14.createArrayBufferView(t,e,i,n*r)}}}var I$L=e$1X.WHITE,X$w=!0;function h$D(e,t,i,n,r){var o;this.featuresLength=t,this._translucentFeaturesLength=0,e$2e(i)&&(o=i.extensions),this._extensions=u$Z(o,{});var a,s,l=_e$i(i);if(this._properties=l,this._batchTableHierarchy=me$m(this,i,n),this._batchTableBinaryProperties=V$u(t,l,n),this._showAlphaProperties=void 0,this._batchValues=void 0,this._batchValuesDirty=!1,this._batchTexture=void 0,this._defaultTexture=void 0,this._pickTexture=void 0,this._pickIds=[],this._content=e,this._colorChangedCallback=r,t>0){var u=Math.min(t,e$1W.maximumTextureSize),c=Math.ceil(t/e$1W.maximumTextureSize),h=1/u,d=.5*h,f=1/c,p=.5*f;a=new o$1o(u,c),s=new e$2c(h,d,f,p)}this._textureDimensions=a,this._textureStep=s}function _e$i(e){var t={};if(!e$2e(e))return t;for(var i in e)e.hasOwnProperty(i)&&"HIERARCHY"!==i&&"extensions"!==i&&"extras"!==i&&(t[i]=l$1f(e[i],!0));return t}function me$m(e,t,i){if(e$2e(t)){var n=e._extensions["3DTILES_batch_table_hierarchy"],r=t.HIERARCHY;if(e$2e(r)&&(h$D._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),e._extensions["3DTILES_batch_table_hierarchy"]=r,n=r),e$2e(n))return ge$h(n,i)}}function ge$h(e,t){var i,n,r,o=e.instancesLength,a=e.classes,s=e.classIds,l=e.parentCounts,u=e.parentIds,c=o;if(e$2e(s.byteOffset)&&(s.componentType=u$Z(s.componentType,S$14.UNSIGNED_SHORT),s.type=Q$z.SCALAR,s=M$B(s).createArrayBufferView(t.buffer,t.byteOffset+s.byteOffset,o)),e$2e(l))for(e$2e(l.byteOffset)&&(l.componentType=u$Z(l.componentType,S$14.UNSIGNED_SHORT),l.type=Q$z.SCALAR,l=M$B(l).createArrayBufferView(t.buffer,t.byteOffset+l.byteOffset,o)),r=new Uint16Array(o),c=0,i=0;i<o;++i)r[i]=c,c+=l[i];e$2e(u)&&e$2e(u.byteOffset)&&(u.componentType=u$Z(u.componentType,S$14.UNSIGNED_SHORT),u.type=Q$z.SCALAR,u=M$B(u).createArrayBufferView(t.buffer,t.byteOffset+u.byteOffset,c));var h=a.length;for(i=0;i<h;++i){var d=a[i].length,f=a[i].instances,p=V$u(d,f,t);a[i].instances=p$19(p,f)}var _=d$1s(new Array(h),0),m=new Uint16Array(o);for(i=0;i<o;++i)n=s[i],m[i]=_[n],++_[n];var g={classes:a,classIds:s,classIndexes:m,parentCounts:l,parentIndexes:r,parentIds:u};return ye$e(g),g}h$D._deprecationWarning=t$11,Object.defineProperties(h$D.prototype,{memorySizeInBytes:{get:function(){var e=0;return e$2e(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),e$2e(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}}});var de$h=[];function ye$e(e){var t=de$h;t.length=0;for(var i=e.classIds.length,n=0;n<i;++n)j$z(e,n,t)}function j$z(e,t,i){var n=e.parentCounts,r=e.parentIds,o=e.parentIndexes,a=e.classIds.length;if(e$2e(r)){if(t>=a)throw new t$15("Parent index "+t+" exceeds the total number of instances: "+a);if(i.indexOf(t)>-1)throw new t$15("Circular dependency detected in the batch table hierarchy.");i.push(t);for(var s=e$2e(n)?n[t]:1,l=e$2e(n)?o[t]:t,u=0;u<s;++u){var c=r[l+u];c!==t&&j$z(e,c,i)}i.pop(t)}}function V$u(e,t,i){var n;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=o.byteOffset;if(e$2e(a)){var s=o.componentType,l=o.type;if(!e$2e(s))throw new t$13("componentType is required.");if(!e$2e(l))throw new t$13("type is required.");if(!e$2e(i))throw new t$13("Property "+r+" requires a batch table binary.");var u=M$B(o),c=u.componentsPerAttribute,h=u.classType,d=u.createArrayBufferView(i.buffer,i.byteOffset+a,e);e$2e(n)||(n={}),n[r]={typedArray:d,componentCount:c,type:h}}}return n}function Z$z(e){var t=e._textureDimensions;return t.x*t.y*4}function $$z(e){if(!e$2e(e._batchValues)){var t=Z$z(e),i=new Uint8Array(t);d$1s(i,255),e._batchValues=i}return e._batchValues}function J$x(e){if(!e$2e(e._showAlphaProperties)){var t=2*e.featuresLength,i=new Uint8Array(t);d$1s(i,255),e._showAlphaProperties=i}return e._showAlphaProperties}function g$H(e,t){if(!e$2e(e)||e<0||e>t)throw new t$15("batchId is required and between zero and featuresLength - 1 ("+t-NaN)}h$D.getBinaryProperties=function(e,t,i){return V$u(e,t,i)},h$D.prototype.setShow=function(e,t){if(g$H(e,this.featuresLength),o$1q.typeOf.bool("show",t),!t||e$2e(this._showAlphaProperties)){var i=J$x(this),n=2*e,r=t?255:0;if(i[n]!==r)i[n]=r,$$z(this)[4*e+3]=t?i[n+1]:0,this._batchValuesDirty=!0}},h$D.prototype.setAllShow=function(e){o$1q.typeOf.bool("show",e);for(var t=this.featuresLength,i=0;i<t;++i)this.setShow(i,e)},h$D.prototype.getShow=function(e){if(g$H(e,this.featuresLength),!e$2e(this._showAlphaProperties))return!0;var t=2*e;return 255===this._showAlphaProperties[t]};var Se$b=new Array(4);h$D.prototype.setColor=function(e,t){if(g$H(e,this.featuresLength),o$1q.typeOf.object("color",t),!e$1X.equals(t,I$L)||e$2e(this._batchValues)){var i=t.toBytes(Se$b),n=i[3],r=$$z(this),o=4*e,a=J$x(this),s=2*e;if(r[o]!==i[0]||r[o+1]!==i[1]||r[o+2]!==i[2]||a[s+1]!==n){r[o]=i[0],r[o+1]=i[1],r[o+2]=i[2];var l=255!==a[s+1],u=0!==a[s];r[o+3]=u?n:0,a[s+1]=n;var c=255!==n;c&&!l?++this._translucentFeaturesLength:!c&&l&&--this._translucentFeaturesLength,this._batchValuesDirty=!0,e$2e(this._colorChangedCallback)&&this._colorChangedCallback(e,t)}}},h$D.prototype.setAllColor=function(e){o$1q.typeOf.object("color",e);for(var t=this.featuresLength,i=0;i<t;++i)this.setColor(i,e)},h$D.prototype.getColor=function(e,t){if(g$H(e,this.featuresLength),o$1q.typeOf.object("result",t),!e$2e(this._batchValues))return e$1X.clone(I$L,t);var i=this._batchValues,n=4*e,r=this._showAlphaProperties,o=2*e;return e$1X.fromBytes(i[n],i[n+1],i[n+2],r[o+1],t)},h$D.prototype.getPickColor=function(e){return g$H(e,this.featuresLength),this._pickIds[e]};var Te$g=new e$1X;function ee$q(e,t){var i=e.typedArray,n=e.componentCount;return 1===n?i[t]:e.type.unpack(i,t*n)}function te$q(e,t,i){var n=e.typedArray,r=e.componentCount;1===r?n[t]=i:e.type.pack(i,n,t*r)}h$D.prototype.applyStyle=function(e){if(!e$2e(e))return this.setAllColor(I$L),void this.setAllShow(X$w);for(var t=this._content,i=this.featuresLength,n=0;n<i;++n){var r=t.getFeature(n),o=e$2e(e.color)?e.color.evaluateColor(r,Te$g):I$L,a=e$2e(e.show)?e.show.evaluate(r):X$w;this.setColor(n,o),this.setShow(n,a)}};var xe$f=[],Ce$c=[],Le$i=0;function Ae$i(e,t,i){var n=e.classIds,r=e.parentCounts,o=e.parentIds,a=e.parentIndexes,s=n.length,l=xe$f;l.length=Math.max(l.length,s);var u=++Le$i,c=Ce$c;for(c.length=0,c.push(t);c.length>0;)if(l[t=c.pop()]!==u){l[t]=u;var h=i(e,t);if(e$2e(h))return h;for(var d=r[t],f=a[t],p=0;p<d;++p){var _=o[f+p];_!==t&&c.push(_)}}}function we$f(e,t,i){for(var n=!0;n;){var r=i(e,t);if(e$2e(r))return r;var o=e.parentIds[t];n=o!==t,t=o}}function P$y(e,t,i){var n=e.parentCounts;return e$2e(e.parentIds)?e$2e(n)?Ae$i(e,t,i):we$f(e,t,i):i(e,t)}function De$f(e,t,i){var n=P$y(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t];if(e$2e(e.classes[n].instances[i]))return!0}));return e$2e(n)}function Pe$d(e,t,i){P$y(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t],r=e.classes[n].instances;for(var o in r)r.hasOwnProperty(o)&&-1===i.indexOf(o)&&i.push(o)}))}function Ee$g(e,t,i){return P$y(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t],r=e.classes[n],o=e.classIndexes[t],a=r.instances[i];if(e$2e(a))return e$2e(a.typedArray)?ee$q(a,o):l$1f(a[o],!0)}))}function be$j(e,t,i,n){var r=P$y(e._batchTableHierarchy,t,(function(e,r){var o=e.classIds[r],a=e.classes[o],s=e.classIndexes[r],l=a.instances[i];if(e$2e(l)){if(r!==t)throw new t$15('Inherited property "'+i+'" is read-only.');return e$2e(l.typedArray)?te$q(l,s,n):l[s]=l$1f(n,!0),!0}}));return e$2e(r)}function Oe$g(e){return 1===e._textureDimensions.y?"uniform vec4 tile_textureStep; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n return vec2(centerX + (batchId * stepX), 0.5); \n} \n":"uniform vec4 tile_textureStep; \nuniform vec2 tile_textureDimensions; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n float stepY = tile_textureStep.z; \n float centerY = tile_textureStep.w; \n float xId = mod(batchId, tile_textureDimensions.x); \n float yId = floor(batchId / tile_textureDimensions.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function re$t(e,t){return e=s$V.replaceMain(e,"tile_main"),t?e+"uniform float tile_colorBlend; \nvoid tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n tile_featureColor = czm_gammaCorrect(tile_featureColor); \n gl_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n} \n":e+"void tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n} \n"}function Ie$d(e,t){for(var i,n="texture2D("+t,r=0,o=e.indexOf(n,r);o>-1;){for(var a=0,s=o;s<e.length;++s){var l=e.charAt(s);if("("===l)++a;else if(")"===l&&0===--a){i=s+1;break}}var u="tile_diffuse_final("+e.slice(o,i)+", tile_diffuse)";e=e.slice(0,o)+u+e.slice(i),r=o+u.length,o=e.indexOf(n,r)}return e}function ne$q(e,t,i){if(!e$2e(t))return re$t(e,i);var n=new RegExp("(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+"+t+";"),r=e.match(n);if(!e$2e(r))return re$t(e,i);var o=r[0],a=r[2];e=(e=s$V.replaceMain(e,"tile_main")).replace(o,"");var s;if("vec3"===a||"vec4"===a){var l="vec3"===a?"vec4("+t+", 1.0)":t,u="vec3"===a?"tile_diffuse.xyz":"tile_diffuse";n=new RegExp(t,"g"),e=e.replace(n,u),s=" vec4 source = "+l+"; \n tile_diffuse = tile_diffuse_final(source, tile_featureColor); \n tile_main(); \n"}else"sampler2D"===a&&(e=Ie$d(e,t),s=" tile_diffuse = tile_featureColor; \n tile_main(); \n");return e="uniform float tile_colorBlend; \nvec4 tile_diffuse = vec4(1.0); \nbool isWhite(vec3 color) \n{ \n return all(greaterThan(color, vec3(1.0 - czm_epsilon3))); \n} \nvec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse) \n{ \n vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend); \n vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse; \n return vec4(diffuse.rgb, sourceDiffuse.a); \n} \n"+o+"\n"+e+"\nvoid tile_color(vec4 tile_featureColor) \n{ \n"+s,i&&(e+=" tile_featureColor = czm_gammaCorrect(tile_featureColor); \n gl_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n"),e+="} \n"}function ke$a(e){var t=e._content.tileset,i=t.colorBlendMode,n=t.colorBlendAmount;if(i===L$I.HIGHLIGHT)return 0;if(i===L$I.REPLACE)return 1;if(i===L$I.MIX)return e$2d.clamp(n,e$2d.EPSILON4,1);throw new t$15('Invalid color blend mode "'+i+'".')}h$D.prototype.isClass=function(e,t){g$H(e,this.featuresLength),o$1q.typeOf.string("className",t);var i=this._batchTableHierarchy;if(!e$2e(i))return!1;var n=P$y(i,e,(function(e,i){var n=e.classIds[i];if(e.classes[n].name===t)return!0}));return e$2e(n)},h$D.prototype.isExactClass=function(e,t){return o$1q.typeOf.string("className",t),this.getExactClassName(e)===t},h$D.prototype.getExactClassName=function(e){g$H(e,this.featuresLength);var t=this._batchTableHierarchy;if(e$2e(t)){var i=t.classIds[e];return t.classes[i].name}},h$D.prototype.hasProperty=function(e,t){return g$H(e,this.featuresLength),o$1q.typeOf.string("name",t),e$2e(this._properties[t])||e$2e(this._batchTableHierarchy)&&De$f(this,e,t)},h$D.prototype.getPropertyNames=function(e,t){g$H(e,this.featuresLength),(t=e$2e(t)?t:[]).length=0;var i=Object.keys(this._properties);return t.push.apply(t,i),e$2e(this._batchTableHierarchy)&&Pe$d(this,e,t),t},h$D.prototype.getProperty=function(e,t){if(g$H(e,this.featuresLength),o$1q.typeOf.string("name",t),e$2e(this._batchTableBinaryProperties)){var i=this._batchTableBinaryProperties[t];if(e$2e(i))return ee$q(i,e)}var n=this._properties[t];if(e$2e(n))return l$1f(n[e],!0);if(e$2e(this._batchTableHierarchy)){var r=Ee$g(this,e,t);if(e$2e(r))return r}},h$D.prototype.setProperty=function(e,t,i){var n=this.featuresLength;if(g$H(e,n),o$1q.typeOf.string("name",t),e$2e(this._batchTableBinaryProperties)){var r=this._batchTableBinaryProperties[t];if(e$2e(r))return void te$q(r,e,i)}if(!e$2e(this._batchTableHierarchy)||!be$j(this,e,t,i)){var o=this._properties[t];e$2e(o)||(this._properties[t]=new Array(n),o=this._properties[t]),o[e]=l$1f(i,!0)}},h$D.prototype.getVertexShaderCallback=function(e,t,i){if(0!==this.featuresLength){var n=this;return function(r){var o,a=ne$q(r,i,!1);return e$1W.maximumVertexTextureImageUnits>0?(o="",e&&(o+="uniform bool tile_translucentCommand; \n"),o+="uniform sampler2D tile_batchTexture; \nvarying vec4 tile_featureColor; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n vec2 st = computeSt("+t+"); \n vec4 featureProperties = texture2D(tile_batchTexture, st); \n tile_color(featureProperties); \n float show = ceil(featureProperties.a); \n gl_Position *= show; \n",e&&(o+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n gl_Position *= 0.0; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n gl_Position *= 0.0; \n } \n } \n"),o+=" tile_featureColor = featureProperties; \n tile_featureSt = st; \n}"):o="varying vec2 tile_featureSt; \nvoid main() \n{ \n tile_color(vec4(1.0)); \n tile_featureSt = computeSt("+t+"); \n}",a+"\n"+Oe$g(n)+o}}},h$D.prototype.getFragmentShaderCallback=function(e,t){if(0!==this.featuresLength)return function(i){return i=ne$q(i,t,!0),e$1W.maximumVertexTextureImageUnits>0?i+="#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\nuniform sampler2D tile_pickTexture; \nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n#ifdef APPLY_SWIPE \n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n tile_color(tile_featureColor); \n}":(e&&(i+="uniform bool tile_translucentCommand; \n"),i+="uniform sampler2D tile_pickTexture; \nuniform sampler2D tile_batchTexture; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n",e&&(i+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n discard; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n discard; \n } \n } \n"),i+=" tile_color(featureProperties); \n} \n"),i}},h$D.prototype.getClassificationFragmentShaderCallback=function(){if(0!==this.featuresLength)return function(e){return e=s$V.replaceMain(e,"tile_main"),e$1W.maximumVertexTextureImageUnits>0?e+="uniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n tile_main(); \n gl_FragColor = tile_featureColor; \n}":e+="uniform sampler2D tile_batchTexture; \nuniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvoid main() \n{ \n tile_main(); \n vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n gl_FragColor = featureProperties; \n} \n",e}},h$D.prototype.getUniformMapCallback=function(){if(0!==this.featuresLength){var e=this;return function(t){var i={tile_batchTexture:function(){return u$Z(e._batchTexture,e._defaultTexture)},tile_textureDimensions:function(){return e._textureDimensions},tile_textureStep:function(){return e._textureStep},tile_colorBlend:function(){return ke$a(e)},uSwipeRegion:function(){var t=e._content.tileset._swipeRegion,i=e._content.tileset.frameState.context.drawingBufferWidth,n=e._content.tileset.frameState.context.drawingBufferHeight,r=new e$2c;return r.x=t.x*i,r.y=(1-t.y)*n,r.z=t.z*i,r.w=(1-t.w)*n,r},tile_pickTexture:function(){return u$Z(e._pickTexture,e._defaultTexture)}};return p$19(t,i)}}},h$D.prototype.getPickId=function(){return"texture2D(tile_pickTexture, tile_featureSt)"};var x$H={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};function Re$f(e){var t=e._translucentFeaturesLength;return 0===t?x$H.ALL_OPAQUE:t===e.featuresLength?x$H.ALL_TRANSLUCENT:x$H.OPAQUE_AND_TRANSLUCENT}function Be$f(e){var t=i$$.shallowClone(e),i=t.pass===Le$q.TRANSLUCENT;return t.uniformMap=e$2e(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return i},t}function Me$h(e){var t=i$$.shallowClone(e);return t.pass=Le$q.TRANSLUCENT,t.renderState=ze$c(e.renderState),t}function Ue$d(e){var t=i$$.shallowClone(e);return t.renderState=Ge$8(e.renderState),t}function Ne$c(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!e$2e(i)){var n=t.fragmentShaderSource.clone();n.defines=e$2e(n.defines)?n.defines.slice(0):[],n.defines.push("POLYGON_OFFSET"),n.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),i=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:t._attributeLocations})}return i}function Ve$c(e,t){var i=i$$.shallowClone(t),n=l$1f(i.renderState,!0);n.cull.enabled=!0,n.cull.face=G$1a.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5},n.stencilTest=u$M.setCesium3DTileBit(),n.stencilMask=u$M.CESIUM_3D_TILE_MASK,i.renderState=d$1m.fromCache(n),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=l$1f(t.uniformMap);var r=new o$1o(5,5);return i.uniformMap.u_polygonOffset=function(){return r},i.shaderProgram=Ne$c(e,t.shaderProgram),i}function Fe$e(e,t){var i=i$$.shallowClone(e),n=l$1f(i.renderState,!0);return n.stencilTest.enabled=!0,n.stencilTest.mask=u$M.SKIP_LOD_MASK,n.stencilTest.reference=u$M.CESIUM_3D_TILE_MASK|t<<u$M.SKIP_LOD_BIT_SHIFT,n.stencilTest.frontFunction=m$Z.GREATER_OR_EQUAL,n.stencilTest.frontOperation.zPass=n$_.REPLACE,n.stencilTest.backFunction=m$Z.GREATER_OR_EQUAL,n.stencilTest.backOperation.zPass=n$_.REPLACE,n.stencilMask=u$M.CESIUM_3D_TILE_MASK|u$M.SKIP_LOD_MASK,i.renderState=d$1m.fromCache(n),i}function He$b(e){return(e.renderState.stencilTest.reference&u$M.SKIP_LOD_MASK)>>>u$M.SKIP_LOD_BIT_SHIFT}function ze$c(e){var t=l$1f(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=Ee$r.ALPHA_BLEND,d$1m.fromCache(t)}function Ge$8(e){var t=l$1f(e,!0);return t.stencilTest=u$M.setCesium3DTileBit(),t.stencilMask=u$M.CESIUM_3D_TILE_MASK,d$1m.fromCache(t)}function ie$o(e,t,i){var n=e._textureDimensions;return new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,source:{width:n.x,height:n.y,arrayBufferView:i},flipY:!1,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})}function Ke$8(e,t){var i=e.featuresLength;if(!e$2e(e._pickTexture)&&i>0){for(var n=e._pickIds,r=Z$z(e),o=new Uint8Array(r),a=e._content,s=0;s<i;++s){var l=t.createPickId(a.getFeature(s));n.push(l);var u=l.color,c=4*s;o[c]=e$1X.floatToByte(u.red),o[c+1]=e$1X.floatToByte(u.green),o[c+2]=e$1X.floatToByte(u.blue),o[c+3]=e$1X.floatToByte(u.alpha)}e._pickTexture=ie$o(e,t,o),a.tileset._statistics.batchTableByteLength+=e._pickTexture.sizeInBytes}}function Ye$8(e){var t=e._textureDimensions;e._batchTexture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function e$M(e,t){this._content=e,this._batchId=t,this._color=void 0}function o$C(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function n$s(e,t,i,n,r,o){var a=e._cachedTypedArrays,s=a[t];return e$2e(s)||(s=S$14.createArrayBufferView(i,e.buffer.buffer,e.buffer.byteOffset+o,r*n),a[t]=s),s}function A$I(e,t,i,n){var r=e._cachedTypedArrays,o=r[t];return e$2e(o)||(o=S$14.createTypedArray(i,n),r[t]=o),o}function d$P(e,t,i){if(i=u$Z(i,!1)){var n=e.indexOf(t);if(n>-1)return n}return e.push(t),e.length-1}function i$E(e,t){return e$2e(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}function e$L(){}function r$B(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}function p$A(e,t){var i=t.bufferView;if(e$2e(i)){var n=e.bufferViews[i];if(e$2e(n.byteStride)&&n.byteStride>0)return n.byteStride}return S$14.getSizeInBytes(t.componentType)*r$B(t.type)}function E$E(e){e$L.accessor(e,(function(e){e$2e(e.bufferView)&&(e.byteOffset=u$Z(e.byteOffset,0))})),e$L.bufferView(e,(function(e){e$2e(e.buffer)&&(e.byteOffset=u$Z(e.byteOffset,0))})),e$L.mesh(e,(function(t){e$L.meshPrimitive(t,(function(t){if(t.mode=u$Z(t.mode,de$y.TRIANGLES),!e$2e(t.material)){e$2e(e.materials)||(e.materials=[]);t.material=d$P(e.materials,{name:"default"})}}))})),e$L.accessorContainingVertexAttributeData(e,(function(t){var i=e.accessors[t],n=i.bufferView;if(i.normalized=u$Z(i.normalized,!1),e$2e(n)){var r=e.bufferViews[n];r.byteStride=p$A(e,i),r.target=de$y.ARRAY_BUFFER}})),e$L.accessorContainingIndexData(e,(function(t){var i=e.accessors[t].bufferView;e$2e(i)&&(e.bufferViews[i].target=de$y.ELEMENT_ARRAY_BUFFER)})),e$L.material(e,(function(e){var t=u$Z(e.extensions,u$Z.EMPTY_OBJECT),i=t.KHR_materials_common;if(e$2e(i)){var n=i.technique,r=e$2e(i.values)?i.values:{};return i.values=r,r.ambient=e$2e(r.ambient)?r.ambient:[0,0,0,1],r.emission=e$2e(r.emission)?r.emission:[0,0,0,1],r.transparency=u$Z(r.transparency,1),r.transparent=u$Z(r.transparent,!1),r.doubleSided=u$Z(r.doubleSided,!1),void("CONSTANT"!==n&&(r.diffuse=e$2e(r.diffuse)?r.diffuse:[0,0,0,1],"LAMBERT"!==n&&(r.specular=e$2e(r.specular)?r.specular:[0,0,0,1],r.shininess=u$Z(r.shininess,0))))}e.emissiveFactor=u$Z(e.emissiveFactor,[0,0,0]),e.alphaMode=u$Z(e.alphaMode,"OPAQUE"),e.doubleSided=u$Z(e.doubleSided,!1),"MASK"===e.alphaMode&&(e.alphaCutoff=u$Z(e.alphaCutoff,.5)),e$2e(t.KHR_techniques_webgl)&&e$L.materialValue(e,(function(e){e$2e(e.index)&&d$O(e)})),d$O(e.emissiveTexture),d$O(e.normalTexture),d$O(e.occlusionTexture);var o=e.pbrMetallicRoughness;e$2e(o)&&(o.baseColorFactor=u$Z(o.baseColorFactor,[1,1,1,1]),o.metallicFactor=u$Z(o.metallicFactor,1),o.roughnessFactor=u$Z(o.roughnessFactor,1),d$O(o.baseColorTexture),d$O(o.metallicRoughnessTexture));var a=t.pbrSpecularGlossiness;e$2e(a)&&(a.diffuseFactor=u$Z(a.diffuseFactor,[1,1,1,1]),a.specularFactor=u$Z(a.specularFactor,[1,1,1]),a.glossinessFactor=u$Z(a.glossinessFactor,1),d$O(a.specularGlossinessTexture))})),e$L.animation(e,(function(e){e$L.animationSampler(e,(function(e){e.interpolation=u$Z(e.interpolation,"LINEAR")}))}));var t=l$G(e);return e$L.node(e,(function(e,i){e$2e(t[i])||e$2e(e.translation)||e$2e(e.rotation)||e$2e(e.scale)?(e.translation=u$Z(e.translation,[0,0,0]),e.rotation=u$Z(e.rotation,[0,0,0,1]),e.scale=u$Z(e.scale,[1,1,1])):e.matrix=u$Z(e.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])})),e$L.sampler(e,(function(e){e.wrapS=u$Z(e.wrapS,de$y.REPEAT),e.wrapT=u$Z(e.wrapT,de$y.REPEAT)})),e$2e(e.scenes)&&!e$2e(e.scene)&&(e.scene=0),e}function l$G(e){var t={};return e$L.animation(e,(function(e){e$L.animationChannel(e,(function(e){var i=e.target,n=i.node,r=i.path;("translation"===r||"rotation"===r||"scale"===r)&&(t[n]=!0)}))})),t}function d$O(e){e$2e(e)&&(e.texCoord=u$Z(e.texCoord,0))}function s$z(e){return e$L.shader(e,(function(e){n$r(e)})),e$L.buffer(e,(function(e){n$r(e)})),e$L.image(e,(function(e){n$r(e),e$L.compressedImage(e,(function(e){n$r(e)}))})),n$r(e),e}function n$r(e){e.extras=e$2e(e.extras)?e.extras:{},e.extras._pipeline=e$2e(e.extras._pipeline)?e.extras._pipeline:{}}function s$y(e,t){var i=e.extensionsRequired;if(e$2e(i)){var n=i.indexOf(t);n>=0&&i.splice(n,1),0===i.length&&delete e.extensionsRequired}}function d$N(e,t){var i=e.extensionsUsed;if(e$2e(i)){var n=i.indexOf(t);n>=0&&i.splice(n,1),s$y(e,t),0===i.length&&delete e.extensionsUsed}}h$D.prototype.addDerivedCommands=function(e,t){for(var i=e.commandList,n=i.length,r=this._content._tile,o=r._finalResolution,a=r.tileset,s=a._skipLevelOfDetail&&a._hasMixedContent&&e.context.stencilBuffer,l=Re$f(this),u=t;u<n;++u){var c=i[u],h=c.derivedCommands.tileset;(!e$2e(h)||c.dirty)&&(h={},c.derivedCommands.tileset=h,h.originalCommand=Be$f(c),c.dirty=!1);var d=h.originalCommand;l!==x$H.ALL_OPAQUE&&c.pass!==Le$q.TRANSLUCENT&&(e$2e(h.translucent)||(h.translucent=Me$h(d))),l!==x$H.ALL_TRANSLUCENT&&c.pass!==Le$q.TRANSLUCENT&&(e$2e(h.opaque)||(h.opaque=Ue$d(d)),s&&(o||(e$2e(h.zback)||(h.zback=Ve$c(e.context,d)),a._backfaceCommands.push(h.zback)),(!e$2e(h.stencil)||r._selectionDepth!==He$b(h.stencil))&&(c.renderState.depthMask?h.stencil=Fe$e(d,r._selectionDepth):h.stencil=h.opaque)));var f=s?h.stencil:h.opaque,p=h.translucent;c.pass!==Le$q.TRANSLUCENT?(l===x$H.ALL_OPAQUE&&(i[u]=f),l===x$H.ALL_TRANSLUCENT&&(i[u]=p),l===x$H.OPAQUE_AND_TRANSLUCENT&&(i[u]=f,i.push(p))):i[u]=d}},h$D.prototype.update=function(e,t){var i=t.context;this._defaultTexture=i.defaultTexture;var n=t.passes;(n.pick||n.postProcess)&&Ke$8(this,i),this._batchValuesDirty&&(this._batchValuesDirty=!1,e$2e(this._batchTexture)||(this._batchTexture=ie$o(this,i,this._batchValues),e._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes),Ye$8(this))},h$D.prototype.isDestroyed=function(){return!1},h$D.prototype.destroy=function(){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),this._pickTexture=this._pickTexture&&this._pickTexture.destroy();for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();return i$11(this)},Object.defineProperties(e$M.prototype,{show:{get:function(){return this._content.batchTable.getShow(this._batchId)},set:function(e){this._content.batchTable.setShow(this._batchId,e)}},color:{get:function(){return e$2e(this._color)||(this._color=new e$1X),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickId:{get:function(){return this._content.batchTable.getPickColor(this._batchId)}}}),e$M.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},e$M.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},e$M.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},e$M.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},e$M.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},e$M.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},e$M.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},o$C.prototype.getGlobalProperty=function(e,t,i){var n=this.json[e];if(e$2e(n))return e$2e(n.byteOffset)?n$s(this,e,t=u$Z(t,S$14.UNSIGNED_INT),i=u$Z(i,1),1,n.byteOffset):n},o$C.prototype.getPropertyArray=function(e,t,i){var n=this.json[e];if(e$2e(n))return e$2e(n.byteOffset)?(e$2e(n.componentType)&&(t=S$14.fromName(n.componentType)),n$s(this,e,t,i,this.featuresLength,n.byteOffset)):A$I(this,e,t,n)},o$C.prototype.getProperty=function(e,t,i,n,r){if(e$2e(this.json[e])){var o=this.getPropertyArray(e,t,i);if(1===i)return o[n];for(var a=0;a<i;++a)r[a]=o[i*n+a];return r}},e$L.objectLegacy=function(e,t){if(e$2e(e))for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=t(e[i],i);if(e$2e(n))return n}},e$L.object=function(e,t){if(e$2e(e))for(var i=e.length,n=0;n<i;n++){var r=t(e[n],n);if(e$2e(r))return r}},e$L.topLevel=function(e,t,i){var n=e[t];return e$2e(n)&&!Array.isArray(n)?e$L.objectLegacy(n,i):e$L.object(n,i)},e$L.accessor=function(e,t){return e$L.topLevel(e,"accessors",t)},e$L.accessorWithSemantic=function(e,t,i){var n={};return e$L.mesh(e,(function(e){return e$L.meshPrimitive(e,(function(e){var r=e$L.meshPrimitiveAttribute(e,(function(e,r){if(0===r.indexOf(t)&&!e$2e(n[e])){n[e]=!0;var o=i(e);if(e$2e(o))return o}}));return e$2e(r)?r:e$L.meshPrimitiveTarget(e,(function(e){return e$L.meshPrimitiveTargetAttribute(e,(function(e,r){if(0===r.indexOf(t)&&!e$2e(n[e])){n[e]=!0;var o=i(e);if(e$2e(o))return o}}))}))}))}))},e$L.accessorContainingVertexAttributeData=function(e,t){var i={};return e$L.mesh(e,(function(e){return e$L.meshPrimitive(e,(function(e){var n=e$L.meshPrimitiveAttribute(e,(function(e){if(!e$2e(i[e])){i[e]=!0;var n=t(e);if(e$2e(n))return n}}));return e$2e(n)?n:e$L.meshPrimitiveTarget(e,(function(e){return e$L.meshPrimitiveTargetAttribute(e,(function(e){if(!e$2e(i[e])){i[e]=!0;var n=t(e);if(e$2e(n))return n}}))}))}))}))},e$L.accessorContainingIndexData=function(e,t){var i={};return e$L.mesh(e,(function(e){return e$L.meshPrimitive(e,(function(e){var n=e.indices;if(e$2e(n)&&!e$2e(i[n])){i[n]=!0;var r=t(n);if(e$2e(r))return r}}))}))},e$L.animation=function(e,t){return e$L.topLevel(e,"animations",t)},e$L.animationChannel=function(e,t){var i=e.channels;return e$L.object(i,t)},e$L.animationSampler=function(e,t){var i=e.samplers;return e$L.object(i,t)},e$L.buffer=function(e,t){return e$L.topLevel(e,"buffers",t)},e$L.bufferView=function(e,t){return e$L.topLevel(e,"bufferViews",t)},e$L.camera=function(e,t){return e$L.topLevel(e,"cameras",t)},e$L.image=function(e,t){return e$L.topLevel(e,"images",t)},e$L.compressedImage=function(e,t){if(e$2e(e.extras)){var i=e.extras.compressedImage3DTiles;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2e(r))return r}}},e$L.material=function(e,t){return e$L.topLevel(e,"materials",t)},e$L.materialValue=function(e,t){var i=e.values;for(var n in e$2e(e.extensions)&&e$2e(e.extensions.KHR_techniques_webgl)&&(i=e.extensions.KHR_techniques_webgl.values),i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2e(r))return r}},e$L.mesh=function(e,t){return e$L.topLevel(e,"meshes",t)},e$L.meshPrimitive=function(e,t){var i=e.primitives;if(e$2e(i))for(var n=i.length,r=0;r<n;r++){var o=t(i[r],r);if(e$2e(o))return o}},e$L.meshPrimitiveAttribute=function(e,t){var i=e.attributes;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2e(r))return r}},e$L.meshPrimitiveTarget=function(e,t){var i=e.targets;if(e$2e(i))for(var n=i.length,r=0;r<n;++r){var o=t(i[r],r);if(e$2e(o))return o}},e$L.meshPrimitiveTargetAttribute=function(e,t){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=t(e[i],i);if(e$2e(n))return n}},e$L.node=function(e,t){return e$L.topLevel(e,"nodes",t)},e$L.nodeInTree=function(e,t,i){var n=e.nodes;if(e$2e(n))for(var r=t.length,o=0;o<r;o++){var a=t[o],s=n[a];if(e$2e(s)){var l=i(s,a);if(e$2e(l))return l;var u=s.children;if(e$2e(u)&&e$2e(l=e$L.nodeInTree(e,u,i)))return l}}},e$L.nodeInScene=function(e,t,i){var n=t.nodes;if(e$2e(n))return e$L.nodeInTree(e,n,i)},e$L.program=function(e,t){return i$E(e,"KHR_techniques_webgl")?e$L.object(e.extensions.KHR_techniques_webgl.programs,t):e$L.topLevel(e,"programs",t)},e$L.sampler=function(e,t){return e$L.topLevel(e,"samplers",t)},e$L.scene=function(e,t){return e$L.topLevel(e,"scenes",t)},e$L.shader=function(e,t){return i$E(e,"KHR_techniques_webgl")?e$L.object(e.extensions.KHR_techniques_webgl.shaders,t):e$L.topLevel(e,"shaders",t)},e$L.skin=function(e,t){return e$L.topLevel(e,"skins",t)},e$L.skinJoint=function(e,t){var i=e.joints;if(e$2e(i))for(var n=i.length,r=0;r<n;r++){var o=t(i[r]);if(e$2e(o))return o}},e$L.techniqueAttribute=function(e,t){var i=e.attributes;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2e(r))return r}},e$L.techniqueUniform=function(e,t){var i=e.uniforms;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2e(r))return r}},e$L.techniqueParameter=function(e,t){var i=e.parameters;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2e(r))return r}},e$L.technique=function(e,t){return i$E(e,"KHR_techniques_webgl")?e$L.object(e.extensions.KHR_techniques_webgl.techniques,t):e$L.topLevel(e,"techniques",t)},e$L.texture=function(e,t){return e$L.topLevel(e,"textures",t)};var x$G=4;function O$u(e){if("glTF"!==a$F(e))throw new t$13("File is not valid binary glTF");var t=d$M(e,0,5),i=t[1];if(1!==i&&2!==i)throw new t$13("Binary glTF version is not 1 or 2");return 1===i?S$w(e,t):T$C(e,t)}function d$M(e,t,i){for(var n=new DataView(e.buffer),r=new Array(i),o=0;o<i;++o)r[o]=n.getUint32(e.byteOffset+t+o*x$G,!0);return r}function S$w(e,t){var i=t[2],n=t[3];if(0!==t[4])throw new t$13("Binary glTF scene format is not JSON");var r=20+n,o=a$K(e,20,n),a=JSON.parse(o);s$z(a);var s=e.subarray(r,i),l=a.buffers;if(e$2e(l)&&Object.keys(l).length>0){var u=u$Z(l.binary_glTF,l.KHR_binary_glTF);e$2e(u)&&(u.extras._pipeline.source=s)}return d$N(a,"KHR_binary_glTF"),a}function T$C(e,t){for(var i,n,r=t[2],o=12;o<r;){var a=d$M(e,o,2),s=a[0],l=a[1];o+=8;var u=e.subarray(o,o+s);if(o+=s,1313821514===l){var c=a$K(u);s$z(i=JSON.parse(c))}else 5130562===l&&(n=u)}if(e$2e(i)&&e$2e(n)){var h=i.buffers;if(e$2e(h)&&h.length>0)h[0].extras._pipeline.source=n}return i}function i$D(e,t){var i=e.extensionsUsed;e$2e(i)||(i=[],e.extensionsUsed=i),d$P(i,t,!0)}function c$y(e){switch(e){case S$14.BYTE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt8(t+o*n)};case S$14.UNSIGNED_BYTE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint8(t+o*n)};case S$14.SHORT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt16(t+o*n,!0)};case S$14.UNSIGNED_SHORT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint16(t+o*n,!0)};case S$14.INT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt32(t+o*n,!0)};case S$14.UNSIGNED_INT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint32(t+o*n,!0)};case S$14.FLOAT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getFloat32(t+o*n,!0)};case S$14.DOUBLE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getFloat64(t+o*n,!0)}}}function B$y(e,t){var i=e.bufferViews,n=e.buffers,r=t.bufferView,o=r$B(t.type);if(!e$2e(t.bufferView))return{min:d$1s(new Array(o),0),max:d$1s(new Array(o),0)};for(var a=d$1s(new Array(o),Number.POSITIVE_INFINITY),s=d$1s(new Array(o),Number.NEGATIVE_INFINITY),l=i[r],u=n[l.buffer].extras._pipeline.source,c=t.count,h=p$A(e,t),d=t.byteOffset+l.byteOffset+u.byteOffset,f=t.componentType,p=S$14.getSizeInBytes(f),_=new DataView(u.buffer),m=new Array(o),g=c$y(f),x=0;x<c;x++){g(_,d,o,p,m);for(var y=0;y<o;y++){var v=m[y];a[y]=Math.min(a[y],v),s[y]=Math.max(s[y],v)}d+=h}return{min:a,max:s}}var E$D=[de$y.FUNC_ADD,de$y.FUNC_ADD],p$z=[de$y.ONE,de$y.ZERO,de$y.ONE,de$y.ZERO];function O$t(e,t){var i=e.enable;return!!e$2e(i)&&i.indexOf(t)>-1}var N$u=[de$y.ZERO,de$y.ONE,de$y.SRC_COLOR,de$y.ONE_MINUS_SRC_COLOR,de$y.SRC_ALPHA,de$y.ONE_MINUS_SRC_ALPHA,de$y.DST_ALPHA,de$y.ONE_MINUS_DST_ALPHA,de$y.DST_COLOR,de$y.ONE_MINUS_DST_COLOR];function L$H(e,t){if(!e$2e(e))return t;for(var i=0;i<4;i++)if(-1===N$u.indexOf(e[i]))return t;return e}function R$v(e){var t={},i={};return e$2e(e.techniques)&&(e$L.technique(e,(function(e,n){var r=e.states;if(e$2e(r)){var o=i[n]={};if(O$t(r,de$y.BLEND)){o.alphaMode="BLEND";var a=r.functions;e$2e(a)&&(e$2e(a.blendEquationSeparate)||e$2e(a.blendFuncSeparate))&&(t[n]={blendEquation:u$Z(a.blendEquationSeparate,E$D),blendFactors:L$H(a.blendFuncSeparate,p$z)})}O$t(r,de$y.CULL_FACE)||(o.doubleSided=!0),delete e.states}})),Object.keys(t).length>0&&(e$2e(e.extensions)||(e.extensions={}),i$D(e,"KHR_blend")),e$L.material(e,(function(e){if(e$2e(e.technique)){var n=i[e.technique];e$L.objectLegacy(n,(function(t,i){e[i]=t}));var r=t[e.technique];e$2e(r)&&(e$2e(e.extensions)||(e.extensions={}),e.extensions.KHR_blend=r)}}))),e}function s$x(e,t){var i=e.extensionsRequired;e$2e(i)||(i=[],e.extensionsRequired=i),d$P(i,t,!0),i$D(e,t)}function R$u(e){var t=e.techniques,i={},n={};if(e$2e(t)){var r={programs:[],shaders:[],techniques:[]},o=e.glExtensionsUsed;delete e.glExtensionsUsed,e$L.technique(e,(function(t,a){var s,l={name:t.name,program:void 0,attributes:{},uniforms:{}};e$L.techniqueAttribute(t,(function(e,i){s=t.parameters[e],l.attributes[i]={semantic:s.semantic}})),e$L.techniqueUniform(t,(function(e,n){s=t.parameters[e],l.uniforms[n]={count:s.count,node:s.node,type:s.type,semantic:s.semantic,value:s.value},i[e]=n}));var u=e.programs[t.program],c={name:u.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:o},h=e.shaders[u.fragmentShader];c.fragmentShader=d$P(r.shaders,h,!0);var d=e.shaders[u.vertexShader];c.vertexShader=d$P(r.shaders,d,!0),l.program=d$P(r.programs,c),n[a]=d$P(r.techniques,l)})),r.techniques.length>0&&(e$2e(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,i$D(e,"KHR_techniques_webgl"),s$x(e,"KHR_techniques_webgl"))}return e$L.material(e,(function(e){if(e$2e(e.technique)){var t={technique:n[e.technique]};e$L.objectLegacy(e.values,(function(e,n){e$2e(t.values)||(t.values={});var r=i[n];t.values[r]=e})),e$2e(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=t}delete e.technique,delete e.values})),delete e.techniques,delete e.programs,delete e.shaders,e}var b$I=["mesh","node","material","accessor","bufferView","buffer"];function d$L(e,t){return t=u$Z(t,b$I),b$I.forEach((function(i){t.indexOf(i)>-1&&p$y(e,i)})),e}var _$v={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",node:"nodes",material:"materials",mesh:"meshes"};function p$y(e,t){var i=e[_$v[t]];if(e$2e(i))for(var n=0,r=m$A[t](e),o=i.length,a=0;a<o;++a)r[a]||(a$z[t](e,a-n),n++)}function a$z(){}function m$A(){}function v$x(e,t){return!(e$2e(t.mesh)||e$2e(t.camera)||e$2e(t.skin)||e$2e(t.weights)||e$2e(t.extras)||e$2e(t.extensions)&&0!==t.extensions.length)&&(!e$2e(t.children)||0===t.children.filter((function(t){return!v$x(e,e.nodes[t])})).length)}function a$y(e,t){var i={byteLength:t.length,extras:{_pipeline:{source:t}}},n={buffer:d$P(e.buffers,i),byteOffset:0,byteLength:t.length};return d$P(e.bufferViews,n)}function T$B(e,t){var i=p$A(e,t),n=S$14.getSizeInBytes(t.componentType),r=r$B(t.type),o=t.count,a=new Array(r*o);if(!e$2e(t.bufferView))return d$1s(a,0),a;for(var s=e.bufferViews[t.bufferView],l=e.buffers[s.buffer].extras._pipeline.source,u=t.byteOffset+s.byteOffset+l.byteOffset,c=new DataView(l.buffer),h=new Array(r),d=c$y(t.componentType),f=0;f<o;++f){d(c,u,r,n,h);for(var p=0;p<r;++p)a[f*r+p]=h[p];u+=i}return a}function T$A(e){var t;return e$L.accessorWithSemantic(e,"JOINTS_0",(function(i){var n=e.accessors[i];(t=n.componentType)===de$y.BYTE?t$u(e,n,S$14.UNSIGNED_BYTE):t!==de$y.UNSIGNED_BYTE&&t!==de$y.UNSIGNED_SHORT&&t$u(e,n,S$14.UNSIGNED_SHORT)})),e$L.accessorWithSemantic(e,"WEIGHTS_0",(function(i){var n=e.accessors[i];(t=n.componentType)===de$y.BYTE?t$u(e,n,S$14.UNSIGNED_BYTE):t===de$y.SHORT&&t$u(e,n,S$14.UNSIGNED_SHORT)})),e}function t$u(e,t,i){var n=S$14.createTypedArray(i,T$B(e,t)),r=new Uint8Array(n.buffer);t.bufferView=a$y(e,r),t.componentType=i,t.byteOffset=0}a$z.accessor=function(e,t){e.accessors.splice(t,1),e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$L.meshPrimitiveAttribute(e,(function(i,n){i>t&&e.attributes[n]--})),e$L.meshPrimitiveTarget(e,(function(e){e$L.meshPrimitiveTargetAttribute(e,(function(i,n){i>t&&e[n]--}))}));var i=e.indices;e$2e(i)&&i>t&&e.indices--}))})),e$L.skin(e,(function(e){e$2e(e.inverseBindMatrices)&&e.inverseBindMatrices>t&&e.inverseBindMatrices--})),e$L.animation(e,(function(e){e$L.animationSampler(e,(function(e){e$2e(e.input)&&e.input>t&&e.input--,e$2e(e.output)&&e.output>t&&e.output--}))}))},a$z.buffer=function(e,t){e.buffers.splice(t,1),e$L.bufferView(e,(function(e){e$2e(e.buffer)&&e.buffer>t&&e.buffer--}))},a$z.bufferView=function(e,t){e.bufferViews.splice(t,1),e$L.accessor(e,(function(e){e$2e(e.bufferView)&&e.bufferView>t&&e.bufferView--})),e$L.shader(e,(function(e){e$2e(e.bufferView)&&e.bufferView>t&&e.bufferView--})),e$L.image(e,(function(e){e$2e(e.bufferView)&&e.bufferView>t&&e.bufferView--,e$L.compressedImage(e,(function(e){var i=e.bufferView;e$2e(i)&&i>t&&e.bufferView--}))})),i$E(e,"KHR_draco_mesh_compression")&&e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$2e(e.extensions)&&e$2e(e.extensions.KHR_draco_mesh_compression)&&e.extensions.KHR_draco_mesh_compression.bufferView>t&&e.extensions.KHR_draco_mesh_compression.bufferView--}))}))},a$z.mesh=function(e,t){e.meshes.splice(t,1),e$L.node(e,(function(e){e$2e(e.mesh)&&(e.mesh>t?e.mesh--:e.mesh===t&&delete e.mesh)}))},a$z.node=function(e,t){e.nodes.splice(t,1),e$L.skin(e,(function(e){e$2e(e.skeleton)&&e.skeleton>t&&e.skeleton--,e.joints=e.joints.map((function(e){return e>t?e-1:e}))})),e$L.animation(e,(function(e){e$L.animationChannel(e,(function(e){e$2e(e.target)&&e$2e(e.target.node)&&e.target.node>t&&e.target.node--}))})),e$L.technique(e,(function(e){e$L.techniqueUniform(e,(function(e){e$2e(e.node)&&e.node>t&&e.node--}))})),e$L.node(e,(function(e){!e$2e(e.children)||(e.children=e.children.filter((function(e){return e!==t})).map((function(e){return e>t?e-1:e})))})),e$L.scene(e,(function(e){e.nodes=e.nodes.filter((function(e){return e!==t})).map((function(e){return e>t?e-1:e}))}))},a$z.material=function(e,t){e.materials.splice(t,1),e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$2e(e.material)&&e.material>t&&e.material--}))}))},m$A.accessor=function(e){var t={};return e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$L.meshPrimitiveAttribute(e,(function(e){t[e]=!0})),e$L.meshPrimitiveTarget(e,(function(e){e$L.meshPrimitiveTargetAttribute(e,(function(e){t[e]=!0}))}));var i=e.indices;e$2e(i)&&(t[i]=!0)}))})),e$L.skin(e,(function(e){e$2e(e.inverseBindMatrices)&&(t[e.inverseBindMatrices]=!0)})),e$L.animation(e,(function(e){e$L.animationSampler(e,(function(e){e$2e(e.input)&&(t[e.input]=!0),e$2e(e.output)&&(t[e.output]=!0)}))})),t},m$A.buffer=function(e){var t={};return e$L.bufferView(e,(function(e){e$2e(e.buffer)&&(t[e.buffer]=!0)})),t},m$A.bufferView=function(e){var t={};return e$L.accessor(e,(function(e){e$2e(e.bufferView)&&(t[e.bufferView]=!0)})),e$L.shader(e,(function(e){e$2e(e.bufferView)&&(t[e.bufferView]=!0)})),e$L.image(e,(function(e){e$2e(e.bufferView)&&(t[e.bufferView]=!0),e$L.compressedImage(e,(function(e){e$2e(e.bufferView)&&(t[e.bufferView]=!0)}))})),i$E(e,"KHR_draco_mesh_compression")&&e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$2e(e.extensions)&&e$2e(e.extensions.KHR_draco_mesh_compression)&&(t[e.extensions.KHR_draco_mesh_compression.bufferView]=!0)}))})),t},m$A.mesh=function(e){var t={};return e$L.node(e,(function(i){if(e$2e(i.mesh&&e$2e(e.meshes))){var n=e.meshes[i.mesh];e$2e(n)&&e$2e(n.primitives)&&n.primitives.length>0&&(t[i.mesh]=!0)}})),t},m$A.node=function(e){var t={};return e$L.node(e,(function(i,n){v$x(e,i)||(t[n]=!0)})),e$L.skin(e,(function(e){e$2e(e.skeleton)&&(t[e.skeleton]=!0),e$L.skinJoint(e,(function(e){t[e]=!0}))})),e$L.animation(e,(function(e){e$L.animationChannel(e,(function(e){e$2e(e.target)&&e$2e(e.target.node)&&(t[e.target.node]=!0)}))})),e$L.technique(e,(function(e){e$L.techniqueUniform(e,(function(e){e$2e(e.node)&&(t[e.node]=!0)}))})),t},m$A.material=function(e){var t={};return e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$2e(e.material)&&(t[e.material]=!0)}))})),t};var V$t={.8:se$k,"1.0":Re$e,"2.0":void 0};function re$s(e,t){var i=(t=u$Z(t,u$Z.EMPTY_OBJECT)).targetVersion,n=e.version;e.asset=u$Z(e.asset,{version:"1.0"}),e.asset.version=u$Z(e.asset.version,"1.0"),n=u$Z(n,e.asset.version).toString(),Object.prototype.hasOwnProperty.call(V$t,n)||(e$2e(n)&&(n=n.substring(0,3)),Object.prototype.hasOwnProperty.call(V$t,n)||(n="1.0"));for(var r=V$t[n];e$2e(r)&&n!==i;)r(e,t),n=e.asset.version,r=V$t[n];return e}function F$E(e){var t=e.materials;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.instanceTechnique;e$2e(r)&&(n.technique=r.technique,n.values=r.values,delete n.instanceTechnique)}}function ie$n(e){var t=e.meshes;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i].primitives;if(e$2e(n))for(var r=n.length,o=0;o<r;++o){var a=n[o],s=u$Z(a.primitive,de$y.TRIANGLES);a.mode=u$Z(a.mode,s),delete a.primitive}}}function ne$p(e){var t=e.nodes,i=new o$1p,n=new n$15;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var o=t[r];if(e$2e(o.rotation)){var a=o.rotation;o$1p.fromArray(a,0,i),n$15.fromAxisAngle(i,a[3],n),o.rotation=[n.x,n.y,n.z,n.w]}var s=o.instanceSkin;e$2e(s)&&(o.skeletons=s.skeletons,o.skin=s.skin,o.meshes=s.meshes,delete o.instanceSkin)}}function te$p(e){var t=e.animations,i=e.accessors,n=e.bufferViews,r=e.buffers,o={},a=new o$1p,s=new n$15;for(var l in t)if(Object.prototype.hasOwnProperty.call(t,l)){var u=t[l],c=u.channels,h=u.parameters,d=u.samplers;if(e$2e(c))for(var f=c.length,p=0;p<f;++p){var _=c[p];if("rotation"===_.target.path){var m=h[d[_.sampler].output];if(e$2e(o[m]))continue;o[m]=!0;for(var g=i[m],x=n[g.bufferView],y=r[x.buffer].extras._pipeline.source,v=y.byteOffset+x.byteOffset+g.byteOffset,$=g.componentType,b=g.count,T=r$B(g.type),C=g.count*T,S=S$14.createArrayBufferView($,y.buffer,v,C),w=0;w<b;w++){var E=w*T;o$1p.unpack(S,E,a);var P=S[E+3];n$15.fromAxisAngle(a,P,s),n$15.pack(s,S,E)}}}}}function ae$l(e){var t=e.techniques;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.passes;if(e$2e(r)){var o=u$Z(n.pass,"defaultPass");if(Object.prototype.hasOwnProperty.call(r,o)){var a=r[o],s=a.instanceProgram;n.attributes=u$Z(n.attributes,s.attributes),n.program=u$Z(n.program,s.program),n.uniforms=u$Z(n.uniforms,s.uniforms),n.states=u$Z(n.states,a.states)}delete n.passes,delete n.pass}}}function se$k(e){e$2e(e.asset)||(e.asset={});var t=e.asset;if(t.version="1.0","string"==typeof t.profile){var i=t.profile.split(" ");t.profile={api:i[0],version:i[1]}}else t.profile={};if(e$2e(e.version)&&delete e.version,F$E(e),ie$n(e),ne$p(e),te$p(e),ae$l(e),e$2e(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions),e$2e(e.lights)){var n=u$Z(e.extensions,{});e.extensions=n;var r=u$Z(n.KHR_materials_common,{});n.KHR_materials_common=r,r.lights=e.lights,delete e.lights,i$D(e,"KHR_materials_common")}}function oe$j(e){var t=e.animations;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.parameters;if(e$2e(r)){var o=n.samplers;for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)){var s=o[a];s.input=r[s.input],s.output=r[s.output]}delete n.parameters}}}function K$y(e,t){var i=[];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];t[n]=i.length,i.push(r),e$2e(r.name)||(r.name=n)}return i}function fe$k(e){var t,i,n={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}},r={},o=e.nodes;for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e$2e(i=o[a].jointName)&&(r[i]=a));for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&e$2e(n[s])){var l={},u=e[s];e[s]=K$y(u,l),n[s]=l}for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&(r[i]=n.nodes[r[i]]);e$2e(e.scene)&&(e.scene=n.scenes[e.scene]),e$L.bufferView(e,(function(e){e$2e(e.buffer)&&(e.buffer=n.buffers[e.buffer])})),e$L.accessor(e,(function(e){e$2e(e.bufferView)&&(e.bufferView=n.bufferViews[e.bufferView])})),e$L.shader(e,(function(e){var t=e.extensions;if(e$2e(t)){var i=t.KHR_binary_glTF;e$2e(i)&&(e.bufferView=n.bufferViews[i.bufferView],delete t.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}})),e$L.program(e,(function(e){e$2e(e.vertexShader)&&(e.vertexShader=n.shaders[e.vertexShader]),e$2e(e.fragmentShader)&&(e.fragmentShader=n.shaders[e.fragmentShader])})),e$L.technique(e,(function(e){e$2e(e.program)&&(e.program=n.programs[e.program]),e$L.techniqueParameter(e,(function(e){e$2e(e.node)&&(e.node=n.nodes[e.node]);var t=e.value;"string"==typeof t&&(e.value={index:n.textures[t]})}))})),e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$2e(e.indices)&&(e.indices=n.accessors[e.indices]),e$L.meshPrimitiveAttribute(e,(function(t,i){e.attributes[i]=n.accessors[t]})),e$2e(e.material)&&(e.material=n.materials[e.material])}))})),e$L.node(e,(function(i){var r=i.children;if(e$2e(r)){var o=r.length;for(t=0;t<o;++t)r[t]=n.nodes[r[t]]}if(e$2e(i.meshes)){var a=i.meshes,s=a.length;if(s>0)for(i.mesh=n.meshes[a[0]],t=1;t<s;++t){var l={mesh:n.meshes[a[t]]},u=d$P(e.nodes,l);e$2e(r)||(r=[],i.children=r),r.push(u)}delete i.meshes}if(e$2e(i.camera)&&(i.camera=n.cameras[i.camera]),e$2e(i.skin)&&(i.skin=n.skins[i.skin]),e$2e(i.skeletons)){var c=i.skeletons;if(c.length>0&&e$2e(i.skin))e.skins[i.skin].skeleton=n.nodes[c[0]];delete i.skeletons}e$2e(i.jointName)&&delete i.jointName})),e$L.skin(e,(function(e){e$2e(e.inverseBindMatrices)&&(e.inverseBindMatrices=n.accessors[e.inverseBindMatrices]);var i=e.jointNames;if(e$2e(i)){var o=[],a=i.length;for(t=0;t<a;++t)o[t]=r[i[t]];e.joints=o,delete e.jointNames}})),e$L.scene(e,(function(e){var i=e.nodes;if(e$2e(i)){var r=i.length;for(t=0;t<r;++t)i[t]=n.nodes[i[t]]}})),e$L.animation(e,(function(e){var t={};e.samplers=K$y(e.samplers,t),e$L.animationSampler(e,(function(e){e.input=n.accessors[e.input],e.output=n.accessors[e.output]})),e$L.animationChannel(e,(function(e){e.sampler=t[e.sampler];var i=e.target;e$2e(i)&&(i.node=n.nodes[i.id],delete i.id)}))})),e$L.material(e,(function(e){e$2e(e.technique)&&(e.technique=n.techniques[e.technique]),e$L.materialValue(e,(function(t,i){"string"==typeof t&&(e.values[i]={index:n.textures[t]})}));var t=e.extensions;if(e$2e(t)){var i=t.KHR_materials_common;e$2e(i)&&e$L.materialValue(i,(function(e,t){"string"==typeof e&&(i.values[t]={index:n.textures[e]})}))}})),e$L.image(e,(function(e){var t=e.extensions;if(e$2e(t)){var i=t.KHR_binary_glTF;e$2e(i)&&(e.bufferView=n.bufferViews[i.bufferView],e.mimeType=i.mimeType,delete t.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}e$L.compressedImage(e,(function(e){var i=e.extensions;if(e$2e(i)){var r=i.KHR_binary_glTF;e$2e(r)&&(e.bufferView=n.bufferViews[r.bufferView],e.mimeType=r.mimeType,delete i.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}}))})),e$L.texture(e,(function(e){e$2e(e.sampler)&&(e.sampler=n.samplers[e.sampler]),e$2e(e.source)&&(e.source=n.images[e.source])}))}function ue$m(e){e$L.animation(e,(function(e){e$L.animationSampler(e,(function(e){delete e.name}))}))}function ve$i(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];Array.isArray(i)&&0===i.length&&delete e[t]}e$L.node(e,(function(e){e$2e(e.children)&&0===e.children.length&&delete e.children}))}function ce$k(e){var t=e.asset;delete t.profile,delete t.premultipliedAlpha}var me$l={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function pe$m(e){var t=e.extensionsUsed;if(e.extensionsRequired=u$Z(e.extensionsRequired,[]),e$2e(t))for(var i=t.length,n=0;n<i;++n){var r=t[n];e$2e(me$l[r])&&e.extensionsRequired.push(r)}}function be$i(e){e$L.buffer(e,(function(e){delete e.type}))}function he$i(e){e$L.texture(e,(function(e){delete e.format,delete e.internalFormat,delete e.target,delete e.type}))}function ye$d(e){e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$L.meshPrimitiveAttribute(e,(function(t,i){"TEXCOORD"===i?e.attributes.TEXCOORD_0=t:"COLOR"===i&&(e.attributes.COLOR_0=t)})),delete e.attributes.TEXCOORD,delete e.attributes.COLOR}))})),e$L.technique(e,(function(e){e$L.techniqueParameter(e,(function(e){var t=e.semantic;e$2e(t)&&("TEXCOORD"===t?e.semantic="TEXCOORD_0":"COLOR"===t&&(e.semantic="COLOR_0"))}))}))}var Oe$f={POSITION:!0,NORMAL:!0,TANGENT:!0},le$m={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function de$g(e){var t={};e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){for(var i in e$L.meshPrimitiveAttribute(e,(function(e,i){if("_"!==i.charAt(0)){var n=i.search(/_[0-9]+/g),r=i,o="_0";n>=0&&(r=i.substring(0,n),o=i.substring(n));var a,s=le$m[r];e$2e(s)?(a=s+o,t[i]=a):e$2e(Oe$f[r])||(a="_"+i,t[i]=a)}})),t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=e.attributes[i];e$2e(r)&&(delete e.attributes[i],e.attributes[n]=r)}}))})),e$L.technique(e,(function(e){e$L.techniqueParameter(e,(function(e){var i=t[e.semantic];e$2e(i)&&(e.semantic=i)}))}))}function Te$f(e){e$L.camera(e,(function(e){var t=e.perspective;if(e$2e(t)){var i=t.aspectRatio;e$2e(i)&&0===i&&delete t.aspectRatio;var n=t.yfov;e$2e(n)&&0===n&&(t.yfov=1)}}))}function C$D(e,t){return e$2e(t.byteStride)&&0!==t.byteStride?t.byteStride:p$A(e,t)}function we$e(e){e$L.buffer(e,(function(e){e$2e(e.byteLength)||(e.byteLength=e.extras._pipeline.source.length)})),e$L.accessor(e,(function(t){var i=t.bufferView;if(e$2e(i)){var n=e.bufferViews[i],r=C$D(e,t),o=t.byteOffset+t.count*r;n.byteLength=Math.max(u$Z(n.byteLength,0),o)}}))}function xe$e(e){var t,i,n,r=e.bufferViews,o={};e$L.accessorContainingVertexAttributeData(e,(function(t){var i=e.accessors[t];e$2e(i.bufferView)&&(o[i.bufferView]=!0)}));var a={};for(var s in e$L.accessor(e,(function(e){e$2e(e.bufferView)&&(a[e.bufferView]=u$Z(a[e.bufferView],[]),a[e.bufferView].push(e))})),a)if(Object.prototype.hasOwnProperty.call(a,s)){n=r[s];var l=a[s];l.sort((function(e,t){return e.byteOffset-t.byteOffset}));var u=0,c=0,h=l.length;for(t=0;t<h;++t){var d=l[t],f=C$D(e,d),p=d.byteOffset,_=d.count*f;delete d.byteStride;var m=t<h-1;if(f!==(m?C$D(e,l[t+1]):void 0)){var g=l$1f(n,!0);o[s]&&(g.byteStride=f),g.byteOffset+=u,g.byteLength=p+_-u;var x=d$P(r,g);for(i=c;i<=t;++i)(d=l[i]).bufferView=x,d.byteOffset=d.byteOffset-u;u=m?l[t+1].byteOffset:void 0,c=t+1}}}d$L(e,["accessor","bufferView","buffer"])}function Ae$h(e){e$L.accessorWithSemantic(e,"POSITION",(function(t){var i=e.accessors[t];if(!e$2e(i.min)||!e$2e(i.max)){var n=B$y(e,i);i.min=n.min,i.max=n.max}}))}function D$A(e){return(!e$2e(e.children)||0===e.children.length)&&(!e$2e(e.meshes)||0===e.meshes.length)&&!e$2e(e.camera)&&!e$2e(e.skin)&&!e$2e(e.skeletons)&&!e$2e(e.jointName)&&(!e$2e(e.translation)||o$1p.fromArray(e.translation).equals(o$1p.ZERO))&&(!e$2e(e.scale)||o$1p.fromArray(e.scale).equals(new o$1p(1,1,1)))&&(!e$2e(e.rotation)||e$2c.fromArray(e.rotation).equals(new e$2c(0,0,0,1)))&&(!e$2e(e.matrix)||p$1d.fromColumnMajorArray(e.matrix).equals(p$1d.IDENTITY))&&!e$2e(e.extensions)&&!e$2e(e.extras)}function L$G(e,t){e$L.scene(e,(function(e){var i=e.nodes;if(e$2e(i))for(var n=i.length;n>=0;--n)if(i[n]===t)return void i.splice(n,1)})),e$L.node(e,(function(i,n){if(e$2e(i.children)){var r=i.children.indexOf(t);r>-1&&(i.children.splice(r,1),D$A(i)&&L$G(e,n))}})),delete e.nodes[t]}function _e$h(e){return e$L.node(e,(function(t,i){D$A(t)&&L$G(e,i)})),e}function Pe$c(e){e$L.animation(e,(function(t){e$L.animationSampler(t,(function(t){var i=e.accessors[t.input];if(!e$2e(i.min)||!e$2e(i.max)){var n=B$y(e,i);i.min=n.min,i.max=n.max}}))}))}function Re$e(e){e.asset=u$Z(e.asset,{}),e.asset.version="2.0",F$E(e),oe$j(e),_e$h(e),fe$k(e),ue$m(e),ce$k(e),pe$m(e),we$e(e),xe$e(e),Ae$h(e),Pe$c(e),be$i(e),he$i(e),ye$d(e),de$g(e),T$A(e),Te$f(e),R$v(e),R$u(e),ve$i(e)}function t$t(){this.initialized=!1,this.resourcesParsed=!1,this.vertexBuffersToCreate=new r$17,this.indexBuffersToCreate=new r$17,this.buffers={},this.pendingBufferLoads=0,this.programsToCreate=new r$17,this.shaders={},this.pendingShaderLoads=0,this.texturesToCreate=new r$17,this.pendingTextureLoads=0,this.texturesToCreateFromBufferView=new r$17,this.pendingBufferViewToImage=0,this.createSamplers=!0,this.createSkins=!0,this.createRuntimeAnimations=!0,this.createVertexArrays=!0,this.createRenderStates=!0,this.createUniformMaps=!0,this.createRuntimeNodes=!0,this.createdBufferViews={},this.primitivesToDecode=new r$17,this.activeDecodingTasks=0,this.pendingDecodingCache=!1,this.skinnedNodesIds=[]}function s$w(e,t,i){return e.subarray(t,t+i)}t$t.prototype.getBuffer=function(e){return s$w(this.buffers[e.buffer],e.byteOffset,e.byteLength)},t$t.prototype.finishedPendingBufferLoads=function(){return 0===this.pendingBufferLoads},t$t.prototype.finishedBuffersCreation=function(){return 0===this.pendingBufferLoads&&0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length},t$t.prototype.finishedProgramCreation=function(){return 0===this.pendingShaderLoads&&0===this.programsToCreate.length},t$t.prototype.finishedTextureCreation=function(){var e=0===this.pendingTextureLoads,t=0===this.texturesToCreate.length&&0===this.texturesToCreateFromBufferView.length;return e&&t},t$t.prototype.finishedEverythingButTextureCreation=function(){var e=0===this.pendingBufferLoads&&0===this.pendingShaderLoads,t=0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length&&0===this.programsToCreate.length&&0===this.pendingBufferViewToImage;return this.finishedDecoding()&&e&&t},t$t.prototype.finishedDecoding=function(){return 0===this.primitivesToDecode.length&&0===this.activeDecodingTasks&&!this.pendingDecodingCache},t$t.prototype.finished=function(){return this.finishedDecoding()&&this.finishedTextureCreation()&&this.finishedEverythingButTextureCreation()};var s$v={updateForwardAxis:function(e){var t=e.gltf.extras.sourceVersion;(e$2e(t)&&"2.0"!==t||"2.0"!==s$v.getAssetVersion(e.gltf))&&(e._gltfForwardAxis=v$y.X)},getAssetVersion:function(e){return e$2e(e.asset)&&e$2e(e.asset.version)?e.asset.version:"1.0"},splitIncompatibleMaterials:function(e){var t=e.accessors,i=e.materials,n={};return e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){var r,o,a=e.material,s=i[a],l=e.attributes.JOINTS_0;if(e$2e(l)){var u=t[l];r=u.componentType,o=u.type}var c=e$2e(l),h=e$2e(e.attributes.COLOR_0),d=e$2e(e.targets),f=e$2e(e.attributes.NORMAL),p=e$2e(e.attributes.TANGENT),_=e$2e(e.attributes.TEXCOORD_0),m=_&&e$2e(e.attributes.TEXCOORD_1),g=n[a];if(e$2e(g)){if(g.skinning.skinned!==c||g.skinning.type!==o||g.hasVertexColors!==h||g.hasMorphTargets!==d||g.hasNormals!==f||g.hasTangents!==p||g.hasTexCoords!==_||g.hasTexCoord1!==m){var x=l$1f(s,!0);a=d$P(i,x),e.material=a,n[a]={skinning:{skinned:c,componentType:r,type:o},hasVertexColors:h,hasMorphTargets:d,hasNormals:f,hasTangents:p,hasTexCoords:_,hasTexCoord1:m}}}else n[a]={skinning:{skinned:c,componentType:r,type:o},hasVertexColors:h,hasMorphTargets:d,hasNormals:f,hasTangents:p,hasTexCoords:_,hasTexCoord1:m}}))})),n},getShaderVariable:function(e){return"SCALAR"===e?"float":e.toLowerCase()},ModelState:{NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3},getFailedLoadFunction:function(e,t,i){return function(n){e._state=s$v.ModelState.FAILED;var r="Failed to load "+t+": "+i;e$2e(n)&&(r+="\n"+n.message),e._readyPromise.reject(new t$13(r))}},parseBuffers:function(e,t){var i=e._loadResources;e$L.buffer(e.gltf,(function(n,r){if(e$2e(n.extras._pipeline.source))i.buffers[r]=n.extras._pipeline.source;else if(e$2e(t)){var o=e._resource.getDerivedResource({url:n.uri});++i.pendingBufferLoads,o.fetchArrayBuffer().then(t(e,r)).otherwise(s$v.getFailedLoadFunction(e,"buffer",o.url))}}))}},cn$2=new o$1p,fn$2=new o$1p;function vn$2(e,t){return e$L.techniqueAttribute(e,(function(e,i){if(e.semantic===t)return i}))}function _n$2(e,t){var i=e.accessors,n=e.materials,r=e.extensions.KHR_techniques_webgl,o=r.techniques,a=r.programs,s=r.shaders,l=t.targets,u=t.attributes;for(var c in l)if(l.hasOwnProperty(c)){var h=l[c];for(var d in h)"extras"!==d&&(u[d+"_"+c]=h[d])}var f=o[n[t.material].extensions.KHR_techniques_webgl.technique],p=s[a[f.program].vertexShader];for(var _ in u)if(u.hasOwnProperty(_)&&!e$2e(vn$2(f,_))){var m=i[u[_]],g=_.toLowerCase();"_"===g.charAt(0)&&(g=g.slice(1));var x="a_"+g;f.attributes[x]={semantic:_,type:m.componentType};var y=p.extras._pipeline,v=y.source;v="attribute "+s$v.getShaderVariable(m.type)+" "+x+";\n"+v,y.source=v}}function tn$3(e,t,i,n){return i$E(e,"KHR_techniques_webgl")?function(e,t){if(!(e.semantic!==i||n&&e$2e(e.node)))return t}:function(e,r){var o=t.parameters[e];if(!(o.semantic!==i||n&&e$2e(o.node)))return r}}s$v.computeBoundingSphere=function(e){for(var t=e.gltf,i=t.nodes,n=t.meshes,r=t.scenes[t.scene].nodes,o=r.length,a=[],s=new o$1p(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),l=new o$1p(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),u=0;u<o;++u){var c=i[r[u]];for(c._transformToRoot=s$v.getTransform(c),a.push(c);a.length>0;){var h=(c=a.pop())._transformToRoot,d=c.mesh;if(e$2e(d))for(var f=n[d].primitives,p=f.length,_=0;_<p;++_){var m=f[_].attributes.POSITION;if(e$2e(m)){var g=s$v.getAccessorMinMax(t,m),x=o$1p.fromArray(g.min,0,cn$2),y=o$1p.fromArray(g.max,0,fn$2);e$2e(s)&&e$2e(l)&&(p$1d.multiplyByPoint(h,x,x),p$1d.multiplyByPoint(h,y,y),o$1p.minimumByComponent(s,x,s),o$1p.maximumByComponent(l,y,l))}}var v=c.children;if(e$2e(v))for(var $=v.length,b=0;b<$;++b){var T=i[v[b]];T._transformToRoot=s$v.getTransform(T),p$1d.multiplyTransformation(h,T._transformToRoot,T._transformToRoot),a.push(T)}delete c._transformToRoot}}var C=i$1d.fromCornerPoints(s,l);return e._minCorner=s,e._maxCorner=l,e._forwardAxis===v$y.Z&&i$1d.transformWithoutScale(C,v$y.Z_UP_TO_X_UP,C),e._upAxis===v$y.Y?i$1d.transformWithoutScale(C,v$y.Y_UP_TO_Z_UP,C):e._upAxis===v$y.X&&i$1d.transformWithoutScale(C,v$y.X_UP_TO_Z_UP,C),C},s$v.ensureSemanticExistence=function(e){return e$L.mesh(e,(function(t){e$L.meshPrimitive(t,(function(t){_n$2(e,t)}))})),e},s$v.createAttributeLocations=function(e,t){var i={},n=!1,r=1;if(e$L.techniqueAttribute(e,(function(e,t){/pos/i.test(t)&&!n?(i[t]=0,n=!0):i[t]=r++})),e$2e(t))for(var o in t)t.hasOwnProperty(o)&&(i[o]=r++);return i},s$v.getAccessorMinMax=function(e,t){var i=e.accessors[t],n=i.extensions,r=i.min,o=i.max;if(e$2e(n)){var a=n.WEB3D_quantized_attributes;e$2e(a)&&(r=a.decodedMin,o=a.decodedMax)}return{min:r,max:o}},s$v.getAttributeOrUniformBySemantic=function(e,t,i,n){return e$L.technique(e,(function(r){if(!e$2e(i)||r.program===i){var o=e$L.techniqueAttribute(r,tn$3(e,r,t,n));return e$2e(o)?o:e$L.techniqueUniform(r,tn$3(e,r,t,n))}}))},s$v.getDiffuseAttributeOrUniform=function(e,t){var i=s$v.getAttributeOrUniformBySemantic(e,"COLOR_0",t);return e$2e(i)||(i=s$v.getAttributeOrUniformBySemantic(e,"_3DTILESDIFFUSE",t)),i};var ln$2=new o$1p,mn$2=new n$15,hn$2=new o$1p;function N$t(e,t,i){t+="(?!\\w)",t=new RegExp(t,"g");var n=e.search(t);return e.replace(t,(function(e,t){return n===t?e:i}))}function En$2(e,t){var i=e.accessors[t].extensions;if(e$2e(i))return i.WEB3D_quantized_attributes}function on$2(e,t,i){var n=t.material,r=e.materials[n];if(i$E(e,"KHR_techniques_webgl")&&e$2e(r.extensions)&&e$2e(r.extensions.KHR_techniques_webgl)){var o=r.extensions.KHR_techniques_webgl.technique,a=e.extensions.KHR_techniques_webgl.techniques[o];return e$L.techniqueAttribute(a,(function(e,t){if(e.semantic===i)return t}))}}function D$z(e){var t={value:e,clone:function(e,t){return e},func:function(){return t.value}};return t}function K$x(e){var t={value:o$1o.fromArray(e),clone:o$1o.clone,func:function(){return t.value}};return t}function X$v(e){var t={value:o$1p.fromArray(e),clone:o$1p.clone,func:function(){return t.value}};return t}function d$K(e){var t={value:e$2c.fromArray(e),clone:e$2c.clone,func:function(){return t.value}};return t}function Y$t(e){var t={value:f$15.fromColumnMajorArray(e),clone:f$15.clone,func:function(){return t.value}};return t}function Z$y(e){var t={value:p$1e.fromColumnMajorArray(e),clone:p$1e.clone,func:function(){return t.value}};return t}function G$D(e){var t={value:p$1d.fromColumnMajorArray(e),clone:p$1d.clone,func:function(){return t.value}};return t}s$v.getTransform=function(e,t){return e$2e(e.matrix)?p$1d.fromColumnMajorArray(e.matrix,t):p$1d.fromTranslationQuaternionRotationScale(o$1p.fromArray(e.translation,0,ln$2),n$15.unpack(e.rotation,0,mn$2),o$1p.fromArray(e.scale,0,hn$2),t)},s$v.getUsedExtensions=function(e){var t=e.extensionsUsed,i={};if(e$2e(t))for(var n=t.length,r=0;r<n;r++){i[t[r]]=!0}return i},s$v.getRequiredExtensions=function(e){var t=e.extensionsRequired,i={};if(e$2e(t))for(var n=t.length,r=0;r<n;r++){i[t[r]]=!0}return i},s$v.supportedExtensions={AGI_articulations:!0,CESIUM_RTC:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_binary_glTF:!0,KHR_draco_mesh_compression:!0,KHR_materials_common:!0,KHR_techniques_webgl:!0,KHR_materials_unlit:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_texture_transform:!0,WEB3D_quantized_attributes:!0},s$v.checkSupportedExtensions=function(e,t){for(var i in e)if(e.hasOwnProperty(i)){if(!s$v.supportedExtensions[i])throw new t$13("Unsupported glTF Extension: "+i);if("EXT_texture_webp"===i&&!1===t)throw new t$13("Loaded model requires WebP but browser does not support it.")}},s$v.checkSupportedGlExtensions=function(e,t){if(e$2e(e))for(var i=e.length,n=0;n<i;n++){var r=e[n];if("OES_element_index_uint"!==r)throw new t$13("Unsupported WebGL Extension: "+r);if(!t.elementIndexUint)throw new t$13("OES_element_index_uint WebGL extension is not enabled.")}},s$v.modifyShaderForDracoQuantizedAttributes=function(e,t,i,n){var r={};for(var o in n)if(n.hasOwnProperty(o)){var a=n[o],s=a.quantization;if(!e$2e(s))continue;var l=on$2(e,t,o);"_"===o.charAt(0)&&(o=o.substring(1));var u="gltf_u_dec_"+o.toLowerCase();if(!e$2e(r[u])){var c,h="gltf_decoded_"+o,d=l.replace("a_","gltf_a_dec_"),f=a.componentsPerAttribute;i=N$t(i,l,d),i=(c=s.octEncoded?"vec3":f>1?"vec"+f:"float")+" "+d+";\n"+i;var p=3===f&&"COLOR_0"===o;p&&(i=N$t(i,d,"vec4("+d+", 1.0)"));var _="";if(s.octEncoded){var m=u+"_rangeConstant";i="uniform float "+m+";\n"+i,_="\nvoid main() {\n "+d+" = czm_octDecode("+l+".xy, "+m+").zxy;\n "+h+"();\n}\n"}else{var g=u+"_normConstant",x=u+"_min";i="uniform float "+g+";\nuniform "+c+" "+x+";\n"+i,_="\nvoid main() {\n "+d+" = "+x+" + "+l+(p?".xyz":"")+" * "+g+";\n "+h+"();\n}\n"}i=s$V.replaceMain(i,h),i+=_}}return{shader:i}},s$v.modifyShaderForQuantizedAttributes=function(e,t,i){var n={},r=t.attributes;for(var o in r)if(r.hasOwnProperty(o)){var a=on$2(e,t,o),s=t.attributes[o];"_"===o.charAt(0)&&(o=o.substring(1));var l="gltf_u_dec_"+o.toLowerCase(),u=l+"_scale",c=l+"_translate";if(!e$2e(n[l])&&!e$2e(n[u])){var h=En$2(e,s);if(e$2e(h)){var d,f=h.decodeMatrix,p="gltf_decoded_"+o,_=a.replace("a_","gltf_a_dec_"),m=Math.floor(Math.sqrt(f.length));i=(d=m>2?"vec"+(m-1):"float")+" "+_+";\n"+(i=N$t(i,a,_));var g="";5===m?(i="uniform vec4 "+c+";\n"+(i="uniform mat4 "+u+";\n"+i),g="\nvoid main() {\n "+_+" = "+u+" * "+a+" + "+c+";\n "+p+"();\n}\n",n[u]={mat:4},n[c]={vec:4}):(i="uniform mat"+m+" "+l+";\n"+i,g="\nvoid main() {\n "+_+" = "+d+"("+l+" * vec"+m+"("+a+",1.0));\n "+p+"();\n}\n",n[l]={mat:m}),i=s$V.replaceMain(i,p),i+=g}}}return{shader:i,uniforms:n}},s$v.toClipCoordinatesGLSL=function(e,t){var i=s$v.getAttributeOrUniformBySemantic(e,"POSITION"),n=i.replace("a_","gltf_a_dec_");-1!==t.indexOf(n)&&(i=n);var r=s$v.getAttributeOrUniformBySemantic(e,"MODELVIEWPROJECTION",void 0,!0);if(!e$2e(r)||-1===t.indexOf(r)){var o=s$v.getAttributeOrUniformBySemantic(e,"PROJECTION",void 0,!0),a=s$v.getAttributeOrUniformBySemantic(e,"MODELVIEW",void 0,!0);-1!==t.indexOf("czm_instanced_modelView ")?a="czm_instanced_modelView":e$2e(a)||(a=s$v.getAttributeOrUniformBySemantic(e,"CESIUM_RTC_MODELVIEW",void 0,!0)),r=o+" * "+a}return r+" * vec4("+i+".xyz, 1.0)"},s$v.modifyFragmentShaderForLogDepth=function(e){return e=s$V.replaceMain(e,"czm_depth_main"),e+="\nvoid main() \n{ \n czm_depth_main(); \n czm_writeLogDepth(); \n} \n"},s$v.modifyVertexShaderForLogDepth=function(e,t){return e=s$V.replaceMain(e,"czm_depth_main"),e+="\nvoid main() \n{ \n czm_depth_main(); \n czm_vertexLogDepth("+t+"); \n} \n"};var R$t=new e$2c;function un$2(e){var t={value:e,clone:e$2c.clone,func:function(){var e=performance.now()/1e3,i=t.value[4];if(i>0){var n=e%i;R$t.x=n*t.value[0]+t.value[1],R$t.y=n*t.value[2]+t.value[3]}else R$t.x=t.value[1],R$t.y=t.value[3];var r=t.value[9];if(r>0){var o=e%r;R$t.z=o*t.value[5]+t.value[6],R$t.w=o*t.value[7]+t.value[8]}else R$t.z=t.value[6],R$t.w=t.value[8];return R$t}};return t}function j$y(e,t,i){this._value=void 0,this._textureId=e.index,this._textures=t,this._defaultTexture=i}function pn$2(e,t,i){var n=new j$y(e,t,i);return n.func=function(){return n.value._texture?n.value:i},n}Object.defineProperties(j$y.prototype,{value:{get:function(){if(!e$2e(this._value)){var e=this._textures[this._textureId];if(!e$2e(e))return this._defaultTexture;this._value=e}return this._value},set:function(e){this._value=e}}}),j$y.prototype.clone=function(e){return e},j$y.prototype.func=void 0;var A$H={};A$H[de$y.FLOAT]=D$z,A$H[de$y.FLOAT_VEC2]=K$x,A$H[de$y.FLOAT_VEC3]=X$v,A$H[de$y.FLOAT_VEC4]=d$K,A$H[de$y.INT]=D$z,A$H[de$y.INT_VEC2]=K$x,A$H[de$y.INT_VEC3]=X$v,A$H[de$y.INT_VEC4]=d$K,A$H[de$y.BOOL]=D$z,A$H[de$y.BOOL_VEC2]=K$x,A$H[de$y.BOOL_VEC3]=X$v,A$H[de$y.BOOL_VEC4]=d$K,A$H[de$y.FLOAT_MAT2]=Y$t,A$H[de$y.FLOAT_MAT3]=Z$y,A$H[de$y.FLOAT_MAT4]=G$D,A$H[de$y.SAMPLER_2D]=pn$2;var z$y={};function gn$2(e){return[e[0],e[1],e[2],e[3],e[5],e[6],e[7],e[8],e[10],e[11],e[12],e[13],e[15],e[16],e[17],e[18]]}function On$2(e){return[e[20],e[21],e[22],e[23]]}z$y[ie$p.BASECOLOR_UV_OFFSET_AND_TILING]=un$2,z$y[ie$p.EMISSIVE_UV_OFFSET_AND_TILING]=un$2,s$v.createUniformFunction=function(e,t,i,n,r){return e$2e(r)?z$y[r](t,i,n):A$H[e](t,i,n)},s$v.createUniformsForDracoQuantizedAttributes=function(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i],r=n.quantization;if(!e$2e(r))continue;"_"===i.charAt(0)&&(i=i.substring(1));var o="gltf_u_dec_"+i.toLowerCase();if(r.octEncoded){var a=o+"_rangeConstant",s=(1<<r.quantizationBits)-1;t[a]=D$z(s).func;continue}var l=o+"_normConstant",u=r.range/(1<<r.quantizationBits);t[l]=D$z(u).func;var c=o+"_min";switch(n.componentsPerAttribute){case 1:t[c]=D$z(r.minValues).func;break;case 2:t[c]=K$x(r.minValues).func;break;case 3:t[c]=X$v(r.minValues).func;break;case 4:t[c]=d$K(r.minValues).func}}return t},s$v.createUniformsForQuantizedAttributes=function(e,t,i){var n=e.accessors,r={},o={},a=t.attributes;for(var s in a)if(a.hasOwnProperty(s)){var l=n[a[s]],u=l.extensions;if("_"===s.charAt(0)&&(s=s.substring(1)),e$2e(u)){var c=u.WEB3D_quantized_attributes;if(e$2e(c)){var h=c.decodeMatrix,d="gltf_u_dec_"+s.toLowerCase();switch(l.type){case Q$z.SCALAR:o[d]=Y$t(h).func,r[d]=!0;break;case Q$z.VEC2:o[d]=Z$y(h).func,r[d]=!0;break;case Q$z.VEC3:o[d]=G$D(h).func,r[d]=!0;break;case Q$z.VEC4:var f=d+"_scale",p=d+"_translate";o[f]=G$D(gn$2(h)).func,o[p]=d$K(On$2(h)).func,r[f]=!0,r[p]=!0}}}}for(var _ in i)if(i.hasOwnProperty(_)&&!r[_]){var m=i[_];e$2e(m.mat)&&(2===m.mat?o[_]=Y$t(f$15.IDENTITY).func:3===m.mat?o[_]=Z$y(p$1e.IDENTITY).func:4===m.mat&&(o[_]=G$D(p$1d.IDENTITY).func)),e$2e(m.vec)&&4===m.vec&&(o[_]=d$K([0,0,0,0]).func)}return o};var B$x=new o$1p,Tn$2={MODEL:function(e,t){return function(){return e.model}},VIEW:function(e,t){return function(){return e.view}},PROJECTION:function(e,t){return function(){return e.projection}},MODELVIEW:function(e,t){return function(){return e.modelView}},CESIUM_RTC_MODELVIEW:function(e,t){var i=new p$1d;return function(){return e$2e(t._rtcCenter)?(p$1d.getTranslation(e.model,B$x),o$1p.add(B$x,t._rtcCenter,B$x),p$1d.multiplyByPoint(e.view,B$x,B$x),p$1d.setTranslation(e.modelView,B$x,i)):e.modelView}},MODELVIEWPROJECTION:function(e,t){return function(){return e.modelViewProjection}},MODELINVERSE:function(e,t){return function(){return e.inverseModel}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t){return function(){return e.inverseModelView}},MODELVIEWPROJECTIONINVERSE:function(e,t){return function(){return e.inverseModelViewProjection}},MODELINVERSETRANSPOSE:function(e,t){return function(){return e.inverseTransposeModel}},MODELVIEWINVERSETRANSPOSE:function(e,t){return function(){return e.normal}},VIEWPORT:function(e,t){return function(){return e.viewportCartesian4}}};function ue$l(e,t){if(t=u$Z(t,{}),e$2e(e)&&i$E(e,"KHR_materials_common")){i$E(e,"KHR_techniques_webgl")||(e$2e(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl"));var i=e.extensions.KHR_techniques_webgl;le$l(e);var n=ve$h(e),r=s$v.splitIncompatibleMaterials(e),o={},a=!1;return e$L.material(e,(function(s,l){if(e$2e(s.extensions)&&e$2e(s.extensions.KHR_materials_common)){var u=s.extensions.KHR_materials_common,c=r[l],h=_e$g(u,c),d=o[h];e$2e(d)||(d=fe$j(e,i,c,u,n,t.addBatchIdToGeneratedShaders),o[h]=d,a=!0);var f={},p=u.values;for(var _ in p)p.hasOwnProperty(_)&&"transparent"!==_&&"doubleSided"!==_&&(f["u_"+_.toLowerCase()]=p[_]);s.extensions.KHR_techniques_webgl={technique:d,values:f},s.alphaMode="OPAQUE",u.transparent&&(s.alphaMode="BLEND"),u.doubleSided&&(s.doubleSided=!0)}})),a&&s$v.ensureSemanticExistence(e),e}}function ve$h(e){var t,i={};if(e$2e(e.extensions)&&e$2e(e.extensions.KHR_materials_common)&&(t=e.extensions.KHR_materials_common.lights),e$2e(t)){var n=e.nodes;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];if(e$2e(o.extensions)&&e$2e(o.extensions.KHR_materials_common)){var a=o.extensions.KHR_materials_common.light;e$2e(a)&&e$2e(t[a])&&(t[a].node=r),delete o.extensions.KHR_materials_common}}var s=0;for(var l in t)if(t.hasOwnProperty(l)){var u=t[l],c=u.type;if("ambient"!==c&&!e$2e(u.node)){delete t[l];continue}var h="light"+s.toString();switch(u.baseName=h,c){case"ambient":var d=u.ambient;i[h+"Color"]={type:de$y.FLOAT_VEC3,value:d.color};break;case"directional":var f=u.directional;i[h+"Color"]={type:de$y.FLOAT_VEC3,value:f.color},e$2e(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$y.FLOAT_MAT4});break;case"point":var p=u.point;i[h+"Color"]={type:de$y.FLOAT_VEC3,value:p.color},e$2e(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$y.FLOAT_MAT4}),i[h+"Attenuation"]={type:de$y.FLOAT_VEC3,value:[p.constantAttenuation,p.linearAttenuation,p.quadraticAttenuation]};break;case"spot":var _=u.spot;i[h+"Color"]={type:de$y.FLOAT_VEC3,value:_.color},e$2e(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$y.FLOAT_MAT4},i[h+"InverseTransform"]={node:u.node,semantic:"MODELVIEWINVERSE",type:de$y.FLOAT_MAT4,useInFragment:!0}),i[h+"Attenuation"]={type:de$y.FLOAT_VEC3,value:[_.constantAttenuation,_.linearAttenuation,_.quadraticAttenuation]},i[h+"FallOff"]={type:de$y.FLOAT_VEC2,value:[_.fallOffAngle,_.fallOffExponent]}}++s}}return i}function fe$j(e,t,i,n,r,o){e$2e(n)||(n={}),o=u$Z(o,!1);var a,s=t.techniques,l=t.shaders,u=t.programs,c=n.technique.toUpperCase();e$2e(e.extensions)&&e$2e(e.extensions.KHR_materials_common)&&(a=e.extensions.KHR_materials_common.lights);var h,d=n.values,f=u$Z(n.jointCount,0),p=!1,_=!1;e$2e(i)&&(p=(h=i.skinning).skinned,_=i.hasVertexColors);var m="precision highp float;\n",g="precision highp float;\n",x="CONSTANT"!==c,y={u_modelViewMatrix:{semantic:i$E(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:de$y.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:de$y.FLOAT_MAT4}};x&&(y.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:de$y.FLOAT_MAT3}),p&&(y.u_jointMatrix={count:f,semantic:"JOINTMATRIX",type:de$y.FLOAT_MAT4});var v,$=!1;for(var b in d)if(d.hasOwnProperty(b)&&"transparent"!==b&&"doubleSided"!==b){var T=ne$o(b,d[b]);v="u_"+b.toLowerCase(),!$&&T===de$y.SAMPLER_2D&&($=!0),y[v]={type:T}}if(e$2e(y.u_diffuse)&&(y.u_diffuse.semantic="_3DTILESDIFFUSE"),e$2e(r))for(var C in r)r.hasOwnProperty(C)&&(y[v="u_"+C]=r[C]);for(v in y)if(y.hasOwnProperty(v)){var S=y[v],w=e$2e(S.count)?"["+S.count+"]":"";S.type!==de$y.FLOAT_MAT3&&S.type!==de$y.FLOAT_MAT4||S.useInFragment?(g+="uniform "+t$w(S.type)+" "+v+w+";\n",delete S.useInFragment):m+="uniform "+t$w(S.type)+" "+v+w+";\n"}var E="";if(p){var P,A,L=r$B(h.type),M=!1;if(0===h.type.indexOf("MAT")&&(M=!0,L=Math.sqrt(L)),M)for(P=0;P<L;P++)for(A=0;A<L;A++)E+=0===P&&0===A?" mat4 skinMat = ":" skinMat += ",E+="a_weight["+P+"]["+A+"] * u_jointMatrix[int(a_joint["+P+"]["+A+"])];\n";else for(P=0;P<L;P++)E+=0===P?" mat4 skinMat = ":" skinMat += ",E+="a_weight["+P+"] * u_jointMatrix[int(a_joint["+P+"])];\n"}var R,O={a_position:{semantic:"POSITION"}};if(m+="attribute vec3 a_position;\n",m+="varying vec3 v_positionEC;\n",E+=p?" vec4 pos = u_modelViewMatrix * skinMat * vec4(a_position,1.0);\n":" vec4 pos = u_modelViewMatrix * vec4(a_position,1.0);\n",E+=" v_positionEC = pos.xyz;\n",E+=" gl_Position = u_projectionMatrix * pos;\n",g+="varying vec3 v_positionEC;\n",x&&(O.a_normal={semantic:"NORMAL"},m+="attribute vec3 a_normal;\n",m+="varying vec3 v_normal;\n",E+=p?" v_normal = u_normalMatrix * mat3(skinMat) * a_normal;\n":" v_normal = u_normalMatrix * a_normal;\n",g+="varying vec3 v_normal;\n"),$&&(O.a_texcoord_0={semantic:"TEXCOORD_0"},m+="attribute vec2 a_texcoord_0;\n",m+="varying vec2 "+(R="v_texcoord_0")+";\n",E+=" "+R+" = a_texcoord_0;\n",g+="varying vec2 "+R+";\n"),p){var D=s$v.getShaderVariable(h.type);O.a_joint={semantic:"JOINT"},O.a_weight={semantic:"WEIGHT"},m+="attribute "+D+" a_joint;\n",m+="attribute "+D+" a_weight;\n"}_&&(O.a_vertexColor={semantic:"COLOR_0"},m+="attribute vec4 a_vertexColor;\n",m+="varying vec4 v_vertexColor;\n",E+=" v_vertexColor = a_vertexColor;\n",g+="varying vec4 v_vertexColor;\n"),o&&(O.a_batchId={semantic:"_BATCHID"},m+="attribute float a_batchId;\n");var I=x&&("BLINN"===c||"PHONG"===c)&&e$2e(y.u_specular)&&e$2e(y.u_shininess)&&y.u_shininess>0,F=!1,B=!1,N="";for(var G in a)if(a.hasOwnProperty(G)){var z=a[G],U=z.type.toLowerCase(),V=z.baseName;N+=" {\n";var k,W,H="u_"+V+"Color";"ambient"===U?(B=!0,N+=" ambientLight += "+H+";\n"):x&&(F=!0,k="v_"+V+"Direction",W="v_"+V+"Position","point"!==U&&(m+="varying vec3 "+k+";\n",g+="varying vec3 "+k+";\n",E+=" "+k+" = mat3(u_"+V+"Transform) * vec3(0.,0.,1.);\n","directional"===U&&(N+=" vec3 l = normalize("+k+");\n")),"directional"!==U?(m+="varying vec3 "+W+";\n",g+="varying vec3 "+W+";\n",E+=" "+W+" = u_"+V+"Transform[3].xyz;\n",N+=" vec3 VP = "+W+" - v_positionEC;\n",N+=" vec3 l = normalize(VP);\n",N+=" float range = length(VP);\n",N+=" float attenuation = 1.0 / (u_"+V+"Attenuation.x + ",N+="(u_"+V+"Attenuation.y * range) + ",N+="(u_"+V+"Attenuation.z * range * range));\n"):N+=" float attenuation = 1.0;\n","spot"===U&&(N+=" float spotDot = dot(l, normalize("+k+"));\n",N+=" if (spotDot < cos(u_"+V+"FallOff.x * 0.5))\n",N+=" {\n",N+=" attenuation = 0.0;\n",N+=" }\n",N+=" else\n",N+=" {\n",N+=" attenuation *= max(0.0, pow(spotDot, u_"+V+"FallOff.y));\n",N+=" }\n"),N+=" diffuseLight += "+H+"* max(dot(normal,l), 0.) * attenuation;\n",I&&("BLINN"===c?(N+=" vec3 h = normalize(l + viewDir);\n",N+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess)) * attenuation;\n"):(N+=" vec3 reflectDir = reflect(-l, normal);\n",N+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess)) * attenuation;\n"),N+=" specularLight += "+H+" * specularIntensity;\n")),N+=" }\n"}if(B||(N+=" ambientLight += vec3(0.2, 0.2, 0.2);\n"),!F&&"CONSTANT"!==c){N+=" vec3 l = normalize(czm_sunDirectionEC);\n";N+=" diffuseLight += vec3(1.0, 1.0, 1.0) * max(dot(normal,l), 0.2);\n",I&&("BLINN"===c?(N+=" vec3 h = normalize(l + viewDir);\n",N+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess));\n"):(N+=" vec3 reflectDir = reflect(-l, normal);\n",N+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess));\n"),N+=" specularLight += vec3(1.0, 1.0, 1.0) * specularIntensity;\n")}m+="void main(void) {\n",m+=E,m+="}\n",g+="void main(void) {\n";var q,j=" vec3 color = vec3(0.0, 0.0, 0.0);\n";x&&(g+=" vec3 normal = normalize(v_normal);\n",n.doubleSided&&(g+=" if (gl_FrontFacing == false)\n",g+=" {\n",g+=" normal = -normal;\n",g+=" }\n")),"CONSTANT"!==c?(e$2e(y.u_diffuse)&&(y.u_diffuse.type===de$y.SAMPLER_2D?g+=" vec4 diffuse = texture2D(u_diffuse, "+R+");\n":g+=" vec4 diffuse = u_diffuse;\n",g+=" vec3 diffuseLight = vec3(0.0, 0.0, 0.0);\n",j+=" color += diffuse.rgb * diffuseLight;\n"),I&&(y.u_specular.type===de$y.SAMPLER_2D?g+=" vec3 specular = texture2D(u_specular, "+R+").rgb;\n":g+=" vec3 specular = u_specular.rgb;\n",g+=" vec3 specularLight = vec3(0.0, 0.0, 0.0);\n",j+=" color += specular * specularLight;\n"),q=e$2e(y.u_transparency)?" gl_FragColor = vec4(color * diffuse.a * u_transparency, diffuse.a * u_transparency);\n":" gl_FragColor = vec4(color * diffuse.a, diffuse.a);\n"):q=e$2e(y.u_transparency)?" gl_FragColor = vec4(color * u_transparency, u_transparency);\n":" gl_FragColor = vec4(color, 1.0);\n",_&&(j+=" color *= v_vertexColor.rgb;\n"),e$2e(y.u_emission)&&(y.u_emission.type===de$y.SAMPLER_2D?g+=" vec3 emission = texture2D(u_emission, "+R+").rgb;\n":g+=" vec3 emission = u_emission.rgb;\n",j+=" color += emission;\n"),(e$2e(y.u_ambient)||"CONSTANT"!==c)&&(e$2e(y.u_ambient)?y.u_ambient.type===de$y.SAMPLER_2D?g+=" vec3 ambient = texture2D(u_ambient, "+R+").rgb;\n":g+=" vec3 ambient = u_ambient.rgb;\n":g+=" vec3 ambient = diffuse.rgb;\n",j+=" color += ambient * ambientLight;\n"),g+=" vec3 viewDir = -normalize(v_positionEC);\n",g+=" vec3 ambientLight = vec3(0.0, 0.0, 0.0);\n",g+=N,g+=j,g+=q,g+="}\n";var X=d$P(l,{type:de$y.VERTEX_SHADER,extras:{_pipeline:{source:m,extension:".glsl"}}}),Y=d$P(l,{type:de$y.FRAGMENT_SHADER,extras:{_pipeline:{source:g,extension:".glsl"}}}),Z=d$P(u,{fragmentShader:Y,vertexShader:X});return d$P(s,{attributes:O,program:Z,uniforms:y})}function ne$o(e,t){var i;switch(i=e$2e(t.value)?t.value:e$2e(t.index)?[t.index]:t,e){case"ambient":case"diffuse":case"emission":case"specular":return 1===i.length?de$y.SAMPLER_2D:de$y.FLOAT_VEC4;case"shininess":case"transparency":return de$y.FLOAT;case"transparent":case"doubleSided":return de$y.BOOL}}function _e$g(e,t){var i="";i+="technique:"+e.technique+";";for(var n=e.values,r=Object.keys(n).sort(),o=r.length,a=0;a<o;++a){var s=r[a];n.hasOwnProperty(s)&&(i+=s+":"+ne$o(s,n[s]),i+=";")}var l=u$Z(e.jointCount,0);if(i+=l.toString()+";",e$2e(t)){var u=t.skinning;l>0&&(i+=u.type+";"),i+=t.hasVertexColors}return i}function le$l(e){var t=e.extensions.KHR_materials_common;if(e$2e(t)&&e$2e(t.lights))for(var i=t.lights,n=i.length,r=0;r<n;r++){var o=i[r];if("ambient"===o.type){e$2e(o.ambient)||(o.ambient={});var a=o.ambient;e$2e(a.color)||(a.color=[1,1,1])}else if("directional"===o.type){e$2e(o.directional)||(o.directional={});var s=o.directional;e$2e(s.color)||(s.color=[1,1,1])}else if("point"===o.type){e$2e(o.point)||(o.point={});var l=o.point;e$2e(l.color)||(l.color=[1,1,1]),l.constantAttenuation=u$Z(l.constantAttenuation,1),l.linearAttenuation=u$Z(l.linearAttenuation,0),l.quadraticAttenuation=u$Z(l.quadraticAttenuation,0)}else if("spot"===o.type){e$2e(o.spot)||(o.spot={});var u=o.spot;e$2e(u.color)||(u.color=[1,1,1]),u.constantAttenuation=u$Z(u.constantAttenuation,1),u.fallOffAngle=u$Z(u.fallOffAngle,3.14159265),u.fallOffExponent=u$Z(u.fallOffExponent,0),u.linearAttenuation=u$Z(u.linearAttenuation,0),u.quadraticAttenuation=u$Z(u.quadraticAttenuation,0)}}}function he$h(e,t){if(t=u$Z(t,{}),i$E(e,"KHR_techniques_webgl")||!e$2e(e.materials)||0===e.materials.length)return e;e$2e(e.extensions)||(e.extensions={}),e$2e(e.extensionsUsed)||(e.extensionsUsed=[]),e$2e(e.extensionsRequired)||(e.extensionsRequired=[]),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl");var i=s$v.splitIncompatibleMaterials(e);return e$L.material(e,(function(n,r){var o={},a=xe$d(e,n,r,o,i,t);e$2e(n.extensions)||(n.extensions={}),n.extensions.KHR_techniques_webgl={values:o,technique:a}})),s$v.ensureSemanticExistence(e),e}function pe$l(e){return e$2e(e.extensions)&&e$2e(e.extensions.KHR_materials_pbrSpecularGlossiness)}function ge$g(e){return e$2e(e.textureMotion)}function te$o(e,t,i){var n=0,r=0,o=0,a=0,s=0,l=0,u=0,c=0,h=0;e.hasOwnProperty("start")&&(n+=e.start[0],o+=e.start[1]),e.hasOwnProperty("range")&&(n+=e.range[0],r=e.range[1],o+=e.range[2],a=e.range[3],c=e.range[0],h=e.range[2]),e.hasOwnProperty("speed")&&0!=e.speed&&(s=(r-c)/(u=1/e.speed),l=(a-h)/u),t[i]=s,t[i+1]=n,t[i+2]=l,t[i+3]=o,t[i+4]=u}function se$j(e,t,i,n){i[n]=[0,0,0,0,1,0,1,0,1,1],e$2e(e)&&te$o(e,i[n],0),e$2e(t)&&te$o(t,i[n],5)}function me$k(e,t){var i=e.textureMotion;(i.hasOwnProperty("baseColorTextureScroll")||i.hasOwnProperty("baseColorTextureScale"))&&se$j(i.baseColorTextureScroll,i.baseColorTextureScale,t,"u_baseColorUVOffsetAndTiling"),(i.hasOwnProperty("emissiveTextureScroll")||i.hasOwnProperty("emissiveTextureScale"))&&se$j(i.emissiveTextureScroll,i.emissiveTextureScale,t,"u_emissiveUVOffsetAndTiling")}function xe$d(e,t,i,n,r,o){var a,s,l=u$Z(o.addBatchIdToGeneratedShaders,!1),u=e.extensions.KHR_techniques_webgl,c=u.techniques,h=u.shaders,d=u.programs,f=pe$l(t),p=ge$g(t),_=t.pbrMetallicRoughness;if(e$2e(_)&&!f)for(s in _)_.hasOwnProperty(s)&&(n[a="u_"+s]=_[s]);if(f){var m=t.extensions.KHR_materials_pbrSpecularGlossiness;for(s in m)m.hasOwnProperty(s)&&(n[a="u_"+s]=m[s])}for(var g in p&&me$k(t,n),t)t.hasOwnProperty(g)&&(g.indexOf("Texture")>=0||g.indexOf("Factor")>=0)&&(n[a="u_"+g]=t[g]);var x,y="precision highp float;\n",v="precision highp float;\n";e$2e(e.skins)&&(x=e.skins[0]);var $,b,T=e$2e(x)?x.joints:[],C=T.length,S=r[i],w=!1,E=!1,P=!1,A=!1,L=!1,M=!1,R=!1;e$2e(S)&&(w=($=S.skinning).skinned&&T.length>0,E=S.hasVertexColors,P=S.hasMorphTargets,A=S.hasNormals,L=S.hasTangents,M=S.hasTexCoords),P&&e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){if(e.material===i){var t=e.targets;e$2e(t)&&(b=t)}}))}));var O={u_modelViewMatrix:{semantic:i$E(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:de$y.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:de$y.FLOAT_MAT4}};e$2e(t.extensions)&&e$2e(t.extensions.KHR_materials_unlit)&&(R=!0,A=!1,L=!1),A&&(O.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:de$y.FLOAT_MAT3}),w&&(O.u_jointMatrix={count:C,semantic:"JOINTMATRIX",type:de$y.FLOAT_MAT4}),P&&(O.u_morphWeights={count:b.length,semantic:"MORPHWEIGHTS",type:de$y.FLOAT});var D=t.alphaMode;for(a in e$2e(D)&&"MASK"===D&&(O.u_alphaCutoff={semantic:"ALPHACUTOFF",type:de$y.FLOAT}),n)n.hasOwnProperty(a)&&(O[a]={type:Te$e(a),extensionType:Ce$b(a)});var I=u$Z(O.u_baseColorTexture,O.u_baseColorFactor);for(a in e$2e(I)&&(I.semantic="_3DTILESDIFFUSE"),O)if(O.hasOwnProperty(a)){var F=O[a],B=e$2e(F.count)?"["+F.count+"]":"";F.type!==de$y.FLOAT_MAT3&&F.type!==de$y.FLOAT_MAT4&&"u_morphWeights"!==a||F.useInFragment?(v+="uniform "+t$w(F.type)+" "+a+B+";\n",delete F.useInFragment):y+="uniform "+t$w(F.type)+" "+a+B+";\n"}var N="";if(w){var G,z,U=r$B($.type),V=!1;if(0===$.type.indexOf("MAT")&&(V=!0,U=Math.sqrt(U)),V)for(G=0;G<U;G++)for(z=0;z<U;z++)N+=0===G&&0===z?" mat4 skinMatrix = ":" skinMatrix += ",N+="a_weight["+G+"]["+z+"] * u_jointMatrix[int(a_joint["+G+"]["+z+"])];\n";else for(G=0;G<U;G++)N+=0===G?" mat4 skinMatrix = ":" skinMatrix += ",N+="a_weight["+G+"] * u_jointMatrix[int(a_joint["+G+"])];\n"}var k,W={a_position:{semantic:"POSITION"}};if(y+="attribute vec3 a_position;\n",A&&(y+="varying vec3 v_positionEC;\n",y+="varying vec3 v_positionWC;\n"),N+=" vec3 weightedPosition = a_position;\n",A&&(N+=" vec3 weightedNormal = a_normal;\n"),L&&(N+=" vec4 weightedTangent = a_tangent;\n"),P)for(var H=0;H<b.length;H++){var q=b[H];for(var j in q)if(q.hasOwnProperty(j)&&"extras"!==j){var X="a_"+j+"_"+H;W[X]={semantic:j+"_"+H},y+="attribute vec3 "+X+";\n","POSITION"===j?N+=" weightedPosition += u_morphWeights["+H+"] * "+X+";\n":"NORMAL"===j?N+=" weightedNormal += u_morphWeights["+H+"] * "+X+";\n":L&&"TANGENT"===j&&(N+=" weightedTangent.xyz += u_morphWeights["+H+"] * "+X+";\n")}}if(N+=w?" vec4 position = skinMatrix * vec4(weightedPosition, 1.0);\n":" vec4 position = vec4(weightedPosition, 1.0);\n",A&&(N+=" v_positionWC = (czm_model * position).xyz;\n"),N+=" position = u_modelViewMatrix * position;\n",A&&(N+=" v_positionEC = position.xyz;\n"),N+=" gl_Position = u_projectionMatrix * position;\n",A&&(W.a_normal={semantic:"NORMAL"},y+="attribute vec3 a_normal;\n",y+="varying vec3 v_normal;\n",N+=w?" v_normal = u_normalMatrix * mat3(skinMatrix) * weightedNormal;\n":" v_normal = u_normalMatrix * weightedNormal;\n",v+="varying vec3 v_normal;\n",v+="varying vec3 v_positionEC;\n",v+="varying vec3 v_positionWC;\n"),L&&(W.a_tangent={semantic:"TANGENT"},y+="attribute vec4 a_tangent;\n",y+="varying vec4 v_tangent;\n",N+=" v_tangent.xyz = u_normalMatrix * weightedTangent.xyz;\n",N+=" v_tangent.w = weightedTangent.w;\n",v+="varying vec4 v_tangent;\n"),M&&(W.a_texcoord_0={semantic:"TEXCOORD_0"},y+="attribute vec2 a_texcoord_0;\n",y+="varying vec2 "+(k="v_texcoord_0")+";\n",N+=" "+k+" = a_texcoord_0;\n",v+="varying vec2 "+k+";\n"),w){var Y=s$v.getShaderVariable($.type);W.a_joint={semantic:"JOINTS_0"},W.a_weight={semantic:"WEIGHTS_0"},y+="attribute "+Y+" a_joint;\n",y+="attribute "+Y+" a_weight;\n"}E&&(W.a_vertexColor={semantic:"COLOR_0"},y+="attribute vec4 a_vertexColor;\n",y+="varying vec4 v_vertexColor;\n",N+=" v_vertexColor = a_vertexColor;\n",v+="varying vec4 v_vertexColor;\n"),l&&(W.a_batchId={semantic:"_BATCHID"},y+="attribute float a_batchId;\n"),y+="void main(void) \n{\n",y+=N,y+="}\n",A&&(v+="const float M_PI = 3.141592653589793;\n",v+="vec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\n\n",v+="vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\n\n",v+="vec3 fresnelSchlick(float metalness, float VdotH) \n{\n return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n}\n\n",v+="vec3 F_Schlick(float ndv, vec3 spec) \n{\n return spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n}\n\n",v+="float D_Phong(float g, float ndh) \n{\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\n",v+="float smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\n",v+="float smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\n\n",v+="float GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\n\n",v+="void getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm) \n{\n vec3 h = normalize(viewDir + lightDir);\n float NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\n float NdotH = clamp(dot(normal, h), 0.0, 1.0);\n vec3 li = lightColor * NdotL;\n diffuseTerm = li;\n specularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n}\n\n"),v+="vec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\n",v+="vec4 SRGBtoLINEAR4(vec4 srgbIn) \n{\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\n",v+="vec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR \n return czm_acesTonemapping(linearIn);\n#else \n return linearIn;\n#endif \n}\n\n",v+="vec3 LINEARtoSRGB(vec3 linearIn) \n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else \n return linearIn;\n#endif \n}\n\n",v+="float calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent) \n{\n return pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n}\n\n",v+="#ifdef USE_IBL_LIGHTING \n",v+="uniform vec2 gltf_iblFactor; \n",v+="#endif \n",v+="#ifdef USE_CUSTOM_LIGHT_COLOR \n",v+="uniform vec3 gltf_lightColor; \n",v+="#endif \n",v+="void main(void) \n{\n",A&&(v+=" vec3 ng = normalize(v_normal);\n",e$2e(n.u_normalTexture)?L?(v+=" vec3 t = normalize(v_tangent.xyz);\n",v+=" vec3 b = normalize(cross(ng, t) * v_tangent.w);\n",v+=" mat3 tbn = mat3(t, b, ng);\n",v+=" vec3 n = texture2D(u_normalTexture, "+k+").rgb;\n",v+=" n = normalize(tbn * (2.0 * n - 1.0));\n"):(v="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"+v,v+="#ifdef GL_OES_standard_derivatives\n",v+=" vec3 pos_dx = dFdx(v_positionEC);\n",v+=" vec3 pos_dy = dFdy(v_positionEC);\n",v+=" vec3 tex_dx = dFdx(vec3("+k+",0.0));\n",v+=" vec3 tex_dy = dFdy(vec3("+k+",0.0));\n",v+=" vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n",v+=" t = normalize(t - ng * dot(ng, t));\n",v+=" vec3 b = normalize(cross(ng, t));\n",v+=" mat3 tbn = mat3(t, b, ng);\n",v+=" vec3 n = texture2D(u_normalTexture, "+k+").rgb;\n",v+=" n = normalize(tbn * (2.0 * n - 1.0));\n",v+="#else\n",v+=" vec3 n = ng;\n",v+="#endif\n"):v+=" vec3 n = ng;\n",t.doubleSided&&(v+=" if (!gl_FrontFacing)\n",v+=" {\n",v+=" n = -n;\n",v+=" }\n")),e$2e(n.u_baseColorTexture)?(v+=" vec2 uvOffset = vec2(0.0);\n",v+=" vec2 uvTiling = vec2(1.0);\n",e$2e(n.u_baseColorUVOffsetAndTiling)&&(v+=" uvOffset = u_baseColorUVOffsetAndTiling.xy;\n",v+=" uvTiling = u_baseColorUVOffsetAndTiling.zw;\n"),v+=" vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, "+k+" * uvTiling.xy + uvOffset.xy));\n",e$2e(n.u_baseColorFactor)&&(v+=" baseColorWithAlpha *= u_baseColorFactor;\n")):e$2e(n.u_baseColorFactor)?v+=" vec4 baseColorWithAlpha = u_baseColorFactor;\n":v+=" vec4 baseColorWithAlpha = vec4(1.0);\n",E&&(v+=" baseColorWithAlpha *= v_vertexColor;\n"),v+=" vec3 baseColor = baseColorWithAlpha.rgb;\n",A?(f?(e$2e(n.u_specularGlossinessTexture)?(v+=" vec4 specularGlossiness = SRGBtoLINEAR4(texture2D(u_specularGlossinessTexture, "+k+"));\n",v+=" vec3 specular = specularGlossiness.rgb;\n",v+=" float glossiness = specularGlossiness.a;\n",e$2e(n.u_specularFactor)&&(v+=" specular *= u_specularFactor;\n"),e$2e(n.u_glossinessFactor)&&(v+=" glossiness *= u_glossinessFactor;\n")):(e$2e(n.u_specularFactor)?v+=" vec3 specular = clamp(u_specularFactor, vec3(0.0), vec3(1.0));\n":v+=" vec3 specular = vec3(1.0);\n",e$2e(n.u_glossinessFactor)?v+=" float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);\n":v+=" float glossiness = 1.0;\n"),e$2e(n.u_diffuseTexture)?(e$2e(n.u_diffuseTextureUVSpeedFactor)?v+=" vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, "+k+" + u_diffuseTextureUVSpeedFactor.xy));\n":v+=" vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, "+k+"));\n",e$2e(n.u_diffuseFactor)&&(v+=" diffuse *= u_diffuseFactor;\n")):e$2e(n.u_diffuseFactor)?v+=" vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));\n":v+=" vec4 diffuse = vec4(1.0);\n"):e$2e(n.u_metallicRoughnessTexture)?(v+=" vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, "+k+").rgb;\n",v+=" float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n",v+=" float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n",e$2e(n.u_metallicFactor)&&(v+=" metalness *= u_metallicFactor;\n"),e$2e(n.u_roughnessFactor)&&(v+=" roughness *= u_roughnessFactor;\n")):(e$2e(n.u_metallicFactor)?v+=" float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n":v+=" float metalness = 1.0;\n",e$2e(n.u_roughnessFactor)?v+=" float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n":v+=" float roughness = 1.0;\n"),v+=" vec3 v = -normalize(v_positionEC);\n",f?(v+=" float roughness = 1.0 - glossiness;\n",v+=" vec3 diffuseColor = diffuse.rgb * (1.0 - max(max(specular.r, specular.g), specular.b));\n",v+=" vec3 specularColor = specular;\n"):(v+=" vec3 f0 = vec3(0.04);\n",v+=" vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n",v+=" vec3 specularColor = mix(f0, baseColor, metalness);\n"),v+=" float NdotV = abs(dot(n, v)) + 0.001;\n",v+=" vec3 diffuseTerm = vec3(0.0);\n",v+=" vec3 specularTerm = vec3(0.0);\n",v+=" vec3 fresnelTerm = F_Schlick(NdotV, specularColor);\n",v+=" vec3 color = vec3(0.0);\n",v+="#if DIR_LIGHTS > 0 \n",v+=" for (int i = 0; i < DIR_LIGHTS; i++) { \n",v+=" vec3 lightDiffuseTerm = vec3(0.0);\n",v+=" vec3 lightSpecularTerm = vec3(0.0);\n",v+=" getLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",v+=" diffuseTerm +=lightDiffuseTerm;\n",v+=" specularTerm += lightSpecularTerm;\n",v+=" } \n",v+="#endif \n",v+="#if POINT_LIGHTS > 0 \n",v+=" for (int i = 0; i < POINT_LIGHTS; i++) { \n",v+=" vec3 lVector = uPointLightPositionEC[i] - v_positionEC;\n",v+=" float lightDistance = length(lVector);\n",v+=" float lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\n",v+=" if(lightAttenuation < 0.001) {\n",v+=" continue;}\n",v+=" vec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\n",v+=" vec3 lightDiffuseTerm = vec3(0.0);\n",v+=" vec3 lightSpecularTerm = vec3(0.0);\n",v+=" getLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",v+=" diffuseTerm +=lightDiffuseTerm;\n",v+=" specularTerm += lightSpecularTerm;\n",v+=" }\n",v+="#endif \n",v+="#if SPOT_LIGHTS > 0 \n",v+=" for (int i = 0; i < SPOT_LIGHTS; i++) { \n",v+=" vec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\n",v+=" float lightDistance = length(lVector);\n",v+=" float lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\n",v+=" if(lightAttenuation < 0.001) {\n",v+=" continue;}\n",v+=" float spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\n",v+=" if(spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z) {\n",v+=" vec3 spotLightColor = uSpotLightColorAndExponent[i].xyz * lightAttenuation * spotEffect;\n",v+=" vec3 lightDiffuseTerm = vec3(0.0);\n",v+=" vec3 lightSpecularTerm = vec3(0.0);\n",v+=" getLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",v+=" diffuseTerm +=lightDiffuseTerm;\n",v+=" specularTerm += lightSpecularTerm;\n",v+=" }\n",v+=" }\n",v+="#endif \n",v+=" color = baseColor; \n",v+=" color *= max(diffuseTerm, vec3(0.0)); \n",v+=" color += max(specularTerm, vec3(0.0)); \n",v+="#ifndef USE_CUSTOM_LIGHT_COLOR \n",v+=" vec3 lightColorHdr = czm_lightColorHdr;\n",v+="#else \n",v+=" vec3 lightColorHdr = gltf_lightColor;\n",v+="#endif \n",v+=" vec3 l = normalize(czm_lightDirectionEC);\n",v+=" vec3 h = normalize(v + l);\n",v+=" float NdotL = clamp(dot(n, l), 0.001, 1.0);\n",v+=" float NdotH = clamp(dot(n, h), 0.0, 1.0);\n",v+=" float LdotH = clamp(dot(l, h), 0.0, 1.0);\n",v+=" float VdotH = clamp(dot(v, h), 0.0, 1.0);\n",v+=" float alpha = roughness * roughness;\n",v+=" float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n",v+=" vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n",v+=" vec3 r0 = specularColor.rgb;\n",v+=" vec3 F = fresnelSchlick2(r0, r90, VdotH);\n",v+=" float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n",v+=" float D = GGX(alpha, NdotH);\n",v+=" vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n",v+=" vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n",v+=" color += NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n",v+="#if defined(USE_IBL_LIGHTING) && !defined(DIFFUSE_IBL) && !defined(SPECULAR_IBL) \n",v+=" vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n",v+=" czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n",v+=" float vertexRadius = length(v_positionWC);\n",v+=" float horizonDotNadir = 1.0 - min(1.0, ellipsoid.radii.x / vertexRadius);\n",v+=" float reflectionDotNadir = dot(r, normalize(v_positionWC));\n",v+=" r.x = -r.x;\n",v+=" r = -normalize(czm_temeToPseudoFixed * r);\n",v+=" r.x = -r.x;\n",v+=" float inverseRoughness = 1.04 - roughness;\n",v+=" inverseRoughness *= inverseRoughness;\n",v+=" vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n",v+=" float atmosphereHeight = 0.05;\n",v+=" float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n",v+=" float blendRegionOffset = roughness * -1.0;\n",v+=" float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n",v+=" float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n",v+=" float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n",v+=" float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n",v+=" vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n",v+=" vec3 nadirColor = belowHorizonColor * 0.5;\n",v+=" vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n",v+=" vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n",v+=" vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n",v+=" vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n",v+=" float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n",v+=" float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n",v+=" vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n",v+=" float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n",v+=" vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n",v+=" specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n",v+=" specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n",v+="#ifdef USE_SUN_LUMINANCE \n",v+=" float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(v_positionWC * -1.0)), 0.001, 1.0);\n",v+=" float S = acos(LdotZenith);\n",v+=" float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(v_positionWC * -1.0)), 0.001, 1.0);\n",v+=" float sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\n",v+=" float gamma = acos(sunNdotL);\n",v+=" float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n",v+=" float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n",v+=" float luminance = gltf_luminanceAtZenith * (numerator / denominator);\n",v+="#endif \n",v+=" vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",v+=" vec3 IBLColor = (diffuseIrradiance * diffuseColor * gltf_iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * gltf_iblFactor.y);\n",v+="#ifdef USE_SUN_LUMINANCE \n",v+=" color += IBLColor * luminance;\n",v+="#else \n",v+=" color += IBLColor; \n",v+="#endif \n",v+="#elif defined(DIFFUSE_IBL) || defined(SPECULAR_IBL) \n",v+=" mat3 fixedToENU = mat3(gltf_clippingPlanesMatrix[0][0], gltf_clippingPlanesMatrix[1][0], gltf_clippingPlanesMatrix[2][0], \n",v+=" gltf_clippingPlanesMatrix[0][1], gltf_clippingPlanesMatrix[1][1], gltf_clippingPlanesMatrix[2][1], \n",v+=" gltf_clippingPlanesMatrix[0][2], gltf_clippingPlanesMatrix[1][2], gltf_clippingPlanesMatrix[2][2]); \n",v+=" const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0); \n",v+=" vec3 cubeDir = normalize(yUpToZUp * fixedToENU * normalize(reflect(-v, n))); \n",v+="#ifdef DIFFUSE_IBL \n",v+="#ifdef CUSTOM_SPHERICAL_HARMONICS \n",v+=" vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, gltf_sphericalHarmonicCoefficients); \n",v+="#else \n",v+=" vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients); \n",v+="#endif \n",v+="#else \n",v+=" vec3 diffuseIrradiance = vec3(0.0); \n",v+="#endif \n",v+="#ifdef SPECULAR_IBL \n",v+=" vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",v+="#ifdef CUSTOM_SPECULAR_IBL \n",v+=" vec3 specularIBL = czm_sampleOctahedralProjection(gltf_specularMap, gltf_specularMapSize, cubeDir, roughness * gltf_maxSpecularLOD, gltf_maxSpecularLOD);\n",v+="#else \n",v+=" vec3 specularIBL = czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, czm_specularEnvironmentMapSize, cubeDir, roughness * czm_specularEnvironmentMapsMaximumLOD, czm_specularEnvironmentMapsMaximumLOD);\n",v+="#endif \n",v+=" specularIBL *= F * brdfLut.x + brdfLut.y;\n",v+="#else \n",v+=" vec3 specularIBL = vec3(0.0); \n",v+="#endif \n",v+=" color += diffuseIrradiance * diffuseColor + specularColor * specularIBL;\n",v+="#endif \n"):v+=" vec3 color = baseColor;\n",R||(e$2e(n.u_occlusionTexture)&&(v+=" color *= texture2D(u_occlusionTexture, "+k+").r;\n"),e$2e(n.u_emissiveTexture)?(v+=" vec2 uvEmissiveOffset = vec2(0.0);\n",v+=" vec2 uvEmissiveTiling = vec2(1.0);\n",e$2e(n.u_emissiveUVOffsetAndTiling)&&(v+=" uvEmissiveOffset = u_emissiveUVOffsetAndTiling.xy;\n",v+=" uvEmissiveTiling = u_emissiveUVOffsetAndTiling.zw;\n"),v+=" vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, "+k+"* uvEmissiveTiling.xy + uvEmissiveOffset.xy).rgb);\n",e$2e(n.u_emissiveFactor)&&(v+=" emissive *= u_emissiveFactor;\n"),v+=" color += emissive;\n"):e$2e(n.u_emissiveFactor)&&(v+=" color += u_emissiveFactor;\n")),R||(v+=" color = applyTonemapping(color);\n"),v+=" color = LINEARtoSRGB(color);\n",e$2e(D)?"MASK"===D?(v+=" if (baseColorWithAlpha.a < u_alphaCutoff) {\n",v+=" discard;\n",v+=" }\n",v+=" gl_FragColor = vec4(color, 1.0);\n"):v+="BLEND"===D?" gl_FragColor = vec4(color, baseColorWithAlpha.a);\n":" gl_FragColor = vec4(color, 1.0);\n":v+=" gl_FragColor = vec4(color, 1.0);\n",v+="}\n";var Z=d$P(h,{type:de$y.VERTEX_SHADER,extras:{_pipeline:{source:y,extension:".glsl"}}}),K=d$P(h,{type:de$y.FRAGMENT_SHADER,extras:{_pipeline:{source:v,extension:".glsl"}}}),Q=d$P(d,{fragmentShader:K,vertexShader:Z});return d$P(c,{attributes:W,program:Q,uniforms:O})}function Te$e(e){switch(e){case"u_baseColorFactor":case"u_baseColorUVOffsetAndTiling":case"u_emissiveUVOffsetAndTiling":case"u_diffuseFactor":return de$y.FLOAT_VEC4;case"u_metallicFactor":case"u_roughnessFactor":case"u_glossinessFactor":return de$y.FLOAT;case"u_baseColorTexture":case"u_metallicRoughnessTexture":case"u_normalTexture":case"u_occlusionTexture":case"u_emissiveTexture":case"u_diffuseTexture":case"u_specularGlossinessTexture":return de$y.SAMPLER_2D;case"u_emissiveFactor":case"u_specularFactor":return de$y.FLOAT_VEC3}return-1!==e.indexOf("Offset")?de$y.FLOAT_VEC2:-1!==e.indexOf("Rotation")?de$y.FLOAT:-1!==e.indexOf("Scale")?de$y.FLOAT_VEC2:-1!==e.indexOf("Texture")?de$y.SAMPLER_2D:void 0}function Ce$b(e){switch(e){case"u_baseColorUVOffsetAndTiling":return ie$p.BASECOLOR_UV_OFFSET_AND_TILING;case"u_emissiveUVOffsetAndTiling":return ie$p.EMISSIVE_UV_OFFSET_AND_TILING}}function c$x(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}s$v.getGltfSemanticUniforms=function(){return Tn$2};var G$C="attribute vec3 position;\nattribute float a_batchId;\n\nuniform mat4 u_modifiedModelViewProjection;\n\nvoid main()\n{\n gl_Position = czm_depthClampFarPlane(u_modifiedModelViewProjection * vec4(position, 1.0));\n}\n",J$w={};!function(e){var t="Compound",i="MemberExpression",n="Literal",r=function(e,t){var i=new Error(e+" at character "+t);throw i.index=t,i.description=e,i},o=!0,a={"-":o,"!":o,"~":o,"+":o},s={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},l=function(e){var t,i=0;for(var n in e)(t=n.length)>i&&e.hasOwnProperty(n)&&(i=t);return i},u=l(a),c=l(s),h={true:!0,false:!1,null:null},d=function(e){return s[e]||0},f=function(e,t,i){return{type:"||"===e||"&&"===e?"LogicalExpression":"BinaryExpression",operator:e,left:t,right:i}},p=function(e){return e>=48&&e<=57},_=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=128&&!s[String.fromCharCode(e)]},m=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e>=128&&!s[String.fromCharCode(e)]},g=function(e){for(var o,l,g=0,x=e.charAt,y=e.charCodeAt,v=function(t){return x.call(e,t)},$=function(t){return y.call(e,t)},b=e.length,T=function(){for(var e=$(g);32===e||9===e;)e=$(++g)},C=function(){var e,t,i=w();return T(),63!==$(g)?i:(g++,(e=C())||r("Expected expression",g),T(),58===$(g)?(g++,(t=C())||r("Expected expression",g),{type:"ConditionalExpression",test:i,consequent:e,alternate:t}):void r("Expected :",g))},S=function(){T();for(var t=e.substr(g,c),i=t.length;i>0;){if(s.hasOwnProperty(t))return g+=i,t;t=t.substr(0,--i)}return!1},w=function(){var e,t,i,n,o,a,s,l;if(a=E(),!(t=S()))return a;for(o={value:t,prec:d(t)},(s=E())||r("Expected expression after "+t,g),n=[a,o,s];(t=S())&&0!==(i=d(t));){for(o={value:t,prec:i};n.length>2&&i<=n[n.length-2].prec;)s=n.pop(),t=n.pop().value,a=n.pop(),e=f(t,a,s),n.push(e);(e=E())||r("Expected expression after "+t,g),n.push(o,e)}for(e=n[l=n.length-1];l>1;)e=f(n[l-1].value,n[l-2],e),l-=2;return e},E=function(){var t,i,n;if(T(),t=$(g),p(t)||46===t)return P();if(39===t||34===t)return A();if(_(t)||40===t)return R();if(91===t)return D();for(n=(i=e.substr(g,u)).length;n>0;){if(a.hasOwnProperty(i))return g+=n,{type:"UnaryExpression",operator:i,argument:E(),prefix:!0};i=i.substr(0,--n)}return!1},P=function(){for(var e,t,i="";p($(g));)i+=v(g++);if(46===$(g))for(i+=v(g++);p($(g));)i+=v(g++);if("e"===(e=v(g))||"E"===e){for(i+=v(g++),("+"===(e=v(g))||"-"===e)&&(i+=v(g++));p($(g));)i+=v(g++);p($(g-1))||r("Expected exponent ("+i+v(g)+")",g)}return t=$(g),_(t)?r("Variable names cannot start with a number ("+i+v(g)+")",g):46===t&&r("Unexpected period",g),{type:n,value:parseFloat(i),raw:i}},A=function(){for(var e,t="",i=v(g++),o=!1;g<b;){if((e=v(g++))===i){o=!0;break}if("\\"===e)switch(e=v(g++),e){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+="\\"+e}else t+=e}return o||r('Unclosed quote after "'+t+'"',g),{type:n,value:t,raw:i+t+i}},L=function(){var t,i=$(g),o=g;for(_(i)?g++:r("Unexpected "+v(g),g);g<b&&(i=$(g),m(i));)g++;return t=e.slice(o,g),h.hasOwnProperty(t)?{type:n,value:h[t],raw:t}:"this"===t?{type:"ThisExpression"}:{type:"Identifier",name:t}},M=function(e){for(var i,n,o=[],a=!1;g<b;){if(T(),(i=$(g))===e){a=!0,g++;break}44===i?g++:((!(n=C())||n.type===t)&&r("Expected comma",g),o.push(n))}return a||r("Expected "+String.fromCharCode(e),g),o},R=function(){var e,t;for(t=40===(e=$(g))?O():L(),T(),e=$(g);46===e||91===e||40===e;)g++,46===e?(T(),t={type:i,computed:!1,object:t,property:L()}):91===e?(t={type:i,computed:!0,object:t,property:C()},T(),93!==(e=$(g))&&r("Unclosed [",g),g++):40===e&&(t={type:"CallExpression",arguments:M(41),callee:t}),T(),e=$(g);return t},O=function(){g++;var e=C();if(T(),41===$(g))return g++,e;r("Unclosed (",g)},D=function(){return g++,{type:"ArrayExpression",elements:M(93)}},I=[];g<b;)59===(o=$(g))||44===o?g++:(l=C())?I.push(l):g<b&&r('Unexpected "'+v(g)+'"',g);return 1===I.length?I[0]:{type:t,body:I}};g.version="0.3.1",g.toString=function(){return"JavaScript Expression Parser (JSEP) v"+g.version},g.addUnaryOp=function(e){return u=Math.max(e.length,u),a[e]=o,this},g.addBinaryOp=function(e,t){return c=Math.max(e.length,c),s[e]=t,this},g.addLiteral=function(e,t){return h[e]=t,this},g.removeUnaryOp=function(e){return delete a[e],e.length===u&&(u=l(a)),this},g.removeAllUnaryOps=function(){return a={},u=0,this},g.removeBinaryOp=function(e){return delete s[e],e.length===c&&(c=l(s)),this},g.removeAllBinaryOps=function(){return s={},c=0,this},g.removeLiteral=function(e){return delete h[e],this},g.removeAllLiterals=function(){return h={},this},e.jsep=g}(J$w);var q$C=J$w.jsep,L$F={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18},s$u=Object.freeze(L$F);function L$E(e,t){var i;o$1q.typeOf.string("expression",e),this._expression=e,e=fe$i(le$k(e=se$i(e,t))),q$C.addBinaryOp("=~",0),q$C.addBinaryOp("!~",0);try{i=q$C(e)}catch(e){throw new t$13(e)}this._runtimeAst=_$u(this,i)}Object.defineProperties(L$E.prototype,{expression:{get:function(){return this._expression}}});var m$z={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new o$1o],cartesian3Array:[new o$1p],cartesian4Array:[new e$2c],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);var e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new o$1o),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new o$1p),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new e$2c),this.cartesian4Array[this.cartesian4Index++]}};L$E.prototype.evaluate=function(e,t){m$z.reset();var i=this._runtimeAst.evaluate(e);return t instanceof e$1X&&i instanceof e$2c?e$1X.fromCartesian4(i,t):i instanceof o$1o||i instanceof o$1p||i instanceof e$2c?i.clone(t):i},L$E.prototype.evaluateColor=function(e,t){m$z.reset();var i=this._runtimeAst.evaluate(e);return e$1X.fromCartesian4(i,t)},L$E.prototype.getShaderFunction=function(e,t,i,n){var r=this.getShaderExpression(t,i);return r=n+" "+e+"() \n{ \n return "+r+"; \n} \n"},L$E.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};var K$w=["!","-","+"],G$B=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],V$s=/\${(.*?)}/g,J$v=/\\/g,W$C="@#%",Z$x=/@#%/g,T$z=new e$1X,C$C={abs:w$w(Math.abs),sqrt:w$w(Math.sqrt),cos:w$w(Math.cos),sin:w$w(Math.sin),tan:w$w(Math.tan),acos:w$w(Math.acos),asin:w$w(Math.asin),atan:w$w(Math.atan),radians:w$w(e$2d.toRadians),degrees:w$w(e$2d.toDegrees),sign:w$w(e$2d.sign),floor:w$w(Math.floor),ceil:w$w(Math.ceil),round:w$w(Math.round),exp:w$w(Math.exp),exp2:w$w(ee$p),log:w$w(Math.log),log2:w$w(te$n),fract:w$w(Q$y),length:re$r,normalize:ae$k},O$s={atan2:B$w(Math.atan2,!1),pow:B$w(Math.pow,!1),min:B$w(Math.min,!0),max:B$w(Math.max,!0),distance:ne$n,dot:ie$m,cross:ue$k},F$D={clamp:Y$s(e$2d.clamp,!0),mix:Y$s(e$2d.lerp,!0)};function Q$y(e){return e-Math.floor(e)}function ee$p(e){return Math.pow(2,e)}function te$n(e){return e$2d.log2(e)}function w$w(e){return function(t,i){if("number"==typeof i)return e(i);if(i instanceof o$1o)return o$1o.fromElements(e(i.x),e(i.y),m$z.getCartesian2());if(i instanceof o$1p)return o$1p.fromElements(e(i.x),e(i.y),e(i.z),m$z.getCartesian3());if(i instanceof e$2c)return e$2c.fromElements(e(i.x),e(i.y),e(i.z),e(i.w),m$z.getCartesian4());throw new t$13('Function "'+t+'" requires a vector or number argument. Argument is '+i+".")}}function B$w(e,t){return function(i,n,r){if(t&&"number"==typeof r){if("number"==typeof n)return e(n,r);if(n instanceof o$1o)return o$1o.fromElements(e(n.x,r),e(n.y,r),m$z.getCartesian2());if(n instanceof o$1p)return o$1p.fromElements(e(n.x,r),e(n.y,r),e(n.z,r),m$z.getCartesian3());if(n instanceof e$2c)return e$2c.fromElements(e(n.x,r),e(n.y,r),e(n.z,r),e(n.w,r),m$z.getCartesian4())}if("number"==typeof n&&"number"==typeof r)return e(n,r);if(n instanceof o$1o&&r instanceof o$1o)return o$1o.fromElements(e(n.x,r.x),e(n.y,r.y),m$z.getCartesian2());if(n instanceof o$1p&&r instanceof o$1p)return o$1p.fromElements(e(n.x,r.x),e(n.y,r.y),e(n.z,r.z),m$z.getCartesian3());if(n instanceof e$2c&&r instanceof e$2c)return e$2c.fromElements(e(n.x,r.x),e(n.y,r.y),e(n.z,r.z),e(n.w,r.w),m$z.getCartesian4());throw new t$13('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+n+" and "+r+".")}}function Y$s(e,t){return function(i,n,r,o){if(t&&"number"==typeof o){if("number"==typeof n&&"number"==typeof r)return e(n,r,o);if(n instanceof o$1o&&r instanceof o$1o)return o$1o.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),m$z.getCartesian2());if(n instanceof o$1p&&r instanceof o$1p)return o$1p.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),e(n.z,r.z,o),m$z.getCartesian3());if(n instanceof e$2c&&r instanceof e$2c)return e$2c.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),e(n.z,r.z,o),e(n.w,r.w,o),m$z.getCartesian4())}if("number"==typeof n&&"number"==typeof r&&"number"==typeof o)return e(n,r,o);if(n instanceof o$1o&&r instanceof o$1o&&o instanceof o$1o)return o$1o.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),m$z.getCartesian2());if(n instanceof o$1p&&r instanceof o$1p&&o instanceof o$1p)return o$1p.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),e(n.z,r.z,o.z),m$z.getCartesian3());if(n instanceof e$2c&&r instanceof e$2c&&o instanceof e$2c)return e$2c.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),e(n.z,r.z,o.z),e(n.w,r.w,o.w),m$z.getCartesian4());throw new t$13('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+n+", "+r+", and "+o+".")}}function re$r(e,t){if("number"==typeof t)return Math.abs(t);if(t instanceof o$1o)return o$1o.magnitude(t);if(t instanceof o$1p)return o$1p.magnitude(t);if(t instanceof e$2c)return e$2c.magnitude(t);throw new t$13('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function ae$k(e,t){if("number"==typeof t)return 1;if(t instanceof o$1o)return o$1o.normalize(t,m$z.getCartesian2());if(t instanceof o$1p)return o$1p.normalize(t,m$z.getCartesian3());if(t instanceof e$2c)return e$2c.normalize(t,m$z.getCartesian4());throw new t$13('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function ne$n(e,t,i){if("number"==typeof t&&"number"==typeof i)return Math.abs(t-i);if(t instanceof o$1o&&i instanceof o$1o)return o$1o.distance(t,i);if(t instanceof o$1p&&i instanceof o$1p)return o$1p.distance(t,i);if(t instanceof e$2c&&i instanceof e$2c)return e$2c.distance(t,i);throw new t$13('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function ie$m(e,t,i){if("number"==typeof t&&"number"==typeof i)return t*i;if(t instanceof o$1o&&i instanceof o$1o)return o$1o.dot(t,i);if(t instanceof o$1p&&i instanceof o$1p)return o$1p.dot(t,i);if(t instanceof e$2c&&i instanceof e$2c)return e$2c.dot(t,i);throw new t$13('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function ue$k(e,t,i){if(t instanceof o$1p&&i instanceof o$1p)return o$1p.cross(t,i,m$z.getCartesian3());throw new t$13('Function "'+e+'" requires vec3 arguments. Arguments are '+t+" and "+i+".")}function u$B(e,t,i,n,r){this._type=e,this._value=t,this._left=i,this._right=n,this._test=r,this.evaluate=void 0,we$d(this)}function se$i(e,t){if(!e$2e(t))return e;for(var i in t)if(t.hasOwnProperty(i)){var n=new RegExp("\\$\\{"+i+"\\}","g"),r="("+t[i]+")";e$2e(r)&&(e=e.replace(n,r))}return e}function le$k(e){return e.replace(J$v,W$C)}function d$J(e){return e.replace(Z$x,"\\")}function fe$i(e){for(var t=e,i="",n=t.indexOf("${");n>=0;){var r,o=t.indexOf("'"),a=t.indexOf('"');if(o>=0&&o<n)r=t.indexOf("'",o+1),i+=t.substr(0,r+1),n=(t=t.substr(r+1)).indexOf("${");else if(a>=0&&a<n)r=t.indexOf('"',a+1),i+=t.substr(0,r+1),n=(t=t.substr(r+1)).indexOf("${");else{i+=t.substr(0,n);var s=t.indexOf("}");if(s<0)throw new t$13("Unmatched {.");i+="czm_"+t.substr(n+2,s-(n+2)),n=(t=t.substr(s+1)).indexOf("${")}}return i+=t}function oe$i(e){var t=typeof e.value;return null===e.value?new u$B(s$u.LITERAL_NULL,null):"boolean"===t?new u$B(s$u.LITERAL_BOOLEAN,e.value):"number"===t?new u$B(s$u.LITERAL_NUMBER,e.value):"string"===t?e.value.indexOf("${")>=0?new u$B(s$u.VARIABLE_IN_STRING,e.value):new u$B(s$u.LITERAL_STRING,d$J(e.value)):void 0}function ve$g(e,t){var i,n,r,o,a=t.arguments,s=a.length;if("MemberExpression"===t.callee.type){i=t.callee.property.name;var l=t.callee.object;if("test"===i||"exec"===i){if("regExp"!==l.callee.name)throw new t$13(i+" is not a function.");return 0===s?"test"===i?new u$B(s$u.LITERAL_BOOLEAN,!1):new u$B(s$u.LITERAL_NULL,null):(r=_$u(e,l),o=_$u(e,a[0]),new u$B(s$u.FUNCTION_CALL,i,r,o))}if("toString"===i)return n=_$u(e,l),new u$B(s$u.FUNCTION_CALL,i,n);throw new t$13('Unexpected function call "'+i+'".')}if("color"===(i=t.callee.name)){if(0===s)return new u$B(s$u.LITERAL_COLOR,i);if(n=_$u(e,a[0]),e$2e(a[1])){var u=_$u(e,a[1]);return new u$B(s$u.LITERAL_COLOR,i,[n,u])}return new u$B(s$u.LITERAL_COLOR,i,[n])}if("rgb"===i||"hsl"===i){if(s<3)throw new t$13(i+" requires three arguments.");return n=[_$u(e,a[0]),_$u(e,a[1]),_$u(e,a[2])],new u$B(s$u.LITERAL_COLOR,i,n)}if("rgba"===i||"hsla"===i){if(s<4)throw new t$13(i+" requires four arguments.");return n=[_$u(e,a[0]),_$u(e,a[1]),_$u(e,a[2]),_$u(e,a[3])],new u$B(s$u.LITERAL_COLOR,i,n)}if("vec2"===i||"vec3"===i||"vec4"===i){n=new Array(s);for(var c=0;c<s;++c)n[c]=_$u(e,a[c]);return new u$B(s$u.LITERAL_VECTOR,i,n)}if("isNaN"===i||"isFinite"===i)return 0===s?new u$B(s$u.LITERAL_BOOLEAN,"isNaN"===i):(n=_$u(e,a[0]),new u$B(s$u.UNARY,i,n));if("isExactClass"===i||"isClass"===i){if(s<1||s>1)throw new t$13(i+" requires exactly one argument.");return n=_$u(e,a[0]),new u$B(s$u.UNARY,i,n)}if("getExactClassName"===i){if(s>0)throw new t$13(i+" does not take any argument.");return new u$B(s$u.UNARY,i)}if(e$2e(C$C[i])){if(1!==s)throw new t$13(i+" requires exactly one argument.");return n=_$u(e,a[0]),new u$B(s$u.UNARY,i,n)}if(e$2e(O$s[i])){if(2!==s)throw new t$13(i+" requires exactly two arguments.");return r=_$u(e,a[0]),o=_$u(e,a[1]),new u$B(s$u.BINARY,i,r,o)}if(e$2e(F$D[i])){if(3!==s)throw new t$13(i+" requires exactly three arguments.");r=_$u(e,a[0]),o=_$u(e,a[1]);var h=_$u(e,a[2]);return new u$B(s$u.TERNARY,i,r,o,h)}if("Boolean"===i)return 0===s?new u$B(s$u.LITERAL_BOOLEAN,!1):(n=_$u(e,a[0]),new u$B(s$u.UNARY,i,n));if("Number"===i)return 0===s?new u$B(s$u.LITERAL_NUMBER,0):(n=_$u(e,a[0]),new u$B(s$u.UNARY,i,n));if("String"===i)return 0===s?new u$B(s$u.LITERAL_STRING,""):(n=_$u(e,a[0]),new u$B(s$u.UNARY,i,n));if("regExp"===i)return ce$j(e,t);throw new t$13('Unexpected function call "'+i+'".')}function ce$j(e,t){var i=t.arguments;if(0===i.length)return new u$B(s$u.LITERAL_REGEX,new RegExp);var n,r=_$u(e,i[0]);if(i.length>1){var o=_$u(e,i[1]);if(U$y(r)&&U$y(o)){try{n=new RegExp(d$J(String(r._value)),o._value)}catch(e){throw new t$13(e)}return new u$B(s$u.LITERAL_REGEX,n)}return new u$B(s$u.REGEX,r,o)}if(U$y(r)){try{n=new RegExp(d$J(String(r._value)))}catch(e){throw new t$13(e)}return new u$B(s$u.LITERAL_REGEX,n)}return new u$B(s$u.REGEX,r)}function me$j(e){if(ye$c(e.name)){var t=ge$f(e.name);return"tiles3d_"===t.substr(0,8)?new u$B(s$u.BUILTIN_VARIABLE,t):new u$B(s$u.VARIABLE,t)}if("NaN"===e.name)return new u$B(s$u.LITERAL_NUMBER,NaN);if("Infinity"===e.name)return new u$B(s$u.LITERAL_NUMBER,1/0);if("undefined"===e.name)return new u$B(s$u.LITERAL_UNDEFINED,void 0);throw new t$13(e.name+" is not defined.")}function he$g(e){var t=e.property.name;return"PI"===t?new u$B(s$u.LITERAL_NUMBER,Math.PI):"E"===t?new u$B(s$u.LITERAL_NUMBER,Math.E):void 0}function _e$f(e){if("POSITIVE_INFINITY"===e.property.name)return new u$B(s$u.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function pe$k(e,t){if("Math"===t.object.name)return he$g(t);if("Number"===t.object.name)return _e$f(t);var i,n=_$u(e,t.object);return t.computed?(i=_$u(e,t.property),new u$B(s$u.MEMBER,"brackets",n,i)):(i=new u$B(s$u.LITERAL_STRING,t.property.name),new u$B(s$u.MEMBER,"dot",n,i))}function U$y(e){return e._type>=s$u.LITERAL_NULL}function ye$c(e){return"czm_"===e.substr(0,4)}function ge$f(e){return e.substr(4)}function _$u(e,t){var i,n,r,o;if("Literal"===t.type)i=oe$i(t);else if("CallExpression"===t.type)i=ve$g(e,t);else if("Identifier"===t.type)i=me$j(t);else if("UnaryExpression"===t.type){n=t.operator;var a=_$u(e,t.argument);if(!(K$w.indexOf(n)>-1))throw new t$13('Unexpected operator "'+n+'".');i=new u$B(s$u.UNARY,n,a)}else if("BinaryExpression"===t.type){if(n=t.operator,r=_$u(e,t.left),o=_$u(e,t.right),!(G$B.indexOf(n)>-1))throw new t$13('Unexpected operator "'+n+'".');i=new u$B(s$u.BINARY,n,r,o)}else if("LogicalExpression"===t.type)n=t.operator,r=_$u(e,t.left),o=_$u(e,t.right),G$B.indexOf(n)>-1&&(i=new u$B(s$u.BINARY,n,r,o));else if("ConditionalExpression"===t.type){var s=_$u(e,t.test);r=_$u(e,t.consequent),o=_$u(e,t.alternate),i=new u$B(s$u.CONDITIONAL,"?",r,o,s)}else if("MemberExpression"===t.type)i=pe$k(e,t);else{if("ArrayExpression"!==t.type)throw"Compound"===t.type?new t$13("Provide exactly one expression."):new t$13("Cannot parse expression.");for(var l=[],u=0;u<t.elements.length;u++)l[u]=_$u(e,t.elements[u]);i=new u$B(s$u.ARRAY,l)}return i}function we$d(e){e._type===s$u.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===s$u.FUNCTION_CALL?"test"===e._value?e.evaluate=e._evaluateRegExpTest:"exec"===e._value?e.evaluate=e._evaluateRegExpExec:"toString"===e._value&&(e.evaluate=e._evaluateToString):e._type===s$u.UNARY?"!"===e._value?e.evaluate=e._evaluateNot:"-"===e._value?e.evaluate=e._evaluateNegative:"+"===e._value?e.evaluate=e._evaluatePositive:"isNaN"===e._value?e.evaluate=e._evaluateNaN:"isFinite"===e._value?e.evaluate=e._evaluateIsFinite:"isExactClass"===e._value?e.evaluate=e._evaluateIsExactClass:"isClass"===e._value?e.evaluate=e._evaluateIsClass:"getExactClassName"===e._value?e.evaluate=e._evaluateGetExactClassName:"Boolean"===e._value?e.evaluate=e._evaluateBooleanConversion:"Number"===e._value?e.evaluate=e._evaluateNumberConversion:"String"===e._value?e.evaluate=e._evaluateStringConversion:e$2e(C$C[e._value])&&(e.evaluate=Ae$g(e._value)):e._type===s$u.BINARY?"+"===e._value?e.evaluate=e._evaluatePlus:"-"===e._value?e.evaluate=e._evaluateMinus:"*"===e._value?e.evaluate=e._evaluateTimes:"/"===e._value?e.evaluate=e._evaluateDivide:"%"===e._value?e.evaluate=e._evaluateMod:"==="===e._value?e.evaluate=e._evaluateEqualsStrict:"!=="===e._value?e.evaluate=e._evaluateNotEqualsStrict:"<"===e._value?e.evaluate=e._evaluateLessThan:"<="===e._value?e.evaluate=e._evaluateLessThanOrEquals:">"===e._value?e.evaluate=e._evaluateGreaterThan:">="===e._value?e.evaluate=e._evaluateGreaterThanOrEquals:"&&"===e._value?e.evaluate=e._evaluateAnd:"||"===e._value?e.evaluate=e._evaluateOr:"=~"===e._value?e.evaluate=e._evaluateRegExpMatch:"!~"===e._value?e.evaluate=e._evaluateRegExpNotMatch:e$2e(O$s[e._value])&&(e.evaluate=Re$d(e._value)):e._type===s$u.TERNARY?e.evaluate=be$h(e._value):e._type===s$u.MEMBER?"brackets"===e._value?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===s$u.ARRAY?e.evaluate=e._evaluateArray:e._type===s$u.VARIABLE?e.evaluate=e._evaluateVariable:e._type===s$u.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===s$u.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===s$u.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===s$u.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===s$u.REGEX?e.evaluate=e._evaluateRegExp:e._type===s$u.BUILTIN_VARIABLE?"tiles3d_tileset_time"===e._value&&(e.evaluate=Ee$f):e.evaluate=e._evaluateLiteral}function Ee$f(e){return e$2e(e)?e.content.tileset.timeSinceLoad:0}function Ae$g(e){var t=C$C[e];return function(i){var n=this._left.evaluate(i);return t(e,n)}}function Re$d(e){var t=O$s[e];return function(i){var n=this._left.evaluate(i),r=this._right.evaluate(i);return t(e,n,r)}}function be$h(e){var t=F$D[e];return function(i){var n=this._left.evaluate(i),r=this._right.evaluate(i),o=this._test.evaluate(i);return t(e,n,r,o)}}function M$A(e,t){if(e$2e(e))return e.getProperty(t)}function D$y(e){return"feature"===e._value}function k$v(e){for(var t=e._left,i=t.length,n=0;n<i;++n)if(t[n]._type!==s$u.LITERAL_NUMBER)return;var r=t[0]._value,o=t[1]._value,a=t[2]._value,s=4===i?t[3]._value:1;return e$1X.fromHsl(r,o,a,s,T$z)}function P$x(e){for(var t=e._left,i=t.length,n=0;n<i;++n)if(t[n]._type!==s$u.LITERAL_NUMBER)return;var r=T$z;return r.red=t[0]._value/255,r.green=t[1]._value/255,r.blue=t[2]._value/255,r.alpha=4===i?t[3]._value:1,r}function A$G(e){return e%1==0?e.toFixed(1):e.toString()}function Le$h(e){return"vec3("+A$G(e.red)+", "+A$G(e.green)+", "+A$G(e.blue)+")"}function S$v(e){return"vec4("+A$G(e.red)+", "+A$G(e.green)+", "+A$G(e.blue)+", "+A$G(e.alpha)+")"}function X$u(e,t,i,n){for(var r=e.length,o=new Array(r),a=0;a<r;++a)o[a]=e[a].getShaderExpression(t,i,n);return o}u$B.prototype._evaluateLiteral=function(){return this._value},u$B.prototype._evaluateLiteralColor=function(e){var t=T$z,i=this._left;if("color"===this._value)e$2e(i)?i.length>1?(e$1X.fromCssColorString(i[0].evaluate(e),t),t.alpha=i[1].evaluate(e)):e$1X.fromCssColorString(i[0].evaluate(e),t):e$1X.fromBytes(255,255,255,255,t);else if("rgb"===this._value)e$1X.fromBytes(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),255,t);else if("rgba"===this._value){var n=255*i[3].evaluate(e);e$1X.fromBytes(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),n,t)}else"hsl"===this._value?e$1X.fromHsl(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),1,t):"hsla"===this._value&&e$1X.fromHsl(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),i[3].evaluate(e),t);return e$2c.fromColor(t,m$z.getCartesian4())},u$B.prototype._evaluateLiteralVector=function(e){for(var t=m$z.getArray(),i=this._value,n=this._left,r=n.length,o=0;o<r;++o){var a=n[o].evaluate(e);if("number"==typeof a)t.push(a);else if(a instanceof o$1o)t.push(a.x,a.y);else if(a instanceof o$1p)t.push(a.x,a.y,a.z);else{if(!(a instanceof e$2c))throw new t$13(i+" argument must be a vector or number. Argument is "+a+".");t.push(a.x,a.y,a.z,a.w)}}var s=t.length,l=parseInt(i.charAt(3));if(0===s)throw new t$13("Invalid "+i+" constructor. No valid arguments.");if(s<l&&s>1)throw new t$13("Invalid "+i+" constructor. Not enough arguments.");if(s>l&&r>1)throw new t$13("Invalid "+i+" constructor. Too many arguments.");if(1===s){var u=t[0];t.push(u,u,u)}return"vec2"===i?o$1o.fromArray(t,0,m$z.getCartesian2()):"vec3"===i?o$1p.fromArray(t,0,m$z.getCartesian3()):"vec4"===i?e$2c.fromArray(t,0,m$z.getCartesian4()):void 0},u$B.prototype._evaluateLiteralString=function(){return this._value},u$B.prototype._evaluateVariableString=function(e){for(var t=this._value,i=V$s.exec(t);null!==i;){var n=i[0],r=M$A(e,i[1]);e$2e(r)||(r=""),t=t.replace(n,r),i=V$s.exec(t)}return t},u$B.prototype._evaluateVariable=function(e){return M$A(e,this._value)},u$B.prototype._evaluateMemberDot=function(e){if(D$y(this._left))return M$A(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(e$2e(t)){var i=this._right.evaluate(e);if(t instanceof o$1o||t instanceof o$1p||t instanceof e$2c){if("r"===i)return t.x;if("g"===i)return t.y;if("b"===i)return t.z;if("a"===i)return t.w}return t[i]}},u$B.prototype._evaluateMemberBrackets=function(e){if(D$y(this._left))return M$A(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(e$2e(t)){var i=this._right.evaluate(e);if(t instanceof o$1o||t instanceof o$1p||t instanceof e$2c){if(0===i||"r"===i)return t.x;if(1===i||"g"===i)return t.y;if(2===i||"b"===i)return t.z;if(3===i||"a"===i)return t.w}return t[i]}},u$B.prototype._evaluateArray=function(e){for(var t=[],i=0;i<this._value.length;i++)t[i]=this._value[i].evaluate(e);return t},u$B.prototype._evaluateNot=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$13('Operator "!" requires a boolean argument. Argument is '+t+".");return!t},u$B.prototype._evaluateNegative=function(e){var t=this._left.evaluate(e);if(t instanceof o$1o)return o$1o.negate(t,m$z.getCartesian2());if(t instanceof o$1p)return o$1p.negate(t,m$z.getCartesian3());if(t instanceof e$2c)return e$2c.negate(t,m$z.getCartesian4());if("number"==typeof t)return-t;throw new t$13('Operator "-" requires a vector or number argument. Argument is '+t+".")},u$B.prototype._evaluatePositive=function(e){var t=this._left.evaluate(e);if(!(t instanceof o$1o||t instanceof o$1p||t instanceof e$2c||"number"==typeof t))throw new t$13('Operator "+" requires a vector or number argument. Argument is '+t+".");return t},u$B.prototype._evaluateLessThan=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$13('Operator "<" requires number arguments. Arguments are '+t+" and "+i+".");return t<i},u$B.prototype._evaluateLessThanOrEquals=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$13('Operator "<=" requires number arguments. Arguments are '+t+" and "+i+".");return t<=i},u$B.prototype._evaluateGreaterThan=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$13('Operator ">" requires number arguments. Arguments are '+t+" and "+i+".");return t>i},u$B.prototype._evaluateGreaterThanOrEquals=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$13('Operator ">=" requires number arguments. Arguments are '+t+" and "+i+".");return t>=i},u$B.prototype._evaluateOr=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$13('Operator "||" requires boolean arguments. First argument is '+t+".");if(t)return!0;var i=this._right.evaluate(e);if("boolean"!=typeof i)throw new t$13('Operator "||" requires boolean arguments. Second argument is '+i+".");return t||i},u$B.prototype._evaluateAnd=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$13('Operator "&&" requires boolean arguments. First argument is '+t+".");if(!t)return!1;var i=this._right.evaluate(e);if("boolean"!=typeof i)throw new t$13('Operator "&&" requires boolean arguments. Second argument is '+i+".");return t&&i},u$B.prototype._evaluatePlus=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.add(t,i,m$z.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.add(t,i,m$z.getCartesian3());if(i instanceof e$2c&&t instanceof e$2c)return e$2c.add(t,i,m$z.getCartesian4());if("string"==typeof t||"string"==typeof i)return t+i;if("number"==typeof t&&"number"==typeof i)return t+i;throw new t$13('Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateMinus=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.subtract(t,i,m$z.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.subtract(t,i,m$z.getCartesian3());if(i instanceof e$2c&&t instanceof e$2c)return e$2c.subtract(t,i,m$z.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t-i;throw new t$13('Operator "-" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateTimes=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.multiplyComponents(t,i,m$z.getCartesian2());if(i instanceof o$1o&&"number"==typeof t)return o$1o.multiplyByScalar(i,t,m$z.getCartesian2());if(t instanceof o$1o&&"number"==typeof i)return o$1o.multiplyByScalar(t,i,m$z.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.multiplyComponents(t,i,m$z.getCartesian3());if(i instanceof o$1p&&"number"==typeof t)return o$1p.multiplyByScalar(i,t,m$z.getCartesian3());if(t instanceof o$1p&&"number"==typeof i)return o$1p.multiplyByScalar(t,i,m$z.getCartesian3());if(i instanceof e$2c&&t instanceof e$2c)return e$2c.multiplyComponents(t,i,m$z.getCartesian4());if(i instanceof e$2c&&"number"==typeof t)return e$2c.multiplyByScalar(i,t,m$z.getCartesian4());if(t instanceof e$2c&&"number"==typeof i)return e$2c.multiplyByScalar(t,i,m$z.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t*i;throw new t$13('Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateDivide=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.divideComponents(t,i,m$z.getCartesian2());if(t instanceof o$1o&&"number"==typeof i)return o$1o.divideByScalar(t,i,m$z.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.divideComponents(t,i,m$z.getCartesian3());if(t instanceof o$1p&&"number"==typeof i)return o$1p.divideByScalar(t,i,m$z.getCartesian3());if(i instanceof e$2c&&t instanceof e$2c)return e$2c.divideComponents(t,i,m$z.getCartesian4());if(t instanceof e$2c&&"number"==typeof i)return e$2c.divideByScalar(t,i,m$z.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t/i;throw new t$13('Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateMod=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.fromElements(t.x%i.x,t.y%i.y,m$z.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.fromElements(t.x%i.x,t.y%i.y,t.z%i.z,m$z.getCartesian3());if(i instanceof e$2c&&t instanceof e$2c)return e$2c.fromElements(t.x%i.x,t.y%i.y,t.z%i.z,t.w%i.w,m$z.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t%i;throw new t$13('Operator "%" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateEqualsStrict=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);return i instanceof o$1o&&t instanceof o$1o||i instanceof o$1p&&t instanceof o$1p||i instanceof e$2c&&t instanceof e$2c?t.equals(i):("bigint"==typeof t&&(t=Number(t)),t===i)},u$B.prototype._evaluateNotEqualsStrict=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);return i instanceof o$1o&&t instanceof o$1o||i instanceof o$1p&&t instanceof o$1p||i instanceof e$2c&&t instanceof e$2c?!t.equals(i):t!==i},u$B.prototype._evaluateConditional=function(e){var t=this._test.evaluate(e);if("boolean"!=typeof t)throw new t$13("Conditional argument of conditional expression must be a boolean. Argument is "+t+".");return t?this._left.evaluate(e):this._right.evaluate(e)},u$B.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))},u$B.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))},u$B.prototype._evaluateIsExactClass=function(e){return!!e$2e(e)&&e.isExactClass(this._left.evaluate(e))},u$B.prototype._evaluateIsClass=function(e){return!!e$2e(e)&&e.isClass(this._left.evaluate(e))},u$B.prototype._evaluateGetExactClassName=function(e){if(e$2e(e))return e.getExactClassName()},u$B.prototype._evaluateBooleanConversion=function(e){return Boolean(this._left.evaluate(e))},u$B.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))},u$B.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))},u$B.prototype._evaluateRegExp=function(e){var t,i=this._value.evaluate(e),n="";e$2e(this._left)&&(n=this._left.evaluate(e));try{t=new RegExp(i,n)}catch(e){throw new t$13(e)}return t},u$B.prototype._evaluateRegExpTest=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof i))throw new t$13("RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+i+".");return t.test(i)},u$B.prototype._evaluateRegExpMatch=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof i)return t.test(i);if(i instanceof RegExp&&"string"==typeof t)return i.test(t);throw new t$13('Operator "=~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateRegExpNotMatch=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof i)return!t.test(i);if(i instanceof RegExp&&"string"==typeof t)return!i.test(t);throw new t$13('Operator "!~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateRegExpExec=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof i))throw new t$13("RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+i+".");var n=t.exec(i);return e$2e(n)?n[1]:null},u$B.prototype._evaluateToString=function(e){var t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof o$1o||t instanceof o$1p||t instanceof e$2c)return String(t);throw new t$13('Unexpected function call "'+this._value+'".')};var $$y="czm_infinity";function y$y(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=u$Z(e.center,o$1p.ZERO),this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilPreloadPass=void 0,this._rsStencilPreloadPass3DTiles=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=e$1X.clone(e$1X.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=u$Z(e.classificationType,_0x2b86ba.BOTH),this._vertexShaderSource=e._vertexShaderSource,this._fragmentShaderSource=e._fragmentShaderSource,this._attributeLocations=e._attributeLocations,this._uniformMap=e._uniformMap,this._pickId=e._pickId,this._modelMatrix=e._modelMatrix,this._boundingSphere=e._boundingSphere,this._batchIdLookUp={};for(var t=this._batchIds.length,i=0;i<t;++i){var n=this._batchIds[i];this._batchIdLookUp[n]=i}}u$B.prototype.getShaderExpression=function(e,t,i){var n,r,o,a,s=this._type,l=this._value;switch(e$2e(this._left)&&(r=Array.isArray(this._left)?X$u(this._left,e,t,this):this._left.getShaderExpression(e,t,this)),e$2e(this._right)&&(o=this._right.getShaderExpression(e,t,this)),e$2e(this._test)&&(a=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(l=X$u(this._value,e,t,this)),s){case s$u.VARIABLE:return e+l;case s$u.UNARY:if("Boolean"===l)return"bool("+r+")";if("Number"===l)return"float("+r+")";if("round"===l)return"floor("+r+" + 0.5)";if(e$2e(C$C[l]))return l+"("+r+")";if("isNaN"===l)return"("+r+" != "+r+")";if("isFinite"===l)return"(abs("+r+") < czm_infinity)";if("String"===l||"isExactClass"===l||"isClass"===l||"getExactClassName"===l)throw new t$13('Error generating style shader: "'+l+'" is not supported.');return e$2e(C$C[l])?l+"("+r+")":l+r;case s$u.BINARY:return"%"===l?"mod("+r+", "+o+")":"==="===l?"("+r+" == "+o+")":"!=="===l?"("+r+" != "+o+")":"atan2"===l?"atan("+r+", "+o+")":e$2e(O$s[l])?l+"("+r+", "+o+")":"("+r+" "+l+" "+o+")";case s$u.TERNARY:if(e$2e(F$D[l]))return l+"("+r+", "+o+", "+a+")";break;case s$u.CONDITIONAL:return"("+a+" ? "+r+" : "+o+")";case s$u.MEMBER:return"r"===o||"x"===o||"0.0"===o?r+"[0]":"g"===o||"y"===o||"1.0"===o?r+"[1]":"b"===o||"z"===o||"2.0"===o?r+"[2]":"a"===o||"w"===o||"3.0"===o?r+"[3]":r+"[int("+o+")]";case s$u.FUNCTION_CALL:throw new t$13('Error generating style shader: "'+l+'" is not supported.');case s$u.ARRAY:if(4===l.length)return"vec4("+l[0]+", "+l[1]+", "+l[2]+", "+l[3]+")";if(3===l.length)return"vec3("+l[0]+", "+l[1]+", "+l[2]+")";if(2===l.length)return"vec2("+l[0]+", "+l[1]+")";throw new t$13("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case s$u.REGEX:throw new t$13("Error generating style shader: Regular expressions are not supported.");case s$u.VARIABLE_IN_STRING:throw new t$13("Error generating style shader: Converting a variable to a string is not supported.");case s$u.LITERAL_NULL:return $$y;case s$u.LITERAL_BOOLEAN:return l?"true":"false";case s$u.LITERAL_NUMBER:return A$G(l);case s$u.LITERAL_STRING:if(e$2e(i)&&i._type===s$u.MEMBER&&("r"===l||"g"===l||"b"===l||"a"===l||"x"===l||"y"===l||"z"===l||"w"===l))return l;if(e$2e(n=e$1X.fromCssColorString(l,T$z)))return Le$h(n);throw new t$13("Error generating style shader: String literals are not supported.");case s$u.LITERAL_COLOR:var u=r;if("color"===l){if(!e$2e(u))return"vec4(1.0)";if(u.length>1){var c=u[0],h=u[1];return"1.0"!==h&&(t.translucent=!0),"vec4("+c+", "+h+")"}return"vec4("+u[0]+", 1.0)"}if("rgb"===l)return e$2e(n=P$x(this))?S$v(n):"vec4("+u[0]+" / 255.0, "+u[1]+" / 255.0, "+u[2]+" / 255.0, 1.0)";if("rgba"===l)return"1.0"!==u[3]&&(t.translucent=!0),e$2e(n=P$x(this))?S$v(n):"vec4("+u[0]+" / 255.0, "+u[1]+" / 255.0, "+u[2]+" / 255.0, "+u[3]+")";if("hsl"===l)return e$2e(n=k$v(this))?S$v(n):"vec4(czm_HSLToRGB(vec3("+u[0]+", "+u[1]+", "+u[2]+")), 1.0)";if("hsla"===l)return e$2e(n=k$v(this))?(1!==n.alpha&&(t.translucent=!0),S$v(n)):("1.0"!==u[3]&&(t.translucent=!0),"vec4(czm_HSLToRGB(vec3("+u[0]+", "+u[1]+", "+u[2]+")), "+u[3]+")");break;case s$u.LITERAL_VECTOR:if(!e$2e(r))throw new t$15("left should always be defined for type ExpressionNodeType.LITERAL_VECTOR");for(var d=r.length,f=l+"(",p=0;p<d;++p)f+=r[p],p<d-1&&(f+=", ");return f+=")";case s$u.LITERAL_REGEX:throw new t$13("Error generating style shader: Regular expressions are not supported.");case s$u.LITERAL_UNDEFINED:return $$y;case s$u.BUILTIN_VARIABLE:if("tiles3d_tileset_time"===l)return"u_time"}},Object.defineProperties(y$y.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var te$m={position:0,a_batchId:1};function se$h(e,t){if(!e$2e(e._va)){var i=t$X.createVertexBuffer({context:t,typedArray:e._positions,usage:A$18.STATIC_DRAW}),n=t$X.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:A$18.STATIC_DRAW}),r=t$X.createIndexBuffer({context:t,typedArray:e._indices,usage:A$18.DYNAMIC_DRAW,indexDatatype:2===e._indices.BYTES_PER_ELEMENT?ce$z.UNSIGNED_SHORT:ce$z.UNSIGNED_INT}),o=[{index:0,vertexBuffer:i,componentDatatype:S$14.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:n,componentDatatype:S$14.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}];e._va=new c$13({context:t,attributes:o,indexBuffer:r}),t.webgl2&&(e._vaSwap=new c$13({context:t,attributes:o,indexBuffer:t$X.createIndexBuffer({context:t,sizeInBytes:r.sizeInBytes,usage:A$18.DYNAMIC_DRAW,indexDatatype:r.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._verticesPromise=void 0}}function ne$m(e,t){if(!e$2e(e._sp)){var i=e._batchTable,n=u$Z(e._attributeLocations,te$m),r=e._pickId,o=e._vertexShaderSource,a=e._fragmentShaderSource;if(e$2e(o))return e._sp=r$14.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:n}),e._spStencil=e._sp,a=(a=s$V.replaceMain(a,"czm_non_pick_main"))+"void main() \n{ \n czm_non_pick_main(); \n gl_FragColor = "+r+"; \n} \n",void(e._spPick=r$14.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:n}));var s=i.getVertexShaderCallback(!1,"a_batchId",void 0)(G$C),l=i.getFragmentShaderCallback()(Q$T,!1,void 0);r=i.getPickId();var u=new s$V({sources:[s]}),c=new s$V({defines:["VECTOR_TILE"],sources:[l]});e._sp=r$14.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:n}),u=new s$V({sources:[G$C]}),c=new s$V({defines:["VECTOR_TILE"],sources:[Q$T]}),e._spStencil=r$14.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:n}),l=(l=s$V.replaceMain(l,"czm_non_pick_main"))+"\nvoid main() \n{ \n czm_non_pick_main(); \n gl_FragColor = "+r+"; \n} \n";var h=new s$V({sources:[s]}),d=new s$V({defines:["VECTOR_TILE"],sources:[l]});e._spPick=r$14.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:n})}}function m$y(e){var t=e?m$Z.EQUAL:m$Z.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.DECREMENT_WRAP},backFunction:t,backOperation:{fail:n$_.KEEP,zFail:n$_.INCREMENT_WRAP,zPass:n$_.INCREMENT_WRAP},reference:u$M.CESIUM_3D_TILE_MASK,mask:u$M.CESIUM_3D_TILE_MASK},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1}}function J$u(e){var t=e?m$Z.EQUAL:m$Z.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.INCREMENT_WRAP},backFunction:t,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:u$M.CESIUM_3D_TILE_MASK,mask:u$M.CESIUM_3D_TILE_MASK},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:re$G.LESS_OR_EQUAL},depthMask:!1}}var oe$h={stencilTest:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.NOT_EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:u$M.CLASSIFICATION_MASK},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Ee$r.ALPHA_BLEND},fe$h={stencilTest:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.NOT_EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:u$M.CLASSIFICATION_MASK},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function ce$i(e){e$2e(e._rsStencilPreloadPass)||(e._rsStencilPreloadPass=d$1m.fromCache(m$y(!1)),e._rsStencilPreloadPass3DTiles=d$1m.fromCache(m$y(!0)),e._rsStencilDepthPass=d$1m.fromCache(J$u(!1)),e._rsStencilDepthPass3DTiles=d$1m.fromCache(J$u(!0)),e._rsColorPass=d$1m.fromCache(oe$h),e._rsPickPass=d$1m.fromCache(fe$h))}var w$v=new p$1d,Z$w=new o$1p;function _e$e(e,t){if(!e$2e(e._uniformMap)){var i={u_modifiedModelViewProjection:function(){var i=t.uniformState.view,n=t.uniformState.projection;return p$1d.clone(i,w$v),p$1d.multiplyByPoint(w$v,e._center,Z$w),p$1d.setTranslation(w$v,Z$w,w$v),p$1d.multiply(n,w$v,w$v),w$v},u_highlightColor:function(){return e._highlightColor}};e._uniformMap=e._batchTable.getUniformMapCallback()(i)}}function U$x(e,t,i,n,r,o,a){for(var s=e.constructor.BYTES_PER_ELEMENT,l=o.length,u=0;u<l;++u){var c=a[o[u]],h=n[c],d=r[c],f=new e.constructor(e.buffer,s*h,d);t.set(f,i),n[c]=i,i+=d}return i}function ue$j(e,t){var i=e._indices,n=e._indexOffsets,r=e._indexCounts,o=e._batchIdLookUp,a=new i.constructor(i.length),s=t.pop(),l=[s],u=U$x(i,a,0,n,r,s.batchIds,o);for(s.offset=0,s.count=u;t.length>0;){var c=t.pop();if(e$1X.equals(c.color,s.color))u=U$x(i,a,u,n,r,c.batchIds,o),s.batchIds=s.batchIds.concat(c.batchIds),s.count=u-s.offset;else{var h=u;u=U$x(i,a,u,n,r,c.batchIds,o),c.offset=h,c.count=u-h,l.push(c),s=c}}e._va.indexBuffer.copyFromArrayView(a),e._indices=a,e._batchedIndices=l}function B$v(e,t,i,n,r,o,a){for(var s=e.bytesPerIndex,l=o.length,u=0;u<l;++u){var c=a[o[u]],h=n[c],d=r[c];t.copyFromBuffer(e,h*s,i*s,d*s),n[c]=i,i+=d}return i}function he$f(e,t){var i=e._indexOffsets,n=e._indexCounts,r=e._batchIdLookUp,o=t.pop(),a=[o],s=e._va.indexBuffer,l=e._vaSwap.indexBuffer,u=B$v(s,l,0,i,n,o.batchIds,r);for(o.offset=0,o.count=u;t.length>0;){var c=t.pop();if(e$1X.equals(c.color,o.color))u=B$v(s,l,u,i,n,c.batchIds,r),o.batchIds=o.batchIds.concat(c.batchIds),o.count=u-o.offset;else{var h=u;u=B$v(s,l,u,i,n,c.batchIds,r),c.offset=h,c.count=u-h,a.push(c),o=c}}var d=e._va;e._va=e._vaSwap,e._vaSwap=d,e._batchedIndices=a}function de$f(e,t){return t.color.toRgba()-e.color.toRgba()}function le$j(e,t){if(!e._batchDirty)return!1;for(var i=e._batchedIndices,n=i.length,r=!1,o={},a=0;a<n;++a){var s=i[a].color.toRgba();if(e$2e(o[s])){r=!0;break}o[s]=!0}return r?r&&!e.forceRebatch&&e._framesSinceLastRebatch<120?void++e._framesSinceLastRebatch:(i.sort(de$f),t.webgl2?he$f(e,i):ue$j(e,i),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0):(e._batchDirty=!1,!1)}function ie$l(e,t){var i=le$j(e,t),n=e._commands,r=e._batchedIndices,o=r.length,a=3*o;if(!e$2e(n)||i||n.length!==a){n.length=a;for(var s=e._va,l=e._sp,u=u$Z(e._modelMatrix,p$1d.IDENTITY),c=e._uniformMap,h=e._boundingVolume,d=0;d<o;++d){var f=r[d].offset,p=r[d].count,_=n[3*d];e$2e(_)||(_=n[3*d]=new i$$({owner:e})),_.vertexArray=s,_.modelMatrix=u,_.offset=f,_.count=p,_.renderState=e._rsStencilPreloadPass,_.shaderProgram=l,_.uniformMap=c,_.boundingVolume=h,_.cull=!1,_.pass=Le$q.TERRAIN_CLASSIFICATION;var m=i$$.shallowClone(_,_.derivedCommands.tileset);m.renderState=e._rsStencilPreloadPass3DTiles,m.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,_.derivedCommands.tileset=m;var g=n[3*d+1];e$2e(g)||(g=n[3*d+1]=new i$$({owner:e})),g.vertexArray=s,g.modelMatrix=u,g.offset=f,g.count=p,g.renderState=e._rsStencilDepthPass,g.shaderProgram=l,g.uniformMap=c,g.boundingVolume=h,g.cull=!1,g.pass=Le$q.TERRAIN_CLASSIFICATION;var x=i$$.shallowClone(g,g.derivedCommands.tileset);x.renderState=e._rsStencilDepthPass3DTiles,x.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,g.derivedCommands.tileset=x;var y=n[3*d+2];e$2e(y)||(y=n[3*d+2]=new i$$({owner:e})),y.vertexArray=s,y.modelMatrix=u,y.offset=f,y.count=p,y.renderState=e._rsColorPass,y.shaderProgram=l,y.uniformMap=c,y.boundingVolume=h,y.cull=!1,y.pass=Le$q.TERRAIN_CLASSIFICATION;var v=i$$.shallowClone(y,y.derivedCommands.tileset);v.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,y.derivedCommands.tileset=v}e._commandsDirty=!0}}function Ie$c(e,t){if(e.classificationType!==_0x2b86ba.TERRAIN&&t.invertClassification&&(!e$2e(e._commandsIgnoreShow)||e._commandsDirty)){for(var i=e._commands,n=e._commandsIgnoreShow,r=e._spStencil,o=i.length,a=n.length=o/3*2,s=0,l=0;l<a;l+=2){var u=n[l]=i$$.shallowClone(i[s],n[l]);u.shaderProgram=r,u.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,(u=n[l+1]=i$$.shallowClone(i[s+1],n[l+1])).shaderProgram=r,u.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,s+=3}e._commandsDirty=!1}}function Se$a(e){if(e._pickCommandsDirty){var t=e._indexOffsets.length,i=e._pickCommands;i.length=3*t;for(var n=e._va,r=e._spStencil,o=e._spPick,a=u$Z(e._modelMatrix,p$1d.IDENTITY),s=e._uniformMap,l=0;l<t;++l){var u=e._indexOffsets[l],c=e._indexCounts[l],h=e$2e(e._boundingVolumes)?e._boundingVolumes[l]:e.boundingVolume,d=i[3*l];e$2e(d)||(d=i[3*l]=new i$$({owner:e,pickOnly:!0})),d.vertexArray=n,d.modelMatrix=a,d.offset=u,d.count=c,d.renderState=e._rsStencilPreloadPass,d.shaderProgram=r,d.uniformMap=s,d.boundingVolume=h,d.pass=Le$q.TERRAIN_CLASSIFICATION;var f=i$$.shallowClone(d,d.derivedCommands.tileset);f.renderState=e._rsStencilPreloadPass3DTiles,f.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=f;var p=i[3*l+1];e$2e(p)||(p=i[3*l+1]=new i$$({owner:e,pickOnly:!0})),p.vertexArray=n,p.modelMatrix=a,p.offset=u,p.count=c,p.renderState=e._rsStencilDepthPass,p.shaderProgram=r,p.uniformMap=s,p.boundingVolume=h,p.pass=Le$q.TERRAIN_CLASSIFICATION;var _=i$$.shallowClone(p,p.derivedCommands.tileset);_.renderState=e._rsStencilDepthPass3DTiles,_.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=_;var m=i[3*l+2];e$2e(m)||(m=i[3*l+2]=new i$$({owner:e,pickOnly:!0})),m.vertexArray=n,m.modelMatrix=a,m.offset=u,m.count=c,m.renderState=e._rsPickPass,m.shaderProgram=o,m.uniformMap=s,m.boundingVolume=h,m.pass=Le$q.TERRAIN_CLASSIFICATION;var g=i$$.shallowClone(m,m.derivedCommands.tileset);g.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,m.derivedCommands.tileset=g}e._pickCommandsDirty=!1}}function be$g(e,t){e._updatingAllCommands=!0;var i,n=e._batchIds,r=n.length;for(i=0;i<r;++i){var o=t[n[i]];o.show=!0,o.color=e$1X.WHITE}var a=e._batchedIndices;for(r=a.length,i=0;i<r;++i)a[i].color=e$1X.clone(e$1X.WHITE);e._updatingAllCommands=!1,e._batchDirty=!0}y$y.prototype.createFeatures=function(e,t){for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=i[r];t[o]=new e$M(e,o)}},y$y.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var ge$e=new e$1X,Ee$e=e$1X.WHITE,Te$d=!0,Ae$f=/\$/;function $$x(e,t,i,n){var r,o,a=e.classificationType,s=a!==_0x2b86ba.CESIUM_3D_TILE,l=a!==_0x2b86ba.TERRAIN,u=t.commandList,c=i.length;for(o=0;o<c;++o)s&&((r=i[o]).pass=Le$q.TERRAIN_CLASSIFICATION,u.push(r)),l&&((r=i[o].derivedCommands.tileset).pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,u.push(r));if(t.invertClassification&&e$2e(n))for(c=n.length,o=0;o<c;++o)u.push(n[o])}function ve$f(e,t){for(var i=e.commandList,n=t.length,r=0;r<n;r+=3){var o=t[r+2];o.pass=Le$q.OPAQUE,i.push(o)}}function Le$g(e){var t=e.debugWireframe===e._debugWireframe;if(!(t=t&&!(e.debugWireframe&&e._wireframeDirty))){var i,n;e$2e(e._rsWireframe)||(e._rsWireframe=d$1m.fromCache({})),e.debugWireframe?(i=e._rsWireframe,n=W$18.LINES):(i=e._rsColorPass,n=W$18.TRIANGLES);for(var r=e._commands,o=r.length,a=0;a<o;a+=3){var s=r[a+2];s.renderState=i,s.primitiveType=n}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}}y$y.prototype.applyStyle=function(e,t){if(e$2e(e)){var i=e.color,n=i instanceof L$E&&!Ae$f.test(i.expression);this._updatingAllCommands=n;var r,o=this._batchIds,a=o.length;for(r=0;r<a;++r){var s=t[o[r]];s.color=e$2e(e.color)?e.color.evaluateColor(s,ge$e):Ee$e,s.show=e$2e(e.show)?e.show.evaluate(s):Te$d}if(n){var l=this._batchedIndices;for(a=l.length,r=0;r<a;++r)l[r].color=e$1X.clone(e$1X.WHITE);this._updatingAllCommands=!1,this._batchDirty=!0}}else be$g(this,t)},y$y.prototype.updateCommands=function(e,t){if(!this._updatingAllCommands){var i=this._batchIdLookUp,n=i[e];if(e$2e(n)){var r,o=this._indexOffsets,a=this._indexCounts,s=o[n],l=a[n],u=this._batchedIndices,c=u.length;for(r=0;r<c;++r){var h=u[r].offset,d=u[r].count;if(s>=h&&s<h+d)break}u.push(new c$x({color:e$1X.clone(t),offset:s,count:l,batchIds:[e]}));for(var f=[],p=[],_=u[r].batchIds,m=_.length,g=0;g<m;++g){var x=_[g];if(x!==e)o[i[x]]<s?f.push(x):p.push(x)}0!==p.length&&u.push(new c$x({color:e$1X.clone(u[r].color),offset:s+l,count:u[r].offset+u[r].count-(s+l),batchIds:p})),0!==f.length?(u[r].count=s-u[r].offset,u[r].batchIds=f):u.splice(r,1),this._batchDirty=!0}}},y$y.prototype.update=function(e){var t=e.context;se$h(this,t),ne$m(this,t),ce$i(this),_e$e(this,t);var i=e.passes;i.render&&(ie$l(this,t),Ie$c(this,e),Le$g(this),this._debugWireframe?ve$f(e,this._commands):$$x(this,e,this._commands,this._commandsIgnoreShow)),i.pick&&(Se$a(this),$$x(this,e,this._pickCommands))},y$y.prototype.isDestroyed=function(){return!1},y$y.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaSwap=this._vaSwap&&this._vaSwap.destroy(),i$11(this)};var Ee$d=new o$1p,y$x=s$v.ModelState;function A$F(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).gltf;if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),!(t instanceof Uint8Array))throw new t$13("Only binary glTF is supported as a classifier.");re$s(t=O$u(t)),E$E(t),ue$l(t),he$h(t),e$L.buffer(t,(function(e){if(!e$2e(e.extras._pipeline.source))throw new t$13("Buffer data must be embedded in the binary gltf.")}));var i=t.nodes,n=t.meshes,r=i[0].mesh;if(1!==i.length||!e$2e(r))throw new t$13("Only one node is supported for classification and it must have a mesh.");if(1!==n.length)throw new t$13("Only one mesh is supported when using b3dm for classification.");var o=n[0].primitives;if(1!==o.length)throw new t$13("Only one primitive per mesh is supported when using b3dm for classification.");if(!e$2e(o[0].attributes.POSITION))throw new t$13("The mesh must have a position attribute.");if(!e$2e(o[0].attributes._BATCHID))throw new t$13("The mesh must have a batch id attribute.");this._gltf=t,this.show=u$Z(e.show,!0),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(this.modelMatrix),this._ready=!1,this._readyPromise=o$1l.defer(),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=u$Z(e.debugWireframe,!1),this._debugWireframe=!1,this._classificationType=e.classificationType,this._vertexShaderLoaded=e.vertexShaderLoaded,this._classificationShaderLoaded=e.classificationShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=u$Z(e.ignoreCommands,!1),this._upAxis=u$Z(e.upAxis,v$y.Y),this._batchTable=e.batchTable,this._computedModelMatrix=new p$1d,this._initialRadius=void 0,this._boundingSphere=void 0,this._scaledBoundingSphere=new i$1d,this._state=y$x.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._dirty=!1,this._nodeMatrix=new p$1d,this._primitive=void 0,this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms=void 0,this._buffers={},this._vertexArray=void 0,this._shaderProgram=void 0,this._uniformMap=void 0,this._geometryByteLength=0,this._trianglesLength=0,this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0}function Ce$a(e){var t=e.gltf,i=e._loadResources;e$L.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function Be$e(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;e$L.bufferView(e.gltf,(function(e,t){e.target===de$y.ARRAY_BUFFER&&i.enqueue(t)}));var n=e._loadResources.indexBuffersToCreate,r={};e$L.accessor(e.gltf,(function(e){var i=e.bufferView;t[i].target===de$y.ELEMENT_ARRAY_BUFFER&&!e$2e(r[i])&&(r[i]=!0,n.enqueue({id:i,componentType:e.componentType}))}))}function Le$f(e,t){var i=t._loadResources,n=t.gltf.bufferViews[e],r=i.getBuffer(n);t._buffers[e]=r,t._geometryByteLength+=r.byteLength}function Oe$e(e,t,i){var n=i._loadResources,r=i.gltf.bufferViews[e],o={typedArray:n.getBuffer(r),indexDatatype:t};i._buffers[e]=o,i._geometryByteLength+=o.typedArray.byteLength}function Ae$e(e){var t=e._loadResources;if(0===t.pendingBufferLoads){for(var i=t.vertexBuffersToCreate,n=t.indexBuffersToCreate;i.length>0;)Le$f(i.dequeue(),e);for(;n.length>0;){var r=n.dequeue();Oe$e(r.id,r.componentType,e)}}}function Me$g(e,t){var i=t.gltf.meshes[0].primitives[0],n=s$v.modifyShaderForQuantizedAttributes(t.gltf,i,e);return t._quantizedUniforms=n.uniforms,n.shader}function ne$l(e,t){return e$2e(t)&&(e=t(e)),e}function we$c(e){var t=e.gltf,i=s$v.getAttributeOrUniformBySemantic(t,"POSITION"),n=s$v.getAttributeOrUniformBySemantic(t,"_BATCHID"),r={};r[i]=0,r[n]=1;var o,a,s=s$v.getAttributeOrUniformBySemantic(t,"MODELVIEWPROJECTION");if(e$2e(s))o="uniform mat4 "+s+";\n",a=s+" * vec4("+i+", 1.0)";else{var l=s$v.getAttributeOrUniformBySemantic(t,"PROJECTION"),u=s$v.getAttributeOrUniformBySemantic(t,"MODELVIEW");e$2e(u)||(u=s$v.getAttributeOrUniformBySemantic(t,"CESIUM_RTC_MODELVIEW")),o="uniform mat4 "+u+";\nuniform mat4 "+l+";\n",a=l+" * "+u+" * vec4("+i+", 1.0)"}var c="attribute vec3 "+i+";\nattribute float "+n+";\n"+o+"void main() {\n"+(" vec4 positionInClipCoords = "+a+";\n")+" gl_Position = czm_depthClampFarPlane(positionInClipCoords);\n}\n";e.extensionsUsed.WEB3D_quantized_attributes&&(c=Me$g(c,e));var h=ne$l(c,e._vertexShaderLoaded),d=ne$l("#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvoid main() \n{ \n gl_FragColor = vec4(1.0); \n czm_writeDepthClampedToFarPlane();\n}\n",e._classificationShaderLoaded);h=s$v.modifyVertexShaderForLogDepth(h,a),d=s$v.modifyFragmentShaderForLogDepth(d),e._shaderProgram={vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:r}}function De$e(){return{POSITION:0,_BATCHID:1}}function Re$c(e){if(e._loadResources.finishedBuffersCreation()&&!e$2e(e._vertexArray)){var t,i=e._buffers,n=e.gltf,r=n.accessors,o=n.meshes[0].primitives[0],a=De$e(),s={};if(e$L.meshPrimitiveAttribute(o,(function(e,t){var o=a[t];if(e$2e(o)){var l=r[e];s[t]={index:o,vertexBuffer:i[l.bufferView],componentsPerAttribute:r$B(l.type),componentDatatype:l.componentType,offsetInBytes:l.byteOffset,strideInBytes:p$A(n,l)}}})),e$2e(o.indices)){var l=r[o.indices];t=i[l.bufferView]}e._vertexArray={attributes:s,indexBuffer:t}}}Object.defineProperties(A$F.prototype,{gltf:{get:function(){return this._gltf}},boundingSphere:{get:function(){if(this._state!==y$x.LOADED)throw new t$15("The model is not loaded. Use ClassificationModel.readyPromise or wait for ClassificationModel.ready to be true.");var e=this.modelMatrix,t=p$1d.getScale(e,Ee$d),i=this._scaledBoundingSphere;return i.center=o$1p.multiplyComponents(this._boundingSphere.center,t,i.center),i.radius=o$1p.maximumComponent(t)*this._initialRadius,e$2e(this._rtcCenter)&&o$1p.add(this._rtcCenter,i.center,i.center),i}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},dirty:{get:function(){return this._dirty}},extensionsUsed:{get:function(){return e$2e(this._extensionsUsed)||(this._extensionsUsed=s$v.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return e$2e(this._extensionsRequired)||(this._extensionsRequired=s$v.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return 0}},classificationType:{get:function(){return this._classificationType}}});var se$g={PROJECTION:function(e,t){return s$v.getGltfSemanticUniforms().PROJECTION(e,t)},MODELVIEW:function(e,t){return s$v.getGltfSemanticUniforms().MODELVIEW(e,t)},CESIUM_RTC_MODELVIEW:function(e,t){return s$v.getGltfSemanticUniforms().CESIUM_RTC_MODELVIEW(e,t)},MODELVIEWPROJECTION:function(e,t){return s$v.getGltfSemanticUniforms().MODELVIEWPROJECTION(e,t)}};function Pe$b(e,t){if(!e$2e(e._uniformMap)){var i={};e$L.technique(e.gltf,(function(n){e$L.techniqueUniform(n,(function(n,r){!e$2e(n.semantic)||!e$2e(se$g[n.semantic])||(i[r]=se$g[n.semantic](t.uniformState,e))}))})),e._uniformMap=i}}function Ue$c(e,t){return s$v.createUniformsForQuantizedAttributes(e.gltf,t,e._quantizedUniforms)}function Ve$b(e,t){switch(e.mode){case W$18.TRIANGLES:return t/3;case W$18.TRIANGLE_STRIP:case W$18.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function Ne$b(e){var t,i,n=e._batchTable,r=e._uniformMap,o=e._vertexArray,a=e.gltf,s=a.accessors,l=a.meshes[0].primitives[0],u=s[l.indices],c=l.attributes.POSITION,h=s$v.getAccessorMinMax(a,c),d=i$1d.fromCornerPoints(o$1p.fromArray(h.min),o$1p.fromArray(h.max));e$2e(u)?(i=u.count,t=u.byteOffset/ce$z.getSizeInBytes(u.componentType)):(i=s[l.attributes.POSITION].count,t=0);(e._trianglesLength+=Ve$b(l,i),e$2e(e._uniformMapLoaded)&&(r=e._uniformMapLoaded(r)),e.extensionsUsed.WEB3D_quantized_attributes)&&(r=p$19(r,Ue$c(e,l)));var f=o.attributes.POSITION,p=f.componentDatatype,_=f.vertexBuffer,m=_.byteOffset,g=_.byteLength/S$14.getSizeInBytes(p),x=S$14.createArrayBufferView(p,_.buffer,m,g);p=(f=o.attributes._BATCHID).componentDatatype,m=(_=f.vertexBuffer).byteOffset,g=_.byteLength/S$14.getSizeInBytes(p);var y,v=S$14.createArrayBufferView(p,_.buffer,m,g),$=o.indexBuffer.typedArray;y=o.indexBuffer.indexDatatype===ce$z.UNSIGNED_SHORT?new Uint16Array($.buffer,$.byteOffset,$.byteLength/Uint16Array.BYTES_PER_ELEMENT):new Uint32Array($.buffer,$.byteOffset,$.byteLength/Uint32Array.BYTES_PER_ELEMENT),x=l$R(x);var b=[],T=[],C=[],S=[],w=(v=l$R(v))[(y=l$R(y,t,t+i))[0]];b.push(w),C.push(0);for(var E,P,A,L=y.length,M=1;M<L;++M)(E=v[y[M]])!==w&&(A=M-(P=C[C.length-1]),b.push(E),T.push(A),C.push(M),S.push(new c$x({offset:P,count:A,batchIds:[w],color:e$1X.WHITE})),w=E);A=L-(P=C[C.length-1]),T.push(A),S.push(new c$x({offset:P,count:A,batchIds:[w],color:e$1X.WHITE}));var R=e._shaderProgram,O=R.vertexShaderSource,D=R.fragmentShaderSource,I=R.attributeLocations,F=e$2e(e._pickIdLoaded)?e._pickIdLoaded():void 0;e._primitive=new y$y({classificationType:e._classificationType,positions:x,indices:y,indexOffsets:C,indexCounts:T,batchIds:b,vertexBatchIds:v,batchedIndices:S,batchTable:n,boundingVolume:new i$1d,_vertexShaderSource:O,_fragmentShaderSource:D,_attributeLocations:I,_uniformMap:r,_pickId:F,_modelMatrix:new p$1d,_boundingSphere:d}),e._buffers=void 0,e._vertexArray=void 0,e._shaderProgram=void 0,e._uniformMap=void 0}function We$a(e){if(e._loadResources.finished()&&!e$2e(e._primitive)){var t=e.gltf.nodes[0];e._nodeMatrix=s$v.getTransform(t,e._nodeMatrix),Ne$b(e)}}function ae$j(e,t){var i=t.context;s$v.checkSupportedGlExtensions(e.gltf.glExtensionsUsed,i),Ae$e(e),we$c(e),Re$c(e),Pe$b(e,i),We$a(e)}var Fe$d=new e$2c,Z$v=new p$1d;function qe$6(e,t,i,n){var r=e._computedModelMatrix;if(e._mode!==C$14.SCENE3D&&!e._ignoreCommands){var o=p$1d.getColumn(r,3,Fe$d);if(e$2c.equals(o,e$2c.UNIT_W)){var a=e.boundingSphere.center,s=m$19.wgs84To2DModelMatrix(n,a,Z$v);r=p$1d.multiply(s,r,Z$v),e$2e(e._rtcCenter)&&(p$1d.setTranslation(r,e$2c.UNIT_W,r),e._rtcCenter=e._rtcCenter2D)}else r=m$19.basisTo2D(n,r,Z$v),e._rtcCenter=e._rtcCenter3D}var l=e._primitive;(t||i)&&(p$1d.multiplyTransformation(r,e._nodeMatrix,l._modelMatrix),i$1d.transform(l._boundingSphere,l._modelMatrix,l._boundingVolume),e$2e(e._rtcCenter)&&o$1p.add(e._rtcCenter,l._boundingVolume.center,l._boundingVolume.center))}A$F.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},A$F.prototype.update=function(e){if(e.mode!==C$14.MORPHING){var t=s$Z.supportsWebPSync();if(e$2e(t)){if(this._state===y$x.NEEDS_LOAD&&e$2e(this.gltf)&&(this._state=y$x.LOADING,this._state!==y$x.FAILED)){var i=this.gltf.extensions;if(e$2e(i)&&e$2e(i.CESIUM_RTC)){var n=o$1p.fromArray(i.CESIUM_RTC.center);if(!o$1p.equals(n,o$1p.ZERO)){this._rtcCenter3D=n;var r=e.mapProjection,o=r.ellipsoid.cartesianToCartographic(this._rtcCenter3D),a=r.project(o);o$1p.fromElements(a.z,a.x,a.y,a),this._rtcCenter2D=a,this._rtcCenterEye=new o$1p,this._rtcCenter=this._rtcCenter3D}}this._loadResources=new t$t,s$v.parseBuffers(this)}var s=this._loadResources,l=!1;this._state===y$x.LOADING&&(0===s.pendingBufferLoads&&(s$v.checkSupportedExtensions(this.extensionsRequired,t),Ce$a(this),Be$e(this),this._boundingSphere=s$v.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,ae$j(this,e)),s.finished()&&(this._state=y$x.LOADED,l=!0)),e$2e(s)&&this._state===y$x.LOADED&&(l||ae$j(this,e),s.finished()&&(this._loadResources=void 0));var u=this.show;if(u&&this._state===y$x.LOADED||l){this._dirty=!1;var c=this.modelMatrix,h=e.mode!==this._mode;this._mode=e.mode;var d=!p$1d.equals(this._modelMatrix,c)||h;if(d||l){p$1d.clone(c,this._modelMatrix);var f=this._computedModelMatrix;p$1d.clone(c,f),this._upAxis===v$y.Y?p$1d.multiplyTransformation(f,v$y.Y_UP_TO_Z_UP,f):this._upAxis===v$y.X&&p$1d.multiplyTransformation(f,v$y.X_UP_TO_Z_UP,f)}(d||l)&&(qe$6(this,d,l,e.mapProjection),this._dirty=!0)}if(l){var p=this;return void e.afterRender.push((function(){p._ready=!0,p._readyPromise.resolve(p)}))}u&&!this._ignoreCommands&&(this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.debugWireframe=this.debugWireframe,this._primitive.update(e))}}},A$F.prototype.isDestroyed=function(){return!1},A$F.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$11(this)};var e$K={HIGHLIGHT:0,REPLACE:1,MIX:2,getColorBlend:function(e,t){return e===e$K.HIGHLIGHT?0:e===e$K.REPLACE?1:e===e$K.MIX?e$2d.clamp(t,e$2d.EPSILON4,1):void 0}},I$K=Object.freeze(e$K);function r$A(){}function b$H(e,t){var i="runtime."+Object.keys(e.createdBufferViews).length,n=e.buffers,r=Object.keys(n).length;return n[r]=t,e.createdBufferViews[i]={buffer:r,byteOffset:0,byteLength:t.byteLength},i}function R$s(e,t,i){var n=t._loadResources,r=b$H(n,e);return n.vertexBuffersToCreate.enqueue(r),r}function P$w(e,t,i){var n=e.typedArray,r=t._loadResources,o=b$H(r,n);return r.indexBuffersToCreate.enqueue({id:o,componentType:S$14.fromTypedArray(n)}),{bufferViewId:o,numberOfIndices:e.numberOfIndices}}function T$y(e,t,i,n){if(r$A._taskProcessorReady){var r=i.primitivesToDecode.peek();if(e$2e(r)){var o=e.scheduleTask(r,[r.array.buffer]);if(e$2e(o))return i.activeDecodingTasks++,i.primitivesToDecode.dequeue(),o.then((function(e){i.activeDecodingTasks--;var n=P$w(e.indexArray,t),o={},a=e.attributeData;for(var s in a)if(a.hasOwnProperty(s)){var l=a[s],u=R$s(l.array,t),c=l.data;c.bufferView=u,o[s]=c}t._decodedData[r.mesh+".primitive."+r.primitive]={bufferView:n.bufferViewId,numberOfIndices:n.numberOfIndices,attributes:o}}))}}}function p$x(e,t,i){return o$1q.typeOf.string("samplerUniformName",e),o$1q.typeOf.string("matrixUniformName",t),o$1q.typeOf.string("styleUniformName",i)," float clipDistance = clip(gl_FragCoord, "+e+", "+t+"); \n vec4 clippingPlanesEdgeColor = vec4(1.0); \n clippingPlanesEdgeColor.rgb = "+i+".rgb; \n float clippingPlanesEdgeWidth = "+i+".a; \n if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) \n { \n gl_FragColor = clippingPlanesEdgeColor;\n } \n"}r$A._maxDecodingConcurrency=Math.max(s$Z.hardwareConcurrency-1,1),r$A._decoderTaskProcessor=void 0,r$A._taskProcessorReady=!1,r$A._getDecoderTaskProcessor=function(){if(!e$2e(r$A._decoderTaskProcessor)){var e=new i$W("decodeDraco",r$A._maxDecodingConcurrency);e.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper.js",wasmBinaryFile:"ThirdParty/draco_decoder.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(){r$A._taskProcessorReady=!0})),r$A._decoderTaskProcessor=e}return r$A._decoderTaskProcessor},r$A.hasExtension=function(e){return e$2e(e.extensionsRequired.KHR_draco_mesh_compression)||e$2e(e.extensionsUsed.KHR_draco_mesh_compression)},r$A._decodedModelResourceCache=void 0,r$A.parse=function(e,t){if(r$A.hasExtension(e)){var i=e._loadResources,n=e.cacheKey;if(e$2e(n)){e$2e(r$A._decodedModelResourceCache)||(e$2e(t.cache.modelDecodingCache)||(t.cache.modelDecodingCache={}),r$A._decodedModelResourceCache=t.cache.modelDecodingCache);var r=r$A._decodedModelResourceCache[n];if(e$2e(r))return r.count++,void(i.pendingDecodingCache=!0)}var o=e._dequantizeInShader,a=e.gltf;e$L.mesh(a,(function(e,t){e$L.meshPrimitive(e,(function(e,n){if(e$2e(e.extensions)){var r=e.extensions.KHR_draco_mesh_compression;if(e$2e(r)){var s=a.bufferViews[r.bufferView],l=l$R(a.buffers[s.buffer].extras._pipeline.source,s.byteOffset,s.byteOffset+s.byteLength);i.primitivesToDecode.enqueue({mesh:t,primitive:n,array:l,bufferView:s,compressedAttributes:r.attributes,dequantizeInShader:o})}}}))}))}},r$A.decodeModel=function(e,t){if(!r$A.hasExtension(e))return o$1l.resolve();var i=e._loadResources,n=e.cacheKey;if(e$2e(n)&&e$2e(r$A._decodedModelResourceCache)){var r=r$A._decodedModelResourceCache[n];if(e$2e(r)&&i.pendingDecodingCache)return o$1l(r.ready,(function(){e._decodedData=r.data,i.pendingDecodingCache=!1}));r$A._decodedModelResourceCache[n]={ready:!1,count:1,data:void 0}}if(0===i.primitivesToDecode.length)return o$1l.resolve();for(var o=r$A._getDecoderTaskProcessor(),a=[],s=T$y(o,e,i);e$2e(s);)a.push(s),s=T$y(o,e,i);return o$1l.all(a)},r$A.decodePointCloud=function(e){var t=r$A._getDecoderTaskProcessor();if(r$A._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])},r$A.cacheDataForModel=function(e){var t=e.cacheKey;if(e$2e(t)&&e$2e(r$A._decodedModelResourceCache)){var i=r$A._decodedModelResourceCache[t];e$2e(i)&&(i.ready=!0,i.data=e._decodedData)}},r$A.destroyCachedDataForModel=function(e){var t=e.cacheKey;if(e$2e(t)&&e$2e(r$A._decodedModelResourceCache)){var i=r$A._decodedModelResourceCache[t];e$2e(i)&&0==--i.count&&delete r$A._decodedModelResourceCache[t]}};var m$x=new o$1o;function f$H(e,t){o$1q.typeOf.object("clippingPlaneCollection",e),o$1q.typeOf.object("context",t);var i=e.unionClippingRegions,n=e.length,r=h$L.useFloatTexture(t),o=h$L.getTextureResolution(e,t,m$x),a=o.x,s=o.y,l=r?x$F(a,s):d$I(a,s);return l+="\n",l+=i?s$t(n):v$w(n)}function s$t(e){for(var t="#define inline\nfloat clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount;\n float amount;\n float pixelWidth = czm_metersPerPixel(position);\n bool breakAndDiscard = false;\n vec4 clippingPlane = vec4(0.0);\n",i=0;i<e;++i)t+=" clippingPlane = getClippingPlane(clippingPlanes, "+i+", clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = czm_branchFreeTernary("+i+" == 0, amount, min(amount, clipAmount));\n if (amount <= 0.0)\n {\n breakAndDiscard = true;\n //break;\n }\n";return t+=" if (breakAndDiscard) {\n discard;\n }\n return clipAmount;\n}\n"}function v$w(e){for(var t="#define inline\nfloat clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n bool clipped = true;\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount = 0.0;\n float amount;\n float pixelWidth = czm_metersPerPixel(position);\n vec4 clippingPlane = vec4(0.0);\n",i=0;i<e;++i)t+=" clippingPlane = getClippingPlane(clippingPlanes, "+i+", clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = max(amount, clipAmount);\n clipped = clipped && (amount <= 0.0);\n";return t+=" if (clipped)\n {\n discard;\n }\n return clipAmount;\n}\n"}function x$F(e,t){var i=1/t,n=1/e+"";-1===n.indexOf(".")&&(n+=".0");var r=i+"";return-1===r.indexOf(".")&&(r+=".0"),"#define inline\nvec4 getClippingPlane(sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int pixY = clippingPlaneNumber / "+e+";\n int pixX = clippingPlaneNumber - (pixY * "+e+");\n float u = (float(pixX) + 0.5) * "+n+";\n float v = (float(pixY) + 0.5) * "+r+";\n vec4 plane = texture2D(packedClippingPlanes, vec2(u, v));\n return czm_transformPlane(plane, transform);\n}\n"}function d$I(e,t){var i=1/t,n=1/e+"";-1===n.indexOf(".")&&(n+=".0");var r=i+"";return-1===r.indexOf(".")&&(r+=".0"),"#define inline\nvec4 getClippingPlane(sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int clippingPlaneStartIndex = clippingPlaneNumber * 2;\n int pixY = clippingPlaneStartIndex / "+e+";\n int pixX = clippingPlaneStartIndex - (pixY * "+e+");\n float u = (float(pixX) + 0.5) * "+n+";\n float v = (float(pixY) + 0.5) * "+r+";\n vec4 oct32 = texture2D(packedClippingPlanes, vec2(u, v)) * 255.0;\n vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);\n vec4 plane;\n plane.xyz = czm_octDecode(oct, 65535.0);\n plane.w = czm_unpackFloat(texture2D(packedClippingPlanes, vec2(u + "+n+", v)));\n return czm_transformPlane(plane, transform);\n}\n"}function S$u(){}var W$B=/^data\:/i;function d$H(e,t){var i=e.gltf,n=i.buffers,r=i.bufferViews[t.bufferView],o=n[r.buffer],a=r.byteOffset+t.byteOffset,s=t.count*r$B(t.type),l=W$B.test(o.uri)?"":o.uri;return e.cacheKey+"//"+l+"/"+a+"/"+s}var k$u={};S$u.getAnimationParameterValues=function(e,t){var i=d$H(e,t),n=k$u[i];if(!e$2e(n)){var r=e.gltf,o=r.buffers,a=r.bufferViews[t.bufferView],s=o[a.buffer].extras._pipeline.source,l=t.componentType,u=t.type,c=r$B(u),h=t.count,d=p$A(r,t);n=new Array(h);for(var f=u$Z(t.byteOffset,0),p=a.byteOffset+f,_=0;_<h;_++){var m=S$14.createArrayBufferView(l,s.buffer,s.byteOffset+p,c);"SCALAR"===u?n[_]=m[0]:"VEC3"===u?n[_]=o$1p.fromArray(m):"VEC4"===u&&(n[_]=n$15.unpack(m)),p+=d}e$2e(e.cacheKey)&&(k$u[i]=n)}return n};var L$D={};function D$x(e,t,i){return e.cacheKey+"//"+t+"/"+i}function V$r(e){this._value=e}V$r.prototype.evaluate=function(e,t){return this._value},V$r.prototype.wrapTime=function(e){return 0},V$r.prototype.clampTime=function(e){return 0},S$u.getAnimationSpline=function(e,t,i,n,r,o,a,s){var l=D$x(e,t,n),u=L$D[l];if(!e$2e(u)){var c=o,h=s;1===c.length&&1===h.length?u=new V$r(h[0]):"LINEAR"===r.interpolation&&("translation"===a||"scale"===a?u=new r$Q({times:c,points:h}):"rotation"===a?u=new r$P({times:c,points:h}):"weights"===a&&(u=new r$D({times:c,weights:h}))),e$2e(e.cacheKey)&&(L$D[l]=u)}return u};var c$w={};S$u.getSkinInverseBindMatrices=function(e,t){var i=d$H(e,t),n=c$w[i];if(!e$2e(n)){var r=e.gltf,o=r.buffers,a=r.bufferViews[t.bufferView],s=o[a.buffer].extras._pipeline.source,l=t.componentType,u=t.type,c=t.count,h=p$A(r,t),d=a.byteOffset+t.byteOffset,f=r$B(u);if(n=new Array(c),l===de$y.FLOAT&&u===Q$z.MAT4)for(var p=0;p<c;++p){var _=S$14.createArrayBufferView(l,s.buffer,s.byteOffset+d,f);n[p]=p$1d.fromArray(_),d+=h}c$w[i]=n}return n};var e$J={NONE:0,REPEAT:1,MIRRORED_REPEAT:2},_0x1ea9f2=Object.freeze(e$J),E$C=Object.freeze({STOPPED:0,ANIMATING:1});function a$x(e,t,i){this._name=i.name,this._startTime=a$15.clone(e.startTime),this._delay=u$Z(e.delay,0),this._stopTime=e.stopTime,this.removeOnStop=u$Z(e.removeOnStop,!1),this._multiplier=u$Z(e.multiplier,1),this._reverse=u$Z(e.reverse,!1),this._loop=u$Z(e.loop,_0x1ea9f2.NONE),this.start=new o$1h,this.update=new o$1h,this.stop=new o$1h,this._state=E$C.STOPPED,this._runtimeAnimation=i,this._computedStartTime=void 0,this._duration=void 0;var n=this;this._raiseStartEvent=function(){n.start.raiseEvent(t,n)},this._updateEventTime=0,this._raiseUpdateEvent=function(){n.update.raiseEvent(t,n,n._updateEventTime)},this._raiseStopEvent=function(){n.stop.raiseEvent(t,n)}}function f$G(e){this.animationAdded=new o$1h,this.animationRemoved=new o$1h,this._model=e,this._scheduledAnimations=[],this._previousTime=void 0}function R$r(e,t,i){var n=e._model,r=new a$x(i,n,n._runtime.animations[t]);return e._scheduledAnimations.push(r),e.animationAdded.raiseEvent(n,r),r}function N$s(e,t){for(var i=e.channelEvaluators,n=i.length,r=0;r<n;++r)i[r](t)}Object.defineProperties(a$x.prototype,{name:{get:function(){return this._name}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}}}),Object.defineProperties(f$G.prototype,{length:{get:function(){return this._scheduledAnimations.length}}}),f$G.prototype.add=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=this._model._runtime.animations;if(!e$2e(t))throw new t$15("Animations are not loaded. Wait for Model.readyPromise to resolve.");if(!e$2e(e.name)&&!e$2e(e.index))throw new t$15("Either options.name or options.index must be defined.");if(e$2e(e.multiplier)&&e.multiplier<=0)throw new t$15("options.multiplier must be greater than zero.");if(e$2e(e.index)&&(e.index>=t.length||e.index<0))throw new t$15("options.index must be a valid animation index.");if(e$2e(e.index))return R$r(this,e.index,e);for(var i,n=t.length,r=0;r<n;++r)if(t[r].name===e.name){i=r;break}if(!e$2e(i))throw new t$15("options.name must be a valid animation name.");return R$r(this,i,e)},f$G.prototype.addAll=function(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),!e$2e(this._model._runtime.animations))throw new t$15("Animations are not loaded. Wait for Model.readyPromise to resolve.");if(e$2e(e.multiplier)&&e.multiplier<=0)throw new t$15("options.multiplier must be greater than zero.");for(var t=[],i=this._model._runtime.animations.length,n=0;n<i;++n)t.push(R$r(this,n,e));return t},f$G.prototype.remove=function(e){if(e$2e(e)){var t=this._scheduledAnimations,i=t.indexOf(e);if(-1!==i)return t.splice(i,1),this.animationRemoved.raiseEvent(this._model,e),!0}return!1},f$G.prototype.removeAll=function(){var e=this._model,t=this._scheduledAnimations,i=t.length;this._scheduledAnimations=[];for(var n=0;n<i;++n)this.animationRemoved.raiseEvent(e,t[n])},f$G.prototype.contains=function(e){return!!e$2e(e)&&-1!==this._scheduledAnimations.indexOf(e)},f$G.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return this._scheduledAnimations[e]};var T$x=[];function q$B(e,t,i){return function(){e.animationRemoved.raiseEvent(t,i)}}function a$w(e,t,i){this._name=t.name,this._id=i,this._uniformMap=e._uniformMaps[i],this._technique=void 0,this._program=void 0,this._values=void 0}function a$v(e,t,i){for(var n=[],r=e.primitives,o=r.length,a=0;a<o;++a){var s=r[a];n[a]=t[s.material]}this._name=e.name,this._materials=n,this._id=i}function r$z(e,t,i,n,r){this._model=e,this._runtimeNode=i,this._name=t.name,this._id=n,this.useMatrix=!1,this._show=!0,this._matrix=p$1d.clone(r),this._originalMatrix=p$1d.clone(r)}f$G.prototype.update=function(e){var t=this._scheduledAnimations,i=t.length;if(0===i)return this._previousTime=void 0,!1;if(a$15.equals(e.time,this._previousTime))return!1;this._previousTime=a$15.clone(e.time,this._previousTime);for(var n=!1,r=e.time,o=this._model,a=0;a<i;++a){var s=t[a],l=s._runtimeAnimation;e$2e(s._computedStartTime)||(s._computedStartTime=a$15.addSeconds(u$Z(s.startTime,r),s.delay,new a$15)),e$2e(s._duration)||(s._duration=l.stopTime*(1/s.multiplier));var u=s._computedStartTime,c=s._duration,h=s.stopTime,d=0!==c?a$15.secondsDifference(r,u)/c:0,f=d>=0,p=s.loop===_0x1ea9f2.REPEAT||s.loop===_0x1ea9f2.MIRRORED_REPEAT;if((f||p&&!e$2e(s.startTime))&&(d<=1||p)&&(!e$2e(h)||a$15.lessThanOrEquals(r,h))){if(s._state===E$C.STOPPED&&(s._state=E$C.ANIMATING,s.start.numberOfListeners>0&&e.afterRender.push(s._raiseStartEvent)),s.loop===_0x1ea9f2.REPEAT)d-=Math.floor(d);else if(s.loop===_0x1ea9f2.MIRRORED_REPEAT){var _=Math.floor(d),m=d-_;d=_%2==1?1-m:m}s.reverse&&(d=1-d);var g=d*c*s.multiplier;N$s(l,g=e$2d.clamp(g,l.startTime,l.stopTime)),s.update.numberOfListeners>0&&(s._updateEventTime=g,e.afterRender.push(s._raiseUpdateEvent)),n=!0}else f&&s._state===E$C.ANIMATING&&(s._state=E$C.STOPPED,s.stop.numberOfListeners>0&&e.afterRender.push(s._raiseStopEvent),s.removeOnStop&&T$x.push(s))}i=T$x.length;for(var x=0;x<i;++x){var y=T$x[x];t.splice(t.indexOf(y),1),e.afterRender.push(q$B(this,o,y))}return T$x.length=0,n},Object.defineProperties(a$w.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}}}),a$w.prototype.setValue=function(e,t){if(!e$2e(e))throw new t$15("name is required.");var i="u_"+e,n=this._uniformMap.values[i];if(!e$2e(n))throw new t$15("name must match a parameter name in the material's technique that is targetable and not optimized out.");n.value=n.clone(t,n.value)},a$w.prototype.getValue=function(e){if(!e$2e(e))throw new t$15("name is required.");var t="u_"+e,i=this._uniformMap.values[t];if(e$2e(i))return i.value},Object.defineProperties(a$v.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},materials:{get:function(){return this._materials}}}),Object.defineProperties(r$z.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._model._perNodeShowDirty=!0)}},matrix:{get:function(){return this._matrix},set:function(e){this._matrix=p$1d.clone(e,this._matrix),this.useMatrix=!0;var t=this._model;t._cesiumAnimationsDirty=!0,this._runtimeNode.dirtyNumber=t._maxDirtyNumber}},originalMatrix:{get:function(){return this._originalMatrix}}}),r$z.prototype.setMatrix=function(e){p$1d.clone(e,this._matrix)};var $$w="varying vec2 v_textureCoordinates;\n\nuniform float originalSize;\nuniform sampler2D texture0;\nuniform sampler2D texture1;\nuniform sampler2D texture2;\nuniform sampler2D texture3;\nuniform sampler2D texture4;\nuniform sampler2D texture5;\n\nconst float yMipLevel1 = 1.0 - (1.0 / pow(2.0, 1.0));\nconst float yMipLevel2 = 1.0 - (1.0 / pow(2.0, 2.0));\nconst float yMipLevel3 = 1.0 - (1.0 / pow(2.0, 3.0));\nconst float yMipLevel4 = 1.0 - (1.0 / pow(2.0, 4.0));\n\nvoid main()\n{\n vec2 uv = v_textureCoordinates;\n vec2 textureSize = vec2(originalSize * 1.5 + 2.0, originalSize);\n vec2 pixel = 1.0 / textureSize;\n\n float mipLevel = 0.0;\n\n if (uv.x - pixel.x > (textureSize.y / textureSize.x))\n {\n mipLevel = 1.0;\n if (uv.y - pixel.y > yMipLevel1)\n {\n mipLevel = 2.0;\n if (uv.y - pixel.y * 3.0 > yMipLevel2)\n {\n mipLevel = 3.0;\n if (uv.y - pixel.y * 5.0 > yMipLevel3)\n {\n mipLevel = 4.0;\n if (uv.y - pixel.y * 7.0 > yMipLevel4)\n {\n mipLevel = 5.0;\n }\n }\n }\n }\n }\n\n if (mipLevel > 0.0)\n {\n float scale = pow(2.0, mipLevel);\n\n uv.y -= (pixel.y * (mipLevel - 1.0) * 2.0);\n uv.x *= ((textureSize.x - 2.0) / textureSize.y);\n\n uv.x -= 1.0 + pixel.x;\n uv.y -= (1.0 - (1.0 / pow(2.0, mipLevel - 1.0)));\n uv *= scale;\n }\n else\n {\n uv.x *= (textureSize.x / textureSize.y);\n }\n\n vec4 color0 = texture2D(texture0, uv);\n vec4 color1 = texture2D(texture1, uv);\n vec4 color2 = texture2D(texture2, uv);\n vec4 color3 = texture2D(texture3, uv);\n vec4 color4 = texture2D(texture4, uv);\n vec4 color5 = texture2D(texture5, uv);\n\n if(mipLevel == 0.0)\n {\n gl_FragColor = color0;\n }\n else if(mipLevel == 1.0)\n {\n gl_FragColor = color1;\n }\n else if(mipLevel == 2.0)\n {\n gl_FragColor = color2;\n }\n else if(mipLevel == 3.0)\n {\n gl_FragColor = color3;\n }\n else if(mipLevel == 4.0)\n {\n gl_FragColor = color4;\n }\n else if(mipLevel == 5.0)\n {\n gl_FragColor = color5;\n }\n else\n {\n gl_FragColor = vec4(0.0);\n }\n}\n",z$x="varying vec3 v_cubeMapCoordinates;\nuniform samplerCube cubeMap;\n\nvoid main()\n{\n vec4 rgba = textureCube(cubeMap, v_cubeMapCoordinates);\n #ifdef RGBA_NORMALIZED\n gl_FragColor = vec4(rgba.rgb, 1.0);\n #else\n float m = rgba.a * 16.0;\n vec3 r = rgba.rgb * m;\n gl_FragColor = vec4(r * r, 1.0);\n #endif\n}\n",Q$x="attribute vec4 aPosition;\nattribute vec3 cubeMapCoordinates;\n\nvarying vec3 v_cubeMapCoordinates;\n\nvoid main()\n{\n gl_Position = aPosition;\n v_cubeMapCoordinates = cubeMapCoordinates;\n}\n";function u$A(e){this._url=e,this._cubeMapBuffers=void 0,this._cubeMaps=void 0,this._texture=void 0,this._mipTextures=void 0,this._va=void 0,this._sp=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._readyPromise=o$1l.defer()}var J$t=/(^data:image\/ktx)|(\.ktx$)/i,ee$o=/(^data:image\/ktx2)|(\.ktx2$)/i;Object.defineProperties(u$A.prototype,{url:{get:function(){return this._url}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),u$A.isSupported=function(e){return e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat};for(var te$l=new o$1p(1,0,0),re$q=new o$1p(0,0,1),ie$k=new o$1p(-1,0,0),ae$i=new o$1p(0,0,-1),d$G=new o$1p(0,1,0),oe$g=new o$1p(0,-1,0),C$B=[d$G,ie$k,re$q,oe$g,te$l,d$G,ae$i,d$G,d$G],L$C=C$B.length,D$w=new Float32Array(3*L$C),F$C=0,_$t=0;_$t<L$C;++_$t,F$C+=3)o$1p.pack(C$B[_$t],D$w,F$C);var ne$k=new Float32Array([-1,1,-1,0,0,1,0,0,1,0,1,1,0,-1,-1,-1,1,-1]),se$f=new Uint16Array([0,1,2,2,3,1,7,6,1,3,6,1,2,5,4,3,4,2,4,8,6,3,4,6]);function ue$i(e){var t=t$X.createVertexBuffer({context:e,typedArray:ne$k,usage:A$18.STATIC_DRAW}),i=t$X.createVertexBuffer({context:e,typedArray:D$w,usage:A$18.STATIC_DRAW}),n=t$X.createIndexBuffer({context:e,typedArray:se$f,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});return new c$13({context:e,attributes:[{name:"aPosition",index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:S$14.FLOAT},{name:"cubeMapCoordinates",index:1,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:S$14.FLOAT}],indexBuffer:n})}function O$r(e){return function(){return e}}function x$E(e){e._va=e._va&&e._va.destroy(),e._sp=e._sp&&e._sp.destroy(),e._atlasSp=e._atlasSp&&e._atlasSp.destroy();var t,i,n=e._cubeMaps;if(e$2e(n))for(i=n.length,t=0;t<i;++t)n[t].destroy();var r=e._mipTextures;if(e$2e(r))for(i=r.length,t=0;t<i;++t)r[t].destroy();e._va=void 0,e._sp=void 0,e._atlasSp=void 0,e._cubeMaps=void 0,e._cubeMapBuffers=void 0,e._mipTextures=void 0}function f$F(e){return e$L.shader(e,(function(e){n$q(e)})),e$L.buffer(e,(function(e){n$q(e)})),e$L.image(e,(function(e){n$q(e),e$L.compressedImage(e,(function(e){n$q(e)}))})),n$q(e),e}function n$q(e){!e$2e(e.extras)||(e$2e(e.extras._pipeline)&&delete e.extras._pipeline,0===Object.keys(e.extras).length&&delete e.extras)}u$A.prototype.update=function(e){var t=e.context;if(!u$A.isSupported(t)||(e$2e(this._texture)&&e$2e(this._va)&&x$E(this),e$2e(this._texture)))return;if(!e$2e(this._texture)&&!this._loading){var i=t.textureCache.getTexture(this._url);if(e$2e(i))return x$E(this),this._texture=i,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0,void this._readyPromise.resolve()}var n=this._cubeMapBuffers;if(!e$2e(n)&&!this._loading){var r=this;J$t.test(this._url)?k$W(this._url).then((function(e){r._cubeMapBuffers=e,r._loading=!1})).otherwise(this._readyPromise.reject):ee$o.test(this._url)&&f$U(this._url).then((function(e){r._cubeMapBuffers=e,r._loading=!1})).otherwise(this._readyPromise.reject),this._loading=!0}if(!e$2e(this._cubeMapBuffers))return;const o=[];let a=n[0].positiveX.pixelDatatype;e$2e(a)?o.push("RGBA_NORMALIZED"):a=t.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT;const s=V$12.RGBA,l=new s$V({defines:o,sources:[z$x]});this._va=ue$i(t),this._sp=r$14.fromCache({name:"OctahedralProjection",context:t,vertexShaderSource:Q$x,fragmentShaderSource:l,attributeLocations:{aPosition:0,cubeMapCoordinates:1}});var u=Math.min(n.length,6);this._maximumMipmapLevel=u-1;for(var c=this._cubeMaps=new Array(u),h=this._mipTextures=new Array(u),d=2*n[0].positiveX.width,f={originalSize:function(){return d}},p=0;p<u;++p){var _=n[p].positiveY;n[p].positiveY=n[p].negativeY,n[p].negativeY=_;var m=c[p]=new e$1P({context:t,source:n[p],pixelDatatype:a}),g=2*c[p].width,x=h[p]=new t$U({context:t,width:g,height:g,pixelDatatype:a,pixelFormat:s}),y=new t$H({name:"OctahedralProjection",vertexArray:this._va,shaderProgram:this._sp,uniformMap:{cubeMap:O$r(m)},outputTexture:x,persists:!0,owner:this});e.commandList.push(y),f["texture"+p]=O$r(x)}this._texture=new t$U({context:t,width:1.5*d+2,height:d,pixelDatatype:a,pixelFormat:s}),this._texture.maximumMipmapLevel=this._maximumMipmapLevel,t.textureCache.addTexture(this._url,this._texture),this._atlasSp=r$14.fromCache({name:"AtlasSP",context:t,vertexShaderSource:ot$8,fragmentShaderSource:$$w,attributeLocations:{aPosition:0,textureCoordinates:1}});var v=new t$H({name:"OctahedralProjectionAtlas",shaderProgram:this._atlasSp,uniformMap:f,outputTexture:this._texture,persists:!1,owner:this});e.commandList.push(v),this._ready=!0,this._readyPromise.resolve()},u$A.prototype.isDestroyed=function(){return!1},u$A.prototype.destroy=function(){return x$E(this),this._texture=this._texture&&this._texture.destroy(),i$11(this)};var Tt$4=new o$1p,O$q=s$v.ModelState,At$4="model/gltf-binary,model/gltf+json;q=0.8,application/json;q=0.2,*/*;q=0.01";function $e$7(e,t){e._cachedGltf=t}function be$f(e){this._gltf=e.gltf,this.ready=e.ready,this.modelsToLoad=[],this.count=0}Object.defineProperties(be$f.prototype,{gltf:{set:function(e){this._gltf=e},get:function(){return this._gltf}}}),be$f.prototype.makeReady=function(e){this.gltf=e;for(var t=this.modelsToLoad,i=t.length,n=0;n<i;++n){var r=t[n];r.isDestroyed()||$e$7(r,this)}this.modelsToLoad=void 0,this.ready=!0};var X$t={},Lr$2={};function F$B(e){var t,i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).cacheKey;if(this._cacheKey=i,this._cachedGltf=void 0,this._releaseGltfJson=u$Z(e.releaseGltfJson,!1),e$2e(i)&&e$2e(X$t[i])&&X$t[i].ready)++(t=X$t[i]).count;else{var n=e.gltf;if(e$2e(n)){if(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),n instanceof Uint8Array)t=new be$f({gltf:O$u(n),ready:!0});else t=new be$f({gltf:e.gltf,ready:!0});t.count=1,e$2e(i)&&(X$t[i]=t)}}$e$7(this,t);var r=u$Z(e.basePath,"");this._resource=t$10.createIfNeeded(r),this.owner=e.owner,this.show=u$Z(e.show,!0),this.silhouetteColor=u$Z(e.silhouetteColor,e$1X.RED),this._silhouetteColor=new e$1X,this._silhouetteColorPreviousAlpha=1,this._normalAttributeName=void 0,this.silhouetteSize=u$Z(e.silhouetteSize,0),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(this.modelMatrix),this._clampedModelMatrix=void 0,this.scale=u$Z(e.scale,1),this._scale=this.scale,this.minimumPixelSize=u$Z(e.minimumPixelSize,0),this._minimumPixelSize=this.minimumPixelSize,this.maximumScale=e.maximumScale,this._maximumScale=this.maximumScale,this.id=e.id,this._id=e.id,this.heightReference=u$Z(e.heightReference,k$R.NONE),this._heightReference=this.heightReference,this._heightChanged=!1,this._removeUpdateHeightCallback=void 0;var o=e.scene;this._scene=o,e$2e(o)&&e$2e(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener((function(){this._heightChanged=!0}),this)),this._pickObject=e.pickObject,this._allowPicking=u$Z(e.allowPicking,!0),this._ready=!1,this._readyPromise=o$1l.defer(),this.activeAnimations=new f$G(this),this.clampAnimations=u$Z(e.clampAnimations,!0),this._defaultTexture=void 0,this._incrementallyLoadTextures=u$Z(e.incrementallyLoadTextures,!0),this._asynchronous=u$Z(e.asynchronous,!0),this.shadows=u$Z(e.shadows,W$X.ENABLED),this._shadows=this.shadows,this.color=u$Z(e.color,e$1X.clone(e$1X.WHITE)),this._color=new e$1X,this._colorPreviousAlpha=1,this.colorBlendMode=u$Z(e.colorBlendMode,I$K.HIGHLIGHT),this.colorBlendAmount=u$Z(e.colorBlendAmount,.5),this._colorShadingEnabled=!1,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._clippingPlanesState=0,this.clippingPlanesOriginMatrix=void 0,this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=u$Z(e.debugWireframe,!1),this._debugWireframe=!1,this._distanceDisplayCondition=e.distanceDisplayCondition,this._addBatchIdToGeneratedShaders=e.addBatchIdToGeneratedShaders,this._precreatedAttributes=e.precreatedAttributes,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=u$Z(e.ignoreCommands,!1),this._requestType=e.requestType,this._upAxis=u$Z(e.upAxis,v$y.Y),this._gltfForwardAxis=v$y.Z,this._forwardAxis=e.forwardAxis,this.cull=u$Z(e.cull,!0),this.opaquePass=u$Z(e.opaquePass,Le$q.OPAQUE),this._computedModelMatrix=new p$1d,this._clippingPlaneModelViewMatrix=p$1d.clone(p$1d.IDENTITY),this._initialRadius=void 0,this._boundingSphere=void 0,this._minCorner=void 0,this._maxCorner=void 0,this._scaledBoundingSphere=new i$1d,this._state=O$q.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._perNodeShowDirty=!1,this._cesiumAnimationsDirty=!1,this._dirty=!1,this._maxDirtyNumber=0,this._runtime={animations:void 0,rootNodes:void 0,nodes:void 0,nodesByName:void 0,skinnedNodes:void 0,meshesByName:void 0,materialsByName:void 0,materialsById:void 0},this._uniformMaps={},this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms={},this._programPrimitives={},this._rendererResources={buffers:{},vertexArrays:{},programs:{},sourceShaders:{},silhouettePrograms:{},textures:{},samplers:{},renderStates:{}},this._cachedRendererResources=void 0,this._loadRendererResourcesFromCache=!1,this._dequantizeInShader=u$Z(e.dequantizeInShader,!0),this._decodedData={},this._cachedGeometryByteLength=0,this._cachedTexturesByteLength=0,this._geometryByteLength=0,this._texturesByteLength=0,this._trianglesLength=0,this._sourceTechniques={},this._sourcePrograms={},this._quantizedVertexShaders={},this._nodeCommands=[],this._pickIds=[],this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0,this._sourceVersion=void 0,this._sourceKHRTechniquesWebGL=void 0,this._imageBasedLightingFactor=new o$1o(1,1),o$1o.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this._lightColor=o$1p.clone(e.lightColor),this._luminanceAtZenith=void 0,this.luminanceAtZenith=u$Z(e.luminanceAtZenith,.2),this._sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._shouldUpdateSpecularMapAtlas=!0,this._specularEnvironmentMapAtlas=void 0,this._useDefaultSphericalHarmonics=!1,this._useDefaultSpecularMaps=!1,this._shouldRegenerateShaders=!1}function Pr$2(e){return e.stencilBuffer}function er$5(e){return!e$1X.equals(e.color,e$1X.WHITE)||e.colorBlendMode!==I$K.HIGHLIGHT}function Rr$1(e){var t=e._clippingPlanes;return e$2e(t)&&t.enabled&&0!==t.length}function It$5(e){return"glTF"===a$F(e)}function rr$6(e,t,i){if(e._state!==O$q.LOADED)throw new t$15("The model is not loaded. Use Model.readyPromise or wait for Model.ready to be true.");if(!e$2e(i))throw new t$15("name is required.");return e._runtime[t][i]}function Bt$6(e){var t=e.gltf,i=e._loadResources;e$L.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function Ft$5(e,t){return function(i){var n=e._loadResources,r=new Uint8Array(i);--n.pendingBufferLoads,e.gltf.buffers[t].extras._pipeline.source=r}}function Dt$5(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;e$L.bufferView(e.gltf,(function(e,t){e.target===de$y.ARRAY_BUFFER&&i.enqueue(t)}));var n=e._loadResources.indexBuffersToCreate,r={};e$L.accessor(e.gltf,(function(e){var i=e.bufferView;e$2e(i)&&(t[i].target===de$y.ELEMENT_ARRAY_BUFFER&&!e$2e(r[i])&&(r[i]=!0,n.enqueue({id:i,componentType:e.componentType})))}))}function Nt$5(e){var t=e.gltf;if(i$E(t,"KHR_techniques_webgl")){var i=e._sourcePrograms,n=e._sourceTechniques,r=t.extensions.KHR_techniques_webgl.programs;e$L.technique(t,(function(e,t){n[t]=l$1f(e);var o=e.program;e$2e(i[o])||(i[o]=l$1f(r[o]))}))}}function Ot$4(e,t,i){return function(n){var r=e._loadResources;r.shaders[i]={source:n,type:t,bufferView:void 0},--r.pendingShaderLoads,e._rendererResources.sourceShaders[i]=n}}function Ut$4(e){var t=e.gltf,i=t.buffers,n=t.bufferViews,r=e._rendererResources.sourceShaders;e$L.shader(t,(function(t,o){if(e$2e(t.bufferView)){var a=t.bufferView,s=n[a],l=s.buffer,u=a$K(i[l].extras._pipeline.source,s.byteOffset,s.byteLength);r[o]=u}else if(e$2e(t.extras._pipeline.source))r[o]=t.extras._pipeline.source;else{++e._loadResources.pendingShaderLoads;var c=e._resource.getDerivedResource({url:t.uri});c.fetchText().then(Ot$4(e,t.type,o)).otherwise(s$v.getFailedLoadFunction(e,"shader",c.url))}}))}function Vt$5(e){var t=e._sourceTechniques;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];e._loadResources.programsToCreate.enqueue({programId:n.program,techniqueId:i})}}function He$a(e,t){return function(i){const n=e._loadResources;let r;--n.pendingTextureLoads,Array.isArray(i)&&(r=i.slice(1,i.length).map((function(e){return e.bufferView})),i=i[0]),n.texturesToCreate.enqueue({id:t,image:i,bufferView:i.bufferView,width:i.width,height:i.height,internalFormat:i.internalFormat,mipLevels:r})}}Object.defineProperties(F$B.prototype,{gltf:{get:function(){return e$2e(this._cachedGltf)?this._cachedGltf.gltf:void 0}},releaseGltfJson:{get:function(){return this._releaseGltfJson}},cacheKey:{get:function(){return this._cacheKey}},basePath:{get:function(){return this._resource.url}},boundingSphere:{get:function(){if(this._state!==O$q.LOADED)throw new t$15("The model is not loaded. Use Model.readyPromise or wait for Model.ready to be true.");var e=this.modelMatrix;this.heightReference!==k$R.NONE&&this._clampedModelMatrix&&(e=this._clampedModelMatrix);var t,i=p$1d.getScale(e,Tt$4);this.scale instanceof o$1p?(t=this.scale,e$2e(this.maximumScale)&&(t.x=Math.min(this.maximumScale,t.x),t.y=Math.min(this.maximumScale,t.y),t.z=Math.min(this.maximumScale,t.z)),o$1p.multiplyComponents(i,t,i)):(t=e$2e(this.maximumScale)?Math.min(this.maximumScale,this.scale):this.scale,o$1p.multiplyByScalar(i,t,i));var n=this._scaledBoundingSphere;return n.center=o$1p.multiplyComponents(this._boundingSphere.center,i,n.center),n.radius=o$1p.maximumComponent(i)*this._initialRadius,e$2e(this._rtcCenter)&&o$1p.add(this._rtcCenter,n.center,n.center),n}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},asynchronous:{get:function(){return this._asynchronous}},allowPicking:{get:function(){return this._allowPicking}},incrementallyLoadTextures:{get:function(){return this._incrementallyLoadTextures}},pendingTextureLoads:{get:function(){return e$2e(this._loadResources)?this._loadResources.pendingTextureLoads:0}},dirty:{get:function(){return this._dirty}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far must be greater than near");this._distanceDisplayCondition=r$Z.clone(e,this._distanceDisplayCondition)}},extensionsUsed:{get:function(){return e$2e(this._extensionsUsed)||(this._extensionsUsed=s$v.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return e$2e(this._extensionsRequired)||(this._extensionsRequired=s$v.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},forwardAxis:{get:function(){return e$2e(this._forwardAxis)?this._forwardAxis:this._gltfForwardAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return this._texturesByteLength}},cachedGeometryByteLength:{get:function(){return this._cachedGeometryByteLength}},cachedTexturesByteLength:{get:function(){return this._cachedTexturesByteLength}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&h$L.setOwner(e,this,"_clippingPlanes")}},pickIds:{get:function(){return this._pickIds}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o$1q.typeOf.object("imageBasedLightingFactor",e),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1);var t=this._imageBasedLightingFactor;e===t||o$1o.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._imageBasedLightingFactor.x>0&&0===e.x||0===this._imageBasedLightingFactor.x&&e.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._imageBasedLightingFactor.y>0&&0===e.y||0===this._imageBasedLightingFactor.y&&e.y>0,o$1o.clone(e,this._imageBasedLightingFactor))}},lightColor:{get:function(){return this._lightColor},set:function(e){var t=this._lightColor;e===t||o$1p.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||e$2e(t)&&!e$2e(e)||e$2e(e)&&!e$2e(t),this._lightColor=o$1p.clone(e,t))}},luminanceAtZenith:{get:function(){return this._luminanceAtZenith},set:function(e){var t=this._luminanceAtZenith;e!==t&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||e$2e(t)&&!e$2e(e)||e$2e(e)&&!e$2e(t),this._luminanceAtZenith=e)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){if(e$2e(e)&&(!Array.isArray(e)||9!==e.length))throw new t$15("sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.");e!==this._sphericalHarmonicCoefficients&&(this._sphericalHarmonicCoefficients=e,this._shouldRegenerateShaders=!0)}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){this._shouldUpdateSpecularMapAtlas=e!==this._specularEnvironmentMaps,this._specularEnvironmentMaps=e}}}),F$B.silhouetteSupported=function(e){return Pr$2(e.context)},F$B.fromGltf=function(e){if(!e$2e(e)||!e$2e(e.url))throw new t$15("options.url is required");var t=e.url;e=l$1f(e);var i=t$10.createIfNeeded(t);e$2e(e.headers)&&e$2e(i)&&(i.headers=e.headers);var n=u$Z(e.basePath,i.clone()),r=t$10.createIfNeeded(n),o=u$Z(e.cacheKey,Lr$2[o$1j(i.url)]);e$2e(o)||(o=e$1T(),Lr$2[o$1j(i.url)]=o),e$2e(e.basePath)&&!e$2e(e.cacheKey)&&(o+=r.url),e.cacheKey=o,e.basePath=r;var a=new F$B(e),s=X$t[o];return e$2e(s)?s.ready||(++s.count,s.modelsToLoad.push(a)):((s=new be$f({ready:!1})).count=1,s.modelsToLoad.push(a),$e$7(a,s),X$t[o]=s,e$2e(i.headers.Accept)||(i.headers.Accept=At$4),i.fetchArrayBuffer().then((function(e){var t=new Uint8Array(e);if(It$5(t)){var i=O$u(t);s.makeReady(i)}else{var n=a$K(t);s.makeReady(JSON.parse(n))}})).otherwise(s$v.getFailedLoadFunction(a,"model",i.url))),a},F$B._gltfCache=X$t,F$B.prototype.getNode=function(e){var t=rr$6(this,"nodesByName",e);return e$2e(t)?t.publicNode:void 0},F$B.prototype.getMesh=function(e){return rr$6(this,"meshesByName",e)},F$B.prototype.getMaterial=function(e){return rr$6(this,"materialsByName",e)};var qt$4=/(^data:image\/ktx)|(\.ktx$)/i,Ht$3=/(^data:image\/crn)|(\.crn$)/i;function zt$3(e,t,i){var n,r=e.gltf,o=r.images;e$L.texture(r,(function(r,a){var s=r.source;e$2e(r.extensions)&&e$2e(r.extensions.EXT_texture_webp)&&i&&(s=r.extensions.EXT_texture_webp.source);var l=o[s],u=l.extras,c=l.bufferView,h=l.mimeType;if(n=l.uri,e$2e(u)&&e$2e(u.compressedImage3DTiles)){var d=u.compressedImage3DTiles.crunch,f=u.compressedImage3DTiles.s3tc,p=u.compressedImage3DTiles.pvrtc1,_=u.compressedImage3DTiles.etc1;t.s3tc&&e$2e(d)?(h=d.mimeType,e$2e(d.bufferView)?c=d.bufferView:n=d.uri):t.s3tc&&e$2e(f)?(h=f.mimeType,e$2e(f.bufferView)?c=f.bufferView:n=f.uri):t.pvrtc&&e$2e(p)?(h=p.mimeType,e$2e(p.bufferView)?c=p.bufferView:n=p.uri):t.etc1&&e$2e(_)&&(h=_.mimeType,e$2e(_.bufferView)?c=_.bufferView:n=_.uri)}if(e$2e(c))e._loadResources.texturesToCreateFromBufferView.enqueue({id:a,image:void 0,bufferView:c,mimeType:h});else{++e._loadResources.pendingTextureLoads;var m=e._resource.getDerivedResource({url:n});(qt$4.test(n)?k$W(m):Ht$3.test(n)?a$P(m,void 0,!0):m.fetchImage()).then(He$a(e,a)).otherwise(s$v.getFailedLoadFunction(e,"image",m.url))}}))}function kt$4(e){var t={},i={},n=[],r=e._loadResources.skinnedNodesIds;e$L.node(e.gltf,(function(o,a){var s={matrix:void 0,translation:void 0,rotation:void 0,scale:void 0,computedShow:!0,transformToRoot:new p$1d,computedMatrix:new p$1d,dirtyNumber:0,commands:[],inverseBindMatrices:void 0,bindShapeMatrix:void 0,joints:[],computedJointMatrices:[],jointName:o.jointName,weights:[],children:[],parents:[],publicNode:void 0};s.publicNode=new r$z(e,o,s,a,s$v.getTransform(o)),t[a]=s,i[o.name]=s,e$2e(o.skin)&&(r.push(a),n.push(s))})),e._runtime.nodes=t,e._runtime.nodesByName=i,e._runtime.skinnedNodes=n}function Gt$3(e){var t=e.gltf,i=e._sourceTechniques,n={},r={},o=e._uniformMaps;e$L.material(t,(function(t,a){o[a]={uniformMap:void 0,values:void 0,jointMatrixUniformName:void 0,morphWeightsUniformName:void 0};var s=new a$w(e,t,a);if(e$2e(t.extensions)&&e$2e(t.extensions.KHR_techniques_webgl)){var l=t.extensions.KHR_techniques_webgl.technique;s._technique=l,s._program=i[l].program,e$L.materialValue(t,(function(e,t){e$2e(s._values)||(s._values={}),s._values[t]=l$1f(e)}))}n[t.name]=s,r[a]=s})),e._runtime.materialsByName=n,e._runtime.materialsById=r}function Wt$5(e){var t={},i=e._runtime.materialsById;e$L.mesh(e.gltf,(function(n,r){t[n.name]=new a$v(n,i,r),(e$2e(e.extensionsUsed.WEB3D_quantized_attributes)||e._dequantizeInShader)&&e$L.meshPrimitive(n,(function(t,i){var n=nr$4(e,t),o=e._programPrimitives[n];e$2e(o)||(o={},e._programPrimitives[n]=o),o[r+".primitive."+i]=t}))})),e._runtime.meshesByName=t}var tr$4=function(){this.id=void 0,this.model=void 0,this.context=void 0};function Tr$2(e,t,i){var n=t._loadResources,r=t.gltf.bufferViews[e];e$2e(r)||(r=n.createdBufferViews[e]);var o=t$X.createVertexBuffer({context:i,typedArray:n.getBuffer(r),usage:A$18.STATIC_DRAW});o.vertexArrayDestroyable=!1,t._rendererResources.buffers[e]=o,t._geometryByteLength+=o.sizeInBytes}tr$4.prototype.set=function(e,t,i){this.id=e,this.model=t,this.context=i},tr$4.prototype.execute=function(){Tr$2(this.id,this.model,this.context)};var ir$5=function(){this.id=void 0,this.componentType=void 0,this.model=void 0,this.context=void 0};function Ar$1(e,t,i,n){var r=i._loadResources,o=i.gltf.bufferViews[e];e$2e(o)||(o=r.createdBufferViews[e]);var a=t$X.createIndexBuffer({context:n,typedArray:r.getBuffer(o),usage:A$18.STATIC_DRAW,indexDatatype:t});a.vertexArrayDestroyable=!1,i._rendererResources.buffers[e]=a,i._geometryByteLength+=a.sizeInBytes}ir$5.prototype.set=function(e,t,i,n){this.id=e,this.componentType=t,this.model=i,this.context=n},ir$5.prototype.execute=function(){Ar$1(this.id,this.componentType,this.model,this.context)};var Ir$4=new tr$4,Br$2=new ir$5;function Kt$3(e,t){var i=e._loadResources;if(0===i.pendingBufferLoads){var n,r=t.context,o=i.vertexBuffersToCreate,a=i.indexBuffersToCreate;if(e.asynchronous){for(;o.length>0&&(Ir$4.set(o.peek(),e,r),t.jobScheduler.execute(Ir$4,i$R.BUFFER));)o.dequeue();for(;a.length>0&&(n=a.peek(),Br$2.set(n.id,n.componentType,e,r),t.jobScheduler.execute(Br$2,i$R.BUFFER));)a.dequeue()}else{for(;o.length>0;)Tr$2(o.dequeue(),e,r);for(;a.length>0;)Ar$1((n=a.dequeue()).id,n.componentType,e,r)}}}function nr$4(e,t){var i=e._runtime.materialsById[t.material];if(e$2e(i))return i._program}function Fr$1(e,t,i){var n,r,o=i._programPrimitives[t];if(!e$2e(o))return e;for(r in o)if(o.hasOwnProperty(r)&&nr$4(i,n=o[r])===t)break;var a=e;if(i.extensionsUsed.WEB3D_quantized_attributes)a=s$v.modifyShaderForQuantizedAttributes(i.gltf,n,e),i._quantizedUniforms[t]=a.uniforms;else{var s=i._decodedData[r];if(!e$2e(s))return a;a=s$v.modifyShaderForDracoQuantizedAttributes(i.gltf,n,e,s.attributes)}return i._programPrimitives[t]=void 0,a.shader}function jt$2(e){return e=s$V.replaceMain(e,"gltf_blend_main"),e+="uniform vec4 gltf_color; \nuniform float gltf_colorBlend; \nvoid main() \n{ \n gltf_blend_main(); \n gl_FragColor.rgb = mix(gl_FragColor.rgb, gltf_color.rgb, gltf_colorBlend); \n float highlight = ceil(gltf_colorBlend); \n gl_FragColor.rgb *= mix(gltf_color.rgb, vec3(1.0), highlight); \n gl_FragColor.a *= gltf_color.a; \n} \n"}function Me$f(e,t,i){return e$2e(i)&&(e=i(e,t)),e}var ar$4=function(){this.programToCreate=void 0,this.model=void 0,this.context=void 0,this.frameState=void 0};function Dr$1(e,t,i){return i="#include <LightUboDecl>\n"+i,t="#define DIR_LIGHTS "+e.lightSource.directionalLight.length+"\n"+t,i="#define DIR_LIGHTS "+e.lightSource.directionalLight.length+"\n"+i,t="#define POINT_LIGHTS "+e.lightSource.pointLight.length+"\n"+t,i="#define POINT_LIGHTS "+e.lightSource.pointLight.length+"\n"+i,{vs:t="#define SPOT_LIGHTS "+e.lightSource.spotLight.length+"\n"+t,fs:i="#define SPOT_LIGHTS "+e.lightSource.spotLight.length+"\n"+i}}function Nr$1(e,t,i,n){var r=e.programId,o=e.techniqueId,a=t._sourcePrograms[r],s=t._rendererResources.sourceShaders,l=t._sourceTechniques[o].uniforms,u=s[a.vertexShader],c=s[a.fragmentShader],h=t._quantizedVertexShaders,d=t._toClipCoordinatesGLSL[r];if(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader){var f=h[r];e$2e(f)||(f=Fr$1(u,r,t),h[r]=f),u=f}var p=Me$f(u,r,t._vertexShaderLoaded),_=Me$f(c,r,t._fragmentShaderLoaded);s$Z.isInternetExplorer()||(p=s$v.modifyVertexShaderForLogDepth(p,d),_=s$v.modifyFragmentShaderForLogDepth(_));var m=[];e$2e(t._uniformMapLoaded)||(_="uniform vec4 czm_pickColor;\n"+_);var g=t._imageBasedLightingFactor.x>0||t._imageBasedLightingFactor.y>0;g&&(_="#define USE_IBL_LIGHTING \n\n"+_,m.push("USE_IBL_LIGHTING")),e$2e(t._lightColor)&&(_="#define USE_CUSTOM_LIGHT_COLOR \n\n"+_,m.push("USE_CUSTOM_LIGHT_COLOR")),e$2e(t.owner)&&t.owner._swipeEnabled&&(_="#define APPLY_SWIPE \n\n"+_,m.push("APPLY_SWIPE"));var x=Dr$1(n,p,_);if(p=x.vs,_=x.fs,("2.0"!==t._sourceVersion||t._sourceKHRTechniquesWebGL)&&(_=s$V.replaceMain(_,"non_gamma_corrected_main"),_+="\nvoid main() { \n non_gamma_corrected_main(); \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),u$A.isSupported(i)){var y=e$2e(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,v=e$2e(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps;(y||v||g)&&(_="uniform mat4 gltf_clippingPlanesMatrix; \n"+_),e$2e(t._sphericalHarmonicCoefficients)?(_="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+_,m.push("DIFFUSE_IBL"),m.push("CUSTOM_SPHERICAL_HARMONICS")):t._useDefaultSphericalHarmonics&&(_="#define DIFFUSE_IBL \n"+_,m.push("DIFFUSE_IBL")),e$2e(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?(_="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+_,m.push("SPECULAR_IBL"),m.push("CUSTOM_SPECULAR_IBL")):t._useDefaultSpecularMaps&&(_="#define SPECULAR_IBL \n"+_,m.push("SPECULAR_IBL"))}e$2e(t._luminanceAtZenith)&&(_="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+_,m.push("USE_SUN_LUMINANCE"));var $=Object.getOwnPropertyNames(l),b=new s$V({name:"gltfVp_"+a.vertexShader+":uniform:{"+$.join(",")+"}",sources:[p],defines:m});Or$1(r,o,new s$V({name:"gltfFp_"+a.fragmentShader+":uniform:{"+$.join(",")+"}",sources:[_],defines:m}),b,t,i)}function Yt$2(e,t,i,n){var r=e.programId,o=e.techniqueId,a=t._sourcePrograms[r],s=t._rendererResources.sourceShaders,l=t._quantizedVertexShaders,u=t._toClipCoordinatesGLSL[r],c=t.clippingPlanes,h=Rr$1(t),d=s[a.vertexShader],f=s[a.fragmentShader];(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader)&&(d=l[r]);var p=f;er$5(t)&&(p=F$B._modifyShaderForColor(p)),h&&(p=Yi$2(p,c,i));var _=Me$f(d,r,t._vertexShaderLoaded),m=Me$f(p,r,t._fragmentShaderLoaded);s$Z.isInternetExplorer()||(_=s$v.modifyVertexShaderForLogDepth(_,u),m=s$v.modifyFragmentShaderForLogDepth(m));var g=[];e$2e(t._uniformMapLoaded)||(m="uniform vec4 czm_pickColor;\n"+m);var x=t._imageBasedLightingFactor.x>0||t._imageBasedLightingFactor.y>0;x&&(m="#define USE_IBL_LIGHTING \n\n"+m,g.push("USE_IBL_LIGHTING")),e$2e(t._lightColor)&&(m="#define USE_CUSTOM_LIGHT_COLOR \n\n"+m,g.push("USE_CUSTOM_LIGHT_COLOR")),e$2e(t.owner)&&t.owner._swipeEnabled&&(m="#define APPLY_SWIPE \n\n"+m,g.push("APPLY_SWIPE"));var y=Dr$1(n,_,m);if(_=y.vs,m=y.fs,("2.0"!==t._sourceVersion||t._sourceKHRTechniquesWebGL)&&(m=s$V.replaceMain(m,"non_gamma_corrected_main"),m+="\nvoid main() { \n non_gamma_corrected_main(); \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),u$A.isSupported(i)){var v=e$2e(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,$=e$2e(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps;!h&&(v||$||x)&&(m="uniform mat4 gltf_clippingPlanesMatrix; \n"+m),e$2e(t._sphericalHarmonicCoefficients)?(m="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+m,g.push("DIFFUSE_IBL"),g.push("CUSTOM_SPHERICAL_HARMONICS")):t._useDefaultSphericalHarmonics&&(m="#define DIFFUSE_IBL \n"+m,g.push("DIFFUSE_IBL")),e$2e(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?(m="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+m,g.push("SPECULAR_IBL"),g.push("CUSTOM_SPECULAR_IBL")):t._useDefaultSpecularMaps&&(m="#define SPECULAR_IBL \n"+m,g.push("SPECULAR_IBL"))}e$2e(t._luminanceAtZenith)&&(m="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+m,g.push("USE_SUN_LUMINANCE"));var b=new s$V({name:"gltfVp_"+a.vertexShader,sources:[_],defines:g});Or$1(r,o,new s$V({name:"gltfFp_"+a.fragmentShader,sources:[m],defines:g}),b,t,i)}function Or$1(e,t,i,n,r,o){var a=r._sourceTechniques[t],s=s$v.createAttributeLocations(a,r._precreatedAttributes);r._rendererResources.programs[e]=r$14.fromCache({context:o,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:s}),o.webgpu&&r._rendererResources.programs[e]._createEffect()}ar$4.prototype.set=function(e,t,i,n){this.programToCreate=e,this.model=t,this.context=i,this.frameState=n},ar$4.prototype.execute=function(){Nr$1(this.programToCreate,this.model,this.context,this.frameState)};var Ur$3=new ar$4;function Zt$1(e,t){var i=e._loadResources,n=i.programsToCreate;if(0===i.pendingShaderLoads&&0===i.pendingBufferLoads){var r=t.context;if(e.asynchronous)for(;n.length>0&&(Ur$3.set(n.peek(),e,r,t),t.jobScheduler.execute(Ur$3,i$R.PROGRAM));)n.dequeue();else for(;n.length>0;)Nr$1(n.dequeue(),e,r)}}function Jt$2(e,t){return function(i){e.texturesToCreate.enqueue({id:t.id,image:i,bufferView:void 0}),--e.pendingBufferViewToImage}}function Qt$3(e){var t=e._loadResources;if(0===t.pendingBufferLoads)for(;t.texturesToCreateFromBufferView.length>0;){var i=t.texturesToCreateFromBufferView.dequeue(),n=e.gltf,r=n.bufferViews[i.bufferView];n.textures[i.id].source;var o=s$v.getFailedLoadFunction(e,"image","id: "+i.id+", bufferView: "+i.bufferView);if("image/ktx"===i.mimeType)k$W(t.getBuffer(r)).then(He$a(e,i.id)).otherwise(o),++e._loadResources.pendingTextureLoads;else if("image/ktx2"===i.mimeType){f$U(new Uint8Array(t.getBuffer(r))).then(He$a(e,i.id)),++e._loadResources.pendingTextureLoads}else if("image/crn"===i.mimeType){var a=a$P(t.getBuffer(r),void 0,!0);e$2e(a)&&a.then(He$a(e,i.id)).otherwise(o),++e._loadResources.pendingTextureLoads}else{var s=Jt$2(t,i);w$R({uint8Array:t.getBuffer(r),format:i.mimeType,flipY:!1}).then(s).otherwise(o),++t.pendingBufferViewToImage}}}function Xt$1(e){var t=e._loadResources;if(t.createSamplers){t.createSamplers=!1;var i=e._rendererResources.samplers;e$L.sampler(e.gltf,(function(e,t){i[t]=new e$1S({wrapS:e.wrapS,wrapT:e.wrapT,minificationFilter:e.minFilter,magnificationFilter:e.magFilter})}))}}var sr$4=function(){this.gltfTexture=void 0,this.model=void 0,this.context=void 0};function Vr$1(e,t,i){var n=t.gltf.textures[e.id],r=t._rendererResources.samplers[n.sampler];r=u$Z(r,new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT}));var o,a=e.internalFormat,s=!(e$2e(a)&&V$12.isCompressedFormat(a)||r.minificationFilter!==tt$i.NEAREST_MIPMAP_NEAREST&&r.minificationFilter!==tt$i.NEAREST_MIPMAP_LINEAR&&r.minificationFilter!==tt$i.LINEAR_MIPMAP_NEAREST&&r.minificationFilter!==tt$i.LINEAR_MIPMAP_LINEAR),l=s||r.wrapS===q$1a.REPEAT||r.wrapS===q$1a.MIRRORED_REPEAT||r.wrapT===q$1a.REPEAT||r.wrapT===q$1a.MIRRORED_REPEAT,u=e.image;if(e$2e(a))o=new t$U({context:i,source:{arrayBufferView:e.bufferView,mipLevels:e.mipLevels},width:e.width,height:e.height,pixelFormat:a,sampler:r});else if(e$2e(u)){var c=!e$2d.isPowerOfTwo(u.width)||!e$2d.isPowerOfTwo(u.height);if(l&&c){var h=document.createElement("canvas");h.width=e$2d.nextPowerOfTwo(u.width),h.height=e$2d.nextPowerOfTwo(u.height),h.getContext("2d").drawImage(u,0,0,u.width,u.height,0,0,h.width,h.height),u=h}o=new t$U({context:i,source:u,pixelFormat:n.internalFormat,pixelDatatype:n.type,sampler:r,flipY:!1}),s&&o.generateMipmap()}e$2e(o)&&(t._rendererResources.textures[e.id]=o,t._texturesByteLength+=o.sizeInBytes)}sr$4.prototype.set=function(e,t,i){this.gltfTexture=e,this.model=t,this.context=i},sr$4.prototype.execute=function(){Vr$1(this.gltfTexture,this.model,this.context)};var qr$1=new sr$4;function $t$1(e,t){var i=t.context,n=e._loadResources.texturesToCreate;if(e.asynchronous)for(;n.length>0&&(qr$1.set(n.peek(),e,i),t.jobScheduler.execute(qr$1,i$R.TEXTURE));)n.dequeue();else for(;n.length>0;)Vr$1(n.dequeue(),e,i)}function ei$2(e,t){var i,n,r=e._sourceTechniques,o={},a=e._runtime.materialsById[t.material];if(!e$2e(a))return o;var s=r[a._technique];if(!e$2e(s))return o;var l=s.attributes,u=e._rendererResources.programs[s.program],c=u.vertexAttributes,h=u._attributeLocations;for(i in c)if(c.hasOwnProperty(i)){var d=l[i];e$2e(d)&&(n=h[i],o[d.semantic]={index:n,nameInProgram:i})}var f=e._precreatedAttributes;if(e$2e(f))for(i in f)f.hasOwnProperty(i)&&(n=h[i],o[i]={index:n,nameInProgram:i});return o}function ri$2(e,t){for(var i=e.gltf,n=i.skins,r=i.nodes,o=e._runtime.nodes,a=e._loadResources.skinnedNodesIds,s=a.length,l=0;l<s;++l){var u=a[l],c=o[u],h=r[u],d=t[h.skin];c.inverseBindMatrices=d.inverseBindMatrices,c.bindShapeMatrix=d.bindShapeMatrix;for(var f=n[h.skin].joints,p=f.length,_=0;_<p;++_){var m=o[f[_]];c.joints.push(m)}}}function ti$2(e){var t=e._loadResources;if(0===t.pendingBufferLoads&&t.createSkins){t.createSkins=!1;var i=e.gltf,n=i.accessors,r={};e$L.skin(i,(function(t,i){var o,a=n[t.inverseBindMatrices];p$1d.equals(t.bindShapeMatrix,p$1d.IDENTITY)||(o=p$1d.clone(t.bindShapeMatrix)),r[i]={inverseBindMatrices:S$u.getSkinInverseBindMatrices(e,a),bindShapeMatrix:o}})),ri$2(e,r)}}function ii$2(e,t,i,n){return function(r){e$2e(n)&&(r=e.clampAnimations?n.clampTime(r):n.wrapTime(r),t[i]=n.evaluate(r,t[i]),t.dirtyNumber=e._maxDirtyNumber)}}function ni$2(e){var t=e._loadResources;if(t.finishedPendingBufferLoads()&&t.createRuntimeAnimations){t.createRuntimeAnimations=!1,e._runtime.animations=[];var i=e._runtime.nodes,n=e.gltf.accessors;e$L.animation(e.gltf,(function(t,r){for(var o=t.channels,a=t.samplers,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=o.length,c=new Array(u),h=0;h<u;++h){var d=o[h],f=d.target,p=f.path,_=a[d.sampler],m=S$u.getAnimationParameterValues(e,n[_.input]),g=S$u.getAnimationParameterValues(e,n[_.output]);s=Math.min(s,m[0]),l=Math.max(l,m[m.length-1]);var x=S$u.getAnimationSpline(e,r,t,d.sampler,_,m,p,g);c[h]=ii$2(e,i[f.node],f.path,x)}e._runtime.animations[r]={name:t.name,startTime:s,stopTime:l,channelEvaluators:c}}))}}function Hr$1(e){console.log("webgpu引擎要求顶点属性是4字节的倍数, gltf数据中的"+e+"顶点属性不符合要求,不能显示.")}function zr$3(e,t){var i=e._loadResources;if(i.finishedBuffersCreation()&&i.finishedProgramCreation()&&i.createVertexArrays){i.createVertexArrays=!1;var n=e._rendererResources.buffers,r=e._rendererResources.vertexArrays,o=e.gltf,a=o.accessors;e$L.mesh(o,(function(i,s){e$L.meshPrimitive(i,(function(i,l){var u,c=[],h=ei$2(e,i),d=e._decodedData[s+".primitive."+l];e$L.meshPrimitiveAttribute(i,(function(e,i){if(e$2e(h[i])){if(u=h[i].index,e$2e(d)){var r=d.attributes;if(r.hasOwnProperty(i)){var s=r[i];return t.webgpu&&s.byteStride%4!=0&&Hr$1(h[i].nameInProgram),void c.push({name:h[i].nameInProgram,index:u,vertexBuffer:n[s.bufferView],componentsPerAttribute:s.componentsPerAttribute,componentDatatype:s.componentDatatype,normalize:s.normalized,offsetInBytes:s.byteOffset,strideInBytes:s.byteStride})}}var l=a[e],f=p$A(o,l);t.webgpu&&f%4!=0&&Hr$1(h[i].nameInProgram);var p=e$2e(l.normalized)&&l.normalized;c.push({name:h[i].nameInProgram,index:u,vertexBuffer:n[l.bufferView],componentsPerAttribute:r$B(l.type),componentDatatype:l.componentType,normalize:p,offsetInBytes:l.byteOffset,strideInBytes:f})}}));var f,p,_,m=e._precreatedAttributes;if(e$2e(m))for(p in m)m.hasOwnProperty(p)&&e$2e(h[p])&&(u=h[p].index,(f=m[p]).index=u,c.push(f));if(e$2e(i.indices)){var g=a[i.indices].bufferView;e$2e(d)&&(g=d.bufferView),_=n[g]}r[s+".primitive."+l]=new c$13({context:t,attributes:c,indexBuffer:_})}))}))}}function ai$3(e){var t=e._loadResources;t.createRenderStates&&(t.createRenderStates=!1,e$L.material(e.gltf,(function(t,i){si$2(e,t,i)})))}function si$2(e,t,i){var n=e._rendererResources.renderStates,r=[de$y.FUNC_ADD,de$y.FUNC_ADD],o=[de$y.ONE,de$y.ONE_MINUS_SRC_ALPHA,de$y.ONE,de$y.ONE_MINUS_SRC_ALPHA];e$2e(t.extensions)&&e$2e(t.extensions.KHR_blend)&&(r=t.extensions.KHR_blend.blendEquation,o=t.extensions.KHR_blend.blendFactors);var a=!t.doubleSided,s="BLEND"===t.alphaMode;n[i]=d$1m.fromCache({cull:{enabled:a},depthTest:{enabled:!0},depthMask:!s,blending:{enabled:s,equationRgb:r[0],equationAlpha:r[1],functionSourceRgb:o[0],functionDestinationRgb:o[1],functionSourceAlpha:o[2],functionDestinationAlpha:o[3]},stencilTest:{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.REPLACE},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.REPLACE},reference:u$M.MODEL,mask:65535}})}var oi$2={MODEL:function(e,t,i){return function(){return i.computedMatrix}},VIEW:function(e,t,i){return function(){return e.view}},PROJECTION:function(e,t,i){return function(){return e.projection}},MODELVIEW:function(e,t,i){var n=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n)}},CESIUM_RTC_MODELVIEW:function(e,t,i){var n=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.setTranslation(n,t._rtcCenterEye,n)}},MODELVIEWPROJECTION:function(e,t,i){var n=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.multiply(e._projection,n,n)}},MODELINVERSE:function(e,t,i){var n=new p$1d;return function(){return p$1d.inverse(i.computedMatrix,n)}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t,i){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t,i){var n=new p$1d,r=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.inverse(n,r)}},MODELVIEWPROJECTIONINVERSE:function(e,t,i){var n=new p$1d,r=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.multiply(e._projection,n,n),p$1d.inverse(n,r)}},MODELINVERSETRANSPOSE:function(e,t,i){var n=new p$1d,r=new p$1e;return function(){return p$1d.inverse(i.computedMatrix,n),p$1d.getRotation(n,r),p$1e.transpose(r,r)}},MODELVIEWINVERSETRANSPOSE:function(e,t,i){var n=new p$1d,r=new p$1d,o=new p$1e;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.inverse(n,r),p$1d.getRotation(r,o),p$1e.transpose(o,o)}},VIEWPORT:function(e,t,i){return function(){return e.viewportCartesian4}}};function ui$4(e,t,i,n){var r=t._runtime.nodes[e];return oi$2[i](n,t,r)}function ci$5(e,t,i,n,r,o,a){var s,l,u={},c={};return e$L.techniqueUniform(i,(function(i,h){var d;if(e$2e(n)&&e$2e(n[h]))d=s$v.createUniformFunction(i.type,n[h],o,a,i.extensionType),u[h]=d.func,c[h]=d;else if(e$2e(i.node))u[h]=ui$4(i.node,e,i.semantic,r.uniformState);else if(e$2e(i.semantic))if("JOINTMATRIX"===i.semantic)s=h;else if("MORPHWEIGHTS"===i.semantic)l=h;else if("ALPHACUTOFF"===i.semantic){var f=t.alphaMode;if(e$2e(f)&&"MASK"===f){var p=u$Z(t.alphaCutoff,.5);d=s$v.createUniformFunction(i.type,p,o,a,i.extensionType),u[h]=d.func,c[h]=d}}else u[h]=s$v.getGltfSemanticUniforms()[i.semantic](r.uniformState,e);else if(e$2e(i.value)){var _=s$v.createUniformFunction(i.type,i.value,o,a,i.extensionType);u[h]=_.func,c[h]=_}})),{map:u,values:c,jointMatrixUniformName:s,morphWeightsUniformName:l}}function fi$4(e,t){var i=e._loadResources;if(i.finishedProgramCreation()&&i.createUniformMaps){i.createUniformMaps=!1;var n=e.gltf,r=e._sourceTechniques,o=e._uniformMaps,a=e._rendererResources.textures,s=e._defaultTexture;e$L.material(n,(function(i,n){var l=e._runtime.materialsById[n],u=r[l._technique],c=l._values,h=ci$5(e,i,u,c,t,a,s),d=o[n];d.uniformMap=h.map,d.values=h.values,d.jointMatrixUniformName=h.jointMatrixUniformName,d.morphWeightsUniformName=h.morphWeightsUniformName}))}}function hi$4(e){return s$v.createUniformsForDracoQuantizedAttributes(e.attributes)}function li$3(e,t){var i=nr$4(e,t),n=e._quantizedUniforms[i];return s$v.createUniformsForQuantizedAttributes(e.gltf,t,n)}function di$4(e){return function(){return e}}function pi$5(e){return function(){return e.computedJointMatrices}}function _i$5(e){return function(){return e.weights}}function gi$5(e){return function(){return e.silhouetteColor}}function vi$4(e){return function(){return e.silhouetteSize}}function mi$2(e){return function(){return e.color}}var xi$4=new p$1d;function yi$4(e){return function(){var t=e.clippingPlanes;if(!e$2e(t)&&!e$2e(e._sphericalHarmonicCoefficients)&&!e$2e(e._specularEnvironmentMaps))return p$1d.IDENTITY;var i=e$2e(t)?t.modelMatrix:p$1d.IDENTITY;return p$1d.multiply(e._clippingPlaneModelViewMatrix,i,xi$4)}}function Si$3(e){return function(){var t=e.clippingPlanes;return e$2e(t)&&t.enabled?t.texture:e._defaultTexture}}function Ci$4(e){return function(){var t=e.clippingPlanes;if(!e$2e(t))return e$1X.WHITE.withAlpha(0);var i=e$1X.clone(t.edgeColor);return i.alpha=t.edgeWidth,i}}function Ei$4(e){return function(){return I$K.getColorBlend(e.colorBlendMode,e.colorBlendAmount)}}function bi$5(e){return function(){return e._imageBasedLightingFactor}}function Mi$4(e){return function(){return e._lightColor}}function wi$4(e){return function(){return e.luminanceAtZenith}}function Li$2(e){return function(){return e._sphericalHarmonicCoefficients}}function Pi$4(e){return function(){return e._specularEnvironmentMapAtlas.texture}}function Ri$3(e){return function(){return e._specularEnvironmentMapAtlas.texture.dimensions}}function Ti$4(e){return function(){return e._specularEnvironmentMapAtlas.maximumMipmapLevel}}function Ai$3(e,t){switch(e.mode){case W$18.TRIANGLES:return t/3;case W$18.TRIANGLE_STRIP:case W$18.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function Ii$3(e,t,i,n,r,o){for(var a=e._nodeCommands,s=e._pickIds,l=e.allowPicking,u=e._runtime.meshesByName,c=e._rendererResources,h=c.vertexArrays,d=c.programs,f=c.renderStates,p=e._uniformMaps,_=e.gltf,m=_.accessors,g=_.meshes,x=t.mesh,y=g[x],v=y.primitives,$=v.length,b=0;b<$;++b){var T,C=v[b],S=m[C.indices],w=e._runtime.materialsById[C.material]._program,E=e._decodedData[x+".primitive."+b],P=C.attributes.POSITION;if(e$2e(P)){var A=s$v.getAccessorMinMax(_,P);T=i$1d.fromCornerPoints(o$1p.fromArray(A.min),o$1p.fromArray(A.max))}var L,M,R=h[x+".primitive."+b];if(e$2e(E))M=E.numberOfIndices,L=0;else if(e$2e(S))M=S.count,L=S.byteOffset/ce$z.getSizeInBytes(S.componentType);else{M=m[C.attributes.POSITION].count,L=0}e._trianglesLength+=Ai$3(C,M);var O=p[C.material],D=O.uniformMap;if(e$2e(O.jointMatrixUniformName)){var I={};I[O.jointMatrixUniformName]=pi$5(i),D=p$19(D,I)}if(e$2e(O.morphWeightsUniformName)){var F={};F[O.morphWeightsUniformName]=_i$5(i),D=p$19(D,F)}D=p$19(D,{gltf_color:mi$2(e),gltf_colorBlend:Ei$4(e),gltf_clippingPlanes:Si$3(e),gltf_clippingPlanesEdgeStyle:Ci$4(e),gltf_clippingPlanesMatrix:yi$4(e),gltf_iblFactor:bi$5(e),gltf_lightColor:Mi$4(e),gltf_sphericalHarmonicCoefficients:Li$2(e),gltf_specularMap:Pi$4(e),gltf_specularMapSize:Ri$3(e),gltf_maxSpecularLOD:Ti$4(e),gltf_luminanceAtZenith:wi$4(e)}),D=p$19(D,o.lightSource.createUniformMap()),e$2e(e._uniformMapLoaded)&&(D=e._uniformMapLoaded(D,w,i));var B={};e.extensionsUsed.WEB3D_quantized_attributes?B=li$3(e,C):e._dequantizeInShader&&e$2e(E)&&(B=hi$4(E)),D=p$19(D,B);var N=f[C.material],G=N.blending.enabled,z=e._pickObject;e$2e(z)||(z={primitive:e,id:e.id,node:i.publicNode,mesh:u[y.name]});var U,V=W$X.castShadows(e._shadows),k=W$X.receiveShadows(e._shadows);if(l&&!e$2e(e._uniformMapLoaded))U=n.createPickId(z),s.push(U),D=p$19(D,{czm_pickColor:di$4(U.color)});l&&(U=e$2e(e._pickIdLoaded)&&e$2e(e._uniformMapLoaded)?e._pickIdLoaded():"czm_pickColor");var W,H=new i$$({boundingVolume:new i$1d,cull:e.cull,modelMatrix:new p$1d,primitiveType:C.mode,vertexArray:R,count:M,offset:L,shaderProgram:d[w],castShadows:V,receiveShadows:k,uniformMap:D,renderState:N,owner:z,pass:G?Le$q.TRANSLUCENT:e.opaquePass,pickId:U});H.addUniformBuffer(n.uniformState._lightUBO),r||((W=i$$.shallowClone(H)).boundingVolume=new i$1d,W.modelMatrix=new p$1d);var q={show:!0,boundingSphere:T,command:H,command2D:W,silhouetteModelCommand:void 0,silhouetteModelCommand2D:void 0,silhouetteColorCommand:void 0,silhouetteColorCommand2D:void 0,translucentCommand:void 0,translucentCommand2D:void 0,programId:w};i.commands.push(q),a.push(q)}}function Bi$2(e,t,i,n){var r=e._loadResources;if(r.finishedEverythingButTextureCreation()&&r.createRuntimeNodes){r.createRuntimeNodes=!1;for(var o=[],a=e._runtime.nodes,s=e.gltf,l=s.nodes,u=(s.skins,s.scenes[s.scene].nodes),c=u.length,h=[],d={},f=0;f<c;++f)for(h.push({parentRuntimeNode:void 0,gltfNode:l[u[f]],id:u[f]});h.length>0;){var p=h.pop();d[p.id]=!0;var _=p.parentRuntimeNode,m=p.gltfNode,g=a[p.id];if(0===g.parents.length)if(e$2e(m.matrix))g.matrix=p$1d.fromColumnMajorArray(m.matrix);else{var x=m.rotation;g.translation=o$1p.fromArray(m.translation),g.rotation=n$15.unpack(x),g.scale=o$1p.fromArray(m.scale)}e$2e(_)?(_.children.push(g),g.parents.push(_)):o.push(g),e$2e(m.mesh)&&Ii$3(e,m,g,t,i,n);var y=m.children;if(e$2e(y))for(var v=y.length,$=0;$<v;$++){var b=y[$];d[b]||h.push({parentRuntimeNode:g,gltfNode:l[b],id:y[$]})}}e._runtime.rootNodes=o,e._runtime.nodes=a}}function Fi$2(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&(t+=e[i].sizeInBytes);return t}function Di$4(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&(t+=e[i].sizeInBytes);return t}function kr$3(e,t){var i=t.context,n=t.scene3DOnly,r=e._quantizedVertexShaders,o=e._toClipCoordinatesGLSL={},a=e._sourceTechniques,s=e._sourcePrograms,l=e._rendererResources,u=l.sourceShaders;for(var c in e._loadRendererResourcesFromCache&&(u=l.sourceShaders=e._cachedRendererResources.sourceShaders),a)if(a.hasOwnProperty(c)){var h=a[c].program,d=s[h],f=u[d.vertexShader];if(s$v.checkSupportedGlExtensions(d.glExtensions,i),e.extensionsUsed.WEB3D_quantized_attributes||e._dequantizeInShader){var p=r[h];e$2e(p)||(p=Fr$1(f,h,e),r[h]=p),f=p}f=Me$f(f,h,e._vertexShaderLoaded),o[h]=s$v.toClipCoordinatesGLSL(e.gltf,f)}if(e._loadRendererResourcesFromCache){var _=e._cachedRendererResources;l.buffers=_.buffers,l.vertexArrays=_.vertexArrays,l.programs=_.programs,l.silhouettePrograms=_.silhouettePrograms,l.textures=_.textures,l.samplers=_.samplers,l.renderStates=_.renderStates,e$2e(e._precreatedAttributes)&&zr$3(e,i),e._cachedGeometryByteLength+=Fi$2(_.buffers),e._cachedTexturesByteLength+=Di$4(_.textures)}else Kt$3(e,t),Zt$1(e,t),Xt$1(e),Qt$3(e),$t$1(e,t);ti$2(e),ni$2(e),e._loadRendererResourcesFromCache||(zr$3(e,i),ai$3(e)),fi$4(e,i),Bi$2(e,i,n,t)}function Gr$1(e,t){var i=e.publicNode,n=i.matrix;i.useMatrix&&e$2e(n)?p$1d.clone(n,t):e$2e(e.matrix)?p$1d.clone(e.matrix,t):(p$1d.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t),i.setMatrix(t))}var Wr$1=[],Ni$3=new e$2c,or$3=new p$1d;function Kr$3(e,t,i,n){var r=e._maxDirtyNumber,o=e._runtime.rootNodes,a=o.length,s=Wr$1,l=e._computedModelMatrix;if(e._mode!==C$14.SCENE3D&&!e._ignoreCommands){var u=p$1d.getColumn(l,3,Ni$3);if(e$2c.equals(u,e$2c.UNIT_W)){var c=e.boundingSphere.center,h=m$19.wgs84To2DModelMatrix(n,c,or$3);l=p$1d.multiply(h,l,or$3),e$2e(e._rtcCenter)&&(p$1d.setTranslation(l,e$2c.UNIT_W,l),e._rtcCenter=e._rtcCenter2D)}else l=m$19.basisTo2D(n,l,or$3),e._rtcCenter=e._rtcCenter3D}for(var d=0;d<a;++d){var f=o[d];for(Gr$1(f,f.transformToRoot),s.push(f);s.length>0;){var p=(f=s.pop()).transformToRoot,_=f.commands;if(f.dirtyNumber===r||t||i){var m=p$1d.multiplyTransformation(l,p,f.computedMatrix),g=_.length;if(g>0)for(var x=0;x<g;++x){var y=_[x],v=y.command;p$1d.clone(m,v.modelMatrix),i$1d.transform(y.boundingSphere,v.modelMatrix,v.boundingVolume),e$2e(e._rtcCenter)&&o$1p.add(e._rtcCenter,v.boundingVolume.center,v.boundingVolume.center),e$2e(v=y.command2D)&&e._mode===C$14.SCENE2D&&(p$1d.clone(m,v.modelMatrix),v.modelMatrix[13]-=2*e$2d.sign(v.modelMatrix[13])*e$2d.PI*n.ellipsoid.maximumRadius,i$1d.transform(y.boundingSphere,v.modelMatrix,v.boundingVolume))}}var $=f.children;if(e$2e($))for(var b=$.length,T=0;T<b;++T){var C=$[T];C.dirtyNumber=Math.max(C.dirtyNumber,f.dirtyNumber),(C.dirtyNumber===r||i)&&(Gr$1(C,C.transformToRoot),p$1d.multiplyTransformation(p,C.transformToRoot,C.transformToRoot)),s.push(C)}}}++e._maxDirtyNumber}var ur$2=new p$1d;function jr$2(e){for(var t=e._runtime.skinnedNodes,i=t.length,n=0;n<i;++n){var r=t[n];ur$2=p$1d.inverseTransformation(r.transformToRoot,ur$2);for(var o=r.computedJointMatrices,a=r.joints,s=r.bindShapeMatrix,l=r.inverseBindMatrices,u=l.length,c=0;c<u;++c)e$2e(o[c])||(o[c]=new p$1d),o[c]=p$1d.multiplyTransformation(ur$2,a[c].transformToRoot,o[c]),o[c]=p$1d.multiplyTransformation(o[c],l[c],o[c]),e$2e(s)&&(o[c]=p$1d.multiplyTransformation(o[c],s,o[c]))}}function Oi$3(e){for(var t=e._runtime.rootNodes,i=t.length,n=Wr$1,r=0;r<i;++r){var o=t[r];for(o.computedShow=o.publicNode.show,n.push(o);n.length>0;){for(var a=(o=n.pop()).computedShow,s=o.commands,l=s.length,u=0;u<l;++u)s[u].show=a;var c=o.children;if(e$2e(c))for(var h=c.length,d=0;d<h;++d){var f=c[d];f.computedShow=a&&f.publicNode.show,n.push(f)}}}}function Ui$2(e,t){var i=e.id;if(e._id!==i){e._id=i;for(var n=e._pickIds,r=n.length,o=0;o<r;++o)n[o].object.id=i}}function Vi$4(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?W$18.LINES:W$18.TRIANGLES,i=e._nodeCommands,n=i.length,r=0;r<n;++r)i[r].command.primitiveType=t}}function qi$2(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e.debugShowBoundingVolume,i=e._nodeCommands,n=i.length,r=0;r<n;++r)i[r].command.debugShowBoundingVolume=t}}function Hi$3(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=W$X.castShadows(e.shadows),i=W$X.receiveShadows(e.shadows),n=e._nodeCommands,r=n.length,o=0;o<r;o++){var a=n[o];a.command.castShadows=t,a.command.receiveShadows=i}}}function zi$3(e){var t=l$1f(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=Ee$r.ALPHA_BLEND,d$1m.fromCache(t)}function Yr$2(e){var t=i$$.shallowClone(e);return t.pass=Le$q.TRANSLUCENT,t.renderState=zi$3(e.renderState),t}function Zr$2(e,t,i){var n=t.scene3DOnly,r=e.color.alpha;if(r>0&&r<1){var o=e._nodeCommands,a=o.length;if(!e$2e(o[0].translucentCommand)||i)for(var s=0;s<a;++s){var l=o[s],u=l.command;if(l.translucentCommand=Yr$2(u),!n){var c=l.command2D;l.translucentCommand2D=Yr$2(c)}}}}function ki$3(e,t){var i=e._rendererResources.programs;for(var n in i)if(i.hasOwnProperty(n)&&i[n]===t)return n}function Gi$1(e,t,i){var n=t.vertexShaderSource.sources[0],r=t._attributeLocations,o=e._normalAttributeName;n=s$V.replaceMain(n,"gltf_silhouette_main"),n+="uniform float gltf_silhouetteSize; \nvoid main() \n{ \n gltf_silhouette_main(); \n vec3 n = normalize(czm_normal3D * "+o+"); \n n.x *= czm_projection[0][0]; \n n.y *= czm_projection[1][1]; \n vec4 clip = gl_Position; \n clip.xy += n.xy * clip.w * gltf_silhouetteSize / czm_viewport.z; \n gl_Position = clip; \n}";return r$14.fromCache({context:i.context,vertexShaderSource:n,fragmentShaderSource:"uniform vec4 gltf_silhouetteColor; \nvoid main() \n{ \n gl_FragColor = gltf_silhouetteColor; \n}",attributeLocations:r})}function Jr$2(e,t){return Pr$2(t.context)&&e.silhouetteSize>0&&e.silhouetteColor.alpha>0&&e$2e(e._normalAttributeName)}function Wi$3(e){for(var t=e._nodeCommands,i=t.length,n=0;n<i;++n){if(t[n].command.pass===Le$q.TRANSLUCENT)return!0}return!1}function cr$3(e){return e.color.alpha>0&&e.color.alpha<1}function Qr$2(e){return 0===e.color.alpha}function Xr$2(e,t){return Math.floor(e)!==Math.floor(t)||Math.ceil(e)!==Math.ceil(t)}var Ki$1=0;function ji$3(e,t){for(var i=++Ki$1%255,n=Wi$3(e)||cr$3(e)||e.silhouetteColor.alpha<1,r=e._rendererResources.silhouettePrograms,o=t.scene3DOnly,a=e._nodeCommands,s=a.length,l=0;l<s;++l){var u=a[l],c=u.command,h=cr$3(e)?u.translucentCommand:c,d=i$$.shallowClone(h),f=l$1f(h.renderState);f.stencilTest={enabled:!0,frontFunction:de$y.ALWAYS,backFunction:de$y.ALWAYS,reference:i,mask:65535,frontOperation:{fail:de$y.KEEP,zFail:de$y.KEEP,zPass:de$y.REPLACE},backOperation:{fail:de$y.KEEP,zFail:de$y.KEEP,zPass:de$y.REPLACE}},Qr$2(e)&&(f.colorMask={red:!1,green:!1,blue:!1,alpha:!1},f.depthMask=!1),f=d$1m.fromCache(f),d.renderState=f,u.silhouetteModelCommand=d;var p=i$$.shallowClone(c);(f=l$1f(c.renderState,!0)).depthTest.enabled=!0,f.cull.enabled=!1,n&&(p.pass=Le$q.TRANSLUCENT,f.depthMask=!1,f.blending=Ee$r.ALPHA_BLEND),f.stencilTest={enabled:!0,frontFunction:de$y.NOTEQUAL,backFunction:de$y.NOTEQUAL,reference:i,mask:65535,frontOperation:{fail:de$y.KEEP,zFail:de$y.KEEP,zPass:de$y.KEEP},backOperation:{fail:de$y.KEEP,zFail:de$y.KEEP,zPass:de$y.KEEP}},f=d$1m.fromCache(f);var _=c.shaderProgram,m=ki$3(e,_),g=r[m];e$2e(g)||(g=Gi$1(e,_,t),r[m]=g);var x=p$19(c.uniformMap,{gltf_silhouetteColor:gi$5(e),gltf_silhouetteSize:vi$4(e)});if(p.renderState=f,p.shaderProgram=g,p.uniformMap=x,p.castShadows=!1,p.receiveShadows=!1,u.silhouetteColorCommand=p,!o){var y=u.command2D,v=i$$.shallowClone(d);v.boundingVolume=y.boundingVolume,v.modelMatrix=y.modelMatrix,u.silhouetteModelCommand2D=v;var $=i$$.shallowClone(p);v.boundingVolume=y.boundingVolume,v.modelMatrix=y.modelMatrix,u.silhouetteColorCommand2D=$}}}function Yi$2(e,t,i){return e=s$V.replaceMain(e,"gltf_clip_main"),e+=F$B._getClippingFunction(t,i)+"\n",e+="uniform sampler2D gltf_clippingPlanes; \nuniform mat4 gltf_clippingPlanesMatrix; \nuniform vec4 gltf_clippingPlanesEdgeStyle; \nvoid main() \n{ \n gltf_clip_main(); \n"+p$x("gltf_clippingPlanes","gltf_clippingPlanesMatrix","gltf_clippingPlanesEdgeStyle")+"} \n"}function $r$3(e,t,i){if(Jr$2(e,t)){var n=e._nodeCommands,r=Xr$2(e.color.alpha,e._colorPreviousAlpha)||Xr$2(e.silhouetteColor.alpha,e._silhouetteColorPreviousAlpha)||!e$2e(n[0].silhouetteModelCommand);e._colorPreviousAlpha=e.color.alpha,e._silhouetteColorPreviousAlpha=e.silhouetteColor.alpha,(r||i)&&ji$3(e,t)}}function Zi$2(e,t){var i=e._clippingPlanes;e$2e(i)&&i.owner===e&&i.enabled&&i.update(t)}var fr$2=new i$1d;function Ji$1(e,t,i){return fr$2.center=e,fr$2.radius=t,i.camera.getPixelSize(fr$2,i.context.drawingBufferWidth,i.context.drawingBufferHeight)}var B$u=new o$1p,we$b=new a$18,Qi$1=new o$1p;function Xi$1(e,t){var i=e.scale;if(0!==e.minimumPixelSize){var n=t.context,r=Math.max(n.drawingBufferWidth,n.drawingBufferHeight),o=e$2e(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;if(B$u.x=o[12],B$u.y=o[13],B$u.z=o[14],e$2e(e._rtcCenter)&&o$1p.add(e._rtcCenter,B$u,B$u),e._mode!==C$14.SCENE3D){var a=t.mapProjection,s=a.ellipsoid.cartesianToCartographic(B$u,we$b);a.project(s,B$u),o$1p.fromElements(B$u.z,B$u.x,B$u.y,B$u)}var l=e.boundingSphere.radius,u=Ji$1(B$u,l,t),c=1/u;Math.min(c*(2*l),r)<e.minimumPixelSize&&(i=e.minimumPixelSize*u/(2*e._initialRadius))}return i instanceof o$1p?e$2e(e.maximumScale)&&(i.x=i.x>e.maximumScale?e.maximumScale:i.x,i.y=i.y>e.maximumScale?e.maximumScale:i.y,i.z=i.z>e.maximumScale?e.maximumScale:i.z):(e$2e(e.maximumScale)&&(i=i>e.maximumScale?e.maximumScale:i),i=o$1p.fromElements(i,i,i,Qi$1)),i}function et$8(e){e$2e(e._cacheKey)&&e$2e(e._cachedGltf)&&0==--e._cachedGltf.count&&delete X$t[e._cacheKey],e._cachedGltf=void 0}function hr$2(e,t){this.buffers=void 0,this.vertexArrays=void 0,this.programs=void 0,this.sourceShaders=void 0,this.silhouettePrograms=void 0,this.textures=void 0,this.samplers=void 0,this.renderStates=void 0,this.ready=!1,this.context=e,this.cacheKey=t,this.count=0}function $$v(e){for(var t in e)e.hasOwnProperty(t)&&e[t].destroy()}function $i$2(e){$$v(e.buffers),$$v(e.vertexArrays),$$v(e.programs),$$v(e.silhouettePrograms),$$v(e.textures)}function rt$9(e,t,i){return function(n){if(e.heightReference===k$R.RELATIVE_TO_GROUND){var r=t.cartesianToCartographic(n,we$b);r.height+=i.height,t.cartographicToCartesian(r,n)}var o=e._clampedModelMatrix;p$1d.clone(e.modelMatrix,o),o[12]=n.x,o[13]=n.y,o[14]=n.z,e._heightChanged=!0}}function en$2(e){e$2e(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);var t=e._scene;if(e$2e(t)&&e$2e(t.globe)&&e.heightReference!==k$R.NONE){var i=t.globe,n=i.ellipsoid,r=e.modelMatrix;B$u.x=r[12],B$u.y=r[13],B$u.z=r[14];var o=n.cartesianToCartographic(B$u);e$2e(e._clampedModelMatrix)||(e._clampedModelMatrix=p$1d.clone(r,new p$1d));var a=i._surface;e._removeUpdateHeightCallback=a.updateHeight(o,rt$9(e,n,o));var s=i.getHeight(o);if(e$2e(s)){var l=rt$9(e,n,o);a$18.clone(o,we$b),we$b.height=s,n.cartographicToCartesian(we$b,B$u),l(B$u)}}else{if(e.heightReference!==k$R.NONE)throw new t$15("Height reference is not supported without a scene and globe.");e._clampedModelMatrix=void 0}}hr$2.prototype.release=function(){if(0==--this.count)return e$2e(this.cacheKey)&&delete this.context.cache.modelRendererResourceCache[this.cacheKey],$i$2(this),i$11(this)};var rn$2=new o$1p,tn$2=new a$18;function nn$2(e,t){var i,n=e.distanceDisplayCondition,r=n.near*n.near,o=n.far*n.far;if(t.mode===C$14.SCENE2D){i=.5*(t.camera.frustum.right-t.camera.frustum.left),i*=i}else{var a=p$1d.getTranslation(e.modelMatrix,rn$2);if(t.mode===C$14.COLUMBUS_VIEW){var s=t.mapProjection,l=s.ellipsoid.cartesianToCartographic(a,tn$2);a=s.project(l,a),o$1p.fromElements(a.z,a.x,a.y,a)}i=o$1p.distanceSquared(a,t.camera.positionWC)}return i>=r&&i<=o}var an$2=new o$1p,_e$d=new o$1p,Le$e=new p$1d;function tt$7(e,t){e.programs!==t.programs&&$$v(e.programs),e.silhouettePrograms!==t.silhouettePrograms&&$$v(e.silhouettePrograms)}function sn$2(e,t){var i,n=e._rendererResources,r=e._cachedRendererResources;if(tt$7(n,r),Rr$1(e)||er$5(e)||e._shouldRegenerateShaders){e._shouldRegenerateShaders=!1,n.programs={},n.silhouettePrograms={};var o={},a=e._sourceTechniques;for(var s in a)a.hasOwnProperty(s)&&(o[i=a[s].program]||(o[i]=!0,Yt$2({programId:i,techniqueId:s},e,t.context,t)))}else n.programs=r.programs,n.silhouettePrograms=r.silhouettePrograms;for(var l=n.programs,u=e._nodeCommands,c=u.length,h=0;h<c;++h){var d=u[h],f=l[i=d.programId];d.command.shaderProgram=f,e$2e(d.command2D)&&(d.command2D.shaderProgram=f)}Zr$2(e,t,!0),$r$3(e,t,!0)}function n$p(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._model=void 0,this._batchTable=void 0,this._features=void 0,this._batchIdAttributeName=void 0,this._diffuseAttributeOrUniformName={},this._rtcCenterTransform=void 0,this._contentModelMatrix=void 0,this.featurePropertiesDirty=!1,re$p(this,n,r)}F$B.prototype.update=function(e){if(e.multiViewportIndex>-1&&e$2e(this.id)){var t=this.id.entityCollection;if(e$2e(t)){var i=t.owner;if(e$2e(i)&&typeof i.getVisibleInViewport<"u")if(!i.getVisibleInViewport(e.multiViewportIndex))return}}if(e.mode!==C$14.MORPHING){var n=s$Z.supportsWebPSync();if(e$2e(n)){var r=e.context;if(this._defaultTexture=r.defaultTexture,this._state===O$q.NEEDS_LOAD&&e$2e(this.gltf)){var o,a=this.cacheKey;if(e$2e(a)){r.cache.modelRendererResourceCache=u$Z(r.cache.modelRendererResourceCache,{});var s=r.cache.modelRendererResourceCache;if(e$2e(o=s[this.cacheKey])){if(!o.ready)return;++o.count,this._loadRendererResourcesFromCache=!0}else(o=new hr$2(r,a)).count=1,s[this.cacheKey]=o;this._cachedRendererResources=o}else(o=new hr$2(r)).count=1,this._cachedRendererResources=o;if(this._state=O$q.LOADING,this._state!==O$q.FAILED){var l=this.gltf.extensions;if(e$2e(l)&&e$2e(l.CESIUM_RTC)){var u=o$1p.fromArray(l.CESIUM_RTC.center);if(!o$1p.equals(u,o$1p.ZERO)){this._rtcCenter3D=u;var c=e.mapProjection,h=c.ellipsoid.cartesianToCartographic(this._rtcCenter3D),d=c.project(h);o$1p.fromElements(d.z,d.x,d.y,d),this._rtcCenter2D=d,this._rtcCenterEye=new o$1p,this._rtcCenter=this._rtcCenter3D}}s$z(this.gltf),this._loadResources=new t$t,this._loadRendererResourcesFromCache||s$v.parseBuffers(this,Ft$5)}}var f=this._loadResources,p=this._incrementallyLoadTextures,_=!1;if(this._state===O$q.LOADING){if(0===f.pendingBufferLoads){if(!f.initialized){if(e.brdfLutGenerator.update(e),s$v.checkSupportedExtensions(this.extensionsRequired,n),s$v.updateForwardAxis(this),!this._loadRendererResourcesFromCache){var m=this.gltf;m.extras.sourceVersion=s$v.getAssetVersion(m),m.extras.sourceKHRTechniquesWebGL=e$2e(s$v.getUsedExtensions(m).KHR_techniques_webgl),this._sourceVersion=m.extras.sourceVersion,this._sourceKHRTechniquesWebGL=m.extras.sourceKHRTechniquesWebGL,re$s(m),E$E(m);var g={addBatchIdToGeneratedShaders:this._addBatchIdToGeneratedShaders};ue$l(m,g),he$h(m,g)}this._sourceVersion=this.gltf.extras.sourceVersion,this._sourceKHRTechniquesWebGL=this.gltf.extras.sourceKHRTechniquesWebGL,this._dequantizeInShader=this._dequantizeInShader&&r$A.hasExtension(this),Bt$6(this),Nt$5(this),this._loadRendererResourcesFromCache||(Dt$5(this),Ut$4(this),Vt$5(this),zt$3(this,r,n)),Gt$3(this),Wt$5(this),kt$4(this),r$A.parse(this,r),f.initialized=!0}f.finishedDecoding()||r$A.decodeModel(this,r).otherwise(s$v.getFailedLoadFunction(this,"model",this.basePath)),f.finishedDecoding()&&!f.resourcesParsed&&(this._boundingSphere=s$v.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,r$A.cacheDataForModel(this),f.resourcesParsed=!0),f.resourcesParsed&&0===f.pendingShaderLoads&&kr$3(this,e)}(f.finished()||p&&f.finishedEverythingButTextureCreation())&&(this._state=O$q.LOADED,_=!0)}if(e$2e(f)&&this._state===O$q.LOADED&&(p&&!_&&kr$3(this,e),f.finished())){this._loadResources=void 0;var x=this._rendererResources,y=this._cachedRendererResources;y.buffers=x.buffers,y.vertexArrays=x.vertexArrays,y.programs=x.programs,y.sourceShaders=x.sourceShaders,y.silhouettePrograms=x.silhouettePrograms,y.textures=x.textures,y.samplers=x.samplers,y.renderStates=x.renderStates,y.ready=!0,this._normalAttributeName=s$v.getAttributeOrUniformBySemantic(this.gltf,"NORMAL"),e$2e(this._precreatedAttributes)&&(y.vertexArrays={}),this.releaseGltfJson&&et$8(this)}var v=u$A.isSupported(r);if(this._shouldUpdateSpecularMapAtlas&&v){if(this._shouldUpdateSpecularMapAtlas=!1,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),this._specularEnvironmentMapAtlas=void 0,e$2e(this._specularEnvironmentMaps)){this._specularEnvironmentMapAtlas=new u$A(this._specularEnvironmentMaps);var $=this;this._specularEnvironmentMapAtlas.readyPromise.then((function(){$._shouldRegenerateShaders=!0}))}this._shouldRegenerateShaders=!0}e$2e(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e);var b=!e$2e(this._specularEnvironmentMapAtlas)&&e$2e(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,T=!e$2e(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,C=!e$2e(this._sphericalHarmonicCoefficients)&&e$2e(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,S=!e$2e(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||b||T||C||S,this._useDefaultSpecularMaps=!e$2e(this._specularEnvironmentMapAtlas)&&e$2e(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!e$2e(this._sphericalHarmonicCoefficients)&&e$2e(e.sphericalHarmonicCoefficients);var w=Jr$2(this,e),E=cr$3(this),P=Qr$2(this),A=!e$2e(this.distanceDisplayCondition)||nn$2(this,e),L=this.show&&A&&(this.scale instanceof o$1p?!o$1p.equals(this._scale,o$1p.ZERO):0!==this.scale)&&(!P||w);if(L&&this._state===O$q.LOADED||_){var M=this.activeAnimations.update(e)||this._cesiumAnimationsDirty;this._cesiumAnimationsDirty=!1,this._dirty=!1;var R=this.modelMatrix,O=e.mode!==this._mode;this._mode=e.mode;var D=!p$1d.equals(this._modelMatrix,R)||(this.scale instanceof o$1p?!o$1p.equals(this._scale,this.scale):this._scale!==this.scale)||this._minimumPixelSize!==this.minimumPixelSize||0!==this.minimumPixelSize||this._maximumScale!==this.maximumScale||this._heightReference!==this.heightReference||this._heightChanged||O;if(D||_){p$1d.clone(R,this._modelMatrix),en$2(this),e$2e(this._clampedModelMatrix)&&(R=this._clampedModelMatrix),this._minimumPixelSize=this.minimumPixelSize,this._maximumScale=this.maximumScale,this._heightReference=this.heightReference,this._heightChanged=!1;var I=Xi$1(this,e),F=this._computedModelMatrix;if(e$2e(this._offsetMatrix)){if(!this._lastDefinedOffset){"number"==typeof this._scale?(_e$d.x=this._scale,_e$d.y=this._scale,_e$d.z=this._scale):o$1p.clone(this._scale,_e$d);var B=p$1d.getTranslation(this._offsetMatrix,an$2),N=o$1p.divideComponents(B,_e$d,_e$d);o$1p.negate(B,B),this._offsetMat4ForScale=this._offsetMat4ForScale||new p$1d,this._realOffsetMat4ForScale=this._realOffsetMat4ForScale||new p$1d,p$1d.fromTranslation(B,this._offsetMat4ForScale),p$1d.fromTranslation(N,this._realOffsetMat4ForScale)}p$1d.multiply(p$1d.fromScale(I),this._realOffsetMat4ForScale,Le$e),p$1d.multiply(this._offsetMat4ForScale,Le$e,Le$e)}else p$1d.fromScale(I,Le$e);p$1d.multiply(R,Le$e,F),this._scale=this.scale,this._lastDefinedOffset=e$2e(this._offsetMatrix),this._upAxis===v$y.Y?p$1d.multiplyTransformation(F,v$y.Y_UP_TO_Z_UP,F):this._upAxis===v$y.X&&p$1d.multiplyTransformation(F,v$y.X_UP_TO_Z_UP,F),this.forwardAxis===v$y.Z&&p$1d.multiplyTransformation(F,v$y.Z_UP_TO_X_UP,F)}(M||D||_)&&(Kr$3(this,D,_,e.mapProjection),this._dirty=!0,(M||_)&&jr$2(this)),this._perNodeShowDirty&&(this._perNodeShowDirty=!1,Oi$3(this)),Ui$2(this),Vi$4(this),qi$2(this),Hi$3(this),Zi$2(this,e);var G=this._clippingPlanes,z=0,U=e$2e(G)&&G.enabled&&G.length>0,V=e$2e(this._sphericalHarmonicCoefficients)||this._useDefaultSphericalHarmonics,k=e$2e(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready||this._useDefaultSpecularMaps;if(U||V||k){var W=u$Z(this.clippingPlanesOriginMatrix,R);p$1d.multiply(r.uniformState.view3D,W,this._clippingPlaneModelViewMatrix)}U&&(z=G.clippingPlanesState),e.lightSource.hasChange()&&(this._shouldRegenerateShaders=!0);var H=this._shouldRegenerateShaders;H=H||this._clippingPlanesState!==z,this._clippingPlanesState=z;var q=er$5(this);q!==this._colorShadingEnabled&&(this._colorShadingEnabled=q,H=!0),H?sn$2(this,e):(Zr$2(this,e,!1),$r$3(this,e,!1))}if(_){var j=this;return void e.afterRender.push((function(){j._ready=!0,j._readyPromise.resolve(j)}))}if(L&&!this._ignoreCommands){var X,Y,Z,K=e.commandList,Q=e.passes,J=this._nodeCommands,ee=J.length,te=e.mapProjection.ellipsoid.maximumRadius*e$2d.PI;if(Q.render||Q.pick&&this.allowPicking){for(X=0;X<ee;++X)if((Y=J[X]).show){var ie=E?Y.translucentCommand:Y.command;if(ie=w?Y.silhouetteModelCommand:ie,K.push(ie),Z=Y.command.boundingVolume,e.mode===C$14.SCENE2D&&(Z.center.y+Z.radius>te||Z.center.y-Z.radius<te)){var ne=E?Y.translucentCommand2D:Y.command2D;ne=w?Y.silhouetteModelCommand2D:ne,K.push(ne)}}if(w&&!Q.pick)for(X=0;X<ee;++X)(Y=J[X]).show&&(K.push(Y.silhouetteColorCommand),Z=Y.command.boundingVolume,e.mode===C$14.SCENE2D&&(Z.center.y+Z.radius>te||Z.center.y-Z.radius<te)&&K.push(Y.silhouetteColorCommand2D))}}}}},F$B.prototype.updateAnimation=function(e){this._state===O$q.LOADED&&((this.activeAnimations.update(e)||this._cesiumAnimationsDirty)&&(Kr$3(this,!0,!0,e.mapProjection),jr$2(this)))},F$B.prototype.isDestroyed=function(){return!1},F$B.prototype.destroy=function(){e$2e(this._precreatedAttributes)&&$$v(this._rendererResources.vertexArrays),e$2e(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),e$2e(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0),e$2e(this._cachedRendererResources)&&tt$7(this._rendererResources,this._cachedRendererResources),this._rendererResources=void 0,this._cachedRendererResources=this._cachedRendererResources&&this._cachedRendererResources.release(),r$A.destroyCachedDataForModel(this);for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();et$8(this),this._quantizedVertexShaders=void 0;var n=this._clippingPlanes;return e$2e(n)&&!n.isDestroyed()&&n.owner===this&&n.destroy(),this._clippingPlanes=void 0,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),i$11(this)},F$B._getClippingFunction=f$H,F$B._modifyShaderForColor=jt$2,n$p._deprecationWarning=t$11,Object.defineProperties(n$p.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return this._model.trianglesLength}},geometryByteLength:{get:function(){return this._model.geometryByteLength}},texturesByteLength:{get:function(){return this._model.texturesByteLength}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._model.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var s$s=Uint32Array.BYTES_PER_ELEMENT;function O$p(e){var t=s$v.getAttributeOrUniformBySemantic(e,"_BATCHID");return e$2e(t)||e$2e(t=s$v.getAttributeOrUniformBySemantic(e,"BATCHID"))&&n$p._deprecationWarning("b3dm-legacy-batchid","The glTF in this b3dm uses the semantic `BATCHID`. Application-specific semantics should be prefixed with an underscore: `_BATCHID`."),t}function I$J(e){return function(t,i){var n=e._batchTable,r=!e$2e(e._tileset.classificationType),o=e._model.gltf;e$2e(o)&&(e._batchIdAttributeName=O$p(o),e._diffuseAttributeOrUniformName[i]=s$v.getDiffuseAttributeOrUniform(o,i));var a=n.getVertexShaderCallback(r,e._batchIdAttributeName,e._diffuseAttributeOrUniformName[i]);return e$2e(a)?a(t):t}}function ee$n(e){return function(t,i){var n=e._batchTable,r=!e$2e(e._tileset.classificationType),o=e._model.gltf;e$2e(o)&&(e._diffuseAttributeOrUniformName[i]=s$v.getDiffuseAttributeOrUniform(o,i));var a=n.getFragmentShaderCallback(r,e._diffuseAttributeOrUniformName[i]);return e$2e(a)?a(t):t}}function N$r(e){return function(){return e._batchTable.getPickId()}}function te$k(e){return function(t){var i=e._batchTable.getClassificationFragmentShaderCallback();return e$2e(i)?i(t):t}}function ie$j(e){return function(t,i){e._model.updateCommands(t,i)}}function re$p(e,t,i){var n=e._tileset,r=e._tile,o=e._resource,a=u$Z(i,0);i=a;var s=new Uint8Array(t),l=new DataView(t);i+=s$s;var u=l.getUint32(i,!0);if(1!==u)throw new t$13("Only Batched 3D Model version 1 is supported. Version "+u+" is not.");i+=s$s;var c=l.getUint32(i,!0);i+=s$s;var h=l.getUint32(i,!0);i+=s$s;var d=l.getUint32(i,!0);i+=s$s;var f=l.getUint32(i,!0);i+=s$s;var p,_,m=l.getUint32(i,!0);if(i+=s$s,f>=570425344?(i-=2*s$s,p=h,f=d,m=0,h=0,d=0,n$p._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] .")):m>=570425344&&(i-=s$s,p=f,f=h,m=d,h=0,d=0,n$p._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] .")),0===h)_={BATCH_LENGTH:u$Z(p,0)};else{var g=a$K(s,i,h);_=JSON.parse(g),i+=h}var x=new Uint8Array(t,i,d);i+=d;var y,v,$,b=new o$C(_,x);if(p=b.getGlobalProperty("BATCH_LENGTH"),b.featuresLength=p,f>0){var T=a$K(s,i,f);y=JSON.parse(T),i+=f,m>0&&(v=new Uint8Array(t,i,m),v=new Uint8Array(v),i+=m)}e$2e(n.classificationType)&&($=ie$j(e));var C=new h$D(e,p,y,v,$);e._batchTable=C;var S,w=a+c-i;if(0===w)throw new t$13("glTF byte length must be greater than 0.");i%4==0?S=new Uint8Array(t,i,w):(n$p._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),S=new Uint8Array(s.subarray(i,i+w)));var E={content:e,primitive:n};e._rtcCenterTransform=p$1d.IDENTITY;var P=b.getGlobalProperty("RTC_CENTER",S$14.FLOAT,3);e$2e(P)&&(e._rtcCenterTransform=p$1d.fromTranslation(o$1p.fromArray(P))),e._contentModelMatrix=p$1d.multiply(r.computedTransform,e._rtcCenterTransform,new p$1d),e$2e(n.classificationType)?e._model=new A$F({gltf:S,cull:!1,basePath:o,requestType:U$1f.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:n._gltfUpAxis,forwardAxis:v$y.X,debugWireframe:n.debugWireframe,vertexShaderLoaded:I$J(e),classificationShaderLoaded:te$k(e),uniformMapLoaded:C.getUniformMapCallback(),pickIdLoaded:N$r(e),classificationType:n._classificationType,batchTable:C}):e._model=new F$B({gltf:S,cull:!1,releaseGltfJson:!0,opaquePass:Le$q.CESIUM_3D_TILE,basePath:o,requestType:U$1f.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:n._gltfUpAxis,forwardAxis:v$y.X,shadows:n.shadows,debugWireframe:n.debugWireframe,incrementallyLoadTextures:!1,vertexShaderLoaded:I$J(e),fragmentShaderLoaded:ee$n(e),uniformMapLoaded:C.getUniformMapCallback(),pickIdLoaded:N$r(e),addBatchIdToGeneratedShaders:p>0,pickObject:E,imageBasedLightingFactor:n.imageBasedLightingFactor,lightColor:n.lightColor,luminanceAtZenith:n.luminanceAtZenith,sphericalHarmonicCoefficients:n.sphericalHarmonicCoefficients,specularEnvironmentMaps:n.specularEnvironmentMaps,owner:n})}function ae$h(e){var t=e.featuresLength;if(!e$2e(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$M(e,n);e._features=i}}function i$C(e,t,i,n,r,o){this._tileset=e,this._tile=t,this._resource=i,this._contents=[],this._readyPromise=o$1l.defer(),L$B(this,n,r,o)}n$p.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},n$p.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2e(e)||e<0||e>=t)throw new t$15("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return ae$h(this),this._features[e]},n$p.prototype.applyDebugSettings=function(e,t){t=e?t:e$1X.WHITE,0===this.featuresLength?this._model.color=t:this._batchTable.setAllColor(t)},n$p.prototype.applyStyle=function(e){if(0===this.featuresLength){var t=e$2e(e)&&e$2e(e.color),i=e$2e(e)&&e$2e(e.show);this._model.color=t?e.color.evaluateColor(void 0,this._model.color):e$1X.clone(e$1X.WHITE,this._model.color),this._model.show=!i||e.show.evaluate(void 0)}else this._batchTable.applyStyle(e)},n$p.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._contentModelMatrix=p$1d.multiply(this._tile.computedTransform,this._rtcCenterTransform,this._contentModelMatrix),this._model.modelMatrix=this._contentModelMatrix,this._model.shadows=this._tileset.shadows,this._model.imageBasedLightingFactor=this._tileset.imageBasedLightingFactor,this._model.lightColor=this._tileset.lightColor,this._model.luminanceAtZenith=this._tileset.luminanceAtZenith,this._model.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._model.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._model.debugWireframe=this._tileset.debugWireframe;var n=this._tileset.clippingPlanes;this._model.clippingPlanesOriginMatrix=this._tileset.clippingPlanesOriginMatrix,e$2e(n)&&this._tile.clippingPlanesDirty&&(this._model._clippingPlanes=n.enabled&&this._tile._isClipped?n:void 0),e$2e(n)&&e$2e(this._model._clippingPlanes)&&this._model._clippingPlanes!==n&&(this._model._clippingPlanes=n),this._model.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&!e$2e(e.classificationType)&&this._batchTable.addDerivedCommands(t,i)},n$p.prototype.isDestroyed=function(){return!1},n$p.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$11(this)},Object.defineProperties(i$C.prototype,{featurePropertiesDirty:{get:function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)if(e[i].featurePropertiesDirty)return!0;return!1},set:function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}});var u$z=Uint32Array.BYTES_PER_ELEMENT;function L$B(e,t,i,n){i=u$Z(i,0);var r=new Uint8Array(t),o=new DataView(t);i+=u$z;var a=o.getUint32(i,!0);if(1!==a)throw new t$13("Only Composite Tile version 1 is supported. Version "+a+" is not.");i+=u$z,i+=u$z;var s=o.getUint32(i,!0);i+=u$z;for(var l=[],u=0;u<s;++u){var c=a$F(r,i),h=o.getUint32(i+2*u$z,!0),d=n[c];if(!e$2e(d))throw new t$13("Unknown tile content type, "+c+", inside Composite tile");var f=d(e._tileset,e._tile,e._resource,t,i);e._contents.push(f),l.push(f.readyPromise),i+=h}o$1l.all(l).then((function(){e._readyPromise.resolve(e)})).otherwise((function(t){e._readyPromise.reject(t)}))}function e$I(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,e$2e(this._center)||(e$2e(this._boundingVolume)?this._center=o$1p.clone(this._boundingVolume.center):this._center=o$1p.clone(o$1p.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=_0x2b86ba.BOTH}function F$A(e){var t=new Float64Array(p$1d.packedLength+o$1p.packedLength),i=0;return o$1p.pack(e._center,t,i),i+=o$1p.packedLength,p$1d.pack(e._modelMatrix,t,i),t}function M$z(e,t){for(var i=0,n=t[i++],r=t[i++],o=e._boundingVolumes=new Array(r),a=0;a<r;++a)o[a]=i$1d.unpack(t,i),i+=i$1d.packedLength;for(var s=t[i++],l=e._batchedIndices=new Array(s),u=0;u<s;++u){var c=e$1X.unpack(t,i);i+=e$1X.packedLength;for(var h=t[i++],d=t[i++],f=t[i++],p=new Array(f),_=0;_<f;++_)p[_]=t[i++];l[u]=new c$x({color:c,offset:h,count:d,batchIds:p})}return n}i$C.prototype.hasProperty=function(e,t){return!1},i$C.prototype.getFeature=function(e){},i$C.prototype.applyDebugSettings=function(e,t){for(var i=this._contents,n=i.length,r=0;r<n;++r)i[r].applyDebugSettings(e,t)},i$C.prototype.applyStyle=function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].applyStyle(e)},i$C.prototype.update=function(e,t){for(var i=this._contents,n=i.length,r=0;r<n;++r)i[r].update(e,t)},i$C.prototype.isDestroyed=function(){return!1},i$C.prototype.destroy=function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)e[i].destroy();return i$11(this)},Object.defineProperties(e$I.prototype,{trianglesLength:{get:function(){return e$2e(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return e$2e(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}}),e$I.packedBoxLength=p$1d.packedLength+o$1p.packedLength,e$I.packedCylinderLength=p$1d.packedLength+2,e$I.packedEllipsoidLength=p$1d.packedLength+o$1p.packedLength,e$I.packedSphereLength=o$1p.packedLength+1;var R$q=new i$W("createVectorTileGeometries"),E$B=new e$1X;function W$A(e){if(!e$2e(e._primitive)){if(!e$2e(e._verticesPromise)){var t=e._boxes,i=e._boxBatchIds,n=e._cylinders,r=e._cylinderBatchIds,o=e._ellipsoids,a=e._ellipsoidBatchIds,s=e._spheres,l=e._sphereBatchIds,u=e._batchTableColors,c=e._packedBuffer;if(!e$2e(u)){var h=0;e$2e(e._boxes)&&(t=e._boxes=l$R(t),h+=(i=e._boxBatchIds=l$R(i)).length),e$2e(e._cylinders)&&(n=e._cylinders=l$R(n),h+=(r=e._cylinderBatchIds=l$R(r)).length),e$2e(e._ellipsoids)&&(o=e._ellipsoids=l$R(o),h+=(a=e._ellipsoidBatchIds=l$R(a)).length),e$2e(e._spheres)&&(s=e._sphere=l$R(s),h+=(l=e._sphereBatchIds=l$R(l)).length),u=e._batchTableColors=new Uint32Array(h);for(var d=e._batchTable,f=0;f<h;++f){var p=d.getColor(f,E$B);u[f]=p.toRgba()}c=e._packedBuffer=F$A(e)}var _=[];e$2e(t)&&_.push(t.buffer,i.buffer),e$2e(n)&&_.push(n.buffer,r.buffer),e$2e(o)&&_.push(o.buffer,a.buffer),e$2e(s)&&_.push(s.buffer,l.buffer),_.push(u.buffer,c.buffer);var m={boxes:e$2e(t)?t.buffer:void 0,boxBatchIds:e$2e(t)?i.buffer:void 0,cylinders:e$2e(n)?n.buffer:void 0,cylinderBatchIds:e$2e(n)?r.buffer:void 0,ellipsoids:e$2e(o)?o.buffer:void 0,ellipsoidBatchIds:e$2e(o)?a.buffer:void 0,spheres:e$2e(s)?s.buffer:void 0,sphereBatchIds:e$2e(s)?l.buffer:void 0,batchTableColors:u.buffer,packedBuffer:c.buffer},g=e._verticesPromise=R$q.scheduleTask(m,_);if(!e$2e(g))return;g.then((function(t){var i=new Float64Array(t.packedBuffer),n=M$z(e,i);e._indices=2===n?new Uint16Array(t.indices):new Uint32Array(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._positions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.vertexBatchIds),e._batchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!e$2e(e._primitive)&&(e._primitive=new y$y({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:u$Z(e._pickObject,e)}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}function p$w(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._geometries=void 0,this._contentReadyPromise=void 0,this._readyPromise=o$1l.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,Q$w(this,n,r)}function q$A(e){return function(t,i){e$2e(e._geometries)&&e._geometries.updateCommands(t,i)}}function K$v(e,t){var i,n,r,o,a,s=u$Z(e.BOXES_LENGTH,0),l=u$Z(e.CYLINDERS_LENGTH,0),u=u$Z(e.ELLIPSOIDS_LENGTH,0),c=u$Z(e.SPHERES_LENGTH,0);if(s>0&&e$2e(e.BOX_BATCH_IDS)){var h=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,h,s)}if(l>0&&e$2e(e.CYLINDER_BATCH_IDS)){var d=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,d,l)}if(u>0&&e$2e(e.ELLIPSOID_BATCH_IDS)){var f=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,f,u)}if(c>0&&e$2e(e.SPHERE_BATCH_IDS)){var p=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,p,c)}var _=e$2e(i)||e$2e(n)||e$2e(r)||e$2e(o),m=s>0&&!e$2e(i)||l>0&&!e$2e(n)||u>0&&!e$2e(r)||c>0&&!e$2e(o);if(_&&m)throw new t$13("If one group of batch ids is defined, then all batch ids must be defined.");if(!(e$2e(i)||e$2e(n)||e$2e(r)||e$2e(o))){var g=0;if(!e$2e(i)&&s>0)for(i=new Uint16Array(s),a=0;a<s;++a)i[a]=g++;if(!e$2e(n)&&l>0)for(n=new Uint16Array(l),a=0;a<l;++a)n[a]=g++;if(!e$2e(r)&&u>0)for(r=new Uint16Array(u),a=0;a<u;++a)r[a]=g++;if(!e$2e(o)&&c>0)for(o=new Uint16Array(c),a=0;a<c;++a)o[a]=g++}return{boxes:i,cylinders:n,ellipsoids:r,spheres:o}}e$I.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},e$I.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},e$I.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},e$I.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},e$I.prototype.update=function(e){W$A(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},e$I.prototype.isDestroyed=function(){return!1},e$I.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$11(this)},Object.defineProperties(p$w.prototype,{featuresLength:{get:function(){return e$2e(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return e$2e(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return e$2e(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return e$2e(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var c$v=Uint32Array.BYTES_PER_ELEMENT;function Q$w(e,t,i){i=u$Z(i,0);var n=new Uint8Array(t),r=new DataView(t);i+=c$v;var o=r.getUint32(i,!0);if(1!==o)throw new t$13("Only Geometry tile version 1 is supported. Version "+o+" is not.");i+=c$v;var a=r.getUint32(i,!0);if(i+=c$v,0!==a){var s=r.getUint32(i,!0);if(i+=c$v,0===s)throw new t$13("Feature table must have a byte length greater than zero");var l=r.getUint32(i,!0);i+=c$v;var u=r.getUint32(i,!0);i+=c$v;var c=r.getUint32(i,!0),h=a$K(n,i+=c$v,s),d=JSON.parse(h);i+=s;var f,p,_=new Uint8Array(t,i,l);if(i+=l,u>0){var m=a$K(n,i,u);f=JSON.parse(m),i+=u,c>0&&(p=new Uint8Array(t,i,c),p=new Uint8Array(p))}var g=u$Z(d.BOXES_LENGTH,0),x=u$Z(d.CYLINDERS_LENGTH,0),y=u$Z(d.ELLIPSOIDS_LENGTH,0),v=u$Z(d.SPHERES_LENGTH,0),$=g+x+y+v,b=new h$D(e,$,f,p,q$A(e));if(e._batchTable=b,0!==$){var T,C=e.tile.computedTransform;e$2e(d.RTC_CENTER)&&(T=o$1p.unpack(d.RTC_CENTER),p$1d.multiplyByPoint(C,T,T));var S=K$v(d,_);if(g>0||x>0||y>0||v>0){var w,E,P,A;if(g>0){var L=_.byteOffset+d.BOXES.byteOffset;w=new Float32Array(_.buffer,L,e$I.packedBoxLength*g)}if(x>0){var M=_.byteOffset+d.CYLINDERS.byteOffset;E=new Float32Array(_.buffer,M,e$I.packedCylinderLength*x)}if(y>0){var R=_.byteOffset+d.ELLIPSOIDS.byteOffset;P=new Float32Array(_.buffer,R,e$I.packedEllipsoidLength*y)}if(v>0){var O=_.byteOffset+d.SPHERES.byteOffset;A=new Float32Array(_.buffer,O,e$I.packedSphereLength*v)}e._geometries=new e$I({boxes:w,boxBatchIds:S.boxes,cylinders:E,cylinderBatchIds:S.cylinders,ellipsoids:P,ellipsoidBatchIds:S.ellipsoids,spheres:A,sphereBatchIds:S.spheres,center:T,modelMatrix:C,batchTable:b,boundingVolume:e.tile.boundingVolume.boundingVolume})}}}else e._readyPromise.resolve(e)}function x$D(e){var t=e.featuresLength;if(!e$2e(e._features)&&t>0){var i=new Array(t);e$2e(e._geometries)&&e._geometries.createFeatures(e,i),e._features=i}}function e$H(e,t,i){this.primitive=e,this._modelMatrix=p$1d.clone(t),this._instanceId=i}p$w.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},p$w.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2e(e)||e<0||e>=t)throw new t$15("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return x$D(this),this._features[e]},p$w.prototype.applyDebugSettings=function(e,t){e$2e(this._geometries)&&this._geometries.applyDebugSettings(e,t)},p$w.prototype.applyStyle=function(e){x$D(this),e$2e(this._geometries)&&this._geometries.applyStyle(e,this._features)},p$w.prototype.update=function(e,t){if(e$2e(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),e$2e(this._batchTable)&&this._geometries._ready&&this._batchTable.update(e,t),!e$2e(this._contentReadyPromise)){var i=this;this._contentReadyPromise=this._geometries.readyPromise.then((function(){i._readyPromise.resolve(i)}))}},p$w.prototype.isDestroyed=function(){return!1},p$w.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$11(this)},Object.defineProperties(e$H.prototype,{instanceId:{get:function(){return this._instanceId}},model:{get:function(){return this.primitive._model}},modelMatrix:{get:function(){return p$1d.clone(this._modelMatrix)},set:function(e){p$1d.clone(e,this._modelMatrix),this.primitive.expandBoundingSphere(this._modelMatrix),this.primitive._dirty=!0}}});var y$w={NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3};function w$u(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).gltf)&&!e$2e(e.url))throw new t$15("Either options.gltf or options.url is required.");if(e$2e(e.gltf)&&e$2e(e.url))throw new t$15("Cannot pass in both options.gltf and options.url.");this.show=u$Z(e.show,!0),this._instancingSupported=!1,this._dynamic=u$Z(e.dynamic,!1),this._allowPicking=u$Z(e.allowPicking,!0),this._ready=!1,this._readyPromise=o$1l.defer(),this._state=y$w.NEEDS_LOAD,this._dirty=!1,this._cull=u$Z(e.cull,!0),this._opaquePass=u$Z(e.opaquePass,Le$q.OPAQUE),this._instances=re$o(this,e.instances),this._batchTable=e.batchTable,this._model=void 0,this._vertexBufferTypedArray=void 0,this._vertexBuffer=void 0,this._batchIdBuffer=void 0,this._instancedUniformsByProgram=void 0,this._drawCommands=[],this._modelCommands=void 0,this._boundingSphere=ae$g(this),this._center=o$1p.clone(this._boundingSphere.center),this._rtcTransform=new p$1d,this._rtcModelView=new p$1d,this._mode=void 0,this.modelMatrix=p$1d.clone(p$1d.IDENTITY),this._modelMatrix=p$1d.clone(this.modelMatrix),this._url=t$10.createIfNeeded(e.url),this._requestType=e.requestType,this._gltf=e.gltf,this._basePath=t$10.createIfNeeded(e.basePath),this._asynchronous=e.asynchronous,this._incrementallyLoadTextures=e.incrementallyLoadTextures,this._upAxis=e.upAxis,this._forwardAxis=e.forwardAxis,this.shadows=u$Z(e.shadows,W$X.ENABLED),this._shadows=this.shadows,this._pickIdLoaded=e.pickIdLoaded,this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=u$Z(e.debugWireframe,!1),this._debugWireframe=!1,this._imageBasedLightingFactor=new o$1o(1,1),o$1o.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=e.luminanceAtZenith,this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps}function re$o(e,t){for(var i=(t=u$Z(t,[])).length,n=new Array(i),r=0;r<i;++r){var o=t[r],a=o.modelMatrix,s=u$Z(o.batchId,r);n[r]=new e$H(e,a,s)}return n}function ae$g(e){for(var t=e.length,i=new Array(t),n=0;n<t;++n)i[n]=p$1d.getTranslation(e._instances[n]._modelMatrix,new o$1p);return i$1d.fromPoints(i)}Object.defineProperties(w$u.prototype,{allowPicking:{get:function(){return this._allowPicking}},length:{get:function(){return this._instances.length}},activeAnimations:{get:function(){return this._model.activeAnimations}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o$1q.typeOf.object("imageBasedLightingFactor",e),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),o$1o.clone(e,this._imageBasedLightingFactor)}}});var te$j=new o$1p,M$y=new p$1d;function ne$j(e,t,i,n){return function(r,o){var a=r.semantic;if(e$2e(a)&&e.indexOf(a)>-1){if(!(t.indexOf(a)>-1))throw new t$13('Shader program cannot be optimized for instancing. Uniform "'+o+'" in program "'+i+'" uses unsupported semantic "'+a+'"');n[o]=a}}}function F$z(e,t){if(e$2e(e._instancedUniformsByProgram))return e._instancedUniformsByProgram[t];var i={};e._instancedUniformsByProgram=i;var n=["MODEL","MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELINVERSE","MODELVIEWINVERSE","MODELVIEWPROJECTIONINVERSE","MODELINVERSETRANSPOSE","MODELVIEWINVERSETRANSPOSE"],r=["MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELVIEWINVERSETRANSPOSE"],o=e._model._sourceTechniques;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a],l=s.program;if(!e$2e(i[l])){var u={};i[l]=u,e$L.techniqueUniform(s,ne$j(n,r,t,u))}}return i[t]}function ie$i(e){return function(t,i){var n=F$z(e,i),r=e$2e(e._batchTable),o=s$V.replaceMain(t,"czm_instancing_main"),a="",s="";for(var l in n)if(n.hasOwnProperty(l)){var u,c=n[l];"MODELVIEW"===c||"CESIUM_RTC_MODELVIEW"===c?u="czm_instanced_modelView":"MODELVIEWPROJECTION"===c?(u="czm_instanced_modelViewProjection",a+="mat4 czm_instanced_modelViewProjection;\n",s+="czm_instanced_modelViewProjection = czm_projection * czm_instanced_modelView;\n"):"MODELVIEWINVERSETRANSPOSE"===c&&(u="czm_instanced_modelViewInverseTranspose",a+="mat3 czm_instanced_modelViewInverseTranspose;\n",s+="czm_instanced_modelViewInverseTranspose = mat3(czm_instanced_modelView);\n");var h=new RegExp("uniform.*"+l+".*");o=o.replace(h,""),h=new RegExp(l+"\\b","g"),o=o.replace(h,u)}var d,f,p;r?(d="attribute float a_batchId;\n",f="",p=""):(d="",f="attribute vec4 pickColor;\nvarying vec4 v_pickColor;\n",p=" v_pickColor = pickColor;\n");var _="uniform mat4 czm_instanced_modifiedModelView;\nuniform mat4 czm_instanced_nodeTransform;\n"+a+"mat4 czm_instanced_modelView;\nattribute vec4 czm_modelMatrixRow0;\nattribute vec4 czm_modelMatrixRow1;\nattribute vec4 czm_modelMatrixRow2;\n"+d+f+o+"void main()\n{\n mat4 czm_instanced_model = mat4(czm_modelMatrixRow0.x, czm_modelMatrixRow1.x, czm_modelMatrixRow2.x, 0.0, czm_modelMatrixRow0.y, czm_modelMatrixRow1.y, czm_modelMatrixRow2.y, 0.0, czm_modelMatrixRow0.z, czm_modelMatrixRow1.z, czm_modelMatrixRow2.z, 0.0, czm_modelMatrixRow0.w, czm_modelMatrixRow1.w, czm_modelMatrixRow2.w, 1.0);\n czm_instanced_modelView = czm_instanced_modifiedModelView * czm_instanced_model * czm_instanced_nodeTransform;\n"+s+" czm_instancing_main();\n"+p+"}\n";if(r){var m=e._model.gltf,g=s$v.getDiffuseAttributeOrUniform(m,i);_=e._batchTable.getVertexShaderCallback(!0,"a_batchId",g)(_)}return _}}function se$e(e){return function(t,i){var n=e._batchTable;if(e$2e(n)){var r=e._model.gltf,o=s$v.getDiffuseAttributeOrUniform(r,i);t=n.getFragmentShaderCallback(!0,o)(t)}else t="varying vec4 v_pickColor;\n"+t;return t}}function de$e(e,t){return function(){return p$1d.multiply(t.uniformState.view,e._rtcTransform,e._rtcModelView)}}function oe$f(e){return function(){return e.computedMatrix}}function me$i(e,t){return function(i,n,r){(i=l$1f(i)).czm_instanced_modifiedModelView=de$e(e,t),i.czm_instanced_nodeTransform=oe$f(r);var o=F$z(e,n);for(var a in o)o.hasOwnProperty(a)&&delete i[a];return e$2e(e._batchTable)&&(i=e._batchTable.getUniformMapCallback()(i)),i}}function ue$h(e){return function(t,i){if(e$2e(e._batchTable)){var n=e._model.gltf,r=s$v.getDiffuseAttributeOrUniform(n,i);t="uniform float a_batchId\n;"+(t=e._batchTable.getVertexShaderCallback(!0,"a_batchId",r)(t))}return t}}function he$e(e){return function(t,i){var n=e._batchTable;if(e$2e(n)){var r=e._model.gltf,o=s$v.getDiffuseAttributeOrUniform(r,i);t=n.getFragmentShaderCallback(!0,o)(t)}else t="uniform vec4 czm_pickColor;\n"+t;return t}}function fe$g(e){return function(t){return e$2e(e._batchTable)&&(t=e._batchTable.getUniformMapCallback()(t)),t}}function U$w(e){var t=e._instances,i=e.length,n=e._center,r=e._vertexBufferTypedArray;e$2e(r)||(r=new Float32Array(12*i)),e._dynamic&&(e._vertexBufferTypedArray=r);for(var o=0;o<i;++o){var a=t[o]._modelMatrix,s=p$1d.clone(a,M$y);s[12]-=n.x,s[13]-=n.y,s[14]-=n.z;var l=12*o;r[l+0]=s[0],r[l+1]=s[4],r[l+2]=s[8],r[l+3]=s[12],r[l+4]=s[1],r[l+5]=s[5],r[l+6]=s[9],r[l+7]=s[13],r[l+8]=s[2],r[l+9]=s[6],r[l+10]=s[10],r[l+11]=s[14]}return r}function _e$c(e,t){var i,n=e._instances,r=e.length,o=e._dynamic,a=e$2e(e._batchTable);if(a){var s=new Uint16Array(r);for(i=0;i<r;++i)s[i]=n[i]._instanceId;e._batchIdBuffer=t$X.createVertexBuffer({context:t,typedArray:s,usage:A$18.STATIC_DRAW})}if(!a){var l=new Uint8Array(4*r);for(i=0;i<r;++i){var u=e._pickIds[i].color,c=4*i;l[c]=e$1X.floatToByte(u.red),l[c+1]=e$1X.floatToByte(u.green),l[c+2]=e$1X.floatToByte(u.blue),l[c+3]=e$1X.floatToByte(u.alpha)}e._pickIdBuffer=t$X.createVertexBuffer({context:t,typedArray:l,usage:A$18.STATIC_DRAW})}var h=U$w(e);e._vertexBuffer=t$X.createVertexBuffer({context:t,typedArray:h,usage:o?A$18.STREAM_DRAW:A$18.STATIC_DRAW})}function ge$d(e){var t=U$w(e);e._vertexBuffer.copyFromArrayView(t)}function ce$h(e,t){for(var i=e._instances,n=i.length,r=new Array(n),o=0;o<n;++o)r[o]=t.createPickId(i[o]);return r}function ve$e(e,t){var i=e._instancingSupported,n=e$2e(e._batchTable),r=e._allowPicking,o={url:e._url,requestType:e._requestType,gltf:e._gltf,basePath:e._basePath,shadows:e._shadows,cacheKey:void 0,asynchronous:e._asynchronous,allowPicking:r,incrementallyLoadTextures:e._incrementallyLoadTextures,upAxis:e._upAxis,forwardAxis:e._forwardAxis,precreatedAttributes:void 0,vertexShaderLoaded:void 0,fragmentShaderLoaded:void 0,uniformMapLoaded:void 0,pickIdLoaded:e._pickIdLoaded,ignoreCommands:!0,opaquePass:e._opaquePass,imageBasedLightingFactor:e.imageBasedLightingFactor,lightColor:e.lightColor,luminanceAtZenith:e.luminanceAtZenith,sphericalHarmonicCoefficients:e.sphericalHarmonicCoefficients,specularEnvironmentMaps:e.specularEnvironmentMaps};if(n||(e._pickIds=ce$h(e,t)),i){_e$c(e,t);var a=S$14.getSizeInBytes(S$14.FLOAT),s={czm_modelMatrixRow0:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:12*a,instanceDivisor:1},czm_modelMatrixRow1:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:4*a,strideInBytes:12*a,instanceDivisor:1},czm_modelMatrixRow2:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:8*a,strideInBytes:12*a,instanceDivisor:1}};n&&(s.a_batchId={index:0,vertexBuffer:e._batchIdBuffer,componentsPerAttribute:1,componentDatatype:S$14.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),n||(s.pickColor={index:0,vertexBuffer:e._pickIdBuffer,componentsPerAttribute:4,componentDatatype:S$14.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),o.precreatedAttributes=s,o.vertexShaderLoaded=ie$i(e),o.fragmentShaderLoaded=se$e(e),o.uniformMapLoaded=me$i(e,t),e$2e(e._url)&&(o.cacheKey=e._url.getUrlComponent()+"#instanced")}else o.vertexShaderLoaded=ue$h(e),o.fragmentShaderLoaded=he$e(e),o.uniformMapLoaded=fe$g(e);e$2e(e._url)?e._model=F$B.fromGltf(o):e._model=new F$B(o)}function pe$j(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?W$18.LINES:W$18.TRIANGLES,i=e._drawCommands,n=i.length,r=0;r<n;++r)i[r].primitiveType=t}}function le$i(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e._drawCommands,i=t.length,n=0;n<i;++n)t[n].debugShowBoundingVolume=e.debugShowBoundingVolume}}function be$e(e,t){for(var i=t.length,n=e.length,r=e._boundingSphere,o=e._cull,a=0;a<i;++a){var s=i$$.shallowClone(t[a]);s.instanceCount=n,s.boundingVolume=r,s.cull=o,e$2e(e._batchTable)?s.pickId=e._batchTable.getPickId():s.pickId="v_pickColor",e._drawCommands.push(s)}}function ye$b(e){return function(){return e}}function we$a(e){return function(){return e}}function Ee$c(e,t){for(var i=e._instances,n=t.length,r=e.length,o=e$2e(e._batchTable),a=e._cull,s=0;s<n;++s)for(var l=0;l<r;++l){var u=i$$.shallowClone(t[s]);if(u.modelMatrix=new p$1d,u.boundingVolume=new i$1d,u.cull=a,u.uniformMap=l$1f(u.uniformMap),o)u.uniformMap.a_batchId=ye$b(i[l]._instanceId);else{var c=e._pickIds[l];u.uniformMap.czm_pickColor=we$a(c.color)}e._drawCommands.push(u)}}function W$z(e){for(var t=e._modelCommands,i=t.length,n=e.length,r=e._rtcTransform,o=e._center,a=0;a<i;++a)for(var s=t[a],l=0;l<n;++l){var u=a*n+l,c=e._drawCommands[u],h=p$1d.clone(e._instances[l]._modelMatrix,M$y);h[12]-=o.x,h[13]-=o.y,h[14]-=o.z,h=p$1d.multiply(r,h,M$y);var d=s.modelMatrix,f=c.modelMatrix;p$1d.multiply(h,d,f);var p=s.boundingVolume,_=c.boundingVolume;i$1d.transform(p,h,_)}}function q$z(e){for(var t=e._nodeCommands,i=t.length,n=[],r=0;r<i;++r){var o=t[r];o.show&&n.push(o.command)}return n}function Te$c(e){for(var t=e._nodeCommands,i=t.length,n=0;n<i;n++){if(t[n].command.dirty)return!0}return!1}function H$D(e,t){e._drawCommands=[];var i=q$z(e._model);t?be$e(e,i):(Ee$c(e,i),W$z(e))}function Ie$b(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=W$X.castShadows(e.shadows),i=W$X.receiveShadows(e.shadows),n=e._drawCommands,r=n.length,o=0;o<r;++o){var a=n[o];a.castShadows=t,a.receiveShadows=i}}}function u$y(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._modelInstanceCollection=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,Se$9(this,n,r)}function Ne$a(e){return function(){return e._batchTable.getPickId()}}w$u.prototype.expandBoundingSphere=function(e){var t=p$1d.getTranslation(e,te$j);i$1d.expand(this._boundingSphere,t,this._boundingSphere)},w$u.prototype.update=function(e){if(e.mode!==C$14.MORPHING&&this.show&&0!==this.length){var t=e.context;if(this._state===y$w.NEEDS_LOAD){this._state=y$w.LOADING,this._instancingSupported=t.instancedArrays,ve$e(this,t);var i=this;this._model.readyPromise.otherwise((function(e){i._state=y$w.FAILED,i._readyPromise.reject(e)}))}var n=this._instancingSupported,r=this._model;if(r.imageBasedLightingFactor=this.imageBasedLightingFactor,r.lightColor=this.lightColor,r.luminanceAtZenith=this.luminanceAtZenith,r.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,r.specularEnvironmentMaps=this.specularEnvironmentMaps,r.update(e),r.ready&&this._state===y$w.LOADING){this._state=y$w.LOADED,this._ready=!0;var o=r.boundingSphere.radius+o$1p.magnitude(r.boundingSphere.center);return this._boundingSphere.radius+=o,this._modelCommands=q$z(r),H$D(this,n),void this._readyPromise.resolve(this)}if(this._state===y$w.LOADED){var a=e.mode!==this._mode,s=this.modelMatrix,l=!p$1d.equals(this._modelMatrix,s);if(a||l){this._mode=e.mode,p$1d.clone(s,this._modelMatrix);var u=p$1d.multiplyByTranslation(this._modelMatrix,this._center,this._rtcTransform);this._mode!==C$14.SCENE3D&&(u=m$19.basisTo2D(e.mapProjection,u,u)),p$1d.getTranslation(u,this._boundingSphere.center)}n&&this._dirty&&(this._dynamic=!0,this._dirty=!1,ge$d(this)),Te$c(r)&&H$D(this,n),!n&&(r.dirty||this._dirty||a||l)&&W$z(this),Ie$b(this),pe$j(this),le$i(this);var c=e.passes;if(c.render||c.pick)for(var h=e.commandList,d=this._drawCommands,f=d.length,p=0;p<f;++p)h.push(d[p])}}},w$u.prototype.isDestroyed=function(){return!1},w$u.prototype.destroy=function(){this._model=this._model&&this._model.destroy();var e=this._pickIds;if(e$2e(e))for(var t=e.length,i=0;i<t;++i)e[i].destroy();return i$11(this)},u$y._deprecationWarning=t$11,Object.defineProperties(u$y.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){var e=this._modelInstanceCollection._model;return e$2e(e)?e.trianglesLength:0}},geometryByteLength:{get:function(){var e=this._modelInstanceCollection._model;return e$2e(e)?e.geometryByteLength:0}},texturesByteLength:{get:function(){var e=this._modelInstanceCollection._model;return e$2e(e)?e.texturesByteLength:0}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._modelInstanceCollection.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var g$G=Uint32Array.BYTES_PER_ELEMENT,L$A=new Array(4),ie$h=new Array(4);function Se$9(e,t,i){var n=u$Z(i,0);i=n;var r=new Uint8Array(t),o=new DataView(t);i+=g$G;var a=o.getUint32(i,!0);if(1!==a)throw new t$13("Only Instanced 3D Model version 1 is supported. Version "+a+" is not.");i+=g$G;var s=o.getUint32(i,!0);i+=g$G;var l=o.getUint32(i,!0);if(0===l)throw new t$13("featureTableJsonByteLength is zero, the feature table must be defined.");i+=g$G;var u=o.getUint32(i,!0);i+=g$G;var c=o.getUint32(i,!0);i+=g$G;var h=o.getUint32(i,!0);i+=g$G;var d=o.getUint32(i,!0);if(1!==d&&0!==d)throw new t$13("Only glTF format 0 (uri) or 1 (embedded) are supported. Format "+d+" is not.");var f=a$K(r,i+=g$G,l),p=JSON.parse(f);i+=l;var _=new Uint8Array(t,i,u);i+=u;var m,g,x=new o$C(p,_),y=x.getGlobalProperty("INSTANCES_LENGTH");if(x.featuresLength=y,!e$2e(y))throw new t$13("Feature table global property: INSTANCES_LENGTH must be defined");if(c>0){var v=a$K(r,i,c);m=JSON.parse(v),i+=c,h>0&&(g=new Uint8Array(t,i,h),g=new Uint8Array(g),i+=h)}e._batchTable=new h$D(e,y,m,g);var $,b=n+s-i;if(0===b)throw new t$13("glTF byte length is zero, i3dm must have a glTF to instance.");i%4==0?$=new Uint8Array(t,i,b):(u$y._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),$=new Uint8Array(r.subarray(i,i+b)));var T=e._tileset,C={instances:new Array(y),batchTable:e._batchTable,cull:!1,url:void 0,requestType:U$1f.TILES3D,gltf:void 0,basePath:void 0,incrementallyLoadTextures:!1,upAxis:T._gltfUpAxis,forwardAxis:v$y.X,opaquePass:Le$q.CESIUM_3D_TILE,pickIdLoaded:Ne$a(e),imageBasedLightingFactor:T.imageBasedLightingFactor,lightColor:T.lightColor,luminanceAtZenith:T.luminanceAtZenith,sphericalHarmonicCoefficients:T.sphericalHarmonicCoefficients,specularEnvironmentMaps:T.specularEnvironmentMaps};if(0===d){var S=a$K($);S=S.replace(/[\s\0]+$/,""),C.url=e._resource.getDerivedResource({url:S})}else C.gltf=$,C.basePath=e._resource.clone();var w,E=x.getGlobalProperty("EAST_NORTH_UP"),P=x.getGlobalProperty("RTC_CENTER",S$14.FLOAT,3);e$2e(P)&&(w=o$1p.unpack(P));for(var A=C.instances,L=new o$1p,M=new Array(3),R=new o$1p,O=new o$1p,D=new o$1p,I=new p$1e,F=new n$15,B=new o$1p,N=new e$1_,G=new p$1d,z=0;z<y;z++){var U=x.getProperty("POSITION",S$14.FLOAT,3,z,L$A);if(!e$2e(U)){U=M;var V=x.getProperty("POSITION_QUANTIZED",S$14.UNSIGNED_SHORT,3,z,L$A);if(!e$2e(V))throw new t$13("Either POSITION or POSITION_QUANTIZED must be defined for each instance.");var k=x.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",S$14.FLOAT,3);if(!e$2e(k))throw new t$13("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");var W=x.getGlobalProperty("QUANTIZED_VOLUME_SCALE",S$14.FLOAT,3);if(!e$2e(W))throw new t$13("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");for(var H=0;H<3;H++)U[H]=V[H]/65535*W[H]+k[H]}o$1p.unpack(U,0,L),e$2e(w)&&o$1p.add(L,w,L),N.translation=L;var q=x.getProperty("NORMAL_UP",S$14.FLOAT,3,z,L$A),j=x.getProperty("NORMAL_RIGHT",S$14.FLOAT,3,z,ie$h),X=!1;if(e$2e(q)){if(!e$2e(j))throw new t$13("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");o$1p.unpack(q,0,O),o$1p.unpack(j,0,R),X=!0}else{var Y=x.getProperty("NORMAL_UP_OCT32P",S$14.UNSIGNED_SHORT,2,z,L$A),Z=x.getProperty("NORMAL_RIGHT_OCT32P",S$14.UNSIGNED_SHORT,2,z,ie$h);if(e$2e(Y)){if(!e$2e(Z))throw new t$13("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");t$$.octDecodeInRange(Y[0],Y[1],65535,O),t$$.octDecodeInRange(Z[0],Z[1],65535,R),X=!0}else E?(m$19.eastNorthUpToFixedFrame(L,t$12.WGS84,G),p$1d.getMatrix3(G,I)):p$1e.clone(p$1e.IDENTITY,I)}X&&(o$1p.cross(R,O,D),o$1p.normalize(D,D),p$1e.setColumn(I,0,R,I),p$1e.setColumn(I,1,O,I),p$1e.setColumn(I,2,D,I)),n$15.fromRotationMatrix(I,F),N.rotation=F,B=o$1p.fromElements(1,1,1,B);var K=x.getProperty("SCALE",S$14.FLOAT,1,z);e$2e(K)&&o$1p.multiplyByScalar(B,K,B);var Q=x.getProperty("SCALE_NON_UNIFORM",S$14.FLOAT,3,z,L$A);e$2e(Q)&&(B.x*=Q[0],B.y*=Q[1],B.z*=Q[2]),N.scale=B;var J=x.getProperty("BATCH_ID",S$14.UNSIGNED_SHORT,1,z);e$2e(J)||(J=z),p$1d.fromTranslationRotationScale(N,G);var ee=G.clone();A[z]={modelMatrix:ee,batchId:J}}e._modelInstanceCollection=new w$u(C)}function Ue$b(e){var t=e.featuresLength;if(!e$2e(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$M(e,n);e._features=i}}u$y.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},u$y.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2e(e)||e<0||e>=t)throw new t$15("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return Ue$b(this),this._features[e]},u$y.prototype.applyDebugSettings=function(e,t){t=e?t:e$1X.WHITE,this._batchTable.setAllColor(t)},u$y.prototype.applyStyle=function(e){this._batchTable.applyStyle(e)},u$y.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._modelInstanceCollection.modelMatrix=this._tile.computedTransform,this._modelInstanceCollection.shadows=this._tileset.shadows,this._modelInstanceCollection.lightColor=this._tileset.lightColor,this._modelInstanceCollection.luminanceAtZenith=this._tileset.luminanceAtZenith,this._modelInstanceCollection.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._modelInstanceCollection.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._modelInstanceCollection.debugWireframe=this._tileset.debugWireframe;var n=this._modelInstanceCollection._model;if(e$2e(n)){var r=this._tileset.clippingPlanes;n.clippingPlanesOriginMatrix=this._tileset.clippingPlanesOriginMatrix,e$2e(r)&&this._tile.clippingPlanesDirty&&(n._clippingPlanes=r.enabled&&this._tile._isClipped?r:void 0),e$2e(r)&&e$2e(n._clippingPlanes)&&n._clippingPlanes!==r&&(n._clippingPlanes=r)}this._modelInstanceCollection.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&this._batchTable.addDerivedCommands(t,i,!1)},u$y.prototype.isDestroyed=function(){return!1},u$y.prototype.destroy=function(){return this._modelInstanceCollection=this._modelInstanceCollection&&this._modelInstanceCollection.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$11(this)};var e$G={ADD:0,REPLACE:1},f$E=Object.freeze(e$G),K$u={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function ie$g(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.arrayBuffer",e.arrayBuffer),this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=e$1X.clone(e$1X.DARKGRAY),this._highlightColor=e$1X.clone(e$1X.WHITE),this._pointSize=1,this._rtcCenter=void 0,this._quantizedVolumeScale=void 0,this._quantizedVolumeOffset=void 0,this._styleableShaderAttributes=void 0,this._isQuantized=!1,this._isOctEncoded16P=!1,this._isRGB565=!1,this._hasColors=!1,this._hasNormals=!1,this._hasBatchIds=!1,this._decodingState=K$u.READY,this._dequantizeInShader=!0,this._isQuantizedDraco=!1,this._isOctEncodedDraco=!1,this._quantizedRange=0,this._octEncodedRange=0,this.backFaceCulling=!1,this._backFaceCulling=!1,this.normalShading=!0,this._normalShading=!0,this._opaqueRenderState=void 0,this._translucentRenderState=void 0,this._mode=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._pointsLength=0,this._geometryByteLength=0,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._batchTableLoaded=e.batchTableLoaded,this._pickIdLoaded=e.pickIdLoaded,this._opaquePass=u$Z(e.opaquePass,Le$q.OPAQUE),this._cull=u$Z(e.cull,!0),this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=p$1d.clone(p$1d.IDENTITY),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.time=0,this.shadows=W$X.ENABLED,this._boundingSphere=void 0,this.clippingPlanes=void 0,this.isClipped=!1,this.clippingPlanesDirty=!1,this.clippingPlanesOriginMatrix=void 0,this.attenuation=!1,this._attenuation=!1,this.geometricError=0,this.geometricErrorScale=1,this.maximumAttenuation=this._pointSize,We$9(this,e)}Object.defineProperties(ie$g.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},color:{get:function(){return e$1X.clone(this._highlightColor)},set:function(e){this._highlightColor=e$1X.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(e$2e(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=i$1d.clone(e,this._boundingSphere)}}});var X$s=Uint32Array.BYTES_PER_ELEMENT;function We$9(e,t){var i=t.arrayBuffer,n=u$Z(t.byteOffset,0),r=new Uint8Array(i),o=new DataView(i);n+=X$s;var a=o.getUint32(n,!0);if(1!==a)throw new t$13("Only Point Cloud tile version 1 is supported. Version "+a+" is not.");n+=X$s,n+=X$s;var s=o.getUint32(n,!0);if(0===s)throw new t$13("Feature table must have a byte length greater than zero");n+=X$s;var l=o.getUint32(n,!0);n+=X$s;var u=o.getUint32(n,!0);n+=X$s;var c=o.getUint32(n,!0),h=a$K(r,n+=X$s,s),d=JSON.parse(h);n+=s;var f,p,_=new Uint8Array(i,n,l);if(n+=l,u>0){var m=a$K(r,n,u);f=JSON.parse(m),n+=u,c>0&&(p=new Uint8Array(i,n,c),n+=c)}var g=new o$C(d,_),x=g.getGlobalProperty("POINTS_LENGTH");if(g.featuresLength=x,!e$2e(x))throw new t$13("Feature table global property: POINTS_LENGTH must be defined");var y=g.getGlobalProperty("RTC_CENTER",S$14.FLOAT,3);e$2e(y)&&(e._rtcCenter=o$1p.unpack(y));var v,$,b,T,C,S,w,E,P,A=!1,L=!1,M=!1,R=!1,O=!1,D=!1,I=!1,F=!1,B=e$2e(d.extensions)?d.extensions["3DTILES_draco_point_compression"]:void 0,N=e$2e(f)&&e$2e(f.extensions)?f.extensions["3DTILES_draco_point_compression"]:void 0;if(e$2e(N)&&(w=N.properties),e$2e(B)){S=B.properties;var G=B.byteOffset,z=B.byteLength;if(!e$2e(S)||!e$2e(G)||!e$2e(z))throw new t$13("Draco properties, byteOffset, and byteLength must be defined");C=l$R(_,G,G+z),A=e$2e(S.POSITION),L=e$2e(S.RGB)||e$2e(S.RGBA),M=e$2e(S.NORMAL),R=e$2e(S.BATCH_ID),D=e$2e(S.RGBA),e._decodingState=K$u.NEEDS_DECODE}if(e$2e(C)&&(E={buffer:C,featureTableProperties:S,batchTableProperties:w,properties:p$19(S,w),dequantizeInShader:e._dequantizeInShader}),!A)if(e$2e(d.POSITION))v=g.getPropertyArray("POSITION",S$14.FLOAT,3),A=!0;else if(e$2e(d.POSITION_QUANTIZED)){v=g.getPropertyArray("POSITION_QUANTIZED",S$14.UNSIGNED_SHORT,3),O=!0,A=!0;var U=g.getGlobalProperty("QUANTIZED_VOLUME_SCALE",S$14.FLOAT,3);if(!e$2e(U))throw new t$13("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");e._quantizedVolumeScale=o$1p.unpack(U),e._quantizedRange=65535;var V=g.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",S$14.FLOAT,3);if(!e$2e(V))throw new t$13("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");e._quantizedVolumeOffset=o$1p.unpack(V)}if(L||(e$2e(d.RGBA)?($=g.getPropertyArray("RGBA",S$14.UNSIGNED_BYTE,4),D=!0,L=!0):e$2e(d.RGB)?($=g.getPropertyArray("RGB",S$14.UNSIGNED_BYTE,3),L=!0):e$2e(d.RGB565)&&($=g.getPropertyArray("RGB565",S$14.UNSIGNED_SHORT,1),I=!0,L=!0)),M||(e$2e(d.NORMAL)?(b=g.getPropertyArray("NORMAL",S$14.FLOAT,3),M=!0):e$2e(d.NORMAL_OCT16P)&&(b=g.getPropertyArray("NORMAL_OCT16P",S$14.UNSIGNED_BYTE,2),F=!0,M=!0)),R||e$2e(d.BATCH_ID)&&(T=g.getPropertyArray("BATCH_ID",S$14.UNSIGNED_SHORT,1),R=!0),!A)throw new t$13("Either POSITION or POSITION_QUANTIZED must be defined.");if(e$2e(d.CONSTANT_RGBA)){var k=g.getGlobalProperty("CONSTANT_RGBA",S$14.UNSIGNED_BYTE,4);e._constantColor=e$1X.fromBytes(k[0],k[1],k[2],k[3],e._constantColor)}if(R){var W=g.getGlobalProperty("BATCH_LENGTH");if(!e$2e(W))throw new t$13("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");e$2e(p)&&(p=new Uint8Array(p)),e$2e(e._batchTableLoaded)&&e._batchTableLoaded(W,f,p)}!R&&e$2e(p)&&(P=h$D.getBinaryProperties(x,f,p)),e._parsedContent={positions:v,colors:$,normals:b,batchIds:T,styleableProperties:P,draco:E},e._pointsLength=x,e._isQuantized=O,e._isOctEncoded16P=F,e._isRGB565=I,e._isTranslucent=D,e._hasColors=L,e._hasNormals=M,e._hasBatchIds=R}var je$a=new o$1p,Je$5=new o$1p,Ke$7=new o$1p,le$h;function Xe$8(e){if(!e$2e(le$h)){e$2d.setRandomNumberSeed(0),le$h=new Array(e);for(var t=0;t<e;++t)le$h[t]=e$2d.nextRandomNumber()}return le$h}function $e$6(e){for(var t=e.length/3,i=Math.min(t,20),n=Xe$8(20),r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=o$1p.fromElements(r,r,r,je$a),s=o$1p.fromElements(o,o,o,Je$5),l=0;l<i;++l){var u=Math.floor(n[l]*t),c=o$1p.unpack(e,3*u,Ke$7);o$1p.minimumByComponent(a,c,a),o$1p.maximumByComponent(s,c,s)}var h=i$1d.fromCornerPoints(a,s);return h.radius+=e$2d.EPSILON2,h}function Ne$9(e,t){var i=S$14.fromTypedArray(e);return i===S$14.INT||i===S$14.UNSIGNED_INT||i===S$14.DOUBLE?(e$22("Cast pnts property to floats",'Point cloud property "'+t+'" will be casted to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.'),new Float32Array(e)):e}var er$4=new e$2c,rr$5=new e$2c,tr$3=new e$1X,Be$d=0,fe$f=1,_e$b=2,ze$b=3,ar$3=4,ue$g=new p$1d;function ir$4(e,t){var i,n,r=t.context,o=e._parsedContent,a=e._pointsLength,s=o.positions,l=o.colors,u=o.normals,c=o.batchIds,h=o.styleableProperties,d=e$2e(h),f=e._isQuantized,p=e._isQuantizedDraco,_=e._isOctEncoded16P,m=e._isOctEncodedDraco,g=e._quantizedRange,x=e._octEncodedRange,y=e._isRGB565,v=e._isTranslucent,$=e._hasColors,b=e._hasNormals,T=e._hasBatchIds,C=[],S={};if(e._styleableShaderAttributes=S,d){var w=ar$3;for(var E in h)if(h.hasOwnProperty(E)){var P=h[E],A=Ne$9(P.typedArray,E);i=P.componentCount,n=S$14.fromTypedArray(A);var L=t$X.createVertexBuffer({context:r,typedArray:A,usage:A$18.STATIC_DRAW});e._geometryByteLength+=L.sizeInBytes;var M={index:w,vertexBuffer:L,componentsPerAttribute:i,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0};C.push(M),S[E]={location:w,componentCount:i},++w}}var R,O,D,I=t$X.createVertexBuffer({context:r,typedArray:s,usage:A$18.STATIC_DRAW});e._geometryByteLength+=I.sizeInBytes,$&&(R=t$X.createVertexBuffer({context:r,typedArray:l,usage:A$18.STATIC_DRAW}),e._geometryByteLength+=R.sizeInBytes),b&&(O=t$X.createVertexBuffer({context:r,typedArray:u,usage:A$18.STATIC_DRAW}),e._geometryByteLength+=O.sizeInBytes),T&&(c=Ne$9(c,"batchIds"),D=t$X.createVertexBuffer({context:r,typedArray:c,usage:A$18.STATIC_DRAW}),e._geometryByteLength+=D.sizeInBytes);var F=[];if(n=f?S$14.UNSIGNED_SHORT:p?g<=255?S$14.UNSIGNED_BYTE:S$14.UNSIGNED_SHORT:S$14.FLOAT,F.push({index:Be$d,vertexBuffer:I,componentsPerAttribute:3,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(e._boundingSphere=f||p?i$1d.fromCornerPoints(o$1p.ZERO,e._quantizedVolumeScale):$e$6(s)),$)if(y)F.push({index:fe$f,vertexBuffer:R,componentsPerAttribute:1,componentDatatype:S$14.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{var B=v?4:3;F.push({index:fe$f,vertexBuffer:R,componentsPerAttribute:B,componentDatatype:S$14.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}b&&(_?(i=2,n=S$14.UNSIGNED_BYTE):m?(i=2,n=x<=255?S$14.UNSIGNED_BYTE:S$14.UNSIGNED_SHORT):(i=3,n=S$14.FLOAT),F.push({index:_e$b,vertexBuffer:O,componentsPerAttribute:i,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0})),T&&F.push({index:ze$b,vertexBuffer:D,componentsPerAttribute:1,componentDatatype:S$14.fromTypedArray(c),normalize:!1,offsetInBytes:0,strideInBytes:0}),d&&(F=F.concat(C));var N=new c$13({context:r,attributes:F}),G={depthTest:{enabled:!0}};e._opaquePass===Le$q.CESIUM_3D_TILE&&(G.stencilTest=u$M.setCesium3DTileBit(),G.stencilMask=u$M.CESIUM_3D_TILE_MASK),e._opaqueRenderState=d$1m.fromCache(G),e._translucentRenderState=d$1m.fromCache({depthTest:{enabled:!0},depthMask:!1,blending:Ee$r.ALPHA_BLEND}),e._drawCommand=new i$$({boundingVolume:new i$1d,cull:e._cull,modelMatrix:new p$1d,primitiveType:W$18.POINTS,vertexArray:N,count:a,shaderProgram:void 0,uniformMap:void 0,renderState:v?e._translucentRenderState:e._opaqueRenderState,pass:v?Le$q.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function nr$3(e,t){var i=t.context,n=e._isQuantized,r=e._isQuantizedDraco,o=e._isOctEncodedDraco,a={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){var n=er$4;if(n.x=e._attenuation?e.maximumAttenuation:e._pointSize,n.x*=t.pixelRatio,n.y=e.time,e._attenuation){var r,o=t.camera.frustum;r=t.mode===C$14.SCENE2D||o instanceof a$V?Number.POSITIVE_INFINITY:i.drawingBufferHeight/t.camera.frustum.sseDenominator,n.z=e.geometricError*e.geometricErrorScale,n.w=r}return n},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){var t=e.clippingPlanes;return e.isClipped?t.texture:i.defaultTexture},u_clippingPlanesEdgeStyle:function(){var t=e.clippingPlanes;if(!e$2e(t))return e$1X.TRANSPARENT;var i=e$1X.clone(t.edgeColor,tr$3);return i.alpha=t.edgeWidth,i},u_clippingPlanesMatrix:function(){var t=e.clippingPlanes;if(!e$2e(t))return p$1d.IDENTITY;var n=u$Z(e.clippingPlanesOriginMatrix,e._modelMatrix);return p$1d.multiply(i.uniformState.view3D,n,ue$g),p$1d.multiply(ue$g,t.modelMatrix,ue$g)}};(n||r||o)&&(a=p$19(a,{u_quantizedVolumeScaleAndOctEncodedRange:function(){var t=rr$5;if(e$2e(e._quantizedVolumeScale)){var i=o$1p.clone(e._quantizedVolumeScale,t);o$1p.divideByScalar(i,e._quantizedRange,t)}return t.w=e._octEncodedRange,t}})),e$2e(e._uniformMapLoaded)&&(a=e._uniformMapLoaded(a)),e._drawCommand.uniformMap=a}var ve$d=["POSITION","COLOR","NORMAL","POSITION_ABSOLUTE"];function ge$c(e,t){for(var i=/czm_tiles3d_style_(\w+)/g,n=i.exec(e);null!==n;){var r=n[1];-1===t.indexOf(r)&&t.push(r),n=i.exec(e)}}function pe$i(e,t){for(var i=e.numberOfAttributes,n=0;n<i;++n){var r=e.getAttribute(n);if(r.index===t)return r}}function ye$a(e){for(var t=ve$d.length,i=0;i<t;++i){var n=ve$d[i],r="czm_tiles3d_style_"+n,o=n.toLowerCase();e=e.replace(new RegExp(r+"(\\W)","g"),o+"$1")}return e.replace("()","(vec3 position, vec3 position_absolute, vec4 color, vec3 normal)")}function or$2(e,t,i){var n,r,o,a,s,l,u=t.context,c=e$2e(i),h=e._isQuantized,d=e._isQuantizedDraco,f=e._isOctEncoded16P,p=e._isOctEncodedDraco,_=e._isRGB565,m=e._isTranslucent,g=e._hasColors,x=e._hasNormals,y=e._hasBatchIds,v=e._backFaceCulling,$=e._normalShading,b=e._drawCommand.vertexArray,T=e.clippingPlanes,C=e._attenuation,S=m;if(c){var w={translucent:!1};a=i.getColorShaderFunction("getColorFromStyle","czm_tiles3d_style_",w),s=i.getShowShaderFunction("getShowFromStyle","czm_tiles3d_style_",w),l=i.getPointSizeShaderFunction("getPointSizeFromStyle","czm_tiles3d_style_",w),e$2e(a)&&w.translucent&&(S=!0)}e._styleTranslucent=S;var E=e$2e(a),P=e$2e(s),A=e$2e(l),L=e.isClipped,M=[];E&&(ge$c(a,M),a=ye$a(a)),P&&(ge$c(s,M),s=ye$a(s)),A&&(ge$c(l,M),l=ye$a(l));var R=M.indexOf("COLOR")>=0,O=M.indexOf("NORMAL")>=0,D=M.filter((function(e){return-1===ve$d.indexOf(e)}));if(O&&!x)throw new t$13("Style references the NORMAL semantic but the point cloud does not have normals");var I=e._styleableShaderAttributes;for(r in I)if(I.hasOwnProperty(r)){o=I[r];var F=D.indexOf(r)>=0;pe$i(b,o.location).enabled=F}var B=g&&(!E||R);g&&(pe$i(b,fe$f).enabled=B);var N=x&&($||v||O);x&&(pe$i(b,_e$b).enabled=N);var G={a_position:Be$d};B&&(G.a_color=fe$f),N&&(G.a_normal=_e$b),y&&(G.a_batchId=ze$b);var z="",U=D.length;for(n=0;n<U;++n){if(!e$2e(o=I[r=D[n]]))throw new t$13('Style references a property "'+r+'" that does not exist or is not styleable.');var V=o.componentCount,k="czm_tiles3d_style_"+r;z+="attribute "+(1===V?"float":"vec"+V)+" "+k+"; \n",G[k]=o.location}nr$3(e,t);var W="attribute vec3 a_position; \nvarying vec4 v_color; \nuniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier; \nuniform vec4 u_constantColor; \nuniform vec4 u_highlightColor; \n";W+="float u_pointSize; \nfloat u_time; \n",C&&(W+="float u_geometricError; \nfloat u_depthMultiplier; \n"),W+=z,B&&(W+=m?"attribute vec4 a_color; \n":_?"attribute float a_color; \nconst float SHIFT_RIGHT_11 = 1.0 / 2048.0; \nconst float SHIFT_RIGHT_5 = 1.0 / 32.0; \nconst float SHIFT_LEFT_11 = 2048.0; \nconst float SHIFT_LEFT_5 = 32.0; \nconst float NORMALIZE_6 = 1.0 / 64.0; \nconst float NORMALIZE_5 = 1.0 / 32.0; \n":"attribute vec3 a_color; \n"),N&&(W+=f||p?"attribute vec2 a_normal; \n":"attribute vec3 a_normal; \n"),y&&(W+="attribute float a_batchId; \n"),(h||d||p)&&(W+="uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange; \n"),E&&(W+=a),P&&(W+=s),A&&(W+=l),W+="void main() \n{ \n u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x; \n u_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y; \n",C&&(W+=" u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z; \n u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w; \n"),W+=B?m?" vec4 color = a_color; \n":_?" float compressed = a_color; \n float r = floor(compressed * SHIFT_RIGHT_11); \n compressed -= r * SHIFT_LEFT_11; \n float g = floor(compressed * SHIFT_RIGHT_5); \n compressed -= g * SHIFT_LEFT_5; \n float b = compressed; \n vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5); \n vec4 color = vec4(rgb, 1.0); \n":" vec4 color = vec4(a_color, 1.0); \n":" vec4 color = u_constantColor; \n",W+=h||d?" vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz; \n":" vec3 position = a_position; \n",W+=" vec3 position_absolute = vec3(czm_model * vec4(position, 1.0)); \n",N?(W+=f?" vec3 normal = czm_octDecode(a_normal); \n":p?" vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy; \n":" vec3 normal = a_normal; \n",W+=" vec3 normalEC = czm_normal * normal; \n"):W+=" vec3 normal = vec3(1.0); \n",E&&(W+=" color = getColorFromStyle(position, position_absolute, color, normal); \n"),P&&(W+=" float show = float(getShowFromStyle(position, position_absolute, color, normal)); \n"),W+=A?" gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio; \n":C?" vec4 positionEC = czm_modelView * vec4(position, 1.0); \n float depth = -positionEC.z; \n gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize); \n":" gl_PointSize = u_pointSize; \n",W+=" color = color * u_highlightColor; \n",N&&$&&(W+=" float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); \n diffuseStrength = max(diffuseStrength, 0.4); \n color.xyz *= diffuseStrength * czm_lightColor; \n"),W+=" v_color = color; \n gl_Position = czm_modelViewProjection * vec4(position, 1.0); \n",N&&v&&(W+=" float visible = step(-normalEC.z, 0.0); \n gl_Position *= visible; \n gl_PointSize *= visible; \n"),P&&(W+=" gl_Position.w *= float(show); \n gl_PointSize *= float(show); \n"),W+="} \n";var H="varying vec4 v_color; \n";L&&(H+="uniform sampler2D u_clippingPlanes; \nuniform mat4 u_clippingPlanesMatrix; \nuniform vec4 u_clippingPlanesEdgeStyle; \n",H+="\n",H+=f$H(T,u),H+="\n"),H+="void main() \n{ \n gl_FragColor = czm_gammaCorrect(v_color); \n",L&&(H+=p$x("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),H+="} \n",e$2e(e._vertexShaderLoaded)&&(W=e._vertexShaderLoaded(W)),e$2e(e._fragmentShaderLoaded)&&(H=e._fragmentShaderLoaded(H));var q=e._drawCommand;e$2e(q.shaderProgram)&&q.shaderProgram.destroy(),q.shaderProgram=r$14.fromCache({context:u,vertexShaderSource:W,fragmentShaderSource:H,attributeLocations:G});try{q.shaderProgram._bind()}catch{throw new t$13("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function sr$3(e,t){if(e._decodingState===K$u.READY)return!1;if(e._decodingState===K$u.NEEDS_DECODE){var i=e._parsedContent,n=i.draco,r=r$A.decodePointCloud(n,t);e$2e(r)&&(e._decodingState=K$u.DECODING,r.then((function(t){e._decodingState=K$u.READY;var r=e$2e(t.POSITION)?t.POSITION.array:void 0,o=e$2e(t.RGB)?t.RGB.array:void 0,a=e$2e(t.RGBA)?t.RGBA.array:void 0,s=e$2e(t.NORMAL)?t.NORMAL.array:void 0,l=e$2e(t.BATCH_ID)?t.BATCH_ID.array:void 0,u=e$2e(r)&&e$2e(t.POSITION.data.quantization),c=e$2e(s)&&e$2e(t.NORMAL.data.quantization);if(u){var h=t.POSITION.data.quantization,d=h.range;e._quantizedVolumeScale=o$1p.fromElements(d,d,d),e._quantizedVolumeOffset=o$1p.unpack(h.minValues),e._quantizedRange=(1<<h.quantizationBits)-1,e._isQuantizedDraco=!0}c&&(e._octEncodedRange=(1<<t.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);var f=i.styleableProperties,p=n.batchTableProperties;for(var _ in p)if(p.hasOwnProperty(_)){var m=t[_];e$2e(f)||(f={}),f[_]={typedArray:m.array,componentCount:m.data.componentsPerAttribute}}i.positions=u$Z(r,i.positions),i.colors=u$Z(u$Z(a,o),i.colors),i.normals=u$Z(s,i.normals),i.batchIds=u$Z(l,i.batchIds),i.styleableProperties=f})).otherwise((function(t){e._decodingState=K$u.FAILED,e._readyPromise.reject(t)})))}return!0}var cr$2=new e$2c,lr$3=new o$1p;function a$u(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._pickId=void 0,this._batchTable=void 0,this._styleDirty=!1,this._features=void 0,this.featurePropertiesDirty=!1,this._pointCloud=new ie$g({arrayBuffer:n,byteOffset:r,cull:!1,opaquePass:Le$q.CESIUM_3D_TILE,vertexShaderLoaded:v$v(this),fragmentShaderLoaded:P$v(this),uniformMapLoaded:k$t(this),batchTableLoaded:x$C(this),pickIdLoaded:E$A(this)})}function v$v(e){return function(t){return e$2e(e._batchTable)?e._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(t):t}}function P$v(e){return function(t){return e$2e(e._batchTable)?e._batchTable.getFragmentShaderCallback(!1,void 0)(t):"uniform vec4 czm_pickColor;\n"+t}}function k$t(e){return function(t){return e$2e(e._batchTable)?e._batchTable.getUniformMapCallback()(t):p$19(t,{czm_pickColor:function(){return e._pickId.color}})}}function x$C(e){return function(t,i,n){e._batchTable=new h$D(e,t,i,n)}}function E$A(e){return function(){return e$2e(e._batchTable)?e._batchTable.getPickId():"czm_pickColor"}}function I$I(e){var t=e._tileset.pointCloudShading,i=e._tile.contentBoundingVolume.boundingSphere.volume(),n=e$2d.cbrt(i/e.pointsLength),r=e._tile.geometricError;return 0===r&&(r=e$2e(t)&&e$2e(t.baseResolution)?t.baseResolution:n),r}function B$t(e){var t=e.featuresLength;if(!e$2e(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$M(e,n);e._features=i}}ie$g.prototype.update=function(e){if(!sr$3(this,e.context)){var t=!1,i=!p$1d.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,i=!0),e$2e(this._drawCommand)||(ir$4(this,e),i=!0,t=!0,this._ready=!0,this._readyPromise.resolve(this),this._parsedContent=void 0),i){p$1d.clone(this.modelMatrix,this._modelMatrix);var n=this._drawCommand.modelMatrix;if(p$1d.clone(this._modelMatrix,n),e$2e(this._rtcCenter)&&p$1d.multiplyByTranslation(n,this._rtcCenter,n),e$2e(this._quantizedVolumeOffset)&&p$1d.multiplyByTranslation(n,this._quantizedVolumeOffset,n),e.mode!==C$14.SCENE3D){var r=e.mapProjection,o=p$1d.getColumn(n,3,cr$2);e$2c.equals(o,e$2c.UNIT_W)||m$19.basisTo2D(r,n,n)}var a=this._drawCommand.boundingVolume;if(i$1d.clone(this._boundingSphere,a),this._cull){var s=a.center;p$1d.multiplyByPoint(n,s,s);var l=p$1d.getScale(n,lr$3);a.radius*=o$1p.maximumComponent(l)}}this.clippingPlanesDirty&&(this.clippingPlanesDirty=!1,t=!0),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,t=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,t=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,t=!0),(this._style!==this.style||this.styleDirty)&&(this._style=this.style,this.styleDirty=!1,t=!0),t&&or$2(this,e,this._style),this._drawCommand.castShadows=W$X.castShadows(this.shadows),this._drawCommand.receiveShadows=W$X.receiveShadows(this.shadows);var u=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=u?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=u?Le$q.TRANSLUCENT:this._opaquePass;var c=e.commandList,h=e.passes;(h.render||h.pick)&&c.push(this._drawCommand)}},ie$g.prototype.isDestroyed=function(){return!1},ie$g.prototype.destroy=function(){var e=this._drawCommand;return e$2e(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),i$11(this)},Object.defineProperties(a$u.prototype,{featuresLength:{get:function(){return e$2e(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return this._pointCloud.pointsLength}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return this._pointCloud.geometryByteLength}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return e$2e(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._pointCloud.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}}),a$u.prototype.hasProperty=function(e,t){return!!e$2e(this._batchTable)&&this._batchTable.hasProperty(e,t)},a$u.prototype.getFeature=function(e){if(e$2e(this._batchTable)){var t=this.featuresLength;if(!e$2e(e)||e<0||e>=t)throw new t$15("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return B$t(this),this._features[e]}},a$u.prototype.applyDebugSettings=function(e,t){this._pointCloud.color=e?t:e$1X.WHITE},a$u.prototype.applyStyle=function(e){e$2e(this._batchTable)?this._batchTable.applyStyle(e):this._styleDirty=!0};var w$t=new o$Z;function t$s(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._readyPromise=o$1l.defer(),this.featurePropertiesDirty=!1,c$u(this,n,r)}function c$u(e,t,i){i=u$Z(i,0);var n,r=a$K(new Uint8Array(t),i);try{n=JSON.parse(r)}catch{return void e._readyPromise.reject(new t$13("Invalid tile content."))}e._tileset.loadTileset(e._resource,n,e._tile),e._readyPromise.resolve(e)}function i$B(e,t,i,n,r){return function(){var o=document.createElement("canvas"),a=r+2*n;o.height=o.width=a;var s=o.getContext("2d");return s.clearRect(0,0,a,a),0!==n&&(s.beginPath(),s.arc(a/2,a/2,a/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=i,s.fill(),e<1&&(s.save(),s.globalCompositeOperation="destination-out",s.beginPath(),s.arc(a/2,a/2,r/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle="black",s.fill(),s.restore())),s.beginPath(),s.arc(a/2,a/2,r/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=t,s.fill(),o}}function i$A(e,t,i,n,r){this._content=e,this._billboard=i,this._label=n,this._polyline=r,this._batchId=t,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),s$r(this)}a$u.prototype.update=function(e,t){var i,n=this._pointCloud,r=u$Z(e.pointCloudShading,w$t),o=this._tile,a=this._batchTable,s=t.mode,l=e.clippingPlanes;!e$2e(this._pickId)&&!e$2e(a)&&(this._pickId=t.context.createPickId({primitive:e,content:this})),e$2e(a)&&a.update(e,t),i=e$2e(o._contentBoundingVolume)?s===C$14.SCENE3D?o._contentBoundingVolume.boundingSphere:o._contentBoundingVolume2D.boundingSphere:s===C$14.SCENE3D?o._boundingVolume.boundingSphere:o._boundingVolume2D.boundingSphere;var u=this._styleDirty;this._styleDirty=!1,n.clippingPlanesOriginMatrix=e.clippingPlanesOriginMatrix,n.style=e$2e(a)?void 0:e.style,n.styleDirty=u,n.modelMatrix=o.computedTransform,n.time=e.timeSinceLoad,n.shadows=e.shadows,n.boundingSphere=i,n.clippingPlanes=l,n.isClipped=e$2e(l)&&l.enabled&&o._isClipped,n.clippingPlanesDirty=o.clippingPlanesDirty,n.attenuation=r.attenuation,n.backFaceCulling=r.backFaceCulling,n.normalShading=r.normalShading,n.geometricError=I$I(this),n.geometricErrorScale=r.geometricErrorScale,e$2e(r)&&e$2e(r.maximumAttenuation)?n.maximumAttenuation=r.maximumAttenuation:o.refine===f$E.ADD?n.maximumAttenuation=5:n.maximumAttenuation=e.maximumScreenSpaceError,n.update(t)},a$u.prototype.isDestroyed=function(){return!1},a$u.prototype.destroy=function(){return this._pickId=this._pickId&&this._pickId.destroy(),this._pointCloud=this._pointCloud&&this._pointCloud.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$11(this)},Object.defineProperties(t$s.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}}),t$s.prototype.hasProperty=function(e,t){return!1},t$s.prototype.getFeature=function(e){},t$s.prototype.applyDebugSettings=function(e,t){},t$s.prototype.applyStyle=function(e){},t$s.prototype.update=function(e,t){},t$s.prototype.isDestroyed=function(){return!1},t$s.prototype.destroy=function(){return i$11(this)};var m$w=new a$18;function s$r(e){var t=e._billboard;if(e$2e(e._billboardImage)&&e._billboardImage!==t.image)t.image=e._billboardImage;else if(!e$2e(e._billboardImage)){var i=u$Z(e._color,i$A.defaultColor),n=u$Z(e._pointOutlineColor,i$A.defaultPointOutlineColor),r=u$Z(e._pointOutlineWidth,i$A.defaultPointOutlineWidth),o=u$Z(e._pointSize,i$A.defaultPointSize),a=e._billboardColor,s=e._billboardOutlineColor,l=e._billboardOutlineWidth,u=e._billboardSize;if(!e$1X.equals(i,a)||!e$1X.equals(n,s)||r!==l||o!==u){e._billboardColor=e$1X.clone(i,e._billboardColor),e._billboardOutlineColor=e$1X.clone(n,e._billboardOutlineColor),e._billboardOutlineWidth=r,e._billboardSize=o;var c=i.alpha,h=i.toCssColorString(),d=n.toCssColorString(),f=JSON.stringify([h,o,d,r]);t.setImage(f,i$B(c,h,d,r,o))}}}function b$G(e){this._positions=e.positions,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._rectangle=e.rectangle,this._minHeight=e.minimumHeight,this._maxHeight=e.maximumHeight,this._billboardCollection=void 0,this._labelCollection=void 0,this._polylineCollection=void 0,this._verticesPromise=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._resolvedPromise=!1}function G$A(e,t){var i=e._rectangle,n=e._minHeight,r=e._maxHeight,o=2+h$18.packedLength+t$12.packedLength,a=new Float64Array(o),s=0;return a[s++]=n,a[s++]=r,h$18.pack(i,a,s),s+=h$18.packedLength,t$12.pack(t,a,s),a}Object.defineProperties(i$A.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=e$1X.clone(e,this._color),s$r(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,s$r(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=e$1X.clone(e,this._pointOutlineColor),s$r(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,s$r(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&e.alpha>0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){e$2e(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){var t=u$Z(this._heightOffset,0),i=this._content.tileset.ellipsoid,n=i.cartesianToCartographic(this._billboard.position,m$w);n.height=n.height-t+e;var r=i.cartographicToCartesian(n);this._billboard.position=r,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],r],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=e$1X.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){var t=this._billboardImage!==e;this._billboardImage=e,t&&s$r(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){var e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}}),i$A.defaultColor=e$1X.WHITE,i$A.defaultPointOutlineColor=e$1X.BLACK,i$A.defaultPointOutlineWidth=0,i$A.defaultPointSize=8,i$A.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},i$A.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},i$A.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},i$A.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},i$A.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},i$A.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},i$A.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},Object.defineProperties(b$G.prototype,{pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){return this._billboardCollection.textureAtlas.texture.sizeInBytes+this._labelCollection._textureAtlas.texture.sizeInBytes}},readyPromise:{get:function(){return this._readyPromise.promise}}});var q$y=new i$W("createVectorTilePoints"),J$s=new o$1p;function K$t(e,t){if(!e$2e(e._billboardCollection)){var i;if(!e$2e(e._verticesPromise)){i=e._positions;var n=e._packedBuffer;e$2e(n)||(i=e._positions=l$R(i),e._batchIds=l$R(e._batchIds),n=e._packedBuffer=G$A(e,t));var r=[i.buffer,n.buffer],o={positions:i.buffer,packedBuffer:n.buffer},a=e._verticesPromise=q$y.scheduleTask(o,r);if(!e$2e(a))return;a.then((function(t){e._positions=new Float64Array(t.positions),e._ready=!0}))}if(e._ready&&!e$2e(e._billboardCollection)){i=e._positions;var s=e._batchTable,l=e._batchIds,u=e._billboardCollection=new w$O({batchTable:s}),c=e._labelCollection=new g$W({batchTable:s}),h=e._polylineCollection=new J$T;h._useHighlightColor=!0;for(var d=i.length/3,f=0;f<d;++f){var p=l[f],_=o$1p.unpack(i,3*f,J$s),m=u.add();m.position=_,m._batchIndex=p;var g=c.add();g.text=" ",g.position=_,g._batchIndex=p,h.add().positions=[o$1p.clone(_),o$1p.clone(_)]}e._positions=void 0,e._packedBuffer=void 0}}}function M$x(e,t){for(var i=e._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.show=!0,o.pointSize=i$A.defaultPointSize,o.color=i$A.defaultColor,o.pointOutlineColor=i$A.defaultPointOutlineColor,o.pointOutlineWidth=i$A.defaultPointOutlineWidth,o.labelColor=e$1X.WHITE,o.labelOutlineColor=e$1X.WHITE,o.labelOutlineWidth=1,o.font="30px sans-serif",o.labelStyle=R$S.FILL,o.labelText=void 0,o.backgroundColor=new e$1X(.165,.165,.165,.8),o.backgroundPadding=new o$1o(7,5),o.backgroundEnabled=!1,o.scaleByDistance=void 0,o.translucencyByDistance=void 0,o.distanceDisplayCondition=void 0,o.heightOffset=0,o.anchorLineEnabled=!1,o.anchorLineColor=e$1X.WHITE,o.image=void 0,o.disableDepthTestDistance=0,o.horizontalOrigin=j$V.CENTER,o.verticalOrigin=S$Q.CENTER,o.labelHorizontalOrigin=j$V.RIGHT,o.labelVerticalOrigin=S$Q.BASELINE}}b$G.prototype.createFeatures=function(e,t){for(var i=this._billboardCollection,n=this._labelCollection,r=this._polylineCollection,o=this._batchIds,a=o.length,s=0;s<a;++s){var l=o[s],u=i.get(s),c=n.get(s),h=r.get(s);t[l]=new i$A(e,l,u,c,h)}},b$G.prototype.applyDebugSettings=function(e,t){e?(e$1X.clone(t,this._billboardCollection._highlightColor),e$1X.clone(t,this._labelCollection._highlightColor),e$1X.clone(t,this._polylineCollection._highlightColor)):(e$1X.clone(e$1X.WHITE,this._billboardCollection._highlightColor),e$1X.clone(e$1X.WHITE,this._labelCollection._highlightColor),e$1X.clone(e$1X.WHITE,this._polylineCollection._highlightColor))};var Q$v=new e$1X,U$v=new e$1X,X$r=new e$1X,Y$r=new e$1X,Z$u=new e$1X,$$u=new e$1X,g$F=new o$Y,C$A=new o$Y,k$s=new r$Z;function a$t(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=u$Z(e.center,o$1p.ZERO),this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=_0x2b86ba.BOTH}function U$u(e){var t=new Float64Array(3+o$1p.packedLength+t$12.packedLength+h$18.packedLength),i=0;return t[i++]=e._indices.BYTES_PER_ELEMENT,t[i++]=e._minimumHeight,t[i++]=e._maximumHeight,o$1p.pack(e._center,t,i),i+=o$1p.packedLength,t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,h$18.pack(e._rectangle,t,i),t}function F$y(e,t){for(var i=1,n=t[i++],r=e._boundingVolumes=new Array(n),o=0;o<n;++o)r[o]=y$Y.unpack(t,i),i+=y$Y.packedLength;for(var a=t[i++],s=e._batchedIndices=new Array(a),l=0;l<a;++l){var u=e$1X.unpack(t,i);i+=e$1X.packedLength;for(var c=t[i++],h=t[i++],d=t[i++],f=new Array(d),p=0;p<d;++p)f[p]=t[i++];s[l]=new c$x({color:u,offset:c,count:h,batchIds:f})}}b$G.prototype.applyStyle=function(e,t){if(e$2e(e))for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];if(e$2e(e.show)&&(o.show=e.show.evaluate(o)),e$2e(e.pointSize)&&(o.pointSize=e.pointSize.evaluate(o)),e$2e(e.color)&&(o.color=e.color.evaluateColor(o,Q$v)),e$2e(e.pointOutlineColor)&&(o.pointOutlineColor=e.pointOutlineColor.evaluateColor(o,U$v)),e$2e(e.pointOutlineWidth)&&(o.pointOutlineWidth=e.pointOutlineWidth.evaluate(o)),e$2e(e.labelColor)&&(o.labelColor=e.labelColor.evaluateColor(o,X$r)),e$2e(e.labelOutlineColor)&&(o.labelOutlineColor=e.labelOutlineColor.evaluateColor(o,Y$r)),e$2e(e.labelOutlineWidth)&&(o.labelOutlineWidth=e.labelOutlineWidth.evaluate(o)),e$2e(e.font)&&(o.font=e.font.evaluate(o)),e$2e(e.labelStyle)&&(o.labelStyle=e.labelStyle.evaluate(o)),e$2e(e.labelText)?o.labelText=e.labelText.evaluate(o):o.labelText=void 0,e$2e(e.backgroundColor)&&(o.backgroundColor=e.backgroundColor.evaluateColor(o,Z$u)),e$2e(e.backgroundPadding)&&(o.backgroundPadding=e.backgroundPadding.evaluate(o)),e$2e(e.backgroundEnabled)&&(o.backgroundEnabled=e.backgroundEnabled.evaluate(o)),e$2e(e.scaleByDistance)){var a=e.scaleByDistance.evaluate(o);g$F.near=a.x,g$F.nearValue=a.y,g$F.far=a.z,g$F.farValue=a.w,o.scaleByDistance=g$F}else o.scaleByDistance=void 0;if(e$2e(e.translucencyByDistance)){var s=e.translucencyByDistance.evaluate(o);C$A.near=s.x,C$A.nearValue=s.y,C$A.far=s.z,C$A.farValue=s.w,o.translucencyByDistance=C$A}else o.translucencyByDistance=void 0;if(e$2e(e.distanceDisplayCondition)){var l=e.distanceDisplayCondition.evaluate(o);k$s.near=l.x,k$s.far=l.y,o.distanceDisplayCondition=k$s}else o.distanceDisplayCondition=void 0;e$2e(e.heightOffset)&&(o.heightOffset=e.heightOffset.evaluate(o)),e$2e(e.anchorLineEnabled)&&(o.anchorLineEnabled=e.anchorLineEnabled.evaluate(o)),e$2e(e.anchorLineColor)&&(o.anchorLineColor=e.anchorLineColor.evaluateColor(o,$$u)),e$2e(e.image)?o.image=e.image.evaluate(o):o.image=void 0,e$2e(e.disableDepthTestDistance)&&(o.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(o)),e$2e(e.horizontalOrigin)&&(o.horizontalOrigin=e.horizontalOrigin.evaluate(o)),e$2e(e.verticalOrigin)&&(o.verticalOrigin=e.verticalOrigin.evaluate(o)),e$2e(e.labelHorizontalOrigin)&&(o.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(o)),e$2e(e.labelVerticalOrigin)&&(o.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(o))}else M$x(this,t)},b$G.prototype.update=function(e){K$t(this,e.mapProjection.ellipsoid),this._ready&&(this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e),this._resolvedPromise||(this._readyPromise.resolve(),this._resolvedPromise=!0))},b$G.prototype.isDestroyed=function(){return!1},b$G.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),i$11(this)},Object.defineProperties(a$t.prototype,{trianglesLength:{get:function(){return e$2e(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return e$2e(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}});var W$y=new i$W("createVectorTilePolygons"),z$w=new e$1X;function G$z(e){if(!e$2e(e._primitive)){if(!e$2e(e._verticesPromise)){var t=e._positions,i=e._counts,n=e._indexCounts,r=e._indices,o=e._transferrableBatchIds,a=e._batchTableColors,s=e._packedBuffer;if(!e$2e(a)){t=e._positions=l$R(e._positions),i=e._counts=l$R(e._counts),n=e._indexCounts=l$R(e._indexCounts),r=e._indices=l$R(e._indices),e._center=e._ellipsoid.cartographicToCartesian(h$18.center(e._rectangle)),o=e._transferrableBatchIds=new Uint32Array(e._batchIds),a=e._batchTableColors=new Uint32Array(o.length);for(var l=e._batchTable,u=a.length,c=0;c<u;++c){var h=l.getColor(c,z$w);a[c]=h.toRgba()}s=e._packedBuffer=U$u(e)}var d=[t.buffer,i.buffer,n.buffer,r.buffer,o.buffer,a.buffer,s.buffer],f={packedBuffer:s.buffer,positions:t.buffer,counts:i.buffer,indexCounts:n.buffer,indices:r.buffer,batchIds:o.buffer,batchTableColors:a.buffer},p=e._polygonMinimumHeights,_=e._polygonMaximumHeights;e$2e(p)&&e$2e(_)&&(p=l$R(p),_=l$R(_),d.push(p.buffer,_.buffer),f.minimumHeights=p,f.maximumHeights=_);var m=e._verticesPromise=W$y.scheduleTask(f,d);if(!e$2e(m))return;o$1l(m,(function(t){e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;var i=new Float64Array(t.packedBuffer),n=i[0];F$y(e,i),e._indices=2===ce$z.getSizeInBytes(n)?new Uint16Array(t.indices):new Uint32Array(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._batchedPositions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!e$2e(e._primitive)&&(e._primitive=new y$y({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}a$t.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},a$t.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},a$t.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},a$t.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},a$t.prototype.update=function(e){G$z(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},a$t.prototype.isDestroyed=function(){return!1},a$t.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$11(this)};var $$t="attribute vec4 currentPosition;\nattribute vec4 previousPosition;\nattribute vec4 nextPosition;\nattribute vec2 expandAndWidth;\nattribute float a_batchId;\n\nuniform mat4 u_modifiedModelView;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = u_modifiedModelView * currentPosition;\n vec4 prev = u_modifiedModelView * previousPosition;\n vec4 next = u_modifiedModelView * nextPosition;\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n\n#ifdef LOG_DEPTH\n czm_vertexLogDepth(czm_projection * p);\n#endif\n}\n";function h$C(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=e$1X.clone(e$1X.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._readyPromise=o$1l.defer(),this._verticesPromise=void 0}function re$n(e){var t=e._rectangle,i=e._minimumHeight,n=e._maximumHeight,r=e._ellipsoid,o=e._center,a=2+h$18.packedLength+t$12.packedLength+o$1p.packedLength,s=new Float64Array(a),l=0;return s[l++]=i,s[l++]=n,h$18.pack(t,s,l),l+=h$18.packedLength,t$12.pack(r,s,l),l+=t$12.packedLength,o$1p.pack(o,s,l),s}Object.defineProperties(h$C.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},readyPromise:{get:function(){return this._readyPromise.promise}}});var ae$f=new i$W("createVectorTilePolylines"),m$v={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function ne$i(e,t){if(!e$2e(e._va)){if(!e$2e(e._verticesPromise)){var i=e._positions,n=e._widths,r=e._counts,o=e._transferrableBatchIds,a=e._packedBuffer;e$2e(a)||(i=e._positions=l$R(i),n=e._widths=l$R(n),r=e._counts=l$R(r),o=e._transferrableBatchIds=l$R(e._batchIds),a=e._packedBuffer=re$n(e));var s=[i.buffer,n.buffer,r.buffer,o.buffer,a.buffer],l={positions:i.buffer,widths:n.buffer,counts:r.buffer,batchIds:o.buffer,packedBuffer:a.buffer},u=e._verticesPromise=ae$f.scheduleTask(l,s);if(!e$2e(u))return;o$1l(u,(function(t){e._currentPositions=new Float32Array(t.currentPositions),e._previousPositions=new Float32Array(t.previousPositions),e._nextPositions=new Float32Array(t.nextPositions),e._expandAndWidth=new Float32Array(t.expandAndWidth),e._vertexBatchIds=new Uint16Array(t.batchIds);var i=t.indexDatatype;e._indices=i===ce$z.UNSIGNED_SHORT?new Uint16Array(t.indices):new Uint32Array(t.indices),e._ready=!0}))}if(e._ready&&!e$2e(e._va)){var c=e._currentPositions,h=e._previousPositions,d=e._nextPositions,f=e._expandAndWidth,p=e._vertexBatchIds,_=e._indices,m=h.byteLength+c.byteLength+d.byteLength;m+=f.byteLength+p.byteLength+_.byteLength,e._trianglesLength=_.length/3,e._geometryByteLength=m;var g=t$X.createVertexBuffer({context:t,typedArray:h,usage:A$18.STATIC_DRAW}),x=t$X.createVertexBuffer({context:t,typedArray:c,usage:A$18.STATIC_DRAW}),y=t$X.createVertexBuffer({context:t,typedArray:d,usage:A$18.STATIC_DRAW}),v=t$X.createVertexBuffer({context:t,typedArray:f,usage:A$18.STATIC_DRAW}),$=t$X.createVertexBuffer({context:t,typedArray:p,usage:A$18.STATIC_DRAW}),b=t$X.createIndexBuffer({context:t,typedArray:_,usage:A$18.STATIC_DRAW,indexDatatype:2===_.BYTES_PER_ELEMENT?ce$z.UNSIGNED_SHORT:ce$z.UNSIGNED_INT}),T=[{index:m$v.previousPosition,vertexBuffer:g,componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{index:m$v.currentPosition,vertexBuffer:x,componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{index:m$v.nextPosition,vertexBuffer:y,componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{index:m$v.expandAndWidth,vertexBuffer:v,componentDatatype:S$14.FLOAT,componentsPerAttribute:2},{index:m$v.a_batchId,vertexBuffer:$,componentDatatype:S$14.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new c$13({context:t,attributes:T,indexBuffer:b}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0,e._readyPromise.resolve()}}}var b$F=new p$1d,H$C=new o$1p;function oe$e(e,t){e$2e(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){var i=t.uniformState.view;return p$1d.clone(i,b$F),p$1d.multiplyByPoint(b$F,e._center,H$C),p$1d.setTranslation(b$F,H$C,b$F),b$F},u_highlightColor:function(){return e._highlightColor}})}function ie$f(e){if(!e$2e(e._rs)){e._rs=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:{enabled:!0,factor:-5,units:-5}})}}var de$d="uniform vec4 u_highlightColor; \nvoid main()\n{\n gl_FragColor = u_highlightColor;\n}\n";function fe$e(e,t){if(!e$2e(e._sp)){var i=e._batchTable,n=i.getVertexShaderCallback(!1,"a_batchId",void 0)($$t),r=i.getFragmentShaderCallback()(de$d,!1,void 0),o=new s$V({defines:["VECTOR_TILE",s$Z.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[Z$_,n]}),a=new s$V({defines:["VECTOR_TILE"],sources:[r]});e._sp=r$14.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:m$v})}}function ue$f(e,t){if(!e$2e(e._command)){var i=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new i$$({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:i,boundingVolume:e._boundingVolume,pass:Le$q.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}function se$d(e,t){for(var i=e._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.show=!0,o.color=e$1X.WHITE}}h$C.prototype.createFeatures=function(e,t){for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=i[r];t[o]=new e$M(e,o)}},h$C.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var he$d=new e$1X,ce$g=e$1X.WHITE,_e$a=!0;function y$v(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._contentReadyPromise=void 0,this._readyPromise=o$1l.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,vt$4(this,n,r)}function ft$4(e){return function(t,i){e$2e(e._polygons)&&e._polygons.updateCommands(t,i)}}function dt$6(e,t){var i,n,r,o,a=u$Z(e.POLYGONS_LENGTH,0),s=u$Z(e.POLYLINES_LENGTH,0),l=u$Z(e.POINTS_LENGTH,0);if(a>0&&e$2e(e.POLYGON_BATCH_IDS)){var u=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,u,a)}if(s>0&&e$2e(e.POLYLINE_BATCH_IDS)){var c=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,c,s)}if(l>0&&e$2e(e.POINT_BATCH_IDS)){var h=t.byteOffset+e.POINT_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,h,l)}var d=e$2e(i)||e$2e(n)||e$2e(r),f=a>0&&!e$2e(i)||s>0&&!e$2e(n)||l>0&&!e$2e(r);if(d&&f)throw new t$13("If one group of batch ids is defined, then all batch ids must be defined.");if(!e$2e(i)&&!e$2e(n)&&!e$2e(r)){var p=0;if(!e$2e(i)&&a>0)for(i=new Uint16Array(a),o=0;o<a;++o)i[o]=p++;if(!e$2e(n)&&s>0)for(n=new Uint16Array(s),o=0;o<s;++o)n[o]=p++;if(!e$2e(r)&&l>0)for(r=new Uint16Array(l),o=0;o<l;++o)r[o]=p++}return{polygons:i,polylines:n,points:r}}h$C.prototype.applyStyle=function(e,t){if(e$2e(e))for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.color=e$2e(e.color)?e.color.evaluateColor(o,he$d):ce$g,o.show=e$2e(e.show)?e.show.evaluate(o):_e$a}else se$d(this,t)},h$C.prototype.update=function(e){var t=e.context;if(ne$i(this,t),oe$e(this,t),fe$e(this,t),ie$f(this),this._ready){var i=e.passes;(i.render||i.pick)&&ue$f(this,e)}},h$C.prototype.isDestroyed=function(){return!1},h$C.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),i$11(this)},Object.defineProperties(y$v.prototype,{featuresLength:{get:function(){return e$2e(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return e$2e(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){var e=0;return e$2e(this._polygons)&&(e+=this._polygons.trianglesLength),e$2e(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){var e=0;return e$2e(this._polygons)&&(e+=this._polygons.geometryByteLength),e$2e(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return e$2e(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return e$2e(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var B$s=Uint16Array.BYTES_PER_ELEMENT,h$B=Uint32Array.BYTES_PER_ELEMENT;function vt$4(e,t,i){i=u$Z(i,0);var n=new Uint8Array(t),r=new DataView(t);i+=h$B;var o=r.getUint32(i,!0);if(1!==o)throw new t$13("Only Vector tile version 1 is supported. Version "+o+" is not.");i+=h$B;var a=r.getUint32(i,!0);if(i+=h$B,0!==a){var s=r.getUint32(i,!0);if(i+=h$B,0===s)throw new t$13("Feature table must have a byte length greater than zero");var l=r.getUint32(i,!0);i+=h$B;var u=r.getUint32(i,!0);i+=h$B;var c=r.getUint32(i,!0);i+=h$B;var h=r.getUint32(i,!0);i+=h$B;var d=r.getUint32(i,!0);i+=h$B;var f=r.getUint32(i,!0);i+=h$B;var p=r.getUint32(i,!0),_=a$K(n,i+=h$B,s),m=JSON.parse(_);i+=s;var g,x,y=new Uint8Array(t,i,l);if(i+=l,u>0){var v=a$K(n,i,u);g=JSON.parse(v),i+=u,c>0&&(x=new Uint8Array(t,i,c),x=new Uint8Array(x),i+=c)}var $=u$Z(m.POLYGONS_LENGTH,0),b=u$Z(m.POLYLINES_LENGTH,0),T=u$Z(m.POINTS_LENGTH,0),C=$+b+T,S=new h$D(e,C,g,x,ft$4(e));if(e._batchTable=S,0!==C){var w,E,P;if(!e$2e(m.REGION))throw new t$13("REGION is required in the feature table.");var A=m.REGION;w=h$18.unpack(A),E=A[4],P=A[5];var L,M=e._tile.computedTransform;e$2e(m.RTC_CENTER)?(L=o$1p.unpack(m.RTC_CENTER),p$1d.multiplyByPoint(M,L,L)):((L=h$18.center(w)).height=e$2d.lerp(E,P,.5),L=t$12.WGS84.cartographicToCartesian(L));var R=dt$6(m,y);if(i+=i%4,$>0){var O=new Uint32Array(t,i,h/h$B);i+=h;var D=new Uint16Array(t,i,d/B$s);i+=d;var I,F,B=y.byteOffset+m.POLYGON_COUNT.byteOffset,N=new Uint32Array(y.buffer,B,$),G=y.byteOffset+m.POLYGON_INDEX_COUNT.byteOffset,z=new Uint32Array(y.buffer,G,$);if(e$2e(m.POLYGON_MINIMUM_HEIGHTS)&&e$2e(m.POLYGON_MAXIMUM_HEIGHTS)){var U=y.byteOffset+m.POLYGON_MINIMUM_HEIGHTS.byteOffset;I=new Float32Array(y.buffer,U,$);var V=y.byteOffset+m.POLYGON_MAXIMUM_HEIGHTS.byteOffset;F=new Float32Array(y.buffer,V,$)}e._polygons=new a$t({positions:D,counts:N,indexCounts:z,indices:O,minimumHeight:E,maximumHeight:P,polygonMinimumHeights:I,polygonMaximumHeights:F,center:L,rectangle:w,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:S,batchIds:R.polygons,modelMatrix:M})}if(b>0){var k=new Uint16Array(t,i,f/B$s);i+=f;var W,H=y.byteOffset+m.POLYLINE_COUNT.byteOffset,q=new Uint32Array(y.buffer,H,b);if(e$2e(m.POLYLINE_WIDTHS)){var j=y.byteOffset+m.POLYLINE_WIDTHS.byteOffset;W=new Uint16Array(y.buffer,j,b)}else{W=new Uint16Array(b);for(var X=0;X<b;++X)W[X]=2}e._polylines=new h$C({positions:k,widths:W,counts:q,batchIds:R.polylines,minimumHeight:E,maximumHeight:P,center:L,rectangle:w,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:S})}if(T>0){var Y=new Uint16Array(t,i,p/B$s);e._points=new b$G({positions:Y,batchIds:R.points,minimumHeight:E,maximumHeight:P,rectangle:w,batchTable:S})}}}else e._readyPromise.resolve(e)}function k$r(e){var t=e.featuresLength;if(!e$2e(e._features)&&t>0){var i=new Array(t);e$2e(e._polygons)&&e._polygons.createFeatures(e,i),e$2e(e._polylines)&&e._polylines.createFeatures(e,i),e$2e(e._points)&&e._points.createFeatures(e,i),e._features=i}}function i$z(e,t,i,n,r){if(this._tileset=e,this._tile=t,this._resource=i,this._model=void 0,n.byteLength<12)throw new RuntimeError("Invalid glb content");const o=new DataView(n,r).getUint32(8,!0),a=new Uint8Array(n,r,o);this._model=new F$B({gltf:a,cull:!1,releaseGltfJson:!0,opaquePass:Le$q.CESIUM_3D_TILE,basePath:i,requestType:U$1f.TILES3D,modelMatrix:t.computedTransform,upAxis:e._gltfUpAxis,forwardAxis:v$y.X,shadows:e.shadows,debugWireframe:e.debugWireframe,incrementallyLoadTextures:!1,imageBasedLightingFactor:e.imageBasedLightingFactor,lightColor:e.lightColor,luminanceAtZenith:e.luminanceAtZenith,sphericalHarmonicCoefficients:e.sphericalHarmonicCoefficients,specularEnvironmentMaps:e.specularEnvironmentMaps,owner:e})}y$v.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},y$v.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2e(e)||e<0||e>=t)throw new t$15("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return k$r(this),this._features[e]},y$v.prototype.applyDebugSettings=function(e,t){e$2e(this._polygons)&&this._polygons.applyDebugSettings(e,t),e$2e(this._polylines)&&this._polylines.applyDebugSettings(e,t),e$2e(this._points)&&this._points.applyDebugSettings(e,t)},y$v.prototype.applyStyle=function(e){k$r(this),e$2e(this._polygons)&&this._polygons.applyStyle(e,this._features),e$2e(this._polylines)&&this._polylines.applyStyle(e,this._features),e$2e(this._points)&&this._points.applyStyle(e,this._features)},y$v.prototype.update=function(e,t){var i=!0;if(e$2e(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),i=i&&this._polygons._ready),e$2e(this._polylines)&&(this._polylines.update(t),i=i&&this._polylines._ready),e$2e(this._points)&&(this._points.update(t),i=i&&this._points._ready),e$2e(this._batchTable)&&i&&this._batchTable.update(e,t),!e$2e(this._contentReadyPromise)){var n=e$2e(this._points)?this._points.readyPromise:void 0,r=e$2e(this._polygons)?this._polygons.readyPromise:void 0,o=e$2e(this._polylines)?this._polylines.readyPromise:void 0,a=this;this._contentReadyPromise=o$1l.all([n,r,o]).then((function(){a._readyPromise.resolve(a)}))}},y$v.prototype.isDestroyed=function(){return!1},y$v.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$11(this)},Object.defineProperties(i$z.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return this._model.trianglesLength}},geometryByteLength:{get:function(){return this._model.geometryByteLength}},texturesByteLength:{get:function(){return this._model.texturesByteLength}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._model.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}}),i$z.prototype.update=function(e,t){this._model.shadows=this._tileset.shadows,this._model.imageBasedLightingFactor=this._tileset.imageBasedLightingFactor,this._model.lightColor=this._tileset.lightColor,this._model.luminanceAtZenith=this._tileset.luminanceAtZenith,this._model.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._model.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._model.debugWireframe=this._tileset.debugWireframe;var i=this._tileset.clippingPlanes;this._model.clippingPlanesOriginMatrix=this._tileset.clippingPlanesOriginMatrix,e$2e(i)&&this._tile.clippingPlanesDirty&&(this._model._clippingPlanes=i.enabled&&this._tile._isClipped?i:void 0),e$2e(i)&&e$2e(this._model._clippingPlanes)&&this._model._clippingPlanes!==i&&(this._model._clippingPlanes=i),this._model.update(t)},i$z.prototype.isDestroyed=function(){return!1},i$z.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),i$11(this)};var i$y={b3dm:function(e,t,i,n,r){return new n$p(e,t,i,n,r)},pnts:function(e,t,i,n,r){return new a$u(e,t,i,n,r)},i3dm:function(e,t,i,n,r){return new u$y(e,t,i,n,r)},cmpt:function(e,t,i,n,r){return new i$C(e,t,i,n,r,i$y)},json:function(e,t,i,n,r){return new t$s(e,t,i,n,r)},geom:function(e,t,i,n,r){return new p$w(e,t,i,n,r)},vctr:function(e,t,i,n,r){return new y$v(e,t,i,n,r)},glb:function(e,t,i,n,r){return new i$z(e,t,i,n,r)}},e$F={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5},X$q=Object.freeze(e$F),e$E={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0},s$q=Object.freeze(e$E);function f$D(){}var u$x={stack:new r$S,stackMaximumLength:0};function d$F(e){return e._visible&&e._inRequestVolume}function m$u(e){return e.hasEmptyContent||e.hasTilesetContent}function l$F(e){return!m$u(e)&&e.contentUnloaded}function T$w(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:(t.hasEmptyContent,!0))}function g$E(e,t,i,n){for(var r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];s.updateVisibility(n),d$F(s)&&i.push(s)}}function C$z(e,t){(l$F(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function _$s(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function b$E(e){++e.statistics.visited}function x$B(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==Ae$w.OUTSIDE&&e._selectedTiles.push(t)}function W$x(){}function g$D(e){return e._visible&&e._inRequestVolume}f$D.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e._hasMixedContent=!1;var i=!0,n=e.root;if(n.updateVisibility(t),!d$F(n))return i;var r=u$x.stack;for(r.push(e.root);r.length>0;){u$x.stackMaximumLength=Math.max(u$x.stackMaximumLength,r.length);var o=r.pop(),a=o.refine===f$E.ADD,s=o.refine===f$E.REPLACE,l=T$w(e,o);l&&g$E(e,o,r,t),(a||s&&!l)&&(C$z(e,o),_$s(e,o,t),x$B(e,o,t),!m$u(o)&&!o.contentAvailable&&(i=!1)),b$E(e)}return u$x.stack.trim(u$x.stackMaximumLength),i};var k$q={stack:new r$S,stackMaximumLength:0},E$z={stack:new r$S,stackMaximumLength:0},S$t={stack:new r$S,stackMaximumLength:0},d$E={stack:new r$S,stackMaximumLength:0,ancestorStack:new r$S,ancestorStackMaximumLength:0},H$B=2;function I$H(e,t,i){V$q(e,t,e._maximumScreenSpaceError,e._maximumScreenSpaceError,i)}function B$r(e,t,i){V$q(e,t,Number.MAX_VALUE,e._maximumScreenSpaceError,i),w$s(e,t,i)}function z$v(e,t,i){V$q(e,t,Math.max(e.baseScreenSpaceError,e.maximumScreenSpaceError),e.maximumScreenSpaceError,i),w$s(e,t,i)}function C$y(e){return e._skipLevelOfDetail}function Z$t(e,t){e._emptyTiles.push(t)}function b$D(e,t,i){if(t.contentVisibility(i)!==Ae$w.OUTSIDE){var n=t.content;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,t.lastStyleTime=0,e._selectedTilesToStyle.push(t)):t._selectedFrame<i.frameNumber-1&&e._selectedTilesToStyle.push(t),t._selectedFrame=i.frameNumber,e._selectedTiles.push(t)}}function X$p(e,t,i){var n=S$t.stack;for(n.push(t);n.length>0;){S$t.stackMaximumLength=Math.max(S$t.stackMaximumLength,n.length);for(var r=n.pop().children,o=r.length,a=0;a<o;++a){var s=r[a];g$D(s)&&(s.contentAvailable?(P$u(e,s,i),F$x(e,s,i),b$D(e,s,i)):s._depth-t._depth<H$B&&n.push(s))}}}function D$v(e,t,i){if(C$y(e)){var n=t.contentAvailable?t:t._ancestorWithContentAvailable;e$2e(n)?n._shouldSelect=!0:X$p(e,t,i)}else t.contentAvailable&&b$D(e,t,i)}function j$x(e,t,i){++e._statistics.visited,t._visitedFrame=i.frameNumber}function F$x(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function G$y(e,t){e._maximumPriority.distance=Math.max(t._priorityHolder._distanceToCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t._priorityHolder._distanceToCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t._depth,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t._depth,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t._priorityHolder._foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t._priorityHolder._foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.reverseScreenSpaceError=Math.max(t._priorityReverseScreenSpaceError,e._maximumPriority.reverseScreenSpaceError),e._minimumPriority.reverseScreenSpaceError=Math.min(t._priorityReverseScreenSpaceError,e._minimumPriority.reverseScreenSpaceError)}function J$r(e,t,i){if(!e._cullRequestsWhileMoving)return!0;var n=t.boundingSphere,r=Math.max(2*n.radius,1),o=i.camera,a=0!==o.positionWCDeltaMagnitude?o.positionWCDeltaMagnitude:o.positionWCDeltaMagnitudeLastFrame;return e.cullRequestsWhileMovingMultiplier*a/r<1}function x$A(e,t,i){if(t._requestedFrame!==i.frameNumber&&(q$x(t)||t.contentExpired)&&J$r(e,t,i)){var n=i.camera.timeSinceMoved<e.foveatedTimeDelay;t.priorityDeferred&&n||(t._requestedFrame=i.frameNumber,e._requestedTiles.push(t))}}function N$q(e,t,i){t._updatedVisibilityFrame!==e._updatedVisibilityFrame&&(t.updateVisibility(i),t._updatedVisibilityFrame=e._updatedVisibilityFrame)}function K$s(e,t,i){for(var n=!1,r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];N$q(e,s,i),n=n||g$D(s)}return n}function Q$u(e,t,i){var n=t.parent;return!(!e$2e(n)||n.hasTilesetContent||n.refine!==f$E.ADD)&&t.getScreenSpaceError(i,!0)<=e._maximumScreenSpaceError}function O$o(e,t,i){if(N$q(e,t,i),g$D(t)){var n=t.children.length>0;if(t.hasTilesetContent&&n){var r=t.children[0];return O$o(e,r,i),void(t._visible=r._visible)}if(Q$u(e,t,i))return void(t._visible=!1);var o=t.refine===f$E.REPLACE,a=t._optimChildrenWithinParent===s$q.USE_OPTIMIZATION;if(o&&a&&n&&!K$s(e,t,i))return++e._statistics.numberOfTilesCulledWithChildrenUnion,void(t._visible=!1)}}function P$u(e,t,i){O$o(e,t,i),t.updateExpiration(),t._wasMinPriorityChild=!1,t._priorityHolder=t,G$y(e,t),t._shouldSelect=!1,t._finalResolution=!0}function Y$q(e,t){e._ancestorWithContent=void 0,e._ancestorWithContentAvailable=void 0;var i=e.parent;if(e$2e(i)){var n=!q$x(i)||i._requestedFrame===t.frameNumber;e._ancestorWithContent=n?i:i._ancestorWithContent,e._ancestorWithContentAvailable=i.contentAvailable?i:i._ancestorWithContentAvailable}}function L$z(e){return e.hasEmptyContent||e.hasTilesetContent}function q$x(e){return!L$z(e)&&e.contentUnloaded}function $$s(e,t){var i=t._ancestorWithContent;return!e.immediatelyLoadDesiredLevelOfDetail&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf||e$2e(i)&&t._screenSpaceError<i._screenSpaceError/e.skipScreenSpaceErrorFactor&&t._depth>i._depth+e.skipLevels)}function rr$4(e,t){return 0===t._distanceToCamera&&0===e._distanceToCamera?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera}function ar$2(e,t,i,n){var r,o=t.refine===f$E.REPLACE,a=t.children,s=a.length;for(r=0;r<s;++r)P$u(e,a[r],n);a.sort(rr$4);var l,u=!C$y(e)&&o&&!L$z(t),c=!0,h=!1,d=-1,f=Number.MAX_VALUE;for(r=0;r<s;++r)if(g$D(l=a[r])?(i.push(l),l._foveatedFactor<f&&(d=r,f=l._foveatedFactor),h=!0):(u||e.loadSiblings)&&(l._foveatedFactor<f&&(d=r,f=l._foveatedFactor),x$A(e,l,n),F$x(e,l,n)),u){var p;p=!!l._inRequestVolume&&(L$z(l)?nr$2(e,l,n):l.contentAvailable),c=c&&p}if(h||(c=!1),-1!==d&&!C$y(e)&&o){var _=a[d];_._wasMinPriorityChild=!0;var m=(t._wasMinPriorityChild||t===e.root)&&f<=t._priorityHolder._foveatedFactor?t._priorityHolder:t;for(m._foveatedFactor=Math.min(_._foveatedFactor,m._foveatedFactor),m._distanceToCamera=Math.min(_._distanceToCamera,m._distanceToCamera),r=0;r<s;++r)(l=a[r])._priorityHolder=m}return c}function er$3(e,t,i){return!C$y(e)||!e.immediatelyLoadDesiredLevelOfDetail&&(!e$2e(t._ancestorWithContent)||(0===t._screenSpaceError?t.parent._screenSpaceError>i:t._screenSpaceError>i))}function A$E(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:t._screenSpaceError>e._maximumScreenSpaceError)}function V$q(e,t,i,n,r){var o=k$q.stack;for(o.push(t);o.length>0;){k$q.stackMaximumLength=Math.max(k$q.stackMaximumLength,o.length);var a=o.pop();Y$q(a,r);var s=er$3(e,a,i),l=a.refine===f$E.ADD,u=a.refine===f$E.REPLACE,c=a.parent,h=!e$2e(c)||c._refines,d=!1;A$E(e,a)&&(d=ar$2(e,a,o,r)&&h);var f=!d&&h;L$z(a)?(Z$t(e,a),x$A(e,a,r),f&&D$v(e,a,r)):l?(D$v(e,a,r),x$A(e,a,r)):u&&(s?(x$A(e,a,r),f&&D$v(e,a,r)):f?(D$v(e,a,r),x$A(e,a,r)):$$s(e,a)&&x$A(e,a,r)),j$x(e,a,r),F$x(e,a,r),a._refines=d}}function nr$2(e,t,i){var n=!0,r=E$z.stack;for(r.push(t);r.length>0;){E$z.stackMaximumLength=Math.max(E$z.stackMaximumLength,r.length);var o=r.pop(),a=o.children,s=a.length,l=L$z(o)&&A$E(e,o);if(!l&&!o.contentAvailable&&(n=!1),P$u(e,o,i),g$D(o)||(x$A(e,o,i),F$x(e,o,i)),l)for(var u=0;u<s;++u){var c=a[u];r.push(c)}}return n}function w$s(e,t,i){var n,r=d$E.stack,o=d$E.ancestorStack;for(r.push(t);r.length>0||o.length>0;){if(d$E.stackMaximumLength=Math.max(d$E.stackMaximumLength,r.length),d$E.ancestorStackMaximumLength=Math.max(d$E.ancestorStackMaximumLength,o.length),o.length>0){var a=o.peek();if(a._stackLength===r.length){o.pop(),a!==n&&(a._finalResolution=!1),b$D(e,a,i);continue}}var s=r.pop();if(e$2e(s)){var l=s.refine===f$E.ADD,u=s._shouldSelect,c=s.children,h=c.length,d=A$E(e,s);if(u)if(l)b$D(e,s,i);else{if(s._selectionDepth=o.length,s._selectionDepth>0&&(e._hasMixedContent=!0),n=s,!d){b$D(e,s,i);continue}o.push(s),s._stackLength=r.length}if(d)for(var f=0;f<h;++f){var p=c[f];g$D(p)&&r.push(p)}}}}W$x.selectTiles=function(e,t){if(e._requestedTiles.length=0,!e.debugFreezeFrame){e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e._hasMixedContent=!1;var i=e.root;if(P$u(e,i,t),g$D(i)&&!(i.getScreenSpaceError(t,!0)<=e._maximumScreenSpaceError)){C$y(e)?e.immediatelyLoadDesiredLevelOfDetail?B$r(e,i,t):z$v(e,i,t):I$H(e,i,t),k$q.stack.trim(k$q.stackMaximumLength),E$z.stack.trim(E$z.stackMaximumLength),S$t.stack.trim(S$t.stackMaximumLength),d$E.stack.trim(d$E.stackMaximumLength),d$E.ancestorStack.trim(d$E.ancestorStackMaximumLength);for(var n=e._requestedTiles,r=n.length,o=0;o<r;++o)n[o].updatePriority()}}};var e$D={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},r$y=new Array(e$D.NUMBER_OF_PASSES);r$y[e$D.RENDER]=Object.freeze({traversal:W$x,isRender:!0,requestTiles:!0,ignoreCommands:!1}),r$y[e$D.PICK]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!1,ignoreCommands:!1}),r$y[e$D.SHADOW]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!1}),r$y[e$D.PRELOAD]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$D.PRELOAD_FLIGHT]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$D.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$D.MOST_DETAILED_PRELOAD]=Object.freeze({traversal:f$D,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$D.MOST_DETAILED_PICK]=Object.freeze({traversal:f$D,isRender:!1,requestTiles:!1,ignoreCommands:!1}),e$D.getPassOptions=function(e){return r$y[e]};var ue$e=Object.freeze(e$D);function t$r(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}function t$q(e,t){0===t&&(t=e$2d.EPSILON7),this._boundingSphere=new i$1d(e,t)}Object.defineProperties(t$r.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},batchTable:{get:function(){}}}),t$r.prototype.hasProperty=function(e,t){return!1},t$r.prototype.getFeature=function(e){},t$r.prototype.applyDebugSettings=function(e,t){},t$r.prototype.applyStyle=function(e){},t$r.prototype.update=function(e,t){},t$r.prototype.isDestroyed=function(){return!1},t$r.prototype.destroy=function(){return i$11(this)},Object.defineProperties(t$q.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}}),t$q.prototype.distanceToCamera=function(e){o$1q.defined("frameState",e);var t=this._boundingSphere;return Math.max(0,o$1p.distance(t.center,e.camera.positionWC)-t.radius)},t$q.prototype.intersectPlane=function(e){return o$1q.defined("plane",e),i$1d.intersectPlane(this._boundingSphere,e)},t$q.prototype.update=function(e,t){o$1p.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t},t$q.prototype.createDebugVolume=function(e){return o$1q.defined("color",e),new y$R({geometryInstances:new d$1o({geometry:new a$U({radius:this.radius}),id:"outline",modelMatrix:p$1d.fromTranslation(this.center,new p$1d.clone(p$1d.IDENTITY)),attributes:{color:o$16.fromColor(e)}}),appearance:new t$Q({translucent:!1,flat:!0}),asynchronous:!1})};var b$C=new o$1p,h$A=new o$1p,I$G=new o$1p,S$s=new o$1p;function u$w(e,t,i){i=o$1p.cross(e,t,i);var n=o$1p.magnitude(i);return o$1p.multiplyByScalar(i,e$2d.EPSILON7/n,i)}function g$C(e,t){var i=o$1p.normalize(e,S$s);return u$w(e,o$1p.equalsEpsilon(i,o$1p.UNIT_X,e$2d.EPSILON6)?o$1p.UNIT_Y:o$1p.UNIT_X,t)}function B$q(e){var t=p$1e.getColumn(e,0,b$C),i=p$1e.getColumn(e,1,h$A),n=p$1e.getColumn(e,2,I$G),r=o$1p.equals(t,o$1p.ZERO),o=o$1p.equals(i,o$1p.ZERO),a=o$1p.equals(n,o$1p.ZERO);return r||o||a?r&&o&&a?(e[0]=e$2d.EPSILON7,e[4]=e$2d.EPSILON7,e[8]=e$2d.EPSILON7,e):(!r||o||a?r||!o||a?r||o||!a?r?o?a||(i=u$w(n,t=g$C(n,t),i)):n=u$w(i,t=g$C(i,t),n):n=u$w(i=g$C(t,i),t,n):n=u$w(i,t,n):i=u$w(t,n,i):t=u$w(i,n,t),p$1e.setColumn(e,0,t,e),p$1e.setColumn(e,1,i,e),p$1e.setColumn(e,2,n,e),e):e}function c$t(e,t){t=B$q(t),this._orientedBoundingBox=new y$Y(e,t),this._boundingSphere=i$1d.fromOrientedBoundingBox(this._orientedBoundingBox)}function c$s(e,t,i,n){this._tileset=e,this._header=i;var r=i.content;this.transform=e$2e(i.transform)?p$1d.unpack(i.transform):p$1d.clone(p$1d.IDENTITY);var o,a,s,l,u,c,h,d,f=e$2e(n)?n.computedTransform:e.modelMatrix,p=p$1d.multiply(f,this.transform,new p$1d),_=e$2e(n)?n._initialTransform:p$1d.IDENTITY;if(this._initialTransform=p$1d.multiply(_,this.transform,new p$1d),this.computedTransform=p,this._boundingVolume=this.createBoundingVolume(i.boundingVolume,p),this._boundingVolume2D=void 0,e$2e(r)&&e$2e(r.boundingVolume)&&(o=this.createBoundingVolume(r.boundingVolume,p)),this._contentBoundingVolume=o,this._contentBoundingVolume2D=void 0,e$2e(i.viewerRequestVolume)&&(a=this.createBoundingVolume(i.viewerRequestVolume,p)),this._viewerRequestVolume=a,this.geometricError=i.geometricError,this._geometricError=i.geometricError,e$2e(this._geometricError)||(this._geometricError=e$2e(n)?n.geometricError:e._geometricError,c$s._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale(),e$2e(i.refine)?(("replace"===i.refine||"add"===i.refine)&&c$s._deprecationWarning("lowercase-refine",'This tile uses a lowercase refine "'+i.refine+'". Instead use "'+i.refine.toUpperCase()+'".'),s="REPLACE"===i.refine.toUpperCase()?f$E.REPLACE:f$E.ADD):s=e$2e(n)?n.refine:f$E.REPLACE,this.refine=s,this.children=[],this.parent=n,t=t$10.createIfNeeded(t),e$2e(r)){var m=r.uri;e$2e(r.url)&&(c$s._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),m=r.url),u=!1,c=X$q.UNLOADED,(h=e.isSuperMapiServer?-1!==m.indexOf(".json")?-1===t.url.indexOf("/data/path")?t.getDerivedResource({url:"./data/path/"+m}):t.getDerivedResource({url:m}):-1===t.url.indexOf("/data/path")&&-1!==m.indexOf(".b3dm")?t.getDerivedResource({url:"./data/path/"+m}):t.getDerivedResource({url:m}):t.getDerivedResource({url:m})).url=h.url.replace(/\+/g,"%2B"),d=r$1b.getServerKey(h.getUrlComponent())}else l=new t$r(e,this),u=!0,c=X$q.READY;this._content=l,this._contentResource=h,this._contentState=c,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this._expiredContent=void 0,this._serverKey=d,this.hasEmptyContent=u,this.hasTilesetContent=!1,this.cacheNode=void 0;var g,x,y=i.expire;e$2e(y)&&(g=y.duration,e$2e(y.date)&&(x=a$15.fromIso8601(y.date))),this.expireDuration=g,this.expireDate=x,this.lastStyleTime=0,this._optimChildrenWithinParent=s$q.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.priorityDeferred=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._clippingPlanesState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=e$1X.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,this._priorityHolder=this,this._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new a$15,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}Object.defineProperties(c$t.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}}),c$t.prototype.distanceToCamera=function(e){return o$1q.defined("frameState",e),Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))},c$t.prototype.intersectPlane=function(e){return o$1q.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)},c$t.prototype.update=function(e,t){o$1p.clone(e,this._orientedBoundingBox.center),t=B$q(t),p$1e.clone(t,this._orientedBoundingBox.halfAxes),i$1d.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)},c$t.prototype.createDebugVolume=function(e){return o$1q.defined("color",e),new y$R({geometryInstances:new d$1o({geometry:new o$17({minimum:new o$1p(-1,-1,-1),maximum:new o$1p(1,1,1)}),id:"outline",modelMatrix:p$1d.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),attributes:{color:o$16.fromColor(e)}}),appearance:new t$Q({translucent:!1,flat:!0}),asynchronous:!1})},c$s._deprecationWarning=t$11,Object.defineProperties(c$s.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return u$Z(this._contentBoundingVolume,this._boundingVolume)}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},extras:{get:function(){return this._header.extras}},color:{get:function(){return e$2e(this._color)||(this._color=new e$1X),e$1X.clone(this._color)},set:function(e){this._color=e$1X.clone(e,this._color),this._colorDirty=!0}},contentAvailable:{get:function(){return this.contentReady&&!this.hasEmptyContent&&!this.hasTilesetContent||e$2e(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===X$q.READY}},contentUnloaded:{get:function(){return this._contentState===X$q.UNLOADED}},contentExpired:{get:function(){return this._contentState===X$q.EXPIRED}},contentFailed:{get:function(){return this._contentState===X$q.FAILED}},contentReadyToProcessPromise:{get:function(){if(e$2e(this._contentReadyToProcessPromise))return this._contentReadyToProcessPromise.promise}},contentReadyPromise:{get:function(){if(e$2e(this._contentReadyPromise))return this._contentReadyPromise.promise}},commandsLength:{get:function(){return this._commandsLength}}});var P$t=new o$1p;function Ce$9(e,t){var i=e._tileset,n=t.camera,r=e.boundingSphere,o=r.radius,a=o$1p.multiplyByScalar(n.directionWC,e._centerZDepth,P$t),s=o$1p.add(n.positionWC,a,P$t),l=o$1p.subtract(s,r.center,P$t);if(o$1p.magnitude(l)>o){var u=o$1p.normalize(l,P$t),c=o$1p.multiplyByScalar(u,o,P$t),h=o$1p.add(r.center,c,P$t),d=o$1p.subtract(h,n.positionWC,P$t),f=o$1p.normalize(d,P$t);e._foveatedFactor=1-Math.abs(o$1p.dot(n.directionWC,f))}else e._foveatedFactor=0;var p=e.refine===f$E.REPLACE,_=i._skipLevelOfDetail;if(p&&!_||!i.foveatedScreenSpaceError||1===i.foveatedConeSize||e._priorityProgressiveResolution&&p&&_||i._pass===ue$e.PRELOAD_FLIGHT||i._pass===ue$e.PRELOAD)return!1;var m=1-Math.cos(.5*n.frustum.fov),g=i.foveatedConeSize*m;if(e._foveatedFactor<=g)return!1;var x=m-g,y=e$2d.clamp((e._foveatedFactor-g)/x,0,1),v=i.foveatedInterpolationCallback(i.foveatedMinimumScreenSpaceErrorRelaxation,i.maximumScreenSpaceError,y),$=0===e._screenSpaceError&&e$2e(e.parent)?.5*e.parent._screenSpaceError:e._screenSpaceError;return i.maximumScreenSpaceError-v<=$}var X$o=new a$15;function Ee$b(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;var i=t._screenSpaceErrorProgressiveResolution>e._maximumScreenSpaceError;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;var n=t.parent,r=e._maximumScreenSpaceError,o=t._screenSpaceErrorProgressiveResolution<=r,a=e$2e(n)&&n._screenSpaceErrorProgressiveResolution>r;return o&&a&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}function be$d(e,t){var i=t.parent,n=e$2e(i)&&(!e._skipLevelOfDetail||0===t._screenSpaceError||i.hasTilesetContent)?i._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-n}function De$d(e){if(e$2e(e.expireDuration)){var t=a$15.now(X$o);a$15.addSeconds(t,e.expireDuration,t),e$2e(e.expireDate)?a$15.lessThan(e.expireDate,t)&&a$15.clone(t,e.expireDate):e.expireDate=a$15.clone(t)}}function Re$b(e,t){return function(i){e._contentState===X$q.PROCESSING?--t.statistics.numberOfTilesProcessing:--t.statistics.numberOfPendingRequests,e._contentState=X$q.FAILED,e._contentReadyPromise.reject(i),e._contentReadyToProcessPromise.reject(i)}}function Pe$a(e){return function(){return e._priority}}c$s.prototype.getScreenSpaceError=function(e,t,i){var n=this._tileset,r=u$Z(i,1),o=e$2e(this.parent)?this.parent.geometricError:n._geometricError,a=t?o:this.geometricError;if(0===a)return 0;var s,l=e.camera,u=l.frustum,c=e.context,h=c.drawingBufferWidth,d=c.drawingBufferHeight*r;if(e.mode===C$14.SCENE2D||u instanceof a$V){e$2e(u._offCenterFrustum)&&(u=u._offCenterFrustum),s=a/(Math.max(u.top-u.bottom,u.right-u.left)/Math.max(h,d))}else{var f=Math.max(this._distanceToCamera,e$2d.EPSILON7);if(s=a*d/(f*l.frustum.sseDenominator),n.dynamicScreenSpaceError){var p=n._dynamicScreenSpaceErrorComputedDensity,_=n.dynamicScreenSpaceErrorFactor;s-=e$2d.fog(f,p)*_}}return s/=e.pixelRatio},c$s.prototype.updateVisibility=function(e){var t=this.parent,i=this._tileset,n=e$2e(t)?t.computedTransform:i.modelMatrix,r=e$2e(t)?t._visibilityPlaneMask:i$X.MASK_INDETERMINATE;this.updateTransform(n),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,i.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,r),this._visible=this._visibilityPlaneMask!==i$X.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=be$d(i,this),this._priorityProgressiveResolution=Ee$b(i,this),this.priorityDeferred=Ce$9(this,e)},c$s.prototype.updateExpiration=function(){if(e$2e(this.expireDate)&&this.contentReady&&!this.hasEmptyContent){var e=a$15.now(X$o);a$15.lessThan(this.expireDate,e)&&(this._contentState=X$q.EXPIRED,this._expiredContent=this._content)}},c$s.prototype.requestContent=function(){var e=this,t=this._tileset;if(this.hasEmptyContent)return!1;var i=this._contentResource.clone(),n=this.contentExpired;n&&i.setQueryParameters({expired:this.expireDate.toString()});var r=new r$1c({throttle:!0,throttleByServer:!0,type:U$1f.TILES3D,priorityFunction:Pe$a(this),serverKey:this._serverKey});this._request=r,i.request=r;var o=i.fetchArrayBuffer();if(!e$2e(o))return!1;var a=this._contentState;this._contentState=X$q.LOADING,this._contentReadyToProcessPromise=o$1l.defer(),this._contentReadyPromise=o$1l.defer();var s=Re$b(this,t);return o.then((function(i){if(!e.isDestroyed()){var r=a$F(new Uint8Array(i));"glTF"===r&&(r="glb");var o,a=i$y[r];return t._disableSkipLevelOfDetail=t._disableSkipLevelOfDetail||"vctr"===r||"geom"===r,e$2e(a)?o=a(t,e,e._contentResource,i,0):(o=i$y.json(t,e,e._contentResource,i,0),e.hasTilesetContent=!0),n&&(e.expireDate=void 0),e._content=o,e._contentState=X$q.PROCESSING,e._contentReadyToProcessPromise.resolve(o),o.readyPromise.then((function(t){e.isDestroyed()?s():(De$d(e),e._selectedFrame=0,e.lastStyleTime=0,a$15.now(e._loadTimestamp),e._contentState=X$q.READY,e._contentReadyPromise.resolve(t))}))}s()})).otherwise((function(i){if(r.state===W$1c.CANCELLED)return e._contentState=a,--t.statistics.numberOfPendingRequests,void++t.statistics.numberOfAttemptedRequests;s(i)})),!0},c$s.prototype.unloadContent=function(){this.hasEmptyContent||this.hasTilesetContent||(this._content=this._content&&this._content.destroy(),this._contentState=X$q.UNLOADED,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this.lastStyleTime=0,this.clippingPlanesDirty=0===this._clippingPlanesState,this._clippingPlanesState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var Q$t=new i$1d;function j$w(e,t){if(t.mode!==C$14.SCENE3D&&!e$2e(e._boundingVolume2D)){var i=e._boundingVolume.boundingSphere,n=i$1d.projectTo2D(i,t.mapProjection,Q$t);e._boundingVolume2D=new t$q(n.center,n.radius)}return t.mode!==C$14.SCENE3D?e._boundingVolume2D:e._boundingVolume}function Te$b(e,t){if(t.mode!==C$14.SCENE3D&&!e$2e(e._contentBoundingVolume2D)){var i=e._contentBoundingVolume.boundingSphere,n=i$1d.projectTo2D(i,t.mapProjection,Q$t);e._contentBoundingVolume2D=new t$q(n.center,n.radius)}return t.mode!==C$14.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}c$s.prototype.visibility=function(e,t){var i=e.cullingVolume,n=j$w(this,e),r=this._tileset,o=r.clippingPlanes;if(e$2e(o)&&o.enabled){var a=o.computeIntersectionWithBoundingVolume(n,r.clippingPlanesOriginMatrix);if(this._isClipped=a!==Ae$w.INSIDE,a===Ae$w.OUTSIDE)return i$X.MASK_OUTSIDE}return i.computeVisibilityWithPlaneMask(n,t)},c$s.prototype.contentVisibility=function(e){if(!e$2e(this._contentBoundingVolume))return Ae$w.INSIDE;if(this._visibilityPlaneMask===i$X.MASK_INSIDE)return Ae$w.INSIDE;var t=e.cullingVolume,i=Te$b(this,e),n=this._tileset,r=n.clippingPlanes;if(e$2e(r)&&r.enabled){var o=r.computeIntersectionWithBoundingVolume(i,n.clippingPlanesOriginMatrix);if(this._isClipped=o!==Ae$w.INSIDE,o===Ae$w.OUTSIDE)return Ae$w.OUTSIDE}return t.computeVisibility(i)},c$s.prototype.distanceToTile=function(e){return j$w(this,e).distanceToCamera(e)};var Be$c=new o$1p;c$s.prototype.distanceToTileCenter=function(e){var t=j$w(this,e).boundingVolume,i=o$1p.subtract(t.center,e.camera.positionWC,Be$c);return o$1p.dot(e.camera.directionWC,i)},c$s.prototype.insideViewerRequestVolume=function(e){var t=this._viewerRequestVolume;return!e$2e(t)||0===t.distanceToCamera(e)};var $$r=new p$1e,ee$m=new o$1p,we$9=new p$1e,te$i=new o$1p,re$m=new h$18,xe$c=new y$Y,K$r=new p$1d;function Le$d(e,t,i){var n=o$1p.fromElements(e[0],e[1],e[2],te$i),r=p$1e.fromArray(e,3,we$9);n=p$1d.multiplyByPoint(t,n,n);var o=p$1d.getMatrix3(t,$$r);return r=p$1e.multiply(o,r,r),e$2e(i)?(i.update(n,r),i):new c$t(n,r)}function Fe$c(e,t,i,n){var r=h$18.unpack(e,0,re$m),o=e[4],a=e[5],s=y$Y.fromRectangle(r,o,a,t$12.WGS84,xe$c),l=s.center,u=s.halfAxes;t=p$1d.multiplyTransformation(t,p$1d.inverseTransformation(i,K$r),K$r),l=p$1d.multiplyByPoint(t,l,l);var c=p$1d.getMatrix3(t,$$r);return u=p$1e.multiply(c,u,u),e$2e(n)&&n instanceof c$t?(n.update(l,u),n):new c$t(l,u)}function qe$5(e,t,i,n){return p$1d.equalsEpsilon(t,i,e$2d.EPSILON8)?e$2e(n)?n:new y$K({rectangle:h$18.unpack(e,0,re$m),minimumHeight:e[4],maximumHeight:e[5]}):Fe$c(e,t,i,n)}function Ie$a(e,t,i){var n=o$1p.fromElements(e[0],e[1],e[2],te$i),r=e[3];n=p$1d.multiplyByPoint(t,n,n);var o=p$1d.getScale(t,ee$m);return r*=o$1p.maximumComponent(o),e$2e(i)?(i.update(n,r),i):new t$q(n,r)}function Oe$d(e,t,i,n){if(n.isRender){var r=e$2e(e._header.content)&&e$2e(e._header.content.boundingVolume),o=e.hasEmptyContent||e.hasTilesetContent,a=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!r;if(a){var s;s=e._finalResolution?o?e$1X.DARKGRAY:e$1X.WHITE:e$1X.YELLOW,e$2e(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(s)),e._debugBoundingVolume.update(i);var l=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");l.color=o$16.toValue(s,l.color)}else!a&&e$2e(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&r?(e$2e(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(e$1X.BLUE)),e._debugContentBoundingVolume.update(i)):!t.debugShowContentBoundingVolume&&e$2e(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&e$2e(e._viewerRequestVolume)?(e$2e(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(e$1X.YELLOW)),e._debugViewerRequestVolume.update(i)):!t.debugShowViewerRequestVolume&&e$2e(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());var u=t.debugColorizeTiles&&!e._debugColorizeTiles||e$2e(t._heatmap.tilePropertyName),c=!t.debugColorizeTiles&&e._debugColorizeTiles;u?(t._heatmap.colorize(e,i),e._debugColorizeTiles=!0,e.color=e._debugColor):c&&(e._debugColorizeTiles=!1,e.color=e$1X.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),c&&t.makeStyleDirty()}}function Ae$d(e,t,i){var n=e._content,r=e._expiredContent;if(e$2e(r)){if(!e.contentReady)return void r.update(t,i);e._expiredContent.destroy(),e._expiredContent=void 0}n.update(t,i)}function Me$e(e,t){var i=t.clippingPlanes,n=0;e$2e(i)&&e._isClipped&&i.enabled&&(n=i.clippingPlanesState),n!==e._clippingPlanesState&&(e._clippingPlanesState=n,e.clippingPlanesDirty=!0)}c$s.prototype.createBoundingVolume=function(e,t,i){if(!e$2e(e))throw new t$13("boundingVolume must be defined");if(e$2e(e.box))return Le$d(e.box,t,i);if(e$2e(e.region))return qe$5(e.region,t,this._initialTransform,i);if(e$2e(e.sphere))return Ie$a(e.sphere,t,i);throw new t$13("boundingVolume must contain a sphere, region, or box")},c$s.prototype.updateTransform=function(e){e=u$Z(e,p$1d.IDENTITY);var t=p$1d.multiply(e,this.transform,K$r);if(!p$1d.equals(t,this.computedTransform)){p$1d.clone(t,this.computedTransform);var i=this._header,n=this._header.content;this._boundingVolume=this.createBoundingVolume(i.boundingVolume,this.computedTransform,this._boundingVolume),e$2e(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(n.boundingVolume,this.computedTransform,this._contentBoundingVolume)),e$2e(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(i.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy()}},c$s.prototype.updateGeometricErrorScale=function(){var e=p$1d.getScale(this.computedTransform,ee$m),t=o$1p.maximumComponent(e);this.geometricError=this._geometricError*t},c$s.prototype.update=function(e,t,i){var n=t.commandList.length;Me$e(this,e),Oe$d(this,e,t,i),Ae$d(this,e,t),this._commandsLength=t.commandList.length-n,this.clippingPlanesDirty=!1};var ie$e=[];function ne$h(e,t,i){var n=e*Math.pow(10,t);return parseInt(n)*Math.pow(10,i)}function q$w(e,t,i){return Math.max(e$2d.normalize(e,t,i)-e$2d.EPSILON7,0)}c$s.prototype.process=function(e,t){var i=t.commandList;t.commandList=ie$e,this._content.update(e,t),ie$e.length=0,t.commandList=i},c$s.prototype.updatePriority=function(){var e=this.tileset,t=e.preferLeaves,i=e._minimumPriority,n=e._maximumPriority,r=Math.pow(10,8),o=Math.pow(10,9),a=Math.pow(10,10),s=q$w(this._depth,i.depth,n.depth);s=t?1-s:s;var l=ne$h(!e._skipLevelOfDetail&&this.refine===f$E.REPLACE?q$w(this._priorityHolder._distanceToCamera,i.distance,n.distance):q$w(this._priorityReverseScreenSpaceError,i.reverseScreenSpaceError,n.reverseScreenSpaceError),4,0),u=this._priorityProgressiveResolution?0:r,c=ne$h(q$w(this._priorityHolder._foveatedFactor,i.foveatedFactor,n.foveatedFactor),4,4),h=this.priorityDeferred?o:0,d=e._pass===ue$e.PRELOAD_FLIGHT?0:a;this._priority=s+l+u+c+h+d},c$s.prototype.isDestroyed=function(){return!1},c$s.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),i$11(this)};var I$F={},y$u=new o$1p;function e$C(){this._list=new h$Q,this._sentinel=this._list.add(),this._trimTiles=!1}function a$s(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function f$C(e,t){return"_loadTimestamp"===t?a$15.toDate(e).getTime():e}function L$y(e,t){var i=e.tilePropertyName;if(e$2e(i)){var n=f$C(t[i],i);return e$2e(n)?(e._maximum=Math.max(n,e._maximum),e._minimum=Math.min(n,e._minimum),n):(e.tilePropertyName=void 0,n)}}I$F.checkChildrenWithinParent=function(e){o$1q.typeOf.object("tile",e);var t=e.children,i=t.length,n=e.boundingVolume;if(n instanceof c$t||n instanceof y$K){var r=n._orientedBoundingBox;e._optimChildrenWithinParent=s$q.USE_OPTIMIZATION;for(var o=0;o<i;++o){var a=t[o].boundingVolume;if(!(a instanceof c$t||a instanceof y$K)){e._optimChildrenWithinParent=s$q.SKIP_OPTIMIZATION;break}var s=a._orientedBoundingBox,l=o$1p.subtract(s.center,r.center,y$u),u=o$1p.magnitude(l);if(o$1p.divideByScalar(l,u,l),Math.abs(r.halfAxes[0]*l.x)+Math.abs(r.halfAxes[1]*l.y)+Math.abs(r.halfAxes[2]*l.z)+Math.abs(r.halfAxes[3]*l.x)+Math.abs(r.halfAxes[4]*l.y)+Math.abs(r.halfAxes[5]*l.z)+Math.abs(r.halfAxes[6]*l.x)+Math.abs(r.halfAxes[7]*l.y)+Math.abs(r.halfAxes[8]*l.z)<=Math.abs(s.halfAxes[0]*l.x)+Math.abs(s.halfAxes[1]*l.y)+Math.abs(s.halfAxes[2]*l.z)+Math.abs(s.halfAxes[3]*l.x)+Math.abs(s.halfAxes[4]*l.y)+Math.abs(s.halfAxes[5]*l.z)+Math.abs(s.halfAxes[6]*l.x)+Math.abs(s.halfAxes[7]*l.y)+Math.abs(s.halfAxes[8]*l.z)+u){e._optimChildrenWithinParent=s$q.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===s$q.USE_OPTIMIZATION},e$C.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)},e$C.prototype.touch=function(e){var t=e.cacheNode;e$2e(t)&&this._list.splice(this._sentinel,t)},e$C.prototype.add=function(e){e$2e(e.cacheNode)||(e.cacheNode=this._list.add(e))},e$C.prototype.unloadTile=function(e,t,i){var n=t.cacheNode;!e$2e(n)||(this._list.remove(n),t.cacheNode=void 0,i(e,t))},e$C.prototype.unloadTiles=function(e,t){var i=this._trimTiles;this._trimTiles=!1;for(var n=this._list,r=1024*e.maximumMemoryUsage*1024,o=this._sentinel,a=n.head;a!==o&&(e.totalMemoryUsageInBytes>r||i);){var s=a.item;a=a.next,this.unloadTile(e,s,t)}},e$C.prototype.trim=function(){this._trimTiles=!0},a$s.prototype.setReferenceMinimumMaximum=function(e,t,i){this._referenceMinimum[i]=f$C(e,i),this._referenceMaximum[i]=f$C(t,i)};var p$v=[new e$1X(.1,.1,.1,1),new e$1X(.153,.278,.878,1),new e$1X(.827,.231,.49,1),new e$1X(.827,.188,.22,1),new e$1X(1,.592,.259,1),new e$1X(1,.843,0,1)];function r$x(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.batchTableByteLength=0}function f$B(e,t,i,n){var r=t.innerContents,o=t.pointsLength,a=t.trianglesLength,s=t.featuresLength,l=t.geometryByteLength,u=t.texturesByteLength,c=t.batchTableByteLength;if(n?(e.numberOfFeaturesLoaded+=i?-s:s,e.numberOfPointsLoaded+=i?-o:o,e.geometryByteLength+=i?-l:l,e.texturesByteLength+=i?-u:u,e.batchTableByteLength+=i?-c:c):(e.numberOfFeaturesSelected+=i?-s:s,e.numberOfPointsSelected+=i?-o:o,e.numberOfTrianglesSelected+=i?-a:a),e$2e(r))for(var h=r.length,d=0;d<h;++d)f$B(e,r[d],i,n)}function p$u(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.url",e.url),this._url=void 0,this._basePath=void 0,this._root=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._extensionsUsed=void 0,this._gltfUpAxis=void 0,this._cache=new e$C,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._cullWithChildrenBounds=u$Z(e.cullWithChildrenBounds,!0),this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new r$S,this._maximumScreenSpaceError=u$Z(e.maximumScreenSpaceError,16),this._maximumMemoryUsage=u$Z(e.maximumMemoryUsage,512),this._styleEngine=new e$1u,this._modelMatrix=e$2e(e.modelMatrix)?p$1d.clone(e.modelMatrix):p$1d.clone(p$1d.IDENTITY),this._statistics=new r$x,this._statisticsLast=new r$x,this._statisticsPerPass=new Array(ue$e.NUMBER_OF_PASSES);for(var t=0;t<ue$e.NUMBER_OF_PASSES;++t)this._statisticsPerPass[t]=new r$x;this._requestedTilesInFlight=[],this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,reverseScreenSpaceError:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,reverseScreenSpaceError:Number.MAX_VALUE},this._heatmap=new a$s(e.debugHeatmapTilePropertyName),this.cullRequestsWhileMoving=u$Z(e.cullRequestsWhileMoving,!0),this._cullRequestsWhileMoving=!1,this._visibleViewport=4095,this.cullRequestsWhileMovingMultiplier=u$Z(e.cullRequestsWhileMovingMultiplier,60),this.progressiveResolutionHeightFraction=e$2d.clamp(u$Z(e.progressiveResolutionHeightFraction,.3),0,.5),this.preferLeaves=u$Z(e.preferLeaves,!1),this._tilesLoaded=!1,this._initialTilesLoaded=!1,this._tileDebugLabels=void 0,this._readyPromise=o$1l.defer(),this._classificationType=e.classificationType,this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._initialClippingPlanesOriginMatrix=p$1d.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this.preloadWhenHidden=u$Z(e.preloadWhenHidden,!1),this.preloadFlightDestinations=u$Z(e.preloadFlightDestinations,!0),this._pass=void 0,this.dynamicScreenSpaceError=u$Z(e.dynamicScreenSpaceError,!1),this.foveatedScreenSpaceError=u$Z(e.foveatedScreenSpaceError,!0),this._foveatedConeSize=u$Z(e.foveatedConeSize,.1),this._foveatedMinimumScreenSpaceErrorRelaxation=u$Z(e.foveatedMinimumScreenSpaceErrorRelaxation,0),this.foveatedInterpolationCallback=u$Z(e.foveatedInterpolationCallback,e$2d.lerp),this.foveatedTimeDelay=u$Z(e.foveatedTimeDelay,.2),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorFactor=4,this.dynamicScreenSpaceErrorHeightFalloff=.25,this._dynamicScreenSpaceErrorComputedDensity=0,this.shadows=u$Z(e.shadows,W$X.ENABLED),this.show=u$Z(e.show,!0),this.colorBlendMode=L$I.HIGHLIGHT,this.colorBlendAmount=.5,this.pointCloudShading=new o$Z(e.pointCloudShading),this._pointCloudEyeDomeLighting=new m$W,this.loadProgress=new o$1h,this.allTilesLoaded=new o$1h,this.initialTilesLoaded=new o$1h,this.tileLoad=new o$1h,this.tileUnload=new o$1h,this.tileFailed=new o$1h,this.tileVisible=new o$1h,this.skipLevelOfDetail=u$Z(e.skipLevelOfDetail,!1),this._skipLevelOfDetail=this.skipLevelOfDetail,this._disableSkipLevelOfDetail=!1,this.baseScreenSpaceError=u$Z(e.baseScreenSpaceError,1024),this.skipScreenSpaceErrorFactor=u$Z(e.skipScreenSpaceErrorFactor,16),this.skipLevels=u$Z(e.skipLevels,1),this.immediatelyLoadDesiredLevelOfDetail=u$Z(e.immediatelyLoadDesiredLevelOfDetail,!1),this.loadSiblings=u$Z(e.loadSiblings,!1),this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._imageBasedLightingFactor=new o$1o(1,1),o$1o.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=u$Z(e.luminanceAtZenith,.2),this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps,this.debugFreezeFrame=u$Z(e.debugFreezeFrame,!1),this.debugColorizeTiles=u$Z(e.debugColorizeTiles,!1),this.debugWireframe=u$Z(e.debugWireframe,!1),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.debugShowContentBoundingVolume=u$Z(e.debugShowContentBoundingVolume,!1),this.debugShowViewerRequestVolume=u$Z(e.debugShowViewerRequestVolume,!1),this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=u$Z(e.debugShowGeometricError,!1),this.debugShowRenderingStatistics=u$Z(e.debugShowRenderingStatistics,!1),this.debugShowMemoryUsage=u$Z(e.debugShowMemoryUsage,!1),this.debugShowUrl=u$Z(e.debugShowUrl,!1),this.isSuperMapiServer=u$Z(e.isSuperMapiServer,!1),this._swipeRegion=new e$2c(0,0,1,1),this._swipeEnabled=!1;var i,n=this;o$1l(e.url).then((function(e){var t;return i=t$10.createIfNeeded(e),n._credits=i.credits,"json"===i.extension?t=i.getBaseUri(!0):i.isDataUri&&(t=""),n._url=i.url,n._basePath=t,p$u.loadJson(i)})).then((function(e){n._root=n.loadTileset(i,e);var t=e$2e(e.asset.gltfUpAxis)?v$y.fromName(e.asset.gltfUpAxis):v$y.Y,r=e.asset;n._asset=r,n._properties=e.properties,n._geometricError=e.geometricError,n._extensionsUsed=e.extensionsUsed,n._gltfUpAxis=t,n._extras=e.extras;var o=r.extras;if(e$2e(o)&&e$2e(o.supermap3d)&&e$2e(o.supermap3d.credits)){var a=o.supermap3d.credits,s=n._credits;e$2e(s)||(s=[],n._credits=s);for(var l=0;l<a.length;++l){var u=a[l];s.push(new r$U(u.html,u.showOnScreen))}}var c=n._root.createBoundingVolume(e.root.boundingVolume,p$1d.IDENTITY).boundingSphere.center,h=n._ellipsoid.cartesianToCartographic(c);e$2e(h)&&h.height>e$1H._defaultMinTerrainHeight&&(n._initialClippingPlanesOriginMatrix=m$19.eastNorthUpToFixedFrame(c)),n._clippingPlanesOriginMatrix=p$1d.clone(n._initialClippingPlanesOriginMatrix),n._readyPromise.resolve(n)})).otherwise((function(e){n._readyPromise.reject(e)}))}a$s.prototype.colorize=function(e,t){if(e$2e(this.tilePropertyName)&&e.contentAvailable&&e._selectedFrame===t.frameNumber){var i=L$y(this,e),n=this._previousMinimum,r=this._previousMaximum;if(n!==Number.MAX_VALUE&&r!==-Number.MAX_VALUE){var o=r-n+e$2d.EPSILON7,a=e$2d.clamp(i-n,0,o)/o*(p$v.length-1),s=Math.floor(a),l=Math.ceil(a),u=a-s,c=p$v[s],h=p$v[l],d=e$1X.clone(e$1X.WHITE);d.red=e$2d.lerp(c.red,h.red,u),d.green=e$2d.lerp(c.green,h.green,u),d.blue=e$2d.lerp(c.blue,h.blue,u),e._debugColor=d}}},a$s.prototype.resetMinimumMaximum=function(){var e=this.tilePropertyName;if(e$2e(e)){var t=this._referenceMinimum[e],i=this._referenceMaximum[e],n=e$2e(t)&&e$2e(i);this._previousMinimum=n?t:this._minimum,this._previousMaximum=n?i:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}},r$x.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0},r$x.prototype.incrementSelectionCounts=function(e){f$B(this,e,!1,!1)},r$x.prototype.incrementLoadCounts=function(e){f$B(this,e,!1,!0)},r$x.prototype.decrementLoadCounts=function(e){f$B(this,e,!0,!0)},r$x.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.selected=e.selected,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.batchTableByteLength=e.batchTableByteLength},Object.defineProperties(p$u.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){if(!this.ready)throw new t$15("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._asset}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){h$L.setOwner(e,this,"_clippingPlanes")}},properties:{get:function(){if(!this.ready)throw new t$15("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._properties}},ready:{get:function(){return e$2e(this._root)}},readyPromise:{get:function(){return this._readyPromise.promise}},tilesLoaded:{get:function(){return this._tilesLoaded}},url:{get:function(){return this._url}},basePath:{get:function(){return t$11("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("maximumScreenSpaceError",e,0),this._maximumScreenSpaceError=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMemoryUsage=e}},root:{get:function(){if(!this.ready)throw new t$15("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._root}},boundingSphere:{get:function(){if(!this.ready)throw new t$15("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=p$1d.clone(e,this._modelMatrix)}},swipeRegion:{get:function(){return new f$1a(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2e(e)){if(!(e instanceof f$1a))throw new t$15("swipeRegion must be a instance of BoundingRectangle.");e$2c.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){if(e!==this._swipeEnabled){e||e$2c.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e;var t=[];for(t.push(this.root);t.length>0;)for(var i=t.pop().children,n=i.length,r=0;r<n;++r)if(t.push(i[r]),e$2e(i[r]._content)){var o=i[r]._content._model;!e$2e(o)||(o._shouldRegenerateShaders=!0)}}}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){var e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return e$2e(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(p$1d.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):p$1d.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("foveatedConeSize",e,0),o$1q.typeOf.number.lessThanOrEquals("foveatedConeSize",e,1),this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,0),o$1q.typeOf.number.lessThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,this.maximumScreenSpaceError),this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){if(!this.ready)throw new t$15("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._extras}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o$1q.typeOf.object("imageBasedLightingFactor",e),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),o$1o.clone(e,this._imageBasedLightingFactor)}}}),p$u.loadJson=function(e){return t$10.createIfNeeded(e).fetchJson()},p$u.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},p$u.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},p$u.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()},p$u.prototype.loadTileset=function(e,t,i){var n=t.asset;if(!e$2e(n))throw new t$13("Tileset must have an asset property.");if("0.0"!==n.version&&"1.0"!==n.version)throw new t$13("The tileset must be 3D Tiles version 0.0 or 1.0.");var r=this._statistics,o=n.tilesetVersion;e$2e(o)&&(this._basePath+="?v="+o,e.setQueryParameters({v:o}));var a=new c$s(this,e,t.root,i);e$2e(i)&&(i.children.push(a),a._depth=i._depth+1);var s=[];for(s.push(a);s.length>0;){var l=s.pop();++r.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&l.refine===f$E.ADD;var u=l._header.children;if(e$2e(u))for(var c=u.length,h=0;h<c;++h){var d=new c$s(this,e,u[h],l);l.children.push(d),d._depth=l._depth+1,s.push(d)}this._cullWithChildrenBounds&&I$F.checkChildrenWithinParent(l)}return a};var j$v=new o$1p,Me$d=new a$18,Pe$9=new p$1d,Le$c=new o$1p,xe$b=new o$1p,De$c=new o$1p;function Oe$c(e,t){var i,n,r,o,a,s=t.camera,l=e._root,u=l.contentBoundingVolume;if(u instanceof y$K)i=o$1p.normalize(s.positionWC,j$v),n=s.directionWC,r=s.positionCartographic.height,o=u.minimumHeight,a=u.maximumHeight;else{var c=p$1d.inverseTransformation(l.computedTransform,Pe$9),h=t.mapProjection.ellipsoid,d=u.boundingVolume,f=p$1d.multiplyByPoint(c,d.center,Le$c);if(o$1p.magnitude(f)>h.minimumRadius){var p=a$18.fromCartesian(f,h,Me$d);i=o$1p.normalize(s.positionWC,j$v),n=s.directionWC,r=s.positionCartographic.height,o=0,a=2*p.height}else{var _=p$1d.multiplyByPoint(c,s.positionWC,xe$b);if(i=o$1p.UNIT_Z,n=p$1d.multiplyByPointAsVector(c,s.directionWC,De$c),n=o$1p.normalize(n,n),r=_.z,u instanceof c$t){var m=l._header.boundingVolume.box[11];o=f.z-m,a=f.z+m}else if(u instanceof t$q){var g=d.radius;o=f.z-g,a=f.z+g}}}var x=o+(a-o)*e.dynamicScreenSpaceErrorHeightFalloff,y=a,v=e$2d.clamp((r-x)/(y-x),0,1),$=1-Math.abs(o$1p.dot(n,i));$*=1-v;var b=e.dynamicScreenSpaceErrorDensity;b*=$,e._dynamicScreenSpaceErrorComputedDensity=b}function Re$a(e,t){if(!t.hasEmptyContent){var i=e._statistics,n=t.contentExpired;if(!t.requestContent())return void++i.numberOfAttemptedRequests;n&&(t.hasTilesetContent?He$9(e,t):(i.decrementLoadCounts(t.content),--i.numberOfTilesWithContentReady)),++i.numberOfPendingRequests,e._requestedTilesInFlight.push(t),t.contentReadyToProcessPromise.then(Ue$a(e,t)),t.contentReadyPromise.then(qe$4(e,t)).otherwise(Be$b(e,t))}}function Ae$c(e,t){return e._priority-t._priority}function Ve$a(e,t){for(var i=e._requestedTilesInFlight,n=0,r=i.length,o=0;o<r;++o){var a=i[o],s=t.frameNumber-a._touchedFrame>=1;a._contentState===X$q.LOADING?s?(a._request.cancel(),++n):n>0&&(i[o-n]=a):++n}i.length-=n}function Fe$b(e,t){var i=e._requestedTiles,n=i.length;i.sort(Ae$c);for(var r=0;r<n;++r)Re$a(e,i[r])}function Ue$a(e,t){return function(){e._processingQueue.push(t),--e._statistics.numberOfPendingRequests,++e._statistics.numberOfTilesProcessing}}function Be$b(e,t){return function(i){var n=t._contentResource.url,r=e$2e(i.message)?i.message:i.toString();e.tileFailed.numberOfListeners>0?e.tileFailed.raiseEvent({url:n,message:r}):(console.log("A 3D tile failed to load: "+n),console.log("Error: "+r))}}function qe$4(e,t){return function(){--e._statistics.numberOfTilesProcessing,t.hasTilesetContent||(e._statistics.incrementLoadCounts(t.content),++e._statistics.numberOfTilesWithContentReady,++e._statistics.numberOfLoadedTilesTotal,e._cache.add(t)),e.tileLoad.raiseEvent(t)}}function Ne$8(e){for(var t=e._processingQueue,i=t.length,n=0,r=0;r<i;++r){var o=t[r];o._contentState===X$q.PROCESSING?n>0&&(t[r-n]=o):++n}t.length-=n}function Ie$9(e,t){Ne$8(e);for(var i=e._processingQueue,n=i.length,r=0;r<n;++r)i[r].process(e,t)}p$u.prototype.postPassesUpdate=function(e){!this.ready||(Ve$a(this,e),Ge$7(this,e),this._cache.unloadTiles(this,K$q))},p$u.prototype.prePassesUpdate=function(e){if(this.ready){Ie$9(this,e);var t=this._clippingPlanes;this._clippingPlanesOriginMatrixDirty=!0,e$2e(t)&&t.enabled&&t.update(e),e$2e(this._loadTimestamp)||(this._loadTimestamp=a$15.clone(e.time)),this._timeSinceLoad=Math.max(1e3*a$15.secondsDifference(e.time,this._loadTimestamp),0),this._skipLevelOfDetail=this.skipLevelOfDetail&&!e$2e(this._classificationType)&&!this._disableSkipLevelOfDetail&&!this._allTilesAdditive,this.dynamicScreenSpaceError&&Oe$c(this,e),e.newFrame&&this._cache.reset()}};var D$u=new o$1p,ke$9={maximumFractionDigits:3};function Q$s(e){var t=e/1048576;return t<1?t.toLocaleString(void 0,ke$9):Math.round(t).toLocaleString()}function V$p(e){var t=e.boundingVolume.boundingVolume,i=t.halfAxes,n=t.radius,r=o$1p.clone(t.center,D$u);if(e$2e(i))r.x+=.75*(i[0]+i[3]+i[6]),r.y+=.75*(i[1]+i[4]+i[7]),r.z+=.75*(i[2]+i[5]+i[8]);else if(e$2e(n)){var o=o$1p.normalize(t.center,D$u);o=o$1p.multiplyByScalar(o,.75*n,D$u),r=o$1p.add(o,t.center,D$u)}return r}function F$w(e,t,i){var n="",r=0;(t.debugShowGeometricError&&(n+="\nGeometric error: "+e.geometricError,r++),t.debugShowRenderingStatistics)&&(n+="\nCommands: "+e.commandsLength,r++,e.content.pointsLength>0&&(n+="\nPoints: "+e.content.pointsLength,r++),e.content.trianglesLength>0&&(n+="\nTriangles: "+e.content.trianglesLength,r++),n+="\nFeatures: "+e.content.featuresLength,r++);t.debugShowMemoryUsage&&(n+="\nTexture Memory: "+Q$s(e.content.texturesByteLength),n+="\nGeometry Memory: "+Q$s(e.content.geometryByteLength),r+=2),t.debugShowUrl&&(n+="\nUrl: "+e._header.content.uri,r++);var o={text:n.substring(1),position:i,font:19-r+"px sans-serif",showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(o)}function We$8(e,t){var i,n,r=e._selectedTiles,o=r.length,a=e._emptyTiles,s=a.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(e$2e(e.debugPickedTile)){var l=e$2e(e.debugPickPosition)?e.debugPickPosition:V$p(e.debugPickedTile);F$w(e.debugPickedTile,e,l).pixelOffset=new o$1o(15,-15)}}else{for(i=0;i<o;++i)F$w(n=r[i],e,V$p(n));for(i=0;i<s;++i)(n=a[i]).hasTilesetContent&&F$w(n,e,V$p(n))}e._tileDebugLabels.update(t)}function ze$a(e,t,i){e._styleEngine.applyStyle(e,i);var n,r,o=i.isRender,a=e._statistics,s=t.commandList,l=s.length,u=e._selectedTiles,c=u.length,h=e._emptyTiles,d=h.length,f=e.tileVisible,p=e._skipLevelOfDetail&&e._hasMixedContent&&t.context.stencilBuffer&&c>0;e._backfaceCommands.length=0,p&&(e$2e(e._stencilClearCommand)||(e._stencilClearCommand=new t$W({stencil:0,pass:Le$q.CESIUM_3D_TILE,renderState:d$1m.fromCache({stencilMask:u$M.SKIP_LOD_MASK})})),s.push(e._stencilClearCommand));var _=s.length;for(n=0;n<c;++n)r=u[n],o&&f.raiseEvent(r),r.update(e,t,i),a.incrementSelectionCounts(r.content),++a.selected;for(n=0;n<d;++n)(r=h[n]).update(e,t,i);var m=s.length-_;if(e._backfaceCommands.trim(),p){var g=e._backfaceCommands.values,x=g.length;for(s.length+=x,n=m-1;n>=0;--n)s[_+x+n]=s[_+n];for(n=0;n<x;++n)s[_+n]=g[n]}m=s.length-l,a.numberOfCommands=m,o&&e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&m>0&&e._pointCloudEyeDomeLighting.update(t,l,e.pointCloudShading),o&&(e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(e$2e(e._tileDebugLabels)||(e._tileDebugLabels=new g$W),We$8(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var Y$p=[];function He$9(e,t){var i=t,n=Y$p;for(n.push(t);n.length>0;){for(var r=(t=n.pop()).children,o=r.length,a=0;a<o;++a)n.push(r[a]);t!==i&&(Xe$7(e,t),--e._statistics.numberOfTilesTotal)}i.children=[]}function K$q(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function Xe$7(e,t){e._cache.unloadTile(e,t,K$q),t.destroy()}function Ge$7(e,t){var i=e._statistics,n=e._statisticsLast,r=i.numberOfPendingRequests,o=i.numberOfTilesProcessing,a=n.numberOfPendingRequests,s=n.numberOfTilesProcessing;r$x.clone(i,n);var l=r!==a||o!==s;l&&t.afterRender.push((function(){e.loadProgress.raiseEvent(r,o)})),e._tilesLoaded=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests,l&&e._tilesLoaded&&(t.afterRender.push((function(){e.allTilesLoaded.raiseEvent()})),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push((function(){e.initialTilesLoaded.raiseEvent()}))))}function je$9(e){e._heatmap.resetMinimumMaximum(),e._minimumPriority.depth=Number.MAX_VALUE,e._maximumPriority.depth=-Number.MAX_VALUE,e._minimumPriority.foveatedFactor=Number.MAX_VALUE,e._maximumPriority.foveatedFactor=-Number.MAX_VALUE,e._minimumPriority.distance=Number.MAX_VALUE,e._maximumPriority.distance=-Number.MAX_VALUE,e._minimumPriority.reverseScreenSpaceError=Number.MAX_VALUE,e._maximumPriority.reverseScreenSpaceError=-Number.MAX_VALUE}function Qe$5(e,t){(t.frameNumber!==e._updatedModelMatrixFrame||!e$2e(e._previousModelMatrix))&&(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!p$1d.equals(e.modelMatrix,e._previousModelMatrix),e._previousModelMatrix=p$1d.clone(e.modelMatrix,e._previousModelMatrix))}function Ye$7(e,t,i,n){if(t.mode===C$14.MORPHING||!e.ready)return!1;var r=e._statistics;r.clear();var o=n.isRender;++e._updatedVisibilityFrame,je$9(e),Qe$5(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;var a=n.traversal.selectTiles(e,t),s=t.context;if(n.requestTiles&&s.memorySize<s.memoryThresholdValue&&Fe$b(e),ze$a(e,t,n),r$x.clone(r,i),o){var l=e._credits;if(e$2e(l)&&0!==r.selected)for(var u=l.length,c=0;c<u;++c)t.creditDisplay.addCredit(l[c])}return a}p$u.prototype.trimLoadedTiles=function(){this._cache.trim()},p$u.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;this.frameState=e,this.updateForPass(e,e.tilesetPassState)},p$u.prototype.updateForPass=function(e,t){o$1q.typeOf.object("frameState",e),o$1q.typeOf.object("tilesetPassState",t);var i=t.pass;if((i!==ue$e.PRELOAD||this.preloadWhenHidden&&!this.show)&&(i!==ue$e.PRELOAD_FLIGHT||this.preloadFlightDestinations&&(this.show||this.preloadWhenHidden))&&(i!==ue$e.REQUEST_RENDER_MODE_DEFER_CHECK||!(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))){var n=e.commandList,r=e.camera,o=e.cullingVolume;t.ready=!1;var a=ue$e.getPassOptions(i),s=a.ignoreCommands,l=u$Z(t.commandList,n),u=l.length;e.commandList=l,e.camera=u$Z(t.camera,r),e.cullingVolume=u$Z(t.cullingVolume,o);var c=this._statisticsPerPass[i];(this.show||s)&&(this._pass=i,t.ready=Ye$7(this,e,c,a)),s&&(l.length=u),e.commandList=n,e.camera=r,e.cullingVolume=o}},p$u.prototype.hasExtension=function(e){return!!e$2e(this._extensionsUsed)&&this._extensionsUsed.indexOf(e)>-1},p$u.prototype.isDestroyed=function(){return!1},p$u.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),e$2e(this._root)){var e=Y$p;for(e.push(this._root);e.length>0;){var t=e.pop();t.destroy();for(var i=t.children,n=i.length,r=0;r<n;++r)e.push(i[r])}}return this._root=void 0,i$11(this)};var P$s=new p$1d;function l$E(e,t){if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(t))throw new t$15("entityCollection is required.");t.collectionChanged.addEventListener(l$E.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new e$1Q,this._onCollectionChanged(t,t.values,[],[])}function _$r(e,t,i,n){var r=i[t.id];e$2e(r)&&(n.removeAndDestroy(r.tilesetPrimitive),delete i[t.id])}function V$o(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}l$E.prototype.update=function(e){if(!e$2e(e))throw new t$15("time is required.");for(var t=this._entitiesToVisualize.values,i=this._tilesetHash,n=this._primitives,r=0,o=t.length;r<o;r++){var a,s,l=t[r],u=l._tileset,c=i[l.id],h=l.isShowing&&l.isAvailable(e)&&r$_.getValueOrDefault(u._show,e,!0);if(h&&(s=l.computeModelMatrix(e,P$s),a=t$10.createIfNeeded(r$_.getValueOrUndefined(u._uri,e))),h){var d=e$2e(c)?c.tilesetPrimitive:void 0;(!e$2e(d)||a.url!==c.url)&&(e$2e(d)&&(n.removeAndDestroy(d),delete i[l.id]),(d=new p$u({url:a})).id=l,n.add(d),c={tilesetPrimitive:d,url:a.url,loadFail:!1},i[l.id]=c,V$o(d,l,i)),d.show=!0,e$2e(s)&&(d.modelMatrix=s),d.maximumScreenSpaceError=r$_.getValueOrDefault(u.maximumScreenSpaceError,e,d.maximumScreenSpaceError)}else e$2e(c)&&(c.tilesetPrimitive.show=!1)}return!0},l$E.prototype.isDestroyed=function(){return!1},l$E.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$E.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._tilesetHash,i=this._primitives,n=e.length-1;n>-1;n--)_$r(this,e[n],t,i);return i$11(this)},l$E.prototype.getBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("entity is required.");if(!e$2e(t))throw new t$15("result is required.");var i=this._tilesetHash[e.id];if(!e$2e(i)||i.loadFail)return R$w.FAILED;var n=i.tilesetPrimitive;return e$2e(n)&&n.show?n.ready?(i$1d.clone(n.boundingSphere,t),R$w.DONE):R$w.PENDING:R$w.FAILED},l$E.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._entitiesToVisualize,s=this._tilesetHash,l=this._primitives;for(r=t.length-1;r>-1;r--)e$2e((o=t[r])._tileset)&&a.set(o.id,o);for(r=n.length-1;r>-1;r--)e$2e((o=n[r])._tileset)?a.set(o.id,o):(_$r(this,o,s,l),a.remove(o.id));for(r=i.length-1;r>-1;r--)_$r(this,o=i[r],s,l),a.remove(o.id)};var f$A=e$1X.WHITE,p$t=e$1X.BLACK,u$v=new o$1o(2,2);function r$w(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(r$w.prototype,{isConstant:{get:function(){return r$_.isConstant(this._evenColor)&&r$_.isConstant(this._oddColor)&&r$_.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:C$10("evenColor"),oddColor:C$10("oddColor"),repeat:C$10("repeat")}),r$w.prototype.getType=function(e){return"Checkerboard"},r$w.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.lightColor=r$_.getValueOrClonedDefault(this._evenColor,e,f$A,t.lightColor),t.darkColor=r$_.getValueOrClonedDefault(this._oddColor,e,p$t,t.darkColor),t.repeat=r$_.getValueOrDefault(this._repeat,e,u$v),t},r$w.prototype.equals=function(e){return this===e||e instanceof r$w&&r$_.equals(this._evenColor,e._evenColor)&&r$_.equals(this._oddColor,e._oddColor)&&r$_.equals(this._repeat,e._repeat)};var A$D={id:void 0};function _$q(e){if(e._firing)e._refire=!0;else if(0===e._suspendCount){var t=e._addedEntities,i=e._removedEntities,n=e._changedEntities;if(0!==n.length||0!==t.length||0!==i.length){e._firing=!0;do{e._refire=!1;var r=t.values.slice(0),o=i.values.slice(0),a=n.values.slice(0);t.removeAll(),i.removeAll(),n.removeAll(),e._collectionChanged.raiseEvent(e,r,o,a)}while(e._refire);e._firing=!1}}}function r$v(e){this._owner=e,this._entities=new e$1Q,this._addedEntities=new e$1Q,this._removedEntities=new e$1Q,this._changedEntities=new e$1Q,this._suspendCount=0,this._collectionChanged=new o$1h,this._id=e$1T(),this._show=!0,this._firing=!1,this._refire=!1}function b$B(e){if(e$2e(e.box))return{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),box:{dimensions:new o$1p(e.box.dimensions.x,e.box.dimensions.y,e.box.dimensions.z),material:new e$1X(0,0,1,.2)}};if(e$2e(e.cylinder))return{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),cylinder:{length:e.cylinder.length,topRadius:e.cylinder.topRadius,bottomRadius:e.cylinder.bottomRadius,material:new e$1X(0,0,1,.2)}};if(e$2e(e.billboard))return{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),billboard:{image:e.imagePath,width:e.width,height:e.height}};if(e$2e(e.ellipsoid))return e$2e(e.radius)?{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.radius),ellipsoid:{radii:new o$1p(e.radius,e.radius,e.radius),material:new e$1X(0,0,1,.2)}}:{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.yAxis),ellipsoid:{radii:new o$1p(e.ellipsoid.radii.x,e.ellipsoid.radii.y,e.ellipsoid.radii.z),material:new e$1X(0,0,1,.2)}};if(e$2e(e.polygon))return{polygon:{hierarchy:e.polygon.positions,material:new e$1X(1,0,0,.1),extrudedHeight:e.polygon.extrudedHeight,perPositionHeight:e.polygon.perPositionHeight,height:e.polygon.height}};if(e$2e(e.polyline)){for(var t=[],i=0,n=e.polyline.positions.length;i<n;++i)t.push(o$1p.fromDegrees(e.polyline.positions[i].x,e.polyline.positions[i].y,e.polyline.positions[i].z));return{polyline:{positions:t,width:5,material:new e$1X(1,0,0,1)}}}return e$2e(e.ellipse)?{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z),ellipse:{semiMinorAxis:e.ellipse.semiMinorAxis,semiMajorAxis:e.ellipse.semiMajorAxis,height:e.position.z,material:new e$1X(0,0,1,.2)}}:"POINT3D"===e.type?{position:o$1p.fromDegrees(e.x,e.y,e.z),point:new n$O({color:new e$1X(1,1,0),pixelSize:10,outlineColor:new e$1X(0,1,1)})}:{}}r$v.prototype.suspendEvents=function(){this._suspendCount++},r$v.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new t$15("resumeEvents can not be called before suspendEvents.");this._suspendCount--,_$q(this)},r$v.collectionChangedEventCallback=void 0,Object.defineProperties(r$v.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(e!==this._show){this.suspendEvents();var t,i=[],n=this._entities.values,r=n.length;for(t=0;t<r;t++)i.push(n[t].isShowing);for(this._show=e,t=0;t<r;t++){var o=i[t],a=n[t];o!==a.isShowing&&a.definitionChanged.raiseEvent(a,"isShowing",a.isShowing,o)}this.resumeEvents()}}},owner:{get:function(){return this._owner}}}),r$v.prototype.computeAvailability=function(){for(var e=o$I.MAXIMUM_VALUE,t=o$I.MINIMUM_VALUE,i=this._entities.values,n=0,r=i.length;n<r;n++){var o=i[n].availability;if(e$2e(o)){var a=o.start,s=o.stop;a$15.lessThan(a,e)&&!a.equals(o$I.MINIMUM_VALUE)&&(e=a),a$15.greaterThan(s,t)&&!s.equals(o$I.MAXIMUM_VALUE)&&(t=s)}}return o$I.MAXIMUM_VALUE.equals(e)&&(e=o$I.MINIMUM_VALUE),o$I.MINIMUM_VALUE.equals(t)&&(t=o$I.MAXIMUM_VALUE),new d$W({start:e,stop:t})},r$v.prototype.add=function(e){if(!e$2e(e))throw new t$15("entity is required.");e instanceof o$11&&(e=b$B(e)),e instanceof h$W||(e=new h$W(e));var t=e.id,i=this._entities;if(i.contains(t))throw new t$13("An entity with id "+t+" already exists in this collection.");return e.entityCollection=this,i.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(r$v.prototype._onEntityDefinitionChanged,this),_$q(this),e},r$v.prototype.remove=function(e){return!!e$2e(e)&&this.removeById(e.id)},r$v.prototype.contains=function(e){if(!e$2e(e))throw new t$15("entity is required");return!!e$2e(e.id)&&this._entities.get(e.id)===e},r$v.prototype.removeById=function(e){if(!e$2e(e))return!1;var t=this._entities.get(e);return!!this._entities.remove(e)&&(e$2e(t._polygon)&&e$2e(t._polygon.outlines)&&t._polygon.outlines.removeAll(),e$2e(t._polygon)&&e$2e(t._polygon.clampOutlines)&&t.entityCollection._owner._entityCluster._scene._primitives.remove(t._polygon.clampOutlines),this._addedEntities.remove(e)||(this._removedEntities.set(e,t),this._changedEntities.remove(e)),this._entities.remove(e),t.definitionChanged.removeEventListener(r$v.prototype._onEntityDefinitionChanged,this),_$q(this),!0)},r$v.prototype.removeAll=function(){for(var e=this._entities,t=e.length,i=e.values,n=this._addedEntities,r=this._removedEntities,o=0;o<t;o++){var a=i[o];e$2e(a._polygon)&&e$2e(a._polygon.outlines)&&a._polygon.outlines.removeAll(),e$2e(a._polygon)&&e$2e(a._polygon.clampOutlines)&&a.entityCollection._owner._entityCluster._scene._primitives.remove(a._polygon.clampOutlines);var s=a.id;e$2e(n.get(s))||(a.definitionChanged.removeEventListener(r$v.prototype._onEntityDefinitionChanged,this),r.set(s,a))}e.removeAll(),n.removeAll(),this._changedEntities.removeAll(),_$q(this)},r$v.prototype.getById=function(e){if(!e$2e(e))throw new t$15("id is required.");return this._entities.get(e)},r$v.prototype.getOrCreateEntity=function(e){if(!e$2e(e))throw new t$15("id is required.");var t=this._entities.get(e);return e$2e(t)||(A$D.id=e,t=new h$W(A$D),this.add(t)),t},r$v.prototype._onEntityDefinitionChanged=function(e){var t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),_$q(this)};var w$r={id:void 0},C$x=new Array(2);function x$z(e){for(var t=e.propertyNames,i=t.length,n=0;n<i;n++)e[t[n]]=void 0;e._name=void 0,e._availability=void 0}function A$C(e,t,i,n){C$x[0]=i,C$x[1]=n.id,t[JSON.stringify(C$x)]=n.definitionChanged.addEventListener(s$p.prototype._onDefinitionChanged,e)}function T$v(e,t,i,n){C$x[0]=i,C$x[1]=n.id;var r=JSON.stringify(C$x);t[r](),t[r]=void 0}function g$B(e){if(e._shouldRecomposite=!0,0===e._suspendCount){var t,i,n,r,o,a,s=e._collections,l=s.length,u=e._collectionsCopy,c=u.length,h=e._composite,d=new r$v(e),f=e._eventHash;for(t=0;t<c;t++)for((o=u[t]).collectionChanged.removeEventListener(s$p.prototype._onCollectionChanged,e),n=o.values,a=o.id,r=n.length-1;r>-1;r--)T$v(e,f,a,i=n[r]);for(t=l-1;t>=0;t--)for((o=s[t]).collectionChanged.addEventListener(s$p.prototype._onCollectionChanged,e),n=o.values,a=o.id,r=n.length-1;r>-1;r--){A$C(e,f,a,i=n[r]);var p=d.getById(i.id);e$2e(p)||(e$2e(p=h.getById(i.id))?x$z(p):(w$r.id=i.id,p=new h$W(w$r)),d.add(p)),p.merge(i)}e._collectionsCopy=s.slice(0),h.suspendEvents(),h.removeAll();var _=d.values;for(t=0;t<_.length;t++)h.add(_[t]);h.resumeEvents()}}function s$p(e,t){this._owner=t,this._composite=new r$v(this),this._suspendCount=0,this._collections=e$2e(e)?e.slice():[],this._collectionsCopy=[],this._id=e$1T(),this._eventHash={},g$B(this),this._shouldRecomposite=!1}function E$y(e,t){if(!e$2e(t))throw new t$15("collection is required.");var i=e.indexOf(t);if(-1===i)throw new t$15("collection is not in this composite.");return i}function q$v(e,t,i){var n=e._collections;if((t=e$2d.clamp(t,0,n.length-1))!==(i=e$2d.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,g$B(e)}}function c$r(e,t,i,n){function r(){i.raiseEvent(e)}var o=[];t.removeAll();for(var a=n.length,s=0;s<a;s++){var l=n.get(s);e$2e(l.data)&&-1===o.indexOf(l.data)&&t.add(l.data.definitionChanged,r)}}function e$B(){this._eventHelper=new n$x,this._definitionChanged=new o$1h,this._intervals=new c$A,this._intervals.changedEvent.addEventListener(e$B.prototype._intervalsChanged,this)}function e$A(){this._definitionChanged=new o$1h,this._composite=new e$B,this._composite.definitionChanged.addEventListener(e$A.prototype._raiseDefinitionChanged,this)}function t$p(e){this._referenceFrame=u$Z(e,Re$l.FIXED),this._definitionChanged=new o$1h,this._composite=new e$B,this._composite.definitionChanged.addEventListener(t$p.prototype._raiseDefinitionChanged,this)}Object.defineProperties(s$p.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}}),s$p.prototype.addCollection=function(e,t){var i=e$2e(t);if(!e$2e(e))throw new t$15("collection is required.");if(i){if(t<0)throw new t$15("index must be greater than or equal to zero.");if(t>this._collections.length)throw new t$15("index must be less than or equal to the number of collections.")}i?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),g$B(this)},s$p.prototype.removeCollection=function(e){var t=this._collections.indexOf(e);return-1!==t&&(this._collections.splice(t,1),g$B(this),!0)},s$p.prototype.removeAllCollections=function(){this._collections.length=0,g$B(this)},s$p.prototype.containsCollection=function(e){return-1!==this._collections.indexOf(e)},s$p.prototype.contains=function(e){return this._composite.contains(e)},s$p.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)},s$p.prototype.getCollection=function(e){if(!e$2e(e))throw new t$15("index is required.","index");return this._collections[e]},s$p.prototype.getCollectionsLength=function(){return this._collections.length},s$p.prototype.raiseCollection=function(e){var t=E$y(this._collections,e);q$v(this,t,t+1)},s$p.prototype.lowerCollection=function(e){var t=E$y(this._collections,e);q$v(this,t,t-1)},s$p.prototype.raiseCollectionToTop=function(e){var t=E$y(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),g$B(this))},s$p.prototype.lowerCollectionToBottom=function(e){var t=E$y(this._collections,e);0!==t&&(this._collections.splice(t,1),this._collections.splice(0,0,e),g$B(this))},s$p.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()},s$p.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new t$15("resumeEvents can not be called before suspendEvents.");this._suspendCount--,this._shouldRecomposite&&0===this._suspendCount&&(g$B(this),this._shouldRecomposite=!1),this._composite.resumeEvents()},s$p.prototype.computeAvailability=function(){return this._composite.computeAvailability()},s$p.prototype.getById=function(e){return this._composite.getById(e)},s$p.prototype._onCollectionChanged=function(e,t,i){var n=this._collectionsCopy,r=n.length,o=this._composite;o.suspendEvents();var a,s,l,u,c=i.length,h=this._eventHash,d=e.id;for(a=0;a<c;a++){var f=i[a];T$v(this,h,d,f);var p=f.id;for(s=r-1;s>=0;s--)e$2e(l=n[s].getById(p))&&(e$2e(u)||x$z(u=o.getById(p)),u.merge(l));e$2e(u)||o.removeById(p),u=void 0}var _=t.length;for(a=0;a<_;a++){var m=t[a];A$C(this,h,d,m);var g=m.id;for(s=r-1;s>=0;s--)e$2e(l=n[s].getById(g))&&(e$2e(u)||(e$2e(u=o.getById(g))?x$z(u):(w$r.id=g,u=new h$W(w$r),o.add(u))),u.merge(l));u=void 0}o.resumeEvents()},s$p.prototype._onDefinitionChanged=function(e,t,i,n){for(var r=this._collections,o=this._composite,a=r.length,s=e.id,l=o.getById(s),u=l[t],c=!e$2e(u),h=!0,d=a-1;d>=0;d--){var f=r[d].getById(e.id);if(e$2e(f)){var p=f[t];if(e$2e(p)){if(h){if(h=!1,!e$2e(p.merge)||!e$2e(p.clone)){u=p;break}u=p.clone(u)}u.merge(p)}}}c&&-1===l.propertyNames.indexOf(t)&&l.addProperty(t),l[t]=u},Object.defineProperties(e$B.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),e$B.prototype.getValue=function(e,t){if(!e$2e(e))throw new t$15("time is required");var i=this._intervals.findDataForIntervalContainingDate(e);if(e$2e(i))return i.getValue(e,t)},e$B.prototype.equals=function(e){return this===e||e instanceof e$B&&this._intervals.equals(e._intervals,r$_.equals)},e$B.prototype._intervalsChanged=function(){c$r(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)},Object.defineProperties(e$A.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}}),e$A.prototype.getType=function(e){if(!e$2e(e))throw new t$15("time is required");var t=this._composite._intervals.findDataForIntervalContainingDate(e);if(e$2e(t))return t.getType(e)},e$A.prototype.getValue=function(e,t){if(!e$2e(e))throw new t$15("time is required");var i=this._composite._intervals.findDataForIntervalContainingDate(e);if(e$2e(i))return i.getValue(e,t)},e$A.prototype.equals=function(e){return this===e||e instanceof e$A&&this._composite.equals(e._composite,r$_.equals)},e$A.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(t$p.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}}),t$p.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$l.FIXED,t)},t$p.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2e(e))throw new t$15("time is required.");if(!e$2e(t))throw new t$15("referenceFrame is required.");var n=this._composite._intervals.findDataForIntervalContainingDate(e);if(e$2e(n))return n.getValueInReferenceFrame(e,t,i)},t$p.prototype.equals=function(e){return this===e||e instanceof t$p&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,r$_.equals)},t$p.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var N$p=new e$1L(0);function i$x(e){i$G.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}e$2e(Object.create)&&(i$x.prototype=Object.create(i$G.prototype),i$x.prototype.constructor=i$x),Object.defineProperties(i$x.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),i$x.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!e$2e(t.height)&&!e$2e(t.extrudedHeight)&&d$15.isSupported(this._scene)},i$x.prototype._getIsClosed=function(e){var t=e.height,i=e.extrudedHeight;return 0===t||e$2e(i)&&i!==t},i$x.prototype._computeCenter=t$15.throwInstantiationError,i$x.prototype._onEntityPropertyChanged=function(e,t,i,n){if(i$G.prototype._onEntityPropertyChanged.call(this,e,t,i,n),-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(e$2e(r)){e$2e(r.zIndex)&&(e$2e(r.height)||e$2e(r.extrudedHeight))&&e$22(e$22.geometryZIndex),this._zIndex=u$Z(r.zIndex,N$p),e$2e(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);var o=r.heightReference,a=r.extrudedHeightReference;if(e$2e(o)||e$2e(a)){var s=new n$X(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new h$E(this._scene,s,o,a)}}}},i$x.prototype.destroy=function(){e$2e(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),i$G.prototype.destroy.call(this)},i$x.getGeometryHeight=function(e,t){if(o$1q.defined("heightReference",t),e$2e(e))return t!==k$R.CLAMP_TO_GROUND?e:0;t!==k$R.NONE&&e$22(e$22.geometryHeightReference)},i$x.getGeometryExtrudedHeight=function(e,t){if(o$1q.defined("extrudedHeightReference",t),e$2e(e))return t!==k$R.CLAMP_TO_GROUND?e:i$x.CLAMP_TO_GROUND;t!==k$R.NONE&&e$22(e$22.geometryExtrudedHeightReference)},i$x.CLAMP_TO_GROUND="clamp",i$x.computeGeometryOffsetAttribute=function(e,t,i,n){(!e$2e(e)||!e$2e(t))&&(t=k$R.NONE),(!e$2e(i)||!e$2e(n))&&(n=k$R.NONE);var r=0;return t!==k$R.NONE&&r++,n===k$R.RELATIVE_TO_GROUND&&r++,2===r?_0x39c22a.ALL:1===r?_0x39c22a.TOP:void 0};var H$A=new e$1X,I$E=o$1p.ZERO,D$t=new o$1p,G$x=new h$18;function T$u(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function f$z(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new T$u(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}function l$D(e,t,i){a$C.call(this,e,t,i)}function o$B(){t$15.throwInstantiationError()}function s$o(e,t){if(e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$15("disableDepthTestDistance must be greater than or equal to 0.0.");var i=e.translucencyByDistance,n=e.scaleByDistance,r=e.distanceDisplayCondition;if(e$2e(i)){if(i.far<=i.near)throw new t$15("translucencyByDistance.far must be greater than translucencyByDistance.near.");i=o$Y.clone(i)}if(e$2e(n)){if(n.far<=n.near)throw new t$15("scaleByDistance.far must be greater than scaleByDistance.near.");n=o$Y.clone(n)}if(e$2e(r)){if(r.far<=r.near)throw new t$15("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");r=r$Z.clone(r)}this._show=u$Z(e.show,!0),this._position=o$1p.clone(u$Z(e.position,o$1p.ZERO)),this._actualPosition=o$1p.clone(this._position),this._color=e$1X.clone(u$Z(e.color,e$1X.WHITE)),this._outlineColor=e$1X.clone(u$Z(e.outlineColor,e$1X.TRANSPARENT)),this._outlineWidth=u$Z(e.outlineWidth,0),this._pixelSize=u$Z(e.pixelSize,10),this._scaleByDistance=n,this._translucencyByDistance=i,this._distanceDisplayCondition=r,this._disableDepthTestDistance=u$Z(e.disableDepthTestDistance,0),this._id=e.id,this._collection=u$Z(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1}e$2e(Object.create)&&(f$z.prototype=Object.create(i$x.prototype),f$z.prototype.constructor=f$z),f$z.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,H$A)),e$2e(t)||(t=e$1X.WHITE),r.color=o$16.fromColor(t));return e$2e(this._options.offsetAttribute)&&(r.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,I$E,D$t))),new d$1o({id:i,geometry:new P$F(this._options),attributes:r})},f$z.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,H$A),r={show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return e$2e(this._options.offsetAttribute)&&(r.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,I$E,D$t))),new d$1o({id:t,geometry:new V$z(this._options),attributes:r})},f$z.prototype._computeCenter=function(e,t){var i=r$_.getValueOrUndefined(this._entity.corridor.positions,e);if(e$2e(i)&&0!==i.length)return o$1p.clone(i[Math.floor(i.length/2)],t)},f$z.prototype._isHidden=function(e,t){return!e$2e(t.positions)||!e$2e(t.width)||i$G.prototype._isHidden.call(this,e,t)},f$z.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!r$_.isConstant(t.height)||!r$_.isConstant(t.extrudedHeight)||!r$_.isConstant(t.granularity)||!r$_.isConstant(t.width)||!r$_.isConstant(t.outlineWidth)||!r$_.isConstant(t.cornerType)||!r$_.isConstant(t.zIndex)||this._onTerrain&&!r$_.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$P)},f$z.prototype._setStaticOptions=function(e,t){var i=r$_.getValueOrUndefined(t.height,o$I.MINIMUM_VALUE),n=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),r=r$_.getValueOrUndefined(t.extrudedHeight,o$I.MINIMUM_VALUE),o=r$_.getValueOrDefault(t.extrudedHeightReference,o$I.MINIMUM_VALUE,k$R.NONE);e$2e(r)&&!e$2e(i)&&(i=0);var a=this._options;a.vertexFormat=this._materialProperty instanceof t$P?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,a.positions=t.positions.getValue(o$I.MINIMUM_VALUE,a.positions),a.width=t.width.getValue(o$I.MINIMUM_VALUE),a.granularity=r$_.getValueOrUndefined(t.granularity,o$I.MINIMUM_VALUE),a.cornerType=r$_.getValueOrUndefined(t.cornerType,o$I.MINIMUM_VALUE),a.offsetAttribute=i$x.computeGeometryOffsetAttribute(i,n,r,o),a.height=i$x.getGeometryHeight(i,n),(r=i$x.getGeometryExtrudedHeight(r,o))===i$x.CLAMP_TO_GROUND&&(r=e$1H.getMinimumMaximumHeights(P$F.computeRectangle(a,G$x)).minimumTerrainHeight),a.extrudedHeight=r},f$z.DynamicGeometryUpdater=l$D,e$2e(Object.create)&&(l$D.prototype=Object.create(a$C.prototype),l$D.prototype.constructor=l$D),l$D.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2e(n.positions)||!e$2e(n.width)||a$C.prototype._isHidden.call(this,e,t,i)},l$D.prototype._setOptions=function(e,t,i){var n=this._options,r=r$_.getValueOrUndefined(t.height,i),o=r$_.getValueOrDefault(t.heightReference,i,k$R.NONE),a=r$_.getValueOrUndefined(t.extrudedHeight,i),s=r$_.getValueOrDefault(t.extrudedHeightReference,i,k$R.NONE);e$2e(a)&&!e$2e(r)&&(r=0),n.positions=r$_.getValueOrUndefined(t.positions,i),n.width=r$_.getValueOrUndefined(t.width,i),n.granularity=r$_.getValueOrUndefined(t.granularity,i),n.cornerType=r$_.getValueOrUndefined(t.cornerType,i),n.offsetAttribute=i$x.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$x.getGeometryHeight(r,o),(a=i$x.getGeometryExtrudedHeight(a,s))===i$x.CLAMP_TO_GROUND&&(a=e$1H.getMinimumMaximumHeights(P$F.computeRectangle(n,G$x)).minimumTerrainHeight),n.extrudedHeight=a},Object.defineProperties(o$B.prototype,{name:{get:t$15.throwInstantiationError},clock:{get:t$15.throwInstantiationError},entities:{get:t$15.throwInstantiationError},isLoading:{get:t$15.throwInstantiationError},changedEvent:{get:t$15.throwInstantiationError},errorEvent:{get:t$15.throwInstantiationError},loadingEvent:{get:t$15.throwInstantiationError},show:{get:t$15.throwInstantiationError},clustering:{get:t$15.throwInstantiationError}}),o$B.prototype.update=t$15.throwInstantiationError,o$B.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var I$D=s$o.SHOW_INDEX=0,C$w=s$o.POSITION_INDEX=1,g$A=s$o.COLOR_INDEX=2,O$n=s$o.OUTLINE_COLOR_INDEX=3,b$A=s$o.OUTLINE_WIDTH_INDEX=4,q$u=s$o.PIXEL_SIZE_INDEX=5,A$B=s$o.SCALE_BY_DISTANCE_INDEX=6,X$n=s$o.TRANSLUCENCY_BY_DISTANCE_INDEX=7,x$y=s$o.DISTANCE_DISPLAY_CONDITION_INDEX=8,L$x=s$o.DISABLE_DEPTH_DISTANCE_INDEX=9;function c$q(e,t){var i=e._pointPrimitiveCollection;e$2e(i)&&(i._updatePointPrimitive(e,t),e._dirty=!0)}s$o.NUMBER_OF_PROPERTIES=10,Object.defineProperties(s$o.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._show!==e&&(this._show=e,c$q(this,I$D))}},position:{get:function(){return this._position},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._position;o$1p.equals(t,e)||(o$1p.clone(e,t),o$1p.clone(e,this._actualPosition),c$q(this,C$w))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._scaleByDistance;o$Y.equals(t,e)||(this._scaleByDistance=o$Y.clone(e,t),c$q(this,A$B))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._translucencyByDistance;o$Y.equals(t,e)||(this._translucencyByDistance=o$Y.clone(e,t),c$q(this,X$n))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._pixelSize!==e&&(this._pixelSize=e,c$q(this,q$u))}},color:{get:function(){return this._color},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._color;e$1X.equals(t,e)||(e$1X.clone(e,t),c$q(this,g$A))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._outlineColor;e$1X.equals(t,e)||(e$1X.clone(e,t),c$q(this,O$n))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,c$q(this,b$A))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far must be greater than near");r$Z.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=r$Z.clone(e,this._distanceDisplayCondition),c$q(this,x$y))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(!e$2e(e)||e<0)throw new t$15("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,c$q(this,L$x)}}},id:{get:function(){return this._id},set:function(e){this._id=e,e$2e(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,c$q(this,I$D))}}}),s$o.prototype.getPickId=function(e){return e$2e(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId},s$o.prototype._getActualPosition=function(){return this._actualPosition},s$o.prototype._setActualPosition=function(e){o$1p.clone(e,this._actualPosition),c$q(this,C$w)};var m$t=new e$2c;s$o._computeActualPosition=function(e,t,i){return t.mode===C$14.SCENE3D?e:(p$1d.multiplyByPoint(i,e,m$t),s$R.computeActualWgs84Position(t,m$t))};var E$x=new e$2c;s$o._computeScreenSpacePosition=function(e,t,i,n){var r=p$1d.multiplyByVector(e,e$2c.fromElements(t.x,t.y,t.z,1,E$x),E$x);return s$R.wgs84ToWindowCoordinates(i,r,n)},s$o.prototype.computeScreenSpacePosition=function(e,t){var i=this._pointPrimitiveCollection;if(e$2e(t)||(t=new o$1o),!e$2e(i))throw new t$15("PointPrimitive must be in a collection.");if(!e$2e(e))throw new t$15("scene is required.");var n=i.modelMatrix,r=s$o._computeScreenSpacePosition(n,this._actualPosition,e,t);if(e$2e(r))return r.y=e.canvas.clientHeight-r.y,r},s$o.getScreenSpaceBoundingBox=function(e,t,i){var n=e.pixelSize,r=.5*n,o=t.x-r,a=t.y-r,s=n,l=n;return e$2e(i)||(i=new f$1a),i.x=o,i.y=a,i.width=s,i.height=l,i},s$o.prototype.equals=function(e){return this===e||e$2e(e)&&this._id===e._id&&o$1p.equals(this._position,e._position)&&e$1X.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&e$1X.equals(this._outlineColor,e._outlineColor)&&o$Y.equals(this._scaleByDistance,e._scaleByDistance)&&o$Y.equals(this._translucencyByDistance,e._translucencyByDistance)&&r$Z.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},s$o.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var X$m="varying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nvarying vec2 v_offset;\n\nvoid main()\n{\n if(length(v_offset) > 0.5){\n discard;\n }\n // The distance in UV space from this fragment to the center of the point, at most 0.5.\n float distanceToCenter = 0.0;\n // The max distance stops one pixel shy of the edge to leave space for anti-aliasing.\n float maxDistance = max(0.0, 0.5 - v_pixelDistance);\n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n float innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);\n\n vec4 color = mix(v_outlineColor, v_color, innerAlpha);\n color.a *= wholeAlpha;\n\n// Fully transparent parts of the billboard are not pickable.\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\n if (color.a < 0.005) // matches 0/255 and 1/255\n {\n discard;\n }\n#else\n// The billboard is rendered twice. The opaque pass discards translucent fragments\n// and the translucent pass discards opaque fragments.\n#ifdef OPAQUE\n if (color.a < 0.995) // matches < 254/255\n {\n discard;\n }\n#else\n if (color.a >= 0.995) // matches 254/255 and 255/255\n {\n discard;\n }\n#endif\n#endif\n\n gl_FragColor = czm_gammaCorrect(color);\n czm_writeLogDepth();\n}",Pe$8='uniform float u_maxTotalPointSize;\n\nattribute vec2 offset;\nattribute vec4 positionHighAndSize;\nattribute vec4 positionLowAndOutline;\nattribute vec4 compressedAttribute0; // color, outlineColor, pick color\nattribute vec4 compressedAttribute1; // show, translucency by distance, some free space\nattribute vec4 scaleByDistance; // near, nearScale, far, farScale\nattribute vec3 distanceDisplayConditionAndDisableDepth; // near, far, disableDepthTestDistance\n\nvarying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nvarying vec2 v_offset;\n\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\n\nfloat computerOnePixelLength(vec4 viewPos)\n{\n vec4 winPos = czm_projection * viewPos;\n float dwidth = czm_metersPerPixel(viewPos);\n winPos.x = winPos.x - 2.0 * dwidth;\n vec4 newViewPos = czm_inverseProjection * winPos;\n return length(viewPos - newViewPos);\n}\n\nvoid main()\n{\n // Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition\n\n // unpack attributes\n vec3 positionHigh = positionHighAndSize.xyz;\n vec3 positionLow = positionLowAndOutline.xyz;\n float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;\n float totalSize = positionHighAndSize.w + outlineWidthBothSides;\n float outlinePercent = outlineWidthBothSides / totalSize;\n // Scale in response to browser-zoom.\n totalSize *= czm_pixelRatio;\n // Add padding for anti-aliasing on both sides.\n totalSize += 3.0;\n\n float temp = compressedAttribute1.x * SHIFT_RIGHT8;\n float show = floor(temp);\n\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n vec4 translucencyByDistance;\n translucencyByDistance.x = compressedAttribute1.z;\n translucencyByDistance.z = compressedAttribute1.w;\n\n translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\n temp = compressedAttribute1.y * SHIFT_RIGHT8;\n translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 color;\n vec4 outlineColor;\n vec4 pickColor;\n\n // compressedAttribute0.z => pickColor.rgb\n\n temp = compressedAttribute0.z * SHIFT_RIGHT8;\n pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor.r = floor(temp);\n\n // compressedAttribute0.x => color.rgb\n\n temp = compressedAttribute0.x * SHIFT_RIGHT8;\n color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n color.r = floor(temp);\n\n // compressedAttribute0.y => outlineColor.rgb\n\n temp = compressedAttribute0.y * SHIFT_RIGHT8;\n outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.r = floor(temp);\n\n // compressedAttribute0.w => color.a, outlineColor.a, pickColor.a\n\n temp = compressedAttribute0.w * SHIFT_RIGHT8;\n pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor = pickColor / 255.0;\n\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor /= 255.0;\n color.a = floor(temp);\n color /= 255.0;\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n\n ///////////////////////////////////////////////////////////////////////////\n\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n // 2D camera distance is a special case\n // treat all billboards as flattened to the z=0.0 plane\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n lengthSq = dot(positionEC.xyz, positionEC.xyz);\n }\n#endif\n\n#ifdef EYE_DISTANCE_SCALING\n totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);\n#endif\n // If size is too small, push vertex behind near plane for clipping.\n // Note that context.minimumAliasedPointSize "will be at most 1.0".\n if (totalSize < 1.0)\n {\n positionEC.xyz = vec3(0.0);\n totalSize = 1.0;\n }\n\n float translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (translucency < 0.004)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n#ifdef DISTANCE_DISPLAY_CONDITION\n float nearSq = distanceDisplayConditionAndDisableDepth.x;\n float farSq = distanceDisplayConditionAndDisableDepth.y;\n if (lengthSq < nearSq || lengthSq > farSq) {\n // push vertex behind camera to force it to be clipped\n positionEC.xyz = vec3(0.0, 0.0, 1.0);\n }\n#endif\n\n positionEC.xy = positionEC.xy + offset * computerOnePixelLength(positionEC) * totalSize;\n gl_Position = czm_projection * positionEC;\n czm_vertexLogDepth();\n\n#ifdef DISABLE_DEPTH_DISTANCE\n float disableDepthTestDistance = distanceDisplayConditionAndDisableDepth.z;\n if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n {\n disableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n }\n\n if (disableDepthTestDistance != 0.0)\n {\n // Don\'t try to "multiply both sides" by w. Greater/less-than comparisons won\'t work for negative values of w.\n float zclip = gl_Position.z / gl_Position.w;\n bool clipped = (zclip < -1.0 || zclip > 1.0);\n if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n {\n // Position z on the near plane.\n gl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\n czm_vertexLogDepth(vec4(czm_currentFrustum.x));\n#endif\n }\n }\n#endif\n\n v_color = color;\n v_color.a *= translucency * show;\n v_outlineColor = outlineColor;\n v_outlineColor.a *= translucency * show;\n\n v_innerPercent = 1.0 - outlinePercent;\n v_pixelDistance = 2.0 / totalSize;\n v_offset = offset;\n gl_Position *= show;\n\n v_pickColor = pickColor;\n}',Le$b=s$o.SHOW_INDEX,Z$s=s$o.POSITION_INDEX,de$c=s$o.COLOR_INDEX,Ve$9=s$o.OUTLINE_COLOR_INDEX,Ue$9=s$o.OUTLINE_WIDTH_INDEX,we$8=s$o.PIXEL_SIZE_INDEX,_e$9=s$o.SCALE_BY_DISTANCE_INDEX,pe$h=s$o.TRANSLUCENCY_BY_DISTANCE_INDEX,le$g=s$o.DISTANCE_DISPLAY_CONDITION_INDEX,Re$9=s$o.DISABLE_DEPTH_DISTANCE_INDEX,q$t=s$o.NUMBER_OF_PROPERTIES,p$s={offset:0,positionHighAndSize:1,positionLowAndOutline:2,compressedAttribute0:3,compressedAttribute1:4,scaleByDistance:5,distanceDisplayConditionAndDisableDepth:6};function D$s(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(q$t),this._maxPixelSize=1,this._baseVolume=new i$1d,this._baseVolumeWC=new i$1d,this._baseVolume2D=new i$1d,this._boundingVolume=new i$1d,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.blendOption=u$Z(e.blendOption,S$L.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=C$14.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW];var t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}},this.depthTestEnabled=u$Z(e.depthTestEnabled,!0)}function ue$d(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function J$q(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;for(var t=[],i=e._pointPrimitives,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._pointPrimitives=t}}function Me$c(e,t,i){return new v$F(e,[{index:p$s.positionHighAndSize,name:"positionHighAndSize",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Z$s]},{index:p$s.positionLowAndOutline,name:"positionLowAndOutline",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Z$s]},{index:p$s.compressedAttribute0,name:"compressedAttribute0",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[de$c]},{index:p$s.compressedAttribute1,name:"compressedAttribute1",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[pe$h]},{index:p$s.scaleByDistance,name:"scaleByDistance",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[_e$9]},{index:p$s.distanceDisplayConditionAndDisableDepth,name:"distanceDisplayConditionAndDisableDepth",componentsPerAttribute:3,componentDatatype:S$14.FLOAT,usage:i[le$g]},{name:"offset",index:p$s.offset,vertexBuffer:e.createBillboardOffsetVertexBuffer(),componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}],t,!0)}Object.defineProperties(D$s.prototype,{length:{get:function(){return J$q(this),this._pointPrimitives.length}}}),D$s.prototype.add=function(e){var t=new s$o(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t},D$s.prototype.remove=function(e){return!!this.contains(e)&&(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},D$s.prototype.removeAll=function(){ue$d(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0},D$s.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]},D$s.prototype.contains=function(e){return e$2e(e)&&e._pointPrimitiveCollection===this},D$s.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return J$q(this),this._pointPrimitives[e]},D$s.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,n=0;n<q$t;++n){var r=0===i[n]?A$18.STATIC_DRAW:A$18.STREAM_DRAW;t=t||e[n]!==r,e[n]=r}return t};var K$p=new i$12;function ce$f(e,t,i,n){var r=n._index,o=n._getActualPosition();e._mode===C$14.SCENE3D&&(i$1d.expand(e._baseVolume,o,e._baseVolume),e._boundingVolumeDirty=!0),i$12.fromCartesian(o,K$p);var a=n.pixelSize,s=n.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,a+s);var l=i[p$s.positionHighAndSize],u=K$p.high;l(r,u.x,u.y,u.z,a);var c=i[p$s.positionLowAndOutline],h=K$p.low;c(r,h.x,h.y,h.z,s)}var z$u=65536,L$w=256;function fe$d(e,t,i,n){var r=n._index,o=n.color,a=n.getPickId(t).color,s=n.outlineColor,l=e$1X.floatToByte(o.red),u=e$1X.floatToByte(o.green),c=e$1X.floatToByte(o.blue),h=l*z$u+u*L$w+c;l=e$1X.floatToByte(s.red),u=e$1X.floatToByte(s.green),c=e$1X.floatToByte(s.blue);var d=l*z$u+u*L$w+c;l=e$1X.floatToByte(a.red),u=e$1X.floatToByte(a.green),c=e$1X.floatToByte(a.blue);var f=l*z$u+u*L$w+c,p=e$1X.floatToByte(o.alpha)*z$u+e$1X.floatToByte(s.alpha)*L$w+e$1X.floatToByte(a.alpha);(0,i[p$s.compressedAttribute0])(r,h,d,f,p)}function me$h(e,t,i,n){var r=n._index,o=0,a=1,s=1,l=1,u=n.translucencyByDistance;e$2e(u)&&(o=u.near,a=u.nearValue,s=u.far,l=u.farValue,(1!==a||1!==l)&&(e._shaderTranslucencyByDistance=!0));var c=n.show&&n.clusterShow;0===n.color.alpha&&0===n.outlineColor.alpha&&(c=!1),a=e$2d.clamp(a,0,1);var h=(c?1:0)*L$w+(a=1===a?255:255*a|0),d=l=1===(l=e$2d.clamp(l,0,1))?255:255*l|0;(0,i[p$s.compressedAttribute1])(r,h,d,o,s)}function De$b(e,t,i,n){var r=n._index,o=i[p$s.scaleByDistance],a=0,s=1,l=1,u=1,c=n.scaleByDistance;e$2e(c)&&(a=c.near,s=c.nearValue,l=c.far,u=c.farValue,(1!==s||1!==u)&&(e._shaderScaleByDistance=!0)),o(r,a,s,l,u)}function ve$c(e,t,i,n){var r=n._index,o=i[p$s.distanceDisplayConditionAndDisableDepth],a=0,s=Number.MAX_VALUE,l=n.distanceDisplayCondition;e$2e(l)&&(a=l.near,s=l.far,a*=a,s*=s,e._shaderDistanceDisplayCondition=!0);var u=n.disableDepthTestDistance;(u*=u)>0&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1)),o(r,a,s,u)}function Xe$6(e,t,i,n){ce$f(e,t,i,n),fe$d(e,t,i,n),me$h(e,t,i,n),De$b(e,t,i,n),ve$c(e,t,i,n)}function $$q(e,t,i,n,r,o){var a;n.mode===C$14.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=s$o._computeActualPosition(c,n,r);e$2e(h)&&(u._setActualPosition(h),o?s.push(h):i$1d.expand(a,h,a))}o&&i$1d.fromPoints(s,a)}function ze$9(e,t){var i=t.mode,n=e._pointPrimitives,r=e._pointPrimitivesToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==C$14.SCENE3D&&!p$1d.equals(o,e.modelMatrix)?(e._mode=i,p$1d.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===C$14.SCENE3D||i===C$14.SCENE2D||i===C$14.COLUMBUS_VIEW)&&$$q(e,n,n.length,t,o,!0)):i===C$14.MORPHING?$$q(e,n,n.length,t,o,!0):(i===C$14.SCENE2D||i===C$14.COLUMBUS_VIEW)&&$$q(e,r,e._pointPrimitivesToUpdateIndex,t,o,!1)}function Fe$a(e,t,i){var n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;i.radius+=n}var We$7=[];function a$r(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._enabled=u$Z(e.enabled,!1),this._pixelRange=u$Z(e.pixelRange,80),this._minimumClusterSize=u$Z(e.minimumClusterSize,1),this._clusterBillboards=u$Z(e.clusterBillboards,!0),this._clusterLabels=u$Z(e.clusterLabels,!0),this._clusterPoints=u$Z(e.clusterPoints,!0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new o$1h}function ci$4(e){return e.coord.x}function di$3(e){return e.coord.y}function Z$r(e,t){e.x-=t,e.y-=t,e.width+=2*t,e.height+=2*t}D$s.prototype.update=function(e){if(e.multiViewportIndex>-1&&this._pointPrimitives.length>0&&e$2e(this._pointPrimitives[0])&&e$2e(this._pointPrimitives[0].id)&&e$2e(this._pointPrimitives[0].id.entityCollection)&&e$2e(this._pointPrimitives[0].id.entityCollection.owner)){var t=this._pointPrimitives[0].id.entityCollection.owner;if(typeof t.getVisibleInViewport<"u")if(!t.getVisibleInViewport(e.multiViewportIndex))return}J$q(this),this._maxTotalPointSize=e$1W.maximumAliasedPointSize,ze$9(this,e);var i,n=this._pointPrimitives.length,r=this._pointPrimitivesToUpdate,o=this._pointPrimitivesToUpdateIndex,a=this._propertiesChanged,s=this._createVertexArray,l=e.context,u=e.passes,c=u.pick;if(s||!c&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var h=0;h<q$t;++h)a[h]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=Me$c(l,n,this._buffersUsage),i=this._vaf.writers;for(var d=0;d<n;++d){var f=this._pointPrimitives[d];f._dirty=!1,Xe$6(this,l,i,f)}this._vaf.commit(l.createBillboardPointIndexBuffer())}this._pointPrimitivesToUpdateIndex=0}else if(o>0){var p=We$7;p.length=0,(a[Z$s]||a[Ue$9]||a[we$8])&&p.push(ce$f),(a[de$c]||a[Ve$9])&&p.push(fe$d),(a[Le$b]||a[pe$h])&&p.push(me$h),a[_e$9]&&p.push(De$b),(a[le$g]||a[Re$9])&&p.push(ve$c);var _=p.length;if(i=this._vaf.writers,o/n>.1){for(var m=0;m<o;++m){var g=r[m];g._dirty=!1;for(var x=0;x<_;++x)p[x](this,l,i,g)}this._vaf.commit(l.createBillboardPointIndexBuffer())}else{for(var y=0;y<o;++y){var v=r[y];v._dirty=!1;for(var $=0;$<_;++$)p[$](this,l,i,v);this._vaf.subCommit(v._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(o>1.5*n&&(r.length=n),e$2e(this._vaf)&&e$2e(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,i$1d.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var b,T=p$1d.IDENTITY;e.mode===C$14.SCENE3D?(T=this.modelMatrix,b=i$1d.clone(this._baseVolumeWC,this._boundingVolume)):b=i$1d.clone(this._baseVolume2D,this._boundingVolume),Fe$a(this,e,b);var C,S,w=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,w&&(this._blendOption===S$L.OPAQUE||this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=d$1m.fromCache({depthTest:{enabled:this.depthTestEnabled,func:de$y.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===S$L.TRANSLUCENT||this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=d$1m.fromCache({depthTest:{enabled:!0,func:de$y.LEQUAL},depthMask:!1,blending:Ee$r.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance,(w||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(C=new s$V({name:"PointPrimitiveCollectionVS",sources:[Pe$8]}),this._shaderScaleByDistance&&C.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&C.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&C.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&C.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT&&(S=new s$V({name:"PointPrimitiveCollectionFS",defines:["OPAQUE"],sources:[X$m]}),this._sp=r$14.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s}),S=new s$V({name:"PointPrimitiveCollectionFS",defines:["TRANSLUCENT"],sources:[X$m]}),this._spTranslucent=r$14.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s})),this._blendOption===S$L.OPAQUE&&(S=new s$V({name:"PointPrimitiveCollectionFS",sources:[X$m]}),this._sp=r$14.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s})),this._blendOption===S$L.TRANSLUCENT&&(S=new s$V({name:"PointPrimitiveCollectionFS",sources:[X$m]}),this._spTranslucent=r$14.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);var E,P,A,L,M=e.commandList;if(e._fboState.frameBufferType!=Qe$c.CLAMP&&(u.render||c)){var R=this._colorCommands,O=this._blendOption===S$L.OPAQUE,D=this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT;P=(E=this._vaf.va).length,R.length=P;var I=D?2*P:P;for(L=0;L<I;++L){var F=O||D&&L%2==0;e$2e(A=R[L])||(A=R[L]=new i$$),A.primitiveType=W$18.TRIANGLES,A.pass=F||!D?Le$q.OPAQUE:Le$q.TRANSLUCENT,A.owner=this,A.instanceCount=this._pointPrimitives.length;var B=D?Math.floor(L/2):L;A.boundingVolume=b,A.modelMatrix=T,A.shaderProgram=F?this._sp:this._spTranslucent,A.uniformMap=this._uniforms,A.vertexArray=E[B].va,A.renderState=F?this._rsOpaque:this._rsTranslucent,A.debugShowBoundingVolume=this.debugShowBoundingVolume,A.pickId="v_pickColor",M.push(A)}}}},D$s.prototype.isDestroyed=function(){return!1},D$s.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),ue$d(this._pointPrimitives),i$11(this)};var ai$2=new f$1a;function G$w(e,t,i,n,r){if(e$2e(e._labelCollection)&&n._clusterLabels?r=D$R.getScreenSpaceBoundingBox(e,t,r):e$2e(e._billboardCollection)&&n._clusterBillboards?r=n$J.getScreenSpaceBoundingBox(e,t,r):e$2e(e._pointPrimitiveCollection)&&n._clusterPoints&&(r=s$o.getScreenSpaceBoundingBox(e,t,r)),Z$r(r,i),n._clusterLabels&&!e$2e(e._labelCollection)&&e$2e(e.id)&&J$p(n,e.id.id)&&e$2e(e.id._label)){var o=n._collectionIndicesByEntity[e.id.id].labelIndex,a=n._labelCollection.get(o),s=a.getScreenSpaceBoundingBox(a,t,ai$2);Z$r(s,i),r=f$1a.union(r,s,r)}return r}function ui$3(e,t){if(e.clusterShow=!0,!e$2e(e._labelCollection)&&e$2e(e.id)&&J$p(t,e.id.id)&&e$2e(e.id._label)){var i=t._collectionIndicesByEntity[e.id.id].labelIndex;t._labelCollection.get(i).clusterShow=!0}}function hi$3(e,t,i,n){var r={billboard:n._clusterBillboardCollection.add(),label:n._clusterLabelCollection.add(),point:n._clusterPointCollection.add()};r.billboard.show=!1,r.point.show=!1,r.label.show=!0,r.label.text=t.toLocaleString(),r.label.id=i,r.billboard.position=r.label.position=r.point.position=e,n._clusterEvent.raiseEvent(i,r)}function J$p(e,t){return e$2e(e)&&e$2e(e._collectionIndicesByEntity[t])&&e$2e(e._collectionIndicesByEntity[t].labelIndex)}function z$t(e,t,i,n,r){if(e$2e(e))for(var o=e.length,a=0;a<o;++a){var s=e.get(a);if(s.clusterShow=!1,s.show&&(r._scene.mode!==C$14.SCENE3D||n.isPointVisible(s.position))){var l=r._clusterLabels&&e$2e(s._labelCollection),u=r._clusterBillboards&&e$2e(s.id._billboard),c=r._clusterPoints&&e$2e(s.id._point);if(!l||!c&&!u){var h=s.computeScreenSpacePosition(i);!e$2e(h)||t.push({index:a,collection:e,clustered:!1,coord:h})}}}}var _i$4=new f$1a,bi$4=new f$1a,fi$3=new f$1a;function gi$4(e){return function(t){if(!(e$2e(t)&&t<.05)&&e.enabled){var i=e._scene,n=e._labelCollection,r=e._billboardCollection,o=e._pointCollection;if((e$2e(n)||e$2e(r)||e$2e(o))&&(e._clusterBillboards||e._clusterLabels||e._clusterPoints)){var a=e._clusterLabelCollection,s=e._clusterBillboardCollection,l=e._clusterPointCollection;e$2e(a)?a.removeAll():a=e._clusterLabelCollection=new g$W({scene:i}),e$2e(s)?s.removeAll():s=e._clusterBillboardCollection=new w$O({scene:i}),e$2e(l)?l.removeAll():l=e._clusterPointCollection=new D$s;var u=e._pixelRange,c=e._minimumClusterSize;e._previousClusters;var h=[];e._previousHeight;var d=i.camera.positionCartographic.height,f=i.mapProjection.ellipsoid,p=i.camera.positionWC,_=new s$H(f,p),m=[];e._clusterLabels&&z$t(n,m,i,_,e),e._clusterBillboards&&z$t(r,m,i,_,e),e._clusterPoints&&z$t(o,m,i,_,e);var g,x,y,v,$,b,T,C,S,w,E,P=O$D(m,ci$4,di$3,4096,Int32Array);for(y=m.length,g=0;g<y;++g){var A=m[g];if(!A.clustered){A.clustered=!0,w=A.collection,E=A.index;var L=w.get(E);v=G$w(L,A.coord,u,e,_i$4);var M=f$1a.clone(v,bi$4);b=($=P.intersect(v.x,v.y,v.x+v.width,v.y+v.height)).length;var R=o$1p.clone(L.position);S=1,C=[L.id];var O=o$1p.distanceSquared(p,R);for(x=0;x<b;++x)if(!(T=m[$[x]]).clustered){var D=T.collection.get(T.index),I=G$w(D,T.coord,u,e,fi$3);o$1p.distanceSquared(p,D.position)<O&&(R=o$1p.clone(D.position)),f$1a.union(M,I,M),++S,C.push(D.id)}if(S>=c){var F=o$1p.clone(R);for(hi$3(F,S,C,e),h.push({position:F,width:M.width,height:M.height,minimumWidth:v.width,minimumHeight:v.height}),x=0;x<b;++x)m[$[x]].clustered=!0}else ui$3(L,e)}}0===a.length&&(a.destroy(),e._clusterLabelCollection=void 0),0===s.length&&(s.destroy(),e._clusterBillboardCollection=void 0),0===l.length&&(l.destroy(),e._clusterPointCollection=void 0),e._previousClusters=h,e._previousHeight=d}}}}function R$p(e,t,i,n){return function(r){var o=this[e];e$2e(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});var a=this._collectionIndicesByEntity[r.id];if(e$2e(a)||(a=this._collectionIndicesByEntity[r.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),e$2e(o)&&e$2e(a[n]))return o.get(a[n]);e$2e(o)||(o=this[e]=new t({scene:this._scene}));var s,l,u=this[i];return u.length>0?(s=u.pop(),l=o.get(s)):(l=o.add(),s=o.length-1),a[n]=s,this._clusterDirty=!0,l}}function Y$o(e,t){var i=e._collectionIndicesByEntity[t];!e$2e(i.billboardIndex)&&!e$2e(i.labelIndex)&&!e$2e(i.pointIndex)&&delete e._collectionIndicesByEntity[t]}function M$w(e){if(e$2e(e))for(var t=e.length,i=0;i<t;++i)e.get(i).clusterShow=!0}function pi$4(e){e.enabled||(e$2e(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),e$2e(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),e$2e(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,M$w(e._labelCollection),M$w(e._billboardCollection),M$w(e._pointCollection))}function n$o(e){this._name=e,this._clock=void 0,this._changed=new o$1h,this._error=new o$1h,this._isLoading=!1,this._loading=new o$1h,this._entityCollection=new r$v(this),this._entityCluster=new a$r}function K$o(e){this.id=e,this.vertexFormat=void 0,this.slices=void 0,this.offsetAttribute=void 0}a$r.prototype._initialize=function(e){this._scene=e;var t=gi$4(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)},Object.defineProperties(a$r.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}}}),a$r.prototype.getLabel=R$p("_labelCollection",g$W,"_unusedLabelIndices","labelIndex"),a$r.prototype.removeLabel=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(e$2e(this._labelCollection)&&e$2e(t)&&e$2e(t.labelIndex)){var i=t.labelIndex;t.labelIndex=void 0,Y$o(this,e.id);var n=this._labelCollection.get(i);n.show=!1,n.text="",n.id=void 0,this._unusedLabelIndices.push(i),this._clusterDirty=!0}},a$r.prototype.getBillboard=R$p("_billboardCollection",w$O,"_unusedBillboardIndices","billboardIndex"),a$r.prototype.removeBillboard=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(e$2e(this._billboardCollection)&&e$2e(t)&&e$2e(t.billboardIndex)){var i=t.billboardIndex;t.billboardIndex=void 0,Y$o(this,e.id);var n=this._billboardCollection.get(i);n.id=void 0,n.show=!1,n.image=void 0,this._unusedBillboardIndices.push(i),this._clusterDirty=!0}},a$r.prototype.getPoint=R$p("_pointCollection",D$s,"_unusedPointIndices","pointIndex"),a$r.prototype.removePoint=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(e$2e(this._pointCollection)&&e$2e(t)&&e$2e(t.pointIndex)){var i=t.pointIndex;t.pointIndex=void 0,Y$o(this,e.id);var n=this._pointCollection.get(i);n.show=!1,n.id=void 0,this._unusedPointIndices.push(i),this._clusterDirty=!0}},a$r.prototype.update=function(e){var t;e$2e(this._labelCollection)&&this._labelCollection.length>0&&0===this._labelCollection.get(0)._glyphs.length&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),e$2e(this._billboardCollection)&&this._billboardCollection.length>0&&!e$2e(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,pi$4(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),e$2e(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),e$2e(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),e$2e(this._clusterPointCollection)&&this._clusterPointCollection.update(e),e$2e(this._labelCollection)&&this._labelCollection.update(e),e$2e(this._billboardCollection)&&this._billboardCollection.update(e),e$2e(this._pointCollection)&&this._pointCollection.update(e)},a$r.prototype.destroy=function(){this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),e$2e(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1},Object.defineProperties(n$o.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){o$B.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2e(e))throw new t$15("value must be defined.");this._entityCluster=e}}});var N$o=new i$W("ruleModeling"),i$w={unResolved:0,parsing:1,resolved:2,failed:3};function m$s(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new K$o(e),geometryPropertyName:"geometry",observedPropertyNames:["loftParam","geometry","children","orientation","scale","position"]}),this.asynchronous=!1,this.twoPasses=!0,this.wrapS=q$1a.REPEAT,this.wrapT=q$1a.REPEAT,this.compressVertices=!1;var i=this;e$2e(e.geometry)&&(e.geometry.outlineWidth=new e$1L(e.geometry.outlineWidth||1),this._outline=new e$1L(e.geometry.outline||!1),Object.defineProperties(e.geometry,{outline:{get:function(){return i._outline},set:function(t){t!==i._outline&&(!0===t?(i._outline.setValue(!0),e.geometry.outlineWidth=new e$1L(e.geometry.outlineWidth||1),i._onEntityPropertyChanged(e,"geometry",e.geometry,void 0)):i._outline.setValue(!1))}}})),this._onEntityPropertyChanged(e,"geometry",e.geometry,void 0),this.geometryState=i$w.unResolved,this.outlineState=i$w.unResolved}function Q$r(e,t){var i={attrLocation:{aPosition:0},vertexAttributes:[{componentsPerAttribute:3,typedArray:new Float32Array(e)}]},n=[{indexType:1,indicesTypedArray:new Uint32Array(t)}];return _0x28a85f.createEdgeData(i,n)}e$2e(Object.create)&&(m$s.prototype=Object.create(i$G.prototype),m$s.prototype.constructor=m$s),Object.defineProperties(m$s.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),m$s.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");if(this._options.instance instanceof d$1o)return this._options.instance;if(this.geometryState===i$w.unResolved){var t=N$o.scheduleTask({loftParam:this._options.loftParam,linearExtrudeParam:this._options.linearExtrudeParam,rotateExtrudeParam:this._options.rotateExtrudeParam},[]);if(!e$2e(t))return"unResolve";this.geometryState=i$w.parsing;var i=this;return t.then((function(t){if("notReady"!==t){if(!e$2e(t))return i.geometry=null,void(i.geometryState=i$w.resolved);var n,r,o=[],a=i._entity;n=e$2e(a.orientation)?a.orientation.getValue(e):{heading:0,pitch:0,roll:0},r=e$2e(a.scale)?a.scale.getValue(e):{x:1,y:1,z:1};for(var s=0;s<t.length;s++){var l=t[s].vertex.typedArray,u=t[s].indices.typedArray,c=t[s].normal,h=t[s].uv,d=t[s].position,f=a.isAvailable(e);(!e$2e(a.position)||!e$2e(a.position.getValue(e)))&&(a.position=d);var p=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:new Float64Array(l)}),normal:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:new Float32Array(c)}),st:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:new Float32Array(h)})});0===h.length&&delete p.st;var _=i$1d.fromVertices(new Float64Array(l),new o$1p(0,0,0),3),m=new I$1p({attributes:p,indices:u,primitiveType:W$18.TRIANGLES,boundingSphere:_});0===c.length&&(m=k$14.computeNormal(m)),d=a.position.getValue(e);var g=m$19.headingPitchRollToFixedFrame(o$1p.fromDegrees(d.x,d.y,d.z),new i$16(n.heading,n.pitch,n.roll),t$12.WGS84,m$19.eastNorthUpToFixedFrame);p$1d.multiplyByScale(g,r,g),o.push(new d$1o({id:a,geometry:m,modelMatrix:g,attributes:{show:new e$1I(f&&a.isShowing&&i._showProperty.getValue(e))}}))}if(o.length>1){var x=[];for(s=0;s<o.length;s++){var y=new a$R(a.geometry.material);y._unique=!0;var v=new h$W({geometry:{instance:o[s],material:y}});v.position=d,x.push(v)}a.children=x,i.geometry=null,i.geometryState=i$w.resolved}else i.geometry=o[0],i.geometryState=i$w.resolved}else i.geometryState=i$w.unResolved})).otherwise((function(){i.geometryState=i$w.failed})),"unResolve"}return this.geometryState===i$w.parsing?"unResolve":this.geometryState===i$w.failed?null:this.geometry},m$s.prototype.createOutlineGeometryInstance=function(e){var t,i,n,r=this._options.loftParam,o=this._options.linearExtrudeParam,a=this._options.rotateExtrudeParam;if(this.outlineState===i$w.unResolved){if(e$2e(r)){var s={createTexCoord:r.buildParam.createTexCoord,generateNormal:r.buildParam.generateNormal,group:!0,att:r.buildParam.att,splitSegment:r.buildParam.splitSegment,splitSide:r.buildParam.splitSide,chamferFactor:r.buildParam.chamferFactor,segmentClosed:r.buildParam.segmentClosed,normalAngle:r.buildParam.normalAngle};t={line:r.line,region:r.region,buildParam:s,uvwParam:r.uvwParam}}else if(e$2e(o)){s={createTexCoord:o.buildParam.createTexCoord,generateNormal:o.buildParam.generateNormal,group:!0,att:o.buildParam.att,height:o.buildParam.height,scaleX:o.buildParam.scaleX,scaleY:o.buildParam.scaleY,normalAngle:o.buildParam.normalAngle};i={region:o.region,buildParam:s,uvwParam:o.uvwParam}}else if(e$2e(a)){s={createTexCoord:a.buildParam.createTexCoord,generateNormal:a.buildParam.generateNormal,group:!0,att:a.buildParam.att,normalAngle:a.buildParam.normalAngle,slices:a.buildParam.slices,angle:a.buildParam.angle};n={region:a.geometry,buildParam:s,uvwParam:a.uvwParam}}var l=N$o.scheduleTask({loftParam:t,linearExtrudeParam:i,rotateExtrudeParam:n},[]);if(!e$2e(l))return this.createOutlineGeometryInstance();this.outlineState=i$w.parsing;var u=this;l.then((function(e){if("notReady"===e)return u.outlineState=i$w.unResolved,void u.createOutlineGeometryInstance();var t=e[0].vertex.typedArray,i=e[0].indices.typedArray,n=u._entity,r=Q$r(t,i),o=i$1d.fromVertices(new Float64Array(t),new o$1p(0,0,0),3);n.boundingSphere=o,n.edgedata=r,u.outlineState=i$w.resolved}))}return null},m$s.prototype._isDynamic=function(e,t){return!1},m$s.prototype.isOutlineVisible=function(e){return!0},m$s.prototype._setStaticOptions=function(e,t){var i=this._options;i.loftParam=t.loftParam,i.linearExtrudeParam=t.linearExtrudeParam,i.rotateExtrudeParam=t.rotateExtrudeParam,i.instance=t.instance},m$s.prototype._onEntityPropertyChanged=a$B;var P$r=o$1p.ZERO,U$t=new o$1p,N$n=new o$1p,D$r=new e$1X;function x$x(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function s$n(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new x$x(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}function f$y(e,t,i){a$C.call(this,e,t,i)}function e$z(){this._definitionChanged=new o$1h,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}e$2e(Object.create)&&(s$n.prototype=Object.create(i$G.prototype),s$n.prototype.constructor=s$n),Object.defineProperties(s$n.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),s$n.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:t$A.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,D$r)),e$2e(t)||(t=e$1X.WHITE),a.color=o$16.fromColor(t));return e$2e(this._options.offsetAttribute)&&(a.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,P$r,U$t))),new d$1o({id:i,geometry:new l$Q(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:a})},s$n.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,D$r),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r),offset:void 0};return e$2e(this._options.offsetAttribute)&&(o.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,P$r,U$t))),new d$1o({id:t,geometry:new d$Z(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:o})},s$n.prototype._computeCenter=function(e,t){return r$_.getValueOrUndefined(this._entity.position,e,t)},s$n.prototype._isHidden=function(e,t){return!e$2e(e.position)||!e$2e(t.length)||!e$2e(t.topRadius)||!e$2e(t.bottomRadius)||i$G.prototype._isHidden.call(this,e,t)},s$n.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$_.isConstant(e.orientation)&&t.length.isConstant&&t.topRadius.isConstant&&t.bottomRadius.isConstant&&r$_.isConstant(t.slices)&&r$_.isConstant(t.outlineWidth)&&r$_.isConstant(t.numberOfVerticalLines))},s$n.prototype._setStaticOptions=function(e,t){var i=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$P?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,n.length=t.length.getValue(o$I.MINIMUM_VALUE),n.topRadius=t.topRadius.getValue(o$I.MINIMUM_VALUE),n.bottomRadius=t.bottomRadius.getValue(o$I.MINIMUM_VALUE),n.slices=r$_.getValueOrUndefined(t.slices,o$I.MINIMUM_VALUE),n.numberOfVerticalLines=r$_.getValueOrUndefined(t.numberOfVerticalLines,o$I.MINIMUM_VALUE),n.offsetAttribute=i!==k$R.NONE?_0x39c22a.ALL:void 0},s$n.prototype._onEntityPropertyChanged=a$B,s$n.DynamicGeometryUpdater=f$y,e$2e(Object.create)&&(f$y.prototype=Object.create(a$C.prototype),f$y.prototype.constructor=f$y),f$y.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2e(r$_.getValueOrUndefined(e.position,i,N$n))||!e$2e(n.length)||!e$2e(n.topRadius)||!e$2e(n.bottomRadius)||a$C.prototype._isHidden.call(this,e,t,i)},f$y.prototype._setOptions=function(e,t,i){var n=r$_.getValueOrDefault(t.heightReference,i,k$R.NONE),r=this._options;r.length=r$_.getValueOrUndefined(t.length,i),r.topRadius=r$_.getValueOrUndefined(t.topRadius,i),r.bottomRadius=r$_.getValueOrUndefined(t.bottomRadius,i),r.slices=r$_.getValueOrUndefined(t.slices,i),r.numberOfVerticalLines=r$_.getValueOrUndefined(t.numberOfVerticalLines,i),r.offsetAttribute=n!==k$R.NONE?_0x39c22a.ALL:void 0},Object.defineProperties(e$z.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:c$X("startTime"),stopTime:c$X("stopTime"),currentTime:c$X("currentTime"),clockRange:c$X("clockRange"),clockStep:c$X("clockStep"),multiplier:c$X("multiplier")}),e$z.prototype.clone=function(e){return e$2e(e)||(e=new e$z),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e},e$z.prototype.equals=function(e){return this===e||e$2e(e)&&a$15.equals(this.startTime,e.startTime)&&a$15.equals(this.stopTime,e.stopTime)&&a$15.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier},e$z.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.startTime=u$Z(this.startTime,e.startTime),this.stopTime=u$Z(this.stopTime,e.stopTime),this.currentTime=u$Z(this.currentTime,e.currentTime),this.clockRange=u$Z(this.clockRange,e.clockRange),this.clockStep=u$Z(this.clockStep,e.clockStep),this.multiplier=u$Z(this.multiplier,e.multiplier)},e$z.prototype.getValue=function(e){return e$2e(e)||(e=new u$H),e.startTime=u$Z(this.startTime,e.startTime),e.stopTime=u$Z(this.stopTime,e.stopTime),e.currentTime=u$Z(this.currentTime,e.currentTime),e.clockRange=u$Z(this.clockRange,e.clockRange),e.multiplier=u$Z(this.multiplier,e.multiplier),e.clockStep=u$Z(this.clockStep,e.clockStep),e};var h$z=e$1X.WHITE,u$u=.1,c$p=new o$1o(8,8),d$D=new o$1o(0,0),p$r=new o$1o(1,1);function t$o(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}function t$n(e){this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(t$o.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)&&r$_.isConstant(this._cellAlpha)&&r$_.isConstant(this._lineCount)&&r$_.isConstant(this._lineThickness)&&r$_.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color"),cellAlpha:C$10("cellAlpha"),lineCount:C$10("lineCount"),lineThickness:C$10("lineThickness"),lineOffset:C$10("lineOffset")}),t$o.prototype.getType=function(e){return"Grid"},t$o.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,h$z,t.color),t.cellAlpha=r$_.getValueOrDefault(this._cellAlpha,e,u$u),t.lineCount=r$_.getValueOrClonedDefault(this._lineCount,e,c$p,t.lineCount),t.lineThickness=r$_.getValueOrClonedDefault(this._lineThickness,e,p$r,t.lineThickness),t.lineOffset=r$_.getValueOrClonedDefault(this._lineOffset,e,d$D,t.lineOffset),t},t$o.prototype.equals=function(e){return this===e||e instanceof t$o&&r$_.equals(this._color,e._color)&&r$_.equals(this._cellAlpha,e._cellAlpha)&&r$_.equals(this._lineCount,e._lineCount)&&r$_.equals(this._lineThickness,e._lineThickness)&&r$_.equals(this._lineOffset,e._lineOffset)},Object.defineProperties(t$n.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color")}),t$n.prototype.getType=function(e){return"PolylineArrow"},t$n.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,e$1X.WHITE,t.color),t},t$n.prototype.equals=function(e){return this===e||e instanceof t$n&&r$_.equals(this._color,e._color)};var d$C=e$1X.WHITE,l$C=e$1X.TRANSPARENT,f$x=16,g$z=255;function o$A(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=e.color,this.gapColor=e.gapColor,this.dashLength=e.dashLength,this.dashPattern=e.dashPattern}Object.defineProperties(o$A.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)&&r$_.isConstant(this._gapColor)&&r$_.isConstant(this._dashLength)&&r$_.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color"),gapColor:C$10("gapColor"),dashLength:C$10("dashLength"),dashPattern:C$10("dashPattern")}),o$A.prototype.getType=function(e){return"PolylineDash"},o$A.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,d$C,t.color),t.gapColor=r$_.getValueOrClonedDefault(this._gapColor,e,l$C,t.gapColor),t.dashLength=r$_.getValueOrDefault(this._dashLength,e,f$x,t.dashLength),t.dashPattern=r$_.getValueOrDefault(this._dashPattern,e,g$z,t.dashPattern),t},o$A.prototype.equals=function(e){return this===e||e instanceof o$A&&r$_.equals(this._color,e._color)&&r$_.equals(this._gapColor,e._gapColor)&&r$_.equals(this._dashLength,e._dashLength)&&r$_.equals(this._dashPattern,e._dashPattern)};var f$w=e$1X.WHITE,p$q=.25,P$q=1;function t$m(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower,this.taperPower=e.taperPower}Object.defineProperties(t$m.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)&&r$_.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color"),glowPower:C$10("glowPower"),taperPower:C$10("taperPower")}),t$m.prototype.getType=function(e){return"PolylineGlow"},t$m.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,f$w,t.color),t.glowPower=r$_.getValueOrDefault(this._glowPower,e,p$q,t.glowPower),t.taperPower=r$_.getValueOrDefault(this._taperPower,e,P$q,t.taperPower),t},t$m.prototype.equals=function(e){return this===e||e instanceof t$m&&r$_.equals(this._color,e._color)&&r$_.equals(this._glowPower,e._glowPower)&&r$_.equals(this._taperPower,e._taperPower)};var f$v=e$1X.WHITE,h$y=e$1X.BLACK,a$q=1;function e$y(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}function n$n(e,t){this._value=void 0,this._definitionChanged=new o$1h,this._eventHelper=new n$x,this._referenceFrame=u$Z(t,Re$l.FIXED),this.setValue(e)}function i$v(e){this._value=void 0,this._definitionChanged=new o$1h,this._eventHelper=new n$x,this.setValue(e)}function s$m(e){var t=e._targetProperty;if(!e$2e(t)){var i=e._targetEntity;if(!e$2e(i)){if(!e$2e(i=e._targetCollection.getById(e._targetId)))return void(e._targetEntity=e._targetProperty=void 0);i.definitionChanged.addEventListener(a$p.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=i}var n=e._targetPropertyNames;t=e._targetEntity;for(var r=0,o=n.length;r<o&&e$2e(t);++r)t=t[n[r]];e._targetProperty=t}return t}function a$p(e,t,i){if(!e$2e(e))throw new t$15("targetCollection is required.");if(!e$2e(t)||""===t)throw new t$15("targetId is required.");if(!e$2e(i)||0===i.length)throw new t$15("targetPropertyNames is required.");for(var n=0;n<i.length;n++){var r=i[n];if(!e$2e(r)||""===r)throw new t$15("reference contains invalid properties.")}this._targetCollection=e,this._targetId=t,this._targetPropertyNames=i,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new o$1h,e.collectionChanged.addEventListener(a$p.prototype._onCollectionChanged,this)}Object.defineProperties(e$y.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)&&r$_.isConstant(this._outlineColor)&&r$_.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth")}),e$y.prototype.getType=function(e){return"PolylineOutline"},e$y.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,f$v,t.color),t.outlineColor=r$_.getValueOrClonedDefault(this._outlineColor,e,h$y,t.outlineColor),t.outlineWidth=r$_.getValueOrDefault(this._outlineWidth,e,a$q),t},e$y.prototype.equals=function(e){return this===e||e instanceof e$y&&r$_.equals(this._color,e._color)&&r$_.equals(this._outlineColor,e._outlineColor)&&r$_.equals(this._outlineWidth,e._outlineWidth)},Object.defineProperties(n$n.prototype,{isConstant:{get:function(){var e=this._value;if(!e$2e(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!r$_.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),n$n.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$l.FIXED,t)},n$n.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2e(e))throw new t$15("time is required.");if(!e$2e(t))throw new t$15("referenceFrame is required.");var n=this._value;if(e$2e(n)){var r=n.length;e$2e(i)||(i=new Array(r));for(var o=0,a=0;o<r;){var s=n[o].getValueInReferenceFrame(e,t,i[o]);e$2e(s)&&(i[a]=s,a++),o++}return i.length=a,i}},n$n.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),e$2e(e)){this._value=e.slice();for(var i=e.length,n=0;n<i;n++){var r=e[n];e$2e(r)&&t.add(r.definitionChanged,n$n.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},n$n.prototype.equals=function(e){return this===e||e instanceof n$n&&this._referenceFrame===e._referenceFrame&&r$_.arrayEquals(this._value,e._value)},n$n.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(i$v.prototype,{isConstant:{get:function(){var e=this._value;if(!e$2e(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!r$_.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),i$v.prototype.getValue=function(e,t){if(!e$2e(e))throw new t$15("time is required.");var i=this._value;if(e$2e(i)){var n=i.length;e$2e(t)||(t=new Array(n));for(var r=0,o=0;r<n;){var a=this._value[r].getValue(e,t[r]);e$2e(a)&&(t[o]=a,o++),r++}return t.length=o,t}},i$v.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),e$2e(e)){this._value=e.slice();for(var i=e.length,n=0;n<i;n++){var r=e[n];e$2e(r)&&t.add(r.definitionChanged,i$v.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},i$v.prototype.equals=function(e){return this===e||e instanceof i$v&&r$_.arrayEquals(this._value,e._value)},i$v.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(a$p.prototype,{isConstant:{get:function(){return r$_.isConstant(s$m(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){var e=s$m(this);return e$2e(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return s$m(this)}}}),a$p.fromString=function(e,t){if(!e$2e(e))throw new t$15("targetCollection is required.");if(!e$2e(t))throw new t$15("referenceString is required.");for(var i,n=[],r=!0,o=!1,a="",s=0;s<t.length;++s){var l=t.charAt(s);o?(a+=l,o=!1):"\\"===l?o=!0:r&&"#"===l?(i=a,r=!1,a=""):r||"."!==l?a+=l:(n.push(a),a="")}return n.push(a),new a$p(e,i,n)},a$p.prototype.getValue=function(e,t){var i=s$m(this);return e$2e(i)?i.getValue(e,t):void 0},a$p.prototype.getValueInReferenceFrame=function(e,t,i){var n=s$m(this);return e$2e(n)?n.getValueInReferenceFrame(e,t,i):void 0},a$p.prototype.getType=function(e){var t=s$m(this);return e$2e(t)?t.getType(e):void 0},a$p.prototype.equals=function(e){if(this===e)return!0;var t=this._targetPropertyNames,i=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==i.length)return!1;for(var n=this._targetPropertyNames.length,r=0;r<n;r++)if(t[r]!==i[r])return!1;return!0},a$p.prototype._onTargetEntityDefinitionChanged=function(e,t,i,n){e$2e(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))},a$p.prototype._onCollectionChanged=function(e,t,i){var n=this._targetEntity;e$2e(n)&&-1!==i.indexOf(n)?(n.definitionChanged.removeEventListener(a$p.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):e$2e(n)||e$2e(n=s$m(this))&&this._definitionChanged.raiseEvent(this)};var m$r={packedLength:1,pack:function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return t[i=u$Z(i,0)]=e,t},unpack:function(e,t,i){if(!e$2e(e))throw new t$15("array is required");return e[t=u$Z(t,0)]},convertPackedArrayForInterpolation:function(e,t,i,n){if(!e$2e(e))throw new t$15("packedArray is required");t=u$Z(t,0);for(var r,o=0,a=(i=u$Z(i,e.length))-t+1;o<a;o++){var s=e[t+o];0===o||Math.abs(r-s)<Math.PI?n[o]=s:n[o]=s-e$2d.TWO_PI,r=s}},unpackInterpolationResult:function(e,t,i,n,r){if(!e$2e(e))throw new t$15("array is required");if(!e$2e(t))throw new t$15("sourceArray is required");return(r=e[0])<0?r+e$2d.TWO_PI:r}},j$u={packedLength:1,pack:function(e,t,i){t[i=u$Z(i,0)]=e},unpack:function(e,t,i){return e[t=u$Z(t,0)]}};function J$o(e,t,i){var n,r=e.length,o=i.length,a=r+o;if(e.length=a,r!==t){var s=r-1;for(n=a-1;n>=t;n--)e[n]=e[s--]}for(n=0;n<o;n++)e[t++]=i[n]}function Z$q(e,t){return e instanceof a$15?e:"string"==typeof e?a$15.fromIso8601(e):a$15.addSeconds(t,e,new a$15)}var P$p=[],q$s=[];function S$r(e,t,i,n,r){for(var o,a,s,l,u,c,h=0;h<n.length;){var d=0,f=0;if((s=a$17(t,u=Z$q(n[h],e),a$15.compare))<0){for(l=(s=~s)*r,a=void 0,c=t[s];h<n.length&&(u=Z$q(n[h],e),!(e$2e(a)&&a$15.compare(a,u)>=0||e$2e(c)&&a$15.compare(u,c)>=0));){for(P$p[d++]=u,h+=1,o=0;o<r;o++)q$s[f++]=n[h],h+=1;a=u}d>0&&(q$s.length=f,J$o(i,l,q$s),P$p.length=d,J$o(t,s,P$p))}else{for(o=0;o<r;o++)h++,i[s*r+o]=n[h];h++}}}function g$y(e,t){o$1q.defined("type",e);var i=e;i===Number&&(i=j$u);var n,r=i.packedLength,o=u$Z(i.packedInterpolationLength,r),a=0;if(e$2e(t)){var s=t.length;n=new Array(s);for(var l=0;l<s;l++){var u=t[l];u===Number&&(u=j$u);var c=u.packedLength;r+=c,o+=u$Z(u.packedInterpolationLength,c),n[l]=u}a=s}this._type=e,this._innerType=i,this._interpolationDegree=1,this._interpolationAlgorithm=v$A,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=r,this._packedInterpolationLength=o,this._updateTableLength=!0,this._interpolationResult=new Array(o),this._definitionChanged=new o$1h,this._derivativeTypes=t,this._innerDerivativeTypes=n,this._inputOrder=a,this._forwardExtrapolationType=_0x1015ec.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=_0x1015ec.NONE,this._backwardExtrapolationDuration=0}function z$s(e,t,i){var n=e._packedLength;e._times.splice(t,i),e._values.splice(t*n,i*n),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}function o$z(e,t){var i;if((t=u$Z(t,0))>0){i=new Array(t);for(var n=0;n<t;n++)i[n]=o$1p}this._numberOfDerivatives=t,this._property=new g$y(o$1p,i),this._definitionChanged=new o$1h,this._referenceFrame=u$Z(e,Re$l.FIXED),this._property._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)}Object.defineProperties(g$y.prototype,{isConstant:{get:function(){return 0===this._values.length}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}}),g$y.prototype.getValue=function(e,t){o$1q.defined("time",e);var i=this._times,n=i.length;if(0!==n){var r,o=this._innerType,a=this._values,s=a$17(i,e,a$15.compare);if(s<0){if(0===(s=~s)){var l=i[s];if(r=this._backwardExtrapolationDuration,this._backwardExtrapolationType===_0x1015ec.NONE||0!==r&&a$15.secondsDifference(l,e)>r)return;if(this._backwardExtrapolationType===_0x1015ec.HOLD)return o.unpack(a,0,t)}if(s>=n){var u=i[s=n-1];if(r=this._forwardExtrapolationDuration,this._forwardExtrapolationType===_0x1015ec.NONE||0!==r&&a$15.secondsDifference(e,u)>r)return;if(this._forwardExtrapolationType===_0x1015ec.HOLD)return s=n-1,o.unpack(a,s*o.packedLength,t)}var c=this._xTable,h=this._yTable,d=this._interpolationAlgorithm,f=this._packedInterpolationLength,p=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;var _=Math.min(d.getRequiredDataPoints(this._interpolationDegree,p),n);_!==this._numberOfPoints&&(this._numberOfPoints=_,c.length=_,h.length=_*f)}var m=this._numberOfPoints-1;if(m<1)return;var g=0,x=n-1;if(x-g+1>=m+1){var y=s-(m/2|0)-1;y<g&&(y=g);var v=y+m;v>x&&((y=(v=x)-m)<g&&(y=g)),g=y,x=v}for(var $=x-g+1,b=0;b<$;++b)c[b]=a$15.secondsDifference(i[g+b],i[x]);if(e$2e(o.convertPackedArrayForInterpolation))o.convertPackedArrayForInterpolation(a,g,x,h);else for(var T=0,C=this._packedLength,S=g*C,w=(x+1)*C;S<w;)h[T]=a[S],S++,T++;var E,P=a$15.secondsDifference(e,i[x]);if(0!==p&&e$2e(d.interpolate)){var A=Math.floor(f/(p+1));E=d.interpolate(P,c,h,A,p,p,this._interpolationResult)}else E=d.interpolateOrderZero(P,c,h,f,this._interpolationResult);return e$2e(o.unpackInterpolationResult)?o.unpackInterpolationResult(E,a,g,x,t):o.unpack(E,0,t)}return o.unpack(a,s*this._packedLength,t)}},g$y.prototype.setInterpolationOptions=function(e){if(e$2e(e)){var t=!1,i=e.interpolationAlgorithm,n=e.interpolationDegree;e$2e(i)&&this._interpolationAlgorithm!==i&&(this._interpolationAlgorithm=i,t=!0),e$2e(n)&&this._interpolationDegree!==n&&(this._interpolationDegree=n,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this))}},g$y.prototype.addSample=function(e,t,i){var n=this._innerDerivativeTypes,r=e$2e(n);o$1q.defined("time",e),o$1q.defined("value",t),r&&o$1q.defined("derivatives",i);var o=this._innerType,a=[];if(a.push(e),o.pack(t,a,a.length),r)for(var s=n.length,l=0;l<s;l++)n[l].pack(i[l],a,a.length);S$r(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$y.prototype.addSamples=function(e,t,i){var n=this._innerDerivativeTypes,r=e$2e(n);if(o$1q.defined("times",e),o$1q.defined("values",t),e.length!==t.length)throw new t$15("times and values must be the same length.");if(r&&(!e$2e(i)||i.length!==e.length))throw new t$15("times and derivativeValues must be the same length.");for(var o=this._innerType,a=e.length,s=[],l=0;l<a;l++)if(s.push(e[l]),o.pack(t[l],s,s.length),r)for(var u=i[l],c=n.length,h=0;h<c;h++)n[h].pack(u[h],s,s.length);S$r(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$y.prototype.addSamplesPackedArray=function(e,t){o$1q.defined("packedSamples",e),S$r(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$y.prototype.removeSample=function(e){o$1q.defined("time",e);var t=a$17(this._times,e,a$15.compare);return!(t<0)&&(z$s(this,t,1),!0)},g$y.prototype.removeSamples=function(e){o$1q.defined("timeInterval",e);var t=this._times,i=a$17(t,e.start,a$15.compare);i<0?i=~i:e.isStartIncluded||++i;var n=a$17(t,e.stop,a$15.compare);n<0?n=~n:e.isStopIncluded&&++n,z$s(this,i,n-i)},g$y.prototype.equals=function(e){if(this===e)return!0;if(!e$2e(e)||this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;var t,i,n=this._derivativeTypes,r=e$2e(n),o=e._derivativeTypes;if(r!==e$2e(o))return!1;if(r){if((i=n.length)!==o.length)return!1;for(t=0;t<i;t++)if(n[t]!==o[t])return!1}var a=this._times,s=e._times;if((i=a.length)!==s.length)return!1;for(t=0;t<i;t++)if(!a$15.equals(a[t],s[t]))return!1;var l=this._values,u=e._values;for(t=0;t<i;t++)if(l[t]!==u[t])return!1;return!0},g$y._mergeNewSamples=S$r,Object.defineProperties(o$z.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}}),o$z.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$l.FIXED,t)},o$z.prototype.getValueInReferenceFrame=function(e,t,i){if(o$1q.defined("time",e),o$1q.defined("referenceFrame",t),e$2e(i=this._property.getValue(e,i)))return t$J.convertToReferenceFrame(e,i,this._referenceFrame,t,i)},o$z.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)},o$z.prototype.addSample=function(e,t,i){var n=this._numberOfDerivatives;if(n>0&&(!e$2e(i)||i.length!==n))throw new t$15("derivatives length must be equal to the number of derivatives.");this._property.addSample(e,t,i)},o$z.prototype.addSamples=function(e,t,i){this._property.addSamples(e,t,i)},o$z.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)},o$z.prototype.removeSample=function(e){this._property.removeSample(e)},o$z.prototype.removeSamples=function(e){this._property.removeSamples(e)},o$z.prototype.equals=function(e){return this===e||e instanceof o$z&&r$_.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var e$x={HORIZONTAL:0,VERTICAL:1},mr$2=Object.freeze(e$x),l$B=mr$2.HORIZONTAL,u$t=e$1X.WHITE,C$v=e$1X.BLACK,p$p=0,_$p=1;function i$u(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}function t$l(e){this._definitionChanged=new o$1h,this._intervals=new c$A,this._intervals.changedEvent.addEventListener(t$l.prototype._intervalsChanged,this),this._referenceFrame=u$Z(e,Re$l.FIXED)}function t$k(){this._definitionChanged=new o$1h,this._intervals=new c$A,this._intervals.changedEvent.addEventListener(t$k.prototype._intervalsChanged,this)}function r$u(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new o$1h,this._normalize=u$Z(t,!0),this.position=e}Object.defineProperties(i$u.prototype,{isConstant:{get:function(){return r$_.isConstant(this._orientation)&&r$_.isConstant(this._evenColor)&&r$_.isConstant(this._oddColor)&&r$_.isConstant(this._offset)&&r$_.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:C$10("orientation"),evenColor:C$10("evenColor"),oddColor:C$10("oddColor"),offset:C$10("offset"),repeat:C$10("repeat")}),i$u.prototype.getType=function(e){return"Stripe"},i$u.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.horizontal=r$_.getValueOrDefault(this._orientation,e,l$B)===mr$2.HORIZONTAL,t.evenColor=r$_.getValueOrClonedDefault(this._evenColor,e,u$t,t.evenColor),t.oddColor=r$_.getValueOrClonedDefault(this._oddColor,e,C$v,t.oddColor),t.offset=r$_.getValueOrDefault(this._offset,e,p$p),t.repeat=r$_.getValueOrDefault(this._repeat,e,_$p),t},i$u.prototype.equals=function(e){return this===e||e instanceof i$u&&r$_.equals(this._orientation,e._orientation)&&r$_.equals(this._evenColor,e._evenColor)&&r$_.equals(this._oddColor,e._oddColor)&&r$_.equals(this._offset,e._offset)&&r$_.equals(this._repeat,e._repeat)},Object.defineProperties(t$l.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}}),t$l.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$l.FIXED,t)},t$l.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2e(e))throw new t$15("time is required.");if(!e$2e(t))throw new t$15("referenceFrame is required.");var n=this._intervals.findDataForIntervalContainingDate(e);if(e$2e(n))return t$J.convertToReferenceFrame(e,n,this._referenceFrame,t,i)},t$l.prototype.equals=function(e){return this===e||e instanceof t$l&&this._intervals.equals(e._intervals,r$_.equals)&&this._referenceFrame===e._referenceFrame},t$l.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(t$k.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),t$k.prototype.getValue=function(e,t){if(!e$2e(e))throw new t$15("time is required");var i=this._intervals.findDataForIntervalContainingDate(e);return e$2e(i)&&"function"==typeof i.clone?i.clone(t):i},t$k.prototype.equals=function(e){return this===e||e instanceof t$k&&this._intervals.equals(e._intervals,r$_.equals)},t$k.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(r$u.prototype,{isConstant:{get:function(){return r$_.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){var t=this._position;t!==e&&(e$2e(t)&&this._subscription(),this._position=e,e$2e(e)&&(this._subscription=e._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(e){this._normalize!==e&&(this._normalize=e,this._definitionChanged.raiseEvent(this))}}});var C$u=new o$1p,c$o=new o$1p,_$o=new a$15,p$o=1/60;function e$w(e,t){this._velocityVectorProperty=new r$u(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new o$1h,this.ellipsoid=u$Z(t,t$12.WGS84);var i=this;this._velocityVectorProperty.definitionChanged.addEventListener((function(){i._definitionChanged.raiseEvent(i)}))}r$u.prototype.getValue=function(e,t){return this._getValue(e,t)},r$u.prototype._getValue=function(e,t,i){if(!e$2e(e))throw new t$15("time is required");e$2e(t)||(t=new o$1p);var n=this._position;if(r$_.isConstant(n))return this._normalize?void 0:o$1p.clone(o$1p.ZERO,t);var r=n.getValue(e,C$u),o=n.getValue(a$15.addSeconds(e,p$o,_$o),c$o);if(e$2e(r)&&(e$2e(o)||(o=r,e$2e(r=n.getValue(a$15.addSeconds(e,-p$o,_$o),c$o))))){if(o$1p.equals(r,o))return this._normalize?void 0:o$1p.clone(o$1p.ZERO,t);e$2e(i)&&r.clone(i);var a=o$1p.subtract(o,r,t);return this._normalize?o$1p.normalize(a,t):o$1p.divideByScalar(a,p$o,t)}},r$u.prototype.equals=function(e){return this===e||e instanceof r$u&&r$_.equals(this._position,e._position)},Object.defineProperties(e$w.prototype,{isConstant:{get:function(){return r$_.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){this._ellipsoid!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var s$l=new o$1p,m$q=new o$1p,l$A=new p$1e,xr$3;function y$t(){}function U$s(e,t){return"#"===t[0]&&(t=xr$3+t),a$p.fromString(e,t)}function Kr$2(e,t,i){if(e$2e(i.reference))return U$s(t,i.reference);if(e$2e(i.velocityReference)){var n=U$s(t,i.velocityReference);switch(e){case o$1p:case y$t:return new r$u(n,e===y$t);case n$15:return new e$w(n)}}throw new t$13(JSON.stringify(i)+" is not valid CZML.")}function Ye$6(e,t){return new n$X((function(i,n){return t(e.getValue(i,n))}),e.isConstant)}e$w.prototype.getValue=function(e,t){var i=this._velocityVectorProperty._getValue(e,m$q,s$l);if(e$2e(i))return m$19.rotationMatrixFromPositionVelocity(s$l,i,this._ellipsoid,l$A),n$15.fromRotationMatrix(l$A,t)},e$w.prototype.equals=function(e){return this===e||e instanceof e$w&&r$_.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))},y$t.packedLength=o$1p.packedLength,y$t.unpack=o$1p.unpack,y$t.pack=o$1p.pack;var g$x=new o$1p,B$p=new c$B,x$w=new a$18,Y$n=new d$W,pr$2=new n$15;function Ke$6(e){var t=e.rgbaf;if(e$2e(t))return t;var i=e.rgba;if(e$2e(i)){var n=i.length;if(n===e$1X.packedLength)return[e$1X.byteToFloat(i[0]),e$1X.byteToFloat(i[1]),e$1X.byteToFloat(i[2]),e$1X.byteToFloat(i[3])];t=new Array(n);for(var r=0;r<n;r+=5)t[r]=i[r],t[r+1]=e$1X.byteToFloat(i[r+1]),t[r+2]=e$1X.byteToFloat(i[r+2]),t[r+3]=e$1X.byteToFloat(i[r+3]),t[r+4]=e$1X.byteToFloat(i[r+4]);return t}}function $r$2(e,t){var i=u$Z(e.uri,e);return e$2e(t)?t.getDerivedResource({url:i}):t$10.createIfNeeded(i)}function $e$5(e){var t=e.wsen;if(e$2e(t))return t;var i=e.wsenDegrees;if(e$2e(i)){var n=i.length;if(n===h$18.packedLength)return[e$2d.toRadians(i[0]),e$2d.toRadians(i[1]),e$2d.toRadians(i[2]),e$2d.toRadians(i[3])];t=new Array(n);for(var r=0;r<n;r+=5)t[r]=i[r],t[r+1]=e$2d.toRadians(i[r+1]),t[r+2]=e$2d.toRadians(i[r+2]),t[r+3]=e$2d.toRadians(i[r+3]),t[r+4]=e$2d.toRadians(i[r+4]);return t}}function Ie$8(e){var t=e.length;if(B$p.magnitude=1,2===t)return B$p.clock=e[0],B$p.cone=e[1],o$1p.fromSpherical(B$p,g$x),[g$x.x,g$x.y,g$x.z];for(var i=new Array(t/3*4),n=0,r=0;n<t;n+=3,r+=4)i[r]=e[n],B$p.clock=e[n+1],B$p.cone=e[n+2],o$1p.fromSpherical(B$p,g$x),i[r+1]=g$x.x,i[r+2]=g$x.y,i[r+3]=g$x.z;return i}function ke$8(e){var t=e.length;if(3===t)return B$p.clock=e[0],B$p.cone=e[1],B$p.magnitude=e[2],o$1p.fromSpherical(B$p,g$x),[g$x.x,g$x.y,g$x.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],B$p.clock=e[n+1],B$p.cone=e[n+2],B$p.magnitude=e[n+3],o$1p.fromSpherical(B$p,g$x),i[n+1]=g$x.x,i[n+2]=g$x.y,i[n+3]=g$x.z;return i}function je$8(e){var t=e.length;if(3===t)return x$w.longitude=e[0],x$w.latitude=e[1],x$w.height=e[2],t$12.WGS84.cartographicToCartesian(x$w,g$x),[g$x.x,g$x.y,g$x.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],x$w.longitude=e[n+1],x$w.latitude=e[n+2],x$w.height=e[n+3],t$12.WGS84.cartographicToCartesian(x$w,g$x),i[n+1]=g$x.x,i[n+2]=g$x.y,i[n+3]=g$x.z;return i}function ze$8(e){var t=e.length;if(3===t)return x$w.longitude=e$2d.toRadians(e[0]),x$w.latitude=e$2d.toRadians(e[1]),x$w.height=e[2],t$12.WGS84.cartographicToCartesian(x$w,g$x),[g$x.x,g$x.y,g$x.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],x$w.longitude=e$2d.toRadians(e[n+1]),x$w.latitude=e$2d.toRadians(e[n+2]),x$w.height=e[n+3],t$12.WGS84.cartographicToCartesian(x$w,g$x),i[n+1]=g$x.x,i[n+2]=g$x.y,i[n+3]=g$x.z;return i}function _r$2(e){var t=e.cartesian;if(e$2e(t))return t;var i=e.cartesianVelocity;if(e$2e(i))return i;var n=e.unitCartesian;if(e$2e(n))return n;var r=e.unitSpherical;if(e$2e(r))return Ie$8(r);var o=e.spherical;if(e$2e(o))return ke$8(o);var a=e.cartographicRadians;if(e$2e(a))return je$8(a);var s=e.cartographicDegrees;if(e$2e(s))return ze$8(s);throw new t$13(JSON.stringify(e)+" is not a valid CZML interval.")}function Ir$3(e,t){o$1p.unpack(e,t,g$x),o$1p.normalize(g$x,g$x),o$1p.pack(g$x,e,t)}function Ce$8(e){var t=_r$2(e);if(3===t.length)return Ir$3(t,0),t;for(var i=1;i<t.length;i+=4)Ir$3(t,i);return t}function kr$2(e,t){n$15.unpack(e,t,pr$2),n$15.normalize(pr$2,pr$2),n$15.pack(pr$2,e,t)}function Ue$8(e){var t=e.unitQuaternion;if(e$2e(t)){if(4===t.length)return kr$2(t,0),t;for(var i=1;i<t.length;i+=5)kr$2(t,i)}return t}function jr$1(e){return"boolean"==typeof e?Boolean:"number"==typeof e?Number:"string"==typeof e?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?f$1a:e.hasOwnProperty("cartesian2")?o$1o:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?o$1p:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?y$t:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?e$1X:e.hasOwnProperty("arcType")?m$1h:e.hasOwnProperty("classificationType")?_0x2b86ba:e.hasOwnProperty("colorBlendMode")?I$K:e.hasOwnProperty("cornerType")?ar$6:e.hasOwnProperty("heightReference")?k$R:e.hasOwnProperty("horizontalOrigin")?j$V:e.hasOwnProperty("date")?a$15:e.hasOwnProperty("labelStyle")?R$S:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?o$Y:e.hasOwnProperty("distanceDisplayCondition")?r$Z:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?n$15:e.hasOwnProperty("shadowMode")?W$X:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?mr$2:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?h$18:e.hasOwnProperty("uri")?h$16:e.hasOwnProperty("verticalOrigin")?S$Q:Object}function rn$1(e,t,i){switch(e){case m$1h:return m$1h[u$Z(t.arcType,t)];case Array:return t.array;case Boolean:return u$Z(t.boolean,t);case f$1a:return t.boundingRectangle;case o$1o:return t.cartesian2;case o$1p:return _r$2(t);case y$t:return Ce$8(t);case e$1X:return Ke$6(t);case _0x2b86ba:return _0x2b86ba[u$Z(t.classificationType,t)];case I$K:return I$K[u$Z(t.colorBlendMode,t)];case ar$6:return ar$6[u$Z(t.cornerType,t)];case k$R:return k$R[u$Z(t.heightReference,t)];case j$V:return j$V[u$Z(t.horizontalOrigin,t)];case Image:return $r$2(t,i);case a$15:return a$15.fromIso8601(u$Z(t.date,t));case R$S:return R$S[u$Z(t.labelStyle,t)];case Number:return u$Z(t.number,t);case o$Y:return t.nearFarScalar;case r$Z:return t.distanceDisplayCondition;case Object:return u$Z(u$Z(t.object,t.value),t);case n$15:return Ue$8(t);case m$r:return u$Z(t.number,t);case W$X:return W$X[u$Z(u$Z(t.shadowMode,t.shadows),t)];case String:return u$Z(t.string,t);case mr$2:return mr$2[u$Z(t.stripeOrientation,t)];case h$18:return $e$5(t);case h$16:return $r$2(t,i);case S$Q:return S$Q[u$Z(t.verticalOrigin,t)];default:throw new t$13(e)}}var en$1={HERMITE:E$J,LAGRANGE:i$J,LINEAR:v$A};function lr$2(e,t){var i=e.interpolationAlgorithm,n=e.interpolationDegree;(e$2e(i)||e$2e(n))&&t.setInterpolationOptions({interpolationAlgorithm:en$1[i],interpolationDegree:n});var r=e.forwardExtrapolationType;e$2e(r)&&(t.forwardExtrapolationType=_0x1015ec[r]);var o=e.forwardExtrapolationDuration;e$2e(o)&&(t.forwardExtrapolationDuration=o);var a=e.backwardExtrapolationType;e$2e(a)&&(t.backwardExtrapolationType=_0x1015ec[a]);var s=e.backwardExtrapolationDuration;e$2e(s)&&(t.backwardExtrapolationDuration=s)}var zr$2={iso8601:void 0};function b$z(e){if(e$2e(e))return zr$2.iso8601=e,d$W.fromIso8601(zr$2)}function Br$1(e){var t=o$I.MAXIMUM_INTERVAL.clone();return t.data=e,t}function Cr$2(e){var t=new e$B;return t.intervals.addInterval(Br$1(e)),t}function Ur$2(e){var t=new t$p(e.referenceFrame);return t.intervals.addInterval(Br$1(e)),t}function gr$2(e,t,i,n,r,o,a){var s=b$z(n.interval);e$2e(r)&&(s=e$2e(s)?d$W.intersect(s,r,Y$n):r);var l,u,c,h=!e$2e(n.reference)&&!e$2e(n.velocityReference),d=e$2e(s)&&!s.equals(o$I.MAXIMUM_INTERVAL);if(!0===n.delete)return d?re$l(t[i],s):void(t[i]=void 0);var f=!1;if(h){if(!e$2e(u=rn$1(e,n,o)))return;l=u$Z(e.packedLength,1),c=u$Z(u.length,1),f=!e$2e(n.array)&&"string"!=typeof u&&c>l&&e!==Object}var p="function"==typeof e.unpack&&e!==m$r;if(f||d){var _,m,g=t[i],x=n.epoch;if(e$2e(x)&&(_=a$15.fromIso8601(x)),f&&!d)return g instanceof g$y||(t[i]=g=new g$y(e)),g.addSamplesPackedArray(u,_),void lr$2(n,g);if(!f&&d)return(s=s.clone()).data=h?p?e.unpack(u,0):u:Kr$2(e,a,n),e$2e(g)||(t[i]=g=h?new t$k:new e$B),void(h&&g instanceof t$k?g.intervals.addInterval(s):g instanceof e$B?(h&&(s.data=new e$1L(s.data)),g.intervals.addInterval(s)):(t[i]=g=Cr$2(g),h&&(s.data=new e$1L(s.data)),g.intervals.addInterval(s)));e$2e(g)||(t[i]=g=new e$B),g instanceof e$B||(t[i]=g=Cr$2(g));var y=g.intervals;(!e$2e(m=y.findInterval(s))||!(m.data instanceof g$y))&&((m=s.clone()).data=new g$y(e),y.addInterval(m)),m.data.addSamplesPackedArray(u,_),lr$2(n,m.data)}else t[i]=h?new e$1L(p?e.unpack(u,0):u):Kr$2(e,a,n)}function re$l(e,t){if(e instanceof g$y)e.removeSamples(t);else if(e instanceof t$k)e.intervals.removeInterval(t);else if(e instanceof e$B){for(var i=e.intervals,n=0;n<i.length;++n){var r=d$W.intersect(i.get(n),t,Y$n);r.isEmpty||re$l(r.data,t)}i.removeInterval(t)}else;}function f$u(e,t,i,n,r,o,a){if(e$2e(n))if(Array.isArray(n))for(var s=0,l=n.length;s<l;++s)gr$2(e,t,i,n[s],r,o,a);else gr$2(e,t,i,n,r,o,a)}function ee$l(e,t,i,n,r,o){var a=b$z(i.interval);e$2e(n)&&(a=e$2e(a)?d$W.intersect(a,n,Y$n):n);var s,l=e$2e(i.cartesianVelocity)?1:0,u=o$1p.packedLength*(l+1),c=!e$2e(i.reference),h=e$2e(a)&&!a.equals(o$I.MAXIMUM_INTERVAL);if(!0===i.delete)return h?ne$g(e[t],a):void(e[t]=void 0);var d,f=!1;if(c&&(e$2e(i.referenceFrame)&&(d=Re$l[i.referenceFrame]),d=u$Z(d,Re$l.FIXED),f=u$Z((s=_r$2(i)).length,1)>u),f||h){var p,_,m=e[t],g=i.epoch;if(e$2e(g)&&(p=a$15.fromIso8601(g)),f&&!h)return(!(m instanceof o$z)||e$2e(d)&&m.referenceFrame!==d)&&(e[t]=m=new o$z(d,l)),m.addSamplesPackedArray(s,p),void lr$2(i,m);if(!f&&h)return(a=a.clone()).data=c?o$1p.unpack(s):U$s(o,i.reference),e$2e(m)||(m=c?new t$l(d):new t$p(d),e[t]=m),void(c&&m instanceof t$l&&e$2e(d)&&m.referenceFrame===d?m.intervals.addInterval(a):m instanceof t$p?(c&&(a.data=new r$V(a.data,d)),m.intervals.addInterval(a)):(e[t]=m=Ur$2(m),c&&(a.data=new r$V(a.data,d)),m.intervals.addInterval(a)));e$2e(m)?m instanceof t$p||(e[t]=m=Ur$2(m)):e[t]=m=new t$p(d);var x=m.intervals;(!e$2e(_=x.findInterval(a))||!(_.data instanceof o$z)||e$2e(d)&&_.data.referenceFrame!==d)&&((_=a.clone()).data=new o$z(d,l),x.addInterval(_)),_.data.addSamplesPackedArray(s,p),lr$2(i,_.data)}else e[t]=c?new r$V(o$1p.unpack(s),d):U$s(o,i.reference)}function ne$g(e,t){if(e instanceof o$z)e.removeSamples(t);else if(e instanceof t$l)e.intervals.removeInterval(t);else if(e instanceof t$p){for(var i=e.intervals,n=0;n<i.length;++n){var r=d$W.intersect(i.get(n),t,Y$n);r.isEmpty||ne$g(r.data,t)}i.removeInterval(t)}else;}function ae$e(e,t,i,n,r,o){if(e$2e(i))if(Array.isArray(i))for(var a=0,s=i.length;a<s;++a)ee$l(e,t,i[a],n,r,o);else ee$l(e,t,i,n,r,o)}function ie$d(e,t,i,n,r,o){var a=b$z(i.interval);e$2e(n)&&(a=e$2e(a)?d$W.intersect(a,n,Y$n):n);var s,l,u,c=e[t];if(e$2e(a)){c instanceof e$A||(c=new e$A,e[t]=c);var h=c.intervals;e$2e(l=h.findInterval({start:a.start,stop:a.stop}))?s=l.data:(l=a.clone(),h.addInterval(l))}else s=c;e$2e(i.solidColor)?(s instanceof t$P||(s=new t$P),f$u(e$1X,s,"color",(u=i.solidColor).color,void 0,void 0,o)):e$2e(i.grid)?(s instanceof t$o||(s=new t$o),f$u(e$1X,s,"color",(u=i.grid).color,void 0,r,o),f$u(Number,s,"cellAlpha",u.cellAlpha,void 0,r,o),f$u(o$1o,s,"lineCount",u.lineCount,void 0,r,o),f$u(o$1o,s,"lineThickness",u.lineThickness,void 0,r,o),f$u(o$1o,s,"lineOffset",u.lineOffset,void 0,r,o)):e$2e(i.image)?(s instanceof a$R||(s=new a$R),u=i.image,f$u(Image,s,"image",u.image,void 0,r,o),f$u(o$1o,s,"repeat",u.repeat,void 0,r,o),f$u(e$1X,s,"color",u.color,void 0,r,o),f$u(Boolean,s,"transparent",u.transparent,void 0,r,o)):e$2e(i.stripe)?(s instanceof i$u||(s=new i$u),u=i.stripe,f$u(mr$2,s,"orientation",u.orientation,void 0,r,o),f$u(e$1X,s,"evenColor",u.evenColor,void 0,r,o),f$u(e$1X,s,"oddColor",u.oddColor,void 0,r,o),f$u(Number,s,"offset",u.offset,void 0,r,o),f$u(Number,s,"repeat",u.repeat,void 0,r,o)):e$2e(i.polylineOutline)?(s instanceof e$y||(s=new e$y),f$u(e$1X,s,"color",(u=i.polylineOutline).color,void 0,r,o),f$u(e$1X,s,"outlineColor",u.outlineColor,void 0,r,o),f$u(Number,s,"outlineWidth",u.outlineWidth,void 0,r,o)):e$2e(i.polylineGlow)?(s instanceof t$m||(s=new t$m),f$u(e$1X,s,"color",(u=i.polylineGlow).color,void 0,r,o),f$u(Number,s,"glowPower",u.glowPower,void 0,r,o),f$u(Number,s,"taperPower",u.taperPower,void 0,r,o)):e$2e(i.polylineArrow)?(s instanceof t$n||(s=new t$n),f$u(e$1X,s,"color",(u=i.polylineArrow).color,void 0,void 0,o)):e$2e(i.polylineDash)?(s instanceof o$A||(s=new o$A),f$u(e$1X,s,"color",(u=i.polylineDash).color,void 0,void 0,o),f$u(e$1X,s,"gapColor",u.gapColor,void 0,void 0,o),f$u(Number,s,"dashLength",u.dashLength,void 0,r,o),f$u(Number,s,"dashPattern",u.dashPattern,void 0,r,o)):e$2e(i.checkerboard)&&(s instanceof r$w||(s=new r$w),f$u(e$1X,s,"evenColor",(u=i.checkerboard).evenColor,void 0,r,o),f$u(e$1X,s,"oddColor",u.oddColor,void 0,r,o),f$u(o$1o,s,"repeat",u.repeat,void 0,r,o)),e$2e(l)?l.data=s:e[t]=s}function L$v(e,t,i,n,r,o){if(e$2e(i))if(Array.isArray(i))for(var a=0,s=i.length;a<s;++a)ie$d(e,t,i[a],n,r,o);else ie$d(e,t,i,n,r,o)}function nn$1(e,t,i,n){e$2e(t.name)&&(e.name=t.name)}function an$1(e,t,i,n){var r=t.description;e$2e(r)&&f$u(String,e,"description",r,void 0,n,i)}function on$1(e,t,i,n){var r=t.position;e$2e(r)&&ae$e(e,"position",r,void 0,n,i)}function sn$1(e,t,i,n){var r=t.viewFrom;e$2e(r)&&f$u(o$1p,e,"viewFrom",r,void 0,n,i)}function fn$1(e,t,i,n){var r=t.orientation;e$2e(r)&&f$u(n$15,e,"orientation",r,void 0,n,i)}function tn$1(e,t,i,n){var r=t.properties;if(e$2e(r))for(var o in e$2e(e.properties)||(e.properties=new f$V),r)if(r.hasOwnProperty(o)){e.properties.hasProperty(o)||e.properties.addProperty(o);var a=r[o];if(Array.isArray(a))for(var s=0,l=a.length;s<l;++s)gr$2(jr$1(a[s]),e.properties,o,a[s],void 0,n,i);else gr$2(jr$1(a),e.properties,o,a,void 0,n,i)}}function Mr$3(e,t,i,n,r,o,a){var s=i.map((function(e){return U$s(r,e)}));if(e$2e(n)){n=b$z(n);var l=e[t];if(!(l instanceof a)){var u=new a;u.intervals.addInterval(Br$1(l)),e[t]=l=u}n.data=new o(s),l.intervals.addInterval(n)}else e[t]=new o(s)}function oe$d(e,t,i,n){var r=i.references;e$2e(r)?Mr$3(e,t,r,i.interval,n,i$v,e$B):f$u(Array,e,t,i,void 0,void 0,n)}function se$c(e,t,i,n){if(e$2e(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)oe$d(e,t,i[r],n);else oe$d(e,t,i,n)}function fe$c(e,t,i,n){var r=i.references;e$2e(r)?Mr$3(e,t,r,i.interval,n,n$n,t$p):(e$2e(i.cartesian)?i.array=o$1p.unpackArray(i.cartesian):e$2e(i.cartographicRadians)?i.array=o$1p.fromRadiansArrayHeights(i.cartographicRadians):e$2e(i.cartographicDegrees)&&(i.array=o$1p.fromDegreesArrayHeights(i.cartographicDegrees)),e$2e(i.array)&&f$u(Array,e,t,i,void 0,void 0,n))}function vr$2(e,t,i,n){if(e$2e(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)fe$c(e,t,i[r],n);else fe$c(e,t,i,n)}function dn$1(e){return o$1p.unpackArray(e)}function un$1(e){return o$1p.fromRadiansArrayHeights(e)}function hn$1(e){return o$1p.fromDegreesArrayHeights(e)}function te$h(e,t,i,n){var r=i.references;if(e$2e(r)){var o=r.map((function(e){var t={};return Mr$3(t,"positions",e,i.interval,n,n$n,t$p),t.positions}));e[t]=new n$n(o)}else e$2e(i.cartesian)?i.array=i.cartesian.map(dn$1):e$2e(i.cartographicRadians)?i.array=i.cartographicRadians.map(un$1):e$2e(i.cartographicDegrees)&&(i.array=i.cartographicDegrees.map(hn$1)),e$2e(i.array)&&f$u(Array,e,t,i,void 0,void 0,n)}function mn$1(e,t,i,n){if(e$2e(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)te$h(e,t,i[r],n);else te$h(e,t,i,n)}function pn$1(e,t,i,n){var r=t.availability;if(e$2e(r)){var o;if(Array.isArray(r))for(var a=0,s=r.length;a<s;++a)e$2e(o)||(o=new c$A),o.addInterval(b$z(r[a]));else(o=new c$A).addInterval(b$z(r));e.availability=o}}function ln$1(e,t,i,n,r){!e$2e(t)||f$u(y$t,e,"alignedAxis",t,i,n,r)}function gn$1(e,t,i,n){var r=t.billboard;if(e$2e(r)){var o=b$z(r.interval),a=e.billboard;e$2e(a)||(e.billboard=a=new n$V),f$u(Boolean,a,"show",r.show,o,n,i),f$u(Image,a,"image",r.image,o,n,i),f$u(Number,a,"scale",r.scale,o,n,i),f$u(o$1o,a,"pixelOffset",r.pixelOffset,o,n,i),f$u(o$1p,a,"eyeOffset",r.eyeOffset,o,n,i),f$u(j$V,a,"horizontalOrigin",r.horizontalOrigin,o,n,i),f$u(S$Q,a,"verticalOrigin",r.verticalOrigin,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(e$1X,a,"color",r.color,o,n,i),f$u(m$r,a,"rotation",r.rotation,o,n,i),ln$1(a,r.alignedAxis,o,n,i),f$u(Boolean,a,"sizeInMeters",r.sizeInMeters,o,n,i),f$u(Number,a,"width",r.width,o,n,i),f$u(Number,a,"height",r.height,o,n,i),f$u(o$Y,a,"scaleByDistance",r.scaleByDistance,o,n,i),f$u(o$Y,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),f$u(o$Y,a,"pixelOffsetScaleByDistance",r.pixelOffsetScaleByDistance,o,n,i),f$u(f$1a,a,"imageSubRegion",r.imageSubRegion,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function vn$1(e,t,i,n){var r=t.box;if(e$2e(r)){var o=b$z(r.interval),a=e.box;e$2e(a)||(e.box=a=new n$U),f$u(Boolean,a,"show",r.show,o,n,i),f$u(o$1p,a,"dimensions",r.dimensions,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function wn$1(e,t,i,n){var r=t.corridor;if(e$2e(r)){var o=b$z(r.interval),a=e.corridor;e$2e(a)||(e.corridor=a=new n$T),f$u(Boolean,a,"show",r.show,o,n,i),vr$2(a,"positions",r.positions,i),f$u(Number,a,"width",r.width,o,n,i),f$u(Number,a,"height",r.height,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$u(k$R,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$u(ar$6,a,"cornerType",r.cornerType,o,n,i),f$u(Number,a,"granularity",r.granularity,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(_0x2b86ba,a,"classificationType",r.classificationType,o,n,i),f$u(Number,a,"zIndex",r.zIndex,o,n,i)}}function Pn$1(e,t,i,n){var r=t.cylinder;if(e$2e(r)){var o=b$z(r.interval),a=e.cylinder;e$2e(a)||(e.cylinder=a=new n$S),f$u(Boolean,a,"show",r.show,o,n,i),f$u(Number,a,"length",r.length,o,n,i),f$u(Number,a,"topRadius",r.topRadius,o,n,i),f$u(Number,a,"bottomRadius",r.bottomRadius,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(Number,a,"numberOfVerticalLines",r.numberOfVerticalLines,o,n,i),f$u(Number,a,"slices",r.slices,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function bn$1(e,t){var i=e.version;if(e$2e(i)&&"string"==typeof i){var n=i.split(".");if(2===n.length){if("1"!==n[0])throw new t$13("SuperMap3D only supports CZML version 1.");t._version=i}}if(!e$2e(t._version))throw new t$13("CZML version information invalid. It is expected to be a property on the document object in the <Major>.<Minor> version format.");var r=t._documentPacket;e$2e(e.name)&&(r.name=e.name);var o=e.clock;if(e$2e(o)){var a=r.clock;e$2e(a)?(a.interval=u$Z(o.interval,a.interval),a.currentTime=u$Z(o.currentTime,a.currentTime),a.range=u$Z(o.range,a.range),a.step=u$Z(o.step,a.step),a.multiplier=u$Z(o.multiplier,a.multiplier)):r.clock={interval:o.interval,currentTime:o.currentTime,range:o.range,step:o.step,multiplier:o.multiplier}}}function On$1(e,t,i,n){var r=t.ellipse;if(e$2e(r)){var o=b$z(r.interval),a=e.ellipse;e$2e(a)||(e.ellipse=a=new n$R),f$u(Boolean,a,"show",r.show,o,n,i),f$u(Number,a,"semiMajorAxis",r.semiMajorAxis,o,n,i),f$u(Number,a,"semiMinorAxis",r.semiMinorAxis,o,n,i),f$u(Number,a,"height",r.height,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$u(k$R,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$u(m$r,a,"rotation",r.rotation,o,n,i),f$u(m$r,a,"stRotation",r.stRotation,o,n,i),f$u(Number,a,"granularity",r.granularity,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(Number,a,"numberOfVerticalLines",r.numberOfVerticalLines,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(_0x2b86ba,a,"classificationType",r.classificationType,o,n,i),f$u(Number,a,"zIndex",r.zIndex,o,n,i)}}function Tn$1(e,t,i,n){var r=t.ellipsoid;if(e$2e(r)){var o=b$z(r.interval),a=e.ellipsoid;e$2e(a)||(e.ellipsoid=a=new e$1q),f$u(Boolean,a,"show",r.show,o,n,i),f$u(o$1p,a,"radii",r.radii,o,n,i),f$u(o$1p,a,"innerRadii",r.innerRadii,o,n,i),f$u(Number,a,"minimumClock",r.minimumClock,o,n,i),f$u(Number,a,"maximumClock",r.maximumClock,o,n,i),f$u(Number,a,"minimumCone",r.minimumCone,o,n,i),f$u(Number,a,"maximumCone",r.maximumCone,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(Number,a,"stackPartitions",r.stackPartitions,o,n,i),f$u(Number,a,"slicePartitions",r.slicePartitions,o,n,i),f$u(Number,a,"subdivisions",r.subdivisions,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function An$1(e,t,i,n){var r=t.label;if(e$2e(r)){var o=b$z(r.interval),a=e.label;e$2e(a)||(e.label=a=new n$Q),f$u(Boolean,a,"show",r.show,o,n,i),f$u(String,a,"text",r.text,o,n,i),f$u(String,a,"font",r.font,o,n,i),f$u(R$S,a,"style",r.style,o,n,i),f$u(Number,a,"scale",r.scale,o,n,i),f$u(Boolean,a,"showBackground",r.showBackground,o,n,i),f$u(e$1X,a,"backgroundColor",r.backgroundColor,o,n,i),f$u(o$1o,a,"backgroundPadding",r.backgroundPadding,o,n,i),f$u(o$1o,a,"pixelOffset",r.pixelOffset,o,n,i),f$u(o$1p,a,"eyeOffset",r.eyeOffset,o,n,i),f$u(j$V,a,"horizontalOrigin",r.horizontalOrigin,o,n,i),f$u(S$Q,a,"verticalOrigin",r.verticalOrigin,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(e$1X,a,"fillColor",r.fillColor,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(o$Y,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),f$u(o$Y,a,"pixelOffsetScaleByDistance",r.pixelOffsetScaleByDistance,o,n,i),f$u(o$Y,a,"scaleByDistance",r.scaleByDistance,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function Rn$1(e,t,i,n){var r=t.model;if(e$2e(r)){var o=b$z(r.interval),a=e.model;e$2e(a)||(e.model=a=new t$I),f$u(Boolean,a,"show",r.show,o,n,i),f$u(h$16,a,"uri",r.gltf,o,n,i),f$u(Number,a,"scale",r.scale,o,n,i),f$u(Number,a,"minimumPixelSize",r.minimumPixelSize,o,n,i),f$u(Number,a,"maximumScale",r.maximumScale,o,n,i),f$u(Boolean,a,"incrementallyLoadTextures",r.incrementallyLoadTextures,o,n,i),f$u(Boolean,a,"runAnimations",r.runAnimations,o,n,i),f$u(Boolean,a,"clampAnimations",r.clampAnimations,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(e$1X,a,"silhouetteColor",r.silhouetteColor,o,n,i),f$u(Number,a,"silhouetteSize",r.silhouetteSize,o,n,i),f$u(e$1X,a,"color",r.color,o,n,i),f$u(I$K,a,"colorBlendMode",r.colorBlendMode,o,n,i),f$u(Number,a,"colorBlendAmount",r.colorBlendAmount,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i);var s,l,u=r.nodeTransformations;if(e$2e(u))if(Array.isArray(u))for(s=0,l=u.length;s<l;++s)de$b(a,u[s],o,n,i);else de$b(a,u,o,n,i);var c=r.articulations;if(e$2e(c))if(Array.isArray(c))for(s=0,l=c.length;s<l;++s)ue$c(a,c[s],o,n,i);else ue$c(a,c,o,n,i)}}function de$b(e,t,i,n,r){var o=b$z(t.interval);e$2e(i)&&(o=e$2e(o)?d$W.intersect(o,i,Y$n):i);for(var a=e.nodeTransformations,s=Object.keys(t),l=0,u=s.length;l<u;++l){var c=s[l];if("interval"!==c){var h=t[c];if(e$2e(h)){e$2e(a)||(e.nodeTransformations=a=new f$V),a.hasProperty(c)||a.addProperty(c);var d=a[c];e$2e(d)||(a[c]=d=new a$N),f$u(o$1p,d,"translation",h.translation,o,n,r),f$u(n$15,d,"rotation",h.rotation,o,n,r),f$u(o$1p,d,"scale",h.scale,o,n,r)}}}}function ue$c(e,t,i,n,r){var o=b$z(t.interval);e$2e(i)&&(o=e$2e(o)?d$W.intersect(o,i,Y$n):i);for(var a=e.articulations,s=Object.keys(t),l=0,u=s.length;l<u;++l){var c=s[l];if("interval"!==c){var h=t[c];!e$2e(h)||(e$2e(a)||(e.articulations=a=new f$V),a.hasProperty(c)||a.addProperty(c),f$u(Number,a,c,h,o,n,r))}}}function xn$1(e,t,i,n){var r=t.path;if(e$2e(r)){var o=b$z(r.interval),a=e.path;e$2e(a)||(e.path=a=new n$P),f$u(Boolean,a,"show",r.show,o,n,i),f$u(Number,a,"leadTime",r.leadTime,o,n,i),f$u(Number,a,"trailTime",r.trailTime,o,n,i),f$u(Number,a,"width",r.width,o,n,i),f$u(Number,a,"resolution",r.resolution,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function _n$1(e,t,i,n){var r=t.point;if(e$2e(r)){var o=b$z(r.interval),a=e.point;e$2e(a)||(e.point=a=new n$O),f$u(Boolean,a,"show",r.show,o,n,i),f$u(Number,a,"pixelSize",r.pixelSize,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(e$1X,a,"color",r.color,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(o$Y,a,"scaleByDistance",r.scaleByDistance,o,n,i),f$u(o$Y,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function rr$3(e){this.polygon=e,this._definitionChanged=new o$1h}function Bn$1(e,t,i,n){var r=t.polygon;if(e$2e(r)){var o=b$z(r.interval),a=e.polygon;e$2e(a)||(e.polygon=a=new l$Y),f$u(Boolean,a,"show",r.show,o,n,i),vr$2(a,"_positions",r.positions,i),mn$1(a,"_holes",r.holes,i),(e$2e(a._positions)||e$2e(a._holes))&&(a.hierarchy=new rr$3(a)),f$u(Number,a,"height",r.height,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$u(k$R,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$u(m$r,a,"stRotation",r.stRotation,o,n,i),f$u(Number,a,"granularity",r.granularity,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(Boolean,a,"perPositionHeight",r.perPositionHeight,o,n,i),f$u(Boolean,a,"closeTop",r.closeTop,o,n,i),f$u(Boolean,a,"closeBottom",r.closeBottom,o,n,i),f$u(m$1h,a,"arcType",r.arcType,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(_0x2b86ba,a,"classificationType",r.classificationType,o,n,i),f$u(Number,a,"zIndex",r.zIndex,o,n,i)}}function Mn$1(e){return e?m$1h.GEODESIC:m$1h.NONE}function En$1(e,t,i,n){var r=t.polyline;if(e$2e(r)){var o=b$z(r.interval),a=e.polyline;if(e$2e(a)||(e.polyline=a=new a$L),f$u(Boolean,a,"show",r.show,o,n,i),vr$2(a,"positions",r.positions,i),f$u(Number,a,"width",r.width,o,n,i),f$u(Number,a,"granularity",r.granularity,o,n,i),L$v(a,"material",r.material,o,n,i),L$v(a,"depthFailMaterial",r.depthFailMaterial,o,n,i),f$u(m$1h,a,"arcType",r.arcType,o,n,i),f$u(Boolean,a,"clampToGround",r.clampToGround,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(_0x2b86ba,a,"classificationType",r.classificationType,o,n,i),f$u(Number,a,"zIndex",r.zIndex,o,n,i),e$2e(r.followSurface)&&!e$2e(r.arcType)){var s={};f$u(Boolean,s,"followSurface",r.followSurface,o,n,i),a.arcType=Ye$6(s.followSurface,Mn$1)}}}function Nn$1(e,t,i,n){var r=t.rectangle;if(e$2e(r)){var o=b$z(r.interval),a=e.rectangle;e$2e(a)||(e.rectangle=a=new n$N),f$u(Boolean,a,"show",r.show,o,n,i),f$u(h$18,a,"coordinates",r.coordinates,o,n,i),f$u(Number,a,"height",r.height,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$u(k$R,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$u(m$r,a,"rotation",r.rotation,o,n,i),f$u(m$r,a,"stRotation",r.stRotation,o,n,i),f$u(Number,a,"granularity",r.granularity,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(_0x2b86ba,a,"classificationType",r.classificationType,o,n,i),f$u(Number,a,"zIndex",r.zIndex,o,n,i)}}function Ln$1(e,t,i,n){var r=t.tileset;if(e$2e(r)){var o=b$z(r.interval),a=e.tileset;e$2e(a)||(e.tileset=a=new i$S),f$u(Boolean,a,"show",r.show,o,n,i),f$u(h$16,a,"uri",r.uri,o,n,i),f$u(Number,a,"maximumScreenSpaceError",r.maximumScreenSpaceError,o,n,i)}}function Sn$1(e,t,i,n){var r=t.wall;if(e$2e(r)){var o=b$z(r.interval),a=e.wall;e$2e(a)||(e.wall=a=new e$1m),f$u(Boolean,a,"show",r.show,o,n,i),vr$2(a,"positions",r.positions,i),se$c(a,"minimumHeights",r.minimumHeights,i),se$c(a,"maximumHeights",r.maximumHeights,i),f$u(Number,a,"granularity",r.granularity,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function he$c(e,t,i,n,r){var o=e.id;if(e$2e(o)||(o=e$1T()),xr$3=o,!e$2e(r._version)&&"document"!==o)throw new t$13("The first CZML packet is required to be the document object.");if(!0===e.delete)t.removeById(o);else if("document"===o)bn$1(e,r);else{var a=t.getOrCreateEntity(o),s=e.parent;e$2e(s)&&(a.parent=t.getOrCreateEntity(s));for(var l=i.length-1;l>-1;l--)i[l](a,e,t,n)}xr$3=void 0}function Hn$1(e){var t,i=e._documentPacket.clock;if(!e$2e(i)){if(!e$2e(e._clock)){var n=e._entityCollection.computeAvailability();if(!n.start.equals(o$I.MINIMUM_VALUE)){var r=n.start,o=n.stop,a=a$15.secondsDifference(o,r),s=Math.round(a/120);return(t=new e$z).startTime=a$15.clone(r),t.stopTime=a$15.clone(o),t.clockRange=tt$a.LOOP_STOP,t.multiplier=s,t.currentTime=a$15.clone(r),t.clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}e$2e(e._clock)?t=e._clock.clone():((t=new e$z).startTime=o$I.MINIMUM_VALUE.clone(),t.stopTime=o$I.MAXIMUM_VALUE.clone(),t.currentTime=o$I.MINIMUM_VALUE.clone(),t.clockRange=tt$a.LOOP_STOP,t.clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);var l=b$z(i.interval);return e$2e(l)&&(t.startTime=l.start,t.stopTime=l.stop),e$2e(i.currentTime)&&(t.currentTime=a$15.fromIso8601(i.currentTime)),e$2e(i.range)&&(t.clockRange=u$Z(tt$a[i.range],tt$a.LOOP_STOP)),e$2e(i.step)&&(t.clockStep=u$Z(g$R[i.step],g$R.SYSTEM_CLOCK_MULTIPLIER)),e$2e(i.multiplier)&&(t.multiplier=i.multiplier),!t.equals(e._clock)&&(e._clock=t.clone(e._clock),!0)}function me$g(e,t,i,n){if(!e$2e(t))throw new t$15("czml is required.");var r=t,o=(i=u$Z(i,u$Z.EMPTY_OBJECT)).sourceUri,a=i.credit;if("string"==typeof a&&(a=new r$U(a)),e._credit=a,"string"==typeof t||t instanceof t$10){r=(t=t$10.createIfNeeded(t)).fetchJson(),o=u$Z(o,t.clone());var s=e._resourceCredits,l=t.credits;if(e$2e(l))for(var u=l.length,c=0;c<u;c++)s.push(l[c])}return o=t$10.createIfNeeded(o),o$B.setLoading(e,!0),o$1l(r,(function(t){return cn$1(e,t,o,n)})).otherwise((function(t){return o$B.setLoading(e,!1),e._error.raiseEvent(e,t),console.log(t),o$1l.reject(t)}))}function cn$1(e,t,i,n){o$B.setLoading(e,!0);var r=e._entityCollection;n&&(e._version=void 0,e._documentPacket=new pe$g,r.removeAll()),E$w._processCzml(t,r,i,void 0,e);var o=Hn$1(e),a=e._documentPacket;return e$2e(a.name)&&e._name!==a.name?(e._name=a.name,o=!0):!e$2e(e._name)&&e$2e(i)&&(e._name=f$Q(i.getUrlComponent()),o=!0),o$B.setLoading(e,!1),o&&e._changed.raiseEvent(e),e}function pe$g(){this.name=void 0,this.clock=void 0}function E$w(e){this._name=e,this._changed=new o$1h,this._error=new o$1h,this._isLoading=!1,this._loading=new o$1h,this._clock=void 0,this._documentPacket=new pe$g,this._version=void 0,this._entityCollection=new r$v(this),this._entityCluster=new a$r,this._credit=void 0,this._resourceCredits=[]}function i$t(){this._dataSources=[],this._dataSourceAdded=new o$1h,this._dataSourceRemoved=new o$1h,this._dataSourceMoved=new o$1h}function c$n(e,t){if(!e$2e(t))throw new t$15("dataSource is required.");var i=e.indexOf(t);if(-1===i)throw new t$15("dataSource is not in this collection.");return i}function h$x(e,t,i){var n=e._dataSources,r=n.length-1;if((t=e$2d.clamp(t,0,r))!==(i=e$2d.clamp(i,0,r))){var o=n[t];n[t]=n[i],n[i]=o,e.dataSourceMoved.raiseEvent(o,i,t)}}function o$y(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._primitives=[],this._guid=e$1T(),this._zIndex=void 0,this.show=u$Z(e.show,!0),this.destroyPrimitives=u$Z(e.destroyPrimitives,!0)}function a$o(e,t){if(!e.contains(t))throw new t$15("primitive is not in this collection.");return e._primitives.indexOf(t)}function r$t(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}function r$s(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new e$1Q}Object.defineProperties(rr$3.prototype,{isConstant:{get:function(){var e=this.polygon._positions,t=this.polygon._holes;return(!e$2e(e)||e.isConstant)&&(!e$2e(t)||t.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}}),rr$3.prototype.getValue=function(e,t){var i,n;return e$2e(this.polygon._positions)&&(i=this.polygon._positions.getValue(e)),e$2e(this.polygon._holes)&&(e$2e(n=this.polygon._holes.getValue(e))&&(n=n.map((function(e){return new e$1M(e)})))),e$2e(t)?(t.positions=i,t.holes=n,t):new e$1M(i,n)},rr$3.prototype.equals=function(e){return this===e||e instanceof rr$3&&r$_.equals(this.polygon._positions,e.polygon._positions)&&r$_.equals(this.polygon._holes,e.polygon._holes)},E$w.load=function(e,t){return(new E$w).load(e,t)},Object.defineProperties(E$w.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2e(e))throw new t$15("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),E$w.updaters=[gn$1,vn$1,wn$1,Pn$1,On$1,Tn$1,An$1,Rn$1,nn$1,an$1,xn$1,_n$1,Bn$1,En$1,tn$1,Nn$1,on$1,Ln$1,sn$1,Sn$1,fn$1,pn$1],E$w.prototype.process=function(e,t){return me$g(this,e,t,!1)},E$w.prototype.load=function(e,t){return me$g(this,e,t,!0)},E$w.processPacketData=f$u,E$w.processPositionPacketData=ae$e,E$w.processMaterialPacketData=L$v,E$w._processCzml=function(e,t,i,n,r){if(n=u$Z(n,E$w.updaters),Array.isArray(e))for(var o=0,a=e.length;o<a;++o)he$c(e[o],t,n,i,r);else he$c(e,t,n,i,r)},Object.defineProperties(i$t.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}}),i$t.prototype.add=function(e){if(!e$2e(e))throw new t$15("dataSource is required.");if(this.contains(e))throw new t$15("CutomDataSource: "+e.name+" cannot be added repeatedly");var t=this,i=this._dataSources;return o$1l(e,(function(e){return i===t._dataSources&&(t._dataSources.push(e),t._dataSourceAdded.raiseEvent(t,e)),e}))},i$t.prototype.remove=function(e,t){t=u$Z(t,!1);var i=this._dataSources.indexOf(e);if(-1!==i){this._dataSources.splice(i,1);for(var n=0;n<e._entityCollection.values.length;n++){var r=e._entityCollection.values[n];e$2e(r._polygon)&&e$2e(r._polygon.outlines)&&r._polygon.outlines.removeAll(),e$2e(r._polygon)&&e$2e(r._polygon.clampOutlines)&&r.entityCollection._owner._entityCluster._scene._primitives.remove(r._polygon.clampOutlines)}return this._dataSourceRemoved.raiseEvent(this,e),t&&"function"==typeof e.destroy&&e.destroy(),!0}return!1},i$t.prototype.removeAll=function(e){e=u$Z(e,!1);for(var t=this._dataSources,i=0,n=t.length;i<n;++i){var r=t[i];this._dataSourceRemoved.raiseEvent(this,r);for(var o=0;o<r._entityCollection.values.length;o++){var a=r._entityCollection.values[o];e$2e(a._polygon)&&e$2e(a._polygon.outlines)&&a._polygon.outlines.removeAll(),e$2e(a._polygon)&&e$2e(a._polygon.clampOutlines)&&a.entityCollection._owner._entityCluster._scene._primitives.remove(a._polygon.clampOutlines)}e&&"function"==typeof r.destroy&&r.destroy()}this._dataSources=[]},i$t.prototype.contains=function(e){return-1!==this.indexOf(e)},i$t.prototype.indexOf=function(e){return this._dataSources.indexOf(e)},i$t.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return this._dataSources[e]},i$t.prototype.getByName=function(e){if(!e$2e(e))throw new t$15("name is required.");return this._dataSources.filter((function(t){return t.name===e}))},i$t.prototype.raise=function(e){var t=c$n(this._dataSources,e);h$x(this,t,t+1)},i$t.prototype.lower=function(e){var t=c$n(this._dataSources,e);h$x(this,t,t-1)},i$t.prototype.raiseToTop=function(e){var t=c$n(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))},i$t.prototype.lowerToBottom=function(e){var t=c$n(this._dataSources,e);0!==t&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))},i$t.prototype.isDestroyed=function(){return!1},i$t.prototype.destroy=function(){return this.removeAll(!0),i$11(this)},Object.defineProperties(o$y.prototype,{length:{get:function(){return this._primitives.length}}}),o$y.prototype.add=function(e){if(!e$2e(e))throw new t$15("primitive is required.");var t=e._external=e._external||{};return(t._composites=t._composites||{})[this._guid]={collection:this},this._primitives.push(e),e},o$y.prototype.remove=function(e){if(this.contains(e)){var t=this._primitives.indexOf(e);if(-1!==t)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this.destroyPrimitives&&e.destroy(),!0}return!1},o$y.prototype.removeAndDestroy=function(e){var t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t},o$y.prototype.removeAll=function(){for(var e=this._primitives,t=e.length,i=0;i<t;++i)delete e[i]._external._composites[this._guid],this.destroyPrimitives&&e[i].destroy();this._primitives=[]},o$y.prototype.contains=function(e){return!!(e$2e(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])},o$y.prototype.raise=function(e){if(e$2e(e)){var t=a$o(this,e),i=this._primitives;if(t!==i.length-1){var n=i[t];i[t]=i[t+1],i[t+1]=n}}},o$y.prototype.raiseToTop=function(e){if(e$2e(e)){var t=a$o(this,e),i=this._primitives;t!==i.length-1&&(i.splice(t,1),i.push(e))}},o$y.prototype.lower=function(e){if(e$2e(e)){var t=a$o(this,e),i=this._primitives;if(0!==t){var n=i[t];i[t]=i[t-1],i[t-1]=n}}},o$y.prototype.lowerToBottom=function(e){if(e$2e(e)){var t=a$o(this,e),i=this._primitives;0!==t&&(i.splice(t,1),i.unshift(e))}},o$y.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return this._primitives[e]},o$y.prototype.update=function(e){if(this.show)for(var t=this._primitives,i=0;i<t.length;++i)t[i].update(e)},o$y.prototype.prePassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var n=t[i];e$2e(n.prePassesUpdate)&&n.prePassesUpdate(e)}},o$y.prototype.updateForPass=function(e,t){for(var i=this._primitives,n=0;n<i.length;++n){var r=i[n];e$2e(r.updateForPass)&&r.updateForPass(e,t)}},o$y.prototype.postPassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var n=t[i];e$2e(n.postPassesUpdate)&&n.postPassesUpdate(e)}},o$y.prototype.isDestroyed=function(){return!1},o$y.prototype.destroy=function(){return this.removeAll(),i$11(this)},Object.defineProperties(r$t.prototype,{length:{get:function(){return this._length}}}),r$t.prototype.add=function(e,t){o$1q.defined("primitive",e),e$2e(t)&&o$1q.typeOf.number("zIndex",t),t=u$Z(t,0);var i=this._collections[t];if(!e$2e(i)){(i=new o$y({destroyPrimitives:!1}))._zIndex=t,this._collections[t]=i;for(var n=this._collectionsArray,r=0;r<n.length&&n[r]._zIndex<t;)r++;n.splice(r,0,i)}return i.add(e),this._length++,e._zIndex=t,e},r$t.prototype.set=function(e,t){return o$1q.defined("primitive",e),o$1q.typeOf.number("zIndex",t),t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e},r$t.prototype.remove=function(e,t){if(this.contains(e)){var i,n=e._zIndex,r=this._collections[n];return(i=t?r.remove(e):r.removeAndDestroy(e))&&this._length--,0===r.length&&(this._collectionsArray.splice(this._collectionsArray.indexOf(r),1),this._collections[n]=void 0,r.destroy()),i}return!1},r$t.prototype.removeAll=function(){for(var e=this._collectionsArray,t=0;t<e.length;t++){var i=e[t];i.destroyPrimitives=!0,i.destroy()}this._collections={},this._collectionsArray=[],this._length=0},r$t.prototype.contains=function(e){if(!e$2e(e))return!1;var t=this._collections[e._zIndex];return e$2e(t)&&t.contains(e)},r$t.prototype.update=function(e){if(this.show)for(var t=this._collectionsArray,i=0;i<t.length;i++)t[i].update(e)},r$t.prototype.isDestroyed=function(){return!1},r$t.prototype.destroy=function(){return this.removeAll(),i$11(this)},r$s.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))},r$s.prototype.remove=function(e){var t=e.id,i=this._dynamicUpdaters.get(t);e$2e(i)&&(this._dynamicUpdaters.remove(t),i.destroy())},r$s.prototype.update=function(e){for(var t=this._dynamicUpdaters.values,i=0,n=t.length;i<n;i++)t[i].update(e);return!0},r$s.prototype.removeAllPrimitives=function(){for(var e=this._dynamicUpdaters.values,t=0,i=e.length;t<i;t++)e[t].destroy();this._dynamicUpdaters.removeAll()},r$s.prototype.getBoundingSphere=function(e,t){return e$2e(e=this._dynamicUpdaters.get(e.id))&&e$2e(e.getBoundingSphere)?e.getBoundingSphere(t):R$w.FAILED};var I$C=new e$1X,E$v=o$1p.ZERO,H$z=new o$1p,D$q=new h$18;function L$u(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function u$s(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new L$u(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}function h$w(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(u$s.prototype=Object.create(i$x.prototype),u$s.prototype.constructor=u$s),u$s.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,I$C)),e$2e(t)||(t=e$1X.WHITE),r.color=o$16.fromColor(t));return e$2e(this._options.offsetAttribute)&&(r.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,E$v,H$z))),new d$1o({id:i,geometry:new Y$A(this._options),attributes:r})},u$s.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,I$C),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r),offset:void 0};return e$2e(this._options.offsetAttribute)&&(o.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,E$v,H$z))),new d$1o({id:t,geometry:new M$K(this._options),attributes:o})},u$s.prototype._computeCenter=function(e,t){return r$_.getValueOrUndefined(this._entity.position,e,t)},u$s.prototype._isHidden=function(e,t){return!e$2e(e.position)||!e$2e(t.semiMajorAxis)||!e$2e(t.semiMinorAxis)||i$G.prototype._isHidden.call(this,e,t)},u$s.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!r$_.isConstant(t.rotation)||!r$_.isConstant(t.height)||!r$_.isConstant(t.extrudedHeight)||!r$_.isConstant(t.granularity)||!r$_.isConstant(t.stRotation)||!r$_.isConstant(t.outlineWidth)||!r$_.isConstant(t.numberOfVerticalLines)||!r$_.isConstant(t.zIndex)||this._onTerrain&&!r$_.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$P)},u$s.prototype._setStaticOptions=function(e,t){var i=r$_.getValueOrUndefined(t.height,o$I.MINIMUM_VALUE),n=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),r=r$_.getValueOrUndefined(t.extrudedHeight,o$I.MINIMUM_VALUE),o=r$_.getValueOrDefault(t.extrudedHeightReference,o$I.MINIMUM_VALUE,k$R.NONE);e$2e(r)&&!e$2e(i)&&(i=0);var a=this._options;a.vertexFormat=this._materialProperty instanceof t$P?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,a.center=e.position.getValue(o$I.MINIMUM_VALUE,a.center),a.semiMajorAxis=t.semiMajorAxis.getValue(o$I.MINIMUM_VALUE,a.semiMajorAxis),a.semiMinorAxis=t.semiMinorAxis.getValue(o$I.MINIMUM_VALUE,a.semiMinorAxis),a.rotation=r$_.getValueOrUndefined(t.rotation,o$I.MINIMUM_VALUE),a.granularity=r$_.getValueOrUndefined(t.granularity,o$I.MINIMUM_VALUE),a.stRotation=r$_.getValueOrUndefined(t.stRotation,o$I.MINIMUM_VALUE),a.numberOfVerticalLines=r$_.getValueOrUndefined(t.numberOfVerticalLines,o$I.MINIMUM_VALUE),a.offsetAttribute=i$x.computeGeometryOffsetAttribute(i,n,r,o),a.height=i$x.getGeometryHeight(i,n),a.outlineWidth=t.outlineWidth?t.outlineWidth.getValue():1,(r=i$x.getGeometryExtrudedHeight(r,o))===i$x.CLAMP_TO_GROUND&&(r=e$1H.getMinimumMaximumHeights(Y$A.computeRectangle(a,D$q)).minimumTerrainHeight),a.extrudedHeight=r},u$s.DynamicGeometryUpdater=h$w,e$2e(Object.create)&&(h$w.prototype=Object.create(a$C.prototype),h$w.prototype.constructor=h$w),h$w.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2e(n.center)||!e$2e(n.semiMajorAxis)||!e$2e(n.semiMinorAxis)||a$C.prototype._isHidden.call(this,e,t,i)},h$w.prototype._setOptions=function(e,t,i){var n=this._options,r=r$_.getValueOrUndefined(t.height,i),o=r$_.getValueOrDefault(t.heightReference,i,k$R.NONE),a=r$_.getValueOrUndefined(t.extrudedHeight,i),s=r$_.getValueOrDefault(t.extrudedHeightReference,i,k$R.NONE);e$2e(a)&&!e$2e(r)&&(r=0),n.center=r$_.getValueOrUndefined(e.position,i,n.center),n.semiMajorAxis=r$_.getValueOrUndefined(t.semiMajorAxis,i),n.semiMinorAxis=r$_.getValueOrUndefined(t.semiMinorAxis,i),n.rotation=r$_.getValueOrUndefined(t.rotation,i),n.granularity=r$_.getValueOrUndefined(t.granularity,i),n.stRotation=r$_.getValueOrUndefined(t.stRotation,i),n.numberOfVerticalLines=r$_.getValueOrUndefined(t.numberOfVerticalLines,i),n.offsetAttribute=i$x.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$x.getGeometryHeight(r,o),(a=i$x.getGeometryExtrudedHeight(a,s))===i$x.CLAMP_TO_GROUND&&(a=e$1H.getMinimumMaximumHeights(Y$A.computeRectangle(n,D$q)).minimumTerrainHeight),n.extrudedHeight=a};var pe$f=new t$P(e$1X.WHITE),G$v=o$1p.ZERO,L$t=new o$1p,ye$9=new o$1p,_e$8=new o$1p,F$v=new e$1X,ve$b=new o$1p(1,1,1);function Ce$7(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function l$z(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new Ce$7(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}function M$v(e,t,i){a$C.call(this,e,t,i),this._scene=e._scene,this._modelMatrix=new p$1d,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new o$1p,this._material={}}e$2e(Object.create)&&(l$z.prototype=Object.create(i$G.prototype),l$z.prototype.constructor=l$z),Object.defineProperties(l$z.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),l$z.prototype.createFillGeometryInstance=function(e,t,i){o$1q.defined("time",e);var n,r,o=this._entity,a=o.isAvailable(e),s=new e$1I(a&&o.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),l=this._distanceDisplayConditionProperty.getValue(e),u={show:s,distanceDisplayCondition:t$A.fromDistanceDisplayCondition(l),color:void 0,offset:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||a)&&(r=this._materialProperty.color.getValue(e,F$v)),e$2e(r)||(r=e$1X.WHITE),n=o$16.fromColor(r),u.color=n);return e$2e(this._options.offsetAttribute)&&(u.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,G$v,L$t))),new d$1o({id:o,geometry:new b$O(this._options),modelMatrix:t?void 0:o.computeModelMatrixForHeightReference(e,o.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:u})},l$z.prototype.createOutlineGeometryInstance=function(e,t,i){o$1q.defined("time",e);var n=this._entity,r=n.isAvailable(e),o=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,F$v),a=this._distanceDisplayConditionProperty.getValue(e),s={show:new e$1I(r&&n.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(o),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(a),offset:void 0};return e$2e(this._options.offsetAttribute)&&(s.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,G$v,L$t))),new d$1o({id:n,geometry:new x$13(this._options),modelMatrix:t?void 0:n.computeModelMatrixForHeightReference(e,n.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:s})},l$z.prototype._computeCenter=function(e,t){return r$_.getValueOrUndefined(this._entity.position,e,t)},l$z.prototype._isHidden=function(e,t){return!e$2e(e.position)||!e$2e(t.radii)||i$G.prototype._isHidden.call(this,e,t)},l$z.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$_.isConstant(e.orientation)&&t.radii.isConstant&&r$_.isConstant(t.innerRadii)&&r$_.isConstant(t.stackPartitions)&&r$_.isConstant(t.slicePartitions)&&r$_.isConstant(t.outlineWidth)&&r$_.isConstant(t.minimumClock)&&r$_.isConstant(t.maximumClock)&&r$_.isConstant(t.minimumCone)&&r$_.isConstant(t.maximumCone)&&r$_.isConstant(t.subdivisions))},l$z.prototype._setStaticOptions=function(e,t){var i=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$P?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,n.radii=t.radii.getValue(o$I.MINIMUM_VALUE,n.radii),n.innerRadii=r$_.getValueOrUndefined(t.innerRadii,n.radii),n.minimumClock=r$_.getValueOrUndefined(t.minimumClock,o$I.MINIMUM_VALUE),n.maximumClock=r$_.getValueOrUndefined(t.maximumClock,o$I.MINIMUM_VALUE),n.minimumCone=r$_.getValueOrUndefined(t.minimumCone,o$I.MINIMUM_VALUE),n.maximumCone=r$_.getValueOrUndefined(t.maximumCone,o$I.MINIMUM_VALUE),n.stackPartitions=r$_.getValueOrUndefined(t.stackPartitions,o$I.MINIMUM_VALUE),n.slicePartitions=r$_.getValueOrUndefined(t.slicePartitions,o$I.MINIMUM_VALUE),n.subdivisions=r$_.getValueOrUndefined(t.subdivisions,o$I.MINIMUM_VALUE),n.offsetAttribute=i!==k$R.NONE?_0x39c22a.ALL:void 0},l$z.prototype._onEntityPropertyChanged=a$B,l$z.DynamicGeometryUpdater=M$v,e$2e(Object.create)&&(M$v.prototype=Object.create(a$C.prototype),M$v.prototype.constructor=M$v),M$v.prototype.update=function(e){o$1q.defined("time",e);var t=this._entity,i=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!r$_.getValueOrDefault(i.show,e,!0))return e$2e(this._primitive)&&(this._primitive.show=!1),void(e$2e(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var n=r$_.getValueOrUndefined(i.radii,e,ye$9),r=e$2e(n)?t.computeModelMatrixForHeightReference(e,i.heightReference,.5*n.z,this._scene.mapProjection.ellipsoid,this._modelMatrix):void 0;if(!e$2e(r)||!e$2e(n))return e$2e(this._primitive)&&(this._primitive.show=!1),void(e$2e(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var o=r$_.getValueOrDefault(i.fill,e,!0),a=r$_.getValueOrDefault(i.outline,e,!1),s=r$_.getValueOrClonedDefault(i.outlineColor,e,e$1X.BLACK,F$v),l=r$C.getValue(e,u$Z(i.material,pe$f),this._material),u=r$_.getValueOrUndefined(i.innerRadii,e,_e$8),c=r$_.getValueOrUndefined(i.minimumClock,e),h=r$_.getValueOrUndefined(i.maximumClock,e),d=r$_.getValueOrUndefined(i.minimumCone,e),f=r$_.getValueOrUndefined(i.maximumCone,e),p=r$_.getValueOrUndefined(i.stackPartitions,e),_=r$_.getValueOrUndefined(i.slicePartitions,e),m=r$_.getValueOrUndefined(i.subdivisions,e),g=r$_.getValueOrDefault(i.outlineWidth,e,1),x=r$_.getValueOrDefault(i.heightReference,e,k$R.NONE),y=x!==k$R.NONE?_0x39c22a.ALL:void 0,v=this._scene.mode,$=v===C$14.SCENE3D&&x===k$R.NONE,b=this._options,T=this._geometryUpdater.shadowsProperty.getValue(e),C=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),S=r$_.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,G$v,L$t);if(!$||this._lastSceneMode!==v||!e$2e(this._primitive)||b.stackPartitions!==p||b.slicePartitions!==_||e$2e(u)&&!o$1p.equals(b.innerRadii!==u)||b.minimumClock!==c||b.maximumClock!==h||b.minimumCone!==d||b.maximumCone!==f||b.subdivisions!==m||this._lastOutlineWidth!==g||b.offsetAttribute!==y){var w=this._primitives;if(w.removeAndDestroy(this._primitive),w.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=v,this._lastOutlineWidth=g,b.stackPartitions=p,b.slicePartitions=_,b.subdivisions=m,b.offsetAttribute=y,b.radii=o$1p.clone($?ve$b:n,b.radii),e$2e(u))if($){var E=o$1p.magnitude(n);b.innerRadii=o$1p.fromElements(u.x/E,u.y/E,u.z/E,b.innerRadii)}else b.innerRadii=o$1p.clone(u,b.innerRadii);else b.innerRadii=void 0;b.minimumClock=c,b.maximumClock=h,b.minimumCone=d,b.maximumCone=f;var P=new t$v({material:l,translucent:l.isTranslucent(),closed:!0});b.vertexFormat=P.vertexFormat;var A=this._geometryUpdater.createFillGeometryInstance(e,$,this._modelMatrix);this._primitive=w.add(new y$R({geometryInstances:A,appearance:P,asynchronous:!1,shadows:T}));var L=this._geometryUpdater.createOutlineGeometryInstance(e,$,this._modelMatrix);this._outlinePrimitive=w.add(new y$R({geometryInstances:L,appearance:new t$Q({flat:!0,translucent:255!==L.attributes.color.value[3],renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(g)}}),asynchronous:!1,shadows:T})),this._lastShow=o,this._lastOutlineShow=a,this._lastOutlineColor=e$1X.clone(s,this._lastOutlineColor),this._lastDistanceDisplayCondition=C,this._lastOffset=o$1p.clone(S,this._lastOffset)}else if(this._primitive.ready){var M=this._primitive,R=this._outlinePrimitive;M.show=!0,R.show=!0,M.appearance.material=l;var O=this._attributes;e$2e(O)||(O=M.getGeometryInstanceAttributes(t),this._attributes=O),o!==this._lastShow&&(O.show=e$1I.toValue(o,O.show),this._lastShow=o);var D=this._outlineAttributes;e$2e(D)||(D=R.getGeometryInstanceAttributes(t),this._outlineAttributes=D),a!==this._lastOutlineShow&&(D.show=e$1I.toValue(a,D.show),this._lastOutlineShow=a),e$1X.equals(s,this._lastOutlineColor)||(D.color=o$16.toValue(s,D.color),e$1X.clone(s,this._lastOutlineColor)),r$Z.equals(C,this._lastDistanceDisplayCondition)||(O.distanceDisplayCondition=t$A.toValue(C,O.distanceDisplayCondition),D.distanceDisplayCondition=t$A.toValue(C,D.distanceDisplayCondition),r$Z.clone(C,this._lastDistanceDisplayCondition)),o$1p.equals(S,this._lastOffset)||(O.offset=e$1E.toValue(S,O.offset),D.offset=e$1E.toValue(S,O.offset),o$1p.clone(S,this._lastOffset))}$&&(n.x=Math.max(n.x,.001),n.y=Math.max(n.y,.001),n.z=Math.max(n.z,.001),r=p$1d.multiplyByScale(r,n,r),this._primitive.modelMatrix=r,this._outlinePrimitive.modelMatrix=r)};var R$o=new o$1p,N$m=new e$1X;function z$r(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function p$n(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new z$r(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}function h$v(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(p$n.prototype=Object.create(i$G.prototype),p$n.prototype.constructor=p$n),p$n.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$1I(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=t$A.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$P?(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,N$m)),e$2e(i)||(i=e$1X.WHITE),t={show:o,distanceDisplayCondition:s,color:o$16.fromColor(i)}):t={show:o,distanceDisplayCondition:s};var l=n.plane,u=this._options,c=n.computeModelMatrix(e),h=r$_.getValueOrDefault(l.plane,e,u.plane),d=r$_.getValueOrUndefined(l.dimensions,e,u.dimensions);return u.plane=h,u.dimensions=d,c=O$m(h,d,c,this._scene.mapProjection.ellipsoid,c),new d$1o({id:n,geometry:new f$L(this._options),modelMatrix:c,attributes:t})},p$n.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,N$m),r=this._distanceDisplayConditionProperty.getValue(e),o=t.plane,a=this._options,s=t.computeModelMatrix(e),l=r$_.getValueOrDefault(o.plane,e,a.plane),u=r$_.getValueOrUndefined(o.dimensions,e,a.dimensions);return a.plane=l,a.dimensions=u,s=O$m(l,u,s,this._scene.mapProjection.ellipsoid,s),new d$1o({id:t,geometry:new i$I,modelMatrix:s,attributes:{show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r)}})},p$n.prototype._isHidden=function(e,t){return!e$2e(t.plane)||!e$2e(t.dimensions)||!e$2e(e.position)||i$G.prototype._isHidden.call(this,e,t)},p$n.prototype._getIsClosed=function(e){return!1},p$n.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$_.isConstant(e.orientation)&&t.plane.isConstant&&t.dimensions.isConstant&&r$_.isConstant(t.outlineWidth))},p$n.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$P,n=this._options;n.vertexFormat=i?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,n.plane=t.plane.getValue(o$I.MINIMUM_VALUE,n.plane),n.dimensions=t.dimensions.getValue(o$I.MINIMUM_VALUE,n.dimensions)},p$n.DynamicGeometryUpdater=h$v,e$2e(Object.create)&&(h$v.prototype=Object.create(a$C.prototype),h$v.prototype.constructor=h$v),h$v.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2e(r$_.getValueOrUndefined(e.position,i,R$o))||!e$2e(n.plane)||!e$2e(n.dimensions)||a$C.prototype._isHidden.call(this,e,t,i)},h$v.prototype._setOptions=function(e,t,i){var n=this._options;n.plane=r$_.getValueOrDefault(t.plane,i,n.plane),n.dimensions=r$_.getValueOrUndefined(t.dimensions,i,n.dimensions)};var B$o=new o$1p,Q$q=new o$1p,X$l=new o$1p,q$r=new o$1p,W$w=new o$1p,k$p=new n$15,K$n=new p$1e;function O$m(e,t,i,n,r){var o=e.normal,a=e.distance,s=o$1p.multiplyByScalar(o,-a,X$l);s=p$1d.multiplyByPoint(i,s,s);var l=p$1d.multiplyByPointAsVector(i,o,q$r);o$1p.normalize(l,l);var u=n.geodeticSurfaceNormal(s,Q$q);e$2d.equalsEpsilon(Math.abs(o$1p.dot(u,l)),1,e$2d.EPSILON8)&&(u=o$1p.clone(o$1p.UNIT_Z,u),e$2d.equalsEpsilon(Math.abs(o$1p.dot(u,l)),1,e$2d.EPSILON8)&&(u=o$1p.clone(o$1p.UNIT_X,u)));var c=o$1p.cross(u,l,B$o);u=o$1p.cross(l,c,u),o$1p.normalize(c,c),o$1p.normalize(u,u);var h=K$n;p$1e.setColumn(h,0,c,h),p$1e.setColumn(h,1,u,h),p$1e.setColumn(h,2,l,h);var d=n$15.fromRotationMatrix(h,k$p),f=o$1o.clone(t,W$w);return f.z=1,p$1d.fromTranslationQuaternionRotationScale(s,d,f,r)}p$n.createPrimitiveMatrix=O$m;var B$n="Entity polygons cannot have both height and perPositionHeight. height will be ignored",S$q="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",j$t=new e$1X,F$u=o$1p.ZERO,W$v=new o$1p,X$k=new h$18,te$g=[],re$k=new o$1o;function ie$c(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0,this.depthTestEnabled=void 0,this.groundBottomAltitude=void 0,this.groundExtrudedHeight=void 0}function l$y(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new ie$c(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}function v$u(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(l$y.prototype=Object.create(i$x.prototype),l$y.prototype.constructor=l$y),l$y.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=this._options,o={show:new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,j$t)),e$2e(t)||(t=e$1X.WHITE),o.color=o$16.fromColor(t));return e$2e(r.offsetAttribute)&&(o.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,F$u,W$v))),new d$1o({id:i,geometry:r.perPositionHeight&&!e$2e(r.extrudedHeight)?new P$H(r):new U$18(r),attributes:o})},l$y.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=this._options,r=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,j$t),o=this._distanceDisplayConditionProperty.getValue(e),a={show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(r),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(o),offset:void 0};return e$2e(n.offsetAttribute)&&(a.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,F$u,W$v))),new d$1o({id:t,geometry:n.perPositionHeight&&!e$2e(n.extrudedHeight)?new a$G(n):new A$U(n),attributes:a})},l$y.prototype._computeCenter=function(e,t){var i=r$_.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(e$2e(i)){var n=i.positions;if(0!==n.length){for(var r=this._scene.mapProjection.ellipsoid,o=f$16.fromPoints(n,r),a=o.projectPointsOntoPlane(n,te$g),s=a.length,l=0,u=s-1,c=new o$1o,h=0;h<s;u=h++){var d=a[h],f=a[u],p=d.x*f.y-f.x*d.y,_=o$1o.add(d,f,re$k);_=o$1o.multiplyByScalar(_,p,_),c=o$1o.add(c,_,c),l+=p}var m=1/(3*l);return c=o$1o.multiplyByScalar(c,m,c),o.projectPointOntoEllipsoid(c,t)}}},l$y.prototype._isHidden=function(e,t){return!e$2e(t.hierarchy)||i$G.prototype._isHidden.call(this,e,t)},l$y.prototype._isOnTerrain=function(e,t){var i=i$x.prototype._isOnTerrain.call(this,e,t),n=t.perPositionHeight,r=e$2e(n)&&(!n.isConstant||n.getValue(o$I.MINIMUM_VALUE));return i&&!r},l$y.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!r$_.isConstant(t.height)||!r$_.isConstant(t.extrudedHeight)||!r$_.isConstant(t.granularity)||!r$_.isConstant(t.stRotation)||!r$_.isConstant(t.outlineWidth)||!r$_.isConstant(t.perPositionHeight)||!r$_.isConstant(t.closeTop)||!r$_.isConstant(t.closeBottom)||!r$_.isConstant(t.zIndex)||!r$_.isConstant(t.arcType)||this._onTerrain&&!r$_.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$P)},l$y.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$P,n=this._options;n.vertexFormat=i?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat;var r,o=t.hierarchy.getValue(o$I.MINIMUM_VALUE),a=r$_.getValueOrUndefined(t.height,o$I.MINIMUM_VALUE),s=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),l=r$_.getValueOrUndefined(t.extrudedHeight,o$I.MINIMUM_VALUE),u=r$_.getValueOrDefault(t.extrudedHeightReference,o$I.MINIMUM_VALUE,k$R.NONE),c=r$_.getValueOrDefault(t.perPositionHeight,o$I.MINIMUM_VALUE,!1);a=i$x.getGeometryHeight(a,s),c?(e$2e(a)&&(a=void 0,e$22(B$n)),s!==k$R.NONE&&c&&(a=void 0,e$22(S$q))):(e$2e(l)&&!e$2e(a)&&(a=0),r=i$x.computeGeometryOffsetAttribute(a,s,l,u)),n.polygonHierarchy=o,n.granularity=r$_.getValueOrUndefined(t.granularity,o$I.MINIMUM_VALUE),n.stRotation=r$_.getValueOrUndefined(t.stRotation,o$I.MINIMUM_VALUE),n.perPositionHeight=c,n.closeTop=r$_.getValueOrDefault(t.closeTop,o$I.MINIMUM_VALUE,!0),n.closeBottom=r$_.getValueOrDefault(t.closeBottom,o$I.MINIMUM_VALUE,!0),n.offsetAttribute=r,n.height=a,n.arcType=r$_.getValueOrDefault(t.arcType,o$I.MINIMUM_VALUE,m$1h.GEODESIC),n.depthTestEnabled=!e$2e(e._depthTestEnabled)||e._depthTestEnabled,(l=i$x.getGeometryExtrudedHeight(l,u))===i$x.CLAMP_TO_GROUND&&(l=e$1H.getMinimumMaximumHeights(U$18.computeRectangle(n,X$k)).minimumTerrainHeight),n.extrudedHeight=l,n.groundBottomAltitude=r$_.getValueOrUndefined(t.groundBottomAltitude,o$I.MINIMUM_VALUE),n.groundExtrudedHeight=r$_.getValueOrUndefined(t.groundExtrudedHeight,o$I.MINIMUM_VALUE)},l$y.prototype._getIsClosed=function(e){var t=e.height,i=e.extrudedHeight,n=e$2e(i)&&i!==t;return!e.perPositionHeight&&(!n&&0===t||n&&e.closeTop&&e.closeBottom)},l$y.DynamicGeometryUpdater=v$u,e$2e(Object.create)&&(v$u.prototype=Object.create(a$C.prototype),v$u.prototype.constructor=v$u),v$u.prototype._isHidden=function(e,t,i){return!e$2e(this._options.polygonHierarchy)||a$C.prototype._isHidden.call(this,e,t,i)},v$u.prototype._setOptions=function(e,t,i){var n=this._options;n.polygonHierarchy=r$_.getValueOrUndefined(t.hierarchy,i),Array.isArray(n.polygonHierarchy)&&(n.polygonHierarchy=new e$1M(n.polygonHierarchy));var r,o=r$_.getValueOrUndefined(t.height,i),a=r$_.getValueOrDefault(t.heightReference,i,k$R.NONE),s=r$_.getValueOrDefault(t.extrudedHeightReference,i,k$R.NONE),l=r$_.getValueOrUndefined(t.extrudedHeight,i),u=r$_.getValueOrUndefined(t.perPositionHeight,i);o=i$x.getGeometryHeight(o,s),u?(e$2e(o)&&(o=void 0,e$22(B$n)),a!==k$R.NONE&&u&&(o=void 0,e$22(S$q))):(e$2e(l)&&!e$2e(o)&&(o=0),r=i$x.computeGeometryOffsetAttribute(o,a,l,s)),n.granularity=r$_.getValueOrUndefined(t.granularity,i),n.stRotation=r$_.getValueOrUndefined(t.stRotation,i),n.perPositionHeight=r$_.getValueOrUndefined(t.perPositionHeight,i),n.closeTop=r$_.getValueOrDefault(t.closeTop,i,!0),n.closeBottom=r$_.getValueOrDefault(t.closeBottom,i,!0),n.offsetAttribute=r,n.height=o,n.arcType=r$_.getValueOrDefault(t.arcType,i,m$1h.GEODESIC),(l=i$x.getGeometryExtrudedHeight(l,s))===i$x.CLAMP_TO_GROUND&&(l=e$1H.getMinimumMaximumHeights(U$18.computeRectangle(n,X$k)).minimumTerrainHeight),n.extrudedHeight=l};var M$u=new e$1X;function A$A(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0,this.enuCenter=void 0}function a$n(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new A$A(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}function l$x(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(a$n.prototype=Object.create(i$G.prototype),a$n.prototype.constructor=a$n),a$n.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$1I(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=t$A.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$P?(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,M$u)),e$2e(i)||(i=e$1X.WHITE),t={show:o,distanceDisplayCondition:s,color:o$16.fromColor(i)}):t={show:o,distanceDisplayCondition:s};return new d$1o({id:n,geometry:new N$A(this._options),attributes:t})},a$n.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,M$u),r=this._distanceDisplayConditionProperty.getValue(e);return new d$1o({id:t,geometry:new _$z(this._options),attributes:{show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r)}})},a$n.prototype._isHidden=function(e,t){return!e$2e(t.positions)||!e$2e(t.shape)||i$G.prototype._isHidden.call(this,e,t)},a$n.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&t.shape.isConstant&&r$_.isConstant(t.granularity)&&r$_.isConstant(t.outlineWidth)&&r$_.isConstant(t.cornerType))},a$n.prototype._setStaticOptions=function(e,t){var i=t.granularity,n=t.cornerType,r=t.enuCenter,o=this._options,a=this._materialProperty instanceof t$P;o.vertexFormat=a?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(o$I.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(o$I.MINIMUM_VALUE,o.shape),o.granularity=e$2e(i)?i.getValue(o$I.MINIMUM_VALUE):void 0,o.cornerType=e$2e(n)?n.getValue(o$I.MINIMUM_VALUE):void 0,o.enuCenter=e$2e(r)?r.getValue(o$I.MINIMUM_VALUE):void 0},a$n.DynamicGeometryUpdater=l$x,e$2e(Object.create)&&(l$x.prototype=Object.create(a$C.prototype),l$x.prototype.constructor=l$x),l$x.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2e(n.polylinePositions)||!e$2e(n.shapePositions)||a$C.prototype._isHidden.call(this,e,t,i)},l$x.prototype._setOptions=function(e,t,i){var n=this._options;n.polylinePositions=r$_.getValueOrUndefined(t.positions,i,n.polylinePositions),n.shapePositions=r$_.getValueOrUndefined(t.shape,i),n.granularity=r$_.getValueOrUndefined(t.granularity,i),n.cornerType=r$_.getValueOrUndefined(t.cornerType,i)};var D$p=new e$1X,G$u=o$1p.ZERO,E$u=new o$1p,w$q=new h$18,S$p=new h$18,F$t=new a$18;function j$s(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function d$B(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new j$s(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}function h$u(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(d$B.prototype=Object.create(i$x.prototype),d$B.prototype.constructor=d$B),d$B.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,D$p)),e$2e(t)||(t=e$1X.WHITE),r.color=o$16.fromColor(t));return e$2e(this._options.offsetAttribute)&&(r.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,G$u,E$u))),new d$1o({id:i,geometry:new j$N(this._options),attributes:r})},d$B.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,D$p),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r),offset:void 0};return e$2e(this._options.offsetAttribute)&&(o.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,G$u,E$u))),new d$1o({id:t,geometry:new k$I(this._options),attributes:o})},d$B.prototype._computeCenter=function(e,t){var i=r$_.getValueOrUndefined(this._entity.rectangle.coordinates,e,S$p);if(e$2e(i)){var n=h$18.center(i,F$t);return a$18.toCartesian(n,t$12.WGS84,t)}},d$B.prototype._isHidden=function(e,t){return!e$2e(t.coordinates)||i$G.prototype._isHidden.call(this,e,t)},d$B.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!r$_.isConstant(t.height)||!r$_.isConstant(t.extrudedHeight)||!r$_.isConstant(t.granularity)||!r$_.isConstant(t.stRotation)||!r$_.isConstant(t.rotation)||!r$_.isConstant(t.outlineWidth)||!r$_.isConstant(t.zIndex)||this._onTerrain&&!r$_.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$P)},d$B.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$P,n=r$_.getValueOrUndefined(t.height,o$I.MINIMUM_VALUE),r=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),o=r$_.getValueOrUndefined(t.extrudedHeight,o$I.MINIMUM_VALUE),a=r$_.getValueOrDefault(t.extrudedHeightReference,o$I.MINIMUM_VALUE,k$R.NONE);e$2e(o)&&!e$2e(n)&&(n=0);var s=this._options;s.vertexFormat=i?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,s.rectangle=t.coordinates.getValue(o$I.MINIMUM_VALUE,s.rectangle),s.granularity=r$_.getValueOrUndefined(t.granularity,o$I.MINIMUM_VALUE),s.stRotation=r$_.getValueOrUndefined(t.stRotation,o$I.MINIMUM_VALUE),s.rotation=r$_.getValueOrUndefined(t.rotation,o$I.MINIMUM_VALUE),s.offsetAttribute=i$x.computeGeometryOffsetAttribute(n,r,o,a),s.height=i$x.getGeometryHeight(n,r),(o=i$x.getGeometryExtrudedHeight(o,a))===i$x.CLAMP_TO_GROUND&&(o=e$1H.getMinimumMaximumHeights(j$N.computeRectangle(s,w$q)).minimumTerrainHeight),s.extrudedHeight=o},d$B.DynamicGeometryUpdater=h$u,e$2e(Object.create)&&(h$u.prototype=Object.create(a$C.prototype),h$u.prototype.constructor=h$u),h$u.prototype._isHidden=function(e,t,i){return!e$2e(this._options.rectangle)||a$C.prototype._isHidden.call(this,e,t,i)},h$u.prototype._setOptions=function(e,t,i){var n=this._options,r=r$_.getValueOrUndefined(t.height,i),o=r$_.getValueOrDefault(t.heightReference,i,k$R.NONE),a=r$_.getValueOrUndefined(t.extrudedHeight,i),s=r$_.getValueOrDefault(t.extrudedHeightReference,i,k$R.NONE);e$2e(a)&&!e$2e(r)&&(r=0),n.rectangle=r$_.getValueOrUndefined(t.coordinates,i,n.rectangle),n.granularity=r$_.getValueOrUndefined(t.granularity,i),n.stRotation=r$_.getValueOrUndefined(t.stRotation,i),n.rotation=r$_.getValueOrUndefined(t.rotation,i),n.offsetAttribute=i$x.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$x.getGeometryHeight(r,o),(a=i$x.getGeometryExtrudedHeight(a,s))===i$x.CLAMP_TO_GROUND&&(a=e$1H.getMinimumMaximumHeights(j$N.computeRectangle(n,w$q)).minimumTerrainHeight),n.extrudedHeight=a};var W$u=new e$1X,Y$m=new r$Z,$$p=new r$Z,ee$k=o$1p.ZERO,te$f=new o$1p;function v$t(e,t,i,n,r,o,a){var s;this.translucent=t,this.appearanceType=i,this.depthFailAppearanceType=n,this.depthFailMaterialProperty=r,this.depthFailMaterial=void 0,this.closed=o,this.shadows=a,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1Q,this.updaters=new e$1Q,this.updatersWithAttributes=new e$1Q,this.attributes=new e$1Q,this.subscriptions=new e$1Q,this.showsUpdated=new e$1Q,this.itemsToRemove=[],this.invalidated=!1,this.asynchronous=!0,e$2e(r)&&(s=r.definitionChanged.addEventListener(v$t.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=s}function y$s(e,t,i,n,r){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=n,this._shadows=r}function q$q(e,t){for(var i=e.length-1;i>=0;i--){var n=e[i];if(n.remove(t))return 0===n.updaters.length&&(e.splice(i,1),n.destroy()),!0}return!1}function L$s(e,t,i){for(var n=!1,r=t.length,o=0;o<r;++o){var a=t[o],s=a.itemsToRemove,l=s.length;if(l>0)for(o=0;o<l;o++){var u=s[o];a.remove(u),e.add(i,u),n=!0}}return n}function C$t(e,t,i,n){var r,o=t.length;for(r=o-1;r>=0;r--){var a=t[r];if(a.invalidated){t.splice(r,1);for(var s=a.updaters.values,l=s.length,u=0;u<l;u++)e.add(i,s[u]);a.destroy()}}for(o=t.length,r=0;r<o;++r)n=t[r].update(i)&&n;return n}function N$l(e,t,i){for(var n=e.length,r=0;r<n;r++){var o=e[r];if(o.contains(t))return o.getBoundingSphere(t,i)}return R$w.FAILED}function x$v(e){for(var t=e.length,i=0;i<t;i++)e[i].destroy();e.length=0}v$t.prototype.onMaterialChanged=function(){this.invalidated=!0},v$t.prototype.isMaterial=function(e){var t=this.depthFailMaterialProperty,i=e.depthFailMaterialProperty;return i===t||!!e$2e(t)&&t.equals(i)},v$t.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,e$2e(e.asynchronous)&&(this.asynchronous=e.asynchronous),this.enuCenter=e._options&&e._options.enuCenter,e$2e(this.enuCenter)&&(this.materialSupport=t$Q.MaterialSupport.FLOAT_POSITION),this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&r$_.isConstant(e.distanceDisplayConditionProperty)&&r$_.isConstant(e.terrainOffsetProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},v$t.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2e(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},v$t.prototype.update=function(e){var t,i=!0,n=0,r=this.primitive,o=this.primitives;if(this.createPrimitive){var a=this.geometry.values;if(a.length>0){var s;e$2e(r)&&(e$2e(this.oldPrimitive)?o.remove(r):this.oldPrimitive=r),e$2e(this.depthFailAppearanceType)&&(e$2e(this.depthFailMaterialProperty)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),s=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),(r=new y$R({show:!1,asynchronous:this.asynchronous,geometryInstances:a,appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed,materialSupport:this.materialSupport,renderState:{depthTest:{enabled:this._depthTestEnabled}}}),depthFailAppearance:s,shadows:this.shadows,updateBoundingSphere:!e$2e(this.enuCenter),modelMatrix:e$2e(this.enuCenter)?m$19.eastNorthUpToFixedFrame(this.enuCenter,t$12.WGS84,new p$1d):void 0}))._polygonOffset=this.polygonOffset,o.add(r),i=!1}else{e$2e(r)&&(o.remove(r),r=void 0);var l=this.oldPrimitive;e$2e(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(e$2e(r)&&r.ready){r.show=!0,e$2e(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),e$2e(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof t$P)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);var u=this.updatersWithAttributes.values,c=u.length,h=this.waitingOnCreate;for(t=0;t<c;t++){var d=u[t],f=this.geometry.get(d.id),p=this.attributes.get(f.id.id);if(e$2e(p)||(p=r.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,p)),!d.fillMaterialProperty.isConstant||h){var _=d.fillMaterialProperty.color,m=r$_.getValueOrDefault(_,e,e$1X.WHITE,W$u);e$1X.equals(p._lastColor,m)||(p._lastColor=e$1X.clone(m,p._lastColor),p.color=o$16.toValue(m,p.color),(this.translucent&&255===p.color[3]||!this.translucent&&255!==p.color[3])&&(this.itemsToRemove[n++]=d))}if(e$2e(this.depthFailAppearanceType)&&d.depthFailMaterialProperty instanceof t$P&&(!d.depthFailMaterialProperty.isConstant||h)){var g=d.depthFailMaterialProperty.color,x=r$_.getValueOrDefault(g,e,e$1X.WHITE,W$u);e$1X.equals(p._lastDepthFailColor,x)||(p._lastDepthFailColor=e$1X.clone(x,p._lastDepthFailColor),p.depthFailColor=o$16.toValue(x,p.depthFailColor))}var y=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e));y!==(1===p.show[0])&&(p.show=e$1I.toValue(y,p.show));var v=d.distanceDisplayConditionProperty;if(!r$_.isConstant(v)){var $=r$_.getValueOrDefault(v,e,$$p,Y$m);r$Z.equals($,p._lastDistanceDisplayCondition)||(p._lastDistanceDisplayCondition=r$Z.clone($,p._lastDistanceDisplayCondition),p.distanceDisplayCondition=t$A.toValue($,p.distanceDisplayCondition))}var b=d.terrainOffsetProperty;if(!r$_.isConstant(b)){var T=r$_.getValueOrDefault(b,e,ee$k,te$f);o$1p.equals(T,p._lastOffset)||(p._lastOffset=o$1p.clone(T,p._lastOffset),p.offset=e$1E.toValue(T,p.offset))}}this.updateShows(r),this.waitingOnCreate=!1}else e$2e(r)&&!r.ready&&(i=!1);return this.itemsToRemove.length=n,i},v$t.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);e$2e(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$1I.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},v$t.prototype.contains=function(e){return this.updaters.contains(e.id)},v$t.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2e(n)||!e$2e(n.boundingSphere)||e$2e(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},v$t.prototype.destroy=function(){var e=this.primitive,t=this.primitives;e$2e(e)&&t.remove(e);var i=this.oldPrimitive;e$2e(i)&&t.remove(i),e$2e(this.removeMaterialSubscription)&&this.removeMaterialSubscription()},y$s.prototype.add=function(e,t){var i,n,r=t.createFillGeometryInstance(e);255===r.attributes.color.value[3]?(i=this._solidItems,n=!1):(i=this._translucentItems,n=!0);for(var o=i.length,a=0;a<o;a++){var s=i[a];if(this.enuCenter)break;if(!s._hasEnuCenter&&s.isMaterial(t))return void s.add(t,r)}var l=new v$t(this._primitives,n,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);l._hasEnuCenter=t._options&&!!t._options.enuCenter,l._depthTestEnabled=!e$2e(t._options)||!e$2e(t._options.depthTestEnabled)||t._options.depthTestEnabled,l.polygonOffset=t._entity._polygonOffset,l.add(t,r),i.push(l)},y$s.prototype.remove=function(e){q$q(this._solidItems,e)||q$q(this._translucentItems,e)},y$s.prototype.update=function(e){var t=C$t(this,this._solidItems,e,!0);t=C$t(this,this._translucentItems,e,t)&&t;var i=L$s(this,this._solidItems,e),n=L$s(this,this._translucentItems,e);return(i||n)&&(t=C$t(this,this._solidItems,e,t)&&t,t=C$t(this,this._translucentItems,e,t)&&t),t},y$s.prototype.getBoundingSphere=function(e,t){var i=N$l(this._solidItems,e,t);return i===R$w.FAILED?N$l(this._translucentItems,e,t):i},y$s.prototype.removeAllPrimitives=function(){x$v(this._solidItems),x$v(this._translucentItems)};var J$n=new r$Z,K$m=new r$Z,Q$p=o$1p.ZERO,Y$l=new o$1p;function p$m(e,t,i,n,r,o,a){this.primitives=e,this.appearanceType=t,this.materialProperty=i,this.depthFailAppearanceType=n,this.depthFailMaterialProperty=r,this.closed=o,this.shadows=a,this.updaters=new e$1Q,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1Q,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new e$1Q,this.attributes=new e$1Q,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(p$m.prototype.onMaterialChanged,this),this.subscriptions=new e$1Q,this.showsUpdated=new e$1Q,this.materialSupport=void 0,this.asynchronous=!0,this.wrapS=q$1a.CLAMP_TO_EDGE,this.wrapT=q$1a.CLAMP_TO_EDGE,this.compressVertices=!0}p$m.prototype.onMaterialChanged=function(){},p$m.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty,n=this.depthFailMaterialProperty,r=e.depthFailMaterialProperty;if(i===t&&r===n)return!0;var o=e$2e(t)&&t.equals(i);return o=(!e$2e(n)&&!e$2e(r)||e$2e(n)&&n.equals(r))&&o},p$m.prototype.add=function(e,t){var i=t.id;this.updaters.set(i,t);var n=t.createFillGeometryInstance(e);if("unResolve"===n?(this.invalidated=!0,this.geometry.set(i,null)):this.geometry.set(i,n),this.enuCenter=e$2e(t._options)?t._options.enuCenter:void 0,e$2e(this.enuCenter)&&(this.materialSupport=t$v.MaterialSupport.TEXTUREDMODEL),e$2e(t.asynchronous)&&(this.asynchronous=t.asynchronous),e$2e(t.wrapS)&&(this.wrapS=t.wrapS),e$2e(t.wrapT)&&(this.wrapT=t.wrapT),e$2e(t.compressVertices)&&(this.compressVertices=t.compressVertices),this.twoPasses=t.twoPasses,t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$_.isConstant(t.distanceDisplayConditionProperty)&&r$_.isConstant(t.terrainOffsetProperty)){var r=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(i,t);this.createPrimitive=!0},p$m.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2e(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};var $$o=new e$1X;p$m.prototype.update=function(e){for(var t=!0,i=this.primitive,n=this.primitives,r=this.geometry.values,o=0;o<r.length;o++)null===r[o]&&(r.splice(o,1),o--);if(0===r.length&&(this.createPrimitive=!1),this.createPrimitive){if(r.length>0){var a;if(e$2e(i)&&(e$2e(this.oldPrimitive)?n.remove(i):this.oldPrimitive=i),this.material=r$C.getValue(e,this.materialProperty,this.material),this.material._wrapS=this.wrapS,this.material._wrapT=this.wrapT,e$2e(this.depthFailMaterialProperty)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),r.length>1){var s=r[0].modelMatrix,l=p$1d.inverse(r[0].modelMatrix,new p$1d);for(o=1;o<r.length;o++)!p$1d.equals(s,r[o].modelMatrix)&&e$2e(r[o].id.geometry)&&(ee$j(r[o].modelMatrix,r[o].geometry.attributes.position,l),r[o].modelMatrix=s,r[o].geometry.boundingSphere=i$1d.fromVertices(r[o].geometry.attributes.position.values,new o$1p(0,0,0),3))}i=new y$R({show:!1,asynchronous:this.asynchronous,geometryInstances:r,appearance:new this.appearanceType({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed,materialSupport:this.materialSupport}),depthFailAppearance:a,shadows:this.shadows,updateBoundingSphere:!e$2e(this.enuCenter),modelMatrix:e$2e(this.enuCenter)?m$19.eastNorthUpToFixedFrame(this.enuCenter,t$12.WGS84,new p$1d):void 0,twoPasses:this.twoPasses,compressVertices:this.compressVertices}),n.add(i),t=!1}else{e$2e(i)&&(n.remove(i),i=void 0);var u=this.oldPrimitive;e$2e(u)&&(n.remove(u),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1}else if(e$2e(i)&&i.ready){i.show=!0,e$2e(this.oldPrimitive)&&(n.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=r$C.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,e$2e(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof t$P)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);var c=this.updatersWithAttributes.values,h=c.length;for(o=0;o<h;o++){var d=c[o],f=d.entity,p=this.geometry.get(d.id),_=this.attributes.get(p.id.id);if(e$2e(_)||(_=i.getGeometryInstanceAttributes(p.id),this.attributes.set(p.id.id,_)),e$2e(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof t$P&&!d.depthFailMaterialProperty.isConstant){var m=d.depthFailMaterialProperty.color,g=r$_.getValueOrDefault(m,e,e$1X.WHITE,$$o);e$1X.equals(_._lastDepthFailColor,g)||(_._lastDepthFailColor=e$1X.clone(g,_._lastDepthFailColor),_.depthFailColor=o$16.toValue(g,_.depthFailColor))}var x=f.isShowing&&(d.hasConstantFill||d.isFilled(e));x!==(1===_.show[0])&&(_.show=e$1I.toValue(x,_.show));var y=d.distanceDisplayConditionProperty;if(!r$_.isConstant(y)){var v=r$_.getValueOrDefault(y,e,K$m,J$n);r$Z.equals(v,_._lastDistanceDisplayCondition)||(_._lastDistanceDisplayCondition=r$Z.clone(v,_._lastDistanceDisplayCondition),_.distanceDisplayCondition=t$A.toValue(v,_.distanceDisplayCondition))}var $=d.terrainOffsetProperty;if(!r$_.isConstant($)){var b=r$_.getValueOrDefault($,e,Q$p,Y$l);o$1p.equals(b,_._lastOffset)||(_._lastOffset=o$1p.clone(b,_._lastOffset),_.offset=e$1E.toValue(b,_.offset))}}this.updateShows(i)}else e$2e(i)&&!i.ready&&(t=!1);return t};var M$t=new o$1p;function ee$j(e,t,i){if(e$2e(t))for(var n=t.values,r=n.length,o=0;o<r;o+=3){o$1p.unpack(n,o,M$t),p$1d.multiplyByPoint(e,M$t,M$t);var a=p$1d.multiplyByPoint(i,M$t,new o$1p);o$1p.pack(a,n,o)}}function u$r(e,t,i,n,r){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=n,this._shadows=r}p$m.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);e$2e(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$1I.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},p$m.prototype.contains=function(e){return this.updaters.contains(e.id)},p$m.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!e$2e(i)||!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2e(n)||!e$2e(n.boundingSphere)||e$2e(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},p$m.prototype.destroy=function(){var e=this.primitive,t=this.primitives;e$2e(e)&&t.remove(e);var i=this.oldPrimitive;e$2e(i)&&t.remove(i),this.removeMaterialSubscription()},u$r.prototype.add=function(e,t){var i=this._items,n=i.length;if(t instanceof a$n&&e$2e(t.entity._polylineVolume.enuCenter))if(0===i.length){(a=new p$m(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),a.enuCenter=t.entity._polylineVolume.enuCenter._value,i.push(a)}else{for(var r=0;r<n;r++){var o=i[r];if(o$1p.equals(o.enuCenter,t.entity._polylineVolume.enuCenter._value))return void o.add(e,t)}(a=new p$m(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),a.enuCenter=t.entity._polylineVolume.enuCenter._value,i.push(a)}else{for(r=0;r<n;r++){if((o=i[r]).isMaterial(t))return void o.add(e,t)}var a;(a=new p$m(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),i.push(a)}},u$r.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},u$r.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},u$r.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},u$r.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var x$u=new e$1X,E$t=new r$Z,F$s=new r$Z;function d$A(e,t,i,n){this.primitives=e,this.zIndex=n,this.classificationType=t,this.color=i,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1Q,this.updaters=new e$1Q,this.updatersWithAttributes=new e$1Q,this.attributes=new e$1Q,this.subscriptions=new e$1Q,this.showsUpdated=new e$1Q,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new r$G}function p$l(e,t){this._batches=[],this._primitives=e,this._classificationType=t}d$A.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},d$A.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),this.rectangleCollisionCheck.insert(i,t.geometry.rectangle),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&r$_.isConstant(e.distanceDisplayConditionProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},d$A.prototype.remove=function(e){var t=e.id,i=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,i.geometry.rectangle),this.updatersWithAttributes.remove(t);var n=this.subscriptions.get(t);return e$2e(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},d$A.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.primitives;if(this.createPrimitive){var o=this.geometry.values;if(o.length>0)e$2e(n)&&(e$2e(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),n=new d$15({show:!1,asynchronous:!0,geometryInstances:o.slice(),classificationType:this.classificationType}),r.add(n,this.zIndex),i=!1;else{e$2e(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;e$2e(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(e$2e(n)&&n.ready){n.show=!0,e$2e(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0);var s=this.updatersWithAttributes.values,l=s.length,u=this.waitingOnCreate;for(t=0;t<l;t++){var c=s[t],h=this.geometry.get(c.id),d=this.attributes.get(h.id.id);if(e$2e(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d)),!c.fillMaterialProperty.isConstant||u){var f=c.fillMaterialProperty.color,p=r$_.getValueOrDefault(f,e,e$1X.WHITE,x$u);e$1X.equals(d._lastColor,p)||(d._lastColor=e$1X.clone(p,d._lastColor),d.color=o$16.toValue(p,d.color))}var _=c.entity.isShowing&&(c.hasConstantFill||c.isFilled(e));_!==(1===d.show[0])&&(d.show=e$1I.toValue(_,d.show));var m=c.distanceDisplayConditionProperty;if(!r$_.isConstant(m)){var g=r$_.getValueOrDefault(m,e,F$s,E$t);r$Z.equals(g,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=r$Z.clone(g,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=t$A.toValue(g,d.distanceDisplayCondition))}}this.updateShows(n),this.waitingOnCreate=!1}else e$2e(n)&&!n.ready&&(i=!1);return this.itemsToRemove.length=0,i},d$A.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);e$2e(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$1I.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},d$A.prototype.contains=function(e){return this.updaters.contains(e.id)},d$A.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getBoundingSphere(e.entity);return e$2e(n)?(n.clone(t),R$w.DONE):R$w.FAILED},d$A.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;e$2e(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;e$2e(i)&&(e.remove(i),this.oldPrimitive=void 0)},p$l.prototype.add=function(e,t){for(var i,n=t.createFillGeometryInstance(e),r=this._batches,o=r$_.getValueOrDefault(t.zIndex,0),a=r.length,s=0;s<a;++s){var l=r[s];if(l.zIndex===o&&!l.overlapping(n.geometry.rectangle)){i=l;break}}return e$2e(i)||(i=new d$A(this._primitives,this._classificationType,n.attributes.color.value,o),r.push(i)),i.add(t,n),i},p$l.prototype.remove=function(e){for(var t=this._batches,i=t.length,n=0;n<i;++n)if(t[n].remove(e))return},p$l.prototype.update=function(e){var t,i,n=!0,r=this._batches,o=r.length;for(t=0;t<o;++t)n=r[t].update(e)&&n;for(t=0;t<o;++t)for(var a=r[t],s=a.itemsToRemove,l=s.length,u=0;u<l;u++){i=s[u],a.remove(i);var c=this.add(e,i);a.isDirty=!0,c.isDirty=!0}for(t=o-1;t>=0;--t){var h=r[t];h.isDirty&&(n=r[t].update(e)&&n,h.isDirty=!1),0===h.geometry.length&&r.splice(t,1)}return n},p$l.prototype.getBoundingSphere=function(e,t){for(var i=this._batches,n=i.length,r=0;r<n;++r){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},p$l.prototype.removeAllPrimitives=function(){for(var e=this._batches,t=e.length,i=0;i<t;++i)e[i].removeAllPrimitives()};var b$y=new r$Z,U$r=new r$Z;function v$s(e,t,i,n,r,o){this.primitives=e,this.classificationType=t,this.appearanceType=i,this.materialProperty=n,this.updaters=new e$1Q,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1Q,this.material=void 0,this.updatersWithAttributes=new e$1Q,this.attributes=new e$1Q,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(v$s.prototype.onMaterialChanged,this),this.subscriptions=new e$1Q,this.showsUpdated=new e$1Q,this.usingSphericalTextureCoordinates=r,this.zIndex=o,this.rectangleCollisionCheck=new r$G}function f$t(e,t,i){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=i}v$s.prototype.onMaterialChanged=function(){this.invalidated=!0},v$s.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},v$s.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty;return i===t||i instanceof t$P&&t instanceof t$P||e$2e(t)&&t.equals(i)},v$s.prototype.add=function(e,t,i){var n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,i),this.rectangleCollisionCheck.insert(n,i.geometry.rectangle),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$_.isConstant(t.distanceDisplayConditionProperty)){var r=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},v$s.prototype.remove=function(e){var t=e.id,i=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,i.geometry.rectangle),this.updatersWithAttributes.remove(t);var n=this.subscriptions.get(t);return e$2e(n)&&(n(),this.subscriptions.remove(t)),!0}return!1},v$s.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.primitives,o=this.geometry.values;if(this.createPrimitive){if(o.length>0)e$2e(n)&&(e$2e(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),this.material=r$C.getValue(e,this.materialProperty,this.material),n=new d$15({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({material:this.material}),classificationType:this.classificationType}),r.add(n,this.zIndex),i=!1;else{e$2e(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;e$2e(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(e$2e(n)&&n.ready){n.show=!0,e$2e(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=r$C.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;var s=this.updatersWithAttributes.values,l=s.length;for(t=0;t<l;t++){var u=s[t],c=u.entity,h=this.geometry.get(u.id),d=this.attributes.get(h.id.id);e$2e(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d));var f=c.isShowing&&(u.hasConstantFill||u.isFilled(e));f!==(1===d.show[0])&&(d.show=e$1I.toValue(f,d.show));var p=u.distanceDisplayConditionProperty;if(!r$_.isConstant(p)){var _=r$_.getValueOrDefault(p,e,U$r,b$y);r$Z.equals(_,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=r$Z.clone(_,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=t$A.toValue(_,d.distanceDisplayCondition))}}this.updateShows(n)}else e$2e(n)&&!n.ready&&(i=!1);return i},v$s.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);e$2e(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$1I.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},v$s.prototype.contains=function(e){return this.updaters.contains(e.id)},v$s.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2e(n)||!e$2e(n.boundingSphere)||e$2e(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},v$s.prototype.destroy=function(){var e=this.primitive,t=this.primitives;e$2e(e)&&t.remove(e);var i=this.oldPrimitive;e$2e(i)&&t.remove(i),this.removeMaterialSubscription()},f$t.prototype.add=function(e,t){for(var i=this._items,n=i.length,r=t.createFillGeometryInstance(e),o=y$Q.shouldUseSphericalCoordinates(r.geometry.rectangle),a=r$_.getValueOrDefault(t.zIndex,0),s=0;s<n;++s){var l=i[s];if(l.isMaterial(t)&&l.usingSphericalTextureCoordinates===o&&l.zIndex===a&&!l.overlapping(r.geometry.rectangle))return void l.add(e,t,r)}var u=new v$s(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,o,a);u.add(e,t,r),i.push(u)},f$t.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},f$t.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},f$t.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},f$t.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var x$t=new e$1X,F$r=new r$Z,H$y=new r$Z,Z$p=o$1p.ZERO,j$r=new o$1p;function c$m(e,t,i,n){this.translucent=t,this.width=i,this.shadows=n,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1Q,this.updaters=new e$1Q,this.updatersWithAttributes=new e$1Q,this.attributes=new e$1Q,this.itemsToRemove=[],this.subscriptions=new e$1Q,this.showsUpdated=new e$1Q}function y$r(e,t,i){this._primitives=e,this._scene=t,this._shadows=i,this._solidBatches=new e$1Q,this._translucentBatches=new e$1Q}c$m.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantOutline&&e.outlineColorProperty.isConstant&&r$_.isConstant(e.distanceDisplayConditionProperty)&&r$_.isConstant(e.terrainOffsetProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},c$m.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2e(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},c$m.prototype.update=function(e){var t,i=!0,n=0,r=this.primitive,o=this.primitives;if(this.createPrimitive){var a=this.geometry.values;if(a.length>0)e$2e(r)&&(e$2e(this.oldPrimitive)?o.remove(r):this.oldPrimitive=r),r=new y$R({show:!1,asynchronous:!0,geometryInstances:a,appearance:new t$Q({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width},hasSideness:e$2e(this.outlineWidth)}),shadows:this.shadows}),e$2e(this.outlineWidth)&&(r._outlineWidth=this.outlineWidth),o.add(r),i=!1;else{e$2e(r)&&(o.remove(r),r=void 0);var s=this.oldPrimitive;e$2e(s)&&(o.remove(s),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(e$2e(r)&&r.ready){r.show=!0,e$2e(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);var l=this.updatersWithAttributes.values,u=l.length,c=this.waitingOnCreate;for(t=0;t<u;t++){var h=l[t],d=this.geometry.get(h.id),f=this.attributes.get(d.id.id);if(e$2e(f)||(f=r.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,f)),!h.outlineColorProperty.isConstant||c){var p=h.outlineColorProperty,_=r$_.getValueOrDefault(p,e,e$1X.WHITE,x$t);e$1X.equals(f._lastColor,_)||(f._lastColor=e$1X.clone(_,f._lastColor),f.color=o$16.toValue(_,f.color),(this.translucent&&255===f.color[3]||!this.translucent&&255!==f.color[3])&&(this.itemsToRemove[n++]=h))}var m=h.entity.isShowing&&(h.hasConstantOutline||h.isOutlineVisible(e));m!==(1===f.show[0])&&(f.show=e$1I.toValue(m,f.show));var g=h.distanceDisplayConditionProperty;if(!r$_.isConstant(g)){var x=r$_.getValueOrDefault(g,e,H$y,F$r);r$Z.equals(x,f._lastDistanceDisplayCondition)||(f._lastDistanceDisplayCondition=r$Z.clone(x,f._lastDistanceDisplayCondition),f.distanceDisplayCondition=t$A.toValue(x,f.distanceDisplayCondition))}var y=h.terrainOffsetProperty;if(!r$_.isConstant(y)){var v=r$_.getValueOrDefault(y,e,Z$p,j$r);o$1p.equals(v,f._lastOffset)||(f._lastOffset=o$1p.clone(v,f._lastOffset),f.offset=e$1E.toValue(v,f.offset))}}this.updateShows(r),this.waitingOnCreate=!1}else e$2e(r)&&!r.ready&&(i=!1);return this.itemsToRemove.length=n,i},c$m.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);e$2e(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$1I.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},c$m.prototype.contains=function(e){return this.updaters.contains(e.id)},c$m.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2e(n)||!e$2e(n.boundingSphere)||e$2e(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},c$m.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;e$2e(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;e$2e(i)&&(e.remove(i),this.oldPrimitive=void 0)},y$r.prototype.add=function(e,t){var i=t.createOutlineGeometryInstance(e);if(e$2e(i)){var n,r,o,a=this._scene.clampLineWidth(t.outlineWidth);if(255===i.attributes.color.value[3])n=this._solidBatches,t instanceof u$s?(o=t.outlineWidth,r=n.get(o)):r=n.get(a),e$2e(r)||(r=new c$m(this._primitives,!1,a,this._shadows),e$2e(o)?(n.set(o,r),r.outlineWidth=o):n.set(a,r)),r.add(t,i);else n=this._translucentBatches,t instanceof u$s?(o=t.outlineWidth,r=n.get(o)):r=n.get(a),e$2e(r)||(r=new c$m(this._primitives,!0,a,this._shadows),n.set(a,r),e$2e(o)&&(r.outlineWidth=o)),r.add(t,i)}},y$r.prototype.remove=function(e){var t,i=this._solidBatches.values,n=i.length;for(t=0;t<n;t++)if(i[t].remove(e))return;var r=this._translucentBatches.values,o=r.length;for(t=0;t<o;t++)if(r[t].remove(e))return},y$r.prototype.update=function(e){var t,i,n,r,o,a=this._solidBatches.values,s=a.length,l=this._translucentBatches.values,u=l.length,c=!0,h=!1;do{for(h=!1,i=0;i<s;i++){c=(r=a[i]).update(e);var d=(o=r.itemsToRemove).length;if(d>0)for(h=!0,t=0;t<d;t++)n=o[t],r.remove(n),this.add(e,n)}for(i=0;i<u;i++){c=(r=l[i]).update(e);var f=(o=r.itemsToRemove).length;if(f>0)for(h=!0,t=0;t<f;t++)n=o[t],r.remove(n),this.add(e,n)}}while(h);return c},y$r.prototype.getBoundingSphere=function(e,t){var i,n=this._solidBatches.values,r=n.length;for(i=0;i<r;i++){var o=n[i];if(o.contains(e))return o.getBoundingSphere(e,t)}var a=this._translucentBatches.values,s=a.length;for(i=0;i<s;i++){var l=a[i];if(l.contains(e))return l.getBoundingSphere(e,t)}return R$w.FAILED},y$r.prototype.removeAllPrimitives=function(){var e,t=this._solidBatches.values,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._translucentBatches.values,r=n.length;for(e=0;e<r;e++)n[e].removeAllPrimitives()};var I$B=new e$1X;function A$z(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0,this.enuCenter=void 0}function n$m(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new A$z(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}function p$k(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(n$m.prototype=Object.create(i$G.prototype),n$m.prototype.constructor=n$m),n$m.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$1I(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=t$A.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$P?(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,I$B)),e$2e(i)||(i=e$1X.WHITE),t={show:o,distanceDisplayCondition:s,color:o$16.fromColor(i)}):t={show:o,distanceDisplayCondition:s};return new d$1o({id:n,geometry:new E$G(this._options),attributes:t})},n$m.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,I$B),r=this._distanceDisplayConditionProperty.getValue(e);return new d$1o({id:t,geometry:new w$x(this._options),attributes:{show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r)}})},n$m.prototype._isHidden=function(e,t){return!e$2e(t.positions)||i$G.prototype._isHidden.call(this,e,t)},n$m.prototype._getIsClosed=function(e){return!1},n$m.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&r$_.isConstant(t.minimumHeights)&&r$_.isConstant(t.maximumHeights)&&r$_.isConstant(t.outlineWidth)&&r$_.isConstant(t.granularity))},n$m.prototype._setStaticOptions=function(e,t){var i=t.minimumHeights,n=t.maximumHeights,r=t.granularity,o=this._materialProperty instanceof t$P,a=t.enuCenter,s=this._options;s.vertexFormat=o?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(o$I.MINIMUM_VALUE,s.positions),s.minimumHeights=e$2e(i)?i.getValue(o$I.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=e$2e(n)?n.getValue(o$I.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=e$2e(r)?r.getValue(o$I.MINIMUM_VALUE):void 0,s.enuCenter=e$2e(a)?a.getValue(o$I.MINIMUM_VALUE):void 0},n$m.DynamicGeometryUpdater=p$k,e$2e(Object.create)&&(p$k.prototype=Object.create(a$C.prototype),p$k.prototype.constructor=p$k),p$k.prototype._isHidden=function(e,t,i){return!e$2e(this._options.positions)||a$C.prototype._isHidden.call(this,e,t,i)},p$k.prototype._setOptions=function(e,t,i){var n=this._options;n.positions=r$_.getValueOrUndefined(t.positions,i,n.positions),n.minimumHeights=r$_.getValueOrUndefined(t.minimumHeights,i,n.minimumHeights),n.maximumHeights=r$_.getValueOrUndefined(t.maximumHeights,i,n.maximumHeights),n.granularity=r$_.getValueOrUndefined(t.granularity,i)};var ee$i=[],I$A=[i$F,s$n,f$z,u$s,l$z,p$n,l$y,a$n,d$B,n$m,m$s];function m$p(e,t){this.entity=e,this.scene=t;var i=new Array(I$A.length),n=new o$1h;function r(e){n.raiseEvent(e)}for(var o=new n$x,a=0;a<i.length;a++){var s=new I$A[a](e,t);o.add(s.geometryChanged,r),i[a]=s}this.updaters=i,this.geometryChanged=n,this.eventHelper=o,this._removeEntitySubscription=e.definitionChanged.addEventListener(m$p.prototype._onEntityPropertyChanged,this)}function c$l(e,t,i,n){o$1q.defined("scene",e),o$1q.defined("entityCollection",t),i=u$Z(i,e.primitives),n=u$Z(n,e.groundPrimitives),this._scene=e,this._primitives=i,this._groundPrimitives=n,this._entityCollection=void 0,this._addedObjects=new e$1Q,this._removedObjects=new e$1Q,this._changedObjects=new e$1Q;var r=W$X.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(2*r),this._closedColorBatches=new Array(2*r),this._closedMaterialBatches=new Array(2*r),this._openColorBatches=new Array(2*r),this._openMaterialBatches=new Array(2*r);var o,a=h$W.supportsMaterialsforEntitiesOnTerrain(e);for(this._supportsMaterialsforEntitiesOnTerrain=a,o=0;o<r;++o)this._outlineBatches[o]=new y$r(i,e,o,!1),this._outlineBatches[r+o]=new y$r(i,e,o,!0),this._closedColorBatches[o]=new y$s(i,t$Q,void 0,!0,o,!0),this._closedColorBatches[r+o]=new y$s(i,t$Q,void 0,!0,o,!1),this._closedMaterialBatches[o]=new u$r(i,t$v,void 0,!0,o,!0),this._closedMaterialBatches[r+o]=new u$r(i,t$v,void 0,!0,o,!1),this._openColorBatches[o]=new y$s(i,t$Q,void 0,!1,o,!0),this._openColorBatches[r+o]=new y$s(i,t$Q,void 0,!1,o,!1),this._openMaterialBatches[o]=new u$r(i,t$v,void 0,!1,o,!0),this._openMaterialBatches[r+o]=new u$r(i,t$v,void 0,!1,o,!1);var s=_0x2b86ba.NUMBER_OF_CLASSIFICATION_TYPES,l=new Array(s),u=[];if(a)for(o=0;o<s;++o)u.push(new f$t(n,o,t$v)),l[o]=new p$l(n,o);else for(o=0;o<s;++o)l[o]=new p$l(n,o);this._groundColorBatches=l,this._groundMaterialBatches=u,this._dynamicBatch=new r$s(i,n),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new e$1Q,this._updaterSets=new e$1Q,this._entityCollection=t,t.collectionChanged.addEventListener(c$l.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,ee$i)}m$p.prototype._onEntityPropertyChanged=function(e,t,i,n){for(var r=this.updaters,o=0;o<r.length;o++)r[o]._onEntityPropertyChanged(e,t,i,n)},m$p.prototype.forEach=function(e){for(var t=this.updaters,i=0;i<t.length;i++)e(t[i])},m$p.prototype.destroy=function(){this.eventHelper.removeAll();for(var e=this.updaters,t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),i$11(this)},c$l.prototype.update=function(e){o$1q.defined("time",e);var t,i,n,r,o=this._addedObjects,a=o.values,s=this._removedObjects,l=s.values,u=this._changedObjects,c=u.values,h=this;for(t=c.length-1;t>-1;t--)n=(i=c[t]).id,(r=this._updaterSets.get(n)).entity===i?r.forEach((function(t){h._removeUpdater(t),h._insertUpdaterIntoBatch(e,t)})):(l.push(i),a.push(i));for(t=l.length-1;t>-1;t--)if(n=(i=l[t]).id,e$2e(r=this._updaterSets.get(n))&&(r.forEach(this._removeUpdater.bind(this)),r.destroy(),this._updaterSets.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n),i.children.length>0))for(var d=0;d<i.children.length;d++){n=(f=i.children[d]).id,e$2e(r=this._updaterSets.get(n))&&(r.forEach(this._removeUpdater.bind(this)),r.destroy(),this._updaterSets.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n))}for(t=a.length-1;t>-1;t--)if(n=(i=a[t]).id,r=new m$p(i,this._scene),this._updaterSets.set(n,r),r.forEach((function(t){h._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(n,r.geometryChanged.addEventListener(c$l._onGeometryChanged,this)),i.children.length>0)for(d=0;d<i.children.length;d++){var f=i.children[d];i.entityCollection.contains(f)||(n=f.id,r=new m$p(f,this._scene),this._updaterSets.set(n,r),r.forEach((function(t){h._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(n,r.geometryChanged.addEventListener(c$l._onGeometryChanged,this)))}o.removeAll(),s.removeAll(),u.removeAll();var p=!0,_=this._batches,m=_.length;for(t=0;t<m;t++)p=_[t].update(e)&&p;return p};var te$e=[],re$j=new i$1d;c$l.prototype.getBoundingSphere=function(e,t){o$1q.defined("entity",e),o$1q.defined("result",t);for(var i=te$e,n=re$j,r=0,o=R$w.DONE,a=this._batches,s=a.length,l=e.id,u=this._updaterSets.get(l).updaters,c=0;c<u.length;c++)for(var h=u[c],d=0;d<s;d++){if((o=a[d].getBoundingSphere(h,n))===R$w.PENDING)return R$w.PENDING;o===R$w.DONE&&(i[r]=i$1d.clone(n,i[r]),r++)}return 0===r?R$w.FAILED:(i.length=r,i$1d.fromBoundingSpheres(i,t),R$w.DONE)},c$l.prototype.isDestroyed=function(){return!1},c$l.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(c$l.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var e,t=this._batches,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._subscriptions.values;for(i=n.length,e=0;e<i;e++)n[e]();this._subscriptions.removeAll();var r=this._updaterSets.values;for(i=r.length,e=0;e<i;e++)r[e].destroy();return this._updaterSets.removeAll(),i$11(this)},c$l.prototype._removeUpdater=function(e){for(var t=this._batches,i=t.length,n=0;n<i;n++)t[n].remove(e)},c$l.prototype._insertUpdaterIntoBatch=function(e,t){if(t.isDynamic)this._dynamicBatch.add(e,t);else{var i;(t.outlineEnabled||t.fillEnabled)&&(i=t.shadowsProperty.getValue(e));var n=W$X.NUMBER_OF_SHADOW_MODES;if(t.outlineEnabled&&(e$2e(t.terrainOffsetProperty)?this._outlineBatches[n+i].add(e,t):this._outlineBatches[i].add(e,t)),t.fillEnabled)if(t.onTerrain){var r=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof t$P?this._groundColorBatches[r].add(e,t):this._groundMaterialBatches[r].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof t$P?e$2e(t.terrainOffsetProperty)?this._closedColorBatches[n+i].add(e,t):this._closedColorBatches[i].add(e,t):e$2e(t.terrainOffsetProperty)?this._closedMaterialBatches[n+i].add(e,t):this._closedMaterialBatches[i].add(e,t):t.fillMaterialProperty instanceof t$P?e$2e(t.terrainOffsetProperty)?this._openColorBatches[n+i].add(e,t):this._openColorBatches[i].add(e,t):e$2e(t.terrainOffsetProperty)?this._openMaterialBatches[n+i].add(e,t):this._openMaterialBatches[i].add(e,t)}},c$l._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,n=e.entity,r=n.id;!e$2e(t.get(r))&&!e$2e(i.get(r))&&i.set(r,n)},c$l.prototype._onCollectionChanged=function(e,t,i){var n,r,o,a=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)r=(o=i[n]).id,a.remove(r)||(s.set(r,o),l.remove(r));for(n=t.length-1;n>-1;n--)r=(o=t[n]).id,s.remove(r)?l.set(r,o):a.set(r,o)};var U$q=1,q$p="30px sans-serif",N$k=R$S.FILL,z$q=e$1X.WHITE,A$y=e$1X.BLACK,F$q=1,H$x=!1,T$t=new e$1X(.165,.165,.165,.8),W$t=new o$1o(7,5),I$z=o$1o.ZERO,Z$o=o$1p.ZERO,j$q=k$R.NONE,K$l=j$V.CENTER,J$m=S$Q.CENTER,M$s=new o$1p,Q$o=new e$1X,X$j=new e$1X,Y$k=new e$1X,$$n=new o$1o,G$t=new o$1p,b$x=new o$1o,ee$h=new o$Y,te$d=new o$Y,re$i=new o$Y,ne$f=new r$Z;function S$o(e){this.entity=e,this.label=void 0,this.index=void 0}function l$w(e,t){if(!e$2e(e))throw new t$15("entityCluster is required.");if(!e$2e(t))throw new t$15("entityCollection is required.");t.collectionChanged.addEventListener(l$w.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1Q,this._onCollectionChanged(t,t.values,[],[])}function y$q(e,t,i){e$2e(e)&&(e.label=void 0,i.removeLabel(t))}l$w.prototype.update=function(e){if(!e$2e(e))throw new t$15("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a,s=t[n],l=s.entity,u=l._label,c=s.label,h=l.isShowing&&l.isAvailable(e)&&r$_.getValueOrDefault(u._show,e,!0);if(h&&(a=r$_.getValueOrUndefined(l._position,e,M$s),o=r$_.getValueOrUndefined(u._text,e),h=e$2e(a)&&e$2e(o)),h){r$_.isConstant(l._position)||(i._clusterDirty=!0);var d=!1,f=r$_.getValueOrDefault(u._heightReference,e,j$q);e$2e(c)||((c=i.getLabel(l)).id=l,s.label=c,d=o$1p.equals(c.position,a)&&c.heightReference===f),c.show=!0,c.position=a,c.text=o,c.scale=r$_.getValueOrDefault(u._scale,e,U$q),c.font=r$_.getValueOrDefault(u._font,e,q$p),c.style=r$_.getValueOrDefault(u._style,e,N$k),c.fillColor=r$_.getValueOrDefault(u._fillColor,e,z$q,Q$o),c.outlineColor=r$_.getValueOrDefault(u._outlineColor,e,A$y,X$j),c.outlineWidth=r$_.getValueOrDefault(u._outlineWidth,e,F$q),c.showBackground=r$_.getValueOrDefault(u._showBackground,e,H$x),c.backgroundColor=r$_.getValueOrDefault(u._backgroundColor,e,T$t,Y$k),c.backgroundPadding=r$_.getValueOrDefault(u._backgroundPadding,e,W$t,$$n),c.pixelOffset=r$_.getValueOrDefault(u._pixelOffset,e,I$z,b$x),c.eyeOffset=r$_.getValueOrDefault(u._eyeOffset,e,Z$o,G$t),c.heightReference=f,c.horizontalOrigin=r$_.getValueOrDefault(u._horizontalOrigin,e,K$l),c.verticalOrigin=r$_.getValueOrDefault(u._verticalOrigin,e,J$m),c.translucencyByDistance=r$_.getValueOrUndefined(u._translucencyByDistance,e,ee$h),c.pixelOffsetScaleByDistance=r$_.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,te$d),c.scaleByDistance=r$_.getValueOrUndefined(u._scaleByDistance,e,re$i),c.distanceDisplayCondition=r$_.getValueOrUndefined(u._distanceDisplayCondition,e,ne$f),c.disableDepthTestDistance=r$_.getValueOrUndefined(u._disableDepthTestDistance,e),d&&c._updateClamping()}else y$q(s,l,i)}return!0},l$w.prototype.getBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("entity is required.");if(!e$2e(t))throw new t$15("result is required.");var i=this._items.get(e.id);if(!e$2e(i)||!e$2e(i.label))return R$w.FAILED;var n=i.label;return t.center=o$1p.clone(u$Z(n._clampedPosition,n.position),t.center),t.radius=0,R$w.DONE},l$w.prototype.isDestroyed=function(){return!1},l$w.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$w.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return i$11(this)},l$w.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)e$2e((o=t[r])._label)&&e$2e(o._position)&&a.set(o.id,new S$o(o));for(r=n.length-1;r>-1;r--)e$2e((o=n[r])._label)&&e$2e(o._position)?a.contains(o.id)||a.set(o.id,new S$o(o)):(y$q(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],y$q(a.get(o.id),o,s),a.remove(o.id)};var N$j=1,j$p=0,k$o=!0,W$s=!0,J$l=W$X.ENABLED,K$k=k$R.NONE,Q$n=e$1X.RED,X$i=0,Y$j=e$1X.WHITE,Z$n=I$K.HIGHLIGHT,$$m=.5,G$s=new o$1o(1,1),ee$g=new p$1d,ie$b=new p$1d;function d$z(e,t){if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(t))throw new t$15("entityCollection is required.");t.collectionChanged.addEventListener(d$z.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new e$1Q,this._onCollectionChanged(t,t.values,[],[])}function M$r(e,t,i,n){var r=i[t.id];e$2e(r)&&(n.removeAndDestroy(r.modelPrimitive),delete i[t.id])}function re$h(e,t){var i=t[e.id];e$2e(i)&&(i.nodeTransformationsScratch={})}function te$c(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}function i$s(e){this._definitionChanged=new o$1h,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}d$z.prototype.update=function(e){if(!e$2e(e))throw new t$15("time is required.");for(var t=this._entitiesToVisualize.values,i=this._modelHash,n=this._primitives,r=0,o=t.length;r<o;r++){var a,s,l=t[r],u=l._model,c=i[l.id],h=l.isShowing&&l.isAvailable(e)&&r$_.getValueOrDefault(u._show,e,!0);if(h&&(s=l.computeModelMatrix(e,ee$g),a=t$10.createIfNeeded(r$_.getValueOrUndefined(u._uri,e)),h=e$2e(s)&&e$2e(a)),h){var d=e$2e(c)?c.modelPrimitive:void 0;if((!e$2e(d)||a.url!==c.url)&&(e$2e(d)&&(n.removeAndDestroy(d),delete i[l.id]),(d=F$B.fromGltf({url:a,incrementallyLoadTextures:r$_.getValueOrDefault(u._incrementallyLoadTextures,e,k$o),scene:this._scene})).id=l,n.add(d),c={modelPrimitive:d,url:a.url,animationsRunning:!1,nodeTransformationsScratch:{},originalNodeMatrixHash:{},loadFail:!1},i[l.id]=c,te$c(d,l,i)),d.show=!0,d.scale=r$_.getValueOrDefault(u._scale,e,N$j),d._offsetMatrix=u._offsetMatrix,d.minimumPixelSize=r$_.getValueOrDefault(u._minimumPixelSize,e,j$p),d.maximumScale=r$_.getValueOrUndefined(u._maximumScale,e),d.modelMatrix=p$1d.clone(s,d.modelMatrix),d.shadows=r$_.getValueOrDefault(u._shadows,e,J$l),d.heightReference=r$_.getValueOrDefault(u._heightReference,e,K$k),d.distanceDisplayCondition=r$_.getValueOrUndefined(u._distanceDisplayCondition,e),d.silhouetteColor=r$_.getValueOrDefault(u._silhouetteColor,e,Q$n,d._silhouetteColor),d.silhouetteSize=r$_.getValueOrDefault(u._silhouetteSize,e,X$i),d.color=r$_.getValueOrDefault(u._color,e,Y$j,d._color),d.colorBlendMode=r$_.getValueOrDefault(u._colorBlendMode,e,Z$n),d.colorBlendAmount=r$_.getValueOrDefault(u._colorBlendAmount,e,$$m),d.clippingPlanes=r$_.getValueOrUndefined(u._clippingPlanes,e),d.clampAnimations=r$_.getValueOrDefault(u._clampAnimations,e,W$s),d.imageBasedLightingFactor=r$_.getValueOrDefault(u._imageBasedLightingFactor,e,G$s),d.lightColor=r$_.getValueOrUndefined(u._lightColor,e),d.ready){var f=r$_.getValueOrDefault(u._runAnimations,e,!0);c.animationsRunning!==f&&(f?d.activeAnimations.addAll({loop:_0x1ea9f2.REPEAT}):d.activeAnimations.removeAll(),c.animationsRunning=f);var p=r$_.getValueOrUndefined(u._nodeTransformations,e,c.nodeTransformationsScratch);if(e$2e(p))for(var _=c.originalNodeMatrixHash,m=Object.keys(p),g=0,x=m.length;g<x;++g){var y=m[g],v=p[y];if(e$2e(v)){var $=d.getNode(y);if(e$2e($)){var b=_[y];e$2e(b)||(b=$.matrix.clone(),_[y]=b);var T=p$1d.fromTranslationRotationScale(v,ie$b);$.matrix=p$1d.multiply(b,T,T)}}}}}else e$2e(c)&&(c.modelPrimitive.show=!1)}return!0},d$z.prototype.isDestroyed=function(){return!1},d$z.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(d$z.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._modelHash,i=this._primitives,n=e.length-1;n>-1;n--)M$r(this,e[n],t,i);return i$11(this)},d$z.prototype.getBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("entity is required.");if(!e$2e(t))throw new t$15("result is required.");var i=this._modelHash[e.id];if(!e$2e(i)||i.loadFail)return R$w.FAILED;var n=i.modelPrimitive;if(!e$2e(n)||!n.show)return R$w.FAILED;if(!n.ready)return R$w.PENDING;if(n.heightReference===k$R.NONE)i$1d.transform(n.boundingSphere,n.modelMatrix,t);else{if(!e$2e(n._clampedModelMatrix))return R$w.PENDING;i$1d.transform(n.boundingSphere,n._clampedModelMatrix,t)}return R$w.DONE},d$z.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._entitiesToVisualize,s=this._modelHash,l=this._primitives;for(r=t.length-1;r>-1;r--)e$2e((o=t[r])._model)&&e$2e(o._position)&&a.set(o.id,o);for(r=n.length-1;r>-1;r--)e$2e((o=n[r])._model)&&e$2e(o._position)?(re$h(o,s),a.set(o.id,o)):(M$r(this,o,s,l),a.remove(o.id));for(r=i.length-1;r>-1;r--)M$r(this,o=i[r],s,l),a.remove(o.id)},Object.defineProperties(i$s.prototype,{isConstant:{get:function(){return r$_.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return e$2e(this._value)?this._value.referenceFrame:Re$l.FIXED}}}),i$s.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$l.FIXED,t)},i$s.prototype.setValue=function(e){this._value!==e&&(this._value=e,e$2e(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),e$2e(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))},i$s.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2e(e))throw new t$15("time is required.");if(!e$2e(t))throw new t$15("referenceFrame is required.");if(e$2e(this._value))return e$2e(i=this._value.getValueInReferenceFrame(e,t,i))?t$12.WGS84.scaleToGeodeticSurface(i,i):void 0},i$s.prototype.equals=function(e){return this===e||e instanceof i$s&&this._value===e._value},i$s.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var $$l=60,U$p=1,F$p=new d$W,V$n=new d$W,D$o=new d$W;function T$s(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function ee$f(e,t,i,n,r,o,a,s,l){var u,c=s;e$2e(u=e.getValueInReferenceFrame(t,o,l[c]))&&(l[c++]=u);for(var h,d,f,p=!e$2e(r)||a$15.lessThanOrEquals(r,t)||a$15.greaterThanOrEquals(r,i),_=0,m=n.length,g=n[_],x=i,y=!1;_<m;){if(!p&&a$15.greaterThanOrEquals(g,r)&&(e$2e(u=e.getValueInReferenceFrame(r,o,l[c]))&&(l[c++]=u),p=!0),a$15.greaterThan(g,t)&&a$15.lessThan(g,x)&&!g.equals(r)&&(e$2e(u=e.getValueInReferenceFrame(g,o,l[c]))&&(l[c++]=u)),_<m-1){if(a>0&&!y){var v=n[_+1],$=a$15.secondsDifference(v,g);(y=$>a)&&(h=Math.ceil($/a),d=0,f=$/Math.max(h,2),h=Math.max(h-1,1))}if(y&&d<h){g=a$15.addSeconds(g,f,new a$15),d++;continue}}y=!1,g=n[++_]}return e$2e(u=e.getValueInReferenceFrame(i,o,l[c]))&&(l[c++]=u),c}function ne$e(e,t,i,n,r,o,a,s){for(var l,u=0,c=a,h=t,d=Math.max(o,60),f=!e$2e(n)||a$15.lessThanOrEquals(n,t)||a$15.greaterThanOrEquals(n,i);a$15.lessThan(h,i);)!f&&a$15.greaterThanOrEquals(h,n)&&(f=!0,e$2e(l=e.getValueInReferenceFrame(n,r,s[c]))&&(s[c]=l,c++)),e$2e(l=e.getValueInReferenceFrame(h,r,s[c]))&&(s[c]=l,c++),u++,h=a$15.addSeconds(t,d*u,new a$15);return e$2e(l=e.getValueInReferenceFrame(i,r,s[c]))&&(s[c]=l,c++),c}function oe$c(e,t,i,n,r,o,a,s){D$o.start=t,D$o.stop=i;for(var l=a,u=e.intervals,c=0;c<u.length;c++){var h=u.get(c);if(!d$W.intersect(h,D$o,F$p).isEmpty){var d=h.start;h.isStartIncluded||(d=h.isStopIncluded?h.stop:a$15.addSeconds(h.start,a$15.secondsDifference(h.stop,h.start)/2,new a$15));var f=e.getValueInReferenceFrame(d,r,s[l]);e$2e(f)&&(s[l]=f,l++)}}return l}function ie$a(e,t,i,n,r,o,a,s){var l=e.getValueInReferenceFrame(t,r,s[a]);return e$2e(l)&&(s[a++]=l),a}function re$g(e,t,i,n,r,o,a,s){V$n.start=t,V$n.stop=i;for(var l=a,u=e.intervals,c=0;c<u.length;c++){var h=u.get(c);if(!d$W.intersect(h,V$n,F$p).isEmpty){var d=h.start,f=h.stop,p=t;a$15.greaterThan(d,p)&&(p=d);var _=i;a$15.lessThan(f,_)&&(_=f),l=x$s(h.data,p,_,n,r,o,l,s)}}return l}function x$s(e,t,i,n,r,o,a,s){for(;e instanceof a$p;)e=e.resolvedProperty;e instanceof o$z?a=ee$f(e,t,i,e._property._times,n,r,o,a,s):a=e instanceof t$p?re$g(e,t,i,n,r,o,a,s):e instanceof t$l?oe$c(e,t,i,n,r,o,a,s):e instanceof r$V||e instanceof i$s&&r$_.isConstant(e)?ie$a(e,t,i,n,r,o,a,s):ne$e(e,t,i,n,r,o,a,s);return a}function A$x(e,t,i,n,r,o,a){e$2e(a)||(a=[]);var s=x$s(e,t,i,n,r,o,0,a);return a.length=s,a}var G$r=new p$1e;function I$y(e,t){this._unusedIndexes=[],this._polylineCollection=new J$T,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}function w$p(e,t){if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(t))throw new t$15("entityCollection is required.");t.collectionChanged.addEventListener(w$p.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new e$1Q,this._onCollectionChanged(t,t.values,[],[])}I$y.prototype.update=function(e){if(this._referenceFrame===Re$l.INERTIAL){var t=m$19.computeIcrfToFixedMatrix(e,G$r);e$2e(t)||(t=m$19.computeTemeToPseudoFixedMatrix(e,G$r)),p$1d.fromRotationTranslation(t,o$1p.ZERO,this._polylineCollection.modelMatrix)}},I$y.prototype.updateObject=function(e,t){var i,n,r=t.entity,o=r._path,a=r._position,s=o._show,l=t.polyline,u=r.isShowing&&(!e$2e(s)||s.getValue(e));if(u){var c=r$_.getValueOrUndefined(o._leadTime,e),h=r$_.getValueOrUndefined(o._trailTime,e),d=r._availability,f=e$2e(d),p=e$2e(c),_=e$2e(h);if(u=f||p&&_){if(_&&(i=a$15.addSeconds(e,-h,new a$15)),p&&(n=a$15.addSeconds(e,c,new a$15)),f){var m=d.start,g=d.stop;(!_||a$15.greaterThan(m,i))&&(i=m),(!p||a$15.lessThan(g,n))&&(n=g)}u=a$15.lessThan(i,n)}}if(u){if(!e$2e(l)){var x=this._unusedIndexes;if(x.length>0){var y=x.pop();l=this._polylineCollection.get(y),t.index=y}else t.index=this._polylineCollection.length,l=this._polylineCollection.add();l.id=r,t.polyline=l}var v=r$_.getValueOrDefault(o._resolution,e,$$l);l.show=!0,l.positions=A$x(a,i,n,e,this._referenceFrame,v,l.positions.slice()),l.material=r$C.getValue(e,o._material,l.material),l.width=r$_.getValueOrDefault(o._width,e,U$p),l.distanceDisplayCondition=r$_.getValueOrUndefined(o._distanceDisplayCondition,e,l.distanceDisplayCondition)}else e$2e(l)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,l.show=!1,t.index=void 0)},I$y.prototype.removeObject=function(e){var t=e.polyline;e$2e(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)},I$y.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),i$11(this)},w$p.prototype.update=function(e){if(!e$2e(e))throw new t$15("time is required.");var t=this._updaters;for(var i in t)t.hasOwnProperty(i)&&t[i].update(e);var n=this._items.values;if(0===n.length&&e$2e(this._updaters)&&Object.keys(this._updaters).length>0){for(var r in t)t.hasOwnProperty(r)&&t[r].destroy();this._updaters={}}for(var o=0,a=n.length;o<a;o++){var s=n[o],l=s.entity._position,u=s.updater,c=Re$l.FIXED;this._scene.mode===C$14.SCENE3D&&(c=l.referenceFrame);var h=this._updaters[c];u===h&&e$2e(h)?h.updateObject(e,s):(e$2e(u)&&u.removeObject(s),e$2e(h)||((h=new I$y(this._scene,c)).update(e),this._updaters[c]=h),s.updater=h,e$2e(h)&&h.updateObject(e,s))}return!0},w$p.prototype.isDestroyed=function(){return!1},w$p.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(w$p.prototype._onCollectionChanged,this);var e=this._updaters;for(var t in e)e.hasOwnProperty(t)&&e[t].destroy();return i$11(this)},w$p.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a,s=this._items;for(r=t.length-1;r>-1;r--)e$2e((o=t[r])._path)&&e$2e(o._position)&&s.set(o.id,new T$s(o));for(r=n.length-1;r>-1;r--)e$2e((o=n[r])._path)&&e$2e(o._position)?s.contains(o.id)||s.set(o.id,new T$s(o)):e$2e(a=s.get(o.id))&&(e$2e(a.updater)&&a.updater.removeObject(a),s.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],e$2e(a=s.get(o.id))&&(e$2e(a.updater)&&a.updater.removeObject(a),s.remove(o.id))},w$p._subSample=A$x;var x$r=e$1X.WHITE,I$x=e$1X.BLACK,L$r=0,W$r=1,z$p=0,M$q=new e$1X,w$o=new o$1p,F$o=new e$1X,H$w=new o$Y,j$o=new o$Y,k$n=new r$Z;function J$k(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function v$r(e,t){if(!e$2e(e))throw new t$15("entityCluster is required.");if(!e$2e(t))throw new t$15("entityCollection is required.");t.collectionChanged.addEventListener(v$r.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1Q,this._onCollectionChanged(t,t.values,[],[])}function V$m(e,t,i){if(e$2e(e)){if(e$2e(e.pointPrimitive))return e.pointPrimitive=void 0,void i.removePoint(t);e$2e(e.billboard)&&(e.billboard=void 0,i.removeBillboard(t))}}v$r.prototype.update=function(e){if(!e$2e(e))throw new t$15("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a=t[n],s=a.entity,l=s._point,u=a.pointPrimitive,c=a.billboard,h=r$_.getValueOrDefault(l._heightReference,e,k$R.NONE),d=s.isShowing&&s.isAvailable(e)&&r$_.getValueOrDefault(l._show,e,!0);if(d&&(d=e$2e(o=r$_.getValueOrUndefined(s._position,e,w$o))),d){r$_.isConstant(s._position)||(i._clusterDirty=!0);var f=!1,p=!1;if(h===k$R.NONE||e$2e(c)?h===k$R.NONE&&!e$2e(u)&&(e$2e(c)&&(V$m(a,s,i),c=void 0),(u=i.getPoint(s)).id=s,a.pointPrimitive=u):(e$2e(u)&&(V$m(a,s,i),u=void 0),(c=i.getBillboard(s)).id=s,c.image=void 0,a.billboard=c,f=!0,p=o$1p.equals(c.position,o)&&c.heightReference===h),e$2e(u))u.show=!0,u.position=o,u.scaleByDistance=r$_.getValueOrUndefined(l._scaleByDistance,e,H$w),u.translucencyByDistance=r$_.getValueOrUndefined(l._translucencyByDistance,e,j$o),u.color=r$_.getValueOrDefault(l._color,e,x$r,M$q),u.outlineColor=r$_.getValueOrDefault(l._outlineColor,e,I$x,F$o),u.outlineWidth=r$_.getValueOrDefault(l._outlineWidth,e,L$r),u.pixelSize=r$_.getValueOrDefault(l._pixelSize,e,W$r),u.distanceDisplayCondition=r$_.getValueOrUndefined(l._distanceDisplayCondition,e,k$n),u.disableDepthTestDistance=r$_.getValueOrDefault(l._disableDepthTestDistance,e,z$p);else if(e$2e(c)){c.show=!0,c.position=o,c.scaleByDistance=r$_.getValueOrUndefined(l._scaleByDistance,e,H$w),c.translucencyByDistance=r$_.getValueOrUndefined(l._translucencyByDistance,e,j$o),c.distanceDisplayCondition=r$_.getValueOrUndefined(l._distanceDisplayCondition,e,k$n),c.disableDepthTestDistance=r$_.getValueOrDefault(l._disableDepthTestDistance,e,z$p),c.heightReference=h;var _=r$_.getValueOrDefault(l._color,e,x$r,M$q),m=r$_.getValueOrDefault(l._outlineColor,e,I$x,F$o),g=Math.round(r$_.getValueOrDefault(l._outlineWidth,e,L$r)),x=Math.max(1,Math.round(r$_.getValueOrDefault(l._pixelSize,e,W$r)));if(g>0?(c.scale=1,f=f||g!==a.outlineWidth||x!==a.pixelSize||!e$1X.equals(_,a.color)||!e$1X.equals(m,a.outlineColor)):(c.scale=x/50,x=50,f=f||g!==a.outlineWidth||!e$1X.equals(_,a.color)||!e$1X.equals(m,a.outlineColor)),f){a.color=e$1X.clone(_,a.color),a.outlineColor=e$1X.clone(m,a.outlineColor),a.pixelSize=x,a.outlineWidth=g;var y=_.alpha,v=_.toCssColorString(),$=m.toCssColorString(),b=JSON.stringify([v,x,$,g]);c.setImage(b,i$B(y,v,$,g,x))}p&&c._updateClamping()}}else V$m(a,s,i)}return!0},v$r.prototype.getBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("entity is required.");if(!e$2e(t))throw new t$15("result is required.");var i=this._items.get(e.id);if(!e$2e(i)||!e$2e(i.pointPrimitive)&&!e$2e(i.billboard))return R$w.FAILED;if(e$2e(i.pointPrimitive))t.center=o$1p.clone(i.pointPrimitive.position,t.center);else{var n=i.billboard;if(!e$2e(n._clampedPosition))return R$w.PENDING;t.center=o$1p.clone(n._clampedPosition,t.center)}return t.radius=0,R$w.DONE},v$r.prototype.isDestroyed=function(){return!1},v$r.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(v$r.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return i$11(this)},v$r.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)e$2e((o=t[r])._point)&&e$2e(o._position)&&a.set(o.id,new J$k(o));for(r=n.length-1;r>-1;r--)e$2e((o=n[r])._point)&&e$2e(o._position)?a.contains(o.id)||a.set(o.id,new J$k(o)):(V$m(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],V$m(a.get(o.id),o,s),a.remove(o.id)};var d$y=e$1X.WHITE,l$v=1,f$s=.3,h$t=5,u$q=0,c$k=1e3;function o$x(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._spotSize=void 0,this._trailLength=void 0,this._spotIntensity=void 0,this._constantSpeed=void 0,this._period=void 0,this.color=e.color,this.spotSize=e.spotSize,this.trailLength=e.trailLength,this.spotIntensity=e.spotIntensity,this.constantSpeed=e.constantSpeed/1e3,this.period=1e3*e.period,this.trailTime=void 0,this._startTime=performance.now(),this._bAsy=u$Z(e.bAsy,!0)}Object.defineProperties(o$x.prototype,{isConstant:{get:function(){return r$_.isConstant(this._trailLength)&&r$_.isConstant(this._constantSpeed)&&r$_.isConstant(this._period)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color"),spotSize:C$10("spotSize"),trailLength:C$10("trailLength"),spotIntensity:C$10("spotIntensity"),constantSpeed:C$10("constantSpeed"),period:C$10("period")}),o$x.prototype.getType=function(e){return"PolylineTrail"},o$x.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,d$y,t.color),t.trailTime=performance.now(),t.spotSize=r$_.getValueOrDefault(this._spotSize,e,l$v),t.constantSpeed=r$_.getValueOrDefault(this._constantSpeed,e,u$q),t.trailLength=r$_.getValueOrDefault(this._trailLength,e,f$s),t.period=r$_.getValueOrDefault(this._period,e,c$k),t.spotIntensity=r$_.getValueOrDefault(this._spotIntensity,e,h$t),t.startTime=this._startTime,t},o$x.prototype.equals=function(e){return this===e||e instanceof o$x&&r$_.equals(this._color,e._color)&&r$_.equals(this._spotSize,e._spotSize)&&r$_.equals(this._constantSpeed,e._constantSpeed)&&r$_.equals(this._trailLength,e._trailLength)&&r$_.equals(this._period,e._period)&&r$_.equals(this._spotIntensity,e._spotIntensity)};var ne$d=new e$1L(0),A$w={},W$q=new e$1X,oe$b=new t$P(e$1X.WHITE),ae$d=new e$1L(!0),se$b=new e$1L(W$X.DISABLED),le$f=new e$1L(new r$Z),de$a=new e$1L(_0x2b86ba.BOTH);function pe$e(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.hMax=void 0,this.followSurface=void 0,this.arcType=void 0,this.granularity=void 0}function he$b(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function f$r(e,t){if(!e$2e(e))throw new t$15("entity is required");if(!e$2e(t))throw new t$15("scene is required");this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(f$r.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new o$1h,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new pe$e,this._groundGeometryOptions=new he$b,this._id="polyline-"+e.id,this._clampToGround=!1,this._supportsPolylinesOnTerrain=h$W.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(f$r.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!e$2e(this._entity.availability)&&r$_.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}}),f$r.prototype.isOutlineVisible=function(e){return!1},f$r.prototype.isFilled=function(e){var t=this._entity;return u$Z(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e),!1)},f$r.prototype.createFillGeometryInstance=function(e){if(!e$2e(e))throw new t$15("time is required.");if(!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:t$A.fromDistanceDisplayCondition(o)};return this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,W$q)),e$2e(t)||(t=e$1X.WHITE),a.color=o$16.fromColor(t)),this.clampToGround||this.entity.clampToS3M?new d$1o({id:i,geometry:new aa$5(this._groundGeometryOptions),attributes:a}):(this._materialProperty instanceof o$x?(this._geometryOptions.dist=1,e$2e(this._materialProperty.constantSpeed)&&this._materialProperty.constantSpeed>0?this._geometryOptions.period=-1:this._geometryOptions.period=e$2e(this._materialProperty.period)?this._materialProperty.period:1e3):(this._geometryOptions.dist=0,this._geometryOptions.period=-1),e$2e(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof t$P&&(e$2e(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(t=this._depthFailMaterialProperty.color.getValue(e,W$q)),e$2e(t)||(t=e$1X.WHITE),a.depthFailColor=o$16.fromColor(t)),new d$1o({id:i,geometry:new R$A(this._geometryOptions),attributes:a}))},f$r.prototype.createOutlineGeometryInstance=function(e){throw new t$15("This instance does not represent an outlined geometry.")},f$r.prototype.isDestroyed=function(){return!1},f$r.prototype.destroy=function(){this._entitySubscription(),i$11(this)},f$r.prototype._onEntityPropertyChanged=function(e,t,i,n){if("availability"===t||"polyline"===t){var r=this._entity.polyline;if(!e$2e(r))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));var o=r.positions,a=r.show;if(e$2e(a)&&a.isConstant&&!a.getValue(o$I.MINIMUM_VALUE)||!e$2e(o))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=r.zIndex,l=u$Z(r.material,oe$b),u=l instanceof t$P;this._materialProperty=l,this._depthFailMaterialProperty=r.depthFailMaterial,this._showProperty=u$Z(a,ae$d),this._shadowsProperty=u$Z(r.shadows,se$b),this._distanceDisplayConditionProperty=u$Z(r.distanceDisplayCondition,le$f),this._classificationTypeProperty=u$Z(r.classificationType,de$a),this._fillEnabled=!0,this._zIndex=u$Z(s,ne$d);var c=r.width,h=r.hMax,d=r.followSurface,f=r.arcType,p=r.clampToGround,_=r.granularity;if(o.isConstant&&r$_.isConstant(c)&&r$_.isConstant(d)&&r$_.isConstant(f)&&r$_.isConstant(_)&&r$_.isConstant(p)&&r$_.isConstant(s)){var m,g=this._geometryOptions,x=o.getValue(o$I.MINIMUM_VALUE,g.positions);if(!e$2e(x)||x.length<2)return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));m=u&&(!e$2e(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof t$P)?e$1F.VERTEX_FORMAT:r$X.VERTEX_FORMAT,g.vertexFormat=m,g.positions=x,g.width=e$2e(c)?c.getValue(o$I.MINIMUM_VALUE):void 0,g.hMax=e$2e(h)?h.getValue(o$I.MINIMUM_VALUE):void 0,g.followSurface=e$2e(d)?d.getValue(o$I.MINIMUM_VALUE):void 0,g.arcType=e$2e(f)?f.getValue(o$I.MINIMUM_VALUE):void 0,g.granularity=e$2e(_)?_.getValue(o$I.MINIMUM_VALUE):void 0;var y=this._groundGeometryOptions;y.positions=x,y.width=g.width,y.arcType=g.arcType,y.granularity=g.granularity,this._clampToGround=!!e$2e(p)&&p.getValue(o$I.MINIMUM_VALUE),!this._clampToGround&&e$2e(s)&&e$22("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},f$r.prototype.createDynamicUpdater=function(e,t){if(o$1q.defined("primitives",e),o$1q.defined("groundPrimitives",t),!this._dynamic)throw new t$15("This instance does not represent dynamic geometry.");return new D$n(e,t,this)};var C$s={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function D$n(e,t,i){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=i,this._positions=[]}function q$o(e){if(e$2e(e._line))return e._line;var t=e._geometryUpdater._scene.id,i=A$w[t],n=e._primitives;!e$2e(i)||i.isDestroyed()?(i=new J$T,A$w[t]=i,n.add(i)):n.contains(i)||n.add(i);var r=i.add();return r.id=e._geometryUpdater._entity,e$2e(e._depthFailMaterial)&&(r._depthFailMaterial=e._depthFailMaterial,r._depthFailMaterialAppearance=e._depthFailMaterialAppearance),e._line=r,r}D$n.prototype.update=function(e){var t=this._geometryUpdater,i=t._entity,n=i.polyline,r=n.positions,o=r$_.getValueOrUndefined(r,e,this._positions);t._clampToGround=r$_.getValueOrDefault(n._clampToGround,e,!1),t._groundGeometryOptions.positions=o,t._groundGeometryOptions.width=r$_.getValueOrDefault(n._width,e,1),t._groundGeometryOptions.arcType=r$_.getValueOrDefault(n._arcType,e,m$1h.GEODESIC),t._groundGeometryOptions.granularity=r$_.getValueOrDefault(n._granularity,e,9999);var a=this._groundPrimitives;if(e$2e(this._groundPolylinePrimitive)&&(a.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!i.isShowing||!i.isAvailable(e)||!r$_.getValueOrDefault(n._show,e,!0)||!e$2e(o)||o.length<2)return;var s,l=t.fillMaterialProperty;if(l instanceof t$P)s=new e$1F;else{var u=r$C.getValue(e,l,this._material);s=new r$X({material:u,translucent:u.isTranslucent()}),this._material=u}return this._groundPolylinePrimitive=a.add(new g$13({geometryInstances:t.createFillGeometryInstance(e),appearance:s,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),r$_.getValueOrUndefined(t.zIndex,e)),void(e$2e(this._line)&&(this._line.show=!1))}let c=this._geometryUpdater._depthFailMaterialProperty;e$2e(c)&&(this._depthFailMaterialAppearance=c instanceof t$P?e$1F:r$X,this._depthFailMaterial=r$C.getValue(e,c,this._depthFailMaterial));var h=q$o(this);if(i.isShowing&&i.isAvailable(e)&&r$_.getValueOrDefault(n._show,e,!0))if(!e$2e(o)||o.length<2)h.show=!1;else{var d=r$_.getValueOrUndefined(n._followSurface,e),f=m$1h.GEODESIC;e$2e(d)&&(f=d?m$1h.GEODESIC:m$1h.NONE),f=r$_.getValueOrDefault(n._arcType,e,f);var p=t._scene.globe;f!==m$1h.NONE&&e$2e(p)&&(C$s.ellipsoid=p.ellipsoid,C$s.positions=o,C$s.granularity=r$_.getValueOrUndefined(n._granularity,e),C$s.height=m$X.extractHeights(o,p.ellipsoid),C$s.hMax=r$_.getValueOrUndefined(n._hMax,e),o=m$X.generateCartesianArc(C$s)),h.show=!0,h.positions=o.slice(),h.material=r$C.getValue(e,t.fillMaterialProperty,h.material),h.width=r$_.getValueOrDefault(n._width,e,1),h.distanceDisplayCondition=r$_.getValueOrUndefined(n._distanceDisplayCondition,e,h.distanceDisplayCondition)}else h.show=!1},D$n.prototype.getBoundingSphere=function(e){if(o$1q.defined("result",e),this._geometryUpdater.clampToGround){var t=this._groundPolylinePrimitive;if(e$2e(t)&&t.show&&t.ready){var i=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(e$2e(i)&&e$2e(i.boundingSphere))return i$1d.clone(i.boundingSphere,e),R$w.DONE}return e$2e(t)&&!t.ready?R$w.PENDING:R$w.DONE}var n=q$o(this);return n.show&&n.positions.length>0?(i$1d.fromPoints(n.positions,e),R$w.DONE):R$w.FAILED},D$n.prototype.isDestroyed=function(){return!1},D$n.prototype.destroy=function(){var e=this._geometryUpdater._scene.id,t=A$w[e];e$2e(t)&&(t.remove(this._line),0===t.length&&(this._primitives.removeAndDestroy(t),delete A$w[e])),e$2e(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),i$11(this)};var b$w=new e$1X,L$q=new r$Z,O$l=new r$Z;function v$q(e,t,i,n,r){var o;o=i instanceof t$P?e$1F:r$X,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=o,this.materialProperty=i,this.updaters=new e$1Q,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1Q,this.material=void 0,this.updatersWithAttributes=new e$1Q,this.attributes=new e$1Q,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(v$q.prototype.onMaterialChanged,this),this.subscriptions=new e$1Q,this.showsUpdated=new e$1Q,this.zIndex=n,this._asynchronous=r}function m$o(e,t,i){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=u$Z(i,!0)}v$q.prototype.onMaterialChanged=function(){this.invalidated=!0},v$q.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty;return i===t||i instanceof t$P&&t instanceof t$P||e$2e(t)&&t.equals(i)},v$q.prototype.add=function(e,t,i){var n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,i),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$_.isConstant(t.distanceDisplayConditionProperty)){var r=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},v$q.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2e(i)&&(i(),this.subscriptions.remove(t)),!0}return!1},v$q.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.orderedGroundPrimitives,o=this.geometry.values;if(this.createPrimitive){if(o.length>0)e$2e(n)&&(e$2e(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),n=new g$13({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===r$X&&(this.material=r$C.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),r.add(n,this.zIndex),i=!1;else{e$2e(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;e$2e(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(e$2e(n)&&n.ready){n.show=!0,e$2e(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===r$X&&(this.material=r$C.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);var s=this.updatersWithAttributes.values,l=s.length;for(t=0;t<l;t++){var u=s[t],c=u.entity,h=this.geometry.get(u.id),d=this.attributes.get(h.id.id);if(e$2e(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d)),!u.fillMaterialProperty.isConstant){var f=u.fillMaterialProperty.color,p=r$_.getValueOrDefault(f,e,e$1X.WHITE,b$w);e$1X.equals(d._lastColor,p)||(d._lastColor=e$1X.clone(p,d._lastColor),d.color=o$16.toValue(p,d.color))}var _=c.isShowing&&(u.hasConstantFill||u.isFilled(e));_!==(1===d.show[0])&&(d.show=e$1I.toValue(_,d.show));var m=u.distanceDisplayConditionProperty;if(!r$_.isConstant(m)){var g=r$_.getValueOrDefault(m,e,O$l,L$q);r$Z.equals(g,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=r$Z.clone(g,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=t$A.toValue(g,d.distanceDisplayCondition))}}this.updateShows(n)}else e$2e(n)&&!n.ready&&(i=!1);return i},v$q.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);e$2e(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$1I.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},v$q.prototype.contains=function(e){return this.updaters.contains(e.id)},v$q.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2e(n)||!e$2e(n.boundingSphere)||e$2e(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},v$q.prototype.destroy=function(){var e=this.primitive,t=this.orderedGroundPrimitives;e$2e(e)&&t.remove(e);var i=this.oldPrimitive;e$2e(i)&&t.remove(i),this.removeMaterialSubscription()},m$o.prototype.add=function(e,t){for(var i=this._items,n=i.length,r=t.createFillGeometryInstance(e),o=r$_.getValueOrDefault(t.zIndex,0),a=0;a<n;++a){var s=i[a];if(s.isMaterial(t)&&s.zIndex===o)return void s.add(e,t,r)}var l=new v$q(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,o,this._asynchronous);l.add(e,t,r),i.push(l)},m$o.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},m$o.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},m$o.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},m$o.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var I$w=[];function A$v(e,t){for(var i=e._batches,n=i.length,r=0;r<n;r++)i[r].remove(t)}function E$s(e,t,i,n){if(i.isDynamic)e._dynamicBatch.add(t,i);else{if((i.clampToGround||i.entity.clampToS3M)&&i.fillEnabled){var r=i.classificationTypeProperty.getValue(t);return i.entity.clampToS3M&&(r=_0x2b86ba.S3M_TILE),void e._groundBatches[r].add(t,i)}var o;i.fillEnabled&&(o=i.shadowsProperty.getValue(t));var a,s=0;e$2e(i.depthFailMaterialProperty)&&(s=i.depthFailMaterialProperty instanceof t$P?1:2),e$2e(o)&&(a=o+s*W$X.NUMBER_OF_SHADOW_MODES),i.fillEnabled&&(i.fillMaterialProperty instanceof t$P?e._colorBatches[a].add(t,i):e._materialBatches[a].add(t,i))}}function l$u(e,t,i,n){o$1q.defined("scene",e),o$1q.defined("entityCollection",t),n=u$Z(n,e.groundPrimitives),i=u$Z(i,e.primitives),this._scene=e,this._primitives=i,this._entityCollection=void 0,this._addedObjects=new e$1Q,this._removedObjects=new e$1Q,this._changedObjects=new e$1Q;var r,o=W$X.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(3*o),this._materialBatches=new Array(3*o),r=0;r<o;++r)this._colorBatches[r]=new y$s(i,e$1F,void 0,!1,r),this._materialBatches[r]=new u$r(i,r$X,void 0,!1,r),this._colorBatches[r+o]=new y$s(i,e$1F,e$1F,!1,r),this._materialBatches[r+o]=new u$r(i,r$X,e$1F,!1,r),this._colorBatches[r+2*o]=new y$s(i,e$1F,r$X,!1,r),this._materialBatches[r+2*o]=new u$r(i,r$X,r$X,!1,r);this._dynamicBatch=new r$s(i,n);var a=_0x2b86ba.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(a),r=0;r<a;++r)this._groundBatches[r]=new m$o(n,r);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new e$1Q,this._updaters=new e$1Q,this._entityCollection=t,t.collectionChanged.addEventListener(l$u.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,I$w)}l$u.prototype.update=function(e){o$1q.defined("time",e);var t,i,n,r,o=this._addedObjects,a=o.values,s=this._removedObjects,l=s.values,u=this._changedObjects,c=u.values;for(t=c.length-1;t>-1;t--)n=(i=c[t]).id,(r=this._updaters.get(n)).entity===i?(A$v(this,r),E$s(this,e,r)):(l.push(i),a.push(i));for(t=l.length-1;t>-1;t--)n=(i=l[t]).id,A$v(this,r=this._updaters.get(n)),r.destroy(),this._updaters.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n);for(t=a.length-1;t>-1;t--)n=(i=a[t]).id,r=new f$r(i,this._scene),this._updaters.set(n,r),E$s(this,e,r),this._subscriptions.set(n,r.geometryChanged.addEventListener(l$u._onGeometryChanged,this));o.removeAll(),s.removeAll(),u.removeAll();var h=!0,d=this._batches,f=d.length;for(t=0;t<f;t++)h=d[t].update(e)&&h;return h};var T$r=[],F$n=new i$1d;function u$p(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.scene",e.scene),o$1q.typeOf.object("options.dataSourceCollection",e.dataSourceCollection),d$15.initializeTerrainHeights(),g$13.initializeTerrainHeights();var t=e.scene,i=e.dataSourceCollection;this._eventHelper=new n$x,this._eventHelper.add(i.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(i.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(i.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=i,this._scene=t,this._visualizersCallback=u$Z(e.visualizersCallback,u$p.defaultVisualizersCallback);var n=!1,r=new o$y,o=new o$y;i.length>0&&(t.primitives.add(r),t.groundPrimitives.add(o),n=!0),this._primitives=r,this._groundPrimitives=o;for(var a=0,s=i.length;a<s;a++)this._onDataSourceAdded(i,i.get(a));var l,u,c=new n$o;if(this._onDataSourceAdded(void 0,c),this._defaultDataSource=c,!n){var h=this,d=function(){t.primitives.add(r),t.groundPrimitives.add(o),l(),u(),h._removeDefaultDataSourceListener=void 0,h._removeDataSourceCollectionListener=void 0};l=c.entities.collectionChanged.addEventListener(d),u=i.dataSourceAdded.addEventListener(d)}this._removeDefaultDataSourceListener=l,this._removeDataSourceCollectionListener=u,this._ready=!1}l$u.prototype.getBoundingSphere=function(e,t){o$1q.defined("entity",e),o$1q.defined("result",t);for(var i=T$r,n=F$n,r=0,o=R$w.DONE,a=this._batches,s=a.length,l=this._updaters.get(e.id),u=0;u<s;u++){if((o=a[u].getBoundingSphere(l,n))===R$w.PENDING)return R$w.PENDING;o===R$w.DONE&&(i[r]=i$1d.clone(n,i[r]),r++)}return 0===r?R$w.FAILED:(i.length=r,i$1d.fromBoundingSpheres(i,t),R$w.DONE)},l$u.prototype.isDestroyed=function(){return!1},l$u.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$u.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var e,t=this._batches,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._subscriptions.values;for(i=n.length,e=0;e<i;e++)n[e]();return this._subscriptions.removeAll(),i$11(this)},l$u._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,n=e.entity,r=n.id;!e$2e(t.get(r))&&!e$2e(i.get(r))&&i.set(r,n)},l$u.prototype._onCollectionChanged=function(e,t,i){var n,r,o,a=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)r=(o=i[n]).id,a.remove(r)||(s.set(r,o),l.remove(r));for(n=t.length-1;n>-1;n--)r=(o=t[n]).id,s.remove(r)?l.set(r,o):a.set(r,o)},u$p.defaultVisualizersCallback=function(e,t,i){var n=i.entities;return[new g$J(t,n),new c$l(e,n,i._primitives,i._groundPrimitives),new l$w(t,n),new d$z(e,n),new l$E(e,n),new v$r(t,n),new w$p(e,n),new l$u(e,n,i._primitives,i._groundPrimitives)]},Object.defineProperties(u$p.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}}),u$p.prototype.isDestroyed=function(){return!1},u$p.prototype.destroy=function(){this._eventHelper.removeAll();for(var e=this._dataSourceCollection,t=0,i=e.length;t<i;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),e$2e(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),i$11(this)},u$p.prototype.update=function(e){if(o$1q.defined("time",e),!e$1H.initialized)return this._ready=!1,!1;var t,i,n,r,o=!0,a=this._dataSourceCollection,s=a.length;for(t=0;t<s;t++){var l=a.get(t);for(e$2e(l.update)&&(o=l.update(e)&&o),r=(n=l._visualizers).length,i=0;i<r;i++)o=n[i].update(e)&&o}for(r=(n=this._defaultDataSource._visualizers).length,i=0;i<r;i++)o=n[i].update(e)&&o;return this._ready=o,o},u$p.prototype._postRender=function(){for(var e=this._scene.frameState,t=this._dataSourceCollection,i=t.length,n=0;n<i;n++){var r=t.get(n),o=r.credit;e$2e(o)&&e.creditDisplay.addCredit(o);var a=r._resourceCredits;if(e$2e(a))for(var s=a.length,l=0;l<s;l++)e.creditDisplay.addCredit(a[l])}};var R$n=[],k$m=new i$1d;function h$s(e,t,i,n){if(!e$2e(e))throw new t$15("entity is required.");if(!e$2e(n))throw new t$15("result is required.");var r;return e$2e(t)&&t.show&&t.ready&&(e$2e(r=t.getGeometryInstanceAttributes(e))&&e$2e(r.boundingSphere))||e$2e(i)&&i.show&&i.ready&&(e$2e(r=i.getGeometryInstanceAttributes(e))&&e$2e(r.boundingSphere))?(i$1d.clone(r.boundingSphere,n),R$w.DONE):e$2e(t)&&!t.ready||e$2e(i)&&!i.ready?R$w.PENDING:R$w.FAILED}u$p.prototype.getBoundingSphere=function(e,t,i){if(o$1q.defined("entity",e),o$1q.typeOf.bool("allowPartial",t),o$1q.defined("result",i),!this._ready)return R$w.PENDING;var n,r,o=this._defaultDataSource;if(!o.entities.contains(e)){o=void 0;var a=this._dataSourceCollection;for(r=a.length,n=0;n<r;n++){var s=a.get(n);if(s.entities.contains(e)){o=s;break}}}if(!e$2e(o))return R$w.FAILED;var l=R$n,u=k$m,c=0,h=R$w.DONE,d=o._visualizers,f=d.length;for(n=0;n<f;n++){if(e$2e(d[n].getBoundingSphere)){if(h=d[n].getBoundingSphere(e,u),!t&&h===R$w.PENDING)return R$w.PENDING;h===R$w.DONE&&(l[c]=i$1d.clone(u,l[c]),c++)}}return 0===c?R$w.FAILED:(l.length=c,i$1d.fromBoundingSpheres(l,i),R$w.DONE)},u$p.prototype._onDataSourceAdded=function(e,t){var i=this._scene,n=this._primitives,r=this._groundPrimitives,o=n.add(new o$y),a=r.add(new r$t);t._primitives=o,t._groundPrimitives=a;var s=t.clustering;s._initialize(i),o.add(s),t._visualizers=this._visualizersCallback(i,s,t)},u$p.prototype._onDataSourceRemoved=function(e,t){var i=this._primitives,n=this._groundPrimitives,r=t._primitives,o=t._groundPrimitives,a=t.clustering;r.remove(a);for(var s=r._primitives,l=0;l<s.length;l++)if(e$2e(s[l]._instanceIds))for(var u=s[l]._instanceIds,c=0;c<u.length;c++)e$2e(u[c]._polygon)&&e$2e(u[c]._polygon.outlines)&&this._scene._primitives.remove(u[c]._polygon.outlines);var h=t._visualizers,d=h.length;for(c=0;c<d;c++)h[c].destroy();i.remove(r),n.remove(o),t._visualizers=void 0},u$p.prototype._onDataSourceMoved=function(e,t,i){var n=this._primitives,r=this._groundPrimitives,o=e._primitives,a=e._groundPrimitives;t===i+1?(n.raise(o),r.raise(a)):t===i-1?(n.lower(o),r.lower(a)):0===t?(n.lowerToBottom(o),r.lowerToBottom(a),n.raise(o),r.raise(a)):(n.raiseToTop(o),r.raiseToTop(a))};var p$j=new e$1X(1,1,1,1);function t$j(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=new e$1X(1,1,1,1),this._colorSubscription=void 0,this.color=e.color}Object.defineProperties(t$j.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color")}),t$j.prototype.getType=function(e){return"EmissionColor"},t$j.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,p$j,t.color),t},t$j.prototype.equals=function(e){return this===e||e instanceof t$j&&r$_.equals(this._color,e._color)};var Z$m=new p$1e,F$m=new p$1e,j$n=new p$1e,s$k=new p$1d,P$o=new o$1p,J$j=new o$1p,q$n=new o$1p,x$q=new o$1p,W$p=new o$1p,K$j=new o$1p,_$n=new a$15,B$m=1.25;function ee$e(e,t,i,n,r,o,a){var s=e.scene.mode,l=r.getValue(o,e._lastCartesian);if(e$2e(l)){var u,c,h,d,f,p,_=!1,m=!1;if(s===C$14.SCENE3D){a$15.addSeconds(o,.001,_$n);var g=r.getValue(_$n,P$o);if(e$2e(g)||(a$15.addSeconds(o,-.001,_$n),g=r.getValue(_$n,P$o),m=!0),e$2e(g)){var x,y=m$19.computeFixedToIcrfMatrix(o,Z$m),v=m$19.computeFixedToIcrfMatrix(_$n,F$m);e$2e(y)&&e$2e(v)?x=p$1e.transpose(y,j$n):(x=m$19.computeTemeToPseudoFixedMatrix(o,j$n),y=p$1e.transpose(x,Z$m),v=m$19.computeTemeToPseudoFixedMatrix(_$n,F$m),p$1e.transpose(v,v));var $=p$1e.multiplyByVector(y,l,W$p),b=p$1e.multiplyByVector(v,g,K$j);o$1p.subtract($,b,x$q);var T=1e3*o$1p.magnitude(x$q),C=e$2d.GRAVITATIONALPARAMETER,S=-C/(T*T-2*C/o$1p.magnitude($));S<0||S>B$m*a.maximumRadius?(u=J$j,o$1p.normalize(l,u),o$1p.negate(u,u),h=o$1p.clone(o$1p.UNIT_Z,q$n),c=o$1p.cross(h,u,P$o),o$1p.magnitude(c)>e$2d.EPSILON7&&(o$1p.normalize(u,u),o$1p.normalize(c,c),h=o$1p.cross(u,c,q$n),o$1p.normalize(h,h),_=!0)):o$1p.equalsEpsilon(l,g,e$2d.EPSILON7)||(h=J$j,o$1p.normalize($,h),o$1p.normalize(b,b),c=o$1p.cross(h,b,q$n),m&&(c=o$1p.multiplyByScalar(c,-1,c)),o$1p.equalsEpsilon(c,o$1p.ZERO,e$2d.EPSILON7)||(u=o$1p.cross(c,h,P$o),p$1e.multiplyByVector(x,u,u),p$1e.multiplyByVector(x,c,c),p$1e.multiplyByVector(x,h,h),o$1p.normalize(u,u),o$1p.normalize(c,c),o$1p.normalize(h,h),_=!0))}}e$2e(e.boundingSphere)&&(l=e.boundingSphere.center),n&&(d=o$1p.clone(t.position,x$q),f=o$1p.clone(t.direction,W$p),p=o$1p.clone(t.up,K$j));var w=s$k;_?(w[0]=u.x,w[1]=u.y,w[2]=u.z,w[3]=0,w[4]=c.x,w[5]=c.y,w[6]=c.z,w[7]=0,w[8]=h.x,w[9]=h.y,w[10]=h.z,w[11]=0,w[12]=l.x,w[13]=l.y,w[14]=l.z,w[15]=0):m$19.eastNorthUpToFixedFrame(l,a,w),t._setTransform(w),n&&(o$1p.clone(d,t.position),o$1p.clone(f,t.direction),o$1p.clone(p,t.up),o$1p.cross(f,p,t.right))}if(i){var E=s===C$14.SCENE2D||o$1p.equals(e._offset3D,o$1p.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,E)}}function V$l(e,t,i){o$1q.defined("entity",e),o$1q.defined("scene",t),this.entity=e,this.scene=t,this.ellipsoid=u$Z(i,t$12.WGS84),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new o$1p,this._defaultOffset3D=void 0,this._offset3D=new o$1p}Object.defineProperties(V$l,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=o$1p.clone(e,new o$1p)}}}),V$l.defaultOffset3D=new o$1p(-14e3,3500,3500);var C$r=new a$T,re$f=new o$1p;V$l.prototype.update=function(e,t){o$1q.defined("time",e);var i=this.scene,n=this.ellipsoid,r=i.mode;if(r!==C$14.MORPHING){var o=this.entity,a=o.position;if(e$2e(a)){var s=o!==this._lastEntity,l=r!==this._mode,u=i.camera,c=s||l,h=!0;if(s){var d=o.viewFrom,f=e$2e(d);if(!f&&e$2e(t)){C$r.pitch=-e$2d.PI_OVER_FOUR,C$r.range=0;var p=a.getValue(e,re$f);if(e$2e(p)){var _=2-1/Math.max(1,o$1p.magnitude(p)/n.maximumRadius);C$r.pitch*=_}u.viewBoundingSphere(t,C$r),this.boundingSphere=t,c=!1,h=!1}else(!f||!e$2e(d.getValue(e,this._offset3D)))&&o$1p.clone(V$l._defaultOffset3D,this._offset3D)}else!l&&this._mode!==C$14.SCENE2D&&o$1p.clone(u.position,this._offset3D);this._lastEntity=o,this._mode=r,ee$e(this,u,c,h,a,e,n)}}};var $$k={};!function(e){var t,i,n="File format is not recognized.",r="Error while reading zip file.",o="Error while reading file data.",a=524288,s="text/plain",l="message";try{t=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch{}function u(){var e=-1,t=this;t.append=function(i){var n,r=t.table;for(n=0;n<i.length;n++)e=e>>>8^r[255&(e^i[n])]},t.get=function(){return~e}}function c(e,t){var i,n;return i=new ArrayBuffer(e),n=new Uint8Array(i),t&&n.set(t,0),{buffer:i,array:n,view:new DataView(i)}}function h(){}function d(e){var t,i=this;i.size=0,i.init=function(n,r){var o=new Blob([e],{type:s});(t=new p(o)).init((function(){i.size=t.size,n()}),r)},i.readUint8Array=function(e,i,n,r){t.readUint8Array(e,i,n,r)}}function f(e){var t,i=this;i.size=0,i.init=function(n){for(var r=e.length;"="==e.charAt(r-1);)r--;t=e.indexOf(",")+1,i.size=Math.floor(.75*(r-t)),n()},i.readUint8Array=function(i,n,r){var o,a=c(n),s=4*Math.floor(i/3),l=4*Math.ceil((i+n)/3),u=window.atob(e.substring(s+t,l+t)),h=i-3*Math.floor(s/4);for(o=h;o<h+n;o++)a.array[o-h]=u.charCodeAt(o);r(a.array)}}function p(e){var t=this;t.size=0,t.init=function(t){this.size=e.size,t()},t.readUint8Array=function(t,i,n,r){var o=new FileReader;o.onload=function(e){n(new Uint8Array(e.target.result))},o.onerror=r,o.readAsArrayBuffer(function(e,t,i){return e.slice?e.slice(t,t+i):e.webkitSlice?e.webkitSlice(t,t+i):e.mozSlice?e.mozSlice(t,t+i):e.msSlice?e.msSlice(t,t+i):void 0}(e,t,i))}}function _(){}function m(e){var i,n=this;n.init=function(e){i=new Blob([],{type:s}),e()},n.writeUint8Array=function(e,n){i=new Blob([i,t?e:e.buffer],{type:s}),n()},n.getData=function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=n,r.readAsText(i,e)}}function g(e){var t=this,i="",n="";t.init=function(t){i+="data:"+(e||"")+";base64,",t()},t.writeUint8Array=function(e,t){var r,o=n.length,a=n;for(n="",r=0;r<3*Math.floor((o+e.length)/3)-o;r++)a+=String.fromCharCode(e[r]);for(;r<e.length;r++)n+=String.fromCharCode(e[r]);a.length>2?i+=window.btoa(a):n=a,t()},t.getData=function(e){e(i+window.btoa(n))}}function x(e){var i,n=this;n.init=function(t){i=new Blob([],{type:e}),t()},n.writeUint8Array=function(n,r){i=new Blob([i,t?n:n.buffer],{type:e}),r()},n.getData=function(e){e(i)}}function y(e,t,i,n,r,o,s,u,c,h){var d,f,p=0;function _(){e.removeEventListener(l,m,!1),u(f)}function m(e){var t=e.data,n=t.data;t.onappend&&(f+=n.length,i.writeUint8Array(n,(function(){o(!1,n),g()}),h)),t.onflush&&(n?(f+=n.length,i.writeUint8Array(n,(function(){o(!1,n),_()}),h)):_()),t.progress&&s&&s(d+t.current,r)}function g(){(d=p*a)<r?t.readUint8Array(n+d,Math.min(a,r-d),(function(t){e.postMessage({append:!0,data:t}),p++,s&&s(d,r),o(!0,t)}),c):e.postMessage({flush:!0})}f=0,e.addEventListener(l,m,!1),g()}function v(e,t,i,n,r,o,s,l,u,c){var h,d=0,f=0;!function p(){var _;(h=d*a)<r?t.readUint8Array(n+h,Math.min(a,r-h),(function(t){var a=e.append(t,(function(){s&&s(n+h,r)}));f+=a.length,o(!0,t),i.writeUint8Array(a,(function(){o(!1,a),d++,setTimeout(p,1)}),c),s&&s(h,r)}),u):(_=e.flush())?(f+=_.length,i.writeUint8Array(_,(function(){o(!1,_),l(f)}),c)):l(f)}()}function $(e,t,i,n,r,o,s,l,c){var h=0,d=new u;!function u(){var f=h*a;f<n?e.readUint8Array(i+f,Math.min(a,n-f),(function(e){r&&d.append(e),s&&s(f,n,e),t.writeUint8Array(e,(function(){h++,u()}),c)}),l):o(n,d.get())}()}function b(e){var t,i,n="",r=["Ç","ü","é","â","ä","à","å","ç","ê","ë","è","ï","î","ì","Ä","Å","É","æ","Æ","ô","ö","ò","û","ù","ÿ","Ö","Ü","ø","£","Ø","×","ƒ","á","í","ó","ú","ñ","Ñ","ª","º","¿","®","¬","½","¼","¡","«","»","_","_","_","¦","¦","Á","Â","À","©","¦","¦","+","+","¢","¥","+","+","-","-","+","-","+","ã","Ã","+","+","-","-","¦","-","+","¤","ð","Ð","Ê","Ë","È","i","Í","Î","Ï","+","+","_","_","¦","Ì","_","Ó","ß","Ô","Ò","õ","Õ","µ","þ","Þ","Ú","Û","Ù","ý","Ý","¯","´","­","±","_","¾","¶","§","÷","¸","°","¨","·","¹","³","²","_"," "];for(t=0;t<e.length;t++)n+=(i=255&e.charCodeAt(t))>127?r[i-128]:String.fromCharCode(i);return n}function T(e){return decodeURIComponent(escape(e))}function C(e){var t,i="";for(t=0;t<e.length;t++)i+=String.fromCharCode(e[t]);return i}function S(e,t,i,n,r){e.version=t.view.getUint16(i,!0),e.bitFlag=t.view.getUint16(i+2,!0),e.compressionMethod=t.view.getUint16(i+4,!0),e.lastModDateRaw=t.view.getUint32(i+6,!0),e.lastModDate=function(e){var t=(4294901760&e)>>16,i=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&i)>>11,(2016&i)>>5,2*(31&i),0)}catch{}}(e.lastModDateRaw),1!=(1&e.bitFlag)?((n||8!=(8&e.bitFlag))&&(e.crc32=t.view.getUint32(i+10,!0),e.compressedSize=t.view.getUint32(i+14,!0),e.uncompressedSize=t.view.getUint32(i+18,!0)),4294967295!==e.compressedSize&&4294967295!==e.uncompressedSize?(e.filenameLength=t.view.getUint16(i+22,!0),e.extraFieldLength=t.view.getUint16(i+24,!0)):r("File is using Zip64 (4gb+ file size).")):r("File contains encrypted entry.")}function w(t,i){function a(){}function s(e,n){t.readUint8Array(t.size-e,e,(function(t){var i=c(t.length,t).view;1347093766!=i.getUint32(0)?s(e+1,n):n(i)}),(function(){i(r)}))}return a.prototype.getData=function(r,a,s,l){var h,d=this;function f(e,t){h&&h.terminate(),h=null,e&&e(t)}function p(e,t){l&&!function(e){var t=c(4);return t.view.setUint32(0,e),d.crc32==t.view.getUint32(0)}(t)?_():r.getData((function(e){f(a,e)}))}function _(){f(i,o)}function m(){f(i,"Error while writing file data.")}t.readUint8Array(d.offset,30,(function(o){var a,f=c(o.length,o);1347093252==f.view.getUint32(0)?(S(d,f,4,!1,i),a=d.offset+30+d.filenameLength+d.extraFieldLength,r.init((function(){0===d.compressionMethod?$(t,r,a,d.compressedSize,l,p,s,_,m):h=function(t,i,n,r,o,a,s,l,c){var h,d=new u;function f(e,t){o&&!e&&d.append(t)}function p(e){a(e,d.get())}return e.zip.useWebWorkers?y(h=new Worker(e.zip.workerScriptsPath+"inflate.js"),t,i,n,r,f,s,p,l,c):v(new e.zip.Inflater,t,i,n,r,f,s,p,l,c),h}(t,r,a,d.compressedSize,l,p,s,_,m)}),m)):i(n)}),_)},{getEntries:function(e){t.size<22?i(n):s(22,(function(o){var s,l;s=o.getUint32(16,!0),l=o.getUint16(8,!0),t.readUint8Array(s,t.size-s,(function(t){var r,o,s,u,h=0,d=[],f=c(t.length,t);for(r=0;r<l;r++){if(o=new a,1347092738!=f.view.getUint32(h))return void i(n);S(o,f,h+6,!0,i),o.commentLength=f.view.getUint16(h+32,!0),o.directory=16==(16&f.view.getUint8(h+38)),o.offset=f.view.getUint32(h+42,!0),s=C(f.array.subarray(h+46,h+46+o.filenameLength)),o.filename=2048==(2048&o.bitFlag)?T(s):b(s),!o.directory&&"/"==o.filename.charAt(o.filename.length-1)&&(o.directory=!0),u=C(f.array.subarray(h+46+o.filenameLength+o.extraFieldLength,h+46+o.filenameLength+o.extraFieldLength+o.commentLength)),o.comment=2048==(2048&o.bitFlag)?T(u):b(u),d.push(o),h+=46+o.filenameLength+o.extraFieldLength+o.commentLength}e(d)}),(function(){i(r)}))}))},close:function(e){e&&e()}}}function E(e){return unescape(encodeURIComponent(e))}function P(e){var t,i=[];for(t=0;t<e.length;t++)i.push(e.charCodeAt(t));return i}function A(t,i,n){var r,a={},s=[],h=0;function d(e,t){r&&r.terminate(),r=null,e&&e(t)}function f(){d(i,"Error while writing zip file.")}function p(){d(i,o)}return{add:function(o,_,m,g,x){var b,T,C;function S(e,i){var n=c(16);h+=e||0,n.view.setUint32(0,1347094280),typeof i<"u"&&(b.view.setUint32(10,i,!0),n.view.setUint32(4,i,!0)),_&&(n.view.setUint32(8,e,!0),b.view.setUint32(14,e,!0),n.view.setUint32(12,_.size,!0),b.view.setUint32(18,_.size,!0)),t.writeUint8Array(n.array,(function(){h+=16,d(m)}),f)}function w(){x=x||{},o=o.trim(),x.directory&&"/"!=o.charAt(o.length-1)&&(o+="/"),a.hasOwnProperty(o)?i("File already exists."):(T=P(E(o)),s.push(o),function(e){var i;C=x.lastModDate||new Date,b=c(26),a[o]={headerArray:b.array,directory:x.directory,filename:T,offset:h,comment:P(E(x.comment||""))},b.view.setUint32(0,335546376),x.version&&b.view.setUint8(0,x.version),!n&&0!==x.level&&!x.directory&&b.view.setUint16(4,2048),b.view.setUint16(6,(C.getHours()<<6|C.getMinutes())<<5|C.getSeconds()/2,!0),b.view.setUint16(8,(C.getFullYear()-1980<<4|C.getMonth()+1)<<5|C.getDate(),!0),b.view.setUint16(22,T.length,!0),(i=c(30+T.length)).view.setUint32(0,1347093252),i.array.set(b.array,4),i.array.set(T,30),h+=i.array.length,t.writeUint8Array(i.array,e,f)}((function(){_?n||0===x.level?$(_,t,0,_.size,!0,S,g,p,f):r=function(t,i,n,r,o,a,s){var c,h=new u;function d(e,t){e&&h.append(t)}function f(e){r(e,h.get())}return e.zip.useWebWorkers?((c=new Worker(e.zip.workerScriptsPath+"deflate.js")).addEventListener(l,(function e(){c.removeEventListener(l,e,!1),y(c,t,i,0,t.size,d,o,f,a,s)}),!1),c.postMessage({init:!0,level:n})):v(new e.zip.Deflater,t,i,0,t.size,d,o,f,a,s),c}(_,t,x.level,S,g,p,f):S()})))}_?_.init(w,p):w()},close:function(e){var i,n,r,o=0,l=0;for(n=0;n<s.length;n++)o+=46+(r=a[s[n]]).filename.length+r.comment.length;for(i=c(o+22),n=0;n<s.length;n++)r=a[s[n]],i.view.setUint32(l,1347092738),i.view.setUint16(l+4,5120),i.array.set(r.headerArray,l+6),i.view.setUint16(l+32,r.comment.length,!0),r.directory&&i.view.setUint8(l+38,16),i.view.setUint32(l+42,r.offset,!0),i.array.set(r.filename,l+46),i.array.set(r.comment,l+46+r.filename.length),l+=46+r.filename.length+r.comment.length;i.view.setUint32(l,1347093766),i.view.setUint16(l+8,s.length,!0),i.view.setUint16(l+10,s.length,!0),i.view.setUint32(l+12,o,!0),i.view.setUint32(l+16,h,!0),t.writeUint8Array(i.array,(function(){d((function(){t.getData(e)}))}),f)}}}u.prototype.table=function(){var e,t,i,n=[];for(e=0;e<256;e++){for(i=e,t=0;t<8;t++)1&i?i=i>>>1^3988292384:i>>>=1;n[e]=i}return n}(),d.prototype=new h,d.prototype.constructor=d,f.prototype=new h,f.prototype.constructor=f,p.prototype=new h,p.prototype.constructor=p,_.prototype.getData=function(e){e(this.data)},m.prototype=new _,m.prototype.constructor=m,g.prototype=new _,g.prototype.constructor=g,x.prototype=new _,x.prototype.constructor=x,e.zip={Reader:h,Writer:_,BlobReader:p,Data64URIReader:f,TextReader:d,BlobWriter:x,Data64URIWriter:g,TextWriter:m,createReader:function(e,t,i){e.init((function(){t(w(e,i))}),i)},createWriter:function(e,t,i,n){e.init((function(){t(A(e,i,n))}),i)},useWebWorkers:!0},Object.defineProperties(e.zip,{workerScriptsPath:{get:function(){return typeof i>"u"&&(i=n$17("ThirdParty/Workers/")),i}}})}($$k);var he$a=$$k.zip,ie$9=32,ze$7="http://www.opengis.net/kml/2.2",A$u="http://www.google.com/kml/ext/2.2",Ge$6="http://www.w3.org/2000/xmlns/";function Y$i(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var We$6=/^data:image\/([^,;]+)/;function je$7(e,t){return function(i){e._files[t]=i}}function $$j(e){this._time=e}function ne$c(){this._ids={},this._styles={},this._count=0}function se$a(){this._ids={}}function oe$a(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).entities,i=u$Z(e.kmz,!1);if(!e$2e(t))throw new t$15("entities is required.");var n=oe$a._createState(e),r=t.values.filter((function(e){return!e$2e(e.parent)})),o=n.kmlDoc,a=o.documentElement;a.setAttributeNS(Ge$6,"xmlns:gx",A$u);var s=o.createElement("Document");a.appendChild(s),ge$b(n,s,r),n.styleCache.save(s);var l=n.externalFileHandler;return l.promise.then((function(){var e=(new XMLSerializer).serializeToString(n.kmlDoc);return i?qe$3(e,l.files):{kml:e,externalFiles:l.files}}))}function qe$3(e,t){var i=o$1l.defer();return he$a.createWriter(new he$a.BlobWriter,(function(n){Ke$5(n,e).then((function(){var e=Object.keys(t);return me$f(n,e,t,0)})).then((function(){n.close((function(e){i.resolve({kmz:e})}))}))})),i.promise}function Ke$5(e,t){var i=o$1l.defer();return e.add("doc.kml",new he$a.TextReader(t),(function(){i.resolve()})),i.promise}function me$f(e,t,i,n){if(t.length!==n){var r=t[n],o=o$1l.defer();return e.add(r,new he$a.BlobReader(i[r]),(function(){o.resolve()})),o.promise.then((function(){return me$f(e,t,i,n+1)}))}}function ge$b(e,t,i){for(var n,r,o,a=e.kmlDoc,s=e.styleCache,l=e.valueGetter,u=e.idManager,c=i.length,h=0;h<c;++h){var d=i[h];n=[],Xe$5(e,d,r=[],o=[]),Ze$6(e,d.polyline,r,o),we$7(e,d.rectangle,r,o,n),we$7(e,d.polygon,r,o,n),rr$2(e,d,d.model,r,o);var f,p=d.availability;e$2e(p)&&(f=a.createElement("TimeSpan"),a$15.equals(p.start,o$I.MINIMUM_VALUE)||f.appendChild(l$t(a,"begin",a$15.toIso8601(p.start))),a$15.equals(p.stop,o$I.MAXIMUM_VALUE)||f.appendChild(l$t(a,"end",a$15.toIso8601(p.stop))));for(var _=0;_<n.length;++_){var m=n[_];m.setAttribute("id",u.get(d.id)),m.appendChild(l$t(a,"name",d.name)),m.appendChild(l$t(a,"visibility",d.show)),m.appendChild(l$t(a,"description",d.description)),e$2e(f)&&m.appendChild(f),t.appendChild(m)}var g=r.length;if(g>0){var x=a.createElement("Placemark");x.setAttribute("id",u.get(d.id));var y=d.name,v=d.label;if(e$2e(v)){var $=a.createElement("LabelStyle"),b=l.get(v.text);y=e$2e(b)&&b.length>0?b:y;var T=l.getColor(v.fillColor);e$2e(T)&&($.appendChild(l$t(a,"color",T)),$.appendChild(l$t(a,"colorMode","normal")));var C=l.get(v.scale);e$2e(C)&&$.appendChild(l$t(a,"scale",C)),o.push($)}x.appendChild(l$t(a,"name",y)),x.appendChild(l$t(a,"visibility",d.show)),x.appendChild(l$t(a,"description",d.description)),e$2e(f)&&x.appendChild(f),t.appendChild(x);var S=o.length;if(S>0){for(var w=a.createElement("Style"),E=0;E<S;++E)w.appendChild(o[E]);x.appendChild(l$t(a,"styleUrl",s.get(w)))}if(1===r.length)x.appendChild(r[0]);else if(r.length>1){for(var P=a.createElement("MultiGeometry"),A=0;A<g;++A)P.appendChild(r[A]);x.appendChild(P)}}var L=d._children;if(L.length>0){var M=a.createElement("Folder");M.setAttribute("id",u.get(d.id)),M.appendChild(l$t(a,"name",d.name)),M.appendChild(l$t(a,"visibility",d.show)),M.appendChild(l$t(a,"description",d.description)),t.appendChild(M),ge$b(e,M,L)}}}Y$i.prototype.texture=function(e){var t,i=this;if("string"==typeof e||e instanceof t$10){if(!(e=t$10.createIfNeeded(e)).isDataUri)return e.url;var n=e.url.match(We$6);t="texture_"+ ++this._count,e$2e(n)&&(t+="."+n[1]);var r=e.fetchBlob().then((function(e){i._files[t]=e}));return this._promises.push(r),t}if(e instanceof HTMLCanvasElement){var o=o$1l.defer();return this._promises.push(o.promise),t="texture_"+ ++this._count+".png",e.toBlob((function(e){i._files[t]=e,o.resolve()})),t}return""},Y$i.prototype.model=function(e,t){var i=this._modelCallback;if(!e$2e(i))throw new t$13("Encountered a model entity while exporting to KML, but no model callback was supplied.");var n={},r=i(e,t,n);for(var o in n)if(n.hasOwnProperty(o)){var a=o$1l(n[o]);this._promises.push(a),a.then(je$7(this,o))}return r},Object.defineProperties(Y$i.prototype,{promise:{get:function(){return o$1l.all(this._promises)}},files:{get:function(){return this._files}}}),$$j.prototype.get=function(e,t,i){var n;return e$2e(e)&&(n=e$2e(e.getValue)?e.getValue(this._time,i):e),u$Z(n,t)},$$j.prototype.getColor=function(e,t){var i=this.get(e,t);if(e$2e(i))return H$v(i)},$$j.prototype.getMaterialType=function(e){if(e$2e(e))return e.getType(this._time)},ne$c.prototype.get=function(e){var t=this._ids,i=e.innerHTML;if(e$2e(t[i]))return t[i];var n="style-"+ ++this._count;return e.setAttribute("id",n),n="#"+n,t[i]=n,this._styles[i]=e,n},ne$c.prototype.save=function(e){var t=this._styles,i=e.childNodes[0];for(var n in t)t.hasOwnProperty(n)&&e.insertBefore(t[n],i)},se$a.prototype.get=function(e){if(!e$2e(e))return this.get(e$1T());var t=this._ids;return e$2e(t[e])?e.toString()+"-"+ ++t[e]:(t[e]=0,e)},oe$a._createState=function(e){var t=e.entities,i=new ne$c,n=t.computeAvailability(),r=e$2e(e.time)?e.time:n.start,o=u$Z(e.defaultAvailability,n),a=u$Z(e.sampleDuration,60);o.start===o$I.MINIMUM_VALUE?o.stop===o$I.MAXIMUM_VALUE?o=new d$W:a$15.addSeconds(o.stop,-10*a,o.start):o.stop===o$I.MAXIMUM_VALUE&&a$15.addSeconds(o.start,10*a,o.stop);var s=new Y$i(e.modelCallback);return{kmlDoc:document.implementation.createDocument(ze$7,"kml"),ellipsoid:u$Z(e.ellipsoid,t$12.WGS84),idManager:new se$a,styleCache:i,externalFileHandler:s,time:r,valueGetter:new $$j(r),sampleDuration:a,defaultAvailability:new c$A([o])}};var T$q=new o$1p,_$m=new a$18,R$m=new a$15;function Xe$5(e,t,i,n){var r=e.kmlDoc,o=e.ellipsoid,a=e.valueGetter,s=u$Z(t.billboard,t.point);if(e$2e(s)||e$2e(t.path)){var l=t.position;if(!l.isConstant)return void Ce$6(e,t,s,i,n);a.get(l,void 0,T$q);var u=l$t(r,"coordinates",F$l(T$q,o)),c=r.createElement("Point"),h=r.createElement("altitudeMode");h.appendChild(B$l(e,s.heightReference)),c.appendChild(h),c.appendChild(u),i.push(c);var d=s instanceof n$V?De$a(e,s):Ee$a(e,s);n.push(d)}}function Ce$6(e,t,i,n,r){var o,a=e.kmlDoc,s=e.ellipsoid,l=e.valueGetter,u=t.position,c=!0;u instanceof t$p?(o=u.intervals,c=!1):o=u$Z(t.availability,e.defaultAvailability);var h,d,f,p=i instanceof t$I,_=[];for(h=0;h<o.length;++h){var m=o.get(h),g=c?u:m.data,x=a.createElement("altitudeMode");g instanceof i$s?(g=g._value,x.appendChild(B$l(e,k$R.CLAMP_TO_GROUND))):e$2e(i)?x.appendChild(B$l(e,i.heightReference)):x.appendChild(B$l(e,k$R.NONE));var y=[],v=[];if(g.isConstant){l.get(g,void 0,T$q);var $=l$t(a,"coordinates",F$l(T$q,s));y.push(a$15.toIso8601(m.start)),v.push($),y.push(a$15.toIso8601(m.stop)),v.push($)}else if(g instanceof o$z)for(f=g._property._times,d=0;d<f.length;++d)y.push(a$15.toIso8601(f[d])),g.getValueInReferenceFrame(f[d],Re$l.FIXED,T$q),v.push(F$l(T$q,s));else if(g instanceof g$y){f=g._times;var b=g._values;for(d=0;d<f.length;++d)y.push(a$15.toIso8601(f[d])),o$1p.fromArray(b,3*d,T$q),v.push(F$l(T$q,s))}else{var T=e.sampleDuration;m.start.clone(R$m),m.isStartIncluded||a$15.addSeconds(R$m,T,R$m);for(var C=m.stop;a$15.lessThan(R$m,C);)g.getValue(R$m,T$q),y.push(a$15.toIso8601(R$m)),v.push(F$l(T$q,s)),a$15.addSeconds(R$m,T,R$m);m.isStopIncluded&&a$15.equals(R$m,C)&&(g.getValue(R$m,T$q),y.push(a$15.toIso8601(R$m)),v.push(F$l(T$q,s)))}var S=a.createElementNS(A$u,"Track");S.appendChild(x);for(var w=0;w<y.length;++w){var E=l$t(a,"when",y[w]),P=l$t(a,"coord",v[w],A$u);S.appendChild(E),S.appendChild(P)}p&&S.appendChild(_e$7(e,i)),_.push(S)}if(1===_.length)n.push(_[0]);else if(_.length>1){var A=a.createElementNS(A$u,"MultiTrack");for(h=0;h<_.length;++h)A.appendChild(_[h]);n.push(A)}if(e$2e(i)&&!p){var L=i instanceof n$V?De$a(e,i):Ee$a(e,i);r.push(L)}var M=t.path;if(e$2e(M)){var R=l.get(M.width),O=M.material;if(e$2e(O)||e$2e(R)){var D=a.createElement("LineStyle");e$2e(R)&&D.appendChild(l$t(a,"width",R)),de$9(e,O,D),r.push(D)}}}function Ee$a(e,t){var i=e.kmlDoc,n=e.valueGetter,r=i.createElement("IconStyle"),o=n.getColor(t.color);e$2e(o)&&(r.appendChild(l$t(i,"color",o)),r.appendChild(l$t(i,"colorMode","normal")));var a=n.get(t.pixelSize);return e$2e(a)&&r.appendChild(l$t(i,"scale",a/ie$9)),r}function De$a(e,t){var i=e.kmlDoc,n=e.valueGetter,r=e.externalFileHandler,o=i.createElement("IconStyle"),a=n.get(t.image);if(e$2e(a)){a=r.texture(a);var s=i.createElement("Icon");s.appendChild(l$t(i,"href",a));var l=n.get(t.imageSubRegion);e$2e(l)&&(s.appendChild(l$t(i,"x",l.x,A$u)),s.appendChild(l$t(i,"y",l.y,A$u)),s.appendChild(l$t(i,"w",l.width,A$u)),s.appendChild(l$t(i,"h",l.height,A$u))),o.appendChild(s)}var u=n.getColor(t.color);e$2e(u)&&(o.appendChild(l$t(i,"color",u)),o.appendChild(l$t(i,"colorMode","normal")));var c=n.get(t.scale);e$2e(c)&&o.appendChild(l$t(i,"scale",c));var h=n.get(t.pixelOffset);if(e$2e(h)){c=u$Z(c,1),o$1o.divideByScalar(h,c,h);var d=n.get(t.width,ie$9),f=n.get(t.height,ie$9),p=n.get(t.horizontalOrigin,j$V.CENTER);p===j$V.CENTER?h.x-=.5*d:p===j$V.RIGHT&&(h.x-=d);var _=n.get(t.verticalOrigin,S$Q.CENTER);_===S$Q.TOP?h.y+=f:_===S$Q.CENTER&&(h.y+=.5*f);var m=i.createElement("hotSpot");m.setAttribute("x",-h.x),m.setAttribute("y",h.y),m.setAttribute("xunits","pixels"),m.setAttribute("yunits","pixels"),o.appendChild(m)}var g=n.get(t.rotation),x=n.get(t.alignedAxis);return e$2e(g)&&o$1p.equals(o$1p.UNIT_Z,x)&&(0===(g=e$2d.toDegrees(-g))&&(g=360),o.appendChild(l$t(i,"heading",g))),o}function Ze$6(e,t,i,n){var r=e.kmlDoc,o=e.ellipsoid,a=e.valueGetter;if(e$2e(t)){var s,l=r.createElement("LineString"),u=r.createElement("altitudeMode"),c=a.get(t.clampToGround,!1);c?(l.appendChild(l$t(r,"tessellate",!0)),s=r.createTextNode("clampToGround")):s=r.createTextNode("absolute"),u.appendChild(s),l.appendChild(u);var h=t.positions,d=l$t(r,"coordinates",F$l(a.get(h),o));l.appendChild(d);var f=a.get(t.zIndex);c&&e$2e(f)&&l.appendChild(l$t(r,"drawOrder",f,A$u)),i.push(l);var p=r.createElement("LineStyle"),_=a.get(t.width);e$2e(_)&&p.appendChild(l$t(r,"width",_)),de$9(e,t.material,p),n.push(p)}}function Je$4(e,t,i){var n,r=e.kmlDoc,o=e.valueGetter,a=o.get(t.height,0);i>0&&(a=i);for(var s=t.coordinates,l=o.get(s),u=[],c=[h$18.northeast,h$18.southeast,h$18.southwest,h$18.northwest],h=0;h<4;++h)c[h](l,_$m),u.push(e$2d.toDegrees(_$m.longitude)+","+e$2d.toDegrees(_$m.latitude)+","+a);n=l$t(r,"coordinates",u.join(" "));var d=r.createElement("outerBoundaryIs"),f=r.createElement("LinearRing");return f.appendChild(n),d.appendChild(f),[d]}function Me$b(e,t,i,n){for(var r=e.kmlDoc,o=e.ellipsoid,a=[],s=t.length,l=0;l<s;++l)a$18.fromCartesian(t[l],o,_$m),a.push(e$2d.toDegrees(_$m.longitude)+","+e$2d.toDegrees(_$m.latitude)+","+(n?_$m.height:i));var u=l$t(r,"coordinates",a.join(" ")),c=r.createElement("LinearRing");return c.appendChild(u),c}function Qe$4(e,t,i){var n=e.kmlDoc,r=e.valueGetter,o=r.get(t.height,0),a=r.get(t.perPositionHeight,!1);!a&&i>0&&(o=i);var s=[],l=t.hierarchy,u=r.get(l),c=Array.isArray(u)?u:u.positions,h=n.createElement("outerBoundaryIs");h.appendChild(Me$b(e,c,o,a)),s.push(h);var d=u.holes;if(e$2e(d))for(var f=d.length,p=0;p<f;++p){var _=n.createElement("innerBoundaryIs");_.appendChild(Me$b(e,d[p].positions,o,a)),s.push(_)}return s}function we$7(e,t,i,n,r){var o=e.kmlDoc,a=e.valueGetter;if(e$2e(t)){var s=t instanceof n$N;if(s&&"Image"===a.getMaterialType(t.material))return void Ve$8(e,t,r);var l=o.createElement("Polygon"),u=a.get(t.extrudedHeight,0);u>0&&l.appendChild(l$t(o,"extrude",!0));for(var c=s?Je$4(e,t,u):Qe$4(e,t,u),h=c.length,d=0;d<h;++d)l.appendChild(c[d]);var f=o.createElement("altitudeMode");f.appendChild(B$l(e,t.heightReference)),l.appendChild(f),i.push(l);var p=o.createElement("PolyStyle"),_=a.get(t.fill,!1);_&&p.appendChild(l$t(o,"fill",_)),de$9(e,t.material,p);var m=a.get(t.outline,!1);if(m){p.appendChild(l$t(o,"outline",m));var g=o.createElement("LineStyle"),x=a.get(t.outlineWidth,1);g.appendChild(l$t(o,"width",x));var y=a.getColor(t.outlineColor,e$1X.BLACK);g.appendChild(l$t(o,"color",y)),g.appendChild(l$t(o,"colorMode","normal")),n.push(g)}n.push(p)}}function Ve$8(e,t,i){var n=e.kmlDoc,r=e.valueGetter,o=e.externalFileHandler,a=n.createElement("GroundOverlay"),s=n.createElement("altitudeMode");s.appendChild(B$l(e,t.heightReference)),a.appendChild(s);var l=r.get(t.height);e$2e(l)&&a.appendChild(l$t(n,"altitude",l));var u=r.get(t.coordinates),c=n.createElement("LatLonBox");c.appendChild(l$t(n,"north",e$2d.toDegrees(u.north))),c.appendChild(l$t(n,"south",e$2d.toDegrees(u.south))),c.appendChild(l$t(n,"east",e$2d.toDegrees(u.east))),c.appendChild(l$t(n,"west",e$2d.toDegrees(u.west))),a.appendChild(c);var h=r.get(t.material),d=o.texture(h.image),f=n.createElement("Icon");f.appendChild(l$t(n,"href",d)),a.appendChild(f),e$2e(h.color)&&a.appendChild(l$t(n,"color",H$v(h.color))),i.push(a)}var Ye$5=new o$1p;function _e$7(e,t){var i=e.kmlDoc,n=e.valueGetter,r=e.externalFileHandler,o=i.createElement("Model"),a=n.get(t.scale);if(e$2e(a)){a instanceof o$1p||(a=o$1p.fromElements(a,a,a,Ye$5));var s=i.createElement("Scale");s.appendChild(l$t(i,"x",a.x)),s.appendChild(l$t(i,"y",a.y)),s.appendChild(l$t(i,"z",a.z)),o.appendChild(s)}var l=i.createElement("Link"),u=r.model(t,e.time);return l.appendChild(l$t(i,"href",u)),o.appendChild(l),o}var xe$a=new p$1e,$e$4=new p$1d,le$e=new p$1d;function er$2(e,t){var i=m$19.eastNorthUpToFixedFrame(e,void 0,le$e),n=p$1e.fromQuaternion(t,xe$a),r=p$1d.fromRotationTranslation(n,o$1p.ZERO,$e$4),o=p$1d.inverse(i,le$e),a=p$1d.multiply(o,r,le$e),s=p$1d.getMatrix3(a,xe$a);return i$16.fromQuaternion(n$15.fromRotationMatrix(s))}function rr$2(e,t,i,n,r){var o=e.kmlDoc,a=e.ellipsoid,s=e.valueGetter;if(e$2e(i)){var l=t.position;if(!l.isConstant)return void Ce$6(e,t,i,n,r);var u=_e$7(e,i),c=o.createElement("altitudeMode");c.appendChild(B$l(e,i.heightReference)),u.appendChild(c),s.get(l,void 0,T$q),a$18.fromCartesian(T$q,a,_$m);var h=o.createElement("Location");h.appendChild(l$t(o,"longitude",e$2d.toDegrees(_$m.longitude))),h.appendChild(l$t(o,"latitude",e$2d.toDegrees(_$m.latitude))),h.appendChild(l$t(o,"altitude",_$m.height)),u.appendChild(h);var d=n$15.IDENTITY;e$2e(t.orientation)&&(d=t.orientation.getValue(e.time));var f=er$2(t.position.getValue(e.time),d),p=o.createElement("Orientation");p.appendChild(l$t(o,"heading",e$2d.toDegrees(f.heading))),p.appendChild(l$t(o,"tilt",e$2d.toDegrees(f.pitch))),p.appendChild(l$t(o,"roll",e$2d.toDegrees(f.roll))),u.appendChild(p),n.push(u)}}function de$9(e,t,i){var n=e.kmlDoc,r=e.valueGetter;if(e$2e(t)){var o=r.get(t);if(e$2e(o)){var a;switch(r.getMaterialType(t)){case"Image":a=H$v(e$1X.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":a=H$v(o.color);break;case"PolylineOutline":a=H$v(o.color);var s=H$v(o.outlineColor),l=o.outlineWidth;i.appendChild(l$t(n,"outerColor",s,A$u)),i.appendChild(l$t(n,"outerWidth",l,A$u));break;case"Stripe":a=H$v(o.oddColor)}e$2e(a)&&(i.appendChild(l$t(n,"color",a)),i.appendChild(l$t(n,"colorMode","normal")))}}}function B$l(e,t){var i,n=e.kmlDoc;switch(e.valueGetter.get(t,k$R.NONE)){case k$R.NONE:i=n.createTextNode("absolute");break;case k$R.CLAMP_TO_GROUND:i=n.createTextNode("clampToGround");break;case k$R.RELATIVE_TO_GROUND:i=n.createTextNode("relativeToGround")}return i}function F$l(e,t){Array.isArray(e)||(e=[e]);for(var i=e.length,n=[],r=0;r<i;++r)a$18.fromCartesian(e[r],t,_$m),n.push(e$2d.toDegrees(_$m.longitude)+","+e$2d.toDegrees(_$m.latitude)+","+_$m.height);return n.join(" ")}function l$t(e,t,i,n){"boolean"==typeof(i=u$Z(i,""))&&(i=i?"1":"0");var r=e$2e(n)?e.createElementNS(n,t):e.createElement(t),o="string"===i&&-1!==i.indexOf("<")?e.createCDATASection(i):e.createTextNode(i);return r.appendChild(o),r}function H$v(e){for(var t="",i=e.toBytes(),n=3;n>=0;--n)t+=i[n]<16?"0"+i[n].toString(16):i[n].toString(16);return t}var ce$e={};!function(e,t){!function(e){var t=function(e){return e},i=function(e){if(null==e)return t;var i,n,r=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(i=n=0);var l=2,u=e.length,c=new Array(u);for(c[0]=(i+=e[0])*r+a,c[1]=(n+=e[1])*o+s;l<u;)c[l]=e[l],++l;return c}},n=function(e){var t,n=i(e.transform),r=1/0,o=r,a=-r,s=-r;function l(e){(e=n(e))[0]<r&&(r=e[0]),e[0]>a&&(a=e[0]),e[1]<o&&(o=e[1]),e[1]>s&&(s=e[1])}function u(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(u);break;case"Point":l(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(l)}}for(t in e.arcs.forEach((function(e){for(var t,i=-1,l=e.length;++i<l;)(t=n(e[i],i))[0]<r&&(r=t[0]),t[0]>a&&(a=t[0]),t[1]<o&&(o=t[1]),t[1]>s&&(s=t[1])})),e.objects)u(e.objects[t]);return[r,o,a,s]},r=function(e,t){for(var i,n=e.length,r=n-t;r<--n;)i=e[r],e[r++]=e[n],e[n]=i},o=function(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return a(e,t)}))}:a(e,t)};function a(e,t){var i=t.id,n=t.bbox,r=null==t.properties?{}:t.properties,o=s(e,t);return null==i&&null==n?{type:"Feature",properties:r,geometry:o}:null==n?{type:"Feature",id:i,properties:r,geometry:o}:{type:"Feature",id:i,bbox:n,properties:r,geometry:o}}function s(e,t){var n=i(e.transform),o=e.arcs;function a(e,t){t.length&&t.pop();for(var i=o[e<0?~e:e],a=0,s=i.length;a<s;++a)t.push(n(i[a],a));e<0&&r(t,s)}function s(e){return n(e)}function l(e){for(var t=[],i=0,n=e.length;i<n;++i)a(e[i],t);return t.length<2&&t.push(t[0]),t}function u(e){for(var t=l(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(u)}function h(e){var t,i=e.type;switch(i){case"GeometryCollection":return{type:i,geometries:e.geometries.map(h)};case"Point":t=s(e.coordinates);break;case"MultiPoint":t=e.coordinates.map(s);break;case"LineString":t=l(e.arcs);break;case"MultiLineString":t=e.arcs.map(l);break;case"Polygon":t=c(e.arcs);break;case"MultiPolygon":t=e.arcs.map(c);break;default:return null}return{type:i,coordinates:t}}return h(t)}var l=function(e,t){var i={},n={},r={},o=[],a=-1;function s(t){var i,n=e.arcs[t<0?~t:t],r=n[0];return e.transform?(i=[0,0],n.forEach((function(e){i[0]+=e[0],i[1]+=e[1]}))):i=n[n.length-1],t<0?[i,r]:[r,i]}function l(e,t){for(var n in e){var r=e[n];delete t[r.start],delete r.start,delete r.end,r.forEach((function(e){i[e<0?~e:e]=1})),o.push(r)}}return t.forEach((function(i,n){var r,o=e.arcs[i<0?~i:i];o.length<3&&!o[1][0]&&!o[1][1]&&(r=t[++a],t[a]=i,t[n]=r)})),t.forEach((function(e){var t,i,o=s(e),a=o[0],l=o[1];if(t=r[a])if(delete r[t.end],t.push(e),t.end=l,i=n[l]){delete n[i.start];var u=i===t?t:t.concat(i);n[u.start=t.start]=r[u.end=i.end]=u}else n[t.start]=r[t.end]=t;else if(t=n[l])if(delete n[t.start],t.unshift(e),t.start=a,i=r[a]){delete r[i.end];var c=i===t?t:i.concat(t);n[c.start=i.start]=r[c.end=t.end]=c}else n[t.start]=r[t.end]=t;else n[(t=[e]).start=a]=r[t.end=l]=t})),l(r,n),l(n,r),t.forEach((function(e){i[e<0?~e:e]||o.push([e])})),o},u=function(e){return s(e,c.apply(this,arguments))};function c(e,t,i){var n,r,o;if(arguments.length>1)n=h(e,t,i);else for(r=0,n=new Array(o=e.arcs.length);r<o;++r)n[r]=r;return{type:"MultiLineString",arcs:l(e,n)}}function h(e,t,i){var n,r=[],o=[];function a(e){var t=e<0?~e:e;(o[t]||(o[t]=[])).push({i:e,g:n})}function s(e){e.forEach(a)}function l(e){e.forEach(s)}function u(e){e.forEach(l)}function c(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(c);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":u(e.arcs)}}return c(t),o.forEach(null==i?function(e){r.push(e[0].i)}:function(e){i(e[0].g,e[e.length-1].g)&&r.push(e[0].i)}),r}function d(e){for(var t,i=-1,n=e.length,r=e[n-1],o=0;++i<n;)t=r,r=e[i],o+=t[0]*r[1]-t[1]*r[0];return Math.abs(o)}var f=function(e){return s(e,p.apply(this,arguments))};function p(e,t){var i={},n=[],r=[];function o(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(o);break;case"Polygon":a(e.arcs);break;case"MultiPolygon":e.arcs.forEach(a)}}function a(e){e.forEach((function(t){t.forEach((function(t){(i[t=t<0?~t:t]||(i[t]=[])).push(e)}))})),n.push(e)}function u(t){return d(s(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach(o),n.forEach((function(e){if(!e._){var t=[],n=[e];for(e._=1,r.push(t);e=n.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].forEach((function(e){e._||(e._=1,n.push(e))}))}))}))}})),n.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:r.map((function(t){var n,r=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].length<2&&r.push(e)}))}))})),(n=(r=l(e,r)).length)>1)for(var o,a,s=1,c=u(r[0]);s<n;++s)(o=u(r[s]))>c&&(a=r[0],r[0]=r[s],r[s]=a,c=o);return r}))}}var _=function(e,t){for(var i=0,n=e.length;i<n;){var r=i+n>>>1;e[r]<t?i=r+1:n=r}return i},m=function(e){var t={},i=e.map((function(){return[]}));function n(e,i){e.forEach((function(e){e<0&&(e=~e);var n=t[e];n?n.push(i):t[e]=[i]}))}function r(e,t){e.forEach((function(e){n(e,t)}))}function o(e,t){"GeometryCollection"===e.type?e.geometries.forEach((function(e){o(e,t)})):e.type in a&&a[e.type](e.arcs,t)}var a={LineString:n,MultiLineString:r,Polygon:r,MultiPolygon:function(e,t){e.forEach((function(e){r(e,t)}))}};for(var s in e.forEach(o),t)for(var l=t[s],u=l.length,c=0;c<u;++c)for(var h=c+1;h<u;++h){var d,f=l[c],p=l[h];(d=i[f])[s=_(d,p)]!==p&&d.splice(s,0,p),(d=i[p])[s=_(d,f)]!==f&&d.splice(s,0,f)}return i},g=function(e){if(null==e)return t;var i,n,r=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(i=n=0);var l=2,u=e.length,c=new Array(u),h=Math.round((e[0]-a)/r),d=Math.round((e[1]-s)/o);for(c[0]=h-i,i=h,c[1]=d-n,n=d;l<u;)c[l]=e[l],++l;return c}},x=function(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)l=e.bbox;else{if(!((i=Math.floor(t))>=2))throw new Error("n must be ≥2");var i,r=(l=e.bbox||n(e))[0],o=l[1],a=l[2],s=l[3];t={scale:[a-r?(a-r)/(i-1):1,s-o?(s-o)/(i-1):1],translate:[r,o]}}var l,u,c=g(t),h=e.objects,d={};function f(e){return c(e)}function p(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(p)};break;case"Point":t={type:"Point",coordinates:f(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(f)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function _(e){var t,i=0,n=1,r=e.length,o=new Array(r);for(o[0]=c(e[0],0);++i<r;)((t=c(e[i],i))[0]||t[1])&&(o[n++]=t);return 1===n&&(o[n++]=[0,0]),o.length=n,o}for(u in h)d[u]=p(h[u]);return{type:"Topology",bbox:l,transform:t,objects:d,arcs:e.arcs.map(_)}},y=function(e){var t=1/0,i=1/0,n=-1/0,r=-1/0;function o(e){null!=e&&a.hasOwnProperty(e.type)&&a[e.type](e)}var a={GeometryCollection:function(e){e.geometries.forEach(o)},Point:function(e){s(e.coordinates)},MultiPoint:function(e){e.coordinates.forEach(s)},LineString:function(e){l(e.arcs)},MultiLineString:function(e){e.arcs.forEach(l)},Polygon:function(e){e.arcs.forEach(l)},MultiPolygon:function(e){e.arcs.forEach(u)}};function s(e){var o=e[0],a=e[1];o<t&&(t=o),o>n&&(n=o),a<i&&(i=a),a>r&&(r=a)}function l(e){e.forEach(s)}function u(e){e.forEach(l)}for(var c in e)o(e[c]);return n>=t&&r>=i?[t,i,n,r]:void 0},v=function(e,t,i,n,r){3===arguments.length&&(n=Array,r=null);for(var o=new n(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),a=e-1,s=0;s<e;++s)o[s]=r;function l(n){for(var s=t(n)&a,l=o[s],u=0;l!=r;){if(i(l,n))return!0;if(++u>=e)throw new Error("full hashset");l=o[s=s+1&a]}return o[s]=n,!0}function u(n){for(var s=t(n)&a,l=o[s],u=0;l!=r;){if(i(l,n))return!0;if(++u>=e)break;l=o[s=s+1&a]}return!1}function c(){for(var e=[],t=0,i=o.length;t<i;++t){var n=o[t];n!=r&&e.push(n)}return e}return{add:l,has:u,values:c}},$=function(e,t,i,n,r,o){3===arguments.length&&(n=o=Array,r=null);for(var a=new n(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),s=new o(e),l=e-1,u=0;u<e;++u)a[u]=r;function c(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u]=o;if(++h>=e)throw new Error("full hashmap");c=a[u=u+1&l]}return a[u]=n,s[u]=o,o}function h(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u];if(++h>=e)throw new Error("full hashmap");c=a[u=u+1&l]}return a[u]=n,s[u]=o,o}function d(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u];if(++h>=e)break;c=a[u=u+1&l]}return o}function f(){for(var e=[],t=0,i=a.length;t<i;++t){var n=a[t];n!=r&&e.push(n)}return e}return{set:c,maybeSet:h,get:d,keys:f}},b=function(e,t){return e[0]===t[0]&&e[1]===t[1]},T=new ArrayBuffer(16),C=new Uint32Array(T),S=function(e){var t=C[0]^C[1];return 2147483647&(t=t<<5^t>>7^C[2]^C[3])},w=function(e){var t,i,n,r,o=e.coordinates,a=e.lines,s=e.rings,l=C(),u=new Int32Array(o.length),c=new Int32Array(o.length),h=new Int32Array(o.length),d=new Int8Array(o.length),f=0;for(t=0,i=o.length;t<i;++t)u[t]=c[t]=h[t]=-1;for(t=0,i=a.length;t<i;++t){var p=a[t],_=p[0],m=p[1];for(n=l[_],r=l[++_],++f,d[n]=1;++_<=m;)T(t,n,n=r,r=l[_]);++f,d[r]=1}for(t=0,i=o.length;t<i;++t)u[t]=-1;for(t=0,i=s.length;t<i;++t){var g=s[t],x=g[0]+1,y=g[1];for(T(t,l[y-1],n=l[x-1],r=l[x]);++x<=y;)T(t,n,n=r,r=l[x])}function T(e,t,i,n){if(u[i]!==e){u[i]=e;var r=c[i];if(r>=0){var o=h[i];(r!==t||o!==n)&&(r!==n||o!==t)&&(++f,d[i]=1)}else c[i]=t,h[i]=n}}function C(){for(var e=$(1.4*o.length,w,E,Int32Array,-1,Int32Array),t=new Int32Array(o.length),i=0,n=o.length;i<n;++i)t[i]=e.maybeSet(i,i);return t}function w(e){return S(o[e])}function E(e,t){return b(o[e],o[t])}u=c=h=null;var P,A=v(1.4*f,S,b);for(t=0,i=o.length;t<i;++t)d[P=l[t]]&&A.add(o[P]);return A},E=function(e){var t,i,n,r=w(e),o=e.coordinates,a=e.lines,s=e.rings;for(i=0,n=a.length;i<n;++i)for(var l=a[i],u=l[0],c=l[1];++u<c;)r.has(o[u])&&(t={0:u,1:l[1]},l[1]=u,l=l.next=t);for(i=0,n=s.length;i<n;++i)for(var h=s[i],d=h[0],f=d,p=h[1],_=r.has(o[d]);++f<p;)r.has(o[f])&&(_?(t={0:f,1:h[1]},h[1]=f,h=h.next=t):(P(o,d,p,p-f),o[p]=o[d],_=!0,f=d));return e};function P(e,t,i,n){A(e,t,i),A(e,t,t+n),A(e,t+n,i)}function A(e,t,i){for(var n,r=t+(i---t>>1);t<r;++t,--i)n=e[t],e[t]=e[i],e[i]=n}var L=function(e){var t,i,n,r,o=e.coordinates,a=e.lines,s=e.rings,l=a.length+s.length;for(delete e.lines,delete e.rings,n=0,r=a.length;n<r;++n)for(t=a[n];t=t.next;)++l;for(n=0,r=s.length;n<r;++n)for(i=s[n];i=i.next;)++l;var u=$(2*l*1.4,S,b),c=e.arcs=[];for(n=0,r=a.length;n<r;++n){t=a[n];do{h(t)}while(t=t.next)}for(n=0,r=s.length;n<r;++n)if((i=s[n]).next)do{h(i)}while(i=i.next);else d(i);function h(e){var t,i,n,r,a,s,l,h;if(n=u.get(t=o[e[0]]))for(l=0,h=n.length;l<h;++l)if(f(r=n[l],e))return e[0]=r[0],void(e[1]=r[1]);if(a=u.get(i=o[e[1]]))for(l=0,h=a.length;l<h;++l)if(p(s=a[l],e))return e[1]=s[0],void(e[0]=s[1]);n?n.push(e):u.set(t,[e]),a?a.push(e):u.set(i,[e]),c.push(e)}function d(e){var t,i,n,r,a;if(i=u.get(t=o[e[0]]))for(r=0,a=i.length;r<a;++r){if(_(n=i[r],e))return e[0]=n[0],void(e[1]=n[1]);if(m(n,e))return e[0]=n[1],void(e[1]=n[0])}if(i=u.get(t=o[e[0]+g(e)]))for(r=0,a=i.length;r<a;++r){if(_(n=i[r],e))return e[0]=n[0],void(e[1]=n[1]);if(m(n,e))return e[0]=n[1],void(e[1]=n[0])}i?i.push(e):u.set(t,[e]),c.push(e)}function f(e,t){var i=e[0],n=t[0],r=e[1];if(i-r!=n-t[1])return!1;for(;i<=r;++i,++n)if(!b(o[i],o[n]))return!1;return!0}function p(e,t){var i=e[0],n=t[0],r=e[1],a=t[1];if(i-r!=n-a)return!1;for(;i<=r;++i,--a)if(!b(o[i],o[a]))return!1;return!0}function _(e,t){var i=e[0],n=t[0],r=e[1]-i;if(r!==t[1]-n)return!1;for(var a=g(e),s=g(t),l=0;l<r;++l)if(!b(o[i+(l+a)%r],o[n+(l+s)%r]))return!1;return!0}function m(e,t){var i=e[0],n=t[0],r=e[1],a=t[1],s=r-i;if(s!==a-n)return!1;for(var l=g(e),u=s-g(t),c=0;c<s;++c)if(!b(o[i+(c+l)%s],o[a-(c+u)%s]))return!1;return!0}function g(e){for(var t=e[0],i=e[1],n=t,r=n,a=o[n];++n<i;){var s=o[n];(s[0]<a[0]||s[0]===a[0]&&s[1]<a[1])&&(r=n,a=s)}return r-t}return e},M=function(e){for(var t=-1,i=e.length;++t<i;){for(var n,r,o=e[t],a=0,s=1,l=o.length,u=o[0],c=u[0],h=u[1];++a<l;)n=(u=o[a])[0],r=u[1],(n!==c||r!==h)&&(o[s++]=[n-c,r-h],c=n,h=r);1===s&&(o[s++]=[0,0]),o.length=s}return e},R=function(e){var t=-1,i=[],n=[],r=[];function o(e){e&&a.hasOwnProperty(e.type)&&a[e.type](e)}var a={GeometryCollection:function(e){e.geometries.forEach(o)},LineString:function(e){e.arcs=s(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(s)},Polygon:function(e){e.arcs=e.arcs.map(l)},MultiPolygon:function(e){e.arcs=e.arcs.map(u)}};function s(e){for(var n=0,o=e.length;n<o;++n)r[++t]=e[n];var a={0:t-o+1,1:t};return i.push(a),a}function l(e){for(var i=0,o=e.length;i<o;++i)r[++t]=e[i];var a={0:t-o+1,1:t};return n.push(a),a}function u(e){return e.map(l)}for(var c in e)o(e[c]);return{type:"Topology",coordinates:r,lines:i,rings:n,objects:e}},O=function(e){var t,i={};for(t in e)i[t]=D(e[t]);return i};function D(e){return null==e?{type:null}:("FeatureCollection"===e.type?I:"Feature"===e.type?F:B)(e)}function I(e){var t={type:"GeometryCollection",geometries:e.features.map(F)};return null!=e.bbox&&(t.bbox=e.bbox),t}function F(e){var t,i=B(e.geometry);for(t in null!=e.id&&(i.id=e.id),null!=e.bbox&&(i.bbox=e.bbox),e.properties){i.properties=e.properties;break}return i}function B(e){if(null==e)return{type:null};var t="GeometryCollection"===e.type?{type:"GeometryCollection",geometries:e.geometries.map(B)}:"Point"===e.type||"MultiPoint"===e.type?{type:e.type,coordinates:e.coordinates}:{type:e.type,arcs:e.coordinates};return null!=e.bbox&&(t.bbox=e.bbox),t}var N=function(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=o-n?(i-1)/(o-n):1,l=a-r?(i-1)/(a-r):1;function u(e){return[Math.round((e[0]-n)*s),Math.round((e[1]-r)*l)]}function c(e,t){for(var i,o,a,u,c,h=-1,d=0,f=e.length,p=new Array(f);++h<f;)i=e[h],u=Math.round((i[0]-n)*s),c=Math.round((i[1]-r)*l),(u!==o||c!==a)&&(p[d++]=[o=u,a=c]);for(p.length=d;d<t;)d=p.push([p[0][0],p[0][1]]);return p}function h(e){return c(e,2)}function d(e){return c(e,4)}function f(e){return e.map(d)}function p(e){null!=e&&_.hasOwnProperty(e.type)&&_[e.type](e)}var _={GeometryCollection:function(e){e.geometries.forEach(p)},Point:function(e){e.coordinates=u(e.coordinates)},MultiPoint:function(e){e.coordinates=e.coordinates.map(u)},LineString:function(e){e.arcs=h(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(h)},Polygon:function(e){e.arcs=f(e.arcs)},MultiPolygon:function(e){e.arcs=e.arcs.map(f)}};for(var m in e)p(e[m]);return{scale:[1/s,1/l],translate:[n,r]}},G=function(e,t){var i=y(e=O(e)),n=t>0&&i&&N(e,i,t),r=L(E(R(e))),o=r.coordinates,a=$(1.4*r.arcs.length,z,U);function s(e){e&&l.hasOwnProperty(e.type)&&l[e.type](e)}e=r.objects,r.bbox=i,r.arcs=r.arcs.map((function(e,t){return a.set(e,t),o.slice(e[0],e[1]+1)})),delete r.coordinates,o=null;var l={GeometryCollection:function(e){e.geometries.forEach(s)},LineString:function(e){e.arcs=u(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(u)},Polygon:function(e){e.arcs=e.arcs.map(u)},MultiPolygon:function(e){e.arcs=e.arcs.map(c)}};function u(e){var t=[];do{var i=a.get(e);t.push(e[0]<e[1]?i:~i)}while(e=e.next);return t}function c(e){return e.map(u)}for(var h in e)s(e[h]);return n&&(r.transform=n,r.arcs=M(r.arcs)),r};function z(e){var t,i=e[0],n=e[1];return n<i&&(t=i,i=n,n=t),i+31*n}function U(e,t){var i,n=e[0],r=e[1],o=t[0],a=t[1];return r<n&&(i=n,n=r,r=i),a<o&&(i=o,o=a,a=i),n===o&&r===a}var V=function(e){var t,i,n=e.objects,r={},o=e.arcs,a=o.length,s=-1,l=new Array(a),u=0,c=-1;function h(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(h);break;case"LineString":f(e.arcs);break;case"MultiLineString":case"Polygon":e.arcs.forEach(f);break;case"MultiPolygon":e.arcs.forEach(p)}}function d(e){e<0&&(e=~e),l[e]||(l[e]=1,++u)}function f(e){e.forEach(d)}function p(e){e.forEach(f)}function _(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(_)};break;case"LineString":t={type:"LineString",arcs:g(e.arcs)};break;case"MultiLineString":t={type:"MultiLineString",arcs:e.arcs.map(g)};break;case"Polygon":t={type:"Polygon",arcs:e.arcs.map(g)};break;case"MultiPolygon":t={type:"MultiPolygon",arcs:e.arcs.map(x)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function m(e){return e<0?~l[~e]:l[e]}function g(e){return e.map(m)}function x(e){return e.map(g)}for(i in n)h(n[i]);for(t=new Array(u);++s<a;)l[s]&&(l[s]=++c,t[c]=o[s]);for(i in n)r[i]=_(n[i]);return{type:"Topology",bbox:e.bbox,transform:e.transform,objects:r,arcs:t}},k=function(e,t){var i,n=e.objects,r={};function o(e){var t,i;switch(e.type){case"Polygon":t=(i=a(e.arcs))?{type:"Polygon",arcs:i}:{type:null};break;case"MultiPolygon":t=(i=e.arcs.map(a).filter(H)).length?{type:"MultiPolygon",arcs:i}:{type:null};break;case"GeometryCollection":t=(i=e.geometries.map(o).filter(q)).length?{type:"GeometryCollection",geometries:i}:{type:null};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function a(e){return e.length&&s(e[0])?[e[0]].concat(e.slice(1).filter(l)):null}function s(e){return t(e,!1)}function l(e){return t(e,!0)}for(i in null==t&&(t=W),n)r[i]=o(n[i]);return V({type:"Topology",bbox:e.bbox,transform:e.transform,objects:r,arcs:e.arcs})};function W(){return!0}function H(e){return e}function q(e){return null!=e.type}var j=function(e){var t,i=new Array(e.arcs.length),n=0;function r(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(r);break;case"Polygon":o(e.arcs);break;case"MultiPolygon":e.arcs.forEach(o)}}function o(e){for(var t=0,r=e.length;t<r;++t,++n)for(var o=e[t],a=0,s=o.length;a<s;++a){var l=o[a];l<0&&(l=~l);var u=i[l];null==u?i[l]=n:u!==n&&(i[l]=-1)}}for(t in e.objects)r(e.objects[t]);return function(e){for(var t,n=0,r=e.length;n<r;++n)if(-1===i[(t=e[n])<0?~t:t])return!0;return!1}};function X(e){var t=e[0],i=e[1],n=e[2];return Math.abs((t[0]-n[0])*(i[1]-t[1])-(t[0]-i[0])*(n[1]-t[1]))/2}function Y(e){for(var t,i=-1,n=e.length,r=e[n-1],o=0;++i<n;)t=r,r=e[i],o+=t[0]*r[1]-t[1]*r[0];return Math.abs(o)/2}var Z=function(e,t,i){return t=null==t?Number.MIN_VALUE:+t,null==i&&(i=Y),function(n,r){return i(o(e,{type:"Polygon",arcs:[n]}).geometry.coordinates[0],r)>=t}},K=function(e,t,i){var n=j(e),r=Z(e,t,i);return function(e,t){return n(e,t)||r(e,t)}};function Q(e,t){return e[1][2]-t[1][2]}var J=function(){var e={},t=[],i=0;function n(e,i){for(;i>0;){var n=(i+1>>1)-1,r=t[n];if(Q(e,r)>=0)break;t[r._=i]=r,t[e._=i=n]=e}}function r(e,n){for(;;){var r=n+1<<1,o=r-1,a=n,s=t[a];if(o<i&&Q(t[o],s)<0&&(s=t[a=o]),r<i&&Q(t[r],s)<0&&(s=t[a=r]),a===n)break;t[s._=n]=s,t[e._=n=a]=e}}return e.push=function(e){return n(t[e._=i]=e,i++),i},e.pop=function(){if(!(i<=0)){var e,n=t[0];return--i>0&&(e=t[i],r(t[e._=0]=e,0)),n}},e.remove=function(e){var o,a=e._;if(t[a]===e)return a!==--i&&(Q(o=t[i],e)<0?n:r)(t[o._=a]=o,a),a},e};function ee(e){return[e[0],e[1],0]}var te=function(e,t){var n=e.transform?i(e.transform):ee,r=J();null==t&&(t=X);var o=e.arcs.map((function(e){var i,o,s,l=[],u=0;for(o=1,s=(e=e.map(n)).length-1;o<s;++o)(i=[e[o-1],e[o],e[o+1]])[1][2]=t(i),l.push(i),r.push(i);for(e[0][2]=e[s][2]=1/0,o=0,s=l.length;o<s;++o)(i=l[o]).previous=l[o-1],i.next=l[o+1];for(;i=r.pop();){var c=i.previous,h=i.next;i[1][2]<u?i[1][2]=u:u=i[1][2],c&&(c.next=h,c[2]=i[2],a(c)),h&&(h.previous=c,h[0]=i[0],a(h))}return e}));function a(e){r.remove(e),e[1][2]=t(e),r.push(e)}return{type:"Topology",bbox:e.bbox,objects:e.objects,arcs:o}},ie=function(e,t){var i=[];return e.arcs.forEach((function(e){e.forEach((function(e){isFinite(e[2])&&i.push(e[2])}))})),i.length&&ne(i.sort(re),t)};function ne(e,t){if(i=e.length){if((t=+t)<=0||i<2)return e[0];if(t>=1)return e[i-1];var i,n=(i-1)*t,r=Math.floor(n),o=e[r];return o+(e[r+1]-o)*(n-r)}}function re(e,t){return t-e}var oe=function(e,t){t=null==t?Number.MIN_VALUE:+t;var i=e.arcs.map((function(e){for(var i,n=-1,r=0,o=e.length,a=new Array(o);++n<o;)(i=e[n])[2]>=t&&(a[r++]=[i[0],i[1]]);return a.length=r,a}));return{type:"Topology",transform:e.transform,bbox:e.bbox,objects:e.objects,arcs:i}},ae=Math.PI,se=2*ae,le=ae/4,ue=ae/180,ce=Math.abs,he=Math.atan2,de=Math.cos,fe=Math.sin;function pe(e,t){for(var i,n,r=0,o=e.length,a=0,s=e[t?r++:o-1],l=s[0]*ue,u=s[1]*ue/2+le,c=de(u),h=fe(u);r<o;++r){i=l,l=(s=e[r])[0]*ue,u=s[1]*ue/2+le,n=c,c=de(u);var d=l-i,f=d>=0?1:-1,p=f*d,_=h*(h=fe(u)),m=n*c+_*de(p),g=_*f*fe(p);a+=he(g,m)}return a}function _e(e,t){var i=pe(e,!0);return t&&(i*=-1),2*(i<0?se+i:i)}function me(e){return 2*ce(pe(e,!1))}e.bbox=n,e.feature=o,e.mesh=u,e.meshArcs=c,e.merge=f,e.mergeArcs=p,e.neighbors=m,e.quantize=x,e.transform=i,e.untransform=g,e.topology=G,e.filter=k,e.filterAttached=j,e.filterAttachedWeight=K,e.filterWeight=Z,e.planarRingArea=Y,e.planarTriangleArea=X,e.presimplify=te,e.quantile=ie,e.simplify=oe,e.sphericalRingArea=_e,e.sphericalTriangleArea=me,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof exports&&typeof module<"u"?exports:e.topojson=e.topojson||{})}(ce$e);var ke$7=ce$e.topojson;function P$n(e){return o$1p.fromDegrees(e[0],e[1],e[2])}var A$t={"urn:ogc:def:crs:OGC:1.3:CRS84":P$n,"EPSG:4326":P$n,"urn:ogc:def:crs:EPSG::4326":P$n},J$i={},Q$m={},M$p=48,R$l,G$q=e$1X.ROYALBLUE,L$p=e$1X.YELLOW,O$k=2,U$o=e$1X.fromBytes(255,255,0,100),D$m=!1,Le$a={small:24,medium:48,large:64},Oe$b=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function Z$l(e,t){var i="";for(var n in e)if(e.hasOwnProperty(n)){if(n===t||-1!==Oe$b.indexOf(n))continue;var r=e[n];e$2e(r)&&(i+="object"==typeof r?"<tr><th>"+n+"</th><td>"+Z$l(r)+"</td></tr>":"<tr><th>"+n+"</th><td>"+r+"</td></tr>")}return i.length>0&&(i='<table class="supermap3d-infoBox-defaultTable"><tbody>'+i+"</tbody></table>"),i}function Ue$7(e,t,i){var n;return function(r,o){return e$2e(n)||(n=e(t,i)),n}}function $$i(e,t){return new n$X(Ue$7(Z$l,e,t),!0)}function B$k(e,t,i){var n=e.id;if(e$2e(n)&&"Feature"===e.type){for(var r=2,o=n;e$2e(t.getById(o));)o=n+"_"+r,r++;n=o}else n=e$1T();var a=t.getOrCreateEntity(n),s=e.properties;if(e$2e(s)){a.properties=s;var l,u=s.title;if(e$2e(u))a.name=u,l="title";else{var c=Number.MAX_VALUE;for(var h in s)if(s.hasOwnProperty(h)&&s[h]){var d=h.toLowerCase();if(c>1&&"title"===d){c=1,l=h;break}c>2&&"name"===d?(c=2,l=h):c>3&&/title/i.test(h)?(c=3,l=h):c>4&&/name/i.test(h)&&(c=4,l=h)}e$2e(l)&&(a.name=s[l])}var f=s.description;null!==f&&(a.description=e$2e(f)?new e$1L(f):i(s,l))}return a}function F$k(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++)i[n]=t(e[n]);return i}var K$i={Feature:re$e,FeatureCollection:Be$a,GeometryCollection:ie$8,LineString:le$d,MultiLineString:ae$c,MultiPoint:oe$9,MultiPolygon:me$e,Point:ne$b,Polygon:ce$d,Topology:ue$b},ee$d={GeometryCollection:ie$8,LineString:le$d,MultiLineString:ae$c,MultiPoint:oe$9,MultiPolygon:me$e,Point:ne$b,Polygon:ce$d,Topology:ue$b};function re$e(e,t,i,n,r){if(null!==t.geometry){if(!e$2e(t.geometry))throw new t$13("feature.geometry is required.");var o=t.geometry.type,a=ee$d[o];if(!e$2e(a))throw new t$13("Unknown geometry type: "+o);a(e,t,t.geometry,n,r)}else B$k(t,e._entityCollection,r.describe)}function Be$a(e,t,i,n,r){for(var o=t.features,a=0,s=o.length;a<s;a++)re$e(e,o[a],void 0,n,r)}function ie$8(e,t,i,n,r){for(var o=i.geometries,a=0,s=o.length;a<s;a++){var l=o[a],u=l.type,c=ee$d[u];if(!e$2e(c))throw new t$13("Unknown geometry type: "+u);c(e,t,l,n,r)}}function te$b(e,t,i,n,r){var o,a=r.markerSymbol,s=r.markerColor,l=r.markerSize,u=t.properties;if(e$2e(u)){var c=u["marker-color"];e$2e(c)&&(s=e$1X.fromCssColorString(c)),l=u$Z(Le$a[u["marker-size"]],l);var h=u["marker-symbol"];e$2e(h)&&(a=h)}o=e$2e(a)?1===a.length?e._pinBuilder.fromText(a.toUpperCase(),s,l):e._pinBuilder.fromMakiIconId(a,s,l):e._pinBuilder.fromColor(s,l);var d=new n$V;d.verticalOrigin=new e$1L(S$Q.BOTTOM),2===n.length&&r.clampToGround&&(d.heightReference=k$R.CLAMP_TO_GROUND);var f=B$k(t,e._entityCollection,r.describe);f.billboard=d,f.position=new r$V(i(n));var p=o$1l(o).then((function(e){d.image=new e$1L(e)})).otherwise((function(){d.image=new e$1L(e._pinBuilder.fromColor(s,l))}));e._promises.push(p)}function ne$b(e,t,i,n,r){te$b(e,t,n,i.coordinates,r)}function oe$9(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)te$b(e,t,n,o[a],r)}function se$9(e,t,i,n,r){var o=r.strokeMaterialProperty,a=r.strokeWidthProperty,s=t.properties;if(e$2e(s)){var l=s["stroke-width"];e$2e(l)&&(a=new e$1L(l));var u,c=s.stroke;e$2e(c)&&(u=e$1X.fromCssColorString(c));var h=s["stroke-opacity"];e$2e(h)&&1!==h&&(e$2e(u)||(u=o.color.clone()),u.alpha=h),e$2e(u)&&(o=new t$P(u))}var d=B$k(t,e._entityCollection,r.describe),f=new a$L;d.polyline=f,f.clampToGround=r.clampToGround,f.material=o,f.width=a,f.positions=new e$1L(F$k(n,i)),f.arcType=m$1h.RHUMB}function le$d(e,t,i,n,r){se$9(e,t,n,i.coordinates,r)}function ae$c(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)se$9(e,t,n,o[a],r)}function fe$b(e,t,i,n,r){if(0!==n.length&&0!==n[0].length){var o=r.strokeMaterialProperty.color,a=r.fillMaterialProperty,s=r.strokeWidthProperty,l=t.properties;if(e$2e(l)){var u=l["stroke-width"];e$2e(u)&&(s=new e$1L(u));var c,h=l.stroke;e$2e(h)&&(c=e$1X.fromCssColorString(h));var d=l["stroke-opacity"];e$2e(d)&&1!==d&&(e$2e(c)||(c=r.strokeMaterialProperty.color.clone()),c.alpha=d),e$2e(c)&&(o=new e$1L(c));var f,p=l.fill;e$2e(p)&&((f=e$1X.fromCssColorString(p)).alpha=a.color.alpha),e$2e(d=l["fill-opacity"])&&d!==a.color.alpha&&(e$2e(f)||(f=a.color.clone()),f.alpha=d),e$2e(f)&&(a=new t$P(f))}var _=new l$Y;_.outline=new e$1L(!0),_.outlineColor=o,_.outlineWidth=s,_.material=a,_.arcType=m$1h.GEODESIC,_._fromDataSource=!0;for(var m=[],g=1,x=n.length;g<x;g++)m.push(new e$1M(F$k(n[g],i)));var y=n[0];_.hierarchy=new e$1L(new e$1M(F$k(y,i),m)),y[0].length>2?_.perPositionHeight=new e$1L(!0):r.clampToGround||(_.height=0);var v=B$k(t,e._entityCollection,r.describe);r.clampToGround&&(_.classificationType=_0x2b86ba.TERRAIN),r.clampToS3M&&(_.classificationType=_0x2b86ba.S3M_TILE),v.polygon=_}}function ce$d(e,t,i,n,r){fe$b(e,t,n,i.coordinates,r)}function me$e(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)fe$b(e,t,n,o[a],r)}function ue$b(e,t,i,n,r){for(var o in i.objects)if(i.objects.hasOwnProperty(o)){var a=ke$7.feature(i,i.objects[o]);(0,K$i[a.type])(e,a,a,n,r)}}function y$p(e){this._name=e,this._changed=new o$1h,this._error=new o$1h,this._isLoading=!1,this._loading=new o$1h,this._entityCollection=new r$v(this),this._promises=[],this._pinBuilder=new s$A,this._entityCluster=new a$r,this._credit=void 0,this._resourceCredits=[],this._visibleViewport=4095,this._swipeRegion=new e$2c(0,0,1,1),this._swipeEnabled=!1}function pe$d(e,t,i,n){var r;e$2e(n)&&(r=f$Q(n)),e$2e(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));var o=K$i[t.type];if(!e$2e(o))throw new t$13("Unsupported GeoJSON object type: "+t.type);var a=t.crs,s=null!==a?P$n:null;if(e$2e(a)){if(!e$2e(a.properties))throw new t$13("crs.properties is undefined.");var l=a.properties;if("name"===a.type){if(!e$2e(s=A$t[l.name]))throw new t$13("Unknown crs name: "+l.name)}else if("link"===a.type){var u=J$i[l.href];if(e$2e(u)||(u=Q$m[l.type]),!e$2e(u))throw new t$13("Unable to resolve crs link: "+JSON.stringify(l));s=u(l)}else{if("EPSG"!==a.type)throw new t$13("Unknown crs type: "+a.type);if(!e$2e(s=A$t["EPSG:"+l.code]))throw new t$13("Unknown crs EPSG code: "+l.code)}}return o$1l(s,(function(n){return e._entityCollection.removeAll(),null!==n&&o(e,t,t,n,i),o$1l.all(e._promises,(function(){return e._promises.length=0,o$B.setLoading(e,!1),e}))}))}function o$w(e,t){this.position=e,this.headingPitchRoll=t}y$p.load=function(e,t){return(new y$p).load(e,t)},Object.defineProperties(y$p,{markerSize:{get:function(){return M$p},set:function(e){M$p=e}},markerSymbol:{get:function(){return R$l},set:function(e){R$l=e}},markerColor:{get:function(){return G$q},set:function(e){G$q=e}},stroke:{get:function(){return L$p},set:function(e){L$p=e}},strokeWidth:{get:function(){return O$k},set:function(e){O$k=e}},fill:{get:function(){return U$o},set:function(e){U$o=e}},clampToGround:{get:function(){return D$m},set:function(e){D$m=e}},crsNames:{get:function(){return A$t}},crsLinkHrefs:{get:function(){return J$i}},crsLinkTypes:{get:function(){return Q$m}}}),Object.defineProperties(y$p.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2e(e))throw new t$15("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}},swipeRegion:{get:function(){return new f$1a(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2e(e)){if(!(e instanceof f$1a))throw new t$15("swipeRegion must be a instance of BoundingRectangle.");if(e$2c.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion),e$2e(this._entityCluster._billboardCollection)&&(this._entityCluster._billboardCollection._swipeRegion=e$2c.clone(this._swipeRegion,new e$2c)),e$2e(this._primitives))for(var t=0;t<this._primitives._primitives.length;t++)this._primitives._primitives[t]instanceof y$R&&(this._primitives._primitives[t]._swipeRegion=e$2c.clone(this._swipeRegion,new e$2c));if(e$2e(this._groundPrimitives)){var i=this._groundPrimitives._collectionsArray;for(t=0;t<i.length;t++)if(i[t]instanceof o$y)for(var n=0;n<i[t]._primitives.length;n++)i[t]._primitives[n]._primitive._primitive._swipeRegion=e$2c.clone(this._swipeRegion,new e$2c)}}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){if(e!==this._swipeEnabled){if(e||e$2c.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e,e$2e(this._entityCluster._billboardCollection)&&(this._entityCluster._billboardCollection._swipeEnabled=e),e$2e(this._primitives))for(var t=0;t<this._primitives._primitives.length;t++)this._primitives._primitives[t]instanceof y$R&&(this._primitives._primitives[t].swipeEnabled=e);if(e$2e(this._groundPrimitives)){var i=this._groundPrimitives._collectionsArray;for(t=0;t<i.length;t++)if(i[t]instanceof o$y)for(var n=0;n<i[t]._primitives.length;n++)i[t]._primitives[n]._primitive._primitive.swipeEnabled=e}}}}}),y$p.prototype.load=function(e,t){if(!e$2e(e))throw new t$15("data is required.");o$B.setLoading(this,!0);var i=(t=u$Z(t,u$Z.EMPTY_OBJECT)).credit;"string"==typeof i&&(i=new r$U(i)),this._credit=i;var n=e,r=t.sourceUri;if("string"==typeof e||e instanceof t$10){n=(e=t$10.createIfNeeded(e)).fetchJson(),r=u$Z(r,e.getUrlComponent());var o=this._resourceCredits,a=e.credits;if(e$2e(a))for(var s=a.length,l=0;l<s;l++)o.push(a[l])}t={describe:u$Z(t.describe,$$i),markerSize:u$Z(t.markerSize,M$p),markerSymbol:u$Z(t.markerSymbol,R$l),markerColor:u$Z(t.markerColor,G$q),strokeWidthProperty:new e$1L(u$Z(t.strokeWidth,O$k)),strokeMaterialProperty:new t$P(u$Z(t.stroke,L$p)),fillMaterialProperty:new t$P(u$Z(t.fill,U$o)),clampToGround:u$Z(t.clampToGround,D$m),clampToS3M:u$Z(t.clampToS3M,!1)};var u=this;return o$1l(n,(function(e){return pe$d(u,e,t,r)})).otherwise((function(e){return o$B.setLoading(u,!1),u._error.raiseEvent(u,e),console.log(e),o$1l.reject(e)}))},y$p.prototype.loadPoiJsonData=function(e,t){if(!e$2e(e))throw new t$15("data is required.");o$B.setLoading(this,!0);var i=(t=u$Z(t,u$Z.EMPTY_OBJECT)).sourceUri;return pe$d(this,e,t={describe:u$Z(t.describe,$$i),markerSize:u$Z(t.markerSize,M$p),markerSymbol:u$Z(t.markerSymbol,R$l),markerColor:u$Z(t.markerColor,G$q),strokeWidthProperty:new e$1L(u$Z(t.strokeWidth,O$k)),strokeMaterialProperty:new t$P(u$Z(t.stroke,L$p)),fillMaterialProperty:new t$P(u$Z(t.fill,U$o))},i)},y$p.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},y$p.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport};var be$c={};be$c.Autolinker=function(){function e(e,t){for(var i in t)t.hasOwnProperty(i)&&void 0===e[i]&&(e[i]=t[i]);return e}function t(e,t,i){var n;return e.length>t&&(null==i?(i="…",n=3):n=i.length,e=e.substring(0,t-n)+i),e}function i(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}function n(e,t){for(var i=e.length-1;i>=0;i--)!0===t(e[i])&&e.splice(i,1)}function r(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var i,n=[],r=0;i=t.exec(e);)n.push(e.substring(r,i.index)),n.push(i[0]),r=i.index+i[0].length;return n.push(e.substring(r)),n}function o(e){throw new Error("Unhandled case for value: '"+e+"'")}var a=function(){function e(e){void 0===e&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return e.prototype.setTagName=function(e){return this.tagName=e,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(e,t){return this.getAttrs()[e]=t,this},e.prototype.getAttr=function(e){return this.getAttrs()[e]},e.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(e){return this.setAttr("class",e)},e.prototype.addClass=function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,o=n?n.split(r):[],a=e.split(r);t=a.shift();)-1===i(o,t)&&o.push(t);return this.getAttrs().class=o.join(" "),this},e.prototype.removeClass=function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,o=n?n.split(r):[],a=e.split(r);o.length&&(t=a.shift());){var s=i(o,t);-1!==s&&o.splice(s,1)}return this.getAttrs().class=o.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},e.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},e.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i+'="'+e[i]+'"');return t.join(" ")},e}();function s(e,t,i){var n,r;null==i?(i="…",r=3,n=8):(r=i.length,n=i.length);var o=function(e){var t={},i=e,n=i.match(/^([a-z]+):\/\//i);return n&&(t.scheme=n[1],i=i.substr(n[0].length)),(n=i.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(t.host=n[1],i=i.substr(n[0].length)),(n=i.match(/^\/(.*?)(?=(\?|#|$))/i))&&(t.path=n[1],i=i.substr(n[0].length)),(n=i.match(/^\?(.*?)(?=(#|$))/i))&&(t.query=n[1],i=i.substr(n[0].length)),(n=i.match(/^#(.*?)$/i))&&(t.fragment=n[1]),t},a=function(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t},s=function(e,t){var n=t/2,r=Math.ceil(n),o=-1*Math.floor(n),a="";return o<0&&(a=e.substr(o)),e.substr(0,r)+i+a};if(e.length<=t)return e;var l=t-r,u=o(e);if(u.query){var c=u.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);c&&(u.query=u.query.substr(0,c[1].length),e=a(u))}if(e.length<=t||(u.host&&(u.host=u.host.replace(/^www\./,""),e=a(u)),e.length<=t))return e;var h="";if(u.host&&(h+=u.host),h.length>=l)return u.host.length==t?(u.host.substr(0,t-r)+i).substr(0,l+n):s(h,l).substr(0,l+n);var d="";if(u.path&&(d+="/"+u.path),u.query&&(d+="?"+u.query),d){if((h+d).length>=l)return(h+d).length==t?(h+d).substr(0,t):(h+s(d,l-h.length)).substr(0,l+n);h+=d}if(u.fragment){var f="#"+u.fragment;if((h+f).length>=l)return(h+f).length==t?(h+f).substr(0,t):(h+s(f,l-h.length)).substr(0,l+n);h+=f}if(u.scheme&&u.host){var p=u.scheme+"://";if((h+p).length<l)return(p+h).substr(0,t)}if(h.length<=t)return h;var _="";return l>0&&(_=h.substr(-1*Math.floor(l/2))),(h.substr(0,Math.ceil(l/2))+i+_).substr(0,l+n)}function l(e,t,i){if(e.length<=t)return e;var n,r;null==i?(i="…",n=8,r=3):(n=i.length,r=i.length);var o=t-r,a="";return o>0&&(a=e.substr(-1*Math.floor(o/2))),(e.substr(0,Math.ceil(o/2))+i+a).substr(0,o+n)}function u(e,i,n){return t(e,i,n)}var c=function(){function e(e){void 0===e&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return e.prototype.build=function(e){return new a({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},e.prototype.createAttrs=function(e){var t={href:e.getAnchorHref()},i=this.createCssClass(e);return i&&(t.class=i),this.newWindow&&(t.target="_blank",t.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(t.title=e.getAnchorHref()),t},e.prototype.createCssClass=function(e){var t=this.className;if(t){for(var i=[t],n=e.getCssClassSuffixes(),r=0,o=n.length;r<o;r++)i.push(t+"-"+n[r]);return i.join(" ")}return""},e.prototype.processAnchorText=function(e){return e=this.doTruncate(e)},e.prototype.doTruncate=function(e){var t=this.truncate;if(!t||!t.length)return e;var i=t.length,n=t.location;return"smart"===n?s(e,i):"middle"===n?l(e,i):u(e,i)},e}(),h=function(){function e(e){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(e){this.offset=e},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.getType()]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}(),d=function(e,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},d(e,t)};function f(e,t){function i(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var p=function(){return p=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},p.apply(this,arguments)},_=function(e){function t(t){var i=e.call(this,t)||this;return i.email="",i.email=t.email,i}return f(t,e),t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(h),m=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="",i.hashtag="",i.serviceName=t.serviceName,i.hashtag=t.hashtag,i}return f(t,e),t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var e=this.serviceName,t=this.hashtag;switch(e){case"twitter":case"facebook":case"instagram":return""+t;default:throw new Error("Unknown service name to point hashtag to: "+e)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t}(h),g=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.mention="",i.mention=t.mention,i.serviceName=t.serviceName,i}return f(t,e),t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":case"instagram":case"soundcloud":return""+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var t=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&t.push(i),t},t}(h),x=function(e){function t(t){var i=e.call(this,t)||this;return i.number="",i.plusSign=!1,i.number=t.number,i.plusSign=t.plusSign,i}return f(t,e),t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(h),y=function(e){function t(t){var i=e.call(this,t)||this;return i.url="",i.urlMatchType="scheme",i.protocolUrlMatch=!1,i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.schemePrefixRegex=/^(https?:\/\/)?/i,i.wwwPrefixRegex=/^(https?:\/\/)?(www\.)?/i,i.protocolRelativeRegex=/^\/\//,i.protocolPrepended=!1,i.urlMatchType=t.urlMatchType,i.url=t.url,i.protocolUrlMatch=t.protocolUrlMatch,i.protocolRelativeMatch=t.protocolRelativeMatch,i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return f(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var e=this.url;return!this.protocolRelativeMatch&&!this.protocolUrlMatch&&!this.protocolPrepended&&(e=this.url="http://"+e,this.protocolPrepended=!0),e},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},t.prototype.getAnchorText=function(){var e=this.getMatchedText();return this.protocolRelativeMatch&&(e=this.stripProtocolRelativePrefix(e)),this.stripPrefix.scheme&&(e=this.stripSchemePrefix(e)),this.stripPrefix.www&&(e=this.stripWwwPrefix(e)),this.stripTrailingSlash&&(e=this.removeTrailingSlash(e)),this.decodePercentEncoding&&(e=this.removePercentEncoding(e)),e},t.prototype.stripSchemePrefix=function(e){return e.replace(this.schemePrefixRegex,"")},t.prototype.stripWwwPrefix=function(e){return e.replace(this.wwwPrefixRegex,"$1")},t.prototype.stripProtocolRelativePrefix=function(e){return e.replace(this.protocolRelativeRegex,"")},t.prototype.removeTrailingSlash=function(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e},t.prototype.removePercentEncoding=function(e){var t=e.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(t)}catch{return t}},t}(h),v=function(){function e(e){this.__jsduckDummyDocProp=null,this.tagBuilder=e.tagBuilder}return e}(),$=/[A-Za-z]/,b=/[0-9]/,T=/\s/,C=/['"]/,S=/[\x00-\x1F\x7F]/,w=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,E=w+/\u00a9\u00ae\u2000-\u3300\ud83c\ud000-\udfff\ud83d\ud000-\udfff\ud83e\ud000-\udfff/.source+/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,P=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,A=E+P,L=E+P,M="(?:["+P+"]{1,3}\\.){3}["+P+"]{1,3}",R="["+L+"](?:["+L+"\\-]{0,61}["+L+"])?",O=function(e){return"(?=("+R+"))\\"+e},D=function(e){return"(?:"+O(e)+"(?:\\."+O(e+1)+"){0,126}|"+M+")"},I=new RegExp("["+L+"]"),F=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|warman|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|グーグル|クラウド|ポイント|大众汽车|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ストア|セール|みんな|中文网|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,B=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.localPartCharRegex=new RegExp("["+L+"!#$%&'*+/=?^_`{|}~-]"),t.strictTldRegex=new RegExp("^"+F.source+"$"),t}return f(t,e),t.prototype.parseMatches=function(e){for(var t=this.tagBuilder,i=this.localPartCharRegex,n=this.strictTldRegex,r=[],a=e.length,s=new N,l={m:"a",a:"i",i:"l",l:"t",t:"o",o:":"},u=0,c=0,h=s;u<a;){var d=e.charAt(u);switch(c){case 0:f(d);break;case 1:m(e.charAt(u-1),d);break;case 2:g(d);break;case 3:x(d);break;case 4:y(d);break;case 5:v(d);break;case 6:$(d);break;case 7:b(d);break;default:o(c)}u++}return S(),r;function f(e){"m"===e?T(1):i.test(e)&&T()}function m(e,t){":"===e?i.test(t)?(c=2,h=new N(p({},h,{hasMailtoPrefix:!0}))):C():l[e]===t||(i.test(t)?c=2:"."===t?c=3:"@"===t?c=4:C())}function g(e){"."===e?c=3:"@"===e?c=4:i.test(e)||C()}function x(e){"."===e||"@"===e?C():i.test(e)?c=2:C()}function y(e){I.test(e)?c=5:C()}function v(e){"."===e?c=7:"-"===e?c=6:I.test(e)||S()}function $(e){"-"===e||"."===e?S():I.test(e)?c=5:S()}function b(e){"."===e||"-"===e?S():I.test(e)?(c=5,h=new N(p({},h,{hasDomainDot:!0}))):S()}function T(e){void 0===e&&(e=2),c=e,h=new N({idx:u})}function C(){c=0,h=s}function S(){if(h.hasDomainDot){var i=e.slice(h.idx,u);/[-.]$/.test(i)&&(i=i.slice(0,-1));var o=h.hasMailtoPrefix?i.slice(7):i;a(o)&&r.push(new _({tagBuilder:t,matchedText:i,offset:h.idx,email:o}))}function a(e){var t=(e.split(".").pop()||"").toLowerCase();return n.test(t)}C()}},t}(v),N=function(){function e(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.hasMailtoPrefix=!!e.hasMailtoPrefix,this.hasDomainDot=!!e.hasDomainDot}return e}(),G=function(){function e(){}return e.isValid=function(e,t){return!(t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(e,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,t)&&!this.isValidIpAddress(e)||this.containsMultipleDots(e))},e.isValidIpAddress=function(e){var t=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==e.match(t)},e.containsMultipleDots=function(e){var t=e;return this.hasFullProtocolRegex.test(e)&&(t=e.split("://")[1]),t.split("/")[0].indexOf("..")>-1},e.isValidUriScheme=function(e){var t=e.match(this.uriSchemeRegex),i=t&&t[0].toLowerCase();return"javascript:"!==i&&"vbscript:"!==i},e.urlMatchDoesNotHaveProtocolOrDot=function(e,t){return!(!e||t&&this.hasFullProtocolRegex.test(t)||-1!==e.indexOf("."))},e.urlMatchDoesNotHaveAtLeastOneWordChar=function(e,t){return!(!e||!t||this.hasWordCharAfterProtocolRegex.test(e))},e.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,e.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,e.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+w+"]"),e.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,e}(),z=function(e){function t(t){var i=e.call(this,t)||this;return i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.matcherRegex=function(){var e=/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/,t=/(?:www\.)/,i=new RegExp("[/?#](?:["+L+"\\-+&@#/%=~_()|'$*\\[\\]?!:,.;✓]*["+L+"\\-+&@#/%=~_()|'$*\\[\\]✓])?");return new RegExp(["(?:","(",e.source,D(2),")","|","(","(//)?",t.source,D(6),")","|","(","(//)?",D(10)+"\\.",F.source,"(?![-"+A+"])",")",")","(?::[0-9]+)?","(?:"+i.source+")?"].join(""),"gi")}(),i.wordCharRegExp=new RegExp("["+L+"]"),i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.stripPrefix,r=this.stripTrailingSlash,o=this.decodePercentEncoding,a=this.tagBuilder,s=[],l=function(){var i=t[0],l=t[1],c=t[4],h=t[5],d=t[9],f=t.index,p=h||d,_=e.charAt(f-1);if(!G.isValid(i,l)||f>0&&"@"===_||f>0&&p&&u.wordCharRegExp.test(_))return"continue";if(/\?$/.test(i)&&(i=i.substr(0,i.length-1)),u.matchHasUnbalancedClosingParen(i))i=i.substr(0,i.length-1);else{var m=u.matchHasInvalidCharAfterTld(i,l);m>-1&&(i=i.substr(0,m))}var g=["http://","https://"].find((function(e){return!!l&&-1!==l.indexOf(e)}));if(g){var x=i.indexOf(g);i=i.substr(x),l=l.substr(x),f+=x}var v=l?"scheme":c?"www":"tld",$=!!l;s.push(new y({tagBuilder:a,matchedText:i,offset:f,urlMatchType:v,url:i,protocolUrlMatch:$,protocolRelativeMatch:!!p,stripPrefix:n,stripTrailingSlash:r,decodePercentEncoding:o}))},u=this;null!==(t=i.exec(e));)l();return s},t.prototype.matchHasUnbalancedClosingParen=function(e){var t,i=e.charAt(e.length-1);if(")"===i)t="(";else{if("]"!==i)return!1;t="["}for(var n=0,r=0,o=e.length-1;r<o;r++){var a=e.charAt(r);a===t?n++:a===i&&(n=Math.max(n-1,0))}return 0===n},t.prototype.matchHasInvalidCharAfterTld=function(e,t){if(!e)return-1;var i=0;t&&(i=e.indexOf(":"),e=e.slice(i));var n=new RegExp("^((.?//)?[-."+L+"]*[-"+L+"]\\.[-"+L+"]+)").exec(e);return null===n?-1:(i+=n[1].length,e=e.slice(n[1].length),/^[^-.A-Za-z0-9:\/?#]/.test(e)?i:-1)},t}(v),U=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegex=new RegExp("#[_"+L+"]{1,139}(?![_"+L+"])","g"),i.nonWordCharRegex=new RegExp("[^"+L+"]"),i.serviceName=t.serviceName,i}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.nonWordCharRegex,r=this.serviceName,o=this.tagBuilder,a=[];null!==(t=i.exec(e));){var s=t.index,l=e.charAt(s-1);if(0===s||n.test(l)){var u=t[0],c=t[0].slice(1);a.push(new m({tagBuilder:o,matchedText:u,offset:s,serviceName:r,hashtag:c}))}}return a},t}(v),V=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.matcherRegex=/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/g,t}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.tagBuilder,r=[];null!==(t=i.exec(e));){var o=t[0],a=o.replace(/[^0-9,;#]/g,""),s=!(!t[1]&&!t[2]),l=0==t.index?"":e.substr(t.index-1,1),u=e.substr(t.index+o.length,1),c=!l.match(/\d/)&&!u.match(/\d/);this.testMatch(t[3])&&this.testMatch(o)&&c&&r.push(new x({tagBuilder:n,matchedText:o,offset:t.index,number:a,plusSign:s}))}return r},t.prototype.testMatch=function(e){return/\D/.test(e)},t}(v),k=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegexes={twitter:new RegExp("@[_"+L+"]{1,50}(?![_"+L+"])","g"),instagram:new RegExp("@[_."+L+"]{1,30}(?![_"+L+"])","g"),soundcloud:new RegExp("@[-_."+L+"]{1,50}(?![-_"+L+"])","g")},i.nonWordCharRegex=new RegExp("[^"+L+"]"),i.serviceName=t.serviceName,i}return f(t,e),t.prototype.parseMatches=function(e){var t,i=this.serviceName,n=this.matcherRegexes[this.serviceName],r=this.nonWordCharRegex,o=this.tagBuilder,a=[];if(!n)return a;for(;null!==(t=n.exec(e));){var s=t.index,l=e.charAt(s-1);if(0===s||r.test(l)){var u=t[0].replace(/\.+$/g,""),c=u.slice(1);a.push(new g({tagBuilder:o,matchedText:u,offset:s,serviceName:i,mention:c}))}}return a},t}(v);function W(e,t){for(var i=t.onOpenTag,n=t.onCloseTag,r=t.onText,a=t.onComment,s=t.onDoctype,l=new H,u=0,c=e.length,h=0,d=0,f=l;u<c;){var _=e.charAt(u);switch(h){case 0:m(_);break;case 1:g(_);break;case 2:y(_);break;case 3:x(_);break;case 4:v(_);break;case 5:w(_);break;case 6:E(_);break;case 7:P(_);break;case 8:A(_);break;case 9:L(_);break;case 10:M(_);break;case 11:R(_);break;case 12:O(_);break;case 13:D();break;case 14:I(_);break;case 15:F(_);break;case 16:B(_);break;case 17:N(_);break;case 18:G(_);break;case 19:z(_);break;case 20:U(_);break;default:o(h)}u++}function m(e){"<"===e&&k()}function g(e){"!"===e?h=13:"/"===e?(h=2,f=new H(p({},f,{isClosing:!0}))):"<"===e?k():$.test(e)?(h=3,f=new H(p({},f,{isOpening:!0}))):(h=0,f=l)}function x(e){T.test(e)?(f=new H(p({},f,{name:j()})),h=4):"<"===e?k():"/"===e?(f=new H(p({},f,{name:j()})),h=12):">"===e?(f=new H(p({},f,{name:j()})),W()):!$.test(e)&&!b.test(e)&&":"!==e&&V()}function y(e){">"===e?V():$.test(e)?h=3:V()}function v(e){T.test(e)||("/"===e?h=12:">"===e?W():"<"===e?k():"="===e||C.test(e)||S.test(e)?V():h=5)}function w(e){T.test(e)?h=6:"/"===e?h=12:"="===e?h=7:">"===e?W():"<"===e?k():C.test(e)&&V()}function E(e){T.test(e)||("/"===e?h=12:"="===e?h=7:">"===e?W():"<"===e?k():C.test(e)?V():h=5)}function P(e){T.test(e)||('"'===e?h=8:"'"===e?h=9:/[>=`]/.test(e)?V():"<"===e?k():h=10)}function A(e){'"'===e&&(h=11)}function L(e){"'"===e&&(h=11)}function M(e){T.test(e)?h=4:">"===e?W():"<"===e&&k()}function R(e){T.test(e)?h=4:"/"===e?h=12:">"===e?W():"<"===e?k():(h=4,X())}function O(e){">"===e?(f=new H(p({},f,{isClosing:!0})),W()):h=4}function D(t){"--"===e.substr(u,2)?(u+=2,f=new H(p({},f,{type:"comment"})),h=14):"DOCTYPE"===e.substr(u,7).toUpperCase()?(u+=7,f=new H(p({},f,{type:"doctype"})),h=20):V()}function I(e){"-"===e?h=15:">"===e?V():h=16}function F(e){"-"===e?h=18:">"===e?V():h=16}function B(e){"-"===e&&(h=17)}function N(e){h="-"===e?18:16}function G(e){">"===e?W():"!"===e?h=19:"-"===e||(h=16)}function z(e){"-"===e?h=17:">"===e?W():h=16}function U(e){">"===e?W():"<"===e&&k()}function V(){h=0,f=l}function k(){h=1,f=new H({idx:u})}function W(){var t=e.slice(d,f.idx);t&&r(t,d),"comment"===f.type?a(f.idx):"doctype"===f.type?s(f.idx):(f.isOpening&&i(f.name,f.idx),f.isClosing&&n(f.name,f.idx)),V(),d=u+1}function q(){var t=e.slice(d,u);r(t,d),d=u+1}function j(){var t=f.idx+(f.isClosing?2:1);return e.slice(t,u).toLowerCase()}function X(){u--}d<u&&q()}var H=function(){function e(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.type=e.type||"tag",this.name=e.name||"",this.isOpening=!!e.isOpening,this.isClosing=!!e.isClosing}return e}(),q=function(){function t(e){void 0===e&&(e={}),this.version=t.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(e.urls),this.email="boolean"==typeof e.email?e.email:this.email,this.phone="boolean"==typeof e.phone?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow="boolean"==typeof e.newWindow?e.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(e.stripPrefix),this.stripTrailingSlash="boolean"==typeof e.stripTrailingSlash?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding="boolean"==typeof e.decodePercentEncoding?e.decodePercentEncoding:this.decodePercentEncoding;var i=this.mention;if(!1!==i&&"twitter"!==i&&"instagram"!==i&&"soundcloud"!==i)throw new Error("invalid `mention` cfg - see docs");var n=this.hashtag;if(!1!==n&&"twitter"!==n&&"facebook"!==n&&"instagram"!==n)throw new Error("invalid `hashtag` cfg - see docs");this.truncate=this.normalizeTruncateCfg(e.truncate),this.className=e.className||this.className,this.replaceFn=e.replaceFn||this.replaceFn,this.context=e.context||this}return t.link=function(e,i){return new t(i).link(e)},t.parse=function(e,i){return new t(i).parse(e)},t.prototype.normalizeUrlsCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{schemeMatches:e,wwwMatches:e,tldMatches:e}:{schemeMatches:"boolean"!=typeof e.schemeMatches||e.schemeMatches,wwwMatches:"boolean"!=typeof e.wwwMatches||e.wwwMatches,tldMatches:"boolean"!=typeof e.tldMatches||e.tldMatches}},t.prototype.normalizeStripPrefixCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{scheme:e,www:e}:{scheme:"boolean"!=typeof e.scheme||e.scheme,www:"boolean"!=typeof e.www||e.www}},t.prototype.normalizeTruncateCfg=function(t){return"number"==typeof t?{length:t,location:"end"}:e(t||{},{length:Number.POSITIVE_INFINITY,location:"end"})},t.prototype.parse=function(e){var t=this,i=["a","style","script"],n=0,o=[];return W(e,{onOpenTag:function(e){i.indexOf(e)>=0&&n++},onText:function(e,i){if(0===n){var a=r(e,/( | |<|<|>|>|"|"|')/gi),s=i;a.forEach((function(e,i){if(i%2==0){var n=t.parseText(e,s);o.push.apply(o,n)}s+=e.length}))}},onCloseTag:function(e){i.indexOf(e)>=0&&(n=Math.max(n-1,0))},onComment:function(e){},onDoctype:function(e){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},t.prototype.compactMatches=function(e){e.sort((function(e,t){return e.getOffset()-t.getOffset()}));for(var t=0;t<e.length-1;t++){var i=e[t],n=i.getOffset(),r=i.getMatchedText().length,o=n+r;if(t+1<e.length){if(e[t+1].getOffset()===n){var a=e[t+1].getMatchedText().length>r?t:t+1;e.splice(a,1);continue}e[t+1].getOffset()<o&&e.splice(t+1,1)}}return e},t.prototype.removeUnwantedMatches=function(e){return this.hashtag||n(e,(function(e){return"hashtag"===e.getType()})),this.email||n(e,(function(e){return"email"===e.getType()})),this.phone||n(e,(function(e){return"phone"===e.getType()})),this.mention||n(e,(function(e){return"mention"===e.getType()})),this.urls.schemeMatches||n(e,(function(e){return"url"===e.getType()&&"scheme"===e.getUrlMatchType()})),this.urls.wwwMatches||n(e,(function(e){return"url"===e.getType()&&"www"===e.getUrlMatchType()})),this.urls.tldMatches||n(e,(function(e){return"url"===e.getType()&&"tld"===e.getUrlMatchType()})),e},t.prototype.parseText=function(e,t){void 0===t&&(t=0),t=t||0;for(var i=this.getMatchers(),n=[],r=0,o=i.length;r<o;r++){for(var a=i[r].parseMatches(e),s=0,l=a.length;s<l;s++)a[s].setOffset(t+a[s].getOffset());n.push.apply(n,a)}return n},t.prototype.link=function(e){if(!e)return"";for(var t=this.parse(e),i=[],n=0,r=0,o=t.length;r<o;r++){var a=t[r];i.push(e.substring(n,a.getOffset())),i.push(this.createMatchReturnVal(a)),n=a.getOffset()+a.getMatchedText().length}return i.push(e.substring(n)),i.join("")},t.prototype.createMatchReturnVal=function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this.context,e)),"string"==typeof t?t:!1===t?e.getMatchedText():t instanceof a?t.toAnchorString():e.buildTag().toAnchorString()},t.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var e=this.getTagBuilder(),t=[new U({tagBuilder:e,serviceName:this.hashtag}),new B({tagBuilder:e}),new V({tagBuilder:e}),new k({tagBuilder:e,serviceName:this.mention}),new z({tagBuilder:e,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=t},t.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new c({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},t.version="3.11.0",t.AnchorTagBuilder=c,t.HtmlTag=a,t.matcher={Email:B,Hashtag:U,Matcher:v,Mention:k,Phone:V,Url:z},t.match={Email:_,Hashtag:m,Match:h,Mention:g,Phone:x,Url:y},t}();return q}();var zr$1=be$c.Autolinker;function o$v(e,t){this.position=e,this.headingPitchRange=t}function l$s(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new o$1h,this.tourEnd=new o$1h,this.entryStart=new o$1h,this.entryEnd=new o$1h,this._activeEntries=[]}function h$r(e){for(var t=e.pop();void 0!==t;t=e.pop())t.stop()}function f$q(e,t,i){var n=this.playlist[this.playlistIndex];if(n){var r=y$o.bind(this,e,t,i);if(this._activeEntries.push(n),this.entryStart.raiseEvent(n),n.blocking)n.play(r,e.scene.camera,t);else{var o=this;n.play((function(){o.entryEnd.raiseEvent(n);var e=o._activeEntries.indexOf(n);e>=0&&o._activeEntries.splice(e,1)})),r(e,t,i)}}else e$2e(i)&&i(!1)}function y$o(e,t,i,n){var r=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(r,n),n)i(n);else{var o=this._activeEntries.indexOf(r);o>=0&&this._activeEntries.splice(o,1),this.playlistIndex++,f$q.call(this,e,t,i)}}function a$m(e,t,i){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=i,this.flyToMode=t}function i$r(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}l$s.prototype.addPlaylistEntry=function(e){this.playlist.push(e)},l$s.prototype.play=function(e,t){this.tourStart.raiseEvent();var i=this;f$q.call(this,e,t,(function(e){i.playlistIndex=0,e||h$r(i._activeEntries),i.tourEnd.raiseEvent(e)}))},l$s.prototype.stop=function(){h$r(this._activeEntries)},a$m.prototype.play=function(e,t,i){if(this.activeCamera=t,e$2e(e)&&null!==e){var n=this;this.activeCallback=function(t){delete n.activeCallback,delete n.activeCamera,e(!e$2e(t)&&t)}}var r=this.getCameraOptions(i);if(this.view.headingPitchRoll)t.flyTo(r);else if(this.view.headingPitchRange){var o=new i$1d(this.view.position);t.flyToBoundingSphere(o,r)}},a$m.prototype.stop=function(){e$2e(this.activeCamera)&&this.activeCamera.cancelFlight(),e$2e(this.activeCallback)&&this.activeCallback(!0)},a$m.prototype.getCameraOptions=function(e){var t={duration:this.duration};return e$2e(this.activeCallback)&&(t.complete=this.activeCallback),"smooth"===this.flyToMode&&(t.easingFunction=m$Y.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),e$2e(e)&&(t=p$19(t,e)),t},i$r.prototype.play=function(e){var t=this;this.activeCallback=e,this.timeout=setTimeout((function(){delete t.activeCallback,e(!1)}),1e3*this.duration)},i$r.prototype.stop=function(){clearTimeout(this.timeout),e$2e(this.activeCallback)&&this.activeCallback(!0)};var ir$3={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){var t=e.toLowerCase();return t=a$13(t),ir$3[t]}},xe$9;typeof DOMParser<"u"&&(xe$9=new DOMParser);var dt$5=new zr$1({stripPrefix:!1,email:!1,replaceFn:function(e){if(!e.protocolUrlMatch)return!1}}),ee$c=32,ar$1=2414016,nr$1=1,or$1=16093e3,lr$1=.1,sr$2=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],mr$1=["http://www.google.com/kml/ext/2.2"],pt$5=["http://www.w3.org/2005/Atom"],m$n={kml:sr$2,gx:mr$1,atom:pt$5,kmlgx:sr$2.concat(mr$1)},Ue$6={Document:Er$2,Folder:Ct$3,Placemark:Et$4,NetworkLink:At$3,GroundOverlay:Dt$4,PhotoOverlay:We$5,ScreenOverlay:We$5,Tour:Pt$3};function Q$l(e){this._dataSource=e,this._deferred=o$1l.defer(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}function vt$3(e){var t=e.slice(0,Math.min(4,e.size)),i=o$1l.defer(),n=new FileReader;return n.addEventListener("load",(function(){i.resolve(1347093252===new DataView(n.result).getUint32(0,!1))})),n.addEventListener("error",(function(){i.reject(n.error)})),n.readAsArrayBuffer(t),i.promise}function fr$1(e){var t=o$1l.defer(),i=new FileReader;return i.addEventListener("load",(function(){t.resolve(i.result)})),i.addEventListener("error",(function(){t.reject(i.error)})),i.readAsText(e),t.promise}function ur$1(e){var t,i,n,r={xsi:"http://www.w3.org/2001/XMLSchema-instance"};for(var o in r)r.hasOwnProperty(o)&&(n="xmlns:"+o+"=",RegExp("[< ]"+o+":").test(e)&&-1===e.indexOf(n)&&(e$2e(t)||(t=e.substr(0,e.indexOf("<kml")+4),i=e.substr(t.length)),t+=" "+n+'"'+r[o]+'"'));return e$2e(t)&&(e=t+i),e}function dr$1(e){for(var t,i,n,r=e.indexOf("xmlns:"),o=e.indexOf(">",r);-1!==r&&r<o;)t=e.slice(r,e.indexOf('"',r)),i=r,-1!==(r=e.indexOf(t,r+1))?(n=e.indexOf('"',e.indexOf('"',r)+1),r=(e=e.slice(0,r-1)+e.slice(n+1,e.length)).indexOf("xmlns:",i-1)):r=e.indexOf("xmlns:",i+1);return e}function ct$4(e,t,i){e.getData(new he$a.TextWriter,(function(e){e=dr$1(e=ur$1(e)),t.kml=xe$9.parseFromString(e,"application/xml"),i.resolve()}))}function Ae$b(e,t,i){var n=u$Z(ir$3.detectFromFilename(e.filename),"application/octet-stream");e.getData(new he$a.Data64URIWriter(n),(function(n){t[e.filename]=n,i.resolve()}))}function pr$1(e,t,i,n){for(var r=n.keys,o=new h$16("."),a=e.querySelectorAll(t),s=0;s<a.length;s++){var l=a[s],u=new h$16(l.getAttribute(i)).resolve(o).toString(),c=r.indexOf(u);if(-1!==c){var h=r[c];l.setAttribute(i,n[h]),"a"===t&&null===l.getAttribute("download")&&l.setAttribute("download",h)}}}function vr$1(e,t,i,n){for(var r=e.querySelectorAll(t),o=0;o<r.length;o++){var a=r[o],s=we$6(a.getAttribute(i),n);a.setAttribute(i,s.url)}}function cr$1(e,t,i){var n=W$o(e,"id");n=e$2e(n)&&0!==n.length?n:e$1T(),e$2e(i)&&(n=i+n);var r=t.getById(n);return e$2e(r)&&(n=e$1T(),e$2e(i)&&(n=i+n)),e$2e((r=t.add(new h$W({id:n}))).kml)||(r.addProperty("kml"),r.kml=new Kt$2),r}function ve$a(e,t){return"absolute"===e||"relativeToGround"===e||"relativeToSeaFloor"===t}function fe$a(e,t){if(!e$2e(e))return o$1p.fromDegrees(0,0,0,t);var i=e.match(/[^\s,\n]+/g);if(!e$2e(i))return o$1p.fromDegrees(0,0,0,t);var n=parseFloat(i[0]),r=parseFloat(i[1]),o=parseFloat(i[2]);return n=isNaN(n)?0:n,r=isNaN(r)?0:r,o=isNaN(o)?0:o,o$1p.fromDegrees(n,r,o,t)}function Te$a(e,t){if(e$2e(e)){var i=e.textContent.match(/[^\s\n]+/g);if(e$2e(i)){for(var n=i.length,r=new Array(n),o=0,a=0;a<n;a++)r[o++]=fe$a(i[a],t);return r}}}function hr$1(e,t){if(e$2e(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function W$o(e,t){if(e$2e(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function y$n(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function gr$1(e,t,i){if(e$2e(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function H$u(e,t,i){if(!e$2e(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}function I$v(e,t,i){var n=y$n(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function T$p(e,t,i){var n=y$n(e,t,i);if(e$2e(n))return n.textContent.trim()}function q$m(e,t,i){var n=y$n(e,t,i);if(e$2e(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function we$6(e,t,i){if(e$2e(e)){var n;if(e$2e(i)){var r=i[e=e.replace(/\\/g,"/")];if(e$2e(r))n=new t$10({url:r});else{var o=new h$16(t.getUrlComponent());e$2e(r=i[new h$16(e).resolve(o)])&&(n=new t$10({url:r}))}}return e$2e(n)||(n=e$2e(t)?t.getDerivedResource({url:e}):new t$10({url:e})),n}}Object.defineProperties(Q$l.prototype,{dataSource:{get:function(){return this._dataSource}}}),Q$l.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0},Q$l.prototype.addPromise=function(e){this._promises.push(e)},Q$l.prototype.wait=function(){var e=this._deferred;return this._used||e.resolve(),o$1l.join(e.promise,o$1l.all(this._promises))},Q$l.prototype.process=function(){var e=1===this._stack.length;return e&&(this._started=U$n._getTimestamp()),this._process(e)},Q$l.prototype._giveUpTime=function(){if(!this._timeoutSet){this._timeoutSet=!0,this._timeThreshold=50;var e=this;setTimeout((function(){e._timeoutSet=!1,e._started=U$n._getTimestamp(),e._process(!0)}),0)}},Q$l.prototype._nextNode=function(){var e=this._stack,t=e[e.length-1],i=t.index,n=t.nodes;if(i!==n.length)return++t.index,n[i]},Q$l.prototype._pop=function(){var e=this._stack;return e.pop(),0!==e.length||(this._deferred.resolve(),!1)},Q$l.prototype._process=function(e){for(var t=this.dataSource,i=this._stack[this._stack.length-1].processingData,n=this._nextNode();e$2e(n);){var r=Ue$6[n.localName];if(e$2e(r)&&(-1!==m$n.kml.indexOf(n.namespaceURI)||-1!==m$n.gx.indexOf(n.namespaceURI))&&(r(t,n,i,this),this._timeoutSet||U$n._getTimestamp()>this._started+this._timeThreshold))return void this._giveUpTime();n=this._nextNode()}this._pop()&&e&&this._process(!0)};var G$p={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function Fe$9(e,t){if(e$2e(e)&&!/^\s*$/gm.test(e)){"#"===e[0]&&(e=e.substring(1));var i=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,o=parseInt(e.substring(6,8),16)/255;return t?(o>0?(G$p.maximumRed=o,G$p.red=void 0):(G$p.maximumRed=void 0,G$p.red=0),r>0?(G$p.maximumGreen=r,G$p.green=void 0):(G$p.maximumGreen=void 0,G$p.green=0),n>0?(G$p.maximumBlue=n,G$p.blue=void 0):(G$p.maximumBlue=void 0,G$p.blue=0),G$p.alpha=i,e$1X.fromRandom(G$p)):new e$1X(o,r,n,i)}}function ne$a(e,t,i){var n=T$p(e,t,i);if(e$2e(n))return Fe$9(n,"random"===T$p(e,"colorMode",i))}function ht$3(e){var t=y$n(e,"TimeStamp",m$n.kmlgx),i=T$p(t,"when",m$n.kmlgx);if(e$2e(t)&&e$2e(i)&&0!==i.length){var n=a$15.fromIso8601(i),r=new c$A;return r.addInterval(new d$W({start:n,stop:o$I.MAXIMUM_VALUE})),r}}function gt$4(e){var t=y$n(e,"TimeSpan",m$n.kmlgx);if(e$2e(t)){var i,n=y$n(t,"begin",m$n.kmlgx),r=e$2e(n)?a$15.fromIso8601(n.textContent):void 0,o=y$n(t,"end",m$n.kmlgx),a=e$2e(o)?a$15.fromIso8601(o.textContent):void 0;if(e$2e(r)&&e$2e(a)){if(a$15.lessThan(a,r)){var s=r;r=a,a=s}(i=new c$A).addInterval(new d$W({start:r,stop:a}))}else e$2e(r)?(i=new c$A).addInterval(new d$W({start:r,stop:o$I.MAXIMUM_VALUE})):e$2e(a)&&(i=new c$A).addInterval(new d$W({start:o$I.MINIMUM_VALUE,stop:a}));return i}}function kr$1(){var e=new n$V;return e.width=ee$c,e.height=ee$c,e.scaleByDistance=new o$Y(ar$1,nr$1,or$1,lr$1),e.pixelOffsetScaleByDistance=new o$Y(ar$1,nr$1,or$1,lr$1),e}function Ve$7(){var e=new l$Y;return e.outline=!0,e.outlineColor=e$1X.WHITE,e}function _r$1(){var e=new n$Q;return e.translucencyByDistance=new o$Y(3e6,1,5e6,0),e.distanceDisplayCondition=new r$Z(0,8e4),e.pixelOffset=new o$1o(17,0),e.horizontalOrigin=j$V.LEFT,e.font="16px sans-serif",e.style=R$S.FILL_AND_OUTLINE,e}function xr$2(e,t,i,n,r){var o=T$p(e,"href",m$n.kml);if(e$2e(o)&&0!==o.length){var a=we$6(o,i,n);if(r){var s=T$p(e,"refreshMode",m$n.kml),l=T$p(e,"viewRefreshMode",m$n.kml);"onInterval"===s||"onExpire"===s?e$22("kml-refreshMode-"+s,"KML - Unsupported Icon refreshMode: "+s):("onStop"===l||"onRegion"===l)&&e$22("kml-refreshMode-"+l,"KML - Unsupported Icon viewRefreshMode: "+l);var u=u$Z(T$p(e,"viewBoundScale",m$n.kml),1),c="onStop"===l?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",h=u$Z(T$p(e,"viewFormat",m$n.kml),c),d=T$p(e,"httpQuery",m$n.kml);e$2e(h)&&a.setQueryParameters(m$1c(Le$9(h))),e$2e(d)&&a.setQueryParameters(m$1c(Le$9(d)));var f=t._ellipsoid;return He$8(a,t._camera,t._canvas,u,t._lastCameraView.bbox,f),a}return a}}function kt$3(e,t,i,n,r){var o=I$v(t,"scale",m$n.kml),a=I$v(t,"heading",m$n.kml),s=ne$a(t,"color",m$n.kml),l=y$n(t,"Icon",m$n.kml),u=xr$2(l,e,n,r,!1);e$2e(l)&&!e$2e(u)&&(u=!1);var c,h,d=I$v(l,"x",m$n.gx),f=I$v(l,"y",m$n.gx),p=I$v(l,"w",m$n.gx),_=I$v(l,"h",m$n.gx),m=y$n(t,"hotSpot",m$n.kml),g=hr$1(m,"x"),x=hr$1(m,"y"),y=W$o(m,"xunits"),v=W$o(m,"yunits"),$=i.billboard;e$2e($)||($=kr$1(),i.billboard=$),$.image=u,$.scale=o,$.color=s,(e$2e(d)||e$2e(f)||e$2e(p)||e$2e(_))&&($.imageSubRegion=new f$1a(d,f,p,_)),e$2e(a)&&0!==a&&($.rotation=e$2d.toRadians(-a),$.alignedAxis=o$1p.UNIT_Z),o=u$Z(o,1),e$2e(g)&&("pixels"===y?c=-g*o:"insetPixels"===y?c=(g-ee$c)*o:"fraction"===y&&(c=-g*ee$c*o),c+=.5*ee$c*o),e$2e(x)&&("pixels"===v?h=x*o:"insetPixels"===v?h=(-x+ee$c)*o:"fraction"===v&&(h=x*ee$c*o),h-=.5*ee$c*o),(e$2e(c)||e$2e(h))&&($.pixelOffset=new o$1o(c,h))}function Me$a(e,t,i,n,r){for(var o=0,a=t.childNodes.length;o<a;o++){var s=t.childNodes.item(o);if("IconStyle"===s.localName)kt$3(e,s,i,n,r);else if("LabelStyle"===s.localName){var l=i.label;e$2e(l)||(l=_r$1(),i.label=l),l.scale=u$Z(I$v(s,"scale",m$n.kml),l.scale),l.fillColor=u$Z(ne$a(s,"color",m$n.kml),l.fillColor),l.text=i.name}else if("LineStyle"===s.localName){var u=i.polyline;e$2e(u)||(u=new a$L,i.polyline=u),u.width=I$v(s,"width",m$n.kml),u.material=ne$a(s,"color",m$n.kml),e$2e(ne$a(s,"outerColor",m$n.gx))&&e$22("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),e$2e(I$v(s,"outerWidth",m$n.gx))&&e$22("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),e$2e(I$v(s,"physicalWidth",m$n.gx))&&e$22("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),e$2e(q$m(s,"labelVisibility",m$n.gx))&&e$22("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if("PolyStyle"===s.localName){var c=i.polygon;e$2e(c)||(c=Ve$7(),i.polygon=c),c.material=u$Z(ne$a(s,"color",m$n.kml),c.material),c.fill=u$Z(q$m(s,"fill",m$n.kml),c.fill),c.outline=u$Z(q$m(s,"outline",m$n.kml),c.outline)}else if("BalloonStyle"===s.localName){var h=u$Z(Fe$9(T$p(s,"bgColor",m$n.kml)),e$1X.WHITE),d=u$Z(Fe$9(T$p(s,"textColor",m$n.kml)),e$1X.BLACK),f=T$p(s,"text",m$n.kml);i.addProperty("balloonStyle"),i.balloonStyle={bgColor:h,textColor:d,text:f}}else if("ListStyle"===s.localName){var p=T$p(s,"listItemType",m$n.kml);("radioFolder"===p||"checkOffOnly"===p)&&e$22("kml-listStyle-"+p,"KML - Unsupported ListStyle with listItemType: "+p)}}}function _t$4(e,t,i,n,r){for(var o,a=new h$W,s=-1,l=t.childNodes,u=l.length,c=0;c<u;c++){var h=l[c];("Style"===h.localName||"StyleMap"===h.localName)&&(s=c)}if(-1!==s){var d=l[s];if("Style"===d.localName)Me$a(e,d,a,n,r);else for(var f=H$u(d,"Pair",m$n.kml),p=0;p<f.length;p++){var _=f[p],m=T$p(_,"key",m$n.kml);if("normal"===m){var g=T$p(_,"styleUrl",m$n.kml);if(e$2e(g))e$2e(o=i.getById(g))||(o=i.getById("#"+g)),e$2e(o)&&a.merge(o);else Me$a(e,y$n(_,"Style",m$n.kml),a,n,r)}else e$22("kml-styleMap-"+m,"KML - Unsupported StyleMap key: "+m)}}var x=T$p(t,"styleUrl",m$n.kml);if(e$2e(x)){var y=x;if("#"!==x[0]&&-1!==x.indexOf("#")){var v=x.split("#"),$=v[0];y=n.getDerivedResource({url:$}).getUrlComponent()+"#"+v[1]}e$2e(o=i.getById(y))||(o=i.getById("#"+y)),e$2e(o)&&a.merge(o)}return a}function xt$4(e,t,i){return t.fetchXML().then((function(n){return Tr$1(e,n,i,t,!0)}))}function Tr$1(e,t,i,n,r,o){var a,s,l,u,c=gr$1(t,"Style",m$n.kml);if(e$2e(c)){var h=c.length;for(a=0;a<h;a++)e$2e(s=W$o(u=c[a],"id"))&&(s="#"+s,r&&e$2e(n)&&(s=n.getUrlComponent()+s),e$2e(i.getById(s))||(l=new h$W({id:s}),i.add(l),Me$a(e,u,l,n,o)))}var d=gr$1(t,"StyleMap",m$n.kml);if(e$2e(d)){var f=d.length;for(a=0;a<f;a++){var p=d[a];if(e$2e(s=W$o(p,"id")))for(var _=H$u(p,"Pair",m$n.kml),m=0;m<_.length;m++){var g=_[m],x=T$p(g,"key",m$n.kml);if("normal"===x){if(s="#"+s,r&&e$2e(n)&&(s=n.getUrlComponent()+s),!e$2e(i.getById(s))){l=i.getOrCreateEntity(s);var y=T$p(g,"styleUrl",m$n.kml);if(e$2e(y)){"#"!==y[0]&&(y="#"+y),r&&e$2e(n)&&(y=n.getUrlComponent()+y);var v=i.getById(y);e$2e(v)&&l.merge(v)}else Me$a(e,u=y$n(g,"Style",m$n.kml),l,n,o)}}else e$22("kml-styleMap-"+x,"KML - Unsupported StyleMap key: "+x)}}}var $=[],b=t.getElementsByTagName("styleUrl"),T=b.length;for(a=0;a<T;a++){var C=b[a].textContent;if("#"!==C[0]){var S=C.split("#");if(2===S.length){var w=S[0],E=n.getDerivedResource({url:w});$.push(xt$4(e,E,i))}}}return $}function Be$9(e,t,i){var n=new a$p(e,t.id,["position"]),r=new i$s(t.position);t.polyline=e$2e(i.polyline)?i.polyline.clone():new a$L,t.polyline.positions=new n$n([n,r])}function wr$2(e,t){return!e$2e(e)&&!e$2e(t)||"clampToGround"===e?k$R.CLAMP_TO_GROUND:"relativeToGround"===e?k$R.RELATIVE_TO_GROUND:"absolute"===e?k$R.NONE:"clampToSeaFloor"===t?(e$22("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),k$R.CLAMP_TO_GROUND):"relativeToSeaFloor"===t?(e$22("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),k$R.RELATIVE_TO_GROUND):(e$2e(e)?e$22("kml-altitudeMode-unknown","KML - Unknown <kml:altitudeMode>:"+e+", using <kml:altitudeMode>:CLAMP_TO_GROUND."):e$22("kml-gx:altitudeMode-unknown","KML - Unknown <gx:altitudeMode>:"+t+", using <kml:altitudeMode>:CLAMP_TO_GROUND."),k$R.CLAMP_TO_GROUND)}function Mr$2(e,t,i){return"relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t?e:((e$2e(t)&&"clampToGround"!==t||e$2e(i)&&"clampToSeaFloor"!==i)&&e$22("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+u$Z(t,i)),new i$s(e))}function Tt$3(e,t,i,n){if(e$2e(e)){if("relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t)return e;(e$2e(t)&&"clampToGround"!==t||e$2e(i)&&"clampToSeaFloor"!==i)&&e$22("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+u$Z(t,i));for(var r=e.length,o=0;o<r;o++){var a=e[o];n.scaleToGeodeticSurface(a,a)}return e}}function be$b(e,t,i,n){var r=t.label;e$2e(r)||(r=e$2e(i.label)?i.label.clone():_r$1(),t.label=r),r.text=t.name;var o=t.billboard;e$2e(o)||(o=e$2e(i.billboard)?i.billboard.clone():kr$1(),t.billboard=o),e$2e(o.image)?o.image.getValue()||(o.image=void 0):o.image=e._pinBuilder.fromColor(e$1X.YELLOW,64);var a=1;e$2e(o.scale)&&(0!==(a=o.scale.getValue())?r.pixelOffset=new o$1o(16*a+1,-16):(r.pixelOffset=void 0,r.horizontalOrigin=void 0)),e$2e(n)&&e._clampToGround&&(o.heightReference=n,r.heightReference=n,r.pixelOffset=new o$1o(16*a+1,-16))}function br$1(e,t){var i=e.path;e$2e(i)||((i=new n$P).leadTime=0,e.path=i);var n=t.polyline;e$2e(n)&&(i.material=n.material,i.width=n.width)}function wt$4(e,t,i,n,r){var o=T$p(i,"coordinates",m$n.kml),a=T$p(i,"altitudeMode",m$n.kml),s=T$p(i,"altitudeMode",m$n.gx),l=q$m(i,"extrude",m$n.kml),u=fe$a(o,e._ellipsoid);return n.position=u,be$b(e,n,r,wr$2(a,s)),l&&ve$a(a,s)&&Be$9(t,n,r),!0}function Ir$2(e,t,i,n,r){var o=y$n(i,"coordinates",m$n.kml),a=T$p(i,"altitudeMode",m$n.kml),s=T$p(i,"altitudeMode",m$n.gx),l=q$m(i,"extrude",m$n.kml),u=q$m(i,"tessellate",m$n.kml),c=ve$a(a,s),h=I$v(i,"drawOrder",m$n.gx),d=e._ellipsoid,f=Te$a(o,d),p=r.polyline;if(c&&l){var _=new e$1m;n.wall=_,_.positions=f;var m=r.polygon;e$2e(m)&&(_.fill=m.fill,_.material=m.material),_.outline=!0,e$2e(p)?(_.outlineColor=e$2e(p.material)?p.material.color:e$1X.WHITE,_.outlineWidth=p.width):e$2e(m)&&(_.outlineColor=e$2e(m.material)?m.material.color:e$1X.WHITE)}else if(!e._clampToS3M&&!e._clampToGround||c)e$2e(h)&&e$22("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),p=e$2e(p)?p.clone():new a$L,n.polyline=p,p.positions=Tt$3(f,a,s,d),(!u||c)&&(p.arcType=m$1h.NONE);else{e._clampToS3M&&(n.clampToS3M=!0,n.classificationType=_0x2b86ba.S3M_TILE);var g=new a$L;e._clampToGround&&(g.clampToGround=!0,g.classificationType=e._classificationType),n.polyline=g,g.positions=f,e$2e(p)?(g.material=e$2e(p.material)?p.material.color.getValue(o$I.MINIMUM_VALUE):e$1X.WHITE,g.width=u$Z(p.width,1)):(g.material=e$1X.WHITE,g.width=1),g.zIndex=h}return!0}function Mt$4(e,t,i,n,r){var o=y$n(i,"outerBoundaryIs",m$n.kml),a=y$n(o,"LinearRing",m$n.kml),s=y$n(a,"coordinates",m$n.kml),l=e._ellipsoid,u=Te$a(s,l),c=q$m(i,"extrude",m$n.kml),h=ve$a(T$p(i,"altitudeMode",m$n.kml),T$p(i,"altitudeMode",m$n.gx)),d=e$2e(r.polygon)?r.polygon.clone():Ve$7(),f=r.polyline;if(e$2e(f)&&(d.outlineColor=e$2e(f.material)?f.material.color:e$1X.WHITE,d.outlineWidth=f.width),n.polygon=d,h?(d.perPositionHeight=!0,d.extrudedHeight=c?0:void 0):!e._clampToGround&&!e._clampToS3M&&(d.height=0),e._clampToS3M&&(d.classificationType=_0x2b86ba.S3M_TILE),e._clampToGround&&(d.classificationType=_0x2b86ba.TERRAIN),e$2e(u)){for(var p=new e$1M(u),_=H$u(i,"innerBoundaryIs",m$n.kml),m=0;m<_.length;m++){a=H$u(_[m],"LinearRing",m$n.kml);for(var g=0;g<a.length;g++)e$2e(u=Te$a(s=y$n(a[g],"coordinates",m$n.kml),l))&&p.holes.push(new e$1M(u))}d.hierarchy=p}return!0}function bt$3(e,t,i,n,r){var o=T$p(i,"altitudeMode",m$n.kml),a=T$p(i,"altitudeMode",m$n.gx),s=H$u(i,"coord",m$n.gx),l=H$u(i,"angles",m$n.gx),u=H$u(i,"when",m$n.kml),c=q$m(i,"extrude",m$n.kml),h=ve$a(o,a),d=e._ellipsoid;l.length>0&&e$22("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");for(var f=Math.min(s.length,u.length),p=[],_=[],m=0;m<f;m++){var g=fe$a(s[m].textContent,d);p.push(g),_.push(a$15.fromIso8601(u[m].textContent))}var x=new o$z;return x.addSamples(_,p),n.position=x,be$b(e,n,r,wr$2(o,a)),br$1(n,r),n.availability=new c$A,u.length>0&&n.availability.addInterval(new d$W({start:_[0],stop:_[_.length-1]})),h&&c&&Be$9(t,n,r),!0}function Lr$1(e,t,i,n,r,o,a,s,l){var u=e[0],c=e[e.length-1],h=new o$z;h.addSamples(e,t),i.intervals.addInterval(new d$W({start:u,stop:c,isStartIncluded:l,isStopIncluded:l,data:Mr$2(h,a,s)})),n.addInterval(new d$W({start:u,stop:c,isStartIncluded:l,isStopIncluded:l})),r.intervals.addInterval(new d$W({start:u,stop:c,isStartIncluded:l,isStopIncluded:l,data:o}))}function yr$1(e,t,i,n,r){for(var o,a,s,l=q$m(i,"interpolate",m$n.gx),u=H$u(i,"Track",m$n.gx),c=!1,h=new t$k,d=new c$A,f=new t$p,p=e._ellipsoid,_=0,m=u.length;_<m;_++){var g=u[_],x=H$u(g,"when",m$n.kml),y=H$u(g,"coord",m$n.gx),v=T$p(g,"altitudeMode",m$n.kml),$=T$p(g,"altitudeMode",m$n.gx),b=ve$a(v,$),T=q$m(g,"extrude",m$n.kml),C=Math.min(y.length,x.length),S=[];o=[];for(var w=0;w<C;w++){var E=fe$a(y[w].textContent,p);S.push(E),o.push(a$15.fromIso8601(x[w].textContent))}l&&(e$2e(a)&&Lr$1([a,o[0]],[s,S[0]],f,d,h,!1,"absolute",void 0,!1),a=o[C-1],s=S[S.length-1]),Lr$1(o,S,f,d,h,b&&T,v,$,!0),c=c||b&&T}return n.availability=d,n.position=f,be$b(e,n,r),br$1(n,r),c&&(Be$9(t,n,r),n.polyline.show=h),!0}var Cr$1={Point:wt$4,LineString:Ir$2,LinearRing:Ir$2,Polygon:Mt$4,Track:bt$3,MultiTrack:yr$1,MultiGeometry:It$4,Model:Gt$2},J$h;function It$4(e,t,i,n,r,o){for(var a=i.childNodes,s=!1,l=0,u=a.length;l<u;l++){var c=a.item(l),h=Cr$1[c.localName];if(e$2e(h)){var d=cr$1(c,t,o);d.parent=n,d.name=n.name,d.availability=n.availability,d.description=n.description,d.kml=n.kml,h(e,t,c,d,r)&&(s=!0)}}return s}function Lt$3(e,t){var i=y$n(e,"ExtendedData",m$n.kml);if(e$2e(i)){e$2e(y$n(i,"SchemaData",m$n.kml))&&e$22("kml-schemaData","KML - SchemaData is unsupported"),e$2e(W$o(i,"xmlns:prefix"))&&e$22("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");var n={},r=H$u(i,"Data",m$n.kml);if(e$2e(r))for(var o=r.length,a=0;a<o;a++){var s=r[a],l=W$o(s,"name");e$2e(l)&&(n[l]={displayName:T$p(s,"displayName",m$n.kml),value:T$p(s,"value",m$n.kml)})}t.kml.extendedData=n}}function yt$3(e,t,i,n,r){var o,a,s,l,u=t.kml,c=u.extendedData,h=T$p(e,"description",m$n.kml),d=u$Z(t.balloonStyle,i.balloonStyle),f=e$1X.WHITE,p=e$1X.BLACK,_=h;if(e$2e(d)&&(f=u$Z(d.bgColor,e$1X.WHITE),p=u$Z(d.textColor,e$1X.BLACK),_=u$Z(d.text,h)),e$2e(_)){if(_=(_=(_=(_=(_=(_=_.replace("$[name]",u$Z(t.name,""))).replace("$[description]",u$Z(h,""))).replace("$[address]",u$Z(u.address,""))).replace("$[Snippet]",u$Z(u.snippet,""))).replace("$[id]",t.id)).replace("$[geDirections]",""),e$2e(c)){var m=_.match(/\$\[.+?\]/g);if(null!==m)for(o=0;o<m.length;o++){var g=m[o],x=g.substr(2,g.length-3),y=/\/displayName$/.test(x);e$2e(l=c[x=x.replace(/\/displayName$/,"")])&&(l=y?l.displayName:l.value),e$2e(l)&&(_=_.replace(g,u$Z(l,"")))}}}else if(e$2e(c)&&(s=Object.keys(c)).length>0){for(_='<table class="supermap3d-infoBox-defaultTable supermap3d-infoBox-defaultTable-lighter"><tbody>',o=0;o<s.length;o++)_+="<tr><th>"+u$Z((l=c[a=s[o]]).displayName,a)+"</th><td>"+u$Z(l.value,"")+"</td></tr>";_+="</tbody></table>"}if(e$2e(_)){_=dt$5.link(_),J$h.innerHTML=_;var v=J$h.querySelectorAll("a");for(o=0;o<v.length;o++)v[o].setAttribute("target","_blank");e$2e(n)&&n.keys.length>1&&(pr$1(J$h,"a","href",n),pr$1(J$h,"img","src",n)),vr$1(J$h,"a","href",r),vr$1(J$h,"img","src",r);var $='<div class="supermap3d-infoBox-description-lighter" style="';$+="overflow:auto;",$+="word-wrap:break-word;",$+="background-color:"+f.toCssColorString()+";",$+="color:"+p.toCssColorString()+";",$+='">',$+=J$h.innerHTML+"</div>",J$h.innerHTML="",t.description=$}}function Ie$7(e,t,i){var n=i.entityCollection,r=i.parentEntity,o=i.sourceResource,a=i.uriResolver,s=cr$1(t,n,i.context),l=s.kml,u=_t$4(e,t,i.styleCollection,o,a),c=T$p(t,"name",m$n.kml);s.name=c,s.parent=r;var h=gt$4(t);e$2e(h)||(h=ht$3(t)),s.availability=h,ze$6(s);var d=q$m(t,"visibility",m$n.kml);s.show=function e(t){return!t||t.show&&e(t.parent)}(r)&&u$Z(d,!0);var f=y$n(t,"author",m$n.atom),p=l.author;p.name=T$p(f,"name",m$n.atom),p.uri=T$p(f,"uri",m$n.atom),p.email=T$p(f,"email",m$n.atom);var _=y$n(t,"link",m$n.atom),m=l.link;m.href=W$o(_,"href"),m.hreflang=W$o(_,"hreflang"),m.rel=W$o(_,"rel"),m.type=W$o(_,"type"),m.title=W$o(_,"title"),m.length=W$o(_,"length"),l.address=T$p(t,"address",m$n.kml),l.phoneNumber=T$p(t,"phoneNumber",m$n.kml),l.snippet=T$p(t,"Snippet",m$n.kml),Lt$3(t,s),yt$3(t,s,u,a,o);var g=e._ellipsoid;return Pr$1(t,s,g),Sr$1(t,s,g),e$2e(y$n(t,"Region",m$n.kml))&&e$22("kml-region","KML - Placemark Regions are unsupported"),{entity:s,styleEntity:u}}function Er$2(e,t,i,n){n.addNodes(t.childNodes,i),n.process()}function Ct$3(e,t,i,n){var r=Ie$7(e,t,i),o=l$1f(i);o.parentEntity=r.entity,Er$2(e,t,o,n)}function Et$4(e,t,i,n){for(var r=Ie$7(e,t,i),o=r.entity,a=r.styleEntity,s=!1,l=t.childNodes,u=0,c=l.length;u<c&&!s;u++){var h=l.item(u),d=Cr$1[h.localName];e$2e(d)&&(d(e,i.entityCollection,h,o,a,o.id,i.sourceResource),s=!0)}s||(o.merge(a),be$b(e,o,a))}typeof document<"u"&&(J$h=document.createElement("div"));var St$1={FlyTo:Nt$4,Wait:Ot$3,SoundCue:Ke$4,AnimatedUpdate:Ke$4,TourControl:Ke$4};function Pt$3(e,t,i,n){var r=new l$s(T$p(t,"name",m$n.kml),W$o(t,"id")),o=y$n(t,"Playlist",m$n.gx);if(o)for(var a=e._ellipsoid,s=o.childNodes,l=0;l<s.length;l++){var u=s[l];if(u.localName){var c=St$1[u.localName];c?c(r,u,a):console.log("Unknown KML Tour playlist entry type "+u.localName)}}e$2e(e.kmlTours)||(e.kmlTours=[]),e.kmlTours.push(r)}function Ke$4(e,t){e$22("KML Tour unsupported node "+t.localName)}function Ot$3(e,t){var i=I$v(t,"duration",m$n.gx);e.addPlaylistEntry(new i$r(i))}function Nt$4(e,t,i){var n=I$v(t,"duration",m$n.gx),r=T$p(t,"flyToMode",m$n.gx),o={kml:{}};Pr$1(t,o,i),Sr$1(t,o,i);var a=new a$m(n,r,o.kml.lookAt||o.kml.camera);e.addPlaylistEntry(a)}function Sr$1(e,t,i){var n=y$n(e,"Camera",m$n.kml);if(e$2e(n)){var r=u$Z(I$v(n,"longitude",m$n.kml),0),o=u$Z(I$v(n,"latitude",m$n.kml),0),a=u$Z(I$v(n,"altitude",m$n.kml),0),s=u$Z(I$v(n,"heading",m$n.kml),0),l=u$Z(I$v(n,"tilt",m$n.kml),0),u=u$Z(I$v(n,"roll",m$n.kml),0),c=o$1p.fromDegrees(r,o,a,i),h=i$16.fromDegrees(s,l-90,u);t.kml.camera=new o$w(c,h)}}function Pr$1(e,t,i){var n=y$n(e,"LookAt",m$n.kml);if(e$2e(n)){var r=u$Z(I$v(n,"longitude",m$n.kml),0),o=u$Z(I$v(n,"latitude",m$n.kml),0),a=u$Z(I$v(n,"altitude",m$n.kml),0),s=I$v(n,"heading",m$n.kml),l=I$v(n,"tilt",m$n.kml),u=u$Z(I$v(n,"range",m$n.kml),0);l=e$2d.toRadians(u$Z(l,0));var c=new a$T(s=e$2d.toRadians(u$Z(s,0)),l-e$2d.PI_OVER_TWO,u),h=o$1p.fromDegrees(r,o,a,i);t.kml.lookAt=new o$v(h,c)}}function Dt$4(e,t,i,n){var r,o=Ie$7(e,t,i).entity,a=!1,s=e._ellipsoid,l=Te$a(y$n(t,"LatLonQuad",m$n.gx),s),u=I$v(t,"drawOrder",m$n.kml);if(e$2e(l))(r=Ve$7()).hierarchy=new e$1M(l),r.zIndex=u,o.polygon=r,a=!0;else{(r=new n$N).zIndex=u,o.rectangle=r;var c=y$n(t,"LatLonBox",m$n.kml);if(e$2e(c)){var h=I$v(c,"west",m$n.kml),d=I$v(c,"south",m$n.kml),f=I$v(c,"east",m$n.kml),p=I$v(c,"north",m$n.kml);e$2e(h)&&(h=e$2d.negativePiToPi(e$2d.toRadians(h))),e$2e(d)&&(d=e$2d.clampToLatitudeRange(e$2d.toRadians(d))),e$2e(f)&&(f=e$2d.negativePiToPi(e$2d.toRadians(f))),e$2e(p)&&(p=e$2d.clampToLatitudeRange(e$2d.toRadians(p))),r.coordinates=new h$18(h,d,f,p);var _=I$v(c,"rotation",m$n.kml);if(e$2e(_)){var m=e$2d.toRadians(_);r.rotation=m,r.stRotation=m}}}var g=y$n(t,"Icon",m$n.kml),x=xr$2(g,e,i.sourceResource,i.uriResolver,!0);if(e$2e(x)){a&&e$22("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");var y=I$v(g,"x",m$n.gx),v=I$v(g,"y",m$n.gx),$=I$v(g,"w",m$n.gx),b=I$v(g,"h",m$n.gx);(e$2e(y)||e$2e(v)||e$2e($)||e$2e(b))&&e$22("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),r.material=x,r.material.color=ne$a(t,"color",m$n.kml),r.material.transparent=!0}else r.material=ne$a(t,"color",m$n.kml);var T=T$p(t,"altitudeMode",m$n.kml);e$2e(T)?"absolute"===T?(r.height=I$v(t,"altitude",m$n.kml),r.zIndex=void 0):"clampToGround"!==T&&e$22("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+T):"relativeToSeaFloor"===(T=T$p(t,"altitudeMode",m$n.gx))?(e$22("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),r.height=I$v(t,"altitude",m$n.kml),r.zIndex=void 0):"clampToSeaFloor"===T?e$22("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):e$2e(T)&&e$22("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+T)}function We$5(e,t,i,n){e._unsupportedNode.raiseEvent(e,i.parentEntity,t,i.entityCollection,i.styleCollection,i.sourceResource,i.uriResolver),e$22("kml-unsupportedFeature-"+t.nodeName,"KML - Unsupported feature: "+t.nodeName)}var re$d={INTERVAL:0,EXPIRE:1,STOP:2};function Le$9(e){if(!e$2e(e)||0===e.length)return"";var t=e[0];return("&"===t||"?"===t)&&(e=e.substring(1)),e}var Rt$5=new h$18,ue$a=new a$18,Ge$5=new o$1o,Ut$3=new o$1p;function He$8(e,t,i,n,r,o){function a(e){return e<-e$2d.PI_OVER_TWO?-e$2d.PI_OVER_TWO:e>e$2d.PI_OVER_TWO?e$2d.PI_OVER_TWO:e}function s(e){return e>e$2d.PI?e-e$2d.TWO_PI:e<-e$2d.PI?e+e$2d.TWO_PI:e}var l=m$1d(e.queryParameters);if(l=l.replace(/%5B/g,"[").replace(/%5D/g,"]"),e$2e(t)&&t._mode!==C$14.MORPHING){var u,c;if(r=u$Z(r,Rt$5),e$2e(i)&&(Ge$5.x=.5*i.clientWidth,Ge$5.y=.5*i.clientHeight,u=t.pickEllipsoid(Ge$5,o,Ut$3)),e$2e(u)?c=o.cartesianToCartographic(u,ue$a):(c=h$18.center(r,ue$a),u=o.cartographicToCartesian(c)),e$2e(n)&&!e$2d.equalsEpsilon(n,1,e$2d.EPSILON9)){var h=r.width*n*.5,d=r.height*n*.5;r=new h$18(s(c.longitude-h),a(c.latitude-d),s(c.longitude+h),a(c.latitude+d))}l=(l=(l=(l=l.replace("[bboxWest]",e$2d.toDegrees(r.west).toString())).replace("[bboxSouth]",e$2d.toDegrees(r.south).toString())).replace("[bboxEast]",e$2d.toDegrees(r.east).toString())).replace("[bboxNorth]",e$2d.toDegrees(r.north).toString());var f=e$2d.toDegrees(c.longitude).toString(),p=e$2d.toDegrees(c.latitude).toString();l=(l=(l=(l=(l=(l=(l=(l=l.replace("[lookatLon]",f)).replace("[lookatLat]",p)).replace("[lookatTilt]",e$2d.toDegrees(t.pitch).toString())).replace("[lookatHeading]",e$2d.toDegrees(t.heading).toString())).replace("[lookatRange]",o$1p.distance(t.positionWC,u))).replace("[lookatTerrainLon]",f)).replace("[lookatTerrainLat]",p)).replace("[lookatTerrainAlt]",c.height.toString()),o.cartesianToCartographic(t.positionWC,ue$a),l=(l=(l=l.replace("[cameraLon]",e$2d.toDegrees(ue$a.longitude).toString())).replace("[cameraLat]",e$2d.toDegrees(ue$a.latitude).toString())).replace("[cameraAlt]",e$2d.toDegrees(ue$a.height).toString());var _=t.frustum,m=_.aspectRatio,g="",x="";if(e$2e(m)){var y=e$2d.toDegrees(_.fov);m>1?(g=y,x=y/m):(x=y,g=y*m)}l=(l=l.replace("[horizFov]",g.toString())).replace("[vertFov]",x.toString())}else l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=l.replace("[bboxWest]","-180")).replace("[bboxSouth]","-90")).replace("[bboxEast]","180")).replace("[bboxNorth]","90")).replace("[lookatLon]","")).replace("[lookatLat]","")).replace("[lookatRange]","")).replace("[lookatTilt]","")).replace("[lookatHeading]","")).replace("[lookatTerrainLon]","")).replace("[lookatTerrainLat]","")).replace("[lookatTerrainAlt]","")).replace("[cameraLon]","")).replace("[cameraLat]","")).replace("[cameraAlt]","")).replace("[horizFov]","")).replace("[vertFov]","");e$2e(i)?l=(l=l.replace("[horizPixels]",i.clientWidth)).replace("[vertPixels]",i.clientHeight):l=(l=l.replace("[horizPixels]","")).replace("[vertPixels]",""),l=(l=(l=(l=(l=l.replace("[terrainEnabled]","1")).replace("[clientVersion]","1")).replace("[kmlVersion]","2.2")).replace("[clientName]","SuperMap3D")).replace("[language]","English"),e.setQueryParameters(m$1c(l))}function At$3(e,t,i,n){var r=Ie$7(e,t,i).entity,o=i.sourceResource,a=i.uriResolver,s=y$n(t,"Link",m$n.kml);if(e$2e(s)||(s=y$n(t,"Url",m$n.kml)),e$2e(s)){var l,u,c=T$p(s,"href",m$n.kml);if(e$2e(c)){var h=c;if(c=we$6(c,o,i.uriResolver),/^data:/.test(c.getUrlComponent()))/\.kmz/i.test(o.getUrlComponent())||(h=o.getDerivedResource({url:h}));else{h=c.clone(),l=T$p(s,"viewRefreshMode",m$n.kml),u=u$Z(T$p(s,"viewBoundScale",m$n.kml),1);var d="onStop"===l?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",f=u$Z(T$p(s,"viewFormat",m$n.kml),d),p=T$p(s,"httpQuery",m$n.kml);e$2e(f)&&c.setQueryParameters(m$1c(Le$9(f))),e$2e(p)&&c.setQueryParameters(m$1c(Le$9(p)));var _=e._ellipsoid;He$8(c,e._camera,e._canvas,u,e._lastCameraView.bbox,_)}var m={sourceUri:h,uriResolver:a,context:r.id},g=new r$v,x=qe$2(e,g,c,m).then((function(t){var i=e._entityCollection,n=g.values;i.suspendEvents();for(var o=0;o<n.length;o++){var a=n[o];e$2e(a.parent)||(a.parent=r,ze$6(a)),i.add(a)}i.resumeEvents();var h=T$p(s,"refreshMode",m$n.kml),d=u$Z(I$v(s,"refreshInterval",m$n.kml),0);if("onInterval"===h&&d>0||"onExpire"===h||"onStop"===l){var f=y$n(t,"NetworkLinkControl",m$n.kml),p=e$2e(f),_=a$15.now(),m={id:e$1T(),href:c,cookie:{},lastUpdated:_,updating:!1,entity:r,viewBoundScale:u,needsUpdate:!1,cameraUpdateTime:_},x=0;if(p&&(m.cookie=m$1c(u$Z(T$p(f,"cookie",m$n.kml),"")),x=u$Z(I$v(f,"minRefreshPeriod",m$n.kml),0)),"onInterval"===h)p&&(d=Math.max(x,d)),m.refreshMode=re$d.INTERVAL,m.time=d;else if("onExpire"===h){var y;if(p&&(y=T$p(f,"expires",m$n.kml)),e$2e(y))try{var v=a$15.fromIso8601(y),$=a$15.secondsDifference(v,_);$>0&&$<x&&a$15.addSeconds(_,x,v),m.refreshMode=re$d.EXPIRE,m.time=v}catch{e$22("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else e$22("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else e._camera?(m.refreshMode=re$d.STOP,m.time=u$Z(I$v(s,"viewRefreshTime",m$n.kml),0)):e$22("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires a camera be passed in when creating the KmlDataSource");e$2e(m.refreshMode)&&e._networkLinks.set(m.id,m)}else"onRegion"===l&&e$22("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion")})).otherwise((function(t){e$22("An error occured during loading "+c.url),e._error.raiseEvent(e,t)}));n.addPromise(x)}}}function Ft$4(e,t,i,n){var r=Ue$6[t.localName];return e$2e(r)?r(e,t,i,n):We$5(e,t,i)}function ye$8(e,t,i,n,r,o){t.removeAll();var a=i.documentElement,s=T$p("Document"===a.localName?a:y$n(a,"Document",m$n.kml),"name",m$n.kml);e$2e(s)||(s=f$Q(n.getUrlComponent())),e$2e(e._name)||(e._name=s);var l=new U$n._DeferredLoading(e),u=new r$v(e);return o$1l.all(Tr$1(e,i,u,n,!1,r)).then((function(){var a=i.documentElement;if("kml"===a.localName)for(var s=a.childNodes,c=0;c<s.length;c++){var h=s[c];if(e$2e(Ue$6[h.localName])){a=h;break}}var d={parentEntity:void 0,entityCollection:t,styleCollection:u,sourceResource:n,uriResolver:r,context:o};return t.suspendEvents(),Ft$4(e,a,d,l),t.resumeEvents(),l.wait().then((function(){return i.documentElement}))}))}function Vt$4(e,t,i,n){var r=o$1l.defer();return he$a.createReader(new he$a.BlobReader(i),(function(i){i.getEntries((function(o){for(var a,s,l=[],u={},c=0;c<o.length;c++){var h=o[c];if(!h.directory){var d=o$1l.defer();l.push(d.promise),!/\.kml$/i.test(h.filename)||e$2e(a)&&/\//i.test(h.filename)?Ae$b(h,u,d):(e$2e(a)&&Ae$b(a,u,s),a=h,s=d)}}e$2e(a)&&ct$4(a,u,s),o$1l.all(l).then((function(){if(i.close(),e$2e(u.kml))return u.keys=Object.keys(u),ye$8(e,t,u.kml,n,u);r.reject(new t$13("KMZ file does not contain a KML document."))})).then(r.resolve).otherwise(r.reject)}))}),(function(e){r.reject(e)})),r.promise}function qe$2(e,t,i,n){var r=(n=u$Z(n,u$Z.EMPTY_OBJECT)).sourceUri,o=n.uriResolver,a=n.context,s=i;if("string"==typeof i||i instanceof t$10){s=(i=t$10.createIfNeeded(i)).fetchBlob(),r=u$Z(r,i.clone());var l=e._resourceCredits,u=i.credits;if(e$2e(u))for(var c=u.length,h=0;h<c;h++)l.push(u[h])}else r=u$Z(r,t$10.DEFAULT.clone());return r=t$10.createIfNeeded(r),o$1l(s).then((function(i){return i instanceof Blob?vt$3(i).then((function(n){return n?Vt$4(e,t,i,r):fr$1(i).then((function(i){var n,s;i=dr$1(i=ur$1(i));try{n=xe$9.parseFromString(i,"application/xml")}catch(e){s=e.toString()}if(e$2e(s)||n.body||"parsererror"===n.documentElement.tagName){var l=e$2e(s)?s:n.documentElement.firstChild.nodeValue;throw l||(l=n.body.innerText),new t$13(l)}return ye$8(e,t,n,r,o,a)}))})):ye$8(e,t,i,r,o,a)})).otherwise((function(t){return e._error.raiseEvent(e,t),console.log(t),o$1l.reject(t)}))}function U$n(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).camera,i=e.canvas;if(!e$2e(t))throw new t$15("options.camera is required.");if(!e$2e(i))throw new t$15("options.canvas is required.");this._changed=new o$1h,this._error=new o$1h,this._loading=new o$1h,this._refresh=new o$1h,this._unsupportedNode=new o$1h,this._clock=void 0,this._entityCollection=new r$v(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new s$A,this._networkLinks=new e$1Q,this._entityCluster=new a$r,this._canvas=i,this._camera=t,this._lastCameraView={position:e$2e(t)?o$1p.clone(t.positionWC):void 0,direction:e$2e(t)?o$1p.clone(t.directionWC):void 0,up:e$2e(t)?o$1p.clone(t.upWC):void 0,bbox:e$2e(t)?t.computeViewRectangle():h$18.clone(h$18.MAX_VALUE)},this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._visibleViewport=4095;var n=e.credit;"string"==typeof n&&(n=new r$U(n)),this._credit=n,this._resourceCredits=[]}function ze$6(e){var t=e.parent;if(e$2e(t)){var i=t.availability;if(e$2e(i)){var n=e.availability;e$2e(n)?n.intersect(i):e.availability=i}}}function Bt$5(e,t,i,n,r){return function(o){if(n.contains(t.id)){var a=!1,s=y$n(o,"NetworkLinkControl",m$n.kml),l=0;if(e$2e(s)){if(e$2e(y$n(s,"Update",m$n.kml)))return e$22("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,void n.remove(t.id);t.cookie=m$1c(u$Z(T$p(s,"cookie",m$n.kml),"")),l=u$Z(I$v(s,"minRefreshPeriod",m$n.kml),0)}var u=a$15.now(),c=t.refreshMode;if(c===re$d.INTERVAL)e$2e(s)&&(t.time=Math.max(l,t.time));else if(c===re$d.EXPIRE){var h;if(e$2e(s)&&(h=T$p(s,"expires",m$n.kml)),e$2e(h))try{var d=a$15.fromIso8601(h),f=a$15.secondsDifference(d,u);f>0&&f<l&&a$15.addSeconds(u,l,d),t.time=d}catch{e$22("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),a=!0}else e$22("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),a=!0}var p=t.entity,_=e._entityCollection,m=i.values;_.suspendEvents();var g,x=_.values.slice();for(g=0;g<x.length;++g){var y=x[g];y.parent===p&&(y.parent=void 0,E(y))}for(_.resumeEvents(),_.suspendEvents(),g=0;g<m.length;g++){var v=m[g];e$2e(v.parent)||(v.parent=p,ze$6(v)),_.add(v)}_.resumeEvents(),a?n.remove(t.id):t.lastUpdated=u;var $=_.computeAvailability(),b=$.start,T=$.stop,C=a$15.equals(b,o$I.MINIMUM_VALUE),S=a$15.equals(T,o$I.MAXIMUM_VALUE);if(!C||!S){var w=e._clock;(w.startTime!==b||w.stopTime!==T)&&(w.startTime=b,w.stopTime=T,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,r.getUrlComponent(!0))}function E(e){_.remove(e);for(var t=e._children,i=t.length,n=0;n<i;++n)E(t[n])}}}U$n.load=function(e,t){return new U$n(t=u$Z(t,u$Z.EMPTY_OBJECT)).load(e,t)},Object.defineProperties(U$n.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},s3mInstanceCollection:{get:function(){return this._s3mInstanceCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2e(e))throw new t$15("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),U$n.prototype.load=function(e,t){if(!e$2e(e))throw new t$15("data is required.");t=u$Z(t,u$Z.EMPTY_OBJECT),o$B.setLoading(this,!0);var i=this._name;this._name=void 0,this._clampToGround=u$Z(t.clampToGround,!1),this._clampToS3M=u$Z(t.clampToS3M,!1),this._classificationType=u$Z(t.classificationType,_0x2b86ba.TERRAIN);var n=this;return qe$2(this,this._entityCollection,e,t).then((function(){var e,t,r=n._entityCollection.computeAvailability(),o=r.start,a=r.stop,s=a$15.equals(o,o$I.MINIMUM_VALUE),l=a$15.equals(a,o$I.MAXIMUM_VALUE);s&&l||(s&&((t=new Date).setHours(0,0,0,0),o=a$15.fromDate(t)),l&&((t=new Date).setHours(24,0,0,0),a=a$15.fromDate(t)),(e=new e$z).startTime=o,e.stopTime=a,e.currentTime=a$15.clone(o),e.clockRange=tt$a.LOOP_STOP,e.clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER,e.multiplier=Math.round(Math.min(Math.max(a$15.secondsDifference(a,o)/60,1),31556900)));var u=!1;return e!==n._clock&&(n._clock=e,u=!0),i!==n._name&&(u=!0),u&&n._changed.raiseEvent(n),o$B.setLoading(n,!1),n})).otherwise((function(e){return o$B.setLoading(n,!1),n._error.raiseEvent(n,e),console.log(e),o$1l.reject(e)}))};var je$6=new e$1Q;function Kt$2(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}function Wt$4(e,t,i,n){var r=(n=u$Z(n,u$Z.EMPTY_OBJECT)).sourceUri;return o$1l(fr$1(i)).then((function(i){var n,o;try{n=xe$9.parseFromString(i,"application/xml")}catch(e){o=e.toString()}if(e$2e(o)||n.body||"parsererror"===n.documentElement.tagName){var a=e$2e(o)?o:n.documentElement.firstChild.nodeValue;throw a||(a=n.body.innerText),new t$13(a)}return ye$8(e,t,n,r,void 0)}))}function Gt$2(e,t,i,n,r,o,a,s){var l,u=y$n(i,"Location",m$n.kml),c=T$p(i,"altitudeMode",m$n.kml),h=T$p(i,"altitudeMode",m$n.gx),d=y$n(i,"Orientation",m$n.kml),f=I$v(d,"heading",m$n.kml),p=I$v(d,"tilt",m$n.kml),_=I$v(d,"roll",m$n.kml),m=y$n(i,"Scale",m$n.kml),g=I$v(m,"x",m$n.kml),x=I$v(m,"y",m$n.kml),y=I$v(m,"z",m$n.kml),v=T$p(y$n(i,"Link",m$n.kml),"href",m$n.kml);if(e$2e(s)&&(l=s[v]),-1!==(v=we$6(v,a,s)).url.indexOf(".s3m")){e$2e(e._s3mInstanceCollection)||(e._s3mInstanceCollection=new _0xd633a7(e._camera._scene.context),e._camera._scene.primitives.add(e._s3mInstanceCollection));var $=fe$a(T$p(u,"longitude",m$n.kml)+","+T$p(u,"latitude",m$n.kml)+","+T$p(u,"altitude",m$n.kml)),b=-e$2d.toRadians(f),T=e$2d.toRadians(p),C=e$2d.toRadians(_);return e._s3mInstanceCollection.add(v.url,[{position:$,scale:new o$1p(g,x,y),hpr:new i$16(b,T,C)}]),!0}var S=y$n(u,"MultiTrack",m$n.gx);if(e$2e(S))r.billboard=new n$V({show:!1}),r.label=new n$Q({show:!1}),yr$1(e,t,S,n,r),n.orientation=new e$w(n.position);else{$=fe$a(T$p(u,"longitude",m$n.kml)+","+T$p(u,"latitude",m$n.kml)+","+T$p(u,"altitude",m$n.kml));n.position=Mr$2(new r$V($),c,h);var w=m$19.headingPitchRollQuaternion($,i$16.fromDegrees(f,p,_));n.orientation=w}return n.model={uri:v.url,minimumPixelSize:16,maximumScale:16,scale:new o$1p(g,x,y),blob:l},!0}U$n.prototype.update=function(e){var t=this._networkLinks;if(0===t.length)return!0;var i=a$15.now(),n=this;function r(e){for(var t=e._children,i=t.length,n=0;n<i;++n){var o=t[n];je$6.set(o.id,o),r(o)}}je$6.removeAll();var o=!1,a=this._lastCameraView,s=this._camera;e$2e(s)&&!(s.positionWC.equalsEpsilon(a.position,e$2d.EPSILON7)&&s.directionWC.equalsEpsilon(a.direction,e$2d.EPSILON7)&&s.upWC.equalsEpsilon(a.up,e$2d.EPSILON7))&&(a.position=o$1p.clone(s.positionWC),a.direction=o$1p.clone(s.directionWC),a.up=o$1p.clone(s.upWC),a.bbox=s.computeViewRectangle(),o=!0);var l=new e$1Q,u=!1;return t.values.forEach((function(e){var t=e.entity;if(!je$6.contains(t.id)){if(!e.updating){var s=!1;if(e.refreshMode===re$d.INTERVAL?a$15.secondsDifference(i,e.lastUpdated)>e.time&&(s=!0):e.refreshMode===re$d.EXPIRE?a$15.greaterThan(i,e.time)&&(s=!0):e.refreshMode===re$d.STOP&&(o&&(e.needsUpdate=!0,e.cameraUpdateTime=i),e.needsUpdate&&a$15.secondsDifference(i,e.cameraUpdateTime)>=e.time&&(s=!0)),s){r(t),e.updating=!0;var c=new r$v,h=e.href.clone();h.setQueryParameters(e.cookie);var d=u$Z(n._ellipsoid,t$12.WGS84);He$8(h,n._camera,n._canvas,e.viewBoundScale,a.bbox,d),qe$2(n,c,h,{context:t.id}).then(Bt$5(n,e,c,l,h)).otherwise((function(t){var i="NetworkLink "+e.href+" refresh failed: "+t;console.log(i),n._error.raiseEvent(n,i)})),u=!0}}l.set(e.id,e)}})),u&&(this._networkLinks=l,this._changed.raiseEvent(this)),!0},U$n.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},U$n.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,e$2e(this._s3mInstanceCollection)&&this._s3mInstanceCollection.setVisibleInViewport(e,t)},U$n.importFile=function(e,t){return new U$n(t=u$Z(t,u$Z.EMPTY_OBJECT)).read(e,t)},U$n.prototype.read=function(e,t){if(!e$2e(e))throw new t$15("data is required.");o$B.setLoading(this,!0);var i=this._name;this._name=void 0,this._promises=[];var n=this;return Wt$4(this,this._entityCollection,e,t).then((function(){return o$1l.all(n._promises,(function(){var e,t,r=n._entityCollection.computeAvailability(),o=r.start,a=r.stop,s=a$15.equals(o,o$I.MINIMUM_VALUE),l=a$15.equals(a,o$I.MAXIMUM_VALUE);s&&l||(s&&((t=new Date).setHours(0,0,0,0),o=a$15.fromDate(t)),l&&((t=new Date).setHours(24,0,0,0),a=a$15.fromDate(t)),(e=new e$z).startTime=o,e.stopTime=a,e.currentTime=a$15.clone(o),e.clockRange=tt$a.LOOP_STOP,e.clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER,e.multiplier=Math.round(Math.min(Math.max(a$15.secondsDifference(a,o)/60,1),31556900)));var u=!1;return e!==n._clock&&(n._clock=e,u=!0),i!==n._name&&(u=!0),u&&n._changed.raiseEvent(n),o$B.setLoading(n,!1),n._promises=void 0,n}))})).otherwise((function(e){return o$B.setLoading(n,!1),n._error.raiseEvent(n,e),console.log(e),o$1l.reject(e)}))},U$n._DeferredLoading=Q$l,U$n._getTimestamp=Et$c;var a$l=e$1X.WHITE,h$q=e$1X.BLACK,s$j=1;function e$v(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth,this.vtime=3.14*Math.random(),this._bAsy=u$Z(e.bAsy,!0),this._speedRatio=u$Z(e.speedRatio,1)}function r$r(){t$15.throwInstantiationError()}Object.defineProperties(e$v.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)&&r$_.isConstant(this._outlineColor)&&r$_.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth")}),e$v.prototype.getType=function(e){return"PolylineDynamic"},e$v.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,a$l,t.color),t.outlineColor=r$_.getValueOrClonedDefault(this._outlineColor,e,h$q,t.outlineColor),t.outlineWidth=r$_.getValueOrDefault(this._outlineWidth,e,s$j),t.bAsy=1==this._bAsy?1:0,t.v_time=618e-6*performance.now()-1.9788000000000001-this.vtime,t.v_time*=this._speedRatio,t},e$v.prototype.equals=function(e){return this===e||e instanceof e$v&&r$_.equals(this._color,e._color)&&r$_.equals(this._outlineColor,e._outlineColor)&&r$_.equals(this._outlineWidth,e._outlineWidth)},r$r.prototype.update=t$15.throwInstantiationError,r$r.prototype.getBoundingSphere=t$15.throwInstantiationError,r$r.prototype.isDestroyed=t$15.throwInstantiationError,r$r.prototype.destroy=t$15.throwInstantiationError;var e$u={StopPause:"StopPause",StopAround:"StopAround"},A$s=Object.freeze(e$u);function e$t(e){this._duration=u$Z(e.duration,10),this._waitTime=u$Z(e.waitTime,0),this._point=e.point,this._heading=u$Z(e.heading,0),this._tilt=u$Z(e.tilt,0),this._stopName=e.stopName,this._speed=u$Z(e.speed,0),this._stopPlayMode=e.stopPlayMode||A$s.StopPause,this._surroundDuration=u$Z(e.surroundDuration,0),this._promise=void 0,this._index=u$Z(e.index,0),this._nextStopIndex=void 0,this._preStopIndex=void 0,this._isConvert=u$Z(e.isConvert,!0)}Object.defineProperties(e$t.prototype,{duration:{get:function(){return this._duration},set:function(e){e&&(this._duration=e)}},waitTime:{get:function(){return this._waitTime},set:function(e){e&&!this._isGenerated&&(this._waitTime=e)}},heading:{get:function(){return this._heading},set:function(e){e&&(this._heading=e)}},tilt:{get:function(){return this._tilt},set:function(e){e&&(this._tilt=e)}},stopName:{get:function(){return this._stopName},set:function(e){e&&(this._stopName=e)}},point:{get:function(){return this._point},set:function(e){this._point=e}},speed:{get:function(){return this._speed},set:function(e){e&&(this._speed=e)}},stopPlayMode:{get:function(){return this._stopPlayMode},set:function(e){e&&(this._stopPlayMode=e)}},surroundDuration:{get:function(){return this._surroundDuration},set:function(e){e&&(this._surroundDuration=e)}},index:{get:function(){return this._index}},promise:{get:function(){return this._promise},set:function(e){e&&(this._promise=e)}}});var e$s={Smoothly:0,Directly:1},v$p=Object.freeze(e$s),n$l={Playing:0,Pause:1,Stop:2,Wait:3},m$m;function l$r(e){var t=e.scene,i=e.routes;if(!t)throw new t$15("scene is required!");if(!i)throw new t$15("routes is required!");this._routes=i,this._scene=t,this._currentStopIndex=0,this._dynamicCurrentStopIndex=0,this._currentTween=void 0,this._stopArrived=new o$1h,this._playRate=1,this._flyStatus=n$l.Stop,this._turningMode=v$p.Smoothly,this._interpolationMode=j$16.NONE}function c$j(e,t,i){e._flyStatus=n$l.Playing;var n=e._scene.camera,r=e._routes.routes[0],o=r._catmullRomSpline,a=e._interpolationMode,s=r.isFlyLoop,l=r.isHeadingFree,u=r.isTiltFree,c=r.isAltitudeFree,h=u$Z(r._stopCollection.get(t),r._stopCollection._array[t]);if(!h)return!0===s?(t=r._stopCollection._array[0].index,e$2e(o)&&(o._lastTimeIndex=0),e._dynamicCurrentStopIndex=t,e.currentStopIndex=t,void c$j(e,t)):void(e._flyStatus=n$l.Stop);if(t===e.currentStopIndex){var d=r.isAlongline&&e$2e(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};n.setView({destination:h.point,orientation:d,convert:h._isConvert}),t++,c$j(e,t)}else{if(h._bImmediately){d=r.isAlongline&&e$2e(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};return n.setView({destination:h.point,orientation:d,convert:h._isConvert}),void g$w(e,h,t)}var f=u$Z(r._stopCollection.get(t-1),r._stopCollection.get(h._preStopIndex));e$2e(i)&&(f=i);var p,_=f.altitude<h.altitude?f.altitude:h.altitude;if(f.stopPlayMode===A$s.StopAround)p=f.surroundDuration;else{if(e$2e(i)){var m=o$1p.distance(i.point,h.point);f.duration=m/f.speed}p=f.duration}p/=e._playRate;d=r.isAlongline&&e$2e(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};var g=!1;if(e._turningMode===v$p.Directly&&e$2e(f.direction)){d={direction:f.direction,up:f.up};g=!0}n.flyTo({convert:h._isConvert,destination:h.point,orientation:d,maximumHeight:_,duration:p,headingFree:l,pitchFree:u,altitudeFree:c,directTurning:g,catmullRomSpline:o,preStopIndex:t-1,interpolationMode:a,easingFunction:m$Y.LINEAR_NONE,complete:function(){g$w(e,h,t)}})}}function g$w(e,t,i){if(m$m&&clearTimeout(m$m),e._dynamicCurrentStopIndex=t._index,i=u$Z(t._nextStopIndex,t._index+1),e._stopArrived.raiseEvent(t),t.promise)o$1l(t.promise,(function(){var n=t.waitTime;n>0?setTimeout((function(){c$j(e,i)}),1e3*n):c$j(e,i)}));else{var n=t.waitTime;n>0?(e._flyStatus=n$l.Wait,m$m=setTimeout((function(){e._flyStatus===n$l.Wait&&(e._flyStatus=n$l.Playing,c$j(e,i))}),1e3*n)):c$j(e,i)}}function f$p(e){e=e||{},this._stopCollection=new e$1Q,this._isStopVisible=u$Z(e.isStopVisible,!1),this._stopMarkCollection=[],this._isFlyLoop=u$Z(e.isFlyLoop,!1),this._isLineVisible=u$Z(e.isLineVisible,!1),this._lineEntity=void 0,this._routeName=u$Z(e.routeName,""),this._speed=u$Z(e.speed,50),this._isAlongline=u$Z(e.isAlongline,!1),this._totalDuration=u$Z(e.totalDuration,0),this._isHeadingFree=!this._isAlongline&&u$Z(e.isHeadingFree,!1),this._isTiltFree=u$Z(e.isTiltFree,!1),this._isAltitudeFree=u$Z(e.isAltitudeFree,!1),this._entityCollection=e.entityCollection,this._catmullRomSpline=void 0,this._isCleared=!1,this._stopsInfo=u$Z(e.stopsInfo,{}),this._removeIndex=[],this._addedStops=[]}function d$x(e){this._entityCollection=e,this._routes=[],this._ready=!1,this._readyPromise=o$1l.defer()}function p$i(e,t){for(var i=e,n=t.firstChild,r=n.namespaceURI,o=h$p(n,"route",r),a=0,s=o.length;a<s;a++){var l=o[a],u=h$p(l,"routestop",r),c=I$u(l,"speed"),h=O$j(l,"name"),d=l$q(l,"showroutestop"),f=l$q(l,"showrouteline"),p=l$q(l,"flycircle"),_=l$q(l,"alongline"),m=l$q(l,"headingfree"),g=l$q(l,"tiltfree"),x=l$q(l,"altitudefree"),y=new f$p({entityCollection:i._entityCollection,routeName:h,speed:c,isLineVisible:f,isFlyLoop:p,isStopVisible:d,isAlongline:_,isHeadingFree:m,isTiltFree:g,isAltitudeFree:x,stopsInfo:{stopNodes:u,namespace:r}});y.init(),i.addRoute(y),i._ready=!0}i._readyPromise.resolve()}function I$u(e,t){if(e$2e(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function O$j(e,t){if(e$2e(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function l$q(e,t){if(e$2e(e)){var i=e.getAttribute(t);if("false"===(i=i.toLowerCase()))return!1;if("true"===i)return!0}}function h$p(e,t,i){if(!e$2e(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}function o$u(){this.Name="",this.NumParts=0,this.NumPoints=0,this.Parts=[],this.Points=[],this.Description="",this.Color=new e$1X(1,1,1),this.Radius=.02}function z$o(e,t){this.a0=80,this.r=35.187*.001,e$2e(t)?(this.a0=e,this.r=t,this.m_sag=new d$w(e,t)):e$2e(e)&&(this.m_sag=new d$w(e)),this.enuCenters=[]}Object.defineProperties(l$r.prototype,{routes:{get:function(){return this._routes},set:function(e){e&&(this._routes=e)}},stopArrived:{get:function(){return this._stopArrived}},currentStopIndex:{get:function(){return e$2e(this._routes.routes[0]._stopCollection.get(this._currentStopIndex))||(this._dynamicCurrentStopIndex=this._currentStopIndex=this._routes.routes[0]._stopCollection._array[0].index),this._currentStopIndex},set:function(e){if(e$2e(e)&&1==this._routes.ready){var t=this._routes.routes[0].stopCollection.length-1;e=(e=e>t?t:e)<0?0:e,this._currentStopIndex=e}}},currentRoute:{get:function(){if(this._routes.ready)return this._routes.routes[0]}},readyPromise:{get:function(){return this._routes.readyPromise}},playRate:{get:function(){return this._playRate},set:function(e){if(e&&0!==e&&this._playRate!==e&&(this._playRate=e,this._flyStatus===n$l.Playing)){this._scene.camera.cancelFlight();var t=this._routes.routes[0].get(this._dynamicCurrentStopIndex),i=new e$t({});for(var n in t)i[n]=t[n];i.point=this._scene.camera._position,c$j(this,this._dynamicCurrentStopIndex+1,i)}}},turningMode:{get:function(){return this._turningMode},set:function(e){this._turningMode=e}},interpolationMode:{get:function(){return this._interpolationMode},set:function(e){this._interpolationMode=e}}}),l$r.prototype.play=function(){if(this.currentRoute&&this._flyStatus!==n$l.Playing)if(this._flyStatus===n$l.Pause||this._flyStatus===n$l.Wait)this._currentTween&&this._scene.camera._currentFlight?(this._currentTween.tweenjs.endPause(),this._flyStatus=n$l.Playing):c$j(this,this._dynamicCurrentStopIndex+1);else{if(this.currentStopIndex>=this._routes.routes[0].stopCollection[this._routes.routes[0].stopCollection.length-1].index)return void(this._flyStatus=n$l.Stop);c$j(this,this.currentStopIndex)}},l$r.prototype.pause=function(){this._flyStatus===n$l.Playing?(this._currentTween=this._scene.camera._currentFlight,this._currentTween&&this._currentTween.tweenjs&&this._currentTween.tweenjs.pause(),this._flyStatus=n$l.Pause):this._flyStatus===n$l.Wait&&(this._flyStatus=n$l.Pause)},l$r.prototype.stop=function(){this._currentTween=this._scene.tweens.get(0),this._currentTween&&this._flyStatus!==n$l.Stop?(this._currentTween.cancelTween(),this._flyStatus=n$l.Stop,this._currentTween=void 0):this._flyStatus===n$l.Wait&&(this._flyStatus=n$l.Stop),this._dynamicCurrentStopIndex=this._currentStopIndex},l$r.prototype.viewToStop=function(e){if(e&&this._flyStatus!==n$l.Playing){var t=this._scene.camera,i={heading:e.heading,pitch:e.tilt,roll:0};t.setView({destination:e.point,orientation:i,convert:e._isConvert}),this._dynamicCurrentStopIndex=e.index}},l$r.prototype.getAllRouteStops=function(){return this.currentRoute?this.currentRoute.stopCollection:[]},Object.defineProperties(f$p.prototype,{stopCollection:{get:function(){return this._stopCollection.values}},isStopVisible:{get:function(){return this._isStopVisible},set:function(e){e$2e(e)&&e!==this._isStopVisible&&(this._isStopVisible=e,this.setStopVisible())}},isFlyLoop:{get:function(){return this._isFlyLoop},set:function(e){e&&(this._isFlyLoop=e)}},isLineVisible:{get:function(){return this._isLineVisible},set:function(e){e$2e(e)&&e!==this._isLineVisible&&(this._isLineVisible=e,this.setLineVisible())}},lineEntity:{get:function(){return this._lineEntity},set:function(e){e$2e(e)&&(this._lineEntity=e)}},routeName:{get:function(){return this._routeName},set:function(e){e&&(this._routeName=e)}},speed:{get:function(){return this._speed},set:function(e){if(e&&e!=this._speed){this._speed=e;for(var t=this.speed,i=this.stopCollection,n=0,r=i.length;n<r-1;n++){var o=i[n];o.duration=Math.ceil(o.distanceToNext/t)}}}},stopCount:{get:function(){return this._stopCollection.length}},isAlongline:{get:function(){return this._isAlongline},set:function(e){e$2e(e)&&(this._isAlongline=e)}},totalDuration:{get:function(){return this._totalDuration}},isHeadingFree:{get:function(){return this._isHeadingFree},set:function(e){e$2e(e)&&(this._isHeadingFree=e)}},isTiltFree:{get:function(){return this._isTiltFree},set:function(e){e$2e(e)&&(this._isTiltFree=e)}},isAltitudeFree:{get:function(){return this._isAltitudeFree},set:function(e){e$2e(e)&&(this._isAltitudeFree=e)}}}),f$p.prototype.init=function(){var e=0,t=[0],i=[],n=this._stopsInfo.stopNodes,r=this._stopsInfo.namespace;n=e$2e(n)?n.concat(this._addedStops):this._addedStops;for(var o=0;o<n.length;o++)if(!(this._removeIndex.indexOf(o)>-1)){var a,s=n[o];if(s instanceof e$t){if(-1!==(a=s)._preStopIndex){var l=(S=this._stopCollection._array[a._preStopIndex]).point,u=o$1p.distance(l,a.point);S.distanceToNext=u}}else{var c=s$T.queryFirstNode(s,"camera",r),h=s$T.queryNumericValue(c,"longitude",r),d=s$T.queryNumericValue(c,"latitude",r),f=s$T.queryNumericValue(c,"altitude",r),p=s$T.queryNumericValue(c,"heading",r);p=e$2d.toRadians(p);var _=s$T.queryNumericValue(c,"tilt",r);_=e$2d.toRadians(_-90),s$T.queryStringValue(c,"altitudeMode",r);var m,g=s$T.queryStringAttribute(s,"name"),x=s$T.queryNumericAttribute(s,"speed",r),y=s$T.queryFirstNode(s,"setting",r),v=s$T.queryStringValue(y,"stopPlayMode",r),$=s$T.queryNumericValue(y,"pauseTime",r),b=s$T.queryNumericValue(y,"angularSpeed",r),T=s$T.queryFirstNode(y,"stopViews",r),C=!0;h>180||d>180?(m=new o$1p(h,d,f),C=!1):m=o$1p.fromDegrees(h,d,f),i.push(m);var S,w=this.stopCount;if(o>0&&w>0)if((S=this._stopCollection._array[this._stopCollection.length-1]).stopPlayMode!=A$s.StopAround){l=S.point,u=o$1p.distance(l,m);S.distanceToNext=u;var E,P=S.speed;E=0<P?P:this._speed,S.duration=u/E,S.speed=E,e+=S.duration,t.push(e)}(a=new e$t({index:o,point:m,heading:p,tilt:_,stopName:g,waitTime:$,speed:x,isConvert:C})).altitude=f}if(this._addStop(a),e$2e(S)&&(S._nextStopIndex=o,a._preStopIndex=S.index),v===A$s.StopAround&&T){var A=queryChildNodes(T,"view",r);if(2==A.length){var L=A[0],M=A[1],R=s$T.queryNumericAttribute(L,"heading",r),O=s$T.queryNumericAttribute(M,"heading",r);s$T.queryNumericAttribute(L,"tilt",r),s$T.queryNumericAttribute(M,"tilt",r),s$T.queryNumericAttribute(L,"altitude",r),s$T.queryNumericAttribute(M,"altitude",r);var D=s$T.queryStringAttribute(L,"direction",r);s$T.queryStringAttribute(M,"direction",r);var I,F="Clockwise"===D?1:-1;e$2d.equalsEpsilon(R,O,e$2d.EPSILON15)?I=360:((I=O-R)<0&&"Clockwise"===D?I+=360:I>0&&"Clockwise"!==D&&(I=360-I),I=Math.abs(I));var B=I/b;a.surroundDuration=B/3,a.stopPlayMode=A$s.StopAround;var N=e$2d.toRadians(R),G=e$2d.toRadians(R+F*I/3),z=e$2d.toRadians(R+F*I*2/3),U=e$2d.toRadians(O),V=new e$t({point:m,heading:N,tilt:_,stopName:g,waitTime:$,speed:x,surroundDuration:B/3,stopPlayMode:A$s.StopAround});V._bImmediately=!0,V._isGenerated=!0,this._addStop(V);var k=new e$t({point:m,heading:G,tilt:_,stopName:g,waitTime:0,speed:x,surroundDuration:B/3,stopPlayMode:A$s.StopAround});k._isGenerated=!0,this._addStop(k);var W=new e$t({point:m,heading:z,tilt:_,stopName:g,waitTime:0,speed:x,surroundDuration:B/3,stopPlayMode:A$s.StopAround});W._isGenerated=!0,this._addStop(W);var H=new e$t({point:m,heading:U,tilt:_,stopName:g,waitTime:$,speed:x});this._addStop(H),e+=B}}}for(var q=0;q<this.stopCount-1;q++){var j=this.stopCollection[q],X=this.stopCollection[q+1],Y=new o$1p(X.point.x-j.point.x,X.point.y-j.point.y,X.point.z-j.point.z);Y.equals(o$1p.ZERO)||(o$1p.normalize(Y,Y),j.direction=Y,j.up=m$19.buildUp(j.point,Y),this._isTiltFree&&(j.heading=m$19.getHeading(j.direction,j.up)-e$2d.PI))}if(this.stopCount>2){var Z=this.stopCollection[this.stopCollection.length-1],K=this.stopCollection[this.stopCollection.length-2];Z.direction=K.direction,Z.up=K.up,this._isTiltFree&&(Z.heading=m$19.getHeading(Z.direction,Z.up)-e$2d.PI)}i.length>=2&&(this._catmullRomSpline=new c$L({times:t,points:i})),this.setStopVisible(),this._totalDuration=e},f$p.prototype._addStop=function(e){if(!e)throw new t$15("parameter stop is required!");if(!(e instanceof e$t))throw new t$15("parameter stop must be instanceof RouteStop!");if(this._stopCollection.set(e.index,e),e$2e(this._entityCollection)&&this._isStopVisible){var t=this._entityCollection.add({position:e.point,billboard:{image:n$17("Assets/Textures/maki/grepin.png"),scale:.5}});this._stopMarkCollection.push(t)}if(this._isCleared&&this._stopCollection.length>2)if(e$2e(this._catmullRomSpline)){var i=[].concat(this._catmullRomSpline.times),n=[].concat(this._catmullRomSpline.points),r=this._stopCollection.length>0?this._stopCollection._array[this._stopCollection.length-2]._duration:0,o=i.length>0?i[i.length-1]:0;i.push(o+r),n.push(e.point),this._catmullRomSpline=new c$L({times:i,points:n})}else{for(var a=[0],s=[this._stopCollection._array[0].point],l=0,u=1;u<this._stopCollection.length;u++){var c=this._stopCollection._array[u],h=this._stopCollection._array[u-1];s.push(c.point),l+=h.duration,a.push(l)}this._catmullRomSpline=new c$L({times:a,points:s})}return!0},f$p.prototype.addStop=function(e){if(!e)throw new t$15("parameter stop is required!");if(!(e instanceof e$t))throw new t$15("parameter stop must be instanceof RouteStop!");e._preStopIndex=this._stopsInfo.stopNodes.length+this._addedStops.length-1,e._index=e._preStopIndex+1,this._addedStops.push(e),this.clear(),this.init(),this.setLineVisible()},f$p.prototype.removeStop=function(e){this.clear(),-1===this._removeIndex.indexOf(e.index)&&this._removeIndex.push(e.index),this.init(),this.setLineVisible()},f$p.prototype.setLineVisible=function(){if(e$2e(this._entityCollection)){if(!e$2e(this._lineEntity)){for(var e=this.stopCollection,t=e.length,i=[];t--;)i.push(e[t].point);this._lineEntity=this._entityCollection.add({name:this.routeName,polyline:{positions:i,width:5}})}this._lineEntity.show=this._isLineVisible}},f$p.prototype.setStopVisible=function(){if(e$2e(this._entityCollection)){if(0===this._stopMarkCollection.length&&this._isStopVisible)for(var e=this.stopCollection,t=e.length;t--;){var i=e[t],n=this._entityCollection.add({position:i.point,billboard:{image:n$17("Assets/Textures/maki/grepin.png"),scale:.5}});this._stopMarkCollection.push(n)}for(var r=0,o=this._stopMarkCollection.length;r<o;r++){(n=this._stopMarkCollection[r]).show=this._isStopVisible}}},f$p.prototype.get=function(e){return void 0===this._stopCollection.get(e)?this.stopCollection[e]:this._stopCollection.get(e)},f$p.prototype.clear=function(){this._isCleared=!0;for(var e=0;e<this._stopMarkCollection.length;e++)this._entityCollection.remove(this._stopMarkCollection[e]);e$2e(this._lineEntity)&&(this._entityCollection.remove(this._lineEntity),this._lineEntity=void 0),this._stopCollection.removeAll(),e$2e(this._catmullRomSpline)&&(this._catmullRomSpline=void 0)},Object.defineProperties(d$x.prototype,{routes:{get:function(){return this._routes}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}}}),d$x.prototype.addRoute=function(e){if(e&&(this._routes.push(e),e.isLineVisible&&e$2e(this._entityCollection))){for(var t=e.stopCollection,i=t.length,n=[];i--;)n.push(t[i].point);e.lineEntity=this._entityCollection.add({name:e.routeName,polyline:{positions:n,width:5}})}},d$x.prototype.get=function(e){return this._routes[e]},d$x.prototype.fromFile=function(e){var t=this;o$1l(d$1f(e),(function(e){p$i(t,e)}),(function(){t._readyPromise.reject()}))},d$x.prototype.fromXML=function(e){if(!e$2e(e))throw new t$15("xml content is required to create routes!");var t=(new DOMParser).parseFromString(e,"text/xml");try{p$i(this,t)}catch(e){throw new t$15(e)}},o$u.prototype.Clone=function(){var e=new o$u;if(e.Name=this.Name,e.Description=this.Description,e.NumParts=this.NumParts,e.NumPoints=this.NumPoints,e.Color=this.Color,e.Radius=this.Radius,null!=this.Parts){for(var t=[],i=0;i<this.Parts.length;i++)t.push(this.Parts[i]);e.Parts=t}e.Points=[];for(i=0;i<this.NumPoints;i++)e.Points[i]=new o$1p,e.Points[i].x=this.Points[i].x,e.Points[i].y=this.Points[i].y,e.Points[i].z=this.Points[i].z;return e},o$u.prototype.ComputeBox=function(e,t){e=new o$1p(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),t=new o$1p(Number.MIN_VALUE,Number.MIN_VALUE,Number.MIN_VALUE);for(var i=0,n=this.Points.length;i<n;i++){var r=this.Points[i];e.x>r.x&&(e.x=r.x),e.y>r.y&&(e.y=r.y),e.z>r.z&&(e.z=r.z),t.x<r.x&&(t.x=r.x),t.y<r.y&&(t.y=r.y),t.z<r.z&&(t.z=r.z)}},z$o.enuCenter=void 0;var M$o={sh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-e))/2},arsh:function(e){return Math.log(e+Math.sqrt(e*e+1),Math.E)}};function N$i(e){return new o$1p(parseFloat(e.x)||0,parseFloat(e.y)||0,parseFloat(e.z)||0)}z$o.prototype.GetPowerline=function(e){if(!e instanceof o$u||null==e.Points||e.Points.Length<2)return null},z$o.prototype.gernerateCatenarylines=function(e){if(!(e.points instanceof Array&&e$2e(e.points[0].begin)&&e$2e(e.points[0].end)))throw new t$15("options.points is required and must like [{begin : 0, end : 1}, {begin : 1, end : 2}]");for(var t=[],i=u$Z(e.imageUrl,""),n=u$Z(e.imageRepeat,new o$1o(30,1)),r=u$Z(e.imageTransparent,!1),o=u$Z(e.volumeDisplayCondition,new o$1o(0,500)),a=u$Z(e.lineDisplayCondition,new o$1o(500,5e4)),s=u$Z(e.lineColor,e$1X.WHITE),l=0,u=e.points.length;l<u;l++){var c=e.points[l].begin,h=e.points[l].end;c=N$i(c),h=N$i(h);var d=this.InsertTwoPoints(c,h),f=[],p=null,_=o$1p.fromDegrees(d[0].x,d[0].y,d[0].z);if(0===this.enuCenters.length)this.enuCenters.push(_),p=this.enuCenters[0];else{for(var m=0;m<this.enuCenters.length;m++)if(o$1p.distance(this.enuCenters[m],_)<1e4){p=this.enuCenters[m];break}e$2e(p)||(p=_,this.enuCenters.push(_))}for(var g=0;g<d.length;g++){var x=o$1p.fromDegrees(d[g].x,d[g].y,d[g].z);f.push(x)}if(f.length>1){var y=new h$W({polylineVolume:new e$1n({positions:f,enuCenter:p,shape:U$m(this.r),material:new a$R({image:i,repeat:n,transparent:r}),distanceDisplayCondition:new r$Z(o.x,o.y)}),polyline:new a$L({positions:f,distanceDisplayCondition:new r$Z(a.x,a.y),width:2,material:s})});t.push(y)}}return t};var q$l={};function U$m(e){if(e$2e(q$l["_"+e]))return q$l["_"+e];for(var t=[],i=0;i<360;){var n=e$2d.toRadians(i);t.push(new o$1o(e*Math.cos(n),e*Math.sin(n))),i+=11.25}return q$l["_"+e]=t,t}function T$o(e,t,i,n){return.5*n-e/t*M$o.arsh(t*i/(2*e*M$o.sh(t*n/(2*e))))}function H$t(e,t,i){return e*e+t*t+i*i}function S$n(e,t,i){return Math.sqrt(H$t(e,t,i))}function J$g(e,t,i){var n=S$n(e,t,i);return new o$1p(e/n,t/n,i/n)}function O$i(e,t,i){e*=Math.PI/180,t*=Math.PI/180;var n=i*Math.cos(e);return new o$1p(n*Math.cos(t),n*Math.sin(t),i*Math.sin(e))}function D$l(e){new o$1p;return O$i(e.y,e.x,e.z+6378137)}function d$w(e,t){this.l=0,this.h=0,e$2e(t)?(this.a0=e,this.r=t,this.k=Q$k(e,t)):(this.k=e,this.a0=0,this.r=0)}function Q$k(e,t){return t*Math.pow(10,5)/(8*e)}function i$q(){this.init()}function i$p(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function i$o(e){e=parseFloat(e)||0,this.init(e)}function r$q(e,t){e=parseFloat(e)||0,t=parseFloat(t)||0,this._vertex=void 0,this._rotateOrigin=O$K.CENTER,this.init(e,t)}function i$n(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function i$m(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function t$i(){this.init()}function e$r(e){e=e||{},this.init(e)}function e$q(e){e=parseFloat(e)||0,this.init(e)}z$o.prototype.InsertTwoPoints=function(e,t){if(!(e instanceof o$1p&&t instanceof o$1p))throw new t$15("startPos and endPos must be Cartesian3!");if(e.x==t.x&&e.y==t.y&&e.z==t.z)return[new o$1p(e.x,e.y,e.z)];var i=D$l(e),n=D$l(t),r=o$1p.subtract(n,i,new o$1p),o=o$1p.magnitude(r),a=Math.max(Math.floor(o/10),2);a=a%2==0?a:a+1;var s=new Array(a+2),l=t.z-e.z,u=l/o,c=Math.sqrt(1-u*u)||1;T$o(this.a0,this.r,l,o*c);var h=o/(a+1);this.m_sag.l=o*c,this.m_sag.h=l;for(var d=0;d<=a+1;d++){var f=new o$1p((t.x-e.x)*d/(a+1),(t.y-e.y)*d/(a+1),(t.z-e.z)*d/(a+1));if(s[d]=new o$1p(e.x+f.x,e.y+f.y,e.z+f.z),0!=d||d!=this.segments+1){var p=h*d;this.m_sag.fx(p*c),s[d].z=s[d].z-this.m_sag.fx(p*c)}}return s},z$o.prototype.CalcPoint=function(e,t,i){var n=D$l(e),r=D$l(t),o=new o$1p(r.x-n.x,r.y-n.y,r.z-n.z),a=Math.sqrt(o.x*o.x+o.y*o.y+o.z*o.z),s=null,l=t.z-e.z,u=l/a,c=Math.sqrt(1-u*u);T$o(this.a0,this.r,l,a*c),this.m_sag.l=a*c,this.m_sag.h=l;var h=i/this.m_sag.l,d=new o$1p(t.x-e.x,t.y-e.y,t.z-e.z);o=new o$1p((d=J$g(d.x,d.y,d.z)).x*a*h,d.y*a*h,d.z*a*h);return(s=new o$1p(e.x+o.x,e.y+o.y,e.z+o.z)).z=s.z-this.m_sag.fx(i),s},d$w.prototype.fx=function(e){var t=8*Math.pow(10,-5)*this.k,i=this.Loa();return e*(this.h/this.l)+2/t*(M$o.sh(t*(2*i-e)/2)*M$o.sh(t*e/2))},d$w.prototype.Loa=function(){var e=8*Math.pow(10,-5)*this.k;return.5*this.l-1/e*M$o.arsh(this.h*e/2/M$o.sh(e*this.l/2))},i$q.prototype=new o$11,i$q.prototype.constructor=i$q,Object.defineProperties(i$q.prototype,{geoImagePath:{get:function(){return this.imagePath},set:function(e){"string"==typeof e&&(this.imagePath=e,this.billboard.image=e)}},geoWidth:{get:function(){return this.width},set:function(e){"number"==typeof e&&(this.width=e,this.billboard.width=e)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.billboard.height=e)}}}),i$q.prototype.init=function(){this.type=P$U.GEOBILLBOARD,this.height=100,this.width=100,this.imagePath="",this.billboard={image:"",width:100,height:100}},i$p.prototype=new o$11,i$p.prototype.constructor=i$p,Object.defineProperties(i$p.prototype,{geoLength:{get:function(){return this.length},set:function(e){"number"==typeof e&&(this.length=e,this.box.dimensions.x=e,this._isGeometryDirty=!0)}},geoWidth:{get:function(){return this.width},set:function(e){"number"==typeof e&&(this.width=e,this.box.dimensions.y=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.box.dimensions.z=e,this._isGeometryDirty=!0)}}}),i$p.prototype.init=function(e,t,i){this.type=P$U.GEOBOX,this.length=e,this.width=t,this.height=i,this.box={dimensions:new o$1p(e,t,i),vertexFormat:n$13.POSITION_NORMAL_AND_ST}},i$p.prototype.isValid=function(){return this.length>0&&this.width&&this.height>0},i$p.prototype._createGeometry=function(){let e=O$z.fromDimensions(this.box);this._geometry=O$z.createGeometry(e),this._isGeometryDirty=!1,this._vertexBuffer&&!this._vertexBuffer.isDestroyed()&&(this._vertexBuffer=this._vertexBuffer.destroy())},i$p.prototype.getCenter=function(){return new s$N(this.position.x,this.position.y,this.position.z+this.height/2)},i$p.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(24);t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,t[8]=4,t[9]=5,t[10]=5,t[11]=6,t[12]=6,t[13]=7,t[14]=7,t[15]=4,t[16]=1,t[17]=5,t[18]=2,t[19]=6,t[20]=0,t[21]=4,t[22]=3,t[23]=7;let i=t$X.createIndexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),n=[];return n.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$13({context:e,attributes:n,indexBuffer:i})},i$o.prototype=new o$11,i$o.prototype.constructor=i$o,Object.defineProperties(i$o.prototype,{geoRadius:{get:function(){return this.radius},set:function(e){"number"==typeof e&&(this.radius=e,this.ellipse.semiMinorAxis=e,this.ellipse.semiMajorAxis=e)}}}),i$o.prototype.init=function(e){this.type=P$U.GEOCIRCLE3D,this.radius=e,this.ellipse={semiMinorAxis:e,semiMajorAxis:e}},i$o.prototype.isValid=function(){return this.radius>0},i$o.prototype.getCenter=function(){return new Point3D(this.position.x,this.position.y,this.position.z)},r$q.prototype=new o$11,r$q.prototype.constructor=r$q,Object.defineProperties(r$q.prototype,{geoBottomRadius:{get:function(){return this.bottomRadius},set:function(e){"number"==typeof e&&(this.bottomRadius=e,this.cylinder.bottomRadius=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.cylinder.length=e,this._isGeometryDirty=!0)}},rotateOrigin:{get:function(){return this._rotateOrigin},set:function(e){o$1q.typeOf.number("GeoCone rotateOrigin",e),this._rotateOrigin=e}}}),r$q.prototype.init=function(e,t){this.type=P$U.GEOCONE,this.height=t,this.bottomRadius=e,this.cylinder={length:t,topRadius:0,bottomRadius:e,vertexFormat:n$13.POSITION_NORMAL_AND_ST}},r$q.prototype.clone=function(){return new r$q(this.bottomRadius,this.height)},r$q.prototype._createGeometry=function(){var e=new l$Q(this.cylinder);this._geometry=l$Q.createGeometry(e),this._vertex=o$1p.fromDegrees(this.position.x,this.position.y,this.position.z+this.height/2),this._isGeometryDirty=!1},r$q.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(768),i=0;for(let e=0;e<256;e+=2)t[i++]=e,t[i++]=e+1,t[i++]=e,t[i++]=e+2,t[i++]=e+1,t[i++]=e+3;t[i-1]=1;let n=t$X.createIndexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),r=[];return r.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$13({context:e,attributes:r,indexBuffer:n})},i$n.prototype=new o$11,i$n.prototype.constructor=i$n,Object.defineProperties(i$n.prototype,{geoTopRadius:{get:function(){return this.topRadius},set:function(e){"number"==typeof e&&(this.topRadius=e,this.cylinder.topRadius=e,this._isGeometryDirty=!0)}},geoBottomRadius:{get:function(){return this.bottomRadius},set:function(e){"number"==typeof e&&(this.bottomRadius=e,this.cylinder.bottomRadius=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.cylinder.length=e,this._isGeometryDirty=!0)}}}),i$n.prototype.init=function(e,t,i){this.type=P$U.GEOCYLINDER,this.height=i,this.topRadius=e,this.bottomRadius=t,this.cylinder={length:i,topRadius:e,bottomRadius:t,vertexFormat:n$13.POSITION_NORMAL_AND_ST}},i$n.prototype.clone=function(){return new i$n(this.topRadius,this.bottomRadius,this.height)},i$n.prototype._createGeometry=function(){var e=new l$Q(this.cylinder);this._geometry=l$Q.createGeometry(e),this._isGeometryDirty=!1},i$n.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(768),i=0;for(let e=0;e<256;e+=2)t[i++]=e,t[i++]=e+1,t[i++]=e,t[i++]=e+2,t[i++]=e+1,t[i++]=e+3;t[i-1]=1;let n=t$X.createIndexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),r=[];return r.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$13({context:e,attributes:r,indexBuffer:n})},i$m.prototype=new o$11,i$m.prototype.constructor=i$m,Object.defineProperties(i$m.prototype,{geoXAxis:{get:function(){return this.xAxis},set:function(e){"number"==typeof e&&(this.xAxis=e,this.ellipsoid.radii.x=e,this._isGeometryDirty=!0)}},geoYAxis:{get:function(){return this.yAxis},set:function(e){"number"==typeof e&&(this.yAxis=e,this.ellipsoid.radii.z=e,this._isGeometryDirty=!0)}},geoZAxis:{get:function(){return this.zAxis},set:function(e){"number"==typeof e&&(this.zAxis=e,this.ellipsoid.radii.y=e,this._isGeometryDirty=!0)}}}),i$m.prototype.init=function(e,t,i){this.type=P$U.GEOELLIPSOID,this.xAxis=e,this.yAxis=t,this.zAxis=i,this.ellipsoid={radii:new o$1p(e,i,t),vertexFormat:n$13.POSITION_NORMAL_AND_ST}},i$m.prototype.isValid=function(){return this.xAxis>0&&this.yAxis&&this.zAxis>0},i$m.prototype.getCenter=function(){return new s$N(this.position.x,this.position.y,this.position.z+this.zAxis)},i$m.prototype._createGeometry=function(){var e=new b$O(this.ellipsoid);this._geometry=b$O.createGeometry(e),this._isGeometryDirty=!1},i$m.prototype.getOutlineVertexArray=function(e){this._getGeometry();let t=0,i=new Uint16Array(17956);for(let e=0;e<67;e++){var n=67*e;for(let e=0;e<66;e++)i[t++]=n+e,i[t++]=n+e+1}for(let e=0;e<67;e++)for(let n=0;n<65;n++)i[t++]=67+e+67*n,i[t++]=67+e+67*(n+1);let r=t$X.createIndexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),o=[];return o.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$13({context:e,attributes:o,indexBuffer:r})},t$i.prototype=new o$11,t$i.prototype.constructor=t$i,t$i.prototype.parent=o$11.prototype,Object.defineProperties(t$i.prototype,{geoFilePath:{get:function(){return this.modelUrl},set:function(e){"string"==typeof e&&(this.modelUrl=e)}},geoModel:{get:function(){return this._geoModel},set:function(e){this._geoModel=e}}}),t$i.prototype.init=function(){this.modelUrl="",this._geoModel=void 0,this.type=P$U.GEOMODEL3D},e$r.prototype=new o$11,e$r.prototype.constructor=e$r,e$r.prototype.parent=o$11.prototype,Object.defineProperties(e$r.prototype,{X:{get:function(){return this.x},set:function(e){"number"==typeof e&&(this.x=e)}},Y:{get:function(){return this.y},set:function(e){"number"==typeof e&&(this.y=e)}},Z:{get:function(){return this.z},set:function(e){"number"==typeof e&&(this.z=e)}}}),e$r.prototype.init=function(e){this.x=u$Z(e.x,0),this.y=u$Z(e.y,0),this.z=u$Z(e.z,0),this.type=P$U.GEOPOINT3D},e$q.prototype=new o$11,e$q.prototype.constructor=e$q,Object.defineProperties(e$q.prototype,{geoRadius:{get:function(){return this.radius},set:function(e){"number"==typeof e&&(this.radius=e,this.ellipsoid.radii.x=e,this.ellipsoid.radii.y=e,this.ellipsoid.radii.z=e,this.sphere.radius=e,this._isGeometryDirty=!0)}}}),e$q.prototype.init=function(e){this.type=P$U.GEOSPHERE,this.radius=e,this.ellipsoid={radii:new o$1p(e,e,e)},this.sphere={radius:e,vertexFormat:n$13.POSITION_NORMAL_AND_ST}},e$q.prototype.isValid=function(){return this.radius>0},e$q.prototype.getCenter=function(){return new s$N(this.position.x,this.position.y,this.position.z+this.radius)},e$q.prototype._createGeometry=function(){var e=new n$u(this.sphere);this._geometry=n$u.createGeometry(e),this._isGeometryDirty=!1},e$q.prototype.getOutlineVertexArray=function(e){this._getGeometry();let t=0,i=new Uint16Array(17956);for(let e=0;e<67;e++){var n=67*e;for(let e=0;e<66;e++)i[t++]=n+e,i[t++]=n+e+1}for(let e=0;e<67;e++)for(let n=0;n<65;n++)i[t++]=67+e+67*n,i[t++]=67+e+67*(n+1);let r=t$X.createIndexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),o=[];return o.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$13({context:e,attributes:o,indexBuffer:r})};var xe$8=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function S$m(e,t){if(!e$2e(e)||!e$2e(t))throw new t$15("No viewer or box provided.");if(!e$2e(t.box))throw new t$15("Expected object to be a box.");this.handler=new g$K(e.scene.canvas),this.viewer=e,this.editEvt=new o$1h,this._distanceDisplayCondition=void 0,this._id=e$1T(),re$c(this,t),te$a(this),this.activate()}function re$c(e,t){e.box=t,e.hpr=de$8(t),e.center=t.position.getValue(0),e.dimensions=t.box.dimensions.getValue(0),e._rotateCircleRadius=Math.max(Math.min(e.dimensions.x,e.dimensions.y)/7,.01),e._unifiedMoveBarLength=Math.max(Math.max(Math.max(e.dimensions.x,e.dimensions.y),e.dimensions.z)/6,.1),e._movePolygonDimension=e._rotateCircleRadius/2,e._moveBarXLength=e._unifiedMoveBarLength,e._moveBarYLength=e._unifiedMoveBarLength,e._moveBarZLength=e._unifiedMoveBarLength,e.isActive=!1,e._color=e$1X.WHITE.withAlpha(.1),e._lineColor=e$1X.fromCssColorString("rgba(250, 158, 62, 1)"),e._outlineColor=e$1X.fromCssColorString("rgba(1, 107, 185, 1)"),e._lineWidth=5,e._modelMatrix=m$19.headingPitchRollToFixedFrame(e.center,e.hpr),e._modelMatrixInverse=p$1d.inverse(e._modelMatrix,new p$1d),e._hoverColor=e$1X.RED,e._linesHover=[]}function de$8(e){if(!e$2e(e.orientation))return new i$16;var t=p$1e.fromQuaternion(e.orientation.getValue(0),new p$1e),i=p$1d.fromRotationTranslation(t,o$1p.ZERO,new p$1d),n=p$1d.inverse(m$19.eastNorthUpToFixedFrame(e.position.getValue(0)),new p$1d),r=p$1d.multiply(n,i,new p$1d),o=p$1d.getMatrix3(r,new p$1e);return i$16.fromQuaternion(n$15.fromRotationMatrix(o))}function te$a(e){var t=e;t.positions=be$a(t),t.polylines=new J$T({opaqueRS:d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}),modelMatrix:e._modelMatrix}),t.translucentPolylines=new J$T({translucentRS:d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}}),modelMatrix:e._modelMatrix}),t.translucentPolylines._canAlwaysPick=!0;for(var i=0;i<7;i++)t.polylines.add({id:"box-editor-prim"+i+e._id,width:t._lineWidth,positions:e.positions[i],material:r$Y.fromType(r$Y.ColorType,{color:t._lineColor})});for(i=0;i<7;i++)t.translucentPolylines.add({id:"box-editor-prim"+i+e._id,width:t._lineWidth,positions:e.positions[i],material:r$Y.fromType(r$Y.ColorType,{color:t._lineColor.withAlpha(.2)})});t.boundingBox=Be$8(t,"edit_box"),t.viewer.entities.add(t.boundingBox),t.viewer.scene.primitives.add(t.polylines),t.viewer.scene.primitives.add(t.translucentPolylines),t._polygon=new Z$k(t),t.viewer.scene.primitives.add(t._polygon)}function Z$k(e){this.editor=e,this.show=!0,this._color=e$1X.clone(e._lineColor),this._isCustomPolygon=!0}function ke$6(e,t,i){var n=new P$H({polygonHierarchy:{positions:e.positions[7]}}),r=P$H.createGeometry(n),o=p$1d.clone(e._modelMatrix);if(e.viewer.scene.mode===C$14.COLUMBUS_VIEW){var a=new n$1d,s=a.ellipsoid.cartesianToCartographic(e.center),l=a.project(s);p$1d.fromTranslation(l,o),p$1d.multiply(xe$8,o,o)}let u=[];var c=t$X.createVertexBuffer({context:t,typedArray:S$14.createTypedArray(S$14.FLOAT,r.attributes.position.values),usage:A$18.STATIC_DRAW});u.push({index:0,vertexBuffer:c,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1,name:"aPosition"});var h=new c$13({context:t,attributes:u,indexBuffer:t$X.createIndexBuffer({context:t,typedArray:r.indices,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})}),d=r$14.fromCache({name:"boxEditor",context:t,vertexShaderSource:"attribute vec4 aPosition;\nuniform vec4 uColor;\nuniform vec4 uPickColor;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n vColor = uColor;\n vPickColor = uPickColor;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",fragmentShaderSource:"varying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n gl_FragColor = vColor;\n}\n",attributeLocations:{aPosition:0}}),f=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:o,pass:Le$q.OPAQUE,owner:i});f.vertexArray=h,f.shaderProgram=d;var p={id:"box-editor-prim7"+e._id,primitive:i},_=t.createPickId(p);f.pickId="vPickColor",f.uniformMap={uColor:function(){return i._color},uPickColor:function(){return _.color}},f.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var m=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:o,pass:Le$q.OPAQUE+1,owner:i});m.vertexArray=h,m.shaderProgram=d;var g={id:"box-editor-prim7"+e._id,primitive:i},x=t.createPickId(g);m.pickId="vPickColor",m.uniformMap={uColor:function(){return i._color.withAlpha(.2)},uPickColor:function(){return x.color}},m.renderState=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),i._colorCommandAlpha=m,i._colorCommand=f}function be$a(e){var t=[];t.push([new o$1p(0,0,e.dimensions.z/2),new o$1p(0,0,e.dimensions.z/2+e._moveBarZLength)]),t.push([new o$1p(0,0,-e.dimensions.z/2),new o$1p(0,0,-e.dimensions.z/2-e._moveBarZLength)]),t.push([new o$1p(e.dimensions.x/2,0,0),new o$1p(e.dimensions.x/2+e._moveBarXLength,0,0)]),t.push([new o$1p(-e.dimensions.x/2,0,0),new o$1p(-e.dimensions.x/2-e._moveBarXLength,0,0)]),t.push([new o$1p(0,e.dimensions.y/2,0),new o$1p(0,e.dimensions.y/2+e._moveBarYLength,0)]),t.push([new o$1p(0,-e.dimensions.y/2,0),new o$1p(0,-e.dimensions.y/2-e._moveBarYLength,0)]);for(var i=Me$9(e._rotateCircleRadius,64),n=0;n<i.length;n++)i[n].z=e.dimensions.z/2;t.push(i);var r=e._movePolygonDimension;return t.push([new o$1p(r,r,.505*e.dimensions.z+.01),new o$1p(-r,r,.505*e.dimensions.z+.01),new o$1p(-r,-r,.505*e.dimensions.z+.01),new o$1p(r,-r,.505*e.dimensions.z+.01)]),t}function Me$9(e,t){var i=[];const n=2*Math.PI/t;for(var r=0;r<t+1;r++){var o=new o$1p,a=n*r;o.x=e*Math.sin(a),o.y=e*Math.cos(a),i.push(o)}return i}function Be$8(e,t){var i=m$19.headingPitchRollQuaternion(e.center,e.hpr);return new h$W({id:t+e._id,position:new n$X((function(){return e.center}),!1),orientation:new n$X((function(){return i}),!1),box:{material:e._color,outline:!0,outlineWidth:2,outlineColor:e._outlineColor,dimensions:new n$X((function(){return e.dimensions}),!1)}})}Object.defineProperties(S$m.prototype,{distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2e(e)&&!(e instanceof r$Z))throw new t$15("Expected BoxEditor.distanceDisplayCondition to be type of DistanceDisplayCondition!");this._distanceDisplayCondition=e}},color:{get:function(){return this._color},set:function(e){this._color=e,this.boundingBox.box.material=e}},hoverColor:{get:function(){return this._hoverColor},set:function(e){this._hoverColor=e}}}),Object.defineProperties(Z$k.prototype,{color:{get:function(){return this._color},set:function(e){this._color=e,this.dirty=!0}}}),Z$k.prototype.update=function(e){(!this._colorCommand||this.dirty)&&(ke$6(this.editor,e.context,this),this.dirty=!1);var t=this.editor;if(e$2e(t._distanceDisplayCondition)&&t.isActive){var i=t.viewer.scene.camera.positionWC;if(e.mode===C$14.COLUMBUS_VIEW&&(i=m$19.convertTo3DCartesian(i)),o$1p.distance(t.center,i)<t._distanceDisplayCondition.far){t._polygon.show=!0;for(var n=0;n<t.polylines._polylines.length;n++)t.polylines._polylines[n].show=!0,t.translucentPolylines._polylines[n].show=!0}else{t._polygon.show=!1;for(n=0;n<t.polylines._polylines.length;n++)t.polylines._polylines[n].show=!1,t.translucentPolylines._polylines[n].show=!1}}var r=e._fboState.frameBufferType;this.show&&r==Qe$c.NORMAL&&(e.commandList.push(this._colorCommand),e.commandList.push(this._colorCommandAlpha))},Z$k.prototype.destroy=function(e){};var X$h=new o$1p,ae$b=new i$1d,se$8=new o$1p,Te$9=new o$1o,Ie$6=new o$1o,Ee$9=new f$19,Oe$a=new o$1p,Re$8=new o$1p,Ae$a=new f$19,Se$8=new o$1p,Le$8=new o$1p,Ve$6=new o$1m(o$1p.UNIT_X,0);function ze$5(e,t){t.endPosition,e.currentPickObject;var i=+e.currentPickObject.id.slice(15,16),n=e.viewer.camera,r=o$1o.clone(t.startPosition,Te$9),o=o$1o.clone(t.endPosition,Ie$6),a=o$1p.clone(o$1p.ZERO,Oe$a),s=o$1p.UNIT_X;(0===i||1===i)&&(s=o$1p.UNIT_Y);var l=m$19.convertToColumbusCartesian(e.center);e$2e(l)&&(a.x=l.x,(0===i||1===i)&&(a.y=l.y));var u=o$1m.fromPointNormal(a,s,Ve$6),c=n.getPickRay(r,Ee$9),h=g$1j.rayPlane(c,u,Re$8),d=n.getPickRay(o,Ae$a),f=g$1j.rayPlane(d,u,Se$8),p=o$1p.subtract(h,f,Le$8),_=p.x;if(p.x=p.y,p.y=p.z,p.z=_,o$1p.magnitude(p)>e$2d.EPSILON6&&(f=m$19.convertTo3DCartesian(f),e.currentPickPos=f),0===i||1===i){var m=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p),g=(T=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).z-m.z,x=new o$1p(0,0,g/2);1===i&&(x=new o$1p(0,0,-(g=m.z-T.z)/2)),e.dimensions.z+=g,e.dimensions.z<=0&&(g=0,e.dimensions.z=0,x=new o$1p(0,0,0)),e.positions[0][0].z+=g/2,e.positions[0][1].z+=g/2,e.positions[1][0].z-=g/2,e.positions[1][1].z-=g/2;for(var y=e.positions[6],v=0;v<y.length;v++)y[v].z+=g/2;var $=e.positions[7];for(v=0;v<$.length;v++)$[v].z+=g/2;p$1d.multiplyByPoint(e._modelMatrix,x,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(2===i||3===i){m=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var b=(T=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).x-m.x;x=new o$1p(b/2,0,0);3===i&&(x=new o$1p(-(b=m.x-T.x)/2)),e.dimensions.x+=b,e.dimensions.x<0&&(e.dimensions.x=0,x=new o$1p(0,0,0),b=0),e.positions[2][0].x+=b/2,e.positions[2][1].x+=b/2,e.positions[3][0].x-=b/2,e.positions[3][1].x-=b/2,p$1d.multiplyByPoint(e._modelMatrix,x,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(4===i||5===i){e.viewer.camera.getPickRay(t.endPosition);m=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var T,C=(T=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).y-m.y;x=new o$1p(0,C/2,0);5===i&&(x=new o$1p(0,-(C=m.y-T.y)/2,0)),e.dimensions.y+=C,e.dimensions.y<0&&(e.dimensions.y=0,x=new o$1p(0,0,0),C=0),e.positions[4][0].y+=C/2,e.positions[4][1].y+=C/2,e.positions[5][0].y-=C/2,e.positions[5][1].y-=C/2,p$1d.multiplyByPoint(e._modelMatrix,x,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}}function Ue$5(e,t){var i=t.endPosition;e.currentPickObject;var n=+e.currentPickObject.id.slice(15,16);if(0===n||1===n){var r=e.viewer.scene.camera,o=r.getPickRay(i),a=o$1o.fromElements(i.x+5,i.y,new o$1o),s=r.getPickRay(a),l=o$1p.normalize(o$1p.cross(o.direction,s.direction,se$8),se$8),u=o$1m.fromPointNormal(r.positionWC,l),c=new f$19(o$1p.ZERO,e.currentPickPos);e.currentPickPos=g$1j.rayPlane(c,u);var h=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p),d=(v=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).z-h.z,f=new o$1p(0,0,d/2);1===n&&(f=new o$1p(0,0,-(d=h.z-v.z)/2)),e.dimensions.z+=d,e.dimensions.z<=0&&(d=0,e.dimensions.z=0,f=new o$1p(0,0,0)),e.positions[0][0].z+=d/2,e.positions[0][1].z+=d/2,e.positions[1][0].z-=d/2,e.positions[1][1].z-=d/2;for(var p=e.positions[6],_=0;_<p.length;_++)p[_].z+=d/2;var m=e.positions[7];for(_=0;_<m.length;_++)m[_].z+=d/2;p$1d.multiplyByPoint(e._modelMatrix,f,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(2===n||3===n){c=e.viewer.camera.getPickRay(t.endPosition);var g=i$1d.unpack([0,0,0,o$1p.distance(e.lastPickPos,o$1p.ZERO)],0,ae$b),x=g$1j.raySphere(c,g);e.currentPickPos=f$19.getPoint(c,x.start);h=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var y=(v=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).x-h.x;f=new o$1p(y/2,0,0);3===n&&(f=new o$1p(-(y=h.x-v.x)/2)),e.dimensions.x+=y,e.dimensions.x<0&&(e.dimensions.x=0,f=new o$1p(0,0,0),y=0),e.positions[2][0].x+=y/2,e.positions[2][1].x+=y/2,e.positions[3][0].x-=y/2,e.positions[3][1].x-=y/2,p$1d.multiplyByPoint(e._modelMatrix,f,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(4===n||5===n){c=e.viewer.camera.getPickRay(t.endPosition),g=i$1d.unpack([0,0,0,o$1p.distance(e.lastPickPos,o$1p.ZERO)],0,ae$b),x=g$1j.raySphere(c,g);e.currentPickPos=f$19.getPoint(c,x.start);h=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var v,$=(v=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).y-h.y;f=new o$1p(0,$/2,0);5===n&&(f=new o$1p(0,-($=h.y-v.y)/2,0)),e.dimensions.y+=$,e.dimensions.y<0&&(e.dimensions.y=0,f=new o$1p(0,0,0),$=0),e.positions[4][0].y+=$/2,e.positions[4][1].y+=$/2,e.positions[5][0].y-=$/2,e.positions[5][1].y-=$/2,p$1d.multiplyByPoint(e._modelMatrix,f,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}}function Ne$7(e,t){var i=p$1d.multiplyByPoint(e._modelMatrix,e.positions[0][0],new o$1p),n=m$19.convertToColumbusCartesian(i),r=m$19.convertToColumbusCartesian(e.lastPickPos);r.x=n.x;var o=o$1p.subtract(r,n,new o$1p);e.tangent=o$1p.cross(o$1p.UNIT_X,o,new o$1p);var a=t.endPosition;o$1p.clone(e.lastPickPos,X$h);var s=e.viewer.camera.getPickRay(a),l=o$1m.fromPointNormal(n,o$1p.UNIT_X),u=g$1j.rayPlane(s,l),c=o$1p.subtract(r,n,new o$1p),h=o$1p.subtract(u,n,new o$1p),d=o$1p.dot(o$1p.normalize(c,c),o$1p.normalize(h,h)),f=Math.acos(d);o$1p.cross(o$1p.UNIT_X,c,e.tangent);var p=o$1p.dot(e.tangent,o$1p.subtract(u,r,new o$1p));f*=p=p<0?1:-1,e.hpr.heading+=f;var _=m$19.headingPitchRollQuaternion(e.center,e.hpr);e.boundingBox.orientation=_;var m=m$19.convertTo3DCartesian(u);o$1p.clone(m,e.lastPickPos)}function je$5(e,t){var i=p$1d.multiplyByPoint(e._modelMatrix,e.positions[0][0],new o$1p),n=o$1p.subtract(e.lastPickPos,i,new o$1p);e.tangent=o$1p.cross(o$1p.UNIT_Z,n,new o$1p);var r=t.endPosition,o=o$1p.clone(e.lastPickPos,X$h),a=e.viewer.camera.getPickRay(r),s=new i$1d(o$1p.ZERO,o$1p.distance(o,o$1p.ZERO)),l=g$1j.raySphere(a,s);o=f$19.getPoint(a,l.start);var u=o$1p.subtract(e.lastPickPos,i,new o$1p),c=o$1p.subtract(o,i,new o$1p),h=o$1p.dot(o$1p.normalize(u,u),o$1p.normalize(c,c)),d=Math.acos(h);o$1p.cross(o$1p.UNIT_Z,u,e.tangent);var f=o$1p.dot(e.tangent,o$1p.subtract(o,e.lastPickPos,new o$1p));d*=f=f<0?1:-1,e.hpr.heading+=d;var p=m$19.headingPitchRollQuaternion(e.center,e.hpr);e.boundingBox.orientation=p,o$1p.clone(o,e.lastPickPos)}function We$4(e,t){var i=t.endPosition;o$1p.clone(e.lastPickPos,X$h);var n=e.viewer.camera.getPickRay(i),r=m$19.convertToColumbusCartesian(e.lastPickPos),o=o$1m.fromPointNormal(r,o$1p.UNIT_X),a=g$1j.rayPlane(n,o),s=a.y-r.y,l=a.z-r.z,u=m$19.convertToColumbusCartesian(e.center);u.y+=s,u.z+=l,e.center=m$19.convertTo3DCartesian(u);var c=m$19.convertTo3DCartesian(a);o$1p.clone(c,e.lastPickPos)}function He$7(e,t){var i=t.endPosition,n=o$1p.clone(e.lastPickPos,X$h),r=e.viewer.camera.getPickRay(i),o=new i$1d(o$1p.ZERO,o$1p.distance(n,o$1p.ZERO)),a=g$1j.raySphere(r,o),s=f$19.getPoint(r,a.start),l=p$1d.multiplyByPoint(e._modelMatrixInverse,n,new o$1p),u=p$1d.multiplyByPoint(e._modelMatrixInverse,s,new o$1p),c=new o$1p(u.x-l.x,u.y-l.y,0);p$1d.multiplyByPoint(e._modelMatrix,c,e.center),o$1p.clone(s,e.lastPickPos)}function Fe$8(e){for(var t=0;t<e._linesHover.length;t++){var i=e._linesHover[t];i._isCustomPolygon?i.color=e._lineColor:i.material.uniforms.color.alpha<1?i.material=r$Y.fromType(r$Y.ColorType,{color:e._lineColor.withAlpha(.2)}):i.material=r$Y.fromType(r$Y.ColorType,{color:e._lineColor})}e._linesHover.length=0,e.viewer.scene.pickAsync(e.viewer.scene.screenSpaceCameraController._aggregator._currentMousePosition).then((t=>{var i=e.currentPickObject=t;if(i&&"string"==typeof i.id&&i.id.indexOf("box-editor-prim")>-1&&i.id.indexOf(e._id)>-1){var n=i.primitive._index;if(e$2e(n)){var r=e.polylines.get(n),o=e.translucentPolylines.get(n);r.material=r$Y.fromType(r$Y.ColorType,{color:e._hoverColor}),o.material=r$Y.fromType(r$Y.ColorType,{color:e._hoverColor.withAlpha(.2)}),e._linesHover.push(r),e._linesHover.push(o)}else i.primitive.color=e._hoverColor,e._linesHover.push(i.primitive)}}))}S$m.prototype.destroy=function(){this.viewer.scene.screenSpaceCameraController.enableInputs=!0,this.deactivate(),this.clear(),this.handler.destroy(),i$11(this)},S$m.prototype.activate=function(){if(!this.isActive){this.isActive=!0;for(var e=0;e<this.polylines._polylines.length;e++)this.polylines._polylines[e].show=!0,this.translucentPolylines._polylines[e].show=!0;var t=this;t.boundingBox.show=!0,t._polygon.show=!0,t.handler.setInputAction((function(e){t.viewer.scene.pickPositionAsync(e.position).then((e=>{t.startPickPos=e,t._isOperate=!1,e$2e(t.startPickPos)&&t.currentPickObject&&"string"==typeof t.currentPickObject.id&&t.currentPickObject.id.slice(-36)===t._id&&"box-editor"===t.currentPickObject.id.slice(0,10)&&(t._isOperate=!0,t.lastPickPos=o$1p.clone(t.startPickPos,new o$1p),t.currentPickPos=o$1p.clone(t.startPickPos,new o$1p))}))}),G$J.LEFT_DOWN),t.handler.setInputAction((function(e){if(t._isOperate){t.viewer.scene.screenSpaceCameraController.enableInputs=!1;var i=+t.currentPickObject.id.slice(15,16);i>=0&&i<6?t.viewer.scene.mode===C$14.COLUMBUS_VIEW?ze$5(t,e):Ue$5(t,e):6===i?t.viewer.scene.mode===C$14.COLUMBUS_VIEW?Ne$7(t,e):je$5(t,e):7===i&&(t.viewer.scene.mode===C$14.COLUMBUS_VIEW?We$4(t,e):He$7(t,e)),t._polygon.dirty=!0,t._modelMatrix=m$19.headingPitchRollToFixedFrame(t.center,t.hpr),t._modelMatrixInverse=p$1d.inverse(t._modelMatrix,t._modelMatrixInverse),t.polylines.modelMatrix=t._modelMatrix,t.translucentPolylines.modelMatrix=t._modelMatrix,t.box.orientation=new n$X((function(e,i){return t.boundingBox.orientation.getValue(0)}),!1),t.box.position=new n$X((function(e,i){return t.boundingBox.position.getValue(0)}),!1),t.box.box.dimensions=new n$X((function(e,i){return t.boundingBox.box.dimensions.getValue(0)}),!1),t.editEvt.raiseEvent({position:t.boundingBox.position.getValue(0),dimensions:t.boundingBox.box.dimensions.getValue(0),orientation:t.boundingBox.orientation.getValue(0)})}else Fe$8(t)}),G$J.MOUSE_MOVE),t.handler.setInputAction((function(e){t._isOperate=!1,t.viewer.scene.screenSpaceCameraController.enableInputs=!0,t.currentPickObject=void 0}),G$J.LEFT_UP)}},S$m.prototype.deactivate=function(){if(this.isActive){this.isActive=!1,this.boundingBox.show=!1,this._polygon.show=!1;for(var e=0;e<this.polylines._polylines.length;e++)this.polylines._polylines[e].show=!1,this.translucentPolylines._polylines[e].show=!1;this.handler.removeInputAction(G$J.LEFT_CLICK),this.handler.removeInputAction(G$J.MOUSE_MOVE),this.handler.removeInputAction(G$J.RIGHT_CLICK)}},S$m.prototype.clear=function(){this.polylines.removeAll(),this.viewer.scene.primitives.remove(this.polylines),this.polylines=void 0,this.translucentPolylines.removeAll(),this.viewer.scene.primitives.remove(this.translucentPolylines),this.viewer.scene.primitives.remove(this._polygon),this._polygon=void 0,this.translucentPolylines=void 0,this.viewer.entities.remove(this.boundingBox)},S$m.prototype.setEditObject=function(e){if(this.isActive){if(o$1q.typeOf.object("editObject",e),!e$2e(e.box))throw new t$15("Expected editObject to be a box.");var t=this.boundingBox.orientation.getValue(0),i=this.boundingBox.position.getValue(0),n=this.boundingBox.box.dimensions.getValue(0);this.box.orientation=new n$X((function(){return t}),!1),this.box.position=new n$X((function(){return i}),!1),this.box.box.dimensions=new n$X((function(){return n}),!1),re$c(this,e),this.deactivate(),this.clear(),te$a(this),this.activate()}};var e$p={Space:0,Ground:1,S3mModel:2,Raster:3,Both:4},l$p=Object.freeze(e$p),e$o={Point:0,Line:1,Polygon:2,Marker:3,Box:4},_0x1522bc=Object.freeze(e$o),e$n={POLYLINE:0,POLYGON:1,POLYGON_HOLE:2},C$q=Object.freeze(e$n),w$n=function(e,t,i){if(!e$2e(e)||!e$2e(t))throw new t$15("viewer and mode is required!");this.handler=new g$K(e.scene.canvas),this.viewer=e,this.mode=t,this._clampMode=u$Z(i,l$p.Space),this.isDrawing=!1,this.active=!1,this._drawEvt=new o$1h,this._activeEvt=new o$1h,this._enableDepthTest=!0,this.movingEvt=new o$1h,this.positions=[],this._positions=[],this._lineColor=e$1X.fromCssColorString("#51ff00"),this._lineWidth=3,this._lineMaterial=new t$P(this._lineColor)};function se$7(e,t){var i=t;if(i&&i.active){var n=i.viewer.scene;if(!n.pickPositionSupported)return void console.log("your browser not supported pickPosition!");n.pickPositionAsync(e.position).then((t=>{if(t)if(i.isDrawing){var n=new o$1o(e.position.x,e.position.y);switch(i.mode){case _0x1522bc.Line:X$g(n,i,!0);break;case _0x1522bc.Polygon:Y$h(n,i,!0)}}else switch(i.isDrawing=!0,i.positions.length=0,i.positions.push(t.clone()),i.mode){case _0x1522bc.Point:ae$a(t,i);break;case _0x1522bc.Line:F$j(t,i);break;case _0x1522bc.Polygon:le$c(t,i);break;case _0x1522bc.Marker:ce$c(t,i)}i.mode===_0x1522bc.Box&&he$9(t,i)}))}}function ae$a(e,t){var i=t;e$2e(i.points)?i.point.position=e:(i.points=new D$s({depthTestEnabled:!1}),i.point=i.points.add({position:e,pixelSize:10,color:e$1X.WHITE}),i.viewer.scene.primitives.add(i.points)),i.deactivate(),i.drawEvt.raiseEvent({object:i.point})}function F$j(e,t){var i=t;if(i._positions=[e,e],e$2e(i.polyline))i.polyline.show=!0;else{var n=i._clampMode>0,r=i._clampMode<l$p.S3mModel?_0x2b86ba.TERRAIN:i._clampMode<l$p.Both?_0x2b86ba.S3M_TILE:_0x2b86ba.BOTH;i.polyline=i.viewer.entities.add({polyline:{positions:new n$X((function(){return e$2e(i.polygon)?i._positions.concat([i._positions[0]]):i._positions}),!1),width:i._lineWidth,material:i._lineMaterial,clampToGround:n,classificationType:r}})}}function le$c(e,t){var i=t;if(i._positions=[e,e],F$j(e,t),e$2e(i.polygon))i.polygon.show=!0,i.polyline.show=!0,e$2e(i.rasterPolygon)&&i.viewer.scene.rasterVectorCollection.remove(i.rasterPolygon),e$2e(i.rasterPolylines)&&i.viewer.scene.rasterVectorCollection.remove(i.rasterPolylines);else{var n=l$p.Space===i._clampMode,r=i._clampMode<l$p.S3mModel?_0x2b86ba.TERRAIN:i._clampMode<l$p.Both?_0x2b86ba.S3M_TILE:_0x2b86ba.BOTH;i.polygon=i.viewer.entities.add({polygon:{hierarchy:new n$X((function(){return{positions:i._positions,holes:[]}}),!1),material:e$1X.ORANGE.withAlpha(.5),perPositionHeight:n,classificationType:r},depthTestEnabled:i._enableDepthTest})}}function ce$c(e,t){var i=t;a$18.fromCartesian(e).height,e$2e(i.marker)?i.marker.position=e:(i.markers=new w$O,i.marker=i.markers.add({position:e,image:n$17("Assets/Textures/maki/grepin.png"),verticalOrigin:S$Q.BOTTOM,scale:.5}),i.viewer.scene.primitives.add(i.markers)),i.deactivate(),i.drawEvt.raiseEvent({object:i.marker})}function he$9(e,t){e$2e(t.boxConfig)||(t.boxConfig={leftClickTimes:0,scratchPosition:new o$1p,length:0,width:0,height:0}),e$2e(t.boxes)||(t.boxes=[]);var i=t.boxConfig;if(0!==i.leftClickTimes||e$2e(e))if(i.leftClickTimes++,i.firstPoint=e,1===i.leftClickTimes)i.enu=m$19.eastNorthUpToFixedFrame(e),i.enuInverse=p$1d.inverse(i.enu,new p$1d),o$1p.clone(e,i.scratchPosition),t.box=i.entity=t.viewer.entities.add({position:new n$X((function(){return i.scratchPosition}),!1),box:{dimensions:new n$X((function(e,t){return(t=t||new o$1p(i.length,i.width,i.height)).x=i.length,t.y=i.width,t.z=i.height,t}),!1),material:e$1X.fromCssColorString("rgba(0, 160, 233, 0.5)"),outline:!0,outlineColor:e$1X.BLACK}}),t.boxes.push(t.box),i.box=i.entity.box;else if(2===i.leftClickTimes){var n=p$1d.multiplyByPoint(i.enuInverse,i.scratchPosition,new o$1p);o$1p.multiplyByScalar(n,2,n),i.secondPoint=p$1d.multiplyByPoint(i.enu,n,n)}}function pe$c(e,t){var i=t;if(i&&i.active&&i.isDrawing){var n=new o$1o(e.endPosition.x,e.endPosition.y);switch(i.mode){case _0x1522bc.Line:X$g(n,i,!1);break;case _0x1522bc.Polygon:Y$h(n,i,!1);break;case _0x1522bc.Box:ve$9(n,i)}}i.movingEvt.raiseEvent(new o$1o(e.endPosition.x,e.endPosition.y))}function X$g(e,t,i){var n=t;n.viewer.scene.pickPositionAsync(e).then((e=>{if(e$2e(e)){var t=n._positions.length;1==i?(n._positions[t]=e,n.positions.push(e.clone())):n._positions[t-1]=e}}))}function Y$h(e,t,i){var n=t;n.viewer.scene.pickPositionAsync(e).then((e=>{if(e$2e(e)){var t=n._positions.length;1==i?(n.positions.push(e.clone()),n._positions[t]=e):n._positions[t-1]=e}}))}Object.defineProperties(w$n.prototype,{drawEvt:{get:function(){return this._drawEvt}},activeEvt:{get:function(){return this._activeEvt}},clampMode:{get:function(){return this._clampMode},set:function(e){if(this._clampMode!==l$p.Raster&&e!==l$p.Raster){if(e$2e(e)&&e!=this._clampMode){if(this._clampMode=e,e$2e(this.polyline)&&e$2e(this.polyline.polyline)){var t=e!==l$p.Space,i=this._clampMode<l$p.S3mModel?_0x2b86ba.TERRAIN:this._clampMode<l$p.Both?_0x2b86ba.S3M_TILE:_0x2b86ba.BOTH;this.polyline.polyline.clampToGround=t,this.polyline.polyline.classificationType=i}if(e$2e(this.polygon)){var n=l$p.Space===this._clampMode;i=this._clampMode<l$p.S3mModel?_0x2b86ba.TERRAIN:this._clampMode<l$p.Both?_0x2b86ba.S3M_TILE:_0x2b86ba.BOTH;this.polygon.polygon.perPositionHeight=n,this.polygon.polygon.classificationType=i}}}else this._clampMode=l$p.Raster}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){this._enableDepthTest=e}},lineColor:{get:function(){return this._lineColor},set:function(e){if(o$1q.defined("lineColor value",e),!(e instanceof e$1X))throw new t$15("lineColor must be a instance of Color.");this._lineColor=e,this._lineMaterial=new t$P(e),e$2e(this.polyline)&&(this.polyline.polyline.material=new t$P(e))}},lineWidth:{get:function(){return this._lineWidth},set:function(e){o$1q.typeOf.number("handlerLineWidth",e),e!=this._lineWidth&&(this._lineWidth=e,e$2e(this.polyline)&&(this.polyline.polyline.width=e))}},lineMaterial:{get:function(){return this._lineMaterial},set:function(e){if(o$1q.defined("handlerLineMatrial value",e),e instanceof r$Y){let t=e.type,i=e.uniforms;t===r$Y.ColorType?this._lineMaterial=new t$P(i.color):t===r$Y.PolylineArrowType?this._lineMaterial=new t$n(i.color):t===r$Y.PolylineDashType?this._lineMaterial=new o$A(i):t===r$Y.PolylineOutlineType&&(this._lineMaterial=new e$y(i))}else this._lineMaterial=e;e$2e(this.polyline)&&(this.polyline.polyline.material=this._lineMaterial)}}}),w$n.prototype.activate=function(){if(1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){se$7(t,e)}),G$J.LEFT_CLICK),this.handler.setInputAction((function(t){pe$c(t,e)}),G$J.MOUSE_MOVE),this.handler.setInputAction((function(t){ye$7(t,e)}),G$J.RIGHT_CLICK),this.activeEvt.raiseEvent(!0)}},w$n.prototype.deactivate=function(){this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(G$J.LEFT_CLICK),this.handler.removeInputAction(G$J.MOUSE_MOVE),this.handler.removeInputAction(G$J.RIGHT_CLICK),this.activeEvt.raiseEvent(!1)},w$n.prototype.clear=function(){if(this.deactivate(),this.positions.length=0,this._positions.length=0,e$2e(this.rasterPolylines)&&(this.viewer.scene.rasterVectorCollection.remove(this.rasterPolylines),this.rasterPolylines=void 0),e$2e(this.rasterPolygon)&&(this.viewer.scene.rasterVectorCollection.remove(this.rasterPolygon),this.rasterPolygon=void 0),e$2e(this.polygon)&&(this.viewer.entities.remove(this.polygon),this.polygon=void 0),e$2e(this.polyline)&&(this.viewer.entities.remove(this.polyline),this.polyline=void 0),e$2e(this.points)&&(this.points.removeAll(),this.viewer.scene.primitives.remove(this.points),this.points=void 0),e$2e(this.markers)&&(this.viewer.scene.primitives.remove(this.markers),this.markers=void 0,e$2e(this.marker)&&(this.marker=void 0)),e$2e(this.corridor)&&this.viewer.entities.remove(this.corridor),e$2e(this.boxes)){for(var e=0,t=this.boxes.length;e<t;e++)this.viewer.entities.remove(this.boxes[e]);this.boxes=void 0,this.box=void 0,this.boxConfig=void 0}};var fe$9=new o$1p,I$t=new o$1p,Z$j=new o$1o,me$d=new i$1d;function ve$9(e,t,i){var n=t.boxConfig;if(e$2e(n))if(1==n.leftClickTimes)if(t.viewer.scene.mode===C$14.COLUMBUS_VIEW){var r=(y=t.viewer.scene.camera).getPickRay(e),o=m$19.convertToColumbusCartesian(n.firstPoint);e$2e(n.first)||(n.first=o$1p.clone(n.firstPoint));var a=o$1m.fromPointNormal(o,o$1p.UNIT_X);if(!e$2e(h=g$1j.rayPlane(r,a)))return;a$18.fromCartesian(n.firstPoint);var s=m$19.convertTo3DCartesian(h);n.second=o$1p.clone(s),s=a$18.fromCartesian(s);var l=Math.cos(s.latitude);n.ratio=l,s=a$18.toCartesian(s),h=m$19.convertToColumbusCartesian(s),n.scratchPosition=o$1p.midpoint(h,o,new o$1p),n.scratchPosition=m$19.convertTo3DCartesian(n.scratchPosition),n.length=Math.abs(h.y-o.y)*l,n.width=Math.abs(h.z-o.z),n.height=0}else{r=t.viewer.camera.getPickRay(e);var u=i$1d.unpack([0,0,0,o$1p.distance(n.firstPoint,o$1p.ZERO)],0,me$d),c=g$1j.raySphere(r,u),h=f$19.getPoint(r,c.start),d=p$1d.multiplyByPoint(n.enuInverse,h,fe$9);d.z=0,n.scratchPosition=p$1d.multiplyByPoint(n.enu,o$1p.divideByScalar(d,2,d),n.scratchPosition),p$1d.multiplyByPoint(n.enuInverse,n.scratchPosition,d),n.length=2*(d.x>0?d.x:-d.x),n.width=2*(d.y>0?d.y:-d.y),n.height=0}else if(n.leftClickTimes>1)if(t.viewer.scene.mode===C$14.COLUMBUS_VIEW){var f=(y=t.viewer.scene.camera).getPickRay(e),p=o$1o.fromElements(e.x+5,e.y,Z$j),_=y.getPickRay(p),m=o$1p.normalize(o$1p.cross(f.direction,_.direction,I$t),I$t),g=(a=o$1m.fromPointNormal(y.positionWC,m),m$19.convertToColumbusCartesian(n.second));g.x=.1;r=new f$19(g,o$1p.UNIT_X);var x=g$1j.rayPlane(r,a);if(!e$2e(x))return;o=m$19.convertToColumbusCartesian(n.first);n.scratchPosition=o$1p.midpoint(o,x,new o$1p),n.scratchPosition=m$19.convertTo3DCartesian(n.scratchPosition),n.secondPoint=m$19.convertTo3DCartesian(x),n.height=Math.abs(o.x-x.x)}else{var y;f=(y=t.viewer.scene.camera).getPickRay(e),p=o$1o.fromElements(e.x+5,e.y,Z$j),_=y.getPickRay(p),m=o$1p.normalize(o$1p.cross(f.direction,_.direction,I$t),I$t),a=o$1m.fromPointNormal(y.positionWC,m),r=new f$19(o$1p.ZERO,n.secondPoint);n.secondPoint=g$1j.rayPlane(r,a);var v=p$1d.multiplyByPoint(n.enuInverse,n.secondPoint,new o$1p);o$1p.divideByScalar(v,2,v),p$1d.multiplyByPoint(n.enu,v,n.scratchPosition),n.length=2*(v.x>0?v.x:-v.x),n.width=2*(v.y>0?v.y:-v.y),n.height=2*(v.z>0?v.z:-v.z)}}var V$k=0;function ye$7(e,t){var i=t;if(i&&i.active&&i.isDrawing){if(i.deactivate(),i.mode===_0x1522bc.Box)return t.boxConfig=void 0,void i.drawEvt.raiseEvent({object:i.box,positions:i._positions});if(!e$2e(i.polyline))return;if(i._positions=i._positions.slice(0,i._positions.length-1),i.mode===_0x1522bc.Polygon){if(i._positions.length<3)return void(i._positions.length=0);var n=[].concat(i._positions);if(i.polygon.positions=n,l$p.Raster===i._clampMode){i._positions.length=0,e$2e(i.polyline)&&(i.polyline.show=!1),e$2e(i.polygon)&&(i.polygon.show=!1);for(var r=[],o=0;o<n.length;o++)r.push(a$18.fromCartesian(n[o]));V$k+=1,i.rasterPolygon=V$k,i.viewer.scene.rasterVectorCollection.add({name:i.rasterPolygon,pickId:i.rasterPolygon,positions:r,fillColor:e$1X.ORANGE.withAlpha(.5),geometryType:C$q.POLYGON});var a=[];for(o=0;o<r.length;o++)a.push(r[o]);a.push(r[0]),i.rasterPolylines=V$k,i.viewer.scene.rasterVectorCollection.add({name:i.rasterPolylines,pickId:i.rasterPolylines,positions:a,lineColor:e$1X.fromCssColorString("#51ff00"),lineWidth:3,geometryType:C$q.POLYLINE}),i.drawEvt.raiseEvent({object:n,positions:i.positions})}else i.drawEvt.raiseEvent({object:i.polygon,positions:i.positions})}else i.mode===_0x1522bc.Line&&(i.polyline.positions=i._positions,i.drawEvt.raiseEvent({object:i.polyline,positions:i.positions}))}}w$n.prototype.getLinePositions=function(){return e$2e(this.polyline)?this.polyline.positions:[]};var w$m="referencePoint",I$s="referenceAddPoint",_$l=function(e,t){if(!e$2e(e)||!e$2e(t))throw new t$15("viewer and mode is required!");this.handler=new g$K(e.scene.canvas),this.viewer=e,this.active=!1,this.referencePointColor=e$1X.WHITE,this.editPointColor=e$1X.VIOLET,this.setEditObject(t),this._editZ=!1,this._changedEvt=new o$1h};function C$p(e,t){if(!e.scene.pickRasterData(t.position).isS3MTilesLayerSel)return e.scene.pickAsync(t.position).then((e=>{if(e$2e(e)){var t=u$Z(e.id,e.primitive.id);if(t instanceof h$W)return Promise.resolve(t);if(e$2e(e.primitive))return Promise.resolve(e)}}))}function K$h(e,t){var i=t;i&&i.active&&C$p(i.viewer,e).then((e=>{if(e$2e(e)){var t=e.id;if(!e$2e(t))return;var n=t.split("_");2==n.length&&n[0]===w$m&&(i._editPointIndex=parseInt(n[1]),i._editPoint=e.primitive,i._editPoint.color=i.editPointColor,i.viewer.scene._screenSpaceCameraController.enableRotate=!1)}}))}function G$o(e,t){var i=t;i&&i.active&&i._editPoint&&(i._editPointIndex=-1,e$2e(i._editPoint)&&(i._editPoint.color=i.referencePointColor,i._editPoint=void 0),i.viewer.scene._screenSpaceCameraController.enableRotate=!0,i._changedEvt.raiseEvent(t._positions))}function N$h(e,t){var i=t;if(i&&i.active&&i._editPointIndex>-1&&i.viewer.scene._screenSpaceCameraController._aggregator._isDown[0]){var n,r=new o$1o(e.endPosition.x,e.endPosition.y),o=i._polyline,a=i._polygon,s=!0;if(e$2e(o)&&(s=o.clampToGround instanceof e$1L?o.clampToGround._value:o.clampToGround),e$2e(a)&&(s=!a.perPositionHeight),s)n=i.viewer.scene.pickPosition(r);else if(i._editZ){var l=i.viewer.camera.getPickRay(r),u=new o$1o(r.x+5,r.y),c=i.viewer.camera.getPickRay(u),h=new o$1p;h=o$1p.cross(l.direction,c.direction,h);var d=new o$1p;o$1p.normalize(h,d);var f=o$1m.fromPointNormal(i.viewer.camera.position,d),p=new f$19(o$1p.ZERO,i._editPoint.position);n=g$1j.rayPlane(p,f)}else{p=i.viewer.camera.getPickRay(r);var _=new i$1d(o$1p.ZERO,o$1p.distance(i._editPoint.position,o$1p.ZERO)),m=g$1j.raySphere(p,_);n=f$19.getPoint(p,m.start)}i._editPoint.position=n;var g=i._positions;g[i._editPointIndex]=n,e$2e(o)&&(o.positions=new n$X((function(){return g}),!1)),e$2e(a)&&(a.hierarchy=new n$X((function(){return{positions:g,holes:[]}}),!1)),i.refreshReferenceAddPoint()}}function q$k(e,t){var i=t;i&&i.active&&C$p(i.viewer,e).then((e=>{if(e$2e(e)){var t=e.id;if(!e$2e(t))return;var n=t.split("_");if(2==n.length&&n[0]===I$s){var r=parseInt(n[1]),o=i._addPositions[r];(u=i._positions).splice(r+1,0,o);var a=i._polyline;e$2e(a)&&(a.positions=new n$X((function(){return u}),!1));var s=i._polygon;if(e$2e(s)){var l=new n$X((function(){return u}),!1),u=s.hierarchy.getValue(0);Array.isArray(u)?s.hierarchy=l:s.hierarchy.positions=l}i.refreshReferencePoint(),i.refreshReferenceAddPoint()}}}))}function j$m(e,t){var i=t;i&&i.active&&C$p(i.viewer,e).then((e=>{if(e$2e(e)){var t=e.id;if(!e$2e(t))return;var n=t.split("_");if(2==n.length&&n[0]===w$m){var r=parseInt(n[1]),o=i._positions;o.splice(r,1);var a=i._polyline;e$2e(a)&&(a.positions=new n$X((function(){return o}),!1));var s=i._polygon;e$2e(s)&&(s.hierarchy=new n$X((function(){return o}),!1)),i.refreshReferencePoint(),i.refreshReferenceAddPoint()}}}))}Object.defineProperties(_$l.prototype,{isEditZ:{get:function(){return this._editZ},set:function(e){this._editZ=e}},changedEvt:{get:function(){return this._changedEvt}}}),_$l.prototype.setEditObject=function(e){if(e$2e(e._polygon)||e$2e(e._polyline)){if(this.clear(),this._editObject=e,this._polygon=e._polygon,e$2e(this._polygon)){var t=this._polygon.hierarchy.getValue(0);if(!Array.isArray(t)){if(!Array.isArray(t.positions))throw new t$15("positions is required!");t=t.positions}if(this._polygon.classificationType&&(this._polygon.classificationType===_0x2b86ba.BOTH||this._polygon.classificationType===_0x2b86ba.TERRAIN)||!e$2e(this._polygon.height)&&!e$2e(this._polygon.extrudedHeight)&&e$2e(this._polygon.perPositionHeight)&&!this._polygon.perPositionHeight.getValue()){for(var i=[],n=0;n<t.length;n++){var r=a$18.fromCartesian(t[n]);r.height=this.viewer.scene.globe.getHeight(r),i.push(a$18.toCartesian(r))}this._positions=i}else this._positions=t}this._polyline=e._polyline,e$2e(this._polyline)&&(this._positions=this._polyline.positions.getValue(0)),this._editPoints=this.viewer.scene.primitives.add(new w$O({depthTestEnable:!1}));for(n=0;n<this._positions.length;n++)this._editPoints.add({id:w$m+"_"+n,position:this._positions[n],image:n$17("Assets/Textures/vertex-edit.png")});this._editPointIndex=-1,this._editPoint=void 0,this._addPositions=[],this._addPoints=this.viewer.scene.primitives.add(new w$O({depthTestEnable:!1}));for(n=0;n<this._positions.length-1;n++){var o=new o$1p;o$1p.add(this._positions[n],this._positions[n+1],o),o$1p.multiplyByScalar(o,.5,o),this._addPositions.push(o)}if(e$2e(this._polygon)){o=new o$1p;o$1p.add(this._positions[0],this._positions[this._positions.length-1],o),o$1p.multiplyByScalar(o,.5,o),this._addPositions.push(o)}for(n=0;n<this._addPositions.length;n++)this._addPoints.add({id:I$s+"_"+n,position:this._addPositions[n],image:n$17("Assets/Textures/middle-edit.png")});this.activate()}},_$l.prototype.activate=function(){if(1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){K$h(t,e)}),G$J.LEFT_DOWN),this.handler.setInputAction((function(t){G$o(t,e)}),G$J.LEFT_UP),this.handler.setInputAction((function(t){N$h(t,e)}),G$J.MOUSE_MOVE),this.handler.setInputAction((function(t){q$k(t,e)}),G$J.LEFT_CLICK),this.handler.setInputAction((function(t){j$m(t,e)}),G$J.RIGHT_CLICK)}},_$l.prototype.deactivate=function(){this.active=!1,this.handler.removeInputAction(G$J.LEFT_DOWN),this.handler.removeInputAction(G$J.LEFT_UP),this.handler.removeInputAction(G$J.MOUSE_MOVE),this.handler.removeInputAction(G$J.LEFT_CLICK),this.handler.removeInputAction(G$J.RIGHT_CLICK)},_$l.prototype.clear=function(){this.deactivate(),e$2e(this._editPoints)&&this._editPoints.removeAll(),e$2e(this._editPointIndex)&&(this._editPointIndex=-1),e$2e(this._editPoint)&&(this._editPoint=void 0),e$2e(this._editObject)&&(this._editObject=void 0),e$2e(this._polygon)&&(this._polygon=void 0),e$2e(this._polyline)&&(this._polyline=void 0),e$2e(this._addPoints)&&this._addPoints.removeAll(),e$2e(this._addPositions)&&(this._addPositions.length=0),e$2e(this._positions)&&(this._positions=void 0)},_$l.prototype.refreshReferencePoint=function(){e$2e(this._editPoints)&&this._editPoints.removeAll(),this._editPoints=this.viewer.scene.primitives.add(new w$O({depthTestEnable:!1}));for(var e=0;e<this._positions.length;e++)this._editPoints.add({id:w$m+"_"+e,position:this._positions[e],image:n$17("Assets/Textures/vertex-edit.png")});e$2e(this._editPointIndex)&&(this._editPointIndex=-1),e$2e(this._editPoint)&&(this._editPoint=void 0)},_$l.prototype.refreshReferenceAddPoint=function(){e$2e(this._addPoints)&&this._addPoints.removeAll(),this._addPositions=[],this._addPoints=this.viewer.scene.primitives.add(new w$O({depthTestEnable:!1}));for(var e=0;e<this._positions.length-1;e++){var t=new o$1p;o$1p.add(this._positions[e],this._positions[e+1],t),o$1p.multiplyByScalar(t,.5,t),this._addPositions.push(t)}if(e$2e(this._polygon)){t=new o$1p;o$1p.add(this._positions[0],this._positions[this._positions.length-1],t),o$1p.multiplyByScalar(t,.5,t),this._addPositions.push(t)}for(e=0;e<this._addPositions.length;e++)this._addPoints.add({position:this._addPositions[e],id:I$s+"_"+e,image:n$17("Assets/Textures/middle-edit.png")})};var e$m={Distance:0,Area:1,DVH:2,DVHX:3},_0x3c1870=Object.freeze(e$m),T$n=function(e,t,i,n){if(!e$2e(e)||!e$2e(t))throw new t$15("viewer and mode is required!");this.handler=new g$K(e.scene.canvas),this.viewer=e,this._clampMode=u$Z(i,l$p.Space),this.mode=t,this.isDrawing=!1,this.active=!1,this.tmpEntities=[],this._areaLabel=void 0,this._disLabel=void 0,this._vLabel=void 0,this._hLabel=void 0,this._measureEvt=new o$1h,this._activeEvt=new o$1h,this._enableDepthTest=!1,this._labelBackgroundColor=e$1X.fromCssColorString("rgba(38, 38, 38, 0.85)"),this._labelPixelOffsetScaleByDistance=new o$Y(150,3,15e6,.5),this._labelPixelOffset=new o$1o(15,0),this._lineColor=e$1X.fromCssColorString("#51ff00"),this._fillColor=e$1X.ORANGE.withAlpha(.5),this._lineWidth=2,this._dblclickListener=void 0,this._showMeasureResult=u$Z(n,!0),this._lineDisplayType=J$U.NON_OCCLUDED,this._lineMaterial=new t$P(this._lineColor)};function Le$7(e,t){var i=t;if(i&&i.active){var n=i.viewer.scene;n.pickPositionAsync(e.position).then((t=>{!e$2e(t)&&n.mode===C$14.SCENE2D&&(t=n.camera.pickEllipsoid(e.position));var r=n.pickPointEnabled?u$Z(o$1p.clone(n.pickPoint),t):t;if(r)if(i.isDrawing)if(i.mode==_0x3c1870.DVH||i.mode==_0x3c1870.DVHX)i.deactivate();else{var o=r;if(i&&i.active&&i.isDrawing&&e$2e(o))switch(i.mode){case _0x3c1870.Distance:ae$9(o,i);break;case _0x3c1870.Area:re$b(o,i);break;case _0x3c1870.DVH:pe$b(o,i)}Te$8(r,i)}else switch(i.isDrawing=!0,i.mode){case _0x3c1870.Distance:Pe$7(r,i);break;case _0x3c1870.Area:Se$7(r,i);break;case _0x3c1870.DVH:Oe$9(r,i);break;case _0x3c1870.DVHX:Ae$9(r,i)}}))}}function Me$8(e,t){var i=t,n=i.viewer.scene;n.pickPositionAsync(e.endPosition).then((t=>{!e$2e(t)&&n.mode===C$14.SCENE2D&&(t=n.camera.pickEllipsoid(e.endPosition));var r=n.pickPointEnabled?u$Z(o$1p.clone(n.pickPoint),t):t;if(i&&i.active&&i.isDrawing&&e$2e(r))switch(i.mode){case _0x3c1870.Distance:ae$9(r,i);break;case _0x3c1870.Area:re$b(r,i);break;case _0x3c1870.DVH:pe$b(r,i)}}))}function De$9(e,t){var i=t;i.viewer.scene.pickPositionAsync(e.position).then((e=>{if(i&&i.active&&i.isDrawing){var n;if(i.deactivate(),e$2e(i.polyline)&&(i.mode===_0x3c1870.Distance?(n=i._accumulationPositions,1===i.polyline.positions.length&&i.viewer.entities.remove(i.spEntity)):(i.mode===_0x3c1870.Area?i.polyline.positions.push(i.polyline.positions[0]):i.polyline.positions=i.polyline.positions.slice(0,i.polyline.positions.length-1),1===i.polyline.positions.length&&i.viewer.entities.remove(i.spEntity),n=i.polyline.positions),i.viewer.entities.remove(i.epEntity),!e$2e(i.polygon))){i.polylinePositions=n,i._disLabel.position=n[n.length-1];var r=0;if(t._clampMode===l$p.Ground)r=He$6(i.viewer.scene,i._accumulationPositions);else for(var o=0,a=n.length-1;o<a;o++)r+=o$1p.distance(n[o],n[o+1]);i._disLabel.show=!0,i.measureEvt.raiseEvent({distance:r.toFixed(8),positions:n})}if(e$2e(i.polygon)){if(n.length<3){i._areaLabel.show=!1,i.viewer.entities.remove(i.spEntity);for(o=0,a=i.tmpEntities.length;o<a;o++)i.viewer.entities.remove(i.tmpEntities[o]);i.tmpEntities.length=0,i.viewer.entities.remove(i.epEntity),i.polyline.positions.length=0}if(i._areaLabel.show=!0,(i._clampMode==l$p.Ground||i._clampMode==l$p.S3mModel)&&(i.polyline.show=!0),i.polygonPositions=i.polyline.positions,i.polygon.show=!0,n.length>2){if(i._clampMode!==l$p.Ground)i._areaLabel.position=i.polyline.positions[i.polyline.positions.length-1];else{var s=i.tmpEntities[i.tmpEntities.length-1]._position._value;i._areaLabel.position=s}if(i._clampMode===l$p.Ground){var l=xe$7(i.viewer.scene,i.polyline.positions);return void i.measureEvt.raiseEvent({area:l.toFixed(8),positions:n})}var u,c,h,d=A$1f.triangulate(n),f=d.length/3,p=0;for(o=0;o<f;o++)u=n[d[3*o]],c=n[d[3*o+1]],h=n[d[3*o+2]],E$r=o$1p.subtract(c,u,E$r),C$o=o$1p.subtract(h,u,C$o),L$o=o$1p.cross(E$r,C$o,L$o),p+=.5*o$1p.magnitude(L$o);i.measureEvt.raiseEvent({area:p.toFixed(8),positions:n})}}}}))}function Te$8(e,t){var i=t;i.mode===_0x3c1870.Distance?(i.polyline.positions.push(e),i._accumulationPositions.push(e)):(i.mode===_0x3c1870.Area&&(i._accumulationArea=i._currentArea),i.polyline.positions.pop(),i.polyline.positions.push(e),i.polyline.positions.push(i.polyline.positions[0])),e$2e(i.polygon)&&(i.polygonPositions=i.polyline.positions),i.tmpEntities.push(i.viewer.entities.add({show:i._showMeasureResult,position:e,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}))}Object.defineProperties(T$n.prototype,{activeEvt:{get:function(){return this._activeEvt}},measureEvt:{get:function(){return this._measureEvt}},disLabel:{get:function(){return this._disLabel}},areaLabel:{get:function(){return this._areaLabel}},hLabel:{get:function(){return this._hLabel}},vLabel:{get:function(){return this._vLabel}},clampMode:{get:function(){return this._clampMode},set:function(e){e$2e(e)&&e!=this._clampMode&&(this._clampMode=e,e$2e(this.polygon)&&(e==l$p.Space?(this.polygon.polygon.perPositionHeight.setValue(!0),this.polygon.clampToS3M=!1):e==l$p.Ground?(this.polygon.polygon.perPositionHeight.setValue(!1),this.polygon.clampToS3M=!1):e==l$p.S3mModel&&(this.polygon.polygon.perPositionHeight.setValue(!1),this.polygon.clampToS3M=!0)),e$2e(this.polyline)&&(e==l$p.Ground?this.polyline._polyline.clampToGround=!0:this.polyline._polyline.clampToGround=!1))}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){console.warn("MeasureHandler.enableDepthTest is deprecated, use MeasureHandler.lineDisplayType instead."),o$1q.typeOf.bool("MeasureHandler.enableDepthTest",e),this._enableDepthTest=e,this._lineDisplayType=e?J$U.OCCLUDED:J$U.NON_OCCLUDED}},capturePointSize:{get:function(){return this.viewer._capturePointSize},set:function(e){this.viewer._capturePointSize=e}},capturePointColor:{get:function(){return this.viewer._capturePointColor},set:function(e){this.viewer._capturePointColor=e}},lineColor:{get:function(){return this._lineColor},set:function(e){if(o$1q.defined("lineColor value",e),!(e instanceof e$1X))throw new t$15("lineColor must be a instance of Color.");this._lineColor=e,this._lineMaterial=new t$P(e),e$2e(this.polyline)&&(this.polyline.polyline.material=new t$P(e))}},fillColor:{get:function(){return this._fillColor},set:function(e){this._fillColor=e}},lineWidth:{get:function(){return this._lineWidth},set:function(e){o$1q.typeOf.number("handlerLineWidth",e),e!=this._lineWidth&&(this._lineWidth=e,e$2e(this.polyline)&&(this.polyline.polyline.width=e))}},lineDisplayType:{get:function(){return this._lineDisplayType},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("MeasureHandler.lineDisplayType",e,0),o$1q.typeOf.number.lessThanOrEquals("MeasureHandler.lineDisplayType",e,2),this._lineDisplayType=e,this.polylines&&(this.polylines.lineDisplayType=e)}},points:{get:function(){return this.tmpEntities}},lineMaterial:{get:function(){return this._lineMaterial},set:function(e){if(o$1q.defined("handlerLineMatrial value",e),e instanceof r$Y){let t=e.type,i=e.uniforms;t===r$Y.ColorType?this._lineMaterial=new t$P(i.color):t===r$Y.PolylineArrowType?this._lineMaterial=new t$n(i.color):t===r$Y.PolylineDashType?this._lineMaterial=new o$A(i):t===r$Y.PolylineOutlineType&&(this._lineMaterial=new e$y(i))}else this._lineMaterial=e;e$2e(this.polyline)&&(this.polyline.polyline.material=this._lineMaterial)}}}),T$n.prototype.activate=function(){if(this.mode!==_0x3c1870.DVH&&this.clear(),1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){Le$7(t,e)}),G$J.LEFT_CLICK),this.handler.setInputAction((function(t){Me$8(t,e)}),G$J.MOUSE_MOVE),this.handler.setInputAction((function(t){De$9(t,e)}),G$J.RIGHT_CLICK),this.activeEvt.raiseEvent(!0),this._dblclickListener=this.viewer.screenSpaceEventHandler.getInputAction(G$J.LEFT_DOUBLE_CLICK),this.viewer.screenSpaceEventHandler.removeInputAction(G$J.LEFT_DOUBLE_CLICK)}},T$n.prototype.deactivate=function(){!0===this.active&&this.activeEvt.raiseEvent(!1),this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(G$J.LEFT_CLICK),this.handler.removeInputAction(G$J.MOUSE_MOVE),this.handler.removeInputAction(G$J.RIGHT_CLICK),e$2e(this._dblclickListener)&&(this.viewer.screenSpaceEventHandler.setInputAction(this._dblclickListener,G$J.LEFT_DOUBLE_CLICK),this._dblclickListener=void 0)},T$n.prototype.clear=function(){this.deactivate();for(var e=0,t=this.tmpEntities.length;e<t;e++)this.viewer.entities.remove(this.tmpEntities[e]);if(this.tmpEntities.length=0,e$2e(this.polylines)&&(this.polylines.removeAll(),this.viewer.scene.primitives.remove(this.polylines),this.polylines=void 0),e$2e(this.spEntity)&&(this.viewer.entities.remove(this.spEntity),this.spEntity=void 0),e$2e(this.epEntity)&&(this.viewer.entities.remove(this.epEntity),this.epEntity=void 0),e$2e(this.fpEntity)&&(this.viewer.entities.remove(this.fpEntity),this.fpEntity=void 0),e$2e(this.labels))switch(this.mode){case _0x3c1870.Distance:this.labels.remove(this._disLabel);break;case _0x3c1870.Area:this.labels.remove(this._areaLabel);break;case _0x3c1870.DVH:this.labels.removeAll()}e$2e(this.polygon)&&(this.viewer.entities.remove(this.polygon),this.polygon=void 0),e$2e(this.polyline)&&this.viewer.entities.remove(this.polyline)};var E$r=new o$1p,C$o=new o$1p,L$o=new o$1p;function re$b(e,t){var i=t;if(e$2e(e)){i.endPoint=e;var n=i.polyline.positions,r=n.length;if(r>3?(n[r-2]=e,n.pop()):n[r-1]=e,r>2&&(e$2e(i._areaLabel)&&(i._areaLabel.show=!0),i.polygonPositions=n),i.polyline.positions=n,n.length>2){var o;if(i.epEntity.position=e,i._areaLabel.position=e,i._areaLabel.show=t._clampMode!==l$p.Ground,i.polyline.positions.push(i.polyline.positions[0]),t._clampMode===l$p.Ground)return;o=T$n.computeArea(n),i.measureEvt.raiseEvent({area:o.toFixed(8),positions:n})}}}function Se$7(e,t){var i=t;i.polygonPositions=[],i.polylineCoord=[e,e],i.tmpEntities.length=0;var n=i._enableDepthTest;i.polyline=i.viewer.entities.add({polyline:{positions:new n$X((function(){return i.polylineCoord}),!1),width:i._lineWidth,material:i._lineMaterial,loop:!0,clampToGround:i._clampMode===l$p.Ground}}),i.polyline.positions=i.polylineCoord,i.spEntity=i.viewer.entities.add({position:e,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}});var r=i.viewer.scene.primitives.add(new g$W({depthTestEnable:!1}));i._areaLabel=r.add({position:e,font:"100 20px SimSun",fillColor:e$1X.WHITE,style:R$S.FILL_AND_OUTLINE,showBackground:!0,outlineWidth:1,outlineColor:e$1X.BLUE,pixelOffset:i._labelPixelOffset,text:"",show:i._showMeasureResult,horizontalOrigin:j$V.LEFT});var o=i._clampMode,a=!1,s=!1;o==l$p.Space?a=!0:o==l$p.S3mModel&&(s=!0),i.polygon=i.viewer.entities.add({polygon:{hierarchy:new n$X((function(){return{positions:JSON.parse(JSON.stringify(i.polygonPositions)),holes:[]}}),!1),material:i._fillColor,perPositionHeight:a},clampToS3M:s,depthTestEnabled:n,show:!0}),i.labels=r,t._clampMode===l$p.Ground&&(i.polyline.show=!0),i._areaLabel.show=!1,i.tmpEntities.push(i.spEntity)}function Pe$7(e,t){var i=t;i.polylinePositions=[e,e],i.polyline=i.viewer.entities.add({polyline:{positions:new n$X((function(){return i.polylinePositions}),!1),width:i._lineWidth,material:i._lineMaterial,clampToGround:t._clampMode===l$p.Ground}}),i.polyline.positions=i.polylinePositions,i.tmpEntities.length=0,i._accumulationPositions=[e],i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}});var n=i.viewer.scene.primitives.add(new g$W({depthTestEnable:!1}));i._disLabel=n.add({position:e,font:"100 20px SimSun",fillColor:e$1X.WHITE,style:R$S.FILL_AND_OUTLINE,showBackground:!0,backgroundColor:i._labelBackgroundColor,outlineWidth:1,outlineColor:e$1X.BLUE,pixelOffset:i._labelPixelOffset,text:"",show:i._showMeasureResult,horizontalOrigin:j$V.LEFT}),i.labels=n,i.tmpEntities.push(i.spEntity)}function ae$9(e,t){var i=t;i.endPoint=e;var n=i.polyline.positions,r=n.length;i.polylinePositions=n,n[r-1]=e,i.polyline.positions=n,i.epEntity.position=e;var o=0,a=i._accumulationPositions.concat([e]);if(i.polyline._distance=o,i._disLabel.position=e,i._disLabel.show=t._clampMode!==l$p.Ground,t._clampMode!==l$p.Ground){for(var s=0,l=a.length-1;s<l;s++)o+=o$1p.distance(a[s],a[s+1]);i.measureEvt.raiseEvent({distance:o.toFixed(8),positions:a})}}function Oe$9(e,t){var i=t;if(!e$2e(i.polylines)){var n=i._enableDepthTest;i.polylines=new J$T({opaqueRS:d$1m.fromCache({depthMask:n,depthTest:{enabled:n}}),lineDisplayType:i._lineDisplayType}),i.viewer.scene.primitives.add(i.polylines)}i.horizontalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$Y.fromType(r$Y.ColorType,{color:i._lineColor})}),i.verticalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$Y.fromType(r$Y.ColorType,{color:i._lineColor})}),i.dirPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$Y.fromType(r$Y.ColorType,{color:i._lineColor})}),i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}),i.fpEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}),i.tmpEntities.push(i.spEntity),i.tmpEntities.push(i.epEntity),i.tmpEntities.push(i.fpEntity),e$2e(i.labels)||(i.labels=i.viewer.scene.primitives.add(new g$W({depthTestEnable:!1}))),i._disLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:R$S.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1X.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$V.LEFT}),i._vLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:R$S.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1X.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$V.LEFT}),i._hLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:R$S.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1X.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$V.LEFT});var r=new o$1p;o$1p.normalize(e,r),i.plane=o$1m.fromPointNormal(e,r),i.startPoint=e,i.startHeight=a$18.fromCartesian(e).height,i.normal=r;var o=new o$1p;o$1p.negate(r,o),i.negateNormal=o,i.spEntity.position=e}function Ae$9(e,t){var i=t;if(!e$2e(i.polylines)){i.polylines=new J$T,i.verticalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$Y.fromType(r$Y.ColorType,{color:i._lineColor})}),i.startPoint=e,i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}),i.fpEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}});var n=i.viewer.scene.primitives.add(new g$W({depthTestEnable:!1}));i._vLabel=n.add({position:e,font:"500 16px sans-serif",style:R$S.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1X.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$V.LEFT}),i.viewer.scene.primitives.add(i.polylines),i.labels=n}i.startPoint=e,i.spEntity.position=e}var ke$5=new o$1p;function pe$b(e,t){var i=t;if(i.viewer.scene,e$2e(e)){i.endPoint=e;var n,r,o=a$18.fromCartesian(e).height;if(o>i.startHeight){var a=o$1p.normalize(e,ke$5);n=o$1m.fromPointNormal(e,a),r=new f$19(i.startPoint,a)}else n=i.plane,r=new f$19(e,i.normal);var s=g$1j.rayPlane(r,n);if(e$2e(s)||(r=new f$19(e,i.normal),s=g$1j.rayPlane(r,i.plane))){o>i.startHeight?(i.horizontalPolyline.positions=[e,s],i.verticalPolyline.positions=[i.startPoint,s]):(i.horizontalPolyline.positions=[i.startPoint,s],i.verticalPolyline.positions=[e,s]),i.dirPolyline.positions=[i.startPoint,e],i.epEntity.position=e,i.fpEntity.position=s;var l=o$1p.distance(i.startPoint,e).toFixed(8),u=o$1p.distance(i.startPoint,s).toFixed(8),c=o$1p.distance(e,s).toFixed(8);o>i.startHeight?(o$1p.lerp(i.startPoint,e,.5,i._disLabel.position),o$1p.lerp(i.startPoint,s,.5,i._vLabel.position),o$1p.lerp(e,s,.5,i._hLabel.position)):(o$1p.lerp(i.startPoint,e,.5,i._disLabel.position),o$1p.lerp(e,s,.5,i._vLabel.position),o$1p.lerp(i.startPoint,s,.5,i._hLabel.position),u=o$1p.distance(e,s).toFixed(8),c=o$1p.distance(i.startPoint,s).toFixed(8)),i.measureEvt.raiseEvent({distance:l,directionalPositions:i.dirPolyline.positions,verticalHeight:u,verticalPositions:i.verticalPolyline.positions,horizontalDistance:c,horizontalPositions:i.horizontalPolyline.positions,endHeight:o})}}}function xe$7(e,t){for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=0;a<t.length;a++){var s=a$18.fromCartesian(t[a]);i=Math.min(s.longitude,i),n=Math.max(s.longitude,n),r=Math.min(s.latitude,r),o=Math.max(s.latitude,o)}for(var l=a$18.toCartesian(new a$18(i,r,0)),u=a$18.toCartesian(new a$18(n,o,0)),c=o$1p.angleBetween(l,u),h=U$18.fromPositions({positions:t,granularity:c/32}),d=U$18.createGeometry(h),f=0,p={},_=0;_<d.indices.length;_+=3){var m,g=d.indices[_];if(e$2e(p[g]))m=p[g];else{m=new o$1p(d.attributes.position.values[3*g],d.attributes.position.values[3*g+1],d.attributes.position.values[3*g+2]);var x=a$18.fromCartesian(m),y=e.globe.getHeight(x);if(!e$2e(y))continue;x=a$18.fromRadians(x.longitude,x.latitude,y),m=a$18.toCartesian(x),p[g]=o$1p.clone(m)}var v,$=d.indices[_+1];if(e$2e(p[$]))v=p[$];else{v=new o$1p(d.attributes.position.values[3*$],d.attributes.position.values[3*$+1],d.attributes.position.values[3*$+2]);var b=a$18.fromCartesian(v),T=e.globe.getHeight(b);if(!e$2e(T))continue;b=a$18.fromRadians(b.longitude,b.latitude,T),v=a$18.toCartesian(b),p[$]=o$1p.clone(v)}var C,S=d.indices[_+2];if(e$2e(p[S]))C=p[S];else{C=new o$1p(d.attributes.position.values[3*S],d.attributes.position.values[3*S+1],d.attributes.position.values[3*S+2]);var w=a$18.fromCartesian(C),E=e.globe.getHeight(w);if(!e$2e(E))continue;w=a$18.fromRadians(w.longitude,w.latitude,E),C=a$18.toCartesian(w),p[S]=o$1p.clone(C)}E$r=o$1p.subtract(v,m,E$r),C$o=o$1p.subtract(C,m,C$o),L$o=o$1p.cross(E$r,C$o,L$o),f+=.5*o$1p.magnitude(L$o)}return f}function He$6(e,t){for(var i=0,n=[],r=t.length-1,o=0;o<r;o++){var a=t[o],s=t[o+1],l=o$1p.angleBetween(a,s);if(!(l<e$2d.EPSILON10))for(var u=l/64,c=e$2d.chordLength(u,6378137),h=y$Z.subdivideLine(a,s,c,n),d=o$1p.unpackArray(h),f=d.length-1,p=0;p<f;p++){var _=d[p],m=a$18.fromCartesian(_),g=e.globe.getHeight(m);m=a$18.fromRadians(m.longitude,m.latitude,g);var x=a$18.toCartesian(m),y=d[p+1];m=a$18.fromCartesian(y),g=e.globe.getHeight(m),m=a$18.fromRadians(m.longitude,m.latitude,g);var v=a$18.toCartesian(m);i+=o$1p.distance(x,v)}}return i}T$n.computeArea=function(e){for(var t,i,n,r=A$1f.triangulate(e),o=r.length/3,a=0,s=0;s<o;s++)t=e[r[3*s]],i=e[r[3*s+1]],n=e[r[3*s+2]],E$r=o$1p.subtract(i,t,E$r),C$o=o$1p.subtract(n,t,C$o),L$o=o$1p.cross(E$r,C$o,L$o),a+=.5*o$1p.magnitude(L$o);return a},T$n.prototype.getLinePositions=function(){return e$2e(this.polyline)?this.polyline.positions:[]};var l$o={LINE_X:1,LINE_Y:2,LINE_Z:3,CIRCLE_X:4,CIRCLE_Y:5,CIRCLE_Z:6,SCALE_LINE_X:7,SCALE_LINE_Y:8,SCALE_LINE_Z:9,UNIFORM_SCALE:10},U$l={ENTITY:1,S3MINSTANCE:2},q$j=new o$1p,J$f=new o$1p,K$g=new o$1p,de$7=new o$1p,I$r=new o$1p;new p$1d;var Te$7=new o$1p,Y$g=new p$1e,me$c=new n$15,g$v=new p$1d,Re$7=new p$1d,Ae$8=new p$1d,be$9=new o$1p,Ze$5=new o$1p,Oe$8=new o$1p,Ue$4=new o$1p,S$l=new i$16,Ye$4=new p$1d;new o$1p;var $$h=new o$1p;function z$n(e,t){for(var i=e.attributes.position.values,n=0,r=i.length;n<r;n+=3)i[n+2]+=t}function De$8(e,t,i){var n=p$1d.getMatrix3(e,Y$g),r=n$15.fromRotationMatrix(n,me$c),o=p$1e.fromQuaternion(r,Y$g),a=p$1d.fromRotationTranslation(o,o$1p.ZERO,Ye$4),s=p$1d.inverse(t,g$v),l=p$1d.multiply(s,a,g$v),u=p$1d.getMatrix3(l,Y$g);return p$1d.fromRotationTranslation(u,o$1p.ZERO,i)}function ve$8(e,t){return p$1d.getMatrix3(e,Y$g),n$15.fromRotationMatrix(Y$g,t),t}function b$v(e,t,i,n){var r=e.getPickRay(t),o=o$1m.fromPointNormal(i,n);return g$1j.rayPlane(r,o)}function We$3(e,t,i){var n=[],r=t$X.createVertexBuffer({context:e,typedArray:S$14.createTypedArray(S$14.FLOAT,i.attributes.position.values),usage:A$18.STATIC_DRAW});n.push({name:"aPosition",index:0,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var o=new c$13({context:e,attributes:n,indexBuffer:t$X.createIndexBuffer({context:e,typedArray:i.indices,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})}),a=r$14.fromCache({name:"modelEditor",context:e,vertexShaderSource:"attribute vec4 aPosition;\nuniform vec4 uColor;\nuniform vec4 uPickColor;\nuniform float uScale;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n vColor = uColor;\n vPickColor = uPickColor;\n mat4 scaleMatrix;\n scaleMatrix[0] = vec4(uScale, 0.0, 0.0, 0.0);\n scaleMatrix[1] = vec4(0.0, uScale, 0.0, 0.0);\n scaleMatrix[2] = vec4(0.0, 0.0, uScale, 0.0);\n scaleMatrix[3] = vec4(0.0, 0.0, 0.0, 1.0);\n gl_Position = czm_modelViewProjection * scaleMatrix * vec4(aPosition.xyz, 1.0);\n}",fragmentShaderSource:"varying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n gl_FragColor = vColor;\n}\n",attributeLocations:{aPosition:0}}),s=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:t._modelMatrix,pass:Le$q.LOG_DEPTH_OVERLAY,owner:t});s.vertexArray=o,s.shaderProgram=a;var l={id:t._id,primitive:t},u=e.createPickId(l);s.pickId="vPickColor",s.uniformMap={uColor:function(){return t._uColor},uPickColor:function(){return u.color},uScale:function(){return t._scaleAdjusted}},s.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var c=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:t._modelMatrix,pass:Le$q.OPAQUE+2,owner:t});c.vertexArray=o,c.shaderProgram=a;var h={id:t._id+"#2",primitive:t},d=e.createPickId(h);c.pickId="vPickColor",c.uniformMap={uColor:function(){return t._uColor.withAlpha(.2)},uPickColor:function(){return d.color},uScale:function(){return t._scaleAdjusted}},c.renderState=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),t._commands.push(c),t._commands.push(s)}var Be$7=new n$15;function Xe$4(e,t){var i=t.modelMatrix,n=o$1p.negate(e._offset,K$g),r=p$1d.fromTranslation(n,Ae$8),o=m$19.eastNorthUpToFixedFrame(e._position,void 0,Re$7),a=De$8(i,o,g$v),s=ve$8(a,Be$7);p$1d.multiply(o,p$1d.multiply(a,r,a),g$v);var l=p$1d.getTranslation(g$v,Te$7);ke$4(e,l,ve$8(g$v,me$c),t.nonUniformScaleAddition,t.uniformScaleAddition,r),Fe$7(e,l,s,t.nonUniformScaleAddition,t.uniformScaleAddition)}function ke$4(e,t,i,n,r,o){if(e._modelType===U$l.ENTITY){e._model.model._offsetMatrix=o,e._model.position=t,e._model.orientation=i;var a=n;n||(a=o$1p.clone(o$1p.ZERO)),r&&(a.x+=r,a.y+=r,a.z+=r),e._model.model.scale||(e._model.model.scale=o$1p.clone(o$1p.UNIT_XYZ));var s=e._model.model.scale.getValue(0);s instanceof o$1p?(o$1p.add(a,s,a),e._model.model.scale=a):(a.x+=s,a.y+=s,a.z+=s,e._model.model.scale=a)}}function Fe$7(e,t,i,n,r){if(e._modelType===U$l.S3MINSTANCE){e._model.updatePosition(t);var o=i$16.fromQuaternion(i);e._model.updateRotation(o);var a=o$1p.clone(e._model.scale);e$2e(r)&&(a.x+=r,a.y+=r,a.z+=r),e$2e(n)&&o$1p.add(a,n,a),e._model.updateScale(a)}}function D$k(e,t){e.prototype.__proto__=Object.create(t.prototype),e.prototype.__proto__.constructor=e}function E$q(e){this._owner=e.owner,this._color=e$1X.clone(u$Z(e.color,e$1X.WHITE)),this._hoverColor=e$1X.clone(u$Z(e.hoverColor,e$1X.WHITE)),this._uColor=e$1X.clone(this._color),this._visible=u$Z(e.visible,!0),this._scale=u$Z(e.scale,o$1p.UNIT_XYZ),this._initTransition=u$Z(e.transition,new o$1p),this._initHpr=u$Z(e.headingPitchRoll,new i$16),this._initModelMatrix=p$1d.clone(p$1d.IDENTITY),this._initModelMatrixInverse=p$1d.clone(p$1d.IDENTITY),this._modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._id=u$Z(e.id,e$1T()),this._typeForModelEditor=u$Z(e.type,-1),this._commands=[],this._geometries=[],this._updateMatrix(),this._setChangeEvt(),this._adjustAxisLength=void 0,this._scaleAdjusted=1}function je$4(e,t){return function(i){if(!(e$2e(i)&&i<.05)){var n=150*Ge$4(e,t._owner._model._position||t._owner._model._position._value);t._scaleAdjusted=Math.max(n/10,1),t._scaleAdjusted=t._scaleAdjusted>1e3?1:t._scaleAdjusted}}}function W$n(e){this._color=u$Z(e.color,e$1X.WHITE),this._lineWidth=u$Z(e.lineWidth,.02),this._lineLength=u$Z(e.lineLength,5),this._arrowWidth=u$Z(e.arrowWidth,.2),this._arrowLength=u$Z(e.arrowLength,1),this._lineWidth=this._lineWidth*u$Z(e.lineWidthScale,4),E$q.call(this,e)}function B$j(e){this._lineWidth=u$Z(e.lineWidth,.02),this._lineLength=u$Z(e.lineLength,10),this._headDimension=u$Z(e.headDimension,.2),E$q.call(this,e)}function ee$b(e){this._dimensions=u$Z(e.dimensions,.2),this._color=u$Z(e.color,e$1X.WHITE),E$q.call(this,e)}function X$f(e){this._width=u$Z(e.width,.02),this._radius=u$Z(e.radius,7.5),this._width=this._width*u$Z(e.lineWidthScale,4),E$q.call(this,e)}function k$l(e){this._dimensions=u$Z(e.dimensions,.2),E$q.call(this,e)}function u$o(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.scene",e.scene),o$1q.typeOf.object("options.model",e.model);var t=e.model,i=t instanceof h$W;if(!i&&!(t instanceof _0x24f13b))throw new t$15("Unsupported model type.");this._scene=e.scene,this._modelType=i?U$l.ENTITY:U$l.S3MINSTANCE,this._offset=u$Z(e.offset,o$1p.ZERO),this._hoverColor=u$Z(e.hoverColor,e$1X.WHITE),this._scale=u$Z(e.scale,1),this._model=t,this._active=!1,this._hpr=void 0,this._handler=new g$K(this._scene.canvas),this._primitives=[],this._axesShow=p$19(e.axesShow,{translation:!0,rotation:!0,scale:!0}),this._lineWidthScale=u$Z(e.lineWidthScale,4),this._modelType===U$l.ENTITY?(this._position=t.position.getValue(0),this._orientation=t.orientation?t.orientation.getValue(0):new n$15,this._calcHpr()):(this._position=t.position,this._hpr=i$16.clone(t.hpr)),this._fromEnu=m$19.eastNorthUpToFixedFrame(this._position),p$1d.multiplyByPoint(this._fromEnu,this._offset,this._position),this._modelMatrix=m$19.headingPitchRollToFixedFrame(this._position,this._hpr),this._modelMatrixInverse=p$1d.inverse(this._modelMatrix,new p$1d),!e$2e(this._changedEvt)&&(this._changedEvt=new o$1h),!e$2e(this._hoverChanged)&&(this._hoverChanged=new o$1h),this._axesCreated=!1;var n=this;this._changedEvt.addEventListener((function(e){Xe$4(n,e)}))}function Ge$4(e,t){var i=e.context._us,n=i._viewport,r=n.width,o=n.height,a=new o$1p;p$1d.multiplyByPoint(i._view,t,a);var s,l,u=i.frustumPlanes,c=u.x,h=u.y,d=u.z,f=u.w;if(e.mode===C$14.COLUMBUS_VIEW||i.orthographicIn3D){s=(f-d)/r,l=(c-h)/o}else{var p=-a.z,_=1/i.currentFrustum.x,m=c*_;l=2*p*m/o,s=2*p*(m=f*_)/r}return Math.max(s,l)}E$q.prototype._setChangeEvt=function(){var e=this;this._owner._changedEvt.addEventListener((function(t){p$1d.multiply(t.modelMatrix,e._initModelMatrix,e._modelMatrix)})),this._owner._hoverChanged.addEventListener((function(t){t===e._typeForModelEditor?e$1X.clone(e._hoverColor,e._uColor):e$1X.clone(e._color,e._uColor),t>=1&&t<=10&&t!==e._typeForModelEditor?e._color=e._color.withAlpha(.05,e._color):e._color=e._color.withAlpha(1,e._color)}))},E$q.prototype._createGeometry=function(){},E$q.prototype._updateMatrix=function(){p$1d.fromTranslationQuaternionRotationScale(this._initTransition,n$15.fromHeadingPitchRoll(this._initHpr),this._scale,this._initModelMatrix),p$1d.inverse(this._initModelMatrix,this._initModelMatrixInverse),p$1d.multiply(this._modelMatrix,this._initModelMatrix,this._modelMatrix)},E$q.prototype.update=function(e){if(e$2e(this._adjustAxisLength)||(this._adjustAxisLength=je$4(e,this),e.camera.changed.addEventListener(this._adjustAxisLength)),0===this._commands.length){this._createGeometry();for(var t=0,i=this._geometries.length;t<i;t++){var n=this._geometries[t];We$3(e.context,this,n)}}if(this._visible)for(t=0,i=this._commands.length;t<i;t++){var r=this._commands[t];e.commandList.push(r)}},E$q.prototype.destroy=function(){this._geometries.length=0;for(var e=0,t=this._commands.length;e<t;e++){var i=this._commands[e];i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy(),i.shaderProgram=i.shaderProgram&&!i.shaderProgram.isDestroyed()&&i.shaderProgram.destroy()}this._commands.length=0},W$n.prototype._createGeometry=function(){var e=l$Q.createGeometry(new l$Q({length:this._lineLength,topRadius:this._lineWidth,bottomRadius:this._lineWidth})),t=l$Q.createGeometry(new l$Q({length:this._arrowLength,topRadius:.01,bottomRadius:this._arrowWidth}));z$n(e,this._lineLength/2),z$n(t,this._lineLength),this._geometries.push(e),this._geometries.push(t)},D$k(W$n,E$q),B$j.prototype._createGeometry=function(){var e=l$Q.createGeometry(new l$Q({length:this._lineLength,topRadius:this._lineWidth,bottomRadius:this._lineWidth})),t=O$z.createGeometry(new O$z({minimum:new o$1p(-this._headDimension,-this._headDimension,-this._headDimension),maximum:new o$1p(this._headDimension,this._headDimension,this._headDimension),vertexFormat:n$13.POSITION_AND_NORMAL}));z$n(e,this._lineLength/2),z$n(t,this._lineLength),this._geometries.push(e),this._geometries.push(t)},D$k(B$j,E$q),ee$b.prototype._createGeometry=function(){var e=O$z.createGeometry(new O$z({minimum:new o$1p(-this._dimensions,-this._dimensions,-this._dimensions),maximum:new o$1p(this._dimensions,this._dimensions,this._dimensions),vertexFormat:n$13.POSITION_AND_NORMAL}));this._geometries.push(e)},D$k(ee$b,E$q),X$f.prototype._createGeometry=function(){var e=N$A.createGeometry(new N$A({polylinePositions:function(e){for(var t=[],i=0;i<=360;i+=3){var n=e$2d.toRadians(i),r=new o$1p(e*Math.cos(n),e*Math.sin(n),0);t.push(r)}return t}(this._radius),shapePositions:function(e){for(var t=[],i=0;i<=360;i+=10){var n=e$2d.toRadians(i);t.push(new o$1o(e*Math.cos(n),e*Math.sin(n)))}return t}(this._width),vertexFormat:n$13.POSITION_AND_NORMAL}));this._geometries.push(e)},D$k(X$f,E$q),k$l.prototype._createGeometry=function(){var e=this._dimensions,t=P$H.createGeometry(new P$H({polygonHierarchy:new e$1M([new o$1p(-e,e,0),new o$1p(-e,-e,0),new o$1p(e,-e,0),new o$1p(e,e,0)]),perPositionHeight:!0,vertexFormat:n$13.POSITION_AND_NORMAL}));this._geometries.push(t)},D$k(k$l,E$q),Object.defineProperties(u$o.prototype,{changedEvt:{get:function(){return this._changedEvt}}}),u$o.prototype.setEditObject=function(e){this._clearEditObject(),this.constructor({model:e,scene:this._scene,offset:this._offset,axesShow:this._axesShow}),this.activate()},u$o.prototype._clearEditObject=function(){for(var e=0;e<this._primitives.length;e++)this._scene.primitives.remove(this._primitives[e]),this._primitives[e]=void 0;this._primitives=[],this._handler.destroy()},u$o.prototype._calcHpr=function(){var e=p$1e.fromQuaternion(this._orientation,new p$1e),t=p$1d.fromRotationTranslation(e,o$1p.ZERO,new p$1d),i=p$1d.inverse(m$19.eastNorthUpToFixedFrame(this._position),new p$1d),n=p$1d.multiply(i,t,new p$1d),r=p$1d.getMatrix3(n,new p$1e);this._hpr=i$16.fromQuaternion(n$15.fromRotationMatrix(r))},u$o.prototype._createAxes=function(){this._axisX=new W$n({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,-90,0),color:e$1X.RED,hoverColor:this._hoverColor,type:l$o.LINE_X,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._axisY=new W$n({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,0,-90),color:e$1X.GREEN,hoverColor:this._hoverColor,type:l$o.LINE_Y,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._axisZ=new W$n({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,0,0),color:e$1X.BLUE,hoverColor:this._hoverColor,type:l$o.LINE_Z,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._scaleLineX=new B$j({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,-90,0),color:e$1X.RED,hoverColor:this._hoverColor,type:l$o.SCALE_LINE_X,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._scaleLineY=new B$j({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,0,-90),color:e$1X.GREEN,hoverColor:this._hoverColor,type:l$o.SCALE_LINE_Y,visible:this._axesShow.scale}),this._scaleLineZ=new B$j({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,0,0),color:e$1X.BLUE,hoverColor:this._hoverColor,type:l$o.SCALE_LINE_Z,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._axisCircleX=new X$f({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,-90,0),color:e$1X.RED,hoverColor:this._hoverColor,type:l$o.CIRCLE_X,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._axisCircleY=new X$f({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,0,-90),color:e$1X.GREEN,hoverColor:this._hoverColor,type:l$o.CIRCLE_Y,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._axisCircleZ=new X$f({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,0,0),color:e$1X.BLUE,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._transitionPlaneX=new k$l({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.4,transition:new o$1p(0,.4,.4),headingPitchRoll:i$16.fromDegrees(0,-90,0),color:e$1X.RED,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z}),this._transitionPlaneY=new k$l({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.4,transition:new o$1p(.4,0,.4),headingPitchRoll:i$16.fromDegrees(0,0,90),color:e$1X.GREEN,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z}),this._transitionPlaneZ=new k$l({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.4,transition:new o$1p(.4,.4,0),headingPitchRoll:i$16.fromDegrees(0,0,0),color:e$1X.BLUE,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z}),this._uniformScale=new ee$b({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.2,transition:new o$1p(.2001,.2,.2),headingPitchRoll:i$16.fromDegrees(0,0,0),type:l$o.UNIFORM_SCALE,hoverColor:this._hoverColor,color:e$1X.ORANGE,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._primitives=[this._scaleLineX,this._scaleLineY,this._scaleLineZ,this._axisCircleX,this._axisCircleY,this._axisCircleZ,this._uniformScale,this._axisX,this._axisY,this._axisZ],this._scene.primitives.add(this._scaleLineX),this._scene.primitives.add(this._scaleLineY),this._scene.primitives.add(this._scaleLineZ),this._scene.primitives.add(this._axisCircleX),this._scene.primitives.add(this._axisCircleY),this._scene.primitives.add(this._axisCircleZ),this._scene.primitives.add(this._uniformScale),this._scene.primitives.add(this._axisX),this._scene.primitives.add(this._axisY),this._scene.primitives.add(this._axisZ)},u$o.prototype._initEvent=function(){var e=this._scene,t=this,i=this._handler;i.setInputAction((function(i){var n=t._pickObj;!n||!n.primitive||!n.primitive._typeForModelEditor||(t._isEdit=!0,t._pickObj=n,e.screenSpaceCameraController.enableInputs=!1)}),G$J.LEFT_DOWN),i.setInputAction((function(e){t._isEdit?(t._handleTransition(e),t._handleRotation(e),t._handleScale(e),t._handleUniformScale(e)):t._handleHover(e)}),G$J.MOUSE_MOVE),i.setInputAction((function(i){e.screenSpaceCameraController.enableInputs=!0,t._isEdit=!1,t._pickObj=void 0}),G$J.LEFT_UP)},u$o.prototype._handleTransition=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$o.LINE_X||t===l$o.LINE_Y||t===l$o.LINE_Z){var i,n;switch(t){case l$o.LINE_X:i=o$1p.UNIT_Z,n=o$1p.UNIT_Z;break;case l$o.LINE_Y:i=o$1p.UNIT_X,n=o$1p.UNIT_X;break;case l$o.LINE_Z:i=o$1p.UNIT_Y,n=o$1p.UNIT_Y}var r=this._scene,o=e.startPosition,a=e.endPosition,s=p$1d.multiplyByPoint(this._modelMatrix,i,q$j),l=p$1d.multiplyByPoint(this._modelMatrix,o$1p.ZERO,J$f);n=p$1d.multiplyByPoint(this._modelMatrix,n,$$h),o$1p.subtract(s,l,s);var u=o$1p.normalize(s,s),c=b$v(r.camera,o,n,u),h=b$v(r.camera,a,n,u),d=p$1d.multiplyByPoint(this._modelMatrixInverse,c,de$7),f=p$1d.multiplyByPoint(this._modelMatrixInverse,h,K$g);switch(t){case l$o.LINE_X:I$r.x=f.x-d.x;break;case l$o.LINE_Y:I$r.y=f.y-d.y;break;case l$o.LINE_Z:I$r.z=f.z-d.z}p$1d.multiply(this._modelMatrix,p$1d.fromTranslation(I$r,g$v),this._modelMatrix),this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,transitionAddtion:I$r}),p$1d.getTranslation(this._modelMatrix,this._position),o$1p.clone(o$1p.ZERO,I$r)}},u$o.prototype._handleRotation=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$o.CIRCLE_X||t===l$o.CIRCLE_Y||t===l$o.CIRCLE_Z){var i,n,r=this._scene,o=e.startPosition,a=e.endPosition,s=this._position;switch(t){case l$o.CIRCLE_X:i=o$1p.UNIT_X,n=o$1p.UNIT_Y;break;case l$o.CIRCLE_Y:i=o$1p.UNIT_Y,n=o$1p.UNIT_Z;break;case l$o.CIRCLE_Z:i=o$1p.UNIT_Z,n=o$1p.UNIT_X}var l=p$1d.multiplyByPoint(this._modelMatrix,i,q$j),u=p$1d.multiplyByPoint(this._modelMatrix,o$1p.ZERO,J$f);n=p$1d.multiplyByPoint(this._modelMatrix,n,$$h),o$1p.subtract(l,u,l);var c=o$1p.normalize(l,l),h=b$v(r.camera,a,n,c),d=b$v(r.camera,o,n,c),f=o$1p.subtract(h,s,Ze$5),p=o$1p.subtract(d,s,Oe$8),_=o$1p.dot(o$1p.normalize(f,f),o$1p.normalize(p,p)),m=Math.acos(_),g=o$1p.cross(l,f,be$9),x=o$1p.subtract(d,h,Ue$4),y=o$1p.dot(g,o$1p.normalize(x,x));switch(m*=y=y>0?1:-1,t){case l$o.CIRCLE_X:S$l.roll=-m;break;case l$o.CIRCLE_Y:S$l.pitch=m;break;case l$o.CIRCLE_Z:S$l.heading=m}p$1d.multiply(this._modelMatrix,p$1d.fromRotationTranslation(p$1e.fromHeadingPitchRoll(S$l),o$1p.ZERO,g$v),this._modelMatrix),p$1d.inverse(this._modelMatrix,this._modelMatrixInverse),this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,rotationAddtion:S$l}),S$l.heading=0,S$l.pitch=0,S$l.roll=0}},u$o.prototype._handleScale=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$o.SCALE_LINE_X||t===l$o.SCALE_LINE_Y||t===l$o.SCALE_LINE_Z){var i,n;switch(t){case l$o.SCALE_LINE_X:i=o$1p.UNIT_Z,n=o$1p.UNIT_Z;break;case l$o.SCALE_LINE_Y:i=o$1p.UNIT_X,n=o$1p.UNIT_X;break;case l$o.SCALE_LINE_Z:i=o$1p.UNIT_Y,n=o$1p.UNIT_Y}var r=this._scene,o=e.startPosition,a=e.endPosition,s=p$1d.multiplyByPoint(this._modelMatrix,i,q$j),l=p$1d.multiplyByPoint(this._modelMatrix,o$1p.ZERO,J$f);n=p$1d.multiplyByPoint(this._modelMatrix,n,$$h),o$1p.subtract(s,l,s);var u=o$1p.normalize(s,s),c=b$v(r.camera,o,n,u),h=b$v(r.camera,a,n,u),d=p$1d.multiplyByPoint(this._modelMatrixInverse,c,de$7),f=p$1d.multiplyByPoint(this._modelMatrixInverse,h,K$g);switch(t){case l$o.SCALE_LINE_X:I$r.x=f.x-d.x;break;case l$o.SCALE_LINE_Y:I$r.y=f.y-d.y;break;case l$o.SCALE_LINE_Z:I$r.z=f.z-d.z}this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,nonUniformScaleAddition:o$1p.clone(I$r)}),o$1p.clone(o$1p.ZERO,I$r)}},u$o.prototype._handleHover=function(e){this._scene.pickAsync(e.startPosition).then((e=>{if(this._pickObj=e,!e||!e.primitive||e.primitive._typeForModelEditor<1||e.primitive._typeForModelEditor>10)this._hoverChanged.raiseEvent(-1);else{var t=e.primitive._typeForModelEditor;this._hoverChanged.raiseEvent(t)}}))},u$o.prototype._handleUniformScale=function(e){if(this._pickObj.primitive._typeForModelEditor===l$o.UNIFORM_SCALE){this._scene;var t=e.startPosition,i=e.endPosition.x-t.x;this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,uniformScaleAddition:i/50})}},u$o.prototype.activate=function(){this._active||(this._axesCreated||(this._createAxes(),this._axesCreated=!0),this._initEvent(),this._active=!0)},u$o.prototype.deactivate=function(){if(this._active){this._disableEvent(),this._active=!1;for(var e=0,t=this._primitives.length;e<t;e++){this._primitives[e]._visible=!1}this._scene.screenSpaceCameraController.enableInputs=!0,this._isEdit=!1,this._pickObj=void 0}},u$o.prototype._disableEvent=function(){var e=this._handler;e.removeInputAction(G$J.LEFT_UP),e.removeInputAction(G$J.LEFT_DOWN),e.removeInputAction(G$J.MOUSE_MOVE)},u$o.prototype.destroy=function(){this.deactivate();for(var e=0,t=this._primitives.length;e<t;e++){this._primitives[e].destroy()}this._handler.destroy(),i$11(this)},u$o.prototype.isDestroyed=function(){return!1};var d$v=function(e){t$11("PointHandler","PointHandler is deprecated,please use DrawHandler.");var t=new w$n(e,_0x1522bc.Point,l$p.Space);return t.drawCompletedEvent=t.drawEvt,t},l$n=function(e){t$11("PolygonHandler","PolygonHandler is deprecated,please use DrawHandler.");var t=new w$n(e,_0x1522bc.Polygon,l$p.Space);return t.drawCompletedEvent=t.drawEvt,t},d$u=function(e){t$11("PolylineHandler","PolylineHandler is deprecated,please use DrawHandler.");var t=new w$n(e,_0x1522bc.Line,l$p.Space);return t.drawCompletedEvent=t.drawEvt,t};function c$i(e,t){if(LicenseChecker.LICENSECHECKER.verify("DirectionalLight"),t=u$Z(t,{}),o$1q.defined("PointLight Position",e),o$1p.equals(e,o$1p.ZERO))throw new t$15("directional light position equals zero");this._id=e$1T(),this._position=o$1p.clone(e),this._positionCV=new o$1p,this._targetPosition=u$Z(t.targetPosition,new o$1p),this._targetPositionCV=new o$1p,this._color=u$Z(t.color,new e$1X(1,1,1,1)),this._intensity=u$Z(t.intensity,1),this._direction=new o$1p,o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction),this._lightColor=e$1X.multiplyByScalar(this._color,this._intensity,new e$1X),this._directionEC=new o$1p,this._sceneMode=C$14.SCENE3D}function e$l(e){e=u$Z(e,{}),this._id=e$1T(),this._skyColor=u$Z(e.skyColor,new e$1X(.7,.7,.7)),this._groundColor=u$Z(e.groundColor,new e$1X(.2,.2,.2)),this._groundLightColor=new e$1X,this._skyLightColor=new e$1X,this._intensity=u$Z(e.intensity,1),this._sceneMode=C$14.SCENE3D}function c$h(e,t){LicenseChecker.LICENSECHECKER.verify("PointLight"),t=u$Z(t,{}),o$1q.defined("PointLight Position",e),this._id=e$1T(),this._position=o$1p.clone(e),this._positionCV=new o$1p,this._positionEC=new o$1p,this._color=u$Z(t.color,new e$1X(1,1,1,1)),this._intensity=u$Z(t.intensity,2),this._cutoffDistance=u$Z(t.cutoffDistance,10),this._decay=u$Z(t.decay,1),this._lightColor=e$1X.multiplyByScalar(this._color,this._intensity,new e$1X),this._visibleInCullingVolume=1,this._sceneMode=C$14.SCENE3D}Object.defineProperties(c$i.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===C$14.SCENE3D?this._position:this._positionCV},set:function(e){o$1q.defined("directional light position",e),!o$1p.equals(e,this._targetPosition)&&(this._position=e,this._sceneMode===C$14.COLUMBUS_VIEW?(this._positionCV=m$19.convertToColumbusCartesian(this._position),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},targetPosition:{get:function(){return this._sceneMode===C$14.SCENE3D?this._targetPosition:this._targetPositionCV},set:function(e){o$1q.defined("directional light target position",e),!o$1p.equals(e,this._position)&&(this._targetPosition=e,this._sceneMode===C$14.COLUMBUS_VIEW?(this._targetPositionCV=m$19.convertToColumbusCartesian(this._targetPosition),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},color:{get:function(){return this._color},set:function(e){o$1q.defined("directional light color",e),this._color=e,e$1X.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){o$1q.typeOf.number("directional light intensity",e),this._intensity=e,e$1X.multiplyByScalar(this._color,this._intensity,this._lightColor)}},direction:{get:function(){return this._direction}},lightColor:{get:function(){return this._lightColor}},directionEC:{get:function(){return this._directionEC},set:function(e){o$1q.defined("directioinal light directionEC",e),this._directionEC=e}},lightType:{get:function(){return _0x4970c2.DIRECTIONAL}},sceneMode:{get:function(){return this._sceneMode},set:function(e){if(o$1q.typeOf.number("spot light sceneMode",e),this._sceneMode!==e){if(this._sceneMode=e,this._sceneMode===C$14.COLUMBUS_VIEW){if(this._positionCV=m$19.convertToColumbusCartesian(this._position),this._targetPositionCV=m$19.convertToColumbusCartesian(this._targetPosition),o$1p.equals(this._positionCV,this._targetPositionCV))return;o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)}else o$1p.subtract(this._position,this._targetPosition,this._direction);o$1p.normalize(this._direction,this._direction)}}}}),Object.defineProperties(e$l.prototype,{id:{get:function(){return this._id}},lightType:{get:function(){return _0x4970c2.HEMISPHERE}},skyColor:{get:function(){return e$1X.multiplyByScalar(this._skyColor,this._intensity,this._skyLightColor)},set:function(e){o$1q.defined("skyColor color",e),e$1X.clone(e,this._skyColor)}},groundColor:{get:function(){return e$1X.multiplyByScalar(this._groundColor,this._intensity,this._groundLightColor)},set:function(e){o$1q.defined("groundColor color",e),e$1X.clone(e,this._groundColor)}}}),Object.defineProperties(c$h.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===C$14.SCENE3D?this._position:this._positionCV},set:function(e){o$1q.defined("point light position",e),this._position=e,this._sceneMode===C$14.COLUMBUS_VIEW&&(this._positionCV=m$19.convertToColumbusCartesian(this._position))}},color:{get:function(){return this._color},set:function(e){o$1q.defined("point color color",e),this._color=e,e$1X.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){o$1q.typeOf.number("point light intensity",e),this._intensity=e,e$1X.multiplyByScalar(this._color,this._intensity,this._lightColor)}},cutoffDistance:{get:function(){return this._cutoffDistance},set:function(e){o$1q.typeOf.number("point light cutoffDistance",e),this._cutoffDistance=e}},decay:{get:function(){return this._decay},set:function(e){o$1q.typeOf.number("point light decay",e),this._decay=e}},lightColor:{get:function(){return this._lightColor}},positionEC:{get:function(){return this._positionEC},set:function(e){o$1q.defined("point light positionEC",e),this._positionEC=e}},lightType:{get:function(){return _0x4970c2.POINT}},visibleInCullingVolume:{get:function(){return this._visibleInCullingVolume}},sceneMode:{get:function(){return this._sceneMode},set:function(e){o$1q.typeOf.number("point light sceneMode",e),this._sceneMode!==e&&(this._sceneMode=e,this._sceneMode===C$14.COLUMBUS_VIEW&&(this._positionCV=m$19.convertToColumbusCartesian(this._position)))}}});var h$o=new i$1d;function _$k(e,t,i){if(LicenseChecker.LICENSECHECKER.verify("SpotLight"),i=u$Z(i,{}),o$1q.defined("SpotLight Position",e),o$1q.defined("SpotLight target position",t),o$1p.equals(e,t))throw new t$15("position equals targetPosition");this._id=e$1T(),this._position=o$1p.clone(e),this._positionCV=new o$1p,this._targetPosition=o$1p.clone(t),this._targetPositionCV=new o$1p,this._color=u$Z(i.color,new e$1X(1,1,1,1)),this._intensity=u$Z(i.intensity,2),this._distance=u$Z(i.distance,100),this._angle=u$Z(i.angle,Math.PI/6),this._penumbra=u$Z(i.penumbra,0),this._exponent=u$Z(i.exponent,10),this._decay=u$Z(i.decay,1),this._direction=new o$1p,this._directionEC=new o$1p,o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction),this._lightColor=e$1X.multiplyByScalar(this._color,this._intensity,new e$1X),this._angleCos=Math.cos(this._angle),this._penumbraCos=Math.cos(this._angle*(1-this._penumbra)),this._positionEC=new o$1p,this._visibleInCullingVolume=1,this._sceneMode=C$14.SCENE3D}c$h.prototype.computeVisiblityInCullingVolume=function(e){return h$o.radius=this._cutoffDistance,h$o.center=this.position,this._visibleInCullingVolume=e.computeVisibility(h$o)!==Ae$w.OUTSIDE?1:0,!!this._visibleInCullingVolume},Object.defineProperties(_$k.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===C$14.SCENE3D?this._position:this._positionCV},set:function(e){o$1q.defined("spot light position",e),!o$1p.equals(e,this._targetPosition)&&(this._position=e,this._sceneMode===C$14.COLUMBUS_VIEW?(this._positionCV=m$19.convertToColumbusCartesian(this._position),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},targetPosition:{get:function(){return this._sceneMode===C$14.SCENE3D?this._targetPosition:this._targetPositionCV},set:function(e){o$1q.defined("spot light target position",e),!o$1p.equals(e,this._position)&&(this._targetPosition=e,this._sceneMode===C$14.COLUMBUS_VIEW?(this._targetPositionCV=m$19.convertToColumbusCartesian(this._targetPosition),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},color:{get:function(){return this._color},set:function(e){o$1q.defined("spot color color",e),this._color=e,e$1X.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){o$1q.typeOf.number("spot light intensity",e),this._intensity=e,e$1X.multiplyByScalar(this._color,this._intensity,this._lightColor)}},distance:{get:function(){return this._distance},set:function(e){o$1q.typeOf.number("spot light istance",e),this._distance=e}},angle:{get:function(){return this._angle},set:function(e){o$1q.typeOf.number("spot light angle",e),this._angle=e,this._angleCos=Math.cos(this._angle)}},exponent:{get:function(){return this._exponent},set:function(e){o$1q.typeOf.number("spot light exponent",e),this._exponent=e}},decay:{get:function(){return this._decay},set:function(e){o$1q.typeOf.number("spot light decay",e),this._decay=e}},direction:{get:function(){return this._direction}},lightColor:{get:function(){return this._lightColor}},angleCos:{get:function(){return this._angleCos}},penumbra:{get:function(){return this._penumbra},set:function(e){o$1q.typeOf.number("spot light angle",e),this._penumbra=e,this._penumbraCos=Math.cos(this._angle*(1-this._penumbra))}},penumbraCos:{get:function(){return this._penumbraCos}},positionEC:{get:function(){return this._positionEC},set:function(e){o$1q.defined("spot light positionEC",e),this._positionEC=e}},directionEC:{get:function(){return this._directionEC}},lightType:{get:function(){return _0x4970c2.SPOT}},visibleInCullingVolume:{get:function(){return this._visibleInCullingVolume}},sceneMode:{get:function(){return this._sceneMode},set:function(e){if(o$1q.typeOf.number("spot light sceneMode",e),this._sceneMode!==e){if(this._sceneMode=e,this._sceneMode===C$14.COLUMBUS_VIEW){if(this._positionCV=m$19.convertToColumbusCartesian(this._position),this._targetPositionCV=m$19.convertToColumbusCartesian(this._targetPosition),o$1p.equals(this._positionCV,this._targetPositionCV))return;o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)}else o$1p.subtract(this._position,this._targetPosition,this._direction);o$1p.normalize(this._direction,this._direction)}}}});var u$n=new i$1d;_$k.prototype.computeVisiblityInCullingVolume=function(e){return u$n.radius=this._distance,u$n.center=this.position,this._visibleInCullingVolume=e.computeVisibility(u$n)!==Ae$w.OUTSIDE?1:0,!!this._visibleInCullingVolume};var _0x7df47f=(_0x174466=!0,function(e,t){var i=_0x174466?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x174466=!1,i}),_0x56de09=_0x7df47f(void 0,(function(){return _0x56de09.toString().search("(((.+)+)+)+$").toString().constructor(_0x56de09).search("(((.+)+)+)+$")})),_0x174466;function _0x1d0ffc(e,t){return this.position=new o$1p,this.rotation=new o$1p,this.scale=new o$1p,this.isVisible=!0,this._worldMatrix=new p$1d,this._rotationQuaternion=new n$15,p$1d.clone(p$1d.IDENTITY,this._worldMatrix),this}function _0x42e047(e,t,i,n){var r=.5*i,o=.5*t,a=.5*e,s=Math.sin(r),l=Math.cos(r),u=Math.sin(o),c=Math.cos(o),h=Math.sin(a),d=Math.cos(a);return n.x=d*u*l+h*c*s,n.y=h*c*l-d*u*s,n.z=d*c*s-h*u*l,n.w=d*c*l+h*u*s,n}_0x56de09(),_0x1d0ffc.prototype.setDirection=function(e,t,i,n){t=u$Z(t,0),i=u$Z(i,0),n=u$Z(n,0);var r=-Math.atan2(e.z,e.x)+Math.PI/2,o=Math.sqrt(e.x*e.x+e.z*e.z),a=-Math.atan2(e.y,o);return this.rotation.x=a+i,this.rotation.y=r+t,this.rotation.z=n,this},_0x1d0ffc.prototype.computeWorldMatrix=function(){_0x42e047(this.rotation.y,this.rotation.x,this.rotation.z,this._rotationQuaternion),p$1d.fromTranslationQuaternionRotationScale(this.position,this._rotationQuaternion,this.scale,this._worldMatrix)},_0x1d0ffc.prototype.getWorldMatrix=function(){return this.computeWorldMatrix(),this._worldMatrix};var _0x57c99e=(_0x1d8fb8=!0,function(e,t){var i=_0x1d8fb8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d8fb8=!1,i}),_0x3ce793=_0x57c99e(void 0,(function(){return _0x3ce793.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ce793).search("(((.+)+)+)+$")})),_0x1d8fb8;function _0x48b138(e,t,i,n,r,o){this.name=e,this.targetProperty=t,this.framePerSecond=i,this.dataType=n,this.loopMode=r,this.enableBlending=o,this._runtimeAnimations=new Array,this._events=new Array,this.blendingSpeed=.01,this._ranges={},this.targetPropertyPath=t.split("."),this.dataType=n,this.loopMode=void 0===r?_0x48b138.ANIMATIONLOOPMODE_CYCLE:r}_0x3ce793(),_0x48b138._PrepareAnimation=function(e,t,i,n,r,o,a,s){var l=void 0;if(!isNaN(parseFloat(r))&&isFinite(r)?l=_0x48b138.ANIMATIONTYPE_FLOAT:r instanceof _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion?l=_0x48b138.ANIMATIONTYPE_QUATERNION:r instanceof _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3?l=_0x48b138.ANIMATIONTYPE_VECTOR3:r instanceof _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector2?l=_0x48b138.ANIMATIONTYPE_VECTOR2:r instanceof _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color3?l=_0x48b138.ANIMATIONTYPE_COLOR3:r instanceof _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color4?l=_0x48b138.ANIMATIONTYPE_COLOR4:r instanceof _Maths_math_size__WEBPACK_IMPORTED_MODULE_8__.Size&&(l=_0x48b138.ANIMATIONTYPE_SIZE),null==l)return null;var u=new _0x48b138(e,t,i,l,a),c=[{frame:0,value:r},{frame:n,value:o}];return u.setKeys(c),void 0!==s&&u.setEasingFunction(s),u},_0x48b138.CreateAnimation=function(e,t,i,n){var r=new _0x48b138(e+"Animation",e,i,t,_0x48b138.ANIMATIONLOOPMODE_CONSTANT);return r.setEasingFunction(n),r},_0x48b138.CreateAndStartAnimation=function(e,t,i,n,r,o,a,s,l,u){var c=_0x48b138._PrepareAnimation(e,i,n,r,o,a,s,l);return c?t.getScene().beginDirectAnimation(t,[c],0,r,1===c.loopMode,1,u):null},_0x48b138.CreateAndStartHierarchyAnimation=function(e,t,i,n,r,o,a,s,l,u,c){var h=_0x48b138._PrepareAnimation(e,n,r,o,a,s,l,u);return h?t.getScene().beginDirectHierarchyAnimation(t,i,[h],0,o,1===h.loopMode,1,c):null},_0x48b138.CreateMergeAndStartAnimation=function(e,t,i,n,r,o,a,s,l,u){var c=_0x48b138._PrepareAnimation(e,i,n,r,o,a,s,l);return c?(t.animations.push(c),t.getScene().beginAnimation(t,0,r,1===c.loopMode,1,u)):null},_0x48b138.MakeAnimationAdditive=function(e,t,i,n,r){void 0===t&&(t=0),void 0===n&&(n=!1);var o=e;if(n&&((o=e.clone()).name=r||o.name),!o._keys.length)return o;t=t>=0?t:0;var a=0,s=o._keys[0],l=o._keys.length-1,u=o._keys[l],c={referenceValue:s.value,referencePosition:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[0],referenceQuaternion:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Quaternion[0],referenceScaling:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[1],keyPosition:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[2],keyQuaternion:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Quaternion[1],keyScaling:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[3]},h=!1,d=s.frame,f=u.frame;if(i){var p=o.getRange(i);p&&(d=p.from,f=p.to)}var _=s.frame===d,m=u.frame===f;if(1===o._keys.length){var g=o._getKeyValue(o._keys[0]);c.referenceValue=g.clone?g.clone():g,h=!0}else if(t<=s.frame){g=o._getKeyValue(s.value);c.referenceValue=g.clone?g.clone():g,h=!0}else if(t>=u.frame){g=o._getKeyValue(u.value);c.referenceValue=g.clone?g.clone():g,h=!0}for(var x=0;!h||!_||!m&&x<o._keys.length-1;){var y=o._keys[x],v=o._keys[x+1];if(!h&&t>=y.frame&&t<=v.frame){g=void 0;if(t===y.frame)g=o._getKeyValue(y.value);else if(t===v.frame)g=o._getKeyValue(v.value);else{var $={key:x,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};g=o._interpolate(t,$)}c.referenceValue=g.clone?g.clone():g,h=!0}if(!_&&d>=y.frame&&d<=v.frame){if(d===y.frame)a=x;else if(d===v.frame)a=x+1;else{$={key:x,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};var b={frame:d,value:(g=o._interpolate(d,$)).clone?g.clone():g};o._keys.splice(x+1,0,b),a=x+1}_=!0}if(!m&&f>=y.frame&&f<=v.frame){if(f===y.frame)l=x;else if(f===v.frame)l=x+1;else{$={key:x,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT},b={frame:f,value:(g=o._interpolate(f,$)).clone?g.clone():g};o._keys.splice(x+1,0,b),l=x+1}m=!0}x++}o.dataType===_0x48b138.ANIMATIONTYPE_QUATERNION?c.referenceValue.normalize().conjugateInPlace():o.dataType===_0x48b138.ANIMATIONTYPE_MATRIX&&(c.referenceValue.decompose(c.referenceScaling,c.referenceQuaternion,c.referencePosition),c.referenceQuaternion.normalize().conjugateInPlace());for(x=a;x<=l;x++){b=o._keys[x];if(!x||o.dataType===_0x48b138.ANIMATIONTYPE_FLOAT||b.value!==s.value)switch(o.dataType){case _0x48b138.ANIMATIONTYPE_MATRIX:b.value.decompose(c.keyScaling,c.keyQuaternion,c.keyPosition),c.keyPosition.subtractInPlace(c.referencePosition),c.keyScaling.divideInPlace(c.referenceScaling),c.referenceQuaternion.multiplyToRef(c.keyQuaternion,c.keyQuaternion),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.ComposeToRef(c.keyScaling,c.keyQuaternion,c.keyPosition,b.value);break;case _0x48b138.ANIMATIONTYPE_QUATERNION:c.referenceValue.multiplyToRef(b.value,b.value);break;case _0x48b138.ANIMATIONTYPE_VECTOR2:case _0x48b138.ANIMATIONTYPE_VECTOR3:case _0x48b138.ANIMATIONTYPE_COLOR3:case _0x48b138.ANIMATIONTYPE_COLOR4:b.value.subtractToRef(c.referenceValue,b.value);break;case _0x48b138.ANIMATIONTYPE_SIZE:b.value.width-=c.referenceValue.width,b.value.height-=c.referenceValue.height;break;default:b.value-=c.referenceValue}}return o},_0x48b138.TransitionTo=function(e,t,i,n,r,o,a,s){if(void 0===s&&(s=null),a<=0)return i[e]=t,s&&s(),null;var l=r*(a/1e3);o.setKeys([{frame:0,value:i[e].clone?i[e].clone():i[e]},{frame:l,value:t}]),i.animations||(i.animations=[]),i.animations.push(o);var u=n.beginAnimation(i,0,l,!1);return u.onAnimationEnd=s,u},Object.defineProperty(_0x48b138.prototype,"runtimeAnimations",{get:function(){return this._runtimeAnimations},enumerable:!1,configurable:!0}),Object.defineProperty(_0x48b138.prototype,"hasRunningRuntimeAnimations",{get:function(){for(var e=0,t=this._runtimeAnimations;e<t.length;e++){if(!t[e].isStopped)return!0}return!1},enumerable:!1,configurable:!0}),_0x48b138.prototype.toString=function(e){var t="Name: "+this.name+", property: "+this.targetProperty;if(t+=", datatype: "+["Float","Vector3","Quaternion","Matrix","Color3","Vector2"][this.dataType],t+=", nKeys: "+(this._keys?this._keys.length:"none"),t+=", nRanges: "+(this._ranges?Object.keys(this._ranges).length:"none"),e){t+=", Ranges: {";var i=!0;for(var n in this._ranges)i&&(t+=", ",i=!1),t+=n;t+="}"}return t},_0x48b138.prototype.addEvent=function(e){this._events.push(e),this._events.sort((function(e,t){return e.frame-t.frame}))},_0x48b138.prototype.removeEvents=function(e){for(var t=0;t<this._events.length;t++)this._events[t].frame===e&&(this._events.splice(t,1),t--)},_0x48b138.prototype.getEvents=function(){return this._events},_0x48b138.prototype.createRange=function(e,t,i){this._ranges[e]||(this._ranges[e]=new _animationRange__WEBPACK_IMPORTED_MODULE_6__.AnimationRange(e,t,i))},_0x48b138.prototype.deleteRange=function(e,t){void 0===t&&(t=!0);var i=this._ranges[e];if(i){if(t)for(var n=i.from,r=i.to,o=this._keys.length-1;o>=0;o--)this._keys[o].frame>=n&&this._keys[o].frame<=r&&this._keys.splice(o,1);this._ranges[e]=null}},_0x48b138.prototype.getRange=function(e){return this._ranges[e]},_0x48b138.prototype.getKeys=function(){return this._keys},_0x48b138.prototype.getHighestFrame=function(){for(var e=0,t=0,i=this._keys.length;t<i;t++)e<this._keys[t].frame&&(e=this._keys[t].frame);return e},_0x48b138.prototype.getEasingFunction=function(){return this._easingFunction},_0x48b138.prototype.setEasingFunction=function(e){this._easingFunction=e},_0x48b138.prototype.floatInterpolateFunction=function(e,t,i){return _Maths_math_scalar__WEBPACK_IMPORTED_MODULE_2__.Scalar.Lerp(e,t,i)},_0x48b138.prototype.floatInterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_scalar__WEBPACK_IMPORTED_MODULE_2__.Scalar.Hermite(e,t,i,n,r)},_0x48b138.prototype.quaternionInterpolateFunction=function(e,t,i){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Slerp(e,t,i)},_0x48b138.prototype.quaternionInterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Hermite(e,t,i,n,r).normalize()},_0x48b138.prototype.vector3InterpolateFunction=function(e,t,i){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Lerp(e,t,i)},_0x48b138.prototype.vector3InterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Hermite(e,t,i,n,r)},_0x48b138.prototype.vector2InterpolateFunction=function(e,t,i){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector2.Lerp(e,t,i)},_0x48b138.prototype.vector2InterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector2.Hermite(e,t,i,n,r)},_0x48b138.prototype.sizeInterpolateFunction=function(e,t,i){return _Maths_math_size__WEBPACK_IMPORTED_MODULE_8__.Size.Lerp(e,t,i)},_0x48b138.prototype.color3InterpolateFunction=function(e,t,i){return _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color3.Lerp(e,t,i)},_0x48b138.prototype.color4InterpolateFunction=function(e,t,i){return _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color4.Lerp(e,t,i)},_0x48b138.prototype._getKeyValue=function(e){return"function"==typeof e?e():e},_0x48b138.prototype._interpolate=function(e,t){if(t.loopMode===_0x48b138.ANIMATIONLOOPMODE_CONSTANT&&t.repeatCount>0)return t.highLimitValue.clone?t.highLimitValue.clone():t.highLimitValue;var i=this._keys;if(1===i.length)return this._getKeyValue(i[0].value);var n=t.key;if(i[n].frame>=e)for(;n-1>=0&&i[n].frame>=e;)n--;for(var r=n;r<i.length;r++){var o=i[r+1];if(o.frame>=e){t.key=r;var a=i[r],s=this._getKeyValue(a.value);if(a.interpolation===_animationKey__WEBPACK_IMPORTED_MODULE_5__.AnimationKeyInterpolation.STEP)return s;var l=this._getKeyValue(o.value),u=void 0!==a.outTangent&&void 0!==o.inTangent,c=o.frame-a.frame,h=(e-a.frame)/c,d=this.getEasingFunction();switch(null!=d&&(h=d.ease(h)),this.dataType){case _0x48b138.ANIMATIONTYPE_FLOAT:var f=u?this.floatInterpolateFunctionWithTangents(s,a.outTangent*c,l,o.inTangent*c,h):this.floatInterpolateFunction(s,l,h);switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return f;case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return t.offsetValue*t.repeatCount+f}break;case _0x48b138.ANIMATIONTYPE_QUATERNION:var p=u?this.quaternionInterpolateFunctionWithTangents(s,a.outTangent.scale(c),l,o.inTangent.scale(c),h):this.quaternionInterpolateFunction(s,l,h);switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return p;case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return p.addInPlace(t.offsetValue.scale(t.repeatCount))}return p;case _0x48b138.ANIMATIONTYPE_VECTOR3:var _=u?this.vector3InterpolateFunctionWithTangents(s,a.outTangent.scale(c),l,o.inTangent.scale(c),h):this.vector3InterpolateFunction(s,l,h);switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return _;case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return _.add(t.offsetValue.scale(t.repeatCount))}case _0x48b138.ANIMATIONTYPE_VECTOR2:var m=u?this.vector2InterpolateFunctionWithTangents(s,a.outTangent.scale(c),l,o.inTangent.scale(c),h):this.vector2InterpolateFunction(s,l,h);switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return m;case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return m.add(t.offsetValue.scale(t.repeatCount))}case _0x48b138.ANIMATIONTYPE_SIZE:switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return this.sizeInterpolateFunction(s,l,h);case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return this.sizeInterpolateFunction(s,l,h).add(t.offsetValue.scale(t.repeatCount))}case _0x48b138.ANIMATIONTYPE_COLOR3:switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return this.color3InterpolateFunction(s,l,h);case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return this.color3InterpolateFunction(s,l,h).add(t.offsetValue.scale(t.repeatCount))}case _0x48b138.ANIMATIONTYPE_COLOR4:switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return this.color4InterpolateFunction(s,l,h);case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return this.color4InterpolateFunction(s,l,h).add(t.offsetValue.scale(t.repeatCount))}case _0x48b138.ANIMATIONTYPE_MATRIX:switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:if(_0x48b138.AllowMatricesInterpolation)return this.matrixInterpolateFunction(s,l,h,t.workValue);case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return s}}break}}return this._getKeyValue(i[i.length-1].value)},_0x48b138.prototype.matrixInterpolateFunction=function(e,t,i,n){return _0x48b138.AllowMatrixDecomposeForInterpolation?n?(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.DecomposeLerpToRef(e,t,i,n),n):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.DecomposeLerp(e,t,i):n?(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.LerpToRef(e,t,i,n),n):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.Lerp(e,t,i)},_0x48b138.prototype.clone=function(){var e=new _0x48b138(this.name,this.targetPropertyPath.join("."),this.framePerSecond,this.dataType,this.loopMode);if(e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed,this._keys&&e.setKeys(this._keys),this._ranges)for(var t in e._ranges={},this._ranges){var i=this._ranges[t];!i||(e._ranges[t]=i.clone())}return e},_0x48b138.prototype.setKeys=function(e){this._keys=e.slice(0)},_0x48b138.prototype.serialize=function(){var e={};e.name=this.name,e.property=this.targetProperty,e.framePerSecond=this.framePerSecond,e.dataType=this.dataType,e.loopBehavior=this.loopMode,e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed;var t=this.dataType;e.keys=[];for(var i=this.getKeys(),n=0;n<i.length;n++){var r=i[n],o={};switch(o.frame=r.frame,t){case _0x48b138.ANIMATIONTYPE_FLOAT:o.values=[r.value],void 0!==r.inTangent&&o.values.push(r.inTangent),void 0!==r.outTangent&&(void 0===r.inTangent&&o.values.push(void 0),o.values.push(r.outTangent));break;case _0x48b138.ANIMATIONTYPE_QUATERNION:case _0x48b138.ANIMATIONTYPE_MATRIX:case _0x48b138.ANIMATIONTYPE_VECTOR3:case _0x48b138.ANIMATIONTYPE_COLOR3:case _0x48b138.ANIMATIONTYPE_COLOR4:o.values=r.value.asArray(),null!=r.inTangent&&o.values.push(r.inTangent.asArray()),null!=r.outTangent&&(void 0===r.inTangent&&o.values.push(void 0),o.values.push(r.outTangent.asArray()))}e.keys.push(o)}for(var a in e.ranges=[],this._ranges){var s=this._ranges[a];if(s){var l={};l.name=a,l.from=s.from,l.to=s.to,e.ranges.push(l)}}return e},_0x48b138._UniversalLerp=function(e,t,i){var n=e.constructor;return n.Lerp?n.Lerp(e,t,i):n.Slerp?n.Slerp(e,t,i):e.toFixed?e*(1-i)+i*t:t},_0x48b138.Parse=function(e){var t,i,n=new _0x48b138(e.name,e.property,e.framePerSecond,e.dataType,e.loopBehavior),r=e.dataType,o=[];for(e.enableBlending&&(n.enableBlending=e.enableBlending),e.blendingSpeed&&(n.blendingSpeed=e.blendingSpeed),i=0;i<e.keys.length;i++){var a,s,l=e.keys[i];switch(r){case _0x48b138.ANIMATIONTYPE_FLOAT:t=l.values[0],l.values.length>=1&&(a=l.values[1]),l.values.length>=2&&(s=l.values[2]);break;case _0x48b138.ANIMATIONTYPE_QUATERNION:if(t=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(l.values),l.values.length>=8){var u=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(l.values.slice(4,8));u.equals(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Zero())||(a=u)}if(l.values.length>=12){var c=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(l.values.slice(8,12));c.equals(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Zero())||(s=c)}break;case _0x48b138.ANIMATIONTYPE_MATRIX:t=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.FromArray(l.values);break;case _0x48b138.ANIMATIONTYPE_COLOR3:t=_Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color3.FromArray(l.values);break;case _0x48b138.ANIMATIONTYPE_COLOR4:t=_Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color4.FromArray(l.values);break;case _0x48b138.ANIMATIONTYPE_VECTOR3:default:t=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.FromArray(l.values)}var h={};h.frame=l.frame,h.value=t,null!=a&&(h.inTangent=a),null!=s&&(h.outTangent=s),o.push(h)}if(n.setKeys(o),e.ranges)for(i=0;i<e.ranges.length;i++)t=e.ranges[i],n.createRange(t.name,t.from,t.to);return n},_0x48b138.AppendSerializedAnimations=function(e,t){_Misc_decorators__WEBPACK_IMPORTED_MODULE_3__.SerializationHelper.AppendSerializedAnimations(e,t)},_0x48b138.ParseFromFileAsync=function(e,t){var i=this;return new Promise((function(n,r){var o=new _Misc_webRequest__WEBPACK_IMPORTED_MODULE_9__.WebRequest;o.addEventListener("readystatechange",(function(){if(4==o.readyState)if(200==o.status){var t=JSON.parse(o.responseText);if(t.length){for(var a=new Array,s=0,l=t;s<l.length;s++){var u=l[s];a.push(i.Parse(u))}n(a)}else{a=i.Parse(t);e&&(a.name=e),n(a)}}else r("Unable to load the animation")})),o.open("GET",t),o.send()}))},_0x48b138.CreateFromSnippetAsync=function(e){var t=this;return new Promise((function(i,n){var r=new _Misc_webRequest__WEBPACK_IMPORTED_MODULE_9__.WebRequest;r.addEventListener("readystatechange",(function(){if(4==r.readyState)if(200==r.status){var o=JSON.parse(JSON.parse(r.responseText).jsonPayload);if(o.animations){for(var a=JSON.parse(o.animations),s=new Array,l=0,u=a;l<u.length;l++){var c=u[l];s.push(t.Parse(c))}i(s)}else{a=JSON.parse(o.animation);(s=t.Parse(a)).snippetId=e,i(s)}}else n("Unable to load the snippet "+e)})),r.open("GET",t.SnippetUrl+"/"+e.replace(/#/g,"/")),r.send()}))},_0x48b138.AllowMatricesInterpolation=!1,_0x48b138.AllowMatrixDecomposeForInterpolation=!0,_0x48b138.SnippetUrl="",_0x48b138.ANIMATIONTYPE_FLOAT=0,_0x48b138.ANIMATIONTYPE_VECTOR3=1,_0x48b138.ANIMATIONTYPE_QUATERNION=2,_0x48b138.ANIMATIONTYPE_MATRIX=3,_0x48b138.ANIMATIONTYPE_COLOR3=4,_0x48b138.ANIMATIONTYPE_COLOR4=7,_0x48b138.ANIMATIONTYPE_VECTOR2=5,_0x48b138.ANIMATIONTYPE_SIZE=6,_0x48b138.ANIMATIONLOOPMODE_RELATIVE=0,_0x48b138.ANIMATIONLOOPMODE_CYCLE=1,_0x48b138.ANIMATIONLOOPMODE_CONSTANT=2;var _0xa745f4=(_0x3a46b8=!0,function(e,t){var i=_0x3a46b8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a46b8=!1,i}),_0x220924=_0xa745f4(void 0,(function(){return _0x220924.toString().search("(((.+)+)+)+$").toString().constructor(_0x220924).search("(((.+)+)+)+$")})),_0x3a46b8;function _0x442216(){}_0x220924(),_0x442216.WithinEpsilon=function(e,t,i){void 0===i&&(i=1401298e-51);var n=e-t;return-i<=n&&n<=i},_0x442216.ToHex=function(e){var t=e.toString(16);return e<=15?("0"+t).toUpperCase():t.toUpperCase()},_0x442216.Sign=function(e){return 0===(e=+e)||isNaN(e)?e:e>0?1:-1},_0x442216.Clamp=function(e,t,i){return void 0===t&&(t=0),void 0===i&&(i=1),Math.min(i,Math.max(t,e))},_0x442216.Log2=function(e){return Math.log(e)*Math.LOG2E},_0x442216.Repeat=function(e,t){return e-Math.floor(e/t)*t},_0x442216.Normalize=function(e,t,i){return(e-t)/(i-t)},_0x442216.Denormalize=function(e,t,i){return e*(i-t)+t},_0x442216.DeltaAngle=function(e,t){var i=_0x442216.Repeat(t-e,360);return i>180&&(i-=360),i},_0x442216.PingPong=function(e,t){var i=_0x442216.Repeat(e,2*t);return t-Math.abs(i-t)},_0x442216.SmoothStep=function(e,t,i){var n=_0x442216.Clamp(i);return t*(n=-2*n*n*n+3*n*n)+e*(1-n)},_0x442216.MoveTowards=function(e,t,i){return Math.abs(t-e)<=i?t:e+_0x442216.Sign(t-e)*i},_0x442216.MoveTowardsAngle=function(e,t,i){var n=_0x442216.DeltaAngle(e,t),r=0;return-i<n&&n<i?r=t:(t=e+n,r=_0x442216.MoveTowards(e,t,i)),r},_0x442216.Lerp=function(e,t,i){return e+(t-e)*i},_0x442216.LerpAngle=function(e,t,i){var n=_0x442216.Repeat(t-e,360);return n>180&&(n-=360),e+n*_0x442216.Clamp(i)},_0x442216.InverseLerp=function(e,t,i){return e!=t?_0x442216.Clamp((i-e)/(t-e)):0},_0x442216.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o;return e*(2*a-3*o+1)+i*(-2*a+3*o)+t*(a-2*o+r)+n*(a-o)},_0x442216.RandomRange=function(e,t){return e===t?e:Math.random()*(t-e)+e},_0x442216.RangeToPercent=function(e,t,i){return(e-t)/(i-t)},_0x442216.PercentToRange=function(e,t,i){return(i-t)*e+t},_0x442216.NormalizeRadians=function(e){return e-=_0x442216.TwoPi*Math.floor((e+Math.PI)/_0x442216.TwoPi)},_0x442216.TwoPi=2*Math.PI;var _0xa0cfa5=(_0x36da0e=!0,function(e,t){var i=_0x36da0e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x36da0e=!1,i}),_0x5e0408=_0xa0cfa5(void 0,(function(){return _0x5e0408.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e0408).search("(((.+)+)+)+$")})),_0x36da0e;function _0x4ccf7f(e,t,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=i}_0x5e0408();var _0x153e50=new o$1p;_0x4ccf7f.prototype.startDirectionFunction=function(e,t,i,n){_0x153e50=p$1d.getTranslation(e,_0x153e50);var r=new o$1p;o$1p.subtract(i.position,_0x153e50,r),o$1p.normalize(r,r);var o=_0x442216.RandomRange(0,this.directionRandomizer),a=_0x442216.RandomRange(0,this.directionRandomizer),s=_0x442216.RandomRange(0,this.directionRandomizer);r.x+=o,r.y+=a,r.z+=s,o$1p.normalize(r,r),n?o$1p.clone(r,t):p$1d.multiplyByDirection(e,r,t)},_0x4ccf7f.prototype.startPositionFunction=function(e,t,i,n){var r=this.radius-_0x442216.RandomRange(0,this.radius*this.radiusRange),o=_0x442216.RandomRange(0,1),a=_0x442216.RandomRange(0,2*Math.PI),s=Math.acos(2*o-1),l=r*Math.cos(a)*Math.sin(s),u=r*Math.cos(s),c=r*Math.sin(a)*Math.sin(s);if(n)return t.x=l,t.y=c,void(t.z=u);_0x153e50.x=l,_0x153e50.y=c,_0x153e50.z=u,p$1d.multiplyByPoint(e,_0x153e50,t)},_0x4ccf7f.prototype.clone=function(){var e=new _0x4ccf7f(this.radius,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x4ccf7f.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer}},_0x4ccf7f.prototype.getEffectDefines=function(e){e.push("SPHEREEMITTER")},_0x4ccf7f.prototype.getClassName=function(){return"SphereParticleEmitter"},_0x4ccf7f.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},_0x4ccf7f.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer};var _0x2c3c18=(_0x36899b=!0,function(e,t){var i=_0x36899b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x36899b=!1,i}),_0x17cc0a=_0x2c3c18(void 0,(function(){return _0x17cc0a.toString().search("(((.+)+)+)+$").toString().constructor(_0x17cc0a).search("(((.+)+)+)+$")})),_0x36899b;function _0x33b36c(e,t,i){void 0===e&&(e=1),void 0===t&&(t=new o$1p(0,1,0)),void 0===i&&(i=new o$1p(0,1,0)),this.radius=e,this.height=1,this.radiusRange=1,this.directionRandomizer=0;var n=this;return n.direction1=t,n.direction2=i,n}_0x17cc0a();var _0x366826=new o$1p;_0x33b36c.prototype.startDirectionFunction=function(e,t,i){var n=_0x442216.RandomRange(this.direction1.x,this.direction2.x),r=_0x442216.RandomRange(this.direction1.y,this.direction2.y),o=_0x442216.RandomRange(this.direction1.z,this.direction2.z);_0x366826.x=n,_0x366826.y=o,_0x366826.z=r,p$1d.multiplyByDirection(e,_0x366826,t)},_0x33b36c.prototype.startPositionFunction=function(e,t,i){var n=_0x442216.RandomRange(this.direction1.x,this.direction2.x),r=_0x442216.RandomRange(this.direction1.y,this.direction2.y),o=_0x442216.RandomRange(this.direction1.z,this.direction2.z);_0x366826.x=n,_0x366826.y=o,_0x366826.z=r,p$1d.multiplyByPoint(e,_0x366826,t)},_0x33b36c.prototype.clone=function(){var e=new _0x33b36c(this.radius,this.direction1,this.direction2);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x33b36c.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.radiusRange=function(){return t.radiusRange},e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x33b36c.prototype.getEffectDefines=function(e){e.push("SPHEREEMITTER"),e.push("DIRECTEDSPHEREEMITTER")},_0x33b36c.prototype.getClassName=function(){return"SphereDirectedParticleEmitter"},_0x33b36c.prototype.serialize=function(){var e=_super.prototype.serialize.call(this);return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},_0x33b36c.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer,o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2)};var _0x5238a3=(_0x451c92=!0,function(e,t){var i=_0x451c92?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x451c92=!1,i}),_0x93d8f1=_0x5238a3(void 0,(function(){return _0x93d8f1.toString().search("(((.+)+)+)+$").toString().constructor(_0x93d8f1).search("(((.+)+)+)+$")})),_0x451c92;function _0x36b207(e,t,i){void 0===e&&(e=1),void 0===t&&(t=Math.PI),void 0===i&&(i=0),this.directionRandomizer=i,this.radiusRange=1,this.heightRange=1,this.emitFromSpawnPointOnly=!1,this.angle=t,this.radius=e}_0x93d8f1(),Object.defineProperty(_0x36b207.prototype,"radius",{get:function(){return this._radius},set:function(e){this._radius=e,this._buildHeight()},enumerable:!1,configurable:!0}),Object.defineProperty(_0x36b207.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this._buildHeight()},enumerable:!1,configurable:!0}),_0x36b207.prototype._buildHeight=function(){0!==this._angle?this._height=this._radius/Math.tan(this._angle/2):this._height=1};var _0x1c28a8=new o$1p;_0x36b207.prototype.startDirectionFunction=function(e,t,i,n){n?(o$1p.clone(i._localPositio,_0x1c28a8),o$1p.normalize(_0x1c28a8,_0x1c28a8)):(_0x1c28a8=p$1d.getTranslation(e,_0x1c28a8),o$1p.subtract(i.position,_0x1c28a8,_0x1c28a8),0==!o$1p.magnitudeSquared(_0x1c28a8)&&o$1p.normalize(_0x1c28a8,_0x1c28a8));var r=_0x442216.RandomRange(0,this.directionRandomizer),o=_0x442216.RandomRange(0,this.directionRandomizer),a=_0x442216.RandomRange(0,this.directionRandomizer);t.x=_0x1c28a8.x+r,t.y=_0x1c28a8.y+o,t.z=_0x1c28a8.z+a,0==!o$1p.magnitudeSquared(t)&&o$1p.normalize(t,t)},_0x36b207.prototype.startPositionFunction=function(e,t,i,n){var r,o=_0x442216.RandomRange(0,2*Math.PI);this.emitFromSpawnPointOnly?r=1e-4:r=1-(r=_0x442216.RandomRange(0,this.heightRange))*r;var a=this._radius-_0x442216.RandomRange(0,this._radius*this.radiusRange),s=(a*=r)*Math.sin(o),l=a*Math.cos(o),u=r*this._height;if(n)return t.x=s,t.y=l,void(t.z=u);_0x1c28a8.x=s,_0x1c28a8.y=l,_0x1c28a8.z=u,p$1d.multiplyByPoint(e,_0x1c28a8,t)},_0x36b207.prototype.clone=function(){var e=new _0x36b207(this._radius,this._angle,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e};var _0x35b121=new o$1o,_0x1a23c7=new o$1o;_0x36b207.prototype.applyToShader=function(e){var t=this;e.radius=function(){return _0x35b121.x=t._radius,_0x35b121.y=t.radiusRange,_0x35b121},e.coneAngle=function(){return t._angle},e.height=function(){return _0x1a23c7.x=t._height,_0x1a23c7.y=t.heightRange,_0x1a23c7},e.directionRandomizer=function(){return t.directionRandomizer}},_0x36b207.prototype.getEffectDefines=function(e){e.push("CONEEMITTER"),this.emitFromSpawnPointOnly&&e.push("CONEEMITTERSPAWNPOINT")},_0x36b207.prototype.getClassName=function(){return"ConeParticleEmitter"},_0x36b207.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this._radius,e.angle=this._angle,e.directionRandomizer=this.directionRandomizer,e.radiusRange=this.radiusRange,e.heightRange=this.heightRange,e.emitFromSpawnPointOnly=this.emitFromSpawnPointOnly,e},_0x36b207.prototype.parse=function(e){this.radius=e.radius,this.angle=e.angle,this.directionRandomizer=e.directionRandomizer,this.radiusRange=void 0!==e.radiusRange?e.radiusRange:1,this.heightRange=void 0!==e.radiusRange?e.heightRange:1,this.emitFromSpawnPointOnly=void 0!==e.emitFromSpawnPointOnly&&e.emitFromSpawnPointOnly};var _0x2d75e1=(_0x2c0272=!0,function(e,t){var i=_0x2c0272?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c0272=!1,i}),_0x571dc0=_0x2d75e1(void 0,(function(){return _0x571dc0.toString().search("(((.+)+)+)+$").toString().constructor(_0x571dc0).search("(((.+)+)+)+$")})),_0x2c0272;function _0x18139b(e,t,i,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=0),this.radius=e,this.height=t,this.radiusRange=i,this.directionRandomizer=n}_0x571dc0();var _0x40b7f0=new o$1p;_0x18139b.prototype.startDirectionFunction=function(e,t,i,n){_0x40b7f0=p$1d.getTranslation(e,_0x40b7f0);var r=new o$1p;o$1p.subtract(i.position,_0x40b7f0,r),o$1p.normalize(r,r);var o=_0x442216.RandomRange(-this.directionRandomizer/2,this.directionRandomizer/2),a=Math.atan2(r.x,r.z);a+=_0x442216.RandomRange(-Math.PI/2,Math.PI/2)*this.directionRandomizer,r.z=o,r.x=Math.sin(a),r.y=Math.cos(a),o$1p.normalize(r,r),n?o$1p.clone(r,t):p$1d.multiplyByDirection(e,r,t)},_0x18139b.prototype.startPositionFunction=function(e,t,i,n){var r=_0x442216.RandomRange(-this.height/2,this.height/2),o=_0x442216.RandomRange(0,2*Math.PI),a=_0x442216.RandomRange((1-this.radiusRange)*(1-this.radiusRange),1),s=Math.sqrt(a)*this.radius,l=s*Math.cos(o),u=s*Math.sin(o);if(n)return t.x=l,t.y=r,void(t.z=u);_0x40b7f0.x=l,_0x40b7f0.y=r,_0x40b7f0.z=u,p$1d.multiplyByPoint(e,_0x40b7f0,t)},_0x18139b.prototype.clone=function(){var e=new _0x18139b(this.radius,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x18139b.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.height=function(){return t.height},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer}},_0x18139b.prototype.getEffectDefines=function(e){e.push("CYLINDEREMITTER")},_0x18139b.prototype.getClassName=function(){return"CylinderParticleEmitter"},_0x18139b.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.height=this.height,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},_0x18139b.prototype.parse=function(e){this.radius=e.radius,this.height=e.height,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer};var _0x3e9c71=(_0x15e004=!0,function(e,t){var i=_0x15e004?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x15e004=!1,i}),_0x369bf4=_0x3e9c71(void 0,(function(){return _0x369bf4.toString().search("(((.+)+)+)+$").toString().constructor(_0x369bf4).search("(((.+)+)+)+$")})),_0x15e004;function _0x5a4942(e,t,i,n,r){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=new o$1p(0,1,0)),void 0===r&&(r=new o$1p(0,1,0)),this.radius=e,this.height=t,this.radiusRange=i,this.directionRandomizer=0;var o=this;return o.direction1=n,o.direction2=r,o}_0x369bf4();var _0x4d97c7=new o$1p;_0x5a4942.prototype.startDirectionFunction=function(e,t,i){var n=_0x442216.RandomRange(this.direction1.x,this.direction2.x),r=_0x442216.RandomRange(this.direction1.y,this.direction2.y),o=_0x442216.RandomRange(this.direction1.z,this.direction2.z);_0x4d97c7.x=n,_0x4d97c7.y=r,_0x4d97c7.z=o,p$1d.multiplyByDirection(e,_0x4d97c7,t)},_0x5a4942.prototype.startPositionFunction=function(e,t,i){var n=_0x442216.RandomRange(this.direction1.x,this.direction2.x),r=_0x442216.RandomRange(this.direction1.y,this.direction2.y),o=_0x442216.RandomRange(this.direction1.z,this.direction2.z);_0x4d97c7.x=n,_0x4d97c7.y=o,_0x4d97c7.z=r,p$1d.multiplyByPoint(e,_0x4d97c7,t)},_0x5a4942.prototype.clone=function(){var e=new _0x5a4942(this.radius,this.height,this.radiusRange,this.direction1,this.direction2);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x5a4942.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.height=function(){return t.height},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer},e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x5a4942.prototype.getEffectDefines=function(e){e.push("CYLINDEREMITTER"),e.push("CYLINDEREMITDIRECTEDCYLINDEREMITTERTER")},_0x5a4942.prototype.getClassName=function(){return"CylinderDirectedParticleEmitter"},_0x5a4942.prototype.serialize=function(){var e=_super.prototype.serialize.call(this);return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},_0x5a4942.prototype.parse=function(e){this.radius=e.radius,this.height=e.height,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer,o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2)};var _0x35dac9=(_0xbe0daf=!0,function(e,t){var i=_0xbe0daf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xbe0daf=!1,i}),_0x1fc96c=_0x35dac9(void 0,(function(){return _0x1fc96c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fc96c).search("(((.+)+)+)+$")})),_0xbe0daf;function _0x4b20a8(e,t,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=i}_0x1fc96c();var _0x5b9ae0=new o$1p;_0x4b20a8.prototype.startDirectionFunction=function(e,t,i,n){_0x5b9ae0=p$1d.getTranslation(e,_0x5b9ae0);var r=new o$1p;o$1p.subtract(i.position,_0x5b9ae0,r),o$1p.normalize(r,r);var o=_0x442216.RandomRange(0,this.directionRandomizer),a=_0x442216.RandomRange(0,this.directionRandomizer),s=_0x442216.RandomRange(0,this.directionRandomizer);r.x+=o,r.y+=a,r.z+=s,o$1p.normalize(r,r),n?o$1p.clone(r,t):p$1d.multiplyByDirection(e,r,t)},_0x4b20a8.prototype.startPositionFunction=function(e,t,i,n){var r=this.radius-_0x442216.RandomRange(0,this.radius*this.radiusRange),o=_0x442216.RandomRange(0,1),a=_0x442216.RandomRange(0,2*Math.PI),s=Math.acos(2*o-1),l=r*Math.cos(a)*Math.sin(s),u=r*Math.cos(s),c=r*Math.sin(a)*Math.sin(s);if(n)return t.x=l,t.y=c,void(t.z=Math.abs(u));_0x5b9ae0.x=l,_0x5b9ae0.y=c,_0x5b9ae0.z=Math.abs(u),p$1d.multiplyByPoint(e,_0x5b9ae0,t)},_0x4b20a8.prototype.clone=function(){var e=new _0x4b20a8(this.radius,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x4b20a8.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer}},_0x4b20a8.prototype.getEffectDefines=function(e){e.push("HEMISPHERICEMITTER")},_0x4b20a8.prototype.getClassName=function(){return"HemisphericParticleEmitter"},_0x4b20a8.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},_0x4b20a8.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer};var _0x7cfaad=(_0x1a2385=!0,function(e,t){var i=_0x1a2385?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a2385=!1,i}),_0x52f1f0=_0x7cfaad(void 0,(function(){return _0x52f1f0.toString().search("(((.+)+)+)+$").toString().constructor(_0x52f1f0).search("(((.+)+)+)+$")})),_0x1a2385;function _0xaf014b(){this.direction1=new o$1p(0,1,0),this.direction2=new o$1p(0,1,0)}_0x52f1f0();var _0x4dbc0b=new o$1p;_0xaf014b.prototype.startDirectionFunction=function(e,t,i,n){var r=_0x442216.RandomRange(this.direction1.x,this.direction2.x),o=_0x442216.RandomRange(this.direction1.y,this.direction2.y),a=_0x442216.RandomRange(this.direction1.z,this.direction2.z);if(n)return t.x=r,t.y=a,void(t.z=o);_0x4dbc0b.x=r,_0x4dbc0b.y=a,_0x4dbc0b.z=o,p$1d.multiplyByDirection(e,_0x4dbc0b,t)},_0xaf014b.prototype.startPositionFunction=function(e,t,i,n){if(n)return t.x=0,t.y=0,void(t.z=0);p$1d.multiplyByPoint(e,o$1p.ZERO,t)},_0xaf014b.prototype.clone=function(){var e=new _0xaf014b;return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0xaf014b.prototype.applyToShader=function(e){var t=this;e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0xaf014b.prototype.getEffectDefines=function(e){e.push("POINTEMITTER")},_0xaf014b.prototype.getClassName=function(){return"PointParticleEmitter"},_0xaf014b.prototype.serialize=function(){var e={};e.type=this.getClassName();var t=[],i=[];return o$1p.pack(this.direction1,t,0),o$1p.pack(this.direction2,i,0),e.direction1=t,e.direction2=i,e},_0xaf014b.prototype.parse=function(e){o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2)};var _0x17a905=(_0x29ab8a=!0,function(e,t){var i=_0x29ab8a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29ab8a=!1,i}),_0x5a42d1=_0x17a905(void 0,(function(){return _0x5a42d1.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a42d1).search("(((.+)+)+)+$")})),_0x29ab8a;function _0x4c62f8(){this.direction1=new o$1p(0,1,0),this.direction2=new o$1p(0,1,0),this.minEmitBox=new o$1p(-.5,-.5,-.5),this.maxEmitBox=new o$1p(.5,.5,.5)}_0x5a42d1();var _0x22b254=new o$1p;_0x4c62f8.prototype.startDirectionFunction=function(e,t,i,n){var r=_0x442216.RandomRange(this.direction1.x,this.direction2.x),o=_0x442216.RandomRange(this.direction1.y,this.direction2.y),a=_0x442216.RandomRange(this.direction1.z,this.direction2.z);if(n)return t.x=r,t.y=a,void(t.z=o);_0x22b254.x=r,_0x22b254.y=a,_0x22b254.z=o,p$1d.multiplyByDirection(e,_0x22b254,t)},_0x4c62f8.prototype.startPositionFunction=function(e,t,i,n){var r=_0x442216.RandomRange(this.minEmitBox.x,this.maxEmitBox.x),o=_0x442216.RandomRange(this.minEmitBox.y,this.maxEmitBox.y),a=_0x442216.RandomRange(this.minEmitBox.z,this.maxEmitBox.z);if(n)return t.x=r,t.y=a,void(t.z=o);_0x22b254.x=r,_0x22b254.y=a,_0x22b254.z=o,p$1d.multiplyByPoint(e,_0x22b254,t)},_0x4c62f8.prototype.clone=function(){var e=new _0x4c62f8;return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x4c62f8.prototype.applyToShader=function(e){var t=this;e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2},e.minEmitBox=function(){return t.minEmitBox},e.maxEmitBox=function(){return t.maxEmitBox}},_0x4c62f8.prototype.getEffectDefines=function(e){e.push("BOXEMITTER")},_0x4c62f8.prototype.getClassName=function(){return"BoxParticleEmitter"},_0x4c62f8.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e.minEmitBox=this.minEmitBox.asArray(),e.maxEmitBox=this.maxEmitBox.asArray(),e},_0x4c62f8.prototype.parse=function(e){o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2),o$1p.unpack(e.minEmitBox,0,this.minEmitBox),o$1p.unpack(e.maxEmitBox,0,this.maxEmitBox)};var _0x3c7661=(_0x59632f=!0,function(e,t){var i=_0x59632f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59632f=!1,i}),_0x16c802=_0x3c7661(void 0,(function(){return _0x16c802.toString().search("(((.+)+)+)+$").toString().constructor(_0x16c802).search("(((.+)+)+)+$")})),_0x59632f;_0x16c802();var _0x105c2f={BILLBOARDMODE_Y:2,BILLBOARDMODE_ALL:7,BILLBOARDMODE_STRETCHED:8},_0xbf6524=Object.freeze(_0x105c2f),_0x7e29ce=(_0x2e8296=!0,function(e,t){var i=_0x2e8296?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e8296=!1,i}),_0x3dea12=_0x7e29ce(void 0,(function(){return _0x3dea12.toString().search("(((.+)+)+)+$").toString().constructor(_0x3dea12).search("(((.+)+)+)+$")})),_0x2e8296;_0x3dea12();var _0x41ccd3={BLENDMODE_ONEONE:0,BLENDMODE_STANDARD:1,BLENDMODE_ADD:2,BLENDMODE_MULTIPLY:3,BLENDMODE_MULTIPLYADD:4},_0x4d4f68=Object.freeze(_0x41ccd3),_0x3ffee2=(_0x45896c=!0,function(e,t){var i=_0x45896c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45896c=!1,i}),_0x1d0e34=_0x3ffee2(void 0,(function(){return _0x1d0e34.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d0e34).search("(((.+)+)+)+$")})),_0x45896c;function _0x439851(e){this.animations=[],this.renderingGroupId=0,this.emitter=new o$1p(0,0,0),this.emitRate=10,this.manualEmitCount=-1,this.updateSpeed=.01,this.targetStopDuration=0,this.disposeOnStop=!1,this.minEmitPower=1,this.maxEmitPower=1,this.minLifeTime=1,this.maxLifeTime=1,this.minSize=1,this.maxSize=1,this.minScaleX=1,this.maxScaleX=1,this.minScaleY=1,this.maxScaleY=1,this.minInitialRotation=0,this.maxInitialRotation=0,this.minAngularSpeed=0,this.maxAngularSpeed=0,this.layerMask=268435455,this.customShader=null,this.preventAutoStart=!1,this.noiseStrength=new o$1p(10,10,10),this.onAnimationEnd=null,this.blendMode=_0x439851.BLENDMODE_ONEONE,this.forceDepthWrite=!1,this.preWarmCycles=0,this.preWarmStepOffset=1,this.spriteCellChangeSpeed=1,this.startSpriteCellID=0,this.endSpriteCellID=0,this.spriteCellWidth=0,this.spriteCellHeight=0,this.spriteRandomStartCell=!1,this.translationPivot=new o$1o(0,0),this.beginAnimationOnStart=!1,this.beginAnimationFrom=0,this.beginAnimationTo=60,this.beginAnimationLoop=!1,this.worldOffset=new o$1p(0,0,0),this.gravity=new o$1p(0,0,0),this._colorGradients=null,this._sizeGradients=null,this._lifeTimeGradients=null,this._angularSpeedGradients=null,this._velocityGradients=null,this._limitVelocityGradients=null,this._dragGradients=null,this._emitRateGradients=null,this._startSizeGradients=null,this._rampGradients=null,this._colorRemapGradients=null,this._alphaRemapGradients=null,this.startDelay=0,this.limitVelocityDamping=.4,this.color1=new e$1X(1,1,1,1),this.color2=new e$1X(1,1,1,1),this.colorDead=new e$1X(0,0,0,1),this.textureMask=new e$1X(1,1,1,1),this._isSubEmitter=!1,this.billboardMode=_0xbf6524.PARTICLES_BILLBOARDMODE_ALL,this._isBillboardBased=!0,this.id=e,this.name=e}_0x1d0e34(),Object.defineProperties(_0x439851.prototype,{noiseTexture:{get:function(){return this._noiseTexture},set:function(e){this._noiseTexture!==e&&(this._noiseTexture=e,this._reset())}},isAnimationSheetEnabled:{get:function(){return this._isAnimationSheetEnabled},set:function(e){this._isAnimationSheetEnabled!=e&&(this._isAnimationSheetEnabled=e,this._reset())}},direction1:{get:function(){return this.particleEmitterType.direction1?this.particleEmitterType.direction1:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.direction1&&(this.particleEmitterType.direction1=e)}},direction2:{get:function(){return this.particleEmitterType.direction2?this.particleEmitterType.direction2:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.direction2&&(this.particleEmitterType.direction2=e)}},minEmitBox:{get:function(){return this.particleEmitterType.minEmitBox?this.particleEmitterType.minEmitBox:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.minEmitBox&&(this.particleEmitterType.minEmitBox=e)}},maxEmitBox:{get:function(){return this.particleEmitterType.maxEmitBox?this.particleEmitterType.maxEmitBox:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.maxEmitBox&&(this.particleEmitterType.maxEmitBox=e)}},isBillboardBased:{get:function(){return this._isBillboardBased},set:function(e){this._isBillboardBased!==e&&(this._isBillboardBased=e,this._reset())}}}),_0x439851.prototype.getScene=function(){return this._scene},_0x439851.prototype._hasTargetStopDurationDependantGradient=function(){return this._startSizeGradients&&this._startSizeGradients.length>0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0},_0x439851.prototype.getDragGradients=function(){return this._dragGradients},_0x439851.prototype.getLimitVelocityGradients=function(){return this._limitVelocityGradients},_0x439851.prototype.getColorGradients=function(){return this._colorGradients},_0x439851.prototype.getSizeGradients=function(){return this._sizeGradients},_0x439851.prototype.getColorRemapGradients=function(){return this._colorRemapGradients},_0x439851.prototype.getAlphaRemapGradients=function(){return this._alphaRemapGradients},_0x439851.prototype.getLifeTimeGradients=function(){return this._lifeTimeGradients},_0x439851.prototype.getAngularSpeedGradients=function(){return this._angularSpeedGradients},_0x439851.prototype.getVelocityGradients=function(){return this._velocityGradients},_0x439851.prototype.getStartSizeGradients=function(){return this._startSizeGradients},_0x439851.prototype.getEmitRateGradients=function(){return this._emitRateGradients},_0x439851.prototype._reset=function(){},_0x439851.prototype._removeGradientAndTexture=function(e,t,i){if(!t)return this;for(var n=0,r=0,o=t;r<o.length;r++){if(o[r].gradient===e){t.splice(n,1);break}n++}return i&&i.dispose(),this},_0x439851.prototype.createPointEmitter=function(e,t){var i=new _0xaf014b;return i.direction1=e,i.direction2=t,this.particleEmitterType=i,i},_0x439851.prototype.createHemisphericEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1);var i=new _0x4b20a8(e,t);return this.particleEmitterType=i,i},_0x439851.prototype.createSphereEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1);var i=new _0x4ccf7f(e,t);return this.particleEmitterType=i,i},_0x439851.prototype.createDirectedSphereEmitter=function(e,t,i){void 0===e&&(e=1),void 0===t&&(t=new o$1p(0,0,1)),void 0===i&&(i=new o$1p(0,0,1));var n=new _0x33b36c(e,t,i);return this.particleEmitterType=n,n},_0x439851.prototype.createCylinderEmitter=function(e,t,i,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=0);var r=new _0x18139b(e,t,i,n);return this.particleEmitterType=r,r},_0x439851.prototype.createDirectedCylinderEmitter=function(e,t,i,n,r){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=new o$1p(0,0,1)),void 0===r&&(r=new o$1p(0,0,1));var o=new _0x5a4942(e,t,i,n,r);return this.particleEmitterType=o,o},_0x439851.prototype.createConeEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=Math.PI/4);var i=new _0x36b207(e,t);return this.particleEmitterType=i,i},_0x439851.prototype.createBoxEmitter=function(e,t,i,n){var r=new _0x4c62f8;return this.particleEmitterType=r,this.direction1=e,this.direction2=t,this.minEmitBox=i,this.maxEmitBox=n,r},_0x439851._setRenderState=function(e,t){var i={};switch(t){case _0x4d4f68.BLENDMODE_ADD:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.SOURCE_ALPHA,functionSourceAlpha:l$13.ONE,functionDestinationRgb:l$13.ONE,functionDestinationAlpha:l$13.ONE}});break;case _0x4d4f68.BLENDMODE_ONEONE:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.ONE,functionSourceAlpha:l$13.ONE,functionDestinationRgb:l$13.ONE,functionDestinationAlpha:l$13.ONE}});break;case _0x4d4f68.BLENDMODE_STANDARD:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.SOURCE_ALPHA,functionSourceAlpha:l$13.ONE,functionDestinationRgb:l$13.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:l$13.ONE_MINUS_SOURCE_ALPHA}});break;case _0x4d4f68.BLENDMODE_MULTIPLY:case _0x4d4f68.BLENDMODE_MULTIPLYADD:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.DESTINATION_COLOR,functionSourceAlpha:l$13.ZERO,functionDestinationRgb:l$13.ONE,functionDestinationAlpha:l$13.ONE}})}e.renderState=i},_0x439851._Parse=function(e,t){var i;e.texture?((i=new Image).src=e.texture.url,i.onload=function(){e$2e(t.particleTexture)||(t.particleTexture=new t$U({context:t._context,source:this,pixelFormat:V$12.RGBA,flipY:!1})),t.particleTexture.name=e.texture.url}):e.textureName&&((i=new Image).src=e.textureName,i.onload=function(){e$2e(t.particleTexture)||(t.particleTexture=new t$U({context:t._context,source:this,pixelFormat:V$12.RGBA,flipY:!1})),t.particleTexture.name=e.textureName});if(e.emitterId||0===e.emitterId||void 0!==e.emitter){if(!e.emitterId){var n=new o$1p;n.x=e.emitter[0],n.y=e.emitter[2],n.z=e.emitter[1],t.emitter=n}}else t.emitter=new o$1p(0,0,0);if(t.isLocal=!1,void 0!==e.renderingGroupId&&(t.renderingGroupId=e.renderingGroupId),void 0!==e.isBillboardBased&&(t.isBillboardBased=e.isBillboardBased),void 0!==e.billboardMode&&(t.billboardMode=e.billboardMode),e.animations){for(var r=0;r<e.animations.length;r++){var o=e.animations[r];t.animations.push(_0x48b138.Parse(o))}t.beginAnimationOnStart=e.beginAnimationOnStart,t.beginAnimationFrom=e.beginAnimationFrom,t.beginAnimationTo=e.beginAnimationTo,t.beginAnimationLoop=e.beginAnimationLoop}e.autoAnimate&&scene&&scene.beginAnimation(t,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),t.startDelay=0|e.startDelay,t.minAngularSpeed=e.minAngularSpeed,t.maxAngularSpeed=e.maxAngularSpeed,t.minSize=e.minSize,t.maxSize=e.maxSize,e.minScaleX&&(t.minScaleX=e.minScaleX,t.maxScaleX=e.maxScaleX,t.minScaleY=e.minScaleY,t.maxScaleY=e.maxScaleY),void 0!==e.preWarmCycles&&(t.preWarmCycles=e.preWarmCycles,t.preWarmStepOffset=e.preWarmStepOffset),void 0!==e.minInitialRotation&&(t.minInitialRotation=e.minInitialRotation,t.maxInitialRotation=e.maxInitialRotation),t.minLifeTime=e.minLifeTime,t.maxLifeTime=e.maxLifeTime,t.minEmitPower=e.minEmitPower,t.maxEmitPower=e.maxEmitPower,t.emitRate=e.emitRate;var a=new o$1p;if(a.x=e.gravity[0],a.y=e.gravity[2],a.z=e.gravity[1],t.gravity=a,e.noiseStrength){var s=new o$1p;s.x=e.noiseStrength[0],s.y=e.noiseStrength[2],s.z=e.noiseStrength[1],t.noiseStrength=s}var l,u=new e$1X,c=new e$1X,h=new e$1X;if(e$1X.unpack(e.color1,0,u),e$1X.unpack(e.color2,0,c),e$1X.unpack(e.colorDead,0,h),t.color1=u,t.color2=c,t.colorDead=h,t.updateSpeed=e.updateSpeed,t.targetStopDuration=e.targetStopDuration,t.blendMode=e.blendMode,e.colorGradients)for(var d=0,f=e.colorGradients;d<f.length;d++){var p=f[d],_=new e$1X;e$1X.unpack(p.color1,0,_);var m=void 0;p.color2&&(m=new e$1X,e$1X.unpack(p.color2,0,m)),t.addColorGradient(p.gradient,_,m)}if(e.rampGradients){for(var g=0,x=e.rampGradients;g<x.length;g++){var y=x[g],v=new e$1X;e$1X.unpack(y.color,0,v),t.addRampGradient(y.gradient,v)}t.useRampGradients=e.useRampGradients}if(e.colorRemapGradients)for(var $=0,b=e.colorRemapGradients;$<b.length;$++){var T=b[$];t.addColorRemapGradient(T.gradient,void 0!==T.factor1?T.factor1:T.factor,T.factor2)}if(e.alphaRemapGradients)for(var C=0,S=e.alphaRemapGradients;C<S.length;C++){var w=S[C];t.addAlphaRemapGradient(w.gradient,void 0!==w.factor1?w.factor1:w.factor,w.factor2)}if(e.sizeGradients)for(var E=0,P=e.sizeGradients;E<P.length;E++){var A=P[E];t.addSizeGradient(A.gradient,void 0!==A.factor1?A.factor1:A.factor,A.factor2)}if(e.angularSpeedGradients)for(var L=0,M=e.angularSpeedGradients;L<M.length;L++){var R=M[L];t.addAngularSpeedGradient(R.gradient,void 0!==R.factor1?R.factor1:R.factor,R.factor2)}if(e.velocityGradients)for(var O=0,D=e.velocityGradients;O<D.length;O++){var I=D[O];t.addVelocityGradient(I.gradient,void 0!==I.factor1?I.factor1:I.factor,I.factor2)}if(e.dragGradients)for(var F=0,B=e.dragGradients;F<B.length;F++){var N=B[F];t.addDragGradient(N.gradient,void 0!==N.factor1?N.factor1:N.factor,N.factor2)}if(e.emitRateGradients)for(var G=0,z=e.emitRateGradients;G<z.length;G++){var U=z[G];t.addEmitRateGradient(U.gradient,void 0!==U.factor1?U.factor1:U.factor,U.factor2)}if(e.startSizeGradients)for(var V=0,k=e.startSizeGradients;V<k.length;V++){var W=k[V];t.addStartSizeGradient(W.gradient,void 0!==W.factor1?W.factor1:W.factor,W.factor2)}if(e.lifeTimeGradients)for(var H=0,q=e.lifeTimeGradients;H<q.length;H++){var j=q[H];t.addLifeTimeGradient(j.gradient,void 0!==j.factor1?j.factor1:j.factor,j.factor2)}if(e.limitVelocityGradients){for(var X=0,Y=e.limitVelocityGradients;X<Y.length;X++){var Z=Y[X];t.addLimitVelocityGradient(Z.gradient,void 0!==Z.factor1?Z.factor1:Z.factor,Z.factor2)}t.limitVelocityDamping=e.limitVelocityDamping}if(e.particleEmitterType){switch(e.particleEmitterType.type){case"SphereParticleEmitter":l=new _0x4ccf7f;break;case"SphereDirectedParticleEmitter":l=new _0x33b36c;break;case"ConeEmitter":case"ConeParticleEmitter":l=new _0x36b207;break;case"CylinderParticleEmitter":l=new _0x18139b;break;case"CylinderDirectedParticleEmitter":l=new _0x5a4942;break;case"HemisphericParticleEmitter":l=new _0x4b20a8;break;case"PointParticleEmitter":l=new _0xaf014b;break;case"MeshParticleEmitter":l=new MeshParticleEmitter;break;default:l=new _0x4c62f8}l.parse(e.particleEmitterType)}else(l=new _0x4c62f8).parse(e,scene);t.particleEmitterType=l,t.startSpriteCellID=e.startSpriteCellID,t.endSpriteCellID=e.endSpriteCellID,t.spriteCellWidth=e.spriteCellWidth,t.spriteCellHeight=e.spriteCellHeight,t.spriteCellChangeSpeed=e.spriteCellChangeSpeed,t.spriteRandomStartCell=e.spriteRandomStartCell};var _0x4dc61a=(_0x4fe41c=!0,function(e,t){var i=_0x4fe41c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fe41c=!1,i}),_0x43942f=_0x4dc61a(void 0,(function(){return _0x43942f.toString().search("(((.+)+)+)+$").toString().constructor(_0x43942f).search("(((.+)+)+)+$")})),_0x4fe41c;function _0x30da6f(e,t){this.gradient=e,this.color=t}_0x43942f();var _0x4772c3=(_0x6d21e4=!0,function(e,t){var i=_0x6d21e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6d21e4=!1,i}),_0x41e7eb=_0x4772c3(void 0,(function(){return _0x41e7eb.toString().search("(((.+)+)+)+$").toString().constructor(_0x41e7eb).search("(((.+)+)+)+$")})),_0x6d21e4;function _0x180241(e,t,i){this.gradient=e,this.color1=t,this.color2=i}_0x41e7eb(),_0x180241.prototype.getColorToRef=function(e){this.color2?e$1X.lerp(this.color1,this.color2,Math.random(),e):e$1X.clone(this.color1,e)};var _0x19f519=(_0x3b8c48=!0,function(e,t){var i=_0x3b8c48?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b8c48=!1,i}),_0xa76261=_0x19f519(void 0,(function(){return _0xa76261.toString().search("(((.+)+)+)+$").toString().constructor(_0xa76261).search("(((.+)+)+)+$")})),_0x3b8c48;function _0x341870(e,t,i){this.gradient=e,this.factor1=t,this.factor2=i}function g$u(e,t){if(t!==e._currentFramebuffer){var i;e._currentFramebuffer=t,typeof WebGLRenderingContext<"u"&&(i=[de$y.BACK]);var n=i;if(e$2e(t))t._bind(),n=t._getActiveColorAttachments();else{var r=e._gl;r.bindFramebuffer(r.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}function B$i(e,t,i,n){var r=e._currentRenderState,o=e._currentPassState,a=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,d$1m.partialApply(e._gl,r,t,o,i,a,i.viewport,n)}function u$m(e,t,i,n){var r=u$Z(i._renderState,e._defaultRenderState);if(e$2e(t)&&r.depthTest&&r.depthTest.enabled&&!t.hasDepthAttachment)throw new t$15("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");g$u(e,t),B$i(e,r,n,!1)}function s$i(e){this._pointCount=e.pointCount,this._primitiveMode=e.primitiveMode,this._feedbackShaderProgram=e.feedbackShader,this._normalShaderProgram=e.normalShader,this._modelMatrix=e.modelMatrix,this._normalShaderUniformMap=e.normalShaderUniformMap,this._feedbackShaderUniformMap=e.feedbackShaderUniformMap,this._attributes=e.attributes,this._framebuffer=e.framebuffer,this._renderState=e.renderState,this._indices=e.indices,this._textureEffect=e.textureEffect,this._frameIdx=0,this._VBOs=new Array,this._VBOs[0]=new Array,this._VBOs[1]=new Array,this._indexBuffer=null,this._pass=Le$q.ANALYSIS,this._handle=void 0,this._gl=void 0,this.initialized=!1,this._drawEvent=new o$1h,this._uniformBuffers=[]}_0xa76261(),_0x341870.prototype.getFactor=function(){return void 0===this.factor2||this.factor2===this.factor1?this.factor1:this.factor1+(this.factor2-this.factor1)*Math.random()},s$i.prototype.beginDraw=function(e,t,i,n){u$m(e,t,i,n)},s$i.prototype.execute=function(e,t){var i=e._gl;if(this._gl=i,!this.initialized){for(var n=this._attributes.length,r=0;r<n;++r)this._addAttribute(e,this._attributes[r]);this._textureEffect&&this._createIndexBuffer(e),e$2e(this._handle)||(this._handle=i.createTransformFeedback()),this.initialized=!0}u$m(e,u$Z(this._framebuffer,t.framebuffer),this,t),this._bindVBOToVertexAttribute(e),this._enableVertexAttribArray(e,!0),this._drawTransformFeedback(e),this._drawNormal(e,t),this._drawEvent.raiseEvent(e,t),this._enableVertexAttribArray(e,!1),this._frameIdx=1-this._frameIdx},s$i.prototype._drawNormal=function(e,t){var i=e._gl;this._normalShaderProgram._bind(),e._us.model=u$Z(this._modelMatrix,p$1d.IDENTITY),this._normalShaderProgram._setUniforms(this._normalShaderUniformMap,e._us,e.validateShaderProgram,this),this._textureEffect?(i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,this._indexBuffer),i.drawElements(this._primitiveMode,this._indices.length,i.UNSIGNED_INT,0)):i.drawArrays(this._primitiveMode,0,this._pointCount)},s$i.prototype._drawTransformFeedback=function(e){var t=e._gl;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,this._handle),this._bindVBOToTransformFeedback(e,!0),this._feedbackShaderProgram._bind(),e._us.model=u$Z(this._modelMatrix,p$1d.IDENTITY),this._feedbackShaderProgram._setUniforms(this._feedbackShaderUniformMap,e._us,e.validateShaderProgram,this),t.enable(t.RASTERIZER_DISCARD),t.beginTransformFeedback(this._primitiveMode),this._textureEffect?t.drawArrays(this._primitiveMode,0,4*this._pointCount):t.drawArrays(this._primitiveMode,0,this._pointCount),t.endTransformFeedback(),t.disable(t.RASTERIZER_DISCARD),this._bindVBOToTransformFeedback(e,!1)},s$i.prototype._enableVertexAttribArray=function(e,t){for(var i=e._gl,n=0;n<this._attributes.length;n++){var r=this._attributes[n].index;t?i.enableVertexAttribArray(r):i.disableVertexAttribArray(r)}},s$i.prototype._bindVBOToVertexAttribute=function(e){for(var t=e._gl,i=0;i<this._attributes.length;i++){var n=this._attributes[i],r=n.index,o=n.componentsPerAttribute;t.bindBuffer(t.ARRAY_BUFFER,this._VBOs[this._frameIdx][r]._getBuffer()),t.vertexAttribPointer(r,o,t.FLOAT,!1,0,0)}},s$i.prototype._bindVBOToTransformFeedback=function(e,t){for(var i=e._gl,n=0;n<this._attributes.length;n++){var r=this._attributes[n].index,o=t?this._VBOs[1-this._frameIdx][r]._getBuffer():null;i.bindBufferBase(i.TRANSFORM_FEEDBACK_BUFFER,r,o)}},s$i.prototype._addAttribute=function(e,t){var i=t.data,n=t.index;this._VBOs[0][n]=this._createVBO(e,i),this._VBOs[1][n]=this._createVBO(e,i)},s$i.prototype._createVBO=function(e,t){return new t$X({context:e,bufferTarget:de$y.ARRAY_BUFFER,usage:de$y.DYNAMIC_DRAW,typedArray:t})},s$i.prototype._createIndexBuffer=function(e){var t=e._gl;this._indexBuffer=t.createBuffer(),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this._indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this._indices,t.STATIC_DRAW)},s$i.prototype.isDestroyed=function(){return!1},s$i.prototype.destroy=function(){e$2e(this._normalShaderProgram)&&(this._normalShaderProgram=this._normalShaderProgram&&this._normalShaderProgram.destroy()),e$2e(this._feedbackShaderProgram)&&(this._feedbackShaderProgram=this._feedbackShaderProgram&&this._feedbackShaderProgram.destroy());for(var e=0;e<this._attributes.length;e++){var t=this._attributes[e].index;this._VBOs[0][t].destroy(),this._VBOs[1][t].destroy()}return e$2e(this._indexBuffer)&&this._gl.deleteBuffer(this._indexBuffer),e$2e(this._handle)&&(this._handle=this._gl.deleteTransformFeedback(this._handle),this._handle=void 0),i$11(this)},Object.defineProperties(s$i.prototype,{pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e)}}});var _0x5d14f5="#version 300 es\n#define PI 3.14159\nuniform float currentCount;\nuniform float timeDelta;\nuniform float stopFactor;\n#ifndef LOCAL\nuniform mat4 emitterWM;\n#endif\nuniform vec2 lifeTime;\nuniform vec2 emitPower;\nuniform vec2 sizeRange;\nuniform vec4 scaleRange;\n\n#ifndef COLORGRADIENTS\nuniform vec4 color1;\nuniform vec4 color2;\n#endif\nuniform vec3 gravity;\nuniform sampler2D randomSampler;\nuniform sampler2D randomSampler2;\nuniform vec4 angleRange;\n\n#ifdef BOXEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\nuniform vec3 minEmitBox;\nuniform vec3 maxEmitBox;\n#endif\n\n#ifdef POINTEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#endif\n\n#ifdef HEMISPHERICEMITTER\nuniform float radius;\nuniform float radiusRange;\nuniform float directionRandomizer;\n#endif\n\n#ifdef SPHEREEMITTER\nuniform float radius;\nuniform float radiusRange;\n#ifdef DIRECTEDSPHEREEMITTER\n uniform vec3 direction1;\n uniform vec3 direction2;\n#else\n uniform float directionRandomizer;\n#endif\n#endif\n\n#ifdef CYLINDEREMITTER\nuniform float radius;\nuniform float height;\nuniform float radiusRange;\n#ifdef DIRECTEDCYLINDEREMITTER\n uniform vec3 direction1;\n uniform vec3 direction2;\n#else\n uniform float directionRandomizer;\n#endif\n#endif\n\n#ifdef CONEEMITTER\nuniform vec2 radius;\nuniform float coneAngle;\nuniform vec2 height;\nuniform float directionRandomizer;\n#endif\n\n// Particles state\nin vec3 position;\n#ifdef CUSTOMEMITTER\nin vec3 initialPosition;\n#endif\nin float age;\nin float life;\nin vec4 seed;\nin vec3 size;\n#ifndef COLORGRADIENTS\nin vec4 color;\n#endif\nin vec3 direction;\n#ifndef BILLBOARD\nin vec3 initialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nin float angle;\n#else\nin vec2 angle;\n#endif\n#ifdef ANIMATESHEET\nin float cellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nin float cellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nin vec3 noiseCoordinates1;\nin vec3 noiseCoordinates2;\n#endif\n\n// Output\nout vec3 outPosition;\n#ifdef CUSTOMEMITTER\nout vec3 outInitialPosition;\n#endif\nout float outAge;\nout float outLife;\nout vec4 outSeed;\nout vec3 outSize;\n#ifndef COLORGRADIENTS\nout vec4 outColor;\n#endif\nout vec3 outDirection;\n#ifndef BILLBOARD\nout vec3 outInitialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nout float outAngle;\n#else\nout vec2 outAngle;\n#endif\n#ifdef ANIMATESHEET\nout float outCellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nout float outCellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nout vec3 outNoiseCoordinates1;\nout vec3 outNoiseCoordinates2;\n#endif\n\n#ifdef SIZEGRADIENTS\nuniform sampler2D sizeGradientSampler;\n#endif\n\n#ifdef ANGULARSPEEDGRADIENTS\nuniform sampler2D angularSpeedGradientSampler;\n#endif\n\n#ifdef VELOCITYGRADIENTS\nuniform sampler2D velocityGradientSampler;\n#endif\n\n#ifdef LIMITVELOCITYGRADIENTS\nuniform sampler2D limitVelocityGradientSampler;\nuniform float limitVelocityDamping;\n#endif\n\n#ifdef DRAGGRADIENTS\nuniform sampler2D dragGradientSampler;\n#endif\n\n#ifdef NOISE\nuniform vec3 noiseStrength;\nuniform sampler2D noiseSampler;\n#endif\n\n#ifdef ANIMATESHEET\nuniform vec4 cellInfos;\n#endif\n\nvec3 getRandomVec3(float offset) {\n return texture(randomSampler2, vec2(float(gl_VertexID) * offset / currentCount, 0)).rgb;\n}\n\nvec4 getRandomVec4(float offset) {\n return texture(randomSampler, vec2(float(gl_VertexID) * offset / currentCount, 0));\n}\n\nvoid main() {\n float newAge = age + timeDelta;\n\n // If particle is dead and system is not stopped, spawn as new particle\n if (newAge >= life && stopFactor != 0.) {\n vec3 newPosition;\n vec3 newDirection;\n\n // Let's get some random values\n vec4 randoms = getRandomVec4(seed.x);\n\n // Age and life\n outLife = lifeTime.x + (lifeTime.y - lifeTime.x) * randoms.r;\n outAge = newAge - life;\n\n // Seed\n outSeed = seed;\n\n // Size\n#ifdef SIZEGRADIENTS\n outSize.x = texture(sizeGradientSampler, vec2(0, 0)).r;\n#else\n outSize.x = sizeRange.x + (sizeRange.y - sizeRange.x) * randoms.g;\n#endif\n outSize.y = scaleRange.x + (scaleRange.y - scaleRange.x) * randoms.b;\n outSize.z = scaleRange.z + (scaleRange.w - scaleRange.z) * randoms.a;\n\n#ifndef COLORGRADIENTS\n // Color\n outColor = color1 + (color2 - color1) * randoms.b;\n#endif\n\n // Angular speed\n#ifndef ANGULARSPEEDGRADIENTS\n outAngle.y = angleRange.x + (angleRange.y - angleRange.x) * randoms.a;\n outAngle.x = angleRange.z + (angleRange.w - angleRange.z) * randoms.r;\n#else\n outAngle = angleRange.z + (angleRange.w - angleRange.z) * randoms.r;\n#endif\n\n // Position / Direction (based on emitter type)\n#ifdef POINTEMITTER\n vec3 randoms2 = getRandomVec3(seed.y);\n vec3 randoms3 = getRandomVec3(seed.z);\n newPosition = vec3(0, 0, 0);\n newDirection = direction1 + (direction2 - direction1) * randoms3;\n#elif defined(BOXEMITTER)\n vec3 randoms2 = getRandomVec3(seed.y);\n vec3 randoms3 = getRandomVec3(seed.z);\n\n newPosition = minEmitBox + (maxEmitBox - minEmitBox) * randoms2;\n newDirection = direction1 + (direction2 - direction1) * randoms3;\n#elif defined(HEMISPHERICEMITTER)\n vec3 randoms2 = getRandomVec3(seed.y);\n vec3 randoms3 = getRandomVec3(seed.z);\n\n // Position on the sphere surface\n float phi = 2.0 * PI * randoms2.x;\n float theta = acos(2.0 * randoms2.y - 1.0);\n float randX = cos(phi) * sin(theta);\n float randY = sin(phi) * sin(theta);\n float randZ = cos(theta);\n newPosition = (radius - (radius * radiusRange * randoms2.z)) * vec3(randX, abs(randY), randZ);\n newDirection = newPosition + directionRandomizer * randoms3;\n#elif defined(SPHEREEMITTER)\n vec3 randoms2 = getRandomVec3(seed.y);\n vec3 randoms3 = getRandomVec3(seed.z);\n\n // Position on the sphere surface\n float phi = 2.0 * PI * randoms2.x;\n float theta = acos(2.0 * randoms2.y - 1.0);\n float randX = cos(phi) * sin(theta);\n float randY = cos(theta);\n float randZ = sin(phi) * sin(theta);\n\n newPosition = (radius - (radius * radiusRange * randoms2.z)) * vec3(randX, randY, randZ);\n\n #ifdef DIRECTEDSPHEREEMITTER\n newDirection = normalize(direction1 + (direction2 - direction1) * randoms3);\n #else\n // Direction\n newDirection = normalize(newPosition + directionRandomizer * randoms3);\n #endif\n#elif defined(CYLINDEREMITTER)\n vec3 randoms2 = getRandomVec3(seed.y);\n vec3 randoms3 = getRandomVec3(seed.z);\n\n // Position on the cylinder\n float zPos = (randoms2.x - 0.5)*height;\n float angle = randoms2.y * PI * 2.;\n float inverseRadiusRangeSquared = ((1.-radiusRange) * (1.-radiusRange));\n float positionRadius = radius*sqrt(inverseRadiusRangeSquared + (randoms2.z * (1.-inverseRadiusRangeSquared)));\n float xPos = positionRadius * cos(angle);\n float yPos = positionRadius * sin(angle);\n newPosition = vec3(xPos, yPos, zPos);\n\n #ifdef DIRECTEDCYLINDEREMITTER\n newDirection = direction1 + (direction2 - direction1) * randoms3;\n #else\n // Direction\n angle = angle + ((randoms3.x-0.5) * PI) * directionRandomizer;\n newDirection = vec3(cos(angle), (randoms3.y-0.5) * directionRandomizer, sin(angle));\n newDirection = normalize(newDirection);\n #endif\n#elif defined(CONEEMITTER)\n vec3 randoms2 = getRandomVec3(seed.y);\n float s = 2.0 * PI * randoms2.x;\n\n #ifdef CONEEMITTERSPAWNPOINT\n float h = 0.0001;\n #else\n float h = randoms2.y * height.y;\n\n // Better distribution in a cone at normal angles.\n h = 1. - h * h;\n #endif\n\n float lRadius = radius.x - radius.x * randoms2.z * radius.y;\n lRadius = lRadius * h;\n\n float randX = lRadius * sin(s);\n float randY = lRadius * cos(s);\n float randZ = h * height.x;\n\n newPosition = vec3(randX, randY, randZ);\n\n // Direction\n if (abs(cos(coneAngle)) == 1.0) {\n newDirection = vec3(0.0, 0.0, 1.0);\n } else {\n vec3 randoms3 = getRandomVec3(seed.z);\n newDirection = normalize(newPosition + directionRandomizer * randoms3);\n }\n#elif defined(CUSTOMEMITTER)\n newPosition = initialPosition;\n outInitialPosition = initialPosition;\n#else\n // Create the particle at origin\n newPosition = vec3(0., 0., 0.);\n\n // Spread in all directions\n newDirection = 2.0 * (getRandomVec3(seed.w) - vec3(0.5, 0.5, 0.5));\n#endif\n\n float power = emitPower.x + (emitPower.y - emitPower.x) * randoms.a;\n\n #ifdef LOCAL\n outPosition = newPosition;\n #else\n outPosition = (emitterWM * vec4(newPosition, 1.)).xyz;\n #endif\n\n#ifdef CUSTOMEMITTER\n outDirection = direction;\n #ifndef BILLBOARD\n outInitialDirection = direction;\n #endif\n#else\n #ifdef LOCAL\n vec3 initial = newDirection;\n #else\n vec3 initial = (emitterWM * vec4(newDirection, 0.)).xyz;\n #endif\n outDirection = initial * power;\n #ifndef BILLBOARD\n outInitialDirection = initial;\n #endif\n#endif\n#ifdef ANIMATESHEET\n outCellIndex = cellInfos.x;\n\n#ifdef ANIMATESHEETRANDOMSTART\n outCellStartOffset = randoms.a * outLife;\n#endif\n#endif\n\n#ifdef NOISE\n outNoiseCoordinates1 = noiseCoordinates1;\n outNoiseCoordinates2 = noiseCoordinates2;\n#endif\n\n } else {\n float directionScale = timeDelta;\n outAge = newAge;\n float ageGradient = newAge / life;\n\n#ifdef VELOCITYGRADIENTS\n directionScale *= texture(velocityGradientSampler, vec2(ageGradient, 0)).r;\n#endif\n\n#ifdef DRAGGRADIENTS\n directionScale *= 1.0 - texture(dragGradientSampler, vec2(ageGradient, 0)).r;\n#endif\n\n#if defined(CUSTOMEMITTER)\n outPosition = position + (direction - position) * ageGradient;\n outInitialPosition = initialPosition;\n#else\n outPosition = position + direction * directionScale;\n#endif\n\n outLife = life;\n outSeed = seed;\n#ifndef COLORGRADIENTS\n outColor = color;\n#endif\n\n#ifdef SIZEGRADIENTS\n\toutSize.x = texture(sizeGradientSampler, vec2(ageGradient, 0)).r;\n outSize.yz = size.yz;\n#else\n outSize = size;\n#endif\n\n#ifndef BILLBOARD\n outInitialDirection = initialDirection;\n#endif\n\n#ifdef CUSTOMEMITTER\n outDirection = direction;\n#else\n vec3 updatedDirection = direction + gravity * timeDelta;\n\n #ifdef LIMITVELOCITYGRADIENTS\n float limitVelocity = texture(limitVelocityGradientSampler, vec2(ageGradient, 0)).r;\n\n float currentVelocity = length(updatedDirection);\n\n if (currentVelocity > limitVelocity) {\n updatedDirection = updatedDirection * limitVelocityDamping;\n }\n #endif\n\n outDirection = updatedDirection;\n\n #ifdef NOISE\n float fetchedR = texture(noiseSampler, vec2(noiseCoordinates1.x, noiseCoordinates1.y) * vec2(0.5) + vec2(0.5)).r;\n float fetchedG = texture(noiseSampler, vec2(noiseCoordinates1.z, noiseCoordinates2.x) * vec2(0.5) + vec2(0.5)).r;\n float fetchedB = texture(noiseSampler, vec2(noiseCoordinates2.y, noiseCoordinates2.z) * vec2(0.5) + vec2(0.5)).r;\n vec3 force = vec3(2. * fetchedR - 1., 2. * fetchedG - 1., 2. * fetchedB - 1.) * noiseStrength;\n outDirection = outDirection + force * timeDelta;\n outNoiseCoordinates1 = noiseCoordinates1;\n outNoiseCoordinates2 = noiseCoordinates2;\n #endif\n#endif\n\n#ifdef ANGULARSPEEDGRADIENTS\n float angularSpeed = texture(angularSpeedGradientSampler, vec2(ageGradient, 0)).r;\n outAngle = angle + angularSpeed * timeDelta;\n#else\n outAngle = vec2(angle.x + angle.y * timeDelta, angle.y);\n#endif\n\n#ifdef ANIMATESHEET\n float offsetAge = outAge;\n float dist = cellInfos.y - cellInfos.x;\n\n#ifdef ANIMATESHEETRANDOMSTART\n outCellStartOffset = cellStartOffset;\n offsetAge += cellStartOffset;\n#else\n float cellStartOffset = 0.;\n#endif\n\n float ratio = 0.;\n if (cellInfos.w == 1.0) {\n ratio = clamp(mod(cellStartOffset + cellInfos.z * offsetAge, life) / life, 0., 1.0);\n }\n else {\n ratio = clamp(cellStartOffset + cellInfos.z * offsetAge / life, 0., 1.0);\n }\n\n outCellIndex = float(int(cellInfos.x + ratio * dist));\n#endif\n }\n}",_0x590a36="#version 300 es\n\nvoid main() {\n discard;\n}\n",_0x12e71e="precision highp float;\nuniform vec2 translationPivot;\nuniform vec3 worldOffset;\n#ifdef LOCAL\nuniform mat4 emitterWM;\n#endif\n\n// Particles state\nattribute vec3 position;\nattribute float age;\nattribute float life;\nattribute vec3 size;\n#ifndef BILLBOARD\nattribute vec3 initialDirection;\n#endif\n#ifdef BILLBOARDSTRETCHED\nattribute vec3 direction;\n#endif\nattribute float angle;\n#ifdef ANIMATESHEET\nattribute float cellIndex;\n#endif\nattribute vec2 offset;\nattribute vec2 uv;\n\nvarying vec2 vUV;\nvarying vec4 vColor;\nvarying vec3 vPositionW;\n\n#ifdef COLORGRADIENTS\nuniform sampler2D colorGradientSampler;\n#else\nuniform vec4 colorDead;\nattribute vec4 color;\n#endif\n\n#ifdef ANIMATESHEET\nuniform vec3 sheetInfos;\n#endif\n\n#ifdef BILLBOARD\n\tuniform vec3 eyePosition;\n#endif\n\nvec3 rotate(vec3 yaxis, vec3 rotatedCorner) {\n\tvec3 xaxis = normalize(cross(vec3(0., 1.0, 0.), yaxis));\n\tvec3 zaxis = normalize(cross(yaxis, xaxis));\n\t\n\tvec3 row0 = vec3(xaxis.x, xaxis.y, xaxis.z);\n\tvec3 row1 = vec3(yaxis.x, yaxis.y, yaxis.z);\n\tvec3 row2 = vec3(zaxis.x, zaxis.y, zaxis.z);\n\t\n\tmat3 rotMatrix = mat3(row0, row1, row2);\n\t\n\tvec3 alignedCorner = rotMatrix * rotatedCorner;\n\t#ifdef LOCAL\n\t\treturn ((emitterWM * vec4(position, 1.0)).xyz + worldOffset) + alignedCorner;\n\t#else\n\t\treturn (position + worldOffset) + alignedCorner;\n\t#endif\n}\n\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera, vec3 rotatedCorner) {\n\tvec3 normalizedToCamera = normalize(toCamera);\n\tvec3 normalizedCrossDirToCamera = normalize(cross(normalize(direction), normalizedToCamera));\n\tvec3 crossProduct = normalize(cross(normalizedToCamera, normalizedCrossDirToCamera));\n\t\n\tvec3 row0 = vec3(normalizedCrossDirToCamera.x, normalizedCrossDirToCamera.y, normalizedCrossDirToCamera.z);\n\tvec3 row1 = vec3(crossProduct.x, crossProduct.y, crossProduct.z);\n\tvec3 row2 = vec3(normalizedToCamera.x, normalizedToCamera.y, normalizedToCamera.z);\n\tmat3 rotMatrix = mat3(row0, row1, row2);\n\t\n\tvec3 alignedCorner = rotMatrix * rotatedCorner;\n\t#ifdef LOCAL\n\t\treturn ((emitterWM * vec4(position, 1.0)).xyz + worldOffset) + alignedCorner;\n\t#else\n\t\treturn (position + worldOffset) + alignedCorner;\n\t#endif\n}\n#endif\n\nvoid main() {\n\t#ifdef ANIMATESHEET\n\t\tfloat rowOffset = floor(cellIndex / sheetInfos.z);\n\t\tfloat columnOffset = cellIndex - rowOffset * sheetInfos.z;\n\t\tvec2 uvScale = sheetInfos.xy;\n\t\tvec2 uvOffset = vec2(uv.x , 1.0 - uv.y);\n\t\tvUV = (uvOffset + vec2(columnOffset, rowOffset)) * uvScale;\n\t#else\n \t vUV = uv;\n\t#endif\n float ratio = age / life;\n#ifdef COLORGRADIENTS\n\tvColor = texture2D(colorGradientSampler, vec2(ratio, 0));\n#else\n\tvColor = color * vec4(1.0 - ratio) + colorDead * vec4(ratio);\n#endif\n\n vec2 cornerPos = (offset - translationPivot) * size.yz * size.x + translationPivot;\n //TODO \n //vec2 cornerPos = (offset - translationPivot) * vec2(2.0) + translationPivot;\n \n#ifdef BILLBOARD\n\tvec4 rotatedCorner;\n\trotatedCorner.w = 0.;\n\t\n\t#ifdef BILLBOARDY\n\t\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\t\trotatedCorner.z = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\trotatedCorner.y = 0.;\n\t\t\n\t\tvec3 yaxis = (position + worldOffset) - eyePosition;\n\t\tyaxis.y = 0.;\n\t\tvPositionW = rotate(normalize(yaxis), rotatedCorner.xyz);\n\t\t\n\t\tvec4 viewPosition = (czm_view * vec4(vPositionW, 1.0));\n\t#elif defined(BILLBOARDSTRETCHED)\n\t\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\t\trotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\trotatedCorner.z = 0.;\n\t\t\n\t\tvec3 toCamera = (position + worldOffset) - eyePosition;\n\t\tvPositionW = rotateAlign(toCamera, rotatedCorner.xyz);\n\t\t\n\t\tvec4 viewPosition = (czm_view * vec4(vPositionW, 1.0));\n\t#else\n\t\t// Rotate\n\t\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\t\trotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\trotatedCorner.z = 0.;\n\t\t\n\t\t// Expand position\n\t\t#ifdef LOCAL\n\t\t\tvec4 viewPosition = czm_modelView * vec4(((emitterWM * vec4(position, 1.0)).xyz + worldOffset), 1.0) + rotatedCorner;\n\t\t#else\n\t\t\tvec4 viewPosition = czm_modelView * vec4((position + worldOffset), 1.0) + rotatedCorner;\n\t\t#endif\n\t\t\n vPositionW = (czm_inverseView * viewPosition).xyz;\n\t#endif // BILLBOARDY \n#else\n // Rotate\n\tvec3 rotatedCorner;\n\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\trotatedCorner.y = 0.;\n\trotatedCorner.z = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\n\tvec3 yaxis = normalize(initialDirection);\n\tvPositionW = rotate(yaxis, rotatedCorner);\n\t\n // Expand position\n vec4 viewPosition = czm_view * vec4(vPositionW, 1.0);\n#endif // BILLBOARD\n\tgl_Position = czm_projection * viewPosition;\n}\n",_0x25e40d="precision highp float;\nuniform sampler2D diffuseSampler;\n\nvarying vec2 vUV;\nvarying vec4 vColor;\n\nvoid main() {\n\tvec4 textureColor = texture2D(diffuseSampler, vUV);\n \tgl_FragColor = textureColor * vColor;\n\t#ifdef BLENDMULTIPLYMODE\n\t float alpha = vColor.a * textureColor.a;\n\t gl_FragColor.rgb = gl_FragColor.rgb * alpha + vec3(1.0) * (1.0 - alpha);\n\t#endif\n}",_0x1e4683=(_0xb9378b=!0,function(e,t){var i=_0xb9378b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb9378b=!1,i}),_0xdfb7ad=_0x1e4683(void 0,(function(){return _0xdfb7ad.toString().search("(((.+)+)+)+$").toString().constructor(_0xdfb7ad).search("(((.+)+)+)+$")})),_0xb9378b;function _0x42bbfb(){this.particlePositionGenerator=function(){},this.particleDestinationGenerator=function(){}}_0xdfb7ad(),_0x42bbfb.prototype.startDirectionFunction=function(e,t,i,n){var r=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.TmpVectors.Vector3[0];if(this.particleDestinationGenerator){this.particleDestinationGenerator(-1,i,r);var o=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.TmpVectors.Vector3[1];r.subtractToRef(i.position,o),o.scaleToRef(1/i.lifeTime,r)}else r.set(0,0,0);n?t.copyFrom(r):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Vector3.TransformNormalToRef(r,e,t)},_0x42bbfb.prototype.startPositionFunction=function(e,t,i,n){var r=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.TmpVectors.Vector3[0];this.particlePositionGenerator?this.particlePositionGenerator(-1,i,r):r.set(0,0,0),n?t.copyFrom(r):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Vector3.TransformCoordinatesToRef(r,e,t)},_0x42bbfb.prototype.clone=function(){var e=new _0x42bbfb;return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x42bbfb.prototype.applyToShader=function(e){},_0x42bbfb.prototype.getEffectDefines=function(e){e.push("CUSTOMEMITTER")},_0x42bbfb.prototype.getClassName=function(){return"CustomParticleEmitter"},_0x42bbfb.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e},_0x42bbfb.prototype.parse=function(e){};var _0x1d82ec=(_0x359294=!0,function(e,t){var i=_0x359294?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x359294=!1,i}),_0x5dd3ca=_0x1d82ec(void 0,(function(){return _0x5dd3ca.toString().search("(((.+)+)+)+$").toString().constructor(_0x5dd3ca).search("(((.+)+)+)+$")})),_0x359294;function _0xdebb2b(){}_0x5dd3ca(),_0xdebb2b.GetCurrentGradient=function(e,t,i){if(t[0].gradient>e)i(t[0],t[0],1);else{for(var n=0;n<t.length-1;n++){var r=t[n],o=t[n+1];if(e>=r.gradient&&e<=o.gradient)return void i(r,o,(e-r.gradient)/(o.gradient-r.gradient))}var a=t.length-1;i(t[a],t[a],1)}};var _0x54614a=(_0x4a555c=!0,function(e,t){var i=_0x4a555c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a555c=!1,i}),_0x52af73=_0x54614a(void 0,(function(){return _0x52af73.toString().search("(((.+)+)+)+$").toString().constructor(_0x52af73).search("(((.+)+)+)+$")})),_0x4a555c;function _0x313aa5(e,t,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=null);var o=_0x439851.call(this,e)||this;o._modelMatrx=p$1d.IDENTITY,o._context=i._context,o.layerMask=268435455,o._accumulatedCount=0,o._targetIndex=0,o._currentRenderId=-1,o._started=!1,o._stopped=!1,o._timeDelta=0,o._actualFrame=0,o._rawTextureWidth=256,o.forceDepthWrite=!1,o._preWarmDone=!1,o.isLocal=!1,e$2e(i)&&i.particleSystems.push(o),o._onBeforeDrawParticlesObservable=null,o._customEffect={0:r},o._capacity=u$Z(t.capacity,5e4),o._activeCount=o._capacity,o._currentActiveCount=0,o._isAnimationSheetEnabled=n,o.particleEmitterType=new _0x4c62f8;for(var a=u$Z(t.randomTextureSize,512),s=[],l=0;l<a;++l)s.push(Math.random()),s.push(Math.random()),s.push(Math.random()),s.push(Math.random());o._randomTexture=new t$U({context:context,source:{width:a,height:1,arrayBufferView:new Float32Array(s)},flipY:!1,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),s=[];for(l=0;l<a;++l)s.push(Math.random()),s.push(Math.random()),s.push(Math.random()),s.push(Math.random());return o._randomTexture2=new t$U({context:context,source:{width:a,height:1,arrayBufferView:new Float32Array(s)},flipY:!1,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),o._randomTextureSize=a,o}function _0x3e5356(e,t,i){var n=e.attributeLocations,r=e.attributes,o=e.attIndex,a=e.offset,s=S$14.FLOAT,l=S$14.getSizeInBytes(s),u=e.attributesStrideSize*l;n[t]=o++,r.push({index:n[t],vertexBuffer:e.buffer,componentsPerAttribute:i,componentDatatype:s,normalize:!1,offsetInBytes:l*a,strideInBytes:u,instanceDivisor:e.instanceDivisor}),e.offset+=i,e.attributeLocations=n,e.attIndex=o,e.attributes=r}_0x52af73(),_0x313aa5.prototype=Object.create(_0x439851.prototype),_0x313aa5.prototype.constructor=_0x439851,Object.defineProperties(_0x313aa5.prototype,{IsSupported:{get:function(){return this._context.webgl2}},activeParticleCount:{get:function(){return this._activeCount},set:function(e){this._activeCount=Math.min(e,this._capacity)}},modelMatrix:{get:function(){return this._modelMatrx},set:function(e){this._modelMatrx!==e&&(this._modelMatrx=e)}}}),_0x313aa5.prototype.getCapacity=function(){return this._capacity},_0x313aa5.prototype.isStarted=function(){return this._started},_0x313aa5.prototype.isStopped=function(){return this._stopped},_0x313aa5.prototype.isStopping=function(){return!1},_0x313aa5.prototype.getActiveCount=function(){return this._currentActiveCount},_0x313aa5.prototype._hasTargetStopDurationDependantGradient=function(){return this._startSizeGradients&&this._startSizeGradients.length>0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0},_0x313aa5.prototype.start=function(e){var t=this;if(void 0===e&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set";e?setTimeout((function(){t.start(0)}),e):(this._started=!0,this._stopped=!1,this._preWarmDone=!1,this.beginAnimationOnStart&&this.animations&&this.animations.length>0&&this._scene&&this._scene.beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop))},_0x313aa5.prototype.stop=function(){this._stopped||(this._stopped=!0)},_0x313aa5.prototype.reset=function(){this._releaseBuffers(),this._releaseVAOs(),this._currentActiveCount=0,this._targetIndex=0},_0x313aa5.prototype.getClassName=function(){return"GPUParticleSystem"},_0x313aa5.prototype.getCustomEffect=function(e){var t;return void 0===e&&(e=0),null!==(t=this._customEffect[e])&&void 0!==t?t:this._customEffect[0]},_0x313aa5.prototype.setCustomEffect=function(e,t){void 0===t&&(t=0),this._customEffect[t]=e},_0x313aa5.prototype._removeGradientAndTexture=function(e,t,i){return _super.prototype._removeGradientAndTexture.call(this,e,t,i),this._releaseBuffers(),this},_0x313aa5.prototype.addColorGradient=function(e,t,i){this._colorGradients||(this._colorGradients=[]);var n=new _0x180241(e,t);return this._colorGradients.push(n),this._refreshColorGradient(!0),this._releaseBuffers(),this},_0x313aa5.prototype._refreshColorGradient=function(e){void 0===e&&(e=!1),this._colorGradients&&(e&&this._colorGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null))},_0x313aa5.prototype.forceRefreshGradients=function(){this._refreshColorGradient(),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture"),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture"),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture"),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture"),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture"),this.reset()},_0x313aa5.prototype.removeColorGradient=function(e){return this._removeGradientAndTexture(e,this._colorGradients,this._colorGradientsTexture),this._colorGradientsTexture=null,this},_0x313aa5.prototype._addFactorGradient=function(e,t,i){var n=new _0x341870(t,i);e.push(n),this._releaseBuffers()},_0x313aa5.prototype.addSizeGradient=function(e,t){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture",!0),this._releaseBuffers(),this},_0x313aa5.prototype.removeSizeGradient=function(e){return this._removeGradientAndTexture(e,this._sizeGradients,this._sizeGradientsTexture),this._sizeGradientsTexture=null,this},_0x313aa5.prototype._refreshFactorGradient=function(e,t,i){if(void 0===i&&(i=!1),e){i&&e.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}));var n=this;n[t]&&(n[t].dispose(),n[t]=null)}},_0x313aa5.prototype.addAngularSpeedGradient=function(e,t){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture",!0),this._releaseBuffers(),this},_0x313aa5.prototype.removeAngularSpeedGradient=function(e){return this._removeGradientAndTexture(e,this._angularSpeedGradients,this._angularSpeedGradientsTexture),this._angularSpeedGradientsTexture=null,this},_0x313aa5.prototype.addVelocityGradient=function(e,t){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture",!0),this._releaseBuffers(),this},_0x313aa5.prototype.removeVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._velocityGradients,this._velocityGradientsTexture),this._velocityGradientsTexture=null,this},_0x313aa5.prototype.addLimitVelocityGradient=function(e,t){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture",!0),this._releaseBuffers(),this},_0x313aa5.prototype.removeLimitVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._limitVelocityGradients,this._limitVelocityGradientsTexture),this._limitVelocityGradientsTexture=null,this},_0x313aa5.prototype.addDragGradient=function(e,t){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture",!0),this._releaseBuffers(),this},_0x313aa5.prototype.removeDragGradient=function(e){return this._removeGradientAndTexture(e,this._dragGradients,this._dragGradientsTexture),this._dragGradientsTexture=null,this},_0x313aa5.prototype.addEmitRateGradient=function(e,t,i){return this},_0x313aa5.prototype.removeEmitRateGradient=function(e){return this},_0x313aa5.prototype.addStartSizeGradient=function(e,t,i){return this},_0x313aa5.prototype.removeStartSizeGradient=function(e){return this},_0x313aa5.prototype.addColorRemapGradient=function(e,t,i){return this},_0x313aa5.prototype.removeColorRemapGradient=function(){return this},_0x313aa5.prototype.addAlphaRemapGradient=function(e,t,i){return this},_0x313aa5.prototype.removeAlphaRemapGradient=function(){return this},_0x313aa5.prototype.addRampGradient=function(e,t){return this},_0x313aa5.prototype.removeRampGradient=function(){return this},_0x313aa5.prototype.getRampGradients=function(){return null},_0x313aa5.prototype.addLifeTimeGradient=function(e,t,i){return this},_0x313aa5.prototype.removeLifeTimeGradient=function(e){return this},_0x313aa5.prototype._reset=function(){this._releaseBuffers()},_0x313aa5.prototype._createUpdateVAO=function(e){var t={attributeLocations:{},attributes:[],attIndex:0,offset:0,attributesStrideSize:this._attributesStrideSize,buffer:e};return _0x3e5356(t,"position",3),this.particleEmitterType instanceof _0x42bbfb&&_0x3e5356(t,"initialPosition",3),_0x3e5356(t,"age",1),_0x3e5356(t,"life",1),_0x3e5356(t,"seed",4),_0x3e5356(t,"size",3),this._colorGradientsTexture||_0x3e5356(t,"color",4),_0x3e5356(t,"direction",3),this._isBillboardBased||_0x3e5356(t,"initialDirection",3),this._angularSpeedGradientsTexture?_0x3e5356(t,"angle",1):_0x3e5356(t,"angle",2),this._isAnimationSheetEnabled&&(_0x3e5356(t,"cellIndex",1),this.spriteRandomStartCell&&_0x3e5356(t,"cellStartOffset",1)),this.noiseTexture&&(_0x3e5356(t,"noiseCoordinates1",3),_0x3e5356(t,"noiseCoordinates2",3)),this._updateAttributeLocations=t.attributeLocations,this._updateAttributes=t.attributes,new c$13({context:this._context,attributes:this._updateAttributes})},_0x313aa5.prototype._createRenderVAO=function(e,t){var i={attributeLocations:[],attributes:[],attIndex:0,offset:0,attributesStrideSize:4,buffer:t};_0x3e5356(i,"offset",2),_0x3e5356(i,"uv",2);var n={attributeLocations:i.attributeLocations,attributes:i.attributes,attIndex:i.attIndex,offset:0,attributesStrideSize:this._attributesStrideSize,buffer:e,instanceDivisor:1};return _0x3e5356(n,"position",3),this.particleEmitterType instanceof _0x42bbfb&&(n.offset+=3),_0x3e5356(n,"age",1),_0x3e5356(n,"life",1),n.offset+=4,_0x3e5356(n,"size",3),this._colorGradientsTexture||_0x3e5356(n,"color",4),this.billboardMode===_0xbf6524.BILLBOARDMODE_STRETCHED?_0x3e5356(n,"direction",3):n.offset+=3,this._isBillboardBased||_0x3e5356(n,"initialDirection",3),this._angularSpeedGradientsTexture?_0x3e5356(n,"angle",1):_0x3e5356(n,"angle",2),this._isAnimationSheetEnabled&&(_0x3e5356(n,"cellIndex",1),this.spriteRandomStartCell&&_0x3e5356(n,"cellStartOffset",1)),this.noiseTexture&&(_0x3e5356(n,"noiseCoordinates1",3),_0x3e5356(n,"noiseCoordinates2",3)),this._renderAttributeLocations=n.attributeLocations,this._renderAttributes=n.attributes,new c$13({context:this._context,attributes:this._renderAttributes})};var _0x41384c=new o$1p;_0x313aa5.prototype._initialize=function(e){if(!e$2e(this._buffer0)||e){var t=new Array;this._attributesStrideSize=21,this._targetIndex=0,this.particleEmitterType instanceof _0x42bbfb&&(this._attributesStrideSize+=3),this.isBillboardBased||(this._attributesStrideSize+=3),this._colorGradientsTexture&&(this._attributesStrideSize-=4),this._angularSpeedGradientsTexture&&(this._attributesStrideSize-=1),this._isAnimationSheetEnabled&&(this._attributesStrideSize+=1,this.spriteRandomStartCell&&(this._attributesStrideSize+=1)),this.noiseTexture&&(this._attributesStrideSize+=6);for(var i=this.particleEmitterType instanceof _0x42bbfb,n=0;n<this._capacity;n++)t.push(0),t.push(0),t.push(0),i&&(this.particleEmitterType.particlePositionGenerator(n,null,_0x41384c),t.push(_0x41384c.x),t.push(_0x41384c.y),t.push(_0x41384c.z)),t.push(0),t.push(0),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(0),t.push(0),t.push(0),this._colorGradientsTexture||(t.push(0),t.push(0),t.push(0),t.push(0)),i?(this.particleEmitterType.particleDestinationGenerator(n,null,_0x41384c),t.push(_0x41384c.x),t.push(_0x41384c.y),t.push(_0x41384c.z)):(t.push(0),t.push(0),t.push(0)),this.isBillboardBased||(t.push(0),t.push(0),t.push(0)),t.push(0),this._angularSpeedGradientsTexture||t.push(0),this._isAnimationSheetEnabled&&(t.push(0),this.spriteRandomStartCell&&t.push(0)),this.noiseTexture&&(t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()));var r=new Float32Array(t),o=new Float32Array([.5,.5,1,1,-.5,.5,0,1,-.5,-.5,0,0,.5,-.5,1,0]);this._buffer0=t$X.createVertexBuffer({context:this._context,typedArray:r,usage:A$18.STATIC_DRAW}),this._buffer1=t$X.createVertexBuffer({context:this._context,typedArray:r,usage:A$18.STATIC_DRAW}),this._spriteBuffer=t$X.createVertexBuffer({context:this._context,typedArray:o,usage:A$18.STATIC_DRAW}),this._updateVAO=[],this._updateVAO.push(this._createUpdateVAO(this._buffer0)),this._updateVAO.push(this._createUpdateVAO(this._buffer1)),this._renderVAO=[],this._renderVAO.push(this._createRenderVAO(this._buffer1,this._spriteBuffer)),this._renderVAO.push(this._createRenderVAO(this._buffer0,this._spriteBuffer)),this._sourceBuffer=this._buffer0,this._targetBuffer=this._buffer1}},_0x313aa5.prototype._recreateUpdateEffect=function(){var e=[];if(this.particleEmitterType&&this.particleEmitterType.getEffectDefines(e),this._isBillboardBased&&e.push("BILLBOARD"),this._colorGradientsTexture&&e.push("COLORGRADIENTS"),this._sizeGradientsTexture&&e.push("SIZEGRADIENTS"),this._angularSpeedGradientsTexture&&e.push("ANGULARSPEEDGRADIENTS"),this._velocityGradientsTexture&&e.push("VELOCITYGRADIENTS"),this._limitVelocityGradientsTexture&&e.push("LIMITVELOCITYGRADIENTS"),this._dragGradientsTexture&&e.push("DRAGGRADIENTS"),this.isAnimationSheetEnabled&&(e.push("ANIMATESHEET"),this.spriteRandomStartCell&&e.push("ANIMATESHEETRANDOMSTART")),this.noiseTexture&&e.push("NOISE"),this.isLocal&&e.push("LOCAL"),this._transformFeedbackVaryings=["outPosition"],this.particleEmitterType instanceof _0x42bbfb&&this._transformFeedbackVaryings.push("outInitialPosition"),this._transformFeedbackVaryings.push("outAge"),this._transformFeedbackVaryings.push("outLife"),this._transformFeedbackVaryings.push("outSeed"),this._transformFeedbackVaryings.push("outSize"),this._colorGradientsTexture||this._transformFeedbackVaryings.push("outColor"),this._transformFeedbackVaryings.push("outDirection"),this._isBillboardBased||this._transformFeedbackVaryings.push("outInitialDirection"),this._transformFeedbackVaryings.push("outAngle"),this.isAnimationSheetEnabled&&(this._transformFeedbackVaryings.push("outCellIndex"),this.spriteRandomStartCell&&this._transformFeedbackVaryings.push("outCellStartOffset")),this.noiseTexture&&(this._transformFeedbackVaryings.push("outNoiseCoordinates1"),this._transformFeedbackVaryings.push("outNoiseCoordinates2")),!e$2e(this._updateSp)){this._updateDefines=e;var t,i,n=this._updateCommand;e$2e(n.shaderProgram)?(t=n.shaderProgram.vertexShaderSource.clone(),i=n.shaderProgram.fragmentShaderSource.clone()):(t=new s$V({name:"BabylonGpuUpdateParticlesVS",sources:[_0x5d14f5]}),i=new s$V({name:"BabylonGpuUpdateParticlesFS",sources:[_0x590a36]})),t.defines=e,i.defines=e,this._updateSp=this._updateSp&&this._updateSp.destroy(),this._updateSp=r$14.fromCache({context:this._context,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:this._updateAttributeLocations,transformFeedback:!0,transformFeedbackVaryings:this._transformFeedbackVaryings})}this._updateCommand.shaderProgram=this._updateSp},_0x313aa5.prototype._getEffect=function(){var e;return null!==(e=this.getCustomEffect())&&void 0!==e?e:this._renderEffect},_0x313aa5.prototype.fillDefines=function(e,t){if(this.blendMode===_0x4d4f68.BLENDMODE_MULTIPLY&&e.push("BLENDMULTIPLYMODE"),this.isLocal&&e.push("LOCAL"),this._isBillboardBased)switch(e.push("BILLBOARD"),this.billboardMode){case _0xbf6524.BILLBOARDMODE_Y:e.push("BILLBOARDY");break;case _0xbf6524.BILLBOARDMODE_STRETCHED:e.push("BILLBOARDSTRETCHED");break;case _0xbf6524.BILLBOARDMODE_ALL:e.push("BILLBOARDMODE_ALL")}this._colorGradientsTexture&&e.push("COLORGRADIENTS"),this.isAnimationSheetEnabled&&e.push("ANIMATESHEET")},_0x313aa5.prototype._recreateRenderEffect=function(){var e=[];if(this.fillDefines(e),!e$2e(this._renderDefines)){this._renderDefines=e;var t,i,n=this._drawCommand;e$2e(n.shaderProgram)?(t=n.shaderProgram.vertexShaderSource.clone(),i=n.shaderProgram.fragmentShaderSource.clone()):(t=new s$V({name:"BabylonGpuRenderParticlesVS",sources:[_0x12e71e]}),i=new s$V({name:"BabylonGpuRenderParticlesFS",sources:[_0x25e40d]})),t.defines=e,i.defines=e,this._renderSp=this._renderSp&&this._renderSp.destroy(),this._renderSp=r$14.fromCache({context:this._context,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:this._renderAttributeLocations})}this._drawCommand.shaderProgram=this._renderSp},_0x313aa5.prototype.animate=function(){this._timeDelta=this.updateSpeed,this._actualFrame+=this._timeDelta,this._stopped||this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()},_0x313aa5.prototype._createFactorGradientTexture=function(e,t){var i=this[t];if(e&&e.length&&!i){for(var n=new Float32Array(3*this._rawTextureWidth),r=0;r<this._rawTextureWidth;r++){var o=r/this._rawTextureWidth;_0xdebb2b.GetCurrentGradient(o,e,(function(e,t,i){n[3*r]=_0x442216.Lerp(e.factor1,t.factor1,i),n[3*r+1]=n[3*r],n[3*r+2]=n[3*r]}))}this[t]=new t$U({context:this._context,source:{width:this._rawTextureWidth,height:1,arrayBufferView:n},flipY:!1,pixelFormat:V$12.RGB,pixelDatatype:_$_.FLOAT,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})}},_0x313aa5.prototype._createSizeGradientTexture=function(){this._createFactorGradientTexture(this._sizeGradients,"_sizeGradientsTexture")},_0x313aa5.prototype._createAngularSpeedGradientTexture=function(){this._createFactorGradientTexture(this._angularSpeedGradients,"_angularSpeedGradientsTexture")},_0x313aa5.prototype._createVelocityGradientTexture=function(){this._createFactorGradientTexture(this._velocityGradients,"_velocityGradientsTexture")},_0x313aa5.prototype._createLimitVelocityGradientTexture=function(){this._createFactorGradientTexture(this._limitVelocityGradients,"_limitVelocityGradientsTexture")},_0x313aa5.prototype._createDragGradientTexture=function(){this._createFactorGradientTexture(this._dragGradients,"_dragGradientsTexture")};var _0x1c0db6=new e$1X;_0x313aa5.prototype._createColorGradientTexture=function(){if(this._colorGradients&&this._colorGradients.length&&!this._colorGradientsTexture){for(var e=new Uint8Array(4*this._rawTextureWidth),t=_0x1c0db6,i=0;i<this._rawTextureWidth;i++){var n=i/this._rawTextureWidth;_0xdebb2b.GetCurrentGradient(n,this._colorGradients,(function(n,r,o){e$1X.lerp(n.color1,r.color1,o,t),e[4*i]=255*t.red,e[4*i+1]=255*t.green,e[4*i+2]=255*t.blue,e[4*i+3]=255*t.alpha}))}this._colorGradientsTexture=new t$U({context:this._context,source:{width:this._rawTextureWidth,height:1,arrayBufferView:e},flipY:!1,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})}},_0x313aa5.prototype.update=function(e){e$2e(this._drawCommand)||this._createDrawCommand(),this.render(e)},_0x313aa5.prototype.render=function(e){if(!this._started)return 0;this._createColorGradientTexture(),this._createSizeGradientTexture(),this._createAngularSpeedGradientTexture(),this._createVelocityGradientTexture(),this._createLimitVelocityGradientTexture(),this._createDragGradientTexture(),this.animate(!0),this._initialize(!1),this._recreateUpdateEffect(),this._recreateRenderEffect();var t=this.emitRate*this._timeDelta;if(this._accumulatedCount+=t,this._accumulatedCount>1){var i=0|this._accumulatedCount;this._accumulatedCount-=i,this._currentActiveCount=Math.min(this._activeCount,this._currentActiveCount+i)}if(!this._currentActiveCount)return 0;this._transformFeedback.targetBuffer=this._targetBuffer,_0x439851._setRenderState(this._drawCommand,this.blendMode),this._updateCommand.vertexArray=this._updateVAO[this._targetIndex],this._updateCommand.vertexArray._numberOfVertices=this._currentActiveCount,this._drawCommand.vertexArray=this._renderVAO[this._targetIndex],this._drawCommand.instanceCount=this._currentActiveCount,e.commandList.push(this._updateCommand),e.commandList.push(this._drawCommand),this._targetIndex++,2===this._targetIndex&&(this._targetIndex=0);var n=this._sourceBuffer;return this._sourceBuffer=this._targetBuffer,this._targetBuffer=n,this._currentActiveCount},_0x313aa5.prototype.rebuild=function(){this._initialize(!0)},_0x313aa5.prototype._releaseBuffers=function(){},_0x313aa5.prototype._releaseVAOs=function(){if(this._updateVAO){for(var e=0;e<this._updateVAO.length;e++){(t=this._updateVAO[e]).isDestroyed()&&t.destroy()}this._updateVAO=[];for(e=0;e<this._renderVAO.length;e++){var t;(t=this._renderVAO[e]).isDestroyed()&&t.destroy()}this._renderVAO=[]}},_0x313aa5.prototype.isDestroyed=function(){return!1},_0x313aa5.prototype.destroy=function(){var e;e$2e(this._drawCommand)&&((e=this._drawCommand).shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.vertexArray=void 0,e.renderState=void 0,e.uniformMap=void 0,this._drawCommand=void 0);e$2e(this._updateCommand)&&((e=this._updateCommand).shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.vertexArray=void 0,e.renderState=void 0,e.uniformMap=void 0,this._updateCommand=void 0);this._transformFeedback&&(!this._transformFeedback.isDestroyed()&&this._transformFeedback.destroy(),this._transformFeedback=void 0),this._releaseBuffers(),this._releaseVAOs(),this._colorGradientsTexture&&(!this._colorGradientsTexture.isDestroyed()&&this._colorGradientsTexture.destroy(),this._colorGradientsTexture=null),this._sizeGradientsTexture&&(!this._sizeGradientsTexture.isDestroyed()&&this._sizeGradientsTexture.destroy(),this._sizeGradientsTexture=null),this._angularSpeedGradientsTexture&&(!this._angularSpeedGradientsTexture.isDestroyed()&&this._angularSpeedGradientsTexture.destroy(),this._angularSpeedGradientsTexture=null),this._velocityGradientsTexture&&(!this._velocityGradientsTexture.isDestroyed()&&this._velocityGradientsTexture.destroy(),this._velocityGradientsTexture=null),this._limitVelocityGradientsTexture&&(!this._limitVelocityGradientsTexture.isDestroyed()&&this._limitVelocityGradientsTexture.destroy(),this._limitVelocityGradientsTexture=null),this._dragGradientsTexture&&(!this._dragGradientsTexture.isDestroyed()&&this._dragGradientsTexture.destroy(),this._dragGradientsTexture=null),this._randomTexture&&(!this._randomTexture.isDestroyed()&&this._randomTexture.destroy(),this._randomTexture=null),this._randomTexture2&&(!this._randomTexture2.isDestroyed()&&this._randomTexture2.destroy(),this._randomTexture2=null),this.particleTexture&&(!this.particleTexture.isDestroyed()&&this.particleTexture.destroy(),this.particleTexture=null),this.noiseTexture&&(!this.noiseTexture.isDestroyed()&&this.noiseTexture.destroy(),this.noiseTexture=null)},_0x313aa5.prototype.clone=function(e,t){var i=this.serialize(),n=_0x313aa5.Parse(i,null,"");return n.name=e,void 0===t&&(t=this.emitter),n.emitter=t,n.noiseTexture=this.noiseTexture,n},_0x313aa5.prototype.serialize=function(e){void 0===e&&(e=!1);var t={};return ParticleSystem._Serialize(t,this,e),t.activeParticleCount=this.activeParticleCount,t.randomTextureSize=this._randomTextureSize,t},_0x313aa5.Parse=function(e,t,i,n){void 0===n&&(n=!1);var r=new _0x313aa5(e.name,{capacity:e.capacity,randomTextureSize:e.randomTextureSize},t,!1,null);return e.activeParticleCount&&(r.activeParticleCount=e.activeParticleCount),_0x439851._Parse(e,r,t,i),e.preventAutoStart&&(r.preventAutoStart=e.preventAutoStart),!n&&!r.preventAutoStart&&r.start(),r},_0x313aa5.fromJsonUrl=function(e,t){return t$10.createIfNeeded(e).fetchJson().then((function(e){return _0x313aa5.Parse(e,null,"",!1,t)}))};var _0x2b1e4e=new o$1o,_0x52f2b1=new o$1o,_0x5c9389=new o$1o,_0x553c19=new o$1p,_0x54a8c1=new o$1p,_0x3edb96=new e$2c,_0x5b2f1a=new e$2c,_0x1c0db6=new e$1X;_0x313aa5.prototype._createUpdateUniformMap=function(){var e,t={},i=this;if(t.currentCount=function(){return i._currentActiveCount},t.timeDelta=function(){return i._timeDelta},t.stopFactor=function(){return i._stopped?0:1},t.randomSampler=function(){return e$2e(i._randomTexture)?i._randomTexture:i._context.defaultTexture},t.randomSampler2=function(){return e$2e(i._randomTexture2)?i._randomTexture2:i._context.defaultTexture},t.lifeTime=function(){return _0x2b1e4e.x=i.minLifeTime,_0x2b1e4e.y=i.maxLifeTime,_0x2b1e4e},t.emitPower=function(){return _0x52f2b1.x=i.minEmitPower,_0x52f2b1.y=i.maxEmitPower,_0x52f2b1},t.color1=function(){return i.color1},t.color2=function(){return i.color2},t.sizeRange=function(){return _0x5c9389.x=i.minSize,_0x5c9389.y=i.maxSize,_0x5c9389},t.scaleRange=function(){return _0x3edb96.x=i.minScaleX,_0x3edb96.y=i.maxScaleX,_0x3edb96.z=i.minScaleY,_0x3edb96.w=i.maxScaleY,_0x3edb96},t.angleRange=function(){return _0x5b2f1a.x=i.minAngularSpeed,_0x5b2f1a.y=i.maxAngularSpeed,_0x5b2f1a.z=i.minInitialRotation,_0x5b2f1a.w=i.maxInitialRotation,_0x5b2f1a},t.gravity=function(){return i.gravity},t.sizeGradientSampler=function(){return e$2e(i._sizeGradientsTexture)?i._sizeGradientsTexture:i._context.defaultTexture},t.angularSpeedGradientSampler=function(){return e$2e(i._angularSpeedGradientsTexture)?i._angularSpeedGradientsTexture:i._context.defaultTexture},t.velocityGradientSampler=function(){return e$2e(i._velocityGradientsTexture)?i._velocityGradientsTexture:i._context.defaultTexture},t.limitVelocityGradientSampler=function(){return e$2e(i._limitVelocityGradientsTexture)?i._limitVelocityGradientsTexture:i._context.defaultTexture},t.limitVelocityDamping=function(){return i.limitVelocityDamping},t.dragGradientSampler=function(){return e$2e(i._dragGradientsTexture)?i._dragGradientsTexture:i._context.defaultTexture},this.particleEmitterType&&this.particleEmitterType.applyToShader(t),t.cellInfos=function(){return _0x553c19.x=i.startSpriteCellID,_0x553c19.y=i.endSpriteCellID,_0x553c19.z=i.spriteCellChangeSpeed,_0x553c19},t.noiseSampler=function(){return e$2e(i.noiseTexture)?i.noiseTexture:i._context.defaultTexture},t.noiseStrength=function(){return i.noiseStrength},this.emitter.position){var n=this.emitter;e=n.getWorldMatrix()}else{var r=this.emitter;e=p$1d.fromTranslation(r)}t.emitterWM=function(){return e},this._updateUniformMap=t},_0x313aa5.prototype._createRenderUniformMap=function(){var e,t={},i=this;if(t.diffuseSampler=function(){return e$2e(i.particleTexture)?i.particleTexture:i._context.defaultTexture},t.translationPivot=function(){return i.translationPivot},t.worldOffset=function(){return i.worldOffset},this.emitter.position){var n=this.emitter;e=n.getWorldMatrix()}else{var r=this.emitter;e=p$1d.fromTranslation(r)}t.emitterWM=function(){return e},t.colorGradientSampler=function(){return e$2e(i._colorGradientsTexture)?i._colorGradientsTexture:i._context.defaultTexture},t.colorDead=function(){return i.colorDead},t.sheetInfos=function(){return _0x54a8c1.x=i.spriteCellWidth/baseSize.width,_0x54a8c1.y=i.spriteCellHeight/baseSize.height,_0x54a8c1.z=i.width/baseSize.spriteCellWidth,_0x54a8c1},this._renderUniformMap=t},_0x313aa5.prototype._createDrawCommand=function(){this._boundingVolume=new i$1d,this._createRenderUniformMap(),this._createUpdateUniformMap();var e=new i$$({primitiveType:W$18.TRIANGLE_FAN,modelMatrix:this._modelMatrx,boundingVolume:this._boundingVolume,pass:Le$q.OPAQUE,cull:!1});e.castShadows=!1,e.receiveShadows=!1,e.selectCastShadows=!1,e.uniformMap=this._renderUniformMap,this._drawCommand=e;var t=new i$$({primitiveType:W$18.POINTS,modelMatrix:this._modelMatrx,boundingVolume:this._boundingVolume,pass:Le$q.OPAQUE,cull:!1});t.castShadows=!1,t.receiveShadows=!1,t.selectCastShadows=!1,t.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,blending:!1}),t.uniformMap=this._updateUniformMap,this._updateCommand=t,this._transformFeedback=new s$i({context:this._context,primitiveType:W$18.POINTS}),this._updateCommand.transformFeedback=this._transformFeedback};var _0xa05944=(_0x49f2b4=!0,function(e,t){var i=_0x49f2b4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49f2b4=!1,i}),_0x20ae4c=_0xa05944(void 0,(function(){return _0x20ae4c.toString().search("(((.+)+)+)+$").toString().constructor(_0x20ae4c).search("(((.+)+)+)+$")})),_0x49f2b4;function _0xf9b57a(e){this.particleSystem=e,this.position=new o$1p(0,0,0),this.direction=new o$1p(0,0,0),this.color=new e$1X(0,0,0,0),this.colorStep=new e$1X(0,0,0,0),this.lifeTime=1,this.age=0,this.size=0,this.scale=new o$1o(1,1),this.angle=0,this.angularSpeed=0,this.cellIndex=0,this._attachedSubEmitters=null,this._currentColor1=new e$1X(0,0,0,0),this._currentColor2=new e$1X(0,0,0,0),this._currentSize1=0,this._currentSize2=0,this._currentAngularSpeed1=0,this._currentAngularSpeed2=0,this._currentVelocity1=0,this._currentVelocity2=0,this._currentLimitVelocity1=0,this._currentLimitVelocity2=0,this._currentDrag1=0,this._currentDrag2=0,this.id=_0xf9b57a._Count++,this.particleSystem.isAnimationSheetEnabled&&this.updateCellInfoFromSystem()}_0x20ae4c(),_0xf9b57a.prototype.updateCellInfoFromSystem=function(){this.cellIndex=this.particleSystem.startSpriteCellID},_0xf9b57a.prototype.updateCellIndex=function(){var e=this.age,t=this.particleSystem.spriteCellChangeSpeed;this.particleSystem.spriteRandomStartCell&&(void 0===this._randomCellOffset&&(this._randomCellOffset=Math.random()*this.lifeTime),0===t?(t=1,e=this._randomCellOffset):e+=this._randomCellOffset);var i=this._initialEndSpriteCellID-this._initialStartSpriteCellID,n=_0x442216.Clamp(e*t%this.lifeTime/this.lifeTime);this.cellIndex=this._initialStartSpriteCellID+n*i|0};var _0x4ae677=new o$1p;_0xf9b57a.prototype._inheritParticleInfoToSubEmitter=function(e){if(e.particleSystem.emitter.position){var t=e.particleSystem.emitter;if(o$1p.clone(this.position,t.position),e.inheritDirection){var i=_0x4ae677;o$1p.normalize(this.direction,i),t.setDirection(i,0,Math.PI/2)}}else{var n=e.particleSystem.emitter;o$1p.clone(this.position,n)}o$1p.multiplyByScalar(this.direction,e.inheritedVelocityAmount/2,_0x4ae677),o$1p.clone(_0x4ae677,e.particleSystem._inheritedVelocityOffset)},_0xf9b57a.prototype._inheritParticleInfoToSubEmitters=function(){var e=this;this._attachedSubEmitters&&this._attachedSubEmitters.length>0&&this._attachedSubEmitters.forEach((function(t){e._inheritParticleInfoToSubEmitter(t)}))},_0xf9b57a.prototype._reset=function(){this.age=0,this.id=_0xf9b57a._Count++,this._currentColorGradient=null,this._currentSizeGradient=null,this._currentAngularSpeedGradient=null,this._currentVelocityGradient=null,this._currentLimitVelocityGradient=null,this._currentDragGradient=null,this.cellIndex=this.particleSystem.startSpriteCellID,this._randomCellOffset=void 0},_0xf9b57a.prototype.copyTo=function(e){e.position=o$1p.clone(this.position,e.position),this._initialDirection?e._initialDirection=o$1p.clone(this._initialDirection,e._initialDirection):e._initialDirection=null,e.direction=o$1p.clone(this.direction,e.direction),this._localPosition&&(e._localPosition=o$1p.clone(this._localPosition,e._localPosition)),e.color=e$1X.clone(this.color,e.color),e.colorStep=e$1X.clone(this.colorStep,e.colorStep),e.lifeTime=this.lifeTime,e.age=this.age,e._randomCellOffset=this._randomCellOffset,e.size=this.size,e.scale=o$1o.clone(this.scale,e.scale),e.angle=this.angle,e.angularSpeed=this.angularSpeed,e.particleSystem=this.particleSystem,e.cellIndex=this.cellIndex,e.id=this.id,e._attachedSubEmitters=this._attachedSubEmitters,this._currentColorGradient&&(e._currentColorGradient=this._currentColorGradient,e._currentColor1=e$1X.clone(this._currentColor1,e._currentColor1),e._currentColor2=e$1X.clone(this._currentColor2,e._currentColor2)),this._currentSizeGradient&&(e._currentSizeGradient=this._currentSizeGradient,e._currentSize1=this._currentSize1,e._currentSize2=this._currentSize2),this._currentAngularSpeedGradient&&(e._currentAngularSpeedGradient=this._currentAngularSpeedGradient,e._currentAngularSpeed1=this._currentAngularSpeed1,e._currentAngularSpeed2=this._currentAngularSpeed2),this._currentVelocityGradient&&(e._currentVelocityGradient=this._currentVelocityGradient,e._currentVelocity1=this._currentVelocity1,e._currentVelocity2=this._currentVelocity2),this._currentLimitVelocityGradient&&(e._currentLimitVelocityGradient=this._currentLimitVelocityGradient,e._currentLimitVelocity1=this._currentLimitVelocity1,e._currentLimitVelocity2=this._currentLimitVelocity2),this._currentDragGradient&&(e._currentDragGradient=this._currentDragGradient,e._currentDrag1=this._currentDrag1,e._currentDrag2=this._currentDrag2),this.particleSystem.isAnimationSheetEnabled&&(e._initialStartSpriteCellID=this._initialStartSpriteCellID,e._initialEndSpriteCellID=this._initialEndSpriteCellID),this.particleSystem.useRampGradients&&(e.remapData&&this.remapData?e$2c.clone(this.remapData,e.remapData):e.remapData=new e$2c(0,0,0,0)),this._randomNoiseCoordinates1&&(e._randomNoiseCoordinates1=o$1p.clone(this._randomNoiseCoordinates1,e._randomNoiseCoordinates1),e._randomNoiseCoordinates2=o$1p.clone(this._randomNoiseCoordinates2,e._randomNoiseCoordinates2))},_0xf9b57a._Count=0;var _0x375d2f="attribute vec3 position;\nattribute vec4 color;\nattribute float angle;\nattribute vec2 size;\n#ifdef ANIMATESHEET\nattribute float cellIndex;\n#endif\n#ifndef BILLBOARD\nattribute vec3 direction;\n#endif\n#ifdef BILLBOARDSTRETCHED\nattribute vec3 direction;\n#endif\n#ifdef RAMPGRADIENT\nattribute vec4 remapData;\n#endif\nattribute vec2 offset;\n\n// Uniforms\nuniform vec2 translationPivot;\n\n#ifdef ANIMATESHEET\nuniform vec3 particlesInfos; // x (number of rows) y(number of columns) z(rowSize)\n#endif\n\n// Output\nvarying vec2 vUV;\nvarying vec4 vColor;\n\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\n#endif\n\nvec3 rotate(vec3 yaxis, vec3 rotatedCorner) {\n\tvec3 xaxis = normalize(cross(vec3(0., 1.0, 0.), yaxis));\n\tvec3 zaxis = normalize(cross(yaxis, xaxis));\n\n\tvec3 row0 = vec3(xaxis.x, xaxis.y, xaxis.z);\n\tvec3 row1 = vec3(yaxis.x, yaxis.y, yaxis.z);\n\tvec3 row2 = vec3(zaxis.x, zaxis.y, zaxis.z);\n\n\tmat3 rotMatrix = mat3(row0, row1, row2);\n\n\tvec3 alignedCorner = rotMatrix * rotatedCorner;\n\treturn position + alignedCorner;\n}\n\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera, vec3 rotatedCorner) {\n\tvec3 normalizedToCamera = normalize(toCamera);\n\tvec3 normalizedCrossDirToCamera = normalize(cross(normalize(direction), normalizedToCamera));\n\tvec3 crossProduct = normalize(cross(normalizedToCamera, normalizedCrossDirToCamera));\n\n\tvec3 row0 = vec3(normalizedCrossDirToCamera.x, normalizedCrossDirToCamera.y, normalizedCrossDirToCamera.z);\n\tvec3 row1 = vec3(crossProduct.x, crossProduct.y, crossProduct.z);\n\tvec3 row2 = vec3(normalizedToCamera.x, normalizedToCamera.y, normalizedToCamera.z);\n\n\tmat3 rotMatrix = mat3(row0, row1, row2);\n\n\tvec3 alignedCorner = rotMatrix * rotatedCorner;\n\treturn position + alignedCorner;\n}\n#endif\n\nvoid main() {\n\tvec2 cornerPos = (vec2(offset.x - 0.5, offset.y - 0.5) - translationPivot) * size + translationPivot;\n\n#ifdef BILLBOARD\n\t// Rotate\n\tvec3 rotatedCorner;\n\n\t#ifdef BILLBOARDY\n\t\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\t\trotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\trotatedCorner.z = 0.;\n\n\t\tvec3 oriViewPos = (czm_modelView * vec4(position, 1.0)).xyz;\n\t\tvec3 yaxis = oriViewPos;\n\t\tyaxis.y = 0.;\n\n\t\tvec3 vPositionCorner = rotate(normalize(yaxis), rotatedCorner);\n\n\t\tvec3 viewPos = (czm_modelView * vec4(vPositionCorner, 1.0)).xyz;\n\t#elif defined(BILLBOARDSTRETCHED)\n\t\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\t\trotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\trotatedCorner.z = 0.;\n\n\t\tvec3 oriViewPos = (czm_modelView * vec4(position, 1.0)).xyz;\n\t\tvec3 toCamera = oriViewPos;\n\t\tvec3 vPositionCorner = rotateAlign(toCamera, rotatedCorner);\n\n\t\tvec3 viewPos = (czm_modelView * vec4(vPositionCorner, 1.0)).xyz;\n\t#else\n\t\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\t\trotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\t\trotatedCorner.z = 0.;\n\n\t\tvec3 viewPos = (czm_modelView * vec4(position, 1.0)).xyz + rotatedCorner;\n\t#endif // BILLBOARDY\n\n\t#ifdef RAMPGRADIENT\n\t\tremapRanges = remapData;\n\t#endif\n\n\t// Position\n\tgl_Position = czm_projection * vec4(viewPos, 1.0);\n#else\n\t// Rotate\n\tvec3 rotatedCorner;\n\trotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\n\trotatedCorner.z = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\n\trotatedCorner.y = 0.;\n\n\tvec3 yaxis = normalize(direction);\n\tvec3 vPositionW = rotate(yaxis, rotatedCorner);\n\n\tgl_Position = czm_modelViewProjection * vec4(vPositionW, 1.0);\n#endif // BILLBOARD\n\tvColor = color;\n\n\t#ifdef ANIMATESHEET\n\t\tfloat rowOffset = floor(cellIndex * particlesInfos.z);\n\t\tfloat columnOffset = cellIndex - rowOffset / particlesInfos.z;\n\n\t\tvec2 uvScale = particlesInfos.xy;\n\t\tvec2 uvOffset = vec2(offset.x , 1.0 - offset.y);\n\t\tvUV = (uvOffset + vec2(columnOffset, rowOffset)) * uvScale;\n\t#else\n\t\tvUV = offset;\n\t#endif\n}",_0x4eccd8="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec2 vUV;\nvarying vec4 vColor;\nuniform vec4 textureMask;\nuniform sampler2D diffuseSampler;\n\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\nuniform sampler2D rampSampler;\n#endif\n\nvoid main() {\n\tvec4 textureColor = texture2D(diffuseSampler, vUV);\n\tvec4 baseColor = textureColor * vColor;\n\n\t#ifdef RAMPGRADIENT\n\t\tfloat alpha = baseColor.a;\n\t\tfloat remappedColorIndex = clamp((alpha - remapRanges.x) / remapRanges.y, 0.0, 1.0);\n\n\t\tvec4 rampColor = texture2D(rampSampler, vec2(1.0 - remappedColorIndex, 0.));\n\t\tbaseColor.rgb *= rampColor.rgb;\n\n\t\t// Remapped alpha\n\t\tfloat finalAlpha = baseColor.a;\n\t\tbaseColor.a = clamp((alpha * rampColor.a - remapRanges.z) / remapRanges.w, 0.0, 1.0);\n\t#endif\n\n\t#ifdef BLENDMULTIPLYMODE\n\t\tfloat sourceAlpha = vColor.a * textureColor.a;\n\t\tbaseColor.rgb = baseColor.rgb * sourceAlpha + vec3(1.0) * (1.0 - sourceAlpha);\n\t#endif\n\n\tbaseColor = czm_gammaCorrect(baseColor);\n\tgl_FragColor = baseColor;\n}",_0x5a1183=(_0x212391=!0,function(e,t){var i=_0x212391?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x212391=!1,i}),_0x2f63cb=_0x5a1183(void 0,(function(){return _0x2f63cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f63cb).search("(((.+)+)+)+$")})),_0x212391;function _0x4b03f3(e){void 0===e&&(e=null),this._indices=null,this._positions=null,this._normals=null,this._storedNormal=new o$1p(0,0,0),this._mesh=null,this.direction1=new o$1p(0,1,0),this.direction2=new o$1p(0,1,0),this.useMeshNormalsForDirection=!0,this.mesh=e}_0x2f63cb(),Object.defineProperty(_0x4b03f3.prototype,"mesh",{get:function(){return this._mesh},set:function(e){this._mesh!==e&&(this._mesh=e,e?(this._indices=e.getIndices(),this._positions=e.getVerticesData(),this._normals=e.getVerticesData()):(this._indices=null,this._positions=null,this._normals=null))},enumerable:!1,configurable:!0});var _0x3d2a98=new o$1p;_0x4b03f3.prototype.startDirectionFunction=function(e,t,i,n){if(this.useMeshNormalsForDirection&&this._normals)p$1d.multiplyByDirection(e,this._storedNormal,t);else{var r=_0x442216.RandomRange(this.direction1.x,this.direction2.x),o=_0x442216.RandomRange(this.direction1.y,this.direction2.y),a=_0x442216.RandomRange(this.direction1.z,this.direction2.z);if(n)return t.x=r,t.y=o,void(t.z=a);_0x3d2a98.x=r,_0x3d2a98.y=o,_0x3d2a98.z=a,p$1d.multiplyByDirection(e,_0x3d2a98,t)}};var _0x51ee95=new o$1p,_0x3ddb4a=new o$1p,_0x41b499=new o$1p,_0x9b9339=new o$1p;_0x4b03f3.prototype.startPositionFunction=function(e,t,i,n){if(this._indices&&this._positions){var r=3*Math.random()*(this._indices.length/3)|0,o=Math.random(),a=Math.random()*(1-o),s=1-o-a,l=this._indices[r],u=this._indices[r+1],c=this._indices[r+2];o$1p.unpack(this._positions,3*l,_0x51ee95),o$1p.unpack(this._positions,3*u,_0x3ddb4a),o$1p.unpack(this._positions,3*c,_0x41b499),_0x9b9339.x=o*_0x51ee95.x+a*_0x3ddb4a.x+s*_0x41b499.x,_0x9b9339.y=o*_0x51ee95.y+a*_0x3ddb4a.y+s*_0x41b499.y,_0x9b9339.z=o*_0x51ee95.z+a*_0x3ddb4a.z+s*_0x41b499.z,n?o$1p.clone(_0x9b9339,t):p$1d.multiplyByPoint(e,_0x9b9339,t),this.useMeshNormalsForDirection&&this._normals&&(o$1p.unpack(this._normals,3*l,_0x51ee95),o$1p.unpack(this._normals,3*u,_0x3ddb4a),o$1p.unpack(this._normals,3*c,_0x41b499),this._storedNormal.x=o*_0x51ee95.x+a*_0x3ddb4a.x+s*_0x41b499.x,this._storedNormal.y=o*_0x51ee95.y+a*_0x3ddb4a.y+s*_0x41b499.y,this._storedNormal.z=o*_0x51ee95.z+a*_0x3ddb4a.z+s*_0x41b499.z)}},_0x4b03f3.prototype.clone=function(){var e=new _0x4b03f3(this.mesh);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x4b03f3.prototype.applyToShader=function(e){var t=this;e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x4b03f3.prototype.getEffectDefines=function(){},_0x4b03f3.prototype.getClassName=function(){return"MeshParticleEmitter"},_0x4b03f3.prototype.serialize=function(){var e,t={};return t.type=this.getClassName(),t.direction1=this.direction1.asArray(),t.direction2=this.direction2.asArray(),t.meshId=null===(e=this.mesh)||void 0===e?void 0:e.id,t.useMeshNormalsForDirection=this.useMeshNormalsForDirection,t},_0x4b03f3.prototype.parse=function(e){o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2),e.meshId,this.useMeshNormalsForDirection=e.useMeshNormalsForDirection};var _0x2f8e96=(_0x5c4e43=!0,function(e,t){var i=_0x5c4e43?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c4e43=!1,i}),_0x41d54d=_0x2f8e96(void 0,(function(){return _0x41d54d.toString().search("(((.+)+)+)+$").toString().constructor(_0x41d54d).search("(((.+)+)+)+$")})),_0x5c4e43;_0x41d54d();var _0x4c9258={ATTACHED:0,END:1},_0x5142be=Object.freeze(_0x4c9258),_0x24352f=(_0x2d9815=!0,function(e,t){var i=_0x2d9815?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d9815=!1,i}),_0x23a49f=_0x24352f(void 0,(function(){return _0x23a49f.toString().search("(((.+)+)+)+$").toString().constructor(_0x23a49f).search("(((.+)+)+)+$")})),_0x2d9815;function _0x5e1712(e){this.particleSystem=e,this.type=_0x5142be.END,this.inheritDirection=!1,this.inheritedVelocityAmount=0,(!e.emitter||!e.emitter.dispose)&&(e.emitter=new _0x1d0ffc("SubemitterSystemEmitter",e.getScene()))}_0x23a49f(),_0x5e1712.prototype.clone=function(){var e=this.particleSystem.emitter;e?e instanceof o$1p?e=e.clone():e instanceof _0x1d0ffc&&((e=new _0x1d0ffc).isVisible=!1):e=new o$1p;var t=new _0x5e1712(this.particleSystem.clone("",e));return t.particleSystem.name+="Clone",t.type=this.type,t.inheritDirection=this.inheritDirection,t.inheritedVelocityAmount=this.inheritedVelocityAmount,t.particleSystem._disposeEmitterOnDispose=!0,t.particleSystem.disposeOnStop=!0,t},_0x5e1712.prototype.serialize=function(){var e={};return e.type=this.type,e.inheritDirection=this.inheritDirection,e.inheritedVelocityAmount=this.inheritedVelocityAmount,e.particleSystem=this.particleSystem.serialize(),e},_0x5e1712._ParseParticleSystem=function(e,t,i){return _0xee24b0.Parse(e,t,i,!0)},_0x5e1712.Parse=function(e,t,i){var n=e.particleSystem,r=new _0x5e1712(_0x5e1712._ParseParticleSystem(n,t,i));return r.type=e.type,r.inheritDirection=e.inheritDirection,r.inheritedVelocityAmount=e.inheritedVelocityAmount,r.particleSystem._isSubEmitter=!0,r},_0x5e1712.prototype.destroy=function(){this.particleSystem.destroy()};var _0x3675f3=(_0x1fa705=!0,function(e,t){var i=_0x1fa705?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fa705=!1,i}),_0x40fc79=_0x3675f3(void 0,(function(){return _0x40fc79.toString().search("(((.+)+)+)+$").toString().constructor(_0x40fc79).search("(((.+)+)+)+$")})),_0x1fa705;function _0xee24b0(e,t,i,n,r,o){void 0===n&&(n=null),void 0===r&&(r=!1),void 0===o&&(o=.01);var a=_0x439851.call(this,e)||this;return a._scene=i,a._context=i._context,a._modelMatrx=p$1d.IDENTITY,a._inheritedVelocityOffset=new o$1p,a._particles=new Array,a._stockParticles=new Array,a._newPartsExcess=0,a._scaledColorStep=new e$1X(0,0,0,0),a._colorDiff=new e$1X(0,0,0,0),a._scaledDirection=new o$1p(0,0,0),a._scaledGravity=new o$1p(0,0,0),a._currentRenderId=-1,a._useInstancing=!1,a._started=!1,a._stopped=!1,a._actualFrame=0,a._currentEmitRate1=0,a._currentEmitRate2=0,a._currentStartSize1=0,a._currentStartSize2=0,a._rawTextureWidth=256,a._useRampGradients=!1,a._disposeEmitterOnDispose=!1,a.isLocal=!1,a._onBeforeDrawParticlesObservable=null,a.recycleParticle=function(e){var t=a._particles.pop();t!==e&&t.copyTo(e),a._stockParticles.push(t)},a._createParticle=function(){var e;if(0!==a._stockParticles.length?(e=a._stockParticles.pop())._reset():e=new _0xf9b57a(a),a._subEmitters&&a._subEmitters.length>0){var t=a._subEmitters[Math.floor(Math.random()*a._subEmitters.length)];e._attachedSubEmitters=[],t.forEach((function(t){if(t.type===_0x5142be.ATTACHED){var i=t.clone();e._attachedSubEmitters.push(i),i.particleSystem.start()}}))}return e},a._emitFromParticle=function(e){if(a._subEmitters&&0!==a._subEmitters.length){var t=Math.floor(Math.random()*a._subEmitters.length);a._subEmitters[t].forEach((function(t){if(t.type===_0x5142be.END){var i=t.clone();e._inheritParticleInfoToSubEmitter(i),i.particleSystem._rootParticleSystem=a,a.activeSubSystems.push(i.particleSystem),i.particleSystem.start()}}))}},a._capacity=t,a._epsilon=o,a._isAnimationSheetEnabled=r,e$2e(i)&&i.primitives.add(a),a._vertexArrayObject=null,a._customEffect={0:n},a._useInstancing=!0,a._createIndexBuffer(),a._createVertexBuffers(),a.particleEmitterType=new _0x4c62f8,a.updateFunction=function(e){var t=null,i=null;a.noiseTexture&&(t=a.noiseTexture.getSize(),i=a.noiseTexture.getContent());for(var n,r=function(){n=e[o];var r=a._scaledUpdateSpeed,s=n.age;if(n.age+=r,n.age>n.lifeTime){var l=n.age-s;r=(n.lifeTime-s)*r/l,n.age=n.lifeTime}var u=n.age/n.lifeTime;a._colorGradients&&a._colorGradients.length>0?_0xdebb2b.GetCurrentGradient(u,a._colorGradients,(function(e,t,i){e!==n._currentColorGradient&&(e$1X.clone(n._currentColor2,n._currentColor1),t.getColorToRef(n._currentColor2),n._currentColorGradient=e),e$1X.lerp(n._currentColor1,n._currentColor2,i,n.color)})):(e$1X.multiplyByScalar(n.colorStep,r,a._scaledColorStep),e$1X.add(n.color,a._scaledColorStep,n.color),n.color.a<0&&(n.color.a=0)),a._angularSpeedGradients&&a._angularSpeedGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._angularSpeedGradients,(function(e,t,i){e!==n._currentAngularSpeedGradient&&(n._currentAngularSpeed1=n._currentAngularSpeed2,n._currentAngularSpeed2=t.getFactor(),n._currentAngularSpeedGradient=e),n.angularSpeed=_0x442216.Lerp(n._currentAngularSpeed1,n._currentAngularSpeed2,i)})),n.angle+=n.angularSpeed*r;var c=r;if(a._velocityGradients&&a._velocityGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._velocityGradients,(function(e,t,i){e!==n._currentVelocityGradient&&(n._currentVelocity1=n._currentVelocity2,n._currentVelocity2=t.getFactor(),n._currentVelocityGradient=e),c*=_0x442216.Lerp(n._currentVelocity1,n._currentVelocity2,i)})),o$1p.multiplyByScalar(n.direction,c,a._scaledDirection),a._limitVelocityGradients&&a._limitVelocityGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._limitVelocityGradients,(function(e,t,i){e!==n._currentLimitVelocityGradient&&(n._currentLimitVelocity1=n._currentLimitVelocity2,n._currentLimitVelocity2=t.getFactor(),n._currentLimitVelocityGradient=e);var r=_0x442216.Lerp(n._currentLimitVelocity1,n._currentLimitVelocity2,i);o$1p.magnitude(n.direction)>r&&o$1p.multiplyByScalar(n.direction,a.limitVelocityDamping,n.direction)})),a._dragGradients&&a._dragGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._dragGradients,(function(e,t,i){e!==n._currentDragGradient&&(n._currentDrag1=n._currentDrag2,n._currentDrag2=t.getFactor(),n._currentDragGradient=e);var r=_0x442216.Lerp(n._currentDrag1,n._currentDrag2,i);o$1p.multiplyByScalar(a._scaledDirection,1-r,a._scaledDirection)})),a.isLocal&&n._localPosition?(o$1p.add(n._localPosition,a._scaledDirection,n._localPosition),p$1d.multiplyByPoint(a._emitterWorldMatrix,n._localPosition,n.position)):o$1p.add(n.position,a._scaledDirection,n.position),i&&t&&n._randomNoiseCoordinates1){var h=a._fetchR(n._randomNoiseCoordinates1.x,n._randomNoiseCoordinates1.y,t.width,t.height,i),d=a._fetchR(n._randomNoiseCoordinates1.z,n._randomNoiseCoordinates2.x,t.width,t.height,i),f=a._fetchR(n._randomNoiseCoordinates2.y,n._randomNoiseCoordinates2.z,t.width,t.height,i),p=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Vector3[0],_=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Vector3[1];p.x=(2*h-1)*a.noiseStrength.x,p.y=(2*d-1)*a.noiseStrength.y,p.z=(2*f-1)*a.noiseStrength.z,o$1p.multiplyByScalar(p,r,_),o$1p.add(n.direction,_,n.direction)}if(o$1p.multiplyByScalar(a.gravity,r,a._scaledGravity),o$1p.add(n.direction,a._scaledGravity,n.direction),a._sizeGradients&&a._sizeGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._sizeGradients,(function(e,t,i){e!==n._currentSizeGradient&&(n._currentSize1=n._currentSize2,n._currentSize2=t.getFactor(),n._currentSizeGradient=e),n.size=_0x442216.Lerp(n._currentSize1,n._currentSize2,i)})),a._useRampGradients&&(a._colorRemapGradients&&a._colorRemapGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._colorRemapGradients,(function(e,t,i){var r=_0x442216.Lerp(e.factor1,t.factor1,i),o=_0x442216.Lerp(e.factor2,t.factor2,i);n.remapData.x=r,n.remapData.y=o-r})),a._alphaRemapGradients&&a._alphaRemapGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._alphaRemapGradients,(function(e,t,i){var r=_0x442216.Lerp(e.factor1,t.factor1,i),o=_0x442216.Lerp(e.factor2,t.factor2,i);n.remapData.z=r,n.remapData.w=o-r}))),a._isAnimationSheetEnabled&&n.updateCellIndex(),n._inheritParticleInfoToSubEmitters(),n.age>=n.lifeTime)return a._emitFromParticle(n),n._attachedSubEmitters&&(n._attachedSubEmitters.forEach((function(e){e.particleSystem.disposeOnStop=!0,e.particleSystem.stop()})),n._attachedSubEmitters=null),a.recycleParticle(n),o--,"continue"},o=0;o<e.length;o++)r()},a}_0x40fc79(),_0xee24b0.prototype=Object.create(_0x439851.prototype),_0xee24b0.prototype.constructor=_0x439851,Object.defineProperties(_0xee24b0.prototype,{onDispose:{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}},useRampGradients:{get:function(){return this._useRampGradients},set:function(e){this._useRampGradients!==e&&(this._useRampGradients=e,this._resetEffect())}},particles:{get:function(){return this._particles}},modelMatrix:{get:function(){return this._modelMatrx},set:function(e){if(this._modelMatrx!==e&&(this._modelMatrx=e,this.subEmitters&&this.subEmitters.length))for(var t=0;t<this.subEmitters.length;t++)for(var i=0,n=this.subEmitters[t];i<n.length;i++){n[i].particleSystem.modelMatrix=e}}}}),_0xee24b0.prototype.getActiveCount=function(){return this._particles.length},_0xee24b0.prototype.getClassName=function(){return"ParticleSystem"},_0xee24b0.prototype.isStopping=function(){return this._stopped&&this.isAlive()},_0xee24b0.prototype.getCustomEffect=function(e){var t;return void 0===e&&(e=0),null!==(t=this._customEffect[e])&&void 0!==t?t:this._customEffect[0]},_0xee24b0.prototype.setCustomEffect=function(e,t){void 0===t&&(t=0),this._customEffect[t]=e},_0xee24b0.prototype._addFactorGradient=function(e,t,i,n){var r=new _0x341870(t,i,n);e.push(r),e.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}))},_0xee24b0.prototype._removeFactorGradient=function(e,t){if(e)for(var i=0,n=0,r=e;n<r.length;n++){if(r[n].gradient===t){e.splice(i,1);break}i++}},_0xee24b0.prototype.addLifeTimeGradient=function(e,t,i){return this._lifeTimeGradients||(this._lifeTimeGradients=[]),this._addFactorGradient(this._lifeTimeGradients,e,t,i),this},_0xee24b0.prototype.removeLifeTimeGradient=function(e){return this._removeFactorGradient(this._lifeTimeGradients,e),this},_0xee24b0.prototype.addSizeGradient=function(e,t,i){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t,i),this},_0xee24b0.prototype.removeSizeGradient=function(e){return this._removeFactorGradient(this._sizeGradients,e),this},_0xee24b0.prototype.addColorRemapGradient=function(e,t,i){return this._colorRemapGradients||(this._colorRemapGradients=[]),this._addFactorGradient(this._colorRemapGradients,e,t,i),this},_0xee24b0.prototype.removeColorRemapGradient=function(e){return this._removeFactorGradient(this._colorRemapGradients,e),this},_0xee24b0.prototype.addAlphaRemapGradient=function(e,t,i){return this._alphaRemapGradients||(this._alphaRemapGradients=[]),this._addFactorGradient(this._alphaRemapGradients,e,t,i),this},_0xee24b0.prototype.removeAlphaRemapGradient=function(e){return this._removeFactorGradient(this._alphaRemapGradients,e),this},_0xee24b0.prototype.addAngularSpeedGradient=function(e,t,i){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t,i),this},_0xee24b0.prototype.removeAngularSpeedGradient=function(e){return this._removeFactorGradient(this._angularSpeedGradients,e),this},_0xee24b0.prototype.addVelocityGradient=function(e,t,i){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t,i),this},_0xee24b0.prototype.removeVelocityGradient=function(e){return this._removeFactorGradient(this._velocityGradients,e),this},_0xee24b0.prototype.addLimitVelocityGradient=function(e,t,i){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t,i),this},_0xee24b0.prototype.removeLimitVelocityGradient=function(e){return this._removeFactorGradient(this._limitVelocityGradients,e),this},_0xee24b0.prototype.addDragGradient=function(e,t,i){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t,i),this},_0xee24b0.prototype.removeDragGradient=function(e){return this._removeFactorGradient(this._dragGradients,e),this},_0xee24b0.prototype.addEmitRateGradient=function(e,t,i){return this._emitRateGradients||(this._emitRateGradients=[]),this._addFactorGradient(this._emitRateGradients,e,t,i),this},_0xee24b0.prototype.removeEmitRateGradient=function(e){return this._removeFactorGradient(this._emitRateGradients,e),this},_0xee24b0.prototype.addStartSizeGradient=function(e,t,i){return this._startSizeGradients||(this._startSizeGradients=[]),this._addFactorGradient(this._startSizeGradients,e,t,i),this},_0xee24b0.prototype.removeStartSizeGradient=function(e){return this._removeFactorGradient(this._startSizeGradients,e),this};var _0x296d51=new e$1X;_0xee24b0.prototype._createRampGradientTexture=function(){if(this._rampGradients&&this._rampGradients.length&&!this._rampGradientsTexture){for(var e=new Uint8Array(4*this._rawTextureWidth),t=_0x296d51,i=0;i<this._rawTextureWidth;i++){var n=i/this._rawTextureWidth;_0xdebb2b.GetCurrentGradient(n,this._rampGradients,(function(n,r,o){e$1X.lerp(n.color,r.color,o,t),e[4*i]=255*t.red,e[4*i+1]=255*t.green,e[4*i+2]=255*t.blue,e[4*i+3]=255}))}this._rampGradientsTexture=new t$U({context:this._context,width:this._rawTextureWidth,height:1,source:{arrayBufferView:e},pixelFormat:V$12.RGBA,flipY:!1})}},_0xee24b0.prototype.getRampGradients=function(){return this._rampGradients},_0xee24b0.prototype.forceRefreshGradients=function(){this._syncRampGradientTexture()},_0xee24b0.prototype._syncRampGradientTexture=function(){!this._rampGradients||(this._rampGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this._rampGradientsTexture&&(this._rampGradientsTexture.destroy(),this._rampGradientsTexture=null),this._createRampGradientTexture())},_0xee24b0.prototype.addRampGradient=function(e,t){this._rampGradients||(this._rampGradients=[]);var i=new _0x30da6f(e,t);return this._rampGradients.push(i),this._syncRampGradientTexture(),this},_0xee24b0.prototype.removeRampGradient=function(e){return this._removeGradientAndTexture(e,this._rampGradients,this._rampGradientsTexture),this._rampGradientsTexture=null,this._rampGradients&&this._rampGradients.length>0&&this._createRampGradientTexture(),this},_0xee24b0.prototype.addColorGradient=function(e,t,i){this._colorGradients||(this._colorGradients=[]);var n=new _0x180241(e,t,i);return this._colorGradients.push(n),this._colorGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this},_0xee24b0.prototype.removeColorGradient=function(e){if(!this._colorGradients)return this;for(var t=0,i=0,n=this._colorGradients;i<n.length;i++){if(n[i].gradient===e){this._colorGradients.splice(t,1);break}t++}return this},_0xee24b0.prototype._fetchR=function(e,t,i,n,r){return r[4*(((e=.5*Math.abs(e)+.5)*i%i|0)+((t=.5*Math.abs(t)+.5)*n%n|0)*i)]/255},_0xee24b0.prototype._reset=function(){this._resetEffect()},_0xee24b0.prototype._resetEffect=function(){e$2e(this._drawCommand)&&(this._drawCommand.vertexArray=null),this._vertexArray&&!this._vertexArray.isDestroyed()&&this._vertexArray.destroy(),this._createIndexBuffer(),this._createVertexBuffers()},_0xee24b0.prototype._createVertexBuffers=function(){var e={},t=[],i=0;e.offset=i++;var n=new Float32Array([0,0,1,0,1,1,0,1]);this._spriteBuffer=t$X.createVertexBuffer({context:this._context,typedArray:n,usage:A$18.STATIC_DRAW}),t.push({name:"offset",index:e.offset,vertexBuffer:this._spriteBuffer,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:2*S$14.getSizeInBytes(S$14.FLOAT),normalize:!1}),this._vertexBufferSize=10,this._isAnimationSheetEnabled&&(this._vertexBufferSize+=1),(!this._isBillboardBased||this.billboardMode===_0xbf6524.BILLBOARDMODE_STRETCHED)&&(this._vertexBufferSize+=3),this._useRampGradients&&(this._vertexBufferSize+=4),this._vertexData=new Float32Array(this._capacity*this._vertexBufferSize),this._vertexBuffer=t$X.createVertexBuffer({context:this._context,sizeInBytes:this._vertexData.byteLength,usage:A$18.STATIC_DRAW});var r=S$14.getSizeInBytes(S$14.FLOAT),o=this._vertexBufferSize*r,a=0;e.position=i++,t.push({name:"position",index:e.position,vertexBuffer:this._vertexBuffer,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=3,e.color=i++,t.push({name:"color",index:e.color,vertexBuffer:this._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=4,e.angle=i++,t.push({name:"angle",index:e.angle,vertexBuffer:this._vertexBuffer,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=1,e.size=i++,t.push({name:"size",index:e.size,vertexBuffer:this._vertexBuffer,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=2,this._isAnimationSheetEnabled&&(e.cellIndex=i++,t.push({name:"cellIndex",index:e.cellIndex,vertexBuffer:this._vertexBuffer,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=1),(!this._isBillboardBased||this.billboardMode===_0xbf6524.BILLBOARDMODE_STRETCHED)&&(e.direction=i++,t.push({name:"direction",index:e.direction,vertexBuffer:this._vertexBuffer,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=3),this._useRampGradients&&(e.remapData=i++,t.push({name:"remapData",index:e.remapData,vertexBuffer:this._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=4),this._attributeLocations=e,this._attributes=t,this._vertexArray=new c$13({context:this._context,attributes:this._attributes,indexBuffer:this._indexBuffer})},_0xee24b0.prototype._createIndexBuffer=function(){var e=new Uint16Array(6),t=0;e[t++]=0,e[t++]=1,e[t++]=2,e[t++]=0,e[t++]=2,e[t++]=3,this._indexBuffer=t$X.createIndexBuffer({context:this._context,typedArray:e,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})},_0xee24b0.prototype.getCapacity=function(){return this._capacity},_0xee24b0.prototype.isAlive=function(){return this._alive},_0xee24b0.prototype.isStarted=function(){return this._started},_0xee24b0.prototype._prepareSubEmitterInternalArray=function(){var e=this;this._subEmitters=new Array,this.subEmitters&&this.subEmitters.forEach((function(t){t instanceof _0xee24b0?e._subEmitters.push([new _0x5e1712(t)]):t instanceof _0x5e1712?e._subEmitters.push([t]):t instanceof Array&&e._subEmitters.push(t)}))},_0xee24b0.prototype.start=function(e){var t=this;if(void 0===e&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set";if(e)setTimeout((function(){t.start(0)}),e);else{if(this._prepareSubEmitterInternalArray(),this._started=!0,this._stopped=!1,this._actualFrame=0,this._subEmitters&&0!=this._subEmitters.length&&(this.activeSubSystems=new Array),this._emitRateGradients&&(this._emitRateGradients.length>0&&(this._currentEmitRateGradient=this._emitRateGradients[0],this._currentEmitRate1=this._currentEmitRateGradient.getFactor(),this._currentEmitRate2=this._currentEmitRate1),this._emitRateGradients.length>1&&(this._currentEmitRate2=this._emitRateGradients[1].getFactor())),this._startSizeGradients&&(this._startSizeGradients.length>0&&(this._currentStartSizeGradient=this._startSizeGradients[0],this._currentStartSize1=this._currentStartSizeGradient.getFactor(),this._currentStartSize2=this._currentStartSize1),this._startSizeGradients.length>1&&(this._currentStartSize2=this._startSizeGradients[1].getFactor())),this.preWarmCycles){e$2e(this.emitter)&&this.emitter instanceof _0x1d0ffc&&this.emitter.computeWorldMatrix(!0);var i=this.noiseTexture;if(i&&i.onGeneratedObservable)i.onGeneratedObservable.addOnce((function(){setTimeout((function(){for(var e=0;e<t.preWarmCycles;e++)t.animate(!0),i.render()}))}));else for(var n=0;n<this.preWarmCycles;n++)this.animate(!0)}this.beginAnimationOnStart&&this.animations&&this.animations.length>0&&this._scene}},_0xee24b0.prototype.stop=function(e){void 0===e&&(e=!0),!this._stopped&&(this._stopped=!0,e&&this._stopSubEmitters())},_0xee24b0.prototype.reset=function(){this._stockParticles=[],this._particles=[]},_0xee24b0.prototype._appendParticleVertex=function(e,t,i,n){var r=e*this._vertexBufferSize;if(this._vertexData[r++]=t.position.x+this.worldOffset.x,this._vertexData[r++]=t.position.y+this.worldOffset.y,this._vertexData[r++]=t.position.z+this.worldOffset.z,this._vertexData[r++]=t.color.red,this._vertexData[r++]=t.color.green,this._vertexData[r++]=t.color.blue,this._vertexData[r++]=t.color.alpha,this._vertexData[r++]=t.angle,this._vertexData[r++]=t.scale.x*t.size,this._vertexData[r++]=t.scale.y*t.size,this._isAnimationSheetEnabled&&(this._vertexData[r++]=t.cellIndex),this._isBillboardBased)this.billboardMode===_0xbf6524.BILLBOARDMODE_STRETCHED&&(this._vertexData[r++]=t.direction.x,this._vertexData[r++]=t.direction.y,this._vertexData[r++]=t.direction.z);else if(t._initialDirection){var o=t._initialDirection;this.isLocal&&p$1d.multiplyByDirection(this._emitterWorldMatrix,o,o),0===o.x&&0===o.z&&(o.x=.001),this._vertexData[r++]=o.x,this._vertexData[r++]=o.y,this._vertexData[r++]=o.z}else{var a=t.direction;this.isLocal&&p$1d.multiplyByDirection(this._emitterWorldMatrix,a,a),0===a.x&&0===a.z&&(a.x=.001),this._vertexData[r++]=a.x,this._vertexData[r++]=a.y,this._vertexData[r++]=a.z}this._useRampGradients&&t.remapData&&(this._vertexData[r++]=t.remapData.x,this._vertexData[r++]=t.remapData.y,this._vertexData[r++]=t.remapData.z,this._vertexData[r++]=t.remapData.w),this._useInstancing||(this._isAnimationSheetEnabled&&(0===i?i=this._epsilon:1===i&&(i=1-this._epsilon),0===n?n=this._epsilon:1===n&&(n=1-this._epsilon)),this._vertexData[r++]=i,this._vertexData[r++]=n)},_0xee24b0.prototype._stopSubEmitters=function(){!this.activeSubSystems||(this.activeSubSystems.forEach((function(e){e.stop(!0)})),this.activeSubSystems=new Array)},_0xee24b0.prototype._removeFromRoot=function(){if(this._rootParticleSystem){var e=this._rootParticleSystem.activeSubSystems.indexOf(this);-1!==e&&this._rootParticleSystem.activeSubSystems.splice(e,1),this._rootParticleSystem=null}},_0xee24b0.prototype._update=function(e){var t=this;if(this._alive=this._particles.length>0,this.emitter.position){var i=this.emitter;this._emitterWorldMatrix=i.getWorldMatrix()}else{var n=this.emitter;this._emitterWorldMatrix=p$1d.fromTranslation(n,this._emitterWorldMatrix)}this.updateFunction(this._particles);for(var r,o,a=function(){if(s._particles.length===s._capacity)return"break";if(r=s._createParticle(),s._particles.push(r),s.targetStopDuration&&s._lifeTimeGradients&&s._lifeTimeGradients.length>0){var e=_0x442216.Clamp(s._actualFrame/s.targetStopDuration);_0xdebb2b.GetCurrentGradient(e,s._lifeTimeGradients,(function(t,i){var n=t,o=i,a=n.getFactor(),s=o.getFactor(),l=(e-n.gradient)/(o.gradient-n.gradient);r.lifeTime=_0x442216.Lerp(a,s,l)}))}else r.lifeTime=_0x442216.RandomRange(s.minLifeTime,s.maxLifeTime);var i=_0x442216.RandomRange(s.minEmitPower,s.maxEmitPower);if(s.startPositionFunction?s.startPositionFunction(s._emitterWorldMatrix,r.position,r,s.isLocal):s.particleEmitterType.startPositionFunction(s._emitterWorldMatrix,r.position,r,s.isLocal),s.isLocal&&(r._localPosition=o$1p.clone(r.position,r._localPosition),p$1d.multiplyByPoint(s._emitterWorldMatrix,r._localPosition,r.position)),s.startDirectionFunction?s.startDirectionFunction(s._emitterWorldMatrix,r.direction,r,s.isLocal):s.particleEmitterType.startDirectionFunction(s._emitterWorldMatrix,r.direction,r,s.isLocal),r._initialDirection=0===i?o$1p.clone(r.direction,r._initialDirection):null,o$1p.multiplyByScalar(r.direction,i,r.direction),s._sizeGradients&&0!==s._sizeGradients.length?(r._currentSizeGradient=s._sizeGradients[0],r._currentSize1=r._currentSizeGradient.getFactor(),r.size=r._currentSize1,s._sizeGradients.length>1?r._currentSize2=s._sizeGradients[1].getFactor():r._currentSize2=r._currentSize1):r.size=_0x442216.RandomRange(s.minSize,s.maxSize),r.scale.x=_0x442216.RandomRange(s.minScaleX,s.maxScaleX),r.scale.y=_0x442216.RandomRange(s.minScaleY,s.maxScaleY),s._startSizeGradients&&s._startSizeGradients[0]&&s.targetStopDuration){var n=s._actualFrame/s.targetStopDuration;_0xdebb2b.GetCurrentGradient(n,s._startSizeGradients,(function(e,i,n){e!==t._currentStartSizeGradient&&(t._currentStartSize1=t._currentStartSize2,t._currentStartSize2=i.getFactor(),t._currentStartSizeGradient=e);var o=_0x442216.Lerp(t._currentStartSize1,t._currentStartSize2,n);o$1p.multiplyByScalar(r.scale,o,r.scale)}))}s._angularSpeedGradients&&0!==s._angularSpeedGradients.length?(r._currentAngularSpeedGradient=s._angularSpeedGradients[0],r.angularSpeed=r._currentAngularSpeedGradient.getFactor(),r._currentAngularSpeed1=r.angularSpeed,s._angularSpeedGradients.length>1?r._currentAngularSpeed2=s._angularSpeedGradients[1].getFactor():r._currentAngularSpeed2=r._currentAngularSpeed1):r.angularSpeed=_0x442216.RandomRange(s.minAngularSpeed,s.maxAngularSpeed),r.angle=_0x442216.RandomRange(s.minInitialRotation,s.maxInitialRotation),s._velocityGradients&&s._velocityGradients.length>0&&(r._currentVelocityGradient=s._velocityGradients[0],r._currentVelocity1=r._currentVelocityGradient.getFactor(),s._velocityGradients.length>1?r._currentVelocity2=s._velocityGradients[1].getFactor():r._currentVelocity2=r._currentVelocity1),s._limitVelocityGradients&&s._limitVelocityGradients.length>0&&(r._currentLimitVelocityGradient=s._limitVelocityGradients[0],r._currentLimitVelocity1=r._currentLimitVelocityGradient.getFactor(),s._limitVelocityGradients.length>1?r._currentLimitVelocity2=s._limitVelocityGradients[1].getFactor():r._currentLimitVelocity2=r._currentLimitVelocity1),s._dragGradients&&s._dragGradients.length>0&&(r._currentDragGradient=s._dragGradients[0],r._currentDrag1=r._currentDragGradient.getFactor(),s._dragGradients.length>1?r._currentDrag2=s._dragGradients[1].getFactor():r._currentDrag2=r._currentDrag1),s._colorGradients&&0!==s._colorGradients.length?(r._currentColorGradient=s._colorGradients[0],r._currentColorGradient.getColorToRef(r.color),e$1X.clone(r.color,r._currentColor1),s._colorGradients.length>1?s._colorGradients[1].getColorToRef(r._currentColor2):e$1X.clone(r.color,r._currentColor2)):(o=_0x442216.RandomRange(0,1),e$1X.lerp(s.color1,s.color2,o,r.color),e$1X.subtract(s.colorDead,r.color,s._colorDiff),e$1X.multiplyByScalar(s._colorDiff,1/r.lifeTime,r.colorStep)),s._isAnimationSheetEnabled&&(r._initialStartSpriteCellID=s.startSpriteCellID,r._initialEndSpriteCellID=s.endSpriteCellID),o$1p.add(r.direction,s._inheritedVelocityOffset,r.direction),s._useRampGradients&&(r.remapData=new e$2c(0,1,0,1)),s.noiseTexture&&(r._randomNoiseCoordinates1?(o$1p.unpack([Math.random(),Math.random(),Math.random()],0,r._randomNoiseCoordinates1),o$1p.unpack([Math.random(),Math.random(),Math.random()],0,r._randomNoiseCoordinates2)):(r._randomNoiseCoordinates1=new o$1p(Math.random(),Math.random(),Math.random()),r._randomNoiseCoordinates2=new o$1p(Math.random(),Math.random(),Math.random()))),r._inheritParticleInfoToSubEmitters()},s=this,l=0;l<e;l++){if("break"===a())break}},_0xee24b0.prototype.fillDefines=function(e,t){if(this._isAnimationSheetEnabled&&e.push("ANIMATESHEET"),t===_0x4d4f68.BLENDMODE_MULTIPLY&&e.push("BLENDMULTIPLYMODE"),this._useRampGradients&&e.push("RAMPGRADIENT"),this._isBillboardBased)switch(e.push("BILLBOARD"),this.billboardMode){case _0xbf6524.BILLBOARDMODE_Y:e.push("BILLBOARDY");break;case _0xbf6524.BILLBOARDMODE_STRETCHED:e.push("BILLBOARDSTRETCHED");break;case _0xbf6524.BILLBOARDMODE_ALL:e.push("BILLBOARDMODE_ALL")}},_0xee24b0.prototype._getEffect=function(e){var t=this.getCustomEffect(e);if(t)return t;var i=[];this.fillDefines(i,e);var n=i.join("\n");if(this._cachedDefines!==n){this._cachedDefines=n;var r,o,a=this._drawCommand;e$2e(a.shaderProgram)?(r=a.shaderProgram.vertexShaderSource.clone(),o=a.shaderProgram.fragmentShaderSource.clone()):(r=new s$V({name:"BabylonParticlesVS",sources:[_0x375d2f]}),o=new s$V({name:"BabylonParticlesFS",sources:[_0x4eccd8]})),r.defines=i,o.defines=i,this._sp=this._sp&&this._sp.destroy(),this._sp=r$14.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}this._drawCommand.shaderProgram=this._sp},_0xee24b0.prototype.update=function(e){LicenseChecker.LICENSECHECKER.verify("ParticleSystem"),this.animate(!1,e),this.render(e),this._stopped&&(this._alive||(this._started=!1,this.onAnimationEnd&&this.onAnimationEnd(),this.disposeOnStop&&this._scene&&this._scene.primitives.remove(this)))},_0xee24b0.prototype.animate=function(e,t){var i=this;if(void 0===e&&(e=!1),this._started){if(!e&&this._scene){if(!this.isReady()||this._currentRenderId===t.frameNumber)return;this._currentRenderId=t.frameNumber}var n;if(this._scaledUpdateSpeed=this.updateSpeed*(e?this.preWarmStepOffset:1),this.manualEmitCount>-1)n=this.manualEmitCount,this._newPartsExcess=0,this.manualEmitCount=0;else{var r=this.emitRate;if(this._emitRateGradients&&this._emitRateGradients.length>0&&this.targetStopDuration){var o=this._actualFrame/this.targetStopDuration;_0xdebb2b.GetCurrentGradient(o,this._emitRateGradients,(function(e,t,n){e!==i._currentEmitRateGradient&&(i._currentEmitRate1=i._currentEmitRate2,i._currentEmitRate2=t.getFactor(),i._currentEmitRateGradient=e),r=_0x442216.Lerp(i._currentEmitRate1,i._currentEmitRate2,n)}))}n=r*this._scaledUpdateSpeed>>0,this._newPartsExcess+=r*this._scaledUpdateSpeed-n}if(this._newPartsExcess>1&&(n+=this._newPartsExcess>>0,this._newPartsExcess-=this._newPartsExcess>>0),this._alive=!1,this._stopped?n=0:(this._actualFrame+=this._scaledUpdateSpeed,this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()),this._update(n),!e){for(var a=0,s=0;s<this._particles.length;s++){var l=this._particles[s];this._appendParticleVertices(a,l),a+=this._useInstancing?1:4}this._vertexBuffer&&this._vertexBuffer.copyFromArrayView(this._vertexData)}0===this.manualEmitCount&&this.disposeOnStop&&this.stop()}},_0xee24b0.prototype._appendParticleVertices=function(e,t){this._appendParticleVertex(e++,t,0,0),this._useInstancing||(this._appendParticleVertex(e++,t,1,0),this._appendParticleVertex(e++,t,1,1),this._appendParticleVertex(e++,t,0,1))},_0xee24b0.prototype.isReady=function(){return!!this.emitter},_0xee24b0.prototype._render=function(e,t){return e$2e(this._drawCommand)||this._createDrawCommand(),this._getEffect(e),this._drawCommand.vertexArray=this._vertexArray,this._drawCommand.instanceCount=this._capacity,_0x439851._setRenderState(this._drawCommand,e),this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.notifyObservers(effect),t.commandList.push(this._drawCommand),this._particles.length},_0xee24b0.prototype.render=function(e){if(!this._particles.length)return 0;this.forceDepthWrite;return this.blendMode===_0x4d4f68.BLENDMODE_MULTIPLYADD?this._render(_0x4d4f68.BLENDMODE_ADD,e):this._render(this.blendMode,e)},_0xee24b0.prototype.destroy=function(){if(e$2e(this._drawCommand)){var e=this._drawCommand;e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0,this._drawCommand=void 0}if(this.noiseTexture&&(!this.noiseTexture.isDestroyed()&&this.noiseTexture.destroy(),this.noiseTexture=null),this._rampGradientsTexture&&(!this._rampGradientsTexture.isDestroyed()&&this._rampGradientsTexture.destroy(),this._rampGradientsTexture=null),this._removeFromRoot(),this._subEmitters&&this._subEmitters.length){for(var t=0;t<this._subEmitters.length;t++)for(var i=0,n=this._subEmitters[t];i<n.length;i++){var r=n[i];r.hasOwnProperty("particleSystem")?r.particleSystem.destroy():r.dispose()}this._subEmitters=[],this.subEmitters=[]}this._disposeEmitterOnDispose&&this.emitter&&this.emitter.dispose&&this.emitter.dispose(!0),this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.clear(),this.reset()},_0xee24b0.prototype.clone=function(e,t){this._engine;var i=this.serialize(),n=_0xee24b0.Parse(i,this._scene||this._engine,"",!1,this._context);return n.name=e,n.customShader=null,n._customEffect={},void 0===t&&(t=this.emitter),this.noiseTexture&&(n.noiseTexture=this.noiseTexture.clone()),this.particleTexture&&(n.particleTexture=this.particleTexture),e$2e(this._modelMatrx)&&(n._modelMatrx=new p$1d,p$1d.clone(this._modelMatrx,n._modelMatrx)),n.emitter=t,this.preventAutoStart||n.start(),n},_0xee24b0.prototype.serialize=function(e){void 0===e&&(e=!1);var t={};_0xee24b0._Serialize(t,this,e);var i=[];if(e$1X.pack(this.textureMask,i),t.textureMask=i,t.customShader=this.customShader,t.preventAutoStart=this.preventAutoStart,this.subEmitters){t.subEmitters=[],this._subEmitters||this._prepareSubEmitterInternalArray();for(var n=0,r=this._subEmitters;n<r.length;n++){for(var o=[],a=0,s=r[n];a<s.length;a++){var l=s[a];o.push(l.serialize())}t.subEmitters.push(o)}}return t},_0xee24b0._Serialize=function(e,t,i){if(e.name=t.name,e.id=t.id,e.capacity=t.getCapacity(),t.emitter.position){var n=t.emitter;e.emitterId=n.id}else{var r=t.emitter,o=[];o$1p.pack(r,o),e.emitter=o}t.particleEmitterType&&(e.particleEmitterType=t.particleEmitterType.serialize()),t.particleTexture&&(i?e.texture=t.particleTexture.serialize():(e.textureName=t.particleTexture.name,e.invertY=!!t.particleTexture._flipY)),e.isLocal=t.isLocal,e.startDelay=t.startDelay,e.renderingGroupId=t.renderingGroupId,e.isBillboardBased=t.isBillboardBased,e.billboardMode=t.billboardMode,e.minAngularSpeed=t.minAngularSpeed,e.maxAngularSpeed=t.maxAngularSpeed,e.minSize=t.minSize,e.maxSize=t.maxSize,e.minScaleX=t.minScaleX,e.maxScaleX=t.maxScaleX,e.minScaleY=t.minScaleY,e.maxScaleY=t.maxScaleY,e.minEmitPower=t.minEmitPower,e.maxEmitPower=t.maxEmitPower,e.minLifeTime=t.minLifeTime,e.maxLifeTime=t.maxLifeTime,e.emitRate=t.emitRate;var a=[];o$1p.pack(t.gravity,a),e.gravity=a;var s=[];o$1p.pack(t.noiseStrength,s),e.noiseStrength=s;var l=[];e$1X.pack(t.color1,l),e.color1=l;var u=[];e$1X.pack(t.color2,u),e.color2=u;var c=[];e$1X.pack(t.colorDead,c),e.colorDead=c,e.updateSpeed=t.updateSpeed,e.targetStopDuration=t.targetStopDuration,e.blendMode=t.blendMode,e.preWarmCycles=t.preWarmCycles,e.preWarmStepOffset=t.preWarmStepOffset,e.minInitialRotation=t.minInitialRotation,e.maxInitialRotation=t.maxInitialRotation,e.startSpriteCellID=t.startSpriteCellID,e.endSpriteCellID=t.endSpriteCellID,e.spriteCellChangeSpeed=t.spriteCellChangeSpeed,e.spriteCellWidth=t.spriteCellWidth,e.spriteCellHeight=t.spriteCellHeight,e.spriteRandomStartCell=t.spriteRandomStartCell,e.isAnimationSheetEnabled=t.isAnimationSheetEnabled;var h=t.getColorGradients();if(h){e.colorGradients=[];for(var d=0,f=h;d<f.length;d++){var p=f[d];l=[];e$1X.pack(p.color1,l);var _={gradient:p.gradient,color1:l};if(p.color2){u=[];e$1X.pack(p.color2,u),_.color2=u}else{u=[];e$1X.pack(p.color1,u),_.color2=u}e.colorGradients.push(_)}}var m=t.getRampGradients();if(m){e.rampGradients=[];for(var g=0,x=m;g<x.length;g++){var y=x[g],v=[];e$1X.pack(y.color,v);_={gradient:y.gradient,color:v};e.rampGradients.push(_)}e.useRampGradients=t.useRampGradients}var $=t.getColorRemapGradients();if($){e.colorRemapGradients=[];for(var b=0,T=$;b<T.length;b++){var C=T[b];_={gradient:C.gradient,factor1:C.factor1};void 0!==C.factor2?_.factor2=C.factor2:_.factor2=C.factor1,e.colorRemapGradients.push(_)}}var S=t.getAlphaRemapGradients();if(S){e.alphaRemapGradients=[];for(var w=0,E=S;w<E.length;w++){var P=E[w];_={gradient:P.gradient,factor1:P.factor1};void 0!==P.factor2?_.factor2=P.factor2:_.factor2=P.factor1,e.alphaRemapGradients.push(_)}}var A=t.getSizeGradients();if(A){e.sizeGradients=[];for(var L=0,M=A;L<M.length;L++){var R=M[L];_={gradient:R.gradient,factor1:R.factor1};void 0!==R.factor2?_.factor2=R.factor2:_.factor2=R.factor1,e.sizeGradients.push(_)}}var O=t.getAngularSpeedGradients();if(O){e.angularSpeedGradients=[];for(var D=0,I=O;D<I.length;D++){var F=I[D];_={gradient:F.gradient,factor1:F.factor1};void 0!==F.factor2?_.factor2=F.factor2:_.factor2=F.factor1,e.angularSpeedGradients.push(_)}}var B=t.getVelocityGradients();if(B){e.velocityGradients=[];for(var N=0,G=B;N<G.length;N++){var z=G[N];_={gradient:z.gradient,factor1:z.factor1};void 0!==z.factor2?_.factor2=z.factor2:_.factor2=z.factor1,e.velocityGradients.push(_)}}var U=t.getDragGradients();if(U){e.dragGradients=[];for(var V=0,k=U;V<k.length;V++){var W=k[V];_={gradient:W.gradient,factor1:W.factor1};void 0!==W.factor2?_.factor2=W.factor2:_.factor2=W.factor1,e.dragGradients.push(_)}}var H=t.getEmitRateGradients();if(H){e.emitRateGradients=[];for(var q=0,j=H;q<j.length;q++){var X=j[q];_={gradient:X.gradient,factor1:X.factor1};void 0!==X.factor2?_.factor2=X.factor2:_.factor2=X.factor1,e.emitRateGradients.push(_)}}var Y=t.getStartSizeGradients();if(Y){e.startSizeGradients=[];for(var Z=0,K=Y;Z<K.length;Z++){var Q=K[Z];_={gradient:Q.gradient,factor1:Q.factor1};void 0!==Q.factor2?_.factor2=Q.factor2:_.factor2=Q.factor1,e.startSizeGradients.push(_)}}var J=t.getLifeTimeGradients();if(J){e.lifeTimeGradients=[];for(var ee=0,te=J;ee<te.length;ee++){var ie=te[ee];_={gradient:ie.gradient,factor1:ie.factor1};void 0!==ie.factor2?_.factor2=ie.factor2:_.factor2=ie.factor1,e.lifeTimeGradients.push(_)}}var ne=t.getLimitVelocityGradients();if(ne){e.limitVelocityGradients=[];for(var re=0,oe=ne;re<oe.length;re++){var ae=oe[re];_={gradient:ae.gradient,factor1:ae.factor1};void 0!==ae.factor2?_.factor2=ae.factor2:_.factor2=ae.factor1,e.limitVelocityGradients.push(_)}e.limitVelocityDamping=t.limitVelocityDamping}t.noiseTexture&&(e.noiseTexture=t.noiseTexture.serialize())},_0xee24b0.Parse=function(e,t,i,n){void 0===n&&(n=!1);var r=new _0xee24b0(e.name,e.capacity,t,null,e.isAnimationSheetEnabled,0);if(r.customShader=null,e.id&&(r.id=e.id),e.subEmitters){r.subEmitters=[];for(var o=0,a=e.subEmitters;o<a.length;o++){for(var s=[],l=0,u=a[o];l<u.length;l++){var c=u[l];s.push(_0x5e1712.Parse(c,t,i))}r.subEmitters.push(s)}}if(_0x439851._Parse(e,r,i),e.textureMask){var h=new e$1X;e$1X.unpack(e.textureMask,0,h),r.textureMask=h}return e.preventAutoStart&&(r.preventAutoStart=e.preventAutoStart),!n&&!r.preventAutoStart&&r.start(),r};var _0x480752=new o$1p;function _0x1d7521(e){var t=e.maxAngularSpeed*e.maxLifeTime;let i=p$1d.multiply(e.modelMatrix,e._emitterWorldMatrix,new p$1d);i$1d.transform(new i$1d,i,e._boundingVolume),e._boundingVolume.radius=t+10}new e$2c,_0xee24b0.prototype._createUniformMap=function(e){var t={},i=this;t.diffuseSampler=function(){return e$2e(i.particleTexture)?i.particleTexture:i._context.defaultTexture},t.particlesInfos=function(){var e=i._rawTextureWidth,t=i._rawTextureWidth;if(i.particleTexture)e=i.particleTexture.width,t=i.particleTexture.height;return _0x480752.x=i.spriteCellWidth/e,_0x480752.y=i.spriteCellHeight/t,_0x480752.z=i.spriteCellWidth/e,_0x480752},t.translationPivot=function(){return i.translationPivot},t.textureMask=function(){return i.textureMask},t.rampSampler=function(){return i._rampGradientsTexture},this._uniformMap=t},_0xee24b0.prototype._createDrawCommand=function(){this._boundingVolume=new i$1d,_0x1d7521(this);var e=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._modelMatrx,boundingVolume:this._boundingVolume,pass:Le$q.OPAQUE,cull:!1});e.castShadows=!1,e.receiveShadows=!1,e.selectCastShadows=!1,this._createUniformMap(),e.uniformMap=this._uniformMap,e.vertexArray=this._vertexArray,this._drawCommand=e};var _0x400f08=(_0x58d6c7=!0,function(e,t){var i=_0x58d6c7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x58d6c7=!1,i}),_0x488263=_0x400f08(void 0,(function(){return _0x488263.toString().search("(((.+)+)+)+$").toString().constructor(_0x488263).search("(((.+)+)+)+$")})),_0x58d6c7;function _0xcf9486(){this.systems=new Array,this._modelMatrx=new p$1d}_0x488263(),Object.defineProperties(_0xcf9486.prototype,{modelMatrix:{get:function(){return this._modelMatrx},set:function(e){if(this._modelMatrx!==e){this._modelMatrx=e;for(var t=0,i=this.systems;t<i.length;t++){i[t].modelMatrix=e}}}},emitterNode:{get:function(){return this._emitterNode}}}),_0xcf9486.prototype.setEmitterAsSphere=function(e,t,i){this._emitterNode&&this._emitterNode.dispose(),this._emitterCreationOptions={kind:"Sphere",options:e,renderingGroupId:t};var n=_Meshes_Builders_sphereBuilder__WEBPACK_IMPORTED_MODULE_1__.SphereBuilder.CreateSphere("emitterSphere",{diameter:e.diameter,segments:e.segments},i);n.renderingGroupId=t;var r=new _Materials_standardMaterial__WEBPACK_IMPORTED_MODULE_5__.StandardMaterial("emitterSphereMaterial",i);r.emissiveColor=e.color,n.material=r;for(var o=0,a=this.systems;o<a.length;o++){a[o].emitter=n}this._emitterNode=n},_0xcf9486.prototype.update=function(e){for(var t=0,i=this.systems;t<i.length;t++){i[t].update(e)}},_0xcf9486.prototype.start=function(e){for(var t=0,i=this.systems;t<i.length;t++){var n=i[t];e&&(n.emitter=e),n.start()}},_0xcf9486.prototype.dispose=function(){for(var e=0,t=this.systems;e<t.length;e++){t[e].dispose()}this.systems=[],this._emitterNode&&(this._emitterNode.dispose(),this._emitterNode=null)},_0xcf9486.prototype.serialize=function(e){void 0===e&&(e=!1);for(var t={systems:[]},i=0,n=this.systems;i<n.length;i++){var r=n[i];t.systems.push(r.serialize(e))}return this._emitterNode&&(t.emitter=this._emitterCreationOptions),t},_0xcf9486.Parse=function(e,t,i){for(var n=new _0xcf9486,r=this.BaseAssetsUrl+"/textures/",o=0,a=e.systems;o<a.length;o++){var s=a[o];e$2e(t.context.webgl2)&&t.context.webgl2&&e$2e(i)&&i?n.systems.push(_0x313aa5.Parse(s,t,r,!0)):n.systems.push(_0xee24b0.Parse(s,t,r,!0))}return n},_0xcf9486.BaseAssetsUrl="https://assets.babylonjs.com/particles";var _0x160dd2=(_0x5dea9e=!0,function(e,t){var i=_0x5dea9e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5dea9e=!1,i}),_0x5bd2cb=_0x160dd2(void 0,(function(){return _0x5bd2cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x5bd2cb).search("(((.+)+)+)+$")})),_0x5dea9e;function _0x38f4df(){}_0x5bd2cb(),_0x38f4df.fromJsonUrl=function(e,t,i){return t$10.createIfNeeded(e).fetchJson().then((function(e){return e$2e(e.systems)?_0xcf9486.Parse(e,t,i):e$2e(t.context.webgl2)&&t.context.webgl2&&e$2e(i)&&i?_0x313aa5.Parse(e,t,"",!1):_0xee24b0.Parse(e,t,"",!1)}))};var f$o="varying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n czm_materialInput materialInput;\n\n vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n materialInput.s = v_st.s;\n materialInput.st = v_st;\n materialInput.str = vec3(v_st, 0.0);\n\n // Convert tangent space material normal to eye space\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);\n\n // Convert view vector to world space\n vec3 positionToEyeEC = -v_positionEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",d$t="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec2 st;\nattribute float batchId;\n\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionMC = position3DHigh + position3DLow; // position in model coordinates\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";function t$h(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.translucent,!0),i=u$Z(e.aboveGround,!1);this.material=e$2e(e.material)?e.material:r$Y.fromType(r$Y.ColorType),this.translucent=u$Z(e.translucent,!0),this._vertexShaderSource=u$Z(e.vertexShaderSource,d$t),this._fragmentShaderSource=u$Z(e.fragmentShaderSource,f$o),this._renderState=a$S.getDefaultRenderState(t,!i,e.renderState),this._closed=!1,this._flat=u$Z(e.flat,!1),this._faceForward=u$Z(e.faceForward,i),this._aboveGround=i,this._name="EllipsoidSurfaceAppearance"}Object.defineProperties(t$h.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return t$h.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}},name:{get:function(){return this._name+"_"+this.material._id}}}),t$h.VERTEX_FORMAT=n$13.POSITION_AND_ST,t$h.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,t$h.prototype.isTranslucent=a$S.prototype.isTranslucent,t$h.prototype.getRenderState=a$S.prototype.getRenderState;var _0x2d7b44=(_0x4e2a5b=!0,function(e,t){var i=_0x4e2a5b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e2a5b=!1,i}),_0x147131=_0x2d7b44(void 0,(function(){return _0x147131.toString().search("(((.+)+)+)+$").toString().constructor(_0x147131).search("(((.+)+)+)+$")})),_0x4e2a5b;_0x147131();var _0x5e709e={FIRE:0,FOUNTAIN:1,RAIN:2},v$o=Object.freeze(_0x5e709e),n$k=new o$1o(1,1);function a$k(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.mass=u$Z(e.mass,1),this.position=o$1p.clone(u$Z(e.position,o$1p.ZERO)),this.velocity=o$1p.clone(u$Z(e.velocity,o$1p.ZERO)),this.life=u$Z(e.life,Number.MAX_VALUE),this.image=e.image,this.startColor=e$1X.clone(u$Z(e.startColor,e$1X.WHITE)),this.endColor=e$1X.clone(u$Z(e.endColor,e$1X.WHITE)),this.startScale=u$Z(e.startScale,1),this.endScale=u$Z(e.endScale,1),this.imageSize=o$1o.clone(u$Z(e.imageSize,n$k)),this.rotationSpeed=u$Z(e.rotationSpeed,0),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(a$k.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var o$t=new o$1p;function u$l(e,t,i,n){e=u$Z(e,1),o$1q.typeOf.number.greaterThan("radius",e,0),this._radius=u$Z(e,1),this._innerRadius=u$Z(t,0),this._startAngle=u$Z(i,0),this._endAngle=u$Z(n,e$2d.TWO_PI)}function o$s(e){e=u$Z(e,1),o$1q.typeOf.number.greaterThan("radius",e,0),this._radius=u$Z(e,1),this.radius=this._radius}a$k.prototype.update=function(e,t){return o$1p.multiplyByScalar(this.velocity,e,o$t),o$1p.add(this.position,o$t,this.position),e$2e(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life},Object.defineProperties(u$l.prototype,{radius:{get:function(){return this._radius},set:function(e){o$1q.typeOf.number.greaterThan("value",e,0),this._radius=e}},innerRadius:{get:function(){return this._innerRadius},set:function(e){o$1q.typeOf.number.greaterThan("value",e,0),this._innerRadius=e}},startAngle:{get:function(){return this._startAngle},set:function(e){this._startAngle=e}},endAngle:{get:function(){return this._endAngle},set:function(e){this._endAngle=e}},type:{get:function(){return"Circle"}}}),u$l.prototype.emit=function(e){var t=this._startAngle,i=this._endAngle;t>i&&(t=this._endAngle,i=this._startAngle);var n=e$2d.randomBetween(t,i),r=e$2d.randomBetween(this._innerRadius,this._radius),o=r*Math.cos(n),a=r*Math.sin(n);e.position=o$1p.fromElements(o,a,0,e.position),e.velocity=o$1p.clone(o$1p.UNIT_Z,e.velocity)},Object.defineProperties(o$s.prototype,{radius:{get:function(){return this._radius},set:function(e){o$1q.typeOf.number.greaterThan("value",e,0),this._radius=e}},type:{get:function(){return"Sphere"}}}),o$s.prototype.emit=function(e){var t=e$2d.randomBetween(0,e$2d.TWO_PI),i=e$2d.randomBetween(0,e$2d.PI),n=e$2d.randomBetween(0,this._radius),r=n*Math.cos(t)*Math.sin(i),o=n*Math.sin(t)*Math.sin(i),a=n*Math.cos(i);e.position=o$1p.fromElements(r,o,a,e.position),e.velocity=o$1p.normalize(e.position,e.velocity)};var v$n=e$2d.toRadians(30);function n$j(e){this._angle=u$Z(e,v$n)}Object.defineProperties(n$j.prototype,{angle:{get:function(){return this._angle},set:function(e){o$1q.typeOf.number("value",e),this._angle=e}}}),n$j.prototype.emit=function(e){var t=Math.tan(this._angle),i=e$2d.randomBetween(0,e$2d.TWO_PI),n=e$2d.randomBetween(0,t),r=n*Math.cos(i),o=n*Math.sin(i);e.velocity=o$1p.fromElements(r,o,1,e.velocity),o$1p.normalize(e.velocity,e.velocity),e.position=o$1p.clone(o$1p.ZERO,e.position)};var I$q=new o$1o(1,1);function g$t(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.show=u$Z(e.show,!0),this.updateCallback=e.updateCallback,this.loop=u$Z(e.loop,!0),this.image=u$Z(e.image,void 0);var t=e.emitter;e$2e(t)||(t=new u$l(.5)),this._emitter=t,t.owner=this,this._bursts=e.bursts,this._modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._emitterModelMatrix=p$1d.clone(u$Z(e.emitterModelMatrix,p$1d.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new p$1d,this._startColor=e$1X.clone(u$Z(e.color,u$Z(e.startColor,e$1X.WHITE))),this._endColor=e$1X.clone(u$Z(e.color,u$Z(e.endColor,e$1X.WHITE))),this._startScale=u$Z(e.scale,u$Z(e.startScale,1)),this._endScale=u$Z(e.scale,u$Z(e.endScale,1)),this._minRotationSpeed=u$Z(e.minRotationSpeed,u$Z(e.minimumRotationSpeed,0)),this._maxRotationSpeed=u$Z(e.maxRotationSpeed,u$Z(e.maximumRotationSpeed,0)),this._emissionRate=u$Z(e.emissionRate,5),this._emissionRateByDistance=u$Z(e.emissionRate,5),this._minimumSpeed=u$Z(e.speed,u$Z(e.minimumSpeed,1)),this._maximumSpeed=u$Z(e.speed,u$Z(e.maximumSpeed,1)),this._minimumParticleLife=u$Z(e.particleLife,u$Z(e.minimumParticleLife,5)),this._maximumParticleLife=u$Z(e.particleLife,u$Z(e.maximumParticleLife,5)),this._minimumMass=u$Z(e.mass,u$Z(e.minimumMass,1)),this._maximumMass=u$Z(e.mass,u$Z(e.maximumMass,1)),this._minimumImageSize=o$1o.clone(u$Z(e.imageSize,u$Z(e.minimumImageSize,I$q))),this._maximumImageSize=o$1o.clone(u$Z(e.imageSize,u$Z(e.maximumImageSize,I$q))),this._lifetime=u$Z(e.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new o$1h,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0,this._sizeInMeters=u$Z(e.sizeInMeters,u$Z(e.sizeInMeters,!1)),this._boundingSphere=new i$1d(o$1p.ZERO,100),this.lodRangeScale=1,this._performance=u$Z(e.performance,!0),this._type=u$Z(e.type,v$o.FIRE)}function W$m(e){var t=e._emissionRate,i=e._maximumParticleLife,n=0,r=e._bursts;if(e$2e(r))for(var o=r.length,a=0;a<o;++a)n+=r[a].maximum;var s=e._billboardCollection,l=e.image,u=Math.ceil(t*i+n),c=e._particles,h=e._particlePool,d=e._emitter;e$2e(d.areaFactor)&&(u=Math.min(u,d.areaFactor));for(var f=Math.max(u-c.length-h.length,0),p=0;p<f;++p){var _=new a$k;_._billboard=s.add({image:l,sizeInMeters:e._sizeInMeters}),h.push(_)}e._particleEstimate=u}function j$l(e){var t=e._particlePool.pop();return e$2e(t)||(t=new a$k),t}function H$s(e,t){e._particlePool.push(t)}function Y$f(e){for(var t=e._particles,i=e._particlePool,n=e._billboardCollection,r=(t.length,i.length),o=e._particleEstimate,a=o;a<r;++a){var s=i[a];!e$2e(s)||n.remove(s._billboard)}i.length=o}function J$e(e){e$2e(e._billboard)&&(e._billboard.show=!1)}function w$l(e,t){var i=t._billboard;e$2e(i)||(i=t._billboard=e._billboardCollection.add({image:t.image,sizeInMeters:e._sizeInMeters})),i.width=t.imageSize.x,i.height=t.imageSize.y,i.position=t.position,i.show=!0;var n=e$2d.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),r=e$2d.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),o=e$2d.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),a=e$2d.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);i.color=new e$1X(n,r,o,a),i.scale=e$2d.lerp(t.startScale,t.endScale,t.normalizedAge),i.rotation=t.age*t.rotationSpeed}function X$e(e,t){t.startColor=e$1X.clone(e._startColor,t.startColor),t.endColor=e$1X.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=e$2d.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=e$2d.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=e$2d.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=e$2d.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t.rotationSpeed=e$2d.randomBetween(e._minRotationSpeed,e._maxRotationSpeed),t._normalizedAge=0,t._age=0;var i=e$2d.randomBetween(e._minimumSpeed,e._maximumSpeed);o$1p.multiplyByScalar(t.velocity,i,t.velocity),e._particles.push(t)}function K$f(e,t){if(e._isComplete)return 0;var i=(t=e$2d.mod(t,e._lifetime))*e._emissionRateByDistance,n=Math.floor(i);if(e._carryOver+=i-n,e._carryOver>1&&(n++,e._carryOver-=1),e$2e(e.bursts))for(var r=e.bursts.length,o=0;o<r;o++){var a=e.bursts[o],s=e._currentTime;e$2e(a)&&!a._complete&&s>a.time&&(n+=e$2d.randomBetween(a.minimum,a.maximum),a._complete=!0)}return n}Object.defineProperties(g$t.prototype,{emitter:{get:function(){return this._emitter},set:function(e){o$1q.defined("value",e),this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){o$1q.defined("value",e),this._matrixDirty=this._matrixDirty||!p$1d.equals(this._modelMatrix,e),p$1d.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){o$1q.defined("value",e),this._matrixDirty=this._matrixDirty||!p$1d.equals(this._emitterModelMatrix,e),p$1d.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){o$1q.defined("value",e),e$1X.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){o$1q.defined("value",e),e$1X.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumSpeed=e}},minimumRotationSpeed:{get:function(){return this._minRotationSpeed},set:function(e){this._minRotationSpeed=e}},maximumRotationSpeed:{get:function(){return this._maxRotationSpeed},set:function(e){this._maxRotationSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){o$1q.typeOf.object("value",e),o$1q.typeOf.number.greaterThanOrEquals("value.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){o$1q.typeOf.object("value",e),o$1q.typeOf.number.greaterThanOrEquals("value.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._maximumImageSize=e}},lifetime:{get:function(){return this._lifetime},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._lifetime=e}},type:{get:function(){return this._ParticleSystemType},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._ParticleSystemType=e,this.setParticleType(e)}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});var Z$i=new i$1d,P$m=new p$1d;function G$n(e,t){if(e$2e(e._emitter)&&"Polygon"==e._emitter.type)e._boundingSphere=e._emitter.boundingSphere;else{var i=e._maxVelocity*e._maximumParticleLife;P$m=p$1d.multiply(e.modelMatrix,e.emitterModelMatrix,P$m),i$1d.transform(Z$i,P$m,e._boundingSphere),e._boundingSphere.radius=i+10+e._emitter.radius}t.mode===C$14.COLUMBUS_VIEW&&s$R.computeActualWgs84Position(t,e._boundingSphere.center,e._boundingSphere.center)}function Q$j(e,t){var i=t.camera.positionWC,n=o$1p.distance(i,e._boundingSphere.center)-e._boundingSphere.radius,r=0;n>1e3*e.lodRangeScale?r=0:n>200*e.lodRangeScale?(r=e._emissionRate/8,r=Math.max(2,r)):n>50*e.lodRangeScale?(r=e._emissionRate/2,r=Math.max(2,r)):r=e._emissionRate,e$2e(e._emitter.areaFactor)&&(r=Math.min(e._emitter.areaFactor,r)),e._emissionRateByDistance=r}var C$n=new o$1p;g$t.prototype.setParticleType=function(e){switch(e){case v$o.FIRE:this._emitter=new n$j(e$2d.toRadians(45)),this._emissionRate=150,this._particleSize=2,this._minimumParticleLife=1.5,this._maximumParticleLife=1.8,this._minimumSpeed=7,this._maximumSpeed=9,this._startScale=3,this._endScale=1.5,this._startColor=new e$1X(1,1,1,1),this._endColor=new e$1X(1,0,0,0),this._lifeTime=6,this._sizeInMeters=!0,this._performance=!0;break;case v$o.FOUNTAIN:this._emitter=new o$1o(1,1),this._emissionRate=40,this._particleSize=1,this._minimumParticleLife=6,this._maximumParticleLife=7,this._minimumSpeed=10,this._maximumSpeed=10,this._startScale=1,this._endScale=30,this._startColor=new e$1X(1,1,1,.6),this._endColor=new e$1X(.8,.86,1,.4),this._lifeTime=16,this._sizeInMeters=!0,this._performance=!0;break;case v$o.RAIN:this._emitter=new o$s(5e3),this._emissionRate=8e3,this._particleSize=30,this._minimumParticleLife=6,this._maximumParticleLife=6,this._minimumSpeed=0,this._maximumSpeed=0,this._startScale=1,this._endScale=1,this._startColor=new e$1X(1,1,1,.8),this._endColor=new e$1X(1,1,1,.8),this._lifeTime=10,this._sizeInMeters=!0,this._performance=!1}},g$t.prototype.update=function(e){if(LicenseChecker.LICENSECHECKER.verify("ParticleSystem"),this.show){e$2e(this._billboardCollection)||(this._billboardCollection=new w$O({particleSystem:this._performance,ignoreShow:!0})),this._updateParticlePool&&(W$m(this),this._updateParticlePool=!1);var t=e.cullingVolume;if(G$n(this,e),t.computeVisibility(this._boundingSphere)!=Ae$w.OUTSIDE){Q$j(this,e);var i=0;this._previousTime&&(i=a$15.secondsDifference(e.time,this._previousTime)),i<0&&(i=0),this._maxVelocity=0;var n,r,o=this._particles,a=this._emitter,s=this.updateCallback,l=o.length;for(n=0;n<l;++n)(r=o[n]).update(i,s)?(w$l(this,r),this._maxVelocity=Math.max(this._maxVelocity,o$1p.magnitude(r.velocity))):(J$e(r),H$s(this,r),o[n]=o[l-1],--n,--l);o.length=l;var u=K$f(this,i);if(u>0&&e$2e(a)){this._matrixDirty&&(this._combinedMatrix=p$1d.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);var c=this._combinedMatrix;for(n=0;n<u;n++)r=j$l(this),this._emitter.emit(r),"Polygon"!==this._emitter.type&&(o$1p.add(r.position,r.velocity,C$n),p$1d.multiplyByPoint(c,C$n,C$n),r.position=p$1d.multiplyByPoint(c,r.position,r.position),o$1p.subtract(C$n,r.position,r.velocity),o$1p.normalize(r.velocity,r.velocity)),X$e(this,r),w$l(this,r)}if(this._billboardCollection.update(e),this._previousTime=a$15.clone(e.time,this._previousTime),this._currentTime+=i,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=e$2d.mod(this._currentTime,this._lifetime),this.bursts){var h=this.bursts.length;for(n=0;n<h;n++)this.bursts[n]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%60==0&&Y$f(this)}}},g$t.prototype.isDestroyed=function(){return!1},g$t.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),i$11(this)};var y$m=new o$1p(1,1,1);function a$j(e){e=u$Z(e,y$m),o$1q.defined("dimensions",e),o$1q.typeOf.number.greaterThanOrEquals("dimensions.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.y",e.y,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.z",e.z,0),this._dimensions=o$1p.clone(e)}Object.defineProperties(a$j.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number.greaterThanOrEquals("value.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("value.y",e.y,0),o$1q.typeOf.number.greaterThanOrEquals("value.z",e.z,0),o$1p.clone(e,this._dimensions)}}});var l$m=new o$1p;a$j.prototype.emit=function(e){var t=this._dimensions,i=o$1p.multiplyByScalar(t,.5,l$m),n=e$2d.randomBetween(-i.x,i.x),r=e$2d.randomBetween(-i.y,i.y),o=e$2d.randomBetween(-i.z,i.z);e.position=o$1p.fromElements(n,r,o,e.position),e.velocity=o$1p.normalize(e.position,e.velocity)};var _0x4cf6a0=(_0x2fa005=!0,function(e,t){var i=_0x2fa005?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2fa005=!1,i}),_0x3ead26=_0x4cf6a0(void 0,(function(){return _0x3ead26.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ead26).search("(((.+)+)+)+$")})),_0x2fa005;_0x3ead26();var _0x17cdca=function(e){e=e||{},this._scene=e.scene,this._name=e.name,this._layerConfigs=new e$1Q,this._s3mLayers=new e$1Q,this._s3mURLs=[],this._associatedFieldName=void 0,this._resetVisible=!1,this._associatedLayerIds=[],this._visible=u$Z(e.isVisible,!0)};Object.defineProperties(_0x17cdca.prototype,{size:{get:function(){return this._s3mLayers.length}},associatedField:{get:function(){return this._associatedFieldName},set:function(e){this._associatedFieldName=e}},visible:{get:function(){return this._visible},set:function(e){for(var t in this._visible=e,this._s3mLayers._hash){this._s3mLayers.get(t).visible=e}}}}),_0x17cdca.prototype.getLayer=function(e){return this._s3mLayers._array[e]},_0x17cdca.prototype.getSubLayer=function(e){var t,i=o$1l.defer();if(!e$2e(e))throw new t$15("name is required.");for(var n in this._layerConfigs._hash){var r=this._layerConfigs.get(n);if(r.name===e){if(r.ready){t=this._s3mLayers.get(n);break}t=this._scene.addS3MTilesLayerByScp(n+"?t=1",r,r.index,!0),r.ready=!0;break}}return e$2e(t)?o$1l(t,(function(e){i.resolve(e)})):i.resolve(),i.promise},_0x17cdca.prototype.findByIndex=function(e){if(!e$2e(e))throw new t$15("index is required.");if(e>this._s3mLayers.length-1)throw new t$15("index is out of bounds.");return this._s3mLayers._array[e]},_0x17cdca.prototype.releaseSelection=function(){},_0x17cdca.prototype.remove=function(e,t){if(t=u$Z(t,!0),!e$2e(e))return!1;var i,n;for(var r in this._s3mLayers._hash){var o=this._s3mLayers.get(r);if(o.name===e){i=r,n=o;break}}return e$2e(i)?(this._s3mLayers.remove(i),t&&n.destroy(),!0):void 0};var _0x5cca05=.25,_0x1dc156=64,_0x408686=2,_0x4e8d8f=6378137,_0x4cce6f=2*_0x4e8d8f*Math.PI*_0x5cca05/(_0x1dc156*_0x408686),_0x22d963=2;function _0x2591c7(e,t,i){return _0x4cce6f/(1<<t)*e.context.drawingBufferHeight/(i*e.camera.frustum.sseDenominator)}_0x17cdca.prototype.setSelection=function(e,t,i,n){for(var r=!1,o=this._s3mURLs.length-1;o>=0;o--)if(e$2e(this._s3mURLs[o])){var a=this._s3mLayers.get(this._s3mURLs[o]);!e$2e(a)||(a.id===i&&a.selectEnabled&&a.name===n?(a.setSelection(e,t),r=!0):a.releaseSelection())}return r},_0x17cdca.prototype.releaseSelection=function(){for(var e=this._s3mURLs.length-1;e>=0;e--)if(e$2e(this._s3mURLs[e])){var t=this._s3mLayers.get(this._s3mURLs[e]);!e$2e(t)||t.releaseSelection()}},_0x17cdca.prototype.getSelection=function(){for(var e=[],t=this._s3mURLs.length-1;t>=0;t--)if(e$2e(this._s3mURLs[t])){var i=this._s3mLayers.get(this._s3mURLs[t]);!e$2e(i)||(e=e.concat(i.getSelection()))}return e},_0x17cdca.prototype.update=function(e,t,i,n){var r=this,o=this._layerConfigs;for(var a in o._hash)!function(a){var s=o.get(a),l=t.camera.positionWC,u=i$1d.fromRectangle3D(s.layerBounds),c=o$1p.distance(u.center,l);c>u.radius&&(c-=u.radius);for(var h=Math.max(s.layerBounds.width,s.layerBounds.height),d=0,f=Math.PI;f>h;)f*=.5,d++;var p=_0x2591c7(t,d-=1,c)<_0x22d963;if(s.ready){var _=r._s3mLayers.get(a);if(!e$2e(_))return;p?(e$2e(_._flattenTexture)||e$2e(_._excavationTexture)?_.refresh():(r.remove(_._name,!0),s.ready=!1),r._resetVisible=!0):_.update(e,t,i,n)}else{if(!p)r._scene.addS3MTilesLayerByScp(a+"?t=1",s,s.index,!0).then((function(o){if(e$2e(o)){if(o.visible=r.visible,r._s3mLayers.set(a,o),e$2e(r._associatedFieldName)&&("attribute"===o._attributeExtentName?(o._queryFieldNames=[r._associatedFieldName],o._layerScheduler._indexedDBSetting.isAttributesSave=!0):o._layerScheduler._downloadAttributes(),o._layerScheduler._associatedFieldName=r._associatedFieldName),r._associatedLayerIds.length>0){for(var s=void 0,l=0;l<r._associatedLayerIds.length;l++)if(e$2e(s=r._associatedLayerIds[l].fineLayer)&&s===o.name){o._layerScheduler._isFineLayer=!0;break}o._layerScheduler._isFineLayer=!0}o.update(e,t,i,n)}})),s.ready=!0}}(a)},_0x17cdca.prototype.render=function(e,t){for(var i=void 0,n={},r={},o=this._s3mURLs.length-1;o>=0;o--)if(e$2e(this._s3mURLs[o])){var a=this._s3mLayers.get(this._s3mURLs[o]);if(e$2e(a)){if(this._resetVisible){var s=[];for(var l in a._layerScheduler._attributes){e$2e(n[a._layerScheduler._attributes[l][this._associatedFieldName]])&&s.push(l)}if(a.setObjsVisible(s,!1),this._associatedLayerIds.length>0){var u,c=void 0;for(u=0;u<this._associatedLayerIds.length&&(!e$2e(c=this._associatedLayerIds[u].coarseLayer)||c!==a.name);u++)c=void 0;if(e$2e(c)){var h=[];for(var l in r){var d=this._associatedLayerIds[u].idMapping[l];e$2e(d)&&h.push(d)}a.setObjsVisible(h,!1)}}this._resetVisible=!1}if(a._fileType===p$T.OSGBFile&&e$2e(this._associatedFieldName)&&e$2e(i)){var f=e$2d.toDegrees(i.east),p=e$2d.toDegrees(i.north),_=e$2d.toDegrees(i.south),m=e$2d.toDegrees(i.west),g=[m,p,0,f,p,0,f,_,0,m,_,0,m,p,0];a.addFlattenRegion({position:g,name:"flatten"})}if(a.render(e,t),i=a._layerBounds,a._layerScheduler._objectIdChange){for(var x in a._layerScheduler._entityObjectId){var y=a._layerScheduler._entityObjectId[x];for(var l in y)n[y[l]]=l}for(var x in a._layerScheduler._entityModelId){y=a._layerScheduler._entityModelId[x];for(var l in y)r[l]=l}this._resetVisible=!0,a._layerScheduler._objectIdChange=!1}}}},_0x17cdca.prototype.destroy=function(){for(var e=this._s3mURLs.length-1;e>=0;e--)if(e$2e(this._s3mURLs[e])){var t=this._s3mLayers.get(this._s3mURLs[e]);e$2e(t)&&t.destroy()}return i$11(this)};const g$s=1048576;var u$k=function(){this._layers=new e$1Q,this._layerQueue=[],this._layerIndex=3,this._selectedLayer=void 0,this._clampLayerIndex=Number.MAX_VALUE,this._allTextOverlap=[],this._s3mLayerAddedIndex=0,this._processingTiles=[],this._replacementList=new h$Q,this._replacementSentinel=this._replacementList.add(),this._maxMemory=2048,this._maxMemoryInBytes=this._maxMemory*g$s,this._cacheBytes=this._maxMemory*g$s};Object.defineProperties(u$k.prototype,{layerQueue:{get:function(){return this._layerQueue}}}),u$k.prototype._setCacheMemory=function(e){this._cacheBytes=e*g$s},u$k.prototype._setMaxMemory=function(e){this._maxMemory=e,this._maxMemoryInBytes=this._maxMemory*g$s};var N$g=function(e,t){return e.priority-t.priority},E$p=function(e,t){return e._disFromCamera-t._disFromCamera};function G$m(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];i._adjustedLodRangeScale=Math.min(1.02*i._adjustedLodRangeScale,1e4)}}function k$k(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];i._adjustedLodRangeScale=Math.max(i._adjustedLodRangeScale/1.02,i._lodRangeScale)}}function b$u(e,t,i){if((t=e$2d.clamp(t,0,e.length-1))===(i=e$2d.clamp(i,0,e.length-1)))return!1;var n=e[t];return e[t]=e[i],e[i]=n,!0}u$k.prototype._processTiles=function(e){const t=e.context;e.processingTiles.sort(E$p);const i=this._maxMemoryInBytes,n=i+.5*i,r=e.processingTiles;let o=!1;for(let t=0,i=r.length;t<i;t++){const i=r[t];o=i.transformResource(e,i.layer,n)}const a=this._layerQueue;t.memorySize<i?k$k(a):o&&r.length>0&&G$m(a),this._processingTiles.length=0},u$k.prototype.update=function(e,t,i,n){this._frameState=t,_0x1451be.update(e);var r=this._layerQueue,o=this._layerQueue.length;this._replacementList.splice(this._replacementList.tail,this._replacementSentinel),t.replacementList=this._replacementList,t.processingTiles=this._processingTiles;var a=0,s=[];for(a=0;a<o;a++){var l=r[a];if(e$2e(l)){if(t.multiViewportIndex>-1)if(!l.getVisibleInViewport(t.multiViewportIndex))continue;if(e$2e(n)&&!0===n){if(l._fileType!=p$T.ClampGroundRealtimeRasterCache){if(t.multiViewportIndex>-1&&!l.getVisibleInViewport(t.multiViewportIndex))continue;continue}s.push(l.id)}else if(l._fileType===p$T.ClampGroundRealtimeRasterCache)continue;var u=t._fboState.frameBufferType;if(u==Qe$c.NORMAL_AND_DEPTH){if(!e$2e(l._wireFrameType)||!l.isSilhouette())continue}else if(u==Qe$c.POSTEFFECT_FILTER){if(!e$2e(l.bloomEnable)||!l.bloomEnable)continue}else if(!(u!=Qe$c.CLAMP||e$2e(l._section)&&l._section))continue;l.update(e,t,i)}}ti$4.update(e.memorySize),t.requests.sort(N$g);for(var c=performance.now(),h=(a=0,t.requests.length);a<h;a++){var d=t.requests[a];if(d.owner.loadEntity(d.entity),performance.now()-c>5)break}return t.requests.length=0,this._processTiles(t),s},u$k.prototype.updateTextVisible=function(e,t){var i=this._layerQueue.length;if(0!==i){for(var n=0;n<i;n++){var r=this._layerQueue[n];r._fileType!==p$T.Text&&r._fileType!==p$T.IconPoint&&r._fileType!==p$T.OSGBCacheFile||_0x21df38.addPotentialVisibiltyChangedLayer(r.name)}var o=t.camera._scene.overlapDisplayOptions,a=o&&o.allowIconWithTextDisplay,s=t.camera._scene._overlapDisplayedThreshold;_0x21df38.meetVisible(this._allTextOverlap,s,a),_0x21df38.setVisibiltyChangedToLayer(this,a),_0x21df38.resetVisibleChangedQueue(),this._allTextOverlap=[]}},u$k.prototype._freeResource=function(e){for(var t=e.context,i=this._replacementList.head,n=this._cacheBytes;i!==this._replacementSentinel&&t.memorySize>n;){var r=i.item,o=r.layer;if(i=i.next,this._replacementList.remove(r._replacementNode),r._isRootTile&&o.residentRootTile)r._replacementNode=null;else{var a={geoSize:0,texSize:0};r.memoryUsageEx(a),ti$4._memGeometryRemoved(a.geoSize),r.destroy(e,!1)}}},u$k.prototype.endFrame=function(e){if(Se$e.GetUnusedSize()>0&&Se$e.DeleteUnusedTextures(),e.lightSource.hasChange()){var t=e.lightSource._changedLightList._hash;this.lightSourceChanged(t),e.lightSource.resetChange()}for(var i=this._layerQueue,n=this._layerQueue.length,r=performance.now(),o=0;o<n;o++){var a=i[o];if(a._isS3MBlock&&a._context._subTextureManager&&a._context._subTextureManager.processRequests(a),performance.now()-r>5)break}_0x29d1c7.processTasks(),e.passes.offscreen||this._freeResource(e)},u$k.prototype.render=function(e,t){var i=this._layerQueue,n=this._layerQueue.length,r=0;for(r=0;r<n;r++){var o=i[r];if(e$2e(o)){if(t.multiViewportIndex>-1)if(!o.getVisibleInViewport(t.multiViewportIndex))continue;o.render(e,t)}}},u$k.prototype._setSelection=function(e){var t=e.primitive.id,i=e.id,n=e.skeletonId,r=this._layerQueue,o=this._layerQueue.length,a=0,s=void 0;for(a=0;a<o;a++){var l=r[a];l instanceof _0x17cdca?l.setSelection(i,n,t,e.primitive.name)&&(s=l):l.id===t&&l.selectEnabled?(l.setSelection(i,n),s=l):l.releaseSelection()}s instanceof _0x17cdca||this.setSelectedLayer(s)},u$k.prototype.releaseSelection=function(){var e=this._layerQueue,t=this._layerQueue.length,i=0;for(i=0;i<t;i++){var n=e[i];!e$2e(n)||n.releaseSelection()}this.setSelectedLayer(void 0)},u$k.prototype.find=function(e){if(!e$2e(e))throw new t$15("name is required.");var t=this._layers.get(e);if(!e$2e(t))for(var i=this._layerQueue,n=this._layerQueue.length,r=0;r<n;r++){var o=i[r];if(o instanceof _0x17cdca)for(var a=i[r],s=0;s<a._s3mLayers._array.length;s++)if((o=a._s3mLayers._array[s]).name===e){t=o;break}}return t},u$k.prototype.findByIndex=function(e){if(!e$2e(e))throw new t$15("index is required.");if(e>this._layerQueue.length-1)throw new t$15("index is out of bounds.");return this._layerQueue[e]},u$k.prototype.add=function(e,t){if(!e$2e(e))throw new t$15("layer is required.");var i=e._name;if(!e$2e(i)||""==i)throw new t$15("name is required.");var n=this._layers;if(n.contains(i))throw new RuntimeError("An layer with name "+i+" already exists in this Scene.");e._id=this._layerIndex++;var r=this._layerQueue.length;n.set(i,e),t=u$Z(t,r),e.index=t,this._layerQueue.push(e),this._layerQueue.sort((function(e,t){return e.index-t.index})),e._fileType===p$T.ClampObjectPolygon?this._clampLayerIndex=t:t>this._clampLayerIndex&&(e.receiveObjectClamp=!1)},u$k.prototype.remove=function(e,t){if(t=u$Z(t,!0),!e$2e(e))return!1;var i=this.find(e);return!!i&&(!!this._layers.remove(e)&&(this._layerQueue.splice(this._layerQueue.indexOf(i),1),i._fileType===p$T.ClampGroundRealtimeRasterCache&&i.refreshRaster(),t&&i.destroy(),i._fileType===p$T.ClampObjectPolygon&&(this._clampLayerIndex=Number.MAX_VALUE),this._selectedLayer===i&&(this._selectedLayer=void 0),this._s3mLayerAddedIndex--,!0))},u$k.prototype.removeAll=function(e){if(e=u$Z(e,!0),this._replacementList.splice(this._replacementList.tail,this._replacementSentinel),e){var t=this._layerQueue,i=this._layerQueue.length,n=0;for(n=0;n<i;n++){var r=t[n];!e$2e(r)||r.destroy()}}this._layers.removeAll(),this._layerQueue.length=0,this._clampLayerIndex=Number.MAX_VALUE,this._selectedLayer=void 0,this._s3mLayerAddedIndex=0,e$2e(this._frameState)&&this._freeResource(this._frameState)},u$k.prototype.pickFeatures=function(e,t){var i,n=t._context,r=n.pixels,o=e$1X.byteToRgba(r[0],r[1],r[2],r[3]),a=n.getObjectByPickId(o);if(e$2e(a)&&e$2e(a.primitive)&&a.primitive instanceof _0x1a71e8){var s=a.id;if(!e$2e((i=a.primitive).queryParameter)||!i.selectEnabled)return;var l=i.queryParameter,u=l.url+"/datasources/{datasourceName}/datasets/{datasetName}/features/{id}.jsonp?hasGeometry={hasGeometry}";if(e$2e(l.dataSetName))return u=u.replace("{datasourceName}",l.dataSourceName).replace("{datasetName}",l.dataSetName).replace("{id}",s).replace("{hasGeometry}",l.hasGeometry),e$2e(a$O.CREDENTIAL)&&(u=a$O.addToken(u)),d$V(u);if(1==l.isMerge&&e$2e(l.datasetList)){for(var c,h=0,d=l.datasetList.length;h<d;h++){var f=l.datasetList[h];if(s>=f.startID&&s<=f.endID){s=s-f.startID+1,c=f.datasetName;break}}if(e$2e(c))return u=u.replace("{datasourceName}",l.dataSourceName).replace("{datasetName}",c).replace("{id}",s).replace("{hasGeometry}",l.hasGeometry),e$2e(a$O.CREDENTIAL)&&(u=a$O.addToken(u)),d$V(u)}}},u$k.prototype.raise=function(e){if(e$2e(e)){var t=e.index;if(b$u(this._layerQueue,t,t+1)&&(e.index+=1),e._fileType===p$T.ClampGroundRealtimeRasterCache)for(var i=0;i<this._layerQueue.length;i++)this._layerQueue[i]._fileType===p$T.ClampGroundRealtimeRasterCache&&this._layerQueue[i]._layerScheduler.refreshRaster(this._layerQueue[i]._frameState)}},u$k.prototype.lower=function(e){if(e$2e(e)){var t=e.index;if(b$u(this._layerQueue,t,t-1)&&(e.index-=1),e._fileType===p$T.ClampGroundRealtimeRasterCache)for(var i=0;i<this._layerQueue.length;i++)this._layerQueue[i]._fileType===p$T.ClampGroundRealtimeRasterCache&&this._layerQueue[i]._layerScheduler.refreshRaster(this._layerQueue[i]._frameState)}},u$k.prototype.lowerToBottom=function(e){if(e$2e(e)){var t=e.index;this._layerQueue.splice(t,1),this._layerQueue.unshift(e),e.index=0;for(let i=1;i<=t;i++){(e=this._layers.get(this._layerQueue[i].name)).index+=1}}},u$k.prototype.raiseToTop=function(e){if(e$2e(e)){var t=e.index;this._layerQueue.splice(t,1),this._layerQueue.push(e),e.index=this._layerQueue.length-1;for(let i=t;i<this._layerQueue.length-1;i++){(e=this._layers.get(this._layerQueue[i].name)).index-=1}}},u$k.prototype.setSelectedLayer=function(e){this._selectedLayer=e},u$k.prototype.getSelectedLayer=function(){if(!e$2e(this._selectedLayer)||!this._selectedLayer.isDestroyed())return this._selectedLayer},u$k.prototype.lightSourceChanged=function(e){for(var t=0,i=this._layerQueue.length;t<i;t++)this._layerQueue[t]instanceof _0x1a71e8&&this._layerQueue[t].lightSourceChanged(e)},u$k.prototype.saveLocalCache=function(){for(var e=[],t=0,i=this._layerQueue.length;t<i;t++)this._layerQueue[t]instanceof _0x1a71e8&&this._layerQueue[t]._layerScheduler.saveLocalCache(e);if(e.length>0){var n={nameArray:e};_0x29d1c7.indexTaskProcessor.scheduleTask(n,[])}};var _0x1fc853=(_0x51b9ab=!0,function(e,t){var i=_0x51b9ab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51b9ab=!1,i}),_0x1e5a68=_0x1fc853(void 0,(function(){return _0x1e5a68.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e5a68).search("(((.+)+)+)+$")})),_0x51b9ab;_0x1e5a68();var WebGLPlot$e=window.WebGLPlot=window.WebGLPlot||{};function _0xdbf888(){}WebGLPlot$e.defaultValue=u$Z,WebGLPlot$e.defined=e$2e,WebGLPlot$e.Cartesian2=o$1o,WebGLPlot$e.Cartesian3=o$1p,WebGLPlot$e.WallGeometry=E$G,WebGLPlot$e.GeometryInstance=d$1o,WebGLPlot$e.PolylineVolumeGeometry=N$A,WebGLPlot$e.GroundPolylineGeometry=aa$5,WebGLPlot$e.PolylineGeometry=R$A,WebGLPlot$e.PolygonGeometry=U$18,WebGLPlot$e.Color=e$1X,WebGLPlot$e.ColorGeometryInstanceAttribute=o$16,WebGLPlot$e.PerInstanceColorAppearance=t$Q,WebGLPlot$e.LabelStyle=R$S,WebGLPlot$e.SceneTransforms=s$R,WebGLPlot$e.HorizontalOrigin=j$V,WebGLPlot$e.SceneMode=C$14,WebGLPlot$e.Material=r$Y,WebGLPlot$e.VertexFormat=n$13,WebGLPlot$e.CesiumMath=e$2d,WebGLPlot$e.HeadingPitchRoll=i$16,WebGLPlot$e.Ellipsoid=t$12,WebGLPlot$e.Transforms=m$19,WebGLPlot$e.EllipsoidGeodesic=E$1t,WebGLPlot$e.Cartographic=a$18,WebGLPlot$e.BillboardCollection=w$O,WebGLPlot$e.MaterialAppearance=t$v,WebGLPlot$e.LabelCollection=g$W,WebGLPlot$e.EllipsoidSurfaceAppearance=t$h,WebGLPlot$e.BoundingSphere=i$1d,WebGLPlot$e.Primitive=y$R,WebGLPlot$e.GroundPrimitive=d$15,WebGLPlot$e.RenderState=d$1m,WebGLPlot$e.PolylineCollection=J$T,WebGLPlot$e.GroundPolylinePrimitive=g$13,WebGLPlot$e.PolylineColorAppearance=e$1F,WebGLPlot$e.ClassificationType=_0x2b86ba,WebGLPlot$e.Polyline=o$14,WebGLPlot$e.Event=o$1h,WebGLPlot$e.ScreenSpaceEventHandler=g$K,WebGLPlot$e.DeveloperError=t$15,WebGLPlot$e.clone=l$1f,WebGLPlot$e.when=o$1l,WebGLPlot$e.Check=o$1q,WebGLPlot$e.Request=r$1c,WebGLPlot$e.RequestErrorEvent=s$$,WebGLPlot$e.RequestScheduler=r$1b,WebGLPlot$e.RuntimeError=t$13,WebGLPlot$e.TrustedServers=u$W,WebGLPlot$e.ScreenSpaceEventType=G$J,WebGLPlot$e.buildModuleUrl=n$17,WebGLPlot$e.IntersectionTests=g$1j,WebGLPlot$e.Ray=f$19,WebGLPlot$e.Cartographic=a$18,WebGLPlot$e.BoxOutlineGeometry=o$17,WebGLPlot$e.Matrix3=p$1e,WebGLPlot$e.Matrix4=p$1d,WebGLPlot$e.AxisAlignedBoundingBox=e$29,WebGLPlot$e.createGuid=e$1T,WebGLPlot$e.Entity=h$W,WebGLPlot$e.VerticalOrigin=S$Q,WebGLPlot$e.Model=F$B,WebGLPlot$e.PolygonHierarchy=e$1M,WebGLPlot$e.AssociativeArray=e$1Q,WebGLPlot$e.ModelUtility=s$v,WebGLPlot$e.KeyboardEventModifier=Aa$1,WebGLPlot$e.ParticleSystem=g$t,WebGLPlot$e.CircleEmitter=u$l,WebGLPlot$e.ConeEmitter=n$j,WebGLPlot$e.TranslationRotationScale=e$1_,WebGLPlot$e.BoxEmitter=a$j,WebGLPlot$e.Quaternion=n$15,WebGLPlot$e.JulianDate=a$15,WebGLPlot$e.Property=r$_,WebGLPlot$e.S3MInstanceCollection=_0xd633a7,WebGLPlot$e.arrayFill=d$1s,WebGLPlot$e.ComponentDatatype=S$14,WebGLPlot$e.Geometry=I$1p,WebGLPlot$e.GeometryAttribute=o$1c,WebGLPlot$e.GeometryAttributes=a$_,WebGLPlot$e.GeometryOffsetAttribute=_0x39c22a,WebGLPlot$e.IndexDatatype=ce$z,WebGLPlot$e.PrimitiveType=W$18,WebGLPlot$e.PolylinePipeline=m$X,WebGLPlot$e.ImageMaterialProperty=a$R,WebGLPlot$e.ColorMaterialProperty=t$P,WebGLPlot$e.ShadowMode=W$X,WebGLPlot$e.ShowGeometryInstanceAttribute=e$1I,WebGLPlot$e.DistanceDisplayCondition=r$Z,WebGLPlot$e.DistanceDisplayConditionGeometryInstanceAttribute=t$A,WebGLPlot$e.MeasureHandler=T$n,WebGLPlot$e.MeasureMode=_0x3c1870,WebGLPlot$e.DrawHandler=w$n,WebGLPlot$e.DrawMode=_0x1522bc,WebGLPlot$e.Sightline=_0x393ad5,WebGLPlot$e.ViewShed3D=_0x13f223,WebGLPlot$e.PrimitiveCollection=o$y,WebGLPlot$e.PolylineMaterialAppearance=r$X,WebGLPlot$e.ApproximateTerrainHeights=e$1H,WebGLPlot$e.destroyObject=i$11,WebGLPlot$e.OrientedBoundingBox=y$Y,WebGLPlot$e.Rectangle=h$18,WebGLPlot$e.ClassificationPrimitive=x$$,WebGLPlot$e.ShadowVolumeAppearance=y$Q,WebGLPlot$e.ColorTable=i$T,WebGLPlot$e.HypsometricSettingEnum=k$S,WebGLPlot$e.SlopeSetting=l$K,WebGLPlot$e.SlopeSettingEnum=_0x25bb47,WebGLPlot$e.CallbackProperty=n$X,WebGLPlot$e.S3MTilesLayer=_0x1a71e8,WebGLPlot$e.Layers=u$k,WebGLPlot$e.PlaneGeometry=f$L,WebGLPlot$e.ModelAnimationLoop=_0x1ea9f2,WebGLPlot$e.NearFarScalar=o$Y,WebGLPlot$e.createPropertyDescriptor=C$10,WebGLPlot$e.CatmullRomSpline=c$L,WebGLPlot$e.GeometryPipeline=k$14,WebGLPlot$e.EllipseGeometry=Y$A,WebGLPlot$e.CylinderGeometry=l$Q;var _0x4ecc1b=(_0x2d4bee=!0,function(e,t){var i=_0x2d4bee?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d4bee=!1,i}),_0x3324ee=_0x4ecc1b(void 0,(function(){return _0x3324ee.toString().search("(((.+)+)+)+$").toString().constructor(_0x3324ee).search("(((.+)+)+)+$")})),_0x2d4bee;function _0x23de81(e,t,i){this.x=WebGLPlot.defaultValue(e,0),this.y=WebGLPlot.defaultValue(t,0),this.z=WebGLPlot.defaultValue(i,0)}_0x3324ee(),_0x23de81.clone=function(e,t){if(WebGLPlot.defined(e))return WebGLPlot.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new _0x23de81(e.x,e.y,e.z)},_0x23de81.equals=function(e,t){return e===t||WebGLPlot.defined(e)&&WebGLPlot.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},_0x23de81.prototype.clone=function(e){return _0x23de81.clone(this,e)},_0x23de81.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},_0x23de81.prototype.equals=function(e){return _0x23de81.equals(this,e)};var _0xe6af61=(_0x140fe2=!0,function(e,t){var i=_0x140fe2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x140fe2=!1,i}),_0xdc194b=_0xe6af61(void 0,(function(){return _0xdc194b.toString().search("(((.+)+)+)+$").toString().constructor(_0xdc194b).search("(((.+)+)+)+$")})),_0x140fe2;_0xdc194b();var _0x46a68f={SYMBOL_UNKNOW:0,SYMBOL_DOT:1,SYMBOL_ALGO:2,SYMBOL_PICTURE:20,SYMBOL_POLYLINE:24,SYMBOL_RECTANGLE:26,SYMBOL_PARALLELOGRAM:28,SYMBOL_CIRCLE:29,SYMBOL_ELLIPSE:31,SYMBOL_ARBITRARYPOLYGON:32,SYMBOL_TEXT:34,SYMBOL_ARC:44,SYMBOL_PARALLELLINE:48,SYMBOL_TRAPEZOID:350,SYMBOL_POLYBEZIERCLOSED:360,SYMBOL_CHORD:370,SYMBOL_PIE:380,SYMBOL_KIDNEY:390,SYMBOL_BRACE:400,SYMBOL_REGULARPOLYGON:410,SYMBOL_POLYBEZIER:590,SYMBOL_RUNWAY:1013,SYMBOL_CURVEEIGHT:1014,SYMBOL_CONCENTRICCIRCLE:1019,SYMBOL_COMBINATIONALCIRCLE:1022,SYMBOL_NODECHAIN:1025,GROUPOBJECT:1e3,SYMBOL_CIRCLECHORD:3701,SYMBOL_CIRCLEPIE:3801,SYMBOL_CIRCLEARC:4401,SYMBOL_Model:99999,SYMBOL_POINT:99998},_0x1c668c=Object.freeze(_0x46a68f),_0x372468=(_0x5f881b=!0,function(e,t){var i=_0x5f881b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f881b=!1,i}),_0x41e2f5=_0x372468(void 0,(function(){return _0x41e2f5.toString().search("(((.+)+)+)+$").toString().constructor(_0x41e2f5).search("(((.+)+)+)+$")})),_0x5f881b;_0x41e2f5();var _0x5d7824={SURROUNDLINE_NONE:0,SURROUNDLINE_INNER:1,SURROUNDLINE_OUT:2,SURROUNDLINE_ALL:3},_0x3fcacb=Object.freeze(_0x5d7824),_0xfb5612=(_0x5a0a3c=!0,function(e,t){var i=_0x5a0a3c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a0a3c=!1,i}),_0x33e136=_0xfb5612(void 0,(function(){return _0x33e136.toString().search("(((.+)+)+)+$").toString().constructor(_0x33e136).search("(((.+)+)+)+$")})),_0x5a0a3c;_0x33e136();var _0xb4aec={None:0,Linear:1,Radial:2},_0x1e78ea=Object.freeze(_0xb4aec),_0x43e356=(_0xf656ee=!0,function(e,t){var i=_0xf656ee?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf656ee=!1,i}),_0x30a2aa=_0x43e356(void 0,(function(){return _0x30a2aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x30a2aa).search("(((.+)+)+)+$")})),_0xf656ee;_0x30a2aa();var _0x1fac5e=void 0;class _0x5ac1e1{constructor(){this._layerAdded=new WebGLPlot$e.Event,this._layerDeleted=new WebGLPlot$e.Event,this._layerActived=new WebGLPlot$e.Event,this._layerEditableChanged=new WebGLPlot$e.Event,this._layerVisibleChanged=new WebGLPlot$e.Event,this._layerSelectedChanged=new WebGLPlot$e.Event,this._symbolAdded=new WebGLPlot$e.Event,this._symbolDeleted=new WebGLPlot$e.Event,this._symbolBeforeDeleted=new WebGLPlot$e.Event,this._symbolModified=new WebGLPlot$e.Event,this._symbolUpdated=new WebGLPlot$e.Event,this._symbolDestroyed=new WebGLPlot$e.Event,this._symbolSelected=new WebGLPlot$e.Event,this._symbolUnSelected=new WebGLPlot$e.Event,this._animationCreated=new WebGLPlot$e.Event,this._animationDeleted=new WebGLPlot$e.Event,this._animationModified=new WebGLPlot$e.Event,this._animationBegined=new WebGLPlot$e.Event,this._animationFinished=new WebGLPlot$e.Event,this._animationJsonEnd=new WebGLPlot$e.Event}static getInstance(){return _0x1fac5e||(_0x1fac5e=new _0x5ac1e1),_0x1fac5e}}Object.defineProperties(_0x5ac1e1.prototype,{layerAdded:{get:function(){return this._layerAdded}},layerDeleted:{get:function(){return this._layerDeleted}},layerActived:{get:function(){return this._layerActived}},layerEditableChanged:{get:function(){return this._layerEditableChanged}},layerVisibleChanged:{get:function(){return this._layerVisibleChanged}},layerSelectedChanged:{get:function(){return this._layerSelectedChanged}},symbolAdded:{get:function(){return this._symbolAdded}},symbolBeforeDeleted:{get:function(){return this._symbolBeforeDeleted}},symbolDeleted:{get:function(){return this._symbolDeleted}},symbolModified:{get:function(){return this._symbolModified}},symbolUpdated:{get:function(){return this._symbolUpdated}},symbolDestroyed:{get:function(){return this._symbolDestroyed}},symbolSelected:{get:function(){return this._symbolSelected}},symbolUnSelected:{get:function(){return this._symbolUnSelected}},animationCreated:{get:function(){return this._animationCreated}},animationDeleted:{get:function(){return this._animationDeleted}},animationModified:{get:function(){return this._animationModified}},animationBegined:{get:function(){return this._animationBegined}},animationFinished:{get:function(){return this._animationFinished}},animationJsonEnd:{get:function(){return this._animationJsonEnd}}});var _0x162b3b=(_0x4e7356=!0,function(e,t){var i=_0x4e7356?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e7356=!1,i}),_0xc297af=_0x162b3b(void 0,(function(){return _0xc297af.toString().search("(((.+)+)+)+$").toString().constructor(_0xc297af).search("(((.+)+)+)+$")})),_0x4e7356;function _0x291171(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._graphicObject=WebGLPlot.defaultValue(e.graphicObject,void 0),this._lineColor=WebGLPlot.defaultValue(e.lineColor,new WebGLPlot.Color(1,0,0,1)),this._lineWidth=WebGLPlot.defaultValue(e.lineWidth,3),this._fillBackColor=WebGLPlot.defaultValue(e.fillBackColor,new WebGLPlot.Color(1,0,0,1)),this._fillBackOpaque=WebGLPlot.defaultValue(e.fillBackOpaque,!1),this._fillGradientAngle=WebGLPlot.defaultValue(e.fillGradientAngle,0),this._fillGradientMode=WebGLPlot.defaultValue(e.fillGradientMode,_0x1e78ea.None),this._fillGradientOffsetRatioY=WebGLPlot.defaultValue(e.fillGradientOffsetRatioY,0),this._fillGradientOffsetRatioX=WebGLPlot.defaultValue(e.fillGradientOffsetRatioX,0),this._fillForeColor=WebGLPlot.defaultValue(e.fillForeColor,new WebGLPlot.Color(1,0,0,1)),this._fillSymbolID=WebGLPlot.defaultValue(e.fillSymbolID,1),this._fillOpaqueRate=WebGLPlot.defaultValue(e.fillOpaqueRate,70),this._surroundLineColor=WebGLPlot.defaultValue(e.surroundLineColor,WebGLPlot.Color.YELLOW),this._surroundLineType=WebGLPlot.defaultValue(e.surroundLineType,0),this._surroundLineWidth=WebGLPlot.defaultValue(e.surroundLineWidth,3),this._opacity=WebGLPlot.defaultValue(e.opacity,1)}_0xc297af(),_0x291171.prototype.clone=function(){var e=new _0x291171;return e._graphicObject=this._graphicObject,e._lineColor=WebGLPlot.Color.clone(this._lineColor),e._lineWidth=JSON.parse(JSON.stringify(void 0!==this._lineWidth?this._lineWidth:3)),e._fillBackColor=WebGLPlot.Color.clone(this._fillBackColor),e._fillBackOpaque=JSON.parse(JSON.stringify(void 0!==this._fillBackOpaque&&this._fillBackOpaque)),e._fillGradientAngle=JSON.parse(JSON.stringify(void 0!==this._fillGradientAngle?this._fillGradientAngle:0)),e._fillGradientMode=JSON.parse(JSON.stringify(void 0!==this._fillGradientMode?this._fillGradientMode:_0x1e78ea.None)),e._fillGradientOffsetRatioY=JSON.parse(JSON.stringify(void 0!==this._fillGradientOffsetRatioY?this._fillGradientOffsetRatioY:0)),e._fillGradientOffsetRatioX=JSON.parse(JSON.stringify(void 0!==this._fillGradientOffsetRatioX?this._fillGradientOffsetRatioX:0)),e._fillForeColor=WebGLPlot.Color.clone(this._fillForeColor),e._fillSymbolID=JSON.parse(JSON.stringify(void 0!==this._fillSymbolID?this._fillSymbolID:1)),e._fillOpaqueRate=JSON.parse(JSON.stringify(void 0!==this._fillOpaqueRate?this._fillOpaqueRate:70)),e._surroundLineColor=WebGLPlot.Color.clone(this._surroundLineColor),e._surroundLineType=JSON.parse(JSON.stringify(void 0!==this._surroundLineType?this._surroundLineType:0)),e._surroundLineWidth=JSON.parse(JSON.stringify(void 0!==this._surroundLineWidth?this._surroundLineWidth:3)),e._opacity=JSON.parse(JSON.stringify(void 0!==this._opacity?this._opacity:1)),e},_0x291171.prototype.update=function(){this._graphicObject&&(this._graphicObject._initialize=!1,this._graphicObject._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this._graphicObject))},Object.defineProperties(_0x291171.prototype,{lineColor:{get:function(){return this._lineColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._lineColor))return;this._lineColor=e,this.update()}}},lineWidth:{get:function(){return this._lineWidth},set:function(e){e!==this._lineWidth&&(this._lineWidth=e,this._graphicObject._CorridorWidth=-1,this.update())}},fillBackColor:{get:function(){return this._fillBackColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._fillBackColor))return;this._fillBackColor=e,this.update()}}},fillForeColor:{get:function(){return this._fillForeColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._fillForeColor))return;this._fillForeColor=e,this.update()}}},fillBackOpaque:{get:function(){return this._fillBackOpaque},set:function(e){e!==this._fillBackOpaque&&(this._fillBackOpaque=e,this.update())}},fillGradientAngle:{get:function(){return this._fillGradientAngle},set:function(e){e!==this._fillGradientAngle&&(this._fillGradientAngle=e,this.update())}},fillGradientMode:{get:function(){return this._fillGradientMode},set:function(e){e!==this._fillGradientMode&&(this._fillGradientMode=e,this.update())}},fillGradientOffsetRatioY:{get:function(){return this._fillGradientOffsetRatioY},set:function(e){e===this._fillGradientOffsetRatioY||this._fillGradientOffsetRatioY<0||this._fillGradientOffsetRatioY>100||(this._fillGradientOffsetRatioY=e,this.update())}},fillGradientOffsetRatioX:{get:function(){return this._fillGradientOffsetRatioX},set:function(e){e===this._fillGradientOffsetRatioX||this._fillGradientOffsetRatioX<0||this._fillGradientOffsetRatioX>100||(this._fillGradientOffsetRatioX=e,this.update())}},fillSymbolID:{get:function(){return this._fillSymbolID},set:function(e){e!==this._fillSymbolID&&(this._fillSymbolID=e,this.update())}},fillOpaqueRate:{get:function(){return this._fillOpaqueRate},set:function(e){e===this._fillOpaqueRate||e>100||e<0||(this._fillOpaqueRate=e,this.update())}},surroundLineWidth:{get:function(){return this._surroundLineWidth},set:function(e){e!==this._surroundLineWidth&&(this._surroundLineWidth=e,this.update())}},surroundLineColor:{get:function(){return this._surroundLineColor},set:function(e){e!==this._surroundLineColor&&(this._surroundLineColor=e,this.update())}},opacity:{get:function(){return this._opacity},set:function(e){e!==this._opacity&&(this._opacity=e,this.update())}},surroundLineType:{get:function(){return this._surroundLineType},set:function(e){e!==this._surroundLineType&&(this._surroundLineType=e,this.update())}}});var _0x2b53cd=(_0x5ab15d=!0,function(e,t){var i=_0x5ab15d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ab15d=!1,i}),_0x52e924=_0x2b53cd(void 0,(function(){return _0x52e924.toString().search("(((.+)+)+)+$").toString().constructor(_0x52e924).search("(((.+)+)+)+$")})),_0x5ab15d;function _0x40b7f2(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._graphicObject=WebGLPlot.defaultValue(e.graphicObject,void 0),this._fontHeight=WebGLPlot.defaultValue(e.fontHeight,508/96),this._foreColor=WebGLPlot.defaultValue(e.foreColor,WebGLPlot.Color.WHITE),this._backColor=WebGLPlot.defaultValue(e.backColor,new WebGLPlot.Color(1,0,0,.3)),this._outline=WebGLPlot.defaultValue(e.outline,!0),this._fontName=WebGLPlot.defaultValue(e.fontName,WebGLPlot.plotI18n("SongTi")),this._italic=WebGLPlot.defaultValue(e.italic,!1),this._bold=WebGLPlot.defaultValue(e.bold,!0),this._align=WebGLPlot.defaultValue(e.align,0),this._italicAngle=WebGLPlot.defaultValue(e.italicAngle,0),this._shadow=WebGLPlot.defaultValue(e.shadow,!1),this._sizeFixed=WebGLPlot.defaultValue(e.sizeFixed,!0),this._underline=WebGLPlot.defaultValue(e.underline,!1),this._rotation=WebGLPlot.defaultValue(e.rotation,0),this._backOpaque=WebGLPlot.defaultValue(e.backOpaque,!1),this._strikeout=WebGLPlot.defaultValue(e.strikeout,!1),this._borderSpacingWidth=WebGLPlot.defaultValue(e.borderSpacingWidth,4),this._outlineWidth=WebGLPlot.defaultValue(e.outlineWidth,1),this._fontWidth=WebGLPlot.defaultValue(e.fontWidth,0),this._opaqueRate=WebGLPlot.defaultValue(e.opaqueRate,255),this._stringAlignment=WebGLPlot.defaultValue(e.stringAlignment,0),this._text3DScale=WebGLPlot.defaultValue(e.text3DScale,1),this._fontWeight=WebGLPlot.defaultValue(e.fontWeight,0),this._fontSize=WebGLPlot.defaultValue(e.fontSize,20),this._textBoxColor=WebGLPlot.defaultValue(e.textBoxColor,new WebGLPlot.Color(1,0,0,.3)),this._textBoxLineColor=WebGLPlot.defaultValue(e.textBoxLineColor,new WebGLPlot.Color(1,0,0,.8)),this._isShowTextBox=WebGLPlot.defaultValue(e.isShowTextBox,!1)}_0x52e924(),_0x40b7f2.prototype.setTextRectColor=function(e,t){this._textBoxLineColor=WebGLPlot.Color.clone(e),this._textBoxColor=new WebGLPlot.Color(e.red,e.green,e.blue,.3),WebGLPlot.defined(t)&&t&&this.update()},_0x40b7f2.prototype.clone=function(){var e=new _0x40b7f2;return e._graphicObject=this._graphicObject,e._fontHeight=JSON.parse(JSON.stringify(void 0!==this._fontHeight?this._fontHeight:508/96)),e._foreColor=WebGLPlot.Color.clone(this._foreColor),e._backColor=WebGLPlot.Color.clone(this._backColor),e._outline=JSON.parse(JSON.stringify(void 0!==this._outline&&this._outline)),e._fontName=JSON.parse(JSON.stringify(void 0!==this._fontName?this._fontName:WebGLPlot.plotI18n("SongTi"))),e._italic=JSON.parse(JSON.stringify(void 0!==this._italic&&this._italic)),e._bold=JSON.parse(JSON.stringify(void 0===this._bold||this._bold)),e._align=JSON.parse(JSON.stringify(void 0!==this._align?this._align:0)),e._italicAngle=JSON.parse(JSON.stringify(void 0!==this._italicAngle?this._italicAngle:0)),e._shadow=JSON.parse(JSON.stringify(void 0!==this._shadow?this._shadow:0)),e._sizeFixed=JSON.parse(JSON.stringify(void 0!==this._sizeFixed&&this._sizeFixed)),e._underline=JSON.parse(JSON.stringify(void 0!==this._underline?this._underline:0)),e._rotation=JSON.parse(JSON.stringify(void 0!==this._rotation?this._rotation:0)),e._backOpaque=JSON.parse(JSON.stringify(void 0!==this._backOpaque?this._backOpaque:0)),e._strikeout=JSON.parse(JSON.stringify(void 0!==this._strikeout?this._strikeout:0)),e._borderSpacingWidth=JSON.parse(JSON.stringify(void 0!==this._borderSpacingWidth?this._borderSpacingWidth:4)),e._outlineWidth=JSON.parse(JSON.stringify(void 0!==this._outlineWidth?this._outlineWidth:1)),e._opaqueRate=JSON.parse(JSON.stringify(void 0!==this._opaqueRate?this._opaqueRate:255)),e._stringAlignment=JSON.parse(JSON.stringify(void 0!==this._stringAlignment?this._stringAlignment:0)),e._text3DScale=JSON.parse(JSON.stringify(void 0!==this._text3DScale?this._text3DScale:1)),e._fontWeight=JSON.parse(JSON.stringify(void 0!==this._fontWeight?this._fontWeight:0)),e._fontSize=JSON.parse(JSON.stringify(void 0!==this._fontSize?this._fontSize:20)),e._textBoxColor=WebGLPlot.Color.clone(this._textBoxColor),e._textBoxLineColor=WebGLPlot.Color.clone(this._textBoxLineColor),e._isShowTextBox=JSON.parse(JSON.stringify(void 0!==this._isShowTextBox&&this._isShowTextBox)),e},Object.defineProperties(_0x40b7f2.prototype,{fontHeight:{get:function(){return this._fontHeight},set:function(e){e!==this._fontHeight&&(this._fontHeight=e,this._fontSize=parseInt(96*e/25.4),this.update())}},foreColor:{get:function(){return this._foreColor},set:function(e){e===this._foreColor||!(e instanceof WebGLPlot.Color)||(this._foreColor=e,this.update())}},backColor:{get:function(){return this._backColor},set:function(e){e!==this._backColor&&(this._backColor=e,this.update())}},outline:{get:function(){return this._outline},set:function(e){e!==this._outline&&(this._outline=e,this.update())}},fontName:{get:function(){return this._fontName},set:function(e){e!==this._fontName&&(this._fontName=e,this.update())}},italic:{get:function(){return this._italic},set:function(e){e!==this._italic&&(this._italic=e,this.update())}},bold:{get:function(){return this._bold},set:function(e){e!==this._bold&&(this._bold=e,this.update())}},align:{get:function(){return this._align},set:function(e){e!==this._italic&&(this._align=e,this.update())}},italicAngle:{get:function(){return this._italicAngle},set:function(e){e!==this._italicAngle&&(this._italicAngle=e,this.update())}},shadow:{get:function(){return this._shadow},set:function(e){e!==this._shadow&&(this._shadow=e,this.update())}},sizeFixed:{get:function(){return this._sizeFixed},set:function(e){e!==this._sizeFixed&&(this._sizeFixed=e,this.update())}},underline:{get:function(){return this._underline},set:function(e){e!==this._underline&&(this._underline=e,this.update())}},backOpaque:{get:function(){return this._backOpaque},set:function(e){e!==this._backOpaque&&(this._backOpaque=e,this.update())}},strikeout:{get:function(){return this._strikeout},set:function(e){e!==this._strikeout&&(this._strikeout=e,this.update())}},borderSpacingWidth:{get:function(){return this._borderSpacingWidth},set:function(e){e!==this._borderSpacingWidth&&(this._borderSpacingWidth=e,this.update())}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){e!==this._outlineWidth&&(this._outlineWidth=e,this.update())}},fontWidth:{get:function(){return this._fontWidth},set:function(e){e!==this._fontWidth&&(this._fontWidth=e,this.update())}},opaqueRate:{get:function(){return this._opaqueRate},set:function(e){e!==this._opaqueRate&&(this._opaqueRate=e,this.update())}},stringAlignment:{get:function(){return this._stringAlignment},set:function(e){e!==this._stringAlignment&&(this._stringAlignment=e,this.update())}},text3DScale:{get:function(){return this._text3DScale},set:function(e){e!==this._text3DScale&&(this._text3DScale=e,this.update())}},fontWeight:{get:function(){return this._fontWeight},set:function(e){e!==this._fontWeight&&(this._fontWeight=e,this.update())}},fontSize:{get:function(){return this._fontSize},set:function(e){e!==this._fontSize&&(this._fontSize=e,this._fontHeight=25.4*e/96,this.update())}},textBoxColor:{get:function(){return this._textBoxColor},set:function(e){e!==this._textBoxColor&&(this._textBoxColor=e,this.update())}},textBoxLineColor:{get:function(){return this._textBoxLineColor},set:function(e){e!==this._textBoxLineColor&&(this._textBoxLineColor=e,this.update())}},isShowTextBox:{get:function(){return this._isShowTextBox},set:function(e){e!==this._isShowTextBox&&(this._isShowTextBox=e,this.update())}}}),_0x40b7f2.prototype.update=function(){this._graphicObject&&(this._graphicObject._initialize=!1,this._graphicObject._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this._graphicObject))};var _0x3eda59=(_0x19e84a=!0,function(e,t){var i=_0x19e84a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19e84a=!1,i}),_0x5056b0=_0x3eda59(void 0,(function(){return _0x5056b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x5056b0).search("(((.+)+)+)+$")})),_0x19e84a;_0x5056b0();var _0x14a86d={LeftUp:0,LeftDown:1,RightUp:2,RightDown:3,Up:4,Down:5,Left:6,Right:7,Middle:8},_0x26dfeb=Object.freeze(_0x14a86d),_0x2ef16e=(_0x1a6dac=!0,function(e,t){var i=_0x1a6dac?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a6dac=!1,i}),_0x55761b=_0x2ef16e(void 0,(function(){return _0x55761b.toString().search("(((.+)+)+)+$").toString().constructor(_0x55761b).search("(((.+)+)+)+$")})),_0x1a6dac;_0x55761b();var _0x48a03={Vector:0,Grid:1,Marker:2,Picture:3,Unkown:4},_0x2bcc5b=Object.freeze(_0x48a03),_0x57649d=(_0x1bf94b=!0,function(e,t){var i=_0x1bf94b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1bf94b=!1,i}),_0x5328d1=_0x57649d(void 0,(function(){return _0x5328d1.toString().search("(((.+)+)+)+$").toString().constructor(_0x5328d1).search("(((.+)+)+)+$")})),_0x1bf94b;function _0x2909c1(){}_0x5328d1(),_0x2909c1.clearNextSamePts=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)&&this.equalFuzzy(e[i].z,e[i+1].z)?(e.splice(i,1),t--):i++;return e},_0x2909c1.clearNextSamePtsXY=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)?(e.splice(i,1),t--):i++;return e},_0x2909c1.clearSamePts=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)&&this.equalFuzzy(e[i].z,e[i+1].z)?(e.splice(i,1),t--):i++;return e},_0x2909c1.clearSamePtsXY=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)?(e.splice(i,1),t--):i++;return e},_0x2909c1.equalFuzzy=function(e,t,i){return WebGLPlot$e.defined(i)||(i=1e-31),Math.abs(e-t)<=i},_0x2909c1.distance=function(e,t){return WebGLPlot$e.defined(e)&&WebGLPlot$e.defined(t)?Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)):0},_0x2909c1.distance3D=function(e,t){return WebGLPlot$e.defined(e)&&WebGLPlot$e.defined(t)?Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)+(e.z-t.z)*(e.z-t.z)):0},_0x2909c1.isRight=function(e,t,i){var n=t,r=i,o=t,a=e;return(r.x-n.x)*(a.y-o.y)-(a.x-o.x)*(r.y-n.y)<0},_0x2909c1.isPloyClockwise=function(e){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),i=t.length;if(!(i<3)){var n=t[0].y*(t[i-1].x-t[1].x);t.push(t[0].clone());for(var r=1;r<i;++r)n+=t[r].y*(t[r-1].x-t[r+1].x);return!(n>0)}},_0x2909c1.parallel=function(e,t){var i=[];if(!WebGLPlot$e.defined(e)||e.length<2)return i;var n=!1;e.length>3&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y&&e[0].z===e[e.length-1].z&&(n=!0),n?(i[0]=this.findBisectorPoint(e[e.length-2],e[0],e[1],t),i[e.length-1]=i[0]):(i[0]=this.findPoint(e[0],e[1],t,90),i[e.length-1]=this.findPoint(e[e.length-1],e[e.length-2],-t,90));for(var r=e[0],o=e[1],a=e[1],s=1;s<e.length-1;++s)if(o=e[s],e[s]!==e[s-1]&&(r=e[s-1]),e[s]!==e[s+1]){a=e[s+1];var l=this.findBisectorPoint(r,o,a,t);this.isCross(r,i[s-1],o,l)&&(l=i[s-1]),i[s]=l}return i},_0x2909c1.isCross=function(e,t,i,n){var r=new _0x23de81(0,0,0);return!(!this.intersectLineSegs(e,t,i,n,r)||r===e||r===t||r===i||r===n)},_0x2909c1.intersectLineSegs=function(e,t,i,n,r){if(this.equalFuzzy(e.x,t.x)&&this.equalFuzzy(e.y,t.y)&&this.equalFuzzy(e.z,t.z))return r.x=e.x,r.y=e.y,!1;if(this.equalFuzzy(i.x,n.x)&&this.equalFuzzy(i.y,n.y)&&this.equalFuzzy(i.z,n.z))return r.x=i.x,r.y=i.y,!1;var o=1e-16,a=0,s=0;if(a=e.x>t.x?e.x:t.x,s=e.x<t.x?e.x:t.x,i.x-a>o&&n.x-a>o||i.x-s<-1e-16&&n.x-s<-1e-16||(a=e.y>t.y?e.y:t.y,s=e.y<t.y?e.y:t.y,i.y-a>o&&n.y-a>o||i.y-s<-1e-16&&n.y-s<-1e-16))return!1;var l=t.x-e.x,u=t.y-e.y,c=n.x-i.x,h=n.y-i.y,d=e.x-i.x,f=e.y-i.y,p=l*h-c*u,_=p;if(Math.abs(l)>1e-31&&Math.abs(c)>1e-31&&(_/=l*c),Math.abs(_)<1e-31)return e===i?(r.x=e.x,r.y=e.y,!this.isSameQuadrant(e,t,i,n)):t===n?(r.x=t.x,r.y=t.y,!this.isSameQuadrant(e,t,i,n)):e===n?(r.x=e.x,r.y=e.y,this.isSameQuadrant(e,t,i,n)):t===i&&(r.x=t.x,r.y=t.y,this.isSameQuadrant(e,t,i,n));var m=(l*f-u*d)/p,g=(c*f-h*d)/p;return!(m<0&&(Math.abs(m*c)>o||Math.abs(m*h)>o)||m>1&&(Math.abs((m-1)*c)>o||Math.abs((m-1)*h)>o)||g<0&&(Math.abs(g*l)>o||Math.abs(g*u)>o)||g>1&&(Math.abs((g-1)*l)>o||Math.abs((g-1)*u)>o))&&(Math.abs(m)<1e-31?(r.x=i.x,r.y=i.y,!0):Math.abs(m-1)<1e-31?(r.x=n.x,r.y=n.y,!0):Math.abs(g)<1e-31?(r.x=e.x,r.y=e.y,!0):Math.abs(g-1)<1e-31?(r.x=t.x,r.y=t.y,!0):!(m<0&&(Math.abs(m*c)>o||Math.abs(m*h)>o)||m>1&&(Math.abs((m-1)*c)>o||Math.abs((m-1)*h)>o)||g<0&&(Math.abs(g*l)>o||Math.abs(g*u)>o)||g>1&&(Math.abs((g-1)*l)>o||Math.abs((g-1)*u)>o))&&(r.x=m*c+i.x,r.y=m*h+i.y,!0))},_0x2909c1.plumbLineLen=function(e,t,i){return this.distance(e,t)*Math.sin(this.innerAngle(t,e,i))},_0x2909c1.innerAngle=function(e,t,i){if(e===t||e===i)return 0;var n=this.distance(e,t),r=this.distance(e,i),o=this.distance(t,i),a=(n*n+r*r-o*o)/(2*n*r);return a>1&&this.equalFuzzy(a,1)?a=1:a<1&&this.equalFuzzy(a,-1)&&(a=-1),Math.acos(a)},_0x2909c1.isSameQuadrant=function(e,t,i,n){var r=(t.x-e.x)*(n.x-i.x),o=(t.y-e.y)*(n.y-i.y);return!(Math.abs(r)<1e-31&&Math.abs(o)<1e-31)&&((r>0||Math.abs(r)<1e-31)&&(o>0||Math.abs(o)<1e-31))},_0x2909c1.findPoint=function(e,t,i,n){if(e===t||Math.abs(i)<1e-31)return e;var r=this.radian(e,t)+n*Math.PI/180;return new _0x23de81(e.x+i*Math.cos(r),e.y+i*Math.sin(r),e.z)},_0x2909c1.LinePnt=function(e,t,i){var n=_0x2909c1.distance(e,t);if(0===n)return e;var r=i/n;return _0x2909c1.FindPointOnLineByRatio(r,e,t)},_0x2909c1.FindPointOnLineByRatio=function(e,t,i){var n=new _0x23de81(0,0,0);return n.x=t.x+(i.x-t.x)*e,n.y=t.y+(i.y-t.y)*e,n.z=t.z+(i.z-t.z)*e,n},_0x2909c1.getPolygonCenterPt=function(e){if(!e||null===e||0===e.length)return null;for(var t=0,i=0,n=0,r=0;r<e.length;r++)t+=e[r].x,i+=e[r].y,n+=e[r].z;return new _0x23de81(t/e.length,i/e.length,n/e.length)},_0x2909c1.findBisectorPoint=function(e,t,i,n){var r=this.radian(t,e),o=(r+this.radian(t,i))/2,a=Math.cos(o-r+Math.PI/2),s=n;return this.isNear(a,.15)||(s=n/a),new _0x23de81(t.x+s*Math.cos(o),t.y+s*Math.sin(o),t.z)},_0x2909c1.rotateAngle=function(e,t,i){var n=new _0x23de81(0,0,0),r=t,o=Math.cos(r),a=Math.sin(r),s=i.x-e.x,l=i.y-e.y,u=i.z-e.z;return n.x=s*o-l*a+e.x,n.y=s*a+l*o+e.y,n.z=u*a+u*o+e.z,n},_0x2909c1.calcCirclePts=function(e,t,i){WebGLPlot$e.defined(i)||(i=72);for(var n=[],r=360/i,o=0;o<i-1;++o){var a=WebGLPlot$e.CesiumMath.toRadians(o*r);n.push(new _0x23de81(t.x+e*Math.cos(a),t.y+e*Math.sin(a),t.z))}return n.push(n[0].clone()),n},_0x2909c1.circlePoint=function(e,t,i,n){return n*=Math.PI/180,new _0x23de81(e.x+t*Math.cos(n),e.y+i*Math.sin(n),0)},_0x2909c1.generateBezierCtrlPts=function(e){var t=[],i=e.length;if(i<3)for(var n=0;n!=i;++n)t[n]=e[n].clone();else{var r=0;for(n=0;n<3*i-2;n+=3)"function"==typeof e[r].clone?t[n]=e[r].clone():t[n]=new _0x23de81(e[r].x,e[r].y,e[r].z),t[n+1]=new _0x23de81(0,0,e[r].z),t[n+2]=new _0x23de81(0,0,e[r].z),r++;for(n=1;n<i-1;++n)this.generateTrianglePoints(8,3,e[n-1],e[n],e[n+1],t[3*n-1],t[3*n+1]);this.getTrapezoidPoints(.6,t[0],t[3],t[2],t[1]),this.getTrapezoidPoints(.6,t[3*i-3],t[3*i-6],t[3*i-5],t[3*i-4]),"function"==typeof e[i-1].clone?t[3*i-1]=t[3*i-2]=e[i-1].clone():t[3*i-1]=t[3*i-2]=new _0x23de81(e[i-1].x,e[i-1].y,e[i-1].z)}return t},_0x2909c1.generateBezierPointsWithCtrlPts=function(e){var t=e.length,i=[];if(e.length<3)for(var n=0;n<t;++n)i[n]=e[n].clone();else{t/=3;for(n=0;n<3*t&&!(n+4>=3*t);n+=3){var r=e[n].x,o=e[n].y,a=e[n].z,s=e[n+1].x,l=e[n+1].y,u=e[n+1].z,c=e[n+2].x,h=e[n+2].y,d=e[n+2].z,f=e[n+3].x,p=e[n+3].y,_=e[n+3].z;if(this.equalFuzzy(r,s,1e-10)&&this.equalFuzzy(o,l,1e-10)&&this.equalFuzzy(c,f,1e-10)&&this.equalFuzzy(h,p,1e-10))i.push(new _0x23de81(r,o,a)),i.push(new _0x23de81(c,h,d));else for(var m=0;m<=1;m+=.03125){var g,x,y,v,$=m*m,b=$*m,T=new _0x23de81((g=1-3*m+3*$-b)*r+(x=3*(m-2*$+b))*s+(y=3*($-b))*c+(v=b)*f,g*o+x*l+y*h+v*p,g*a+x*u+y*d+v*_);i.push(T)}}}return i},_0x2909c1.generateBeizerPointsNoCtrlPt=function(e){var t=_0x2909c1.generateBezierCtrlPts(e);return _0x2909c1.generateBezierPointsWithCtrlPts(t)},_0x2909c1.generateBezierPtsWithScalePts=function(e,t,i,n){var r=[],o=e.x,a=e.y,s=t.x,l=t.y,u=i.x,c=i.y,h=n.x,d=n.y;if(this.equalFuzzy(o,s,1e-10)&&this.equalFuzzy(a,l,1e-10)&&this.equalFuzzy(u,h,1e-10)&&this.equalFuzzy(c,d,1e-10))r.push(new _0x23de81(o,a,0)),r.push(new _0x23de81(u,c,0));else for(var f=0;f<=1;f+=.03125){var p,_,m,g,x=f*f,y=x*f,v=new _0x23de81((p=1-3*f+3*x-y)*o+(_=3*(f-2*x+y))*s+(m=3*(x-y))*u+(g=y)*h,p*a+_*l+m*c+g*d,0);r.push(v)}return r},_0x2909c1.generateTrianglePoints=function(e,t,i,n,r,o,a){var s=i.x,l=i.y,u=i.z,c=n.x,h=n.y,d=n.z,f=r.x,p=r.y,_=r.z;this.getPointsByTriangle(e,t,s,l,u,c,h,d,f,p,_,o,a)},_0x2909c1.getPointsByTriangle=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=o+(l-i),p=a+(u-n),_=0,m=0;if(i==l)_=i,m=p;else if(n==u)_=f,m=n;else{var g=1*(u-n)/(l-i),x=n-i*g;m=g*(_=(p+f/g-x)/(g+1/g))+x}var y=Math.sqrt(1*(o-f)*(o-f)+1*(a-p)*(a-p)),v=Math.sqrt(1*(i-o)*(i-o)+1*(n-a)*(n-a)),$=Math.sqrt(1*(o-l)*(o-l)+1*(a-u)*(a-u)),b=0;f=_+(f-_)*(b=v+$?1+($-v)*e/($+v):1),p=m+(p-m)*b,0==y&&(y=1),h.x=o+(o-f)*v/(t*y),h.y=a+(a-p)*v/(t*y),h.z=r,d.x=o+(f-o)*$/(t*y),d.y=a+(p-a)*$/(t*y),d.z=c},_0x2909c1.getPtsByTriangle=function(e,t,i,n,r){var o=new _0x23de81(0,0,0);new _0x23de81(0,0,0);var a=0,s=0;return a=this.distance(r,i),s=this.distance(n,r),1==t&&(a*=2),2==t&&(s*=2),o.x=(a*n.x+s*i.x)/(a+s),o.y=(a*n.y+s*i.y)/(a+s),{pl:this.getWhichPtOfNormal(e,i,o,r),pr:this.getWhichPtOfNormal(e,n,o,r)}},_0x2909c1.getWhichPtOfNormal=function(e,t,i,n){new _0x23de81(0,0,0),new _0x23de81(0,0,0);var r=0;r=this.distance(n,t)/e;var o=this.getPointsOfNormal(r,i,n);return this.distance(t,o.pt4)>=(r=this.distance(t,o.pt3))?o.pt3:o.pt4},_0x2909c1.getTrapezoidPoints=function(e,t,i,n,r){var o=t.x,a=t.y,s=t.z,l=i.x,u=i.y,c=i.z,h=n.x,d=n.y,f=n.z;this.getPointsByTrapezoid(e,o,a,s,l,u,c,h,d,f,r)},_0x2909c1.getPointsByTrapezoid=function(e,t,i,n,r,o,a,s,l,u,c){var h=0,d=0,f=0,p=0;if(0===Math.abs(i-o))h=t+r-s,d=l;else if(0==Math.abs(t-r))h=s,d=i+o-l;else{var _=1*(i-o)/(t-r),m=l-_*s;d=_*(h=((o+i)/2+(t+r)/(2*_)-m)/(_+1/_))+m,h=2*h-s,d=2*d-l}var g=Math.sqrt(1*(t-r)*(t-r)+1*(i-o)*(i-o)),x=Math.sqrt(1*(t-h)*(t-h)+1*(i-d)*(i-d));return g>0?(f=t+(r-t)*x/g,p=i+(o-i)*x/g):(f=t,p=i),c.x=f+(h-f)*e,c.y=p+(d-p)*e,c.z=u,c},_0x2909c1.generateArcInfo=function(e,t,i){var n={};n.pntCenter=new _0x23de81(0,0,0),n.dRadius=0,n.dStartAngle=0,n.dEndAngle=0;var r=t.x-e.x,o=t.y-e.y;if(Math.abs(r)<1e-31){var a={};(l={}).x=(t.x+e.x)/2,l.y=(t.y+e.y)/2,a.x=(t.x+i.x)/2,a.y=(t.y+i.y)/2;var s=0;Math.abs(i.x-t.x)>=1e-31&&(s=(i.y-t.y)/(i.x-t.x)),n.pntCenter.y=l.y,Math.abs(s)<1e-31?n.pntCenter.x=a.x:n.pntCenter.x=a.x-s*(l.y-a.y)}else{var l;a={};(l={}).x=(t.x+e.x)/2,l.y=(t.y+e.y)/2,a.x=(t.x+i.x)/2,a.y=(t.y+i.y)/2;var u=o/r,c=1;Math.abs(u)<1e-31?(n.pntCenter.x=l.x,Math.abs(i.x-t.x<1e-31)?n.pntCenter.y=a.y:n.pntCenter.y=-(i.x-t.x)/(i.y-t.y)*(n.pntCenter.x-a.x)+a.y):Math.abs(i.x-t.x)<1e-31?(n.pntCenter.y=a.y,n.pntCenter.x=-u*(n.pntCenter.y-l.y)+l.x):(c=(i.y-t.y)/(i.x-t.x),n.pntCenter.x=(u*c*(l.y-a.y)+c*l.x-u*a.x)/(c-u),n.pntCenter.y=(a.x-l.x+c*a.y-u*l.y)/(c-u))}var h=Math.atan2(e.y-n.pntCenter.y,e.x-n.pntCenter.x),d=Math.atan2(i.y-n.pntCenter.y,i.x-n.pntCenter.x);if(this.isCounterClockwise(e,t,i)){for(;h>=2*Math.PI;)h-=2*Math.PI;for(;h<0;)h+=2*Math.PI;for(;d>2*Math.PI;)d-=2*Math.PI;for(;d<h;)d+=2*Math.PI}else{for(;d>=2*Math.PI;)d-=2*Math.PI;for(;d<0;)d+=2*Math.PI;for(;h>2*Math.PI;)h-=2*Math.PI;for(;d>h;)h+=2*Math.PI;var f=h;h=d,d=f}return n.dRadius=Math.sqrt((n.pntCenter.x-e.x)*(n.pntCenter.x-e.x)+(n.pntCenter.y-e.y)*(n.pntCenter.y-e.y)),n.dEndAngle=180*d/Math.PI,n.dStartAngle=180*h/Math.PI,n},_0x2909c1.isCounterClockwise=function(e,t,i){return(i.x-t.x)*(e.y-t.y)-(e.x-t.x)*(i.y-t.y)>0},_0x2909c1.generateArcSpatialData=function(e,t,i,n,r,o,a){WebGLPlot$e.defined(a)||(a=36);var s=(o-r)/a,l=[];if(Math.abs(s)<1e-31)return l;for(;o<r;)o+=2*Math.PI;for(;o>r+2*Math.PI;)r+=2*Math.PI;var u=Math.cos(n)*t,c=Math.sin(n)*t,h=Math.cos(n)*i,d=Math.sin(n)*i,f=this.calcEllipseRadian(r,t,i),p=this.calcEllipseRadian(o,t,i);p-f<1e-31&&(p+=2*Math.PI);var _=Math.round(Math.abs((p-f)/s)+1);if(_<2)return l;for(var m=0;m<_-1;f+=s,m++){m===_-2&&(f=o);var g=e.x+u*Math.cos(f)-d*Math.sin(f),x=e.y+c*Math.cos(f)+h*Math.sin(f);l.push(new _0x23de81(g,x,0))}return 0>l.length&&(l[l.length-1].x=e.x+u*Math.cos(p)-d*Math.sin(p),l[l.length-1].y=e.y+c*Math.cos(p)+h*Math.sin(p)),l},_0x2909c1.calcEllipseRadian=function(e,t,i){var n=e,r=t*Math.sin(e),o=i*Math.cos(e),a=Math.atan2(r,o);if(e>Math.PI)for(;n>Math.PI;)n-=2*Math.PI,a+=2*Math.PI;else if(e<-Math.PI)for(;n<-Math.PI;)n+=2*Math.PI,a-=2*Math.PI;return a},_0x2909c1.radian=function(e,t){var i=0,n=t.x-e.x,r=t.y-e.y;return(i=Math.atan2(r,n))<0&&(i+=2*Math.PI),i},_0x2909c1.intersectLines=function(e,t,i,n){var r={isIntersectLines:!1};if(e.x===t.x&&e.y===t.y||i.x===n.x&&i.y===n.y)return r;var o=t.x-e.x,a=t.y-e.y,s=n.x-i.x,l=n.y-i.y,u=o*l-s*a;if(this.isNear(u))return r;var c=(o*(e.y-i.y)-a*(e.x-i.x))/u,h=new _0x23de81(0,0,0);return h.x=c*s+i.x,h.y=c*l+i.y,h.z=e.z,r.isIntersectLines=!0,r.intersectPoint=h,r},_0x2909c1.isNear=function(e,t){return t||(t=1e-31),e<t&&e>-t},_0x2909c1.calcKidneyShapePts=function(e){var t=[],i=[],n=e.length;if(0!==n){if(1===n)return void t.push(e[0]);if(2===n){var r=this.calcProtudeC3(e[0],e[1]);i.push(e[0]),i.push(e[1]),i.push(r)}else if(i.push(e[0]),i.push(e[1]),i.push(e[2]),(this.isSamePt(e[0],e[2])||this.isSamePt(e[1],e[2]))&&(t.push(e[0]),t.push(e[1])),this.isSamePt(e[0],e[1]))return t.push(e[0]),void t.push(e[2]);i=this.reNormalizeKidneyCtrlPoints(i);var o=new _0x23de81(0,0,0),a=new _0x23de81(0,0,0);o.x=.5*(i[0].x+i[1].x),o.y=.5*(i[0].y+i[1].y),a.x=o.x-.1*(i[2].x-o.x),a.y=o.y-.1*(i[2].y-o.y);var s=this.getPtsByTriangle(3,0,i[1],i[0],a);t.push(s.pr),t.push(a),t.push(s.pl);var l=this.getPtsByTriangle(4,2,i[2],i[0],i[1]);t.push(l.pr),t.push(i[1]),t.push(l.pl);var u=this.getPtsByTriangle(2,0,i[0],i[1],i[2]);t.push(u.pr),t.push(i[2]),t.push(u.pl);var c=this.getPtsByTriangle(4,1,i[1],i[2],i[0]);return t.push(c.pr),t.push(i[0]),t.push(c.pl),t}},_0x2909c1.generateKidneyShapePts=function(e){var t=[];if(2>e.length)return t;var i=this.calcKidneyShapePts(e);if(12!=i.length)return t;i.push(i[0]),i.push(i[1]),i.splice(0,1);for(var n=0;n<i.length-3;n+=3){var r;i.slice(n,n+4),r=this.generateBezierPtsWithScalePts(i[n],i[n+1],i[n+2],i[n+3]),t=t.concat(r)}return t},_0x2909c1.calcProtudeC3=function(e,t){var i,n=new _0x23de81(0,0,0);return n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y),i=_0x2909c1.distance(t,e)/2.7,this.getPointsOfNormal(i,e,n).pt3},_0x2909c1.getPointsOfNormal=function(e,t,i){var n,r=new _0x23de81(0,0,0),o=new _0x23de81(0,0,0),a=new _0x23de81(0,0,0);return 0==(n=this.distance(t,i))?(a.y=0,a.x=e):(a.x=e*(t.x-i.x)/n,a.y=e*(t.y-i.y)/n),r.x=-a.y+i.x,r.y=a.x+i.y,o.x=a.y+i.x,o.y=-a.x+i.y,{pt3:r,pt4:o}},_0x2909c1.isSamePt=function(e,t){return!!(this.equalFuzzy(e.x,t.x)&&this.equalFuzzy(e.y,t.y)&&this.equalFuzzy(e.z,t.z))},_0x2909c1.reNormalizeKidneyCtrlPoints=function(e){var t=[];t.push(new _0x23de81(0,0,0)),t.push(new _0x23de81(0,0,0)),t.push(new _0x23de81(0,0,0));var i=e.length;if(!(i<2)){if(2==i)t[0]=e[0],t[1]=e[1],t[2]=this.calcProtudeC3(e[0],e[1]);else{var n,r,o,a=e[0],s=e[1],l=e[2];if(n=this.distance(s,a),r=this.distance(l,s),o=this.distance(a,l),r>=n&&r>=o){var u=a.clone();a=l.clone(),l=u.clone()}else if(o>=n&&o>=r){u=l.clone();l=s.clone(),s=u.clone()}if(!this.isRight(l,a,s)){u=a.clone();a=s.clone(),s=u.clone()}t[0]=a,t[1]=s,t[2]=l}return t}},_0x2909c1.pointIsRightToVerticle=function(e,t,i){var n=new WebGLPlot$e.Cartesian2(.5*(t.x+e.x),.5*(t.y+e.y)),r=new WebGLPlot$e.Cartesian2(t.x-e.x,t.y-e.y),o=new WebGLPlot$e.Cartesian2(i.x-n.x,i.y-n.y);return r.x*o.x+r.y*o.y>0},_0x2909c1.StringtoColor=function(e){if(e.length){var t;t=e.length<8?1:parseInt(e.slice(7,9),16)/255;var i=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255;return new WebGLPlot$e.Color(i,n,r,t)}return e},_0x2909c1.getPosition=function(e,t){if(WebGLPlot$e.defined(t)){var i=void 0,n=e.pickPosition(t);if(n){var r=WebGLPlot$e.Cartographic.fromCartesian(n);i=new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(r.longitude),WebGLPlot$e.CesiumMath.toDegrees(r.latitude),r.height<-1e4?0:r.height)}else if(n=e.camera.pickEllipsoid(t,e.globe.ellipsod)){r=WebGLPlot$e.Cartographic.fromCartesian(n);i=new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(r.longitude),WebGLPlot$e.CesiumMath.toDegrees(r.latitude),r.height)}return void 0===i||NaN===i.x||NaN===i.y||NaN===i.z?new WebGLPlot$e.Cartesian3:i}},_0x2909c1.getPosition2=function(e,t){if(!WebGLPlot$e.defined(t))return;let i=e.camera.pickEllipsoid(t,e.globe.ellipsod);var n=WebGLPlot$e.Cartographic.fromCartesian(i);const r=new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(n.longitude),WebGLPlot$e.CesiumMath.toDegrees(n.latitude),1);return void 0===r||NaN===r.x||NaN===r.y||NaN===r.z?new WebGLPlot$e.Cartesian3:r},_0x2909c1.getSurroundLinePts=function(e,t){var i=[],n=[];t*=_0x2909c1.innerOutlineDir(e);for(var r=0;r<e.length-1;r++){var o,a,s=[];if(!_0x2909c1.equalFuzzy(e[r].x,e[r+1].x)||!_0x2909c1.equalFuzzy(e[r].y,e[r+1].y)){s.push(e[r]),s.push(e[r+1]);var l=_0x2909c1.parallel(s,t);if(o=l[0],a=l[1],0!=i.length){var u=_0x2909c1.intersectLines(o,a,i[0],i[1]);if(u.isIntersectLines){var c=u.intersectPoint,h=_0x2909c1.distance(o,a);_0x2909c1.distance(c,a)>2*h||(n[n.length-1]=c),n.push(a)}else n.push(a)}else n.push(o),n.push(a);(i=[]).push(n[n.length-2]),i.push(n[n.length-1])}}if(e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y&&e[0].z===e[e.length-1].z&&1<n.length){var d=_0x2909c1.intersectLines(n[0],n[1],n[n.length-2],n[n.length-1]);if(d.isIntersectLines){var f=d.intersectPoint;n[n.length-1]=f,n[0]=f}}return n},_0x2909c1.innerOutlineDir=function(e){function t(e,t){function i(e){var t=Math.atan2(e.y,e.x);return t<0&&(t+=2*Math.PI),t}var n=i(t)-i(e);return n<-Math.PI&&(n+=2*Math.PI),n>Math.PI&&(n-=2*Math.PI),n}if((e=_0x2909c1.clearNextSamePts(e)).length<3)return 1;for(var i=0,n={x:0,y:0},r={x:0,y:0},o=2;o<e.length;o++)r.x=e[o].x-e[o-1].x,r.y=e[o].y-e[o-1].y,n.x=e[o-1].x-e[o-2].x,n.y=e[o-1].y-e[o-2].y,i+=t(n,r);return r.x=e[1].x-e[0].x,r.y=e[1].y-e[0].y,n.x=e[0].x-e[e.length-1].x,n.y=e[0].y-e[e.length-1].y,(i+=t(n,r))>=0?-1:1},_0x2909c1.isSpecialHeightSymbol=function(e,t){if(22===e)switch(t){case 1001:case 1002:case 1003:case 1004:case 1006:case 1007:case 1009:case 1011:return!0}return 50308===t||26400===t},_0x2909c1.isCanFill=function(e){if(!WebGLPlot$e.defined(e)||_0x1c668c.SYMBOL_ALGO!==e.symbolType)return!1;switch(e.code){case 1001:case 1002:case 1003:case 1004:case 1006:case 1011:case 25200:return!0}return!1},_0x2909c1.isSymbolCellCanFill=function(e){return _0x1c668c.SYMBOL_CHORD===e.type||_0x1c668c.SYMBOL_ARBITRARYPOLYGON===e.type||_0x1c668c.SYMBOL_POLYBEZIERCLOSED===e.type||_0x1c668c.SYMBOL_PIE===e.type||_0x1c668c.SYMBOL_CIRCLE===e.type||_0x1c668c.SYMBOL_RECTANGLE===e.type||_0x1c668c.SYMBOL_PARALLELOGRAM===e.type||_0x1c668c.SYMBOL_ELLIPSE===e.type||_0x1c668c.SYMBOL_TRAPEZOID===e.type||_0x1c668c.SYMBOL_KIDNEY===e.type||_0x1c668c.SYMBOL_REGULARPOLYGON===e.type||_0x1c668c.SYMBOL_COMBINATIONALCIRCLE===e.type||_0x1c668c.SYMBOL_CIRCLECHORD===e.type||_0x1c668c.SYMBOL_CIRCLEPIE===e.type},_0x2909c1.getSpaceDistance=function(e,t){var i=WebGLPlot$e.Cartesian3.fromDegrees(e.x,e.y,e.z),n=WebGLPlot$e.Cartesian3.fromDegrees(t.x,t.y,t.z),r=WebGLPlot$e.Cartographic.fromCartesian(i),o=WebGLPlot$e.Cartographic.fromCartesian(n),a=new WebGLPlot$e.EllipsoidGeodesic;return a.setEndPoints(r,o),a.surfaceDistance},_0x2909c1.getSpaceDistanceByCartesian=function(e,t){var i=WebGLPlot$e.Cartographic.fromCartesian(e),n=WebGLPlot$e.Cartographic.fromCartesian(t),r=new WebGLPlot$e.EllipsoidGeodesic;return r.setEndPoints(i,n),r.surfaceDistance},_0x2909c1.intersectionOfRectByPointslopeline=function(e,t,i){var n=new WebGLPlot$e.Cartesian2,r=new WebGLPlot$e.Cartesian2;if(-1==t)n.x=e.x,n.y=i.bottom,r.x=e.x,r.y=i.top;else if(0==t)n.x=i.left,n.y=e.y,r.x=i.right,r.y=e.y;else{var o=0,a=[];if((l=t*((u=i.left)-e.x)+e.y)>i.bottom&&l<i.top&&(a[2*o]=u,a[2*o+1]=l,o++),(l=t*((u=i.right)-e.x)+e.y)>i.bottom&&l<i.top&&(a[2*o]=u,a[2*o+1]=l,o++),o<2){var s=-1/t;l=i.bottom,(u=e.x-s*(l-e.y))>i.left&&u<i.right&&(a[2*o]=u,a[2*o+1]=l,o++)}if(o<2){s=-1/t;var l=i.top,u=e.x-s*(l-e.y);o<2&&u>i.left&&u<i.right&&(a[2*o]=u,a[2*o+1]=l,o++)}n.x=a[0],n.y=a[1],r.x=a[2],r.y=a[3]}return[n,r]},_0x2909c1.ptIsInPolygon=function(e,t){if(!e||0===e.length)return!1;for(var i=0,n=e.length,r=0;r<n;r++){var o=e[r],a=e[(r+1)%n];if(o.y!==a.y){var s=o.y<a.y?o.y:a.y,l=o.y>a.y?o.y:a.y;if(!(t.y<s||t.y>l))(t.y-o.y)*(a.x-o.x)/(a.y-o.y)+o.x>t.x&&i++}}return i%2==1},_0x2909c1.pixelDisToRealDis=function(e,t,i){var n=WebGLPlot$e.Cartesian3.fromDegrees(t.x,t.y,t.z),r=WebGLPlot$e.SceneTransforms.wgs84ToWindowCoordinates(e,n);if(!WebGLPlot$e.defined(r))return 0;var o=new WebGLPlot$e.Cartesian2(r.x+i,r.y),a=_0x2909c1.getPosition(e,r),s=_0x2909c1.getPosition(e,o);return _0x2909c1.distance(a,s)},_0x2909c1.computeMatrix=function(e,t,i){var n=WebGLPlot$e.Cartesian3.fromDegrees(e.x,e.y,e.z),r=new WebGLPlot$e.HeadingPitchRoll,o=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west");i||(i=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot$e.Ellipsoid.WGS84,o));var a=Math.PI/180;return r.pitch=a*t.x,r.roll=a*t.y,r.heading=a*t.z,WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot$e.Ellipsoid.WGS84,o,i),i},_0x2909c1.computeMatrix2=function(e,t,i){var n=new WebGLPlot$e.HeadingPitchRoll,r=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west");i||(i=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(e,n,WebGLPlot$e.Ellipsoid.WGS84,r));var o=Math.PI/180;return n.pitch=o*t.x,n.roll=o*t.y,n.heading=o*t.z,WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(e,n,WebGLPlot$e.Ellipsoid.WGS84,r,i),i},_0x2909c1.Cross=function(e,t){return e.x*t.y-e.y*t.x},_0x2909c1.IsClockwise=function(e){for(var t=0,i=0,n=1,r=2;i<e.length;i++,n++,r++){n>=e.length&&(n-=e.length),r>=e.length&&(r-=e.length);var o=new WebGLPlot$e.Cartesian2(e[n].x-e[i].x,e[n].y-e[i].y),a=new WebGLPlot$e.Cartesian2(e[r].x-e[n].x,e[r].y-e[n].y);_0x2909c1.Cross(o,a)>=0?t++:t--}return t>=0},_0x2909c1.Resolve=function(e){var t=[];if(e.length<3)return null;for(var i=_0x2909c1.IsClockwise(e),n=[],r=0;r<e.length;r++){var o={point:e[r],index:r,isConvex:!1,isSeparable:!1};i?n.push(o):n.unshift(o)}for(var a=[],s=0;s<n.length;s++)_0x2909c1.UpdatePointStatus(n[s],n,s),n[s].isSeparable&&a.unshift({Value:n[s],Array:n,ArrayIndex:s});for(;n.length>=3;){if(0===a.length)return null;var l=a[0];a.shift();var u={Array:l.Array,ArrayIndex:WebGLPlot$e.defined(l.Array[l.ArrayIndex-1])?l.ArrayIndex-1:l.Array.length-1},c={Array:l.Array,ArrayIndex:WebGLPlot$e.defined(l.Array[l.ArrayIndex+1])?l.ArrayIndex+1:0},h=WebGLPlot$e.defined(l.Array[l.ArrayIndex])?l.Array[l.ArrayIndex]:l.Array[0],d=u.Array[u.ArrayIndex],f=c.Array[c.ArrayIndex];if(n.splice(l.ArrayIndex,1),t.push(h.index),t.push(d.index),t.push(f.index),d.isSeparable){if(_0x2909c1.UpdatePointStatus(d,u.Array,u.ArrayIndex),!d.isSeparable){var p=a.indexOf(u);a.splice(p,1)}}else _0x2909c1.UpdatePointStatus(d,u.Array,u.ArrayIndex),d.isSeparable&&a.unshift(u);if(f.isSeparable){if(_0x2909c1.UpdatePointStatus(f,c.Array,c.ArrayIndex),!f.isSeparable){p=a.indexOf(c);a.splice(p,1)}}else _0x2909c1.UpdatePointStatus(f,c.Array,c.ArrayIndex),f.isSeparable&&a.unshift(c)}return t},_0x2909c1.UpdatePointStatus=function(e,t,i){var n=WebGLPlot$e.defined(t[i-1])?t[i-1]:t[t.length-1],r=WebGLPlot$e.defined(t[i+1])?t[i+1]:t[0];if(!e.isConvex){var o=new WebGLPlot$e.Cartesian2,a=new WebGLPlot$e.Cartesian2;if(!(_0x2909c1.Cross(WebGLPlot$e.Cartesian2.subtract(e.point,n.point,o),WebGLPlot$e.Cartesian2.subtract(r.point,e.point,a))>=0))return void(e.isSeparable=!1);e.isConvex=!0}for(var s=0;s<t.length;s++)if(!WebGLPlot$e.Cartesian2.equals(t[s].point,e.point)&&!WebGLPlot$e.Cartesian2.equals(t[s].point,n.point)&&!WebGLPlot$e.Cartesian2.equals(t[s].point,r.point)&&_0x2909c1.TestInTriangle(t[s].point,e.point,n.point,r.point))return void(e.isSeparable=!1);e.isSeparable=!0},_0x2909c1.TestInTriangle=function(e,t,i,n){var r=new WebGLPlot$e.Cartesian2,o=new WebGLPlot$e.Cartesian2,a=new WebGLPlot$e.Cartesian2,s=new WebGLPlot$e.Cartesian2,l=new WebGLPlot$e.Cartesian2;WebGLPlot$e.Cartesian2.subtract(i,t,r),WebGLPlot$e.Cartesian2.subtract(n,t,o),WebGLPlot$e.Cartesian2.subtract(n,i,a),WebGLPlot$e.Cartesian2.subtract(e,t,s);var u=_0x2909c1.Cross(r,o)>=0;return u^_0x2909c1.Cross(r,s)<0&&_0x2909c1.Cross(a,r)>0^_0x2909c1.Cross(a,WebGLPlot$e.Cartesian2.subtract(e,i,l))>=0&&u^_0x2909c1.Cross(o,s)>=0},_0x2909c1.screenSpaceCameraController=function(e,t){if(e){var i=e.screenSpaceCameraController;2===e.mode?i.enableTranslate=t:3===e.mode&&(i.enableRotate=t),e.camera.update(e.mode),i.update()}},_0x2909c1.pixelDisToRealDisInMeters=function(e,t){var i=e.camera,n=new WebGLPlot$e.Cartesian2(e._canvas.clientWidth/2,e._canvas.clientHeight/2),r=new WebGLPlot$e.Cartesian2(n.x+t.x,n.y),o=new WebGLPlot$e.Cartesian2(n.x,n.y+t.y),a=i.getPickRay(n),s=i.getPickRay(r),l=i.getPickRay(o),u=e.globe.pick(a,e),c=e.globe.pick(s,e),h=e.globe.pick(l,e),d=WebGLPlot$e.Cartesian3.distance(u,c),f=WebGLPlot$e.Cartesian3.distance(u,h);return new WebGLPlot$e.Cartesian2(d,f)},_0x2909c1.pixelHeightToRealHeight=function(e,t,i){var n=e.camera,r=new WebGLPlot$e.Cartesian2(t.x,t.y+1),o=n.getPickRay(t),a=n.getPickRay(r),s=e.globe.pick(o,e),l=e.globe.pick(a,e),u=.3*WebGLPlot$e.Cartesian3.distance(s,l);return(t.y-i.y)*u},_0x2909c1.getPlotLayers=function(e){var t=null;if(WebGLPlot$e.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot$e.PlotLayers)t=e.plotLayers;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot$e.defined(r)&&r instanceof WebGLPlot$e.PlotLayers){t=r;break}}return t};var _0x37cca8=new WebGLPlot$e.Cartesian3,_0x49602b=new WebGLPlot$e.Cartesian3;_0x2909c1.getModelMinAndMaxCorner=function(e){for(var t=e.gltf,i=t.nodes,n=t.meshes,r=t.scenes[t.scene].nodes,o=r.length,a=[],s=new WebGLPlot$e.Cartesian3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),l=new WebGLPlot$e.Cartesian3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),u=0;u<o;++u){var c=i[r[u]];for(c._transformToRoot=WebGLPlot$e.ModelUtility.getTransform(c),a.push(c);a.length>0;){var h=(c=a.pop())._transformToRoot,d=c.mesh;if(WebGLPlot$e.defined(d))for(var f=n[d].primitives,p=f.length,_=0;_<p;++_)if(f[_].attributes&&f[_].attributes.POSITION){var m=f[_].attributes.POSITION;if(WebGLPlot$e.defined(m)){var g=WebGLPlot$e.ModelUtility.getAccessorMinMax(t,m);if(WebGLPlot$e.defined(g.min)&&WebGLPlot$e.defined(g.max)){var x=WebGLPlot$e.Cartesian3.fromArray(g.min,0,_0x37cca8),y=WebGLPlot$e.Cartesian3.fromArray(g.max,0,_0x49602b);WebGLPlot$e.Matrix4.multiplyByPoint(h,x,x),WebGLPlot$e.Matrix4.multiplyByPoint(h,y,y),WebGLPlot$e.Cartesian3.minimumByComponent(s,x,s),WebGLPlot$e.Cartesian3.maximumByComponent(l,y,l)}}}var v=c.children;if(WebGLPlot$e.defined(v))for(var $=v.length,b=0;b<$;++b){var T=i[v[b]];T._transformToRoot=WebGLPlot$e.ModelUtility.getTransform(T),WebGLPlot$e.Matrix4.multiplyTransformation(h,T._transformToRoot,T._transformToRoot),a.push(T)}delete c._transformToRoot}}return{minCorner:s,maxCorner:l}},_0x2909c1.localPtsToCartesian=function(e,t,i){var n=new WebGLPlot$e.Cartesian3,r=new WebGLPlot$e.Cartesian3;return r=WebGLPlot$e.Cartesian3.multiplyByScalar(new WebGLPlot$e.Cartesian3(e.x,e.y,e.z),i,r),{position:n=WebGLPlot$e.Matrix4.multiplyByPoint(t,r,n),vector:r}},_0x2909c1.latLon2LocalPts=function(e){let t=[],i=[],n=WebGLPlot$e.Cartesian3.fromDegrees(e[0].x,e[0].y,e[0].z);if(i.push(new WebGLPlot$e.Cartesian3(0,0,0)),t.push(n),Array.isArray(e)){for(let r=1;r<e.length;r++){let o=WebGLPlot$e.Cartesian3.fromDegrees(e[r].x,e[r].y,e[r].z);const a=o.x-n.x,s=o.y-n.y,l=o.z-n.z;t.push(o),i.push(new WebGLPlot$e.Cartesian3(a,s,l))}var r=new WebGLPlot$e.HeadingPitchRoll,o=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west");const a=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot$e.Ellipsoid.WGS84,o);return console.log(t,"test"),{positions:i,modelMatrix:a}}},_0x2909c1.extend=function(e){var t,i,n,r;for(i=1,n=arguments.length;i<n;i++)for(t in r=arguments[i])e[t]=r[t];return e},_0x2909c1.isSymbolDot=function(e){switch(e){case _0x1c668c.SYMBOL_DOT:case _0x1c668c.SYMBOL_PICTURE:case _0x1c668c.SYMBOL_POINT:case _0x1c668c.SYMBOL_Model:return!0}return!1};var _0x5c3542=(_0x10c270=!0,function(e,t){var i=_0x10c270?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x10c270=!1,i}),_0x4767de=_0x5c3542(void 0,(function(){return _0x4767de.toString().search("(((.+)+)+)+$").toString().constructor(_0x4767de).search("(((.+)+)+)+$")})),_0x10c270;function _0x23999b(e,t){this.scene=WebGLPlot.defaultValue(e,null),this.dotBillboards=new WebGLPlot.BillboardCollection,this._name=WebGLPlot.defaultValue(t,"PlotCollentionLayer"),this._waterPlanes=[],this._visibleViewport=0,this._valid=!0,this._visibility=!0,this._id=-1,this.bIsUpdateDepthTestDis=!1,this.setInterval(),this.PolygonFillInstances={},this.WallInstances={},this.Labels={},this.ploygonFillPrimitive=[],this.wallPrimitive=[],this.ploygonFillAppearance={},this.wallAppearance={},this.algoLabels=new WebGLPlot.LabelCollection,this.updatePrimitive=!1,this.createPolylineCollention(!0),this.GroundInstances={},this.groundPrimitive=null,this.dynamicScaneInstances={},this.dynamicScaneimitive=null,this._dotModelAndVectorPrimitives=new WebGLPlot.PrimitiveCollection,this.scene.primitives.add(this._dotModelAndVectorPrimitives)}function _0xbdabbf(e){if(WebGLPlot.defined(e)&&null!==e&&WebGLPlot.defined(this.scene)&&null!==this.scene){var t=e.position,i=e.width,n=e.height;if(WebGLPlot.defined(i)&&WebGLPlot.defined(n)){var r=new WebGLPlot.BoundingSphere(t,0),o=this.scene.camera.getPixelSize(r,this.scene.frameState.context.drawingBufferWidth,this.scene.frameState.context.drawingBufferHeight),a=i*o,s=n*o,l=Math.max(a,s)/3;r.radius=l,WebGLPlot.BoundingSphere.isOccluded(r,this.scene.frameState.occluder)?e.disableDepthTestDistance=0:e.disableDepthTestDistance=Number.POSITIVE_INFINITY}}}function _0x453459(e){var t=e.ForeRGBA;return e.isClampToGround&&(t+="_isClampToGround"),t}_0x4767de(),_0x23999b.prototype.update=function(e,t,i,n){WebGLPlot.defined(this.dotBillboards)&&null!==this.dotBillboards&&this.dotBillboards.update(e,t),WebGLPlot.defined(this.polylineCollection)&&null!==this.polylineCollection&&this.polylineCollection.update(e);for(var r=0;r<this.ploygonFillPrimitive.length;r++)(this.ploygonFillPrimitive[r]instanceof WebGLPlot.GroundPrimitive||this.ploygonFillPrimitive[r]instanceof WebGLPlot.Primitive)&&this.ploygonFillPrimitive[r].update(e);for(var o=0;o<this.wallPrimitive.length;o++)this.wallPrimitive[o]instanceof WebGLPlot.Primitive&&this.wallPrimitive[o].update(e);null!==this.groundPrimitive&&this.groundPrimitive.update(e),this.dynamicScaneimitive&&this.dynamicScaneimitive.update(e),this.algoLabels.update(e)},_0x23999b.prototype.render=function(){if(this._valid&&this.updatePrimitive){for(var e=0;e<this.ploygonFillPrimitive.length;e++)this.ploygonFillPrimitive[e]=null;for(e=0;e<this.wallPrimitive.length;e++)this.wallPrimitive[e]=null;this.groundPrimitive&&(this.groundPrimitive=null),this.dynamicScaneimitive&&(this.dynamicScaneimitive=null),this.ploygonFillPrimitive=[],this.wallPrimitive=[],this.ploygonFillAppearance={},this.wallAppearance={};var t=[],i=[],n=[],r=[];for(var o in this.PolygonFillInstances)!this.PolygonFillInstances[o]||this.PolygonFillInstances[o].length<=0?(delete this.PolygonFillInstances[o],this.PolygonFillInstances[o]=null):t=t.concat(this.PolygonFillInstances[o]);for(var a in this.WallInstances)this.WallInstances[a].length<=0?delete this.WallInstances[a]:i=i.concat(this.WallInstances[a]);for(var s in this.GroundInstances)this.GroundInstances[s].length<=0?delete this.GroundInstances[s]:n=n.concat(this.GroundInstances[s]);for(var s in this.dynamicScaneInstances)this.dynamicScaneInstances[s].length<=0?delete this.dynamicScaneInstances[s]:r=r.concat(this.dynamicScaneInstances[s]);for(s=0;s<t.length;s++){var l=t[s];this.ploygonFillAppearance.hasOwnProperty(_0x453459(l))?this.ploygonFillAppearance[_0x453459(l)].push(l):this.ploygonFillAppearance[_0x453459(l)]=[l]}if(WebGLPlot.defined(this.ploygonFillAppearance)&&null!==this.ploygonFillAppearance)for(var e in this.ploygonFillAppearance){var u=this.createPolygonFillPrimitive(e,this.ploygonFillAppearance[e]);this.ploygonFillPrimitive.push(u)}for(var c=0;c<i.length;c++){var h=i[c];this.wallAppearance.hasOwnProperty(h.ForeRGBA)?this.wallAppearance[h.ForeRGBA].push(h):this.wallAppearance[h.ForeRGBA]=[h]}if(WebGLPlot.defined(this.wallAppearance)&&null!==this.wallAppearance)for(var d in this.wallAppearance){var f=this.createWallPrimitive(d,this.wallAppearance[d]);this.wallPrimitive.push(f)}n.length>0&&n[0]&&(this.groundPrimitive=new WebGLPlot.GroundPolylinePrimitive({geometryInstances:n,classificationType:WebGLPlot.ClassificationType.BOTH,clampToS3M:!0,show:!0,appearance:new WebGLPlot.PolylineColorAppearance}),this.groundPrimitive.SymbolType=_0x1c668c.SYMBOL_ALGO),r.length>0&&r[0]&&(this.dynamicScaneimitive=new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.PerInstanceColorAppearance({flat:!0}),asynchronous:!1})),this.updatePrimitive=!1}},_0x23999b.prototype.createPolygonFillPrimitive=function(e,t){var i;i=e.includes("_isClampToGround")?WebGLPlot.Color.fromRgba(e.split("_")[0]):WebGLPlot.Color.fromRgba(e);var n,r=new WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),o=new WebGLPlot.EllipsoidSurfaceAppearance({material:r,aboveGround:!0});return(n=t[0]&&t[0].isClampToGround?new WebGLPlot.GroundPrimitive({geometryInstances:t,appearance:o,show:this._display,asynchronous:!0,classificationType:WebGLPlot.ClassificationType.BOTH}):new WebGLPlot.Primitive({geometryInstances:t,appearance:o,show:this._display,asynchronous:!1})).PolygonFillOrWall=!0,n.SymbolType=_0x1c668c.SYMBOL_ALGO,n},_0x23999b.prototype.createWallPrimitive=function(e,t){var i=WebGLPlot.Color.fromRgba(e),n=WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),r=new WebGLPlot.MaterialAppearance({material:n,faceForward:!0}),o=new WebGLPlot.Primitive({geometryInstances:t,appearance:r,asynchronous:!1,compressVertices:!0,show:!0});return o.PolygonFillOrWall=!0,o.SymbolType=_0x1c668c.SYMBOL_ALGO,o},_0x23999b.prototype.setInterval=function(){var e=this;setInterval((function(){if(WebGLPlot.defined(e.dotBillboards)&&e.dotBillboards.length>0&&e.bIsUpdateDepthTestDis)for(var t in e.dotBillboards._billboards)_0xbdabbf(t)}),100)},_0x23999b.prototype.releaseSelection=function(){this._valid},_0x23999b.prototype.createPolylineCollention=function(e){if(this.polylineCollection&&this.polylineCollection.destroy(),this.polylineCollection=new WebGLPlot.PolylineCollection({opaqueRS:WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}}),translucentRS:WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}})}),this.scene&&this.scene.plotLayers){let e=this.scene.plotLayers._layerQueue.length;for(let t=0;t<e;t++){let e=this.scene.plotLayers._layerQueue[t];if(WebGLPlot.defined(e)&&e){let t=e._geoGraphicObjects.length;for(let i=0;i<t;i++)e._geoGraphicObjects[i]._initialize=!1}}}};const _0x5541d0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x464355=_0x5541d0(void 0,(function(){return _0x464355.toString().search("(((.+)+)+)+$").toString().constructor(_0x464355).search("(((.+)+)+)+$")}));_0x464355();var _0x3b4e68=new Map;function _0x4786d3(e){this.collentionLayer=new _0x23999b(e);var t=!1;if(WebGLPlot.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot.PlotLayers)e.plotLayers.collentionLayer=this.collentionLayer,t=!0;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot.defined(r)&&r instanceof WebGLPlot.PlotLayers){r.collentionLayer=this.collentionLayer,t=!0;break}}if(!t){var o=new WebGLPlot.PlotLayers;o.collentionLayer=this.collentionLayer,e.primitives.add(o),e.plotLayers=o}this.overLayerPolylineCollection=new WebGLPlot.PolylineCollection,e.primitives.add(this.overLayerPolylineCollection)}_0x4786d3.getInstance=function(e){let t=_0x3b4e68.get(e._plottingID);return e&&!WebGLPlot.defined(t)&&(t=new _0x4786d3(e),_0x3b4e68.set(e._plottingID,t)),t},_0x4786d3.addBillboard=function(e,t){let i=_0x3b4e68.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.collentionLayer.dotBillboards.add(e)},_0x4786d3.removeBillboard=function(e,t){let i=_0x3b4e68.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.collentionLayer.dotBillboards.remove(e)},_0x4786d3.addDotModelAndVector=function(e,t){let i=_0x3b4e68.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.collentionLayer._dotModelAndVectorPrimitives.add(e)},_0x4786d3.removeDotModelAndVector=function(e,t){let i=_0x3b4e68.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.collentionLayer._dotModelAndVectorPrimitives.removeAndDestroy(e)},_0x4786d3.removeAllBillboard=function(e){let t=_0x3b4e68.get(e._plottingID);WebGLPlot.defined(t)&&null!==t&&t.collentionLayer.dotBillboards.removeAll()},_0x4786d3.addAlgoPloyline=function(e,t,i){let n=_0x3b4e68.get(i._plottingID);if(null===e)return n.collentionLayer.polylineCollection.add(t);if(WebGLPlot.defined(n)&&null!==n){var r=n.collentionLayer.polylineCollection.add(t);return e.Polylines.push(r),r}},_0x4786d3.removeAllAlgoPloyline=function(e,t){let i=_0x3b4e68.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i){for(var n in!e.Polylines&&e instanceof WebGLPlot.Polyline&&i.collentionLayer.polylineCollection.remove(e),e.Polylines)i.collentionLayer.polylineCollection.remove(e.Polylines[n]);e.Polylines=[]}},_0x4786d3.addAlgoLabel=function(e,t,i){let n=_0x3b4e68.get(i._plottingID);if(WebGLPlot.defined(n)&&null!==n){var r=n.collentionLayer.algoLabels.add(t);return e.Labels.push(r),r}},_0x4786d3.removeAllAlgoLabel=function(e,t){let i=_0x3b4e68.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i){for(var n in e.Labels)i.collentionLayer.algoLabels.remove(e.Labels[n]);e.Labels=[]}},_0x4786d3.setUpdatePrimitive=function(e,t){let i=_0x3b4e68.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&(i.collentionLayer.updatePrimitive=e)},_0x4786d3.setPolygonFillInstances=function(e,t,i){let n=_0x3b4e68.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.PolygonFillInstances[e]=t)},_0x4786d3.setWallInstances=function(e,t,i){let n=_0x3b4e68.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.WallInstances[e]=t)},_0x4786d3.setGroundInstances=function(e,t,i){let n=_0x3b4e68.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.GroundInstances[e]=t)},_0x4786d3.setScaneInstances=function(e,t,i){let n=_0x3b4e68.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.dynamicScaneInstances[e]=t,n.collentionLayer.updatePrimitive=!0)},_0x4786d3.setUseDepthTest=function(e,t){let i=_0x3b4e68.get(t._plottingID);var n=WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}});WebGLPlot.defined(i)&&null!==i&&(i.collentionLayer.polylineCollection._opaqueRS=n,i.collentionLayer.polylineCollection._translucentRS=n)},_0x4786d3.removeAll=function(e){let t=_0x3b4e68.get(e._plottingID);WebGLPlot.defined(t)&&WebGLPlot.defined(t.collentionLayer)&&(t.collentionLayer.polylineCollection.removeAll(),t.collentionLayer.algoLabels.removeAll(),t.collentionLayer.dotBillboards.removeAll(),t.collentionLayer.WallInstances=[],t.collentionLayer.PolygonFillInstances=[],t.collentionLayer.updatePrimitive=[],t.collentionLayer.GroundInstances=[],t.collentionLayer.dynamicScaneInstances=[])},_0x4786d3.addOverLayerPolyLine=function(e,t){let i=_0x3b4e68.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.overLayerPolylineCollection.add(e)},_0x4786d3.removeOverLayerPolyLine=function(e,t){let i=_0x3b4e68.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.overLayerPolylineCollection.remove(e)};var _0x1d2a45=(_0x2d198f=!0,function(e,t){var i=_0x2d198f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d198f=!1,i}),_0x297900=_0x1d2a45(void 0,(function(){return _0x297900.toString().search("(((.+)+)+)+$").toString().constructor(_0x297900).search("(((.+)+)+)+$")})),_0x2d198f;_0x297900();class _0x10d3db{constructor(e){this._visible=!1,this._isUsePlotVisible=WebGLPlot.defaultValue(e.isUsePlotVisible,!0),this._position=WebGLPlot.defaultValue(e.position,new _0x23de81(0,0,0)),this._rotate=WebGLPlot.defaultValue(e.rotate,new _0x23de81(0,0,0)),this._scale=WebGLPlot.defaultValue(e.scale,1),this._scene=e.scene,this._geoGraphicObject=e.geoGraphicObject}setIsUsePlotVisible(e){this._isUsePlotVisible=e}getIsUsePlotVisible(){return this._isUsePlotVisible}setScene(e){this._scene=e}setVisible(e){return!this._isUsePlotVisible&&(this._visible!==e&&(this._visible=e,e?this._addEffectToScene(this._options):this._removeEffectFromScene()),!0)}isVisible(){return this._visible}setGeoGraphicObject(e){this._geoGraphicObject=e}updateEffect(e){}_addEffectToScene(){}_removeEffectFromScene(){}destroy(){}toGeoJson(){return{}}fromGeoJson(e){}}var _0x521742=(_0x2d0421=!0,function(e,t){var i=_0x2d0421?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d0421=!1,i}),_0x574f0b=_0x521742(void 0,(function(){return _0x574f0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x574f0b).search("(((.+)+)+)+$")})),_0x2d0421;_0x574f0b();const _0x1ae6f5=2;class _0x2d9130{constructor(e){null!=e&&(e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._libID=WebGLPlot$e.defaultValue(e.libID,-1),this._code=WebGLPlot$e.defaultValue(e.code,-1),this._localPoints=WebGLPlot$e.defaultValue(e.localPoints,[]),this._symbolName=WebGLPlot$e.defaultValue(e.symbolName,""),this._symbolType=_0x1c668c.SYMBOL_UNKNOW,this._display=WebGLPlot$e.defaultValue(e.display,!0),this._id=WebGLPlot$e.createGuid(),this._showTipLength=WebGLPlot$e.defaultValue(e.showTipLength,100),this._markHalo=WebGLPlot$e.defaultValue(e.markHalo,!1),this._extendWallHeight=WebGLPlot$e.defaultValue(e.extendWallHeight,-1),this._isUseSymbolLibStyle=WebGLPlot$e.defaultValue(e.isUseSymbolLibStyle,!0),this._surroundRatioVal=WebGLPlot$e.defaultValue(e.surroundRatioVal,.002),this._isEdit=!1,this.isDrawing=WebGLPlot$e.defaultValue(e.isDrawing,!1),this._layer=WebGLPlot$e.defaultValue(e.layer,null),this._initialize=!1,this._primitive=[],this._symbolLibManager=WebGLPlot$e.getLibManager(this.layer._scene._plottingID),this._symbolStyle=WebGLPlot$e.defaultValue(e.symbolStyle,new _0x291171({graphicObject:this})),this._symbolTextStyle=WebGLPlot$e.defaultValue(e.symbolTextStyle,new _0x40b7f2({graphicObject:this})),this._serverData=WebGLPlot$e.defaultValue(e.serverData,null),this._textContent=WebGLPlot$e.defaultValue(e.textContent,""),this.readStyleFromSymbolLib(),this._GeoJsonFeature=null,this._extendProperty=new WebGLPlot$e.createProperty,this._annotationArray=WebGLPlot$e.defaultValue(e.annotationArray,[]),this._wholeHeight=WebGLPlot$e.defaultValue(e.wholeHeight,0),this._disableDepthTestDistance=Number.MAX_VALUE,this._dotDepthTest=!0,this._initSymbolFinished=new WebGLPlot$e.Event,this._geoEffectArray=[],this._geoEntity=void 0)}readStyleFromSymbolLib(){var e=this._serverData;WebGLPlot$e.defined(e)&&this._isUseSymbolLibStyle?(this._symbolType=this._serverData.symbolType,this._symbolName=WebGLPlot$e.defaultValue(e.symbolName,""),this._middleMarkExist=WebGLPlot$e.defaultValue(e.middleMarkExist,!1),this._symbolStyle._lineColor=WebGLPlot$e.defaultValue(_0x5e8252(e.style.lineColor),this._symbolStyle.lineColor),this._symbolStyle._fillForeColor=WebGLPlot$e.defaultValue(_0x5e8252(e.style.fillForeColor),this._symbolStyle.fillForeColor)):this.setSymbolName(this._code)}setGeoEntityShowMode(e){switch((!WebGLPlot$e.defined(this.__dotPlotLibID)||!WebGLPlot$e.defined(this.__dotPlotCode))&&(this.__dotPlotLibID=0,this.__dotPlotCode=_0x1c668c.SYMBOL_POINT),e){case _0x2bcc5b.Marker:if(""===this.modelPath)return;this._libID=0,this._code=_0x1c668c.SYMBOL_Model;break;case _0x2bcc5b.Picture:if(""===this.picturePath)return;this._libID=0,this._code=_0x1c668c.SYMBOL_PICTURE;break;case _0x2bcc5b.Grid:case _0x2bcc5b.Vector:if(this._libID=this.__dotPlotLibID,this._code=this.__dotPlotCode,0===this.__dotPlotLibID)this._code===_0x1c668c.SYMBOL_POINT&&this.__initSymbolPointSymbolData();else{let t=this;const i=WebGLPlot$e.getLibManager(this.layer._scene._plottingID).getSymbolLibByLibId(this._libID);if(WebGLPlot$e.defined(i)){const n=i.getSymbolData(this._code);WebGLPlot$e.defined(n)?(this._serverData=n,this.readStyleFromSymbolLib(),this._getServerDataPrototype(n)):this.getServerData(this._libID,this._code,(function(){t.readStyleFromSymbolLib(),t._getServerDataPrototype(t._serverData),t._initialize=!1,t.showMode=e}))}else this.getServerData(this._libID,this._code,(function(){t.readStyleFromSymbolLib(),t._getServerDataPrototype(t._serverData),t._initialize=!1,t.showMode=e}))}}this.showMode===e&&(this._initialize=!1),this.showMode=e}getGeoEntityShowMode(){return this._showMode}setGeoEntity(e){this._geoEntity=e}getGeoEntity(){return this._geoEntity}createSymbol(){_0x1c668c.SYMBOL_UNKNOW!==this._symbolType&&(_0x1c668c.SYMBOL_DOT,this._symbolType,WebGLPlot$e.defined(this._symbol))}setSymbolName(e){switch(e){case _0x1c668c.SYMBOL_POLYLINE:this._symbolName=WebGLPlot$e.plotI18n("polyLine");break;case _0x1c668c.SYMBOL_RECTANGLE:this._symbolName=WebGLPlot$e.plotI18n("rectangle");break;case _0x1c668c.SYMBOL_PARALLELOGRAM:this._symbolName=WebGLPlot$e.plotI18n("parallelogram");break;case _0x1c668c.SYMBOL_CIRCLE:this._symbolName=WebGLPlot$e.plotI18n("circle");break;case _0x1c668c.SYMBOL_ELLIPSE:this._symbolName=WebGLPlot$e.plotI18n("ellipse");break;case _0x1c668c.SYMBOL_ARBITRARYPOLYGON:this._symbolName=WebGLPlot$e.plotI18n("polygon");break;case _0x1c668c.SYMBOL_TEXT:this._symbolName=WebGLPlot$e.plotI18n("text");break;case _0x1c668c.SYMBOL_ARC:this._symbolName=WebGLPlot$e.plotI18n("arc");break;case _0x1c668c.SYMBOL_PARALLELLINE:this._symbolName=WebGLPlot$e.plotI18n("parallel");break;case _0x1c668c.SYMBOL_TRAPEZOID:this._symbolName=WebGLPlot$e.plotI18n("trapezoid");break;case _0x1c668c.SYMBOL_POLYBEZIERCLOSED:this._symbolName=WebGLPlot$e.plotI18n("closedBesselCurve");break;case _0x1c668c.SYMBOL_CHORD:this._symbolName=WebGLPlot$e.plotI18n("chord");break;case _0x1c668c.SYMBOL_PIE:this._symbolName=WebGLPlot$e.plotI18n("sector");break;case _0x1c668c.SYMBOL_KIDNEY:this._symbolName=WebGLPlot$e.plotI18n("kidney");break;case _0x1c668c.SYMBOL_BRACE:this._symbolName=WebGLPlot$e.plotI18n("brace");break;case _0x1c668c.SYMBOL_REGULARPOLYGON:this._symbolName=WebGLPlot$e.plotI18n("regularPolygon");break;case _0x1c668c.SYMBOL_POLYBEZIER:this._symbolName=WebGLPlot$e.plotI18n("bezier");break;case _0x1c668c.SYMBOL_RUNWAY:this._symbolName=WebGLPlot$e.plotI18n("runway");break;case _0x1c668c.SYMBOL_CURVEEIGHT:this._symbolName=WebGLPlot$e.plotI18n("curveEight");break;case _0x1c668c.SYMBOL_CONCENTRICCIRCLE:this._symbolName=WebGLPlot$e.plotI18n("concentricCircle");break;case _0x1c668c.SYMBOL_COMBINATIONALCIRCLE:this._symbolName=WebGLPlot$e.plotI18n("combinedCircle");break;case _0x1c668c.SYMBOL_NODECHAIN:this._symbolName=WebGLPlot$e.plotI18n("nodeChain");break;case _0x1c668c.SYMBOL_CIRCLECHORD:this._symbolName=WebGLPlot$e.plotI18n("chord");break;case _0x1c668c.SYMBOL_CIRCLEPIE:this._symbolName=WebGLPlot$e.plotI18n("sector");break;case _0x1c668c.SYMBOL_CIRCLEARC:this._symbolName=WebGLPlot$e.plotI18n("arc");break;case _0x1c668c.SYMBOL_Model:this._symbolName=WebGLPlot$e.plotI18n("SYMBOL_Model");break;case _0x1c668c.SYMBOL_POINT:this._symbolName=WebGLPlot$e.plotI18n("SYMBOL_POINT")}}setVisible(e){if(0!==this._primitive.length)for(var t=0;t<this._primitive.length;t++)this._primitive[t].show=e;WebGLPlot$e.defined(this._layer.selectedFeature)&&this.id===this._layer.selectedFeature.id&&!this.display&&this._layer._plottingEdit&&this._layer._plottingEdit.releaseSelection(!0),!this.billboard||this.showMode!==_0x2bcc5b.Grid&&this.showMode!==_0x2bcc5b.Picture?this._initialize=!1:this.billboard.show=e}getServerData(e,t,i){var n=this,r=WebGLPlot$e.getLibManager(this.layer._scene._plottingID);var o=WebGLPlot$e.getServerData(e,t,void 0,this._layer._scene._plottingID);!o||(o.getSymbolInfo.events.on({processCompleted:function(t){-1!==t.result.libID&&-1!==t.result.code&&(n._serverData=t.result,r.setSymbolData(e,t.result),i())},processFailed:function(){},scope:n}),o.getSymbolInfo.processAsync(o.getSymbolInfoParameters))}addGeoEffect(e){if(e instanceof _0x10d3db)return this._geoEffectArray.forEach((t=>{if(t.id===e.id)return this._geoEffectArray})),this._geoEffectArray.push(e),e.setGeoGraphicObject(this),this._geoEffectArray}getGeoEffectArray(){return this._geoEffectArray}getGeoEffectByID(e){if(!WebGLPlot$e.defined(e))return!1;for(let t=0;t<this._geoEffectArray.length;t++){const i=this._geoEffectArray[t];if(e===i.id)return i}}removeGeoEffectByIndex(e){return e>=0&&e<this._geoEffectArray.length&&(this._geoEffectArray[e].destroy(),this._geoEffectArray[e]=void 0,this._geoEffectArray.splice(e,1),!0)}removeGeoEffectByID(e){if(!WebGLPlot$e.defined(e))return!1;for(let t=0;t<this._geoEffectArray.length;t++){if(e===this._geoEffectArray[t].id)return this._geoEffectArray[t].destroy(),this._geoEffectArray[t]=void 0,this._geoEffectArray.splice(t,1),!0}return!1}removeAllGeoEffect(){this._geoEffectArray.forEach((e=>{e.destroy(),e=void 0})),this._geoEffectArray=[]}__setEffectParameter(e,t){WebGLPlot$e.defined(t)&&t>=0&&t<this._geoEffectArray.length?this._geoEffectArray[t].updateEffect(e):this._geoEffectArray.forEach((t=>{t.updateEffect(e)}))}mergeDefaultStyle(){var e=WebGLPlot$e.getDefaultStyle({libID:this._libID,code:this._code});if(e&&e.defaultFlag){var t=e.symbolStyle,i=e.symbolTextStyle,n=e.gridSymbolSize;this._symbolStyle=t.clone(),this._symbolStyle._graphicObject=this,this._symbolTextStyle=i.clone(),_0x1c668c.SYMBOL_DOT===this.symbolType&&(-1!==e.lineSymbolID&&(this.lineSymbolID=e.lineSymbolID),-1!==e.gridLineWidth&&(this.gridLineWidth=e.gridLineWidth),n.x>0&&n.y>0&&(this.gridSymbolSize=e.gridSymbolSize.clone()),""!==e.modelPath&&(this.modelPath=e.modelPath))}}update(e,t,i,n){if(this._display&&0!==this._primitive.length)for(var r=0;r<this._primitive.length;r++)this._primitive[r].update(e)}initSymbol(){}getSymbolData(e){WebGLPlot$e.defined(e)||(e=!0);var t={};if(t.version=_0x1ae6f5,t.hasOwnProperty("type")||(t.type="GRAPHICOBJECT"),t.hasOwnProperty("libID")||(t.libID=this._libID),t.hasOwnProperty("code")||(t.code=this._code),t.hasOwnProperty("dotPlotLibID")||(t.dotPlotLibID=this.__dotPlotLibID),t.hasOwnProperty("dotPlotCode")||(t.dotPlotCode=this.__dotPlotCode),t.hasOwnProperty("localePoints")||(t.localePoints=this.localPoints),t.hasOwnProperty("symbolName")||(t.symbolName=this.symbolName),t.hasOwnProperty("symbolType")||(t.symbolType=this.symbolType),t.hasOwnProperty("uuid")||(t.uuid=this.id),t.hasOwnProperty("isEdit")||(t.isEdit=!1),t.hasOwnProperty("scaleByMap")||(t.scaleByMap=!1),t.hasOwnProperty("wholeHeight")||(t.wholeHeight=this.wholeHeight),!t.hasOwnProperty("style")){var i=new Object;t.style=i,i.lineColor=_0x51e327(this.symbolStyle.lineColor),i.fillSymbolID=this.symbolStyle._fillSymbolID,i.fillBackColor=_0x51e327(this.symbolStyle._fillBackColor),i.fillForeColor=_0x51e327(this.symbolStyle._fillForeColor),i.fillBackOpaque=this.symbolStyle._fillBackOpaque,i.fillGradientMode=this.symbolStyle._fillGradientMode,i.fillCenterOffsetX=this.symbolStyle.fillGradientOffsetRatioX,i.fillCenterOffsetY=this.symbolStyle.fillGradientOffsetRatioY,i.fillAngle=this.symbolStyle.fillGradientAngle,i.fillOpaqueRate=100-this.symbolStyle.fillOpaqueRate,i.lineWidth3D=this.symbolStyle.lineWidth,t.style.hasOwnProperty("display")||(this._display?i.display="display":i.display="none"),t.style=i}if(!t.hasOwnProperty("textStyle2D")){var n=new Object;n.fontHeight=25.4*this._symbolTextStyle.fontSize/96,n.foreColor=_0x51e327(this._symbolTextStyle._foreColor),n.backColor=_0x51e327(this._symbolTextStyle._backColor),n.outline=this._symbolTextStyle._outline,n.fontStrokeColor=_0x51e327(this._symbolTextStyle._backColor),n.backOpaque=this.symbolTextStyle.isShowTextBox,n.fontBackgroundColor=_0x51e327(this.symbolTextStyle.textBoxLineColor),n.fontName=this._symbolTextStyle._fontName,n.italic=this._symbolTextStyle._italic,n.bold=this._symbolTextStyle._bold,n.align=this._symbolTextStyle._align,n.italicAngle=this._symbolTextStyle._italicAngle,n.shadow=this._symbolTextStyle._shadow,n.sizeFixed=this._symbolTextStyle._sizeFixed,n.underline=this._symbolTextStyle._underline,n.rotation=this._symbolTextStyle._rotation,n.strikeout=this._symbolTextStyle._strikeout,n.borderSpacingWidth=this._symbolTextStyle._borderSpacingWidth,n.outlineWidth=25.4*this._symbolTextStyle._outlineWidth/96,n.fontWidth=this._symbolTextStyle._fontWidth,n.opaqueRate=this._symbolTextStyle._opaqueRate,n.stringAlignment=this._symbolTextStyle._stringAlignment,n.fontScale=this._symbolTextStyle._text3DScale,n.fontWeight=this._symbolTextStyle._fontWeight,t.textStyle2D=n}if(!t.hasOwnProperty("textStyle3D")){var r=new Object;r.foreColor=_0x51e327(this.symbolTextStyle.foreColor),r.backColor=_0x51e327(this.symbolTextStyle.backColor),r.outline=this.symbolTextStyle.outline,r.textBoxColor=this.symbolTextStyle.textBoxColor,r.textBoxLineColor=this.symbolTextStyle.textBoxLineColor,r.fontName=this.symbolTextStyle.fontName,r.italic=this.symbolTextStyle.italic,r.bold=this.symbolTextStyle.bold,r.align=this.symbolTextStyle.align,r.fontSize=this.symbolTextStyle.fontSize,r.isShowTextBox=this.symbolTextStyle.isShowTextBox,t.textStyle3D=r}if(t.hasOwnProperty("surroundLineColor")||(t.surroundLineColor=_0x51e327(this.symbolStyle.surroundLineColor)),t.hasOwnProperty("surroundLineWidth2D")||(t.surroundLineWidth2D=.5),t.hasOwnProperty("surroundLineType")||(t.surroundLineType=this.symbolStyle.surroundLineType),_0x1c668c.SYMBOL_DOT===this._symbolType||_0x1c668c.SYMBOL_Model===this._symbolType||_0x1c668c.SYMBOL_PICTURE===this._symbolType)t.hasOwnProperty("showMode")||(t.showMode=this.showMode),t.hasOwnProperty("scale3D")||(t.scale3D=this._scale),t.hasOwnProperty("rotate3D")||(t.rotate3D=this._rotate),t.hasOwnProperty("positionOffset")||(t.positionOffset=this._hasDragLine),t.hasOwnProperty("dragPoint")||(t.dragPoint=this.dragPoint),t.hasOwnProperty("symbolRank")||(t.symbolRank=this._symbolRank),t.hasOwnProperty("anchorPoint")||(t.anchorPoint=this.anchorPoint),t.hasOwnProperty("middleMarkBounds")||(t.middleMarkBounds=this.middleMarkBounds),t.hasOwnProperty("negativeImage")||(t.negativeImage=this._isNegativeImage),t.hasOwnProperty("symbolSize")||(t.symbolSize=this._symbolSize),t.hasOwnProperty("gridSymbolSize")||(t.gridSymbolSize=this._gridSymbolSize),t.hasOwnProperty("pictureSymbolSize")||(t.pictureSymbolSize=this._pictureSymbolSize),t.hasOwnProperty("picturePath")||(t.picturePath=this.picturePath),t.hasOwnProperty("modelPath")||(t.modelPath=this.modelPath),t.hasOwnProperty("modelScale")||(t.modelScale=this.modelScale),t.hasOwnProperty("modelRotate")||(t.modelRotate=this._modelRotate),t.hasOwnProperty("vectorScale")||(t.vectorScale=this.vectorScale),t.hasOwnProperty("middleMarkExist")||(t.middleMarkExist=this._isMiddleMarkExist),t.hasOwnProperty("middleMarkBounds")||(t.middleMarkBounds=this._middleMarkBounds),t.hasOwnProperty("vectorRotate")||(t.vectorRotate=this._vectorRotate),t.hasOwnProperty("vectorDefaultSize")||(t.vectorDefaultSize=this._vectorDefaultSize),t.hasOwnProperty("dotShowMode")||(t.dotShowMode=this._showMode),t.hasOwnProperty("innerCells")||(t.innerCells=this._innerCells),t.hasOwnProperty("surroundLineWidth3D")||(t.surroundlineWidth3D=this.surroundLineWidth),t.hasOwnProperty("middleMarkExist")||(t.middleMarkExist=this.middleMarkExist),t.hasOwnProperty("annotationPosition")||(t.annotationPosition=this._textPos),t.hasOwnProperty("gridSurroundLineWidth3D")||(t.gridSurroundLineWidth3D=this._gridSurroundLineWidth/4),t.hasOwnProperty("gridLineWidth")||(t.gridLineWidth3D=this._gridLineWidth/4),t.hasOwnProperty("symbolSizeInLib")||(t.symbolSizeInLib=this._symbolSizeInLib),t.hasOwnProperty("BloodVolumes")||(t.BloodVolumes=this.BloodVolumes),t.hasOwnProperty("bIsShowBloodVolume")||(t.bIsShowBloodVolume=this.bIsShowBloodVolume),t.hasOwnProperty("disableDepthTestDistance")||(t.disableDepthTestDistance=this._disableDepthTestDistance.toString()),t.hasOwnProperty("sizeInMeters")||(t.sizeInMeters=this.sizeInMeters),t.hasOwnProperty("symbolSizeInMeters")||(t.symbolSizeInMeters=this.symbolSizeInMeters),t.hasOwnProperty("alwaysHasMiddelText")||(t.alwaysHasMiddelText=this.alwaysHasMiddelText),t.style.hasOwnProperty("lineSymbolID")||(t.style.lineSymbolID=this._lineSymbolID);else{if(t.hasOwnProperty("surroundLineWidth3D")||(t.surroundlineWidth3D=this._symbolStyle._surroundLineWidth),t.hasOwnProperty("updateSubSize")||(t.updateSubSize=this._updateSubSize),t.hasOwnProperty("subSymbolSize")||(t.subSymbolSize=this._subSymbolSize),!t.hasOwnProperty("subSymbols")&&(t.subSymbols=[],this._subSymbols))for(var o=0;o<this._subSymbols.length;++o)t.subSymbols.push(this._subSymbols[o]);t.hasOwnProperty("scaleValues")||(t.scaleValues=this._scaleValues),t.hasOwnProperty("subSymbolScaleValue")||(t.subSymbolScaleValue=this._subSymbolScaleValue),t.hasOwnProperty("extendWallOpacity")||(t.wallOpaqueRate=100-this.extendWallOpacity),!t.hasOwnProperty("isClampToGround")&&WebGLPlot$e.defined(this.isClampToGround)&&(t.isClampToGround=this.isClampToGround),!t.hasOwnProperty("arrowHeadType")&&WebGLPlot$e.defined(this.arrowHeadType)&&(t.arrowHeadType=this.arrowHeadType),!t.hasOwnProperty("arrowBodyType")&&WebGLPlot$e.defined(this.arrowBodyType)&&(t.arrowBodyType=this.arrowBodyType),!t.hasOwnProperty("arrowTailType")&&WebGLPlot$e.defined(this.arrowTailType)&&(t.arrowTailType=this.arrowTailType),t.style.hasOwnProperty("extendWallHeight")||(t.style.extendHeight=this._extendWallHeight)}return(this._symbolType!==_0x1c668c.SYMBOL_DOT||this._symbolType!==_0x1c668c.SYMBOL_TEXT)&&(t._CenterPosition=this._CenterPosition),t.hasOwnProperty("textContent")||(t.textContent=this._textContent),t.hasOwnProperty("markHalo")||(t.markHalo=this._markHalo),t.hasOwnProperty("showTipLength")||(t.showTipLength=this._showTipLength),t.hasOwnProperty("extendProperty")||(t.extendProperty=this.extendProperty),t.hasOwnProperty("annotationArray")||(t.annotationArray=this.annotationArray),null!==this._GeoJsonFeature?(_0x542bef(this._GeoJsonFeature,t),this._GeoJsonFeature):t}toGeoJson(){var e=this.getSymbolData();return WebGLPlot$e.toJSON(e)}getMinEditPts(){return WebGLPlot$e.defined(this)?_0x2909c1.isSymbolDot(this._symbolType)?1:this.getMinEditPts():0}getMaxEditPts(){return WebGLPlot$e.defined(this)?_0x2909c1.isSymbolDot(this._symbolType)?1:this.getMaxEditPts():0}drawAnnotationArray(){if(this._annotationArray.length>0)for(var e=0;e<this._annotationArray.length;e++){var t=null,i=this._annotationArray[e];if(""!==i._textContent&&i){var n=i._textStyle,r=i._textContent,o=new WebGLPlot$e.Color(n._foreColor.red,n._foreColor.green,n._foreColor.blue,n._foreColor.alpha),a=n._fontSize+"px "+n._fontName;0!==i._localPoint.x&&0!==i._localPoint.y?t=i._localPoint:(t=this._localPoints[0].clone(),i._localPoint=t),t=WebGLPlot$e.Cartesian3.fromDegrees(t.x,t.y,t.z);var s={style:n._outline?WebGLPlot$e.LabelStyle.FILL_AND_OUTLINE:WebGLPlot$e.LabelStyle.FILL,outlineColor:n._outlineColor,outlineWidth:n._outlineWidth,position:t,text:r,font:a,fillColor:o,horizontalOrigin:WebGLPlot$e.HorizontalOrigin.CENTER,id:this._id};(s=_0x4786d3.addAlgoLabel(this,s,this._layer._scene)).SymbolType=_0x1c668c.SYMBOL_TEXT}}}clearAllAnnotationArray(){this.annotationArray=[]}setAnnotationArray(e,t,i){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t)||!WebGLPlot$e.defined(i)||this.annotationArray.length<=0)return!1;var n=this.annotationArray[e];switch(t){case"textContent":n.textContent=i;break;case"localPoint":n.localPoint=i;break;case"fontName":n._textStyle.fontName=i;break;case"foreColor":n._textStyle.foreColor=i;break;case"fontSize":n._textStyle.fontSize=i;break;case"outlineWidth":n._textStyle.outlineWidth=i;break;case"outlineColor":n._textStyle.outlineColor=i;break;case"outline":n._textStyle.outline=i}return this._initialize=!1,!0}releaseSelection(){this.layer&&this.layer._plottingEdit&&this.layer._plottingEdit.unSelection(!0)}_destroy(){}_destroyBase(){}}function _0x542bef(e,t){for(var i in t)"style"===i||"textStyle2D"===i||"textStyle3D"===i||(e[i]=t[i]);var n=new Object;for(var i in t.style)n[i]=t.style[i];e.style=n;var r=new Object;for(var i in t.textStyle2D)r[i]=t.textStyle2D[i];e.textStyle2D=r;var o=new Object;for(var i in t.textStyle3D)o[i]=t.textStyle3D[i];e.textStyle3D=o}function _0x5e8252(e){var t=new WebGLPlot$e.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,t}function _0x51e327(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}Object.defineProperties(_0x2d9130.prototype,{libID:{get:function(){return this._libID},set:function(e){if(e===this._libID||"number"!=typeof e)return!1;this._libID=e}},code:{get:function(){return this._code},set:function(e){if(e===this._code||"number"!=typeof e)return!1;this._code=e}},symbolName:{get:function(){return this._symbolName},set:function(e){if(e===this._symbolName)return!1;this._symbolName=e}},symbolType:{get:function(){return this._symbolType}},id:{get:function(){return this._id},set:function(e){e!==this._id&&(this._id=e)}},localPoints:{get:function(){return this._localPoints},set:function(e){e===this._localPoints||!Array.isArray(e)||(this.__setEffectParameter({point:e[0]}),this._localPoints=e,_0x2909c1.isSymbolDot(this.symbolType)&&WebGLPlot$e.defined(this.billboard)?this.billboard.position=WebGLPlot$e.Cartesian3.fromDegrees(e[0].x,e[0].y,e[0].z):this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this),this._layer&&this._layer._isEditable&&this._layer._plottingEdit&&this._layer._plottingEdit._graphicObject&&this._layer._plottingEdit._graphicObject.id===this.id&&this._layer._plottingEdit.drawSymbolExtend(this))}},layer:{get:function(){return this._layer}},isEdit:{get:function(){return this._isEdit},set:function(e){e===this._isEdit||e.constructor!==Boolean||(this._isEdit=e,this._initialize=!1)}},middleMarkExist:{get:function(){return this._middleMarkExist}},symbolStyle:{get:function(){return this._symbolStyle},set:function(e){e===this._symbolStyle||"number"!=typeof e||(this._symbolStyle=e,this._initialize=!1)}},symbolTextStyle:{get:function(){return this._symbolTextStyle},set:function(e){e===this._symbolTextStyle||"number"!=typeof e||(this._symbolTextStyle=e,this._initialize=!1)}},markHalo:{get:function(){return this._markHalo},set:function(e){e===this._markHalo||e.constructor!==Boolean||(this._markHalo=e,this._initialize=!1)}},showTipLength:{get:function(){return this._showTipLength},set:function(e){e===this._showTipLength||"number"!=typeof e||(this._showTipLength=e,this._initialize=!1)}},display:{get:function(){return this._display},set:function(e){e===this._display||e.constructor!==Boolean||(this._display=e,this.setVisible(e),this.__setEffectParameter({visible:e}))}},symbol:{get:function(){return this}},extendProperty:{get:function(){return this._extendProperty}},annotationArray:{get:function(){return this._annotationArray},set:function(e){if(e===this._annotationArray||!Array.isArray(e))return null;var t=this._layer._plottingEdit.CtrlPosition._ctrlPoints;if(this._annotationArray=e,WebGLPlot$e.defined(e.length)&&0===e.length){if(WebGLPlot$e.defined(this._layer._plottingEdit))for(var i=0;i<t.length;i++){var n=t.get(i);WebGLPlot$e.defined(n.annotationIndex)&&(n.show=!1)}}else if(WebGLPlot$e.defined(e.length)&&0!==e.length){const i=this._layer._scene.camera._positionCartographic.height;if(this._isEdit&&WebGLPlot$e.defined(this._layer._plottingEdit)){for(var r=0;r<t.length;r++)WebGLPlot$e.defined(t.get(r).annotationIndex)&&(t.get(r).show=!1,t.remove(t.get(r)));for(var o=0;o<e.length;o++){var a=e[o];if(0===a._localPoint.x&&0===a._localPoint.y){const e=1.141e-8*i*(o+1);let t=this._localPoints[0].clone();t.x+=e,a._localPoint=t}this._layer._plottingEdit.addAnnotationArrayPositionPt(a,o)}}}this._initialize=!1}},wholeHeight:{get:function(){return this._wholeHeight},set:function(e){e===this._wholeHeight||"number"!=typeof e||(this._wholeHeight=e,this._initialize=!1)}},dotDepthTest:{get:function(){return this._dotDepthTest},set:function(e){e===this._dotDepthTest||e.constructor!==Boolean||(this._disableDepthTestDistance=e?Number.MAX_VALUE:Number.MIN_VALUE,this._dotDepthTest=e,this._initialize=!1)}},textContent:{get:function(){return this._textContent},set:function(e){e!==this._textContent&&(this._textContent=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}}});var _0x2bddfb=(_0x2ef029=!0,function(e,t){var i=_0x2ef029?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ef029=!1,i}),_0x57f709=_0x2bddfb(void 0,(function(){return _0x57f709.toString().search("(((.+)+)+)+$").toString().constructor(_0x57f709).search("(((.+)+)+)+$")})),_0x2ef029;function _0x8c2e6e(e,t){this.subObjects=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._id=void 0===t?WebGLPlot.createGuid():t,this._initialize=!0,this.subFeatures=[],this.symbolName="GroupObject",this._isEdit=!1,this.libID=0,this.code=_0x1c668c.GROUPOBJECT,this.symbolType=_0x1c668c.GROUPOBJECT,this.addComponents(this.subObjects),this._GeoJsonFeature=null,this._centerPt3D=new _0x23de81}_0x57f709(),_0x8c2e6e.prototype.addComponents=function(e){for(var t in e)e[t]&&(e[t]instanceof _0x2d9130||e[t]instanceof _0x8c2e6e)&&this.subFeatures.push(e[t].clone());this._initialize=!1},_0x8c2e6e.prototype.unGroupObject=function(e){for(var t in this.subObjects)this.subObjects[t]._initialize=!1;return this.subObjects},_0x8c2e6e.prototype.setOffset=function(e,t){var i=e.z-this.getBounds().min_Z;for(var n in this.subFeatures){if(t)for(var r=0;r<this.subFeatures[n]._localPoints.length;r++)this.subFeatures[n]._localPoints[r].z+=i;else for(r=0;r<this.subFeatures[n]._localPoints.length;r++){var o=this.subFeatures[n]._localPoints[r];this.subFeatures[n]._localPoints[r]=new _0x23de81(o.x+e.x,o.y+e.y,o.z+e.z)}this.subFeatures[n]._initialize=!1}},_0x8c2e6e.prototype.clone=function(){return new _0x8c2e6e(this.subFeatures)},_0x8c2e6e.prototype.update=function(e,t,i,n){if(0!==this.subFeatures.length)for(var r=this.getSubObjectsFromFeatures(this.subFeatures),o=0;o<r.length;o++)r[o].update(e,t,i,n)},_0x8c2e6e.prototype.initSymbol=function(){if(0!==this.subFeatures.length)for(var e=this.getSubObjectsFromFeatures(this.subFeatures),t=0;t<e.length;t++)e[t].initSymbol();this._initialize=!0},_0x8c2e6e.prototype.getFeatureByUuid=function(e){var t=this.getSubObjectsFromFeatures(this.subFeatures);for(var i in t)if(t[i]._id===e)return!0;return!1},_0x8c2e6e.prototype.getBounds=function(){var e=[],t=[],i=[],n=0,r=0;for(var o in this.subFeatures){var a=this.subFeatures[o];if(a.symbolType===_0x1c668c.SYMBOL_DOT||a.symbolType===_0x1c668c.SYMBOL_TEXT){a.showMode===_0x2bcc5b.Marker?n=a._model._initialRadius*a._model.scale:a.showMode===_0x2bcc5b.Vector&&(n=a._dotVector.vectorHeight);var s=a.localPoints[0];e.push(s.x),t.push(s.y),i.push(s.z),r=s.z+n}else if(a.symbolType===_0x1c668c.GROUPOBJECT){var l=a.getBounds();e.push(l.max_X),t.push(l.max_Y),i.push(l.max_Z),e.push(l.min_X),t.push(l.min_Y),i.push(l.min_Z)}else{var u=a.computeBounds();for(var c in a.localPoints){var h=a.localPoints[c];e.push(h.x),t.push(h.y),i.push(h.z)}e.push(u.maxX),t.push(u.maxY),e.push(u.minX),t.push(u.minY)}}var d=Math.max.apply({},e),f=Math.max.apply({},t),p=Math.max.apply({},i);return{max_X:d,max_Y:f,max_Z:p=p>r?p:r,min_X:Math.min.apply({},e),min_Y:Math.min.apply({},t),min_Z:Math.min.apply({},i),modelRadius:n}},_0x8c2e6e.prototype.getSubObjectsFromFeatures=function(e){var t=[];for(var i in e)e[i]instanceof _0x8c2e6e?t=t.concat(this.getSubObjectsFromFeatures(e[i].subFeatures)):t.push(e[i]);return t},_0x8c2e6e.prototype.getSymbolData=function(){if(null===this._GeoJsonFeature){var e={version:2,libID:0,code:1e3,type:"GRAPHICOBJECT"};for(var t in e.uuid=this._id,e.symbolName=this.symbolName,e.symbolType=this.symbolType,e.geometries=[],this.subFeatures)e.geometries.push(this.subFeatures[t].getSymbolData());return e}return this._GeoJsonFeature},_0x8c2e6e.prototype._destroy=function(){for(var e in this.subFeatures)this.subFeatures[e]._destroy(),this.subFeatures[e]=null;this.subFeatures=[]};var _0x11e1ba=(_0x38c8d3=!0,function(e,t){var i=_0x38c8d3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38c8d3=!1,i}),_0x40757b=_0x11e1ba(void 0,(function(){return _0x40757b.toString().search("(((.+)+)+)+$").toString().constructor(_0x40757b).search("(((.+)+)+)+$")})),_0x38c8d3;_0x40757b();var _0x3d2525={UNKNOWN:0,PLAYING:1,PAUSE:2,STOP:3,RESET:4},_0x577f4c=Object.freeze(_0x3d2525),_0x5f90b1=(_0x224ba7=!0,function(e,t){var i=_0x224ba7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x224ba7=!1,i}),_0xefef14=_0x5f90b1(void 0,(function(){return _0xefef14.toString().search("(((.+)+)+)+$").toString().constructor(_0xefef14).search("(((.+)+)+)+$")})),_0x224ba7;_0xefef14();var _0x90363a={ANIMATION_UNKNOWN:-1,ANIMATION_WAY:0,ANIMATION_BLINK:1,ANIMATION_ATTRIBUTE:2,ANIMATION_SHOW:3,ANIMATION_ROTATE:4,ANIMATION_SCALE:5,ANIMATION_GROW:6,ANIMATION_HIDE_EXP:12,ANIMATION_REDUCE_EXP:13,ANIMATION_MOVEIN_EXP:14,ANIMATION_MOVEOUT_EXP:15,ANIMATION_ZOOMIN_EXP:16,ANIMATION_ZOOMOUT_EXP:17,ANIMATION_CURVE_EXP:18,ANIMATION_BROKENLINE_EXP:19,ANIMATION_GROW_EXP:20,ANIMATION_WAY_EXP:21,ANIMATION_BLINK_EXP:22,ANIMATION_SHOW_EXP:23,ANIMATION_MOVEVIEW_EXP:24,ANIMATION_WAY_GROUP:25},_0x144579=Object.freeze(_0x90363a),_0x50ff62=(_0x28fc9a=!0,function(e,t){var i=_0x28fc9a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28fc9a=!1,i}),_0x1bf86b=_0x50ff62(void 0,(function(){return _0x1bf86b.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bf86b).search("(((.+)+)+)+$")})),_0x28fc9a;_0x1bf86b();var WebGLPlot$d=window.WebGLPlot=window.WebGLPlot||{};function _0x34cdef(e,t){if(e&&!(t.points.length<2)){this.plottingLayer=WebGLPlot$d.defaultValue(e,null),this.libID=WebGLPlot$d.defaultValue(t.libID,0),this.code=WebGLPlot$d.defaultValue(t.code,99999),this.url=WebGLPlot$d.defaultValue(t.url,""),this.startTime=WebGLPlot$d.defaultValue(t.startTime,0),this.duration=WebGLPlot$d.defaultValue(t.duration,5),this.lineColor=WebGLPlot$d.defaultValue(t.lineColor,new WebGLPlot$d.Color(1,0,0,1)),this.lineWidth=WebGLPlot$d.defaultValue(t.lineWidth,1),this.linePtsCount=WebGLPlot$d.defaultValue(t.linePtsCount,100),this.pathType=WebGLPlot$d.defaultValue(t.pathType,0),this.isShowPathLine=WebGLPlot$d.defaultValue(t.isShowPathLine,!1),this.isTangentDirection=WebGLPlot$d.defaultValue(t.isTangentDirection,!0),this.PathPts=t.points;var i=this;if(0===this.libID&&99999===this.code){var n={libID:this.libID,code:this.code,url:this.url,points:this.PathPts};e.createModelAndPicture(n,(function(e){e.feature&&(i.geo=e.feature)}))}else e.createSymbol(t.libID,t.code,t.points,(function(e){e.feature&&(i.geo=e.feature,i.geo.modelPath=t.url,i.geo.showMode=_0x2bcc5b.Marker)}));this._updatePathLinePts=[],this.Polylines=[],this.createPathLine()}}_0x34cdef.prototype.setPathLineisVisible=function(e){this.isShowPathLine=e},_0x34cdef.prototype.getPathLineisVisible=function(){return this.isShowPathLine},_0x34cdef.prototype.setTangentDirection=function(e){this.isTangentDirection=e},_0x34cdef.prototype.getTangentDirection=function(){return this.isTangentDirection},_0x34cdef.prototype.play=function(){var e=new Date;this._animationState===_0x577f4c.PAUSE?this._innerStartTime+=e.getTime()/1e3-this._pauseTime:this._innerStartTime=e.getTime()/1e3,this._updatePathLinePts=[],this._lastExecute=!1,this._animationState=_0x577f4c.PLAYING},_0x34cdef.prototype.pause=function(){if(this._animationState===_0x577f4c.PLAYING){this._animationState=_0x577f4c.PAUSE;var e=new Date;this._pauseTime=e.getTime()/1e3}},_0x34cdef.prototype.stop=function(){this._animationState=_0x577f4c.STOP},_0x34cdef.prototype.execute=function(){if(!this.geo||!this.canExecute())return!1;this.polyline&&(this.polyline.show=this.isShowPathLine);var e=this._ratio,t=new Object;if(!((t=this._findPos(e,this._shapePoints,t))&&t.pt instanceof _0x23de81))return!1;this.geo.localPoints[0]=this.PtsToSpherical(t.pt);var i=t.index;if(this.isTangentDirection){t.angle;var n=this.modifyAnimationFollowPath(this._shapePoints,i,t.pt),r=57.29577951308232,o=this.geo.showMode;_0x2bcc5b.Marker===o?this.geo._modelRotate=new _0x23de81(n.x*r,n.y*r,n.z*r):_0x2bcc5b.Vector===o&&(this.geo._vectorRotate=n)}return this.geo._initialize=!1,!0},_0x34cdef.prototype.updatePathLine=function(e){this._updatePathLinePts.length>=this.linePtsCount&&this._updatePathLinePts.splice(0,1),this._updatePathLinePts.push(e);var t=WebGLPlot$d.Material.fromType(WebGLPlot$d.Material.ColorType,{color:this.lineColor});this.polyline&&(this.polyline.positions=this._updatePathLinePts,this.polyline.width=this.lineWidth,this.polyline._material=t)},_0x34cdef.prototype.createPathLine=function(){this.computerPathLinePts();var e=WebGLPlot$d.Material.fromType(WebGLPlot$d.Material.ColorType,{color:this.lineColor});if(!this.polyline){var t={width:this.lineWidth,positions:this._shapePoints,material:e,id:this.geo.id+"_PathLine"};this.polyline=_0x4786d3.addAlgoPloyline(this,t,this.plottingLayer._scene),this.polyline&&(this.polyline.show=!1)}},_0x34cdef.prototype.computerPathLinePts=function(){if(0===this.pathType)this._shapePoints=this.PathPts;else{var e=_0x2909c1.generateBezierCtrlPts(this.PathPts);this._shapePoints=_0x2909c1.generateBezierPointsWithCtrlPts(e)}for(var t=[],i=0;i<this._shapePoints.length;i++){var n=this._shapePoints[i];t.push(n.x),t.push(n.y),t.push(n.z)}this._shapePoints=WebGLPlot$d.Cartesian3.fromDegreesArrayHeights(t),this._pathLineLength=0;for(var r=1;r<this._shapePoints.length;r++)this._pathLineLength+=_0x2909c1.distance3D(this._shapePoints[r-1],this._shapePoints[r])},_0x34cdef.prototype.canExecute=function(){if(this._animationState!==_0x577f4c.PLAYING)return!1;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this.startTime>e)return!1;var t=this.getRatioByTime();return!(t>1&&this._lastExecute||t<0)},_0x34cdef.prototype.getRatioByTime=function(){if(this._animationState!==_0x577f4c.PLAYING)return 0;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this.startTime>e)return 0;var t=(e-this._innerStartTime-this.startTime)/this.duration;return t>=1&&!this._lastExecute?this._repeat?(this._innerStartTime=(new Date).getTime()/1e3,t=0,this._lastExecute=!1,this._animationState=_0x577f4c.PLAYING):(t=1,this._lastExecute=!0,this._animationState=_0x577f4c.STOP):t<0&&(t=0),this._ratio=t,t},_0x34cdef.prototype._findPos=function(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLineLength)).result)return!1;var n=i.pt;return this.isTangentDirection&&(i.angle=_0x2909c1.radian(n,t[i.index])/Math.PI*180),i},_0x34cdef.prototype.getPtsIndexByDistance=function(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x2909c1.distance(e[o],e[o+1]))>=t){var a=_0x2909c1.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x23de81(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n},_0x34cdef.prototype.modifyAnimationFollowPath=function(e,t,i){if(this.isTangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot$d.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot$d.Cartesian3;u=WebGLPlot$d.Cartesian3.subtract(l[0],a,u),u=WebGLPlot$d.Cartesian3.normalize(u,u);var c=new WebGLPlot$d.Cartesian3;c=WebGLPlot$d.Cartesian3.subtract(s,a,c),c=WebGLPlot$d.Cartesian3.normalize(c,c);var h=new WebGLPlot$d.Cartesian3;h=WebGLPlot$d.Cartesian3.cross(c,u,h),h=WebGLPlot$d.Cartesian3.normalize(h,h);var d=new WebGLPlot$d.Cartesian3;d=WebGLPlot$d.Cartesian3.cross(h,c,d),d=WebGLPlot$d.Cartesian3.normalize(d,d),c=new WebGLPlot$d.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot$d.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot$d.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot$d.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot$d.Cartesian3(1,0,0)),h=WebGLPlot$d.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot$d.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot$d.Cartesian3(1,0,0)),c=WebGLPlot$d.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot$d.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot$d.Cartesian3(1,0,0)),d=WebGLPlot$d.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot$d.Cartesian3(p,_,m)}},_0x34cdef.prototype.FromAngleAxis=function(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x23de81(r*i.x,r*i.y,r*i.z),s=new _0x23de81;s=WebGLPlot$d.Cartesian3.cross(a,e,s);var l=new _0x23de81;l=WebGLPlot$d.Cartesian3.cross(a,s,l);var u=new _0x23de81(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x23de81(2*l.x,2*l.y,2*l.z);return new _0x23de81(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)},_0x34cdef.prototype.ToEulerAnglesXYZ=function(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x23de81(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x23de81((n=0)-Math.atan2(t.x,t.y),r,n):new _0x23de81(Math.atan2(t.x,t.y)-(n=0),r,n)},_0x34cdef.prototype.PtsToSpherical=function(e){var t=this.plottingLayer._scene.globe.ellipsoid,i=new WebGLPlot$d.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot$d.CesiumMath.toDegrees(n.latitude);return new _0x23de81(WebGLPlot$d.CesiumMath.toDegrees(n.longitude),r,n.height)};var _0x123c41=(_0x55bf6b=!0,function(e,t){var i=_0x55bf6b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55bf6b=!1,i}),_0x4101cd=_0x123c41(void 0,(function(){return _0x4101cd.toString().search("(((.+)+)+)+$").toString().constructor(_0x4101cd).search("(((.+)+)+)+$")})),_0x55bf6b;_0x4101cd();var WebGLPlot$c=window.WebGLPlot=window.WebGLPlot||{};class _0x330d7a extends _0x2d9130{constructor(e){super(e=WebGLPlot$c.defaultValue(e,WebGLPlot$c.defaultValue.EMPTY_OBJECT)),this._scalePoints=WebGLPlot$c.defaultValue(e.scalePoints,[]),this._scaleValues=WebGLPlot$c.defaultValue(e.scaleValues,[]),this._subSymbols=WebGLPlot$c.defaultValue(e.subSymbols,[]),this._isPixelLine=WebGLPlot$c.defaultValue(e.isPixelLine,!0),this._layer=WebGLPlot$c.defaultValue(e.layer,null),this._isEdit=WebGLPlot$c.defaultValue(e.isEdit,!0),this._extendWallOpacity=WebGLPlot$c.defaultValue(e.extendWallOpacity,.7),this._wholeHeight=0,this._isScalePtModify=!1,this._modifyScalePtParams=null,this._symbolAlgo=null,this._updateSubSize=!0,this._subSymbolSize=0,this._isAnimationFeature=!1,this._subSymbolScaleValue=.1,this.sceneMode=WebGLPlot$c.SceneMode.SCENE3D,this.fillCanvas=document.createElement("canvas"),this.mergeDefaultStyle(),this._isClampToGround=!1,this.Polylines=[],this.PolygonFillInstances=[],this.WallInstances=[],this.GroundLineInstances=[],this._SubSymbolDefaultPixelSize=20}initSymbol(){if((!this._initialize||this.sceneMode!==this._layer._scene.mode)&&(this._initialize=!0,WebGLPlot$c.defined(this._layer)&&WebGLPlot$c.defined(this._layer._scene)&&(this.sceneMode=this._layer._scene.mode),this._clearCells(),this._display&&this._layer.visibility&&(null===this._symbolAlgo&&(this._symbolAlgo=WebGLPlot$c.createAlgo({libID:this.libID,code:this.code}),this._subSymbols.length>0&&this._subSymbols.symbolData?this._symbolAlgo.subSymbols=this._subSymbols:this.createSubSymbolData()),WebGLPlot$c.defined(this._symbolAlgo)))){this.__setArrowType();var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.localPoints);if(e=_0x2909c1.clearNextSamePts(e),!(this.symbolType!==_0x1c668c.SYMBOL_TEXT&&e.length<2)){var t,i=this.localPoints.length;this._dHeight=0;for(var n=[],r=0;r<i;r++)0===r?this._dHeight=this.localPoints[0].z:this._dHeight<this.localPoints[r].z&&(this._dHeight=this.localPoints[r].z),0!==this._wholeHeight&&(this.localPoints[r].z=this._wholeHeight,this._dHeight=this._wholeHeight),n.push(new _0x23de81(this.localPoints[r].x,this.localPoints[r].y,this.localPoints[r].z));if(this._symbolAlgo.controlPoints=n,this.setAlgoDefaultValue(),this._scalePoints=[],this._symbolAlgo.scaleValues.length<=this._scaleValues.length&&(this._symbolAlgo.scaleValues=this._scaleValues),this._symbolAlgo.style={color:this.symbolStyle.lineColor},WebGLPlot$c.defined(this._symbolAlgo.subSymbolScaleValue)?this._subSymbolScaleValue=this._symbolAlgo.subSymbolScaleValue:this._symbolAlgo.subSymbolScaleValue=this._subSymbolScaleValue,this._isScalePtModify){var o=this._modifyScalePtParams.index,a=this._modifyScalePtParams.position;a.isScalePoint=!0,this._symbolAlgo.isEdit=!0,this._symbolAlgo.modifyPoint(o,a),t=this._symbolAlgo.components}else this._updateSubSize&&!this._isAnimationFeature?(this._symbolAlgo.subSymbolDefaultPixelSize=this._SubSymbolDefaultPixelSize,this._symbolAlgo.subSymbolSize=this.pixelDisToRealDis(this._symbolAlgo.controlPoints[0],this._symbolAlgo.subSymbolDefaultPixelSize),this._subSymbolSize=this._symbolAlgo.subSymbolSize,this._updateSubSize=!1,this.createSubSymbolData()):this._symbolAlgo.subSymbolSize=this._subSymbolSize,this._isAnimationFeature&&(this._symbolAlgo.isEdit=!0,this._symbolAlgo.subSymbolScaleValue=this._subSymbolScaleValue),this._symbolAlgo.isEdit=this._isEdit,this._symbolAlgo.calculateParts(),t=this._symbolAlgo.components;if(this._scalePoints=this._symbolAlgo.scalePoints,this._scaleValues=this._symbolAlgo.scaleValues,this._subSymbols=this._symbolAlgo.subSymbols,WebGLPlot$c.defined(t)){var s=[];if(s=Array.isArray(t)?t:[t],0===this.libID&&this.code===_0x1c668c.SYMBOL_COMBINATIONALCIRCLE)for(let e=0;e<s.length;e++){const t=s[e];if(t&&t.type===_0x1c668c.SYMBOL_ARBITRARYPOLYGON){s.splice(e,1);break}}this.createGeometryInstances(s,this._dHeight),this._pushCollentionInstances(this.id),_0x4786d3.setUpdatePrimitive(!0,this._layer._scene),this._initSymbolFinished.raiseEvent(this)}}}}getMinEditPts(){return WebGLPlot$c.defined(this._symbolAlgo)?this._symbolAlgo.minEditPts:0}getMaxEditPts(){return WebGLPlot$c.defined(this._symbolAlgo)?this._symbolAlgo.maxEditPts:0}getSymbolName(){return WebGLPlot$c.defined(this._symbolAlgo)&&0!==this._symbolAlgo.symbolName.length?this._symbolAlgo.symbolName:""}createGeometryInstances(e,t){var i=this.isAllPointsHaveZ(e),n=[],r=this.computeBounds(e);let o=[];for(var a=0;a<e.length;a++){var s=e[a];Array.isArray(s.positionPoints)||(s.positionPoints=[s.positionPoints]);var l=s.positionPoints;if(s.shapePts&&(l=s.shapePts),!WebGLPlot$c.defined(l))return n;if(0===this.libID&&34===this.code&&(this._symbolAlgo.maxEditPts=1,this._symbolAlgo.minEditPts=1,l=[s.positionPoints[0]]),l.length>1){_0x2909c1.isSymbolCellCanFill(s)&&l.push(l[0]);for(var u=[],c=[],h=[],d=0;d<l.length;d++){var f=l[d];isNaN(f.x)||isNaN(f.y)||((isNaN(f.z)||void 0===f.z)&&(f.z=0),WebGLPlot$c.defined(this._layer)&&WebGLPlot$c.defined(this._layer._scene)&&this._layer._scene.mode===WebGLPlot$c.SceneMode.SCENE2D&&(t=0,f.z=0),i&&0!==this.libID||48===this.code||24===this.code||32===this.code?c.push(new _0x23de81(f.x,f.y,f.z)):(f=new _0x23de81(f.x,f.y,t),c.push(new _0x23de81(f.x,f.y,t))),u.push(WebGLPlot$c.Cartesian3.fromDegrees(f.x,f.y,f.z)),h.push(f.z))}if(u=this.interPolation(u),0===this.libID&&this.code===_0x1c668c.SYMBOL_COMBINATIONALCIRCLE&&29!==s.type&&o.push(u),0===this.libID&&this.code===_0x1c668c.SYMBOL_CONCENTRICCIRCLE){if(29===s.type&&o.unshift(u),0===s.style.strokeWidth&&s.style.lineWidthLimit)continue}else if(this.createFillGeometry(s,u),0===s.style.strokeWidth&&s.style.lineWidthLimit){this._symbolStyle._fillSymbolID||this.generateFillGeometry(u,void 0);continue}var p=this._symbolStyle._surroundLineType;if(s.style&&s.style.surroundLineLimit){p===_0x3fcacb.SURROUNDLINE_NONE&&(p=s.style.surroundLineType);for(var _=this.generateSurroundLineGeometry(c,u,r,s.style,p),m=0;m<_.length;m++)_[m]&&n.push(_[m])}else if(_0x3fcacb.SURROUNDLINE_NONE!==this._symbolStyle._surroundLineType)for(_=this.generateSurroundLineGeometry(c,u,r,this._symbolStyle,p),m=0;m<_.length;m++)_[m]&&n.push(_[m]);var g=this._symbolStyle._lineWidth,x=null;s.style.lineColorLimit?(x=_0x2909c1.StringtoColor(s.style.color)).alpha=s.style.strokeOpacity:(x=this._symbolStyle._lineColor).alpha=this._symbolStyle._opacity,this._layer.selectedFeature&&this._id===this._layer.selectedFeature.id&&!this._layer.isEditable&&(x=new WebGLPlot$c.Color(0,0,1,1));var y=WebGLPlot$c.getDefaultStyle({libID:this.libID,code:this.code});y.color&&((x=_0x2909c1.StringtoColor(y.color)).alpha=this._symbolStyle._opacity);var v=this.createLineGeometry(u,g,x);if(null!==v&&n.push(v),this._extendWallHeight>0&&u.length>1){x=this._symbolStyle._lineColor;x=WebGLPlot$c.Color.fromAlpha(x,this._extendWallOpacity),this.createExtendWall(u,x,h)}}else 1===l.length&&34===s.type&&this.addTextContent(s,t);this.drawAnnotationArray()}return o.length>0&1!==this._symbolStyle._fillSymbolID&&this.generateFillGeometry(o,void 0,!0),n}computeBounds(e){var t=0,i=0,n=180,r=180,o=!1;WebGLPlot$c.defined(e)||(e=this._symbolAlgo.components,o=!0);for(var a=0;a<e.length;a++){var s=e[a];if(0!==s.style.weight){Array.isArray(s.positionPoints)||(s.positionPoints=[s.positionPoints]);var l=void 0;if(0===this.libID&&1014!==this.code&&1022!==this.code&&_0x1c668c.SYMBOL_CIRCLE===s.type){let e=WebGLPlot$c.Cartesian3.fromDegrees(s.positionPoints[0].x,s.positionPoints[0].y,s.positionPoints[0].z),t=WebGLPlot$c.Cartesian3.fromDegrees(s.positionPoints[1].x,s.positionPoints[1].y,s.positionPoints[1].z);var u=WebGLPlot$c.Transforms.eastNorthUpToFixedFrame(e);const i=WebGLPlot$c.Cartesian3.distance(e,t);for(var c=_0x2909c1.calcCirclePts(i,new WebGLPlot$c.Cartesian3(0,0,0),72),h=[],d=0;d<c.length;d++){var f=new WebGLPlot$c.Cartesian3,p=new WebGLPlot$c.Cartesian3;f=WebGLPlot$c.Cartesian3.multiplyByScalar(new WebGLPlot$c.Cartesian3(c[d].x,c[d].y,0),1,f),p=WebGLPlot$c.Matrix4.multiplyByPoint(u,f,p);var _=WebGLPlot$c.Cartographic.fromCartesian(p);const e=WebGLPlot$c.CesiumMath.toDegrees(_.longitude),t=WebGLPlot$c.CesiumMath.toDegrees(_.latitude);h.push(new WebGLPlot$c.Cartesian3(e,t,0))}l=h,s.shapePts=h}else l=WebGLPlot$c.getSpatialData(s.type,s.positionPoints),s.shapePts=l;if(WebGLPlot$c.defined(l))for(var m=0;m<l.length;++m)l[m].x<n&&(n=l[m].x),l[m].y<r&&(r=l[m].y),l[m].x>t&&(t=l[m].x),l[m].y>i&&(i=l[m].y)}}this._CenterPosition=new _0x23de81((t+n)/2,(r+i)/2,0);var g=t-n,x=i-r;return o?{x:n+g/2,y:r,z:0,maxX:t,maxY:i,minX:n,minY:r}:g>=x?g:x}generateSurroundLineGeometry(e,t,i,n,r){var o,a,s,l=[],u=[],c=[],h=this.symbolStyle.surroundLineColor;switch(h=WebGLPlot$c.Color.fromAlpha(h,this.symbolStyle.opacity),n.surroundLineLimit&&(r=n.surroundLineType,n.lineColorLimit&&((!n.surroundLineColor||""===n.surroundLineColor)&&(n.surroundLineColor="#ffff00"),(h=_0x314cf0(n.surroundLineColor)).alpha=n.surroundLineColorOpacity)),r){case _0x3fcacb.SURROUNDLINE_ALL:a=this._symbolStyle._surroundLineWidth/2+this._symbolStyle._lineWidth/2,this._isPixelLine&&(a=this._surroundRatioVal*i),s=_0x2909c1.getSurroundLinePts(e,a);for(var d=0;d<s.length;++d)u.push(new WebGLPlot$c.Cartesian3.fromDegrees(s[d].x,s[d].y,s[d].z));a=-a;for(var f=(s=_0x2909c1.getSurroundLinePts(e,a)).length-1;f>=0;--f)c.push(new WebGLPlot$c.Cartesian3.fromDegrees(s[f].x,s[f].y,s[f].z));o=this._symbolStyle._surroundLineWidth;break;case _0x3fcacb.SURROUNDLINE_INNER:case _0x3fcacb.SURROUNDLINE_OUT:a=this._symbolStyle._surroundLineWidth/2+this._symbolStyle._lineWidth/2,this._isPixelLine&&(a=this._surroundRatioVal*i),r===_0x3fcacb.SURROUNDLINE_INNER&&(a=-a),s=_0x2909c1.getSurroundLinePts(e,a);for(d=0;d<s.length;++d)u.push(new WebGLPlot$c.Cartesian3.fromDegrees(s[d].x,s[d].y,s[d].z));o=this._symbolStyle._surroundLineWidth}return u.length<2||(u=this.interPolation(u),l.push(this.createLineGeometry(u,o,h,!0)),c.length>=2&&(c=this.interPolation(c),l.push(this.createLineGeometry(c,o,h,!0)))),l}createFillGeometry(e,t){if(!e.style.fillLimit||e.style.fill){if((e.style.fillLimit&&e.style.fill||0===e.style.fillStyle&&e.style.fillLimit)&&_0x2909c1.isSymbolCellCanFill(e))return void this.generateFillGeometry(t,e.style);if(1!==this.symbolStyle.fillSymbolID&&(_0x2909c1.isCanFill(this)||_0x2909c1.isSymbolCellCanFill(e)))return void this.generateFillGeometry(t,void 0);if(WebGLPlot$c.defined(e.style.fillSymbolID)&&0===e.style.fillSymbolID)return void this.generateFillGeometry(t,e.style)}}generateFillGeometry(e,t,i){var n,r,o=void 0;if(i){let t=0;for(let i=1;i<e.length;i++)e[i].length>e[t].length&&(t=i);let i=WebGLPlot$c.clonePoints(e[t]);e.splice(t,1);let n=[];for(let t=0;t<e.length;t++){let i=e[t];n.push(new WebGLPlot$c.PolygonHierarchy(i))}let r=new WebGLPlot$c.PolygonHierarchy(i,n);o=new WebGLPlot$c.PolygonGeometry({polygonHierarchy:r,perPositionHeight:!0})}else o=WebGLPlot$c.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0});if(WebGLPlot$c.defined(t)&&t.fillLimit?n=WebGLPlot$c.defined(t.fillColor)&&t.fillColorLimit?_0x2909c1.StringtoColor(t.fillColor):t.color&&t.fillColorLimit?WebGLPlot$c.Color.clone(_0x2909c1.StringtoColor(t.color)):WebGLPlot$c.Color.clone(this._symbolStyle._lineColor):(n=WebGLPlot$c.Color.clone(this._symbolStyle._fillForeColor)).alpha=1-this._symbolStyle._fillOpaqueRate/100,this._layer.selectedFeature&&this._id===this._layer.selectedFeature.id&&!this._layer.isEditable&&(n=new WebGLPlot$c.Color(0,0,1,1)),null!==(r=this.isClampToGround?o:WebGLPlot$c.PolygonGeometry.createGeometry(o))&&WebGLPlot$c.defined(r)){var a=new WebGLPlot$c.GeometryInstance({geometry:r,id:this.id,attributes:{color:WebGLPlot$c.ColorGeometryInstanceAttribute.fromColor(n)}});a.ForeRGBA=n.toRgba(),a.BackRGBA=this._symbolStyle._fillBackColor.toRgba(),a.isClampToGround=this.isClampToGround,a._isAnimationFeature=this._isAnimationFeature,this.PolygonFillInstances.push(a)}}createFillCanvas(){var e=this.fillCanvas.width=100,t=this.fillCanvas.height=100;this._ctx=this.fillCanvas.getContext("2d");var i=null;switch(this._symbolStyle._fillGradientMode){case 1:i=this._ctx.createLinearGradient(0,0,e,t);break;case 2:var n=e/2,r=t/2,o=e/4,a=2*o;i=this._ctx.createRadialGradient(n,r,o,n,r,a)}return i.addColorStop(0,this._symbolStyle._fillForeColor.toCssColorString()),i.addColorStop(1,this._symbolStyle._fillBackColor.toCssColorString()),this._ctx.fillStyle=i,this._ctx.fillRect(0,0,100,100),this.fillCanvas}isAllPointsHaveZ(e){for(var t=!0,i=0;i<e.length;i++)for(var n=e[i],r=0;r<n.positionPoints.length;r++){if(void 0===n.positionPoints[r].z){t=!1;break}}return t}createSubSymbolData(){0===this._subSymbols.length&&this._symbolAlgo&&(this._subSymbols=JSON.parse(JSON.stringify(this._symbolAlgo.subSymbols)));for(var e=0;e<this._subSymbols.length;e++)this.getServerData(this._subSymbols[e],e)}getServerData(e,t,i){var n=this,r=WebGLPlot$c.getLibManager(this._layer._scene._plottingID).getSymbolData(e.libID,e.code);if(WebGLPlot$c.defined(r)&&null!==r){var o=[];if(!WebGLPlot$c.defined(r.innerCells))return;for(var a=0;a<r.innerCells.length;a++)r.innerCells[a].surroundLineFlag||o.push(r.innerCells[a]);return r.innerCells=o,e.symbolData=r,n._symbolAlgo.subSymbols[t]=e,n._initialize=!1,i&&i(),!0}var s=WebGLPlot$c.getServerData(e.libID,e.code,void 0,this._layer._scene._plottingID);!s||(s.getSymbolInfo.events.on({processCompleted:function(r){var o=r.result,a=[];if(WebGLPlot$c.defined(o.innerCells)){for(var s=0;s<o.innerCells.length;s++)o.innerCells[s].surroundLineFlag||a.push(o.innerCells[s]);return o.innerCells=a,e.symbolData=o,n._symbolAlgo.subSymbols[t]=e,n._initialize=!1,i&&i(),!0}},processFailed:function(e){},scope:this}),s.getSymbolInfo.processAsync(s.getSymbolInfoParameters))}pixelDisToRealDis(e,t){if(void 0===e)return 0;var i=this._layer._scene,n=WebGLPlot$c.Cartesian3.fromDegrees(e.x,e.y,e.z),r=WebGLPlot$c.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(!WebGLPlot$c.defined(r))return.001;var o=new WebGLPlot$c.Cartesian2(r.x,r.y+t),a=_0x2909c1.getPosition2(i,r),s=_0x2909c1.getPosition2(i,o);return _0x2909c1.distance(a,s)}setAlgoDefaultValue(){if(this._updateSubSize&&0===this._symbolAlgo.libID&&1019===this._symbolAlgo.code&&(this._symbolAlgo.startAngle=0,this._symbolAlgo.endAngle=360),0===this._symbolAlgo.libID&&1022===this._symbolAlgo.code){WebGLPlot$c.defined(this._symbolAlgo.radius)||(this._symbolAlgo.radius=[]);var e=this.localPoints;if(this._symbolAlgo.radius.length<e.length){var t=this.pixelDisToRealDis(e[0],this._symbolAlgo.defaultRadius);this._symbolAlgo.radius.push(t)}}}addTextContent(e,t){if(WebGLPlot$c.defined(e.textContent)&&null!==e.textContent){0===e.textContent.length&&(!WebGLPlot$c.defined(this.textContent)||0===this.textContent.length)&&(this.textContent="AaBb"),0!==e.textContent.length&&(this.textContent=e.textContent);var i=this.textContent,n=WebGLPlot$c.Cartesian3.fromDegrees(e.positionPoints[0].x,e.positionPoints[0].y,t),r=this._symbolTextStyle,o=new WebGLPlot$c.Color(r._foreColor.red,r._foreColor.green,r._foreColor.blue,r._foreColor.alpha);this._isSelected&&(o=new WebGLPlot$c.Color(0,1,0,1));var a,s=r._fontSize+"px "+r._fontName;0===this.libID&&34===this.code?a={style:r.outline?WebGLPlot$c.LabelStyle.FILL_AND_OUTLINE:WebGLPlot$c.LabelStyle.FILL,outlineColor:r._backColor,outlineWidth:r.outlineWidth,position:n,text:i,font:s,fillColor:o,horizontalOrigin:WebGLPlot$c.HorizontalOrigin.CENTER,id:this._id}:(WebGLPlot$c.defined(e.style.fontColorLimit)&&WebGLPlot$c.defined(e.style.fontColor)&&e.style.fontColorLimit&&(o=_0x314cf0(e.style.fontColor)),a={position:n,text:i,font:s,fillColor:o,horizontalOrigin:WebGLPlot$c.HorizontalOrigin.CENTER}),(a=_0x4786d3.addAlgoLabel(this,a,this._layer._scene)).SymbolType=_0x1c668c.SYMBOL_TEXT}}createExtendWall(e,t,i){var n=[],r=[];if(i.length===e.length)for(let e=0;e<i.length;e++){var o=i[e]-this._extendWallHeight;n.push(o),0===this._dHeight?r.push(.1):r=void 0}else for(var a=0;a<e.length;a++){(o=WebGLPlot$c.Cartographic.fromCartesian(e[a]).height-this._extendWallHeight)<0&&(o=0),n.push(o),0===this._dHeight?r.push(.1):r=void 0}var s=new WebGLPlot$c.WallGeometry({positions:e,minimumHeights:n,maximumHeights:r}),l=WebGLPlot$c.WallGeometry.createGeometry(s);if(WebGLPlot$c.defined(l)){var u=WebGLPlot$c.ColorGeometryInstanceAttribute.fromColor({alpha:0,red:1,green:1,blue:0}),c=new WebGLPlot$c.GeometryInstance({geometry:l,attributes:{color:u},id:this.id});c.ForeRGBA=t.toRgba(),c._isAnimationFeature=this._isAnimationFeature,this.WallInstances.push(c)}}setSubSymbols(e,t){if(0===this._symbolAlgo.subSymbols.length&&0===this.libID&&1025!==this.code||e===this._subSymbols[t])return!1;{this._initialize=!1;let i=this;return this.getServerData(e,t,(function(){_0x5ac1e1.getInstance().symbolModified.raiseEvent(i)})),!0}}createLineGeometry(e,t,i,n){if(this.isClampToGround&&!this.isDrawing)return this.createGroundPolylineGeometry(e,t,i,n),null;var r=void 0;if(this._isPixelLine){var o={width:t,positions:e,material:WebGLPlot$c.Material.fromType(WebGLPlot$c.Material.ColorType,{color:i}),id:this.id};return(o=_0x4786d3.addAlgoPloyline(this,o,this._layer._scene)).SymbolType=_0x1c668c.SYMBOL_ALGO,o}var a=new WebGLPlot$c.PolylineVolumeGeometry({polylinePositions:e,shapePositions:[new WebGLPlot$c.Cartesian2(-.5*t,-.5*t),new WebGLPlot$c.Cartesian2(.5*t,-.5*t),new WebGLPlot$c.Cartesian2(.5*t,.5*t),new WebGLPlot$c.Cartesian2(-.5*t,.5*t)],cornerType:2});if(r=WebGLPlot$c.PolylineVolumeGeometry.createGeometry(a),!WebGLPlot$c.defined(r))return null;var s=new WebGLPlot$c.GeometryInstance({geometry:r,id:this.id,attributes:{color:i}});return n&&(s.bIsSurroundLine=!0),s}createGroundPolylineGeometry(e,t,i,n){var r=new WebGLPlot$c.GroundPolylineGeometry({vertexFormat:WebGLPlot$c.VertexFormat.POSITION_ONLY,positions:e,width:t}),o=new WebGLPlot$c.GeometryInstance({geometry:r,attributes:{color:WebGLPlot$c.ColorGeometryInstanceAttribute.fromColor(i)},id:this._id});n&&(o.bIsSurroundLine=!0),o._isAnimationFeature=this._isAnimationFeature,this.GroundLineInstances.push(o)}_destroy(){_0x5ac1e1.getInstance().symbolDestroyed.raiseEvent(this.id),this._clearCells(),_0x4786d3.setUpdatePrimitive(!0,this._layer._scene)}_clearCells(){_0x4786d3.removeAllAlgoPloyline(this,this._layer._scene),_0x4786d3.removeAllAlgoLabel(this,this._layer._scene),this.PolygonFillInstances=[],this.WallInstances=[],this.GroundLineInstances=[],this._pushCollentionInstances(this.id)}_pushCollentionInstances(e){this.PolygonFillInstances.length>0?_0x4786d3.setPolygonFillInstances(e,this.PolygonFillInstances,this._layer._scene):_0x4786d3.setPolygonFillInstances(e,[],this._layer._scene),this.WallInstances.length>0?_0x4786d3.setWallInstances(e,this.WallInstances,this._layer._scene):_0x4786d3.setWallInstances(e,[],this._layer._scene),this.GroundLineInstances.length>0?_0x4786d3.setGroundInstances(e,this.GroundLineInstances,this._layer._scene):_0x4786d3.setGroundInstances(e,[],this._layer._scene)}clone(){var e=new _0x330d7a({layer:this._layer,libID:this._libID,code:this._code,localPoints:this.localPoints,serverData:this._serverData});return e._libID=JSON.parse(JSON.stringify(this._libID)),e._code=JSON.parse(JSON.stringify(this._code)),e._symbolName=JSON.parse(JSON.stringify(this._symbolName)),e._symbolType=JSON.parse(JSON.stringify(this._symbolType)),e._display=JSON.parse(JSON.stringify(this._display)),e._id=JSON.parse(JSON.stringify(this._id)),e._initialize=JSON.parse(JSON.stringify(!1)),e._isEdit=JSON.parse(JSON.stringify(this._isEdit)),e._isUseSymbolLibStyle=JSON.parse(JSON.stringify(this._isUseSymbolLibStyle)),e._markHalo=JSON.parse(JSON.stringify(this._markHalo)),e._localPoints=WebGLPlot$c.clonePoints(this.localPoints),e._symbolStyle=this._symbolStyle.clone(),e._symbolTextStyle=this._symbolTextStyle.clone(),e._serverData=JSON.parse(JSON.stringify(this._serverData)),e._extendProperty=JSON.parse(JSON.stringify(this._extendProperty)),e._annotationArray=JSON.parse(JSON.stringify(this._annotationArray)),e._extendWallHeight=JSON.parse(JSON.stringify(this._extendWallHeight)),e._wholeHeight=JSON.parse(JSON.stringify(this._wholeHeight)),e._scaleValues=JSON.parse(JSON.stringify(this._scaleValues)),e._subSymbolSize=JSON.parse(JSON.stringify(this._subSymbolSize)),e._subSymbols=JSON.parse(JSON.stringify(this._subSymbols)),e._isUpdateSubSymbolSize=JSON.parse(JSON.stringify(this._updateSubSize)),e._isAnimationFeature=JSON.parse(JSON.stringify(this._isAnimationFeature)),e._subSymbolScaleValue=JSON.parse(JSON.stringify(this._subSymbolScaleValue)),e._extendWallOpacity=JSON.parse(JSON.stringify(this._extendWallOpacity)),e.isClampToGround=JSON.parse(JSON.stringify(this.isClampToGround)),e}interPolation(e){var t=[];for(let n=0;n<e.length;n++){const r=e[n];var i=WebGLPlot$c.Cartographic.fromCartesian(r);t.push(i.height+1)}return WebGLPlot$c.PolylinePipeline.generateCartesianArc({positions:e,height:t,minDistance:WebGLPlot$c.defaultValue(WebGLPlot$c.Plotting._AlgoSymoblPipelineDisMin,1e4)}).push(e[e.length-1]),e}__setArrowType(){this._symbolAlgo&&(WebGLPlot$c.defined(this._arrowHeadType)&&(this._symbolAlgo.arrowHeadType=this._arrowHeadType),WebGLPlot$c.defined(this._arrowBodyType)&&(this._symbolAlgo.arrowBodyType=this._arrowBodyType),WebGLPlot$c.defined(this._arrowTailType)&&(this._symbolAlgo.arrowTailType=this._arrowTailType))}}function _0x314cf0(e){if(!e||""===e)return new WebGLPlot$c.Color(1,0,0);var t=parseInt(e.slice(1,3),16)/255,i=parseInt(e.slice(3,5),16)/255,n=parseInt(e.slice(5,7),16)/255;return new WebGLPlot$c.Color(t,i,n)}Object.defineProperties(_0x330d7a.prototype,{subSymbols:{get:function(){return this._subSymbols},set:function(e){e===this._subSymbols||!Array.isArray(e)||(this._subSymbols=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},ispixelLine:{get:function(){return this._ispixelLine},set:function(e){e===this._ispixelLine||e.constructor!==Boolean||(this._ispixelLine=e,this._initialize=!1)}},surroundRatioVal:{get:function(){return this._surroundRatioVal},set:function(e){e===this._surroundRatioVal||"number"!=typeof e||(this._surroundRatioVal=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},extendWallHeight:{get:function(){return this._extendWallHeight},set:function(e){e===this._extendWallHeight||"number"!=typeof e||(this._extendWallHeight=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},extendWallOpacity:{get:function(){return Math.round(100*(1-this._extendWallOpacity))},set:function(e){this.extendWallOpacity==e||"number"!=typeof e||(this._extendWallOpacity=1-e/100,this._initialize=!1)}},isClampToGround:{get:function(){return this._isClampToGround},set:function(e){e!==this._isClampToGround&&(this._isClampToGround=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},arrowHeadType:{get:function(){return this._arrowHeadType},set:function(e){"number"==typeof e&&(this._arrowHeadType=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},arrowBodyType:{get:function(){return this._arrowBodyType},set:function(e){"number"==typeof e&&(this._arrowBodyType=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},arrowTailType:{get:function(){return this._arrowTailType},set:function(e){"number"==typeof e&&(this._arrowTailType=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}}});var _0x53bf09=(_0xc4a8c7=!0,function(e,t){var i=_0xc4a8c7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc4a8c7=!1,i}),_0x1c4666=_0x53bf09(void 0,(function(){return _0x1c4666.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c4666).search("(((.+)+)+)+$")})),_0xc4a8c7;function _0x4c78d5(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.symbolType=WebGLPlot.defaultValue(e.symbolType,_0x1c668c.SYMBOL_UNKNOW),this.points=WebGLPlot.defaultValue(e.points,[]),this.lineColorLimit=WebGLPlot.defaultValue(e.lineColorLimit,!1),this.lineColor=WebGLPlot.defaultValue(e.lineColor,WebGLPlot.Color.RED),this.lineTypeLimit=WebGLPlot.defaultValue(e.lineTypeLimit,!1),this.lineWidthLimit=WebGLPlot.defaultValue(e.lineWidthLimit,!1),this.lineWidth=WebGLPlot.defaultValue(e.lineWidth,-1),this.fillLimit=WebGLPlot.defaultValue(e.fillLimit,!1),this.fillStyle=WebGLPlot.defaultValue(e.fillStyle,!1),this.fillColorLimit=WebGLPlot.defaultValue(e.fillColorLimit,!1),this.fillColor=WebGLPlot.defaultValue(e.fillColor,new WebGLPlot.Color(1,0,0,.8)),this.fontColorLimit=WebGLPlot.defaultValue(e.fontColorLimit,!1),this.textContent=WebGLPlot.defaultValue(e.textContent,""),this.textStyle=WebGLPlot.defaultValue(e.textContent,void 0),this.textAngle=WebGLPlot.defaultValue(e.textAngle,0),this.textBounds=WebGLPlot.defaultValue(e.textBounds,void 0)}_0x1c4666();var _0x1664a2=(_0x2e48a9=!0,function(e,t){var i=_0x2e48a9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e48a9=!1,i}),_0x29f25c=_0x1664a2(void 0,(function(){return _0x29f25c.toString().search("(((.+)+)+)+$").toString().constructor(_0x29f25c).search("(((.+)+)+)+$")})),_0x2e48a9;function _0x5cf148(){this._code=_0x1c668c.SYMBOL_ARC,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_ARC,this._symbolName=WebGLPlot.plotI18n("arc"),this._minEditPts=3,this._maxEditPts=3}_0x29f25c(),_0x5cf148.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(2==t.length&&_0x2909c1.isSamePt(t[0],t[1])||t.length<this._minEditPts)return null;var i=_0x2909c1.generateArcInfo(t[0],t[1],t[2]);i.dStartAngle*=Math.PI/180,i.dEndAngle*=Math.PI/180;var n,r=_0x2909c1.generateArcSpatialData(i.pntCenter,i.dRadius,i.dRadius,0,i.dStartAngle,i.dEndAngle);return 0!==r.length&&(n=new _0x4c78d5({points:r,symbolType:_0x1c668c.SYMBOL_POLYLINE})),n},_0x5cf148.prototype.getMinEditPts=function(){return this._minEditPts},_0x5cf148.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5cf148.prototype.getSymbolName=function(){return this._symbolName};var _0xb721db=(_0x2d00bb=!0,function(e,t){var i=_0x2d00bb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d00bb=!1,i}),_0xf18f8a=_0xb721db(void 0,(function(){return _0xf18f8a.toString().search("(((.+)+)+)+$").toString().constructor(_0xf18f8a).search("(((.+)+)+)+$")})),_0x2d00bb;function _0x1e88b8(){this._code=_0x1c668c.SYMBOL_POLYBEZIER,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_POLYBEZIER,this._symbolName=WebGLPlot.plotI18n("bezier"),this._minEditPts=2,this._maxEditPts=9999}_0xf18f8a(),_0x1e88b8.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(t);return SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),new _0x4c78d5({points:i,symbolType:_0x1c668c.SYMBOL_POLYLINE})},_0x1e88b8.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x1e88b8.prototype.getMinEditPts=function(){return this._minEditPts},_0x1e88b8.prototype.getSymbolName=function(){return this._symbolName};var _0x7697cc=(_0x319d54=!0,function(e,t){var i=_0x319d54?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x319d54=!1,i}),_0x50ba5=_0x7697cc(void 0,(function(){return _0x50ba5.toString().search("(((.+)+)+)+$").toString().constructor(_0x50ba5).search("(((.+)+)+)+$")})),_0x319d54;function _0x509a13(){this._code=_0x1c668c.SYMBOL_ELLIPSE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_ELLIPSE,this._symbolName=WebGLPlot.plotI18n("ellipse"),this._maxEditPts=3,this._minEditPts=3}_0x50ba5(),_0x509a13.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x509a13.prototype.getMinEditPts=function(){return this._minEditPts},_0x509a13.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t,i,n,r=e.points;if(r.length<this._minEditPts)return null;t=_0x2909c1.distance(r[0],r[2]),i=_0x2909c1.distance(r[0],r[1]),n=_0x2909c1.radian(r[0],r[1]);var o=2*Math.PI,a=_0x2909c1.generateArcSpatialData(r[0],i,t,n,0,o);return a.push[a[0].clone()],new _0x4c78d5({symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON,points:a})},_0x509a13.prototype.getSymbolName=function(){return this._symbolName};var _0x286fa3=(_0x37f4df=!0,function(e,t){var i=_0x37f4df?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37f4df=!1,i}),_0x5a17c1=_0x286fa3(void 0,(function(){return _0x5a17c1.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a17c1).search("(((.+)+)+)+$")})),_0x37f4df;function _0x3b0548(){this._code=_0x1c668c.SYMBOL_PARALLELOGRAM,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_PARALLELOGRAM,this._symbolName=WebGLPlot.plotI18n("parallel"),this._maxEditPts=3,this._minEditPts=3}_0x5a17c1(),_0x3b0548.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;t.length>this._maxEditPts&&t.splice(3,t.length-3);for(var i=t[0].x+(t[2].x-t[1].x),n=t[0].y+(t[2].y-t[1].y),r=new WebGLPlot.Cartesian3(i,n,0),o=[],a=0;a<t.length;++a)o.push(t[a].clone());return o.push(r),o.push(o[0].clone()),new _0x4c78d5({symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON,points:o})},_0x3b0548.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x3b0548.prototype.getMinEditPts=function(){return this._minEditPts},_0x3b0548.prototype.getSymbolName=function(){return this._symbolName};var _0x573473=(_0x888f21=!0,function(e,t){var i=_0x888f21?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x888f21=!1,i}),_0x4ec1cf=_0x573473(void 0,(function(){return _0x4ec1cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ec1cf).search("(((.+)+)+)+$")})),_0x888f21;function _0x5f1d0b(){this._code=_0x1c668c.SYMBOL_RECTANGLE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_RECTANGLE,this._symbolName=WebGLPlot.plotI18n("rectangle"),this._minEditPts=2,this._maxEditPts=2}_0x4ec1cf(),_0x5f1d0b.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i=new WebGLPlot.Cartesian2(t[0].x,t[0].y),n=new WebGLPlot.Cartesian2(t[1].x,t[1].y),r=i.clone();return new _0x4c78d5({points:[r,new WebGLPlot.Cartesian2(n.x,i.y),n.clone(),new WebGLPlot.Cartesian2(i.x,n.y),r.clone()],symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON})},_0x5f1d0b.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5f1d0b.prototype.getMinEditPts=function(){return this._minEditPts},_0x5f1d0b.prototype.getSymbolName=function(){return this._symbolName};var _0x96b79c=(_0x4c66e5=!0,function(e,t){var i=_0x4c66e5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c66e5=!1,i}),_0x17cd78=_0x96b79c(void 0,(function(){return _0x17cd78.toString().search("(((.+)+)+)+$").toString().constructor(_0x17cd78).search("(((.+)+)+)+$")})),_0x4c66e5;function _0x4d54a5(){this._code=_0x1c668c.SYMBOL_CIRCLE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_CIRCLE,this._symbolName=WebGLPlot.plotI18n("circle"),this._minEditPts=2,this._maxEditPts=2}_0x17cd78(),_0x4d54a5.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(null===t||t.length<this._minEditPts)return null;t.length>this._maxEditPts&&t.splice(2,t.length-this._maxEditPts);var i=_0x2909c1.distance(t[0],t[1]),n=_0x2909c1.calcCirclePts(i,t[0]);return new _0x4c78d5({symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON,points:n})},_0x4d54a5.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x4d54a5.prototype.getMinEditPts=function(){return this._minEditPts},_0x4d54a5.prototype.getSymbolName=function(){return this._symbolName};var _0x2a9e69=(_0x482eee=!0,function(e,t){var i=_0x482eee?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x482eee=!1,i}),_0x18687e=_0x2a9e69(void 0,(function(){return _0x18687e.toString().search("(((.+)+)+)+$").toString().constructor(_0x18687e).search("(((.+)+)+)+$")})),_0x482eee;function _0x10c3cc(){this._code=_0x1c668c.SYMBOL_CHORD,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_CHORD,this._symbolName=WebGLPlot.plotI18n("chord"),this._maxEditPts=3,this._minEditPts=3}_0x18687e(),_0x10c3cc.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x10c3cc.prototype.getMinEditPts=function(){return this._minEditPts},_0x10c3cc.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(2==t.length&&_0x2909c1.isSamePt(t[0],t[1])||t.length<this._minEditPts)return null;var i=_0x2909c1.generateArcInfo(t[0],t[1],t[2]);i.dStartAngle*=Math.PI/180,i.dEndAngle*=Math.PI/180;var n=_0x2909c1.generateArcSpatialData(i.pntCenter,i.dRadius,i.dRadius,0,i.dStartAngle,i.dEndAngle);return n.push(n[0].clone()),new _0x4c78d5({points:n,symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON})},_0x10c3cc.prototype.getSymbolName=function(){return this._symbolName};var _0xe77f47=(_0x460842=!0,function(e,t){var i=_0x460842?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x460842=!1,i}),_0x2788c0=_0xe77f47(void 0,(function(){return _0x2788c0.toString().search("(((.+)+)+)+$").toString().constructor(_0x2788c0).search("(((.+)+)+)+$")})),_0x460842;_0x2788c0();var _0x2710ea={TOP:4,BOTTOM:5,LEFT:6,RIGHT:7},_0x353f01=Object.freeze(_0x2710ea),_0x35aca8=(_0x344e1a=!0,function(e,t){var i=_0x344e1a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x344e1a=!1,i}),_0x24d3a8=_0x35aca8(void 0,(function(){return _0x24d3a8.toString().search("(((.+)+)+)+$").toString().constructor(_0x24d3a8).search("(((.+)+)+)+$")})),_0x344e1a;function _0x211e34(e,t,i,n){n=n||{},this.volume=e>1?1:e,this.position=t,(void 0===this.position||null===this.position)&&(this.position=_0x353f01.TOP),this.offsetX=n.offsetX?n.offsetX:0,this.offsetY=n.offsetY?n.offsetY:0,this.width=n.width?n.width:40,this.height=n.height?n.height:8,null!==i&&WebGLPlot.defined(i)?this.style=i:(this.style={},this.style.fillColor=new WebGLPlot.Color(0,1,0),this.style.frameColor=new WebGLPlot.Color(0,0,0)),this.bounds=null}_0x24d3a8(),_0x211e34.clone=function(e){var t=new _0x211e34(e.volume,e.position,null,null);return t.offsetX=e.offsetX,t.offsetY=e.offsetY,t.width=e.width,t.height=e.height,t.bounds=e.bounds,t.style=e.style,t};var _0x521be3=(_0x3ac276=!0,function(e,t){var i=_0x3ac276?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ac276=!1,i}),_0xa9fb3c=_0x521be3(void 0,(function(){return _0xa9fb3c.toString().search("(((.+)+)+)+$").toString().constructor(_0xa9fb3c).search("(((.+)+)+)+$")})),_0x3ac276;_0xa9fb3c();const _0x26ecd7=8;function _0x3bca92(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._symbolSize=WebGLPlot.defaultValue(e.symbolDot._gridSymbolSize,void 0),this._xOffset=0,this._anchorPoint=WebGLPlot.defaultValue(e.symbolDot._anchorPoint,void 0),this._canvas=void 0,this._surroundLineType=void 0,this._isFirst=!0,this.returnisflag=!1,this._OffsetText_Down=0,this.initCanvas(),this._symbolDot._oldSymbolSize=this._symbolDot._symbolSizeInLib,this._dotGridScale=this._symbolDot.scale,this._OffSetY=0,this.TopOffSet=0,this._textContentLength=0}function _0x120af5(e,t){for(var i=[],n=t,r=0;r<n.length;r++)for(var o=0;o<n[r].points.length;o++){var a=n[r].points[o];i.push(a.x)}var s=Math.min.apply({},i),l=(Math.max.apply({},i)+s)/2;Math.abs(s/e._dotGridScale)<_0x26ecd7&&(l=0,e.returnisflag=!0);for(r=0;r<n.length;r++)for(o=0;o<n[r].points.length;o++){(a=n[r].points[o]).x=2*l-a.x,n[r].points[o]=a}return n}function _0x1b7bea(e){return null===e||typeof e>"u"||""===e||e.match(/^[ ]+$/)}Object.defineProperties(_0x3bca92.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x3bca92.prototype.drawDotSymbolGraphic=function(e){if(!WebGLPlot.defined(this._symbolDot))return null;if(this._OffsetText_Down=0,this.DEFAULTLINEWIDTH=this._symbolDot._billboardBoundsLineWidth,null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent&&(this._textContentLength=this._ctx.measureText(this._symbolDot._textContent).width),this.symbolDot.BloodVolumes.length>1){for(var t=[],i=0;i<this.symbolDot.BloodVolumes.length;i++)t.push(_0x211e34.clone(this.symbolDot.BloodVolumes[i]));this.symbolDot.BloodVolumes=t}this.fontSize=0!==this._textContentLength?this._symbolDot._symbolTextStyle._fontSize:0,this.isForVector=e;var n=this.transformPoints();this.computeImageBounds(n),this.drawPicture(n);var r=this._canvas.toDataURL("image/png");return this._xOffset=0,r},_0x3bca92.prototype.transformPoints=function(){this.computerScale();for(var e=[],t=[],i=this._symbolDot._canvasSymbolData,n=[],r=0;r<i.length;r++){(a=i[r]).surroundLineFlag&&0===this.symbolDot.symbolStyle.surroundLineType||n.push(a)}for(var o=0;o<n.length;o++){for(var a=n[o],s=[],l=0;l<a.positionPoints.length;l++)s.push(new WebGLPlot.Cartesian3(a.positionPoints[l].x,a.positionPoints[l].y,0));var u={points:s,cell:a,style:a.style,type:a.type,flag:a.surroundLineFlag};t.push(this.computePts(u))}var c=this.getMax_Y(t);for(o=0;o<t.length;o++){a=t[o];var h=[];for(l=0;l<a.points.length;l++){var d=new WebGLPlot.Cartesian2(a.points[l].x,a.points[l].y);d.y=(-d.y+c)*this._dotGridScale,d.x*=this._dotGridScale,h.push(d)}u={points:h,cell:a,style:a.style,type:a.type,flag:a.surroundLineFlag};e.push(u)}return this._symbolDot._isMiddleMarkExist&&this._symbolDot._middleMarkBounds&&(this._middleMarkBounds={},this._middleMarkBounds.x=this._symbolDot._middleMarkBounds.left*this._dotGridScale,this._middleMarkBounds.y=(-this._symbolDot._middleMarkBounds.top+c)*this._dotGridScale,this._middleMarkBounds.width=this._symbolDot._middleMarkBounds.right-this._symbolDot._middleMarkBounds.left,this._middleMarkBounds.height=this._symbolDot._middleMarkBounds.top-this._symbolDot._middleMarkBounds.bottom,this._middleMarkBounds.width*=this._dotGridScale,this._middleMarkBounds.height*=this._dotGridScale),this._symbolDot._isNegativeImage&&(e=_0x120af5(this,e)),e},_0x3bca92.prototype.computeImageBounds=function(e){this.symbolCellsBounds=this.getSymbolCellsBounds(e),this.selectedRectBounds=this.getSelectedRectBounds(this.symbolCellsBounds),this.bloodVolumeOffset=this.getBloodVolumeBounds(this.selectedRectBounds),this.textBounds=this.getContentTexBounds(this.selectedRectBounds,this.bloodVolumeOffset);var t=this.bloodVolumeOffset.LeftOffset>this.bloodVolumeOffset.RightOffset?2*this.bloodVolumeOffset.LeftOffset:2*this.bloodVolumeOffset.RightOffset,i=this.bloodVolumeOffset.DownOffset+this.bloodVolumeOffset.UpOffset,n=2*this.textBounds.LRoffset,r=Math.abs(this.textBounds.UDoffset),o=this.textBounds.UDoffset>0?this.textBounds.UDoffset:0;this.textBounds.UDoffset<0&&this.bloodVolumeOffset.DownOffset>=r?this._symbolDot._textPos!==_0x26dfeb.Down&&(r=0):this.textBounds.UDoffset<0&&this.bloodVolumeOffset.DownOffset<r&&(i=r+this.bloodVolumeOffset.UpOffset);var a,s=0;Math.abs(this.symbolCellsBounds.x/this._dotGridScale)<_0x26ecd7||this.returnisflag?(this.returnisflag=!0,s=this.selectedRectBounds.width):s=this.selectedRectBounds.width/2+2*this.DEFAULTLINEWIDTH,a=this.selectedRectBounds.height;var l=this.selectedRectBounds.width+s+t+n;l=l>this.textBounds.width?l:this.textBounds.width;var u=a+i+r+2*this.DEFAULTLINEWIDTH;this.setCanvasSize(l,u),this.symbolLROffset=l/2,this.symbolUDOffset=this.bloodVolumeOffset.UpOffset+o,this.offsetSymbolBounds(e)},_0x3bca92.prototype.getSymbolCellsBounds=function(e){if(e.length<=0)return{x:0,y:0,width:0,height:0};for(var t=[],i=[],n=0;n<e.length;n++)for(var r=e[n].points,o=0;o<r.length;o++)t.push(r[o].x),i.push(r[o].y);var a=Math.max.apply({},t),s=Math.max.apply({},i),l=Math.min.apply({},t),u=Math.min.apply({},i),c=a-l;return a<=0&&(c=Math.abs(l)-Math.abs(a)),{x:l,y:u,width:c,height:s-u}},_0x3bca92.prototype.getSelectedRectBounds=function(e){return{x:e.x-this.DEFAULTLINEWIDTH,y:e.y-this.DEFAULTLINEWIDTH,width:e.width+2*this.DEFAULTLINEWIDTH,height:e.height+2*this.DEFAULTLINEWIDTH}},_0x3bca92.prototype.getBloodVolumeBounds=function(e){for(var t=0,i=0,n=0,r=0,o=0,a=0,s=0,l=0,u=0,c=0;c<this.symbolDot.BloodVolumes.length;c++){e.x>0&&(l=e.width/2+e.x),u=e.height/2+e.y;var h=this.symbolDot.BloodVolumes[c];if(!(h instanceof _0x211e34))return{UpOffset:t,DownOffset:i,LeftOffset:n,RightOffset:r};switch(h.width>e.width&&(o=e.width),h.position){case _0x353f01.TOP:a=l-h.width/2,s=e.y-h.height-t,h.bounds={x:a,y:s,width:o,height:h.height},t+=h.height+this.DEFAULTLINEWIDTH;break;case _0x353f01.BOTTOM:a=l-h.width/2,s=e.y+e.height+h.height+i,h.bounds={x:a,y:s,width:o,height:h.height},i+=h.height+this.DEFAULTLINEWIDTH,this._OffsetText_Down=i;break;case _0x353f01.LEFT:a=e.x-h.height-n,s=u-h.width/2,h.bounds={x:a,y:s,width:h.height,height:o},n+=h.height+this.DEFAULTLINEWIDTH;break;case _0x353f01.RIGHT:a=e.x+e.width+r,s=u-h.width/2,h.bounds={x:a,y:s,width:h.height,height:o},r+=h.height+this.DEFAULTLINEWIDTH;break;default:a=l-h.width/2,s=e.y-h.height-t,h.bounds={x:a,y:s,width:o,height:h.height},t+=h.height+this.DEFAULTLINEWIDTH}}return{UpOffset:t,DownOffset:i,LeftOffset:n,RightOffset:r}},_0x3bca92.prototype.getContentTexBounds=function(e,t){var i=0,n=0,r=0,o=0,a=0,s=0;if(null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent){this.setCanvasTextFont();var l=this._ctx.measureText(this._symbolDot._textContent).width,u=this._symbolDot._textPos;switch(this._symbolDot._showMode!==_0x2bcc5b.Grid&&(u=_0x26dfeb.Up),u){case _0x26dfeb.Left:i=e.x-t.LeftOffset,n=e.height/2+e.y;break;case _0x26dfeb.Right:i=e.x+e.width+t.RightOffset,n=e.height/2+e.y;break;case _0x26dfeb.LeftUp:i=e.x-t.LeftOffset,n=e.y-this.fontSize/2,s=this.fontSize;break;case _0x26dfeb.RightUp:i=e.x+e.width+t.RightOffset,n=e.y-this.fontSize/2,s=this.fontSize;break;case _0x26dfeb.LeftDown:i=e.x-t.LeftOffset,n=e.y+e.height+this.fontSize/2,s=-this.fontSize,this._OffsetText_Down=this._OffsetText_Down>this.fontSize?this._OffsetText_Down:2*this.fontSize;break;case _0x26dfeb.RightDown:i=e.x+e.width+t.RightOffset,n=e.y+e.height+this.fontSize/2,s=-this.fontSize,this._OffsetText_Down=this._OffsetText_Down>this.fontSize?this._OffsetText_Down:2*this.fontSize;break;case _0x26dfeb.Up:i=e.x<0?0:e.width/2+e.x,n=e.y-t.UpOffset-this.fontSize/2,s=this.fontSize;break;case _0x26dfeb.Down:i=e.x<0?0:e.width/2+e.x,n=e.y+e.height+this.fontSize/2+t.DownOffset,s=-this.fontSize,this._OffsetText_Down=2*this.fontSize;case _0x26dfeb.Middle:}r=l,o=this.fontSize,a=l}return{x:i,y:n,width:r,height:o,UDoffset:s,LRoffset:a}},_0x3bca92.prototype.offsetSymbolBounds=function(e){for(var t=0;t<e.length;t++)for(var i=0;i<e[t].points.length;i++){var n=e[t].points[i];let r=e[t].cell.style.lineWidth;n.x+=this.symbolLROffset,n.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH-r/2,e[t].points[i]=n}this.selectedRectBounds.x+=this.symbolLROffset,this.selectedRectBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH,this._symbolDot._isMiddleMarkExist&&(this._symbolDot._textPos===_0x26dfeb.Middle||this._symbolDot._alwaysHasMiddelText)&&(this._middleMarkBounds.x+=this.symbolLROffset,this._middleMarkBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH),this.textBounds.x+=this.symbolLROffset,this._symbolDot._isNegativeImage&&this.returnisflag&&(4===this._symbolDot._textPos||5===this._symbolDot._textPos)?this.textBounds.x-=this.symbolCellsBounds.width/2:this.returnisflag&&(4===this._symbolDot._textPos||5===this._symbolDot._textPos)&&(this.textBounds.x=this.symbolLROffset+this.symbolCellsBounds.width/2),this.textBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH;for(var r=0;r<this.symbolDot.BloodVolumes.length;r++){var o=this.symbolDot.BloodVolumes[r];o instanceof _0x211e34&&(this._symbolDot._isNegativeImage&&this.returnisflag&&(4===o.position||5===o.position)?o.bounds.x+=this.symbolLROffset-this.selectedRectBounds.width/2:!this.returnisflag||4!==o.position&&5!==o.position?o.bounds.x+=this.symbolLROffset:o.bounds.x+=this.symbolLROffset+this.selectedRectBounds.width/2,o.bounds.y+=this.symbolUDOffset)}},_0x3bca92.prototype.setCanvasSize=function(e,t){this._canvas.setAttribute("width",e),this._canvas.setAttribute("height",t)},_0x3bca92.prototype.drawPolyline=function(e){var t=e.points,i=e.cell.style;this._ctx.beginPath(),this._ctx.moveTo(t[0].x,t[0].y);for(var n=1,r=t.length;n<r;n++)this._ctx.lineTo(t[n].x,t[n].y);this._ctx.globalAlpha=i.globalAlpha,this._ctx.setLineDash(i.dashArray),this._ctx.strokeStyle=i.lineColor,this._ctx.lineWidth=i.lineWidth,this._ctx.stroke()},_0x3bca92.prototype.drawPolygon=function(e){var t=e.points,i=e.cell.style;this._ctx.beginPath();var n=t[0].x,r=t[0].y,o=r,a=r,s=n,l=n;this._ctx.moveTo(n,r);for(var u=1;u<t.length;u++){var c=t[u].x,h=t[u].y;this._ctx.lineTo(c,h),h<o&&(o=h),h>a&&(a=h),c>l&&(l=c),c<s&&(s=c)}if(this._ctx.lineTo(t[0].x,t[0].y),0===i.fill){if(i.hasShade){var d={mode:this._symbolDot._symbolStyle._fillGradientMode,style:i,maximum:{minX:s,minY:o,maxX:l,maxY:a}},f=this.drawGradient(d);this._ctx.fillStyle=f}else this._ctx.fillStyle=i.fillStyle;this._ctx.fill()}this._ctx.globalAlpha=i.globalAlpha,this._ctx.setLineDash(i.dashArray),this._ctx.strokeStyle=i.lineColor,this._ctx.lineWidth=i.lineWidth,this._ctx.closePath(),this._ctx.stroke()},_0x3bca92.prototype.drawGradient=function(e){var t,i=e.style;const n=(100-this._symbolDot._symbolStyle.fillGradientOffsetRatioX)/100,r=(100-this._symbolDot._symbolStyle.fillGradientOffsetRatioY)/100;var o=e.maximum.minX,a=e.maximum.maxX*n,s=e.maximum.minY,l=e.maximum.maxY*r;switch(e.mode){case 1:t=this._ctx.createLinearGradient(o,s,a,l);break;case 2:var u=a-o,c=l-s,h=o+u/2,d=s+c/2,f=u>c?u/4:c/4,p=2*f;t=this._ctx.createRadialGradient(h,d,f,h,d,p)}return t.addColorStop(0,i.fillForeColor),t.addColorStop(1,i.fillBackColor),t},_0x3bca92.prototype.drawText=function(e){if(!(e.points[0].x<0||e.points[0].y<0)){var t=e.cell.cell.textContent,i=e.cell.cell.textStyle,n=i.fontScale,r=i.fontName,o=i.fontHeight*n*.7*this._dotGridScale;if(!(o<4)){i.bold?this._ctx.font="bold "+o+"px "+r:i.italic?this._ctx.font="italic "+o+"px "+r:this._ctx.font=o+"px "+r,this._ctx.textAlign="center";var a=i.align;("TOPLEFT"===a||"TOPCENTER"===a||"TOPRIGHT"===a)&&(this._ctx.textBaseline="middle"),this._ctx.textBaseline="middle",this._ctx.fillStyle=i.foreColor.toCssColorString(),this._ctx.fillText(t,e.points[0].x,e.points[0].y+this._OffSetY)}}},_0x3bca92.prototype.computePts=function(e){var t=e.cell,i=null;_0x1c668c.SYMBOL_RECTANGLE===t.type?(i=(new _0x5f1d0b).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_ELLIPSE===t.type?(i=(new _0x509a13).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_CIRCLE===t.type?(i=(new _0x4d54a5).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_POLYBEZIER===t.type?(i=(new _0x1e88b8).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_ARC===t.type?(i=(new _0x5cf148).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_PARALLELOGRAM===t.type?(i=(new _0x3b0548).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_PIE===t.type?(i=SuperMapAlgoPlot.Primitives.sector(e.points),e.points=i):_0x1c668c.SYMBOL_KIDNEY===t.type?e.points=SuperMapAlgoPlot.Primitives.getSpatialData(SuperMapAlgoPlot.SymbolType.KIDNEY,e.points):_0x1c668c.SYMBOL_TRAPEZOID===t.type?(i=(new SymbolTrapezoid).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_CHORD===t.type&&(i=(new _0x10c3cc).calculateParts(e),e.points=i.points);return e},_0x3bca92.prototype.drawPicture=function(e,t){if(WebGLPlot.defined(t)&&t){if(this.drawBloodVolume(),_0x2bcc5b.Vector===this._symbolDot._showMode&&this._symbolDot._textPos===_0x26dfeb.Middle)return;this.drawtextContent()}else{for(var i=0;i<e.length;i++){var n=e[i],r=n.cell;this.isForVector?_0x1c668c.SYMBOL_TEXT===r.type&&this.drawText(n):_0x1c668c.SYMBOL_POLYLINE===r.type||_0x1c668c.SYMBOL_POLYBEZIER===r.type||_0x1c668c.SYMBOL_ARC===r.type?this.drawPolyline(n):_0x1c668c.SYMBOL_TEXT===r.type?this.drawText(n):this.drawPolygon(n)}this._symbolDot._showMode===_0x2bcc5b.Grid&&(null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent&&this.drawtextContent(),this.drawBloodVolume(),WebGLPlot.defined(this._symbolDot._layer.selectedFeature)&&!this.isForVector&&this._symbolDot._isSelected&&this.drawBoundingRect())}},_0x3bca92.prototype.drawtextContent=function(){var e=null,t=this._symbolDot._textPos;this._symbolDot._showMode!==_0x2bcc5b.Grid&&(t=_0x26dfeb.Up),t===_0x26dfeb.Left?e={textAlign:"right",textBaseline:"middle"}:t===_0x26dfeb.Right?e={textAlign:"left",textBaseline:"middle"}:t===_0x26dfeb.Up?(e={textAlign:"center",textBaseline:"middle"},this.returnisflag&&(e.x=(this._canvas.width+this._symbolWidth)/2)):t===_0x26dfeb.Down||t===_0x26dfeb.Middle?e={textAlign:"center",textBaseline:"middle"}:t===_0x26dfeb.LeftUp||t===_0x26dfeb.LeftDown?e={textAlign:"right",textBaseline:"middle"}:(t===_0x26dfeb.RightUp||t===_0x26dfeb.RightDown)&&(e={textAlign:"left",textBaseline:"middle"}),this.drawText2(e)},_0x3bca92.prototype.drawText2=function(e){if(e){var t=this._symbolDot._textContent,i=this._symbolDot._symbolTextStyle;this.setCanvasTextFont(),this._ctx.textAlign=e.textAlign,this._ctx.textBaseline=e.textBaseline;var n=0,r=0;if(this._middleMarkBounds&&(n=this._middleMarkBounds.x+this._middleMarkBounds.width/2,r=this._middleMarkBounds.y+this._middleMarkBounds.height/2),i._outline){this._ctx.setLineDash([]);var o=this._ctx.lineWidth;this._ctx.lineWidth=i.outlineWidth;var a=i._backColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x26dfeb.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.strokeStyle=a,this._ctx.strokeText(t,n,r,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x26dfeb.Middle&&(this._ctx.strokeStyle=a,this._ctx.strokeText(t,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.strokeStyle=a,this._ctx.strokeText(t,n,r,this._middleMarkBounds.width)),this._ctx.lineWidth=o}var s=i.foreColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x26dfeb.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.fillStyle=s,this._ctx.fillText(t,n,r,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x26dfeb.Middle&&(this.drawTextBoundsRect(i),this._ctx.fillStyle=s,this._ctx.fillText(t,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.fillStyle=s,this._ctx.fillText(t,n,r,this._middleMarkBounds.width))}},_0x3bca92.prototype.drawTextBoundsRect=function(e){if(e.isShowTextBox){let t,i=this.textBounds.y-e.fontSize/2,n=this.textBounds.width,r=this.textBounds.height;switch(this._ctx.textAlign){case"center":t=this.textBounds.x-this.textBounds.width/2;break;case"right":t=this.textBounds.x-this.textBounds.width;break;case"left":t=this.textBounds.x}this._ctx.fillStyle=e.textBoxColor.toCssColorString(),this._ctx.fillRect(t,i,n,r),this._ctx.beginPath(),this._ctx.lineWidth="2",this._ctx.strokeStyle=e.textBoxLineColor.toCssColorString(),this._ctx.rect(t,i,n-1,r),this._ctx.stroke()}},_0x3bca92.prototype.drawBoundingRect=function(){var e=this.selectedRectBounds.x+this.DEFAULTLINEWIDTH/2,t=this.selectedRectBounds.y+this.DEFAULTLINEWIDTH/2,i=this.selectedRectBounds.width-1.5*this.DEFAULTLINEWIDTH,n=this.selectedRectBounds.height-2*this.DEFAULTLINEWIDTH;this._ctx.beginPath(),this._ctx.rect(e,t,i,n),this._ctx.strokeStyle=this._symbolDot._billboardBoundsColor.toCssColorString(),this._ctx.lineWidth=this.DEFAULTLINEWIDTH,this._ctx.setLineDash([]),this._ctx.closePath(),this._ctx.stroke()},_0x3bca92.prototype.drawBloodVolume=function(){if(this._symbolDot.bIsShowBloodVolume)for(var e=0;e<this.symbolDot.BloodVolumes.length;e++){var t=this.symbolDot.BloodVolumes[e];if(!t.bounds)return;var i=t.bounds,n=t.position,r=0,o=0,a=0,s=0;switch((this._symbolDot._showMode===_0x2bcc5b.Marker||this._symbolDot._showMode===_0x2bcc5b.Vector)&&(n=_0x353f01.TOP),n){case _0x353f01.TOP:case _0x353f01.BOTTOM:r=t.width,o=t.height,a=t.width*t.volume,s=t.height;break;case _0x353f01.LEFT:case _0x353f01.RIGHT:r=t.height,o=t.width,a=t.height,s=t.width*t.volume}this._ctx.beginPath();var l=t.style.fillColor,u=t.style.frameColor,c=new WebGLPlot.Color(l.red,l.green,l.blue,this._symbolDot._symbolStyle._opacity),h=new WebGLPlot.Color(u.red,u.green,u.blue,this._symbolDot._symbolStyle._opacity);this._ctx.fillStyle=c.toCssColorString(),this._ctx.fillRect(i.x,i.y,a,s),this._ctx.lineWidth=.5,this._ctx.strokeStyle=h.toCssColorString(),this._ctx.rect(i.x,i.y,r,o),this._ctx.stroke(),this._ctx.closePath()}},_0x3bca92.prototype.initCanvas=function(){WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas")),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._ctx.scale(this._dotGridScale,this._dotGridScale)},_0x3bca92.prototype.setCanvasTextFont=function(){var e=this._symbolDot._symbolTextStyle,t=e.fontName,i=e._fontSize;e.bold?this._ctx.font="bold "+i+"px "+t:e.italic?this._ctx.font="italic "+i+"px "+t:this._ctx.font=i+"px "+t},_0x3bca92.prototype.getMax_Y=function(e){for(var t=[],i=0;i<e.length;i++)for(var n=e[i],r=0;r<n.points.length;r++)t.push(n.points[r].y);return Math.max.apply({},t)},_0x3bca92.prototype.computerScale=function(){var e=1;this._symbolSize=new WebGLPlot.Cartesian2(this._symbolDot._gridSymbolSize.x,this._symbolDot._gridSymbolSize.y);var t=this._symbolDot._symbolSizeInLib;if(t.x>0&&t.y>0){var i=this._symbolSize.x/t.x,n=this._symbolSize.y/t.y;e=i>n?i:n}this._dotGridScale=this._symbolDot._scale*e},_0x3bca92.prototype.bIsChangHeight=function(){return this.symbolMoveToDown=!1,this.symbolMoveToUp=!1,this.symbolMoveToLR=!1,(0!==this._symbolDot._textContent.length||!_0x1b7bea(this._symbolDot._textContent))&&(this._symbolDot._textPos===_0x26dfeb.Down||this._symbolDot._textPos===_0x26dfeb.RightDown||this._symbolDot._textPos===_0x26dfeb.LeftDown?(this.symbolMoveToUp=!0,!0):this._symbolDot._textPos===_0x26dfeb.Up||this._symbolDot._textPos===_0x26dfeb.RightUp||this._symbolDot._textPos===_0x26dfeb.LeftUp?(this.symbolMoveToDown=!0,!0):((this._symbolDot._textPos===_0x26dfeb.Left||this._symbolDot._textPos===_0x26dfeb.Right)&&(this.symbolMoveToLR=!0),!1))},_0x3bca92.prototype.drawDotModelTextAndBloodVolume=function(){this.getModelTextAndBloodVolumeBounds(),this.drawPicture([],!0);var e=this._canvas.toDataURL("image/png");return this._xOffset=0,e},_0x3bca92.prototype.getModelTextAndBloodVolumeBounds=function(){var e=0,t=0;this._symbolDot._textContent.length>0&&(this.fontSize=this._symbolDot._symbolTextStyle._fontSize,this.setCanvasTextFont(),e=this._ctx.measureText(this._symbolDot._textContent).width,t+=this.fontSize);for(var i=0;i<this.symbolDot.BloodVolumes.length;i++){e=(r=this.symbolDot.BloodVolumes[i]).width>e?r.width:e,t+=r.height+this.DEFAULTLINEWIDTH}this.textBounds={x:e/2,y:this.fontSize/2,width:this._ctx.measureText(this._symbolDot._textContent).width,height:this.fontSize},this.setCanvasSize(e,t);var n=t;for(i=0;i<this.symbolDot.BloodVolumes.length;i++){var r,o=(e-(r=this.symbolDot.BloodVolumes[i]).width)/2;n-=r.height+this.DEFAULTLINEWIDTH,r.bounds={x:o,y:n,width:r.width,height:r.height}}};var _0x463006=(_0x3f91be=!0,function(e,t){var i=_0x3f91be?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f91be=!1,i}),_0x2b60b3=_0x463006(void 0,(function(){return _0x2b60b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b60b3).search("(((.+)+)+)+$")})),_0x3f91be;function _0x180939(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._display=e._display,this.modelMatrix=_0x2909c1.computeMatrix(this._symbolDot.localPoints[0],this._symbolDot._vectorRotate),this._primitives=[]}_0x2b60b3(),Object.defineProperties(_0x180939.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x180939.prototype.drawDotSymbolVector=function(){if(!WebGLPlot.defined(this._symbolDot))return;if(this._primitives=[],-1===this._symbolDot.vectorDefaultSize){var e=this._symbolDot._layer._scene,t=e.camera.position,i=WebGLPlot.Cartesian3.fromDegrees(this._symbolDot.localPoints[0].x,this._symbolDot.localPoints[0].y,this._symbolDot.localPoints[0].z),n=_0x2909c1.getSpaceDistanceByCartesian(t,i);if(this._symbolDot.vectorDefaultSize=n/1e3,2===e.mode){var r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(e,i),o=new WebGLPlot.Cartesian2(r.x+10,r.y),a=_0x2909c1.getPosition(e,o),s=WebGLPlot.Cartesian3.fromDegrees(a.x,a.y,a.z),l=_0x2909c1.getSpaceDistanceByCartesian(i,s);this._symbolDot.vectorDefaultSize=l/10}}var u=new WebGLPlot.Cartesian3(this._symbolDot.vectorRotate.x,this._symbolDot.vectorRotate.y,this._symbolDot.vectorRotate.z);0!==u.y&&0===u.x&&(u.x=1),this.modelMatrix=_0x2909c1.computeMatrix(this._symbolDot.localPoints[0],u,this.modelMatrix);var c=this.createGeometryInstances(),h=new WebGLPlot.PolylineColorAppearance({translucent:!0});let d=new WebGLPlot.Primitive({geometryInstances:c,appearance:h,asynchronous:!1,compressVertices:!0,show:this._symbolDot._display});return this._primitives.push(d),this._primitives},_0x180939.prototype.createGeometryInstances=function(){var e,t,i,n=this._symbolDot._innerCells,r=[],o=[],a=[],s=[],l=[],u=[];this.isHasTextCell=!1;for(var c=0;c<n.length;c++){var h,d=n[c];if(!d.surroundLineFlag||0!==this._symbolDot.symbolStyle.surroundLineType){if(h=this._symbolDot._dotGrid.computePts({cell:d,points:d.positionPoints}).points,_0x1c668c.SYMBOL_POLYLINE!==d.type&&_0x1c668c.SYMBOL_POLYBEZIER!==d.type&&_0x1c668c.SYMBOL_ARC!==d.type&&_0x1c668c.SYMBOL_TEXT!==d.type&&h.push(h[0]),_0x1c668c.SYMBOL_TEXT===d.type){this.isHasTextCell=!0;continue}for(var f=[],p=0;p<h.length;p++){var _=new WebGLPlot.Cartesian2(h[p].x,h[p].y),m=this.localPtsToCartesian(_,this.modelMatrix);f.push(new WebGLPlot.Cartesian3(m.position.x,m.position.y,m.position.z)),s.push(h[p].x),l.push(h[p].y),a.push(m.vector.y),o.push(m.vector.z),d.surroundLineFlag||u.push(m.position)}var g=this._symbolDot.gridLineWidth,x=new WebGLPlot.PolylineGeometry({positions:f,VertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY,width:g}),y=WebGLPlot.PolylineGeometry.createGeometry(x);if(WebGLPlot.defined(y)){e=d.surroundLineFlag&&0!==this._symbolDot.symbolStyle.surroundLineType?this._symbolDot.symbolStyle.surroundLineColor:this._symbolDot.symbolStyle.lineColor,n[c].lineColorLimit&&(i=n[c].style.lineColor,e=new WebGLPlot.Color(i.red/255,i.green/255,i.blue/255,i.alpha/255)),n[c].fillLimit&&!d.surroundLineFlag&&(n[c].fillColorLimit?(i=n[c].style.fillForeColor,t=new WebGLPlot.Color(i.red/255,i.green/255,i.blue/255,i.alpha/255)):t=e,this.createFillGeomtery(h,f,t,this._symbolDot.id)),(d.type!==_0x1c668c.SYMBOL_POLYLINE||d.type!==_0x1c668c.SYMBOL_POLYLINE||d.type!==_0x1c668c.SYMBOL_POLYLINE||d.type!==_0x1c668c.SYMBOL_TEXT)&&0===this._symbolDot._symbolStyle._fillSymbolID&&!d.surroundLineFlag&&((t=this._symbolDot._symbolStyle.fillForeColor).alpha=1-this._symbolDot._symbolStyle.fillOpaqueRate/100,this.createFillGeomtery(h,f,t,this._symbolDot.id)),e=WebGLPlot.Color.fromAlpha(e,this._symbolDot._symbolStyle.opacity);var v=new WebGLPlot.GeometryInstance({geometry:y,id:this._symbolDot.id,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(e)}});r.push(v)}}}var $=Math.max.apply({},o),b=Math.min.apply({},o),T=Math.max.apply({},a),C=Math.min.apply({},a);return C<0&&(T-=C),b<0&&($-=b),this.vectorHeight=$>T?$:T,0!==this._symbolDot.vectorRotate.y||0!==this._symbolDot.vectorRotate.x?this.createTextCell2(u):this.createTextCell(s,l),r},_0x180939.prototype.createFillGeomtery=function(e,t,i,n){var r=[],o=[],a=_0x2909c1.Resolve(e);if(!a||a.length<3)return null;for(var s=0;s<a.length;s+=3){o[0]=t[a[s]],o[1]=t[a[s+1]],o[2]=t[a[s+2]];var l=this.createTrigonFillGeomterys(o,i,n);l&&r.push(l)}if(0===r.length)return null;var u=new WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),c=new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.MaterialAppearance({material:u,aboveGround:!0}),show:this._display,asynchronous:!1});c.plottingLayer=this._symbolDot._layer,this._primitives.push(c)},_0x180939.prototype.createTrigonFillGeomterys=function(e,t,i){var n=new WebGLPlot.PolygonHierarchy(e,[]),r=new WebGLPlot.PolygonGeometry({polygonHierarchy:n,perPositionHeight:!0}),o=WebGLPlot.PolygonGeometry.createGeometry(r);return o?new WebGLPlot.GeometryInstance({geometry:o,id:i}):null},_0x180939.prototype.getTextBoundPts=function(e,t,i){var n=[],r=[],o=Math.max.apply({},e),a=Math.min.apply({},e),s=Math.max.apply({},t),l=Math.min.apply({},t),u=(l<0?s-l:s)*(this._symbolDot.vectorScale*this._symbolDot.vectorDefaultSize);r.push(new WebGLPlot.Cartesian2(a,l)),r.push(new WebGLPlot.Cartesian2(o,l));var c=0;this._symbolDot._isMiddleMarkExist&&!i&&(c=l>0?l/s:l/(s-l));for(var h=[],d=[],f=0;f<r.length;f++){var p=r[f],_=this.localPtsToCartesian(p,this.modelMatrix).position;n.push(new WebGLPlot.Cartesian3(_.x,_.y,_.z)),h.push(this._symbolDot.localPoints[0].z+u),d.push(this._symbolDot.localPoints[0].z+u*c)}return{potions:n,maxExtendWallHeight:h,minExtendWallHeight:d}},_0x180939.prototype.localPtsToCartesian=function(e,t){var i=new WebGLPlot.Cartesian3,n=new WebGLPlot.Cartesian3,r=this._symbolDot.vectorScale*this._symbolDot.vectorDefaultSize;return n=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1,-e.x,e.y),r,n),{position:i=WebGLPlot.Matrix4.multiplyByPoint(t,n,i),vector:n}},_0x180939.prototype.createTextGeometry=function(e,t,i){var n=this.getTextBoundPts(e,t,i),r=new WebGLPlot.WallGeometry({positions:n.potions,maximumHeights:n.maxExtendWallHeight,minimumHeights:n.minExtendWallHeight}),o=WebGLPlot.WallGeometry.createGeometry(r);return o?new WebGLPlot.GeometryInstance({geometry:o,id:this._symbolDot.id}):null},_0x180939.prototype.createTextCell=function(e,t){if(this.isHasTextCell){var i=this._symbolDot._dotGrid.drawDotSymbolGraphic(!0),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=this.createTextGeometry(e,t,!0),o=new WebGLPlot.Primitive({geometryInstances:[r],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});o.plottingLayer=this._symbolDot._layer,this._primitives.push(o)}},_0x180939.prototype.createTextCell2=function(e){if(this.isHasTextCell){var t=this.createPolygon(e),i=this._symbolDot._dotGrid.drawDotSymbolGraphic(!0),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=new WebGLPlot.Primitive({geometryInstances:[t],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});r.plottingLayer=this._symbolDot._layer,this._primitives.push(r)}},_0x180939.prototype.createMiddleText=function(e){var t=[],i=[],n=[],r=[];t.push(new WebGLPlot.Cartesian2(e.left,e.top)),t.push(new WebGLPlot.Cartesian2(e.left,e.bottom)),t.push(new WebGLPlot.Cartesian2(e.right,e.bottom)),t.push(new WebGLPlot.Cartesian2(e.right,e.top)),t.push(new WebGLPlot.Cartesian2(e.left,e.top));for(var o=e.right-e.left,a=e.top-e.bottom,s=new WebGLPlot.Cartesian2(o/2,a/2),l=0;l<t.length;l++)i.push(t[l].x),n.push(t[l].y),r.push(this.localPtsToCartesian(t[l],this.modelMatrix).position);WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas")),this._canvas.setAttribute("width",o),this._canvas.setAttribute("height",a),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);var u=this._symbolDot._textContent,c=this._symbolDot._symbolTextStyle,h=c.fontName,d=c._fontSize;c.bold?this._ctx.font="bold "+d+"px "+h:c.italic?this._ctx.font="italic "+d+"px "+h:this._ctx.font=d+"px "+h,this._ctx.textAlign="center",this._ctx.textBaseline="middle",c._outline?(this._ctx.strokeStyle=this._symbolDot.colorToString(c._outlineColor),this._ctx.strokeText(u,s.x,s.y,o)):(this._ctx.fillStyle=this._symbolDot.colorToString(c.foreColor),this._ctx.fillText(u,s.x,s.y,o)),0!==this._symbolDot.vectorRotate.y||0!==this._symbolDot.vectorRotate.x?this.createTextContent2(r):this.createTextContent(i,n)},_0x180939.prototype.createTextContent2=function(e){var t=this.createPolygon(e),i=this._canvas.toDataURL("image/png"),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=new WebGLPlot.Primitive({geometryInstances:[t],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});r.plottingLayer=this._symbolDot._layer,this._primitives.push(r)},_0x180939.prototype.createTextContent=function(e,t){var i=this.createTextGeometry(e,t,!1),n=this._canvas.toDataURL("image/png"),r=new WebGLPlot.Material.fromType("Image",{image:n}),o=new WebGLPlot.Primitive({geometryInstances:[i],appearance:new WebGLPlot.MaterialAppearance({material:r}),show:this._display,asynchronous:!1});o.plottingLayer=this._symbolDot._layer,this._primitives.push(o)},_0x180939.prototype.createPolygon=function(e){var t=WebGLPlot.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0}),i=WebGLPlot.PolygonGeometry.createGeometry(t);return new WebGLPlot.GeometryInstance({geometry:i,id:this.id})};var _0x428fca=(_0x74de30=!0,function(e,t){var i=_0x74de30?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x74de30=!1,i}),_0xa2f822=_0x428fca(void 0,(function(){return _0xa2f822.toString().search("(((.+)+)+)+$").toString().constructor(_0xa2f822).search("(((.+)+)+)+$")})),_0x74de30;function _0x231a11(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._picturePath=WebGLPlot.defaultValue(e.symbolDot._picturePath,""),this._canvas=void 0,this.initCanvas()}_0xa2f822(),Object.defineProperties(_0x231a11.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x231a11.prototype.drawDotSymbolPicture=function(e){var t=this._symbolDot._billboardBoundsLineWidth,i=this._symbolDot.pictureSymbolSize.x*this._symbolDot.scale,n=this._symbolDot.pictureSymbolSize.y*this._symbolDot.scale,r=this._symbolDot.pictureSymbolSize.x*this._symbolDot.scale,o=this._symbolDot.pictureSymbolSize.y*this._symbolDot.scale,a=0;if(this.textBounds={x:0,y:0,width:0,height:0},this._symbolDot._textContent&&""!==this._symbolDot._textContent){a=this._symbolDot._symbolTextStyle._fontSize,this.setCanvasTextFont();let e=this._ctx.measureText(this._symbolDot._textContent).width;i=e>i?e:i,this.textBounds={x:i/2,y:a/2,width:e,height:a}}this._canvas.setAttribute("width",i+2*t),this._canvas.setAttribute("height",n+2*t+a),this._symbolDot._textContent&&""!==this._symbolDot._textContent&&this.drawText();var s=(this._canvas.width-r)/2;return this._ctx.drawImage(e,s,a,r,o),this._symbolDot._isSelected&&this.drawBoundingRect(t),this._canvas.toDataURL("image/png")},_0x231a11.prototype.drawText=function(){var e=this._symbolDot._textContent,t=this._symbolDot._symbolTextStyle;this.setCanvasTextFont(),this._ctx.textAlign="center",this._ctx.textBaseline="middle";var i=0,n=0;if(this._middleMarkBounds&&(i=this._middleMarkBounds.x+this._middleMarkBounds.width/2,n=this._middleMarkBounds.y+this._middleMarkBounds.height/2),t._outline){this._ctx.setLineDash([]);var r=this._ctx.lineWidth;this._ctx.lineWidth=t.outlineWidth;var o=t._outlineColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x26dfeb.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.strokeStyle=o,this._ctx.strokeText(e,i,n,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x26dfeb.Middle&&(this._ctx.strokeStyle=o,this._ctx.strokeText(e,this.textBounds.x,this.textBounds.y)),this._ctx.lineWidth=r}var a=t.foreColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x26dfeb.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.fillStyle=a,this._ctx.fillText(e,i,n,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x26dfeb.Middle&&(this.drawTextBoundsRect(t),this._ctx.fillStyle=a,this._ctx.fillText(e,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.fillStyle=a,this._ctx.fillText(e,i,n,this._middleMarkBounds.width))},_0x231a11.prototype.drawTextBoundsRect=function(e){if(e.isShowBackColor){let t,i=this.textBounds.y-e.fontSize/2,n=this.textBounds.width,r=this.textBounds.height;switch(this._ctx.textAlign){case"center":t=this.textBounds.x-this.textBounds.width/2;break;case"right":t=this.textBounds.x-this.textBounds.width;break;case"left":t=this.textBounds.x}this._ctx.fillStyle=WebGLPlot.Color.fromCssColorString(e.backColor),this._ctx.fillRect(t,i,n,r)}},_0x231a11.prototype.setCanvasTextFont=function(){var e=this._symbolDot._symbolTextStyle,t=e.fontName,i=e._fontSize;e.bold?this._ctx.font="bold "+i+"px "+t:e.italic?this._ctx.font="italic "+i+"px "+t:this._ctx.font=i+"px "+t},_0x231a11.prototype.drawBoundingRect=function(e){this._ctx.beginPath(),this._ctx.moveTo(e/2,e/2+this.textBounds.height),this._ctx.lineTo(e/2,this._canvas.height-e/2),this._ctx.lineTo(this._canvas.width-e/2,this._canvas.height-e/2),this._ctx.lineTo(this._canvas.width-e/2,e/2+this.textBounds.height),this._ctx.lineTo(e/2,e/2+this.textBounds.height),this._ctx.strokeStyle=this._symbolDot._billboardBoundsColor.toCssColorString(),this._ctx.lineWidth=e,this._ctx.closePath(),this._ctx.stroke()},_0x231a11.prototype.initCanvas=function(){WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas"),this._canvas.width=this._symbolDot.pictureSymbolSize.x,this._canvas.height=this._symbolDot.pictureSymbolSizey),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height)};var _0x68d5fd=(_0x25a027=!0,function(e,t){var i=_0x25a027?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x25a027=!1,i}),_0x9e9b5b=_0x68d5fd(void 0,(function(){return _0x9e9b5b.toString().search("(((.+)+)+)+$").toString().constructor(_0x9e9b5b).search("(((.+)+)+)+$")})),_0x25a027;_0x9e9b5b();class _0x4844fd extends _0x2d9130{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),WebGLPlot.defined(e.serverData)?this._getServerDataPrototype(e.serverData):(this._anchorPoint=WebGLPlot.defaultValue(e.anchorPoint,new WebGLPlot.Cartesian2(0,0)),this._gridSymbolSize=WebGLPlot.defaultValue(e.gridSymbolSize,new WebGLPlot.Cartesian2(0,0)),this._symbolSizeInLib=WebGLPlot.defaultValue(e.symbolSizeInLib,new WebGLPlot.Cartesian2(-1,-1)),this._symbolRanks=WebGLPlot.defaultValue(e.symbolRanks,[]),this._middleMarkBounds=WebGLPlot.defaultValue(e.middleMarkBounds,null),this._symbolSize=WebGLPlot.defaultValue(e.symbolSize,new WebGLPlot.Cartesian2(-1,-1)),this._innerCells=[]),this._scale=WebGLPlot.defaultValue(e.scale,.8),this._rotate=WebGLPlot.defaultValue(e.rotate,new _0x23de81(0,0,0)),this._modelScale=WebGLPlot.defaultValue(e.modelScale,new _0x23de81(1,1,1)),this._modelRotate=WebGLPlot.defaultValue(e.modelRotate,new _0x23de81(0,0,0)),this._vectorRotate=WebGLPlot.defaultValue(e.vectorRotate,new _0x23de81(0,0,0)),this._vectorScale=WebGLPlot.defaultValue(e.vectorScale,1),this._vectorDefaultSize=WebGLPlot.defaultValue(e.vectorDefaultSize,-1),this._gridLineWidth=WebGLPlot.defaultValue(e.gridLineWidth,3),this._gridSurroundLineWidth=WebGLPlot.defaultValue(e.gridSurroundLineWidth,3),this._pictureSymbolSize=WebGLPlot.defaultValue(e.pictureSymbolSize,new WebGLPlot.Cartesian2(64,64)),this._picturePath=WebGLPlot.defaultValue(e.picturePath,""),this._showMode=WebGLPlot.defaultValue(e.showMode,_0x2bcc5b.Grid),this._isNegativeImage=WebGLPlot.defaultValue(e.isNegativeImage,!1),this._symbolRank=WebGLPlot.defaultValue(e.symbolRank,0),this._lineSymbolID=WebGLPlot.defaultValue(e.lineSymbolID,0),this._modelPath=WebGLPlot.defaultValue(e.modelPath,""),this._textPos=WebGLPlot.defaultValue(e.textPos,_0x26dfeb.Up),this._hasDragLine=WebGLPlot.defaultValue(e.hasDragLine,!1),this._dragPoint=WebGLPlot.defaultValue(e.dragPoint,new _0x23de81(-1,-1,-1)),this._textContent=WebGLPlot.defaultValue(e.textContent,""),this._canvasEle=null,this._prepicturePath=null,this._canvasSymbolData=[],this._imageResult=null,this._isFlagSymbol=!1,this._dotGrid=null,this._dotPicture=null,this._dotVector=null,this._sizeInMeters=!1,this._alwaysHasMiddelText=!1,this._bill=null,this._modelColor=new WebGLPlot.Color(1,1,1,1),this.billboard=null,this.mergeDefaultStyle(),this.bIsShowBloodVolume=WebGLPlot.defaultValue(e.bIsShowBloodVolume,!0),this.BloodVolumes=WebGLPlot.defaultValue(e.bloodVolumes,[]),this._isMiddleMarkExist=null!==this._serverData&&this._serverData.middleMarkExist,this._middleMarkBounds=null!==this._serverData&&this._serverData.middleMarkBounds,this._symbolSizeInMeters=new WebGLPlot.Cartesian2(-1,-1),this._symbolPictureSizeInMeters=new WebGLPlot.Cartesian2(-1,-1),this._BillboardScale=1,this._billboardBoundsColor=new WebGLPlot.Color(1,1,0,1),this._billboardBoundsLineWidth=3,this._modelAnimationPlay=WebGLPlot.defaultValue(e.modelAnimationPlay,!0),this._modelAnimationLoop=WebGLPlot.defaultValue(e.modelAnimationLoop,WebGLPlot.ModelAnimationLoop.REPEAT),this._modelAnimationMultiplier=WebGLPlot.defaultValue(e.modelAnimationMultiplier,1),this._modelAnimationReverse=WebGLPlot.defaultValue(e.modelAnimationReverse,!1),this.__initSymbolPointSymbolData(),this._vectorPrimitives=[]}initSymbol(e){if((!this._initialize||e)&&!(this.localPoints.length<=0||0!==this.libID&&this._innerCells.length<=0)){this._initialize=!0,this.computerBillboardScaleInMeters(),_0x4786d3.removeAllAlgoLabel(this,this._layer._scene),this.__resetBillboard(),this._canvasSymbolData=[],0!==this._wholeHeight&&(this.localPoints[0].z=this._wholeHeight);var t=this.localPoints[0],i=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z);switch(null===this._dotGrid&&(this._dotGrid=new _0x3bca92({symbolDot:this})),this._showMode){case _0x2bcc5b.Grid:case _0x2bcc5b.Picture:this._createPicture(i,e);break;case _0x2bcc5b.Marker:this._createModel(i);break;case _0x2bcc5b.Vector:this._createVector()}this.addTextContent(t),this.drawAnnotationArray(),_0x2bcc5b.Picture!==this._showMode&&this.updateEditCtrl(e),this._initSymbolFinished.raiseEvent(this)}}createBillboard(e,t){return{id:this.id,show:this.display,position:e,image:t,pixelOffset:new WebGLPlot.Cartesian2(0,this._dotGrid._OffsetText_Down),horizontalOrigin:WebGLPlot.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot.VerticalOrigin.BOTTOM,disableDepthTestDistance:this.disableDepthTestDistance,color:WebGLPlot.Color.WHITE.withAlpha(this._symbolStyle._opacity),sizeInMeters:this._sizeInMeters,scale:this._BillboardScale}}computerBillboardScaleInMeters(){if(this._sizeInMeters&&-1===this._symbolSizeInMeters.x&&-1===this._symbolSizeInMeters.y&&this.showMode===_0x2bcc5b.Grid)this._symbolSizeInMeters=_0x2909c1.pixelDisToRealDisInMeters(this._layer._scene,this._gridSymbolSize),this._BillboardScale=this._symbolSizeInMeters.x/this._gridSymbolSize.x;else if(this._sizeInMeters&&(-1!==this._symbolSizeInMeters.x||-1!==this._symbolSizeInMeters.y)&&this.showMode===_0x2bcc5b.Grid){var e=this._symbolSizeInMeters.x/this._gridSymbolSize.x;this._symbolSizeInMeters.y=e*this._gridSymbolSize.y,this._BillboardScale=e}if(this._sizeInMeters&&-1===this._symbolPictureSizeInMeters.x&&-1===this._symbolPictureSizeInMeters.y&&this.showMode===_0x2bcc5b.Picture)this._symbolPictureSizeInMeters=_0x2909c1.pixelDisToRealDisInMeters(this._layer._scene,this._pictureSymbolSize),this._BillboardScale=this._symbolPictureSizeInMeters.x/this._pictureSymbolSize.x;else if(this._sizeInMeters&&(-1!==this._symbolPictureSizeInMeters.x||-1!==this._symbolPictureSizeInMeters.y)&&this.showMode===_0x2bcc5b.Picture){e=this._symbolPictureSizeInMeters.x/this._pictureSymbolSize.x;this._symbolPictureSizeInMeters.y=e*this._pictureSymbolSize.y,this._BillboardScale=e}}__resetBillboard(){WebGLPlot.defined(this.billboard)&&(_0x4786d3.removeBillboard(this.billboard,this._layer._scene),this.billboard=void 0)}updateEditCtrl(e){if(!e&&WebGLPlot.defined(this._layer.selectedFeature)&&this.id===this._layer.selectedFeature.id&&this.display){var t=this;WebGLPlot.defined(this._model)&&this._model.readyPromise.then((function(e){_0x2bcc5b.Marker===t._showMode&&t._layer._plottingEdit.drawModelEditObject(!0)})),WebGLPlot.defined(this.s3mInstance)&&this.s3mInstance._boundingSphere&&(_0x2bcc5b.Marker,t._showMode),this.display,(_0x2bcc5b.Grid===t._showMode||_0x2bcc5b.Picture===t._showMode)&&this._layer._plottingEdit.createCtrlPoints(this),_0x2bcc5b.Vector===t._showMode&&t._layer._plottingEdit.drawVectorEditObject(!0),_0x2bcc5b.Marker===t._showMode&&this._layer._plottingEdit.CtrlPosition.removeAll()}}copyStyle(){for(var e=0;e<this._innerCells.length;e++){var t=this._innerCells[e],i=this.copySymbolStyle(t,this._symbolStyle);let n=null;t.textStyle?n=this.copySymbolTextStyle(t.textStyle):t.textStyle2D&&(n=this.copySymbolTextStyle(t.textStyle2D)),this._canvasSymbolData.push({positionPoints:t.positionPoints,surroundLineFlag:t.surroundLineFlag,style:i,type:t.type,textStyle:n,textContent:t.textContent})}}copySymbolTextStyle(e){let t=e.backColor;!(e.backColor instanceof WebGLPlot.Color)&&e.backColor.alpha>1?e.backColor=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha):e.backColor=new WebGLPlot.Color(t.red,t.green,t.blue,t.alpha);let i=e.foreColor;return!(e.foreColor instanceof WebGLPlot.Color)&&e.foreColor.alpha>1?e.foreColor=WebGLPlot.Color.fromBytes(i.red,i.green,i.blue,i.alpha):e.foreColor=new WebGLPlot.Color(i.red,i.green,i.blue,i.alpha),e}copySymbolStyle(e,t){var i={};if(e.surroundLineFlag)i.lineColor=t.surroundLineColor.toCssColorString(),i.lineWidth=this._gridSurroundLineWidth,i.dashArray=[];else{i.lineWidth=this._gridLineWidth;var n=t.lineColor;i.lineColor=n.toCssColorString();var r=WebGLPlot.Color.clone(t.fillForeColor);if(r.alpha=1-t.fillOpaqueRate/100,i.fillStyle=r.toCssColorString(),i.hasShade=!1,0!==t.fillGradientMode&&(i.hasShade=!0,t.fillForeColor.alpha=1-t.fillOpaqueRate/100,t.fillBackColor.alpha=1-t.fillOpaqueRate/100,i.fillForeColor=t.fillForeColor.toCssColorString(),i.fillBackColor=t.fillBackColor.toCssColorString()),i.fill=t.fillSymbolID,i.dashArray=_0x45e269(this._lineSymbolID),e.lineColorLimit){let t=e.style.lineColor;n=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha),i.lineColor=n.toCssColorString()}if(e.lineTypeLimit&&(i.lineTypeLimit=!0),e.fillColorLimit){let t=e.style.fillForeColor;var o=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha);o.alpha=e.style.fillOpaqueRate/100,i.fillStyle=o.toCssColorString()}if(e.fillLimit&&(i.fill=e.style.fillSymbolID,i.fillLimit=!0,!e.fillColorLimit)){var a=WebGLPlot.Color.clone(n);a.alpha=e.style.fillOpaqueRate/100,i.fillStyle=a.toCssColorString()}}return i.markerSize=e.style.markerSize,i.globalAlpha=t.opacity,i}setShowMode(e){this._showMode=e}getShowMode(){return this._showMode}setScale(e){if(_0x2bcc5b.Vector==this._showMode)this._scale=e;else{if(_0x2bcc5b.Marker!=this._showMode)return;this._modelScale=new _0x23de81(e,e,e)}}getScale(){return _0x2bcc5b.Vector==this._showMode?this._scale:_0x2bcc5b.Marker==this._showMode?this._modelScale:new _0x23de81(1,1,1)}setRotate(e){if(_0x2bcc5b.Vector==this._showMode)this._rotate=e;else{if(_0x2bcc5b.Marker!=this._showMode)return;this._modelRotate=e}}getRotate(){return _0x2bcc5b.Vector==this._showMode?this._rotate:_0x2bcc5b.Marker==this._showMode?this._modelRotate:void 0}setSymbolSize(e){if(_0x2bcc5b.Grid===this._showMode){var t=e,i=this._gridSymbolSize;if(i.x!==e.x&&i.y===e.y)t.y=i.y*e.x/i.x;else if(i.x===e.x&&i.y!==e.y)t.x=i.x*e.y/i.y;else if(i.x!==e.x&&i.y!==e.y){var n=e.x/i.x,r=e.y/i.y,o=r>n?r:n;t.x=o*i.x,t.y=o*i.y}this._gridSymbolSize=t}}getSymbolSize(){if(_0x2bcc5b.Grid==this._showMode)return this._gridSymbolSize}getPicturePath(){return this._picturePath}setPicturePath(e){return 0!==e.length&&(this._picturePath=e,!0)}getSymbolName(){return this.symbolName}setModelRotate(e,t,i){if("number"==typeof e&&"number"==typeof t&&"number"==typeof i){var n=new _0x23de81(e,t,i);this.modelRotate=n}}setVectorRotate(e,t,i){var n=new _0x23de81(e,t,i);this.vectorRotate=n}addTextContent(e){var t=this;if(WebGLPlot.defined(t._textContent)){var i=t._textContent;if(_0x2bcc5b.Marker===t._showMode&&(WebGLPlot.defined(i)&&0!==i.length&&!_0x21ef32(i)||this.bIsShowBloodVolume))t._model&&t._model.readyPromise.then((function(i){_0x13ee86(e,i,t)}));else if(_0x2bcc5b.Vector===t._showMode&&(WebGLPlot.defined(i)&&0!==i.length&&!_0x21ef32(i)||this.bIsShowBloodVolume)){var n=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z+this._dotVector.vectorHeight);(t.bIsShowBloodVolume&&t.BloodVolumes.length>0||!_0x21ef32(t._textContent))&&(t._imageResult=t._dotGrid.drawDotModelTextAndBloodVolume(),t.billboard=_0x4786d3.addBillboard(t.createBillboard(n,t._imageResult),this._layer._scene),t._layer.updatePrimitive=!0)}}}addBloodVolume(e){e instanceof _0x211e34&&(this.BloodVolumes.push(e),this._initialize=!1)}_destroy(){_0x5ac1e1.getInstance().symbolDestroyed.raiseEvent(this.id),WebGLPlot.defined(this.billboard)&&null!==this.billboard&&(_0x4786d3.removeBillboard(this.billboard,this._layer._scene),this.billboard._destroy(),this.billboard=null),this.__removeDotModelAndVector(),WebGLPlot.defined(this._geoEntity)&&(this._geoEntity.destroy(),this._geoEntity=void 0),this.removeAllGeoEffect()}_createModel(e){var t=new WebGLPlot.HeadingPitchRoll,i=Math.PI/180;t.pitch=i*this._modelRotate.x,t.roll=i*this._modelRotate.y,t.heading=i*this._modelRotate.z;var n=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("north","west"),r=WebGLPlot.Transforms.headingPitchRollToFixedFrame(e,t,WebGLPlot.Ellipsoid.WGS84,n);if(this.s3mInstance&&this.s3mInstance.modelPath===this._modelPath)this.s3mInstance.updatePosition(e),this.s3mInstance.updateColor(this._modelColor),this.s3mInstance.updateScale(new Cesium.Cartesian3(this._modelScale.x,this._modelScale.x,this._modelScale.x)),this.s3mInstance.updateRotation(t),this.s3mInstance.visible=this._display;else if(void 0===this._model||this._model.basePath!==this._modelPath||this._initializeModel){this._initializeModel=!1;let i=this.modelPath.split(".");const n=i[i.length-1];switch(n){case"s3m":case"s3mb":{let i={position:e,hpr:t,scale:new Cesium.Cartesian3(this._modelScale.x,this._modelScale.x,this._modelScale.x),color:WebGLPlot.Color.clone(this._modelColor),id:this.id,visible:this._display};if(!WebGLPlot.s3mInstanceColc)throw new WebGLPlot.DeveloperError("S3MInstanceCollection is required.");WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).add(this._modelPath,i),this.s3mInstance=WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).getInstance(this._modelPath,this.id),this.s3mInstance.SymbolType=_0x1c668c.SYMBOL_DOT,this.s3mInstance.modelPath=this._modelPath;break}case"gltf":case"glb":case"s3mz":{const e={url:this._modelPath,modelMatrix:r,scale:this.modelScale,id:this.id,show:this._display,color:this._modelColor};if("gltf"==n||"glb"==n)this._model=WebGLPlot.Model.fromGltf(e),_0x2a2a94(this);else if("s3mz"==n){let t=this;if(i=this.modelPath.split("iserver"),i.length>1){let n=i[0]+"iserver/services/MGISDataSystemServer/rest/domainComponents/MGISDataQueryImpl/deCodeModelResult.json?";n+="arg0="+this.modelPath;let r=_0x103fc6();r.open("GET",encodeURI(n),!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),r.onreadystatechange=function(){if(4===r.readyState&&200===r.status){var i=r.responseText;let n=JSON.parse(i);WebGLPlot.defined(n)&&WebGLPlot.defined(n.supermap)&&(e.gltfJson=n.supermap,t._model=WebGLPlot.Model.fromJson(e),_0x2a2a94(t)),r.onreadystatechange=function(){},r=null}},r.send()}}break}}}else this._model.modelMatrix=r,this._model.scale=this._modelScale.x,this._model.show=this._display,this._model.color=this._modelColor}_createPicture(e,t){if(_0x2bcc5b.Grid===this._showMode||_0x21ef32(this._picturePath)){if(!WebGLPlot.defined(this._innerCells)||0===this._innerCells.length)return;this.copyStyle(),this._showMode=_0x2bcc5b.Grid,this._imageResult=this._dotGrid.drawDotSymbolGraphic(),null===this._dotGrid&&(this._dotGrid=new _0x3bca92({symbolDot:this})),this.billboard=_0x4786d3.addBillboard(this.createBillboard(e,this._imageResult),this._layer._scene),this.billboard.SymbolType=_0x1c668c.SYMBOL_DOT}else{var i=this;null===this._dotPicture&&(this._dotPicture=new _0x231a11({symbolDot:this}));var n=new Image;n.src=this._picturePath,n.setAttribute("crossOrigin","Anonymous"),n.onload=function(){i._imagePicture=i._dotPicture.drawDotSymbolPicture(n),i.__resetBillboard(),i.billboard=_0x4786d3.addBillboard(i.createBillboard(e,i._imagePicture),i._layer._scene),i.billboard.SymbolType=_0x1c668c.SYMBOL_DOT,i.updateEditCtrl(t)}}}_createVector(){if(null===this._dotVector&&(this._dotVector=new _0x180939({symbolDot:this})),WebGLPlot.defined(this._innerCells)&&0!==this._innerCells.length){this.copyStyle(),this.__removeDotModelAndVector();var e=this._dotVector.drawDotSymbolVector();for(let t=0;t<e.length;t++){let i=_0x4786d3.addDotModelAndVector(e[t],this._layer._scene);i.plottingLayer=this._layer,i.SymbolType=_0x1c668c.SYMBOL_DOT,this._vectorPrimitives.push(i)}this._middleMarkBounds&&this._isMiddleMarkExist&&this._textPos===_0x26dfeb.Middle&&this._dotVector.createMiddleText(this._middleMarkBounds)}}clone(){var e=new _0x4844fd({layer:this._layer,libID:this._libID,code:this._code,localPoints:this._localPoints,serverData:this._serverData});e._libID=JSON.parse(JSON.stringify(this._libID)),e._code=JSON.parse(JSON.stringify(this._code)),e._symbolName=JSON.parse(JSON.stringify(this._symbolName)),e._symbolType=JSON.parse(JSON.stringify(this._symbolType)),e._display=JSON.parse(JSON.stringify(this._display)),e._id=JSON.parse(JSON.stringify(this._id)),e._initialize=JSON.parse(JSON.stringify(!1)),e._isEdit=JSON.parse(JSON.stringify(this._isEdit)),e._isUseSymbolLibStyle=JSON.parse(JSON.stringify(this._isUseSymbolLibStyle)),e._markHalo=JSON.parse(JSON.stringify(this._markHalo)),e._localPoints=WebGLPlot.clonePoints(this.localPoints),e._symbolStyle=this._symbolStyle.clone(),e._symbolTextStyle=this._symbolTextStyle.clone(),e._serverData=JSON.parse(JSON.stringify(this._serverData)),e._extendProperty=JSON.parse(JSON.stringify(this._extendProperty)),e._annotationArray=JSON.parse(JSON.stringify(this._annotationArray)),e._wholeHeight=JSON.parse(JSON.stringify(this._wholeHeight)),e._showMode=JSON.parse(JSON.stringify(this._showMode)),e._scale=JSON.parse(JSON.stringify(this._scale)),e._rotate=JSON.parse(JSON.stringify(this._rotate)),e._modelScale=JSON.parse(JSON.stringify(this._modelScale)),e._modelRotate=this._modelRotate.clone(),e._middleMarkBounds=JSON.parse(JSON.stringify(this._middleMarkBounds)),e._isMiddleMarkExist=JSON.parse(JSON.stringify(this._isMiddleMarkExist)),e._vectorScale=JSON.parse(JSON.stringify(this._vectorScale)),e._vectorDefaultSize=JSON.parse(JSON.stringify(this._vectorDefaultSize)),e._vectorRotate=JSON.parse(JSON.stringify(this._vectorRotate)),e._pictureSymbolSize=JSON.parse(JSON.stringify(this._pictureSymbolSize)),e._picturePath=JSON.parse(JSON.stringify(this._picturePath)),e._isNegativeImage=JSON.parse(JSON.stringify(this._isNegativeImage)),e.symbolRank=JSON.parse(JSON.stringify(this._symbolRank)),e._lineSymbolID=JSON.parse(JSON.stringify(this._lineSymbolID)),e._modelPath=JSON.parse(JSON.stringify(this._modelPath)),e._textPos=JSON.parse(JSON.stringify(this._textPos)),e._gridSymbolSize=JSON.parse(JSON.stringify(this._gridSymbolSize)),e._symbolSize=JSON.parse(JSON.stringify(this._symbolSize)),e._hasDragLine=JSON.parse(JSON.stringify(this._hasDragLine)),e._dragPoint=JSON.parse(JSON.stringify(this._dragPoint)),e._textContent=JSON.parse(JSON.stringify(this._textContent)),e._gridSurroundLineWidth=JSON.parse(JSON.stringify(this._gridSurroundLineWidth)),e._gridLineWidth=JSON.parse(JSON.stringify(this._gridLineWidth)),e._innerCells=this._innerCells,e._symbolSizeInLib=JSON.parse(JSON.stringify(this._symbolSizeInLib)),e.bIsShowBloodVolume=JSON.parse(JSON.stringify(this.bIsShowBloodVolume)),e._disableDepthTestDistance=this._disableDepthTestDistance,e._alwaysHasMiddelText=JSON.parse(JSON.stringify(this._alwaysHasMiddelText));for(var t=0;t<this.BloodVolumes.length;t++)e.BloodVolumes.push(_0x211e34.clone(this.BloodVolumes[t]));return e._sizeInMeters=JSON.parse(JSON.stringify(this._sizeInMeters)),e._symbolSizeInMeters=JSON.parse(JSON.stringify(this._symbolSizeInMeters)),e._symbolPictureSizeInMeters=JSON.parse(JSON.stringify(this._symbolPictureSizeInMeters)),e._geoEffectArray=[],this._geoEffectArray.forEach((t=>{e._geoEffectArray.push(t.clone())})),WebGLPlot.defined(this._geoEntity)&&(e._geoEntity=this._geoEntity.clone(e)),e}_getServerDataPrototype(e){this._anchorPoint=WebGLPlot.defaultValue(e.anchorPoint,new WebGLPlot.Cartesian2(0,0)),this._gridSymbolSize=WebGLPlot.defaultValue(new WebGLPlot.Cartesian2(e.symbolSize.x,e.symbolSize.y),new WebGLPlot.Cartesian2(-1,-1)),this._symbolSizeInLib=WebGLPlot.defined(e.symbolSizeInLib)?new WebGLPlot.Cartesian2(e.symbolSizeInLib.x,e.symbolSizeInLib.y):new WebGLPlot.Cartesian2(this._gridSymbolSize.x,this._gridSymbolSize.y),this._symbolRanks=WebGLPlot.defaultValue(e.symbolRanks,[]),this._middleMarkBounds=WebGLPlot.defaultValue(e.middleMarkBounds,null),this._symbolSize=WebGLPlot.defaultValue(e.symbolSize,new WebGLPlot.Cartesian2(-1,-1)),this._innerCells=WebGLPlot.defaultValue(e.innerCells,[])}__removeDotModelAndVector(){if(this.s3mInstance&&WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID)&&(WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).removeInstance(this.s3mInstance.modelPath,this.id),this.s3mInstance=void 0),this._model&&(_0x4786d3.removeDotModelAndVector(this._model,this._layer._scene),this._model=void 0),this._vectorPrimitives.length>0){for(let e=0;e<this._vectorPrimitives.length;e++){let t=this._vectorPrimitives[e];_0x4786d3.removeDotModelAndVector(t,this._layer._scene),t=void 0}this._vectorPrimitives=[]}}__initSymbolPointSymbolData(){_0x3b64c7(this)}}function _0x21ef32(e){return!("string"==typeof e&&e.length>0)}function _0x45e269(e){var t;if(!WebGLPlot.defined(e)||""===e)return t=[];switch(e){case 0:t=[];break;case 1:t=[20,5];break;case 2:t=[2,2];break;case 3:t=[10,2,2,2];break;case 4:t=[10,2,2,2,2,2]}return t}function _0x13ee86(e,t,i){var n=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(t._minCorner.z,t._minCorner.x,t._minCorner.y),t.scale,new WebGLPlot.Cartesian3),r=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(t._maxCorner.z,t._maxCorner.x,t._maxCorner.y),t.scale,new WebGLPlot.Cartesian3),o=n.z<=0?r.z:r.z-n.z,a=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z+o);(i.bIsShowBloodVolume&&i.BloodVolumes.length>0||!_0x21ef32(i._textContent))&&(i._imageResult=i._dotGrid.drawDotModelTextAndBloodVolume(),i.billboard=_0x4786d3.addBillboard(i.createBillboard(a,i._imageResult),i._layer._scene),i._layer.updatePrimitive=!0)}function _0x2a2a94(e){e._model=_0x4786d3.addDotModelAndVector(e._model,e._layer._scene),e._model.SymbolType=_0x1c668c.SYMBOL_DOT,e._modelAnimationPlay&&e._model.readyPromise.then((function(t){t.activeAnimations.addAll({loop:e._modelAnimationLoop,multiplier:e._modelAnimationMultiplier,reverse:e._modelAnimationReverse})}))}function _0x103fc6(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}function _0x3b64c7(e){if(!e||e._code!==_0x1c668c.SYMBOL_POINT)return;let t={fillBackColor:{red:255,green:0,blue:0,alpha:255},fillBackOpaque:!0,fillForeColor:{red:255,green:255,blue:0,alpha:255},fillGradientAngle:0,fillGradientMode:"NONE",fillGradientOffsetRatioX:0,fillGradientOffsetRatioY:0,fillOpaqueRate:100,fillSymbolID:0,lineColor:{red:255,green:255,blue:0,alpha:255},lineSymbolID:0,lineWidth:.5,markerAngle:0,markerHeight:0,markerSize:2.4,markerSymbolID:0,markerWidth:0},i={align:"MIDDLECENTER",backColor:{red:0,green:0,blue:0,alpha:255},backOpaque:!1,bold:!1,borderSpacingWidth:4,fontHeight:7,fontName:WebGLPlot.plotI18n("SongTi"),fontScale:1,fontWeight:0,fontWidth:0,foreColor:{red:0,green:0,blue:0,alpha:255},italic:!1,italicAngle:0,opaqueRate:100,outline:!1,outlineWidth:1,rotation:0,shadow:!1,sizeFixed:!0,strikeout:!1,stringAlignment:"LEFT",underline:!1};var n={fillColorLimit:!1,fillLimit:!0,fontColorLimit:!1,lineColorLimit:!1,lineTypeLimit:!1,lineWidthLimit:!1,polybezierClose:!1,positionPoints:[{x:.1,y:8},{x:8.2,y:8},{x:.1,y:16.1}],style:t,surroundLineColor:new WebGLPlot.Color(255,255,0,255),surroundLineFlag:!1,surroundLineLimit:!1,surroundLineType:0,surroundLineWidth:1,textContent:"",textStyle:i,type:31},r={fillColorLimit:!1,fillLimit:!0,fontColorLimit:!1,lineColorLimit:!1,lineTypeLimit:!1,lineWidthLimit:!1,polybezierClose:!1,positionPoints:[{x:2.571235,y:8},{x:10.671235,y:8},{x:2.571235,y:16.1}],style:t,surroundLineColor:new WebGLPlot.Color(255,255,0,255),surroundLineFlag:!0,surroundLineLimit:!1,surroundLineType:0,surroundLineWidth:1,textContent:"",textStyle:i,type:31};e._gridSymbolSize={x:32,y:32},e._anchorPoint={x:.1,y:8},e._symbolSizeInLib={x:32,y:32},e._innerCells=[n,r]}Object.defineProperties(_0x4844fd.prototype,{middleMarkBounds:{get:function(){return this._middleMarkBounds},set:function(e){e!==this._middleMarkBounds&&(this._middleMarkBounds=e,this._initialize=!1)}},modelAnimationPlay:{get:function(){return this._modelAnimationPlay},set:function(e){e!==this._modelAnimationPlay&&(this._modelAnimationPlay=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationLoop:{get:function(){return this._modelAnimationLoop},set:function(e){e===this._modelAnimationLoop||!(e instanceof WebGLPlot.ModelAnimationLoop)||(this._modelAnimationLoop=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationMultiplier:{get:function(){return this._modelAnimationMultiplier},set:function(e){e!==this._modelAnimationMultiplier&&(this._modelAnimationMultiplier=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationReverse:{get:function(){return this._modelAnimationReverse},set:function(e){e!==this._modelAnimationReverse&&(this._modelAnimationReverse=e,this._initialize=!1,this._initializeModel=!0)}},symbolSize:{get:function(){return this._symbolSize},set:function(e){e===this._symbolSize||!(e instanceof WebGLPlot.Cartesian2)||(this._symbolSize=e,this._initialize=!1)}},anchorPoint:{get:function(){return this._anchorPoint},set:function(e){e===this._anchorPoint||!(e instanceof WebGLPlot.Cartesian2)||(this._anchorPoint=e,this._initialize=!1)}},scale:{get:function(){return this._scale},set:function(e){if(!(e===this._scale||"number"!=typeof e||e<=0))if(this.billboard){if(this.billboard.scale=this.billboard.scale/this._scale*e,this._scale=e,this.showMode===_0x2bcc5b.Grid){var t=this._dotGrid.transformPoints();this._dotGrid.computeImageBounds(t)}this.updateEditCtrl(!1)}else this._scale=e,this._initialize=!1}},rotate:{get:function(){return this._rotate},set:function(e){e===this._rotate||!(e instanceof _0x23de81)||(this._rotate=e,this._initialize=!1,this.__setEffectParameter({rotate:this._rotate}))}},modelScale:{get:function(){return this._modelScale.x},set:function(e){e===this._modelScale.x||"number"!=typeof e||e<0||(this.__setEffectParameter({scale:e}),this._modelScale.x=e,this._initialize=!1)}},modelRotate:{get:function(){return this._modelRotate},set:function(e){e===this._modelRotate||!(e instanceof _0x23de81)||(this._modelRotate=e,this._initialize=!1,this.__setEffectParameter({rotate:e}))}},modelColor:{get:function(){return this._modelColor},set:function(e){e instanceof WebGLPlot.Color&&(this._modelColor=e,this._initialize=!1)}},vectorRotate:{get:function(){return this._vectorRotate},set:function(e){e===this._vectorRotate||!(e instanceof _0x23de81)||(this._vectorRotate=e,this.__setEffectParameter({rotate:e}),this._initialize=!1)}},vectorScale:{get:function(){return this._vectorScale},set:function(e){e===this._vectorScale||"number"!=typeof e||(this._vectorScale=e,this.__setEffectParameter({scale:e}),this._initialize=!1)}},vectorDefaultSize:{get:function(){return this._vectorDefaultSize},set:function(e){e===this._vectorDefaultSize||"number"!=typeof e||(this._vectorDefaultSize=e,this._initialize=!1)}},gridLineWidth:{get:function(){return this._gridLineWidth},set:function(e){e===this._gridLineWidth||"number"!=typeof e||(this._gridLineWidth=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},gridSurroundLineWidth:{get:function(){return this._gridSurroundLineWidth},set:function(e){e===this._gridSurroundLineWidth||"number"!=typeof e||(this._gridSurroundLineWidth=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},gridSymbolSize:{get:function(){return this._gridSymbolSize},set:function(e){if(!(e instanceof WebGLPlot.Cartesian2))return!1;var t=new WebGLPlot.Cartesian2(e.x,e.y);if(t.x<=0||t.y<=0)return!1;-1===this._gridSymbolSize.x&&-1===this._gridSymbolSize.y?t=this._symbolSizeInLib:-1===this._symbolSizeInLib.x&&-1===this._symbolSizeInLib.y&&(this._symbolSizeInLib=t.clone());var i=this._gridSymbolSize,n=this._symbolSizeInLib,r=t.x/n.x,o=t.y/n.y,a=n.x/n.y;t.x!==i.x&&t.y!==i.y?r>o?t.y=t.x/a:t.x=t.y*a:t.x!==i.x&&t.y===i.y?t.y=t.x/a:t.x===i.x&&t.y!==i.y&&(t.x=t.y*a),this._gridSymbolSize=t,this._initialize=!1}},pictureSymbolSize:{get:function(){return this._pictureSymbolSize},set:function(e){if(!(e instanceof WebGLPlot.Cartesian2))return!1;this._pictureSymbolSize=e,this._initialize=!1}},showMode:{get:function(){return this._showMode},set:function(e){e===this._showMode||"number"!=typeof e||e<0||e>3||(this._showMode=e,WebGLPlot.defined(this._layer)&&WebGLPlot.defined(this._layer._plottingEdit)&&(_0x2bcc5b.Grid!=e||_0x2bcc5b.Picture!=e)&&this._layer._plottingEdit._ctrlPoints.removeAll(),this.__resetBillboard(),this.__removeDotModelAndVector(),this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},isNegativeImage:{get:function(){return this._isNegativeImage},set:function(e){e===this._isNegativeImage||e.constructor!==Boolean||(this._isNegativeImage=e,WebGLPlot.defined(this._layer)&&WebGLPlot.defined(this._layer._plottingEdit)&&this._layer._plottingEdit.drawSymbolExtend(this),this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},symbolRank:{get:function(){return this._symbolRank},set:function(e){var t=this;if(e!==this._symbolRank&&"number"==typeof e){t._symbolRank=e;var i=WebGLPlot.getLibManager(this.layer._scene._plottingID).serverUrl,n=WebGLPlot.getServerData(this._libID,this._code,i,this._layer._scene._plottingID);if(n){var r=n.getSymbolInfo;r.events.on({processCompleted:function(e){t._innerCells=e.result.innerCells,t._initialize=!1,_0x5ac1e1.getInstance().symbolModified.raiseEvent(t)},processFailed:function(e){},scope:this});var o=n.getSymbolInfoParameters;o.symbolRank=e,o.surroundLineType=1,r.processAsync(o)}}}},symbolRanks:{get:function(){return this._symbolRanks}},lineSymbolID:{get:function(){return this._lineSymbolID},set:function(e){e===this._lineSymbolID||"number"!=typeof e||(this._lineSymbolID=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},modelPath:{get:function(){return this._modelPath},set:function(e){e!==this._modelPath&&(this._modelPath=e,this.__removeDotModelAndVector(),this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},textPos:{get:function(){return this._textPos},set:function(e){e===this._textPos||!this._middleMarkExist&&e===_0x26dfeb.Middle||(this._textPos=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},hasDragLine:{get:function(){return this._hasDragLine},set:function(e){e===this._hasDragLine||e.constructor!==Boolean||(this._hasDragLine=e,this._initialize=!1)}},dragPoint:{get:function(){return this._dragPoint},set:function(e){e===this._dragPoint||!(e instanceof _0x23de81)||(this._dragPoint=e,this._initialize=!1)}},picturePath:{get:function(){return this._picturePath},set:function(e){e!==this._picturePath&&(this._picturePath=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},scalePoints:{get:function(){return this._scalePoints},set:function(e){e===this._scalePoints||!(e instanceof _0x23de81)||(this._scalePoints=e,this._initialize=!1)}},scaleValues:{get:function(){return this._scaleValues},set:function(e){e===this._scaleValues||!Array.isArray(e)||(this._scaleValues=e,this._initialize=!1)}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){e===this._sizeInMeters||_0x2bcc5b.Grid!==this.showMode&&_0x2bcc5b.Picture!==this.showMode||(this._sizeInMeters=e,this._initialize=!1,e||(this._BillboardScale=1))}},alwaysHasMiddelText:{get:function(){return this._alwaysHasMiddelText},set:function(e){e!==this._alwaysHasMiddelText&&(this._alwaysHasMiddelText=e,this._initialize=!1)}},symbolSizeInMeters:{get:function(){return this._symbolSizeInMeters},set:function(e){if(e!==this._symbolSizeInMeters&&e instanceof WebGLPlot.Cartesian2){if(this._symbolSizeInMeters=e,this.sizeInMeters){var t=this._symbolSizeInMeters.x/this._gridSymbolSize.x;this._symbolSizeInMeters.y=t*this._gridSymbolSize.y,this._BillboardScale=t}this._initialize=!1}}},symbolPictureSizeInMeters:{get:function(){return this._symbolPictureSizeInMeters},set:function(e){if(e!==this._symbolPictureSizeInMeters&&e instanceof WebGLPlot.Cartesian2){if(this._symbolPictureSizeInMeters=e,this.sizeInMeters){var t=this._symbolPictureSizeInMeters.x/this._gridSymbolSize.x;this._symbolPictureSizeInMeters.y=t*this._gridSymbolSize.y,this._BillboardScale=t}this._initialize=!1}}},billboardBoundsColor:{get:function(){return this._billboardBoundsColor},set:function(e){e instanceof WebGLPlot.Color&&(this._billboardBoundsColor=e,this._initialize=!1)}},billboardBoundsLineWidth:{get:function(){return this._billboardBoundsLineWidth},set:function(e){e===this._billboardBoundsLineWidth||"number"!=typeof e||(this._billboardBoundsLineWidth=e,this._initialize=!1)}}});var _0x342473=(_0x730cd0=!0,function(e,t){var i=_0x730cd0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x730cd0=!1,i}),_0x54ec34=_0x342473(void 0,(function(){return _0x54ec34.toString().search("(((.+)+)+)+$").toString().constructor(_0x54ec34).search("(((.+)+)+)+$")})),_0x730cd0;function _0x39500c(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._textContent=WebGLPlot.defaultValue(e.textContent,""),this._localPoint=WebGLPlot.defaultValue(e.localPoint,new WebGLPlot.Cartesian3(0,0,0)),this._textStyle=WebGLPlot.defaultValue(e.textStyle,new _0x40b7f2)}_0x54ec34(),Object.defineProperties(_0x39500c.prototype,{textContent:{get:function(){return this._textContent},set:function(e){e&&"string"==typeof e&&(this._textContent=e)}},localPoint:{get:function(){return this._localPoint},set:function(e){(e instanceof _0x23de81||e instanceof WebGLPlot.Cartesian3)&&(this._localPoint=e)}},textStyle:{get:function(){return this._textStyle}},fontName:{get:function(){return this._textStyle._fontName}},foreColor:{get:function(){return this._textStyle._foreColor}},fontSize:{get:function(){return this._textStyle._fontSize}},outlineWidth:{get:function(){return this._textStyle._outlineWidth}},outlineColor:{get:function(){return this._textStyle._outlineColor}},outline:{get:function(){return this._textStyle._outline}}});var _0x45e2e0=(_0x2c8243=!0,function(e,t){var i=_0x2c8243?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c8243=!1,i}),_0x199f79=_0x45e2e0(void 0,(function(){return _0x199f79.toString().search("(((.+)+)+)+$").toString().constructor(_0x199f79).search("(((.+)+)+)+$")})),_0x2c8243;_0x199f79();var WebGLPlot$b=window.WebGLPlot=window.WebGLPlot||{};function _0x394df6(e,t){var i=t;if(!i)throw new WebGLPlot$b.DeveloperError("name is required to create PlottingLayer");this._waterPlanes=[],this._visibleViewport=0,this._scene=e,this._valid=!0,this._bIsUseDepthTest=!1,this._visibility=!0,this._geoGraphicObjects=[],this._isLocked=!1,this._isEditable=!0,this._isSelected=!0,this.updatePrimitive=!1,this._selectedFeature=void 0,this._name=i,this._id=-1,this._symbolAddedEvent=new WebGLPlot$b.Event,this._objsVisibleMap={}}function _0x1c9a37(e){var t=new WebGLPlot$b.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,WebGLPlot$b.defined(e.red)||(t.red=1),WebGLPlot$b.defined(e.green)||(t.green=1),WebGLPlot$b.defined(e.blue)||(t.blue=1),WebGLPlot$b.defined(e.alpha)||(t.alpha=1),t}function _0x2e224b(e,t,i){var n=parseInt(t.symbolType);if(e._symbolType=n,e._symbolName=t.symbolName,e.__dotPlotLibID=t.dotPlotLibID,e.__dotPlotCode=t.dotPlotCode,""!==t.uuid&&WebGLPlot$b.defined(t.uuid)?e._id=t.uuid:e._id=WebGLPlot$b.createGuid(),e._isEdit=!0,e._wholeHeight=WebGLPlot$b.defined(t.wholeHeight)?t.wholeHeight:0,e._display=!0,"none"===t.style.display&&(e._display=!1),t.localePoints){let i=[];for(let e=0;e<t.localePoints.length;e++){const n=t.localePoints[e];i.push(new _0x23de81(parseFloat(n.x),parseFloat(n.y),n.z?parseFloat(n.z):0))}e._localPoints=i}if(e._surroundRatioVal=WebGLPlot$b.defined(t.surroundRatioVal)?t.surroundRatioVal:.002,t.surroundLineColor&&(e._symbolStyle._surroundLineColor=_0x1c9a37(t.surroundLineColor)),e._textContent=t.textContent,e._symbolStyle._surroundLineType=t.surroundLineType,e._symbolStyle._surroundLineWidth=WebGLPlot$b.defined(t.surroundlineWidth3D)?t.surroundlineWidth3D:3,e._symbolStyle._lineColor=_0x1c9a37(t.style.lineColor),e._symbolStyle._opacity=e._symbolStyle.lineColor.alpha,e._symbolStyle._fillSymbolID=t.style.fillSymbolID,e._symbolStyle._fillForeColor=_0x1c9a37(t.style.fillForeColor),e._symbolStyle._fillBackColor=_0x1c9a37(t.style.fillBackColor),e._symbolStyle._fillGradientMode=t.style.fillGradientMode,e._symbolStyle._fillBackOpaque=t.style.fillBackOpaque,e._symbolStyle._fillGradientAngle=t.style.fillGradientAngle,e._symbolStyle._fillOpaqueRate=100-t.style.fillOpaqueRate,e._symbolStyle._fillGradientOffsetRatioX=t.style.fillGradientOffsetRatioX,e._symbolStyle._fillGradientOffsetRatioY=t.style.fillGradientOffsetRatioY,e._symbolStyle._lineWidth=WebGLPlot$b.defined(t.style.lineWidth3D)?t.style.lineWidth3D:3,t.hasOwnProperty("extendProperty")&&(e._extendProperty=t.extendProperty),t.hasOwnProperty("annotationArray"))for(var r=t.annotationArray,o=0;o<r.length;o++)e._annotationArray.push(new _0x39500c({textContent:r[o]._textContent,localPoint:r[o]._localPoint,textStyle:r[o]._textStyle}));if(t.textStyle2D){e._symbolTextStyle._italicAngle=t.textStyle2D.italicAngle,e._symbolTextStyle._shadow=t.textStyle2D.shadow,e._symbolTextStyle._sizeFixed=t.textStyle2D.sizeFixed,e._symbolTextStyle._underline=t.textStyle2D.underline,e._symbolTextStyle._rotation=t.textStyle2D.rotation,e._symbolTextStyle._bold=t.textStyle2D.bold,e._symbolTextStyle._align=t.textStyle2D.align,e._symbolTextStyle._italic=t.textStyle2D.italic,e._symbolTextStyle._strikeout=t.textStyle2D.strikeout,e._symbolTextStyle._fontName=t.textStyle2D.fontName,e._symbolTextStyle._outline=t.textStyle2D.outline,e._symbolTextStyle._borderSpacingWidth=t.textStyle2D.borderSpacingWidth,e._symbolTextStyle._outlineWidth=96*t.textStyle2D.outlineWidth/25.4,e._symbolTextStyle._fontWidth=t.textStyle2D.fontWidth,e._symbolTextStyle._opaqueRate=t.textStyle2D.opaqueRate,e._symbolTextStyle._stringAlignment=t.textStyle2D.stringAlignment,e._symbolTextStyle._fontScale=t.textStyle2D.fontScale,e._symbolTextStyle._fontWeight=t.textStyle2D.fontWeight,e._symbolTextStyle._foreColor=_0x1c9a37(t.textStyle2D.foreColor),WebGLPlot$b.defined(t.textStyle2D.fontStrokeColor)?e._symbolTextStyle._backColor=_0x1c9a37(t.textStyle2D.fontStrokeColor):WebGLPlot$b.defined(t.textStyle2D.backColor)&&(e._symbolTextStyle._backColor=_0x1c9a37(t.textStyle2D.backColor)),e._symbolTextStyle._fontHeight=t.textStyle2D.fontHeight,e._symbolTextStyle._fontSize=parseInt(96*t.textStyle2D.fontHeight/25.4);let i=WebGLPlot$b.defined(t.textStyle2D.fontBackgroundColor)?_0x1c9a37(t.textStyle2D.fontBackgroundColor):new WebGLPlot$b.Color(1,0,0,.3);e._symbolTextStyle.setTextRectColor(i),e._symbolTextStyle._isShowTextBox=!!WebGLPlot$b.defined(t.textStyle2D.backOpaque)&&t.textStyle2D.backOpaque}if(t.textStyle3D,_0x1c668c.SYMBOL_DOT===n||_0x1c668c.SYMBOL_Model===n||_0x1c668c.SYMBOL_PICTURE===n){if(t.anchorPoint&&(e._anchorPoint=new WebGLPlot$b.Cartesian2(t.anchorPoint.x,t.anchorPoint.y)),t.symbolSize&&-1!==t.symbolSize.x&&-1!==t.symbolSize.y&&(e._symbolSize=new WebGLPlot$b.Cartesian2(t.symbolSize.x,t.symbolSize.y)),t.gridSymbolSize&&-1!==t.gridSymbolSize.x&&-1!==t.gridSymbolSize.y?e._gridSymbolSize=new WebGLPlot$b.Cartesian2(t.gridSymbolSize.x,t.gridSymbolSize.y):t.symbolSizeInLib&&(e._gridSymbolSize=new WebGLPlot$b.Cartesian2(t.symbolSizeInLib.x,t.symbolSizeInLib.y)),t.pictureSymbolSize&&-1!==t.pictureSymbolSize.x&&-1!==t.pictureSymbolSize.y&&(e._pictureSymbolSize=new WebGLPlot$b.Cartesian2(t.pictureSymbolSize.x,t.pictureSymbolSize.y)),t.scale3D&&(WebGLPlot$b.defined(t.scale3D.x)?e._scale=t.scale3D.x:e._scale=t.scale3D),t.rotate2D?e._rotate=new _0x23de81(t.rotate2D.x,t.rotate2D.y,t.rotate2D.z):e._rotate=new _0x23de81(1,1,1),t.innerCells?e._innerCells=t.innerCells:_0x3333ab(t.libID,t.code,e,i),t.symbolRanks&&(e._symbolRanks=t.symbolRanks),WebGLPlot$b.defined(t.picturePath)&&(e._picturePath=t.picturePath),WebGLPlot$b.defined(t.modelPath)&&(e._modelPath=t.modelPath),t.modelScale&&(e._modelScale.x=t.modelScale),t.modelRotate&&(e._modelRotate=new _0x23de81(t.modelRotate.x,t.modelRotate.y,t.modelRotate.z)),t.vectorScale&&(e._vectorScale=t.vectorScale),t.vectorRotate&&(e._vectorRotate=new _0x23de81(t.vectorRotate.x,t.vectorRotate.y,t.vectorRotate.z)),t.vectorDefaultSize&&(e._vectorDefaultSize=t.vectorDefaultSize),WebGLPlot$b.defined(t.middleMarkExist)&&(e._isMiddleMarkExist=t.middleMarkExist),WebGLPlot$b.defined(t.middleMarkBounds)&&(e._middleMarkBounds=t.middleMarkBounds),t.symbolSizeInLib?e._symbolSizeInLib=t.symbolSizeInLib:WebGLPlot$b.defined(t.mpWidth)&&WebGLPlot$b.defined(t.mpHeight)&&(e._symbolSizeInLib=new WebGLPlot$b.Cartesian2(t.mpWidth,t.mpHeight)),t.BloodVolumes)for(o=0;o<t.BloodVolumes.length;o++)e.BloodVolumes.push(_0x211e34.clone(t.BloodVolumes[o]));t.bIsShowBloodVolume&&(e.bIsShowBloodVolume=t.bIsShowBloodVolume),WebGLPlot$b.defined(t.disableDepthTestDistance)&&("5e-324"!==t.disableDepthTestDistance?e._disableDepthTestDistance=Number.MAX_VALUE:e._disableDepthTestDistance=Number.MIN_VALUE),WebGLPlot$b.defined(t.sizeInMeters)&&(e._sizeInMeters=t.sizeInMeters),WebGLPlot$b.defined(t.symbolSizeInMeters)&&(e._symbolSizeInMeters=new WebGLPlot$b.Cartesian2(t.symbolSizeInMeters.x,t.symbolSizeInMeters.y)),WebGLPlot$b.defined(t.alwaysHasMiddelText)&&(e._alwaysHasMiddelText=t.alwaysHasMiddelText),e._isNegativeImage=t.negativeImage,e._gridLineWidth=WebGLPlot$b.defined(t.gridLineWidth3D)?4*t.gridLineWidth3D:3,e._gridSurroundLineWidth=WebGLPlot$b.defined(t.gridSurroundLineWidth3D)?4*t.gridSurroundLineWidth3D:3,e._symbolRank=t.symbolRank,e._lineSymbolID=t.style.lineSymbolID,e._middleMarkExist=t.middleMarkExist,e._textPos=WebGLPlot$b.defined(t.annotationPosition)?t.annotationPosition:0,e._showMode=WebGLPlot$b.defined(t.dotShowMode)?t.dotShowMode:_0x2bcc5b.Grid}else t.subSymbols&&(e._subSymbols=t.subSymbols),t.scaleValues&&(e._scaleValues=t.scaleValues),WebGLPlot$b.defined(t.style.extendHeight)&&(e._extendWallHeight=t.style.extendHeight),WebGLPlot$b.defined(t.wallOpaqueRate)&&(t.wallOpaqueRate>1&&t.wallOpaqueRate<100?e._extendWallOpacity=(100-t.wallOpaqueRate)/100:t.wallOpaqueRate<=1&&(e._extendWallOpacity=t.wallOpaqueRate)),t.subSymbolSize&&e._updateSubSize?e._updateSubSize=!1:e._updateSubSize=!0,e._subSymbolSize=t.subSymbolSize?t.subSymbolSize:0,WebGLPlot$b.defined(t.subSymbolScaleValue)&&(e._subSymbolScaleValue=t.subSymbolScaleValue),t.hasOwnProperty("isClampToGround")&&(e._isClampToGround=t.isClampToGround),t.hasOwnProperty("arrowHeadType")&&(e._arrowHeadType=t.arrowHeadType),t.hasOwnProperty("arrowBodyType")&&(e._arrowBodyType=t.arrowBodyType),t.hasOwnProperty("arrowTailType")&&(e._arrowTailType=t.arrowTailType);return e}function _0x3333ab(e,t,i,n){var r=WebGLPlot$b.getServerData(e,t,void 0,n);!r||(r.getSymbolInfo.events.on({processCompleted:function(e){return i._innerCells=e.result.innerCells,i._getServerDataPrototype&&i._getServerDataPrototype(e.result),i._initialize=!1,!0},processFailed:function(){},scope:self}),r.getSymbolInfo.processAsync(r.getSymbolInfoParameters))}function _0x4cd2b3(e,t){!e||(e.lineColor&&(t.symbolStyle.lineColor=e.lineColor),e.lineWidth&&(t.symbolType===_0x1c668c.SYMBOL_DOT?t.gridLineWidth=e.lineWidth:t.symbolStyle.lineWidth=e.lineWidth),e.textContent&&(t.textContent=e.textContent),e.fontSize&&(t.symbolTextStyle.fontSize=e.fontSize),e.fontColor&&(t.symbolTextStyle.foreColor=e.fontColor))}_0x394df6.prototype.createSymbol=function(e,t,i,n,r){if(!Array.isArray(i)||i.length<=0||void 0===WebGLPlot$b.getLibManager(this._scene._plottingID))throw new WebGLPlot$b.DeveloperError("PlottingLayer createSymbol points or Plotting is needed!!!");if(this.isEditable){if(0===e&&(t===_0x1c668c.SYMBOL_PICTURE||t===_0x1c668c.SYMBOL_Model)&&WebGLPlot$b.defined(n)&&"function"!=typeof n&&WebGLPlot$b.defined(n.url))return n.libID=e,n.code=t,n.points=i,void this.createModelAndPicture(n,r);"function"==typeof n&&!WebGLPlot$b.defined(r)&&(r=n);for(var o=this,a=[],s=WebGLPlot$b.getLibManager(this._scene._plottingID),l=0;l<i.length;l++)a.push(i[l].clone());var u=null,c=null;if(!s.useServerData){var h=s.localSymbolLibData[e][t];return u=o.createGraphicObject(o,a,h),_0x4cd2b3(n,u),"function"==typeof r&&r({feature:u}),!0}if(0===(c=WebGLPlot$b.getServerData(e,t,void 0,this._scene._plottingID)))return u=_0x2909c1.isSymbolDot(t)?new _0x4844fd({layer:this,libID:e,code:t,localPoints:a}):new _0x330d7a({layer:this,libID:e,code:t,localPoints:a}),_0x4cd2b3(n,u),u._symbolType=t,this._pushGeoGraphicObjectArray(u),"function"==typeof r&&r({feature:u}),!0;if(null!==c){var d=s.getSymbolData(e,t);if(WebGLPlot$b.defined(d)&&null!==d)return u=o.createGraphicObject(o,a,d),_0x4cd2b3(n,u),"function"==typeof r&&r({feature:u}),!0;c.getSymbolInfo.events.on({processCompleted:function(t){var i=t.result;return-1!==i.libID&&-1!==i.code&&(s.setSymbolData(e,t.result),u=o.createGraphicObject(o,a,i),_0x4cd2b3(n,u),"function"==typeof r&&r({feature:u}),!0)},processFailed:function(e){return r(e)},scope:this}),c.getSymbolInfo.processAsync(c.getSymbolInfoParameters)}}},_0x394df6.prototype.createModelAndPicture=function(e,t){if(!this.isEditable||0!==e.libID||e.code!==_0x1c668c.SYMBOL_Model&&e.code!==_0x1c668c.SYMBOL_PICTURE)return;if(null===WebGLPlot$b.getLibManager(this._scene._plottingID))throw new WebGLPlot$b.DeveloperError("Plotting is needed initialize to get SymbolLibManager");for(var i=[],n=0;n<e.points.length;n++)i.push(e.points[n].clone());var r=null;let o=WebGLPlot$b.defined(e.modelScale)?e.modelScale:1;var a={layer:this,libID:e.libID,code:e.code,localPoints:i,modelScale:new _0x23de81(o,o,o),pictureSymbolSize:e.pictureSymbolSize};r=new _0x4844fd(a),e.code===_0x1c668c.SYMBOL_Model?(r._showMode=_0x2bcc5b.Marker,r._modelPath=e.url,r._symbolType=_0x1c668c.SYMBOL_Model):e.code===_0x1c668c.SYMBOL_PICTURE&&(r._showMode=_0x2bcc5b.Picture,r._picturePath=e.url,r._symbolType=_0x1c668c.SYMBOL_PICTURE),_0x4cd2b3(e,r),WebGLPlot$b.defined(r)&&null!==r&&this._pushGeoGraphicObjectArray(r),"function"==typeof t&&t({feature:r})},_0x394df6.prototype.createGraphicObject=function(e,t,i){var n=null;return i.symbolType===_0x1c668c.SYMBOL_DOT?n=new _0x4844fd({layer:e,libID:i.libID,code:i.code,localPoints:t,serverData:i}):i.symbolType!==_0x1c668c.SYMBOL_DOT&&i.symbolType!==_0x1c668c.SYMBOL_UNKNOW&&(n=new _0x330d7a({layer:e,libID:i.libID,code:i.code,localPoints:t,serverData:i})),WebGLPlot$b.defined(n)&&null!==n&&e._pushGeoGraphicObjectArray(n),n},_0x394df6.prototype.update=function(e,t,i,n){if(this._valid)for(var r=0;r<this._geoGraphicObjects.length;r++)(this._geoGraphicObjects[r]instanceof _0x4844fd||this._geoGraphicObjects[r]instanceof _0x330d7a||this._geoGraphicObjects[r]instanceof _0x8c2e6e)&&(this.visibility?this._geoGraphicObjects[r].update(e,t,i,n):this._geoGraphicObjects[r].setVisible(this.visibility))},_0x394df6.prototype.render=function(e,t){if(this._valid){for(var i=0;i<this._geoGraphicObjects.length;i++)!1===this._geoGraphicObjects[i]._initialize&&(this.updatePrimitive=!0),(this._geoGraphicObjects[i]instanceof _0x4844fd||this._geoGraphicObjects[i]instanceof _0x330d7a||this._geoGraphicObjects[i]instanceof _0x8c2e6e)&&this._geoGraphicObjects[i].initSymbol();this.updatePrimitive&&(_0x4786d3.setUpdatePrimitive(!0,this._scene),this.updatePrimitive=!1)}},_0x394df6.prototype.setVisibleByID=function(e,t){!this._valid||!1===this._visibility||(this._geoGraphicObjects[e].display=t)},_0x394df6.prototype.setColorByID=function(e,t){if(this._valid&&!1!==this._visibility){if(t instanceof Array)return t=new WebGLPlot$b.Color(t[0],t[1],t[2],t[3]),void this._geoGraphicObjects[e].setColor(t);this._geoGraphicObjects[e].setColor(t)}},_0x394df6.prototype.resetColor=function(){this._valid},_0x394df6.prototype.getFeatureByUuid=function(e){if(!this._valid)return null;for(var t=0;t<this._geoGraphicObjects.length;++t){if(e===this._geoGraphicObjects[t].id)return this._geoGraphicObjects[t];if(this._geoGraphicObjects[t]instanceof _0x8c2e6e&&this._geoGraphicObjects[t].getFeatureByUuid(e))return this._geoGraphicObjects[t]}},_0x394df6.prototype.findFeatureByUuid=function(e){if(!this._valid||""===e||!WebGLPlot$b.defined(e))return null;for(var t=0;t<this._geoGraphicObjects.length;++t)if(e===this._geoGraphicObjects[t].id)return{feature:this._geoGraphicObjects[t],index:t};return null},_0x394df6.prototype.addFeature=function(e){var t=e.id;if(!WebGLPlot$b.defined(t))return!1;for(var i=0;i<this._geoGraphicObjects.length;++i)if(t===this._geoGraphicObjects[i].id)return!1;return e._layer=this,this._pushGeoGraphicObjectArray(e),!0},_0x394df6.prototype.setSelectedFeature=function(e){if(this._valid&&this.isSelected)for(var t=0;t<this._geoGraphicObjects;++t)if(e===this._geoGraphicObjects[t]){this._selectedFeature=this._geoGraphicObjects[t],WebGLPlot$b.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature);break}},_0x394df6.prototype.setSelectedFeatureByIndex=function(e){!this._valid||!this.isSelected||WebGLPlot$b.defined(this._geoGraphicObjects[e])&&(this._selectedFeature=this._geoGraphicObjects[e],WebGLPlot$b.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature))},_0x394df6.prototype.setSelectedFeatureByID=function(e){if(this._valid&&this.isSelected)for(var t=0;t<this._geoGraphicObjects.length;++t)if(e===this._geoGraphicObjects[t]._id){this._selectedFeature=this._geoGraphicObjects[t],WebGLPlot$b.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature);break}},_0x394df6.prototype.releaseSelection=function(){!this._valid||((WebGLPlot$b.defined(this._selectedFeature)||null!==this._selectedFeature)&&(this._selectedFeature=void 0),WebGLPlot$b.defined(this._plottingEdit)&&this._plottingEdit.unSelection(!0))},_0x394df6.prototype.removeGeoGraphicObject=function(e,t){if(WebGLPlot$b.defined(e)&&0!==this._geoGraphicObjects.length&&this.isEditable)for(var i=0;i<this._geoGraphicObjects.length;i++)if(this._geoGraphicObjects[i].id===e.id||this._geoGraphicObjects[i]instanceof _0x8c2e6e&&this._geoGraphicObjects[i].getFeatureByUuid(e.id)){let e=this._geoGraphicObjects[i].id,n=this.name;if(_0x5ac1e1.getInstance().symbolBeforeDeleted.raiseEvent([e],n),this._geoGraphicObjects[i]._destroy(),this._geoGraphicObjects[i]=null,this._geoGraphicObjects.splice(i,1),t&&_0x5ac1e1.getInstance().symbolDeleted.raiseEvent([e],n),WebGLPlot$b.defined(this._plottingEdit))this._plottingEdit.releaseSelection(),this._plottingEdit.RemoveFeatureEvent.raiseEvent();return!0}},_0x394df6.prototype.removeAll=function(e){this._removeAll(!1,e)},_0x394df6.prototype._removeAll=function(e,t){if(!(e||0!==this._geoGraphicObjects.length&&this.isEditable))return;let i=[];for(var n=0;n<this._geoGraphicObjects.length;n++)i.push(this._geoGraphicObjects[n].id);_0x5ac1e1.getInstance().symbolBeforeDeleted.raiseEvent(i,this.name);for(n=0;n<this._geoGraphicObjects.length;n++)this._geoGraphicObjects[n]._destroy();(t&&_0x5ac1e1.getInstance().symbolDeleted.raiseEvent(i,this.name),WebGLPlot$b.defined(this._plottingEdit))&&(this._plottingEdit.releaseSelection(),this._plottingEdit.RemoveFeatureEvent.raiseEvent());this._geoGraphicObjects=[]},_0x394df6.prototype.destroy=function(e){this._plottingEdit&&(this._plottingEdit.releaseSelection(),this._plottingEdit._plottingLayer=null);let t=[];for(let e=0;e<this._geoGraphicObjects.length;e++){let i=this._geoGraphicObjects[e];t.push(i.id)}_0x5ac1e1.getInstance().symbolBeforeDeleted.raiseEvent(t,this.name);for(let e=0;e<this._geoGraphicObjects.length;e++){let t=this._geoGraphicObjects[e];t._destroy(),t=void 0}e&&_0x5ac1e1.getInstance().symbolDeleted.raiseEvent(t,this.name),this._geoGraphicObjects=[],this._selectedFeature=null,this._name=null,this._projectName=null,this._waterPlanes=null,this._scene=null},_0x394df6.prototype.delete=function(){this.removeAll(),_0x2909c1.getPlotLayers(this._scene).remove(this.name,!0)},_0x394df6.prototype.removeFeatureByUuId=function(e,t){for(var i=0;i<this._geoGraphicObjects.length;++i)e===this._geoGraphicObjects[i].id&&this.removeGeoGraphicObject(this._geoGraphicObjects[i],t)},_0x394df6.prototype.setUseDepthTest=function(e){this._bIsUseDepthTest=e,_0x4786d3.setUseDepthTest(e,this._scene)},_0x394df6.prototype.createGroupObject=function(e){if(!e||e.length<=1||!this.isEditable)return null;for(var t=0;t<e.length;t++)if(!WebGLPlot$b.defined(e[t])||null===this.findFeatureByUuid(e[t].id))return null;for(t=0;t<e.length;t++)this.removeGeoGraphicObject(e[t]);var i=new _0x8c2e6e(e);return this._pushGeoGraphicObjectArray(i,!1),i},_0x394df6.prototype.getFeaturesFromGroupObject=function(e){var t=[];for(var i in e.subObjects)e.subObjects[i]instanceof _0x8c2e6e?t=t.concat(this.getFeaturesFromGroupObject(e.subObjects[i])):t.push(e.subObjects[i]);return t},_0x394df6.prototype.unGroupObject=function(e){if(!(e instanceof _0x8c2e6e&&this.isEditable))return!1;var t=e.unGroupObject();return this.removeGeoGraphicObject(e),this._geoGraphicObjects=this._geoGraphicObjects.concat(t),!0},_0x394df6.prototype.geoJsonToGeoGraphicObject=function(e,t){var i=this.findFeatureByUuid(e.uuid);i&&this.removeGeoGraphicObject(i.feature);var n=null;if(_0x1c668c.GROUPOBJECT===parseInt(e.symbolType)){n=new _0x8c2e6e(this.createGroupObjectByGeoJson(e),e.uuid)}else n=this.createSymbolByGeoJson(n,e);this._pushGeoGraphicObjectArray(n,!0),n._GeoJsonFeature=e,"function"==typeof t&&t({feature:n})},_0x394df6.prototype.createGroupObjectByGeoJson=function(e){var t=[];if(!this.isEditable)return t;var i=null,n=e.geometries;for(var r in n){if(_0x1c668c.GROUPOBJECT===parseInt(n[r].symbolType))i=new _0x8c2e6e(this.createGroupObjectByGeoJson(n[r]),n[r].id);else i=this.createSymbolByGeoJson(i,n[r]);t.push(i)}return t},_0x394df6.prototype.createSymbolByGeoJson=function(e,t){for(var i=parseInt(t.libID),n=parseInt(t.code),r=[],o=t.localePoints,a=0;a<o.length;++a){var s=o[a],l=parseFloat(s.x),u=parseFloat(s.y),c=WebGLPlot$b.defined(s.z)?parseFloat(s.z):0;r.push(new _0x23de81(l,u,c))}return _0x2e224b(e=parseInt(t.symbolType)===_0x1c668c.SYMBOL_DOT||parseInt(t.symbolType)===_0x1c668c.SYMBOL_Model||parseInt(t.symbolType)===_0x1c668c.SYMBOL_PICTURE?new _0x4844fd({layer:this,libID:i,code:n,localPoints:r,symbolSizeInLib:t.symbolSize}):new _0x330d7a({layer:this,libID:i,code:n,localPoints:r}),t,this._scene._plottingID),e},_0x394df6.prototype.setCustomClipBox=function(e){},_0x394df6.prototype.clearCustomClipBox=function(){},_0x394df6.prototype._pushGeoGraphicObjectArray=function(e,t){void 0===t&&(t=!0),e instanceof _0x2d9130&&(this._geoGraphicObjects.push(e),t&&(this._symbolAddedEvent.raiseEvent(e),_0x5ac1e1.getInstance().symbolAdded.raiseEvent(e,this.name)))},_0x394df6.prototype.updateGeoGraphicObjectByGeoJson=function(e){if(WebGLPlot$b.defined(e)&&WebGLPlot$b.defined(e.uuid)){let t=this.getFeatureByUuid(e.uuid);if(WebGLPlot$b.defined(t))return _0x2e224b(t,e,this._scene._plottingID),t._initialize=!1,_0x5ac1e1.getInstance().symbolUpdated.raiseEvent(t),t}return null},Object.defineProperties(_0x394df6.prototype,{id:{get:function(){return this._id}},visibility:{get:function(){return this._visibility},set:function(e){if(this._visibility!==e){for(var t in this._visibility=e,this._geoGraphicObjects)if(this._geoGraphicObjects[t]instanceof _0x4844fd||this._geoGraphicObjects[t]instanceof _0x330d7a||this._geoGraphicObjects[t]instanceof _0x8c2e6e){if(!this._geoGraphicObjects[t].display)continue;this._geoGraphicObjects[t].setVisible(e)}!e&&this._plottingEdit&&this._plottingEdit.releaseSelection(),_0x5ac1e1.getInstance().layerVisibleChanged.raiseEvent(this.name,e)}}},name:{get:function(){return this._name},set:function(e){e!==this._name&&(this._name=e)}},geoGraphicObjects:{get:function(){return this._geoGraphicObjects}},selectedFeature:{get:function(){return this._selectedFeature}},isEditable:{get:function(){return this._isEditable},set:function(e){e!==this._isEditable&&(this._isEditable=e,!e&&this._plottingEdit?this._plottingEdit.releaseSelection():e&&this._plottingEdit&&this.selectedFeature&&this._plottingEdit.DoSelectObjectEdit(this.selectedFeature),_0x5ac1e1.getInstance().layerEditableChanged.raiseEvent(this.name,e))}},isSelected:{get:function(){return this._isSelected},set:function(e){e!==this._isSelected&&(this._isSelected=e,e?this._plottingEdit.activate():(this._plottingEdit.deactivate(),this.releaseSelection()),_0x5ac1e1.getInstance().layerSelectedChanged.raiseEvent(this.name,e))}},isLocked:{get:function(){return this._isLocked},set:function(e){e!==this._isLocked&&(this._isLocked=e,_0x5ac1e1.getInstance().layerActived.raiseEvent(this.name,e))}},symbolAddedEvent:{get:function(){return this._symbolAddedEvent}}}),_0x394df6.prototype.getSelection=function(){return[]};const _0x24a674=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2b21f2=_0x24a674(void 0,(function(){return _0x2b21f2.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b21f2).search("(((.+)+)+)+$")}));_0x2b21f2();var _0x386d8c=function(){this._layers=new WebGLPlot.AssociativeArray,this._layerQueue=[],this._layerIndex=3,this._selectedLayer=void 0,this.collentionLayer=void 0,this.goAnimationLayer=void 0};Object.defineProperties(_0x386d8c.prototype,{layerQueue:{get:function(){return this._layerQueue}}}),_0x386d8c.prototype.prePassesUpdate=function(e){this.render(e,null)},_0x386d8c.prototype.update=function(e,t,i,n){var r=this._layerQueue,o=this._layerQueue.length,a=0;for(a=0;a<o;a++){var s=r[a];!WebGLPlot.defined(s)||s.update(e,t,i)}WebGLPlot.defined(this.collentionLayer)&&this.collentionLayer.update(e,t,i),WebGLPlot.defined(this.goAnimationLayer)&&this.goAnimationLayer.update(e,t,i)},_0x386d8c.prototype.render=function(e,t){var i=this._layerQueue,n=this._layerQueue.length,r=0;for(r=0;r<n;r++){var o=i[r];!WebGLPlot.defined(o)||o.render(t,e)}WebGLPlot.defined(this.collentionLayer)&&this.collentionLayer.render(t,e),WebGLPlot.defined(this.goAnimationLayer)&&this.goAnimationLayer.render(t,e)},_0x386d8c.prototype.releaseSelection=function(){var e=this._layerQueue,t=this._layerQueue.length,i=0;for(i=0;i<t;i++){var n=e[i];!WebGLPlot.defined(n)||n.releaseSelection()}},_0x386d8c.prototype.find=function(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("name is required.");return this._layers.get(e)},_0x386d8c.prototype.findByIndex=function(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("index is required.");if(e>this._layerQueue.length-1)throw new WebGLPlot.DeveloperError("index is out of bounds.");return this._layerQueue[e]},_0x386d8c.prototype.add=function(e,t){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("layer is required.");var i=e._name;if(!WebGLPlot.defined(i)||""==i)throw new WebGLPlot.DeveloperError("name is required.");var n=this._layers;if(n.contains(i))throw new WebGLPlot.RuntimeError("An layer with name "+i+" already exists in this Scene.");e._id=this._layerIndex++;var r=this._layerQueue.length;n.set(i,e),t=WebGLPlot.defaultValue(t,r),e.index=t,this._layerQueue.push(e),this._layerQueue.sort((function(e,t){return e.index-t.index})),_0x5ac1e1.getInstance().layerAdded.raiseEvent(i)},_0x386d8c.prototype.remove=function(e,t){if(t=WebGLPlot.defaultValue(t,!0),!WebGLPlot.defined(e))return!1;var i=this.find(e);return!!i&&(!!this._layers.remove(e)&&(this._layerQueue.splice(this._layerQueue.indexOf(i),1),t&&(i.destroy(),i=void 0),_0x5ac1e1.getInstance().layerDeleted.raiseEvent(e),!0))},_0x386d8c.prototype.removeAll=function(e){let t=[];e=WebGLPlot.defaultValue(e,!0);for(let i=0;i<this._layerQueue.length;i++){let n=this._layerQueue[i];t.push(n.name),e&&(n.destroy(),n=void 0)}this._layers.removeAll(),this._layerQueue.length=0,_0x5ac1e1.getInstance().layerDeleted.raiseEvent(t)},_0x386d8c.prototype.setSelectedLayer=function(e){this._selectedLayer=e},_0x386d8c.prototype.getSelectedLayer=function(){return this._selectedLayer},_0x386d8c.prototype.getPlottingLayerByName=function(e){for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];if(i instanceof _0x394df6&&e===i.name)return i}return null},_0x386d8c.prototype.getPlottingLayerIsActived=function(){for(let e=0;e<this._layerQueue.length;e++){let t=this._layerQueue[e];if(t instanceof _0x394df6&&!t.isLocked)return t}return null},_0x386d8c.prototype.setPlottingLayerIsActived=function(e,t,i){let n=!1;if(!e||""===e)return n;for(let r=0;r<this._layerQueue.length;r++){let o=this._layerQueue[r];if(o instanceof _0x394df6&&o.name===e){o.isLocked=!1,t&&t.setPlottingLayer(o),i&&i.setPlottingLayer(o),n=!0;break}}if(n)for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];i instanceof _0x394df6&&i.name!==e&&(i._isLocked=!0)}return n},_0x386d8c.prototype.getAllPlottingLayers=function(){let e=[];for(let t=0;t<this._layerQueue.length;t++)this._layerQueue[t]instanceof _0x394df6&&e.push(this._layerQueue[t]);return e},_0x386d8c.prototype.getFeatrueByUuID=function(e){for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];if(i instanceof _0x394df6){let t=i.getFeatureByUuid(e);if(WebGLPlot.defined(t))return t}}return null},WebGLPlot.PlotLayers=_0x386d8c;var _0x135c7c=(_0x55e2f7=!0,function(e,t){var i=_0x55e2f7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55e2f7=!1,i}),_0x285e14=_0x135c7c(void 0,(function(){return _0x285e14.toString().search("(((.+)+)+)+$").toString().constructor(_0x285e14).search("(((.+)+)+)+$")})),_0x55e2f7;_0x285e14();class _0x117656{constructor(e,t){e&&(this.key=e),t&&(this.value=t),this.CLASS_NAME="SuperMap.Plot.Property"}setKey(e){this.key=e}getKey(){return this.key}setValue(e){this.value=e}getValue(){return this.value}destroy(){this.key=null,this.value=null}clone(){return new Property(this.key,this.value)}}var _0x4c8f8b=(_0x1d151a=!0,function(e,t){var i=_0x1d151a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d151a=!1,i}),_0x4e6c4a=_0x4c8f8b(void 0,(function(){return _0x4e6c4a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e6c4a).search("(((.+)+)+)+$")})),_0x1d151a;function _0x5b011c(e,t){this._name=e,this._features=[],this._valid=!0,this._scene=t,this._waterPlanes=[],this._visibleViewport=0,this.visibility=!0}_0x4e6c4a(),_0x5b011c.prototype.destroy=function(){this._valid=null,this._waterPlanes=null,this._visibleViewport=null,this._features=null,this._name=null},_0x5b011c.prototype.addFeatures=function(e){Array.isArray(e)||(e=[e]),this._features=this._features.concat(e)},_0x5b011c.prototype.update=function(e,t,i,n){if(this._valid)for(var r=0;r<this._features.length;r++)!1===this._features[r]._initialize&&(this.updatePrimitive=!0),(this._features[r]instanceof _0x4844fd||this._features[r]instanceof _0x330d7a)&&this._features[r].update(e,t,i,n)},_0x5b011c.prototype.render=function(){for(var e=0;e<this._features.length;e++)!1===this._features[e]._initialize&&(this.updatePrimitive=!0),(this._features[e]instanceof _0x4844fd||this._features[e]instanceof _0x330d7a)&&this._features[e].initSymbol();this.updatePrimitive&&(_0x4786d3.setUpdatePrimitive(!0,this._scene),this.updatePrimitive=!1)},_0x5b011c.prototype.removeFeatures=function(e){if(WebGLPlot.defined(e)&&0!==this._features.length){for(var t=[],i=0;i<this._features.length;i++){if(this._features[i]===e){1===this._features[i].symbolType&&this._features[i]._destroy();continue}t.push(this._features[i])}this._features=t}},_0x5b011c.prototype.releaseSelection=function(){},_0x5b011c.prototype.setCustomClipBox=function(e){},_0x5b011c.prototype.clearCustomClipBox=function(){},Object.defineProperties(_0x5b011c.prototype,{id:{get:function(){return this._id}}});var _0x29972f=(_0x17bd7d=!0,function(e,t){var i=_0x17bd7d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17bd7d=!1,i}),_0x43fd9f=_0x29972f(void 0,(function(){return _0x43fd9f.toString().search("(((.+)+)+)+$").toString().constructor(_0x43fd9f).search("(((.+)+)+)+$")})),_0x17bd7d;_0x43fd9f();var _0xff006={PLAYFROMNOW:0,PLAYSAMELASTONE:1,PLAYAFTERLASTONE:2,UNKNOWN:3},_0x5a1aa1=Object.freeze(_0xff006),_0x207b97=(_0x13fa24=!0,function(e,t){var i=_0x13fa24?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13fa24=!1,i}),_0x1db210=_0x207b97(void 0,(function(){return _0x1db210.toString().search("(((.+)+)+)+$").toString().constructor(_0x1db210).search("(((.+)+)+)+$")})),_0x13fa24;_0x1db210();class _0x21ced6{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._startTime=WebGLPlot$e.defaultValue(e.startTime,0),this._duration=WebGLPlot$e.defaultValue(e.duration,5),this._repeat=WebGLPlot$e.defaultValue(e.repeat,!1),this._name=WebGLPlot$e.defaultValue(e.name,""),this._animationState=WebGLPlot$e.defaultValue(e.animationState,_0x577f4c.UNKNOWN),this._goFeature=WebGLPlot$e.defaultValue(e.goFeature,null),this._animationGOFeature=WebGLPlot$e.defaultValue(e.animationGOFeature,null),this._innerStartTime=WebGLPlot$e.defaultValue(e.innerStartTime,0),this._lastExecute=WebGLPlot$e.defaultValue(e.lastExecute,!1),this._pauseTime=WebGLPlot$e.defaultValue(e.pauseTime,0),this._ratio=WebGLPlot$e.defaultValue(e.ratio,0),this._symbolTexts=WebGLPlot$e.defaultValue(e.symbolTexts,""),this._animationManager=null,this._animationFinish=new WebGLPlot$e.Event,this._animationBegin=new WebGLPlot$e.Event,this._isSendBegin=!0,this._playSpeed=1,this.__playPastRatio=0,this._groupIndex=WebGLPlot$e.defaultValue(e.groupIndex,void 0),this._animationPlayType=WebGLPlot$e.defaultValue(e.animationPlayType,_0x5a1aa1.UNKNOWN),this.delayTime=0}destroy(){this.showAnimationFeature(!1),this.removeAnimationFeature(),this._goFeature=null,this._animationGOFeature._destroy(),this._animationGOFeature=null,this._name="",this.goFeatureLocalPts=[],this._symbolTexts="",this._animationState=_0x577f4c.UNKNOWN,this._pathFeature&&(_0x4786d3.removeAllAlgoPloyline(this._pathFeature,this._scene),this._pathFeature._destroy(),this._pathFeature=null),this.dynamicScane&&(this.dynamicScane.removeScaneCylinder(),this.dynamicScane=void 0)}setGOFeature(e,t){if(null==t||null===t.layer||null===e._goAnimationLayer)return!1;this._animationManager=e,this._goFeature=t;var i=this.createAnimationGOFeature(this._goFeature);return null!==this._animationGOFeature&&(i||(this._animationGOFeature._layer=e._goAnimationLayer,e._goAnimationLayer.addFeatures(this._animationGOFeature)),this.showAnimationFeature(!1),(_0x144579.ANIMATION_GROW===this.getGOAnimationType()||_0x144579.ANIMATION_GROW_EXP===this.getGOAnimationType()||_0x144579.ANIMATION_REDUCE_EXP==this.getGOAnimationType())&&(this.goFeatureLocalPts=WebGLPlot$e.clonePoints(this._goFeature._localPoints)),!0)}play(){WebGLPlot$e.defined(this._animationGrowEXP_isFirstExecute)&&(this._animationGrowEXP_isFirstExecute=!0);let e=new Date;if(this.__playSpeedTime=e.getTime()/1e3,this.__playTime=e.getTime()/1e3,this._animationState===_0x577f4c.PAUSE){const t=e.getTime()/1e3-this._pauseTime;this._innerStartTime+=t}else this._innerStartTime=e.getTime()/1e3,WebGLPlot$e.defined(this._goFeature)&&this._goFeature.releaseSelection(),this.showAnimationFeature(!0),this.__playPastRatio=0;this._lastExecute=!1,this._animationState=_0x577f4c.PLAYING}stop(){this._animationState=_0x577f4c.STOP}pause(){if(this._animationState===_0x577f4c.PLAYING){this._animationState=_0x577f4c.PAUSE;var e=new Date;this._pauseTime=e.getTime()/1e3}}reset(){this._animationState=_0x577f4c.RESET,this.showAnimationFeature(!1)}createAnimationGOFeature(e){for(var t=0;t<this._animationManager.goAnimations.length;t++){var i=this._animationManager.goAnimations[t];if(i._goFeature.id===e.id)return this._animationGOFeature=i._animationGOFeature,this._animationGOFeature}return this._animationGOFeature=e.clone(),this._animationGOFeature._id+=this._name,this._animationGOFeature._isEdit=!0,this._animationGOFeature._valid=!1,this._animationGOFeature._isAnimationFeature=!0,null}canExecute(){if(this._animationState!==_0x577f4c.PLAYING)return!1;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this._startTime>e)return!1;var t=this.getRatioByTime();return!(t>1&&this._lastExecute||t<0)}getRatioByTime(){if(this._animationState!==_0x577f4c.PLAYING)return 0;let e=this.__computePlayRatio();return e>=1&&!this._lastExecute?(this._repeat?(e=0,this._lastExecute=!1,this._animationState=_0x577f4c.PLAYING,this._innerStartTime=(new Date).getTime()/1e3,this.__playTime=(new Date).getTime()/1e3):(e=1,this._lastExecute=!0,this._isSendBegin=!0,this._animationState=_0x577f4c.STOP,this._animationFinish.raiseEvent(this.name),_0x5ac1e1.getInstance().animationFinished.raiseEvent(this.name)),this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=0):this._isSendBegin&&(this._animationBegin.raiseEvent(this.name),_0x5ac1e1.getInstance().animationBegined.raiseEvent(this.name),this._isSendBegin=!1),e<0&&(e=0,this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=0),this._ratio=e,e}showAnimationFeature(e){null!==this._animationGOFeature&&null!==this._animationGOFeature._symbolStyle&&(this.resetAnimationFeature(e),this._animationGOFeature.display=e),null!==this._goFeature&&null!==this._goFeature._symbolStyle&&(this._goFeature.display=!e,this._goFeature._initialize=!1),e&&(this._isSendBegin=!0)}resetAnimationFeature(e){this._animationGOFeature._symbolStyle=this._goFeature._symbolStyle.clone(),this._animationGOFeature._localPoints=this._goFeature._localPoints,this._animationGOFeature._initialize=!1}setAnimationName(e){return!this._animationManager.findGOAnimationByName(e)&&(this._name=e,!0)}__setPlayRatioState(){this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=this._ratio}__computePlayRatio(){let e=0;const t=(new Date).getTime()/1e3,i=this._duration/this.playSpeed;return e=this.__playTime===this.__playSpeedTime?(t-this._innerStartTime-this._startTime)/i:(t-this.__playSpeedTime)/i,e+=this.__playPastRatio,this._innerStartTime+this._startTime>=t||e<0?0:e}removeAnimationFeature(){if(null!==this._animationGOFeature){var e=this._animationManager.goAnimations,t=!1;if(null!==e)for(var i=0;i<e.length;i++){var n=e[i];if(n!==this&&n._animationGOFeature===this._animationGOFeature){t=!0;break}}t||this._animationManager._goAnimationLayer.removeFeatures(this._animationGOFeature)}}getBaseJSONData(){var e={};return this.goFeature&&(e.goLayerUuid=this.goFeature.id),e.name=this.name,e.startTime=this.startTime,e.duration=this.duration,e.repeat=this.repeat,e.playtype=this.animationPlayType,e}fromBaseJSONData(e){this.startTime=e.startTime,this.duration=e.duration,this.repeat=e.repeat,this.animationPlayType=e.playtype}_serverColorToColor(e){var t=new WebGLPlot$e.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,t}_colorFormat(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}setStartTime(e){e<0&&(e=0),this.delayTime=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData())}getStartTime(){return this._animationManager.getAnimationDelayTime()}}Object.defineProperties(_0x21ced6.prototype,{startTime:{get:function(){return this._startTime},set:function(e){e!==this._startTime&&(this._startTime=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},repeat:{get:function(){return this._repeat},set:function(e){e!==this._repeat&&(this._repeat=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},duration:{get:function(){return this._duration},set:function(e){if(e!==this._duration){this._duration=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData())}}},name:{get:function(){return this._name},set:function(e){e!==this._name&&(this._name=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},groupName:{get:function(){return this._groupName},set:function(e){e!==this._groupName&&(this._groupName=e)}},animationState:{get:function(){return this._animationState},set:function(e){e!==this._animationState&&(this._animationState=e)}},goFeature:{get:function(){return this._goFeature},set:function(e){e!==this._goFeature&&(this._goFeature=e)}},animationGOFeature:{get:function(){return this._animationGOFeature},set:function(e){e!==this._animationGOFeature&&(this._animationGOFeature=e)}},innerStartTime:{get:function(){return this._innerStartTime},set:function(e){e!==this._innerStartTime&&(this._innerStartTime=e)}},lastExecute:{get:function(){return this._lastExecute},set:function(e){e!==this._lastExecute&&(this._lastExecute=e)}},pauseTime:{get:function(){return this._pauseTime},set:function(e){e!==this._pauseTime&&(this._pauseTime=e)}},ratio:{get:function(){return this._ratio},set:function(e){e!==this._ratio&&(this._ratio=e)}},symbolTexts:{get:function(){return this._symbolTexts},set:function(e){e!==this._symbolTexts&&(this._symbolTexts=e)}},animationBegin:{get:function(){return this._animationBegin}},animationFinish:{get:function(){return this._animationFinish}},playSpeed:{get:function(){return this._playSpeed},set:function(e){e!==this._playSpeed&&(this.__setPlayRatioState(),this._playSpeed=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},fastForwardTime:{set:function(e){if(e<0)return;let t=e/this._duration;t>1&&(t=1),this.__playPastRatio+=t,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData())}},rewindTime:{set:function(e){if(e<0)return;let t=-e/this._duration;t>0&&(t=0),this.__playPastRatio+=t,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData())}},animationPlayType:{get:function(){return this._animationPlayType},set:function(e){if(e!==this._animationPlayType){this._animationPlayType=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData())}}}});var _0x477fff=(_0x213776=!0,function(e,t){var i=_0x213776?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x213776=!1,i}),_0x54a585=_0x477fff(void 0,(function(){return _0x54a585.toString().search("(((.+)+)+)+$").toString().constructor(_0x54a585).search("(((.+)+)+)+$")})),_0x213776;_0x54a585();var _0x4bff6b={Blink_Frequency:0,Blink_Number:1},_0x2b55c5=Object.freeze(_0x4bff6b),_0x19a3d7=(_0x15ab8f=!0,function(e,t){var i=_0x15ab8f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x15ab8f=!1,i}),_0x5abc38=_0x19a3d7(void 0,(function(){return _0x5abc38.toString().search("(((.+)+)+)+$").toString().constructor(_0x5abc38).search("(((.+)+)+)+$")})),_0x15ab8f;_0x5abc38();var _0xacb5f7={Replace_NoColor:0,Replace_Color:1},_0x1ab3a1=Object.freeze(_0xacb5f7),_0x5f4b82=(_0x3ed3d5=!0,function(e,t){var i=_0x3ed3d5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ed3d5=!1,i}),_0x523247=_0x5f4b82(void 0,(function(){return _0x523247.toString().search("(((.+)+)+)+$").toString().constructor(_0x523247).search("(((.+)+)+)+$")})),_0x3ed3d5;_0x523247();class _0x400916 extends _0x21ced6{constructor(e){super(e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT)),this._blinkInterval=WebGLPlot$e.defaultValue(e.blinkInterval,500),this._blinkStyle=WebGLPlot$e.defaultValue(e.blinkStyle,_0x2b55c5.Blink_Frequency),this._blinkNumber=WebGLPlot$e.defaultValue(e.blinkNumber,0),this._replaceStyle=WebGLPlot$e.defaultValue(e.replaceStyle,_0x1ab3a1.Replace_NoColor),this._startColor=WebGLPlot$e.defaultValue(e.startColor,new WebGLPlot$e.Color(0,0,1,1)),this._endColor=WebGLPlot$e.defaultValue(e.endColor,new WebGLPlot$e.Color(1,0,0,1))}getGOAnimationType(){return _0x144579.ANIMATION_BLINK}execute(){if(!this.canExecute())return!1===this._goFeature._display&&!1===this._animationGOFeature._display&&(this._animationGOFeature._display=!0,!0);this._goFeature.display&&(this._goFeature.display=!1);var e=(new Date).getTime()/1e3,t=this._blinkInterval/1e3;return this._blinkStyle===_0x2b55c5.Blink_Number&&(t=this._blinkInterval=this._duration/this._blinkNumber),(e-this._innerStartTime)%t<=t/2?this._replaceStyle===_0x1ab3a1.Replace_Color?this.setColor(this._startColor):this._animationGOFeature.display=!1:(this._animationGOFeature.display=!0,this._replaceStyle===_0x1ab3a1.Replace_Color&&this.setColor(this._endColor)),this._lastExecute&&(this._replaceStyle===_0x1ab3a1.Replace_Color&&(this._animationGOFeature._symbolStyle._lineColor=this._endColor),this._animationGOFeature._display=!0,this._animationGOFeature._initialize=!1),!0}getRatioByTime(){if(this._animationState!==_0x577f4c.PLAYING)return 0;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this._startTime>e)return 0;var t=(e-this._innerStartTime-this._startTime)/this._duration;return t>=1&&!this._lastExecute?this._repeat?(this._innerStartTime=(new Date).getTime()/1e3,t=0,this._lastExecute=!1,this._animationState=_0x577f4c.PLAYING):(t=1,this._lastExecute=!0,this._animationState=_0x577f4c.STOP):t<0&&(t=0),this._ratio=t,t}setColor(e){this._animationGOFeature._symbolStyle._lineColor!==e&&(this._animationGOFeature._symbolStyle._lineColor=e,this._animationGOFeature._symbolTextStyle.setTextRectColor(e),this._animationGOFeature._initialize=!1)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.blinkStyle=this.blinkStyle,e.blinkInterval=this.blinkInterval,e.blinkNumber=this.blinkNumber,e.replaceStyle=this.replaceStyle,e.startColor=this._colorFormat(this.startColor),e.endColor=this._colorFormat(this.endColor),e}fromJSONData(e){this.fromBaseJSONData(e),this.blinkStyle=e.blinkStyle,this.blinkInterval=e.blinkInterval,this.blinkNumber=e.blinkNumber,this.replaceStyle=e.replaceStyle,this.startColor=this._serverColorToColor(e.startColor),this.endColor=this._serverColorToColor(e.endColor)}}Object.defineProperties(_0x400916.prototype,{blinkInterval:{get:function(){return this._blinkInterval},set:function(e){e!=this._blinkInterval&&(this._blinkInterval=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},blinkStyle:{get:function(){return this._blinkStyle},set:function(e){e!=this._blinkStyle&&(this._blinkStyle=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},blinkNumber:{get:function(){return this._blinkNumber},set:function(e){e!=this._blinkNumber&&(this._blinkNumber=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},replaceStyle:{get:function(){return this._replaceStyle},set:function(e){e!=this._replaceStyle&&(this._replaceStyle=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startColor:{get:function(){return this._startColor},set:function(e){e==this._startColor||!(e instanceof WebGLPlot$e.Color)||(this._startColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endColor:{get:function(){return this._endColor},set:function(e){e==this._endColor||!(e instanceof WebGLPlot$e.Color)||(this._endColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x27608b=(_0x106728=!0,function(e,t){var i=_0x106728?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x106728=!1,i}),_0x165e45=_0x27608b(void 0,(function(){return _0x165e45.toString().search("(((.+)+)+)+$").toString().constructor(_0x165e45).search("(((.+)+)+)+$")})),_0x106728;_0x165e45();class _0x1368e5 extends _0x21ced6{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._showEffect=WebGLPlot.defaultValue(e.showEffect,!1),this._finalDisplay=WebGLPlot.defaultValue(e.finalDisplay,!1)}getGOAnimationType(){return _0x144579.ANIMATION_SHOW}execute(){if(!this.canExecute())return!1;var e=this._ratio;return this._showEffect&&this._animationGOFeature.showMode!==_0x2bcc5b.Marker?this.executeHaveEffect(e):this.executeNoEffect(e),!0}executeNoEffect(e){this._animationGOFeature.display=1-e<.01?this._finalDisplay:!this._finalDisplay}executeHaveEffect(e){this._finalDisplay||(e=1-e);var t;t=e>1?1:e,this._animationGOFeature.display||(this._animationGOFeature.display=!0),this._animationGOFeature.showMode===_0x2bcc5b.Grid||this._animationGOFeature.showMode===_0x2bcc5b.Picture?this._animationGOFeature.billboard.color=new WebGLPlot.Color(1,1,1,t):(this._animationGOFeature._symbolStyle._opacity=t,this._goFeature._symbolStyle.fillOpaqueRate<=100*(1-e)&&(this._animationGOFeature._symbolStyle.fillOpaqueRate=100*(1-e)),WebGLPlot.defined(this._goFeature._extendWallOpacity)&&this._goFeature._extendWallOpacity>=e&&(this._animationGOFeature._extendWallOpacity=e),null!==this._animationGOFeature._labels&&(this._animationGOFeature._symbolTextStyle._foreColor.alpha=t),this._animationGOFeature._initialize=!1)}resetAnimationFeature(e){this._animationGOFeature._symbolStyle.fillOpaqueRate=this._goFeature._symbolStyle.fillOpaqueRate,this._animationGOFeature._extendWallOpacity=this._goFeature._extendWallOpacity,_0x21ced6.prototype.resetAnimationFeature.call(this,e)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.showEffect=this.showEffect,e.finalDisplay=this.finalDisplay,e}fromJSONData(e){this.fromBaseJSONData(e),this.showEffect=e.showEffect,this.finalDisplay=e.finalDisplay}}Object.defineProperties(_0x1368e5.prototype,{showEffect:{get:function(){return this._showEffect},set:function(e){e!=this._showEffect&&(this._showEffect=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},finalDisplay:{get:function(){return this._finalDisplay},set:function(e){e!=this._finalDisplay&&(this._finalDisplay=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x1dde48=(_0x40d04b=!0,function(e,t){var i=_0x40d04b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40d04b=!1,i}),_0x4838b0=_0x1dde48(void 0,(function(){return _0x4838b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x4838b0).search("(((.+)+)+)+$")})),_0x40d04b;_0x4838b0();var _0x42d312={POLYLINE:0,CURVE:1},_0x2187ca=Object.freeze(_0x42d312),_0x4d343b=(_0x5e2adc=!0,function(e,t){var i=_0x5e2adc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e2adc=!1,i}),_0x2f9a04=_0x4d343b(void 0,(function(){return _0x2f9a04.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f9a04).search("(((.+)+)+)+$")})),_0x5e2adc;_0x2f9a04();var _0x10d0f0={computePositions:function(e,t,i,n,r){var o,a=e,s=n+n,l=new Float64Array(3*(r?2*s:s)),u=0,c=0,h=r?3*s:0,d=r?3*(s+n):3*n;for(o=0;o<n;o++){var f=o/n*WebGLPlot.CesiumMath.TWO_PI,p=Math.cos(f),_=Math.sin(f),m=p*i,g=_*i,x=p*t,y=_*t;l[c+h]=m,l[c+h+1]=0,l[c+h+2]=g,l[c+d]=x,l[c+d+1]=a,l[c+d+2]=y,c+=3,r&&(l[u++]=m,l[u++]=0,l[u++]=g,l[u++]=x,l[u++]=a,l[u++]=y)}return l}},_0x3271a3=(_0x7fbaf9=!0,function(e,t){var i=_0x7fbaf9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x7fbaf9=!1,i}),_0x9ef8e9=_0x3271a3(void 0,(function(){return _0x9ef8e9.toString().search("(((.+)+)+)+$").toString().constructor(_0x9ef8e9).search("(((.+)+)+)+$")})),_0x7fbaf9;_0x9ef8e9();var _0x2c1142=new WebGLPlot.Cartesian2,_0x3bd790=new WebGLPlot.Cartesian3,_0x318ba1=new WebGLPlot.Cartesian3,_0x43c108=new WebGLPlot.Cartesian3,_0x23994f=new WebGLPlot.Cartesian3;function _0x8764e6(e){var t=(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),o=WebGLPlot.defaultValue(e.slices,128);if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("options.length must be defined.");if(!WebGLPlot.defined(i))throw new WebGLPlot.DeveloperError("options.topRadius must be defined.");if(!WebGLPlot.defined(n))throw new WebGLPlot.DeveloperError("options.bottomRadius must be defined.");if(o<3)throw new WebGLPlot.DeveloperError("options.slices must be greater than or equal to 3.");if(WebGLPlot.defined(e.offsetAttribute)&&e.offsetAttribute===WebGLPlot.GeometryOffsetAttribute.TOP)throw new WebGLPlot.DeveloperError("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");if(!WebGLPlot.defined(e.scene))throw new WebGLPlot.DeveloperError("scene must be defined");if(!WebGLPlot.defined(e.id)||""===e.id)throw new WebGLPlot.DeveloperError("id must be defined");this._length=t,this._topRadius=i,this._bottomRadius=n,this._vertexFormat=WebGLPlot.VertexFormat.clone(r),this._slices=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPlotCylinderGeometry",this.scene=e.scene,this.rotate=WebGLPlot.defaultValue(e.rotate,new _0x23de81(0,0,0)),this.offsetRotate=WebGLPlot.defaultValue(e.offsetRotate,new _0x23de81(0,0,0)),this.point=WebGLPlot.defaultValue(e.point,new _0x23de81(0,0,0)),this.id=e.id,this.cylinderColor=WebGLPlot.defaultValue(e.color,new WebGLPlot.Color(1,0,0,.4)),this.show=WebGLPlot.defaultValue(e.show,!0),this.add2Scene()}_0x8764e6.prototype.add2Scene=function(){this.ScaneCylinderGeometry=_0x8764e6.createGeometry(this);var e=WebGLPlot.CesiumMath.toRadians(this.rotate.z+this.offsetRotate.z),t=WebGLPlot.CesiumMath.toRadians(this.rotate.y+this.offsetRotate.y),i=WebGLPlot.CesiumMath.toRadians(this.rotate.x+this.offsetRotate.x),n=new WebGLPlot.HeadingPitchRoll(e,t,i);const r=WebGLPlot.Cartesian3.fromDegrees(this.point.x,this.point.y,this.point.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,n);var a=new WebGLPlot.GeometryInstance({geometry:this.ScaneCylinderGeometry,modelMatrix:o,id:this.id});let s=new WebGLPlot.Primitive({geometryInstances:a,appearance:new Cesium.EllipsoidSurfaceAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this.cylinderColor})}),asynchronous:!1,show:this.show});this.CylinderPrimitive=this.scene.primitives.add(s)},_0x8764e6.prototype.remove=function(){this.CylinderPrimitive&&(this.scene.primitives.removeAndDestroy(this.CylinderPrimitive),this.CylinderPrimitive=void 0)},_0x8764e6.prototype.update=function(e){var t=WebGLPlot.defaultValue(e.point,new _0x23de81(0,0,0)),i=WebGLPlot.defaultValue(e.rotate,new _0x23de81(0,0,0));if(this.CylinderPrimitive){this.remove();var n=WebGLPlot.CesiumMath.toRadians(i.z+this.offsetRotate.z),r=WebGLPlot.CesiumMath.toRadians(i.y+this.offsetRotate.y),o=WebGLPlot.CesiumMath.toRadians(i.x+this.offsetRotate.x),a=new WebGLPlot.HeadingPitchRoll(n,r,o);const e=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z),l=WebGLPlot.Transforms.headingPitchRollToFixedFrame(e,a);var s=new WebGLPlot.GeometryInstance({geometry:this.ScaneCylinderGeometry,modelMatrix:l,id:this.id});let u=new WebGLPlot.Primitive({geometryInstances:s,appearance:new Cesium.EllipsoidSurfaceAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this.cylinderColor})}),asynchronous:!1,show:this.show});this.CylinderPrimitive=this.scene.primitives.add(u)}},_0x8764e6.prototype.setVisible=function(e){this.CylinderPrimitive&&(this.show=e,this.CylinderPrimitive.show=e)},_0x8764e6.prototype.setColor=function(e){this.CylinderPrimitive&&e instanceof WebGLPlot.Color&&(this.cylinderColor=e,this.CylinderPrimitive.appearance.material=WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:e}))},_0x8764e6.packedLength=WebGLPlot.VertexFormat.packedLength+5,_0x8764e6.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.VertexFormat.pack(e._vertexFormat,t,i),i+=WebGLPlot.VertexFormat.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x778b32=new WebGLPlot.VertexFormat,_0x31de28={vertexFormat:_0x778b32,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0},_0x5dc92c;_0x8764e6.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.VertexFormat.unpack(e,t,_0x778b32);t+=WebGLPlot.VertexFormat.packedLength;var r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return WebGLPlot.defined(i)?(i._vertexFormat=WebGLPlot.VertexFormat.clone(n,i._vertexFormat),i._length=r,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._offsetAttribute=-1===l?void 0:l,i):(_0x31de28.length=r,_0x31de28.topRadius=o,_0x31de28.bottomRadius=a,_0x31de28.slices=s,_0x31de28.offsetAttribute=-1===l?void 0:l,new _0x8764e6(_0x31de28))},_0x8764e6.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._vertexFormat,o=e._slices;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=o+o,l=o+s,u=s+s,c=_0x10d0f0.computePositions(t,i,n,o,!0),h=r.st?new Float32Array(2*u):void 0,d=r.normal?new Float32Array(3*u):void 0,f=r.tangent?new Float32Array(3*u):void 0,p=r.bitangent?new Float32Array(3*u):void 0,_=r.normal||r.tangent||r.bitangent;if(_){var m=r.tangent||r.bitangent,g=0,x=0,y=0,v=Math.atan2(n-i,t),$=_0x3bd790;$.z=Math.sin(v);var b=Math.cos(v),T=_0x43c108,C=_0x318ba1;for(a=0;a<o;a++){var S=a/o*WebGLPlot.CesiumMath.TWO_PI,w=b*Math.cos(S),E=b*Math.sin(S);_&&($.x=w,$.y=E,m&&(T=WebGLPlot.Cartesian3.normalize(WebGLPlot.Cartesian3.cross(WebGLPlot.Cartesian3.UNIT_Z,$,T),T)),r.normal&&(d[g++]=$.x,d[g++]=$.y,d[g++]=$.z,d[g++]=$.x,d[g++]=$.y,d[g++]=$.z),r.tangent&&(f[x++]=T.x,f[x++]=T.y,f[x++]=T.z,f[x++]=T.x,f[x++]=T.y,f[x++]=T.z),r.bitangent&&(C=WebGLPlot.Cartesian3.normalize(WebGLPlot.Cartesian3.cross($,T,C),C),p[y++]=C.x,p[y++]=C.y,p[y++]=C.z,p[y++]=C.x,p[y++]=C.y,p[y++]=C.z))}for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=-1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[y++]=0,p[y++]=-1,p[y++]=0);for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[y++]=0,p[y++]=1,p[y++]=0)}var P=12*o-12,A=WebGLPlot.IndexDatatype.createTypedArray(u,P),L=0,M=0;for(a=0;a<o-1;a++)A[L++]=M,A[L++]=M+2,A[L++]=M+3,A[L++]=M,A[L++]=M+3,A[L++]=M+1,M+=2;for(A[L++]=s-2,A[L++]=0,A[L++]=1,A[L++]=s-2,A[L++]=1,A[L++]=s-1,a=1;a<o-1;a++)A[L++]=s+a+1,A[L++]=s+a,A[L++]=s;for(a=1;a<o-1;a++)A[L++]=l,A[L++]=l+a,A[L++]=l+a+1;var R=0;if(r.st){var O=Math.max(i,n);for(a=0;a<u;a++){var D=WebGLPlot.Cartesian3.fromArray(c,3*a,_0x23994f);h[R++]=(D.x+O)/(2*O),h[R++]=(D.y+O)/(2*O)}}var I=new WebGLPlot.GeometryAttributes;r.position&&(I.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c})),r.normal&&(I.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.tangent&&(I.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:f})),r.bitangent&&(I.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),r.st&&(I.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:h})),_0x2c1142.x=.5*t,_0x2c1142.y=Math.max(n,i);var F=new WebGLPlot.BoundingSphere(WebGLPlot.Cartesian3.ZERO,WebGLPlot.Cartesian2.magnitude(_0x2c1142));if(WebGLPlot.defined(e._offsetAttribute)){t=c.length;var B=new Uint8Array(t/3),N=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(B,N),I.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}return new WebGLPlot.Geometry({attributes:I,indices:A,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:F,offsetAttribute:e._offsetAttribute})}},_0x8764e6.getUnitCylinder=function(){return WebGLPlot.defined(_0x5dc92c)||(_0x5dc92c=_0x8764e6.createGeometry(new _0x8764e6({topRadius:1,bottomRadius:1,length:1,vertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY}))),_0x5dc92c};const _0x1c0a56=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4656c9=_0x1c0a56(void 0,(function(){return _0x4656c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4656c9).search("(((.+)+)+)+$")}));function _0x34a477(e){this.lineWidth=1,this.lineColor=new WebGLPlot.Color(1,0,0,1),this._scaneRegion_ShapePts=[],this.id=e.id,this.scene=e.scene}_0x4656c9(),_0x34a477.prototype.createScaneCylinder=function(e){if(this.ScaneCylinder)return!1;this.point=WebGLPlot.defaultValue(e.point,new _0x23de81(0,0,0));var t=WebGLPlot.defaultValue(e.length,100),i=WebGLPlot.defaultValue(e.radius,30),n=WebGLPlot.defaultValue(e.rotate,new _0x23de81(0,0,0)),r=WebGLPlot.defaultValue(e.offsetRotate,new _0x23de81(0,0,0));let o=WebGLPlot.defaultValue(e.color,new WebGLPlot.Color(1,0,0,.4));var a=WebGLPlot.defaultValue(e.showScane,!1);return this.ScaneCylinder=new _0x8764e6({length:t,topRadius:i,bottomRadius:0,scene:this.scene,point:this.point,rotate:n,offsetRotate:r,id:this.id,show:a,color:o}),!0},_0x34a477.prototype.updateScaneCylinder=function(e){this.ScaneCylinder&&this.ScaneCylinder.update(e)},_0x34a477.prototype.setScaneCylinderColor=function(e){this.ScaneCylinder&&e instanceof WebGLPlot.Color&&this.ScaneCylinder.setColor(e)},_0x34a477.prototype.setScaneCylinderVisible=function(e){this.ScaneCylinder&&this.ScaneCylinder.setVisible(e)},_0x34a477.prototype.removeScaneCylinder=function(){this.ScaneCylinder&&(this.ScaneCylinder.remove(),this.ScaneCylinder=void 0)},_0x34a477.prototype.scaneCylinder2JSONData=function(e){return this.ScaneCylinder&&(e.scaneCylinder_length=this.ScaneCylinder._length,e.scaneCylinder_radius=this.ScaneCylinder._topRadius,e.scaneCylinder_point=this.ScaneCylinder.point,e.scaneCylinder_show=this.ScaneCylinder.show,e.scaneCylinder_cylinderColor=this.ScaneCylinder.cylinderColor,e.scaneCylinder_rotate=this.ScaneCylinder.rotate,e.scaneCylinder_offsetRotate=this.ScaneCylinder.offsetRotate,e.scaneCylinder_id=this.ScaneCylinder.id),e},_0x34a477.prototype.scaneCylinderFromJSONData=function(e){if(this.ScaneCylinder=void 0,e){let t=e.scaneCylinder_length,i=e.scaneCylinder_radius,n=e.scaneCylinder_rotate,r=e.scaneCylinder_offsetRotate;this.point=e.scaneCylinder_point,this.id=e.scaneCylinder_id;let o=e.scaneCylinder_cylinderColor,a=e.scaneCylinder_show;this.ScaneCylinder=new _0x8764e6({length:t,topRadius:i,bottomRadius:0,scene:this.scene,point:this.point,rotate:n,offsetRotate:r,id:this.id,show:a,color:o})}};var _0x325dae=(_0x5b5b00=!0,function(e,t){var i=_0x5b5b00?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b5b00=!1,i}),_0x9e0a15=_0x325dae(void 0,(function(){return _0x9e0a15.toString().search("(((.+)+)+)+$").toString().constructor(_0x9e0a15).search("(((.+)+)+)+$")})),_0x5b5b00;_0x9e0a15();var _0x4da94f={EAST:0,WEST:1,SOUTH:2,NORTH:3,EAST_NORTH:4,WEST_NORTH:5,EAST_SOUTH:6,WEST_SOUTH:7,UP:8},_0x192aa1=Object.freeze(_0x4da94f),_0x5a4db6=(_0x6386e0=!0,function(e,t){var i=_0x6386e0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6386e0=!1,i}),_0x3a7d0d=_0x5a4db6(void 0,(function(){return _0x3a7d0d.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a7d0d).search("(((.+)+)+)+$")})),_0x6386e0;_0x3a7d0d();class _0x371aa9 extends _0x21ced6{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._showPath=WebGLPlot.defaultValue(e.showPath,!1),this._tangentDirection=WebGLPlot.defaultValue(e.tangentDirection,!1),this._pathWidth=WebGLPlot.defaultValue(e.pathWidth,.5),this._pathColor=WebGLPlot.defaultValue(e.pathColor,new WebGLPlot.Color(1,0,0,1)),this._currentPt=WebGLPlot.defaultValue(e.currentPt,null),this._pathType=WebGLPlot.defaultValue(e.pathType,_0x2187ca.POLYLINE),this._wayPoints=WebGLPlot.defaultValue(e.wayPoints,[]),this._shapePoints=WebGLPlot.defaultValue(e.shapePoints,[]),this._pathFeature=WebGLPlot.defaultValue(e.pathFeature,null),this._pathLength=WebGLPlot.defaultValue(e.pathLength,0),this.dynamicScane=void 0,this._showScane=!0,this._scaneColor=new WebGLPlot.Color(1,0,0,.4),this._rotateOffset=new _0x23de81(0,0,0)}execute(){if(!_0x2909c1.isSymbolDot(this._animationGOFeature._symbolType))return null!==this._pathFeature&&0!==this._pathFeature._positions.length&&(this._pathFeature.show=!1),!1;if(!this.canExecute())return!1;this._showPath&&this._pathFeature&&!this._pathFeature._show&&(this._pathFeature.show=!0);var e=this._ratio,t=new Object;t=this._findPos(e,this._shapePoints,t),this._animationGOFeature.localPoints=[this.PtsToSpherical(t.pt)];var i=t.index;if(this._tangentDirection){t.angle;var n=this.modifyAnimationFollowPath(this._shapePoints,i,t.pt),r=57.29577951308232,o=this._animationGOFeature._showMode,a=new _0x23de81(n.x*r,n.y*r,n.z*r);(0!==this.rotateOffset.x||0!==this.rotateOffset.y||0!==this.rotateOffset.z)&&(a.x+=this.rotateOffset.x,a.y+=this.rotateOffset.y,a.z+=this.rotateOffset.z),_0x2bcc5b.Marker===o?this._animationGOFeature._modelRotate=a:_0x2bcc5b.Vector===o&&(this._animationGOFeature.vectorRotate=n),this.updateScane(this.PtsToSpherical(t.pt),a)}return this.updateCameraFollow(e),!0}modifyAnimationFollowPath(e,t,i){if(this._tangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot.Cartesian3;u=WebGLPlot.Cartesian3.subtract(l[0],a,u),u=WebGLPlot.Cartesian3.normalize(u,u);var c=new WebGLPlot.Cartesian3;c=WebGLPlot.Cartesian3.subtract(s,a,c),c=WebGLPlot.Cartesian3.normalize(c,c);var h=new WebGLPlot.Cartesian3;h=WebGLPlot.Cartesian3.cross(c,u,h),h=WebGLPlot.Cartesian3.normalize(h,h);var d=new WebGLPlot.Cartesian3;d=WebGLPlot.Cartesian3.cross(h,c,d),d=WebGLPlot.Cartesian3.normalize(d,d),c=new WebGLPlot.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),h=WebGLPlot.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),c=WebGLPlot.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),d=WebGLPlot.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot.Cartesian3(p,_,m)}}FromAngleAxis(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x23de81(r*i.x,r*i.y,r*i.z),s=new _0x23de81;s=WebGLPlot.Cartesian3.cross(a,e,s);var l=new _0x23de81;l=WebGLPlot.Cartesian3.cross(a,s,l);var u=new _0x23de81(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x23de81(2*l.x,2*l.y,2*l.z);return new _0x23de81(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)}ToEulerAnglesXYZ(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x23de81(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x23de81((n=0)-Math.atan2(t.x,t.y),r,n):new _0x23de81(Math.atan2(t.x,t.y)-(n=0),r,n)}resetAnimationFeature(e){if(_0x21ced6.prototype.resetAnimationFeature.call(this,e),this._animationGOFeature._rotate=this._goFeature._rotate,this._animationGOFeature._modelRotate=this._goFeature._modelRotate,this._animationGOFeature.vectorRotate=this._goFeature.vectorRotate,this.wayPoints.length>=2){var t=[this.wayPoints[0].clone()];this._animationGOFeature.localPoints=t}else{t=[this._goFeature.localPoints[0].clone()];this._animationGOFeature.localPoints=t}e&&(null===this._pathFeature||0===this._pathFeature._positions.length||null===this._shapePoints)&&(this._makePath(),this._pathColor,this._pathWidth),null!==this._pathFeature&&(this._pathFeature.show=!1),void 0===this.dynamicScane?this.dynamicScane=new _0x34a477({id:this._animationGOFeature.id,scene:this._animationManager._scene}):(this.showScane=e,this.updateScane(this._animationGOFeature._localPoints[0],this._animationGOFeature._rotate))}_makePath(){if(null===this._wayPoints||2>this._wayPoints.length)return!1;null===this._pathFeature&&(this.compuetWayPos(),this._pathFeature=_0x4786d3.addAlgoPloyline(null,this.createPathLine(this._shapePoints),this._animationManager._scene)),this._pathLength=0;for(var e=1;e<this._shapePoints.length;e++)this._pathLength+=_0x2909c1.distance(this._shapePoints[e-1],this._shapePoints[e]);return this._pathFeature}_findPos(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLength)).result)return!1;var n=i.pt;return this._tangentDirection&&(i.angle=_0x2909c1.radian(n,t[i.index])/Math.PI*180),i}PtsToSpherical(e){var t=this._animationManager._scene.globe.ellipsoid,i=new WebGLPlot.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot.CesiumMath.toDegrees(n.latitude);return new _0x23de81(WebGLPlot.CesiumMath.toDegrees(n.longitude),r,n.height)}getGOAnimationType(){return _0x144579.ANIMATION_WAY}setShowPath(e){this._showPath=e}setWayPoints(e){if(!e||!Array.isArray(e)||2>e.length)return!1;this._wayPoints=[],this._wayPoints=e,null!==this._pathFeature&&(this.compuetWayPos(),this._pathFeature.positions=this._shapePoints)}getWayPoints(){return this._wayPoints}getCurrentPt(){return this._currentPt}setPathColor(e){!e||(this._pathColor=e,this.pathFeature&&null!==this.pathFeature&&(this.pathFeature.options.color=this.pathColor,this.pathFeature.setStyle(this.pathFeature.options)))}getPathColor(){return this._pathColor}setPathWidth(e){!e||(this.pathWidth=e,this._pathFeature&&null!==this.pathWidth&&(this._pathFeature.width=this.pathWidth))}getPathWidth(){return this._pathWidth}setPathType(e){null!=e&&this.pathType!==e&&(this.pathType=e,null!==this.pathFeature&&(this.pathFeature.destroy(),this.pathFeature=null))}getPathType(){return this._pathType}generateBeizerPointsNoCtrlPt(e){return _0x2909c1.generateBeizerPointsNoCtrlPt(e)}createPathLine(e){return this._pathWidth<=0&&(this._pathWidth=.5),{width:this._pathWidth,positions:e,material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this._pathColor}),id:this._animationGOFeature._id+"_Path",show:!1}}getPtsIndexByDistance(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x2909c1.distance(e[o],e[o+1]))>=t){var a=_0x2909c1.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x23de81(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n}compuetWayPos(){this._pathType===_0x2187ca.POLYLINE?this._shapePoints=this._wayPoints:this._shapePoints=this.generateBeizerPointsNoCtrlPt(this._wayPoints);for(var e=[],t=0;t<this._shapePoints.length;t++){var i=this._shapePoints[t];e.push(i.x),e.push(i.y),e.push(i.z)}this._shapePoints=WebGLPlot.Cartesian3.fromDegreesArrayHeights(e)}getJSONData(){var e=this.getBaseJSONData();e.type=this.getGOAnimationType(),e.showPath=this.showPath,e.tangentDirection=this.tangentDirection,e.pathType=this.pathType,e.pathWidth=this.pathWidth,e.pathColor=this._colorFormat(this.pathColor),e.wayPoints=[];for(var t=0;t<this.wayPoints.length;t++)e.wayPoints.push({x:this.wayPoints[t].x,y:this.wayPoints[t].y,z:this.wayPoints[t].z});return this.dynamicScane&&(e=this.dynamicScane.scaneCylinder2JSONData(e)),e}fromJSONData(e){this.fromBaseJSONData(e),this.showPath=e.showPath,this.tangentDirection=e.tangentDirection,this.pathType=e.pathType,this.pathWidth=e.pathWidth,this.pathColor=this._serverColorToColor(e.pathColor);for(var t=[],i=0;i<e.wayPoints.length;i++)t.push(new _0x23de81(e.wayPoints[i].x,e.wayPoints[i].y,e.wayPoints[i].z));this.dynamicScane&&e.scaneCylinder_id&&this.dynamicScane.scaneCylinderFromJSONData(e),this.setWayPoints(t)}createScane(e){e.showScane=this.showScane,e.point=this._animationGOFeature._localPoints[0].clone(),e.color?this.scaneColor=e.color:e.color=this.scaneColor,e.id=this._animationGOFeature.id,this.dynamicScane.createScaneCylinder(e)}updateScane(e,t){if(this.dynamicScane){var i={point:e,rotate:t};this.dynamicScane.updateScaneCylinder(i)}}setScaneVisible(e){this.dynamicScane&&this.dynamicScane.setScaneCylinderVisible(e)}setScaneColor(e){this.dynamicScane&&this.dynamicScane.setScaneCylinderColor(e)}removeScane(){this.dynamicScane&&this.dynamicScane.removeScaneCylinder()}setCameraFollow(e,t,i,n){if(this.isFollow=e,this._wayPoints.length<=0||!this.isFollow)return!1;null===this._pathFeature&&this._shapePoints.length<=0&&(this._makePath(),this._pathFeature.show=!1);const r=Math.PI/180,o=n/i,a=-Math.asin(o);let s=null;switch(this.CameraOrientation=null,t){case _0x192aa1.EAST:s=new Cesium.Cartesian3(0,-1,o),this.CameraOrientation={heading:-90*r,pitch:a,roll:0};break;case _0x192aa1.WEST:s=new Cesium.Cartesian3(0,1,o),this.CameraOrientation={heading:90*r,pitch:a,roll:0};break;case _0x192aa1.SOUTH:s=new Cesium.Cartesian3(-1,0,o),this.CameraOrientation={heading:0,pitch:a,roll:0};break;case _0x192aa1.NORTH:s=new Cesium.Cartesian3(1,0,o),this.CameraOrientation={heading:180*r,pitch:a,roll:0};break;case _0x192aa1.EAST_NORTH:s=new Cesium.Cartesian3(1,-1,o),this.CameraOrientation={heading:225*r,pitch:a,roll:0};break;case _0x192aa1.WEST_NORTH:s=new Cesium.Cartesian3(1,1,o),this.CameraOrientation={heading:135*r,pitch:a,roll:0};break;case _0x192aa1.EAST_SOUTH:s=new Cesium.Cartesian3(-1,-1,o),this.CameraOrientation={heading:-45*r,pitch:a,roll:0};break;case _0x192aa1.WEST_SOUTH:s=new Cesium.Cartesian3(-1,1,o),this.CameraOrientation={heading:45*r,pitch:a,roll:0};break;case _0x192aa1.UP:s=new Cesium.Cartesian3(0,0,1),this.CameraOrientation={heading:0*r,pitch:-Math.PI/2,roll:0}}const l=this._shapePoints[0],u=_0x2909c1.computeMatrix2(l,new Cesium.Cartesian3(0,0,0));let c=_0x2909c1.localPtsToCartesian(s,u,i).position,h=new _0x23de81(c.x-l.x,c.y-l.y,c.z-l.z);this.followShapePoints=[];for(let e=0;e<this._shapePoints.length;e++){const t=this._shapePoints[e];this.followShapePoints.push(new _0x23de81(t.x+h.x,t.y+h.y,t.z+h.z))}}updateCameraFollow(e){if(!this.isFollow)return;let t=new Object,i=this._findPos(e,this.followShapePoints,t).pt;this._animationManager._scene.camera.setView({destination:i,orientation:this.CameraOrientation})}}Object.defineProperties(_0x371aa9.prototype,{showPath:{get:function(){return this._showPath},set:function(e){e!=this._showPath&&(this._showPath=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},tangentDirection:{get:function(){return this._tangentDirection},set:function(e){e!=this._tangentDirection&&(this._tangentDirection=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathType:{get:function(){return this._pathType},set:function(e){e!=this._pathType&&(this._pathType=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathWidth:{get:function(){return this._pathWidth},set:function(e){e==this._pathWidth||e<=0||(this._pathWidth=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathColor:{get:function(){return this._pathColor},set:function(e){e==this._pathColor||!(e instanceof WebGLPlot.Color)||(this._pathColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},wayPoints:{get:function(){return this._wayPoints},set:function(e){e!==this._wayPoints&&(this._wayPoints=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},showScane:{get:function(){return this._showScane},set:function(e){e!=this._showScane&&(this._showScane=e,this.dynamicScane&&this.dynamicScane.setScaneCylinderVisible(e),_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},scaneColor:{get:function(){return this._scaneColor},set:function(e){e!=this._scaneColor&&(this._scaneColor=e,this.dynamicScane&&this.dynamicScane.setScaneCylinderColor(e),_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},rotateOffset:{get:function(){return this._rotateOffset},set:function(e){e!=this._rotateOffset&&(this._rotateOffset=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x24a8d7=(_0x46f90b=!0,function(e,t){var i=_0x46f90b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x46f90b=!1,i}),_0x513d72=_0x24a8d7(void 0,(function(){return _0x513d72.toString().search("(((.+)+)+)+$").toString().constructor(_0x513d72).search("(((.+)+)+)+$")})),_0x46f90b;_0x513d72();class _0x269f67 extends _0x21ced6{constructor(e){super(e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT)),this._showPath=WebGLPlot$e.defaultValue(e.showPath,!1),this._tangentDirection=WebGLPlot$e.defaultValue(e.tangentDirection,!1),this._pathWidth=WebGLPlot$e.defaultValue(e.pathWidth,.5),this._pathColor=WebGLPlot$e.defaultValue(e.pathColor,new WebGLPlot$e.Color(1,0,0,1)),this._currentPt=WebGLPlot$e.defaultValue(e.currentPt,null),this._pathType=WebGLPlot$e.defaultValue(e.pathType,_0x2187ca.POLYLINE),this._wayPoints=WebGLPlot$e.defaultValue(e.wayPoints,[]),this.shapePointsArray=WebGLPlot$e.defaultValue(e.shapePoints,[]),this._pathFeature=WebGLPlot$e.defaultValue(e.pathFeature,null),this._pathLength=WebGLPlot$e.defaultValue(e.pathLength,0),this._scane_ShapePts=[],this.showScane=!0,this._rotateOffset=new _0x23de81(0,0,0)}execute(){if(!this.canExecute())return!1;if(this._showPath&&this._pathFeature&&!this._pathFeature._show&&(this._pathFeature.show=!0),this.animationGOFeatures.length>0)for(let e=0;e<this.animationGOFeatures.length;e++){const t=this.shapePointsArray[e];this.execute2(this.animationGOFeatures[e],t)}}execute2(e,t){if(!_0x2909c1.isSymbolDot(e._symbolType))return!1;var i=this._ratio,n=new Object;n=this._findPos(i,t,n),e.localPoints=[this.PtsToSpherical(n.pt)];var r=n.index;if(this._tangentDirection){n.angle;var o=this.modifyAnimationFollowPath(t,r,n.pt),a=57.29577951308232,s=e._showMode,l=new _0x23de81(o.x*a,o.y*a,o.z*a);_0x2bcc5b.Marker===s?e._modelRotate=l:_0x2bcc5b.Vector===s&&(e.vectorRotate=o)}return this.updateCameraFollow(i),!0}modifyAnimationFollowPath(e,t,i){if(this._tangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot$e.Cartesian3;u=WebGLPlot$e.Cartesian3.subtract(l[0],a,u),u=WebGLPlot$e.Cartesian3.normalize(u,u);var c=new WebGLPlot$e.Cartesian3;c=WebGLPlot$e.Cartesian3.subtract(s,a,c),c=WebGLPlot$e.Cartesian3.normalize(c,c);var h=new WebGLPlot$e.Cartesian3;h=WebGLPlot$e.Cartesian3.cross(c,u,h),h=WebGLPlot$e.Cartesian3.normalize(h,h);var d=new WebGLPlot$e.Cartesian3;d=WebGLPlot$e.Cartesian3.cross(h,c,d),d=WebGLPlot$e.Cartesian3.normalize(d,d),c=new WebGLPlot$e.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot$e.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot$e.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),h=WebGLPlot$e.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),c=WebGLPlot$e.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),d=WebGLPlot$e.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot$e.Cartesian3(p,_,m)}}FromAngleAxis(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x23de81(r*i.x,r*i.y,r*i.z),s=new _0x23de81;s=WebGLPlot$e.Cartesian3.cross(a,e,s);var l=new _0x23de81;l=WebGLPlot$e.Cartesian3.cross(a,s,l);var u=new _0x23de81(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x23de81(2*l.x,2*l.y,2*l.z);return new _0x23de81(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)}ToEulerAnglesXYZ(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x23de81(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x23de81((n=0)-Math.atan2(t.x,t.y),r,n):new _0x23de81(Math.atan2(t.x,t.y)-(n=0),r,n)}_makePath(){if(null===this._wayPoints||2>this._wayPoints.length)return!1;null===this._pathFeature&&(this.compuetWayPos(),this._pathFeature=_0x4786d3.addAlgoPloyline(null,this.createPathLine(this.shapePointsArray[0]))),this._pathLength=0;for(var e=1;e<this.shapePointsArray[0].length;e++)this._pathLength+=_0x2909c1.distance(this.shapePointsArray[0][e-1],this.shapePointsArray[0][e]);return this._pathFeature}_findPos(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLength)).result)return!1;var n=i.pt;return this._tangentDirection&&(i.angle=_0x2909c1.radian(n,t[i.index])/Math.PI*180),i}PtsToSpherical(e){var t=_0x25263a.getInstance({scene:this._scene})._scene.globe.ellipsoid,i=new WebGLPlot$e.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot$e.CesiumMath.toDegrees(n.latitude);return new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(n.longitude),r,n.height)}getGOAnimationType(){return _0x144579.ANIMATION_WAY}setShowPath(e){this._showPath=e}setWayPoints(e){if(!e||!Array.isArray(e)||2>e.length)return!1;this._wayPoints=[],this._wayPoints=e,null!==this._pathFeature&&(this.compuetWayPos(),this._pathFeature._positions=this.shapePointsArray[0])}getWayPoints(){return this._wayPoints}getCurrentPt(){return this._currentPt}setPathColor(e){!e||(this._pathColor=e,this.pathFeature&&null!==this.pathFeature&&(this.pathFeature.options.color=this.pathColor,this.pathFeature.setStyle(this.pathFeature.options)))}getPathColor(){return this._pathColor}setPathWidth(e){!e||(this.pathWidth=e,this.pathFeature&&null!==this.pathWidth&&(this.pathFeature.options.weight=this.pathWidth,this.pathFeature.setStyle(this.pathFeature.options)))}getPathWidth(){return this._pathWidth}setPathType(e){null!=e&&this.pathType!==e&&(this.pathType=e,null!==this.pathFeature&&(this.pathFeature.destroy(),this.pathFeature=null))}getPathType(){return this._pathType}generateBeizerPointsNoCtrlPt(e){return _0x2909c1.generateBeizerPointsNoCtrlPt(e)}createPathLine(e){return this._pathWidth<=0&&(this._pathWidth=.5),{width:this._pathWidth,positions:e,material:WebGLPlot$e.Material.fromType(WebGLPlot$e.Material.ColorType,{color:this._pathColor}),id:this.animationGOFeatures[0]._id+"_Path",show:!1}}getPtsIndexByDistance(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x2909c1.distance(e[o],e[o+1]))>=t){var a=_0x2909c1.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x23de81(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n}compuetWayPos(){let e=[];e=this._pathType===_0x2187ca.POLYLINE?this._wayPoints:this.generateBeizerPointsNoCtrlPt(this._wayPoints),this.shapePointsArray=[];for(let r=0;r<this.offsetPt.length;r++){const o=this.offsetPt[r];for(var t=[],i=0;i<e.length;i++){var n=e[i];t.push(n.x+o.x),t.push(n.y+o.y),t.push(n.z+o.z)}this.shapePointsArray.push(WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(t))}}getJSONData(){var e=this.getBaseJSONData();e.type=this.getGOAnimationType(),e.showPath=this.showPath,e.tangentDirection=this.tangentDirection,e.pathType=this.pathType,e.pathWidth=this.pathWidth,e.pathColor=this._colorFormat(this.pathColor),e.wayPoints=[];for(var t=0;t<this.wayPoints.length;t++)e.wayPoints.push({x:this.wayPoints[t].x,y:this.wayPoints[t].y,z:this.wayPoints[t].z});return e}fromJSONData(e){this.fromBaseJSONData(e),this.showPath=e.showPath,this.tangentDirection=e.tangentDirection,this.pathType=e.pathType,this.pathWidth=e.pathWidth,this.pathColor=this._serverColorToColor(e.pathColor);for(var t=[],i=0;i<e.wayPoints.length;i++)t.push(new _0x23de81(e.wayPoints[i].x,e.wayPoints[i].y,e.wayPoints[i].z));this.setWayPoints(t)}createScane(e){e.showScane=this.showScane,this.dynamicScane.createScaneCone(e)}updateScane(e,t){var i={point:e,rotate:t,showScane:this.showScane};this.dynamicScane.updateScaneCone(i)}setGOFeatures(e,t){if(void 0===t||t.length<=0||null===e._goAnimationLayer)return!1;this._animationManager=e,this._goFeatures=t;const i=t[0].localPoints[0].clone();return this.offsetPt=[],this.animationGOFeatures=[],t.map((t=>{const n=t.localPoints[0].clone(),r=new _0x23de81(n.x-i.x,n.y-i.y,n.z-i.z);this.offsetPt.push(r);let o=this.createAnimationGOFeature(t);o._layer=e._goAnimationLayer,this.animationGOFeatures.push(o)})),!(this.animationGOFeatures.length<=0)&&(e._goAnimationLayer.addFeatures(this.animationGOFeatures),this.showAnimationFeature(!1),!0)}createAnimationGOFeature(e){for(var t=0;t<this._animationManager._goAnimations.length;t++){var i=this._animationManager._goAnimations[t];if(i._goFeature.id===e.id)return i._animationGOFeature}let n=e.clone();return n._id+=this._name,n._isEdit=!0,n._valid=!1,n._isAnimationFeature=!0,n}showAnimationFeature(e){this.resetAnimationFeature(e)}resetAnimationFeature(e){if(this.animationGOFeatures.length>0&&this._goFeatures.length>0)for(let i=0;i<this._goFeatures.length;i++){let n=this._goFeatures[i];n.display=!e,n._initialize=!1;let r=this.animationGOFeatures[i];r.display=e,r._initialize=!1,r._rotate=n._rotate,r._modelRotate=n._modelRotate,r.vectorRotate=n.vectorRotate;var t=n._localPoints[0].clone();r._localPoints=[t]}e&&(null===this._pathFeature||0===this._pathFeature._positions.length||0===this.shapePointsArray.length)&&(this._makePath(),this._pathColor,this._pathWidth),null!==this._pathFeature&&(this._pathFeature.show=!1)}setCameraFollow(e,t,i,n){if(this.isFollow=e,this._wayPoints.length<=0||!this.isFollow)return!1;null===this._pathFeature&&this.shapePointsArray[0].length<=0&&(this._makePath(),this._pathFeature.show=!1);const r=Math.PI/180,o=n/i,a=-Math.asin(o);let s=null;switch(this.CameraOrientation=null,t){case _0x192aa1.EAST:s=new Cesium.Cartesian3(0,-1,o),this.CameraOrientation={heading:-90*r,pitch:a,roll:0};break;case _0x192aa1.WEST:s=new Cesium.Cartesian3(0,1,o),this.CameraOrientation={heading:90*r,pitch:a,roll:0};break;case _0x192aa1.SOUTH:s=new Cesium.Cartesian3(-1,0,o),this.CameraOrientation={heading:0,pitch:a,roll:0};break;case _0x192aa1.NORTH:s=new Cesium.Cartesian3(1,0,o),this.CameraOrientation={heading:180*r,pitch:a,roll:0};break;case _0x192aa1.EAST_NORTH:s=new Cesium.Cartesian3(1,-1,o),this.CameraOrientation={heading:225*r,pitch:a,roll:0};break;case _0x192aa1.WEST_NORTH:s=new Cesium.Cartesian3(1,1,o),this.CameraOrientation={heading:135*r,pitch:a,roll:0};break;case _0x192aa1.EAST_SOUTH:s=new Cesium.Cartesian3(-1,-1,o),this.CameraOrientation={heading:-45*r,pitch:a,roll:0};break;case _0x192aa1.WEST_SOUTH:s=new Cesium.Cartesian3(-1,1,o),this.CameraOrientation={heading:45*r,pitch:a,roll:0};break;case _0x192aa1.UP:s=new Cesium.Cartesian3(0,0,1),this.CameraOrientation={heading:0*r,pitch:-Math.PI/2,roll:0}}const l=this.shapePointsArray[0][0],u=_0x2909c1.computeMatrix2(l,new Cesium.Cartesian3(0,0,0));let c=_0x2909c1.localPtsToCartesian(s,u,i).position,h=new _0x23de81(c.x-l.x,c.y-l.y,c.z-l.z);this.followShapePoints=[];for(let e=0;e<this.shapePointsArray[0].length;e++){const t=this.shapePointsArray[0][e];this.followShapePoints.push(new _0x23de81(t.x+h.x,t.y+h.y,t.z+h.z))}}updateCameraFollow(e){if(!this.isFollow)return;let t=new Object,i=this._findPos(e,this.followShapePoints,t).pt;this._animationManager._scene.camera.setView({destination:i,orientation:this.CameraOrientation})}}Object.defineProperties(_0x269f67.prototype,{showPath:{get:function(){return this._showPath},set:function(e){e!=this._showPath&&(this._showPath=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},tangentDirection:{get:function(){return this._tangentDirection},set:function(e){e!=this._tangentDirection&&(this._tangentDirection=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathType:{get:function(){return this._pathType},set:function(e){e!=this._pathType&&(this._pathType=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathWidth:{get:function(){return this._pathWidth},set:function(e){e==this._pathWidth||e<=0||(this._pathWidth=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathColor:{get:function(){return this._pathColor},set:function(e){e!=this._pathColor&&(this._pathColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},wayPoints:{get:function(){return this._wayPoints},set:function(e){e!==this._wayPoints&&(this._wayPoints=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},showScane:{get:function(){return this._showScane},set:function(e){e!=this._showScane&&(this._showScane=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},rotateOffset:{get:function(){return this._rotateOffset},set:function(e){e!=this._rotateOffset&&(this._rotateOffset=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x10b4fb=(_0x4cfb31=!0,function(e,t){var i=_0x4cfb31?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4cfb31=!1,i}),_0x241e0b=_0x10b4fb(void 0,(function(){return _0x241e0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x241e0b).search("(((.+)+)+)+$")})),_0x4cfb31;_0x241e0b();class _0x224004 extends _0x21ced6{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._lineColorAnimation=WebGLPlot.defaultValue(e.lineColorAnimation,!1),this._startLineColor=WebGLPlot.defaultValue(e.startLineColor,new WebGLPlot.Color(1,0,0,1)),this._endLineColor=WebGLPlot.defaultValue(e.endLineColor,new WebGLPlot.Color(0,0,1,1)),this._lineWidthAnimation=WebGLPlot.defaultValue(e.lineWidthAnimation,!1),this._startLineWidth=WebGLPlot.defaultValue(e.startLineWidth,0),this._endLineWidth=WebGLPlot.defaultValue(e.endLineWidth,5),this._surroundLineColorAnimation=WebGLPlot.defaultValue(e.surroundLineColorAnimation,!1),this._startSurroundLineColor=WebGLPlot.defaultValue(e.startSurroundLineColor,new WebGLPlot.Color(1,1,0,1)),this._endSurroundLineColor=WebGLPlot.defaultValue(e.endSurroundLineColor,new WebGLPlot.Color(0,1,1,1)),this._surroundLineWidthAnimation=WebGLPlot.defaultValue(e.surroundLineWidthAnimation,!1),this._startSurroundLineWidth=WebGLPlot.defaultValue(e.startSurroundLineWidth,0),this._endSurroundLineWidth=WebGLPlot.defaultValue(e.endtSurroundLineWidth,1)}getGOAnimationType(){return _0x144579.ANIMATION_ATTRIBUTE}execute(){if(!this.canExecute())return!1;var e=this.ratio,t=this.executeLineColorAnimation(e),i=this.executeLineWidthAnimation(e),n=this.executeSurroundLineColorAnimation(e),r=this.executeSurroundLineWidthAnimation(e);return!!(t||i||n||r)&&(this._animationGOFeature._initialize=!1,!0)}executeLineColorAnimation(e){if(!this._lineColorAnimation)return!1;var t=this.startLineColor,i=this.endLineColor,n=t.red+(i.red-t.red)*e,r=t.green+(i.green-t.green)*e,o=t.blue+(i.blue-t.blue)*e,a=t.alpha+(i.alpha-t.alpha)*e;return this._animationGOFeature._symbolStyle._lineColor=new WebGLPlot.Color(n,r,o,a),!0}executeLineWidthAnimation(e){return!!this.lineWidthAnimation&&(_0x1c668c.SYMBOL_DOT===this._animationGOFeature.symbolType?(this._animationGOFeature.gridLineWidth=this.startLineWidth+(this.endLineWidth-this.startLineWidth)*e,!0):_0x1c668c.SYMBOL_ALGO===this._animationGOFeature.symbolType?(this._animationGOFeature._symbolStyle._lineWidth=this.startLineWidth+(this.endLineWidth-this.startLineWidth)*e,!0):void 0)}executeSurroundLineColorAnimation(e){if(!this.surroundLineColorAnimation)return!1;var t=this.startSurroundLineColor,i=this.endSurroundLineColor,n=t.red+(i.red-t.red)*e,r=t.green+(i.green-t.green)*e,o=t.blue+(i.blue-t.blue)*e,a=t.alpha+(i.alpha-t.alpha)*e;return this._animationGOFeature._symbolStyle._surroundLineColor=new WebGLPlot.Color(n,r,o,a),!0}executeSurroundLineWidthAnimation(e){return!!this.surroundLineWidthAnimation&&(_0x1c668c.SYMBOL_DOT===this._animationGOFeature.symbolType?(this._animationGOFeature._gridSurroundLineWidth=this.startSurroundLineWidth+(this.endSurroundLineWidth-this.startSurroundLineWidth)*e,!0):_0x1c668c.SYMBOL_ALGO===this._animationGOFeature.symbolType?(this._animationGOFeature._symbolStyle._surroundLineWidth=this.startSurroundLineWidth+(this.endSurroundLineWidth-this.startSurroundLineWidth)*e,!0):void 0)}resetAnimationFeature(e){e&&(this.lineWidthAnimation&&(this._animationGOFeature.gridLineWidth=this._goFeature.gridLineWidth),this.lineColorAnimation&&(this._animationGOFeature._symbolStyle._lineColor=this._goFeature._symbolStyle._lineColor),this.surroundLineWidthAnimation&&(this._animationGOFeature._gridSurroundLineWidth=this._goFeature._gridSurroundLineWidth),this.surroundLineColorAnimation&&(this._animationGOFeature._symbolStyle._surroundLineColor=this._goFeature._symbolStyle._surroundLineColor))}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.lineColorAnimation=this.lineColorAnimation,e.startLineColor=this._colorFormat(this.startLineColor),e.endLineColor=this._colorFormat(this.endLineColor),e.lineWidthAnimation=this.lineWidthAnimation,e.startLineWidth=this.startLineWidth,e.endLineWidth=this.endLineWidth,e.surroundLineColorAnimation=this.surroundLineColorAnimation,e.startSurroundLineColor=this._colorFormat(this.startSurroundLineColor),e.endSurroundLineColor=this._colorFormat(this.endSurroundLineColor),e.surroundLineWidthAnimation=this.surroundLineWidthAnimation,e.startSurroundLineWidth=this.startSurroundLineWidth,e.endSurroundLineWidth=this.endSurroundLineWidth,e}fromJSONData(e){this.fromBaseJSONData(e),this.lineColorAnimation=e.lineColorAnimation,this.startLineColor=this._serverColorToColor(e.startLineColor),this.endLineColor=this._serverColorToColor(e.endLineColor),this.lineWidthAnimation=e.lineWidthAnimation,this.startLineWidth=e.startLineWidth,this.endLineWidth=e.endLineWidth,this.surroundLineColorAnimation=e.surroundLineColorAnimation,this.startSurroundLineColor=this._serverColorToColor(e.startSurroundLineColor),this.endSurroundLineColor=this._serverColorToColor(e.endSurroundLineColor),this.surroundLineWidthAnimation=e.surroundLineWidthAnimation,this.startSurroundLineWidth=e.startSurroundLineWidth,this.endSurroundLineWidth=e.endSurroundLineWidth}}Object.defineProperties(_0x224004.prototype,{lineColorAnimation:{get:function(){return this._lineColorAnimation},set:function(e){e!==this._lineColorAnimation&&(this._lineColorAnimation=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startLineColor:{get:function(){return this._startLineColor},set:function(e){e!==this._startLineColor&&(this._startLineColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endLineColor:{get:function(){return this._endLineColor},set:function(e){e!==this._endLineColor&&(this._endLineColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},lineWidthAnimation:{get:function(){return this._lineWidthAnimation},set:function(e){e!==this._lineWidthAnimation&&(this._lineWidthAnimation=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startLineWidth:{get:function(){return this._startLineWidth},set:function(e){e!==this._startLineWidth&&(this._startLineWidth=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endLineWidth:{get:function(){return this._endLineWidth},set:function(e){e!=this._endLineWidth&&(this._endLineWidth=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},surroundLineColorAnimation:{get:function(){return this._surroundLineColorAnimation},set:function(e){e!=this._surroundLineColorAnimation&&(this._surroundLineColorAnimation=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startSurroundLineColor:{get:function(){return this._startSurroundLineColor},set:function(e){e!=this._startSurroundLineColor&&(this._startSurroundLineColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endSurroundLineColor:{get:function(){return this._endSurroundLineColor},set:function(e){e!=this._endSurroundLineColor&&(this._endSurroundLineColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},surroundLineWidthAnimation:{get:function(){return this._surroundLineWidthAnimation},set:function(e){e!=this._surroundLineWidthAnimation&&(this._surroundLineWidthAnimation=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startSurroundLineWidth:{get:function(){return this._startSurroundLineWidth},set:function(e){e!=this._startSurroundLineWidth&&(this._startSurroundLineWidth=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endSurroundLineWidth:{get:function(){return this._endSurroundLineWidth},set:function(e){e!=this._endSurroundLineWidth&&(this._endSurroundLineWidth=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x1c9ddb=(_0x8d27ef=!0,function(e,t){var i=_0x8d27ef?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8d27ef=!1,i}),_0x400879=_0x1c9ddb(void 0,(function(){return _0x400879.toString().search("(((.+)+)+)+$").toString().constructor(_0x400879).search("(((.+)+)+)+$")})),_0x8d27ef;_0x400879();var _0x3318f9={ClockWise:0,AntiClockWise:1},_0x520814=Object.freeze(_0x3318f9),_0x50134e=(_0x20a12b=!0,function(e,t){var i=_0x20a12b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x20a12b=!1,i}),_0x4fcc87=_0x50134e(void 0,(function(){return _0x4fcc87.toString().search("(((.+)+)+)+$").toString().constructor(_0x4fcc87).search("(((.+)+)+)+$")})),_0x20a12b;_0x4fcc87();class _0x8d847f extends _0x21ced6{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._rotateDirection=WebGLPlot.defaultValue(e.rotateDirection,_0x520814.ClockWise),this._startAngle=WebGLPlot.defaultValue(e.startAngle,new _0x23de81(0,0,0)),this._endAngle=WebGLPlot.defaultValue(e.endAngle,new _0x23de81(0,0,0))}getGOAnimationType(){return _0x144579.ANIMATION_ROTATE}execute(){if(this._animationGOFeature.symbolType!==_0x1c668c.SYMBOL_DOT||!this.canExecute())return!1;var e=this._ratio,t=this.getCurrentAngle(this.startAngle.x,this.endAngle.x,e),i=this.getCurrentAngle(this.startAngle.y,this.endAngle.y,e),n=this.getCurrentAngle(this.startAngle.z,this.endAngle.z,e),r=this._animationGOFeature._showMode;return _0x2bcc5b.Vector===r?this._animationGOFeature.vectorRotate=new _0x23de81(t,i,n):_0x2bcc5b.Marker===r&&(this._animationGOFeature._modelRotate=new _0x23de81(t,i,n)),this._animationGOFeature._initialize=!1,!0}getCurrentAngle(e,t,i){var n=0,r=t-e,o=parseInt(Math.abs(r/360));if(e!==t)if(this._rotateDirection===_0x520814.ClockWise)r<0&&(r+=360*(2*o+1)),n=e+r*i;else{var a=0;n=e+(360-(r=0===(a=r<0?r+360*(o+1):r-360*o)?360*o:360-a+360*o)*i)}return n}resetAnimationFeature(e){this._animationGOFeature._rotate=this._goFeature._rotate,this._animationGOFeature._modelRotate=this._goFeature._modelRotate,this._animationGOFeature.vectorRotate=this._goFeature.vectorRotate,GOAnimation.prototype.resetAnimationFeature.call(this,e)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.rotateDirection=this.rotateDirection,e.startAngle=this.startAngle,e.endAngle=this.endAngle,e}fromJSONData(e){this.fromBaseJSONData(e),this.rotateDirection=e.rotateDirection,this.startAngle=e.startAngle,this.endAngle=e.endAngle}}Object.defineProperties(_0x8d847f.prototype,{rotateDirection:{get:function(){return this._rotateDirection},set:function(e){e!=this._rotateDirection&&(this._rotateDirection=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startAngle:{get:function(){return this._startAngle},set:function(e){e!=this._startAngle&&(this._startAngle=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endAngle:{get:function(){return this._endAngle},set:function(e){e!=this._endAngle&&(this._endAngle=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x4505d8=(_0xdda8a=!0,function(e,t){var i=_0xdda8a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xdda8a=!1,i}),_0x59d8e0=_0x4505d8(void 0,(function(){return _0x59d8e0.toString().search("(((.+)+)+)+$").toString().constructor(_0x59d8e0).search("(((.+)+)+)+$")})),_0xdda8a;_0x59d8e0();class _0x22137f extends _0x21ced6{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._startScale=WebGLPlot.defaultValue(e.startScale,0),this._endScale=WebGLPlot.defaultValue(e.endScale,1),this._lastScale=WebGLPlot.defaultValue(e.lastScale,null)}getGOAnimationType(){return _0x144579.ANIMATION_SCALE}execute(){if(this._animationGOFeature._symbolType!==_0x1c668c.SYMBOL_DOT||!this.canExecute())return!1;this._lastScale=this._animationGOFeature._scale,_0x2bcc5b.Marker===this._animationGOFeature.showMode&&(this._lastScale=this._animationGOFeature._modelScale.x),_0x2bcc5b.Vector===this._animationGOFeature.showMode&&(this._lastScale=this._animationGOFeature._vectorScale);var e=this._startScale;0===e&&(e=.1);var t=this._endScale;if(0===t&&(t=.1),this._animationGOFeature.sizeInMeters)this._animationGOFeature.billboard.scale=this._animationGOFeature._BillboardScale*(e+this.ratio*(t-e));else{var i=this.goFeature._scale*(e+this.ratio*(t-e));_0x2bcc5b.Picture===this._animationGOFeature.showMode||_0x2bcc5b.Grid===this._animationGOFeature.showMode?this._animationGOFeature.scale=i:_0x2bcc5b.Marker===this._animationGOFeature.showMode?(i=this.goFeature._modelScale.x*(e+this.ratio*(t-e)),this._animationGOFeature._modelScale.x=i,this._animationGOFeature._initialize=!1):_0x2bcc5b.Vector===this._animationGOFeature.showMode&&(i=this.goFeature._vectorScale*(e+this.ratio*(t-e)),this._animationGOFeature._vectorScale=i,this._animationGOFeature._initialize=!1)}return!0}resetAnimationFeature(e){this._lastScale=null,this._animationGOFeature.scale=this.goFeature.scale,_0x21ced6.prototype.resetAnimationFeature.call(this,e)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.startScale=this.startScale,e.endScale=this.endScale,e}fromJSONData(e){this.fromBaseJSONData(e),this.startScale=e.startScale,this.endScale=e.endScale}}Object.defineProperties(_0x22137f.prototype,{startScale:{get:function(){return this._startScale},set:function(e){e!=this._startScale&&(this._startScale=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endScale:{get:function(){return this._endScale},set:function(e){e!=this._endScale&&(this._endScale=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},lastScale:{get:function(){return this._lastScale},set:function(e){e!=this._lastScale&&(this._lastScale=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x42f760=(_0x4c0520=!0,function(e,t){var i=_0x4c0520?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c0520=!1,i}),_0x856657=_0x42f760(void 0,(function(){return _0x856657.toString().search("(((.+)+)+)+$").toString().constructor(_0x856657).search("(((.+)+)+)+$")})),_0x4c0520;_0x856657();class _0x597fad extends _0x21ced6{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._startScale=WebGLPlot.defaultValue(e.startScale,0),this._endScale=WebGLPlot.defaultValue(e.endScale,1),this._timeSpace=WebGLPlot.defaultValue(e.timeSpace,50),this._lastDrawTime=WebGLPlot.defaultValue(e.lastDrawTime,0),this._lineLength=WebGLPlot.defaultValue(e.lineLength,0),this._controlPoints=WebGLPlot.defaultValue(e.controlPoints,[]),this.m_arrPts3D=[],this.goFeatureLocalPts=[]}getGOAnimationType(){return _0x144579.ANIMATION_GROW}execute(){if(this._animationGOFeature._localPoints.length<2){var e=this.goFeatureLocalPts;if(e.length<2)return!1;this._animationGOFeature._localPoints=e}if(!this.canExecute())return!1;var t=(new Date).getTime();if(this._lastDrawTime>0&&t-this._timeSpace<this._lastDrawTime)return!1;var i=this._startScale+this._ratio*(this._endScale-this._startScale);return i>=1&&(i=1),this._lastDrawTime=t,this._executeAnimation(i)}_executeAnimation(e){var t=!1,i=this._goFeature._code,n=this._goFeature._libID;if(0===this.m_arrPts3D.length&&(this.m_arrPts3D=WebGLPlot.clonePoints(this.goFeatureLocalPts)),0===n)switch(i){case _0x1c668c.SYMBOL_KIDNEY:case _0x1c668c.SYMBOL_POLYBEZIERCLOSED:case _0x1c668c.SYMBOL_PARALLELOGRAM:case _0x1c668c.SYMBOL_TRAPEZOID:case _0x1c668c.SYMBOL_CIRCLECHORD:t=this._execute_Kidney(e);break;case _0x1c668c.SYMBOL_CIRCLE:t=this._execute_Circle(e);break;case _0x1c668c.SYMBOL_RECTANGLE:t=this._execute_Rect(e);break;case _0x1c668c.SYMBOL_REGULARPOLYGON:t=this._execute_RegularPloygon(e);break;case _0x1c668c.SYMBOL_ELLIPSE:t=this._execute_Ellipse(e);break;case _0x1c668c.SYMBOL_ARBITRARYPOLYGON:t=this._execute_ArbitraryPolygon(e);break;case _0x1c668c.SYMBOL_PARALLELLINE:t=this._execute_ParallelLine(e);break;case _0x1c668c.SYMBOL_POLYBEZIER:t=this._execute_Polybezier(e);break;case _0x1c668c.SYMBOL_PIE:case _0x1c668c.SYMBOL_CHORD:case _0x1c668c.SYMBOL_ARC:return!1;case _0x1c668c.SYMBOL_CURVEEIGHT:t=this._execute_CurveEight(e);break;default:t=this._execute_Generalization(e)}else if(22===n)switch(i){case 1004:case 2004:case 1010:t=this._execute_1004(e);break;case 1006:case 2006:t=this._execute_1006(e);break;case 1002:case 2002:t=this._execute_1002(e);break;case 32:case 3211:t=this._execute_ArbitraryPolygon(e);break;case 390:case 3911:t=this._execute_Kidney(e);break;default:t=this._execute_Generalization(e)}else if(100===n)if(25200===i)t=this._execute_1004(e);else t=this._execute_Generalization(e);else if(421===n)switch(i){case 311:t=this._execute_1004(e);break;case 317:t=this._execute_1006(e);break;default:t=this._execute_Generalization(e)}else if(123===n)switch(i){case 60310:case 6031001:t=this._execute_1004(e);break;default:t=this._execute_Generalization(e)}else t=this._execute_Generalization(e);return t}_execute_Generalization(e){0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,this._lineLength=WebGLPlot.polylineDistance(this._controlPoints));for(var t=[],i=WebGLPlot.clonePoints(this._controlPoints),n=this._findPos(this._lineLength*e,i),r=0;r<=n.pos;r++)t.push(i[r]);return t.push(n.pts),WebGLPlot.isAccessServer(this._animationGOFeature._libID,this._animationGOFeature._code)&&this._animationGOFeature.getMinEditPts()>t.length?(this._executeAndRatioIsZero(),!0):(this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(t),this._animationGOFeature._initialize=!1,!0)}_findPos(e,t){var i,n=0,r=0;for(i=1;i<t.length&&!(n+(r=_0x2909c1.distance(t[i-1],t[i]))>=e);i++)n+=r;var o=new Object;if(i<t.length)var a=_0x2909c1.LinePnt(t[i-1],t[i],e-n);else a=t[i-1];return o.pos=i-1,o.pts=a,o}_execute_1004(e){if(0===this._lineLength){this._controlPoints=this.m_arrPts3D;var t=new _0x23de81((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2);this._lineLength+=_0x2909c1.distance(t,this._controlPoints[2]);for(var i=3;i<this._controlPoints.length;i++)this._lineLength+=_0x2909c1.distance(this._controlPoints[i-1],this._controlPoints[i])}if(0===e)return this._executeAndRatioIsZero(),!0;var n=[],r=[];t=new _0x23de81((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2);r.push(t);for(i=2;i<this._controlPoints.length;i++)r.push(this._controlPoints[i].clone());n.push(this._controlPoints[0]),n.push(this._controlPoints[1]);for(var o=this._findPos(this._lineLength*e,r),a=1;a<=o.pos;a++)n.push(r[a]);return n.push(o.pts),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(n),this._animationGOFeature._initialize=!1,!0}_execute_1006(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D,this._animationGOFeature.m_bIsAnimation=!0),0===e)return this._executeAndRatioIsZero(),!0;var t=this.OperateCtrlPts(this._controlPoints);if(4!==t.length)return!1;for(var i=[],n=0;n<t.length;n++){var r=WebGLPlot.Cartesian3.fromDegrees(t[n].x,t[n].y,t[n].z);i.push(r)}var o=i[0],a=i[1],s=i[2],l=i[3],u=_0x2909c1.distance(o,l),c=_0x2909c1.distance(a,s),h=_0x2909c1.LinePnt(o,l,u*e),d=_0x2909c1.LinePnt(a,s,c*e),f=[];return f.push(this.PtsToSpherical(o)),f.push(this.PtsToSpherical(a)),f.push(this.PtsToSpherical(d)),f.push(this.PtsToSpherical(h)),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(f),this._animationGOFeature._initialize=!1,!0}PtsToSpherical(e){var t=_0x25263a.getInstance({scene:this._scene})._scene.globe.ellipsoid,i=new WebGLPlot.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot.CesiumMath.toDegrees(n.latitude);return new _0x23de81(WebGLPlot.CesiumMath.toDegrees(n.longitude),r,n.height)}_execute_1002(e){if(0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,this._lineLength=WebGLPlot.polylineDistance(this._controlPoints)),0===e)return this._executeAndRatioIsZero(),!0;var t=this._controlPoints.length,i=Math.ceil(t/3),n=t%3==0?3:t%3;1===n&&(i-=1,n=3,this._controlPoints.pop());var r,o=[];if(3===n)for(var a=1;a<i+1;a++){var s=3*a,l=this._controlPoints[s-3],u=this._controlPoints[s-2],c=this._controlPoints[s-1];if((f=(d=_0x2909c1.distance(l,u))+_0x2909c1.distance(u,c))*e>=d)r=_0x2909c1.LinePnt(u,c,f*e-d),o.push(l),o.push(u),o.push(r);else{r=_0x2909c1.LinePnt(l,u,f*e);var h=_0x2909c1.LinePnt(l,u,d*e);o.push(l),o.push(h),o.push(r)}}else{for(a=1;a<i;a++){var d;s=3*a,l=this._controlPoints[s-3],u=this._controlPoints[s-2],c=this._controlPoints[s-1];if((f=(d=_0x2909c1.distance(l,u))+_0x2909c1.distance(u,c))*e>=d)r=_0x2909c1.LinePnt(u,c,f*e-d),o.push(l),o.push(u),o.push(r);else{r=_0x2909c1.LinePnt(l,u,f*e);h=_0x2909c1.LinePnt(l,u,d*e);o.push(l),o.push(h),o.push(r)}}l=this._controlPoints[t-2],u=this._controlPoints[t-1];var f=_0x2909c1.distance(l,u);r=_0x2909c1.LinePnt(l,u,f*e),o.push(l),o.push(r)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(o),this._animationGOFeature._initialize=!1,!0}_execute_Rect(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=new _0x23de81((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2),i=Math.abs(this._controlPoints[0].x-this._controlPoints[1].x)/2*e,n=Math.abs(this._controlPoints[0].y-this._controlPoints[1].y)/2*e,r=new _0x23de81(t.x-i,t.y+n,t.z),o=new _0x23de81(t.x+i,t.y-n,t.z);return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=[r,o],this._animationGOFeature._initialize=!1,!0}_execute_Circle(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=e*_0x2909c1.distance(this._controlPoints[0],this._controlPoints[1]);if(1===e)this._animationGOFeature._localPoints=[this._controlPoints[0],this._controlPoints[1]];else{var i=new _0x23de81(this._controlPoints[0].x+t,this._controlPoints[0].y,this._controlPoints[0].z);this._animationGOFeature._localPoints=[this._controlPoints[0],i]}return this._animationGOFeature._initialize=!1,!0}_execute_Kidney(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D),0===e)return this._executeAndRatioIsZero(),!0;var t=[],i=this._controlPoints.length,n=_0x2909c1.getPolygonCenterPt(this._controlPoints);if(null===n)return this._executeAndRatioIsZero(),!0;for(var r=0;r<i;r++){var o=_0x2909c1.distance(n,this._controlPoints[r]),a=o*e;if(a>o)return!1;var s=_0x2909c1.LinePnt(n,this._controlPoints[r],a);t.push(s)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(t),this._animationGOFeature._initialize=!1,!0}_execute_RegularPloygon(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D),this._controlPoints=_0x2909c1.clearNextSamePts(this._controlPoints),0===e)return this._executeAndRatioIsZero(),!0;var t=this._controlPoints.length,i=_0x2909c1.distance(this._controlPoints[0],this._controlPoints[t-1]),n=i*e,r=[];if(n>=i)r=this._controlPoints;else{var o=_0x2909c1.LinePnt(this._controlPoints[0],this._controlPoints[t-1],n);r.push(this._controlPoints[0]);for(var a=1;a<t-1;a++)r.push(this._controlPoints[a]);r.push(o)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(r),this._animationGOFeature._initialize=!1,!0}_execute_Ellipse(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=_0x2909c1.FindPointOnLineByRatio(e,this._controlPoints[0],this._controlPoints[1]),i=_0x2909c1.FindPointOnLineByRatio(e,this._controlPoints[0],this._controlPoints[2]);return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=[this._controlPoints[0],t,i],this._animationGOFeature._initialize=!1,!0}_execute_ArbitraryPolygon(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=this._controlPoints.length,i=_0x2909c1.getPolygonCenterPt(this._controlPoints);if(null===i)return this._executeAndRatioIsZero(),!0;for(var n=[],r=0;r<t;r++){var o=_0x2909c1.distance(i,this._controlPoints[r])*e,a=_0x2909c1.LinePnt(i,this._controlPoints[r],o);n.push(a)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(n),this._animationGOFeature._initialize=!1,!0}_execute_ParallelLine(e){if(0===this._lineLength){this._controlPoints=this.m_arrPts3D;for(var t=2;t<this._controlPoints.length;t++)this._lineLength+=_0x2909c1.distance(this._controlPoints[t-1],this._controlPoints[t])}var i=[],n=[];for(t=1;t<this._controlPoints.length;t++)n.push(this._controlPoints[t]);var r=this._findPos(this._lineLength*e,n);i.push(this._controlPoints[0]);for(t=0;t<=r.pos;t++)i.push(n[t]);return i.push(r.pts),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(i),this._animationGOFeature._initialize=!1,!0}_execute_Polybezier(e){var t=[];if(0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,t=_0x2909c1.generateBeizerPointsNoCtrlPt(this._controlPoints),this._lineLength+=WebGLPlot.polylineDistance(t)),e>=1)return this._animationGOFeature._symbolAlgo=null,this._animationGOFeature.code=590,this._animationGOFeature._localPoints=this._goFeature._localPoints,this._animationGOFeature._initialize=!1,!0;this._animationGOFeature._symbolAlgo=null,this._animationGOFeature.code=24;for(var i=[],n=0;n<this._controlPoints.length;n++)i.push(this._controlPoints[n].z);var r=Math.max.apply({},i),o=[];t=_0x2909c1.generateBeizerPointsNoCtrlPt(this._controlPoints);var a=this._findPos(this._lineLength*e,t);for(n=0;n<=a.pos;n++)o.push(new _0x23de81(t[n].x,t[n].y,r));return o.push(new _0x23de81(a.pts.x,a.pts.y,r)),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(o),this._animationGOFeature._initialize=!1,!0}_execute_CurveEight(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);for(var t=_0x2909c1.getPolygonCenterPt(this._controlPoints),i=[],n=0;n<this._controlPoints.length;n++){var r=_0x2909c1.distance(t,this._controlPoints[n])*e,o=_0x2909c1.LinePnt(t,this._controlPoints[n],r);i.push(o)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(i),this._animationGOFeature._initialize=!1,!0}_executeAndRatioIsZero(){this._animationGOFeature._localPoints=[]}resetAnimationFeature(e){if(_0x21ced6.prototype.resetAnimationFeature.call(this,e),this._lineLength=0,this._controlPoints=[],this.m_arrPts3D=[],this._animationGOFeature._localPoints=[],this._animationGOFeature.code=this._goFeature.code,this.goFeatureLocalPts.length>=2)for(var t=0;t<this.goFeatureLocalPts.length;t++)this._animationGOFeature._localPoints.push(this.goFeatureLocalPts[t].clone())}OperateCtrlPts(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i].clone());var n=t.length;if(3==n){var r=new _0x23de81;(r=_0x2909c1.getPointsByTrapezoid(1,t[0].x,t[0].y,t[1].x,t[1].y,t[2].x,t[2].y,r)).z=t[2].z,t.push(r)}if(n>4&&t.splice(4,n-4),_0x2909c1.isRight(t[2],t[0],t[1])){var o=t[0].clone();t[0]=t[1].clone(),t[1]=o}if(!_0x2909c1.pointIsRightToVerticle(t[0],t[1],t[2])){o=t[2].clone();t[2]=t[3].clone(),t[3]=o}return t}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.startScale=this.startScale,e.endScale=this.endScale,e}fromJSONData(e){this.fromBaseJSONData(e),this.startScale=e.startScale,this.endScale=e.endScale}}Object.defineProperties(_0x597fad.prototype,{startScale:{get:function(){return this._startScale},set:function(e){e!=this._startScale&&(this._startScale=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endScale:{get:function(){return this._endScale},set:function(e){e!=this._endScale&&(e>=1&&(e=1),this._endScale=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});const _0x2ace2f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x299b2b=_0x2ace2f(void 0,(function(){return _0x299b2b.toString().search("(((.+)+)+)+$").toString().constructor(_0x299b2b).search("(((.+)+)+)+$")}));_0x299b2b();class _0x1ecde6 extends _0x597fad{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,1),e.endScale=WebGLPlot.defaultValue(e.endScale,0);const t=e.startScale;e.startScale<e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_REDUCE_EXP}}var _0x216cc3=(_0x2f29e6=!0,function(e,t){var i=_0x2f29e6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f29e6=!1,i}),_0x21fcd3=_0x216cc3(void 0,(function(){return _0x21fcd3.toString().search("(((.+)+)+)+$").toString().constructor(_0x21fcd3).search("(((.+)+)+)+$")})),_0x2f29e6;_0x21fcd3();class _0x17c29c extends _0x597fad{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,0),e.endScale=WebGLPlot.defaultValue(e.endScale,1);const t=e.startScale;e.startScale>e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e),this._animationGrowEXP_isFirstExecute=!0}getGOAnimationType(){return _0x144579.ANIMATION_GROW_EXP}showAnimationFeature(e){null!==this._animationGOFeature&&null!==this._animationGOFeature._symbolStyle&&(this.resetAnimationFeature(e),this._animationGOFeature.display=!1),null!==this._goFeature&&null!==this._goFeature._symbolStyle&&(this._goFeature.display=!e,this._goFeature._initialize=!1),e&&(this._isSendBegin=!0)}execute(){if(this._animationGOFeature._localPoints.length<2){var e=this.goFeatureLocalPts;if(e.length<2)return!1;this._animationGOFeature._localPoints=e}if(!this.canExecute())return!1;this._animationGrowEXP_isFirstExecute&&(this._animationGOFeature.display=!0,this._animationGrowEXP_isFirstExecute=!1);var t=(new Date).getTime();if(this._lastDrawTime>0&&t-this._timeSpace<this._lastDrawTime)return!1;var i=this._startScale+this._ratio*(this._endScale-this._startScale);return i>=1&&(i=1),this._lastDrawTime=t,this._executeAnimation(i)}}var _0x136c7a=(_0x25cf78=!0,function(e,t){var i=_0x25cf78?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x25cf78=!1,i}),_0x583f41=_0x136c7a(void 0,(function(){return _0x583f41.toString().search("(((.+)+)+)+$").toString().constructor(_0x583f41).search("(((.+)+)+)+$")})),_0x25cf78;_0x583f41();class _0x2980fc extends _0x1368e5{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!0,e.showEffect=!0,e.duration=WebGLPlot.defaultValue(e.duration,3),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_MOVEIN_EXP}}var _0x206ce7=(_0xadb9eb=!0,function(e,t){var i=_0xadb9eb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xadb9eb=!1,i}),_0x1522fb=_0x206ce7(void 0,(function(){return _0x1522fb.toString().search("(((.+)+)+)+$").toString().constructor(_0x1522fb).search("(((.+)+)+)+$")})),_0xadb9eb;_0x1522fb();class _0x42ff63 extends _0x1368e5{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!1,e.showEffect=!0,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_MOVEOUT_EXP}}var _0x14f3f1=(_0x1f5696=!0,function(e,t){var i=_0x1f5696?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f5696=!1,i}),_0x270385=_0x14f3f1(void 0,(function(){return _0x270385.toString().search("(((.+)+)+)+$").toString().constructor(_0x270385).search("(((.+)+)+)+$")})),_0x1f5696;_0x270385();class _0xb1e5d0 extends _0x1368e5{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!1,e.showEffect=!1,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_HIDE_EXP}}var _0x2187ad=(_0x2ae3e2=!0,function(e,t){var i=_0x2ae3e2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ae3e2=!1,i}),_0x5b4ec2=_0x2187ad(void 0,(function(){return _0x5b4ec2.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b4ec2).search("(((.+)+)+)+$")})),_0x2ae3e2;_0x5b4ec2();class _0x116c0b extends _0x1368e5{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!0,e.showEffect=!1,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_SHOW_EXP}}var _0x34834d=(_0x357575=!0,function(e,t){var i=_0x357575?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x357575=!1,i}),_0x5f422c=_0x34834d(void 0,(function(){return _0x5f422c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f422c).search("(((.+)+)+)+$")})),_0x357575;_0x5f422c();class _0xe89a1c extends _0x371aa9{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x2187ca.POLYLINE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_BROKENLINE_EXP}}var _0x5522e2=(_0x3aa9cc=!0,function(e,t){var i=_0x3aa9cc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3aa9cc=!1,i}),_0x32567a=_0x5522e2(void 0,(function(){return _0x32567a.toString().search("(((.+)+)+)+$").toString().constructor(_0x32567a).search("(((.+)+)+)+$")})),_0x3aa9cc;_0x32567a();class _0x5b3a44 extends _0x371aa9{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x2187ca.CURVE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_CURVE_EXP}}const _0x289d22=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x44e978=_0x289d22(void 0,(function(){return _0x44e978.toString().search("(((.+)+)+)+$").toString().constructor(_0x44e978).search("(((.+)+)+)+$")}));_0x44e978();class _0x36afe8 extends _0x371aa9{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x2187ca.POLYLINE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_WAY_EXP}}Object.defineProperties(_0x36afe8.prototype,{wayPoints:{get:function(){return this._wayPoints},set:function(e){if(e instanceof _0x330d7a){let t=[];for(let i=0;i<e._symbolAlgo.components.length;i++){const n=e._symbolAlgo.components[i];t=t.concat(n.shapePts)}this._wayPoints=t}}}});var _0x252c1a=(_0x3b20b3=!0,function(e,t){var i=_0x3b20b3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b20b3=!1,i}),_0x5acbee=_0x252c1a(void 0,(function(){return _0x5acbee.toString().search("(((.+)+)+)+$").toString().constructor(_0x5acbee).search("(((.+)+)+)+$")})),_0x3b20b3;_0x5acbee();class _0x3884c0 extends _0x400916{constructor(e){(e=WebGLPlot.defaultValue(e,{})).duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_BLINK_EXP}}const _0x4b4559=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x9665b0=_0x4b4559(void 0,(function(){return _0x9665b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x9665b0).search("(((.+)+)+)+$")}));_0x9665b0();class _0x5eeaa0 extends _0x22137f{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,0),e.endScale=WebGLPlot.defaultValue(e.endScale,1);const t=e.startScale;e.startScale>e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_ZOOMIN_EXP}}const _0x11230b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x37e237=_0x11230b(void 0,(function(){return _0x37e237.toString().search("(((.+)+)+)+$").toString().constructor(_0x37e237).search("(((.+)+)+)+$")}));_0x37e237();class _0x2c95d7 extends _0x22137f{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,1),e.endScale=WebGLPlot.defaultValue(e.endScale,0);const t=e.startScale;e.startScale<e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_ZOOMOUT_EXP}}var _0x1ad790=(_0x24e7dd=!0,function(e,t){var i=_0x24e7dd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24e7dd=!1,i}),_0xdaa6ed=_0x1ad790(void 0,(function(){return _0xdaa6ed.toString().search("(((.+)+)+)+$").toString().constructor(_0xdaa6ed).search("(((.+)+)+)+$")})),_0x24e7dd;_0xdaa6ed();class GOAnimationManagerBase{constructor(e){this.goAnimations=[],this.curPlayGroup=0}preView(){if(0!==this.goAnimations.length)for(var e=this.getAllGroups(),t=0;t<e.length;t++){var i=e[t];for(let e=0;e<i.length;e++)i[e].play()}}play(e){if(0!==this.goAnimations.length){void 0!==e&&(this.curPlayGroup=this.getAnimationGroupByName(e).index),this.isPlay()&&this.curPlayGroup--;var t=this.getAllGroups();this.curPlayGroup>t.length-1&&(this.curPlayGroup=0);for(var i=t[this.curPlayGroup],n=0;n<i.length;n++){i[n].play()}this.curPlayGroup++}}stop(){if(0!==this.goAnimations.length){for(var e=0;e<this.goAnimations.length;e++)this.goAnimations[e].stop();this.curPlayGroup=0}}pause(){if(0!==this.goAnimations.length){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x577f4c.PLAYING?(e=!0,this.goAnimations[t].pause()):this.goAnimations[t].stop();e&&this.curPlayGroup>0&&this.curPlayGroup--}}reset(){if(0!==this.goAnimations.length){for(var e=0;e<this.goAnimations.length;e++)this.goAnimations[e].reset();this.curPlayGroup=0}}isPlay(){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x577f4c.PLAYING&&(e=!0);return e}isPause(){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x577f4c.PAUSE&&(e=!0);return e}getAnimationTimeLength(e,t){var i=!1,n=0,r=0;for(let u=e-1;u>=0;u--){var o=t[u],a=o.startTime+o.duration;if(a>r&&(r=a),o.animationPlayType===_0x5a1aa1.PLAYAFTERLASTONE){i=!0;for(let e=u-1;e>=0;e--){var s=t[e],l=s.startTime+s.duration;l>n&&(n=l)}}}return{isExist:i,length1:n,length2:r}}getAllGroups(){var e=[];for(let n=0;n<this.goAnimations.length;n++){var t=this.goAnimations[n];if(t.animationPlayType===_0x5a1aa1.PLAYFROMNOW||0===n){var i=[];i.push(t),e.push(i)}else e[e.length-1].push(t)}return e}getAnimationGroup(e){var t=null,i=0,n=this.getAllGroups();for(let o=0;o<n.length;o++){var r=n[o];for(let n=0;n<r.length;n++)if(r[n].name===e.name){t=r,i=o;break}}return{index:i,group:t}}getAnimationGroupByName(e){var t=null,i=0,n=this.getAllGroups();for(let o=0;o<n.length;o++){var r=n[o];for(let n=0;n<r.length;n++)if(r[n].name===e){t=r,i=o;break}}return{index:i,group:t}}changeAnimationTime(e){if(!e||!this.getAnimationGroup(e).group)return!1;var t=this.getAnimationGroup(e).group;this.getAnimationGroup(e).index;var i=t.indexOf(e);if(e.animationPlayType===_0x5a1aa1.PLAYFROMNOW)e.startTime=e.delayTime;else if(e.animationPlayType===_0x5a1aa1.PLAYSAMELASTONE||e.animationPlayType===_0x5a1aa1.UNKNOWN)(n=this.getAnimationTimeLength(i,t)).isExist?e.startTime=n.length1+e.delayTime:e.startTime=e.delayTime;else if(e.animationPlayType===_0x5a1aa1.PLAYAFTERLASTONE){var n=this.getAnimationTimeLength(i,t);e.startTime=n.length2+e.delayTime}}moveAnimation(e,t){if(!(t<0||t>this.goAnimations.length)){var i=this.goAnimations.indexOf(e);if(i!==t){this.goAnimations=this.move(i,t);for(var n=0;n<this.goAnimations.length;n++){e=this.goAnimations[n];this.changeAnimationTime(e)}}}}move(e,t){var i=[].concat(this.goAnimations);return i.splice(t,0,i.splice(e,1)[0]),i}getAnimationDelayTime(e){if(!e||!this.getAnimationGroup(e).group)return!1;var t=0,i=this.getAnimationGroup(e).group;this.getAnimationGroup(e).index;var n=i.indexOf(e);if(e.animationPlayType===_0x5a1aa1.PLAYFROMNOW||0===n)t=e.startTime;else if(e.animationPlayType===_0x5a1aa1.PLAYAFTERLASTONE){var r=this.getAnimationTimeLength(n,i);t=e.startTime-r.length2}else if(e.animationPlayType===_0x5a1aa1.PLAYSAMELASTONE||e.animationPlayType===_0x5a1aa1.UNKNOW){var o=-1;for(let e=n;e>=0;e--){if(i[e].animationPlayType===_0x5a1aa1.PLAYAFTERLASTONE){o=e;break}}if(-1===o)t=e.startTime;else{r=this.getAnimationTimeLength(o,i);t=e.startTime-r.length2}}return t}}var _0x1e22bb=(_0x104292=!0,function(e,t){var i=_0x104292?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x104292=!1,i}),_0x165f10=_0x1e22bb(void 0,(function(){return _0x165f10.toString().search("(((.+)+)+)+$").toString().constructor(_0x165f10).search("(((.+)+)+)+$")})),_0x104292;_0x165f10();const _0x44d626=new Map;class _0x25263a extends GOAnimationManagerBase{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._serverUrl=WebGLPlot.defaultValue(e.serverUrl,""),this._scene=WebGLPlot.defaultValue(e.scene,null),this._openEvoFileCompleted=new WebGLPlot.Event,this._openEvoFileFailed=new WebGLPlot.Event,this._saveEvoFileCompleted=new WebGLPlot.Event,this._saveEvoFileFailed=new WebGLPlot.Event,this.setScene(this._scene),this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},e.options&&e.options.serviceParams&&_0x2909c1.extend(this.options,e.options)}static getInstance(e){let t;return e.scene&&(t=_0x44d626.get(e.scene._plottingID)),WebGLPlot.defined(e)&&!WebGLPlot.defined(t)&&(t=new _0x25263a(e),_0x44d626.set(e.scene._plottingID,t)),t}createGOAnimation(e,t,i,n=!0,r=_0x5a1aa1.UNKNOWN){if(e===_0x144579.ANIMATION_WAY_GROUP){Array.isArray(i)||(i=[i]);for(let e=0;e<i.length;e++)if(!_0x2909c1.isSymbolDot(i[e]._symbolType))return null;return(o=this.createGOAnimationByType(e,t)).setGOFeatures(this,i)?(this.goAnimations.push(o),r!==_0x5a1aa1.UNKNOWN&&(o._animationPlayType=r),o):null}return WebGLPlot.defined(i)&&this.isCanCreateAnimation(e,i.symbolType)?null===(o=this.createGOAnimationByType(e,t))||null==i||i.symbolType===_0x1c668c.GROUPOBJECT||null===i||!WebGLPlot.defined(i)||0===i._libID&&i._code===_0x1c668c.SYMBOL_TEXT?null:o.setGOFeature(this,i)?(this.goAnimations.push(o),r!==_0x5a1aa1.UNKNOWN&&(o._animationPlayType=r),n&&_0x5ac1e1.getInstance().animationCreated.raiseEvent(o),o):null:null;var o}setScene(e){this._goAnimationLayer=new _0x5b011c("animation",e);var t=!1;if(WebGLPlot.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot.PlotLayers)e.plotLayers.goAnimationLayer=this._goAnimationLayer,t=!0;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot.defined(r)&&r instanceof WebGLPlot.PlotLayers){r.goAnimationLayer=this._goAnimationLayer,t=!0;break}}if(!t){var o=new WebGLPlot.PlotLayers;o.goAnimationLayer=this._goAnimationLayer,e.primitives.add(o),e.plotLayers=o}}createGOAnimationByType(e,t){if(null===t||""===t||null===this._goAnimationLayer||null!==this.findGOAnimationByName(t))return null;var i=null;switch(e){case _0x144579.ANIMATION_WAY:i=new _0x371aa9;break;case _0x144579.ANIMATION_BLINK:i=new _0x400916;break;case _0x144579.ANIMATION_ATTRIBUTE:i=new _0x224004;break;case _0x144579.ANIMATION_SHOW:i=new _0x1368e5;break;case _0x144579.ANIMATION_ROTATE:i=new _0x8d847f;break;case _0x144579.ANIMATION_SCALE:i=new _0x22137f;break;case _0x144579.ANIMATION_GROW:i=new _0x597fad;break;case _0x144579.ANIMATION_WAY_GROUP:i=new _0x269f67;break;case _0x144579.ANIMATION_REDUCE_EXP:i=new _0x1ecde6;break;case _0x144579.ANIMATION_GROW_EXP:i=new _0x17c29c;break;case _0x144579.ANIMATION_MOVEIN_EXP:i=new _0x2980fc;break;case _0x144579.ANIMATION_MOVEOUT_EXP:i=new _0x42ff63;break;case _0x144579.ANIMATION_HIDE_EXP:i=new _0xb1e5d0;break;case _0x144579.ANIMATION_SHOW_EXP:i=new _0x116c0b;break;case _0x144579.ANIMATION_BROKENLINE_EXP:i=new _0xe89a1c;break;case _0x144579.ANIMATION_CURVE_EXP:i=new _0x5b3a44;break;case _0x144579.ANIMATION_WAY_EXP:i=new _0x36afe8;break;case _0x144579.ANIMATION_BLINK_EXP:i=new _0x3884c0;break;case _0x144579.ANIMATION_ZOOMIN_EXP:i=new _0x5eeaa0;break;case _0x144579.ANIMATION_ZOOMOUT_EXP:i=new _0x2c95d7;break;default:return null}return null!==i&&(i._name=t,i._scene=this._scene),i}findGOAnimationByName(e){if(null===this.goAnimations||null===e||""===e)return null;for(var t=null,i=0;i<this.goAnimations.length;i++)if(this.goAnimations[i].name===e){t=this.goAnimations[i];break}return t}findGOAnimationByFeature(e){var t=[];if(0===this.goAnimations.length||null===e||!WebGLPlot.defined(e))return t;for(var i=this.goAnimations.length,n=0;n<i;n++)if(this.goAnimations[n]._goFeature._id===e._id){var r=this.goAnimations[n];t.push(r)}return t}findGOAnimationsByUuid(e){if(0===this.goAnimations.length||"undefined"===e||null===e)return[];var t=this.getFeatureByID(e);return this.findGOAnimationByFeature(t)}execute(){if(0===this.goAnimations.length)return!1;for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].execute()&&(e=!0);return e}removeGOAnimationByName(e){if(0===this.goAnimations.length||null===e||""===e)return!1;var t=this.findGOAnimationByName(e);return this.removeGOAnimation(t)}removeGOAnimationByFeature(e){if(0===this.goAnimations.length||null===e||!WebGLPlot.defined(e))return!1;let t=[];for(var i=[],n=this.goAnimations.length,r=0;r<n;r++){var o=this.goAnimations[r];if(o._goFeature&&o._goFeature._id!==e._id)i.push(o);else if(o._goFeature&&o._goFeature._id===e._id){for(var a=this.getAnimationGroup(o).group,s=this.getAnimationGroup(o).index+1;s<a.length;s++)this.changeAnimationTime(a[s]);t.push(o.name),o.destroy()}}return this.goAnimations=i,_0x5ac1e1.getInstance().animationDeleted.raiseEvent(t),!0}removeGOAnimation(e,t){if(0===this.goAnimations.length||null===e)return!1;void 0===t&&(t=!0);let i=e.name;for(var n=0;n<this.goAnimations.length;n++)if(this.goAnimations[n]===e){e.reset();var r=this.getAnimationGroup(e).group,o=this.getAnimationGroup(e).index;if(e.destroy(),e=null,this.goAnimations.splice(n,1),r.splice(o,1),null!==r){for(var a=o+1;a<r.length;a++){var s=r[a];this.changeAnimationTime(s)}break}}return t&&_0x5ac1e1.getInstance().animationDeleted.raiseEvent([i]),!0}removeAllGOAnimation(){if(0===this.goAnimations.length)return;let e=[];for(var t=0;t<this.goAnimations.length;t++)e.push(this.goAnimations[t].name),this.removeGOAnimation(this.goAnimations[t],!1);_0x5ac1e1.getInstance().animationDeleted.raiseEvent(e),this.goAnimations=[]}getPlottingLayers(){for(var e=[],t=this._scene,i=_0x2909c1.getPlotLayers(t),n=0;n<i._layerQueue.length;++n){var r=i.findByIndex(n);r instanceof _0x394df6&&e.push(r)}return e}getFeatureByID(e){for(var t=this.getPlottingLayers(),i=0;i<t.length;i++){var n=t[i].getFeatureByUuid(e);if(n)return n}}getAllAnimations(){return this.goAnimations}releaseSelection(){for(var e=this.getPlottingLayers(),t=0;t<e.length;t++)null!=e[t]._plottingEdit&&e[t]._plottingEdit.releaseSelection()}getJSONData(){for(var e={animations:[]},t=0;t<this.goAnimations.length;t++)e.animations.push(this.goAnimations[t].getJSONData());return e}fromJSONData(e){let t=0;if(e.AnimationGroups)for(var i=0,n=0;n<e.AnimationGroups.length;n++){for(var r=e.AnimationGroups[n],o=0,a=0;a<r.Animations.length;a++){var s=r.Animations[a],l=s.startTime+s.duration;o=l>o?l:o}this.Analysis(r.Animations,i),i+=o,t+=r.Animations.length}else t=e.animations.length,this.Analysis(e.animations,0);_0x5ac1e1.getInstance().animationJsonEnd.raiseEvent({animationNumber:t})}Analysis(e,t){for(var i=0;i<e.length;i++){var n=e[i],r="";n.goLayerUuid?r=n.goLayerUuid:n.goFeatureUuid&&(r=n.goFeatureUuid);var o=this.getFeatureByID(r),a=n.name,s=n.type,l=n.playType;if(o&&a&&-1!==s){var u=this.createGOAnimation(s,a,o,l);null!==u&&(n.startTime+=t,u.fromJSONData(n))}}}saveEvoFile(e,t){var i=this;function n(e){var t,n;e?i._saveEvoFileCompleted.raiseEvent(n):i._saveEvoFileFailed.raiseEvent(t)}var r=WebGLPlot.smlFileService(i._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="POST",o.sitData=this.getJSONData(),o.smlFileName=e,o.isCover=t,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}}openEvoFileOnServer(e){var t=this;var i=WebGLPlot.smlFileService(this._serverUrl,this.options.serviceParams);if(i){var n=i.editSmlFileParams;n.method="GET",n.smlFileName=e,i.smlFileService.editSMLFile(n,(function(e){var i;e.result&&e.result.succeed?(i=e.result,t.fromJSONData(i),t._openEvoFileCompleted.raiseEvent()):t._openEvoFileFailed.raiseEvent()}),this)}}buildUrl(e){var t=this._serverUrl,i=t.substr(t.length-1,1);return t+="/"===i?"smlInfos/":"/smlInfos/",t+=e+".json"}isCanCreateAnimation(e,t){return!(t===_0x1c668c.SYMBOL_DOT&&e===_0x144579.ANIMATION_GROW||t===_0x1c668c.SYMBOL_ALGO&&e===_0x144579.ANIMATION_SCALE)}}var _0x4f70e2=(_0x138eab=!0,function(e,t){var i=_0x138eab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x138eab=!1,i}),_0x3c181a=_0x4f70e2(void 0,(function(){return _0x3c181a.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c181a).search("(((.+)+)+)+$")})),_0x138eab;function _0x278499(){}_0x3c181a(),_0x278499.extend=function(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},_0x278499.copy=function(e,t){var i;if(e=e||{},t)for(var n in e)typeof(i=t[n])<"u"&&(e[n]=i)},_0x278499.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"==typeof e[t]&&e[t]instanceof Array){for(var i in e[t])e[t][i].destroy&&e[t][i].destroy();e[t].length=0}else"object"==typeof e[t]&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},_0x278499.getElement=function(){for(var e=[],t=0,i=arguments.length;t<i;t++){var n=arguments[t];if("string"==typeof n&&(n=document.getElementById(n)),1===arguments.length)return n;e.push(n)}return e},_0x278499.isElement=function(e){return!(!e||1!==e.nodeType)},_0x278499.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},_0x278499.removeItem=function(e,t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1);return e},_0x278499.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},_0x278499.modifyDOMElement=function(e,t,i,n,r,o,a,s){t&&(e.id=t),i&&(e.style.left=i.x+"px",e.style.top=i.y+"px"),n&&(e.style.width=n.w+"px",e.style.height=n.h+"px"),r&&(e.style.position=r),o&&(e.style.border=o),a&&(e.style.overflow=a),parseFloat(s)>=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},_0x278499.applyDefaults=function(e,t){e=e||{};var i="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!i&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!i&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},_0x278499.getParameterString=function(e){var t=[];for(var i in e){var n=e[i];if(null!=n&&"function"!=typeof n){var r;if("object"==typeof n&&n.constructor===Array){for(var o,a=[],s=0,l=n.length;s<l;s++)o=n[s],a.push(encodeURIComponent(o??""));r=a.join(",")}else r=encodeURIComponent(n);t.push(encodeURIComponent(i)+"="+r)}}return t.join("&")},_0x278499.urlAppend=function(e,t){var i=e;if(t){var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i},_0x278499.DEFAULT_PRECISION=14,_0x278499.toFloat=function(e,t){return null==t&&(t=_0x278499.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},_0x278499.rad=function(e){return e*Math.PI/180},_0x278499.lastSeqID=0,_0x278499.createUniqueID=function(e){return null==e&&(e="id_"),_0x278499.lastSeqID+=1,e+_0x278499.lastSeqID},_0x278499.Browser=function(){var e,t="",i="",n="pc",r=navigator.userAgent.toLowerCase();return r.indexOf("msie")>-1||r.indexOf("trident")>-1&&r.indexOf("rv")>-1?(t="msie",e=r.match(/msie ([\d.]+)/)||r.match(/rv:([\d.]+)/)):r.indexOf("chrome")>-1?(t="chrome",e=r.match(/chrome\/([\d.]+)/)):r.indexOf("firefox")>-1?(t="firefox",e=r.match(/firefox\/([\d.]+)/)):r.indexOf("opera")>-1?(t="opera",e=r.match(/version\/([\d.]+)/)):r.indexOf("safari")>-1&&(t="safari",e=r.match(/version\/([\d.]+)/)),i=e?e[1]:"",r.indexOf("ipad")>-1||r.indexOf("ipod")>-1||r.indexOf("iphone")>-1?n="apple":r.indexOf("android")>-1&&(i=(e=r.match(/version\/([\d.]+)/))?e[1]:"",n="android"),{name:t,version:i,device:n}},_0x278499.getBrowser=function(){var e,t="",i="",n="pc",r=navigator.userAgent.toLowerCase();return r.indexOf("msie")>-1||r.indexOf("trident")>-1&&r.indexOf("rv")>-1?(t="msie",e=r.match(/msie ([\d.]+)/)||r.match(/rv:([\d.]+)/)):r.indexOf("chrome")>-1?(t="chrome",e=r.match(/chrome\/([\d.]+)/)):r.indexOf("firefox")>-1?(t="firefox",e=r.match(/firefox\/([\d.]+)/)):r.indexOf("opera")>-1?(t="opera",e=r.match(/version\/([\d.]+)/)):r.indexOf("safari")>-1&&(t="safari",e=r.match(/version\/([\d.]+)/)),i=e?e[1]:"",r.indexOf("ipad")>-1||r.indexOf("ipod")>-1||r.indexOf("iphone")>-1?n="apple":r.indexOf("android")>-1&&(i=(e=r.match(/version\/([\d.]+)/))?e[1]:"",n="android"),{name:t,version:i,device:n}},_0x278499.isSupportCanvas=function(){var e=!0,t=_0x278499.getBrowser();return document.createElement("canvas").getContext?("firefox"===t.name&&parseFloat(t.version)<5&&(e=!1),"safari"===t.name&&parseFloat(t.version)<4&&(e=!1),"opera"===t.name&&parseFloat(t.version)<10&&(e=!1),"msie"===t.name&&parseFloat(t.version)<9&&(e=!1)):e=!1,e},_0x278499.supportCanvas=function(){return _0x278499.isSupportCanvas},_0x278499.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l},_0x278499.calculateDpi=function(e,t,i,n,r){if(e&&t&&i){var o,a=1e4,s=e.getWidth(),l=e.getHeight(),u=t.w,c=t.h;if(r=r||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){let e=s/u,t=l/c;o=254/(e>t?e:t)/i/(2*Math.PI*r/360)/a}else{o=254/(s/u)/i/a}return o}},_0x278499.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var i=[],n=0,r=t.length;n<r;n++)i.push(_0x278499.toJSON(t[n]));return"["+i.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){let e=[];for(let i=0,n=t.length;i<n;i++)e.push(_0x278499.toJSON(t[i]));return"["+e.join(",")+"]"}let e=[];for(let i in t)"function"!=typeof t[i]&&"CLASS_NAME"!==i&&"parent"!==i&&e.push("'"+i+"':"+_0x278499.toJSON(t[i]));return e.length>0?"{"+e.join(",")+"}":"{}"}return t.toString()}},_0x278499.getScaleFromResolutionDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r:-1},_0x278499.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},_0x278499.copyAttributes=function(e,t){if(e=e||{},t)for(var i in t){var n=t[i];void 0!==n&&"CLASS_NAME"!==i&&"function"!=typeof n&&(e[i]=n)}return e},_0x278499.copyAttributesWithClip=function(e,t,i){if(e=e||{},t)for(var n in t){var r=!1;if(i&&i.length)for(var o=0,a=i.length;o<a;o++)if(n===i[o]){r=!0;break}if(!0!==r){var s=t[n];void 0!==s&&"CLASS_NAME"!==n&&"function"!=typeof s&&(e[n]=s)}}return e},_0x278499.cloneObject=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date){let t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.slice(0);if(e instanceof Object){let i={};for(var t in e)e.hasOwnProperty(t)&&(i[t]=_0x278499.cloneObject(e[t]));return i}throw new Error("Unable to copy obj! Its type isn't supported.")},_0x278499.getTextBounds=function(e,t,i){document.body.appendChild(i),i.style.width="auto",i.style.height="auto",e.fontSize&&(i.style.fontSize=e.fontSize),e.fontFamily&&(i.style.fontFamily=e.fontFamily),e.fontWeight&&(i.style.fontWeight=e.fontWeight),i.style.position="relative",i.style.visibility="hidden",i.style.display="inline-block",i.innerHTML=t;var n=i.clientWidth,r=i.clientHeight;return document.body.removeChild(i),{textWidth:n,textHeight:r}},_0x278499.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=Util.toJSON(e[t]));var i=encodeURIComponent(e[t]);this.queryValues.push(i)}},issue:function(e){for(var t=this,i=t.getUid(),n=e.url,r=[],o=new Promise((function(e){t.supermap_callbacks[i]=function(n){delete t.supermap_callbacks[i],e(n)}})),a=n,s=0,l=t.queryKeys?t.queryKeys.length:0,u=0;u<l;u++)if(a.length+t.queryKeys[u].length+2>=t.limitLength){if(0==s)return!1;r.push(a),a=n,s=0,u--}else if(a.length+t.queryKeys[u].length+2+t.queryValues[u].length>t.limitLength)for(var c=t.queryValues[u];c.length>0;){var h=t.limitLength-a.length-t.queryKeys[u].length-2;a.indexOf("?")>-1?a+="&":a+="?";var d=c.substring(0,h);"%"===d.substring(h-1,h)?(h-=1,d=c.substring(0,h)):"%"===d.substring(h-2,h-1)&&(h-=2,d=c.substring(0,h)),a+=t.queryKeys[u]+"="+d,c=c.substring(h),d.length>0&&(r.push(a),a=n,s=0)}else s++,a.indexOf("?")>-1?a+="&":a+="?",a+=t.queryKeys[u]+"="+t.queryValues[u];return r.push(a),t.send(r,"Util.RequestJSONPPromise.supermap_callbacks["+i+"]",e&&e.proxy),o},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,i){var n=e.length;if(n>0)for(var r=(new Date).getTime(),o=0;o<n;o++){var a=e[o];a.indexOf("?")>-1?a+="&":a+="?",a+="sectionCount="+n,a+="§ionIndex="+o,a+="&jsonpUserID="+r,i&&(a=decodeURIComponent(a),a=i+encodeURIComponent(a)),fetchJsonp(a,{jsonpCallbackFunction:t,timeout:3e4})}},GET:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings(e.params),t.issue(e)},POST:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)},PUT:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)},DELETE:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)}},_0x278499.urlPathAppend=function(e,t){let i=e;if(!t)return i;0===t.indexOf("/")&&(t=t.substring(1));const n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),i=""+n[0]+t+(n.length>1?"?"+n[1]:""),i};var _0x504b3e={observers:!1,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(e){return e.target||e.srcElement},isSingleTouch:function(e){return e.touches&&1===e.touches.length},isMultiTouch:function(e){return e.touches&&e.touches.length>1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var i=_0x504b3e.element(e);i.parentNode&&(!i.tagName||i.tagName.toUpperCase()!=t.toUpperCase());)i=i.parentNode;return i},observe:function(e,t,i,n){var r,o=(r=!0,function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}),a=o(this,(function(){return a.toString().search("(((.+)+)+)+$").toString().constructor(a).search("(((.+)+)+)+$")}));a();var s=_0x278499.getElement(e);if(n=n||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||s.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!s._eventCacheID){var l="eventCacheID_";s.id&&(l=s.id+"_"+l),s._eventCacheID=_0x278499.createUniqueID(l)}var u=s._eventCacheID;this.observers[u]||(this.observers[u]=[]),this.observers[u].push({element:s,name:t,observer:i,useCapture:n}),s.addEventListener?s.addEventListener(t,i,n):s.attachEvent&&s.attachEvent("on"+t,i)},stopObservingElement:function(e){var t=_0x278499.getElement(e)._eventCacheID;this._removeElementObservers(_0x504b3e.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var i=e[t],n=new Array(i.element,i.name,i.observer,i.useCapture);_0x504b3e.stopObserving.apply(this,n)}},stopObserving:function(e,t,i,n){n=n||!1;var r=_0x278499.getElement(e),o=r._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||r.detachEvent)&&(t="keydown");var a=!1,s=_0x504b3e.observers[o];if(s)for(var l=0;!a&&l<s.length;){var u=s[l];if(u.name===t&&u.observer===i&&u.useCapture===n){s.splice(l,1),0==s.length&&delete _0x504b3e.observers[o],a=!0;break}l++}return a&&(r.removeEventListener?r.removeEventListener(t,i,n):r&&r.detachEvent&&r.detachEvent("on"+t,i)),a},unloadCache:function(){if(_0x504b3e&&_0x504b3e.observers){for(var e in _0x504b3e.observers){var t=_0x504b3e.observers[e];_0x504b3e._removeElementObservers.apply(this,[t])}_0x504b3e.observers=!1}},CLASS_NAME:"SuperMap.PlotEvent"};_0x504b3e.observe(window,"unload",_0x504b3e.unloadCache,!1);var _0x5b40bf=(_0x36652f=!0,function(e,t){var i=_0x36652f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x36652f=!1,i}),_0x364f8c=_0x5b40bf(void 0,(function(){return _0x364f8c.toString().search("(((.+)+)+)+$").toString().constructor(_0x364f8c).search("(((.+)+)+)+$")})),_0x36652f;_0x364f8c();class _0x421885{constructor(e,t,i,n,r){if(this.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"],this.listeners={},this.object=e,this.element=null,this.eventTypes=[],this.eventHandler=null,this.fallThrough=n,this.includeXY=!1,this.extensions={},this.extensionCount={},this.clearMouseListener=null,this.extend(this,r),null!=i)for(var o=0,a=i.length;o<a;o++)this.addEventType(i[o]);null!=t&&this.attachToElement(t),this.CLASS_NAME="SuperMap.Events"}destroy(){for(var e in this.extensions)"boolean"!=typeof this.extensions[e]&&this.extensions[e].destroy();this.extensions=null,this.element&&(_0x504b3e.stopObservingElement(this.element),this.element.hasScrollEvent&&_0x504b3e.stopObserving(window,"scroll",this.clearMouseListener)),this.element=null,this.listeners=null,this.object=null,this.eventTypes=null,this.fallThrough=null,this.eventHandler=null}addEventType(e){this.listeners[e]||(this.eventTypes.push(e),this.listeners[e]=[])}attachToElement(e){this.element?_0x504b3e.stopObservingElement(this.element):(this.eventHandler=FunctionExt.bindAsEventListener(this.handleBrowserEvent,this),this.clearMouseListener=FunctionExt.bind(this.clearMouseCache,this)),this.element=e;for(var t=0,i=this.BROWSER_EVENTS.length;t<i;t++){var n=this.BROWSER_EVENTS[t];this.addEventType(n),_0x504b3e.observe(e,n,this.eventHandler)}_0x504b3e.observe(e,"dragstart",_0x504b3e.stop)}on(e){for(var t in e)"scope"!==t&&void 0!==e[t]&&this.register(t,e.scope,e[t])}register(e,t,i,n){if(e in _0x421885&&!this.extensions[e]&&(this.extensions[e]=new _0x421885[e](this)),null!=i&&-1!==_0x278499.indexOf(this.eventTypes,e)){null==t&&(t=this.object);var r=this.listeners[e];r||(r=[],this.listeners[e]=r,this.extensionCount[e]=0);var o={obj:t,func:i};n?(r.splice(this.extensionCount[e],0,o),"object"===Events_typeof(n)&&n.extension&&this.extensionCount[e]++):r.push(o)}}registerPriority(e,t,i){this.register(e,t,i,!0)}un(e){for(var t in e)"scope"!==t&&void 0!==e.type&&this.unregister(t,e.scope,e[t])}unregister(e,t,i){null==t&&(t=this.object);var n=this.listeners[e];if(null!=n)for(var r=0,o=n.length;r<o;r++)if(n[r].obj===t&&n[r].func===i){n.splice(r,1);break}}remove(e){null!=this.listeners[e]&&(this.listeners[e]=[])}triggerEvent(e,t){var i=this.listeners[e];if(i&&0!=i.length){null==t&&(t={}),t.object=this.object,t.element=this.element,t.type||(t.type=e);for(var n,r=0,o=(i=i.slice()).length;r<o;r++){var a=i[r];if(null!=(n=a.func.apply(a.obj,[t]))&&!1===n)break}return this.fallThrough||_0x504b3e.stop(t,!0),n}}handleBrowserEvent(e){var t=e.type,i=this.listeners[t];if(i&&0!=i.length){var n=e.touches;if(n&&n[0]){for(var r,o=0,a=0,s=n.length,l=0;l<s;++l)o+=(r=n[l]).clientX,a+=r.clientY;e.clientX=o/s,e.clientY=a/s}this.includeXY&&(e.xy=this.getMousePosition(e)),this.triggerEvent(t,e)}}clearMouseCache(){this.element.scrolls=null,this.element.lefttop=null;var e=document.body;e&&(0==e.scrollTop&&0==e.scrollLeft||!navigator.userAgent.match(/iPhone/i))&&(this.element.offsets=null)}getMousePosition(e){if(this.includeXY?this.element.hasScrollEvent||(_0x504b3e.observe(window,"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0):this.clearMouseCache(),!this.element.scrolls){var t=_0x278499.getViewportElement();this.element.scrolls=[t.scrollLeft,t.scrollTop]}return this.element.lefttop||(this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0]),this.element.offsets||(this.element.offsets=_0x278499.pagePosition(this.element)),new Pixel(e.clientX+this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],e.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1])}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x4c41b1=(_0x247c37=!0,function(e,t){var i=_0x247c37?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x247c37=!1,i}),_0x1cf4d8=_0x4c41b1(void 0,(function(){return _0x1cf4d8.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cf4d8).search("(((.+)+)+)+$")})),_0x247c37;_0x1cf4d8();class _0x4893d6{constructor(e,t){this.value=e||"",this.name=t||"token",this.CLASS_NAME="SuperMap.PlotCredential"}getUrlParameters(){return this.name+"="+this.value}getValue(){return this.value}destroy(){this.value=null,this.name=null}}var _0x450519=(_0x2588da=!0,function(e,t){var i=_0x2588da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2588da=!1,i}),_0x52d7dc=_0x450519(void 0,(function(){return _0x52d7dc.toString().search("(((.+)+)+)+$").toString().constructor(_0x52d7dc).search("(((.+)+)+)+$")})),_0x2588da;_0x52d7dc();var _0x6c7318={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function _0x1593de(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function _0x58f770(e){try{delete window[e]}catch{window[e]=void 0}}function _0x171408(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}var _0x20b2e4=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=e,n=t.timeout||_0x6c7318.timeout,r=t.jsonpCallback||_0x6c7318.jsonpCallback,o=void 0;return new Promise((function(a,s){var l=t.jsonpCallbackFunction||_0x1593de(),u=r+"_"+l;window[l]=function(e){a({ok:!0,json:function(){return Promise.resolve(e)}}),o&&clearTimeout(o),_0x171408(u),_0x58f770(l)},i+=-1===i.indexOf("?")?"?":"&";var c=document.createElement("script");c.setAttribute("src",""+i+r+"="+l),t.charset&&c.setAttribute("charset",t.charset),c.id=u,document.getElementsByTagName("head")[0].appendChild(c),o=setTimeout((function(){s(new Error("JSONP request to "+e+" timed out")),_0x58f770(l),_0x171408(u),window[l]=function(){_0x58f770(l)}}),n),c.onerror=function(){s(new Error("JSONP request to "+e+" failed")),_0x58f770(l),_0x171408(u),o&&clearTimeout(o)}}))},_0x212ccb=(_0x185049=!0,function(e,t){var i=_0x185049?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x185049=!1,i}),_0x4aa119=_0x212ccb(void 0,(function(){return _0x4aa119.toString().search("(((.+)+)+)+$").toString().constructor(_0x4aa119).search("(((.+)+)+)+$")})),_0x185049;_0x4aa119();const _0x4515ea=window.fetch;window.setCORS=function(e){window.CORS=e};var isCORS=window.isCORS=function(){return null!=window.CORS?window.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest};window.setRequestTimeout=function(e){return window.RequestTimeout=e};var getRequestTimeout=window.getRequestTimeout=function(){return window.RequestTimeout||45e3},_0x11db66={commit:function(e,t,i,n){switch(e=e&&e.toUpperCase()){case"GET":default:return this.get(t,i,n);case"POST":return this.post(t,i,n);case"PUT":return this.put(t,i,n);case"DELETE":return this.delete(t,i,n)}},supportDirectRequest:function(e,t){return!!_0x278499.isInTheSameDomain(e)||(null!=t.crossOrigin?t.crossOrigin:isCORS()||t.proxy)},get:function(e,t,i){i=i||{};if(e=_0x278499.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){var n={url:e=e.replace(".json",".jsonp"),data:t};return _0x278499.RequestJSONPPromise.GET(n)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")-1),t,i):this._fetch(e,t,i,"GET")},delete:function(e,t,i){i=i||{};var n="DELETE";if(e=_0x278499.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=DELETE",data:t};return _0x278499.RequestJSONPPromise.DELETE(r)}return this.urlIsLong(e)?this._postSimulatie(n,e.substring(0,e.indexOf("?")-1),t,i):this._fetch(e,t,i,n)},post:function(e,t,i){if(i=i||{},!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=POST",data:t};return _0x278499.RequestJSONPPromise.POST(n)}return this._fetch(this._processUrl(e,i),t,i,"POST")},put:function(e,t,i){if(i=i||{},e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=PUT",data:t};return _0x278499.RequestJSONPPromise.PUT(n)}return this._fetch(e,t,i,"PUT")},urlIsLong:function(e){for(var t=0,i=null,n=0,r=e.length;n<r;n++)(i=e.charCodeAt(n))<127?t++:128<=i&&i<=2047?t+=2:2048<=i&&i<=65535&&(t+=3);return!(t<2e3)},_postSimulatie:function(e,t,i,n){var r=t.indexOf("?")>-1?"&":"?";return t+=r+"_method="+e,"string"!=typeof i&&(i=JSON.stringify(i)),this.post(t,i,n)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var i=e.split("?");2===i.length&&(e=i[0]+".json?"+i[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,i,n){return(i=i||{}).headers=i.headers||{},!i.headers["Content-Type"]&&!FormData.prototype.isPrototypeOf(t)&&(i.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),i.timeout?this._timeout(i.timeout,_0x4515ea(e,{method:n,headers:i.headers,body:"PUT"===n||"POST"===n?t:void 0,credentials:this._getWithCredentials(i),mode:"cors",timeout:getRequestTimeout()}).then((function(e){return e}))):_0x4515ea(e,{method:n,body:"PUT"===n||"POST"===n?t:void 0,headers:i.headers,credentials:this._getWithCredentials(i),mode:"cors",timeout:getRequestTimeout()}).then((function(e){return e}))},_getWithCredentials:function(e){return!0===e.withCredentials?"include":!1===e.withCredentials?"omit":"same-origin"},_fetchJsonp:function(e,t){return t=t||{},_0x20b2e4()(e,{method:"GET",timeout:t.timeout}).then((function(e){return e}))},_timeout:function(e,t){return new Promise((function(i,n){setTimeout((function(){n(new Error("timeout"))}),e),t.then(i,n)}))},_getParameterString:function(e){var t=[];for(var i in e){var n,r=e[i];if(null!=r&&"function"!=typeof r)n=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(i)+"="+n)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}},_0x1342bf=(_0x499fc1=!0,function(e,t){var i=_0x499fc1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x499fc1=!1,i}),_0x19c4f8=_0x1342bf(void 0,(function(){return _0x19c4f8.toString().search("(((.+)+)+)+$").toString().constructor(_0x19c4f8).search("(((.+)+)+)+$")})),_0x499fc1;function _0xe25a5e(){}_0x19c4f8(),_0xe25a5e.bind=function(e,t){var i=Array.prototype.slice.apply(arguments,[2]);return function(){var n=i.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,n)}},_0xe25a5e.bindAsEventListener=function(e,t){return function(i){return e.call(t,i||window.event)}},_0xe25a5e.False=function(){return!1},_0xe25a5e.True=function(){return!0},_0xe25a5e.Void=function(){};var _0x3776cc=(_0x993474=!0,function(e,t){var i=_0x993474?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x993474=!1,i}),_0x49de7e=_0x3776cc(void 0,(function(){return _0x49de7e.toString().search("(((.+)+)+)+$").toString().constructor(_0x49de7e).search("(((.+)+)+)+$")})),_0x993474;_0x49de7e();class _0x16512b{constructor(e){this.data=null,this.keepData=!1,_0x278499.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format"}destroy(){}read(e){}write(e){}}var _0x1319ea=(_0x4d9536=!0,function(e,t){var i=_0x4d9536?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d9536=!1,i}),_0x4bfef9=_0x1319ea(void 0,(function(){return _0x4bfef9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4bfef9).search("(((.+)+)+)+$")})),_0x4d9536;_0x4bfef9();class _0x4590c8 extends _0x16512b{constructor(e){super(e),this.indent=" ",this.space=" ",this.newline="\n",this.level=0,this.pretty=!1,this.nativeJSON=!(!window.JSON||"function"!=typeof JSON.parse||"function"!=typeof JSON.stringify),this.CLASS_NAME="SuperMap.Format.JSON",this.serialize={object:function(e){if(null==e)return"null";if(e.constructor===Date)return this.serialize.date.apply(this,[e]);if(e.constructor===Array)return this.serialize.array.apply(this,[e]);var t=["{"];this.level+=1;var i,n,r,o=!1;for(i in e)e.hasOwnProperty(i)&&(n=this.write.apply(this,[i,this.pretty]),r=this.write.apply(this,[e[i],this.pretty]),null!=n&&null!=r&&(o&&t.push(","),t.push(this.writeNewline(),this.writeIndent(),n,":",this.writeSpace(),r),o=!0));return this.level-=1,t.push(this.writeNewline(),this.writeIndent(),"}"),t.join("")},array:function(e){var t,i=["["];this.level+=1;for(var n=0,r=e.length;n<r;++n)null!=(t=this.write.apply(this,[e[n],this.pretty]))&&(n>0&&i.push(","),i.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,i.push(this.writeNewline(),this.writeIndent(),"]"),i.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,(function(e,i){var n=t[i];return n||(n=i.charCodeAt(),"\\u00"+Math.floor(n/16).toString(16)+(n%16).toString(16))}))+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}}}read(e,t){var i;if(this.nativeJSON)try{i=JSON.parse(e,t)}catch{}return this.keepData&&(this.data=i),i}write(e,t){this.pretty=!!t;var i=null,n=typeof e;if(this.serialize[n])try{i=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[n].apply(this,[e])}catch{}return i}writeIndent(){var e=[];if(this.pretty)for(var t=0;t<this.level;++t)e.push(this.indent);return e.join("")}writeNewline(){return this.pretty?this.newline:""}writeSpace(){return this.pretty?this.space:""}}var _0x5055ad=(_0x8ba2aa=!0,function(e,t){var i=_0x8ba2aa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8ba2aa=!1,i}),_0x48b070=_0x5055ad(void 0,(function(){return _0x48b070.toString().search("(((.+)+)+)+$").toString().constructor(_0x48b070).search("(((.+)+)+)+$")})),_0x8ba2aa;_0x48b070();class _0x5958f9{constructor(e,t){var i=this;this.EVENT_TYPES=["processCompleted","processFailed"],this.events=null,this.eventListeners=null,this.url=null,this.urls=null,this.proxy=null,this.index=null,this.length=null,this.options=null,this.totalTimes=null,this.POLLING_TIMES=3,this._processSuccess=null,this._processFailed=null,this.isInTheSameDomain=null,this.withCredentials=!1,Array.isArray(e)?(i.urls=e,i.length=e.length,i.totalTimes=i.length,1===i.length?i.url=e[0]:(i.index=parseInt(Math.random()*i.length),i.url=e[i.index])):(i.totalTimes=1,i.url=e),Array.isArray(e)&&!i.isServiceSupportPolling()&&(i.url=e[0],i.totalTimes=1),t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,this.extend(this,t),i.isInTheSameDomain=this.isInTheSameDomainFnc(i.url),i.events=new _0x421885(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){var e=this;_0x278499.isArray(e.urls)&&(e.urls=null,e.index=null,e.length=null,e.totalTimes=null),e.url=null,e.options=null,e._processSuccess=null,e._processFailed=null,e.isInTheSameDomain=null,e.EVENT_TYPES=null,e.events&&(e.events.destroy(),e.events=null),e.eventListeners&&(e.eventListeners=null)}request(e){var t=this;e.url=e.url||t.url,e.proxy=e.proxy||t.proxy,e.withCredentials=null!=e.withCredentials?e.withCredentials:t.withCredentials,e.crossOrigin=null!=e.crossOrigin?e.crossOrigin:t.crossOrigin,e.headers=e.headers||t.headers,e.isInTheSameDomain=t.isInTheSameDomain,e.url=this.appendCredential(e.url),t.calculatePollingTimes(),t._processSuccess=e.success,t._processFailed=e.failure,e.scope=t,e.success=t.getUrlCompleted,e.failure=t.getUrlFailed,t.options=e,t._commit(t.options)}getUrlCompleted(e){this._processSuccess(e)}getUrlFailed(e){var t=this;t.totalTimes>0?(t.totalTimes--,t.ajaxPolling()):t._processFailed(e)}ajaxPolling(){var e=this,t=e.options.url,i=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(i,i.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=this.isInTheSameDomainFnc(t),e._commit(e.options)}calculatePollingTimes(){var e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.times<e.totalTimes&&(e.totalTimes=e.times):e.totalTimes>e.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}isServiceSupportPolling(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}serviceProcessCompleted(e){e=_0x278499.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){var t=(e=_0x278499.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){if("POST"===e.method||"PUT"===e.method||"PATCH"===e.method)if(e.params&&(e.url=_0x278499.urlAppend(e.url,_0x278499.getParameterString(e.params||{}))),"object"==typeof e.data)try{e.params=_0x278499.toJSON(e.data)}catch{console.log("不是json对象")}else e.params=e.data;_0x11db66.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then((function(e){return e.text?e.text():e.json?e.json():e})).then((function(e){var t=e;return"string"==typeof e&&(t=(new _0x4590c8).read(e)),(!t||t.error||t.code>=300&&304!==t.code)&&(t=t&&t.error?{error:t.error}:{error:t}),t})).catch((function(e){return{error:e}})).then((function(t){t.error?(e.scope?_0xe25a5e.bind(e.failure,e.scope):e.failure)(t):(t.succeed=null==t.succeed||t.succeed,(e.scope?_0xe25a5e.bind(e.success,e.scope):e.success)(t))}))}isInTheSameDomainFnc(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}appendCredential(e){var t=e,i=this.getToken(e),n=i?new _0x4893d6(i,"token"):null;return n||(n=(i=this.getKey(e))?new _0x4893d6(i,"key"):null),n&&(t=this.urlAppend(t,n.getUrlParameters())),t}getToken(e){if(e){this.tokens=this.tokens||{};var t=this._getTokenStorageKey(e);return this.tokens[t]}}_getTokenStorageKey(e){var t=e.match(/(.*?):\/\/([^\/]+)/i);return t?t[0]:e}getKey(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;return this.keys[t]}_getUrlRestString(e){if(!e)return e;var t=e.match(/(http|https):\/\/(.*\/rest)/i);return t?t[0]:e}urlAppend(e,t){var i=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i}}var _0x34d202=(_0xf7bcc4=!0,function(e,t){var i=_0xf7bcc4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf7bcc4=!1,i}),_0x28d291=_0x34d202(void 0,(function(){return _0x28d291.toString().search("(((.+)+)+)+$").toString().constructor(_0x28d291).search("(((.+)+)+)+$")})),_0xf7bcc4;_0x28d291();class _0x476176 extends _0x5958f9{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.PlotCommonServiceBase"}destroy(){super.destroy()}_commit(e){("POST"===e.method||"PUT"===e.method)&&(e.params&&(e.url=SuperMap.Util.urlAppend(e.url,SuperMap.Util.getParameterString(e.params||{}))),e.params=e.data),_0x11db66.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then((function(e){return e.text()})).then((function(t){var i=(new _0x4590c8).read(t);(i||(i={error:t}),i.error)?(e.scope?_0xe25a5e.bind(e.failure,e.scope):e.failure)(i.error):(i.succeed=null==i.succeed||i.succeed,(e.scope?_0xe25a5e.bind(e.success,e.scope):e.success)(i))}))}}var _0xab01d4=(_0x4f9696=!0,function(e,t){var i=_0x4f9696?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f9696=!1,i}),_0x7a61fe=_0xab01d4(void 0,(function(){return _0x7a61fe.toString().search("(((.+)+)+)+$").toString().constructor(_0x7a61fe).search("(((.+)+)+)+$")})),_0x4f9696;_0x7a61fe();class _0x53b796 extends _0x476176{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"symbolLibs.json?":"/symbolLibs.json?",this.CLASS_NAME="SuperMap.GetLibIDsService"}destroy(){super.destroy()}processAsync(){var e=this;e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x4767c5=(_0x28d63f=!0,function(e,t){var i=_0x28d63f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28d63f=!1,i}),_0x51cda9=_0x4767c5(void 0,(function(){return _0x51cda9.toString().search("(((.+)+)+)+$").toString().constructor(_0x51cda9).search("(((.+)+)+)+$")})),_0x28d63f;_0x51cda9();class GetLibInfoService extends _0x476176{constructor(e,t){super(e,t),(t=t||{})&&_0x278499.extend(this,t);var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"symbolLibs/":"/symbolLibs/",this.CLASS_NAME="SuperMap.GetLibInfoService"}destroy(){super.destroy()}processAsync(e){var t=this;e&&null!==e.libID&&(t.libID=e.libID),t.url+=t.libID,t.url+=".json",t.request({method:"GET",data:null,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}var _0x3c67e9=(_0x173e29=!0,function(e,t){var i=_0x173e29?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x173e29=!1,i}),_0x5d2594=_0x3c67e9(void 0,(function(){return _0x5d2594.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d2594).search("(((.+)+)+)+$")})),_0x173e29;function _0x5228e4(e,t){this.options=t,this.url=e}_0x5d2594(),_0x5228e4.prototype.getLibIDs=function(e,t){var i=this;return t||(t=i),new _0x53b796(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync(),i},_0x5228e4.prototype.getLibInfo=function(e,t,i){var n=this;return i||(i=n),new GetLibInfoService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n};const _0x4184ee=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3b8e42=_0x4184ee(void 0,(function(){return _0x3b8e42.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b8e42).search("(((.+)+)+)+$")}));function _0x51e0df(e){e=e||{},this.libID=e.libID,this.code=e.code,this.inputPoints=e.inputPoints?e.inputPoints:null,this.symbolRank=e.symbolRank?e.symbolRank:0,this.negativeImage=!!e.negativeImage&&e.negativeImage,this.surroundLineType=e.surroundLineType?e.surroundLineType:0,this.subSymbols=e.subSymbols?e.subSymbols:null,this.scaleValues=e.scaleValues?e.scaleValues:null,this.scalePoints=e.scalePoints?e.scalePoints:null,this.newScalePoint=e.newScalePoint?e.newScalePoint:null,this.newScalePointIndex=e.newScalePointIndex?e.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}_0x3b8e42(),_0x51e0df.prototype.destroy=function(){var e=this;e.libID=null,e.code=null,e.inputPoints=null,e.symbolRank=null,e.negativeImage=null,e.surroundLineType=null,e.subSymbols=null,e.scaleValues=null,e.scalePoints=null,e.newScalePoint=null,e.newScalePointIndex=null},_0x51e0df.toUrlParameters=function(e){if(e&&null!==e.libID&&null!==e.code){var t="libID="+encodeURIComponent(e.libID)+"&code="+encodeURIComponent(e.code);if(e.inputPoints&&null!==e.inputPoints&&0!==e.inputPoints.length){let i="[";for(let t=0;t<e.inputPoints.length;t++)t===e.inputPoints.length-1?i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"}]":i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"},";t+="&inputPoints="+encodeURIComponent(i)}if(e.scalePoints&&null!==e.scalePoints&&0!==e.scalePoints.length){let i="[";for(let t=0;t<e.scalePoints.length;t++)t===e.scalePoints.length-1?i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"}]":i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"},";t+="&scalePoints="+encodeURIComponent(i)}if(e.scaleValues&&null!==e.scaleValues&&0!==e.scaleValues.length){let i="[";for(let t=0;t<e.scaleValues.length;t++)t===e.scaleValues.length-1?i+=e.scaleValues[t]+"]":i+=e.scaleValues[t]+",";t+="&scaleValues="+encodeURIComponent(i)}if(e.subSymbols&&null!==e.subSymbols&&0!==e.subSymbols.length){let i="[";for(let t=0;t<e.subSymbols.length;t++)t===e.subSymbols.length-1?i+=e.subSymbols[t].code+"]":i+=e.subSymbols[t].code+",";t+="&subSymbols="+encodeURIComponent(i)}return e.newScalePoint&&null!==e.newScalePoint&&(t+="&newScalePoint="+encodeURIComponent('{"x":'+e.newScalePoint.x+', "y":'+e.newScalePoint.y+"}")),e.newScalePointIndex&&null!==e.newScalePointIndex&&(t+="&newScalePointIndex="+encodeURIComponent(e.newScalePointIndex)),e.symbolRank&&null!==e.symbolRank&&(t+="&symbolRank="+encodeURIComponent(e.symbolRank)),e.negativeImage&&null!==e.negativeImage&&(t+="&negativeImage="+encodeURIComponent(e.negativeImage)),e.surroundLineType&&null!==e.surroundLineType&&(t+="&surroundLineType="+encodeURIComponent(e.surroundLineType)),t}};var _0x4d13d1=(_0x353516=!0,function(e,t){var i=_0x353516?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x353516=!1,i}),_0x30d2af=_0x4d13d1(void 0,(function(){return _0x30d2af.toString().search("(((.+)+)+)+$").toString().constructor(_0x30d2af).search("(((.+)+)+)+$")})),_0x353516;function _0x467baf(e){this.cachecompleted=new WebGLPlot.Event,this.cachedSymbolList={},this.needCacheList=[],this.symbolNames=null,this.symbolLibData=null,this.plottingID=e.plottingID,this.cachedSymbolOK=!1,e&&_0x278499.extend(this,e),e&&e.url&&e.libID?(this.url=e.url,this.libID=e.libID):e&&e.symbolLibData&&(this.symbolLibData=e.symbolLibData,this.libID=this.symbolLibData.libID,this.initNeedCacheList())}_0x30d2af(),_0x467baf.prototype.initNeedCacheList=function(){if(!this.symbolLibData||!this.symbolLibData.rootSymbolLibNode)return!1;this.initNeedCacheListForNode(this.symbolLibData.rootSymbolLibNode)},_0x467baf.prototype.initNeedCacheListForNode=function(e,t){for(var i=0;i<e.childNodeCount;i++)"SYMBOL_GROUP"===e.childNodes[i].symbolNodeType?this.initNeedCacheListForNode(e.childNodes[i]):"SYMBOL_NODE"===e.childNodes[i].symbolNodeType&&this.needCacheList.push(e.childNodes[i].symbolCode)},_0x467baf.prototype.destroy=function(){this.url=null,this.libID=null,this.symbolLibData=null},_0x467baf.prototype.cachedSymbols=function(){var e=this;if(0!==this.needCacheList.length){for(var t=this.needCacheList.slice(),i=0,n=t.length;i<n;i++){var r=new _0x51e0df;r.libID=this.libID,r.code=t[i];var o=WebGLPlot.getServerData(this.libID,t[i],void 0,this.plottingID);if(!o)return;o.getSymbolInfo.events.on({processCompleted:a,processFailed:a,scope:e}),o.getSymbolInfo.processAsync(o.getSymbolInfoParameters)}this.cachedSymbolOK=!0}else this.cachecompleted.raiseEvent({success:!0});function a(t){t.result.succeed&&(e.cacheSymbolData(t.result),0===e.needCacheList.length&&e.cachecompleted.raiseEvent({success:!0}))}},_0x467baf.prototype.cacheSymbolData=function(e){var t=_0x278499.indexOf(this.needCacheList,e.code);-1!==t&&(this.cachedSymbolList[e.code]=SuperMapAlgoPlot.PlottingUtil.cloneObject(e),this.needCacheList.splice(t,1))},_0x467baf.prototype.getClassFication=function(){return null===this.symbolLibData?null:this.symbolLibData.classFication},_0x467baf.prototype.getCreateTime=function(){return null===this.symbolLibData?null:this.symbolLibData.createTime},_0x467baf.prototype.getCreator=function(){return null===this.symbolLibData?null:this.symbolLibData.creator},_0x467baf.prototype.getModifyTime=function(){return null===this.symbolLibData?null:this.symbolLibData.modifyTime},_0x467baf.prototype.getRootSymbolIconUrl=function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolIconUrl},_0x467baf.prototype.getRootSymbolInfo=function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolLibNode},_0x467baf.prototype.getSymbolCount=function(){return null===this.symbolLibData?null:this.symbolLibData.symbolCount},_0x467baf.prototype.getSymbolData=function(e){var t=null;return this.cachedSymbolList.hasOwnProperty(e)&&(t=SuperMapAlgoPlot.PlottingUtil.cloneObject(this.cachedSymbolList[e])),t},_0x467baf.prototype.setSymbolData=function(e){this.cacheSymbolData(e)},_0x467baf.prototype.getSymbolLibID=function(){return this.libID},_0x467baf.prototype.getSymbolLibName=function(){return null===this.symbolLibData?null:this.symbolLibData.symbolLibName},_0x467baf.prototype.getSymbolName=function(e){return null===this.symbolLibData?"":(null===this.symbolNames&&(this.symbolNames={},this.getSymbolNameFromList(this.symbolLibData.rootSymbolLibNode)),this.symbolNames[e])},_0x467baf.prototype.getVersion=function(){return null===this.symbolLibData?null:this.symbolLibData.version},_0x467baf.prototype.querySymbolbyKey=function(e){return this.querySymbol(e,this.getRootSymbolInfo(),this.getRootSymbolIconUrl())},_0x467baf.prototype.querySymbol=function(e,t,i){var n=[];if("SYMBOL_GROUP"===t.symbolNodeType)for(var r=0;r<t.childNodes.length;r++)for(var o=i+"/"+t.symbolName,a=this.querySymbol(e,t.childNodes[r],o),s=0;s<a.length;s++)n.push(a[s]);else(e===t.symbolCode.toString()||-1!==t.symbolName.indexOf(e))&&(t.icon=i+"/"+t.symbolCode+".png",n.push(t));return n};var _0x86f795=(_0x42231b=!0,function(e,t){var i=_0x42231b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42231b=!1,i}),_0x59d3f8=_0x86f795(void 0,(function(){return _0x59d3f8.toString().search("(((.+)+)+)+$").toString().constructor(_0x59d3f8).search("(((.+)+)+)+$")})),_0x42231b;_0x59d3f8();class _0x90ce{constructor(e){e=e||{},this.libID=e.libID,this.CLASS_NAME="SuperMap.GetLibInfoParameter"}destroy(){this.libID=null}}var _0x3c5eba=(_0x5d85da=!0,function(e,t){var i=_0x5d85da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d85da=!1,i}),_0x2a955d=_0x3c5eba(void 0,(function(){return _0x2a955d.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a955d).search("(((.+)+)+)+$")})),_0x5d85da;_0x2a955d();var _0x45d601=new Map;function _0x18c058(e,t){if(this.useServerData=!0,(!WebGLPlot.defined(e)||0===e.length)&&this.useServerData)throw new WebGLPlot.DeveloperError("url is required to initialize SymbolLibManager");this.url=e,this.libIDs=null,this.symbolLibs=[],this.symbolLibJsons=[],this.isInializeOK=!1,this.initializecompleted=new WebGLPlot.Event,this.cachecompleted=new WebGLPlot.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},t&&t.serviceParams&&_0x278499.extend(this.options,t),(!this.useServerData||!e||0===e.length)&&this.loadLocalLib()}_0x18c058.getInstance=function(e,t,i){let n=_0x45d601.get(i);return!WebGLPlot.defined(n)&&WebGLPlot.defined(i)&&(n=new _0x18c058(e,t),n.plottingID=i,_0x45d601.set(i,n)),n},_0x18c058.prototype.loadLocalLib=function(e){var t="js/plotPanelControl/LocalLib.json";WebGLPlot.defined(e)&&""!==e&&(t=e);var i=this;if(void 0===$.getJSON())throw new WebGLPlot.DeveloperError("jQuery is needed");$.getJSON(t,(function(e){(!WebGLPlot.defined(i.localSymbolLibData)||null===i.localSymbolLibData)&&(i.localSymbolLibData={}),i.localSymbolLibData[e.libID]=e}))},_0x18c058.prototype.initialize=function(e,t){this.url=e,null===this.libIDs&&(this.libIDs=[]),null===this.symbolLibs&&(this.symbolLibs=[]),null===this.symbolLibJsons&&(this.symbolLibJsons=[]),t&&_0x278499.extend(this,t)},_0x18c058.prototype.destroy=function(){this.url=null,this.libIDs=[],this.symbolLibs=[],this.symbolLibJsons=[],this.isInializeOK=!1,this.isInitialize=!1,this.localSymbolLibData={}},_0x18c058.prototype.initializeAsync=function(e){this.isInitializeOK()?this.initializecompleted.raiseEvent({success:!0,libIDs:this.libIDs}):this.isInitialize||(this.isInitialize=!0,new _0x5228e4(this.url,this.options.serviceParams).getLibIDs((function(t){if(!t.result||!t.result.succeed)throw _0x18c058.prototype.libIDs=[],new WebGLPlot.DeveloperError("Plotting Server is required to initialize SymbolLibManager");if(null!==this.libIDs&&0!==this.libIDs.length)for(var i=0;i<this.libIDs.length;i++){for(var n=!1,r=0;r<t.result.length;r++)if(this.libIDs[i]===t.result[r]){n=!0;break}!1===n&&this.libIDs.slice(i,1)}else this.libIDs=t.result;WebGLPlot.defined(e)||(e=!1),this.initializeSymbolLib(e)}),this))},_0x18c058.prototype.initializeSymbolLib=function(e){let t=this;for(var i=this.libIDs.slice(),n=0,r=this.libIDs.length;n<r;n++){let r=this.libIDs[n];var o=new _0x90ce;o.libID=r,new _0x5228e4(this.url,this.options.serviceParams).getLibInfo(o,(function(n){if(n.result.succeed){var o=_0x278499.indexOf(i,n.result.libID);if(-1!==o){i.splice(o,1);var a=t.getSymbolLibByLibId(r);WebGLPlot.defined(a)||(t.symbolLibJsons.push(n.result),(a=new _0x467baf({symbolLibData:n.result,plottingID:t.plottingID})).url=t.url,t.symbolLibs.push(a)),e&&a.cachedSymbols()}0===i.length&&(t.isInializeOK=!0,t.initializecompleted.raiseEvent({success:!0,libIDs:t.libIDs}))}}),this)}},_0x18c058.prototype.findSymbolByCode=function(e){for(var t=[],i=0;i<this.libIDs.length;i++)for(var n=this.getSymbolLibByLibId(this.libIDs[i]).querySymbolbyKey(e.toString()),r=0;r<n.length;r++)t.push(n[r]);return t},_0x18c058.prototype.findSymbolByName=function(e){for(var t=[],i=0;i<this.libIDs.length;i++)for(var n=this.getSymbolLibByLibId(this.libIDs[i]).querySymbolbyKey(e),r=0;r<n.length;r++)t.push(n[r]);return t},_0x18c058.prototype.getSymbolLibByIndex=function(e){return e>=this.libIDs.length?null:this.symbolLibs[e]},_0x18c058.prototype.getSymbolLibByLibId=function(e){for(var t=0;t<this.symbolLibs.length;t++)if(e===this.symbolLibs[t].libID)return this.symbolLibs[t];return null},_0x18c058.prototype.getSymbolLibID=function(e){return e>=this.libIDs.length?-1:this.libIDs[e]},_0x18c058.prototype.getSymbolLibJSONInfo=function(e){return e>=this.libIDs.length?null:this.symbolLibJsons[e]},_0x18c058.prototype.getSymbolLibNumber=function(){return this.libIDs.length},_0x18c058.prototype.getSymbolName=function(e,t){var i=this.getSymbolLibByLibId(e);return null===i?"":i.getSymbolName(t)},_0x18c058.prototype.getSymbolData=function(e,t){var i=this.getSymbolLibByLibId(e);return null===i?null:i.getSymbolData(t)},_0x18c058.prototype.setSymbolData=function(e,t){var i=this.getSymbolLibByLibId(e);if(null!==i&&WebGLPlot.defined(t)&&null!==t)i&&i.setSymbolData(t);else{var n=new _0x90ce;n.libID=e;let r=this;new _0x5228e4(this.url,this.options.serviceParams).getLibInfo(n,(function(e){e.result.succeed&&-1!==e.result.libID&&(r.symbolLibJsons.push(e.result),(i=new _0x467baf({symbolLibData:e.result,plottingID:r.plottingID})).url=r.url,i.setSymbolData(t),r.symbolLibs.push(i))}),this)}},_0x18c058.prototype.isInitializeOK=function(){return this.isInializeOK},_0x18c058.prototype.cacheSymbolLib=function(e){var t=this,i=this.getSymbolLibByLibId(e);i.cachecompleted.addEventListener((function(e){t.cachecompleted.raiseEvent({success:!0})})),null!==i&&i.cachedSymbols()};var _0x205818=(_0x30d6bb=!0,function(e,t){var i=_0x30d6bb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30d6bb=!1,i}),_0x4e1299=_0x205818(void 0,(function(){return _0x4e1299.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e1299).search("(((.+)+)+)+$")})),_0x30d6bb;_0x4e1299();var WebGLPlot$a=window.WebGLPlot=window.WebGLPlot||{};function _0x48d607(e,t,i){try{SuperMapAlgoPlot}catch{throw new WebGLPlot$a.DeveloperError("need include Build/Cesium/ThirdParty/Workers/PlotAlgo/PlotAlgoInclude.js ")}this._plottingID="PlottingID"+WebGLPlot$a.createGuid(),_0x48d607.serverUrl=e,this._scene=t,t._plottingID=this._plottingID,i&&i.serviceParams&&_0x2909c1.extend(this.options,i),this._symbolLibManager=_0x18c058.getInstance(e,void 0,this._plottingID),this._sitDataManager=WebGLPlot$a.SitDataManager.getInstance({scene:this._scene,serverUrl:e,options:this.options}),this._animationManager=_0x25263a.getInstance({serverUrl:e,scene:this._scene,options:this.options}),_0x48d607.defaultStyle=new WebGLPlot$a.DefaultStyle,WebGLPlot$a.S3MInstanceCollection&&(this.s3mInstanceColc=new WebGLPlot$a.S3MInstanceCollection(t._context),t.primitives.add(this.s3mInstanceColc),WebGLPlot$a.s3mInstanceColc.set(this._plottingID,this.s3mInstanceColc)),_0x48d607._AlgoSymoblPipelineDisMin=1e4,this._plotCollentionManager=_0x4786d3.getInstance(t)}_0x48d607.g_Plotting=_0x48d607.g_Plotting||new Map,WebGLPlot$a.s3mInstanceColc=WebGLPlot$a.s3mInstanceColc||new Map,_0x48d607.prototype.destroy=function(){this._scene.layers.remove("animation",!0),this._sitDataManager=null,this._animationManager=null,this._scene=null,_0x48d607.g_Plotting.clear()},_0x48d607.getInstance=function(e,t,i){let n=_0x48d607.g_Plotting.get(t._plottingID);return WebGLPlot$a.defined(e)&&WebGLPlot$a.defined(t)&&!WebGLPlot$a.defined(n)&&(n=new _0x48d607(e,t,i),_0x48d607.g_Plotting.set(n._plottingID,n)),n},_0x48d607.prototype.getSitDataManager=function(){return this._sitDataManager},_0x48d607.prototype.getSymbolLibManager=function(){return this._symbolLibManager},_0x48d607.prototype.getGOAnimationManager=function(){return this._animationManager},_0x48d607.prototype.getServerUrl=function(){return _0x48d607.serverUrl},_0x48d607.prototype.getDefaultStyle=function(){return _0x48d607.defaultStyle},_0x48d607.prototype.setAlgoUseDepthTest=function(e){this._plotCollentionManager&&this._plotCollentionManager.collentionLayer.createPolylineCollention(e)},_0x48d607.prototype.getAlgoUseDepthTest=function(){return!!this._plotCollentionManager&&this._plotCollentionManager.collentionLayer.polylineCollection._opaqueRS.depthMask},_0x48d607.prototype.getS3MCollection=function(){return this.s3mInstanceColc},WebGLPlot$a.Plotting=_0x48d607;const E$o=64;function d$s(e,t,i){i<2&&(i=2),this._initialWorldSize=t,this._maxDepth=i,this._octreeNodes=b$t(e,t,i,0),this._allObjects=[]}function v$m(e){return e$2e(e._boundingSphere)?e._boundingSphere:e._orientedBoundingBox}function b$t(e,t,i,n){var r=t/4,o=t/2,a=new Array([8]);let s=o$1p.add(e,new o$1p(-r,r,-r),new o$1p);a[0]=new h$n(s,o,i,n);let l=o$1p.add(e,new o$1p(r,r,-r),new o$1p);a[1]=new h$n(l,o,i,n);let u=o$1p.add(e,new o$1p(-r,r,r),new o$1p);a[2]=new h$n(u,o,i,n);let c=o$1p.add(e,new o$1p(r,r,r),new o$1p);a[3]=new h$n(c,o,i,n);let h=o$1p.add(e,new o$1p(-r,-r,-r),new o$1p);a[4]=new h$n(h,o,i,n);let d=o$1p.add(e,new o$1p(r,-r,-r),new o$1p);a[5]=new h$n(d,o,i,n);let f=o$1p.add(e,new o$1p(-r,-r,r),new o$1p);a[6]=new h$n(f,o,i,n);let p=o$1p.add(e,new o$1p(r,-r,r),new o$1p);return a[7]=new h$n(p,o,i,n),a}function I$p(e){var t=[];let i={};for(let n of e){let e=n._fileName;i[e]||(t.push(n),i[e]=1)}return t}function h$n(e,t,i,n){this._center=u$Z(e,1),this._baseSize=u$Z(t,1),this._depth=u$Z(n,0),this._maxDepth=u$Z(i,2),this._bound=new e$29(z$m(this._center,this._baseSize),x$p(this._center,this._baseSize),this._center),this._objects=[],this._children=[]}function z$m(e,t){return new o$1p(e.x-.5*t,e.y-.5*t,e.z-.5*t)}function x$p(e,t){return new o$1p(e.x+.5*t,e.y+.5*t,e.z+.5*t)}function T$m(e,t,i){let n=e.x;n=n>i.x?i.x:n,n=n<t.x?t.x:n;let r=e.y;r=r>i.y?i.y:r,r=r<t.y?t.y:r;let o=e.z;return o=o>i.z?i.z:o,o=o<t.z?t.z:o,new o$1p(n,r,o)}function V$j(e,t){let i=e.x-t.x,n=e.y-t.y,r=e.z-t.z;return i*i+n*n+r*r}function B$h(e,t){let i=t;e$2e(t.radius)||(i=new i$1d,i$1d.fromOrientedBoundingBox(t,i));var n=new o$1p;return n=T$m(i.center,e.minimum,e.maximum),V$j(i.center,n)<=i.radius*i.radius}d$s.prototype.debugObjectCounts=function(){var e=new Set;for(let t=0;t<this._octreeNodes.length;t++)this._octreeNodes[t].debugobjects(e);console.log(e.size)},d$s.prototype.addEntity=function(e){var t=v$m(e),i=!1;for(let r=0;r<this._octreeNodes.length;r++){var n=this._octreeNodes[r];i|=n.addNode(e,t)}i&&this._allObjects.push(e)},d$s.prototype.removeEntity=function(e){if(null==e)return!1;var t=!1,i=this._allObjects(e);i>-1&&(this._allObjects.splice(i,1),t=!0);for(let t=0;t<this._octreeNodes.length;t++){var n=this._octreeNodes[t];n.remove(e)}return t},d$s.prototype.getWithinFrustum=function(e){var t=[];const i=e.planes;for(let e=0,r=i.length;e<r;++e){var n=o$1m.fromCartesian4(i[e],void 0);t.push(n)}var r=[];for(let e=0;e<this._octreeNodes.length;e++){var o=this._octreeNodes[e];o.select(t,r)}return r=I$p(r)},d$s.prototype.setObjectsVisible=function(e){var t=[];const i=e.planes;for(let e=0,r=i.length;e<r;++e){var n=o$1m.fromCartesian4(i[e],void 0);t.push(n)}for(let e=0;e<this._octreeNodes.length;e++){var r=this._octreeNodes[e];r.setVisible(t,Ae$w.INTERSECTING)}},h$n.prototype.innerSplit=function(){this._children=b$t(this._center,this._baseSize,this._maxDepth,this._depth+1);for(var e=0;e<8;e++){this._children[e].addObjects(this._objects)}this._objects=[]},h$n.prototype.addNode=function(e,t){if(this._children.length>0){for(var i=!1,n=0;n<this._children.length;n++){i|=this._children[n].addNode(e,t)}return i}var r=!1;return B$h(this._bound,t)&&2*t.radius<=this._baseSize&&(this._objects.push(e),r=!0),this._depth<this._maxDepth&&this._objects.length>E$o&&this.innerSplit(),r},h$n.prototype.addObjects=function(e){for(let n=0;n<e.length;n++){var t=e[n],i=v$m(t);this.addNode(t,i)}},h$n.prototype.remove=function(e){if(this._children.length>0)for(var t=0;t<this._children.length;t++){this._children[t].remove(e)}let i=!1;var n=this._objects.indexOf(e);return n>-1&&(this._objects.splice(n,1),i=!0),i},h$n.prototype.select=function(e,t){if(this.computeVisibility(e)!==Ae$w.OUTSIDE){if(this._children.length>0){for(let n=0;n<this._children.length;n++){var i=this._children[n];i.select(e,t)}return}for(var n=0;n<this._objects.length;n++){var r=this._objects[n];r.isVisible=!0,e$2e(r._parentPagelod)&&(r._parentPagelod._isVisible=!0),t.push(r)}}},h$n.prototype.setVisible=function(e,t){var i=t;if(t===Ae$w.OUTSIDE)for(var n=0;n<this._objects.length;n++){(r=this._objects[n])._isVisible=!1}else{t===Ae$w.INTERSECTING&&(i=this.computeVisibility(e));for(n=0;n<this._objects.length;n++){var r;(r=this._objects[n])._isVisible=!0,e$2e(r._parentPagelod)&&(r._parentPagelod._isVisible=!0)}}if(this._children.length>0)for(let t=0;t<8;t++)this._children[t].setVisible(e,i)},h$n.prototype.bestFitChild=function(e){return(e.x<=this._center.x?0:1)+(e.y>=this._center.y?0:4)+(e.z<=this._center.z?0:2)},h$n.prototype.computeVisibility=function(e){const t=e;var i=!1;for(let e=0,n=t.length;e<n;++e){const n=this._bound.intersectPlane(t[e]);if(n===Ae$w.OUTSIDE)return Ae$w.OUTSIDE;n===Ae$w.INTERSECTING&&(i=!0)}return i?Ae$w.INTERSECTING:Ae$w.INSIDE},h$n.prototype.debugobjects=function(e){for(let t=0;t<this._objects.length;t++)e.add(this._objects[t]._fileName);for(let t=0;t<this._children.length;t++)this._children[t].debugobjects(e)};var x$o="uniform sampler2D u_floatTexture;\n\nvoid main()\n{\n float actual = texture2D(u_floatTexture, vec2(0.5, 0.5)).r;\n float expected = 123456.0;\n gl_FragColor = vec4(abs(actual - expected), 0.0, 0.0, 1.0);\n}\n";function f$n(e){this._context=e}var i$l,R$k=new i$$({primitiveType:W$18.TRIANGLES}),D$j=new t$W({color:new e$1X(0,0,0,0)});function M$n(e,t){return new t$V({context:e,colorTextures:[t],destroyAttachments:!1})}function Q$i(e,t,i){return r$14.fromCache({name:t,context:e,vertexShaderSource:ot$8,fragmentShaderSource:i,attributeLocations:{position:0,textureCoordinates:1}})}function F$i(e,t){return(!e$2e(i$l)||i$l.viewport.width!==e||i$l.viewport.height!==t)&&(i$l=d$1m.fromCache({viewport:new f$1a(0,0,e,t)})),i$l}function r$p(e){if(!e.floatingPointTexture)return!1;var t=new f$n(e),i=new t$U({context:e,width:1,height:1,pixelFormat:V$12.RGBA}),n=new t$U({context:e,width:1,height:1,pixelFormat:V$12.RGBA,pixelDatatype:r$p._getFloatPixelType(),source:{width:1,height:1,arrayBufferView:r$p._getArray([123456,0,0,0])}}),r=new t$V({context:e,colorTextures:[i],destroyAttachments:!1}),o={framebuffer:r,x:0,y:0,width:1,height:1},a=!1,s=new t$H({name:"CheckFloatTexturePrecision",fragmentShaderSource:x$o,outputTexture:i,uniformMap:{u_floatTexture:function(){return n}},persists:!1,postExecute:function(){var t=e.readPixels(o);a=0===t[0]}});return s.execute(t),t.destroy(),r.destroy(),a}function t$g(e){this._renderTexture=new s$M(e),this._renderTexture._pixelDatatype=_$_.UNSIGNED_BYTE,this._context=e,this._isUpdate=!0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0};var t=e._gl,i=e$2e(e._currentFramebuffer)?e._currentFramebuffer._framebuffer:null;e.webgpu||t.bindFramebuffer(t.FRAMEBUFFER,i)}function a$i(e){this._context=e,this._frameBuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._upSampleWidth=Math.max(Math.pow(2,Math.ceil(Math.log(e.drawingBufferWidth)/Math.log(10))),8),this._upSampleHeight=Math.max(Math.pow(2,Math.ceil(Math.log(e.drawingBufferHeight)/Math.log(10))),8),this._upSampleViewport=new f$1a(0,0,this._upSampleWidth,this._upSampleHeight)}f$n.prototype.execute=function(e){if(o$1q.defined("computeCommand",e),e$2e(e.preExecute)&&e.preExecute(e),!e$2e(e.fragmentShaderSource)&&!e$2e(e.shaderProgram))throw new t$15("computeCommand.fragmentShaderSource or computeCommand.shaderProgram is required.");o$1q.defined("computeCommand.outputTexture",e.outputTexture);var t=e.outputTexture,i=t.width,n=t.height,r=this._context,o=e$2e(e.vertexArray)?e.vertexArray:r.getViewportQuadVertexArray(),a=e$2e(e.shaderProgram)?e.shaderProgram:Q$i(r,e.name,e.fragmentShaderSource),s=M$n(r,t),l=u$Z(e.renderState,F$i(i,n)),u=e.uniformMap;if(e.clear){var c=D$j;c.framebuffer=s,c.renderState=l,c.execute(r)}var h=R$k;h.vertexArray=o,h.count=void 0,h.renderState=l,h.shaderProgram=a,h.uniformMap=u,h.framebuffer=s,h.execute(r),s.destroy(),e.persists||(a.destroy(),e$2e(e.vertexArray)&&o.destroy()),e$2e(e.postExecute)&&e.postExecute(t)},f$n.prototype.isDestroyed=function(){return!1},f$n.prototype.destroy=function(){return i$11(this)},r$p._getFloatPixelType=function(){return _$_.FLOAT},r$p._getArray=function(e){return new Float32Array(e)},Object.defineProperties(t$g.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 32},set:function(e){}},frameBufferType:{get:function(){return Qe$c.CLAMP}}}),t$g.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},t$g.prototype.end=function(e){this._isUpdate=!0},t$g.prototype.update=function(e,t){},t$g.prototype.isDestroyed=function(){return!1},t$g.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)};var Q$h=new e$2c,U$k=new e$2c(1,1/255,1/65025,1/16581375);function C$m(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function v$l(e){e._frameBuffer=e._frameBuffer&&!e._frameBuffer.isDestroyed()&&e._frameBuffer.destroy()}function Y$e(e,t){e._depthTexture=new t$U({context:t,width:e._upSampleWidth,height:e._upSampleHeight,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE})}function q$i(e,t){C$m(e),v$l(e),Y$e(e,t),e._frameBuffer=new t$V({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function J$d(e,t){(!e$2e(e._frameBuffer)||!e$2e(e._depthTexture))&&q$i(e,t)}function K$e(e,t,i){if(!e$2e(e._copyDepthCommand)){e._copyDepthCommand=t.createViewportQuadCommand("uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = czm_packDepth(texture2D(u_texture, v_textureCoordinates).r);\n}\n",{renderState:d$1m.fromCache({viewport:e._upSampleViewport}),uniformMap:{u_texture:function(){return e._textureToCopy}},owner:e})}e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._frameBuffer,e$2e(e._clearCommand)||(e._clearCommand=new t$W({color:new e$1X(0,0,0,1),stencil:0,depth:1,owner:e})),e._clearCommand.framebuffer=e._frameBuffer}a$i.prototype.end=function(e,t,i){for(var n,r=e._context,o=r.drawingBufferWidth,a=r.drawingBufferHeight,s=this._upSampleWidth,l=this._upSampleHeight,u=Math.max(s,l),c=u*u,h=Math.floor(t/o*s),d=Math.floor(i/a*l),f=0,p=0,_=0,m=-1,g=this._frameBuffer,x=r.readPixels({x:0,y:0,width:s,height:l,framebuffer:g}),y=0,v=0;v<c;++v){if(-h<=f&&f<=h&&-d<=p&&p<=d){var $=4*((d-p)*s+f+h);if(n=e$2c.unpack(x,$,Q$h),e$2c.divideByScalar(n,255,n),(y=e$2c.dot(n,U$k))>0&&y<1)break}if(f===p||f<0&&-f===p||f>0&&f===1-p){var b=_;_=-m,m=b}f+=_,p+=m}if(y>0&&y<1&&e._frustumCommandsList.length>0){var T=e._frustumCommandsList[0];e._context.uniformState.updateFrustum(T);var C=new o$1o(t,i);return s$R.drawingBufferToWgs84Coordinates(e,C,y,new o$1p)}},a$i.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},a$i.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},a$i.prototype.clear=function(e,t){this._clearCommand.execute(e,t)},a$i.prototype.update=function(e,t){J$d(this,e),K$e(this,e,t)},a$i.prototype.isDestroyed=function(){return!1},a$i.prototype.destroy=function(){return C$m(this),v$l(this),this._copyDepthCommand.shaderProgram=e$2e(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy(),i$11(this)};var D$i="attribute aPosition : vec4<f32>;\nattribute textureCoordinates : vec2<f32>;\nvarying v_textureCoordinates : vec2<f32>;\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs { \n gl_Position = aPosition;\n v_textureCoordinates = textureCoordinates;\n}\n";function h$m(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}function T$l(e){const t=Object.keys(e).sort();return JSON.stringify(e,t)}function _$j(e,t){for(var i=t.derivedKeywords,n=i.length,r=0;r<n;++r){var o=i[r]+t.keyword;_$j(e,e._shaders[o])}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}function r$o(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}function i$k(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.color=e$2e(e.color)?e$1X.clone(e.color):e$1X.WHITE,this.intensity=u$Z(e.intensity,2)}Object.defineProperties(h$m.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}}),h$m.prototype.replaceShaderProgram=function(e){return e$2e(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)},h$m.prototype.getShaderProgram=function(e){var t=e.vertexShaderSource,i=e.fragmentShaderSource,n=e.attributeLocations,r=e.varyings,o=e.bufferMode,a=u$Z(e.useWGSL,!1);"string"==typeof t?t=new s$V({sources:[t],useWGSL:a}):!0===t.useWGSL&&(a=!0),"string"==typeof i?i=new s$V({sources:[i],useWGSL:a}):!0===i.useWGSL&&(a=!0);const s=t.getCacheKey(this._context),l=i.getCacheKey(this._context),u=e$2e(n)?T$l(n):"",c=`${s}:${l}:${u}`,h=this._getShaderProgramName(e,u,t,i);var d;if(e$2e(this._shaders[c]))d=this._shaders[c],delete this._shadersToRelease[c];else{const s=t.createCombinedVertexShader(this._context),l=i.createCombinedFragmentShader(this._context);var f=this._context,p=new(f.webgpu?m$$:g$1a)({context:f,gl:f._gl,logShaderCompilation:f.logShaderCompilation,debugShaders:f.debugShaders,vertexShaderSource:t,vertexShaderText:s,fragmentShaderSource:i,fragmentShaderText:l,attributeLocations:n,transformFeedbackVaryings:e.transformFeedbackVaryings,varyings:r,bufferMode:o,name:h,useWGSL:a});d={cache:this,shaderProgram:p,keyword:c,derivedKeywords:[],count:0},p._cachedShader=d,this._shaders[c]=d,++this._numberOfShaders}return++d.count,d.shaderProgram},h$m.prototype._getShaderProgramName=function(e,t,i,n){if(e$2e(e.name))return e.name;return`${i._getKeyForShaderProgramName()}:${n._getKeyForShaderProgramName()}:${t}`},h$m.prototype.replaceDerivedShaderProgram=function(e,t,i){var n=e._cachedShader,r=t+n.keyword,o=this._shaders[r];if(e$2e(o)){_$j(this,o);var a=n.derivedKeywords.indexOf(t);a>-1&&n.derivedKeywords.splice(a,1)}return this.createDerivedShaderProgram(e,t,i)},h$m.prototype.getDerivedShaderProgram=function(e,t){var i=t+e._cachedShader.keyword,n=this._shaders[i];if(e$2e(n))return n.shaderProgram},h$m.prototype.createDerivedShaderProgram=function(e,t,i){var n=e._cachedShader,r=t+n.keyword,o=i.vertexShaderSource,a=i.fragmentShaderSource,s=i.attributeLocations,l=i.varyings,u=i.bufferMode;"string"==typeof o&&(o=new s$V({sources:[o]})),"string"==typeof a&&(a=new s$V({sources:[a]}));var c=this._context,h=o.createCombinedVertexShader(c),d=a.createCombinedFragmentShader(c),f=new(c.webgpu?m$$:g$1a)({context:c,gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:o,vertexShaderText:h,fragmentShaderSource:a,fragmentShaderText:d,attributeLocations:s,transformFeedbackVaryings:i.transformFeedbackVaryings,varyings:l,bufferMode:u,name:e.name+t,useWGSL:o.useWGSL}),p={cache:this,shaderProgram:f,keyword:r,derivedKeywords:[],count:0};return n.derivedKeywords.push(t),f._cachedShader=p,this._shaders[r]=p,f},h$m.prototype.destroyReleasedShaderPrograms=function(){var e=this._shadersToRelease;for(var t in e)if(e.hasOwnProperty(t)){_$j(this,e[t]),--this._numberOfShaders}this._shadersToRelease={}},h$m.prototype.releaseShaderProgram=function(e){if(e$2e(e)){var t=e._cachedShader;t&&0==--t.count&&(this._shadersToRelease[t.keyword]=t)}},h$m.prototype.isDestroyed=function(){return!1},h$m.prototype.destroy=function(){var e=this._shaders;for(var t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return i$11(this)},Object.defineProperties(r$o.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}}),r$o.prototype.getTexture=function(e){var t=this._textures[e];if(e$2e(t))return delete this._texturesToRelease[e],++t.count,t.texture},r$o.prototype.addTexture=function(e,t){var i={texture:t,count:1};t.finalDestroy=t.destroy;var n=this;t.destroy=function(){0==--i.count&&(n._texturesToRelease[e]=i)},this._textures[e]=i,++this._numberOfTextures},r$o.prototype.destroyReleasedTextures=function(){var e=this._texturesToRelease;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];delete this._textures[t],i.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}},r$o.prototype.isDestroyed=function(){return!1},r$o.prototype.destroy=function(){var e=this._textures;for(var t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return i$11(this)};const _0x19ee54=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x455fd2=_0x19ee54(void 0,(function(){return _0x455fd2.toString().search("(((.+)+)+)+$").toString().constructor(_0x455fd2).search("(((.+)+)+)+$")}));function _0x3261f9(e){var t=_0x37a515.call(this)||this;t._name=_0x2e0417.LIGHT,t._uniformState=e,t._lightGridTableTexture=void 0,t._globalLightListTexture=void 0}_0x455fd2();const _0x2ca6aa="uLightGridTexture",_0x584a7d="uGlobalLightListTexture";_0x37a515&&(_0x3261f9.__proto__=_0x37a515),_0x3261f9.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x3261f9.prototype.constructor=_0x37a515,Object.defineProperties(_0x3261f9.prototype,{lightGridTexture:{get:function(){return this._lightGridTableTexture},set:function(e){this._lightGridTableTexture=e,this._isTextureDirty=!0}},globalLightListTexture:{get:function(){return this._globalLightListTexture},set:function(e){this._globalLightListTexture=e,this._isTextureDirty=!0}}}),_0x3261f9.prototype._initUBOStruct=function(){this._ubo.addUniform("uPointLightPositionEC",3,s$J.MaxPointLightCount),this._ubo.addUniform("uPointLightColor",3,s$J.MaxPointLightCount),this._ubo.addUniform("uPointLightDistanceAndDecay",4,s$J.MaxPointLightCount),this._ubo.addUniform("uSpotLightColorAndExponent",4,s$J.MaxSpotLightCount),this._ubo.addUniform("uSpotLightPositionEC",3,s$J.MaxSpotLightCount),this._ubo.addUniform("uSpotLightDirectionEC",3,s$J.MaxSpotLightCount),this._ubo.addUniform("uSpotLightDistanceDecayCosPenumbra",4,s$J.MaxSpotLightCount),this._ubo.addUniform("uDirectionalLightDirectionEC",3,s$J.MaxDirectionLightCount),this._ubo.addUniform("uDirectionalLightDirection",3,s$J.MaxDirectionLightCount),this._ubo.addUniform("uDirectionalLightColor",3,s$J.MaxDirectionLightCount),this._ubo.addUniform("uAmbientLightColor",4),this._ubo.addUniform("uSunLightColor",4),this._ubo.addUniform("uSunDirectionEC",3),this._ubo.addUniform("uSkyColor",3),this._ubo.addUniform("uGroundColor",3),this._ubo.addUniform("uSunLightON",1),this._ubo.addUniform("uPointLightCount",1),this._ubo.addUniform("uSpotLightCount",1),this._ubo.addUniform("uDirLightCount",1)},_0x3261f9.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):e.webgpu&&(this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1)),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},new o$1o;const _0x102caf=new o$1o,_0x1dd875=new e$2c;_0x3261f9.prototype.update=function(e){const t=e.context,i=e.lightSource;if(!t.webgpu&&!t.webgl2)return void this._initUniformMap(t,i);e$2e(this._ubo)||this._initUBO(t);const n=this._ubo;var r=i.ambientLightColor,o=i.sunLightColor;n.updateFloat4("uAmbientLightColor",r.red,r.green,r.blue,r.alpha),n.updateFloat4("uSunLightColor",o.red,o.green,o.blue,o.alpha),n.updateFloat("uSunLightON",i.sunLightON),_0x37a515.writeCartesian3ToUBO("uSunDirectionEC",this._ubo,this._uniformState.sunDirectionEC);let a=i.directionalLight.values,s=a.length;if(s=Math.min(s,s$J.MaxDirectionLightCount),s>0){const e=[],t=[],i=[];for(let n=0;n<s;n++){const r=a[n],o=r.lightColor;o$1p.pack(r.directionEC,e,3*n),o$1p.pack(r.direction,t,3*n),_0x102caf.x=o.red,_0x102caf.y=o.green,_0x102caf.z=o.blue,o$1p.pack(_0x102caf,i,3*n)}n.updateInt("uDirLightCount",s),n.updateFloatArray("uDirectionalLightDirectionEC",e),n.updateFloatArray("uDirectionalLightDirection",t),n.updateFloatArray("uDirectionalLightColor",i)}if(a=i._visibleLightList[_0x4970c2.POINT].values,s=a.length,s=Math.min(s,s$J.MaxPointLightCount),s>0){const e=[],t=[],i=[];for(let n=0;n<s;n++){const r=a[n],o=r.lightColor;o$1p.pack(r.positionEC,e,3*n),_0x102caf.x=o.red,_0x102caf.y=o.green,_0x102caf.z=o.blue,o$1p.pack(_0x102caf,t,3*n),_0x1dd875.x=r.cutoffDistance,_0x1dd875.y=r.decay,_0x1dd875.z=0,_0x1dd875.w=0,e$2c.pack(_0x1dd875,i,4*n)}n.updateInt("uPointLightCount",s),n.updateFloatArray("uPointLightPositionEC",e),n.updateFloatArray("uPointLightColor",t),n.updateFloatArray("uPointLightDistanceAndDecay",i)}if(a=i._visibleLightList[_0x4970c2.SPOT].values,s=a.length,s=Math.min(s,s$J.MaxSpotLightCount),s>0){const e=[],t=[],i=[],r=[];for(let n=0;n<s;n++){const o=a[n],s=o.lightColor;o$1p.pack(o.positionEC,e,3*n),_0x1dd875.x=s.red,_0x1dd875.y=s.green,_0x1dd875.z=s.blue,_0x1dd875.w=o.exponent,e$2c.pack(_0x1dd875,t,4*n),o$1p.pack(o.directionEC,i,3*n),_0x1dd875.x=o.distance,_0x1dd875.y=o.decay,_0x1dd875.z=o.angleCos,_0x1dd875.w=o.penumbraCos,e$2c.pack(_0x1dd875,r,4*n)}n.updateInt("uSpotLightCount",s),n.updateFloatArray("uSpotLightPositionEC",e),n.updateFloatArray("uSpotLightColorAndExponent",t),n.updateFloatArray("uSpotLightDirectionEC",i),n.updateFloatArray("uSpotLightDistanceDecayCosPenumbra",r)}if(a=i._lightList[_0x4970c2.HEMISPHERE].values,s=a.length,s>0){const e=a[0],t=e.skyColor,i=e.groundColor;n.updateFloat3("uSkyColor",t.red,t.green,t.blue),n.updateFloat3("uGroundColor",i.red,i.green,i.blue)}this._ubo.update(),this._isValueDirty=!1},_0x3261f9.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),this._setTextureToEffect(e,this._lightGridTableTexture,_0x2ca6aa),this._setTextureToEffect(e,this._globalLightListTexture,_0x584a7d)},_0x3261f9.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x3261f9.prototype._initUniformMap=function(e,t){if(!e$2e(this._uniformMap)){var i=this._uniformState,n={uAmbientLightColor:function(){return t.ambientLightColor},uSunLightColor:function(){return t.sunLightColor},uSunLightON:function(){return t.sunLightON}};n.uSunLightON=function(){return t.sunLightON},n.uSunDirectionEC=function(){return i.sunDirectionEC},n.uDirLightCount=function(){let e=t.directionalLight.values.length;return Math.min(e,s$J.MaxDirectionLightCount)},n.uDirectionalLightDirectionEC=function(){let e=t.directionalLight.values,i=e.length;i=Math.min(i,s$J.MaxDirectionLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.directionEC,n,3*t)}return n},n.uDirectionalLightDirection=function(){let e=t.directionalLight.values,i=e.length;i=Math.min(i,s$J.MaxDirectionLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.direction,n,3*t)}return n},n.uDirectionalLightColor=function(){let e=t.directionalLight.values,i=e.length;i=Math.min(i,s$J.MaxDirectionLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t].lightColor;_0x102caf.x=i.red,_0x102caf.y=i.green,_0x102caf.z=i.blue,o$1p.pack(_0x102caf,n,3*t)}return n},n.uPointLightCount=function(){let e=t._visibleLightList[_0x4970c2.POINT].values.length;return Math.min(e,s$J.MaxPointLightCount)},n.uPointLightPositionEC=function(){const e=t._visibleLightList[_0x4970c2.POINT].values;let i=e.length;i=Math.min(i,s$J.MaxPointLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.positionEC,n,3*t)}return n},n.uPointLightColor=function(){const e=t._visibleLightList[_0x4970c2.POINT].values;let i=e.length;i=Math.min(i,s$J.MaxPointLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t].lightColor;_0x102caf.x=i.red,_0x102caf.y=i.green,_0x102caf.z=i.blue,o$1p.pack(_0x102caf,n,3*t)}return n},n.uPointLightDistanceAndDecay=function(){const e=t._visibleLightList[_0x4970c2.POINT].values;let i=e.length;i=Math.min(i,s$J.MaxPointLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];_0x1dd875.x=i.cutoffDistance,_0x1dd875.y=i.decay,_0x1dd875.z=0,_0x1dd875.w=0,e$2c.pack(_0x1dd875,n,4*t)}return n},n.uSpotLightCount=function(){let e=t._visibleLightList[_0x4970c2.SPOT].values.length;return Math.min(e,s$J.MaxSpotLightCount)},n.uSpotLightPositionEC=function(){const e=t._visibleLightList[_0x4970c2.SPOT].values;let i=e.length;i=Math.min(i,s$J.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.positionEC,n,3*t)}return n},n.uSpotLightColorAndExponent=function(){const e=t._visibleLightList[_0x4970c2.SPOT].values;let i=e.length;i=Math.min(i,s$J.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t],r=i.lightColor;_0x1dd875.x=r.red,_0x1dd875.y=r.green,_0x1dd875.z=r.blue,_0x1dd875.w=i.exponent,e$2c.pack(_0x1dd875,n,4*t)}return n},n.uSpotLightDirectionEC=function(){const e=t._visibleLightList[_0x4970c2.SPOT].values;let i=e.length;i=Math.min(i,s$J.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.directionEC,n,3*t)}return n},n.uSpotLightDistanceDecayCosPenumbra=function(){const e=t._visibleLightList[_0x4970c2.SPOT].values;let i=e.length;i=Math.min(i,s$J.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];_0x1dd875.x=i.distance,_0x1dd875.y=i.decay,_0x1dd875.z=i.angleCos,_0x1dd875.w=i.penumbraCos,e$2c.pack(_0x1dd875,n,4*t)}return n},n.uSkyColor=function(){const e=t._lightList[_0x4970c2.HEMISPHERE].values;return e.length>0?e[0].skyColor:Color.WHITE},n.uGroundColor=function(){const e=t._lightList[_0x4970c2.HEMISPHERE].values;return e.length>0?e[0].groundColor:Color.WHITE},this._uniformMap=n}},_0x3261f9.prototype.isDestroyed=function(){return!1},_0x3261f9.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};var _0x8dce94=(_0x2f25d4=!0,function(e,t){var i=_0x2f25d4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f25d4=!1,i}),_0x57a0ed=_0x8dce94(void 0,(function(){return _0x57a0ed.toString().search("(((.+)+)+)+$").toString().constructor(_0x57a0ed).search("(((.+)+)+)+$")})),_0x2f25d4;_0x57a0ed();const _0x1f25ac="uBrdfLut",_0x3efd46="uSpecularEnvironmentMaps",_0x172984="uEnvironmentMap",_0x4fda9d="uHdrEnvMap";function _0x3a935d(e){var t=_0x37a515.call(this)||this;t._name=_0x2e0417.SCENE,t._brdfLutTexture=void 0,t._specularEnvironmentMaps=void 0,t._environmentMap=void 0,t._hdrEnvMap=void 0,t._uniformState=e}function P$l(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new f$1a,this._viewportCartesian4=new e$2c,this._viewportDirty=!1,this._viewportOrthographicMatrix=p$1d.clone(p$1d.IDENTITY),this._viewportTransformation=p$1d.clone(p$1d.IDENTITY),this._model=p$1d.clone(p$1d.IDENTITY),this._view=p$1d.clone(p$1d.IDENTITY),this._inverseView=p$1d.clone(p$1d.IDENTITY),this._projection=p$1d.clone(p$1d.IDENTITY),this._infiniteProjection=p$1d.clone(p$1d.IDENTITY),this._entireFrustum=new o$1o,this._currentFrustum=new o$1o,this._frustumPlanes=new e$2c,this._frameState=void 0,this._temeToPseudoFixed=p$1e.clone(p$1d.IDENTITY),this._view3DDirty=!0,this._view3D=new p$1d,this._inverseView3DDirty=!0,this._inverseView3D=new p$1d,this._inverseModelDirty=!0,this._inverseModel=new p$1d,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new p$1e,this._viewRotation=new p$1e,this._inverseViewRotation=new p$1e,this._viewRotation3D=new p$1e,this._inverseViewRotation3D=new p$1e,this._inverseProjectionDirty=!0,this._inverseProjection=new p$1d,this._modelViewDirty=!0,this._modelView=new p$1d,this._modelView3DDirty=!0,this._modelView3D=new p$1d,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new p$1d,this._inverseModelViewDirty=!0,this._inverseModelView=new p$1d,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new p$1d,this._viewProjectionDirty=!0,this._viewProjection=new p$1d,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new p$1d,this._modelViewProjectionDirty=!0,this._modelViewProjection=new p$1d,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new p$1d,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new p$1d,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new p$1d,this._mvpViewPortDirty=!0,this._mvpViewPort=new p$1d,this._normalDirty=!0,this._normal=new p$1e,this._normal3DDirty=!0,this._normal3D=new p$1e,this._inverseNormalDirty=!0,this._inverseNormal=new p$1e,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new p$1e,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new i$12,this._encodedOriginCameraPositionMC=new i$12,this._cameraPosition=new o$1p,this._sunPositionWC=new o$1p,this._sunPositionColumbusView=new o$1p,this._sunDirectionWC=new o$1p,this._sunDirectionEC=new o$1p,this._sunColor=new o$1p,this._moonDirectionEC=new o$1p,this._lightDirectionWC=new o$1p,this._lightDirectionEC=new o$1p,this._lightColor=new o$1p,this._lightColorHdr=new o$1p,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._cameraDirection=new o$1p,this._cameraRight=new o$1p,this._cameraUp=new o$1p,this._frustum2DWidth=0,this._eyeHeight2D=new o$1o,this._resolutionScale=1,this._pixelRatio=1,this._eyeHeight=0,this._orthographicIn3D=!1,this._backgroundColor=new e$1X,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsDimensions=new o$1o,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._invertClassificationColor=void 0,this._imagerySplitPosition=new o$1o,this._globeSplitPosition=new o$1o,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0,this._globeDepthTextureDim=new o$1o,this._silverLightingAtmosphere=void 0,this._hdrEnvMap=void 0,this._toneMappingExposure=1,this._envMapIntensity=1,this._cameraReflect=1,this._sceneUBO=new _0x3a935d(this),this._lightUBO=new _0x3261f9(this),this._relativeOrigin=new o$1p,this.useRelativeOrigin=!0}function Q$g(e,t){p$1d.clone(t,e._view),p$1d.getRotation(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0,e._mvpViewPortDirty=!0}function X$d(e,t){p$1d.clone(t,e._inverseView),p$1d.getRotation(t,e._inverseViewRotation)}function $$g(e){var t=e._frameState;if(e$2e(t)&&t.TAAEnable&&"normal"===t._fboState.name){var i=e._projection;i[8]+=t.jitter.x,i[9]+=t.jitter.y}}function S$k(e,t){p$1d.clone(t,e._projection),$$g(e),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._mvpViewPortDirty=!0}function ii$1(e,t){p$1d.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}function ei$1(e,t){o$1p.clone(t.positionWC,e._cameraPosition),o$1p.clone(t.directionWC,e._cameraDirection),o$1p.clone(t.rightWC,e._cameraRight),o$1p.clone(t.upWC,e._cameraUp);const i=t.positionCartographic;e$2e(i)?e._eyeHeight=i.height:e._eyeHeight=-e._ellipsoid.maximumRadius,e._encodedCameraPositionMCDirty=!0}_0x37a515&&(_0x3a935d.__proto__=_0x37a515),_0x3a935d.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x3a935d.prototype.constructor=_0x37a515,Object.defineProperties(_0x3a935d.prototype,{}),_0x3a935d.prototype._initUBOStruct=function(){this._ubo.addUniform("uView",16),this._ubo.addUniform("uProjection",16),this._ubo.addUniform("uViewProjection",16),this._ubo.addUniform("uInverseView",16),this._ubo.addUniform("uInverseProjection",16),this._ubo.addUniform("uInverseViewProjection",16),this._ubo.addUniform("uViewportTransformation",16),this._ubo.addUniform("uViewRotation",9),this._ubo.addUniform("uInverseViewRotation",9),this._ubo.addUniform("uTemeToPseudoFixed",9),this._ubo.addUniform("uViewport",4),this._ubo.addUniform("uFrustumPlanes",4),this._ubo.addUniform("uRelativeOrigin",3),this._ubo.addUniform("uCurrentFrustum",2),this._ubo.addUniform("uFarDepthFromNearPlusOne",1),this._ubo.addUniform("uLog2FarDepthFromNearPlusOne",1),this._ubo.addUniform("uOneOverLog2FarDepthFromNearPlusOne",1),this._ubo.addUniform("uFrameNumber",1),this._ubo.addUniform("uPixelRatio",1),this._ubo.addUniform("uResolutionScale",1),this._ubo.addUniform("uGamma",1),this._ubo.addUniform("uToneMappingExposure",1),this._ubo.addUniform("uEnvMapIntensity",1),this._ubo.addUniform("uSpecularEnvironmentMapSize",2),this._ubo.addUniform("uSpecularEnvironmentMapsMaximumLOD",1),this._ubo.addUniform("uSphericalHarmonicCoefficients",3,9),this._ubo.addUniform("uCameraReflect",1)},_0x3a935d.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):e.webgpu&&(this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1)),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x3a935d.prototype.update=function(e,t){if(e.webgpu||e.webgl2){if(e$2e(this._ubo)||this._initUBO(e),_0x37a515.writeCartesian4ToUBO("uViewport",this._ubo,t.viewportCartesian4),_0x37a515.writeMatrix4ToUBO("uView",this._ubo,t.view),_0x37a515.writeMatrix3ToUBO("uViewRotation",this._ubo,t.viewRotation),_0x37a515.writeMatrix4ToUBO("uInverseView",this._ubo,t.inverseView),_0x37a515.writeMatrix3ToUBO("uInverseViewRotation",this._ubo,t.inverseViewRotation),_0x37a515.writeMatrix4ToUBO("uProjection",this._ubo,t.projection),_0x37a515.writeMatrix4ToUBO("uInverseProjection",this._ubo,t.inverseProjection),_0x37a515.writeMatrix4ToUBO("uViewProjection",this._ubo,t.viewProjection),_0x37a515.writeMatrix4ToUBO("uInverseViewProjection",this._ubo,t.inverseViewProjection),_0x37a515.writeMatrix4ToUBO("uViewportTransformation",this._ubo,t.viewportTransformation),_0x37a515.writeCartesian2ToUBO("uCurrentFrustum",this._ubo,t.currentFrustum),_0x37a515.writeCartesian4ToUBO("uFrustumPlanes",this._ubo,t.frustumPlanes),_0x37a515.writeCartesian3ToUBO("uRelativeOrigin",this._ubo,t.relativeOrigin),this._ubo.updateFloat("uFarDepthFromNearPlusOne",t.farDepthFromNearPlusOne),this._ubo.updateFloat("uLog2FarDepthFromNearPlusOne",t.log2FarDepthFromNearPlusOne),this._ubo.updateFloat("uOneOverLog2FarDepthFromNearPlusOne",t.oneOverLog2FarDepthFromNearPlusOne),this._ubo.updateFloat("uFrameNumber",t.frameState.frameNumber),_0x37a515.writeMatrix3ToUBO("uTemeToPseudoFixed",this._ubo,t.temeToPseudoFixedMatrix),this._ubo.updateFloat("uPixelRatio",t.pixelRatio),this._ubo.updateFloat("uResolutionScale",t.resolutionScale),this._ubo.updateFloat("uGamma",t.gamma),this._ubo.updateFloat("uToneMappingExposure",t.toneMappingExposure),this._ubo.updateFloat("uEnvMapIntensity",t.envMapIntensity),this._ubo.updateFloat("uCameraReflect",t.cameraReflect),t.specularEnvironmentMapsDimensions&&this._ubo.updateFloat2("uSpecularEnvironmentMapSize",t.specularEnvironmentMapsDimensions.x,t.specularEnvironmentMapsDimensions.y),t.specularEnvironmentMapsMaximumLOD&&this._ubo.updateFloat("uSpecularEnvironmentMapsMaximumLOD",t.specularEnvironmentMapsMaximumLOD),t.sphericalHarmonicCoefficients){for(var i=[],n=0;n<t.sphericalHarmonicCoefficients.length;n++){var r=t.sphericalHarmonicCoefficients[n];o$1p.pack(r,i,3*n)}this._ubo.updateFloatArray("uSphericalHarmonicCoefficients",i)}this._ubo.update(),this._brdfLutTexture=t.brdfLut,this._specularEnvironmentMaps=t.specularEnvironmentMaps,this._environmentMap=t.environmentMap,this._hdrEnvMap=t.hdrEnvMap}},_0x3a935d.prototype._initUniformMap=function(e){if(!e.webgl2&&!e.webgpu){var t=this._uniformState;this._uniformMap={},this._uniformMap.uView=function(){return t.view},this._uniformMap.uProjection=function(){return t.projection},this._uniformMap.uViewProjection=function(){return t.viewProjection},this._uniformMap.uInverseView=function(){return t.inverseView},this._uniformMap.uInverseProjection=function(){return t.inverseProjection},this._uniformMap.uInverseViewProjection=function(){return t.inverseViewProjection},this._uniformMap.uViewportTransformation=function(){return t.viewportTransformation},this._uniformMap.uViewRotation=function(){return t.viewRotation},this._uniformMap.uInverseViewRotation=function(){return t.inverseViewRotation},this._uniformMap.uTemeToPseudoFixed=function(){return t.temeToPseudoFixedMatrix},this._uniformMap.uViewport=function(){return t.viewportCartesian4},this._uniformMap.uFrustumPlanes=function(){return t.frustumPlanes},this._uniformMap.uRelativeOrigin=function(){return t.relativeOrigin},this._uniformMap.uCurrentFrustum=function(){return t.currentFrustum},this._uniformMap.uFarDepthFromNearPlusOne=function(){return t.farDepthFromNearPlusOne},this._uniformMap.uLog2FarDepthFromNearPlusOne=function(){return t.log2FarDepthFromNearPlusOne},this._uniformMap.uOneOverLog2FarDepthFromNearPlusOne=function(){return t.oneOverLog2FarDepthFromNearPlusOne},this._uniformMap.uFrameNumber=function(){return t.frameNumber},this._uniformMap.uPixelRatio=function(){return t.pixelRatio},this._uniformMap.uResolutionScale=function(){return t.resolutionScale},this._uniformMap.uGamma=function(){return t.gamma},this._uniformMap.uToneMappingExposure=function(){return t.toneMappingExposure},this._uniformMap.uEnvMapIntensity=function(){return t.envMapIntensity},this._uniformMap.uCameraReflect=function(){return t.cameraReflect},this._uniformMap.uSpecularEnvironmentMapSize=function(){return t.specularEnvironmentMapsDimensions},this._uniformMap.uSpecularEnvironmentMapsMaximumLOD=function(){return t.specularEnvironmentMapsMaximumLOD},this._uniformMap.uSphericalHarmonicCoefficients=function(){return t.sphericalHarmonicCoefficients}}},_0x3a935d.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),this._setTextureToEffect(e,this._brdfLutTexture,_0x1f25ac),this._setTextureToEffect(e,this._specularEnvironmentMaps,_0x3efd46),this._setTextureToEffect(e,this._environmentMap,_0x172984),this._setTextureToEffect(e,this._hdrEnvMap,_0x4fda9d)},_0x3a935d.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x3a935d.prototype.isDestroyed=function(){return!1},_0x3a935d.prototype.destroy=function(){return this._ubo.dispose(),destroyObject(this)},Object.defineProperties(P$l.prototype,{eyeHeight:{get:function(){return this._eyeHeight}},toneMappingExposure:{get:function(){return this._toneMappingExposure}},envMapIntensity:{get:function(){return this._envMapIntensity}},cameraReflect:{get:function(){return this._cameraReflect}},frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!f$1a.equals(e,this._viewport)){f$1a.clone(e,this._viewport);var t=this._viewport,i=this._viewportCartesian4;i.x=t.x,i.y=t.y,i.z=t.width,i.w=t.height,this._viewportDirty=!0,this._mvpViewPortDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return Y$d(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return Y$d(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){p$1d.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0,this._mvpViewPortDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,p$1d.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){var e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,p$1d.getRotation(this.inverseModel,e),p$1e.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return N$f(this),this._view3D}},viewRotation:{get:function(){return N$f(this),this._viewRotation}},viewRotation3D:{get:function(){return N$f(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return G$l(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return G$l(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return si$1(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return li$2(this),this._modelView}},modelView3D:{get:function(){return hi$2(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return pi$3(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return ci$3(this),this._inverseModelView}},inverseModelView3D:{get:function(){return _i$3(this),this._inverseModelView3D}},viewProjection:{get:function(){return ai$1(this),this._viewProjection}},inverseViewProjection:{get:function(){return ui$2(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return di$2(this),this._modelViewProjection}},mvpViewPort:{get:function(){return vi$3(this),this._mvpViewPort}},inverseModelViewProjection:{get:function(){return Di$3(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return wi$3(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return gi$3(this),this._modelViewInfiniteProjection}},normal:{get:function(){return mi$1(this),this._normal}},normal3D:{get:function(){return yi$3(this),this._normal3D}},inverseNormal:{get:function(){return Pi$3(this),this._inverseNormal}},inverseNormal3D:{get:function(){return fi$2(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},sunColor:{get:function(){return this._sunColor}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return k$j(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return k$j(this),this._encodedCameraPositionMC.low}},encodedOriginCameraPositionMCHigh:{get:function(){return q$h(this),this._encodedOriginCameraPositionMC.high}},encodedOriginCameraPositionMCLow:{get:function(){return q$h(this),this._encodedOriginCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},resolutionScale:{get:function(){return this._resolutionScale}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsDimensions:{get:function(){return this._specularEnvironmentMapsDimensions}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},imagerySplitPosition:{get:function(){return this._imagerySplitPosition}},globeSplitPosition:{get:function(){return this._globeSplitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},globeDepthTextureDim:{get:function(){return this._globeDepthTextureDim}},sceneUBO:{get:function(){return this._sceneUBO}},relativeOrigin:{get:function(){return this._relativeOrigin}},hdrEnvMap:{get:function(){return this._hdrEnvMap}}});var j$k=new p$1e,ti$1=new a$18;function ni$1(e,t){e$2e(m$19.computeIcrfToFixedMatrix(t.time,j$k))||(j$k=m$19.computeTemeToPseudoFixedMatrix(t.time,j$k));var i=F$G.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);p$1e.multiplyByVector(j$k,i,i),o$1p.normalize(i,e._sunDirectionWC),i=p$1e.multiplyByVector(e.viewRotation3D,i,e._sunDirectionEC),o$1p.normalize(i,i),i=F$G.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),p$1e.multiplyByVector(j$k,i,i),p$1e.multiplyByVector(e.viewRotation3D,i,i),o$1p.normalize(i,i);var n=t.mapProjection,r=n.ellipsoid.cartesianToCartographic(e._sunPositionWC,ti$1);n.project(r,e._sunPositionColumbusView)}new o$1p;var V$i=new p$1d,M$m=new p$1d,A$r=new o$1p;P$l.prototype.updateCamera=function(e,t){var i=e.positionCartographic.height,n=e.positionWC,r=o$1p.distance(n,t.relativeOrigin),o=e$2e(this._frameState)&&this._frameState._fboState.enabled;t.enableRelativeOrigin&&!o&&i<1e4&&r>2e4&&(t.relativeOrigin=n),o$1p.clone(t.relativeOrigin,this._relativeOrigin),o$1p.subtract(n,t.relativeOrigin,A$r),p$1d.clone(e.inverseViewMatrix,M$m),p$1d.setTranslation(M$m,A$r,M$m),p$1d.inverse(M$m,V$i),e.bReflect&&(p$1d.multiply(V$i,e._reflectMatrix,V$i),p$1d.inverse(V$i,M$m),e.frustum.currentViewMatrix=p$1d.clone(V$i,e.frustum.currentViewMatrix)),Q$g(this,V$i),X$d(this,M$m),ei$1(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==C$14.SCENE2D&&e.frustum instanceof a$V,this._sceneUBO.update(t,this)},P$l.prototype.updateFrustum=function(e){S$k(this,e.projectionMatrix),e$2e(e.infiniteProjectionMatrix)&&ii$1(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=e$2d.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne,e$2e(e._offCenterFrustum)&&(e=e._offCenterFrustum),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right,e$2e(this._frameState)&&this._sceneUBO.update(this._frameState.context,this)},P$l.prototype.updatePass=function(e){this._pass=e};var U$j=new o$1p;P$l.prototype.updateLightSource=function(e){if(e$2e(e)){var t=e.pointLight.values,i=e.spotLight.values,n=e.directionalLight.values,r=e.hemisphereLight.values,o=e._visibleLightList[_0x4970c2.POINT],a=e._visibleLightList[_0x4970c2.SPOT];o.removeAll(),a.removeAll();var s,l,u,c,h,d=[];for(s=0,l=t.length;s<l;s++){(c=t[s]).sceneMode=this._frameState.mode;var f=o$1p.subtract(c.position,this._relativeOrigin,U$j);p$1d.multiplyByPoint(this._view,f,c._positionEC),(h=o$1p.distance(this._frameState.camera.positionWC,c.position))<e.visibleDistanceMax&&d.push([h,c])}for(d.length>e._visibleCountAllowed&&(d.sort((function(e,t){return e[0]-t[0]})),d=d.slice(0,e._visibleCountAllowed)),u=0;u<d.length;u++)c=d[u][1],o.set(c.id,c);for(d=[],s=0,l=i.length;s<l;s++){(c=i[s]).sceneMode=this._frameState.mode;f=o$1p.subtract(c.position,this._relativeOrigin,U$j);p$1d.multiplyByPoint(this._view,f,c._positionEC),p$1e.multiplyByVector(this.viewRotation,c.direction,c._directionEC),o$1p.normalize(c._directionEC,c._directionEC),h=o$1p.distance(this._frameState.camera.positionWC,c.position),c.computeVisiblityInCullingVolume(this._frameState.cullingVolume)&&h<e.visibleDistanceMax&&d.push([h,c])}for(d.length>e._visibleCountAllowed&&(d.sort((function(e,t){return e[0]-t[0]})),d=d.slice(0,e._visibleCountAllowed)),u=0;u<d.length;u++)c=d[u][1],a.set(c.id,c);for(s=0,l=n.length;s<l;s++)(c=n[s]).sceneMode=this._frameState.mode,p$1e.multiplyByVector(this.viewRotation,c.direction,c._directionEC),o$1p.normalize(c._directionEC,c._directionEC);o.length!==e._visiblePointLightCount&&(e._changedLightList.set(_0x4970c2.POINT,{count:o.length,type:_0x4970c2.POINT}),e._visiblePointLightCount=o.length),a.length!==e._visibleSpotLightCount&&(e._changedLightList.set(_0x4970c2.SPOT,{count:a.length,type:_0x4970c2.SPOT}),e._visibleSpotLightCount=a.length),n.length!==e._visibleDirectionalLightCount&&(e._changedLightList.set(_0x4970c2.DIRECTIONAL,{count:n.length,type:_0x4970c2.DIRECTIONAL}),e._visibleDirectionalLightCount=n.length),r.length!==e._visibleHemisphereLightCount&&(e._changedLightList.set(_0x4970c2.HEMISPHERE,{count:r.length,type:_0x4970c2.HEMISPHERE}),e._visibleHemisphereLightCount=r.length),e.combineUniformValue()}};var oi$1=[],ri$1=new i$k;function Y$d(e){if(e._viewportDirty){var t=e._viewport;p$1d.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),p$1d.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1,e._mvpViewPortDirty=!0}}function si$1(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode===C$14.SCENE2D||e._mode===C$14.MORPHING||e._orthographicIn3D?p$1d.clone(p$1d.ZERO,e._inverseProjection):p$1d.inverse(e._projection,e._inverseProjection))}P$l.prototype.update=function(e){this._frameState=e,this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,e.context._canvas,this._resolutionScale=e.pixelRatio,this._pixelRatio=e.pixelRatio;var t=e.camera;this.updateCamera(t,e.context),e.mode===C$14.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=.5*this._frustum2DWidth,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),ni$1(this,e);var i=u$Z(e.light,ri$1);i instanceof i$k?(this._lightDirectionWC=o$1p.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=o$1p.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=o$1p.normalize(o$1p.negate(i.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=p$1e.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));var n=i.color,r=o$1p.fromElements(n.red,n.green,n.blue,this._lightColorHdr);r=o$1p.multiplyByScalar(r,i.intensity,r);var o=o$1p.maximumComponent(r);o>1?o$1p.divideByScalar(r,o,this._lightColor):o$1p.clone(r,this._lightColor),this._sunColor=o$1p.clone(e.sunColor,this._sunColor);var a=e.brdfLutGenerator;e$2e(a)&&a.update(e);var s=e$2e(a)?a.colorTexture:void 0;this._brdfLut=s,this._environmentMap=u$Z(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=u$Z(e.sphericalHarmonicCoefficients,oi$1),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,this._hdrEnvMap=e.hdrEnvMap,this._toneMappingExposure=e.toneMappingExposure,this._envMapIntensity=e.envMapIntensity,this._cameraReflect=e.camera.bReflect?-1:1,e$2e(this._specularEnvironmentMaps)&&o$1o.clone(this._specularEnvironmentMaps.dimensions,this._specularEnvironmentMapsDimensions),this._fogDensity=e.fog.density,this._invertClassificationColor=e.invertClassificationColor,this._temeToPseudoFixed=m$19.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._imagerySplitPosition.x=e.imagerySplitPosition.x*e.context.drawingBufferWidth,this._imagerySplitPosition.y=e.imagerySplitPosition.y*e.context.drawingBufferHeight,this._globeSplitPosition.x=e.globeSplitPosition.x*e.context.drawingBufferWidth,this._globeSplitPosition.y=e.globeSplitPosition.y*e.context.drawingBufferHeight;var l,u=t.frustum.fov,c=this._viewport;l=c.height>c.width?2*Math.tan(.5*u)/c.height:2*Math.tan(.5*u)/c.width,this._geometricToleranceOverMeter=l*e.maximumScreenSpaceError,e$1X.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1),this.updateLightSource(e.lightSource),e$2e(this.globeDepthTexture)&&(this._globeDepthTextureDim.x=this.globeDepthTexture.width,this._globeDepthTextureDim.y=this.globeDepthTexture.height),this._sceneUBO.update(e.context,this),this._lightUBO.update(e)};var E$n=new o$1p;function li$2(e){if(e._modelViewDirty){e._modelViewDirty=!1;var t=p$1d.getTranslation(e._model,E$n);e.useRelativeOrigin&&!o$1p.equals(t,o$1p.ZERO)&&(o$1p.subtract(t,e._relativeOrigin,E$n),p$1d.setTranslation(e._model,E$n,e._model)),p$1d.multiplyTransformation(e._view,e._model,e._modelView)}}function hi$2(e){if(e._modelView3DDirty){e._modelView3DDirty=!1;var t=p$1d.getTranslation(e._model,E$n);e.useRelativeOrigin&&!o$1p.equals(t,o$1p.ZERO)&&(o$1p.subtract(t,e._relativeOrigin,E$n),p$1d.setTranslation(e._model,E$n,e._model)),p$1d.multiplyTransformation(e.view3D,e._model,e._modelView3D)}}function ci$3(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,p$1d.inverse(e.modelView,e._inverseModelView))}function _i$3(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,p$1d.inverse(e.modelView3D,e._inverseModelView3D))}function ai$1(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,p$1d.multiply(e._projection,e._view,e._viewProjection))}function ui$2(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,p$1d.inverse(e.viewProjection,e._inverseViewProjection))}function di$2(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,p$1d.multiply(e._projection,e.modelView,e._modelViewProjection),e._mvpViewPortDirty=!0)}function vi$3(e){e._mvpViewPortDirty&&(p$1d.multiply(e.viewportTransformation,e.modelViewProjection,e._mvpViewPort),e._mvpViewPortDirty=!1)}function pi$3(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;var t=e.modelView,i=e._modelViewRelativeToEye;i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=0,i[13]=0,i[14]=0,i[15]=t[15]}}function Di$3(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,p$1d.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function wi$3(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,p$1d.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function gi$3(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,p$1d.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function mi$1(e){if(e._normalDirty){e._normalDirty=!1;var t=e._normal;p$1d.getRotation(e.inverseModelView,t),p$1e.transpose(t,t)}}function yi$3(e){if(e._normal3DDirty){e._normal3DDirty=!1;var t=e._normal3D;p$1d.getRotation(e.inverseModelView3D,t),p$1e.transpose(t,t)}}function Pi$3(e){e._inverseNormalDirty&&(e._inverseNormalDirty=!1,p$1d.getRotation(e.inverseModelView,e._inverseNormal))}function fi$2(e){e._inverseNormal3DDirty&&(e._inverseNormal3DDirty=!1,p$1d.getRotation(e.inverseModelView3D,e._inverseNormal3D))}var O$h=new o$1p;function k$j(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,p$1d.multiplyByPoint(e.inverseModel,e._cameraPosition,O$h),i$12.fromCartesian(O$h,e._encodedCameraPositionMC))}function q$h(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,p$1d.multiplyByPoint(e.inverseModel,e._cameraPosition,O$h),i$12.fromCartesian(O$h,e._encodedOriginCameraPositionMC))}new o$1p;var Ci$3=new o$1p,Vi$3=new o$1p,Mi$3=new o$1p,Ei$3=new o$1p,Ti$3=new a$18,ji$2=new o$1p,xi$3=new p$1d;function bi$3(e,t,i,n,r,o,a,s){var l=Ci$3;l.x=e.y,l.y=e.z,l.z=e.x;var u=Vi$3;u.x=i.y,u.y=i.z,u.z=i.x;var c=Mi$3;c.x=n.y,c.y=n.z,c.z=n.x;var h=Ei$3;h.x=t.y,h.y=t.z,h.z=t.x,o===C$14.SCENE2D&&(l.z=.5*r);var d=a.unproject(l,Ti$3);d.longitude=e$2d.clamp(d.longitude,-Math.PI,Math.PI),d.latitude=e$2d.clamp(d.latitude,-e$2d.PI_OVER_TWO,e$2d.PI_OVER_TWO);var f=a.ellipsoid,p=f.cartographicToCartesian(d,ji$2),_=m$19.eastNorthUpToFixedFrame(p,f,xi$3);return p$1d.multiplyByPointAsVector(_,u,u),p$1d.multiplyByPointAsVector(_,c,c),p$1d.multiplyByPointAsVector(_,h,h),e$2e(s)||(s=new p$1d),s[0]=u.x,s[1]=c.x,s[2]=-h.x,s[3]=0,s[4]=u.y,s[5]=c.y,s[6]=-h.y,s[7]=0,s[8]=u.z,s[9]=c.z,s[10]=-h.z,s[11]=0,s[12]=-o$1p.dot(u,p),s[13]=-o$1p.dot(c,p),s[14]=o$1p.dot(h,p),s[15]=1,s}function N$f(e){e._view3DDirty&&(e._mode===C$14.SCENE3D?p$1d.clone(e._view,e._view3D):bi$3(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),p$1d.getRotation(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function G$l(e){e._inverseView3DDirty&&(p$1d.inverseTransformation(e.view3D,e._inverseView3D),p$1d.getRotation(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}function i$j(e){if(this._renderTexture=new s$M(e),this._renderTexture._generateMipmap=!0,this._context=e,this.waterNormalMapUrl=n$17("Assets/Textures/waterNormalsSmall.jpg"),this._waterNormalMapUrl=void 0,this._waterNormalMap=void 0,this._reflectPlane=new o$1m(o$1p.UNIT_Z,6378137),this._isUpdate=!0,this._distinctQuality=5,this._environmentVisible={isSunVisible:!0,isMoonVisible:!0,isSkyAtmosphereVisible:!0,isSkyBoxVisible:!0,isGlobalVisible:!1,isObjectVisible:!0},this.waterNormalMapUrl!==this._waterNormalMapUrl){var t=this.waterNormalMapUrl;if(this._waterNormalMapUrl=t,e$2e(t)){var i=this;o$1l(t$S(t),(function(n){if(t===i.waterNormalMapUrl){var r=new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.LINEAR_MIPMAP_LINEAR,magnificationFilter:rt$k.LINEAR});i._waterNormalMap=i._waterNormalMap&&i._waterNormalMap.destroy(),i._waterNormalMap=new t$U({context:e,source:n,sampler:r}),i._waterNormalMap.generateMipmap()}}))}else this._waterNormalMap=this._waterNormalMap&&this._waterNormalMap.destroy()}}function s$h(e){this._renderTexture=new s$M(e),this._renderTexture._pixelDatatype=_$_.UNSIGNED_BYTE,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0}}function t$f(e){this._renderTexture=new s$M(e),this._renderTexture._pixelDatatype=_$_.FLOAT,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0}}function t$e(e){this._renderTexture=new s$M(e),this._renderTexture._passState.blendingEnabled=!1,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0}}Object.defineProperties(i$j.prototype,{distinctQuality:{set:function(e){this._distinctQuality=e},get:function(){return this._distinctQuality}},renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return Qe$c.REFLECT}}}),i$j.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=e.camera,n=t.drawingBufferWidth,r=t.drawingBufferHeight,o=this._reflectPlane;return this._renderTexture._passState.viewport.width=n,this._renderTexture._passState.viewport.height=r,i.enableReflection(o),this._oriUseLogDepth=e.useLogDepth,e.useLogDepth=!1,this._renderTexture._passState},i$j.prototype.end=function(e){(e.camera.disableReflection(),e.useLogDepth=this._oriUseLogDepth,this._context.webgl2)&&this._renderTexture._fb.getColorTexture(0).generateMipmap()},i$j.prototype.update=function(e,t){},i$j.prototype.isDestroyed=function(){return!1},i$j.prototype.destroy=function(){return this._waterNormalMap=this._waterNormalMap&&this._waterNormalMap.destroy(),this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)},Object.defineProperties(s$h.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 8},set:function(e){}},frameBufferType:{get:function(){return Qe$c.NORMAL_AND_DEPTH}}}),s$h.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},s$h.prototype.end=function(e){var t=this._context.readPixels({x:e.x,y:e.y,width:e.width,height:e.height,framebuffer:this._renderTexture._fb}),i=new e$2c(t[0]/255,t[1]/255,t[2]/255,t[3]/255);if(0!==i.w){var n=o$1p.divideByScalar(i,i.w,new o$1p);return o$1p.subtract(o$1p.multiplyByScalar(n,2,new o$1p),new o$1p(1,1,1),n),o$1p.normalize(n,n),n}},s$h.prototype.endAsync=function(e){return this._context.readPixelsAsync({x:e.x,y:e.y,width:e.width,height:e.height,framebuffer:this._renderTexture._fb}).then((e=>{var t=new e$2c(e[0]/255,e[1]/255,e[2]/255,e[3]/255);if(0===t.w)return Promise.resolve(void 0);var i=o$1p.divideByScalar(t,t.w,new o$1p);return o$1p.subtract(o$1p.multiplyByScalar(i,2,new o$1p),new o$1p(1,1,1),i),o$1p.normalize(i,i),Promise.resolve(i)})).catch((e=>(console.log("Context.readPixels failed."),Promise.resolve(void 0))))},s$h.prototype.update=function(e,t){},s$h.prototype.isDestroyed=function(){return!1},s$h.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)},Object.defineProperties(t$f.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 16},set:function(e){}},frameBufferType:{get:function(){return Qe$c.POSTEFFECT_FILTER}}}),t$f.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},t$f.prototype.end=function(e){},t$f.prototype.update=function(e,t){},t$f.prototype.isDestroyed=function(){return!1},t$f.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)},Object.defineProperties(t$e.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return Qe$c.PICKRECT}}}),t$e.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this.beginFunc&&this.beginFunc.call(this),this._renderTexture._passState},t$e.prototype.end=function(e){},t$e.prototype.update=function(e,t){},t$e.prototype.isDestroyed=function(){return!1},t$e.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)};var J$c=1073741824;function i$i(e,t){o$1q.defined("canvas",e),this._canvas=e;var i=t&&t.monitorTable||{};this._rows=i.rows||1,this._cols=i.cols||1,this._curRow=i.curRow||0,this._curCol=i.curCol||0;var n=3840,r=1080;e$2e(t)&&(n=u$Z(t.maxDrawingBufferWidth,n),r=u$Z(t.maxDrawingBufferHeight,r)),e.maxWidth=n,e.maxHeight=r,(t=u$Z(t=l$1f(t,!0),{})).allowTextureFilterAnisotropic=u$Z(t.allowTextureFilterAnisotropic,!0),this._id=e$1T(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new h$m(this),this._textureCache=new r$o,this._clearColor=new e$1X(0,0,0,0),this._clearDepth=1,this._clearStencil=0;var o=new P$l,a=new n$$(this),s=d$1m.fromCache();this._defaultPassState=a,this._defaultRenderState=s,this._defaultTexture=void 0,this._defaultCubeMap=void 0,this._defaultTransparentTexture=void 0,this._us=o,this._currentRenderState=s,this._currentPassState=a,this._currentViewport=void 0,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(var l=0;l<e$1W._maximumVertexAttributes;l++)this._vertexAttribDivisors.push(0);this._pickObjects={},this._nextPickColor=new Uint32Array(1),this._pickIdObjects={},this.options=t,this.cache={},this._pickPosition=new Float64Array(3),this._pickPositionHeight=0,this.pixels=new Uint8Array(4),this.shaderPreprocess=!0,this.numNormalAndDepthObject=0,this.numPostEffectFilterObject=0,this.numClampClipPlaneLayer=0,this._sharedEDL=this.createSharedEDLFrameBuffer(),this.memorySize=0,this.memoryThreshold=4,this.currentWarnFrameNumber=-99999,this._relativeOrigin=new o$1p,this._enableRelativeOrigin=!0,this._trangleCount=0,this._quadVpShaderSource=new s$V({name:"ViewportQuadVS",sources:[ot$8]})}var $$f={};Object.defineProperties(i$i.prototype,{id:{get:function(){return this._id}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},defaultTexture:{get:function(){return void 0===this._defaultTexture&&(this._defaultTexture=new t$U({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultTransparentTexture:{get:function(){return void 0===this._defaultTransparentTexture&&(this._defaultTransparentTexture=new t$U({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0,0])},flipY:!1})),this._defaultTransparentTexture}},defaultCubeMap:{get:function(){if(void 0===this._defaultCubeMap){var e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new e$1P({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})}return this._defaultCubeMap}},defaultFramebuffer:{get:function(){return $$f}},memoryThresholdValue:{get:function(){return this.memoryThreshold*J$c}},relativeOrigin:{set:function(e){this._relativeOrigin.x=Math.floor(e.x),this._relativeOrigin.y=Math.floor(e.y),this._relativeOrigin.z=Math.floor(e.z)},get:function(){return this._relativeOrigin}},enableRelativeOrigin:{get:function(){return this._enableRelativeOrigin}}}),typeof WebGLRenderingContext<"u"&&de$y.BACK,i$i.prototype.clear=function(e,t){},i$i.prototype.draw=function(e,t,i,n){},i$i.prototype.endFrame=function(){},i$i.prototype.readPixels=function(e){};const viewportQuadAttributeLocations={aPosition:0,textureCoordinates:1};function d$r(e,t,i){this._pickObjects=e,this.key=t,this.color=i}var h$l,c$g;i$i.prototype.getViewportQuadVertexArray=function(){var e=this.cache.viewportQuad_vertexArray;if(!e$2e(e)){var t=new I$1p({attributes:{aPosition:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:W$18.TRIANGLES});e=c$13.fromGeometry({context:this,geometry:t,attributeLocations:viewportQuadAttributeLocations,bufferUsage:A$18.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e},i$i.prototype.createViewportQuadCommand=function(e,t){var i=this._quadVpShaderSource;return e$2e(t)&&e$2e(t.useWGSL)&&t.useWGSL&&(i=D$i),this.createCustomViewportQuadCommand(i,e,t)},i$i.prototype.createCustomViewportQuadCommand=function(e,t,i){return i=u$Z(i,u$Z.EMPTY_OBJECT),new i$$({vertexArray:this.getViewportQuadVertexArray(),primitiveType:W$18.TRIANGLES,renderState:i.renderState,shaderProgram:r$14.fromCache({name:i.shaderProgramName,useWGSL:i.useWGSL,context:this,vertexShaderSource:e,fragmentShaderSource:t,attributeLocations:viewportQuadAttributeLocations}),uniformMap:i.uniformMap,owner:i.owner,framebuffer:i.framebuffer,pass:i.pass})},i$i.prototype.createReflectFramebuffer=function(){return new i$j(this)},i$i.prototype.createNormalFramebuffer=function(){return new s$h(this)},i$i.prototype.createPostEffectFilterlFramebuffer=function(){return new t$f(this)},i$i.prototype.createClampFramebuffer=function(){return new t$g(this)},i$i.prototype.createClosedDepthFramebuffer=function(){return new a$i(this)},i$i.prototype.createPickRectFramebuffer=function(){return new t$e(this)},i$i.prototype.createSharedEDLFrameBuffer=function(){return new _0x460335},i$i.prototype.getObjectByPickColor=function(e){return o$1q.defined("pickColor",e),this._pickObjects[e.toRgba()]},i$i.prototype.getObjectByPickId=function(e){return o$1q.defined("pickId",e),this._pickObjects[e]},i$i.prototype.getAllPickObjects=function(){return this._pickObjects},i$i.prototype.getPickIdByKey=function(e){return this._pickIdObjects[e]},Object.defineProperties(d$r.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}}),d$r.prototype.destroy=function(){delete this._pickObjects[this.key]},i$i.prototype.createPickId=function(e){o$1q.defined("object",e),++this._nextPickColor[0];var t=this._nextPickColor[0];if(0===t)throw new t$13("Out of unique Pick IDs.");return this._pickObjects[t]=e,new d$r(this._pickObjects,t,e$1X.fromRgba(t))},i$i.prototype.createBillboardPointIndexBuffer=function(){if(!h$l){var e=new Uint16Array(6),t=0;e[t++]=0,e[t++]=1,e[t++]=2,e[t++]=0,e[t++]=2,e[t++]=3,(h$l=t$X.createIndexBuffer({context:this,typedArray:e,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1}return h$l},i$i.prototype.createBillboardOffsetVertexBuffer=function(){if(!c$g){var e=new Float32Array([-.5,-.5,.5,-.5,.5,.5,-.5,.5]);(c$g=t$X.createVertexBuffer({context:this,typedArray:e,usage:A$18.STATIC_DRAW})).vertexArrayDestroyable=!1}return c$g},i$i.prototype.isDestroyed=function(){return!1},i$i.prototype.destroy=function(){var e=this.cache;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];e$2e(i.destroy)&&i.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),this._defaultTransparentTexture=this._defaultTransparentTexture&&this._defaultTransparentTexture.destroy(),i$11(this)};var S$j={NONE:0,BEGIN:1,READING:2},I$o,c$f,tt$6,rt$8,et$7;function C$l(e){this._scene=e,this._startPoint=void 0,this._endPoint=void 0,this._maxHeight=100,this._farDistance=500,this._showBound=!0,this._fbo=void 0,this._readyPromise=o$1l.defer(),this._hintBoundColor=new e$1X(0,1,1,.1),this._hintBoundOutlineColor=new e$1X(1,0,0,1),this._colorCommand=void 0,this._outlineCommand=void 0,this._update=!1,this._name="",this._frameState=void 0,this._visibleViewport=4095,this._buffers=new e$1Q,this._readPixelState=S$j.NONE}function k$i(e){e$2e(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),e$2e(e._outlineCommand)&&(e._outlineCommand.vertexArray=e._outlineCommand.vertexArray&&e._outlineCommand.vertexArray.destroy(),e._outlineCommand.shaderProgram=e._outlineCommand.shaderProgram&&e._outlineCommand.shaderProgram.destroy(),e._outlineCommand=void 0)}function pt$4(e){var t=e._scene.camera,i=o$1p.subtract(e._endPoint,e._startPoint,new o$1p),n=o$1p.midpoint(e._startPoint,e._endPoint,new o$1p);o$1p.normalize(i,i);var r=o$1p.normalize(n,new o$1p),o=o$1p.cross(r,i,new o$1p);o$1p.normalize(o,o),o$1p.cross(i,o,r),o$1p.normalize(r,r);var a=o$1p.multiplyByScalar(r,e._maxHeight/2,new o$1p),s=new o$1p;o$1p.clone(n,s),o$1p.add(s,a,s);var l=o$1p.distance(e._endPoint,e._startPoint),u=1,c=0;e._readPixelState=S$j.NONE;var h=e._maxHeight;l*e._scene.context.drawingBufferHeight/e._scene.context.drawingBufferWidth<e._maxHeight&&(h=l*e._scene.context.drawingBufferHeight/e._scene.context.drawingBufferWidth,u=Math.ceil(e._maxHeight/h)),e$2e(e._fbo)||(e._fbo=new t$E(e._scene.context),e._fbo.environmentVisible.isObjectVisible=!0,e._fbo.environmentVisible.isOnlyS3MObjectVisible=!0,e._fbo._useHeight=!1,e._scene.frameState._framebufferList[e._name]=e._fbo,e._frameState=e._scene._frameState),e._buffers.removeAll(),e._fbo._isUpdate=!0,e._fbo._beginFunc=function(i){if(e._readPixelState!==S$j.READING){e._readPixelState=S$j.BEGIN,e._readyPromise=o$1l.defer(),I$o=o$1p.clone(t.position),c$f=o$1p.clone(t.direction),tt$6=o$1p.clone(t.up),rt$8=t.frustum.clone(new o$15),et$7=i.useLogDepth,i.useLogDepth=!1,o$1p.clone(n,s),a=o$1p.multiplyByScalar(r,h/2+h*c,new o$1p),o$1p.add(s,a,s),t.setView({destination:s,orientation:{direction:o,up:r}});var l=new a$V,u=o$1p.distance(e._endPoint,e._startPoint);l.width=u,l.near=.01,l.far=e._farDistance,l.aspectRatio=i.context.drawingBufferWidth/i.context.drawingBufferHeight,t.frustum=l,i.context.uniformState.updateFrustum(l)}},e._fbo._endFunc=function(i){if(e._readPixelState!==S$j.READING){t.frustum=rt$8,t.setView({destination:I$o,orientation:{direction:c$f,up:tt$6}}),i.context.uniformState.updateFrustum(t.frustum),i.useLogDepth=et$7;var n=e._scene._context;n.readPixelsAsync({x:0,y:0,width:n.drawingBufferWidth,height:n.drawingBufferHeight,framebuffer:e._fbo._renderTexture._fb}).then((t=>{if(e._readPixelState=S$j.NONE,e._buffers.set(c,t),c++,0==--u){for(var r=new Uint8Array(t.length*e._buffers.length),o=0;o<e._buffers.length;o++)r.set(e._buffers.get(o),t.length*o);var a=document.createElement("canvas");a.height=n.drawingBufferHeight*e._buffers.length,a.width=n.drawingBufferWidth;var s=a.getContext("2d"),l=s.createImageData(a.width,a.height);l.data.set(r),s.putImageData(l,0,0);for(var d=o$1p.distance(e._endPoint,e._startPoint)/e._maxHeight,f=i.context.drawingBufferWidth/d,p=s.getImageData(0,0,a.width,a.height),_=e._maxHeight/h-Math.floor(e._maxHeight/h),m=(1-_)*p.height/e._buffers.length,g=0;g<p.height/2;++g)for(var x=0;x<p.width;++x){var y=4*g*p.width+4*x,v=4*(p.height-g)*p.width+4*x,$=p.data[y],b=p.data[y+1],T=p.data[y+2],C=p.data[y+3];p.data[y]=p.data[v],p.data[y+1]=p.data[v+1],p.data[y+2]=p.data[v+2],p.data[y+3]=p.data[v+3],p.data[v]=$,p.data[v+1]=b,p.data[v+2]=T,p.data[v+3]=C,1===e._buffers.length&&g<p.height/2-f/2&&(p.data[y]=0,p.data[y+1]=0,p.data[y+2]=0,p.data[y+3]=0),e._buffers.length>1&&_>0&&g<m&&(p.data[y]=0,p.data[y+1]=0,p.data[y+2]=0,p.data[y+3]=0)}s.clearRect(0,0,p.width,p.height),s.putImageData(p,0,0);var S=a.toDataURL();e._readyPromise.resolve(S),e._fbo._isUpdate=!1}})),e._readPixelState=S$j.READING}}}function ft$3(e){if(e._showBound){var t=e._scene._context,i=o$1p.subtract(e._endPoint,e._startPoint,new o$1p),n=o$1p.midpoint(e._startPoint,e._endPoint,new o$1p);o$1p.normalize(i,i);var r=o$1p.normalize(n,new o$1p),o=o$1p.multiplyByScalar(r,e._maxHeight,new o$1p),a=o$1p.cross(r,i,new o$1p);o$1p.normalize(a,a);var s=o$1p.multiplyByScalar(a,e._farDistance,new o$1p),l=new o$1p;o$1p.add(e._startPoint,s,l);var u=new o$1p;o$1p.add(e._endPoint,s,u);var c=new o$1p;o$1p.add(e._startPoint,o,c);var h=new o$1p;o$1p.add(e._endPoint,o,h);var d=new o$1p;o$1p.add(u,o,d);var f=new o$1p;o$1p.add(l,o,f);var p=m$19.eastNorthUpToFixedFrame(e._startPoint),_=p$1d.inverse(p,new p$1d);e._colorCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:p,pass:Le$q.OPAQUE,owner:e});for(var m=[e._startPoint,e._endPoint,u,l,c,h,d,f],g=S$14.createTypedArray(S$14.FLOAT,24),x=0;x<m.length;x++){var y=p$1d.multiplyByPoint(_,m[x],new o$1p);g[3*x]=y.x,g[3*x+1]=y.y,g[3*x+2]=y.z}var v=t$X.createVertexBuffer({context:t,typedArray:g,usage:A$18.STATIC_DRAW}),$=new s$V({name:"FacadeVp",sources:["attribute vec4 aPosition;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n"]}),b=new s$V({name:"FacadeFp",sources:["uniform vec4 uColor;\nvoid main(){\n gl_FragColor = uColor;\n}\n"]}),T=r$14.fromCache({context:t,vertexShaderSource:$,fragmentShaderSource:b,attributeLocations:{aPosition:0}}),C=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),S=[];S.push({name:"aPosition",index:0,vertexBuffer:v,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var w=S$14.createTypedArray(S$14.UNSIGNED_SHORT,36);w[0]=0,w[1]=1,w[2]=2,w[3]=0,w[4]=2,w[5]=3,w[6]=4,w[7]=5,w[8]=6,w[9]=4,w[10]=6,w[11]=7,w[12]=0,w[13]=1,w[14]=5,w[15]=0,w[16]=5,w[17]=4,w[18]=3,w[19]=2,w[20]=6,w[21]=3,w[22]=6,w[23]=7,w[24]=3,w[25]=0,w[26]=4,w[27]=3,w[28]=4,w[29]=7,w[30]=1,w[31]=2,w[32]=6,w[33]=1,w[34]=6,w[35]=5;var E=S$14.createTypedArray(S$14.UNSIGNED_SHORT,24);E[0]=0,E[1]=1,E[2]=1,E[3]=2,E[4]=2,E[5]=3,E[6]=3,E[7]=0,E[8]=4,E[9]=5,E[10]=5,E[11]=6,E[12]=6,E[13]=7,E[14]=7,E[15]=4,E[16]=0,E[17]=4,E[18]=1,E[19]=5,E[20]=2,E[21]=6,E[22]=3,E[23]=7;var P=new c$13({context:t,attributes:S,indexBuffer:t$X.createIndexBuffer({context:t,typedArray:w,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})});e._colorCommand.vertexArray=P,e._colorCommand.shaderProgram=T,e._colorCommand.renderState=C,e._colorCommand.uniformMap={uColor:function(){return e._hintBoundColor}},e._outlineCommand=new i$$({primitiveType:W$18.LINES,modelMatrix:p,pass:Le$q.OPAQUE,owner:e}),e._outlineCommand.shaderProgram=T;var A=new c$13({context:t,attributes:S,indexBuffer:t$X.createIndexBuffer({context:t,typedArray:E,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})});e._outlineCommand.vertexArray=A,e._outlineCommand.renderState=C,e._outlineCommand.uniformMap={uColor:function(){return e._hintBoundOutlineColor}}}}function f$m(e){const t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context,i=e.width,n=e.height;o$1q.defined("options.context",t),o$1q.defined("options.width",i),o$1q.defined("options.height",n),this._width=i,this._height=n;const r=e.colorRenderbuffers,o=e.colorTextures;if(e$2e(r)!==e$2e(o))throw new t$15("Both color renderbuffer and texture attachments must be provided.");const a=e.depthStencilRenderbuffer,s=e.depthStencilTexture;if(e$2e(a)!==e$2e(s))throw new t$15("Both depth-stencil renderbuffer and texture attachments must be provided.");this._renderFramebuffer=new t$V({context:t,colorRenderbuffers:r,depthStencilRenderbuffer:a,destroyAttachments:e.destroyAttachments}),this._colorFramebuffer=new t$V({context:t,colorTextures:o,depthStencilTexture:s,destroyAttachments:e.destroyAttachments})}function s$g(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),this._numSamples=u$Z(e.numSamples,1),this._colorAttachmentsLength=u$Z(e.colorAttachmentsLength,1),this._color=u$Z(e.color,!0),this._depth=u$Z(e.depth,!1),this._depthStencil=u$Z(e.depthStencil,!1),this._supportsDepthTexture=u$Z(e.supportsDepthTexture,!1),!this._color&&!this._depth&&!this._depthStencil)throw new t$15("Must enable at least one type of framebuffer attachment.");if(this._depth&&this._depthStencil)throw new t$15("Cannot have both a depth and depth-stencil attachment.");this._createColorAttachments=u$Z(e.createColorAttachments,!0),this._createDepthAttachments=u$Z(e.createDepthAttachments,!0),this._pixelDatatype=e.pixelDatatype,this._pixelFormat=e.pixelFormat,this._width=void 0,this._height=void 0,this._framebuffer=void 0,this._multisampleFramebuffer=void 0,this._colorTextures=void 0,this._color&&(this._colorTextures=new Array(this._colorAttachmentsLength),this._colorRenderbuffers=new Array(this._colorAttachmentsLength)),this._colorRenderbuffer=void 0,this._depthStencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthRenderbuffer=void 0,this._depthTexture=void 0,this._attachmentsDirty=!1}function d$q(e,t){if(o$1q.defined("context",e),!(e$2e(t)&&e$2e(t.positiveX)&&e$2e(t.negativeX)&&e$2e(t.positiveY)&&e$2e(t.negativeY)&&e$2e(t.positiveZ)&&e$2e(t.negativeZ)))throw new t$15("urls is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");var i=[t$10.createIfNeeded(t.positiveX).fetchImage(),t$10.createIfNeeded(t.negativeX).fetchImage(),t$10.createIfNeeded(t.positiveY).fetchImage(),t$10.createIfNeeded(t.negativeY).fetchImage(),t$10.createIfNeeded(t.positiveZ).fetchImage(),t$10.createIfNeeded(t.negativeZ).fetchImage()];return o$1l.all(i,(function(t){return new e$1P({context:e,source:{positiveX:t[0],negativeX:t[1],positiveY:t[2],negativeY:t[3],positiveZ:t[4],negativeZ:t[5]}})}))}Object.defineProperties(C$l.prototype,{readyPromise:{get:function(){return this._readyPromise}},farDistance:{get:function(){return this._farDistance},set:function(e){this._farDistance=e,this._update=!0}},maxHeight:{get:function(){return this._maxHeight},set:function(e){this._maxHeight=e,this._update=!0}},startPoint:{get:function(){return this._startPoint},set:function(e){this._startPoint=e,this._update=!0}},endPoint:{get:function(){return this._endPoint},set:function(e){this._endPoint=e,this._update=!0}}}),C$l.prototype.clear=function(){this._startPoint=void 0,this._endPoint=void 0,k$i(this)},C$l.prototype.setVisibleInViewport=function(e){if(e>8)throw new DeveloperError("the index is 0~8");this._visibleViewport=1<<e},C$l.prototype.getVisibleInViewport=function(e){if(e>8)throw new DeveloperError("the index is 0~8");return 1<<e&this._visibleViewport},C$l.prototype.destroy=function(){return this.clear(),e$2e(this._frameState)&&(e$2e(this._fbo)&&delete this._frameState._framebufferList[this._name],this._frameState=void 0),this._fbo=this._fbo&&this._fbo.destroy(),this._scene._analyst3D.remove(this._name,!0),i$11(this)},C$l.prototype.update=function(e,t,i){!e$2e(this._startPoint)||!e$2e(this._endPoint)||(this._update&&(k$i(this),pt$4(this),ft$3(this),this._update=!1),this._showBound&&e$2e(this._colorCommand)&&e$2e(this._outlineCommand)&&!t.passes.pick&&(i.push(this._colorCommand),i.push(this._outlineCommand)))},C$l.prototype.setBoundByPoints=function(e,t){this._startPoint=e,this._endPoint=t,this._update=!0},C$l.prototype.build=function(){""===this._name&&(this._name="facade"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},f$m.prototype.getRenderFramebuffer=function(){return this._renderFramebuffer},f$m.prototype.getColorFramebuffer=function(){return this._colorFramebuffer},f$m.prototype.blitFramebuffers=function(e,t){this._renderFramebuffer.bindRead(),this._colorFramebuffer.bindDraw();const i=e._gl;let n=0;this._colorFramebuffer._colorTextures.length>0&&(n|=i.COLOR_BUFFER_BIT),e$2e(this._colorFramebuffer.depthStencilTexture)&&(n|=i.DEPTH_BUFFER_BIT|(t?i.STENCIL_BUFFER_BIT:0)),i.blitFramebuffer(0,0,this._width,this._height,0,0,this._width,this._height,n,i.NEAREST),i.bindFramebuffer(i.READ_FRAMEBUFFER,null),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,null)},f$m.prototype.isDestroyed=function(){return!1},f$m.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),i$11(this)},Object.defineProperties(s$g.prototype,{framebuffer:{get:function(){return this._numSamples>1?this._multisampleFramebuffer.getRenderFramebuffer():this._framebuffer}},numSamples:{get:function(){return this._numSamples}},status:{get:function(){return this.framebuffer.status}}}),s$g.prototype.isDirty=function(e,t,i,n,r){i=u$Z(i,1);const o=this._width!==e||this._height!==t,a=this._numSamples!==i,s=e$2e(n)&&this._pixelDatatype!==n||e$2e(r)&&this._pixelFormat!==r,l=e$2e(1===i?this._framebuffer:this._multisampleFramebuffer);return this._attachmentsDirty||o||a||s||!l||this._color&&!e$2e(this._colorTextures[0])},s$g.prototype.update=function(e,t,i,n,r,o){if(!e$2e(t)||!e$2e(i))throw new t$15("width and height must be defined.");if(n=e.msaa?u$Z(n,1):1,r=u$Z(r,this._color?u$Z(this._pixelDatatype,_$_.UNSIGNED_BYTE):void 0),o=u$Z(o,this._color?u$Z(this._pixelFormat,V$12.RGBA):void 0),this.isDirty(t,i,n,r,o)){if(this.destroy(),this._width=t,this._height=i,this._numSamples=n,this._pixelDatatype=r,this._pixelFormat=o,this._attachmentsDirty=!1,this._color&&this._createColorAttachments)for(let n=0;n<this._colorAttachmentsLength;++n)if(this._colorTextures[n]=new t$U({context:e,width:t,height:i,pixelFormat:o,pixelDatatype:r,sampler:e$1S.NEAREST}),this._numSamples>1){const o=M$13.getColorFormat(r);this._colorRenderbuffers[n]=new r$10({context:e,width:t,height:i,format:o,numSamples:this._numSamples})}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new t$U({context:e,width:t,height:i,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8,sampler:e$1S.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new r$10({context:e,width:t,height:i,format:M$13.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new r$10({context:e,width:t,height:i,format:M$13.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new t$U({context:e,width:t,height:i,pixelFormat:V$12.DEPTH_COMPONENT,pixelDatatype:_$_.UNSIGNED_INT,sampler:e$1S.NEAREST}):this._depthRenderbuffer=new r$10({context:e,width:t,height:i,format:M$13.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new f$m({context:e,width:this._width,height:this._height,colorTextures:this._colorTextures,colorRenderbuffers:this._colorRenderbuffers,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}):this._framebuffer=new t$V({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}},s$g.prototype.getColorTexture=function(e){if((e=u$Z(e,0))>=this._colorAttachmentsLength)throw new t$15("index must be smaller than total number of color attachments.");return this._colorTextures[e]},s$g.prototype.setColorTexture=function(e,t){if(t=u$Z(t,0),this._createColorAttachments)throw new t$15("createColorAttachments must be false if setColorTexture is called.");if(t>=this._colorAttachmentsLength)throw new t$15("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e},s$g.prototype.getColorRenderbuffer=function(e){if((e=u$Z(e,0))>=this._colorAttachmentsLength)throw new t$15("index must be smaller than total number of color attachments.");return this._colorRenderbuffers[e]},s$g.prototype.setColorRenderbuffer=function(e,t){if(t=u$Z(t,0),this._createColorAttachments)throw new t$15("createColorAttachments must be false if setColorRenderbuffer is called.");if(t>=this._colorAttachmentsLength)throw new t$15("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e},s$g.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer},s$g.prototype.setDepthRenderbuffer=function(e){if(this._createDepthAttachments)throw new t$15("createDepthAttachments must be false if setDepthRenderbuffer is called.");this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e},s$g.prototype.getDepthTexture=function(){return this._depthTexture},s$g.prototype.setDepthTexture=function(e){if(this._createDepthAttachments)throw new t$15("createDepthAttachments must be false if setDepthTexture is called.");this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e},s$g.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer},s$g.prototype.setDepthStencilRenderbuffer=function(e){if(this._createDepthAttachments)throw new t$15("createDepthAttachments must be false if setDepthStencilRenderbuffer is called.");this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e},s$g.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture},s$g.prototype.setDepthStencilTexture=function(e){if(this._createDepthAttachments)throw new t$15("createDepthAttachments must be false if setDepthStencilTexture is called.");this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e},s$g.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)},s$g.prototype.clear=function(e,t,i){const n=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,i),t.framebuffer=n},s$g.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()},s$g.prototype.destroy=function(){if(this._color){let e;const t=this._colorTextures.length;for(e=0;e<t;++e){const t=this._colorTextures[e];this._createColorAttachments&&e$2e(t)&&!t.isDestroyed()&&(this._colorTextures[e].destroy(),this._colorTextures[e]=void 0),e$2e(t)&&t.isDestroyed()&&(this._colorTextures[e]=void 0);const i=this._colorRenderbuffers[e];this._createColorAttachments&&e$2e(i)&&!i.isDestroyed()&&(this._colorRenderbuffers[e].destroy(),this._colorRenderbuffers[e]=void 0),e$2e(i)&&i.isDestroyed()&&(this._colorRenderbuffers[e]=void 0)}}this._depthStencil&&(this._createDepthAttachments&&(this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()),e$2e(this._depthStencilTexture)&&this._depthStencilTexture.isDestroyed()&&(this._depthStencilTexture=void 0),e$2e(this._depthStencilRenderbuffer)&&this._depthStencilRenderbuffer.isDestroyed()&&(this._depthStencilRenderbuffer=void 0)),this._depth&&(this._createDepthAttachments&&(this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy()),e$2e(this._depthTexture)&&this._depthTexture.isDestroyed()&&(this._depthTexture=void 0),e$2e(this._depthRenderbuffer)&&this._depthRenderbuffer.isDestroyed()&&(this._depthRenderbuffer=void 0)),this.destroyFramebuffer()};class U$i{constructor(){}parse(e){const t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},i=function(e,t,i){t=t||1024;let n=e.pos,r=-1,o=0,a="",s=String.fromCharCode.apply(null,new Uint16Array(e.subarray(n,n+128)));for(;0>(r=s.indexOf("\n"))&&o<t&&n<e.byteLength;)a+=s,o+=s.length,n+=128,s+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(n,n+128)));return-1<r&&(!1!==i&&(e.pos+=o+r+1),a+s.slice(0,r))};const n=function(){const e=new ArrayBuffer(4),t=new Float32Array(e),i=new Uint32Array(e),n=new Uint32Array(512),r=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(n[e]=0,n[256|e]=32768,r[e]=24,r[256|e]=24):t<-14?(n[e]=1024>>-t-14,n[256|e]=1024>>-t-14|32768,r[e]=-t-1,r[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,r[e]=13,r[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,r[e]=24,r[256|e]=24):(n[e]=31744,n[256|e]=64512,r[e]=13,r[256|e]=13)}const o=new Uint32Array(2048),a=new Uint32Array(64),s=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,i=0;for(;0==(8388608&t);)t<<=1,i-=8388608;t&=-8388609,i+=947912704,o[e]=t|i}for(let e=1024;e<2048;++e)o[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)a[e]=e<<23;a[31]=1199570944,a[32]=2147483648;for(let e=33;e<63;++e)a[e]=2147483648+(e-32<<23);a[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(s[e]=1024);return{floatView:t,uint32View:i,baseTable:n,shiftTable:r,mantissaTable:o,exponentTable:a,offsetTable:s}}();function r(e){Math.abs(e)>65504&&console.warn("rgbe : toHalfFloat(): Value out of range."),e=function(e,t,i){return Math.max(t,Math.min(i,e))}(e,-65504,65504),n.floatView[0]=e;const t=n.uint32View[0],i=t>>23&511;return n.baseTable[i]+((8388607&t)>>n.shiftTable[i])}const o=function(e,t,i,n){const o=e[t+3],a=Math.pow(2,o-128)/255;i[n+0]=r(Math.min(e[t+0]*a,65504)),i[n+1]=r(Math.min(e[t+1]*a,65504)),i[n+2]=r(Math.min(e[t+2]*a,65504)),i[n+3]=r(1)},a=new Uint8Array(e);a.pos=0;const s=function(e){const n=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,r=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,o=/^\s*FORMAT=(\S+)\s*$/,a=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,s={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let l,u;if(e.pos>=e.byteLength||!(l=i(e)))return t(1,"no header found");if(!(u=l.match(/^#\?(\S+)/)))return t(3,"bad initial token");for(s.valid|=1,s.programtype=u[1],s.string+=l+"\n";l=i(e),!1!==l;)if(s.string+=l+"\n","#"!==l.charAt(0)){if((u=l.match(n))&&(s.gamma=parseFloat(u[1])),(u=l.match(r))&&(s.exposure=parseFloat(u[1])),(u=l.match(o))&&(s.valid|=2,s.format=u[1]),(u=l.match(a))&&(s.valid|=4,s.height=parseInt(u[1],10),s.width=parseInt(u[2],10)),2&s.valid&&4&s.valid)break}else s.comments+=l+"\n";return 2&s.valid?4&s.valid?s:t(3,"missing image size specifier"):t(3,"missing format specifier")}(a);if(-1!==s){const e=s.width,i=s.height,n=function(e,i,n){const r=i;if(r<8||r>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(r!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");const o=new Uint8Array(4*i*n);if(!o.length)return t(4,"unable to allocate buffer space");let a=0,s=0;const l=4*r,u=new Uint8Array(4),c=new Uint8Array(l);let h=n;for(;h>0&&s<e.byteLength;){if(s+4>e.byteLength)return t(1);if(u[0]=e[s++],u[1]=e[s++],u[2]=e[s++],u[3]=e[s++],2!=u[0]||2!=u[1]||(u[2]<<8|u[3])!=r)return t(3,"bad rgbe scanline format");let i,n=0;for(;n<l&&s<e.byteLength;){i=e[s++];const r=i>128;if(r&&(i-=128),0===i||n+i>l)return t(3,"bad scanline data");if(r){const t=e[s++];for(let e=0;e<i;e++)c[n++]=t}else c.set(e.subarray(s,s+i),n),n+=i,s+=i}const d=r;for(let e=0;e<d;e++){let t=0;o[a]=c[e+t],t+=r,o[a+1]=c[e+t],t+=r,o[a+2]=c[e+t],t+=r,o[a+3]=c[e+t],a+=4}h--}return o}(a.subarray(a.pos),e,i);if(-1!==n){let t;const r=n.length/4,a=new Uint16Array(4*r);for(let e=0;e<r;e++)o(n,4*e,a,4*e);return t=a,{width:e,height:i,data:t,header:s.string,gamma:s.gamma,exposure:s.exposure}}}return null}}function b$s(e,t){if(o$1q.defined("context",e),!e$2e(t))throw new t$15("urls is required and must have the url of image.");this._context=e,this._size=0,this._cubeVs=void 0,this._cubeUniformMap=void 0,this._cubeRenderState=void 0,this._inputTexture=void 0,this._cubeMap=void 0,this._sourceData=void 0,this._loading=!1,this._url=t,this._rgbeLoader=new U$i,this._inputTexture=void 0,this._ready=!1,this._position=o$1p.fromDegrees(113,23,1),this._modelMatrix=m$19.eastNorthUpToFixedFrame(this._position)}function xe$6(e){let t=[],i=[],n=0;function r(e,r,o,a,s,l,u,c,h,d,f){const p=l/h,_=u/d,m=l/2,g=u/2,x=c/2,y=h+1,v=d+1;let $=0;const b=new o$1p;for(let i=0;i<v;i++){const n=i*_-g;for(let i=0;i<y;i++){const l=i*p-m;b[e]=l*a,b[r]=n*s,b[o]=x,t.push(b.x,b.y,b.z),b[e]=0,b[r]=0,b[o]=c>0?1:-1,$+=1}}for(let e=0;e<d;e++)for(let t=0;t<h;t++){const r=n+t+y*e,o=n+t+y*(e+1),a=n+(t+1)+y*(e+1),s=n+(t+1)+y*e;i.push(r,o,s),i.push(o,a,s)}n+=$}r("z","y","x",-1,-1,1,1,1,1,1),r("z","y","x",1,-1,1,1,-1,1,1),r("x","z","y",1,1,1,1,1,1,1),r("x","z","y",1,-1,1,1,-1,1,1),r("x","y","z",1,-1,1,1,1,1,1),r("x","y","z",-1,-1,1,1,-1,1,1);let o=new Uint16Array(i),a=new Float32Array(t),s=new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:a})},indices:o,primitiveType:W$18.TRIANGLES,boundingSphere:i$1d.fromVertices(a)});return c$13.fromGeometry({context:e,geometry:s,attributeLocations:{position:0},bufferUsage:A$18.STATIC_DRAW})}function ye$6(e){return r$14.fromCache({context:e,vertexShaderSource:"\n precision mediump float;\n precision mediump int;\n\n attribute vec3 position;\n uniform mat4 projectionMat4;\n\n varying vec3 vWorldDirection;\n\n void main() {\n vWorldDirection = normalize(position);\n gl_Position = czm_modelViewProjection * vec4(position, 1.0);\n }\n ",fragmentShaderSource:"\n precision mediump float;\n precision mediump int;\n\n varying vec3 vWorldDirection;\n uniform sampler2D tEquirect;\n\n #define RECIPROCAL_PI 0.3183098861837907\n #define RECIPROCAL_PI2 0.15915494309189535\n\n vec2 equirectUv( in vec3 dir ) {\n // dir is assumed to be unit length\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n }\n\n void main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n }\n",attributeLocations:{position:0}})}function ge$a(e,t){let i=t;const n=e.context;i._cubeVs=xe$6(n),i._cubeSp=ye$6(n),i._cubeUniformMap={tEquirect:function(){return i._inputTexture}},i._cubeRenderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},viewport:new f$1a(0,0,i._size,i._size)}),i._cubeMap=new e$1P({context:n,width:i._size,height:i._size,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,flipY:!0});let r=p$1d.getRotation(i._modelMatrix,new p$1e),o=p$1e.getColumn(r,0,new o$1p),a=p$1e.getColumn(r,1,new o$1p),s=p$1e.getColumn(r,2,new o$1p),l=o$1p.multiplyByScalar(s,-1,new o$1p),u=o$1p.multiplyByScalar(a,-1,new o$1p),c=o$1p.multiplyByScalar(o,-1,new o$1p),h=new v$K(e.camera._scene);h.frustum.near=.1,h.frustum.aspectRatio=1,h.frustum.fov=90*e$2d.RADIANS_PER_DEGREE,i._projectionMat4=p$1d.clone(h.frustum.projectionMatrix,i._projectionMat4);let d=[o,l,a,c,s,u],f=[s,a,s,s,a,s],p=[i._cubeMap.positiveX,i._cubeMap.positiveY,i._cubeMap.positiveZ,i._cubeMap.negativeX,i._cubeMap.negativeY,i._cubeMap.negativeZ];for(let t=0;t<6;t++){let r=new t$V({context:n,colorTextures:[p[t]]}),o=new i$$({vertexArray:i._cubeVs,shaderProgram:i._cubeSp,uniformMap:i._cubeUniformMap,pass:Le$q.OPAQUE,primitiveType:W$18.TRIANGLES,renderState:i._cubeRenderState,modelMatrix:i._modelMatrix,cull:!1,owner:i,framebuffer:r,pickOnly:!0});h.setView({destination:i._position,orientation:{direction:d[t],up:f[t]}}),e.context.uniformState.updateCamera(h,e.context);let a=new n$$(e.context);e.context.draw(o,a)}}Object.defineProperties(b$s.prototype,{cubeMap:{get:function(){return this._cubeMap}},ready:{get:function(){return this._ready}}});let be$8=/(\.hdr$)/i,ve$7=/(\.jpg$)/i;function t$d(){}function E$m(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context,i=e.width,n=e.height,r=e.depth,o=e.mipmapLevels,a=e.is3D,s=u$Z(e.pixelFormat,V$12.RGBA),l=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),u=s,c=V$12.isCompressedFormat(u);if(s===V$12.DEPTH_STENCIL?u=de$y.DEPTH24_STENCIL8:s===V$12.DEPTH_COMPONENT&&(l===_$_.UNSIGNED_SHORT?u=de$y.DEPTH_COMPONENT16:l===_$_.UNSIGNED_INT&&(u=de$y.DEPTH_COMPONENT24)),l===_$_.FLOAT)switch(s){case V$12.RGBA:u=de$y.RGBA32F;break;case V$12.RGB:u=de$y.RGB32F;break;case V$12.RG:u=de$y.RG32F;break;case V$12.RED:u=de$y.R32F}else if(l===_$_.HALF_FLOAT)switch(s){case V$12.RGBA:u=de$y.RGBA16F;break;case V$12.RGB:u=de$y.RGB16F;break;case V$12.RG:u=de$y.RG16F;break;case V$12.RED:u=de$y.R16F}if(!e$2e(i)||!e$2e(n))throw new t$15("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(o$1q.typeOf.number.greaterThan("width",i,0),i>e$1W.maximumTextureSize)throw new t$15("Width must be less than or equal to the maximum texture size ("+e$1W.maximumTextureSize+"). Check maximumTextureSize.");if(o$1q.typeOf.number.greaterThan("height",n,0),n>e$1W.maximumTextureSize)throw new t$15("Height must be less than or equal to the maximum texture size ("+e$1W.maximumTextureSize+"). Check maximumTextureSize.");if(!V$12.validate(s))throw new t$15("Invalid options.pixelFormat.");if(!c&&!_$_.validate(l))throw new t$15("Invalid options.pixelDatatype.");if(s===V$12.DEPTH_COMPONENT&&l!==_$_.UNSIGNED_SHORT&&l!==_$_.UNSIGNED_INT)throw new t$15("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(s===V$12.DEPTH_STENCIL&&l!==_$_.UNSIGNED_INT_24_8)throw new t$15("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(l===_$_.FLOAT&&!t.floatingPointTexture)throw new t$15("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(l===_$_.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$15("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(V$12.isDepthFormat(s)&&!t.depthTexture)throw new t$15("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.");if(c){if(V$12.isDXTFormat(u)&&!t.s3tc)throw new t$15("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(V$12.isPVRTCFormat(u)&&!t.pvrtc)throw new t$15("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(V$12.isETC1Format(u)&&!t.etc1)throw new t$15("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.")}var h,d=e.preMultiplyAlpha||s===V$12.RGB||s===V$12.LUMINANCE,f=u$Z(e.flipY,!0),p=t._gl,_=a?p.TEXTURE_3D:p.TEXTURE_2D_ARRAY,m=p.createTexture();p.activeTexture(p.TEXTURE0),p.bindTexture(_,m),p.texStorage3D(_,o,u,i,n,r),p.bindTexture(_,null),h=c?V$12.compressedTextureSizeInBytes(s,i,n,r):V$12.textureSizeInBytes(s,l,i,n,r),this._id=e$1T(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=_,this._texture=m,this._pixelFormat=s,this._internalFormat=u,this._pixelDatatype=l,this._width=i,this._height=n,this._depth=r,this._dimensions=new o$1p(i,n,r),this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0,this.ignoreWEBGL2=!1,this._isCompressed=c,this.sampler=e$2e(e.sampler)?e.sampler:new e$1S,t.memorySize+=h}function L$n(e,t,i,n){if(!e$2d.isPowerOfTwo(i)||!e$2d.isPowerOfTwo(n))return!1;for(var r=e.length,o=i,a=n,s=0;;){if(s+=V$12.compressedTextureSizeInBytes(t,o,a),a>>=1,0==(o>>=1)&&0==a)break;o=Math.max(o,1),a=Math.max(a,1)}return s==r}function b$r(e,t,i){switch(e){case V$12.RGB_DXT1:case V$12.RGB_ETC1:return(t+3>>2)*(i+3>>2)*8;case V$12.RGBA_DXT5:return(t+3>>2)*(i+3>>2)*16;case V$12.RGB_PVRTC_4BPPV1:case V$12.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case V$12.RGB_PVRTC_2BPPV1:case V$12.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case de$y.RGB565:return t*i*2;case V$12.RGBA:return t*i*4;case V$12.LUMINANCE_ALPHA:return t*i*2;default:return 0}}function f$l(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context,i=e.width,n=e.height,r=e.depth,o=e.mipmapLevels,a=e.is3D,s=u$Z(e.pixelFormat,V$12.RGBA),l=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),u=s,c=V$12.isCompressedFormat(u);if(s===V$12.DEPTH_STENCIL?u=de$y.DEPTH24_STENCIL8:s===V$12.DEPTH_COMPONENT&&(l===_$_.UNSIGNED_SHORT?u=de$y.DEPTH_COMPONENT16:l===_$_.UNSIGNED_INT&&(u=de$y.DEPTH_COMPONENT24)),l===_$_.FLOAT)switch(s){case V$12.RGBA:u=de$y.RGBA32F;break;case V$12.RGB:u=de$y.RGB32F;break;case V$12.RG:u=de$y.RG32F;break;case V$12.RED:u=de$y.R32F}else if(l===_$_.HALF_FLOAT)switch(s){case V$12.RGBA:u=de$y.RGBA16F;break;case V$12.RGB:u=de$y.RGB16F;break;case V$12.RG:u=de$y.RG16F;break;case V$12.RED:u=de$y.R16F}if(!e$2e(i)||!e$2e(n))throw new t$15("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(o$1q.typeOf.number.greaterThan("width",i,0),i>e$1W.maximumTextureSize)throw new t$15("Width must be less than or equal to the maximum texture size ("+e$1W.maximumTextureSize+"). Check maximumTextureSize.");if(o$1q.typeOf.number.greaterThan("height",n,0),n>e$1W.maximumTextureSize)throw new t$15("Height must be less than or equal to the maximum texture size ("+e$1W.maximumTextureSize+"). Check maximumTextureSize.");if(!V$12.validate(s))throw new t$15("Invalid options.pixelFormat.");if(!c&&!_$_.validate(l))throw new t$15("Invalid options.pixelDatatype.");if(s===V$12.DEPTH_COMPONENT&&l!==_$_.UNSIGNED_SHORT&&l!==_$_.UNSIGNED_INT)throw new t$15("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(s===V$12.DEPTH_STENCIL&&l!==_$_.UNSIGNED_INT_24_8)throw new t$15("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(l===_$_.FLOAT&&!t.floatingPointTexture)throw new t$15("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(l===_$_.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$15("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(V$12.isDepthFormat(s)&&!t.depthTexture)throw new t$15("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.");if(c){if(V$12.isDXTFormat(u)&&!t.s3tc)throw new t$15("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(V$12.isPVRTCFormat(u)&&!t.pvrtc)throw new t$15("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(V$12.isETC1Format(u)&&!t.etc1)throw new t$15("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.")}var h,d=e.preMultiplyAlpha||s===V$12.RGB||s===V$12.LUMINANCE,f=u$Z(e.flipY,!0),p=t._gl,_=a?p.TEXTURE_3D:p.TEXTURE_2D_ARRAY,m=p.createTexture();p.activeTexture(p.TEXTURE0),p.bindTexture(_,m),p.texStorage3D(_,o,u,i,n,r),p.bindTexture(_,null),h=c?V$12.compressedTextureSizeInBytes(s,i,n,r):V$12.textureSizeInBytes(s,l,i,n,r),this._id=e$1T(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=_,this._texture=m,this._pixelFormat=s,this._internalFormat=u,this._pixelDatatype=l,this._width=i,this._height=n,this._depth=r,this._dimensions=new o$1p(i,n,r),this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0,this.ignoreWEBGL2=!1,this._isCompressed=c,this.sampler=e$2e(e.sampler)?e.sampler:new e$1S,t.memorySize+=h}function C$k(e,t,i,n){if(!e$2d.isPowerOfTwo(i)||!e$2d.isPowerOfTwo(n))return!1;for(var r=e.length,o=i,a=n,s=0;;){if(s+=V$12.compressedTextureSizeInBytes(t,o,a),a>>=1,0==(o>>=1)&&0==a)break;o=Math.max(o,1),a=Math.max(a,1)}return s==r}function L$m(e,t,i){switch(e){case V$12.RGB_DXT1:case V$12.RGB_ETC1:return(t+3>>2)*(i+3>>2)*8;case V$12.RGBA_DXT5:return(t+3>>2)*(i+3>>2)*16;case V$12.RGB_PVRTC_4BPPV1:case V$12.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case V$12.RGB_PVRTC_2BPPV1:case V$12.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case de$y.RGB565:return t*i*2;case V$12.RGBA:return t*i*4;case V$12.LUMINANCE_ALPHA:return t*i*2;default:return 0}}function e$k(e){(e=u$Z(e,u$Z.EMPTY_OBJECT)).context.webgpu?this._inner=new f$l(e):this._inner=new E$m(e)}b$s.prototype.update=function(e){if(!e$2e(this._sourceData)&&!this._loading){let e=t$10.createIfNeeded(this._url);be$8.test(this._url)?e.fetchArrayBuffer().then((e=>{this._sourceData=this._rgbeLoader.parse(e)})).otherwise((e=>{this._loading=!1})):ve$7.test(this._url)&&e.fetchImage().then((e=>{this._sourceData=e})).otherwise((e=>{this._loading=!1})),this._loading=!0}if(e$2e(this._sourceData)){if(!e$2e(this._inputTexture)){let t=this._sourceData.data?{arrayBufferView:this._sourceData.data,width:this._sourceData.width,height:this._sourceData.height}:this._sourceData;this._inputTexture=new t$U({context:e.context,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,flipY:!0,source:t}),this._size=Math.min(this._sourceData.width,this._sourceData.height)}this._ready||(ge$a(e,this),this._ready=!0)}},b$s.prototype.isDestroyed=function(){return!1},b$s.prototype.destroy=function(){return this._inputTexture=this._inputTexture&&this._inputTexture.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),destroyObject(this)},t$d.drawSimplePolyline=function(e,t){var i,n=t.canvasPostions,r=u$Z(t.lineWidth,1),o=u$Z(t.lineColor,e$1X.WHITE),a=n.length;for(e.lineWidth=r,e.strokeStyle=o.toCssColorString(),e.beginPath(),e.moveTo(n[0].x,n[0].y),i=1;i<a;i++)e.lineTo(n[i].x,n[i].y);e.stroke()},t$d.drawPolygon=function(e,t){var i,n=t.canvasPostions,r=u$Z(t.lineWidth,1),o=u$Z(t.lineColor,e$1X.WHITE),a=u$Z(t.fillColor,e$1X.RED),s=n.length;for(e.lineWidth=r,e.strokeStyle=o.toCssColorString(),e.fillStyle=a.toCssColorString(),e.beginPath(),e.moveTo(n[0].x,n[0].y),i=1;i<s;i++)e.lineTo(n[i].x,n[i].y);e.closePath(),e.stroke(),e.fill()},Object.defineProperties(t$d.prototype,{}),t$d.prototype.destroy=function(){return i$11(this)},Object.defineProperties(E$m.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$i.NEAREST_MIPMAP_NEAREST||t===tt$i.NEAREST_MIPMAP_LINEAR||t===tt$i.LINEAR_MIPMAP_NEAREST||t===tt$i.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;const a=this._pixelFormat;(o===_$_.FLOAT&&!r.textureFloatLinear||o===_$_.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$i.NEAREST_MIPMAP_NEAREST:tt$i.NEAREST,i=rt$k.NEAREST),r.webgl2&&V$12.isDepthFormat(a)&&(t=tt$i.NEAREST,i=rt$k.NEAREST);var s=r._gl,l=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(l,this._texture),s.texParameteri(l,s.TEXTURE_MIN_FILTER,t),s.texParameteri(l,s.TEXTURE_MAG_FILTER,i),s.texParameteri(l,s.TEXTURE_WRAP_S,e.wrapS),s.texParameteri(l,s.TEXTURE_WRAP_T,e.wrapT),e$2e(this._textureFilterAnisotropic)&&s.texParameteri(l,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),s.bindTexture(l,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),E$m.prototype.setDataBufferWithMipmap=function(e,t){var i=this._context._gl;i.activeTexture(i.TEXTURE0),i.bindTexture(this._textureTarget,this._texture);var n=this._width,r=this._height,o=L$n(t,this._internalFormat,n,r),a=0,s=0;do{var l,u=b$r(this._internalFormat,n,r);l=this._internalFormat==V$12.RGBA&&this._pixelDatatype===_$_.FLOAT?new Float32Array(t.buffer,t.byteOffset+a,u):new Uint8Array(t.buffer,t.byteOffset+a,u),this._isCompressed?i.compressedTexSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,l):i.texSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,this._pixelDatatype,l),n=Math.max(n>>1,1),r=Math.max(r>>1,1),a+=u}while(a<t.length&&o);i.bindTexture(this._textureTarget,null)},E$m.prototype.generateMipmap=function(e){if(e=u$Z(e,I$1e.DONT_CARE),this._width>1&&!e$2d.isPowerOfTwo(this._width))throw new t$15("width must be a power of two to call generateMipmap().");if(this._height>1&&!e$2d.isPowerOfTwo(this._height))throw new t$15("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},E$m.prototype.isDestroyed=function(){return!1},E$m.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,i$11(this)},f$l.create=function(e){return new Texture(e)},Object.defineProperties(f$l.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$i.NEAREST_MIPMAP_NEAREST||t===tt$i.NEAREST_MIPMAP_LINEAR||t===tt$i.LINEAR_MIPMAP_NEAREST||t===tt$i.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;(o===_$_.FLOAT&&!r.textureFloatLinear||o===_$_.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$i.NEAREST_MIPMAP_NEAREST:tt$i.NEAREST,i=rt$k.NEAREST);var a=r._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.texParameteri(s,a.TEXTURE_MIN_FILTER,t),a.texParameteri(s,a.TEXTURE_MAG_FILTER,i),a.texParameteri(s,a.TEXTURE_WRAP_S,e.wrapS),a.texParameteri(s,a.TEXTURE_WRAP_T,e.wrapT),e$2e(this._textureFilterAnisotropic)&&a.texParameteri(s,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),a.bindTexture(s,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),f$l.prototype.setDataBufferWithMipmap=function(e,t){var i=this._context._gl;i.activeTexture(i.TEXTURE0),i.bindTexture(this._textureTarget,this._texture);var n=this._width,r=this._height,o=C$k(t,this._internalFormat,n,r),a=0,s=0;do{var l,u=L$m(this._internalFormat,n,r);l=this._internalFormat==V$12.RGBA&&this._pixelDatatype===_$_.FLOAT?new Float32Array(t.buffer,t.byteOffset+a,u):new Uint8Array(t.buffer,t.byteOffset+a,u),this._isCompressed?i.compressedTexSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,l):i.texSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,this._pixelDatatype,l),n=Math.max(n>>1,1),r=Math.max(r>>1,1),a+=u}while(a<t.length&&o);i.bindTexture(this._textureTarget,null)},f$l.prototype.generateMipmap=function(e){if(e=u$Z(e,I$1e.DONT_CARE),this._width>1&&!e$2d.isPowerOfTwo(this._width))throw new t$15("width must be a power of two to call generateMipmap().");if(this._height>1&&!e$2d.isPowerOfTwo(this._height))throw new t$15("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},f$l.prototype.isDestroyed=function(){return!1},f$l.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,i$11(this)},e$k.create=function(e){return new Texture(e)},Object.defineProperties(e$k.prototype,{id:{set:function(e){this._inner.id=e},get:function(){return this._inner.id}},sampler:{get:function(){return this._inner.sampler},set:function(e){this._inner.sampler=e}},pixelFormat:{get:function(){return this._inner.pixelFormat}},pixelDatatype:{get:function(){return this._inner.pixelDatatype}},dimensions:{get:function(){return this._inner.dimensions}},preMultiplyAlpha:{get:function(){return this._inner.preMultiplyAlpha}},flipY:{get:function(){return this._inner.flipY}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},_target:{get:function(){return this._inner._target}}}),e$k.prototype.setDataBufferWithMipmap=function(e,t){this._inner.setDataBufferWithMipmap(e,t)},e$k.prototype.generateMipmap=function(e){this._inner.generateMipmap(e)},e$k.prototype.isDestroyed=function(){return!1},e$k.prototype.destroy=function(){return this._inner.destroy(),i$11(this)};var _0xcede1d=(_0x45a963=!0,function(e,t){var i=_0x45a963?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45a963=!1,i}),_0x407ae0=_0xcede1d(void 0,(function(){return _0x407ae0.toString().search("(((.+)+)+)+$").toString().constructor(_0x407ae0).search("(((.+)+)+)+$")})),_0x45a963;function _0x5993b9(){}function _0x1cb613(e){var t={},i=e.vertexAttributes;for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n].index);return t}function _0x345eab(e,t,i){var n=t.context,r=u$Z(i,e.shaderProgram),o=r.fragmentShaderSource.clone(),a=[];o.sources=o.sources.map((function(e){e=ShaderSource.replaceMain(e,"czm_Debug_main");for(var t,i=/gl_FragData\[(\d+)\]/g;null!==(t=i.exec(e));)-1===a.indexOf(t[1])&&a.push(t[1]);return e}));var s,l=a.length,u="void main() \n{ \n czm_Debug_main(); \n";if(t.debugShowCommands){e$2e(e._debugColor)||(e._debugColor=e$1X.fromRandom());var c=e._debugColor;if(l>0)for(s=0;s<l;++s)u+=" gl_FragData["+a[s]+"].rgb *= vec3("+c.red+", "+c.green+", "+c.blue+"); \n";else u+=" gl_FragColor.rgb *= vec3("+c.red+", "+c.green+", "+c.blue+"); \n"}if(t.debugShowFrustums){var h=1&e.debugOverlappingFrustums?"1.0":"0.0",d=2&e.debugOverlappingFrustums?"1.0":"0.0",f=4&e.debugOverlappingFrustums?"1.0":"0.0";if(l>0)for(s=0;s<l;++s)u+=" gl_FragData["+a[s]+"].rgb *= vec3("+h+", "+d+", "+f+"); \n";else u+=" gl_FragColor.rgb *= vec3("+h+", "+d+", "+f+"); \n"}u+="}",o.sources.push(u);var p=_0x1cb613(r);return r$14.fromCache({context:n,vertexShaderSource:r.vertexShaderSource,fragmentShaderSource:o,attributeLocations:p})}_0x407ae0(),_0x5993b9.debugShowBoundingVolume=function(e,t,i,n){var r=t._frameState,o=r.context,a=e.boundingVolume;e$2e(t._debugVolume)&&t._debugVolume.destroy();var s,l=o$1p.clone(a.center);if(r.mode!==SceneMode.SCENE3D){l=p$1d.multiplyByPoint(_0x101e20,l,l);var u=r.mapProjection,c=u.unproject(l);l=u.ellipsoid.cartographicToCartesian(c)}if(e$2e(a.radius)){var h=a.radius;s=GeometryPipeline.toWireframe(EllipsoidGeometry.createGeometry(new EllipsoidGeometry({radii:new o$1p(h,h,h),vertexFormat:PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Primitive({geometryInstances:new GeometryInstance({geometry:s,modelMatrix:p$1d.fromTranslation(l),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)}}),appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1}),asynchronous:!1})}else{var d=a.halfAxes;s=GeometryPipeline.toWireframe(BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new o$1p(2,2,2),vertexFormat:PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Primitive({geometryInstances:new GeometryInstance({geometry:s,modelMatrix:p$1d.fromRotationTranslation(d,l,new p$1d),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)}}),appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1}),asynchronous:!1})}var f,p=r.commandList,_=r.commandList=[];(t._debugVolume.update(r),e=_[0],r.useLogDepth)&&(e=DerivedCommand.createLogDepthCommand(e,o).command);e$2e(n)&&(f=i.framebuffer,i.framebuffer=n),e.execute(o,i),e$2e(f)&&(i.framebuffer=f),r.commandList=p},_0x5993b9.executeDebugCommand=function(e,t,i){var n=i$$.shallowClone(e);n.shaderProgram=_0x345eab(e,t),n.execute(t.context,i),n.shaderProgram.destroy()};var _0x101e20=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);_0x101e20=p$1d.inverseTransformation(_0x101e20,_0x101e20),_0x5993b9.prototype.isDestroyed=function(){return!1},_0x5993b9.prototype.destroy=function(){};var _0x52f4af=(_0x24de97=!0,function(e,t){var i=_0x24de97?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24de97=!1,i}),_0x74b408=_0x52f4af(void 0,(function(){return _0x74b408.toString().search("(((.+)+)+)+$").toString().constructor(_0x74b408).search("(((.+)+)+)+$")})),_0x24de97;function _0x707ed3(){this.lightCount=new Uint16Array(_0x4970c2.MAX_FORWARD_PLUS_LIGHTS),this.objCount=new Uint16Array(2)}_0x74b408(),Object.defineProperties(_0x707ed3.prototype,{width:{get:function(){return this._width}},height:{get:function(){return this._height}},zEnd:{get:function(){return this._zEnd}}}),_0x707ed3.prototype.reset=function(){for(var e=0,t=this.lightCount.length;e<t;e++)this.lightCount[e]=0;for(e=0,t=this.objCount.length;e<t;e++)this.objCount[e]=0};var _0x2368d7=(_0xec517a=!0,function(e,t){var i=_0xec517a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xec517a=!1,i}),_0x105679=_0x2368d7(void 0,(function(){return _0x105679.toString().search("(((.+)+)+)+$").toString().constructor(_0x105679).search("(((.+)+)+)+$")})),_0xec517a;_0x105679();const _0x4d3a1f=4;function _0x242e5b(){this.globalLightBatchTable=null,this.gridBatchTable=null}function _0x4243b5(){this.camera=null,this.lastPos=new o$1p,this.lastRot=new o$1p,this.reflection=!1,this.aspectRatio=1,this.visibilityMask=null,this.shadowNode=null,this.lastFrame=0,this.currentBufIdx=-1,this.gridBuffers=null}function _0x149e59(e,t,i){this.width=u$Z(e,0),this.height=u$Z(t,0),this.zEnd=u$Z(i,0)}function _0x3fcb29(e,t,i,n,r,o,a){this._scene=a,this._cachedGrid=[],this._currentLightList=[],this._forwardPlusNumFloat4PerLight=_0x4d3a1f,this._globalLightBatchTableStep=new e$2c,this._globalLightBatchTableDimensions=new o$1o,this._lastTotalLightCount=-1,this._scene=a,this._width=e,this._height=t,this._numSlices=i,this._lightsPerCell=n+3,this._minDistance=r,this._maxDistance=o,this._tableSize=this._width*this._height*this._lightsPerCell,this._invMaxDistance=1/this._maxDistance;var s=e,l=t;this._resolutionAtSlice=[];for(var u=0;u<i;++u)this._resolutionAtSlice.push(new _0x149e59(s,l,this.getDepthAtSlice(u+1))),s*=2,l*=2;this._resolutionAtSlice[i-1].zEnd=99999999999999;var c=-(1-(1<<(i<<1)))/3*e*t;this._lightCountInCell=[];for(u=0;u<c;u++)this._lightCountInCell.push(new _0x707ed3);this.initLightGridBatchTable()}Object.defineProperties(_0x3fcb29.prototype,{});var _0x296ffa=new o$1o;_0x3fcb29.prototype.getGlobalLightTableSize=function(e){var t=Math.floor(1024/_0x4d3a1f),i=e,n=Math.min(i,t),r=_0x4d3a1f*n,o=Math.ceil(i/n);return o=e$2d.nextPowerOfTwo(o),_0x296ffa.x=r,_0x296ffa.y=o,_0x296ffa},_0x3fcb29.prototype.initGlobalLightTable=function(e){var t=1/e.x,i=.5*t,n=1/e.y,r=.5*n;this._globalLightBatchTableDimensions=new o$1o(e.x,e.y),this._globalLightBatchTableStep=new e$2c(t,i,n,r)};var _0x1ba5c4=new p$1e;function _0x5ed5d6(e,t){return e.lightType!=t.lightType?e.lightType<t.lightType:e.distanceToCamera<t.distanceToCamera}_0x3fcb29.prototype.fillGlobalLightListBuffer=function(e,t,i){if(this._currentLightList.length){var n=e.viewMatrix;p$1d.getRotation(n,_0x1ba5c4);for(var r=0,o=0,a=this._currentLightList.length;o<a;o++){var s=this._currentLightList[o];s.lightType==_0x4970c2.POINT?(i[r++]=s.positionEC.x,i[r++]=s.positionEC.y,i[r++]=s.positionEC.z,i[r++]=s.lightType,i[r++]=s.lightColor.red,i[r++]=s.lightColor.green,i[r++]=s.lightColor.blue,i[r++]=0,i[r++]=s.cutoffDistance,i[r++]=s.decay,i[r++]=0,i[r++]=0,r+=4):s.lightType==_0x4970c2.SPOT&&(i[r++]=s.positionEC.x,i[r++]=s.positionEC.y,i[r++]=s.positionEC.z,i[r++]=s.lightType,i[r++]=s.directionEC.x,i[r++]=s.directionEC.y,i[r++]=s.directionEC.z,i[r++]=0,i[r++]=s.lightColor.red,i[r++]=s.lightColor.green,i[r++]=s.lightColor.blue,i[r++]=s.exponent,i[r++]=s.distance,i[r++]=s.decay,i[r++]=s.angleCos,i[r++]=s.penumbraCos)}t.copyFrom({width:this._globalLightBatchTableDimensions.x,height:this._globalLightBatchTableDimensions.y,arrayBufferView:i},0,0)}},_0x3fcb29.prototype.getCachedGridFor=function(e){for(var t=this._scene._frameState.frameNumber,i=0;i<this._cachedGrid.length;i++){var n=this._cachedGrid[i];if(n.camera==e&&n.reflection==e.bReflect&&Math.abs(n.aspectRatio-e.frustum.aspectRatio)<e$2d.EPSILON7){var r=n.lastFrame==t;return n.lastFrame=t,r?(!o$1p.equals(n.lastPos,e.position)||!o$1p.equals(n.lastRot,e.direction))&&(n.currentBufIdx++,n.currentBufIdx>=n.gridBuffers.length&&n.gridBuffers.push(new _0x242e5b),r=!1):n.currentBufIdx=0,o$1p.clone(e.position,n.lastPos),o$1p.clone(e.direction,n.lastRot),{upToDate:r,cacheGrid:n}}}var o=new _0x4243b5;return o.camera=e,o$1p.clone(e.position,o.lastPos),o$1p.clone(e.direction,o.lastRot),o.reflection=e.bReflect,o.aspectRatio=e.frustum.aspectRatio,o.lastFrame=t,o.currentBufIdx=0,o.gridBuffers=[new _0x242e5b],this._cachedGrid.push(o),{upToDate:!1,cacheGrid:o}},_0x3fcb29.prototype.deleteOldGridBuffers=function(){for(var e=this._scene._frameState.frameNumber,t=this._cachedGrid.length,i=0;i<t;){var n=this._cachedGrid[i];if(n.lastFrame+3<e){for(var r=0;r<n.gridBuffers.length;r++){var o=n.gridBuffers[r];o.gridBatchTable&&(o.gridBatchTable.destroy(),o.gridBatchTable=null),o.globalLightBatchTable&&(o.globalLightBatchTable.destroy(),o.globalLightBatchTable=null)}var a=this._cachedGrid[this._cachedGrid.length-1];this._cachedGrid[i]=a,this._cachedGrid.pop(),i++,t=this._cachedGrid.length}else i++}},_0x3fcb29.prototype.initParamterForLightUBO=function(e){e.addUniform("uLightGridTextureStep",4),e.addUniform("uLightGridTextureDimension",2),e.addUniform("uGlobalLightTextureStep",4),e.addUniform("uGlobalLightTextureDimension",2),e.addUniform("uLightMinDistance",1),e.addUniform("uLightInvMaxDistance",1),e.addUniform("uLightGridNumSilces",1),e.addUniform("uLightGridTableSize",1),e.addUniform("uF3dViewportOffset",4),e.addUniform("uF3dGridHWW",4,this._numSlices)},_0x3fcb29.prototype.fillLightUBO=function(e){var t=this._lightGridBatchTableStep,i=this._lightGridBatchTableDimensions;e.updateFloat4("uLightGridTextureStep",t.x,t.y,t.z,t.w),e.updateFloat2("uLightGridTextureDimension",i.x,i.y),t=this._globalLightBatchTableStep,i=this._globalLightBatchTableDimensions,e.updateFloat4("uGlobalLightTextureStep",t.x,t.y,t.z,t.w),e.updateFloat2("uGlobalLightTextureDimension",i.x,i.y),e.updateFloat("uLightMinDistance",this._minDistance),e.updateFloat("uLightInvMaxDistance",this._invMaxDistance),e.updateFloat("uLightGridNumSilces",this._numSlices-1),e.updateFloat("uLightGridTableSize",this._tableSize);var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;e.updateFloat4("uF3dViewportOffset",0,0,0,0);for(var o=new Float32Array(4*this._numSlices),a=0,s=0;s<this._numSlices;++s)o[a++]=this._resolutionAtSlice[s].width/n,o[a++]=this._resolutionAtSlice[s].height/r,o[a++]=this._resolutionAtSlice[s].width*this._lightsPerCell,o[a++]=s<1?this._lightsPerCell:r;e.updateFloatArray("uF3dGridHWW",o)},_0x3fcb29.prototype.createLightUniformMap=function(e){var t=this;(e={}).uLightGridTextureStep=function(){return t._lightGridBatchTableStep},e.uLightGridTextureDimension=function(){return t._lightGridBatchTableDimensions},e.uGlobalLightTextureStep=function(){return t._globalLightBatchTableStep},e.uGlobalLightTextureDimension=function(){return t._globalLightBatchTableDimensions},e.uLightMinDistance=function(){return t._minDistance},e.uLightInvMaxDistance=function(){return t._invMaxDistance},e.uLightGridNumSilces=function(){return t._numSlices-1},e.uLightGridTableSize=function(){return t._tableSize};for(var i=this._scene._context.drawingBufferWidth,n=this._scene._context.drawingBufferHeight,r=[],o=0;o<this._numSlices;++o){var a=new e$2c;a.x=this._resolutionAtSlice[o].width/i,a.y=this._resolutionAtSlice[o].height/n,a.z=this._resolutionAtSlice[o].width*this._lightsPerCell,a.w=o<1?this._lightsPerCell:n,r.push(a)}return e.uF3dGridHWW=function(){return r},e.uLightGridTexture=function(){return e$2e(t._ubo.lightGridTexture)?t._ubo.lightGridTexture:t._scene._context.defaultTexture},e.uGlobalLightListTexture=function(){return e$2e(t._ubo.globalLightListTexture)?t._ubo.globalLightListTexture:t._scene._context.defaultTexture},e},_0x3fcb29.prototype.initLightGridBatchTable=function(){var e=Math.floor(1024/this._lightsPerCell),t=-(1-(1<<(this._numSlices<<1)))/3*this._width*this._height,i=Math.min(t,e),n=this._lightsPerCell*i,r=Math.ceil(t/i),o=1/n,a=.5*o,s=1/(r=e$2d.nextPowerOfTwo(r)),l=.5*s;this._lightGridBatchTableDimensions=new o$1o(n,r),this._lightGridBatchTableStep=new e$2c(o,a,s,l)},_0x3fcb29.prototype.getDepthAtSlice=function(e){return-(e/(this._numSlices-1)*this._maxDistance-this._minDistance)},_0x3fcb29.prototype.getSliceAtDepth=function(e){var t=e$2d.clamp((-e+this._minDistance)*this._invMaxDistance,0,1);return Math.floor(t*(this._numSlices-1))},_0x3fcb29.prototype.projectionSpaceToGridSpace=function(e,t){var i=this._resolutionAtSlice[t],n=e$2d.clamp(e.x,0,1)*i.width,r=e$2d.clamp(e.y,0,1)*i.height;return{outX:Math.min(Math.floor(n),i.width-1),outY:Math.min(Math.floor(r),i.height-1)}};var _0x3139ed=new e$2c,_0x16a150=new Float32Array(256),_0x3f2bc8,_0x29a656,_0x18c864=[new o$1p,new o$1p],_0x1fe43c=[new o$1p,new o$1p],_0x5ec832=new o$1p,_0xd293fb=new o$1p,_0x5ad90b=new o$1o,_0x4e9af2=new o$1o,_0x22c04c=[new e$2c,new e$2c],_0x176984=[new e$2c,new e$2c],_0x5edd06=new p$1d,_0x4030b3=new e$29;_0x3fcb29.prototype.collectLights=function(){var e=this._scene,t=e._frameState.passes,i=this._scene.context;if(this._ubo.textureDirty=!1,!t.pick&&!t.depth){var n,r=e.camera,o=this.getCachedGridFor(r);if(!o.upToDate){n=o.cacheGrid;var a=e._frameState.lightSource,s=a.pointLight.length+a.spotLight.length;if(0==s&&s==this._lastTotalLightCount)return;this._lastTotalLightCount=s,this._currentLightList=[];for(var l=a._visibleLightList[_0x4970c2.POINT].values,u=a._visibleLightList[_0x4970c2.SPOT].values,c=0;c<l.length;c++)this._currentLightList.push(l[c]);for(c=0;c<u.length;c++)this._currentLightList.push(u[c]);var h=this._currentLightList.length;m$I(this._currentLightList,_0x5ed5d6);var d=n.gridBuffers[n.currentBufIdx];if(!d.gridBatchTable){var f=-(1-(1<<(this._numSlices<<1)))/3;_0x29a656=new Float32Array(this._lightGridBatchTableDimensions.x*this._lightGridBatchTableDimensions.y),d.gridBatchTable=new t$U({context:i,pixelFormat:i.webgpu?V$12.RED:V$12.LUMINANCE,pixelDatatype:_$_.FLOAT,width:this._lightGridBatchTableDimensions.x,height:this._lightGridBatchTableDimensions.y,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1}),this._ubo.lightGridTexture=d.gridBatchTable}var p=Math.max(h,this._lightsPerCell-3),_=this.getGlobalLightTableSize(p);(!d.globalLightBatchTable||d.globalLightBatchTable.height<_.y)&&(d.globalLightBatchTable&&(d.globalLightBatchTable.destroy(),d.globalLightBatchTable=null),this.initGlobalLightTable(_),_0x3f2bc8=new Float32Array(this._globalLightBatchTableDimensions.x*this._globalLightBatchTableDimensions.y*4),d.globalLightBatchTable=new t$U({context:i,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT,width:this._globalLightBatchTableDimensions.x,height:this._globalLightBatchTableDimensions.y,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1}),this._ubo.globalLightListTexture=d.globalLightBatchTable),this.fillGlobalLightListBuffer(r,d.globalLightBatchTable,_0x3f2bc8),this._lightCountInCell.map((function(e){e.reset()}));var m=r.viewMatrix,g=r.frustum.projectionMatrix,x=r.frustum.near,y=r.frustum.far;0==y&&(y=99999999999999);for(c=0;c<this._numSlices-1;++c)_0x3139ed.x=0,_0x3139ed.y=0,_0x3139ed.z=e$2d.clamp(this._resolutionAtSlice[c].zEnd,-y,-x),_0x3139ed.w=1,p$1d.multiplyByVector(g,_0x3139ed,_0x3139ed),_0x16a150[c]=_0x3139ed.z/_0x3139ed.w;_0x16a150[this._numSlices-1]=1;for(c=0;c<h;++c){var v=this._currentLightList[c],$=p$1d.IDENTITY;p$1d.multiply(m,$,_0x5edd06),e$29.transform(v.aabb,_0x5edd06,_0x4030b3);var b=_0x4030b3.minimum,T=_0x4030b3.maximum,C=b.z;b.z=T.z,T.z=C,b.z=e$2d.clamp(b.z,-y,-x),T.z=e$2d.clamp(T.z,-y,-x),_0x22c04c[0].x=b.x,_0x22c04c[0].y=b.y,_0x22c04c[0].z=b.z,_0x22c04c[0].w=1,_0x22c04c[1].x=b.x,_0x22c04c[1].y=b.y,_0x22c04c[1].z=b.z,_0x22c04c[1].w=1,_0x176984[0].x=T.x,_0x176984[0].y=T.y,_0x176984[0].z=T.z,_0x176984[0].w=1,_0x176984[1].x=T.x,_0x176984[1].y=T.y,_0x176984[1].z=T.z,_0x176984[1].w=1,_0x176984[0].z=b.z,_0x22c04c[1].z=T.z;for(var S=0;S<2;++S){p$1d.multiplyByVector(g,_0x22c04c[S],_0x22c04c[S]),p$1d.multiplyByVector(g,_0x176984[S],_0x176984[S]);var w=1/_0x22c04c[S].w,E=1/_0x176984[S].w;_0x18c864[S].x=_0x22c04c[S].x*w*.5+.5,_0x18c864[S].y=_0x22c04c[S].y*w*.5+.5,_0x18c864[S].z=_0x22c04c[S].z*w,_0x1fe43c[S].x=_0x176984[S].x*E*.5+.5,_0x1fe43c[S].y=_0x176984[S].y*E*.5+.5,_0x1fe43c[S].z=_0x176984[S].z*E}var P=_0x18c864[0].z,A=_0x18c864[1].z,L=this.getSliceAtDepth(b.z),M=this.getSliceAtDepth(T.z),R=1/(A-P),O=[],D=[];O.push(_0x18c864[0]),D.push(_0x1fe43c[0]);for(var I=(f=-(1-(1<<(L<<1)))/3)*this._tableSize,F=f*this._width*this._height,B=v.lightType,N=L;N<=M;++N){var G=(Math.min(A,_0x16a150[N])-P)*R;o$1p.lerp(_0x18c864[0],_0x18c864[1],G,_0x5ec832),o$1p.lerp(_0x1fe43c[0],_0x1fe43c[1],G,_0xd293fb),O.push(_0x5ec832),D.push(_0xd293fb),_0x5ad90b.x=Math.min(O[0].x,O[1].x),_0x5ad90b.y=Math.min(O[0].y,O[1].y),_0x4e9af2.x=Math.max(D[0].x,D[1].x),_0x4e9af2.y=Math.max(D[0].y,D[1].y);var z,U,V,k,W=this.projectionSpaceToGridSpace(_0x5ad90b,N);z=W.outX,U=W.outY,V=(W=this.projectionSpaceToGridSpace(_0x4e9af2,N)).outX,k=W.outY;for(var H=this._resolutionAtSlice[N],q=U;q<=k;++q)for(var j=z;j<=V;++j){var X=this._lightCountInCell[F+q*H.width+j];if(X.lightCount[0]<this._lightsPerCell-3){var Y=I+(q*H.width+j)*this._lightsPerCell+(X.lightCount[0]+3);_0x29a656[Y]=c*this._forwardPlusNumFloat4PerLight,++X.lightCount[0],++X.lightCount[B]}}o$1p.clone(O[1],O[0]),o$1p.clone(D[1],D[0]),I+=H.width*H.height*this._lightsPerCell,F+=H.width*H.height}}var Z=this._lightsPerCell,K=0;for(c=0;c<this._lightCountInCell.length;c++){var Q=this._lightCountInCell[c],J=Q.lightCount[_0x4970c2.POINT];_0x29a656[K+0]=J,J+=Q.lightCount[_0x4970c2.SPOT],_0x29a656[K+1]=J,K+=Z}d.gridBatchTable.copyFrom({width:this._lightGridBatchTableDimensions.x,height:this._lightGridBatchTableDimensions.y,arrayBufferView:_0x29a656},0,0),this.deleteOldGridBuffers()}}},_0x3fcb29.prototype.isDestroyed=function(){return!1},_0x3fcb29.prototype.destroy=function(){return i$11(this)};var _0x3e3f4c=(_0x2a08d0=!0,function(e,t){var i=_0x2a08d0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a08d0=!1,i}),_0x514926=_0x3e3f4c(void 0,(function(){return _0x514926.toString().search("(((.+)+)+)+$").toString().constructor(_0x514926).search("(((.+)+)+)+$")})),_0x2a08d0;function _0x4a04df(e){this._context=e,this._enabled=!1;var t=e.colorBufferFloat&&e.depthTexture;this._support=e.drawBuffers&&t,this._fbo=void 0,this._positionTexture=void 0,this._normalTexture=void 0,this._reflectivityTexture=void 0,this._depthStencilTexture=void 0,this._mrtClearCommand=new t$W({color:new e$1X(0,0,0,0),owner:this})}function _0x3729b5(e){e._positionTexture=e._positionTexture&&!e._positionTexture.isDestroyed()&&e._positionTexture.destroy(),e._normalTexture=e._normalTexture&&!e._normalTexture.isDestroyed()&&e._normalTexture.destroy(),e._reflectivityTexture=e._reflectivityTexture&&!e._reflectivityTexture.isDestroyed()&&e._reflectivityTexture.destroy()}_0x514926(),Object.defineProperties(_0x4a04df.prototype,{enable:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(e||this._releaseResource()),this._enable=e}},support:{get:function(){return this._support}},positionTexture:{get:function(){return this._positionTexture}},normalTexture:{get:function(){return this._normalTexture}},reflectivityTexture:{get:function(){return this._reflectivityTexture}},framebuffer:{get:function(){return this._fbo}}}),_0x4a04df.prototype.update=function(e){this._depthStencilTexture=e.depthStencilTexture;var t=this._depthStencilTexture.width,i=this._depthStencilTexture.height,n=this._positionTexture;(!e$2e(n)||n.width!==t||n.height!==i)&&(this._releaseResource(),this._createResource(t,i))},_0x4a04df.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._fbo,this._mrtClearCommand.execute(e,t),t.framebuffer=n},_0x4a04df.prototype._createResource=function(e,t){var i=this._context;this._positionTexture=new t$U({context:i,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,width:e,height:t,flipY:!1}),this._normalTexture=new t$U({context:i,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,width:e,height:t,flipY:!1}),this._reflectivityTexture=new t$U({context:i,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,width:e,height:t,flipY:!1}),this._fbo=new t$V({context:i,colorTextures:[this._positionTexture,this._normalTexture,this._reflectivityTexture],depthStencilTexture:this._depthStencilTexture,destroyAttachments:!1})},_0x4a04df.prototype.getPrepassShaderProgram=function(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"PREPASS");if(!e$2e(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();o.defines=e$2e(o.defines)?o.defines.slice(0):[],o.defines.push("PREPASS"),i=e.shaderCache.createDerivedShaderProgram(t,"PREPASS",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i},_0x4a04df.prototype._releaseResource=function(){this._fbo=this._fbo&&!this._fbo.isDestroyed()&&this._fbo.destroy(),_0x3729b5(this)},_0x4a04df.prototype.destroy=function(){this._releaseResource()};var j$j="uniform sampler2D colorTexture;\nuniform sampler2D colorTexture2;\n\nuniform vec2 center;\nuniform float radius;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color0 = texture2D(colorTexture, v_textureCoordinates);\n vec4 color1 = texture2D(colorTexture2, v_textureCoordinates);\n\n float x = length(gl_FragCoord.xy - center) / radius;\n float t = smoothstep(0.5, 0.8, x);\n gl_FragColor = mix(color0 + color1, color1, t);\n}\n",E$l='uniform sampler2D colorTexture;\n\nuniform float avgLuminance;\nuniform float threshold;\nuniform float offset;\n\nvarying vec2 v_textureCoordinates;\n\nfloat key(float avg)\n{\n float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));\n return max(0.0, guess) + 0.1;\n}\n\n// See section 9. "The bright-pass filter" of Realtime HDR Rendering\n// http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf\n\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n vec3 xyz = czm_RGBToXYZ(color.rgb);\n float luminance = xyz.r;\n\n float scaledLum = key(avgLuminance) * luminance / avgLuminance;\n float brightLum = max(scaledLum - threshold, 0.0);\n float brightness = brightLum / (offset + brightLum);\n\n xyz.r = brightness;\n gl_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);\n}\n',ie$7="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n gl_FragColor = texture2D(colorTexture, v_textureCoordinates);\n}\n",e$j={NEAREST:0,LINEAR:1};function p$h(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).fragmentShader,i=u$Z(e.textureScale,1),n=u$Z(e.pixelFormat,V$12.RGBA),r=e.prepassRenderer;if(o$1q.typeOf.string("options.fragmentShader",t),o$1q.typeOf.number.greaterThan("options.textureScale",i,0),o$1q.typeOf.number.lessThanOrEquals("options.textureScale",i,1),!V$12.isColorFormat(n))throw new t$15("options.pixelFormat must be a color format.");this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=i,this._forcePowerOfTwo=u$Z(e.forcePowerOfTwo,!1),this._sampleMode=u$Z(e.sampleMode,e$j.NEAREST),this._blendingState=e.blendingState,this._pixelFormat=n,this._pixelDatatype=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),this._clearColor=u$Z(e.clearColor,e$1X.BLACK),this._useWGSL=u$Z(e.useWGSL,!1),this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._prepassRenderer=r,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0;var o=new n$$;o.scissorTest={enabled:!0,rectangle:e$2e(e.scissorRectangle)?f$1a.clone(e.scissorRectangle):new f$1a},this._passState=o,this._ready=!1;var a=e.name;e$2e(a)||(a=e$1T()),this._name=a,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(p$h.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(e$2e(this._textureCache)){var e=this._textureCache.getFramebuffer(this._name);if(e$2e(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var z$l=/uniform\s+sampler2D\s+depthTexture/g;function H$r(e,t,i){var n=t[i];return("string"==typeof n||n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof HTMLVideoElement||n instanceof ImageData)&&e._dirtyUniforms.push(i),{get:function(){return t[i]},set:function(n){var r=t[i];t[i]=n;var o=e._actualUniforms,a=o[i];e$2e(a)&&a!==r&&a instanceof t$U&&!e$2e(e._textureCache.getStageByName(i))&&(e._texturesToRelease.push(a),delete o[i],delete o[i+"Dimensions"]),r instanceof t$U&&e._texturesToRelease.push(r),"string"==typeof n||n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof HTMLVideoElement||n instanceof ImageData?e._dirtyUniforms.push(i):o[i]=n}}}function V$h(e,t){return function(){var i=e._actualUniforms[t];return"function"==typeof i?i():i}}function W$l(e,t){return function(){var i=e[t]();if(e$2e(i))return i.dimensions}}function k$h(e){if(!e$2e(e._uniformMap)){var t={},i={},n=e._uniforms,r=e._actualUniforms;for(var o in n)if(n.hasOwnProperty(o)){"function"!=typeof n[o]?(t[o]=V$h(e,o),i[o]=H$r(e,n,o)):(t[o]=n[o],i[o]=n[o]),r[o]=n[o];var a=t[o]();("string"==typeof a||a instanceof t$U||a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement)&&(t[o+"Dimensions"]=W$l(t,o))}e._uniforms={},Object.defineProperties(e._uniforms,i),e._uniformMap=p$19(t,{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions},depthTexture:function(){return e._depthTexture},depthTextureDimensions:function(){return e._depthTexture.dimensions},czm_idTexture:function(){return e._idTexture},czm_selectedIdTexture:function(){return e._selectedIdTexture},czm_selectedIdTextureStep:function(){return 1/e._selectedIdTexture.width},reflectivitySampler:function(){return e._prepassRenderer.reflectivityTexture},normalSampler:function(){return e._prepassRenderer.normalTexture},positionSampler:function(){return e._prepassRenderer.positionTexture}})}}function Y$c(e,t){if(!e$2e(e._command)||e._logDepthChanged||e._selectedDirty){var i=e._fragmentShader;if(e$2e(e._selectedIdTexture))i="#define CZM_SELECTED_FEATURE \nuniform sampler2D czm_idTexture; \nuniform sampler2D czm_selectedIdTexture; \nuniform float czm_selectedIdTextureStep; \nvarying vec2 v_textureCoordinates; \nbool czm_selected(vec2 offset) \n{ \n bool selected = false;\n vec4 id = texture2D(czm_idTexture, v_textureCoordinates + offset); \n for (int i = 0; i < "+e._selectedIdTexture.width+"; ++i) \n { \n vec4 selectedId = texture2D(czm_selectedIdTexture, vec2(float(i) * czm_selectedIdTextureStep, 0.5)); \n if (all(equal(id, selectedId))) \n { \n return true; \n } \n } \n return false; \n} \n\nbool czm_selected() \n{ \n return czm_selected(vec2(0.0)); \n} \n\n"+(i=i.replace(/varying\s+vec2\s+v_textureCoordinates;/g,""));var n=new s$V({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[i],useWGSL:e._useWGSL});e._command=t.createViewportQuadCommand(n,{uniformMap:e._uniformMap,owner:e,shaderProgramName:e._name,useWGSL:e._useWGSL})}}function q$g(e){var t,i;e._sampleMode===e$j.LINEAR?(t=tt$i.LINEAR,i=rt$k.LINEAR):(t=tt$i.NEAREST,i=rt$k.NEAREST);var n=e._sampler;(!e$2e(n)||n.minificationFilter!==t||n.magnificationFilter!==i)&&(e._sampler=new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:t,magnificationFilter:i}))}function j$i(e,t){return function(i){e._texturesToCreate.push({name:t,source:i})}}function J$b(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function K$d(e,t){var i,n,r,o=e._texturesToRelease,a=o.length;for(i=0;i<a;++i)n=(n=o[i])&&n.destroy();o.length=0;var s=e._texturesToCreate;for(a=s.length,i=0;i<a;++i){var l=s[i];r=l.name;var u=l.source;e._actualUniforms[r]=new t$U({context:t,source:u})}s.length=0;var c=e._dirtyUniforms;if(0!==c.length||e$2e(e._texturePromise)){if(0!==c.length&&!e$2e(e._texturePromise)){a=c.length;var h=e._uniforms,d=[];for(i=0;i<a;++i){var f=h[r=c[i]];if(e$2e(e._textureCache.getStageByName(f)))e._actualUniforms[r]=J$b(e,f);else if("string"==typeof f){var p=new t$10({url:f});d.push(p.fetchImage().then(j$i(e,r)))}else e._texturesToCreate.push({name:r,source:f})}c.length=0,d.length>0?(e._ready=!1,e._texturePromise=o$1l.all(d).then((function(){e._ready=!0,e._texturePromise=void 0}))):e._ready=!0}}else e._ready=!0}function I$n(e){e$2e(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();var t=e._textureCache;if(e$2e(t)){var i=e._uniforms,n=e._actualUniforms;for(var r in n)n.hasOwnProperty(r)&&n[r]instanceof t$U&&(e$2e(t.getStageByName(i[r]))||n[r].destroy(),e._dirtyUniforms.push(r))}}function Q$f(e){var t=e$2e(e._selected)?e._selected.length:0,i=e$2e(e._parentSelected)?e._parentSelected:0,n=e._selected!==e._selectedShadow||t!==e._selectedLength;if(n=n||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength,e$2e(e._selected)&&e$2e(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):e$2e(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!n&&e$2e(e._combinedSelected)){if(!e$2e(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var r=0;r<t;++r)if(e._combinedSelected[r]!==e._combinedSelectedShadow[r])return!0}return n}function Z$h(e,t){if(e._selectedDirty){e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;var i=e._combinedSelected;if(e$2e(i)){var n,r,o=0,a=i.length;for(n=0;n<a;++n)e$2e((r=i[n]).pickIds)?o+=r.pickIds.length:e$2e(r.pickId)&&++o;if(0===a||0===o){var s=new Uint8Array(4);return s[0]=255,s[1]=255,s[2]=255,s[3]=255,void(e._selectedIdTexture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,source:{arrayBufferView:s,width:1,height:1},sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}))}var l,u=0,c=new Uint8Array(4*o);for(n=0;n<a;++n)if(e$2e((r=i[n]).pickIds))for(var h=r.pickIds,d=h.length,f=0;f<d;++f)l=h[f].color,c[u]=e$1X.floatToByte(l.red),c[u+1]=e$1X.floatToByte(l.green),c[u+2]=e$1X.floatToByte(l.blue),c[u+3]=e$1X.floatToByte(l.alpha),u+=4;else e$2e(r.pickId)&&(l=r.pickId.color,c[u]=e$1X.floatToByte(l.red),c[u+1]=e$1X.floatToByte(l.green),c[u+2]=e$1X.floatToByte(l.blue),c[u+3]=e$1X.floatToByte(l.alpha),u+=4);e._selectedIdTexture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,source:{arrayBufferView:c,width:o,height:1},sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})}}}function s$f(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.stages",e.stages),o$1q.typeOf.number.greaterThan("options.stages.length",e.stages.length,0),this._stages=e.stages,this._inputPreviousStageTexture=u$Z(e.inputPreviousStageTexture,!0);var t=e.name;e$2e(t)||(t=e$1T()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}function u$j(e){var t=e$2e(e._selected)?e._selected.length:0,i=e$2e(e._parentSelected)?e._parentSelected:0,n=e._selected!==e._selectedShadow||t!==e._selectedLength;if(n=n||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength,e$2e(e._selected)&&e$2e(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):e$2e(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!n&&e$2e(e._combinedSelected)){if(!e$2e(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var r=0;r<t;++r)if(e._combinedSelected[r]!==e._combinedSelectedShadow[r])return!0}return n}function g$r(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function m$l(e){for(;e$2e(e.length);)e=e.get(e.length-1);return e.name}function w$k(e,t,i,n,r){if(!n.enabled||!n._isSupported(t))return r;var o=i[n.name]={};e$2e(r)&&(o[m$l(e.getStageByName(r))]=!0);var a=n.uniforms;if(e$2e(a))for(var s=Object.getOwnPropertyNames(a),l=s.length,u=0;u<l;++u){var c=a[s[u]];if("string"==typeof c){var h=e.getStageByName(c);e$2e(h)&&(o[m$l(h)]=!0)}}return n.name}function v$k(e,t,i,n,r){if(e$2e(n.enabled)&&!n.enabled||e$2e(n._isSupported)&&!n._isSupported(t))return r;for(var o=r,a=!e$2e(n.inputPreviousStageTexture)||n.inputPreviousStageTexture,s=r,l=n.length,u=0;u<l;++u){var c=n.get(u);s=e$2e(c.length)?v$k(e,t,i,c,r):w$k(e,t,i,c,r),a&&(r=s)}var h,d;if(a)for(h=1;h<l;++h)e$2e(i[d=m$l(n.get(h))])||(i[d]={}),i[d][o]=!0;else for(h=1;h<l;++h)for(var f=i[d=m$l(n.get(h))],p=0;p<h;++p)f[m$l(n.get(p))]=!0;return s}function B$g(e,t){var i={};if(e$2e(e.ambientOcclusion)){var n=e._outline,r=e.ambientOcclusion,o=e.bloom,a=e._tonemapping,s=e.fxaa,l=e.fog,u=e.rain,c=e.snow,h=e.screenSpaceReflection,d=v$k(e,t,i,n,void 0);d=w$k(e,t,i,l,d),d=w$k(e,t,i,c,d),d=v$k(e,t,i,r,d=w$k(e,t,i,u,d)),d=v$k(e,t,i,o,d),d=v$k(e,t,i,e,d=w$k(e,t,i,a,d)),w$k(e,t,i,s,d=v$k(e,t,i,h,d))}else v$k(e,t,i,e,void 0);return i}function E$k(e,t,i){var n,r,o=e._collection.getStageByName(t),a=o._textureScale,s=o._forcePowerOfTwo,l=o._pixelFormat,u=o._pixelDatatype,c=o._clearColor,h=e._framebuffers,d=h.length;for(n=0;n<d;++n)if(a===(r=h[n]).textureScale&&s===r.forcePowerOfTwo&&l===r.pixelFormat&&u===r.pixelDatatype&&e$1X.equals(c,r.clearColor)){for(var f=r.stages,p=f.length,_=!1,m=0;m<p;++m)if(i[f[m]]){_=!0;break}if(!_)break}return e$2e(r)&&n<d?(r.stages.push(t),r):(r={textureScale:a,forcePowerOfTwo:s,pixelFormat:l,pixelDatatype:u,clearColor:c,stages:[t],buffer:void 0,clear:void 0},h.push(r),r)}function M$l(e,t){var i=B$g(e._collection,t);for(var n in i)i.hasOwnProperty(n)&&(e._stageNameToFramebuffer[n]=E$k(e,n,i[n]))}function y$l(e){for(var t=e._framebuffers,i=t.length,n=0;n<i;++n){var r=t[n];r.buffer=r.buffer&&r.buffer.destroy(),r.buffer=void 0}}function R$j(e,t){for(var i=e._width,n=e._height,r=e._framebuffers,o=r.length,a=0;a<o;++a){var s=r[a],l=s.textureScale,u=Math.ceil(i*l),c=Math.ceil(n*l),h=Math.min(u,c);s.forcePowerOfTwo&&(e$2d.isPowerOfTwo(h)||(h=e$2d.nextPowerOfTwo(h)),u=h,c=h),s.buffer=new t$V({context:t,colorTextures:[new t$U({context:t,width:u,height:c,pixelFormat:s.pixelFormat,pixelDatatype:s.pixelDatatype})]}),s.clear=new t$W({color:s.clearColor,framebuffer:s.buffer})}}function n$i(){this._colorTexture=void 0,this._idTexture=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._framebuffer=void 0,this._idFramebuffer=void 0,this._idClearColor=new e$1X(0,0,0,0),this._useHdr=void 0,this._clearCommand=new t$W({color:new e$1X(0,0,0,0),depth:1,owner:this})}function S$i(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._idFramebuffer=e._idFramebuffer&&e._idFramebuffer.destroy(),e._colorTexture=e._colorTexture&&e._colorTexture.destroy(),e._idTexture=e._idTexture&&e._idTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&e._depthStencilRenderbuffer.destroy(),e._depthStencilIdTexture=e._depthStencilIdTexture&&e._depthStencilIdTexture.destroy(),e._depthStencilIdRenderbuffer=e._depthStencilIdRenderbuffer&&e._depthStencilIdRenderbuffer.destroy(),e._framebuffer=void 0,e._idFramebuffer=void 0,e._colorTexture=void 0,e._idTexture=void 0,e._depthStencilTexture=void 0,e._depthStencilRenderbuffer=void 0,e._depthStencilIdTexture=void 0,e._depthStencilIdRenderbuffer=void 0}function s$e(){this._sceneFramebuffer=new n$i,this._stMatrix3=p$1e.clone(p$1e.IDENTITY),this._isMultiViewport=!1;var e=.125,t=new Array(6);t[0]=new p$h({name:"SunPostProcessStage0",fragmentShader:ie$7,textureScale:e,forcePowerOfTwo:!0,sampleMode:e$j.LINEAR});var i=t[1]=new p$h({name:"SunPostProcessStage1",fragmentShader:E$l,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),n=this;this._delta=1,this._sigma=2,this._blurStep=new o$1o,t[2]=new p$h({name:"SunPostProcessStage2",fragmentShader:y$M,uniforms:{step:function(){return n._blurStep.x=n._blurStep.y=1/i.outputTexture.width,n._blurStep},delta:function(){return n._delta},sigma:function(){return n._sigma},direction:0},textureScale:e,forcePowerOfTwo:!0}),t[3]=new p$h({name:"SunPostProcessStage3",fragmentShader:y$M,uniforms:{step:function(){return n._blurStep.x=n._blurStep.y=1/i.outputTexture.width,n._blurStep},delta:function(){return n._delta},sigma:function(){return n._sigma},direction:1},textureScale:e,forcePowerOfTwo:!0}),t[4]=new p$h({name:"SunPostProcessStage4",fragmentShader:ie$7,sampleMode:e$j.LINEAR}),this._uCenter=new o$1o,this._uRadius=void 0,t[5]=new p$h({name:"SunPostProcessStage5",fragmentShader:j$j,uniforms:{center:function(){return n._uCenter},radius:function(){return n._uRadius},colorTexture2:function(){return n._sceneFramebuffer.getFramebuffer().getColorTexture(0)}}}),this._stages=new s$f({stages:t});for(var r=new g$r(this),o=t.length,a=0;a<o;++a)t[a]._textureCache=r;this._textureCache=r,this.length=t.length}p$h.prototype._isSupported=function(e){return!z$l.test(this._fragmentShader)||e.depthTexture},p$h.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&I$n(this),this._enabled=this.enabled,this._enabled&&(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=Q$f(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=e$2e(this._selected)?this._selected.length:0,this._parentSelectedLength=e$2e(this._parentSelected)?this._parentSelected.length:0,Z$h(this,e),k$h(this),K$d(this,e),Y$c(this,e),q$g(this),this._selectedDirty=!1,this._ready)){var i=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=i,e$2e(i)){var n,r=i.getColorTexture(0);(r.width!==e.drawingBufferWidth||r.height!==e.drawingBufferHeight||e$2e(this._blendingState))&&((!e$2e(n=this._renderState)||r.width!==n.viewport.width||r.height!==n.viewport.height)&&(this._renderState=d$1m.fromCache({viewport:new f$1a(0,0,r.width,r.height),blending:this._blendingState}))),this._command.renderState=n}}},p$h.prototype.execute=function(e,t,i,n){if(e$2e(this._command)&&e$2e(this._command.framebuffer)&&this._ready&&this._enabled){this._colorTexture=t,this._depthTexture=i,this._idTexture=n,e$1S.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.ignoreWEBGL2=!0,this._colorTexture.sampler=this._sampler);var r=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;e$2e(r)&&(r.context=e),this._command.execute(e,r)}},p$h.prototype.isDestroyed=function(){return!1},p$h.prototype.destroy=function(){return I$n(this),i$11(this)},Object.defineProperties(s$f.prototype,{ready:{get:function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)if(!e[i].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){for(var t=this._stages,i=t.length,n=0;n<i;++n)t[n].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}}),s$f.prototype._isSupported=function(e){for(var t=this._stages,i=t.length,n=0;n<i;++n)if(!t[n]._isSupported(e))return!1;return!0},s$f.prototype.get=function(e){return o$1q.typeOf.number.greaterThanOrEquals("index",e,0),o$1q.typeOf.number.lessThan("index",e,this.length),this._stages[e]},s$f.prototype.update=function(e,t){this._selectedDirty=u$j(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=e$2e(this._selected)?this._selected.length:0,this._parentSelectedLength=e$2e(this._parentSelected)?this._parentSelected.length:0;for(var i=this._stages,n=i.length,r=0;r<n;++r){var o=i[r];this._selectedDirty&&(o.parentSelected=this._combinedSelected),o.update(e,t)}},s$f.prototype.isDestroyed=function(){return!1},s$f.prototype.destroy=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)e[i].destroy();return i$11(this)},g$r.prototype.updateDependencies=function(){this._updateDependencies=!0},g$r.prototype.update=function(e){var t=this._collection,i=this._updateDependencies,n=e$2e(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),r=e$2e(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),o=e$2e(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),a=e$2e(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),s=e$2e(t.screenSpaceReflection)&&t.screenSpaceReflection.enabled,l=e$2e(t.outline)&&t.outline.enabled,u=e$2e(t.snow)&&t.snow.enabled,c=!e$2e(t._activeStages)||t._activeStages.length>0||n||r||o||a||s||l||u;if((i||!c&&this._framebuffers.length>0)&&(y$l(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),i||c){0===this._framebuffers.length&&M$l(this,e);var h=e.drawingBufferWidth,d=e.drawingBufferHeight,f=this._width!==h||this._height!==d;!i&&!f||(this._width=h,this._height=d,this._updateDependencies=!1,y$l(this),R$j(this,e))}},g$r.prototype.clear=function(e){for(var t=this._framebuffers,i=t.length,n=0;n<i;++n)t[n].clear.execute(e)},g$r.prototype.getStageByName=function(e){return this._collection.getStageByName(e)},g$r.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)},g$r.prototype.getFramebuffer=function(e){var t=this._stageNameToFramebuffer[e];if(e$2e(t))return t.buffer},g$r.prototype.isDestroyed=function(){return!1},g$r.prototype.destroy=function(){return y$l(this),i$11(this)},n$i.prototype.update=function(e,t,i){var n=t.width,r=t.height,o=this._colorTexture;if(!e$2e(o)||o.width!==n||o.height!==r||i!==this._useHdr){S$i(this),this._useHdr=i;var a=i?e.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT:_$_.UNSIGNED_BYTE;this._colorTexture=new t$U({context:e,width:n,height:r,pixelFormat:V$12.RGBA,pixelDatatype:a,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),this._idTexture=new t$U({context:e,width:n,height:r,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),e.depthTexture?(this._depthStencilTexture=new t$U({context:e,width:n,height:r,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),this._depthStencilIdTexture=new t$U({context:e,width:n,height:r,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})):(this._depthStencilRenderbuffer=new r$10({context:e,width:n,height:r,format:M$13.DEPTH_STENCIL}),this._depthStencilIdRenderbuffer=new r$10({context:e,width:n,height:r,format:M$13.DEPTH_STENCIL})),this._framebuffer=new t$V({context:e,colorTextures:[this._colorTexture],depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}),this._idFramebuffer=new t$V({context:e,colorTextures:[this._idTexture],depthStencilTexture:this._depthStencilIdTexture,depthStencilRenderbuffer:this._depthStencilIdRenderbuffer,destroyAttachments:!1})}},n$i.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._framebuffer,e$1X.clone(i,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=this._idFramebuffer,e$1X.clone(this._idClearColor,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=n},n$i.prototype.getFramebuffer=function(){return this._framebuffer},n$i.prototype.getIdFramebuffer=function(){return this._idFramebuffer},n$i.prototype.isDestroyed=function(){return!1},n$i.prototype.destroy=function(){return S$i(this),i$11(this)},s$e.prototype.get=function(e){return this._stages.get(e)},s$e.prototype.getStageByName=function(e){for(var t=this._stages.length,i=0;i<t;++i){var n=this._stages.get(i);if(n.name===e)return n}};var z$k=new e$2c,F$h=new o$1o,H$q=new o$1o,B$f=new p$1d;function Y$b(e,t,i){var n=t.uniformState,r=n.sunPositionWC,o=n.view,a=n.viewProjection,s=n.projection,l=p$1d.computeViewportTransformation(i,0,1,B$f),u=p$1d.multiplyByPoint(o,r,z$k),c=m$19.pointToGLWindowCoordinates(a,l,r,F$h);u.x+=e$2d.SOLAR_RADIUS;var h=m$19.pointToGLWindowCoordinates(s,l,u,u),d=30*o$1o.magnitude(o$1o.subtract(h,c,h))*2,f=H$q;f.x=d,f.y=d,e._uCenter=o$1o.clone(c,e._uCenter),e._uRadius=.15*Math.max(f.x,f.y);var p=t.drawingBufferWidth,_=t.drawingBufferHeight,m=e._stages.get(0),g=m.outputTexture.width,x=m.outputTexture.height,y=new f$1a;y.width=g,y.height=x,l=p$1d.computeViewportTransformation(y,0,1,B$f),c=m$19.pointToGLWindowCoordinates(a,l,r,F$h),f.x*=g/p,f.y*=x/_}s$e.prototype.clear=function(e,t,i){this._sceneFramebuffer.clear(e,t,i),this._textureCache.clear(e)},s$e.prototype.update=function(e){var t=e.context,i=e.viewport,n=this._sceneFramebuffer;n.update(t,i);var r=n.getFramebuffer();return this._textureCache.update(t),this._stages.update(t,!1),Y$b(this,t,i),r},s$e.prototype.execute=function(e){var t=this._sceneFramebuffer.getFramebuffer().getColorTexture(0),i=this._stages,n=i.length;i.get(0).execute(e,t);for(var r=1;r<n;++r)i.get(r).execute(e,i.get(r-1).outputTexture)};const Q$e=new p$1e(1,0,-.5,0,1,-.5,0,0,1);s$e.prototype.copy=function(e,t,i){if(e$2e(i)&&e$2e(i.viewport)){this._isMultiViewport=!0;var n=i.viewport,r=e.drawingBufferWidth,o=e.drawingBufferHeight,a=[n.width/r,0,(n.x+.5*n.width)/r,0,n.height/o,(n.y+.5*n.height)/o,0,0,1];p$1e.fromRowMajorArray(a,this._stMatrix3),p$1e.multiply(this._stMatrix3,Q$e,this._stMatrix3)}if(!e$2e(this._copyColorCommand)){var s=this;const t="\n uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n uniform mat3 stMatrix3;\n void main(){\n vec3 st = stMatrix3 * vec3(v_textureCoordinates, 1.0);\n gl_FragColor = texture2D(colorTexture, st.xy);\n }\n ";this._copyColorCommand=e.createViewportQuadCommand(t,{uniformMap:{colorTexture:function(){return s._stages.get(s._stages.length-1).outputTexture},stMatrix3:function(){return s._isMultiViewport?s._stMatrix3:p$1e.IDENTITY}},owner:this,shaderProgramName:"CustomPassThrough"})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e,i),this._isMultiViewport=!1},s$e.prototype.isDestroyed=function(){return!1},s$e.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),i$11(this)};var I$m={NONE:0,HORIZONTAL:1,VERTICAL:2,QUAD:3,TRIPLE:4,VerticalTrisection:5,FIVE_DIVISIONS:6,SIX_DIVISIONS:7,SEVEN_DIVISIONS:8,EIGHT_DIVISIONS:9,NINE_DIVISIONS:10},B$e=Object.freeze(I$m),_0x2521c8=(_0xaf4641=!0,function(e,t){var i=_0xaf4641?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xaf4641=!1,i}),_0x421a9b=_0x2521c8(void 0,(function(){return _0x421a9b.toString().search("(((.+)+)+)+$").toString().constructor(_0x421a9b).search("(((.+)+)+)+$")})),_0xaf4641;_0x421a9b();var _0x413ac0={BeforeExecuteCommands:0,BeforeExecuteCommandsForOnePass:1,PostExecuteCommandsForOnePass:2},k$g=Object.freeze(_0x413ac0),_0x276a99=(_0x4e8618=!0,function(e,t){var i=_0x4e8618?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e8618=!1,i}),_0x19f2e0=_0x276a99(void 0,(function(){return _0x19f2e0.toString().search("(((.+)+)+)+$").toString().constructor(_0x19f2e0).search("(((.+)+)+)+$")})),_0x4e8618;function _0x5430eb(e){this._scene=e,this._prepassRenderer=new _0x4a04df(e.context),this._clearColorCommand=new t$W({color:new e$1X,stencil:0,owner:this}),this._depthClearCommand=new t$W({depth:1,owner:this}),this._stencilClearCommand=new t$W({stencil:0}),this._classificationStencilClearCommand=new t$W({stencil:0,renderState:d$1m.fromCache({stencilMask:u$M.CLASSIFICATION_MASK})}),this._beforeExecuteCommandsEvent=new o$1h,this._beforeExecuteCommandsForOnePass=new o$1h,this._postExecuteCommandsForOnePass=new o$1h}_0x19f2e0(),Object.defineProperties(_0x5430eb.prototype,{}),_0x5430eb.prototype.executeCommands=function(e){var t=this._scene,i=t.camera,n=t.context;n.uniformState.updateCamera(i,n),this._beforeExecuteCommandsEvent.raiseEvent(this);var r=_0x4da7a0(i);this.executeCommandsForEnvironment(e,r);var o=t._environmentState,a=t._frameState.passes;o.usePrepass&&!a.pick&&!a.depth&&!a.fbo&&(a.prepass=!0,this.executeCommandsForeground(e,r),a.prepass=!1),this.executeCommandsForeground(e,r)},_0x5430eb.prototype.executeCommandsForeground=function(e,t){var i=this._scene,n=i._frameState.passes,r=i._environmentState,o=i._view,a=i._environmentVisible,s=i.camera,l=i.context,u=l.uniformState,c=r.clearGlobeDepth,h=this._depthClearCommand,d=this._clearColorCommand,f=this._stencilClearCommand,p=s.position.z,_=o.frustumCommandsList,m=_.length;0===m&&e$2e(o.globeDepth)&&r.useGlobeDepthFramebuffer&&o.globeDepth.executeCopyDepth(l,e);for(var g=0;g<m;++g){var x=m-g-1,y=_[x];i.mode===C$14.SCENE2D?(s.position.z=p-y.near+1,t.far=Math.max(1,y.far-y.near),t.near=1,u.update(i.frameState),u.updateFrustum(t)):((!n.fbo||!l.depthTexture)&&(t.near=0!==x?y.near*i.opaqueFrustumNearOffset:y.near,t.far=y.far),i.logarithmicDepthBuffer&&s._positionCartographic.height>1e5&&t.near<10&&(t.near*=1e4),u.updateFrustum(t));var v=i.debugShowGlobeDepth?_0x8127cb(i,x):o.globeDepth;if(i.debugShowGlobeDepth&&e$2e(v)&&r.useGlobeDepthFramebuffer&&(v.update(l,e,o.viewport,i._msaaSamples,i._hdr),v.clear(l,e,this._clearColorCommand.color),e.framebuffer=v.framebuffer),h.execute(l,e),n.depth&&!l.depthTexture&&d.execute(l,e),l.stencilBuffer&&f.execute(l,e),this.executeCommandsForGlobe(e,v,y),this.executeCommandsFor3DTiles(e,v,y),a.isObjectVisible){for(var $=Le$q.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW+1,b=Le$q.Particle,T=$;T<=b;++T)!this.isPassVisible(T,t)||(length=y.indices[T],this.isUpdateGlobeDepthBeforPassRender(T,length)&&e$2e(v)&&r.useGlobeDepthFramebuffer&&v.executeUpdateDepth(l,e,c),this.executeCommandsForPass(e,y,T),this.isUpdateGlobeDepthPostPassRender(T,length)&&e$2e(v)&&r.useGlobeDepthFramebuffer&&v.executeUpdateDepth(l,e,c));this.executeCommandsForTransparent(t,x,e,v,y),this.executeCommandsForPass(e,y,Le$q.ANALYSIS)}_0xb8ae9e(i,e,x)}},_0x5430eb.prototype.isPassVisible=function(e,t){var i=this._scene,n=i._environmentVisible,r=i._frameState.passes,o=r.pick,a=r.depth,s=r.normal;switch(e){case Le$q.ProjectionImage:return!o&&!a;case Le$q.TRANSLUCENT:return o&&s||!n.isOnlyS3MObjectVisible||"sqResultTexture"===frameState._fboState.name;case Le$q.ClampObject:return!t.reflect;case Le$q.Label_Billboard:return n.isBillboardVisible&&!(o&&a);default:return!(n.isOnlyS3MObjectVisible&&(e<Le$q.S3MTiles||e>Le$q.S3MTilesClampObjectColor))}},_0x5430eb.prototype.isUpdateGlobeDepthBeforPassRender=function(e,t){switch(e){case Le$q.ProjectionImage:case Le$q.S3MTilesClampObjectColor:return t>0;default:return!1}},_0x5430eb.prototype.isUpdateGlobeDepthPostPassRender=function(e,t){switch(e){case Le$q.OPAQUE:return!0;case Le$q.NonClampObject:return t>0;default:return!1}},_0x5430eb.prototype.executeCommandsForGlobe=function(e,t,i){var n=this._scene,r=n.context;const o=r.uniformState;var a=n._environmentVisible,s=n._environmentState,l=s.clearGlobeDepth,u=s.useDepthPlane,c=this._depthClearCommand,h=n._depthPlane;const d=n._globeTranslucencyState,f=d.translucent,p=n._view.globeTranslucencyFramebuffer;if(f&&d.executeGlobeCommands(i,_0x25e1a2,p,n,e),a.isGlobalVisible){if(f||this.executeCommandsForPass(e,i,Le$q.GLOBE),e$2e(t)&&s.useGlobeDepthFramebuffer&&t.executeCopyDepth(r,e),!s.renderTranslucentDepthForPick){o.updatePass(Le$q.TERRAIN_CLASSIFICATION);var _=i.commands[Le$q.TERRAIN_CLASSIFICATION],m=i.indices[Le$q.TERRAIN_CLASSIFICATION];if(f)d.executeGlobeClassificationCommands(i,_0x25e1a2,p,n,e);else for(let t=0;t<m;++t)_0x25e1a2(_[t],n,r,e)}l&&(c.execute(r,e),u&&h.execute(r,e))}},_0x5430eb.prototype.executeCommandsFor3DTiles=function(e,t,i){var n=this._scene,r=n.context,o=n._frameState.passes.pick,a=n._environmentState,s=(r=n.context,a.clearGlobeDepth),l=this._stencilClearCommand,u=0;if(!a.useInvertClassification||o)this.executeCommandsForPass(e,i,Le$q.CESIUM_3D_TILE),(u=i.indices[Le$q.CESIUM_3D_TILE])>0&&(e$2e(t)&&a.useGlobeDepthFramebuffer&&(t.prepareColorTextures(r,s),t.executeUpdateDepth(r,e,s)),this.executeCommandsForPass(e,i,Le$q.CESIUM_3D_TILE_CLASSIFICATION));else{n._invertClassification.clear(r,e);var c=e.framebuffer;e.framebuffer=n._invertClassification._fbo,this.executeCommandsForPass(e,i,Le$q.CESIUM_3D_TILE),e$2e(t)&&a.useGlobeDepthFramebuffer&&t.executeUpdateDepth(r,e,s),this.executeCommandsForPass(e,i,Le$q.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),e.framebuffer=c,n._invertClassification.executeClassified(r,e),1===n.frameState.invertClassificationColor.alpha&&n._invertClassification.executeUnclassified(r,e),u>0&&r.stencilBuffer&&clearClassificationStencil.execute(r,e),this.executeCommandsForPass(e,i,Le$q.CESIUM_3D_TILE_CLASSIFICATION)}u>0&&r.stencilBuffer&&l.execute(r,e)},_0x5430eb.prototype.executeCommandsForTransparent=function(e,t,i,n,r){var o,a=this._scene,s=a.context.uniformState,l=a._frameState,u=a._environmentVisible,c=a._environmentState,h=(a.context,a._frameState.passes),d=h.pick,f=_0x411040(a);if(0!==t&&a.mode!==C$14.SCENE2D&&(e.near=r.near,s.updateFrustum(e)),!d&&c.useInvertClassification&&a.frameState.invertClassificationColor.alpha<1&&(o=a._invertClassification),h.pick&&h.normal||!u.isOnlyS3MObjectVisible||"sqResultTexture"===l._fboState.name){s.updatePass(Le$q.TRANSLUCENT);var p=r.commands[Le$q.TRANSLUCENT];p.length=r.indices[Le$q.TRANSLUCENT],"sqResultTexture"===l._fboState.name&&(p=p.filter((function(e){return"sqResultTexture"===e.owner}))),this._beforeExecuteCommandsForOnePass.raiseEvent(Le$q.TRANSLUCENT,this),f(a,_0x25e1a2,i,p,o),this._postExecuteCommandsForOnePass.raiseEvent(Le$q.TRANSLUCENT,this)}},_0x5430eb.prototype.executeCommandsForPass=function(e,t,i){this._beforeExecuteCommandsForOnePass.raiseEvent(i,this);var n=this._scene,r=n.context;r.uniformState.updatePass(i);for(var o=t.commands[i],a=t.indices[i],s=0;s<a;++s)_0x25e1a2(o[s],n,r,e);this._postExecuteCommandsForOnePass.raiseEvent(i,this)},_0x5430eb.prototype.updateAndExecuteCommands=function(e,t){var i=this._scene,n=i._context,r=n.uniformState,o=e.viewport;o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight;var a=i._frameState,s=a.camera,l=a.mode,u=(h=a.passes).pick;if(i._useWebVR&&l!==C$14.SCENE2D)_0x43de4f(i,e,t,this);else if(a._fboState.enabled||i._multiViewportMode===B$e.NONE)this.updateAndClearFramebuffers(e,t),l!==C$14.SCENE2D||i._mapMode2D===Rr$3.ROTATE?this.executeCommandsInViewport(!0,e):this.execute2DViewportCommands(e);else{this.updateAndClearFramebuffers(e,t);for(var c=0;c<i._multiViewportInfo.length;c++)if(!u||i._frameState.multiViewportIndex===c){u=(h=i._frameState.passes).pick;var h,d=h.fbo,f=i._environmentState.useWebVR;i._environmentState.isSunVisible&&i.sunBloom&&!f&&!d&&(e.framebuffer=i._sunPostProcess._sceneFramebuffer.getFramebuffer());var p=i._multiViewportInfo[c];o.x=n.drawingBufferWidth*p.x,o.y=n.drawingBufferHeight*p.y,o.width=n.drawingBufferWidth*p.width,o.height=n.drawingBufferHeight*p.height,s.frustum.aspectRatio=o.width/o.height,u&&(o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight),r.update(a),i._frameState.multiViewportIndex=c,a.cullingVolume=a.camera.frustum.computeCullingVolume(a.camera.positionWC,a.camera.directionWC,a.camera.upWC),this.executeCommandsInViewport(0==c||u,e),n.webgpu&&n.engine.flushFramebuffer()}}},_0x5430eb.prototype.updateAndExecuteCommandsForPostEffect=function(e,t){var i=this._scene._context,n=e.viewport;n.x=0,n.y=0,n.width=i.drawingBufferWidth,n.height=i.drawingBufferHeight;var r=t,o=this._clearColorCommand;e$1X.clone(r,o.color),o.execute(i,e),this.executeCommandsInViewport(!0,e)},_0x5430eb.prototype.executeOverlayCommands=function(e){var t=this._scene,i=t.context.uniformState;i.updatePass(Le$q.OVERLAY);var n=t.context,r=t._frameState,o=t._view.viewport;if(o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight,e.viewport=f$1a.clone(o,e.viewport),t._multiViewportMode===B$e.NONE)_0x5406ba(this,t,e);else{for(var a=0;a<t._multiViewportInfo.length;a++)if(!r.passes.pick||t._frameState.multiViewportIndex===a){r.multiViewportIndex=a;var s=t._multiViewportInfo[a];o.x=n.drawingBufferWidth*s.x,o.y=n.drawingBufferHeight*s.y,o.width=n.drawingBufferWidth*s.width,o.height=n.drawingBufferHeight*s.height,r.camera.frustum.aspectRatio=o.width/o.height,r.passes.pick&&(o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight),e.viewport=f$1a.clone(o),i.update(r),_0x5406ba(this,t,e)}o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight,e.viewport=f$1a.clone(o)}};var _0x41dbc1=new f$1a;function _0x5406ba(e,t,i){var n=t.context,r=t._frameState.passes,o=t._view.globeDepth,a=t._environmentState,s=a.renderTranslucentDepthForPick,l=t._logDepthOverlayCommandList,u=l.length;if(u>0)for(var c=0;c<u;++c){var h=l[c];(r=t._frameState.passes).pick||r.depth?_0x25e1a2(l[c],t,n,i):(h=h.derivedCommands.logDepth.command).execute(n,i)}u=(l=t._overlayCommandList).length;for(c=0;c<u;++c){h=l[c];(r=t._frameState.passes).pick||r.depth?_0x25e1a2(l[c],t,n,i):h.execute(n,i)}if(!r.fbo&&n.depthTexture&&t.useDepthPicking&&(a.useGlobeDepthFramebuffer||s)){var d=s?i.framebuffer.depthStencilTexture:o.depthStencilTexture;e$2e(d)||(d=o.depthStencilTexture);var f=t._picking.getPickDepth(t,0);f.update(n,d),f.executeCopyDepth(n,i)}if((u=(l=t._overlayAgainstDepthCommandList).length)>0){e._depthClearCommand.execute(t._context,i);for(c=0;c<u;++c)if(t.frameState.passes.pick){(h=t._hdr&&t.logarithmicDepthBuffer?l[c].derivedCommands.logDepth.command.derivedCommands.picking.pickCommand:l[c].derivedCommands.picking.pickCommand).execute(t._context,i)}else l[c].execute(n,i)}}_0x5430eb.prototype.resolveFramebuffers=function(e){var t=this._scene,i=t._context,n=t._frameState,r=t._environmentState,o=t._view;const a=o.globeDepth;e$2e(a)&&a.prepareColorTextures(i);var s=t.voxelGridPostRender,l=t.particlePostRender,u=t.particleTrailsPostRenderer,c=n.passes.pick,h=r.useOIT,d=e$2e(s)&&s.enable,f=r.useGlobeDepthFramebuffer,p=r.usePostProcess;r.usePostEffect,n._fboState.frameBufferType,Qe$c.NORMAL_AND_DEPTH;var _=r.originalFramebuffer,m=f?o.globeDepth.framebufferWithTexture:void 0,g=o.sceneFramebuffer.getFramebuffer(),x=o.sceneFramebuffer.getIdFramebuffer();if(e$2e(u)&&!c&&u.execute(i,e),e$2e(s)){if(e.framebuffer=p?g:_,h){var y=s.getOutputFramebuffer();e$2e(y)&&(e.framebuffer=y,o.oit.setOpaqueTexture(y.getColorTexture(0)))}s.execute(i,e)}if(h&&(e.framebuffer=p?g:_,o.oit.execute(i,e)),e$2e(l)&&l.execute(i,e),p){var v=g;f&&!h&&!d&&(v=m),t.compositor.outputFbo=v;var $=t.postProcessStages,b=v.getColorTexture(0),T=x.getColorTexture(0),C=u$Z(m,g).depthStencilTexture;$.execute(i,b,C,T),$.copy(i,_,n.useLogDepth),t.compositor.outputFbo=void 0}!h&&!p&&f&&(e.framebuffer=_,f$1a.clone(e.viewport,_0x41dbc1),e.viewport.x=0,e.viewport.y=0,e.viewport.width=i.drawingBufferWidth,e.viewport.height=i.drawingBufferHeight,o.globeDepth.executeCopyColor(i,e),f$1a.clone(_0x41dbc1,e.viewport));var S=n.useLogDepth;t.debugShowGlobeDepth&&f&&_0x8127cb(t,t.debugShowDepthFrustum-1).executeDebugGlobeDepth(i,e,S);t.debugShowPickDepth&&f&&t._picking.getPickDepth(t,t.debugShowDepthFrustum-1).executeDebugPickDepth(i,e,S)},_0x5430eb.prototype.updateShadowMaps=function(){var e=this._scene,t=e._frameState,i=t.shadowMaps,n=i.length,r=n>0&&!t.passes.pick&&e.mode===C$14.SCENE3D;if(r!==t.shadowState.shadowsEnabled&&(++t.shadowState.lastDirtyTime,t.shadowState.shadowsEnabled=r),t.shadowState.lightShadowsEnabled=!1,r){for(var o=0;o<n;++o)if(i[o]!==t.shadowState.shadowMaps[o]){++t.shadowState.lastDirtyTime;break}t.shadowState.shadowMaps.length=0,t.shadowState.lightShadowMaps.length=0;for(var a=0;a<n;++a){var s=i[a];s.update(t),t.shadowState.shadowMaps.push(s),s.fromLightSource&&(t.shadowState.lightShadowMaps.push(s),t.shadowState.lightShadowsEnabled=!0),s.dirty&&(++t.shadowState.lastDirtyTime,s.dirty=!1)}}},_0x5430eb.prototype.updateAndRenderPrimitives=function(e){var t=this._scene,i=t._frameState,n=t._context,r=i.commandList;t._groundPrimitives.update(i),t._primitives.update(i),_0x48eb3f(t),e&&this.updateShadowMaps();var o=t.layers.update(n,i,r,!0);if(i.rasterLayerIds=o,t._globe){for(var a in t._vectorTileSource._hash){(s=t._vectorTileSource.get(a))instanceof M$S&&s.resetVisible()}t._globe.render(i)}for(var a in i.rasterLayerIds=void 0,t.layers.update(n,i,r),t.layers.updateTextVisible(n,i),t._analyst3D.update(n,i,r),t._vectorTileMaps.update(n,i,r),t._plotLayers.update(i,n,r),t._vectorTileSource._hash){var s;(s=t._vectorTileSource.get(a)).update(n,i,r)}},_0x5430eb.prototype.updateAndClearFramebuffers=function(e,t){var i=this._scene,n=i._context,r=i._frameState,o=i._environmentState,a=i._view,s=i._frameState.passes,l=s.pick,u=s.fbo,c=o.useWebVR;o.originalFramebuffer=e.framebuffer,e$2e(i.sun)&&i.sunBloom!==i._sunBloom?(i.sunBloom&&!c?i._sunPostProcess=new s$e:e$2e(i._sunPostProcess)&&(i._sunPostProcess=i._sunPostProcess.destroy()),i._sunBloom=i.sunBloom):!e$2e(i.sun)&&e$2e(i._sunPostProcess)&&(i._sunPostProcess=i._sunPostProcess.destroy(),i._sunBloom=!1);var h=this._clearColorCommand;e$1X.clone(t,h.color),h.execute(n,e);var d=o.useGlobeDepthFramebuffer=(i._enableCompositor||l)&&e$2e(a.globeDepth);d&&(a.globeDepth.update(n,e,a.viewport,i._msaaSamples,i._hdr||i._pickPointEnabled),a.globeDepth.clear(n,e,t));var f=a.oit,p=o.useOIT=i._enableCompositor&&!u&&!l&&e$2e(f)&&f.isSupported();p&&(f.update(n,e,a.globeDepth.framebufferWithTexture,i._hdr||i._pickPointEnabled,i._msaaSamples),f.clear(n,e,t),o.useOIT=f.isSupported()),e$2e(i.voxelGridPostRender)&&n.depthTexture&&(i.voxelGridPostRender.update(r,a.globeDepth.framebufferWithTexture,i._hdr),i.voxelGridPostRender.clear(n,e)),e$2e(i.particlePostRender)&&(i.particlePostRender.update(r,i._hdr),i.particlePostRender.clear(n,e)),e$2e(i.particleTrailsPostRenderer)&&!l&&_0x330899(i,e);var _=i.postProcessStages,m=_.screenSpaceReflection;if((o.usePrepass=m.enabled)&&!l){var g=this._prepassRenderer;g.update(a.globeDepth.framebufferWithTexture),g.clear(n,e,t)}var x,y=o.usePostProcess=i._enableCompositor&&!u&&!l&&(i._hdr||_.length>0||_.ambientOcclusion.enabled||_.fxaa.enabled||_.bloom.enabled||_.smaa.enabled);(o.usePostProcessSelected=!1,y)&&(a.sceneFramebuffer.update(n,a.viewport,i._hdr),a.sceneFramebuffer.clear(n,e,t),_.update(n,r.useLogDepth,i._hdr,i),_.clear(n),y=o.usePostProcess=_.ready,o.usePostProcessSelected=y&&_.hasSelected,(o.usePostEffect=e$2e(i.compositor)&&i.compositor.isEnable())&&(i.compositor.update(n,e,i,r),i.compositor.clear(n,t),_.compositor=i.compositor));if(o.isSunVisible&&i.sunBloom&&!c&&!u?(e.framebuffer=i._sunPostProcess.update(e),i._sunPostProcess.clear(n,e,t)):d?r._fboState.frameBufferType!==Qe$c.CLAMP&&(e.framebuffer=a.globeDepth.framebuffer):y&&(e.framebuffer=a.sceneFramebuffer.getFramebuffer()),e$2e(e.framebuffer)&&h.execute(n,e),o.useInvertClassification=!l&&e$2e(e.framebuffer)&&i.invertClassification)if(1===i.frameState.invertClassificationColor.alpha&&o.useGlobeDepthFramebuffer&&(x=a.globeDepth.framebuffer),e$2e(x)||n.depthTexture){if(i._invertClassification.previousFramebuffer=x,i._invertClassification.update(n),i._invertClassification.clear(n,e),i.frameState.invertClassificationColor.alpha<1&&p){var v=i._invertClassification.unclassifiedCommand,$=v.derivedCommands;$.oit=f.createDerivedCommands(v,n,$.oit)}}else o.useInvertClassification=!1;i._globeTranslucencyState.translucent&&a.globeTranslucencyFramebuffer.updateAndClear(i._hdr,a.viewport,n,e)};var _0x348c45=new a$18(Math.PI,e$2d.PI_OVER_TWO),_0x4fd01e=new o$1p,_0xb89632=new o$1p,_0x1fb4f4=new p$1d,_0xb8a3c0=new p$1d,_0x13adaf=new o$1p,_0x492749=new o$1p,_0x3e1e1b=new f$1a;function _0xb8ae9e(e,t,i){if(!e._frameState.passes.fbo){var n=e.context,r=e._environmentState,o=e._view.globeDepth;if(n.depthTexture&&e.useDepthPicking&&r.useGlobeDepthFramebuffer){if(s=e$2e(t.framebuffer)&&e$2e(t.framebuffer.depthStencilTexture)?t.framebuffer.depthStencilTexture:o.depthStencilTexture,!e$2e(s))return;(a=e._picking.getPickDepth(e,i)).update(n,s),a.executeCopyDepth(n,t)}else if(e$2e(t.framebuffer)&&e$2e(t.framebuffer.getColorTexture(0))){var a,s=t.framebuffer.getColorTexture(0);(a=e._picking.getPickDepth(e,i)).update(n,s),a.executeCopyDepth(n,t)}}}function _0x25e1a2(e,t,i,n){var r=t._frameState,o=r.passes;if(e.debugShowBoundingVolume&&e$2e(e.boundingVolume)&&_0x5993b9.debugShowBoundingVolume(e,t,n,debugFramebuffer),r.useLogDepth&&e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command),!o.pick&&t._hdr&&e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),!o.pick&&t.maskEnabled&&e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.mask)&&(e=e.derivedCommands.mask.command),o.pick&&o.normal){if(!e$2e(e.derivedCommands))return;(e=e.derivedCommands.normal.command).execute(i,n)}else{if(o.prepass){if(!e$2e(e.derivedCommands)||!e$2e(e.derivedCommands.prepass))return;return(e=e.derivedCommands.prepass.command).framebuffer=t._renderPipeline._prepassRenderer.framebuffer,void e.execute(i,n)}if(o.pick||o.depth){if(!e$2e(e.derivedCommands))return;if(o.pick&&!o.depth&&e$2e(e.derivedCommands.picking))return void(e=e.derivedCommands.picking.pickCommand).execute(i,n);if(o.depth&&e$2e(e.derivedCommands.depth)){if(e.pass===Le$q.ANALYSIS||!e.renderState.depthTest.enabled)return;return void(e=e.derivedCommands.depth.depthOnlyCommand).execute(i,n)}}t.debugShowCommands||t.debugShowFrustums?_0x5993b9.executeDebugCommand(e,t,n):r.shadowState.lightShadowsEnabled&&e.receiveShadows&&e$2e(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(i,n):e.execute(i,n)}}function _0x552234(e,t,i,n){var r=t._frameState,o=e.derivedCommands;!e$2e(o)||(r.useLogDepth&&e$2e(o.logDepth)&&(e=o.logDepth.command),e$2e((o=e.derivedCommands).picking)?(e=o.picking.pickCommand).execute(i,n):e$2e(o.depth)&&(e=o.depth.depthOnlyCommand).execute(i,n))}function _0x1dc6d9(e,t,i){return t.boundingVolume.distanceSquaredTo(i)-e.boundingVolume.distanceSquaredTo(i)}function _0x493dd4(e,t,i){return e.boundingVolume.distanceSquaredTo(i)-t.boundingVolume.distanceSquaredTo(i)+e$2d.EPSILON12}function _0x508753(e,t,i,n,r){var o=e.context;m$I(n,_0x1dc6d9,e.camera.positionWC),e$2e(r)&&t(r.unclassifiedCommand,e,o,i);for(var a=n.length,s=0;s<a;++s)t(n[s],e,o,i)}function _0x1f895b(e,t,i,n,r){var o=e.context;m$I(n,_0x493dd4,e.camera.positionWC),e$2e(r)&&t(r.unclassifiedCommand,e,o,i);for(var a=n.length,s=e.frameState.passes,l=0;l<a;++l)s.pick&&!e$2e(n[l].pickId)&&!s.depth||t(n[l],e,o,i)}function _0x411040(e){var t,i=e._frameState.passes,n=e.context,r=e._environmentState,o=e._view;return r.useOIT?(e$2e(e._executeOITFunction)||(e._executeOITFunction=function(e,t,i,r,a){o.globeDepth.prepareColorTextures(n),o.oit.executeCommands(e,t,i,r,a)}),t=e._executeOITFunction):t=i.render?_0x508753:_0x1f895b,t}function _0x43d853(e,t,i){for(var n=i.shadowMapCullingVolume,r=i.isPointLight,o=i.passes,a=o.length,s=t.length,l=0;l<s;++l){var u=t[l];if(e.updateDerivedCommands(u),u.castShadows&&(u.pass===Le$q.GLOBE||u.pass===Le$q.CESIUM_3D_TILE||u.pass>=Le$q.S3MTiles&&u.pass<=Le$q.TRANSLUCENT)&&e.isVisible(u,n))if(r)for(var c=0;c<a;++c)o[c].commandList.push(u);else if(1===a)o[0].commandList.push(u);else for(var h=!1,d=a-1;d>=0;--d){var f=o[d].cullingVolume;if(e.isVisible(u,f))o[d].commandList.push(u),h=!0;else if(h)break}}}function _0x4f389e(e){var t=e.frameState,i=t.shadowState.shadowMaps,n=i.length;if(t.shadowState.shadowsEnabled)for(var r=e.context,o=r.uniformState,a=0;a<n;++a){var s=i[a];if(!s.outOfView){var l,u=s.passes,c=u.length;for(l=0;l<c;++l)u[l].commandList.length=0;for(_0x43d853(e,e.frameState.commandList,s),l=0;l<c;++l){var h=s.passes[l];h.camera._scene=e,o.updateCamera(h.camera,r),s.updatePass(r,l);for(var d=h.commandList.length,f=0;f<d;++f){var p=h.commandList[f];o.updatePass(p.pass),_0x25e1a2(p.derivedCommands.shadows.castCommands[a],e,r,h.passState)}r.webgpu&&r.engine.flushFramebuffer()}}}}function _0x3b1553(e){e.context.uniformState.updatePass(Le$q.COMPUTE);var t=e._environmentState.sunComputeCommand;e$2e(t)&&t.execute(e._computeEngine);for(var i=e._computeCommandList,n=i.length,r=0;r<n;++r)i[r].execute(e._computeEngine)}_0x5430eb.prototype.execute2DViewportCommands=function(e){var t=this._scene,i=t.context,n=t.frameState,r=t.camera,o=e.viewport,a=f$1a.clone(o,_0x3e1e1b);e.viewport=a;var s=_0x348c45,l=_0x4fd01e;t.mapProjection.project(s,l);var u=o$1p.clone(r.position,_0xb89632),c=p$1d.clone(r.transform,_0xb8a3c0),h=r.frustum.clone();r._setTransform(p$1d.IDENTITY);var d=p$1d.computeViewportTransformation(a,0,1,_0x1fb4f4),f=r.frustum.projectionMatrix,p=r.positionWC.y,_=o$1p.fromElements(e$2d.sign(p)*l.x-p,0,-r.positionWC.x,_0x13adaf),m=m$19.pointToGLWindowCoordinates(f,d,_,_0x492749);m.x=Math.floor(m.x);var g=a.x,x=a.width;if(0===p||m.x<=g||m.x>=g+x)this.executeCommandsInViewport(!0,e);else if(Math.abs(g+.5*x-m.x)<1)a.width=m.x-a.x,r.position.x*=e$2d.sign(r.position.x),r.frustum.right=0,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!0,e),a.x=m.x,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=0,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!1,e);else if(m.x>g+.5*x){a.width=m.x-g;var y=r.frustum.right;r.frustum.right=l.x-p,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!0,e),a.x=m.x,a.width=g+x-m.x,r.position.x=-r.position.x,r.frustum.left=-r.frustum.right,r.frustum.right=y-2*r.frustum.right,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!1,e)}else{a.x=m.x,a.width=g+x-m.x;var v=r.frustum.left;r.frustum.left=-l.x-p,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!0,e),a.x=g,a.width=m.x-g,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=v-2*r.frustum.left,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!1,e)}r._setTransform(c),o$1p.clone(u,r.position),r.frustum=h.clone(),e.viewport=o},_0x5430eb.prototype.executeCommandsInViewport=function(e,t,i){var n=this._scene,r=n._environmentState,o=n._view,a=r.renderTranslucentDepthForPick;!e&&!a&&(n.frameState.commandList.length=0),(!a||n._frameState.multiViewportIndex>-1)&&this.updateAndRenderPrimitives(e),o.createPotentiallyVisibleSet(n),e&&(e$2e(i)&&this.updateAndClearFramebuffers(t,i),a||(_0x3b1553(n),_0x4f389e(n))),this.executeCommands(t)},_0x5430eb.prototype.executeIdCommands=function(e,t,i){var n=this._scene,r=n._view,o=n._environmentState,a=o.clearGlobeDepth,s=o.useDepthPlane,l=this._depthClearCommand,u=n._depthPlane,c=n.context,h=c.uniformState,d=e.framebuffer;e.framebuffer=r.sceneFramebuffer.getIdFramebuffer(),t.near=0!==index?i.near*n.opaqueFrustumNearOffset:i.near,t.far=i.far,h.updateFrustum(t),h.updatePass(Le$q.GLOBE);var f=i.commands[Le$q.GLOBE],p=i.indices[Le$q.GLOBE];for(j=0;j<p;++j)_0x552234(f[j],n,c,e);for(a&&(l.framebuffer=e.framebuffer,l.execute(c,e),l.framebuffer=void 0),a&&s&&u.execute(c,e),h.updatePass(Le$q.CESIUM_3D_TILE),f=i.commands[Le$q.CESIUM_3D_TILE],p=i.indices[Le$q.CESIUM_3D_TILE],j=0;j<p;++j)_0x552234(f[j],n,c,e);for(h.updatePass(Le$q.OPAQUE),f=i.commands[Le$q.OPAQUE],p=i.indices[Le$q.OPAQUE],j=0;j<p;++j)_0x552234(f[j],n,c,e);for(h.updatePass(Le$q.TRANSLUCENT),f=i.commands[Le$q.TRANSLUCENT],p=i.indices[Le$q.TRANSLUCENT],j=0;j<p;++j)_0x552234(f[j],n,c,e);e.framebuffer=d},_0x5430eb.prototype.executeCommandsForEnvironment=function(e,t){var i=this._scene,n=i.camera,r=i.context,o=r.uniformState,a=i._frameState.passes;if(!a.pick){t.near=n.frustum.near,t.far=n.frustum.far;var s=t.reflect;t.reflect=!1,o.updateFrustum(t);var l=i._environmentState,u=i._environmentVisible,c=l.skyBoxCommand,h=l.useWebVR,d=i._view;if(o.updatePass(Le$q.ENVIRONMENT),e$2e(c)&&u.isSkyBoxVisible&&_0x25e1a2(c,i,r,e),l.isSkyAtmosphereVisible&&u.isSkyAtmosphereVisible&&_0x25e1a2(l.skyAtmosphereCommand,i,r,e),l.isUnderGlobeVisible&&u.isUnderGlobeVisible&&l.underGlobeCommand.execute(r,e),l.isSunVisible&&u.isSunVisible&&!a.fbo&&(l.sunDrawCommand.execute(r,e),i.sunBloom&&!h)){var f;f=l.useGlobeDepthFramebuffer?d.globeDepth.framebuffer:l.usePostProcess?d.sceneFramebuffer.getFramebuffer():l.originalFramebuffer;var p=i._multiViewportMode!==B$e.NONE;i._sunPostProcess.execute(r),i._sunPostProcess.copy(r,f,p?e:void 0),e.framebuffer=f}l.isMoonVisible&&u.isMoonVisible&&l.moonCommand.execute(r,e),t.reflect=s}};var _0x7faed4=new o$15,_0x4fe6e9=new l$10,_0x4a2b1c=new a$V,_0x1cc094=new l$11;function _0x4da7a0(e){return e$2e(e.frustum.fov)?e.frustum.clone(_0x7faed4):e$2e(e.frustum.infiniteProjectionMatrix)?e.frustum.clone(_0x4fe6e9):e$2e(e.frustum.width)?e.frustum.clone(_0x4a2b1c):e.frustum.clone(_0x1cc094)}function _0x330899(e,t){for(var i=e._context,n=e._frameState,r=e._view.camera,o=0,a=e._layers.layerQueue.length;o<a;o++){var s=e._layers.layerQueue[o];if("FieldLayer3D"===s._type)(c=s._particleVelocityFieldEffect)._showParticleTrails&&e$2e(c._lastParticleStateTexture)&&(c.clearLastParticleStateTexture(r,e._hdr,i,t),e.particleTrailsPostRenderer._particleStateTexture=c._lastParticleStateTexture,e.particleTrailsPostRenderer.update(n))}for(var l=0,u=e._primitives.length;l<u;l++){var c,h=e._primitives._primitives[l];if("FieldLayer3D"==h.type)(c=h._particleVelocityFieldEffect)._showParticleTrails&&e$2e(c._lastParticleStateTexture)&&(c.clearLastParticleStateTexture(r,e._hdr,i,t),e.particleTrailsPostRenderer._particleStateTexture=c._lastParticleStateTexture,e.particleTrailsPostRenderer.update(n))}}function _0x48eb3f(e){var t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new p$V({camera:e.camera,updateOnChange:!1}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),e$2e(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function _0x8127cb(e,t){var i=e._view.debugGlobeDepths,n=i[t];return!e$2e(n)&&e.context.depthTexture&&(n=new GlobeDepth,i[t]=n),n}function _0x43de4f(e,t,i,n){var r=e._view,o=r.camera,a=e._environmentState.renderTranslucentDepthForPick;n.updateAndClearFramebuffers(t,i),a||n.updateAndRenderPrimitives(e),r.createPotentiallyVisibleSet(e),a||(_0x3b1553(e),_0x4f389e(e));var s=t.viewport;s.x=0,s.y=0,s.width=.5*s.width;var l=v$K.clone(o,e._cameraVR);l.frustum=o.frustum;var u=o.frustum.near,c=u*u$Z(e.focalLength,5),h=u$Z(e.eyeSeparation,c/30),d=o$1p.multiplyByScalar(l.right,.5*h,new o$1p(0,0,0));o.frustum.aspectRatio=s.width/s.height;var f=.5*h*u/c;o$1p.add(l.position,d,o.position),o.frustum.xOffset=f,n.executeCommands(t),s.x=s.width,o$1p.subtract(l.position,d,o.position),o.frustum.xOffset=-f,n.executeCommands(t),v$K.clone(l,o)}_0x5430eb.prototype._listenerTypeToEvent=function(e){var t=null;switch(e){case k$g.BeforeExecuteCommands:t=this._beforeExecuteCommandsEvent;break;case k$g.BeforeExecuteCommandsForOnePass:t=this._beforeExecuteCommandsForOnePass;break;case k$g.PostExecuteCommandsForOnePass:t=this._postExecuteCommandsForOnePass}return t},_0x5430eb.prototype.addEventListener=function(e,t,i){this._listenerTypeToEvent(e).addEventListener(t,i)},_0x5430eb.prototype.removeEventListener=function(e,t,i){this._listenerTypeToEvent(e).removeEventListener(t,i)},_0x5430eb.prototype.isDestroyed=function(){return!1},_0x5430eb.prototype.destroy=function(){return i$11(this)};var _0x5ece9f=(_0x436cb1=!0,function(e,t){var i=_0x436cb1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x436cb1=!1,i}),_0x35c2b9=_0x5ece9f(void 0,(function(){return _0x35c2b9.toString().search("(((.+)+)+)+$").toString().constructor(_0x35c2b9).search("(((.+)+)+)+$")})),_0x436cb1;function _0x23bf52(){}_0x35c2b9(),_0x23bf52.maxVBOSize=0;var _0x22e075=0,_0x5074f7=0,_0xd11576=1048576,_0xf84263={},_0x139076=new e$1Q;_0x23bf52.createVertexBuffer=function(e,t){var i;if(e$2e(_0xf84263[e.id])){i=_0xf84263[e.id];for(var n,r=t.byteLength,o=Object.keys(i._hash),a=!1,s=0,l=o.length;s<l;s++)if((n=Number(o[s]))>=r&&n<r+1024){a=!0;break}var u;if(a){var c=i.get(n);(u=c.pop()).isCached=!1,u.copyFromArrayView(t,0),_0x22e075-=n,c.length<1&&i.remove(n)}return u}},_0x23bf52.createIndexBuffer=function(e,t){var i;if(e$2e(_0x139076[e.id])){i=_0x139076[e.id];for(var n,r=t.byteLength,o=Object.keys(i._hash),a=!1,s=0,l=o.length;s<l;s++)if((n=Number(o[s]))===r){a=!0;break}var u;if(a){var c=i.get(n);(u=c.pop()).isCached=!1,u.copyFromArrayView(t,0),_0x5074f7-=n,c.length<1&&i.remove(n)}return u}},_0x23bf52.deleteBuffer=function(e){if(e$2e(_0xf84263[e.id])){var t,i,n,r,o=_0xf84263[e.id],a=_0xd11576*_0x23bf52.maxVBOSize*.9;if(_0x22e075>a*_0xd11576){var s=a*_0xd11576;for(i=(t=Object.keys(o._hash)).length,n=0;n<i&&_0x22e075>s;){r=t[n];for(var l=o.get(r);l.length&&_0x22e075>s;){l.pop().destroy(),_0x22e075-=r}l.length<1&&o.remove(r),++n}}if(e$2e(_0x139076[e.id])){var u=_0x139076[e.id],c=_0xd11576*_0x23bf52.maxVBOSize*.1;if(_0x5074f7>c*_0xd11576){var h=c*_0xd11576;for(i=(t=Object.keys(u._hash)).length,n=0;n<i&&_0x5074f7>h;){r=t[n];for(var d=u.get(r);d.length&&_0x5074f7>h;){d.pop().destroy(),_0x5074f7-=r}d.length<1&&u.remove(r),++n}}}}},_0x23bf52.deleteVertexArray=function(e,t){var i,n;e$2e(_0xf84263[e.id])||(_0xf84263[e.id]=new e$1Q),i=_0xf84263[e.id];for(var r=t._attributes,o=.9*_0x23bf52.maxVBOSize,a=0;a<r.length;++a){var s=r[a].vertexBuffer;if(!(_0x22e075>=o||s.isCached||s.vertexArrayDestroyable)){var l=s.sizeInBytes;i.contains(l)?i.get(l).push(s):i.set(l,[s]),s.isCached=!0,_0x22e075+=l}}e$2e(_0x139076[e.id])||(_0x139076[e.id]=new e$1Q),n=_0x139076[e.id];var u=t._indexBuffer;return.1*_0x23bf52.maxVBOSize>_0x5074f7&&e$2e(u)&&!u.isCached&&!u.vertexArrayDestroyable&&(n.contains(u.sizeInBytes)?n.get(u.sizeInBytes).push(u):n.set(u.sizeInBytes,[u]),u.isCached=!0,_0x5074f7+=u.sizeInBytes),t.destroy()};var _0x5f46c2=(_0x28d903=!0,function(e,t){var i=_0x28d903?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28d903=!1,i}),_0x44da28=_0x5f46c2(void 0,(function(){return _0x44da28.toString().search("(((.+)+)+)+$").toString().constructor(_0x44da28).search("(((.+)+)+)+$")})),_0x28d903;function _0x15cf65(e){this._longitude=u$Z(e.longitude,0),this._latitude=u$Z(e.latitude,0),this._altitude=u$Z(e.altitude,0),this._scale=u$Z(e.scale,new o$1p(1,1,1)),this._color=u$Z(e.color,e$1X.WHITE),this._heading=u$Z(e.heading,Math.PI/2),this._pitch=u$Z(e.pitch,0),this._roll=u$Z(e.roll,0),this._startDirection=u$Z(e.startDirection,0),this._offset=u$Z(e.offset,new o$1p),this._timeStamp=u$Z(e.timeStamp,-1),this._id=u$Z(e.id,e$1T()),this._description=e.description,this._lockOrientation=u$Z(e.lockOrientation,!1)}_0x44da28(),Object.defineProperties(_0x15cf65.prototype,{longitude:{get:function(){return this._longitude},set:function(e){this._longitude=e}},latitude:{get:function(){return this._latitude},set:function(e){this._latitude=e}},altitude:{get:function(){return this._altitude},set:function(e){this._altitude=e}},scale:{get:function(){return this._scale},set:function(e){this._scale=e}},color:{get:function(){return this._color},set:function(e){this._color=e}},heading:{get:function(){return this._heading},set:function(e){this._heading=e}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e}},roll:{get:function(){return this._roll},set:function(e){this._roll=e}},startDirection:{get:function(){return this._startDirection},set:function(e){this._startDirection=e}},offset:{get:function(){return this._offset},set:function(e){this._offset=e}},timeStamp:{get:function(){return this._timeStamp},set:function(e){this._timeStamp=e}},id:{get:function(){return this._id},set:function(e){this._id=e}},description:{get:function(){return this._description},set:function(e){this._description=e}},lockOrientation:{get:function(){return this._lockOrientation},set:function(e){this._lockOrientation=e}}}),_0x15cf65.clone=function(e){return new _0x15cf65({longitude:e._longitude,latitude:e._latitude,altitude:e._altitude,scale:e._scale,color:e._color,heading:e._heading,pitch:e._pitch,roll:e._roll,startDirection:e._startDirection,offset:e._offset,lockOrientation:e._lockOrientation})};var _0x95df15=(_0x31334f=!0,function(e,t){var i=_0x31334f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31334f=!1,i}),_0x3ad990=_0x95df15(void 0,(function(){return _0x3ad990.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ad990).search("(((.+)+)+)+$")})),_0x31334f;_0x3ad990();var _0x41f4a0="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TEXTURE\nattribute vec4 aTexCoord0;\n#endif\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\nattribute vec4 aPreHxyzLx;\nattribute vec4 aPreLyzNextHxy;\nattribute vec4 aNextHzLxyz;\nattribute vec4 aPreOrientation;\nattribute vec4 aNextOrientation;\nattribute vec4 aColorAndPickColor;\nattribute vec3 aPreHpr;\nattribute vec3 aNextHpr;\nattribute vec3 aScale;\n#include <SceneUboDecl>\nuniform vec3 uOffset;\nuniform mat4 uGeoMatrix;\nuniform float uInterval;\nuniform float uFilterMode;\nuniform float uMaxVisibleDistance;\nuniform float uFilterPixel;\nuniform float uRadius;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying vec3 vNormalEC;\nvarying mat4 vModelMatrix;\n\nvec4 vertexColor = vec4(1.0);\nvec4 quaternionfromAxisAngle(vec3 axis, float angle)\n{\n float halfAngle = angle * 0.5;\n float s = sin(halfAngle);\n vec3 fromAxis = normalize(axis);\n return vec4(fromAxis * s, cos(halfAngle));\n}\nvec4 quaternionMultiply(vec4 left, vec4 right)\n{\n float x = left.w * right.x + left.x * right.w + left.y * right.z - left.z * right.y;\n float y = left.w * right.y - left.x * right.z + left.y * right.w + left.z * right.x;\n float z = left.w * right.z + left.x * right.y - left.y * right.x + left.z * right.w;\n float w = left.w * right.w - left.x * right.x - left.y * right.y - left.z * right.z;\n return vec4(x, y, z, w);\n}\nmat4 rotationFromQuaternion(vec4 q)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvec4 lerp(vec4 start, vec4 end, float t)\n{\n vec4 tmp = end * t;\n vec4 result = start * (1.0 - t);\n return result + tmp;\n}\nvec4 slerp(vec4 start, vec4 end, float t)\n{\n float adot = dot(start, end);\n vec4 r = end;\n if(adot < 0.0){\n adot = -adot;\n r = end * -1.0;\n }\n if(1.0 - adot < 0.000001){\n return mix(start, r, t);\n }\n float theta = acos(adot);\n float angle = (1.0 - t) * theta;\n vec4 scaledP = start * sin(angle);\n vec4 scaledR = r * (sin(t * theta));\n vec4 result = scaledP + scaledR;\n return result * (1.0 / sin(theta));\n}\nfloat filterTest(vec3 rte, float radius)\n{\n if(uFilterMode > 0.0)\n {\n float distance = length(rte);\n float theta = czm_piOverFour * 0.5;\n float screenPix = max(czm_globeDepthTextureDim.x, czm_globeDepthTextureDim.y) * 0.5;\n float lamat = screenPix / tan(theta);\n return lamat * radius / distance > uFilterPixel ? 1.0 : 0.0;\n }\n return length(rte) < uMaxVisibleDistance ? 1.0 : 0.0;\n}\n\nvec4 translateRelativeToEye(vec3 high,vec3 low) {\n vec3 highDifference = high - czm_encodedOriginCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedOriginCameraPositionMCLow;\n return vec4(highDifference + lowDifference, 1.0);\n}\n\nvoid main()\n{\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n vec3 prePosHigh = aPreHxyzLx.xyz;\n vec3 prePosLow = vec3(aPreHxyzLx.w, aPreLyzNextHxy.xy);\n vec3 nextPosHigh = vec3(aPreLyzNextHxy.zw, aNextHzLxyz.x);\n vec3 nextPosLow = aNextHzLxyz.yzw;\n#ifdef TEXTURE\n vTexCoord = aTexCoord0.xy;\n#endif\n vec4 vertexPos = aPosition - vec4(uOffset.xyz,0.0);\n //vertexPos.xyz *= aScale;\n vec4 positionMC = uGeoMatrix * vertexPos;\n vec4 preRte = translateRelativeToEye(prePosHigh,prePosLow);\n vec4 nextRte = translateRelativeToEye(nextPosHigh,nextPosLow);\n vec4 rte = mix(preRte, nextRte, uInterval);\n float show = filterTest(rte.xyz, uRadius * aScale.x);\n vec3 hpr = mix(aPreHpr, aNextHpr, uInterval);\n vec4 rollQuaternion = quaternionfromAxisAngle(vec3(1.0, 0.0, 0.0), hpr.z);\n vec4 pitchQuaternion = quaternionfromAxisAngle(vec3(0.0, 1.0, 0.0), -hpr.y);\n vec4 headingQuaternion = quaternionfromAxisAngle(vec3(0.0, 0.0, 1.0), -hpr.x);\n vec4 q = quaternionMultiply(rollQuaternion, pitchQuaternion);\n q = quaternionMultiply(headingQuaternion, q);\n mat4 rotationMat = rotationFromQuaternion(q);\n vec4 orientation = slerp(aPreOrientation, aNextOrientation, uInterval);\n mat3 velocityMat = mat3(rotationFromQuaternion(orientation));\n mat3 rotationMatrix = velocityMat * mat3(rotationMat);\n mat4 scaleMatrix = mat4(aScale.x, 0, 0, 0, 0, aScale.y, 0, 0, 0, 0, aScale.z, 0, 0, 0, 0, 1);\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMatrix[0], 0.0);\n worldMatrix[1] = vec4(rotationMatrix[1], 0.0);\n worldMatrix[2] = vec4(rotationMatrix[2], 0.0);\n worldMatrix[3] = vec4(rte.xyz, 1.0);\n mat4 modelMatrix = worldMatrix * scaleMatrix;\n vModelMatrix = modelMatrix * uGeoMatrix;\n vertexPos = modelMatrix * positionMC;\n vertexPos.w = 1.0;\n vPositionMC.xyz = rotationMatrix * positionMC.xyz;\n vPositionMC.w = 0.0;\n vPositionEC = (czm_modelViewRelativeToEye * vec4(vPositionMC.xyz, 1.0)).xyz;\n gl_Position = show * czm_modelViewProjectionRelativeToEye * vertexPos;\n vec4 color, pickColor;\n color.xy = czm_decompressTextureCoordinates(aColorAndPickColor.x);\n color.zw = czm_decompressTextureCoordinates(aColorAndPickColor.y);\n pickColor.xy = czm_decompressTextureCoordinates(aColorAndPickColor.z);\n pickColor.zw = czm_decompressTextureCoordinates(aColorAndPickColor.w);\n vColor = vertexColor * color;\n#ifdef HAS_NORMAL\n if(length(aNormal) > 0.8)\n {\n vec3 normal = rotationMatrix * aNormal;\n mat4 realModelViewMatrix4 = czm_view * vModelMatrix;\n realModelViewMatrix4 = czm_inverseMatrix(realModelViewMatrix4);\n mat3 realModelViewMatrix3 = mat3(realModelViewMatrix4);\n realModelViewMatrix3 = czm_transpose(realModelViewMatrix3);\n vNormalEC = normalize(realModelViewMatrix3 * aNormal);\n vPositionMC.w = 1.0;\n }\n#endif\n vPickColor = pickColor;\n}",_0x1d5e65=(_0xb86bc3=!0,function(e,t){var i=_0xb86bc3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb86bc3=!1,i}),_0x238498=_0x1d5e65(void 0,(function(){return _0x238498.toString().search("(((.+)+)+)+$").toString().constructor(_0x238498).search("(((.+)+)+)+$")})),_0xb86bc3;_0x238498();var _0x293bae=34,_0x1f5fae=new e$1X(.7,.7,1,1),_0x562eb1={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,READY:4,FAILED:5};function _0x256afc(e,t){LicenseChecker.LICENSECHECKER.verify("DynamicLayer3D"),o$1q.defined("context",e),o$1q.defined("context",t),Array.isArray(t)||(t=[t]),this._context=e,this._gl=e._gl,this._updateInterval=1e3,this._xmlParser=new s$T,this._visible=!0,this._type=bt$6.INSTANCED_LAYER,this._group={};for(var i=0,n=t.length;i<n;i++){var r=t[i];o$1q.typeOf.string("url",r),this._group[r]={url:r,ready:!1,visible:!0,pickEnable:!0,cullEnabled:!1,polygonOffset:{enabled:!1,factor:0,units:0},cullFace:G$1a.BACK,loadState:_0x562eb1.UNLOAD,buffer:void 0,offset:new o$1p,radius:0,instanceCount:0,stateList:new e$1Q,instanceList:new e$1Q,removedList:new e$1Q,renderEntities:[],boundingSphere:new i$1d,beginTime:-1,interval:0}}this._maxVisibleAltitude=Number.MAX_VALUE,this._maxVisibleDistance=Number.MAX_VALUE,this._filterMode=_0x219958.DISTANCE_FROM_EYE_POINT,this._filterPixel=0,this._enableLocalOffset=!0,this._visibleViewport=4095,null!==e.s3tc?this._supportCompressType=1:null!==e.pvrtc?this._supportCompressType=2:null!==e.etc1&&(this._supportCompressType=3),this._shadowType=_0x325616.NONE,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:new o$1p,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}}}function _0x22a4b6(e){return e._shadowType==_0x325616.SELECTION||e._shadowType==_0x325616.ALL}function _0x5bafda(e){e._times.length>3&&(e._times.splice(0,1),e._values.splice(0,e._packedLength))}function _0x18256a(e,t,i){for(var n=0;n<e._times.length;n++){var r=a$15.addSeconds(t,n*i,new a$15);e._times[n]=r}}function _0x5ef5de(e,t){for(var i=a$15.now(),n=0,r=e.stateList.length;n<r;n++){var o=e.stateList.values[n];_0x18256a(o.position._property,i,t),_0x18256a(o.heading,i,t),_0x18256a(o.pitch,i,t),_0x18256a(o.roll,i,t),_0x18256a(o.scale,i,t),_0x18256a(o.color,i,t)}}function _0x457875(e){var t={};return e$2e(e.a_position)&&(t.aPosition=e.a_position.index),e$2e(e.a_normal)&&(t.aNormal=e.a_normal.index),e$2e(e.a_vertexColor)&&(t.aColor=e.a_vertexColor.index),e$2e(e.a_texcoord_0)&&(t.aTexCoord0=e.a_texcoord_0.index),e$2e(e.a_texcoord0)&&(t.aTexCoord0=e.a_texcoord0.index),t}function _0x16c723(e,t,i,n){var r=t.buffer;if(!e$2e(r)){var o=0===t.instanceCount?1:t.instanceCount,a=4*_0x293bae*o;(r=t$X.createVertexBuffer({context:e,sizeInBytes:a,usage:A$18.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,t.buffer=r}_0x5b957a(r,i,n,Object.keys(i).length)}Object.defineProperties(_0x256afc.prototype,{updateInterval:{get:function(){return this._updateInterval},set:function(e){this._updateInterval=e}},group:{get:function(){return this._group}},visible:{get:function(){return this._visible},set:function(e){this._visible=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){!e$2e(e)||(this._maxVisibleAltitude=e)}},type:{get:function(){return this._type}},enableLocalOffset:{get:function(){return this._enableLocalOffset},set:function(e){this._enableLocalOffset=e}},maxVisibleDistance:{get:function(){return this._maxVisibleDistance},set:function(e){o$1q.typeOf.number("maxVisibleDistance",e),this._maxVisibleDistance=e}},filterMode:{get:function(){return this._filterMode},set:function(e){o$1q.typeOf.number("filterMode",e),this._filterMode=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){o$1q.typeOf.number("filterPixel",e),this._filterPixel=e}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}}}),_0x256afc.prototype.setPolygonOffset=function(e,t,i){o$1q.typeOf.string("dynamicLayer setPolygonoffset url",e),o$1q.typeOf.number("dynamicLayer setPolygonoffset factor",t),o$1q.typeOf.number("dynamicLayer setPolygonoffset units",i);var n=this._group[e];if(e$2e(n)&&(n.polygonOffset.factor!==t||n.polygonOffset.units!==i)&&(n.polygonOffset={enabled:!0,factor:u$Z(t,0),units:u$Z(i,0)},n.ready))for(var r=0,o=n.renderEntities.length;r<o;r++){var a=n.renderEntities[r].command,s=d$1m.getState(a.renderState);s.polygonOffset={enabled:!0,factor:u$Z(t,0),units:u$Z(i,0)},a.renderState=d$1m.fromCache(s)}},_0x256afc.prototype.update=function(e){if((LicenseChecker.LICENSECHECKER.verify("DynamicLayer3D"),this._visible)&&e._fboState.frameBufferType!==Qe$c.NORMAL_AND_DEPTH){var t=!0;if(e.multiViewportIndex>-1)t=this.getVisibleInViewport(e.multiViewportIndex);this._frameState=e,this._picking=e.passes.pick;var i=e.camera.positionCartographic.height<this._maxVisibleAltitude;for(var n in this._group)if(this._group.hasOwnProperty(n)){var r=this._group[n];if(r.ready){if(!r.visible||(this._picking||(_0x2440bd(e,this,r),_0x3458d8(r,e)),r.instanceCount<1)||!i||!t)continue;for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s.meshUBO.update(this._context),s.materialUBO.update(this._context);var l=s.command;l.instanceCount=r.instanceCount,l.boundingVolume=r.boundingSphere,e.commandList.push(l)}}else _0x301b02(e,this,n)}}},_0x256afc.prototype.setCullEnabled=function(e,t){o$1q.typeOf.string("dynamicLayer setCullEnabled url",e),t=u$Z(t,G$1a.BACK);var i=this._group[e];if(e$2e(i)&&(!i.cullEnabled||i.cullFace!==t)&&(i.cullEnabled=!0,i.cullFace=t,i.ready))for(var n=0,r=i.renderEntities.length;n<r;n++){var o=i.renderEntities[n].command,a=d$1m.getState(o.renderState);a.cull.enabled=!0,a.cull.face=t,o.renderState=d$1m.fromCache(a)}},_0x256afc.prototype.getCullEnabled=function(e){o$1q.typeOf.string("dynamicLayer getCullEnabled url",e);var t=this._group[e];if(e$2e(t))return t.cullEnabled},_0x256afc.prototype.clear=function(e,t){t$11("DynamicLayer3D.prototype.clear","clear() will be deprecated, please use clearState()"),this.clearState(e,t)},_0x256afc.prototype.clearAll=function(){t$11("DynamicLayer3D.prototype.clearAll","clearAll() will be deprecated, please use clearAllState()"),this.clearAllState()},_0x256afc.prototype.clearAllState=function(){for(var e in this._group)this._group.hasOwnProperty(e)&&(this._group[e].stateList.removeAll(),this._group[e].instanceList.removeAll(),_0x1d852e(this,this._group[e]))},_0x256afc.prototype.clearState=function(e,t){o$1q.typeOf.string("dynamicLayer3D.clear url",e),o$1q.defined("dynamicLayer3D.clear ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(e$2e(i)){var n=i.stateList,r=i.instanceList;if(e$2e(n)&&e$2e(r)){for(var o,a=0,s=t.length;a<s;a++)o=t[a],n.contains(o)&&n.remove(o),r.contains(o)&&r.remove(o);_0x1d852e(this,i)}}},_0x256afc.prototype.deleteObjects=function(e,t){o$1q.typeOf.string("dynamicLayer3D.delete url",e),o$1q.defined("dynamicLayer3D.delete ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(e$2e(i)){var n=i.instanceList,r=i.removedList,o=i.stateList;if(e$2e(n)&&e$2e(r)&&e$2e(o)){for(var a,s=0,l=t.length;s<l;s++)a=t[s],o.remove(a),n.contains(a)&&(n.remove(a),r.set(a,!0));_0x1d852e(this,i)}}},_0x256afc.prototype.deleteAllObjects=function(){for(var e in this._group)if(this._group.hasOwnProperty(e)){for(var t=this._group[e],i=t.instanceList,n=Object.keys(i._hash),r=n.length;r--;)t.removedList.set(n[r],!0);i.removeAll(),t.stateList.removeAll(),_0x1d852e(this,t)}},_0x256afc.prototype._updateShadow=function(e){var t=_0x22a4b6(e),i=e._group;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s.command.castShadows=t,s.command.receiveShadows=t}}},_0x256afc.prototype.setVisibleByUrl=function(e,t){var i=this._group[e];e$2e(i)&&(i.visible=t)},_0x256afc.prototype.setPickEnable=function(e,t){this._group[e].pickEnable=t},_0x256afc.prototype.updateObjectWithModel=function(e,t){if(o$1q.typeOf.string("url",e),Array.isArray(t)){var i=this._group[e];if(e$2e(i)){e$2e(i.stateList)||(i.stateList=new e$1Q);for(var n,r=0,o=t.length;r<o;r++)if((n=t[r])instanceof _0x15cf65){var a=n.id;if(i.removedList.contains(a))continue;var s=i.stateList.get(a);e$2e(s)||(i.offset=o$1p.clone(n.offset,i.offset),i.stateList.set(a,{position:new o$z,scale:new g$y(o$1p),heading:new g$y(Number),pitch:new g$y(Number),roll:new g$y(Number),color:new g$y(e$1X),offset:n.offset,description:n.description,lockOrientation:n.lockOrientation,id:a}),(s=i.stateList.get(a)).position.setInterpolationOptions({interpolationDegree:10}),s.position.backwardExtrapolationType=_0x1015ec.HOLD,s.position.forwardExtrapolationType=_0x1015ec.HOLD,s.scale.backwardExtrapolationType=_0x1015ec.HOLD,s.scale.forwardExtrapolationType=_0x1015ec.HOLD,s.heading.backwardExtrapolationType=_0x1015ec.HOLD,s.heading.forwardExtrapolationType=_0x1015ec.HOLD,s.pitch.backwardExtrapolationType=_0x1015ec.HOLD,s.pitch.forwardExtrapolationType=_0x1015ec.HOLD,s.roll.backwardExtrapolationType=_0x1015ec.HOLD,s.roll.forwardExtrapolationType=_0x1015ec.HOLD,s.color.backwardExtrapolationType=_0x1015ec.HOLD,s.color.forwardExtrapolationType=_0x1015ec.HOLD,s.startDirection=n.startDirection);var l=a$15.now(),u=o$1p.fromDegrees(n.longitude,n.latitude,n.altitude);_0x5bafda(s.position._property),_0x5bafda(s.heading),_0x5bafda(s.pitch),_0x5bafda(s.roll),_0x5bafda(s.scale),_0x5bafda(s.color),s.position.addSample(l,u),s.heading.addSample(l,n.heading),s.pitch.addSample(l,n.pitch),s.roll.addSample(l,n.roll),s.scale.addSample(l,n.scale),s.color.addSample(l,n.color),s.lockOrientation=n.lockOrientation}}}},_0x256afc.prototype.setUnSelected=function(){var e=this._group;if(e$2e(e))for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];if(!e$2e(i.instanceList)||i.instanceCount<1||!i.pickEnable)continue;for(var n=i.instanceList,r=0;r<n.length;r++){var o=n.values[r];e$2e(o)&&o.setUnSelected()}}},_0x256afc.prototype.getVisibleInViewport=function(e){return!(e>8)&&1<<e&this._visibleViewport},_0x256afc.prototype.setVisibleInViewport=function(e,t){e>8||(this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport)};var _0x43f9ea=new e$2c(1,1,1,1);function _0x17c7de(e,t,i){i.localMatrix=i.modelMatrix.clone();var n=i.uniformMap,r={uInterval:function(){return e.interval},uAmbientColor:function(){return _0x43f9ea},uDiffuseColor:function(){return _0x43f9ea},uSpecularColor:function(){return _0x43f9ea},uShininess:function(){return 1},uPicking:function(){return t._picking},uGeoMatrix:function(){return i.localMatrix},uFilterMode:function(){return t.filterMode},uMaxVisibleDistance:function(){return t.maxVisibleDistance},uFilterPixel:function(){return t.filterPixel},uRadius:function(){return i.boundingVolume.radius},uOffset:function(){return e.offset}};return e$2e(n.u_baseColorTexture)?r.uTexture=n.u_baseColorTexture:e$2e(n.u_diffuse)&&(r.uTexture=n.u_diffuse),e$2e(n.u_specular)&&(r.uSpecularColor=n.u_specular),e$2e(n.u_shininess)&&(r.uShininess=n.u_shininess),r}function _0x3458d8(e,t){if(e$2e(e.model)){e.boundingSphere=e.boundingSphere.clone(),e.model.updateAnimation(t);for(var i=e.model._nodeCommands,n=i.length,r=0;r<n;++r){var o=i[r].command;o.localMatrix=o.modelMatrix,o.modelMatrix=p$1d.IDENTITY.clone()}}}function _0x41f91d(e,t){for(var i=t._context,n=e.model._nodeCommands,r=n.length,o=[],a=0;a<r;++a){var s=n[a].command;t._shadowType==_0x325616.ALL||t._shadowType==_0x325616.SELECTION?(s.castShadows=!0,s.receiveShadows=!0):(s.castShadows=!1,s.receiveShadows=!1),s.pickId="vPickColor",s.instanceCount=e.instanceCount,s.pass=Le$q.S3MTiles+2,s.renderState=_0x2894c2(e);var l=s.vertexArray,u=l._attributes,c=l.indexBuffer;if(u.length<9){var h=_0x457875(s.shaderProgram.vertexAttributes);_0x16c723(i,e,h,u),s.vertexArray=new c$13({context:i,attributes:u,indexBuffer:c})}var d=new s$V({name:"DynamicLayerVertex",sources:[_0x41f4a0]}),f=new s$V({name:"S3ModelFP",sources:[_0x47b2f7]});e$2e(h.aColor)&&d.defines.push("VertexColor"),e$2e(h.aNormal)&&(d.defines.push(D$V.HAS_NORMAL),f.defines.push(D$V.HAS_NORMAL)),e$2e(h.aTexCoord0)&&(d.defines.push("TEXTURE"),f.defines.push("TEXTURE"));const r=t._frameState.lightSource;if(e$2e(r))f.defines.push("MAX_POINT_LIGHT_COUNT "+s$J.MaxPointLightCount),f.defines.push("MAX_SPOT_LIGHT_COUNT "+s$J.MaxSpotLightCount),f.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$J.MaxDirectionLightCount),r.directionalLight.length>0&&f.defines.push(D$V.HAS_DIR_LIGHTS),r._visibleLightList[_0x4970c2.POINT].length>0&&f.defines.push(D$V.HAS_POINT_LIGHTS),r._visibleLightList[_0x4970c2.SPOT].length>0&&f.defines.push(D$V.HAS_SPOT_LIGHTS),r.hemisphereLight.length>0&&f.defines.push(D$V.HAS_HEMISPHERE_LIGHTS);s.shaderProgram=r$14.fromCache({context:i,vertexShaderSource:d,fragmentShaderSource:f,attributeLocations:h});var p=_0x17c7de(e,t,s);p=p$19(p,t._frameState.lightSource.createUniformMap()),s.uniformMap=p,s.modelMatrix=p$1d.IDENTITY.clone(),e.renderEntities.push({command:s,attributes:u,indexBuffer:c}),o.push(s.boundingVolume)}var _=new i$1d;i$1d.fromBoundingSpheres(o,_),e.oriBoundingSphere=_}function _0x301b02(e,t,i){var n=t._group[i],r=n.loadState;if(i.indexOf(".gltf")>0||i.indexOf(".glb")>0)_0x562eb1.UNLOAD==r&&(e$2e(n.model)||(n.model=F$B.fromGltf({url:i,incrementallyLoadTextures:!1})),n.model.update(e),n.model.ready&&(n.ready=!0,n.loadState=_0x562eb1.READY,_0x5ef5de(n,t.updateInterval/1e3),_0x41f91d(n,t),n.model.activeAnimations.addAll({loop:_0x1ea9f2.REPEAT})));else{var o=i.indexOf(".s3mb")>-1;if(_0x562eb1.UNLOAD==r){var a=o$O(i,(function(e){return o$10(e)}));e$2e(a)?(n.loadState=_0x562eb1.LOADING,a.then((function(e){n.loadState=_0x562eb1.LOADED,n.contentBuffer=e}),(function(e){e$2e(e)?n.loadState=_0x562eb1.FAILED:n.loadState=_0x562eb1.UNLOAD}))):n.loadState=_0x562eb1.UNLOAD}_0x562eb1.LOADED===r&&(o?_0x4e1a89(t,n):_0x55e1db(t,n))}}function _0x2440bd(e,t,i){if(!(i.stateList.length<1)){var n=t._context,r=!1;i.beginTime<0&&(r=!0,i.beginTime=window.performance.now());var o=Et$c()-i.beginTime,a=t._updateInterval;if(i.interval=o/a,i.interval=e$2d.clamp(i.interval,0,1),r||o>=a){i.interval=0;var s=a$15.now();o=a$15.addSeconds(s,-t._updateInterval/1e3,new a$15);i.beginTime=window.performance.now();for(var l,u=i.stateList,c=[],h=0;h<u.length;h++){var d=u.values[h];l=d.id;var f=i.instanceList.get(l);if(i.removedList.contains(l))return;e$2e(f)||(i.instanceList.set(l,new _0x14a36f(n,d,i,l)),f=i.instanceList.get(l)),f.update(e,d,o,c)}if(c.length>0){var p=i$1d.fromBoundingSpheres(c,new i$1d);i$1d.clone(p,i.boundingSphere)}i.instanceCount=c.length,_0x1d852e(t,i)}}}function _0x1d852e(e,t){var i=t.instanceCount;if(!(i<1)){var n=_0x293bae*i,r=t.buffer,o=e._context,a=S$14.getSizeInBytes(S$14.FLOAT);if(r.sizeInBytes/(a*_0x293bae)<i){t.buffer&&t.buffer.destroy(),(r=t$X.createVertexBuffer({context:o,sizeInBytes:n*a,usage:A$18.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,t.buffer=r;for(var s=0,l=t.renderEntities.length;s<l;s++){var u=t.renderEntities[s],c=u.command;if(e$2e(c)){c.vertexArray.isDestroyed()||c.vertexArray.destroy();for(var h=0;h<u.attributes.length;h++){var d=u.attributes[h];e$2e(d.instanceDivisor)&&d.instanceDivisor>0&&(d.vertexBuffer=t.buffer)}c.vertexArray=new c$13({context:o,attributes:u.attributes,indexBuffer:u.indexBuffer})}}}var f=new Float32Array(n),p=t.instanceList,_=0;for(s=0,l=p.length;s<l;s++){var m=p.values[s];if(e$2e(m)&&m._ready){m._index=_;var g=i$12.fromCartesian(m._prePosition),x=g.high,y=g.low,v=i$12.fromCartesian(m._nextPosition),$=v.high,b=v.low,T=m._preOrientation,C=m._nextOrientation,S=m._pickColor,w=m._color,E=m._scale,P=m._preHpr,A=m._nextHpr,L=new e$1X;L.red=t$$.compressTextureCoordinates({x:w.red,y:w.green}),L.green=t$$.compressTextureCoordinates({x:w.blue,y:w.alpha}),L.blue=t$$.compressTextureCoordinates({x:S.red,y:S.green}),L.alpha=t$$.compressTextureCoordinates({x:S.blue,y:S.alpha}),_0x26f180(f,_,x,y,$,b,T,C,L,P,A,E),_++}}r.copyFromArrayView(f,0)}}function _0x26f180(e,t,i,n,r,o,a,s,l,u,c,h){var d=0;e[(t*=_0x293bae)+d++]=i.x,e[t+d++]=i.y,e[t+d++]=i.z,e[t+d++]=n.x,e[t+d++]=n.y,e[t+d++]=n.z,e[t+d++]=r.x,e[t+d++]=r.y,e[t+d++]=r.z,e[t+d++]=o.x,e[t+d++]=o.y,e[t+d++]=o.z,e[t+d++]=a.x,e[t+d++]=a.y,e[t+d++]=a.z,e[t+d++]=a.w,e[t+d++]=s.x,e[t+d++]=s.y,e[t+d++]=s.z,e[t+d++]=s.w,e[t+d++]=l.red,e[t+d++]=l.green,e[t+d++]=l.blue,e[t+d++]=l.alpha,e[t+d++]=u.heading,e[t+d++]=u.pitch,e[t+d++]=u.roll,e[t+d++]=c.heading,e[t+d++]=c.pitch,e[t+d++]=c.roll,e[t+d++]=h.x,e[t+d++]=h.y,e[t+d++]=h.z}var _0x594fe=new n$15,_0x11a1e3=new o$1p;function _0x14a36f(e,t,i,n){this.type=bt$6.INSTANCED_OBJECT,this._ownerGroup=i,this._id=n,this._index=-1,this._description=t.description;var r=t.position.getValue(0);e$2e(r)||(r=new o$1p),this._scale=o$1p.clone(t.scale.getValue(0));var o=o$1p.maximumComponent(this._scale);this._offset=t.offset,this._lockOrientation=t.lockOrientation,this._preOrientation=new n$15,this._nextOrientation=new n$15,this._orientation=void 0,this._velocityOrientation=new e$w(t.position);var a=m$19.headingPitchRollToFixedFrame(r,new i$16(t.startDirection,0,0),t$12.WGS84,m$19.eastNorthUpToFixedFrame,new p$1d),s=p$1d.getRotation(a,new p$1e),l=n$15.fromRotationMatrix(s);n$15.clone(l,this._preOrientation),n$15.clone(this._preOrientation,this._nextOrientation);var u=o$1p.multiplyByScalar(this._offset,o,new o$1p);this._prePosition=p$1d.multiplyByPoint(a,u,new o$1p),this._nextPosition=o$1p.clone(this._prePosition);var c=t.heading.getValue(0),h=t.pitch.getValue(0),d=t.roll.getValue(0);this._preHpr=new i$16(c,h,d),this._nextHpr=i$16.clone(this._preHpr),this._dynamicColor=t.color.getValue(0);var f=i.oriBoundingSphere.radius*o;this._boundingSphere=new i$1d(this._prePosition,f);var p={id:n,primitive:this},_=e.createPickId(p);this._pickColor=_.color,this._selColor=new e$1X,this._color=e$1X.multiply(this._dynamicColor,this._selColor,new e$1X),this._isSelected=!1,this._ready=!1}function _0x55e1db(e,t){var i=t.contentBuffer;if(e$2e(i)){var n={buffer:i,supportCompressType:e._supportCompressType},r=_0x29d1c7.S3MTaskProcessor.scheduleTask(n,[i]);e$2e(r)?(t.contentBuffer=void 0,t._loadState=_0x562eb1.PARSING,r.then((function(i){if(i.result){e._gl;for(var n=e._xmlParser.read(i.xmlDoc).firstChild,r=n.namespaceURI,o=s$T.queryFirstNode(n,"Material3Ds",r),a=s$T.queryChildNodes(o,"material",r),s={},l=e._context,u=0,c=a.length;u<c;u++){var h=a[u],d=s$T.queryStringValue(h,"name",r),f=new _0xf77618({});s[d]=f;var p=s$T.queryFirstNode(h,"Ambient",r),_=s$T.queryNumericValue(p,"AmbientR",r),m=s$T.queryNumericValue(p,"AmbientG",r),g=s$T.queryNumericValue(p,"AmbientB",r),x=s$T.queryNumericValue(p,"AmbientA",r);f._ambientColor=new e$1X(_,m,g,x);var y=s$T.queryFirstNode(h,"Diffuse",r);_=s$T.queryNumericValue(y,"DiffuseR",r),m=s$T.queryNumericValue(y,"DiffuseG",r),g=s$T.queryNumericValue(y,"DiffuseB",r),x=s$T.queryNumericValue(y,"DiffuseA",r),f._diffuseColor=new e$1X(_,m,g,x);var v=s$T.queryFirstNode(h,"Specular",r);_=s$T.queryNumericValue(v,"SpecularR",r),m=s$T.queryNumericValue(v,"SpecularG",r),g=s$T.queryNumericValue(v,"SpecularB",r),x=s$T.queryNumericValue(v,"SpecularA",r),f._specularColor=new e$1X(_,m,g,x);var $=s$T.queryNumericValue(h,"Shininess",r);f._shininess=$,s$T.queryFirstNode(h,"TransparentSorting",r),f._bTransparentSorting=s$T.queryBooleanValue(h,"TransparentSorting",r);var b=s$T.queryFirstNode(h,"texture",r),T=s$T.queryStringValue(b,"name",r),C=s$T.queryFirstNode(b,"AddressMode",r),S=s$T.queryStringValue(C,"u",r),w=s$T.queryStringValue(C,"v",r);S="TAM_WRAP"===S?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,w="TAM_WRAP"===w?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;var E=i.texturePackage[T];if(T+=l.id,e$2e(E)){var P=Se$e.CreateTexture(T,l,E.width,E.height,E.nFormat,E.compressType,E.imageBuffer,!1,S,w);f._textures.push(P),0===E.compressType&&(e._supportCompressType=0)}}var A=s$T.queryFirstNode(n,"PageLods",r),L=s$T.queryNodes(A,"Geode",r);for(u=0,c=L.length;u<c;u++){for(var M=L[u],R=s$T.queryStringValue(M,"GeoDeModMatrix",r).split(","),O=0;O<16;O++)R[O]=parseFloat(R[O]);if(R=p$1d.unpack(R,0),t.enableOffset){var D=p$1d.fromTranslation(new o$1p(0,0,-690));R=p$1d.multiplyTransformation(R,D,new p$1d)}for(var I=s$T.queryNodes(M,"GeoName",r),F=[],B=0,N=I.length;B<N;B++){var G=I[B].textContent.trim();F.push(G)}for(var z=[],U=new i$1d,V=0;V<F.length;V++){var k=_0x1dd3a5(H=(W=i.geoPackage[F[V]]).vertexPackage,R);z.push(k)}z.length>0&&(i$1d.fromBoundingSpheres(z,U),t.oriBoundingSphere=U,z.length=0);for(N=0;N<F.length;N++){var W,H=(W=i.geoPackage[F[N]]).vertexPackage,q=W.arrIndexPackage,j={};for(var X in q){var Y=q[X];if(e$2e(Y)){f=s[d=Y.materialCode];j[d]=f}}e.enableLocalOffset||(R=p$1d.IDENTITY),_0x33c96f(e,t,H,q,U,j,R)}t.boundingSphere=i$1d.clone(U)}t.ready=!0,t.loadState=_0x562eb1.READY,_0x5ef5de(t,e.updateInterval/1e3)}else t._loadState=_0x562eb1.UNLOAD}))):t._loadState=_0x562eb1.LOADED}else t._loadState=_0x562eb1.FAILED}function _0x4e1a89(e,t){var i=t.contentBuffer;if(e$2e(i)){if(_0x29d1c7.init||_0x29d1c7.initWebAssembly(),_0x29d1c7.taskProcessorReady){var n=_0x29d1c7.S3MBTaskProcessor.scheduleTask({buffer:i,supportCompressType:e._supportCompressType},[i]);if(!e$2e(n))return void(t._loadState=_0x562eb1.LOADED);t.contentBuffer=void 0,t._loadState=_0x562eb1.PARSING,n.then((function(i){if(i.result){for(var n=e._context,r={},o=0,a=i.matrials.material.length;o<a;o++){var s=i.matrials.material[o].material,l=s.id,u=new _0xf77618({});r[l]=u,u.createCommonParamter(s),u.createPBRParamter(s);for(var c=s.textureunitstates,h=0;h<c.length;h++){var d=c[h].textureunitstate,f=d.id,p=0===d.addressmode.u?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,_=0===d.addressmode.v?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;u._texMatrix=p$1d.unpack(d.texmodmatrix);var m=i.texturePackage[f];if(f+=n.id,e$2e(m)&&m.width>0&&m.height>0&&m.imageBuffer.length>0){var g=Se$e.CreateTexture(f,n,m.width,m.height,m.nFormat,m.compressType,m.imageBuffer,!1,p,_),x=f.indexOf("PBRMaterialParam")>-1,y=u._emissiveTextureIndex===h,v=u._normalTextureIndex===h,$=u._metallicRoughnessTextureIndex===h,b=u._occlusionTextureIndex===h;x?(u._usePBRTextureBatch=!0,u.pbrParamTexture=g):y?u.emissiveTexture=g:v?u.normalTexture=g:$?u.metallicRoughnessTexture=g:b?u.occlusionTexture=g:u._textures.push(g),0===m.compressType&&(e._supportCompressType=0)}}}var T=i.groupNode.pageLods;if(e$2e(T))for(o=0,a=T.length;o<a;o++){for(var C=T[o].geodes[0],S=C.matrix,w=0;w<16;w++)S[w]=parseFloat(S[w]);if(S=p$1d.unpack(S,0),t.enableOffset){var E=p$1d.fromTranslation(new o$1p(0,0,-690));S=p$1d.multiplyTransformation(S,E,new p$1d)}for(var P=C.skeletonNames,A=[],L=0,M=P.length;L<M;L++){var R=P[L].trim();A.push(R)}var O=[],D=new i$1d;for(h=0;h<A.length;h++){var I=_0x1dd3a5(B=(F=i.geoPackage[A[h]]).vertexPackage,S);O.push(I)}O.length>0&&(i$1d.fromBoundingSpheres(O,D),t.oriBoundingSphere=D,O.length=0);for(L=0,M=A.length;L<M;L++){R=A[L];var F,B=(F=i.geoPackage[R]).vertexPackage,N=F.arrIndexPackage,G=N[0];if(e$2e(G)){var z={};u=r[l=G.materialCode];z[l]=u,e.enableLocalOffset||(S=p$1d.IDENTITY),_0x33c96f(e,t,B,N,D,z,S)}}t.boundingSphere=i$1d.clone(D)}t.ready=!0,t.loadState=_0x562eb1.READY,_0x5ef5de(t,e.updateInterval/1e3)}else t._loadState=_0x562eb1.UNLOAD}))}}else t._loadState=_0x562eb1.FAILED}function _0x1dd3a5(e,t){for(var i=[],n=new i$1d,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1d.fromPoints(i,n),i.length=0,i$1d.transform(n,t,n),n}function _0x2894c2(e){return d$1m.fromCache({cull:{enabled:e.cullEnabled,face:e.cullFace},polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND})}function _0x4abe69(e,t,i){for(var n=i.vertexAttributes,r=0,o=n.length;r<o;r++){var a=n[r];!e$2e(a.typedArray)||(a.vertexBuffer=t$X.createVertexBuffer({context:t,typedArray:a.typedArray,usage:A$18.STATIC_DRAW}),a.vertexBuffer.vertexArrayDestroyable=!1,a.typedArray=null,delete a.typedArray)}var s=i.attrLocation,l=Object.keys(s).length,u=e.buffer;if(!e$2e(u)){var c=0===e.instanceCount?1:e.instanceCount,h=4*_0x293bae*c;(u=t$X.createVertexBuffer({context:t,sizeInBytes:h,usage:A$18.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,e.buffer=u}for(var d in _0x5b957a(u,s,n,l),s){n[l=s[d]].name=d}return{attributes:n,attrLocation:s}}function _0x5b957a(e,t,i,n){var r=n,o=0,a=S$14.getSizeInBytes(S$14.FLOAT);t.aPreHxyzLx=r++,i.push({index:t.aPreHxyzLx,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=4*a,t.aPreLyzNextHxy=r++,i.push({index:t.aPreLyzNextHxy,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=4*a,t.aNextHzLxyz=r++,i.push({index:t.aNextHzLxyz,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=4*a,t.aPreOrientation=r++,i.push({index:t.aPreOrientation,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=4*a,t.aNextOrientation=r++,i.push({index:t.aNextOrientation,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=4*a,t.aColorAndPickColor=r++,i.push({index:t.aColorAndPickColor,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=4*a,t.aPreHpr=r++,i.push({index:t.aPreHpr,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=3*a,t.aNextHpr=r++,i.push({index:t.aNextHpr,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=3*a,t.aScale=r++,i.push({index:t.aScale,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=3*a}function _0x33c96f(e,t,i,n,r,o,a){var s=e._context,l=_0x4abe69(t,s,i),u=l.attributes,c=l.attrLocation,h=Le$q.S3MTiles+2,d=_0x2894c2(t),f=i.verticesCount,p=n[0];if(!e$2e(p))return;var _=ce$z.UNSIGNED_SHORT;(1===p.indexType||f>=e$2d.SIXTY_FOUR_KILOBYTES)&&s.elementIndexUint&&(_=ce$z.UNSIGNED_INT);var m=t$X.createIndexBuffer({context:s,typedArray:p.indicesTypedArray,usage:A$18.STATIC_DRAW,indexDatatype:_});m.vertexArrayDestroyable=!1;var g=o[p.materialCode]||_0xf77618.Default,x=new i$$({primitiveType:W$18.TRIANGLES,boundingVolume:r,pass:h,owner:e});e._shadowType===_0x325616.ALL||e._shadowType===_0x325616.SELECTION?(x.castShadows=!0,x.receiveShadows=!0):(x.castShadows=!1,x.receiveShadows=!1),x.pickId="vPickColor",x.instanceCount=t.instanceCount,x.vertexArray=new c$13({context:s,attributes:u,indexBuffer:m});var y=new s$V({name:"DynamicLayerVertex",sources:[_0x41f4a0]}),v=new s$V({name:"S3ModelFP",sources:[_0x47b2f7]}),$=e$2e(c.aTexCoord0)&&g._textures.length>0;0===e._supportCompressType&&v.defines.push("FLIP_Y"),e$2e(c.aColor)&&y.defines.push("VertexColor"),e$2e(c.aNormal)&&(y.defines.push(D$V.HAS_NORMAL),v.defines.push(D$V.HAS_NORMAL)),$&&(y.defines.push("TEXTURE"),v.defines.push("TEXTURE"));const b=e._frameState.lightSource;e$2e(b)&&(v.defines.push("MAX_POINT_LIGHT_COUNT "+s$J.MaxPointLightCount),v.defines.push("MAX_SPOT_LIGHT_COUNT "+s$J.MaxSpotLightCount),v.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$J.MaxDirectionLightCount),b.directionalLight.length>0&&v.defines.push(D$V.HAS_DIR_LIGHTS),b._visibleLightList[_0x4970c2.POINT].length>0&&v.defines.push(D$V.HAS_POINT_LIGHTS),b._visibleLightList[_0x4970c2.SPOT].length>0&&v.defines.push(D$V.HAS_SPOT_LIGHTS),b.hemisphereLight.length>0&&v.defines.push(D$V.HAS_HEMISPHERE_LIGHTS));var T=t.url;(g._usePBR||e$2e(e._PBRMaterialParams[T])&&e._PBRMaterialParams[T].roughness>0)&&(v.defines.push(D$V.BRDF),(g.baseColorTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T].baseColorTextureIndex>-1&&e$2e(e._PBRMaterialParams[T].baseTexture))&&v.defines.push(D$V.HAS_BASE_TEXTURE),(g.uNormalTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T].normalTextureIndex>-1&&e$2e(e._PBRMaterialParams[T].normalTexture))&&v.defines.push(D$V.HAS_NORMAL_TEXTURE),(g.emissiveTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T].emissionTextureIndex>-1)&&v.defines.push(D$V.HAS_EMISSIVE_TEXTURE),(g.metallicRoughnessTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T]._metallicRoughnessTextureIndex>-1)&&v.defines.push(D$V.HAS_MetallicRoughness_TEXTURE),(g.occlusionTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T]._occlusionTextureIndex>-1)&&v.defines.push(D$V.HAS_OCCLUSION_TEXTURE),(e$2e(e._frameState.specularEnvironmentMaps)||e$2e(e._frameState.hdrEnvMap))&&(v.defines.push(D$V.IBL),e$2e(e._frameState.specularEnvironmentMaps)&&v.defines.push(D$V.KtxEnvMap)),e$2e(g._alphaMode)&&g._alphaMode===_0x36a597.MASK&&v.defines.push(D$V.MASK)),g.appendPBRMacroToShader(y,v),x.shaderProgram=r$14.fromCache({context:s,vertexShaderSource:y,fragmentShaderSource:v,attributeLocations:c});var C=g._diffuseColor,S=g._diffuseColor,w=g._specularColor,E=g._shininess,P=e$2e(c.aNormal),A=r.radius,L={uTexture:function(){return g._textures[0]},uInterval:function(){return t.interval},uAmbientColor:function(){return C},uDiffuseColor:function(){return S},uSpecularColor:function(){return w},uShininess:function(){return E},uPicking:function(){return e._picking},uHasNormal:function(){return P},uGeoMatrix:function(){return a},uFilterMode:function(){return e.filterMode},uMaxVisibleDistance:function(){return e.maxVisibleDistance},uFilterPixel:function(){return e.filterPixel},uRadius:function(){return A},uOffset:function(){return t.offset},uBaseColorFactor:function(){return e$2e(g._baseColor)?g._baseColor:e._PBRMaterialParams[T].baseColorFactor},uBaseColorTextureIndex:function(){return g._baseColorTextureIndex>-1?g._baseColorTextureIndex:e._PBRMaterialParams[T].baseColorTextureIndex},uMetallicFactor:function(){return e$2e(g._metallicFactor)?g._metallicFactor:e._PBRMaterialParams[T].metallic},uRoughnessFactor:function(){return e$2e(g._roughnessFactor)?g._roughnessFactor:e._PBRMaterialParams[T].roughness},uEmissiveFactor:function(){return e$2e(g._emissiveFactor)?g._emissiveFactor:e._PBRMaterialParams[T].emissionFactor},uEmissionTexture:function(){return e$2e(g.emissiveTexture)&&g._emissiveTextureIndex>-1?g.emissiveTexture:e._PBRMaterialParams[T].emissiveTexture},uEmissiveUVOffsetAndTiling:function(){var e=g._emissiveTextureMotion,t=new e$2c,i=performance.now()/1e3;if(e._offsetPeriod>0){var n=i%e._offsetPeriod;t.x=n*e._offsetSpeedU,t.y=n*e._offsetSpeedV}else t.x=0,t.y=0;if(e._tilingPeriod>0){var r=i%e._tilingPeriod;t.z=1+r*e._tilingSpeedU,t.w=1+r*e._tilingSpeedV}else t.z=1,t.w=1;return t},uBaseTexture:function(){return e$2e(g.baseColorTexture)&&g._baseColorTextureIndex>-1?g.baseColorTexture:e._PBRMaterialParams[T].baseTexture},uNormalTexture:function(){return e$2e(g.normalTexture)&&g._normalTextureIndex>-1?g.normalTexture:e._PBRMaterialParams[T].normalTexture},uMetallicRoughnessTexture:function(){return e$2e(g.metallicRoughnessTexture)&&g._metallicRoughnessTextureIndex>-1?g.metallicRoughnessTexture:e._PBRMaterialParams[T].metallicRoughnessTexture},uOcclusionTexture:function(){return e$2e(g.occlusionTexture)&&g._occlusionTextureIndex>-1?g.occlusionTexture:e._PBRMaterialParams[T].occlusionTexture}};L=p$19(L,g.createPBRUniformMap()),L=p$19(L,e._frameState.lightSource.createUniformMap()),x.uniformMap=L,x.renderState=d;var M={command:x,attributes:u,indexBuffer:m};M._layer=e;var R=new _0x35e02f(M),O=new _0x4f8f70(M,g,e);M.meshUBO=R,M.materialUBO=O,x.addUniformBuffer(s.uniformState._sceneUBO),x.addUniformBuffer(s.uniformState._lightUBO),x.addUniformBuffer(R),x.addUniformBuffer(O),t.renderEntities.push(M)}_0x14a36f.prototype.setSelected=function(){var e=this._index;if(e$2e(e)&&this._ownerGroup.pickEnable&&!(e<0)&&(o$1q.typeOf.number.greaterThanOrEquals("offset",e,0),!e$1X.equals(this._selColor,_0x1f5fae))){this._selColor=e$1X.clone(_0x1f5fae),this._color=e$1X.multiply(this._selColor,this._dynamicColor,this._color);var t=new e$1X;t.red=t$$.compressTextureCoordinates({x:this._color.red,y:this._color.green}),t.green=t$$.compressTextureCoordinates({x:this._color.blue,y:this._color.alpha}),t.blue=t$$.compressTextureCoordinates({x:this._pickColor.red,y:this._pickColor.green}),t.alpha=t$$.compressTextureCoordinates({x:this._pickColor.blue,y:this._pickColor.alpha});var i=this._ownerGroup.renderEntities;if(e$2e(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n].command,a=o.shaderProgram.vertexAttributes.aColorAndPickColor.index,s=o.vertexArray.getAttribute(a),l=e*s.strideInBytes+s.offsetInBytes,u=S$14.createTypedArray(s.componentDatatype,s.componentsPerAttribute);u[0]=t.red,u[1]=t.green,u[2]=t.blue,u[3]=t.alpha,s.vertexBuffer.copyFromArrayView(u,l)}this._isSelected=!0}}},_0x14a36f.prototype.setUnSelected=function(){var e=this._index;if(e$2e(e)&&this._ownerGroup.pickEnable&&!(e<0)&&this._isSelected){this._isSelected=!1,this._selColor=e$1X.WHITE,this._color=e$1X.clone(this._dynamicColor);var t=new e$1X;t.red=t$$.compressTextureCoordinates({x:this._color.red,y:this._color.green}),t.green=t$$.compressTextureCoordinates({x:this._color.blue,y:this._color.alpha}),t.blue=t$$.compressTextureCoordinates({x:this._pickColor.red,y:this._pickColor.green}),t.alpha=t$$.compressTextureCoordinates({x:this._pickColor.blue,y:this._pickColor.alpha});var i=this._ownerGroup.renderEntities;if(e$2e(i)&&!(i.length<1))for(var n=0,r=i.length;n<r;n++){var o=i[n].command,a=o.shaderProgram.vertexAttributes.aColorAndPickColor.index,s=o.vertexArray.getAttribute(a),l=e*s.strideInBytes+s.offsetInBytes,u=S$14.createTypedArray(s.componentDatatype,s.componentsPerAttribute);u[0]=t.red,u[1]=t.green,u[2]=t.blue,u[3]=t.alpha,s.vertexBuffer.copyFromArrayView(u,l)}}},_0x14a36f.prototype.update=function(e,t,i,n){var r=t.position,o=r$_.getValueOrUndefined(r,i,_0x11a1e3);if(e$2e(o)){var a=o$1p.equalsEpsilon(o,this._nextPosition,e$2d.EPSILON8)||o$1p.distance(o,this._nextPosition)<.5;this._scale=o$1p.clone(t.scale.getValue(i),this._scale);var s=o$1p.maximumComponent(t.scale.getValue(i)),l=o$1p.multiplyByScalar(this._offset,s,new o$1p),u=m$19.headingPitchRollToFixedFrame(o,new i$16,t$12.WGS84,m$19.eastNorthUpToFixedFrame,new p$1d);if(this._prePosition=o$1p.clone(this._nextPosition,this._prePosition),p$1d.multiplyByPoint(u,l,this._nextPosition),i$16.clone(this._nextHpr,this._preHpr),this._nextHpr.heading=t.heading.getValue(i),this._nextHpr.pitch=t.pitch.getValue(i),this._nextHpr.roll=t.roll.getValue(i),this._lockOrientation=t.lockOrientation,n$15.clone(this._nextOrientation,this._preOrientation),!this._lockOrientation)if(e$2e(h=a?void 0:r$_.getValueOrUndefined(this._velocityOrientation,i,_0x594fe)))this._orientation=n$15.clone(h),n$15.clone(this._orientation,this._nextOrientation);else if(e$2e(this._orientation))n$15.clone(this._orientation,this._nextOrientation);else{var c=p$1d.getRotation(u,new p$1e);n$15.fromRotationMatrix(c,this._nextOrientation);u=m$19.headingPitchRollToFixedFrame(o,new i$16(t.startDirection,0,0),t$12.WGS84,m$19.eastNorthUpToFixedFrame,new p$1d),c=p$1d.getRotation(u,new p$1e);var h=n$15.fromRotationMatrix(c);this._preOrientation=h,this._nextOrientation=h}var d=t.color.getValue(i);this._dynamicColor=e$1X.clone(d),this._color=e$1X.multiply(this._dynamicColor,this._selColor,this._color),o$1p.clone(this._nextPosition,this._boundingSphere.center),this._boundingSphere.radius=this._ownerGroup.oriBoundingSphere.radius*s;var f=e.cullingVolume.computeVisibility(this._boundingSphere)!==Ae$w.OUTSIDE;f&&n.push(this._boundingSphere),this._ready=f}else this._ready=!1},_0x256afc.prototype.isDestroyed=function(){return!1},_0x256afc.prototype.destroy=function(){for(var e in this._group){var t=this._group[e];if(t.ready){for(var i=0,n=t.renderEntities.length;i<n;i++){var r=t.renderEntities[i].command;r.vertexArray=r.vertexArray&&!r.vertexArray.isDestroyed()&&r.vertexArray.destroy(),r.shaderProgram=r.shaderProgram&&r.shaderProgram.destroy()}t.renderEntities.length=0,e$2e(t.stateList)&&t.stateList.removeAll()}}return this._group=void 0,i$11(this)};var _0x27ea54=(_0x55b44d=!0,function(e,t){var i=_0x55b44d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55b44d=!1,i}),_0x2270e0=_0x27ea54(void 0,(function(){return _0x2270e0.toString().search("(((.+)+)+)+$").toString().constructor(_0x2270e0).search("(((.+)+)+)+$")})),_0x55b44d;_0x2270e0();var _0x4e9529={UnLoad:0,Loading:1,Loaded:2,Parsing:3,Ready:4,LoadedFailed:5,ParseFailed:6},_0x172047=Object.freeze(_0x4e9529),_0x292552=(_0x102ffe=!0,function(e,t){var i=_0x102ffe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x102ffe=!1,i}),_0x623f5f=_0x292552(void 0,(function(){return _0x623f5f.toString().search("(((.+)+)+)+$").toString().constructor(_0x623f5f).search("(((.+)+)+)+$")})),_0x102ffe;function _0x3248fd(e){this.url=e,this._isGlTF=!0,this.model=void 0,this.state=_0x172047.UnLoad,this.ready=!1}_0x623f5f(),_0x3248fd.prototype.isDestroyed=function(){return!1},_0x3248fd.prototype.destroy=function(){return e$2e(this.model)&&!this.model.isDestroyed()&&this.model.destroy(),i$11(this)};var _0x15c37b=(_0x39c27e=!0,function(e,t){var i=_0x39c27e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39c27e=!1,i}),_0x18b697=_0x15c37b(void 0,(function(){return _0x18b697.toString().search("(((.+)+)+)+$").toString().constructor(_0x18b697).search("(((.+)+)+)+$")})),_0x39c27e;function _0x176948(){}_0x18b697(),_0x176948.load=function(e,t){if(e$2e(t.model)||(t.model=F$B.fromGltf({url:t.url,incrementallyLoadTextures:!1,headers:e.customRequestHeaders})),t.model.update(e._frameState),t.model.ready){t.state=_0x172047.Ready,t.ready=!0;for(var i=e._skeletonTileMap.get(t.url),n=0,r=i.length;n<r;n++)i[n].dirty=!0}},_0x176948.parse=function(e,t){};var _0x606818=(_0x24c493=!0,function(e,t){var i=_0x24c493?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24c493=!1,i}),_0x175a75=_0x606818(void 0,(function(){return _0x175a75.toString().search("(((.+)+)+)+$").toString().constructor(_0x175a75).search("(((.+)+)+)+$")})),_0x24c493;function _0x55c8b4(e,t,i,n){this.url=t,this.id=n,this.index=-1,this.type=bt$6.INSTANCED_OBJECT,this.position=o$1p.clone(i.position),this.geoPosition=a$18.fromCartesian(this.position),this.offset=u$Z(i.offset,new o$1p(0,0,0)),this.color=u$Z(i.color,new e$1X),this.scale=u$Z(i.scale,new o$1p(1,1,1));var r=u$Z(i.hpr,new i$16);this.hpr=r,this.quaternion=n$15.fromHeadingPitchRoll(r),this.feature=u$Z(i.feature,u$Z.EMPTY_OBJECT),this.isSelected=!1,this.selectedColor=new e$1X,this.preColor=e$1X.clone(this.color),this.tile=void 0,this.instanceInfo=void 0,this.layer=void 0;var o={id:n,primitive:this},a=e.createPickId(o).color,s=new e$1X;s.x=e$1X.floatToByte(a.red),s.y=e$1X.floatToByte(a.green),s.z=e$1X.floatToByte(a.blue),s.w=e$1X.floatToByte(a.alpha),this.pickColor=s}_0x175a75(),_0x55c8b4.prototype.setSelected=function(){if(e$2e(this.layer)&&this.layer.pickEnable){var e=this.index;if(e$2e(e)&&!(e<0)&&!e$1X.equals(this.color,this.selectedColor)){this.color=e$1X.clone(this.selectedColor,new e$1X);var t=e$1X.multiply(this.color,this.preColor,new e$1X),i=this.instanceInfo;if(e$2e(i)&&e$2e(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aColor2];if(e$2e(r)){var o=e*r.strideInBytes+r.offsetInBytes,a=S$14.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=t.red,a[1]=t.green,a[2]=t.blue,a[3]=t.alpha,i.instanceBuffer.copyFromArrayView(a,o),this.isSelected=!0}}}}},_0x55c8b4.prototype.setUnSelected=function(){var e=this.index;if(e$2e(e)&&!(e<0)&&this.isSelected){this.isSelected=!1,this.color=e$1X.clone(this.preColor,this.color);var t=this.instanceInfo;if(e$2e(t)&&e$2e(t.instanceBuffer)){var i=t.attributeLocation,n=t.attributes[i.aColor2];if(e$2e(n)){var r=e*n.strideInBytes+n.offsetInBytes,o=S$14.createTypedArray(n.componentDatatype,n.componentsPerAttribute);o[0]=this.preColor.red,o[1]=this.preColor.green,o[2]=this.preColor.blue,o[3]=this.preColor.alpha,t.instanceBuffer.copyFromArrayView(o,r)}}}},_0x55c8b4.prototype.updateOffsetPosition=function(e){if(e$2e(e)){var t=this.index;this.offset=o$1p.clone(e,this.offset);var i=this.instanceInfo;if(e$2e(i)&&e$2e(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aOffsetPosition];if(e$2e(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$14.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.offset.x,a[1]=this.offset.y,a[2]=this.offset.z,i.instanceBuffer.copyFromArrayView(a,o)}}}},_0x55c8b4.prototype.updatePosition=function(e){if(e$2e(e)){var t=this.index;if(this.position=o$1p.clone(e,this.position),this.geoPosition=a$18.fromCartesian(this.position),e$2e(this.tile)&&e$2e(this.tile.inverseTransform)){this.offset=p$1d.multiplyByPoint(this.tile.inverseTransform,this.position,this.offset);var i=this.instanceInfo;if(e$2e(i)&&e$2e(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aOffsetPosition];if(e$2e(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$14.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.offset.x,a[1]=this.offset.y,a[2]=this.offset.z,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x55c8b4.prototype.updateRotation=function(e){if(e$2e(e)){var t=this.index;if(!i$16.equals(this.hpr,e)){this.hpr=i$16.clone(e,this.hpr),this.quaternion=n$15.fromHeadingPitchRoll(e,this.quaternion);var i=this.instanceInfo;if(e$2e(i)&&e$2e(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aQuaternion];if(e$2e(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$14.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.quaternion.x,a[1]=this.quaternion.y,a[2]=this.quaternion.z,a[3]=this.quaternion.w,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x55c8b4.prototype.updateColor=function(e){if(e$2e(e)){var t=this.index;if(!e$1X.equals(this.color,e)){this.color=e$1X.clone(e,this.color),this.preColor=e$1X.clone(e,this.preColor);var i=this.instanceInfo;if(e$2e(i)&&e$2e(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aColor2];if(e$2e(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$14.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.color.red,a[1]=this.color.green,a[2]=this.color.blue,a[3]=this.color.alpha,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x55c8b4.prototype.updateScale=function(e){if(e$2e(e)){var t=this.index;if(!o$1p.equals(this.scale,e)){o$1p.clone(e,this.scale);var i=this.instanceInfo;if(e$2e(i)&&e$2e(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aScale];if(e$2e(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$14.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=e.x,a[1]=e.y,a[2]=e.z,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x55c8b4.prototype.updateModelMatrix=function(e){var t=p$1d.getScale(e,new o$1p);this.updateScale(t);var i=p$1d.setScale(e,new o$1p(1,1,1),new p$1d),n=p$1d.getRotation(i,new p$1e);n$15.fromRotationMatrix(n,this.quaternion);var r=i$16.fromQuaternion(this.quaternion,new i$16);this.updateRotation(r);var o=p$1d.getTranslation(e,new o$1p);o$1p.add(this.offset,o,this.offset),this.updateOffsetPosition(this.offset)},_0x55c8b4.prototype.write=function(e,t){var i=this.offset,n=this.quaternion,r=this.scale,o=this.color,a=this.pickColor,s=0;e[t+s++]=i.x,e[t+s++]=i.y,e[t+s++]=i.z,e[t+s++]=n.x,e[t+s++]=n.y,e[t+s++]=n.z,e[t+s++]=n.w,e[t+s++]=r.x,e[t+s++]=r.y,e[t+s++]=r.z,e[t+s++]=o.red,e[t+s++]=o.green,e[t+s++]=o.blue,e[t+s++]=o.alpha,e[t+s++]=a.x,e[t+s++]=a.y,e[t+s++]=a.z,e[t+s++]=a.w},_0x55c8b4.prototype.isDestroyed=function(){return!1},_0x55c8b4.prototype.destroy=function(){i$11(this)};var _0x3ad5f7=(_0x1eca07=!0,function(e,t){var i=_0x1eca07?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1eca07=!1,i}),_0x494a6b=_0x3ad5f7(void 0,(function(){return _0x494a6b.toString().search("(((.+)+)+)+$").toString().constructor(_0x494a6b).search("(((.+)+)+)+$")})),_0x1eca07;function _0x36b665(e,t){this.url=e,this.stride=t,this.instances=[],this.instanceBuffer=void 0,this.attributes=void 0,this.attributeLocation=void 0,this.inverseTransform=void 0,this.dirty=!1}function _0x5f3084(e,t){for(var i=e.length,n=new Float32Array(i*t),r=0;r<i;r++){var o=e[r];o.index=r;var a=r*t;o.write(n,a)}return n}function _0x3ae8a1(e,t,i){var n=_0x5f3084(t,i),r=t$X.createVertexBuffer({context:e,typedArray:n,usage:A$18.STATIC_DRAW});return r.vertexArrayDestroyable=!1,r}function _0x4a8871(e,t){var i=S$14.getSizeInBytes(S$14.FLOAT),n=0,r=[],o=0,a={};return a.aOffsetPosition=o++,r.push({name:"aOffsetPosition",index:a.aOffsetPosition,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:n,strideInBytes:i*t,instanceDivisor:1}),n+=3,a.aQuaternion=o++,r.push({name:"aQuaternion",index:a.aQuaternion,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,a.aScale=o++,r.push({name:"aScale",index:a.aScale,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=3,a.aColor2=o++,r.push({name:"aColor2",index:a.aColor2,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,a.aPickColor=o++,r.push({name:"aPickColor",index:a.aPickColor,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,{attributes:r,attributeLocation:a}}_0x494a6b(),_0x36b665.prototype.getHeightRange=function(){for(var e=Number.MAX_VALUE,t=Number.MIN_VALUE,i=this.instances.length,n=0;n<i;n++){var r=this.instances[n];e=Math.min(e,r.geoPosition.height),t=Math.max(t,r.geoPosition.height)}return{minHeight:e,maxHeight:t}},_0x36b665.prototype.update=function(e){if(e$2e(this.instanceBuffer)&&(this.instanceBuffer=this.instanceBuffer.destroy()),this.instances.length>0)if(this.instanceBuffer=_0x3ae8a1(e,this.instances,this.stride),e$2e(this.attributes))for(var t=0,i=this.attributes.length;t<i;t++){this.attributes[t].vertexBuffer=this.instanceBuffer}else{var n=_0x4a8871(this.instanceBuffer,this.stride);this.attributes=n.attributes,this.attributeLocation=n.attributeLocation}this.dirty=!1},_0x36b665.prototype.isDestroyed=function(){return!1},_0x36b665.prototype.destroy=function(){this.instanceBuffer=this.instanceBuffer&&!this.instanceBuffer.isDestroyed()&&this.instanceBuffer.destroy(),this.instances=null,this.attributes=null,this.attributeLocation=null,this.inverseTransform=null,i$11(this)};var _0x55ff82=(_0x859d68=!0,function(e,t){var i=_0x859d68?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x859d68=!1,i}),_0x172011=_0x55ff82(void 0,(function(){return _0x172011.toString().search("(((.+)+)+)+$").toString().constructor(_0x172011).search("(((.+)+)+)+$")})),_0x859d68;_0x172011();var _0x260003="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\nattribute vec4 aTexCoord0;\n#ifdef VertexColor\n #ifdef WEBGPU\n attribute uvec4 aColor;\n #else\n attribute vec4 aColor;\n #endif\n#endif\nattribute vec3 aOffsetPosition;\nattribute vec4 aQuaternion;\nattribute vec3 aScale;\nattribute vec4 aColor2;\nattribute vec4 aPickColor;\n#ifdef LocalTransform\nattribute vec4 aLocalTranslation;\nattribute vec4 aLocalQuaternion;\n#endif\nuniform mat4 uGeoMat;\n\n#ifdef COMPRESS_VERTEX\n uniform float gltf_u_dec_position_normConstant;\n uniform vec3 gltf_u_dec_position_min;\n#endif\n#ifdef COMPRESS_NORMAL\n uniform float gltf_u_dec_normal_rangeConstant;\n#endif\n#ifdef COMPRESS_TEXCOORD\n uniform float gltf_u_dec_texcoord_0_normConstant;\n uniform vec2 gltf_u_dec_texcoord_0_min;\n#endif\n\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec3 vNormalEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying mat4 vModelMatrix;\nmat4 transfromFromQuaternion(vec4 q, vec4 translation)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, translation.x, translation.y, translation.z, 1.0);\n}\n\n#ifdef COMPRESS_VERTEX\n vec3 gltf_decoded_POSITION(vec4 position) {\n return gltf_u_dec_position_min + position.xyz * gltf_u_dec_position_normConstant;\n }\n#endif\n#ifdef COMPRESS_TEXCOORD\n vec2 gltf_decoded_TEXCOORD_0(vec2 texcoord){\n return gltf_u_dec_texcoord_0_min + texcoord * gltf_u_dec_texcoord_0_normConstant;\n }\n#endif\n\nvoid main()\n{\n vec4 vertexPos = vec4(aPosition.xyz, 1.0);\n #ifdef COMPRESS_VERTEX\n vec3 compressPosition = gltf_decoded_POSITION(aPosition);\n vertexPos = vec4(compressPosition.xyz, 1.0);\n #endif\n \n vec4 positionMC = uGeoMat * vertexPos;\n vTexCoord = aTexCoord0.xy;\n #ifdef COMPRESS_TEXCOORD\n vTexCoord = gltf_decoded_TEXCOORD_0(aTexCoord0.xy);\n #endif\n mat3 rotationMat = mat3(transfromFromQuaternion(aQuaternion, vec4(0.0)));\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMat[0], 0.0);\n worldMatrix[1] = vec4(rotationMat[1], 0.0);\n worldMatrix[2] = vec4(rotationMat[2], 0.0);\n worldMatrix[3] = vec4(aOffsetPosition, 1.0);\n mat4 scaleMatrix;\n vec3 scale = aScale.xyz;\n scaleMatrix[0] = vec4(scale.x,0,0,0.0);\n scaleMatrix[1] = vec4(0,scale.y,0,0.0);\n scaleMatrix[2] = vec4(0,0,scale.z,0.0);\n scaleMatrix[3] = vec4(0,0,0,1.0);\n mat4 modelMatrix = worldMatrix;\n#ifdef LocalTransform\n mat4 localTransformMat = transfromFromQuaternion(aLocalQuaternion, aLocalTranslation);\n modelMatrix *= localTransformMat;\n#endif\n modelMatrix *= scaleMatrix;\n mat3 rotationMatrix = mat3(modelMatrix);\n vModelMatrix = modelMatrix * uGeoMat;\n positionMC = modelMatrix * vec4(positionMC.xyz, 1.0);\n positionMC.w = 1.0;\n gl_Position = czm_modelViewProjection * positionMC;\n vPositionMC.xyz = positionMC.xyz;\n vPositionMC.w = 0.0;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = aColor / 255.0;\n #endif\n#endif\n vColor = vertexColor * aColor2;\n vPickColor = aPickColor / 255.0;\n#ifdef HAS_NORMAL\n vec3 vertexNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n vertexNormal = czm_octDecode(aNormal.xy, gltf_u_dec_normal_rangeConstant).zxy;\n #endif\n if(length(vertexNormal) > 0.8)\n {\n vec3 normal = rotationMatrix * vertexNormal;\n mat4 realModelViewMatrix4 = czm_modelView * vModelMatrix;\n realModelViewMatrix4 = czm_inverseMatrix(realModelViewMatrix4);\n mat3 realModelViewMatrix3 = mat3(realModelViewMatrix4);\n realModelViewMatrix3 = czm_transpose(realModelViewMatrix3);\n vNormalEC = realModelViewMatrix3 * vertexNormal;\n vPositionMC.w = 1.0;\n vPositionEC = (czm_modelView * vPositionMC).xyz;\n }\n#endif\n}\n",_0x5228e8=(_0x730160=!0,function(e,t){var i=_0x730160?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x730160=!1,i}),_0x13edd5=_0x5228e8(void 0,(function(){return _0x13edd5.toString().search("(((.+)+)+)+$").toString().constructor(_0x13edd5).search("(((.+)+)+)+$")})),_0x730160;function _0x1c4b07(e){this.ready=!1,this.state=_0x172047.UnLoad,this.url=e,this.subSkeletons=[]}function _0x48700a(e,t){this.attributes=void 0,this.attributeLocation=void 0,this.indexBuffer=void 0,this.sp=void 0,this.colorCommand=void 0,this.boundingVolume=void 0,this._materialUBO=new _0x4f8f70(this,t,e)}function _0x2f8b04(e,t,i){var n=ce$z.UNSIGNED_SHORT;(1===t.indexType||i>=e$2d.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(n=ce$z.UNSIGNED_INT);var r=t$X.createIndexBuffer({context:e,typedArray:t.indicesTypedArray,usage:A$18.STATIC_DRAW,indexDatatype:n});return r.vertexArrayDestroyable=!1,r}function _0x16b1c1(e,t){for(var i=t.vertexAttributes,n=0,r=i.length;n<r;n++){var o=i[n];!e$2e(o.typedArray)||(o.vertexBuffer=t$X.createVertexBuffer({context:e,typedArray:o.typedArray,usage:A$18.STATIC_DRAW}),o.vertexBuffer.vertexArrayDestroyable=!1,o.typedArray=null,delete o.typedArray)}return i}function _0x4df9cf(e,t,i){var n=t.hasTexture,r=t.hasNormal,o=t.hasVertexColor,a=t.flipY,s=t.attributeLocation,l=new s$V({name:"S3MInstanceCollectionVertex",sources:[_0x260003]}),u=new s$V({name:"S3ModelFP",sources:[_0x47b2f7]});a&&u.defines.push("FLIP_Y"),n&&u.defines.push("TEXTURE"),r&&(l.defines.push(D$V.HAS_NORMAL),u.defines.push(D$V.HAS_NORMAL)),o&&l.defines.push("VertexColor");const c=e._frameState.lightSource;e$2e(c)&&(u.defines.push("MAX_POINT_LIGHT_COUNT "+s$J.MaxPointLightCount),u.defines.push("MAX_SPOT_LIGHT_COUNT "+s$J.MaxSpotLightCount),u.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$J.MaxDirectionLightCount),c.directionalLight.length>0&&u.defines.push(D$V.HAS_DIR_LIGHTS),c._visibleLightList[_0x4970c2.POINT].length>0&&u.defines.push(D$V.HAS_POINT_LIGHTS),c._visibleLightList[_0x4970c2.SPOT].length>0&&u.defines.push(D$V.HAS_SPOT_LIGHTS),c.hemisphereLight.length>0&&u.defines.push(D$V.HAS_HEMISPHERE_LIGHTS));return i._usePBR&&(u.defines.push(D$V.BRDF),i.baseColorTexture&&u.defines.push(D$V.HAS_BASE_TEXTURE),i.uNormalTexture&&u.defines.push(D$V.HAS_NORMAL_TEXTURE),i.emissiveTexture&&u.defines.push(D$V.HAS_EMISSIVE_TEXTURE),i.metallicRoughnessTexture&&u.defines.push(D$V.HAS_MetallicRoughness_TEXTURE),i.occlusionTexture&&u.defines.push(D$V.HAS_OCCLUSION_TEXTURE),(e$2e(e._frameState.specularEnvironmentMaps)||e$2e(e._frameState.hdrEnvMap))&&(u.defines.push(D$V.IBL),e$2e(e._frameState.specularEnvironmentMaps)&&u.defines.push(D$V.KtxEnvMap)),e$2e(i._alphaMode)&&i._alphaMode===_0x36a597.MASK&&u.defines.push(D$V.MASK)),r$14.fromCache({context:e._context,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:s})}function _0x422259(e,t,i,n){var r=new i$$({primitiveType:W$18.TRIANGLES,boundingVolume:n,modelMatrix:t,pass:i._bTransparentSorting?Le$q.TRANSLUCENT:Le$q.OPAQUE,cull:!0});e._shadowType===_0x325616.ALL||e._shadowType===_0x325616.SELECTION?(r.castShadows=!0,r.receiveShadows=!0):(r.castShadows=!1,r.receiveShadows=!1),r.pickId="vPickColor";var o=i._textures[0],a={uTexture:function(){return o},uGeoMat:function(){return t}};return i._usePBR&&(a.uBaseTexture=function(){return e$2e(i._baseColorTextureIndex)&&i._baseColorTextureIndex>-1?i.baseColorTexture:e._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture},a.uNormalTexture=function(){return e$2e(i._normalTextureIndex)&&i._normalTextureIndex>-1?i.normalTexture?i.normalTexture:i._textures[i._normalTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.normalTexture},a.uEmissionTexture=function(){if(e$2e(i.emissiveTexture))return i.emissiveTexture;var t=i._emissiveTextureIndex;return t>-1&&e$2e(i._textures[t])?i._textures[t]:e._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},a.uMetallicRoughnessTexture=function(){return e$2e(i._metallicRoughnessTextureIndex)&&i._metallicRoughnessTextureIndex>-1?e$2e(i.metallicRoughnessTexture)?i.metallicRoughnessTexture:i._textures[i._metallicRoughnessTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},a.uOcclusionTexture=function(){return e$2e(i._occlusionTextureIndex)&&i._occlusionTextureIndex>-1?i.occlusionTexture?i.occlusionTexture:e$2e(i._textures[i._occlusionTextureIndex])?i._textures[i._occlusionTextureIndex]:e._context.defaultTexture:e._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},i._usePBRTextureBatch&&(a.uPBRTexture=function(){return i.pbrParamTexture})),r.uniformMap=a,r.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),r}_0x13edd5(),_0x48700a.prototype.isDestroyed=function(){return!1},_0x48700a.prototype.destroy=function(){this.sp=this.sp&&!this.sp.isDestroyed()&&this.sp.destroy(),this.indexBuffer=this.indexBuffer&&!this.indexBuffer.isDestroyed()&&this.indexBuffer.destroy();for(var e=0,t=this.attributes.length;e<t;e++)this.attributes[e].vertexBuffer.destroy();return this.attributes.length=0,this.colorCommand=void 0,i$11(this)},_0x1c4b07.prototype.updateShaderProgram=function(e,t){e.context;for(let e=0,i=this.subSkeletons.length;e<i;e++){const i=this.subSkeletons[e];!e$2e(i.colorCommand)||!e$2e(i.sp)||!i.material._usePBR||(i.sp=i.sp.destroy(),i.sp=_0x4df9cf(t,{hasTexture:e$2e(i.attributeLocation.aTexCoord0)&&i.material._textures.length>0,hasNormal:e$2e(i.attributeLocation.aNormal),hasVertexColor:e$2e(i.attributeLocation.aColor),flipY:0===t._supportCompressType,attributeLocation:i.attributeLocation},i.material),i.colorCommand.shaderProgram=i.sp)}},_0x1c4b07.prototype.createSubSkeleton=function(e,t,i,n,r,o){var a=e._context,s=new _0x48700a(e,i,n);s._materialUBO.update(a),s.attributes=_0x16b1c1(a,n),s.indexBuffer=_0x2f8b04(a,r,n.verticesCount),s.attributeLocation=n.attrLocation,s.material=i,s.sp=_0x4df9cf(e,{hasTexture:e$2e(s.attributeLocation.aTexCoord0)&&i._textures.length>0,hasNormal:e$2e(s.attributeLocation.aNormal),hasVertexColor:e$2e(s.attributeLocation.aColor),flipY:0===e._supportCompressType,attributeLocation:s.attributeLocation},i),s.colorCommand=_0x422259(e,t,i,o);const l=a.uniformState;s.colorCommand.addUniformBuffer(l._sceneUBO),s.colorCommand.addUniformBuffer(l._lightUBO),s.colorCommand.addUniformBuffer(s._materialUBO),s.boundingVolume=i$1d.clone(o),this.subSkeletons.push(s)},_0x1c4b07.prototype.isDestroyed=function(){return!1},_0x1c4b07.prototype.destroy=function(){for(var e=0,t=this.subSkeletons.length;e<t;e++)this.subSkeletons[e].destroy();i$11(this)};var _0x23cf0c=(_0x16de5a=!0,function(e,t){var i=_0x16de5a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16de5a=!1,i}),_0x14911f=_0x23cf0c(void 0,(function(){return _0x14911f.toString().search("(((.+)+)+)+$").toString().constructor(_0x14911f).search("(((.+)+)+)+$")})),_0x16de5a;function _0x5bb99e(e,t,i){this.tileX=e,this.tileY=t,this.level=i,this.rectangle=void 0,this.boundingVolume=void 0,this.transform=void 0,this.inverseTransform=void 0,this.tileBoundingRegion=void 0,this.distanceToCamera=0,this.instanceGroup=new e$1Q,this.skeletonGroup=new e$1Q,this.commandGroup=new e$1Q,this.dirty=!1}function _0x351d2f(e,t){var i={},n=0;for(var r in e)e.hasOwnProperty(r)&&(i[r]=e[r],++n);for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]+n);return i}function _0x1872b5(e,t){for(var i=e.length,n=e.slice(0),r=0,o=t.length;r<o;r++)t[r].index=i+r,n.push(t[r]);return n}function _0x23e112(e,t,i,n){var r=n.instances[0],o=o$1p.maximumComponent(r.scale);e$2e(l=e.commandGroup.get(n.url))||(l=new Array(t.subSkeletons.length),e.commandGroup.set(n.url,l));for(var a=0,s=t.subSkeletons.length;a<s;a++){var l,u=t.subSkeletons[a],c=(l=e.commandGroup.get(n.url))[a];e$2e(c)||((c=i$$.shallowClone(u.colorCommand)).modelMatrix=p$1d.clone(u.colorCommand.modelMatrix),c._relativeModelMatrix=p$1d.clone(u.colorCommand._relativeModelMatrix),l[a]=c),e$2e(c.vertexArray)&&!c.vertexArray.isDestroyed()&&c.vertexArray.destroy();var h=_0x1872b5(u.attributes,n.attributes),d=_0x351d2f(u.attributeLocation,n.attributeLocation);for(var f in d){h[d[f]].name=f}c.vertexArray=new c$13({context:i,attributes:h,indexBuffer:u.indexBuffer}),c.shaderProgram=r$14.fromCache({context:i,shaderProgram:u.sp,vertexShaderSource:u.sp.vertexShaderSource,fragmentShaderSource:u.sp.fragmentShaderSource,attributeLocations:d}),p$1d.clone(e.transform,c.modelMatrix),c.instanceCount=n.instances.length,c.radius=u.boundingVolume.radius*o,c.boundingVolume=e.boundingVolume}}function _0x28d7a2(e,t,i,n){var r=e.layer,o=t.model._nodeCommands,a=o.length,s=t.model._dequantizeInShader,l=n.instances[0],u=o$1p.maximumComponent(l.scale),c=e.commandGroup.get(n.url);e$2e(c)||(c=new Array(a),e.commandGroup.set(n.url,c));for(var h=0;h<a;++h){var d=o[h],f=i$$.shallowClone(d.command);c[h]=f,f._isGltfCommand=!0,f.castShadows=!1,f.receiveShadows=!1,f.pickId="vPickColor",f.instanceCount=n.instances.length,f.pass=Le$q.OPAQUE,f.cull=!1;var p=_0x309a1c(f.shaderProgram.vertexAttributes);i.webgpu&&_0x456f38(f.vertexArray),p=_0x351d2f(p,n.attributeLocation);var _=f.vertexArray._inner,m=_._attributes,g=_.indexBuffer;m=_0x1872b5(m,n.attributes),f.vertexArray=new c$13({context:i,attributes:m,indexBuffer:g});var x=new s$V({name:"InstanceTilesLayerVS",sources:[_0x260003]}),y=new s$V({name:"S3ModelFP",sources:[_0x47b2f7]});y.defines.push("BRDF"),e$2e(r._frameState.specularEnvironmentMaps)&&y.defines.push(D$V.IBL);const t=r._frameState.lightSource;if(e$2e(t))y.defines.push("MAX_POINT_LIGHT_COUNT "+s$J.MaxPointLightCount),y.defines.push("MAX_SPOT_LIGHT_COUNT "+s$J.MaxSpotLightCount),y.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$J.MaxDirectionLightCount),t.directionalLight.length>0&&y.defines.push(D$V.HAS_DIR_LIGHTS),t._visibleLightList[_0x4970c2.POINT].length>0&&y.defines.push(D$V.HAS_POINT_LIGHTS),t._visibleLightList[_0x4970c2.SPOT].length>0&&y.defines.push(D$V.HAS_SPOT_LIGHTS),t.hemisphereLight.length>0&&y.defines.push(D$V.HAS_HEMISPHERE_LIGHTS);e$2e(p.aColor)&&x.defines.push("VertexColor"),e$2e(p.aNormal)&&(x.defines.push(D$V.HAS_NORMAL),y.defines.push(D$V.HAS_NORMAL)),e$2e(p.aTexCoord0)&&(e$2e(f.uniformMap.u_baseColorTexture)||e$2e(f.uniformMap.u_diffuse))&&(x.defines.push("TEXTURE"),y.defines.push("TEXTURE")),s&&(x.defines.push(D$V.COMPRESS_VERTEX),e$2e(p.aTexCoord0)&&x.defines.push(D$V.COMPRESS_TEXCOORD),e$2e(p.aNormal)&&x.defines.push(D$V.COMPRESS_NORMAL)),e$2e(f.uniformMap.u_metallicRoughnessTexture)&&y.defines.push("HAS_MetallicRoughness_TEXTURE"),e$2e(f.uniformMap.u_normalTexture)&&y.defines.push("HAS_NORMAL_TEXTURE"),e$2e(f.uniformMap.u_emissiveTexture)&&y.defines.push("HAS_EMISSIVE_TEXTURE"),e$2e(f.uniformMap.u_occlusionTexture)&&y.defines.push("HAS_OCCLUSION_TEXTURE"),f.shaderProgram=r$14.fromCache({context:i,vertexShaderSource:x,fragmentShaderSource:y,attributeLocations:p});var v=f.uniformMap;const a=new _0xf77618;a._usePBR=!0,a._baseColor=new e$2c(1,1,1,1),a._emissiveFactor=new o$1p,a._roughnessFactor=1,a._metallicFactor=0,e$2e(v.u_baseColorFactor)&&(a._baseColor=v.u_baseColorFactor()),e$2e(v.u_emissiveFactor)&&(a._emissiveFactor=v.u_emissiveFactor()),e$2e(v.u_roughnessFactor)&&(a._roughnessFactor=v.u_roughnessFactor()),e$2e(v.u_metallicFactor)&&(a._metallicFactor=v.u_metallicFactor());const l=new _0x4f8f70({},a,r),b=i.uniformState;l.update(i),f.addUniformBuffer(b._sceneUBO),f.addUniformBuffer(b._lightUBO),f.addUniformBuffer(l);var $={uGeoMat:function(e){return function(){return c[e].localMatrix}}(h)};e$2e(v.u_baseColorTexture)?$.uTexture=v.u_baseColorTexture:e$2e(v.u_diffuse)&&($.uTexture=v.u_diffuse),e$2e(v.u_metallicRoughnessTexture)&&($.uMetallicRoughnessTexture=v.u_metallicRoughnessTexture),e$2e(v.u_normalTexture)&&($.uNormalTexture=v.u_normalTexture),e$2e(v.u_emissiveTexture)&&($.uEmissionTexture=v.u_emissiveTexture),e$2e(v.u_occlusionTexture)&&($.uOcclusionTexture=v.u_occlusionTexture),$=p$19($,v),f.uniformMap=$,f.localMatrix=p$1d.IDENTITY.clone(),f._transformMatrix=p$1d.IDENTITY.clone(),f.modelMatrix=p$1d.clone(p$1d.IDENTITY,new p$1d),f.radius=f.boundingVolume.radius*u,f.boundingVolume=y$Y.clone(e.boundingVolume,new y$Y)}}function _0x309a1c(e){var t={};return e$2e(e.a_position)&&(t.aPosition=e.a_position.index),e$2e(e.a_normal)&&(t.aNormal=e.a_normal.index),e$2e(e.a_vertexColor)&&(t.aColor=e.a_vertexColor.index),e$2e(e.a_texcoord_0)&&(t.aTexCoord0=e.a_texcoord_0.index),e$2e(e.a_texcoord0)&&(t.aTexCoord0=e.a_texcoord0.index),t}function _0x456f38(e){var t=e._inner._babylonVertexBuffers;e$2e(t.a_position)&&(t.aPosition=t.a_position),e$2e(t.a_normal)&&(t.aNormal=t.a_normal),e$2e(t.a_vertexColor)&&(t.aColor=t.a_vertexColor),e$2e(t.a_texcoord_0)&&(t.aTexCoord0=t.a_texcoord_0),e$2e(t.a_texcoord1)&&(t.aTexCoord1=t.a_texcoord1);for(var i=0;i<e._inner._attributes.length;i++){var n=e._inner._attributes[i].name;"a_position"==n&&(e._inner._attributes[i].name="aPosition"),"a_normal"==n&&(e._inner._attributes[i].name="aNormal"),"a_vertexColor"==n&&(e._inner._attributes[i].name="aColor"),"a_texcoord_0"==n&&(e._inner._attributes[i].name="aTexCoord0"),"a_texcoord1"==n&&(e._inner._attributes[i].name="aTexCoord1")}}_0x14911f(),_0x5bb99e.prototype.updateDrawCommand=function(e,t){var i=this.skeletonGroup.get(t.url);e$2e(i)&&i.ready&&(!e$2e(t.instances[0])||(i._isGlTF?(i.transformed=!0,_0x28d7a2(this,i,e,t),i.model.activeAnimations.addAll({loop:_0x1ea9f2.REPEAT})):_0x23e112(this,i,e,t)))},new e$2c(1,1,1,1),_0x5bb99e.prototype.updateBoundingVolume=function(e,t){this.boundingVolume=y$Y.fromRectangle(this.rectangle,e,t)},_0x5bb99e.prototype.remove=function(e){var t=this.instanceGroup.get(e);e$2e(t)&&(t.destroy(),this.instanceGroup.remove(e)),this.skeletonGroup.remove(e);var i=this.commandGroup.get(e);if(e$2e(i)){for(var n=0,r=i.length;n<r;n++){var o=i[n];o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy()}this.commandGroup.remove(e)}},_0x5bb99e.prototype.updateShaderProgram=function(){for(var e in this.instanceGroup._hash)if(this.instanceGroup._hash.hasOwnProperty(e)){var t=this.instanceGroup.get(e),i=this.skeletonGroup.get(t.url),n=this.commandGroup.get(t.url);if(!e$2e(n))continue;for(var r=0,o=i.subSkeletons.length;r<o;r++){var a=i.subSkeletons[r];if(e$2e(a.material)&&a.material._usePBR)n[r].shaderProgram=a.sp}}},_0x5bb99e.prototype.update=function(e){this.dirty=!1;var t=Number.MAX_VALUE,i=Number.MIN_VALUE;for(var n in this.instanceGroup._hash)if(this.instanceGroup._hash.hasOwnProperty(n)){var r=this.instanceGroup.get(n);r.dirty&&r.update(e);var o=r.getHeightRange();t=Math.min(t,o.minHeight),i=Math.max(i,o.maxHeight),this.updateDrawCommand(e,r)}this.updateBoundingVolume(t,i)},_0x5bb99e.prototype.isDestroyed=function(){return!1},_0x5bb99e.prototype.destroy=function(){var e,t,i,n;for(e=0,t=this.instanceGroup.length;e<t;e++){this.instanceGroup.values[e].destroy()}for(this.instanceGroup.removeAll(),this.skeletonGroup.removeAll(),e=0,t=this.commandGroup.length;e<t;e++){var r=this.commandGroup.values[e];for(i=0,n=r.length;i<n;i++){var o=r[i];o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy()}}this.commandGroup.removeAll(),i$11(this)};var _0x4cbbe9=(_0x300c47=!0,function(e,t){var i=_0x300c47?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x300c47=!1,i}),_0xd8502e=_0x4cbbe9(void 0,(function(){return _0xd8502e.toString().search("(((.+)+)+)+$").toString().constructor(_0xd8502e).search("(((.+)+)+)+$")})),_0x300c47;function _0x590c0e(){}function _0x3095a0(e,t){for(var i=[],n=new i$1d,r=new o$1p,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1d.fromPoints(i,n),i.length=0,i$1d.transform(n,t,n),n}_0xd8502e(),_0x590c0e.load=function(e,t){var i=t$10.fetchArrayBuffer({url:t.url});e$2e(i)||(t.state=_0x172047.UnLoad),t.state=_0x172047.Loading,i.then((function(e){t.state=_0x172047.Loaded,t.skeletonBuffer=e}),(function(e){t.state=_0x172047.Failed}))},_0x590c0e.parse=function(e,t){if(_0x29d1c7.init||_0x29d1c7.initWebAssembly(),_0x29d1c7.taskProcessorReady){var i=_0x29d1c7.S3MBTaskProcessor.scheduleTask({buffer:t.skeletonBuffer,supportCompressType:e._supportCompressType},[t.skeletonBuffer]);if(!e$2e(i))return void(t.state=_0x172047.Loaded);t.skeletonBuffer=void 0,t.state=_0x172047.Parsing,i.then((function(i){if(i.result){for(var n=e._context,r={},o=0,a=i.matrials.material.length;o<a;o++){var s=i.matrials.material[o].material,l=s.id,u=new _0xf77618({});r[l]=u,u.createCommonParamter(s),u.createPBRParamter(s);for(var c=s.textureunitstates,h=0;h<c.length;h++){var d=c[h].textureunitstate,f=d.id,p=0===d.addressmode.u?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,_=0===d.addressmode.v?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;u._texMatrix=p$1d.unpack(d.texmodmatrix);var m=i.texturePackage[f];if(e$2e(m)){var g=Se$e.CreateTexture(f,n,m.width,m.height,m.nFormat,m.compressType,m.imageBuffer,!1,p,_);u._textures.push(g),0===m.compressType&&(e._supportCompressType=0)}}}var x=i.groupNode.pageLods;if(e$2e(x))for(o=0,a=x.length;o<a;o++){for(var y=x[o].geodes[0],v=y.matrix,$=0;$<16;$++)v[$]=parseFloat(v[$]);v=p$1d.unpack(v,0);for(var b=y.skeletonNames,T=[],C=0,S=b.length;C<S;C++){var w=b[C].trim();T.push(w);var E=i.geoPackage[w],P=E.vertexPackage,A=_0x3095a0(P,v),L=E.arrIndexPackage[0];if(e$2e(L)){u=r[l=L.materialCode];t.createSubSkeleton(e,v,u,P,L,A)}}}t.ready=!0,t.state=_0x172047.Ready;var M=e._skeletonTileMap.get(t.url);for(o=0,a=M.length;o<a;o++)M[o].dirty=!0;e._skeletonTileMap.remove(t.url)}else t.state=_0x172047.Failed})).otherwise((function(e){console.log(e)}))}};var _0x4564d6=(_0x593bf1=!0,function(e,t){var i=_0x593bf1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x593bf1=!1,i}),_0x2cf424=_0x4564d6(void 0,(function(){return _0x2cf424.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cf424).search("(((.+)+)+)+$")})),_0x593bf1;function _0x432861(){}_0x2cf424();var _0x45c10f=new s$T;function _0x20f2f9(e,t){for(var i=[],n=new i$1d,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1d.fromPoints(i,n),i.length=0,i$1d.transform(n,t,n),n}_0x432861.load=function(e,t){var i=t$10.fetchArrayBuffer({url:t.url,headers:e.customRequestHeaders});e$2e(i)||(t.state=_0x172047.UnLoad),t.state=_0x172047.Loading,i.then((function(e){t.state=_0x172047.Loaded,t.skeletonBuffer=e}),(function(e){t.state=_0x172047.Failed}))},_0x432861.parse=function(e,t){var i=_0x29d1c7.S3MTaskProcessor.scheduleTask({buffer:t.skeletonBuffer,supportCompressType:e._supportCompressType},[t.skeletonBuffer]);e$2e(i)?(t.skeletonBuffer=void 0,t.state=_0x172047.Parsing,i.then((function(i){if(i.result){e._gl;for(var n=e._context,r=_0x45c10f.read(i.xmlDoc).firstChild,o=r.namespaceURI,a=s$T.queryFirstNode(r,"Material3Ds",o),s=s$T.queryChildNodes(a,"material",o),l={},u=0,c=s.length;u<c;u++){var h=s[u],d=s$T.queryStringValue(h,"name",o),f=new _0xf77618({});l[d]=f;var p=s$T.queryFirstNode(h,"Ambient",o),_=s$T.queryNumericValue(p,"AmbientR",o),m=s$T.queryNumericValue(p,"AmbientG",o),g=s$T.queryNumericValue(p,"AmbientB",o),x=s$T.queryNumericValue(p,"AmbientA",o);f._ambientColor=new e$1X(_,m,g,x);var y=s$T.queryFirstNode(h,"Diffuse",o);_=s$T.queryNumericValue(y,"DiffuseR",o),m=s$T.queryNumericValue(y,"DiffuseG",o),g=s$T.queryNumericValue(y,"DiffuseB",o),x=s$T.queryNumericValue(y,"DiffuseA",o),f._diffuseColor=new e$1X(_,m,g,x);var v=s$T.queryFirstNode(h,"Specular",o);_=s$T.queryNumericValue(v,"SpecularR",o),m=s$T.queryNumericValue(v,"SpecularG",o),g=s$T.queryNumericValue(v,"SpecularB",o),x=s$T.queryNumericValue(v,"SpecularA",o),f._specularColor=new e$1X(_,m,g,x);var $=s$T.queryNumericValue(h,"Shininess",o);f._shininess=$,s$T.queryFirstNode(h,"TransparentSorting",o),f._bTransparentSorting=s$T.queryBooleanValue(h,"TransparentSorting",o)||f._diffuseColor.alpha<1;var b=s$T.queryFirstNode(h,"texture",o),T=s$T.queryStringValue(b,"name",o),C=s$T.queryFirstNode(b,"AddressMode",o),S=s$T.queryStringValue(C,"u",o),w=s$T.queryStringValue(C,"v",o);S="TAM_WRAP"===S?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,w="TAM_WRAP"===w?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;var E=i.texturePackage[T];if(e$2e(E)){var P=Se$e.CreateTexture(T,n,E.width,E.height,E.nFormat,E.compressType,E.imageBuffer,!1,S,w);f._textures.push(P),0===E.compressType&&(e._supportCompressType=0)}}var A=s$T.queryFirstNode(r,"PageLods",o),L=s$T.queryNodes(A,"Geode",o);for(u=0,c=L.length;u<c;u++){for(var M=L[u],R=s$T.queryStringValue(M,"GeoDeModMatrix",o).split(","),O=0;O<16;O++)R[O]=parseFloat(R[O]);R=p$1d.unpack(R,0);for(var D=s$T.queryNodes(M,"GeoName",o),I=[],F=0,B=D.length;F<B;F++){var N=D[F].textContent.trim();I.push(N);var G=i.geoPackage[N],z=_0x20f2f9(U=G.vertexPackage,R),U=G.vertexPackage,V=G.arrIndexPackage[0];if(e$2e(V)){f=l[d=V.materialCode];t.createSubSkeleton(e,R,f,U,V,z)}}}t.ready=!0,t.state=_0x172047.Ready;var k=e._skeletonTileMap.get(t.url);for(u=0,c=k.length;u<c;u++)k[u].dirty=!0;e._skeletonTileMap.remove(t.url)}else t.state=_0x172047.Failed})).otherwise((function(e){console.log(e)}))):t.state=_0x172047.Loaded};var _0xee3a77=(_0x31bf72=!0,function(e,t){var i=_0x31bf72?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31bf72=!1,i}),_0x2fc011=_0xee3a77(void 0,(function(){return _0x2fc011.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fc011).search("(((.+)+)+)+$")})),_0x31bf72;function _0x18a7ac(){}_0x2fc011(),_0x18a7ac.load=function(e,t){t._isGlTF?_0x176948.load(e,t):_0x432861.load(e,t)},_0x18a7ac.parse=function(e,t){t.url.endsWith("s3mb")?_0x590c0e.parse(e,t):_0x432861.parse(e,t)};var _0x2ee4b9=(_0x4ed044=!0,function(e,t){var i=_0x4ed044?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4ed044=!1,i}),_0x541882=_0x2ee4b9(void 0,(function(){return _0x541882.toString().search("(((.+)+)+)+$").toString().constructor(_0x541882).search("(((.+)+)+)+$")})),_0x4ed044;function _0x468844(e){this._context=e,this._gl=e._gl,this.type=bt$6.INSTANCED_LAYER,this._tilingScheme=new g$15,this._modelSkeletons=new e$1Q,this._tiles=new e$1Q,this._instances=new e$1Q,this._skeletonTileMap=new e$1Q,this._tileWidth=1e3,this._maxSSE=2,this._level=10,this._maxGeometricError=0,this._level=this.computeLevel(this._tileWidth),this._minVisibleAltitude=0,this._maxVisibleAltitude=Number.MAX_VALUE,this._filterMode=_0x219958.PIXEL_SIZE_ON_SCREEN,this._filterDistance=Number.MAX_VALUE,this._filterPixel=0,this._selectedColor=new e$1X(.7,.7,1,1),this._pickEnable=!0,this._visibleViewport=4095,this._supportCompressType=e$2e(e.s3tc)?1:e$2e(e.pvrtc)?2:3,this._shadowType=_0x325616.NONE,this._specularEnvironmentMaps=void 0,this._hdrEnvMap=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:new o$1p,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}},this._visible=!0}function _0x38069e(e,t,i){var n=e.camera,r=e.context.drawingBufferWidth,o=e.context.drawingBufferHeight,a=Math.max(r,o),s=.5*n.frustum.fov,l=.5*a/Math.tan(s);return Math.ceil(l*t/i)}function _0x45cc5b(e,t,i){if(!e$2e(i.boundingVolume))return!1;if(!(e.cullingVolume.computeVisibility(i.boundingVolume)!==Ae$w.OUTSIDE))return!1;var n=i.tileBoundingRegion.distanceToCamera(e);if(i.distanceToCamera=n,e.fog.enabled&&e$2d.fog(n,e.fog.density)>=1)return!1;var r=e.context.drawingBufferHeight,o=e.camera.frustum.sseDenominator,a=t._maxGeometricError*r/(n*o);return e.fog.enabled&&(a-=e$2d.fog(n,e.fog.density)*e.fog.sse),!(a<t._maxSSE)}function _0x1293a3(e,t){t.state===_0x172047.UnLoad&&_0x18a7ac.load(e,t),t.state===_0x172047.Loaded&&_0x18a7ac.parse(e,t)}function _0x3af1a3(e,t,i){for(var n=0;n<i.commandGroup.length;n++)for(var r=i.commandGroup.values[n],o=0;o<r.length;o++){var a=r[o];if(t._filterMode===_0x219958.PIXEL_SIZE_ON_SCREEN){if(_0x38069e(e,a.radius,i.distanceToCamera)<t.filterPixel)continue}else if(i.distanceToCamera>t.filterDistance)continue;e.commandList.push(a)}}_0x541882(),Object.defineProperties(_0x468844.prototype,{visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("Instance visible",e),e!==this._visible&&(this._visible=e)}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){o$1q.typeOf.number("InstanceLayer minVisibleAltitude",e),this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){o$1q.typeOf.number("InstanceLayer maxVisibleAltitude",e),this._maxVisibleAltitude=e}},filterMode:{get:function(){return this._filterMode},set:function(e){o$1q.typeOf.number("InstanceLayer filterMode",e),this._filterMode=e}},filterDistance:{get:function(){return this._filterDistance},set:function(e){o$1q.typeOf.number("InstanceLayer filterPixel",e),this._filterDistance=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){o$1q.typeOf.number("InstanceLayer filterPixel",e),this._filterPixel=e}},selectedColor:{get:function(){return this._selectedColor},set:function(e){o$1q.typeOf.object("InstanceLayer selectedColor",e),this._selectedColor=e$1X.clone(e,this._selectedColor)}},pickEnable:{get:function(){return this._pickEnable},set:function(e){o$1q.typeOf.bool("InstanceLayer pickEnable",e),this._pickEnable=e}},tileWidth:{get:function(){return this._tileWidth},set:function(e){o$1q.typeOf.number("InstanceLayer tileWidth",e),this._tileWidth=e;var t=this.computeLevel(e);t!==this._level&&(this._level=t,this.updateTiles())}},maxSSE:{get:function(){return this._maxSSE},set:function(e){this._maxSSE=e}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders!==e&&(this._customRequestHeaders=e)}}});var _0x3a09ab=78271.51696402048;function _0x22a592(e){return e._shadowType==_0x325616.SELECTION||e._shadowType==_0x325616.ALL}_0x468844.prototype.computeLevel=function(e){var t=10,i=this._tilingScheme.tileXYToRectangle(0,0,10),n=this._tilingScheme._projection,r=h$18.southwest(i),o=h$18.northeast(i);r=n.project(r);var a=(o=n.project(o)).x-r.x;for(o.y,r.y;a>e;)++t,a*=.5;return t-=1,this._maxGeometricError=_0x3a09ab/(1<<t),t},_0x468844.prototype.updateTiles=function(){var e,t,i,n;for(e=0,t=this._tiles.length;e<t;e++)this._tiles.values[e].destroy();this._tiles.removeAll(),this._skeletonTileMap.removeAll();var r=this._tilingScheme;for(e=0,t=this._instances.length;e<t;e++){var o=this._instances.values[e];for(i=0,n=o.length;i<n;i++){var a=o.values[i];a.tile=void 0,a.instanceInfo=void 0;var s=a.url,l=r.positionToTileXY(a.geoPosition,this._level),u=l.x+"_"+l.y;if(!e$2e(p=this._tiles.get(u))){(p=new _0x5bb99e(l.x,l.y)).layer=this;var c=r.tileXYToRectangle(l.x,l.y,this._level);p.rectangle=h$18.clone(c),p.boundingVolume=y$Y.fromRectangle(c,0,0),p.transform=m$19.eastNorthUpToFixedFrame(p.boundingVolume.center,void 0,new p$1d),p.inverseTransform=p$1d.inverse(p.transform,new p$1d),p.tileBoundingRegion=new y$K({computeBoundingVolumes:!1,rectangle:c,ellipsoid:r.ellipsoid,minimumHeight:0,maximumHeight:0}),this._tiles.set(u,p)}a.offset=p$1d.multiplyByPoint(p.inverseTransform,a.position,a.offset),p.dirty=!0;var h=this._skeletonTileMap.get(s);e$2e(h)||(h=[],this._skeletonTileMap.set(s,h)),h.push(p);var d=p.instanceGroup.get(s);e$2e(d)||(d=new _0x36b665(s,_0x468844.STRIDE),p.instanceGroup.set(s,d)),d.instances.push(a),a.instanceInfo=d,a.tile=p,d.dirty=!0;var f=p.skeletonGroup.get(s);e$2e(f)||(f=this._modelSkeletons.get(s),p.skeletonGroup.set(s,f))}}for(e=0,t=this._tiles.length;e<t;e++){var p;(p=this._tiles.values[e]).dirty&&p.update(this._context)}},_0x468844.prototype.add=function(e,t,i){if(o$1q.typeOf.string("url",e),o$1q.defined("attrs",t),Array.isArray(t)||(t=[t]),!this._modelSkeletons.contains(e)){var n=!1;(e.indexOf(".gltf")>0||e.indexOf(".glb")>0)&&(n=!0),e$2e(i)&&(n="gltf"===i),n?this._modelSkeletons.set(e,new _0x3248fd(e)):this._modelSkeletons.set(e,new _0x1c4b07(e))}for(var r=this._tilingScheme,o=0,a=t.length;o<a;o++){var s=t[o],l=u$Z(s.id,e$1T()),u=new _0x55c8b4(this._context,e,s,l),c=r.positionToTileXY(u.geoPosition,this._level),h=c.x+"_"+c.y;if(!e$2e(g=this._tiles.get(h))){(g=new _0x5bb99e(c.x,c.y)).layer=this;var d=this._tilingScheme.tileXYToRectangle(c.x,c.y,this._level);g.rectangle=h$18.clone(d),g.boundingVolume=y$Y.fromRectangle(d,0,0),g.transform=m$19.eastNorthUpToFixedFrame(g.boundingVolume.center,void 0,new p$1d),g.inverseTransform=p$1d.inverse(g.transform,new p$1d),g.tileBoundingRegion=new y$K({computeBoundingVolumes:!1,rectangle:d,ellipsoid:r.ellipsoid,minimumHeight:0,maximumHeight:0}),this._tiles.set(h,g)}u.offset=p$1d.multiplyByPoint(g.inverseTransform,u.position,u.offset),u.selectedColor=e$1X.clone(this._selectedColor,u.selectedColor),g.dirty=!0;var f=this._skeletonTileMap.get(e);e$2e(f)||(f=[],this._skeletonTileMap.set(e,f)),f.push(g);var p=g.instanceGroup.get(u.url);e$2e(p)||(p=new _0x36b665(u.url,_0x468844.STRIDE),g.instanceGroup.set(u.url,p)),p.instances.push(u),u.instanceInfo=p,u.tile=g,u.layer=this,p.dirty=!0;var _=g.skeletonGroup.get(u.url);e$2e(_)||(_=this._modelSkeletons.get(u.url),g.skeletonGroup.set(u.url,_));var m=this._instances.get(e);e$2e(m)||(m=new e$1Q,this._instances.set(e,m)),m.set(l,u)}for(o=0,a=this._tiles.length;o<a;o++){var g;(g=this._tiles.values[o]).dirty&&g.update(this._context)}},_0x468844.prototype.getInstance=function(e,t){o$1q.defined("InstanceLayer getInstance url",e),o$1q.defined("InstanceLayer getInstance id",t);var i=this._instances.get(e);if(e$2e(i))return i.get(t)},_0x468844.prototype._updateShadow=function(e){var t=_0x22a592(e),i=e._modelSkeletons._hash;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.subSkeletons.length;o<a;o++){var s=r.subSkeletons[o];s.colorCommand.castShadows=t,s.colorCommand.receiveShadows=t}}},_0x468844.prototype.removeInstance=function(e,t){o$1q.defined("InstanceLayer removeInstance url",e),o$1q.defined("InstanceLayer removeInstance ids",t),Array.isArray(t)||(t=[t]);for(var i=0,n=t.length;i<n;i++){var r=t[i],o=this.getInstance(e,r);if(e$2e(o)&&e$2e(o.tile)){var a=o.tile;a.dirty=!0;var s=a.instanceGroup.get(e);if(e$2e(s)){s.dirty=!0;var l=s.instances.indexOf(o);s.instances.splice(l,1),this._instances.get(e).remove(o.id)}}}0===this._instances.get(e).length&&this.removeAll(e)},_0x468844.prototype.removeAll=function(e){var t,i;if(e$2e(e)){if(!this._modelSkeletons.contains(e))return;for(this._modelSkeletons.get(e).destroy(),this._modelSkeletons.remove(e),this._instances.remove(e),this._skeletonTileMap.remove(e),t=0,i=this._tiles.length;t<i;t++){var n=this._tiles.values[t];n.remove(e),n.dirty=!0}}else{for(t=0,i=this._modelSkeletons.length;t<i;t++){var r=this._modelSkeletons.values[t];r._isGlTF?!r.model.isDestroyed()&&r.model.destroy():this._modelSkeletons.values[t].destroy()}for(this._modelSkeletons.removeAll(),t=0,i=this._tiles.length;t<i;t++)this._tiles.values[t].destroy();this._tiles.removeAll(),this._instances.removeAll(),this._skeletonTileMap.removeAll()}},_0x468844.prototype.setUnSelected=function(){var e=this._instances;if(e$2e(e)&&!(e.length<1))for(var t=0,i=e.length;t<i;t++)for(var n=e.values[t],r=0,o=n.length;r<o;r++){n.values[r].setUnSelected()}},_0x468844.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x468844.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0x468844.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;var t=e.camera;if(!(t.positionCartographic.height>this._maxVisibleAltitude||t.positionCartographic.height<this._minVisibleAltitude)&&(!e.passes.pick||this._pickEnable)&&this._visible){var i=!1;for(var n in(this._specularEnvironmentMaps!==e.specularEnvironmentMaps||this._hdrEnvMap!==e.hdrEnvMap)&&(i=!0,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._hdrEnvMap=e.hdrEnvMap),this._frameState=e,this._modelSkeletons._hash)if(this._modelSkeletons._hash.hasOwnProperty(n)){var r=this._modelSkeletons.get(n);r.ready?i&&r.updateShaderProgram(e,this):_0x1293a3(this,r),r._isGlTF&&r.transformed&&r.model.updateAnimation(e)}for(var o=0,a=this._tiles.length;o<a;o++){var s=this._tiles.values[o];if(i&&s.updateShaderProgram(),_0x45cc5b(e,this,s)){for(var n in s.dirty&&s.update(this._context),s.commandGroup._hash){var l=this._modelSkeletons.get(n).model;if(e$2e(l))for(var u=l._nodeCommands,c=s.commandGroup.get(n),h=0,d=c.length;h<d;h++){var f=c[h],p=u[h].command;p$1d.clone(p.modelMatrix,f.localMatrix),p$1d.clone(s.transform,f.modelMatrix),y$Y.clone(s.boundingVolume,f.boundingVolume)}}_0x3af1a3(e,this,s)}}}},_0x468844.STRIDE=18,_0x468844.prototype.isDestroyed=function(){return!1},_0x468844.prototype.destroy=function(){this.removeAll(),i$11(this)};var _0x4e968c=(_0x5d1327=!0,function(e,t){var i=_0x5d1327?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d1327=!1,i}),_0x58c3e4=_0x4e968c(void 0,(function(){return _0x58c3e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x58c3e4).search("(((.+)+)+)+$")})),_0x5d1327;function _0x3763f9(e,t){this.id=e,this.buffer=t}_0x58c3e4();var _0x1bb9d9=(_0x57d707=!0,function(e,t){var i=_0x57d707?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57d707=!1,i}),_0xe8306c=_0x1bb9d9(void 0,(function(){return _0xe8306c.toString().search("(((.+)+)+)+$").toString().constructor(_0xe8306c).search("(((.+)+)+)+$")})),_0x57d707,_0x298aad;function _0x5a4a56(){}function _0x427cea(e,t){for(var i=e.num_points(),n=e.num_faces(),r=new _0x298aad.DracoInt32Array,o=3*n,a=ce$z.createTypedArray(i,o),s=0,l=0;l<n;++l)t.GetFaceFromMesh(e,l,r),a[s+0]=r.GetValue(0),a[s+1]=r.GetValue(1),a[s+2]=r.GetValue(2),s+=3;var u=ce$z.UNSIGNED_SHORT;return a instanceof Uint32Array&&(u=ce$z.UNSIGNED_INT),_0x298aad.destroy(r),{typedArray:a,numberOfIndices:o,indexDataType:u}}function _0x1a20af(e,t,i,n,r){var o,a;n.quantizationBits<=8?(a=new _0x298aad.DracoUInt8Array,o=new Uint8Array(r),t.GetAttributeUInt8ForAllPoints(e,i,a)):(a=new _0x298aad.DracoUInt16Array,o=new Uint16Array(r),t.GetAttributeUInt16ForAllPoints(e,i,a));for(var s=0;s<r;++s)o[s]=a.GetValue(s);return _0x298aad.destroy(a),o}function _0x2b6943(e,t,i,n){var r,o;switch(i.data_type()){case 1:case 11:o=new _0x298aad.DracoInt8Array,r=new Int8Array(n),t.GetAttributeInt8ForAllPoints(e,i,o);break;case 2:o=new _0x298aad.DracoUInt8Array,r=new Uint8Array(n),t.GetAttributeUInt8ForAllPoints(e,i,o);break;case 3:o=new _0x298aad.DracoInt16Array,r=new Int16Array(n),t.GetAttributeInt16ForAllPoints(e,i,o);break;case 4:o=new _0x298aad.DracoUInt16Array,r=new Uint16Array(n),t.GetAttributeUInt16ForAllPoints(e,i,o);break;case 5:case 7:o=new _0x298aad.DracoInt32Array,r=new Int32Array(n),t.GetAttributeInt32ForAllPoints(e,i,o);break;case 6:case 8:o=new _0x298aad.DracoUInt32Array,r=new Uint32Array(n),t.GetAttributeUInt32ForAllPoints(e,i,o);break;case 9:case 10:o=new _0x298aad.DracoFloat32Array,r=new Float32Array(n),t.GetAttributeFloatForAllPoints(e,i,o)}for(var a=0;a<n;++a)r[a]=o.GetValue(a);return _0x298aad.destroy(o),r}function _0x5ca8c3(e,t,i){var n,r=e.num_points(),o=i.num_components(),a=new _0x298aad.AttributeQuantizationTransform;if(a.InitFromAttribute(i)){for(var s=new Array(o),l=0;l<o;++l)s[l]=a.min_value(l);n={quantizationBits:a.quantization_bits(),minValues:s,range:a.range(),octEncoded:!1}}_0x298aad.destroy(a),(a=new _0x298aad.AttributeOctahedronTransform).InitFromAttribute(i)&&(n={quantizationBits:a.quantization_bits(),octEncoded:!0}),_0x298aad.destroy(a);var u,c=r*o;u=e$2e(n)?_0x1a20af(e,t,i,n,c):_0x2b6943(e,t,i,c);var h=S$14.fromTypedArray(u);if(S$14.getSizeInBytes(h)*o%4!=0){var d=_0x366ce6(u,o,h);u=d.vertexArray,o=d.numComponents}return{array:u,data:{componentsPerAttribute:o,componentDatatype:h,byteOffset:i.byte_offset(),byteStride:S$14.getSizeInBytes(h)*o,normalized:i.normalized(),quantization:n}}}function _0x366ce6(e,t,i){var n,r=S$14.getSizeInBytes(i),o=r*t;n=t+(4*Math.ceil(o/4)-o)/r;var a,s=e.length/t,l=s*n;e instanceof Uint16Array?a=new Uint16Array(l):e instanceof Int16Array?a=new Int16Array(l):e instanceof Uint8Array?a=new Uint8Array(l):console.log("convertArrayToMutiple4Array dont support array type.");var u,c=0;for(c=0;c<s;c++)for(u=0;u<n;u++)a[c*n+u]=u<t?e[c*t+u]:0;return{numComponents:n,vertexArray:a}}_0xe8306c();var _0x1fc91f=new o$1p(40680631590769,40680631590769,40408299984661.445),_0x46ef19=new o$1p,_0x15684b=new o$1p;function _0x15be72(e,t,i,n){var r=Math.cos(t);_0x46ef19.x=r*Math.cos(e),_0x46ef19.y=r*Math.sin(e),_0x46ef19.z=Math.sin(t),_0x46ef19=o$1p.normalize(_0x46ef19,_0x46ef19),o$1p.multiplyComponents(_0x1fc91f,_0x46ef19,_0x15684b);var o=Math.sqrt(o$1p.dot(_0x46ef19,_0x15684b));return _0x15684b=o$1p.divideByScalar(_0x15684b,o,_0x15684b),_0x46ef19=o$1p.multiplyByScalar(_0x46ef19,i,_0x46ef19),e$2e(n)||(n=new o$1p),o$1p.add(_0x15684b,_0x46ef19,n)}var _0x5f5c31=new p$1d,_0x36a288=new p$1d,_0x590758=new o$1p,_0x5cd4d6=new a$18;function _0x3f4a2d(e,t,i,n,r,o,a,s){var l=void 0,u=void 0,c=void 0,h=void 0,d=i.vertexAttributes,f=i.attrLocation;if(i.nCompressOptions=0,e$2e(n.posUniqueID)&&n.posUniqueID>=0){e$2e(s)||(i.nCompressOptions|=_0x64fca6.SVC_Vertex);var p=t.GetAttribute(e,n.posUniqueID),_=_0x5ca8c3(e,t,p),m=_.data.componentsPerAttribute;i.verticesCount=_.array.length/m,i.vertCompressConstant=_.data.quantization.range/(1<<_.data.quantization.quantizationBits);var g=_.data.quantization.minValues;i.minVerticesValue=new e$2c(g[0],g[1],g[2],1),m>3&&(i.minVerticesValue.w=g[3]);var x=i.verticesCount;if(o&&(l=new a$18,u=new a$18,c=new Float32Array(2*x),h=new Float64Array(2*x)),e$2e(s)){var y=_.array,v=3===m?o$1p.unpackArray(y):e$2c.unpackArray(y);for(let e=0,t=v.length;e<t;e++){let t=v[e];o$1p.multiplyByScalar(t,i.vertCompressConstant,t),o$1p.add(t,i.minVerticesValue,t)}var $=p$1d.multiply(s.sphereMatrix,s.geoMatrix,_0x5f5c31),b=p$1d.multiply(s.ellipsoidMatrix,s.geoMatrix,_0x36a288);p$1d.inverse(b,b);var T=new t$12(6378137,6378137,6378137);for(let e=0,t=v.length;e<t;e++){let t=v[e];p$1d.multiplyByPoint($,t,_0x590758);let i=T.cartesianToCartographic(_0x590758,_0x5cd4d6);o&&(h[2*e]=i.longitude,h[2*e+1]=i.latitude,0===e?(l.longitude=i.longitude,l.latitude=i.latitude,u.longitude=i.longitude,u.latitude=i.latitude):(l.longitude=Math.max(i.longitude,l.longitude),l.latitude=Math.max(i.latitude,l.latitude),u.longitude=Math.min(i.longitude,u.longitude),u.latitude=Math.min(i.latitude,u.latitude)));let n=_0x15be72(i.longitude,i.latitude,i.height,_0x590758);p$1d.multiplyByPoint(b,n,t)}var C=new Array(3*v.length);3===m?o$1p.packArray(v,C):e$2c.packArray(v,C),_.array=new Float32Array(C),_.data.componentDatatype=S$14.FLOAT,_.data.byteStride=4*m}if(f.aPosition=d.length,d.push({index:f.aPosition,typedArray:_.array,componentsPerAttribute:m,componentDatatype:_.data.componentDatatype,offsetInBytes:_.data.byteOffset,strideInBytes:_.data.byteStride,normalize:_.data.normalized}),!e$2e(s)&&o)for(var S=new o$1p,w=new o$1p,E=new a$18,P=0;P<x;P++)p$1d.multiplyByPoint(r,o$1p.fromElements(_.array[3*P]*i.vertCompressConstant+g[0],_.array[3*P+1]*i.vertCompressConstant+g[1],_.array[3*P+2]*i.vertCompressConstant+g[2],S),w),E=a$18.fromCartesian(w),h[2*P]=E.longitude,h[2*P+1]=E.latitude,0===P?(l.longitude=E.longitude,l.latitude=E.latitude,u.longitude=E.longitude,u.latitude=E.latitude):(l.longitude=Math.max(E.longitude,l.longitude),l.latitude=Math.max(E.latitude,l.latitude),u.longitude=Math.min(E.longitude,u.longitude),u.latitude=Math.min(E.latitude,u.latitude));if(o){for(P=0;P<x;P++)c[2*P]=h[2*P]-u.longitude,c[2*P+1]=h[2*P+1]-u.latitude;f.img=d.length,d.push({index:f.img,typedArray:c,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),a.max=l,a.min=u}}if(e$2e(n.normalUniqueID)&&n.normalUniqueID>=0){i.nCompressOptions|=_0x64fca6.SVC_Normal;var A=t.GetAttribute(e,n.normalUniqueID),L=_0x5ca8c3(e,t,A),M=L.data.quantization;i.normalRangeConstant=(1<<M.quantizationBits)-1,f.aNormal=d.length,d.push({index:f.aNormal,typedArray:L.array,componentsPerAttribute:L.data.componentsPerAttribute,componentDatatype:L.data.componentDatatype,offsetInBytes:L.data.byteOffset,strideInBytes:L.data.byteStride,normalize:L.data.normalized})}if(e$2e(n.colorUniqueID)&&n.colorUniqueID>=0){i.nCompressOptions|=_0x64fca6.SVC_VertexColor;var R=t.GetAttribute(e,n.colorUniqueID),O=_0x5ca8c3(e,t,R),D=O.array,I=O.data.componentDatatype,F=O.data.byteOffset,B=O.data.byteStride,N=O.data.normalized;if(O.array instanceof Int32Array){D=new Uint8Array(O.array.length);for(let e=0,t=O.array.length;e<t;e++)D[e]=O.array[e];I=5121,F=0,B=4,N=!0}f.aColor=d.length,d.push({index:f.aColor,typedArray:D,componentsPerAttribute:O.data.componentsPerAttribute,componentDatatype:I,offsetInBytes:F,strideInBytes:B,normalize:N})}for(P=0;P<n.texCoordUniqueIDs.length;P++){i.texCoordCompressConstant=[],i.minTexCoordValue=[];var G=n.texCoordUniqueIDs[P];if(!(G<0)){var z=t.GetAttribute(e,G),U=_0x5ca8c3(e,t,z);if(e$2e(U.data.quantization)){i.nCompressOptions|=_0x64fca6.SVC_TexutreCoord,i.texCoordCompressConstant.push(U.data.quantization.range/(1<<U.data.quantization.quantizationBits));g=U.data.quantization.minValues;i.minTexCoordValue.push(new o$1o(g[0],g[1]))}var V="aTexCoord"+P;f[V]=d.length,d.push({index:f[V],typedArray:U.array,componentsPerAttribute:U.data.componentsPerAttribute,componentDatatype:U.data.componentDatatype,offsetInBytes:U.data.byteOffset,strideInBytes:U.data.byteStride,normalize:U.data.normalized}),i.textureCoordIsW=!0}}for(P=0;P<n.vertexAttrUniqueIDs.length;P++){var k=n.vertexAttrUniqueIDs[P];if(!(k<0)){var W=t.GetAttribute(e,k),H=_0x5ca8c3(e,t,W);f.aVertexWeight=d.length,d.push({index:f.aVertexWeight,typedArray:H.array,componentsPerAttribute:H.data.componentsPerAttribute,componentDatatype:H.data.componentDatatype,offsetInBytes:H.data.byteOffset,strideInBytes:H.data.byteStride,normalize:H.data.normalized}),i.customVertexAttribute={VertexWeight:0}}}}_0x5a4a56.dracoDecodePointCloud=function(e,t,i,n,r){for(var o=new(_0x298aad=e).Decoder,a=["POSITION","NORMAL","COLOR"],s=0;s<a.length;++s)o.SkipAttributeTransform(_0x298aad[a[s]]);var l=new _0x298aad.DecoderBuffer;if(l.Init(t,i),o.GetEncodedGeometryType(l)!==_0x298aad.POINT_CLOUD)throw new t$13("Draco geometry type must be POINT_CLOUD.");var u=new _0x298aad.PointCloud,c=o.DecodeBufferToPointCloud(l,u);if(!c.ok()||0===u.ptr)throw new t$13("Error decoding draco point cloud: "+c.error_msg());_0x298aad.destroy(l),_0x3f4a2d(u,o,n,r),_0x298aad.destroy(u),_0x298aad.destroy(o)},_0x5a4a56.dracoDecodeMesh=function(e,t,i,n,r,o,a,s,l,u){for(var c=new(_0x298aad=e).Decoder,h=["POSITION","NORMAL","COLOR","TEX_COORD"],d=0;d<h.length;++d)c.SkipAttributeTransform(_0x298aad[h[d]]);var f=new _0x298aad.DecoderBuffer;if(f.Init(t,i),c.GetEncodedGeometryType(f)!==_0x298aad.TRIANGULAR_MESH)throw new t$13("Unsupported draco mesh geometry type.");var p=new _0x298aad.Mesh;if(!c.DecodeBufferToMesh(f,p).ok()||0===p.ptr)return!1;_0x298aad.destroy(f),_0x3f4a2d(p,c,n,o,a,s,l,u);var _=_0x427cea(p,c);r.indicesTypedArray=_.typedArray,r.indicesCount=_.numberOfIndices,r.indexType=_.indexDataType,r.primitiveType=W$18.TRIANGLES,_0x298aad.destroy(p),_0x298aad.destroy(c)};var _0x827a55=(_0x2a611e=!0,function(e,t){var i=_0x2a611e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a611e=!1,i}),_0xa96f76=_0x827a55(void 0,(function(){return _0xa96f76.toString().search("(((.+)+)+)+$").toString().constructor(_0xa96f76).search("(((.+)+)+)+$")})),_0x2a611e;function _0x4bc96b(){this._cache={},this._cacheHeap=new o$1g({comparator:sortComparator}),this._cacheHeap.maximumLength=100}_0xa96f76(),_0x4bc96b.prototype.set=function(e,t){var i={id:e,buffer:t,priority:Et$c()};this._cache[e]=i;var n=this._cacheHeap.insert(i);e$2e(n)&&delete this._cache[n.id]},_0x4bc96b.prototype.get=function(e){var t=this._cache[e];if(e$2e(t))return t},_0x4bc96b.prototype.contains=function(e){return e$2e(this._cache[e])};var _0x47f9d4=(_0x310d6c=!0,function(e,t){var i=_0x310d6c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x310d6c=!1,i}),_0x150733=_0x47f9d4(void 0,(function(){return _0x150733.toString().search("(((.+)+)+)+$").toString().constructor(_0x150733).search("(((.+)+)+)+$")})),_0x310d6c;_0x150733();var _0x1481c1={SCENE:"Scene",LIGHT:"Light",MESH:"Mesh",MATERIAL:"Material",LAYER:"Layer",SHADOW:"Shadow"},UBONames=Object.freeze(_0x1481c1);function u$i(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).missingImageUrl))throw new t$15("options.missingImageUrl is required.");if(!e$2e(e.pixelsToCheck))throw new t$15("options.pixelsToCheck is required.");this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;var t=t$10.createIfNeeded(e.missingImageUrl),i=this;t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then((function(t){e$2e(t.blob)&&(i._missingImageByteLength=t.blob.size);var n=d$14(t);if(e.disableCheckIfAllPixelsAreTransparent){for(var r=!0,o=t.width,a=e.pixelsToCheck,s=0,l=a.length;r&&s<l;++s){var u=a[s];n[4*u.x+u.y*o+3]>0&&(r=!1)}r&&(n=void 0)}i._missingImagePixels=n,i._isReady=!0})).otherwise((function(){i._missingImagePixels=void 0,i._isReady=!0}))}function o$r(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}function e$i(){this.defaultAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,t$15.throwInstantiationError()}u$i.prototype.isReady=function(){return this._isReady},u$i.prototype.shouldDiscardImage=function(e){if(!this._isReady)throw new t$15("shouldDiscardImage must not be called before the discard policy is ready.");var t=this._pixelsToCheck,i=this._missingImagePixels;if(!e$2e(i)||e$2e(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;for(var n=d$14(e),r=e.width,o=0,a=t.length;o<a;++o)for(var s=t[o],l=4*s.x+s.y*r,u=0;u<4;++u){var c=l+u;if(n[c]!==i[c])return!1}return!0},o$r.prototype.configureNameFromProperties=function(e){var t,i=10;for(var n in e)if(e.hasOwnProperty(n)&&e[n]){var r=n.toLowerCase();i>1&&"name"===r?(i=1,t=n):i>2&&"title"===r?(i=2,t=n):i>3&&/name/i.test(n)?(i=3,t=n):i>4&&/title/i.test(n)&&(i=4,t=n)}e$2e(t)&&(this.name=e[t])},o$r.prototype.configureDescriptionFromProperties=function(e){this.description=function e(t){var i='<table class="supermap3d-infoBox-defaultTable">';for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];e$2e(r)&&(i+="object"==typeof r?"<tr><td>"+n+"</td><td>"+e(r)+"</td></tr>":"<tr><td>"+n+"</td><td>"+r+"</td></tr>")}return i+="</table>"}(e)},Object.defineProperties(e$i.prototype,{ready:{get:t$15.throwInstantiationError},readyPromise:{get:t$15.throwInstantiationError},rectangle:{get:t$15.throwInstantiationError},tileWidth:{get:t$15.throwInstantiationError},tileHeight:{get:t$15.throwInstantiationError},maximumLevel:{get:t$15.throwInstantiationError},minimumLevel:{get:t$15.throwInstantiationError},tilingScheme:{get:t$15.throwInstantiationError},tileDiscardPolicy:{get:t$15.throwInstantiationError},errorEvent:{get:t$15.throwInstantiationError},credit:{get:t$15.throwInstantiationError},proxy:{get:t$15.throwInstantiationError},hasAlphaChannel:{get:t$15.throwInstantiationError}}),e$i.prototype.getTileCredits=t$15.throwInstantiationError,e$i.prototype.requestImage=t$15.throwInstantiationError,e$i.prototype.pickFeatures=t$15.throwInstantiationError,e$i.prototype.onAlphaChanged=function(){};var m$k=/\.ktx$/i,p$g=/\.crn$/i,c$e=/\.dxtz$/i;function b$q(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url))throw new t$15("options.url is required.");this._baseUrl=e.url;var t=t$10.createIfNeeded(e.url);t.appendForwardSlash(),e$2e(e.token)&&t.setQueryParameters({token:e.token}),this._resource=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=u$Z(e.tilingScheme,new g$15({ellipsoid:e.ellipsoid})),this._useTiles=u$Z(e.usePreCachedTilesIfAvailable,!0),this._rectangle=u$Z(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers;var i=e.credit;"string"==typeof i&&(i=new r$U(i)),this._credit=i,this.enablePickFeatures=u$Z(e.enablePickFeatures,!0),this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var n,r=this,o=e.url;function a(t){var i=t.tileInfo;if(e$2e(i)){if(r._tileWidth=i.rows,r._tileHeight=i.cols,102100===i.spatialReference.wkid||102113===i.spatialReference.wkid)r._tilingScheme=new c$S({ellipsoid:e.ellipsoid});else{if(4326!==t.tileInfo.spatialReference.wkid){var o="Tile spatial reference WKID "+t.tileInfo.spatialReference.wkid+" is not supported.";return void(n=l$V.handleError(n,r,r._errorEvent,o,void 0,void 0,void 0,l))}r._tilingScheme=new g$15({ellipsoid:e.ellipsoid})}if(r._maximumLevel=t.tileInfo.lods.length-1,e$2e(t.fullExtent)){if(e$2e(t.fullExtent.spatialReference)&&e$2e(t.fullExtent.spatialReference.wkid))if(102100===t.fullExtent.spatialReference.wkid||102113===t.fullExtent.spatialReference.wkid){var a=new t$N,s=t.fullExtent,u=a.unproject(new o$1p(Math.max(s.xmin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(s.ymin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),c=a.unproject(new o$1p(Math.min(s.xmax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(s.ymax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));r._rectangle=new h$18(u.longitude,u.latitude,c.longitude,c.latitude)}else{if(4326!==t.fullExtent.spatialReference.wkid){var h="fullExtent.spatialReference WKID "+t.fullExtent.spatialReference.wkid+" is not supported.";return void(n=l$V.handleError(n,r,r._errorEvent,h,void 0,void 0,void 0,l))}r._rectangle=h$18.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax)}}else r._rectangle=r._tilingScheme.rectangle;e$2e(r._tileDiscardPolicy)||(r._tileDiscardPolicy=new u$i({missingImageUrl:A$q(r,0,0,r._maximumLevel).url,pixelsToCheck:[new o$1o(0,0),new o$1o(200,20),new o$1o(20,200),new o$1o(80,110),new o$1o(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),r._useTiles=!0}else r._useTiles=!1;e$2e(t.copyrightText)&&t.copyrightText.length>0&&(r._credit=new r$U(t.copyrightText)),r._ready=!0,r._readyPromise.resolve(!0),l$V.handleSuccess(n)}function s(e){var t="An error occurred while accessing "+r._resource.url+".";n=l$V.handleError(n,r,r._errorEvent,t,void 0,void 0,void 0,l),r._readyPromise.reject(new t$13(t))}function l(){o$1l(r._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJsonp(),a,s)}r.tablename=e.url,new l$14({name:o}).then((function(e){e.checkObjectStoreExit(r.tablename)?r._indexedDBScheduler=e:e.createObjectStore(r.tablename).then((function(){r._indexedDBScheduler=e}))})),r._indexedDBSetting={isOpen:!1,clear:function(){r._indexedDBScheduler.clear(r.tablename)},cache:[]},this._useTiles?l():(this._ready=!0,this._readyPromise.resolve(!0))}function A$q(e,t,i,n,r){var o;if(e._useTiles)o=e._resource.getDerivedResource({url:"tile/"+n+"/"+i+"/"+t,request:r});else{var a=e._tilingScheme.tileXYToNativeRectangle(t,i,n),s={bbox:a.west+","+a.south+","+a.east+","+a.north,size:e._tileWidth+","+e._tileHeight,format:"png",transparent:!0,f:"image"};e._tilingScheme.projection instanceof n$1d?(s.bboxSR=4326,s.imageSR=4326):(s.bboxSR=3857,s.imageSR=3857),e.layers&&(s.layers="show:"+e.layers),o=e._resource.getDerivedResource({url:"export",request:r,queryParameters:s})}return o}function Y$a(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function a$h(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=void 0,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new o$1o,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}function v$j(e){var t=e._framebuffers;if(e$2e(t)){for(var i=t.length,n=0;n<i;++n)t[n].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}}function D$h(e,t){v$j(e);for(var i=e._width,n=e._height,r=V$12.RGBA,o=t.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT,a=new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),s=Math.ceil(Math.log(Math.max(i,n))/Math.log(3)),l=new Array(s),u=0;u<s;++u)i=Math.max(Math.ceil(i/3),1),n=Math.max(Math.ceil(n/3),1),l[u]=new t$V({context:t,colorTextures:[new t$U({context:t,width:i,height:n,pixelFormat:r,pixelDatatype:o,sampler:a})]});var c=l[s-1].getColorTexture(0);e._previousLuminance=new t$V({context:t,colorTextures:[new t$U({context:t,width:c.width,height:c.height,pixelFormat:r,pixelDatatype:o,sampler:a})]}),e._framebuffers=l}function x$n(e){var t=e._commands;if(e$2e(t)){for(var i=t.length,n=0;n<i;++n)t[n].shaderProgram.destroy();e._commands=void 0}}function F$g(e,t){var i;if(0===t)i={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{var n=e._framebuffers[t-1].getColorTexture(0);i={colorTexture:function(){return n},colorTextureDimensions:function(){return n.dimensions}}}return i.minMaxLuminance=function(){return e._minMaxLuminance},i.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},i}function S$h(e,t){var i="uniform sampler2D colorTexture; \nvarying vec2 v_textureCoordinates; \nfloat sampleTexture(vec2 offset) { \n";return i+=0===e?" vec4 color = texture2D(colorTexture, v_textureCoordinates + offset); \n return czm_luminance(color.rgb); \n":" return texture2D(colorTexture, v_textureCoordinates + offset).r; \n",i+="}\n\n",i+="uniform vec2 colorTextureDimensions; \nuniform vec2 minMaxLuminance; \nuniform sampler2D previousLuminance; \nvoid main() { \n float color = 0.0; \n float xStep = 1.0 / colorTextureDimensions.x; \n float yStep = 1.0 / colorTextureDimensions.y; \n int count = 0; \n for (int i = 0; i < 3; ++i) { \n for (int j = 0; j < 3; ++j) { \n vec2 offset; \n offset.x = -xStep + float(i) * xStep; \n offset.y = -yStep + float(j) * yStep; \n if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) { \n continue; \n } \n color += sampleTexture(offset); \n ++count; \n } \n } \n if (count > 0) { \n color /= float(count); \n } \n",e===t-1&&(i+=" float previous = texture2D(previousLuminance, vec2(0.5)).r; \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n color = previous + (color - previous) / (60.0 * 1.5); \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n"),i+=" gl_FragColor = vec4(color); \n} \n"}function A$p(e,t){x$n(e);for(var i=e._framebuffers,n=i.length,r=new Array(n),o=0;o<n;++o)r[o]=t.createViewportQuadCommand(S$h(o,n),{framebuffer:i[o],uniformMap:F$g(e,o)});e._commands=r}e$i.loadImage=function(e,t,i){o$1q.defined("url",t);var n=t$10.createIfNeeded(t);return e$2e(i)?n.fetchArrayBuffer():m$k.test(n.url)?k$W(n):p$g.test(n.url)?a$P(n):c$e.test(n.url)?(e.flipY=!0,B$M(n)):e$2e(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(e$2e(e._customRequestHeaders)&&(n.headers=p$19(n.headers,e._customRequestHeaders)),n.fetchBlob())},Object.defineProperties(b$q.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),b$q.prototype.getTileCredits=function(e,t,i){},b$q.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=A$q(this,e,t,i,n);if(e$2e(a$O.CREDENTIAL)&&(e$2e(a$O.CREDENTIAL._keymap[this._baseUrl])?r.url=a$O.addTokenWithKey(this._baseUrl,r.url):r.url=a$O.addToken(r.url)),n.quadKey=Y$a(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(e$2e(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2e(o)?o$1l(o,(function(e){return e$2e(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$i.loadImage(this,r)}return e$i.loadImage(this,r)}return e$i.loadImage(this,r)},b$q.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$15("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures){var o,a,s,l=this._tilingScheme.tileXYToNativeRectangle(e,t,i);if(this._tilingScheme.projection instanceof n$1d)o=e$2d.toDegrees(n),a=e$2d.toDegrees(r),s="4326";else{var u=this._tilingScheme.projection.project(new a$18(n,r,0));o=u.x,a=u.y,s="3857"}var c="visible";e$2e(this._layers)&&(c+=":"+this._layers);var h={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:o+","+a,mapExtent:l.west+","+l.south+","+l.east+","+l.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:s,layers:c};return this._resource.getDerivedResource({url:"identify",queryParameters:h}).fetchJson().then((function(e){var t=[],i=e.results;if(!e$2e(i))return t;for(var n=0;n<i.length;++n){var r=i[n],o=new o$r;if(o.data=r,o.name=r.value,o.properties=r.attributes,o.configureDescriptionFromProperties(r.attributes),"esriGeometryPoint"===r.geometryType&&r.geometry){var a=r.geometry.spatialReference&&r.geometry.spatialReference.wkid?r.geometry.spatialReference.wkid:4326;if(4326===a||4283===a)o.position=a$18.fromDegrees(r.geometry.x,r.geometry.y,r.geometry.z);else if(102100===a||900913===a||3857===a){var s=new t$N;o.position=s.unproject(new o$1p(r.geometry.x,r.geometry.y,r.geometry.z))}}t.push(o)}return t}))}},Object.defineProperties(a$h.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){var e=this._framebuffers;if(e$2e(e))return e[e.length-1].getColorTexture(0)}}}),a$h.prototype.clear=function(e){var t=this._framebuffers;if(e$2e(t)){var i=this._clearCommand;e$2e(i)||(i=this._clearCommand=new t$W({color:new e$1X(0,0,0,0),framebuffer:void 0}));for(var n=t.length,r=0;r<n;++r)i.framebuffer=t[r],i.execute(e)}},a$h.prototype.update=function(e){var t=e.drawingBufferWidth,i=e.drawingBufferHeight;(t!==this._width||i!==this._height)&&(this._width=t,this._height=i,D$h(this,e),A$p(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;var n=this._framebuffers,r=n[n.length-1];n[n.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance,this._previousLuminance=r},a$h.prototype.execute=function(e,t){this._colorTexture=t;var i=this._commands;if(e$2e(i))for(var n=i.length,r=0;r<n;++r)i[r].execute(e)},a$h.prototype.isDestroyed=function(){return!1},a$h.prototype.destroy=function(){return v$j(this),x$n(this),i$11(this)};var A$o={AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"},I$l=Object.freeze(A$o),e$h;function A$n(e){}function o$q(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url))throw new t$15("options.url is required.");this._key=e$12.getKey(e.key),this._resource=t$10.createIfNeeded(e.url),this._resource.appendForwardSlash(),this._tileProtocol=e.tileProtocol,this._mapStyle=u$Z(e.mapStyle,I$l.AERIAL),this._culture=u$Z(e.culture,""),this._tileDiscardPolicy=e.tileDiscardPolicy,e$2e(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new A$n),this._proxy=e.proxy,this._credit=new r$U('<a href="http://www.bing.com"><img src="'+o$q.logoUrl+'" title="Bing Imagery"/></a>'),this.defaultGamma=1,this._tilingScheme=new c$S({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=u$Z(e.maximumLevel,void 0),this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var t=this._tileProtocol;e$2e(t)?t.length>0&&":"===t[t.length-1]&&(t=t.substr(0,t.length-1)):t="http:"===document.location.protocol?"http":"https";var i,n=this._resource.getDerivedResource({url:"REST/v1/Imagery/Metadata/"+this._mapStyle,queryParameters:{incl:"ImageryProviders",key:this._key,uriScheme:t}}),r=this;function o(e){if(1===e.resourceSets.length){var t=e.resourceSets[0].resources[0];r._tileWidth=t.imageWidth,r._tileHeight=t.imageHeight,r._maximumLevel=e$2e(r._maximumLevel)?r._maximumLevel:t.zoomMax-1,r._imageUrlSubdomains=t.imageUrlSubdomains,r._imageUrlTemplate=t.imageUrl;var n=r._attributionList=t.imageryProviders;n||(n=r._attributionList=[]);for(var o=0,s=n.length;o<s;++o){var l=n[o];if(l.credit instanceof r$U)break;l.credit=new r$U(l.attribution);for(var u=l.coverageAreas,c=0,h=l.coverageAreas.length;c<h;++c){var d=u[c],f=d.bbox;d.bbox=new h$18(e$2d.toRadians(f[1]),e$2d.toRadians(f[0]),e$2d.toRadians(f[3]),e$2d.toRadians(f[2]))}}r._ready=!0,r._readyPromise.resolve(!0),l$V.handleSuccess(i)}else a()}function a(e){var t="An error occurred while accessing "+n.url+".";i=l$V.handleError(i,r,r._errorEvent,t,void 0,void 0,void 0,l),r._readyPromise.reject(new t$13(t))}var s=n.url;function l(){var e=n.fetchJsonp("jsonp");o$q._metadataCache[s]=e,e.then(o).otherwise(a)}var u=o$q._metadataCache[s];e$2e(u)?u.then(o).otherwise(a):l()}A$n.prototype.isReady=function(){return!0},A$n.prototype.shouldDiscardImage=function(e){return A$n.EMPTY_IMAGE===e},Object.defineProperties(A$n,{EMPTY_IMAGE:{get:function(){return e$2e(e$h)||((e$h=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),e$h}}}),Object.defineProperties(o$q.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});var z$j=new h$18;function B$d(e,t,i,n,r){var o=e._imageUrlTemplate,a=e._imageUrlSubdomains,s=(t+i+n)%a.length;return e._resource.getDerivedResource({url:o,request:r,templateValues:{quadkey:o$q.tileXYToQuadKey(t,i,n),subdomain:a[s],culture:e._culture},queryParameters:{n:"z"}})}o$q.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$15("getTileCredits must not be called before the imagery provider is ready.");var n=this._tilingScheme.tileXYToRectangle(e,t,i,z$j);return O$g(this._attributionList,i,n)},o$q.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=e$i.loadImage(this,B$d(this,e,t,i,n));if(e$2e(r))return r.otherwise((function(e){return e$2e(e.blob)&&0===e.blob.size?A$n.EMPTY_IMAGE:o$1l.reject(e)}))},o$q.prototype.pickFeatures=function(e,t,i,n,r){},o$q.tileXYToQuadKey=function(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;0!=(e&o)&&(a|=1),0!=(t&o)&&(a|=2),n+=a}return n},o$q.quadKeyToTileXY=function(e){for(var t=0,i=0,n=e.length-1,r=n;r>=0;--r){var o=1<<r,a=+e[n-r];0!=(1&a)&&(t|=o),0!=(2&a)&&(i|=o)}return{x:t,y:i,level:n}},o$q._logoUrl=void 0,Object.defineProperties(o$q,{logoUrl:{get:function(){return e$2e(o$q._logoUrl)||(o$q._logoUrl=n$17("Assets/Images/bing_maps_credit.png")),o$q._logoUrl},set:function(e){o$1q.defined("value",e),o$q._logoUrl=e}}});var K$c=new h$18;function O$g(e,t,i){++t;for(var n=[],r=0,o=e.length;r<o;++r){for(var a=e[r],s=a.coverageAreas,l=!1,u=0,c=a.coverageAreas.length;!l&&u<c;++u){var h=s[u];if(t>=h.zoomMin&&t<=h.zoomMax)e$2e(h$18.intersection(i,h.bbox,K$c))&&(l=!0)}l&&n.push(a.credit)}return n}o$q._metadataCache={};var $$e="uniform sampler2D u_MainTex;\nuniform vec2 u_MainTex_TexelSize;\nuniform float u_Threshold;\nuniform float u_Params;\nvarying vec2 v_textureCoordinates;\nconst vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);\n// Better, temporally stable box filtering\n// [Jimenez14] http://goo.gl/eomGso\n// . . . . . . .\n// . A . B . C .\n// . . D . E . .\n// . F . G . H .\n// . . I . J . .\n// . K . L . M .\n// . . . . . . .\n#define inline\nvec4 DownsampleBox13Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\n vec4 A = texture2D(samplerTex, uv + texelSize * vec2(-1.0, -1.0));\n vec4 B = texture2D(samplerTex, uv + texelSize * vec2( 0.0, -1.0));\n vec4 C = texture2D(samplerTex, uv + texelSize * vec2( 1.0, -1.0));\n vec4 D = texture2D(samplerTex, uv + texelSize * vec2(-0.5, -0.5));\n vec4 E = texture2D(samplerTex, uv + texelSize * vec2( 0.5, -0.5));\n vec4 F = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 0.0));\n vec4 G = texture2D(samplerTex, uv );\n vec4 H = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 0.0));\n vec4 I = texture2D(samplerTex, uv + texelSize * vec2(-0.5, 0.5));\n vec4 J = texture2D(samplerTex, uv + texelSize * vec2( 0.5, 0.5));\n vec4 K = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 1.0));\n vec4 L = texture2D(samplerTex, uv + texelSize * vec2( 0.0, 1.0));\n vec4 M = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 1.0));\n vec2 div = (1.0 / 4.0) * vec2(0.5, 0.125);\n vec4 o = (D + E + I + J) * div.x;\n o += (A + B + G + F) * div.y;\n o += (B + C + H + G) * div.y;\n o += (F + G + L + K) * div.y;\n o += (G + H + M + L) * div.y;\n return o;\n}\n\n// Quadratic color thresholding\n// curve = (threshold - knee, knee * 2, 0.25 / knee)\nvec4 QuadraticThreshold(vec4 color, float threshold, vec3 curve)\n{\n // Pixel brightness\n float br = max(max(color.r, color.g), color.b);\n // Under-threshold part: quadratic curve\n float rq = clamp(br - curve.x, 0.0, curve.y);\n rq = curve.z * rq * rq;\n // Combine and apply the brightness response curve.\n color *= max(rq, br - threshold) / max(br, 1.0e-4);\n return color;\n}\n\nvec4 Prefilter(vec4 color, vec2 uv)\n{\n float br = max(max(color.r, color.g), color.b);\n if(br < u_Threshold)\n {\n color = vec4(0.0);\n }\n return color;\n}\n\nvec4 SafeHDR(vec4 c)\n{\n return min(c, 65504.0);\n}\n\nvoid main()\n{\n vec4 color = DownsampleBox13Tap(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy);\n gl_FragColor = Prefilter(SafeHDR(color), v_textureCoordinates);\n}\n",tt$5="uniform sampler2D u_MainTex;\nuniform vec2 u_MainTex_TexelSize;\nvarying vec2 v_textureCoordinates;\n#define inline\nvec4 DownsampleBox13Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\n vec4 A = texture2D(samplerTex, uv + texelSize * vec2(-1.0, -1.0));\n vec4 B = texture2D(samplerTex, uv + texelSize * vec2( 0.0, -1.0));\n vec4 C = texture2D(samplerTex, uv + texelSize * vec2( 1.0, -1.0));\n vec4 D = texture2D(samplerTex, uv + texelSize * vec2(-0.5, -0.5));\n vec4 E = texture2D(samplerTex, uv + texelSize * vec2( 0.5, -0.5));\n vec4 F = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 0.0));\n vec4 G = texture2D(samplerTex, uv );\n vec4 H = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 0.0));\n vec4 I = texture2D(samplerTex, uv + texelSize * vec2(-0.5, 0.5));\n vec4 J = texture2D(samplerTex, uv + texelSize * vec2( 0.5, 0.5));\n vec4 K = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 1.0));\n vec4 L = texture2D(samplerTex, uv + texelSize * vec2( 0.0, 1.0));\n vec4 M = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 1.0));\n vec2 div = (1.0 / 4.0) * vec2(0.5, 0.125);\n vec4 o = (D + E + I + J) * div.x;\n o += (A + B + G + F) * div.y;\n o += (B + C + H + G) * div.y;\n o += (F + G + L + K) * div.y;\n o += (G + H + M + L) * div.y;\n return o;\n}\n// Standard box filtering\n#define inline\nvec4 DownsampleBox4Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\n vec4 d = texelSize.xyxy * vec4(-1.0, -1.0, 1.0, 1.0);\n vec4 s;\n s = texture2D(samplerTex, uv + d.xy);\n s += texture2D(samplerTex, uv + d.zy);\n s += texture2D(samplerTex, uv + d.xw);\n s += texture2D(samplerTex, uv + d.zw);\n return s * (1.0 / 4.0);\n}\nvoid main()\n{\n vec4 color = DownsampleBox13Tap(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy);\n gl_FragColor = color;\n}\n",et$6="uniform sampler2D u_MainTex;\nuniform sampler2D u_BloomTex;\nuniform vec2 u_MainTex_TexelSize;\nuniform float u_SampleScale;\nvarying vec2 v_textureCoordinates;\n\nvec4 Combine(vec4 bloom, vec2 uv)\n{\n vec4 color = texture2D(u_BloomTex, uv);\n return bloom + color;\n}\n\n// 9-tap bilinear upsampler (tent filter)\n#define inline\nvec4 UpsampleTent(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\n vec4 d = texelSize.xyxy * vec4(1.0, 1.0, -1.0, 0.0) * sampleScale;\n vec4 s;\n s = texture2D(samplerTex, uv - d.xy);\n s += texture2D(samplerTex, uv - d.wy) * 2.0;\n s += texture2D(samplerTex, uv - d.zy);\n s += texture2D(samplerTex, uv + d.zw) * 2.0;\n s += texture2D(samplerTex, uv ) * 4.0;\n s += texture2D(samplerTex, uv + d.xw) * 2.0;\n s += texture2D(samplerTex, uv + d.zy);\n s += texture2D(samplerTex, uv + d.wy) * 2.0;\n s += texture2D(samplerTex, uv + d.xy);\n return s * (1.0 / 16.0);\n}\n\n// Standard box filtering\nvec4 UpsampleBox(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\n vec4 d = texelSize.xyxy * vec4(-1.0, -1.0, 1.0, 1.0) * (sampleScale * 0.5);\n vec4 s;\n s = texture2D(samplerTex, uv + d.xy);\n s += texture2D(samplerTex, uv + d.zy);\n s += texture2D(samplerTex, uv + d.xw);\n s += texture2D(samplerTex, uv + d.zw);\n return s * (1.0 / 4.0);\n}\n\nvoid main()\n{\n vec4 bloom = UpsampleTent(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy, vec4(u_SampleScale));\n gl_FragColor = Combine(bloom, v_textureCoordinates);\n}",E$j=16;function e$g(){this._fbo=void 0,this._downSamplePassState=new n$$,this._upSamplePassState=new n$$,this._show=!1,this._context=void 0,this.anamorphicRatio=0,this.diffusion=7,this._iterations=0,this._sampleScale=1,this._dirtTileOffset=new e$2c(1,1,0,0),this._shaderSettings=new o$1p,this._bloomColor=new o$1p(1,1,1),this._threshold=0,this._softKnee=.5,this._clamp=65472,this._params=1,this._intensity=1.34,this._dirtIntensity=0,this._dirtTexUrl=n$17("Assets/Textures/NoiseAndGrain.png"),this._dirtTexture=void 0,this._lastUpFBO=void 0,this._Pyramid=[];for(var e=0;e<E$j;e++){this._Pyramid.push({})}this._clearCommand=new t$W({color:new e$1X})}Object.defineProperties(e$g.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(e$2e(this._owner)&&this._owner.bloomShowChange(e),this._show=e)}},bloomIntensity:{get:function(){return this._intensity},set:function(e){this._intensity=e}},bloomDirtTexIntensity:{get:function(){return this._dirtIntensity},set:function(e){this._dirtIntensity=e}},threshold:{get:function(){return this._threshold},set:function(e){this._threshold=e}}}),e$g.prototype.clear=function(e,t){for(var i=0;i<this._iterations;i++){var n=this._clearCommand;n.framebuffer=this._Pyramid[i].downSampleFBO,e$1X.clone(u$Z(t,e$1X.BLACK),n.color),n.execute(e),n.framebuffer=this._Pyramid[i].upSampleFBO,e$1X.clone(u$Z(t,e$1X.BLACK),n.color),n.execute(e)}};var h$k=new o$1o;e$g.prototype.execute=function(e,t){var i=this,n=this._fbo;e$2e(this._context)&&this._context.numPostEffectFilterObject>0&&(n=this._scene._postEffectFilterFramebuffer.renderTexture._fb);for(var r=0;r<this._iterations;r++){var o=this._Pyramid[r].downCommand;h$k.x=1/n.getColorTexture(0).width,h$k.y=1/n.getColorTexture(0).height,o.uniformMap.u_MainTex=function(){return n.getColorTexture(0)},o.uniformMap.u_MainTex_TexelSize=function(){return h$k},o.uniformMap.u_Threshold=function(){return i._threshold},o.uniformMap.u_Params=function(){return i._params},o.execute(e,this._downSamplePassState),n=this._Pyramid[r].downSampleFBO}var a=this._Pyramid[this._iterations-1].downSampleFBO;for(r=this._iterations-2;r>=0;r--){var s=this._Pyramid[r].downSampleFBO,l=this._Pyramid[r].upSampleFBO,u=this._Pyramid[r].upCommand;h$k.x=1/a.getColorTexture(0).width,h$k.y=1/a.getColorTexture(0).height,u.uniformMap.u_BloomTex=function(){return s.getColorTexture(0)},u.uniformMap.u_MainTex=function(){return a.getColorTexture(0)},u.uniformMap.u_MainTex_TexelSize=function(){return h$k},u.uniformMap.u_SampleScale=function(){return i._sampleScale},u.execute(e,this._downSamplePassState),a=l}this._lastUpFBO=a};var rt$7=new f$1a;e$g.prototype.update=function(e,t,i){this._context=t.context,this._downSamplePassState.context=t.context,this._upSamplePassState.context=t.context,this._scene=i;var n=e.drawingBufferWidth,r=e.drawingBufferHeight,o=this;e$2e(this._dirtTexture)||o$1l(t$S(o._dirtTexUrl),(function(t){o._dirtTexture=new t$U({context:e,source:t,pixelFormat:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE})}));var a=e$2d.clamp(this.anamorphicRatio,-1,1),s=a<0?-a:0,l=a>0?a:0,u=Math.floor(n/(2-s)),c=Math.floor(r/(2-l)),h=Math.max(u,c),d=Math.log(h)/Math.log(2)+Math.min(this.diffusion,10)-10,f=Math.floor(d),p=e$2d.clamp(f,1,E$j),_=!1;p!=this._iterations&&(this._iterations=p,_=!0),this._sampleScale=.5+d-f;var m=1;e$2e(this._dirtTexture)&&(m=this._dirtTexture.width/this._dirtTexture.height);var g=e.drawingBufferWidth/e.drawingBufferHeight;m>g?(this._dirtTileOffset.x=g/m,this._dirtTileOffset.z=.5*(1-this._dirtTileOffset.x)):g>m&&(this._dirtTileOffset.y=m/g,this._dirtTileOffset.w=.5*(1-this._dirtTileOffset.y));var x=Math.exp(this._intensity/10*.6931471805599453)-1;this._shaderSettings.x=this._sampleScale,this._shaderSettings.y=x,this._shaderSettings.z=this._dirtIntensity;var y=this._Pyramid[0].downSampleFBO,v=e$2e(y)&&y.getColorTexture(0)||void 0;if(!e$2e(v)||v.width!==u||v.height!==c||_){this.destroyFBO();for(var $=0;$<this._iterations;$++){var b,T={};b=0==$?e.createViewportQuadCommand($$e,{shaderProgramName:"BloomPrefilter",uniformMap:T,owner:this}):e.createViewportQuadCommand(tt$5,{shaderProgramName:"BloomDownsample",uniformMap:T,owner:this});var C=e.createViewportQuadCommand(et$6,{shaderProgramName:"BloomUpsample",uniformMap:T,owner:this});this._Pyramid[$].downCommand=b,this._Pyramid[$].upCommand=C;var S=rt$7;S.width=u,S.height=c;var w=d$1m.fromCache({viewport:S});b.renderState=w,C.renderState=w;var E=e.colorBufferHalfFloat?_$_.HALF_FLOAT:_$_.FLOAT,P=new t$V({context:e,colorTextures:[new t$U({context:e,width:u,height:c,pixelDatatype:E})]}),A=new t$V({context:e,colorTextures:[new t$U({context:e,width:u,height:c,pixelDatatype:E})]});this._Pyramid[$].downSampleFBO=P,this._Pyramid[$].upSampleFBO=A,b.framebuffer=P,C.framebuffer=A,u/=2,u=Math.max(u,1),c=Math.max(c/2,1)}}},e$g.prototype.gammaToLinearSpace=function(e){return e*(e*(.305306011*e+.682171111)+.012522878)},e$g.prototype.setInputFBO=function(e){this._fbo=e},e$g.prototype.getBloomTexture=function(){return this._lastUpFBO.getColorTexture(0)},e$g.prototype.getBloomDirtTexture=function(){return e$2e(this._dirtTexture)?this._dirtTexture:this._context.defaultTexture},e$g.prototype.getBloomTextureTexelSize=function(){return h$k.x=1/this._lastUpFBO.getColorTexture(0).width,h$k.y=1/this._lastUpFBO.getColorTexture(0).height,h$k},e$g.prototype.getDirtTileOffset=function(){return this._dirtTileOffset},e$g.prototype.getBloomSettings=function(){return this._shaderSettings},e$g.prototype.getBloomColor=function(){return this._bloomColor},e$g.prototype.isDestroyed=function(){return!1},e$g.prototype.destroyFBO=function(){for(var e=0;e<this._iterations;e++)if(e$2e(this._Pyramid[e].downSampleFBO)){var t=this._Pyramid[e].downSampleFBO,i=this._Pyramid[e].upSampleFBO;t.destroy(),i.destroy()}},e$g.prototype.destroy=function(){this.destroyFBO();for(var e=0;e<this._iterations;e++){var t=this._Pyramid[e].downCommand,i=this._Pyramid[e].upCommand;t.shaderProgram.destroy(),i.shaderProgram.destroy()}return i$11(this)};var w$j="varying vec2 v_textureCoordinates;\nconst float M_PI = 3.141592653589793;\n\nfloat vdcRadicalInverse(int i)\n{\n float r;\n float base = 2.0;\n float value = 0.0;\n float invBase = 1.0 / base;\n float invBi = invBase;\n for (int x = 0; x < 100; x++)\n {\n if (i <= 0)\n {\n break;\n }\n r = mod(float(i), base);\n value += r * invBi;\n invBi *= invBase;\n i = int(float(i) * invBase);\n }\n return value;\n}\n\nvec2 hammersley2D(int i, int N)\n{\n return vec2(float(i) / float(N), vdcRadicalInverse(i));\n}\n\nvec3 importanceSampleGGX(vec2 xi, float roughness, vec3 N)\n{\n float a = roughness * roughness;\n float phi = 2.0 * M_PI * xi.x;\n float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\n float sinTheta = sqrt(1.0 - cosTheta * cosTheta);\n vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\n vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\n vec3 tangentX = normalize(cross(upVector, N));\n vec3 tangentY = cross(N, tangentX);\n return tangentX * H.x + tangentY * H.y + N * H.z;\n}\n\nfloat G1_Smith(float NdotV, float k)\n{\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\nfloat G_Smith(float roughness, float NdotV, float NdotL)\n{\n float k = roughness * roughness / 2.0;\n return G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\n\nvec2 integrateBrdf(float roughness, float NdotV)\n{\n vec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\n float A = 0.0;\n float B = 0.0;\n const int NumSamples = 1024;\n for (int i = 0; i < NumSamples; i++)\n {\n vec2 xi = hammersley2D(i, NumSamples);\n vec3 H = importanceSampleGGX(xi, roughness, vec3(0.0, 0.0, 1.0));\n vec3 L = 2.0 * dot(V, H) * H - V;\n float NdotL = clamp(L.z, 0.0, 1.0);\n float NdotH = clamp(H.z, 0.0, 1.0);\n float VdotH = clamp(dot(V, H), 0.0, 1.0);\n if (NdotL > 0.0)\n {\n float G = G_Smith(roughness, NdotV, NdotL);\n float G_Vis = G * VdotH / (NdotH * NdotV);\n float Fc = pow(1.0 - VdotH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n return vec2(A, B) / float(NumSamples);\n}\n\nvoid main()\n{\n gl_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n",x$m="varying v_textureCoordinates : vec2<f32>;\nconst M_PI = 3.141592653589793;\n\nfn vdcRadicalInverse(inputI : i32) -> f32\n{\n var i = inputI;\n var r : f32;\n var base = 2.0;\n var value = 0.0;\n var invBase = 1.0 / base;\n var invBi = invBase;\n for (var x = 0; x < 100; x++)\n {\n if (i <= 0)\n {\n break;\n }\n r = (f32(i) - (base * floor((f32(i) / base))));\n //r = mod(f32(i), base);\n value += r * invBi;\n invBi *= invBase;\n i = i32(f32(i) * invBase);\n }\n return value;\n}\n\nfn hammersley2D(i : i32, N : i32) -> vec2<f32>\n{\n return vec2(f32(i) / f32(N), vdcRadicalInverse(i));\n}\n\nfn importanceSampleGGX(xi : vec2<f32>, roughness : f32, N : vec3<f32>) -> vec3<f32>\n{\n var a = roughness * roughness;\n var phi = 2.0 * M_PI * xi.x;\n var cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\n var sinTheta = sqrt(1.0 - cosTheta * cosTheta);\n var H = vec3<f32>(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\n var upVector : vec3<f32>;\n if(abs(N.z) < 0.999){\n upVector = vec3<f32>(0.0, 0.0, 1.0);\n }\n else{\n upVector = vec3<f32>(1.0, 0.0, 0.0);\n }\n var tangentX = normalize(cross(upVector, N));\n var tangentY = cross(N, tangentX);\n return tangentX * H.x + tangentY * H.y + N * H.z;\n}\n\nfn G1_Smith(NdotV : f32, k : f32) -> f32\n{\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\nfn G_Smith(roughness : f32, NdotV : f32, NdotL : f32) -> f32\n{\n var k = roughness * roughness / 2.0;\n return G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\n\nfn integrateBrdf(roughness : f32, NdotV : f32) -> vec2<f32>\n{\n var V = vec3<f32>(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\n var A = 0.0;\n var B = 0.0;\n const NumSamples = 1024;\n for (var i = 0; i < NumSamples; i++)\n {\n var xi = hammersley2D(i, NumSamples);\n var H = importanceSampleGGX(xi, roughness, vec3<f32>(0.0, 0.0, 1.0));\n var L = 2.0 * dot(V, H) * H - V;\n var NdotL = clamp(L.z, 0.0, 1.0);\n var NdotH = clamp(H.z, 0.0, 1.0);\n var VdotH = clamp(dot(V, H), 0.0, 1.0);\n if (NdotL > 0.0)\n {\n var G = G_Smith(roughness, NdotV, NdotL);\n var G_Vis = G * VdotH / (NdotH * NdotV);\n var Fc = pow(1.0 - VdotH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n return vec2<f32>(A, B) / f32(NumSamples);\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n gl_FragColor = vec4<f32>(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n";function t$c(){this._framebuffer=void 0,this._colorTexture=void 0,this._drawCommand=void 0}function b$p(e,t){var i=e._framebuffer,n=t.webgpu?x$m:w$j,r=t.createViewportQuadCommand(n,{framebuffer:i,renderState:d$1m.fromCache({viewport:new f$1a(0,0,256,256)}),shaderProgramName:"BrdfLut",useWGSL:t.webgpu});e._drawCommand=r}function y$k(e,t){var i=new t$U({context:t,width:256,height:256,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})});e._colorTexture=i;var n=new t$V({context:t,colorTextures:[i],destroyAttachments:!1});e._framebuffer=n}Object.defineProperties(t$c.prototype,{colorTexture:{get:function(){return this._colorTexture}}}),t$c.prototype.update=function(e){if(!e$2e(this._colorTexture)){var t=e.context;y$k(this,t),b$p(this,t),this._drawCommand.execute(t),this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}},t$c.prototype.isDestroyed=function(){return!1},t$c.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),i$11(this)};var e$f={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4},Q$d=Object.freeze(e$f);function d$p(e,t){var i=e;return e$2e(t)&&(i+="+"+t),i}function S$g(e,t){o$1o.clone(e.distance.startPosition,t.distance.startPosition),o$1o.clone(e.distance.endPosition,t.distance.endPosition),o$1o.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),o$1o.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function A$m(e,t,i){var n=d$p(Q$d.PINCH,t),r=e._update,o=e._isDown,a=e._eventStartPosition,s=e._pressTime,l=e._releaseTime;r[n]=!0,o[n]=!1,a[n]=new o$1o;var u=e._movement[n];e$2e(u)||(u=e._movement[n]={}),u.distance={startPosition:new o$1o,endPosition:new o$1o},u.angleAndHeight={startPosition:new o$1o,endPosition:new o$1o},u.prevAngle=0,e._eventHandler.setInputAction((function(t){e._buttonsDown++,o[n]=!0,s[n]=new Date,o$1o.lerp(t.position1,t.position2,.5,a[n])}),G$J.PINCH_START,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),o[n]=!1,l[n]=new Date}),G$J.PINCH_END,t),e._eventHandler.setInputAction((function(e){if(o[n]){r[n]?(S$g(e,u),r[n]=!1,u.prevAngle=u.angleAndHeight.startPosition.x):(o$1o.clone(e.distance.endPosition,u.distance.endPosition),o$1o.clone(e.angleAndHeight.endPosition,u.angleAndHeight.endPosition));for(var t=u.angleAndHeight.endPosition.x,a=u.prevAngle,s=2*Math.PI;t>=a+Math.PI;)t-=s;for(;t<a-Math.PI;)t+=s;u.angleAndHeight.endPosition.x=-t*i.clientWidth/12,u.angleAndHeight.startPosition.x=-a*i.clientWidth/12}}),G$J.PINCH_MOVE,t)}function M$k(e,t){var i=d$p(Q$d.WHEEL,t),n=e._update;n[i]=!0;var r=e._movement[i];e$2e(r)||(r=e._movement[i]={}),r.startPosition=new o$1o,r.endPosition=new o$1o,e._eventHandler.setInputAction((function(e){var t=15*e$2d.toRadians(e);n[i]?(o$1o.clone(o$1o.ZERO,r.startPosition),r.endPosition.x=0,r.endPosition.y=t,n[i]=!1):r.endPosition.y=r.endPosition.y+t}),G$J.WHEEL,t)}function H$p(e,t,i){var n=d$p(i,t),r=e._isDown,o=e._eventStartPosition,a=e._pressTime,s=e._releaseTime;r[n]=!1,o[n]=new o$1o;var l,u,c=e._lastMovement[n];e$2e(c)||(c=e._lastMovement[n]={startPosition:new o$1o,endPosition:new o$1o,valid:!1}),i===Q$d.LEFT_DRAG?(l=G$J.LEFT_DOWN,u=G$J.LEFT_UP):i===Q$d.RIGHT_DRAG?(l=G$J.RIGHT_DOWN,u=G$J.RIGHT_UP):i===Q$d.MIDDLE_DRAG&&(l=G$J.MIDDLE_DOWN,u=G$J.MIDDLE_UP),e._eventHandler.setInputAction((function(t){e._buttonsDown++,c.valid=!1,r[n]=!0,a[n]=new Date,o$1o.clone(t.position,o[n])}),l,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[n]=!1,s[n]=new Date}),u,t)}function T$k(e,t){o$1o.clone(e.startPosition,t.startPosition),o$1o.clone(e.endPosition,t.endPosition)}function y$j(e,t){var i=e._update,n=e._movement,r=e._lastMovement,o=e._isDown;for(var a in Q$d)if(Q$d.hasOwnProperty(a)){var s=Q$d[a];if(e$2e(s)){var l=d$p(s,t);i[l]=!0,e$2e(e._lastMovement[l])||(e._lastMovement[l]={startPosition:new o$1o,endPosition:new o$1o,valid:!1}),e$2e(e._movement[l])||(e._movement[l]={startPosition:new o$1o,endPosition:new o$1o})}}e._eventHandler.setInputAction((function(a){for(var s in Q$d)if(Q$d.hasOwnProperty(s)){var l=Q$d[s];if(e$2e(l)){var u=d$p(l,t);o[u]&&(i[u]?(T$k(n[u],r[u]),r[u].valid=!0,T$k(a,n[u]),i[u]=!1):o$1o.clone(a.endPosition,n[u].endPosition))}}o$1o.clone(a.endPosition,e._currentMousePosition)}),G$J.MOUSE_MOVE,t)}function L$l(e){switch(e){case"W".charCodeAt(0):return"moveForward";case"S".charCodeAt(0):return"moveBackward";case"D".charCodeAt(0):return"moveRight";case"A".charCodeAt(0):return"moveLeft";default:return}}function G$k(e){document.addEventListener("keydown",(function(t){var i=L$l(t.keyCode);typeof i<"u"&&(e._flags[i]=!0)}),!1)}function W$k(e){document.addEventListener("keyup",(function(t){var i=L$l(t.keyCode);typeof i<"u"&&(e._flags[i]=!1)}),!1)}function l$l(e){if(!e$2e(e))throw new t$15("canvas is required.");for(var t in this._eventHandler=new g$K(e,!0),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new o$1o,M$k(this,void 0),A$m(this,void 0,e),H$p(this,void 0,Q$d.LEFT_DRAG),H$p(this,void 0,Q$d.RIGHT_DRAG),H$p(this,void 0,Q$d.MIDDLE_DRAG),y$j(this,void 0),Aa$1)if(Aa$1.hasOwnProperty(t)){var i=Aa$1[t];e$2e(i)&&(M$k(this,i),A$m(this,i,e),H$p(this,i,Q$d.LEFT_DRAG),H$p(this,i,Q$d.RIGHT_DRAG),H$p(this,i,Q$d.MIDDLE_DRAG),y$j(this,i))}this._flags={looking:!1,moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1},G$k(this),W$k(this)}function r$n(e,t,i,n,r){this.featurePropertiesDirty=!1}function a$g(e){o$1q.typeOf.object("options",e),o$1q.typeOf.number("options.pass",e.pass),this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}function h$j(){}Object.defineProperties(l$l.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){var e=!(this._update[d$p(Q$d.WHEEL)]&&this._update[d$p(Q$d.WHEEL,Aa$1.SHIFT)]&&this._update[d$p(Q$d.WHEEL,Aa$1.CTRL)]&&this._update[d$p(Q$d.WHEEL,Aa$1.ALT)]);return this._buttonsDown>0||e}}}),l$l.prototype.isMoving=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=d$p(e,t);return!this._update[i]},l$l.prototype.getMovement=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=d$p(e,t);return this._movement[i]},l$l.prototype.getLastMovement=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=d$p(e,t),n=this._lastMovement[i];if(n.valid)return n},l$l.prototype.isButtonDown=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=d$p(e,t);return this._isDown[i]},l$l.prototype.getStartMousePosition=function(e,t){if(!e$2e(e))throw new t$15("type is required.");if(e===Q$d.WHEEL)return this._currentMousePosition;var i=d$p(e,t);return this._eventStartPosition[i]},l$l.prototype.getButtonPressTime=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=d$p(e,t);return this._pressTime[i]},l$l.prototype.getButtonReleaseTime=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=d$p(e,t);return this._releaseTime[i]},l$l.prototype.reset=function(){for(var e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)},l$l.prototype.isDestroyed=function(){return!1},l$l.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),i$11(this)},Object.defineProperties(r$n.prototype,{featuresLength:{get:function(){t$15.throwInstantiationError()}},pointsLength:{get:function(){t$15.throwInstantiationError()}},trianglesLength:{get:function(){t$15.throwInstantiationError()}},geometryByteLength:{get:function(){t$15.throwInstantiationError()}},texturesByteLength:{get:function(){t$15.throwInstantiationError()}},batchTableByteLength:{get:function(){t$15.throwInstantiationError()}},innerContents:{get:function(){t$15.throwInstantiationError()}},readyPromise:{get:function(){t$15.throwInstantiationError()}},tileset:{get:function(){t$15.throwInstantiationError()}},tile:{get:function(){t$15.throwInstantiationError()}},url:{get:function(){t$15.throwInstantiationError()}},batchTable:{get:function(){t$15.throwInstantiationError()}}}),r$n.prototype.hasProperty=function(e,t){t$15.throwInstantiationError()},r$n.prototype.getFeature=function(e){t$15.throwInstantiationError()},r$n.prototype.applyDebugSettings=function(e,t){t$15.throwInstantiationError()},r$n.prototype.applyStyle=function(e){t$15.throwInstantiationError()},r$n.prototype.update=function(e,t){t$15.throwInstantiationError()},r$n.prototype.isDestroyed=function(){t$15.throwInstantiationError()},r$n.prototype.destroy=function(){t$15.throwInstantiationError()};var o$p={stack:new r$S,stackMaximumLength:0};function d$o(e){return e._visible&&e._inRequestVolume}function m$j(e){return e.hasEmptyContent||e.hasTilesetContent}function v$i(e){return!m$j(e)&&e.contentUnloaded}function T$j(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:(t.hasEmptyContent,!0))}function g$q(e,t,i,n){for(var r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];s.updateVisibility(n),d$o(s)&&i.push(s)}}function y$i(e,t){(v$i(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function C$j(e,t){e._cache.touch(t)}function x$l(e){++e.statistics.visited}function _$i(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==Ae$w.OUTSIDE&&e._selectedTiles.push(t)}function u$h(e,t){this._conditionsExpression=l$1f(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,g$p(this,t)}function l$k(e,t){this.condition=e,this.expression=t}function g$p(e,t){var i=[],n=e._conditions;if(e$2e(n)){for(var r=n.length,o=0;o<r;++o){var a=n[o],s=String(a[0]),l=String(a[1]);i.push(new l$k(new L$E(s,t),new L$E(l,t)))}e._runtimeConditions=i}}function d$n(e){var t;(this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._pbrMaterialIndex=void 0,this._meta=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,"string"==typeof e||e instanceof t$10)?t=t$10.createIfNeeded(e).fetchJson(e):t=o$1l.resolve(e);var i=this;this._readyPromise=t.then((function(e){return m$i(i,e),i}))}function m$i(e,t){t=u$Z(l$1f(t,!0),e._style),e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin,e.pbrMaterialIndex=t.pbrMaterialIndex;var i={};if(e$2e(t.meta)){var n=t.defines,r=u$Z(t.meta,u$Z.EMPTY_OBJECT);for(var o in r)r.hasOwnProperty(o)&&(i[o]=new L$E(r[o],n))}e._meta=i,e._ready=!0}function n$h(e,t){var i=u$Z(e._style,u$Z.EMPTY_OBJECT).defines;if(e$2e(t))return"boolean"==typeof t||"number"==typeof t?new L$E(String(t)):"string"==typeof t?new L$E(t,i):e$2e(t.conditions)?new u$h(t,i):t}function r$m(e){if(e$2e(e))return e$2e(e.expression)?e.expression:e$2e(e.conditionsExpression)?l$1f(e.conditionsExpression,!0):e}function D$g(e){if(!e$2e((e=u$Z(e,{})).url))throw new t$15("options.url is required.");this._baseUrl=e.url;var t=t$10.createIfNeeded(e.url);if(t.appendForwardSlash(),e$2e(e.token))t.setQueryParameters({token:e.token});else if(e$2e(a$O.CREDENTIAL))if(e$2e(a$O.CREDENTIAL._keymap[this._baseUrl])){var i=a$O.CREDENTIAL._keymap[this._baseUrl].type,n=a$O.CREDENTIAL._keymap[this._baseUrl].value,r='{"tokenName": "value"}'.replace("tokenName",i).replace("value",n),o=JSON.parse(r);t.setQueryParameters(o)}else{(r={})[a$O.CREDENTIAL.name]=a$O.CREDENTIAL.value,t.setQueryParameters(r)}this._resource=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=u$Z(e.tilingScheme,new m$M({ellipsoid:e.ellipsoid})),this._tilingSchemeCustomized=e$2e(e.tilingScheme),this._useTiles=u$Z(e.usePreCachedTilesIfAvailable,!0),this._rectangle=u$Z(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers,this._zoomOffset=e.zoomOffset,this._coordUnit="DEGREE",this._beginLevel=u$Z(e.beginLevel,0);var a=e.credit;"string"==typeof a&&(a=new r$U(a)),this._credit=a,this.enablePickFeatures=u$Z(e.enablePickFeatures,!0),this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var s,l=this,u=e.url;function c(t){l._tilingScheme instanceof m$M&&"esriMeters"===t.units&&(l._coordUnit="METER");var i=t.tileInfo;if(l.wkid=t.spatialReference.wkid,l._tilingSchemeCustomized&&l._tilingScheme instanceof m$M&&e$2e(i)&&(l._tilingScheme=new m$M({tileInfo:{origin:{x:i.origin.x,y:i.origin.y},cols:i.cols,rows:i.rows},resolutions:i.lods.map((function(e){return e.resolution})),dataBounds:{west:t.fullExtent.xmin,south:t.fullExtent.ymin,east:t.fullExtent.xmax,north:t.fullExtent.ymax}})),e$2e(i)){if(l._tileWidth=i.rows,l._tileHeight=i.cols,!l._tilingSchemeCustomized||!e$2e(l.wkid))if(102100===i.spatialReference.wkid||102113===i.spatialReference.wkid)l._tilingScheme=new c$S({ellipsoid:e.ellipsoid});else if(4326===t.tileInfo.spatialReference.wkid)l._tilingScheme=new m$M({ellipsoid:e.ellipsoid});else if(4490===t.tileInfo.spatialReference.wkid){if(e$2e(e.suggest)&&e.suggest){var n=Math.ceil((t.fullExtent.xmax-t.fullExtent.xmin)/(t.tileInfo.lods[0].resolution*t.tileInfo.cols)),r=Math.ceil((t.fullExtent.ymax-t.fullExtent.ymin)/(t.tileInfo.lods[0].resolution*t.tileInfo.rows));l._tilingScheme=new m$M({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo,rectangle:new h$18(e$2d.toRadians(t.fullExtent.xmin),e$2d.toRadians(t.fullExtent.ymin),e$2d.toRadians(t.fullExtent.xmax),e$2d.toRadians(t.fullExtent.ymax)),origin:new o$1o(e$2d.toRadians(t.tileInfo.origin.x),e$2d.toRadians(t.tileInfo.origin.y)),numberOfLevelZeroTilesX:n,numberOfLevelZeroTilesY:r}),l._tilingScheme._suggest=!0}else l._tilingScheme=new m$M({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo});l._tilingScheme._beginLevel=l._beginLevel}else{var o=[];if(e$2e(i.lods))for(var a=0;a<i.lods.length;a++)o.push(i.lods[a].resolution);l._tilingScheme=new m$M({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo,origin:new o$1o(t.tileInfo.origin.x,t.tileInfo.origin.y),dataBounds:new h$18(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax),resolutions:o}),l._rectangle=new h$18(t.fullExtent.xmin/6378137,t.fullExtent.ymin/6378137,t.fullExtent.xmax/6378137,t.fullExtent.ymax/6378137)}if(l._zoomOffset?l._maximumLevel=20:l._maximumLevel=t.tileInfo.lods.length-1,e$2e(l._tilingScheme._resolutions)&&(l._minimumLevel=l._tilingScheme._beginLevel,l._maximumLevel=l._minimumLevel+l._tilingScheme._resolutions.length-1),e$2e(t.fullExtent)){if(e$2e(t.fullExtent.spatialReference)&&e$2e(t.fullExtent.spatialReference.wkid))if(102100===t.fullExtent.spatialReference.wkid||102113===t.fullExtent.spatialReference.wkid){var u=new t$N,c=t.fullExtent,h=u.unproject(new o$1p(Math.max(c.xmin,-l._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(c.ymin,-l._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),f=u.unproject(new o$1p(Math.min(c.xmax,l._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(c.ymax,l._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));l._rectangle=new h$18(h.longitude,h.latitude,f.longitude,f.latitude)}else{if(4326!==t.fullExtent.spatialReference.wkid&&4490!==t.fullExtent.spatialReference.wkid){var p="fullExtent.spatialReference WKID "+t.fullExtent.spatialReference.wkid+" is not supported.";return void(s=l$V.handleError(s,l,l._errorEvent,p,void 0,void 0,void 0,d))}l._rectangle=h$18.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax)}}else l._rectangle=l._tilingScheme.rectangle;e$2e(l._tileDiscardPolicy)||(l._tileDiscardPolicy=new u$i({missingImageUrl:W$j(l,0,0,l._maximumLevel).url,pixelsToCheck:[new o$1o(0,0),new o$1o(200,20),new o$1o(20,200),new o$1o(80,110),new o$1o(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),l._useTiles=!0}else l._useTiles=!1;e$2e(t.copyrightText)&&t.copyrightText.length>0&&(l._credit=new r$U(t.copyrightText)),l._ready=!0,l._readyPromise.resolve(!0),l$V.handleSuccess(s)}function h(e){var t="An error occurred while accessing "+l._resource.url+".";s=l$V.handleError(s,l,l._errorEvent,t,void 0,void 0,void 0,d),l._readyPromise.reject(new t$13(t))}function d(){o$1l(l._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJson(),c,h)}l.tablename=e.url,new l$14({name:u}).then((function(e){e.checkObjectStoreExit(l.tablename)?l._indexedDBScheduler=e:e.createObjectStore(l.tablename).then((function(){l._indexedDBScheduler=e}))})),l._indexedDBSetting={isOpen:!1,clear:function(){l._indexedDBScheduler.clear(l.tablename)},cache:[]},this._useTiles?d():(this._ready=!0,this._readyPromise.resolve(!0))}function W$j(e,t,i,n,r){var o;if(e$2e(e._tilingScheme._resolutions)&&(n-=e._tilingScheme._beginLevel),e._useTiles)e.zoomOffset&&(n-=parseInt(e.zoomOffset)),o=e._resource.getDerivedResource({url:"tile/"+n+"/"+i+"/"+t,request:r});else{var a=e._tilingScheme.tileXYToNativeRectangle(t,i,n);if("METER"===e._coordUnit){var s=e._tilingScheme._projection._semimajorAxis;a.west=s*e$2d.toRadians(a.west),a.south=s*e$2d.toRadians(a.south),a.east=s*e$2d.toRadians(a.east),a.north=s*e$2d.toRadians(a.north)}var l={bbox:a.west+","+a.south+","+a.east+","+a.north,size:e._tileWidth+","+e._tileHeight,format:"png",transparent:!0,f:"image"};e.wkid&&(l.imageSR=l.bboxSR=e.wkid),e.layers&&(l.layers="show:"+e.layers),e.layerDefs&&(l.layerDefs=e.layerDefs),e.time&&(l.time=e.time),o=e._resource.getDerivedResource({url:"export",request:r,queryParameters:l})}return o||null}function Z$g(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function e$e(e){LicenseChecker.LICENSECHECKER.verify("CloudBox"),this._angle=0,this._speed=1,this._url=e.url,this._scene=void 0,this._ellipsoidGeometry=new b$O({radii:new o$1p(6578137,6578137,6578137),vertexFormat:t$h.vertexFormat}),this._cloudBall=new y$R({geometryInstances:new d$1o({geometry:this._ellipsoidGeometry,attributes:{distanceDisplayCondition:new t$A(2e6,Number.MAX_VALUE)}}),appearance:new t$h({material:new r$Y({fabric:{type:"Image",uniforms:{image:this._url,color:new e$1X(1,1,1,.99)}}}),aboveGround:!0})}),this._originalModelMatrix=p$1d.clone(this._cloudBall.modelMatrix)}function o$o(e){this._show=!1,this._brightness=1,this._contrast=1,this._saturation=1,this._hue=0,this.context=e}h$j.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e._hasMixedContent=!1;var i=!0,n=e.root;if(n.updateVisibility(t),!d$o(n))return i;var r=o$p.stack;for(r.push(e.root);r.length>0;){o$p.stackMaximumLength=Math.max(o$p.stackMaximumLength,r.length);var o=r.pop(),a=o.refine===f$E.ADD,s=o.refine===f$E.REPLACE,l=T$j(e,o);l&&g$q(e,o,r,t),(a||s&&!l)&&(y$i(e,o),_$i(e,o,t),!m$j(o)&&!o.contentAvailable&&(i=!1)),x$l(e),C$j(e,o)}return o$p.stack.trim(o$p.stackMaximumLength),i},Object.defineProperties(u$h.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}}),u$h.prototype.evaluate=function(e,t){var i=this._runtimeConditions;if(e$2e(i))for(var n=i.length,r=0;r<n;++r){var o=i[r];if(o.condition.evaluate(e))return o.expression.evaluate(e,t)}},u$h.prototype.evaluateColor=function(e,t){var i=this._runtimeConditions;if(e$2e(i))for(var n=i.length,r=0;r<n;++r){var o=i[r];if(o.condition.evaluate(e))return o.expression.evaluateColor(e,t)}},u$h.prototype.getShaderFunction=function(e,t,i,n){var r=this._runtimeConditions;if(e$2e(r)&&0!==r.length){for(var o="",a=r.length,s=0;s<a;++s){var l=r[s];o+=" "+(0===s?"if":"else if")+" ("+l.condition.getShaderExpression(t,i)+") \n { \n return "+l.expression.getShaderExpression(t,i)+"; \n } \n"}return o=n+" "+e+"() \n{ \n"+o+" return "+n+"(1.0); \n} \n"}},Object.defineProperties(d$n.prototype,{style:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._style}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},show:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._show},set:function(e){this._show=n$h(this,e),this._style.show=r$m(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._color},set:function(e){this._color=n$h(this,e),this._style.color=r$m(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointSize},set:function(e){this._pointSize=n$h(this,e),this._style.pointSize=r$m(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointOutlineColor},set:function(e){this._pointOutlineColor=n$h(this,e),this._style.pointOutlineColor=r$m(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=n$h(this,e),this._style.pointOutlineWidth=r$m(this._pointOutlineWidth)}},labelColor:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelColor},set:function(e){this._labelColor=n$h(this,e),this._style.labelColor=r$m(this._labelColor)}},labelOutlineColor:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelOutlineColor},set:function(e){this._labelOutlineColor=n$h(this,e),this._style.labelOutlineColor=r$m(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=n$h(this,e),this._style.labelOutlineWidth=r$m(this._labelOutlineWidth)}},font:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._font},set:function(e){this._font=n$h(this,e),this._style.font=r$m(this._font)}},labelStyle:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelStyle},set:function(e){this._labelStyle=n$h(this,e),this._style.labelStyle=r$m(this._labelStyle)}},labelText:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelText},set:function(e){this._labelText=n$h(this,e),this._style.labelText=r$m(this._labelText)}},backgroundColor:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundColor},set:function(e){this._backgroundColor=n$h(this,e),this._style.backgroundColor=r$m(this._backgroundColor)}},backgroundPadding:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundPadding},set:function(e){this._backgroundPadding=n$h(this,e),this._style.backgroundPadding=r$m(this._backgroundPadding)}},backgroundEnabled:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundEnabled},set:function(e){this._backgroundEnabled=n$h(this,e),this._style.backgroundEnabled=r$m(this._backgroundEnabled)}},scaleByDistance:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._scaleByDistance},set:function(e){this._scaleByDistance=n$h(this,e),this._style.scaleByDistance=r$m(this._scaleByDistance)}},translucencyByDistance:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._translucencyByDistance},set:function(e){this._translucencyByDistance=n$h(this,e),this._style.translucencyByDistance=r$m(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=n$h(this,e),this._style.distanceDisplayCondition=r$m(this._distanceDisplayCondition)}},heightOffset:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._heightOffset},set:function(e){this._heightOffset=n$h(this,e),this._style.heightOffset=r$m(this._heightOffset)}},anchorLineEnabled:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=n$h(this,e),this._style.anchorLineEnabled=r$m(this._anchorLineEnabled)}},anchorLineColor:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._anchorLineColor},set:function(e){this._anchorLineColor=n$h(this,e),this._style.anchorLineColor=r$m(this._anchorLineColor)}},image:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._image},set:function(e){this._image=n$h(this,e),this._style.image=r$m(this._image)}},disableDepthTestDistance:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=n$h(this,e),this._style.disableDepthTestDistance=r$m(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._horizontalOrigin},set:function(e){this._horizontalOrigin=n$h(this,e),this._style.horizontalOrigin=r$m(this._horizontalOrigin)}},verticalOrigin:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._verticalOrigin},set:function(e){this._verticalOrigin=n$h(this,e),this._style.verticalOrigin=r$m(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=n$h(this,e),this._style.labelHorizontalOrigin=r$m(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=n$h(this,e),this._style.labelVerticalOrigin=r$m(this._labelVerticalOrigin)}},pbrMaterialIndex:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pbrMaterialIndex},set:function(e){this._pbrMaterialIndex=n$h(this,e),this._style.pbrMaterialIndex=r$m(this._pbrMaterialIndex)}},meta:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._meta},set:function(e){this._meta=e}}}),d$n.prototype.getColorShaderFunction=function(e,t,i){return this._colorShaderFunctionReady?(i.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,this._colorShaderFunction=e$2e(this.color)?this.color.getShaderFunction(e,t,i,"vec4"):void 0,this._colorShaderTranslucent=i.translucent,this._colorShaderFunction)},d$n.prototype.getShowShaderFunction=function(e,t,i){return this._showShaderFunctionReady||(this._showShaderFunctionReady=!0,this._showShaderFunction=e$2e(this.show)?this.show.getShaderFunction(e,t,i,"bool"):void 0),this._showShaderFunction},d$n.prototype.getPointSizeShaderFunction=function(e,t,i){return this._pointSizeShaderFunctionReady||(this._pointSizeShaderFunctionReady=!0,this._pointSizeShaderFunction=e$2e(this.pointSize)?this.pointSize.getShaderFunction(e,t,i,"float"):void 0),this._pointSizeShaderFunction},Object.defineProperties(D$g.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return e$2e(this._minimumLevel)?this._minimumLevel:0}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}},zoomOffset:{get:function(){return this._zoomOffset}}}),D$g.prototype.getTileCredits=function(e,t,i){},D$g.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=W$j(this,e,t,i,n);if(n.quadKey=Z$g(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(e$2e(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2e(o)?o$1l(o,(function(e){return e$2e(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$i.loadImage(this,r)}return e$i.loadImage(this,r)}return e$i.loadImage(this,r)},D$g.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$15("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures){var o,a,s,l=this._tilingScheme.tileXYToNativeRectangle(e,t,i);if(this._tilingScheme.projection instanceof n$1d)o=e$2d.toDegrees(n),a=e$2d.toDegrees(r),s="4326";else{var u=this._tilingScheme.projection.project(new a$18(n,r,0));o=u.x,a=u.y,s="3857"}var c="visible";e$2e(this._layers)&&(c+=":"+this._layers);var h={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:o+","+a,mapExtent:l.west+","+l.south+","+l.east+","+l.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:s,layers:c};return this._resource.getDerivedResource({url:"identify",queryParameters:h}).fetchJson().then((function(e){var t=[],i=e.results;if(!e$2e(i))return t;for(var n=0;n<i.length;++n){var r=i[n],o=new o$r;if(o.data=r,o.name=r.value,o.properties=r.attributes,o.configureDescriptionFromProperties(r.attributes),"esriGeometryPoint"===r.geometryType&&r.geometry){var a=r.geometry.spatialReference&&r.geometry.spatialReference.wkid?r.geometry.spatialReference.wkid:4326;if(4326===a||4283===a)o.position=a$18.fromDegrees(r.geometry.x,r.geometry.y,r.geometry.z);else if(102100===a||900913===a||3857===a){var s=new t$N;o.position=s.unproject(new o$1p(r.geometry.x,r.geometry.y,r.geometry.z))}}t.push(o)}return t}))}},Object.defineProperties(e$e.prototype,{url:{get:function(){return this._url},set:function(e){this._url!==e&&(this._cloudBall.appearance.material.uniforms.image=e,this._url=e)}},speed:{get:function(){return this._speed},set:function(e){this._speed=e}}}),e$e.prototype.update=function(e){LicenseChecker.LICENSECHECKER.verify("CloudBox"),this._scene=e.camera._scene,e$2e(this._cloudBall)&&!this._scene.primitives.contains(this._cloudBall)&&this._scene.primitives.add(this._cloudBall),e.mode===C$14.SCENE3D&&this.animation(),e.mode===C$14.COLUMBUS_VIEW&&(this._cloudBall.modelMatrix=p$1d.clone(this._originalModelMatrix))},e$e.prototype.animation=function(){this._angle+=.05*this.speed,this._angle=this._angle%360;var e=e$2d.toRadians(this._angle);e=-e;var t=p$1e.fromRotationZ(e);p$1d.multiplyByMatrix3(this._originalModelMatrix,t,this._cloudBall.modelMatrix)},e$e.prototype.isDestroyed=function(){return!1},e$e.prototype.remove=function(){if(this._scene.primitives.contains(this._cloudBall)){var e=this._scene._primitives._primitives.indexOf(this._cloudBall);-1!==e&&(this._scene._primitives._primitives.splice(e,1),delete this._cloudBall._external._composites[this._scene._primitives._guid])}},e$e.prototype.destroy=function(){this.remove(),this._cloudBall=void 0},Object.defineProperties(o$o.prototype,{show:{get:function(){return this._show},set:function(e){this.context._colorBufferFloat||this.context._colorBufferHalfFloat?e!==this._show&&(e$2e(this._owner)&&this._owner.colorCorrectionShowChange(e),this._show=e):console.warn("Color correction is not currently supported on the mobile.")}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness=e}},contrast:{get:function(){return this._contrast},set:function(e){this._contrast=e}},saturation:{get:function(){return this._saturation},set:function(e){this._saturation=e}},hue:{get:function(){return this._hue},set:function(e){this._hue=e}}}),o$o.prototype.isDestroyed=function(){return!1},o$o.prototype.destroy=function(){return i$11(this)};var v$h="uniform sampler2D u_texture0;\n#ifdef BLOOM\nuniform vec2 u_BloomTex_TexelSize;\nuniform vec4 u_Bloom_DirtTileOffset;\nuniform vec3 u_Bloom_Settings;\nuniform vec3 u_Bloom_Color;\nuniform sampler2D u_BloomTexture;\nuniform sampler2D u_Bloom_DirtTex;\n#endif\n#ifdef COLOR_CORRECTION\nuniform float u_brightness;\nuniform float u_contrast;\nuniform float u_saturation;\nuniform float u_hue;\n#endif\n#ifdef SSAO\nuniform sampler2D u_AmbientOcclusionTexture;\n#endif\n#ifdef TONEMAPPING\nuniform float u_exposure;\nuniform float u_toneMappingWhitePoint;\n#endif\nvarying vec2 v_textureCoordinates;\n// 9-tap bilinear upsampler (tent filter)\n#define inline\nvec4 UpsampleTent(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\n vec4 d = texelSize.xyxy * vec4(1.0, 1.0, -1.0, 0.0) * sampleScale;\n vec4 s;\n s = texture2D(samplerTex, uv - d.xy);\n s += texture2D(samplerTex, uv - d.wy) * 2.0;\n s += texture2D(samplerTex, uv - d.zy);\n s += texture2D(samplerTex, uv + d.zw) * 2.0;\n s += texture2D(samplerTex, uv ) * 4.0;\n s += texture2D(samplerTex, uv + d.xw) * 2.0;\n s += texture2D(samplerTex, uv + d.zy);\n s += texture2D(samplerTex, uv + d.wy) * 2.0;\n s += texture2D(samplerTex, uv + d.xy);\n return s * (1.0 / 16.0);\n}\n\n#ifdef TONEMAPPING\nvec3 ACESTonemapping(vec3 inputColor)\n{\n return clamp((inputColor * (2.51 * inputColor + 0.03)) / (inputColor * (2.43 * inputColor + 0.59) + 0.14), 0.0, 1.0);\n}\n\nvec3 FilmicTonemappingFunction(vec3 x)\n{\n float A = 0.22;\n float B = 0.3;\n float C = 0.1;\n float D = 0.2;\n float E = 0.01;\n float F = 0.3;\n return ((x * (A * x + C * B) + D * E) / (x * (A * x + B) + D * F)) - E / F;\n}\nvec3 FilmicTonemapping(vec3 x)\n{\n vec3 WHITE = vec3(u_toneMappingWhitePoint);\n return FilmicTonemappingFunction(1.6 * x) / FilmicTonemappingFunction(WHITE);\n}\n\nvec3 inverseGamma(vec3 color)\n{\n return pow(color, vec3(1.0 / 2.2));\n}\n\nvec3 sRGBToLinear(vec3 value)\n{\n return vec3(mix(pow(value.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), value.rgb * 0.0773993808, vec3(lessThanEqual(value.rgb, vec3(0.04045)))));\n}\n\nvec3 linearTosRGB(vec3 value)\n{\n return vec3(mix(pow(value.rgb, vec3(0.41666)) * 1.055 - vec3(0.055), value.rgb * 12.92, vec3(lessThanEqual(value.rgb, vec3(0.0031308)))));\n}\n#endif\n\nvoid main()\n{\n vec4 color0 = texture2D(u_texture0, v_textureCoordinates);\n gl_FragColor = color0;\n#ifdef BLOOM\n vec4 bloom = UpsampleTent(u_BloomTexture, v_textureCoordinates, u_BloomTex_TexelSize.xy, vec4(u_Bloom_Settings.x));\n\tvec4 dirt = vec4(texture2D(u_Bloom_DirtTex, v_textureCoordinates * u_Bloom_DirtTileOffset.xy + u_Bloom_DirtTileOffset.zw).rgb, 0.0);\n\tbloom *= u_Bloom_Settings.y;\n\tdirt *= u_Bloom_Settings.z;\n\tgl_FragColor += bloom * vec4(u_Bloom_Color, 1.0);\n\tgl_FragColor += dirt * bloom;\n#endif\n#ifdef SSAO\n vec3 ao = texture2D(u_AmbientOcclusionTexture, v_textureCoordinates).rgb;\n gl_FragColor.rgb *= ao;\n#endif\n#ifdef TONEMAPPING\n vec3 linearColor = sRGBToLinear(gl_FragColor.rgb);\n vec3 toneMappingColor = ACESTonemapping(linearColor * u_exposure);\n gl_FragColor.rgb = linearTosRGB(toneMappingColor);\n#endif\n#ifdef COLOR_CORRECTION\n gl_FragColor.rgb = mix(vec3(0.0), gl_FragColor.rgb, u_brightness);\n gl_FragColor.rgb = mix(vec3(0.5), gl_FragColor.rgb, u_contrast);\n gl_FragColor.rgb = czm_hue(gl_FragColor.rgb, u_hue);\n gl_FragColor.rgb = czm_saturation(gl_FragColor.rgb, u_saturation);\n#endif\n}",I$k="uniform sampler2D u_texture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main() \n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",b$o="uniform float focalDistance;\nuniform float focalRange; \nuniform float focalLength; \nuniform float fstop; \nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n vec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\n viewPos /= viewPos.w;\n float dist = abs(viewPos.z);\n float aperture = focalLength / fstop;\n float coc;\n float uppper = focalDistance + focalRange;\n float lower = focalDistance - focalRange;\n if (dist <= uppper && dist >= lower)\n {\n coc = 0.5;\n coc = coc * 0.5 + 0.5;\n }\n else\n {\n float focalAdjusted = dist > uppper ? uppper : lower;\n coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\n coc = clamp(coc, 0.0, 2.0) / 2.00001;\n if (dist < lower)\n {\n coc = -coc;\n }\n coc = coc * 0.5 + 0.5;\n }\n gl_FragColor = czm_packDepth(coc);\n}",x$k="uniform sampler2D u_texture;\nuniform sampler2D coc;\nvarying vec2 v_textureCoordinates;\nuniform float blurRadius;\nuniform vec2 textureSize;\nuniform vec2 poissonKernel[16];\nconst float percent = 0.01;\n\nfloat nrand(in vec2 n)\n{\n return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec2 offset = blurRadius / textureSize;\n float rnd = 6.28318 * nrand(v_textureCoordinates + 0.07 * percent );\n float cosa = cos(rnd);\n float sina = sin(rnd);\n vec4 basis = vec4(cosa, -sina, sina, cosa);\n offset *= abs(czm_unpackDepth(texture2D(coc, v_textureCoordinates)) * 2.0 - 1.0);\n vec4 color = vec4(0.0);\n float weightSum = 0.0;\n for (int i = 0; i < 16; i++)\n {\n vec2 ofs = poissonKernel[i];\n ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\n vec2 uv = v_textureCoordinates + ofs * offset;\n vec4 texel = texture2D(u_texture, uv);\n float w = 1.0;\n float fCoc = czm_unpackDepth(texture2D(coc, uv)) * 2.0 - 1.0;\n w *= abs(fCoc);\n texel.rgb *= texel.a;\n color += texel * w;\n weightSum += w;\n }\n color /= weightSum;\n color.rgb /= (color.a + 0.0001);\n gl_FragColor = color;\n}",S$f="uniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D coc;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 blurredColor = texture2D(blurred, v_textureCoordinates);\n vec4 originalColor = texture2D(original, v_textureCoordinates);\n float fCoc = czm_unpackDepth(texture2D(coc, v_textureCoordinates));\n fCoc = abs(fCoc * 2.0 - 1.0);\n float weight = smoothstep(0.0, 1.0, fCoc);\n gl_FragColor = mix(originalColor, blurredColor, weight);\n}";function n$g(){this._cocFBO=void 0,this._blurFBO=void 0,this._compositeBlurFBO=void 0,this._cocCommand=void 0,this._blurCommand=void 0,this._compositeCommand=void 0,this._upSamplePassState=new n$$,this._scene=void 0,this._show=!1,this._useLogDepth=!0,this._focalDistance=50,this._focalRange=20,this._focalLength=30,this._fstop=2.8,this._blurRadius=10,this._textureSize=new o$1o(512,512),this._poissonKernel=T$i(),this._dofBlurKernel=[],this._dofBlurKernelSize=16;for(var e=0;e<this._dofBlurKernelSize;e++)this._dofBlurKernel.push(this._poissonKernel[e])}Object.defineProperties(n$g.prototype,{show:{get:function(){return this._show},set:function(e){this._show=e}},focalDistance:{get:function(){return this._focalDistance},set:function(e){this._focalDistance=e}},focalRange:{get:function(){return this._focalRange},set:function(e){this._focalRange=e}},fStop:{get:function(){return this._fstop},set:function(e){this._fstop=e}},blurRadius:{get:function(){return this._blurRadius},set:function(e){this._blurRadius=e}}}),n$g.prototype.execute=function(e){this._cocCommand.execute(e,this._upSamplePassState),this._blurCommand.execute(e,this._upSamplePassState),this._compositeCommand.execute(e,this._upSamplePassState)};var y$h=new f$1a;function P$k(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function v$g(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function T$i(){var e=[];return e.push(new o$1o(0,0)),e.push(new o$1o(-.321585265978,-.154972575841)),e.push(new o$1o(.458126042375,.188473391593)),e.push(new o$1o(.842080129861,.527766490688)),e.push(new o$1o(.147304551086,-.659453822776)),e.push(new o$1o(-.331943915203,-.940619700594)),e.push(new o$1o(.0479226680259,.54812163202)),e.push(new o$1o(.701581552186,-.709825561388)),e.push(new o$1o(-.295436780218,.940589268233)),e.push(new o$1o(-.901489676764,.237713156085)),e.push(new o$1o(.973570876096,-.109899459384)),e.push(new o$1o(-.866792314779,-.451805525005)),e.push(new o$1o(.330975007087,.800048655954)),e.push(new o$1o(-.344275183665,.381779221166)),e.push(new o$1o(-.386139432542,-.437418421534)),e.push(new o$1o(-.576478634965,-.0148463392551)),e.push(new o$1o(.385798197415,-.262426961053)),e.push(new o$1o(-.666302061145,.682427250835)),e.push(new o$1o(-.628010632582,-.732836215494)),e.push(new o$1o(.10163141741,-.987658134403)),e.push(new o$1o(.711995289051,-.320024291314)),e.push(new o$1o(.0296005138058,.950296523438)),e.push(new o$1o(.0130612307608,-.351024443122)),e.push(new o$1o(-.879596633704,-.10478487883)),e.push(new o$1o(.435712737232,.504254490347)),e.push(new o$1o(.779203817497,.206477676721)),e.push(new o$1o(.388264289969,-.896736162545)),e.push(new o$1o(-.153106280781,-.629203242522)),e.push(new o$1o(-.245517550697,.657969239148)),e.push(new o$1o(.126830499058,.26862328493)),e.push(new o$1o(-.634888119007,-.302301223431)),e.push(new o$1o(.617074219636,.779817204925)),e}n$g.prototype.update=function(e,t,i,n){var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight;this._scene=i,e$2e(this._cocCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),e$2e(this._cocCommand)||this.createCommand(e);var a=this._blurFBO,s=e$2e(a)&&a.getColorTexture(0)||void 0;if(!e$2e(s)||this._textureSize.x!==r||this._textureSize.y!==o){this._textureSize.x=r,this._textureSize.y=o,this.createFBO(r,o,e);var l=y$h;l.width=r,l.height=o;var u=d$1m.fromCache({viewport:l});this._cocCommand.renderState=u,this._blurCommand.renderState=u,this._compositeCommand.renderState=u}this._upSamplePassState.context=e},n$g.prototype.createFBO=function(e,t,i){this._cocFBO=this._cocFBO&&this._cocFBO.destroy(),this._blurFBO=this._blurFBO&&this._blurFBO.destroy(),this._compositeBlurFBO=this._compositeBlurFBO&&this._compositeBlurFBO.destroy(),this._cocFBO=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t})]}),this._blurFBO=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t,pixelFormat:V$12.RGBA,pixelDatatype:i.webgpu?_$_.UNSIGNED_BYTE:_$_.FLOAT})]}),this._compositeBlurFBO=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t})]}),e$2e(this._cocCommand)&&e$2e(this._blurCommand)&&e$2e(this._compositeCommand)&&(this._cocCommand.framebuffer=this._cocFBO,this._blurCommand.framebuffer=this._blurFBO,this._compositeCommand.framebuffer=this._compositeBlurFBO)},n$g.prototype.createCommand=function(e){var t={},i=new s$V({name:"DOFCoc",sources:[b$o]});this._useLogDepth&&i.defines.push("LOG_DEPTH"),this._cocCommand=e.createViewportQuadCommand(i,{shaderProgramName:"DepthOfFieldCoc",uniformMap:t,owner:this}),this._blurCommand=e.createViewportQuadCommand(x$k,{shaderProgramName:"DepthOfFieldBlur",uniformMap:t,owner:this}),this._compositeCommand=e.createViewportQuadCommand(S$f,{shaderProgramName:"DepthOfFieldComposite",uniformMap:t,owner:this}),this.createUniformMap()},n$g.prototype.createUniformMap=function(){if(e$2e(this._cocCommand)&&e$2e(this._blurCommand)&&e$2e(this._compositeCommand)){var e=this;this._cocCommand.uniformMap.focalDistance=function(){return e._focalDistance},this._cocCommand.uniformMap.focalRange=function(){return e._focalRange},this._cocCommand.uniformMap.focalLength=function(){return e._focalLength},this._cocCommand.uniformMap.fstop=function(){return e._fstop},this._blurCommand.uniformMap.u_texture=function(){return e._fbo.getColorTexture(0)},this._blurCommand.uniformMap.coc=function(){return e._cocFBO.getColorTexture(0)},this._blurCommand.uniformMap.blurRadius=function(){return e._blurRadius},this._blurCommand.uniformMap.textureSize=function(){return e._textureSize},this._blurCommand.uniformMap.poissonKernel=function(){return e._dofBlurKernel},this._compositeCommand.uniformMap.original=function(){return e._fbo.getColorTexture(0)},this._compositeCommand.uniformMap.blurred=function(){return e._blurFBO.getColorTexture(0)},this._compositeCommand.uniformMap.coc=function(){return e._cocFBO.getColorTexture(0)}}},n$g.prototype.setInputFBO=function(e){this._fbo=e},n$g.prototype.getDOFTexture=function(){return this._compositeBlurFBO.getColorTexture(0)},n$g.prototype.isDestroyed=function(){return!1},n$g.prototype.destroy=function(){return this._cocFBO=this._cocFBO&&this._cocFBO.destroy(),this._blurFBO=this._blurFBO&&this._blurFBO.destroy(),this._compositeBlurFBO=this._compositeBlurFBO&&this._compositeBlurFBO.destroy(),this._cocCommand=this._cocCommand&&this._cocCommand.shaderProgram&&this._cocCommand.shaderProgram.destroy(),this._blurCommand=this._blurCommand&&this._blurCommand.shaderProgram&&this._blurCommand.shaderProgram.destroy(),this._compositeCommand=this._compositeCommand&&this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy(),i$11(this)},n$g.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2e(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?P$k(n,t):v$g(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}};var z$i="uniform sampler2D randomTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\n\nvarying vec2 v_textureCoordinates;\n\nvec4 clipToEye(vec2 uv, float depth)\n{\n vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\n vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\n posEC = posEC / posEC.w;\n return posEC;\n}\nfloat getDepth(in vec4 depth)\n{\n\tfloat z_window = czm_unpackDepth(depth);\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\n\n//Reconstruct Normal Without Edge Removation\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\n vec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\n vec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\n vec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\n vec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\n\n vec3 up = posInCamera.xyz - posInCameraUp.xyz;\n vec3 down = posInCameraDown.xyz - posInCamera.xyz;\n vec3 left = posInCamera.xyz - posInCameraLeft.xyz;\n vec3 right = posInCameraRight.xyz - posInCamera.xyz;\n\n vec3 DX = length(left) < length(right) ? left : right;\n vec3 DY = length(up) < length(down) ? up : down;\n\n return normalize(cross(DY, DX));\n}\n\nvoid main(void)\n{\n float depth = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n vec4 posInCamera = clipToEye(v_textureCoordinates, depth);\n\n if (posInCamera.z > frustumLength)\n {\n gl_FragColor = vec4(1.0);\n return;\n }\n\n vec2 pixelSize = 1.0 / czm_viewport.zw;\n float depthU = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates- vec2(0.0, pixelSize.y)));\n float depthD = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates+ vec2(0.0, pixelSize.y)));\n float depthL = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates- vec2(pixelSize.x, 0.0)));\n float depthR = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates+ vec2(pixelSize.x, 0.0)));\n vec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\n\n float ao = 0.0;\n vec2 sampleDirection = vec2(1.0, 0.0);\n float gapAngle = 90.0 * czm_radiansPerDegree;\n\n // RandomNoise\n float randomVal = getDepth(texture2D(randomTexture, v_textureCoordinates));\n\n float inverseViewportWidth = 1.0 / czm_viewport.z;\n float inverseViewportHeight = 1.0 / czm_viewport.w;\n\n //Loop for each direction\n for (int i = 0; i < 4; i++)\n {\n float newGapAngle = gapAngle * (float(i) + randomVal);\n float cosVal = cos(newGapAngle);\n float sinVal = sin(newGapAngle);\n\n //Rotate Sampling Direction\n vec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\n float localAO = 0.0;\n float localStepSize = stepSize;\n\n //Loop for each step\n for (int j = 0; j < 6; j++)\n {\n vec2 directionWithStep = vec2(rotatedSampleDirection.x * localStepSize * inverseViewportWidth, rotatedSampleDirection.y * localStepSize * inverseViewportHeight);\n vec2 newCoords = directionWithStep + v_textureCoordinates;\n\n //Exception Handling\n if(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n {\n break;\n }\n\n float stepDepthInfo = getDepth(texture2D(czm_globeDepthTexture, newCoords));\n vec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\n vec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\n float len = length(diffVec);\n\n if (len > lengthCap)\n {\n break;\n }\n\n float dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\n float weight = len / lengthCap;\n weight = 1.0 - weight * weight;\n\n if (dotVal < bias)\n {\n dotVal = 0.0;\n }\n\n localAO = max(localAO, dotVal * weight);\n localStepSize += stepSize;\n }\n ao += localAO;\n }\n\n ao /= 4.0;\n ao = 1.0 - clamp(ao, 0.0, 1.0);\n ao = pow(ao, intensity);\n gl_FragColor = vec4(vec3(ao), 1.0);\n}",F$f="uniform float u_delta;\nuniform float u_sigma;\nuniform float direction;\nuniform sampler2D u_texture;\nuniform vec2 u_step;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec2 st = v_textureCoordinates;\n vec2 dir = vec2(1.0 - direction, direction);\n vec2 off = u_step * dir;\n vec3 g;\n g.x = 1.0 / (sqrt(czm_twoPi) * u_sigma);\n g.y = exp((-0.5 * u_delta * u_delta) / (u_sigma * u_sigma));\n g.z = g.y * g.y;\n vec4 result = texture2D(u_texture, st) * g.x;\n for (int i = 1; i < 8; ++i)\n {\n g.xy *= g.yz;\n vec2 offset = float(i) * dir * u_step;\n result += texture2D(u_texture, st - offset) * g.x;\n result += texture2D(u_texture, st + offset) * g.x;\n }\n gl_FragColor = result;\n}\n";function a$f(){this._fbo=void 0,this._scene=void 0,this._downSampleFBO1=void 0,this._downSampleFBO2=void 0,this._clearFBO1Command=void 0,this._clearFBO2Command=void 0,this._ambientOcclusionGenerateCommand=void 0,this._blurXCommand=void 0,this._blurYCommand=void 0,this._downSamplePassState=new n$$,this._upSamplePassState=new n$$,this._blurStep=new o$1o,this._intensity=3,this._bias=.1,this._lengthCap=.26,this._stepSize=1.95,this._frustumLength=1e3,this._randomTexture=void 0,this._show=!1,this._useLogDepth=!0,this._context=void 0}Object.defineProperties(a$f.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(e$2e(this._owner)&&this._owner.ssaoShowChange(e),this._show=e)}},intensity:{get:function(){return this._intensity},set:function(e){this._intensity=e}},lengthCap:{get:function(){return this._lengthCap},set:function(e){this._lengthCap=e}},bias:{get:function(){return this._bias},set:function(e){this._bias=e}},stepSize:{get:function(){return this._stepSize},set:function(e){this._stepSize=e}},frustumLength:{get:function(){return this._frustumLength},set:function(e){this._frustumLength=e}}}),a$f.prototype.clear=function(e,t){var i=this._clearFBO1Command;e$1X.clone(u$Z(t,e$1X.BLACK),i.color),i.execute(e),i=this._clearFBO2Command,e$1X.clone(u$Z(t,e$1X.BLACK),i.color),i.execute(e)},a$f.prototype.isPrepared=function(){return e$2e(this._scene)&&this._scene._pickDepths.length>0},a$f.prototype.execute=function(e,t){this._ambientOcclusionGenerateCommand.execute(e,this._downSamplePassState),this._blurXCommand.execute(e,this._downSamplePassState),this._blurYCommand.execute(e,this._downSamplePassState)},a$f.prototype.createRandomTexture=function(e){for(var t=196608,i=new Uint8Array(t),n=0;n<t;n+=3)i[n]=Math.floor(255*Math.random());this._randomTexture=new t$U({context:e,pixelFormat:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE,source:{arrayBufferView:i,width:256,height:256},sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})},new f$1a;var k$f=new f$1a;function H$o(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function N$e(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}a$f.prototype.update=function(e,t,i,n){this._scene=i,this._context=t.context;var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight,a=this;if(e$2e(this._randomTexture)||this.createRandomTexture(e),e$2e(this._ambientOcclusionGenerateCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),!e$2e(this._ambientOcclusionGenerateCommand)){this._clearFBO1Command=new t$W({color:new e$1X}),this._clearFBO2Command=new t$W({color:new e$1X});var s={randomTexture:function(){return a._randomTexture},intensity:function(){return a._intensity},bias:function(){return a._bias},lengthCap:function(){return a._lengthCap},stepSize:function(){return a._stepSize},frustumLength:function(){return a._frustumLength}},l=new s$V({name:"ambientOcclusion",sources:[z$i]});this._useLogDepth&&l.defines.push("LOG_DEPTH"),this._ambientOcclusionGenerateCommand=e.createViewportQuadCommand(l,{uniformMap:s,owner:this}),s={direction:function(){return 0}},this._blurXCommand=e.createViewportQuadCommand(F$f,{uniformMap:s,owner:this}),s={direction:function(){return 1}},this._blurYCommand=e.createViewportQuadCommand(F$f,{uniformMap:s,owner:this})}var u=Math.pow(2,Math.ceil(Math.log(r)/Math.log(2))-2),c=Math.pow(2,Math.ceil(Math.log(o)/Math.log(2))-2),h=Math.max(1,u,c),d=k$f;d.width=h,d.height=h;var f=this._downSampleFBO1,p=e$2e(f)&&f.getColorTexture(0)||void 0;if(!e$2e(p)||p.width!==h||p.height!==h){this._downSampleFBO1=this._downSampleFBO1&&this._downSampleFBO1.destroy(),this._downSampleFBO2=this._downSampleFBO2&&this._downSampleFBO2.destroy(),this._blurStep.x=this._blurStep.y=2/h;this._downSampleFBO1=new t$V({context:e,colorTextures:[new t$U({context:e,width:h,height:h})]}),this._downSampleFBO2=new t$V({context:e,colorTextures:[new t$U({context:e,width:h,height:h})]}),this._clearFBO1Command.framebuffer=this._downSampleFBO1,this._clearFBO2Command.framebuffer=this._downSampleFBO2,this._ambientOcclusionGenerateCommand.framebuffer=this._downSampleFBO1,this._blurXCommand.framebuffer=this._downSampleFBO2,this._blurYCommand.framebuffer=this._downSampleFBO1;var _=d$1m.fromCache({viewport:d});this._ambientOcclusionGenerateCommand.uniformMap.depthTexture=function(){return a._scene._pickDepths.length>0&&e$2e(a._scene._pickDepths[0]._depthTexture)?a._scene._pickDepths[0]._depthTexture:a._context.defaultTexture},this._ambientOcclusionGenerateCommand.renderState=_,this._blurXCommand.uniformMap.u_texture=function(){return a._downSampleFBO1.getColorTexture(0)},this._blurXCommand.uniformMap.u_step=function(){return a._blurStep},this._blurXCommand.uniformMap.u_delta=function(){return 1},this._blurXCommand.uniformMap.u_sigma=function(){return 2},this._blurXCommand.renderState=_,this._blurYCommand.uniformMap.u_texture=function(){return a._downSampleFBO2.getColorTexture(0)},this._blurYCommand.uniformMap.u_step=function(){return a._blurStep},this._blurYCommand.uniformMap.u_delta=function(){return 1},this._blurYCommand.uniformMap.u_sigma=function(){return 2},this._blurYCommand.renderState=_}this._downSamplePassState.context=e,this._upSamplePassState.context=e},a$f.prototype.setInputFBO=function(e){this._fbo=e},a$f.prototype.getAmbientOcclusionTexture=function(){return this._downSampleFBO1.getColorTexture(0)},a$f.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2e(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?H$o(n,t):N$e(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}},a$f.prototype.isDestroyed=function(){return!1},a$f.prototype.destroy=function(){return this._downSampleFBO1=this._downSampleFBO1&&this._downSampleFBO1.destroy(),this._downSampleFBO2=this._downSampleFBO2&&this._downSampleFBO2.destroy(),this._ambientOcclusionGenerateCommand=this._ambientOcclusionGenerateCommand&&this._ambientOcclusionGenerateCommand.shaderProgram&&this._ambientOcclusionGenerateCommand.shaderProgram.destroy(),this._blurXCommand=this._blurXCommand&&this._blurXCommand.shaderProgram&&this._blurXCommand.shaderProgram.destroy(),this._blurYCommand=this._blurYCommand&&this._blurYCommand.shaderProgram&&this._blurYCommand.shaderProgram.destroy(),i$11(this)};var k$e="uniform sampler2D u_colorTexture;\nuniform sampler2D u_appendTexture;\nuniform vec4 u_scanViewCenterArr[COUNT];\nuniform vec4 u_scanViewPlaneArr[COUNT];\nuniform float u_radiusArr[COUNT];\nuniform vec3 u_scanLineDirArr[COUNT];\nuniform vec3 u_scanLineMoveViewDirArr[COUNT];\nuniform vec3 u_scanLinePtArr[COUNT];\nuniform float u_lineWidth;\nuniform vec4 u_ScanColor;\nvarying vec2 v_textureCoordinates;\n\nvec3 pointProjectPlane(vec3 planeNormal, vec3 pointOnPlane, vec3 point1)\n{\n\tvec3 v01 = point1 - pointOnPlane;\n\tv01 = normalize(v01);\n\tvec3 normalizeVector = normalize(planeNormal);\n\tif (v01 == normalizeVector)\n\t{\n\t\treturn pointOnPlane;\n\t}\n\tfloat d = (planeNormal.x * (point1.x - pointOnPlane.x) + planeNormal.y * (point1.y - pointOnPlane.y) + planeNormal.z * (point1.z - pointOnPlane.z)) / dot(planeNormal, planeNormal);\n\tvec3 res;\n\tres = point1 - planeNormal * d;\n\treturn res;\n}\n\nfloat distancePointToLine(vec3 ptOnLine, vec3 vectorLine, vec3 testPt)\n{\n\tvec3 v = vectorLine;\n\tvec3 w = testPt - ptOnLine;\n\tfloat c1 = dot(w, v);\n\tfloat c2 = dot(v, v);\n\tfloat b = c1 / c2;\n\tvec3 Pb = ptOnLine + b * v;\n\treturn length(testPt - Pb);\n}\n\nvoid main()\n{\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n#ifdef LOG_DEPTH\n float scale = logDepthOrDepth;\n#else\n float scale = pow(logDepthOrDepth * 0.5 + 0.5, 8.0);\n#endif\n\tvec4 sceneColor = texture2D(u_colorTexture, v_textureCoordinates);\n\tfloat useSceneColor = 0.0;\n#if defined(WEBGL2) || defined(WEBGPU)\n\tif(scale < 0.000001)\n\t{\n\t\tuseSceneColor = 1.0;\n\t}\n#else\n\tif(scale > 0.999999)\n\t{\n\t\tuseSceneColor = 1.0;\n\t}\n#endif\n\tvec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\n\tviewPos /= viewPos.w;\n\tvec4 scanColor = vec4(1.0);\n\tfloat scanValue = 0.0;\n\tvec4 appendColor = vec4(0.0);\n\tfor(int i = 0;i < COUNT;i++)\n\t{\n\t\tvec3 scanViewPlane = u_scanViewPlaneArr[i].xyz;\n\t\tvec3 scanViewCenter = u_scanViewCenterArr[i].xyz;\n\t\tfloat radius = u_radiusArr[i];\n\t\tvec3 scanLinePt = u_scanLinePtArr[i];\n\t\tvec3 scanLineDir = u_scanLineDirArr[i];\n\t\tvec3 scanLineMoveViewDir = u_scanLineMoveViewDirArr[i];\n\t\tfloat lineWidth = u_lineWidth;\n\t\tvec3 prjOnPlane = pointProjectPlane(scanViewPlane, scanViewCenter, viewPos.xyz);\n\t\tvec2 appendTexCoord = vec2(0.0);\n\t#ifdef CIRCLE\n\t\tvec3 relativePos = prjOnPlane - scanViewCenter;\n\t\tfloat dis = length(relativePos);\n\t#ifdef APPEND_TEXTURE\n\t if(dis < radius)\n\t {\n\t vec3 zAxis = scanViewPlane;\n vec3 temp = vec3(1.0, 0.0, 0.0);\n vec3 xAxis = normalize(cross(temp, zAxis));\n vec3 yAxis = normalize(cross(zAxis, xAxis));\n float cosTheta = dot(normalize(relativePos), xAxis);\n float cosTheta2 = dot(normalize(relativePos), yAxis);\n appendTexCoord.x = (dis * cosTheta / radius + 1.0) * 0.5;\n appendTexCoord.y = (dis * cosTheta2 / radius + 1.0) * 0.5;\n\t }\n\t\tappendColor += texture2D(u_appendTexture, appendTexCoord);\n appendColor.rgb = appendColor.rgb * u_ScanColor.rgb;\n\t#else\n\t\tif(dis < radius)\n\t\t{\n\t\t\tfloat f = 1.0 - abs(radius - dis) / radius;\n\t\t\tf = pow(f, 8.0);\n\t\t\tscanValue = f;\n\t\t\tscanColor *= u_ScanColor;\n\t\t}\n\t#endif\n\t#else\n\t#ifdef APPEND_TEXTURE\n\t\tvec3 relativePos = prjOnPlane - scanLinePt;\n\t\tfloat cosTheta = dot(scanLineDir, normalize(relativePos));\n\t\tfloat cosTheta2 = dot(scanLineMoveViewDir, normalize(relativePos));\n\t\tfloat disToLineCenter = length(relativePos);\n\t\tappendTexCoord.x = (disToLineCenter * cosTheta / lineWidth + 1.0) * 0.5;\n\t\tappendTexCoord.y = (disToLineCenter * cosTheta2 / lineWidth + 1.0) * 0.5;\n\t\tappendColor += texture2D(u_appendTexture, appendTexCoord);\n\t\tappendColor.rgb = appendColor.rgb * u_ScanColor.rgb;\n\t#else\n\t\tfloat disToLine = distancePointToLine(scanLinePt, scanLineDir, prjOnPlane);\n\t\tif(disToLine < lineWidth)\n\t\t{\n\t\t\tfloat f = abs(lineWidth - disToLine) / lineWidth;\n\t\t\tf = pow(f, 8.0);\n\t\t\tscanValue += f;\n\t\t\tscanColor = u_ScanColor;\n\t\t}\n\t#endif\n\t#endif\n\t}\n#ifdef APPEND_TEXTURE\n\tgl_FragColor.rgb = sceneColor.rgb + appendColor.rgb * scanColor.rgb;\n#else\n\tgl_FragColor = mix(sceneColor, scanColor, scanValue);\n#endif\n\tgl_FragColor = mix(gl_FragColor, sceneColor, useSceneColor);\n}",e$d={CIRCLE:{programDefines:"CIRCLE"},LINE:{programDefines:"LINE"}},A$l=Object.freeze(e$d);function h$i(){this._fbo=void 0,this._inputFbo=void 0,this._scanCommand=void 0,this._upSamplePassState=new n$$,this._scene=void 0,this._mode=A$l.LINE,this._scanViewCenterArr=[],this._scanPlaneArr=[],this._scanCenterArr=[],this._scanLineMoveDirArr=[],this._scanLineMoveViewDirArr=[],this._scanLineDirArr=[],this._scanLinePtArr=[],this._radiusArr=[],this._lineWidth=1e3,this._color=new e$1X(1,1,1,1),this._period=1e3,this._speed=1e3,this._show=!1,this._appendTexUrl=void 0,this._appendTexture=void 0,this._textureChanged=!1,this._useLogDepth=!0}Object.defineProperties(h$i.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(e$2e(this._owner)&&this._owner.scanShowChange(e),this._show=e)}},mode:{get:function(){return this._mode},set:function(e){this.changeProgramDefine(!1,this._mode.programDefines),this._mode=e,this.changeProgramDefine(!0,this._mode.programDefines)}},color:{get:function(){return this._color},set:function(e){this._color=e}},count:{get:function(){return this._scanCenterArr.length}},centerPostion:{get:function(){var e=this._scanCenterArr.length;return this._scanCenterArr[e-1]},set:function(e){this._scanCenterArr[0]=e,0===this._scanLineMoveDirArr.length&&(this._scanViewCenterArr[0]=new o$1p,this.computeDefaultMoveDir(0))}},period:{get:function(){return this._period/1e3},set:function(e){this._period=1e3*e}},speed:{get:function(){return this._speed},set:function(e){this._speed=e}},lineMoveDirection:{get:function(){var e=this._scanLineMoveDirArr.length;return this._scanLineMoveDirArr[e-1]},set:function(e){var t=this._scanLineMoveDirArr.length,i=o$1p.normalize(e,new o$1p);this._scanLineMoveDirArr[t-1]=i}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e}},textureUrl:{get:function(){return this._appendTexUrl},set:function(e){this._textureChanged=!0,this._appendTexUrl=e,(!e$2e(e)||""===e)&&this.changeProgramDefine(!1,"APPEND_TEXTURE")}}}),h$i.prototype.isPrepared=function(){return e$2e(this._scene)&&this._scene._pickDepths.length>0},h$i.prototype.execute=function(e){this._scanCommand.execute(e,this._upSamplePassState)};var G$j=new f$1a,x$j=new e$2c(0,0,0,1),v$f=new e$2c(0,0,0,1),o$n=new e$2c,d$m=new e$2c,_$h=new o$1p,H$n=new o$1m(new o$1p(0,0,1),10);function j$h(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function Q$c(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}h$i.prototype.computeDefaultMoveDir=function(e){var t=new o$1p,i=this._scanCenterArr[e];t=o$1p.cross(new o$1p(0,0,1),i,t),t=o$1p.normalize(t,t),this._scanLineMoveDirArr[e]=t},h$i.prototype.computeScanPlane=function(e,t){var i=this._scanCenterArr[t],n=this._scanViewCenterArr[t],r=this._scanPlaneArr[t];e$2e(r)||(r=this._scanPlaneArr[t]=new e$2c);var o=e._frameState.camera;e.mode===C$14.SCENE2D&&(v$f.x=i.x,v$f.y=i.y,v$f.z=i.z-1e3),x$j=p$1d.multiplyByVector(o.viewMatrix,v$f,x$j),d$m=e$2c.subtract(n,x$j,d$m),_$h.x=d$m.x,_$h.y=d$m.y,_$h.z=d$m.z,_$h=o$1p.normalize(_$h,_$h);var a=o$1m.fromPointNormal(new o$1p(n.x,n.y,n.z),_$h,H$n);r.x=a.normal.x,r.y=a.normal.y,r.z=a.normal.z,r.w=a.distance},h$i.prototype.updateScanParameters=function(e){for(var t=e._frameState.camera,i=0,n=this._scanCenterArr.length;i<n;i++){var r=this._scanCenterArr[i];o$n.x=r.x,o$n.y=r.y,o$n.z=r.z,o$n.w=1,p$1d.multiplyByVector(t.viewMatrix,o$n,this._scanViewCenterArr[i]),this.computeScanPlane(e,i);var o=performance.now()%this._period;0==o&&(o=this._period);var a=this._speed*o/1e3;this._mode===A$l.CIRCLE?this._radiusArr[i]=a:this._mode===A$l.LINE&&(this.computeScanLineDir(e,i),this.computeScanLinePt(e,a,i))}},h$i.prototype.computeScanLineDir=function(e,t){var i=e._frameState.camera,n=this._scanLineDirArr[t];e$2e(n)||(n=this._scanLineDirArr[t]=new o$1p);var r=this._scanLineMoveDirArr[t];e$2e(r)||(r=this._scanLineMoveDirArr[t]=new o$1p);var o=this._scanCenterArr[t],a=this._scanViewCenterArr[t];n=e.mode===C$14.SCENE2D?o$1p.cross(r,new o$1p(0,0,1),n):o$1p.cross(r,o,n),o$1p.normalize(n,n);var s=new o$1p;s=o$1p.multiplyByScalar(n,10,s),s=o$1p.add(o,s,s),o$n.x=s.x,o$n.y=s.y,o$n.z=s.z,o$n.w=1,o$n=p$1d.multiplyByVector(i.viewMatrix,o$n,o$n),n.x=o$n.x-a.x,n.y=o$n.y-a.y,n.z=o$n.z-a.z,o$1p.normalize(n,n)},h$i.prototype.computeScanLinePt=function(e,t,i){var n=e._frameState.camera,r=this._scanLinePtArr[i];e$2e(r)||(r=this._scanLinePtArr[i]=new o$1p);var o=this._scanLineMoveDirArr[i],a=this._scanCenterArr[i],s=this._scanViewCenterArr[i],l=this._scanLineMoveViewDirArr[i];e$2e(l)||(l=this._scanLineMoveViewDirArr[i]=new o$1p),r=o$1p.multiplyByScalar(o,t,r),r=o$1p.add(a,r,r),o$n.x=r.x,o$n.y=r.y,o$n.z=r.z,o$n.w=1,o$n=p$1d.multiplyByVector(n.viewMatrix,o$n,o$n),r.x=o$n.x,r.y=o$n.y,r.z=o$n.z,l.x=o$n.x-s.x,l.y=o$n.y-s.y,l.z=o$n.z-s.z,o$1p.normalize(l,l)},h$i.prototype.update=function(e,t,i,n){this._context=t.context;var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight;this._scene=i,this.updateScanParameters(i);var a=this;if(this._textureChanged&&(e$2e(this._appendTexUrl)&&""!==this._appendTexUrl&&o$1l(t$S(a._appendTexUrl),(function(t){e$2e(a._appendTexture)&&a._appendTexture.destroy(),a._appendTexture=new t$U({context:e,source:t,pixelFormat:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE}),a.changeProgramDefine(!0,"APPEND_TEXTURE")})),this._textureChanged=!1),e$2e(this._scanCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),!e$2e(this._scanCommand)){var s=new s$V({name:"Scan",sources:[k$e]});s.defines.push(this._mode.programDefines),s.defines.push("COUNT "+this._scanCenterArr.length),n&&s.defines.push("LOG_DEPTH"),this._scanCommand=e.createViewportQuadCommand(s,{shaderProgramName:"scanEffect",uniformMap:{},owner:this}),this._scanCommand.uniformMap.u_depthTex=function(){return a._scene._pickDepths[0]._depthTexture},this._scanCommand.uniformMap.u_colorTexture=function(){return a._inputFbo.getColorTexture(0)},this._scanCommand.uniformMap.u_appendTexture=function(){return e$2e(a._appendTexture)?a._appendTexture:a._context.defaultTexture},this._scanCommand.uniformMap.u_scanViewCenterArr=function(){return a._scanViewCenterArr},this._scanCommand.uniformMap.u_radiusArr=function(){return a._radiusArr},this._scanCommand.uniformMap.u_scanViewPlaneArr=function(){return a._scanPlaneArr},this._scanCommand.uniformMap.u_scanLineDirArr=function(){return a._scanLineDirArr},this._scanCommand.uniformMap.u_scanLineMoveViewDirArr=function(){return a._scanLineMoveViewDirArr},this._scanCommand.uniformMap.u_scanLinePtArr=function(){return a._scanLinePtArr},this._scanCommand.uniformMap.u_lineWidth=function(){return a._lineWidth},this._scanCommand.uniformMap.u_ScanColor=function(){return a._color}}var l=this._fbo,u=e$2e(l)&&l.getColorTexture(0)||void 0;if(!e$2e(u)||u.width!==r||u.height!==o){this._fbo=this._fbo&&this._fbo.destroy(),this._fbo=new t$V({context:e,colorTextures:[new t$U({context:e,width:r,height:o})]}),this._scanCommand.framebuffer=this._fbo;var c=G$j;c.width=r,c.height=o;var h=d$1m.fromCache({viewport:c});this._scanCommand.renderState=h}this._upSamplePassState.context=e},h$i.prototype.setInputFBO=function(e){this._inputFbo=e},h$i.prototype.getScanTexture=function(){return this._fbo.getColorTexture(0)},h$i.prototype.getScanFBO=function(){return this._fbo},h$i.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2e(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?j$h(n,t):Q$c(n,t),i.shaderProgram.destroy(),i.shaderProgram=r$14.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}},h$i.prototype.add=function(e){if(e$2e(e))return 0===this._scanCenterArr.length?void(this.centerPosition=o$1p.clone(e)):(this.changeProgramDefine(!1,"COUNT "+this._scanCenterArr.length),this._scanCenterArr.push(e),this._scanViewCenterArr.push(new o$1p),this.changeProgramDefine(!0,"COUNT "+this._scanCenterArr.length),this.computeDefaultMoveDir(this._scanCenterArr.length-1),this._scanCenterArr.length-1)},h$i.prototype.remove=function(e){e>=this._scanCenterArr.length||1===this._scanCenterArr.length||(this.changeProgramDefine(!1,"COUNT "+this._scanCenterArr.length),this._scanCenterArr.splice(e,1),this._scanViewCenterArr.splice(e,1),this._scanLineMoveDirArr.splice(e,1),this.changeProgramDefine(!0,"COUNT "+this._scanCenterArr.length))},h$i.prototype.isDestroyed=function(){return!1},h$i.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._scanCommand=this._scanCommand&&this._scanCommand.shaderProgram&&this._scanCommand.shaderProgram.destroy(),e$2e(this._appendTexture)&&(this._appendTexture.destroy(),this._appendTexture=null),i$11(this)};var I$j="#define AA_SAMPLES 9\n#define AA_CLAMP 1\n#define AA_CLIP 0\n#define SHARPEN 1\nuniform sampler2D u_currentTexture;\nuniform sampler2D u_historyTexture;\nuniform mat4 u_transformMatrix;\nuniform vec2 u_jitter;\nuniform float u_sampleSpatialWeight[AA_SAMPLES];\nuniform vec2 u_offsets3x3[AA_SAMPLES];\nvarying vec2 v_textureCoordinates;\n\nvec3 RGB2YCoCgR(vec3 rgbColor){\n float Y = dot(rgbColor, vec3(1.0, 2.0, 1.0));\n float Co = dot(rgbColor, vec3(2.0, 0.0, -2.0));\n float Cg = dot(rgbColor, vec3(-1.0, 2.0, -1.0));\n vec3 YCoCgRColor = vec3(Y, Co, Cg);\n return YCoCgRColor;\n}\n\nvec3 YCoCgR2RGB(vec3 YCoCgRColor){\n float Y = YCoCgRColor.x * 0.25;\n float Co = YCoCgRColor.y * 0.25;\n float Cg = YCoCgRColor.z * 0.25;\n float R = Y + Co - Cg;\n float G = Y + Cg;\n float B = Y - Co - Cg;\n vec3 rgbColor = vec3(R, G, B);\n return rgbColor;\n}\n\nfloat Luminance(vec3 color){\n return color.r;\n}\n\nvec3 ToneMap(vec3 color){\n return color / (1.0 + Luminance(color));\n}\n\nvec3 UnToneMap(vec3 color){\n return color / (1.0 - Luminance(color));\n}\n\nvec3 GetNeighorhoodSamp(vec2 offset, vec2 uv){\n float fx = offset.x;\n float fy = offset.y;\n vec2 sampleOffset = vec2(fx / czm_viewport.z, fy / czm_viewport.w);\n vec2 sampleUV = uv + sampleOffset;\n sampleUV = clamp(sampleUV, 0.0, 1.0);\n vec3 neighorhoodSamp = texture2D(u_currentTexture, sampleUV).rgb;\n neighorhoodSamp = max(neighorhoodSamp, 0.0);\n neighorhoodSamp = ToneMap(neighorhoodSamp);\n neighorhoodSamp = RGB2YCoCgR(neighorhoodSamp);\n return neighorhoodSamp;\n}\nfloat HdrWeightY(float Color){\n float exposure = 1.0;\n return 1.0 / (Color * exposure + 4.0);\n}\n// Get the Luma4 of the sceneColor\nfloat GetSceneColorLuma4(vec3 SceneColor){\n // AA_YCOCG\n return SceneColor.x;\n}\n// Get the HDR weight of the transform scene color.\nfloat GetSceneColorHdrWeight(vec3 SceneColor)\n{\n //#if AA_YCOCG\n return HdrWeightY(SceneColor.x);\n}\nvec2 WeightedLerpFactors(float WeightA, float WeightB, float Blend)\n{\n float BlendA = (1.0 - Blend) * WeightA;\n float BlendB = Blend * WeightB;\n float RcpBlend = 1.0 / (BlendA + BlendB);\n BlendA *= RcpBlend;\n BlendB *= RcpBlend;\n return vec2(BlendA, BlendB);\n}\n// Compute the neighborhood bounding box used to reject history.\nvoid ComputeNeighborhoodBoundingbox(in vec3 Neighbors[AA_SAMPLES], out vec3 OutNeighborMin, out vec3 OutNeighborMax)\n{\n vec3 NeighborMin;\n vec3 NeighborMax;\n NeighborMin = min( min(Neighbors[1], Neighbors[3]), Neighbors[4] );\n NeighborMin = min( min(NeighborMin, Neighbors[5]), Neighbors[7] );\n NeighborMax = max( max(Neighbors[1], Neighbors[3]), Neighbors[4] );\n NeighborMax = max( max(NeighborMax, Neighbors[5]), Neighbors[7] );\n\tvec3 NeighborMinPlus = NeighborMin;\n vec3 NeighborMaxPlus = NeighborMax;\n NeighborMin = min( min(NeighborMin, Neighbors[0]), Neighbors[2] );\n NeighborMin = min( min(NeighborMin, Neighbors[6]), Neighbors[8] );\n NeighborMax = max( max(NeighborMax, Neighbors[0]), Neighbors[2] );\n NeighborMax = max( max(NeighborMax, Neighbors[6]), Neighbors[8] );\n //if( AA_ROUND )\n// {\n// NeighborMin = NeighborMin * 0.5 + NeighborMinPlus * 0.5;\n// NeighborMax = NeighborMax * 0.5 + NeighborMaxPlus * 0.5;\n// }\n OutNeighborMin = NeighborMin;\n OutNeighborMax = NeighborMax;\n}\n// Intersect ray with AABB, knowing there is an intersection.\n// Dir = Ray direction.\n// Org = Start of the ray.\n// Box = Box is at {0,0,0} with this size.\n// Returns distance on line segment.\nfloat IntersectAABB(vec3 Dir, vec3 Org, vec3 Box){\n vec3 RcpDir = vec3(1.0 / Dir.x, 1.0 / Dir.y, 1.0 / Dir.z);\n vec3 TNeg = ( Box - Org) * RcpDir;\n vec3 TPos = ((-Box) - Org) * RcpDir;\n return max(max(min(TNeg.x, TPos.x), min(TNeg.y, TPos.y)), min(TNeg.z, TPos.z));\n}\nfloat HistoryClip(vec3 History, vec3 Filtered, vec3 NeighborMin, vec3 NeighborMax){\n#if 0\n vec3 Min = min(Filtered, min(NeighborMin, NeighborMax));\n vec3 Max = max(Filtered, max(NeighborMin, NeighborMax));\n vec3 Avg2 = Max + Min;\n vec3 Dir = Filtered - History;\n vec3 Org = History - Avg2 * 0.5;\n vec3 Scale = Max - Avg2 * 0.5;\n return clamp(IntersectAABB(Dir, Org, Scale), 0.0, 1.0);\n#else\n vec3 BoxMin = NeighborMin;\n vec3 BoxMax = NeighborMax;\n vec3 RayOrigin = History;\n vec3 RayDir = Filtered - History;\n RayDir = all(lessThanEqual(abs(RayDir), vec3(1.0/65536.0))) ? vec3(1.0/65536.0) : RayDir;\n vec3 InvRayDir = vec3( 1.0 / RayDir.x, 1.0 / RayDir.y, 1.0 / RayDir.z );\n vec3 MinIntersect = (BoxMin - RayOrigin) * InvRayDir;\n vec3 MaxIntersect = (BoxMax - RayOrigin) * InvRayDir;\n vec3 EnterIntersect = min( MinIntersect, MaxIntersect );\n return max( max(EnterIntersect.x, EnterIntersect.y), EnterIntersect.z );\n#endif\n}\n// Clamp history.\nvec3 ClampHistory(vec3 Filtered, vec3 History, vec3 NeighborMin, vec3 NeighborMax)\n{\n#if !AA_CLAMP\n return History;\n#elif AA_CLIP\n // Clip history, this uses color AABB intersection for tighter fit.\n vec3 TargetColor = Filtered;\n vec3 HistoryColor = History;\n float ClipBlend = HistoryClip( HistoryColor.rgb, TargetColor.rgb, NeighborMin.rgb, NeighborMax.rgb );\n //float DistToClamp = saturate(-ClipBlend) / ( saturate(-ClipBlend) + 1 );\n //float DistToClamp = abs( ClipBlend ) / ( 1 - ClipBlend );\n ClipBlend = clamp( ClipBlend, 0.0, 1.0 );\n HistoryColor = mix( HistoryColor, TargetColor, ClipBlend );\n return HistoryColor;\n#else //!AA_CLIP \n History = clamp(History, NeighborMin, NeighborMax);\n return History;\n#endif\n}\n\n// Filter input pixels.\nvec3 FilterCurrentFrameInputSamples(in vec2 uv, inout vec3 neighborhood[AA_SAMPLES]){\n for(int i = 0; i < AA_SAMPLES; i++){\n neighborhood[i] = GetNeighorhoodSamp(u_offsets3x3[i], uv);\n }\n float totalWeight = 0.0;\n vec3 sum = vec3(0.0);\n for(int i = 0; i < AA_SAMPLES; i++){\n float neighborhoodHdrWeight = GetSceneColorHdrWeight(neighborhood[i]);\n float neighborhoodFinalWeight = neighborhoodHdrWeight * u_sampleSpatialWeight[i];\n //float neighborhoodFinalWeight = neighborhoodHdrWeight;\n totalWeight += neighborhoodFinalWeight;\n sum += neighborhood[i] * neighborhoodFinalWeight;\n }\n vec3 filtered = sum / totalWeight;\n return filtered;\n}\nvoid main()\n{\n float HistoryBlur = 0.0;\n vec2 jitteredUV = v_textureCoordinates + u_jitter;\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n vec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\n viewPos /= viewPos.w;\n vec4 histroyUV = u_transformMatrix * viewPos;\n histroyUV = histroyUV / histroyUV.w;\n histroyUV.xy = histroyUV.xy * 0.5 + 0.5;\n histroyUV.xy = histroyUV.xy + u_jitter;\n vec3 prevColor = texture2D(u_historyTexture, histroyUV.xy).rgb;\n prevColor = ToneMap(prevColor);\n prevColor = RGB2YCoCgR(prevColor);\n vec3 neighborhood[AA_SAMPLES];\n vec3 filtered = FilterCurrentFrameInputSamples(jitteredUV, neighborhood);\n // Compute neighborhood bounding box.\n vec3 NeighborMin;\n vec3 NeighborMax;\n ComputeNeighborhoodBoundingbox(neighborhood, NeighborMin, NeighborMax);\n // Save off luma of history before the clamp.\n float LumaMin = GetSceneColorLuma4(NeighborMin);\n float LumaMax = GetSceneColorLuma4(NeighborMax);\n float LumaHistory = GetSceneColorLuma4(prevColor);\n prevColor = ClampHistory(filtered, prevColor, NeighborMin, NeighborMax);\n float BlendFinal = 0.04;\n // DO FINAL BLEND BETWEEN HISTORY AND FILTERED COLOR\n // -------------------------------------------------\n // Luma weighted blend\n float FilterWeight = GetSceneColorHdrWeight(filtered);\n float HistoryWeight = GetSceneColorHdrWeight(prevColor);\n vec2 Weights = WeightedLerpFactors(HistoryWeight, FilterWeight, BlendFinal);\n vec3 color = prevColor * Weights.x + filtered * Weights.y;\n color = YCoCgR2RGB(color);\n color = UnToneMap(color);\n gl_FragColor.rgb = color;\n gl_FragColor.a = 1.0;\n}",C$i=8,D$f=[0,-.5,.5,-3/4,1/4,-1/4,3/4,-7/8],W$i=[-1/3,1/3,-7/9,-1/9,5/9,-5/9,1/9,7/9],g$o=[new o$1o(-1,-1),new o$1o(0,-1),new o$1o(1,-1),new o$1o(-1,0),new o$1o(0,0),new o$1o(1,0),new o$1o(-1,1),new o$1o(0,1),new o$1o(1,1)];function a$e(){this._compositeCommand=void 0,this._histroyFBO=[],this._upSamplePassState=new n$$,this._show=!1,this._fbo=void 0,this._fboIndex=0,this._uniformState=void 0,this._prevViewProjectionMatrx=new p$1d,this._transformMatrix=new p$1d,this._frameIndex=0,this._jitterPixel=new o$1o,this._jitterUVOffset=new o$1o,this._sampleWeights=[],this._plusWeights=[]}Object.defineProperties(a$e.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e)}}}),a$e.prototype.execute=function(e,t){!e$2e(e.uniformState)||!e$2e(e.uniformState.globeDepthTexture)||(this._compositeCommand.framebuffer=this._histroyFBO[this._fboIndex],this._compositeCommand.execute(e,this._upSamplePassState),this._frameIndex++,this._frameIndex===C$i&&(this._frameIndex=0))};var L$k=new f$1a;a$e.prototype.update=function(e,t,i,n){var r=n.useLogDepth,o=(e=t.context).uniformState;this._uniformState=o,o.viewProjection.clone(this._prevViewProjectionMatrx);var a=e.drawingBufferWidth,s=e.drawingBufferHeight;this._scene=i,e$2e(this._compositeCommand)&&r!==this._useLogDepth&&(this._useLogDepth=r,this.changeProgramDefine(r,"LOG_DEPTH")),e$2e(this._compositeCommand)||this.createCommand(e);var l=!1;if(0==this._histroyFBO.length)l=!0;else{var u=this._histroyFBO[0],c=e$2e(u)&&u.getColorTexture(0)||void 0;(!e$2e(c)||c.width!==a||c.height!==s)&&(l=!0)}if(l){this.createFBO(a,s,e);var h=L$k;h.width=a,h.height=s;var d=d$1m.fromCache({viewport:h});this._compositeCommand.renderState=d}this._upSamplePassState.context=e,this._fboIndex=(this._fboIndex+1)%2,n.jitterIndex=this._frameIndex,V$g(this,n,a,s),U$h(this)};var l$j=new o$1o;function V$g(e,t,i,n){var r=e._frameIndex%C$i,o=D$f[r],a=W$i[r],s=.47,l=Math.exp(-.565866908103214),u=2*Math.PI*a,c=s*Math.sqrt(-2*Math.log((1-o)*l+o)),h=c*Math.cos(u),d=c*Math.sin(u);e._jitterPixel.x=h,e._jitterPixel.y=d;var f=e._jitterPixel.x/i,p=e._jitterPixel.y/n;l$j.x=f,l$j.y=p,t.jitter=l$j,e._jitterUVOffset.x=-f/2,e._jitterUVOffset.y=-p/2}function U$h(e){var t,i,n=[],r=[],o=0;for(i=0;i<9;i++){var a=g$o[i].x-e._jitterPixel.x,s=g$o[i].y-e._jitterPixel.y;n[i]=Math.exp(-2.29*(a*a+s*s)),o+=n[i]}for(r[0]=n[1],r[1]=n[3],r[2]=n[4],r[3]=n[5],r[4]=n[7],t=n[1]+n[3]+n[4]+n[5]+n[7],i=0;i<9;i++)n[i]=n[i]/o;for(i=0;i<5;i++)r[i]=r[i]/t;e._sampleWeights=n,e._plusWeights=r}function H$m(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function R$i(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}a$e.prototype.createFBO=function(e,t,i){var n,r=_$_.FLOAT;for(n=0;n<this._histroyFBO.length;n++)this._histroyFBO[n].destroy();for(this._histroyFBO=[],n=0;n<2;n++){var o=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t,pixelDatatype:r})]});this._histroyFBO.push(o)}},a$e.prototype.createCommand=function(e){var t=new s$V({name:"TAAComposite",sources:[I$j]});this._useLogDepth&&t.defines.push("LOG_DEPTH"),this._compositeCommand=e.createViewportQuadCommand(t,{uniformMap:{},owner:this}),this.createUniformMap()},a$e.prototype.createUniformMap=function(){if(e$2e(this._compositeCommand)){var e=this;this._compositeCommand.uniformMap.u_currentTexture=function(){return e._fbo.getColorTexture(0)},this._compositeCommand.uniformMap.u_historyTexture=function(){var t=(e._fboIndex+1)%2;return e._histroyFBO[t].getColorTexture(0)},this._compositeCommand.uniformMap.u_transformMatrix=function(){var t=e._uniformState.inverseView3D;return p$1d.multiply(e._prevViewProjectionMatrx,t,e._transformMatrix),e._transformMatrix},this._compositeCommand.uniformMap.u_jitter=function(){return e._jitterUVOffset},this._compositeCommand.uniformMap.u_sampleSpatialWeight=function(){return e._sampleWeights},this._compositeCommand.uniformMap.u_offsets3x3=function(){return g$o}}},a$e.prototype.setInputFBO=function(e){this._fbo=e},a$e.prototype.getTAATexture=function(){return this._histroyFBO[this._fboIndex].getColorTexture(0)},a$e.prototype.getOutputFBO=function(){return this._histroyFBO[this._fboIndex]},a$e.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2e(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?H$m(n,t):R$i(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n})}},a$e.prototype.isDestroyed=function(){return!1},a$e.prototype.destroy=function(){for(var e=0;e<this._histroyFBO.length;e++)this._histroyFBO[e].destroy();return this._compositeCommand=this._compositeCommand&&this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy(),i$11(this)};var u$g={BLOOM:"BLOOM",COLOR_CORRECTION:"COLOR_CORRECTION",SCAN:"SCAN",SSAO:"SSAO",TONEMAPPING:"TONEMAPPING",ACES_TONEMAPPING:"ACES_TONEMAPPING",FILMIC_TONEMAPPING:"FILMIC_TONEMAPPING"};function o$m(e){this._fbo=void 0,this._blendCommand=void 0,this._fullScreenCommand=void 0,this._upSamplePassState=new n$$,this.bloomEffect=void 0,this.colorCorrection=void 0,this.context=e,this.show=!1,this.bloomEffect=new e$g,this.colorCorrection=new o$o(e),this.depthOfFieldEffect=new n$g,this.SSAOEffect=new a$f,this.scanEffect=new h$i,this.temporalAA=new a$e,this.bloomEffect._owner=this,this.colorCorrection._owner=this,this.scanEffect._owner=this,this.SSAOEffect._owner=this,this.exposure=1,this.toneMappingWhitePoint=11.2,this._toneMappingEnabled=!1,this.inputTexture=void 0,this._outputFbo=void 0}Object.defineProperties(o$m.prototype,{toneMappingEnabled:{get:function(){return this._toneMappingEnabled},set:function(e){e!==this._toneMappingEnabled&&(this.toneMappingEnabledChange(e),this._toneMappingEnabled=e)}},outputFbo:{get:function(){return this._outputFbo},set:function(e){this._outputFbo=e}}}),o$m.prototype.isEnable=function(){return this.isTAAEnable()||this.isBloomEnable()||this.isColorCorrectionEnable()||this.isDOFEnable()||this.isScanEnable()||this.isSSAOEnable()||this._toneMappingEnabled},o$m.prototype.isBloomEnable=function(){return e$2e(this.bloomEffect)&&this.bloomEffect.show},o$m.prototype.isColorCorrectionEnable=function(){return e$2e(this.colorCorrection)&&this.colorCorrection.show},o$m.prototype.isDOFEnable=function(){return e$2e(this.depthOfFieldEffect)&&this.depthOfFieldEffect.show},o$m.prototype.isSSAOEnable=function(){return e$2e(this.SSAOEffect)&&this.SSAOEffect.show},o$m.prototype.isScanEnable=function(){return e$2e(this.scanEffect)&&this.scanEffect.show},o$m.prototype.isTAAEnable=function(){return e$2e(this.temporalAA)&&this.temporalAA.show},o$m.prototype.clear=function(e,t){this.isBloomEnable()&&this.bloomEffect.clear(e,t)},o$m.prototype.copy=function(e,t){this.inputTexture=t,this._fullScreenCommand.framebuffer=this._fbo,this._fullScreenCommand.execute(e),this.inputTexture=void 0},o$m.prototype.execute=function(e,t){this.isTAAEnable()&&this.temporalAA.execute(e),this.isDOFEnable()&&this.depthOfFieldEffect.execute(e),this.isScanEnable()&&this.scanEffect.execute(e),this.isBloomEnable()&&this.bloomEffect.execute(e,t),this.isSSAOEnable()&&this.SSAOEffect.execute(e,t),this.isEnable()&&(this._fullScreenCommand.framebuffer=t,this._blendCommand.framebuffer=t,this._fullScreenCommand.execute(e),this._blendCommand.execute(e,this._upSamplePassState))};var j$g=new f$1a;function k$d(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function z$h(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function a$d(e,t){var i,n=t.terrainProvider,r=t.mapProjection,o=r.ellipsoid,a=t.camera.getRectangleCameraCoordinates(e);return i=t.mode===C$14.SCENE3D?o.cartesianToCartographic(a):r.unproject(a),e$2e(n)?n.readyPromise.then((function(){if(!e$2e(n.availability)||t.mode===C$14.SCENE2D)return i;var r=[h$18.center(e),h$18.southeast(e),h$18.southwest(e),h$18.northeast(e),h$18.northwest(e)];return a$d._sampleTerrainMostDetailed(n,r).then((function(e){var t=e.reduce((function(e,t){return Math.max(t.height,e)}),-Number.MAX_VALUE),n=i;return n.height+=isNaN(t)?0:t,n}))})):o$1l.resolve(i)}o$m.prototype.update=function(e,t,i,n){var r=n.useLogDepth;this.isTAAEnable()&&this.temporalAA.update(e,t,i,n),this.isDOFEnable()&&this.depthOfFieldEffect.update(e,t,i,r),this.isScanEnable()&&this.scanEffect.update(e,t,i,r),this.isBloomEnable()&&this.bloomEffect.update(e,t,i),this.isSSAOEnable()&&this.SSAOEffect.update(e,t,i,r);var o=(e=t.context).drawingBufferWidth,a=e.drawingBufferHeight;if(!e$2e(this._blendCommand)){var s=new s$V({name:"CompositorFP",sources:[v$h]});this.isScanEnable()&&s.defines.push(u$g.SCAN),this.isBloomEnable()&&s.defines.push(u$g.BLOOM),this.isColorCorrectionEnable()&&s.defines.push(u$g.COLOR_CORRECTION),this.isSSAOEnable()&&s.defines.push(u$g.SSAO),this._toneMappingEnabled&&s.defines.push(u$g.TONEMAPPING);var l={};this._blendCommand=e.createViewportQuadCommand(s,{shaderProgramName:"compositorBlend",uniformMap:l,owner:this}),l={},this._fullScreenCommand=e.createViewportQuadCommand(I$k,{shaderProgramName:"compositorFullScreen",uniformMap:l,owner:this})}var u=this._fbo,c=e$2e(u)&&u.getColorTexture(0)||void 0;if(!e$2e(c)||c.width!==o||c.height!==a){u=u&&u.destroy();var h=[new t$U({context:e,width:o,height:a,pixelDatatype:e.colorBufferHalfFloat?_$_.HALF_FLOAT:_$_.FLOAT})];u=e.depthTexture?this._fbo=new t$V({context:e,colorTextures:h,depthTexture:new t$U({context:e,width:o,height:a,pixelFormat:V$12.DEPTH_COMPONENT,pixelDatatype:_$_.UNSIGNED_SHORT})}):this._fbo=new t$V({context:e,colorTextures:h,depthRenderbuffer:new r$10({context:e,format:M$13.DEPTH_COMPONENT16})});var d=j$g;d.width=o,d.height=a;var f=d$1m.fromCache({viewport:d}),p=this;this._blendCommand.uniformMap.u_texture0=function(){return p.isTAAEnable()?p.temporalAA.getTAATexture():p.isDOFEnable()?p.depthOfFieldEffect.getDOFTexture():p.isScanEnable()?p.scanEffect.getScanTexture():u.getColorTexture(0)},this._blendCommand.uniformMap.u_ScanColor=function(){return p.scanEffect.color},this._blendCommand.uniformMap.u_BloomTexture=function(){return p.bloomEffect.getBloomTexture()},this._blendCommand.uniformMap.u_Bloom_DirtTex=function(){return p.bloomEffect.getBloomDirtTexture()},this._blendCommand.uniformMap.u_BloomTex_TexelSize=function(){return p.bloomEffect.getBloomTextureTexelSize()},this._blendCommand.uniformMap.u_Bloom_DirtTileOffset=function(){return p.bloomEffect.getDirtTileOffset()},this._blendCommand.uniformMap.u_Bloom_Settings=function(){return p.bloomEffect.getBloomSettings()},this._blendCommand.uniformMap.u_Bloom_Color=function(){return p.bloomEffect.getBloomColor()},this._blendCommand.uniformMap.u_AmbientOcclusionTexture=function(){return p.SSAOEffect.getAmbientOcclusionTexture()},this._blendCommand.uniformMap.u_brightness=function(){return p.colorCorrection.brightness},this._blendCommand.uniformMap.u_contrast=function(){return p.colorCorrection.contrast},this._blendCommand.uniformMap.u_saturation=function(){return p.colorCorrection.saturation},this._blendCommand.uniformMap.u_hue=function(){return p.colorCorrection.hue},this._blendCommand.uniformMap.u_exposure=function(){return p.exposure},this._blendCommand.uniformMap.u_toneMappingWhitePoint=function(){return p.toneMappingWhitePoint},this._blendCommand.renderState=f,this._fullScreenCommand.uniformMap.u_texture=function(){return u$Z(p.inputTexture,u.getColorTexture(0))},this._fullScreenCommand.renderState=f}return this.temporalAA.setInputFBO(u),this.isTAAEnable()&&(u=this.temporalAA.getOutputFBO()),this.depthOfFieldEffect.setInputFBO(u),this.SSAOEffect.setInputFBO(u),this.bloomEffect.setInputFBO(u),this.scanEffect.setInputFBO(u),this._upSamplePassState.context=e,this._fbo},o$m.prototype.getColorFramebuffer=function(){return this._fbo},o$m.prototype.isDestroyed=function(){return!1},o$m.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._blendCommand=this._blendCommand&&this._blendCommand.shaderProgram&&this._blendCommand.shaderProgram.destroy(),this._fullScreenCommand=this._fullScreenCommand&&this._fullScreenCommand.shaderProgram&&this._fullScreenCommand.shaderProgram.destroy(),e$2e(this.bloomEffect)&&(this.bloomEffect.destroy(),this.bloomEffect=null),e$2e(this.colorCorrection)&&(this.colorCorrection.destroy(),this.colorCorrection=null),e$2e(this.SSAOEffect)&&(this.SSAOEffect.destroy(),this.SSAOEffect=null),e$2e(this.DepthOfFieldEffect)&&(this.DepthOfFieldEffect.destroy(),this.DepthOfFieldEffect=null),e$2e(this.ScanEffect)&&(this.ScanEffect.destroy(),this.ScanEffect=null),e$2e(this.temporalAA)&&(this.temporalAA.destroy(),this.temporalAA=null),i$11(this)},o$m.prototype.scanShowChange=function(e){this.changeProgramDefine(e,u$g.SCAN)},o$m.prototype.bloomShowChange=function(e){this.changeProgramDefine(e,u$g.BLOOM)},o$m.prototype.colorCorrectionShowChange=function(e){this.changeProgramDefine(e,u$g.COLOR_CORRECTION)},o$m.prototype.ssaoShowChange=function(e){this.changeProgramDefine(e,u$g.SSAO)},o$m.prototype.toneMappingEnabledChange=function(e){this.changeProgramDefine(e,u$g.TONEMAPPING)},o$m.prototype.changeProgramDefine=function(e,t){var i=this._blendCommand;if(e$2e(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?k$d(n,t):z$h(n,t),i.shaderProgram.destroy(),i.shaderProgram=r$14.fromCache({context:this.context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}},a$d._sampleTerrainMostDetailed=y$B;var e$c={DESIGN:0,NORMAL:1},vi$2=Object.freeze(e$c),W$h=/{[^}]+}/g,X$c={x:Q$b,y:ee$a,z:ie$6,s:ne$9,reverseX:$$d,reverseY:te$9,reverseZ:re$a,westDegrees:ae$8,southDegrees:oe$8,eastDegrees:ue$9,northDegrees:se$6,westProjected:ce$b,southProjected:le$b,eastProjected:he$8,northProjected:de$6,width:fe$8,height:me$b},J$a=p$19(X$c,{i:ge$9,j:ve$6,reverseI:_e$6,reverseJ:ye$5,longitudeDegrees:we$5,latitudeDegrees:pe$a,longitudeProjected:Te$6,latitudeProjected:Se$6,format:De$7});function _$g(e){if(!e$2e(e))throw new t$15("options is required.");if(!o$1l.isPromise(e)&&!e$2e(e.url))throw new t$15("options is required.");this._errorEvent=new o$1h,this._resource=void 0,this._urlSchemeZeroPadding=void 0,this._pickFeaturesResource=void 0,this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._minimumLevel=void 0,this._tilingScheme=void 0,this._rectangle=void 0,this._tileDiscardPolicy=void 0,this._credit=void 0,this._hasAlphaChannel=void 0,this._readyPromise=void 0,this._tags=void 0,this._pickFeaturesTags=void 0,this.enablePickFeatures=!0,this.reinitialize(e)}function K$b(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(_$g.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this.ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this.ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this.ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this.ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){if(!this.ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this.ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this.ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return e$2e(this._resource)}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){if(!this.ready)throw new t$15("credit must not be called before the imagery provider is ready.");return this._credit}},hasAlphaChannel:{get:function(){if(!this.ready)throw new t$15("hasAlphaChannel must not be called before the imagery provider is ready.");return this._hasAlphaChannel}}}),_$g.prototype.reinitialize=function(e){var t=this;t._readyPromise=o$1l(e).then((function(i){if(!e$2e(i))throw new t$15("options is required.");if(!e$2e(i.url))throw new t$15("options.url is required.");t._baseUrl=e.baseUrl;var n=i.customTags,r=p$19(X$c,n),o=p$19(J$a,n),a=t$10.createIfNeeded(i.url),s=t$10.createIfNeeded(i.pickFeaturesUrl);t.enablePickFeatures=u$Z(i.enablePickFeatures,t.enablePickFeatures),t._urlSchemeZeroPadding=u$Z(i.urlSchemeZeroPadding,t.urlSchemeZeroPadding),t._tileDiscardPolicy=i.tileDiscardPolicy,t._getFeatureInfoFormats=i.getFeatureInfoFormats,t._subdomains=i.subdomains,Array.isArray(t._subdomains)?t._subdomains=t._subdomains.slice():e$2e(t._subdomains)&&t._subdomains.length>0?t._subdomains=t._subdomains.split(""):t._subdomains=["a","b","c"],t._tileWidth=u$Z(i.tileWidth,256),t._tileHeight=u$Z(i.tileHeight,256),t._minimumLevel=u$Z(i.minimumLevel,0),t._maximumLevel=i.maximumLevel,t._tilingScheme=u$Z(i.tilingScheme,new c$S({ellipsoid:i.ellipsoid})),t._rectangle=u$Z(i.rectangle,t._tilingScheme.rectangle),t._rectangle=h$18.intersection(t._rectangle,t._tilingScheme.rectangle),t._hasAlphaChannel=u$Z(i.hasAlphaChannel,!0);var l=i.credit;"string"==typeof l&&(l=new r$U(l)),t._credit=l,t._resource=a,t._tags=r,t._pickFeaturesResource=s,t._pickFeaturesTags=o;var u=i.url;return t.tablename=i.url,new l$14({name:u}).then((function(e){e.checkObjectStoreExit(t.tablename)?t._indexedDBScheduler=e:e.createObjectStore(t.tablename).then((function(){t._indexedDBScheduler=e}))})),t._indexedDBSetting={isOpen:!1,clear:function(){t._indexedDBScheduler.clear(t.tablename)},cache:[]},!0}))},_$g.prototype.getTileCredits=function(e,t,i){if(!this.ready)throw new t$15("getTileCredits must not be called before the imagery provider is ready.")},_$g.prototype.requestImage=function(e,t,i,n){if(!this.ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=M$j(this,e,t,i,n);if(e$2e(a$O.CREDENTIAL)&&(e$2e(a$O.CREDENTIAL._keymap[this._baseUrl])?r.url=a$O.addTokenWithKey(this._baseUrl,r.url):r.url=a$O.addToken(r.url)),e$2e(this._customRequestHeaders)&&(r.headers=p$19(r.headers,this._customRequestHeaders)),n.quadKey=K$b(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(e$2e(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2e(o)?o$1l(o,(function(e){return e$2e(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$i.loadImage(this,r)}return e$i.loadImage(this,r)}return e$i.loadImage(this,r)},_$g.prototype.pickFeatures=function(e,t,i,n,r){if(!this.ready)throw new t$15("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures&&e$2e(this._pickFeaturesResource)&&0!==this._getFeatureInfoFormats.length){var o=0,a=this;return function l(){if(o>=a._getFeatureInfoFormats.length)return o$1l([]);var u=a._getFeatureInfoFormats[o],c=G$i(a,e,t,i,n,r,u.format);return++o,"json"===u.type?c.fetchJson().then(u.callback).otherwise(l):"xml"===u.type?c.fetchXML().then(u.callback).otherwise(l):"text"===u.type||"html"===u.type?c.fetchText().then(u.callback).otherwise(l):c.fetch({responseType:u.format}).then(s.bind(void 0,u)).otherwise(l)}()}function s(e,t){return e.callback(t)}};var P$j=!1,f$k=new h$18,F$e=!1,p$f=new h$18;function M$j(e,t,i,n,r){P$j=!1,F$e=!1;var o=e._resource,a=o.getUrlComponent(!0),s=e._tags,l={},u=a.match(W$h);return e$2e(u)&&u.forEach((function(r){var o=r.substring(1,r.length-1);e$2e(s[o])&&(l[o]=s[o](e,t,i,n))})),o.getDerivedResource({request:r,templateValues:l})}var E$i=!1,y$g=new o$1o,Z$f=!1;function G$i(e,t,i,n,r,o,a){P$j=!1,F$e=!1,E$i=!1,Z$f=!1;var s=e._pickFeaturesResource,l=s.getUrlComponent(!0),u=e._pickFeaturesTags,c={},h=l.match(W$h);return e$2e(h)&&h.forEach((function(s){var l=s.substring(1,s.length-1);e$2e(u[l])&&(c[l]=u[l](e,t,i,n,r,o,a))})),s.getDerivedResource({templateValues:c})}function b$n(e,t,i){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){var n=e.urlSchemeZeroPadding[t];if("string"==typeof n){var r=n.length;r>1&&(i=i.length>=r?i:new Array(r-i.toString().length+1).join("0")+i)}}return i}function Q$b(e,t,i,n){return b$n(e,"{x}",t)}function $$d(e,t,i,n){var r=e.tilingScheme.getNumberOfXTilesAtLevel(n)-t-1;return b$n(e,"{reverseX}",r)}function ee$a(e,t,i,n){return b$n(e,"{y}",i)}function te$9(e,t,i,n){var r=e.tilingScheme.getNumberOfYTilesAtLevel(n)-i-1;return b$n(e,"{reverseY}",r)}function re$a(e,t,i,n){var r=e.maximumLevel;return b$n(e,"{reverseZ}",e$2e(r)&&n<r?r-n-1:n)}function ie$6(e,t,i,n){return b$n(e,"{z}",n)}function ne$9(e,t,i,n){var r=(t+i+n)%e._subdomains.length;return e._subdomains[r]}function j$f(e,t,i,n){P$j||(e.tilingScheme.tileXYToRectangle(t,i,n,f$k),f$k.west=e$2d.toDegrees(f$k.west),f$k.south=e$2d.toDegrees(f$k.south),f$k.east=e$2d.toDegrees(f$k.east),f$k.north=e$2d.toDegrees(f$k.north),P$j=!0)}function ae$8(e,t,i,n){return j$f(e,t,i,n),f$k.west}function oe$8(e,t,i,n){return j$f(e,t,i,n),f$k.south}function ue$9(e,t,i,n){return j$f(e,t,i,n),f$k.east}function se$6(e,t,i,n){return j$f(e,t,i,n),f$k.north}function k$c(e,t,i,n){F$e||(e.tilingScheme.tileXYToNativeRectangle(t,i,n,p$f),F$e=!0)}function ce$b(e,t,i,n){return k$c(e,t,i,n),p$f.west}function le$b(e,t,i,n){return k$c(e,t,i,n),p$f.south}function he$8(e,t,i,n){return k$c(e,t,i,n),p$f.east}function de$6(e,t,i,n){return k$c(e,t,i,n),p$f.north}function fe$8(e,t,i,n){return e.tileWidth}function me$b(e,t,i,n){return e.tileHeight}function ge$9(e,t,i,n,r,o,a){return I$i(e,t,i,n,r,o),y$g.x}function ve$6(e,t,i,n,r,o,a){return I$i(e,t,i,n,r,o),y$g.y}function _e$6(e,t,i,n,r,o,a){return I$i(e,t,i,n,r,o),e.tileWidth-y$g.x-1}function ye$5(e,t,i,n,r,o,a){return I$i(e,t,i,n,r,o),e.tileHeight-y$g.y-1}var be$7=new h$18,w$i=new o$1p;function I$i(e,t,i,n,r,o,a){if(!E$i){A$k(e,t,i,n,r,o);var s=w$i,l=e.tilingScheme.tileXYToNativeRectangle(t,i,n,be$7);y$g.x=e.tileWidth*(s.x-l.west)/l.width|0,y$g.y=e.tileHeight*(l.north-s.y)/l.height|0,E$i=!0}}function we$5(e,t,i,n,r,o,a){return e$2d.toDegrees(r)}function pe$a(e,t,i,n,r,o,a){return e$2d.toDegrees(o)}function Te$6(e,t,i,n,r,o,a){return A$k(e,t,i,n,r,o),w$i.x}function Se$6(e,t,i,n,r,o,a){return A$k(e,t,i,n,r,o),w$i.y}var xe$5=new a$18;function A$k(e,t,i,n,r,o,a){if(!Z$f){if(e.tilingScheme instanceof c$S){var s=xe$5;s.longitude=r,s.latitude=o,e.tilingScheme.projection.project(s,w$i)}else w$i.x=e$2d.toDegrees(r),w$i.y=e$2d.toDegrees(o);Z$f=!0}}function De$7(e,t,i,n,r,o,a){return a}var y$f=new r$U("MapQuest, Open Street Map and contributors, CC-BY-SA");function L$j(e){e=u$Z(e,{});var t=u$Z(e.url,"https://a.tile.openstreetmap.org/");t=n$1a(t),t+="{z}/{x}/{y}."+u$Z(e.fileExtension,"png");var i=t$10.createIfNeeded(t),n=new c$S({ellipsoid:e.ellipsoid}),r=u$Z(e.minimumLevel,0),o=e.maximumLevel,a=u$Z(e.rectangle,n.rectangle),s=n.positionToTileXY(h$18.southwest(a),r),l=n.positionToTileXY(h$18.northeast(a),r),u=(Math.abs(l.x-s.x)+1)*(Math.abs(l.y-s.y)+1);if(u>4)throw new t$15("The rectangle and minimumLevel indicate that there are "+u+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");var c=u$Z(e.credit,y$f);return"string"==typeof c&&(c=new r$U(c)),new _$g({url:i,credit:c,tilingScheme:n,tileWidth:256,tileHeight:256,minimumLevel:r,maximumLevel:o,rectangle:a})}function y$e(e){var t=[],i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).geometry;if(!e$2e(i))throw new t$15("options.geometry is required.");(!e$2e(i.attributes)||!e$2e(i.primitiveType))&&(i=i.constructor.createGeometry(i));var n=i.attributes,r=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),o=u$Z(e.length,1e4);if(e$2e(n.normal)&&t.push(new d$1o({geometry:k$14.createLineSegmentsForVectors(i,"normal",o),attributes:{color:new o$16(1,0,0,1)},modelMatrix:r})),e$2e(n.tangent)&&t.push(new d$1o({geometry:k$14.createLineSegmentsForVectors(i,"tangent",o),attributes:{color:new o$16(0,1,0,1)},modelMatrix:r})),e$2e(n.bitangent)&&t.push(new d$1o({geometry:k$14.createLineSegmentsForVectors(i,"bitangent",o),attributes:{color:new o$16(0,0,1,1)},modelMatrix:r})),t.length>0)return new y$R({asynchronous:!1,geometryInstances:t,appearance:new t$Q({flat:!0,translucent:!1})})}function te$8(e){if(!e$2e((e=u$Z(e,{})).url))throw new t$15("options.url is required.");var t,i,n,r=o$1l.defer(),o=new _$g(r.promise);function a(a){for(var s,u,c,h=/tileformat/i,d=/tileset/i,f=/tilesets/i,p=/boundingbox/i,_=[],m=a.childNodes[0].childNodes,g=0;g<m.length;g++)if(h.test(m.item(g).nodeName))s=m.item(g);else if(f.test(m.item(g).nodeName)){c=m.item(g);for(var x=m.item(g).childNodes,y=0;y<x.length;y++)d.test(x.item(y).nodeName)&&_.push(x.item(y))}else p.test(m.item(g).nodeName)&&(u=m.item(g));var v;if(!e$2e(c)||!e$2e(u))return v="Unable to find expected tilesets or bbox attributes in "+n.url+".",void((t=l$V.handleError(t,o,o.errorEvent,v,void 0,void 0,void 0,l)).retry||r.reject(new t$13(v)));var $=u$Z(e.fileExtension,s.getAttribute("extension")),b=u$Z(e.tileWidth,parseInt(s.getAttribute("width"),10)),T=u$Z(e.tileHeight,parseInt(s.getAttribute("height"),10)),C=u$Z(e.minimumLevel,parseInt(_[0].getAttribute("order"),10)),S=u$Z(e.maximumLevel,parseInt(_[_.length-1].getAttribute("order"),10)),w=c.getAttribute("profile"),E=e.tilingScheme;if(!e$2e(E))if("geodetic"===w||"global-geodetic"===w)E=new g$15({ellipsoid:e.ellipsoid});else{if("mercator"!==w&&"global-mercator"!==w)return v=n.url+"specifies an unsupported profile attribute, "+w+".",void((t=l$V.handleError(t,o,o.errorEvent,v,void 0,void 0,void 0,l)).retry||r.reject(new t$13(v)));E=new c$S({ellipsoid:e.ellipsoid})}var P=h$18.clone(e.rectangle);if(!e$2e(P)){var A,L,M,R;u$Z(e.flipXY,!1)?(M=new o$1o(parseFloat(u.getAttribute("miny")),parseFloat(u.getAttribute("minx"))),R=new o$1o(parseFloat(u.getAttribute("maxy")),parseFloat(u.getAttribute("maxx")))):(M=new o$1o(parseFloat(u.getAttribute("minx")),parseFloat(u.getAttribute("miny"))),R=new o$1o(parseFloat(u.getAttribute("maxx")),parseFloat(u.getAttribute("maxy"))));var O="geodetic"===w||"mercator"===w;if(E.projection instanceof n$1d||O)A=a$18.fromDegrees(M.x,M.y),L=a$18.fromDegrees(R.x,R.y);else{var D=E.projection;A=D.unproject(M),L=D.unproject(R)}P=new h$18(A.longitude,A.latitude,L.longitude,L.latitude)}P.west<E.rectangle.west&&(P.west=E.rectangle.west),P.east>E.rectangle.east&&(P.east=E.rectangle.east),P.south<E.rectangle.south&&(P.south=E.rectangle.south),P.north>E.rectangle.north&&(P.north=E.rectangle.north);var I=E.positionToTileXY(h$18.southwest(P),C),F=E.positionToTileXY(h$18.northeast(P),C);(Math.abs(F.x-I.x)+1)*(Math.abs(F.y-I.y)+1)>4&&(C=0);var B=i.getDerivedResource({url:"{z}/{x}/{reverseY}."+$});r.resolve({url:B,tilingScheme:E,rectangle:P,tileWidth:b,tileHeight:T,minimumLevel:C,maximumLevel:S,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit})}function s(t){var n=u$Z(e.fileExtension,"png"),o=u$Z(e.tileWidth,256),a=u$Z(e.tileHeight,256),s=u$Z(e.minimumLevel,0),l=e.maximumLevel,u=e$2e(e.tilingScheme)?e.tilingScheme:new c$S({ellipsoid:e.ellipsoid}),c=u$Z(e.rectangle,u.rectangle),h=i.getDerivedResource({url:"{z}/{x}/{reverseY}."+n});r.resolve({url:h,tilingScheme:u,rectangle:c,tileWidth:o,tileHeight:a,minimumLevel:s,maximumLevel:l,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit})}function l(){n.fetchXML().then(a).otherwise(s)}return o$1l(e.url).then((function(e){(i=t$10.createIfNeeded(e)).appendForwardSlash(),n=i.getDerivedResource({url:"tilemapresource.xml"}),l()})).otherwise((function(e){r.reject(e)})),o}function g$n(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url))throw new t$15("options.url is required.");var t=o$1l.defer();_$g.call(this,t.promise),this._tmsResource=void 0,this._xmlResource=void 0,this._options=e,this._deferred=t,this._metadataError=void 0,this._metadataSuccess=this._metadataSuccess.bind(this),this._metadataFailure=this._metadataFailure.bind(this),this._requestMetadata=this._requestMetadata.bind(this);var i,n=this;o$1l(e.url).then((function(e){(i=t$10.createIfNeeded(e)).appendForwardSlash(),n._tmsResource=i,n._xmlResource=i.getDerivedResource({url:"tilemapresource.xml"}),n._requestMetadata()})).otherwise((function(e){t.reject(e)}))}function n$f(e){if(!e$2e((e=u$Z(e,{})).url))throw new t$15("options.url is required.");if(!e$2e(e.channel))throw new t$15("options.channel is required.");var t=e.url,i=u$Z(e.path,"/default_map"),n=t$10.createIfNeeded(t).getDerivedResource({url:"/"===i[0]?i.substring(1):i});n.appendForwardSlash(),this._resource=n,this._url=t,this._path=i,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new r$U('<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="'+n$f.logoUrl+'" title="Google Imagery"/></a>'),this.defaultGamma=1.9,this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var r,o=n.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),a=this;function s(t){var i,n;try{i=JSON.parse(t)}catch{i=JSON.parse(t.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}for(var o,s=0;s<i.layers.length;s++)if(i.layers[s].id===a._channel){o=i.layers[s];break}if(!e$2e(o))throw n="Could not find layer with channel (id) of "+a._channel+".",r=l$V.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$13(n);if(!e$2e(o.version))throw n="Could not find a version in channel (id) "+a._channel+".",r=l$V.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$13(n);if(a._version=o.version,e$2e(i.projection)&&"flat"===i.projection)a._tilingScheme=new g$15({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new h$18(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:e.ellipsoid});else{if(e$2e(i.projection)&&"mercator"!==i.projection)throw n="Unsupported projection "+i.projection+".",r=l$V.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$13(n);a._tilingScheme=new c$S({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid})}a._ready=!0,a._readyPromise.resolve(!0),l$V.handleSuccess(r)}function l(e){var t="An error occurred while accessing "+o.url+".";r=l$V.handleError(r,a,a._errorEvent,t,void 0,void 0,void 0,u),a._readyPromise.reject(new t$13(t))}function u(){o$1l(o.fetchText(),s,l)}u()}e$2e(Object.create)&&(g$n.prototype=Object.create(_$g.prototype),g$n.prototype.constructor=g$n),g$n.prototype._requestMetadata=function(){this._xmlResource.fetchXML().then(this._metadataSuccess).otherwise(this._metadataFailure)},g$n.prototype._metadataSuccess=function(e){for(var t,i,n,r=/tileformat/i,o=/tileset/i,a=/tilesets/i,s=/boundingbox/i,l=[],u=this._xmlResource,c=this._metadataError,h=this._deferred,d=this._requestMetadata,f=e.childNodes[0].childNodes,p=0;p<f.length;p++)if(r.test(f.item(p).nodeName))t=f.item(p);else if(a.test(f.item(p).nodeName)){n=f.item(p);for(var _=f.item(p).childNodes,m=0;m<_.length;m++)o.test(_.item(m).nodeName)&&l.push(_.item(m))}else s.test(f.item(p).nodeName)&&(i=f.item(p));var g;if(!e$2e(n)||!e$2e(i))return g="Unable to find expected tilesets or bbox attributes in "+u.url+".",(c=l$V.handleError(c,this,this.errorEvent,g,void 0,void 0,void 0,d)).retry||h.reject(new t$13(g)),void(this._metadataError=c);var x=this._options,y=u$Z(x.fileExtension,t.getAttribute("extension")),v=u$Z(x.tileWidth,parseInt(t.getAttribute("width"),10)),$=u$Z(x.tileHeight,parseInt(t.getAttribute("height"),10)),b=u$Z(x.minimumLevel,parseInt(l[0].getAttribute("order"),10)),T=u$Z(x.maximumLevel,parseInt(l[l.length-1].getAttribute("order"),10)),C=n.getAttribute("profile"),S=x.tilingScheme;if(!e$2e(S))if("geodetic"===C||"global-geodetic"===C)S=new g$15({ellipsoid:x.ellipsoid});else{if("mercator"!==C&&"global-mercator"!==C)return g=u.url+"specifies an unsupported profile attribute, "+C+".",(c=l$V.handleError(c,this,this.errorEvent,g,void 0,void 0,void 0,d)).retry||h.reject(new t$13(g)),void(this._metadataError=c);S=new c$S({ellipsoid:x.ellipsoid})}var w=h$18.clone(x.rectangle);if(!e$2e(w)){var E,P,A,L;u$Z(x.flipXY,!1)?(A=new o$1o(parseFloat(i.getAttribute("miny")),parseFloat(i.getAttribute("minx"))),L=new o$1o(parseFloat(i.getAttribute("maxy")),parseFloat(i.getAttribute("maxx")))):(A=new o$1o(parseFloat(i.getAttribute("minx")),parseFloat(i.getAttribute("miny"))),L=new o$1o(parseFloat(i.getAttribute("maxx")),parseFloat(i.getAttribute("maxy"))));var M="geodetic"===C||"mercator"===C;if(S.projection instanceof n$1d||M)E=a$18.fromDegrees(A.x,A.y),P=a$18.fromDegrees(L.x,L.y);else{var R=S.projection;E=R.unproject(A),P=R.unproject(L)}w=new h$18(E.longitude,E.latitude,P.longitude,P.latitude)}w.west<S.rectangle.west&&(w.west=S.rectangle.west),w.east>S.rectangle.east&&(w.east=S.rectangle.east),w.south<S.rectangle.south&&(w.south=S.rectangle.south),w.north>S.rectangle.north&&(w.north=S.rectangle.north);var O=S.positionToTileXY(h$18.southwest(w),b),D=S.positionToTileXY(h$18.northeast(w),b);(Math.abs(D.x-O.x)+1)*(Math.abs(D.y-O.y)+1)>4&&(b=0);var I=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+y});h.resolve({url:I,tilingScheme:S,rectangle:w,tileWidth:v,tileHeight:$,minimumLevel:b,maximumLevel:T,tileDiscardPolicy:x.tileDiscardPolicy,credit:x.credit})},g$n.prototype._metadataFailure=function(e){var t=this._options,i=u$Z(t.fileExtension,"png"),n=u$Z(t.tileWidth,256),r=u$Z(t.tileHeight,256),o=u$Z(t.minimumLevel,0),a=t.maximumLevel,s=e$2e(t.tilingScheme)?t.tilingScheme:new c$S({ellipsoid:t.ellipsoid}),l=u$Z(t.rectangle,s.rectangle),u=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+i});this._deferred.resolve({url:u,tilingScheme:s,rectangle:l,tileWidth:n,tileHeight:r,minimumLevel:o,maximumLevel:a,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit})},Object.defineProperties(n$f.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},version:{get:function(){if(!this._ready)throw new t$15("version must not be called before the imagery provider is ready.");return this._version}},requestType:{get:function(){if(!this._ready)throw new t$15("requestType must not be called before the imagery provider is ready.");return this._requestType}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),n$f.prototype.getTileCredits=function(e,t,i){},n$f.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=this._resource.getDerivedResource({url:"query",request:n,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:i+1}});return e$i.loadImage(this,r)},n$f.prototype.pickFeatures=function(e,t,i,n,r){},n$f._logoUrl=void 0,Object.defineProperties(n$f,{logoUrl:{get:function(){return e$2e(n$f._logoUrl)||(n$f._logoUrl=n$17("Assets/Images/google_earth_credit.png")),n$f._logoUrl},set:function(e){o$1q.defined("value",e),n$f._logoUrl=e}}});var p$e=/\/$/,g$m=new r$U('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function m$h(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).mapId;if(!e$2e(t))throw new t$15("options.mapId is required.");var i=t$10.createIfNeeded(u$Z(e.url,"https://{s}.tiles.mapbox.com/v4/")),n=e$U.getAccessToken(e.accessToken);this._mapId=t,this._accessToken=n,this._accessTokenErrorCredit=r$U.clone(e$U.getErrorCredit(e.accessToken));var r=u$Z(e.format,"png");/\./.test(r)||(r="."+r),this._format=r;var o,a=i.getUrlComponent();p$e.test(a)||(a+="/"),a+=t+"/{z}/{x}/{y}"+this._format,i.url=a,i.setQueryParameters({access_token:n}),e$2e(e.credit)?"string"==typeof(o=e.credit)&&(o=new r$U(o)):o=g$m,this._resource=i,this._imageryProvider=new _$g({url:i,credit:o,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function u$f(e){if(!e$2e((e=u$Z(e,{})).url))throw new t$15("options.url is required.");var t=t$10.createIfNeeded(e.url),i=new g$15({rectangle:u$Z(e.rectangle,h$18.MAX_VALUE),numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=i,this._resource=t,this._image=void 0,this._texture=void 0,this._tileWidth=0,this._tileHeight=0,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var n=e.credit;"string"==typeof n&&(n=new r$U(n)),this._credit=n;var r,o=this;function a(e){o._image=e,o._tileWidth=e.width,o._tileHeight=e.height,o._ready=!0,o._readyPromise.resolve(!0),l$V.handleSuccess(o._errorEvent)}function s(e){var i="Failed to load image "+t.url+".";r=l$V.handleError(r,o,o._errorEvent,i,0,0,0,l,e),o._readyPromise.reject(new t$13(i))}function l(){o$1l(t.fetchImage(),a,s)}l()}function R$h(e,t,i){if(!e$2e(e))throw new t$15("type is required.");if(this.type=e,!e$2e(t))if("json"===e)t="application/json";else if("xml"===e)t="text/xml";else if("html"===e)t="text/html";else{if("text"!==e)throw new t$15('format is required when type is not "json", "xml", "html", or "text".');t="text/plain"}if(this.format=t,!e$2e(i))if("json"===e)i=L$i;else if("xml"===e)i=M$i;else if("html"===e)i=S$e;else{if("text"!==e)throw new t$15('callback is required when type is not "json", "xml", "html", or "text".');i=S$e}this.callback=i}function L$i(e){for(var t=[],i=e.features,n=0;n<i.length;++n){var r=i[n],o=new o$r;if(o.data=r,o.properties=r.properties,o.configureNameFromProperties(r.properties),o.configureDescriptionFromProperties(r.properties),e$2e(r.geometry)&&"Point"===r.geometry.type){var a=r.geometry.coordinates[0],s=r.geometry.coordinates[1];o.position=a$18.fromDegrees(a,s)}t.push(o)}return t}Object.defineProperties(m$h.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),m$h.prototype.getTileCredits=function(e,t,i){if(e$2e(this._accessTokenErrorCredit))return[this._accessTokenErrorCredit]},m$h.prototype.requestImage=function(e,t,i,n){return this._imageryProvider.requestImage(e,t,i,n)},m$h.prototype.pickFeatures=function(e,t,i,n,r){return this._imageryProvider.pickFeatures(e,t,i,n,r)},m$h._defaultCredit=g$m,Object.defineProperties(u$f.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return 0}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.")}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),u$f.prototype.getTileCredits=function(e,t,i){},u$f.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");return this._image},u$f.prototype.pickFeatures=function(e,t,i,n,r){};var d$l="http://www.mapinfo.com/mxp",D$e="http://www.esri.com/wms",P$i="http://www.opengis.net/wfs",C$h="http://www.opengis.net/gml";function M$i(e){var t=e.documentElement;if("MultiFeatureCollection"===t.localName&&t.namespaceURI===d$l)return B$c(e);if("FeatureInfoResponse"===t.localName&&t.namespaceURI===D$e)return x$i(e);if("FeatureCollection"===t.localName&&t.namespaceURI===P$i)return j$e(e);if("ServiceExceptionReport"===t.localName)throw new t$13((new XMLSerializer).serializeToString(t));return"msGMLOutput"===t.localName?O$f(e):X$b(e)}function B$c(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(d$l,"Feature"),n=0;n<i.length;++n){for(var r=i[n],o={},a=r.getElementsByTagNameNS(d$l,"Val"),s=0;s<a.length;++s){var l=a[s];if(l.hasAttribute("ref")){var u=l.getAttribute("ref"),c=l.textContent.trim();o[u]=c}}var h=new o$r;h.data=r,h.properties=o,h.configureNameFromProperties(o),h.configureDescriptionFromProperties(o),t.push(h)}return t}function x$i(e){var t,i=e.documentElement,n=[],r=i.getElementsByTagNameNS("*","FIELDS");if(r.length>0)for(var o=0;o<r.length;++o){var a=r[o];t={};for(var s=a.attributes,l=0;l<s.length;++l){var u=s[l];t[u.name]=u.value}n.push(p$d(a,t))}else for(var c=i.getElementsByTagNameNS("*","FeatureInfo"),h=0;h<c.length;++h){var d=c[h];t={};for(var f=d.childNodes,p=0;p<f.length;++p){var _=f[p];_.nodeType===Node.ELEMENT_NODE&&(t[_.localName]=_.textContent)}n.push(p$d(d,t))}return n}function j$e(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(C$h,"featureMember"),n=0;n<i.length;++n){var r=i[n],o={};E$h(r,o),t.push(p$d(r,o))}return t}function O$f(e){for(var t,i=[],n=e.documentElement.childNodes,r=0;r<n.length;r++)if(n[r].nodeType===Node.ELEMENT_NODE){t=n[r];break}if(!e$2e(t))throw new t$13("Unable to find first child of the feature info xml document");for(var o=t.childNodes,a=0;a<o.length;++a){var s=o[a];if(s.nodeType===Node.ELEMENT_NODE){var l={};E$h(s,l),i.push(p$d(s,l))}}return i}function E$h(e,t){for(var i=!0,n=0;n<e.childNodes.length;++n){var r=e.childNodes[n];r.nodeType===Node.ELEMENT_NODE&&(i=!1),"Point"!==r.localName&&"LineString"!==r.localName&&"Polygon"!==r.localName&&"boundedBy"!==r.localName&&r.hasChildNodes()&&E$h(r,t)&&(t[r.localName]=r.textContent)}return i}function p$d(e,t){var i=new o$r;return i.data=e,i.properties=t,i.configureNameFromProperties(t),i.configureDescriptionFromProperties(t),i}function X$b(e){var t=(new XMLSerializer).serializeToString(e),i=document.createElement("div"),n=document.createElement("pre");n.textContent=t,i.appendChild(n);var r=new o$r;return r.data=e,r.description=i.innerHTML,[r]}var z$g=/<body>\s*<\/body>/im,G$h=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,U$g=/<title>([\s\S]*)<\/title>/im;function S$e(e){if(!z$g.test(e)&&!G$h.test(e)){var t,i=U$g.exec(e);i&&i.length>1&&(t=i[1]);var n=new o$r;return n.name=t,n.description=e,n.data=e,[n]}}const j$d=[3034,3035,3042,3043,3044],w$h=[4471,4559];function m$g(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url))throw new t$15("options.url is required.");if(!e$2e(e.layers))throw new t$15("options.layers is required.");if(e$2e(e.times)&&!e$2e(e.clock))throw new t$15("options.times was specified, so options.clock is required.");this._baseUrl=e.url;var t=t$10.createIfNeeded(e.url),i=t.clone();t.setQueryParameters(m$g.DefaultParameters,!0),i.setQueryParameters(m$g.GetFeatureInfoDefaultParameters,!0),e$2e(e.parameters)&&t.setQueryParameters(v$e(e.parameters)),e$2e(e.getFeatureInfoParameters)&&i.setQueryParameters(v$e(e.getFeatureInfoParameters));var n=this;n._indexedDBSetting={isOpen:!1,clear:function(){n._indexedDBScheduler.clear(n.tablename)},cache:[]},this._reload=void 0,e$2e(e.times)&&(this._timeDynamicImagery=new f$R({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,r,o){return g$l(n,e,t,i,r,o)},reloadFunction:function(){e$2e(n._reload)&&n._reload()}}));var r={};if(r.layers=e.layers,r.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",r.width="{width}",r.height="{height}",parseFloat(t.queryParameters.version)>=1.3){r.crs=u$Z(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof t$N?"EPSG:3857":"CRS:84");const t=r.crs.split(":");if("EPSG"===t[0]&&2===t.length){const e=Number(t[1]);(e>=4e3&&e<5e3&&!w$h.includes(e)||j$d.includes(e))&&(r.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else r.srs=u$Z(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof t$N?"EPSG:3857":"EPSG:4326");e.tilingScheme instanceof c$S&&e.tilingScheme.projection instanceof n$1d&&(r.srs="EPSG:0"),t.setQueryParameters(r,!0),i.setQueryParameters(r,!0);var o={query_layers:e.layers,x:"{i}",y:"{j}",info_format:"{format}"};i.setQueryParameters(o,!0),this._resource=t,this._pickFeaturesResource=i,this._layers=e.layers,this._tileProvider=new _$g({url:t,pickFeaturesUrl:i,tilingScheme:u$Z(e.tilingScheme,new g$15({ellipsoid:e.ellipsoid})),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:u$Z(e.getFeatureInfoFormats,m$g.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures,baseUrl:this._baseUrl}),this._tileProvider._indexedDBSetting=this._indexedDBSetting,this._customRequestHeaders=e.customRequestHeaders,this._tileProvider._customRequestHeaders=e.customRequestHeaders,this._tilingScheme=this._tileProvider._tilingScheme,this._readyPromise=this._tileProvider._readyPromise}function g$l(e,t,i,n,r,o){var a=e$2e(o)?o.data:void 0,s=e._tileProvider;return e$2e(a)&&s._resource.setQueryParameters(a),s.requestImage(t,i,n,r)}function x$h(e,t,i,n,r,o,a){var s=e$2e(a)?a.data:void 0,l=e._tileProvider;return e$2e(s)&&l._pickFeaturesResource.setQueryParameters(s),l.pickFeatures(t,i,n,r,o)}function v$e(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i.toLowerCase()]=e[i]);return t}function a$c(e){return function(t){return new e(t)}}Object.defineProperties(m$g.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},ready:{get:function(){return this._tileProvider.ready}},readyPromise:{get:function(){return this._tileProvider.readyPromise}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}}}),m$g.prototype.getTileCredits=function(e,t,i){return this._tileProvider.getTileCredits(e,t,i)},m$g.prototype.requestImage=function(e,t,i,n){var r,o,a=this._timeDynamicImagery;return e$2e(a)&&(o=a.currentInterval,r=a.getFromCache(e,t,i,n)),e$2e(r)||(r=g$l(this,e,t,i,n,o)),e$2e(r)&&e$2e(a)&&a.checkApproachingInterval(e,t,i,n),r},m$g.prototype.pickFeatures=function(e,t,i,n,r){var o=this._timeDynamicImagery;return x$h(this,e,t,i,n,r,e$2e(o)?o.currentInterval:void 0)},m$g.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"}),m$g.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"}),m$g.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new R$h("json","application/json")),Object.freeze(new R$h("xml","text/xml")),Object.freeze(new R$h("text","text/html"))]);var A$j={ARCGIS_MAPSERVER:a$c(b$q),BING:a$c(o$q),GOOGLE_EARTH:a$c(n$f),MAPBOX:a$c(m$h),SINGLE_TILE:a$c(u$f),TMS:a$c(g$n),URL_TEMPLATE:a$c(_$g),WMS:a$c(m$g),WMTS:a$c(v$E)};function o$l(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).assetId;o$1q.typeOf.number("options.assetId",t),this.defaultAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._ready=!1,this._tileCredits=void 0,this._errorEvent=new o$1h;var i=this,n=n$y._createEndpointResource(t,e),r=e.assetId.toString()+e.accessToken+e.server,o=o$l._endpointCache[r];e$2e(o)||(o=n.fetchJson(),o$l._endpointCache[r]=o),this._readyPromise=o.then((function(e){if("IMAGERY"!==e.type)return o$1l.reject(new t$13("SuperMap3D ion asset "+t+" is not an imagery asset."));var r,o=e.externalType;if(e$2e(o)){var a=A$j[o];if(!e$2e(a))return o$1l.reject(new t$13("Unrecognized SuperMap3D ion imagery type: "+o));r=a(e.options)}else r=new g$n({url:new n$y(e,n)});return i._tileCredits=n$y.getCreditsFromEndpoint(e,n),r.errorEvent.addEventListener((function(e){e.provider=i,i._errorEvent.raiseEvent(e)})),i._imageryProvider=r,r.readyPromise.then((function(){return i._ready=!0,!0}))}))}Object.defineProperties(o$l.prototype,{ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._imageryProvider.rectangle}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._imageryProvider.tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this._ready)throw new t$15("credit must not be called before the imagery provider is ready.");return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){if(!this._ready)throw new t$15("hasAlphaChannel must not be called before the imagery provider is ready.");return this._imageryProvider.hasAlphaChannel}}}),o$l.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$15("getTileCredits must not be called before the imagery provider is ready.");var n=this._imageryProvider.getTileCredits(e,t,i);return e$2e(n)?this._tileCredits.concat(n):this._tileCredits},o$l.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");return this._imageryProvider.requestImage(e,t,i,n)},o$l.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$15("pickFeatures must not be called before the imagery provider is ready.");return this._imageryProvider.pickFeatures(e,t,i,n,r)},o$l._endpointCache={};var e$b={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4},n$e=Object.freeze(e$b);function o$k(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),new o$l({assetId:u$Z(e.style,n$e.AERIAL)})}var L$h=576,A$i=100,g$k="#ffffff",_$f="#48b";function I$h(e,t){for(var i=e.length,n=0;n<i;n++){var r=e[n];if(r$U.equals(r,t))return!0}return!1}function O$e(e){var t=e._previousCredit,i=e._currentCredit;r$U.equals(i,t)||(e$2e(t)&&e._CreditContainer.removeChild(t.element),e$2e(i)&&e._CreditContainer.appendChild(i.element),e._previousCredit=i)}var k$b="supermap3d-credit-delimiter",v$d;function E$g(e){var t=document.createElement("span");return t.textContent=e,t.className=k$b,t}function N$d(e,t){if(e$2e(t)){var i=document.createElement(t);i._creditId=e._creditId,i.appendChild(e),e=i}return e}function F$d(e,t,i,n){for(var r=e.childNodes,o=-1,a=0;a<t.length;++a){var s=t[a];if(e$2e(s)){if(o=a,e$2e(i)&&(o*=2,a>0)){var l=o-1;if(r.length<=l)e.appendChild(E$g(i));else{var u=r[l];u.className!==k$b&&e.replaceChild(E$g(i),u)}}var c=s.element;if(r.length<=o)e.appendChild(N$d(c,n));else{var h=r[o];h._creditId!==s._id&&e.replaceChild(N$d(c,n),h)}}}for(++o;o<r.length;)e.removeChild(r[o])}function q$f(e){var t=e._lightboxCredits,i=e.viewport.clientWidth,n=e.viewport.clientHeight;i!==e._lastViewportWidth&&(i<L$h?(t.className="supermap3d-credit-lightbox supermap3d-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="supermap3d-credit-lightbox supermap3d-credit-lightbox-expanded",t.style.marginTop=Math.floor(.5*(n-t.clientHeight))+"px"),e._lastViewportWidth=i),i>=L$h&&n!==e._lastViewportHeight&&(t.style.marginTop=Math.floor(.5*(n-t.clientHeight))+"px",e._lastViewportHeight=n)}function a$b(e,t){var i=e+" {";for(var n in t)t.hasOwnProperty(n)&&(i+=n+": "+t[n]+"; ");return i+=" }\n"}function S$d(){var e="";e+=a$b(".supermap3d-credit-lightbox-overlay",{display:"none","z-index":"1",position:"absolute",top:"0",left:"0",width:"100%",height:"100%","background-color":"rgba(80, 80, 80, 0.8)"}),e+=a$b(".supermap3d-credit-lightbox",{"background-color":"#303336",color:g$k,position:"relative","min-height":A$i+"px",margin:"auto"}),e+=a$b(".supermap3d-credit-lightbox > ul > li a, .supermap3d-credit-lightbox > ul > li a:visited",{color:g$k}),e+=a$b(".supermap3d-credit-lightbox > ul > li a:hover",{color:_$f}),e+=a$b(".supermap3d-credit-lightbox.supermap3d-credit-lightbox-expanded",{border:"1px solid #444","border-radius":"5px","max-width":"370px"}),e+=a$b(".supermap3d-credit-lightbox.supermap3d-credit-lightbox-mobile",{height:"100%",width:"100%"}),e+=a$b(".supermap3d-credit-lightbox-title",{padding:"20px 20px 0 20px"}),e+=a$b(".supermap3d-credit-lightbox-close",{"font-size":"18pt",cursor:"pointer",position:"absolute",top:"0",right:"6px",color:g$k}),e+=a$b(".supermap3d-credit-lightbox-close:hover",{color:_$f}),e+=a$b(".supermap3d-credit-lightbox > ul",{margin:"0",padding:"12px 20px 12px 40px","font-size":"13px"}),e+=a$b(".supermap3d-credit-lightbox > ul > li",{"padding-bottom":"6px"}),e+=a$b(".supermap3d-credit-lightbox > ul > li *",{padding:"0",margin:"0"}),e+=a$b(".supermap3d-credit-expand-link",{"padding-left":"5px",cursor:"pointer","text-decoration":"underline",color:g$k}),e+=a$b(".supermap3d-credit-expand-link:hover",{color:_$f}),e+=a$b(".supermap3d-credit-text",{color:g$k}),e+=a$b(".supermap3d-credit-textContainer *, .supermap3d-credit-logoContainer *",{display:"inline"});var t=document.head,i=document.createElement("style");i.innerHTML=e,t.insertBefore(i,t.firstChild)}function r$l(e,t,i){o$1q.defined("container",e);var n=this;i=u$Z(i,document.body);var r=document.createElement("div");r.className="supermap3d-credit-lightbox-overlay",i.appendChild(r);var o=document.createElement("div");function a(e){o.contains(e.target)||n.hideLightbox()}o.className="supermap3d-credit-lightbox",r.appendChild(o),r.addEventListener("click",a,!1);var s=document.createElement("div");s.className="supermap3d-credit-lightbox-title",s.textContent="Data provided by:",o.appendChild(s);var l=document.createElement("a");l.onclick=this.hideLightbox.bind(this),l.innerHTML="×",l.className="supermap3d-credit-lightbox-close",o.appendChild(l);var u=document.createElement("ul");o.appendChild(u);var c=document.createElement("div");c.className="supermap3d-credit-logoContainer",c.style.display="inline",e.appendChild(c);var h=document.createElement("div");h.className="supermap3d-credit-textContainer",h.style.display="inline",e.appendChild(h);var d=document.createElement("a");d.className="supermap3d-credit-expand-link",d.onclick=this.showLightbox.bind(this),d.textContent="Data attribution",e.appendChild(d),S$d();var f=r$U.clone(r$l.credit);this._delimiter=u$Z(t," • "),this._screenContainer=h,this._CreditContainer=c,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=o,this._creditList=u,this._lightbox=r,this._hideLightbox=a,this._expandLink=d,this._expanded=!1,this._defaultCredits=[],this._credit=f,this._previousCredit=void 0,this._currentcredit=f,this._currentFrameCredits={screenCredits:new e$1Q,lightboxCredits:new e$1Q},this._defaultCredit=void 0,this.viewport=i,this.container=e}function H$l(){if(!e$2e(v$d)){var e=n$17("Assets/Images/logo.png");v$d=new r$U('<a href="http://www.supermap.com" target="_blank"><img src="'+e+'" title="SuperMap"/></a>',!0)}return r$l._CreditInitialized||(r$l._credit=v$d,r$l._CreditInitialized=!0),v$d}function r$k(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._sceneDepthBuffer=void 0,this._cameraDepthBuffer=void 0,this._boundingSphere=new i$1d,this._qureyRegion=[],this._waterHeight=0,this._polygonTexture=null,this._damBreakPosition=[0,0,0],this._frameState=void 0,this._update=!0,this._name="",this._sceneName="",this._cameraName="",this._checking=!1}function h$h(e){e$2e(e._polygonTexture)&&(e._polygonTexture=e._polygonTexture&&e._polygonTexture.destroy(),e._polygonTexture=null)}function i$h(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).attributeName,i=e.perInstanceAttribute;if(!e$2e(t))throw new t$15("options.attributeName is required.");e$2e(i)||(i=!1);var n,r=u$Z(e.glslDatatype,"vec3"),o="v_"+t;if("normal"===t||"tangent"===t||"bitangent"===t)n="vec4 getColor() { return vec4(("+o+" + vec3(1.0)) * 0.5, 1.0); }\n";else switch("st"===t&&(r="vec2"),r){case"float":n="vec4 getColor() { return vec4(vec3("+o+"), 1.0); }\n";break;case"vec2":n="vec4 getColor() { return vec4("+o+", 0.0, 1.0); }\n";break;case"vec3":n="vec4 getColor() { return vec4("+o+", 1.0); }\n";break;case"vec4":n="vec4 getColor() { return "+o+"; }\n";break;default:throw new t$15("options.glslDatatype must be float, vec2, vec3, or vec4.")}var a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n"+(i?"":"attribute "+r+" "+t+";\n")+"varying "+r+" "+o+";\nvoid main()\n{\nvec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);\n"+(i?o+" = czm_batchTable_"+t+"(batchId);\n":o+" = "+t+";\n")+"gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}",s="varying "+r+" "+o+";\n"+n+"\nvoid main()\n{\ngl_FragColor = getColor();\n}";this.material=void 0,this.translucent=u$Z(e.translucent,!1),this._vertexShaderSource=u$Z(e.vertexShaderSource,a),this._fragmentShaderSource=u$Z(e.fragmentShaderSource,s),this._renderState=a$S.getDefaultRenderState(!1,!1,e.renderState),this._closed=u$Z(e.closed,!1),this._attributeName=t,this._glslDatatype=r}function s$d(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.length=u$Z(e.length,1e7),this._length=void 0,this.width=u$Z(e.width,2),this._width=void 0,this.show=u$Z(e.show,!0),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=new p$1d,this.id=e.id,this._id=void 0,this._primitive=void 0}r$l.prototype.addCredit=function(e){if(o$1q.defined("credit",e),e._isIon)return e$2e(this._defaultCredit)||(this._defaultCredit=r$U.clone(H$l())),void(this._currentCredit=this._defaultCredit);e.showOnScreen?this._currentFrameCredits.screenCredits.set(e.id,e):this._currentFrameCredits.lightboxCredits.set(e.id,e)},r$l.prototype.addDefaultCredit=function(e){o$1q.defined("credit",e);var t=this._defaultCredits;I$h(t,e)||t.push(e)},r$l.prototype.removeDefaultCredit=function(e){o$1q.defined("credit",e);var t=this._defaultCredits,i=t.indexOf(e);-1!==i&&t.splice(i,1)},r$l.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0},r$l.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1},r$l.prototype.update=function(){this._expanded&&q$f(this)},r$l.prototype.beginFrame=function(){var e=this._currentFrameCredits,t=e.screenCredits;t.removeAll();for(var i=this._defaultCredits,n=0;n<i.length;++n){var r=i[n];t.set(r.id,r)}e.lightboxCredits.removeAll(),r$U.equals(r$l.credit,this._credit)||(this._credit=r$U.clone(r$l.credit)),this._currentCredit=this._credit},r$l.prototype.endFrame=function(){var e=this._currentFrameCredits.screenCredits.values;F$d(this._screenContainer,e,this._delimiter,void 0);var t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",F$d(this._creditList,t,void 0,"li"),O$e(this)},r$l.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._CreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),i$11(this)},r$l.prototype.isDestroyed=function(){return!1},r$l._credit=void 0,r$l._CreditInitialized=!1,Object.defineProperties(r$l,{credit:{get:function(){return H$l(),r$l._credit},set:function(e){r$l._credit=e,r$l._CreditInitialized=!0}}}),Object.defineProperties(r$k.prototype,{damBreakPosition:{get:function(){return this._damBreakPosition},set:function(e){this._damBreakPosition=e,this._update=!0}},waterHeight:{get:function(){return this._waterHeight},set:function(e){this._waterHeight=e,this._update=!0}}}),r$k.prototype.destroy=function(){return h$h(this),i$11(this)},r$k.prototype.build=function(){""!==this._name||this._checking||(this._name="damBreakAnalysis"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},r$k.prototype.qureyRegion=function(e){if(!e$2e(e)||!e$2e(e.position))throw new t$15("the options is required");this._qureyRegion=e.position,this._update=!0},r$k.prototype.setTerrainBlock=function(e){},r$k.prototype.update=function(e,t,i){if("water"!==t._fboState.name&&!t.passes.pick){if(t._fboState.enabled&&(t._fboState.name===this._sceneName||t._fboState.name===this._cameraName))return void(t._fboState.name===this._sceneName&&e$2e(this._stencilCommand)&&i.push(this._stencilCommand));var n=t.camera;n.bReflect||(p$1d.multiply(this._viewProjMatrix,n.inverseViewMatrix,this._renderTextureMatrix),this._update&&(this._frameState=t,e$2e(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new s$U(e),this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),this._update=!1,h$h(this),updateCamera(this,e,t),updateViewShed(this,e,t)),e$2e(this._cameraDepthBuffer.framebuffer)&&i.push(correct))}},Object.defineProperties(i$h.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}}),i$h.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,i$h.prototype.isTranslucent=a$S.prototype.isTranslucent,i$h.prototype.getRenderState=a$S.prototype.getRenderState,s$d.prototype.update=function(e){if(this.show){if(!e$2e(this._primitive)||!p$1d.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=p$1d.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,e$2e(this._primitive)&&this._primitive.destroy(),0===this.modelMatrix[12]&&0===this.modelMatrix[13]&&0===this.modelMatrix[14]&&(this.modelMatrix[14]=.01);var t=new d$1o({geometry:new R$A({positions:[o$1p.ZERO,o$1p.UNIT_X],width:this.width,vertexFormat:e$1F.VERTEX_FORMAT,colors:[e$1X.RED,e$1X.RED],arcType:m$1h.NONE}),modelMatrix:p$1d.multiplyByUniformScale(this.modelMatrix,this.length,new p$1d),id:this.id,pickPrimitive:this}),i=new d$1o({geometry:new R$A({positions:[o$1p.ZERO,o$1p.UNIT_Y],width:this.width,vertexFormat:e$1F.VERTEX_FORMAT,colors:[e$1X.GREEN,e$1X.GREEN],arcType:m$1h.NONE}),modelMatrix:p$1d.multiplyByUniformScale(this.modelMatrix,this.length,new p$1d),id:this.id,pickPrimitive:this}),n=new d$1o({geometry:new R$A({positions:[o$1p.ZERO,o$1p.UNIT_Z],width:this.width,vertexFormat:e$1F.VERTEX_FORMAT,colors:[e$1X.BLUE,e$1X.BLUE],arcType:m$1h.NONE}),modelMatrix:p$1d.multiplyByUniformScale(this.modelMatrix,this.length,new p$1d),id:this.id,pickPrimitive:this});this._primitive=new y$R({geometryInstances:[t,i,n],appearance:new e$1F,asynchronous:!1})}this._primitive.update(e)}},s$d.prototype.isDestroyed=function(){return!1},s$d.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$11(this)};var N$c="varying vec4 positionEC;\n\nvoid main()\n{\n vec3 direction = normalize(positionEC.xyz);\n czm_ray ray = czm_ray(vec3(0.0), direction);\n\n vec3 ellipsoid_center = czm_view[3].xyz;\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\n if (!czm_isEmpty(intersection))\n {\n gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n }\n else\n {\n discard;\n }\n\n czm_writeLogDepth();\n}\n",V$f="attribute vec4 position;\n\nvarying vec4 positionEC;\n\nvoid main()\n{\n positionEC = czm_modelView * position;\n gl_Position = czm_projection * positionEC;\n\n czm_vertexLogDepth();\n}\n";function c$d(){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1}var f$j=s$Z.supportsTypedArrays()?new Float32Array(12):[],L$g=new o$1p,P$h=new o$1p,C$g=new o$1p,n$d=new o$1p;function Q$a(e,t){var i=e.radii,n=t.camera.positionWC,r=o$1p.multiplyComponents(e.oneOverRadii,n,L$g),o=o$1p.magnitude(r),a=o$1p.normalize(r,P$h),s=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,r,C$g),C$g),l=o$1p.normalize(o$1p.cross(a,s,n$d),n$d),u=Math.sqrt(o$1p.magnitudeSquared(r)-1),c=o$1p.multiplyByScalar(a,1/o,L$g),h=u/o,d=o$1p.multiplyByScalar(s,h,P$h),f=o$1p.multiplyByScalar(l,h,C$g),p=o$1p.add(c,f,n$d);o$1p.subtract(p,d,p),o$1p.multiplyComponents(i,p,p),o$1p.pack(p,f$j,0);var _=o$1p.subtract(c,f,n$d);o$1p.subtract(_,d,_),o$1p.multiplyComponents(i,_,_),o$1p.pack(_,f$j,3);var m=o$1p.add(c,f,n$d);o$1p.add(m,d,m),o$1p.multiplyComponents(i,m,m),o$1p.pack(m,f$j,6);var g=o$1p.subtract(c,f,n$d);return o$1p.add(g,d,g),o$1p.multiplyComponents(i,g,g),o$1p.pack(g,f$j,9),f$j}function l$i(){}c$d.prototype.update=function(e){if(this._mode=e.mode,e.mode===C$14.SCENE3D){var t=e.context,i=e.mapProjection.ellipsoid,n=e.useLogDepth;if(e$2e(this._command)||(this._rs=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new i$$({renderState:this._rs,boundingVolume:new i$1d(o$1p.ZERO,i.maximumRadius),pass:Le$q.OPAQUE,owner:this})),!e$2e(this._sp)||this._useLogDepth!==n){this._useLogDepth=n;var r=new s$V({name:"DepthPlaneVS",sources:[V$f]}),o=new s$V({name:"DepthPlaneFS",sources:[N$c]});if(n){o.sources.push("#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),o.defines.push("LOG_DEPTH"),r.defines.push("LOG_DEPTH")}this._sp=r$14.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}var a=Q$a(i,e);if(e$2e(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(a);else{var s=new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:a})},indices:[0,1,2,2,1,3],primitiveType:W$18.TRIANGLES});this._va=c$13.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:A$18.DYNAMIC_DRAW}),this._command.vertexArray=this._va}}},c$d.prototype.execute=function(e,t){this._mode===C$14.SCENE3D&&this._command.execute(e,t)},c$d.prototype.isDestroyed=function(){return!1},c$d.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var b$m=/\bgl_FragDepthEXT\b/,z$f=/\bdiscard\b/;function T$h(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(!e$2e(i)){var n=t._attributeLocations,r=t.fragmentShaderSource,o=!1;r.useWGSL&&(o=!0);var a=!1,s=r.sources,l=s.length;for(f=0;f<l;++f)if(b$m.test(s[f])||z$f.test(s[f])){a=!0;break}var u=!1,c=r.defines;for(l=c.length,f=0;f<l;++f)if("LOG_DEPTH"===c[f]){u=!0;break}if(e.depthTexture){var h=o?k$Z:"";a||u?!a&&u&&(r=new s$V({defines:["LOG_DEPTH"],sources:[o?"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n gl_FragColor = vec4<f32>(1.0f); \n czm_writeLogDepth(v_depthFromNearPlusOne); \n} \n":"#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\nvoid main() \n{ \n gl_FragColor = vec4(1.0); \n czm_writeLogDepth(); \n} \n"],preSources:[h],useWGSL:o})):r=new s$V({sources:[o?"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n gl_FragColor = vec4<f32>(1.0f); \n} \n":"void main() \n{ \n gl_FragColor = vec4(1.0); \n} \n"],preSources:[h],useWGSL:o})}else if(a||u)if(!a&&u)r=new s$V({defines:["LOG_DEPTH"],sources:["#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\nvoid main() \n{ \n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n czm_writeLogDepth(); \n} \n"]});else{l=s.length;for(var d=new Array(l+1),f=0;f<l;++f)d[f]=s$V.replaceMain(s[f],"pick_depth_old_main");var p="void main() \n{ \n pick_depth_old_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = "+(u?"czm_packDepth(gl_FragDepthEXT)":"czm_packDepth(gl_FragCoord.z)")+";\n} \n";d[l]=p;for(var _=[],m=0;m<c.length;m++){var g=r.defines[m];_.push(g)}r=new s$V({sources:d,defines:_})}else r=new s$V({sources:["void main() \n{ \n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n} \n"]});i=e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function E$f(e,t,i){var n=e._depthOnlyRenderStateCache,r=n[t.id];if(!e$2e(r)){var o=d$1m.getState(t);o.depthMask=!0,e._context.depthTexture&&(o.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),e$2e(i)&&(o.viewport=void 0),r=d$1m.fromCache(o),n[t.id]=r}return r}l$i.createDepthOnlyDerivedCommand=function(e,t,i,n){var r,o;return e$2e(n)||(n={}),e$2e(n.depthOnlyCommand)&&(r=n.depthOnlyCommand.shaderProgram,o=n.depthOnlyCommand.renderState),n.depthOnlyCommand=i$$.shallowClone(t,n.depthOnlyCommand),e$2e(r)&&n.shaderProgramId===t.shaderProgram.id?(n.depthOnlyCommand.shaderProgram=r,n.depthOnlyCommand.renderState=o):(n.depthOnlyCommand.shaderProgram=T$h(i,t.shaderProgram),n.depthOnlyCommand.renderState=E$f(e,t.renderState,n.depthOnlyCommand._pointCloudEyeDomeLighting),n.shaderProgramId=t.shaderProgram.id),n.depthOnlyCommand._pointCloudEyeDomeLighting&&(n.depthOnlyCommand.framebuffer=void 0),n};var I$g=/\s+czm_writeLogDepth\(|\s+writeLogDepth\(/,u$e=/\s+czm_vertexLogDepth\(|\s+vertexLogDepth\(/,R$g=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;function w$g(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!e$2e(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone(),a=!1;o.useWGSL&&(a=!0),r.defines=e$2e(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),o.defines=e$2e(o.defines)?o.defines.slice(0):[],o.defines.push("LOG_DEPTH");var s,l,u=!1,c=r.sources,h=c.length;for(s=0;s<h;++s)if(u$e.test(c[s])){u=!0;break}if(!u){for(s=0;s<h;++s)c[s]=s$V.replaceMain(c[s],"czm_log_depth_main",a);l=a?"#include <SceneUboDecl> \n@vertex \nfn main(input : VertexInputs) -> FragmentInputs \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n":"\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n",c.push(l)}var d=!0;for(u=!1,h=(c=o.sources).length,s=0;s<h;++s)I$g.test(c[s])&&(u=!0),R$g.test(c[s])&&(d=!1);var f="";if(d&&!e.webgpu&&(f+="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),!u){for(s=0;s<h;s++)c[s]=s$V.replaceMain(c[s],"czm_log_depth_main",a);f+=a?"@fragment \nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(v_depthFromNearPlusOne); \n} \n":"\nvoid main() \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(); \n} \n"}c.push(f),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n,transformFeedbackVaryings:t._transformFeedbackVaryings})}return i}function H$k(e,t,i){var n=e.shaderCache.getDerivedShaderProgram(t,"pick");if(!e$2e(n)){var r=t._attributeLocations,o=t.fragmentShaderSource,a=!1;o.useWGSL&&(a=!0);var s,l=o.sources,u=l.length,c="";if(a){c="@fragment \nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a < Layer.uTransparentFilter) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n",s=new Array(u+1);for(var h=0;h<u;++h)s[h]=s$V.replaceMain(l[h],"czm_non_pick_main",a);s[u]=c}else{c="vSecondColor"===i?"void main() \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a < uTransparentFilter) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n":"void main() \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n",s=new Array(u+1);for(h=0;h<u;++h)s[h]=s$V.replaceMain(l[h],"czm_non_pick_main");s[u]=c}o=new s$V({sources:s,preSources:o.preSources,defines:o.defines,useWGSL:a}),n=e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:r})}return n}function X$a(e,t){var i=e._pickRenderStateCache,n=i[t.id];if(!e$2e(n)){var r=d$1m.getState(t);r.blending.enabled=!1,r.depthMask=!0,n=d$1m.fromCache(r),i[t.id]=n}return n}function N$b(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(!e$2e(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();r.defines=e$2e(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),o.defines=e$2e(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),i=e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n,transformFeedbackVaryings:t._transformFeedbackVaryings})}return i}function M$h(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"NORMAL");if(!e$2e(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();o.defines=e$2e(o.defines)?o.defines.slice(0):[],o.defines.push("NORMAL"),i=e.shaderCache.createDerivedShaderProgram(t,"NORMAL",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i}function A$h(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"mask");if(!e$2e(i)){var n=t._attributeLocations,r=t.fragmentShaderSource,o=!1;r.useWGSL&&(o=!0);var a,s=r.sources,l=s.length;for(a=0;a<l&&(!b$m.test(s[a])&&!z$f.test(s[a]));++a);var u=r.defines;for(l=u.length,a=0;a<l&&"LOG_DEPTH"!==u[a];++a);var c=o?k$Z:"";r=new s$V({defines:["LOG_DEPTH"],sources:[o?["#include <SceneUboDecl>","varying vColor : vec4<f32>;","varying fSelected : f32;","@fragment","fn main(input : FragmentInputs) -> FragmentOutputs {"," if(vColor.a < 0.1 || fSelected < 0.1){discard;}","\tgl_FragColor = vec4<f32>(0.0, 0.0, 1.0, 1.0);"," czm_writeLogDepth(v_depthFromNearPlusOne);","}"].join("\n"):["#ifdef GL_EXT_frag_depth","#extension GL_EXT_frag_depth : enable","#endif","varying vec4 vColor;","varying vec2 fSelected;","void main() {"," if(vColor.a < 0.1 || fSelected.x < 0.1){discard;}","\tfloat depth = czm_unpackDepth(texture2D(czm_nonSelDepthTexture, gl_FragCoord.xy / czm_viewport.zw));"," depth = czm_reverseLogDepth(depth);"," vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);"," if(-positionEC.z > 10000.0){discard;}"," float near = czm_currentFrustum.x;"," float far = czm_currentFrustum.y;"," float viewZ = -( near * far ) / ( ( far - near ) * depth - far );"," float depthTest = (-positionEC.z > viewZ) && (depth > 0.00001) ? 1.0 : 0.0;","\tgl_FragColor = vec4(0.0, depthTest, 1.0, 1.0);"," czm_writeLogDepth();","}"].join("\n")],preSources:[c],useWGSL:o}),i=e.shaderCache.createDerivedShaderProgram(t,"mask",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function h$g(e){if(!e$2e(e))throw new t$15("scene is required.");this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;var t=this;function i(e){var i=e.alpha;if(!e$2e(i))return t._alpha=void 0,t._beta=void 0,void(t._gamma=void 0);t._alpha=e$2d.toRadians(i),t._beta=e$2d.toRadians(e.beta),t._gamma=e$2d.toRadians(e.gamma)}window.addEventListener("deviceorientation",i,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",i,!1)}}l$i.createLogDepthCommand=function(e,t,i){var n;return e$2e(i)||(i={}),e$2e(i.command)&&(n=i.command.shaderProgram),i.command=i$$.shallowClone(e,i.command),e$2e(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=w$g(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},l$i.createPickDerivedCommand=function(e,t,i,n){var r,o;return e$2e(n)||(n={}),e$2e(n.pickCommand)&&(r=n.pickCommand.shaderProgram,o=n.pickCommand.renderState),n.pickCommand=i$$.shallowClone(t,n.pickCommand),e$2e(r)&&n.shaderProgramId===t.shaderProgram.id?(n.pickCommand.shaderProgram=r,n.pickCommand.renderState=o):(n.pickCommand.shaderProgram=H$k(i,t.shaderProgram,t.pickId),n.pickCommand.renderState=X$a(e,t.renderState),n.shaderProgramId=t.shaderProgram.id),e.pickPointEnabled&&t.pass===Le$q.S3MTiles&&(n.pickCommand.primitiveType=W$18.POINTS),n},l$i.createHdrCommand=function(e,t,i){var n;return e$2e(i)||(i={}),e$2e(i.command)&&(n=i.command.shaderProgram),i.command=i$$.shallowClone(e,i.command),e$2e(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=N$b(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},l$i.createPrepassDerivedCommand=function(e,t,i,n){var r;return e$2e(n)||(n={}),e$2e(n.command)&&(r=n.command.shaderProgram),n.command=i$$.shallowClone(t,n.command),e$2e(r)&&n.shaderProgramId===t.shaderProgram.id?n.command.shaderProgram=r:(n.command.shaderProgram=e._renderPipeline._prepassRenderer.getPrepassShaderProgram(i,t.shaderProgram),n.shaderProgramId=t.shaderProgram.id),n},l$i.createNormalDerivedCommand=function(e,t,i){var n;return e$2e(i)||(i={}),e$2e(i.command)&&(n=i.command.shaderProgram),i.command=i$$.shallowClone(e,i.command),e$2e(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=M$h(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},l$i.createMaskCommand=function(e,t,i){var n;return e$2e(i)||(i={}),e$2e(i.command)&&(n=i.command.shaderProgram),i.command=i$$.shallowClone(e,i.command),e$2e(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=A$h(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i};var b$l=new n$15,f$i=new n$15,A$g=new p$1e;function w$f(e,t,i,n){var r=e.direction,o=e.right,a=e.up,s=n$15.fromAxisAngle(r,i,f$i),l=n$15.fromAxisAngle(o,n,b$l),u=n$15.multiply(l,s,l),c=n$15.fromAxisAngle(a,t,f$i);n$15.multiply(c,u,u);var h=p$1e.fromQuaternion(u,A$g);p$1e.multiplyByVector(h,o,o),p$1e.multiplyByVector(h,a,a),p$1e.multiplyByVector(h,r,r)}function r$j(e){this.blobSize=u$Z(e,0)}h$g.prototype.update=function(){if(e$2e(this._alpha)){e$2e(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);var e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,i=this._lastGamma-this._gamma;w$f(this._scene.camera,-e,t,i),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma}},h$g.prototype.isDestroyed=function(){return!1},h$g.prototype.destroy=function(){return this._removeListener(),i$11(this)},r$j.prototype.isReady=function(){return!0},new e$2c,r$j.prototype.shouldDiscardImage=function(e){return e.blob.size===this.blobSize};var I$f="#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#endif\n\nuniform vec3 u_radii;\nuniform vec3 u_oneOverEllipsoidRadiiSquared;\n\nvarying vec3 v_positionEC;\n\nvec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)\n{\n vec3 positionEC = czm_pointAlongRay(ray, intersection);\n vec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;\n vec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));\n vec3 sphericalNormal = normalize(positionMC / u_radii);\n vec3 normalMC = geodeticNormal * side; // normalized surface normal (always facing the viewer) in model coordinates\n vec3 normalEC = normalize(czm_normal * normalMC); // normalized surface normal in eye coordiantes\n\n vec2 st = czm_ellipsoidWgs84TextureCoordinates(sphericalNormal);\n vec3 positionToEyeEC = -positionEC;\n\n czm_materialInput materialInput;\n materialInput.s = st.s;\n materialInput.st = st;\n materialInput.str = (positionMC + u_radii) / u_radii;\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n\n// #ifdef ONLY_SUN_LIGHTING\n //return czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);\n// #else\n return czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n// #endif\n}\n\nvoid main()\n{\n // PERFORMANCE_TODO: When dynamic branching is available, compute ratio of maximum and minimum radii\n // in the vertex shader. Only when it is larger than some constant, march along the ray.\n // Otherwise perform one intersection test which will be the common case.\n\n // Test if the ray intersects a sphere with the ellipsoid's maximum radius.\n // For very oblate ellipsoids, using the ellipsoid's radii for an intersection test\n // may cause false negatives. This will discard fragments before marching the ray forward.\n float maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;\n vec3 direction = normalize(v_positionEC);\n vec3 ellipsoidCenter = czm_modelView[3].xyz;\n\n float t1 = -1.0;\n float t2 = -1.0;\n\n float b = -2.0 * dot(direction, ellipsoidCenter);\n float c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;\n\n float discriminant = b * b - 4.0 * c;\n if (discriminant >= 0.0) {\n t1 = (-b - sqrt(discriminant)) * 0.5;\n t2 = (-b + sqrt(discriminant)) * 0.5;\n }\n\n if (t1 < 0.0 && t2 < 0.0) {\n discard;\n }\n\n float t = min(t1, t2);\n if (t < 0.0) {\n t = 0.0;\n }\n\n // March ray forward to intersection with larger sphere and find\n czm_ray ray = czm_ray(t * direction, direction);\n\n vec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);\n\n if (czm_isEmpty(intersection))\n {\n discard;\n }\n\n // If the viewer is outside, compute outsideFaceColor, with normals facing outward.\n vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);\n\n // If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.\n vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);\n\n gl_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);\n gl_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);\n\n#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\n t = (intersection.start != 0.0) ? intersection.start : intersection.stop;\n vec3 positionEC = czm_pointAlongRay(ray, t);\n vec4 positionCC = czm_projection * vec4(positionEC, 1.0);\n#ifdef LOG_DEPTH\n czm_writeLogDepth(1.0 + positionCC.w);\n#else\n float z = positionCC.z / positionCC.w;\n\n float n = czm_depthRange.near;\n float f = czm_depthRange.far;\n\n gl_FragDepthEXT = (z * (f - n) + f + n) * 0.5;\n#endif\n#endif\n#endif\n}\n",O$d="attribute vec3 position;\n\nuniform vec3 u_radii;\n\nvarying vec3 v_positionEC;\n\nvoid main()\n{\n // In the vertex data, the cube goes from (-1.0, -1.0, -1.0) to (1.0, 1.0, 1.0) in model coordinates.\n // Scale to consider the radii. We could also do this once on the CPU when using the BoxGeometry,\n // but doing it here allows us to change the radii without rewriting the vertex data, and\n // allows all ellipsoids to reuse the same vertex data.\n vec4 p = vec4(u_radii * position, 1.0);\n\n v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates\n gl_Position = czm_modelViewProjection * p; // position in clip coordinates\n\n // With multi-frustum, when the ellipsoid primitive is positioned on the intersection of two frustums\n // and close to terrain, the terrain (writes depth) in the closest frustum can overwrite part of the\n // ellipsoid (does not write depth) that was rendered in the farther frustum.\n //\n // Here, we clamp the depth in the vertex shader to avoid being overwritten; however, this creates\n // artifacts since some fragments can be alpha blended twice. This is solved by only rendering\n // the ellipsoid in the closest frustum to the viewer.\n gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);\n\n czm_vertexLogDepth();\n}\n",S$c={position:0};function p$c(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.center=o$1p.clone(u$Z(e.center,o$1p.ZERO)),this._center=new o$1p,this.radii=o$1p.clone(e.radii),this._radii=new o$1p,this._oneOverEllipsoidRadiiSquared=new o$1p,this._boundingSphere=new i$1d,this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=new p$1d,this._computedModelMatrix=new p$1d,this.show=u$Z(e.show,!0),this.material=u$Z(e.material,r$Y.fromType(r$Y.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.onlySunLighting=u$Z(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=u$Z(e.depthTestEnabled,!0),this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new i$$({owner:u$Z(e._owner,this)}),this._pickCommand=new i$$({owner:u$Z(e._owner,this),pickOnly:!0});var t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function q$e(e){var t=e.cache.ellipsoidPrimitive_vertexArray;if(e$2e(t))return t;var i=O$z.createGeometry(O$z.fromDimensions({dimensions:new o$1p(2,2,2),vertexFormat:n$13.POSITION_ONLY}));return t=c$13.fromGeometry({context:e,geometry:i,attributeLocations:S$c,bufferUsage:A$18.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}var C$f="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n";p$c.prototype.update=function(e){if(this.show&&e.mode===C$14.SCENE3D&&e$2e(this.center)&&e$2e(this.radii)){if(!e$2e(this.material))throw new t$15("this.material must be defined.");var t=e.context,i=this.material.isTranslucent(),n=this._translucent!==i;(!e$2e(this._rs)||n)&&(this._translucent=i,this._rs=d$1m.fromCache({cull:{enabled:!0,face:G$1a.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!i&&t.fragmentDepth,blending:i?Ee$r.ALPHA_BLEND:void 0})),e$2e(this._va)||(this._va=q$e(t));var r=!1,o=this.radii;if(!o$1p.equals(this._radii,o)){o$1p.clone(o,this._radii);var a=this._oneOverEllipsoidRadiiSquared;a.x=1/(o.x*o.x),a.y=1/(o.y*o.y),a.z=1/(o.z*o.z),r=!0}(!p$1d.equals(this.modelMatrix,this._modelMatrix)||!o$1p.equals(this.center,this._center))&&(p$1d.clone(this.modelMatrix,this._modelMatrix),o$1p.clone(this.center,this._center),p$1d.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),r=!0),r&&(o$1p.clone(o$1p.ZERO,this._boundingSphere.center),this._boundingSphere.radius=o$1p.maximumComponent(o),i$1d.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));var s=this._material!==this.material;this._material=this.material,this._material.update(t);var l=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;var u=e.useLogDepth,c=this._useLogDepth!==u;this._useLogDepth=u;var h,d,f=this._colorCommand;(s||l||n||c)&&(h=new s$V({name:"EllipsoidVS",sources:[O$d]}),d=new s$V({name:"EllipsoidFS",sources:[this.material.shaderSource,I$f]}),this.onlySunLighting&&d.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&d.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),d.defines.push("LOG_DEPTH"),d.sources.push(C$f)),this._sp=r$14.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:S$c}),f.vertexArray=this._va,f.renderState=this._rs,f.shaderProgram=this._sp,f.uniformMap=p$19(this._uniforms,this.material._uniforms),f.executeInClosestFrustum=i);var p=e.commandList,_=e.passes;if(_.render&&(f.boundingVolume=this._boundingSphere,f.debugShowBoundingVolume=this.debugShowBoundingVolume,f.modelMatrix=this._computedModelMatrix,f.pass=i?Le$q.TRANSLUCENT:Le$q.OPAQUE,p.push(f)),_.pick){var m=this._pickCommand;(!e$2e(this._pickId)||this._id!==this.id)&&(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(s||l||!e$2e(this._pickSP)||c)&&(h=new s$V({sources:[O$d]}),d=new s$V({sources:[this.material.shaderSource,I$f],pickColorQualifier:"uniform"}),this.onlySunLighting&&d.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&d.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),d.defines.push("LOG_DEPTH"),d.sources.push(C$f)),this._pickSP=r$14.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:S$c}),m.vertexArray=this._va,m.renderState=this._rs,m.shaderProgram=this._pickSP,m.uniformMap=p$19(p$19(this._uniforms,this._pickUniforms),this.material._uniforms),m.executeInClosestFrustum=i),m.boundingVolume=this._boundingSphere,m.modelMatrix=this._computedModelMatrix,m.pass=i?Le$q.TRANSLUCENT:Le$q.OPAQUE,p.push(m)}}},p$c.prototype.isDestroyed=function(){return!1},p$c.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),i$11(this)};var te$7="layout(location=0) in vec3 pos;\nlayout(location=2) in vec2 lonLat;\nlayout(location=3) in vec2 life;\nlayout(location=4) in vec2 texCoord;\nuniform float pointSize;\nuniform float uFieldTextureSize;\nuniform float uMaxFilterValue;\nuniform float uMinFilterValue;\nuniform vec4 particleColor;\nuniform sampler2D velocityTexture;\nuniform sampler2D colorTable;\nuniform float uHasColorTable;\nuniform float uCeil;\nuniform float uFloor;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 lonlatRange;\nout vec4 velocityColor;\nout vec2 outTexCoord;\nfloat computerOnePixelLength(vec3 inPos)\n{\nvec4 viewPos = czm_view * vec4(inPos, 1.0);\nvec4 winPos = czm_projection * viewPos;\nfloat dwidth = czm_metersPerPixel(viewPos);\nwinPos.x = winPos.x - 2.0 * dwidth;\nvec4 newViewPos = czm_inverseProjection * winPos;\nreturn length(viewPos - newViewPos);\n}\nvec4 computePos(vec3 v3Normal, vec3 inPos)\n{\nvec4 viewPos = czm_view * vec4(inPos, 1.0);\n#ifdef SIZEFIXED\nviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength(inPos) * uFieldTextureSize;\n#else\nviewPos.xyz = viewPos.xyz + v3Normal * uFieldTextureSize;\n#endif\nviewPos.xyz = viewPos.xyz * 0.9;\nreturn czm_projection * viewPos;\n}\nvoid main()\n{\nvec3 relativeOriginPos = pos - czm_relativeOrigin;\nvec2 lonLatTexCoord;\n#ifdef TEXTUREEFFECT\nlonLatTexCoord.x = (lonLat.x + czm_pi) / czm_twoPi;\nlonLatTexCoord.y = (lonLat.y + czm_piOverTwo) / czm_pi;\n#else\nlonLatTexCoord.x = (lonLat.x - lonlatRange.x) / (lonlatRange.z - lonlatRange.x);\nlonLatTexCoord.y = (lonLat.y - lonlatRange.y) / (lonlatRange.w - lonlatRange.y);\n#endif\nvec2 velocity = texture(velocityTexture, lonLatTexCoord).xy;\nfloat velocitySize = length(velocity);\nfloat threshold = abs(uCeil - uFloor);\nfloat contourRate = (velocitySize - uFloor) / threshold;\nfloat finalCoord = clamp(contourRate, 0.0, 1.0);\nvelocityColor = mix(particleColor, texture(colorTable, vec2(0.0, finalCoord)).rgba, uHasColorTable);\noutTexCoord= texCoord;\nvec3 upAxis = normalize(relativeOriginPos);\nvec3 eastAxis = cross(vec3(0.0, 0.0, 1.0), upAxis);\neastAxis = normalize(eastAxis);\nvec3 northAxis = cross(upAxis, eastAxis);\nnorthAxis = normalize(northAxis);\n#ifdef FILTER\nif(velocitySize > uMaxFilterValue || velocitySize < uMinFilterValue){\nvelocityColor.a = 0.0;\n}\n#endif\n#ifdef TEXTUREEFFECT\nvec3 nestPos = relativeOriginPos + northAxis * velocity.y * deltaTime * velocityScale + eastAxis * velocity.x * deltaTime * velocityScale;\nvec4 nextPrjPos = czm_viewProjection * vec4(nestPos, 1.0);\nvec4 curPrjPos = czm_viewProjection * vec4(relativeOriginPos, 1.0);\nvec2 direction = normalize(nextPrjPos.xy - curPrjPos.xy);\nfloat cosx = dot(direction, vec2(1.0, 0.0));\nfloat cosy = dot(direction, vec2(0.0, 1.0));\nfloat sinx = sqrt(1.0- cosx*cosx);\nfloat cosYBiggerThan0 = sign(cosy);\nmat2 mat = mat2(cosx, sinx * cosYBiggerThan0, -sinx * cosYBiggerThan0, cosx);\nvec2 realNormal = mat * texCoord.xy;\ngl_Position = computePos(vec3(realNormal.xy, 0.0), relativeOriginPos);\n#else\ngl_PointSize = pointSize;\ngl_Position = czm_viewProjection * vec4(relativeOriginPos, 1);\n#endif\n}\n\n",re$9="layout(location=0) in vec3 pos;\nlayout(location=3) in vec2 texCoord;\nuniform float pointSize;\nuniform float uFieldTextureSize;\nuniform float uMaxFilterValue;\nuniform float uMinFilterValue;\nuniform vec4 particleColor;\nuniform sampler2D velocityTexture;\nuniform sampler2D colorTable;\nuniform float uHasColorTable;\nuniform float uCeil;\nuniform float uFloor;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 uXYBounds;\nuniform vec2 uZBounds;\nuniform float uTextureDepth;\nout vec4 velocityColor;\nout vec2 outTexCoord;\n\nfloat computerOnePixelLength()\n{\n vec4 viewPos = czm_modelView * vec4(pos, 1.0);\n vec4 winPos = czm_projection * viewPos;\n float dwidth = czm_metersPerPixel(viewPos);\n winPos.x = winPos.x - 2.0 * dwidth;\n vec4 newViewPos = czm_inverseProjection * winPos;\n return length(viewPos - newViewPos);\n}\n\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = czm_modelView * vec4(pos, 1.0);\n#ifdef SIZEFIXED\n viewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength() * uFieldTextureSize;\n#else\n viewPos.xyz = viewPos.xyz + v3Normal * uFieldTextureSize;\n#endif\n viewPos.xyz = viewPos.xyz * 0.9;\n return czm_projection * viewPos;\n}\n\nvoid main()\n{\n vec2 velocityTexCoord;\n velocityTexCoord.x = (pos.x - uXYBounds.x) / (uXYBounds.z - uXYBounds.x);\n velocityTexCoord.y = (pos.y - uXYBounds.y) / (uXYBounds.w - uXYBounds.y);\n float texCoordZ = pos.z / (uZBounds.y - uZBounds.x);\n float texCoordStep = 1.0 / uTextureDepth;\n float timesZ = floor(texCoordZ / texCoordStep);\n velocityTexCoord.x /= uTextureDepth;\n velocityTexCoord.x += texCoordStep * timesZ;\n vec3 velocity = texture(velocityTexture, velocityTexCoord).xyz;\n float velocitySize = length(velocity);\n float threshold = abs(uCeil - uFloor);\n float contourRate = (velocitySize - uFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n velocityColor = mix(particleColor, texture(colorTable, vec2(0.0, finalCoord)).rgba, uHasColorTable);\n outTexCoord= texCoord;\n#ifdef FILTER\n if(velocitySize > uMaxFilterValue || velocitySize < uMinFilterValue)\n {\n velocityColor.a = 0.0;\n }\n#endif\n if(pos.x > uXYBounds.z || pos.x < uXYBounds.x || pos.y > uXYBounds.w || pos.y < uXYBounds.y || pos.z < uZBounds.x || pos.z > uZBounds.y)\n {\n velocityColor.a = 0.0;\n }\n#ifdef TEXTUREEFFECT\n vec3 nextPos = pos.xyz + velocity.xyz * deltaTime * velocityScale;\n vec4 nextPrjPos = czm_modelViewProjection * vec4(nextPos, 1.0);\n vec4 curPrjPos = czm_modelViewProjection * vec4(pos, 1.0);\n vec2 direction = normalize(nextPrjPos.xy - curPrjPos.xy);\n float cosx = dot(direction, vec2(1.0, 0.0));\n float cosy = dot(direction, vec2(0.0, 1.0));\n float sinx = sqrt(1.0- cosx*cosx);\n float cosYBiggerThan0 = sign(cosy);\n mat2 mat = mat2(cosx, sinx * cosYBiggerThan0, -sinx * cosYBiggerThan0, cosx);\n vec2 realNormal = mat * texCoord.xy;\n gl_Position = computePos(vec3(realNormal.xy, 0.0));\n#else\n gl_PointSize = pointSize;\n gl_Position = czm_modelViewProjection * vec4(pos, 1);\n#endif\n}",ie$5="precision mediump float;\nin vec4 velocityColor;\nin vec2 outTexCoord;\nout vec4 FragColor;\nuniform sampler2D uFieldTexture;\nvoid main()\n{\nFragColor = velocityColor;\n#ifdef TEXTUREEFFECT\nFragColor = texture(uFieldTexture, outTexCoord) * velocityColor;\n#endif\n}\n",ae$7="precision highp float;\nlayout(location=0) in vec3 pos;\nlayout(location=1) in vec3 oriPos;\nlayout(location=2) in vec2 lonLat;\nlayout(location=3) in vec2 life;\nout vec3 tf_pos;\nout vec3 tf_oriPos;\nout vec2 tf_lonLat;\nout vec2 tf_life;\nuniform sampler2D velocityTexture;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec2 velocityTexRes;\nuniform vec4 lonlatRange;\n\nfloat fastAtan2(float y, float x)\n{\n float ax = abs(x);\n float ay = abs(y);\n float a = min(ax, ay) / (max(ax, ay) + 1e-18);\n //float s = a * a;\n float r = ((-0.0464964749 * a * a + 0.15931422) * a * a - 0.327622764) * a * a * a + a;\n if(ay > ax){\n r = 1.57079637 - r;\n }\n if(x < 0.0){\n r = 3.14159274 - r;\n }\n if(y < 0.0){\n r = -r;\n }\n return r;\n}\n\nvec3 ComputeLatLonFromPos(vec3 pos)\n{\n float rho = sqrt(pos.x * pos.x + pos.y * pos.y + pos.z * pos.z);\n if (rho < 0.00001)\n {\n return vec3(0.0);\n }\n float longitude = fastAtan2(pos.y, pos.x);\n float latitude = asin(pos.z / rho);\n return vec3(longitude,latitude,rho);\n}\n\nvec2 lookup_wind(const vec2 uv)\n{\n vec2 px = 1.0 / velocityTexRes;\n vec2 vc = (floor(uv * velocityTexRes)) * px;\n vec2 f = fract(uv * velocityTexRes);\n vec2 tl = texture(velocityTexture, vc).rg;\n vec2 tr = texture(velocityTexture, vc + vec2(px.x, 0)).rg;\n vec2 bl = texture(velocityTexture, vc + vec2(0, px.y)).rg;\n vec2 br = texture(velocityTexture, vc + px).rg;\n return mix(mix(tl, tr, f.x), mix(bl, br, f.x), f.y);\n}\n\nvoid main()\n{\n vec2 lonLatTexCoord;\n#ifdef TEXTUREEFFECT\n lonLatTexCoord.x = (lonLat.x + czm_pi) / czm_twoPi;\n lonLatTexCoord.y = (lonLat.y + czm_piOverTwo) / czm_pi;\n#else\n lonLatTexCoord.x = (lonLat.x - lonlatRange.x) / (lonlatRange.z - lonlatRange.x);\n lonLatTexCoord.y = (lonLat.y - lonlatRange.y) / (lonlatRange.w - lonlatRange.y);\n#endif\n vec2 velocity = lookup_wind(lonLatTexCoord);\n vec3 upAxis = normalize(pos);\n vec3 eastAxis = cross(vec3(0.0, 0.0, 1.0), upAxis);\n eastAxis = normalize(eastAxis);\n vec3 northAxis = cross(upAxis, eastAxis);\n northAxis = normalize(northAxis);\n if(life.x > life.y)\n {\n tf_pos = oriPos;\n tf_life.x = 0.0;\n tf_life.y = life.y;\n }\n else\n {\n tf_pos = pos + northAxis * velocity.y * deltaTime * velocityScale + eastAxis * velocity.x * deltaTime * velocityScale;\n tf_life.x += life.x + deltaTime;\n tf_life.y = life.y;\n }\n tf_oriPos = oriPos;\n tf_lonLat = ComputeLatLonFromPos(tf_pos).xy;\n#ifndef TEXTUREEFFECT\n vec2 s = step(lonlatRange.xy, tf_lonLat);\n vec2 t = step(tf_lonLat, lonlatRange.zw);\n if (s.x * s.y * t.x * t.y < 1.0) {\n tf_life.x = life.y + 1.0;\n }\n#endif\n}\n\n\n",oe$7="precision highp float;\nlayout(location=0) in vec3 pos;\nlayout(location=1) in vec3 oriPos;\nlayout(location=2) in vec2 life;\nout vec3 tf_pos;\nout vec3 tf_oriPos;\nout vec2 tf_life;\nuniform sampler2D velocityTexture;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 uXYBounds;\nuniform vec2 uZBounds;\nuniform float uTextureDepth;\n\nvoid main()\n{\n vec2 velocityTexCoord;\n velocityTexCoord.x = (pos.x - uXYBounds.x) / (uXYBounds.z - uXYBounds.x);\n velocityTexCoord.y = (pos.y - uXYBounds.y) / (uXYBounds.w - uXYBounds.y);\n float texCoordZ = pos.z / (uZBounds.y - uZBounds.x);\n float texCoordStep = 1.0 / uTextureDepth;\n float timesZ = floor(texCoordZ / texCoordStep);\n velocityTexCoord.x /= uTextureDepth;\n velocityTexCoord.x += texCoordStep * timesZ;\n vec3 velocity = texture(velocityTexture, velocityTexCoord).xyz;\n if(life.x > life.y)\n {\n tf_pos = oriPos;\n tf_life.x = 0.0;\n tf_life.y = life.y;\n }\n else\n {\n tf_pos.xyz = pos.xyz + velocity.xyz * deltaTime * velocityScale;\n tf_life.x += life.x + deltaTime;\n tf_life.y = life.y;\n }\n tf_oriPos = oriPos;\n}",ne$8="precision highp float;\nout vec4 FragColor;\nvoid main() {}\n",le$a="uniform sampler2D u_lastColorTexture;\nuniform sampler2D u_colorTexture;\nuniform float u_opacity;\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color = texture2D(u_colorTexture, v_textureCoordinates);\n vec4 lastColor = texture2D(u_lastColorTexture, v_textureCoordinates);\n vec4 outColor = color*color.a + lastColor * (1.0 - color.a);\n float alpha = outColor.a * u_opacity;\n gl_FragColor = vec4(outColor.rgb, alpha < 0.1 ? 0.0 : alpha);\n}\n";function P$g(e){if(!e._webgl2)throw new t$15("webgl2 is not supported.");this._context=e,this._show=!0,this._filter=!1,this._MaxFilterValue=Number.MAX_VALUE,this._MinFilterValue=Number.MIN_VALUE,this._paricleCountPerDegree=1,this._lifeRange=[5e3,1e4],this._particleColor=new e$1X(1,1,0,1),this._particleSize=5,this._velocityScale=1,this._velocityTexRes=new o$1o(0,0),this._velocityField=void 0,this._dictColorTable=void 0,this._floor=0,this._ceil=10,this._hasColorTable=0,this._hypsometricTexture=void 0,this._dataBounds=h$18.MAX_VALUE,this._zBounds=new o$1o(0,1),this._transformFeedback=void 0,this._normalShaderProgram=void 0,this._feedbackShaderProgram=void 0,this._currentTime=0,this._deltaTime=0,this._transformFeedbackInitialized=!1,this._fieldInitialized=!1,this._fieldDataIndices=void 0,this._textureEffect=!1,this._textureEffectUrl=n$17("Assets/Textures/arrow.png"),this._fieldTexture=void 0,this._fieldTextureSize=30,this._sizeFixed=!0,this._sceneMode=C$14.SCENE3D,this._showParticleTrails=!0,this._fadeOpacity=.98,this._curParticleStateTexture=void 0,this._lastParticleStateTexture=void 0,this._tmpParticleStateTexture=void 0,this._curParticleTextureBuffer=void 0,this._lastParticleTextureBuffer=void 0,this._tmpParticleTextureBuffer=void 0,this._clearCommand=void 0,this._copyColorCommand=void 0,this._copyLastColorCommand=void 0,this._hdrEnable=!1}var de$5=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);Object.defineProperties(P$g.prototype,{fieldTextureSize:{get:function(){return this._fieldTextureSize},set:function(e){this._fieldTextureSize=e}},sizeFixed:{get:function(){return this._sizeFixed},set:function(e){this._sizeFixed=e,this._transformFeedbackInitialized=!1}},textureEffect:{get:function(){return this._textureEffect},set:function(e){this._textureEffect=e,this._transformFeedbackInitialized=!1}},textureEffectUrl:{get:function(){return this._textureEffectUrl},set:function(e){this._textureEffectUrl=e,this._fieldTexture=void 0}},show:{get:function(){return this._show},set:function(e){this._show=e}},filter:{get:function(){return this._filter},set:function(e){this._filter=e,this._transformFeedbackInitialized=!1}},MaxFilterValue:{get:function(){return this._MaxFilterValue},set:function(e){this._MaxFilterValue=e}},MinFilterValue:{get:function(){return this._MinFilterValue},set:function(e){this._MinFilterValue=e}},paricleCountPerDegree:{get:function(){return this._paricleCountPerDegree},set:function(e){this._paricleCountPerDegree=e,this._transformFeedbackInitialized=!1}},particleLifeRange:{get:function(){return this._lifeRange},set:function(e){this._lifeRange=e,this._transformFeedbackInitialized=!1}},particleColor:{get:function(){return this._particleColor},set:function(e){this._particleColor=e}},particleSize:{get:function(){return this._particleSize},set:function(e){this._particleSize=e}},velocityScale:{get:function(){return this._velocityScale},set:function(e){this._velocityScale=e}},colorTable:{get:function(){return this._dictColorTable},set:function(e){if(!e$2e(e))return e$2e(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),void(this._hasColorTable=0);this._dictColorTable=i$T.clone(e,this._dictColorTable);var t=this._dictColorTable.count();if(t<1)this._hasColorTable=0;else{e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:this._context,width:1024,height:64,pixelFormat:V$12.RGBA})),e$2e(this._dictColorTable)&&(this._dictColorTable.generateBuffer(),e$2e(this._hypsometricTexture)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._dictColorTable._imageBuffer}));var i=0,n=0,r=this._dictColorTable.getItem(0);e$2e(r)&&e$2e(r.altitude)&&(i=parseFloat(r.altitude)),e$2e(r=this._dictColorTable.getItem(t-1))&&e$2e(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n),this._hasColorTable=1}}}}),P$g.prototype.update=function(e){if(this._show&&e$2e(this._velocityField)){if(this._sceneMode!==e.camera._mode&&(this._sceneMode=e.camera._mode,this._transformFeedbackInitialized=!1),this._textureEffect&&e$2e(this._textureEffectUrl)&&!e$2e(this._fieldTexture)){var t=this;o$1l(t$S(this._textureEffectUrl),(function(e){t._fieldTexture=new t$U({context:t._context,source:e,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT})}),t._transformFeedbackInitialized=!1}))}this._fieldInitialized||(this._createVectorFieldTexture(this._context,this._velocityField),this._fieldInitialized=!0),this._transformFeedbackInitialized||(this._createTransformFeedback(this._context,e),this._transformFeedbackInitialized=!0),e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:this._context,width:1,height:1024,pixelFormat:V$12.RGBA}));var i=(new Date).getTime(),n=i-this._currentTime;this._currentTime=i,this._deltaTime=n,e$2e(this._transformFeedback)&&e.commandList.push(this._transformFeedback)}},P$g.prototype._setVelocityField=function(e){this._velocityField=e,this._fieldInitialized=!1},P$g.prototype._setDataBounds=function(e){this._dataBounds=e,this._transformFeedbackInitialized=!1},P$g.prototype._setZBounds=function(e){this._zBounds=e,this._transformFeedbackInitialized=!1};var ce$a=/\s+czm_writeLogDepth\(/,_e$5=/\s+czm_vertexLogDepth\(/,me$a=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;function pe$9(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!e$2e(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();r.defines=e$2e(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),o.defines=e$2e(o.defines)?o.defines.slice(0):[],o.defines.push("LOG_DEPTH");var a,s=!1,l=r.sources,u=l.length;for(a=0;a<u;++a)if(_e$5.test(l[a])){s=!0;break}if(!s){for(a=0;a<u;++a)l[a]=s$V.replaceMain(l[a],"czm_log_depth_main");"\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n",l.push("\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n")}for(s=!1,u=(l=o.sources).length,a=0;a<u;++a)ce$a.test(l[a])&&(s=!0),me$a.test(l[a]);var c="";if(!s){for(a=0;a<u;a++)l[a]=s$V.replaceMain(l[a],"czm_log_depth_main");c+="\nvoid main() \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(); \n} \n"}l.push(c),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i}P$g.prototype._createTransformFeedback=function(e,t){e$2e(this._transformFeedback)&&this._transformFeedback.destroy();var i,n,r=[];this._sceneMode!==C$14.SCENE3D?(i=new s$V({sources:[oe$7]}),n=new s$V({sources:[re$9]}),r=["tf_pos","tf_oriPos","tf_life"]):(i=new s$V({sources:[ae$7]}),n=new s$V({sources:[te$7]}),r=["tf_pos","tf_oriPos","tf_lonLat","tf_life"]);var o,a=new s$V({sources:[ie$5]});this._textureEffect&&(i.defines.push("TEXTUREEFFECT"),n.defines.push("TEXTUREEFFECT"),a.defines.push("TEXTUREEFFECT")),this._filter&&n.defines.push("FILTER"),this._sizeFixed&&n.defines.push("SIZEFIXED"),this._normalShaderProgram=r$14.fromCache({context:e,vertexShaderSource:n,fragmentShaderSource:a}),t.useLogDepth&&(this._normalShaderProgram=pe$9(e,this._normalShaderProgram)),this._feedbackShaderProgram=r$14.fromCache({context:e,vertexShaderSource:i,fragmentShaderSource:ne$8,transformFeedbackVaryings:r,bufferMode:de$y.SEPARATE_ATTRIBS}),o=this._textureEffect?this._sceneMode!==C$14.SCENE3D?this._createLocalTextureVertexAttributes():this._createGlobalTextureVertexAttributes():this._sceneMode!==C$14.SCENE3D?this._createLocalVertexAttributes():this._createGlobalVertexAttributes();var s=this._createFeedbackShaderUniformMap(),l=this._createNormalShaderUniformMap(),u=d$1m.fromCache({depthTest:{enabled:!0},depthMask:!1,blending:Ee$r.ALPHA_BLEND}),c=this._computeTotalParticleCount();this._transformFeedback=new s$i({pointCount:c,indices:this._fieldDataIndices,textureEffect:this._textureEffect,attributes:o,primitiveMode:this._textureEffect?de$y.TRIANGLES:de$y.POINTS,renderState:u,feedbackShader:this._feedbackShaderProgram,normalShader:this._normalShaderProgram,normalShaderUniformMap:l,feedbackShaderUniformMap:s,modelMatrix:this._sceneMode===C$14.SCENE3D?p$1d.IDENTITY:de$5,fadeOpacity:this._fadeOpacity}),this._transformFeedback._drawEvent.addEventListener(this.drawParticleTrails,this)},P$g.prototype._createGlobalVertexAttributes=function(){var e,t,i,n,r,o,a,s,l;e=e$2d.toDegrees(this._dataBounds.width),t=e$2d.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x,n=e$2d.toDegrees(this._dataBounds.west),r=e$2d.toDegrees(this._dataBounds.south),o=this._zBounds.x;for(var u=(a=Math.ceil(this._paricleCountPerDegree*e))*(s=Math.ceil(this._paricleCountPerDegree*t))*(l=Math.ceil(this._paricleCountPerDegree*i)),c=new Float32Array(3*u),h=new Float32Array(3*u),d=new Float32Array(2*u),f=new Float32Array(2*u),p=0,_=0;_<s;_++)for(var m=0;m<a;m++)for(var g=0;g<l;g++,p++){var x=n+m*(e/a),y=r+_*(t/s),v=o+g*(i/l),$=new o$1p.fromDegrees(x,y,v);c[3*p]=$.x,c[3*p+1]=$.y,c[3*p+2]=$.z,h[3*p]=$.x,h[3*p+1]=$.y,h[3*p+2]=$.z,d[2*p]=e$2d.toRadians(x),d[2*p+1]=e$2d.toRadians(y);var b=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];f[2*p]=0,f[2*p+1]=b}this.lonlatRange=new e$2c(d[0],d[1],d[d.length-2],d[d.length-1]);var T=[];return T.push({index:0,componentsPerAttribute:3,data:c}),T.push({index:1,componentsPerAttribute:3,data:h}),T.push({index:2,componentsPerAttribute:2,data:d}),T.push({index:3,componentsPerAttribute:2,data:f}),T},P$g.prototype._createLocalVertexAttributes=function(){var e,t,i,n,r,o,a,s,l;e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x,n=this._dataBounds.west,r=this._dataBounds.south,o=this._zBounds.x;for(var u=(a=Math.ceil(this._paricleCountPerDegree*e))*(s=Math.ceil(this._paricleCountPerDegree*t))*(l=Math.ceil(this._paricleCountPerDegree*i)),c=new Float32Array(3*u),h=new Float32Array(3*u),d=new Float32Array(2*u),f=0,p=0;p<s;p++)for(var _=0;_<a;_++)for(var m=0;m<l;m++,f++){var g=n+_*(e/(a-1)),x=r+p*(t/(s-1)),y=o+m*(i/l);c[3*f]=g,c[3*f+1]=x,c[3*f+2]=y,h[3*f]=g,h[3*f+1]=x,h[3*f+2]=y;var v=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];d[2*f]=0,d[2*f+1]=v}var $=[];return $.push({index:0,componentsPerAttribute:3,data:c}),$.push({index:1,componentsPerAttribute:3,data:h}),$.push({index:2,componentsPerAttribute:2,data:d}),$},P$g.prototype._createGlobalTextureVertexAttributes=function(){for(var e=e$2d.toDegrees(this._dataBounds.width),t=e$2d.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x,n=e$2d.toDegrees(this._dataBounds.west),r=e$2d.toDegrees(this._dataBounds.south),o=this._zBounds.x,a=Math.ceil(this._paricleCountPerDegree*t),s=Math.ceil(this._paricleCountPerDegree*e),l=Math.ceil(this._paricleCountPerDegree*i),u=a*s*l*4,c=new Uint32Array(u/4*6),h=new Float32Array(2*u),d=new Float32Array(3*u),f=new Float32Array(3*u),p=new Float32Array(2*u),_=new Float32Array(2*u),m=0,g=0;g<a;g++)for(var x=0;x<s;x++)for(var y=0;y<l;y++,m++){for(var v=n+x*(e/(s-1)),$=r+g*(t/(a-1)),b=o+y*(i/l),T=new o$1p.fromDegrees(v,$,b),C=0;C<12;C+=3)d[12*m+C]=T.x,d[12*m+C+1]=T.y,d[12*m+ +C+2]=T.z;for(C=0;C<12;C+=3)f[12*m+C]=T.x,f[12*m+C+1]=T.y,f[12*m+ +C+2]=T.z;for(C=0;C<8;C+=2)p[8*m+C]=e$2d.toRadians(v),p[8*m+C+1]=e$2d.toRadians($);var S=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];_[8*m]=0,_[8*m+1]=S,_[8*m+2]=0,_[8*m+3]=S,_[8*m+4]=0,_[8*m+5]=S,_[8*m+6]=0,_[8*m+7]=S}for(x=0;x<c.length;x++)c[6*x]=4*x,c[6*x+1]=4*x+1,c[6*x+2]=4*x+2,c[6*x+3]=4*x,c[6*x+4]=4*x+2,c[6*x+5]=4*x+3;this._fieldDataIndices=c;for(m=0,y=0;y<h.length;y+=8,m++)h[8*m]=0,h[8*m+1]=0,h[8*m+2]=0,h[8*m+3]=1,h[8*m+4]=1,h[8*m+5]=1,h[8*m+6]=1,h[8*m+7]=0;var w=[];return w.push({index:0,componentsPerAttribute:3,data:d}),w.push({index:1,componentsPerAttribute:3,data:f}),w.push({index:2,componentsPerAttribute:2,data:p}),w.push({index:3,componentsPerAttribute:2,data:_}),w.push({index:4,componentsPerAttribute:2,data:h}),w},P$g.prototype._createLocalTextureVertexAttributes=function(){for(var e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x,n=this._dataBounds.west,r=this._dataBounds.south,o=this._zBounds.x,a=Math.ceil(this._paricleCountPerDegree*e),s=Math.ceil(this._paricleCountPerDegree*t),l=Math.ceil(this._paricleCountPerDegree*i),u=s*a*l*4,c=new Uint32Array(u/4*6),h=new Float32Array(2*u),d=new Float32Array(3*u),f=new Float32Array(3*u),p=new Float32Array(2*u),_=0,m=0;m<s;m++)for(var g=0;g<a;g++)for(var x=0;x<l;x++,_++){for(var y=n+g*(e/(a-1)),v=r+m*(t/(s-1)),$=o+x*(i/l),b=0;b<12;b+=3)d[12*_+b]=y,d[12*_+b+1]=v,d[12*_+ +b+2]=$;for(b=0;b<12;b+=3)f[12*_+b]=y,f[12*_+b+1]=v,f[12*_+ +b+2]=$;var T=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];p[8*_]=0,p[8*_+1]=T,p[8*_+2]=0,p[8*_+3]=T,p[8*_+4]=0,p[8*_+5]=T,p[8*_+6]=0,p[8*_+7]=T}for(g=0;g<c.length;g++)c[6*g]=4*g,c[6*g+1]=4*g+1,c[6*g+2]=4*g+2,c[6*g+3]=4*g,c[6*g+4]=4*g+2,c[6*g+5]=4*g+3;this._fieldDataIndices=c;for(_=0,x=0;x<h.length;x+=8,_++)h[8*_]=0,h[8*_+1]=0,h[8*_+2]=0,h[8*_+3]=1,h[8*_+4]=1,h[8*_+5]=1,h[8*_+6]=1,h[8*_+7]=0;var C=[];return C.push({index:0,componentsPerAttribute:3,data:d}),C.push({index:1,componentsPerAttribute:3,data:f}),C.push({index:2,componentsPerAttribute:2,data:p}),C.push({index:3,componentsPerAttribute:2,data:h}),C},P$g.prototype._computeTotalParticleCount=function(){if(this._sceneMode!==C$14.SCENE3D){var e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x;return Math.ceil(this._paricleCountPerDegree*e)*Math.ceil(this._paricleCountPerDegree*t)*Math.ceil(this._paricleCountPerDegree*i)}e=e$2d.toDegrees(this._dataBounds.width),t=e$2d.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x;return Math.ceil(this._paricleCountPerDegree*e)*Math.ceil(this._paricleCountPerDegree*t)*Math.ceil(this._paricleCountPerDegree*i)};var B$b=new e$2c;function i$g(e){o$1q.defined("context",e),this._context=e,this._fieldData=void 0,this._NetCDFData=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._layerBounds=h$18.MAX_VALUE,this._visible=!0,this._type="FieldLayer3D",this._particleVelocityFieldEffect=new P$g(e)}P$g.prototype._createFeedbackShaderUniformMap=function(){var e=this;return{velocityTexture:function(){return e._vectorFieldTexture},velocityScale:function(){return e._velocityScale},velocityTexRes:function(){return e._velocityTexRes},deltaTime:function(){return e._deltaTime},uXYBounds:function(){return B$b.x=e._dataBounds.west,B$b.y=e._dataBounds.south,B$b.z=e._dataBounds.east,B$b.w=e._dataBounds.north,B$b},uZBounds:function(){return e._zBounds},uTextureDepth:function(){return e._texZDepth},lonlatRange:function(){return e.lonlatRange}}},P$g.prototype._createNormalShaderUniformMap=function(){var e=this;return{particleColor:function(){return e._particleColor},pointSize:function(){return e._particleSize},uMaxFilterValue:function(){return e._MaxFilterValue},uMinFilterValue:function(){return e._MinFilterValue},uFieldTexture:function(){return e$2e(e._fieldTexture)?e._fieldTexture:new t$U({context:e._context,width:1,height:1})},uFieldTextureSize:function(){return e._fieldTextureSize},velocityTexture:function(){return e._vectorFieldTexture},colorTable:function(){return e._hypsometricTexture},lonlatRange:function(){return e.lonlatRange},uFloor:function(){return e._floor},uCeil:function(){return e._ceiling},uHasColorTable:function(){return e._hasColorTable},velocityScale:function(){return e._velocityScale},deltaTime:function(){return e._deltaTime},uXYBounds:function(){return B$b.x=e._dataBounds.west,B$b.y=e._dataBounds.south,B$b.z=e._dataBounds.east,B$b.w=e._dataBounds.north,B$b},uZBounds:function(){return e._zBounds},uTextureDepth:function(){return e._texZDepth}}},P$g.prototype._createVectorFieldTexture=function(e,t){e$2e(this._vectorFieldTexture)&&this._vectorFieldTexture.destroy();var i,n=0,r=0;if(t instanceof Array&&(n=(i=this._createCanvasFromDataMatrix(t)).width,r=i.height,!i))return!1;this._velocityTexRes.x=n,this._velocityTexRes.y=r,this._vectorFieldTexture=new t$U({context:e,width:n,height:r,pixelFormat:V$12.RGB,pixelDatatype:_$_.FLOAT}),this._vectorFieldTexture.copyFrom({width:n,height:r,arrayBufferView:i.imageData})},P$g.prototype._createCanvasFromDataMatrix=function(e){var t=e.length;if(!(e[0]instanceof Array))return null;var i,n,r,o,a,s,l,u=e[0].length;if(!(e[0][0]instanceof Array))return null;if(e[0][0][0]instanceof Array){var c=u,h=t,d=e[0][0].length;for(this._texZDepth=d,s=new Float32Array(h*c*d*3),o=0,i=0;i<c;i++)for(n=0;n<d;n++)for(r=0;r<h;r++){var f=null==(l=e[r][i][n]).x?l[0]:l.x,p=null==l.y?l[1]:l.y,_=null==l.z?l[2]:l.z;s[o++]=f,s[o++]=p,s[o++]=_}a={height:c,width:d*h,imageData:s}}else{for(s=new Float32Array(t*u*3),o=0,n=0;n<t;n++)for(i=0;i<u;i++){var m=null==(l=e[n][i]).x?l[0]:l.x,g=null==l.y?l[1]:l.y;s[o++]=m,s[o++]=g,s[o++]=0}a={height:t,width:u,imageData:s}}return a},P$g.prototype.createParticleTrailsResources=function(e,t){if(this._showParticleTrails&&(!e$2e(this._lastParticleStateTexture)||this._lastParticleStateTexture.width!==e.drawingBufferWidth||this._lastParticleStateTexture.height!==e.drawingBufferHeight)){e$2e(this._lastParticleStateTexture)&&(this._lastParticleStateTexture.width!==e.drawingBufferWidth||this._lastParticleStateTexture.height!==e.drawingBufferHeight)&&this.destroyParticleTrailsResources();var i=_$_.UNSIGNED_BYTE;this._hdrEnable&&(i=_$_.FLOAT),this._curParticleStateTexture=new t$U({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:V$12.RGBA}),this._lastParticleStateTexture=new t$U({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:V$12.RGBA}),this._tmpParticleStateTexture=new t$U({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:V$12.RGBA});var n=u$Z(this._transformFeedback._framebuffer,t.framebuffer);this._curParticleTextureBuffer=new t$V({context:e,colorTextures:[this._curParticleStateTexture],depthStencilTexture:n.depthStencilTexture,destroyAttachments:!1}),this._lastParticleTextureBuffer=new t$V({context:e,colorTextures:[this._lastParticleStateTexture],destroyAttachments:!1}),this._tmpParticleTextureBuffer=new t$V({context:e,colorTextures:[this._tmpParticleStateTexture],destroyAttachments:!1}),this._clearCommand=new t$W({color:new e$1X(0,0,0,0),renderState:d$1m.fromCache()});var r=this._lastParticleStateTexture,o=this._tmpParticleTextureBuffer;this._copyLastColorCommand=e.createViewportQuadCommand(ie$7,{uniformMap:{colorTexture:function(){return r}},framebuffer:o});var a=this._tmpParticleStateTexture,s=this._curParticleStateTexture,l=this._lastParticleTextureBuffer,u=this._fadeOpacity;this._copyColorCommand=e.createViewportQuadCommand(le$a,{uniformMap:{u_lastColorTexture:function(){return a},u_colorTexture:function(){return s},u_opacity:function(){return u}},framebuffer:l})}},P$g.prototype.destroyParticleTrailsResources=function(){e$2e(this._curParticleStateTexture)&&(this._curParticleStateTexture.destroy(),this._curParticleStateTexture=void 0),e$2e(this._lastParticleStateTexture)&&(this._lastParticleStateTexture.destroy(),this._lastParticleStateTexture=void 0),e$2e(this._tmpParticleStateTexture)&&(this._tmpParticleStateTexture.destroy(),this._tmpParticleStateTexture=void 0),e$2e(this._curParticleTextureBuffer)&&(this._curParticleTextureBuffer.destroy(),this._curParticleTextureBuffer=void 0),e$2e(this._lastParticleTextureBuffer)&&(this._lastParticleTextureBuffer.destroy(),this._lastParticleTextureBuffer=void 0),e$2e(this._tmpParticleTextureBuffer)&&(this._tmpParticleTextureBuffer.destroy(),this._tmpParticleTextureBuffer=void 0),this._clearCommand=void 0,this._copyColorCommand=void 0,this._copyLastColorCommand=void 0},P$g.prototype.drawParticleTrails=function(e,t){!this._showParticleTrails||(this.createParticleTrailsResources(e,t),e$2e(this._copyLastColorCommand)&&this._copyLastColorCommand.execute(e,t),e$2e(this._copyColorCommand)&&this._copyColorCommand.execute(e,t),this._clearCommand.framebuffer=this._curParticleTextureBuffer,this._clearCommand.execute(e,t),this._transformFeedback.beginDraw(e,this._curParticleTextureBuffer,this._transformFeedback,t),this._transformFeedback._drawNormal(e,t))},P$g.prototype.clearLastParticleStateTexture=function(e,t,i,n){if(e$2e(t)&&this._hdrEnable!==t)return this._hdrEnable=t,this.destroyParticleTrailsResources(),void this.createParticleTrailsResources(t,i,n);!e._stateChanged||this.clearLastParticleBuffer(i,n)},P$g.prototype.clearLastParticleBuffer=function(e,t){this._clearCommand.framebuffer=this._lastParticleTextureBuffer,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._curParticleTextureBuffer,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._tmpParticleTextureBuffer,this._clearCommand.execute(e,t)},P$g.prototype.isDestroyed=function(){return!1},P$g.prototype.destroy=function(){return e$2e(this._vectorFieldTexture)&&(this._vectorFieldTexture.destroy(),this._vectorFieldTexture=void 0),e$2e(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),e$2e(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),e$2e(this._transformFeedback)&&(this._transformFeedback.destroy(),this._transformFeedback=void 0),e$2e(this._fieldTexture)&&(this._fieldTexture.destroy(),this._fieldTexture=void 0),this.destroyParticleTrailsResources(),i$11(this)},Object.defineProperties(i$g.prototype,{visible:{get:function(){return this._visible},set:function(e){this._visible=e}},type:{get:function(){return this._type}},fieldData:{get:function(){return this._fieldData},set:function(e){this._fieldData=e,e$2e(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setVelocityField(e)}},NetCDFData:{get:function(){return this._NetCDFData},set:function(e){if(!e$2e(e.longitude)||!e$2e(e.latitude))throw new t$15("coordinates are required.");if(!e$2e(e.uwnd)||!e$2e(e.vwnd))throw new t$15("uwnd or vwnd is required.");if(e.timeOrder=u$Z(e.timeOrder,0),e$2e(this._NetCDFBuffer)){for(var t=this._NetCDFBuffer,i=t.getDataVariable(e.longitude),n=t.getDataVariable(e.latitude),r=t.getDataVariable(e.uwnd),o=t.getDataVariable(e.vwnd),a=0,s=[],l=0;l<n.length;l++){s[l]=[];for(var u=0;u<i.length;u++,a++){var c=n.length*i.length*e.timeOrder;s[l][u]=[r[a+c],o[a+c]]}}this._NetCDFData=s,e$2e(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setVelocityField(s)}}},NetCDFInfo:{get:function(){return this._NetCDFInfo},set:function(e){this._NetCDFInfo=e}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e,e$2e(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setDataBounds(e)}},zBounds:{get:function(){return this._zBounds},set:function(e){this._zBounds=e,e$2e(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setZBounds(e)}},particleVelocityFieldEffect:{get:function(){return this._particleVelocityFieldEffect}}}),i$g.prototype.update=function(e){this._visible?e$2e(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect.update(e):e$2e(this._particleVelocityFieldEffect)&&e$2e(this._particleVelocityFieldEffect._transformFeedback)&&this._particleVelocityFieldEffect.clearLastParticleBuffer(this._context,e)},i$g.prototype.isDestroyed=function(){return!1},i$g.prototype.destroy=function(){return e$2e(this._particleVelocityFieldEffect)&&(this._particleVelocityFieldEffect.destroy(),this._particleVelocityFieldEffect=void 0),i$11(this)};var ge$8="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nuniform float uWaterHeight;\n//水面相关\nvarying vec2 vNoiseCoord;\nvarying vec3 vProjectionCoord;\nvarying vec3 vEyeDir;\nvarying vec3 vNormal;\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\n\nvoid initialWaterParam(vec4 oPos)\n{\n float uTimeVal = 0.05;\n float uScale = 80.0;\n float uScroll = 1.0;\n float uNoise = 1.0;\n vec2 uBumpSpeed = vec2(3.0 -3.0);\n\tmat4 scalemat = mat4(0.5, 0.0, 0.0, 0.0,\n\t\t\t0.0, 0.5, 0.0, 0.0,\n\t\t\t0.0, 0.0, 0.5, 0.0,\n\t\t\t0.5, 0.5, 0.5, 1.0);\n\tvec4 proj = scalemat * oPos;\n\tvProjectionCoord = proj.xyw;\n\tvNoiseCoord.xy = aTexCoord0.xy * uScale + uBumpSpeed * uTimeVal;\n\tvec4 cameraPos = czm_inverseModel * vec4(czm_cameraPositionWC, 1.0);\n\tvEyeDir = aPosition.xyz - cameraPos.xyz;\n\tvNormal = vec3(0.0,0.0,1.0);\n}\nvoid main()\n{\n vec4 newPos = vec4(aPosition.xyz, 1.0);\n newPos.z = newPos.z + uWaterHeight;\n vec4 pos = czm_modelViewProjection * newPos;\n gl_Position = depthClampFarPlane(pos);\n vTexCoord = aTexCoord0.xy;\n initialWaterParam(pos);\n clip_vertex = czm_modelView * newPos;\n}",ce$9="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uPolygonTexture;\n//水面参数\nuniform sampler2D uReflectMap;\nuniform sampler2D uNoiseMap;\nvarying vec2 vNoiseCoord;\nvarying vec3 vProjectionCoord;\nvarying vec3 vEyeDir;\nvarying vec3 vNormal;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvec4 AdjSaturation(in vec4 inputColor, in float saturation)\n{\n\tvec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721);\n\tvec3 intensity = vec3(dot(inputColor.rgb, lumCoeff));\n\tvec3 tempColor = mix(intensity, inputColor.rgb, saturation);\n\treturn vec4(tempColor, 1.0);\n}\nvec4 GetWaterColor()\n{\n vec4 uTintColour = vec4(0,0.05,0.05,1);\n vec4 uWaterColour = vec4(0.1804,0.2706,0.3294,1);\n float uNoiseScale = 0.05;\n float uMinFresnel = 0.3;\n float uMaxFresnel = 0.7;\n float uFresnelPower = 1.8;\n float uWaterBrightness = 0.95;\n vec2 final = vProjectionCoord.xy / vProjectionCoord.z;\n vec3 noiseNormal = (texture2D(uNoiseMap, (vNoiseCoord.xy / 5.0)).rgb - 0.5).rbg * uNoiseScale;\n final += noiseNormal.xz;\n float realMinFresnel, realMaxFresnel;\n if(uMinFresnel < uMaxFresnel)\n {\n realMinFresnel = uMinFresnel;\n realMaxFresnel = uMaxFresnel;\n }\n else\n {\n realMinFresnel = uMaxFresnel;\n realMaxFresnel = uMinFresnel;\n }\n float fresnelBias = realMinFresnel;\n float fresnelScale = (realMaxFresnel - realMinFresnel) / 1.0;\n float fresnel = fresnelBias + fresnelScale * pow(1.0 + dot(normalize(vEyeDir), vNormal), uFresnelPower);\n fresnel = clamp(fresnel, 0.05, 0.95);\n vec4 reflectionColour = texture2D(uReflectMap, final);\n vec4 refractionColour = reflectionColour + uTintColour;\n vec4 resultColour = mix(uWaterColour, reflectionColour, fresnel);\n resultColour = AdjSaturation(resultColour, 1.0);\n resultColour = resultColour * uWaterBrightness;\n resultColour.a = uWaterColour.a;\n return resultColour;\n}\n\nvoid main()\n{\n#if defined(GL_EXT_frag_depth) || defined(WEBGL2)\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec2 texCoord = vTexCoord.xy;\n vec4 waterColor = GetWaterColor();\n vec4 texHeight = texture2D(uPolygonTexture, texCoord.xy);\n if(texHeight.x < 0.5)\n {\n discard;\n }\n else\n {\n gl_FragColor = waterColor;\n }\n}",fe$7="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uHeightTexture;\nuniform sampler2D uAssisTexture;\nuniform float uWaterHeight;\nuniform float uTextureWidth;\nuniform float uTextureHeight;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n float dStepX = 1.0 / uTextureWidth;\n float dStepY = 1.0 / uTextureHeight;\n vec2 texCoord = vTexCoord;\n vec4 texHeight = texture2D(uHeightTexture, texCoord);\n if(texHeight.r > uWaterHeight || texHeight.r < -90000.0)\n {\n gl_FragColor = vec4(0.0,0.0,0.0,1.0);\n return;\n }\n vec4 texCenter = texture2D(uAssisTexture, texCoord);\n if(texCenter.x > 0.5)\n {\n gl_FragColor = vec4(1.0,0.0,0.0,1.0);\n return;\n }\n vec4 texRight = texture2D(uAssisTexture, vec2(dStepX + texCoord.x, texCoord.y));//右\n vec4 texTop = texture2D(uAssisTexture, vec2( texCoord.x, dStepY + texCoord.y));//上\n vec4 texLeft = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y));//左\n vec4 texBottom = texture2D(uAssisTexture, vec2(texCoord.x, texCoord.y - dStepY));//下\n vec4 texLeftBottom = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y - dStepY));//下\n vec4 texRightBottom = texture2D(uAssisTexture, vec2(texCoord.x + dStepX, texCoord.y - dStepY));//下\n vec4 texLeftTop = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y + dStepY));//下\n vec4 texRightTop = texture2D(uAssisTexture, vec2(texCoord.x + dStepX, texCoord.y + dStepY));//下\n if(texCenter.x < 0.5 && texRight.x < 0.5 && texTop.x < 0.5 && texLeft.x < 0.5 && texBottom.x < 0.5 && texLeftBottom.x < 0.5 && texRightBottom.x < 0.5 && texLeftTop.x < 0.5 && texRightTop.x < 0.5)\n {\n discard;\n }\n gl_FragColor = vec4(1.0,0.0,0.0,1.0);\n}",e$a={Clamp:0,Absolute:1},K$a=Object.freeze(e$a);function I$e(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._floodCommand=void 0,this._boundingSphere=new i$1d,this._qureyRegion=[],this._waterHeight=0,this._polygonTexture=null,this._floodPosition=[0,0,0],this._worldMatrix=p$1d.IDENTITY.clone(),this._bound=[],this._terrainBlock=void 0,this._terrainBlockURL="",this._points=[],this._datasetInfo=void 0,this._frameState=void 0,this._updateFlagTexture=!1,this._updateHeightTexture=!1,this._name="",this._sceneName="",this._initialize=!1,this._waterMode=K$a.Clamp,this._assistTexture=null,this._heightTexture=null,this._flagCommand=void 0,this._regionGeometry=null,this._textureWidth=1024,this._textureHeight=1024,this._loaded=!1,this._layer=null}function Z$e(e){e$2e(e._floodCommand)&&(e._floodCommand.vertexArray=e._floodCommand.vertexArray&&e._floodCommand.vertexArray.destroy(),e._floodCommand.shaderProgram=e._floodCommand.shaderProgram&&e._floodCommand.shaderProgram.destroy(),e._floodCommand=void 0),e$2e(e._flagCommand)&&(e._flagCommand.vertexArray=e._flagCommand.vertexArray&&e._flagCommand.vertexArray.destroy(),e._flagCommand.shaderProgram=e._flagCommand.shaderProgram&&e._flagCommand.shaderProgram.destroy(),e._flagCommand=void 0)}function z$e(e){e$2e(e._polygonTexture)&&(e._polygonTexture=e._polygonTexture&&e._polygonTexture.destroy(),e._polygonTexture=null),e$2e(e._assistTexture)&&(e._assistTexture=e._assistTexture&&e._assistTexture.destroy(),e._assistTexture=null),e$2e(e._heightTexture)&&(e._heightTexture=e._heightTexture&&e._heightTexture.destroy(),e._heightTexture=null)}function $$c(e){if(null!==e._polygonTexture&&null!==e._assistTexture){var t=e._textureWidth,i=e._textureHeight,n=0,r=0;if(e._layer==e._scene.globe){var o=(e._bound[2]-e._bound[0])/t,a=(e._bound[3]-e._bound[1])/i,s=e._floodPosition;n=Math.floor((s.x-e._bound[0])/o),r=Math.floor((s.y-e._bound[1])/a)}else{var l=e._regionGeometry.rect,u=(o=(l.z-l.x)/t,a=(l.w-l.y)/i,s=o$1p.fromDegrees(e._floodPosition.x,e._floodPosition.y,0),new p$1d);p$1d.inverse(e._worldMatrix,u),p$1d.multiplyByPoint(u,s,s),n=Math.floor((s.x-l.x)/o),r=Math.floor((s.y-l.y)/a)}var c=new Uint8Array(t*i*4);c[4*(r*t+n)]=255,e._polygonTexture.copyFrom({width:t,height:i,arrayBufferView:c});var h=new Uint8Array(t*i*4);h[4*(r*t+n)]=255,e._assistTexture.copyFrom({width:t,height:i,arrayBufferView:h})}}function we$4(e,t,i){e._initialize||(l$h(e),e._regionGeometry=ie$4(e),ue$8(e,t),Ee$8(e,t),ne$7(e,t,e._regionGeometry,e._polygonTexture),D$d(e,e._terrainBlockURL,e._bound),e._initialize=!0),e._updateHeightTexture&&e._loaded&&null!=e._terrainBlock&&null!=e._datasetInfo&&re$8(e),e._updateFlagTexture&&te$6(e,t),e$2e(e._floodCommand)&&null!=e._terrainBlock&&null!=e._datasetInfo&&i.push(e._floodCommand)}function be$6(e,t){e._initialize||(e._initialize=!0,l$h(e),e._regionGeometry=ie$4(e),ue$8(e,t),Be$6(e),ne$7(e,t,e._regionGeometry,e._polygonTexture),D$d(e,e._terrainBlockURL,e._bound)),e._updateHeightTexture&&e._loaded&&null!=e._terrainBlock&&null!=e._datasetInfo&&re$8(e),e._updateFlagTexture&&te$6(e,t)}function l$h(e){Re$6(e);var t=e._bound[0],i=e._bound[1],n=e._bound[2],r=e._bound[3],o=o$1p.fromDegrees(.5*(n+t),.5*(r+i),0),a=new i$16(0,0,0);m$19.headingPitchRollToFixedFrame(o,a,t$12.WGS84,m$19.eastNorthUpToFixedFrame,e._worldMatrix)}function Re$6(e){if(0!==e._points.length){for(var t=Number.MAX_VALUE,i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=-Number.MAX_VALUE,o=0;o<e._points.length;o++)t=Math.min(e._points[o].x,t),i=Math.min(e._points[o].y,i),n=Math.max(e._points[o].x,n),r=Math.max(e._points[o].y,r);e._bound.length=0,e._bound.push(t),e._bound.push(i),e._bound.push(n),e._bound.push(r)}}function Ee$8(e,t){if(0!=e._points.length){var i=e._points.length,n=S$14.createTypedArray(S$14.FLOAT,3*i),r=S$14.createTypedArray(S$14.FLOAT,2*i),o=new p$1d;p$1d.inverse(e._worldMatrix,o);for(var a=[],s=0;s<e._qureyRegion.length/3;s++)a[3*s]=e._qureyRegion[3*s],a[3*s+1]=e._qureyRegion[3*s+1],a[3*s+2]=e._qureyRegion[3*s+2];var l=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(a)}}),u=U$18.createGeometry(l);f$Z.updateGeometry(u,a,o),e._boundingSphere=u.boundingSphere;for(s=0;s<u.attributes.position.values.length/3;s++)n[3*s]=u.attributes.position.values[3*s],n[3*s+1]=u.attributes.position.values[3*s+1],n[3*s+2]=u.attributes.position.values[3*s+2],r[2*s]=u.attributes.st.values[2*s],r[2*s+1]=u.attributes.st.values[2*s+1];var c=null,h=ce$z.UNSIGNED_SHORT;i<65535?c=S$14.createTypedArray(S$14.UNSIGNED_SHORT,u.indices.length):(c=S$14.createTypedArray(S$14.UNSIGNED_INT,u.indices.length),h=ce$z.UNSIGNED_INT);for(s=0;s<u.indices.length;s++)c[s]=u.indices[s];Se$5(e,t,n,r,c,h)}}function Se$5(e,t,i,n,r,o){Z$e(e);var a=t$X.createVertexBuffer({context:t,typedArray:i,usage:A$18.STATIC_DRAW}),s=t$X.createVertexBuffer({context:t,typedArray:n,usage:A$18.STATIC_DRAW}),l=[],u={aPosition:0,aTexCoord0:1};l.push({index:u.aPosition,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),l.push({index:u.aTexCoord0,vertexBuffer:s,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var c=t$X.createIndexBuffer({context:t,typedArray:r,usage:A$18.STATIC_DRAW,indexDatatype:o});e._floodCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!0}),e._floodCommand.vertexArray=new c$13({context:t,attributes:l,indexBuffer:c});var h=new s$V({sources:[ge$8]});e._floodCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:ce$9,attributeLocations:u}),e._floodCommand.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0}}),e._floodCommand.uniformMap={uWaterHeight:function(){return e._waterHeight},uPolygonTexture:function(){return e._polygonTexture},uReflectMap:function(){return e._frameState._framebufferList.water.renderTexture._fb.getColorTexture(0)},uNoiseMap:function(){return e._frameState._framebufferList.water._waterNormalMap}}}function D$d(e,t,i){""!=t&&4==i.length&&d$1f(t+".xml").then((function(n){var r=n.getElementsByTagName("leftBottom"),o=r[0].children[0].textContent,a=r[0].children[1].textContent,s=n.getElementsByTagName("rightTop"),l=s[0].children[0].textContent,u=s[0].children[1].textContent,c=n.getElementsByTagName("height")[0].textContent,h=n.getElementsByTagName("width")[0].textContent;e._datasetInfo={width:h,height:c,left:o,right:l,top:u,bottom:a,xRatio:(l-o)/h,yRatio:(u-a)/c};for(var d=[],f=0;f<e._datasetInfo.width;f++){for(var p=[],_=0;_<e._datasetInfo.height;_++)p.push(-99999);d.push(p)}ee$9(e,t,i,d)}))}function ee$9(e,t,i,n){u$P(t+'/gridValues.json?bounds={"leftBottom":{"x":'+i[0]+',"y":'+i[1]+'},"rightTop":{"x":'+i[2]+',"y":'+i[3]+"}}").then((function(t){for(var i=t.values,r=0;r<i.length;r++)for(var o=i[r],a=0,s=o.length;a<s;a++){var l=o[a];n[l.column][l.row]=l.value}e._terrainBlock=n;var u=(e._floodPosition.x-e._datasetInfo.left)/e._datasetInfo.xRatio,c=(e._datasetInfo.top-e._floodPosition.y)/e._datasetInfo.yRatio;u=Math.ceil(u),c=Math.ceil(c),n[u][c]>-9e4&&(e._loaded=!0),e._updateHeightTexture=!0}),(function(r){if(400==r.statusCode)for(var o=0;o<2;o++)for(var a=(i[2]-i[0])/2,s=i[0]+a*o,l=s+a,u=0;u<2;u++){var c=(i[3]-i[1])/2,h=i[1]+c*u,d=h+c,f=[];f[0]=s,f[1]=h,f[2]=l,f[3]=d,ee$9(e,t,f,n)}}))}function te$6(e,t){if(null!=e._terrainBlock&&null!=e._datasetInfo){e._flagCommand.execute(t);var i=t.readPixels({x:0,y:0,width:e._textureWidth,height:e._textureHeight,framebuffer:e._flagCommand.framebuffer});e._assistTexture.copyFrom({width:e._textureWidth,height:e._textureHeight,arrayBufferView:i})}}function re$8(e,t){if(null!=e._terrainBlock&&null!=e._datasetInfo){var i=new Float32Array(e._textureWidth*e._textureHeight);if(e._layer==e._scene.globe)for(var n=(e._bound[2]-e._bound[0])/e._textureWidth,r=(e._bound[3]-e._bound[1])/e._textureHeight,o=0;o<e._textureWidth;o++)for(var a=e._bound[0]+n*o,s=0;s<e._textureHeight;s++){-99999!=(f=q$d(e,a,e._bound[1]+r*s))&&(i[s*e._textureWidth+o]=f,e._minHeight=Math.min(f,e._minHeight))}else{var l=e._regionGeometry.rect,u=(l.z-l.x)/e._textureWidth,c=(l.w-l.y)/e._textureHeight;for(o=0;o<e._textureWidth;o++){var h=l.x+u*o;for(s=0;s<e._textureHeight;s++){var d=new o$1p(h,l.y+c*s,0);p$1d.multiplyByPoint(e._worldMatrix,d,d);var f,p=SuperMap3D.Cartographic.fromCartesian(d);-99999!=(f=q$d(e,SuperMap3D.Math.toDegrees(p.longitude),SuperMap3D.Math.toDegrees(p.latitude)))&&(i[s*e._textureWidth+o]=f,e._minHeight=Math.min(f,e._minHeight))}}}e._heightTexture.copyFrom({width:e._textureWidth,height:e._textureHeight,arrayBufferView:i}),e._updateFlagTexture=!0,e._updateHeightTexture=!1}}function q$d(e,t,i){if(t<e._datasetInfo.left||t>e._datasetInfo.right||i<e._datasetInfo.bottom||i>e._datasetInfo.top)return-99999;var n=(t-e._datasetInfo.left)/e._datasetInfo.xRatio,r=(e._datasetInfo.top-i)/e._datasetInfo.yRatio;return n=Math.ceil(n),r=Math.ceil(r),e._terrainBlock[n][r]}function ue$8(e,t){var i=e._textureWidth,n=e._textureHeight;z$e(e),null===e._polygonTexture&&(e._polygonTexture=new t$U({context:t,width:e._textureWidth,height:e._textureHeight,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1})),null===e._assistTexture&&(e._assistTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1})),$$c(e),null===e._heightTexture&&(e._heightTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.LUMINANCE,pixelDatatype:_$_.FLOAT,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR}),flipY:!1}))}function ie$4(e,t){for(var i=[],n=0;n<e._qureyRegion.length/3;n++)i[3*n]=e._qureyRegion[3*n],i[3*n+1]=e._qureyRegion[3*n+1],i[3*n+2]=e._qureyRegion[3*n+2];var r=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),o=0,a=U$18.createGeometry(r),s=a.attributes.position.values;S$14.createTypedArray(S$14.FLOAT,s.length);var l=S$14.createTypedArray(S$14.FLOAT,s.length/3*2),u=new e$2c(e._bound[0]*e$2d.RADIANS_PER_DEGREE,e._bound[1]*e$2d.RADIANS_PER_DEGREE,e._bound[2]*e$2d.RADIANS_PER_DEGREE,e._bound[3]*e$2d.RADIANS_PER_DEGREE);if(e._layer==e._scene.globe){var c=e._bound[2]-e._bound[0],h=e._bound[3]-e._bound[1];for(n=0;n<s.length;n+=3){var d=new o$1p(s[n],s[n+1],s[n+2]),f=SuperMap3D.Cartographic.fromCartesian(d),p=SuperMap3D.Math.toDegrees(f.longitude),_=SuperMap3D.Math.toDegrees(f.latitude);l[o++]=(p-e._bound[0])/c,l[o++]=(_-e._bound[1])/h}var m=new p$1d;p$1d.inverse(e._worldMatrix,m),f$Z.updateGeometry(a,i,m)}else{m=new p$1d;p$1d.inverse(e._worldMatrix,m),f$Z.updateGeometry(a,i,m);for(c=(u=f$Z.updateGeoBounds(a)).z-u.x,h=u.w-u.y,n=0;n<s.length;n+=3)l[o++]=(s[n]-u.x)/c,l[o++]=(s[n+1]-u.y)/h}return{vertices:a.attributes.position.values,texcoords:l,indices:a.indices,rect:u}}function ne$7(e,t,i,n){if(e$2e(i)){var r=new i$$({primitiveType:W$18.TRIANGLES}),o=t$X.createVertexBuffer({context:t,typedArray:i.vertices,usage:A$18.STATIC_DRAW}),a=t$X.createVertexBuffer({context:t,typedArray:i.texcoords,usage:A$18.STATIC_DRAW}),s=[],l={aPosition:0,aTexCoord0:1};s.push({index:l.aPosition,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({index:l.aTexCoord0,vertexBuffer:a,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var u=t$X.createIndexBuffer({context:t,typedArray:i.indices,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});r.vertexArray=new c$13({context:t,attributes:s,indexBuffer:u});var c=new s$V({sources:["attribute vec4 position;\nattribute vec4 aTexCoord0;\nvarying vec2 vTexCoord;\nvoid main()\n{\n vTexCoord = vec2(aTexCoord0.xy);\n vec2 vPos = aTexCoord0.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos, 0.1, 1.0);\n}\n"]}),h=new s$V({sources:[fe$7]});r.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:c,fragmentShaderSource:h,attributeLocations:l}),r.framebuffer=new t$V({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=d$1m.fromCache({cull:{enabled:!1}}),r.uniformMap={uTextureWidth:function(){return e._textureWidth},uTextureHeight:function(){return e._textureHeight},uWaterHeight:function(){return e._waterHeight},uHeightTexture:function(){return e._heightTexture},uAssisTexture:function(){return e._assistTexture}},e._flagCommand=r}}function _e$4(e){e._loaded=!1,e._initialize=!1,e._updateFlagTexture=!1,e._updateHeightTexture=!1}function Be$6(e){var t=new e$2c(e._bound[0]*e$2d.RADIANS_PER_DEGREE,e._bound[1]*e$2d.RADIANS_PER_DEGREE,e._bound[2]*e$2d.RADIANS_PER_DEGREE,e._bound[3]*e$2d.RADIANS_PER_DEGREE);e._layer!==e._scene.globe&&(t=e._regionGeometry.rect),e._layer._setFloodTexture(e._polygonTexture,t,e._worldMatrix)}function Ie$5(e){e._layer._removeFloodTexture()}function g$j(){this.enabled=!0,this.density=2e-4,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}Object.defineProperties(I$e.prototype,{floodPosition:{get:function(){return this._floodPosition},set:function(e){this._floodPosition=e,this._updateFlagTexture=!0,$$c(this)}},waterHeight:{get:function(){return this._waterHeight},set:function(e){this._waterHeight=e,this._updateFlagTexture=!0,$$c(this)}},waterMode:{get:function(){return this._waterMode},set:function(e){this._waterMode=e,this._updateFlagTexture=!0}},layer:{get:function(){return this._layer},set:function(e){this._layer=e,Z$e(this),z$e(this),_e$4(this)}}}),I$e.prototype.destroy=function(){return this._scene._analyst3D.remove(this._name,!0),null!==this._scene&&this._waterMode===K$a.Clamp&&Ie$5(this),Z$e(this),z$e(this),i$11(this)},I$e.prototype.build=function(){""===this._name&&(this._name="floodAnalysis3D"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},I$e.prototype.qureyRegion=function(e){if(!e$2e(e)||!e$2e(e.position))throw new t$15("the options is required");this._qureyRegion=e.position,this._points.length=0;for(var t=this._qureyRegion.length/3,i=0;i<t;i++){var n=new o$1p(this._qureyRegion[3*i],this._qureyRegion[3*i+1],this._qureyRegion[3*i+2]);this._points.push(n)}_e$4(this)},I$e.prototype.terrainURL=function(e){this._terrainBlockURL=e},I$e.prototype.update=function(e,t,i){this._frameState=t,this._textureWidth=e.drawingBufferWidth,this._textureHeight=e.drawingBufferHeight,this._waterMode===K$a.Absolute?we$4(this,e,i):be$6(this,e)};for(var l$g=[359.393,800.749,1275.6501,2151.1192,3141.7763,4777.5198,6281.2493,12364.307,15900.765,49889.0549,78026.8259,99260.7344,120036.3873,151011.0158,156091.1953,203849.3112,274866.9803,319916.3149,493552.0528,628733.5874],t$b=[2e-5,2e-4,1e-4,7e-5,5e-5,4e-5,3e-5,19e-6,1e-5,85e-7,62e-7,58e-7,53e-7,52e-7,51e-7,42e-7,4e-6,34e-7,26e-7,22e-7],v$c=0;v$c<t$b.length;++v$c)t$b[v$c]*=1e6;for(var b$k=t$b[1],u$d=t$b[t$b.length-1],d$k=0;d$k<t$b.length;++d$k)t$b[d$k]=(t$b[d$k]-u$d)/(b$k-u$d);var r$i=0;function x$g(e){var t,i=l$g,n=i.length;if(e<i[0])return r$i=0;if(e>i[n-1])return r$i=n-2;if(e>=i[r$i]){if(r$i+1<n&&e<i[r$i+1])return r$i;if(r$i+2<n&&e<i[r$i+2])return++r$i}else if(r$i-1>=0&&e>=i[r$i-1])return--r$i;for(t=0;t<n-2&&!(e>=i[t]&&e<i[t+1]);++t);return r$i=t}var B$a=new o$1p;function i$f(e){if(!e$2e(e)||!e$2e(e.scene))throw new t$15("options.scene is required.");this._scene=e.scene,this.samplingWindow=u$Z(e.samplingWindow,i$f.defaultSettings.samplingWindow),this.quietPeriod=u$Z(e.quietPeriod,i$f.defaultSettings.quietPeriod),this.warmupPeriod=u$Z(e.warmupPeriod,i$f.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=u$Z(e.minimumFrameRateDuringWarmup,i$f.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=u$Z(e.minimumFrameRateAfterWarmup,i$f.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new o$1h,this._nominalFrameRate=new o$1h,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;var t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener((function(e,i){l$f(t)})),this._hiddenPropertyName=void 0!==document.hidden?"hidden":void 0!==document.mozHidden?"mozHidden":void 0!==document.msHidden?"msHidden":void 0!==document.webkitHidden?"webkitHidden":void 0;var i=void 0!==document.hidden?"visibilitychange":void 0!==document.mozHidden?"mozvisibilitychange":void 0!==document.msHidden?"msvisibilitychange":void 0!==document.webkitHidden?"webkitvisibilitychange":void 0;function n(){o$j(t)}this._visibilityChangeRemoveListener=void 0,e$2e(i)&&(document.addEventListener(i,n,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(i,n,!1)})}function l$f(e,t){if(!(e._pauseCount>0)){var i=Et$c();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=i+e.quietPeriod/h$17.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/h$17.SECONDS_PER_MILLISECOND;else if(i>=e._quietPeriodEndTime){e._frameTimes.push(i);var n=i-e.samplingWindow/h$17.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=n){for(;e._frameTimes.length>=2&&e._frameTimes[1]<n;)e._frameTimes.shift();var r=(i-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/r,r>1e3/(i>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup)?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}}function o$j(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}function h$f(e,t,i){this.context=e,this.commandList=[],this.commandListRealtimeRaster=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=C$14.SCENE3D,this.morphTime=C$14.getMorphTime(C$14.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=i,this.mapProjection=void 0,this.camera=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,depth:!1,postProcess:!1,offscreen:!1,asynchronous:!1,fbo:!1,normal:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,density:void 0,sse:void 0,minimumBrightness:void 0},this.terrainExaggeration=1,this._framebufferList=[],this.shadowState={shadowsEnabled:!0,lightShadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.imagerySplitPosition=new o$1o,this.globeSplitPosition=new o$1o,this.frustumSplits=[],this.backgroundColor=void 0,this.sunColor=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this._fboState={name:"normal",enabled:!1,frameBufferType:Qe$c.NORMAL},this.useType=0,this.frustumIndex=0,this.multiViewportIndex=-1,this.globeBottomLevel=0,this.minTerrainHeight=0,this.maxTerrainHeight=0,this.TAAEnable=!1,this.rasterLineWidth=1,this.pickIDColor=new e$1X,this.tilesetPassState=void 0,this.requests=[],this.rasterPerFrame=!1,this.pbrMaterialsArr=[]}function i$e(e,t){this.near=u$Z(e,0),this.far=u$Z(t,0);for(var i=Le$q.NUMBER_OF_PASSES,n=new Array(i),r=new Array(i),o=0;o<i;++o)n[o]=[],r[o]=0;this.commands=n,this.indices=r}g$j.prototype.update=function(e){if(e.fog.enabled=this.enabled){var t=e.camera,i=t.positionCartographic;if(e.context.webgpu){if(e.mode!==C$14.SCENE3D)return void(e.fog.enabled=!1)}else if(!e$2e(i)||i.height>8e5||e.mode!==C$14.SCENE3D)return void(e.fog.enabled=!1);var n=i.height,r=x$g(n),o=e$2d.clamp((n-l$g[r])/(l$g[r+1]-l$g[r]),0,1),a=e$2d.lerp(t$b[r],t$b[r+1],o),s=1e6*this.density;a=a*(s-s/b$k*u$d)*1e-6;var l=o$1p.normalize(t.positionWC,B$a);a*=1-Math.abs(o$1p.dot(t.directionWC,l)),e.fog.density=a,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness}},i$f.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8},i$f.fromScene=function(e){if(!e$2e(e))throw new t$15("scene is required.");return(!e$2e(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new i$f({scene:e})),e._frameRateMonitor},Object.defineProperties(i$f.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}}),i$f.prototype.pause=function(){++this._pauseCount,1===this._pauseCount&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)},i$f.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)},i$f.prototype.isDestroyed=function(){return!1},i$f.prototype.destroy=function(){return this._preUpdateRemoveListener(),e$2e(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),i$11(this)};var Ne$6="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\nuniform vec4 u_initialColor;\nuniform float uParentMixDirection;\nuniform vec3 u_sunLightColor;\nuniform vec3 u_ambientLightColor;\n\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\n#ifdef WEBGPU\nuniform TileUBO {\n uniform mat4 u_modifiedModelView;\n uniform mat4 u_modifiedModelViewProjection;\n uniform vec4 u_dayTextureTranslationAndScale[16];\n uniform vec4 u_dayTextureSize[16];\n uniform vec4 u_dayTextureTexCoordsRectangle[16];\n uniform bool u_dayTextureUseWebMercatorT[16];\n uniform bool u_dayTextureFlipY[16];\n uniform vec4 u_normalTextureTranslationAndScale;\n uniform vec4 uTileBounds;\n uniform vec4 u_tileRectangle;\n uniform vec3 u_center3D;\n uniform vec2 u_southAndNorthLatitude;\n uniform vec2 u_southMercatorYAndOneOverHeight;\n uniform float u_useNormalTexture;\n};\n#else\n uniform vec4 uTileBounds;\n #if TEXTURE_UNITS > 0\n uniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\n uniform vec4 u_dayTextureSize[TEXTURE_UNITS];\n uniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n uniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\n uniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n #endif\n uniform vec4 u_normalTextureTranslationAndScale;\n uniform float u_useNormalTexture;\n#endif\n\n#if GRIDTEXTURE_UNITS > 0\nuniform sampler2D u_gridTextures[GRIDTEXTURE_UNITS];\nuniform bool u_gridTextureUseWebMercatorT[GRIDTEXTURE_UNITS];\nuniform vec4 u_gridTextureTexCoordsRectangle[GRIDTEXTURE_UNITS];\n#endif\n#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\n#endif\n\n#ifdef SHOW_OCEAN_WAVES\nuniform sampler2D u_oceanNormalMap;\n#endif\n\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nuniform vec2 u_lightingFadeDistance;\n#endif\n\n#ifdef TILE_LIMIT_RECTANGLE\nuniform vec4 u_cartographicLimitRectangle;\n#endif\n\n#ifdef GROUND_ATMOSPHERE\nuniform vec2 u_nightFadeDistance;\n#endif\n\n#ifdef TRANSLUCENT\nuniform vec4 u_frontFaceAlphaByDistance;\nuniform vec4 u_backFaceAlphaByDistance;\n#endif\n\n#ifdef UNDERGROUND_COLOR\nuniform vec4 u_undergroundColor;\nuniform vec4 u_undergroundColorAlphaByDistance;\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\nuniform sampler2D u_clippingPlanes;\nuniform mat4 u_clippingPlanesMatrix;\nuniform vec4 u_clippingPlanesEdgeStyle;\n#endif\n\n#if defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nuniform float u_minimumBrightness;\n#endif\n\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift; // Hue, saturation, brightness\n#endif\n\nuniform sampler2D u_normalTexture;\nvarying vec3 vertNorm;\n\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n#include <globeOcean>\n#endif\n\n#ifdef APPLY_MATERIAL\nvarying float v_height;\nvarying float v_slope;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nvarying float v_distance;\nvarying vec3 v_fogRayleighColor;\nvarying vec3 v_fogMieColor;\n#endif\n\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nfloat interpolateByDistance(vec4 nearFarScalar, float distance)\n{\n float startDistance = nearFarScalar.x;\n float startValue = nearFarScalar.y;\n float endDistance = nearFarScalar.z;\n float endValue = nearFarScalar.w;\n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\n return mix(startValue, endValue, t);\n}\n#endif\n\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)\n{\n return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\n}\n#endif\n\nvarying float v_height2;\n#if defined(Excavate_Region) || defined(Excavate_Outer) || defined(Apply_ImageryClip) || (defined(SLOPE_ANALYSIS) && defined(SlopeRegion)) || defined(HYPSOMETRIC_REGION)\nuniform sampler2D uModifyRasterTexture;\n#endif\n\n#include <globeAnalysis>\n\nvec3 colorCorrect(vec3 rgb) {\n#ifdef COLOR_CORRECT\n // Convert rgb color to hsb\n vec3 hsb = czm_RGBToHSB(rgb);\n // Perform hsb shift\n hsb.x += u_hsbShift.x; // hue\n hsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0); // saturation\n hsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0; // brightness\n // Convert shifted hsb back to rgb\n rgb = czm_HSBToRGB(hsb);\n#endif\n return rgb;\n}\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);\n\nvec4 sRGBToLinear( in vec4 value ) {\n#ifndef HDR\n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n#else\n return value;\n#endif\n}\nvec4 LinearTosRGB( in vec4 value ) {\n#ifndef HDR\n return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n#else\n return value;\n#endif\n}\n\nvec3 getNormalFromNormalTexture(){\n vec2 normalTextureTranslation = u_normalTextureTranslationAndScale.xy;\n vec2 normalTextureScale = u_normalTextureTranslationAndScale.zw;\n vec2 normalTextureCoordinates = v_textureCoordinates.xy * normalTextureScale + normalTextureTranslation;\n vec3 normalTC = texture2D(u_normalTexture, normalTextureCoordinates.xy).xyz;\n normalTC = (normalTC - 0.5) * 2.0;\n return normalTC;\n}\n\nvec3 tranformNormalFromTagentToEC(vec3 normalInTagent){\n vec3 zAxis = normalize(vertNorm);\n vec3 xAxis = normalize(vec3(-vertNorm.y, vertNorm.x, 0));\n vec3 yAxis = normalize(cross(zAxis, xAxis));\n mat3 matrix = mat3(xAxis, yAxis, zAxis);\n return czm_normal3D * matrix * normalInTagent;\n}\n\nvec4 lightShading(vec3 normalEC, vec4 color){\n float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_sunDirectionEC, normalize(normalEC)) * 0.9 + 0.3, 0.0, 1.0);\n return vec4(color.rgb * u_sunLightColor.rgb * diffuseIntensity + u_ambientLightColor.rgb * 0.25, color.a);\n}\n\nvoid main()\n{\n#ifdef APPLY_GLOBESPLIT\n vec2 splitPosition = czm_globeSplitPosition;\n if (u_GlobeSplitDirection.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\n discard;\n }\n else if (u_GlobeSplitDirection.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\n discard;\n }\n if(u_GlobeSplitDirection.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\n discard;\n }\n else if(u_GlobeSplitDirection.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\n discard;\n }\n#endif\n\n#ifdef APPLY_GLOBESWIPE\n if (gl_FragCoord.x < u_GlobeSwipeRegion.x || gl_FragCoord.y > u_GlobeSwipeRegion.y) {\n discard;\n }\n else if (gl_FragCoord.x > u_GlobeSwipeRegion.z || gl_FragCoord.y < u_GlobeSwipeRegion.w) {\n discard;\n }\n#endif\n\n#ifdef Excavate_Region\n if(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w > 0.5)\n {\n discard;\n }\n#endif\n\n#ifdef Excavate_Outer\n if(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n {\n discard;\n }\n#endif\n\n#ifdef TILE_LIMIT_RECTANGLE\n if (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||\n v_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)\n {\n discard;\n }\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\n float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);\n#endif\n\n // The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0\n // where the fragment shader sees textures coordinates < 0.0 and > 1.0 for the\n // fragments on the edges of tiles even though the vertex shader is outputting\n // coordinates strictly in the 0-1 range.\n vec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0));\n\n#ifdef SHOW_TILE_BOUNDARIES\n if (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||\n v_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))\n {\n color = vec4(1.0, 0.0, 0.0, 1.0);\n }\n#endif\n\n#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)\n vec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)); // normalized surface normal in model coordinates\n vec3 normalEC = czm_normal3D * normalMC; // normalized surface normal in eye coordiantes\n#endif\n\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\n float cameraDist;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n cameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;\n }\n else if (czm_sceneMode == czm_sceneModeColumbusView)\n {\n cameraDist = -czm_view[3].z;\n }\n else\n {\n cameraDist = length(czm_view[3]);\n }\n float fadeOutDist = u_lightingFadeDistance.x;\n float fadeInDist = u_lightingFadeDistance.y;\n if (czm_sceneMode != czm_sceneMode3D) {\n vec3 radii = czm_getWgs84EllipsoidEC().radii;\n float maxRadii = max(radii.x, max(radii.y, radii.z));\n fadeOutDist -= maxRadii;\n fadeInDist -= maxRadii;\n }\n float fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#else\n float fade = 0.0;\n#endif\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n color = getOceanColor(color, v_positionEC, v_positionMC, normalEC, normalMC, fade);\n#endif\n\n#ifdef APPLY_MATERIAL\n czm_materialInput materialInput;\n materialInput.st = v_textureCoordinates.st;\n materialInput.normalEC = normalize(v_normalEC);\n materialInput.slope = v_slope;\n materialInput.height = v_height;\n czm_material material = czm_getMaterial(materialInput);\n color.xyz = mix(color.xyz, material.diffuse, material.alpha);\n#endif\n\n vec3 realNormal = vec3(0.0, 0.0, 1.0);\n if(u_useNormalTexture > 0.5) {\n realNormal = getNormalFromNormalTexture();\n }\n\n#ifdef ENABLE_LIGHTING\n vec4 finalColor;\n vec3 lightingNormalEC;\n #ifdef ENABLE_VERTEX_LIGHTING\n lightingNormalEC = v_normalEC;\n #else\n if(u_useNormalTexture > 0.5) {\n lightingNormalEC = tranformNormalFromTagentToEC(realNormal);\n }\n else {\n lightingNormalEC = normalEC;\n }\n #endif\n finalColor = lightShading(lightingNormalEC, color);\n#else\n vec4 finalColor = color;\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\n vec4 clippingPlanesEdgeColor = vec4(1.0);\n clippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;\n float clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;\n\n if (clipDistance < clippingPlanesEdgeWidth)\n {\n finalColor = clippingPlanesEdgeColor;\n }\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\n vec3 fogColor = colorCorrect(v_fogMieColor) + finalColor.rgb * colorCorrect(v_fogRayleighColor);\n#ifndef HDR\n const float fExposure = 2.0;\n fogColor = vec3(1.0) - exp(-fExposure * fogColor);\n#endif\n#endif\n\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)\n vec3 atmosphereLightDirection = czm_sunDirectionWC;\n#else\n vec3 atmosphereLightDirection = czm_lightDirectionWC;\n#endif\n\n#ifdef FOG\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\n float darken = clamp(dot(normalize(czm_viewerPositionECEF), atmosphereLightDirection), u_minimumBrightness, 1.0);\n fogColor *= darken;\n#endif\n\n#ifdef HDR\n const float modifier = 0.15;\n finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor, modifier), finalColor.a);\n#else\n finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor), finalColor.a);\n#endif\n#endif\n\n#ifdef HYPSOMETRIC_ANALYSIS\n finalColor = getHypsometricAnalysisColor(finalColor, v_textureCoordinates.xy);\n#endif\n\n#ifdef SLOPE_ANALYSIS\n finalColor = getSlopeAnalysisColor(finalColor, v_textureCoordinates.xy, realNormal);\n#endif\n\n#ifdef GROUND_ATMOSPHERE\n if (czm_sceneMode != czm_sceneMode3D)\n {\n gl_FragColor = finalColor;\n #ifdef Height_Map\n gl_FragColor = czm_packValue(v_height2);\n #endif\n return;\n }\n\n#if defined(PER_FRAGMENT_GROUND_ATMOSPHERE) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))\n float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);\n vec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);\n xy *= czm_viewport.zw * mpp * 0.5;\n\n vec3 direction = normalize(vec3(xy, -czm_currentFrustum.x));\n czm_ray ray = czm_ray(vec3(0.0), direction);\n\n vec3 ellipsoid_center = czm_view[3].xyz;\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\n\n vec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);\n ellipsoidPosition = (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;\n AtmosphereColor atmosColor = computeGroundAtmosphereFromSpace(ellipsoidPosition, true, atmosphereLightDirection);\n\n vec3 groundAtmosphereColor = colorCorrect(atmosColor.mie) + finalColor.rgb * colorCorrect(atmosColor.rayleigh);\n#ifndef HDR\n groundAtmosphereColor = vec3(1.0) - exp(-fExposure * groundAtmosphereColor);\n#endif\n\n fadeInDist = u_nightFadeDistance.x;\n fadeOutDist = u_nightFadeDistance.y;\n\n float sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n\n#ifdef HDR\n // Some tweaking to make HDR look better\n sunlitAtmosphereIntensity = max(sunlitAtmosphereIntensity * sunlitAtmosphereIntensity, 0.03);\n#endif\n\n groundAtmosphereColor = mix(groundAtmosphereColor, fogColor, sunlitAtmosphereIntensity);\n#else\n vec3 groundAtmosphereColor = fogColor;\n#endif\n\n#ifdef HDR\n // Some tweaking to make HDR look better\n groundAtmosphereColor = czm_saturation(groundAtmosphereColor, 1.6);\n#endif\n\n finalColor = vec4(mix(finalColor.rgb, groundAtmosphereColor, fade), finalColor.a);\n#endif\n\n#ifdef UNDERGROUND_COLOR\n if (gl_FrontFacing == false)\n {\n float distanceFromEllipsoid = max(czm_eyeHeight, 0.0);\n float distance = max(v_distance - distanceFromEllipsoid, 0.0);\n float blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);\n vec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);\n finalColor = alphaBlend(undergroundColor, finalColor);\n }\n#endif\n\n#ifdef TRANSLUCENT\n vec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;\n finalColor.a *= interpolateByDistance(alphaByDistance, v_distance);\n#endif\n\n if (finalColor.a == 0.0) {\n discard;\n }\n gl_FragColor = finalColor;\n#ifdef Height_Map\n\tgl_FragColor = czm_packValue(v_height2);\n#endif\n#ifdef FLOOD_ANALYSIS\n gl_FragColor = getFloodAnalysisColor(gl_FragColor, v_textureCoordinates);\n#endif\n}\n",He$5="#ifdef QUANTIZATION_BITS12\nattribute vec4 compressed0;\nattribute float compressed1;\n#else\nattribute vec4 position3DAndHeight;\nattribute vec4 textureCoordAndEncodedNormals;\n\n#ifdef WEBGPU\nuniform TileUBO {\n uniform mat4 u_modifiedModelView;\n uniform mat4 u_modifiedModelViewProjection;\n uniform vec4 u_dayTextureTranslationAndScale[16];\n uniform vec4 u_dayTextureSize[16];\n uniform vec4 u_dayTextureTexCoordsRectangle[16];\n uniform bool u_dayTextureUseWebMercatorT[16];\n uniform bool u_dayTextureFlipY[16];\n uniform vec4 u_normalTextureTranslationAndScale;\n uniform vec4 uTileBounds;\n uniform vec4 u_tileRectangle;\n uniform vec3 u_center3D;\n uniform vec2 u_southAndNorthLatitude;\n uniform vec2 u_southMercatorYAndOneOverHeight;\n uniform float u_useNormalTexture;\n};\n#else\n uniform vec3 u_center3D;\n uniform mat4 u_modifiedModelView;\n uniform mat4 u_modifiedModelViewProjection;\n uniform vec4 u_normalTextureTranslationAndScale;\n uniform float u_useNormalTexture;\n uniform vec4 u_tileRectangle;\n // Uniforms for 2D Mercator projection\n uniform vec2 u_southAndNorthLatitude;\n uniform vec2 u_southMercatorYAndOneOverHeight;\n#endif\n\n#endif\n\nvarying float v_height2;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\n\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n\n#ifdef APPLY_MATERIAL\nvarying float v_slope;\nvarying float v_height;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(TRANSLUCENT) || defined(UNDERGROUND_COLOR)\nvarying float v_distance;\nvarying vec3 v_fogMieColor;\nvarying vec3 v_fogRayleighColor;\n#endif\n\nvarying vec3 vertNorm;\n\n#ifdef BRDF\n uniform sampler2D u_normalTexture;\n#endif\n\n#ifdef SLOPE_ANALYSIS\nuniform float uTopLevel;\nuniform float uLevel;\nvarying vec2 texCoordRotate;\n#endif\n\n#ifdef APPLY_MODIFY\nuniform sampler2D uModifyRasterTexture;\n#endif\n\nvarying vec4 clip_vertex;\n\n// These functions are generated at runtime.\nvec4 getPosition(vec3 position, float height, vec2 textureCoordinates);\nfloat get2DYPositionFraction(vec2 textureCoordinates);\n\nvec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return u_modifiedModelViewProjection * vec4(position, 1.0);\n}\n\nfloat get2DMercatorYPositionFraction(vec2 textureCoordinates)\n{\n // The width of a tile at level 11, in radians and assuming a single root tile, is\n // 2.0 * czm_pi / pow(2.0, 11.0)\n // We want to just linearly interpolate the 2D position from the texture coordinates\n // when we're at this level or higher. The constant below is the expression\n // above evaluated and then rounded up at the 4th significant digit.\n const float maxTileWidth = 0.003068;\n float positionFraction = textureCoordinates.y;\n float southLatitude = u_southAndNorthLatitude.x;\n float northLatitude = u_southAndNorthLatitude.y;\n if (northLatitude - southLatitude > maxTileWidth)\n {\n float southMercatorY = u_southMercatorYAndOneOverHeight.x;\n float oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;\n\n float currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);\n currentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);\n positionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);\n }\n return positionFraction;\n}\n\nfloat get2DGeographicYPositionFraction(vec2 textureCoordinates)\n{\n return textureCoordinates.y;\n}\n\nvec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)\n{\n float yPositionFraction = get2DYPositionFraction(textureCoordinates);\n vec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\n return u_modifiedModelViewProjection * rtcPosition2D;\n}\n\nvec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return getPositionPlanarEarth(position, 0.0, textureCoordinates);\n}\n\nvec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return getPositionPlanarEarth(position, height, textureCoordinates);\n}\n\nvec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)\n{\n // We do not do RTC while morphing, so there is potential for jitter.\n // This is unlikely to be noticeable, though.\n vec3 position3DWC = position + u_center3D;\n float yPositionFraction = get2DYPositionFraction(textureCoordinates);\n vec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\n vec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);\n return czm_modelViewProjection * morphPosition;\n}\n\n#ifdef QUANTIZATION_BITS12\nuniform vec2 u_minMaxHeight;\nuniform mat4 u_scaleAndBias;\n#endif\n\nvoid main()\n{\n#ifdef QUANTIZATION_BITS12\n vec2 xy = czm_decompressTextureCoordinates(compressed0.x);\n vec2 zh = czm_decompressTextureCoordinates(compressed0.y);\n vec3 position = vec3(xy, zh.x);\n float height = zh.y;\n vec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);\n\n height = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;\n v_height2 = height;\n position = (u_scaleAndBias * vec4(position, 1.0)).xyz;\n\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\n float encodedNormal = compressed1;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\n float encodedNormal = 0.0;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = compressed0.w;\n#else\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = 0.0;\n#endif\n\n#else\n // A single float per element\n vec3 position = position3DAndHeight.xyz;\n float height = position3DAndHeight.w;\n v_height2 = height;\n vec2 textureCoordinates = textureCoordAndEncodedNormals.xy;\n\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = textureCoordAndEncodedNormals.z;\n float encodedNormal = textureCoordAndEncodedNormals.w;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = textureCoordAndEncodedNormals.z;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = textureCoordAndEncodedNormals.z;\n float encodedNormal = 0.0;\n#else\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = 0.0;\n#endif\n\n#endif\n\n vec3 position3DWC = position + u_center3D;\n gl_Position = getPosition(position, height, textureCoordinates);\n#ifdef APPLY_MODIFY\n vec4 packHeight = texture2D(uModifyRasterTexture, textureCoordinates);\n if(packHeight.w > 0.5)\n {\n vec3 modifyPosition = normalize(position3DWC);\n gl_Position = getPosition(modifyPosition - u_center3D, height, textureCoordinates);\n }\n#endif\n #ifdef WEBGPU\n // 因为globeVS中的main函数不是代码文本中最后一个函数,所以引擎处理时追加的yFactor__不起作用\n gl_Position.y *= yFactor__;\n #endif\n\n v_textureCoordinates = vec3(textureCoordinates, webMercatorT);\n\n#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\n v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\n v_positionMC = position3DWC; // position in model coordinates\n vec3 normalMC = czm_octDecode(encodedNormal);\n v_normalMC = normalMC;\n v_normalEC = czm_normal3D * v_normalMC;\n#elif defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(GENERATE_POSITION) || defined(HDR)\n v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\n v_positionMC = position3DWC; // position in model coordinates\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(TRANSLUCENT) || defined(UNDERGROUND_COLOR)\n AtmosphereColor atmosFogColor = computeGroundAtmosphereFromSpace(position3DWC, false, vec3(0.0));\n v_fogMieColor = atmosFogColor.mie;\n v_fogRayleighColor = atmosFogColor.rayleigh;\n v_distance = length((czm_modelView3D * vec4(position3DWC - czm_relativeOrigin, 1.0)).xyz);\n#endif\n#ifdef APPLY_MATERIAL\n vec3 finalNormal = normalMC;\n vec3 ellipsoidNormal = normalize(position3DWC.xyz);\n v_slope = abs(dot(ellipsoidNormal, finalNormal));\n v_height = height;\n#endif\n clip_vertex = czm_inverseProjection * gl_Position;\n\n if(u_useNormalTexture > 0.5){\n v_positionEC = (u_modifiedModelView * vec4(position.xyz, 1.0)).xyz;\n vertNorm = normalize(position3DWC);\n #ifdef BRDF\n vec2 normalTextureTranslation = u_normalTextureTranslationAndScale.xy;\n vec2 normalTextureScale = u_normalTextureTranslationAndScale.zw;\n vec2 normalTextureCoordinates = v_textureCoordinates.xy * normalTextureScale + normalTextureTranslation;\n vec3 realNormal = texture2D(u_normalTexture, normalTextureCoordinates.xy).xyz;\n realNormal = (realNormal - 0.5) * 2.0;\n vec3 zAxis = normalize(vertNorm);\n vec3 xAxis = normalize(vec3(-vertNorm.y, vertNorm.x, 0));\n vec3 yAxis = normalize(cross(zAxis, xAxis));\n mat3 matrix = mat3(xAxis, yAxis, zAxis);\n vec3 vNormal = czm_normal3D * matrix * realNormal;\n v_normalEC = normalize(vNormal);\n #endif\n }\n\n#ifdef SLOPE_ANALYSIS\n float levelSpan = min(uLevel - uTopLevel, 2.0);\n float arrowTextureScale = pow(2.0,levelSpan);\n texCoordRotate = v_textureCoordinates.xy * arrowTextureScale;\n#endif\n}\n",le$9="/*!\n * Atmosphere code:\n *\n * Copyright (c) 2000-2005, Sean O'Neil \n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n * * Neither the name of the project nor the names of its contributors may be\n * used to endorse or promote products derived from this software without\n * specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Modifications made by Analytical Graphics, Inc.\n */\n\n // Atmosphere:\n // Code: \n // GPU Gems 2 Article: \n\nconst float fInnerRadius = 6378137.0;\nconst float fOuterRadius = 6378137.0 * 1.025;\nconst float fOuterRadius2 = fOuterRadius * fOuterRadius;\n\nconst float Kr = 0.0025;\nconst float Km = 0.0015;\nconst float ESun = 15.0;\n\nconst float fKrESun = Kr * ESun;\nconst float fKmESun = Km * ESun;\nconst float fKr4PI = Kr * 4.0 * czm_pi;\nconst float fKm4PI = Km * 4.0 * czm_pi;\n\nconst float fScale = 1.0 / (fOuterRadius - fInnerRadius);\nconst float fScaleDepth = 0.25;\nconst float fScaleOverScaleDepth = fScale / fScaleDepth;\n\nstruct AtmosphereColor\n{\n vec3 mie;\n vec3 rayleigh;\n};\n\nconst int nSamples = 2;\nconst float fSamples = 2.0;\n\nfloat scale(float fCos)\n{\n float x = 1.0 - fCos;\n return fScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\n\nAtmosphereColor computeGroundAtmosphereFromSpace(vec3 v3Pos, bool dynamicLighting, vec3 lightDirectionWC)\n{\n\tvec3 v3InvWavelength = vec3(1.0 / pow(0.650, 4.0), 1.0 / pow(0.570, 4.0), 1.0 / pow(0.475, 4.0));\n\n // Get the ray from the camera to the vertex and its length (which is the far point of the ray passing through the atmosphere)\n vec3 v3Ray = v3Pos - czm_viewerPositionECEF;\n float fFar = length(v3Ray);\n v3Ray /= fFar;\n\n float fCameraHeight = length(czm_viewerPositionECEF);\n float fCameraHeight2 = fCameraHeight * fCameraHeight;\n\n // This next line is an ANGLE workaround. It is equivalent to B = 2.0 * dot(czm_viewerPositionECEF, v3Ray),\n // which is what it should be, but there are problems at the poles.\n float B = 2.0 * length(czm_viewerPositionECEF) * dot(normalize(czm_viewerPositionECEF), v3Ray);\n float C = fCameraHeight2 - fOuterRadius2;\n float fDet = max(0.0, B*B - 4.0 * C);\n float fNear = 0.5 * (-B - sqrt(fDet));\n\n // Calculate the ray's starting position, then calculate its scattering offset\n vec3 v3Start = czm_viewerPositionECEF + v3Ray * fNear;\n fFar -= fNear;\n float fDepth = exp((fInnerRadius - fOuterRadius) / fScaleDepth);\n\n // The light angle based on the scene's light source would be:\n // dot(lightDirectionWC, v3Pos) / length(v3Pos);\n // When we want the atmosphere to be uniform over the globe so it is set to 1.0.\n\n float fLightAngle = czm_branchFreeTernary(dynamicLighting, dot(lightDirectionWC, v3Pos) / length(v3Pos), 1.0);\n float fCameraAngle = dot(-v3Ray, v3Pos) / length(v3Pos);\n float fCameraScale = scale(fCameraAngle);\n float fLightScale = scale(fLightAngle);\n float fCameraOffset = fDepth*fCameraScale;\n float fTemp = (fLightScale + fCameraScale);\n\n // Initialize the scattering loop variables\n float fSampleLength = fFar / fSamples;\n float fScaledLength = fSampleLength * fScale;\n vec3 v3SampleRay = v3Ray * fSampleLength;\n vec3 v3SamplePoint = v3Start + v3SampleRay * 0.5;\n\n // Now loop through the sample rays\n vec3 v3FrontColor = vec3(0.0);\n vec3 v3Attenuate = vec3(0.0);\n for(int i=0; i<nSamples; i++)\n {\n float fHeight = length(v3SamplePoint);\n float fDepth = exp(fScaleOverScaleDepth * (fInnerRadius - fHeight));\n float fScatter = fDepth*fTemp - fCameraOffset;\n v3Attenuate = exp(-fScatter * (v3InvWavelength * fKr4PI + fKm4PI));\n v3FrontColor += v3Attenuate * (fDepth * fScaledLength);\n v3SamplePoint += v3SampleRay;\n }\n\n AtmosphereColor color;\n color.mie = v3FrontColor * (v3InvWavelength * fKrESun + fKmESun);\n color.rayleigh = v3Attenuate; // Calculate the attenuation factor for the ground\n\n return color;\n}\n\n";function Pe$6(e,t,i,n,r,o,a,s){this.numberOfDayTextures=e,this.flags=t,this.material=i,this.shaderProgram=n,this.clippingShaderState=r,this.mvtTextureObj=o,this.numberOfGridTextures=a,this.gridUpdate=s}function U$f(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function Oe$7(e){var t;switch(e){case C$14.SCENE3D:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }";break;case C$14.SCENE2D:case C$14.COLUMBUS_VIEW:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }";break;case C$14.MORPHING:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }"}return t}function Le$6(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}function pe$8(e,t){if(!e$2e(e)||!e$2e(t))return!1;if(e===t)return!0;if(e.length!=t.length)return!1;for(var i=e.length,n=0;n<i;n++)if(e[n].textureIndex!==t[n].textureIndex||e[n].selectColor!==t[n].selectColor)return!1;return!0}U$f.prototype.getShaderProgram=function(e){var t=e.frameState,i=e.surfaceTile,n=e.numberOfDayTextures,r=e.applyBrightness,o=e.applyContrast,a=e.applyHue,s=e.applySaturation,l=e.applyGamma,u=e.applyAlpha,c=e.applySplit,h=e.applySwipe,d=e.applyGlobeSwipe,f=e.showReflectiveOcean,p=e.showOceanWaves,_=e.enableLighting,m=e.dynamicAtmosphereLighting,g=e.dynamicAtmosphereLightingFromSun,x=e.showGroundAtmosphere,y=e.perFragmentGroundAtmosphere,v=e.hasVertexNormals,$=e.hasRoughness,b=e.useWebMercatorProjection,T=e.enableFog,C=e.enableClippingPlanes,S=e.clippingPlanes,w=e.clippedByBoundaries,E=e.hasImageryLayerCutout,P=e.colorCorrect,A=e.isHeight,L=e.isColor,M=e.hasNormalMap,R=e.hasHypsometricSetting,O=e.hasFlood,D=e.hasSlopeAnalysis,I=e.applyGlobeSplit;e.highlightFillTile,e.colorToAlpha;var F=e.mvtTextureObj,B=e.numberOfGridTextures,N=e.gridUpdate,G=e.applyPolygonOffset,z=e.applyModify,U=e.applyExtract,V=e.excavationRegion,k=e.excavationOuter,W=e.applyImageryClip,H=e.hasHypsometricRegion,q=e.applySlopeRegion;const j=e.translucent,X=e.showUndergroundColor;var Y=0,Z="",K=i.renderedMesh.encoding;K.quantization===ye$j.BITS12&&(Y=1,Z="QUANTIZATION_BITS12");var Q=0;e$2e(i.terrainData)&&i.terrainData._createdByUpsampling&&(Q=1);var J=0,ee="";w&&(J=1,ee="TILE_LIMIT_RECTANGLE");var te=0,ie="";E&&(te=1,ie="APPLY_IMAGERY_CUTOUT");var ne=t.mode,re=ne|r<<2|o<<3|a<<4|s<<5|l<<6|u<<7|f<<8|p<<9|_<<10|x<<11|y<<12|v<<13|b<<14|T<<15|Y<<16|c<<17|C<<18|Q<<19|J<<20|te<<21|P<<22|A<<23|L<<24|M<<25|D<<26|I<<27|z<<28|V<<29|k<<30|$<<31;re=re+"_"+(I|R<<1|h<<2|d<<3|G<<4|O<<5|W<<6|H<<7|q<<8|j<<9);var oe=0;e$2e(S)&&S.length>0&&(oe=C?S.clippingPlanesState:0);var ae=i.surfaceShader;if(e$2e(ae)&&ae.numberOfDayTextures===n&&ae.flags===re&&ae.material===this.material&&ae.clippingShaderState===oe&&pe$8(ae.mvtTextureObj,F)&&ae.numberOfGridTextures===B&&ae.gridUpdate===N)return ae.shaderProgram;var se=this._shadersByTexturesFlags[n+B];if(e$2e(se)||(se=this._shadersByTexturesFlags[n+B]={}),!e$2e(ae=se[re])||ae.material!==this.material||ae.clippingShaderState!==oe||!pe$8(ae.mvtTextureObj,F)||N||ae.numberOfGridTextures!=B){var le=this.baseVertexShaderSource.clone(),ue=this.baseFragmentShaderSource.clone();0!==oe&&ue.sources.unshift(f$H(S,t.context)),le.defines.push(Z,""),ue.defines.push("TEXTURE_UNITS "+n,ee,ie),ue.defines.push("GRIDTEXTURE_UNITS "+B,ee,ie),r&&ue.defines.push("APPLY_BRIGHTNESS"),o&&ue.defines.push("APPLY_CONTRAST"),a&&ue.defines.push("APPLY_HUE"),s&&ue.defines.push("APPLY_SATURATION"),l&&ue.defines.push("APPLY_GAMMA"),u&&ue.defines.push("APPLY_ALPHA"),f&&(ue.defines.push("SHOW_REFLECTIVE_OCEAN"),le.defines.push("SHOW_REFLECTIVE_OCEAN")),p&&ue.defines.push("SHOW_OCEAN_WAVES"),G&&ue.defines.push("POLYGON_OFFSET"),_&&(le.defines.push("ENABLE_LIGHTING"),ue.defines.push("ENABLE_LIGHTING"),v?(le.defines.push("ENABLE_VERTEX_LIGHTING"),ue.defines.push("ENABLE_VERTEX_LIGHTING")):(le.defines.push("ENABLE_DAYNIGHT_SHADING"),ue.defines.push("ENABLE_DAYNIGHT_SHADING"))),($&&M||_&&v)&&(le.defines.push(D$V.BRDF),ue.defines.push(D$V.BRDF),e$2e(t.specularEnvironmentMaps)&&ue.defines.push(D$V.IBL)),m&&(ue.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),g&&ue.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN")),x&&(le.defines.push("GROUND_ATMOSPHERE"),ue.defines.push("GROUND_ATMOSPHERE"),!t.context.webgpu&&y&&ue.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE")),le.defines.push("INCLUDE_WEB_MERCATOR_Y"),ue.defines.push("INCLUDE_WEB_MERCATOR_Y"),T&&(le.defines.push("FOG"),ue.defines.push("FOG")),c&&ue.defines.push("APPLY_SPLIT"),h&&ue.defines.push("APPLY_SWIPE"),I&&ue.defines.push("APPLY_GLOBESPLIT"),d&&ue.defines.push("APPLY_GLOBESWIPE"),C&&ue.defines.push("ENABLE_CLIPPING_PLANES"),P&&ue.defines.push("COLOR_CORRECT"),A&&(le.defines.push("Height_Map"),ue.defines.push("Height_Map")),L&&le.defines.push("Color_Map"),z&&!U&&le.defines.push("APPLY_MODIFY"),V&&ue.defines.push("Excavate_Region"),k&&ue.defines.push("Excavate_Outer"),W&&ue.defines.push("Apply_ImageryClip"),R&&ue.defines.push("HYPSOMETRIC_ANALYSIS"),H&&ue.defines.push("HYPSOMETRIC_REGION"),O&&(ue.defines.push("FLOOD_ANALYSIS"),le.defines.push("FLOOD_ANALYSIS")),D&&M&&(ue.defines.push("SLOPE_ANALYSIS"),le.defines.push("SLOPE_ANALYSIS")),D&&q&&M&&ue.defines.push("SlopeRegion"),j&&(le.defines.push("TRANSLUCENT"),ue.defines.push("TRANSLUCENT")),X&&(le.defines.push("UNDERGROUND_COLOR"),ue.defines.push("UNDERGROUND_COLOR"));var ce="vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\n vec4 color = initialColor;\n";ce+=" vec2 realTextureCoord;\n vec4 currentTextureColor;\n",E&&(ce+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(var he=0;he<n;++he)ce+="realTextureCoord = computeTextureCoord(\n",ce+="u_dayTextureUseWebMercatorT["+he+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTranslationAndScale["+he+"],\nu_dayTextureSize["+he+"],\nu_dayTextureFlipY["+he+"]);\ncurrentTextureColor = texture2D(u_dayTextures["+he+"], realTextureCoord);\n\n",ce+=E?"cutoutAndColorResult = u_dayTextureCutoutRectangles["+he+"];\ntexelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\ncutoutAndColorResult = czm_sampleAndBlend(\n":"color = czm_sampleAndBlend(\n",ce+=" currentTextureColor,\n color,\n u_dayTextureUseWebMercatorT["+he+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+he+"],\n u_transparentBackColor["+he+"],\n u_imageryClipEnable["+he+"],\n "+(u?"u_dayTextureAlpha["+he+"]":"1.0")+",\n "+(r?"u_dayTextureBrightness["+he+"]":"0.0")+",\n "+(o?"u_dayTextureContrast["+he+"]":"0.0")+",\n "+(a?"u_dayTextureHue["+he+"]":"0.0")+",\n "+(s?"u_dayTextureSaturation["+he+"]":"0.0")+",\n "+(l?"u_dayTextureOneOverGamma["+he+"]":"0.0")+",\n "+(c?"u_dayTextureSplit["+he+"]":"vec2(0.0,0.0)")+",\n "+(h?"u_dayTextureSwipeRegion["+he+"]":"vec4(0.0,0.0,0.0,0.0)")+"\n);\n",E&&(ce+="color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n");for(he=0;he<B;++he)ce+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+he+"],\n u_gridTextureUseWebMercatorT["+he+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_gridTextureTexCoordsRectangle["+he+"],\n u_gridTextureTranslationAndScale["+he+"]);\n";ce+=" return color;\n}",ue.sources.push(ce),le.sources.push(Oe$7(ne)),le.sources.push(Le$6(b)),le.name="globeVS"+ne,ue.name="globeFS"+ne;var de=r$14.fromCache({context:t.context,vertexShaderSource:le,fragmentShaderSource:ue,attributeLocations:K.getAttributeLocations()});ae=se[re]=new Pe$6(n,re,this.material,de,oe,F,B,N)}return i.surfaceShader=ae,ae.shaderProgram},U$f.prototype.destroy=function(){var e,t,i=this._shadersByTexturesFlags;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];if(!e$2e(r))continue;for(e in r)r.hasOwnProperty(e)&&(e$2e(t=r[e])&&t.shaderProgram.destroy())}return i$11(this)};var E$e={FAILED:0,UNLOADED:1,TRANSITIONING:2,RECEIVED:3,TEXTURE_LODED:4,READY:5,UPDATE:6},_$e=Object.freeze(E$e);function n$c(e,t,i,n,r){if(this.gridLayer=e,this.x=t,this.y=i,this.level=n,this.request=void 0,0!==n){var o=t/2|0,a=i/2|0,s=n-1;this.parent=e._getGridFromCache(o,a,s)}(this.state=_$e.UNLOADED,this.gridBuffer=void 0,this.gridUrl=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!e$2e(r)&&e.gridProvider.ready)&&(r=e.gridProvider.tilingScheme.tileXYToRectangle(t,i,n));this.rectangle=r,this.needUpdate=!1}function d$j(e,t,i){this.readyGrid=void 0,this.loadingGrid=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i}function p$b(e,t){this._gridProvider=e,t=u$Z(t,{}),this._context=t.context,this._show=!0,this.show=!0,this._rectangle=u$Z(t.rectangle,h$18.MAX_VALUE),this._gridCache=[],e$2e(t.maxCategory)?this._MaxCategory=t.maxCategory:e.ready?this._MaxCategory=e.maxCategory:this._isNeedUpdate=!0,this._isNeedUpdate=!1,this._isUpdate=!0,e$2e(t.minCategory)?this._MinCategory=t.minCategory:e.ready?this._MinCategory=e.minCategory:this._isNeedUpdate=!0,this._hypsometricSetting=void 0,e$2e(t.hypsometricSetting)&&D$c(this,t),this._filterMode=k$S.FilterMode.LINEAR}function b$j(e,t,i,n,r){var o=n+1,a=e._gridProvider;if(e$2e(a)&&!(a.maxLevel<o))for(var s=Object.keys(e._gridCache),l=0;l<2;l++)for(var u=2*t+l,c=0;c<2;c++){var h=2*i+c,d=w$e(u,h,o);for(l=0;l<s.length;l++)if(d==s[l]){var f=e._gridCache[d];if(R$f(f,r)){var p=b$j(e,u,h,o);return e$2e(p)&&p.state==_$e.READY?p:f.state==_$e.READY?f:void 0}}}}function R$f(e,t){return!!e$2e(e)&&h$18.contains(e.rectangle,t)}n$c.prototype.addReference=function(){++this.referenceCount},n$c.prototype.releaseReference=function(){return--this.referenceCount,0===this.referenceCount?(this.gridLayer._removeGridFromCache(this),e$2e(this.parent)&&this.parent.releaseReference(),e$2e(this.girlBuffer)&&e$2e(this.girlBuffer.destroy)&&this.girlBuffer.destroy(),e$2e(this.texture)&&this.texture.destroy(),e$2e(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),i$11(this),0):this.referenceCount},n$c.prototype._processStateMachine=function(e,t,i){return this.state===_$e.UNLOADED&&!i&&(this.state=_$e.TRANSITIONING,this.gridLayer._requestGridTile(this)),(this.state===_$e.RECEIVED||this.state===_$e.UPDATE)&&(this.state=_$e.TRANSITIONING,this.gridLayer._createTexture(e.context,this)),!0},d$j.prototype.freeResources=function(){e$2e(this.readyImagery)&&this.readyImagery.releaseReference(),e$2e(this.loadingImagery)&&this.loadingImagery.releaseReference()},d$j.prototype._processStateMachine=function(e,t,i){var n=this.loadingGrid;if(null==n){if(!e$2e(this.readyGrid)||this.readyGrid.state!=_$e.UPDATE)return!1;this.loadingGrid=this.readyGrid,this.readyGrid=void 0,n=this.loadingGrid}var r=n.gridLayer;return n._processStateMachine(t,!this.useWebMercatorT,i),n.state===_$e.READY&&(e$2e(this.readyGrid)&&this.readyGrid.releaseReference(),this.readyGrid=this.loadingGrid,this.loadingGrid=void 0,this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this),!0)},Object.defineProperties(p$b.prototype,{gridProvider:{get:function(){return this._gridProvider}},rectangle:{get:function(){return this._rectangle}},dataMaxValue:{get:function(){if(!this._isNeedUpdate)return this._MaxCategory;if(!this._gridProvider.ready)throw new DeveloperError("dataMaxValue must not be called before the grid provider is ready");this._MaxCategory=this._gridProvider.maxCategory,this._isNeedUpdate=!1}},dataMinValue:{get:function(){if(!this._isNeedUpdate)return this._MinCategory;if(!this._gridProvider.ready)throw new DeveloperError("dataMinValue must not be called before the grid provider is ready");this._MinCategory=this._gridProvider.minCategory,this._isNeedUpdate=!1}},hypsometricSetting:{get:function(){return{hypsometricSetting:this._hypsometricSetting,analysisMode:this._hypAnalysisMode}},set:function(e){D$c(this,e),this._isUpdate=!0}}}),p$b.prototype.destroy=function(){return i$11(this)},p$b.prototype.cancelReprojections=function(){},p$b.prototype.queueReprojectionCommands=function(e){},p$b.prototype.getViewableRectangle=function(){var e=this._gridProvider,t=this._rectangle;return e.readyPromise.then((function(){return h$18.intersection(e.rectangle,t)}))},p$b.prototype._getGridFromCache=function(e,t,i,n){var r=w$e(e,t,i),o=(this._gridCache.length,this._gridCache[r]);return e$2e(o)||(o=new n$c(this,e,t,i,n),this._gridCache[r]=o),o.addReference(),o},p$b.prototype.getGridValue=function(e){for(var t=Object.values(this._gridCache),i=void 0,n=0;n<t.length;n++){var r=t[n];if(r.state==_$e.READY)if(R$f(r,e)){var o=b$j(this,r.x,r.y,r.level,e);i=e$2e(o)?o:r;break}}if(!e$2e(i))return-1;var a=(e.longitude-i.rectangle.west)/i.rectangle.width,s=(i.rectangle.north-e.latitude)/i.rectangle.height;a=Math.max(Math.floor(a*this._gridProvider.cellWidth),0),s=Math.max(Math.floor(s*this._gridProvider.cellHeight),0);var l=i.gridBuffer;return G$g(this._gridProvider,l,a,s,this._filterMode)},p$b.prototype._removeGridFromCache=function(e){var t=w$e(e.x,e.y,e.level);delete this._gridCache[t]},p$b.prototype._requestGridTile=function(e){var t=this._gridProvider;function i(t){if(!e$2e(t))return n();e.gridBuffer=t,e.state=_$e.RECEIVED}function n(){if(e.request.state===W$1c.CANCELLED)return e.gridBuffer=void 0,e.state=_$e.UNLOADED,void(e.request=void 0);e.state=_$e.FAILED,e.request=void 0}!function(){var r=new r$1c({throttle:!1,throttleByServer:!0,type:U$1f.TERRAIN});e.request=r;var o=t._requestGridTile(e.x,e.y,e.level,r);e$2e(o)?(e.state=_$e.RECEIVING,o$1l(o,i,n)):(e.state=_$e.UNLOADED,e.request=void 0)}()},p$b.prototype._createTexture=function(e,t){var i=this._gridProvider,n=t.gridBuffer;if(null==n||null==i||!i.ready)return!1;this._isNeedUpdate&&this._gridProvider.ready&&(this._MinCategory=this._gridProvider.minCategory,this._MaxCategory=this._gridProvider.maxCategory,this._isNeedUpdate=!1),this._context=e,null==this._hypsometricSetting&&Q$9(this),null==t.texture&&(t.texture=new t$U({context:this._context,width:i.cellWidth,height:i.cellHeight,pixelFormat:V$12.RGBA,flipY:!1}));for(var r=i.cellWidth*i.cellHeight,o=new Uint8Array(4*r),a=0;a<i.cellHeight;a++)for(var s=0;s<i.cellWidth;s++){var l=(i.cellHeight-1-a)*i.cellWidth+s,u=G$g(i,n,s,a,this._filterMode);if(u<this._hypsometricSetting.MinVisibleValue||u>this._hypsometricSetting.MaxVisibleValue||u<this._hypsometricSetting.ColorTableMinKey||u>this._hypsometricSetting.ColorTableMaxKey)o[4*l+0]=0,o[4*l+1]=0,o[4*l+2]=0,o[4*l+3]=0;else{var c=this._hypsometricSetting.ColorTable.getColor(u);if(!e$2e(c)){o[4*l+0]=0,o[4*l+1]=0,o[4*l+2]=0,o[4*l+3]=0;continue}o[4*l+0]=255*c.red,o[4*l+1]=255*c.green,o[4*l+2]=255*c.blue,o[4*l+3]=255*c.alpha}}t.texture.copyFrom({width:i.cellWidth,height:i.cellHeight,arrayBufferView:o}),t.state=_$e.READY};var E$d=new h$18,J$9=new h$18,M$g=new h$18,A$f=new h$18;function Z$d(e,t,i,n,r,o){var a,s=t.rectangle.width/512,l=t.rectangle.height/512,u=e.tilingScheme,c=h$18.clone(t.rectangle,A$f),h=u.tileXYToRectangle(i.northwestTileCoordinates.x,i.northwestTileCoordinates.y,o),d=h$18.intersection(h,n,M$g);return r?(u.rectangleToNativeRectangle(c,c),u.rectangleToNativeRectangle(h,h),u.rectangleToNativeRectangle(d,d),u.rectangleToNativeRectangle(n,n),a=u.tileXYToNativeRectangle.bind(u),s=c.width/512,l=c.height/512):a=u.tileXYToRectangle.bind(u),{veryCloseX:s,veryCloseY:l,terrainRectangle:c,gridRectangle:h,clippedGridRectangle:d,gridTileXYToRectangle:a}}function z$d(e,t,i,n,r,o,a,s){var l,u,c=0,h=1;Math.abs(i.clippedGridRectangle.west-i.terrainRectangle.west)>=i.veryCloseX&&(c=Math.min(1,(i.clippedGridRectangle.west-i.terrainRectangle.west)/i.terrainRectangle.width)),Math.abs(i.clippedGridRectangle.north-i.terrainRectangle.north)>=i.veryCloseY&&(h=Math.max(0,(i.clippedGridRectangle.north-i.terrainRectangle.south)/i.terrainRectangle.height));for(var d=h,f=n.northwestTileCoordinates.x;f<=n.southeastTileCoordinates.x;f++)if(l=c,i.gridRectangle=i.gridTileXYToRectangle(f,n.northwestTileCoordinates.y,o),i.clippedGridRectangle=h$18.simpleIntersection(i.gridRectangle,r,M$g),e$2e(i.clippedGridRectangle)){c=Math.min(1,(i.clippedGridRectangle.east-i.terrainRectangle.west)/i.terrainRectangle.width),f===n.southeastTileCoordinates.x&&Math.abs(i.clippedGridRectangle.east-i.terrainRectangle.east)<i.veryCloseX&&(c=1),h=d;for(var p=n.northwestTileCoordinates.y;p<=n.southeastTileCoordinates.y;p++)if(u=h,i.gridRectangle=i.gridTileXYToRectangle(f,p,o),i.clippedGridRectangle=h$18.simpleIntersection(i.gridRectangle,r,M$g),e$2e(i.clippedGridRectangle)){h=Math.max(0,(i.clippedGridRectangle.south-i.terrainRectangle.south)/i.terrainRectangle.height),p===n.southeastTileCoordinates.y&&Math.abs(i.clippedGridRectangle.south-i.terrainRectangle.south)<i.veryCloseY&&(h=0);var _=new e$2c(l,h,c,u),m=e._getGridFromCache(f,p,o);t.gridImagery.splice(s,0,new d$j(m,_,a)),++s}}}function D$c(e,t){if(e$2e(t)&&e$2e(t.hypsometricSetting))e$2e(e._hypsometricSetting)&&e._hypsometricSetting.destroy(),e._hypsometricSetting=t.hypsometricSetting,e._hypsometricSetting._emissionTextureChanged=!0,e._filterMode=e._hypsometricSetting.filterMode,e$2e(e._hypsometricSetting.ColorTable)&&e._hypsometricSetting.ColorTable.generateBuffer();else if(e$2e(e._hypsometricSetting._hypsometricSetting))return e._hypsometricSetting.destroy(),void(e._hypsometricSetting=void 0);$$b(e)}function Q$9(e){if(e._isNeedUpdate&&e._gridProvider.ready&&(e._MinCategory=e._gridProvider.minCategory,e._MaxCategory=e._gridProvider.maxCategory,e._isNeedUpdate=!1),null==e._hypsometricSetting){var t=new i$T;e._hypsometricSetting=new u$L,e._hypsometricSetting.MaxVisibleValue=0;for(var i=[e$1X.fromCssColorString("#AAF0E9"),e$1X.fromCssColorString("#B0F2D3"),e$1X.fromCssColorString("#B0F4BC"),e$1X.fromCssColorString("#BFF8B2"),e$1X.fromCssColorString("#DAFBB2"),e$1X.fromCssColorString("#EDF9AD"),e$1X.fromCssColorString("#DCEC91"),e$1X.fromCssColorString("#A0D567"),e$1X.fromCssColorString("#60BD42"),e$1X.fromCssColorString("#2CA432"),e$1X.fromCssColorString("#148E35"),e$1X.fromCssColorString("#20853D"),e$1X.fromCssColorString("#559037"),e$1X.fromCssColorString("#819D2F"),e$1X.fromCssColorString("#ABA826"),e$1X.fromCssColorString("#D7B117"),e$1X.fromCssColorString("#EBA509"),e$1X.fromCssColorString("#E18302"),e$1X.fromCssColorString("#CB5902"),e$1X.fromCssColorString("#C53602"),e$1X.fromCssColorString("#9D1901"),e$1X.fromCssColorString("#820C01"),e$1X.fromCssColorString("#760F03"),e$1X.fromCssColorString("#721906"),e$1X.fromCssColorString("#702007"),e$1X.fromCssColorString("#6E280A"),e$1X.fromCssColorString("#6A2D0C"),e$1X.fromCssColorString("#733C1B"),e$1X.fromCssColorString("#815032"),e$1X.fromCssColorString("#8E664D"),e$1X.fromCssColorString("#997C6C"),e$1X.fromCssColorString("#A69992")],n=(e._MaxCategory-e._MinCategory)/31,r=0;r<32;r++)t.insert(e._MinCategory+n*r,i[r]);e._hypsometricSetting.ColorTable=t,e._hypsometricSetting.DisplayMode=k$S.DisplayMode.FACE_AND_LINE,e._hypsometricSetting.Opacity=.618,e._hypsometricSetting.ColorTableMaxKey=e._MaxCategory,e._hypsometricSetting.ColorTableMinKey=e._MinCategory,e._hypsometricSetting.MaxVisibleValue=e._MaxCategory,e._hypsometricSetting.MinVisibleValue=e._MinCategory,e._hypsometricSetting.ColorTable.generateBuffer()}}function w$e(e,t,i){return JSON.stringify([e,t,i])}function $$b(e){for(var t=Object.values(e._gridCache),i=0;i<t.length;i++){var n=t[i];n.state==_$e.READY&&(n.state=_$e.UPDATE,n.needUpdate=!0)}}function P$f(e,t,i,n){var r=0;i.south>0?r=i.south:i.north<0&&(r=i.north);var o=e._gridProvider,a=I$d(e,1*t.getLevelMaximumGeometricError(n),r,e$2e(o.resolution)?o.resolution:1,t.tilingScheme._tileWidth);a=Math.max(0,a);var s=o.maxLevel;if(a>s&&(a=s),e$2e(o.minLevel)){var l=o.minLevel;a<l&&(a=l)}return a}function I$d(e,t,i,n,r){var o=e._gridProvider,a=o.tilingScheme,s=a.ellipsoid,l=o.tilingScheme.projection instanceof n$1d?1:Math.cos(i),u=a.rectangle,c=s.maximumRadius*u.width*l/(o.cellWidth*a.getNumberOfXTilesAtLevel(0)/n)/t*(o.cellWidth/r),h=Math.log(c)/Math.log(2);return 0|Math.round(h)}function L$f(e,t,i,n){var r=e.tilingScheme,o=r.positionToTileXY(h$18.northwest(t),i),a=r.positionToTileXY(h$18.southeast(t),i),s=n.width/512,l=n.height/512,u=r.tileXYToRectangle(o.x,o.y,i);Math.abs(u.south-n.north)<l&&o.y<a.y&&++o.y,Math.abs(u.east-n.west)<s&&o.x<a.x&&++o.x;var c=r.tileXYToRectangle(a.x,a.y,i);return Math.abs(c.north-n.south)<l&&a.y>o.y&&--a.y,Math.abs(c.west-n.east)<s&&a.x>o.x&&--a.x,{northwestTileCoordinates:o,southeastTileCoordinates:a}}function G$g(e,t,i,n,r){if(!e$2e(e))throw new DeveloperError("getValue must not be called before the grid provider is ready");if(r==k$S.FilterMode.NEAREST)return t[n*e.cellWidth+i];for(var o=0,a=0,s=0;s<2;s++)for(var l=0;l<2;l++){var u=i+s;u=Math.min(u,e.cellWidth-1);var c=n+l;o+=t[(c=Math.min(c,e.cellHeight-1))*e.cellWidth+u],a++}return a<=0?-99999:o/=a}function n$b(){this._layers=[],this.layerAdded=new o$1h,this.layerRemoved=new o$1h,this.layerMoved=new o$1h,this.layerShownOrHidden=new o$1h,this.layerUpdate=new o$1h}function g$i(e,t){if(!e$2e(t))throw new t$15("layer is required.");var i=e.indexOf(t);if(-1===i)throw new t$15("layer is not in this collection.");return i}function b$i(e,t,i){var n=e._layers;if((t=e$2d.clamp(t,0,n.length-1))!==(i=e$2d.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t)}}p$b.prototype._createTileImagerySkeletons=function(e,t,i){var n=e.data,r=this._gridProvider;if(!this.show||!r.ready)return!1;e$2e(i)||(i=n.gridImagery.length);var o=r.tilingScheme.projection instanceof t$N&&e.rectangle.north<t$N.MaximumLatitude&&e.rectangle.south>-t$N.MaximumLatitude,a=h$18.intersection(r.rectangle,this._rectangle,E$d),s=h$18.intersection(e.rectangle,a,J$9);if(null==s)return!1;var l=P$f(this,t,s,e.level),u=L$f(r,s,l,e.rectangle);return e.rectangle.width,e.rectangle.height,z$d(this,n,Z$d(r,e,u,a,o,l),u,a,l,o,i),!0},p$b.prototype._calculateTextureTranslationAndScale=function(e,t){var i=t.readyGrid.rectangle,n=e.rectangle;if(t.useWebMercatorT){var r=t.girdLayer.gridProvider.tilingScheme;i=r.rectangleToNativeRectangle(i,E$d),n=r.rectangleToNativeRectangle(n,A$f)}var o=n.width,a=n.height,s=o/i.width,l=a/i.height;return new e$2c(s*(n.west-i.west)/o,l*(n.south-i.south)/a,s,l)},Object.defineProperties(n$b.prototype,{length:{get:function(){return this._layers.length}}}),n$b.prototype.add=function(e,t){var i=e$2e(t);if(!e$2e(e))throw new t$15("layer is required.");if(i){if(t<0)throw new t$15("index must be greater than or equal to zero.");if(t>this._layers.length)throw new t$15("index must be less than or equal to the number of layers.")}i?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t)},n$b.prototype.addImageryProvider=function(e,t){if(!e$2e(e))throw new t$15("imageryProvider is required.");var i=new h$R(e);return i._imageryLayers=this,this.add(i,t),i},n$b.prototype.addVectorTileProvider=function(e,t){if(!e$2e(e))throw new t$15("imageryProvider is required.");var i=new h$R(e,{minimumTerrainLevel:e.minimumTerrainLevel,maximumTerrainLevel:e.maximumTerrainLevel,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter});return this.add(i,t),i},n$b.prototype.addGridProvider=function(e,t){if(!e$2e(e))throw new t$15("gridProvider is required.");var i=new p$b(e);return this.add(i,t),i},n$b.prototype.remove=function(e,t,i){t=u$Z(t,!0);i=u$Z(i,!1);var n=this._layers.indexOf(e);return-1!==n&&(e._imageryProvider&&e._imageryProvider instanceof M$S&&!i?void 0:(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0))},n$b.prototype.removeAll=function(e){e=u$Z(e,!0);for(var t=this._layers,i=0,n=t.length;i<n;i++){var r=t[i];this.layerRemoved.raiseEvent(r,i),e&&r.destroy()}this._layers=[]},n$b.prototype.contains=function(e){return-1!==this.indexOf(e)},n$b.prototype.indexOf=function(e){return this._layers.indexOf(e)},n$b.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.","index");return this._layers[e]},n$b.prototype.raise=function(e){var t=g$i(this._layers,e);b$i(this,t,t+1)},n$b.prototype.lower=function(e){var t=g$i(this._layers,e);b$i(this,t,t-1)},n$b.prototype.raiseToTop=function(e){var t=g$i(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},n$b.prototype.lowerToBottom=function(e){var t=g$i(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var H$j=new h$18;function r$h(e,t){this._terrainProvider=e}function o$i(){this._layers=[],this.layerAdded=new o$1h,this.layerRemoved=new o$1h,this.layerMoved=new o$1h,this.layerShownOrHidden=new o$1h,this._globe=void 0}function f$h(e,t){if(!e$2e(t))throw new t$15("layer is required.");var i=e.indexOf(t);if(-1===i)throw new t$15("layer is not in this collection.");return i}function p$a(e,t,i){var n=e._layers;if((t=e$2d.clamp(t,0,n.length-1))!==(i=e$2d.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t)}}function e$9(e){this._ellipsoid=new s$H(e.ellipsoid,o$1p.ZERO)}function h$e(e){if(!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.x))throw new t$15("options.x is required.");if(!e$2e(e.y))throw new t$15("options.y is required.");if(e.x<0||e.y<0)throw new t$15("options.x and options.y must be greater than or equal to zero.");if(!e$2e(e.level))throw new t$15("options.level is required and must be greater than or equal to zero.");if(!e$2e(e.tilingScheme))throw new t$15("options.tilingScheme is required.");this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=D$J.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=re$A.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0,this._rasterTextureSize=void 0,this._rasterFBO=void 0,this._rasterTexture=void 0,this._rasterized=!1,this._clearCommand=new t$W({color:new e$1X(0,0,0,0),depth:1}),this._2DRasterized=!1,this._2DRasterTexture=void 0,this._mvtLoaded=!1,this._clipRasterTexture=void 0,this._clipRasterFbo=void 0,this._clipRegionsCount=0,this._clipRegionRasterized=!1,this.isModified=!1,0===this._level?this.showInvalid=!1:this.showInvalid=e.parent.showInvalid,this.zoomLevel=-1,this._renderThisFrame=!1,this._useParentImage=!1}function I$c(e){e$2e(e)&&e.freeResources()}n$b.prototype.pickImageryLayerFeatures=function(e,t){var i=t.globe.pick(e,t);if(e$2e(i)){for(var n,r=t.globe.ellipsoid.cartesianToCartographic(i),o=t.globe._surface._tilesToRender,a=0;!e$2e(n)&&a<o.length;++a){var s=o[a];h$18.contains(s.rectangle,r)&&(n=s)}if(e$2e(n)){for(var l=n.data.imagery,u=[],c=[],h=l.length-1;h>=0;--h){var d=l[h],f=d.readyImagery;if(e$2e(f)){var p=f.imageryLayer.imageryProvider;if(e$2e(p.pickFeatures)&&h$18.contains(f.rectangle,r)){var _=H$j,m=1/1024;if(_.west=e$2d.lerp(n.rectangle.west,n.rectangle.east,d.textureCoordinateRectangle.x-m),_.east=e$2d.lerp(n.rectangle.west,n.rectangle.east,d.textureCoordinateRectangle.z+m),_.south=e$2d.lerp(n.rectangle.south,n.rectangle.north,d.textureCoordinateRectangle.y-m),_.north=e$2d.lerp(n.rectangle.south,n.rectangle.north,d.textureCoordinateRectangle.w+m),h$18.contains(_,r)){var g=p.pickFeatures(f.x,f.y,f.level,r.longitude,r.latitude);!e$2e(g)||(u.push(g),c.push(f.imageryLayer))}}}}if(0!==u.length)return o$1l.all(u,(function(e){for(var t=[],i=0;i<e.length;++i){var n=e[i],o=c[i];if(e$2e(n)&&n.length>0)for(var a=0;a<n.length;++a){var s=n[a];s.imageryLayer=o,e$2e(s.position)||(s.position=r),t.push(s)}}return t}))}}},n$b.prototype.queueReprojectionCommands=function(e){for(var t=this._layers,i=0,n=t.length;i<n;++i)t[i].queueReprojectionCommands(e)},n$b.prototype.cancelReprojections=function(){for(var e=this._layers,t=0,i=e.length;t<i;++t)e[t].cancelReprojections()},n$b.prototype.isDestroyed=function(){return!1},n$b.prototype.destroy=function(){return this.removeAll(!0),i$11(this)},n$b.prototype._update=function(){var e,t,i,n,r=!0,o=this._layers;for(i=0,n=o.length;i<n;++i)(t=o[i])._layerIndex=i,e$2e(t._imageryProvider)&&(t._imageryProvider._id=t._layerIndex),t.show?(t._isBaseLayer=r,r=!1):t._isBaseLayer=!1,t.show!==t._show&&(e$2e(t._show)&&(e$2e(e)||(e=[]),e.push(t)),t._show=t.show),e$2e(t.gridProvider)&&t._isUpdate&&this.layerUpdate.raiseEvent(t,t._layerIndex);if(e$2e(e))for(i=0,n=e.length;i<n;++i)t=e[i],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},n$b.prototype._maxDetailLevelOffset=function(){for(var e=0,t=this._layers,i=0,n=t.length;i<n;++i){var r=t[i]._detailLevelOffset;t[i].featherEdgesEnabled&&r<1&&(r=1),e=Math.max(r,e)}return e},n$b.prototype.saveLocalCache=function(){for(var e=0,t=this._layers.length;e<t;e++)this._layers[e]instanceof h$R&&this._layers[e].saveLocalCache()},Object.defineProperties(r$h.prototype,{terrainProvider:{get:function(){return this._terrainProvider}}}),r$h.prototype.isDestroyed=function(){return!1},r$h.prototype.destroy=function(){return i$11(this)},Object.defineProperties(o$i.prototype,{length:{get:function(){return this._layers.length}}}),o$i.prototype.add=function(e,t){var i=e$2e(t);if(!e$2e(e))throw new t$15("layer is required.");if(i){if(t<0)throw new t$15("index must be greater than or equal to zero.");if(t>this._layers.length)throw new t$15("index must be less than or equal to the number of layers.")}i?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),e$2e(this._globe)&&e$2e(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerAdded.raiseEvent(e,t)},o$i.prototype.addTerrainProvider=function(e,t){if(!e$2e(e))throw new t$15("terrainProvider is required.");var i=new r$h(e);return this.add(i,t),e$2e(this._globe)&&e$2e(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),i},o$i.prototype.remove=function(e,t){t=u$Z(t,!0);var i=this._layers.indexOf(e);return-1!==i&&(this._layers.splice(i,1),this._update(),this.layerRemoved.raiseEvent(e,i),t&&e.destroy(),e$2e(this._globe)&&e$2e(this._globe._surface)&&(0===this._layers.length&&(this._globe.terrainProvider=new t$z({ellipsoid:this._globe.ellipsoid})),this._globe._surface.invalidateAllTiles()),!0)},o$i.prototype.removeAll=function(e){e=u$Z(e,!0);for(var t=this._layers,i=0,n=t.length;i<n;i++){var r=t[i];this.layerRemoved.raiseEvent(r,i),e&&r.destroy()}e$2e(this._globe)&&e$2e(this._globe._surface)&&(this._globe.terrainProvider=new t$z({ellipsoid:this._globe.ellipsoid}),this._globe._surface.invalidateAllTiles()),this._layers=[]},o$i.prototype.contains=function(e){return-1!==this.indexOf(e)},o$i.prototype.indexOf=function(e){return this._layers.indexOf(e)},o$i.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.","index");return this._layers[e]},o$i.prototype.raise=function(e){var t=f$h(this._layers,e);p$a(this,t,t+1),e$2e(this._globe)&&e$2e(this._globe._surface)&&this._globe._surface.invalidateAllTiles()},o$i.prototype.lower=function(e){var t=f$h(this._layers,e);p$a(this,t,t-1),e$2e(this._globe)&&e$2e(this._globe._surface)&&this._globe._surface.invalidateAllTiles()},o$i.prototype.raiseToTop=function(e){var t=f$h(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),e$2e(this._globe)&&e$2e(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},o$i.prototype.lowerToBottom=function(e){var t=f$h(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),e$2e(this._globe)&&e$2e(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerMoved.raiseEvent(e,0,t))},o$i.prototype.isDestroyed=function(){return!1},o$i.prototype.destroy=function(){return this.removeAll(!0),i$11(this)},o$i.prototype._update=function(){var e,t,i,n,r=!0,o=this._layers;for(i=0,n=o.length;i<n;++i)(t=o[i])._layerIndex=i,e$2e(t._terrainProvider)&&(t._terrainProvider._id=t._layerIndex),t.show?(t._isBaseLayer=r,r=!1):t._isBaseLayer=!1,t.show!==t._show&&(e$2e(t._show)&&(e$2e(e)||(e=[]),e.push(t)),t._show=t.show);if(e$2e(e))for(i=0,n=e.length;i<n;++i)t=e[i],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},Object.defineProperties(e$9.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),h$e.createLevelZeroTiles=function(e){if(!e$2e(e))throw new t$15("tilingScheme is required.");for(var t=e.getNumberOfXTilesAtLevel(0),i=e.getNumberOfYTilesAtLevel(0),n=new Array(t*i),r=0,o=0;o<i;++o)for(var a=0;a<t;++a)n[r++]=new h$e({tilingScheme:e,x:a,y:o,level:0});return n},h$e.prototype._updateCustomData=function(e,t,i){var n,r,o,a=this.customData;if(e$2e(t)&&e$2e(i)){for(a=a.filter((function(e){return-1===i.indexOf(e)})),this._customData=a,o=this._rectangle,n=0;n<t.length;++n)r=t[n],h$18.contains(o,r.positionCartographic)&&a.push(r);this._frameUpdated=e}else{var s=this._parent;if(e$2e(s)&&this._frameUpdated!==s._frameUpdated){a.length=0,o=this._rectangle;var l=s.customData;for(n=0;n<l.length;++n)r=l[n],h$18.contains(o,r.positionCartographic)&&a.push(r);this._frameUpdated=s._frameUpdated}}},Object.defineProperties(h$e.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return e$2e(this._southwestChild)||(this._southwestChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return e$2e(this._southeastChild)||(this._southeastChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return e$2e(this._northwestChild)||(this._northwestChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return e$2e(this._northeastChild)||(this._northeastChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<re$A.DONE}},eligibleForUnloading:{get:function(){var e=!0;return e$2e(this.data)&&(e$2e(e=this.data.eligibleForUnloading)||(e=!0)),e}}}),h$e.prototype.findLevelZeroTile=function(e,t,i){var n=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=n:t>=n&&(t-=n),!(i<0||i>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter((function(e){return e.x===t&&e.y===i}))[0]},h$e.prototype.findTileToWest=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;var i=t.findTileToWest(e);return void 0!==i?t.southwestChild===this?i.southeastChild:i.northeastChild:void 0},h$e.prototype.findTileToEast=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;var i=t.findTileToEast(e);return void 0!==i?t.southeastChild===this?i.southwestChild:i.northwestChild:void 0},h$e.prototype.findTileToSouth=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;var i=t.findTileToSouth(e);return void 0!==i?t.southwestChild===this?i.northwestChild:i.northeastChild:void 0},h$e.prototype.findTileToNorth=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;var i=t.findTileToNorth(e);return void 0!==i?t.northwestChild===this?i.southwestChild:i.southeastChild:void 0},h$e.prototype.freeResources=function(){this.state=re$A.START,this.renderable=!1,this.upsampledFromParent=!1,e$2e(this.data)&&e$2e(this.data.freeResources)&&this.data.freeResources(),I$c(this._southwestChild),this._southwestChild=void 0,I$c(this._southeastChild),this._southeastChild=void 0,I$c(this._northwestChild),this._northwestChild=void 0,I$c(this._northeastChild),this._northeastChild=void 0,this._rasterTexture=this._rasterTexture&&!this._rasterTexture.isDestroyed()&&this._rasterTexture.destroy(),this._rasterFBO=this._rasterFBO&&!this._rasterFBO.isDestroyed()&&this._rasterFBO.destroy(),this._rasterFBO=void 0,this._rasterized=!1,this._2DRasterTexture=this._2DRasterTexture&&!this._2DRasterTexture.isDestroyed()&&this._2DRasterTexture.destroy(),this._2DRasterized=!1,this._mvtLoaded=!1,this._clipRasterTexture=this._clipRasterTexture&&!this._clipRasterTexture.isDestroyed()&&this._clipRasterTexture.destroy(),this._clipRasterFbo=this._clipRasterFbo&&!this._clipRasterFbo.isDestroyed()&&this._clipRasterFbo.destroy(),this._clipRegionsCount=0,this._clipRegionRasterized=!1,this.isModified=!1};var Y$9=new h$18,m$f=new f$1a;h$e.prototype.createRealtimeRasterFBO=function(e){this._rasterTexture=new t$U({context:e.context,width:this._rasterTextureSize,height:this._rasterTextureSize,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}),this._rasterFBO=new t$V({context:e.context,colorTextures:[this._rasterTexture],destroyAttachments:!1})};var H$i=new p$1d;function Z$c(e,t){var i=f$1a.clone(t.context.uniformState._viewport),n=e$2d.toDegrees(e._rectangle.west),r=e$2d.toDegrees(e._rectangle.east),o=e$2d.toDegrees(e._rectangle.north),a=e$2d.toDegrees(e._rectangle.south),s=t.camera,l=s.frustum.clipPlane,u=s.heading,c=s.pitch,h=s.roll,d=new o$1p;1===t._fboState.frameBufferType&&s.disableReflection(),o$1p.clone(s._positionWC,d),p$1d.clone(s.transform,H$i),s._setTransform(p$1d.IDENTITY);var f=new a$V({width:r-n,aspectRatio:1,near:1,far:100}),p=new o$1p(.5*(n+r),.5*(o+a),50),_=new o$1p(0,0,-1),m=new o$1p(0,1,0);r=o$1p.cross(_,m,new o$1p);return p$1d.computeView(p,_,m,r,t.context.uniformState.view),t.context.uniformState.updateFrustum(f),{position:d,viewport:i,waterPlane:l,heading:u,pitch:c,roll:h}}function C$e(e){if(!e$2e(e)||!e$2e(e.tileProvider))throw new t$15("options.tileProvider is required.");if(e$2e(e.tileProvider.quadtree))throw new t$15("A QuadtreeTileProvider can only be used with a single QuadtreePrimitive");this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};var t=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new i$L,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=u$Z(e.maximumScreenSpaceError,2),this.tileCacheSize=u$Z(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!0,this._occluders=new e$9({ellipsoid:t}),this._tileLoadProgressEvent=new o$1h,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0,this._tilesToRenderOld=[],this._levelZeroTilesOld=[],this._zeroTileReady=!1,this._freeAllBakTiles=!1,this._visible=!0,this._delicateImagerylength=16}function Ce$5(e){if(e._zeroTileReady){e._tilesToRenderOld.length=0;for(var t=e._levelZeroTilesOld,i=0;i<t.length;++i){for(var n=t[i],r=n.customData,o=r.length,a=0;a<o;++a){var s=r[a];s.level=0,e._addHeightCallbacks.push(s)}n.freeResources()}e._levelZeroTilesOld.length=0}}function be$5(e){var t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,le$8(e);var i=e._levelZeroTiles;if(e$2e(i))if(e._zeroTileReady){e._tilesToRenderOld.length=0;for(var n=0;n<i.length;++n){for(var r=i[n].customData,o=r.length,a=0;a<o;++a){var s=r[a];s.level=0,e._addHeightCallbacks.push(s)}i[n].freeResources()}}else e._tilesToRenderOld=e._tilesToRender.slice(0),e._levelZeroTilesOld=e._levelZeroTiles.slice(0);e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}function le$8(e){var t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}function me$9(e,t){var i=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;(i!==e._lastTileLoadQueueLength||e._tilesInvalidated)&&(t.afterRender.push(o$1h.prototype.raiseEvent.bind(e._tileLoadProgressEvent,i)),e._lastTileLoadQueueLength=i);var n=e._debug;n.enableDebugOutput&&!n.suspendLodUpdate&&(n.maxDepth=e._tilesToRender.reduce((function(e,t){return Math.max(e,t.level)}),-1),n.tilesRendered=e._tilesToRender.length,(n.tilesVisited!==n.lastTilesVisited||n.tilesRendered!==n.lastTilesRendered||n.tilesCulled!==n.lastTilesCulled||n.maxDepth!==n.lastMaxDepth||n.tilesWaitingForChildren!==n.lastTilesWaitingForChildren||n.maxDepthVisited!==n.lastMaxDepthVisited)&&(console.log("Visited "+n.tilesVisited+", Rendered: "+n.tilesRendered+", Culled: "+n.tilesCulled+", Max Depth Rendered: "+n.maxDepth+", Max Depth Visited: "+n.maxDepthVisited+", Waiting for children: "+n.tilesWaitingForChildren),n.lastTilesVisited=n.tilesVisited,n.lastTilesRendered=n.tilesRendered,n.lastTilesCulled=n.tilesCulled,n.lastMaxDepth=n.maxDepth,n.lastTilesWaitingForChildren=n.tilesWaitingForChildren,n.lastMaxDepthVisited=n.maxDepthVisited))}h$e.prototype.resetCamera=function(e,t){var i=e.camera;1===e._fboState.frameBufferType&&t.waterPlane&&i.enableReflection(t.waterPlane),i._setTransform(H$i),i.setView({destination:t.position,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},convert:!1}),e.context.uniformState.update(e),e.context.uniformState.updateFrustum(i.frustum),e.context.uniformState.viewport=t.viewport},h$e.prototype.realtimeRasterVectors=function(e,t){if(!(this.level<2||(e.rasterPerFrame&&e.camera.zoomLevel!==this.zoomLevel&&(this._rasterized=!1),this._rasterized))){this.zoomLevel=e.camera.zoomLevel;var i=0;2===this._level&&(i=1),t._rasterCurrentFBOIdx=i,this._rasterTextureSize=t._rasterTextureSizes[i],this._rasterized=!0,m$f.width=this._rasterTextureSize,m$f.height=this._rasterTextureSize;for(var n=e.commandListRealtimeRaster,r=[],o=[],a=0;a<n.length;a++){var s=!1;if(e$2e(n[a]._globeIndex))if(this._level>=n[a]._globeIndex.level){var l=Math.pow(2,this._level-n[a]._globeIndex.level),u=Math.floor(this.y/l),c=Math.floor(this.x/l);u===n[a]._globeIndex.row&&c===n[a]._globeIndex.col&&(s=!0)}else{l=Math.pow(2,n[a]._globeIndex.level-this._level),u=Math.floor(n[a]._globeIndex.row/l),c=Math.floor(n[a]._globeIndex.col/l);u===this.y&&c===this.x&&(s=!0)}else{var h,d=new h$18((h=n[a]._boundingVolume instanceof i$1d?n[a]._boundingVolume:i$1d.fromOrientedBoundingBox(n[a]._boundingVolume)).center.x-h.radius,h.center.y-h.radius,h.center.x+h.radius,h.center.y+h.radius);d.west=e$2d.toRadians(d.west),d.north=e$2d.toRadians(d.north),d.east=e$2d.toRadians(d.east),d.south=e$2d.toRadians(d.south),e$2e(h$18.intersection(d,this._rectangle,Y$9))&&(s=!0)}s&&(n[a]._primitiveType===W$18.TRIANGLES?r.push(n[a]):o.push(n[a]))}if(0===r.length&&0===o.length)return void(e$2e(this._rasterFBO)&&(this._clearCommand.framebuffer=this._rasterFBO,this._clearCommand.execute(e.context)));e$2e(this._rasterTexture)||this.createRealtimeRasterFBO(e);var f=!1,p=t._rasterLineFBOs[i],_=t._rasterAAFBOs[i];e.rasterLineWidth>1&&o.length>0&&(f=!0,this._clearCommand.framebuffer=p,this._clearCommand.execute(e.context)),this._clearCommand.framebuffer=_,this._clearCommand.execute(e.context),this._clearCommand.framebuffer=this._rasterFBO,this._clearCommand.execute(e.context);var m=Z$c(this,e),g={},x={};for(a=0;a<r.length;a++){e$2e(g[y=r[a].layerId])?g[y].push(r[a]):g[y]=[r[a]]}for(a=0;a<o.length;a++){var y;e$2e(x[y=o[a].layerId])?x[y].push(o[a]):x[y]=[o[a]]}if(e$2e(e.rasterLayerIds))for(var v=0;v<e.rasterLayerIds.length;v++){var $=e.rasterLayerIds[v],b=g[$],T=x[$];if(e$2e(b))for(a=0;a<b.length;a++)e$2e(b[a].shaderProgram)&&(b[a].renderState=d$1m.fromCache({viewport:m$f,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),b[a].framebuffer=_,b[a].execute(e.context));if(e$2e(T))for(a=0;a<T.length;a++)e$2e(T[a].shaderProgram)&&(T[a].renderState=d$1m.fromCache({viewport:m$f}),T[a].framebuffer=f?p:_,T[a].execute(e.context))}e.context.webgpu&&e.context.engine.flushFramebuffer(),this.resetCamera(e,m),f&&(t._lineExpandCommand.framebuffer=_,t._lineExpandCommand.renderState=d$1m.fromCache({viewport:m$f}),t._lineExpandCommand.execute(e.context)),t._lineFXAACommand.framebuffer=this._rasterFBO,t._lineFXAACommand.renderState=d$1m.fromCache({viewport:m$f}),t._lineFXAACommand.execute(e.context)}},h$e.prototype.renderVectorBy2DCanvas=function(e,t){var i=e.rasterVectorCollection,n=i.bounds;if(e$2e(n)){var r=!1;if(e$2e(h$18.intersection(n,this._rectangle,Y$9))&&(r=!0),r&&!this._2DRasterized){this._2DRasterized=!0,e$2e(this._2DRasterTexture)||(this._2DRasterTexture=new t$U({context:e.context,width:i.canvasWidth,height:i.canvasHeight,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}));var o=i.draw(this._rectangle);this._2DRasterTexture.copyFrom(o),this._2DRasterTexture.textureAlpha=i.alpha}}},h$e.prototype.rasterClipRegion=function(e,t){if(!(e._fboState.name.indexOf("_excavationGlobeHeight")>-1||this._level<2)){var i=[].concat(t._excavateRegions.values).concat(t._modifyRegions.values).concat(t._imageryClipRegions.values).concat(t._extractRegions.values);e$2e(t._slopeRegion)&&i.push(t._slopeRegion),e$2e(t._hypsometricRegion)&&i.push(t._hypsometricRegion);var n=i.length;if(!(n<1||e.camera.frustum instanceof a$V||this._clipRegionsCount===n)){e$2e(this._clipRasterFbo)||(this._clipRasterTexture=new t$U({context:e.context,width:256,height:256,pixelFormat:V$12.RGBA}),this._clipRasterFbo=new t$V({context:e.context,colorTextures:[this._clipRasterTexture],destroyAttachments:!1})),this._clearCommand.framebuffer=this._clipRasterFbo,this._clearCommand.execute(e.context),m$f.width=256,m$f.height=256;for(var r=Z$c(this,e),o=!1,a=0;a<n;a++){var s=i[a];if(e$2e(h$18.intersection(s.rectangle,this._rectangle))){var l=s.command;!e$2e(s.command)||(o=!0,l.renderState=d$1m.fromCache({viewport:m$f,cull:{enabled:!1}}),l.framebuffer=this._clipRasterFbo,l.execute(e.context))}}if(this.resetCamera(e,r),(o=o||t.clippingType===R$L.KeepInside)&&(this._clipRegionsCount=n),this._clipRegionRasterized=o,o){var u=this._level+" "+this._x+" "+this._y;t._clipRasterTilesMap[u]=this}}}},h$e.prototype.setRasterValidTerrainCamera=function(e,t){var i=f$1a.clone(t.context.uniformState._viewport),n=t.camera;o$1p.clone(n.position,oldPosition),o$1p.clone(n.direction,oldDirection),o$1p.clone(n.up,oldUp),n.setView({destination:new o$1p(16383.5,16383.5,5e4),orientation:{direction:new o$1p(0,0,-1),up:new o$1p(0,1,0)},convert:!1});var r=new a$V({width:32767,aspectRatio:1,near:1,far:1e5});return t.context.uniformState.update(t),t.context.uniformState.updateFrustum(r),{position:oldPosition,direction:oldDirection,upDirection:oldUp,viewport:i}},h$e.prototype.setShowInvalid=function(e){this.showInvalid!==e&&(this.showInvalid=e,e$2e(this.data)&&this.data.setShowInvalid(e))},Object.defineProperties(C$e.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}}),C$e.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0,this._zeroTileReady=!1},C$e.prototype.forEachLoadedTile=function(e){for(var t=this._tileReplacementQueue.head;e$2e(t);)t.state!==re$A.START&&e(t),t=t.replacementNext},C$e.prototype.forEachRenderedTile=function(e){for(var t=this._tilesToRender,i=0,n=t.length;i<n;++i)e(t[i])},C$e.prototype.updateHeight=function(e,t,i){var n=this,r={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t,scene:i,removeFunc:function(){for(var e=n._addHeightCallbacks,t=e.length,i=0;i<t;++i)if(e[i]===r){e.splice(i,1);break}n._removeHeightCallbacks.push(r)}};return n._addHeightCallbacks.push(r),r.removeFunc},C$e.prototype.update=function(e){e$2e(this._tileProvider.update)&&this._tileProvider.update(e)},C$e.prototype.beginFrame=function(e){!e.passes.render||(this._tilesInvalidated&&(be$5(this),this._tilesInvalidated=!1),this._freeAllBakTiles&&(Ce$5(this),this._freeAllBakTiles=!1),this._tileProvider.initialize(e),le$8(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())},C$e.prototype.render=function(e){var t=e.passes,i=this._tileProvider;t.render&&(i.beginUpdate(e),ye$4(this,e),ke$3(this,e),i.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&i.updateForPick(e)},C$e.prototype.showInvalid=function(e){var t,i,n,r=[];for(t=0,i=this._levelZeroTiles.length;t<i;++t)r.push(this._levelZeroTiles[t]);for(;n=r.pop();)n.setShowInvalid(e),this._tileToUpdateHeights.push(n),e$2e(n._southeastChild)&&r.push(n._southeastChild),e$2e(n._southwestChild)&&r.push(n._southwestChild),e$2e(n._northeastChild)&&r.push(n._northeastChild),e$2e(n._northwestChild)&&r.push(n._northwestChild)},C$e.prototype.endFrame=function(e){if(e.passes.render&&e.mode!==C$14.MORPHING){if(e.camera._scene._mvtVisibleControl)for(var t=e.camera._scene._mvtVisibleLevel,i=this._tileReplacementQueue.head;e$2e(i);){if(!1===i._mvtLoaded&&i._level>e.camera._endLevel-t&&e$2e(i.data)&&e$2e(i.data.imagery))for(var n=i.data.imagery,r=0;r<n.length;r++)if(e$2e(n[r].loadingImagery)){n[r].loadingImagery.imageryLayer._imageryProvider instanceof M$S&&(i._mvtLoaded=n[r].processStateMachine(i,e))}i=i.replacementNext}!0===this.tileProvider.terrainProvider._needRefresh&&(this.invalidateAllTiles(),this.tileProvider.terrainProvider._needRefresh=!1),we$3(this,e),Ae$7(this,e),me$9(this,e)}},C$e.prototype.isDestroyed=function(){return!1},C$e.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._tileReplacementQueue.markStartOfRenderFrame(),this._tileReplacementQueue.trimTiles(0,0)};var w$d,ae$6=new a$18;function pe$7(e,t){var i=h$18.center(e.rectangle,ae$6),n=i.longitude-w$d.longitude,r=i.latitude-w$d.latitude,o=(i=h$18.center(t.rectangle,ae$6)).longitude-w$d.longitude,a=i.latitude-w$d.latitude;return n*n+r*r-(o*o+a*a)}var Pe$5=new o$1p,O$c=[];function Ee$7(e,t,i){if(t>5){for(var n=[],r=0;r<e.length;++r)e[r].level===t&&n.push(e[r]);if(n.length<i)for(r=0;r<n.length;++r)n[r]._useParentImage=!0}}function ye$4(e,t){var i=e._debug;if(!i.suspendLodUpdate){var n=e._tilesToRender;n.length=0;for(var r=e._tileReplacementQueue.head;r!==e._tileReplacementQueue.tail;)r._renderThisFrame=!1,r._useParentImage=!1,r=r.replacementNext;var o,a=e._tileProvider;if(!e$2e(e._levelZeroTiles)){if(!a.ready)return;var s=a.tilingScheme;e._levelZeroTiles=h$e.createLevelZeroTiles(s);var l=e._levelZeroTiles.length;if(O$c.length<l)for(O$c=new Array(l),o=0;o<l;++o)void 0===O$c[o]&&(O$c[o]=new H$h)}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;var u=e._levelZeroTiles,c=u.length>1?e._occluders:void 0;w$d=t.camera.positionCartographic,u.sort(pe$7);var h,d=e._addHeightCallbacks,f=e._removeHeightCallbacks,p=t.frameNumber;if(d.length>0||f.length>0){for(o=0,h=u.length;o<h;++o)(r=u[o])._updateCustomData(p,d,f);d.length=0,f.length=0}var _=t.camera;e._cameraPositionCartographic=_.positionCartographic;var m=p$1d.getTranslation(_.transform,Pe$5);for(e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(m,e._cameraReferenceFrameOriginCartographic),o=0,h=u.length;o<h;++o)r=u[o],e._tileReplacementQueue.markTileRendered(r),r.renderable?R$e(e,r,a,t,c,!1,O$c[o]):(m$e(e,e._tileLoadQueueHigh,r,t),++i.tilesWaitingForChildren);for(var g=0,x=22,y=0;y<n.length;++y)g=Math.max(n[y].level,g),x=Math.min(n[y].level,x);t.camera._endLevel=g,g-x>3&&Ee$7(n,g,e._delicateImagerylength),e._zeroTileReady||(e._tilesToRenderOld.length>0?n.length>2&&(e._zeroTileReady=!0,e._freeAllBakTiles=!0):e._zeroTileReady=!0),e._lastSelectionFrameNumber=p}}function m$e(e,t,i,n){!i.needsLoading||(void 0!==e.tileProvider.computeTileLoadPriority&&(i._loadPriority=e.tileProvider.computeTileLoadPriority(i,n)),t.push(i))}function H$h(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function te$5(){this.southwest=new H$h,this.southeast=new H$h,this.northwest=new H$h,this.northeast=new H$h}te$5.prototype.combine=function(e){var t=this.southwest,i=this.southeast,n=this.northwest,r=this.northeast;e.allAreRenderable=t.allAreRenderable&&i.allAreRenderable&&n.allAreRenderable&&r.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||r.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+i.notYetRenderableCount+n.notYetRenderableCount+r.notYetRenderableCount};for(var U$e=new Array(30),G$f=0;G$f<U$e.length;++G$f)U$e[G$f]=new te$5;function De$6(e,t,i,n,r){var o=e._debug;++o.tilesVisited,e._tileReplacementQueue.markTileRendered(i),i._updateCustomData(t.frameNumber),i.level>o.maxDepthVisited&&(o.maxDepthVisited=i.level);var a=Ne$5(e,t,i)<e.maximumScreenSpaceError;if(e._tileProvider._terrainProvider._enablePrjArea&&a){var s=i._level+2,l=4*i._x,u=4*i._y;for(let t=0;t<e._tilesToRender.length;t++){const i=e._tilesToRender[t];if(i._level==s&&(i._x==l-1&&i._y==u||i._x==l&&i._y==u-1||i._x==l+3&&i._y==u-1||i._x==l+4&&i._y==u||i._x==l+4&&i._y==u+3||i._x==l+3&&i._y==u+4||i._x==l&&i._y==u+4||i._x==l-1&&i._y==u+3)){a=!1;break}}}var c=i.southwestChild,h=i.southeastChild,d=i.northwestChild,f=i.northeastChild,p=e._lastSelectionFrameNumber,_=i._lastSelectionResultFrame===p?i._lastSelectionResult:D$J.NONE,m=e.tileProvider;if(a||n){var g=D$J.originalResult(_)===D$J.RENDERED,x=D$J.originalResult(_)===D$J.CULLED||_===D$J.NONE,y=i.state===re$A.DONE,v=g||x||y;if(v||e$2e(m.canRenderWithoutLosingDetail)&&(v=m.canRenderWithoutLosingDetail(i)),v)return a&&m$e(e,e._tileLoadQueueMedium,i,t),B$9(e,i),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$J.RENDERED,r.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.RENDERED,void(r.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));n=!0,a&&m$e(e,e._tileLoadQueueHigh,i,t)}if(m.canRefine(i)){if(c.upsampledFromParent&&h.upsampledFromParent&&d.upsampledFromParent&&f.upsampledFromParent)return B$9(e,i),m$e(e,e._tileLoadQueueMedium,i,t),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(h),e._tileReplacementQueue.markTileRendered(d),e._tileReplacementQueue.markTileRendered(f),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$J.RENDERED,r.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.RENDERED,void(r.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.REFINED;var $=e._tilesToRender.length,b=e._tileLoadQueueLow.length,T=e._tileLoadQueueMedium.length,C=e._tileLoadQueueHigh.length,S=e._tileToUpdateHeights.length;if(Fe$6(e,c,h,d,f,t,n,r),$!==e._tilesToRender.length){var w=r.allAreRenderable,E=r.anyWereRenderedLastFrame,P=r.notYetRenderableCount,A=!1;if(!w&&!E){for(var L=e._tilesToRender,M=$;M<L.length;++M)for(var R=L[M];void 0!==R&&R._lastSelectionResult!==D$J.KICKED&&R!==i;)R._lastSelectionResult=D$J.kick(R._lastSelectionResult),R=R.parent;e._tilesToRender.length=$,e._tileToUpdateHeights.length=S,B$9(e,i),i._lastSelectionResult=D$J.RENDERED;var O=_===D$J.RENDERED;!O&&P>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=b,e._tileLoadQueueMedium.length=T,e._tileLoadQueueHigh.length=C,m$e(e,e._tileLoadQueueMedium,i,t),r.notYetRenderableCount=i.renderable?0:1,A=!0),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=O,O||e._tileToUpdateHeights.push(i),++o.tilesWaitingForChildren}e.preloadAncestors&&!A&&m$e(e,e._tileLoadQueueLow,i,t)}}else i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.RENDERED,B$9(e,i),m$e(e,e._tileLoadQueueHigh,i,t),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$J.RENDERED,r.notYetRenderableCount=i.renderable?0:1}function Fe$6(e,t,i,n,r,o,a,s){if(!(t.level>=U$e.length)){var l=o.camera.positionCartographic,u=e._tileProvider,c=e._occluders,h=U$e[t.level],d=h.southwest,f=h.southeast,p=h.northwest,_=h.northeast;l.longitude<t.rectangle.east?l.latitude<t.rectangle.north?(R$e(e,t,u,o,c,a,d),R$e(e,i,u,o,c,a,f),R$e(e,n,u,o,c,a,p),R$e(e,r,u,o,c,a,_)):(R$e(e,n,u,o,c,a,p),R$e(e,t,u,o,c,a,d),R$e(e,r,u,o,c,a,_),R$e(e,i,u,o,c,a,f)):l.latitude<t.rectangle.north?(R$e(e,i,u,o,c,a,f),R$e(e,t,u,o,c,a,d),R$e(e,r,u,o,c,a,_),R$e(e,n,u,o,c,a,p)):(R$e(e,r,u,o,c,a,_),R$e(e,n,u,o,c,a,p),R$e(e,i,u,o,c,a,f),R$e(e,t,u,o,c,a,d)),h.combine(s)}}function Qe$3(e,t){var i=t.rectangle;return e$2e(e._cameraPositionCartographic)&&h$18.contains(i,e._cameraPositionCartographic)||e$2e(e._cameraReferenceFrameOriginCartographic)&&h$18.contains(i,e._cameraReferenceFrameOriginCartographic)}function R$e(e,t,i,n,r,o,a){if(i.computeTileVisibility(t,n,r)!==fe$r.NONE)return De$6(e,n,t,o,a);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),a.allAreRenderable=!0,a.anyWereRenderedLastFrame=!1,a.notYetRenderableCount=0,Qe$3(e,t)){(!e$2e(t.data)||!e$2e(t.data.vertexArray))&&m$e(e,e._tileLoadQueueMedium,t,n);var s=e._lastSelectionFrameNumber,l=t._lastSelectionResultFrame===s?t._lastSelectionResult:D$J.NONE;l!==D$J.CULLED_BUT_NEEDED&&l!==D$J.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=D$J.CULLED_BUT_NEEDED}else e.preloadSiblings||0===t.level?(m$e(e,e._tileLoadQueueLow,t,n),t._lastSelectionResult=D$J.CULLED):t._lastSelectionResult=D$J.CULLED;t._lastSelectionResultFrame=n.frameNumber}function Ne$5(e,t,i){if(t.mode===C$14.SCENE2D||t.camera.frustum instanceof a$V||t.camera.frustum instanceof l$11)return xe$4(e,t,i);if(i.isModified&&i.level>18)return 0;var n,r=i._distance;if(e._tileProvider._terrainProvider._enablePrjArea){var o=i.data.tileBoundingRegion._orientedBoundingBox.calculateBoxArea(t.camera.positionWC,t.mode,r,t.camera.frustum.sseDenominator,t.context.drawingBufferHeight,-1,t.context.uniformState.mvpViewPort,t.mapProjection);n=Math.sqrt(o/e$2d.PI_OVER_FOUR)/288}else{n=e._tileProvider.getLevelMaximumGeometricError(i.level)*t.context.drawingBufferHeight/(r*t.camera.frustum.sseDenominator)}return 0==e._tileProvider._terrainProvider._enablePrjArea&&t.fog.enabled&&(n-=e$2d.fog(r,t.fog.density)*t.fog.sse),n}function xe$4(e,t,i){var n=t.camera.frustum;e$2e(n._offCenterFrustum)&&(n=n._offCenterFrustum);var r=t.context,o=r.drawingBufferWidth,a=r.drawingBufferHeight,s=e._tileProvider.getLevelMaximumGeometricError(i.level)/(Math.max(n.top-n.bottom,n.right-n.left)/Math.max(o,a));return t.fog.enabled&&t.mode!==C$14.SCENE2D&&(s-=e$2d.fog(i._distance,t.fog.density)*t.fog.sse),s}function B$9(e,t){t._renderThisFrame=!0,e._tilesToRender.push(t)}function we$3(e,t){var i=e._tileLoadQueueHigh,n=e._tileLoadQueueMedium,r=e._tileLoadQueueLow;if(0!==i.length||0!==n.length||0!==r.length){e._tileReplacementQueue.trimTiles(e.tileCacheSize,e.tileCacheSizeForMVT);var o=Et$c()+e._loadQueueTimeSlice,a=e._tileProvider,s=q$c(e,t,a,o,i,!1);s=q$c(e,t,a,o,n,s),q$c(e,t,a,o,r,s)}}function Oe$6(e,t){return e._loadPriority-t._loadPriority}function q$c(e,t,i,n,r,o){void 0!==i.computeTileLoadPriority&&r.sort(Oe$6);for(var a=0,s=r.length;a<s&&(Et$c()<n||!o);++a){var l=r[a];e._tileReplacementQueue.markTileRendered(l),i.loadTile(t,l),o=!0}return o}var Q$8=new f$19,K$9=new a$18,D$b=new o$1p,He$4=[];function Ae$7(e,t){if(!e.tileProvider.ready)return;const i=He$4;i.length=0;const n=e._tileToUpdateHeights,r=Et$c()+e._updateHeightsTimeSlice,o=t.mode,a=t.mapProjection,s=e.tileProvider.tilingScheme.ellipsoid;let l;for(;n.length>0;){const t=n[0];if(!e$2e(t.data)||!e$2e(t.data.mesh)){const r=t._lastSelectionResultFrame===e._lastSelectionFrameNumber?t._lastSelectionResult:D$J.NONE;(r===D$J.RENDERED||r===D$J.CULLED_BUT_NEEDED)&&i.push(t),n.shift(),e._lastTileIndex=0;continue}const u=t.customData,c=u.length;let h=!1;for(l=e._lastTileIndex;l<c;++l){const e=u[l],i=t.data.terrainData;if(e$2e(i)&&i.wasCreatedByUpsampling(),t.level>e.level){if(e$2e(e.positionOnEllipsoidSurface)||(e.positionOnEllipsoidSurface=o$1p.fromRadians(e.positionCartographic.longitude,e.positionCartographic.latitude,0,s)),o===C$14.SCENE3D){const i=s.geodeticSurfaceNormal(e.positionOnEllipsoidSurface,Q$8.direction);if(!e$2e(s.getSurfaceNormalIntersectionWithZAxis(e.positionOnEllipsoidSurface,11500,Q$8.origin))){let n=0;e$2e(t.data.tileBoundingRegion)&&(n=t.data.tileBoundingRegion.minimumHeight);const r=Math.min(n,-11500),o=o$1p.multiplyByScalar(i,Math.abs(r)+1,D$b);o$1p.subtract(e.positionOnEllipsoidSurface,o,Q$8.origin)}}else a$18.clone(e.positionCartographic,K$9),K$9.height=-11500,a.project(K$9,D$b),o$1p.fromElements(D$b.z,D$b.x,D$b.y,D$b),o$1p.clone(D$b,Q$8.origin),o$1p.clone(o$1p.UNIT_X,Q$8.direction);const i=t.data.pick(Q$8,o,a,!1,D$b);e$2e(i)&&(e$2e(e.callback)&&e.callback(i),e.level=t.level)}if(Et$c()>=r){h=!0;break}}if(h){e._lastTileIndex=l;break}e._lastTileIndex=0,n.shift()}for(l=0;l<i.length;l++)n.push(i[l])}function ke$3(e,t){for(var i=e._tileProvider,n=e._zeroTileReady?e._tilesToRender:e._tilesToRenderOld,r=0,o=n.length;r<o;++r){var a=n[r];i.showTileThisFrame(a,t)}}function p$9(e){this._bounds=void 0;var t=512;this._canvas=document.createElement("canvas"),this._canvas.height=t,this._canvas.width=t,this._pickCanvas=document.createElement("canvas"),this._pickCanvas.height=t,this._pickCanvas.width=t,this._polygons=new e$1Q,this._polygonHoles=new e$1Q,this._polylines=new e$1Q,this._quadtreePrimitive=e,this._alpha=1}Object.defineProperties(p$9.prototype,{bounds:{get:function(){return this._bounds}},canvasWidth:{get:function(){return this._canvas.width}},canvasHeight:{get:function(){return this._canvas.height}},alpha:{get:function(){return this._alpha},set:function(e){this._alpha=e}}});var T$g=new h$18;function f$g(e,t){if(e$2e(t)){var i=e._rectangle;e$2e(h$18.intersection(t,i,T$g))&&(e._2DRasterized=!1),e$2e(e._southwestChild)&&f$g(e._southwestChild,t),e$2e(e._southeastChild)&&f$g(e._southeastChild,t),e$2e(e._northwestChild)&&f$g(e._northwestChild,t),e$2e(e._northeastChild)&&f$g(e._northeastChild,t)}}function Z$b(e){var t,i,n=e._polygons,r=n.values.length;for(t=0;t<r;t++)i=n.values[t].bounds,e$2e(e._bounds)?e._bounds=h$18.union(i,e._bounds):e._bounds=i;for(r=(n=e._polygonHoles).values.length,t=0;t<r;t++)i=n.values[t].bounds,e$2e(e._bounds)?e._bounds=h$18.union(i,e._bounds):e._bounds=i;for(r=(n=e._polylines).values.length,t=0;t<r;t++)i=n.values[t].bounds,e$2e(e._bounds)?e._bounds=h$18.union(i,e._bounds):e._bounds=i}function x$f(e,t,i,n){for(var r=e.length,o=[],a=i/t.width,s=n/t.height,l=0;l<r;l++){var u=e[l],c=new o$1o;c.x=(u.longitude-t.west)*a,c.y=(t.north-u.latitude)*s,c.x=Math.floor(c.x+.5),c.y=Math.floor(c.y+.5),o.push(c)}return o}function O$b(e,t,i,n,r,o){var a,s=t.values.length;for(a=0;a<s;a++){var l=t.values[a];if(e$2e(h$18.intersection(l.bounds,i,T$g))){var u;u=e$2e(l.selected)&&l.selected?e$1X.BLUE:o?new e$1X(0,0,0,1):l.fillColor;var c=x$f(l.positions,i,n,r);t$d.drawPolygon(e,{canvasPostions:c,fillColor:u,lineColor:l.lineColor,lineWidth:l.lineWidth})}}}function M$f(e,t,i,n,r){var o,a=t.values.length;for(o=0;o<a;o++){var s=t.values[o];if(e$2e(h$18.intersection(s.bounds,i,T$g))){var l=x$f(s.positions,i,n,r);t$d.drawSimplePolyline(e,{canvasPostions:l,lineColor:s.lineColor,lineWidth:s.lineWidth})}}}function W$g(e,t){var i=Math.floor(e/65536),n=e-65536*i,r=Math.floor(n/256),o=n-256*r,a=1;return e$2e(t)&&(a=t/256),new e$1X(o/256,r/256,i/256,a)}p$9.prototype.add=function(e){var t=e.name,i=e.positions,n=new h$18,r=u$Z(e.geometryType,C$q.POLYGON),o=u$Z(e.pickId,0);h$18.fromCartographicArray(i,n);var a={pickId:o,positions:i,bounds:n,fillColor:e.fillColor,lineColor:e.lineColor,lineWidth:e.lineWidth};r==C$q.POLYLINE?this._polylines.set(t,a):r==C$q.POLYGON?this._polygons.set(t,a):r==C$q.POLYGON_HOLE&&this._polygonHoles.set(t,a),Z$b(this),f$g(this._quadtreePrimitive._levelZeroTiles[0],n),f$g(this._quadtreePrimitive._levelZeroTiles[1],n)},p$9.prototype.remove=function(e){var t;if(this._polygons.contains(e)){var i=this._polygons.get(e);e$2e(i)&&(t=i.bounds),this._polygons.remove(e)}if(this._polygonHoles.contains(e)){var n=this._polygonHoles.get(e);e$2e(n)&&(t=n.bounds),this._polygonHoles.remove(e)}if(this._polylines.contains(e)){var r=this._polylines.get(e);e$2e(r)&&(t=r.bounds),this._polylines.remove(e)}f$g(this._quadtreePrimitive._levelZeroTiles[0],t),f$g(this._quadtreePrimitive._levelZeroTiles[1],t)},p$9.prototype.removeAll=function(){this._polylines.removeAll(),this._polygons.removeAll(),this._polygonHoles.removeAll(),f$g(this._quadtreePrimitive._levelZeroTiles[0],this._bounds),f$g(this._quadtreePrimitive._levelZeroTiles[1],this._bounds)},p$9.prototype.draw=function(e){var t=this._canvas.getContext("2d");return t.clearRect(0,0,this._canvas.width,this._canvas.height),O$b(t,this._polygons,e,this._canvas.width,this._canvas.height,!1),O$b(t,this._polygonHoles,e,this._canvas.width,this._canvas.height,!0),M$f(t,this._polylines,e,this._canvas.width,this._canvas.height),this._canvas};var c$c=new h$18;function i$d(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=h$18.clone(h$18.MAX_VALUE)}function h$d(e){var t=new t$z({ellipsoid:e=u$Z(e,t$12.WGS84)}),i=new n$b,n=new o$i;this._ellipsoid=e,this._imageryLayerCollection=i,this._terrainLayerCollection=n,this._surfaceShaderSet=new U$f,this._material=void 0,this._surface=new C$e({tileProvider:new R$H({terrainProvider:t,imageryLayers:i,terrainLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainLayerCollection._globe=this,this._rasterVectorCollection=new p$9(this._surface),this._terrainProvider=t,this._defaultTerrainProvider=t,this._terrainProviderChanged=new o$1h,J$8(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new t$10({url:n$17("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.tileCacheSizeForMVT=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!0,this.fillHighlightColor=void 0,this.enableLighting=!1,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!0,this.lightingFadeOutDistance=1e7,this.lightingFadeInDistance=2e7,this.nightFadeOutDistance=1e7,this.nightFadeInDistance=5e7,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!0,this.shadows=W$X.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this._globeAlpha=1,this._splitDirection=new o$1o(0,0),this._sceneMode=C$14.SCENE3D,this.clippingType=R$L.KeepOutside,this.showExcavationSide=!0,this._scene=void 0,this._excavationNormalTextureUrl=n$17("Assets/Textures/excavationregion_top_Normal.jpg"),this._excavationSideNormalTextureUrl=n$17("Assets/Textures/excavationregion_side_Normal.jpg"),this._floodFlagTexture=void 0,this._floodRect=new e$2c,this._translucency=new i$d,this._undergroundColor=e$1X.clone(e$1X.BLACK),this._undergroundColorAlphaByDistance=new o$Y(e.maximumRadius/1e3,0,e.maximumRadius/5,1)}function J$8(e){var t=[],i=e$2e(e._material)&&(e._material.shaderSource.match(/slope/)||e._material.shaderSource.match("normalEC")),n=[le$9];!e$2e(e._material)||i&&!e._terrainProvider.requestVertexNormals?e._surface._tileProvider.uniformMap=void 0:(n.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.uniformMap=e._material._uniforms),n.push(Ne$6),e._surfaceShaderSet.baseVertexShaderSource=new s$V({sources:[le$9,He$5],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new s$V({sources:n,defines:t}),e._surfaceShaderSet.material=e._material}function Ke$3(e){return function(t,i){return i$1d.distanceSquaredTo(t.pickBoundingSphere,e)-i$1d.distanceSquaredTo(i.pickBoundingSphere,e)}}p$9.prototype.getPickID=function(e){var t,i=this._polygons,n=i.values.length,r=[],o=0;for(t=0;t<n;t++){var a=i.values[t].bounds;h$18.contains(a,e)&&(0==o?h$18.clone(a,c$c):c$c=h$18.union(a,c$c),o++,r.push(i.values[t]))}if(0==o)return-1;var s=this._pickCanvas.getContext("2d");for(n=r.length,t=0;t<n;t++){var l=r[t],u=x$f(l.positions,c$c,this._pickCanvas.width,this._pickCanvas.height),c=W$g(l.pickId);t$d.drawPolygon(s,{canvasPostions:u,fillColor:c,lineColor:c})}var h=(e.longitude-c$c.west)/c$c.width*this._pickCanvas.width,d=(c$c.north-e.latitude)/c$c.height*this._pickCanvas.height;h=Math.floor(h+.5);var f=4*((d=Math.floor(d+.5))*this._pickCanvas.width+h),p=s.getImageData(0,0,this._pickCanvas.width,this._pickCanvas.height),_=p.data[f],m=p.data[f+1],g=p.data[f+2];return p.data[f+3],_+256*m+256*g*256},p$9.prototype.setSelection=function(e){var t,i=this._polygons,n=i.values.length,r=0,o=!1;for(t=0;t<n;t++){var a=i.values[t],s=a.pickId,l=a.bounds;o=!1,s===e?(a.selected=!0,o=!0):(e$2e(a.selected)&&a.selected&&(o=!0),a.selected=!1),o&&(0==r?h$18.clone(l,c$c):c$c=h$18.union(l,c$c),r++)}f$g(this._quadtreePrimitive._levelZeroTiles[0],c$c),f$g(this._quadtreePrimitive._levelZeroTiles[1],c$c)},p$9.prototype.isDestroyed=function(){return!1},p$9.prototype.destroy=function(){return i$11(this)},Object.defineProperties(i$d.prototype,{enabled:{get:function(){return this._enabled},set:function(e){o$1q.typeOf.bool("enabled",e),this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("frontFaceAlpha",e,0),o$1q.typeOf.number.lessThanOrEquals("frontFaceAlpha",e,1),this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){if(e$2e(e)&&e.far<e.near)throw new t$15("far distance must be greater than near distance.");this._frontFaceAlphaByDistance=o$Y.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("backFaceAlpha",e,0),o$1q.typeOf.number.lessThanOrEquals("backFaceAlpha",e,1),this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){if(e$2e(e)&&e.far<e.near)throw new t$15("far distance must be greater than near distance.");this._backFaceAlphaByDistance=o$Y.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){e$2e(e)||(e=h$18.clone(h$18.MAX_VALUE)),h$18.clone(e,this._rectangle)}}}),new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Object.defineProperties(h$d.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},terrainLayers:{get:function(){return this._terrainLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tileLoadedEvent:{get:function(){return this._surface.tileProvider.tileLoadedEvent}},tilesLoaded:{get:function(){return!e$2e(this._surface)||this._surface.tileProvider.ready&&0===this._surface._tileLoadQueueHigh.length&&0===this._surface._tileLoadQueueMedium.length&&0===this._surface._tileLoadQueueLow.length}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){e$2e(e)||(e=h$18.clone(h$18.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),e$2e(this._material)&&J$8(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,J$8(this))}},globeAlpha:{get:function(){return this._globeAlpha},set:function(e){e$2e(e)&&e>=0&&e<=1&&(this._globeAlpha=e,this._translucency.enabled=e<1,this._translucency.frontFaceAlpha=e,this._translucency.backFaceAlpha=e,this._surface.tileProvider.globeAlpha=e)}},cullEnabled:{get:function(){return this._surface._tileProvider._cullEnabled},set:function(e){if(o$1q.typeOf.bool("cullEnabled",e),e$2e(e)&&(this._surface._tileProvider._cullEnabled=e,e$2e(this._surface._tileProvider._renderState))){var t=d$1m.getState(this._surface._tileProvider._renderState);t.cull.enabled=e,this._surface._tileProvider._renderState=d$1m.fromCache(t)}}},HypsometricSetting:{get:function(){return{hypsometricSetting:this._surface._tileProvider._hypsometricSetting,analysisMode:this._surface._tileProvider._hypAnalysisMode,altitudeMode:this._surface._tileProvider._style3D._altitudeMode}},set:function(e){if(this.removeRasterRegions(),this._surface._tileProvider._bUseHypColorTable=!1,this._surface._tileProvider._hypsometricRegionUpdate=!0,e$2e(this._surface._tileProvider._hypsometricRegion)&&(e$2e(this._surface._tileProvider._hypsometricRegion.command)&&(this._surface._tileProvider._hypsometricRegion.command.vertexArray.destroy(),this._surface._tileProvider._hypsometricRegion.command.shaderProgram.destroy()),this._surface._tileProvider._hypsometricRegion=null),e$2e(e)&&e$2e(e.hypsometricSetting)){if(this._surface._tileProvider._hypAnalysisMode=e.analysisMode||this._surface._tileProvider._hypAnalysisMode,this._surface._tileProvider._hypsometricSetting=u$L.clone(e.hypsometricSetting,this._surface._tileProvider._hypsometricSetting),this._surface._tileProvider._hypsometricSetting.ColorTable.generateBuffer(),e$2e(this._surface._tileProvider._hypsometricTexture)&&this._surface._tileProvider._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._surface._tileProvider._hypsometricSetting.ColorTable._imageBuffer}),this._surface._tileProvider._hypAnalysisMode!=k$S.AnalysisRegionMode.ARM_NONE&&(this._surface._tileProvider._bUseHypColorTable=!0),this._surface._tileProvider._hypsometricSetting.UpdatePolygonRegion&&this._surface._tileProvider._hypAnalysisMode==k$S.AnalysisRegionMode.ARM_REGION&&this._surface._tileProvider._hypsometricSetting.CoverageArea.length>0){var t=this._surface._tileProvider._hypsometricSetting.CoverageArea,i=o$1p.fromDegreesArrayHeights(t),n=h$18.fromCartesianArray(i),r=U$18.createGeometry(new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(t)}}));this._surface._tileProvider._hypsometricRegion={rectangle:n,worldGeometry:r,modelMatrix:p$1d.fromTranslation(new o$1p(t[0],t[1],0),new p$1d),command:void 0}}}else e$2e(this._surface._tileProvider._hypsometricSetting)&&(this._surface._tileProvider._hypsometricSetting.destroy(),this._surface._tileProvider._hypsometricSetting=void 0)}},SlopeSetting:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Globe_SlopeSetting"),{slopeSetting:this._surface._tileProvider._slopeSetting,analysisMode:this._surface._tileProvider._slopeAnalysisMode,altitudeMode:this._surface._tileProvider._style3D._altitudeMode}},set:function(e){if(LicenseChecker.LICENSECHECKER.verify("Globe_SlopeSetting"),this.removeRasterRegions(),this._surface._tileProvider._bUseSlopeColorTable=!1,this._surface._tileProvider._slopeRegionUpdate=!0,e$2e(this._surface._tileProvider._slopeRegion)&&(e$2e(this._surface._tileProvider._slopeRegion.command)&&(this._surface._tileProvider._slopeRegion.command.vertexArray.destroy(),this._surface._tileProvider._slopeRegion.command.shaderProgram.destroy()),this._surface._tileProvider._slopeRegion=null),e$2e(e)&&e$2e(e.slopeSetting)){if(this._surface._tileProvider._slopeAnalysisMode=e.analysisMode,this._surface._tileProvider._slopeSetting=l$K.clone(e.slopeSetting,this._surface._tileProvider._slopeSetting),this._surface._tileProvider._slopeSetting.ColorTable.generateBuffer(),e$2e(this._surface._tileProvider._slopeColorTexture)&&this._surface._tileProvider._slopeColorTexture.copyFrom({width:1024,height:64,arrayBufferView:this._surface._tileProvider._slopeSetting.ColorTable._imageBuffer}),this._surface._tileProvider._slopeAnalysisMode!=k$S.AnalysisRegionMode.ARM_NONE&&(this._surface._tileProvider._bUseSlopeColorTable=!0),this._surface._tileProvider._slopeSetting.UpdatePolygonRegion&&this._surface._tileProvider._slopeAnalysisMode==k$S.AnalysisRegionMode.ARM_REGION&&this._surface._tileProvider._slopeSetting.CoverageArea.length>0){var t=this._surface._tileProvider._slopeSetting.CoverageArea,i=o$1p.fromDegreesArrayHeights(t),n=h$18.fromCartesianArray(i),r=U$18.createGeometry(new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(t)}}));this._surface._tileProvider._slopeRegion={rectangle:n,worldGeometry:r,modelMatrix:p$1d.fromTranslation(new o$1p(t[0],t[1],0),new p$1d),command:void 0}}}else e$2e(this._surface._tileProvider._slopeSetting)&&(this._surface._tileProvider._slopeSetting.destroy(),this._surface._tileProvider._slopeSetting=void 0)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){o$1o.clone(e,this._splitDirection),o$1o.clone(e,this._surface._tileProvider._splitDirection)}},swipeRegion:{get:function(){var e=this._surface._tileProvider._swipeRegion;return new f$1a(e.x,e.y,e.z-e.x,e.w-e.y)},set:function(e){if(e$2e(e)){if(!(e instanceof f$1a))throw new t$15("swipeRegion must be a instance of BoundingRectangle.");e$2c.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._surface._tileProvider._swipeRegion)}}},swipeEnabled:{get:function(){return this._surface._tileProvider._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?this.splitDirection=new o$1o(0,0):e$2c.fromElements(0,0,1,1,this._surface._tileProvider._swipeRegion),this._surface._tileProvider._swipeEnabled=e)}},imageryLodTolerance:{get:function(){return this._surface._delicateImagerylength},set:function(e){"number"==typeof e&&(this._surface._delicateImagerylength=e)}},excavationSideTextureUrl:{get:function(){return this._surface.tileProvider._excavationSideTextureUrl},set:function(e){this._surface.tileProvider._excavationSideTextureUrl=e}},excavationBottomTextureUrl:{get:function(){return this._surface.tileProvider._excavationBottomTextureUrl},set:function(e){this._surface.tileProvider._excavationBottomTextureUrl=e}},translucency:{get:function(){return this._translucency}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=e$1X.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){if(e$2e(e)&&e.far<e.near)throw new t$15("far distance must be greater than near distance.");this._undergroundColorAlphaByDistance=o$Y.clone(e,this._undergroundColorAlphaByDistance)}}});var Qe$2=[],Ye$3={start:0,stop:0};h$d.prototype.pickWorldCoordinates=function(e,t,i){if(!e$2e(e))throw new t$15("ray is required");if(!e$2e(t))throw new t$15("scene is required");var n=t.mode,r=t.mapProjection,o=Qe$2;o.length=0;var a,s,l,u=this._surface._tilesToRender,c=u.length;for(s=0;s<c;++s){var h=(a=u[s]).data;if(e$2e(h)){var d=h.pickBoundingSphere;if(n!==C$14.SCENE3D)h.pickBoundingSphere=d=i$1d.fromRectangleWithHeights2D(a.rectangle,r,h.tileBoundingRegion.minimumHeight,h.tileBoundingRegion.maximumHeight,d),o$1p.fromElements(d.center.z,d.center.x,d.center.y,d.center);else{if(!e$2e(h.renderedMesh))continue;i$1d.clone(h.renderedMesh.boundingSphere3D,d)}e$2e(g$1j.raySphere(e,d,Ye$3))&&o.push(h)}}for(o.sort(Ke$3(e.origin)),c=o.length,s=0;s<c&&!e$2e(l=o[s].pick(e,t.mode,t.mapProjection,!0,i));++s);return l};var $$a=new o$1p,ee$8=new o$1p,re$7=new o$1p;h$d.prototype.computeSurfaceArea=function(e,t,i){var n,r=e._polygonHierarchy.positions;if(!e$2e(i)){for(var o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0;u<r.length;u++){var c=a$18.fromCartesian(r[u]);o=Math.min(c.longitude,o),a=Math.max(c.longitude,a),s=Math.min(c.latitude,s),l=Math.max(c.latitude,l)}var h=a$18.toCartesian(new a$18(o,s,0)),d=a$18.toCartesian(new a$18(a,l,0));n=o$1p.angleBetween(h,d)}for(var f=U$18.fromPositions({positions:r,granularity:e$2e(i)?i:n/32}),p=U$18.createGeometry(f),_=0,m={},g=0;g<p.indices.length;g+=3){var x,y,v,$=p.indices[g];if(e$2e(m[$]))x=m[$];else{x=new o$1p(p.attributes.position.values[3*$],p.attributes.position.values[3*$+1],p.attributes.position.values[3*$+2]);var b=a$18.fromCartesian(x),T=this.getHeight(b);if(!e$2e(T))continue;b=a$18.fromRadians(b.longitude,b.latitude,T),x=a$18.toCartesian(b,t),m[$]=o$1p.clone(x)}var C=p.indices[g+1];if(e$2e(m[C]))y=m[C];else{y=new o$1p(p.attributes.position.values[3*C],p.attributes.position.values[3*C+1],p.attributes.position.values[3*C+2]);var S=a$18.fromCartesian(y),w=this.getHeight(S);if(!e$2e(w))continue;S=a$18.fromRadians(S.longitude,S.latitude,w),y=a$18.toCartesian(S,t),m[C]=o$1p.clone(y)}var E=p.indices[g+2];if(e$2e(m[E]))v=m[E];else{v=new o$1p(p.attributes.position.values[3*E],p.attributes.position.values[3*E+1],p.attributes.position.values[3*E+2]);var P=a$18.fromCartesian(v),A=this.getHeight(P);if(!e$2e(A))continue;P=a$18.fromRadians(P.longitude,P.latitude,A),v=a$18.toCartesian(P,t),m[E]=o$1p.clone(v)}$$a=o$1p.subtract(y,x,$$a),ee$8=o$1p.subtract(v,x,ee$8),re$7=o$1p.cross($$a,ee$8,re$7),_+=.5*o$1p.magnitude(re$7)}return _},h$d.prototype.getVisibleTiles=function(){for(var e=[],t=this._surface._tilesToRender,i=0;i<t.length;i++)e.push({x:t[i].x,y:t[i].y,level:t[i].level});return e},h$d.prototype.computeSurfaceDistance=function(e,t){for(var i=e._positions,n=0,r=[],o=i.length-1,a=0;a<o;a++)for(var s=i[a],l=i[a+1],u=o$1p.angleBetween(s,l)/64,c=e$2d.chordLength(u,6378137),h=y$Z.subdivideLine(s,l,c,r),d=o$1p.unpackArray(h),f=d.length-1,p=0;p<f;p++){var _=d[p],m=a$18.fromCartesian(_),g=this.getHeight(m);if(e$2e(g)){m=a$18.fromRadians(m.longitude,m.latitude,g);var x=a$18.toCartesian(m),y=d[p+1];if(m=a$18.fromCartesian(y),e$2e(g=this.getHeight(m))){m=a$18.fromRadians(m.longitude,m.latitude,g);var v=a$18.toCartesian(m);n+=o$1p.distance(x,v)}}}return n};var Je$3=new a$18;h$d.prototype.pick=function(e,t,i){if(this.show){if(e$2e(i=this.pickWorldCoordinates(e,t,i))&&t.mode!==C$14.SCENE3D){i=o$1p.fromElements(i.y,i.z,i.x,i);var n=t.mapProjection.unproject(i,Je$3);i=t.globe.ellipsoid.cartographicToCartesian(n,i)}return i}};var $e$3=new o$1p,me$8=new o$1p,er$1=new a$18,rr$1=new f$19;function G$e(e,t){return h$18.contains(e.rectangle,t)?e:void 0}function he$7(e){for(var t=Number.MAX_VALUE,i=-Number.MAX_VALUE,n=2,r=e.length;n<r;n+=3){var o=e[n];t=Math.min(t,o),i=Math.max(i,o)}return{min:t,max:i}}function tr$2(e,t,i){var n=h$18.center(t,new o$1p);n.height=i,n=a$18.toCartesian(n);var r=o$1p.distance(e[0],e[1])/90,o=[];for(let t=0;t<e.length;t++){var a=new o$1p,s=o$1p.subtract(e[t],n,new o$1p);o$1p.normalize(s,s),o$1p.multiplyComponents(s,new o$1p(r,r,r),a),o$1p.subtract(e[t],a,a);var l=a$18.fromCartesian(a),u=e$2d.toDegrees(l.longitude),c=e$2d.toDegrees(l.latitude);o.push(u),o.push(c),o.push(l.height)}return o}function ir$2(e,t){var i=e.mapProjection,n=i.ellipsoid,r=new o$1p,o=new a$18;return n.cartesianToCartographic(t,o),i.project(o,r),o$1p.fromElements(r.z,r.x,r.y)}function fe$6(e,t){if(!e$2e(t._surface)||!e$2e(t._surface._tileProvider))return!1;var i=t._surface._tileProvider;if(e$2e(t._slopeSetting)&&i._modifyRegions.values.length>0)return!1;var n=t._surface._levelZeroTiles;if(!e$2e(n))return!1;var r,o,a=n.length;for(o=0;o<a&&(r=n[o],!h$18.contains(r.rectangle,e));++o);if(o>=a)return!1;for(;r._lastSelectionResult===D$J.REFINED;)r=G$e(r.southwestChild,e)||G$e(r.southeastChild,e)||G$e(r.northwestChild,e)||r.northeastChild;for(var s=r.data,l=s.normalTexture,u=s.terrainData.normalTexture;!(u||(r=r.parent,u=r.data.terrainData.normalTexture,l=r.data.normalTexture,r.level<10)););if(!e$2e(u)||!e$2e(l))return!1;var c=parseInt((e.longitude-r.rectangle.west)/(r.rectangle.east-r.rectangle.west)*l.width)+parseInt((r.rectangle.north-e.latitude)/(r.rectangle.north-r.rectangle.south)*l.height)*l.width,h=new o$1p;return h.x=2*(u[3*c]/255-.5),h.y=2*(u[3*c+1]/255-.5),h.z=2*(u[3*c+2]/255-.5),o$1p.normalize(h,h),h}function a$a(){this._colorTexture=void 0,this._depthStencilTexture=void 0,this._globeDepthTexture=void 0,this._tempGlobeDepthTexture=void 0,this._tempCopyDepthTexture=void 0,this._colorRenderBuffer=void 0,this._depthStencilRenderbuffer=void 0,this._copyDepthFramebuffer=void 0,this._tempCopyDepthFramebuffer=void 0,this._updateDepthFramebuffer=void 0,this._framebufferWithTexture=void 0,this._framebufferWithRenderbuffer=void 0,this._isMSAA=!1,this._clearColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._viewport=new f$1a,this._rs=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useLogDepth=void 0,this._useHdr=void 0,this._debugGlobeDepthViewportCommand=void 0,this._numSamples=1}function O$a(e,t,i,n){if(!e$2e(e._debugGlobeDepthViewportCommand)||n!==e._useLogDepth){var r=new s$V({defines:[n?"LOG_DEPTH":""],sources:["uniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float z_window = czm_unpackDepth(texture2D(u_depthTexture, v_textureCoordinates));\n z_window = czm_reverseLogDepth(z_window); \n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]});e._debugGlobeDepthViewportCommand=t.createViewportQuadCommand(r,{shaderProgramName:"debugGlobeDepth",uniformMap:{u_depthTexture:function(){return e._globeDepthTexture}},owner:e}),e._useLogDepth=n}e._debugGlobeDepthViewportCommand.execute(t,i)}function M$e(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&!e._depthStencilTexture.isDestroyed()&&e._depthStencilTexture.destroy(),e._globeDepthTexture=e._globeDepthTexture&&!e._globeDepthTexture.isDestroyed()&&e._globeDepthTexture.destroy()}function U$d(e){e._colorRenderBuffer=e._colorRenderBuffer&&!e._colorRenderBuffer.isDestroyed()&&e._colorRenderBuffer.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&!e._depthStencilRenderbuffer.isDestroyed()&&e._depthStencilRenderbuffer.destroy()}function N$a(e){e._framebufferWithTexture=e._framebufferWithTexture&&!e._framebufferWithTexture.isDestroyed()&&e._framebufferWithTexture.destroy(),e._framebufferWithRenderbuffer=e._framebufferWithRenderbuffer&&!e._framebufferWithRenderbuffer.isDestroyed()&&e._framebufferWithRenderbuffer.destroy(),e._copyDepthFramebuffer=e._copyDepthFramebuffer&&!e._copyDepthFramebuffer.isDestroyed()&&e._copyDepthFramebuffer.destroy()}function l$e(e){e._tempCopyDepthFramebuffer=e._tempCopyDepthFramebuffer&&!e._tempCopyDepthFramebuffer.isDestroyed()&&e._tempCopyDepthFramebuffer.destroy(),e._updateDepthFramebuffer=e._updateDepthFramebuffer&&!e._updateDepthFramebuffer.isDestroyed()&&e._updateDepthFramebuffer.destroy(),e._tempGlobeDepthTexture=e._tempGlobeDepthTexture&&!e._tempGlobeDepthTexture.isDestroyed()&&e._tempGlobeDepthTexture.destroy()}function W$f(e,t,i,n,r){e._tempGlobeDepthTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),e._tempCopyDepthFramebuffer=new t$V({context:t,colorTextures:[e._tempGlobeDepthTexture],destroyAttachments:!1}),r.framebuffer.depthStencilTexture,e._isMSAA&&e._depthStencilTexture,e._updateDepthFramebuffer=new t$V({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}function z$c(e,t,i,n,r,o){var a=o?t.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT:_$_.UNSIGNED_BYTE;e._colorTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:a,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),samples:r}),e._depthStencilTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8,samples:r}),e._globeDepthTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})}function I$b(e,t,i,n,r,o){if(!e._isMSAA)return;var a=o?t.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT:_$_.UNSIGNED_BYTE;const s=M$13.getColorFormat(a);e._colorRenderBuffer=new r$10({context:t,width:i,height:n,pixelDatatype:a,format:s,samples:r}),e._depthStencilRenderbuffer=new r$10({context:t,width:i,height:n,format:M$13.DEPTH_STENCIL,samples:r})}function V$e(e,t){e._isMSAA&&(e._framebufferWithRenderbuffer=new t$V({context:t,colorRenderbuffers:[e._colorRenderBuffer],depthStencilRenderbuffer:e._depthStencilRenderbuffer,destroyAttachments:!1})),e._framebufferWithTexture=new t$V({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._copyDepthFramebuffer=new t$V({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}function H$g(e,t,i,n,r,o){!t.webgpu&&r>1&&(e._isMSAA=!0);var a=e._colorTexture,s=!e$2e(a)||a.width!==i||a.height!==n||o!==e._useHdr||r!==e._numSamples;(!e$2e(e._framebufferWithTexture)||s)&&(M$e(e),N$a(e),z$c(e,t,i,n,r,o),I$b(e,t,i,n,r,o),V$e(e,t))}function w$c(e,t,i,n,r){e._viewport.width=i,e._viewport.height=n;var o=!f$1a.equals(e._viewport,r.viewport),a=o!==e._useScissorTest;e._useScissorTest=o,f$1a.equals(e._scissorRectangle,r.viewport)||(e._scissorRectangle=f$1a.clone(r.viewport,e._scissorRectangle),a=!0),(!e$2e(e._rs)||!f$1a.equals(e._viewport,e._rs.viewport)||a)&&(e._rs=d$1m.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsUpdate=d$1m.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!1,frontFunction:m$Z.EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.KEEP},backFunction:m$Z.NEVER,reference:u$M.CESIUM_3D_TILE_MASK,mask:u$M.CESIUM_3D_TILE_MASK}})),e$2e(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(t.webgpu?C$15:v$O,{shaderProgramName:"copyDepthGlobeDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e._depthStencilTexture}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer,e._copyDepthCommand.renderState=e._rs,e$2e(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(ie$7,{shaderProgramName:"copyColorGlobeDepth",uniformMap:{colorTexture:function(){return e._colorTexture}},owner:e})),e$2e(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(t.webgpu?C$15:v$O,{shaderProgramName:"tempCopyDepthGlobeDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer,e._tempCopyDepthCommand.renderState=e._rs,e$2e(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(ie$7,{shaderProgramName:"updateDepthGlobeDepth",uniformMap:{colorTexture:function(){return e._tempGlobeDepthTexture}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer,e._updateDepthCommand.renderState=e._rsUpdate,e$2e(e._clearColorCommand)||(e._clearColorCommand=new t$W({color:new e$1X(0,0,0,0),stencil:0,owner:e})),e._isMSAA?e._clearColorCommand.framebuffer=e._framebufferWithRenderbuffer:e._clearColorCommand.framebuffer=e._framebufferWithTexture}function p$8(){this._framebuffer=new s$g({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new s$g,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new f$1a,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}function C$d(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function S$b(e,t,i,n,r){const o=r?t.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT:_$_.UNSIGNED_BYTE;e._framebuffer.update(t,i,n,1,o),e._packedDepthFramebuffer.update(t,i,n)}function k$a(e,t,i,n,r){e._viewport.width=i,e._viewport.height=n;const o=!f$1a.equals(e._viewport,r.viewport);let a=o!==e._useScissorTest;e._useScissorTest=o,f$1a.equals(e._scissorRectangle,r.viewport)||(e._scissorRectangle=f$1a.clone(r.viewport,e._scissorRectangle),a=!0),(!e$2e(e._renderState)||!f$1a.equals(e._viewport,e._renderState.viewport)||a)&&(e._renderState=d$1m.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),e$2e(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(t.webgpu?C$15:v$O,{shaderProgramName:"globeTranslucency_packedDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),e$2e(e._clearCommand)||(e._clearCommand=new t$W({color:new e$1X(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer.framebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e.classificationFramebuffer,e._clearCommand.renderState=e._renderState}h$d.prototype.getHeight=function(e){if(!e$2e(e))throw new t$15("cartographic is required");var t=this._surface._levelZeroTiles;if(e$2e(t)){var i,n,r=t.length;for(n=0;n<r&&(i=t[n],!h$18.contains(i.rectangle,e));++n);if(!(n>=r)){for(;i._lastSelectionResult===D$J.REFINED;)i=G$e(i.southwestChild,e)||G$e(i.southeastChild,e)||G$e(i.northwestChild,e)||i.northeastChild;if(e$2e(i.data)&&e$2e(i.data.renderedMesh)){var o=this._surface._tileProvider.tilingScheme.ellipsoid,a=o$1p.fromRadians(e.longitude,e.latitude,0,o,$e$3),s=rr$1,l=o.geodeticSurfaceNormal(a,s.direction);if(!e$2e(o.getSurfaceNormalIntersectionWithZAxis(a,11500,s.origin))){var u=Math.min(u$Z(i.data.minimumHeight,0),-11500),c=o$1p.multiplyByScalar(l,Math.abs(u)+1,me$8);o$1p.subtract(a,c,s.origin)}if(e$2e(i.data.terrainData)&&i.data.terrainData instanceof p$O)return i.data.terrainData.interpolateHeight(i.rectangle,e.longitude,e.latitude);var h=i.data.pick(s,void 0,void 0,!1,me$8);if(e$2e(h))return o.cartesianToCartographic(h,er$1).height}}}},h$d.prototype.update=function(e){!this.show||(e.passes.render&&this._surface.update(e),e.rasterVectorCollection=this._rasterVectorCollection,this.computeGlobeBottomLevel(e))},h$d.prototype.computeGlobeBottomLevel=function(e){for(var t=e.camera.frustum.fov,i=512/Math.tan(.5*t),n=e.camera.position,r=new a$18.fromCartesian(n),o=new o$1p.fromRadians(r.longitude,r.latitude,0),a=i/o$1p.distance(n,o),s=0,l=0;l<22;l++){var u=1<<l,c=Math.PI/u,h=o$1p.fromRadians(r.longitude+.5*c,r.latitude+.5*c),d=o$1p.fromRadians(r.longitude+.5*c,r.latitude-.5*c),f=o$1p.fromRadians(r.longitude-.5*c,r.latitude-.5*c),p=o$1p.fromRadians(r.longitude-.5*c,r.latitude+.5*c),_=o$1p.distance(h,d),m=o$1p.distance(d,f),g=o$1p.distance(f,p),x=o$1p.distance(p,h);if(Math.max(Math.max(Math.max(_,m),g),x)/8*a<32||21==l){s=l;break}}e.globeBottomLevel=s},h$d.prototype.beginFrame=function(e){var t=this._surface,i=t.tileProvider,n=this.terrainProvider,r=this.showWaterEffect&&n.ready&&n.hasWaterMask;if(this._sceneMode=e.mode,r&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;var o=this._oceanNormalMapResource,a=o.url;if(e$2e(a)){var s=this;o$1l(o.fetchImage(),(function(t){a===s._oceanNormalMapResource.url&&(s._oceanNormalMap=s._oceanNormalMap&&s._oceanNormalMap.destroy(),s._oceanNormalMap=new t$U({context:e.context,source:t}))}))}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}var l=e.passes,u=e.mode;l.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,t.tileCacheSizeForMVT=this.tileCacheSizeForMVT,t.loadingDescendantLimit=this.loadingDescendantLimit,t.preloadAncestors=this.preloadAncestors,t.preloadSiblings=this.preloadSiblings,i.terrainProvider=this.terrainProvider,i.lightingFadeOutDistance=this.lightingFadeOutDistance,i.lightingFadeInDistance=this.lightingFadeInDistance,i.nightFadeOutDistance=this.nightFadeOutDistance,i.nightFadeInDistance=this.nightFadeInDistance,i.zoomedOutOceanSpecularIntensity=u===C$14.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,i.hasWaterMask=r,i.oceanNormalMap=this._oceanNormalMap,i.enableLighting=this.enableLighting,i.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,i.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,i.showGroundAtmosphere=this.showGroundAtmosphere,i.shadows=this.shadows,i.hueShift=this.atmosphereHueShift,i.saturationShift=this.atmosphereSaturationShift,i.brightnessShift=this.atmosphereBrightnessShift,i.fillHighlightColor=this.fillHighlightColor,i.showSkirts=this.showSkirts,i.backFaceCulling=this.backFaceCulling,i.clippingType=this.clippingType,i.showExcavationSide=this.showExcavationSide,i.excavationNormalTextureUrl=this._excavationNormalTextureUrl,i.excavationSideNormalTextureUrl=this._excavationSideNormalTextureUrl,i.undergroundColor=this._undergroundColor,i.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,t.beginFrame(e))},h$d.prototype.render=function(e){if(this.show){e$2e(this._material)&&this._material.update(e.context);var t=this._surface,i=e.passes;i.render&&t.render(e),i.pick&&t.render(e)}},h$d.prototype.endFrame=function(e){!this.show||e.passes.render&&this._surface.endFrame(e)},h$d.prototype.isDestroyed=function(){return!1},h$d.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),i$11(this)},h$d.prototype.addModifyRegion=function(e){var t=e.name,i=e.position;if(!e$2e(t)||!e$2e(i))return!1;var n=this._surface._tileProvider;if(n._modifyRegions.contains(t))return!1;var r=he$7(i),o=r.min,a=r.max,s=o$1p.fromDegreesArrayHeights(i),l=U$18.createGeometry(new U$18({polygonHierarchy:{positions:s},extrudedHeight:Math.min(-1e3,o),perPositionHeight:!0})),u=U$18.createGeometry(new U$18({polygonHierarchy:{positions:s},perPositionHeight:!0})),c=h$18.fromCartesianArray(s),h={geometry:l,worldGeometry:u,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),rectangle:c,minimumHeight:Math.min(-1e3,o),maximumHeight:a,command:void 0};return n._modifyRegions.set(t,h),n._modifyRegionUpdate=!0,!0},h$d.prototype.removeModifyRegion=function(e){var t=this._surface._tileProvider,i=t._modifyRegions;if(i.contains(e)){var n=i.get(e);e$2e(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),n.command=void 0,t._modifyRegions.remove(e),t._modifyRegionUpdate=!0}},h$d.prototype.removeAllModifyRegion=function(){for(var e=this._surface._tileProvider,t=Object.keys(e._modifyRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeModifyRegion(r)}e._modifyRegions.removeAll()},h$d.prototype.addExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(!e$2e(t)||!e$2e(i)||!e$2e(n))return!1;var r=this._surface._tileProvider;if(r._excavateRegions.contains(t))return!1;var o=i.length;i.length/3%2!=0&&(i.push(i[o-1-2]),i.push(i[o-1-1]),i.push(i[o-1]));for(var a=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),s=Number.MAX_VALUE,l=0,u=i.length;l<u;l+=3)s=Math.min(s,i[l+2]);var c=U$18.createGeometry(a),h=U$18.createGeometry(a),d=U$18.createGeometry(a),f=o$1p.fromDegreesArrayHeights(i),p={rectangle:h$18.fromCartesianArray(f),geometry:c,worldGeometry:h,colorGeometry:d,positions:i,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),command:void 0,name:t,height:s-n};return r._excavateRegions.set(t,p),r._excavateRegionUpdate=!0,r._excavateTransparent=u$Z(e.transparent,!0),r._excavateTextureWrap=u$Z(e.textureWrap,q$1a.REPEAT),r._excavateExtendHeight=n,!0},h$d.prototype.removeExcavationRegion=function(e){var t=this._surface._tileProvider,i=t._excavateRegions;if(i.contains(e)){t._removeExcavationCommands(e);var n=i.get(e);e$2e(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),e$2e(n.removeListenerFunc)&&n.removeListenerFunc(),n.command=void 0,i.remove(e),0===i.length&&(t._onceExcavateRegionsEmpty=!0),t._excavateRegionUpdate=!0}},h$d.prototype.removeAllExcavationRegion=function(){var e=this._surface._tileProvider;e._removeAllExcavationCommands();for(var t=Object.keys(e._excavateRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeExcavationRegion(r)}e._excavateRegions.removeAll()},h$d.prototype.addExtractRegion=function(e){var t=e.name,i=e.position,n=e.height,r=u$Z(e.extractHeight,100),o=u$Z(e.granularity,1);if(!e$2e(t)||!e$2e(i)||!e$2e(n))return!1;var a=this._surface._tileProvider;if(a._extractRegions.contains(t))return!1;var s=1,l=[],u=o$1p.fromDegreesArrayHeights(i);let c=[...u,u[0]];for(let e=1;e<c.length;e++){s+=o$1p.distance(c[e-1],c[e]),l.push(s)}var h=i.length;i.length/3%2!=0&&(i.push(i[h-1-2]),i.push(i[h-1-1]),i.push(i[h-1]));var d=he$7(i),f=d.min,p=d.max;p+=r;var _=o$1p.fromDegreesArrayHeights(i),m=h$18.fromCartesianArray(_),g=Math.PI/Math.pow(2,11);g=g/64*o;var x=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)},granularity:g});i=tr$2(_,m,p);var y=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),v={rectangle:m,geometry:U$18.createGeometry(y),geometry_extract:U$18.createGeometry(x),colorGeometry:U$18.createGeometry(y),worldGeometry:U$18.createGeometry(y),positions:i,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),command:void 0,name:t,height:f-n,minimumHeight:Math.min(0,f),maximumHeight:p,sideLengths:l,round:s};return a._extractRegions.set(t,v),a._extractRegionsUpdate=!0,a._extractTransparent=u$Z(e.transparent,!0),a._extractTextureWrap=u$Z(e.textureWrap,q$1a.REPEAT),a._extractExtendHeight=r,a._excavateTransparent=u$Z(e.transparent,!0),a._excavateTextureWrap=u$Z(e.textureWrap,q$1a.REPEAT),!0},h$d.prototype.removeExtractRegion=function(e){var t=this._surface._tileProvider,i=t._extractRegions;if(i.contains(e)){t._removeExtractCommands(e);var n=i.get(e);e$2e(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),n.command=void 0,i.remove(e),0===i.length&&(t._onceExcavateRegionsEmpty=!0),t._extractRegionsUpdate=!0,n.command=void 0,t._modifyRegions.remove(e),t._modifyRegionUpdate=!0,t._extractExtendHeight=void 0}},h$d.prototype.removeAllExtractRegion=function(){var e=this._surface._tileProvider;e._removeAllExtractCommands();for(var t=Object.keys(e._extractRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeExtractRegion(r)}e._extractRegions.removeAll(),e._extractExtendHeight=void 0},h$d.prototype.addImageryClipRegions=function(e){var t=e.name,i=e.position;if(e$2e(t)&&e$2e(i)&&e$2e(e.layers)){var n=this._surface._tileProvider;if(n._imageryClipRegions.contains(t))return!1;for(var r=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),o=U$18.createGeometry(r),a=U$18.createGeometry(r),s=o$1p.fromDegreesArrayHeights(i),l={rectangle:h$18.fromCartesianArray(s),geometry:o,worldGeometry:a,positions:i,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),command:void 0,name:t},u=0,c=e.layers.length;u<c;u++)e.layers[u].enableImageryClip=!0;n._imageryClipRegions.set(t,l),n._imageryClipRegionUpate=!0}},h$d.prototype.removeImageryClipRegion=function(e,t){var i=this._surface._tileProvider,n=i._imageryClipRegions;if(n.contains(e)){var r=n.get(e);if(e$2e(r.command)&&(r.command.vertexArray=r.command.vertexArray&&!r.command.vertexArray.isDestroyed()&&r.command.vertexArray.destroy(),r.command.shaderProgram=r.command.shaderProgram&&!r.command.shaderProgram.isDestroyed()&&r.command.shaderProgram.destroy()),r.command=void 0,n.remove(e),0===n.length){for(var o=0,a=t.length;o<a;o++)t[o].enableImageryClip=!1;i._onceImageryClipRegionsEmpty=!0}i._imageryClipRegionUpate=!0}},h$d.prototype.clearCustomClipBox=function(){this.clippingPlanes=void 0},h$d.prototype.setCustomClipBox=function(e){if(!(e.dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$15("globe box clip, position and dimensions is required!");if(e.dimensions){var t,i=e.position,n=new i$16(e$2e(e.heading)?e.heading:0,e$2e(e.pitch)?e.pitch:0,e$2e(e.roll)?e.roll:0);if(this._sceneMode===C$14.SCENE3D)t=m$19.headingPitchRollToFixedFrame(i,n,t$12.WGS84,m$19.eastNorthUpToFixedFrame,new p$1d);else{var r=ir$2(this._scene,i);t=p$1d.setTranslation(p$1d.clone(p$1d.IDENTITY),r,new p$1d)}var o=-.5*e.dimensions.x,a=-.5*e.dimensions.y,s=-.5*e.dimensions.z;e$2e(e.clipLineColor)?e.clipLineColor:e$1X.WHITE;var l=[new a$I(new o$1p(1,0,0),o),new a$I(new o$1p(-1,0,0),o),new a$I(new o$1p(0,1,0),a),new a$I(new o$1p(0,-1,0),a),new a$I(new o$1p(0,0,1),s),new a$I(new o$1p(0,0,-1),s)]}else{l=[];for(var u=0;u<e.planePos.length;u++){var c=e.planePos[u],h=e.planeNormal[u],d=-o$1p.dot(h,c);l.push(new a$I(h,d))}}return this.clippingPlanes=new h$L({modelMatrix:t,planes:l,edgeWidth:1,edgeColor:e$1X.WHITE,unionClippingRegions:!e$2e(e.dimensions),enabled:!0}),!0},h$d.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._surface._tileProvider._polygonOffset.enabled=!0,o$1o.fromElements(e,t,this._surface._tileProvider._polygonOffset.value)):(this._surface._tileProvider._polygonOffset.enabled=!1,o$1o.fromElements(0,0,this._surface._tileProvider._polygonOffset.value))},h$d.prototype.hasTerrainAnalysis=function(){if(!e$2e(this._surface)||!e$2e(this._surface._tileProvider))return!1;var e=this._surface._tileProvider;return!!(e$2e(e._excavateRegions)&&e._excavateRegions.values.length>0||e$2e(e._modifyRegions)&&e._modifyRegions.values.length>0||e$2e(e._hypsometricSetting)&&e._hypsometricSetting.CoverageArea.length>0||e$2e(e._slopeSetting)&&e._slopeSetting.CoverageArea.length>0)},h$d.prototype.getSlopeValue=function(e){var t=fe$6(e,this);return t?Math.acos(Math.abs(t.z))*e$2d.DEGREES_PER_RADIAN:0},h$d.prototype.getSlopeDirectionValue=function(e){var t=fe$6(e,this);if(!t)return 0;t.z=0;var i=o$1p.angleBetween(t,o$1p.UNIT_Y);return i=i/e$2d.PI*180,i=o$1p.dot(t,o$1p.UNIT_X)<0?360-i:i},h$d.prototype.setPBRMaterialFromJSON=function(e){if(LicenseChecker.LICENSECHECKER.verify("Globe_setPBRMaterial"),this._surface.tileProvider._pbrParameter===Xe$e.NONE){var t=this;u$P(e).then((function(e){var i=e.material,n=i.pbrMetallicRoughness;i.textureunitstates,t._surface.tileProvider._PBRMaterialParams.baseColorFactor=e$2e(n.baseColor)?e$2c.fromElements(n.baseColor.x,n.baseColor.y,n.baseColor.z,n.baseColor.w):t._surface.tileProvider._PBRMaterialParams.baseColorFactor,t._surface.tileProvider._PBRMaterialParams.baseColorTextureIndex=e$2e(n.baseColorTextureIndex)?n.baseColorTextureIndex:t._surface.tileProvider._PBRMaterialParams.baseColorTextureIndex,t._surface.tileProvider._PBRMaterialParams.emissionFactor=e$2e(n.emissiveFactor)?o$1p.fromElements(n.emissiveFactor.x,n.emissiveFactor.y,n.emissiveFactor.z):t._surface.tileProvider._PBRMaterialParams.emissionFactor,t._surface.tileProvider._PBRMaterialParams.emissionTextureIndex=e$2e(n.emissiveTextureIndex)?n.emissiveTextureIndex:-1,t._surface.tileProvider._PBRMaterialParams.metallic=e$2e(n.metallicFactor)?n.metallicFactor:t._surface.tileProvider._PBRMaterialParams.metallic,t._surface.tileProvider._PBRMaterialParams.roughness=e$2e(n.roughnessFactor)?n.roughnessFactor:t._surface.tileProvider._PBRMaterialParams.roughness,t._surface.tileProvider._PBRMaterialParams.occlusionTextureIndex=e$2e(n.occlusionTextureIndex)?n.occlusionTextureIndex:-1,t._surface.tileProvider._PBRMaterialParams.normalTextureIndex=e$2e(n.normalTextureIndex)?n.normalTextureIndex:-1}))}},h$d.prototype.removePBRMaterial=function(){this._surface.tileProvider._PBRMaterialParams={metallic:0,roughness:0,baseColorFactor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissionFactor:o$1p.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1}},h$d.prototype._setFloodTexture=function(e,t){this._floodFlagTexture=e,this._floodRect=t},h$d.prototype._removeFloodTexture=function(){this._floodFlagTexture=void 0,this._floodRect=void 0},h$d.prototype.removeRasterRegions=function(){var e=this._surface._tileProvider,t=e._clipRasterTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1}e._clipRasterTilesMap={}},Object.defineProperties(a$a.prototype,{framebuffer:{get:function(){return this._isMSAA?this._framebufferWithRenderbuffer:this._framebufferWithTexture}},framebufferWithTexture:{get:function(){return this._framebufferWithTexture}},depthStencilTexture:{get:function(){return this._depthStencilTexture}}}),a$a.prototype.executeDebugGlobeDepth=function(e,t,i){O$a(this,e,t,i)},a$a.prototype.update=function(e,t,i,n,r){var o=i.width,a=i.height;H$g(this,e,o,a,n,r),w$c(this,e,o,a,t),e.uniformState.globeDepthTexture=void 0,this._numSamples=n,this._useHdr=r},a$a.prototype.executeCopyDepth=function(e,t){e$2e(this._copyDepthCommand)&&(this.prepareColorTextures(e,!1),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture)},a$a.prototype.executeUpdateDepth=function(e,t,i){var n=t.framebuffer.depthStencilTexture;if(!e$2e(n)||!i&&n===this._depthStencilTexture)if(this._isMSAA&&i){if(e$2e(this._updateDepthCommand)){if(!e$2e(this._updateDepthFramebuffer)||this._updateDepthFramebuffer.getColorTexture(0)!==this._globeDepthTexture){r=this._globeDepthTexture.width,o=this._globeDepthTexture.height;l$e(this),W$f(this,e,r,o,t),w$c(this,e,r,o,t)}this.prepareColorTextures(e,!1),this._tempCopyDepthTexture=this._depthStencilTexture,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture}}else e$2e(this._copyDepthCommand)&&(this.prepareColorTextures(e,!1),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture);else if(e$2e(this._updateDepthCommand)){if(!e$2e(this._updateDepthFramebuffer)||this._updateDepthFramebuffer.getColorTexture(0)!==this._globeDepthTexture){var r=this._globeDepthTexture.width,o=this._globeDepthTexture.height;l$e(this),W$f(this,e,r,o,t),w$c(this,e,r,o,t)}this._tempCopyDepthTexture=n,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture}},a$a.prototype.executeCopyColor=function(e,t){e$2e(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)},a$a.prototype.prepareColorTextures=function(e,t){this._numSamples>1&&t$V.blitFramebuffers(e,this._framebufferWithRenderbuffer,this._framebufferWithTexture,t)},a$a.prototype.clear=function(e,t,i){var n=this._clearColorCommand;e$2e(n)&&(e$1X.clone(i,n.color),n.execute(e,t))},a$a.prototype.isDestroyed=function(){return!1},a$a.prototype.destroy=function(){M$e(this),U$d(this),N$a(this),l$e(this),e$2e(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),e$2e(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy());var e=this._debugGlobeDepthViewportCommand;return e$2e(e)&&(e.shaderProgram=e.shaderProgram.destroy()),i$11(this)},Object.defineProperties(p$8.prototype,{classificationTexture:{get:function(){return this._framebuffer.getColorTexture()}},classificationFramebuffer:{get:function(){return this._framebuffer.framebuffer}},packedDepthFramebuffer:{get:function(){return this._packedDepthFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._framebuffer.getDepthStencilTexture()}},depthStencilRenderbuffer:{get:function(){return this._framebuffer.getDepthStencilRenderbuffer()}},packedDepthTexture:{get:function(){return this._packedDepthFramebuffer.getColorTexture()}}}),p$8.prototype.updateAndClear=function(e,t,i,n){const r=t.width,o=t.height;S$b(this,i,r,o,e),k$a(this,i,r,o,n),this._useHdr=e},p$8.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)},p$8.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture},p$8.prototype.isDestroyed=function(){return!1},p$8.prototype.destroy=function(){return C$d(this),i$11(this)};const u$c={OPAQUE_FRONT_FACE:0,OPAQUE_BACK_FACE:1,DEPTH_ONLY_FRONT_FACE:2,DEPTH_ONLY_BACK_FACE:3,DEPTH_ONLY_FRONT_AND_BACK_FACE:4,TRANSLUCENT_FRONT_FACE:5,TRANSLUCENT_BACK_FACE:6,TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:7,TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:8,PICK_FRONT_FACE:9,PICK_BACK_FACE:10,DERIVED_COMMANDS_MAXIMUM_LENGTH:11},p$7=u$c.DERIVED_COMMANDS_MAXIMUM_LENGTH,q$b=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function F$c(){this._frontFaceAlphaByDistance=new o$Y(0,1,0,1),this._backFaceAlphaByDistance=new o$Y(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=h$18.clone(h$18.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(p$7),this._derivedBlendCommandTypes=new Array(p$7),this._derivedPickCommandTypes=new Array(p$7),this._derivedCommandTypesToUpdate=new Array(p$7),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}function z$b(e,t,i,n){return e?e$2e(i)?(o$Y.clone(i,n),n.nearValue*=t,n.farValue*=t,n):(n.nearValue=t,n.farValue=t,n):(n.nearValue=1,n.farValue=1,n)}function Y$8(e,t,i){return e&&(i.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function se$5(e,t){const i=e._frontFaceTranslucent,n=e._backFaceTranslucent;return i&&(t.cameraUnderground||n)}function le$7(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function ue$7(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function me$7(e,t,i){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!i.depthTestAgainstTerrain&&t.mode!==C$14.SCENE2D&&t.context.depthTexture}function fe$5(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function he$6(e,t){e._derivedCommandsLength=U$c(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=U$c(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=U$c(e,t,!1,!0,e._derivedPickCommandTypes);let i,n=0;for(i=0;i<e._derivedCommandsLength;++i)n|=1<<e._derivedCommandTypes[i];for(i=0;i<e._derivedBlendCommandsLength;++i)n|=1<<e._derivedBlendCommandTypes[i];for(i=0;i<e._derivedPickCommandsLength;++i)n|=1<<e._derivedPickCommandTypes[i];let r=0;for(i=0;i<p$7;++i)(n&1<<i)>0&&(e._derivedCommandTypesToUpdate[r++]=i);e._derivedCommandsToUpdateLength=r;const o=n!==e._derivedCommandKey;e._derivedCommandKey=n,e._derivedCommandsDirty=o,!e$2e(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=Se$4())}function U$c(e,t,i,n,r){let o=0;const a=e._frontFaceTranslucent,s=e._backFaceTranslucent;if(!a)return o;const l=t.cameraUnderground,u=e._requiresManualDepthTest,c=n?u$c.PICK_FRONT_FACE:u?u$c.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:u$c.TRANSLUCENT_FRONT_FACE,h=n?u$c.PICK_BACK_FACE:u?u$c.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:u$c.TRANSLUCENT_BACK_FACE;return t.mode===C$14.SCENE2D?(r[o++]=u$c.DEPTH_ONLY_FRONT_FACE,r[o++]=c,o):(s?(i||(r[o++]=u$c.DEPTH_ONLY_FRONT_AND_BACK_FACE),l?(r[o++]=c,r[o++]=h):(r[o++]=h,r[o++]=c)):l?(i||(r[o++]=u$c.DEPTH_ONLY_BACK_FACE),r[o++]=u$c.OPAQUE_FRONT_FACE,r[o++]=h):(i||(r[o++]=u$c.DEPTH_ONLY_FRONT_FACE),r[o++]=u$c.OPAQUE_BACK_FACE,r[o++]=c),o)}function h$c(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}function Q$7(e,t){return e.indexOf(t)>-1}function _e$3(e,t){h$c(e.defines,"TRANSLUCENT"),h$c(t.defines,"TRANSLUCENT")}function Te$5(e,t){h$c(e.defines,"GROUND_ATMOSPHERE"),h$c(t.defines,"GROUND_ATMOSPHERE"),h$c(e.defines,"FOG"),h$c(t.defines,"FOG"),h$c(e.defines,"TRANSLUCENT"),h$c(t.defines,"TRANSLUCENT")}function M$d(e,t){if(Q$7(t.defines,"TILE_LIMIT_RECTANGLE")||Q$7(t.defines,"ENABLE_CLIPPING_PLANES"))return;t.sources=["void main() \n{ \n gl_FragColor = vec4(1.0); \n} \n"]}function B$8(e,t){const i=t.sources,n=i.length;for(let e=0;e<n;++e)i[e]=s$V.replaceMain(i[e],"czm_globe_translucency_main");i.push("\n\nuniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n#ifdef MANUAL_DEPTH_TEST \n float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st)); \n if (logDepthOrDepth != 0.0) \n { \n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); \n float depthEC = eyeCoordinate.z / eyeCoordinate.w; \n if (v_positionEC.z < depthEC) \n { \n discard; \n } \n } \n#endif \n czm_globe_translucency_main(); \n vec4 classificationColor = texture(u_classificationTexture, st); \n if (classificationColor.a > 0.0) \n { \n // Reverse premultiplication process to get the correct composited result of the classification primitives \n classificationColor.rgb /= classificationColor.a; \n } \n gl_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + gl_FragColor * (1.0 - classificationColor.a); \n} \n")}function X$9(e,t){B$8(e,t),h$c(e.defines,"GROUND_ATMOSPHERE"),h$c(t.defines,"GROUND_ATMOSPHERE"),h$c(e.defines,"FOG"),h$c(t.defines,"FOG")}function Ce$4(e,t){B$8(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function ge$7(e,t){X$9(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function j$c(e,t){t.sources=["uniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n vec4 pickColor = texture(u_classificationTexture, st); \n if (pickColor == vec4(0.0)) \n { \n discard; \n } \n gl_FragColor = pickColor; \n} \n"]}function pe$6(e,t,i,n,r,o){if(!e$2e(r))return t;if(!n&&e$2e(i))return i;let a=e.shaderCache.getDerivedShaderProgram(t,o);if(!e$2e(a)){const i=t._attributeLocations,n=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();n.defines=e$2e(n.defines)?n.defines.slice(0):[],s.defines=e$2e(s.defines)?s.defines.slice(0):[],r(n,s),a=e.shaderCache.createDerivedShaderProgram(t,o,{vertexShaderSource:n,fragmentShaderSource:s,attributeLocations:i})}return a}function Fe$5(e){e.cull.face=G$1a.BACK,e.cull.enabled=!0}function Ae$6(e){e.cull.face=G$1a.FRONT,e.cull.enabled=!0}function De$5(e){e.cull.face=G$1a.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function Ee$6(e){e.cull.face=G$1a.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function ye$3(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function J$7(e){e.cull.face=G$1a.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=Ee$r.ALPHA_BLEND}function W$e(e){e.cull.face=G$1a.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=Ee$r.ALPHA_BLEND}function ve$5(e){e.cull.face=G$1a.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function Ne$4(e){e.cull.face=G$1a.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function Oe$5(e,t,i,n,r){if(!e$2e(n))return e;if(!i&&e$2e(t))return t;let o=r[e.id];if(!e$2e(o)){const t=d$1m.getState(e);n(t),o=d$1m.fromCache(t),r[e.id]=o}return o}function E$c(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function be$4(e,t,i,n,r){return e$2e(r)?!n&&e$2e(i)?i:p$19(t,r(e),!1):t}function _$d(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function Se$4(){return[new _$d({pass:Le$q.GLOBE,pickOnly:!1,getShaderProgramFunction:_e$3,getRenderStateFunction:Fe$5,getUniformMapFunction:void 0}),new _$d({pass:Le$q.GLOBE,pickOnly:!1,getShaderProgramFunction:Te$5,getRenderStateFunction:Ae$6,getUniformMapFunction:void 0}),new _$d({pass:Le$q.GLOBE,pickOnly:!1,getShaderProgramFunction:M$d,getRenderStateFunction:De$5,getUniformMapFunction:void 0}),new _$d({pass:Le$q.GLOBE,pickOnly:!1,getShaderProgramFunction:M$d,getRenderStateFunction:Ee$6,getUniformMapFunction:void 0}),new _$d({pass:Le$q.GLOBE,pickOnly:!1,getShaderProgramFunction:M$d,getRenderStateFunction:ye$3,getUniformMapFunction:void 0}),new _$d({pass:Le$q.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:B$8,getRenderStateFunction:J$7,getUniformMapFunction:E$c}),new _$d({pass:Le$q.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:X$9,getRenderStateFunction:W$e,getUniformMapFunction:E$c}),new _$d({pass:Le$q.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Ce$4,getRenderStateFunction:J$7,getUniformMapFunction:E$c}),new _$d({pass:Le$q.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:ge$7,getRenderStateFunction:W$e,getUniformMapFunction:E$c}),new _$d({pass:Le$q.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:j$c,getRenderStateFunction:ve$5,getUniformMapFunction:E$c}),new _$d({pass:Le$q.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:j$c,getRenderStateFunction:Ne$4,getUniformMapFunction:E$c})]}Object.defineProperties(F$c.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent},set:function(e){this._frontFaceTranslucent=e}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}}),F$c.prototype.update=function(e){const t=e.globe;if(!e$2e(t)||!t.show)return this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,void(this._useDepthPlane=!1);this._frontFaceAlphaByDistance=z$b(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=z$b(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=Y$8(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=Y$8(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=me$7(this,e,t),this._sunVisibleThroughGlobe=se$5(this,e),this._environmentVisible=le$7(this,e),this._useDepthPlane=ue$7(this,e),this._numberOfTextureUniforms=fe$5(this),this._rectangle=h$18.clone(t.translucency.rectangle,this._rectangle),he$6(this,e)};const Z$a=new Array(p$7),$$9=new Array(p$7);function Pe$4(e,t,i,n,r,o,a){let s=t.derivedCommands.globeTranslucency;const l=e._derivedCommandsDirty;if(t.dirty||!e$2e(s)||l){t.dirty=!1,e$2e(s)||(s={},t.derivedCommands.globeTranslucency=s);const l=a.frameNumber,u=u$Z(s.uniformMapDirtyFrame,0),c=u$Z(s.shaderProgramDirtyFrame,0),h=u$Z(s.renderStateDirtyFrame,0),d=s.uniformMap!==t.uniformMap,f=s.shaderProgramId!==t.shaderProgram.id,p=s.renderStateId!==t.renderState.id;d&&(s.uniformMapDirtyFrame=l),f&&(s.shaderProgramDirtyFrame=l),p&&(s.renderStateDirtyFrame=l),s.uniformMap=t.uniformMap,s.shaderProgramId=t.shaderProgram.id,s.renderStateId=t.renderState.id;for(let _=0;_<i;++_){const i=o[_],m=n[_],g=r[_];let x,y,v,$=s[g];e$2e($)?(x=$.uniformMap,y=$.shaderProgram,v=$.renderState):(x=void 0,y=void 0,v=void 0),$=i$$.shallowClone(t,$),s[g]=$;const b=u$Z($.derivedCommands.uniformMapDirtyFrame,0),T=u$Z($.derivedCommands.shaderProgramDirtyFrame,0),C=u$Z($.derivedCommands.renderStateDirtyFrame,0),S=d||b<u,w=f||T<c,E=p||C<h;S&&($.derivedCommands.uniformMapDirtyFrame=l),w&&($.derivedCommands.shaderProgramDirtyFrame=l),E&&($.derivedCommands.renderStateDirtyFrame=l),$.derivedCommands.type=m,$.pass=i.pass,$.pickOnly=i.pickOnly,$.uniformMap=be$4(e,t.uniformMap,x,S,i.getUniformMapFunction),$.shaderProgram=pe$6(a.context,t.shaderProgram,y,w,i.getShaderProgramFunction,g),$.renderState=Oe$5(t.renderState,v,E,i.getRenderStateFunction,i.renderStateCache)}}}function ee$7(e,t,i,n,r,o,a){for(let s=0;s<t;++s){const t=e[s],l=t.derivedCommands.type;(!e$2e(a)||a.indexOf(l)>-1)&&i(t,n,r,o)}}function ne$6(e,t,i,n,r,o){for(let a=0;a<t;++a)i(e[a],n,r,o)}F$c.prototype.updateDerivedCommands=function(e,t){const i=this._derivedCommandTypesToUpdate,n=this._derivedCommandsToUpdateLength;if(0!==n){for(let e=0;e<n;++e)$$9[e]=this._derivedCommandPacks[i[e]],Z$a[e]=q$b[i[e]];Pe$4(this,e,n,i,Z$a,$$9,t)}},F$c.prototype.pushDerivedCommands=function(e,t,i){const n=i.passes.pick;if(n&&t)return;let r=this._derivedCommandTypes,o=this._derivedCommandsLength;if(n?(r=this._derivedPickCommandTypes,o=this._derivedPickCommandsLength):t&&(r=this._derivedBlendCommandTypes,o=this._derivedBlendCommandsLength),0===o)return void i.commandList.push(e);const a=e.derivedCommands.globeTranslucency;for(let e=0;e<o;++e){const t=q$b[r[e]];i.commandList.push(a[t])}};const Le$5=[u$c.OPAQUE_FRONT_FACE,u$c.OPAQUE_BACK_FACE],Re$5=[u$c.DEPTH_ONLY_FRONT_FACE,u$c.DEPTH_ONLY_BACK_FACE,u$c.DEPTH_ONLY_FRONT_AND_BACK_FACE];function v$b(){this._image=new Image}function h$b(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url)&&!e$2e(e.metadata))throw new t$15("options.url or options.metadata is required.");var t;if(e$2e(e.metadata))t=e.metadata;else{var i=t$10.createIfNeeded(e.url);t=new c$G(i)}this._metadata=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new g$15({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new h$18(-e$2d.PI,-e$2d.PI,e$2d.PI,e$2d.PI),ellipsoid:e.ellipsoid});var n=e.credit;"string"==typeof n&&(n=new r$U(n)),this._credit=n,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,e$2e(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new v$b),this._errorEvent=new o$1h,this._ready=!1;var r,o=this;this._readyPromise=t.readyPromise.then((function(e){if(!t.imageryPresent){var i=new t$13("The server "+t.url+" doesn't have imagery");return r=l$V.handleError(r,o,o._errorEvent,i.message,void 0,void 0,void 0,i),o$1l.reject(i)}return l$V.handleSuccess(r),o._ready=e,e})).otherwise((function(e){return r=l$V.handleError(r,o,o._errorEvent,e.message,void 0,void 0,void 0,e),o$1l.reject(e)}))}function j$b(e,t,i,n,r,o){var a=c$G.tileXYToQuadKey(i,n,r),s=t.imageryVersion;return s=e$2e(s)&&s>0?s:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1-0"+a+"-i."+s.toString(),request:o})}function x$e(e){var t="JFIF";if(e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3))return"image/jpeg";var i="PNG";return e[1]===i.charCodeAt(0)&&e[2]===i.charCodeAt(1)&&e[3]===i.charCodeAt(2)?"image/png":void 0}function F$b(e){for(var t=R$B.Reader.create(e),i=t.len,n={};t.pos<i;){var r=t.uint32();switch(r>>>3){case 1:n.imageType=t.uint32();break;case 2:n.imageData=t.bytes();break;case 3:n.alphaType=t.uint32();break;case 4:n.imageAlpha=t.bytes();break;case 5:var o=n.copyrightIds;if(e$2e(o)||(o=n.copyrightIds=[]),2==(7&r))for(var a=t.uint32()+t.pos;t.pos<a;)o.push(t.uint32());else o.push(t.uint32());break;default:t.skipType(7&r)}}var s=n.imageType;if(e$2e(s))switch(s){case 0:n.imageType="image/jpeg";break;case 4:n.imageType="image/png";break;default:throw new t$13("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}var l=n.alphaType;return e$2e(l)&&0!==l&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete n.alphaType,delete n.imageAlpha),n}F$c.prototype.executeGlobeCommands=function(e,t,i,n,r){const o=n.context,a=e.commands[Le$q.GLOBE],s=e.indices[Le$q.GLOBE];0!==s&&(this._globeTranslucencyFramebuffer=i,i.clearClassification(o,r),ee$7(a,s,t,n,o,r,Le$5))},F$c.prototype.executeGlobeClassificationCommands=function(e,t,i,n,r){const o=n.context,a=e.commands[Le$q.GLOBE],s=e.indices[Le$q.GLOBE],l=e.commands[Le$q.TERRAIN_CLASSIFICATION],u=e.indices[Le$q.TERRAIN_CLASSIFICATION];if(0===s||0===u)return;const c=this._frontFaceTranslucent,h=this._backFaceTranslucent;if((!c||!h)&&ne$6(l,u,t,n,o,r),!c&&!h)return;this._globeTranslucencyFramebuffer=i;const d=o.uniformState.globeDepthTexture,f=r.framebuffer;if(r.framebuffer=i.classificationFramebuffer,ee$7(a,s,t,n,o,r,Re$5),o.depthTexture){const e=i.packDepth(o,r);o.uniformState.globeDepthTexture=e}ne$6(l,u,t,n,o,r),o.uniformState.globeDepthTexture=d,r.framebuffer=f},v$b.prototype.isReady=function(){return!0},v$b.prototype.shouldDiscardImage=function(e){return e===this._image},Object.defineProperties(h$b.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}}),h$b.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$15("getTileCredits must not be called before the imagery provider is ready.");var n=this._metadata,r=n.getTileInformation(e,t,i);if(e$2e(r)){var o=n.providers[r.imageryProvider];if(e$2e(o))return[o]}},h$b.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=this._tileDiscardPolicy._image,o=this._metadata,a=c$G.tileXYToQuadKey(e,t,i),s=o.getTileInformation(e,t,i);if(!e$2e(s)){if(o.isValid(a)){var l=new r$1c({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction});return void o.populateSubtree(e,t,i,l)}return r}if(!s.hasImagery())return r;var u=j$b(this,s,e,t,i,n).fetchArrayBuffer();return e$2e(u)?u.then((function(e){f$M(o.key,e);var t,i=new Uint8Array(e),n=o.protoImagery;if((!e$2e(n)||!n)&&(t=x$e(i)),!e$2e(t)&&(!e$2e(n)||n)){var a=F$b(i);t=a.imageType,i=a.imageData}return e$2e(t)&&e$2e(i)?w$R({uint8Array:i,format:t,flipY:!0}):r})):void 0},h$b.prototype.pickFeatures=function(e,t,i,n,r){};var f$f=new e$1X(1,1,1,.4),m$d=new e$1X(0,1,0,.05),v$a=new e$1X(0,.5,0,.2);function o$h(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._tilingScheme=e$2e(e.tilingScheme)?e.tilingScheme:new g$15({ellipsoid:e.ellipsoid}),this._cells=u$Z(e.cells,8),this._color=u$Z(e.color,f$f),this._glowColor=u$Z(e.glowColor,m$d),this._glowWidth=u$Z(e.glowWidth,6),this._backgroundColor=u$Z(e.backgroundColor,v$a),this._errorEvent=new o$1h,this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._canvasSize=u$Z(e.canvasSize,256),this._canvas=this._createGridCanvas(),this._readyPromise=o$1l.resolve(!0)}Object.defineProperties(o$h.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),o$h.prototype._drawGrid=function(e){for(var t=this._canvasSize,i=0;i<=this._cells;++i){var n=1+i/this._cells*(t-1);e.moveTo(n,0),e.lineTo(n,t),e.moveTo(0,n),e.lineTo(t,n)}e.stroke()},o$h.prototype._createGridCanvas=function(){var e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;var t=this._canvasSize,i=e.getContext("2d"),n=this._backgroundColor.toCssColorString();i.fillStyle=n,i.fillRect(0,0,t,t);var r=this._glowColor.toCssColorString();i.strokeStyle=r,i.lineWidth=this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i),i.lineWidth=.5*this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i);var o=this._color.toCssColorString();return i.strokeStyle=o,i.lineWidth=2,i.strokeRect(0,0,t,t),i.lineWidth=1,this._drawGrid(i),e},o$h.prototype.getTileCredits=function(e,t,i){},o$h.prototype.requestImage=function(e,t,i,n){return this._canvas},o$h.prototype.pickFeatures=function(e,t,i,n,r){};var y$d={None:0,Attribute:1,Slope:2,Aspect:3};function w$b(e){e=u$Z(e,{}),this._url=e.url+"/",this._useConfigFile=u$Z(e.useConfigFile,!0),this._compressType="NONE",this._tilingScheme=void 0,this._rectangle=void 0,this._levels=[],this._maxCategory=90,this._minCategory=0,this._dataType=y$d.NONE;var t=e.credit;"string"==typeof t&&(t=new Credit(t)),this._credit=t,this._ready=!1,this._readyPromise=o$1l.defer();var i,n=u$Z(e.ellipsoid,t$12.WGS84),r=this;function o(e){r._compressType=e.getElementsByTagName("sml:CompressType")[0].textContent;var t=e.getElementsByTagName("sml:Type")[0].textContent;"Slope"==t?r._dataType=y$d.Slope:"Aspect"==t?r._dataType=y$d.Aspect:"Attribute"==t&&(r._dataType=y$d.Attribute),r._cellWidth=parseInt(e.getElementsByTagName("sml:CellWidth")[0].textContent),r._cellHeight=parseInt(e.getElementsByTagName("sml:CellHeight")[0].textContent),r._maxCategory=parseInt(e.getElementsByTagName("sml:MaxHeight")[0].textContent),r._minCategory=parseInt(e.getElementsByTagName("sml:MinHeight")[0].textContent),r._tilingScheme=new g$15({ellipsoid:n}),r._tilingScheme.isSct=!0;var i=e.getElementsByTagName("sml:Bounds")[0],o=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Left")[0].textContent)),a=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Bottom")[0].textContent)),s=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Right")[0].textContent)),l=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Top")[0].textContent));r._rectangle=new h$18(o,a,s,l);for(var u=e.getElementsByTagName("sml:Levels")[0].getElementsByTagName("sml:Level"),c=0;c<u.length;++c){var h=u[c];r._levels.push(parseInt(h.textContent))}r._ready=!0,r._readyPromise.resolve(!0)}function a(e){var t=u$Z(e,"An error occurred while accessing "+r._url+".");i=TileProviderError.handleError(i,r,r._errorEvent,t,void 0,void 0,void 0,s),r._readyPromise.reject(new RuntimeError(t))}function s(){if(!e$2e(e.rectangle)||!e$2e(e.levels))throw new t$15("options.rectangles,options.levels is required.");r._compressType=u$Z(e.compressType,"ZIP"),r._attType=y$d.SLOPE,r._cellWidth=u$Z(e._cellWidth,32),r._cellHeight=u$Z(e._cellHeight,32),r._maxCategory=u$Z(e.maxCategory,90),r._minCategory=u$Z(e.minCategory,0),r._tilingScheme=new g$15({ellipsoid:n}),r._rectangle=e.rectangle,r._levels=e.levels}this._useConfigFile?o$1l(d$1f(r._url+"config"),o,a):s(),this._styleEngine=new e$1u}Object.defineProperties(w$b.prototype,{url:{get:function(){return this._url}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$15("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},cellWidth:{get:function(){return this._cellWidth}},cellHeight:{get:function(){return this._cellHeight}},minLevel:{get:function(){return this._levels.length>0?Math.min(this._levels[0],this._levels[this._levels.length-1]):-1}},maxLevel:{get:function(){return this._levels.length>0?Math.max(this._levels[0],this._levels[this._levels.length-1]):-1}},minCategory:{get:function(){if(!this._ready)throw new t$15("minCategory must not be called before the grid provider is ready");return this._minCategory}},maxCategory:{get:function(){if(!this._ready)throw new t$15("maxCategory must not be called before the grid provider is ready");return this._maxCategory}}}),w$b.prototype.getTileCredits=function(e,t,i){};var W$d=new h$18;function R$d(e,t){var n,r;if(2===(n="ZIP"===e._compressType?nt$b.inflate(t).buffer:t[i]).byteLength/(e._cellWidth*e._cellHeight)){var o=new Int16Array(n,0,e._cellWidth*e._cellHeight);r=[];for(var a=0;a<o.length;a++)r.push(parseFloat(o[a]))}else r=new Float32Array(n,0,e._cellWidth*e._cellHeight);return r}function o$g(e){e=u$Z(e,{}),this._height=this._width=u$Z(e.quality,2048);var t=u$Z(e.intensityRange,new o$1o(0,1));this._minIntensity=t.x,this._maxIntensity=t.y,this._context=e.context,this._bounds=e.bounds,this._fbIntensity=void 0,this._intensityCommand=void 0,this._heatMapCommand=void 0,this._sp=void 0,this._va=void 0,this._vertexSize=8,this._maxPointCount=1e4,this._pointCount=0,this._bufferIndex=0,this._vertexBufferData=new Float32Array(this._maxPointCount*this._vertexSize*6),this._vertexBufferViews=[];for(var i=this._maxPointCount,n=0;n<i;n++)this._vertexBufferViews.push(new Float32Array(this._vertexBufferData.buffer,0,n*this._vertexSize*6));this._clearCommand=new t$W({color:new e$1X(0,0,0,0)}),this._data=void 0,this._dataIndex=0,this._fbHeatMap=x$d(this._context,this._width,this._height,_$_.UNSIGNED_BYTE),this._clearCommand.framebuffer=this._fbHeatMap,this._clearCommand.execute(this._context),this._maxPerFrameDrawCount=5e3}function x$d(e,t,i,n){return new t$V({context:e,colorTextures:[new t$U({context:e,width:t,height:i,pixelDatatype:n})]})}function R$c(e,t){if(!e$2e(t._sp)){var i=new s$V({sources:[["attribute vec4 aPosition;","attribute vec4 aIntensity;","varying vec2 vOff;","varying vec2 vDim;","varying float vIntensity;","uniform vec4 uBounds;","void main()","{","vDim = abs(aPosition.zw);","vOff = aPosition.zw;","vec2 pos = aPosition.xy + aPosition.zw;","vIntensity = aIntensity.x;","gl_Position = vec4(((pos - uBounds.xy) / uBounds.zw) * 2.0 - 1.0, 0.0, 1.0);","}"].join("\n")]}),n=new s$V({sources:[["varying vec2 vOff;","varying vec2 vDim;","varying float vIntensity;","void main()","{","float falloff = (1.0 - smoothstep(0.0, 1.0, length(vOff/vDim)));","float intensity = falloff*vIntensity;","gl_FragColor = vec4(intensity);","}"].join("\n")]});t._sp=r$14.fromCache({context:e,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:{aPosition:0,aIntensity:1}})}}function T$f(e,t){if(!e$2e(t._va)){var i=t._vertexBufferViews[t._pointCount],n=t$X.createVertexBuffer({context:e,typedArray:i,usage:A$18.STREAM_DRAW}),r=[{index:0,vertexBuffer:n,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:32,normalize:!1},{index:1,vertexBuffer:n,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,offsetInBytes:16,strideInBytes:32,normalize:!1}];t._va=new c$13({context:e,attributes:r})}}function S$a(e,t){var i=new i$$({primitiveType:W$18.TRIANGLES,count:6*t._pointCount});T$f(e,t),R$c(e,t),i.vertexArray=t._va,i.shaderProgram=t._sp,i.renderState=d$1m.fromCache({depthTest:{enabled:!1},viewport:new f$1a(0,0,t._width,t._height),blending:{enabled:!0,functionDestinationRgb:de$y.ONE,functionDestinationAlpha:de$y.ONE}});var n=new e$2c(t.bounds.x,t.bounds.y,t.bounds.width,t.bounds.height);return i.uniformMap={uBounds:function(){return n}},i.framebuffer=t._fbIntensity,i}function V$d(e,t){var i=["uniform sampler2D uIntensityTexture;","varying vec2 v_textureCoordinates;","float linstep(float low, float high, float value) {","return clamp((value-low)/(high-low), 0.0, 1.0);","}","float fade(float low, float high, float value){","float mid = (low+high)*0.5;","float range = (high-low)*0.5;","float x = 1.0 - clamp(abs(mid-value)/range, 0.0, 1.0);","return smoothstep(0.0, 1.0, x);","}","vec3 getColor(float intensity){","vec3 blue = vec3(0.0, 0.0, 1.0);","vec3 cyan = vec3(0.0, 1.0, 1.0);","vec3 green = vec3(0.0, 1.0, 0.0);","vec3 yellow = vec3(1.0, 1.0, 0.0);","vec3 red = vec3(1.0, 0.0, 0.0);","vec3 color = fade(-0.25, 0.25, intensity)*blue + fade(0.0, 0.5, intensity)*cyan + fade(0.25, 0.75, intensity)*green + fade(0.5, 1.0, intensity)*yellow + smoothstep(0.75, 1.0, intensity)*red;","return color;","}","vec4 alphaFun(vec3 color, float intensity){","float alpha = smoothstep(0.0, 1.0, intensity);","return vec4(color*alpha, alpha);","}","void main(){","float intensity = smoothstep(0.0, 1.0, texture2D(uIntensityTexture, v_textureCoordinates).r);","vec3 color = getColor(intensity);","gl_FragColor = alphaFun(color, intensity);","}"].join("\n"),n=e.createViewportQuadCommand(i,{uniformMap:{uIntensityTexture:function(){return t._fbIntensity.getColorTexture(0)}},renderState:d$1m.fromCache({viewport:new f$1a(0,0,t._width,t._height),blending:{enabled:!0,functionDestinationRgb:de$y.ONE,functionDestinationAlpha:de$y.ONE}}),owner:t});return n.framebuffer=t._fbHeatMap,n}function H$f(e){if(e$2e(e._va)){var t=e._va.getAttribute(0).vertexBuffer,i=t._getBuffer(),n=t._gl;n.bindBuffer(de$y.ARRAY_BUFFER,i),n.bufferData(de$y.ARRAY_BUFFER,e._vertexBufferViews[e._pointCount],A$18.STREAM_DRAW),n.bindBuffer(de$y.ARRAY_BUFFER,null)}}function t$a(){this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._texture=void 0,this._classifiedTexture=void 0,this._depthStencilTexture=void 0,this._fbo=void 0,this._fboClassified=void 0,this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new t$W({color:new e$1X(0,0,0,0),owner:this}),this._clearCommand=new t$W({color:new e$1X(0,0,0,0),depth:1,stencil:0});var e=this;this._uniformMap={colorTexture:function(){return e._texture},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._classifiedTexture}}}w$b.prototype._requestGridTile=function(e,t,i,n){if(!this.ready)throw new t$15("requestTileGrid must not be called before ready returns true.");var r=[],o=this._tilingScheme.tileXYToRectangle(e,t,i),a=this;if(this._levels[this._levels.length-1],e$2e(h$18.intersection(this._rectangle,o,W$d))){var s=this._levels[0],l=i;if(l<=this._levels[this._levels.length-1]&&l>=s){var u=i+"_"+e+"_"+t,c=a._url+"data/index/"+t+"/"+e+".bil?level="+l,h=o$10(c);e$2e(h)&&(h.id=u,h.url=c,r.push(h))}}return o$1l.all(r,(function(e){for(var t=0;t<e.length;t++){return R$d(a,e[t])}}),(function(e){return o$1l.reject(e)}))},Object.defineProperties(o$g.prototype,{texture:{get:function(){return this._fbHeatMap.getColorTexture(0)}},bounds:{set:function(e){this._bounds=e},get:function(){return this._bounds}},maxPerFrameDrawCount:{set:function(e){this._maxPerFrameDrawCount=e},get:function(){return this._maxPerFrameDrawCount}}}),o$g.prototype.addVertex=function(e,t,i,n,r){this._vertexBufferData[this._bufferIndex++]=e,this._vertexBufferData[this._bufferIndex++]=t,this._vertexBufferData[this._bufferIndex++]=i,this._vertexBufferData[this._bufferIndex++]=n,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r},o$g.prototype.addPoint=function(e,t,i,n){this._pointCount>=this._maxPointCount-1&&this.draw(this._context),n=u$Z(n,50),i=u$Z(i,.2);var r=.5*n;this.addVertex(e,t,-r,-r,i),this.addVertex(e,t,+r,-r,i),this.addVertex(e,t,-r,+r,i),this.addVertex(e,t,-r,+r,i),this.addVertex(e,t,+r,-r,i),this.addVertex(e,t,+r,+r,i),this._pointCount++},o$g.prototype.setData=function(e){this._data=e},o$g.prototype.drawIntensity=function(e){e$2e(this._fbIntensity)||(this._fbIntensity=x$d(e,this._width,this._height,_$_.HALF_FLOAT)),e$2e(this._intensityCommand)||(this._intensityCommand=S$a(e,this)),this._intensityCommand.count=6*this._pointCount,H$f(this),this._intensityCommand.execute(e)},o$g.prototype.drawHeatMap=function(e){this._clearCommand.framebuffer=this._fbHeatMap,this._clearCommand.execute(e),e$2e(this._heatMapCommand)||(this._heatMapCommand=V$d(e,this)),this._heatMapCommand.execute(e)},o$g.prototype.draw=function(e){this.drawIntensity(e),this.drawHeatMap(e),this._bufferIndex=0,this._pointCount=0},o$g.prototype.update=function(e){if(this._context=e.context,e$2e(this._data)){for(var t=Math.min(this._data.length,this._dataIndex+this._maxPerFrameDrawCount),i=.002*this._bounds.width,n=this._dataIndex;n<t;n++){var r=this._data[n];r.x,r.y;var o=u$Z(r.intensity,.1);o=(o-this._minIntensity)/this._maxIntensity,this.addPoint(r.x,r.y,o,i)}this._dataIndex=t,this._dataIndex>=this._data.length&&(this._data=void 0,this._dataIndex=0)}this._pointCount<1||this.draw(e.context)},o$g.prototype.destroy=function(){return this._fbIntensity=this._fbIntensity&&this._fbIntensity.destroy(),this._fbHeatMap=this._fbHeatMap&&this._fbHeatMap.destroy(),this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy(),this._vertexBufferData=void 0,this._vertexBufferViews=void 0,this._data=void 0,i$11(this)},Object.defineProperties(t$a.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}}),t$a.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var I$a={depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$Z.EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.KEEP},backFunction:m$Z.NEVER,reference:0,mask:u$M.CLASSIFICATION_MASK},blending:Ee$r.ALPHA_BLEND},L$e={depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.KEEP},backFunction:m$Z.NEVER,reference:0,mask:u$M.CLASSIFICATION_MASK},blending:Ee$r.ALPHA_BLEND},N$9={depthMask:!0,depthTest:{enabled:!0},stencilTest:u$M.setCesium3DTileBit(),stencilMask:u$M.CESIUM_3D_TILE_MASK,blending:Ee$r.ALPHA_BLEND},M$c="#extension GL_EXT_frag_depth : enable\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform sampler2D classifiedTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n bool isClassified = all(equal(texture2D(classifiedTexture, v_textureCoordinates), vec4(0.0)));\n#ifdef UNCLASSIFIED\n vec4 highlightColor = czm_invertClassificationColor;\n if (isClassified)\n {\n discard;\n }\n#else\n vec4 highlightColor = vec4(1.0);\n if (!isClassified)\n {\n discard;\n }\n#endif\n gl_FragColor = color * highlightColor;\n gl_FragDepthEXT = texture2D(depthTexture, v_textureCoordinates).r;\n}\n",U$b="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n#ifdef UNCLASSIFIED\n gl_FragColor = color * czm_invertClassificationColor;\n#else\n gl_FragColor = color;\n#endif\n}\n";function n$a(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}function o$f(e){if(e$2e(e)&&e.length!==i$R.NUMBER_OF_JOB_TYPES)throw new t$15("A budget must be specified for each job type; budgets.length should equal JobType.NUMBER_OF_JOB_TYPES.");var t=new Array(i$R.NUMBER_OF_JOB_TYPES);t[i$R.TEXTURE]=new n$a(e$2e(e)?e[i$R.TEXTURE]:10),t[i$R.PROGRAM]=new n$a(e$2e(e)?e[i$R.PROGRAM]:10),t[i$R.BUFFER]=new n$a(e$2e(e)?e[i$R.BUFFER]:30);var i,n=t.length,r=0;for(i=0;i<n;++i)r+=t[i].total;var o=new Array(n);for(i=0;i<n;++i)o[i]=!1;this._totalBudget=r,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=o}function r$g(){}t$a.prototype.update=function(e){var t=this._texture,i=!e$2e(t)||this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;var n,r,o=e.drawingBufferWidth,a=e.drawingBufferHeight,s=!e$2e(t)||t.width!==o||t.height!==a;((s||i)&&(this._texture=this._texture&&this._texture.destroy(),this._classifiedTexture=this._classifiedTexture&&this._classifiedTexture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._texture=new t$U({context:e,width:o,height:a,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}),e$2e(this._previousFramebuffer)||(this._classifiedTexture=new t$U({context:e,width:o,height:a,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}),this._depthStencilTexture=new t$U({context:e,width:o,height:a,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8}))),!e$2e(this._fbo)||s||i)&&(this._fbo=this._fbo&&this._fbo.destroy(),this._fboClassified=this._fboClassified&&this._fboClassified.destroy(),e$2e(this._previousFramebuffer)?(n=this._previousFramebuffer.depthStencilTexture,r=this._previousFramebuffer.depthStencilRenderbuffer):n=this._depthStencilTexture,this._fbo=new t$V({context:e,colorTextures:[this._texture],depthStencilTexture:n,depthStencilRenderbuffer:r,destroyAttachments:!1}),e$2e(this._previousFramebuffer)||(this._fboClassified=new t$V({context:e,colorTextures:[this._classifiedTexture],depthStencilTexture:n,destroyAttachments:!1})));if(e$2e(this._rsUnclassified)||(this._rsUnclassified=d$1m.fromCache(I$a),this._rsClassified=d$1m.fromCache(L$e),this._rsDefault=d$1m.fromCache(N$9)),!e$2e(this._unclassifiedCommand)||i){e$2e(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());var l=e$2e(this._previousFramebuffer)?U$b:M$c,u=new s$V({defines:["UNCLASSIFIED"],sources:[l]}),c=new s$V({sources:[l]});this._unclassifiedCommand=e.createViewportQuadCommand(u,{renderState:e$2e(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(c,{renderState:e$2e(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),e$2e(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),e$2e(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(ie$7,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}},t$a.prototype.clear=function(e,t){var i=t.framebuffer;e$2e(this._previousFramebuffer)?(t.framebuffer=this._fbo,this._clearColorCommand.execute(e,t)):(t.framebuffer=this._fbo,this._clearCommand.execute(e,t),t.framebuffer=this._fboClassified,this._clearCommand.execute(e,t)),t.framebuffer=i},t$a.prototype.executeClassified=function(e,t){if(!e$2e(this._previousFramebuffer)){var i=t.framebuffer;t.framebuffer=this._fboClassified,this._translucentCommand.execute(e,t),t.framebuffer=i}this._classifiedCommand.execute(e,t)},t$a.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)},t$a.prototype.isDestroyed=function(){return!1},t$a.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._texture=this._texture&&this._texture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),e$2e(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),i$11(this)},Object.defineProperties(n$a.prototype,{total:{get:function(){return this._total}}}),o$f.getTimestamp=Et$c,Object.defineProperties(o$f.prototype,{totalBudget:{get:function(){return this._totalBudget}}}),o$f.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget},o$f.prototype.resetBudgets=function(){for(var e=this._budgets,t=e.length,i=0;i<t;++i){var n=e[i];n.starvedLastFrame=n.starvedThisFrame,n.starvedThisFrame=!1,n.usedThisFrame=0,n.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0},o$f.prototype.execute=function(e,t){var i,n=this._budgets,r=n[t],o=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&o)return r.starvedThisFrame=!0,!1;if(r.usedThisFrame+r.stolenFromMeThisFrame>=r.total){var a,s=n.length;for(a=0;a<s&&(!((i=n[a]).usedThisFrame+i.stolenFromMeThisFrame<i.total)||i.starvedLastFrame);++a);if(a===s&&o)return!1;o&&(r.starvedThisFrame=!0)}var l=o$f.getTimestamp();e.execute();var u=o$f.getTimestamp()-l;return this._totalUsedThisFrame+=u,i?i.stolenFromMeThisFrame+=u:r.usedThisFrame+=u,this._executedThisFrame[t]=!0,!0},Object.defineProperties(r$g.prototype,{color:{get:t$15.throwInstantiationError},intensity:{get:t$15.throwInstantiationError}});var e$8={SUN_LIGHT:0,LIGHT_GROUP1:1},Ze$4=Object.freeze(e$8),p$6=/\/$/,d$i=new r$U('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function o$e(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).styleId;if(!e$2e(t))throw new t$15("options.styleId is required.");var i=t$10.createIfNeeded(u$Z(e.url,"https://api.mapbox.com/styles/v1/")),n=e$U.getAccessToken(e.accessToken);this._styleId=t,this._accessToken=n,this._accessTokenErrorCredit=r$U.clone(e$U.getErrorCredit(e.accessToken));var r=u$Z(e.tilesize,512);this._tilesize=r;var o=u$Z(e.username,"mapbox");this._username=o;var a,s=e$2e(e.scaleFactor)?"@2x":"",l=i.getUrlComponent();p$6.test(l)||(l+="/"),l+=this._username+"/"+t+"/tiles/"+this._tilesize+"/{z}/{x}/{y}"+s,i.url=l,i.setQueryParameters({access_token:n}),e$2e(e.credit)?"string"==typeof(a=e.credit)&&(a=new r$U(a)):a=d$i,this._resource=i,this._imageryProvider=new _$g({url:i,credit:a,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function n$9(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).textureUrl;e$2e(t)||(t=n$17("Assets/Textures/moonSmall.jpg")),this.show=u$Z(e.show,!0),this.textureUrl=t,this._ellipsoid=u$Z(e.ellipsoid,t$12.MOON),this.onlySunLighting=u$Z(e.onlySunLighting,!0),this._ellipsoidPrimitive=new p$c({radii:this.ellipsoid.radii,material:r$Y.fromType(r$Y.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new h$I}function x$c(){}function y$c(e,t,i,n,r,o,a){var s=e.xDimName,l=e.yDimName,u=e.zDimName,c=e.timeDimName,h=e.dimensions,d=e.dimensionIndices,f=e.buffer,p=h[d[t]];if(0==p.size&&t<d.length-1)y$c(e,t+1,i,n,r,o,a);else for(var _=p.name===s,m=p.name===l,g=p.name===u,x=e$2e(c)&&p.name===c,y=0;y<p.size;y++)if(_?i=y:m?n=y:g?r=y:x&&(o=y),t==d.length-1){var v=f.readFloat32();a.maxValue=Math.max(a.maxValue,v),a.minValue=Math.min(a.minValue,v);var $=r*e.xDimSize*e.yDimSize+n*e.xDimSize+i;a.array[o][$]=v}else y$c(e,t+1,i,n,r,o,a)}function E$b(e,t,i,n){var r=t.offset;t.size,t.type;var o=t.dimensions,a=e.recordDimension;n.seek(r),e.buffer=n,e.dimensions=i,e.dimensionIndices=o;var s=e.xDimName,l=e.yDimName,u=e.zDimName,c=e.timeDimName;e.xDimSize=0,e.yDimSize=0,e.zDimSize=0;for(var h=1,d=0;d<i.length;d++)i[d].name==s?e.xDimSize=i[d].size:i[d].name==l?e.yDimSize=i[d].size:i[d].name==u?e.zDimSize=i[d].size:e$2e(c)&&i[d].name==c&&(h=i[d].size);a.length>0&&(h=a.length,e.timeDimName=null);var f={array:[]},p=0;for(p=0;p<h;p++)f.array[p]=[];if(f.maxValue=Number.MIN_VALUE,f.minValue=Number.MAX_VALUE,f.xDimSize=e.xDimSize,f.yDimSize=e.yDimSize,f.zDimSize=e.zDimSize,f.timeDimSize=h,a.length>0)for(p=0;p<h;p++)n.seek(r+a.recordStep*p),y$c(e,0,0,0,0,p,f);else y$c(e,0,0,0,0,0,f);return f}function e$7(e){}Object.defineProperties(o$e.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),o$e.prototype.getTileCredits=function(e,t,i){if(e$2e(this._accessTokenErrorCredit))return[this._accessTokenErrorCredit]},o$e.prototype.requestImage=function(e,t,i,n){return this._imageryProvider.requestImage(e,t,i,n)},o$e.prototype.pickFeatures=function(e,t,i,n,r){return this._imageryProvider.pickFeatures(e,t,i,n,r)},o$e._defaultCredit=d$i,Object.defineProperties(n$9.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),new p$1e,new p$1e,new o$1p,n$9.prototype.update=function(e){},n$9.prototype.isDestroyed=function(){return!1},n$9.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),i$11(this)},x$c.loadData=function(e,t){var i=e.header,n=e.buffer,r=i.dimensions;i.globalAttributes;var o=i.variables;t.recordDimension=i.recordDimension;for(var a=0,s=0;s<o.length;s++)if(o[s].name==t.variableName){a=s;break}return E$b(t,o[a],r,n)},e$7.prototype.isReady=function(){return!0},e$7.prototype.shouldDiscardImage=function(e){return!1};var y$b="#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\n\nuniform vec4 u_bgColor;\nuniform sampler2D u_depthTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n if (texture2D(u_depthTexture, v_textureCoordinates).r < 1.0)\n {\n#ifdef MRT\n gl_FragData[0] = u_bgColor;\n gl_FragData[1] = vec4(u_bgColor.a);\n#else\n gl_FragColor = u_bgColor;\n#endif\n return;\n }\n \n discard;\n}\n",L$d="\nuniform u_bgColor : vec4<f32>;\n\nvar u_depthTexture : texture_depth_2d;\nvar u_depthTextureSampler : sampler;\n\nvarying v_textureCoordinates : vec2<f32>;\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n if (textureSample(u_depthTexture, u_depthTextureSampler, v_textureCoordinates) >= 1.0)\n {\n discard;\n }\n gl_FragData0 = uniforms.u_bgColor;\n gl_FragData1 = vec4(uniforms.u_bgColor.a);\n}\n",N$8="/**\n * Compositing for Weighted Blended Order-Independent Transparency. See:\n */\n\nuniform sampler2D u_opaque;\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 opaque = texture2D(u_opaque, v_textureCoordinates);\n vec4 accum = texture2D(u_accumulation, v_textureCoordinates);\n float r = texture2D(u_revealage, v_textureCoordinates).r;\n\n#ifdef MRT\n vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n#else\n vec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);\n#endif\n\n gl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\n\n if (opaque != czm_backgroundColor)\n {\n gl_FragColor.a = 1.0;\n }\n}\n";function C$c(e){this._numSamples=1,this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;var t=e.colorBufferFloat&&e.depthTexture&&e.floatBlend;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._useWebGPU=e.webgpu,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=void 0,this._alphaFBO=void 0,this._adjustTranslucentFBO=void 0,this._adjustAlphaFBO=void 0,this._opaqueClearCommand=new t$W({color:new e$1X(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new t$W({color:new e$1X(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new t$W({color:new e$1X(0,0,0,0),owner:this}),this._alphaClearCommand=new t$W({color:new e$1X(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new f$1a,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function P$e(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function x$b(e){e._translucentFBO=e._translucentFBO&&!e._translucentFBO.isDestroyed()&&e._translucentFBO.destroy(),e._alphaFBO=e._alphaFBO&&!e._alphaFBO.isDestroyed()&&e._alphaFBO.destroy(),e._adjustTranslucentFBO=e._adjustTranslucentFBO&&!e._adjustTranslucentFBO.isDestroyed()&&e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO=e._adjustAlphaFBO&&!e._adjustAlphaFBO.isDestroyed()&&e._adjustAlphaFBO.destroy()}function z$a(e){P$e(e),x$b(e)}function I$9(e,t,i,n){P$e(e),e._accumulationTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:t.webgpu?_$_.HALF_FLOAT:_$_.FLOAT,samples:e._numSamples});var r=new Float32Array(i*n*4);e._revealageTexture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:t.webgpu?_$_.HALF_FLOAT:_$_.FLOAT,source:{arrayBufferView:r,width:i,height:n},flipY:!1,samples:e._numSamples})}function W$c(e,t){x$b(e);var i=de$y.FRAMEBUFFER_COMPLETE,n=!0;if(e._translucentMRTSupport&&(e._translucentFBO=new t$V({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new t$V({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1}),(e._translucentFBO.status!==i||e._adjustTranslucentFBO.status!==i)&&(x$b(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO=new t$V({context:t,colorTextures:[e._accumulationTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._alphaFBO=new t$V({context:t,colorTextures:[e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new t$V({context:t,colorTextures:[e._accumulationTexture],destroyAttachments:!1}),e._adjustAlphaFBO=new t$V({context:t,colorTextures:[e._revealageTexture],destroyAttachments:!1});var r=e._translucentFBO.status===i,o=e._alphaFBO.status===i,a=e._adjustTranslucentFBO.status===i,s=e._adjustAlphaFBO.status===i;(!r||!o||!a||!s)&&(z$a(e),e._translucentMultipassSupport=!1,n=!1)}return n}C$c.prototype.update=function(e,t,i,n,r){if(!this.isSupported())return;this._opaqueFBO=i,this._opaqueTexture=i.getColorTexture(0),this._depthStencilTexture=i.depthStencilTexture;var o=this._opaqueTexture.width,a=this._opaqueTexture.height,s=this._accumulationTexture,l=!e$2e(s)||s.width!==o||s.height!==a||n!==this._useHDR;const u=this._numSamples!==r;if((l||u)&&(this._numSamples=r,I$9(this,e,o,a)),e$2e(this._translucentFBO)&&!l&&!u||W$c(this,e)){this._useHDR=n;var c,h,d=this;e$2e(this._compositeCommand)||(c=new s$V({sources:[N$8]}),this._translucentMRTSupport&&c.defines.push("MRT"),h={u_opaque:function(){return d._opaqueTexture},u_accumulation:function(){return d._accumulationTexture},u_revealage:function(){return d._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(c,{shaderProgramName:"CompositeOITFS",uniformMap:h,owner:this})),e$2e(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(c=new s$V({defines:["MRT"],sources:[e.webgpu?L$d:y$b],useWGSL:e.webgpu}),h={u_bgColor:function(){return d._translucentMRTClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(c,{shaderProgramName:"AdjustTranslucentOIT",useWGSL:e.webgpu,uniformMap:h,owner:this})):this._translucentMultipassSupport&&(c=new s$V({sources:[y$b]}),h={u_bgColor:function(){return d._translucentMultipassClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(c,{uniformMap:h,owner:this}),h={u_bgColor:function(){return d._alphaClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(c,{uniformMap:h,owner:this}))),this._viewport.width=o,this._viewport.height=a;var f=!f$1a.equals(this._viewport,t.viewport),p=f!==this._useScissorTest;this._useScissorTest=f,f$1a.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=f$1a.clone(t.viewport,this._scissorRectangle),p=!0),(!e$2e(this._rs)||!f$1a.equals(this._viewport,this._rs.viewport)||p)&&(this._rs=d$1m.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),e$2e(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),e$2e(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)}};var G$d={enabled:!0,color:new e$1X(0,0,0,0),equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.ONE,functionDestinationRgb:l$13.ONE,functionSourceAlpha:l$13.ZERO,functionDestinationAlpha:l$13.ONE_MINUS_SOURCE_ALPHA},H$e={enabled:!0,color:new e$1X(0,0,0,0),equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.ONE,functionDestinationRgb:l$13.ONE,functionSourceAlpha:l$13.ONE,functionDestinationAlpha:l$13.ONE},U$a={enabled:!0,color:new e$1X(0,0,0,0),equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.ZERO,functionDestinationRgb:l$13.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:l$13.ZERO,functionDestinationAlpha:l$13.ONE_MINUS_SOURCE_ALPHA};function R$b(e,t,i,n){var r=i[n.id];if(!e$2e(r)){var o=d$1m.getState(n);o.depthMask=!1,o.blending=t,r=d$1m.fromCache(o),i[n.id]=r}return r}function V$c(e,t,i){return R$b(t,G$d,e._translucentRenderStateCache,i)}function Q$6(e,t,i){return R$b(t,H$e,e._translucentRenderStateCache,i)}function Z$9(e,t,i){return R$b(t,U$a,e._alphaRenderStateCache,i)}var X$8=" vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n",Y$7=" var Ci : vec3<f32> = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n var ai = czm_gl_FragColor.a;\n var wzi = czm_alphaWeight(ai);\n gl_FragData0 = vec4<f32>(Ci * wzi, ai);\n gl_FragData1 = vec4<f32>(ai * wzi);\n",k$9=" vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragColor = vec4(Ci, ai) * wzi;\n",J$6=" float ai = czm_gl_FragColor.a;\n gl_FragColor = vec4(ai);\n";function D$a(e,t,i,n){var r=e.shaderCache.getDerivedShaderProgram(t,i);if(!e$2e(r)){var o=t._attributeLocations,a=t.fragmentShaderSource.clone(),s=a.useWGSL;if(a.sources=a.sources.map((function(e){return e=(e=(e=(e=s$V.replaceMain(e,"czm_translucent_main",s)).replace(/gl_FragColor/g,"czm_gl_FragColor")).replace(/\bdiscard\b/g,"czm_discard = true")).replace(/czm_phong/g,"czm_translucentPhong")})),s)a.sources.splice(0,0,"var<private> czm_gl_FragColor : vec4<f32>;\nvar<private> czm_discard : bool = false;\n"),a.sources.push("@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n"+n+"}\n");else{var l="";e.webgpu&&(l="#ifdef WEBGPU \n layout(location = 0) out vec4 glFragData[2]; \n#endif \n"),a.sources.splice(0,0,(-1!==n.indexOf("gl_FragData")?"#extension GL_EXT_draw_buffers : enable \n"+l:"")+"vec4 czm_gl_FragColor;\nbool czm_discard = false;\n"),a.sources.push("void main()\n{\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n"+n+"}\n")}r=e.shaderCache.createDerivedShaderProgram(t,i,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:o})}return r}function K$8(e,t){return D$a(e,t,"translucentMRT",t.fragmentShaderSource.useWGSL?Y$7:X$8)}function $$8(e,t){return D$a(e,t,"translucentMultipass",k$9)}function ee$6(e,t){return D$a(e,t,"alphaMultipass",J$6)}function ae$5(e,t,i,n,r,o){var a,s,l=t.context,u=t.frameState.useLogDepth,c=t._hdr,h=n.framebuffer,d=r.length,f=t.frameState.shadowState.lightShadowsEnabled;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(l,n),n.framebuffer=e._adjustAlphaFBO,e._adjustAlphaCommand.execute(l,n);var p=e._opaqueFBO;for(n.framebuffer=e._translucentFBO,s=0;s<d;++s)a=r[s],a=u?a.derivedCommands.logDepth.command:a,a=c?a.derivedCommands.hdr.command:a,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.translucentCommand:a.derivedCommands.oit.translucentCommand,t,l,n,p);for(e$2e(o)&&(a=o.unclassifiedCommand,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.translucentCommand:a.derivedCommands.oit.translucentCommand,t,l,n,p)),n.framebuffer=e._alphaFBO,s=0;s<d;++s)a=r[s],a=u?a.derivedCommands.logDepth.command:a,a=c?a.derivedCommands.hdr.command:a,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.alphaCommand:a.derivedCommands.oit.alphaCommand,t,l,n,p);e$2e(o)&&(a=o.unclassifiedCommand,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.alphaCommand:a.derivedCommands.oit.alphaCommand,t,l,n,p)),n.framebuffer=h}function re$6(e,t,i,n,r,o){var a=t.context,s=t.frameState.useLogDepth,l=t._hdr,u=n.framebuffer,c=r.length,h=t.frameState.shadowState.lightShadowsEnabled;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(a,n);var d=e._opaqueFBO;n.framebuffer=e._translucentFBO;for(var f,p=0;p<c;++p)f=r[p],f=s?f.derivedCommands.logDepth.command:f,f=l?f.derivedCommands.hdr.command:f,i(h&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,t,a,n,d);e$2e(o)&&(f=o.unclassifiedCommand,i(h&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,t,a,n,d)),n.framebuffer=u}C$c.prototype.createDerivedCommands=function(e,t,i){var n,r,o,a,s,l;(e$2e(i)||(i={}),this._translucentMRTSupport)?(e$2e(i.translucentCommand)&&(n=i.translucentCommand.shaderProgram,r=i.translucentCommand.renderState),i.translucentCommand=i$$.shallowClone(e,i.translucentCommand),e$2e(n)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=n,i.translucentCommand.renderState=r):(i.translucentCommand.shaderProgram=K$8(t,e.shaderProgram),i.translucentCommand.renderState=V$c(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id)):(e$2e(i.translucentCommand)&&(o=i.translucentCommand.shaderProgram,a=i.translucentCommand.renderState,s=i.alphaCommand.shaderProgram,l=i.alphaCommand.renderState),i.translucentCommand=i$$.shallowClone(e,i.translucentCommand),i.alphaCommand=i$$.shallowClone(e,i.alphaCommand),e$2e(o)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=o,i.translucentCommand.renderState=a,i.alphaCommand.shaderProgram=s,i.alphaCommand.renderState=l):(i.translucentCommand.shaderProgram=$$8(t,e.shaderProgram),i.translucentCommand.renderState=Q$6(this,t,e.renderState),i.alphaCommand.shaderProgram=ee$6(t,e.shaderProgram),i.alphaCommand.renderState=Z$9(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id));return i},C$c.prototype.executeCommands=function(e,t,i,n,r){this._translucentMRTSupport?re$6(this,e,t,i,n,r):ae$5(this,e,t,i,n,r)},C$c.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)},C$c.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._opaqueFBO,e$1X.clone(i,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO,this._alphaClearCommand.execute(e,t)),t.framebuffer=n},C$c.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport},C$c.prototype.setOpaqueTexture=function(e){this._opaqueTexture=e},C$c.prototype.isDestroyed=function(){return!1},C$c.prototype.destroy=function(){return z$a(this),e$2e(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),e$2e(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),e$2e(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),i$11(this)};var x$a=new r$U("MapQuest, Open Street Map and contributors, CC-BY-SA");function a$9(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=t$10.createIfNeeded(u$Z(e.url,"https://a.tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+="{z}/{x}/{y}."+u$Z(e.fileExtension,"png");var i=new c$S({ellipsoid:e.ellipsoid}),n=u$Z(e.minimumLevel,0),r=e.maximumLevel,o=u$Z(e.rectangle,i.rectangle),a=i.positionToTileXY(h$18.southwest(o),n),s=i.positionToTileXY(h$18.northeast(o),n),l=(Math.abs(s.x-a.x)+1)*(Math.abs(s.y-a.y)+1);if(l>4)throw new t$15("The rectangle and minimumLevel indicate that there are "+l+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");var u=u$Z(e.credit,x$a);"string"==typeof u&&(u=new r$U(u)),_$g.call(this,{url:t,credit:u,tilingScheme:i,tileWidth:256,tileHeight:256,minimumLevel:n,maximumLevel:r,rectangle:o})}function m$c(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.time=u$Z(e.time,0),this.minimum=u$Z(e.minimum,0),this.maximum=u$Z(e.maximum,50),this._complete=!1}function e$6(e){throw new t$15("This type should not be instantiated directly. Instead, use BoxEmitter, CircleEmitter, ConeEmitter or SphereEmitter.")}e$2e(Object.create)&&(a$9.prototype=Object.create(_$g.prototype),a$9.prototype.constructor=a$9),Object.defineProperties(m$c.prototype,{complete:{get:function(){return this._complete}}}),e$6.prototype.emit=function(e){t$15.throwInstantiationError()};var N$7="uniform sampler2D u_colorTexture;\nuniform sampler2D u_transitionAndCountTexture;\nvarying vec2 v_textureCoordinates;\nfloat erf(float x){\n if (abs(x) > 2.629639){\n return sign(x);\n }\n else {\n float z = 0.289226 * x * x - 1.0;\n return ((((((0.0145688 * z - 0.0348595) * z + 0.0503913) * z - 0.0897001) * z + 0.156097) * z - 0.249431) * z + 0.533201) * x;\n }\n}\nfloat VDMTransmission(vec2 transition, float depth){\n float variance = max(transition.y - transition.x * transition.x, 0.0);\n return clamp(0.5 * (1.0 + erf((depth - transition.x) / sqrt(variance * 2.0))), 0.0, 1.0);\n}\nvoid main()\n{\n vec4 color = texture2D(u_colorTexture, v_textureCoordinates);\n if(color.a < 0.01){\n discard;\n }\n float scene_depth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n if(scene_depth > 0.0){\n vec3 transitionAndCount = texture2D(u_transitionAndCountTexture, v_textureCoordinates).xyz;\n float count = transitionAndCount.z;\n vec2 transition = transitionAndCount.xy;\n transition /= count;\n float vdmAlpha = VDMTransmission(transition, scene_depth);\n color.a = min(color.a, vdmAlpha);\n }\n gl_FragColor = color;\n}";function u$b(){this._colorFBO=void 0,this._transitionFBO=void 0,this._colorTexture=void 0,this._transitionTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._passType=Le$q.OPAQUE,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},this.quality=.25,this.enable=!1,this._useLogDepth=!1,this._particleSp=void 0,this._useHdr=!1,this.useHdr=this._useHdr}var G$c={enabled:!0,color:new e$1X(0,0,0,0),equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.SOURCE_ALPHA,functionDestinationRgb:l$13.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:l$13.ONE,functionDestinationAlpha:l$13.ONE},f$e=new f$1a;function q$a(e,t){var i=e[t.id];if(!e$2e(i)||i.viewport.width!=f$e.width||i.viewport.height!=f$e.height){var n=d$1m.getState(t);n.viewport=f$e,i=d$1m.fromCache(n),e[t.id]=i}return i}function S$9(){return new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}function y$a(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._transitionTexture=e._transitionTexture&&!e._transitionTexture.isDestroyed()&&e._transitionTexture.destroy(),e._colorFBO=e._colorFBO&&!e._colorFBO.isDestroyed()&&e._colorFBO.destroy(),e._transitionFBO=e._transitionFBO&&!e._transitionFBO.isDestroyed()&&e._transitionFBO.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}function U$9(e,t){var i=e._screenWidth,n=e._screenHeight;e._colorTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:S$9()}),e._transitionTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT,sampler:S$9()}),e._colorFBO=new t$V({context:t,colorTextures:[e._colorTexture],destroyAttachments:!1}),e._transitionFBO=new t$V({context:t,colorTextures:[e._transitionTexture],destroyAttachments:!1})}function I$8(e,t){var i=[];e._useLogDepth&&i.push("LOG_DEPTH");var n=new s$V({sources:[N$7],defines:i}),r={u_colorTexture:function(){return e._colorTexture},u_transitionAndCountTexture:function(){return e._transitionTexture}},o=d$1m.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:G$c});e._drawCommand=t.createViewportQuadCommand(n,{uniformMap:r,renderState:o,pass:e._passType,owner:e}),e._clearCommand=new t$W({color:new e$1X(0,0,0,0),depth:1,renderState:d$1m.fromCache(),pass:e._passType,owner:e})}function V$b(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._colorTexture,o=!1,a=e$2e(r)&&(r.width!==i||r.height!==n);return(!e$2e(r)||a)&&(y$a(e),U$9(e,t),I$8(e,t),o=!0),o}function D$9(e){return e.drawBuffers&&e.fragmentDepth}function r$f(){this._drawCommand=void 0,this.enable=!1,this._particleStateTexture=void 0,this._initialized=!1}function a$8(e){e._drawCommand=void 0,e._clearCommand=void 0}function h$a(e,t){var i=new s$V({sources:[ie$7]}),n={colorTexture:function(){return e._particleStateTexture}},r=d$1m.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Ee$r.ALPHA_BLEND});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:e._passType,owner:e})}function c$b(e,t){var i=!1;return e._initialized||(a$8(e),h$a(e,t),i=!0,e._initialized=!0),i}function d$h(e){return e.drawBuffers&&e.fragmentDepth}function i$c(e){if("string"==typeof e){var t=document.getElementById(e);if(null===t)throw new t$15('Element with id "'+e+'" does not exist in the document.');e=t}return e}function o$d(e){var t=i$c((e=u$Z(e,u$Z.EMPTY_OBJECT)).container);if(!e$2e(t))throw new t$15("container is required");this._container=t;var i=document.createElement("div");i.className="supermap3d-performanceDisplay";var n=document.createElement("div");n.className="supermap3d-performanceDisplay-fps",this._fpsText=document.createTextNode(""),n.appendChild(this._fpsText);var r=document.createElement("div");r.className="supermap3d-performanceDisplay-ms",this._msText=document.createTextNode(""),r.appendChild(this._msText),i.appendChild(r),i.appendChild(n),this._container.appendChild(i),this._lastFpsSampleTime=Et$c(),this._lastMsSampleTime=Et$c(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;var o=document.createElement("div");o.className="supermap3d-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),o.appendChild(this._throttledText),i.appendChild(o);var a=document.createElement("div");a.className="supermap3d-performanceDisplay-ms",this._trangleCountText=document.createTextNode(""),a.appendChild(this._trangleCountText),i.appendChild(a)}u$b.isSupported=D$9,u$b.prototype.update=function(e,t){if(D$9(e.context)&&this.enable){var i=e.context;this._screenWidth=Math.floor(i.drawingBufferWidth*this.quality),this._screenHeight=Math.floor(i.drawingBufferHeight*this.quality),f$e.width=this._screenWidth,f$e.height=this._screenHeight,this._useLogDepth=e.useLogDepth,this._useHdr=t,V$b(this,i)}},u$b.prototype.execute=function(e,t){!e$2e(this._drawCommand)||!this.enable||!e$2e(e.uniformState)||!e$2e(e.uniformState.globeDepthTexture)||this._drawCommand.execute(e,t)},u$b.prototype.executeCommand=function(e,t,i,n,r){if(0!=r){var o,a,s=e.context,l=e.frameState.useLogDepth,u=e._hdr,c=i.framebuffer;for(i.framebuffer=this._colorFBO,a=0;a<r;++a)o=n[a],o=l?o.derivedCommands.logDepth.command:o,t(o=u?o.derivedCommands.hdr.command:o,e,s,i);for(i.framebuffer=this._transitionFBO,a=0;a<r;++a){if(o=n[a],o=l?o.derivedCommands.logDepth.command:o,o=u?o.derivedCommands.hdr.command:o,!e$2e(this._particleSp)||this._useHdr!==this.useHdr){this.useHdr=this._useHdr;var h=o.shaderProgram.fragmentShaderSource.clone(),d=o.shaderProgram.vertexShaderSource.clone();h.defines.push("PARTICLESYSTEM"),this._particleSp=r$14.fromCache({context:s,vertexShaderSource:d,fragmentShaderSource:h})}var f=o.shaderProgram;o._shaderProgram=this._particleSp,t(o,e,s,i),o._shaderProgram=f}i.framebuffer=c}},u$b.prototype.clear=function(e,t){!e$2e(this._clearCommand)||!this.enable||(this._clearCommand.framebuffer=this._colorFBO,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._transitionFBO,this._clearCommand.execute(e,t))},u$b.prototype.createDerivedCommands=function(e){!e$2e(e)||(this.enable=!0,e$2e(this._colorFBO)&&(e.renderState=q$a(this._renderStateCache,e.renderState)))},u$b.prototype.isDestroyed=function(){return!1},u$b.prototype.destroy=function(){return y$a(this),i$11(this)},r$f.isSupported=d$h,r$f.prototype.update=function(e){if(this.enable=!0,d$h(e.context)&&this.enable)c$b(this,e.context)},r$f.prototype.execute=function(e,t){!e$2e(this._drawCommand)||!this.enable||!e$2e(e.uniformState)||!e$2e(e.uniformState.globeDepthTexture)||this._drawCommand.execute(e,t)},r$f.prototype.isDestroyed=function(){return!1},r$f.prototype.destroy=function(){return a$8(this),i$11(this)},Object.defineProperties(o$d.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(this._throttledText.nodeValue=e?"(throttled)":"",this._throttled=e)}},trangleCount:{set:function(e){this._trangleCount!==e&&(this._trangleCount=e,this._trangleCountText.nodeValue=e)}}}),o$d.prototype.update=function(e){var t=Et$c(),i=u$Z(e,!0);this._fpsFrameCount++;var n=t-this._lastFpsSampleTime;if(n>1e3){var r="N/A";i&&(r=1e3*this._fpsFrameCount/n|0),this._fpsText.nodeValue=r+" FPS",this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;var o=t-this._lastMsSampleTime;if(o>200){var a="N/A";i&&(a=(o/this._msFrameCount).toFixed(2)),this._msText.nodeValue=a+" MS",this._lastMsSampleTime=t,this._msFrameCount=0}},o$d.prototype.destroy=function(){return i$11(this)};var P$d="varying v_textureCoordinates : vec2<f32>;\nvar u_depthTexture : texture_depth_multisampled_2d;\nvar u_depthTextureSampler : sampler;\nfn packDepth(depth : f32) -> vec4<f32> {\n var enc : vec4<f32> = (vec4<f32>(1.0, 255.0, 65025.0, 16581375.0) * depth);\n enc = fract(enc);\n enc = (enc - (vec4<f32>(enc.y, enc.z, enc.w, enc.w) * vec4<f32>(0.003921569, 0.003921569, 0.003921569, 0.0)));\n return enc;\n}\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var sampleCount = i32(textureNumSamples(u_depthTexture));\n var sampleCoord = vec2<i32>(v_textureCoordinates * vec2<f32>(textureDimensions(u_depthTexture)));\n var accumValue : f32;\n for(var i = 0i; i < sampleCount; i += 1i){\n accumValue += textureLoad(u_depthTexture, sampleCoord, i);\n }\n var depth = accumValue / f32(sampleCount);\n gl_FragColor = packDepth(depth);\n}\n";function f$d(){this._framebuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._useLogDepth=void 0,this._debugPickDepthViewportCommand=void 0}function w$a(e,t,i,n){if(!e$2e(e._debugPickDepthViewportCommand)||n!==e._useLogDepth){var r=new s$V({defines:[n?"LOG_DEPTH":""],sources:["uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float z_window = czm_unpackDepth(texture2D(u_texture, v_textureCoordinates));\n z_window = czm_reverseLogDepth(z_window); \n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]});e._debugPickDepthViewportCommand=t.createViewportQuadCommand(r,{shaderProgramName:"spDebugPickDepth",uniformMap:{u_texture:function(){return e._depthTexture}},owner:e}),e._useLogDepth=n}e._debugPickDepthViewportCommand.execute(t,i)}function s$c(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function h$9(e){e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy()}function b$h(e,t,i,n){e._depthTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE})}function T$e(e,t,i,n){s$c(e),h$9(e),b$h(e,t,i,n),e._framebuffer=new t$V({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function D$8(e,t,i){var n=i.width,r=i.height,o=e._depthTexture,a=!e$2e(o)||o.width!==n||o.height!==r;(!e$2e(e._framebuffer)||a)&&T$e(e,t,n,r)}function S$8(e,t,i){if(t.depthTexture){if(!e$2e(e._copyDepthCommand)){var n=t.webgpu?i._inner._samples>1?P$d:C$15:v$O;e._copyDepthCommand=t.createViewportQuadCommand(n,{shaderProgramName:"spCopyDepthPickDepth",useWGSL:t.webgpu,renderState:d$1m.fromCache(),uniformMap:{u_depthTexture:function(){return e._textureToCopy}},owner:e})}}else if(!e$2e(e._copyDepthCommand)){n="uniform sampler2D u_depthStencilTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = texture2D(u_depthStencilTexture, v_textureCoordinates).rgba;\n}\n";e._copyDepthCommand=t.createViewportQuadCommand(n,{shaderProgramName:"spCopyDepthPickDepth",renderState:d$1m.fromCache(),uniformMap:{u_depthStencilTexture:function(){return e._textureToCopy}},owner:e})}e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._framebuffer}f$d.prototype.executeDebugPickDepth=function(e,t,i){w$a(this,e,t,i)},f$d.prototype.update=function(e,t){D$8(this,e,t),S$8(this,e,t)},new e$2c;var z$9=new e$2c(1,1/255,1/65025,1/16581375);function _$c(e){var t=[];e$2c.unpackArray(e,t);for(var i=Number.POSITIVE_INFINITY,n=0;n<t.length;n++){var r=t[n];e$2c.divideByScalar(r,255,r),i=Math.min(i,e$2c.dot(r,z$9))}return i}function s$b(){this._depthStencilTexture=void 0,this._colorTexture=void 0,this._framebuffer=void 0,this._passState=void 0}function l$d(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy(),e._colorTexture=e._colorTexture&&e._colorTexture.destroy()}function w$9(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight;t.depthTexture?(e._depthStencilTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8}),e._colorTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE}),e._framebuffer=new t$V({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1})):(e._depthStencilTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE}),e._framebuffer=new t$V({context:t,colorTextures:[e._depthStencilTexture],depthStencilRenderbuffer:new r$10({context:t,width:i,height:n,format:M$13.DEPTH_STENCIL}),destroyAttachments:!1}));var r=new n$$(t);r.blendingEnabled=!1,r.scissorTest={enabled:!0,rectangle:new f$1a},r.viewport=new f$1a,e._passState=r}function f$c(e){var t=new n$$(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new f$1a},t.viewport=new f$1a,this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}function w$8(e,t,i,n){for(var r=Math.max(e,t),o=r*r,a=Math.floor(.5*e),s=Math.floor(.5*t),l=0,u=0,c=0,h=-1,d=0;d<o;++d){if(-a<=l&&l<=a&&-s<=u&&u<=s){var f=4*((s-u)*e+l+a),p=e$1X.byteToRgba(n[f],n[f+1],n[f+2],n[f+3]),_=i.getObjectByPickId(p);if(e$2e(_))return _}if(l===u||l<0&&-l===u||l>0&&l===1-u){var m=c;c=-h,h=m}l+=c,u+=h}}function a$7(e){var t=new n$$(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new f$1a},t.viewport=new f$1a,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isOnlyS3MObjectVisible:!0,isUnderGlobeVisible:!1},this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}function L$c(e,t,i){var n,r,o=e.context,a=[],s=t.frustum.near,l=t.frustum.far,u=e.logarithmicDepthBuffer?e.logarithmicDepthFarToNearRatio:e.farToNearRatio;Y$6(s,l,u,Math.ceil(Math.log(l/s)/Math.log(u)),e.logarithmicDepthBuffer,a,!1,void 0),o.depthTexture&&(n=new a$a),e._useOIT&&o.depthTexture&&(r=new C$c(o));var c=new n$$(o);c.viewport=f$1a.clone(i),this.camera=t,this._cameraClone=v$K.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=i,this.passState=c,this.pickFramebuffer=new f$c(o),this.pickPointFramebuffer=new a$7(o),this.pickDepthFramebuffer=new s$b,this.sceneFramebuffer=new n$i,this.normalFramebuffer=new s$h(o),this.globeDepth=n,this.globeTranslucencyFramebuffer=new p$8,this.oit=r,this.pickDepths=[],this.debugGlobeDepths=[],this.frustumCommandsList=a,this.debugFrustumStatistics=void 0,this.updateFrustums=!1}f$d.prototype.getDepth=function(e,t,i,n){var r=1;return e$2e(n)&&(r+=n),t-=Math.floor(.5*r),i-=Math.floor(.5*r),_$c(e.readPixels({x:t,y:i,width:r,height:r,framebuffer:this._framebuffer}))},f$d.prototype.getDepthPromise=function(e,t,i,n){var r=1;return e$2e(n)&&(r+=n),t-=Math.floor(.5*r),i-=Math.floor(.5*r),e.readPixelsAsync({x:t,y:i,width:r,height:r,framebuffer:this._framebuffer}).then((e=>{var t=_$c(e);return Promise.resolve(t)})).catch((e=>(console.log("PickDepth.prototype.getDepth readPixelsAsync failed."),Promise.resolve(void 0))))},f$d.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},f$d.prototype.isDestroyed=function(){return!1},f$d.prototype.destroy=function(){return s$c(this),h$9(this),this._copyDepthCommand.shaderProgram=e$2e(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy(),i$11(this)},s$b.prototype.update=function(e,t,i){var n=i.width,r=i.height;(!e$2e(this._framebuffer)||n!==this._depthStencilTexture.width||r!==this._depthStencilTexture.height)&&(l$d(this),w$9(this,e));var o=this._framebuffer,a=this._passState;return a.framebuffer=o,a.viewport.width=n,a.viewport.height=r,a.scissorTest.rectangle.x=t.x,a.scissorTest.rectangle.y=r-t.y,a.scissorTest.rectangle.width=1,a.scissorTest.rectangle.height=1,a},s$b.prototype.isDestroyed=function(){return!1},s$b.prototype.destroy=function(){return l$d(this),i$11(this)},f$c.prototype.begin=function(e,t,i){var n=this._context,r=t.width,o=t.height;return f$1a.clone(e,this._passState.scissorTest.rectangle),this._passState.scissorTest.enabled=!i,(!e$2e(this._fb)||this._width!==r||this._height!==o)&&(this._width=r,this._height=o,this._fb=this._fb&&this._fb.destroy(),this._fb=new t$V({context:n,colorTextures:[new t$U({context:n,width:r,height:o})],depthStencilTexture:new t$U({context:n,width:r,height:o,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=r,this._passState.viewport.height=o,this._passState},f$c.prototype.endAsync=function(e){var t=u$Z(e.width,1),i=u$Z(e.height,1),n=this._context;return n.readPixelsAsync({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb}).then((e=>(n.pixels=e,Promise.resolve(w$8(t,i,n,e))))).catch((e=>(console.log("Context.readPixels failed."),Promise.resolve(void 0))))},f$c.prototype.end=function(e){var t=u$Z(e.width,1),i=u$Z(e.height,1),n=this._context,r=n.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb});return n.pixels=r,w$8(t,i,n,r)},f$c.prototype.isDestroyed=function(){return!1},f$c.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),i$11(this)},a$7.prototype.begin=function(e,t){var i=this._context,n=t.width,r=t.height;return f$1a.clone(e,this._passState.scissorTest.rectangle),(!e$2e(this._fb)||this._width!==n||this._height!==r)&&(this._width=n,this._height=r,this._fb=this._fb&&this._fb.destroy(),this._fb=new t$V({context:i,colorTextures:[new t$U({context:i,width:n,height:r,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT})],depthStencilRenderbuffer:new r$10({context:i,width:n,height:r,format:M$13.DEPTH_STENCIL})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=n,this._passState.viewport.height=r,this._passState},a$7.prototype.end=function(e){var t=u$Z(e.width,1),i=u$Z(e.height,1),n=this._context,r=n.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb});n.pixels=r;for(var o=Math.max(t,i),a=o*o,s=Math.floor(.5*t),l=Math.floor(.5*i),u=0,c=0,h=0,d=-1,f=0;f<a;++f){if(-s<=u&&u<=s&&-l<=c&&c<=l){var p=4*((l-c)*t+u+s),_=new e$2c(r[p],r[p+1],r[p+2],1);if(_.z<-e$2d.EPSILON10)return _}if(u===c||u<0&&-u===c||u>0&&u===1-c){var m=h;h=-d,d=m}u+=h,c+=d}},a$7.prototype.isDestroyed=function(){return!1},a$7.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),i$11(this)};var z$8=new o$1p,W$b=new o$1p;function vt$2(e,t){var i=Math.max(Math.abs(e.x),Math.abs(t.x)),n=Math.max(Math.abs(e.y),Math.abs(t.y)),r=Math.max(Math.abs(e.z),Math.abs(t.z));return Math.max(Math.max(i,n),r)}function dt$4(e,t,i){var n=1/Math.max(1,vt$2(e.position,t.position));return o$1p.multiplyByScalar(e.position,n,z$8),o$1p.multiplyByScalar(t.position,n,W$b),o$1p.equalsEpsilon(z$8,W$b,i)&&o$1p.equalsEpsilon(e.direction,t.direction,i)&&o$1p.equalsEpsilon(e.up,t.up,i)&&o$1p.equalsEpsilon(e.right,t.right,i)&&p$1d.equalsEpsilon(e.transform,t.transform,i)&&e.frustum.equalsEpsilon(t.frustum,i)}function Y$6(e,t,i,n,r,o,a,s){o.length=n;for(var l=0;l<n;++l){var u,c;a?(u=Math.min(t-s,e+l*s),c=Math.min(t,u+s)):(c=i*(u=Math.max(e,Math.pow(i,l)*e)),r||(c=Math.min(t,c)));var h=o[l];e$2e(h)?(h.near=u,h.far=c):h=o[l]=new i$e(u,c)}}function bt$2(e,t,i,n){e.debugShowFrustums&&(i.debugOverlappingFrustums=0);for(var r=t.frustumCommandsList,o=r.length,a=0;a<o;++a){var s=r[a],l=s.near,u=s.far;if(!(n.start>u)){if(n.stop<l)break;var c=i.pass,h=s.indices[c]++;if(s.commands[c][h]=i,e.debugShowFrustums&&(i.debugOverlappingFrustums|=1<<a),i.executeInClosestFrustum)break}}if(e.debugShowFrustums){var d=t.debugFrustumStatistics.commandsInFrustums;d[i.debugOverlappingFrustums]=e$2e(d[i.debugOverlappingFrustums])?d[i.debugOverlappingFrustums]+1:1,++t.debugFrustumStatistics.totalCommands}e.updateDerivedCommands(i)}L$c.prototype.checkForCameraUpdates=function(e){var t=this.camera,i=this._cameraClone;return dt$4(t,i,e$2d.EPSILON6)?(this._cameraStartFired&&Et$c()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=Et$c(),v$K.clone(t,i),!0)};var H$d=new i$X,o$c=new o$1n;L$c.prototype.createPotentiallyVisibleSet=function(e){var t=e.frameState,i=t.camera,n=i.directionWC,r=i.positionWC,o=e._computeCommandList,a=e._overlayCommandList,s=e._logDepthOverlayCommandList,l=e._overlayAgainstDepthCommandList,u=t.commandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});for(var c=this.frustumCommandsList,h=c.length,d=Le$q.NUMBER_OF_PASSES,f=0;f<h;++f)for(var p=0;p<d;++p)c[f].indices[p]=0;o.length=0,a.length=0,s.length=0,l.length=0;for(var _=Number.MAX_VALUE,m=-Number.MAX_VALUE,g=!1,x=t.shadowState.shadowsEnabled,y=Number.MAX_VALUE,v=-Number.MAX_VALUE,$=Number.MAX_VALUE,b=t.mode===C$14.SCENE3D?t.occluder:void 0,T=t.cullingVolume,C=H$d.planes,S=0;S<5;++S)C[S]=T.planes[S];T=H$d;for(var w=u.length,E=0;E<w;++E){var P=u[E];if(e.terrainProvider.isShowGlobe||!0!==P.invalid){var A=P.pass;if(A===Le$q.COMPUTE)o.push(P);else if(A===Le$q.LOG_DEPTH_OVERLAY)s.push(P),e.updateDerivedCommands(P);else if(A===Le$q.OVERLAY)a.push(P),e.updateDerivedCommands(P);else if(A===Le$q.OVERLAY_AGAINST_DEPTH)l.push(P),e.updateDerivedCommands(P);else{var L=P.boundingVolume;if(e$2e(L)){if(!e.isVisible(P,T,b))continue;if(o$c=L.computePlaneDistances(r,n,o$c),_=Math.min(_,o$c.start),m=Math.max(m,o$c.stop),x&&P.receiveShadows&&o$c.start<C$Z.MAXIMUM_DISTANCE&&!(A===Le$q.GLOBE&&o$c.start<-100&&o$c.stop>100)){var M=o$c.stop-o$c.start;A!==Le$q.GLOBE&&o$c.start<100&&($=Math.min($,M));var R=Math.max(o$c.start,C$Z.NEAR_PLANE);y=Math.min(y,R),v=Math.max(v,o$c.stop)}}else o$c.start=i.frustum.near,o$c.stop=i.frustum.far,g=!(P instanceof t$W);bt$2(e,this,P,o$c)}}}g?(_=i.frustum.near,m=i.frustum.far):(_=Math.min(Math.max(_,i.frustum.near),i.frustum.far),_=t.useLogDepth?_:Math.max(_,1),m=Math.max(Math.min(m,i.frustum.far),_),x&&(y=Math.min(Math.max(y,i.frustum.near),i.frustum.far),v=Math.max(Math.min(v,i.frustum.far),y+1))),x&&!t.passes.pick&&(t.shadowState.nearPlane=Math.max(y,.1),t.shadowState.farPlane=v,t.shadowState.closestObjectSize=$);var O,D=e.mode===C$14.SCENE2D,I=t.useLogDepth,F=I?e.logarithmicDepthFarToNearRatio:e.farToNearRatio;!t.useLogDepth&&t.context.depthTexture&&(t.passes.fbo||t._isDepth||e.compositor.isScanEnable())&&(F=e.logarithmicDepthFarToNearRatio,_=Math.max(_,1)),D?(m=Math.min(m,i.position.z+e.nearToFarDistance2D),_=Math.min(_,m),O=Math.ceil(Math.max(1,m-_)/e.nearToFarDistance2D)):O=Math.ceil(Math.log(m/_)/Math.log(F)),(this.updateFrustums||_!==Number.MAX_VALUE&&(O!==h||0!==c.length&&(_<c[0].near||m>c[h-1].far&&(I||!e$2d.equalsEpsilon(m,c[h-1].far,e$2d.EPSILON8)))))&&(this.updateFrustums=!1,Y$6(_,m,F,O,I,c,D,e.nearToFarDistance2D),this.createPotentiallyVisibleSet(e));var B=t.frustumSplits;B.length=O+1;for(var N=0;N<O;++N)B[N]=c[N].near,N===O-1&&(B[N+1]=c[N].far)},L$c.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickPointFramebuffer=this.pickPointFramebuffer&&this.pickPointFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.normalFramebuffer=this.normalFramebuffer&&this.normalFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy(),this.globeTranslucencyFramebuffer=this.globeTranslucencyFramebuffer&&this.globeTranslucencyFramebuffer.destroy();var e,t,i=this.pickDepths,n=this.debugGlobeDepths;for(t=i.length,e=0;e<t;++e)i[e].destroy();for(t=n.length,e=0;e<t;++e)n[e].destroy()};var J$5=.1,wt$3=new a$g({pass:ue$e.MOST_DETAILED_PRELOAD}),yt$2=new a$g({pass:ue$e.MOST_DETAILED_PICK}),b$g=new a$g({pass:ue$e.PICK});function d$g(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;var t=new f$1a(0,0,1,1),i=new v$K(e);i.frustum=new a$V({width:J$5,aspectRatio:1,near:.1}),this._pickOffscreenView=new L$c(e,i,t)}d$g.prototype.update=function(){this._pickPositionCacheDirty=!0},d$g.prototype.getPickDepth=function(e,t){var i=e.view.pickDepths,n=i[t];return e$2e(n)||(n=new f$d,i[t]=n),n};var kt$2=new l$11,Ct$2=new o$1p,M$b=new o$1p,Pt$2=new o$1o,Dt$3=new p$1d;function St(e,t,i,n,r){var o=e.camera,a=o.frustum;e$2e(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2*(t.x-r.x)/r.width-1;s*=.5*(a.right-a.left);var l=2*(r.height-t.y-r.y)/r.height-1;l*=.5*(a.top-a.bottom);var u=p$1d.clone(o.transform,Dt$3);o._setTransform(p$1d.IDENTITY);var c=o$1p.clone(o.position,Ct$2);o$1p.multiplyByScalar(o.right,s,M$b),o$1p.add(M$b,c,c),o$1p.multiplyByScalar(o.up,l,M$b),o$1p.add(M$b,c,c),o._setTransform(u),e.mode===C$14.SCENE2D&&o$1p.fromElements(c.z,c.x,c.y,c);var h=a.getPixelDimensions(r.width,r.height,1,1,Pt$2),d=kt$2;return d.right=.5*h.x,d.left=-d.right,d.top=.5*h.y,d.bottom=-d.top,d.near=a.near,d.far=a.far,d.computeCullingVolume(c,o.directionWC,o.upWC)}var Ft$3=new l$10,Rt$4=new o$1o;function Ot$2(e,t,i,n,r){var o=e.camera,a=o.frustum,s=a.near,l=Math.tan(.5*a.fovy),u=a.aspectRatio*l,c=(2*(t.x-r.x)/r.width-1)*s*u,h=(2*(r.height-t.y-r.y)/r.height-1)*s*l,d=a.getPixelDimensions(r.width,r.height,1,1,Rt$4),f=d.x*i*.5,p=d.y*n*.5,_=Ft$3;return _.top=h+p,_.bottom=h-p,_.right=c+f,_.left=c-f,_.near=s,_.far=a.far,_.computeCullingVolume(o.positionWC,o.directionWC,o.upWC)}function Q$5(e,t,i,n,r){var o=e.camera.frustum;return o instanceof a$V||o instanceof l$11?St(e,t,i,n,r):Ot$2(e,t,i,n,r)}var R$a=3,V$a=3,P$c=new f$1a(0,0,R$a,V$a),$$7=new o$1o,G$b=new e$1X(0,0,0,0);function Ht$2(e,t){var i=e.context,n=e.frameState,r=e.environmentState,o=e.defaultView;e.view=o;var a=o.viewport;a.x=0,a.y=0,a.width=i.drawingBufferWidth,a.height=i.drawingBufferHeight;var s=o.passState;s.viewport=f$1a.clone(a,s.viewport),e.clearPasses(n.passes),n.passes.pick=!0,n.passes.depth=!0,n.cullingVolume=Q$5(e,t,1,1,a),n.tilesetPassState=b$g,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,s=o.pickDepthFramebuffer.update(i,t,a),e.updateAndExecuteCommands(s,G$b),e.resolveFramebuffers(s),i.endFrame()}d$g.prototype.pick=function(e,t,i,n){if(!e$2e(t))throw new t$15("windowPosition is undefined.");R$a=u$Z(i,3),V$a=u$Z(n,R$a);var r=e.context,o=r.uniformState,a=e.frameState,s=e.defaultView;e.view=s;var l=s.viewport;l.x=0,l.y=0,l.width=r.drawingBufferWidth,l.height=r.drawingBufferHeight;var u=s.passState;u.viewport=f$1a.clone(l,u.viewport);var c=s$R.transformWindowToDrawingBuffer(e,t,$$7);e.jobScheduler.disableThisFrame(),e.updateFrameState(),a.cullingVolume=Q$5(e,c,R$a,V$a,l),a.invertClassification=!1,a.passes.pick=!0,a.tilesetPassState=b$g,o.update(a),e.updateEnvironment(),P$c.x=c.x-.5*(R$a-1),P$c.y=e.drawingBufferHeight-c.y-.5*(V$a-1),P$c.width=R$a,P$c.height=V$a,u=s.pickFramebuffer.begin(P$c,s.viewport),e.updateAndExecuteCommands(u,G$b),e.resolveFramebuffers(u);var h=s.pickFramebuffer.end(P$c);return r.endFrame(),h};var xt$3=new o$15,_t$3=new l$10,Vt$3=new a$V,Mt$3=new l$11;d$g.prototype.pickPositionWorldCoordinates=function(e,t,i){if(e.useDepthPicking){if(!e$2e(t))throw new t$15("windowPosition is undefined.");if(!e.context.depthTexture)throw new t$15("Picking from the depth buffer is not supported. Check pickPositionSupported.");var n=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n))return o$1p.clone(this._pickPositionCache[n],i);var r=e.frameState,o=e.context,a=o.uniformState,s=e.defaultView;e.view=s;var l=s$R.transformWindowToDrawingBuffer(e,t,$$7);e.pickTranslucentDepth?Ht$2(e,l):(e.updateFrameState(),a.update(r),e.updateEnvironment()),l.y=e.drawingBufferHeight-l.y;var u,c=e.camera;u=e$2e(c.frustum.fov)?c.frustum.clone(xt$3):e$2e(c.frustum.infiniteProjectionMatrix)?c.frustum.clone(_t$3):e$2e(c.frustum.width)?c.frustum.clone(Vt$3):c.frustum.clone(Mt$3);for(var h=s.frustumCommandsList,d=h.length,f=0;f<d;++f){var p=this.getPickDepth(e,f).getDepth(o,l.x,l.y);if(p>0&&p<1){var _,m=h[f];return e.mode===C$14.SCENE2D?(_=c.position.z,c.position.z=_-m.near+1,u.far=Math.max(1,m.far-m.near),u.near=1,a.update(r),a.updateFrustum(u)):(u.near=m.near*(0!==f?e.opaqueFrustumNearOffset:1),u.far=m.far,a.updateFrustum(u)),i=s$R.drawingBufferToWgs84Coordinates(e,l,p,i),e.mode===C$14.SCENE2D&&(c.position.z=_,a.update(r)),this._pickPositionCache[n]=o$1p.clone(i),i}}this._pickPositionCache[n]=void 0}};var Nt$3=new a$18;function j$a(e,t){var i,n,r=[],o=[],a=[],s=[];e$2e(e)||(e=Number.MAX_VALUE);for(var l=t();e$2e(l);){var u=l.object,c=l.position,h=l.exclude;if(e$2e(c)&&!e$2e(u)){r.push(l);break}if(!e$2e(u)||!e$2e(u.primitive)||!h&&(r.push(l),0>=--e))break;var d=u.primitive,f=!1;"function"==typeof d.getGeometryInstanceAttributes&&e$2e(u.id)&&(e$2e(n=d.getGeometryInstanceAttributes(u.id))&&e$2e(n.show)&&(f=!0,n.show=e$1I.toValue(!1,n.show),a.push(n))),u instanceof e$M&&(f=!0,u.show=!1,s.push(u)),f||(d.show=!1,o.push(d)),l=t()}for(i=0;i<o.length;++i)o[i].show=!0;for(i=0;i<a.length;++i)(n=a[i]).show=e$1I.toValue(!0,n.show);for(i=0;i<s.length;++i)s[i].show=!0;return r}d$g.prototype.pickPosition=function(e,t,i){if(e$2e(i=this.pickPositionWorldCoordinates(e,t,i))&&e.mode!==C$14.SCENE3D){o$1p.fromElements(i.y,i.z,i.x,i);var n=e.mapProjection,r=n.ellipsoid,o=n.unproject(i,Nt$3);r.cartographicToCartesian(o,i)}return i},d$g.prototype.drillPick=function(e,t,i,n,r){var o=this,a=j$a(i,(function(){var i=o.pick(e,t,n,r);if(e$2e(i))return{object:i,position:void 0,exclude:!1}}));return a.map((function(e){return e.object}))};var tt$4=new o$1p,Wt$3=new o$1p;function Et$3(e,t,i){this.ray=e,this.width=t,this.tilesets=i,this.ready=!1,this.deferred=o$1l.defer(),this.promise=this.deferred.promise}function rt$6(e,t,i,n){var r=t.direction,o=o$1p.mostOrthogonalAxis(r,tt$4),a=o$1p.cross(r,o,tt$4),s=o$1p.cross(r,a,Wt$3);return n.position=t.origin,n.direction=r,n.up=s,n.right=a,n.frustum.width=u$Z(i,J$5),n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC)}function Tt$2(e,t,i){var n=t.frameState,r=i.ray,o=i.width,a=i.tilesets,s=e._pickOffscreenView.camera,l=rt$6(e,r,o,s),u=wt$3;u.camera=s,u.cullingVolume=l;for(var c=!0,h=a.length,d=0;d<h;++d){var f=a[d];f.show&&t.primitives.contains(f)&&(f.updateForPass(n,u),c=c&&u.ready)}return c&&i.deferred.resolve(),c}function et$5(e,t,i){for(var n=e.length,r=0;r<n;++r){var o=e.get(r);o.show&&(e$2e(o.isCesium3DTileset)?(!e$2e(t)||-1===t.indexOf(o))&&i.push(o):o instanceof o$y&&et$5(o,t,i))}}function N$6(e,t,i,n,r,o){var a=[];if(et$5(t.primitives,n,a),0===a.length)return o$1l.resolve(o());var s=new Et$3(i,r,a);return e._mostDetailedRayPicks.push(s),s.promise.then((function(){return o()}))}function At$2(e,t){return!(!e$2e(e)||!e$2e(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function It$3(e,t,i,n,r,o,a){var s=t.context,l=s.uniformState,u=t.frameState,c=e._pickOffscreenView;t.view=c,rt$6(e,i,r,c.camera),P$c=f$1a.clone(c.viewport,P$c);var h=c.pickFramebuffer.begin(P$c,c.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),u.invertClassification=!1,u.passes.pick=!0,u.passes.offscreen=!0,c.updateFrustums=!0,u.tilesetPassState=a?yt$2:b$g,l.update(u),t.updateEnvironment(),t.updateAndExecuteCommands(h,G$b),t.resolveFramebuffers(h);var d,f=c.pickFramebuffer.end(s);if(t.context.depthTexture)for(var p=c.frustumCommandsList.length,_=0;_<p;++_){var m=e.getPickDepth(t,_).getDepth(s,0,0);if(m>0&&m<1){var g=c.frustumCommandsList[_],x=g.near*(0!==_?t.opaqueFrustumNearOffset:1),y=x+m*(g.far-x);d=f$19.getPoint(i,y);break}}if(t.view=t.defaultView,s.endFrame(),e$2e(f)||e$2e(d))return{object:f,position:d,exclude:!e$2e(d)&&o||At$2(f,n)}}function it$4(e,t,i,n,r,o,a,s){return j$a(n,(function(){return It$3(e,t,i,r,o,a,s)}))}function O$9(e,t,i,n,r,o,a){var s=it$4(e,t,i,1,n,r,o,a);if(s.length>0)return s[0]}function at$6(e,t,i,n,r,o,a,s){return it$4(e,t,i,n,r,o,a,s)}function W$a(e,t){var i=o$1l.defer();return t.then((function(t){var n=e.postRender.addEventListener((function(){i.resolve(t),n()}));e.requestRender()})).otherwise((function(e){i.reject(e)})),i.promise}d$g.prototype.updateMostDetailedRayPicks=function(e){for(var t=this._mostDetailedRayPicks,i=0;i<t.length;++i)Tt$2(this,e,t[i])&&t.splice(i--,1)},d$g.prototype.pickFromRay=function(e,t,i,n){if(o$1q.defined("ray",t),e.mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");return O$9(this,e,t,i,n,!1,!1)},d$g.prototype.drillPickFromRay=function(e,t,i,n,r){if(o$1q.defined("ray",t),e.mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");return at$6(this,e,t,i,n,r,!1,!1)},d$g.prototype.pickFromRayMostDetailed=function(e,t,i,n){if(o$1q.defined("ray",t),e.mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");var r=this;return t=f$19.clone(t),i=e$2e(i)?i.slice():i,W$a(e,N$6(r,e,t,i,n,(function(){return O$9(r,e,t,i,n,!1,!0)})))},d$g.prototype.drillPickFromRayMostDetailed=function(e,t,i,n,r){if(o$1q.defined("ray",t),e.mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");var o=this;return t=f$19.clone(t),n=e$2e(n)?n.slice():n,W$a(e,N$6(o,e,t,n,r,(function(){return at$6(o,e,t,i,n,r,!1,!0)})))};var Bt$4=new o$1p,Lt$2=new o$1p,zt$2=new f$19,ot$4=new a$18;function K$7(e,t){var i=e.globe,n=e$2e(i)?i.ellipsoid:e.mapProjection.ellipsoid,r=e$1H._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,Lt$2),a=a$18.toCartesian(t,n,Bt$4),s=zt$2;s.origin=a,s.direction=o;var l=new f$19;return f$19.getPoint(s,r,l.origin),o$1p.negate(o,l.direction),l}function nt$5(e,t){var i=e.globe,n=e$2e(i)?i.ellipsoid:e.mapProjection.ellipsoid;return K$7(e,a$18.fromCartesian(t,n,ot$4))}function ft$2(e,t){var i=e.globe,n=e$2e(i)?i.ellipsoid:e.mapProjection.ellipsoid;return a$18.fromCartesian(t,n,ot$4).height}function qt$3(e,t,i,n,r){var o=K$7(t,i);return N$6(e,t,o,n,r,(function(){var i=O$9(e,t,o,n,r,!0,!0);if(e$2e(i))return ft$2(t,i.position)}))}function bt$1(e,t,i,n,r,o){var a=nt$5(t,i);return N$6(e,t,a,n,r,(function(){var i=O$9(e,t,a,n,r,!0,!0);if(e$2e(i))return o$1p.clone(i.position,o)}))}function M$a(e){if(this._positions=u$Z(e,[new o$1p,new o$1p,new o$1p]),this.boundingSphere=i$1d.fromPoints(e),e$2e(e)){var t=U$18.fromPositions({positions:e,perPositionHeight:!0});this._geometry=U$18.createGeometry(t),this._triangleArrayByWeight=S$7(this)}this._density=1}d$g.prototype.sampleHeight=function(e,t,i,n){if(o$1q.defined("position",t),e.mode!==C$14.SCENE3D)throw new t$15("sampleHeight is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new t$15("sampleHeight requires depth texture support. Check sampleHeightSupported.");var r=O$9(this,e,K$7(e,t),i,n,!0,!1);if(e$2e(r))return ft$2(e,r.position)},d$g.prototype.clampToHeight=function(e,t,i,n,r){if(o$1q.defined("cartesian",t),e.mode!==C$14.SCENE3D)throw new t$15("clampToHeight is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new t$15("clampToHeight requires depth texture support. Check clampToHeightSupported.");var o=O$9(this,e,nt$5(e,t),i,n,!0,!1);if(e$2e(o))return o$1p.clone(o.position,r)},d$g.prototype.sampleHeightMostDetailed=function(e,t,i,n){if(o$1q.defined("positions",t),e.mode!==C$14.SCENE3D)throw new t$15("sampleHeightMostDetailed is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new t$15("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");i=e$2e(i)?i.slice():i;for(var r=t.length,o=new Array(r),a=0;a<r;++a)o[a]=qt$3(this,e,t[a],i,n);return W$a(e,o$1l.all(o).then((function(e){for(var i=e.length,n=0;n<i;++n)t[n].height=e[n];return t})))},d$g.prototype.clampToHeightMostDetailed=function(e,t,i,n){if(o$1q.defined("cartesians",t),e.mode!==C$14.SCENE3D)throw new t$15("clampToHeightMostDetailed is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new t$15("clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported.");i=e$2e(i)?i.slice():i;for(var r=t.length,o=new Array(r),a=0;a<r;++a)o[a]=bt$1(this,e,t[a],i,n,t[a]);return W$a(e,o$1l.all(o).then((function(e){for(var i=e.length,n=0;n<i;++n)t[n]=e[n];return t})))},d$g.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()},Object.defineProperties(M$a.prototype,{type:{get:function(){return"Polygon"}},positions:{get:function(){return this._positions},set:function(e){if(e$2e(e)){this._positions=e;var t=U$18.fromPositions({positions:this._positions,perPositionHeight:!0});this._geometry=U$18.createGeometry(t),this._triangleArrayByWeight=S$7(this),this.boundingSphere=i$1d.fromPoints(e),e$2e(this.owner)&&(this.owner._updateParticlePool=!0)}}},density:{set:function(e){e!==this._density&&(this._density=e,e$2e(this.owner)&&(this.owner._updateParticlePool=!0))},get:function(){return this._density}},areaFactor:{get:function(){return this._density*this._area/100|0}}});var l$c=new o$1p,_$b=new o$1p,x$9=new o$1p;function S$7(e){var t,i,n=e._geometry,r=n.indices,o=r.length/3,a=n.attributes.position.values,s=[],l=0;for(t=0;t<o;t++){var u=r[3*t],c=r[3*t+1],h=r[3*t+2];l$c.x=a[3*u],l$c.y=a[3*u+1],l$c.z=a[3*u+2],_$b.x=a[3*c],_$b.y=a[3*c+1],_$b.z=a[3*c+2],x$9.x=a[3*h],x$9.y=a[3*h+1],x$9.z=a[3*h+2];var d=j$9(l$c,_$b,x$9);l+=d,s.push(d)}e._area=l;var f=Math.max(100,10*o),p=[];for(t=0;t<o;t++){var _=Math.floor(s[t]/l*f);for(_=Math.max(1,_),i=0;i<_;i++)p.push(t)}return p}var b$f=new o$1p,W$9=new o$1p,z$7=new o$1p;function j$9(e,t,i){return b$f=o$1p.subtract(t,e,b$f),W$9=o$1p.subtract(i,e,W$9),z$7=o$1p.cross(b$f,W$9,z$7),.5*o$1p.magnitude(z$7)}function C$b(e,t,i,n,r){return(1-Math.sqrt(e))*i+Math.sqrt(e)*(1-t)*n+Math.sqrt(e)*t*r}M$a.prototype.emit=function(e){if(e$2e(this._geometry)){var t=Math.floor(e$2d.randomBetween(0,this._triangleArrayByWeight.length)),i=this._triangleArrayByWeight[t],n=this._geometry.indices[3*i],r=this._geometry.indices[3*i+1],o=this._geometry.indices[3*i+2],a=this._geometry.attributes.position.values,s=a[3*n],l=a[3*n+1],u=a[3*n+2],c=a[3*r],h=a[3*r+1],d=a[3*r+2],f=a[3*o],p=a[3*o+1],_=a[3*o+2],m=e$2d.randomBetween(0,1),g=e$2d.randomBetween(0,1),x=C$b(m,g,s,c,f),y=C$b(m,g,l,h,p),v=C$b(m,g,u,d,_);e.position=o$1p.fromElements(x,y,v,e.position),e.velocity=o$1p.normalize(e.position,e.velocity)}};var b$e="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See:\n\nvoid main()\n{\n vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n\n#ifdef AUTO_EXPOSURE\n color /= texture2D(autoExposure, vec2(0.5)).r;\n#endif\n float g = 0.985;\n\n float a = 0.065;\n float b = 0.0001;\n float c = 0.433;\n float d = 0.238;\n\n color = (color * (color + a) - b) / (color * (g * color + c) + d);\n\n color = clamp(color, 0.0, 1.0);\n color = czm_inverseGamma(color);\n gl_FragColor = vec4(color, fragmentColor.a);\n}\n",A$e="uniform sampler2D randomTexture;\nuniform sampler2D depthTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\n\nvarying vec2 v_textureCoordinates;\n\nvec4 clipToEye(vec2 uv, float depth)\n{\n vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\n vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\n posEC = posEC / posEC.w;\n return posEC;\n}\n\n//Reconstruct Normal Without Edge Removation\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\n vec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\n vec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\n vec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\n vec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\n\n vec3 up = posInCamera.xyz - posInCameraUp.xyz;\n vec3 down = posInCameraDown.xyz - posInCamera.xyz;\n vec3 left = posInCamera.xyz - posInCameraLeft.xyz;\n vec3 right = posInCameraRight.xyz - posInCamera.xyz;\n\n vec3 DX = length(left) < length(right) ? left : right;\n vec3 DY = length(up) < length(down) ? up : down;\n\n return normalize(cross(DY, DX));\n}\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 posInCamera = clipToEye(v_textureCoordinates, depth);\n\n if (posInCamera.z > frustumLength)\n {\n gl_FragColor = vec4(1.0);\n return;\n }\n\n vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\n float depthU = czm_readDepth(depthTexture, v_textureCoordinates - vec2(0.0, pixelSize.y));\n float depthD = czm_readDepth(depthTexture, v_textureCoordinates + vec2(0.0, pixelSize.y));\n float depthL = czm_readDepth(depthTexture, v_textureCoordinates - vec2(pixelSize.x, 0.0));\n float depthR = czm_readDepth(depthTexture, v_textureCoordinates + vec2(pixelSize.x, 0.0));\n vec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\n\n float ao = 0.0;\n vec2 sampleDirection = vec2(1.0, 0.0);\n float gapAngle = 90.0 * czm_radiansPerDegree;\n\n // RandomNoise\n float randomVal = texture2D(randomTexture, v_textureCoordinates).x;\n\n //Loop for each direction\n for (int i = 0; i < 4; i++)\n {\n float newGapAngle = gapAngle * (float(i) + randomVal);\n float cosVal = cos(newGapAngle);\n float sinVal = sin(newGapAngle);\n\n //Rotate Sampling Direction\n vec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\n float localAO = 0.0;\n float localStepSize = stepSize;\n\n //Loop for each step\n for (int j = 0; j < 6; j++)\n {\n vec2 newCoords = v_textureCoordinates + rotatedSampleDirection * localStepSize * pixelSize;\n\n //Exception Handling\n if(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n {\n break;\n }\n\n float stepDepthInfo = czm_readDepth(depthTexture, newCoords);\n vec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\n vec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\n float len = length(diffVec);\n\n if (len > lengthCap)\n {\n break;\n }\n\n float dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\n float weight = len / lengthCap;\n weight = 1.0 - weight * weight;\n\n if (dotVal < bias)\n {\n dotVal = 0.0;\n }\n\n localAO = max(localAO, dotVal * weight);\n localStepSize += stepSize;\n }\n ao += localAO;\n }\n\n ao /= 4.0;\n ao = 1.0 - clamp(ao, 0.0, 1.0);\n ao = pow(ao, intensity);\n gl_FragColor = vec4(vec3(ao), 1.0);\n}\n",T$d="uniform sampler2D colorTexture;\nuniform sampler2D ambientOcclusionTexture;\nuniform bool ambientOcclusionOnly;\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 color = texture2D(colorTexture, v_textureCoordinates).rgb;\n vec3 ao = texture2D(ambientOcclusionTexture, v_textureCoordinates).rgb;\n gl_FragColor.rgb = ambientOcclusionOnly ? ao : ao * color;\n}\n",w$7="uniform sampler2D colorTexture;\nuniform float gradations;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n#ifdef CZM_SELECTED_FEATURE\n if (czm_selected()) {\n gl_FragColor = vec4(rgb, 1.0);\n return;\n }\n#endif\n float luminance = czm_luminance(rgb);\n float darkness = luminance * gradations;\n darkness = (darkness - fract(darkness)) / gradations;\n gl_FragColor = vec4(vec3(darkness), 1.0);\n}\n",z$6="uniform sampler2D colorTexture;\nuniform sampler2D bloomTexture;\nuniform bool glowOnly;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n\n#ifdef CZM_SELECTED_FEATURE\n if (czm_selected()) {\n gl_FragColor = color;\n return;\n }\n#endif\n\n vec4 bloom = texture2D(bloomTexture, v_textureCoordinates);\n gl_FragColor = glowOnly ? bloom : bloom + color;\n}\n",E$a="uniform sampler2D colorTexture;\nuniform float brightness;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n vec3 target = vec3(0.0);\n gl_FragColor = vec4(mix(target, rgb, brightness), 1.0);\n}\n",C$a="uniform sampler2D colorTexture;\nuniform float contrast;\nuniform float brightness;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 sceneColor = texture2D(colorTexture, v_textureCoordinates).xyz;\n sceneColor = czm_RGBToHSB(sceneColor);\n sceneColor.z += brightness;\n sceneColor = czm_HSBToRGB(sceneColor);\n\n float factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));\n sceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);\n gl_FragColor = vec4(sceneColor, 1.0);\n}\n",F$a="uniform sampler2D colorTexture;\nuniform sampler2D blurTexture;\nuniform sampler2D depthTexture;\nuniform float focalDistance;\n\nvarying vec2 v_textureCoordinates;\n\nvec4 toEye(vec2 uv, float depth)\n{\n vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\n vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera = posInCamera / posInCamera.w;\n return posInCamera;\n}\n\nfloat computeDepthBlur(float depth)\n{\n float f;\n if (depth < focalDistance)\n {\n f = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);\n }\n else\n {\n f = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);\n f = pow(f, 0.1);\n }\n f *= f;\n f = clamp(f, 0.0, 1.0);\n return pow(f, 0.5);\n}\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 posInCamera = toEye(v_textureCoordinates, depth);\n float d = computeDepthBlur(-posInCamera.z);\n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), texture2D(blurTexture, v_textureCoordinates), d);\n}\n",R$9="uniform sampler2D depthTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n gl_FragColor = vec4(vec3(depth), 1.0);\n}\n",P$b="uniform sampler2D depthTexture;\nuniform float length;\nuniform vec4 color;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n float directions[3];\n directions[0] = -1.0;\n directions[1] = 0.0;\n directions[2] = 1.0;\n\n float scalars[3];\n scalars[0] = 3.0;\n scalars[1] = 10.0;\n scalars[2] = 3.0;\n\n float padx = czm_pixelRatio / czm_viewport.z;\n float pady = czm_pixelRatio / czm_viewport.w;\n\n#ifdef CZM_SELECTED_FEATURE\n bool selected = false;\n for (int i = 0; i < 3; ++i)\n {\n float dir = directions[i];\n selected = selected || czm_selected(vec2(-padx, dir * pady));\n selected = selected || czm_selected(vec2(padx, dir * pady));\n selected = selected || czm_selected(vec2(dir * padx, -pady));\n selected = selected || czm_selected(vec2(dir * padx, pady));\n if (selected)\n {\n break;\n }\n }\n if (!selected)\n {\n gl_FragColor = vec4(color.rgb, 0.0);\n return;\n }\n#endif\n\n float horizEdge = 0.0;\n float vertEdge = 0.0;\n\n for (int i = 0; i < 3; ++i)\n {\n float dir = directions[i];\n float scale = scalars[i];\n\n horizEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;\n horizEdge += texture2D(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;\n\n vertEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;\n vertEdge += texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;\n }\n\n float len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);\n gl_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);\n}\n",O$8="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See slides 142 and 143:\n// http://www.gdcvault.com/play/1012459/Uncharted_2__HDR_Lighting\n\nvoid main()\n{\n vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n\n#ifdef AUTO_EXPOSURE\n float exposure = texture2D(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n\n\tconst float A = 0.22; // shoulder strength\n\tconst float B = 0.30; // linear strength\n\tconst float C = 0.10; // linear angle\n\tconst float D = 0.20; // toe strength\n\tconst float E = 0.01; // toe numerator\n\tconst float F = 0.30; // toe denominator\n\n\tconst float white = 11.2; // linear white point value\n\n\tvec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;\n\tfloat w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;\n\n\tc = czm_inverseGamma(c / w);\n\tgl_FragColor = vec4(c, fragmentColor.a);\n}\n",D$7="varying vec2 v_textureCoordinates;\n\nuniform sampler2D colorTexture;\n\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\n\nvoid main()\n{\n vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\n vec4 color = FxaaPixelShader(\n v_textureCoordinates,\n colorTexture,\n fxaaQualityRcpFrame,\n fxaaQualitySubpix,\n fxaaQualityEdgeThreshold,\n fxaaQualityEdgeThresholdMin);\n float alpha = texture2D(colorTexture, v_textureCoordinates).a;\n gl_FragColor = vec4(color.rgb, alpha);\n}",U$8="uniform sampler2D colorTexture;\nuniform sampler2D dirtTexture;\nuniform sampler2D starTexture;\nuniform vec2 dirtTextureDimensions;\nuniform float distortion;\nuniform float ghostDispersal;\nuniform float haloWidth;\nuniform float dirtAmount;\nuniform float earthRadius;\nuniform float intensity;\n\nvarying vec2 v_textureCoordinates;\n\n// whether it is in space or not\n// 6500000.0 is empirical value\n#define DISTANCE_TO_SPACE 6500000.0\n\n// return ndc from world coordinate biased earthRadius\nvec4 getNDCFromWC(vec3 WC, float earthRadius)\n{\n vec4 positionEC = czm_view * vec4(WC, 1.0);\n positionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);\n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n return czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n}\n\n// Check if current pixel is included Earth\n// if then mask it gradually\nfloat isInEarth(vec2 texcoord, vec2 sceneSize)\n{\n vec2 NDC = texcoord * 2.0 - 1.0;\n vec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);\n vec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);\n NDC.xy -= earthPosSC.xy;\n\n float X = abs(NDC.x) * sceneSize.x;\n float Y = abs(NDC.y) * sceneSize.y;\n\n return clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));\n}\n\n// For Chromatic effect\nvec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)\n{\n vec2 sceneSize = czm_viewport.zw;\n vec3 color;\n if(isSpace)\n {\n color.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture2D(tex, texcoord + direction * distortion.r).r;\n color.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture2D(tex, texcoord + direction * distortion.g).g;\n color.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture2D(tex, texcoord + direction * distortion.b).b;\n }\n else\n {\n color.r = texture2D(tex, texcoord + direction * distortion.r).r;\n color.g = texture2D(tex, texcoord + direction * distortion.g).g;\n color.b = texture2D(tex, texcoord + direction * distortion.b).b;\n }\n return vec4(clamp(color, 0.0, 1.0), 0.0);\n}\n\nvoid main(void)\n{\n vec4 originalColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 rgb = originalColor.rgb;\n bool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;\n\n // Sun position\n vec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);\n vec4 sunPositionEC = czm_view * sunPos;\n vec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);\n sunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);\n\n // If sun is not in the screen space, use original color.\n if(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))\n {\n // Lens flare is disabled when not in space until #5932 is fixed.\n gl_FragColor = originalColor;\n return;\n }\n\n vec2 texcoord = vec2(1.0) - v_textureCoordinates;\n vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\n vec2 invPixelSize = 1.0 / pixelSize;\n vec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);\n\n // ghost vector to image centre:\n vec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;\n vec3 direction = normalize(vec3(ghostVec, 0.0));\n\n // sample ghosts:\n vec4 result = vec4(0.0);\n vec4 ghost = vec4(0.0);\n for (int i = 0; i < 4; ++i)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n // Only bright spots from the centre of the source image\n ghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);\n }\n result += ghost;\n\n // sample halo\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n float weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weightForHalo = pow(1.0 - weightForHalo, 5.0);\n\n result += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;\n\n // dirt on lens\n vec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;\n if (dirtTexCoords.x > 1.0)\n {\n dirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);\n }\n if (dirtTexCoords.y > 1.0)\n {\n dirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);\n }\n result += dirtAmount * texture2D(dirtTexture, dirtTexCoords);\n\n // Rotating starburst texture's coordinate\n // dot(czm_view[0].xyz, vec3(0.0, 0.0, 1.0)) + dot(czm_view[1].xyz, vec3(0.0, 1.0, 0.0))\n float camrot = czm_view[0].z + czm_view[1].y;\n float cosValue = cos(camrot);\n float sinValue = sin(camrot);\n mat3 rotation = mat3(\n cosValue, -sinValue, 0.0,\n sinValue, cosValue, 0.0,\n 0.0, 0.0, 1.0\n );\n\n vec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);\n vec3 st2 = vec3((rotation * st1).xy, 1.0);\n vec3 st3 = st2 * 0.5 + vec3(0.5);\n vec2 lensStarTexcoord = st3.xy;\n float weightForLensFlare = length(vec3(sunPos.xy, 0.0));\n float oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);\n\n if (!isSpace)\n {\n result *= oneMinusWeightForLensFlare * intensity * 0.2;\n }\n else\n {\n result *= oneMinusWeightForLensFlare * intensity;\n result *= texture2D(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;\n }\n\n result += texture2D(colorTexture, v_textureCoordinates);\n\n gl_FragColor = result;\n}\n",I$7="uniform sampler2D colorTexture;\nuniform vec3 white;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See equation 4:\n// http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf\n\nvoid main()\n{\n vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\n float exposure = texture2D(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n color = (color * (1.0 + color / white)) / (1.0 + color);\n color = czm_inverseGamma(color);\n gl_FragColor = vec4(color, fragmentColor.a);\n}\n",X$7="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n float noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;\n vec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n vec3 green = vec3(0.0, 1.0, 0.0);\n gl_FragColor = vec4((noiseValue + rgb) * green, 1.0);\n}\n",Y$5="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See equation 3:\n// http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf\n\nvoid main()\n{\n vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\n float exposure = texture2D(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n color = color / (1.0 + color);\n color = czm_inverseGamma(color);\n gl_FragColor = vec4(color, fragmentColor.a);\n}\n",M$9="uniform sampler2D colorTexture;\nuniform sampler2D silhouetteTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 silhouetteColor = texture2D(silhouetteTexture, v_textureCoordinates);\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n gl_FragColor = mix(color, silhouetteColor, silhouetteColor.a);\n}\n",G$a="uniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nuniform float scale;\n\nvoid main ()\n{\n vec4 oriColor = texture2D(colorTexture, v_textureCoordinates);\n vec4 fogColor = vec4(0.8, 0.8, 0.8, 0.5);\n float depth = texture2D(depthTexture, v_textureCoordinates).r;\n float f = (depth - 0.7) * min(1.0, max(scale, 0.0)) / 0.2;\n gl_FragColor = mix(oriColor, fogColor, clamp(f, 0.0, 1.0));\n}",j$8="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nuniform float speed;\nuniform float angle;\n\nfloat hash(float x){\n return fract(sin(x * 133.3) * 13.13);\n}\n\nvoid main(void){\n float time = czm_frameNumber / 60.0;\n vec2 resolution = czm_viewport.zw;\n vec2 uv = (gl_FragCoord.xy * 2.0 - resolution.xy) / min(resolution.x, resolution.y);\n vec3 c = vec3(0.6, 0.7, 0.8);\n float a = angle;\n float si = sin(a);\n float co = cos(a);\n uv *= mat2(co, -si, si, co);\n uv *= length(uv + vec2(0.0, 4.9)) * 0.3 + 1.0;\n float v = 1.0 - sin(hash(floor(uv.x * 100.0)) * 2.0);\n float b = clamp(abs(sin(speed * time * v + uv.y * (5.0 / (2.0 + v)))) - 0.95, 0.0, 1.0) * 20.0;\n c *= v * b;\n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c, 1.0), speed < 0.00001 ? 0.0 : 0.15);\n}",V$9="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nuniform int density;\nuniform float speed;\nuniform float angle;\n\nfloat snow(vec2 uv, float scale)\n{\n float time = czm_frameNumber / 60.0;\n float w = smoothstep(1.0 , 0.0, -uv.y * (scale / 10.0));\n if(w < 0.1) return 0.0; // 雪花消失\n uv += time / scale; // 随时间移动\n uv.y += time * cos(angle) * speed / scale;\n uv.x += sin(uv.y + time * sin(angle) * speed) / scale; // 左右摇摆\n uv *= scale;\n vec2 s = floor(uv);\n vec2 f = fract(uv);\n vec2 p;\n float k = 3.0;\n float d;\n p = 0.5 + 0.35 * sin(11.0 * fract(sin((s + p + scale) * mat2(7, 3, 6, 5)) * 5.0)) - f;\n d = length(p);\n k = min(d, k);\n k = smoothstep(0.0, k, sin(f.x + f.y) * 0.01);\n return k * w * clamp(float(density) / 5.0, 1.0, 5.0);\n}\n\n\nvoid main(void){\n vec2 resolution = czm_viewport.zw;\n vec2 uv = (gl_FragCoord.xy * 2.0 - resolution.xy) / min(resolution.x, resolution.y);\n vec3 finalColor = vec3(0);\n float c = 0.0;\n for (int i = 2; i < 5; i++) {\n if (density < i) {\n break;\n }\n c += snow(uv, float(i));\n }\n for (int i = 6; i < 10; i+= 2) {\n if (density < i) {\n break;\n }\n c += snow(uv, float(i));\n }\n for (int i = 15; i < 30; i+= 5) {\n if (density < i) {\n break;\n }\n c += snow(uv, float(i));\n }\n finalColor = vec3(c);\n if(c > 0.8)\n {\n finalColor = vec3(max(5.0, c));\n }\n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor, 1.0), 0.15);\n}",W$8="#define SMOOTH_STEPS 5\n#define REFLECTION_SAMPLES 64\n#define RIGHT_HANDED_SCENE\nuniform sampler2D colorTexture;\nuniform sampler2D reflectivitySampler;\nuniform sampler2D normalSampler;\nuniform sampler2D positionSampler;\nuniform float stepSize;\nuniform float strength;\nuniform float threshold;\nuniform float roughnessFactor;\nuniform float reflectionSpecularFalloffExponent;\nvarying vec2 v_textureCoordinates;\n\n// Structs\nstruct ReflectionInfo {\n vec3 color;\n vec4 coords;\n};\n// According to specular, see https://en.wikipedia.org/wiki/Schlick%27s_approximation\nvec3 fresnelSchlick(float cosTheta, vec3 F0)\n{\n return F0 + (1.0 - F0) * pow(1.0 - cosTheta, 5.0);\n}\n// Once the pixel's coordinates has been found, let's adjust (smooth) a little bit by sampling multiple reflection pixels.\nReflectionInfo smoothReflectionInfo(vec3 dir, vec3 hitCoord)\n{\n ReflectionInfo info;\n info.color = vec3(0.0);\n vec4 projectedCoord;\n float sampledDepth;\n for(int i = 0; i < SMOOTH_STEPS; i++)\n {\n projectedCoord = czm_projection * vec4(hitCoord, 1.0);\n projectedCoord.xy /= projectedCoord.w;\n projectedCoord.xy = 0.5 * projectedCoord.xy + vec2(0.5);\n sampledDepth = (czm_view * texture2D(positionSampler, projectedCoord.xy)).z;\n float depth = sampledDepth - hitCoord.z;\n dir *= 0.5;\n if(depth > 0.0)\n hitCoord -= dir;\n else\n hitCoord += dir;\n info.color += texture2D(colorTexture, projectedCoord.xy).rgb;\n }\n projectedCoord = czm_projection * vec4(hitCoord, 1.0);\n projectedCoord.xy /= projectedCoord.w;\n projectedCoord.xy = 0.5 * projectedCoord.xy + vec2(0.5);\n // Merge colors\n info.coords = vec4(projectedCoord.xy, sampledDepth, 1.0);\n info.color += texture2D(colorTexture, projectedCoord.xy).rgb;\n info.color /= float(SMOOTH_STEPS + 1);\n return info;\n}\n\n//Tests the given world position (hitCoord) according to the given reflection vector (dir)\n// until it finds a collision (means that depth is enough close to say it‘s the pixel to sample!).\nReflectionInfo getReflectionInfo(vec3 dir, vec3 hitCoord)\n{\n vec3 endPos = hitCoord + dir;\n vec4 projetedEndPos = czm_projection * vec4(endPos, 1.0);\n projetedEndPos/= projetedEndPos.w;\n projetedEndPos.xyz = 0.5 * projetedEndPos.xyz + vec3(0.5);\n vec4 projectedStartPos = czm_projection * vec4(hitCoord, 1.0);\n projectedStartPos /= projectedStartPos.w;\n projectedStartPos.xyz = 0.5 * projectedStartPos.xyz + vec3(0.5);\n vec4 projectedDir = projetedEndPos - projectedStartPos;\n float step = 1.0 / length(projectedDir.xyz);\n ReflectionInfo info;\n vec4 projectedCoord;\n float sampledDepth;\n float stepOffset = (v_textureCoordinates * czm_viewport.zw, 1.0) * step;\n dir *= stepOffset * stepSize;\n bool found = false;\n for(int i = 0; i < REFLECTION_SAMPLES; i++)\n {\n hitCoord += dir;\n projectedCoord = czm_projection * vec4(hitCoord, 1.0);\n projectedCoord.xy /= projectedCoord.w;\n projectedCoord.xy = 0.5 * projectedCoord.xy + vec2(0.5);\n sampledDepth = texture2D(positionSampler, projectedCoord.xy).z;\n float depth = sampledDepth - hitCoord.z;\n#ifdef RIGHT_HANDED_SCENE\n depth *= -1.0;\n#endif\n\n vec3 curColor = texture2D(colorTexture, vec2(projectedCoord.x, projectedCoord.y)).rgb;\n vec4 curCoords = vec4(projectedCoord.xy, sampledDepth, 0.0);\n if(((depth - dir.z) < threshold) && depth <= 0.0 && !found)\n {\n info.color = curColor;\n info.coords = curCoords;\n found = true;\n }\n }\n\n vec3 lastColor = texture2D(colorTexture, vec2(projectedCoord.x, projectedCoord.y)).rgb;\n vec4 lastCoords = vec4(projectedCoord.xy, sampledDepth, 0.0);\n if(!found){\n info.color = lastColor;\n info.coords = lastCoords;\n }\n return info;\n}\n\nvec3 hash(vec3 a)\n{\n a = fract(a * 0.8);\n a += dot(a, a.yxz + 19.19);\n return fract((a.xxy + a.yxx) * a.zyx);\n}\nvoid main(void){\n // Intensity\n vec4 albedoFull = texture2D(colorTexture, v_textureCoordinates);\n vec3 albedo = albedoFull.rgb;\n float spec = texture2D(reflectivitySampler, v_textureCoordinates).r;\n float isSpecValid = 1.0;\n if (spec == 0.0) {\n isSpecValid = 0.0;\n }\n\n // Get coordinates of the pixel to pick according to the pixel's position and normal.\n vec3 normal = (texture2D(normalSampler, v_textureCoordinates)).xyz;\n vec3 position = texture2D(positionSampler, v_textureCoordinates).xyz;\n vec3 reflected = normalize(reflect(normalize(position), normalize(normal)));\n\n float roughness = 1.0 - texture2D(reflectivitySampler, v_textureCoordinates).a;\n vec3 jitt = mix(vec3(0.0), hash(position), roughness) * roughnessFactor;\n\n ReflectionInfo info = getReflectionInfo(jitt + reflected, position);\n //ReflectionInfo info = getReflectionInfo(reflected, position); // For debug: no roughness\n\n vec2 dCoords = smoothstep(0.2, 0.6, abs(vec2(0.5, 0.5) - info.coords.xy));\n float screenEdgefactor = clamp(1.0 - (dCoords.x + dCoords.y), 0.0, 1.0);\n\n // Fresnel\n vec3 F0 = vec3(0.04);\n F0 = mix(F0, albedo, spec);\n vec3 fresnel = fresnelSchlick(max(dot(normalize(normal), normalize(position)), 0.0), F0);\n\n#ifdef RIGHT_HANDED_SCENE\n reflected.z *= -1.0;\n#endif\n // Apply\n float reflectionMultiplier = clamp(pow(spec * strength, reflectionSpecularFalloffExponent) * screenEdgefactor * reflected.z, 0.0, 0.9);\n float albedoMultiplier = 1.0 - reflectionMultiplier;\n vec3 SSR = info.color * fresnel;\n\n //gl_FragColor = vec4(SSR, reflectionMultiplier);\n gl_FragColor = vec4((albedo * albedoMultiplier) + (SSR.xyz * reflectionMultiplier), 1.0);\n}",H$c="uniform sampler2D screenSpaceReflectionTexture;\nuniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 albedoFull = texture2D(colorTexture, v_textureCoordinates);\n vec3 albedo = albedoFull.rgb;\n vec4 SSR = texture2D(screenSpaceReflectionTexture, v_textureCoordinates);\n float reflectionMultiplier = SSR.a;\n float albedoMultiplier = 1.0 - reflectionMultiplier;\n gl_FragColor = vec4((albedo * albedoMultiplier) + (SSR.xyz * reflectionMultiplier), albedoFull.a);\n}",i$b={};function S$6(e){var t="#define USE_STEP_SIZE\n"+y$M,i=new p$h({name:e+"_x_direction",fragmentShader:t,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:e$j.LINEAR}),n=new p$h({name:e+"_y_direction",fragmentShader:t,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:e$j.LINEAR}),r={};return Object.defineProperties(r,{delta:{get:function(){return i.uniforms.delta},set:function(e){var t=i.uniforms,r=n.uniforms;t.delta=r.delta=e}},sigma:{get:function(){return i.uniforms.sigma},set:function(e){var t=i.uniforms,r=n.uniforms;t.sigma=r.sigma=e}},stepSize:{get:function(){return i.uniforms.stepSize},set:function(e){var t=i.uniforms,r=n.uniforms;t.stepSize=r.stepSize=e}}}),new s$f({name:e,stages:[i,n],uniforms:r})}function K$6(e){if(!e$2e(e))return i$b.createEdgeDetectionStage();for(var t=new s$f({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),i={},n="",r="",o=0;o<e.length;++o)n+="uniform sampler2D edgeTexture"+o+"; \n",r+=" vec4 edge"+o+" = texture2D(edgeTexture"+o+", v_textureCoordinates); \n if (edge"+o+".a > 0.0) \n { \n color = edge"+o+"; \n break; \n } \n",i["edgeTexture"+o]=e[o].name;return new s$f({name:"czm_edge_detection_composite",stages:[t,new p$h({name:"czm_edge_detection_combine",fragmentShader:n+"varying vec2 v_textureCoordinates; \nvoid main() { \n vec4 color = vec4(0.0); \n for (int i = 0; i < "+e.length+"; i++) \n { \n"+r+" } \n gl_FragColor = color; \n} \n",uniforms:i})]})}i$b.createBlurStage=function(){return S$6("czm_blur")},i$b.createDepthOfFieldStage=function(){var e=S$6("czm_depth_of_field_blur"),t=new p$h({name:"czm_depth_of_field_composite",fragmentShader:F$a,uniforms:{focalDistance:5,blurTexture:e.name}}),i={};return Object.defineProperties(i,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(e){t.uniforms.focalDistance=e}},delta:{get:function(){return e.uniforms.delta},set:function(t){e.uniforms.delta=t}},sigma:{get:function(){return e.uniforms.sigma},set:function(t){e.uniforms.sigma=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}}}),new s$f({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:i})},i$b.isDepthOfFieldSupported=function(e){return e.context.depthTexture},i$b.createEdgeDetectionStage=function(){return new p$h({name:"czm_edge_detection_"+e$1T(),fragmentShader:P$b,uniforms:{length:.25,color:e$1X.clone(e$1X.BLACK)}})},i$b.isEdgeDetectionSupported=function(e){return e.context.depthTexture},i$b.createSilhouetteStage=function(e){var t=K$6(e);return new s$f({name:"czm_silhouette",stages:[t,new p$h({name:"czm_silhouette_color_edges",fragmentShader:M$9,uniforms:{silhouetteTexture:t.name}})],inputPreviousStageTexture:!1,uniforms:t.uniforms})},i$b.isSilhouetteSupported=function(e){return e.context.depthTexture},i$b.createBloomStage=function(){var e=new p$h({name:"czm_bloom_contrast_bias",fragmentShader:C$a,uniforms:{contrast:128,brightness:-.3}}),t=S$6("czm_bloom_blur"),i=new s$f({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),n=new p$h({name:"czm_bloom_generate_composite",fragmentShader:z$6,uniforms:{glowOnly:!1,bloomTexture:i.name}}),r={};return Object.defineProperties(r,{glowOnly:{get:function(){return n.uniforms.glowOnly},set:function(e){n.uniforms.glowOnly=e}},contrast:{get:function(){return e.uniforms.contrast},set:function(t){e.uniforms.contrast=t}},brightness:{get:function(){return e.uniforms.brightness},set:function(t){e.uniforms.brightness=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}}}),new s$f({name:"czm_bloom",stages:[i,n],inputPreviousStageTexture:!1,uniforms:r})},i$b.createAmbientOcclusionStage=function(){var e=new p$h({name:"czm_ambient_occlusion_generate",fragmentShader:A$e,uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=S$6("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;var i=new s$f({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),n=new p$h({name:"czm_ambient_occlusion_composite",fragmentShader:T$d,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:i.name}}),r={};return Object.defineProperties(r,{intensity:{get:function(){return e.uniforms.intensity},set:function(t){e.uniforms.intensity=t}},bias:{get:function(){return e.uniforms.bias},set:function(t){e.uniforms.bias=t}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(t){e.uniforms.lengthCap=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}},frustumLength:{get:function(){return e.uniforms.frustumLength},set:function(t){e.uniforms.frustumLength=t}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(t){e.uniforms.randomTexture=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},blurStepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}},ambientOcclusionOnly:{get:function(){return n.uniforms.ambientOcclusionOnly},set:function(e){n.uniforms.ambientOcclusionOnly=e}}}),new s$f({name:"czm_ambient_occlusion",stages:[i,n],inputPreviousStageTexture:!1,uniforms:r})},i$b.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var Z$8="#define FXAA_QUALITY_PRESET 39 \n#define FXAA_QUALITY_PS 12 \n#define FXAA_QUALITY_P0 1.0 \n#define FXAA_QUALITY_P1 1.0 \n#define FXAA_QUALITY_P2 1.0 \n#define FXAA_QUALITY_P3 1.0 \n#define FXAA_QUALITY_P4 1.0 \n#define FXAA_QUALITY_P5 1.5 \n#define FXAA_QUALITY_P6 2.0 \n#define FXAA_QUALITY_P7 2.0 \n#define FXAA_QUALITY_P8 2.0 \n#define FXAA_QUALITY_P9 2.0 \n#define FXAA_QUALITY_P10 4.0 \n#define FXAA_QUALITY_P11 8.0 \n"+k$K+"\n"+D$7,q$9=L$U;i$b.createFXAAStage=function(e){return new p$h({name:"czm_FXAA",fragmentShader:e.webgpu?q$9:Z$8,sampleMode:e$j.LINEAR})},i$b.createSnowStage=function(){return new p$h({name:"czm_SnowEffect",fragmentShader:V$9,uniforms:{density:5,angle:.1,speed:2},sampleMode:e$j.LINEAR})},i$b.createRainStage=function(){return new p$h({name:"czm_RainEffect",fragmentShader:j$8,uniforms:{speed:20,angle:-.4},sampleMode:e$j.LINEAR})},i$b.createFogStage=function(){return new p$h({name:"czm_FogEffect",fragmentShader:G$a,uniforms:{scale:1},sampleMode:e$j.LINEAR})},i$b.createAcesTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_aces",fragmentShader:t+=b$e,uniforms:{autoExposure:void 0}})},i$b.createFilmicTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_filmic",fragmentShader:t+=O$8,uniforms:{autoExposure:void 0}})},i$b.createReinhardTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_reinhard",fragmentShader:t+=Y$5,uniforms:{autoExposure:void 0}})},i$b.createModifiedReinhardTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_modified_reinhard",fragmentShader:t+=I$7,uniforms:{white:e$1X.WHITE,autoExposure:void 0}})},i$b.createAutoExposureStage=function(){return new a$h},i$b.createBlackAndWhiteStage=function(){return new p$h({name:"czm_black_and_white",fragmentShader:w$7,uniforms:{gradations:5}})},i$b.createBrightnessStage=function(){return new p$h({name:"czm_brightness",fragmentShader:E$a,uniforms:{brightness:.5}})},i$b.createNightVisionStage=function(){return new p$h({name:"czm_night_vision",fragmentShader:X$7})},i$b.createDepthViewStage=function(){return new p$h({name:"czm_depth_view",fragmentShader:R$9})},i$b.createLensFlareStage=function(){return new p$h({name:"czm_lens_flare",fragmentShader:U$8,uniforms:{dirtTexture:n$17("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:n$17("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,earthRadius:t$12.WGS84.maximumRadius}})},i$b.createOutlineStage=function(){var e=new p$h({name:"outline_copy",fragmentShader:ie$7}),t=new p$h({name:"outline_downSample",fragmentShader:["varying vec2 v_textureCoordinates;","void main()","{","gl_FragColor = texture2D(czm_maskTexture, v_textureCoordinates);","}"].join("\n"),textureScale:.5}),i=new p$h({name:"outline_edgeDetection",fragmentShader:["varying vec2 v_textureCoordinates;","uniform sampler2D colorTexture;","uniform vec2 colorTextureDimensions;","uniform vec3 visibleEdgeColor;","uniform vec3 hiddenEdgeColor;","void main() {","vec2 invSize = 1.0 / vec2(colorTextureDimensions.x, colorTextureDimensions.y);","vec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize);","vec4 c1 = texture2D( colorTexture, v_textureCoordinates + uvOffset.xy);","vec4 c2 = texture2D( colorTexture, v_textureCoordinates - uvOffset.xy);","vec4 c3 = texture2D( colorTexture, v_textureCoordinates + uvOffset.yw);","vec4 c4 = texture2D( colorTexture, v_textureCoordinates - uvOffset.yw);","float diff1 = (c1.r - c2.r)*0.5;","float diff2 = (c3.r - c4.r)*0.5;","float d = length( vec2(diff1, diff2) );","float a1 = min(c1.g, c2.g);","float a2 = min(c3.g, c4.g);","float visibilityFactor = min(a1, a2);","vec3 edgeColor = 1.0 - visibilityFactor > 0.001 ? visibleEdgeColor : hiddenEdgeColor;","gl_FragColor = vec4(edgeColor,1.0) * vec4(d);","}"].join("\n"),textureScale:.5,uniforms:{visibleEdgeColor:new e$1X(1,1,1),hiddenEdgeColor:new e$1X(.1,.04,.02)},sampleMode:e$j.LINEAR});i.visibleEdgeColor=new e$1X,i.hiddenEdgeColor=new e$1X;var n=["varying vec2 v_textureCoordinates;","uniform sampler2D colorTexture;","uniform vec2 colorTextureDimensions;","uniform vec2 direction;","uniform float kernelRadius;","float gaussianPdf(in float x, in float sigma) {","return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;","}","void main() {","vec2 invSize = 1.0 / colorTextureDimensions;","float weightSum = gaussianPdf(0.0, kernelRadius);","vec3 diffuseSum = texture2D( colorTexture, v_textureCoordinates).rgb * weightSum;","vec2 delta = direction * invSize * kernelRadius/float(4);","vec2 uvOffset = delta;","for( int i = 1; i <= 4; i ++ ) {","float w = gaussianPdf(uvOffset.x, kernelRadius);","vec3 sample1 = texture2D( colorTexture, v_textureCoordinates + uvOffset).rgb;","vec3 sample2 = texture2D( colorTexture, v_textureCoordinates - uvOffset).rgb;","diffuseSum += ((sample1 + sample2) * w);","weightSum += (2.0 * w);","uvOffset += delta;","}","gl_FragColor = vec4(diffuseSum/weightSum, 1.0);","}"].join("\n"),r=new p$h({name:"outline_blurHalf_X",fragmentShader:n,textureScale:.5,uniforms:{direction:{x:1,y:0},kernelRadius:1},sampleMode:e$j.LINEAR}),o=new p$h({name:"outline_blurHalf_Y",fragmentShader:n,textureScale:.5,uniforms:{direction:{x:0,y:1},kernelRadius:1},sampleMode:e$j.LINEAR}),a=new p$h({name:"outline_blurQuarter_X",fragmentShader:n,textureScale:.25,uniforms:{direction:{x:1,y:0},kernelRadius:4},sampleMode:e$j.LINEAR}),s=new p$h({name:"outline_blurQuarter_Y",fragmentShader:n,textureScale:.25,uniforms:{direction:{x:0,y:1},kernelRadius:4},sampleMode:e$j.LINEAR}),l=new p$h({name:"outline_overlayStage",fragmentShader:["varying vec2 v_textureCoordinates;","uniform sampler2D edgeTexture1;","uniform sampler2D edgeTexture2;","uniform float edgeStrength;","uniform float edgeGlow;","void main() {","vec4 edgeValue1 = texture2D(edgeTexture1, v_textureCoordinates);","vec4 edgeValue2 = texture2D(edgeTexture2, v_textureCoordinates);","vec4 maskColor = texture2D(czm_maskTexture, v_textureCoordinates);","vec4 edgeValue = edgeValue1 + edgeValue2 * edgeGlow;","vec4 finalColor = edgeStrength * maskColor.r * edgeValue;","gl_FragColor = finalColor;","}"].join("\n"),uniforms:{edgeStrength:3,edgeGlow:0,edgeTexture1:"outline_blurHalf_Y",edgeTexture2:"outline_blurQuarter_Y"},blendingState:Ee$r.ADDITIVE_BLEND,sampleMode:e$j.LINEAR}),u={};return Object.defineProperties(u,{visibleEdgeColor:{get:function(){return i.uniforms.visibleEdgeColor},set:function(e){i.uniforms.visibleEdgeColor=e$1X.clone(e)}},hiddenEdgeColor:{get:function(){return i.hiddenEdgeColor},set:function(e){i.uniforms.hiddenEdgeColor=e$1X.clone(e)}},edgeStrength:{get:function(){return l.uniforms.edgeStrength},set:function(e){l.uniforms.edgeStrength=e}},edgeGlow:{get:function(){return l.uniforms.edgeGlow},set:function(e){l.uniforms.edgeGlow=e}},edgeThickness:{get:function(){return r.uniforms.kernelRadius},set:function(e){r.uniforms.kernelRadius=e,o.uniforms.kernelRadius=e}}}),new s$f({name:"outline_overlay",stages:[e,t,i,r,o,a,s,l],inputPreviousStageTexture:!0,uniforms:u})},i$b.createScreenSpaceReflectionStage=function(e){var t=new p$h({name:"czm_Screen_Space_Reflection_Stage",fragmentShader:W$8,uniforms:{stepSize:1,strength:1,threshold:1.2,roughnessFactor:.2,reflectionSpecularFalloffExponent:3},sampleMode:e$j.LINEAR,prepassRenderer:e}),i=S$6("czm_Screen_Space_Reflection_blur");i.uniforms.stepSize=.35;var n=new s$f({name:"czm_Screen_Space_Reflection_Generate_blur",stages:[t,i]});new p$h({name:"czm_Screen_Space_Reflection_composite",fragmentShader:H$c,uniforms:{screenSpaceReflectionTexture:n.name},sampleMode:e$j.LINEAR,prepassRenderer:e});var r={};return Object.defineProperties(r,{stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}},strength:{get:function(){return t.uniforms.strength},set:function(e){t.uniforms.strength=e}},threshold:{get:function(){return t.uniforms.threshold},set:function(e){t.uniforms.threshold=e}},roughnessFactor:{get:function(){return t.uniforms.roughnessFactor},set:function(e){t.uniforms.roughnessFactor=e}},reflectionSpecularFalloffExponent:{get:function(){return t.uniforms.reflectionSpecularFalloffExponent},set:function(e){t.uniforms.reflectionSpecularFalloffExponent=e}}}),new s$f({name:"czm_Screen_Space_Reflection",stages:[t],inputPreviousStageTexture:!1,uniforms:r})};var I$6={REINHARD:0,MODIFIED_REINHARD:1,FILMIC:2,ACES:3,validate:function(e){return e===I$6.REINHARD||e===I$6.MODIFIED_REINHARD||e===I$6.FILMIC||e===I$6.ACES}},M$8=Object.freeze(I$6),T$c="precision highp float;\nprecision highp int;\nattribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvoid SMAAEdgeDetectionVS(vec2 texcoord) {\n fOffset[0] = texcoord.xyxy + u_resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );\n fOffset[1] = texcoord.xyxy + u_resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );\n fOffset[2] = texcoord.xyxy + u_resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 );\n}\nvoid main()\n{\n gl_Position = aPosition;\n v_textureCoordinates = textureCoordinates;\n SMAAEdgeDetectionVS(textureCoordinates);\n}",z$5="precision highp float;\nprecision highp int;\n#define SMAA_THRESHOLD 0.05\n#define SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR 2\n#define SMAA_USE_COLOR_EDGE_DETECTION 1\nuniform sampler2D inputColorTexture;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3]) {\n vec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );\n vec4 delta;\n vec3 C = texture2D( inputColorTexture, texcoord ).rgb;\n vec3 Cleft = texture2D( inputColorTexture, offset[0].xy ).rgb;\n vec3 t = abs( C - Cleft );\n delta.x = max( max( t.r, t.g ), t.b );\n vec3 Ctop = texture2D( inputColorTexture, offset[0].zw ).rgb;\n t = abs( C - Ctop );\n delta.y = max( max( t.r, t.g ), t.b );\n vec2 edges = step( threshold, delta.xy );\n vec3 Cright = texture2D( inputColorTexture, offset[1].xy ).rgb;\n vec3 Cbottom = texture2D( inputColorTexture, offset[1].zw ).rgb;\n vec3 Cleftleft = texture2D( inputColorTexture, offset[2].xy ).rgb;\n vec3 Ctoptop = texture2D( inputColorTexture, offset[2].zw ).rgb;\n \n if ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )\n discard;\n t = abs( C - Cright );\n delta.z = max( max( t.r, t.g ), t.b );\n \n t = abs( C - Cbottom );\n delta.w = max( max( t.r, t.g ), t.b );\n float maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );\n \n t = abs( C - Cleftleft );\n delta.z = max( max( t.r, t.g ), t.b );\n \n t = abs( C - Ctoptop );\n delta.w = max( max( t.r, t.g ), t.b );\n maxDelta = max( max( maxDelta, delta.z ), delta.w );\n edges.xy *= step( maxDelta, float(SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR) * delta.xy );\n return vec4( edges, 0.0, 0.0 );\n}\nvoid main()\n{\n gl_FragColor = SMAAColorEdgeDetectionPS( v_textureCoordinates, fOffset);\n}",F$9="precision highp float;\nprecision highp int;\n#define SMAA_MAX_SEARCH_STEPS 8\nattribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvarying vec2 fPixCoord;\nvoid SMAABlendingWeightCalculationVS( vec2 texcoord ) {\n fPixCoord = texcoord / u_resolution;\n fOffset[ 0 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 );\n fOffset[ 1 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 );\n fOffset[ 2 ] = vec4( fOffset[ 0 ].xz, fOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * u_resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );\n}\nvoid main()\n{\n gl_Position = aPosition;\n v_textureCoordinates = textureCoordinates;\n SMAABlendingWeightCalculationVS( textureCoordinates );\n}",C$9="precision highp float;\nprecision highp int;\n#define SMAA_MAX_SEARCH_STEPS 8\n#define SMAA_AREATEX_MAX_DISTANCE 16\n#define SMAA_AREATEX_PIXEL_SIZE ( 1.0 / vec2( 160.0, 560.0 ) )\n#define SMAA_AREATEX_SUBTEX_SIZE ( 1.0 / 7.0 )\nuniform sampler2D tEdges;\nuniform sampler2D tArea;\nuniform sampler2D tSearch;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvarying vec2 fPixCoord;\nvec4 SMAASampleLevelZeroOffset(vec2 coord, ivec2 offset ){\n return texture2D( tEdges, coord + float( offset ) * u_resolution, 0.0 );\n}\n\nvec2 myRound( vec2 x ) {\n return sign( x ) * floor( abs( x ) + 0.5 );\n}\n\nfloat SMAASearchLength(vec2 e, float bias, float scale ) {\n e.r = bias + e.r * scale;\n return 255.0 * texture2D( tSearch, e, 0.0 ).r;\n}\nfloat SMAASearchXLeft(vec2 texcoord, float end ) {\n vec2 e = vec2( 0.0, 1.0 );\n bool found = false;\n for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\n vec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\n if(!found){\n texcoord -= vec2( 2.0, 0.0 ) * u_resolution;\n e = pixel;\n }\n if(!found && ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 )){\n found = true;\n }\n }\n texcoord.x += 0.25 * u_resolution.x;\n texcoord.x += u_resolution.x;\n texcoord.x += 2.0 * u_resolution.x;\n texcoord.x -= u_resolution.x * SMAASearchLength(e, 0.0, 0.5);\n return texcoord.x;\n}\nfloat SMAASearchXRight(vec2 texcoord, float end ) {\n vec2 e = vec2( 0.0, 1.0 );\n bool found = false;\n for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\n vec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\n if(!found){\n texcoord += vec2( 2.0, 0.0 ) * u_resolution;\n e = pixel;\n }\n \n if (!found && ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) )\n {\n found = true;\n }\n }\n texcoord.x -= 0.25 * u_resolution.x;\n texcoord.x -= u_resolution.x;\n texcoord.x -= 2.0 * u_resolution.x;\n texcoord.x += u_resolution.x * SMAASearchLength(e, 0.5, 0.5 );\n return texcoord.x;\n}\nfloat SMAASearchYUp(vec2 texcoord, float end ) {\n vec2 e = vec2( 1.0, 0.0 );\n bool found = false;\n for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\n vec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\n if(!found){\n texcoord += vec2( 0.0, 2.0 ) * u_resolution;\n e = pixel;\n }\n \n if (!found && ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ){\n found = true;\n }\n }\n texcoord.y -= 0.25 * u_resolution.y;\n texcoord.y -= u_resolution.y;\n texcoord.y -= 2.0 * u_resolution.y;\n texcoord.y += u_resolution.y * SMAASearchLength(e.gr, 0.0, 0.5 );\n return texcoord.y;\n}\nfloat SMAASearchYDown(vec2 texcoord, float end ) {\n vec2 e = vec2( 1.0, 0.0 );\n bool found = false;\n for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\n vec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\n if(!found){\n texcoord -= vec2( 0.0, 2.0 ) * u_resolution;\n e = pixel;\n }\n \n if (!found && ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) {\n found = true;\n }\n }\n texcoord.y += 0.25 * u_resolution.y;\n texcoord.y += u_resolution.y;\n texcoord.y += 2.0 * u_resolution.y;\n texcoord.y -= u_resolution.y * SMAASearchLength(e.gr, 0.5, 0.5 );\n return texcoord.y;\n}\nvec2 SMAAArea(vec2 dist, float e1, float e2, float offset ) {\n vec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * myRound( 4.0 * vec2( e1, e2 ) ) + dist;\n texcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );\n texcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;\n return texture2D( tArea, texcoord, 0.0 ).rg;\n}\nvec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], ivec4 subsampleIndices ) {\n vec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );\n vec2 e = texture2D( tEdges, texcoord ).rg;\n vec2 weightRG = vec2(0.0, 0.0);\n vec2 weightBA = vec2(0.0, 0.0);\n {\n vec2 d;\n vec2 coords;\n coords.x = SMAASearchXLeft(offset[ 0 ].xy, offset[ 2 ].x );\n coords.y = offset[ 1 ].y;\n d.x = coords.x;\n float e1 = texture2D( tEdges, coords, 0.0 ).r;\n coords.x = SMAASearchXRight( offset[ 0 ].zw, offset[ 2 ].y );\n d.y = coords.x;\n d = d / u_resolution.x - pixcoord.x;\n vec2 sqrt_d = sqrt( abs( d ) );\n coords.y -= 1.0 * u_resolution.y;\n float e2 = SMAASampleLevelZeroOffset( coords, ivec2( 1, 0 ) ).r;\n weightRG = SMAAArea(sqrt_d, e1, e2, float( subsampleIndices.y ) );\n }\n\n {\n vec2 d;\n vec2 coords;\n coords.y = SMAASearchYUp(offset[ 1 ].xy, offset[ 2 ].z );\n coords.x = offset[ 0 ].x;\n d.x = coords.y;\n float e1 = texture2D( tEdges, coords, 0.0 ).g;\n coords.y = SMAASearchYDown(offset[ 1 ].zw, offset[ 2 ].w );\n d.y = coords.y;\n d = d / u_resolution.y - pixcoord.y;\n vec2 sqrt_d = sqrt( abs( d ) );\n coords.y -= 1.0 * u_resolution.y;\n float e2 = SMAASampleLevelZeroOffset( coords, ivec2( 0, 1 ) ).g;\n weightBA = SMAAArea(sqrt_d, e1, e2, float( subsampleIndices.x ) );\n }\n\n if ( e.g > 0.0 ) {\n weights.rg = weightRG;\n }\n if ( e.r > 0.0 ) {\n weights.ba = weightBA;\n }\n return weights;\n}\nvoid main()\n{\n gl_FragColor = SMAABlendingWeightCalculationPS(v_textureCoordinates, fPixCoord, fOffset, ivec4(0.0));\n}",P$a="precision highp float;\nprecision highp int;\nattribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[2];\nvoid SMAANeighborhoodBlendingVS( vec2 texcoord ) {\n fOffset[ 0 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );\n fOffset[ 1 ] = texcoord.xyxy + u_resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );\n}\nvoid main()\n{\n gl_Position = aPosition;\n v_textureCoordinates = textureCoordinates;\n SMAANeighborhoodBlendingVS(textureCoordinates);\n}",W$7="precision highp float;\nprecision highp int;\n#define SMAA_DEBUG_SPLIT_VIEW 0\nuniform vec2 u_resolution;\nuniform sampler2D tBlendWeights;\nuniform sampler2D tColor;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[2];\nvec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 inOffset[ 2 ] ) {\n vec4 a;\n a.xz = texture2D( tBlendWeights, texcoord ).xz;\n a.y = texture2D( tBlendWeights, inOffset[ 1 ].zw ).g;\n a.w = texture2D( tBlendWeights, inOffset[ 1 ].xy ).a;\n vec4 currentColor = texture2D( tColor, texcoord, 0.0 );\n\n vec2 offset;\n offset.x = a.a > a.b ? a.a : -a.b;\n offset.y = a.g > a.r ? -a.g : a.r;\n if ( abs( offset.x ) > abs( offset.y )) {\n offset.y = 0.0;\n } else {\n offset.x = 0.0;\n }\n vec4 C = currentColor;\n texcoord += sign( offset ) * u_resolution;\n vec4 Cop = texture2D( tColor, texcoord, 0.0 );\n float s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );\n C.xyz = pow(C.xyz, vec3(2.2));\n Cop.xyz = pow(Cop.xyz, vec3(2.2));\n vec4 mixed = mix(C, Cop, s);\n mixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));\n\n if ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {\n return currentColor;\n } else {\n return mixed;\n }\n}\nvoid main()\n{\n gl_FragColor = SMAANeighborhoodBlendingPS( v_textureCoordinates, fOffset);\n}";function i$a(){this._edgeDetectionCommand=void 0,this._weightCalculationCommand=void 0,this._neighborhoodBlendingCommand=void 0,this._upSamplePassState=new n$$,this.enabled=!1,this.ready=!0,this._inputTexture=void 0,this._edgeDetectionFBO=void 0,this._weightFBO=void 0,this._blendingFBO=void 0,this._searchTexture=void 0,this._areaTexture=void 0,this._clearCommand=new t$W({color:new e$1X(0,0,0,0)}),this._resolution=new o$1o}function j$7(){return new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}function H$b(){return new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}Object.defineProperties(i$a.prototype,{}),i$a.prototype.execute=function(e){var t=this._clearCommand;t.framebuffer=this._edgeDetectionFBO,t.execute(e),t.framebuffer=this._weightFBO,t.execute(e),t.framebuffer=this._blendingFBO,t.execute(e),this._edgeDetectionCommand.framebuffer=this._edgeDetectionFBO,this._edgeDetectionCommand.execute(e,this._upSamplePassState),this._weightCalculationCommand.framebuffer=this._weightFBO,this._weightCalculationCommand.execute(e,this._upSamplePassState),this._neighborhoodBlendingCommand.framebuffer=this._blendingFBO,this._neighborhoodBlendingCommand.execute(e,this._upSamplePassState)};var f$b=new f$1a;i$a.prototype.update=function(e){if(this.enabled){this._context=e;var t=e.drawingBufferWidth,i=e.drawingBufferHeight;this._resolution.x=1/t,this._resolution.y=1/i;var n=this;if(!e$2e(this._searchTexture)){var r=new Image;r.src=this.getSearchTexture(),r.onload=function(){n._searchTexture=new t$U({context:e,source:this,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,flipY:!1,sampler:j$7()})}}if(!e$2e(this._areaTexture)){var o=new Image;o.src=this.getAreaTexture(),o.onload=function(){n._areaTexture=new t$U({context:e,source:this,pixelFormat:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE,flipY:!1,sampler:H$b()})}}e$2e(this._edgeDetectionCommand)||this.createCommand(e);var a=this._edgeDetectionFBO,s=e$2e(a)&&a.getColorTexture(0)||void 0;if(!e$2e(s)||s.width!==t||s.height!==i){this.createFBO(t,i,e),f$b.width=t,f$b.height=i;var l=d$1m.fromCache({viewport:f$b});this._edgeDetectionCommand.renderState=l,this._weightCalculationCommand.renderState=l,this._neighborhoodBlendingCommand.renderState=l}this._upSamplePassState.context=e}},i$a.prototype.createCommand=function(e){this._edgeDetectionCommand=e.createCustomViewportQuadCommand(T$c,z$5,{shaderProgramName:"SMAAEdgeDetection",uniformMap:{},owner:this});var t=new s$V({name:"blendingWeightCalculationFS",sources:[C$9]});e.webgl2&&t.defines.push("WEBGL2"),this._weightCalculationCommand=e.createCustomViewportQuadCommand(F$9,t,{shaderProgramName:"SMAABlendingWeightCalculation",uniformMap:{},owner:this}),this._neighborhoodBlendingCommand=e.createCustomViewportQuadCommand(P$a,W$7,{shaderProgramName:"SMAANeighborhoodBlending",uniformMap:{},owner:this}),this.createUniformMap()},i$a.prototype.createUniformMap=function(){if(e$2e(this._edgeDetectionCommand)){var e=this;this._edgeDetectionCommand.uniformMap.inputColorTexture=function(){return e._inputTexture},this._edgeDetectionCommand.uniformMap.u_resolution=function(){return e._resolution},this._weightCalculationCommand.uniformMap.tEdges=function(){return e._edgeDetectionFBO.getColorTexture(0)},this._weightCalculationCommand.uniformMap.tArea=function(){return e$2e(e._areaTexture)?e._areaTexture:e._context.defaultTexture},this._weightCalculationCommand.uniformMap.tSearch=function(){return e$2e(e._searchTexture)?e._searchTexture:e._context.defaultTexture},this._weightCalculationCommand.uniformMap.u_resolution=function(){return e._resolution},this._neighborhoodBlendingCommand.uniformMap.tColor=function(){return e._inputTexture},this._neighborhoodBlendingCommand.uniformMap.tBlendWeights=function(){return e._weightFBO.getColorTexture(0)},this._neighborhoodBlendingCommand.uniformMap.u_resolution=function(){return e._resolution}}},i$a.prototype.createFBO=function(e,t,i){e$2e(this._edgeDetectionFBO)||this.destroyFBO();var n=_$_.UNSIGNED_BYTE;this._edgeDetectionFBO=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:V$12.RGBA})]}),this._weightFBO=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:V$12.RGBA})]}),this._blendingFBO=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:V$12.RGBA})]})},i$a.prototype.setInputTexture=function(e){this._inputTexture=e},i$a.prototype.getSMAATexture=function(){return this._blendingFBO.getColorTexture(0)},i$a.prototype.isDestroyed=function(){return!1},i$a.prototype.destroyFBO=function(){this._edgeDetectionFBO=this._edgeDetectionFBO&&!this._edgeDetectionFBO.isDestroyed()&&this._edgeDetectionFBO.destroy(),this._weightFBO=this._weightFBO&&!this._weightFBO.isDestroyed()&&this._weightFBO.destroy(),this._blendingFBO=this._blendingFBO&&!this._blendingFBO.isDestroyed()&&this._blendingFBO.destroy()},i$a.prototype.destroy=function(){return this.destroyFBO(),this._edgeDetectionCommand=this._edgeDetectionCommand&&this._edgeDetectionCommand.shaderProgram&&this._edgeDetectionCommand.shaderProgram.destroy(),this._weightCalculationCommand=this._weightCalculationCommand&&this._weightCalculationCommand.shaderProgram&&this._weightCalculationCommand.shaderProgram.destroy(),this._neighborhoodBlendingCommand=this._neighborhoodBlendingCommand&&this._neighborhoodBlendingCommand.shaderProgram&&this._neighborhoodBlendingCommand.shaderProgram.destroy(),i$11(this)},i$a.prototype.getAreaTexture=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAIAAACOVPcQAACBeklEQVR42u39W4xlWXrnh/3WWvuciIzMrKxrV8/0rWbY0+SQFKcb4owIkSIFCjY9AC1BT/LYBozRi+EX+cV+8IMsYAaCwRcBwjzMiw2jAWtgwC8WR5Q8mDFHZLNHTarZGrLJJllt1W2qKrsumZWZcTvn7L3W54e1vrXX3vuciLPPORFR1XE2EomorB0nVuz//r71re/y/1eMvb4Cb3N11xV/PP/2v4UBAwJG/7H8urx6/25/Gf8O5hypMQ0EEEQwAqLfoN/Z+97f/SW+/NvcgQk4sGBJK6H7N4PFVL+K+e0N11yNfkKvwUdwdlUAXPHHL38oa15f/i/46Ih6SuMSPmLAYAwyRKn7dfMGH97jaMFBYCJUgotIC2YAdu+LyW9vvubxAP8kAL8H/koAuOKP3+q6+xGnd5kdYCeECnGIJViwGJMAkQKfDvB3WZxjLKGh8VSCCzhwEWBpMc5/kBbjawT4HnwJfhr+pPBIu7uu+OOTo9vsmtQcniMBGkKFd4jDWMSCRUpLjJYNJkM+IRzQ+PQvIeAMTrBS2LEiaiR9b/5PuT6Ap/AcfAFO4Y3dA3DFH7/VS+M8k4baEAQfMI4QfbVDDGIRg7GKaIY52qAjTAgTvGBAPGIIghOCYAUrGFNgzA7Q3QhgCwfwAnwe5vDejgG44o/fbm1C5ZlYQvQDARPAIQGxCWBM+wWl37ZQESb4gImexGMDouhGLx1Cst0Saa4b4AqO4Hk4gxo+3DHAV/nx27p3JziPM2pVgoiia5MdEzCGULprIN7gEEeQ5IQxEBBBQnxhsDb5auGmAAYcHMA9eAAz8PBol8/xij9+C4Djlim4gJjWcwZBhCBgMIIYxGAVIkH3ZtcBuLdtRFMWsPGoY9rN+HoBji9VBYdwD2ZQg4cnO7OSq/z4rU5KKdwVbFAjNojCQzTlCLPFSxtamwh2jMUcEgg2Wm/6XgErIBhBckQtGN3CzbVacERgCnfgLswhnvqf7QyAq/z4rRZm1YglYE3affGITaZsdIe2FmMIpnOCap25I6jt2kCwCW0D1uAD9sZctNGXcQIHCkINDQgc78aCr+zjtw3BU/ijdpw3zhCwcaONwBvdeS2YZKkJNJsMPf2JKEvC28RXxxI0ASJyzQCjCEQrO4Q7sFArEzjZhaFc4cdv+/JFdKULM4px0DfUBI2hIsy06BqLhGTQEVdbfAIZXYMPesq6VoCHICzUyjwInO4Y411//LYLs6TDa9wvg2CC2rElgAnpTBziThxaL22MYhzfkghz6GAs2VHbbdM91VZu1MEEpupMMwKyVTb5ij9+u4VJG/5EgEMMmFF01cFai3isRbKbzb+YaU/MQbAm2XSMoUPAmvZzbuKYRIFApbtlrfFuUGd6vq2hXNnH78ZLh/iFhsQG3T4D1ib7k5CC6vY0DCbtrohgLEIClXiGtl10zc0CnEGIhhatLBva7NP58Tvw0qE8yWhARLQ8h4+AhQSP+I4F5xoU+VilGRJs6wnS7ruti/4KvAY/CfdgqjsMy4pf8fodQO8/gnuX3f/3xi3om1/h7THr+co3x93PP9+FBUfbNUjcjEmhcrkT+8K7ml7V10Jo05mpIEFy1NmCJWx9SIKKt+EjAL4Ez8EBVOB6havuT/rByPvHXK+9zUcfcbb254+9fydJknYnRr1oGfdaiAgpxu1Rx/Rek8KISftx3L+DfsLWAANn8Hvw0/AFeAGO9DFV3c6D+CcWbL8Dj9e7f+T1k8AZv/d7+PXWM/Z+VvdCrIvuAKO09RpEEQJM0Ci6+B4xhTWr4cZNOvhktabw0ta0rSJmqz3Yw5/AKXwenod7cAhTmBSPKf6JBdvH8IP17h95pXqw50/+BFnj88fev4NchyaK47OPhhtI8RFSvAfDSNh0Ck0p2gLxGkib5NJj/JWCr90EWQJvwBzO4AHcgztwAFN1evHPUVGwfXON+0debT1YeGON9Yy9/63X+OguiwmhIhQhD7l4sMqlG3D86Suc3qWZ4rWjI1X7u0Ytw6x3rIMeIOPDprfe2XzNgyj6PahhBjO4C3e6puDgXrdg+/5l948vF3bqwZetZ+z9Rx9zdIY5pInPK4Nk0t+l52xdK2B45Qd87nM8fsD5EfUhIcJcERw4RdqqH7Yde5V7m1vhNmtedkz6EDzUMF/2jJYWbC+4fzzA/Y+/8PPH3j9dcBAPIRP8JLXd5BpAu03aziOL3VVHZzz3CXWDPWd+SH2AnxIqQoTZpo9Ckc6HIrFbAbzNmlcg8Ag8NFDDAhbJvTBZXbC94P7t68EXfv6o+21gUtPETU7bbkLxvNKRFG2+KXzvtObonPP4rBvsgmaKj404DlshFole1Glfh02fE7bYR7dZ82oTewIBGn1Md6CG6YUF26X376oevOLzx95vhUmgblI6LBZwTCDY7vMq0op5WVXgsObOXJ+1x3qaBl9j1FeLxbhU9w1F+Wiba6s1X/TBz1LnUfuYDi4r2C69f1f14BWfP+p+W2GFKuC9phcELMYRRLur9DEZTUdEH+iEqWdaM7X4WOoPGI+ZYD2+wcQ+y+ioHUZ9dTDbArzxmi/bJI9BND0Ynd6lBdve/butBw8+f/T9D3ABa3AG8W3VPX4hBin+bj8dMMmSpp5pg7fJ6xrBFE2WQQEWnV8Qg3FbAWzYfM1rREEnmvkN2o1+acG2d/9u68GDzx91v3mAjb1zkpqT21OipPKO0b9TO5W0nTdOmAQm0TObts3aBKgwARtoPDiCT0gHgwnbArzxmtcLc08HgF1asN0C4Ms/fvD5I+7PhfqyXE/b7RbbrGyRQRT9ARZcwAUmgdoz0ehJ9Fn7QAhUjhDAQSw0bV3T3WbNa59jzmiP6GsWbGXDX2ytjy8+f9T97fiBPq9YeLdBmyuizZHaqXITnXiMUEEVcJ7K4j3BFPurtB4bixW8wTpweL8DC95szWMOqucFYGsWbGU7p3TxxxefP+r+oTVktxY0v5hbq3KiOKYnY8ddJVSBxuMMVffNbxwIOERShst73HZ78DZrHpmJmH3K6sGz0fe3UUj0eyRrSCGTTc+rjVNoGzNSv05srAxUBh8IhqChiQgVNIIBH3AVPnrsnXQZbLTm8ammv8eVXn/vWpaTem5IXRlt+U/LA21zhSb9cye6jcOfCnOwhIAYXAMVTUNV0QhVha9xjgA27ODJbLbmitt3tRN80lqG6N/khgot4ZVlOyO4WNg3OIMzhIZQpUEHieg2im6F91hB3I2tubql6BYNN9Hj5S7G0G2tahslBWKDnOiIvuAEDzakDQKDNFQT6gbn8E2y4BBubM230YIpBnDbMa+y3dx0n1S0BtuG62lCCXwcY0F72T1VRR3t2ONcsmDjbmzNt9RFs2LO2hQNyb022JisaI8rAWuw4HI3FuAIhZdOGIcdjLJvvObqlpqvWTJnnQbyi/1M9O8UxWhBs//H42I0q1Yb/XPGONzcmm+ri172mHKvZBpHkJaNJz6v9jxqiklDj3U4CA2ugpAaYMWqNXsdXbmJNd9egCnJEsphXNM+MnK3m0FCJ5S1kmJpa3DgPVbnQnPGWIDspW9ozbcO4K/9LkfaQO2KHuqlfFXSbdNzcEcwoqNEFE9zcIXu9/6n/ym/BC/C3aJLzEKPuYVlbFnfhZ8kcWxV3dbv4bKl28566wD+8C53aw49lTABp9PWbsB+knfc/Li3eVizf5vv/xmvnPKg5ihwKEwlrcHqucuVcVOxEv8aH37E3ZqpZypUulrHEtIWKUr+txHg+ojZDGlwnqmkGlzcVi1dLiNSJiHjfbRNOPwKpx9TVdTn3K05DBx4psIk4Ei8aCkJahRgffk4YnEXe07T4H2RR1u27E6wfQsBDofUgjFUFnwC2AiVtA+05J2zpiDK2Oa0c5fmAecN1iJzmpqFZxqYBCYhFTCsUNEmUnIcZ6aEA5rQVhEywG6w7HSW02XfOoBlQmjwulOFQAg66SvJblrTEX1YtJ3uG15T/BH1OfOQeuR8g/c0gdpT5fx2SKbs9EfHTKdM8A1GaJRHLVIwhcGyydZsbifAFVKl5EMKNU2Hryo+06BeTgqnxzYjThVySDikbtJPieco75lYfKAJOMEZBTjoITuWHXXZVhcUDIS2hpiXHV9Ku4u44bN5OYLDOkJo8w+xJSMbhBRHEdEs9JZUCkQrPMAvaHyLkxgkEHxiNkx/x2YB0mGsQ8EUWj/stW5YLhtS5SMu+/YBbNPDCkGTUybN8krRLBGPlZkVOA0j+a1+rkyQKWGaPHPLZOkJhioQYnVZ2hS3zVxMtgC46KuRwbJNd9nV2PHgb36F194ecf/Yeu2vAFe5nm/bRBFrnY4BauE8ERmZRFUn0k8hbftiVYSKMEme2dJCJSCGYAlNqh87bXOPdUkGy24P6d1ll21MBqqx48Fvv8ZHH8HZFY7j/uAq1xMJUFqCSUlJPmNbIiNsmwuMs/q9CMtsZsFO6SprzCS1Z7QL8xCQClEelpjTduDMsmWD8S1PT152BtvmIGvUeDA/yRn83u/x0/4qxoPHjx+PXY9pqX9bgMvh/Nz9kpP4pOe1/fYf3axUiMdHLlPpZCNjgtNFAhcHEDxTumNONhHrBduW+vOyY++70WWnPXj98eA4kOt/mj/5E05l9+O4o8ePx67HFqyC+qSSnyselqjZGaVK2TadbFLPWAQ4NBhHqDCCV7OTpo34AlSSylPtIdd2AJZlyzYQrDJ5lcWGNceD80CunPLGGzsfD+7wRb95NevJI5docQ3tgCyr5bGnyaPRlmwNsFELViOOx9loebGNq2moDOKpHLVP5al2cymWHbkfzGXL7kfRl44H9wZy33tvt+PB/Xnf93e+nh5ZlU18wCiRUa9m7kib9LYuOk+hudQNbxwm0AQqbfloimaB2lM5fChex+ylMwuTbfmXQtmWlenZljbdXTLuOxjI/fDDHY4Hjx8/Hrse0zXfPFxbUN1kKqSCCSk50m0Ajtx3ub9XHBKHXESb8iO6E+qGytF4nO0OG3SXzbJlhxBnKtKyl0NwybjvYCD30aMdjgePHz8eu56SVTBbgxJMliQ3Oauwg0QHxXE2Ez/EIReLdQj42Gzb4CLS0YJD9xUx7bsi0vJi5mUbW1QzL0h0PFk17rtiIPfJk52MB48fPx67npJJwyrBa2RCCQRTbGZSPCxTPOiND4G2pYyOQ4h4jINIJh5wFU1NFZt+IsZ59LSnDqBjZ2awbOku+yInunLcd8VA7rNnOxkPHj9+PGY9B0MWJJNozOJmlglvDMXDEozdhQWbgs/U6oBanGzLrdSNNnZFjOkmbi5bNt1lX7JLLhn3vXAg9/h4y/Hg8ePHI9dzQMEkWCgdRfYykYKnkP7D4rIujsujaKPBsB54vE2TS00ccvFY/Tth7JXeq1hz+qgVy04sAJawTsvOknHfCwdyT062HA8eP348Zj0vdoXF4pilKa2BROed+9fyw9rWRXeTFXESMOanvDZfJuJaSXouQdMdDJZtekZcLLvEeK04d8m474UDuaenW44Hjx8/Xns9YYqZpszGWB3AN/4VHw+k7WSFtJ3Qicuqb/NlVmgXWsxh570xg2UwxUw3WfO6B5nOuO8aA7lnZxuPB48fPx6znm1i4bsfcbaptF3zNT78eFPtwi1OaCNOqp1x3zUGcs/PN++AGD1+fMXrSVm2baTtPhPahbPhA71wIHd2bXzRa69nG+3CraTtPivahV/55tXWg8fyRY/9AdsY8VbSdp8V7cKrrgdfM//z6ILQFtJ2nxHtwmuoB4/kf74+gLeRtvvMaBdeSz34+vifx0YG20jbfTa0C6+tHrwe//NmOG0L8EbSdp8R7cLrrQe/996O+ai3ujQOskpTNULa7jOjXXj99eCd8lHvoFiwsbTdZ0a78PrrwTvlo966pLuRtB2fFe3Cm6oHP9kNH/W2FryxtN1nTLvwRurBO+Kj3pWXHidtx2dFu/Bm68Fb81HvykuPlrb7LGkX3mw9eGs+6h1Y8MbSdjegXcguQLjmevDpTQLMxtJ2N6NdyBZu9AbrwVvwUW+LbteULUpCdqm0HTelXbhNPe8G68Gb8lFvVfYfSNuxvrTdTWoXbozAzdaDZzfkorOj1oxVxlIMlpSIlpLrt8D4hrQL17z+c3h6hU/wv4Q/utps4+bm+6P/hIcf0JwQ5oQGPBL0eKPTYEXTW+eL/2DKn73J9BTXYANG57hz1cEMviVf/4tf5b/6C5pTQkMIWoAq7hTpOJjtAM4pxKu5vg5vXeUrtI09/Mo/5H+4z+Mp5xULh7cEm2QbRP2tFIKR7WM3fPf/jZ3SWCqLM2l4NxID5zB72HQXv3jj/8mLR5xXNA5v8EbFQEz7PpRfl1+MB/hlAN65qgDn3wTgH13hK7T59bmP+NIx1SHHU84nLOITt3iVz8mNO+lPrjGAnBFqmioNn1mTyk1ta47R6d4MrX7tjrnjYUpdUbv2rVr6YpVfsGG58AG8Ah9eyUN8CX4WfgV+G8LVWPDGb+Zd4cU584CtqSbMKxauxTg+dyn/LkVgA+IR8KHtejeFKRtTmLLpxN6mYVLjYxwXf5x2VofiZcp/lwKk4wGOpYDnoIZPdg/AAbwMfx0+ge9dgZvYjuqKe4HnGnykYo5TvJbG0Vj12JagRhwKa44H95ShkZa5RyLGGdfYvG7aw1TsF6iapPAS29mNS3NmsTQZCmgTzFwgL3upCTgtBTRwvGMAKrgLn4evwin8+afJRcff+8izUGUM63GOOuAs3tJkw7J4kyoNreqrpO6cYLQeFUd7TTpr5YOTLc9RUUogUOVJQ1GYJaFLAW0oTmKyYS46ZooP4S4EON3xQ5zC8/CX4CnM4c1PE8ApexpoYuzqlP3d4S3OJP8ZDK7cKWNaTlqmgDiiHwl1YsE41w1zT4iRTm3DBqxvOUsbMKKDa/EHxagtnta072ejc3DOIh5ojvh8l3tk1JF/AV6FU6jh3U8HwEazLgdCLYSQ+MYiAI2ltomkzttUb0gGHdSUUgsIYjTzLG3mObX4FBRaYtpDVNZrih9TgTeYOBxsEnN1gOCTM8Bsw/ieMc75w9kuAT6A+/AiHGvN/+Gn4KRkiuzpNNDYhDGFndWRpE6SVfm8U5bxnSgVV2jrg6JCKmneqey8VMFgq2+AM/i4L4RUbfSi27lNXZ7R7W9RTcq/q9fk4Xw3AMQd4I5ifAZz8FcVtm9SAom/dyN4lczJQW/kC42ZrHgcCoIf1oVMKkVItmMBi9cOeNHGLqOZk+QqQmrbc5YmYgxELUUN35z2iohstgfLIFmcMV7s4CFmI74L9+EFmGsi+tGnAOD4Yk9gIpo01Y4cA43BWGygMdr4YZekG3OBIUXXNukvJS8tqa06e+lSDCtnqqMFu6hWHXCF+WaYt64m9QBmNxi7Ioy7D+fa1yHw+FMAcPt7SysFLtoG4PXAk7JOA3aAxBRqUiAdU9Yp5lK3HLSRFtOim0sa8euEt08xvKjYjzeJ2GU7YawexrnKI9tmobInjFXCewpwriY9+RR4aaezFhMhGCppKwom0ChrgFlKzyPKkGlTW1YQrE9HJqu8hKGgMc6hVi5QRq0PZxNfrYNgE64utmRv6KKHRpxf6VDUaOvNP5jCEx5q185My/7RKz69UQu2im5k4/eownpxZxNLwiZ1AZTO2ZjWjkU9uaB2HFn6Q3u0JcsSx/qV9hTEApRzeBLDJQXxYmTnq7bdLa3+uqFrxLJ5w1TehnNHx5ECvCh2g2c3hHH5YsfdaSKddztfjQ6imKFGSyFwlLzxEGPp6r5IevVjk1AMx3wMqi1NxDVjLBiPs9tbsCkIY5we5/ML22zrCScFxnNtzsr9Wcc3CnD+pYO+4VXXiDE0oc/vQQ/fDK3oPESJMYXNmJa/DuloJZkcTpcYE8lIH8Dz8DJMiynNC86Mb2lNaaqP/+L7f2fcE/yP7/Lde8xfgSOdMxvOixZf/9p3+M4hT1+F+zApxg9XfUvYjc8qX2lfOOpK2gNRtB4flpFu9FTKCp2XJRgXnX6olp1zyYjTKJSkGmLE2NjUr1bxFM4AeAAHBUFIeSLqXR+NvH/M9fOnfHzOD2vCSyQJKzfgsCh+yi/Mmc35F2fUrw7miW33W9hBD1vpuUojFphIyvg7aTeoymDkIkeW3XLHmguMzbIAJejN6B5MDrhipE2y6SoFRO/AK/AcHHZHNIfiWrEe/C6cr3f/yOvrQKB+zMM55/GQdLDsR+ifr5Fiuu+/y+M78LzOE5dsNuXC3PYvYWd8NXvphLSkJIasrlD2/HOqQ+RjcRdjKTGWYhhVUm4yxlyiGPuMsZR7sMCHUBeTuNWA7if+ifXgc/hovftHXs/DV+Fvwe+f8shzMiMcweFgBly3//vwJfg5AN4450fn1Hd1Rm1aBLu22Dy3y3H2+OqMemkbGZ4jozcDjJf6596xOLpC0eMTHbKnxLxH27uZ/bMTGs2jOaMOY4m87CfQwF0dw53oa1k80JRuz/XgS+8fX3N9Af4qPIMfzKgCp4H5TDGe9GGeFPzSsZz80SlPTxXjgwJmC45njzgt2vbQ4b4OAdUK4/vWhO8d8v6EE8fMUsfakXbPpFJeLs2ubM/qdm/la3WP91uWhxXHjoWhyRUq2iJ/+5mA73zwIIo+LoZ/SgvIRjAd1IMvvn98PfgOvAJfhhm8scAKVWDuaRaK8aQ9f7vuPDH6Bj47ZXau7rqYJ66mTDwEDU6lLbCjCK0qTXyl5mnDoeNRxanj3FJbaksTk0faXxHxLrssgPkWB9LnA/MFleXcJozzjwsUvUG0X/QCve51qkMDXp9mtcyOy3rwBfdvVJK7D6/ACSzg3RoruIq5UDeESfEmVclDxnniU82vxMLtceD0hGZWzBNPMM/jSPne2OVatiTKUpY5vY7gc0LdUAWeWM5tH+O2I66AOWw9xT2BuyRVLGdoDHUsVRXOo/c+ZdRXvFfnxWyIV4upFLCl9eAL7h8Zv0QH8Ry8pA2cHzQpGesctVA37ZtklBTgHjyvdSeKY/RZw/kJMk0Y25cSNRWSigQtlULPTw+kzuJPeYEkXjQRpoGZobYsLF79pyd1dMRHInbgFTZqNLhDqiIsTNpoex2WLcy0/X6rHcdMMQvFSd5dWA++4P7xv89deACnmr36uGlL69bRCL6BSZsS6c0TU2TKK5gtWCzgAOOwQcurqk9j8whvziZSMLcq5hbuwBEsYjopUBkqw1yYBGpLA97SRElEmx5MCInBY5vgLk94iKqSWmhIGmkJ4Bi9m4L645J68LyY4wsFYBfUg5feP/6gWWm58IEmKQM89hq7KsZNaKtP5TxxrUZZVkNmMJtjbKrGxLNEbHPJxhqy7lAmbC32ZqeF6lTaknRWcYaFpfLUBh/rwaQycCCJmW15Kstv6jRHyJFry2C1ahkkIW0LO75s61+owxK1y3XqweX9m5YLM2DPFeOjn/iiqCKJ+yKXF8t5Yl/kNsqaSCryxPq5xWTFIaP8KSW0RYxqupaUf0RcTNSSdJZGcKYdYA6kdtrtmyBckfKXwqk0pHpUHlwWaffjNRBYFPUDWa8e3Lt/o0R0CdisKDM89cX0pvRHEfM8ca4t0s2Xx4kgo91MPQJ/0c9MQYq0co8MBh7bz1fio0UUHLR4aAIOvOmoYO6kwlEVODSSTliWtOtH6sPkrtctF9ZtJ9GIerBskvhdVS5cFNv9s1BU0AbdUgdK4FG+dRnjFmDTzniRMdZO1QhzMK355vigbdkpz9P6qjUGE5J2qAcXmwJ20cZUiAD0z+pGMx6xkzJkmEf40Hr4qZfVg2XzF9YOyoV5BjzVkUJngKf8lgNYwKECEHrCNDrWZzMlflS3yBhr/InyoUgBc/lKT4pxVrrC6g1YwcceK3BmNxZcAtz3j5EIpqguh9H6wc011YN75cKDLpFDxuwkrPQmUwW4KTbj9mZTwBwLq4aQMUZbHm1rylJ46dzR0dua2n3RYCWZsiHROeywyJGR7mXKlpryyCiouY56sFkBWEnkEB/raeh/Sw4162KeuAxMQpEkzy5alMY5wamMsWKKrtW2WpEWNnReZWONKWjrdsKZarpFjqCslq773PLmEhM448Pc3+FKr1+94vv/rfw4tEcu+lKTBe4kZSdijBrykwv9vbCMPcLQTygBjzVckSLPRVGslqdunwJ4oegtFOYb4SwxNgWLCmD7T9kVjTv5YDgpo0XBmN34Z/rEHp0sgyz7lngsrm4lvMm2Mr1zNOJYJ5cuxuQxwMGJq/TP5emlb8fsQBZviK4t8hFL+zbhtlpwaRSxQRWfeETjuauPsdGxsBVdO7nmP4xvzSoT29pRl7kGqz+k26B3Oy0YNV+SXbbQas1ctC/GarskRdFpKczVAF1ZXnLcpaMuzVe6lZ2g/1ndcvOVgRG3sdUAY1bKD6achijMPdMxV4muKVorSpiDHituH7rSTs7n/4y5DhRXo4FVBN4vO/zbAcxhENzGbHCzU/98Mcx5e7a31kWjw9FCe/zNeYyQjZsWb1uc7U33pN4Mji6hCLhivqfa9Ss6xLg031AgfesA/l99m9fgvnaF9JoE6bYKmkGNK3aPbHB96w3+DnxFm4hs0drLsk7U8kf/N/CvwQNtllna0rjq61sH8L80HAuvwH1tvBy2ChqWSCaYTaGN19sTvlfzFD6n+iKTbvtayfrfe9ueWh6GJFoxLdr7V72a5ZpvHcCPDzma0wTO4EgbLyedxstO81n57LYBOBzyfsOhUKsW1J1BB5vr/tz8RyqOFylQP9Tvst2JALsC5lsH8PyQ40DV4ANzYa4dedNiKNR1s+x2wwbR7q4/4cTxqEk4LWDebfisuo36JXLiWFjOtLrlNWh3K1rRS4xvHcDNlFnNmWBBAl5SWaL3oPOfnvbr5pdjVnEaeBJSYjuLEkyLLsWhKccadmOphZkOPgVdalj2QpSmfOsADhMWE2ZBu4+EEJI4wKTAuCoC4xwQbWXBltpxbjkXJtKxxabo9e7tyhlgb6gNlSbUpMh+l/FaqzVwewGu8BW1Zx7pTpQDJUjb8tsUTW6+GDXbMn3mLbXlXJiGdggxFAoUrtPS3wE4Nk02UZG2OOzlk7fRs7i95QCLo3E0jtrjnM7SR3uS1p4qtS2nJ5OwtQVHgOvArLBFijZUV9QtSl8dAY5d0E0hM0w3HS2DpIeB6m/A1+HfhJcGUq4sOxH+x3f5+VO+Ds9rYNI7zPXOYWPrtf8bYMx6fuOAX5jzNR0PdsuON+X1f7EERxMJJoU6GkTEWBvVolVlb5lh3tKCg6Wx1IbaMDdJ+9sUCc5KC46hKGCk3IVOS4TCqdBNfUs7Kd4iXf2RjnT/LLysJy3XDcHLh/vde3x8DoGvwgsa67vBk91G5Pe/HbOe7xwym0NXbtiuuDkGO2IJDh9oQvJ4cY4vdoqLDuoH9Zl2F/ofsekn8lkuhIlhQcffUtSjytFyp++p6NiE7Rqx/lodgKVoceEp/CP4FfjrquZaTtj2AvH5K/ywpn7M34K/SsoYDAdIN448I1/0/wveW289T1/lX5xBzc8N5IaHr0XMOQdHsIkDuJFifj20pBm5jzwUv9e2FhwRsvhAbalCIuIw3bhJihY3p6nTFFIZgiSYjfTf3aXuOjmeGn4bPoGvwl+CFzTRczBIuHBEeImHc37/lGfwZR0cXzVDOvaKfNHvwe+suZ771K/y/XcBlsoN996JpBhoE2toYxOznNEOS5TJc6Id5GEXLjrWo+LEWGNpPDU4WAwsIRROu+1vM+0oW37z/MBN9kqHnSArwPfgFJ7Cq/Ai3Ie7g7ncmI09v8sjzw9mzOAEXoIHxURueaAce5V80f/DOuuZwHM8vsMb5wBzOFWM7wymTXPAEvm4vcFpZ2ut0VZRjkiP2MlmLd6DIpbGSiHOjdnUHN90hRYmhTnmvhzp1iKDNj+b7t5hi79lWGwQ+HN9RsfFMy0FXbEwhfuczKgCbyxYwBmcFhhvo/7a44v+i3XWcwDP86PzpGQYdWh7csP5dBvZ1jNzdxC8pBGuxqSW5vw40nBpj5JhMwvOzN0RWqERHMr4Lv1kWX84xLR830G3j6yqZ1a8UstTlW+qJPOZ+sZ7xZPKTJLhiNOAFd6tk+jrTH31ncLOxid8+nzRb128HhUcru/y0Wn6iT254YPC6FtVSIMoW2sk727AhvTtrWKZTvgsmckfXYZWeNRXx/3YQ2OUxLDrbHtN11IwrgXT6c8dATDwLniYwxzO4RzuQqTKSC5gAofMZ1QBK3zQ4JWobFbcvJm87FK+6JXrKahLn54m3p+McXzzYtP8VF/QpJuh1OwieElEoI1pRxPS09FBrkq2tWCU59+HdhNtTIqKm8EBrw2RTOEDpG3IKo2Y7mFdLm3ZeVjYwVw11o/oznceMve4CgMfNym/utA/d/ILMR7gpXzRy9eDsgLcgbs8O2Va1L0zzIdwGGemTBuwROHeoMShkUc7P+ISY3KH5ZZeWqO8mFTxQYeXTNuzvvK5FGPdQfuu00DwYFY9dyhctEt+OJDdnucfpmyhzUJzfsJjr29l8S0bXBfwRS9ZT26tmMIdZucch5ZboMz3Nio3nIOsYHCGoDT4kUA9MiXEp9Xsui1S8th/kbWIrMBxDGLodWUQIWcvnXy+9M23xPiSMOiRPqM+YMXkUN3gXFrZJwXGzUaMpJfyRS9ZT0lPe8TpScuRlbMHeUmlaKDoNuy62iWNTWNFYjoxFzuJs8oR+RhRx7O4SVNSXpa0ZJQ0K1LAHDQ+D9IepkMXpcsq5EVCvClBUIzDhDoyKwDw1Lc59GbTeORivugw1IcuaEOaGWdNm+Ps5fQ7/tm0DjMegq3yM3vb5j12qUId5UZD2oxDSEWOZMSqFl/W+5oynWDa/aI04tJRQ2eTXusg86SQVu/nwSYwpW6wLjlqIzwLuxGIvoAvul0PS+ZNz0/akp/pniO/8JDnGyaCkzbhl6YcqmK/69prxPqtpx2+Km9al9sjL+rwMgHw4jE/C8/HQ3m1vBuL1fldbzd8mOueVJ92syqdEY4KJjSCde3mcRw2TA6szxedn+zwhZMps0XrqEsiUjnC1hw0TELC2Ek7uAAdzcheXv1BYLagspxpzSAoZZUsIzIq35MnFQ9DOrlNB30jq3L4pkhccKUAA8/ocvN1Rzx9QyOtERs4CVsJRK/DF71kPYrxYsGsm6RMh4cps5g1DOmM54Ly1ii0Hd3Y/BMk8VWFgBVmhqrkJCPBHAolwZaWzLR9Vb7bcWdX9NyUYE+uB2BKfuaeBUcjDljbYVY4DdtsVWvzRZdWnyUzDpjNl1Du3aloAjVJTNDpcIOVVhrHFF66lLfJL1zJr9PQ2nFJSBaKoDe+sAvLufZVHVzYh7W0h/c6AAZ+7Tvj6q9j68G/cTCS/3n1vLKHZwNi+P+pS0WkZNMBMUl+LDLuiE4omZy71r3UFMwNJV+VJ/GC5ixVUkBStsT4gGKh0Gm4Oy3qvq7Lbmq24nPdDuDR9deR11XzP4vFu3TYzfnIyiSVmgizUYGqkIXNdKTY9pgb9D2Ix5t0+NHkVzCdU03suWkkVZAoCONCn0T35gAeW38de43mf97sMOpSvj4aa1KYUm58USI7Wxxes03bAZdRzk6UtbzMaCQ6IxO0dy7X+XsjoD16hpsBeGz9dfzHj+R/Hp8nCxZRqkEDTaCKCSywjiaoMJ1TITE9eg7Jqnq8HL6gDwiZb0u0V0Rr/rmvqjxKuaLCX7ZWXTvAY+uvm3z8CP7nzVpngqrJpZKwWnCUjIviYVlirlGOzPLI3SMVyp/elvBUjjDkNhrtufFFErQ8pmdSlbK16toBHlt/HV8uHMX/vEGALkV3RJREiSlopxwdMXOZPLZ+ix+kAHpMKIk8UtE1ygtquttwxNhphrIZ1IBzjGF3IIGxGcBj6q8bHJBG8T9vdsoWrTFEuebEZuVxhhClH6P5Zo89OG9fwHNjtNQTpD0TG9PJLEYqvEY6Rlxy+ZZGfL0Aj62/bnQCXp//eeM4KzfQVJbgMQbUjlMFIm6TpcfWlZje7NBSV6IsEVmumWIbjiloUzQX9OzYdo8L1wjw2PrrpimONfmfNyzKklrgnEkSzT5QWYQW40YShyzqsRmMXbvVxKtGuYyMKaU1ugenLDm5Ily4iT14fP11Mx+xJv+zZ3MvnfdFqxU3a1W/FTB4m3Qfsyc1XUcdVhDeUDZXSFHHLQj/Y5jtC7ZqM0CXGwB4bP11i3LhOvzPGygYtiUBiwQV/4wFO0majijGsafHyRLu0yG6q35cL1rOpVxr2s5cM2jJYMCdc10Aj6q/blRpWJ//+dmm5psMl0KA2+AFRx9jMe2WbC4jQxnikd4DU8TwUjRVacgdlhmr3bpddzuJ9zXqr2xnxJfzP29RexdtjDVZqzkqa6PyvcojGrfkXiJ8SEtml/nYskicv0ivlxbqjemwUjMw5evdg8fUX9nOiC/lf94Q2i7MURk9nW1MSj5j8eAyV6y5CN2S6qbnw3vdA1Iwq+XOSCl663udN3IzLnrt+us25cI1+Z83SXQUldqQq0b5XOT17bGpLd6ssN1VMPf8c+jG8L3NeCnMdF+Ra3fRa9dft39/LuZ/3vwHoHrqGmQFafmiQw6eyzMxS05K4bL9uA+SKUQzCnSDkqOGokXyJvbgJ/BHI+qvY69//4rl20NsmK2ou2dTsyIALv/91/8n3P2Aao71WFGi8KKv1fRC5+J67Q/507/E/SOshqN5TsmYIjVt+kcjAx98iz/4SaojbIV1rexE7/C29HcYD/DX4a0rBOF5VTu7omsb11L/AWcVlcVZHSsqGuXLLp9ha8I//w3Mv+T4Ew7nTBsmgapoCrNFObIcN4pf/Ob/mrvHTGqqgAupL8qWjWPS9m/31jAe4DjA+4+uCoQoT/zOzlrNd3qd4SdphFxsUvYwGWbTWtISc3wNOWH+kHBMfc6kpmpwPgHWwqaSUG2ZWWheYOGQGaHB+eQ/kn6b3pOgLV+ODSn94wDvr8Bvb70/LLuiPPEr8OGVWfDmr45PZyccEmsVXZGe1pRNX9SU5+AVQkNTIVPCHF/jGmyDC9j4R9LfWcQvfiETmgMMUCMN1uNCakkweZsowdYobiMSlnKA93u7NzTXlSfe+SVbfnPQXmg9LpYAQxpwEtONyEyaueWM4FPjjyjG3uOaFmBTWDNgBXGEiQpsaWhnAqIijB07Dlsy3fUGeP989xbWkyf+FF2SNEtT1E0f4DYYVlxFlbaSMPIRMk/3iMU5pME2SIWJvjckciebkQuIRRyhUvkHg/iUljG5kzVog5hV7vIlCuBrmlhvgPfNHQM8lCf+FEGsYbMIBC0qC9a0uuy2wLXVbLBaP5kjHokCRxapkQyzI4QEcwgYHRZBp+XEFTqXFuNVzMtjXLJgX4gAid24Hjwc4N3dtVSe+NNiwTrzH4WVUOlDobUqr1FuAgYllc8pmzoVrELRHSIW8ViPxNy4xwjBpyR55I6J220qQTZYR4guvUICJiSpr9gFFle4RcF/OMB7BRiX8sSfhpNSO3lvEZCQfLUVTKT78Ek1LRLhWN+yLyTnp8qWUZ46b6vxdRGXfHVqx3eI75YaLa4iNNiK4NOW7wPW6lhbSOF9/M9qw8e/aoB3d156qTzxp8pXx5BKAsYSTOIIiPkp68GmTq7sZtvyzBQaRLNxIZ+paozHWoLFeExIhRBrWitHCAHrCF7/thhD8JhYz84wg93QRV88wLuLY8zF8sQ36qF1J455bOlgnELfshKVxYOXKVuKx0jaj22sczTQqPqtV/XDgpswmGTWWMSDw3ssyUunLLrVPGjYRsH5ggHeHSWiV8kT33ycFSfMgkoOK8apCye0J6VW6GOYvffgU9RWsukEi2kUV2nl4dOYUzRik9p7bcA4ggdJ53LxKcEe17B1R8eqAd7dOepV8sTXf5lhejoL85hUdhDdknPtKHFhljOT+bdq0hxbm35p2nc8+Ja1Iw+tJykgp0EWuAAZYwMVwac5KzYMslhvgHdHRrxKnvhTYcfKsxTxtTETkjHO7rr3zjoV25lAQHrqpV7bTiy2aXMmUhTBnKS91jhtR3GEoF0oLnWhWNnYgtcc4N0FxlcgT7yz3TgNIKkscx9jtV1ZKpWW+Ub1tc1eOv5ucdgpx+FJy9pgbLE7xDyXb/f+hLHVGeitHOi6A7ybo3sF8sS7w7cgdk0nJaOn3hLj3uyD0Zp5pazFIUXUpuTTU18d1EPkDoX8SkmWTnVIozEdbTcZjoqxhNHf1JrSS/AcvHjZ/SMHhL/7i5z+POsTUh/8BvNfYMTA8n+yU/MlTZxSJDRStqvEuLQKWwDctMTQogUDyQRoTQG5Kc6oQRE1yV1jCA7ri7jdZyK0sYTRjCR0Hnnd+y7nHxNgTULqw+8wj0mQKxpYvhjm9uSUxg+TTy7s2GtLUGcywhXSKZN275GsqlclX90J6bRI1aouxmgL7Q0Nen5ziM80SqMIo8cSOo+8XplT/5DHNWsSUr/6lLN/QQ3rDyzLruEW5enpf7KqZoShEduuSFOV7DLX7Ye+GmXb6/hnNNqKsVXuMDFpb9Y9eH3C6NGEzuOuI3gpMH/I6e+zDiH1fXi15t3vA1czsLws0TGEtmPEJdiiFPwlwKbgLHAFk4P6ZyPdymYYHGE0dutsChQBl2JcBFlrEkY/N5bQeXQ18gjunuMfMfsBlxJSx3niO485fwO4fGD5T/+3fPQqkneWVdwnw/3bMPkW9Wbqg+iC765Zk+xcT98ibKZc2EdgHcLoF8cSOo/Oc8fS+OyEULF4g4sJqXVcmfMfsc7A8v1/yfGXmL9I6Fn5pRwZhsPv0TxFNlAfZCvG+Oohi82UC5f/2IsJo0cTOm9YrDoKhFPEUr/LBYTUNht9zelHXDqwfPCIw4owp3mOcIQcLttWXFe3VZ/j5H3cIc0G6oPbCR+6Y2xF2EC5cGUm6wKC5tGEzhsWqw5hNidUiKX5gFWE1GXh4/Qplw4sVzOmx9QxU78g3EF6wnZlEN4FzJ1QPSLEZz1KfXC7vd8ssGdIbNUYpVx4UapyFUHzJoTOo1McSkeNn1M5MDQfs4qQuhhX5vQZFw8suwWTcyYTgioISk2YdmkhehG4PkE7w51inyAGGaU+uCXADabGzJR1fn3lwkty0asIo8cROm9Vy1g0yDxxtPvHDAmpu+PKnM8Ix1wwsGw91YJqhteaWgjYBmmQiebmSpwKKzE19hx7jkzSWOm66oPbzZ8Yj6kxVSpYjVAuvLzYMCRo3oTQecOOjjgi3NQ4l9K5/hOGhNTdcWVOTrlgYNkEXINbpCkBRyqhp+LdRB3g0OU6rMfW2HPCFFMV9nSp+uB2woepdbLBuJQyaw/ZFysXrlXwHxI0b0LovEkiOpXGA1Ijagf+KUNC6rKNa9bQnLFqYNkEnMc1uJrg2u64ELPBHpkgWbmwKpJoDhMwNbbGzAp7Yg31wS2T5rGtzit59PrKhesWG550CZpHEzpv2NGRaxlNjbMqpmEIzygJqQfjypycs2pg2cS2RY9r8HUqkqdEgKTWtWTKoRvOBPDYBltja2SO0RGjy9UHtxwRjA11ujbKF+ti5cIR9eCnxUg6owidtyoU5tK4NLji5Q3HCtiyF2IqLGYsHViOXTXOYxucDqG0HyttqYAKqYo3KTY1ekyDXRAm2AWh9JmsVh/ccg9WJ2E8YjG201sPq5ULxxX8n3XLXuMInbft2mk80rRGjCGctJ8/GFdmEQ9Ug4FlE1ll1Y7jtiraqm5Fe04VV8lvSVBL8hiPrfFVd8+7QH3Qbu2ipTVi8cvSGivc9cj8yvH11YMHdNSERtuOslM97feYFOPKzGcsI4zW0YGAbTAOaxCnxdfiYUmVWslxiIblCeAYr9VYR1gM7GmoPrilunSxxeT3DN/2eBQ9H11+nk1adn6VK71+5+Jfct4/el10/7KBZfNryUunWSCPxPECk1rdOv1WVSrQmpC+Tl46YD3ikQYcpunSQgzVB2VHFhxHVGKDgMEY5GLlQnP7FMDzw7IacAWnO6sBr12u+XanW2AO0wQ8pknnFhsL7KYIqhkEPmEXFkwaN5KQphbkUmG72wgw7WSm9RiL9QT925hkjiVIIhphFS9HKI6/8QAjlpXqg9W2C0apyaVDwKQwrwLY3j6ADR13ZyUNByQXHQu6RY09Hu6zMqXRaNZGS/KEJs0cJEe9VH1QdvBSJv9h09eiRmy0V2uJcqHcShcdvbSNg5fxkenkVprXM9rDVnX24/y9MVtncvbKY706anNl3ASll9a43UiacVquXGhvq4s2FP62NGKfQLIQYu9q1WmdMfmUrDGt8eDS0cXozH/fjmUH6Jruvm50hBDSaEU/2Ru2LEN/dl006TSc/g7tfJERxGMsgDUEr104pfWH9lQaN+M4KWQjwZbVc2rZVNHsyHal23wZtIs2JJqtIc/WLXXRFCpJkfE9jvWlfFbsNQ9pP5ZBS0zKh4R0aMFj1IjTcTnvi0Zz2rt7NdvQb2mgbju1plsH8MmbnEk7KbK0b+wC2iy3aX3szW8xeZvDwET6hWZYwqTXSSG+wMETKum0Dq/q+x62gt2ua2ppAo309TRk9TPazfV3qL9H8z7uhGqGqxNVg/FKx0HBl9OVUORn8Q8Jx9gFttGQUDr3tzcXX9xGgN0EpzN9mdZ3GATtPhL+CjxFDmkeEU6x56kqZRusLzALXVqkCN7zMEcqwjmywDQ6OhyUe0Xao1Qpyncrg6wKp9XfWDsaZplElvQ/b3sdweeghorwBDlHzgk1JmMc/wiERICVy2VJFdMjFuLQSp3S0W3+sngt2njwNgLssFGVQdJ0tu0KH4ky1LW4yrbkuaA6Iy9oz/qEMMXMMDWyIHhsAyFZc2peV9hc7kiKvfULxCl9iddfRK1f8kk9qvbdOoBtOg7ZkOZ5MsGrSHsokgLXUp9y88smniwWyuFSIRVmjplga3yD8Uij5QS1ZiM4U3Qw5QlSm2bXjFe6jzzBFtpg+/YBbLAWG7OPynNjlCw65fukGNdkJRf7yM1fOxVzbxOJVocFoYIaGwH22mIQkrvu1E2nGuebxIgW9U9TSiukPGU+Lt++c3DJPKhyhEEbXCQLUpae2exiKy6tMPe9mDRBFCEMTWrtwxN8qvuGnt6MoihKWS5NSyBhbH8StXoAz8PLOrRgLtOT/+4vcu+7vDLnqNvztOq7fmd8sMmY9Xzn1zj8Dq8+XVdu2Nv0IIySgEdQo3xVHps3Q5i3fLFsV4aiqzAiBhbgMDEd1uh8qZZ+lwhjkgokkOIv4xNJmyncdfUUzgB4oFMBtiu71Xumpz/P+cfUP+SlwFExwWW62r7b+LSPxqxn/gvMZ5z9C16t15UbNlq+jbGJtco7p8wbYlL4alSyfWdeuu0j7JA3JFNuVAwtst7F7FhWBbPFNKIUORndWtLraFLmMu7KFVDDOzqkeaiN33YAW/r76wR4XDN/yN1z7hejPau06EddkS/6XThfcz1fI/4K736fO48vlxt2PXJYFaeUkFS8U15XE3428xdtn2kc8GQlf1vkIaNRRnOMvLTWrZbElEHeLWi1o0dlKPAh1MVgbbVquPJ5+Cr8LU5/H/+I2QlHIU2ClXM9G8v7Rr7oc/hozfUUgsPnb3D+I+7WF8kNO92GY0SNvuxiE+2Bt8prVJTkzE64sfOstxuwfxUUoyk8VjcTlsqe2qITSFoSj6Epd4KsT6BZOWmtgE3hBfir8IzZDwgV4ZTZvD8VvPHERo8v+vL1DASHTz/i9OlKueHDjK5Rnx/JB1Vb1ioXdBra16dmt7dgik10yA/FwJSVY6XjA3oy4SqM2frqDPPSRMex9qs3XQtoWxMj7/Er8GWYsXgjaVz4OYumP2+9kbxvny/6kvWsEBw+fcb5bInc8APdhpOSs01tEqIkoiZjbAqKMruLbJYddHuHFRIyJcbdEdbl2sVLaySygunutBg96Y2/JjKRCdyHV+AEFtTvIpbKIXOamknYSiB6KV/0JetZITgcjjk5ZdaskBtWO86UF0ap6ozGXJk2WNiRUlCPFir66lzdm/SLSuK7EUdPz8f1z29Skq6F1fXg8+5UVR6bszncP4Tn4KUkkdJ8UFCY1zR1i8RmL/qQL3rlei4THG7OODlnKko4oI01kd3CaM08Ia18kC3GNoVaO9iDh+hWxSyTXFABXoau7Q6q9OxYg/OVEMw6jdbtSrJ9cBcewGmaZmg+bvkUnUUaGr+ZfnMH45Ivevl61hMcXsxYLFTu1hTm2zViCp7u0o5l+2PSUh9bDj6FgYypufBDhqK2+oXkiuHFHR3zfj+9PtA8oR0xnqX8qn+sx3bFODSbbF0X8EUvWQ8jBIcjo5bRmLOljDNtcqNtOe756h3l0VhKa9hDd2l1eqmsnh0MNMT/Cqnx6BInumhLT8luljzQ53RiJeA/0dxe5NK0o2fA1+GLXr6eNQWHNUOJssQaTRlGpLHKL9fD+IrQzTOMZS9fNQD4AnRNVxvTdjC+fJdcDDWQcyB00B0t9BDwTxXgaAfzDZ/DBXzRnfWMFRwuNqocOmX6OKNkY63h5n/fFcB28McVHqnXZVI27K0i4rDLNE9lDKV/rT+udVbD8dFFu2GGZ8mOt0kAXcoX3ZkIWVtw+MNf5NjR2FbivROHmhV1/pj2egv/fMGIOWTIWrV3Av8N9imV9IWml36H6cUjqEWNv9aNc+veb2sH46PRaHSuMBxvtW+twxctq0z+QsHhux8Q7rCY4Ct8lqsx7c6Sy0dl5T89rIeEuZKoVctIk1hNpfavER6yyH1Vvm3MbsUHy4ab4hWr/OZPcsRBphnaV65/ZcdYPNNwsjN/djlf9NqCw9U5ExCPcdhKxUgLSmfROpLp4WSUr8ojdwbncbvCf+a/YzRaEc6QOvXcGO256TXc5Lab9POvB+AWY7PigWYjzhifbovuunzRawsO24ZqQQAqguBtmpmPB7ysXJfyDDaV/aPGillgz1MdQg4u5MYaEtBNNHFjkRlSpd65lp4hd2AVPTfbV7FGpyIOfmNc/XVsPfg7vzaS/3nkvLL593ANLvMuRMGpQIhiF7kUEW9QDpAUbTWYBcbp4WpacHHY1aacqQyjGZS9HI3yCBT9kUZJhVOD+zUDvEH9ddR11fzPcTDQ5TlgB0KwqdXSavk9BC0pKp0WmcuowSw07VXmXC5guzSa4p0UvRw2lbDiYUx0ExJJRzWzi6Gm8cnEkfXXsdcG/M/jAJa0+bmCgdmQ9CYlNlSYZOKixmRsgiFxkrmW4l3KdFKv1DM8tk6WxPYJZhUUzcd8Kdtgrw/gkfXXDT7+avmfVak32qhtkg6NVdUS5wgkru1YzIkSduTW1FDwVWV3JQVJVuieTc0y4iDpFwc7/BvSalvKdQM8sv662cevz/+8sQVnjVAT0W2wLllw1JiMhJRxgDjCjLQsOzSFSgZqx7lAW1JW0e03yAD3asC+GD3NbQhbe+mN5GXH1F83KDOM4n/e5JIuH4NpdQARrFPBVptUNcjj4cVMcFSRTE2NpR1LEYbYMmfWpXgP9KejaPsLUhuvLCsVXznAG9dfx9SR1ud/3hZdCLHb1GMdPqRJgqDmm76mHbvOXDtiO2QPUcKo/TWkQ0i2JFXpBoo7vij1i1Lp3ADAo+qvG3V0rM//vFnnTE4hxd5Ka/Cor5YEdsLVJyKtDgVoHgtW11pWSjolPNMnrlrVj9Fv2Qn60twMwKPqr+N/wvr8z5tZcDsDrv06tkqyzESM85Ycv6XBWA2birlNCXrI6VbD2lx2L0vQO0QVTVVLH4SE67fgsfVXv8n7sz7/85Z7cMtbE6f088wSaR4kCkCm10s6pKbJhfqiUNGLq+0gLWC6eUAZFPnLjwqtKd8EwGvWX59t7iPW4X/eAN1svgRVSY990YZg06BD1ohLMtyFTI4pKTJsS9xREq9EOaPWiO2gpms7397x6nQJkbh+Fz2q/rqRROX6/M8bJrqlVW4l6JEptKeUFuMYUbtCQ7CIttpGc6MY93x1r1vgAnRXvY5cvwWPqb9uWQm+lP95QxdNMeWhOq1x0Db55C7GcUv2ZUuN6n8iKzsvOxibC//Yfs9Na8r2Rlz02vXXDT57FP/zJi66/EJSmsJKa8QxnoqW3VLQ+jZVUtJwJ8PNX1NQCwfNgdhhHD9on7PdRdrdGPF28rJr1F+3LBdeyv+8yYfLoMYet1vX4upNAjVvwOUWnlNXJXlkzk5Il6kqeoiL0C07qno+/CYBXq/+utlnsz7/Mzvy0tmI4zm4ag23PRN3t/CWryoUVJGm+5+K8RJ0V8Hc88/XHUX/HfiAq7t+BH+x6v8t438enWmdJwFA6ZINriLGKv/95f8lT9/FnyA1NMVEvQyaXuu+gz36f/DD73E4pwqpLcvm/o0Vle78n//+L/NPvoefp1pTJye6e4A/D082FERa5/opeH9zpvh13cNm19/4v/LDe5xMWTi8I0Ta0qKlK27AS/v3/r+/x/2GO9K2c7kVMonDpq7//jc5PKCxeNPpFVzaRr01wF8C4Pu76hXuX18H4LduTr79guuFD3n5BHfI+ZRFhY8w29TYhbbLi/bvBdqKE4fUgg1pBKnV3FEaCWOWyA+m3WpORZr/j+9TKJtW8yBTF2/ZEODI9/QavHkVdGFp/Pjn4Q+u5hXapsP5sOH+OXXA1LiKuqJxiMNbhTkbdJTCy4llEt6NnqRT4dhg1V3nbdrm6dYMecA1yTOL4PWTE9L5VzPFlLBCvlG58AhehnN4uHsAYinyJ+AZ/NkVvELbfOBUuOO5syBIEtiqHU1k9XeISX5bsimrkUUhnGDxourN8SgUsCZVtKyGbyGzHXdjOhsAvOAswSRyIBddRdEZWP6GZhNK/yjwew9ehBo+3jEADu7Ay2n8mDc+TS7awUHg0OMzR0LABhqLD4hJEh/BEGyBdGlSJoXYXtr+3HS4ijzVpgi0paWXtdruGTknXBz+11qT1Q2inxaTzQCO46P3lfLpyS4fou2PH/PupwZgCxNhGlj4IvUuWEsTkqMWm6i4xCSMc9N1RDQoCVcuGItJ/MRWefais+3synowi/dESgJjkilnWnBTGvRWmaw8oR15257t7CHmCf8HOn7cwI8+NQBXMBEmAa8PMRemrNCEhLGEhDQKcGZWS319BX9PFBEwGTbRBhLbDcaV3drFcDqk5kCTd2JF1Wp0HraqBx8U0wwBTnbpCadwBA/gTH/CDrcCs93LV8E0YlmmcyQRQnjBa8JESmGUfIjK/7fkaDJpmD2QptFNVJU1bbtIAjjWQizepOKptRjbzR9Kag6xZmMLLjHOtcLT3Tx9o/0EcTT1XN3E45u24AiwEypDJXihKjQxjLprEwcmRKclaDNZCVqr/V8mYWyFADbusiY5hvgFoU2vio49RgJLn5OsReRFN6tabeetiiy0V7KFHT3HyZLx491u95sn4K1QQSPKM9hNT0wMVvAWbzDSVdrKw4zRjZMyJIHkfq1VAVCDl/bUhNKlGq0zGr05+YAceXVPCttVk0oqjVwMPt+BBefx4yPtGVkUsqY3CHDPiCM5ngupUwCdbkpd8kbPrCWHhkmtIKLEetF2499eS1jZlIPGYnlcPXeM2KD9vLS0bW3ktYNqUllpKLn5ZrsxlIzxvDu5eHxzGLctkZLEY4PgSOg2IUVVcUONzUDBEpRaMoXNmUc0tFZrTZquiLyKxrSm3DvIW9Fil+AkhXu5PhEPx9mUNwqypDvZWdKlhIJQY7vn2OsnmBeOWnYZ0m1iwbbw1U60by5om47iHRV6fOgzjMf/DAZrlP40Z7syxpLK0lJ0gqaAK1c2KQKu7tabTXkLFz0sCftuwX++MyNeNn68k5Buq23YQhUh0SNTJa1ioQ0p4nUG2y0XilF1JqODqdImloPS4Bp111DEWT0jJjVv95uX9BBV7eB3bUWcu0acSVM23YZdd8R8UbQUxJ9wdu3oMuhdt929ME+mh6JXJ8di2RxbTi6TbrDquqV4aUKR2iwT6aZbyOwEXN3DUsWr8Hn4EhwNyHuXHh7/pdaUjtR7vnDh/d8c9xD/s5f501eQ1+CuDiCvGhk1AN/4Tf74RfxPwD3toLarR0zNtsnPzmS64KIRk861dMWCU8ArasG9T9H0ZBpsDGnjtAOM2+/LuIb2iIUGXNgl5ZmKD/Tw8TlaAuihaFP5yrw18v4x1898zIdP+DDAX1bM3GAMvPgRP/cJn3zCW013nrhHkrITyvYuwOUkcHuKlRSW5C6rzIdY4ppnF7J8aAJbQepgbJYBjCY9usGXDKQxq7RZfh9eg5d1UHMVATRaD/4BHK93/1iAgYZ/+jqPn8Dn4UExmWrpa3+ZOK6MvM3bjwfzxNWA2dhs8+51XHSPJiaAhGSpWevEs5xHLXcEGFXYiCONySH3fPWq93JIsBiSWvWyc3CAN+EcXoT7rCSANloPPoa31rt/5PUA/gp8Q/jDD3hyrjzlR8VkanfOvB1XPubt17vzxAfdSVbD1pzAnfgyF3ycadOTOTXhpEUoLC1HZyNGW3dtmjeXgr2r56JNmRwdNNWaQVBddd6rh4MhviEB9EFRD/7RGvePvCbwAL4Mx/D6M541hHO4D3e7g6PafdcZVw689z7NGTwo5om7A8sPhccT6qKcl9NJl9aM/9kX+e59Hh1yPqGuCCZxuITcsmNaJ5F7d0q6J3H48TO1/+M57085q2icdu2U+W36Ldllz9Agiv4YGljoEN908EzvDOrBF98/vtJwCC/BF2AG75xxEmjmMIcjxbjoaxqOK3/4hPOZzhMPBpYPG44CM0dTVm1LjLtUWWVz1Bcf8tEx0zs8O2A2YVHRxKYOiy/aOVoAaMu0i7ubu43njjmd4ibMHU1sIDHaQNKrZND/FZYdk54oCXetjq7E7IVl9eAL7t+oHnwXXtLx44czzoRFHBztYVwtH1d+NOMkupZ5MTM+gUmq90X+Bh9zjRlmaQ+m7YMqUL/veemcecAtOJ0yq1JnVlN27di2E0+Klp1tAJ4KRw1eMI7aJjsO3R8kPSI3fUFXnIOfdQe86sIIVtWDL7h//Ok6vj8vwDk08NEcI8zz7OhBy+WwalzZeZ4+0XniRfst9pAJqQHDGLzVQ2pheZnnv1OWhwO43/AgcvAEXEVVpa4db9sGvNK8wjaENHkfFQ4Ci5i7dqnQlPoLQrHXZDvO3BIXZbJOBrOaEbML6sFL798I4FhKihjHMsPjBUZYCMFr6nvaArxqXPn4lCa+cHfSa2cP27g3Z3ziYTRrcbQNGLQmGF3F3cBdzzzX7AILx0IB9rbwn9kx2G1FW3Inic+ZLIsVvKR8Zwfj0l1fkqo8LWY1M3IX14OX3r9RKTIO+d9XzAI8qRPGPn/4NC2n6o4rN8XJ82TOIvuVA8zLKUHRFgBCetlDZlqR1gLKjS39xoE7Bt8UvA6BxuEDjU3tFsEijgA+615tmZkXKqiEENrh41iLDDZNq4pKTWR3LZfnos81LOuNa15cD956vLMsJd1rqYp51gDUQqMYm2XsxnUhD2jg1DM7SeuJxxgrmpfISSXVIJIS5qJJSvJPEQ49DQTVIbYWJ9QWa/E2+c/oPK1drmC7WSfJRNKBO5Yjvcp7Gc3dmmI/Xh1kDTEuiSnWqQf37h+fTMhGnDf6dsS8SQfQWlqqwXXGlc/PEZ/SC5mtzIV0nAshlQdM/LvUtYutrEZ/Y+EAFtq1k28zQhOwLr1AIeANzhF8t9qzTdZf2qRKO6MWE9ohBYwibbOmrFtNmg3mcS+tB28xv2uKd/agYCvOP+GkSc+0lr7RXzyufL7QbkUpjLjEWFLqOIkAGu2B0tNlO9Eau2W1qcOUvVRgKzypKIQZ5KI3q0MLzqTNRYqiZOqmtqloIRlmkBHVpHmRYV6/HixbO6UC47KOFJnoMrVyr7wYz+SlW6GUaghYbY1I6kkxA2W1fSJokUdSh2LQ1GAimRGm0MT+uu57H5l7QgOWxERpO9moLRPgTtquWCfFlGlIjQaRly9odmzMOWY+IBO5tB4sW/0+VWGUh32qYk79EidWKrjWuiLpiVNGFWFRJVktyeXWmbgBBzVl8anPuXyNJlBJOlKLTgAbi/EYHVHxWiDaVR06GnHQNpJcWcK2jJtiCfG2sEHLzuI66sGrMK47nPIInPnu799935aOK2cvmvubrE38ZzZjrELCmXM2hM7UcpXD2oC3+ECVp7xtIuxptJ0jUr3sBmBS47TVxlvJ1Sqb/E0uLdvLj0lLr29ypdd/eMX3f6lrxGlKwKQxEGvw0qHbkbwrF3uHKwVENbIV2wZ13kNEF6zD+x24aLNMfDTCbDPnEikZFyTNttxWBXDaBuM8KtI2rmaMdUY7cXcUPstqTGvBGSrFWIpNMfbdea990bvAOC1YX0qbc6smDS1mPxSJoW4fwEXvjMmhlijDRq6qale6aJEuFGoppYDoBELQzLBuh/mZNx7jkinv0EtnUp50lO9hbNK57lZaMAWuWR5Yo9/kYwcYI0t4gWM47Umnl3YmpeBPqSyNp3K7s2DSAS/39KRuEN2bS4xvowV3dFRMx/VFcp2Yp8w2nTO9hCXtHG1kF1L4KlrJr2wKfyq77R7MKpFKzWlY9UkhYxyHWW6nBWPaudvEAl3CGcNpSXPZ6R9BbBtIl6cHL3gIBi+42CYXqCx1gfGWe7Ap0h3luyXdt1MKy4YUT9xSF01G16YEdWsouW9mgDHd3veyA97H+Ya47ZmEbqMY72oPztCGvK0onL44AvgC49saZKkWRz4veWljE1FHjbRJaWv6ZKKtl875h4CziFCZhG5rx7tefsl0aRT1bMHZjm8dwL/6u7wCRysaQblQoG5yAQN5zpatMNY/+yf8z+GLcH/Qn0iX2W2oEfXP4GvwQHuIL9AYGnaO3zqAX6946nkgqZNnUhx43DIdQtMFeOPrgy/y3Yd85HlJWwjLFkU3kFwq28xPnuPhMWeS+tDLV9Otllq7pQCf3uXJDN9wFDiUTgefHaiYbdfi3b3u8+iY6TnzhgehI1LTe8lcd7s1wJSzKbahCRxKKztTLXstGAiu3a6rPuQs5pk9TWAan5f0BZmGf7Ylxzzk/A7PAs4QPPPAHeFQ2hbFHszlgZuKZsJcUmbDC40sEU403cEjczstOEypa+YxevL4QBC8oRYqWdK6b7sK25tfE+oDZgtOQ2Jg8T41HGcBE6fTWHn4JtHcu9S7uYgU5KSCkl/mcnq+5/YBXOEr6lCUCwOTOM1taOI8mSxx1NsCXBEmLKbMAg5MkwbLmpBaFOPrNSlO2HnLiEqW3tHEwd8AeiQLmn+2gxjC3k6AxREqvKcJbTEzlpLiw4rNZK6oJdidbMMGX9FULKr0AkW+2qDEPBNNm5QAt2Ik2nftNWHetubosHLo2nG4vQA7GkcVCgVCgaDixHqo9UUn1A6OshapaNR/LPRYFV8siT1cCtJE0k/3WtaNSuUZYKPnsVIW0xXWnMUxq5+En4Kvw/MqQmVXnAXj9Z+9zM98zM/Agy7F/qqj2Nh67b8HjFnPP3iBn/tkpdzwEJX/whIcQUXOaikeliCRGUk7tiwF0rItwMEhjkZ309hikFoRAmLTpEXWuHS6y+am/KB/fM50aLEhGnSMwkpxzOov4H0AvgovwJ1iGzDLtJn/9BU+fAINfwUe6FHSLhu83viV/+/HrOePX+STT2B9uWGbrMHHLldRBlhS/CJQmcRxJFqZica01XixAZsYiH1uolZxLrR/SgxVIJjkpQP4PE9sE59LKLr7kltSBogS5tyszzH8Fvw8/AS8rNOg0xUS9fIaHwb+6et8Q/gyvKRjf5OusOzGx8evA/BP4IP11uN/grca5O0lcsPLJ5YjwI4QkJBOHa0WdMZYGxPbh2W2nR9v3WxEWqgp/G3+6VZbRLSAAZ3BhdhAaUL33VUSw9yjEsvbaQ9u4A/gGXwZXoEHOuU1GSj2chf+Mo+f8IcfcAxfIKVmyunRbYQVnoevwgfw3TXXcw++xNuP4fhyueEUNttEduRVaDttddoP0eSxLe2LENk6itYxlrxBNBYrNNKSQmeaLcm9c8UsaB5WyO6675yyQIAWSDpBVoA/gxmcwEvwoDv0m58UE7gHn+fJOa8/Ywan8EKRfjsopF83eCglX/Sfr7OeaRoQfvt1CGvIDccH5BCvw1sWIzRGC/66t0VTcLZQZtm6PlAasbOJ9iwWtUo7biktTSIPxnR24jxP1ZKaqq+2RcXM9OrBAm/AAs7hDJ5bNmGb+KIfwCs8a3jnjBrOFeMjHSCdbKr+2uOLfnOd9eiA8Hvvwwq54VbP2OqwkB48Ytc4YEOiH2vTXqodabfWEOzso4qxdbqD5L6tbtNPECqbhnA708DZH4QOJUXqScmUlks7Ot6FBuZw3n2mEbaUX7kDzxHOOQk8nKWMzAzu6ZZ8sOFw4RK+6PcuXo9tB4SbMz58ApfKDXf3szjNIIbGpD5TKTRxGkEMLjLl+K3wlWXBsCUxIDU+jbOiysESqAy1MGUJpXgwbTWzNOVEziIXZrJ+VIztl1PUBxTSo0dwn2bOmfDRPD3TRTGlfbCJvO9KvuhL1hMHhB9wPuPRLGHcdOWG2xc0U+5bQtAJT0nRTewXL1pgk2+rZAdeWmz3jxAqfNQQdzTlbF8uJ5ecEIWvTkevAHpwz7w78QujlD/Lr491bD8/1vhM2yrUQRrWXNQY4fGilfctMWYjL72UL/qS9eiA8EmN88nbNdour+PBbbAjOjIa4iBhfFg6rxeKdEGcL6p3EWR1Qq2Qkhs2DrnkRnmN9tG2EAqmgPw6hoL7Oza7B+3SCrR9tRftko+Lsf2F/mkTndN2LmzuMcKTuj/mX2+4Va3ki16+nnJY+S7MefpkidxwnV+4wkXH8TKnX0tsYzYp29DOOoSW1nf7nTh2akYiWmcJOuTidSaqESrTYpwjJJNVGQr+rLI7WsqerHW6Kp/oM2pKuV7T1QY9gjqlZp41/WfKpl56FV/0kvXQFRyeQ83xaTu5E8p5dNP3dUF34ihyI3GSpeCsywSh22ZJdWto9winhqifb7VRvgktxp13vyjrS0EjvrRfZ62uyqddSWaWYlwTPAtJZ2oZ3j/Sgi/mi+6vpzesfAcWNA0n8xVyw90GVFGuZjTXEQy+6GfLGLMLL523f5E0OmxVjDoOuRiH91RKU+vtoCtH7TgmvBLvtFXWLW15H9GTdVw8ow4IlRLeHECN9ym1e9K0I+Cbnhgv4Yu+aD2HaQJ80XDqOzSGAV4+4yCqBxrsJAX6ZTIoX36QnvzhhzzMfFW2dZVLOJfo0zbce5OvwXMFaZ81mOnlTVXpDZsQNuoYWveketKb5+6JOOsgX+NTm7H49fUTlx+WLuWL7qxnOFh4BxpmJx0p2gDzA/BUARuS6phR+pUsY7MMboAHx5xNsSVfVZcYSwqCKrqon7zM+8ecCkeS4nm3rINuaWvVNnMRI1IRpxTqx8PZUZ0Br/UEduo3B3hNvmgZfs9gQPj8vIOxd2kndir3awvJ6BLvoUuOfFWNYB0LR1OQJoUySKb9IlOBx74q1+ADC2G6rOdmFdJcD8BkfualA+BdjOOzP9uUhGUEX/TwhZsUduwRr8wNuXKurCixLBgpQI0mDbJr9dIqUuV+92ngkJZ7xduCk2yZKbfWrH1VBiTg9VdzsgRjW3CVXCvAwDd+c1z9dWw9+B+8MJL/eY15ZQ/HqvTwVdsZn5WQsgRRnMaWaecu3jFvMBEmgg+FJFZsnSl0zjB9OqPYaBD7qmoVyImFvzi41usesV0julaAR9dfR15Xzv9sEruRDyk1nb+QaLU67T885GTls6YgcY+UiMa25M/pwGrbCfzkvR3e0jjtuaFtnwuagHTSb5y7boBH119HXhvwP487jJLsLJ4XnUkHX5sLbS61dpiAXRoZSCrFJ+EjpeU3puVfitngYNo6PJrAigKktmwjyQdZpfq30mmtulaAx9Zfx15Xzv+cyeuiBFUs9zq8Kq+XB9a4PVvph3GV4E3y8HENJrN55H1X2p8VyqSKwVusJDKzXOZzplWdzBUFK9e+B4+uv468xvI/b5xtSAkBHQaPvtqWzllVvEOxPbuiE6+j2pvjcKsbvI7txnRErgfH7LdXqjq0IokKzga14GzQ23SSbCQvO6r+Or7SMIr/efOkkqSdMnj9mBx2DRsiY29Uj6+qK9ZrssCKaptR6HKURdwUYeUWA2kPzVKQO8ku2nU3Anhs/XWkBx3F/7wJtCTTTIKftthue1ty9xvNYLY/zo5KSbIuKbXpbEdSyeRyYdAIwKY2neyoc3+k1XUaufYga3T9daMUx/r8z1s10ITknIO0kuoMt+TB8jK0lpayqqjsJ2qtXAYwBU932zinimgmd6mTRDnQfr88q36NAI+tv24E8Pr8zxtasBqx0+xHH9HhlrwsxxNUfKOHQaZBITNf0uccj8GXiVmXAuPEAKSdN/4GLHhs/XWj92dN/uetNuBMnVR+XWDc25JLjo5Mg5IZIq226tmCsip2zZliL213YrTlL2hcFjpCduyim3M7/eB16q/blQsv5X/esDRbtJeabLIosWy3ycavwLhtxdWzbMmHiBTiVjJo6lCLjXZsi7p9PEPnsq6X6wd4bP11i0rD5fzPm/0A6brrIsllenZs0lCJlU4abakR59enZKrKe3BZihbTxlyZ2zl1+g0wvgmA166/bhwDrcn/7Ddz0eWZuJvfSESug6NzZsox3Z04FIxz0mUjMwVOOVTq1CQ0AhdbBGVdjG/CgsfUX7esJl3K/7ytWHRv683praW/8iDOCqWLLhpljDY1ZpzK75QiaZoOTpLKl60auHS/97oBXrv+umU9+FL+5+NtLFgjqVLCdbmj7pY5zPCPLOHNCwXGOcLquOhi8CmCWvbcuO73XmMUPab+ug3A6/A/78Bwe0bcS2+tgHn4J5pyS2WbOck0F51Vq3LcjhLvZ67p1ABbaL2H67bg78BfjKi/jr3+T/ABV3ilLmNXTI2SpvxWBtt6/Z//D0z/FXaGbSBgylzlsEGp+5//xrd4/ae4d8DUUjlslfIYS3t06HZpvfQtvv0N7AHWqtjP2pW08QD/FLy//da38vo8PNlKHf5y37Dxdfe/oj4kVIgFq3koLReSR76W/bx//n9k8jonZxzWTANVwEniDsg87sOSd/z7//PvMp3jQiptGVWFX2caezzAXwfgtzYUvbr0iozs32c3Uge7varH+CNE6cvEYmzbPZ9hMaYDdjK4V2iecf6EcEbdUDVUARda2KzO/JtCuDbNQB/iTeL0EG1JSO1jbXS+nLxtPMDPw1fh5+EPrgSEKE/8Gry5A73ui87AmxwdatyMEBCPNOCSKUeRZ2P6Myb5MRvgCHmA9ywsMifU+AYXcB6Xa5GibUC5TSyerxyh0j6QgLVpdyhfArRTTLqQjwe4HOD9s92D4Ap54odXAPBWLAwB02igG5Kkc+piN4lvODIFGAZgT+EO4Si1s7fjSR7vcQETUkRm9O+MXyo9OYhfe4xt9STQ2pcZRLayCV90b4D3jR0DYAfyxJ+eywg2IL7NTMXna7S/RpQ63JhWEM8U41ZyQGjwsVS0QBrEKLu8xwZsbi4wLcCT+OGidPIOCe1PiSc9Qt+go+vYqB7cG+B9d8cAD+WJPz0Am2gxXgU9IneOqDpAAXOsOltVuMzpdakJXrdPCzXiNVUpCeOos5cxnpQT39G+XVLhs1osQVvJKPZyNq8HDwd4d7pNDuWJPxVX7MSzqUDU6gfadKiNlUFTzLeFHHDlzO4kpa7aiKhBPGKwOqxsBAmYkOIpipyXcQSPlRTf+Tii0U3EJGaZsDER2qoB3h2hu0qe+NNwUooYU8y5mILbJe6OuX+2FTKy7bieTDAemaQyQ0CPthljSWO+xmFDIYiESjM5xKd6Ik5lvLq5GrQ3aCMLvmCA9wowLuWJb9xF59hVVP6O0CrBi3ZjZSNOvRy+I6klNVRJYRBaEzdN+imiUXQ8iVF8fsp+W4JXw7WISW7fDh7lptWkCwZ4d7QTXyBPfJMYK7SijjFppGnlIVJBJBYj7eUwtiP1IBXGI1XCsjNpbjENVpSAJ2hq2LTywEly3hUYazt31J8w2+aiLx3g3fohXixPfOMYm6zCGs9LVo9MoW3MCJE7R5u/WsOIjrqBoHUO0bJE9vxBpbhsd3+Nb4/vtPCZ4oZYCitNeYuC/8UDvDvy0qvkiW/cgqNqRyzqSZa/s0mqNGjtKOoTm14zZpUauiQgVfqtQiZjq7Q27JNaSK5ExRcrGCXO1FJYh6jR6CFqK7bZdQZ4t8g0rSlPfP1RdBtqaa9diqtzJkQ9duSryi2brQXbxDwbRUpFMBHjRj8+Nt7GDKgvph9okW7LX47gu0SpGnnFQ1S1lYldOsC7hYteR574ZuKs7Ei1lBsfdz7IZoxzzCVmmVqaSySzQbBVAWDek+N4jh9E/4VqZrJjPwiv9BC1XcvOWgO8275CVyBPvAtTVlDJfZkaZGU7NpqBogAj/xEHkeAuJihWYCxGN6e8+9JtSegFXF1TrhhLGP1fak3pebgPz192/8gB4d/6WT7+GdYnpH7hH/DJzzFiYPn/vjW0SgNpTNuPIZoAEZv8tlGw4+RLxy+ZjnKa5NdFoC7UaW0aduoYse6+bXg1DLg6UfRYwmhGEjqPvF75U558SANrElK/+MdpXvmqBpaXOa/MTZaa1DOcSiLaw9j0NNNst3c+63c7EKTpkvKHzu6bPbP0RkuHAVcbRY8ijP46MIbQeeT1mhA+5PV/inyDdQipf8LTvMXbwvoDy7IruDNVZKTfV4CTSRUYdybUCnGU7KUTDxLgCknqUm5aAW6/1p6eMsOYsphLzsHrE0Y/P5bQedx1F/4yPHnMB3/IOoTU9+BL8PhtjuFKBpZXnYNJxTuv+2XqolKR2UQgHhS5novuxVySJhBNRF3SoKK1XZbbXjVwWNyOjlqWJjrWJIy+P5bQedyldNScP+HZ61xKSK3jyrz+NiHG1hcOLL/+P+PDF2gOkekKGiNWKgJ+8Z/x8Iv4DdQHzcpZyF4v19I27w9/yPGDFQvmEpKtqv/TLiWMfn4sofMm9eAH8Ao0zzh7h4sJqYtxZd5/D7hkYPneDzl5idlzNHcIB0jVlQ+8ULzw/nc5/ojzl2juE0apD7LRnJxe04dMz2iOCFNtGFpTuXA5AhcTRo8mdN4kz30nVjEC4YTZQy4gpC7GlTlrePKhGsKKgeXpCYeO0MAd/GH7yKQUlXPLOasOH3FnSphjHuDvEu4gB8g66oNbtr6eMbFIA4fIBJkgayoXriw2XEDQPJrQeROAlY6aeYOcMf+IVYTU3XFlZufMHinGywaW3YLpObVBAsbjF4QJMsVUSayjk4voPsHJOQfPWDhCgDnmDl6XIRerD24HsGtw86RMHOLvVSHrKBdeVE26gKB5NKHzaIwLOmrqBWJYZDLhASG16c0Tn+CdRhWDgWXnqRZUTnPIHuMJTfLVpkoYy5CzylHVTGZMTwkGAo2HBlkQplrJX6U+uF1wZz2uwS1SQ12IqWaPuO4baZaEFBdukksJmkcTOm+YJSvoqPFzxFA/YUhIvWxcmSdPWTWwbAKVp6rxTtPFUZfKIwpzm4IoMfaYQLWgmlG5FME2gdBgm+J7J+rtS/XBbaVLsR7bpPQnpMFlo2doWaVceHk9+MkyguZNCJ1He+kuHTWyQAzNM5YSUg/GlTk9ZunAsg1qELVOhUSAK0LABIJHLKbqaEbHZLL1VA3VgqoiOKXYiS+HRyaEKgsfIqX64HYWbLRXy/qWoylIV9gudL1OWBNgBgTNmxA6b4txDT4gi3Ri7xFSLxtXpmmYnzAcWDZgY8d503LFogz5sbonDgkKcxGsWsE1OI+rcQtlgBBCSOKD1mtqYpIU8cTvBmAT0yZe+zUzeY92fYjTtGipXLhuR0ePoHk0ofNWBX+lo8Z7pAZDk8mEw5L7dVyZZoE/pTewbI6SNbiAL5xeygW4xPRuLCGbhcO4RIeTMFYHEJkYyEO9HmJfXMDEj/LaH781wHHZEtqSQ/69UnGpzH7LKIAZEDSPJnTesJTUa+rwTepI9dLJEawYV+ZkRn9g+QirD8vF8Mq0jFQ29js6kCS3E1+jZIhgPNanHdHFqFvPJLHqFwQqbIA4jhDxcNsOCCQLDomaL/dr5lyJaJU6FxPFjO3JOh3kVMcROo8u+C+jo05GjMF3P3/FuDLn5x2M04xXULPwaS6hBYki+MrMdZJSgPHlcB7nCR5bJ9Kr5ACUn9jk5kivdd8tk95SOGrtqu9lr2IhK65ZtEl7ZKrp7DrqwZfRUSN1el7+7NJxZbywOC8neNKTch5vsTEMNsoCCqHBCqIPRjIPkm0BjvFODGtto99rCl+d3wmHkW0FPdpZtC7MMcVtGFQjJLX5bdQ2+x9ypdc313uj8xlsrfuLgWXz1cRhZvJYX0iNVBRcVcmCXZs6aEf3RQF2WI/TcCbKmGU3IOoDJGDdDub0+hYckt6PlGu2BcxmhbTdj/klhccLGJMcqRjMJP1jW2ETqLSWJ/29MAoORluJ+6LPffBZbi5gqi5h6catQpmOT7/OFf5UorRpLzCqcMltBLhwd1are3kztrSzXO0LUbXRQcdLh/RdSZ+swRm819REDrtqzC4es6Gw4JCKlSnjYVpo0xeq33PrADbFLL3RuCmObVmPN+24kfa+AojDuM4umKe2QwCf6EN906HwjujaitDs5o0s1y+k3lgbT2W2i7FJdnwbLXhJUBq/9liTctSmFC/0OqUinb0QddTWamtjbHRFuWJJ6NpqZ8vO3fZJ37Db+2GkaPYLGHs7XTTdiFQJ68SkVJFVmY6McR5UycflNCsccHFaV9FNbR4NttLxw4pQ7wJd066Z0ohVbzihaxHVExd/ay04oxUKWt+AsdiQ9OUyZ2krzN19IZIwafSTFgIBnMV73ADj7V/K8u1MaY2sJp2HWm0f41tqwajEvdHWOJs510MaAqN4aoSiPCXtN2KSi46dUxHdaMquar82O1x5jqhDGvqmoE9LfxcY3zqA7/x3HA67r9ZG4O6Cuxu12/+TP+eLP+I+HErqDDCDVmBDO4larujNe7x8om2rMug0MX0rL1+IWwdwfR+p1TNTyNmVJ85ljWzbWuGv8/C7HD/izjkHNZNYlhZcUOKVzKFUxsxxN/kax+8zPWPSFKw80rJr9Tizyj3o1gEsdwgWGoxPezDdZ1TSENE1dLdNvuKL+I84nxKesZgxXVA1VA1OcL49dFlpFV5yJMhzyCmNQ+a4BqusPJ2bB+xo8V9u3x48VVIEPS/mc3DvAbXyoYr6VgDfh5do5hhHOCXMqBZUPhWYbWZECwVJljLgMUWOCB4MUuMaxGNUQDVI50TQ+S3kFgIcu2qKkNSHVoM0SHsgoZxP2d5HH8B9woOk4x5bPkKtAHucZsdykjxuIpbUrSILgrT8G7G5oCW+K0990o7E3T6AdW4TilH5kDjds+H64kS0mz24grtwlzDHBJqI8YJQExotPvoC4JBq0lEjjQkyBZ8oH2LnRsQ4Hu1QsgDTJbO8fQDnllitkxuVskoiKbRF9VwzMDvxHAdwB7mD9yCplhHFEyUWHx3WtwCbSMMTCUCcEmSGlg4gTXkHpZXWQ7kpznK3EmCHiXInqndkQjunG5kxTKEeGye7jWz9cyMR2mGiFQ15ENRBTbCp+Gh86vAyASdgmJq2MC6hoADQ3GosP0QHbnMHjyBQvQqfhy/BUbeHd5WY/G/9LK/8Ka8Jd7UFeNWEZvzPb458Dn8DGLOe3/wGL/4xP+HXlRt+M1PE2iLhR8t+lfgxsuh7AfO2AOf+owWhSZRYQbd622hbpKWKuU+XuvNzP0OseRDa+mObgDHJUSc/pKx31QdKffQ5OIJpt8GWjlgTwMc/w5MPCR/yl1XC2a2Yut54SvOtMev55Of45BOat9aWG27p2ZVORRvnEk1hqWMVUmqa7S2YtvlIpspuF1pt0syuZS2NV14mUidCSfzQzg+KqvIYCMljIx2YK2AO34fX4GWdu5xcIAb8MzTw+j/lyWM+Dw/gjs4GD6ehNgA48kX/AI7XXM/XAN4WHr+9ntywqoCakCqmKP0rmQrJJEErG2Upg1JObr01lKQy4jskWalKYfJ/EDLMpjNSHFEUAde2fltaDgmrNaWQ9+AAb8I5vKjz3L1n1LriB/BXkG/wwR9y/oRX4LlioHA4LzP2inzRx/DWmutRweFjeP3tNeSGlaE1Fde0OS11yOpmbIp2u/jF1n2RRZviJM0yBT3IZl2HWImKjQOxIyeU325b/qWyU9Moj1o07tS0G7qJDoGHg5m8yeCxMoEH8GU45tnrNM84D2l297DQ9t1YP7jki/7RmutRweEA77/HWXOh3HCxkRgldDQkAjNTMl2Iloc1qN5JfJeeTlyTRzxURTdn1Ixv2uKjs12AbdEWlBtmVdk2k7FFwj07PCZ9XAwW3dG+8xKzNFr4EnwBZpy9Qzhh3jDXebBpYcpuo4fQ44u+fD1dweEnHzI7v0xuuOALRUV8rXpFyfSTQYkhd7IHm07jpyhlkCmI0ALYqPTpUxXS+z4jgDj1Pflvmz5ecuItpIBxyTHpSTGWd9g1ApfD/bvwUhL4nT1EzqgX7cxfCcNmb3mPL/qi9SwTHJ49oj5ZLjccbTG3pRmlYi6JCG0mQrAt1+i2UXTZ2dv9IlQpN5naMYtviaXlTrFpoMsl3bOAFEa8sqPj2WCMrx3Yjx99qFwO59Aw/wgx+HlqNz8oZvA3exRDvuhL1jMQHPaOJ0+XyA3fp1OfM3qObEVdhxjvynxNMXQV4+GJyvOEFqeQBaIbbO7i63rpxCltdZShPFxkjM2FPVkn3TG+Rp9pO3l2RzFegGfxGDHIAh8SteR0C4HopXzRF61nheDw6TFN05Ebvq8M3VKKpGjjO6r7nhudTEGMtYM92HTDaR1FDMXJ1eThsbKfywyoWwrzRSXkc51flG3vIid62h29bIcFbTGhfV+faaB+ohj7dPN0C2e2lC96+XouFByen9AsunLDJZ9z7NExiUc0OuoYW6UZkIyx2YUR2z6/TiRjyKMx5GbbjLHvHuf7YmtKghf34LJfx63Yg8vrvN2zC7lY0x0tvKezo4HmGYDU+Gab6dFL+KI761lDcNifcjLrrr9LWZJctG1FfU1uwhoQE22ObjdfkSzY63CbU5hzs21WeTddH2BaL11Gi7lVdlxP1nkxqhnKhVY6knS3EPgVGg1JpN5cP/hivujOelhXcPj8HC/LyI6MkteVjlolBdMmF3a3DbsuAYhL44dxzthWSN065xxUd55Lmf0wRbOYOqH09/o9WbO2VtFdaMb4qBgtFJoT1SqoN8wPXMoXLb3p1PUEhxfnnLzGzBI0Ku7FxrKsNJj/8bn/H8fPIVOd3rfrklUB/DOeO+nkghgSPzrlPxluCMtOnDL4Yml6dK1r3vsgMxgtPOrMFUZbEUbTdIzii5beq72G4PD0DKnwjmBULUVFmy8t+k7fZ3pKc0Q4UC6jpVRqS9Umv8bxw35flZVOU1X7qkjnhZlsMbk24qQ6Hz7QcuL6sDC0iHHki96Uh2UdvmgZnjIvExy2TeJdMDZNSbdZyAHe/Yd1xsQhHiKzjh7GxQ4yqMPaywPkjMamvqrYpmO7Knad+ZQC5msCuAPWUoxrxVhrGv7a+KLXFhyONdTMrZ7ke23qiO40ZJUyzgYyX5XyL0mV7NiUzEs9mjtbMN0dERqwyAJpigad0B3/zRV7s4PIfXSu6YV/MK7+OrYe/JvfGMn/PHJe2fyUdtnFrKRNpXV0Y2559aWPt/G4BlvjTMtXlVIWCnNyA3YQBDmYIodFz41PvXPSa6rq9lWZawZ4dP115HXV/M/tnFkkrBOdzg6aP4pID+MZnTJ1SuuB6iZlyiox4HT2y3YBtkUKWooacBQUDTpjwaDt5poBHl1/HXltwP887lKKXxNUEyPqpGTyA699UqY/lt9yGdlUKra0fFWS+36iylVWrAyd7Uw0CZM0z7xKTOduznLIjG2Hx8cDPLb+OvK6Bv7n1DYci4CxUuRxrjBc0bb4vD3rN5Zz36ntLb83eVJIB8LiIzCmn6SMPjlX+yNlTjvIGjs+QzHPf60Aj62/jrzG8j9vYMFtm1VoRWCJdmw7z9N0t+c8cxZpPeK4aTRicS25QhrVtUp7U578chk4q04Wx4YoQSjFryUlpcQ1AbxZ/XVMknIU//OGl7Q6z9Zpxi0+3yFhSkjUDpnCIUhLWVX23KQ+L9vKvFKI0ZWFQgkDLvBoylrHNVmaw10zwCPrr5tlodfnf94EWnQ0lFRWy8pW9LbkLsyUVDc2NSTHGDtnD1uMtchjbCeb1mpxFP0YbcClhzdLu6lfO8Bj6q+bdT2sz/+8SZCV7VIxtt0DUn9L7r4cLYWDSXnseEpOGFuty0qbOVlS7NNzs5FOGJUqQpl2Q64/yBpZf90sxbE+//PGdZ02HSipCbmD6NItmQ4Lk5XUrGpDMkhbMm2ZVheNYV+VbUWTcv99+2NyX1VoafSuC+AN6q9bFIMv5X/eagNWXZxEa9JjlMwNWb00akGUkSoepp1/yRuuqHGbUn3UdBSTxBU6SEVklzWRUkPndVvw2PrrpjvxOvzPmwHc0hpmq82npi7GRro8dXp0KXnUQmhZbRL7NEVp1uuZmO45vuzKsHrktS3GLWXODVjw+vXXLYx4Hf7njRPd0i3aoAGX6W29GnaV5YdyDj9TFkakje7GHYzDoObfddHtOSpoi2SmzJHrB3hM/XUDDEbxP2/oosszcRlehWXUvzHv4TpBVktHqwenFo8uLVmy4DKLa5d3RtLrmrM3aMFr1183E4sewf+85VWeg1c5ag276NZrM9IJVNcmLEvDNaV62aq+14IAOGFsBt973Ra8Xv11YzXwNfmft7Jg2oS+XOyoC8/cwzi66Dhmgk38kUmP1CUiYWOX1bpD2zWXt2FCp7uq8703APAa9dfNdscR/M/bZLIyouVxqJfeWvG9Je+JVckHQ9+CI9NWxz+blX/KYYvO5n2tAP/vrlZ7+8/h9y+9qeB/Hnt967e5mevX10rALDWK//FaAT5MXdBXdP0C/BAes792c40H+AiAp1e1oH8HgH94g/Lttx1gp63op1eyoM/Bvw5/G/7xFbqJPcCXnmBiwDPb/YKO4FX4OjyCb289db2/Noqicw4i7N6TVtoz8tNwDH+8x/i6Ae7lmaQVENzJFb3Di/BFeAwz+Is9SjeQySpPqbLFlNmyz47z5a/AF+AYFvDmHqibSXTEzoT4Gc3OALaqAP4KPFUJ6n+1x+rGAM6Zd78bgJ0a8QN4GU614vxwD9e1Amy6CcskNrczLx1JIp6HE5UZD/DBHrFr2oNlgG4Odv226BodoryjGJ9q2T/AR3vQrsOCS0ctXZi3ruLlhpFDJYl4HmYtjQCP9rhdn4suySLKDt6wLcC52h8xPlcjju1fn+yhuw4LZsAGUuo2b4Fx2UwQu77uqRHXGtg92aN3tQCbFexc0uk93vhTXbct6y7MulLycoUljx8ngDMBg1tvJjAazpEmOtxlzclvj1vQf1Tx7QlPDpGpqgtdSKz/d9/hdy1vTfFHSmC9dGDZbLiezz7Ac801HirGZsWjydfZyPvHXL/Y8Mjzg8BxTZiuwKz4Eb8sBE9zznszmjvFwHKPIWUnwhqfVRcd4Ck0K6ate48m1oOfrX3/yOtvAsJ8zsPAM89sjnddmuLuDPjX9Bu/L7x7xpMzFk6nWtyQfPg278Gn4Aekz2ZgOmU9eJ37R14vwE/BL8G3aibCiWMWWDQ0ZtkPMnlcGeAu/Ag+8ZyecU5BPuy2ILD+sQqyZhAKmn7XZd+jIMTN9eBL7x95xVLSX4On8EcNlXDqmBlqS13jG4LpmGbkF/0CnOi3H8ETOIXzmnmtb0a16Tzxj1sUvQCBiXZGDtmB3KAefPH94xcUa/6vwRn80GOFyjEXFpba4A1e8KQfFF+259tx5XS4egYn8fQsLGrqGrHbztr+uByTahWuL1NUGbDpsnrwBfePPwHHIf9X4RnM4Z2ABWdxUBlqQ2PwhuDxoS0vvqB1JzS0P4h2nA/QgTrsJFn+Y3AOjs9JFC07CGWX1oNX3T/yHOzgDjwPn1PM3g9Jk9lZrMEpxnlPmBbjyo2+KFXRU52TJM/2ALcY57RUzjObbjqxVw++4P6RAOf58pcVsw9Daje3htriYrpDOonre3CudSe6bfkTEgHBHuDiyu5MCsc7BHhYDx7ePxLjqigXZsw+ijMHFhuwBmtoTPtOxOrTvYJDnC75dnUbhfwu/ZW9AgYd+peL68HD+0emKquiXHhWjJg/UrkJYzuiaL3E9aI/ytrCvAd4GcYZMCkSQxfUg3v3j8c4e90j5ZTPdvmJJGHnOCI2nHS8081X013pHuBlV1gB2MX1YNmWLHqqGN/TWmG0y6clJWthxNUl48q38Bi8vtMKyzzpFdSDhxZ5WBA5ZLt8Jv3895DduBlgbPYAj8C4B8hO68FDkoh5lydC4FiWvBOVqjYdqjiLv92t8yPDjrDaiHdUD15qkSURSGmXJwOMSxWAXYwr3zaAufJ66l+94vv3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/wHuD9tQd4f+0B3l97gPfXHuD9tQd4f+0B3l97gG8LwP8G/AL8O/A5OCq0Ys2KIdv/qOIXG/4mvFAMF16gZD+2Xvu/B8as5+8bfllWyg0zaNO5bfXj6vfhhwD86/Aq3NfRS9t9WPnhfnvCIw/CT8GLcFTMnpntdF/z9V+PWc/vWoIH+FL3Znv57PitcdGP4R/C34avw5fgRVUInCwbsn1yyA8C8zm/BH8NXoXnVE6wVPjdeCI38kX/3+Ct9dbz1pTmHFRu+Hm4O9Ch3clr99negxfwj+ER/DR8EV6B5+DuQOnTgUw5rnkY+FbNU3gNXh0o/JYTuWOvyBf9FvzX663HH/HejO8LwAl8Hl5YLTd8q7sqA3wbjuExfAFegQdwfyDoSkWY8swzEf6o4Qyewefg+cHNbqMQruSL/u/WWc+E5g7vnnEXgDmcDeSGb/F4cBcCgT+GGRzDU3hZYburAt9TEtHgbM6JoxJ+6NMzzTcf6c2bycv2+KK/f+l6LBzw5IwfqZJhA3M472pWT/ajKxnjv4AFnMEpnBTPND6s2J7qHbPAqcMK74T2mZ4VGB9uJA465It+/eL1WKhYOD7xHOkr1ajK7d0C4+ke4Hy9qXZwpgLr+Znm/uNFw8xQOSy8H9IzjUrd9+BIfenYaylf9FsXr8fBAadnPIEDna8IBcwlxnuA0/Wv6GAWPd7dDIKjMdSWueAsBj4M7TOd06qBbwDwKr7oleuxMOEcTuEZTHWvDYUO7aHqAe0Bbq+HEFRzOz7WVoTDQkVds7A4sIIxfCQdCefFRoIOF/NFL1mPab/nvOakSL/Q1aFtNpUb/nFOVX6gzyg/1nISyDfUhsokIzaBR9Kxm80s5mK+6P56il1jXic7nhQxsxSm3OwBHl4fFdLqi64nDQZvqE2at7cWAp/IVvrN6/BFL1mPhYrGMBfOi4PyjuSGf6wBBh7p/FZTghCNWGgMzlBbrNJoPJX2mW5mwZfyRffXo7OFi5pZcS4qZUrlViptrXtw+GQoyhDPS+ANjcGBNRiLCQDPZPMHuiZfdFpPSTcQwwKYdRNqpkjm7AFeeT0pJzALgo7g8YYGrMHS0iocy+YTm2vyRUvvpXCIpQ5pe666TJrcygnScUf/p0NDs/iAI/nqDHC8TmQT8x3NF91l76oDdQGwu61Z6E0ABv7uO1dbf/37Zlv+Zw/Pbh8f1s4Avur6657/+YYBvur6657/+YYBvur6657/+YYBvur6657/+aYBvuL6657/+VMA8FXWX/f8zzcN8BXXX/f8zzcNMFdbf93zP38KLPiK6697/uebtuArrr/u+Z9vGmCusP6653/+1FjwVdZf9/zPN7oHX339dc//fNMu+irrr3v+50+Bi+Zq6697/uebA/jz8Pudf9ht/fWv517J/XUzAP8C/BAeX9WCDrUpZ3/dEMBxgPcfbtTVvsYV5Yn32u03B3Ac4P3b8I+vxNBKeeL9dRMAlwO83959qGO78sT769oB7g3w/vGVYFzKE++v6wV4OMD7F7tckFkmT7y/rhHgpQO8b+4Y46XyxPvrugBeNcB7BRiX8sT767oAvmCA9woAHsoT76+rBJjLBnh3txOvkifeX1dswZcO8G6N7sXyxPvr6i340gHe3TnqVfLE++uKAb50gHcXLnrX8sR7gNdPRqwzwLu7Y/FO5Yn3AK9jXCMGeHdgxDuVJ75VAI8ljP7PAb3/RfjcZfePHBB+79dpfpH1CanN30d+mT1h9GqAxxJGM5LQeeQ1+Tb+EQJrElLb38VHQ94TRq900aMIo8cSOo+8Dp8QfsB8zpqE1NO3OI9Zrj1h9EV78PqE0WMJnUdeU6E+Jjyk/hbrEFIfeWbvId8H9oTRFwdZaxJGvziW0Hn0gqYB/wyZ0PwRlxJST+BOw9m77Amj14ii1yGM/txYQudN0qDzGe4EqfA/5GJCagsHcPaEPWH0esekSwmjRxM6b5JEcZ4ww50ilvAOFxBSx4yLW+A/YU8YvfY5+ALC6NGEzhtmyZoFZoarwBLeZxUhtY4rc3bKnjB6TKJjFUHzJoTOozF2YBpsjcyxDgzhQ1YRUse8+J4wenwmaylB82hC5w0zoRXUNXaRBmSMQUqiWSWkLsaVqc/ZE0aPTFUuJWgeTei8SfLZQeMxNaZSIzbII4aE1Nmr13P2hNHjc9E9guYNCZ032YlNwESMLcZiLQHkE4aE1BFg0yAR4z1h9AiAGRA0jyZ03tyIxWMajMPWBIsxYJCnlITU5ShiHYdZ94TR4wCmSxg9jtB5KyPGYzymAYexWEMwAPIsAdYdV6aObmNPGD0aYLoEzaMJnTc0Ygs+YDw0GAtqxBjkuP38bMRWCHn73xNGjz75P73WenCEJnhwyVe3AEe8TtKdJcYhBl97wuhNAObK66lvD/9J9NS75v17wuitAN5fe4D31x7g/bUHeH/tAd5fe4D3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/w/toDvAd4f/24ABzZ8o+KLsSLS+Pv/TqTb3P4hKlQrTGh+fbIBT0Axqznnb+L/V2mb3HkN5Mb/nEHeK7d4IcDld6lmDW/iH9E+AH1MdOw/Jlu2T1xNmY98sv4wHnD7D3uNHu54WUuOsBTbQuvBsPT/UfzNxGYzwkP8c+Yz3C+r/i6DcyRL/rZ+utRwWH5PmfvcvYEt9jLDS/bg0/B64DWKrQM8AL8FPwS9beQCe6EMKNZYJol37jBMy35otdaz0Bw2H/C2Smc7+WGB0HWDELBmOByA3r5QONo4V+DpzR/hFS4U8wMW1PXNB4TOqYz9urxRV++ntWCw/U59Ty9ebdWbrgfRS9AYKKN63ZokZVygr8GZ/gfIhZXIXPsAlNjPOLBby5c1eOLvmQ9lwkOy5x6QV1j5TYqpS05JtUgUHUp5toHGsVfn4NX4RnMCe+AxTpwmApTYxqMxwfCeJGjpXzRF61nbcHhUBPqWze9svwcHJ+S6NPscKrEjug78Dx8Lj3T8D4YxGIdxmJcwhi34fzZUr7olevZCw5vkOhoClq5zBPZAnygD/Tl9EzDh6kl3VhsHYcDEb+hCtJSvuiV69kLDm+WycrOTArHmB5/VYyP6jOVjwgGawk2zQOaTcc1L+aLXrKeveDwZqlKrw8U9Y1p66uK8dEzdYwBeUQAY7DbyYNezBfdWQ97weEtAKYQg2xJIkuveAT3dYeLGH+ShrWNwZgN0b2YL7qznr3g8JYAo5bQBziPjx7BPZ0d9RCQp4UZbnFdzBddor4XHN4KYMrB2qHFRIzzcLAHQZ5the5ovui94PCWAPefaYnxIdzRwdHCbuR4B+tbiy96Lzi8E4D7z7S0mEPd+eqO3cT53Z0Y8SV80XvB4Z0ADJi/f7X113f+7p7/+UYBvur6657/+YYBvur6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+VMA8FXWX/f8z58OgK+y/rrnf75RgLna+uue//lTA/CV1V/3/M837aKvvv6653++UQvmauuve/7nTwfAV1N/3fM/fzr24Cuuv+75nz8FFnxl9dc9//MOr/8/glixwRuUfM4AAAAASUVORK5CYII="},i$a.prototype.getSearchTexture=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII="};var q$8=[];function _$a(e){this._prepassRenderer=e._prepassRenderer;var t=i$b.createFXAAStage(e._scene.context),i=i$b.createAmbientOcclusionStage(),n=i$b.createBloomStage(),r=i$b.createOutlineStage(),o=i$b.createFogStage(),a=i$b.createRainStage(),s=i$b.createSnowStage(),l=i$b.createScreenSpaceReflectionStage(this._prepassRenderer);this._autoExposureEnabled=!1,this._autoExposure=i$b.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=M$8.ACES;var u=this._tonemapping;i.enabled=!1,n.enabled=!1,u.enabled=!1,o.enabled=!1,a.enabled=!1,s.enabled=!1,l.enabled=!1,t.enabled=!1;var c=new g$r(this),h={},d=q$8;for(d.push(t,i,n,u,r,o,s,a,l);d.length>0;){var f=d.pop();h[f.name]=f,f._textureCache=c;var p=f.length;if(e$2e(p))for(var _=0;_<p;++_)d.push(f.get(_))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;var m=this;i.uniforms.randomTexture=function(){return m._randomTexture},this._ao=i,this._bloom=n,this._fxaa=t,this._smaa=new i$a,this._smaa.enabled=!0,this._outline=r,this._fog=o,this._rain=a,this._snow=s,this._screenSpaceReflection=l,this._lastLength=void 0,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._smaaEnabled=void 0,this._ssrEnabled=void 0,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=h,this._textureCache=c}function U$7(e){if(e._stagesRemoved){e._stagesRemoved=!1;for(var t=[],i=e._stages,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._stages=t}}function y$9(e){for(;e$2e(e.length);)e=e.get(e.length-1);return e.outputTexture}function m$b(e,t,i,n,r){if(e$2e(e.execute))e.execute(t,i,n,r);else{var o,a=e.length;if(e.inputPreviousStageTexture)for(m$b(e.get(0),t,i,n,r),o=1;o<a;++o)m$b(e.get(o),t,y$9(e.get(o-1)),n,r);else for(o=0;o<a;++o)m$b(e.get(o),t,i,n,r)}}Object.defineProperties(_$a.prototype,{ready:{get:function(){for(var e=!1,t=this._stages,i=t.length-1;i>=0;--i){var n=t[i];e=e||n.ready&&n.enabled}var r=this._fxaa,o=this._smaa,a=this._ao,s=this._bloom,l=this._tonemapping,u=this._screenSpaceReflection;return e=(e=(e=(e=(e=(e=e||r.ready&&r.enabled)||o.ready&&o.enabled)||a.ready&&a.enabled)||s.ready&&s.enabled)||l.ready&&l.enabled)||u.ready&&u.enabled}},fxaa:{get:function(){return this._fxaa}},smaa:{get:function(){return this._smaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},outline:{get:function(){return this._outline}},rain:{get:function(){return this._rain}},snow:{get:function(){return this._snow}},screenSpaceReflection:{get:function(){return this._screenSpaceReflection}},fog:{get:function(){return this._fog}},length:{get:function(){return U$7(this),this._stages.length}},outputTexture:{get:function(){var e=this._smaa;if(e.enabled)return e.getSMAATexture();var t=this._fxaa;if(t.enabled&&t.ready)return this.getOutputTexture(t.name);for(var i=this._stages,n=i.length-1;n>=0;--n){var r=i[n];if(e$2e(r)&&r.ready&&r.enabled)return this.getOutputTexture(r.name)}var o=this._tonemapping;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);var a=this._screenSpaceReflection;if(a.screenSpaceReflection&&a.ready)return this.getOutputTexture(a.name);var s=this._bloom;if(s.enabled&&s.ready)return this.getOutputTexture(s.name);var l=this._ao;return l.enabled&&l.ready?this.getOutputTexture(l.name):void 0}},hasSelected:{get:function(){for(var e=l$R(this._stages);e.length>0;){var t=e.pop();if(e$2e(t)){if(e$2e(t.selected))return!0;var i=t.length;if(e$2e(i))for(var n=0;n<i;++n)e.push(t.get(n))}}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper!==e){if(!M$8.validate(e))throw new t$15("tonemapper was set to an invalid value.");e$2e(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());var t,i=this._autoExposureEnabled;switch(e){case M$8.REINHARD:t=i$b.createReinhardTonemappingStage(i);break;case M$8.MODIFIED_REINHARD:t=i$b.createModifiedReinhardTonemappingStage(i);break;case M$8.FILMIC:t=i$b.createFilmicTonemappingStage(i);break;default:t=i$b.createAcesTonemappingStage(i)}if(i){var n=this._autoExposure;t.uniforms.autoExposure=function(){return n.outputTexture}}this._tonemapper=e,this._tonemapping=t,e$2e(this._stageNames)&&(this._stageNames[t.name]=t,t._textureCache=this._textureCache),this._textureCacheDirty=!0}}}}),_$a.prototype.add=function(e){o$1q.typeOf.object("stage",e);var t=this._stageNames,i=q$8;for(i.push(e);i.length>0;){var n=i.pop();if(e$2e(t[n.name]))throw new t$15(n.name+" has already been added to the collection or does not have a unique name.");t[n.name]=n,n._textureCache=this._textureCache;var r=n.length;if(e$2e(r))for(var o=0;o<r;++o)i.push(n.get(o))}var a=this._stages;return e._index=a.length,a.push(e),this._textureCacheDirty=!0,e},_$a.prototype.remove=function(e){if(!this.contains(e))return!1;var t=this._stageNames,i=q$8;for(i.push(e);i.length>0;){var n=i.pop();delete t[n.name];var r=n.length;if(e$2e(r))for(var o=0;o<r;++o)i.push(n.get(o))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0},_$a.prototype.contains=function(e){return e$2e(e)&&e$2e(e._index)&&e._textureCache===this._textureCache},_$a.prototype.get=function(e){U$7(this);var t=this._stages,i=t.length;return o$1q.typeOf.number.greaterThanOrEquals("stages length",i,0),o$1q.typeOf.number.greaterThanOrEquals("index",e,0),o$1q.typeOf.number.lessThan("index",e,i),t[e]},_$a.prototype.removeAll=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)this.remove(e[i]);e.length=0},_$a.prototype.getStageByName=function(e){return this._stageNames[e]},new e$1X,new e$1X,_$a.prototype.update=function(e,t,i,n){U$7(this);var r=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=r;var a,s,l=this._stages,u=o.length=l.length,c=0;for(a=0;a<u;++a)(s=l[a]).ready&&s.enabled&&s._isSupported(e)&&(o[c++]=s);o.length=c;var h=c!==r.length;if(!h)for(a=0;a<c;++a)if(o[a]!==r[a]){h=!0;break}var d=this._ao,f=this._bloom,p=this._autoExposure,_=this._tonemapping,m=this._fxaa,g=this._smaa,x=this._outline,y=this._fog,v=this._rain,$=this._snow,b=this._screenSpaceReflection;_.enabled=i;var T=d.enabled&&d._isSupported(e),C=f.enabled&&f._isSupported(e),S=_.enabled&&_._isSupported(e),w=m.enabled&&m._isSupported(e),E=g.enabled,P=y.enabled,A=v.enabled,L=$.enabled,M=x.enabled,R=b.enabled;if((h||this._textureCacheDirty||c!==this._lastLength||T!==this._aoEnabled||P!==this._fogEnabled||A!==this._rainEnabled||L!==this._snowEnabled||C!==this._bloomEnabled||S!==this._tonemappingEnabled||w!==this._fxaaEnabled||E!==this._smaaEnabled||R!==this._ssrEnabled)&&(this._textureCache.updateDependencies(),this._lastLength=c,this._aoEnabled=T,this._fogEnabled=P,this._rainEnabled=A,this._snowEnabled=L,this._bloomEnabled=C,this._tonemappingEnabled=S,this._fxaaEnabled=w,this._smaaEnabled=E,this._ssrEnabled=R,this._textureCacheDirty=!1),e$2e(this._randomTexture)&&!T&&(this._randomTexture.destroy(),this._randomTexture=void 0),M){var O=n._layers.getSelectedLayer();e$2e(O)&&(O._selectColorType===Zr$3.SILHOUETTE_EDGE?x.uniforms.visibleEdgeColor=e$1X.clone(O._selectedLineColor):x.uniforms.visibleEdgeColor=e$1X.WHITE)}if(!e$2e(this._randomTexture)&&T){u=196608;var D=new Uint8Array(u);for(a=0;a<u;a+=3)D[a]=Math.floor(255*Math.random());this._randomTexture=new t$U({context:e,pixelFormat:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE,source:{arrayBufferView:D,width:256,height:256},sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})}for(this._textureCache.update(e),m.update(e,t),g.update(e,t),d.update(e,t),f.update(e,t),_.update(e,t),x.update(e,t),y.update(e,t),v.update(e,t),$.update(e,t),b.update(e,t),this._autoExposureEnabled&&p.update(e,t),u=l.length,a=0;a<u;++a)l[a].update(e,t)},_$a.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)},_$a.prototype.getOutputTexture=function(e){var t=this.getStageByName(e);if(e$2e(t))return y$9(t)},_$a.prototype.execute=function(e,t,i,n){var r=this._activeStages,o=r.length,a=this._fxaa,s=this._smaa,l=this._ao,u=this._bloom,c=this._autoExposure,h=this._tonemapping,d=this._outline,f=this.compositor,p=this._fog,_=this._rain,m=this._snow,g=this._screenSpaceReflection,x=l.enabled&&l._isSupported(e),y=u.enabled&&u._isSupported(e),v=this._autoExposureEnabled,$=h.enabled&&h._isSupported(e),b=a.enabled&&a._isSupported(e),T=s.enabled,C=d.enabled,S=p.enabled,w=_.enabled,E=m.enabled,P=g.enabled;if(S||w||E||P||C||T||b||x||y||$||0!==o){var A=t;C&&d.ready&&e$2e(e.uniformState.maskTexture)&&(m$b(d,e,A,i,n),A=y$9(d)),e$2e(f)&&f.isEnable()&&(f.copy(e,A),f.execute(e,f.outputFbo),A=f.outputFbo.getColorTexture(0)),x&&l.ready&&(m$b(l,e,A,i,n),A=y$9(l)),y&&u.ready&&(m$b(u,e,A,i,n),A=y$9(u)),v&&c.ready&&m$b(c,e,A,i,n),$&&h.ready&&(m$b(h,e,A,i,n),A=y$9(h));var L=A;if(o>0){m$b(r[0],e,A,i,n);for(var M=1;M<o;++M)m$b(r[M],e,y$9(r[M-1]),i,n);L=y$9(r[o-1])}S&&(m$b(p,e,L,i,n),L=y$9(p)),P&&g.ready&&(m$b(g,e,L,i,n),L=y$9(g)),E&&(m$b(m,e,L,i,n),L=y$9(m)),w&&(m$b(_,e,L,i,n),L=y$9(_)),b&&a.ready&&m$b(a,e,L,i,n),T&&(s.setInputTexture(L),s.execute(e))}};var S$5=new f$1a;function v$9(e){this._url=e,this._rgbeLoader=new U$i,this._sourceData=void 0,this._loading=!1,this._width=1,this._height=1,this._inputTexture=void 0,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._outputTexture=void 0,this._pingPongTexture=void 0,this._ready=!1}_$a.prototype.copy=function(e,t,i){if(e.webgpu?(S$5.x=0,S$5.y=0,S$5.width=e.drawingBufferWidth,S$5.height=e.drawingBufferHeight):(S$5.x=0,S$5.y=0,S$5.width=e.realDrawingBufferWidth,S$5.height=e.realDrawingBufferHeight,S$5.x+=-e._curCol/e._cols*e.realDrawingBufferWidth,S$5.y+=-(e._rows-e._curRow-1)/e._rows*e.realDrawingBufferHeight),!e$2e(this._copyColorCommand)){var n,r=this;i&&!e.webgpu&&e.fragmentDepth&&e.depthTexture&&!e.webglOptions.preserveDrawingBuffer?n=new s$V({sources:[n=["#extension GL_EXT_frag_depth : enable","#extension GL_OES_standard_derivatives : enable","uniform sampler2D colorTexture;","varying vec2 v_textureCoordinates;","void main()","{","float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));","gl_FragDepthEXT = logDepthOrDepth;","gl_FragColor = texture2D(colorTexture, v_textureCoordinates);","}"].join("\n")],defines:i?["LOG_DEPTH"]:[]}):n=ie$7,this._copyColorCommand=e.createViewportQuadCommand(n,{shaderProgramName:"postPorcessCopyColor",uniformMap:{colorTexture:function(){return r.outputTexture}},owner:this})}var o=d$1m.fromCache({viewport:S$5,depthTest:{enabled:!e.webglOptions.preserveDrawingBuffer&&!e.webgpu}});this._copyColorCommand.renderState=o,this._copyColorCommand.framebuffer=t,(e.fragmentDepth&&e$2e(e.uniformState.globeDepthTexture)||!e.fragmentDepth||!e.depthTexture)&&this._copyColorCommand.execute(e)},_$a.prototype.isDestroyed=function(){return!1},_$a.prototype.destroy=function(){return this._fxaa.destroy(),this._smaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),i$11(this)},Object.defineProperties(v$9.prototype,{ready:{get:function(){return this._ready}},texture:{get:function(){return this._outputTexture}}});const Y$4="\n precision mediump float;\n precision mediump int;\n\n attribute vec4 position;\n attribute vec2 uv;\n attribute float faceIndex;\n\n varying vec3 vOutputDirection;\n\n // RH coordinate system; PMREM face-indexing convention\n vec3 getDirection( vec2 uv, float face ) {\n\n uv = 2.0 * uv - 1.0;\n\n vec3 direction = vec3( uv, 1.0 );\n\n if ( face == 0.0 ) {\n\n direction = direction.zyx; // ( 1, v, u ) pos x\n\n } else if ( face == 1.0 ) {\n\n direction = direction.xzy;\n direction.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n } else if ( face == 2.0 ) {\n\n direction.x *= -1.0; // ( -u, v, 1 ) pos z\n\n } else if ( face == 3.0 ) {\n\n direction = direction.zyx;\n direction.xz *= -1.0; // ( -1, v, -u ) neg x\n\n } else if ( face == 4.0 ) {\n\n direction = direction.xzy;\n direction.xy *= -1.0; // ( -u, -1, v ) neg y\n\n } else if ( face == 5.0 ) {\n\n direction.z *= -1.0; // ( u, v, -1 ) neg z\n\n }\n\n return direction;\n\n }\n\n void main() {\n\n vOutputDirection = getDirection( uv, faceIndex );\n gl_Position = vec4( position.xyz, 1.0 );\n\n }\n",ie$3="\n precision mediump float;\n precision mediump int;\n\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n\n #define RECIPROCAL_PI 0.3183098861837907\n #define RECIPROCAL_PI2 0.15915494309189535\n\n vec2 equirectUv( in vec3 dir ) {\n\n // dir is assumed to be unit length\n \n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n \n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n \n return vec2( u, v );\n \n }\n\n void main() {\n\n vec3 outputDirection = normalize( vOutputDirection );\n vec2 uv = equirectUv( outputDirection );\n\n gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n }\n",oe$6="\n precision mediump float;\n precision mediump int;\n #extension GL_EXT_shader_texture_lod : enable\n #define ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\t#define n 20\n\t#define CUBEUV_TEXEL_WIDTH 0.0013020833333333333\n\t#define CUBEUV_TEXEL_HEIGHT 0.0009765625\n\t#define CUBEUV_MAX_MIP 8.0\n\t\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n uniform int samples;\n uniform float weights[ n ];\n uniform bool latitudinal;\n uniform float dTheta;\n uniform float mipInt;\n uniform vec3 poleAxis;\n\n float getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\t\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\t\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\n\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t}\n\n vec3 getSample( float theta, vec3 axis ) {\n\n float cosTheta = cos( theta );\n // Rodrigues' axis-angle rotation\n vec3 sampleDirection = vOutputDirection * cosTheta\n + cross( axis, vOutputDirection ) * sin( theta )\n + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n return bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n }\n\n void main() {\n\n vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n if ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n }\n\n axis = normalize( axis );\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n for ( int i = 1; i < n; i++ ) {\n\n if ( i >= samples ) {\n\n break;\n\n }\n\n float theta = dTheta * float( i );\n gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n }\n \n }\n",g$h=(1+Math.sqrt(5))/2,D$6=1/g$h,E$9=20,k$8=[new o$1p(1,1,1),new o$1p(-1,1,1),new o$1p(1,1,-1),new o$1p(-1,1,-1),new o$1p(0,g$h,D$6),new o$1p(0,g$h,-D$6),new o$1p(D$6,0,g$h),new o$1p(-D$6,0,g$h),new o$1p(g$h,D$6,0),new o$1p(-g$h,D$6,0)],A$d=4,J$4=[.125,.215,.35,.446,.526,.582];function ne$5(e,t){const i=[],n=[],r=[];let o=t;const a=t-A$d+1+J$4.length;for(let s=0;s<a;s++){const a=Math.pow(2,o);n.push(a);let l=1/a;s>t-A$d?l=J$4[s-t+A$d-1]:0===s&&(l=0),r.push(l);const u=1/(a-2),c=-u,h=1+u,d=[c,c,h,c,h,h,c,c,h,h,c,h],f=6,p=6,_=3,m=2,g=1,x=new Float32Array(_*p*f),y=new Float32Array(m*p*f),v=new Float32Array(g*p*f);for(let e=0;e<f;e++){const t=e%3*2/3-1,i=e>2?0:-1,n=[t,i,0,t+2/3,i,0,t+2/3,i+1,0,t,i,0,t+2/3,i+1,0,t,i+1,0];x.set(n,_*p*e),y.set(d,m*p*e);const r=[e,e,e,e,e,e];v.set(r,g*p*e)}const $=t$X.createVertexBuffer({context:e,typedArray:x,usage:A$18.STATIC_DRAW}),b=t$X.createVertexBuffer({context:e,typedArray:y,usage:A$18.STATIC_DRAW}),T=t$X.createVertexBuffer({context:e,typedArray:v,usage:A$18.STATIC_DRAW}),C=new c$13({context:e,attributes:[{name:"position",index:0,vertexBuffer:$,componentsPerAttribute:3,componentDatatype:S$14.FLOAT},{name:"uv",index:1,vertexBuffer:b,componentsPerAttribute:2,componentDatatype:S$14.FLOAT},{name:"faceIndex",index:2,vertexBuffer:T,componentsPerAttribute:1,componentDatatype:S$14.FLOAT}]});i.push(C),o>A$d&&o--}return{lodPlanes:i,sizeLods:n,sigmas:r}}function re$5(e,t){const i=e.context,n=r$14.fromCache({context:i,vertexShaderSource:Y$4,fragmentShaderSource:ie$3,attributeLocations:{position:0,uv:1,faceIndex:2}}),r=t._lodPlanes[0],o={envMap:function(){return t._inputTexture}},a=new t$U({context:i,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,width:t._width,height:t._height}),s=new t$H({name:"Prefilter",vertexArray:r,shaderProgram:n,uniformMap:o,outputTexture:a,persists:!0,renderState:d$1m.fromCache({viewport:new f$1a(0,0,3*t._cubeSize,2*t._cubeSize)}),owner:t});t._outputTexture=a,e.commandList.push(s)}v$9.prototype._halfBlur=function(e,t,i,n,r,o,a,s){const l=this._sizeLods[n]-1,u=isFinite(o)?Math.PI/(2*l):2*Math.PI/(2*E$9-1),c=o/u,h=isFinite(o)?1+Math.floor(3*c):E$9,d=[];let f=0;for(let e=0;e<E$9;++e){const t=e/c,i=Math.exp(-t*t/2);d.push(i),0===e?f+=i:e<h&&(f+=2*i)}for(let e=0;e<d.length;e++)d[e]=d[e]/f;const{_lodMax:p}=this,_=this._sizeLods[r],m=3*_*(r>p-A$d?r-p+A$d:0),g=4*(this._cubeSize-_),x=this._lodPlanes[r],y=this._blurSP,v={envMap:function(){return this.properties.envMap},samples:function(){return this.properties.samples},weights:function(){return this.properties.weights},latitudinal:function(){return this.properties.latitudinal},dTheta:function(){return this.properties.dTheta},mipInt:function(){return this.properties.mipInt},poleAxis:function(){return this.properties.poleAxis},properties:{envMap:null,samples:1,weights:new Float32Array(E$9),latitudinal:!1,dTheta:0,mipInt:0,poleAxis:new o$1p(0,1,0)}};v.properties.envMap=t,v.properties.samples=h,v.properties.weights=d,v.properties.latitudinal="latitudinal"===a,s&&(v.properties.poleAxis=s),v.properties.dTheta=u,v.properties.mipInt=p-n;const $=new t$H({name:"PrefilterHalfBlur",vertexArray:x,shaderProgram:y,uniformMap:v,outputTexture:i,persists:!0,renderState:d$1m.fromCache({viewport:new f$1a(m,g,3*_,2*_)}),clear:!1,owner:this});e.commandList.push($)},v$9.prototype._blur=function(e,t,i,n,r,o){const a=this._pingPongTexture;this._halfBlur(e,t,a,i,n,r,"latitudinal",o),this._halfBlur(e,a,t,n,n,r,"longitudinal",o)},v$9.prototype.update=function(e){const t=e.context;e$2e(this._sourceData)||this._loading||(t$10.createIfNeeded(this._url).fetchArrayBuffer().then((e=>{this._sourceData=this._rgbeLoader.parse(e),this._loading=!1})).otherwise((e=>{this._loading=!1})),this._loading=!0);if(e$2e(this._sourceData)){if(!e$2e(this._inputTexture)){this._inputTexture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,flipY:!0,source:{arrayBufferView:this._sourceData.data,width:this._sourceData.width,height:this._sourceData.height}}),this._lodMax=Math.floor(Math.log2(this._inputTexture.width/4)),this._cubeSize=Math.pow(2,this._lodMax),this._width=3*Math.max(this._cubeSize,112),this._height=4*this._cubeSize;const{_lodMax:e}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=ne$5(t,e)),this._blurSP=r$14.fromCache({context:t,vertexShaderSource:Y$4,fragmentShaderSource:oe$6,attributeLocations:{position:0,uv:1,faceIndex:2}}),this._pingPongTexture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,width:this._width,height:this._height})}if(!this._ready){re$5(e,this);for(let t=1;t<this._lodPlanes.length;t++){const i=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),n=k$8[(t-1)%k$8.length];this._blur(e,this._outputTexture,t-1,t,i,n)}this._ready=!0}}},v$9.prototype.isDestroyed=function(){return!1},v$9.prototype.destroy=function(){return this._inputTexture=this._inputTexture&&this._inputTexture.destroy(),this._pingPongTexture=this._pingPongTexture&&this._pingPongTexture.destroy(),this._outputTexture=this._outputTexture&&this._outputTexture.destroy(),this._blurSP=this._blurSP&&this._blurSP.destroy(),i$11(this)};var d$f=2e4;function h$8(e){this._positionArray=e,this.type="PLANE",this.planeWidth=1,this.planeHeight=1,this._center=new o$1p,this.init(),this._volBounds=void 0}h$8.prototype.createVertices=function(e){var t=S$14.createTypedArray(S$14.FLOAT,12),i=0;return t[i++]=this._topPoint1.x-e.x,t[i++]=this._topPoint1.y-e.y,t[i++]=this._topPoint1.z-e.z,t[i++]=this._topPoint2.x-e.x,t[i++]=this._topPoint2.y-e.y,t[i++]=this._topPoint2.z-e.z,t[i++]=this._bottomPoint1.x-e.x,t[i++]=this._bottomPoint1.y-e.y,t[i++]=this._bottomPoint1.z-e.z,t[i++]=this._bottomPoint2.x-e.x,t[i++]=this._bottomPoint2.y-e.y,t[i++]=this._bottomPoint2.z-e.z,t},h$8.prototype.createTexCoords=function(){var e=S$14.createTypedArray(S$14.FLOAT,8);return e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=0,e[5]=1,e[6]=1,e[7]=1,e},h$8.prototype.createNormals=function(){return S$14.createTypedArray(S$14.FLOAT,12)},h$8.prototype.init=function(){this._topPoint1=this._positionArray[0],this._topPoint2=this._positionArray[1];var e=a$18.fromCartesian(this._positionArray[0]),t=a$18.fromCartesian(this._positionArray[1]),i=a$18.clone(e),n=a$18.clone(t);e.height+=.5*d$f,t.height+=.5*d$f,i.height-=d$f,n.height-=d$f,this._topPoint1=a$18.toCartesian(e),this._topPoint2=a$18.toCartesian(t),this._bottomPoint1=a$18.toCartesian(i),this._bottomPoint2=a$18.toCartesian(n),this.planeWidth=o$1p.distance(this._topPoint1,this._topPoint2),this.planeHeight=d$f;var r=[];r.push(this._topPoint1),r.push(this._topPoint2),r.push(this._bottomPoint1),r.push(this._bottomPoint2),this.boundingSphere=i$1d.fromPoints(r);var o=r.length,a=this;r.map((function(e){a._center.x+=e.x/o,a._center.y+=e.y/o,a._center.z+=e.z/o}));var s={};p$1d.fromRotationTranslation(p$1e.IDENTITY,this._center,s),this.modelMatrix=s},h$8.prototype.getVertexArray=function(e){var t=this.createVertices(this._center),i=t$X.createVertexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW}),n=this.createNormals(this._center),r=t$X.createVertexBuffer({context:e,typedArray:n,usage:A$18.STATIC_DRAW}),o=this.createTexCoords(),a=t$X.createVertexBuffer({context:e,typedArray:o,usage:A$18.STATIC_DRAW}),s=[];if(s.push({name:"aPosition",index:0,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({name:"aNormal",index:1,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({name:"aTexCoord",index:2,vertexBuffer:a,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),e$2e(this._volBounds)){for(var l=S$14.createTypedArray(S$14.FLOAT,12),u=[this._topPoint1,this._topPoint2,this._bottomPoint1,this._bottomPoint2],c=0;c<4;c++){var h=a$18.fromCartesian(u[c]),d=e$2d.toDegrees(h.longitude),f=e$2d.toDegrees(h.latitude),p=h.height,_=(d-this._volBounds.left)/(this._volBounds.right-this._volBounds.left),m=(f-this._volBounds.bottom)/(this._volBounds.top-this._volBounds.bottom),g=(p-this._volBounds.minHeight)/(this._volBounds.maxHeight-this._volBounds.minHeight);l[3*c]=_,l[3*c+1]=m,l[3*c+2]=g}var x=t$X.createVertexBuffer({context:e,typedArray:l,usage:A$18.STATIC_DRAW});s.push({index:3,vertexBuffer:x,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}var y=S$14.createTypedArray(S$14.UNSIGNED_SHORT,6);return y[0]=0,y[1]=1,y[2]=3,y[3]=0,y[4]=3,y[5]=2,new c$13({context:e,attributes:s,indexBuffer:t$X.createIndexBuffer({context:e,typedArray:y,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})})},h$8.prototype.destroy=function(){return i$11(this)};var _0x26ca37=(_0xaaab11=!0,function(e,t){var i=_0xaaab11?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xaaab11=!1,i}),_0x238501=_0x26ca37(void 0,(function(){return _0x238501.toString().search("(((.+)+)+)+$").toString().constructor(_0x238501).search("(((.+)+)+)+$")})),_0xaaab11;_0x238501();var V$8="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uClampIDTexture;\nuniform sampler2D uClampColorTexture;\nuniform sampler2D uModelTexture;\nuniform vec4 uModelTextureRect;\nuniform vec4 uModelColor;\nuniform vec3 uHasModelTextureAndPixelLength;\nuniform vec3 uModelTextureTiling;\nuniform vec4 uModelIDColor;\nuniform vec4 uProfilePickColor;\nuniform bool uPicking;\nuniform vec4 uHighLightColor;\nuniform float uUseOriModelTex;\nuniform float uClippingType;\nvarying vec2 v_texCoord;\nvarying float v_face;\n#ifdef Volume2\nvarying vec3 vecRotioCoord;\n#endif\nvoid main()\n{\nvec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\nvec4 idColor = texture2D(uClampIDTexture, texCoord) * 255.0;\nif((gl_FrontFacing && uClippingType < 1.5) || idColor.r != uModelIDColor.r || idColor.g != uModelIDColor.g || idColor.b != uModelIDColor.b)\n{\n discard;\n}\nif(uPicking){\n gl_FragColor = uProfilePickColor;\n return;\n}\nvec4 color = texture2D(uClampColorTexture, texCoord);\ntexCoord = mod(v_texCoord * uModelTextureTiling.xy, vec2(1.0));\n#ifdef GEOBOX\n if(v_face > -0.1 && v_face < 0.1)\n {\n texCoord = mod(v_texCoord * uModelTextureTiling.xy, vec2(1.0));\n }\n else if(v_face > 0.5)\n {\n texCoord = mod(v_texCoord * vec2(uModelTextureTiling.zy), vec2(1.0));\n }\n else if(v_face < -0.5)\n {\n texCoord = mod(v_texCoord * vec2(uModelTextureTiling.zx), vec2(1.0));\n }\n#endif\nvec2 pixelSize = uHasModelTextureAndPixelLength.yz;\ntexCoord = clamp(texCoord, pixelSize, 1.0 - pixelSize);\nvec2 modelTexCoord = uUseOriModelTex > 0.5 ? v_texCoord : mix(uModelTextureRect.xy, uModelTextureRect.zw, texCoord);\nvec4 texColor = texture2D(uModelTexture, modelTexCoord);\ngl_FragColor = uUseOriModelTex > 0.5 ? texColor * color * uHighLightColor : mix(uModelColor, texColor, uHasModelTextureAndPixelLength.x) * uHighLightColor * color;\n#ifdef Volume\n#ifdef Volume2\n if((vecRotioCoord.x < 1.0 && vecRotioCoord.x >0.0) && (vecRotioCoord.y < 1.0 && vecRotioCoord.y >0.0) && (vecRotioCoord.z < 1.0 && vecRotioCoord.z >0.0))\n {\n gl_FragColor = czm_getVolumeValue(vecRotioCoord);\n }\n#else\n float wValue = 0.0;\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, wValue);\n#endif\n#endif\n}";function f$a(e,t,i,n){this._scene=e._scene,this._attributeLocations={aPosition:0,aNormal:1,aTexCoord:2},this._geometry=n,this._drawCommandInClampTexture=null,this._drawCommandInScene=null,this._drawCommandNormal=null,this._drawCommandInScenePreModel={},this._clampFramebuffer=null,this._name="solidModelsProfile_"+e._name+"_"+t.toString(),this._textureAtlas=e._textureAtlas,this._modelInfo=i,this._picking=!1,this._owner=e,this._clippingType=R$L.KeepInside,this._volume=void 0,this._width=1,this._height=1,this._start=!1}f$a.prototype.createCommand=function(e){var t=p$1d.clone(this._geometry.modelMatrix),i=this._geometry.boundingSphere,n=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:t,pass:Le$q.OPAQUE,cull:!1,boundingVolume:i});n.vertexArray=this._geometry.getVertexArray(e);var r=new s$V({name:"ClipPlaneVp",sources:[R$M]}),o=new s$V({name:"SolidProfileFp",sources:[V$8]});r.defines.push("HAS_TEXTURECOORD"),this._geometry.type==P$U.GEOCYLINDER?(r.defines.push("GEOCYLINDER"),o.defines.push("GEOCYLINDER")):this._geometry.type==P$U.GEOBOX&&(r.defines.push("GEOBOX"),o.defines.push("GEOBOX")),e$2e(this._volume)&&(r.defines.push("Volume"),o.defines.push("Volume"),this._volume.hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(r.defines.push("Volume2"),o.defines.push("Volume2"))),p$1d.equals(t,p$1d.IDENTITY)&&r.defines.push("USE_RelativeOrigin"),n.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),n.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:{enabled:!0},blending:Ee$r.ALPHA_BLEND});for(var a in this._drawCommandInScene=n,this._modelInfo)this.copyCommandForSingleModel(a,this._modelInfo[a],this._drawCommandInScene,e);this.createCommandInClampTexture(n,e),this.createNormalCommand(this._drawCommandInClampTexture,e)};var C$8=new o$1p,g$g=new e$2c,l$b=new o$1p,v$8=new o$1p,m$a=new e$1X;function L$b(e){e$2e(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}function r$e(){t$15.throwInstantiationError()}f$a.prototype.copyCommandForSingleModel=function(e,t,i,n){var r=i$$.shallowClone(i),o=this;r.uniformMap={uClampIDTexture:function(){var e=o._clampFramebuffer;return e$2e(e)?e.renderTexture._fb.getColorTexture(0):n.defaultTexture},uClampColorTexture:function(){var e=o._clampFramebuffer;return e$2e(e)&&2===e.renderTexture._fb.numberOfColorAttachments?e.renderTexture._fb.getColorTexture(1):n.defaultTexture},uModelColor:function(){return t.color},uHasModelTextureAndPixelLength:function(){if(v$8.x=t.textureAtlasID>=0?1:0,e$2e(o._textureAtlas)){var e=o._textureAtlas.texture.width,i=o._textureAtlas.texture.height,n=o._textureAtlas.textureCoordinates[t.textureAtlasID];if(e$2e(n)){var r=n.width*e,a=n.height*i;v$8.y=1/r,v$8.z=1/a}}return v$8},uUseOriModelTex:function(){return!e$2e(o._textureAtlas)&&e$2e(t.texture)},uModelTexture:function(){return e$2e(o._textureAtlas)?o._textureAtlas.texture:e$2e(t.texture)?t.texture:n.defaultTexture},uModelTextureRect:function(){if(e$2e(o._textureAtlas)){var e=o._textureAtlas.textureCoordinates[t.textureAtlasID];e$2e(e)&&(g$g.x=e.x,g$g.y=e.y,g$g.z=e.x+e.width,g$g.w=e.y+e.height)}return g$g},uModelTextureTiling:function(){return"PLANE"==o._geometry.type?(l$b.x=o._geometry.planeWidth/t.textureTilingU,l$b.y=o._geometry.planeHeight/t.textureTilingV):o._geometry.type==P$U.GEOCYLINDER?(l$b.x=2*Math.PI*o._geometry.geoTopRadius/t.textureTilingU,l$b.y=o._geometry.geoHeight/t.textureTilingV):o._geometry.type==P$U.GEOREGION3D?(l$b.x=o._geometry.width/t.textureTilingU,l$b.y=o._geometry.height/t.textureTilingV):o._geometry.type==P$U.GEOBOX&&(l$b.x=o._geometry.geoWidth/t.textureTilingU,l$b.y=o._geometry.geoHeight/t.textureTilingV,l$b.z=o._geometry.geoLength/t.textureTilingU),l$b},uClippingType:function(){return o._clippingType},uGeometryHeight:function(){return o._geometry.type==P$U.GEOCYLINDER?o._geometry.geoHeight:1},uModelIDColor:function(){return C$8.x=t.pickColor.x,C$8.y=t.pickColor.y,C$8.z=t.pickColor.z,C$8},uProfilePickColor:function(){return t.profilePickId.color},uPicking:function(){return o._picking},uHighLightColor:function(){var e=o._owner._selectedProfileIDs;if(0==e.length)m$a.red=1,m$a.green=1,m$a.blue=1;else{var i=!1;e.map((function(e){t.id==e&&(i=!0)})),i?(m$a.red=.7,m$a.green=.7,m$a.blue=1):(m$a.red=1,m$a.green=1,m$a.blue=1)}return m$a},uVolumeTexture:function(){return o._volume._volTexture},width:function(){return o._volume._volImageBuffer.nWidth},height:function(){return o._volume._volImageBuffer.nHeight},depth:function(){return o._volume._volImageBuffer.nDepth},sideBlockCount:function(){return o._volume._volImageBuffer.nSideBlockCount},blockLength:function(){return o._volume._volImageBuffer.nBlockLength},texLength:function(){return o._volume._volImageBuffer.nLength},uFilterMode:function(){var e=0;return e$2e(o._volume.hypsometricSetting)&&o._volume.hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(e=1),e},uMixColorType:function(){return 0},uDataFloor:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMinKey:0},uDataCeil:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMaxKey:0},uVolumeType:function(){return e$2e(o._volume.hypsometricSetting)&&o._volume.hypsometricSetting.filterMode===k$S.FilterMode.LINEAR?0:1},uHypOpacity:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.Opacity:1},uHypContourInterval:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.LineInterval:100},uHypLineColor:function(){var e=new e$2c(0,1,1,1);return e$2e(o._volume.hypsometricSetting)&&(e.x=o._volume.hypsometricSetting.LineColor.red,e.y=o._volume.hypsometricSetting.LineColor.green,e.z=o._volume.hypsometricSetting.LineColor.blue,e.w=o._volume.hypsometricSetting.LineColor.alpha),e},uHypContourFillMode:function(){var e=1;if(e$2e(o._volume.hypsometricSetting))switch(o._volume.hypsometricSetting.DisplayMode){case k$S.DisplayMode.NONE:e=0;break;case k$S.DisplayMode.FACE:e=1;break;case k$S.DisplayMode.LINE:e=2;break;case k$S.DisplayMode.FACE_AND_LINE:e=3}return e},uHypFloor:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMaxKey:0},uHypMaxVisibleValue:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.MaxVisibleValue:0},uHypMinVisibleValue:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.MinVisibleValue:0},uNoValueColor:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.noValueColor:e$1X.WHITE},uHypsometricVisible:function(){return 1},uHypHasAnalysisRegion:function(){return 0},uHypsometricRenderTexture:function(){return 0},uHypsometricTexture:function(){return o._volume._hypsometricTexture}},this._drawCommandInScenePreModel[e]=r},f$a.prototype.createCommandInClampTexture=function(e,t){var i=i$$.shallowClone(e);i.pass=Le$q.OPAQUE;var n={enabled:!1};this._geometry.type===P$U.GEOREGION3D&&this._clippingType===R$L.KeepOutside&&(n.enabled=!0,n.face=de$y.FRONT),i.renderState=d$1m.fromCache({cull:n,depthTest:{enabled:!0},depthMask:!0,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:_0x45bcf8.createReceiveClampObjectStencilTest(!0)}),i.uniformMap={uDiffuseColor:function(){return e$1X.WHITE}};var r=new s$V({name:"CommonNoLigthNoTextureVp",sources:[Ht$8]});p$1d.equals(e._modelMatrix,p$1d.IDENTITY)&&r.defines.push("USE_RelativeOrigin"),i.shaderProgram=r$14.fromCache({name:"ProfileRenderClampTexture",context:t,vertexShaderSource:r,fragmentShaderSource:Yt$8,attributeLocations:this._attributeLocations}),this._drawCommandInClampTexture=i},f$a.prototype.createNormalCommand=function(e){this._drawCommandNormal=i$$.shallowClone(e),this._drawCommandNormal.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,colorMask:{red:!0,green:!0,blue:!0,alpha:!0},stencilTest:!1})},f$a.prototype.createClampFrameBuffer=function(e,t){e$2e(this._clampFramebuffer)||(this._frameState=t,e$2e(t._framebufferList[this._name])?this._clampFramebuffer=t._framebufferList[this._name]:(this._clampFramebuffer=e.createClampFramebuffer(),this._clampFramebuffer.renderTexture.mrt=!0,this._clampFramebuffer.isUpdate=this._start,t._framebufferList[this._name]=this._clampFramebuffer))},f$a.prototype._build=function(){this._start=!0,this._clampFramebuffer&&(this._clampFramebuffer.isUpdate=!0)},f$a.prototype.update=function(e,t,i,n){this._picking=t.passes.pick,this._frameState=t;var r=e.drawingBufferWidth,o=e.drawingBufferHeight;if((this._width!==r||this._height!==o)&&(this._width=r,this._height=o,e$2e(this._clampFramebuffer)&&(this._clampFramebuffer.renderTexture._mrt=!1)),(!e$2e(this._drawCommandInScene)||this._geometry._isGeometryDirty)&&(this.createCommand(e,t),this.createClampFrameBuffer(e,t)),t._fboState.frameBufferType==Qe$c.CLAMP)t._fboState.name==this._name&&i.push(this._drawCommandInClampTexture);else for(var a in this._geometry.type==P$U.GEOCYLINDER&&(e.webgpu&&(this._drawCommandNormal.pass=Le$q.OPAQUE-1),i.push(this._drawCommandNormal)),this._drawCommandInScenePreModel){var s=this._modelInfo[a];if(!o$1p.equals(s.pickColor,o$1p.ZERO)){var l=this._drawCommandInScenePreModel[a];i.push(l)}}},f$a.prototype.destroy=function(){return L$b(this._drawCommandInClampTexture),this._drawCommandInClampTexture=void 0,L$b(this._drawCommandInScene),this._drawCommandInScene=void 0,this._drawCommandNormal=void 0,this._drawCommandInScenePreModel={},e$2e(this._clampFramebuffer)&&(this._clampFramebuffer.destroy(),this._frameState._framebufferList[this._name]=void 0),e$2e(this._geometry)&&(this._geometry=null),i$11(this)},r$e.computeDefaultLevelZeroMaximumGeometricError=function(e){return 2*e.ellipsoid.maximumRadius*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))},Object.defineProperties(r$e.prototype,{quadtree:{get:t$15.throwInstantiationError,set:t$15.throwInstantiationError},ready:{get:t$15.throwInstantiationError},tilingScheme:{get:t$15.throwInstantiationError},errorEvent:{get:t$15.throwInstantiationError}}),r$e.prototype.update=t$15.throwInstantiationError,r$e.prototype.beginUpdate=t$15.throwInstantiationError,r$e.prototype.endUpdate=t$15.throwInstantiationError,r$e.prototype.getLevelMaximumGeometricError=t$15.throwInstantiationError,r$e.prototype.loadTile=t$15.throwInstantiationError,r$e.prototype.computeTileVisibility=t$15.throwInstantiationError,r$e.prototype.showTileThisFrame=t$15.throwInstantiationError,r$e.prototype.computeDistanceToTile=t$15.throwInstantiationError,r$e.prototype.isDestroyed=t$15.throwInstantiationError,r$e.prototype.destroy=t$15.throwInstantiationError;var e$5={LOW:1024,MEDIUM:2048,HIGH:4096},Quality=Object.freeze(e$5);function R$8(e){o$1q.typeOf.object("scene",e),this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}R$8.prototype.completeMorph=function(){e$2e(this._completeMorph)&&this._completeMorph()},R$8.prototype.morphTo2D=function(e,t){e$2e(this._completeMorph)&&this._completeMorph();var i=this._scene;this._previousMode=i.mode,this._morphToOrthographic=i.camera.frustum instanceof a$V,this._previousMode!==C$14.SCENE2D&&this._previousMode!==C$14.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,C$14.SCENE2D,!0),i._mode=C$14.MORPHING,i.camera._setTransform(p$1d.IDENTITY),this._previousMode===C$14.COLUMBUS_VIEW?be$3(this,e):Ze$3(this,e,t),0===e&&e$2e(this._completeMorph)&&this._completeMorph())};var ce$8=new o$1p,ae$4=new o$1p,se$4=new o$1p,pe$5=new o$1p,ue$6=new o$1p,me$6=new o$1p,he$5=new o$1p,fe$4=new a$18,de$4=new p$1d,ve$4=new o$15,le$6=new a$V,_e$2={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};R$8.prototype.morphToColumbusView=function(e,t){e$2e(this._completeMorph)&&this._completeMorph();var i=this._scene;if(this._previousMode=i.mode,this._previousMode!==C$14.COLUMBUS_VIEW&&this._previousMode!==C$14.MORPHING){this._scene.morphStart.raiseEvent(this,this._previousMode,C$14.COLUMBUS_VIEW,!0),i.camera._setTransform(p$1d.IDENTITY);var n,r=ce$8,o=ae$4,a=se$4;if(e>0)r.x=0,r.y=-1,r.z=1,r=o$1p.multiplyByScalar(o$1p.normalize(r,r),5*t.maximumRadius,r),o$1p.negate(o$1p.normalize(r,o),o),o$1p.cross(o$1p.UNIT_X,o,a);else{var s=i.camera;if(this._previousMode===C$14.SCENE2D)o$1p.clone(s.position,r),r.z=s.frustum.right-s.frustum.left,o$1p.negate(o$1p.UNIT_Z,o),o$1p.clone(o$1p.UNIT_Y,a);else{o$1p.clone(s.positionWC,r),o$1p.clone(s.directionWC,o),o$1p.clone(s.upWC,a);var l=t.scaleToGeodeticSurface(r,he$5),u=m$19.eastNorthUpToFixedFrame(l,t,de$4);p$1d.inverseTransformation(u,u),i.mapProjection.project(t.cartesianToCartographic(r,fe$4),r),p$1d.multiplyByPointAsVector(u,o,o),p$1d.multiplyByPointAsVector(u,a,a)}}this._morphToOrthographic?((n=le$6).width=i.camera.frustum.right-i.camera.frustum.left,n.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight):((n=ve$4).aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,n.fov=e$2d.toRadians(60));var c=_e$2;c.position=r,c.direction=o,c.up=a,c.frustum=n;var h=Ye$2(c);V$7(this,h),this._previousMode===C$14.SCENE2D?Qe$1(this,e,c,h):(c.position2D=p$1d.multiplyByPoint(v$K.TRANSFORM_2D,r,pe$5),c.direction2D=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o,ue$6),c.up2D=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,a,me$6),i._mode=C$14.MORPHING,K$5(this,e,c,h)),0===e&&e$2e(this._completeMorph)&&this._completeMorph()}};var A$c={position:new o$1p,direction:new o$1p,up:new o$1p,frustum:void 0},G$9=new o$15;function V$7(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new g$K(e._scene.canvas);var i=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=i,e._morphHandler.setInputAction(i,G$J.LEFT_DOWN),e._morphHandler.setInputAction(i,G$J.MIDDLE_DOWN),e._morphHandler.setInputAction(i,G$J.RIGHT_DOWN),e._morphHandler.setInputAction(i,G$J.WHEEL)}}function P$9(e){for(var t=e._currentTweens,i=0;i<t.length;++i)t[i].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}R$8.prototype.morphTo3D=function(e,t){e$2e(this._completeMorph)&&this._completeMorph();var i=this._scene;if(this._previousMode=i.mode,this._previousMode!==C$14.SCENE3D&&this._previousMode!==C$14.MORPHING){if(this._scene.morphStart.raiseEvent(this,this._previousMode,C$14.SCENE3D,!0),i._mode=C$14.MORPHING,i.camera._setTransform(p$1d.IDENTITY),this._previousMode===C$14.SCENE2D)Se$3(this,e,t);else{var n;e>0?(n=A$c,o$1p.fromDegrees(0,0,5*t.maximumRadius,t,n.position),o$1p.negate(n.position,n.direction),o$1p.normalize(n.direction,n.direction),o$1p.clone(o$1p.UNIT_Z,n.up)):n=x$8(this,t);var r,o=i.camera;o.frustum instanceof a$V?r=o.frustum.clone():((r=G$9).aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,r.fov=e$2d.toRadians(60)),n.frustum=r;var a=ee$5(n);V$7(this,a),B$7(this,e,n,a)}0===e&&e$2e(this._completeMorph)&&this._completeMorph()}},R$8.prototype.isDestroyed=function(){return!1},R$8.prototype.destroy=function(){return P$9(this),i$11(this)};var Te$4=new a$18,De$4=new o$1p,ge$6=new p$1d;function x$8(e,t){var i=e._scene,n=i.camera,r=A$c,o=r.position,a=r.direction,s=r.up,l=i.mapProjection.unproject(n.position,Te$4);t.cartographicToCartesian(l,o);var u=t.scaleToGeodeticSurface(o,De$4),c=m$19.eastNorthUpToFixedFrame(u,t,ge$6);return p$1d.multiplyByPointAsVector(c,n.direction,a),p$1d.multiplyByPointAsVector(c,n.up,s),r}var we$2=new o$1p,Ce$3=new o$1p,Me$7=new o$1p,Ee$5=new o$1p,Re$4=new o$1p,Oe$4=new o$1p;function B$7(e,t,i,n){t*=.5;var r=e._scene,o=r.camera,a=o$1p.clone(o.position,we$2),s=o$1p.clone(o.direction,Ce$3),l=o$1p.clone(o.up,Me$7),u=p$1d.multiplyByPoint(v$K.TRANSFORM_2D_INVERSE,i.position,Ee$5),c=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D_INVERSE,i.direction,Re$4),h=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D_INVERSE,i.up,Oe$4);var d=r.tweens.add({duration:t,easingFunction:m$Y.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$6(a,u,e.time,o.position),w$6(s,c,e.time,o.direction),w$6(l,h,e.time,o.up),o$1p.cross(o.direction,o.up,o.right),o$1p.normalize(o.right,o.right)},complete:function(){$$6(e,r,0,1,t,n)}});e._currentTweens.push(d)}var Ve$5=new a$V,L$a=new o$1p,Z$7=new o$1p,Q$4=new o$1p,H$a=new o$1p,Y$3=new o$1p,k$7=new o$1p;function Se$3(e,t,i){t/=3;var n,r,o=e._scene,a=o.camera;t>0?(n=A$c,o$1p.fromDegrees(0,0,5*i.maximumRadius,i,n.position),o$1p.negate(n.position,n.direction),o$1p.normalize(n.direction,n.direction),o$1p.clone(o$1p.UNIT_Z,n.up)):(a.position.z=a.frustum.right-a.frustum.left,n=x$8(e,i)),e._morphToOrthographic?((r=Ve$5).aspectRatio=o.drawingBufferWidth/o.drawingBufferHeight,r.width=a.frustum.right-a.frustum.left):((r=G$9).aspectRatio=o.drawingBufferWidth/o.drawingBufferHeight,r.fov=e$2d.toRadians(60)),n.frustum=r;var s,l=ee$5(n);V$7(e,l),s=e._morphToOrthographic?function(){B$7(e,t,n,l)}:function(){J$3(e,t,n,(function(){B$7(e,t,n,l)}))},t>0?(o._mode=C$14.SCENE2D,a.flyTo({duration:t,destination:o$1p.fromDegrees(0,0,5*i.maximumRadius,i,H$a),complete:function(){o._mode=C$14.MORPHING,s()}})):s()}function w$6(e,t,i,n){return o$1p.lerp(e,t,i,n)}function X$6(e,t,i,n,r){var o=e._scene,a=o.camera;if(!(a.frustum instanceof a$V)){var s=a.frustum.fov,l=.5*e$2d.RADIANS_PER_DEGREE,u=i.position.z*Math.tan(.5*s);a.frustum.far=u/Math.tan(.5*l)+1e7;var c=o.tweens.add({duration:t,easingFunction:m$Y.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){a.frustum.fov=e$2d.lerp(s,l,e.time);var t=u/Math.tan(.5*a.frustum.fov);n(a,t)},complete:function(){a.frustum=i.frustum.clone(),r(e)}});e._currentTweens.push(c)}}var Ne$3=new o$1p,Pe$3=new o$1p,Ue$3=new o$1p,b$d=new o$1p,Ie$4=new o$1p,ye$2=new o$1p,Fe$4=new l$11,Ae$5=new f$19,Be$5=new o$1p,He$3={position:void 0,direction:void 0,up:void 0,frustum:void 0};function be$3(e,t){t*=.5;var i=e._scene,n=i.camera,r=o$1p.clone(n.position,Ne$3),o=o$1p.clone(n.direction,Pe$3),a=o$1p.clone(n.up,Ue$3),s=o$1p.negate(o$1p.UNIT_Z,Ie$4),l=o$1p.clone(o$1p.UNIT_Y,ye$2),u=b$d;if(t>0)o$1p.clone(o$1p.ZERO,b$d),u.z=5*i.mapProjection.ellipsoid.maximumRadius;else{o$1p.clone(r,b$d);var c=Ae$5;p$1d.multiplyByPoint(v$K.TRANSFORM_2D,r,c.origin),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o,c.direction);var h=i.globe;if(e$2e(h)){var d=h.pickWorldCoordinates(c,i,Be$5);e$2e(d)&&(p$1d.multiplyByPoint(v$K.TRANSFORM_2D_INVERSE,d,u),u.z+=o$1p.distance(r,u))}}var f=Fe$4;f.right=.5*u.z,f.left=-f.right,f.top=f.right*(i.drawingBufferHeight/i.drawingBufferWidth),f.bottom=-f.top;var p=He$3;p.position=u,p.direction=s,p.up=l,p.frustum=f;var _=te$4(p);function m(e,t){e.position.z=t}V$7(e,_);var g=i.tweens.add({duration:t,easingFunction:m$Y.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$6(r,u,e.time,n.position),w$6(o,s,e.time,n.direction),w$6(a,l,e.time,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right),n._adjustOrthographicFrustum(!0)},complete:function(){X$6(e,t,p,m,_)}});e._currentTweens.push(g)}var q$7=new a$18,je$3={position:new o$1p,direction:new o$1p,up:new o$1p,position2D:new o$1p,direction2D:new o$1p,up2D:new o$1p,frustum:new l$11},ze$4={position:new o$1p,direction:new o$1p,up:new o$1p,frustum:void 0},We$2=new o$1p,Ge$3=new f$19,xe$3=new p$1d,Le$4=new o$1p;function Ze$3(e,t,i){t*=.5;var n=e._scene,r=n.camera,o=je$3;if(t>0)o$1p.clone(o$1p.ZERO,o.position),o.position.z=5*i.maximumRadius,o$1p.negate(o$1p.UNIT_Z,o.direction),o$1p.clone(o$1p.UNIT_Y,o.up);else{i.cartesianToCartographic(r.positionWC,q$7),n.mapProjection.project(q$7,o.position),o$1p.negate(o$1p.UNIT_Z,o.direction),o$1p.clone(o$1p.UNIT_Y,o.up);var a=Ge$3;o$1p.clone(o.position2D,a.origin);var s=o$1p.clone(r.directionWC,a.direction),l=i.scaleToGeodeticSurface(r.positionWC,Le$4),u=m$19.eastNorthUpToFixedFrame(l,i,xe$3);p$1d.inverseTransformation(u,u),p$1d.multiplyByPointAsVector(u,s,s),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,s,s);var c=n.globe;if(e$2e(c)){var h=c.pickWorldCoordinates(a,n,We$2);if(e$2e(h)){var d=o$1p.distance(o.position2D,h);h.x+=d,o$1p.clone(h,o.position2D)}}}function f(e,t){e.position.x=t}p$1d.multiplyByPoint(v$K.TRANSFORM_2D,o.position,o.position2D),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o.direction,o.direction2D),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o.up,o.up2D);var p=o.frustum;p.right=.5*o.position.z,p.left=-p.right,p.top=p.right*(n.drawingBufferHeight/n.drawingBufferWidth),p.bottom=-p.top;var _=ze$4;p$1d.multiplyByPoint(v$K.TRANSFORM_2D_INVERSE,o.position2D,_.position),o$1p.clone(o.direction,_.direction),o$1p.clone(o.up,_.up),_.frustum=p;var m=te$4(_);V$7(e,m),K$5(e,t,o,(function(){X$6(e,t,o,f,m)}))}function J$3(e,t,i,n){var r=e._scene,o=r.camera,a=o.frustum.right-o.frustum.left;o.frustum=i.frustum.clone();var s=o.frustum.fov,l=.5*e$2d.RADIANS_PER_DEGREE,u=a*Math.tan(.5*s);o.frustum.far=u/Math.tan(.5*l)+1e7,o.frustum.fov=l;var c=r.tweens.add({duration:t,easingFunction:m$Y.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){o.frustum.fov=e$2d.lerp(l,s,e.time),o.position.z=u/Math.tan(.5*o.frustum.fov)},complete:function(){n(e)}});e._currentTweens.push(c)}function Qe$1(e,t,i,n){t*=.5;var r=e._scene,o=r.camera,a=o$1p.clone(i.position,H$a),s=o$1p.clone(i.direction,Y$3),l=o$1p.clone(i.up,k$7);function u(){o.frustum=i.frustum.clone();var u=o$1p.clone(o.position,L$a),c=o$1p.clone(o.direction,Z$7),h=o$1p.clone(o.up,Q$4);u.z=a.z;var d=r.tweens.add({duration:t,easingFunction:m$Y.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$6(u,a,e.time,o.position),w$6(c,s,e.time,o.direction),w$6(h,l,e.time,o.up),o$1p.cross(o.direction,o.up,o.right),o$1p.normalize(o.right,o.right)},complete:function(){n(e)}});e._currentTweens.push(d)}r._mode=C$14.MORPHING,e._morphToOrthographic?u():J$3(e,0,i,u)}function K$5(e,t,i,n){var r=e._scene,o=r.camera,a=o$1p.clone(o.position,L$a),s=o$1p.clone(o.direction,Z$7),l=o$1p.clone(o.up,Q$4),u=o$1p.clone(i.position2D,H$a),c=o$1p.clone(i.direction2D,Y$3),h=o$1p.clone(i.up2D,k$7);var d=r.tweens.add({duration:t,easingFunction:m$Y.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$6(a,u,e.time,o.position),w$6(s,c,e.time,o.direction),w$6(l,h,e.time,o.up),o$1p.cross(o.direction,o.up,o.right),o$1p.normalize(o.right,o.right),o._adjustOrthographicFrustum(!0)},complete:function(){$$6(e,r,1,0,t,n)}});e._currentTweens.push(d)}function $$6(e,t,i,n,r,o){var a={object:t,property:"morphTime",startValue:i,stopValue:n,duration:r,easingFunction:m$Y.QUARTIC_OUT};e$2e(o)&&(a.complete=function(){o(e)});var s=t.tweens.addProperty(a);e._currentTweens.push(s)}function ee$5(e){return function(t){var i=t._scene;i._mode=C$14.SCENE3D,i.morphTime=C$14.getMorphTime(C$14.SCENE3D),P$9(t);var n=i.camera;(t._previousMode!==C$14.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,o$1p.clone(e.position,n.position),o$1p.clone(e.direction,n.direction),o$1p.clone(e.up,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right),n.frustum=e.frustum.clone());var r=n.frustum;i.frameState.useLogDepth&&(r.near=.1,r.far=1e10);var o=e$2e(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,C$14.SCENE3D,o)}}function te$4(e){return function(t){var i=t._scene;i._mode=C$14.SCENE2D,i.morphTime=C$14.getMorphTime(C$14.SCENE2D),P$9(t);var n=i.camera;o$1p.clone(e.position,n.position),n.position.z=2*i.mapProjection.ellipsoid.maximumRadius,o$1p.clone(e.direction,n.direction),o$1p.clone(e.up,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right),n.frustum=e.frustum.clone();var r=e$2e(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,C$14.SCENE2D,r)}}function Ye$2(e){return function(t){var i=t._scene;i._mode=C$14.COLUMBUS_VIEW,i.morphTime=C$14.getMorphTime(C$14.COLUMBUS_VIEW),P$9(t);var n=i.camera;(t._previousModeMode!==C$14.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,o$1p.clone(e.position,n.position),o$1p.clone(e.direction,n.direction),o$1p.clone(e.up,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right));var r=n.frustum;i.frameState.useLogDepth&&(r.near=.1,r.far=1e10);var o=e$2e(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,C$14.COLUMBUS_VIEW,o)}}function d$e(e,t,i,n,r,o,a,s,l,u){this._tweens=e,this._tweenjs=t,this._startObject=l$1f(i),this._stopObject=l$1f(n),this._duration=r,this._delay=o,this._easingFunction=a,this._update=s,this._complete=l,this.cancel=u,this.needsStart=!0}function s$a(){this._tweens=[]}function _a(e){if(!e$2e(e))throw new t$15("scene is required.");this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.enableWalk=!1,this.walkParameters={speed:1,height:2},this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.translateEventTypes=Q$d.LEFT_DRAG,this.zoomEventTypes=[Q$d.RIGHT_DRAG,Q$d.WHEEL,Q$d.PINCH],this.rotateEventTypes=Q$d.LEFT_DRAG,this.tiltEventTypes=[Q$d.MIDDLE_DRAG,Q$d.PINCH,{eventType:Q$d.LEFT_DRAG,modifier:Aa$1.CTRL},{eventType:Q$d.RIGHT_DRAG,modifier:Aa$1.CTRL}],this.lookEventTypes={eventType:Q$d.LEFT_DRAG,modifier:Aa$1.SHIFT},this.minimumPickingTerrainHeight=15e4,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumCollisionTerrainHeight=15e4,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=75e5,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this._enableIndoorColliDetection=!1,this.minimumDetectDistance=.5,this.minimumWalkingDetectDistance=2,this._scene=e,this._globe=void 0,this._ellipsoid=void 0,this._aggregator=new l$l(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new s$a,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new o$1o(-1,-1),this._tiltCenter=new o$1p,this._rotateMousePosition=new o$1o(-1,-1),this._rotateStartPosition=new o$1p,this._strafeStartPosition=new o$1p,this._zoomMouseStart=new o$1o(-1,-1),this._zoomWorldPosition=new o$1p,this._useZoomWorldPosition=!1,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._rotatingZoom=!1;var t=e.mapProjection;this._maxCoord=t.project(new a$18(Math.PI,e$2d.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=.618,this._minimumRotateRate=.5,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._cloneCamera=void 0,this._isAroundScreenCenter=!1,this.autoTiltHeight=0,this._controlMode=vi$2.NORMAL,this._enableFusion=!1,this.panOffset={x:0,y:0},this.zoomDirty=!1,this.panDirty=!1,this.minFov=e$2d.toRadians(20),this.maxFov=e$2d.toRadians(70)}Object.defineProperties(d$e.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}}),d$e.prototype.cancelTween=function(){this._tweens.remove(this)},Object.defineProperties(s$a.prototype,{length:{get:function(){return this._tweens.length}}}),s$a.prototype.add=function(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).startObject)||!e$2e(e.stopObject))throw new t$15("options.startObject and options.stopObject are required.");if(!e$2e(e.duration)||e.duration<0)throw new t$15("options.duration is required and must be positive.");if(0===e.duration)return e$2e(e.complete)&&e.complete(),new d$e(this);var t=e.duration/h$17.SECONDS_PER_MILLISECOND,i=u$Z(e.delay,0),n=i/h$17.SECONDS_PER_MILLISECOND,r=u$Z(e.easingFunction,m$Y.LINEAR_NONE),o=e.startObject,a=new f$X.Tween(o);a.to(l$1f(e.stopObject),t),a.delay(n),a.easing(r),e$2e(e.update)&&a.onUpdate((function(){e.update(o)})),a.onComplete(u$Z(e.complete,null)),a.repeat(u$Z(e._repeat,0));var s=new d$e(this,a,e.startObject,e.stopObject,e.duration,i,r,e.update,e.complete,e.cancel);return this._tweens.push(s),s},s$a.prototype.addProperty=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).object,i=e.property,n=e.startValue,r=e.stopValue;if(!e$2e(t)||!e$2e(e.property))throw new t$15("options.object and options.property are required.");if(!e$2e(t[i]))throw new t$15("options.object must have the specified property.");if(!e$2e(n)||!e$2e(r))throw new t$15("options.startValue and options.stopValue are required.");return this.add({startObject:{value:n},stopObject:{value:r},duration:u$Z(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){t[i]=e.value},complete:e.complete,cancel:e.cancel,_repeat:e._repeat})},s$a.prototype.addAlpha=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).material;if(!e$2e(t))throw new t$15("options.material is required.");var i=[];for(var n in t.uniforms)t.uniforms.hasOwnProperty(n)&&e$2e(t.uniforms[n])&&e$2e(t.uniforms[n].alpha)&&i.push(n);if(0===i.length)throw new t$15("material has no properties with alpha components.");return this.add({startObject:{alpha:u$Z(e.startValue,0)},stopObject:{alpha:u$Z(e.stopValue,1)},duration:u$Z(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){for(var n=i.length,r=0;r<n;++r)t.uniforms[i[r]].alpha=e.alpha},complete:e.complete,cancel:e.cancel})},s$a.prototype.addOffsetIncrement=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).material;if(!e$2e(t))throw new t$15("material is required.");if(!e$2e(t.uniforms.offset))throw new t$15("material.uniforms must have an offset property.");var i=t.uniforms;return this.addProperty({object:i,property:"offset",startValue:i.offset,stopValue:i.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})},s$a.prototype.remove=function(e){if(!e$2e(e))return!1;var t=this._tweens.indexOf(e);return-1!==t&&(e.tweenjs.stop(),e$2e(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0)},s$a.prototype.removeAll=function(){for(var e=this._tweens,t=0;t<e.length;++t){var i=e[t];i.tweenjs.stop(),e$2e(i.cancel)&&i.cancel()}e.length=0},s$a.prototype.contains=function(e){return e$2e(e)&&-1!==this._tweens.indexOf(e)},s$a.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return this._tweens[e]},s$a.prototype.update=function(e){var t=this._tweens,i=0;for(e=e$2e(e)?e/h$17.SECONDS_PER_MILLISECOND:Et$c();i<t.length;){var n=t[i],r=n.tweenjs;n.needsStart?(n.needsStart=!1,r.start(e)):r.update(e)?i++:(r.stop(),t.splice(i,1))}};var Za=0;function ne$4(e,t){if(e<0)return 0;var i=25*(1-t);return Math.exp(-i*e)}function re$4(e){return o$1o.equalsEpsilon(e.startPosition,e.endPosition,e$2d.EPSILON14)}Object.defineProperties(_a.prototype,{enableIndoorColliDetection:{get:function(){return this._enableIndoorColliDetection},set:function(e){this._enableIndoorColliDetection=e,this._scene.camera._enableIndoorColliDetection=e}},zoomFactor:{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e}},previousHeight:{set:function(e){Za=e}},controlMode:{get:function(){return this._controlMode},set:function(e){o$1q.typeOf.number.lessThanOrEquals("controlMode",e,1),o$1q.typeOf.number.greaterThanOrEquals("controlMode",e,0),this._controlMode=e}},enableFusion:{get:function(){return this._enableFusion},set:function(e){e!==this._enableFusion&&(this._enableFusion=e,this.panOffset={x:0,y:0})}}});var se$3=.4;function oe$5(e,t,i,n,r,o,a){let s=o[a];e$2e(s)||(s=o[a]={startPosition:new o$1o,endPosition:new o$1o,motion:new o$1o,inertiaEnabled:!0});const l=e.getButtonPressTime(t,i),u=e.getButtonReleaseTime(t,i),c=l&&u&&(u.getTime()-l.getTime())/1e3,h=new Date,d=u&&(h.getTime()-u.getTime())/1e3;if(l&&u&&c<se$3){const a=ne$4(d,n),l=e.getLastMovement(t,i);if(!e$2e(l)||re$4(l)||!s.inertiaEnabled||(s.motion.x=.5*(l.endPosition.x-l.startPosition.x),s.motion.y=.5*(l.endPosition.y-l.startPosition.y),s.startPosition=o$1o.clone(l.startPosition,s.startPosition),s.endPosition=o$1o.multiplyByScalar(s.motion,a,s.endPosition),s.endPosition=o$1o.add(s.startPosition,s.endPosition,s.endPosition),isNaN(s.endPosition.x)||isNaN(s.endPosition.y)||o$1o.distance(s.startPosition,s.endPosition)<.5))return;if(!e.isButtonDown(t,i)){r(o,e.getStartMousePosition(t,i),s)}}}function ve$3(e,t){if(e$2e(t)){let i=e[t];e$2e(i)&&(i.inertiaEnabled=!0);const n=e._inertiaDisablers[t];if(e$2e(n)){const t=n.length;for(let r=0;r<t;++r)i=e[n[r]],e$2e(i)&&(i.inertiaEnabled=!1)}}}var di$1=[];function b$c(e,t,i,n,r,o){if(e._scene.mode===C$14.COLUMBUS_VIEW&&e._controlMode===vi$2.DESIGN?e._isAroundScreenCenter=!0:e._isAroundScreenCenter=!1,e$2e(i)){var a=e._aggregator;e$2e(e.tiltEventTypes)&&!Array.isArray(e.tiltEventTypes)&&(e.tiltEventTypes=[e.tiltEventTypes]),Array.isArray(i)||(di$1[0]=i,i=di$1);for(var s=i.length,l=0;l<s;++l){var u=i[l],c=e$2e(u.eventType)?u.eventType:u,h=u.modifier,d=a.isMoving(c,h)&&a.getMovement(c,h),f=a.getStartMousePosition(c,h);if(e._isAroundScreenCenter){var p=e._scene.getViewport({x:10,y:10});f={x:p.width/2,y:p.height/2}}e.enableInputs&&t&&(d?(n(e,f,d),ve$3(e,o)):r<1&&"_lastInertiaTiltMovement"!=o&&"_lastInertiaZoomMovement"!=o?oe$5(a,c,h,r,n,e,o):("_lastInertiaZoomMovement"===o||"_lastInertiaTiltMovement"===o)&&a._isDown[c]&&(e._isAroundScreenCenter||(f=a.getStartMousePosition(c,void 0)),e._scene.mode===C$14.SCENE3D&&"_lastInertiaTiltMovement"===o&&e.tiltEventTypes.indexOf(c)>-1?n(e,f,a._lastMovement[c],!0):"_lastInertiaZoomMovement"==o&&a._lastMovement[c].valid&&n(e,f,a._lastMovement[c])))}}}var Ca=new f$19,me$5=new o$1p,de$3=new o$1o,fe$3=new o$1p,ue$5=new o$1o;new o$1p;var _e$1=new o$1p,he$4=new o$1p,ge$5=new o$1p,pe$4=new o$1p,ce$7=new o$1p,ye$1=new o$1p,we$1=new o$1p,Ce$2=new o$1p,le$5=new o$1p,Te$3=new o$1p,Pe$2=new o$1p,Re$3=new o$1p,Ee$4=new o$1p,Ie$3=new o$1p,q$6=new o$1p,fi$1=new o$1p,ui$1=new o$1p,Fa={orientation:new i$16};async function ha$1(e,t,i,n,r,o){var a=1;e$2e(o)&&(a=e$2d.clamp(Math.abs(o),.25,1));var s=e._scene,l=s.camera,u=s.mode;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(s.camera)),v$K.clone(e._scene.camera,e._cloneCamera),l=e._cloneCamera);var c=e.minimumZoomDistance*a,h=e.maximumZoomDistance,d=n*(r-c);d=e$2d.clamp(d,e._minimumZoomRate,e._maximumZoomRate);var f=(i.endPosition.y-i.startPosition.y)/e._scene.canvas.clientHeight,p=d*(f=Math.min(f,e.maximumMovementRatio));if(e$2e(e.thetaWindowRatio)&&Math.abs(f)<Math.abs(e.thetaWindowRatio))e.thetaWindowRatio=0;else if(e$2e(e.phiWindowRatio)&&Math.abs(f)<Math.abs(e.phiWindowRatio))e.phiWindowRatio=0;else if(!(e.enableIndoorColliDetection&&p>0&&Math.abs(r-c)<1||e.enableIndoorColliDetection&&p<0&&Math.abs(r-h)<1)){r-p<c?p=r-c-1:r-p>h&&(p=r-h);var _=Fa.orientation;if(_.heading=l.heading,_.pitch=l.pitch,_.roll=l.roll,l.frustum instanceof a$V)return void(Math.abs(p)>0&&(l.zoomIn(p),e.enableIndoorColliDetection&&$$5(e),l._adjustOrthographicFrustum()));var m=o$1o.equals(t,e._zoomMouseStart);e._isAroundScreenCenter&&(m=!1,e._useZoomWorldPosition=!1);var g,x,y=e._zoomingOnVector,v=e._rotatingZoom;if(!m&&!e._isAroundScreenCenter){if(e._zoomMouseStart=o$1o.clone(t,e._zoomMouseStart),e$2e(e._globe)&&u===C$14.SCENE2D)g=l.getPickRay(t,Ca).origin,g=o$1p.fromElements(g.y,g.z,g.x);else if(e$2e(e._globe)){var $=ea$3(e,t,me$5);$.then((e=>{g=e})),await $}e$2e(g)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=o$1p.clone(g,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,y=e._zoomingOnVector=!1,v=e._rotatingZoom=!1}if(!e._useZoomWorldPosition)return l.zoomIn(p),p<0&&(x=3),void(e.enableIndoorColliDetection&&$$5(e,x));var b=u===C$14.COLUMBUS_VIEW;if(l.positionCartographic.height<2e6&&(v=!0),!m||v){if(u===C$14.SCENE2D){var T=e._zoomWorldPosition,C=l.position;if(!o$1p.equals(T,C)&&l.positionCartographic.height<2*e._maxCoord.x){var S=l.position.x,w=o$1p.subtract(T,C,fe$3);o$1p.normalize(w,w);var E=o$1p.distance(T,C)*p/(.5*l.getMagnitude());l.move(w,.5*E),(l.position.x<0&&S>0||l.position.x>0&&S<0)&&(g=l.getPickRay(t,Ca).origin,e._zoomWorldPosition=o$1p.clone(g,e._zoomWorldPosition))}}else if(u===C$14.SCENE3D){var P=o$1p.normalize(l.position,pe$4);if(l.positionCartographic.height<3e3&&Math.abs(o$1p.dot(l.direction,P))<.6)b=!0;else{var A=s.canvas,L=ue$5;L.x=A.clientWidth/2,L.y=A.clientHeight/2;var M=void 0;if(e$2e(M)&&l.positionCartographic.height<1e6){var R=ye$1;o$1p.clone(l.position,R);var O=e._zoomWorldPosition,D=ce$7;if(D=o$1p.normalize(O,D),o$1p.dot(D,P)<0)return;var I=Ie$3,F=le$5;o$1p.clone(l.direction,F),o$1p.add(R,o$1p.multiplyByScalar(F,1e3,q$6),I);var B=Te$3,N=Pe$2;o$1p.subtract(O,R,B),o$1p.normalize(B,N);var G=o$1p.dot(P,N);if(G>=0)return void(e._zoomMouseStart.x=-1);var z=Math.acos(-G),U=o$1p.magnitude(R),V=o$1p.magnitude(O),k=U-p,W=o$1p.magnitude(B),H=Math.asin(e$2d.clamp(W/V*Math.sin(z),-1,1))-Math.asin(e$2d.clamp(k/V*Math.sin(z),-1,1))+z,q=we$1;o$1p.normalize(R,q);var j=Ce$2;j=o$1p.cross(N,q,j),j=o$1p.normalize(j,j),o$1p.normalize(o$1p.cross(q,j,q$6),F),o$1p.multiplyByScalar(o$1p.normalize(I,q$6),o$1p.magnitude(I)-p,I),o$1p.normalize(R,R),o$1p.multiplyByScalar(R,k,R);var X=Re$3;o$1p.multiplyByScalar(o$1p.add(o$1p.multiplyByScalar(q,Math.cos(H)-1,fi$1),o$1p.multiplyByScalar(F,Math.sin(H),ui$1),q$6),k,X),o$1p.add(R,X,R),o$1p.normalize(I,q),o$1p.normalize(o$1p.cross(q,j,q$6),F);var Y=Ee$4;return o$1p.multiplyByScalar(o$1p.add(o$1p.multiplyByScalar(q,Math.cos(H)-1,fi$1),o$1p.multiplyByScalar(F,Math.sin(H),ui$1),q$6),o$1p.magnitude(I),Y),o$1p.add(I,Y,I),o$1p.clone(R,l.position),o$1p.normalize(o$1p.subtract(I,R,q$6),l.direction),o$1p.clone(l.direction,l.direction),o$1p.cross(l.direction,l.up,l.right),o$1p.cross(l.right,l.direction,l.up),l.setView(Fa),void(e.enableIndoorColliDetection&&$$5(e))}if(e$2e(M)){var Z=o$1p.normalize(M,_e$1),K=o$1p.normalize(e._zoomWorldPosition,he$4),Q=o$1p.dot(K,Z);if(Q>0&&Q<1){var J=e$2d.acosClamped(Q),ee=o$1p.cross(K,Z,ge$5),te=p/(Math.abs(J)>e$2d.toRadians(20)?.75*l.positionCartographic.height:l.positionCartographic.height-p);l.rotate(ee,J*te)}}else b=!0}}e._rotatingZoom=!b}if(!m&&b||y){var ie=s$R.wgs84ToWindowCoordinates(s,e._zoomWorldPosition,de$3),ne=(u!==C$14.COLUMBUS_VIEW&&o$1o.equals(t,e._zoomMouseStart)&&e$2e(ie)?l.getPickRay(ie,Ca):l.getPickRay(t,Ca)).direction;u===C$14.COLUMBUS_VIEW&&o$1p.fromElements(ne.y,ne.z,ne.x,ne),l.move(ne,p),e._zoomingOnVector=!0}else l.zoomIn(p);l.setView(Fa),e.enableIndoorColliDetection&&$$5(e)}}function xe$2(e,t,i,n,r,o){e._ellipsoid;var a=e._scene,s=a.camera;if(a.canvas,e._globe,e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(a.camera)),v$K.clone(a.camera,e._cloneCamera),s=e._cloneCamera),!(Math.abs(i.endPosition.y-i.startPosition.y)<1)){var l=i.endPosition.y-i.startPosition.y>0?1:-1;e._aggregator._isDown[1]&&(l=i.endPosition.y-t.y>0?.2:-.2,e._isAroundScreenCenter&&(l=i.endPosition.y-i.startPosition.y>0?.2:-.2));var u=e.maximumZoomDistance,c=l*n*7e-4*48;if(e$2e(o)){var h=o$1p.distance(s.position,o),d=1*e.minimumZoomDistance,f=n*(h-d);f=e$2d.clamp(f,e._minimumZoomRate,e._maximumZoomRate);var p=l/e._scene.canvas.clientHeight,_=f*(p=Math.min(p,e.maximumMovementRatio));if(e.enableIndoorColliDetection&&_>0&&Math.abs(h-d)<.1)return}if(!(r>u&&l<0)){o$1o.equals(t,e._zoomMouseStart)||(e._zoomMouseStart=o$1o.clone(t,e._zoomMouseStart)),e.zoomActive=!0,s.position;var m=r*c;if(!e$2e(o))return void s.zoomIn(m);var g=new o$1p;o$1p.subtract(o,s.position,g);var x=new o$1p;x=o$1p.clone(s.right,x);var y=o$1p.dot(g,x),v=new o$1p;v=o$1p.multiplyByScalar(x,y,v);var $=new o$1p;$=o$1p.subtract(g,v,$);var b=new o$1p;b=o$1p.normalize($,b),new o$1p,s.move(b,m);var T=new o$1p;T=o$1p.normalize(o,T);var C=o$1p.magnitude(o),S=xi$2;S.x=S.y=S.z=C;var w=t$12.fromCartesian3(S,Di$2),E=s.pickEllipsoid(t,w,Qa);if(e$2e(E)&&!isNaN(E.x)&&!isNaN(E.y)&&!isNaN(E.z)){E=o$1p.normalize(E,E);var P=o$1p.angleBetween(T,E);if(!e$2d.equalsEpsilon(P,0,e$2d.EPSILON10)){var A=new o$1p;A=o$1p.cross(T,E,A),s.rotate(A,P),e.enableIndoorColliDetection&&$$5(e,1)}}}}}var De$3=new f$19,Me$6=new f$19,ze$3=new o$1p;function Se$2(e,t,i){var n=e._scene.camera,r=n.getPickRay(i.startPosition,De$3).origin,o=n.getPickRay(i.endPosition,Me$6).origin;r=o$1p.fromElements(r.y,r.z,r.x,r),o=o$1p.fromElements(o.y,o.z,o.x,o);var a=o$1p.subtract(r,o,ze$3),s=o$1p.magnitude(a);s>0&&(o$1p.normalize(a,a),n.move(a,s))}function _i$2(e,t,i){e$2e(i.distance)&&(i=i.distance);var n=e._scene.camera;ha$1(e,t,i,e._zoomFactor,n.getMagnitude())}var ke$2=new o$1o,be$2=new o$1o;function hi$1(e,t,i){if(e$2e(i.angleAndHeight))Ne$2(e,t,i.angleAndHeight);else{var n=e._scene,r=n.camera,o=n.canvas,a=o.clientWidth,s=o.clientHeight,l=ke$2;l.x=2/a*i.startPosition.x-1,l.y=2/s*(s-i.startPosition.y)-1,l=o$1o.normalize(l,l);var u=be$2;u.x=2/a*i.endPosition.x-1,u.y=2/s*(s-i.endPosition.y)-1,u=o$1o.normalize(u,u);var c=e$2d.acosClamped(l.x);l.y<0&&(c=e$2d.TWO_PI-c);var h=e$2d.acosClamped(u.x);u.y<0&&(h=e$2d.TWO_PI-h);var d=h-c;r.twistRight(d)}}function Ne$2(e,t,i){var n=e._rotateFactor*e._rotateRateRangeAdjustment;n>e._maximumRotateRate&&(n=e._maximumRotateRate),n<e._minimumRotateRate&&(n=e._minimumRotateRate);var r=e._scene,o=r.camera,a=r.canvas,s=(i.endPosition.x-i.startPosition.x)/a.clientWidth,l=n*(s=Math.min(s,e.maximumMovementRatio))*Math.PI*4;o.twistRight(l)}function Oe$3(e){var t=e._scene.mapMode2D===Rr$3.ROTATE;p$1d.equals(p$1d.IDENTITY,e._scene.camera.transform)?(b$c(e,e.enableTranslate,e.translateEventTypes,Se$2,e.inertiaTranslate,"_lastInertiaTranslateMovement"),b$c(e,e.enableZoom,e.zoomEventTypes,_i$2,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&b$c(e,e.enableRotate,e.tiltEventTypes,hi$1,e.inertiaSpin,"_lastInertiaTiltMovement")):(b$c(e,e.enableZoom,e.zoomEventTypes,_i$2,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&b$c(e,e.enableRotate,e.translateEventTypes,hi$1,e.inertiaSpin,"_lastInertiaSpinMovement"))}var gi$2=new f$19,We$1=new o$1p,la$1=new o$1p,ga=new o$1o;function pi$2(e,t){if(e._mode!==C$14.SCENE3D||e._multiViewportMode==B$e.NONE)return t;o$1o.clone(t,ga);for(var i=e._context,n=new f$1a(t.x,i.drawingBufferHeight-t.y),r=new f$1a,o=0;o<e._multiViewportInfo.length;o++){var a=e._multiViewportInfo[o];if(r.x=i.drawingBufferWidth*a.x,r.y=i.drawingBufferHeight*a.y,r.width=i.drawingBufferWidth*a.width,r.height=i.drawingBufferHeight*a.height,r.intersect(n)===Ae$w.INTERSECTING){var s=(n.x-r.x)/r.width,l=(n.y-r.y)/r.height;return ga.x=s*i.drawingBufferWidth,ga.y=i.drawingBufferHeight-l*i.drawingBufferHeight,ga}}return ga}function ea$3(e,t,i){var n=e._scene,r=e._globe,o=n.camera;return e$2e(r)&&n.pickPositionSupported?n.pickPositionWorldCoordinatesAsync(t,We$1,!0).then((a=>{var s,l=o.getPickRay(pi$2(e._scene,t),gi$2),u=r.pick(l,n,la$1);if((e$2e(a)?o$1p.distance(a,o.positionWC):Number.POSITIVE_INFINITY)<(e$2e(u)?o$1p.distance(u,o.positionWC):Number.POSITIVE_INFINITY))return Promise.resolve(o$1p.clone(a,i));if(e$2e(u))return Promise.resolve(o$1p.clone(u,i));if(n._environmentState.isUnderGlobeVisible&&o._positionCartographic.height<1&&e$2e(s=g$1j.rayEllipsoid(l,n._underGlobe.ellipsoid))){var c=s.start>0?s.start:s.stop;return c=Math.min(c,100),Promise.resolve(f$19.getPoint(l,c,i))}return Promise.resolve(void 0)})):Promise.resolve(void 0)}var Ve$4=new f$19,Ae$4=new f$19,ci$2=new o$1p,He$2=new o$1p,Ze$2=new o$1p,Fe$3=new o$1p,Be$4=new o$1m(o$1p.UNIT_X,0),Ue$2=new o$1o,Le$3=new o$1o;function Ba(e,t,i,n,r,o,a){var s=o$1m.fromPointNormal(o,a,Be$4),l=t.getPickRay(r.startPosition,Ve$4),u=g$1j.rayPlane(l,s,ci$2),c=t.getPickRay(n,Ae$4),h=g$1j.rayPlane(c,s,He$2);if(!e$2e(u)||!e$2e(h))return e._looking=!0,F$8(e,i,r),void o$1o.clone(i,e._translateMousePosition);var d=o$1p.subtract(u,h,Ze$2),f=d.x;d.x=d.y,d.y=d.z,d.z=f;var p=o$1p.magnitude(d);p>e$2d.EPSILON6&&(o$1p.normalize(d,d),t.move(d,p),e.enableIndoorColliDetection&&$$5(e))}function qe$1(e,t,i){if(o$1p.equals(t,e._translateMousePosition)||(e._looking=!1),o$1p.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking||e.enableWalk)F$8(e,t,i);else if(!e._strafing||e._isAroundScreenCenter){var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(n.camera)),v$K.clone(n.camera,e._cloneCamera),r=e._cloneCamera);var o=o$1o.clone(i.startPosition,Ue$2),a=o$1o.clone(i.endPosition,Le$3),s=o$1p.clone(o$1p.ZERO,Fe$3),l=o$1p.UNIT_X;r.position.z<e._minimumPickingTerrainHeight&&(n._context.webgpu||ea$3(e,o,ci$2).then((n=>{if(s.x>r.position.z&&e$2e(n)&&!e._isAroundScreenCenter)return o$1p.clone(n,e._strafeStartPosition),e._strafing=!0,Pa(e,t,i),void(e._strafeMousePosition=o$1o.clone(t,e._strafeMousePosition))}))),Ba(e,r,t,a,i,s,l)}else Pa(e,t,i)}var yi$2=new o$1o,Ua=new f$19,Ta=new o$1p,Ge$2=new o$1p,wi$2=new p$1d,Ye$1=new p$1d,Qe=new o$1p,Xe$3=new o$1m(o$1p.UNIT_X,0),La=new o$1p,qa=new a$18,Ci$2=new p$1d,Ke$2=new n$15,Je$2=new p$1e,$e$2=new o$1p;function je$2(e,t,i){if(e$2e(i.angleAndHeight)&&(i=i.angleAndHeight),(!o$1o.equals(t,e._tiltCenterMousePosition)||e._isAroundScreenCenter)&&(e._tiltCVOffMap=!1,e._looking=!1),e._looking)F$8(e,t,i);else{var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(n.camera)),v$K.clone(n.camera,e._cloneCamera),r=e._cloneCamera);var o=e._maxCoord,a=Math.abs(r.position.x)-o.x<0&&Math.abs(r.position.y)-o.y<0;(e._tiltCVOffMap||!a||r.position.z>e._minimumPickingTerrainHeight)&&(e._tiltCVOffMap=!0,li$1(e,t,i)),n._context.webgpu?Ri$2(e,t,i):n.pickPositionWorldCoordinatesAsync(t).then((n=>{e$2e(n)?Ri$2(e,t,i):(e._tiltCVOffMap=!0,li$1(e,t,i))})),e.enableIndoorColliDetection&&$$5(e)}}function li$1(e,t,i){var n=e._scene,r=n.camera,o=n.canvas,a=yi$2;a.x=o.clientWidth/2,a.y=o.clientHeight/2;var s,l=r.getPickRay(a,Ua),u=o$1p.UNIT_X,c=l.origin,h=l.direction,d=o$1p.dot(u,h);if(Math.abs(d)>e$2d.EPSILON6&&(s=-o$1p.dot(u,c)/d),!e$2e(s)||s<=0)return e._looking=!0,F$8(e,t,i),void o$1o.clone(t,e._tiltCenterMousePosition);var f=o$1p.multiplyByScalar(h,s,Ta);o$1p.add(c,f,f);var p=n.mapProjection,_=p.ellipsoid;o$1p.fromElements(f.y,f.z,f.x,f);var m=p.unproject(f,qa);_.cartographicToCartesian(m,f);var g=m$19.eastNorthUpToFixedFrame(f,_,wi$2),x=e._globe,y=e._ellipsoid;e._globe=void 0,e._ellipsoid=t$12.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var v=p$1d.clone(r.transform,Ci$2);r._setTransform(g),X$5(e,t,i,o$1p.UNIT_Z),r._setTransform(v),e._globe=x,e._ellipsoid=y;var $=y.maximumRadius;e._rotateFactor=1/$,e._rotateRateRangeAdjustment=$}function Ti$2(e,t,i,n,r){if(e$2e(i)){var o=e._scene,a=o.canvas,s=o.camera,l=yi$2;l.x=a.clientWidth/2,l.y=e._tiltCenterMousePosition.y;var u=s.getPickRay(l,Ua),c=o$1p.clone(o$1p.ZERO,Qe);c.x=i.x;var h=o$1m.fromPointNormal(c,t,Xe$3),d=g$1j.rayPlane(u,h,Ge$2),f=s._projection,p=f.ellipsoid;o$1p.fromElements(i.y,i.z,i.x,i);var _=f.unproject(i,qa);p.cartographicToCartesian(_,i);var m,g=m$19.eastNorthUpToFixedFrame(i,p,wi$2);e$2e(d)?(o$1p.fromElements(d.y,d.z,d.x,d),_=f.unproject(d,qa),p.cartographicToCartesian(_,d),m=m$19.eastNorthUpToFixedFrame(d,p,Ye$1)):m=g;var x=e._globe,y=e._ellipsoid;e._globe=void 0,e._ellipsoid=t$12.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var v=o$1p.UNIT_Z,$=p$1d.clone(s.transform,Ci$2);s._setTransform(g);var b=o$1p.cross(o$1p.UNIT_Z,o$1p.normalize(s.position,La),La),T=o$1p.dot(s.right,b);if(X$5(e,r,n,v,!1,!0),s._setTransform(m),T<0){n.startPosition.y>n.endPosition.y&&(v=void 0);var C=s.constrainedAxis;s.constrainedAxis=void 0,X$5(e,r,n,v,!0,!1),s.constrainedAxis=C}else X$5(e,r,n,v,!0,!1);if(e$2e(s.constrainedAxis)){var S=o$1p.cross(s.direction,s.constrainedAxis,$e$2);o$1p.equalsEpsilon(S,o$1p.ZERO,e$2d.EPSILON6)||(o$1p.dot(S,s.right)<0&&o$1p.negate(S,S),o$1p.cross(S,s.direction,s.up),o$1p.cross(s.direction,s.up,s.right),o$1p.normalize(s.up,s.up),o$1p.normalize(s.right,s.right))}s._setTransform($),e._globe=x,e._ellipsoid=y;var w=y.maximumRadius;e._rotateFactor=1/w,e._rotateRateRangeAdjustment=w;var E=o$1p.clone(s.positionWC,La);if(s._adjustHeightForTerrain(),!o$1p.equals(s.positionWC,E)){s._setTransform(m),s.worldToCameraCoordinatesPoint(E,E);var P=o$1p.magnitudeSquared(E);o$1p.magnitudeSquared(s.position)>P&&(o$1p.normalize(s.position,s.position),o$1p.multiplyByScalar(s.position,Math.sqrt(P),s.position));var A=o$1p.angleBetween(E,s.position),L=o$1p.cross(E,s.position,E);o$1p.normalize(L,L);var M=n$15.fromAxisAngle(L,A,Ke$2),R=p$1e.fromQuaternion(M,Je$2);p$1e.multiplyByVector(R,s.direction,s.direction),p$1e.multiplyByVector(R,s.up,s.up),o$1p.cross(s.direction,s.up,s.right),o$1p.cross(s.right,s.direction,s.up),s._setTransform($)}}}function Pi$2(e,t,i,n,r){var o=e._scene.camera;if(!e$2e(t)){var a,s=o.getPickRay(r,Ua),l=s.origin,u=s.direction,c=o$1p.dot(n,u);if(Math.abs(c)>e$2d.EPSILON6&&(a=-o$1p.dot(n,l)/c),!e$2e(a)||a<=0)return e._looking=!0,F$8(e,r,i),void o$1o.clone(r,e._tiltCenterMousePosition);t=o$1p.multiplyByScalar(u,a,Ta),o$1p.add(l,t,t)}if(o$1o.clone(r,e._tiltCenterMousePosition),e._isAroundScreenCenter){var h=new o$1p;o$1p.clone(t,h),e._tiltCenter=h}else o$1p.clone(t,e._tiltCenter)}function Ri$2(e,t,i){var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(n.camera)),r=e._cloneCamera);var o,a=o$1p.UNIT_X;o$1o.equals(t,e._tiltCenterMousePosition)&&!e._isAroundScreenCenter?o=o$1p.clone(e._tiltCenter,Ta):r.position.z<e._minimumPickingTerrainHeight?ea$3(e,t,Ta).then((n=>{Pi$2(e,o=n,i,a,t),Ti$2(e,a,o,i,t)})):Pi$2(e,o,i,a,t),Ti$2(e,a,o,i,t)}var at$5=new o$1o,it$3=new f$19,Ga=new o$1p;function Ei$2(e){var t=o$1p.UNIT_X,i=e.origin,n=e.direction;return-o$1p.dot(t,i)/o$1p.dot(t,n)}function et$4(e,t,i){e$2e(i.distance)&&(i=i.distance);var n=e._scene,r=n.camera,o=n.canvas,a=at$5;a.x=o.clientWidth/2,a.y=o.clientHeight/2;var s,l=r.getPickRay(a,it$3);if(r.position.z<e._minimumPickingTerrainHeight)ea$3(e,t,Ga).then((o=>{if(e$2e(o))n.pickPositionWorldCoordinatesAsync(t,Ga,!0).then((n=>{if(e$2e(n))s=o$1p.distance(l.origin,o);else{var a=r._projection.unproject(r.position),u=a$18.toCartesian(a);s=o$1p.distance(u,o)}Ea(e,i);var c=o$1p.normalize(r.position,Ra);ha$1(e,t,i,e._zoomFactor,s,o$1p.dot(c,r.direction))}));else{s=Ei$2(l),Ea(e,i);var a=o$1p.normalize(r.position,Ra);ha$1(e,t,i,e._zoomFactor,s,o$1p.dot(a,r.direction))}}));else{s=Ei$2(l),Ea(e,i);var u=o$1p.normalize(r.position,Ra);ha$1(e,t,i,e._zoomFactor,s,o$1p.dot(u,r.direction))}}function tt$3(e){var t=e._scene.camera;if(p$1d.equals(p$1d.IDENTITY,t.transform)){var i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),b$c(e,e.enableTilt,e.tiltEventTypes,je$2,e.inertiaSpin,"_lastInertiaTiltMovement"),b$c(e,e.enableTranslate,e.translateEventTypes,qe$1,e.inertiaTranslate,"_lastInertiaTranslateMovement"),b$c(e,e.enableZoom,e.zoomEventTypes,et$4,e.inertiaZoom,"_lastInertiaZoomMovement"),b$c(e,e.enableLook,e.lookEventTypes,F$8),!(e._aggregator.anyButtonDown||e$2e(e._lastInertiaZoomMovement)&&e._lastInertiaZoomMovement.active||e$2e(e._lastInertiaTranslateMovement)&&e._lastInertiaTranslateMovement.active||i.contains(e._tween))){var n=t.createCorrectPositionTween(e.bounceAnimationTime);e$2e(n)&&(e._tween=i.add(n))}i.update()}else b$c(e,e.enableRotate,e.rotateEventTypes,X$5,e.inertiaSpin,"_lastInertiaSpinMovement"),b$c(e,e.enableZoom,e.zoomEventTypes,Si$2,e.inertiaZoom,"_lastInertiaZoomMovement")}new f$19;var nt$4=new o$1m(o$1p.UNIT_X,0);new o$1p,new o$1p;var Ya=new o$1p;function Pa(e,t,i){var n=e._scene.camera,r=e._strafeStartPosition,o=e.operPlane;if(e$2e(r)&&e$2e(o)){t=i.startPosition;var a=o$1o.clone(i.endPosition,new o$1o);if(e.flipY){var s=a.y-t.y;a.y=t.y-s}var l=n.getPickRay(t,new f$19),u=n.getPickRay(a,new f$19),c=g$1j.rayPlane(l,o,new o$1p),h=g$1j.rayPlane(u,o,new o$1p);if(e$2e(c)&&e$2e(h)){var d=o$1p.normalize(c,new o$1p),f=o$1p.normalize(h,new o$1p),p=o$1p.angleBetween(d,f);if(0!=p){var _=o$1p.cross(d,f,new o$1p);n.rotate(_,p),n._adjustHeightForTerrain()}}}}var Ii$2=new o$1p,oa$2=new a$18,xi$2=new o$1p,Di$2=new t$12,rt$5=new o$1p;function Mi$2(e,t,i,n){var r=e._scene,o=r.camera,a=o$1p.magnitude(n);if(o$1p.magnitude(o.position)<a){o$1p.clone(n,e._strafeStartPosition);var s=new o$1p;e.flipY=!0,s=o$1p.add(o.direction,o.up,s),o$1p.normalize(s,s);var l=o$1m.fromPointNormal(n,s,nt$4);e.operPlane=l,e._strafing=!0,Pa(e,t,i)}else{var u=xi$2;u.x=u.y=u.z=a;var c=t$12.fromCartesian3(u,Di$2);e.operEllipsoid=c,!r.undergroundMode&&r.globe.show&&(e._limitObject=mt$1(e,c)),Xa(e,t,i,c),o$1p.clone(n,e._rotateStartPosition)}}function st$3(e,t,i){var n=e._scene,r=n.camera;if(p$1d.equals(r.transform,p$1d.IDENTITY)){var o=e._ellipsoid.geodeticSurfaceNormal(r.position,rt$5),a=e._ellipsoid.cartesianToCartographic(r.positionWC,oa$2).height,s=e._globe;if(o$1o.equals(t,e._rotateMousePosition))e._looking?F$8(e,t,i,o):e._rotating?X$5(e,t,i):e._strafing?Pa(e,t,i,e.operPlane):Xa(e,t,i,e.operEllipsoid);else{if(e._looking=!1,e._rotating=!1,e._strafing=!1,e.enableWalk)return e._limitObject=void 0,e._looking=!0,void F$8(e,t,i,o);e$2e(s)&&a<e._minimumPickingTerrainHeight?ea$3(e,t,Ya).then((o=>{if(!e$2e(o)){var a=new f$19(r.position,r.direction),l=s.pick(a,n,la$1);if(e$2e(l)){var u=s$R.wgs84ToWindowCoordinates(n,l,new o$1p);ea$3(e,new o$1o(t.x,u.y+100),Ya).then((n=>{!e$2e(n)||Mi$2(e,t,i,n)}))}else if(!e$2e(o=r.pickEllipsoid(t,s.ellipsoid,Ya)))return}Mi$2(e,t,i,o)})):e$2e(r.pickEllipsoid(i.startPosition,e._ellipsoid,Ii$2))?(e._limitObject=void 0,Xa(e,t,i,e._ellipsoid),o$1p.clone(Ii$2,e._rotateStartPosition)):a>e._minimumTrackBallHeight?(e._limitObject=void 0,e._rotating=!0,X$5(e,t,i)):(e._limitObject=void 0,e._looking=!0,F$8(e,t,i,o)),o$1o.clone(t,e._rotateMousePosition)}}else X$5(e,t,i)}function X$5(e,t,i,n,r,o){r=u$Z(r,!1),o=u$Z(o,!1);var a=e._scene,s=a.camera;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(a.camera)),s=e._cloneCamera);var l=a.canvas,u=s.constrainedAxis;e$2e(n)&&(s.constrainedAxis=n);var c=o$1p.magnitude(s.position),h=e._rotateFactor*(c-e._rotateRateRangeAdjustment);h>e._maximumRotateRate&&(h=e._maximumRotateRate),h<e._minimumRotateRate&&(h=e._minimumRotateRate);var d=(i.startPosition.x-i.endPosition.x)/l.clientWidth,f=(i.startPosition.y-i.endPosition.y)/l.clientHeight;d=Math.min(d,e.maximumMovementRatio),f=Math.min(f,e.maximumMovementRatio);var p=Math.abs(d)<Math.abs(f),_=h*d*Math.PI*2,m=h*f*Math.PI;if("ontouchstart"in window&&(m*=2),e.deltaTheta=-m,e.thetaWindowRatio=f,e.phiWindowRatio=d,!r&&!p&&s.rotateRight(_),!o&&p){var g=Math.abs(s.pitch-m),x=s.positionCartographic.height,y=e.minimumZoomDistance+1;if(!(g>-e$2d.PI_OVER_TWO&&g<e$2d.PI_OVER_TWO)||x<y&&m<0)return void(s.constrainedAxis=u);s.rotate(s.right,m)}s.constrainedAxis=u}var Qa=e$2c.clone(e$2c.UNIT_W),zi$2=e$2c.clone(e$2c.UNIT_W);new o$1p,new o$1p,new o$1p,new o$1p;var ot$3=new o$1o,vt$1=new o$1o;function mt$1(e,t){var i=e._scene,n=i.camera,r=i.globe,o=.5*Math.PI,a=new f$19(n.position,n.direction),s=r.pick(a,i,la$1);if(e$2e(s)){var l=o$1p.subtract(n.position,s,new o$1p);o=o$1p.angleBetween(s,l)}var u=e$2d.toDegrees(o);o=e$2d.toRadians(82-u);var c=n$15.fromAxisAngle(n.right,o,Oi$2),h=p$1e.fromQuaternion(c,Ia),d=new o$1p;p$1e.multiplyByVector(h,n.direction,d),o$1p.normalize(d,d);var f=new o$1p;n$15.multiplyByVec(c,n.direction,f),o$1p.normalize(f,f);var p=new f$19(n.position,d),_=g$1j.rayEllipsoid(p,t);if(e$2e(_)){var m=_.start>0?_.start:_.stop,g=f$19.getPoint(p,m,new o$1p),x=new o$1o;if(e$2e(g)){s$R.wgs84ToWindowCoordinates(i,g,x);var y=new o$1o(x.x,x.y-2),v=n.getPickRay(y,gi$2),$=g$1j.rayEllipsoid(v,t);if(e$2e($)){var b=$.start>0?$.start:$.stop,T=f$19.getPoint(v,b,new o$1p);if(e$2e(T))return{angle:.5*o$1p.angleBetween(T,g),division:x.y}}}}}function dt$3(e,t,i,n,r,o,a){var s=e._scene,l=s.camera,u=e._limitObject.division,c=e._limitObject.angle;if(t.y<u){var h=c,d=(n.y-i.y)*h*.5,f=(n.x-i.x)*h*.2,p=n$15.fromAxisAngle(l.right,d,new n$15);n$15.normalize(p,p);var _=p$1e.fromQuaternion(p,Ia);p$1e.multiplyByVector(_,r,o);var m=n$15.fromAxisAngle(l.direction,f,new n$15);n$15.normalize(m,m);var g=p$1e.fromQuaternion(m,Ia);return p$1e.multiplyByVector(g,o,o),!0}if(i.y>u&&n.y>u)return!1;if(i.y<u&&n.y>u)return!!e$2e(e._lastPosition)&&(r=l.pickEllipsoid(e._lastPosition,a),!0);var x=new o$1p,y=0;if(i.y<u&&n.y<u){y=(n.y-i.y)*c;var v=e$2e(e._lastPosition)?e._lastPosition:i;l.pickEllipsoid(v,a,r),x=o$1p.clone(r)}else if(i.y>u&&n.y<u){var $=new o$1o;$.y=u,$.x=($.y-i.y)/(n.y-i.y)*(n.x-i.x)+i.x,x=l.pickEllipsoid($,a),y=(n.y-$.y)*c}var b=new o$1p,T=n$15.fromAxisAngle(l.right,y,Oi$2),C=p$1e.fromQuaternion(T,Ia);p$1e.multiplyByVector(C,x,b);var S=new o$1o;s$R.wgs84ToWindowCoordinates(s,b,S);var w=new o$1o(n.x,S.y),E=l.pickEllipsoid(w,a);return o$1p.clone(E,o),e._lastPosition=o$1o.clone(w),!0}function Xa(e,t,i,n){var r=e._scene,o=r.camera;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(r.camera)),v$K.clone(r.camera,e._cloneCamera),o=e._cloneCamera);var a=o$1o.clone(i.startPosition,ot$3),s=o$1o.clone(i.endPosition,vt$1),l=o.pickEllipsoid(a,n,Qa),u=o.pickEllipsoid(s,n,zi$2);if(!e$2e(l)||!e$2e(u)||isNaN(l.x)||isNaN(u.x)){var c=new f$19(o.position,o.direction),h=r.globe.pick(c,r,la$1);if(e$2e(h)){var d=s$R.wgs84ToWindowCoordinates(r,h,new o$1p);if(!e$2e(d))return;var f=s.y-a.y,p=new o$1o(a.x,d.y),_=new o$1o(s.x,d.y+f);l=o.pickEllipsoid(p,n,Qa),u=o.pickEllipsoid(_,n,zi$2)}}if(e$2e(l)&&e$2e(u)&&!isNaN(l.x)&&!isNaN(u.x)&&(e$2e(e._limitObject)&&dt$3(e,t,a,s,l,u,n),e$2e(l)&&e$2e(u)&&!isNaN(l.x)&&!isNaN(u.x))){l=o.worldToCameraCoordinates(l,l),u=o.worldToCameraCoordinates(u,u);var m=o$1p.angleBetween(l,u),g=new o$1p;o$1p.cross(l,u,g),o$1p.magnitudeSquared(g)<1e-20&&(g=o$1p.cross(l,o$1p.UNIT_X,g),o$1p.magnitudeSquared(g)<1e-20&&(g=o$1p.cross(l,o$1p.UNIT_Y,g))),o$1p.normalize(g,g),o.rotate(g,m),e._enableFusion&&(e.panOffset.x+=i.endPosition.x-i.startPosition.x,e.panOffset.y+=i.endPosition.y-i.startPosition.y,e.panDirty=!0),e.enableIndoorColliDetection&&$$5(e),o._adjustHeightForTerrain()}}var Ra=new o$1p,ft$1=new a$18;function Ea(e,t){var i=e._scene,n=i.globe;if(!(e.autoTiltHeight<1)&&e$2e(n)){var r=i.camera,o=r.positionCartographic;if(o.height-n.getHeight(o)<e.autoTiltHeight){var a=t.endPosition.y-t.startPosition.y>0?1:-1,s=r.pitch+e$2d.toRadians(3)*a;s=Math.min(s,-.01),s=Math.max(s,.5*-Math.PI),r.setView({orientation:{heading:r.heading,pitch:s}})}}}function Si$2(e,t,i){var n=e._ellipsoid,r=e._scene,o=r.camera;if(e$2e(i.distance)&&(i=i.distance),e._enableFusion){var a=i.endPosition.y-i.startPosition.y;e.zoomDirty=!0;var s=e$2d.toRadians(1);a>=0?(o.frustum.fov-=s,o.frustum.fov<e.minFov&&(o.frustum.fov=e.minFov,e.zoomDirty=!1)):(o.frustum.fov+=s,o.frustum.fov>e.maxFov&&(o.frustum.fov=e.maxFov,e.zoomDirty=!1))}else{var l=n.cartesianToCartographic(o.position,ft$1).height;if(!(l<=e.minimumZoomHeight&&i.endPosition.y-i.startPosition.y>0||l>=e.maximumZoomHeight&&i.endPosition.y-i.startPosition.y<0)){var u=t;if(e.isAroundScreenCenter){var c=e._scene.getViewport({x:10,y:10});u={x:c.width/2,y:c.height/2}}ea$3(e,u,Ga).then((n=>{var a;if(a=e$2e(n)?o$1p.distance(o.position,n):l,"ontouchstart"in window){var s=o$1p.normalize(o.position,Ra);ha$1(e,t,i,e._zoomFactor,a,o$1p.dot(s,o.direction))}else xe$2(e,pi$2(r,t),i,e._zoomFactor,a,n);Ea(e,i),o._adjustHeightForTerrain()}))}}}var ut$5=new o$1o,ki$2=new f$19,pa=new o$1p;new o$1p;var bi$2=new p$1d;new p$1d;var Ni$2=new p$1d,Oi$2=new n$15,Ia=new p$1e,Wi$2=new a$18,Vi$2=new o$1p;function _t$2(e,t,i,n){var r=e._scene.camera;if(p$1d.equals(r.transform,p$1d.IDENTITY)){if(e$2e(i.angleAndHeight)&&(i=i.angleAndHeight),o$1o.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e.enableWalk||e._looking){var o=e._ellipsoid.geodeticSurfaceNormal(r.position,Vi$2);return void F$8(e,t,i,o)}var a=e._ellipsoid.cartesianToCartographic(r.position,Wi$2);e._tiltOnEllipsoid||a.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,gt$3(e,t,i,n)):pt$3(e,t,i,n)}}var ht$2=new a$18;function gt$3(e,t,i,n){var r=e._ellipsoid,o=e._scene,a=o.camera,s=.25*e.minimumZoomDistance,l=r.cartesianToCartographic(a.positionWC,ht$2).height;if(!(l-s-1<e$2d.EPSILON3&&i.endPosition.y-i.startPosition.y<0)){var u=o.canvas,c=ut$5;c.x=u.clientWidth/2,c.y=u.clientHeight/2;var h,d=a.getPickRay(c,ki$2),f=g$1j.rayEllipsoid(d,r);if(e$2e(f))h=f$19.getPoint(d,f.start,pa);else{if(!(l>e._minimumTrackBallHeight)){e._looking=!0;var p=e._ellipsoid.geodeticSurfaceNormal(a.position,Vi$2);return F$8(e,t,i,p),void o$1o.clone(t,e._tiltCenterMousePosition)}var _=g$1j.grazingAltitudeLocation(d,r);if(!e$2e(_))return;var m=r.cartesianToCartographic(_,Wi$2);m.height=0,h=r.cartographicToCartesian(m,pa)}if(o$1p.clone(h,e._tiltCenter),!n){var g=m$19.eastNorthUpToFixedFrame(h,r,bi$2),x=e._globe,y=e._ellipsoid;e._globe=void 0,e._ellipsoid=t$12.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var v=p$1d.clone(a.transform,Ni$2);a._setTransform(g),X$5(e,t,i,o$1p.UNIT_Z),a._setTransform(v),e._globe=x,e._ellipsoid=y;var $=y.maximumRadius;e._rotateFactor=1/$,e._rotateRateRangeAdjustment=$}}}var Ai$2=new o$1p;function $$5(e,t){var i=e._scene,n=i.camera,r=e._cloneCamera,o=n.position,a=r.position;if(!o$1p.equals(a,o)){var s=o$1p.subtract(a,o,Ai$2);o$1p.normalize(s,s);var l=i.collideDetection(s);if(e$2e(l)){i.mode===C$14.COLUMBUS_VIEW&&(l=o$1p.fromElements(l.y,l.z,l.x));var u=o$1p.distance(o,l);if(t=u$Z(t,e.minimumDetectDistance),u<=o$1p.distance(o,a)||u<t)return}}v$K.clone(r,i.camera)}function Hi$2(e,t,i,n,r){var o=t._ellipsoid,a=t._scene.camera;if(!r){var s=m$19.eastNorthUpToFixedFrame(e,o,bi$2),l=t._globe,u=t._ellipsoid;t._globe=void 0,t._ellipsoid=t$12.UNIT_SPHERE,t._rotateFactor=1,t._rotateRateRangeAdjustment=1;var c=o$1p.UNIT_Z,h=p$1d.clone(a.transform,Ni$2);a._setTransform(s),X$5(t,n,i,c),a._setTransform(h),t._globe=l,t._ellipsoid=u;var d=u.maximumRadius;t._rotateFactor=1/d,t._rotateRateRangeAdjustment=d,t.enableIndoorColliDetection&&$$5(t,1),a._suspendTerrainAdjustment=!1,a._adjustHeightForTerrain()}}function pt$3(e,t,i,n){var r,o,a,s=e._ellipsoid,l=e._scene,u=l.camera;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(l.camera)),v$K.clone(l.camera,e._cloneCamera),u=e._cloneCamera),o$1o.equals(t,e._tiltCenterMousePosition)&&!e._isAroundScreenCenter?Hi$2(r=o$1p.clone(e._tiltCenter,pa),e,i,t,n):ea$3(e,t,pa).then((l=>{if(!e$2e(r=l)){if(o=u.getPickRay(t,ki$2),!e$2e(a=g$1j.rayEllipsoid(o,s)))return;r=f$19.getPoint(o,a.start,pa)}o$1o.clone(t,e._tiltCenterMousePosition),e._tiltCenter=o$1p.clone(r,e._tiltCenter),Hi$2(r,e,i,t,n)}))}var ct$3=new o$1o,yt$1=new o$1o,Ka=new f$19,Ja=new f$19,wt$2=new o$1p,Ct$1=new o$1p;function F$8(e,t,i,n){var r=e._scene.camera,o=ct$3;o.x=i.startPosition.x,o.y=0;var a=yt$1;a.x=i.endPosition.x,a.y=0;var s,l,u=r.getPickRay(o,Ka),c=r.getPickRay(a,Ja),h=0;r.frustum instanceof a$V?(s=u.origin,l=c.origin,o$1p.add(r.direction,s,s),o$1p.add(r.direction,l,l),o$1p.subtract(s,r.position,s),o$1p.subtract(l,r.position,l),o$1p.normalize(s,s),o$1p.normalize(l,l)):(s=u.direction,l=c.direction);var d=o$1p.dot(s,l);d<1&&(h=Math.acos(d)),h=i.startPosition.x>i.endPosition.x?-h:h;var f=e._horizontalRotationAxis;if(e$2e(n)?r.look(n,-h):e$2e(f)?r.look(f,-h):r.lookLeft(h),o.x=0,o.y=i.startPosition.y,a.x=0,a.y=i.endPosition.y,s=r.getPickRay(o,Ka).direction,l=r.getPickRay(a,Ja).direction,u=r.getPickRay(o,Ka),c=r.getPickRay(a,Ja),h=0,r.frustum instanceof a$V?(s=u.origin,l=c.origin,o$1p.add(r.direction,s,s),o$1p.add(r.direction,l,l),o$1p.subtract(s,r.position,s),o$1p.subtract(l,r.position,l),o$1p.normalize(s,s),o$1p.normalize(l,l)):(s=u.direction,l=c.direction),(d=o$1p.dot(s,l))<1&&(h=Math.acos(d)),h=i.startPosition.y>i.endPosition.y?-h:h,e$2e(n=u$Z(n,f))){var p=r.direction,_=o$1p.negate(n,wt$2),m=o$1p.equalsEpsilon(p,n,e$2d.EPSILON2),g=o$1p.equalsEpsilon(p,_,e$2d.EPSILON2);if(m||g)(m&&h<0||g&&h>0)&&r.look(r.right,-h);else{d=o$1p.dot(p,n);var x=e$2d.acosClamped(d);h>0&&h>x&&(h=x-e$2d.EPSILON4),d=o$1p.dot(p,_),x=e$2d.acosClamped(d),h<0&&-h>x&&(h=-x+e$2d.EPSILON4);var y=o$1p.cross(n,p,Ct$1);r.look(y,h)}}else r.lookUp(h)}var M$7=new o$1p,Zi$1=new o$1p;function xa(e,t){var i=new f$16(t);M$7=o$1p.multiplyByScalar(e,.1,M$7),o$1p.add(t,M$7,M$7);var n=i.projectPointOntoPlane(M$7),r=i.projectPointOntoEllipsoid(n),o=i.projectPointOntoPlane(t),a=i.projectPointOntoEllipsoid(o),s=o$1p.subtract(r,a,Zi$1);return o$1p.normalize(s,s),s}function Da(e,t){var i=o$1m.ORIGIN_XY_PLANE;M$7=o$1p.multiplyByScalar(e,.1,M$7),o$1p.add(t,M$7,M$7);var n=o$1m.projectPointOntoPlane(i,M$7),r=o$1m.projectPointOntoPlane(i,t),o=o$1p.subtract(n,r,Zi$1);return o$1p.normalize(o,o),o}var $a=new f$19,oa$2=new a$18,q$6=new o$1p;function lt$1(e,t){var i=t.positionCartographic;oa$2.longitude=i.longitude,oa$2.latitude=i.latitude,oa$2.height=i.height>0?0:i.height-10,a$18.toCartesian(oa$2,void 0,q$6);var n=o$1p.subtract(q$6,t.position,q$6);o$1p.normalize(n,n),$a.origin=t.position,$a.direction=n;var r=e.pickFromRay($a);if(e$2e(r)&&e$2e(r.position)){var o=r.position;return a$18.fromCartesian(o,void 0,oa$2).height}}function Tt$1(e,t,i){var n=t.positionCartographic,r=lt$1(e,t);if(!e$2e(r)||Math.abs(n.height-r-i)<1)return t.position;n.height=r-Za>2?i+1.8:r+i,Za=n.height;var o=a$18.toCartesian(n);return e$2e(o)?o:t.position}var Ma=new o$1p,za=new o$1p;function Pt$1(e){var t=e._scene,i=t.camera,n=e._aggregator._flags,r=i.position,o=5*e.walkParameters.speed,a=e.walkParameters.height;n.moveForward&&Sa(e,xa(i.direction,r),o),n.moveBackward&&(Ma.x=-i.direction.x,Ma.y=-i.direction.y,Ma.z=-i.direction.z,Sa(e,xa(Ma,r),o)),n.moveLeft&&(za.x=-i.right.x,za.y=-i.right.y,za.z=-i.right.z,Sa(e,xa(za,r),.1*o)),n.moveRight&&Sa(e,xa(i.right,r),.1*o),i.position=Tt$1(t,i,a)}function Sa(e,t,i){var n=e._scene,r=n.camera.position;o$1p.multiplyByScalar(t,i,M$7),o$1p.add(r,M$7,M$7);var o=!0;if(!o$1p.equals(M$7,r)){var a=o$1p.subtract(M$7,r,Ai$2);o$1p.normalize(a,a);var s=n.collideDetection(a);if(e$2e(s))o$1p.distance(M$7,r)-o$1p.distance(r,s)>-e.minimumDetectDistance*Math.abs(i)&&(o=!1)}(o||!e.enableIndoorColliDetection)&&o$1p.clone(M$7,r)}function Rt$3(e){var t,i=e._scene.camera,n=e._aggregator._flags,r=i.position,o=5*e.walkParameters.speed;n.moveForward&&(t=Da(i.direction,r),i.move(t,o)),n.moveBackward&&(t=Da(i.direction,r),i.move(t,-o)),n.moveLeft&&(t=Da(i.right,r),i.move(t,-o)),n.moveRight&&(t=Da(i.right,r),i.move(t,o))}function Et$2(e){b$c(e,e.enableRotate,e.rotateEventTypes,st$3,e.inertiaSpin,"_lastInertiaSpinMovement"),b$c(e,e.enableZoom,e.zoomEventTypes,Si$2,e.inertiaZoom,"_lastInertiaZoomMovement"),b$c(e,e.enableTilt,e.tiltEventTypes,_t$2,e.inertiaSpin,"_lastInertiaTiltMovement"),b$c(e,e.enableLook,e.lookEventTypes,F$8)}_a.prototype.update=function(){p$1d.equals(this._scene.camera.transform,p$1d.IDENTITY)?(this._globe=this._scene.globe,this._ellipsoid=e$2e(this._globe)?this._globe.ellipsoid:this._scene.mapProjection.ellipsoid):(this._globe=void 0,this._ellipsoid=t$12.UNIT_SPHERE),this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight*this._scene.terrainExaggeration,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight*this._scene.terrainExaggeration,this._minimumTrackBallHeight=this.minimumTrackBallHeight*this._scene.terrainExaggeration;var e=this._ellipsoid.maximumRadius;this._rotateFactor=1/e,this._rotateRateRangeAdjustment=e;var t=this._scene.mode;t===C$14.SCENE2D?Oe$3(this):t===C$14.COLUMBUS_VIEW?(this._horizontalRotationAxis=o$1p.UNIT_Z,tt$3(this),this.enableWalk&&Rt$3(this)):t===C$14.SCENE3D&&(this._horizontalRotationAxis=void 0,Et$2(this),this.enableWalk&&Pt$1(this)),this._aggregator.reset()},_a.prototype.isDestroyed=function(){return!1},_a.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),i$11(this)};var k$6={},U$6=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function m$9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var E$8=8192,g$f=[],I$5=function(){function e(t,i){m$9(this,e),i=i||{},void 0===t&&(t=E$8),"number"==typeof t&&(t=new ArrayBuffer(t));var n=t.byteLength,r=i.offset?i.offset>>>0:0;t.buffer&&(n=t.byteLength-r,t=t.byteLength!==t.buffer.byteLength?t.buffer.slice(t.byteOffset+r,t.byteOffset+t.byteLength):r?t.buffer.slice(r):t.buffer),this.buffer=t,this.length=n,this.byteLength=n,this.byteOffset=0,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer),this._increment=n||E$8,this._mark=0}return U$6(e,[{key:"available",value:function(e){return void 0===e&&(e=1),this.offset+e<=this.length}},{key:"isLittleEndian",value:function(){return this.littleEndian}},{key:"setLittleEndian",value:function(){this.littleEndian=!0}},{key:"isBigEndian",value:function(){return!this.littleEndian}},{key:"setBigEndian",value:function(){this.littleEndian=!1}},{key:"skip",value:function(e){void 0===e&&(e=1),this.offset+=e}},{key:"seek",value:function(e){this.offset=e}},{key:"mark",value:function(){this._mark=this.offset}},{key:"reset",value:function(){this.offset=this._mark}},{key:"rewind",value:function(){this.offset=0}},{key:"ensureAvailable",value:function(e){if(void 0===e&&(e=1),!this.available(e)){var t=this._increment+this._increment;this._increment=t;var i=this.length+t,n=new Uint8Array(i);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=i,this._data=new DataView(this.buffer)}}},{key:"readBoolean",value:function(){return 0!==this.readUint8()}},{key:"readInt8",value:function(){return this._data.getInt8(this.offset++)}},{key:"readUint8",value:function(){return this._data.getUint8(this.offset++)}},{key:"readByte",value:function(){return this.readUint8()}},{key:"readBytes",value:function(e){void 0===e&&(e=1);for(var t=new Uint8Array(e),i=0;i<e;i++)t[i]=this.readByte();return t}},{key:"readInt16",value:function(){var e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}},{key:"readUint16",value:function(){var e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}},{key:"readInt32",value:function(){var e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readUint32",value:function(){var e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readFloat32",value:function(){var e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readFloat64",value:function(){var e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}},{key:"readChar",value:function(){return String.fromCharCode(this.readInt8())}},{key:"readChars",value:function(e){void 0===e&&(e=1),g$f.length=e;for(var t=0;t<e;t++)g$f[t]=this.readChar();return g$f.join("")}},{key:"writeBoolean",value:function(e){this.writeUint8(e?255:0)}},{key:"writeInt8",value:function(e){this.ensureAvailable(1),this._data.setInt8(this.offset++,e)}},{key:"writeUint8",value:function(e){this.ensureAvailable(1),this._data.setUint8(this.offset++,e)}},{key:"writeByte",value:function(e){this.writeUint8(e)}},{key:"writeBytes",value:function(e){this.ensureAvailable(e.length);for(var t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t])}},{key:"writeInt16",value:function(e){this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2}},{key:"writeUint16",value:function(e){this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2}},{key:"writeInt32",value:function(e){this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeUint32",value:function(e){this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeFloat32",value:function(e){this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeFloat64",value:function(e){this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8}},{key:"writeChar",value:function(e){this.writeUint8(e.charCodeAt(0))}},{key:"writeChars",value:function(e){for(var t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t))}},{key:"toArray",value:function(){return new Uint8Array(this.buffer,0,this.offset)}}]),e}(),s$9={};function A$b(e,t){if(e)throw new TypeError("Not a valid NetCDF v3.x file: "+t)}function b$b(e){e.offset%4!=0&&e.skip(4-e.offset%4)}function T$b(e){var t=e.readUint32(),i=e.readChars(t);return b$b(e),i}s$9.notNetcdf=A$b,s$9.padding=b$b,s$9.readName=T$b;var a$6={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6};function N$5(e){switch(Number(e)){case a$6.BYTE:return"byte";case a$6.CHAR:return"char";case a$6.SHORT:return"short";case a$6.INT:return"int";case a$6.FLOAT:return"float";case a$6.DOUBLE:return"double";default:return"undefined"}}function v$7(e,t){if(1!==e){for(var i=new Array(e),n=0;n<e;n++)i[n]=t();return i}return t()}function F$7(e,t,i){switch(t){case a$6.BYTE:return e.readBytes(i);case a$6.CHAR:return L$9(e.readChars(i));case a$6.SHORT:return v$7(i,e.readInt16.bind(e));case a$6.INT:return v$7(i,e.readInt32.bind(e));case a$6.FLOAT:return v$7(i,e.readFloat32.bind(e));case a$6.DOUBLE:return v$7(i,e.readFloat64.bind(e));default:return void A$b(!0,"non valid type "+t)}}function L$9(e){return 0===e.charCodeAt(e.length-1)?e.substring(0,e.length-1):e}var d$d=0,D$5=10,O$7=11,p$5=12;function R$7(e){var t={recordDimension:{length:e.readUint32()}},i=S$4(e);t.recordDimension.id=i.recordId,t.recordDimension.name=i.recordName,t.dimensions=i.dimensions,t.globalAttributes=B$6(e);var n=H$9(e,i.recordId);return t.variables=n.variables,t.recordDimension.recordStep=n.recordStep,t}function S$4(e){var t,i,n=e.readUint32();if(n===d$d)return s$9.notNetcdf(e.readUint32()!==d$d,"wrong empty tag for list of dimensions"),[];s$9.notNetcdf(n!==D$5,"wrong tag for list of dimensions");for(var r=e.readUint32(),o=new Array(r),a=0;a<r;a++){var s=s$9.readName(e),l=e.readUint32();0===l&&(t=a,i=s),o[a]={name:s,size:l}}return{dimensions:o,recordId:t,recordName:i}}function B$6(e){var t=e.readUint32();if(t===d$d)return s$9.notNetcdf(e.readUint32()!==d$d,"wrong empty tag for list of attributes"),[];s$9.notNetcdf(t!==p$5,"wrong tag for list of attributes");for(var i=e.readUint32(),n=new Array(i),r=0;r<i;r++){var o=s$9.readName(e),a=e.readUint32();s$9.notNetcdf(a<1||a>6,"non valid type "+a);var s=e.readUint32(),l=F$7(e,a,s);s$9.padding(e),n[r]={name:o,type:N$5(a),value:l}}return n}function H$9(e,t){var i=e.readUint32(),n=0;if(i===d$d)return s$9.notNetcdf(e.readUint32()!==d$d,"wrong empty tag for list of variables"),[];s$9.notNetcdf(i!==O$7,"wrong tag for list of variables");for(var r=e.readUint32(),o=new Array(r),a=0;a<r;a++){for(var s=s$9.readName(e),l=e.readUint32(),u=new Array(l),c=0;c<l;c++)u[c]=e.readUint32();var h=B$6(e),d=e.readUint32();s$9.notNetcdf(d<1&&d>6,"non valid type "+d);var f=e.readUint32(),p=e.readUint32();u[0]===t&&(n+=f),o[a]={name:s,dimensions:u,attributes:h,type:N$5(d),size:f,offset:p,record:u[0]===t}}return{variables:o,recordStep:n}}!function(){function e(t){m$9(this,e);var i=new I$5(t);i.setBigEndian(),s$9.notNetcdf("CDF"!==i.readChars(3),"should start with CDF");var n=i.readByte();s$9.notNetcdf(2===n,"64-bit offset format not supported yet"),s$9.notNetcdf(1!==n,"unknown version"),this.header=R$7(i),this.header.version=n,this.buffer=i}U$6(e,[{key:"getDataVariable",value:function(e){var t;return t="string"==typeof e?this.header.variables.find((function(t){return t.name===e})):e,s$9.notNetcdf(void 0===t,"variable not found"),this.buffer.seek(t.offset),t.record?data.record(this.buffer,t,this.header.recordDimension):data.nonRecord(this.buffer,t)}},{key:"version",get:function(){return 1===this.header.version?"classic format":"64-bit offset format"}},{key:"recordDimension",get:function(){return this.header.recordDimension}},{key:"dimensions",get:function(){return this.header.dimensions}},{key:"globalAttributes",get:function(){return this.header.globalAttributes}},{key:"variables",get:function(){return this.header.variables}}]),k$6.NetCDFReader=e}();var e$4={VolumeRendering:0,Slice:1,ContourValue:2},gt$2=Object.freeze(e$4),Ft$2="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nvarying vec4 vTexCoord;\nvarying vec4 vNearTexCoord;\n#ifdef HAS_LIGHT\nvarying vec4 vPositionMC;\n#endif\nuniform vec3 u_volumeBoxSize;\nuniform vec3 scale;\nuniform vec3 uOffset;\n\nvoid main()\n{\n vTexCoord = vec4(aTexCoord0.xyz, 1.0);\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n",Rt$2="varying vec4 vTexCoord;\nvarying vec4 vNearTexCoord;\nuniform sampler2D u_colorTable;\nuniform vec4 u_minMaxValueAndFiltration;\nuniform vec3 u_maxVisibleTextureCoord;\nuniform vec3 u_minVisibleTextureCoord;\n// opacity and color textures\nuniform sampler2D u_opacityTexture;\nuniform sampler2D u_colorTexture;\nvec4 getColorForValue(float tValue)\n{\n float texCoord = tValue;\n\ttexCoord = clamp(texCoord, 0.0, 1.0);\n vec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\n tColor.a = texture2D(u_opacityTexture, vec2(texCoord, 0.5)).r;\n return tColor;\n}\n\nvec4 getSampleValue(vec3 pos)\n{\n\tif(vTexCoord.x > u_maxVisibleTextureCoord.x || vTexCoord.x < u_minVisibleTextureCoord.x\n\t|| vTexCoord.y > u_maxVisibleTextureCoord.y || vTexCoord.y < u_minVisibleTextureCoord.y\n\t|| vTexCoord.z > u_maxVisibleTextureCoord.z || vTexCoord.z < u_minVisibleTextureCoord.z)\n\t{\n\t\tdiscard;\n\t}\n\n float noValue;\n float value = czm_getVolumeValue(pos, noValue);\n\tvec4 color = getColorForValue(value);\n\treturn color;\n}\nvoid main()\n{\n vec3 texcood = vTexCoord.xyz;\n if(uFilterMode > 0.5)\n {\n texcood = vNearTexCoord.xyz;\n }\n\tgl_FragColor = getSampleValue(texcood);\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x51e734=(_0x8ace7e=!0,function(e,t){var i=_0x8ace7e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8ace7e=!1,i}),_0x3e45e5=_0x51e734(void 0,(function(){return _0x3e45e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e45e5).search("(((.+)+)+)+$")})),_0x8ace7e;_0x3e45e5();var Mt$2="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nvarying vec3 positionEC;\nvarying vec3 vTexCoord;\nvoid main()\n{\n positionEC = (czm_modelView * aPosition).xyz;\n vTexCoord = aTexCoord0.xyz;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",_0x4884f6=(_0x521dbf=!0,function(e,t){var i=_0x521dbf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x521dbf=!1,i}),_0x4b813f=_0x4884f6(void 0,(function(){return _0x4b813f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b813f).search("(((.+)+)+)+$")})),_0x521dbf;_0x4b813f();var Nt$2="uniform vec3 u_camTexCoord;\nuniform vec4 u_minMaxValueAndFiltration;\n// opacity and color textures\nuniform sampler2D u_opacityTexture;\nuniform sampler2D u_colorTexture;\nuniform float u_sampleDistance;\nuniform vec4 u_gradientOpacityInfo;\n#ifdef CLIP_PLANE\nuniform vec4 u_clip_planes[6];\nuniform int u_clip_planes_count;\n#endif\n#ifdef APPLY_LIGHTING\n uniform vec3 uDiffuse;\n uniform vec3 uSpecular;\n uniform vec3 uAmbient;\n uniform float uShiness;\n#endif\n\nvarying vec3 positionEC;\nvarying vec3 vTexCoord;\n\nfloat realValueToScalarValue(float value){\n float minValue = u_minMaxValueAndFiltration.z;\n float maxValue = u_minMaxValueAndFiltration.w;\n return (value - minValue) / (maxValue - minValue);\n}\nfloat scalarValueToReaValue(float value){\n float minValue = u_minMaxValueAndFiltration.x;\n float maxValue = u_minMaxValueAndFiltration.y;\n return minValue + value * (maxValue - minValue);\n}\nfloat getTextureValue(vec3 pos)\n{\n float noValue;\n #ifdef MultiResolution\n float value = czm_getVolumeValueMultiResolution(pos, noValue);\n #else\n float value = czm_getVolumeValue(pos, noValue);\n #endif\n value = scalarValueToReaValue(value);\n return value;\n}\n\n// Given a normal compute the gradient opacity factors\nfloat computeGradientOpacityFactor(vec4 normal, float goscale, float goshift, float gomin, float gomax)\n{\n#ifdef GRADIENT_OPACITY\n return clamp(normal.a*goscale + goshift, gomin, gomax);\n#else\n return 1.0;\n#endif\n}\n\n// compute the normal and gradient magnitude for a position\nvec4 computeNormal(vec3 pos, float scalar, vec3 tstep)\n{\n vec4 result;\n result.x = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)) - scalar;\n result.y = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)) - scalar;\n result.z = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)) - scalar;\n // divide by spacing\n vec3 vSpacing = vec3(1.0);\n result.xyz /= vSpacing;\n result.w = length(result.xyz);\n // rotate to View Coords\n //result.xyz = result.x * vPlaneNormal0 + result.y * vPlaneNormal2 + result.z * vPlaneNormal4;\n if (result.w > 0.0)\n {\n result.xyz /= result.w;\n }\n return result;\n}\n\n#ifdef APPLY_LIGHTING\nvoid applyLighting(inout vec4 tColor, vec3 normal)\n{\n vec3 diffuse = uDiffuse;\n vec3 specular = uSpecular;\n vec3 ambient = uAmbient;\n float shiness = uShiness;\n vec3 normalEC = normalize(czm_normal * normal);\n float ndot = max( dot( normalEC, czm_sunDirectionEC ), 0.0 );\n ndot = ndot * 0.5 + 0.5;\n diffuse = diffuse * ndot;\n specular = specular * czm_getSpecular(czm_sunDirectionEC, normalize(-positionEC), normalEC, shiness);\n tColor.rgb = tColor.rgb*(diffuse + ambient) + specular;\n}\n#endif\n\nvec4 getColorForValue(vec3 posIS, vec3 stepIS, float tValue)\n{\n vec4 goFactor = vec4(1.0,1.0,1.0,1.0);\n#if defined(GRADIENT_OPACITY) || defined(APPLY_LIGHTING)\n vec4 normal0 = computeNormal(posIS, tValue, stepIS);\n#endif\n#ifdef GRADIENT_OPACITY\n float goscale = u_gradientOpacityInfo.z;\n float goshift = u_gradientOpacityInfo.w;\n float gomin = u_gradientOpacityInfo.x;\n float gomax = u_gradientOpacityInfo.y;\n goFactor.x = computeGradientOpacityFactor(normal0, goscale, goshift, gomin, gomax);\n#endif\n float texCoord = realValueToScalarValue(tValue);\n\ttexCoord = clamp(texCoord, 0.0, 1.0);\n vec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\n tColor.a = goFactor.x * texture2D(u_opacityTexture, vec2(texCoord, 0.5)).r;\n#ifdef APPLY_LIGHTING\n applyLighting(tColor, normal0.xyz);\n#endif\n return tColor;\n}\n\nvec4 applyBlend(vec3 posIS, vec3 endIS, vec3 stepIS, float texSampleDist)\n{\n float raySteps = 1.0 / texSampleDist;\n float jitter = 0.1;\n float stepsTraveled = jitter;\n // local vars for the loop\n vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n float tValue;\n vec4 tColor;\n // Perform initial step at the volume boundary\n // compute the scalar\n tValue = getTextureValue(posIS);\n // now map through opacity and color\n tColor = getColorForValue(posIS, stepIS, tValue);\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps);\n return tColor;\n }\n\n tColor.a = 1.0 - pow(1.0 - tColor.a, jitter);\n color = vec4(tColor.rgb * tColor.a, tColor.a);\n posIS += (jitter * stepIS);\n\n bool find = false;\n\n for (int i = 0; i < 5000 ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n // compute the scalar\n tValue = getTextureValue(posIS);\n // now map through opacity and color\n tColor = getColorForValue(posIS, stepIS, tValue);\n float mix = (1.0 - color.a);\n if(!find){\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n }\n stepsTraveled++;\n posIS += stepIS;\n if(posIS.x > 1.0 || posIS.x < 0.0 || posIS.y > 1.0 || posIS.y < 0.0 || posIS.z > 1.0 || posIS.z < 0.0){\n find = true;\n#ifndef WEBGPU\n break;\n#endif \n }\n if (color.a > 0.99) { \n color.a = 1.0;\n find = true;\n#ifndef WEBGPU\n break;\n#endif \n }\n }\n\n return vec4(color.rgb/color.a, color.a);\n}\n\nvec2 intersectBox(vec3 texel_zero, vec3 texel_dir_norm)\n{\n vec3 minV = vec3(0.0);\n vec3 maxV = vec3(1.0);\n float t1,t2;\n t1=(minV.x-texel_zero.x)/texel_dir_norm.x;\n t2=(maxV.x-texel_zero.x)/texel_dir_norm.x;\n float tminX=min(t1,t2);\n float tmaxX=max(t1,t2);\n t1=(minV.y-texel_zero.y)/texel_dir_norm.y;\n t2=(maxV.y-texel_zero.y)/texel_dir_norm.y;\n float tminY=min(t1,t2);\n float tmaxY=max(t1,t2);\n t1=(minV.z-texel_zero.z)/texel_dir_norm.z;\n t2=(maxV.z-texel_zero.z)/texel_dir_norm.z;\n float tminZ=min(t1,t2);\n float tmaxZ=max(t1,t2);\n float largest_tmin = max(max(tminX, tminY), max(tminX, tminZ));\n float smallest_tmax = min(min(tmaxX, tmaxY), min(tmaxX, tmaxZ));\n vec2 dists = vec2(largest_tmin,smallest_tmax);\n \n#ifdef CLIP_PLANE\n for(int i = 0; i < 6; i++){\n if(i == u_clip_planes_count){\n break;\n }\n float rayDirRatio = dot(texel_dir_norm, u_clip_planes[i].xyz);\n float equationResult = dot(texel_zero.xyz, u_clip_planes[i].xyz) + u_clip_planes[i].w;\n if (rayDirRatio == 0.0){\n if (equationResult < 0.0){\n dists.x = dists.y;\n }\n continue;\n }\n float result = -1.0 * equationResult / rayDirRatio;\n if (rayDirRatio < 0.0){\n dists.y = min(dists.y, result);\n }\n else {\n dists.x = max(dists.x, result);\n }\n }\n#endif\n return dists;\n}\nvoid main()\n{\n vec3 cameraDir = normalize(positionEC.xyz);\n vec3 localZero = u_camTexCoord;\n vec3 localOne = vTexCoord.xyz;\n vec3 texel_dir_norm = normalize(localOne.xyz - localZero.xyz);\n\n vec3 texel_zero = localZero.xyz;\n vec2 nearFar = intersectBox(texel_zero, texel_dir_norm);\n // 采样间隔受相机与物体之间的距离控制\n float texSampleDist = u_sampleDistance;\n vec3 texel_step = texSampleDist * texel_dir_norm;\n float tstep = length(texel_step);\n float tnear = max(nearFar.x, 0.0) + tstep;\n float tfar = nearFar.y - tstep;\n vec3 coord;\n if(tnear > tfar){\n discard;\n }\n else{\n coord = texel_zero + texel_dir_norm * tnear;\n }\n gl_FragColor = applyBlend(coord, texel_zero + texel_dir_norm * tfar, texel_step, texSampleDist);\n}",_0x4c43ec=(_0x26542f=!0,function(e,t){var i=_0x26542f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x26542f=!1,i}),_0x16afd8=_0x4c43ec(void 0,(function(){return _0x16afd8.toString().search("(((.+)+)+)+$").toString().constructor(_0x16afd8).search("(((.+)+)+)+$")})),_0x26542f;_0x16afd8();var _0x336f6e=[[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,9,1,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,11,2,0,9,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,3,8,2,8,11,11,8,9,-1,-1,-1,-1,-1,-1,-1],[3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,8,0,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,2,10,1,10,9,9,10,8,-1,-1,-1,-1,-1,-1,-1],[3,1,11,10,3,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,11,0,11,8,8,11,10,-1,-1,-1,-1,-1,-1,-1],[3,0,9,3,9,10,10,9,11,-1,-1,-1,-1,-1,-1,-1],[9,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,7,4,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,9,1,4,1,7,7,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,7,4,3,4,0,1,11,2,-1,-1,-1,-1,-1,-1,-1],[9,11,2,9,2,0,8,7,4,-1,-1,-1,-1,-1,-1,-1],[2,9,11,2,7,9,2,3,7,7,4,9,-1,-1,-1,-1],[8,7,4,3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,7,4,10,4,2,2,4,0,-1,-1,-1,-1,-1,-1,-1],[9,1,0,8,7,4,2,10,3,-1,-1,-1,-1,-1,-1,-1],[4,10,7,9,10,4,9,2,10,9,1,2,-1,-1,-1,-1],[3,1,11,3,11,10,7,4,8,-1,-1,-1,-1,-1,-1,-1],[1,11,10,1,10,4,1,4,0,7,4,10,-1,-1,-1,-1],[4,8,7,9,10,0,9,11,10,10,3,0,-1,-1,-1,-1],[4,10,7,4,9,10,9,11,10,-1,-1,-1,-1,-1,-1,-1],[9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,4,5,1,0,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,4,5,8,5,3,3,5,1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,11,2,4,5,9,-1,-1,-1,-1,-1,-1,-1],[5,11,2,5,2,4,4,2,0,-1,-1,-1,-1,-1,-1,-1],[2,5,11,3,5,2,3,4,5,3,8,4,-1,-1,-1,-1],[9,4,5,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,0,10,8,4,5,9,-1,-1,-1,-1,-1,-1,-1],[0,4,5,0,5,1,2,10,3,-1,-1,-1,-1,-1,-1,-1],[2,5,1,2,8,5,2,10,8,4,5,8,-1,-1,-1,-1],[11,10,3,11,3,1,9,4,5,-1,-1,-1,-1,-1,-1,-1],[4,5,9,0,1,8,8,1,11,8,11,10,-1,-1,-1,-1],[5,0,4,5,10,0,5,11,10,10,3,0,-1,-1,-1,-1],[5,8,4,5,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1],[9,8,7,5,9,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,0,3,9,3,5,5,3,7,-1,-1,-1,-1,-1,-1,-1],[0,8,7,0,7,1,1,7,5,-1,-1,-1,-1,-1,-1,-1],[1,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,7,9,7,5,11,2,1,-1,-1,-1,-1,-1,-1,-1],[11,2,1,9,0,5,5,0,3,5,3,7,-1,-1,-1,-1],[8,2,0,8,5,2,8,7,5,11,2,5,-1,-1,-1,-1],[2,5,11,2,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1],[7,5,9,7,9,8,3,2,10,-1,-1,-1,-1,-1,-1,-1],[9,7,5,9,2,7,9,0,2,2,10,7,-1,-1,-1,-1],[2,10,3,0,8,1,1,8,7,1,7,5,-1,-1,-1,-1],[10,1,2,10,7,1,7,5,1,-1,-1,-1,-1,-1,-1,-1],[9,8,5,8,7,5,11,3,1,11,10,3,-1,-1,-1,-1],[5,0,7,5,9,0,7,0,10,1,11,0,10,0,11,-1],[10,0,11,10,3,0,11,0,5,8,7,0,5,0,7,-1],[10,5,11,7,5,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,1,0,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,1,8,9,5,6,11,-1,-1,-1,-1,-1,-1,-1],[1,5,6,2,1,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,5,6,1,6,2,3,8,0,-1,-1,-1,-1,-1,-1,-1],[9,5,6,9,6,0,0,6,2,-1,-1,-1,-1,-1,-1,-1],[5,8,9,5,2,8,5,6,2,3,8,2,-1,-1,-1,-1],[2,10,3,11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,8,0,10,0,2,11,5,6,-1,-1,-1,-1,-1,-1,-1],[0,9,1,2,10,3,5,6,11,-1,-1,-1,-1,-1,-1,-1],[5,6,11,1,2,9,9,2,10,9,10,8,-1,-1,-1,-1],[6,10,3,6,3,5,5,3,1,-1,-1,-1,-1,-1,-1,-1],[0,10,8,0,5,10,0,1,5,5,6,10,-1,-1,-1,-1],[3,6,10,0,6,3,0,5,6,0,9,5,-1,-1,-1,-1],[6,9,5,6,10,9,10,8,9,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,4,3,7,6,11,5,-1,-1,-1,-1,-1,-1,-1],[1,0,9,5,6,11,8,7,4,-1,-1,-1,-1,-1,-1,-1],[11,5,6,1,7,9,1,3,7,7,4,9,-1,-1,-1,-1],[6,2,1,6,1,5,4,8,7,-1,-1,-1,-1,-1,-1,-1],[1,5,2,5,6,2,3,4,0,3,7,4,-1,-1,-1,-1],[8,7,4,9,5,0,0,5,6,0,6,2,-1,-1,-1,-1],[7,9,3,7,4,9,3,9,2,5,6,9,2,9,6,-1],[3,2,10,7,4,8,11,5,6,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,2,7,4,0,2,2,10,7,-1,-1,-1,-1],[0,9,1,4,8,7,2,10,3,5,6,11,-1,-1,-1,-1],[9,1,2,9,2,10,9,10,4,7,4,10,5,6,11,-1],[8,7,4,3,5,10,3,1,5,5,6,10,-1,-1,-1,-1],[5,10,1,5,6,10,1,10,0,7,4,10,0,10,4,-1],[0,9,5,0,5,6,0,6,3,10,3,6,8,7,4,-1],[6,9,5,6,10,9,4,9,7,7,9,10,-1,-1,-1,-1],[11,9,4,6,11,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,6,11,4,11,9,0,3,8,-1,-1,-1,-1,-1,-1,-1],[11,1,0,11,0,6,6,0,4,-1,-1,-1,-1,-1,-1,-1],[8,1,3,8,6,1,8,4,6,6,11,1,-1,-1,-1,-1],[1,9,4,1,4,2,2,4,6,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,9,2,2,9,4,2,4,6,-1,-1,-1,-1],[0,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,2,3,8,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1],[11,9,4,11,4,6,10,3,2,-1,-1,-1,-1,-1,-1,-1],[0,2,8,2,10,8,4,11,9,4,6,11,-1,-1,-1,-1],[3,2,10,0,6,1,0,4,6,6,11,1,-1,-1,-1,-1],[6,1,4,6,11,1,4,1,8,2,10,1,8,1,10,-1],[9,4,6,9,6,3,9,3,1,10,3,6,-1,-1,-1,-1],[8,1,10,8,0,1,10,1,6,9,4,1,6,1,4,-1],[3,6,10,3,0,6,0,4,6,-1,-1,-1,-1,-1,-1,-1],[6,8,4,10,8,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,6,11,7,11,8,8,11,9,-1,-1,-1,-1,-1,-1,-1],[0,3,7,0,7,11,0,11,9,6,11,7,-1,-1,-1,-1],[11,7,6,1,7,11,1,8,7,1,0,8,-1,-1,-1,-1],[11,7,6,11,1,7,1,3,7,-1,-1,-1,-1,-1,-1,-1],[1,6,2,1,8,6,1,9,8,8,7,6,-1,-1,-1,-1],[2,9,6,2,1,9,6,9,7,0,3,9,7,9,3,-1],[7,0,8,7,6,0,6,2,0,-1,-1,-1,-1,-1,-1,-1],[7,2,3,6,2,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,10,3,11,8,6,11,9,8,8,7,6,-1,-1,-1,-1],[2,7,0,2,10,7,0,7,9,6,11,7,9,7,11,-1],[1,0,8,1,8,7,1,7,11,6,11,7,2,10,3,-1],[10,1,2,10,7,1,11,1,6,6,1,7,-1,-1,-1,-1],[8,6,9,8,7,6,9,6,1,10,3,6,1,6,3,-1],[0,1,9,10,7,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,0,8,7,6,0,3,0,10,10,0,6,-1,-1,-1,-1],[7,6,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,9,1,8,1,3,10,6,7,-1,-1,-1,-1,-1,-1,-1],[11,2,1,6,7,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,8,0,6,7,10,-1,-1,-1,-1,-1,-1,-1],[2,0,9,2,9,11,6,7,10,-1,-1,-1,-1,-1,-1,-1],[6,7,10,2,3,11,11,3,8,11,8,9,-1,-1,-1,-1],[7,3,2,6,7,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,8,0,7,0,6,6,0,2,-1,-1,-1,-1,-1,-1,-1],[2,6,7,2,7,3,0,9,1,-1,-1,-1,-1,-1,-1,-1],[1,2,6,1,6,8,1,8,9,8,6,7,-1,-1,-1,-1],[11,6,7,11,7,1,1,7,3,-1,-1,-1,-1,-1,-1,-1],[11,6,7,1,11,7,1,7,8,1,8,0,-1,-1,-1,-1],[0,7,3,0,11,7,0,9,11,6,7,11,-1,-1,-1,-1],[7,11,6,7,8,11,8,9,11,-1,-1,-1,-1,-1,-1,-1],[6,4,8,10,6,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,6,3,6,0,0,6,4,-1,-1,-1,-1,-1,-1,-1],[8,10,6,8,6,4,9,1,0,-1,-1,-1,-1,-1,-1,-1],[9,6,4,9,3,6,9,1,3,10,6,3,-1,-1,-1,-1],[6,4,8,6,8,10,2,1,11,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,10,0,0,10,6,0,6,4,-1,-1,-1,-1],[4,8,10,4,10,6,0,9,2,2,9,11,-1,-1,-1,-1],[11,3,9,11,2,3,9,3,4,10,6,3,4,3,6,-1],[8,3,2,8,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1],[0,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,4,3,2,6,4,4,8,3,-1,-1,-1,-1],[1,4,9,1,2,4,2,6,4,-1,-1,-1,-1,-1,-1,-1],[8,3,1,8,1,6,8,6,4,6,1,11,-1,-1,-1,-1],[11,0,1,11,6,0,6,4,0,-1,-1,-1,-1,-1,-1,-1],[4,3,6,4,8,3,6,3,11,0,9,3,11,3,9,-1],[11,4,9,6,4,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,5,9,7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,5,9,10,6,7,-1,-1,-1,-1,-1,-1,-1],[5,1,0,5,0,4,7,10,6,-1,-1,-1,-1,-1,-1,-1],[10,6,7,8,4,3,3,4,5,3,5,1,-1,-1,-1,-1],[9,4,5,11,2,1,7,10,6,-1,-1,-1,-1,-1,-1,-1],[6,7,10,1,11,2,0,3,8,4,5,9,-1,-1,-1,-1],[7,10,6,5,11,4,4,11,2,4,2,0,-1,-1,-1,-1],[3,8,4,3,4,5,3,5,2,11,2,5,10,6,7,-1],[7,3,2,7,2,6,5,9,4,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,6,8,0,2,6,6,7,8,-1,-1,-1,-1],[3,2,6,3,6,7,1,0,5,5,0,4,-1,-1,-1,-1],[6,8,2,6,7,8,2,8,1,4,5,8,1,8,5,-1],[9,4,5,11,6,1,1,6,7,1,7,3,-1,-1,-1,-1],[1,11,6,1,6,7,1,7,0,8,0,7,9,4,5,-1],[4,11,0,4,5,11,0,11,3,6,7,11,3,11,7,-1],[7,11,6,7,8,11,5,11,4,4,11,8,-1,-1,-1,-1],[6,5,9,6,9,10,10,9,8,-1,-1,-1,-1,-1,-1,-1],[3,10,6,0,3,6,0,6,5,0,5,9,-1,-1,-1,-1],[0,8,10,0,10,5,0,5,1,5,10,6,-1,-1,-1,-1],[6,3,10,6,5,3,5,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,10,5,9,8,10,10,6,5,-1,-1,-1,-1],[0,3,10,0,10,6,0,6,9,5,9,6,1,11,2,-1],[10,5,8,10,6,5,8,5,0,11,2,5,0,5,2,-1],[6,3,10,6,5,3,2,3,11,11,3,5,-1,-1,-1,-1],[5,9,8,5,8,2,5,2,6,3,2,8,-1,-1,-1,-1],[9,6,5,9,0,6,0,2,6,-1,-1,-1,-1,-1,-1,-1],[1,8,5,1,0,8,5,8,6,3,2,8,6,8,2,-1],[1,6,5,2,6,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,6,3,1,11,6,3,6,8,5,9,6,8,6,9,-1],[11,0,1,11,6,0,9,0,5,5,0,6,-1,-1,-1,-1],[0,8,3,5,11,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,6,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,7,10,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,10,5,7,8,0,3,-1,-1,-1,-1,-1,-1,-1],[5,7,10,5,10,11,1,0,9,-1,-1,-1,-1,-1,-1,-1],[11,5,7,11,7,10,9,1,8,8,1,3,-1,-1,-1,-1],[10,2,1,10,1,7,7,1,5,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,7,2,1,5,7,7,10,2,-1,-1,-1,-1],[9,5,7,9,7,2,9,2,0,2,7,10,-1,-1,-1,-1],[7,2,5,7,10,2,5,2,9,3,8,2,9,2,8,-1],[2,11,5,2,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1],[8,0,2,8,2,5,8,5,7,11,5,2,-1,-1,-1,-1],[9,1,0,5,3,11,5,7,3,3,2,11,-1,-1,-1,-1],[9,2,8,9,1,2,8,2,7,11,5,2,7,2,5,-1],[1,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,7,8,0,1,7,1,5,7,-1,-1,-1,-1,-1,-1,-1],[9,3,0,9,5,3,5,7,3,-1,-1,-1,-1,-1,-1,-1],[9,7,8,5,7,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[5,4,8,5,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1],[5,4,0,5,0,10,5,10,11,10,0,3,-1,-1,-1,-1],[0,9,1,8,11,4,8,10,11,11,5,4,-1,-1,-1,-1],[11,4,10,11,5,4,10,4,3,9,1,4,3,4,1,-1],[2,1,5,2,5,8,2,8,10,4,8,5,-1,-1,-1,-1],[0,10,4,0,3,10,4,10,5,2,1,10,5,10,1,-1],[0,5,2,0,9,5,2,5,10,4,8,5,10,5,8,-1],[9,5,4,2,3,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,11,5,3,2,5,3,5,4,3,4,8,-1,-1,-1,-1],[5,2,11,5,4,2,4,0,2,-1,-1,-1,-1,-1,-1,-1],[3,2,11,3,11,5,3,5,8,4,8,5,0,9,1,-1],[5,2,11,5,4,2,1,2,9,9,2,4,-1,-1,-1,-1],[8,5,4,8,3,5,3,1,5,-1,-1,-1,-1,-1,-1,-1],[0,5,4,1,5,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,5,4,8,3,5,9,5,0,0,5,3,-1,-1,-1,-1],[9,5,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,10,4,10,9,9,10,11,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,7,9,9,7,10,9,10,11,-1,-1,-1,-1],[1,10,11,1,4,10,1,0,4,7,10,4,-1,-1,-1,-1],[3,4,1,3,8,4,1,4,11,7,10,4,11,4,10,-1],[4,7,10,9,4,10,9,10,2,9,2,1,-1,-1,-1,-1],[9,4,7,9,7,10,9,10,1,2,1,10,0,3,8,-1],[10,4,7,10,2,4,2,0,4,-1,-1,-1,-1,-1,-1,-1],[10,4,7,10,2,4,8,4,3,3,4,2,-1,-1,-1,-1],[2,11,9,2,9,7,2,7,3,7,9,4,-1,-1,-1,-1],[9,7,11,9,4,7,11,7,2,8,0,7,2,7,0,-1],[3,11,7,3,2,11,7,11,4,1,0,11,4,11,0,-1],[1,2,11,8,4,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,7,3,1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,0,1,8,8,1,7,-1,-1,-1,-1],[4,3,0,7,3,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,10,11,9,-1,-1,-1,-1,-1,-1,-1],[0,11,1,0,8,11,8,10,11,-1,-1,-1,-1,-1,-1,-1],[3,11,1,10,11,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,10,2,1,9,10,9,8,10,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,1,9,2,2,9,10,-1,-1,-1,-1],[0,10,2,8,10,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,11,9,8,-1,-1,-1,-1,-1,-1,-1],[9,2,11,0,2,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,0,8,1,1,8,11,-1,-1,-1,-1],[1,2,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,8,3,9,8,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,8,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]],_0x308ff5=[[0,1],[1,3],[2,3],[0,2],[4,5],[5,7],[6,7],[4,6],[0,4],[1,5],[2,6],[3,7]];function _0x2a9def(e){return _0x336f6e[e]}function _0x4bb34d(e){return _0x308ff5[e]}var _0x413409={getCase:_0x2a9def,getEdge:_0x4bb34d},_0x3d3a33=(_0x3a570f=!0,function(e,t){var i=_0x3a570f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a570f=!1,i}),_0x36367d=_0x3d3a33(void 0,(function(){return _0x36367d.toString().search("(((.+)+)+)+$").toString().constructor(_0x36367d).search("(((.+)+)+)+$")})),_0x3a570f;function _0x5651c5(){this._ids=[],this._voxelScalars=[],this._voxelGradients=[],this._voxelPts=[],this._edgeMap={},this.computeNormals=!0,this.mergePoints=!1,this.contourValue=0}_0x36367d(),_0x5651c5.prototype.getVoxelScalars=function(e,t,i,n,r,o,a,s){var l=this._ids,u=this._voxelScalars;l[0]=i*n+t*r[0]+e,l[1]=l[0]+1,l[2]=l[0]+r[0],l[3]=l[2]+1,l[4]=l[0]+n,l[5]=l[4]+1,l[6]=l[4]+r[0],l[7]=l[6]+1;for(let e=0;e<8;++e)u[e]=s[l[e]]},_0x5651c5.prototype.getVoxelPoints=function(e,t,i,n,r,o){var a=this._voxelPts;a[0]=r[0]+e*o[0],a[1]=r[1]+t*o[1],a[2]=r[2]+i*o[2],a[3]=a[0]+o[0],a[4]=a[1],a[5]=a[2],a[6]=a[0],a[7]=a[1]+o[1],a[8]=a[2],a[9]=a[3],a[10]=a[7],a[11]=a[2],a[12]=a[0],a[13]=a[1],a[14]=a[2]+o[2],a[15]=a[3],a[16]=a[1],a[17]=a[14],a[18]=a[0],a[19]=a[7],a[20]=a[14],a[21]=a[3],a[22]=a[7],a[23]=a[14]},_0x5651c5.prototype.getPointGradient=function(e,t,i,n,r,o,a,s){let l,u;0===e?(l=a[e+1+t*n[0]+i*r],u=a[e+t*n[0]+i*r],s[0]=(u-l)/o[0]):e===n[0]-1?(l=a[e+t*n[0]+i*r],u=a[e-1+t*n[0]+i*r],s[0]=(u-l)/o[0]):(l=a[e+1+t*n[0]+i*r],u=a[e-1+t*n[0]+i*r],s[0]=.5*(u-l)/o[0]),0===t?(l=a[e+(t+1)*n[0]+i*r],u=a[e+t*n[0]+i*r],s[1]=(u-l)/o[1]):t===n[1]-1?(l=a[e+t*n[0]+i*r],u=a[e+(t-1)*n[0]+i*r],s[1]=(u-l)/o[1]):(l=a[e+(t+1)*n[0]+i*r],u=a[e+(t-1)*n[0]+i*r],s[1]=.5*(u-l)/o[1]),0===i?(l=a[e+t*n[0]+(i+1)*r],u=a[e+t*n[0]+i*r],s[2]=(u-l)/o[2]):i===n[2]-1?(l=a[e+t*n[0]+i*r],u=a[e+t*n[0]+(i-1)*r],s[2]=(u-l)/o[2]):(l=a[e+t*n[0]+(i+1)*r],u=a[e+t*n[0]+(i-1)*r],s[2]=.5*(u-l)/o[2])},_0x5651c5.prototype.getVoxelGradients=function(e,t,i,n,r,o,a){var s=this._voxelGradients,l=[];this.getPointGradient(e,t,i,n,r,o,a,l),s[0]=l[0],s[1]=l[1],s[2]=l[2],this.getPointGradient(e+1,t,i,n,r,o,a,l),s[3]=l[0],s[4]=l[1],s[5]=l[2],this.getPointGradient(e,t+1,i,n,r,o,a,l),s[6]=l[0],s[7]=l[1],s[8]=l[2],this.getPointGradient(e+1,t+1,i,n,r,o,a,l),s[9]=l[0],s[10]=l[1],s[11]=l[2],this.getPointGradient(e,t,i+1,n,r,o,a,l),s[12]=l[0],s[13]=l[1],s[14]=l[2],this.getPointGradient(e+1,t,i+1,n,r,o,a,l),s[15]=l[0],s[16]=l[1],s[17]=l[2],this.getPointGradient(e,t+1,i+1,n,r,o,a,l),s[18]=l[0],s[19]=l[1],s[20]=l[2],this.getPointGradient(e+1,t+1,i+1,n,r,o,a,l),s[21]=l[0],s[22]=l[1],s[23]=l[2]},_0x5651c5.prototype.produceTriangles=function(e,t,i,n,r,o,a,s,l,u,c,h){var d,f,p=[1,2,4,8,16,32,64,128],_=[0,1,3,2,4,5,7,6],m=[],g=[],x=[];this.getVoxelScalars(t,i,n,r,o,a,s,l);for(var y=0,v=0;v<8;v++)this._voxelScalars[_[v]]>=e&&(y|=p[v]);var $=_0x413409.getCase(y);if(!($[0]<0)){this.getVoxelPoints(t,i,n,o,a,s),this.computeNormals&&this.getVoxelGradients(t,i,n,o,r,s,l);var b=new o$1p;for(v=0;$[v]>=0;v+=3){c.push(3);for(var T=0;T<3;T++){var C=_0x413409.getEdge($[v+T]);if(d=void 0,this.mergePoints&&(x[0]=this._ids[C[0]],x[1]=this._ids[C[1]],x[0]>x[1]&&(f=x[0],x[0]=x[1],x[1]=f),d=this._edgeMap[x]),void 0===d){var S=(e-this._voxelScalars[C[0]])/(this._voxelScalars[C[1]]-this._voxelScalars[C[0]]),w=this._voxelPts.slice(3*C[0],3*(C[0]+1)),E=this._voxelPts.slice(3*C[1],3*(C[1]+1));if(m[0]=w[0]+S*(E[0]-w[0]),m[1]=w[1]+S*(E[1]-w[1]),m[2]=w[2]+S*(E[2]-w[2]),d=u.length/3,u.push(m[0],m[1],m[2]),this.computeNormals){var P=this._voxelGradients.slice(3*C[0],3*(C[0]+1)),A=this._voxelGradients.slice(3*C[1],3*(C[1]+1));g[0]=P[0]+S*(A[0]-P[0]),g[1]=P[1]+S*(A[1]-P[1]),g[2]=P[2]+S*(A[2]-P[2]),o$1p.unpack(g,0,b),o$1p.equals(o$1p.ZERO,b)||o$1p.normalize(b,b),h.push(b.x,b.y,b.z)}this.mergePoints&&(x[0]=this._ids[C[0]],x[1]=this._ids[C[1]],x[0]>x[1]&&(f=x[0],x[0]=x[1],x[1]=f),this._edgeMap[x]=d)}c.push(d)}}}},_0x5651c5.prototype.compute=function(e){for(var t=e.xDimSize,i=e.yDimSize,n=e.zDimSize,r=(e.timeDimSize,[0,0,0]),o=[1/t,1/i,1/n],a=[t,i,n],s=e.array[0],l=[],u=[],c=[],h=a[0]*a[1],d=0;d<a[2]-1;++d)for(var f=0;f<a[1]-1;++f)for(var p=0;p<a[0]-1;++p)this.produceTriangles(this.contourValue,p,f,d,h,a,r,o,s,l,u,c);return{pBuffer:l,tBuffer:u,nBuffer:c}};var Wt$2="attribute vec4 aPosition;\nattribute vec4 aNormal;\nvarying vec3 vNormal;\nvarying vec3 positionEC;\nvoid main()\n{\n vNormal = aNormal.xyz;\n positionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",Ut$2="varying vec3 vNormal;\nvarying vec3 positionEC;\nuniform float uContourValue;\nuniform sampler2D u_colorTexture;\n#ifdef APPLY_LIGHTING\n uniform vec3 uDiffuse;\n uniform vec3 uSpecular;\n uniform vec3 uAmbient;\n uniform float uShiness;\n#endif\nvec4 getColorForValue(float tValue)\n{\n float texCoord = tValue;\n\ttexCoord = clamp(texCoord, 0.0, 1.0);\n vec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\n return tColor;\n}\n\n#ifdef APPLY_LIGHTING\nvoid applyLighting(inout vec4 tColor, vec3 normal)\n{\n vec3 diffuse = uDiffuse;\n vec3 specular = uSpecular;\n vec3 ambient = uAmbient;\n float shiness = uShiness;\n vec3 normalEC = normalize(czm_normal * normal);\n float ndot = max( dot( normalEC, czm_sunDirectionEC ), 0.0 );\n ndot = ndot * 0.5 + 0.5;\n diffuse = diffuse * ndot;\n specular = specular * czm_getSpecular(czm_sunDirectionEC, normalize(-positionEC), normalEC, shiness);\n tColor.rgb = tColor.rgb*(diffuse + ambient) + specular;\n}\n#endif\nvoid main()\n{\n vec4 color = getColorForValue(uContourValue);\n#ifdef APPLY_LIGHTING\n applyLighting(color, vNormal);\n#endif\n gl_FragColor = color;\n}\n";function Qt$2(e){for(var t=1;t<e;)t<<=1;return t}function qt$2(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function _$9(e,t){this._context=e,this._floor=0,this._ceil=1,this._dataBounds=h$18.MAX_VALUE,this._zBounds=new o$1o(0,1),this._nSideBlockCount=0,this._nBlockLength=0,this._nLength=0,this._nWidth=0,this._nHeight=0,this._nDepth=0,this._volTextures=[],this._dWidth=0,this._dHeight=0,this._dDepth=0,this._matLocalView=void 0,this._boundingSphere=void 0,this._timeDimension=1,this._timeIndex=0,this._xSliceCommand=void 0,this._ySliceCommand=void 0,this._zSliceCommand=void 0,this._initialized=!1,this._layer=t,this._attributeLocations={},this._visibleBoundingBox=new O$z({minimum:o$1p.ZERO,maximum:new o$1p(1,1,1)}),this.m_vScale=new o$1p(1,1,1),this._volumeBoxCommand=void 0,this.marchingCubes=new _0x5651c5,this.outlineCommand=void 0,this._mode=C$14.SCENE3D}function Jt$1(e,t){var i=[];return i.push("Volume"),e._timeDimension>1&&i.push("TIME_ORDER"),e$2e(t._hypsometricTexture)&&i.push("HAS_COLORTABLE"),t._useGradientOpacity&&i.push("GRADIENT_OPACITY"),t._clipPlanes.length>0&&i.push("CLIP_PLANE"),t.enableLighting&&i.push("APPLY_LIGHTING"),(0!=e._visibleBoundingBox._minimum.x||0!=e._visibleBoundingBox._minimum.y||0!=e._visibleBoundingBox._minimum.z||1!=e._visibleBoundingBox._maximum.x||1!=e._visibleBoundingBox._maximum.y||1!=e._visibleBoundingBox._maximum.z)&&i.push("TEXTURECOORD_CLIP"),i}Object.defineProperties(_$9.prototype,{maxValue:{get:function(){return this._ceil}},minValue:{get:function(){return this._floor}},visibleBoundingBox:{get:function(){return this._visibleBoundingBox},set:function(e){this._visibleBoundingBox=e}}}),_$9.prototype._encodeImageData=function(e,t,i,n){for(var r=this._nLength*this._nLength*4,o=new Array(r),a=i-t,s=t,l=0;l<e.zDimSize;l++)for(var u=parseInt(l/this._nSideBlockCount)*this._nBlockLength,c=l%this._nSideBlockCount*this._nBlockLength,h=0;h<this._nBlockLength-2;h++)for(var d=0;d<this._nBlockLength-2;d++){var f=Math.min(d,e.xDimSize-1),p=Math.min(h,e.yDimSize-1),_=l*e.yDimSize*e.xDimSize+(e.yDimSize-1-p)*e.xDimSize+f,m=n[_],g=new e$2c(0,0,0,0);if(-9999!=m){m<t||m>i?m=s:s=m;var x=qt$2(m=(m-t)/a);g.x=x.x,g.y=x.y,g.z=x.z,g.w=1}var y=255*g.x,v=255*g.y,$=255*g.z,b=255*g.w;o[4*(_=(u+h)*this._nLength+c+d)]=parseInt(y),o[4*_+1]=parseInt(v),o[4*_+2]=parseInt($),o[4*_+3]=parseInt(b)}return new Uint8Array(o,0,r)},_$9.prototype._loadData=function(e,t){var i=x$c.loadData(e,t);this.output=i,this._timeDimension=i.timeDimSize,this._floor=i.minValue,this._ceil=i.maxValue,this._nWidth=i.xDimSize,this._nHeight=i.yDimSize,this._nDepth=i.zDimSize;var n=i.array;this._nSideBlockCount=Math.ceil(Math.sqrt(i.zDimSize)),this._nBlockLength=Math.max(i.xDimSize,i.yDimSize)+2,this._nLength=Qt$2(this._nBlockLength*this._nSideBlockCount-2);for(var r=[],o=0;o<this._timeDimension;o++)r.push(this._encodeImageData(i,i.minValue,i.maxValue,n[o]));return r},_$9.prototype._loadVolume=function(e,t){},_$9.prototype._loadTexture=function(e){var t=e.length,i=tt$i.LINEAR,n=rt$k.LINEAR;this._layer._filterMode===k$S.FilterMode.NEAREST&&(i=tt$i.NEAREST,n=rt$k.NEAREST);for(var r=0;r<t;r++){var o=new t$U({context:this._context,width:this._nLength,height:this._nLength,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n})});o.copyFrom({width:this._nLength,height:this._nLength,arrayBufferView:e[r]}),this._volTextures.push(o)}},_$9.prototype._computePosition=function(){var e=this._mode,t=new o$1p(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);this._matLocalView=new p$1d,this._matInverseLocalView=new p$1d;var i=[];if(e===C$14.COLUMBUS_VIEW)this._vecCenter=new o$1p(t.z,t.x,t.y),p$1d.fromTranslation(this._vecCenter,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.south),i[1]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.south),i[2]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.north),i[3]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.north),i[4]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.south),i[5]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.south),i[6]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.north),i[7]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.north);else{this._vecCenter=o$1p.fromDegrees(t.x,t.y,t.z);var n=new i$16;m$19.headingPitchRollToFixedFrame(this._vecCenter,n,t$12.WGS84,m$19.eastNorthUpToFixedFrame,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.x),i[1]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.x),i[2]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.x),i[3]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.x),i[4]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.y),i[5]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.y),i[6]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.y),i[7]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.y)}this._dWidth=o$1p.distance(i[1],i[0]),this._dHeight=o$1p.distance(i[3],i[0]),this._dDepth=o$1p.distance(i[4],i[0]),this._boundingSphere=new i$1d,p$1d.multiplyByPoint(this._matLocalView,o$1p.ZERO,this._boundingSphere.center),this._boundingSphere.radius=.5*Math.sqrt(this._dWidth*this._dWidth+this._dHeight*this._dHeight+this._dDepth*this._dDepth)},_$9.prototype._createSliceCommand=function(){this._context;var e=this._mode===C$14.COLUMBUS_VIEW,t=this.GetRealBoundTop(),i=this.GetRealBoundBottom(),n=this.GetRealBoundRight(),r=this.GetRealBoundLeft();this._dWidth,this._dHeight;var o,a,s=this._layer._layerBounds.width,l=this._layer._layerBounds.height,u=this._layer._sliceCoordinate,c=Math.min(u.x,1),h=c*s,d=(c=Math.min(u.y,1))*l,f=n-r,p=t-i;e?o=a=5:(o=Math.ceil(this._dataBounds.north-this._dataBounds.south),a=Math.ceil(this._dataBounds.east-this._dataBounds.west));for(var _=a+1,m=o+1,g=(t-i)/o,x=(n-r)/a,y=_*m,v=2*_,$=2*m,b=new Float32Array(3*v),T=new Float32Array(3*v),C=new Float32Array(3*$),S=new Float32Array(3*$),w=new Float32Array(3*y),E=new Float32Array(3*y),P=this.GetRealTop(),A=this.GetRealBottom(),L=P-A,M=(c=Math.min(u.z,1))*L,R=0,O=new o$1p,D=A+M,I=(D-A)/L,F=0;F<m;F++)for(var B=i+F*g,N=0;N<_;N++){var G=r+N*x,z=e?new o$1p(D,G,B):o$1p.fromDegrees(G,B,D);p$1d.multiplyByPoint(this._matInverseLocalView,z,O),w[3*R]=O.x,w[3*R+1]=O.y,w[3*R+2]=O.z,E[3*R]=(G-r)/f,E[3*R+1]=(B-i)/p,E[3*R+2]=I,R++}R=0;var U=(t-d-i)/p;for(N=0;N<_;N++){G=r+N*x;var V=e?new o$1p(P,G,t-d):o$1p.fromDegrees(G,t-d,P);p$1d.multiplyByPoint(this._matInverseLocalView,V,O),b[6*R]=O.x,b[6*R+1]=O.y,b[6*R+2]=O.z,T[6*R]=(G-r)/f,T[6*R+1]=U,T[6*R+2]=1;var k=e?new o$1p(this._zBounds.x,G,t-d):o$1p.fromDegrees(G,t-d,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,k,O),b[6*R+3]=O.x,b[6*R+4]=O.y,b[6*R+5]=O.z,T[6*R+3]=(G-r)/f,T[6*R+4]=U,T[6*R+5]=0,R++}R=0;var W=h/f;for(F=0;F<m;F++){B=i+F*g;var H=e?new o$1p(P,r+h,B):o$1p.fromDegrees(r+h,B,P);p$1d.multiplyByPoint(this._matInverseLocalView,H,O),C[6*R]=O.x,C[6*R+1]=O.y,C[6*R+2]=O.z,S[6*R]=W,S[6*R+1]=(B-i)/p,S[6*R+2]=1;var q=e?new o$1p(this._zBounds.x,r+h,B):o$1p.fromDegrees(r+h,B,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,q,O),C[6*R+3]=O.x,C[6*R+4]=O.y,C[6*R+5]=O.z,S[6*R+3]=W,S[6*R+4]=(B-i)/p,S[6*R+5]=0,R++}for(var j=new Uint16Array(a*o*2*3),X=0,Y=0;Y<o;Y++)for(var Z=0;Z<a;Z++){var K=Z+_*Y,Q=Z+_*(Y+1),J=Z+1+_*(Y+1),ee=Z+1+_*Y;j[X++]=K,j[X++]=Q,j[X++]=ee,j[X++]=Q,j[X++]=J,j[X++]=ee}for(var te=2*o*3,ie=new Uint16Array(2*a*3),ne=new Uint16Array(te),re=0,oe=0;oe<o;oe++){K=Y=2*oe,Q=Y+1,J=Y+2,ee=Y+3;ne[re++]=K,ne[re++]=J,ne[re++]=Q,ne[re++]=Q,ne[re++]=J,ne[re++]=ee}var ae=0;for(oe=0;oe<a;oe++){K=Z=2*oe,Q=Z+1,J=Z+2,ee=Z+3;ie[ae++]=K,ie[ae++]=J,ie[ae++]=Q,ie[ae++]=Q,ie[ae++]=J,ie[ae++]=ee}var se=t$X.createVertexBuffer({context:this._context,typedArray:C,usage:A$18.STATIC_DRAW}),le=t$X.createVertexBuffer({context:this._context,typedArray:S,usage:A$18.STATIC_DRAW}),ue=t$X.createVertexBuffer({context:this._context,typedArray:b,usage:A$18.STATIC_DRAW}),ce=t$X.createVertexBuffer({context:this._context,typedArray:T,usage:A$18.STATIC_DRAW}),he=t$X.createVertexBuffer({context:this._context,typedArray:w,usage:A$18.STATIC_DRAW}),de=t$X.createVertexBuffer({context:this._context,typedArray:E,usage:A$18.STATIC_DRAW}),fe=[],pe=[],_e=[],me=this._attributeLocations;me.aPosition=0,fe.push({name:"aPosition",index:me.aPosition,vertexBuffer:se,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),pe.push({name:"aPosition",index:me.aPosition,vertexBuffer:ue,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),_e.push({name:"aPosition",index:me.aPosition,vertexBuffer:he,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),me.aTexCoord0=1,fe.push({name:"aTexCoord0",index:me.aTexCoord0,vertexBuffer:le,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),pe.push({name:"aTexCoord0",index:me.aTexCoord0,vertexBuffer:ce,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),_e.push({name:"aTexCoord0",index:me.aTexCoord0,vertexBuffer:de,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var ge=t$X.createIndexBuffer({context:this._context,typedArray:ne,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),xe=t$X.createIndexBuffer({context:this._context,typedArray:ie,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),ye=t$X.createIndexBuffer({context:this._context,typedArray:j,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),ve=new s$V({name:"VolumeRenderingVp",sources:[Ft$2]}),$e=new s$V({name:"VolumeRenderingFp",sources:[Rt$2]});ve.defines.push("Volume"),$e.defines.push("Volume"),this._timeDimension>1&&$e.defines.push("TIME_ORDER"),this._xSliceCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$q.OPAQUE,cull:!0}),this._ySliceCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$q.OPAQUE,cull:!0}),this._zSliceCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$q.OPAQUE,cull:!0}),this._xSliceCommand.vertexArray=new c$13({context:this._context,attributes:fe,indexBuffer:ge}),this._ySliceCommand.vertexArray=new c$13({context:this._context,attributes:pe,indexBuffer:xe}),this._zSliceCommand.vertexArray=new c$13({context:this._context,attributes:_e,indexBuffer:ye}),this._xSliceCommand.shaderProgram=r$14.fromCache({context:this._context,vertexShaderSource:ve,fragmentShaderSource:$e,attributeLocations:me}),this._ySliceCommand.shaderProgram=this._xSliceCommand.shaderProgram,this._zSliceCommand.shaderProgram=this._xSliceCommand.shaderProgram,this._xSliceCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:{enabled:!0}}),this._ySliceCommand.renderState=this._xSliceCommand.renderState,this._zSliceCommand.renderState=this._xSliceCommand.renderState},_$9.prototype._createContourCommand=function(e,t,i){var n=this._context,r=this._layer,o=e.length;if(!(o<3)){for(var a=new Float32Array(o),s=new Float32Array(i),l=this._dataBounds.west,u=this._dataBounds.south,c=this._zBounds.x,h=this._dataBounds.width,d=this._dataBounds.height,f=this._zBounds.y-this._zBounds.x,p=new o$1p,_=this._mode===C$14.COLUMBUS_VIEW,m=0;m<o;m+=3){var g=l+h*e[m],x=u+d*e[m+1],y=c+f*e[m+2],v=_?new o$1p(y,g,x):o$1p.fromDegrees(g,x,y);p$1d.multiplyByPoint(this._matInverseLocalView,v,p),a[m]=p.x,a[m+1]=p.y,a[m+2]=p.z}var $=t$X.createVertexBuffer({context:this._context,typedArray:a,usage:A$18.STATIC_DRAW}),b=t$X.createVertexBuffer({context:this._context,typedArray:s,usage:A$18.STATIC_DRAW}),T=[],C={aPosition:0};T.push({name:"aPosition",index:C.aPosition,vertexBuffer:$,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),C.aNormal=1,T.push({name:"aNormal",index:C.aNormal,vertexBuffer:b,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var S=new s$V({name:"VolumeContourVS",sources:[Wt$2]}),w=new s$V({name:"VolumeContourFS",sources:[Ut$2]});S.defines.push("Volume"),w.defines.push("Volume"),r.enableLighting&&w.defines.push("APPLY_LIGHTING"),this._contourCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$q.OPAQUE,count:o/3,cull:!0}),this._contourCommand.vertexArray=new c$13({context:this._context,attributes:T}),this._contourCommand.shaderProgram=r$14.fromCache({context:this._context,vertexShaderSource:S,fragmentShaderSource:w,attributeLocations:C}),this._contourCommand.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var E=this,P={u_colorTexture:function(){return e$2e(r._colorTexture)?r._colorTexture:n.defaultTexture},uVolumeTexture:function(){return E._volTextures[0]},width:function(){return E._nWidth},height:function(){return E._nHeight},depth:function(){return E._nDepth},sideBlockCount:function(){return E._nSideBlockCount},blockLength:function(){return E._nBlockLength},texLength:function(){return E._nLength},uFilterMode:function(){return r._filterMode},uContourValue:function(){return(r.contourValue-r.minValue)/(r.maxValue-r.minValue)},uDiffuse:function(){return r.material.diffuse},uAmbient:function(){return r.material.ambient},uSpecular:function(){return r.material.specular},uShiness:function(){return r.material.shiness}};this._contourCommand.uniformMap=P}},_$9.prototype.GetRealTop=function(){return this._zBounds.x+(this._zBounds.y-this._zBounds.x)*this._layer.scale.z},_$9.prototype.GetRealBottom=function(){return this._zBounds.x},_$9.prototype.GetRealBoundLeft=function(){return.5*(this._dataBounds.east+this._dataBounds.west)-.5*(this._dataBounds.east-this._dataBounds.west)*this._layer.scale.x},_$9.prototype.GetRealBoundRight=function(){return.5*(this._dataBounds.east+this._dataBounds.west)+.5*(this._dataBounds.east-this._dataBounds.west)*this._layer.scale.x},_$9.prototype.GetRealBoundTop=function(){return.5*(this._dataBounds.north+this._dataBounds.south)+.5*(this._dataBounds.north-this._dataBounds.south)*this._layer.scale.y},_$9.prototype.GetRealBoundBottom=function(){return.5*(this._dataBounds.north+this._dataBounds.south)-.5*(this._dataBounds.north-this._dataBounds.south)*this._layer.scale.y};var Xe$2=new o$1p;_$9.prototype._createVolumeBoxDrawCommand=function(e){this._context,new o$1p(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);var t,i,n=this._mode===C$14.COLUMBUS_VIEW,r=this.GetRealBoundTop(),o=this.GetRealBoundBottom(),a=this.GetRealBoundRight(),s=this.GetRealBoundLeft(),l=a-s,u=r-o;n?t=i=5:(t=Math.ceil(this._dataBounds.north-this._dataBounds.south),i=Math.ceil(this._dataBounds.east-this._dataBounds.west));for(var c=i+1,h=t+1,d=(r-o)/t,f=(a-s)/i,p=c*h,_=2*c,m=2*h,g=new Float32Array(3*_),x=new Float32Array(3*_),y=new Float32Array(3*_),v=new Float32Array(3*_),$=new Float32Array(3*m),b=new Float32Array(3*m),T=new Float32Array(3*m),C=new Float32Array(3*m),S=new Float32Array(3*p),w=new Float32Array(3*p),E=new Float32Array(3*p),P=new Float32Array(3*p),A=this.GetRealTop(),L=0,M=new o$1p,R=0;R<h;R++)for(var O=o+R*d,D=0;D<c;D++){var I=s+D*f,F=n?new o$1p(A,I,O):o$1p.fromDegrees(I,O,A);p$1d.multiplyByPoint(this._matInverseLocalView,F,M),S[3*L]=M.x,S[3*L+1]=M.y,S[3*L+2]=M.z,w[3*L]=(I-s)/l,w[3*L+1]=(O-o)/u,w[3*L+2]=1;var B=n?new o$1p(this._zBounds.x,I,O):o$1p.fromDegrees(I,O,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,B,M),E[3*L]=M.x,E[3*L+1]=M.y,E[3*L+2]=M.z,P[3*L]=(I-s)/l,P[3*L+1]=(O-o)/u,P[3*L+2]=0,L++}L=0;for(D=0;D<c;D++){I=s+D*f;var N=n?new o$1p(A,I,r):o$1p.fromDegrees(I,r,A);p$1d.multiplyByPoint(this._matInverseLocalView,N,M),g[6*L]=M.x,g[6*L+1]=M.y,g[6*L+2]=M.z,x[6*L]=(I-s)/l,x[6*L+1]=1,x[6*L+2]=1;var G=n?new o$1p(this._zBounds.x,I,r):o$1p.fromDegrees(I,r,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,G,M),g[6*L+3]=M.x,g[6*L+4]=M.y,g[6*L+5]=M.z,x[6*L+3]=(I-s)/l,x[6*L+4]=1,x[6*L+5]=0;var z=n?new o$1p(A,I,o):o$1p.fromDegrees(I,o,A);p$1d.multiplyByPoint(this._matInverseLocalView,z,M),y[6*L]=M.x,y[6*L+1]=M.y,y[6*L+2]=M.z,v[6*L]=(I-s)/l,v[6*L+1]=0,v[6*L+2]=1;var U=n?new o$1p(this._zBounds.x,I,o):o$1p.fromDegrees(I,o,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,U,M),y[6*L+3]=M.x,y[6*L+4]=M.y,y[6*L+5]=M.z,v[6*L+3]=(I-s)/l,v[6*L+4]=0,v[6*L+5]=0,L++}L=0;for(R=0;R<h;R++){O=o+R*d;var V=n?new o$1p(A,s,O):o$1p.fromDegrees(s,O,A);p$1d.multiplyByPoint(this._matInverseLocalView,V,M),$[6*L]=M.x,$[6*L+1]=M.y,$[6*L+2]=M.z,b[6*L]=0,b[6*L+1]=(O-o)/u,b[6*L+2]=1;var k=n?new o$1p(this._zBounds.x,s,O):o$1p.fromDegrees(s,O,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,k,M),$[6*L+3]=M.x,$[6*L+4]=M.y,$[6*L+5]=M.z,b[6*L+3]=0,b[6*L+4]=(O-o)/u,b[6*L+5]=0;var W=n?new o$1p(A,a,O):o$1p.fromDegrees(a,O,A);p$1d.multiplyByPoint(this._matInverseLocalView,W,M),T[6*L]=M.x,T[6*L+1]=M.y,T[6*L+2]=M.z,C[6*L]=1,C[6*L+1]=(O-o)/u,C[6*L+2]=1;var H=n?new o$1p(this._zBounds.x,a,O):o$1p.fromDegrees(a,O,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,H,M),T[6*L+3]=M.x,T[6*L+4]=M.y,T[6*L+5]=M.z,C[6*L+3]=1,C[6*L+4]=(O-o)/u,C[6*L+5]=0,L++}for(var q=i*t*2*3,j=new Uint16Array(q),X=new Uint16Array(q),Y=0,Z=0,K=0;K<t;K++)for(var Q=0;Q<i;Q++){var J=Q+c*K,ee=Q+c*(K+1),te=Q+1+c*(K+1),ie=Q+1+c*K;j[Y++]=ie,j[Y++]=ee,j[Y++]=J,j[Y++]=ie,j[Y++]=te,j[Y++]=ee,X[Z++]=J,X[Z++]=ee,X[Z++]=ie,X[Z++]=ee,X[Z++]=te,X[Z++]=ie}for(var ne=2*i*3,re=2*t*3,oe=new Uint16Array(ne),ae=new Uint16Array(ne),se=new Uint16Array(re),le=new Uint16Array(re),ue=0,ce=0,he=0;he<t;he++){J=K=2*he,ee=K+1,te=K+2,ie=K+3;se[ue++]=J,se[ue++]=te,se[ue++]=ee,se[ue++]=ee,se[ue++]=te,se[ue++]=ie,le[ce++]=ee,le[ce++]=te,le[ce++]=J,le[ce++]=ie,le[ce++]=te,le[ce++]=ee}var de=0,fe=0;for(he=0;he<i;he++){J=Q=2*he,ee=Q+1,te=Q+2,ie=Q+3;oe[de++]=J,oe[de++]=te,oe[de++]=ee,oe[de++]=ee,oe[de++]=te,oe[de++]=ie,ae[fe++]=ee,ae[fe++]=te,ae[fe++]=J,ae[fe++]=ie,ae[fe++]=te,ae[fe++]=ee}var pe=2*p+2*_+2*m,_e=new Float32Array(3*pe),me=new Float32Array(3*pe),ge=new Uint16Array(2*q+2*re+2*ne),xe=[],ye=[],ve=[];xe.push(g),xe.push(y),xe.push($),xe.push(T),xe.push(S),xe.push(E),ye.push(x),ye.push(v),ye.push(b),ye.push(C),ye.push(w),ye.push(P),ve.push(oe),ve.push(ae),ve.push(se),ve.push(le),ve.push(j),ve.push(X);for(var $e=xe.length,be=0,Te=0,Ce=0,Se=0,we=0;we<$e;we++){for(var Ee=xe[we],Pe=ye[we],Ae=ve[we],Le=0;Le<Ee.length;Le++)_e[Te++]=Ee[Le],me[Ce++]=Pe[Le];for(Le=0;Le<Ae.length;Le++)ge[Se++]=Ae[Le]+be;be+=Ee.length/3}var Me=t$X.createVertexBuffer({context:this._context,typedArray:_e,usage:A$18.STATIC_DRAW}),Re=t$X.createVertexBuffer({context:this._context,typedArray:me,usage:A$18.STATIC_DRAW}),Oe=[],De={aPosition:0};Oe.push({name:"aPosition",index:De.aPosition,vertexBuffer:Me,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),De.aTexCoord0=1,Oe.push({name:"aTexCoord0",index:De.aTexCoord0,vertexBuffer:Re,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var Ie=t$X.createIndexBuffer({context:this._context,typedArray:ge,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),Fe=new s$V({name:"VolumeBoxVp",sources:[Mt$2]}),Be=new s$V({name:"VolumeBoxFp",sources:[Nt$2]}),Ne=Jt$1(this,e);Fe.defines=Ne,Be.defines=Ne,this._volumeBoxCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$q.OPAQUE,cull:!0}),this._volumeBoxCommand.vertexArray=new c$13({context:this._context,attributes:Oe,indexBuffer:Ie}),this._volumeBoxCommand.shaderProgram=r$14.fromCache({context:this._context,vertexShaderSource:Fe,fragmentShaderSource:Be,attributeLocations:De}),this._volumeBoxCommand.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},depthMask:{enabled:!0},blending:Ee$r.ALPHA_BLEND})};for(var Ze$1=new o$1p,Me$5=new e$2c,Ne$1=new e$2c,Ie$2=[],pt$2=0;pt$2<6;pt$2++)Ie$2.push(new e$2c);function xt$2(e,t){var i=!1,n=t.split(" ");if(n.length>1){var r=n[0],o=n[1];for(var a in e.defines)if(-1!==e.defines[a].indexOf(r))return void(e.defines[a]=r+" "+o)}else{for(var a in e.defines)if(e.defines[a]===t){i=!0;break}i||e.defines.push(t)}}function Bt$3(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function $$4(e){e$2e(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}function o$b(e,t){_$9.call(this,e,t),this._orientedBoundingBox=void 0,this._level=0,this._x=0,this._y=0,this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._isVisible=!1,this._disFromCamera=0,this._rangeList=256,this._isLessLodDis=!1,this._pix=0,this._s3mLoadState=N$Q.UNLOAD,this._isRootTile=!1,this._rootTile=void 0,this._maxValue=void 0,this._minValue=void 0,this._multiTextures=[]}function G$8(e){for(var t=1;t<e;)t<<=1;return t}function H$8(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function q$5(e,t,i){var n=i.radius,r=i.center,o=o$1p.distance(e.positionWC,r);e._mode===C$14.SCENE2D&&(o=e.positionCartographic.height);var a=t.drawingBufferHeight,s=.5*e$2d.PI_OVER_FOUR,l=.5*a/Math.tan(s)*n/o;return Math.ceil(l)}_$9.prototype._createOutlineCommand=function(e){var t=new i$p(this._dWidth,this._dHeight,this._dDepth),i=(this._zBounds.y-this._zBounds.x)/2,n=o$1p.fromArray([0,0,i]),r=p$1d.fromTranslation(n),o=new p$1d;p$1d.multiply(this._matLocalView,r,o);var a=new i$$({primitiveType:W$18.LINES,modelMatrix:o,boundingVolume:this._boundingSphere,pass:Le$q.OPAQUE,cull:!0,owner:e});a.vertexArray=t.getOutlineVertexArray(this._context),a.shaderProgram=r$14.fromCache({name:"VoxelGridTileOutline",context:this._context,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:{aPosition:0}}),a.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0}}),e._outlineCommand=a,this._outlineCommand=a},_$9.prototype._createUniformMap=function(e){var t=this,i={width:function(){return t._nWidth},height:function(){return t._nHeight},depth:function(){return t._nDepth},sideBlockCount:function(){return t._nSideBlockCount},blockLength:function(){return t._nBlockLength},texLength:function(){return t._nLength},u_maxVisibleTextureCoord:function(){return t._visibleBoundingBox._maximum},u_minVisibleTextureCoord:function(){return t._visibleBoundingBox._minimum},u_minMaxValueAndFiltration:function(){return Me$5.x=t._floor,Me$5.y=t._ceil,Me$5.z=e._minFiltration,Me$5.w=e._maxFiltration,Me$5},uVolumeTexture:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return t._volTextures[i]},uNextVolumeTexture:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,t._volTextures[i]},uTimeRatio:function(){return e._timeRatio},u_colorTable:function(){return e$2e(e._hypsometricTexture)?e._hypsometricTexture:t._context.defaultTexture},u_volumeBoxSize:function(){return Ze$1.x=t._dWidth,Ze$1.y=t._dHeight,Ze$1.z=t._dDepth,Ze$1},uFilterMode:function(){return e._filterMode},u_opacityTexture:function(){return e$2e(e._opacityTexture)?e._opacityTexture:t._context.defaultTexture},u_colorTexture:function(){return e$2e(e._colorTexture)?e._colorTexture:t._context.defaultTexture},u_jitterTexture:function(){return e$2e(t._jitterTexture)?t._jitterTexture:t._context.defaultTexture},u_gradientOpacityInfo:function(){if(e._useGradientOpacity){var t=e._gradientOpacityMinOpacity,i=e._gradientOpacityMaxOpacity,n=[e._gradientOpacityMinValue,e._gradientOpacityMaxValue],r=(i-t)/(n[1]-n[0]),o=-n[0]*(i-t)/(n[1]-n[0])+t;Ne$1.x=t,Ne$1.y=i,Ne$1.z=r,Ne$1.w=o}return Ne$1},u_clip_planes:function(){for(var t=e._clipPlanes.length,i=0;i<t;i++)Ie$2[i].x=e._clipPlanes[i].normal.x,Ie$2[i].y=e._clipPlanes[i].normal.y,Ie$2[i].z=e._clipPlanes[i].normal.z,Ie$2[i].w=e._clipPlanes[i].distance;return Ie$2},u_clip_planes_count:function(){return e._clipPlanes.length},uDiffuse:function(){return e.material.diffuse},uAmbient:function(){return e.material.ambient},uSpecular:function(){return e.material.specular},uShiness:function(){return e.material.shiness}},n={uOffset:function(){return new o$1p(e._sliceCoordinate.x,0,0)}},r={uOffset:function(){return new o$1p(0,e._sliceCoordinate.y,0)}},o={uOffset:function(){return new o$1p(0,0,e._sliceCoordinate.z)}};if(e$2e(this._xSliceCommand)&&(this._xSliceCommand.uniformMap=p$19(i,n),this._ySliceCommand.uniformMap=p$19(i,r),this._zSliceCommand.uniformMap=p$19(i,o)),e$2e(this._volumeBoxCommand)){var a={u_camTexCoord:function(){var e,i,n=t.frameState.camera.positionCartographic;if(t._mode===C$14.COLUMBUS_VIEW){var r=a$18.toCartesian(n),o=m$19.convertToColumbusCartesian(r);i=o.y,e=o.z}else i=e$2d.toDegrees(n.longitude),e=e$2d.toDegrees(n.latitude);var a=n.height,s=t.GetRealTop()-t._zBounds.x,l=t.GetRealBoundLeft(),u=t.GetRealBoundRight(),c=t.GetRealBoundBottom(),h=t.GetRealBoundTop();return Xe$2.x=(i-l)/(u-l),Xe$2.y=(e-c)/(h-c),Xe$2.z=(a-t._zBounds.x)/s,Xe$2},u_sampleDistance:function(){return t._layer._sampleDistance||.005}};this._volumeBoxCommand.uniformMap=p$19(i,a)}if(e$2e(this._outlineCommand)){var s={uDiffuseColor:function(){return e._outlineColor}};this._outlineCommand.uniformMap=p$19(i,s)}},_$9.prototype._initJitterTexture=function(){if(!e$2e(this._jitterTexture)){for(var e=new Uint8Array(1024),t=0;t<1024;++t)e[t]=255*Math.random();this._jitterTexture=new t$U({context:this._context,width:32,height:32,pixelFormat:this._context.webgpu||this._context.webgl2?V$12.RED:V$12.LUMINANCE,pixelDatatype:_$_.UNSIGNED_BYTE,flipY:!1}),this._jitterTexture.copyFrom({width:32,height:32,arrayBufferView:e})}},_$9.prototype._initialize=function(e,t,i){if(this.frameState=t,this._mode=t.mode,this._initialized){for(var n=this._volTextures.length,r=0;r<n;r++)this._volTextures[r].destroy();this._volTextures=[],e$2e(this._volumeBoxCommand)&&($$4(this._volumeBoxCommand),this._volumeBoxCommand=void 0),e$2e(this._outlineCommand)&&($$4(this._outlineCommand),this._outlineCommand=void 0),this._initialized=!1}this._initJitterTexture(),this._loadTexture(i),this._computePosition(),this._createVolumeBoxDrawCommand(e),this._createOutlineCommand(e),this._createSliceCommand(),this._createUniformMap(e),this._initialized=!0},_$9.prototype.update=function(e,t){if(this._mode=t.mode,(e._scaleDirty||e._sliceCoordDirty)&&(e._scaleDirty&&($$4(this._volumeBoxCommand),this._volumeBoxCommand=void 0),$$4(this._xSliceCommand),this._xSliceCommand=void 0,$$4(this._ySliceCommand),this._ySliceCommand=void 0,$$4(this._zSliceCommand),this._zSliceCommand=void 0,$$4(this._outlineCommand),this._outlineCommand=void 0,this._createVolumeBoxDrawCommand(e),this._createOutlineCommand(e),this._createSliceCommand(),this._createUniformMap(e),e._scaleDirty=!1,e._sliceCoordDirty=!1),e._contourValueDirty){if($$4(this._contourCommand),this._contourCommand=void 0,this.marchingCubes.contourValue=e.contourValue,e$2e(this.output)){var i=this.marchingCubes.compute(this.output);this._createContourCommand(i.pBuffer,i.tBuffer,i.nBuffer)}e._contourValueDirty=!1}e._volumeRenderMode===gt$2.Slice?(e$2e(this._xSliceCommand)&&t.commandList.push(this._xSliceCommand),e$2e(this._ySliceCommand)&&t.commandList.push(this._ySliceCommand),e$2e(this._zSliceCommand)&&t.commandList.push(this._zSliceCommand)):e._volumeRenderMode===gt$2.VolumeRendering?(e$2e(this._volumeBoxCommand)&&e._fillStyle!==fr$3.WireFrame&&t.commandList.push(this._volumeBoxCommand),e$2e(this._outlineCommand)&&e._fillStyle!==fr$3.Fill&&t.commandList.push(this._outlineCommand)):e._volumeRenderMode===gt$2.ContourValue&&e$2e(this._contourCommand)&&t.commandList.push(this._contourCommand),this.updateTimeDimension(e)},_$9.prototype.updateTimeDimension=function(e){this._timeDimension>1?(e._timeIndexChange&&this._timeIndex++,this._timeIndex==this._timeDimension&&(this._timeIndex=0)):this._timeIndex=0},_$9.prototype._setDataBounds=function(e){this._dataBounds=e},_$9.prototype._useGradientOpacityChanged=function(e){e?this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"GRADIENT_OPACITY"):this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"GRADIENT_OPACITY")},_$9.prototype._enableLightingChange=function(e){e?(this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"APPLY_LIGHTING"),this._appendProgramDefineForCommand(this._contourCommand,!1,!0,"APPLY_LIGHTING")):(this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"APPLY_LIGHTING"),this._removeProgramDefineForCommand(this._contourCommand,!1,!0,"APPLY_LIGHTING"))},_$9.prototype._clipPlaneChanged=function(e){e._clipPlanes.length>0?this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"CLIP_PLANE"):this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"CLIP_PLANE")},_$9.prototype._setZBounds=function(e){this._zBounds=e},_$9.prototype._appendProgramDefineForCommand=function(e,t,i,n){if(e$2e(e)){var r=this._context,o=e.shaderProgram.fragmentShaderSource,a=e.shaderProgram.vertexShaderSource;t&&xt$2(a,n),i&&xt$2(o,n),e.shaderProgram.destroy(),e.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}},_$9.prototype._removeProgramDefineForCommand=function(e,t,i,n){if(e$2e(e)){var r=this._context,o=e.shaderProgram.fragmentShaderSource,a=e.shaderProgram.vertexShaderSource;t&&Bt$3(a,n),i&&Bt$3(o,n),e.shaderProgram.destroy(),e.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}},_$9.prototype.isDestroyed=function(){return!1},_$9.prototype.destroy=function(){for(var e=this._volTextures.length,t=0;t<e;t++)this._volTextures[t].destroy();return e$2e(this._volumeBoxCommand)&&($$4(this._volumeBoxCommand),this._volumeBoxCommand=void 0),e$2e(this._outlineCommand)&&($$4(this._outlineCommand),this._outlineCommand=void 0),e$2e(this._xSliceCommand)&&($$4(this._xSliceCommand),this._xSliceCommand=void 0),e$2e(this._ySliceCommand)&&($$4(this._ySliceCommand),this._ySliceCommand=void 0),e$2e(this._zSliceCommand)&&($$4(this._zSliceCommand),this._zSliceCommand=void 0),e$2e(this._contourCommand)&&($$4(this._contourCommand),this._contourCommand=void 0),e$2e(this._jitterTexture)&&this._jitterTexture.destroy(),this.output=void 0,this.marchingCubes=void 0,i$11(this)},o$b.prototype=new _$9,o$b.prototype.constructor=o$b,o$b.prototype.parent=_$9.prototype,Object.defineProperties(o$b.prototype,{}),o$b.prototype._encodeImageData=function(e,t,i,n){for(var r=this._nLength*this._nLength*4,o=new Array(r),a=i-t,s=t,l=0;l<e.zDimSize;l++)for(var u=parseInt(l/this._nSideBlockCount)*this._nBlockLength,c=l%this._nSideBlockCount*this._nBlockLength,h=-1;h<this._nBlockLength-1;h++)for(var d=-1;d<this._nBlockLength-1;d++){var f=Math.min(d,e.xValidSize-1),p=Math.min(h,e.yValidSize-1);f=Math.max(0,f),p=Math.max(0,p);var _=l*e.yDimSize*e.xDimSize+(e.yValidSize-1-p)*e.xDimSize+f;if(!(_<0)){var m=n[_],g=new e$2c(0,0,0,0);if(-9999!=m){m<t||m>i?m=s:s=m;var x=H$8(m=(m-t)/a);g.x=x.x,g.y=x.y,g.z=x.z,g.w=1}var y=255*g.x,v=255*g.y,$=255*g.z,b=255*g.w;o[4*(_=(u+h)*this._nLength+c+d)]=parseInt(y),o[4*_+1]=parseInt(v),o[4*_+2]=parseInt($),o[4*_+3]=parseInt(b)}}return new Uint8Array(o,0,r)},o$b.prototype._loadVolume=function(e,t){this._maxValue=t.maxValue,this._minValue=t.minValue,this._timeDimension=t.time,this._ceil=t.maxValue,this._floor=t.minValue,this._nWidth=t.xValidSize,this._nHeight=t.yValidSize,this._nDepth=t.zValidSize;var i=e.slice(36,e.byteLength),n=4*t.xDimSize*t.yDimSize*t.zDimSize;this._nSideBlockCount=Math.ceil(Math.sqrt(t.zDimSize)),this._nBlockLength=Math.max(t.xDimSize,t.yDimSize)+2,this._nLength=G$8(this._nBlockLength*this._nSideBlockCount-2);t.xValidSize,t.yValidSize,t.zValidSize;for(var r=[],o=0;o<this._timeDimension;o++){var a=new Float32Array(i.slice(o*n,(o+1)*n));r.push(this._encodeImageData(t,t.minValue,t.maxValue,a))}return r},o$b.prototype.updateTimeDimension=function(e){this._isRootTile?this._timeDimension>1?(e._timeIndexChange&&this._timeIndex++,this._timeIndex==this._timeDimension&&(this._timeIndex=0)):this._timeIndex=0:this._timeIndex=this._rootTile._timeIndex},o$b.prototype._computePosition=function(){var e=this._mode,t=new o$1p(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);this._matLocalView=new p$1d,this._matInverseLocalView=new p$1d;var i=[];if(e===C$14.COLUMBUS_VIEW)this._vecCenter=new o$1p(t.z,t.x,t.y),p$1d.fromTranslation(this._vecCenter,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.south),i[1]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.south),i[2]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.north),i[3]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.north),i[4]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.south),i[5]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.south),i[6]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.north),i[7]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.north);else{this._vecCenter=o$1p.fromDegrees(t.x,t.y,t.z);var n=new i$16;m$19.headingPitchRollToFixedFrame(this._vecCenter,n,t$12.WGS84,m$19.eastNorthUpToFixedFrame,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.x),i[1]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.x),i[2]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.x),i[3]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.x),i[4]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.y),i[5]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.y),i[6]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.y),i[7]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.y)}this._dWidth=o$1p.distance(i[1],i[0]),this._dHeight=o$1p.distance(i[3],i[0]),this._dDepth=o$1p.distance(i[4],i[0]),this._orientedBoundingBox=y$Y.fromPoints(i,this._orientedBoundingBox),this._boundingSphere=new i$1d,p$1d.multiplyByPoint(this._matLocalView,o$1p.ZERO,this._boundingSphere.center),this._boundingSphere.radius=.5*Math.sqrt(this._dWidth*this._dWidth+this._dHeight*this._dHeight+this._dDepth*this._dDepth)},o$b.prototype.calcPixFromCam=function(e,t,i){if(this._boundingSphere){var n=e.positionWC,r=o$1p.clone(this._boundingSphere.center),o=o$1p.distance(r,n);e._mode==C$14.SCENE2D&&(o=e.positionCartographic.height),this._disFromCamera=o-this._boundingSphere.radius;var a;a=2*q$5(e,t,this._boundingSphere),this._isLessLodDis=a<=this._rangeList*i,this._pix=a}},o$b.prototype.load=function(e){var t,i,n=this._s3mLoadState,r=this;N$Q.UNLOAD===n&&(r._s3mLoadState=N$Q.LOADING,t=r._x<10?"000"+r._x:r._x<100?"00"+r._x:r._x<1e3?"0"+r._x:r._x,i=r._y<10?"000"+r._y:r._y<100?"00"+r._y:r._y<1e3?"0"+r._y:r._y,o$1l(o$10(e._url+"/"+r._level+"/"+i+"/"+t+"/"+i+"_"+t+".vol"),(function(e){r._s3mLoadState=N$Q.LOADED,r._arrayBuffer=e})).otherwise((function(e){throw new DeveloperError("Not a valid NetCDF file!")})))};var C$7=new p$1d;o$b.prototype._createUniformMap=function(e){this.parent._createUniformMap.call(this,e);var t=this,i={uMultiResolutionPara1:function(){return e$2e(t._multiTextures[0])?t._multiTextures[0].multiResolutionPara:C$7},uMultiResolutionPara2:function(){return e$2e(t._multiTextures[1])?t._multiTextures[1].multiResolutionPara:C$7},uMultiResolutionPara3:function(){return e$2e(t._multiTextures[2])?t._multiTextures[2].multiResolutionPara:C$7},uVolumeTexture1:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return e$2e(t._multiTextures[0])?t._multiTextures[0]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture1:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,e$2e(t._multiTextures[0])?t._multiTextures[0]._volTextures[i]:t._volTextures[i]},uVolumeTexture2:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return e$2e(t._multiTextures[1])?t._multiTextures[1]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture2:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,e$2e(t._multiTextures[1])?t._multiTextures[1]._volTextures[i]:t._volTextures[i]},uVolumeTexture3:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return e$2e(t._multiTextures[2])?t._multiTextures[2]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture3:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,e$2e(t._multiTextures[2])?t._multiTextures[2]._volTextures[i]:t._volTextures[i]}};e$2e(this._xSliceCommand)&&(this._xSliceCommand.uniformMap=p$19(i,this._xSliceCommand.uniformMap),this._ySliceCommand.uniformMap=p$19(i,this._ySliceCommand.uniformMap),this._zSliceCommand.uniformMap=p$19(i,this._zSliceCommand.uniformMap)),e$2e(this._volumeBoxCommand)&&(this._volumeBoxCommand.uniformMap=p$19(i,this._volumeBoxCommand.uniformMap)),e$2e(this._outlineCommand)&&(this._outlineCommand.uniformMap=p$19(i,this._outlineCommand.uniformMap))},o$b.prototype._createShaderPreDefines=function(e,t){var i=this.parent._createShaderPreDefines.call(this,e,t);return i.push("MultiResolution"),i};var _0x19ee97=(_0xf7e914=!0,function(e,t){var i=_0xf7e914?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf7e914=!1,i}),_0x1158ac=_0x19ee97(void 0,(function(){return _0x1158ac.toString().search("(((.+)+)+)+$").toString().constructor(_0x1158ac).search("(((.+)+)+)+$")})),_0xf7e914;function _0x4d473e(){this.model={clamping:!0,allowDuplicateScalars:!1,range:[0,0]},this.model.nodes=[]}_0x1158ac(),_0x4d473e.prototype.getSize=function(){return this.model.nodes.length},_0x4d473e.prototype.getType=function(){var e,t=0,i=0;this.model.nodes.length>0&&(t=this.model.nodes[0].y);for(var n=1;n<this.model.nodes.length;n++){if((e=this.model.nodes[n].y)!==t)if(e>t)switch(i){case 0:case 1:i=1;break;default:i=3}else switch(i){case 0:case 2:i=2;break;default:i=3}if(t=e,3===i)break}switch(i){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:return"Varied"}},_0x4d473e.prototype.getDataPointer=function(){var e=this.model.nodes.length;if(this.model.function=null,e>0){this.model.function=[];for(var t=0;t<e;t++)this.model.function[2*t]=this.model.nodes[t].x,this.model.function[2*t+1]=this.model.nodes[t].y}return this.model.function},_0x4d473e.prototype.getFirstNonZeroValue=function(){if(0===this.model.nodes.length)return 0;for(var e=1,t=0;t<this.model.nodes.length;t++)if(0!==this.model.nodes[t].y){e=0;break}return e?Number.MAX_VALUE:t>0?this.model.nodes[t-1].x:this.model.clamping?-Number.MAX_VALUE:this.model.nodes[0].x},_0x4d473e.prototype.getNodeValue=function(e,t){var i=this.model.nodes.length;return e<0||e>=i?-1:(t[0]=this.model.nodes[e].x,t[1]=this.model.nodes[e].y,t[2]=this.model.nodes[e].midpoint,t[3]=this.model.nodes[e].sharpness,1)},_0x4d473e.prototype.setNodeValue=function(e,t){var i=this.model.nodes.length;if(e<0||e>=i)return-1;var n=this.model.nodes[e].x;return this.model.nodes[e].x=t[0],this.model.nodes[e].y=t[1],this.model.nodes[e].midpoint=t[2],this.model.nodes[e].sharpness=t[3],n!==t[0]?this.sortAndUpdateRange():this.modified(),1},_0x4d473e.prototype.addPoint=function(e,t){this.addPointLong(e,t,.5,0)},_0x4d473e.prototype.addPointLong=function(e,t,i,n){if(i<0||i>1||n<0||n>1)return-1;this.model.allowDuplicateScalars||this.removePoint(e);var r,o={x:e,y:t,midpoint:i,sharpness:n};for(this.model.nodes.push(o),this.sortAndUpdateRange(),r=0;r<this.model.nodes.length&&this.model.nodes[r].x!==e;r++);return r<this.model.nodes.length?r:-1},_0x4d473e.prototype.setNodes=function(e){this.model.nodes!==e&&(this.model.nodes=e,this.sortAndUpdateRange())},_0x4d473e.prototype.getRange=function(){return this.model.range},_0x4d473e.prototype.updateRange=function(){var e=this.model.range.slice(),t=this.model.nodes.length;return t?(this.model.range[0]=this.model.nodes[0].x,this.model.range[1]=this.model.nodes[t-1].x):(this.model.range[0]=0,this.model.range[1]=0),(e[0]!==this.model.range[0]||e[1]!==this.model.range[1])&&(this.modified(),!0)},_0x4d473e.prototype.sortAndUpdateRange=function(e){this.model.nodes.sort((function(e,t){return e.x-t.x})),this.updateRange()||this.modified()},_0x4d473e.prototype.removePoint=function(e){var t;for(t=0;t<this.model.nodes.length&&this.model.nodes[t].x!==e;t++);if(t>=this.model.nodes.length)return-1;var i=t,n=!1;return this.model.nodes.splice(t,1),(0===t||t===this.model.nodes.length)&&(n=this.updateRange()),n||this.modified(),i},_0x4d473e.prototype.removeAllPoints=function(){this.model.nodes=[],this.sortAndUpdateRange()},_0x4d473e.prototype.addSegment=function(e,t,i,n){this.sortAndUpdateRange();for(var r=0;r<this.model.nodes.length;)this.model.nodes[r].x>=e&&this.model.nodes[r].x<=i?this.model.nodes.splice(r,1):r++;this.addPoint(e,t,.5,0),this.addPoint(i,n,.5,0)},_0x4d473e.prototype.getValue=function(e){var t=[];return this.getTable(e,e,1,t),t[0]},_0x4d473e.prototype.adjustRange=function(e){if(e.length<2)return 0;var t=this.getRange();t[0]<e[0]?this.addPoint(e[0],this.getValue(e[0])):this.addPoint(e[0],this.getValue(t[0])),t[1]>e[1]?this.addPoint(e[1],this.getValue(e[1])):this.addPoint(e[1],this.getValue(t[1])),this.sortAndUpdateRange();for(var i=0;i<this.model.nodes.length;)this.model.nodes[i].x>=e[0]&&this.model.nodes[i].x<=e[1]?this.model.nodes.splice(i,1):++i;return this.sortAndUpdateRange(),1},_0x4d473e.prototype.estimateMinNumberOfSamples=function(e,t){var i=this.findMinimumXDistance();return Math.ceil((t-e)/i)},_0x4d473e.prototype.findMinimumXDistance=function(){var e=this.model.nodes.length;if(e<2)return-1;for(var t=this.model.nodes[1].x-this.model.nodes[0].x,i=0;i<e-1;i++){var n=this.model.nodes[i+1].x-this.model.nodes[i].x;n<t&&(t=n)}return t},_0x4d473e.prototype.getTable=function(e,t,i,n,r){e$2e(r)||(r=1);var o,a=0,s=this.model.nodes.length,l=0;0!==s&&(l=this.model.nodes[s-1].y);var u=0,c=0,h=0,d=0,f=0,p=0,_=0;for(o=0;o<i;o++){var m=r*o;for(u=i>1?e+o/(i-1)*(t-e):.5*(e+t);a<s&&u>this.model.nodes[a].x;)++a<s&&(c=this.model.nodes[a-1].x,h=this.model.nodes[a].x,d=this.model.nodes[a-1].y,f=this.model.nodes[a].y,p=this.model.nodes[a-1].midpoint,_=this.model.nodes[a-1].sharpness,p<1e-5&&(p=1e-5),p>.99999&&(p=.99999));if(a>=s)n[m]=this.model.clamping?l:0;else if(0===a)n[m]=this.model.clamping?this.model.nodes[0].y:0;else{var g=(u-c)/(h-c);if(g=g<p?.5*g/p:.5+.5*(g-p)/(1-p),_>.99){if(g<.5){n[m]=d;continue}n[m]=f;continue}if(_<.01){n[m]=(1-g)*d+g*f;continue}g<.5?g=.5*(2*g)**(1+10*_):g>.5&&(g=1-.5*(2*(1-g))**(1+10*_));var x=g*g,y=x*g,v=2*y-3*x+1,$=-2*y+3*x,b=y-2*x+g,T=y-x,C=(1-_)*(f-d);n[m]=v*d+$*f+b*C+T*C;var S=d<f?d:f,w=d>f?d:f;n[m]=n[m]<S?S:n[m],n[m]=n[m]>w?w:n[m]}}},_0x4d473e.prototype.modified=function(){},_0x4d473e.clone=function(e,t){if(e$2e(e)){var i;for(e$2e(t)||(t=new _0x4d473e),i=0;i<e.model.nodes.length;i++){var n=e.model.nodes[i];t.model.nodes.push({x:n.x,y:n.y,midpoint:n.midpoint,sharpness:n.sharpness})}return t.sortAndUpdateRange(),t}};var _0x2e82cd=(_0x2c56c4=!0,function(e,t){var i=_0x2c56c4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c56c4=!1,i}),_0x499a0e=_0x2e82cd(void 0,(function(){return _0x499a0e.toString().search("(((.+)+)+)+$").toString().constructor(_0x499a0e).search("(((.+)+)+)+$")})),_0x2c56c4;_0x499a0e();var _0x20c75a={RGB:0,HSV:1,LAB:2,DIVERGING:3},_0x1fff44={LINEAR:0,LOG10:1};function _0x2ab369(e,t){var i=e[0],n=e[1],r=e[2],o=Math.sqrt(i*i+n*n+r*r),a=o>.001?Math.acos(i/o):0,s=a>.001?Math.atan2(r,n):0;t[0]=o,t[1]=a,t[2]=s}function _0x472731(e,t){var i=e[0],n=e[1],r=e[2];t[0]=i*Math.cos(n),t[1]=i*Math.sin(n)*Math.cos(r),t[2]=i*Math.sin(n)*Math.sin(r)}function _0x396d66(e,t){if(e[0]>=t-.1)return e[2];var i=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+i:e[2]-i}function _0x102e03(e,t){var i=e-t;for(i<0&&(i=-i);i>=2*Math.PI;)i-=2*Math.PI;return i>Math.PI&&(i=2*Math.PI-i),i}function _0x2d5d87(e,t,i,n){var r=[],o=[];_0x2a827b(t,r),_0x2a827b(i,o);var a=[],s=[];_0x2ab369(r,a),_0x2ab369(o,s);var l=e;if(a[1]>.05&&s[1]>.05&&_0x102e03(a[2],s[2])>.33*Math.PI){var u=Math.max(a[0],s[0]);u=Math.max(88,u),e<.5?(s[0]=u,s[1]=0,s[2]=0,l*=2):(a[0]=u,a[1]=0,a[2]=0,l=2*l-1)}a[1]<.05&&s[1]>.05?a[2]=_0x396d66(s,a[0]):s[1]<.05&&a[1]>.05&&(s[2]=_0x396d66(a,s[0]));var c=[];c[0]=(1-l)*a[0]+l*s[0],c[1]=(1-l)*a[1]+l*s[1],c[2]=(1-l)*a[2]+l*s[2];var h=[];_0x472731(c,h),_0x4db40e(h,n)}function _0x5a9a06(){this.model={clamping:!0,colorSpace:_0x20c75a.RGB,hSVWrap:!0,scale:_0x1fff44.LINEAR,nanColor:null,belowRangeColor:null,aboveRangeColor:null,useAboveRangeColor:!1,useBelowRangeColor:!1,allowDuplicateScalars:!1,table:null,tableSize:0,buildTime:null,nodes:null,discretize:!1,numberOfValues:256,range:[0,1],mappingRange:[0,1]},this.model.table=[],this.model.nodes=[],this.model.nanColor=[.5,0,0,1],this.model.belowRangeColor=[0,0,0,1],this.model.aboveRangeColor=[1,1,1,1],this.model.buildTime={}}function _0x13f70a(e,t){var i,n,r=e[0],o=e[1],a=e[2],s=1/6,l=r,u=r;o>l?l=o:o<u&&(u=o),a>l?l=a:a<u&&(u=a);const c=l;(n=c>0?(l-u)/l:0)>0?(i=r===l?s*(o-a)/(l-u):o===l?1/3+s*(a-r)/(l-u):2/3+s*(r-o)/(l-u))<0&&(i+=1):i=0,t[0]=i,t[1]=n,t[2]=c}function _0xc84f51(e,t){var i,n,r,o=e[0],a=e[1],s=e[2],l=1/3,u=1/6,c=2/3,h=5/6;o>u&&o<=l?(n=1,i=(l-o)/u,r=0):o>l&&o<=.5?(n=1,r=(o-l)/u,i=0):o>.5&&o<=c?(r=1,n=(c-o)/u,i=0):o>c&&o<=h?(r=1,i=(o-c)/u,n=0):o>h&&o<=1?(i=1,r=(1-o)/u,n=0):(i=1,n=o/u,r=0),i=a*i+(1-a),n=a*n+(1-a),r=a*r+(1-a),i*=s,n*=s,r*=s,t[0]=i,t[1]=n,t[2]=r}function _0x156c9d(e,t){var i=(e[0]+16)/116,n=e[1]/500+i,r=i-e[2]/200;i**3>.008856?i**=3:i=(i-16/116)/7.787,n**3>.008856?n**=3:n=(n-16/116)/7.787,r**3>.008856?r**=3:r=(r-16/116)/7.787;t[0]=.9505*n,t[1]=1*i,t[2]=1.089*r}function _0x89ec71(e,t){var i=e[0]/.9505,n=e[1]/1,r=e[2]/1.089;i>.008856?i**=1/3:i=7.787*i+16/116,n>.008856?n**=1/3:n=7.787*n+16/116,r>.008856?r**=1/3:r=7.787*r+16/116,t[0]=116*n-16,t[1]=500*(i-n),t[2]=200*(n-r)}function _0x1a8d22(e,t){var i=e[0],n=e[1],r=e[2],o=3.2406*i+-1.5372*n+-.4986*r,a=-.9689*i+1.8758*n+.0415*r,s=.0557*i+-.204*n+1.057*r;o>.0031308?o=1.055*o**(1/2.4)-.055:o*=12.92,a>.0031308?a=1.055*a**(1/2.4)-.055:a*=12.92,s>.0031308?s=1.055*s**(1/2.4)-.055:s*=12.92;var l=o;l<a&&(l=a),l<s&&(l=s),l>1&&(o/=l,a/=l,s/=l),o<0&&(o=0),a<0&&(a=0),s<0&&(s=0),t[0]=o,t[1]=a,t[2]=s}function _0x47ccb7(e,t){var i=e[0],n=e[1],r=e[2];i>.04045?i=((i+.055)/1.055)**2.4:i/=12.92,n>.04045?n=((n+.055)/1.055)**2.4:n/=12.92,r>.04045?r=((r+.055)/1.055)**2.4:r/=12.92,t[0]=.4124*i+.3576*n+.1805*r,t[1]=.2126*i+.7152*n+.0722*r,t[2]=.0193*i+.1192*n+.9505*r}function _0x2a827b(e,t){var i=[0,0,0];_0x47ccb7(e,i),_0x89ec71(i,t)}function _0x4db40e(e,t){var i=[0,0,0];_0x156c9d(e,i),_0x1a8d22(i,t)}function g$e(e){o$1q.defined("context",e),this._context=e,this._NetCDFData=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._dictColorTable=void 0,this._hasColorTable=0,this._hypsometricTexture=void 0,this._filterMode=k$S.FilterMode.LINEAR,this._volumeRenderMode=gt$2.VolumeRendering,this._scale=new o$1p(1,1,1),this._scaleDirty=!1,this._sliceCoordDirty=!1,this._transparency=0,this._sliceCoordinate=new o$1p(.5,.5,.5),this._floor=Number.MAX_VALUE,this._ceil=Number.MIN_VALUE,this._maxFiltration=Number.MAX_VALUE,this._minFiltration=Number.MIN_VALUE,this._visible=!0,this._type="VoxelGridLayer3D",this._name=void 0,this._url=void 0,this._voxelGridTile=void 0,this._zBounds=void 0,this._layerBounds=void 0,this._version=1,this._width=0,this._height=0,this._depth=0,this._time=0,this._cellWidth=0,this._cellHeight=0,this._cellDepth=0,this._cellTime=0,this._levels=0,this._availableNode=void 0,this._volumeBuffer=void 0,this._multiTextures=[],this._textureLevelLoaded=!0,this._period=500,this._prevTime=0,this._timeRatio=0,this._timeIndexChange=!1,this._duration=1,this._startRender=!1,this._frameIndex=-1,this._useGradientOpacity=!1,this._gradientOpacityMinOpacity=0,this._gradientOpacityMaxOpacity=1,this._gradientOpacityMinValue=0,this._gradientOpacityMaxValue=1,this._clipPlanes=[],this._contourValue=0,this._contourValueDirty=!1,this._enableLighting=!1,this._material={diffuse:new e$1X(.9,.9,.9),specular:new e$1X(.2,.2,.2),ambient:new e$1X(.1,.1,.1),shiness:10},this._fillStyle=fr$3.Fill,this._outlineColor=new e$1X(1,1,1,1)}_0x5a9a06.clone=function(e,t){if(e$2e(e)){var i;for(e$2e(t)||(t=new _0x5a9a06),i=0;i<e.model.nodes.length;i++){var n=e.model.nodes[i];t.model.nodes.push({x:n.x,r:n.r,g:n.g,b:n.b,midpoint:n.midpoint,sharpness:n.sharpness})}return t.sortAndUpdateRange(),t.model.mappingRange[0]=e.model.mappingRange[0],t.model.mappingRange[1]=e.model.mappingRange[1],t}},_0x5a9a06.prototype.getSize=function(){return this.model.nodes.length},_0x5a9a06.prototype.addRGBPoint=function(e,t,i,n){this.addRGBPointLong(e,t,i,n,.5,0)},_0x5a9a06.prototype.addRGBPointLong=function(e,t,i,n,r,o){var a=u$Z(r,.5),s=u$Z(o,0);if(a<0||a>1||s<0||s>1)return-1;this.model.allowDuplicateScalars||this.removePoint(e);var l={x:e,r:t,g:i,b:n,midpoint:a,sharpness:s};this.model.nodes.push(l),this.sortAndUpdateRange();for(var u=0;u<this.model.nodes.length&&this.model.nodes[u].x!==e;u++);return u<this.model.nodes.length?u:-1},_0x5a9a06.prototype.addHSVPoint=function(e,t,i,n){this.addHSVPointLong(e,t,i,n,.5,0)},_0x5a9a06.prototype.addHSVPointLong=function(e,t,i,n,r,o){var a=u$Z(r,.5),s=u$Z(o,0),l=[];return _0xc84f51([t,i,n],l),this.addRGBPoint(e,l[0],l[1],l[2],a,s)},_0x5a9a06.prototype.setNodes=function(e){this.model.nodes!==e&&(this.model.nodes=e,this.sortAndUpdateRange())},_0x5a9a06.prototype.sortAndUpdateRange=function(){this.model.nodes.sort((function(e,t){return e.x-t.x})),this.updateRange()||this.modified()},_0x5a9a06.prototype.getRange=function(){return this.model.mappingRange},_0x5a9a06.prototype.updateRange=function(){var e=[2];e[0]=this.model.mappingRange[0],e[1]=this.model.mappingRange[1];var t=this.model.nodes.length;return t?(this.model.mappingRange[0]=this.model.nodes[0].x,this.model.mappingRange[1]=this.model.nodes[t-1].x):(this.model.mappingRange[0]=0,this.model.mappingRange[1]=0),(e[0]!==this.model.mappingRange[0]||e[1]!==this.model.mappingRange[1])&&(this.modified(),!0)},_0x5a9a06.prototype.removePoint=function(e){for(var t=0;t<this.model.nodes.length&&this.model.nodes[t].x!==e;t++);var i=t;if(t>=this.model.nodes.length)return-1;var n=!1;return this.model.nodes.splice(t,1),(0===t||t===this.model.nodes.length)&&(n=this.updateRange()),n||this.modified(),i},_0x5a9a06.prototype.movePoint=function(e,t){if(e!==t){this.removePoint(t);for(var i=0;i<this.model.nodes.length;i++)if(this.model.nodes[i].x===e){this.model.nodes[i].x=t,this.sortAndUpdateRange();break}}},_0x5a9a06.prototype.removeAllPoints=function(){this.model.nodes=[],this.sortAndUpdateRange()},_0x5a9a06.prototype.addRGBSegment=function(e,t,i,n,r,o,a,s){this.sortAndUpdateRange();for(var l=0;l<this.model.nodes.length;)this.model.nodes[l].x>=e&&this.model.nodes[l].x<=r?this.model.nodes.splice(l,1):l++;this.addRGBPointLong(e,t,i,n,.5,0),this.addRGBPointLong(r,o,a,s,.5,0),this.modified()},_0x5a9a06.prototype.addHSVSegment=function(e,t,i,n,r,o,a,s){var l=[o,a,s],u=[],c=[];_0xc84f51([t,i,n],u),_0xc84f51(l,c),this.addRGBSegment(e,u[0],u[1],u[2],r,c[0],c[1],c[2])},_0x5a9a06.prototype.mapValue=function(e){var t=[];return this.getColor(e,t),[Math.floor(255*t[0]+.5),Math.floor(255*t[1]+.5),Math.floor(255*t[2]+.5),255]},_0x5a9a06.prototype.getColor=function(e,t){if(this.model.indexedLookup){var i=this.getSize(),n=this.getAnnotatedValueIndexInternal(e);if(n<0||0===i)this.getNanColor(t);else{var r=[];this.getNodeValue(n%i,r),t[0]=r.r,t[1]=r.g,t[2]=r.b}}else this.getTable(e,e,1,t)},_0x5a9a06.prototype.getRedValue=function(e){var t=[];return this.getColor(e,t),t[0]},_0x5a9a06.prototype.getGreenValue=function(e){var t=[];return this.getColor(e,t),t[1]},_0x5a9a06.prototype.getBlueValue=function(e){var t=[];return this.getColor(e,t),t[2]},_0x5a9a06.prototype.getTable=function(e,t,i,n){if(isNaN(e)||isNaN(t))for(var r=0;r<i;r++)n[3*r+0]=this.model.nanColor[0],n[3*r+1]=this.model.nanColor[1],n[3*r+2]=this.model.nanColor[2];else{var o=0,a=this.model.nodes.length,s=0,l=0,u=0;0!==a&&(s=this.model.nodes[a-1].r,l=this.model.nodes[a-1].g,u=this.model.nodes[a-1].b);var c=0,h=0,d=0,f=[0,0,0],p=[0,0,0],_=0,m=0,g=[],x=this.model.scale===_0x1fff44.LOG10;x&&(x=this.model.mappingRange[0]>0);var y=0,v=0,$=0;x&&(y=Math.log10(e),v=Math.log10(t));for(r=0;r<i;r++){var b=3*r;if(i>1?x?c=10**($=y+r/(i-1)*(v-y)):c=e+r/(i-1)*(t-e):x?c=10**($=.5*(y+v)):c=.5*(e+t),this.model.discretize){var T=this.model.mappingRange;if(c>=T[0]&&c<=T[1]){var C=this.model.numberOfValues,S=T[1]-T[0];if(C<=1)c=T[0]+S/2;else{var w=(c-T[0])/S,E=Math.floor(C*w);c=T[0]+E/(C-1)*S}}}for(;o<a&&c>this.model.nodes[o].x;)++o<a&&(h=this.model.nodes[o-1].x,d=this.model.nodes[o].x,x&&(h=Math.log10(h),d=Math.log10(d)),f[0]=this.model.nodes[o-1].r,p[0]=this.model.nodes[o].r,f[1]=this.model.nodes[o-1].g,p[1]=this.model.nodes[o].g,f[2]=this.model.nodes[o-1].b,p[2]=this.model.nodes[o].b,_=this.model.nodes[o-1].midpoint,m=this.model.nodes[o-1].sharpness,_<1e-5&&(_=1e-5),_>.99999&&(_=.99999));if(c>this.model.mappingRange[1])n[b]=0,n[b+1]=0,n[b+2]=0,this.model.clamping&&(this.getUseAboveRangeColor()?(n[b]=this.model.aboveRangeColor[0],n[b+1]=this.model.aboveRangeColor[1],n[b+2]=this.model.aboveRangeColor[2]):(n[b]=s,n[b+1]=l,n[b+2]=u));else if(c<this.model.mappingRange[0]||!Number.isFinite(c)&&c<0)n[b]=0,n[b+1]=0,n[b+2]=0,this.model.clamping&&(this.getUseBelowRangeColor()?(n[b]=this.model.belowRangeColor[0],n[b+1]=this.model.belowRangeColor[1],n[b+2]=this.model.belowRangeColor[2]):a>0&&(n[b]=this.model.nodes[0].r,n[b+1]=this.model.nodes[0].g,n[b+2]=this.model.nodes[0].b));else if(0===o&&(Math.abs(c-e)<1e-6||this.model.discretize))a>0?(n[b]=this.model.nodes[0].r,n[b+1]=this.model.nodes[0].g,n[b+2]=this.model.nodes[0].b):(n[b]=0,n[b+1]=0,n[b+2]=0);else{var P=0;if(P=(P=x?($-h)/(d-h):(c-h)/(d-h))<_?.5*P/_:.5+.5*(P-_)/(1-_),m>.99){if(P<.5){n[b]=f[0],n[b+1]=f[1],n[b+2]=f[2];continue}n[b]=p[0],n[b+1]=p[1],n[b+2]=p[2];continue}if(m<.01){if(this.model.colorSpace===_0x20c75a.RGB)n[b]=(1-P)*f[0]+P*p[0],n[b+1]=(1-P)*f[1]+P*p[1],n[b+2]=(1-P)*f[2]+P*p[2];else if(this.model.colorSpace===_0x20c75a.HSV){var A=[];_0x13f70a(f,G=[]),_0x13f70a(p,A),this.model.hSVWrap&&(G[0]-A[0]>.5||A[0]-G[0]>.5)&&(G[0]>A[0]?G[0]-=1:A[0]-=1),(z=[])[0]=(1-P)*G[0]+P*A[0],z[0]<0&&(z[0]+=1),z[1]=(1-P)*G[1]+P*A[1],z[2]=(1-P)*G[2]+P*A[2],_0xc84f51(z,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else if(this.model.colorSpace===_0x20c75a.LAB){var L=[];_0x2a827b(f,U=[]),_0x2a827b(p,L),(V=[])[0]=(1-P)*U[0]+P*L[0],V[1]=(1-P)*U[1]+P*L[1],V[2]=(1-P)*U[2]+P*L[2],_0x4db40e(V,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else this.model.colorSpace===_0x20c75a.DIVERGING&&(_0x2d5d87(P,f,p,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]);continue}P<.5?P=.5*(2*P)**(1+10*m):P>.5&&(P=1-.5*(2*(1-P))**(1+10*m));var M,R=P*P,O=R*P,D=2*O-3*R+1,I=-2*O+3*R,F=O-2*R+P,B=O-R;if(this.model.colorSpace===_0x20c75a.RGB)for(var N=0;N<3;N++)M=(1-m)*(p[N]-f[N]),n[b+N]=D*f[N]+I*p[N]+F*M+B*M;else if(this.model.colorSpace===_0x20c75a.HSV){var G;A=[];_0x13f70a(f,G=[]),_0x13f70a(p,A),this.model.hSVWrap&&(G[0]-A[0]>.5||A[0]-G[0]>.5)&&(G[0]>A[0]?G[0]-=1:A[0]-=1);var z=[];for(N=0;N<3;N++)M=(1-m)*(A[N]-G[N]),z[N]=D*G[N]+I*A[N]+F*M+B*M,0===N&&z[N]<0&&(z[N]+=1);_0xc84f51(z,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else if(this.model.colorSpace===_0x20c75a.LAB){var U;L=[];_0x2a827b(f,U=[]),_0x2a827b(p,L);var V=[];for(N=0;N<3;N++)M=(1-m)*(L[N]-U[N]),V[N]=D*U[N]+I*L[N]+F*M+B*M;_0x4db40e(V,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else this.model.colorSpace===_0x20c75a.DIVERGING&&(_0x2d5d87(P,f,p,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]);for(N=0;N<3;N++)n[b+N]=n[b+N]<0?0:n[b+N],n[b+N]=n[b+N]>1?1:n[b+N]}}}},_0x5a9a06.prototype.getUint8Table=function(e,t,i,n){if(n=u$Z(n,!1),this.model.tableSize===i&&this.model.tableWithAlpha!==n)return this.model.table;if(0===this.model.nodes.length)return this.model.table;var r=n?4:3;(this.model.tableSize!==i||this.model.tableWithAlpha!==n)&&(this.model.table=new Uint8Array(i*r),this.model.tableSize=i,this.model.tableWithAlpha=n);var o=[];this.getTable(e,t,i,o);for(var a=0;a<i;a++)this.model.table[a*r+0]=Math.floor(255*o[3*a+0]+.5),this.model.table[a*r+1]=Math.floor(255*o[3*a+1]+.5),this.model.table[a*r+2]=Math.floor(255*o[3*a+2]+.5),n&&(this.model.table[a*r+3]=255);return this.model.buildTime.modified(),this.model.table},_0x5a9a06.prototype.buildFunctionFromTable=function(e,t,i,n){var r=0;this.removeAllPoints(),i>1&&(r=(t-e)/(i-1));for(var o=0;o<i;o++){var a={x:e+r*o,r:n[3*o],g:n[3*o+1],b:n[3*o+2],sharpness:0,midpoint:.5};this.model.nodes.push(a)}this.sortAndUpdateRange()},_0x5a9a06.prototype.getNodeValue=function(e,t){return e<0||e>=this.model.nodes.length?-1:(t[0]=this.model.nodes[e].x,t[1]=this.model.nodes[e].r,t[2]=this.model.nodes[e].g,t[3]=this.model.nodes[e].b,t[4]=this.model.nodes[e].midpoint,t[5]=this.model.nodes[e].sharpness,1)},_0x5a9a06.prototype.setNodeValue=function(e,t){if(e<0||e>=this.model.nodes.length)return-1;var i=this.model.nodes[e].x;return this.model.nodes[e].x=t[0],this.model.nodes[e].r=t[1],this.model.nodes[e].g=t[2],this.model.nodes[e].b=t[3],this.model.nodes[e].midpoint=t[4],this.model.nodes[e].sharpness=t[5],i!==t[0]?this.sortAndUpdateRange():this.modified(),1},_0x5a9a06.prototype.getNumberOfAvailableColors=function(){return this.model.indexedLookup&&this.getSize()?this.getSize():this.model.tableSize?this.model.tableSize:16777216},_0x5a9a06.prototype.getIndexedColor=function(e,t){var i=this.getSize();if(i>0&&e>=0){var n=[];this.getNodeValue(e%i,n);for(var r=0;r<3;++r)t[r]=n[r+1];t[3]=1}else this.getNanColor(t),t[3]=1},_0x5a9a06.prototype.fillFromDataPointer=function(e,t){if(!(e<=0)&&t){this.removeAllPoints();for(var i=0;i<e;i++)this.addRGBPoint(t[4*i],t[4*i+1],t[4*i+2],t[4*i+3])}},_0x5a9a06.prototype.setMappingRange=function(e,t){var i=[e,t],n=this.getRange();if((n[1]!==i[1]||n[0]!==i[0])&&i[1]!==i[0]){for(var r=(i[1]-i[0])/(n[1]-n[0]),o=i[0]-n[0]*r,a=0;a<this.model.nodes.length;++a)this.model.nodes[a].x=this.model.nodes[a].x*r+o;this.model.mappingRange[0]=i[0],this.model.mappingRange[1]=i[1],this.modified()}},_0x5a9a06.prototype.adjustRange=function(e){var t=this.getRange(),i=[];t[0]<e[0]?(this.getColor(e[0],i),this.addRGBPoint(e[0],i[0],i[1],i[2])):(this.getColor(t[0],i),this.addRGBPoint(e[0],i[0],i[1],i[2])),t[1]>e[1]?(this.getColor(e[1],i),this.addRGBPoint(e[1],i[0],i[1],i[2])):(this.getColor(t[1],i),this.addRGBPoint(e[1],i[0],i[1],i[2])),this.sortAndUpdateRange();for(var n=0;n<this.model.nodes.length;)this.model.nodes[n].x>=e[0]&&this.model.nodes[n].x<=e[1]?this.model.nodes.splice(n,1):++n;return 1},_0x5a9a06.prototype.estimateMinNumberOfSamples=function(e,t){var i=this.findMinimumXDistance();return Math.ceil((t-e)/i)},_0x5a9a06.prototype.findMinimumXDistance=function(){if(this.model.nodes.length<2)return-1;for(var e=Number.MAX_VALUE,t=0;t<this.model.nodes.length-1;t++){var i=this.model.nodes[t+1].x-this.model.nodes[t].x;i<e&&(e=i)}return e},_0x5a9a06.prototype.mapScalarsThroughTable=function(e,t,i,n){0!==this.getSize()&&(this.model.indexedLookup?this.mapDataIndexed(e,t,i,n):this.mapData(e,t,i,n))},_0x5a9a06.prototype.mapData=function(e,t,i,n){if(0!==this.getSize()){var r=Math.floor(255*this.getAlpha()+.5),o=e.getNumberOfTuples(),a=e.getNumberOfComponents(),s=t.getData(),l=e.getData(),u=[];if(i===ScalarMappingTarget.RGBA)for(var c=0;c<o;c++){var h=l[c*a+n];this.getColor(h,u),s[4*c]=Math.floor(255*u[0]+.5),s[4*c+1]=Math.floor(255*u[1]+.5),s[4*c+2]=Math.floor(255*u[2]+.5),s[4*c+3]=r}if(i===ScalarMappingTarget.RGB)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[3*c]=Math.floor(255*u[0]+.5),s[3*c+1]=Math.floor(255*u[1]+.5),s[3*c+2]=Math.floor(255*u[2]+.5)}if(i===ScalarMappingTarget.LUMINANCE)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[c]=Math.floor(76.5*u[0]+150.45*u[1]+28.05*u[2]+.5)}if(i===ScalarMappingTarget.LUMINANCE_ALPHA)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[2*c]=Math.floor(76.5*u[0]+150.45*u[1]+28.05*u[2]+.5),s[2*c+1]=r}}},_0x5a9a06.prototype.applyColorMap=function(e){if(e.ColorSpace&&(this.model.colorSpace=_0x20c75a[e.ColorSpace.toUpperCase()],void 0===this.model.colorSpace&&(this.model.colorSpace=_0x20c75a.RGB)),e.NanColor)for(this.model.nanColor=[].concat(e.NanColor);this.model.nanColor.length<4;)this.model.nanColor.push(1);if(e.RGBPoints){var t=e.RGBPoints.length;this.model.nodes=[];for(var i=0;i<t;i+=4)this.model.nodes.push({x:e.RGBPoints[i],r:e.RGBPoints[i+1],g:e.RGBPoints[i+2],b:e.RGBPoints[i+3],midpoint:.5,sharpness:0})}this.sortAndUpdateRange()},_0x5a9a06.prototype.modified=function(){},Object.defineProperties(g$e.prototype,{visible:{get:function(){return this._visible},set:function(e){this._visible=e}},type:{get:function(){return this._type}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e}},zBounds:{get:function(){return this._zBounds},set:function(e){this._zBounds=e}},name:{get:function(){return this._name}},NetCDFInfo:{get:function(){return this._NetCDFInfo}},maxFiltration:{get:function(){return this._maxFiltration},set:function(e){this._maxFiltration=e}},minFiltration:{get:function(){return this._minFiltration},set:function(e){this._minFiltration=e}},duration:{get:function(){return this._duration},set:function(e){o$1q.typeOf.number.greaterThan("duration",e,0),o$1q.typeOf.number.greaterThan("this._time",this._time,0),this._duration=e,this._period=1e3*this._duration/this._time}},opaqueRate:{get:function(){return this._transparency},set:function(e){this._transparency!==e&&(this._transparency=e)}},filterMode:{get:function(){return this._filterMode},set:function(e){this._filterMode!==e&&(this._filterMode=e)}},maxValue:{get:function(){return this._voxelGridTile.maxValue}},minValue:{get:function(){return this._voxelGridTile.minValue}},visibleBoundingBox:{get:function(){return this._voxelGridTile.visibleBoundingBox},set:function(e){this._voxelGridTile.visibleBoundingBox=e}},scale:{get:function(){return this._scale},set:function(e){o$1p.equals(e,this._scale)||(this._scale=o$1p.clone(e,this._scale),this._scaleDirty=!0)}},volumeRenderMode:{get:function(){return this._volumeRenderMode},set:function(e){this._volumeRenderMode=e}},sliceCoordinate:{get:function(){return this._sliceCoordinate},set:function(e){this._sliceCoordinate=e,this._sliceCoordDirty=!0}},frameIndex:{get:function(){return this._frameIndex},set:function(e){"number"!=typeof e||isNaN(e)||(this._frameIndex=e)}},colorTable:{get:function(){return this._dictColorTable},set:function(e){if(!e$2e(e))return e$2e(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),void(this._hasColorTable=0);this._dictColorTable=i$T.clone(e,this._dictColorTable),this._dictColorTable.count()<1?this._hasColorTable=0:(this._dictColorTable.generateBuffer(),e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:this._context,width:1024,height:64,pixelFormat:V$12.RGBA,flipY:!1})),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._dictColorTable._imageBuffer}),this._hasColorTable=1)}},colorTransferFunction:{get:function(){return this._colorTransferFunction},set:function(e){if(e$2e(e)){this._colorTransferFunction=_0x5a9a06.clone(e,this._colorTransferFunction);for(var t=1024,i=new Uint8Array(6144),n=new Float32Array(3*t),r=0;r<1;++r){var o=e.getRange();e.getTable(o[0],o[1],t,n,1);for(var a=0;a<3*t;++a)i[r*t*6+a]=255*n[a],i[r*t*6+a+3*t]=255*n[a]}e$2e(this._colorTexture)||(this._colorTexture=new t$U({context:this._context,width:t,height:2,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,flipY:!1}));var s=new Uint8Array(8192);for(a=0;a<2048;a++)s[4*a]=i[3*a],s[4*a+1]=i[3*a+1],s[4*a+2]=i[3*a+2],s[4*a+3]=255;this._colorTexture.copyFrom({width:t,height:2,arrayBufferView:s})}else e$2e(this._colorTransferFunction)&&(this._colorTransferFunction.destroy(),this._colorTransferFunction=null)}},opacityTransferFunction:{get:function(){return this._opacityTransferFunction},set:function(e){if(e$2e(e)){this._opacityTransferFunction=_0x4d473e.clone(e,this._opacityTransferFunction);for(var t=1024,i=new Float32Array(2048),n=new Float32Array(t),r=0;r<1;++r){var o=e.getRange();e.getTable(o[0],o[1],t,n,1);for(var a=0;a<t;++a)i[r*t*2+a]=1-(1-n[a]),i[r*t*2+a+t]=i[r*t*2+a]}e$2e(this._opacityTexture)||(this._opacityTexture=new t$U({context:this._context,width:t,height:2,pixelFormat:this._context.webgl2||this._context.webgpu?V$12.RED:V$12.LUMINANCE,pixelDatatype:_$_.FLOAT,flipY:!1})),this._opacityTexture.copyFrom({width:t,height:2,arrayBufferView:i})}else e$2e(this._opacityTransferFunction)&&(this._opacityTransferFunction.destroy(),this._opacityTransferFunction=null)}},useGradientOpacity:{get:function(){return this._useGradientOpacity},set:function(e){e$2e(this._voxelGridTile)&&e!=this._useGradientOpacity&&this._voxelGridTile._useGradientOpacityChanged(e),this._useGradientOpacity=e}},gradientOpacityMinOpacity:{get:function(){return this._gradientOpacityMinOpacity},set:function(e){this._gradientOpacityMinOpacity=e}},gradientOpacityMaxOpacity:{get:function(){return this._gradientOpacityMaxOpacity},set:function(e){this._gradientOpacityMaxOpacity=e}},gradientOpacityMinValue:{get:function(){return this._gradientOpacityMinValue},set:function(e){this._gradientOpacityMinValue=e}},gradientOpacityMaxValue:{get:function(){return this._gradientOpacityMaxValue},set:function(e){this._gradientOpacityMaxValue=e}},contourValue:{get:function(){return this._contourValue},set:function(e){e!==this._contourValue&&(this._contourValue=Math.min(e,this.maxValue),this._contourValue=Math.max(e,this.minValue),this._contourValueDirty=!0)}},enableLighting:{get:function(){return this._enableLighting},set:function(e){e!==this._enableLighting&&(this._enableLighting=e,this._voxelGridTile._enableLightingChange(e))}},material:{get:function(){return this._material}},outlineColor:{get:function(){return this._outlineColor},set:function(e){this._outlineColor=e}},fillStyle:{get:function(){return this._fillStyle},set:function(e){this._fillStyle=e}},sampleDistance:{set:function(e){this._sampleDistance!==e&&(this._sampleDistance=e)}}}),g$e.prototype.update=function(e,t){if(this._frameState=t,this._visible&&this._startRender){this._timeIndexChange=!1;var i=performance.now(),n=i-this._prevTime;this._timeRatio=n/this._period,n>this._period&&(this._prevTime=i,this._timeRatio=0,this._timeIndexChange=!0),e$2e(this._voxelGridTile)&&(this._voxelGridTile instanceof o$b&&this.updateMultiResolution(e,t),this._voxelGridTile.update(this,t))}},g$e.prototype.setIsMultiResolution=function(e){e$2e(this._voxelGridTile)||(e?(this._voxelGridTile=new o$b(this._context,this),this._voxelGridTile._isRootTile=!0):this._voxelGridTile=new _$9(this._context,this))};var Vt$2=new i$W("loadVol");g$e.prototype.updateMultiResolution=function(e,t){var i=t.camera,n=t.cullingVolume,r=e._gl,o=t.requests,a=this;if(this._voxelGridTile._isVisible=n.computeVisibility(this._voxelGridTile._orientedBoundingBox)!==Ae$w.OUTSIDE,this._voxelGridTile._isVisible){if(!this._voxelGridTile._initialized)return void o.push({entity:this._voxelGridTile,priority:0,owner:this});this._voxelGridTile.calcPixFromCam(i,r,1),this._updateQueue=[[this._voxelGridTile]];for(var s,l,u,c,h,d,f=[this._voxelGridTile],p=1;p<this._levels;p++){for(var _={},m=0;m<f.length;m++){if(!(b=f[m])._isLessLodDis){if(u=this._availableNode[p].resolution.x,c=this._availableNode[p].resolution.y,e$2e(b._southwestChild))_[JSON.stringify([b._southwestChild._x,b._southwestChild._y,b._southwestChild._level])]=b._southwestChild;else if(h=2*b._x,d=2*b._y+1,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._southwestChild=new o$b(this._context,this),b._southwestChild._mode=t.mode,b._southwestChild._level=b._level+1,b._southwestChild._x=h,b._southwestChild._y=d,b._southwestChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;var g=this._layerBounds.north-d*c*this._cellHeight;b._southwestChild._dataBounds=new h$18(b._dataBounds.west,g-l,b._dataBounds.west+s,g),b._southwestChild._computePosition(),b._southwestChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._southwestChild._x,b._southwestChild._y,b._southwestChild._level])]=b._southwestChild}if(e$2e(b._southeastChild))_[JSON.stringify([b._southeastChild._x,b._southeastChild._y,b._southeastChild._level])]=b._southeastChild;else if(h=2*b._x+1,d=2*b._y+1,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._southeastChild=new o$b(this._context,this),b._southeastChild._mode=t.mode,b._southeastChild._level=b._level+1,b._southeastChild._x=h,b._southeastChild._y=d,b._southeastChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;g=this._layerBounds.north-d*c*this._cellHeight;var x=this._layerBounds.west+h*u*this._cellWidth;b._southeastChild._dataBounds=new h$18(x,g-l,x+s,g),b._southeastChild._computePosition(),b._southeastChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._southeastChild._x,b._southeastChild._y,b._southeastChild._level])]=b._southeastChild}if(e$2e(b._northwestChild)?_[JSON.stringify([b._northwestChild._x,b._northwestChild._y,b._northwestChild._level])]=b._northwestChild:(h=2*b._x,d=2*b._y,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow&&(b._northwestChild=new o$b(this._context,this),b._northwestChild._mode=t.mode,b._northwestChild._level=b._level+1,b._northwestChild._x=h,b._northwestChild._y=d,b._northwestChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c,b._northwestChild._dataBounds=new h$18(b._dataBounds.west,b._dataBounds.north-l,b._dataBounds.west+s,b._dataBounds.north),b._northwestChild._computePosition(),b._northwestChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._northwestChild._x,b._northwestChild._y,b._northwestChild._level])]=b._northwestChild)),e$2e(b._northeastChild))_[JSON.stringify([b._northeastChild._x,b._northeastChild._y,b._northeastChild._level])]=b._northeastChild;else if(h=2*b._x+1,d=2*b._y,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._northeastChild=new o$b(this._context,this),b._northeastChild._mode=t.mode,b._northeastChild._level=b._level+1,b._northeastChild._x=h,b._northeastChild._y=d,b._northeastChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;x=this._layerBounds.west+h*u*this._cellWidth;b._northeastChild._dataBounds=new h$18(x,b._dataBounds.north-l,x+s,b._dataBounds.north),b._northeastChild._computePosition(),b._northeastChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._northeastChild._x,b._northeastChild._y,b._northeastChild._level])]=b._northeastChild}}}f=[];var y=0,v=void 0;for(var $ in _){var b;(b=_[$])._isVisible=n.computeVisibility(b._orientedBoundingBox)!==Ae$w.OUTSIDE,b._isVisible&&(b.calcPixFromCam(i,r,1),b._pix>y&&(y=b._pix,v=b))}if(y=0,e$2e(v)){var T=_[JSON.stringify([v._x-1,v._y,v._level])],C=_[JSON.stringify([v._x+1,v._y,v._level])],S=_[JSON.stringify([v._x,v._y-1,v._level])],w=_[JSON.stringify([v._x,v._y+1,v._level])],E=_[JSON.stringify([v._x+1,v._y-1,v._level])];e$2e(E)&&E._isVisible&&e$2e(C)&&e$2e(S)&&C._isVisible&&S._isVisible&&(y=E._pix+C._pix+S._pix,f=[S,E,v,C]);var P=_[JSON.stringify([v._x+1,v._y+1,v._level])];if(e$2e(P)&&P._isVisible&&e$2e(C)&&e$2e(w)&&C._isVisible&&w._isVisible)(L=P._pix+C._pix+w._pix)>y&&(y=L,f=[v,C,w,P]);var A=_[JSON.stringify([v._x-1,v._y+1,v._level])];if(e$2e(A)&&A._isVisible&&e$2e(T)&&e$2e(w)&&T._isVisible&&w._isVisible)(L=A._pix+T._pix+w._pix)>y&&(y=L,f=[T,v,A,w]);var L,M=_[JSON.stringify([v._x-1,v._y-1,v._level])];if(e$2e(M)&&M._isVisible&&e$2e(T)&&e$2e(S)&&T._isVisible&&S._isVisible)(L=M._pix+T._pix+S._pix)>y&&(y=L,f=[M,S,T,v]);0==f.length&&(e$2e(T)&&T._isVisible&&(y=T._pix,f=[T,v]),e$2e(C)&&C._isVisible&&C._pix>y&&(y=C._pix,f=[v,C]),e$2e(S)&&S._isVisible&&S._pix>y&&(y=S._pix,f=[S,v]),e$2e(w)&&w._isVisible&&w._pix>y&&(y=w._pix,f=[v,w]),0==f.length&&(f=[v]))}if(!(f.length>0))break;this._updateQueue.push(f);for(m=0;m<f.length;m++)f[m]._s3mLoadState===N$Q.UNLOAD&&o.push({entity:f[m],priority:0,owner:this})}if(this._textureLevelLoaded){this._multiTextures.length>this._updateQueue.length-1&&(this._multiTextures.length=this._updateQueue.length-1);var R=void 0,O=void 0,D=void 0;for(p=1;p<this._updateQueue.length;p++){var I=this._updateQueue[p],F=I.length;if(0===F)break;var B=!0;for(m=0;m<I.length;m++)if(I[m]._s3mLoadState!=N$Q.LOADED&&I[m]._s3mLoadState!=N$Q.TRANSFORMED){B=!1;break}if(!B)break;if(this._multiTextures.length<p){var N;R={textureLevel:N={}},O=I,D=this._multiTextures.length;break}if(D=p-1,!e$2e(N=this._multiTextures[D])||I[0]._x<N.startCol||I[0]._y<N.startRow||I[F-1]._x>N.endCol||I[F-1]._y>N.endRow){R={textureLevel:{}},O=I;break}}if(e$2e(R)){R._cellWidth=this._cellWidth,R._cellHeight=this._cellHeight,R._cellDepth=this._cellDepth,R._availableNode=this._availableNode[O[0]._level],R._time=this._time,R._layerBounds=this._layerBounds,R._minFiltration=this._floor,R._maxFiltration=this._ceil;var G=[];for(p=0;p<O.length;p++){var z={_x:O[p]._x,_y:O[p]._y,_level:O[p]._level,_dataBounds:O[p]._dataBounds,_s3mLoadState:O[p]._s3mLoadState,_arrayBuffer:O[p]._arrayBuffer};G.push(z)}R.arrayWork=G;var U=Vt$2.scheduleTask(R);if(!e$2e(U))return;this._textureLevelLoaded=!1;a=this;o$1l(U,(function(e){var t;if(D<a._multiTextures.length){if(e$2e(!(t=a._multiTextures[D])._volTextures))t._volTextures=[];else{for(var i=t._volTextures.length,n=0;n<i;n++)t._volTextures[n].destroy();t._volTextures=[]}t.bounds=e.textureLevel.bounds,t.cellDepth=e.textureLevel.cellDepth,t.cellHeight=e.textureLevel.cellHeight,t.cellWidth=e.textureLevel.cellWidth,t.endCol=e.textureLevel.endCol,t.endRow=e.textureLevel.endRow,t.multiResolutionTranslation=e.textureLevel.multiResolutionTranslation,t.startCol=e.textureLevel.startCol,t.startRow=e.textureLevel.startRow,t.validHeight=e.textureLevel.validHeight,t.validWidth=e.textureLevel.validWidth,t.xSpan=e.textureLevel.xSpan,t._nBlockLength=e.textureLevel._nBlockLength,t._nLength=e.textureLevel._nLength,t._nSideBlockCount=e.textureLevel._nSideBlockCount}else e$2e(!(t=e.textureLevel)._volTextures)&&(t._volTextures=[]),a._multiTextures.push(t);t.multiResolutionPara=new p$1d(t.multiResolutionTranslation.x,0,t.validWidth,t._nLength,t.multiResolutionTranslation.y,0,t.validHeight,0,t.multiResolutionTranslation.z,0,t._nSideBlockCount,0,t.multiResolutionTranslation.w,0,t._nBlockLength,0);var r=tt$i.LINEAR,o=rt$k.LINEAR;a._filterMode===k$S.FilterMode.NEAREST&&(r=tt$i.NEAREST,o=rt$k.NEAREST);for(i=e.imageDatas.length,n=0;n<i;n++){var s=new t$U({context:a._context,width:t._nLength,height:t._nLength,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:r,magnificationFilter:o})});s.copyFrom({width:t._nLength,height:t._nLength,arrayBufferView:e.imageDatas[n]}),t._volTextures.push(s)}a._textureLevelLoaded=!0;for(n=0;n<e.unzipTile.length;n++){var l=e.unzipTile[n].index,u=e.unzipTile[n].buffer;O[l]._arrayBuffer=u,O[l]._s3mLoadState=N$Q.TRANSFORMED}for(n=0;n<O.length;n++)O[n]._s3mLoadState=N$Q.TRANSFORMED}))}}var V=[];for(p=0;p<this._multiTextures.length;p++)V.push(this._multiTextures[p]);p=0;for(V.length>3&&(p=V.length-3),this._voxelGridTile._multiTextures=[];p<V.length;p++)this._voxelGridTile._multiTextures.push(V[p])}},g$e.prototype.loadEntity=function(e){e.load(this)},g$e.prototype.addClipPlane=function(e){this._clipPlanes.length>=6?console.log("at most 6 clipping planes can be specified"):(this._clipPlanes.push(e),e$2e(this._voxelGridTile)&&this._voxelGridTile._clipPlaneChanged(this))},g$e.prototype.removeAllClipPlanes=function(){var e=this._clipPlanes.length;this._clipPlanes.length=0,e$2e(this._voxelGridTile)&&e>0&&this._voxelGridTile._clipPlaneChanged(this)},g$e.prototype.removeClipPlane=function(e){e<0||e>=6||(this._clipPlanes.splice(e,1),e$2e(this._voxelGridTile)&&this._voxelGridTile._clipPlaneChanged(this))},g$e.prototype.getNumberOfClipPlanes=function(){return this._clipPlanes.length},g$e.prototype.startRender=function(e){if(this._startRender=!0,e$2e(this._voxelGridTile)){var t;if(this._voxelGridTile._setDataBounds(this._layerBounds),this._voxelGridTile._setZBounds(this._zBounds),e$2e(this._NetCDFBuffer))t=this._voxelGridTile._loadData(this._NetCDFBuffer,e),this._minFiltration==Number.MIN_VALUE&&(this._minFiltration=this._voxelGridTile._floor),this._maxFiltration==Number.MAX_VALUE&&(this._maxFiltration=this._voxelGridTile._ceil);else if(e$2e(this._volumeBuffer)){var i=this._cellWidth,n=this._cellHeight,r=this._availableNode[this._voxelGridTile._level];r.EndCol-1==this._voxelGridTile._x&&(i=r.Width-this._voxelGridTile._x*i),r.EndRow-1==this._voxelGridTile._y&&(n=r.Height-this._voxelGridTile._y*n),t=this._voxelGridTile._loadVolume(this._volumeBuffer,{maxValue:this._ceil,minValue:this._floor,time:this._time,xDimSize:this._cellWidth,yDimSize:this._cellHeight,zDimSize:this._cellDepth,xValidSize:i,yValidSize:n,zValidSize:this._cellDepth})}this._voxelGridTile._initialize(this,this._frameState,t)}},g$e.prototype.render=function(e,t){},g$e.prototype.releaseSelection=function(e,t){},g$e.prototype.isDestroyed=function(){return!1},g$e.prototype.destroy=function(){return e$2e(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),e$2e(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),e$2e(this._voxelGridTile)&&(this._voxelGridTile.destroy(),this._voxelGridTile=void 0),this._NetCDFInfo=void 0,this._NetCDFData=void 0,this._NetCDFBuffer=void 0,i$11(this)};var R$6="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\nuniform sampler2D u_opaque;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 opaque = texture2D(u_opaque, v_textureCoordinates);\n vec4 accum = texture2D(u_accumulation, v_textureCoordinates);\n float r = texture2D(u_revealage, v_textureCoordinates).r;\n vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n gl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\n}";function a$5(e){this._framebuffer=void 0,this._outputFramebuffer=void 0,this._accumulationTexture=void 0,this._revealageTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._passType=Le$q.OPAQUE,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},this.billboardQuality=.5,this.enable=!1}Object.defineProperties(a$5.prototype,{});var B$5={enabled:!0,color:new e$1X(0,0,0,0),equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.ONE,functionDestinationRgb:l$13.ONE,functionSourceAlpha:l$13.ZERO,functionDestinationAlpha:l$13.ONE_MINUS_SOURCE_ALPHA},o$a=new f$1a;function E$7(e,t){var i=e[t.id];if(!e$2e(i)||i.viewport.width!=o$a.width||i.viewport.height!=o$a.height){var n=d$1m.getState(t);n.depthMask=!1,n.blending=B$5,n.viewport=o$a,i=d$1m.fromCache(n),e[t.id]=i}return i}function T$a(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy(),e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy(),e._outputFramebuffer=e._outputFramebuffer&&!e._outputFramebuffer.isDestroyed()&&e._outputFramebuffer.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}function O$6(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._hdr?t.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT:_$_.UNSIGNED_BYTE;e._outputFramebuffer=new t$V({context:t,colorTextures:[new t$U({context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:V$12.RGBA,pixelDatatype:r})],destroyAttachments:!0}),e._accumulationTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT});var o=new Float32Array(i*n*4);e._revealageTexture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT,source:{arrayBufferView:o,width:i,height:n},flipY:!1}),e._framebuffer=new t$V({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1})}function H$7(e,t){var i=new s$V({sources:[R$6]}),n={u_accumulation:function(){return e._accumulationTexture},u_revealage:function(){return e._revealageTexture},u_opaque:function(){return e._opaqueTexture}},r=d$1m.fromCache({});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:e._passType,owner:e}),e._clearCommand=new t$W({framebuffer:e._framebuffer,color:new e$1X(0,0,0,1),depth:1,renderState:d$1m.fromCache(),pass:e._passType,owner:e})}function M$6(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._accumulationTexture,o=!1,a=e$2e(r)&&(r.width!==i||r.height!==n);return(!e$2e(r)||a)&&(T$a(e),O$6(e,t),H$7(e,t),o=!0),o}function w$5(e){return e.drawBuffers&&e.fragmentDepth}function _$8(e){if(!e$2e(e.provider))throw new t$15("options.provder and options.viewer is required.");this._provider=e.provider,this._inner=e.layer,this._imagelayerCollection=e.imagelayerCollection,this._name=e.name,this._billboardCollection=new w$O({ignoreShow:!0,scene:e.scene}),this._imageIconBillboard={},this._textBillboard={},this._imageCanvas={},this.kmlLayer=new U$n({camera:e.scene.camera,canvas:e.scene.canvas}),this.kmlLayer.clustering.enabled=!0,this.kmlLayer.clustering.pixelRange=10,e$2e(e.viewer)&&e.viewer.dataSources.add(this.kmlLayer),this.kmlLayer.clustering.clusterEvent.addEventListener((function(e,t){if(e.length>0&&e[0].billboard){var i=e[0].billboard;t.billboard.position=e[0].position.getValue(0),t.billboard.image=i.image.getValue(),t.billboard.scale=i.scale.getValue(),t.billboard.heightReference=i.heightReference.getValue(),t.billboard.scaleByDistance=i.scaleByDistance.getValue(),t.billboard.pixelOffset=i.pixelOffset.getValue()}if(e.length>0&&e[0].label){var n=e[0].label;t.label.position=e[0].position.getValue(0),t.label.text=n.text.getValue(),t.label.font=n.font.getValue(),t.label.verticalOrigin=n.verticalOrigin.getValue(),t.label.horizontalOrigin=n.horizontalOrigin.getValue(),t.label.heightReference=n.heightReference.getValue(),t.label.pixelOffset=n.pixelOffset.getValue(),t.label.scaleByDistance=n.scaleByDistance.getValue(),e$2e(n.style)&&(t.label.style=n.style.getValue()),t.label.fillColor=n.fillColor.getValue()}}))}function E$6(e,t){return t.level-e.level}a$5.isSupported=w$5,a$5.prototype.getOutputFramebuffer=function(){return this._outputFramebuffer},a$5.prototype.update=function(e,t,i){if(w$5(e.context)&&this.enable){var n=e.context;this._screenWidth=Math.floor(n.drawingBufferWidth*this.billboardQuality),this._screenHeight=Math.floor(n.drawingBufferHeight*this.billboardQuality),o$a.width=this._screenWidth,o$a.height=this._screenHeight,this._opaqueTexture=t.getColorTexture(0),this._hdr=i,M$6(this,n)}},a$5.prototype.execute=function(e,t){!e$2e(this._drawCommand)||!this.enable||this._drawCommand.execute(e,t)},a$5.prototype.clear=function(e,t){!e$2e(this._clearCommand)||!this.enable||this._clearCommand.execute(e,t)},a$5.prototype.createDerivedCommands=function(e){!e$2e(e)||(this.enable=!0,e.framebuffer=this._framebuffer,e.renderState=E$7(this._renderStateCache,e.renderState))},a$5.prototype.isDestroyed=function(){return!1},a$5.prototype.destroy=function(){return T$a(this),i$11(this)},Object.defineProperties(_$8.prototype,{tileWidth:{get:function(){return this._provider._tileWidth}},tileHeight:{get:function(){return this._provider._tileHeight}},maximumLevel:{get:function(){return this._provider._ready?this._provider._maximumLevel:-1}},minimumLevel:{get:function(){return this._provider._ready?this._provider._minimumLevel:-1}},tilingScheme:{get:function(){return this._provider._tilingScheme}},rectangle:{get:function(){return this._provider._ready?this._provider._rectangle:null}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._provider._errorEvent}},ready:{get:function(){return this._provider._ready}},readyPromise:{get:function(){return this._provider.readyPromise}},hasAlphaChannel:{get:function(){return!0}},show:{get:function(){return this._inner.show},set:function(e){this._inner.show=e}},mapboxStyle:{get:function(){return this._provider.mapboxStyle},set:function(e){this._provider.mapboxStyle=e}},alpha:{get:function(){return this._inner.alpha},set:function(e){this._inner.alpha=e}},selectColor:{get:function(){return this._inner._selectColor},set:function(e){this._inner._selectColor=e}},name:{get:function(){return this._name},set:function(e){this._name=e}},pausing:{get:function(){return this._inner._pausing},set:function(e){this._inner._pausing=e,this._provider._pausing=e}},indexedDBSetting:{get:function(){return this._provider._indexedDBSetting},set:function(e){e$2e(e)&&"boolean"==typeof e.isOpen&&(this._provider._indexedDBSetting.isOpen=e.isOpen)}}});var b$a=new o$1o,T$9=new o$1p,d$c=new o$Y;function D$4(e){return Array.isArray(e)?"rgb("+e[0]+","+e[1]+","+e[2]+")":""}function y$8(e,t,i,n){var r=t.getGeometry().getFlatCoordinates(),o=r[0],a=r[1],s=i[0]*o+i[2]*a+i[4],l=i[1]*o+i[3]*a+i[5],u=s/e._canvasWidth,c=l/e._canvasWidth,h=n.west+n.width*u,d=n.south+n.height*(1-c);return o$1p.fromRadians(h,d,0,t$12.WGS84,T$9),T$9}function G$7(e){var t=e.getId();return t-=16777216*Math.floor(t/16777216)}_$8.prototype.createIconImageBillboard=function(e){if(e$2e(e.iconImageObjects))for(var t=e.rectangle,i=e.transform,n=0,r=e.iconImageObjects.length;n<r;n++){var o=e.iconImageObjects[n],a=o.feature,s=a.index;if(e$2e(this._imageIconBillboard[s])){var l=this._imageIconBillboard[s];e.level>l.level&&(l.position=y$8(this._provider,a,i,t),l.level=e.level)}else{var u,c=o.style.layout;if(e$2e(c)&&e$2e(c["icon-image"])){var h=c["icon-image"],d=u$Z(c["icon-size"],1);if(e$2e(this._imageCanvas[h]))u=this._imageCanvas[h];else{var f=this._provider._subSpriteImage[h];if(!e$2e(f))continue;(u=document.createElement("canvas")).width=f.width,u.height=f.height,u.getContext("2d").putImageData(f,0,0),this._imageCanvas[h]=u}}b$a.x=0,b$a.y=-u.height/2,d$c.near=1500,d$c.nearValue=1.5,d$c.far=8e6,d$c.farValue=0;var p=this._billboardCollection.add({image:u,scale:d,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:k$R.CLAMP_TO_GROUND,pixelOffset:b$a,scaleByDistance:d$c,id:G$7(a)});p.position=y$8(this._provider,a,i,t),p.level=e.level,this._imageIconBillboard[s]=p}}},_$8.prototype.createTextBillboard=function(e){if(e$2e(e.textObjects))for(var t=e.rectangle,i=e.transform,n=0;n<e.textObjects.length;n++){var r=e.textObjects[n],o=r.feature,a=o.index;if(e$2e(this._textBillboard[a])){var s=this._textBillboard[a];e.level>s.level&&(s.position=y$8(this._provider,o,i,t),s.level=e.level)}else{var l=r.style,u=l.getText(),c=l.textSize,h=u.getText(),d=u.getFont(d),f=u.getTextAlign(),p=document.createElement("canvas"),_=p.getContext("2d"),m=c+"px "+d;_.font=m,_.textBaseline="top",_.textAlign=f;var g=_.measureText(h).width+2;p.width=g,p.height=c+1,_.font=m;var x=u.getFill(),y=u.getStroke();e$2e(y)&&(_.strokeStyle=D$4(y.getColor()),_.lineWidth=y.getWidth(),_.strokeText(h,0,c-3)),e$2e(x)&&(_.fillStyle=D$4(x.getColor()),_.fillText(h,0,c-3)),b$a.x=0,b$a.y=-p.height/2,d$c.near=1500,d$c.nearValue=2,d$c.far=1e6,d$c.farValue=0;var v=this._billboardCollection.add({image:p,imageId:h,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:k$R.CLAMP_TO_GROUND,pixelOffset:b$a,scaleByDistance:d$c,verticalOrigin:S$Q.TOP,horizontalOrigin:j$V.LEFT});v.position=y$8(this._provider,o,i,t),v.level=e.level,this._textBillboard[a]=v}}},_$8.prototype.update=function(e,t){if(e$2e(this._billboardCollection)){var i=this._inner._imageryCache,n=[];for(var r in i)n.push(i[r]);n.sort(E$6);for(var o=0;o<n.length;o++){var a=n[o];!a.isMvtTexture||a.isRendered||(a.isRendered=!0)}this._billboardCollection.update(t)}},_$8.prototype.getProperty=function(e){return this._provider.getProperty(e)},_$8.prototype.refresh=function(){e$2e(this._billboardCollection)&&this._billboardCollection.removeAll();var e=this._inner._imageryCache;for(var t in e)e[t].isRendered=!1;this._imageIconBillboard={},this._textBillboard={},this._imagelayerCollection.remove(this._inner),this._inner=this._imagelayerCollection.addImageryProvider(this._provider)},_$8.prototype.isDestroyed=function(){return!1},_$8.prototype.destroy=function(){return this._imagelayerCollection.remove(this._inner),e$2e(this._billboardCollection)&&(this._billboardCollection.destroy(),this._billboardCollection=null),i$11(this)};var e$3={NONE:0,ByKeyboard:1},Ct=Object.freeze(e$3);function r$d(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._context=e._context,this._s3mInstanceCollection=new _0xd633a7(e._context),this._s3mInstanceCollection._profile=!0,this._s3mInstanceCollection.minVisibleAltitude=-9e3,e.primitives.add(this._s3mInstanceCollection),this._textureAtlas=null,this._profileRenders=[],this._spatialQueryList=[],this._section=!0,this._name="solidModelsProfile"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this),this._modelInfo={},this._dataIndex=0,this._selectedProfileIDs=[],this._clippingType=R$L.KeepInside,this._visibleViewport=4095;var t=this,i=0;this._modelCount=0,this._modelPosition=[],this._addedEvent=new o$1h,this._s3mInstanceCollection.addedEvent.addEventListener((function(){++i===t._modelCount&&t._addedEvent.raiseEvent({modelPosition:t._modelPosition})})),this._volume=void 0}function K$4(e,t){var i=t._group;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=i[n];if(!e$2e(o)||0===o.renderEntities.length)continue;var a=o.renderEntities[0];r.texture=a._texture}}function H$6(e){this.pickColor=new o$1p,this.id=u$Z(e.id,0),e$2e(e.color)?this.color=e$1X.clone(e.color):this.color=e$1X.fromRandom({alpha:1}),this.textureAtlasID=-1,e$2e(e.textureMapParameter)?(this.textureTilingU=u$Z(e.textureMapParameter.UTiling,1),this.textureTilingV=u$Z(e.textureMapParameter.VTiling,1)):(this.textureTilingU=1,this.textureTilingV=1)}function S$3(e){return e===R$L.KeepOutside?j$Z.Disjoint:j$Z.Intersects}Object.defineProperties(r$d.prototype,{selectedModelIDs:{get:function(){return this._selectedProfileIDs}},clippingType:{get:function(){return this._clippingType},set:function(e){if(e!==this._clippingType){this._clippingType=e;for(var t=0;t<this._spatialQueryList.length;t++)this._spatialQueryList[t].positionMode=S$3(this._clippingType);for(t=0;t<this._profileRenders.length;t++)this._profileRenders[t]._clippingType=e}}},addedEvent:{get:function(){return this._addedEvent}},volume:{get:function(){return this._volume},set:function(e){this._volume=e,this._s3mInstanceCollection._volume=e}},mixColorType:{get:function(){return this._s3mInstanceCollection._mixColorType},set:function(e){this._s3mInstanceCollection._mixColorType!==e&&(this._s3mInstanceCollection._mixColorType=e)}}}),r$d.prototype.addProfileGeometry=function(e){if(e$2e(e)){var t=e;Array.isArray(e)&&(t=new h$8(e),e$2e(this._volume)&&(t._volBounds=this._volume._volBounds));var i=new f$a(this,this._profileRenders.length,this._modelInfo,t);i._clippingType=this._clippingType,e$2e(this._volume)&&(i._attributeLocations.aRatio=3,i._volume=this._volume),this._profileRenders.push(i)}},r$d.prototype.clearProfile=function(){this._profileRenders.map((function(e){e.destroy()})),this._profileRenders=[],this._s3mInstanceCollection._profile=!1,this._s3mInstanceCollection._spatialQueryEnable=!1,this._s3mInstanceCollection.clampToObject=!1},r$d.prototype.addProfilePlane=function(e){},r$d.prototype.addProfileCylinder=function(e){},r$d.prototype.setClipGeometry=function(e){if(e.geoType!==P$U.GEOREGION3D&&e.geoType!==P$U.GEOCYLINDER&&e.geoType!==P$U.GEOBOX&&e.geoType!==P$U.GEOMODEL3D&&!(e instanceof N$A))return!1;var t=new _0x16da97(this._scene);t.geometry=e,t.positionMode=S$3(this._clippingType),this._s3mInstanceCollection._profileMode=1,t._beQueryCollection=this._s3mInstanceCollection,this._s3mInstanceCollection._spatialQueryEnable=!0,t._profile=!0,0==this._spatialQueryList.length&&this._scene._renderPipeline.addEventListener(k$g.BeforeExecuteCommands,r$d.prototype._updateTextures,this),this._spatialQueryList.push(t)},r$d.prototype.addModels=function(e){var t=this;e.map((function(e){var i=new H$6(e),n={id:i.id,primitive:t};i.profilePickId=t._context.createPickId(n),t._modelInfo[e.model]=i,t.requestImage(e.model,e.texture),t.requestModel(e.model,e.color,e.id),t._modelCount++}))},r$d.prototype.requestImage=function(e,t){if(e$2e(t)){var i=this;e$2e(this._textureAtlas)||(this._textureAtlas=new v$I({context:this._scene._context})),this._textureAtlas.addImage(t,t).then((function(t){i._modelInfo[e].textureAtlasID=t}))}},r$d.prototype.requestModel=function(e,t,i){var n=u$Z(i,(o=this)._dataIndex);if(e$2e(e)){var r=e.replace(/\?returnContent=.*$/,"");if(".json"===(r=r.substring(r.length-5).toLowerCase()))if(e.indexOf("spatialAnalysis-")>-1){var o=this;p$$({url:e,responseType:"arraybuffer",method:"POST",data:JSON.stringify({sourceDatasetFilter:{attributeFilter:""},isLonlat:!0,returnStream:!0}),headers:{"Content-type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then((function(i){var r=new DataView(i),a=0,s=r.getInt32(a,!0);a+=4;var l=a$K(new Uint8Array(i,a,s)),u=JSON.parse(l);a+=s;var c=r.getInt32(a,!0);a+=4;var h,d,f=[];for(h=0;h<c;h++)d=r.getInt32(a,!0),f.push(d),a+=4;var p=[];for(h=0;h<c;h++){if(0===(d=f[h]))p.push(null);else{var _=new Uint8Array(i,a,d);p.push(new Uint8Array(_).buffer)}a+=d}var m=u.geometries[0],g={};g.id=n,g.position=m.position,o._modelPosition.push(g),o._s3mInstanceCollection.add(e,{position:o$1p.fromDegrees(m.position.x,m.position.y,m.position.z),color:t,id:n,scale:new o$1p(m.scaleX,m.scaleY,m.scaleZ)},p[0],!1);var x=o._s3mInstanceCollection.getInstance(e,n),y=o._modelInfo[e].pickColor;y.x=x._pickColor.x,y.y=x._pickColor.y,y.z=x._pickColor.z,o._dataIndex++}))}else u$P(e).then((function(i){if(null!=i.geometry){var r=new Uint8Array(i.geometry.model),a={};a.id=n,a.position=i.geometry.position,o._modelPosition.push(a),o._s3mInstanceCollection.add(e,{position:o$1p.fromDegrees(i.geometry.position.x,i.geometry.position.y,i.geometry.position.z),color:t,id:n,scale:new o$1p(i.geometry.scaleX,i.geometry.scaleY,i.geometry.scaleZ),hpr:i$16.fromDegrees(-i.geometry.rotationZ,i.geometry.rotationX,i.geometry.rotationY)},r.buffer);var s=o._s3mInstanceCollection.getInstance(e,n),l=o._modelInfo[e].pickColor;l.x=s._pickColor.x,l.y=s._pickColor.y,l.z=s._pickColor.z,o._dataIndex++}}));else o$10(e).then((function(i){var r=new DataView(i),a=0,s=r.getInt32(a,!0);a+=4;var l=a$K(new Uint8Array(i,a,s)),u=JSON.parse(l).geometry;if(null!=u){var c={};c.id=n,c.position=u.position,o._modelPosition.push(c),a+=s;var h=r.getInt32(a,!0);a+=4;var d,f,p=[];for(d=0;d<h;d++)f=r.getInt32(a,!0),p.push(f),a+=4;var _=[];for(d=0;d<h;d++){if(0===(f=p[d]))_.push(null);else{var m=new Uint8Array(i,a,f);_.push(new Uint8Array(m).buffer)}a+=f}o._s3mInstanceCollection.add(e,{position:o$1p.fromDegrees(u.position.x,u.position.y,u.position.z),color:t,id:n,scale:new o$1p(u.scaleX,u.scaleY,u.scaleZ),hpr:i$16.fromDegrees(-u.rotationZ,u.rotationX,u.rotationY)},_[0],!1);var g=o._s3mInstanceCollection.getInstance(e,n);o._modelInfo[e].color=g._color;var x=o._modelInfo[e].pickColor;x.x=g._pickColor.x,x.y=g._pickColor.y,x.z=g._pickColor.z,o._dataIndex++}}))}},r$d.prototype.build=function(){this._s3mInstanceCollection._profile=!0,this._s3mInstanceCollection.clampToObject=!0;for(var e=0;e<this._profileRenders.length;e++){this._profileRenders[e]._build()}},r$d.prototype.setSelected=function(e){this._selectedProfileIDs=[],this._selectedProfileIDs.push(e)},r$d.prototype.releaseSelection=function(){this._selectedProfileIDs=[]},r$d.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},r$d.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},r$d.prototype.clear=function(){for(var e in e$2e(this._textureAtlas)&&(this._textureAtlas.destroy(),this._textureAtlas=null),this._profileRenders.map((function(e){e.destroy()})),this._profileRenders=[],this._s3mInstanceCollection._spatialQueryEnable=!1,this._spatialQueryList.map((function(e){e.destroy()})),this._spatialQueryList=[],this._scene._renderPipeline.removeEventListener(k$g.BeforeExecuteCommands,r$d.prototype._updateTextures,this),this._modelInfo)this._s3mInstanceCollection.removeCollection(e);this._s3mInstanceCollection.clampToObject=!1,this._modelInfo={},this._dataIndex=0},r$d.prototype.destroy=function(){return this.clear(),this._scene._analyst3D.remove(this._name,!0),this._scene.primitives.remove(this._s3mInstanceCollection),this._s3mInstanceCollection.destroy(),i$11(this)},r$d.prototype.update=function(e,t,i){this._spatialQueryList.map((function(n){n.update(e,t,i)}));var n=this._s3mInstanceCollection.clampToObject;K$4(this._modelInfo,this._s3mInstanceCollection),this._profileRenders.map((function(r){r.update(e,t,i,n)}))},r$d.prototype._updateTextures=function(){var e=this._scene._frameState,t=this;this._spatialQueryList.map((function(i){i._updateTextures(t._context,e)}))};var h$7=81;function G$6(){this.powers=new Array(h$7)}var _$7=[[.0014,0,.0065],[.0022,1e-4,.0105],[.0042,1e-4,.0201],[.0076,2e-4,.0362],[.0143,4e-4,.0679],[.0232,6e-4,.1102],[.0435,.0012,.2074],[.0776,.0022,.3713],[.1344,.004,.6456],[.2148,.0073,1.0391],[.2839,.0116,1.3856],[.3285,.0168,1.623],[.3483,.023,1.7471],[.3481,.0298,1.7826],[.3362,.038,1.7721],[.3187,.048,1.7441],[.2908,.06,1.6692],[.2511,.0739,1.5281],[.1954,.091,1.2876],[.1421,.1126,1.0419],[.0956,.139,.813],[.058,.1693,.6162],[.032,.208,.4652],[.0147,.2586,.3533],[.0049,.323,.272],[.0024,.4073,.2123],[.0093,.503,.1582],[.0291,.6082,.1117],[.0633,.71,.0782],[.1096,.7932,.0573],[.1655,.862,.0422],[.2257,.9149,.0298],[.2904,.954,.0203],[.3597,.9803,.0134],[.4334,.995,.0087],[.5121,1,.0057],[.5945,.995,.0039],[.6784,.9786,.0027],[.7621,.952,.0021],[.8425,.9154,.0018],[.9163,.87,.0017],[.9786,.8163,.0014],[1.0263,.757,.0011],[1.0567,.6949,.001],[1.0622,.631,8e-4],[1.0456,.5668,6e-4],[1.0026,.503,3e-4],[.9384,.4412,2e-4],[.8544,.381,2e-4],[.7514,.321,1e-4],[.6424,.265,0],[.5419,.217,0],[.4479,.175,0],[.3608,.1382,0],[.2835,.107,0],[.2187,.0816,0],[.1649,.061,0],[.1212,.0446,0],[.0874,.032,0],[.0636,.0232,0],[.0468,.017,0],[.0329,.0119,0],[.0227,.0082,0],[.0158,.0057,0],[.0114,.0041,0],[.0081,.0029,0],[.0058,.0021,0],[.0041,.0015,0],[.0029,.001,0],[.002,7e-4,0],[.0014,5e-4,0],[.001,4e-4,0],[7e-4,2e-4,0],[5e-4,2e-4,0],[3e-4,1e-4,0],[2e-4,1e-4,0],[2e-4,1e-4,0],[1e-4,0,0],[1e-4,0,0],[1e-4,0,0],[0,0,0]];G$6.prototype.toXYZ=function(){for(var e=new o$1p(0,0,0),t=1;t<h$7;t++){var i=t+0;i>h$7-1&&(i=h$7-1),i<1&&(i=1),e.x+=this.powers[i]*_$7[t][0],e.y+=this.powers[i]*_$7[t][1],e.z+=this.powers[i]*_$7[t][2]}return e};var t0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,.003,.004,.006,.007,.009,.011,.014,.017,.021,.025,.03,.035,.04,.044,.048,.055,.063,.071,.075,.08,.085,.091,.12,.12,.12,.12,.12,.12,.12,.119,.12,.12,.12,.1,.09,.09,.085,.08,.075,.07,.07,.065,.06,.055,.05,.045,.04,.035,.028,.25,.023,.02,.018,.016,.012,.012,.012,.012,.01,.01,.01,.008,.007,.006,.005,.003,0],L$8=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.15,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0],n$8=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.075,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.016,.015,.014,.013,.0125,1.8,2.3,2.5,2.3,1.8,.061,.003,8e-4,1e-4,1e-5,1e-5,1e-4,3e-4,6e-4];G$6.prototype.applyAtmosphericTransmittance=function(e,t,i,n,r,o){var a=.04608*i-.04586,s=e$2d.toDegrees(e);if(s<90){var l=1;l=1/(t+.50572*Math.pow(96.07995-s,-1.6364));l*=1;l*=Math.exp(-n/8435);for(var u=1.003454/Math.sqrt(t*t+.006908),c=Math.log(.35),h=c*(1.459+c*(.1595+.4129*c)),d=c*(.0783+c*(-.3824-.5874*c)),f=1-.5*Math.exp((h+d/1.8)/1.8),p=1-.5*Math.exp((h+d*t)*t),_=0;_<h$7;_++){var m,g=.38+.005*_,x=Math.exp(-l/(Math.pow(g,4)*(115.6406-1.3366/(g*g))));m=g<.5?1.0274:1.206;var y=a*Math.pow(2*g,-m),v=Math.exp(-y*l),$=2.5*n$8[_]*l,b=Math.exp(-.2385*$/Math.pow(1+20.07*$,.45)),T=Math.exp(.35*-t0[_]*u),C=Math.exp(-1.41*L$8[_]*l/Math.pow(1+118.3*L$8[_]*l,.45)),S=Math.log(g/.4),w=.945*Math.exp(-.095*S*S),E=Math.exp(-w*y*l),P=Math.exp((w-1)*y*l),A=Math.exp(-1.8/(g*g*g*g)*(115.6406-1.3366/(g*g))),L=Math.exp(-.4293*n$8[_]*2.5/Math.pow(1+36.126*n$8[_]*2.5,.45)),M=Math.exp(-2.538*L$8[_]/Math.pow(1+212.94*L$8[_],.45)),R=Math.exp(-w*y*1.8),O=Math.exp((w-1)*y*1.8),D=x*v*b*T*C;r.powers[_]=this.powers[_]*D;var I=this.powers[_]*T*b*C*t*P,F=1;g<=.45&&(F=Math.pow(g+.55,1.8));var B=L*M*O*(.5*(1-A)+(1-f)*A*(1-R)),N=I*(1-Math.pow(x,.95))/2,G=I*Math.pow(x,1.5)*(1-E)*p,z=.3*(r.powers[_]*t+N+G)*B/(1-.3*B);o.powers[_]=(N+G+z)*F,o.powers[_]<0&&(o.powers[_]=0)}}else for(_=0;_<h$7;_++)r.powers[_]=0,o.powers[_]=0};var a$4=[[.3,.305,.31,.315,.32,.325,.33,.335,.34,.345,.35,.36,.37,.38,.39,.4,.41,.42,.43,.44,.45,.46,.47,.48,.49,.5,.51,.52,.53,.54,.55,.57,.593,.61,.63,.656,.6676,.69,.71,.718,.7244,.74,.7525,.7575,.7625,.7675,.78,.8,.816,.8237,.8315,.84,.86,.88,.905,.915,.925,.93,.937,.948,.965,.98,.9935,1.04,1.07,1.1,1.12,1.13,1.145,1.161,1.17,1.2,1.24,1.27,1.29,1.32,1.35,1.395,1.4425,1.4625,1.477,1.497,1.52,1.539,1.558,1.578,1.592,1.61,1.63,1.646,1.678,1.74,1.8,1.86,1.92,1.96,1.985,2.005,2.035,2.065,2.1,2.148,2.198,2.27,2.36,2.45,2.5,2.6,2.7,2.8,2.9,3,3.1,3.2,3.3,3.4,3.5,3.6,3.7,3.8,3.9,4],[535.9,558.3,622,692.7,715.1,832.9,961.9,931.9,900.6,911.3,975.5,975.9,1119.9,1103.8,1033.8,1479.1,1701.3,1740.4,1587.2,1837,2005,2043,1987,2027,1896,1909,1927,1831,1891,1898,1892,1840,1768,1728,1658,1524,1531,1420,1399,1374,1373,1298,1269,1245,1223,1205,1183,1148,1091,1062,1038,1022,998.7,947.2,893.2,868.2,829.7,830.3,814,786.9,768.3,767,757.6,688.1,640.7,606.2,585.9,570.2,564.1,544.2,533.4,501.6,477.5,442.7,440,416.8,391.4,358.9,327.5,317.5,307.3,300.4,292.8,275.5,272.1,259.3,246.9,244,243.5,234.8,220.5,190.8,171.1,144.5,135.7,123,123.8,113,108.5,97.5,92.4,82.4,74.6,68.3,63.8,49.5,48.5,38.6,36.6,32,28.1,24.8,22.1,19.6,17.5,15.7,14.1,12.7,11.5,10.4,9.5,8.6]],i$9=81,p$4=5;function o$9(){G$6.call(this);for(var e=a$4[1].length,t=1,i=.38,n=0;n<i$9;n++){for(var r=i+.001*p$4;t<e-1&&a$4[0][t]<=r;)t++;this.powers[n]=a$4[1][t],i+=.001*p$4}}function a$3(){}function u$a(e){var t,i=Math.log(e);return t=i<=-3.94?-2.86:i>=-1.44?i-.395:Math.pow(.405*i+1.6,2.18)-2.86,Math.exp(t)}function n$7(e){var t,i=Math.log(e);return t=i<=-2.6?-.72:i>=1.9?i-1.255:Math.pow(.249*i+.65,2.7)-.72,Math.exp(t)}o$9.prototype=Object.create(G$6.prototype),o$9.prototype.constructor=G$6,a$3.Ldmax=100,a$3.LsavgC=100,a$3.LsavgR=100,a$3.k=1,a$3.mR=1,a$3.mC=1,a$3.disableToneMapping=!1,a$3.setSceneLogAvg=function(e,t){e<0&&(e=0),t<0&&(t=0),a$3.LsavgR=e/.8,a$3.LsavgC=t/.8,a$3.computeScaleFactors()},a$3.durandMapperXYZ=function(e){var t=a$3.k,i=a$3.mR,n=a$3.Ldmax,r=a$3.mC,o=-.702*e.x+1.039*e.y+.433*e.z;o<0&&(o=0);var a=new o$1p(.3*o,.3*o,.4*o),s=o$1p.multiplyByScalar(e,(1-t)*r,new o$1p),l=o$1p.multiplyByScalar(a,t*i,new o$1p),u=o$1p.add(s,l,new o$1p);e=o$1p.multiplyByScalar(u,1/n,e)},a$3.computeScaleFactors=function(){var e,t,i;a$3.Ldmax=100,e=a$3.Ldmax,t=a$3.LsavgR,i=a$3.LsavgC;var n=n$7(e);a$3.mR=n/u$a(t),a$3.mC=n/n$7(i);a$3.k=(100-.25*t)/(100+t),a$3.k<0&&(a$3.k=0)};var P$8=new p$1e(2.37067,-.90004,-.470634,-.513885,1.4253,.0885814,.00529818,-.0146949,1.0094);function l$a(){this._oneOverGammaHosek=1/2.4,this._T=3,this._lastSunT=0,this._lastSunZenith=0,this._lastMoonT=0,this._lastMoonZenith=0,this._lastMoonPhase=0,this._ephemeris=void 0,this._perezBlend=0,this._isothermalEffect=0,this._sunAboveHorizon=!1,this._sunSpectrum=new o$9,this._sunTransmittedLuminance=void 0,this._sunScatteredLuminance=void 0,this._sunTransmittedLuminanceSeaLevel=void 0,this._sunScatteredLuminanceSeaLevel=void 0,this._lunarSpectrum=new o$9,this._moonTransmittedLuminance=void 0,this._moonScatteredLuminance=void 0,this._moonTransmittedLuminanceSeaLevel=void 0,this._moonScatteredLuminanceSeaLevel=void 0,this._maxSkylightLuminance=1,this._monochromeAmbient=!0,this._lightPollution=0,this._nightSkyScale=1,this._skyLight=new e$1X,this._twilightLuminance=[],k$5(this),this._lightingChanged=!1}function k$5(e){e._twilightLuminance={},e._twilightLuminance[5]=2200,e._twilightLuminance[4]=1800,e._twilightLuminance[3]=1400,e._twilightLuminance[2]=1200,e._twilightLuminance[1]=710,e._twilightLuminance[0]=400,e._twilightLuminance[-1]=190,e._twilightLuminance[-2]=77,e._twilightLuminance[-3]=28,e._twilightLuminance[-4]=9.4,e._twilightLuminance[-5]=2.9,e._twilightLuminance[-6]=.9,e._twilightLuminance[-7]=.3,e._twilightLuminance[-8]=.11,e._twilightLuminance[-9]=.047,e._twilightLuminance[-10]=.021,e._twilightLuminance[-11]=.0092,e._twilightLuminance[-12]=.0031,e._twilightLuminance[-13]=.0022,e._twilightLuminance[-14]=.0019,e._twilightLuminance[-15]=.0018,e._twilightLuminance[-16]=.0018;for(var t in e._twilightLuminance){var i=e._twilightLuminance[t];e._twilightLuminance[t]=i/Math.PI*.1}}var p$3=new o$1p;l$a.prototype.getToneMappedSkyLight=function(){return this._skyLight};var O$5=new o$1p;function e$2(){this.year=0,this.month=0,this.day=0,this.hours=0,this.minutes=0,this.seconds=0,this.observingDST=!0,this.zoneCorrection=8}function i$8(){this._latitude=0,this._longitude=0,this._altitude=0}function a$2(){this._time=void 0,this._lastTime=new e$2,this._lastLocation=new i$8,this._T=0,this._tuncorr=0,this._epochDays=0,this._sunEclipticLongitude=0,this._sunEcl=new o$1p,this._moonEcl=new o$1p,this._sunEq=new o$1p,this._moonEq=new o$1p,this._eclipticToEquatorial=new p$1e,this._equatorialToGeographic=new p$1e,this._sunGeo=new o$1p,this._moonGeo=new o$1p,this._sunHoriz=new o$1p,this._moonHoriz=new o$1p,this._eclipticToHorizon=new p$1e,this._equatorialToHorizon=new p$1e,this._geographicToEquatorial=new p$1e,this._horizonToEquatorial=new p$1e,this._horizonToGeographic=new p$1e,this._geographicToHorizon=new p$1e,this._horizonToEcliptic=new p$1e,this._moonPhase=void 0,this._moonPhaseAngle=void 0,this._moonDistance=void 0,this._precession=new p$1e,this._forceSunHoriz=!1,this._forceMoonHoriz=!1,this._geoZUp=!0,this._primeMeridianZ=!1}function m$8(e,t,i){var n=new o$1p;return n.x=e*Math.cos(i)*Math.cos(t),n.y=e*Math.sin(i)*Math.cos(t),n.z=e*Math.sin(t),n}function T$8(e){for(;e>2*Math.PI;)e-=2*Math.PI;for(;e<0;)e+=2*Math.PI;return e}function E$5(e){var t=new o$1p;return t.x=e.y,t.y=e.z,t.z=e.x,t}function z$4(e){var t=new o$1p;return t.x=e.z,t.y=e.x,t.z=e.y,t}function q$4(e){var t,i;if(e>e$2d.toRadians(85))t=0;else{if(i=Math.tan(e),e>=e$2d.toRadians(5))t=58.1/i-.07/Math.pow(i,3)+86e-6/Math.pow(i,5);else if(e>=e$2d.toRadians(-.575)){var n=e$2d.toDegrees(e);t=1735+n*(n*(103.4+n*(.711*n-12.79))-518.2)}else t=-20.774/i;t/=3600}return e+e$2d.toRadians(t)}l$a.prototype._computeSun=function(e){var t=this._ephemeris.getSunPositionHorizon(),i=(t=o$1p.normalize(t,O$5)).y;if(this._lastSunT!==this._T||this._lastSunZenith!==i){this._lastSunT=this._T,this._lastSunZenith=i;var n=e$2d.toDegrees(Math.asin(t.y));n+=0,this._perezBlend=n>1?0:n<0?1:1-n;var r=Math.acos(i)-e$2d.toRadians(0),o=e$2d.toRadians(1),a=new G$6,s=new G$6,l=new G$6,u=new G$6;if(.5*Math.PI-r>o){this._sunAboveHorizon=!0,this._sunSpectrum.applyAtmosphericTransmittance(r,i,this._T,e,a,s),this._sunTransmittedLuminance=a.toXYZ(),this._sunScatteredLuminance=s.toXYZ(),e<1e3?(this._sunTransmittedLuminanceSeaLevel=this._sunTransmittedLuminance,this._sunScatteredLuminanceSeaLevel=this._sunScatteredLuminance):(this._sunSpectrum.applyAtmosphericTransmittance(r,i,this._T,0,l,u),this._sunTransmittedLuminanceSeaLevel=l.toXYZ(),this._sunScatteredLuminanceSeaLevel=u.toXYZ());for(var c=r/(.5*Math.PI),h=0;h<6;h++)c*=c;this._sunScatteredLuminance.x*=1+0*c,this._sunScatteredLuminance.y*=1+0*c,this._sunScatteredLuminance.z*=1+0*c,this._sunScatteredLuminanceSeaLevel.x*=1+0*c,this._sunScatteredLuminanceSeaLevel.y*=1+0*c,this._sunScatteredLuminanceSeaLevel.z*=1+0*c}else{this._sunAboveHorizon=!1;var d=Math.floor(n),f=Math.ceil(n);c=n-d;e$2e(this._twilightLuminance[d])||(this._twilightLuminance[d]=0),e$2e(this._twilightLuminance[f])||(this._twilightLuminance[f]=0);var p=this._twilightLuminance[d],_=this._twilightLuminance[f];r=.5*Math.PI-o;this._sunSpectrum.applyAtmosphericTransmittance(r,Math.cos(r),this._T,e,a,s),this._sunTransmittedLuminance=a.toXYZ(),this._sunScatteredLuminance=s.toXYZ(),e<1e3?(this._sunTransmittedLuminanceSeaLevel=this._sunTransmittedLuminance,this._sunScatteredLuminanceSeaLevel=this._sunScatteredLuminance):(this._sunSpectrum.applyAtmosphericTransmittance(r,Math.cos(r),this._T,0,l,u),this._sunTransmittedLuminanceSeaLevel=l.toXYZ(),this._sunScatteredLuminanceSeaLevel=u.toXYZ());var m=(1-c)*p+c*_,g=.25,x=m/g*.25,y=m/g*.5;(c=-n/2)>1&&(c=1),c<0&&(c=0);var v=0*m*(c*=c)+(1-c);o$1p.multiplyByScalar(this._sunTransmittedLuminance,v,this._sunTransmittedLuminance),this._sunScatteredLuminance.x=x*c+this._sunScatteredLuminance.x*(1-c),this._sunScatteredLuminance.y=m*c+this._sunScatteredLuminance.y*(1-c),this._sunScatteredLuminance.z=y*c+this._sunScatteredLuminance.z*(1-c),v=0*m*c+(1-c),o$1p.multiplyByScalar(this._sunScatteredLuminanceSeaLevel,v,this._sunScatteredLuminanceSeaLevel),this._sunScatteredLuminanceSeaLevel.x=x*c+this._sunScatteredLuminanceSeaLevel.x*(1-c),this._sunScatteredLuminanceSeaLevel.y=m*c+this._sunScatteredLuminanceSeaLevel.y*(1-c),this._sunScatteredLuminanceSeaLevel.z=y*c+this._sunScatteredLuminanceSeaLevel.z*(1-c),this._sunScatteredLuminance.x*=1,this._sunScatteredLuminance.y*=1,this._sunScatteredLuminance.z*=1,this._sunScatteredLuminanceSeaLevel.x*=1,this._sunScatteredLuminanceSeaLevel.y*=1,this._sunScatteredLuminanceSeaLevel.z*=1}}},l$a.prototype._moonLuminance=function(){var e=this._ephemeris.getMoonPositionHorizon();o$1p.clone(e,p$3),o$1p.normalize(p$3,p$3);var t=e$2d.toDegrees(Math.asin(p$3.z)),i=1738100,n=1e3*this._ephemeris.getMoonDistanceKM(),r=.001,o=this._ephemeris.getMoonPhaseAngle();o<r&&(o=r);for(var a=Math.PI-o;a<0;)a+=2*Math.PI;a<r&&(a=r);var s=683*(.144*i*i/(3*n*n)*(.095*(1-Math.sin(o/2)*Math.tan(o/2)*Math.log(1/Math.tan(o/4)))+1905*(1-Math.sin(a/2)*Math.tan(a/2)*Math.log(1/Math.tan(a/4)))))/3.14;return s*=.001,t<0&&(s*=Math.exp(1.1247*t)),s},l$a.prototype._computeMoon=function(e){var t=this._ephemeris.getMoonPositionHorizon();o$1p.clone(t,p$3),o$1p.normalize(p$3,p$3);var i=p$3.z,n=Math.acos(i),r=this._ephemeris.getMoonPhase();if(this._lastMoonT!==this._T||this._lastMoonZenith!==n||this._lastMoonPhase!==r){this._lastMoonT=this._T,this._lastMoonZenith=n,this._lastMoonPhase=r,this._lightingChanged=!0;var o=new G$6,a=new G$6;this._lunarSpectrum.applyAtmosphericTransmittance(n,i,this._T,e,o,a);var s=this._moonLuminance();this._moonTransmittedLuminance=o$1p.multiplyByScalar(o.toXYZ(),s,new o$1p),this._moonScatteredLuminance=o$1p.multiplyByScalar(a.toXYZ(),s,new o$1p);var l=new G$6,u=new G$6;this._lunarSpectrum.applyAtmosphericTransmittance(n,i,this._T,0,l,u),this._moonTransmittedLuminance=o$1p.multiplyByScalar(o.toXYZ(),s,new o$1p),this._moonScatteredLuminance=o$1p.multiplyByScalar(a.toXYZ(),s,new o$1p),this._moonTransmittedLuminanceSeaLevel=o$1p.multiplyByScalar(l.toXYZ(),s,new o$1p),this._moonScatteredLuminanceSeaLevel=o$1p.multiplyByScalar(u.toXYZ(),s,new o$1p)}},l$a.prototype.getSunColor=function(){var e=o$1p.multiplyByScalar(this._sunTransmittedLuminance,1,new o$1p);a$3.durandMapperXYZ(e);var t=p$1e.multiplyByVector(P$8,e,new o$1p);return this._applyGamma(t),new e$1X(t.x,t.y,t.z)},l$a.prototype._updateZenith=function(e){var t=this._ephemeris.getSunPositionHorizon();o$1p.normalize(t,t),new o$1p(0,1,0);this._isothermalEffect=Math.exp(-e/8435),this._isothermalEffect<0&&(this._isothermalEffect=0),this._isothermalEffect>1&&(this._isothermalEffect=1)},l$a.prototype._nightSkyLuminance=function(){return 683*(this._lightPollution+2e-6+12e-8+3e-8+51e-9+9.1e-9+9.1e-10)/3.14*this._isothermalEffect*.001*this._nightSkyScale},l$a.prototype._applyGamma=function(e){var t=0;e.x<t&&(t=e.x),e.y<t&&(t=e.y),e.z<t&&(t=e.z),t=-t,e.x=e.x+t,e.y=e.y+t,e.z=e.z+t;var i=e.x;e.y>i&&(i=e.y),e.z>i&&(i=e.z),i>1&&(e.x/=i,e.y/=i,e.z/=i);var n=this._oneOverGammaHosek;e.x>0&&(e.x=Math.pow(e.x,n)),e.y>0&&(e.y=Math.pow(e.y,n)),e.z>0&&(e.z=Math.pow(e.z,n))},l$a.prototype._computeLogAvg=function(){var e,t,i=new o$1p;o$1p.add(this._sunScatteredLuminance,this._moonScatteredLuminance,i),o$1p.add(i,this._moonTransmittedLuminance,i),i.y+=1e3*this._nightSkyLuminance(),e=i.y,t=-.702*i.x+1.039*i.y+.433*i.z,a$3.setSceneLogAvg(t,e)},l$a.prototype._computeToneMappedSkyLight=function(){var e=o$1p.multiplyByScalar(this._sunScatteredLuminance,.5,new o$1p);e.y+=1e3*this._nightSkyLuminance();var t=o$1p.multiplyByScalar(this._moonScatteredLuminance,.5,new o$1p),i=o$1p.multiplyByScalar(this._sunScatteredLuminanceSeaLevel,.5,new o$1p);i.y+=1e3*this._nightSkyLuminance();var n=o$1p.multiplyByScalar(this._moonScatteredLuminanceSeaLevel,.5,new o$1p);a$3.durandMapperXYZ(e),a$3.durandMapperXYZ(t),a$3.durandMapperXYZ(i),a$3.durandMapperXYZ(n);var r=o$1p.add(e,t,new o$1p);r.x>this._maxSkylightLuminance&&(r.x=this._maxSkylightLuminance),r.y>this._maxSkylightLuminance&&(r.y=this._maxSkylightLuminance),r.z>this._maxSkylightLuminance&&(r.z=this._maxSkylightLuminance);var o=p$1e.multiplyByVector(P$8,r,new o$1p);this._monochromeAmbient&&(o.x=o.z=o.y),this._applyGamma(o),this._skyLight=new e$1X(o.x,o.y,o.z),(r=o$1p.add(i,n,r)).x>this._maxSkylightLuminance&&(r.x=this._maxSkylightLuminance),r.y>this._maxSkylightLuminance&&(r.y=this._maxSkylightLuminance),r.z>this._maxSkylightLuminance&&(r.z=this._maxSkylightLuminance),o=p$1e.multiplyByVector(P$8,r,new o$1p),this._monochromeAmbient&&(o.x=o.z=o.y),this._applyGamma(o),this._skyLightSeaLevel=new e$1X(o.x,o.y,o.z)},l$a.prototype.setEphemeris=function(e,t){this._ephemeris=e,this._lightingChanged=!1,this._computeSun(t),this._computeMoon(t),this._updateZenith(t),this._computeLogAvg(),this._computeToneMappedSkyLight()},e$2.prototype.setTimeZone=function(e){e>=-12&&e<=12&&(this.zoneCorrection=e)},e$2.prototype.getEpoch2000Centuries=function(e){var t,i,n,r,o=this.hours+(this.minutes+this.seconds/60)/60;this.observingDST&&(o-=1),o-=this.zoneCorrection,n=this.day+o/24,this.month<3?(t=this.year-1,i=this.month+12):(t=this.year,i=this.month),r=1720996.5-Math.floor(t/100)+Math.floor(t/400)+Math.floor(365.25*t)+Math.floor(30.6001*(i+1));var a=(r-=2451545)+n;return e&&(a+=65/60/60/24),a/=36525},e$2.prototype.getEpoch1990Days=function(e){var t,i,n,r,o=this.hours+(this.minutes+this.seconds/60)/60;this.observingDST&&(o-=1),o-=this.zoneCorrection,r=this.day+o/24,this.month<3?(t=this.year-1,i=this.month+12):(t=this.year,i=this.month),n=1720996.5-Math.floor(t/100)+Math.floor(t/400)+Math.floor(365.25*t)+Math.floor(30.6001*(i+1));var a=(n-=2447891.5)+r;return e&&(a+=65/60/60/24),a},e$2.prototype.clone=function(e){return e.year=this.year,e.month=this.month,e.day=this.day,e.hours=this.hours,e.minutes=this.minutes,e.seconds=this.seconds,e},Object.defineProperties(i$8.prototype,{longitude:{get:function(){return this._longitude},set:function(e){e>=-180&&e<=180&&(this._longitude=e)}},latitude:{get:function(){return this._latitude},set:function(e){e>=-90&&e<=90&&(this._latitude=e)}},altitude:{get:function(){return this._altitude},set:function(e){this._altitude=e}}}),i$8.prototype.clone=function(e){return e._latitude=this.latitude,e._longitude=this.longitude,e._altitude=this.altitude,e},a$2.prototype.getSunPositionGeographic=function(){return this._sunGeo},a$2.prototype.getSunPositionHorizon=function(){return this._sunHoriz},a$2.prototype.computeMoonPosition=function(){var e=this._T,t=6.23+628.3019*e,i=1.628+8433.4663*e,n=2.3554+8328.6911*e,r=5.1985+7771.3772*e,o=3.8104+8399.7091*e+.1098*Math.sin(n)+.0222*Math.sin(2*r-n)+.0115*Math.sin(2*r)+.0037*Math.sin(2*n)-.0032*Math.sin(t)-.002*Math.sin(2*i)+.001*Math.sin(2*r-2*n)+.001*Math.sin(2*r-t-n)+9e-4*Math.sin(2*r+n)+8e-4*Math.sin(2*r-t)+7e-4*Math.sin(n-t)-6e-4*Math.sin(r)-5e-4*Math.sin(t+n),a=.0895*Math.sin(i)+.0049*Math.sin(n+i)+.0048*Math.sin(n-i)+.003*Math.sin(2*r-i)+.001*Math.sin(2*r+i-n)+8e-4*Math.sin(2*r-i-n)+6e-4*Math.sin(2*r+i),s=1/(.016593+904e-6*Math.cos(n)+166e-6*Math.cos(2*r-n)+137e-6*Math.cos(2*r)+49e-6*Math.cos(2*n)+15e-6*Math.cos(2*r+n)+9e-6*Math.cos(2*r-t));this._moonEcl=m$8(s,a,o),this._moonEq=p$1e.multiplyByVector(this._eclipticToEquatorial,this._moonEcl,this._moonEq),this._moonGeo=p$1e.multiplyByVector(this._equatorialToGeographic,this._moonEq,this._moonGeo),this._moonHoriz=p$1e.multiplyByVector(this._eclipticToHorizon,this._moonEcl,new o$1p),this._moonDistance=6378.137*o$1p.distance(this._moonHoriz,new o$1p(1,0,0)),o=T$8(o),this._sunEclipticLongitude=T$8(this._sunEclipticLongitude),this._moonPhaseAngle=o-this._sunEclipticLongitude,this._moonPhaseAngle=T$8(this._moonPhaseAngle),this._moonPhase=.5*(1-Math.cos(this._moonPhaseAngle))};var u$9=new o$1p;function G$5(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=1,t[3]=0,t[6]=0,t[1]=0,t[4]=n,t[7]=i,t[2]=0,t[5]=-i,t[8]=n}function v$6(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=n,t[3]=0,t[6]=-i,t[1]=0,t[4]=1,t[7]=0,t[2]=i,t[5]=0,t[8]=n}function f$9(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=n,t[3]=i,t[6]=0,t[1]=-i,t[4]=n,t[7]=0,t[2]=0,t[5]=0,t[8]=1}a$2.prototype.computeSunPosition=function(){var e=this._T,t=6.24+628.302*e,i=4.895048+628.331951*e+(.033417-84e-6*e)*Math.sin(t)+351e-6*Math.sin(2*t),n=1.00014-(.016708-42e-6*e)*Math.cos(t)-141e-6*Math.cos(2*t);if(this._sunEclipticLongitude=i,this._sunEcl=m$8(n,0,i),this._sunEq=p$1e.multiplyByVector(this._eclipticToEquatorial,this._sunEcl,this._sunEq),u$9=p$1e.multiplyByVector(this._equatorialToGeographic,this._sunEq,u$9),this._geoZUp?(this._sunGeo.x=u$9.x,this._sunGeo.y=u$9.y,this._sunGeo.z=u$9.z):this._primeMeridianZ?(this._sunGeo.x=u$9.y,this._sunGeo.y=u$9.z,this._sunGeo.z=u$9.x):(this._sunGeo.x=u$9.x,this._sunGeo.y=u$9.z,this._sunGeo.z=-u$9.y),this._forceSunHoriz)this._sunHoriz.x=sin(forcedSunAzimuth)*cos(forcedSunAltitude),this._sunHoriz.z=-cos(forcedSunAzimuth)*cos(forcedSunAltitude),this._sunHoriz.y=sin(forcedSunAltitude),this._sunHoriz.Normalize(),this._geoZUp?this._sunGeo=horizonToGeographic*z$4(sunHoriz):this._sunGeo=E$5(horizonToGeographic*z$4(sunHoriz)),this._sunEcl=horizonToEcliptic*z$4(sunHoriz),this._sunEq=horizonToEquatorial*z$4(sunHoriz);else{var r=new o$1p;r=p$1e.multiplyByVector(this._eclipticToHorizon,this._sunEcl,r),this._sunHoriz=E$5(r)}var o=o$1p.normalize(this._sunHoriz,new o$1p),a=o$1p.distance(this._sunHoriz,o$1p.ZERO),s=Math.asin(o.y);s=q$4(s),this._sunHoriz.y=a*Math.sin(s)},a$2.prototype.getSunPositionHorizon=function(){return this._sunHoriz},a$2.prototype.getMoonPositionHorizon=function(){return this._moonHoriz},a$2.prototype.getMoonPhase=function(){return this._moonPhase},a$2.prototype.getMoonDistanceKM=function(){return this._moonDistance},a$2.prototype.getMoonPhaseAngle=function(){return this._moonPhaseAngle};var M$5=new p$1e,g$d=new p$1e,y$7=new p$1e;function n$6(){this._ambientColor=new e$1X,this._sunColor=new e$1X,this._sky=new l$a,this._ephemeris=new a$2,this._localTime=new e$2,this._location=new i$8,this._atmosphereHeight=1e5,this._renderError=new o$1h,this._basis3=new p$1e,this._invBasis3=new p$1e,this._upVector=new o$1p(0,0,1),this._rightVector=new o$1p(-1,0,0),this._sceneMode=C$14.SCENE3D}a$2.prototype.update=function(e,t){var i=!1;if(e!==this._lastTime&&(i=!0,this._lastTime=e.clone(this._lastTime)),t!==this._lastLocation&&(i=!0,this._lastLocation=t.clone(this._lastLocation)),i){var n=this._T=e.getEpoch2000Centuries(!0);this._tuncorr=e.getEpoch2000Centuries(!1),this._epochDays=e.getEpoch1990Days(!1),f$9(.01118*n,M$5),v$6(-.00972*n,g$d),f$9(.01118*n,y$7);var r=p$1e.multiply(M$5,g$d,new p$1e);this._precession=p$1e.multiply(r,y$7,this._precession);var o=4.894961+230121.675315*this._tuncorr,a=o+e$2d.toRadians(t.longitude),s=e$2d.toRadians(t.latitude),l=.409093-227e-6*this._T;v$6(s-Math.PI/2,g$d),f$9(-a,y$7),G$5(l,M$5),r=p$1e.multiply(g$d,y$7,r),p$1e.multiply(r,this._precession,this._equatorialToHorizon),p$1e.multiply(r,M$5,this._eclipticToHorizon),p$1e.clone(M$5,this._eclipticToEquatorial),f$9(-o,this._equatorialToGeographic),p$1e.transpose(this._equatorialToGeographic,this._geographicToEquatorial),p$1e.transpose(this._equatorialToHorizon,this._horizonToEquatorial),p$1e.multiply(this._equatorialToGeographic,this._horizonToEquatorial,this._horizonToGeographic),p$1e.multiply(this._equatorialToHorizon,this._geographicToEquatorial,this._geographicToHorizon),p$1e.inverse(this._eclipticToHorizon,this._horizonToEcliptic),this.computeSunPosition(),this.computeMoonPosition()}};var T$7=new e$1X(1,.96,.94,1);function u$8(e){var t=0;e.red<t&&(t=e.red),e.green<t&&(t=e.green),e.blue<t&&(t=e.blue),t=-t,e.red+=t,e.green+=t,e.blue+=t;var i=e.red;e.green>i&&(i=e.green),e.blue>i&&(i=e.blue),i>1&&(e.red/=i,e.green/=i,e.blue/=i),e.red<0&&(e.red=0),e.green<0&&(e.green=0),e.blue<0&&(e.blue=0),e.a<0&&(e.a=0)}n$6.prototype._interpolate=function(e,t){var i=(this._atmosphereHeight+.5*this._atmosphereHeight-this._location.altitude)/(.5*this._atmosphereHeight);return i>1&&(i=1),i<0&&(i=0),e$1X.lerp(e,t,i,new e$1X)},n$6.prototype.getAmbientColor=function(){var e=this._sky.getToneMappedSkyLight();return u$8(e),this._location.altitude>this._atmosphereHeight&&(e=this._interpolate(new e$1X(0,0,0,1),e)),e},n$6.prototype.getSunColor=function(){var e=this._sky.getSunColor();return u$8(e),this._location.altitude>this._atmosphereHeight&&(e=this._interpolate(T$7,e)),e},n$6.prototype.getSunPosition=function(){if(this._sceneMode==C$14.SCENE3D)return this.getSunPositionGeographic();var e=new o$1p;return e=o$1p.clone(this._ephemeris.getSunPositionHorizon(),e),o$1p.normalize(e,e),p$1e.multiplyByVector(this._basis3,e,e),e},n$6.prototype.getSunPositionGeographic=function(){return this._ephemeris.getSunPositionGeographic()},n$6.prototype._computeLocalTime=function(e){var t=a$15.toGregorianDate(e);this._localTime.year=t.year,this._localTime.month=t.month,this._localTime.day=t.day,this._localTime.hours=t.hour,this._localTime.minutes=t.minute,this._localTime.seconds=t.second,this._localTime.setTimeZone(0)},n$6.prototype.setLocation=function(e){this._location.longitude=e$2d.toDegrees(e.longitude),this._location.latitude=e$2d.toDegrees(e.latitude),this._location.altitude=e.height};var _$6=new o$1p,g$c=new o$1p,l$9=new o$1p,C$6;n$6.prototype.updateBasis=function(){this.getXYZ(_$6,g$c,l$9,this._upVector,this._rightVector,!0),this.getBases(this._basis3,this._invBasis3,_$6,g$c,l$9)},n$6.prototype.getXYZ=function(e,t,i,n,r){i=o$1p.cross(r,n,i),o$1p.normalize(i,i),e=o$1p.cross(n,i,e),o$1p.normalize(e,e),t=o$1p.cross(i,e,t),o$1p.normalize(t,t)},n$6.prototype.getBases=function(e,t,i,n,r){e[0]=i.x,e[3]=i.y,e[6]=i.z,e[1]=n.x,e[4]=n.y,e[7]=n.z,e[2]=r.x,e[5]=r.y,e[8]=r.z,t[0]=i.x,t[3]=n.x,t[6]=r.x,t[1]=i.y,t[4]=n.y,t[7]=r.y,t[2]=i.z,t[5]=n.z,t[8]=r.z},n$6.prototype.update=function(e,t){try{this._sceneMode=t,this._sceneMode==C$14.SCENE3D||this.updateBasis(),this.setLocation(e.camera.positionCartographic),this._computeLocalTime(e.time),this._ephemeris.update(this._localTime,this._location),this._sky.setEphemeris(this._ephemeris,this._location.altitude)}catch(e){this._renderError.raiseEvent(this,e)}};class F$6{constructor(e){this.context=e;const t=e._gl;this.maxBindingPoints=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS),this._uniformBuffers=new Array}createUniformBuffer(e){const t=this.context._gl,i=t.createBuffer();return t.bindBuffer(t.UNIFORM_BUFFER,i),e instanceof Float32Array?t.bufferData(t.UNIFORM_BUFFER,e,t.STATIC_DRAW):t.bufferData(t.UNIFORM_BUFFER,new Float32Array(e),t.STATIC_DRAW),t.bindBuffer(t.UNIFORM_BUFFER,null),i}updateUniformBuffer(e,t,i,n){const r=this.context._gl;r.bindBuffer(r.UNIFORM_BUFFER,e),void 0===i&&(i=0),void 0===n?t instanceof Float32Array?r.bufferSubData(r.UNIFORM_BUFFER,i,t):r.bufferSubData(r.UNIFORM_BUFFER,i,new Float32Array(t)):t instanceof Float32Array?r.bufferSubData(r.UNIFORM_BUFFER,0,t.subarray(i,i+n)):r.bufferSubData(r.UNIFORM_BUFFER,0,new Float32Array(t).subarray(i,i+n)),r.bindBuffer(r.UNIFORM_BUFFER,null)}bindUniformBufferBase(e,t,i){const n=this.context._gl;n.bindBufferBase(n.UNIFORM_BUFFER,t,e||null)}bindUniformBlock(e,t,i){const n=this.context._gl;var r=n.getUniformBlockIndex(e,t);4294967295!==r&&n.uniformBlockBinding(e,r,i)}_releaseBuffer(e){return this.context._gl.deleteBuffer(e),!0}}function ue$4(e,t){var i="WebGL Error: ";switch(t){case e.INVALID_ENUM:i+="INVALID_ENUM";break;case e.INVALID_VALUE:i+="INVALID_VALUE";break;case e.INVALID_OPERATION:i+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:i+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:i+="CONTEXT_LOST_WEBGL lost";break;default:i+="Unknown ("+t+")"}return i}function le$4(e,t,i,n){for(var r=ue$4(e,n)+": "+t.name+"(",o=0;o<i.length;++o)0!==o&&(r+=", "),r+=i[o];return r+=");"}function de$2(e,t,i){var n=e.getError();if(n!==e.NO_ERROR)throw new t$13(le$4(e,t,i,n))}function he$3(e,t,i){return{get:function(){var n=e[t];return i(e,"get: "+t,n),e[t]},set:function(n){e[t]=n,i(e,"set: "+t,n)}}}function ce$6(e,t){if(!e$2e(t))return e;function i(i){return function(){var n=i.apply(e,arguments);return t(e,i,arguments),n}}var n={};for(var r in e){var o=e[r];o instanceof Function?n[r]=i(o):Object.defineProperty(n,r,he$3(e,r,t))}return n}function u$7(e,t){for(var i=t.length,n=0;n<i;++n){var r=e.getExtension(t[n]);if(r)return r}}function g$b(e,t){var i=i$i.call(this,e,t)||this;if(typeof WebGLRenderingContext>"u")throw new t$13("The browser does not support WebGL.");var n=e.width*i._cols,r=e.height*i._rows;e.width=300,e.height=150,(t=u$Z(t=l$1f(t,!0),{})).allowTextureFilterAnisotropic=u$Z(t.allowTextureFilterAnisotropic,!0);var o=u$Z(t.webgl,{});o.alpha=u$Z(o.alpha,!1),o.stencil=u$Z(o.stencil,!0),o.antialias=u$Z(o.antialias,!0);var a,s=u$Z(t.contextType,Me$j.Webgl2)!==Me$j.Webgl1&&typeof WebGL2RenderingContext<"u",l=!1,u=t.getWebGLStub;if(e$2e(u))a=u(e,o);else if(s&&(e$2e(a=e.getContext("webgl2",o)||e.getContext("experimental-webgl2",o)||void 0)&&(l=!0)),e$2e(a)||(a=e.getContext("webgl",o)||e.getContext("experimental-webgl",o)||void 0),!e$2e(a))throw new t$13("The browser supports WebGL, but initialization failed.");i.webglOptions=o,e.width=n,e.height=r,i._originalGLContext=a,i._gl=a,i._webgl2=l,i.validateFramebuffer=!1,i.validateShaderProgram=!1,i.logShaderCompilation=!1,i._throwOnWebGLError=!1;var c=a;i._stencilBits=c.getParameter(c.STENCIL_BITS),e$1W._maximumCombinedTextureImageUnits=c.getParameter(c.MAX_COMBINED_TEXTURE_IMAGE_UNITS),e$1W._maximumCubeMapSize=c.getParameter(c.MAX_CUBE_MAP_TEXTURE_SIZE),e$1W._maximumFragmentUniformVectors=c.getParameter(c.MAX_FRAGMENT_UNIFORM_VECTORS),e$1W._maximumTextureImageUnits=c.getParameter(c.MAX_TEXTURE_IMAGE_UNITS),e$1W._maximumRenderbufferSize=c.getParameter(c.MAX_RENDERBUFFER_SIZE),e$1W._maximumTextureSize=c.getParameter(c.MAX_TEXTURE_SIZE),e$1W._maximumVaryingVectors=c.getParameter(c.MAX_VARYING_VECTORS),e$1W._maximumVertexAttributes=c.getParameter(c.MAX_VERTEX_ATTRIBS),e$1W._maximumVertexTextureImageUnits=c.getParameter(c.MAX_VERTEX_TEXTURE_IMAGE_UNITS),e$1W._maximumVertexUniformVectors=c.getParameter(c.MAX_VERTEX_UNIFORM_VECTORS);var h=c.getParameter(c.ALIASED_LINE_WIDTH_RANGE);e$1W._minimumAliasedLineWidth=h[0],e$1W._maximumAliasedLineWidth=h[1];var d=c.getParameter(c.ALIASED_POINT_SIZE_RANGE);e$1W._minimumAliasedPointSize=d[0],e$1W._maximumAliasedPointSize=d[1];var f=c.getParameter(c.MAX_VIEWPORT_DIMS);e$1W._maximumViewportWidth=f[0],e$1W._maximumViewportHeight=f[1];var p=c.getShaderPrecisionFormat(c.FRAGMENT_SHADER,c.HIGH_FLOAT);e$1W._highpFloatSupported=0!==p.precision;var _=c.getShaderPrecisionFormat(c.FRAGMENT_SHADER,c.HIGH_INT);e$1W._highpIntSupported=0!==_.rangeMax,l&&(e$1W._uniformBufferOffsetAlignment=c.getParameter(c.UNIFORM_BUFFER_OFFSET_ALIGNMENT),e$1W._maxUniformBufferBinding=c.getParameter(c.MAX_UNIFORM_BUFFER_BINDINGS),e$1W._maxArrayTextureLayers=c.getParameter(c.MAX_ARRAY_TEXTURE_LAYERS)),i._antialias=c.getContextAttributes().antialias,i._standardDerivatives=l||!!u$7(c,["OES_standard_derivatives"]),i._blendMinmax=!!u$7(c,["EXT_blend_minmax"]),i._elementIndexUint=!!u$7(c,["OES_element_index_uint"]),i._depthTexture=!!u$7(c,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),i._fragDepth=l||!!u$7(c,["EXT_frag_depth"]),i._debugShaders=u$7(c,["WEBGL_debug_shaders"]);var m=u$7(c,["EXT_shader_texture_lod"]);i._textureFloat=!!u$7(c,["OES_texture_float"]),i._textureHalfFloat=!!u$7(c,["OES_texture_half_float"]),i._textureFloatLinear=!!u$7(c,["OES_texture_float_linear"]),i._textureHalfFloatLinear=!!u$7(c,["OES_texture_half_float_linear"]),i._sysShaderDefines=[],e$2e(i._fragDepth)&&i._fragDepth&&i._sysShaderDefines.push("GL_EXT_frag_depth"),e$2e(m)&&i._sysShaderDefines.push("GL_EXT_shader_texture_lod"),l?(i._sysShaderDefines.push("WEBGL2"),i._sysShaderDefines.push("OUTPUT_DECLARATION")):e$2e(i._standardDerivatives)&&i._standardDerivatives&&i._sysShaderDefines.push("GL_OES_standard_derivatives"),i._colorBufferFloat=!!u$7(c,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),i._floatBlend=!!u$7(c,["EXT_float_blend"]),i._colorBufferHalfFloat=!!u$7(c,["EXT_color_buffer_half_float"]),i._s3tc=!!u$7(c,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),i._pvrtc=!!u$7(c,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),i._etc1=!!u$7(c,["WEBGL_compressed_texture_etc1"]),i._astc=!!u$7(c,["WEBGL_compressed_texture_astc"]),i._etc=!!u$7(c,["WEBG_compressed_texture_etc"]),i._bc7=!!u$7(c,["EXT_texture_compression_bptc"]),f$U.setKTX2SupportedFormats(i._s3tc,i._pvrtc,i._astc,i._etc,i._etc1,i._bc7);var g,x,y,v,$,b,T,C,S,w,E=t.allowTextureFilterAnisotropic?u$7(c,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;if(i._textureFilterAnisotropic=E,e$1W._maximumTextureFilterAnisotropy=e$2e(E)?c.getParameter(E.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1,l){var P=i;g=function(){return P._gl.createVertexArray()},x=function(e){P._gl.bindVertexArray(e)},y=function(e){P._gl.deleteVertexArray(e)},v=function(e,t,i,n,r){c.drawElementsInstanced(e,t,i,n,r)},$=function(e,t,i,n){c.drawArraysInstanced(e,t,i,n)},b=function(e,t){c.vertexAttribDivisor(e,t)},T=function(e){c.drawBuffers(e)}}else e$2e(C=u$7(c,["OES_vertex_array_object"]))&&(g=function(){return C.createVertexArrayOES()},x=function(e){C.bindVertexArrayOES(e)},y=function(e){C.deleteVertexArrayOES(e)}),e$2e(S=u$7(c,["ANGLE_instanced_arrays"]))&&(v=function(e,t,i,n,r){S.drawElementsInstancedANGLE(e,t,i,n,r)},$=function(e,t,i,n){S.drawArraysInstancedANGLE(e,t,i,n)},b=function(e,t){S.vertexAttribDivisorANGLE(e,t)}),e$2e(w=u$7(c,["WEBGL_draw_buffers"]))&&(T=function(e){w.drawBuffersWEBGL(e)});i.glCreateVertexArray=g,i.glBindVertexArray=x,i.glDeleteVertexArray=y,i.glDrawElementsInstanced=v,i.glDrawArraysInstanced=$,i.glVertexAttribDivisor=b,i.glDrawBuffers=T,i._vertexArrayObject=!!C,i._instancedArrays=!!S,i._drawBuffers=!!w,e$1W._maximumDrawBuffers=i.drawBuffers?c.getParameter(de$y.MAX_DRAW_BUFFERS):1,e$1W._maximumColorAttachments=i.drawBuffers?c.getParameter(de$y.MAX_COLOR_ATTACHMENTS):1,e$1W._maximumSamples=i._webgl2?c.getParameter(c.MAX_SAMPLES):1,d$1m.apply(c,i._defaultRenderState,i._defaultPassState);const A=c.getExtension("WEBGL_debug_renderer_info");if(A){var L=c.getParameter(A.UNMASKED_RENDERER_WEBGL);ti$4._autoSetMaxMemory(L)}i._floatTexSixPlaces=r$p(i),l&&(i._uniformBufferEngine=new F$6(i))}function me$4(e){if(e.validateFramebuffer){var t=e._gl,i=t.checkFramebufferStatus(t.FRAMEBUFFER);if(i!==t.FRAMEBUFFER_COMPLETE){var n;switch(i){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:n="Framebuffer is not complete. Incomplete attachment: at least one attachment point with a renderbuffer or texture attached has its attached object no longer in existence or has an attached image with a width or height of zero, or the color attachment point has a non-color-renderable image attached, or the depth attachment point has a non-depth-renderable image attached, or the stencil attachment point has a non-stencil-renderable image attached. Color-renderable formats include GL_RGBA4, GL_RGB5_A1, and GL_RGB565. GL_DEPTH_COMPONENT16 is the only depth-renderable format. GL_STENCIL_INDEX8 is the only stencil-renderable format.";break;case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:n="Framebuffer is not complete. Incomplete dimensions: not all attached images have the same width and height.";break;case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:n="Framebuffer is not complete. Missing attachment: no images are attached to the framebuffer.";break;case t.FRAMEBUFFER_UNSUPPORTED:n="Framebuffer is not complete. Unsupported: the combination of internal formats of the attached images violates an implementation-dependent set of restrictions."}throw new t$15(n)}}}function Z$6(e,t,i,n){var r=e._currentRenderState,o=e._currentPassState,a=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,d$1m.partialApply(e._gl,r,t,o,i,a,i.viewport,n)}function X$4(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;var i=C$6;if(e$2e(t))t._bind(),me$4(e),i=t._getActiveColorAttachments();else{var n=e._gl;n.bindFramebuffer(n.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(i)}}i$i&&(g$b.__proto__=i$i),g$b.prototype=Object.create(i$i&&i$i.prototype),g$b.prototype.constructor=i$i,Object.defineProperties(g$b.prototype,{webgl2:{get:function(){return this._webgl2}},webgpu:{get:function(){return!1}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return this._stencilBits>=8}},antialias:{get:function(){return this._antialias}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},floatTextureSixPlaces:{get:function(){return this._floatTexSixPlaces}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},etc1:{get:function(){return this._etc1}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=ce$6(this._originalGLContext,e?de$2:void 0)}},drawingBufferHeight:{get:function(){return Math.floor(this._gl.drawingBufferHeight)}},drawingBufferWidth:{get:function(){return Math.floor(this._gl.drawingBufferWidth)}},realDrawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight*this._rows}},realDrawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth*this._cols}}}),typeof WebGLRenderingContext<"u"&&(C$6=[de$y.BACK]);var ge$4=new t$W;function Ee$3(e,t,i,n,r){if(e$2e(t)&&r.depthTest&&r.depthTest.enabled&&!t.hasDepthAttachment)throw new t$15("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");X$4(e,t),Z$6(e,r,i,!1),n._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,n.maximumTextureUnitIndex)}function pe$3(e,t,i,n){var r=t._primitiveType,o=t._vertexArray,a=t._offset,s=t._count,l=t.instanceCount;if(!W$18.validate(r))throw new t$15("drawCommand.primitiveType is required and must be valid.");if(o$1q.defined("drawCommand.vertexArray",o),o$1q.typeOf.number.greaterThanOrEquals("drawCommand.offset",a,0),e$2e(s)&&o$1q.typeOf.number.greaterThanOrEquals("drawCommand.count",s,0),o$1q.typeOf.number.greaterThanOrEquals("drawCommand.instanceCount",l,0),l>0&&!e.instancedArrays)throw new t$15("Instanced arrays extension is not supported");e._us.model=u$Z(t._modelMatrix,p$1d.IDENTITY),e._us.useRelativeOrigin=t.useRelativeOrigin,i._setUniforms(n,e._us,e.validateShaderProgram,t),o._bind(),e$2e(t._transformFeedback)&&t._transformFeedback.begin();var u=o.indexBuffer;e$2e(u)?(a*=u.bytesPerIndex,s=u$Z(s,u.numberOfIndices),0===l?(r===W$18.TRIANGLES&&(e._trangleCount+=s/3),e._gl.drawElements(r,s,u.indexDatatype,a)):(r===W$18.TRIANGLES&&(e._trangleCount+=s/3*l),e.glDrawElementsInstanced(r,s,u.indexDatatype,a,l))):(s=u$Z(s,o.numberOfVertices),0===l?e._gl.drawArrays(r,a,s):e.glDrawArraysInstanced(r,a,s,l)),e$2e(t._transformFeedback)&&t._transformFeedback.end(),o._unBind()}g$b.prototype.clear=function(e,t){e=u$Z(e,ge$4),t=u$Z(t,this._defaultPassState);var i=this._gl,n=0,r=e.color,o=e.depth,a=e.stencil;e$2e(r)&&(e$1X.equals(this._clearColor,r)||(e$1X.clone(r,this._clearColor),i.clearColor(r.red,r.green,r.blue,r.alpha)),n|=i.COLOR_BUFFER_BIT),e$2e(o)&&(o!==this._clearDepth&&(this._clearDepth=o,i.clearDepth(o)),n|=i.DEPTH_BUFFER_BIT),e$2e(a)&&(a!==this._clearStencil&&(this._clearStencil=a,i.clearStencil(a)),n|=i.STENCIL_BUFFER_BIT),Z$6(this,u$Z(e.renderState,this._defaultRenderState),t,!0),X$4(this,u$Z(e.framebuffer,t.framebuffer)),i.clear(n)},g$b.prototype.draw=function(e,t,i,n){o$1q.defined("drawCommand",e),o$1q.defined("drawCommand.shaderProgram",e._shaderProgram),t=u$Z(t,this._defaultPassState);var r=u$Z(e._framebuffer,t.framebuffer),o=u$Z(e._renderState,this._defaultRenderState);i=u$Z(i,e._shaderProgram),n=u$Z(n,e._uniformMap),Ee$3(this,r,t,i,o),pe$3(this,e,i,n)},g$b.prototype.endFrame=function(){var e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);var t=C$6;this.drawBuffers&&this.glDrawBuffers(t);var i=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(var n=0;n<i;++n)e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)},g$b.prototype.readPixels=function(e){var t=this._gl;e=u$Z(e,u$Z.EMPTY_OBJECT);var i=Math.max(u$Z(e.x,0),0),n=Math.max(u$Z(e.y,0),0),r=u$Z(e.width,t.drawingBufferWidth),o=u$Z(e.height,t.drawingBufferHeight),a=e.framebuffer;o$1q.typeOf.number.greaterThan("readState.width",r,0),o$1q.typeOf.number.greaterThan("readState.height",o,0);var s=_$_.UNSIGNED_BYTE;e$2e(a)&&a.numberOfColorAttachments>0&&(s=a.getColorTexture(0).pixelDatatype);var l=V$12.createTypedArray(V$12.RGBA,s,r,o);return X$4(this,a),t.readPixels(i,n,r,o,V$12.RGBA,s,l),l},g$b.prototype.readPixelsAsync=function(e){var t=this.readPixels(e);return Promise.resolve(t)},g$b.prototype.resize=function(){},g$b.prototype.isDestroyed=function(){return!1},g$b.prototype.destroy=function(){return i$i.prototype.destroy.call(this),i$11(this)};var _0x2f3cb=(_0x2569cd=!0,function(e,t){var i=_0x2569cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2569cd=!1,i}),_0x194e6a=_0x2f3cb(void 0,(function(){return _0x194e6a.toString().search("(((.+)+)+)+$").toString().constructor(_0x194e6a).search("(((.+)+)+)+$")})),_0x2569cd;_0x194e6a();var A$a="\nattribute vec4 aPosition;\n//varying vec3 v_position;\n\nuniform Mesh {\n uniform mat4 uModelMatrix;\n};\n\nvoid main()\n{\n //v_position = aPosition.xyz + vec3(0.5);\n gl_Position = czm_viewProjection * uModelMatrix * vec4(aPosition.xyz, 1.0);\n czm_vertexLogDepth();\n}",_0x233838=(_0x522dc6=!0,function(e,t){var i=_0x522dc6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x522dc6=!1,i}),_0x30e652=_0x233838(void 0,(function(){return _0x30e652.toString().search("(((.+)+)+)+$").toString().constructor(_0x30e652).search("(((.+)+)+)+$")})),_0x522dc6;_0x30e652();var g$a="\n//varying vec3 v_position;\n\nvoid main()\n{\n gl_FragColor = vec4(1.0);\n czm_writeLogDepth();\n}";function t$9(e){this._context=e,this._showDebugOcclusionMesh=!0,this._prepareResources()}t$9.prototype.initDrawCommand=function(e){e.shaderProgram=this._shaderProgram,e.vertexArray=this._vertexArray,e.renderState=this._renderState},t$9.prototype._prepareResources=function(){for(var e=O$z.getUnitBox(),t=e.attributes.position.values,i=new Float32Array(t.length),n=0;n<t.length;n++)i[n]=t[n];var r=t$X.createVertexBuffer({context:this._context,typedArray:i,usage:A$18.STATIC_DRAW}),o=[],a={aPosition:0};o.push({name:"aPosition",index:a.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var s=t$X.createIndexBuffer({context:this._context,typedArray:e.indices,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});this._vertexArray=new c$13({context:this._context,attributes:o,indexBuffer:s});var l=new s$V({name:"OcclusionVp",sources:[A$a]});l.defines.push("LOG_DEPTH");var u=new s$V({name:"OcclusionFp",sources:[g$a]});u.defines.push("LOG_DEPTH"),this._shaderProgram=r$14.fromCache({name:"OcclusionMesh",context:this._context,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:a}),this._renderState=d$1m.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND,cull:{enabled:!0}})},t$9.prototype.dispose=function(){this._vertexArray&&!this._vertexArray.isDestroyed()&&this._vertexArray.destroy()};var _0x59dc22=(_0xe73772=!0,function(e,t){var i=_0xe73772?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe73772=!1,i}),_0x2cdf8e=_0x59dc22(void 0,(function(){return _0x2cdf8e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cdf8e).search("(((.+)+)+)+$")})),_0xe73772;_0x2cdf8e(),_0x265690.prototype.setAlphaConstants=function(e,t,i,n){this._alphaState.setAlphaBlendConstants(e,t,i,n)},_0x265690.prototype.setAlphaMode=function(e,t){if(void 0===t&&(t=!1),this._alphaMode!==e){switch(e){case _0x333f62.ALPHA_DISABLE:this._alphaState.alphaBlend=!1;break;case _0x333f62.ALPHA_PREMULTIPLIED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_PREMULTIPLIED_PORTERDUFF:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_COMBINE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ADD:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_SUBTRACT:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ZERO,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_MULTIPLY:this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_COLOR,this._gl.ZERO,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_MAXIMIZED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_INTERPOLATE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.CONSTANT_COLOR,this._gl.ONE_MINUS_CONSTANT_COLOR,this._gl.CONSTANT_ALPHA,this._gl.ONE_MINUS_CONSTANT_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_SCREENMODE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ONEONE_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ALPHATOCOLOR:this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_ALPHA,this._gl.ONE,this._gl.ZERO,this._gl.ZERO),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_REVERSEONEMINUS:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE_MINUS_DST_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_SRC_DSTONEMINUSSRCALPHA:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ONEONE_ONEZERO:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ONE,this._gl.ZERO),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_EXCLUSION:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_LAYER_ACCUMULATE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0}!t&&(this.depthCullingState.depthMask=e===_0x333f62.ALPHA_DISABLE),this._alphaMode=e}},_0x265690.prototype.getAlphaMode=function(){return this._alphaMode},_0x265690.prototype.setAlphaEquation=function(e){if(this._alphaEquation!==e){switch(e){case _0x333f62.ALPHA_EQUATION_ADD:this._alphaState.setAlphaEquationParameters(_0x333f62.GL_ALPHA_EQUATION_ADD,_0x333f62.GL_ALPHA_EQUATION_ADD);break;case _0x333f62.ALPHA_EQUATION_SUBSTRACT:this._alphaState.setAlphaEquationParameters(_0x333f62.GL_ALPHA_EQUATION_SUBTRACT,_0x333f62.GL_ALPHA_EQUATION_SUBTRACT);break;case _0x333f62.ALPHA_EQUATION_REVERSE_SUBTRACT:this._alphaState.setAlphaEquationParameters(_0x333f62.GL_ALPHA_EQUATION_REVERSE_SUBTRACT,_0x333f62.GL_ALPHA_EQUATION_REVERSE_SUBTRACT);break;case _0x333f62.ALPHA_EQUATION_MAX:this._alphaState.setAlphaEquationParameters(_0x333f62.GL_ALPHA_EQUATION_MAX,_0x333f62.GL_ALPHA_EQUATION_MAX);break;case _0x333f62.ALPHA_EQUATION_MIN:this._alphaState.setAlphaEquationParameters(_0x333f62.GL_ALPHA_EQUATION_MIN,_0x333f62.GL_ALPHA_EQUATION_MIN);break;case _0x333f62.ALPHA_EQUATION_DARKEN:this._alphaState.setAlphaEquationParameters(_0x333f62.GL_ALPHA_EQUATION_MIN,_0x333f62.GL_ALPHA_EQUATION_ADD)}this._alphaEquation=e}},_0x265690.prototype.getAlphaEquation=function(){return this._alphaEquation};var _0x2865de=(_0x2a78f1=!0,function(e,t){var i=_0x2a78f1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a78f1=!1,i}),_0x14a3d9=_0x2865de(void 0,(function(){return _0x14a3d9.toString().search("(((.+)+)+)+$").toString().constructor(_0x14a3d9).search("(((.+)+)+)+$")})),_0x2a78f1;_0x14a3d9(),_0x4cd9cc.prototype.setAlphaMode=function(e,t){if(void 0===t&&(t=!1),this._alphaMode!==e||!(e===_0x333f62.ALPHA_DISABLE&&!this._alphaState.alphaBlend||e!==_0x333f62.ALPHA_DISABLE&&this._alphaState.alphaBlend)){switch(e){case _0x333f62.ALPHA_DISABLE:this._alphaState.alphaBlend=!1;break;case _0x333f62.ALPHA_PREMULTIPLIED:this._alphaState.setAlphaBlendFunctionParameters(1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_PREMULTIPLIED_PORTERDUFF:this._alphaState.setAlphaBlendFunctionParameters(1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_COMBINE:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(1,1,0,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ADD:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA,1,0,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_SUBTRACT:this._alphaState.setAlphaBlendFunctionParameters(0,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,1,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_MULTIPLY:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_DST_COLOR,0,1,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_MAXIMIZED:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,1,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_INTERPOLATE:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_CONSTANT_COLOR,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR,_0x333f62.GL_ALPHA_FUNCTION_CONSTANT_ALPHA,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_SCREENMODE:this._alphaState.setAlphaBlendFunctionParameters(1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ONEONE_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(1,1,1,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ALPHATOCOLOR:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_DST_ALPHA,1,0,0),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_REVERSEONEMINUS:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_SRC_DSTONEMINUSSRCALPHA:this._alphaState.setAlphaBlendFunctionParameters(1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ONEONE_ONEZERO:this._alphaState.setAlphaBlendFunctionParameters(1,1,1,0),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_EXCLUSION:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,0,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_LAYER_ACCUMULATE:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0}!t&&(this.setDepthWrite(e===_0xf48096.ALPHA_DISABLE),this._cacheRenderPipeline.setDepthWriteEnabled(e===_0xf48096.ALPHA_DISABLE)),this._alphaMode=e,this._cacheRenderPipeline.setAlphaBlendEnabled(this._alphaState.alphaBlend),this._cacheRenderPipeline.setAlphaBlendFactors(this._alphaState._blendFunctionParameters,this._alphaState._blendEquationParameters)}},_0x4cd9cc.prototype.setAlphaEquation=function(e){_0xf48096.prototype.setAlphaEquation.call(this,e),this._cacheRenderPipeline.setAlphaBlendFactors(this._alphaState._blendFunctionParameters,this._alphaState._blendEquationParameters)};var _0x5781d3=(_0x113698=!0,function(e,t){var i=_0x113698?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x113698=!1,i}),_0x1ac2e4=_0x5781d3(void 0,(function(){return _0x1ac2e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ac2e4).search("(((.+)+)+)+$")})),_0x113698;_0x1ac2e4(),_0x4cd9cc.prototype._createDepthStencilCubeTexture=function(e,t){var i=new InternalTexture(this,InternalTextureSource.DepthStencil);i.isCube=!0;var n=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,samples:1},t);return i.format=n.generateStencil?_0x333f62.TEXTUREFORMAT_DEPTH24_STENCIL8:_0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT,this._setupDepthStencilTexture(i,e,n.generateStencil,n.bilinearFiltering,n.comparisonFunction,n.samples),this._textureHelper.createGPUTextureForInternalTexture(i),this._internalTexturesCache.push(i),i},_0x4cd9cc.prototype.createCubeTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=this;return void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=null),void 0===l&&(l=!1),void 0===u&&(u=0),void 0===c&&(c=0),void 0===h&&(h=null),void 0===d&&(d=!1),this.createCubeTextureBase(e,t,i,!!n,r,o,a,s,l,u,c,h,null,(function(e,t){var i=t,o=i[0].width,s=o;f._setCubeMapTextureParams(e,!n),e.format=null!=a?a:-1;var l=f._textureHelper.createGPUTextureForInternalTexture(e,o,s);f._textureHelper.updateCubeTextures(i,l.underlyingResource,o,s,l.format,!1,!1,0,0),!n&&f._generateMipmaps(e,f._uploadEncoder),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),r&&r()}),!!d)},_0x4cd9cc.prototype._setCubeMapTextureParams=function(e,t,i){e.samplingMode=t?_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE:_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE,e._cachedWrapU=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,e._cachedWrapV=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,i&&(e._maxLodLevel=i)};var _0x2fb003=(_0x787a90=!0,function(e,t){var i=_0x787a90?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x787a90=!1,i}),_0x348833=_0x2fb003(void 0,(function(){return _0x348833.toString().search("(((.+)+)+)+$").toString().constructor(_0x348833).search("(((.+)+)+)+$")})),_0x787a90;_0x348833(),_0x4cd9cc.prototype._debugPushGroup=function(e,t){this._options.enableGPUDebugMarkers&&(0===t||1===t?(0===t?this._renderEncoder:this._renderTargetEncoder).pushDebugGroup(e):this._currentRenderPass?this._currentRenderPass.pushDebugGroup(e):this._pendingDebugCommands.push(["push",e]))},_0x4cd9cc.prototype._debugPopGroup=function(e){this._options.enableGPUDebugMarkers&&(0===e||1===e?(0===e?this._renderEncoder:this._renderTargetEncoder).popDebugGroup():this._currentRenderPass?this._currentRenderPass.popDebugGroup():this._pendingDebugCommands.push(["pop",null]))},_0x4cd9cc.prototype._debugInsertMarker=function(e,t){this._options.enableGPUDebugMarkers&&(0===t||1===t?(0===t?this._renderEncoder:this._renderTargetEncoder).insertDebugMarker(e):this._currentRenderPass?this._currentRenderPass.insertDebugMarker(e):this._pendingDebugCommands.push(["insert",e]))},_0x4cd9cc.prototype._debugFlushPendingCommands=function(){for(var e=0;e<this._pendingDebugCommands.length;++e){var t=this._pendingDebugCommands[e],i=t[0],n=t[1];switch(i){case"push":this._debugPushGroup(n);break;case"pop":this._debugPopGroup();break;case"insert":this._debugInsertMarker(n)}}this._pendingDebugCommands.length=0};var _0x2d761c=(_0xe04421=!0,function(e,t){var i=_0xe04421?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe04421=!1,i}),_0x3a8482=_0x2d761c(void 0,(function(){return _0x3a8482.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a8482).search("(((.+)+)+)+$")})),_0xe04421;_0x3a8482(),_0x4cd9cc.prototype.updateDynamicIndexBuffer=function(e,t,i){void 0===i&&(i=0);var n,r=e;n=e.is32Bits?t instanceof Uint32Array?t:new Uint32Array(t):t instanceof Uint16Array?t:new Uint16Array(t),this._bufferManager.setSubData(r,i,n)},_0x4cd9cc.prototype.updateDynamicVertexBuffer=function(e,t,i,n){var r,o=e;void 0===i&&(i=0),void 0===n?n=(r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t).byteLength:r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t,this._bufferManager.setSubData(o,i,r,0,n)};var _0x3ad8fe=(_0x8d7bc4=!0,function(e,t){var i=_0x8d7bc4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8d7bc4=!1,i}),_0x14fe50=_0x3ad8fe(void 0,(function(){return _0x14fe50.toString().search("(((.+)+)+)+$").toString().constructor(_0x14fe50).search("(((.+)+)+)+$")})),_0x8d7bc4;_0x14fe50(),_0x4cd9cc.prototype.createDynamicTexture=function(e,t,i,n){var r=new InternalTexture(this,InternalTextureSource.Dynamic);return r.baseWidth=e,r.baseHeight=t,i&&(e=this.needPOTTextures?_0x265690.GetExponentOfTwo(e,this._caps.maxTextureSize):e,t=this.needPOTTextures?_0x265690.GetExponentOfTwo(t,this._caps.maxTextureSize):t),r.width=e,r.height=t,r.isReady=!1,r.generateMipMaps=i,r.samplingMode=n,this.updateTextureSamplingMode(n,r),this._internalTexturesCache.push(r),r},_0x4cd9cc.prototype.updateDynamicTexture=function(e,t,i,n,r,o,a){var s;if(void 0===n&&(n=!1),e){var l=t.width,u=t.height,c=e._hardwareTexture;!(null===(s=e._hardwareTexture)||void 0===s?void 0:s.underlyingResource)&&(c=this._textureHelper.createGPUTextureForInternalTexture(e,l,u)),this._textureHelper.updateTexture(t,e,l,u,e.depth,c.format,0,0,i,n,0,0,a),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder),e.isReady=!0}};var _0x4e438e=(_0x1d88bc=!0,function(e,t){var i=_0x1d88bc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d88bc=!1,i}),_0x314bf6=_0x4e438e(void 0,(function(){return _0x314bf6.toString().search("(((.+)+)+)+$").toString().constructor(_0x314bf6).search("(((.+)+)+)+$")})),_0x1d88bc;function _0x5049e5(e){return _0x5228e4$1.call(this,e)||this}_0x314bf6(),_0x5228e4$1&&(_0x5049e5.__proto__=_0x5228e4$1),_0x5049e5.prototype=Object.create(_0x5228e4$1&&_0x5228e4$1.prototype),_0x5049e5.prototype.constructor=_0x5228e4$1;var _0x2d0375=(_0x2ca0a5=!0,function(e,t){var i=_0x2ca0a5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ca0a5=!1,i}),_0x8ef12c=_0x2d0375(void 0,(function(){return _0x8ef12c.toString().search("(((.+)+)+)+$").toString().constructor(_0x8ef12c).search("(((.+)+)+)+$")})),_0x2ca0a5;_0x8ef12c(),_0x4cd9cc.prototype.createExternalTexture=function(e){return new _0x5049e5(e)},_0x4cd9cc.prototype.setExternalTexture=function(e,t){t?this._setInternalTexture(e,t):this._currentMaterialContext.setTexture(e,null)};var _0x213ee2=(_0x3d821a=!0,function(e,t){var i=_0x3d821a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3d821a=!1,i}),_0x1802d7=_0x213ee2(void 0,(function(){return _0x1802d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x1802d7).search("(((.+)+)+)+$")})),_0x3d821a;_0x1802d7(),_0x4cd9cc.prototype.unBindMultiColorAttachmentFramebuffer=function(e,t,i){void 0===t&&(t=!1),i&&i();var n=e._attachments.length;this._currentRenderPass&&this._currentRenderPass!==this._mainRenderPassWrapper.renderPass&&this._endRenderTargetRenderPass();for(var r=0;r<n;r++){var o=e.textures[r];o.generateMipMaps&&!t&&!o.isCube&&this._generateMipmaps(o)}this._currentRenderTarget=null,this._mrtAttachments=[],this._cacheRenderPipeline.setMRT([]),this._cacheRenderPipeline.setMRTAttachments(this._mrtAttachments),this._currentRenderPass=this._mainRenderPassWrapper.renderPass,this._setDepthTextureFormat(this._mainRenderPassWrapper),this._setColorFormat(this._mainRenderPassWrapper)},_0x4cd9cc.prototype.createMultipleRenderTarget=function(e,t,i){var n,r=!1,o=!0,a=!1,s=!1,l=_0x333f62.TEXTUREFORMAT_DEPTH16,u=1,c=_0x333f62.TEXTURETYPE_UNSIGNED_INT,h=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE,d=new Array,f=new Array,p=new Array,_=this._createHardwareRenderTargetWrapper(!0,!1,e);void 0!==t&&(r=void 0!==t.generateMipMaps&&t.generateMipMaps,o=void 0===t.generateDepthBuffer||t.generateDepthBuffer,a=void 0!==t.generateStencilBuffer&&t.generateStencilBuffer,s=void 0!==t.generateDepthTexture&&t.generateDepthTexture,u=t.textureCount||1,l=null!==(n=t.depthTextureFormat)&&void 0!==n?n:_0x333f62.TEXTUREFORMAT_DEPTH16,t.types&&(d=t.types),t.samplingModes&&(f=t.samplingModes),t.useSRGBBuffers&&(p=t.useSRGBBuffers));var m=e.width||e,g=e.height||e,x=null;(o||a||s)&&(x=_.createDepthStencilTexture(0,!1,a,1,l));var y=[],v=[],$=[];_._generateDepthBuffer=o,_._generateStencilBuffer=a,_._attachments=v,_._defaultAttachments=$;for(var b=0;b<u;b++){var T=f[b]||h,C=d[b]||c,S=p[b]||false;C!==_0x333f62.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?C===_0x333f62.TEXTURETYPE_HALF_FLOAT&&!this._caps.textureHalfFloatLinearFiltering&&(T=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE):T=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,C===_0x333f62.TEXTURETYPE_FLOAT&&!this._caps.textureFloat&&(C=_0x333f62.TEXTURETYPE_UNSIGNED_INT,_Misc_logger__WEBPACK_IMPORTED_MODULE_1__.Logger.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type"));var w=new InternalTexture(this,InternalTextureSource.MultiRenderTarget);y.push(w),v.push(b+1),$.push(i?b+1:0===b?1:0),w.baseWidth=m,w.baseHeight=g,w.width=m,w.height=g,w.isReady=!0,w.samples=1,w.generateMipMaps=r,w.samplingMode=T,w.type=C,w._cachedWrapU=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,w._cachedWrapV=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,w._useSRGBBuffer=S,this._internalTexturesCache.push(w),this._textureHelper.createGPUTextureForInternalTexture(w)}return x&&(x.incrementReferences(),y.push(x),this._internalTexturesCache.push(x)),_.setTextures(y),_},_0x4cd9cc.prototype.updateMultipleRenderTargetTextureSampleCount=function(e,t){if(!e||!e.textures||e.textures[0].samples===t)return t;var i=e.textures.length;if(0===i)return 1;t=Math.min(t,this.getCaps().maxMSAASamples);for(var n=0;n<i;++n){var r=e.textures[n];this._textureHelper.createMSAATexture(r,t),r.samples=t}return e._depthStencilTexture&&e._depthStencilTexture!==e.textures[e.textures.length-1]&&(this._textureHelper.createMSAATexture(e._depthStencilTexture,t),e._depthStencilTexture.samples=t),t},_0x4cd9cc.prototype.bindAttachments=function(e){0!==e.length&&this._currentRenderTarget&&(this._mrtAttachments=e,this._currentRenderPass&&this._cacheRenderPipeline.setMRTAttachments(e))},_0x4cd9cc.prototype.buildTextureLayout=function(e){for(var t=[],i=0;i<e.length;i++)e[i]?t.push(i+1):t.push(0);return t},_0x4cd9cc.prototype.restoreSingleAttachment=function(){},_0x4cd9cc.prototype.restoreSingleAttachmentForRenderTarget=function(){};var _0x4b6273=(_0x27d620=!0,function(e,t){var i=_0x27d620?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27d620=!1,i}),_0x3f0411=_0x4b6273(void 0,(function(){return _0x3f0411.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f0411).search("(((.+)+)+)+$")})),_0x27d620;_0x3f0411(),_0x4cd9cc.prototype.getGPUFrameTimeCounter=function(){return this._timestampQuery.gpuFrameTimeCounter},_0x4cd9cc.prototype.captureGPUFrameTime=function(e){this._timestampQuery.enable=e&&!!this._caps.timerQuery},_0x4cd9cc.prototype.createQuery=function(){return this._occlusionQuery.createQuery()},_0x4cd9cc.prototype.deleteQuery=function(e){return this._occlusionQuery.deleteQuery(e),this},_0x4cd9cc.prototype.isQueryResultAvailable=function(e){return this._occlusionQuery.isQueryResultAvailable(e)},_0x4cd9cc.prototype.getQueryResult=function(e){return this._occlusionQuery.getQueryResult(e)},_0x4cd9cc.prototype.getQueryResultFrameID=function(e){return this._occlusionQuery.getQueryResultFrameID()},_0x4cd9cc.prototype.beginOcclusionQuery=function(e,t){var i;return this.compatibilityMode?!!this._occlusionQuery.canBeginQuery&&(null===(i=this._currentRenderPass)||void 0===i||i.beginOcclusionQuery(t),!0):((0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget).addItem(new WebGPURenderItemBeginOcclusionQuery(t)),!0)},_0x4cd9cc.prototype.endOcclusionQuery=function(){var e;this.compatibilityMode?null===(e=this._currentRenderPass)||void 0===e||e.endOcclusionQuery():(0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget).addItem(new WebGPURenderItemEndOcclusionQuery);return this};var _0x47d563=(_0x45a8aa=!0,function(e,t){var i=_0x45a8aa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45a8aa=!1,i}),_0x440a31=_0x47d563(void 0,(function(){return _0x440a31.toString().search("(((.+)+)+)+$").toString().constructor(_0x440a31).search("(((.+)+)+)+$")})),_0x45a8aa;function _0x25b577(e,t,i,n){var r,o=1;n===_0x333f62.TEXTURETYPE_FLOAT?r=new Float32Array(t*i*4):n===_0x333f62.TEXTURETYPE_HALF_FLOAT?(r=new Uint16Array(t*i*4),o=15360):r=n===_0x333f62.TEXTURETYPE_UNSIGNED_INTEGER?new Uint32Array(t*i*4):new Uint8Array(t*i*4);for(var a=0;a<t;a++)for(var s=0;s<i;s++){var l=3*(s*t+a),u=4*(s*t+a);r[u+0]=e[l+0],r[u+1]=e[l+1],r[u+2]=e[l+2],r[u+3]=o}return r}_0x440a31(),_0x4cd9cc.prototype.createRawTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d){void 0===s&&(s=null),void 0===l&&(l=_0x333f62.TEXTURETYPE_UNSIGNED_INT),void 0===u&&(u=0),void 0===c&&(c=!1),void 0===h&&(h=1),void 0===d&&(d=1);var f=new InternalTexture(this,InternalTextureSource.Raw);return f.baseWidth=t,f.baseHeight=i,f.width=t,f.height=i,f.format=n,f.generateMipMaps=r,f.mipmapCount=h,f.samples=d,f.samplingMode=a,f.invertY=o,f._compression=s,f.type=l,f._useSRGBBuffer=c,!this._doNotHandleContextLost&&(f._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(f,t,i,void 0,u),this.updateRawTexture(f,e,n,o,s,l,c),this._internalTexturesCache.push(f),f},_0x4cd9cc.prototype.updateRawTexture=function(e,t,i,n,r,o,a,s){if(void 0===r&&(r=null),void 0===o&&(o=_0x333f62.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),void 0===s&&(s=0),e){if(!this._doNotHandleContextLost&&(e._bufferView=t,e.invertY=n,e._compression=r,e._useSRGBBuffer=a),t){var l=e._hardwareTexture;i===_0x333f62.TEXTUREFORMAT_RGB&&(t=_0x25b577(t,e.width,e.height,o));var u=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(u,e,e.width,e.height,e.depth,l.format,0,s,n,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0}},_0x4cd9cc.prototype.updateSubRawTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){if(void 0===r&&(r=null),void 0===o&&(o=_0x333f62.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),void 0===h&&(h=0),e){if(!this._doNotHandleContextLost&&(e._bufferView=t,e.invertY=n,e._compression=r,e._useSRGBBuffer=a),t){var d=e._hardwareTexture;i===_0x333f62.TEXTUREFORMAT_RGB&&(t=_0x25b577(t,s,l,o));var f=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(f,e,s,l,e.depth,d.format,0,h,n,!1,u,c),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0}},_0x4cd9cc.prototype.createRawCubeTexture=function(e,t,i,n,r,o,a,s){void 0===s&&(s=null);var l=new InternalTexture(this,InternalTextureSource.CubeRaw);return n!==_0x333f62.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?n!==_0x333f62.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering?n!==_0x333f62.TEXTURETYPE_FLOAT||this._caps.textureFloatRender?n===_0x333f62.TEXTURETYPE_HALF_FLOAT&&!this._caps.colorBufferFloat&&(r=!1,_0x50f23a.Warn("Render to half float textures is not supported. Mipmap generation forced to false.")):(r=!1,_0x50f23a.Warn("Render to float textures is not supported. Mipmap generation forced to false.")):(r=!1,a=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,_0x50f23a.Warn("Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")):(r=!1,a=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,_0x50f23a.Warn("Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")),l.isCube=!0,l.format=i===_0x333f62.TEXTUREFORMAT_RGB?_0x333f62.TEXTUREFORMAT_RGBA:i,l.type=n,l.generateMipMaps=r,l.width=t,l.height=t,l.samplingMode=a,!this._doNotHandleContextLost&&(l._bufferViewArray=e),l._cachedWrapU=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,l._cachedWrapV=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,this._textureHelper.createGPUTextureForInternalTexture(l),e&&this.updateRawCubeTexture(l,e,i,n,o,s),l},_0x4cd9cc.prototype.updateRawCubeTexture=function(e,t,i,n,r,o){void 0===o&&(o=null),e._bufferViewArray=t,e.invertY=r,e._compression=o;for(var a=e._hardwareTexture,s=i===_0x333f62.TEXTUREFORMAT_RGB,l=[],u=0;u<t.length;++u){var c=t[u];s&&(c=_0x25b577(t[u],e.width,e.height,n)),l.push(new Uint8Array(c.buffer,c.byteOffset,c.byteLength))}this._textureHelper.updateCubeTextures(l,a.underlyingResource,e.width,e.height,a.format,r,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder),e.isReady=!0},_0x4cd9cc.prototype.createRawCubeTextureFromUrl=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this;void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===h&&(h=!1);var f=this.createRawCubeTexture(null,i,n,r,!o,h,c,null);null==t||t._addPendingData(f),f.url=e,this._internalTexturesCache.push(f);return this._loadFile(e,(function(e){!function(e){var i=f.width,o=a(e);if(o){var u=[0,2,4,1,3,5];if(s)for(var c=n===_0x333f62.TEXTUREFORMAT_RGB,p=s(o),_=f._hardwareTexture,m=[0,1,2,3,4,5],g=0;g<p.length;g++){for(var x=i>>g,y=[],v=0;v<6;v++){var $=p[g][m[v]];c&&($=_0x25b577($,x,x,r)),y.push(new Uint8Array($.buffer,$.byteOffset,$.byteLength))}d._textureHelper.updateCubeTextures(y,_.underlyingResource,x,x,_.format,h,!1,0,0)}else{for(y=[],v=0;v<6;v++)y.push(o[u[v]]);d.updateRawCubeTexture(f,y,n,r,h)}f.isReady=!0,null==t||t._removePendingData(f),l&&l()}}(e)}),void 0,null==t?void 0:t.offlineProvider,!0,(function(e,i){null==t||t._removePendingData(f),u&&e&&u(e.status+" "+e.statusText,i)})),f},_0x4cd9cc.prototype.createRawTexture3D=function(e,t,i,n,r,o,a,s,l,u,c){void 0===l&&(l=null),void 0===u&&(u=_0x333f62.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=0);var h=new InternalTexture(this,InternalTextureSource.Raw3D);return h.baseWidth=t,h.baseHeight=i,h.baseDepth=n,h.width=t,h.height=i,h.depth=n,h.format=r,h.type=u,h.generateMipMaps=o,h.samplingMode=s,h.is3D=!0,!this._doNotHandleContextLost&&(h._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(h,t,i,void 0,c),this.updateRawTexture3D(h,e,r,a,l,u),this._internalTexturesCache.push(h),h},_0x4cd9cc.prototype.updateRawTexture3D=function(e,t,i,n,r,o){if(void 0===r&&(r=null),void 0===o&&(o=_0x333f62.TEXTURETYPE_UNSIGNED_INT),!this._doNotHandleContextLost&&(e._bufferView=t,e.format=i,e.invertY=n,e._compression=r),t){var a=e._hardwareTexture;i===_0x333f62.TEXTUREFORMAT_RGB&&(t=_0x25b577(t,e.width,e.height,o));var s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(s,e,e.width,e.height,e.depth,a.format,0,0,n,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0},_0x4cd9cc.prototype.createRawTexture2DArray=function(e,t,i,n,r,o,a,s,l,u,c){void 0===l&&(l=null),void 0===u&&(u=_0x333f62.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=0);var h=new InternalTexture(this,InternalTextureSource.Raw2DArray);return h.baseWidth=t,h.baseHeight=i,h.baseDepth=n,h.width=t,h.height=i,h.depth=n,h.format=r,h.type=u,h.generateMipMaps=o,h.samplingMode=s,h.is2DArray=!0,!this._doNotHandleContextLost&&(h._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(h,t,i,n,c),this.updateRawTexture2DArray(h,e,r,a,l,u),this._internalTexturesCache.push(h),h},_0x4cd9cc.prototype.updateRawTexture2DArray=function(e,t,i,n,r,o){if(void 0===r&&(r=null),void 0===o&&(o=_0x333f62.TEXTURETYPE_UNSIGNED_INT),!this._doNotHandleContextLost&&(e._bufferView=t,e.format=i,e.invertY=n,e._compression=r),t){var a=e._hardwareTexture;i===_0x333f62.TEXTUREFORMAT_RGB&&(t=_0x25b577(t,e.width,e.height,o));var s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(s,e,e.width,e.height,e.depth,a.format,0,0,n,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0};var _0x1557ba=(_0x265613=!0,function(e,t){var i=_0x265613?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x265613=!1,i}),_0xb89011=_0x1557ba(void 0,(function(){return _0xb89011.toString().search("(((.+)+)+)+$").toString().constructor(_0xb89011).search("(((.+)+)+)+$")})),_0x265613;_0xb89011(),_0x4cd9cc.prototype._readTexturePixels=function(e,t,i,n,r,o,a,s,l,u){void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===l&&(l=0),void 0===u&&(u=0);var c=e._hardwareTexture;return a&&this.flushFramebuffer(),this._textureHelper.readPixels(c.underlyingResource,l,u,t,i,c.format,n,r,o,s)},_0x4cd9cc.prototype._readTexturePixelsSync=function(){throw"_readTexturePixelsSync is unsupported in WebGPU!"};var _0x1abc72=(_0xe7f70d=!0,function(e,t){var i=_0xe7f70d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe7f70d=!1,i}),_0x1e6926=_0x1abc72(void 0,(function(){return _0x1e6926.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e6926).search("(((.+)+)+)+$")})),_0xe7f70d;function _0x4ca372(){var e=_0x3ebbca.call(this,arguments)||this;return e}_0x1e6926(),_0x3ebbca&&(_0x4ca372.__proto__=_0x3ebbca),_0x4ca372.prototype=Object.create(_0x3ebbca&&_0x3ebbca.prototype),_0x4ca372.prototype.constructor=_0x3ebbca;var _0x1ffea6=(_0x2e23fc=!0,function(e,t){var i=_0x2e23fc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e23fc=!1,i}),_0x33ffeb=_0x1ffea6(void 0,(function(){return _0x33ffeb.toString().search("(((.+)+)+)+$").toString().constructor(_0x33ffeb).search("(((.+)+)+)+$")})),_0x2e23fc;_0x33ffeb(),_0x4cd9cc.prototype._createHardwareRenderTargetWrapper=function(e,t,i){var n=new _0x4ca372(e,t,i,this);return this._renderTargetWrapperCache.push(n),n},_0x4cd9cc.prototype.createRenderTargetTexture=function(e,t){var i,n=this._createHardwareRenderTargetWrapper(!1,!1,e),r={};void 0!==t&&"object"==typeof t?(r.generateMipMaps=t.generateMipMaps,r.generateDepthBuffer=void 0===t.generateDepthBuffer||t.generateDepthBuffer,r.generateStencilBuffer=r.generateDepthBuffer&&t.generateStencilBuffer,r.samplingMode=void 0===t.samplingMode?_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,r.creationFlags=null!==(i=t.creationFlags)&&void 0!==i?i:0,r.noColorTarget=!!t.noColorTarget):(r.generateMipMaps=t,r.generateDepthBuffer=!0,r.generateStencilBuffer=!1,r.samplingMode=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE,r.creationFlags=0,r.noColorTarget=!1);var o=r.noColorTarget?null:this._createInternalTexture(e,t,!0,InternalTextureSource.RenderTarget);return n._generateDepthBuffer=r.generateDepthBuffer,n._generateStencilBuffer=!!r.generateStencilBuffer,n.setTextures(o),(n._generateDepthBuffer||n._generateStencilBuffer)&&n.createDepthStencilTexture(0,void 0===r.samplingMode||r.samplingMode===_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE||r.samplingMode===_0x333f62.TEXTURE_LINEAR_LINEAR||r.samplingMode===_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE||r.samplingMode===_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR||r.samplingMode===_0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST||r.samplingMode===_0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR||r.samplingMode===_0x333f62.TEXTURE_NEAREST_LINEAR||r.samplingMode===_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST,n._generateStencilBuffer,n.samples),o&&(void 0!==t&&"object"==typeof t&&t.createMipMaps&&!r.generateMipMaps&&(o.generateMipMaps=!0),this._textureHelper.createGPUTextureForInternalTexture(o,void 0,void 0,void 0,r.creationFlags),void 0!==t&&"object"==typeof t&&t.createMipMaps&&!r.generateMipMaps&&(o.generateMipMaps=!1)),n},_0x4cd9cc.prototype._createDepthStencilTexture=function(e,t){var i=new InternalTexture(this,InternalTextureSource.DepthStencil),n=t.samples?t.samples:1,r=!t.generateStencil||t.generateStencil,o=!!t.bilinearFiltering&&t.bilinearFiltering,a=t.depthTextureFormat?t.depthTextureFormat:r?_0x333f62.TEXTUREFORMAT_DEPTH24_STENCIL8:_0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT,s=t.comparisonFunction?t.comparisonFunction:0,l={};return l.comparisonFunction=s,l.generateStencil=r,l.bilinearFiltering=o,l.samples=n,l.depthTextureFormat=a,i.format=l.depthTextureFormat,this._setupDepthStencilTexture(i,e,l.generateStencil,l.bilinearFiltering,l.comparisonFunction,l.samples),this._textureHelper.createGPUTextureForInternalTexture(i),this._internalTexturesCache.push(i),i},_0x4cd9cc.prototype._setupDepthStencilTexture=function(e,t,i,n,r,o){void 0===o&&(o=1);var a=t.width||t,s=t.height||t,l=t.layers||0;e.baseWidth=a,e.baseHeight=s,e.width=a,e.height=s,e.is2DArray=l>0,e.depth=l,e.isReady=!0,e.samples=o,e.generateMipMaps=!1,e.samplingMode=n?_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE:_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,e.type=_0x333f62.TEXTURETYPE_FLOAT,e._comparisonFunction=r,e._cachedWrapU=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,e._cachedWrapV=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE},_0x4cd9cc.prototype.updateRenderTargetTextureSampleCount=function(e,t){return e&&e.texture&&e.samples!==t?(t=Math.min(t,this.getCaps().maxMSAASamples),this._textureHelper.createMSAATexture(e.texture,t),e._depthStencilTexture&&(this._textureHelper.createMSAATexture(e._depthStencilTexture,t),e._depthStencilTexture.samples=t),e.texture.samples=t,t):t};var _0x5b02da=(_0x327eb3=!0,function(e,t){var i=_0x327eb3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x327eb3=!1,i}),_0x5cb998=_0x5b02da(void 0,(function(){return _0x5cb998.toString().search("(((.+)+)+)+$").toString().constructor(_0x5cb998).search("(((.+)+)+)+$")})),_0x327eb3;_0x5cb998(),_0x4cd9cc.prototype.createRenderTargetCubeTexture=function(e,t){var i=this._createHardwareRenderTargetWrapper(!1,!0,e),n=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:_constants__WEBPACK_IMPORTED_MODULE_2__.Constants.TEXTURETYPE_UNSIGNED_INT,samplingMode:_constants__WEBPACK_IMPORTED_MODULE_2__.Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,format:_constants__WEBPACK_IMPORTED_MODULE_2__.Constants.TEXTUREFORMAT_RGBA,samples:1},t);n.generateStencilBuffer=n.generateDepthBuffer&&n.generateStencilBuffer,i._generateDepthBuffer=n.generateDepthBuffer,i._generateStencilBuffer=n.generateStencilBuffer;var r=new InternalTexture(this,InternalTextureSource.RenderTarget);return r.width=e,r.height=e,r.depth=0,r.isReady=!0,r.isCube=!0,r.samples=n.samples,r.generateMipMaps=n.generateMipMaps,r.samplingMode=n.samplingMode,r.type=n.type,r.format=n.format,this._internalTexturesCache.push(r),i.setTextures(r),(i._generateDepthBuffer||i._generateStencilBuffer)&&i.createDepthStencilTexture(0,void 0===n.samplingMode||n.samplingMode===_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE||n.samplingMode===_0x333f62.TEXTURE_LINEAR_LINEAR||n.samplingMode===_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE||n.samplingMode===_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR||n.samplingMode===_0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST||n.samplingMode===_0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR||n.samplingMode===_0x333f62.TEXTURE_NEAREST_LINEAR||n.samplingMode===_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST,i._generateStencilBuffer,i.samples),t&&t.createMipMaps&&!n.generateMipMaps&&(r.generateMipMaps=!0),this._textureHelper.createGPUTextureForInternalTexture(r),t&&t.createMipMaps&&!n.generateMipMaps&&(r.generateMipMaps=!1),i};var _0x5b53af=(_0x43a0fc=!0,function(e,t){var i=_0x43a0fc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43a0fc=!1,i}),_0x2cc4d2=_0x5b53af(void 0,(function(){return _0x2cc4d2.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cc4d2).search("(((.+)+)+)+$")})),_0x43a0fc;_0x2cc4d2(),_0x4cd9cc.prototype.setTextureSampler=function(e,t){var i;null===(i=this._currentMaterialContext)||void 0===i||i.setSampler(e,t)};var _0x19b1cc=(_0x2c103b=!0,function(e,t){var i=_0x2c103b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c103b=!1,i}),_0x5c55e5=_0x19b1cc(void 0,(function(){return _0x5c55e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c55e5).search("(((.+)+)+)+$")})),_0x2c103b;_0x5c55e5(),_0x57b60b.prototype.setStorageBuffer=function(e,t){this._engine.setStorageBuffer(e,t)},_0x4cd9cc.prototype.createStorageBuffer=function(e,t){return this._createBuffer(e,t|_0x333f62.BUFFER_CREATIONFLAG_STORAGE)},_0x4cd9cc.prototype.updateStorageBuffer=function(e,t,i,n){var r,o=e;void 0===i&&(i=0),void 0===n?n=(r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t).byteLength:r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t,this._bufferManager.setSubData(o,i,r,0,n)},_0x4cd9cc.prototype.readFromStorageBuffer=function(e,t,i,n){var r=this;i=i||e.capacity;var o=this._bufferManager.createRawBuffer(i,_0x5213c6.BufferUsage.MapRead|_0x5213c6.BufferUsage.CopyDst);return this._renderTargetEncoder.copyBufferToBuffer(e.underlyingResource,null!=t?t:0,o,0,i),new Promise((function(e,t){r.onEndFrameObservable.addOnce((function(){o.mapAsync(_0x5213c6.MapMode.Read,0,i).then((function(){var t=o.getMappedRange(0,i),a=n;if(void 0===a)(a=new Uint8Array(i)).set(new Uint8Array(t));else{var s=a.constructor;(a=new s(a.buffer)).set(new s(t))}o.unmap(),r._bufferManager.releaseBuffer(o),e(a)}),(function(e){return t(e)}))}))}))},_0x4cd9cc.prototype.setStorageBuffer=function(e,t){var i,n;null===(i=this._currentDrawContext)||void 0===i||i.setBuffer(e,null!==(n=null==t?void 0:t.getBuffer())&&void 0!==n?n:null)};var _0x387f22=(_0x6d593=!0,function(e,t){var i=_0x6d593?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6d593=!1,i}),_0x2826db=_0x387f22(void 0,(function(){return _0x2826db.toString().search("(((.+)+)+)+$").toString().constructor(_0x2826db).search("(((.+)+)+)+$")})),_0x6d593;_0x2826db(),_0x4cd9cc.prototype.createUniformBuffer=function(e){var t;return t=e instanceof Array?new Float32Array(e):e,this._bufferManager.createBuffer(t,_0x5213c6.BufferUsage.Uniform|_0x5213c6.BufferUsage.CopyDst)},_0x4cd9cc.prototype.createDynamicUniformBuffer=function(e){return this.createUniformBuffer(e)},_0x4cd9cc.prototype.updateUniformBuffer=function(e,t,i,n){void 0===i&&(i=0);var r,o=e;void 0===n?n=(r=t instanceof Float32Array?t:new Float32Array(t)).byteLength:r=t instanceof Float32Array?t:new Float32Array(t),this._bufferManager.setSubData(o,i,r,0,n)},_0x4cd9cc.prototype.bindUniformBufferBase=function(e,t,i){this._currentDrawContext.setBuffer(i,e)},_0x4cd9cc.prototype.bindUniformBlock=function(){};var _0x4a7659=(_0x1c2711=!0,function(e,t){var i=_0x1c2711?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c2711=!1,i}),_0x546c47=_0x4a7659(void 0,(function(){return _0x546c47.toString().search("(((.+)+)+)+$").toString().constructor(_0x546c47).search("(((.+)+)+)+$")})),_0x1c2711;function _0x5415fd(e){return!(!e||void 0===e.underlyingResource)}function f$8(e,t,i){var n=i$i.call(this,e,t)||this;n._engine=i;var r=i.caps;n._drawBuffers=r.drawBuffersExtension,e$1W._maximumCombinedTextureImageUnits=r.maxCombinedTexturesImageUnits,e$1W._maximumCubeMapSize=u$Z(r.maxCubemapTextureSize,8192),e$1W._maximumFragmentUniformVectors=r.maxFragmentUniformVectors,e$1W._maximumTextureImageUnits=u$Z(r.maxTexturesImageUnits,16),e$1W._maximumRenderbufferSize=u$Z(r.maxRenderTextureSize,4096),e$1W._maximumTextureSize=u$Z(r.maxTextureSize,4096),e$1W._maximumVaryingVectors=u$Z(r.maxVaryingVectors,16),e$1W._maximumVertexAttributes=u$Z(r.maxVertexAttribs,16),e$1W._maximumVertexTextureImageUnits=u$Z(r.maxVertexTextureImageUnits,16),e$1W._maximumVertexUniformVectors=u$Z(r.maxVertexUniformVectors,256),e$1W._minimumAliasedLineWidth=1,e$1W._maximumAliasedLineWidth=1,e$1W._minimumAliasedPointSize=1,e$1W._maximumAliasedPointSize=1,e$1W._maximumViewportWidth=32767,e$1W._maximumViewportHeight=32767,e$1W._highpFloatSupported=r.highPrecisionShaderSupported,e$1W._highpIntSupported=r.highPrecisionShaderSupported,e$1W._maximumTextureFilterAnisotropy=r.maxAnisotropy,e$1W._maximumDrawBuffers=n.drawBuffers?16:1,e$1W._maximumColorAttachments=n.drawBuffers?16:1,e$1W._maximumSamples=r.maxMSAASamples,n._antialias=!0,n._standardDerivatives=r.standardDerivatives,n._blendMinmax=r.blendMinMax,n._elementIndexUint=!0,n._depthTexture=r.depthTextureExtension,n._fragDepth=r.fragmentDepthSupported,n._debugShaders=!1;var o=r.textureLOD;n._textureFloat=r.textureFloat,n._textureHalfFloat=r.textureHalfFloat,n._textureFloatLinear=r.textureFloatLinearFiltering,n._textureHalfFloatLinear=r.textureHalfFloatLinearFiltering,n._sysShaderDefines=[],e$2e(n._standardDerivatives)&&n._standardDerivatives&&n._sysShaderDefines.push("GL_OES_standard_derivatives"),e$2e(n._fragDepth)&&n._fragDepth&&n._sysShaderDefines.push("GL_EXT_frag_depth"),e$2e(o)&&n._sysShaderDefines.push("GL_EXT_shader_texture_lod"),n._sysShaderDefines.push("WEBGPU"),n._colorBufferFloat=r.colorBufferFloat,n._floatBlend=!0,n._colorBufferHalfFloat=r.textureHalfFloat,n._s3tc=r.s3tc,n._pvrtc=r.pvrtc,n._etc1=r.etc1,n._astc=r.astc,n._etc=r.etc1,n._bc7=r.bptc,f$U.setKTX2SupportedFormats(n._s3tc,n._pvrtc,n._astc,n._etc,n._etc1,n._bc7),n.webglOptions={},i.saveCompiledShaderInIndexDB=!1,p$1d.halfZRange=!0}function B$4(e,t,i,n,r,o,a){var s=e._currentRenderState,l=e._currentPassState,u=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,d$1m.partialApply(e._engine,s,t,l,i,u,i.viewport,n,r,o,a)}function b$9(e,t){t!==e._currentFramebuffer&&(e._currentFramebuffer=t,e$2e(t)?t._bind():e.engine.restoreDefaultFramebuffer())}_0x546c47(),_0x4cd9cc.prototype.updateVideoTexture=function(e,t,i){var n,r=this;if(e&&!e._isDisabled){void 0===this._videoTextureSupported&&(this._videoTextureSupported=!0);var o=e._hardwareTexture;!(null===(n=e._hardwareTexture)||void 0===n?void 0:n.underlyingResource)&&(o=this._textureHelper.createGPUTextureForInternalTexture(e)),_0x5415fd(t)?(this._textureHelper.copyVideoToTexture(t,e,o.format,!i),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder),e.isReady=!0):t&&this.createImageBitmap(t).then((function(t){r._textureHelper.updateTexture(t,e,e.width,e.height,e.depth,o.format,0,0,!i,!1,0,0),e.generateMipMaps&&r._generateMipmaps(e,r._uploadEncoder),e.isReady=!0})).catch((function(){e.isReady=!0}))}},i$i&&(f$8.__proto__=i$i),f$8.prototype=Object.create(i$i&&i$i.prototype),f$8.prototype.constructor=i$i,Object.defineProperties(f$8.prototype,{webgl2:{get:function(){return null}},webgpu:{get:function(){return!0}},engine:{get:function(){return this._engine}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return!0}},antialias:{get:function(){return this._antialias}},standardDerivatives:{get:function(){return!0}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},floatTextureSixPlaces:{get:function(){return!0}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},etc1:{get:function(){return this._etc1}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=wrapGL(this._originalGLContext,e?throwOnError:void 0)}},drawingBufferHeight:{get:function(){return this._engine.getRenderHeight(!0)}},drawingBufferWidth:{get:function(){return this._engine.getRenderWidth(!0)}},realDrawingBufferHeight:{get:function(){return this._engine.getRenderHeight(!0)}},realDrawingBufferWidth:{get:function(){return this._engine.getRenderWidth(!0)}}});var P$7=new t$W;function R$5(e,t,i,n,r){b$9(e,t);var o=e.drawingBufferWidth,a=e.drawingBufferHeight;e$2e(t)&&(o=t.textureSize.width,a=t.textureSize.height),B$4(e,r,i,!1,o,a,t),n._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,n.maximumTextureUnitIndex)}function A$9(e,t,i,n){var r=t._primitiveType,o=t._vertexArray,a=t._offset,s=t.instanceCount,l=e._engine;e._us.model=u$Z(t._modelMatrix,p$1d.IDENTITY),e._us.useRelativeOrigin=t.useRelativeOrigin,i._setUniforms(n,e._us,e.validateShaderProgram,t),o._bind();var u=R$12.toFillMode(r),c=t.occlusionQueryID;const h=e._engine.currentRenderPassId;c&&(void 0===e._renderPassIdForOcclusionQuery&&(e._renderPassIdForOcclusionQuery=l.createRenderPassId("Render pass for occlusion query")),l.currentRenderPassId=e._renderPassIdForOcclusionQuery,l._getCurrentRenderPass(),l.beginOcclusionQuery(null,c));var d=o.indexBuffer;if(e$2e(d)){const i=t._count||d.numberOfIndices;e._trangleCount+=i/3,l.drawElementsType(u,a,i,s,t)}else{const e=t._count||o.numberOfVertices;l.drawArraysType(u,a,e,s,t)}c&&(l.endOcclusionQuery(),l.currentRenderPassId=h)}f$8.prototype.clear=function(e,t){e=u$Z(e,P$7),t=u$Z(t,this._defaultPassState);var i=e.color,n=e.depth,r=e.stencil,o=null;e$2e(i)&&((o={}).r=i.red,o.g=i.green,o.b=i.blue,o.a=i.alpha);var a=!1;e$2e(n)&&(n!==this._clearDepth&&(this._clearDepth=n),a=!0);var s=!1;e$2e(r)&&(r!==this._clearStencil&&(this._clearStencil=r),s=!0);var l=u$Z(e.framebuffer,t.framebuffer);b$9(this,l);var u=this.drawingBufferWidth,c=this.drawingBufferHeight;B$4(this,u$Z(e.renderState,this._defaultRenderState),t,!0,u,c,l);this._engine.clear(o,!0,a,s),this._engine.flushFramebuffer()},f$8.prototype.draw=function(e,t,i,n){t=u$Z(t,this._defaultPassState);var r=u$Z(e._framebuffer,t.framebuffer),o=u$Z(e._renderState,this._defaultRenderState);i=u$Z(i,e._shaderProgram),n=u$Z(n,e._uniformMap),i._isReady()||i._createEffect(),e$2e(r)?e.setActiveFrameBufferID(r._inner.id):e.setActiveFrameBufferID(0),R$5(this,r,t,i,o),A$9(this,e,i,n)},f$8.prototype.endFrame=function(){this._engine.beginFrame(),this._engine.endFrame()};var g$9=new Array;f$8.prototype.readPixels=function(e){return console.log("webgpu use readPixelsAsync instead."),g$9[0]=0,g$9[1]=0,g$9[2]=0,g$9[3]=0,g$9},f$8.prototype.readPixelsAsync=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=Math.max(u$Z(e.x,0),0),i=Math.max(u$Z(e.y,0),0),n=u$Z(e.width,this.drawingBufferWidth),r=u$Z(e.height,this.drawingBufferHeight),o=e.framebuffer;if(o$1q.typeOf.number.greaterThan("readState.width",n,0),o$1q.typeOf.number.greaterThan("readState.height",r,0),e$2e(o)){var a=o.getColorTexture(0)._inner.internalTexture._hardwareTexture;return this._engine.flushFramebuffer(),this._engine._textureHelper.readPixels(a.underlyingResource,t,i,n,r,a.format,0,0,null,!1)}return b$9(this,o),this._engine.readPixels(t,i,n,r)},f$8.prototype.resize=function(){this._engine.resize(!0)},f$8.prototype.isDestroyed=function(){return!1},f$8.prototype.destroy=function(){return i$i.prototype.destroy.call(this),i$11(this)};var ke$1=new r$U("MapQuest, SuperMap iServer Imagery"),ee$4=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652,.007089059829027304,.014178119658054609,.028356239316109217,.056712478632218434,.11342495726443687,.2684991452887374],se$2=[1.690163571602655e-9,3.38026990562e-9,6.76053981124e-9,1.352107962249e-8,2.704215924497e-8,5.408431848995e-8,1.0816863697989e-7,2.1633727395979e-7,4.3267454791958e-7,8.6534909583916e-7,173069819167831e-20,346139638335662e-20,692279276671324e-20,1384558553342649e-20,2769117106685297e-20,5538234213370595e-20,.0001107646842674119,.0002215293685348238,.0004430587370696476,.0008861174741392952,.0017722349482785903,.0035444698965571807,.007088939793114361],P$6=function(e){if(!e$2e((e=u$Z(e,{})).url))throw new t$15("options.url is required.");this._baseUrl=e.url,this._prjCoordSys=e.prjCoordSys;var t=(n=e.url).substring(0,n.indexOf("/datas"));this.tablename=n.substring(n.indexOf("datas/")+6,n.length);var i=this;new l$14({name:t+this.tablename}).then((function(e){e.checkObjectStoreExit(i.tablename)?i._indexedDBScheduler=e:e.createObjectStore(i.tablename).then((function(){i._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){i._indexedDBScheduler.clear(i.tablename)},cache:[]},this.isSci3D=!1,this.isTileMap=u$Z(e.isTileMap,!1);var n=n$1a(e.url);if(this._packingRequest=e.packingRequest,n.indexOf("rest/maps")>-1?(this.isTileMap=!0,this.layersID=e.layersID):n.indexOf("rest/realspace")>-1&&(this.isSci3D=!0),this._url=n,this._resource=t$10.createIfNeeded(n),this._resolution=e$2e(e.highResolution)?2:1,this._transparent=u$Z(e.transparent,!0),this._name=e.name||"",this._urlTemplate=void 0,this._errorEvent=new o$1h,this._fileExtension="png",this._tileWidth=256,this._tileHeight=256,this._tileFormat=e.tileFormat||"png",this._scales=ee$4,this._rasterfunction=u$Z(e.rasterfunction,void 0),this._regions=e.regions,this._cache=u$Z(e._cache,!0),this._isBlock=!1,this._blockCache={},this._blockCacheQueue=new r$R,this._blockCacheSize=100,this._blockScale=0,this._tileversion=u$Z(e.tileversion,""),this._minimumLevel=u$Z(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=void 0,this._tilingScheme=e.tilingScheme,this._subdomains=e.subdomains,e$2e(e.tilingScheme)&&e$2e(e.tilingScheme._scaleDenominators)){this._scales=[];for(var r=0;r<e.tilingScheme._scaleDenominators.length;r++)this._scales[r]=1/e.tilingScheme._scaleDenominators[r]}this._flipY=!1,this._tileDiscardPolicy=e.tileDiscardPolicy,this._fRatio=u$Z(e.ratio,e$2d.DEGREES_PER_RADIAN/t$12.WGS84.maximumRadius),this._coordUnit="DEGREE",this._customRequestHeaders=e.customRequestHeaders;var o=u$Z(e.credit,ke$1);this._cacheKey=u$Z(e.cacheKey,""),this._cacheEnabled=u$Z(e.cacheEnabled,!0),"string"==typeof o&&(o=new r$U(o)),this._credit=o,this._ready=!1,this._readyPromise=o$1l.defer();i=this;e$2e(this._subdomains)&&(n=n.replace(/({.*?})/g,(function(e,t){if(!e$2e(i._subdomains.length))throw new t$15("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?i._subdomains[0]:e}))),this._layerStatusParameters=u$Z(e.layerStatusParameters,void 0),this._layerStatusParametersID=void 0;var a,s=!0;function l(){if(i.isTileMap){var e=n.slice(0,-1)+".json";e$2e(a$O.CREDENTIAL)&&(e=e$2e(a$O.CREDENTIAL._keymap[i._baseUrl])?a$O.addTokenWithKey(i._baseUrl,e):a$O.addToken(e)),e$2e(i._prjCoordSys)&&(e=e.includes("?")?e+"&prjCoordSys="+JSON.stringify(i._prjCoordSys):e+"?prjCoordSys="+JSON.stringify(i._prjCoordSys)),LicenseChecker.LICENSECHECKER.getLicense(e).then((function(e){LicenseChecker.LICENSECHECKER.check(e)}));var t=u$P(e,i.customRequestHeaders);o$1l.all([t,s]).then(c,h)}else{var r=n+"config";e$2e(a$O.CREDENTIAL)&&(r=e$2e(a$O.CREDENTIAL._keymap[i._baseUrl])?a$O.addTokenWithKey(i._baseUrl,r):a$O.addToken(r)),LicenseChecker.LICENSECHECKER.getLicense(r).then((function(e){LicenseChecker.LICENSECHECKER.check(e)})),o$1l.all([u$Q(r,i._customRequestHeaders),s]).then(u,h)}}function u(t){var n=function(e){var t=(e=d.parseFromString(e,"application/xml")).childNodes[0],n="http://www.supermap.com/SuperMapCache/sci3d",r=u$Z(Ae$3(t,"xmlns:sml"),n);K$3(t,"Version",r);var o=Ke$1(F$5(t,"StoreType",r),"BlockScale");"number"==typeof o&&(i._isBlock=!0,i._blockScale=o);for(var a=Pe$1(F$5(t,"Levels",r),"Level",r),s=[],l=0,u=a.length;l<u;l++)s.push(parseInt(a[l].textContent,10));var c=F$5(t,"Bounds",r),h=K$3(c,"Left",r),f=K$3(c,"Right",r),p=K$3(c,"Top",r),_=K$3(c,"Bottom",r),m=me$3(t,"FileExtentName",r),g=K$3(t,"CellWidth",r),x=K$3(t,"CellHeight",r),y=me$3(t,"CacheName",r);return i._name||(i._name=y||""),{left:h,right:f,top:p,bottom:_,fileExtentName:m,levels:s,imageSizeWidth:g,imageSizeHeight:x}}(t[0]);i._fileExtension=u$Z(n.fileExtentName,"png"),i._tileWidth=u$Z(n.imageSizeWidth,256),i._tileHeight=u$Z(n.imageSizeHeight,256);var r=n.levels,o=r.length;i._minimumLevel=u$Z(r[0],0),i._maximumLevel=u$Z(i._maximumLevel,r[o-1]),e$2e(i._tilingScheme)||(i._tilingScheme=new g$15({ellipsoid:e.ellipsoid}));var a,s,l,u,c=i._tilingScheme;e$2e(i._rectangle)||e$2e(n.left)&&e$2e(n.right)&&e$2e(n.top)&&e$2e(n.bottom)&&(a=e$2d.toRadians(n.left),l=e$2d.toRadians(n.right),s=e$2d.toRadians(n.bottom),u=e$2d.toRadians(n.top),a>Math.PI&&(o$1p.globalOffset.x=Math.floor(a/Math.PI)*Math.PI,a-=o$1p.globalOffset.x,l-=o$1p.globalOffset.x,o$1p.globalOffset.x*=6378137),u>.5*Math.PI&&(o$1p.globalOffset.y=Math.floor((u+.5*Math.PI)/Math.PI)*Math.PI,u-=o$1p.globalOffset.y,s-=o$1p.globalOffset.y,o$1p.globalOffset.y*=6378137),i._rectangle=new h$18(a,s,l,u));i._rectangle.west<c.rectangle.west&&(i._rectangle.west=c.rectangle.west),i._rectangle.east>c.rectangle.east&&(i._rectangle.east=c.rectangle.east),i._rectangle.south<c.rectangle.south&&(i._rectangle.south=c.rectangle.south),i._rectangle.north>c.rectangle.north&&(i._rectangle.north=c.rectangle.north);var h=c.positionToTileXY(h$18.southwest(i._rectangle),i._minimumLevel),f=c.positionToTileXY(h$18.northeast(i._rectangle),i._minimumLevel);(Math.abs(f.x-h.x)+1)*(Math.abs(f.y-h.y)+1)>4&&(i._minimumLevel=0),i._tilingScheme=c,i._urlTemplate=i._url+"data/index/{y}/{x}.{fileExtension}?level={level}",i._ready=!0,i._readyPromise.resolve(!0)}function c(t){var n=t[0],r=n.prjCoordSys.coordUnit;i._coordUnit=r;var o=n.prjCoordSys.epsgCode,a=n.bounds,s=n.visibleScales;if(i.customScales=s&&s.length>0,"DEGREE"==r){var l=3857==o?85:90,u=i._resolution;if(i._tilingScheme=new g$15({numberOfLevelZeroTilesX:2*u,numberOfLevelZeroTilesY:u}),a.left=e$2d.clamp(a.left,-180,180),a.bottom=e$2d.clamp(a.bottom,-l,l),a.right=e$2d.clamp(a.right,-180,180),a.top=e$2d.clamp(a.top,-l,l),e$2d.equalsEpsilon(a.left,a.right,e$2d.EPSILON7)&&(a.right+=e$2d.EPSILON5),e$2d.equalsEpsilon(a.top,a.bottom,e$2d.EPSILON7)&&(a.top+=e$2d.EPSILON5),i._rectangle=h$18.fromDegrees(a.left,a.bottom,a.right,a.top),i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-180,"y":90}{tileversion}',(s=u$Z(e.scales,s)).length>0){var c=[];for(var h=i.customScales?0:u;h<s.length;h++)c.push(1/s[h]);i._tilingScheme._scaleDenominators=c,n.dpi&&(i._tilingScheme._customDPI=new o$1o(n.dpi,n.dpi)),i._tilingScheme._rectangle=i._rectangle,i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":'+a.left+',"y":'+a.top+"}{tileversion}",i._maximumLevel=c.length}}else{var d=new o$1p(a.left,a.bottom,0);d.x>20037508.342789244&&(o$1p.globalOffset.x=20037508.342789244*Math.floor(d.x/20037508.342789244),d.x=d.x-o$1p.globalOffset.x),d.y>10018754.171394622&&(o$1p.globalOffset.y=20037508.342789244*Math.floor((d.y+10018754.171394622)/20037508.342789244),d.y=d.y-o$1p.globalOffset.y);var f=new o$1p(a.right,a.top,0);if(f.x=Math.min(20037508.342789244,f.x-o$1p.globalOffset.x),f.y=Math.min(20037508.342789244,f.y-o$1p.globalOffset.y),e$2e(i._tilingScheme)){c=[];if(i._tilingScheme._scaleDenominators){c=i._tilingScheme._scaleDenominators;for(var p=[],_=0;_<i._tilingScheme._scaleDenominators.length;_++)p.push(1/i._tilingScheme._scaleDenominators[_]);s=p}else for(h=0;h<s.length;h++)c.push(1/s[h]);i._tilingScheme._scaleDenominators=c,!e$2e(i._tilingScheme._customDPI)&&n.dpi&&(i._tilingScheme._customDPI=new o$1o(n.dpi,n.dpi)),i._tilingScheme._rectangleNortheastInMeters=f,i._tilingScheme._rectangleSouthwestInMeters=d;var m=i._tilingScheme._projection.unproject(d),g=i._tilingScheme._projection.unproject(f);if(i._tilingScheme._rectangle=new h$18(m.longitude,m.latitude,g.longitude,g.latitude),s.length>0){var x=s[0];u=.0254/(n.dpi*x);i._tilingScheme._numberOfLevelZeroTilesX=Math.ceil((f.x-d.x)/u/n.viewer.width),i._tilingScheme._numberOfLevelZeroTilesY=Math.ceil((f.y-d.y)/u/n.viewer.height)}}else{var y,v,$=e$2e(n.prjCoordSys)&&3857==n.prjCoordSys.epsgCode,b=$?new t$N:new n$1d;c=[];if(!$){for(h=0;h<s.length;h++)c.push(1/s[h]);if(s.length>0){n.viewBounds.rightTop,n.viewBounds.leftBottom;x=s[0],u=.0254/(n.dpi*x);y=Math.ceil((f.x-d.x)/u/n.viewer.width),v=Math.ceil((f.y-d.y)/u/n.viewer.height)}}!$&&s.length>0?i._tilingScheme=new c$S({numberOfLevelZeroTilesX:y,numberOfLevelZeroTilesY:v,projection:b,rectangleSouthwestInMeters:d,rectangleNortheastInMeters:f,customDPI:new o$1o(n.dpi,n.dpi),scaleDenominators:c}):i._tilingScheme=new c$S({projection:b})}m=i._tilingScheme._projection.unproject(d),g=i._tilingScheme._projection.unproject(f);i._rectangle=new h$18(m.longitude,m.latitude,g.longitude,g.latitude),!$&&(s.length>0||c.length>0)?i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":'+a.left+',"y":'+a.top+"}{tileversion}":i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-20037508.342789248 ,"y":20037508.342789095}{tileversion}'}if(e$2e(s)&&Array.isArray(s)&&s.length>1)if(i._tilingScheme.projection instanceof n$1d)i._scales=s,i._maximumLevel=s.length-1-i._resolution;else{var T=s[s.length-1];i._maximumLevel=Oe$2(i,T),e$2e(n.prjCoordSys.name)&&n.prjCoordSys.name.indexOf("Beijing")>-1&&n.prjCoordSys.name.indexOf("1954")>-1&&(i._scales=se$2)}else e$2e(i._maximumLevel)||(i._maximumLevel=i._scales.length-1);"GCS_Beijing_1954"===n.prjCoordSys.name&&(!e$2e(s)||0==s.length)&&(i._scales=se$2),i._urlTemplate=i._urlTemplate.replace("{transparent}",i._transparent),i._urlTemplate=i._urlTemplate.replace("{_cache}",i._cache),e$2e(i._rasterfunction)&&(i._urlTemplate=i._urlTemplate+"&rasterfunction={rasterfunction}"),i.layersID&&(i._urlTemplate=i._urlTemplate+"&layersID="+i.layersID),e$2e(i._regions)&&(i._urlTemplate=i._urlTemplate+"®ions="+i._regions),e$2e(i._prjCoordSys)&&(i._urlTemplate=i._urlTemplate+"&prjCoordSys="+JSON.stringify(i._prjCoordSys)),i._rectangle||(i._rectangle=u$Z(e.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._readyPromise.resolve(!0)}function h(e){var t="An error occurred while accessing "+i._url+".";a=l$V.handleError(a,i,i._errorEvent,t,void 0,void 0,void 0,l),i._readyPromise.reject(new t$13(t))}this._layerStatusParameters&&(s=ce$5(this)),l();var d=new DOMParser};function oe$4(e){var t=[];if(e$2e(e.subLayers)&&e.subLayers.length>0)for(var i=0;i<e.subLayers.length;i++){var n=oe$4(e.subLayers[i]);t.push(n)}return{type:"UGC",name:e.layerName,visible:e.isVisible,displayFilter:e.displayFilter||null,subLayers:{layers:t}}}function ce$5(e){var t=o$1l.defer(),i=e._url+"tempLayersSet.rjson";return e$2e(a$O.CREDENTIAL)&&(i=a$O.addToken(i)),t$10.createIfNeeded(i).post(JSON.stringify(null)).then((function(i){for(var n=JSON.parse(i),r=[],o=0;o<e._layerStatusParameters.length;o++){var a=e._layerStatusParameters[o];r.push(oe$4(a))}var s=e._url.slice(0,-1),l=s.lastIndexOf("/"),u=e._baseUrl+n.newResourceLocation.substring(n.newResourceLocation.indexOf("/tempLayersSet"));e$2e(a$O.CREDENTIAL)&&(u=a$O.addToken(u));var c=t$10.createIfNeeded(u),h=[{type:"UGC",visible:!0,subLayers:{layers:r},name:s.slice(l+1)}];c.put(JSON.stringify(h)).then((function(){e._layerStatusParametersID=n.newResourceID,t.resolve(e._layerStatusParametersID)})).otherwise((function(){t.reject("修改图层失败")}))})),t.promise}function Oe$2(e,t){for(var i=e._scales.length;i--;)if(e._scales[i]<=t)return i}function te$3(e,t,i,n,r){var o;if(e.isTileMap){var a,s=""===e._tileversion?"":"&tileversion="+e._tileversion;if("DEGREE"===e._coordUnit)if(1===e.packingRequest)o=e._urlTemplate.replace("&x={x}&y={y}&scale={scale}","").replace("{tileversion}",s).replace("tileImage","tileImages").replace("&_cache=true","");else{let r=e.customScales?0:e.resolution;a=e._scales[n+r]||ee$4[n],o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{scale}",a.toString()).replace("{tileversion}",s)}else"METER"===e._coordUnit&&(1===e.packingRequest?o=e._urlTemplate.replace("&x={x}&y={y}&scale={scale}","").replace("{tileversion}",s).replace("tileImage","tileImages").replace("&_cache=true",""):(a=e._scales[n],o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{scale}",a.toString()).replace("{tileversion}",s)))}else o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{level}",n).replace("{fileExtension}",e._fileExtension);if(e$2e(e._subdomains)){var l=e._subdomains,u=l[(t+i+n)%l.length];o=o.replace(Me$4,(function(e,t){return"{s}"===t?u:e}))}return e$2e(a$O.CREDENTIAL)&&(o=a$O.addToken(o)),o}function V$6(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function ue$3(e,t,i,n){var r=e._blockScale,o=Math.pow(2,r),a=Math.floor(t/o),s=t%o,l=Math.floor(i/o),u=i%o;return{x:a,y:l,url:te$3(e,a,l,n),col:s,row:u,level:n,blockSize:o}}Object.defineProperties(P$6.prototype,{url:{get:function(){return this._url}},name:{get:function(){return this._name},set:function(e){this._name=e}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},tileFormat:{get:function(){return this._tileFormat}},tileversion:{get:function(){return this._tileversion}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return 1===this.resolution?this._maximumLevel:this._maximumLevel-1}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},ratio:{get:function(){return this._fRatio},set:function(e){this._fRatio=e}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},resolution:{get:function(){return this._resolution}},flipY:{get:function(){return this._flipY},set:function(e){this._flipY=e}},packingRequest:{get:function(){return this._packingRequest}},isBlock:{get:function(){return this._isBlock}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2e(e)&&!e$2e(e.length))throw new t$15("Excepted SuperMapImageryProvider.subdomains to be type of Array.");this._subdomains=e}},layerStatusParameters:{get:function(){return this._layerStatusParameters}}}),P$6.prototype.setLayerStatusParameters=function(e){if(!e$2e(e))throw new t$15("Parameter is required.");if(!e$2e(e.length))throw new t$15("Expected parameter to be type of Array.");return this._layerStatusParameters=e,ce$5(this)},P$6.prototype.getTileCredits=function(e,t,i){};var Me$4=/({.*?})/g;P$6.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=te$3(this,e,t,i);if(this.isSci3D){var o=1<<i;r=te$3(this,e+o$1p.globalOffset.x/(6378137*Math.PI)*o,t+o$1p.globalOffset.y/(6378137*Math.PI)*o,i)}e$2e(this._layerStatusParametersID)&&(r+="&layersID="+this._layerStatusParametersID),e$2e(a$O.CREDENTIAL)&&e$2e(a$O.CREDENTIAL._keymap[this._baseUrl])&&(r=a$O.addTokenWithKey(this._baseUrl,r));var a=this,s={};e$2e(this._rasterfunction)&&(s.rasterfunction=JSON.stringify(this._rasterfunction));var l=this._resource.getDerivedResource({url:r,request:n,templateValues:s});if(n.quadKey=V$6(e,t,i),this._packingRequest===Z$P.QuadKey&&this._isBlock){n.type=U$1f.BLOCKPACK,n.throttle=!0;var u=ue$3(this,e,t,i);if(l.url=u.url,n.blockInfo=u,n.quadKey=V$6(u.x,u.y,u.level),n.providerName=this.url,e$2e(h=this.blockCache[n.quadKey]))return this.blockCacheQueue.touch(h),h.data}else if(this._packingRequest===Z$P.QuadKey){if(n.type=U$1f.PACK,this.isTileMap){var c=this._scales[i+this.resolution]||ee$4[i];n.quadKey=c+":"+e+":"+t}else n.quadKey=V$6(e,t,i);n.providerName=this.url,n.throttle=!0}else if(this._isBlock){n.type=U$1f.BLOCK;var h;u=ue$3(this,e,t,i);if(l.url=u.url,n.blockInfo=u,n.quadKey=V$6(u.x,u.y,u.level),n.providerName=this.url,e$2e(h=this.blockCache[n.quadKey])&&e$2e(h.data))return this.blockCacheQueue.touch(h),h.data;if(!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){var d,f=o$1l.defer();return e$2e(this._indexedDBScheduler)&&e$2e(d=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey))?(o$1l(d,(function(e){e$2e(e)?f.resolve(e):f.resolve("cacheError")}),(function(e){f.resolve("cacheError")})),f):p(a,l)}}if(!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable)return e$2e(this._indexedDBScheduler)&&e$2e(d=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey))?o$1l(d,(function(e){return e$2e(e)?e:"cacheError"}),(function(e){return"cacheError"})):p(a,l);function p(e,t){if(e._isBlock){var i=e.blockCache[n.quadKey];if(e$2e(i))return i.promise;var r=fe$2(e,t);return e$2e(r)?(i=new e$1e(e,n.quadKey),e.blockCache[n.quadKey]=i,i.promise=r,i.promise):void 0}return fe$2(e,t)}return p(a,l)};var Be$3=/\.ktx$/i,je$1=/\.crn$/i,he$2=/\.dxtz/i;function fe$2(e,t){o$1q.defined("url",t);var i=t$10.createIfNeeded(t);return e.isBlock||e.packingRequest===Z$P.QuadKey?(he$2.test(i.url)&&(e.flipY=!0),i.fetchArrayBuffer()):Be$3.test(i.url)?k$W(i):je$1.test(i.url)?a$P(i):he$2.test(i.url)?(e.flipY=!0,B$M(i)):e$2e(e.tileDiscardPolicy)?i.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(e$2e(e._customRequestHeaders)&&(i.headers=p$19(i.headers,e._customRequestHeaders)),e._cacheKey.length>0?i.fetchArrayBuffer():i.fetchBlob())}function Ke$1(e,t){if(e$2e(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function Ae$3(e,t){if(e$2e(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function F$5(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function Pe$1(e,t,i){if(e$2e(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function K$3(e,t,i){var n=F$5(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function me$3(e,t,i){var n=F$5(e,t,i);if(e$2e(n))return n.textContent.trim()}P$6.prototype.pickFeatures=function(){};var tr$1=function(e){var t,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,r=Math.ceil,o=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",l=1e14,u=14,c=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,f=1e9;function p(e){var t=0|e;return e>0||e===t?t:t-1}function _(e){for(var t,i,n=1,r=e.length,o=e[0]+"";n<r;){for(t=e[n++]+"",i=u-t.length;i--;t="0"+t);o+=t}for(r=o.length;48===o.charCodeAt(--r););return o.slice(0,r+1||1)}function m(e,t){var i,n,r=e.c,o=t.c,a=e.s,s=t.s,l=e.e,u=t.e;if(!a||!s)return null;if(i=r&&!r[0],n=o&&!o[0],i||n)return i?n?0:-s:a;if(a!=s)return a;if(i=a<0,n=l==u,!r||!o)return n?0:!r^i?1:-1;if(!n)return l>u^i?1:-1;for(s=(l=r.length)<(u=o.length)?l:u,a=0;a<s;a++)if(r[a]!=o[a])return r[a]>o[a]^i?1:-1;return l==u?0:l>u^i?1:-1}function g(e,t,i,n){if(e<t||e>i||e!==o(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<t||e>i?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function x(e){var t=e.c.length-1;return p(e.e/u)==t&&e.c[t]%2!=0}function y(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function v(e,t,i){var n,r;if(t<0){for(r=i+".";++t;r+=i);e=r+e}else if(++t>(n=e.length)){for(r=i,t-=n;--t;r+=i);e+=r}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}return t=function e(t){var $,b,T,C=B.prototype={constructor:B,toString:null,valueOf:null},S=new B(1),w=20,E=4,P=-7,A=21,L=-1e7,M=1e7,R=!1,O=1,D=0,I={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},F="0123456789abcdefghijklmnopqrstuvwxyz";function B(e,t){var n,r,a,l,h,d,f,p,_=this;if(!(_ instanceof B))return new B(e,t);if(null==t){if(e&&!0===e._isBigNumber)return _.s=e.s,void(!e.c||e.e>M?_.c=_.e=null:e.e<L?_.c=[_.e=0]:(_.e=e.e,_.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(_.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,h=e;h>=10;h/=10,l++);return void(l>M?_.c=_.e=null:(_.e=l,_.c=[e]))}p=String(e)}else{if(!i.test(p=String(e)))return T(_,p,d);_.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(l=p.indexOf("."))>-1&&(p=p.replace(".","")),(h=p.search(/e/i))>0?(l<0&&(l=h),l+=+p.slice(h+1),p=p.substring(0,h)):l<0&&(l=p.length)}else{if(g(t,2,F.length,"Base"),10==t)return U(_=new B(e),w+_.e+1,E);if(p=String(e),d="number"==typeof e){if(0*e!=0)return T(_,p,d,t);if(_.s=1/e<0?(p=p.slice(1),-1):1,B.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else _.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(n=F.slice(0,t),l=h=0,f=p.length;h<f;h++)if(n.indexOf(r=p.charAt(h))<0){if("."==r){if(h>l){l=f;continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,h=-1,l=0;continue}return T(_,String(e),d,t)}d=!1,(l=(p=b(p,t,10,_.s)).indexOf("."))>-1?p=p.replace(".",""):l=p.length}for(h=0;48===p.charCodeAt(h);h++);for(f=p.length;48===p.charCodeAt(--f););if(p=p.slice(h,++f)){if(f-=h,d&&B.DEBUG&&f>15&&(e>c||e!==o(e)))throw Error(s+_.s*e);if((l=l-h-1)>M)_.c=_.e=null;else if(l<L)_.c=[_.e=0];else{if(_.e=l,_.c=[],h=(l+1)%u,l<0&&(h+=u),h<f){for(h&&_.c.push(+p.slice(0,h)),f-=u;h<f;)_.c.push(+p.slice(h,h+=u));h=u-(p=p.slice(h)).length}else h-=f;for(;h--;p+="0");_.c.push(+p)}}else _.c=[_.e=0]}function N(e,t,i,n){var r,o,a,s,l;if(null==i?i=E:g(i,0,8),!e.c)return e.toString();if(r=e.c[0],a=e.e,null==t)l=_(e.c),l=1==n||2==n&&(a<=P||a>=A)?y(l,a):v(l,a,"0");else if(o=(e=U(new B(e),t,i)).e,s=(l=_(e.c)).length,1==n||2==n&&(t<=o||o<=P)){for(;s<t;l+="0",s++);l=y(l,o)}else if(t-=a,l=v(l,o,"0"),o+1>s){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-s)>0)for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&r?"-"+l:l}function G(e,t){for(var i,n=1,r=new B(e[0]);n<e.length;n++){if(!(i=new B(e[n])).s){r=i;break}t.call(r,i)&&(r=i)}return r}function z(e,t,i){for(var n=1,r=t.length;!t[--r];t.pop());for(r=t[0];r>=10;r/=10,n++);return(i=n+i*u-1)>M?e.c=e.e=null:i<L?e.c=[e.e=0]:(e.e=i,e.c=t),e}function U(e,t,i,n){var a,s,c,d,f,p,_,m=e.c,g=h;if(m){e:{for(a=1,d=m[0];d>=10;d/=10,a++);if((s=t-a)<0)s+=u,c=t,_=(f=m[p=0])/g[a-c-1]%10|0;else if((p=r((s+1)/u))>=m.length){if(!n)break e;for(;m.length<=p;m.push(0));f=_=0,a=1,c=(s%=u)-u+1}else{for(f=d=m[p],a=1;d>=10;d/=10,a++);_=(c=(s%=u)-u+a)<0?0:f/g[a-c-1]%10|0}if(n=n||t<0||null!=m[p+1]||(c<0?f:f%g[a-c-1]),n=i<4?(_||n)&&(0==i||i==(e.s<0?3:2)):_>5||5==_&&(4==i||n||6==i&&(s>0?c>0?f/g[a-c]:0:m[p-1])%10&1||i==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=g[(u-t%u)%u],e.e=-t||0):m[0]=e.e=0,e;if(0==s?(m.length=p,d=1,p--):(m.length=p+1,d=g[u-s],m[p]=c>0?o(f/g[a-c]%g[c])*d:0),n)for(;;){if(0==p){for(s=1,c=m[0];c>=10;c/=10,s++);for(c=m[0]+=d,d=1;c>=10;c/=10,d++);s!=d&&(e.e++,m[0]==l&&(m[0]=1));break}if(m[p]+=d,m[p]!=l)break;m[p--]=0,d=1}for(s=m.length;0===m[--s];m.pop());}e.e>M?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}function V(e){var t,i=e.e;return null===i?e.toString():(t=_(e.c),t=i<=P||i>=A?y(t,i):v(t,i,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,i;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(g(i=e[t],0,f,t),w=i),e.hasOwnProperty(t="ROUNDING_MODE")&&(g(i=e[t],0,8,t),E=i),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((i=e[t])&&i.pop?(g(i[0],-f,0,t),g(i[1],0,f,t),P=i[0],A=i[1]):(g(i,-f,f,t),P=-(A=i<0?-i:i))),e.hasOwnProperty(t="RANGE"))if((i=e[t])&&i.pop)g(i[0],-f,-1,t),g(i[1],1,f,t),L=i[0],M=i[1];else{if(g(i,-f,f,t),!i)throw Error(a+t+" cannot be zero: "+i);L=-(M=i<0?-i:i)}if(e.hasOwnProperty(t="CRYPTO")){if((i=e[t])!==!!i)throw Error(a+t+" not true or false: "+i);if(i){if(!(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes)))throw R=!i,Error(a+"crypto unavailable");R=i}else R=i}if(e.hasOwnProperty(t="MODULO_MODE")&&(g(i=e[t],0,9,t),O=i),e.hasOwnProperty(t="POW_PRECISION")&&(g(i=e[t],0,f,t),D=i),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(i=e[t]))throw Error(a+t+" not an object: "+i);I=i}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(i=e[t])||/^.$|[+-.\s]|(.).*\1/.test(i))throw Error(a+t+" invalid: "+i);F=i}}return{DECIMAL_PLACES:w,ROUNDING_MODE:E,EXPONENTIAL_AT:[P,A],RANGE:[L,M],CRYPTO:R,MODULO_MODE:O,POW_PRECISION:D,FORMAT:I,ALPHABET:F}},B.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!B.DEBUG)return!0;var t,i,n=e.c,r=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&r>=-f&&r<=f&&r===o(r)){if(0===n[0]){if(0===r&&1===n.length)return!0;break e}if((t=(r+1)%u)<1&&(t+=u),String(n[0]).length==t){for(t=0;t<n.length;t++)if((i=n[t])<0||i>=l||i!==o(i))break e;if(0!==i)return!0}}}else if(null===n&&null===r&&(null===s||1===s||-1===s))return!0;throw Error(a+"Invalid BigNumber: "+e)},B.maximum=B.max=function(){return G(arguments,C.lt)},B.minimum=B.min=function(){return G(arguments,C.gt)},B.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return o(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var i,n,s,l,c,d=0,p=[],_=new B(S);if(null==e?e=w:g(e,0,f),l=r(e/u),R)if(crypto.getRandomValues){for(i=crypto.getRandomValues(new Uint32Array(l*=2));d<l;)(c=131072*i[d]+(i[d+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),i[d]=n[0],i[d+1]=n[1]):(p.push(c%1e14),d+=2);d=l/2}else{if(!crypto.randomBytes)throw R=!1,Error(a+"crypto unavailable");for(i=crypto.randomBytes(l*=7);d<l;)(c=281474976710656*(31&i[d])+1099511627776*i[d+1]+4294967296*i[d+2]+16777216*i[d+3]+(i[d+4]<<16)+(i[d+5]<<8)+i[d+6])>=9e15?crypto.randomBytes(7).copy(i,d):(p.push(c%1e14),d+=7);d=l/7}if(!R)for(;d<l;)(c=t())<9e15&&(p[d++]=c%1e14);for(l=p[--d],e%=u,l&&e&&(c=h[u-e],p[d]=o(l/c)*c);0===p[d];p.pop(),d--);if(d<0)p=[s=0];else{for(s=-1;0===p[0];p.splice(0,1),s-=u);for(d=1,c=p[0];c>=10;c/=10,d++);d<u&&(s-=u-d)}return _.e=s,_.c=p,_}}(),B.sum=function(){for(var e=1,t=arguments,i=new B(t[0]);e<t.length;)i=i.plus(t[e++]);return i},b=function(){var e="0123456789";function t(e,t,i,n){for(var r,o,a=[0],s=0,l=e.length;s<l;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),r=0;r<a.length;r++)a[r]>i-1&&(null==a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/i|0,a[r]%=i)}return a.reverse()}return function(i,n,r,o,a){var s,l,u,c,h,d,f,p,m=i.indexOf("."),g=w,x=E;for(m>=0&&(c=D,D=0,i=i.replace(".",""),d=(p=new B(n)).pow(i.length-m),D=c,p.c=t(v(_(d.c),d.e,"0"),10,r,e),p.e=p.c.length),u=c=(f=t(i,n,r,a?(s=F,e):(s=e,F))).length;0==f[--c];f.pop());if(!f[0])return s.charAt(0);if(m<0?--u:(d.c=f,d.e=u,d.s=o,f=(d=$(d,p,g,x,r)).c,h=d.r,u=d.e),m=f[l=u+g+1],c=r/2,h=h||l<0||null!=f[l+1],h=x<4?(null!=m||h)&&(0==x||x==(d.s<0?3:2)):m>c||m==c&&(4==x||h||6==x&&1&f[l-1]||x==(d.s<0?8:7)),l<1||!f[0])i=h?v(s.charAt(1),-g,s.charAt(0)):s.charAt(0);else{if(f.length=l,h)for(--r;++f[--l]>r;)f[l]=0,l||(++u,f=[1].concat(f));for(c=f.length;!f[--c];);for(m=0,i="";m<=c;i+=s.charAt(f[m++]));i=v(i,u,s.charAt(0))}return i}}(),$=function(){function e(e,t,i){var n,r,o,a,s=0,l=e.length,u=t%d,c=t/d|0;for(e=e.slice();l--;)s=((r=u*(o=e[l]%d)+(n=c*o+(a=e[l]/d|0)*u)%d*d+s)/i|0)+(n/d|0)+c*a,e[l]=r%i;return s&&(e=[s].concat(e)),e}function t(e,t,i,n){var r,o;if(i!=n)o=i>n?1:-1;else for(r=o=0;r<i;r++)if(e[r]!=t[r]){o=e[r]>t[r]?1:-1;break}return o}function i(e,t,i,n){for(var r=0;i--;)e[i]-=r,r=e[i]<t[i]?1:0,e[i]=r*n+e[i]-t[i];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,r,a,s,c){var h,d,f,_,m,g,x,y,v,$,b,T,C,S,w,E,P,A=n.s==r.s?1:-1,L=n.c,M=r.c;if(!(L&&L[0]&&M&&M[0]))return new B(n.s&&r.s&&(L?!M||L[0]!=M[0]:M)?L&&0==L[0]||!M?0*A:A/0:NaN);for(v=(y=new B(A)).c=[],A=a+(d=n.e-r.e)+1,c||(c=l,d=p(n.e/u)-p(r.e/u),A=A/u|0),f=0;M[f]==(L[f]||0);f++);if(M[f]>(L[f]||0)&&d--,A<0)v.push(1),_=!0;else{for(S=L.length,E=M.length,f=0,A+=2,(m=o(c/(M[0]+1)))>1&&(M=e(M,m,c),L=e(L,m,c),E=M.length,S=L.length),C=E,b=($=L.slice(0,E)).length;b<E;$[b++]=0);P=M.slice(),P=[0].concat(P),w=M[0],M[1]>=c/2&&w++;do{if(m=0,(h=t(M,$,E,b))<0){if(T=$[0],E!=b&&(T=T*c+($[1]||0)),(m=o(T/w))>1)for(m>=c&&(m=c-1),x=(g=e(M,m,c)).length,b=$.length;1==t(g,$,x,b);)m--,i(g,E<x?P:M,x,c),x=g.length,h=1;else 0==m&&(h=m=1),x=(g=M.slice()).length;if(x<b&&(g=[0].concat(g)),i($,g,b,c),b=$.length,-1==h)for(;t(M,$,E,b)<1;)m++,i($,E<b?P:M,b,c),b=$.length}else 0===h&&(m++,$=[0]);v[f++]=m,$[0]?$[b++]=L[C]||0:($=[L[C]],b=1)}while((C++<S||null!=$[0])&&A--);_=null!=$[0],v[0]||v.splice(0,1)}if(c==l){for(f=1,A=v[0];A>=10;A/=10,f++);U(y,a+(y.e=f+d*u-1)+1,s,_)}else y.e=d,y.r=+_;return y}}(),T=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,i=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,r=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,s,l,u){var c,h=l?s:s.replace(r,"");if(n.test(h))o.s=isNaN(h)?null:h<0?-1:1;else{if(!l&&(h=h.replace(e,(function(e,t,i){return c="x"==(i=i.toLowerCase())?16:"b"==i?2:8,u&&u!=c?e:t})),u&&(c=u,h=h.replace(t,"$1").replace(i,"0.$1")),s!=h))return new B(h,c);if(B.DEBUG)throw Error(a+"Not a"+(u?" base "+u:"")+" number: "+s);o.s=null}o.c=o.e=null}}(),C.absoluteValue=C.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},C.comparedTo=function(e,t){return m(this,new B(e,t))},C.decimalPlaces=C.dp=function(e,t){var i,n,r,o=this;if(null!=e)return g(e,0,f),null==t?t=E:g(t,0,8),U(new B(o),e+o.e+1,t);if(!(i=o.c))return null;if(n=((r=i.length-1)-p(this.e/u))*u,r=i[r])for(;r%10==0;r/=10,n--);return n<0&&(n=0),n},C.dividedBy=C.div=function(e,t){return $(this,new B(e,t),w,E)},C.dividedToIntegerBy=C.idiv=function(e,t){return $(this,new B(e,t),0,1)},C.exponentiatedBy=C.pow=function(e,t){var i,n,s,l,c,h,d,f,p=this;if((e=new B(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+V(e));if(null!=t&&(t=new B(t)),c=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return f=new B(Math.pow(+V(p),c?2-x(e):+V(e))),t?f.mod(t):f;if(h=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(n=!h&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||c&&p.c[1]>=24e7:p.c[0]<8e13||c&&p.c[0]<=9999975e7)))return l=p.s<0&&x(e)?-0:0,p.e>-1&&(l=1/l),new B(h?1/l:l);D&&(l=r(D/u+2))}for(c?(i=new B(.5),h&&(e.s=1),d=x(e)):d=(s=Math.abs(+V(e)))%2,f=new B(S);;){if(d){if(!(f=f.times(p)).c)break;l?f.c.length>l&&(f.c.length=l):n&&(f=f.mod(t))}if(s){if(0===(s=o(s/2)))break;d=s%2}else if(U(e=e.times(i),e.e+1,1),e.e>14)d=x(e);else{if(0===(s=+V(e)))break;d=s%2}p=p.times(p),l?p.c&&p.c.length>l&&(p.c.length=l):n&&(p=p.mod(t))}return n?f:(h&&(f=S.div(f)),t?f.mod(t):l?U(f,D,E,undefined):f)},C.integerValue=function(e){var t=new B(this);return null==e?e=E:g(e,0,8),U(t,t.e+1,e)},C.isEqualTo=C.eq=function(e,t){return 0===m(this,new B(e,t))},C.isFinite=function(){return!!this.c},C.isGreaterThan=C.gt=function(e,t){return m(this,new B(e,t))>0},C.isGreaterThanOrEqualTo=C.gte=function(e,t){return 1===(t=m(this,new B(e,t)))||0===t},C.isInteger=function(){return!!this.c&&p(this.e/u)>this.c.length-2},C.isLessThan=C.lt=function(e,t){return m(this,new B(e,t))<0},C.isLessThanOrEqualTo=C.lte=function(e,t){return-1===(t=m(this,new B(e,t)))||0===t},C.isNaN=function(){return!this.s},C.isNegative=function(){return this.s<0},C.isPositive=function(){return this.s>0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.minus=function(e,t){var i,n,r,o,a=this,s=a.s;if(t=(e=new B(e,t)).s,!s||!t)return new B(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/u,h=e.e/u,d=a.c,f=e.c;if(!c||!h){if(!d||!f)return d?(e.s=-t,e):new B(f?a:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new B(d[0]?a:3==E?-0:0)}if(c=p(c),h=p(h),d=d.slice(),s=c-h){for((o=s<0)?(s=-s,r=d):(h=c,r=f),r.reverse(),t=s;t--;r.push(0));r.reverse()}else for(n=(o=(s=d.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(d[t]!=f[t]){o=d[t]<f[t];break}if(o&&(r=d,d=f,f=r,e.s=-e.s),(t=(n=f.length)-(i=d.length))>0)for(;t--;d[i++]=0);for(t=l-1;n>s;){if(d[--n]<f[n]){for(i=n;i&&!d[--i];d[i]=t);--d[i],d[n]+=l}d[n]-=f[n]}for(;0==d[0];d.splice(0,1),--h);return d[0]?z(e,d,h):(e.s=3==E?-1:1,e.c=[e.e=0],e)},C.modulo=C.mod=function(e,t){var i,n,r=this;return e=new B(e,t),!r.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||r.c&&!r.c[0]?new B(r):(9==O?(n=e.s,e.s=1,i=$(r,e,0,3),e.s=n,i.s*=n):i=$(r,e,0,O),!(e=r.minus(i.times(e))).c[0]&&1==O&&(e.s=r.s),e)},C.multipliedBy=C.times=function(e,t){var i,n,r,o,a,s,c,h,f,_,m,g,x,y,v,$=this,b=$.c,T=(e=new B(e,t)).c;if(!(b&&T&&b[0]&&T[0]))return!$.s||!e.s||b&&!b[0]&&!T||T&&!T[0]&&!b?e.c=e.e=e.s=null:(e.s*=$.s,b&&T?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=p($.e/u)+p(e.e/u),e.s*=$.s,(c=b.length)<(_=T.length)&&(x=b,b=T,T=x,r=c,c=_,_=r),r=c+_,x=[];r--;x.push(0));for(y=l,v=d,r=_;--r>=0;){for(i=0,m=T[r]%v,g=T[r]/v|0,o=r+(a=c);o>r;)i=((h=m*(h=b[--a]%v)+(s=g*h+(f=b[a]/v|0)*m)%v*v+x[o]+i)/y|0)+(s/v|0)+g*f,x[o--]=h%y;x[o]=i}return i?++n:x.splice(0,1),z(e,x,n)},C.negated=function(){var e=new B(this);return e.s=-e.s||null,e},C.plus=function(e,t){var i,n=this,r=n.s;if(t=(e=new B(e,t)).s,!r||!t)return new B(NaN);if(r!=t)return e.s=-t,n.minus(e);var o=n.e/u,a=e.e/u,s=n.c,c=e.c;if(!o||!a){if(!s||!c)return new B(r/0);if(!s[0]||!c[0])return c[0]?e:new B(s[0]?n:0*r)}if(o=p(o),a=p(a),s=s.slice(),r=o-a){for(r>0?(a=o,i=c):(r=-r,i=s),i.reverse();r--;i.push(0));i.reverse()}for((r=s.length)-(t=c.length)<0&&(i=c,c=s,s=i,t=r),r=0;t;)r=(s[--t]=s[t]+c[t]+r)/l|0,s[t]=l===s[t]?0:s[t]%l;return r&&(s=[r].concat(s),++a),z(e,s,a)},C.precision=C.sd=function(e,t){var i,n,r,o=this;if(null!=e&&e!==!!e)return g(e,1,f),null==t?t=E:g(t,0,8),U(new B(o),e,t);if(!(i=o.c))return null;if(n=(r=i.length-1)*u+1,r=i[r]){for(;r%10==0;r/=10,n--);for(r=i[0];r>=10;r/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},C.shiftedBy=function(e){return g(e,-c,c),this.times("1e"+e)},C.squareRoot=C.sqrt=function(){var e,t,i,n,r,o=this,a=o.c,s=o.s,l=o.e,u=w+4,c=new B("0.5");if(1!==s||!a||!a[0])return new B(!s||s<0&&(!a||a[0])?NaN:a?o:1/0);if(0==(s=Math.sqrt(+V(o)))||s==1/0?(((t=_(a)).length+l)%2==0&&(t+="0"),s=Math.sqrt(+t),l=p((l+1)/2)-(l<0||l%2),s==1/0?t="1e"+l:t=(t=s.toExponential()).slice(0,t.indexOf("e")+1)+l,i=new B(t)):i=new B(s+""),i.c[0])for((s=(l=i.e)+u)<3&&(s=0);;)if(r=i,i=c.times(r.plus($(o,r,u,1))),_(r.c).slice(0,s)===(t=_(i.c)).slice(0,s)){if(i.e<l&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(n||"4999"!=t)){(!+t||!+t.slice(1)&&"5"==t.charAt(0))&&(U(i,i.e+w+2,1),e=!i.times(i).eq(o));break}if(!n&&(U(r,r.e+w+2,0),r.times(r).eq(o))){i=r;break}u+=4,s+=4,n=1}return U(i,i.e+w+1,E,e)},C.toExponential=function(e,t){return null!=e&&(g(e,0,f),e++),N(this,e,t,1)},C.toFixed=function(e,t){return null!=e&&(g(e,0,f),e=e+this.e+1),N(this,e,t)},C.toFormat=function(e,t,i){var n,r=this;if(null==i)null!=e&&t&&"object"==typeof t?(i=t,t=null):e&&"object"==typeof e?(i=e,e=t=null):i=I;else if("object"!=typeof i)throw Error(a+"Argument not an object: "+i);if(n=r.toFixed(e,t),r.c){var o,s=n.split("."),l=+i.groupSize,u=+i.secondaryGroupSize,c=i.groupSeparator||"",h=s[0],d=s[1],f=r.s<0,p=f?h.slice(1):h,_=p.length;if(u&&(o=l,l=u,u=o,_-=o),l>0&&_>0){for(o=_%l||l,h=p.substr(0,o);o<_;o+=l)h+=c+p.substr(o,l);u>0&&(h+=c+p.slice(o)),f&&(h="-"+h)}n=d?h+(i.decimalSeparator||"")+((u=+i.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):d):h}return(i.prefix||"")+n+(i.suffix||"")},C.toFraction=function(e){var t,i,n,r,o,s,l,c,d,f,p,m,g=this,x=g.c;if(null!=e&&(!(l=new B(e)).isInteger()&&(l.c||1!==l.s)||l.lt(S)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+V(l));if(!x)return new B(g);for(t=new B(S),d=i=new B(S),n=c=new B(S),m=_(x),o=t.e=m.length-g.e-1,t.c[0]=h[(s=o%u)<0?u+s:s],e=!e||l.comparedTo(t)>0?o>0?t:d:l,s=M,M=1/0,l=new B(m),c.c[0]=0;f=$(l,t,0,1),1!=(r=i.plus(f.times(n))).comparedTo(e);)i=n,n=r,d=c.plus(f.times(r=d)),c=r,t=l.minus(f.times(r=t)),l=r;return r=$(e.minus(i),n,0,1),c=c.plus(r.times(d)),i=i.plus(r.times(n)),c.s=d.s=g.s,p=$(d,n,o*=2,E).minus(g).abs().comparedTo($(c,i,o,E).minus(g).abs())<1?[d,n]:[c,i],M=s,p},C.toNumber=function(){return+V(this)},C.toPrecision=function(e,t){return null!=e&&g(e,1,f),N(this,e,t,2)},C.toString=function(e){var t,i=this,n=i.s,r=i.e;return null===r?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=r<=P||r>=A?y(_(i.c),r):v(_(i.c),r,"0"):10===e?t=v(_((i=U(new B(i),w+r+1,E)).c),i.e,"0"):(g(e,2,F.length,"Base"),t=b(v(_(i.c),r,"0"),10,e,n,!0)),n<0&&i.c[0]&&(t="-"+t)),t},C.valueOf=C.toJSON=function(){return V(this)},C._isBigNumber=!0,n&&(C[Symbol.toStringTag]="BigNumber",C[Symbol.for("nodejs.util.inspect.custom")]=C.valueOf),null!=t&&B.set(t),B}(),t.default=t.BigNumber=t,"function"==typeof define&&define.amd?define((function(){return t})):typeof module<"u"&&module.exports?module.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t),t}(),ee$3={},Me$3={iServer:0,oss:1};function De$2(e,t){this.RSAAuthenticationStatus={},this._customRequestHeaders=e.customRequestHeaders,this._scene=t,this.camera=t.camera}function xr$1(e){var t={},i=e.firstChild,n=s$T.queryStringValue(i,"Version");t.version=n;var r=s$T.queryStringValue(i,"FileType");t.fileType=r;var o=s$T.queryFirstNode(i,"WaterEffect"),a=s$T.queryNumericValue(o,"AverageHeight");t.averageHeight=a;var s=s$T.queryNodes(o,"GpuProgramParameters");t.gpuProgramParameters=[];for(var l=0,u=s.length;l<u;l++){var c={gpuConstants:[],atuoConstants:[]},h=s[l],d=s$T.queryFirstNode(h,"GpuConstants");if(d)for(var f=s$T.queryNodes(d,"GpuConstantDefinition"),p=0,_=f.length;p<_;p++){var m={},g=f[p],x=s$T.queryNumericValue(g,"ConstType");m.constType=x;var y=s$T.queryNumericValue(g,"Index");m.index=y;var v=s$T.queryStringValue(g,"Name");m.name=v;var $=s$T.queryNumericValue(g,"ArraySize");m.arraySize=$;var b=s$T.queryNumericValue(g,"Multiple");m.multiple=b;var T=s$T.queryFirstNode(g,"ArrayFloat");if(m.arrayFloat=[],T)for(var C=s$T.queryNodes(T,"Float"),S=0;S<$;){var w=parseFloat(C[S].textContent);m.arrayFloat.push(w),S++}c.gpuConstants.push(m)}var E=s$T.queryFirstNode(h,"AutoConstants");if(E){var P=s$T.queryNodes(E,"AutoConstantEntry");for(p=0,_=P.length;p<_;p++){m={};var A=P[p],L=s$T.queryNumericValue(A,"ParamType");m.paramType=L;v=s$T.queryStringValue(A,"Name");m.name=v;var M=s$T.queryNumericValue(A,"PhysicalIndex");m.physicalIndex=M;var R=s$T.queryNumericValue(A,"ElementCount");m.elementCount=R;var O=s$T.queryNumericValue(A,"Data");m.data=O;var D=s$T.queryNumericValue(A,"FData");m.fData=D;var I=s$T.queryBooleanValue(A,"IsReal");m.isReal=I,c.atuoConstants.push(m)}}t.gpuProgramParameters.push(c)}return t}function Xr$1(e,t,i,n){var r=o$1l.defer(),o=e.toString()+"indexData.dat";if(e$2e(a$O.CREDENTIAL)&&(o=a$O.addToken(o)),i===Tr$4.KEY_VALUE){var a=m$1c(n.split("?")[1]),s={suffix:"dat"},l=m$1d(s=Object.assign(s,a),!0),u=n.match(/(\S*)\/config/);u.length>0&&(o=u[0]+"?"+l)}return o$1l(d$1f(o,t),(function(e){for(var t=new e$1Q,i=e.firstChild,n=i.namespace,o=s$T.queryFirstNode(i,"FieldDefines",n),a=s$T.queryChildNodes(o,"FieldDefine",n),s=0;s<a.length;s++){var l=s$T.queryStringAttribute(a[s],"Name"),u=s$T.queryStringAttribute(a[s],"Type"),c=s$T.queryStringAttribute(a[s],"Size");t.set(l,{type:u,size:c})}r.resolve(t)}),(function(){r.reject()})),r.promise}function Kr$1(e,t,i,n){var r=o$1l.defer();if(e$2e(i)){var o,a=e.toString();if(n===Tr$4.KEY_VALUE){var s=m$1c(a.split("?")[1]),l={suffix:"attribute.json"},u=m$1d(l=Object.assign(l,s),!0),c=a.match(/(\S*)\/config/);c.length>0&&(o=c[0]+"?"+u)}else{var h=a.substring(0,a.indexOf("/realspace")+10);o=a+"attribute.json",e$2e(a$O.CREDENTIAL)&&(o=e$2e(a$O.CREDENTIAL._keymap[h])?a$O.addTokenWithKey(h,o):a$O.addToken(o))}o$1l(u$P(o,t),(function(e){if(e.layerInfos){for(var t=e.layerInfos[0].fieldInfos,i=new e$1Q,n=0;n<t.length;n++)i.set(t[n].name,{type:t[n].type,size:t[n].size});var o,a=void 0;if(e$2e(e.indexInfos)){o={},a={};n=0;for(var s=e.indexInfos.length;n<s;n++){var l=e.indexInfos[n],u=f$Q(l.rootNodePath);o[u=u.replace(".s3mb","")]=l.indexInfo,a[l.rootNodePath.replace(".s3mb","")]=l.indexInfo}}r.resolve({fieldsInfo:i,indexInfoMap:o,indexInfoAttributeMap:a})}else r.reject()}),(function(){r.reject()}))}else r.reject();return r.promise}function Gr(e,t,i){if(e&&t){var n=e.firstChild;if(n){var r=n.namespaceURI,o=s$T.queryFirstNode(n,"AttachFiles",r);if(o){for(var a=s$T.queryNodes(o,"AttachFile",r),s=[],l=0,u=a.length;l<u;l++){var c=a[l].textContent;if(c.indexOf("water")>0){var h=t+c;s.push(d$1f(h,i))}}if(!s.length)return;var d=o$1l.defer();return o$1l.all(s,(function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];if(!r)break;var o=xr$1(r);t.push(o)}d.resolve(t)}),(function(){})),d.promise}}}}function Yr$1(e,t,i){if(e&&t){var n=e.extensions;if(e$2e(n)&&e$2e(n.attachFiles)){for(var r=n.attachFiles,o=[],a=0,s=r.length;a<s;a++){var l=r[a].attachFile;if(l.indexOf(".water")>0){var u=t+l;e$2e(a$O.CREDENTIAL)&&(u=a$O.addToken(u)),o.push(d$1f(u,i))}}if(o.length){var c=o$1l.defer();return o$1l.all(o,(function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];if(!r)break;var o=xr$1(r);t.push(o)}c.resolve(t)}),(function(){})),c.promise}}}}function Zr$1(e,t,i){var n=e.firstChild,r=n.namespace;if("Spatial3DModel"===n.localName){s$T.queryStringValue(n,"Asset",r),s$T.queryStringValue(n,"Version",r);var o=s$T.queryStringValue(n,"DataType",r);s$T.queryStringValue(n,"PyramidSplitType",r),s$T.queryStringValue(n,"LodType",r);var a=s$T.queryFirstNode(n,"Position",r),s=s$T.queryNumericValue(a,"X",r),l=s$T.queryNumericValue(a,"Y",r),u=s$T.queryNumericValue(a,"Z",r);if(e$2e(ie=s$T.queryFirstNode(n,"GeoBounds",r))){var c=s$T.queryNumericValue(ie,"Left",r),h=s$T.queryNumericValue(ie,"Top",r),d=s$T.queryNumericValue(ie,"Right",r),f=s$T.queryNumericValue(ie,"Bottom",r);Q=h$18.fromDegrees(c,f,d,h)}var p=s$T.queryFirstNode(n,"HeightRange",r),_=s$T.queryNumericValue(p,"Min",r),m=s$T.queryNumericValue(p,"Max",r),g=s$T.queryFirstNode(n,"CategoryRange",r),x=s$T.queryNumericValue(g,"MaxCategory",r),y=s$T.queryNumericValue(g,"MinCategory",r),v=s$T.queryFirstNode(n,"WDescript",r),$=s$T.queryFirstNode(v,"Range",r),b=s$T.queryNumericValue($,"Min",r),T=s$T.queryNumericValue($,"Max",r);x=x||T,y=y||b;var C=s$T.queryFirstNode(n,"Extensions",r),S=s$T.queryStringValue(C,"FileType",r);s$T.queryStringValue(C,"TileSplitType",r);var w=s$T.queryBooleanValue(C,"TextureSharing",r),E=s$T.queryBooleanValue(C,"TransparencyOptimization",r),P=s$T.queryStringValue(C,"VertexWeightMode",r),A=s$T.queryStringValue(C,"ProcessType",r),L={};(Ce=t.split("?")).length>1&&(L=m$1c(Ce[1]),t=Ce[0]);for(var M=new h$16(i===Me$3.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),R=[],O=/\\+/g,D=s$T.queryFirstNode(n,"Tiles",r),I=!1,F=0,B=(Se=s$T.queryNodes(D,"Tile",r)).length;F<B;F++){var N=Se[F],G=(De=s$T.queryStringValue(N,"Url",r)).lastIndexOf(".");".s3mbz"===De.substring(G,De.length)&&(I=!0);var z=i$1b(De=(De=De.replace(O,"/")).replace(/(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,"")),U=f$Q(De);(Ie={}).relativePath=new h$16(z),Ie.name=U;var V=s$T.queryFirstNode(N,"Boundingbox",r);if(e$2e(V)){var k=s$T.queryFirstNode(V,"Min",r),W=s$T.queryFirstNode(V,"Max",r),H=s$T.queryNumericValue(k,"X",r),q=s$T.queryNumericValue(k,"Y",r),j=s$T.queryNumericValue(k,"Z",r),X=s$T.queryNumericValue(W,"X",r),Y=s$T.queryNumericValue(W,"Y",r),Z=s$T.queryNumericValue(W,"Z",r),K=new i$1d;i$1d.fromCornerPoints(new o$1p(H,q,j),new o$1p(X,Y,Z),K),Ie.bSphere=K}R.push(Ie)}return{position:{lon:s,lat:l,height:u},fileType:S,maxInstensity:0,minInstensity:0,maxHeight:m,minHeight:_,maxCategory:x,minCategory:y,layerBounds:Q,baseUri:M,rootEntities:R,isTextureShare:w,urlArguments:L,isS3MB:!0,isS3MZ:I,processType:A,dataType:o,isTransparencyOptimization:E,vertexWeightMode:P}}S=s$T.queryStringValue(n,"FileType",r),w=s$T.queryBooleanValue(n,"TextureSharing",r),E=s$T.queryBooleanValue(n,"TransparencyOptimization",r),P=s$T.queryStringValue(n,"VertexWeightMode",r);var Q,J=s$T.queryFirstNode(n,"InstensityRange",r),ee=s$T.queryNumericValue(J,"MinInstensity",r),te=s$T.queryNumericValue(J,"MaxInstensity",r),ie=(p=s$T.queryFirstNode(n,"HeightRange",r),_=s$T.queryNumericValue(p,"MinHeight",r),m=s$T.queryNumericValue(p,"MaxHeight",r),g=s$T.queryFirstNode(n,"CategoryRange",r),x=s$T.queryNumericValue(g,"MaxCategory",r),y=s$T.queryNumericValue(g,"MinCategory",r),A=s$T.queryStringValue(n,"ProcessType",r),a=s$T.queryFirstNode(n,"Position",r),s=s$T.queryNumericValue(a,"X",r),l=s$T.queryNumericValue(a,"Y",r),u=s$T.queryNumericValue(a,"Z",r),s$T.queryFirstNode(n,"Bounds",r)),ne=s$T.queryFirstNode(n,"BoundingBox",r),re=s$T.queryStringValue(n,"IDFieldName",r),oe=s$T.queryStringValue(n,"AttributeExtentName",r);if(e$2e(ie)){c=s$T.queryNumericValue(ie,"Left",r),h=s$T.queryNumericValue(ie,"Top",r),d=s$T.queryNumericValue(ie,"Right",r),f=s$T.queryNumericValue(ie,"Bottom",r);Q=h$18.fromDegrees(c,f,d,h)}else if(e$2e(ne)){var ae=s$T.queryNumericValue(ne,"MinX",r),se=s$T.queryNumericValue(ne,"MinY",r);s$T.queryNumericValue(ne,"MinZ",r);var le=s$T.queryNumericValue(ne,"MaxX",r),ue=s$T.queryNumericValue(ne,"MaxY",r);s$T.queryNumericValue(ne,"MaxZ",r),ae=180*Math.abs(ae)/(6378137*Math.PI),se=180*Math.abs(se)/(6378137*Math.PI),le=180*Math.abs(le)/(6378137*Math.PI),ue=180*Math.abs(ue)/(6378137*Math.PI),Q=h$18.fromDegrees(s-ae,l-se,s+le,l+ue)}else Q=h$18.fromDegrees(s-1e-5,l-1e-5,s+1e-5,l+1e-5);var ce=void 0,he=s$T.queryNodes(n,"Vol",r);if(e$2e(he)&&he.length>0){var de=[],fe=[],pe=[],_e=[];for(F=0,B=he.length;F<B;F++){var me=he[F],ge=s$T.queryStringValue(me,"Name",r);de.push(ge);var xe=s$T.queryStringValue(me,"AttachFileExt",r);_e.push(xe);var ye=s$T.queryFirstNode(me,"VolumeValueRange",r);if(e$2e(ye)){var ve=s$T.queryNumericValue(ye,"MinValue",r),$e=s$T.queryNumericValue(ye,"MaxValue",r);fe.push($e),pe.push(ve)}}ce={bVolume:!0,strVolumeExts:_e,volNames:de,maxValues:fe,minValues:pe}}var be=s$T.queryFirstNode(n,"VolumeValueRange",r);if(e$2e(be)){ve=s$T.queryNumericValue(be,"MinValue",r),$e=s$T.queryNumericValue(be,"MaxValue",r);var Te=s$T.queryStringValue(n,"AttachFileExt",r);e$2e(ce)?(ce.volNames.push(""),ce.maxValues.push($e),ce.minValues.push(ve)):ce={bVolume:!0,strVolumeExts:[Te],volNames:[""],maxValues:[$e],minValues:[ve]}}var Ce;L={};(Ce=t.split("?")).length>1&&(L=m$1c(Ce[1]),t=Ce[0]);M=new h$16(i===Me$3.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),R=[],O=/\\+/g,D=s$T.queryFirstNode(n,"OSGFiles",r);var Se,we=!1;if((Se=s$T.queryNodes(D,"Files",r)).length>0)for(F=0,B=Se.length;F<B;F++){N=Se[F];(De=s$T.queryStringValue(N,"FileName",r)).endsWith(".osgb")&&(we=!0);z=i$1b(De=(De=De.replace(O,"/")).replace(/(\.s3m)|(\.osgb)/gi,"")),U=f$Q(De);(Ie={}).relativePath=new h$16(z),Ie.name=U;var Ee=s$T.queryFirstNode(N,"BoundingSphere",r);if(e$2e(Ee)&&Ee.childNodes.length){var Pe=s$T.queryNumericValue(Ee,"CenterX",r),Ae=s$T.queryNumericValue(Ee,"CenterY",r),Le=s$T.queryNumericValue(Ee,"CenterZ",r),Me=s$T.queryNumericValue(Ee,"Radius",r),Re=new o$1p(Pe,Ae,Le);Ie.bSphere=new i$1d(Re,Me)}R.push(Ie)}else{var Oe=s$T.queryNodes(D,"FileName",r);for(F=0,B=Oe.length;F<B;F++){var De;(De=Oe[F].textContent).endsWith(".osgb")&&(we=!0);var Ie;z=i$1b(De=(De=De.replace(O,"/")).replace(/(\.s3m)|(\.osgb)/gi,"")),U=f$Q(De);(Ie={}).relativePath=new h$16(z),Ie.name=U,R.push(Ie)}}var Fe=void 0,Be=s$T.queryFirstNode(n,"Levels",r);if(e$2e(Be)){var Ne=s$T.queryNodes(Be,"Level",r);e$2e(Ne)&&Ne.length>0&&(Fe=parseInt(Ne[0].textContent))}return{position:{lon:s,lat:l,height:u},fileType:S,maxInstensity:te,minInstensity:ee,maxHeight:m,minHeight:_,maxCategory:x,minCategory:y,processType:A,layerBounds:Q,volumeObj:ce,baseUri:M,rootEntities:R,urlArguments:L,isTextureShare:w,isS3MB:!1,isOSGB:we,isTransparencyOptimization:E,vertexWeightMode:P,level:Fe,idFieldName:re,attributeExtentName:oe}}function wr$1(e,t,i){e.asset,e.version;var n=e.dataType;e.pyramidSplitType,e.lodType;var r,o,a,s,l=e.position.x,u=e.position.y,c=e.position.z,h=e.position.units;if(e$2e(e.geoBounds)){var d=e.geoBounds.left,f=e.geoBounds.top,p=e.geoBounds.right,_=e.geoBounds.bottom;d>180||_>180||p>180||f>180?(d>20037508.342789244&&(d-=20037508.342789244*Math.floor(d/20037508.342789244)),p>20037508.342789244&&(p-=20037508.342789244*Math.floor(p/20037508.342789244)),f>10018754.171394622&&(f-=20037508.342789244*Math.floor((f+10018754.171394622)/20037508.342789244)),_>10018754.171394622&&(_-=20037508.342789244*Math.floor((_+10018754.171394622)/20037508.342789244)),V=new h$18(d/=6378137,_/=6378137,p/=6378137,f/=6378137)):V=h$18.fromDegrees(d,_,p,f)}if(e$2e(e.heightRange)&&(r=e.heightRange.min,o=e.heightRange.max),e$2e(e.wDescript)){var m=e.wDescript.range;a=m.min,s=m.max}else if(e$2e(e.vertexAttributeDescript))for(let t=0;t<e.vertexAttributeDescript.length;t++){var g=e.vertexAttributeDescript[t];if("VertexWeight"==g.category){a=g.range.min[0],s=g.range.max[0];break}}var x,y,v,$,b,T,C,S,w,E,P,A,L,M,R=e.extensions,O=!0,D=-1;if(R.hasOwnProperty("s3m:FileType")&&(x=R["s3m:FileType"]),R.hasOwnProperty("s3m:TileSplitType")&&R["s3m:TileSplitType"],R.hasOwnProperty("s3m:ProcessType")&&(T=R["s3m:ProcessType"]),R.hasOwnProperty("IDFieldName")&&(C=R.IDFieldName),R.hasOwnProperty("textureLOD")&&(O="TRUE"===R.textureLOD),R.hasOwnProperty("s3m:MaterialType")&&(w=R["s3m:MaterialType"]),R.hasOwnProperty("globeType")&&(A=R.globeType),R.hasOwnProperty("temporalCount")&&(D=parseInt(R.temporalCount)),R.hasOwnProperty("levels"))for(var I=0,F=R.levels.length;I<F;I++){L=R.levels[I].level;break}R.hasOwnProperty("sml:Level")&&(L=parseInt(R["sml:Level"])),R.hasOwnProperty("s3m:TextureSharing")&&(y="TRUE"===R["s3m:TextureSharing"]),R.hasOwnProperty("s3m:TransparencyOptimization")&&(v="TRUE"===R["s3m:TransparencyOptimization"]),R.hasOwnProperty("s3m:VertexCompressionType")&&($=R["s3m:VertexCompressionType"]),R.hasOwnProperty("s3m:VertexWeightMode")&&(b=R["s3m:VertexWeightMode"]),R.hasOwnProperty("s3m:AttributeExtentName")&&(S=R["s3m:AttributeExtentName"]),R.hasOwnProperty("associateMaterialUrl")&&(E=R.associateMaterialUrl),R.hasOwnProperty("hasAttributeIndex")&&(P="TRUE"==R.hasAttributeIndex),R.hasOwnProperty("historicalRecord")&&(M=R.historicalRecord);var B=[],N=new e$1Q;if(R.hasOwnProperty("pointCloudLayers"))for(I=0,F=R.pointCloudLayers.length;I<F;I++){var G=R.pointCloudLayers[I].layerName;if(e$2e(G)){var z=R.pointCloudLayers[I].layerBounds;B.push(G),N.set(G,z)}else{var U=R.pointCloudLayers[I].layer,V=new h$18;N.set(U,V),B.push(U)}}var k=void 0,W=e.extensions.vol;if(e$2e(W)&&W.length>0)for(var H=[],q=[],j=[],X=[],Y=(I=0,W.length);I<Y;I++){var Z=W[I],K=Z.volName;H.push(K);var Q=Z.volType;X.push(Q);var J=Z.volRangeMin,ee=Z.volRangeMax;q.push(ee),j.push(J),k={bVolume:!0,strVolumeExts:X,volNames:H,maxValues:q,minValues:j}}var te=void 0,ie=e.extensions.map;if(e$2e(ie)&&ie.length>0){var ne=[],re=[];for(I=0,Y=ie.length;I<Y;I++){var oe=ie[I];K=oe.mapName;ne.push(K);Q=oe.dataType;re.push(Q),te={mapExts:re,mapNames:ne}}}var ae={},se=t.split("?");se.length>1&&(ae=m$1c(se[1]),t=se[0]);var le=new h$16(i===Me$3.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),ue=[],ce=/\\+/g,he=!1,de=!1,fe=!1,pe=e.tiles||e.rootTiles;for(I=0,F=pe.length;I<F;I++)if(e$2e(pe[I])){var _e=pe[I].url,me=_e.lastIndexOf("."),ge=_e.substring(me,_e.length);".s3mbz"===ge?he=!0:".s3mblock"===ge?de=!0:".osgb"===ge&&(fe=!0);var xe=i$1b(_e=(_e=_e.replace(ce,"/")).replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,"")),ye=f$Q(_e),ve={};if(ve.relativePath=new h$16(xe),ve.name=ye,e$2e(pe[I].boundingbox))if(e$2e(pe[I].boundingbox.center))ve.obb=pe[I].boundingbox;else{var $e=pe[I].boundingbox.min.x,be=pe[I].boundingbox.min.y,Te=pe[I].boundingbox.min.z,Ce=pe[I].boundingbox.max.x,Se=pe[I].boundingbox.max.y,we=pe[I].boundingbox.max.z;ve.min=new o$1p($e,be,Te),ve.max=new o$1p(Ce,Se,we);var Ee=new i$1d;i$1d.fromCornerPoints(ve.min,ve.max,Ee),ve.bSphere=Ee}ue.push(ve)}return{position:{lon:l,lat:u,height:c,units:h},fileType:x,maxInstensity:0,minInstensity:0,maxHeight:o,minHeight:r,maxCategory:s,minCategory:a,layerBounds:V,volumeObj:k,maps:te,baseUri:le,rootEntities:ue,isTextureShare:y,urlArguments:ae,isS3MB:!0,isS3MZ:he,isS3MBlock:de,isOSGB:fe,dataType:n,isTransparencyOptimization:v,vertexCompressionType:$,vertexWeightMode:b,level:L,pointCloudLayerNames:B,processType:T,groupNameBounds:N,idFieldName:C,attributeExtentName:S,materialType:w,textureLod:O,associateMaterialUrl:E,globeType:A,temporalCount:D,hasAttributeIndex:P,historicalRecord:M}}function Mr$1(e,t,i,n,r,o,a){a=u$Z(a,!1),o$1l(e,(function(e){if(n.fieldsInfo=e.fieldsInfo,n.indexInfoMap=e.indexInfoMap,n.indexInfoAttributeMap=e.indexInfoAttributeMap,e$2e(o.isFlyMode)&&!0===o.isFlyMode&&e$2e(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x1a71e8(n);a||t._layers.add(e,r),e$2e(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}),1e3)}});else{var s=new _0x1a71e8(n);a||t._layers.add(s,r),e$2e(t._clipRegions)&&s._setServerClipRegions(t._clipRegions,1),i.resolve(s)}}),(function(){if(!0===o.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x1a71e8(n);a||t._layers.add(e,r),e$2e(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}});else{var e=new _0x1a71e8(n);a||t._layers.add(e,r),e$2e(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}function ir$1(e,t,i,n,r,o,a,s){if(n.useWebsocket){var l=new i$W("websocketTaskProcessor");l.scheduleTask({data:"init",scpUrl:e});var u=e.substring(e.indexOf("datas")+6,e.indexOf("/data/path"))+".scp";l.scheduleTask({dataType:"json",data:"/"+u}).then((function(u){var c=wr$1(u,e,n.serverType);c.context=t.context,c.gl=t.context._gl,c.name=r,c.supportCompressType=t._supportCompressType,c.urlType=n.urlType,c.cullEnabled=n.cullEnabled,c.horizontalLine=n.horizontalLine,c.style3D=n.style3D,c.selectEnable=n.selectable,c.isVisible=n.isVisible,c.minVisibleAltitude=n.minVisibleAltitude,c.maxVisibleAltitude=n.maxVisibleAltitude,c.minVisibleDistance=n.minVisibleDistance,c.maxVisibleDistance=n.maxVisibleDistance,c.shadowType=n.shadowType,c.heading=n.heading,c.lodRangeScale=n.lodRangeScale,c.polygonOffset=n.polygonOffset,c.brightness=n.brightness,c.constrast=n.constrast,c.hue=n.hue,c.saturation=n.saturation,c.gamma=n.gamma,c.effect=n.effect,c.ignoreNormal=u$Z(n.ignoreNormal,!1),c.groupName=u$Z(n.groupName,""),c.cacheKey=u$Z(n.cacheKey,""),c._isJson=!0,c.sceneMode=t.mode,c.scene=t,c.useMercatorProject=n.useMercatorProject,c.scpUrl=a,c.queryFieldNames=n.queryFieldNames,c.subdomainConfig=n.subdomainConfig,c.customRequestHeaders=n.customRequestHeaders,c.LoadingPriority=n.LoadingPriority,c.cullMode=n.cullMode;var h=new _0x1a71e8(c);h._wstTaskProcessor=l,s||t._layers.add(h,o),e$2e(t._clipRegions)&&h._setServerClipRegions(t._clipRegions,1),i.resolve(h)}))}else d$1f(e,n.customRequestHeaders).then((function(l){var u=Zr$1(l,e,n.serverType);u.context=t.context,u.gl=t.context._gl,u.name=r,u.supportCompressType=t._supportCompressType,u.urlType=n.urlType,u.cullEnabled=n.cullEnabled,u.horizontalLine=n.horizontalLine,u.style3D=n.style3D,u.selectEnable=n.selectable,u.isVisible=n.isVisible,u.minVisibleAltitude=n.minVisibleAltitude,u.maxVisibleAltitude=n.maxVisibleAltitude,u.minVisibleDistance=n.minVisibleDistance,u.maxVisibleDistance=n.maxVisibleDistance,u.shadowType=n.shadowType,u.heading=n.heading,u.lodRangeScale=n.lodRangeScale,u.polygonOffset=n.polygonOffset,u.brightness=n.brightness,u.constrast=n.constrast,u.hue=n.hue,u.saturation=n.saturation,u.gamma=n.gamma,u.effect=n.effect,u.ignoreNormal=u$Z(n.ignoreNormal,!1),u.groupName=u$Z(n.groupName,""),u.cacheKey=u$Z(n.cacheKey,""),u.customRequestHeaders=n.customRequestHeaders,u.sceneMode=t.mode,u.loadVolumeData=u$Z(n.loadVolumeData,!0),u.scene=t,u.useMercatorProject=n.useMercatorProject,u.scpUrl=a,u.queryFieldNames=n.queryFieldNames,u.subdomainConfig=n.subdomainConfig,u.useMercatorProject=n.useMercatorProject,u.cullMode=n.cullMode;var c=Xr$1(u.baseUri,n.customRequestHeaders,n.urlType,u.scpUrl);o$1l(Gr(l,u.baseUri,n.customRequestHeaders),(function(e){u.waterEffectSet=e,o$1l(c,(function(e){if(u.fieldsInfo=e,e$2e(n.isFlyMode)&&!0===n.isFlyMode&&e$2e(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x1a71e8(u);t._layers.add(e,o),i.resolve(e)}),1e3)}});else{var r=new _0x1a71e8(u);s||t._layers.add(r,o),e$2e(t._clipRegions)&&r._setServerClipRegions(t._clipRegions,1),i.resolve(r)}}),(function(){if(!0===n.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x1a71e8(u);t._layers.add(e,o),i.resolve(e)}});else{var e=new _0x1a71e8(u);s||t._layers.add(e,o),e$2e(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}),(function(){o$1l(c,(function(e){if(u.fieldsInfo=e,e$2e(n.isFlyMode)&&!0===n.isFlyMode&&e$2e(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x1a71e8(u);s||t._layers.add(e,o),i.resolve(e)}),1e3)}});else{var r=new _0x1a71e8(u);s||t._layers.add(r,o),e$2e(t._clipRegions)&&r._setServerClipRegions(t._clipRegions,1),i.resolve(r)}}),(function(){if(!0===n.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x1a71e8(u);t._layers.add(e,o),i.resolve(e)}});else{var e=new _0x1a71e8(u);s||t._layers.add(e,o),e$2e(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}))}),(function(l){u$P(e,n.customRequestHeaders).then((function(l){var u=wr$1(l,e,n.serverType);u.context=t.context,u.gl=t.context._gl,u.name=r,u.supportCompressType=t._supportCompressType,u.urlType=n.urlType,u.cullEnabled=n.cullEnabled,u.horizontalLine=n.horizontalLine,u.style3D=n.style3D,u.selectEnable=n.selectable,u.isVisible=n.isVisible,u.minVisibleAltitude=n.minVisibleAltitude,u.maxVisibleAltitude=n.maxVisibleAltitude,u.minVisibleDistance=n.minVisibleDistance,u.maxVisibleDistance=n.maxVisibleDistance,u.shadowType=n.shadowType,u.heading=n.heading,u.lodRangeScale=n.lodRangeScale,u.polygonOffset=n.polygonOffset,u.brightness=n.brightness,u.constrast=n.constrast,u.hue=n.hue,u.saturation=n.saturation,u.gamma=n.gamma,u.effect=n.effect,u.ignoreNormal=u$Z(n.ignoreNormal,!1),u.groupName=u$Z(n.groupName,""),u.cacheKey=u$Z(n.cacheKey,""),u._isJson=!0,u.sceneMode=t.mode,u.scene=t,u.useMercatorProject=n.useMercatorProject,u.scpUrl=a,u.queryFieldNames=n.queryFieldNames,u.subdomainConfig=n.subdomainConfig,u.customRequestHeaders=n.customRequestHeaders,u.useMercatorProject=n.useMercatorProject,u.cullMode=n.cullMode;var c=Kr$1(u.baseUri,n.customRequestHeaders,u.attributeExtentName,u.urlType);o$1l(Yr$1(l,u.baseUri,n.customRequestHeaders),(function(e){u.waterEffectSet=e,Mr$1(c,t,i,u,o,n,s)}),(function(){Mr$1(c,t,i,u,o,n,s)}))}),(function(e){i.reject("add s3m layer failed,"+e)}))})).otherwise((function(e){i.reject("add s3m layer failed,"+e)}))}function Er$1(e,t,i){var n=i&&i.lexicographical,r=i&&i.zeroExtend,o=e.split("."),a=t.split(".");function s(e){return(n?/^\d+[A-Za-z]*$/:/^\d+$/).test(e)}if(!o.every(s)||!a.every(s))return NaN;if(r){for(;o.length<a.length;)o.push("0");for(;a.length<o.length;)a.push("0")}n||(o=o.map(Number),a=a.map(Number));for(var l=0;l<o.length;++l){if(a.length==l)return 1;if(o[l]!=a[l])return o[l]>a[l]?1:-1}}function Ur$1(e,t,i){return u$P(e,i).then((function(i){if(!(i.length<1)){var n=void 0;if(e$2e(t)){for(var r=0;r<i.length;r++){var o=i[r];if(o.name===t){n=o;break}}if(!e$2e(n))return void console.error("no named scene was found!")}else n=i[0];var a=new h$16(e);return a.path=new h$16(n.path).path,{name:n.name,path:a.toString()}}}))}function $r$1(e,t,i){var n=e+"/layers.json";return e$2e(a$O.CREDENTIAL)&&(n=e$2e(a$O.CREDENTIAL._keymap[i])?a$O.addTokenWithKey(i,n):a$O.addToken(n)),u$P(n,t).then((function(e){for(var t={s3m:[],imagery:[],s3mGroup:[],terrain:void 0},i=0,n=e.length;i<n;i++){var r=e[i],o=r.layer3DType;"OSGBLayer"==o?t.s3m.push(r):"ImageFileLayer"==o?t.imagery.push(r):"TerrainFileLayer"==o?t.terrain=r:"OSGBGroup"==o&&t.s3mGroup.push(r)}return t}))}Object.defineProperties(De$2.prototype,{}),De$2.prototype.open=function(e,t,i){i=u$Z(i,{});var n=/({.*?})/g;if(e.indexOf("?token")>-1&&e.indexOf("realspace")>-1){var r=new h$16(e),o=m$1c(r.query);r.query=void 0,e=r.toString();var a={};if(e$2e(i.subdomains))for(let t=0;t<i.subdomains.length;t++){var s=e.replace(/({.*?})/g,i.subdomains[t]);a={rooturl:s,type:"token",value:o.token},e$2e(a$O.CREDENTIAL)?s in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([a]):a$O.CREDENTIAL=new a$O([a])}else{if(n.test(e))throw new t$15("detected subdomain url scheme, but no subdomain provided.");a={rooturl:e,type:"token",value:o.token},e$2e(a$O.CREDENTIAL)?e in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([a]):a$O.CREDENTIAL=new a$O([a])}}if("realspace"!=e.slice(-9))throw new t$15("open scene url error!");i=u$Z(i,{}),this.customRequestHeaders=u$Z(this.customRequestHeaders,i.customRequestHeaders);var l=u$Z(i.useMercatorProject,!1),u=u$Z(i.autoSetView,!0),c=e,h=i.subdomains;if(e$2e(h))e=e.replace(n,(function(e,t){if(!e$2e(h.length))throw new t$15("detected subdomain url scheme, but no subdomain provided.");if("{s}"===t)return h[0]}));else if(n.test(e))throw new t$15("detected subdomain url scheme, but no subdomain provided.");var d=e+"/scenes.json";e$2e(a$O.CREDENTIAL)&&(d=e$2e(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,d):a$O.addToken(d));var f=this,p=this._scene,_=this.camera,m=o$1l.defer();return Ur$1(d,t,f._customRequestHeaders).then((function(t){if(e$2e(t)){var n=t.path.indexOf("?");-1!==n&&(t.path=t.path.substring(0,n));var r=t.path+".json";e$2e(a$O.CREDENTIAL)&&(r=e$2e(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,r):a$O.addToken(r)),ea$2(r,f._customRequestHeaders).then((function(t){try{var i,n;if(e$2e(t.clipRegions)){for(var r=[],o=0;o<t.clipRegions.length;o++){for(var a=[],s=0;s<t.clipRegions[o].points.length;s++)a.push(t.clipRegions[o].points[s].x),a.push(t.clipRegions[o].points[s].y),a.push(t.clipRegions[o].points[s].z||0);r.push(a)}p._clipRegions=r}n=-1!==e.indexOf("/iserver")?e.substring(0,e.indexOf("/iserver")+8)+"/_setup.json":e.substring(0,e.indexOf("/realspace")+10)+"/_setup.json",e$2e(a$O.CREDENTIAL)&&(n=e$2e(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,n):a$O.addToken(n)),"NONEARTHFLAT"===t.sceneType?u$P(n,f._customRequestHeaders).then((function(e){if(p.mode=C$14.COLUMBUS_VIEW,!e$2e(e.systemUGOVersion)||Er$1("11.1.0.22305",e.systemUGOVersion)>0?t.camera.tilt-=Math.PI:t.camera.tilt-=Math.PI/2,i=new o$1p(t.camera.longitude,t.camera.latitude,t.camera.altitude),l){var n=(new t$N).unproject(i);i=p.camera._projection.project(n)}var r=i.x,o=i.y;r>20037508.342789244&&(r-=20037508.342789244*Math.floor(r/20037508.342789244)),o>10018754.171394622&&(o-=20037508.342789244*Math.floor((o+10018754.171394622)/20037508.342789244)),i.x=r,i.y=o,u&&_.setView({destination:i,orientation:{heading:t.camera.heading,pitch:t.camera.tilt,roll:0},convert:!1})})).otherwise((function(){if(p.mode=C$14.COLUMBUS_VIEW,t.camera.tilt-=Math.PI/2,i=new o$1p(t.camera.longitude,t.camera.latitude,t.camera.altitude),l){var e=(new t$N).unproject(i);i=p.camera._projection.project(e)}var n=i.x,r=i.y;n>20037508.342789244&&(n-=20037508.342789244*Math.floor(n/20037508.342789244)),r>10018754.171394622&&(r-=20037508.342789244*Math.floor((r+10018754.171394622)/20037508.342789244)),i.x=n,i.y=r,u&&_.setView({destination:i,orientation:{heading:t.camera.heading,pitch:t.camera.tilt,roll:0},convert:!1})})):(t.camera.tilt-=90,i=o$1p.fromDegrees(t.camera.longitude,t.camera.latitude,t.camera.altitude),u&&_.setView({destination:i,orientation:{heading:e$2d.toRadians(t.camera.heading),pitch:e$2d.toRadians(t.camera.tilt),roll:0},convert:!1}),u$P(n,f._customRequestHeaders).then((function(e){if((!e$2e(e.systemUGOVersion)||Er$1("10.1.0.18325",e.systemUGOVersion)>0)&&-90!==t.camera.tilt){var n=new f$19(i,_.direction),r=g$1j.rayEllipsoid(n,t$12.WGS84);if(r){var o=o$1p.normalize(i,new o$1p);o$1p.negate(o,o);var a=new f$19(i,o),s=g$1j.rayEllipsoid(a,t$12.WGS84);if(s){var l=r.start>0?r.start:r.stop,u=f$19.getPoint(n,l,new o$1p),c=s.start>0?s.start:s.stop,h=f$19.getPoint(a,c,new o$1p),d=o$1p.cross(u,h,new o$1p),f=o$1p.angleBetween(u,h);_.rotate(d,-f)}}}})))}catch(e){m.reject("camera set view failed,"+e)}})).otherwise((function(e){m.reject("get scene config failed,"+e)})),$r$1(t.path,f._customRequestHeaders,e).then((function(n){for(var r=n.s3m,o=n.imagery,a=n.terrain,s=n.s3mGroup,u=t.path+"/layers/",d=[],_=r.length-1,g=_;g>=0;g--){var x=r[g],y=u+encodeURIComponent(x.name)+"/extendxml.xml";e$2e(a$O.CREDENTIAL)&&(y=e$2e(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,y):a$O.addToken(y)),function(t){t=p.layers._s3mLayerAddedIndex;var i=sr$1(y,f._customRequestHeaders).then((function(i){try{var n=e+"/datas/"+encodeURIComponent(i.name)+"/config";if(i.customRequestHeaders=f._customRequestHeaders,i.useMercatorProject=l,i.subdomainConfig={subdomains:h,urlScheme:c},!e$2e(i.groupName)||""===i.groupName)return f.addS3MTilesLayerByScp(n,i,t);var r=p.layers.find(i.groupName),o=!r;if(!r){var a={scene:p,name:i.groupName};r=new _0x17cdca(a),p.layers.add(r)}if(i.index=t,i.ready=!1,r._layerConfigs.set(n,i),r._s3mURLs[t]=n,o)return r}catch(e){m.reject("add S3M layer"+i.name+" failed,"+e)}})).otherwise((function(e){m.reject("get S3M layer config failed,"+e+",layer name is "+x.name)}));p.layers._s3mLayerAddedIndex++,e$2e(i)&&d.push(i)}(_-g)}for(g=s.length-1;g>=0;g--){x=s[g],y=u+encodeURIComponent(x.name)+"/extendxml.xml";e$2e(a$O.CREDENTIAL)&&(y=e$2e(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,y):a$O.addToken(y)),function(t){var i=sr$1(y,f._customRequestHeaders).then((function(i){try{var n=e+"/datas/"+encodeURIComponent(i.name)+"/config";return f.addS3MGroupLayer(n,i,t)}catch(e){m.reject("add S3MGroup layer"+i.name+" failed,"+e)}})).otherwise((function(e){m.reject("get S3MGroup layer config failed,"+e+",layer name is "+x.name)}));d.push(i)}(s.length-1-g)}for(g=o.length-1;g>=0;g--){var v=c+"/datas/"+encodeURIComponent(o[g].name),$=new P$6({url:v,subdomains:h,customRequestHeaders:f._customRequestHeaders});try{var b=p.imageryLayers.addImageryProvider($);o[g].maxVisibleAltitude>0&&(b.maxHeight=o[g].maxVisibleAltitude,b.minHeight=o[g].minVisibleAltitude),d.push(b)}catch(e){m.reject("add imagery layer "+o[g].name+" failed,"+e)}}if(e$2e(a)){var T=c+"/datas/"+encodeURIComponent(a.name);try{p.terrainProvider=new ne$u({url:T,isSct:!0,subdomains:h,customRequestHeaders:f._customRequestHeaders,invisibility:u$Z(i.invisibility,!1)}),d.push(p.terrainProvider)}catch(e){m.reject("add terrain layer "+a.name+" failed,"+e)}}o$1l.all(d,(function(e){for(var t=[],i=0;i<e.length;i++)e$2e(e[i])&&t.push(e[i]);m.resolve(t)}),(function(e){m.reject("add all layers failed,"+e)}))})).otherwise((function(e){m.reject("get layer list failed,"+e)}))}else m.reject("scene list response null!")})).otherwise((function(e){m.reject("get scene list failed,"+e)})),m.promise},De$2.prototype.addS3MTilesLayerByScp=function(e,t,i,n){t=u$Z(t,{});var r=/({.*?})/g;if(e.indexOf("?token")>-1){var o=new h$16(e),a=m$1c(o.query);o.query=void 0,e=o.toString();var s={};if(e$2e(t.subdomains))for(let i=0;i<t.subdomains.length;i++){var l=e.replace(/({.*?})/g,t.subdomains[i]);s={rooturl:l,type:"token",value:a.token},e$2e(a$O.CREDENTIAL)?l in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([s]):a$O.CREDENTIAL=new a$O([s])}else{if(r.test(e))throw new t$15("detected subdomain url scheme, but no subdomain provided.");s={rooturl:e,type:"token",value:a.token},e$2e(a$O.CREDENTIAL)?e in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([s]):a$O.CREDENTIAL=new a$O([s])}}if(!e$2e(e))throw new t$15("add s3m tiles layer,url is required.");if(e$2e(t.subdomains))e=e.replace(r,(function(e,i){if(!e$2e(t.subdomains.length))throw new t$15("detected subdomain url scheme, but no subdomain provided.");if("{s}"===i)return t.subdomains[0]}));else if(r.test(e))throw new t$15("detected subdomain url scheme, but no subdomain provided.");t=t||{};var u=o$1l.defer();n=u$Z(n,!1);var c,h,d=e,f=u$Z(t.name,f$Q(d)),p=this,_=this._scene;if((-1!==e.indexOf("ws://")||-1!==e.indexOf("wss://"))&&(t.useWebsocket=!0),t.useWebsocket)return ir$1(d,_,u,t,f,i,m,n),u.promise;(c=-1!==e.indexOf("aliyuncs")||-1!==e.indexOf("oss-cn")?Me$3.oss:Me$3.iServer)===Me$3.iServer&&(h=1===t.urlType?e+"&authentication=login":e.substring(0,e.indexOf("rest/realspace")+14));var m=e;return e$2e(a$O.CREDENTIAL)&&(d=e$2e(a$O.CREDENTIAL._keymap[d])?a$O.addTokenWithKey(d,d):a$O.addToken(d)),LicenseChecker.LICENSECHECKER.getLicense(d).then((function(e){LicenseChecker.LICENSECHECKER.check(e)})),c===Me$3.iServer?(t.serverType=Me$3.iServer,e$2e(this.RSAAuthenticationStatus[h])?(0===this.RSAAuthenticationStatus[h]&&(e$2e(ee$3[h])||(ee$3[h]={}),e$2e(ee$3[h][d])||(ee$3[h][d]={scene:_,deferred:u,options:t,layerName:f,index:i})),1===this.RSAAuthenticationStatus[h]&&ir$1(d,_,u,t,f,i,m,n),2===this.RSAAuthenticationStatus[h]&&u.reject("add s3m layer failed,"+d)):(this.RSAAuthenticationStatus[h]=0,ra$2(h,t.urlType,t.customRequestHeaders,d).then((function(){if(p.RSAAuthenticationStatus[h]=1,ir$1(d,_,u,t,f,i,m,n),e$2e(ee$3[h]))for(var e in ee$3[h]){var r=u$Z(ee$3[h][e].options.groupName,n);ir$1(e,ee$3[h][e].scene,ee$3[h][e].deferred,ee$3[h][e].options,ee$3[h][e].layerName,ee$3[h][e].index,void 0,r),delete ee$3[h][e]}}),(function(e){p.RSAAuthenticationStatus[h]=2,delete ee$3[h],u.reject("add s3m layer failed,"+e.url)})).otherwise((function(e){p.RSAAuthenticationStatus[h]=2,delete ee$3[h],u.reject("add s3m layer failed,"&e.url)})))):(t.serverType=Me$3.oss,ir$1(d,_,u,t,f,i,m,n)),u.promise},De$2.prototype.addS3MGroupLayer=function(e,t,i){if(!e$2e(e))throw new t$15("add S3MGroup layer,url is required.");t=t||{};var n=e;e$2e(a$O.CREDENTIAL)&&(n=a$O.addToken(n));var r=u$Z(t.name,f$Q(n)),o=this,a=o$1l.defer();return u$P(n).then((function(e){var t={name:r,url:n,layerBounds:e.geobounds,layers:e.layers,scene:o},a=new _0x17cdca(t);o._layers.add(a,i)})).otherwise((function(e){a.reject("add S3MGroup layer failed,"+e)})),a.promise},De$2.prototype.addLayerService=function(e,t,i){if(!e$2e(e)||!e$2e(t)||!e$2e(i))throw new t$15("url and sceneName and layerName is required!");if("realspace"!=e.slice(-9))throw new t$15("open scene url error!");var n=this,r=e+"/scenes/"+encodeURIComponent(t)+"/layers/"+encodeURIComponent(i)+"/extendxml.xml";e$2e(a$O.CREDENTIAL)&&(r=a$O.addToken(r));var o=o$1l.defer();return sr$1(r,n._customRequestHeaders).then((function(t){try{var i=e+"/datas/"+encodeURIComponent(t.name)+"/config";t.customRequestHeaders=n._customRequestHeaders;var r=n.addS3MTilesLayerByScp(i,t);o.resolve(r)}catch(e){o.reject("add S3M layer"+t.name+" failed,"+e)}})).otherwise((function(e){o.reject("get S3M layer config failed,"+e+",layer name is "+i)})),o.promise};var Jr$1=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,Ir$1=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)\)$/i;function sr$1(e,t,i){return e$2e(i)||(i=o$1l.defer()),d$1f(e,t).then((function(n){try{var r=Qr$1(n);i.resolve(r)}catch{sr$1(e,t,i)}})).otherwise((function(){sr$1(e,t,i)})),i.promise}function Qr$1(e){if(!e$2e(e))throw new t$15("get s3m layer config failed,xml document undefined.");var t,i=e.firstChild,n=i.namespaceURI,r=s$T.queryStringValue(i,"LayerName",n),o=s$T.queryFirstNode(i,"GeoBounds",n);if(e$2e(o)){var a=s$T.queryNumericValue(o,"bottom",n),s=s$T.queryNumericValue(o,"left",n),l=s$T.queryNumericValue(o,"top",n),u=s$T.queryNumericValue(o,"right",n);s>180||a>180||u>180||l>180?(s>20037508.342789244&&(s-=20037508.342789244*Math.floor(s/20037508.342789244)),u>20037508.342789244&&(u-=20037508.342789244*Math.floor(u/20037508.342789244)),l>10018754.171394622&&(l-=20037508.342789244*Math.floor((l+10018754.171394622)/20037508.342789244)),a>10018754.171394622&&(a-=20037508.342789244*Math.floor((a+10018754.171394622)/20037508.342789244)),t=new h$18(s/=6378137,a/=6378137,u/=6378137,l/=6378137)):t=h$18.fromDegrees(s,a,u,l)}var c=s$T.queryFirstNode(i,"Options",n),h=s$T.queryStringValue(i,"WithinLayer3DGroup",n),d=s$T.queryBooleanValue(c,"Selectable",n),f=s$T.queryBooleanValue(c,"Visible",n),p=s$T.queryNumericValue(c,"VisibleAltitudeMin",n),_=s$T.queryNumericValue(c,"VisibleAltitudeMax",n);_=0==_?Number.MAX_VALUE:_;var m=s$T.queryNumericValue(c,"VisibleDistanceMin",n),g=s$T.queryNumericValue(c,"VisibleDistanceMax",n),x=s$T.queryStringValue(c,"ShadowType",n),y=0;"SELECTION"==x?y=1:"ALL"==x&&(y=2);var v=!1;"S3MB"==s$T.queryStringValue(i,"CacheFileType",n)&&(v=!0);var $=s$T.queryFirstNode(i,"Style",n);if(!e$2e($)){var b=s$T.queryFirstNode(i,"LayerStyle",n);if(e$2e(b)&&!e$2e($=s$T.queryFirstNode(b,"Style",n)))throw new t$15("get s3m layer config failed,extendxml.xml foamat error,layer name is "+r)}var T=s$T.queryNumericValue($,"LineWidth",n),C=s$T.queryStringValue($,"FillForeColor",n),S=Jr$1.exec(C),w=new e$1X;if(null!==S){var E=parseFloat(S[1]);E=189==E?255:E;var P=parseFloat(S[2]);P=235==P?255:P,w.red=e$2d.clamp(E/255,0,1),w.green=e$2d.clamp(P/255,0,1),w.blue=e$2d.clamp(parseFloat(S[3])%256/255,0,1),w.alpha=e$2d.clamp(parseFloat(S[3])%65536/256/255,0,1)}var A=s$T.queryFirstNode($,"Style3D",n),L=new e$1v;if(e$2e(A)){var M=s$T.queryStringValue(A,"Fill3DMode",n),R=fr$3.Fill;"FILL_LINE"==M?R=fr$3.WireFrame:"FILL_FACEANDLINE"==M&&(R=fr$3.Fill_And_WireFrame);var O=s$T.queryNumericValue(A,"PointSize",n),D=s$T.queryStringValue(A,"LineColor",n),I=(S=Ir$1.exec(D),new e$1X);null!==S&&(I.red=e$2d.clamp(parseFloat(S[1]),0,1),I.green=e$2d.clamp(parseFloat(S[2]),0,1),I.blue=e$2d.clamp(parseFloat(S[3]),0,1),I.alpha=e$2d.clamp(parseFloat(S[4]),0,1));var F=s$T.queryNumericValue($,"MarkerSize",n)||0;F*=2,O=Math.max(O,F);var B=s$T.queryStringValue(A,"ColorPoint",n);S=Ir$1.exec(B);var N=new e$1X;null!==S&&(N.red=e$2d.clamp(parseFloat(S[1]),0,1),N.green=e$2d.clamp(parseFloat(S[2]),0,1),N.blue=e$2d.clamp(parseFloat(S[3]),0,1),N.alpha=e$2d.clamp(parseFloat(S[4]),0,1));var G=s$T.queryNumericValue(A,"BottomAltitude",n);s$T.queryStringValue(A,"AltitudeMode",n);var z=s$T.queryStringValue(A,"BillboardMode",n),U=s$T.queryBooleanValue(A,"FixedPixelSize",n);z="AUTO_Z_AXIAL"==z?yr$2.FixedZ:"FIXED_ANGLE"==z?yr$2.FixedXYZ:yr$2.None;var V=e$2d.toRadians(s$T.queryNumericValue(A,"RotateX",n)),k=e$2d.toRadians(s$T.queryNumericValue(A,"RotateY",n)),W=e$2d.toRadians(s$T.queryNumericValue(A,"RotateZ",n));new i$16(V,k,W),L.fillForeColor=w,L.bottomAltitude=G,L.lineWidth=T,L.lineColor=I,L.pointSize=O,L.pointColor=N,L.fillStyle=R,L.billboardMode=z,L.fixedPixelSize=U}var H=void 0,q=s$T.queryFirstNode(i,"Effect",n);if(e$2e(q)){var j=s$T.queryStringValue(q,"EffectType",n);if("Region"===j){H=new _0x2adae6;var X=s$T.queryNumericValue(q,"Type",n);H.setValue("RegionType",X);var Y=s$T.queryNumericValue(q,"ForeColor",n),Z=e$1X.fromRgba(Y);H.setValue("ForeColor",Z);var K=s$T.queryNumericValue(q,"BackColor",n),Q=e$1X.fromRgba(K);H.setValue("BackColor",Q);var J=s$T.queryNumericValue(q,"WidthX",n);H.setValue("WidthX",J);var ee=s$T.queryNumericValue(q,"WidthY",n);H.setValue("WidthY",ee);var te=s$T.queryNumericValue(q,"OffsetX",n);H.setValue("OffsetX",te);var ie=s$T.queryNumericValue(q,"OffsetY",n);H.setValue("OffsetY",ie);var ne=s$T.queryNumericValue(q,"RepeatX",n);H.setValue("RepeatX",ne);var re=s$T.queryNumericValue(q,"RepeatY",n);H.setValue("RepeatY",re);var oe=s$T.queryNumericValue(q,"RotationAngle",n);H.setValue("RotationAngle",oe)}else if("Polyline"===j){H=new _0x5175d0;X=s$T.queryNumericValue(q,"Type",n);H.setValue("PolylineType",X);var ae=s$T.queryNumericValue(q,"Color",n),se=e$1X.fromRgba(ae);H.setValue("Color",se);var le=s$T.queryNumericValue(q,"Width",n);H.setValue("Width",le);var ue=s$T.queryBooleanValue(q,"IsArrow",n);H.setValue("IsArrow",ue);var ce=s$T.queryNumericValue(q,"GapColor",n),he=e$1X.fromRgba(ce);H.setValue("GapColor",he);var de=s$T.queryNumericValue(q,"DashLength",n);H.setValue("DashLength",de);var fe=s$T.queryNumericValue(q,"DashPattern",n);H.setValue("DashPattern",fe);var pe=s$T.queryBooleanValue(q,"IsMove",n);H.setValue("IsMove",pe);var _e=s$T.queryNumericValue(q,"GlowPower",n);H.setValue("GlowPower",_e);var me=s$T.queryNumericValue(q,"OutlineColor",n),ge=e$1X.fromRgba(me);H.setValue("OutlineColor",ge);var xe=s$T.queryNumericValue(q,"OutlineWidth",n);H.setValue("OutlineWidth",xe)}}var ye=s$T.queryNumericValue(i,"LODRangeScale",n),ve=s$T.queryFirstNode(i,"PolygonOffset",n),$e=s$T.queryNumericValue(ve,"Constant",n),be=s$T.queryNumericValue(ve,"SlopeScale",n),Te=0!==$e&&0!==be,Ce=s$T.queryFirstNode(i,"ColorParams",n);return{name:r,groupName:h,layerBounds:t,isS3MB:v,style3D:L,selectEnable:d,isVisible:f,minVisibleAltitude:p,maxVisibleAltitude:_,minVisibleDistance:m,maxVisibleDistance:g,shadowType:y,heading:W,lodRangeScale:ye,polygonOffset:{enabled:Te,units:$e,factor:be},brightness:s$T.queryNumericValue(Ce,"Brightness",n),constrast:s$T.queryNumericValue(Ce,"Constrast",n),hue:s$T.queryNumericValue(Ce,"Hue",n),saturation:s$T.queryNumericValue(Ce,"Saturation",n),gamma:s$T.queryNumericValue(Ce,"Gamma",n),effect:H,cullMode:s$T.queryStringValue(i,"RenderCullMode",n)}}function ea$2(e,t){return u$P(e,t).then((function(e){return e}))}function ra$2(e,t,i,n){var r,o,a=o$1l.defer();return 1===t?(r=e,o=e):(r=e+"/login.json",o=e+"/login.json"),e$2e(a$O.CREDENTIAL)&&(n=n.substring(0,n.indexOf("?")),e$2e(a$O.CREDENTIAL._keymap[n])?(r=a$O.addTokenWithKey(n,r),o=a$O.addTokenWithKey(n,o)):(r=a$O.addToken(r),o=a$O.addToken(o))),u$P(r,i).then((function(t){var n=Number(t.jsessionID),r=aa$2(Number(t.random),397245148883021,0x8f461e7bf61d5),s={jsessionID:n.toString(),random:r.toString()},l=new XMLHttpRequest;if(u$W.contains(e)&&(l.withCredentials=!0),l.open("POST",o,!0),l.onreadystatechange=function(){if(4===l.readyState)if(200===l.status||201===l.status){var e={};try{e=JSON.parse(l.response)}catch{-1!==(l.response||l.responseText).toString().indexOf("isSucceed : true")&&(e.succeed=!0)}!0===e.succeed?a.resolve(!0):a.reject(!1)}else a.reject(!1)},e$2e(i))for(var u in i)i.hasOwnProperty(u)&&l.setRequestHeader(u,i[u]);l.send(JSON.stringify(s))}),(function(e){a.reject({status:!1,url:n})})).otherwise((function(){a.reject({status:!1,url:n})})),a.promise}function aa$2(e,t,i){for(var n=new tr$1(e),r=new tr$1(t),o=new tr$1(1),a=new tr$1(2),s=new tr$1(1);r.toNumber()>0;)0===r.mod(a).toNumber()?(r=r.dividedBy(a),n=n.multipliedBy(n).mod(i)):(r=r.minus(s),o=o.multipliedBy(n).mod(i));return o.toNumber()}De$2.prototype.isDestroyed=function(){return!1},De$2.prototype.destroy=function(){return i$11(this)};var Te$2=function(e){return function(){e.frameState.afterRender.push((function(){e.requestRender()}))}};function pi$1(e,t,i){this.ray=e,this.width=t,this.primitives=i,this.ready=!1,this.deferred=o$1l.defer(),this.promise=this.deferred.promise}function w$4(e){var t,i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).canvas,n=e.contextOptions,r=e.creditContainer,o=e.creditViewport;if(!e$2e(i))throw new t$15("options and options.canvas are required.");t=e$2e(e.contextOptions)&&e.contextOptions.contextType===Me$j.WebGPU?new f$8(i,n,e.engine):new g$b(i,n);var a=e$2e(r);a||((r=document.createElement("div")).style.position="absolute",r.style.bottom="0",r.style["text-shadow"]="0 0 2px #000000",r.style.color="#ffffff",r.style["font-size"]="10px",r.style["padding-right"]="5px",i.parentNode.appendChild(r)),e$2e(o)||(o=i.parentNode),this._id=e$1T(),this._jobScheduler=new o$f,this._frameState=new h$f(t,new r$l(r,"_",o),this._jobScheduler),this._frameState.scene3DOnly=u$Z(e.scene3DOnly,!1),this._removeCreditContainer=!a,this._creditContainer=r;var s=new n$$(t);s.viewport=new f$1a,s.viewport.x=0,s.viewport.y=0,s.viewport.width=t.drawingBufferWidth,s.viewport.height=t.drawingBufferHeight,this._passState=s,this._canvas=i,this._context=t,this._computeEngine=new f$n(t),this._globe=void 0,this._globeTranslucencyState=new F$c,this._globeHeight=void 0,this._cameraUnderground=!1,this._primitives=new o$y,this._groundPrimitives=new o$y,this._asyncRayPicks=[],this._logDepthBuffer=t.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new s$a,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._overlayAgainstDepthCommandList=[],this._logDepthOverlayCommandList=[],this._useOIT=u$Z(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new c$d,this._clearColorCommand=new t$W({color:new e$1X,stencil:0,owner:this}),this._depthOnlyRenderStateCache={},this._pickRenderStateCache={},this._transitioner=new R$8(this),this._preUpdate=new o$1h,this._postUpdate=new o$1h,this._renderError=new o$1h,this._preRender=new o$1h,this._postRender=new o$1h,this._pickPositionCache={},this._pickPositionCacheDirty=!1,this._minimumDisableDepthTestDistance=0,this.frustumTolerance=0,this._msaaSamples=e.contextOptions?u$Z(e.contextOptions.msaaLevel,1):1,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new o$1h,this.morphComplete=new o$1h,this.skyBox=void 0,this._cloudBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=e$1X.clone(e$1X.BLACK),this._mode=C$14.SCENE3D,this._mapProjection=e$2e(e.mapProjection)?e.mapProjection:new n$1d,this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e11,this.nearToFarDistance2D=175e4,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowGlobeDepth=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.fog=new g$j,this._sunCamera=new v$K(this),this.shadowMap=new C$Z({context:t,lightCamera:this._sunCamera,enabled:u$Z(e.shadows,!1),pcss:u$Z(e.pcss,!0),shadowQuality:u$Z(e.shadowQuality,0)}),this._analysisShadowMap=void 0,this.invertClassification=!1,this.invertClassificationColor=e$1X.clone(e$1X.WHITE),this._actualInvertClassificationColor=e$1X.clone(this._invertClassificationColor),this._invertClassification=new t$a,this.focalLength=void 0,this.eyeSeparation=void 0,this._brdfLutGenerator=new t$c,this._terrainExaggeration=u$Z(e.terrainExaggeration,1),this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new _a(this),this._mapMode2D=u$Z(e.mapMode2D,Rr$3.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostEffect:!1,usePostProcessSelected:!1,useWebVR:!1,usePrepass:!1},this._environmentVisible={isSunVisible:!0,isMoonVisible:!0,isSkyAtmosphereVisible:!0,isSkyBoxVisible:!0,isGlobalVisible:!0,isObjectVisible:!0,isOnlyS3MObjectVisible:!1,isBillboardVisible:!0},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=u$Z(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=u$Z(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=r$1b.requestCompletedEvent.addEventListener(Te$2(this)),this._removeTaskProcessorListenerCallback=i$W.taskCompletedEvent.addEventListener(Te$2(this)),this._removeGlobeCallbacks=[];var l=new f$1a(0,0,t.drawingBufferWidth,t.drawingBufferHeight),u=new v$K(this);this._logDepthBuffer&&(u.frustum.near=.1,u.frustum.far=1e10),this.preloadFlightCamera=new v$K(this),this.preloadFlightCullingVolume=void 0,this._picking=new d$g(this);var c=new f$1a(0,0,1,1),h=new v$K(this);h.frustum=new a$V({width:.1,aspectRatio:1,near:.1}),this._view=new L$c(this,u,l),this._pickOffscreenView=new L$c(this,h,c),this.pickOffscreenDefaultWidth=.1,this._defaultView=new L$c(this,u,l),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this._sunColor=new o$1p(1.8,1.85,2),this._lightGroup=Ze$4.SUN_LIGHT,this._presetLightSource=[],this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentMapAtlas=void 0,this._supportCompressType=0,t.s3tc?this._supportCompressType=1:t.pvrtc?this._supportCompressType=2:t.etc1&&(this._supportCompressType=3),this._plotLayers=new _0x386d8c,this._layers=new u$k,ti$4._attachLayers(this._layers),this._undergroundMode=!1,this._undergroundDepth=1e4,this._analyst3D=new u$k,this._vectorTileMaps=new u$k,this._vectorTileSource=new e$1Q,this._multiViewportMode=B$e.NONE,this._multiViewportInfo=[],this._renderPipeline=new _0x5430eb(this),this.postProcessStages=new _$a(this._renderPipeline),this._lightSource=new s$J(t),this.compositor=new o$m(t),kt$1(this,0,a$15.now()),W$6(this),this.initializeFrame(),this._pickPointEnabled=!1,this._pickPointInterval=200,this._pos=void 0,this._pickPointTolerance=3,this._pickTolerance=3,this._pickDepthTolerance=0,this._rasterPickTexture=void 0,this._rasterPickFBO=void 0,this.voxelGridPostRender=new a$5({}),this.particlePostRender=new u$b({}),this.particleTrailsPostRenderer=new r$f({}),this._pickResult={pickFrameNumber:-1,pickObject:void 0},this._walkingMode=Ct.NONE,this._pickRect=void 0,this._isUpdatePickCommand=!1,this._pickRectFramebuffer=void 0,this._mvtVisibleControl=!1,this._mvtVisibleLevel=0,this._maskEnabled=!1,this._enableCompositor=!0,this._overlapDisplayedThreshold=0,this._overlapDisplayOptions={allowIconWithTextDisplay:!0},this._pbrMaterlParameters=[],this._saveLocalCachePerformance=!0,this._toneMappingExposure=1,this._envMapIntensity=1,this._sceneConfigLoader=new De$2(e,this),this._silverLightingAtmosphere=new n$6,t.uniformState._silverLightingAtmosphere=this._silverLightingAtmosphere,t.uniformState._sceneUBO._initUniformMap(t),o$15.isNDCHalfZRange=t.webgpu,this._waterReflectionDistinctQuality=5}function ci$1(e,t){for(var i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;var n=[];e$2e(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(Te$2(e))),n.push(t.terrainProviderChanged.addEventListener(Te$2(e)))),e._removeGlobeCallbacks=n}function vi$1(e,t){e.enableVertexCapture(t)}function _i$1(e,t){e.disableVertexCapture(t)}function Dt$2(e,t,i){var n=e._frameState,r=e._context,o=e._view.oit,a=n.shadowState.lightShadowMaps,s=n.shadowState.lightShadowsEnabled,l=e._environmentState.usePrepass,u=t.derivedCommands;e$2e(t.pickId)&&(u.picking=l$i.createPickDerivedCommand(e,t,r,u.picking)),!t.pickOnly&&t.pass!==Le$q.TERRAIN_CLASSIFICATION&&t.pass!==Le$q.ClampObject&&(u.depth=l$i.createDepthOnlyDerivedCommand(e,t,r,u.depth)),n.passes.normal&&(u.normal=l$i.createNormalDerivedCommand(t,r)),u.originalCommand=t,e._hdr&&(u.hdr=l$i.createHdrCommand(t,r,u.hdr),u=(t=u.hdr.command).derivedCommands),l&&t.pass==Le$q.S3MTiles&&(u.prepass=l$i.createPrepassDerivedCommand(e,t,r,u.prepass)),s&&t.receiveShadows&&(u.shadows=C$Z.createReceiveDerivedCommand(a,t,i,r,u.shadows)),t.pass===Le$q.TRANSLUCENT&&e$2e(o)&&o.isSupported()&&(s&&t.receiveShadows?(u.oit=e$2e(u.oit)?u.oit:{},u.oit.shadows=o.createDerivedCommands(u.shadows.receiveCommand,r,u.oit.shadows)):u.oit=o.createDerivedCommands(t,r,u.oit)),t.pass===Le$q.Voxel_Billboard&&e$2e(e.voxelGridPostRender)&&e.voxelGridPostRender.createDerivedCommands(t),t.pass===Le$q.Particle&&e$2e(e.particlePostRender)&&e.particlePostRender.createDerivedCommands(t),e._maskEnabled&&(u.mask=l$i.createMaskCommand(t,r,u.mask))}Object.defineProperties(w$4.prototype,{waterReflectionDistinctQuality:{get:function(){return this._waterReflectionDistinctQuality},set:function(e){this._waterReflectionDistinctQuality=Math.min(Math.floor(e),5)}},toneMappingExposure:{get:function(){return this._toneMappingExposure},set:function(e){this._toneMappingExposure=e}},envMapIntensity:{get:function(){return this._envMapIntensity},set:function(e){this._envMapIntensity=e}},canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},maximumAliasedLineWidth:{get:function(){return e$1W.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return e$1W.maximumCubeMapSize}},pickPositionSupported:{get:function(){return!0}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return u$A.isSupported(this._context)}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,ci$1(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(e$2e(this.globe))return this.globe.imageryLayers}},terrainLayers:{get:function(){if(e$2e(this.globe))return this.globe.terrainLayers}},terrainProvider:{get:function(){if(e$2e(this.globe))return this.globe.terrainProvider},set:function(e){e$2e(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(e$2e(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},customRequestHeaders:{get:function(){return this._sceneConfigLoader._customRequestHeaders},set:function(e){this._sceneConfigLoader._customRequestHeaders=e}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){if(this.scene3DOnly&&e!==C$14.SCENE3D)throw new t$15("Only SceneMode.SCENE3D is valid when scene3DOnly is true.");if(e===C$14.SCENE2D)this.morphTo2D(0);else if(e===C$14.SCENE3D)this.morphTo3D(0);else{if(e!==C$14.COLUMBUS_VIEW)throw new t$15("value must be a valid SceneMode enumeration.");this.morphToColumbusView(0)}this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},terrainExaggeration:{get:function(){return this._terrainExaggeration},set:function(e){this._terrainExaggeration!==e&&e$2e(this.globe)&&this.globe._surface.invalidateAllTiles(),this._terrainExaggeration=e}},useWebVR:{get:function(){return this._useWebVR},set:function(e){if(this.camera.frustum instanceof a$V)throw new t$15("VR is unsupported with an orthographic projection.");this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new v$K(this),e$2e(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new h$g(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},imagerySplitPosition:{get:function(){return this._frameState.imagerySplitPosition},set:function(e){this._frameState.imagerySplitPosition=e}},globeSplitPosition:{get:function(){return this._frameState.globeSplitPosition},set:function(e){this._frameState.globeSplitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){if(!e$2e(e)||e<0)throw new t$15("minimumDisableDepthTestDistance must be greater than or equal to 0.0.");this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0,this._defaultView.updateFrustums=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){var t=this._context,i=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=i!==this._hdr,this._hdr=i}},highDynamicRangeSupported:{get:function(){var e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},sunColor:{get:function(){return this._sunColor},set:function(e){this._sunColor=e}},opaqueFrustumNearOffset:{get:function(){return this._frameState.useLogDepth?.9:.9999}},layers:{get:function(){return this._layers}},plotLayers:{get:function(){return this._plotLayers}},multiViewportMode:{get:function(){return this._multiViewportMode},set:function(e){switch(this._multiViewportInfo.length=0,e){case B$e.NONE:this._frameState.multiViewportIndex=-1;break;case B$e.HORIZONTAL:this._multiViewportInfo[0]=new f$1a(0,0,.5,1),this._multiViewportInfo[1]=new f$1a(.5,0,.5,1);break;case B$e.VERTICAL:this._multiViewportInfo[0]=new f$1a(0,.5,1,.5),this._multiViewportInfo[1]=new f$1a(0,0,1,.5);break;case B$e.QUAD:this._multiViewportInfo[0]=new f$1a(0,.5,.5,.5),this._multiViewportInfo[1]=new f$1a(.5,.5,.5,.5),this._multiViewportInfo[2]=new f$1a(.5,0,.5,.5),this._multiViewportInfo[3]=new f$1a(0,0,.5,.5);break;case B$e.TRIPLE:this._multiViewportInfo[2]=new f$1a(0,.5,.5,.5),this._multiViewportInfo[1]=new f$1a(.5,.5,.5,.5),this._multiViewportInfo[0]=new f$1a(0,0,1,.5);break;case B$e.VerticalTrisection:this._multiViewportInfo[2]=new f$1a(2/3,0,1/3,1),this._multiViewportInfo[1]=new f$1a(1/3,0,1/3,1),this._multiViewportInfo[0]=new f$1a(0,0,1/3,1);break;case B$e.FIVE_DIVISIONS:this._multiViewportInfo[4]=new f$1a(0,0,.5,.5),this._multiViewportInfo[3]=new f$1a(0,.5,.5,.5),this._multiViewportInfo[2]=new f$1a(.5,0,.5,1/3),this._multiViewportInfo[1]=new f$1a(.5,1/3,.5,1/3),this._multiViewportInfo[0]=new f$1a(.5,2/3,.5,1/3);break;case B$e.SIX_DIVISIONS:this._multiViewportInfo[5]=new f$1a(2/3,0,1/3,1/3),this._multiViewportInfo[4]=new f$1a(2/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new f$1a(2/3,2/3,1/3,1/3),this._multiViewportInfo[2]=new f$1a(1/3,0,1/3,1/3),this._multiViewportInfo[1]=new f$1a(0,0,1/3,1/3),this._multiViewportInfo[0]=new f$1a(0,1/3,2/3,2/3);break;case B$e.SEVEN_DIVISIONS:this._multiViewportInfo[6]=new f$1a(0,0,.3,.5),this._multiViewportInfo[5]=new f$1a(.3,0,.4,1/3),this._multiViewportInfo[4]=new f$1a(.7,0,.3,.5),this._multiViewportInfo[3]=new f$1a(.7,.5,.3,.5),this._multiViewportInfo[2]=new f$1a(.3,2/3,.4,1/3),this._multiViewportInfo[1]=new f$1a(0,.5,.3,.5),this._multiViewportInfo[0]=new f$1a(.3,1/3,.4,1/3);break;case B$e.EIGHT_DIVISIONS:this._multiViewportInfo[0]=new f$1a(.5,0,.5,1/3),this._multiViewportInfo[1]=new f$1a(0,0,.5,1/3),this._multiViewportInfo[2]=new f$1a(2/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new f$1a(1/3,1/3,1/3,1/3),this._multiViewportInfo[4]=new f$1a(0,1/3,1/3,1/3),this._multiViewportInfo[5]=new f$1a(2/3,2/3,1/3,1/3),this._multiViewportInfo[6]=new f$1a(1/3,2/3,1/3,1/3),this._multiViewportInfo[7]=new f$1a(0,2/3,1/3,1/3);break;case B$e.NINE_DIVISIONS:this._multiViewportInfo[8]=new f$1a(2/3,0,1/3,1/3),this._multiViewportInfo[7]=new f$1a(1/3,0,1/3,1/3),this._multiViewportInfo[6]=new f$1a(0,0,1/3,1/3),this._multiViewportInfo[5]=new f$1a(2/3,1/3,1/3,1/3),this._multiViewportInfo[4]=new f$1a(1/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new f$1a(0,1/3,1/3,1/3),this._multiViewportInfo[2]=new f$1a(2/3,2/3,1/3,1/3),this._multiViewportInfo[1]=new f$1a(1/3,2/3,1/3,1/3),this._multiViewportInfo[0]=new f$1a(0,2/3,1/3,1/3);break;default:throw new t$15("the mode is error")}e!==B$e.NONE&&this._multiViewportMode===B$e.NONE?(this._frameState.creditDisplay.container.style.visibility="hidden",!e$2e(this._deviceOrientationCameraController)&&this._useWebVR&&(this._deviceOrientationCameraController=new h$g(this),this._aspectRatioVR=this._camera.frustum.aspectRatio)):e===B$e.NONE&&this._multiViewportMode!==B$e.NONE&&(this._frameState.creditDisplay.container.style.visibility="visible",this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this.drawingBufferWidth/this.drawingBufferHeight),this._multiViewportMode=e}},undergroundMode:{get:function(){return this._undergroundMode},set:function(e){e$2e(e)&&(this._undergroundMode=e)}},undergroundDepth:{get:function(){return this._undergroundDepth},set:function(e){this._undergroundDepth=e}},lightSource:{get:function(){return this._lightSource}},cloudBox:{get:function(){return this._cloudBox},set:function(e){e$2e(e)||e$2e(this._cloudBox)&&this.cloudBox.remove(),this._cloudBox=e}},enableOcclude:{get:function(){return this._enableOcclude},set:function(e){this._enableOcclude=e}},bloomEffect:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Scene_bloomEffect"),this.compositor.bloomEffect}},scanEffect:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Scene_scanEffect"),this.compositor.scanEffect}},depthOfFieldEffect:{get:function(){return this.compositor.depthOfFieldEffect}},ssaoEffect:{get:function(){return this.compositor.SSAOEffect}},colorCorrection:{get:function(){return this.compositor.colorCorrection}},hdrEnabled:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Scene_hdrEnabled"),this._hdr},set:function(e){LicenseChecker.LICENSECHECKER.verify("Scene_hdrEnabled");var t=this._context,i=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=i!==this._hdr,this._hdr=i}},toneMappingEnabled:{get:function(){return this.compositor.toneMappingEnabled},set:function(e){return this.compositor.toneMappingEnabled=e}},pickPoint:{get:function(){return this._pos}},pickPointEnabled:{get:function(){return this._pickPointEnabled},set:function(e){this._pickPointEnabled=e;for(var t=0;t<this._layers._layerQueue.length;t++){var i={};i.layer=this._layers._layerQueue[t],i.layer instanceof _0x1a71e8&&(e?i.layer.traverseRenderEntity(i,vi$1):i.layer.traverseRenderEntity(i,_i$1))}}},pickPointInterval:{get:function(){return this._pickPointInterval},set:function(e){this._pickPointInterval=e}},pickPointTolerance:{get:function(){return this._pickPointTolerance},set:function(e){this._pickPointTolerance=e}},pickDepthTolerance:{get:function(){return this._pickDepthTolerance},set:function(e){this._pickDepthTolerance=e}},rasterVectorCollection:{get:function(){return this.globe._rasterVectorCollection}},walkingMode:{get:function(){return this._walkingMode},set:function(e){if(e!==this._walkingMode){this._walkingMode=e;var t=this._screenSpaceCameraController;t.previousHeight=void 0,e===Ct.ByKeyboard?(t.enableWalk=!0,t.enableLook=!1,this.mode===C$14.SCENE3D?t.enableTranslate=!1:this.mode===C$14.COLUMBUS_VIEW&&(t.enableTranslate=!0)):(t.enableWalk=!1,t.enableTranslate=!0,t.enableZoom=!0,t.enableTilt=!0,t.enableLook=!0)}}},enableOutline:{get:function(){var e=this.layers.getSelectedLayer();return!(!e$2e(e)||e.getSelection().length<1)&&e.selectColorType===Zr$3.SILHOUETTE_EDGE}},maskEnabled:{get:function(){return this._maskEnabled}},lightGroup:{get:function(){return this._lightGroup},set:function(e){e!==this._lightGroup&&(this._lightGroup=e,Ci$1(this,e))}},enableCompositor:{get:function(){return this._enableCompositor},set:function(e){o$1q.typeOf.bool("Scene.enableCompositor",e),this._enableCompositor=e}},overlapDisplayedThreshold:{get:function(){return this._overlapDisplayedThreshold},set:function(e){o$1q.typeOf.number("Scene.clusterRange",e),this._overlapDisplayedThreshold=e}},overlapDisplayOptions:{get:function(){return this._overlapDisplayOptions},set:function(e){o$1q.typeOf.object("Scene.overlapDisplayOptions",e),this._overlapDisplayOptions=e}},cameraUnderground:{get:function(){return this._cameraUnderground}}}),w$4.prototype.setVectorTilesLayersControl=function(e,t){this._mvtVisibleControl=e,this._mvtVisibleLevel=t},w$4.prototype.getCompressedTextureFormatSupported=function(e){var t=this.context;return("WEBGL_compressed_texture_s3tc"===e||"s3tc"===e)&&t.s3tc||("WEBGL_compressed_texture_pvrtc"===e||"pvrtc"===e)&&t.pvrtc||("WEBGL_compressed_texture_etc1"===e||"etc1"===e)&&t.etc1},w$4.prototype.updateDerivedCommands=function(e){if(e$2e(e.derivedCommands)){var t=this._frameState,i=this._context,n=!1,r=t.shadowState.lastDirtyTime;e.lastDirtyTime!==r&&(e.lastDirtyTime=r,e.dirty=!0,n=!0);var o=t.useLogDepth,a=this._hdr,s=this._environmentState.usePrepass,l=t.passes.normal,u=this._maskEnabled,c=e.derivedCommands,h=e$2e(c.logDepth),d=e$2e(c.hdr),f=e$2e(c.normal),p=e$2e(c.mask),_=e$2e(c.prepass),m=e$2e(c.originalCommand),g=o&&!h,x=a&&!d,y=s&&!_,v=l&&!f,$=u&&!p,b=!(o&&a||m);if(e.dirty=e.dirty||this._logDepthBufferDirty||this._hdrDirty||this._maskEnabled||g||x||b||$||v||y,e.dirty){e.dirty=!1;var T=t.shadowState.shadowMaps;t.shadowState.shadowsEnabled&&e.castShadows&&(c.shadows=C$Z.createCastDerivedCommand(T,e,n,i,c.shadows)),(h||g)&&(c.logDepth=l$i.createLogDepthCommand(e,i,c.logDepth),Dt$2(this,c.logDepth.command,n)),(m||b)&&Dt$2(this,e,n)}}};var gi$1=new a$g({pass:ue$e.RENDER}),Je$1=new a$g({pass:ue$e.PRELOAD}),Xe$1=new a$g({pass:ue$e.PRELOAD_FLIGHT}),wi$1=new a$g({pass:ue$e.REQUEST_RENDER_MODE_DEFER_CHECK});new a$g({pass:ue$e.MOST_DETAILED_PRELOAD});var yi$1=new a$g({pass:ue$e.MOST_DETAILED_PICK}),$e$1=new a$g({pass:ue$e.PICK}),xt$1=new i$1d,et$3;function bi$1(e){var t=e.globe;if(e._mode===C$14.SCENE3D&&e$2e(t)&&t.show&&!e._cameraUnderground&&!e._globeTranslucencyState.translucent){var i=t.ellipsoid;return xt$1.radius=i.minimumRadius,et$3=d$U.fromBoundingSphere(xt$1,e.camera.positionWC,et$3)}}function tt$2(e){e.render=!1,e.pick=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1,e.asynchronous=!1,e.fbo=!1,e.normal=!1}function kt$1(e,t,i){var n=e._frameState;n.frameNumber=t,n.time=a$15.clone(i,n.time)}function Ci$1(e,t){for(var i=0;i<e._presetLightSource.length;i++)e.removeLightSource(e._presetLightSource[i]);if(e._presetLightSource.length=0,t===Ze$4.SUN_LIGHT)e.hdrEnabled=!1,e.sun.show=!0,e._lightSource.ambientLightColor=new e$1X(.76,.76,.76,1);else if(t===Ze$4.LIGHT_GROUP1){e.hdrEnabled=!1,e.sun.show=!1,e._lightSource.ambientLightColor=new e$1X(.5,.5,.5,1);var n=new c$i(new o$1p.fromDegrees(116.191153,40.147532,450),{targetPosition:new o$1p.fromDegrees(116.19106,40.147858,430),color:new e$1X(.9,.9,.9,1),intensity:.78});e.addLightSource(n),e._presetLightSource.push(n);var r=new c$i(new o$1p.fromDegrees(116.192153,40.147432,490),{targetPosition:new o$1p.fromDegrees(116.19106,40.147858,430),color:new e$1X(.9,.9,.9,1),intensity:.25});e.addLightSource(r),e._presetLightSource.push(r)}}function W$6(e){var t=e.camera,i=e._frameState;i.commandList.length=0,i.shadowMaps.length=0,i.brdfLutGenerator=e._brdfLutGenerator,i.environmentMap=e.skyBox&&e.skyBox._cubeMap,i.mode=e._mode,i.morphTime=e.morphTime,i.mapProjection=e.mapProjection,i.camera=t,i.cullingVolume=t.frustum.computeCullingVolume(t.positionWC,t.directionWC,t.upWC,e.frustumTolerance),i.cullingVolume.enableFusion=e$2e(e.context.curFusionViewMatrix),i.occluder=bi$1(e),i.terrainExaggeration=e._terrainExaggeration,i.minimumDisableDepthTestDistance=e._minimumDisableDepthTestDistance,i.invertClassification=e.invertClassification,i.useLogDepth=e._logDepthBuffer&&!(e.camera.frustum instanceof a$V||e.camera.frustum instanceof l$11),i.sunColor=e._sunColor,e._lightSource.sunLightON=e$2e(e.sun)&&e.sun.show,i.lightSource=e._lightSource,i.shadowDarkness=e.shadowMap.darkness,i.toneMappingExposure=e.toneMappingExposure,i.envMapIntensity=e.envMapIntensity,e$2e(e._specularEnvironmentMapAtlas)&&e._specularEnvironmentMapAtlas.ready?(i.specularEnvironmentMaps=e._specularEnvironmentMapAtlas.texture,i.specularEnvironmentMapsMaximumLOD=e._specularEnvironmentMapAtlas.maximumMipmapLevel):(i.specularEnvironmentMaps=void 0,i.specularEnvironmentMapsMaximumLOD=void 0),e$2e(e._pmremGenerator)&&e._pmremGenerator.ready?i.hdrEnvMap=e._pmremGenerator.texture:i.hdrEnvMap=void 0,i.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,e._actualInvertClassificationColor=e$1X.clone(e.invertClassificationColor,e._actualInvertClassificationColor),t$a.isTranslucencySupported(e._context)||(e._actualInvertClassificationColor.alpha=1),i.invertClassificationColor=e._actualInvertClassificationColor,e$2e(e.globe)?i.maximumScreenSpaceError=e.globe.maximumScreenSpaceError:i.maximumScreenSpaceError=2,tt$2(i.passes),i.tilesetPassState=void 0,i.pbrMaterialsArr=e._pbrMaterlParameters,e.context._trangleCount=0,i.cameraUnderground=e._cameraUnderground,i.globeTranslucencyState=e._globeTranslucencyState}w$4.prototype.updateFrameState=function(){return W$6(this)};var Vt$1=new i$X;w$4.prototype.isVisible=function(e,t,i){return e$2e(e)&&(!e$2e(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==Ae$w.OUTSIDE&&(!e$2e(i)||!(e.occlude&&!this._undergroundMode)||!e.boundingVolume.isOccluded(i)))};var Ee$2=new o$15,Fe$2=new l$10,Re$2=new a$V,Le$2=new l$11;w$4.prototype.updateAndExecuteCommands=function(e,t,i){this._renderPipeline.updateAndExecuteCommands(e,t)};var Si$1=/(\.hdr$)/i;function G$4(e){var t=e._frameState,i=e._view,n=e._environmentState,r=t.passes.render,o=t.passes.offscreen,a=e.skyAtmosphere,s=e.globe;const l=e._globeTranslucencyState;if(!r||e._mode!==C$14.SCENE2D&&i.camera.frustum instanceof a$V||!l.environmentVisible)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{e$2e(a)&&e$2e(s)&&(a.setDynamicAtmosphereColor(s.enableLighting),n.isReadyForAtmosphere=n.isReadyForAtmosphere||s._surface._tilesToRender.length>0),n.skyAtmosphereCommand=e$2e(a)?a.update(t):void 0,n.skyBoxCommand=e$2e(e.skyBox)?e.skyBox.update(t,e._hdr):void 0;var u=e$2e(e.sun)?e.sun.update(t,i.passState,e._hdr):void 0;n.sunDrawCommand=e$2e(u)?u.drawCommand:void 0,n.sunComputeCommand=e$2e(u)?u.computeCommand:void 0,n.moonCommand=e$2e(e.moon)?e.moon.update(t):void 0,e$2e(e.cloudBox)&&e.cloudBox.update(t)}var c=n.clearGlobeDepth=e$2e(s)&&(!s.depthTestAgainstTerrain||e.mode===C$14.SCENE2D);(n.useDepthPlane=c&&e.mode===C$14.SCENE3D&&l.useDepthPlane)&&e._depthPlane.update(t),n.renderTranslucentDepthForPick=!1,n.useWebVR=e._useWebVR&&e.mode!==C$14.SCENE2D&&!o;for(var h=t.mode!==C$14.SCENE3D||l.sunVisibleThroughGlobe?void 0:t.occluder,d=t.cullingVolume,f=Vt$1.planes,p=0;p<5;++p)f[p]=d.planes[p];d=Vt$1,n.isSkyAtmosphereVisible=e$2e(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=e.isVisible(n.sunDrawCommand,d,h),n.isMoonVisible=e.isVisible(n.moonCommand,d,h);var _=e.specularEnvironmentMaps,m=e._specularEnvironmentMapAtlas;e$2e(_)?Si$1.test(_)?e$2e(e._pmremGenerator)||(e._pmremGenerator=new v$9(_)):(!e$2e(m)||m.url!==_)&&(m=m&&m.destroy(),e._specularEnvironmentMapAtlas=new u$A(_)):e$2e(m)?(m.destroy(),e._specularEnvironmentMapAtlas=void 0):e$2e(e._pmremGenerator)&&(e._pmremGenerator=e._pmremGenerator.destroy()),e$2e(e._specularEnvironmentMapAtlas)&&e._specularEnvironmentMapAtlas.update(t),e$2e(e._pmremGenerator)&&e._pmremGenerator.update(t)}function Tt(e){for(var t=e._frameState.afterRender,i=0,n=t.length;i<n;++i)t[i](),e.requestRender();t.length=0}function Pi$1(e){const t=e._globe,i=e.camera.positionCartographic;if(e$2e(t)&&t.show&&e$2e(i))return t.getHeight(i)}function Di$1(e){const t=e.camera,i=e._mode,n=e.globe;e._screenSpaceCameraController;const r=t.positionCartographic;if(!e$2e(r)||!e$2e(n)||!n.show||i===C$14.SCENE2D||i===C$14.MORPHING)return!1;const o=e._globeHeight;return e$2e(o)&&r.height<o}function xi$1(e,t){if(e.debugShowFramesPerSecond){if(!e$2e(e._performanceDisplay)){var i=document.createElement("div");i.className="supermap3d-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(i);var n=new o$d({container:i});e._performanceDisplay=n,e._performanceContainer=i}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.trangleCount=e.context._trangleCount,e._performanceDisplay.update(t)}else e$2e(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function ki$1(e){e._jobScheduler.resetBudgets();var t=e._frameState;e.primitives.prePassesUpdate(t),e$2e(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function Vi$1(e){var t=e._frameState;e.primitives.postPassesUpdate(t),r$1b.update()}function Ti$1(e){var t=e._frameState;e$2e(e.globe)&&e.globe.update(t),t.creditDisplay.update()}w$4.prototype.updateEnvironment=function(){return G$4(this)},w$4.prototype.resolveFramebuffers=function(e){this._renderPipeline.resolveFramebuffers(e)},w$4.prototype.initializeFrame=function(){1e4==this._shaderFrameCount++&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeight=Pi$1(this),this._cameraUnderground=Di$1(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),e$2e(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};var Ei$1=new e$1X,Et$1=0,rt$4=0;const Fi$1=50,Ft$1=100;function Ri$1(){var e=performance.now(),t=!1;return e-Et$1<Fi$1?++rt$4>Ft$1&&(t=!0):rt$4=0,Et$1=e,t}var Rt$1=!1,it$2=0;function Li$1(){return Rt$1?it$2++:it$2=0,it$2>Ft$1}function Bi$1(e){e._pickPositionCacheDirty=!0;var t=e.context,i=t.uniformState,n=e._frameState,r=e._defaultView;e._view=r,W$6(e),n.passes.render=!0,n.passes.postProcess=e.postProcessStages.hasSelected,n.tilesetPassState=gi$1;var o=u$Z(e.backgroundColor,e$1X.BLACK);e._hdr&&((o=e$1X.clone(o,Ei$1)).red=Math.pow(o.red,e.gamma),o.green=Math.pow(o.green,e.gamma),o.blue=Math.pow(o.blue,e.gamma)),n.backgroundColor=o,n.creditDisplay.beginFrame(),e.fog.update(n),i.update(n);var a=e.shadowMap;e$2e(a)&&a.enabled&&(o$1p.negate(i.sunDirectionWC,e._sunCamera.direction),n.shadowMaps.push(a),e$2e(e._analysisShadowMap)&&n.shadowMaps.push(e._analysisShadowMap)),e._computeCommandList.length=0,e._logDepthOverlayCommandList.length=0,e._overlayCommandList.length=0,e._overlayAgainstDepthCommandList.length=0;var s=r.viewport;s.x=0,s.y=0,s.width=t.drawingBufferWidth,s.height=t.drawingBufferHeight;var l=r.passState;if(l.framebuffer=void 0,l.blendingEnabled=void 0,l.scissorTest=void 0,l.viewport=f$1a.clone(s,l.viewport),e$2e(e.globe)&&e.globe.beginFrame(n),e$2e(e.terrainProvider)){var u=e.terrainProvider;e$2e(u._minHeight)&&e$2e(u._maxHeight)&&(n.minTerrainHeight=u._minHeight,n.maxTerrainHeight=u._maxHeight)}na$1(e),sa$1(e),ua(e),fa(e),st$2(e),ma(e),ut$4(e),G$4(e);var c=e._layers;n=e._frameState;c.render(t,n),e._plotLayers.render(n,t),e._renderPipeline.updateAndExecuteCommands(l,o),e._renderPipeline.resolveFramebuffers(l),l.framebuffer=void 0,e._renderPipeline.executeOverlayCommands(l),jt$1(e),e.layers.endFrame(n),e$2e(e.globe)&&(e.globe.endFrame(n),e.globe.tilesLoaded||(e._renderRequested=!0),e.camera._computeSensitivePosition()),Mi$1(e,n),e._lightSource.resetChange(),n.creditDisplay.endFrame(),t.endFrame(),(!e._saveLocalCachePerformance||Ri$1()&&Li$1())&&(e.layers.saveLocalCache(),e.imageryLayers.saveLocalCache(),e.terrainProvider instanceof ne$u&&e.terrainProvider.saveLocalCache())}function Mi$1(e,t){for(var i=e.layers._layerQueue.length,n=0;n<i;n++){var r=e.layers._layerQueue[n];e$2e(r._imageryLayer)&&e$2e(r._layerScheduler)&&r._layerScheduler.loadImagery(r,t)}}function re$3(e,t){try{t(e)}catch(t){if(e._renderError.raiseEvent(e,t),e.rethrowRenderErrors)throw t}}function Oi$1(e){return e._picking.updateMostDetailedRayPicks(e)}function Ni$1(e){var t=e._frameState;Je$1.camera=t.camera,Je$1.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,Je$1)}function Ii$1(e){e.primitives.updateForPass(e._frameState,wi$1)}w$4.prototype.render=function(e){if(this.terrainLayers._layers.length>0&&e$2e(this._globe)){var t=this.terrainLayers._layers.length-1;this._globe._terrainProvider=this._globe._terrainLayerCollection._layers[t]._terrainProvider}if(e$2e(this._globe._terrainProvider._visible)&&this._globe._surface._visible!==this._globe._terrainProvider._visible){var i=this._globe._terrainProvider._visible;this._globe._surface.showInvalid(!i),this._globe._surface._visible=i}e$2e(e)||(e=a$15.now());var n=this._frameState;n.newFrame=!1,this._jobScheduler.resetBudgets();var r=this._view.checkForCameraUpdates(this),o=!this.requestRenderMode||this._renderRequested||r||this._logDepthBufferDirty||this._hdrDirty||this.mode===C$14.MORPHING;if(!o&&e$2e(this.maximumRenderTimeChange)&&e$2e(this._lastRenderTime)){var a=Math.abs(a$15.secondsDifference(this._lastRenderTime,e));o=o||a>this.maximumRenderTimeChange}o&&(this._lastRenderTime=a$15.clone(e,this._lastRenderTime),this._renderRequested=!1,kt$1(this,e$2d.incrementWrap(n.frameNumber,15e6,1),e),n.newFrame=!0,this.mode===C$14.SCENE3D&&(this._silverLightingAtmosphere.update(n,this.mode),this._lightSource._enableAmbientLightColor||e$1X.clone(this._silverLightingAtmosphere.getAmbientColor(),this._lightSource._ambientLightColor),this._lightSource._enableSunLightColor||e$1X.clone(this._silverLightingAtmosphere.getSunColor(),this._lightSource._sunLightColor)));this._preUpdate.raiseEvent(this,e),re$3(this,Ti$1),re$3(this,ki$1),this.primitives.show&&(re$3(this,Oi$1),re$3(this,Ni$1),re$3(this,Zi),o||re$3(this,Ii$1)),this._postUpdate.raiseEvent(this,e),o&&(this._preRender.raiseEvent(this,e),re$3(this,Bi$1)),xi$1(this,o),re$3(this,Vi$1),Rt$1=0==r$1b.activeRequestLength,Tt(this),o&&this._postRender.raiseEvent(this,e),this._logDepthBufferDirty=!1,this._hdrDirty=!1},w$4.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)},w$4.prototype.requestRender=function(){this._renderRequested=!0},w$4.prototype.clampLineWidth=function(e){return Math.max(e$1W.minimumAliasedLineWidth,Math.min(e,e$1W.maximumAliasedLineWidth))};var Hi$1=new l$11,Ai$1=new o$1p,Be$2=new o$1p,Wi$1=new o$1o,Gi=new p$1d;function Ui$1(e,t,i,n,r){var o=e.camera,a=o.frustum;e$2e(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2*(t.x-r.x)/r.width-1;s*=.5*(a.right-a.left);var l=2*(r.height-t.y-r.y)/r.height-1;l*=.5*(a.top-a.bottom);var u=p$1d.clone(o.transform,Gi);o._setTransform(p$1d.IDENTITY);var c=o$1p.clone(o.position,Ai$1);o$1p.multiplyByScalar(o.right,s,Be$2),o$1p.add(Be$2,c,c),o$1p.multiplyByScalar(o.up,l,Be$2),o$1p.add(Be$2,c,c),o._setTransform(u),e.mode===C$14.SCENE2D&&o$1p.fromElements(c.z,c.x,c.y,c);var h=a.getPixelDimensions(r.width,r.height,1,1,Wi$1),d=Hi$1;return d.right=.5*h.x,d.left=-d.right,d.top=.5*h.y,d.bottom=-d.top,d.near=a.near,d.far=a.far,d.computeCullingVolume(c,o.directionWC,o.upWC)}var qi$1=new l$10,zi$1=new o$1o;function Qi(e,t,i,n,r){var o=e.camera,a=o.frustum,s=a.near,l=Math.tan(.5*a.fovy),u=a.aspectRatio*l,c=(2*(t.x-r.x)/r.width-1)*s*u,h=(2*(r.height-t.y-r.y)/r.height-1)*s*l,d=a.getPixelDimensions(r.width,r.height,1,1,zi$1),f=d.x*i*.5,p=d.y*n*.5,_=qi$1;return _.top=h+p,_.bottom=h-p,_.right=c+f,_.left=c-f,_.near=s,_.far=a.far,_.computeCullingVolume(o.positionWC,o.directionWC,o.upWC)}function pe$2(e,t,i,n,r){var o=e.camera.frustum;return o instanceof a$V||o instanceof l$11?Ui$1(e,t,i,n,r):Qi(e,t,i,n,r)}var N$4=3,I$4=3,F$4=new f$1a(0,0,N$4,I$4),ie$2=new e$1X(0,0,0,0),ce$4=new o$1o,ve$2=new o$1p;function Lt$1(e,t,i,n,r){N$4=u$Z(i,e._pickTolerance),I$4=u$Z(n,N$4);var o=e._context,a=o.uniformState,s=e._frameState,l=e._defaultView;e._view=l;var u=l.viewport;u.x=0,u.y=0,u.width=o.drawingBufferWidth,u.height=o.drawingBufferHeight;var c=l.passState;c.viewport=f$1a.clone(u,c.viewport);var h=s$R.transformWindowToDrawingBuffer(e,t,ce$4);if(e._multiViewportMode!==B$e.NONE){var d=le$3(e,h);if(h.y=o.drawingBufferHeight-h.y,d>-1){s.multiViewportIndex=d;var f=e._multiViewportInfo[d];x$7.x=o.drawingBufferWidth*f.x,x$7.y=o.drawingBufferHeight*f.y,x$7.width=o.drawingBufferWidth*f.width,x$7.height=o.drawingBufferHeight*f.height;var p=(h.x-x$7.x)/x$7.width,_=(h.y-x$7.y)/x$7.height;h.x=p*o.drawingBufferWidth,h.y=(1-_)*o.drawingBufferHeight}}for(var m=l.frustumCommandsList.length,g=[],x=0;x<m;++x){var y=e._picking.getPickDepth(e,x).getDepthPromise(o,h.x,h.y);g.push(y)}Promise.all(g).then((t=>{for(var i=0;i<t.length;i++){var n=t[i];n>0&&n<1&&(ve$2=s$R.drawingBufferToWgs84Coordinates(e,h,n,ve$2))}o._pickPosition[0]=ve$2.x,o._pickPosition[1]=ve$2.y,o._pickPosition[2]=ve$2.z;var r=a$18.fromCartesian(ve$2);e$2e(r)&&(o._pickPositionHeight=r.height)})),e._jobScheduler.disableThisFrame(),W$6(e),s.cullingVolume=pe$2(e,h,N$4,I$4,u),s.invertClassification=!1,s.passes.pick=!0,s.tilesetPassState=$e$1,a.update(s),G$4(e);var v=!1,$=e.particlePostRender,b=e.particleTrailsPostRenderer;($.enable||b.enable)&&(v=!0),F$4.x=e$2d.clamp(h.x-.5*(N$4-1),0,e.drawingBufferWidth-N$4),F$4.y=e$2d.clamp(e.drawingBufferHeight-h.y-.5*(I$4-1),0,e.drawingBufferHeight-I$4),F$4.width=N$4,F$4.height=I$4,c=l.pickFramebuffer.begin(F$4,l.viewport,v),e._renderPipeline.updateAndExecuteCommands(c,ie$2),e._renderPipeline.executeOverlayCommands(c),e._renderPipeline.resolveFramebuffers(c)}function Bt$2(e,t,i){for(var n=0,r=e._primitives.length;n<r;n++){var o=e._primitives._primitives[n];o.type==bt$6.INSTANCED_LAYER&&o.setUnSelected()}var a=e._analyst3D.layerQueue;for(n=0,r=a.length;n<r;n++){var s=a[n];s instanceof r$d&&s.releaseSelection()}if(e$2e(t)&&e$2e(t.primitive)&&(t.primitive.type===bt$6.INSTANCED_OBJECT||t.primitive instanceof r$d)&&t.primitive.setSelected(t.id),e$2e(t)&&e$2e(t.primitive)&&t.primitive instanceof _0x4881fc){var l=t.id.split("_");2==l.length&&t.primitive.setPolygonOffset(l[1])}else{var u=e$2e(t)&&e$2e(t.primitive)&&t.primitive instanceof _0x1a71e8;u?(e._layers._setSelection(t),e$2e(t.primitive)&&!1===t.primitive.selectEnabled&&(t=void 0)):e._layers.releaseSelection()}var c={isS3MTilesLayerSel:!1,pickedObject:void 0};return e$2e(t)||(c=e.pickRasterData(i)),!u&&c.isS3MTilesLayerSel?(e._frameState.commandListRealtimeRaster.length=0,c.pickedObject):(e$2e(t)&&e$2e(t.collection)&&(e$2e(t.collection._isS3MTileLabels)&&t.collection._isS3MTileLabels||t.collection._isMVT)&&e$2e(t.collection.setSelection)&&t.collection.setSelection(t.id),e._pickResult.pickFrameNumber=e._frameState.frameNumber,e._pickResult.pickObject=t,e._pickResult.pickObject)}w$4.prototype.pick=function(e,t,i,n){if(!e$2e(e))throw new t$15("windowPosition is undefined.");if(!this.requestRenderMode&&Math.abs(this._frameState.frameNumber-this._pickResult.pickFrameNumber)<5&&!e$2e(n))return this._pickResult.pickObject;var r=this._defaultView,o=this._context;Lt$1(this,e,t,i);var a=r.pickFramebuffer.end(F$4);return o.endFrame(),Bt$2(this,a,e),a},w$4.prototype.pickAsync=function(e,t,i,n){if(!e$2e(e))throw new t$15("windowPosition is undefined.");if(!this.requestRenderMode&&Math.abs(this._frameState.frameNumber-this._pickResult.pickFrameNumber)<5&&!e$2e(n))return Promise.resolve(this._pickResult.pickObject);var r=this._defaultView;this._context,Lt$1(this,e,t,i);var o=this;return r.pickFramebuffer.endAsync(F$4).then((t=>(t=Bt$2(o,t,e),Promise.resolve(t))))};var ae$3=new h$18,Mt$1=new o$1p,Ot$1=new o$1p,Nt$1=new o$1p,Me$2=new o$1p,Ki=new o$1p(0,0,-1),ji$1=new o$1p(0,1,0),Yi$1=new f$1a(0,0,1,1),K$2=new o$1o;function at$4(e,t){var i=e._context,n=e._frameState,r=e._environmentState,o=e.globe.translucency.enabled;o&&(e.globe.translucency.enabled=!1,e._globeTranslucencyState.translucent=!1);var a=e.globe.depthTestAgainstTerrain;e.globe.depthTestAgainstTerrain=!0;var s=e._defaultView;e._view=s;var l=s.viewport;l.x=0,l.y=0,l.width=i.drawingBufferWidth,l.height=i.drawingBufferHeight;var u=s.passState;u.viewport=f$1a.clone(l,u.viewport),tt$2(n.passes),n.passes.pick=!0,n.passes.depth=!0,n.cullingVolume=pe$2(e,t,1,1,l),G$4(e),r.renderTranslucentDepthForPick=!0,u=s.pickDepthFramebuffer.update(i,t,l),e._renderPipeline.updateAndExecuteCommands(u,ie$2),e._renderPipeline.resolveFramebuffers(u),e.globe.depthTestAgainstTerrain=a,o&&(e.globe.translucency.enabled=!0,e._globeTranslucencyState.translucent=!0),i.endFrame()}function le$3(e,t){if(e._mode===C$14.SCENE2D||e._multiViewportMode==B$e.NONE)return-1;for(var i=e._context,n=new f$1a(t.x,i.drawingBufferHeight-t.y),r=new f$1a,o=-1,a=0;a<e._multiViewportInfo.length;a++){var s=e._multiViewportInfo[a];if(r.x=i.drawingBufferWidth*s.x,r.y=i.drawingBufferHeight*s.y,r.width=i.drawingBufferWidth*s.width,r.height=i.drawingBufferHeight*s.height,r.intersect(n)===Ae$w.INTERSECTING){o=a;break}}return o}w$4.prototype.pickRasterData=function(e,t,i){if(!e$2e(e))throw new t$15("windowPosition is undefined.");var n=this._frameState,r=n.commandListRealtimeRaster;if(0===r.length)return{isS3MTilesLayerSel:!1,pickedObject:void 0};var o=this.pickPosition(e),a=a$18.fromCartesian(o),s=e$2d.toDegrees(a.longitude),l=e$2d.toDegrees(a.latitude);K$2.x=e.x,K$2.y=e.y+1;var u=this.pickPosition(K$2),c=a$18.fromCartesian(u),h=e$2d.toDegrees(c.latitude);K$2.x=e.x,K$2.y=e.y-1,u=this.pickPosition(K$2),c=a$18.fromCartesian(u);var d=e$2d.toDegrees(c.latitude);K$2.x=e.x-1,K$2.y=e.y,u=this.pickPosition(K$2),c=a$18.fromCartesian(u);var f=e$2d.toDegrees(c.longitude);K$2.x=e.x+1,K$2.y=e.y,u=this.pickPosition(K$2),c=a$18.fromCartesian(u);for(var p=e$2d.toDegrees(c.longitude),_=Math.abs(p-f),m=Math.abs(d-h),g=[],x=0;x<r.length;x++)ae$3.west=r[x]._boundingVolume.center.x-r[x]._boundingVolume.radius,ae$3.south=r[x]._boundingVolume.center.y-r[x]._boundingVolume.radius,ae$3.east=r[x]._boundingVolume.center.x+r[x]._boundingVolume.radius,ae$3.north=r[x]._boundingVolume.center.y+r[x]._boundingVolume.radius,s<ae$3.east&&s>ae$3.west&&l<ae$3.north&&l>ae$3.south&&g.push(r[x]);if(0===g.length)return{isS3MTilesLayerSel:!1,pickedObject:void 0};e$2e(this._rasterPickTexture)||(this._rasterPickTexture=new t$U({context:n.context,width:1,height:1,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}),this._rasterPickFBO=new t$V({context:n.context,colorTextures:[this._rasterPickTexture],destroyAttachments:!1}));var y=this._clearColorCommand.framebuffer;this._clearColorCommand.framebuffer=this._rasterPickFBO,this._clearColorCommand.execute(n.context);var v=n.camera;o$1p.clone(v.position,Mt$1),o$1p.clone(v.direction,Ot$1),o$1p.clone(v.up,Nt$1);var $=s-_,b=s+_,T=l+m,C=l-m;Me$2.x=.5*($+b),Me$2.y=.5*(T+C),Me$2.z=5,v.setView({destination:Me$2,orientation:{direction:Ki,up:ji$1},convert:!1});var S=new a$V({width:b-$,aspectRatio:1,near:1,far:10});n.context.uniformState.update(n),n.context.uniformState.updateFrustum(S);for(x=0;x<g.length;x++){g[x].renderState=d$1m.fromCache({viewport:Yi$1}),g[x].framebuffer=this._rasterPickFBO;var w=g[x].derivedCommands;w.picking=l$i.createPickDerivedCommand(this,g[x],n.context,w.picking),g[x].derivedCommands.picking.pickCommand.execute(n.context)}v.setView({destination:Mt$1,orientation:{direction:Ot$1,up:Nt$1},convert:!1}),n.context.uniformState.update(n),n.context.uniformState.updateFrustum(v.frustum);var E=n.context.readPixels({x:0,y:0,width:1,height:1,framebuffer:this._rasterPickFBO});n.context.pixels=E;var P=e$1X.byteToRgba(E[0],E[1],E[2],E[3]),A=n.context.getObjectByPickId(P),L=e$2e(A)&&e$2e(A.primitive)&&A.primitive instanceof _0x1a71e8;return L?this._layers._setSelection(A):this._layers.releaseSelection(),this._clearColorCommand.execute(n.context),this._clearColorCommand.framebuffer=y,{isS3MTilesLayerSel:L,pickedObject:A}},w$4.prototype.pickRasterData2D=function(e,t,i){var n=this.pickPosition(e),r=a$18.fromCartesian(n),o=this._frameState.rasterVectorCollection,a=o.getPickID(r);o.setSelection(a)},w$4.prototype.pointPick=function(e){if(!e$2e(e))throw new t$15("windowPosition is undefined.");var t=this._pickPointTolerance,i=t;N$4=u$Z(t,3),I$4=u$Z(i,N$4);var n=this._context,r=n.uniformState,o=this._frameState,a=this._defaultView;this._view=a;var s=a.viewport;s.x=0,s.y=0,s.width=n.drawingBufferWidth,s.height=n.drawingBufferHeight;var l=a.passState;l.viewport=f$1a.clone(s,l.viewport);var u=s$R.transformWindowToDrawingBuffer(this,e,m);if(this._multiViewportMode!==B$e.NONE){var c=le$3(this,u);if(u.y=n.drawingBufferHeight-u.y,c>-1){o.multiViewportIndex=c;var h=this._multiViewportInfo[c];x$7.x=n.drawingBufferWidth*h.x,x$7.y=n.drawingBufferHeight*h.y,x$7.width=n.drawingBufferWidth*h.width,x$7.height=n.drawingBufferHeight*h.height;var d=(u.x-x$7.x)/x$7.width,f=(u.y-x$7.y)/x$7.height;u.x=d*n.drawingBufferWidth,u.y=f*n.drawingBufferHeight,u.y=n.drawingBufferHeight-H$5.y}}this._jobScheduler.disableThisFrame(),W$6(this),o.cullingVolume=pe$2(this,u,N$4,I$4,s),o.invertClassification=!1,o.passes.pick=!0;var p=this._environmentVisible;this._environmentVisible=a.pickPointFramebuffer._environmentVisible,r.update(o),G$4(this),F$4.x=u.x-.5*(N$4-1),F$4.y=this.drawingBufferHeight-u.y-.5*(I$4-1),F$4.width=N$4,F$4.height=I$4,l=a.pickPointFramebuffer.begin(F$4,a.viewport),this._renderPipeline.updateAndExecuteCommands(l,ie$2),this._renderPipeline.resolveFramebuffers(l);var _=a.pickPointFramebuffer.end(F$4);if(n.endFrame(),this._environmentVisible=p,e$2e(_))if(_.z>-e$2d.EPSILON10)this._pos=void 0;else{var m=new e$2c,g=o$1p.magnitude(_);p$1d.multiplyByVector(o.camera.inverseViewMatrix,_,m);var x=s$R.wgs84ToWindowCoordinates(this,m,new o$1o),y=this.pickPosition(x,new o$1p);if(e$2e(y)&&!(g>o$1p.distance(y,o.camera.position)+5))return this._pos=new e$2c,e$2c.clone(m,this._pos),this._pos;this._pos=void 0}else this._pos=void 0},w$4.prototype.pickNormal=function(e){if(!e$2e(e))throw new t$15("windowPosition is undefined.");N$4=1,I$4=1;var t=this._context,i=t.uniformState,n=this._frameState,r=this._defaultView;this._view=r;var o=r.viewport;o.x=0,o.y=0,o.width=t.drawingBufferWidth,o.height=t.drawingBufferHeight;var a=r.passState;a.viewport=f$1a.clone(o,a.viewport);var s=s$R.transformWindowToDrawingBuffer(this,e,ce$4);if(this._multiViewportMode!==B$e.NONE){var l=le$3(this,s);if(s.y=t.drawingBufferHeight-s.y,l>-1){n.multiViewportIndex=l;var u=this._multiViewportInfo[l];x$7.x=t.drawingBufferWidth*u.x,x$7.y=t.drawingBufferHeight*u.y,x$7.width=t.drawingBufferWidth*u.width,x$7.height=t.drawingBufferHeight*u.height;var c=(s.x-x$7.x)/x$7.width,h=(s.y-x$7.y)/x$7.height;s.x=c*t.drawingBufferWidth,s.y=h*t.drawingBufferHeight,s.y=t.drawingBufferHeight-H$5.y}}this._jobScheduler.disableThisFrame(),W$6(this),n.cullingVolume=pe$2(this,s,N$4,I$4,o),n.invertClassification=!1,n.passes.pick=!0,n.passes.normal=!0;var d=this._environmentVisible;this._environmentVisible=r.normalFramebuffer._environmentVisible,i.update(n),G$4(this),F$4.x=s.x-.5*(N$4-1),F$4.y=this.drawingBufferHeight-s.y-.5*(I$4-1),F$4.width=N$4,F$4.height=I$4,a=r.normalFramebuffer.begin(F$4,r.viewport),this._renderPipeline.updateAndExecuteCommands(a,ie$2),this._renderPipeline.resolveFramebuffers(a);var f=r.normalFramebuffer.end(F$4);if(t.endFrame(),n.passes.pick=!1,n.passes.normal=!1,this._environmentVisible=d,e$2e(f))return f},w$4.prototype.pickNormalAsync=function(e){if(!e$2e(e))throw new t$15("windowPosition is undefined.");N$4=1,I$4=1;var t=this._context,i=t.uniformState,n=this._frameState,r=this._defaultView;this._view=r;var o=r.viewport;o.x=0,o.y=0,o.width=t.drawingBufferWidth,o.height=t.drawingBufferHeight;var a=r.passState;a.viewport=f$1a.clone(o,a.viewport);var s=s$R.transformWindowToDrawingBuffer(this,e,ce$4);if(this._multiViewportMode!==B$e.NONE){var l=le$3(this,s);if(s.y=t.drawingBufferHeight-s.y,l>-1){n.multiViewportIndex=l;var u=this._multiViewportInfo[l];x$7.x=t.drawingBufferWidth*u.x,x$7.y=t.drawingBufferHeight*u.y,x$7.width=t.drawingBufferWidth*u.width,x$7.height=t.drawingBufferHeight*u.height;var c=(s.x-x$7.x)/x$7.width,h=(s.y-x$7.y)/x$7.height;s.x=c*t.drawingBufferWidth,s.y=h*t.drawingBufferHeight,s.y=t.drawingBufferHeight-H$5.y}}this._jobScheduler.disableThisFrame(),W$6(this),n.cullingVolume=pe$2(this,s,N$4,I$4,o),n.invertClassification=!1,n.passes.pick=!0,n.passes.normal=!0;var d=this._environmentVisible;return this._environmentVisible=r.normalFramebuffer._environmentVisible,i.update(n),G$4(this),F$4.x=s.x-.5*(N$4-1),F$4.y=this.drawingBufferHeight-s.y-.5*(I$4-1),F$4.width=N$4,F$4.height=I$4,a=r.normalFramebuffer.begin(F$4,r.viewport),this._renderPipeline.updateAndExecuteCommands(a,ie$2),this._renderPipeline.resolveFramebuffers(a),r.normalFramebuffer.endAsync(F$4).then((e=>(t.endFrame(),n.passes.pick=!1,n.passes.normal=!1,this._environmentVisible=d,e$2e(e)?Promise.resolve(e):Promise.resolve(void 0))))};var x$7=new f$1a,H$5=new o$1o,_e=new o$1o;function It$2(e,t,i,n){var r=e._multiViewportInfo[n];x$7.x=i.drawingBufferWidth*r.x,x$7.y=i.drawingBufferHeight*r.y,x$7.width=i.drawingBufferWidth*r.width,x$7.height=i.drawingBufferHeight*r.height;var o=(H$5.x-x$7.x)/x$7.width,a=(H$5.y-x$7.y)/x$7.height;H$5.x=o*i.drawingBufferWidth,H$5.y=a*i.drawingBufferHeight,_e.x=H$5.x,_e.y=i.drawingBufferHeight-H$5.y}w$4.prototype.pickPositionWorldCoordinates=function(e,t,i){if(this.useDepthPicking){if(!e$2e(e))throw new t$15("windowPosition is undefined.");var n=e.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n))return o$1p.clone(this._pickPositionCache[n],t);var r=this._frameState,o=this._context,a=o.uniformState,s=this._defaultView;this._view=s;var l=s$R.transformWindowToDrawingBuffer(this,e,ce$4);if(o$1o.clone(l,_e),this.pickTranslucentDepth){if(this._multiViewportMode!==B$e.NONE){var u=le$3(this,l);o$1o.clone(l,H$5),H$5.y=o.drawingBufferHeight-H$5.y,u>-1&&(r.multiViewportIndex=u,It$2(this,r,o,u),W$6(this,r.frameNumber,r.time),r.tilesetPassState=$e$1)}at$4(this,_e)}else W$6(this,r.frameNumber,r.time),a.update(r),G$4(this);this._multiViewportMode!==B$e.NONE?l=H$5:l.y=this.drawingBufferHeight-l.y;var c,h=this.camera;c=e$2e(h.frustum.fov)?h.frustum.clone(Ee$2):e$2e(h.frustum.infiniteProjectionMatrix)?h.frustum.clone(Fe$2):e$2e(h.frustum.width)?h.frustum.clone(Re$2):h.frustum.clone(Le$2);for(var d=s.frustumCommandsList,f=d.length,p=0;p<f;++p){var _=this._picking.getPickDepth(this,p).getDepth(o,l.x,l.y,e$2e(i)&&i?this._pickDepthTolerance:0);if(_>0&&_<1){var m,g=d[p];return this.mode===C$14.SCENE2D?(m=h.position.z,h.position.z=m-g.near+1,c.far=Math.max(1,g.far-g.near),c.near=1,a.update(r),a.updateFrustum(c)):(c.near=g.near*(0!==p?this.opaqueFrustumNearOffset:1),c.far=g.far,a.updateFrustum(c)),t=s$R.drawingBufferToWgs84Coordinates(this,l,_,t),this.mode===C$14.SCENE2D&&(h.position.z=m,a.update(r)),this._pickPositionCache[n]=o$1p.clone(t),t}}this._pickPositionCache[n]=void 0}},w$4.prototype.pickPositionWorldCoordinatesAsync=function(e,t,i){if(!this.useDepthPicking)return Promise.resolve(void 0);if(!e$2e(e))throw new t$15("windowPosition is undefined.");var n=e.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n)){var r=o$1p.clone(this._pickPositionCache[n],t);return Promise.resolve(r)}var o=this._frameState,a=this._context,s=a.uniformState,l=this._defaultView;this._view=l;var u=s$R.transformWindowToDrawingBuffer(this,e,ce$4);if(o$1o.clone(u,_e),this.pickTranslucentDepth){if(this._multiViewportMode!==B$e.NONE){var c=le$3(this,u);o$1o.clone(u,H$5),H$5.y=a.drawingBufferHeight-H$5.y,c>-1&&(o.multiViewportIndex=c,It$2(this,o,a,c),W$6(this,o.frameNumber,o.time))}at$4(this,_e)}else W$6(this,o.frameNumber,o.time),s.update(o),G$4(this);this._multiViewportMode!==B$e.NONE?u=H$5:u.y=this.drawingBufferHeight-u.y;var h,d=this.camera;h=e$2e(d.frustum.fov)?d.frustum.clone(Ee$2):e$2e(d.frustum.infiniteProjectionMatrix)?d.frustum.clone(Fe$2):e$2e(d.frustum.width)?d.frustum.clone(Re$2):d.frustum.clone(Le$2);for(var f=l.frustumCommandsList,p=f.length,_=[],m=0;m<p;++m){var g=this._picking.getPickDepth(this,m).getDepthPromise(a,u.x,u.y,e$2e(i)&&i?this._pickDepthTolerance:0);_.push(g)}var x=this;return Promise.all(_).then((e=>{for(var i=0;i<e.length;i++){var r=e[i];if(!(r<=0||r>=1)){var a,l=f[i];return x.mode===C$14.SCENE2D?(a=d.position.z,d.position.z=a-l.near+1,h.far=Math.max(1,l.far-l.near),h.near=1,s.update(o),s.updateFrustum(h)):(h.near=l.near*(0!==i?x.opaqueFrustumNearOffset:1),h.far=l.far,s.updateFrustum(h)),t=s$R.drawingBufferToWgs84Coordinates(x,u,r,t),x.mode===C$14.SCENE2D&&(d.position.z=a,s.update(o)),x._pickPositionCache[n]=o$1p.clone(t),Promise.resolve(t)}}return x._pickPositionCache[n]=void 0,Promise.resolve(void 0)}))};var Ht$1=new a$18;function At$1(e,t){var i,n,r=[],o=[],a=[],s=[],l=Object.create(null);e$2e(e)||(e=Number.MAX_VALUE);for(var u=t();e$2e(u);){var c=u.object,h=u.position,d=u.exclude;if(e$2e(h)&&!e$2e(c)){r.push(u);break}if(!e$2e(c)||!e$2e(c.primitive)||!d&&(r.push(u),0>=--e))break;var f=c.primitive,p=!1;if("function"==typeof f.getGeometryInstanceAttributes&&e$2e(c.id)&&(e$2e(n=f.getGeometryInstanceAttributes(c.id))&&e$2e(n.show)&&(p=!0,n.show=e$1I.toValue(!1,n.show),a.push(n))),c instanceof e$M&&(p=!0,c.show=!1,s.push(c)),f instanceof _0x1a71e8){p=!0,f.setOnlyObjsVisible([c.id],!1);var _=f.id;(l[_]=l[_]||{}).layer=f,(l[_].ids=l[_].ids||[]).push(c.id)}p||(f.show=!1,o.push(f)),u=t()}for(i=0;i<o.length;++i)o[i].show=!0,o[i]instanceof _0x24f13b&&o[i].setSelected();for(var m in l){var g=l[m];g.layer.setOnlyObjsVisible(g.ids,!0)}for(i=0;i<a.length;++i)(n=a[i]).show=e$1I.toValue(!0,n.show);for(i=0;i<s.length;++i)s[i].show=!0;return r}function Zi(e){var t=e._frameState;t.camera.canPreloadFlight()&&(Xe$1.camera=e.preloadFlightCamera,Xe$1.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,Xe$1))}w$4.prototype.pickPosition=function(e,t){if(e$2e(t=this.pickPositionWorldCoordinates(e,t))&&this.mode!==C$14.SCENE3D){o$1p.fromElements(t.y,t.z,t.x,t);var i=this.mapProjection,n=i.ellipsoid,r=i.unproject(t,Ht$1);n.cartographicToCartesian(r,t)}return t},w$4.prototype.pickPositionAsync=function(e,t){var i=this;return this.pickPositionWorldCoordinatesAsync(e,t).then((e=>{if(e$2e(t=e)&&i.mode!==C$14.SCENE3D){o$1p.fromElements(t.y,t.z,t.x,t);var n=i.mapProjection,r=n.ellipsoid,o=n.unproject(t,Ht$1);r.cartographicToCartesian(o,t)}return Promise.resolve(t)}))},w$4.prototype.pickPosition2D=function(e,t){if(e$2e(t=this.pickPositionWorldCoordinates(e,t)))return e$2e(t)&&this.mode!==C$14.SCENE3D&&o$1p.fromElements(t.y,t.z,t.x,t),t.x+=o$1p.globalOffset.x,t.y+=o$1p.globalOffset.y,t.z+=o$1p.globalOffset.z,t},w$4.prototype.pickPosition2DAsync=function(e,t){var i=this;return this.pickPositionWorldCoordinatesAsync(e,t).then((e=>{if(e$2e(t=e))return e$2e(t)&&i.mode!==C$14.SCENE3D&&o$1p.fromElements(t.y,t.z,t.x,t),t.x+=o$1p.globalOffset.x,t.y+=o$1p.globalOffset.y,t.z+=o$1p.globalOffset.z,Promise.resolve(t)}))},w$4.prototype.pickTileCoordinate=function(e){function t(e,t){return h$18.contains(e.rectangle,t)?e:void 0}if(!e$2e(e))throw new t$15("windowPosition is required");var i=this.globe._surface._levelZeroTiles;if(e$2e(i)){var n,r;try{n=this.pickPosition(e,new o$1p),r=a$18.fromCartesian(n)}catch{return}for(var o=r.longitude,a=r.latitude,s=t(i[0],r)||t(i[1],r);s._lastSelectionResult===D$J.REFINED;)s=t(s.southwestChild,r)||t(s.southeastChild,r)||t(s.northwestChild,r)||s.northeastChild;var l=s.rectangle,u=(o-l.west)/l.width,c=(l.north-a)/l.height;return{x:s.x,y:s.y,level:s.level,xRatio:u,yRatio:c}}},w$4.prototype.drillPick=function(e,t,i,n){var r=this,o=At$1(t,(function(){var t=r.pick(e,i,n,!0);if(e$2e(t))return{object:t,position:void 0,exclude:!1}}));return o.map((function(e){return e.object}))};var Wt$1=new o$1p,Ji=new o$1p;function Gt$1(e,t,i,n){var r=t.direction,o=o$1p.mostOrthogonalAxis(r,Wt$1),a=o$1p.cross(r,o,Wt$1),s=o$1p.cross(r,a,Ji);n.position=t.origin,n.direction=r,n.up=s,n.right=a,n.frustum.width=u$Z(i,e.pickOffscreenDefaultWidth)}function ot$2(e,t,i,n,r){for(var o=[],a=e.primitives,s=a.length,l=0;l<s;++l){var u=a.get(l);u instanceof p$u&&u.show&&(!e$2e(i)||-1===i.indexOf(u))&&o.push(u)}if(0===o.length)return o$1l.resolve(r());var c=new pi$1(t,n,o);return e._asyncRayPicks.push(c),c.promise.then((function(){return r()}))}function $i$1(e,t){return!(!e$2e(e)||!e$2e(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function ea$1(e,t,i,n,r,o,a){var s=e._context,l=s.uniformState,u=e._frameState,c=e._pickOffscreenView;e._view=c,Gt$1(e,t,n,c.camera),F$4=f$1a.clone(c.viewport,F$4);var h=c.pickFramebuffer.begin(F$4,c.viewport);e._jobScheduler.disableThisFrame(),e$2e(e.camera.frustum.left)&&(u.cullingVolume=pe$2(e,{x:0,y:0},1,1,c.viewport)),W$6(e),u.invertClassification=!1,u.passes.pick=!0,u.passes.offscreen=!0,u.passes.asynchronous=o,c.updateFrustums=!0,u.tilesetPassState=a?yi$1:$e$1,l.update(u),G$4(e),e._renderPipeline.updateAndExecuteCommands(h,ie$2),e._renderPipeline.resolveFramebuffers(h);var d,f=c.pickFramebuffer.end(s);if(e._context.depthTexture)for(var p=c.frustumCommandsList.length,_=0;_<p;++_){var m=e._picking.getPickDepth(e,_).getDepth(s,0,0);if(m>0&&m<1){var g=c.frustumCommandsList[_],x=g.near*(0!==_?e.opaqueFrustumNearOffset:1),y=x+m*(g.far-x);d=f$19.getPoint(t,y);break}}if(e._view=e._defaultView,s.endFrame(),u.passes.pick=!1,u.passes.offscreen=!1,e$2e(f)||e$2e(d))return{object:f,position:d,exclude:!e$2e(d)&&r||$i$1(f,i)}}function Ut$1(e,t,i,n,r,o,a,s){return At$1(i,(function(){return ea$1(e,t,n,r,o,a,s)}))}function ge$3(e,t,i,n,r,o){var a=Ut$1(e,t,1,i,n,r,o,!1);if(a.length>0)return a[0]}function qt$1(e,t,i,n,r,o,a){return Ut$1(e,t,i,n,r,o,a,!0)}w$4.prototype.pickFromRay=function(e,t,i){if(o$1q.defined("ray",e),this._mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");return ge$3(this,e,t,i,!1,!1)},w$4.prototype.drillPickFromRay=function(e,t,i,n){if(o$1q.defined("ray",e),this._mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");return qt$1(this,e,t,i,n,!1,!1)},w$4.prototype.pickFromRayMostDetailed=function(e,t,i){if(o$1q.defined("ray",e),this._mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");var n=this;return e=f$19.clone(e),t=e$2e(t)?t.slice():t,ot$2(this,e,t,i,(function(){return ge$3(n,e,t,i,!1,!0)}))},w$4.prototype.drillPickFromRayMostDetailed=function(e,t,i,n){if(o$1q.defined("ray",e),this._mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");var r=this;return e=f$19.clone(e),i=e$2e(i)?i.slice():i,ot$2(this,e,i,n,(function(){return qt$1(r,e,t,i,n,!1,!0)}))};var ta$1=new o$1p,ra$1=new o$1p,ia$1=new f$19,zt$1=new a$18;function nt$3(e,t){var i=e.globe,n=e$2e(i)?i.ellipsoid:e.mapProjection.ellipsoid,r=e$1H._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,ra$1),a=a$18.toCartesian(t,n,ta$1),s=ia$1;s.origin=a,s.direction=o;var l=new f$19;return f$19.getPoint(s,r,l.origin),o$1p.negate(o,l.direction),l}function Qt$1(e,t){var i=e.globe,n=e$2e(i)?i.ellipsoid:e.mapProjection.ellipsoid;return nt$3(e,a$18.fromCartesian(t,n,zt$1))}function Kt$1(e,t){var i=e.globe,n=e$2e(i)?i.ellipsoid:e.mapProjection.ellipsoid;return a$18.fromCartesian(t,n,zt$1).height}function aa$1(e,t,i,n){var r=nt$3(e,t);return ot$2(e,r,i,n,(function(){var t=ge$3(e,r,i,n,!0,!0);if(e$2e(t))return Kt$1(e,t.position)}))}w$4.prototype.sampleHeight=function(e,t,i){if(o$1q.defined("position",e),this._mode!==C$14.SCENE3D)throw new t$15("sampleHeight is only supported in 3D mode.");if(!this.sampleHeightSupported)throw new t$15("sampleHeight requires depth texture support. Check sampleHeightSupported.");var n=ge$3(this,nt$3(this,e),t,i,!0,!1);if(e$2e(n))return Kt$1(this,n.position)},w$4.prototype.clampToHeight=function(e,t,i,n){if(o$1q.defined("cartesian",e),this._mode!==C$14.SCENE3D)throw new t$15("sampleHeight is only supported in 3D mode.");if(!this.clampToHeightSupported)throw new t$15("clampToHeight requires depth texture support. Check clampToHeightSupported.");i instanceof o$1p&&(n=i,i=void 0,t$11("clampToHeight-parameter-change","clampToHeight now takes an optional width argument before the result argument in SuperMap3D. The previous function definition will no longer work in 1.56."));var r=ge$3(this,Qt$1(this,e),t,i,!0,!1);if(e$2e(r))return o$1p.clone(r.position,n)},w$4.prototype.sampleHeightMostDetailed=function(e,t,i){if(o$1q.defined("positions",e),this._mode!==C$14.SCENE3D)throw new t$15("sampleHeightMostDetailed is only supported in 3D mode.");if(!this.sampleHeightSupported)throw new t$15("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");t=e$2e(t)?t.slice():t;for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=aa$1(this,e[o],t,i);return o$1l.all(r).then((function(t){for(var i=t.length,n=0;n<i;++n)e[n].height=t[n];return e}))},w$4.prototype.clampToHeightMostDetailed=function(e,t,i){return this._picking.clampToHeightMostDetailed(this,e,t,i)},w$4.prototype.cartesianToCanvasCoordinates=function(e,t){return s$R.wgs84ToWindowCoordinates(this,e,t)},w$4.prototype.completeMorph=function(){this._transitioner.completeMorph()},w$4.prototype.morphTo2D=function(e){var t,i=this.globe;t=e$2e(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=u$Z(e,2),this._transitioner.morphTo2D(e,t)},w$4.prototype.morphToColumbusView=function(e){var t,i=this.globe;t=e$2e(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=u$Z(e,2),this._transitioner.morphToColumbusView(e,t)},w$4.prototype.morphTo3D=function(e){var t,i=this.globe;t=e$2e(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=u$Z(e,2),this._transitioner.morphTo3D(e,t)},w$4.prototype.getViewport=function(e){if(this._multiViewportMode!==B$e.NONE){var t=le$3(this,s$R.transformWindowToDrawingBuffer(this,e,ce$4));if(t>-1){var i=this._context,n=new f$1a,r=this._multiViewportInfo[t];return n.x=i.drawingBufferWidth*r.x,n.y=i.drawingBufferHeight*r.y,n.width=i.drawingBufferWidth*r.width,n.height=i.drawingBufferHeight*r.height,n}}return(n=new f$1a).x=0,n.y=0,n.width=this._canvas.clientWidth,n.height=this._canvas.clientHeight,n},w$4.prototype.addS3MTilesLayerByScp=function(e,t,i,n){return this._sceneConfigLoader.addS3MTilesLayerByScp(e,t,i,n)},w$4.prototype.addS3MGroupLayer=function(e,t,i){return this._sceneConfigLoader.addS3MGroupLayer(e,t,i)},w$4.prototype.open=function(e,t,i){return this._sceneConfigLoader.open(e,t,i)},w$4.prototype.addVectorTilesLayer=function(e){return e.renderer="canvas",this.addVectorTilesMap(e)},w$4.prototype.getVectorTilesLayer=function(e){return this.getVectorTilesMap(e)},w$4.prototype.removeVectorTilesLayer=function(e){return this.removeVectorTilesMap(e)},w$4.prototype.addVectorTilesMap=function(e){if(!e$2e(e.url))throw new t$15("url is required!");var t=e.name||e$1T();e.name=t;var i=this._vectorTileSource.get(t);if(e$2e(i))return this._vectorTileMaps.find(e.name);i=new M$S(this._context,e),this._vectorTileSource.set(t,i);var n=this.imageryLayers.addVectorTileProvider(i);i.innerLayer=n,e$2e(this._frameState.mvtLayerCount)?this._frameState.mvtLayerCount++:this._frameState.mvtLayerCount=1;var r=new i$P({provider:i,layer:i.innerLayer,imagelayerCollection:this.imageryLayers,scene:this,viewer:e.viewer,name:e.name||e$1T(),layerConfig:e.layerConfig,swipeEnabled:u$Z(e.swipeEnabled,!1),swipeRegion:u$Z(e.swipeRegion,new f$1a(0,0,1,1)),enableMorphing:e.enableMorphing,realtime:e.realtime,billboardMode:e.billboardMode,customRequestHeaders:e.customRequestHeaders,labelDepthTestEnabled:e.labelDepthTestEnabled,lineAntialiasing:e.lineAntialiasing});return e.isTdt&&(i._ready=!0,r._isTdt=!0),i.innerLayer.kmlLayer=r.kmlLayer,i._owner=r,this._vectorTileMaps.add(r),r},w$4.prototype.getVectorTilesMap=function(e){if(!e$2e(e))throw new t$15("name is required!");return this._vectorTileMaps.find(e)},w$4.prototype.removeVectorTilesMap=function(e){var t=this._vectorTileMaps.find(e);return!!e$2e(t)&&(this._removeCoverImageryLayer(t),this._vectorTileMaps.remove(e),this._vectorTileSource.remove(e),!0)},w$4.prototype._removeCoverImageryLayer=function(e){for(var t=0;t<this._layers.layerQueue.length;t++){var i=this._layers.layerQueue[t];i._imageryLayer===e&&i._removeCoverImageryLayer()}},w$4.prototype.addLayerService=function(e,t,i){return this._sceneConfigLoader.addLayerService(e,t,i)},w$4.prototype.addS3MInstanceCollection=function(e,t){var i=new S3MInstanceCollection({url:e,instanceAttrs:t,gl:this._context._gl,context:this._context});return this.primitives.add(i),i};var oa$1=new o$1p;function na$1(e){var t=e._context;t.uniformState;var i=e._frameState,n=i.camera,r=n.positionWC,o=i.cullingVolume,a=i.mode===C$14.SCENE3D?i.occluder:void 0;if(e$2e(e._reflectFramebuffer)||(e._reflectFramebuffer=t.createReflectFramebuffer(),i._framebufferList.water=e._reflectFramebuffer),e._reflectFramebuffer.distinctQuality=e._waterReflectionDistinctQuality,e.postProcessStages.screenSpaceReflection.enabled)e._reflectFramebuffer.isUpdate=!1;else{for(var s=6378137,l=0,u=0;u<e.layers._layerQueue.length;u++){var c=e.layers._layerQueue[u];if(e$2e(c._waterPlanes)){var h=c._waterPlanes;for(var d in h._hash){var f=h.get(d);if(!(o.computeVisibility(f.boundingVolume)==Ae$w.OUTSIDE||e$2e(a)&&f.boundingVolume.isOccluded(a)))(_=(_=e$2e(f.boundingVolume.radius)?o$1p.distance(f.boundingVolume.center,r)-f.boundingVolume.radius:Math.sqrt(y$Y.distanceSquaredTo(f.boundingVolume,r)))<.01?.01:_)<s&&(s=_,l=f.distance),e._reflectFramebuffer.isUpdate=!0}}}var p=e._analyst3D.layerQueue.length;for(u=0;u<p;u++){if(-1!=e._analyst3D.layerQueue[u]._name.search("floodAnalysis3D")){var _,m=e._analyst3D.layerQueue[u];(_=(_=o$1p.distance(m._boundingSphere.center,r)-m._boundingSphere.radius)<.01?.01:_)<s&&(s=_,l=m._waterHeight),e._reflectFramebuffer.isUpdate=!0}}if(!e._reflectFramebuffer.isUpdate||s>5e4)e._reflectFramebuffer.isUpdate=!1;else{if(e.mode==C$14.SCENE3D){l+=o$1p.magnitude(n.positionWC)-n.positionCartographic.height,e._reflectFramebuffer._reflectPlane.normal=o$1p.normalize(r,oa$1);var g=new o$1p;e._reflectFramebuffer._reflectPlane.normal.clone(g),o$1p.multiplyByScalar(g,l,g),o$1p.subtract(g,t._relativeOrigin,g),e._reflectFramebuffer._reflectPlane.distance=-o$1p.dot(g,e._reflectFramebuffer._reflectPlane.normal)}else e._reflectFramebuffer._reflectPlane.normal=o$1p.UNIT_X,e._reflectFramebuffer._reflectPlane.distance=-l;e._reflectFramebuffer.isUpdate=!0}}}function sa$1(e){var t=e._context;t.uniformState;var i=e._frameState;t.numNormalAndDepthObject>0?(e$2e(e._normalFramebuffer)||(e._normalFramebuffer=t.createNormalFramebuffer(),i._framebufferList.normalAndDepth=e._normalFramebuffer),e._normalFramebuffer.isUpdate=!0):e$2e(e._normalFramebuffer)&&(e._normalFramebuffer.isUpdate=!1)}function ua(e){var t=e._context;t.uniformState;var i=e._frameState;t.numPostEffectFilterObject>0?(e$2e(e._postEffectFilterFramebuffer)||(e._postEffectFilterFramebuffer=t.createPostEffectFilterlFramebuffer(),i._framebufferList.postEffectFilter=e._postEffectFilterFramebuffer),e._postEffectFilterFramebuffer.isUpdate=!0):e$2e(e._postEffectFilterFramebuffer)&&(e._postEffectFilterFramebuffer.isUpdate=!1)}function fa(e){var t=e._context;t.uniformState;var i=e._frameState;t.numClampClipPlaneLayer>0?(e$2e(e._clampFramebuffer)||(e._clampFramebuffer=t.createClampFramebuffer(),i._framebufferList.clampTexture=e._clampFramebuffer),e._clampFramebuffer.isUpdate=!0):e$2e(e._clampFramebuffer)&&(e._clampFramebuffer.isUpdate=!1)}function st$2(e){var t=e._context;t.uniformState;var i=e._frameState;e._isUpdatePickCommand?(e$2e(e._pickRectFramebuffer)||(e._pickRectFramebuffer=t.createPickRectFramebuffer(),i._framebufferList.pickRectTexture=e._pickRectFramebuffer,e._pickRectFramebuffer.beginFunc=function(){this._renderTexture._passState.scissorTest={enabled:!0,rectangle:{x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}}}),e._pickRectFramebuffer.isUpdate=!0,e._isUpdatePickCommand=!1):e$2e(e._pickRectFramebuffer)&&(e._pickRectFramebuffer.isUpdate=!1)}function jt$1(e){if(e$2e(e._pickRectFramebuffer)&&e._pickRectFramebuffer.isUpdate){for(var t=e._context,i=e._pickRectFramebuffer.renderTexture._width,n=e._pickRectFramebuffer.renderTexture._height,r=t.readPixels({framebuffer:e._pickRectFramebuffer.renderTexture._fb,x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}),o=[],a=[],s=[],l=e._layers.layerQueue,u=0;u<l.length;u++){s[g=Oe$1(_=l[u].id)]=u,o.push(g),a[g]=[]}r.length;for(var c=0;c<i;c++)for(var h=0;h<n;h++){var d=4*(h*i+c);if(0!==r[d]||0!==r[d+1]||0!==r[d+2]){var f=e$1X.byteToRgba(r[d],r[d+1],r[d+2],r[d+3]),p=t.getObjectByPickId(f);if(e$2e(p)){var _=p.primitive.id,m=p.id,g=Oe$1(_),x=o.indexOf(g);if(x>=0){var y=l[s[g]];if(0==a[g].length)(b=[]).push(m),a[g]=b;else(x=a[g].indexOf(m))<0&&a[g].push(m)}}}}for(var v=Object.keys(a),$=0;$<v.length;$++){var b;y=l[u=s[v[$]]];(b=a[v[$]]).length>0&&y.setSelection(b)}}}function la(e){if(!e$2e(e._pickRectFramebuffer)||!e._pickRectFramebuffer.isUpdate)return Promise.resolve();var t=e._context,i=e._pickRectFramebuffer.renderTexture._width,n=e._pickRectFramebuffer.renderTexture._height;return t.readPixelsAsync({framebuffer:e._pickRectFramebuffer.renderTexture._fb,x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}).then((r=>{for(var o=[],a=[],s=[],l=e._layers.layerQueue,u=0;u<l.length;u++){s[g=Oe$1(_=l[u].id)]=u,o.push(g),a[g]=[]}r.length;for(var c=0;c<i;c++)for(var h=0;h<n;h++){var d=4*(h*i+c);if(0!==r[d]||0!==r[d+1]||0!==r[d+2]){var f=e$1X.byteToRgba(r[d],r[d+1],r[d+2],r[d+3]),p=t.getObjectByPickId(f);if(e$2e(p)){var _=p.primitive.id,m=p.id,g=Oe$1(_),x=o.indexOf(g);if(x>=0){var y=l[s[g]];if(0==a[g].length)(b=[]).push(m),a[g]=b;else(x=a[g].indexOf(m))<0&&a[g].push(m)}}}}for(var v=Object.keys(a),$=0;$<v.length;$++){var b;y=l[u=s[v[$]]];(b=a[v[$]]).length>0&&y.setSelection(b)}return Promise.resolve()}))}function Oe$1(e){return"id_"+e}function ha(e,t,i){var n=e._context,r=e._frameState,o=t.begin(r),a=e._environmentVisible;e._environmentVisible=t.environmentVisible;var s=r.useType,l=r._isDepth;if(r.useType=t.useType,r._isDepth=!1,e._multiViewportMode!==B$e.NONE)for(var u=0;u<4;u++)if(1<<u&t._visibleViewport){r.multiViewportIndex=u;break}e._renderPipeline.updateAndExecuteCommandsForPostEffect(o,u$Z(e.backgroundColor,e$1X.BLACK)),r.multiViewportIndex=-1,t.update(o,e._pickDepths),e._environmentState,r.commandList.length=0,n.endFrame(),t.end(r),r._isDepth=l,r.useType=s,e._environmentVisible=a}function ut$4(e){var t=e._context,i=t.uniformState,n=e._frameState,r=n.camera,o=n._framebufferList;n.passes.fbo=!0;var a=e.enableCompositor;for(var s in e.enableCompositor=!0,o){var l=o[s];if(e$2e(l)&&l.isUpdate&&(!l.isDestroyed||!l.isDestroyed())){var u=n.useType,c=n._isDepth,h=n._fboState.name,d=n._fboState.enabled,f=n._fboState.frameBufferType,p=e._sunCamera.direction;if(n._fboState.name=s,n._fboState.enabled=!0,n._fboState.frameBufferType=l.frameBufferType,l.frameBufferType===Qe$c.POSTEFFECT_FILTER)ha(e,l);else{var _=r.frustum.near;l.frameBufferType===Qe$c.REFLECT&&(r.frustum.near=1);var m=l.begin(n),g=e._environmentVisible;e._environmentVisible=l.environmentVisible,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.update(n);var x=e.shadowMap;e$2e(x)&&x.enabled&&o$1p.negate(i.sunDirectionWC,e._sunCamera.direction);var y=n.shadowState.nearPlane,v=n.shadowState.farPlane,$=n.shadowState.closestObjectSize;if(n.useType=l.useType,n._isDepth=(6&l.useType)>0||1&l.useType&&l.isManualDepth,e._multiViewportMode!==B$e.NONE)for(var b=0;b<4;b++)if(1<<b&l._visibleViewport){n.multiViewportIndex=b;break}G$4(e),e._renderPipeline.updateAndExecuteCommands(m,u$Z(e.backgroundColor,e$1X.BLACK)),n.multiViewportIndex=-1;var T=e._environmentState;if(!t.webgpu&&e._msaaSamples>1&&T.useGlobeDepthFramebuffer){var C=e._view.globeDepth;l.update(t,m,C.framebufferWithTexture)}else l.update(t,m,m.framebuffer);n._fboState.frameBufferType!==Qe$c.CLAMP&&e._renderPipeline.resolveFramebuffers(m),n.commandList.length=0,t.endFrame(),Tt(e),l.end(n),e$2e(x)&&x.enabled&&-1!==n._fboState.name.indexOf("ShadowQueryPoints")&&(e._sunCamera.direction=p),"water"==n._fboState.name&&(r.frustum.near=_),e._environmentVisible=g,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.update(n),e$2e(x)&&x.enabled&&o$1p.negate(i.sunDirectionWC,e._sunCamera.direction),n.shadowState.nearPlane=y,n.shadowState.farPlane=v,n.shadowState.closestObjectSize=$}n._fboState.name=h,n._fboState.enabled=d,n._fboState.frameBufferType=f,n._isDepth=c,n.useType=u}}n.passes.fbo=!1,e.enableCompositor=a}function Yt$1(e,t){var i=e._context,n=i.uniformState,r=e._frameState,o=r.camera,a=e.shadowMap.enabled,s=r.shadowState.shadowsEnabled;r.passes.fbo=!0,e.shadowMap.enabled=!1,r.shadowState.shadowsEnabled=!1;var l=r.useType,u=r._isDepth,c=r._fboState.name,h=r._fboState.enabled,d=r._fboState.frameBufferType;r._fboState.enabled=!0,r._fboState.frameBufferType=t.frameBufferType;var f=t.begin(r),p=e._environmentVisible;e._environmentVisible=t.environmentVisible,r.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.update(r),r.useType=t.useType,r._isDepth=(6&t.useType)>0||1&t.useType&&t.isManualDepth,G$4(e),e._renderPipeline.updateAndExecuteCommands(f,u$Z(e.backgroundColor,e$1X.BLACK));var _=e._environmentState;if(!i.webgpu&&e._msaaSamples>1&&_.useGlobeDepthFramebuffer){var m=e._view.globeDepth;t.update(i,f,m.framebufferWithTexture)}else t.update(i,f,f.framebuffer);e._renderPipeline.resolveFramebuffers(f),r.commandList.length=0,i.endFrame(),t.end(r),e._environmentVisible=p,r.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.update(r),r._fboState.name=c,r._fboState.enabled=h,r._fboState.frameBufferType=d,r._isDepth=u,r.useType=l,r.passes.fbo=!1,e.shadowMap.enabled=a,r.shadowState.shadowsEnabled=s}function ma(e){var t=e._context.uniformState;if(!e.enableOutline||e.camera._positionCartographic.height>2e3)return t.nonSelDepthTexture=void 0,void(t.maskTexture=void 0);var i=e.nonSelDepthbuffer;e$2e(i)||((i=e.nonSelDepthbuffer=new s$U(e.context)).environmentVisible.isObjectVisible=!0,i.environmentVisible.isGlobalVisible=!0,i.isUpdate=!0,i._beginFunc=function(t){t.passes.pick=!0,t.passes.depth=!0,e.layers.getSelectedLayer().selectedColor.alpha=0},i._endFunc=function(t){t.passes.pick=!1,t.passes.depth=!1,e.layers.getSelectedLayer().selectedColor.alpha=1}),Yt$1(e,i),t.nonSelDepthTexture=i.depthTexture;var n=e.selMaskBuffer;e$2e(n)||((n=e.selMaskBuffer=new t$E(e.context))._useHeight=!1,n.environmentVisible.isObjectVisible=!0,n.environmentVisible.isOnlyS3MObjectVisible=!0,n.environmentVisible.isGlobalVisible=!1,n.isUpdate=!0),e._maskEnabled=!0;var r=e.backgroundColor;e.backgroundColor=e$1X.clone(e$1X.WHITE),Yt$1(e,n),e.backgroundColor=r,e._maskEnabled=!1,t.maskTexture=n.renderTexture._fb.getColorTexture(0)}w$4.prototype.addFieldLayer=function(e){if(!e$2e(e))throw new t$15("url is required!");var t=this;if(e.indexOf(".nc")>-1){var i=o$1l.defer();return o$1l(o$10(e),(function(e){var n=new k$6(e),r=new i$g(t._context);r._NetCDFBuffer=n,r.NetCDFInfo=n.header,t._layers.add(r),i.resolve(r)})).otherwise((function(e){throw i.reject(e.message),new t$15("Not a valid NetCDF file!")})),i.promise}},w$4.prototype.addVoxelGridLayer=function(e,t){if(!e$2e(e))throw new t$15("url is required!");var i=this,n=o$1l.defer();return e.indexOf(".nc")>-1?(o$1l(o$10(e),(function(e){var r=new k$6.NetCDFReader(e),o=new g$e(i._context);o._NetCDFBuffer=r,o._NetCDFInfo=r.header,o._name=t,i._layers.add(o),n.resolve(o)})).otherwise((function(e){throw new t$15("Not a valid NetCDF file!")})),n.promise):(o$1l(u$Q(e),(function(t){for(var r=(t=(new DOMParser).parseFromString(t,"application/xml")).childNodes[0],o=u$Z(s$T.queryStringAttribute(r,"xmlns:sml"),"http://www.supermap.com/SuperMapCache/scvo"),a=s$T.queryNumericValue(r,"Version",o),s=s$T.queryStringValue(r,"CacheName",o),l=(s$T.queryStringValue(r,"StoreType",o),s$T.queryStringValue(r,"FileExtentName",o),s$T.queryStringValue(r,"Type",o),s$T.queryStringValue(r,"VolumeType",o),s$T.queryNumericValue(r,"Width",o)),u=s$T.queryNumericValue(r,"Height",o),c=s$T.queryNumericValue(r,"Depth",o),h=s$T.queryNumericValue(r,"Time",o),d=s$T.queryNumericValue(r,"CellWidth",o),f=s$T.queryNumericValue(r,"CellHeight",o),p=s$T.queryNumericValue(r,"CellDepth",o),_=s$T.queryNumericValue(r,"CellTime",o),m=s$T.queryFirstNode(r,"Bounds",o),g=s$T.queryNumericValue(m,"Left",o),x=s$T.queryNumericValue(m,"Right",o),y=s$T.queryNumericValue(m,"Top",o),v=s$T.queryNumericValue(m,"Bottom",o),$=s$T.queryNumericValue(r,"MaxAltitude",o),b=s$T.queryNumericValue(r,"MinAltitude",o),T=s$T.queryNumericValue(r,"MaxValue",o),C=s$T.queryNumericValue(r,"MinValue",o),S=s$T.queryNumericValue(r,"Levels",o),w=s$T.queryFirstNode(r,"Available",o),E=s$T.queryNodes(w,"TilesBounds",o),P=[],A=0,L=E.length;A<L;A++){var M=s$T.queryNumericAttribute(E[A],"level",o),R=s$T.queryNodes(E[A],"TileBounds",o),O=s$T.queryNumericValue(R[0],"StartCol",o),D=s$T.queryNumericValue(R[0],"StartRow",o),I=s$T.queryNumericValue(R[0],"EndCol",o),F=s$T.queryNumericValue(R[0],"EndRow",o);P[M]={StartCol:O,StartRow:D,EndCol:I,EndRow:F}}var B=new g$e(i._context);B.setIsMultiResolution(!0);var N=e.lastIndexOf("/");B._url=e.slice(0,N),B._name=s,B._version=a,B._width=l,B._height=u,B._zBounds=new o$1o(b,$),B._layerBounds=new h$18(g,v,x,y);var G=B._layerBounds.width/l,z=B._layerBounds.height/u;for(A=P.length-1;A>=0;A--)P[A].Width=l,P[A].Height=u,l=Math.floor(.5*l),u=Math.floor(.5*u),P[A].resolution=new o$1o(G,z),G*=2,z*=2;B._depth=c,B._time=h,B._levels=S,B._cellWidth=d,B._cellHeight=f,B._cellDepth=p,B._cellTime=_,B._maxFiltration=T,B._minFiltration=C,B._floor=C,B._ceil=T,B._availableNode=P,o$1l(o$10(B._url+"/0/0000/0000/0000_0000.vol"),(function(e){var t=e.slice(16,e.byteLength);B._volumeBuffer=nt$b.inflate(t).buffer,i._layers.add(B),n.resolve(B)})).otherwise((function(e){throw new t$15("Not load root file!")}))})).otherwise((function(e){throw new t$15("Not a valid SCVO file!")})),n.promise)},w$4.prototype.renderIds=function(e){var t=this._context,i=this._defaultView;this._view=i;var n=i.viewport;n.x=0,n.y=0,n.width=t.drawingBufferWidth,n.height=t.drawingBufferHeight,F$4.x=0,F$4.y=0,F$4.width=t.drawingBufferWidth,F$4.height=t.drawingBufferHeight;var r=t.uniformState,o=this._frameState;W$6(this),o.invertClassification=!1,o.passes.pick=!0,r.update(o);var a=i.pickFramebuffer.begin(F$4,n),s=this._environmentVisible.isGlobalVisible;this._environmentVisible.isGlobalVisible=!1,this._environmentVisible.isOnlyS3MObjectVisible=!0;var l=this.camera,u=o$1p.clone(l.position),c=l.heading,h=l.pitch,d=l.roll;this.camera.setView(e),G$4(this),this._renderPipeline.updateAndExecuteCommands(a,ie$2),this._renderPipeline.resolveFramebuffers(a),t.endFrame(),this._environmentVisible.isGlobalVisible=s,this._environmentVisible.isOnlyS3MObjectVisible=!1,l.setView({destination:u,orientation:{heading:c,pitch:h,roll:d}})},w$4.prototype.pickRect=function(e,t){var i=e$2d.clamp(this._context.drawingBufferHeight-e.y,0,this._context.drawingBufferHeight),n=e$2d.clamp(this._context.drawingBufferHeight-t.y,0,this._context.drawingBufferHeight),r=Math.min(e.x,t.x),o=Math.min(i,n),a=Math.max(e.x,t.x),s=Math.max(i,n),l=new e$2c;l.x=r/this._context.drawingBufferWidth,l.y=o/this._context.drawingBufferHeight,l.z=a/this._context.drawingBufferWidth,l.w=s/this._context.drawingBufferHeight,this._isUpdatePickCommand=!0,this._pickRect=new e$2c(r,o,a,s);for(var u=0,c=this._layers.layerQueue.length;u<c;u++){this._layers.layerQueue[u].selectBound=l}},w$4.prototype.getPickRectIDs=function(){for(var e=new e$1Q,t=this._layers.layerQueue,i={},n=!1,r=0;r<t.length;r++){i[(_=t[r]).id]=Object.keys(_._objsVisibleMap),n=!!_._objsVisibleMap[i[_.id][0]]}for(var o=0;o<10;o++){this._isUpdatePickCommand=!0,this.initializeFrame(),this._renderForQuery();var a=!1;for(r=0;r<t.length;r++){var s=(_=t[r]).getSelection();if(!(s.length<=0)){if(e.contains(_.id)){var l;l=s.concat(e.get(_.id).ids),s=l}for(var u=[],c=(o=0,s.length);o<c;o++){var h=s[o],d=i[_.id].indexOf(h);(n&&d>-1||!n&&-1===d)&&u.push(h)}var f={layerName:_.name,layerIndex:r,ids:u};e.set(_.id,f),a=!0,_.releaseSelection(),_.setObjsVisible(s,!1)}}if(!a)break}var p=[];this._isUpdatePickCommand=!1;for(o=0;o<e.values.length;o++){var _;(_=t[e.values[o].layerIndex]).setObjsVisible([],!1),n||_.setOnlyObjsVisible(i[_.id],n);var m={layerName:e.values[o].layerName,ids:e.values[o].ids};p.push(m)}return p},w$4.prototype.getPickRectIDsAsync=function(){var e=new Promise(((e,t)=>{for(var i=new e$1Q,n=this._layers.layerQueue,r={},o=!1,a=0;a<n.length;a++){var s=n[a];r[s.id]=Object.keys(s._objsVisibleMap),o=!!s._objsVisibleMap[r[s.id][0]]}for(var l=0,u=0;u<10;u++)this._isUpdatePickCommand=!0,this.initializeFrame(),this._renderForQueryAsync().then((()=>{l++;for(var t=0;t<n.length;t++){var a=(m=n[t]).getSelection();if(!(a.length<=0)){if(i.contains(m.id)){var s;s=a.concat(i.get(m.id).ids),a=s}for(var u=[],c=0,h=a.length;c<h;c++){var d=a[c],f=r[m.id].indexOf(d);(o&&f>-1||!o&&-1===f)&&u.push(d)}var p={layerName:m.name,layerIndex:t,ids:u};i.set(m.id,p),m.releaseSelection()}}if(10===l){var _=[];this._isUpdatePickCommand=!1;for(c=0;c<i.values.length;c++){var m=n[i.values[c].layerIndex];o||m.setOnlyObjsVisible(r[m.id],o);var g={layerName:i.values[c].layerName,ids:i.values[c].ids};_.push(g)}e(_)}}))}));return e},w$4.prototype._renderForQuery=function(){var e=this.context,t=e.uniformState,i=this._frameState,n=this._defaultView;this._view=n,W$6(this),i.passes.render=!0,i.passes.postProcess=this.postProcessStages.hasSelected,i.backgroundColor=u$Z(this.backgroundColor,e$1X.BLACK),t.update(i);var r=n.viewport;r.x=0,r.y=0,r.width=e.drawingBufferWidth,r.height=e.drawingBufferHeight;var o=n.passState;o.framebuffer=void 0,o.blendingEnabled=void 0,o.scissorTest=void 0,o.viewport=f$1a.clone(r,o.viewport),st$2(this),ut$4(this),G$4(this),this._renderPipeline.resolveFramebuffers(o),o.framebuffer=void 0,jt$1(this),e.endFrame()},w$4.prototype._renderForQueryAsync=function(){var e=this.context,t=e.uniformState,i=this._frameState,n=this._defaultView;this._view=n,W$6(this),i.passes.render=!0,i.passes.postProcess=this.postProcessStages.hasSelected,i.backgroundColor=u$Z(this.backgroundColor,e$1X.BLACK),t.update(i);var r=n.viewport;r.x=0,r.y=0,r.width=e.drawingBufferWidth,r.height=e.drawingBufferHeight;var o=n.passState;return o.framebuffer=void 0,o.blendingEnabled=void 0,o.scissorTest=void 0,o.viewport=f$1a.clone(r,o.viewport),st$2(this),ut$4(this),G$4(this),this._renderPipeline.resolveFramebuffers(o),o.framebuffer=void 0,la(this).then((()=>(e.endFrame(),Promise.resolve())))},w$4.prototype.getHeight=function(e,t){var i=this._context,n=i.uniformState,r=this._frameState;this._environmentState;var o=this._defaultView;this._view=o;var a=o.viewport;a.x=0,a.y=0,a.width=i.drawingBufferWidth,a.height=i.drawingBufferHeight;var s=new o$1o(.5*i.drawingBufferWidth,.5*i.drawingBufferHeight),l=o.passState;l.viewport=f$1a.clone(a,l.viewport),tt$2(r.passes),r.passes.pick=!0,r.passes.depth=!0,G$4(this),l=o.pickDepthFramebuffer.update(i,s,a);var u,c=this.camera,h=o$1p.clone(c.positionWC),d=o$1p.clone(c.direction),f=o$1p.clone(c.up);c.setView({destination:o$1p.fromDegrees(e,t,9e3)}),this._renderPipeline.updateAndExecuteCommands(l,ie$2),this._renderPipeline.resolveFramebuffers(l),i.endFrame(),u=e$2e(c.frustum.fov)?c.frustum.clone(Ee$2):e$2e(c.frustum.infiniteProjectionMatrix)?c.frustum.clone(Fe$2):e$2e(c.frustum.width)?c.frustum.clone(Re$2):c.frustum.clone(Le$2);for(var p,_=o.frustumCommandsList,m=_.length,g=new o$1p,x=0;x<m;++x){var y=this._picking.getPickDepth(this,x).getDepth(i,s.x,s.y);if(y>0&&y<1){var v=_[x];u.near=v.near*(0!==x?this.opaqueFrustumNearOffset:1),u.far=v.far,n.updateFrustum(u),g=s$R.drawingBufferToWgs84Coordinates(this,s,y,g),p=a$18.fromCartesian(g).height;break}}return c.setView({destination:h,orientation:{direction:d,up:f}}),p},w$4.prototype.addLightSource=function(e){LicenseChecker.LICENSECHECKER.verify("Scene_addLightSource"),e$2e(e)&&this._lightSource.addLightSource(e)},w$4.prototype.removeLightSource=function(e){!e$2e(e)||this._lightSource.removeLightSource(e)},w$4.prototype.outputSceneToFile=function(){var e=this,t=o$1l.defer(),i=!1;return this.postRender.addEventListener((function(){i||(i=!0,e.context.readPixelsAsync({}).then((i=>{var n=document.createElement("canvas");n.height=e.context.drawingBufferHeight,n.width=e.context.drawingBufferWidth;var r=n.getContext("2d"),o=r.createImageData(n.width,n.height);o.data.set(i),r.putImageData(o,0,0);var a=r.getImageData(0,0,n.width,n.height);if(e.context.webgpu)for(var s=0;s<a.height;++s)for(var l=0;l<a.width;++l){var u=s*a.width+l,c=a.data[4*u],h=a.data[4*u+2];a.data[4*u]=h,a.data[4*u+2]=c}else for(s=0;s<a.height/2;++s)for(l=0;l<a.width;++l){var d=4*s*a.width+4*l,f=4*(a.height-s)*a.width+4*l,p=(c=a.data[d],a.data[d+1]),_=(h=a.data[d+2],a.data[d+3]);a.data[d]=a.data[f],a.data[d+1]=a.data[f+1],a.data[d+2]=a.data[f+2],a.data[d+3]=a.data[f+3],a.data[f]=c,a.data[f+1]=p,a.data[f+2]=h,a.data[f+3]=_}r.clearRect(0,0,a.width,a.height),r.putImageData(a,0,0);var m=n.toDataURL();t.resolve(m)})))})),t.promise},w$4.prototype.collideDetection=function(e){if(this.mode===C$14.SCENE3D||this.mode===C$14.COLUMBUS_VIEW){var t=this._context,i=this._defaultView;this._view=i;var n=this.camera,r=t.uniformState,o=o$1p.clone(n.direction),a=o$1p.clone(n.up),s=o$1p.cross(e,n.right,new o$1p);n.setView({destination:n.position,orientation:{direction:e,up:s},convert:n._mode!==C$14.COLUMBUS_VIEW});var l,u=new o$1o(.5*t.drawingBufferWidth,.5*t.drawingBufferHeight);at$4(this,u),this.camera.setView({destination:this.camera.position,orientation:{direction:o,up:a},convert:n._mode!==C$14.COLUMBUS_VIEW}),l=e$2e(n.frustum.fov)?n.frustum.clone(Ee$2):e$2e(n.frustum.infiniteProjectionMatrix)?n.frustum.clone(Fe$2):e$2e(n.frustum.width)?n.frustum.clone(Re$2):n.frustum.clone(Le$2);for(var c=i.frustumCommandsList,h=c.length,d=new o$1p,f=0;f<h;++f){var p=this._picking.getPickDepth(this,f).getDepth(t,u.x,u.y);if(p>0&&p<1){var _=c[f];return l.near=_.near*(0!==f?this.opaqueFrustumNearOffset:1),l.far=_.far,r.updateFrustum(l),s$R.drawingBufferToWgs84Coordinates(this,u,p,d)}}}},w$4.prototype.parsePBRFromJson=function(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(t$10.createIfNeeded(e[i]).fetchJson());var r=this;o$1l.all(t,(function(e){for(var t=0,i=e.length;t<i;t++){var n=e[t].material,o=new p$1d,a=n.pbrMetallicRoughness;n.textureunitstates,o[0]=a.roughnessFactor,o[1]=a.metallicFactor,o[2]=a.baseColor.x,o[3]=a.baseColor.y,o[4]=a.baseColor.z,o[5]=a.baseColor.w,r._pbrMaterlParameters.push(o)}}))},w$4.prototype.isDestroyed=function(){return!1},w$4.prototype.destroy=function(){this.layers.removeAll(),this.layers.endFrame(this._frameState),this._analyst3D.removeAll(),this._vectorTileMaps.removeAll(),this._plotLayers.removeAll(),this.compositor.destroy(),this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.cloudBox=this.cloudBox&&this.cloudBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this.moon=this.moon&&this.moon.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy(),this._view=void 0,this.shadowMap=this.shadowMap&&this.shadowMap.destroy(),this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),e$2e(this._reflectFramebuffer)&&(this._reflectFramebuffer.destroy(),this._frameState._framebufferList.water=void 0),e$2e(this._normalFramebuffer)&&(this._normalFramebuffer.destroy(),this._frameState._framebufferList.normalAndDepth=void 0),e$2e(this._postEffectFilterFramebuffer)&&(this._postEffectFilterFramebuffer.destroy(),this._frameState._framebufferList.postEffectFilter=void 0),e$2e(this._clampFramebuffer)&&(this._clampFramebuffer.destroy(),this._frameState._framebufferList.clampTexture=void 0),e$2e(this._pickRectFramebuffer)&&(this._pickRectFramebuffer.destroy(),this._frameState._framebufferList.pickRectTexture=void 0),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),e$2e(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(var e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,this._rasterPickTexture=this._rasterPickTexture&&!this._rasterPickTexture.isDestroyed()&&this._rasterPickTexture.destroy(),this._rasterPickFBO=this._rasterPickFBO&&!this._rasterPickFBO.isDestroyed()&&this._rasterPickFBO.destroy(),e$2e(this.voxelGridPostRender)&&this.voxelGridPostRender.destroy(),this.voxelGridPostRender=void 0,e$2e(this.particlePostRender)&&this.particlePostRender.destroy(),this.particlePostRender=void 0,e$2e(this.particleTrailsPostRenderer)&&this.particleTrailsPostRenderer.destroy(),this.particleTrailsPostRenderer=void 0,e$2e(this.nonSelDepthbuffer)&&this.nonSelDepthbuffer.destroy(),e$2e(this.selMaskBuffer)&&this.selMaskBuffer.destroy(),e$2e(this._renderPipeline)&&this._renderPipeline.destroy(),i$11(this)};var g$8="uniform vec3 u_radiiAndDynamicAtmosphereColor;\n\nuniform float u_atmosphereLightIntensity;\nuniform float u_atmosphereRayleighScaleHeight;\nuniform float u_atmosphereMieScaleHeight;\nuniform float u_atmosphereMieAnisotropy;\nuniform vec3 u_atmosphereRayleighCoefficient;\nuniform vec3 u_atmosphereMieCoefficient;\n\nconst float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.\nconst int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.\nconst int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.\n\n/**\n * Rational approximation to tanh(x)\n*/\nfloat approximateTanh(float x) {\n float x2 = x * x;\n return max(-1.0, min(+1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));\n}\n\n/**\n * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as\n * the transmittance value for the ray.\n *\n * @param {czm_ray} primaryRay The ray from the camera to the position.\n * @param {float} primaryRayLength The length of the primary ray.\n * @param {vec3} lightDirection The direction of the light to calculate the scattering from.\n * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.\n * @param {vec3} mieColor The variable the Mie scattering will be written to.\n * @param {float} opacity The variable the transmittance will be written to.\n * @glslFunction\n */\nvoid computeScattering(\n czm_ray primaryRay,\n float primaryRayLength,\n vec3 lightDirection,\n float atmosphereInnerRadius,\n out vec3 rayleighColor,\n out vec3 mieColor,\n out float opacity\n) {\n\n // Initialize the default scattering amounts to 0.\n rayleighColor = vec3(0.0);\n mieColor = vec3(0.0);\n opacity = 0.0;\n\n float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\n\n vec3 origin = vec3(0.0);\n\n // Calculate intersection from the camera to the outer ring of the atmosphere.\n czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);\n\n // Return empty colors if no intersection with the atmosphere geometry.\n if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {\n return;\n }\n\n // To deal with smaller values of PRIMARY_STEPS (e.g. 4)\n // we implement a split strategy: sky or horizon.\n // For performance reasons, instead of a if/else branch\n // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0\n float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);\n // Value close to 0.0: close to the horizon\n // Value close to 1.0: above in the sky\n float w_stop_gt_lprl = 0.5 * (1.0 + approximateTanh(x));\n \n // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.\n float start_0 = primaryRayAtmosphereIntersect.start;\n primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);\n // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.\n primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));\n\n // For the number of ray steps, distinguish inside or outside atmosphere (outer space)\n // (1) from outer space we have to use more ray steps to get a realistic rendering\n // (2) within atmosphere we need fewer steps for faster rendering\n float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters\n float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + approximateTanh(x_o_a));\n int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.\n int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.\n\n // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.\n float rayPositionLength = primaryRayAtmosphereIntersect.start;\n // (1) Outside the atmosphere: constant rayStepLength\n // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps\n float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;\n float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));\n float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));\n\n vec3 rayleighAccumulation = vec3(0.0);\n vec3 mieAccumulation = vec3(0.0);\n vec2 opticalDepth = vec2(0.0);\n vec2 heightScale = vec2(u_atmosphereRayleighScaleHeight, u_atmosphereMieScaleHeight);\n\n // Sample positions on the primary ray.\n for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {\n\n // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to break early instead\n if (i >= PRIMARY_STEPS) {\n break;\n }\n\n // Calculate sample position along viewpoint ray.\n vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);\n\n // Calculate height of sample position above ellipsoid.\n float sampleHeight = length(samplePosition) - atmosphereInnerRadius;\n\n // Calculate and accumulate density of particles at the sample position.\n vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;\n opticalDepth += sampleDensity;\n\n // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.\n czm_ray lightRay = czm_ray(samplePosition, lightDirection);\n czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);\n\n float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);\n float lightPositionLength = 0.0;\n\n vec2 lightOpticalDepth = vec2(0.0);\n\n // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.\n for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {\n\n // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot\n // loop with non-constant condition, so it has to break early instead\n if (j >= LIGHT_STEPS) {\n break;\n }\n\n // Calculate sample position along light ray.\n vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);\n\n // Calculate height of the light sample position above ellipsoid.\n float lightHeight = length(lightPosition) - atmosphereInnerRadius;\n\n // Calculate density of photons at the light sample position.\n lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;\n\n // Increment distance on light ray.\n lightPositionLength += lightStepLength;\n }\n\n // Compute attenuation via the primary ray and the light ray.\n vec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));\n\n // Accumulate the scattering.\n rayleighAccumulation += sampleDensity.x * attenuation;\n mieAccumulation += sampleDensity.y * attenuation;\n\n // Increment distance on primary ray.\n rayPositionLength += (rayStepLength += rayStepLengthIncrease);\n }\n\n // Compute the scattering amount.\n rayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation;\n mieColor = u_atmosphereMieCoefficient * mieAccumulation;\n\n // Compute the transmittance i.e. how much light is passing through the atmosphere.\n opacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x))));\n}\n\nvec4 computeAtmosphereColor(\n vec3 positionWC,\n vec3 lightDirection,\n vec3 rayleighColor,\n vec3 mieColor,\n float opacity\n) {\n // Setup the primary ray: from the camera position to the vertex position.\n vec3 cameraToPositionWC = positionWC - czm_viewerPositionECEF;\n vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\n\n float cosAngle = dot(cameraToPositionWCDirection, lightDirection);\n float cosAngleSq = cosAngle * cosAngle;\n\n float G = u_atmosphereMieAnisotropy;\n float GSq = G * G;\n\n // The Rayleigh phase function.\n float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);\n // The Mie phase function.\n float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));\n\n // The final color is generated by combining the effects of the Rayleigh and Mie scattering.\n vec3 rayleigh = rayleighPhase * rayleighColor;\n vec3 mie = miePhase * mieColor;\n\n vec3 color = (rayleigh + mie) * u_atmosphereLightIntensity;\n\n return vec4(color, opacity);\n}\n",x$6="float interpolateByDistance(vec4 nearFarScalar, float distance)\n{\n float startDistance = nearFarScalar.x;\n float startValue = nearFarScalar.y;\n float endDistance = nearFarScalar.z;\n float endValue = nearFarScalar.w;\n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\n return mix(startValue, endValue, t);\n}\n\nvec3 getLightDirection(vec3 positionWC)\n{\n float lightEnum = u_radiiAndDynamicAtmosphereColor.z;\n vec3 lightDirection =\n positionWC * float(lightEnum == 0.0) +\n czm_lightDirectionWC * float(lightEnum == 1.0) +\n czm_sunDirectionWC * float(lightEnum == 2.0);\n return normalize(lightDirection);\n}\n\nvoid computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity, out float underTranslucentGlobe)\n{\n float ellipsoidRadiiDifference = czm_ellipsoidRadii.x - czm_ellipsoidRadii.z;\n\n // Adjustment to the atmosphere radius applied based on the camera height.\n float distanceAdjustMin = czm_ellipsoidRadii.x / 4.0;\n float distanceAdjustMax = czm_ellipsoidRadii.x;\n float distanceAdjustModifier = ellipsoidRadiiDifference / 2.0;\n float distanceAdjust = distanceAdjustModifier * clamp((czm_eyeHeight - distanceAdjustMin) / (distanceAdjustMax - distanceAdjustMin), 0.0, 1.0);\n\n // Since atmosphere scattering assumes the atmosphere is a spherical shell, we compute an inner radius of the atmosphere best fit \n // for the position on the ellipsoid.\n float radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust;\n float atmosphereInnerRadius = (length(czm_viewerPositionECEF) - czm_eyeHeight) - radiusAdjust;\n\n // Setup the primary ray: from the camera position to the vertex position.\n vec3 cameraToPositionWC = positionWC - czm_viewerPositionECEF;\n vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\n czm_ray primaryRay = czm_ray(czm_viewerPositionECEF, cameraToPositionWCDirection);\n\n underTranslucentGlobe = 0.0;\n\n // Brighten the sky atmosphere under the Earth's atmosphere when translucency is enabled.\n #if defined(GLOBE_TRANSLUCENT)\n\n // Check for intersection with the inner radius of the atmopshere.\n czm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust);\n if (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) {\n \n // Compute position on globe.\n vec3 direction = normalize(positionWC);\n czm_ray ellipsoidRay = czm_ray(positionWC, -direction);\n czm_raySegment ellipsoidIntersection = czm_rayEllipsoidIntersectionInterval(ellipsoidRay, vec3(0.0), czm_ellipsoidInverseRadii);\n vec3 onEarth = positionWC - (direction * ellipsoidIntersection.start);\n\n // Control the color using the camera angle.\n float angle = dot(normalize(czm_viewerPositionECEF), normalize(onEarth));\n\n // Control the opacity using the distance from Earth.\n opacity = interpolateByDistance(vec4(0.0, 1.0, czm_ellipsoidRadii.x, 0.0), length(czm_viewerPositionECEF - onEarth));\n vec3 horizonColor = vec3(0.1, 0.2, 0.3);\n vec3 nearColor = vec3(0.0);\n\n rayleighColor = mix(nearColor, horizonColor, exp(-angle) * opacity);\n \n // Set the traslucent flag to avoid alpha adjustment in computeFinalColor funciton.\n underTranslucentGlobe = 1.0;\n return;\n }\n #endif\n\n computeScattering(\n primaryRay,\n length(cameraToPositionWC),\n lightDirection,\n atmosphereInnerRadius,\n rayleighColor,\n mieColor,\n opacity\n );\n\n // Alter the opacity based on how close the viewer is to the ground.\n // (0.0 = At edge of atmosphere, 1.0 = On ground)\n float cameraHeight = czm_eyeHeight + atmosphereInnerRadius;\n float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\n opacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0);\n\n // Alter alpha based on time of day (0.0 = night , 1.0 = day)\n float nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;\n opacity *= pow(nightAlpha, 0.5);\n}\n",B$3="varying vec3 v_outerPositionWC;\n\nuniform vec3 u_hsbShift;\n\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\nvarying float v_opacity;\nvarying float v_translucent;\n#endif\n\nvoid main (void)\n{\n vec3 lightDirection = getLightDirection(v_outerPositionWC);\n \n vec3 mieColor;\n vec3 rayleighColor;\n float opacity;\n float translucent;\n\n #ifdef PER_FRAGMENT_ATMOSPHERE\n computeAtmosphereScattering(\n v_outerPositionWC,\n lightDirection,\n rayleighColor,\n mieColor,\n opacity,\n translucent\n );\n #else\n mieColor = v_mieColor;\n rayleighColor = v_rayleighColor;\n opacity = v_opacity;\n translucent = v_translucent;\n #endif\n\n vec4 color = computeAtmosphereColor(v_outerPositionWC, lightDirection, rayleighColor, mieColor, opacity);\n\n #ifndef HDR\n color.rgb = czm_acesTonemapping(color.rgb);\n color.rgb = czm_inverseGamma(color.rgb);\n #endif\n\n #ifdef COLOR_CORRECT\n // Convert rgb color to hsb\n vec3 hsb = czm_RGBToHSB(color.rgb);\n // Perform hsb shift\n hsb.x += u_hsbShift.x; // hue\n hsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0); // saturation\n hsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0; // brightness\n // Convert shifted hsb back to rgb\n color.rgb = czm_HSBToRGB(hsb);\n #endif\n\n // For the parts of the sky atmosphere that are not behind a translucent globe,\n // we mix in the default opacity so that the sky atmosphere still appears at distance.\n // This is needed because the opacity in the sky atmosphere is initially adjusted based\n // on the camera height.\n if (translucent == 0.0) {\n color.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime);\n }\n\n gl_FragColor = color;\n}\n",I$3="attribute vec4 position;\n\nvarying vec3 v_outerPositionWC;\n\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\nvarying float v_opacity;\nvarying float v_translucent;\n#endif\n\nvoid main(void)\n{\n vec4 positionWC = czm_model * position;\n vec3 lightDirection = getLightDirection(positionWC.xyz);\n\n #ifndef PER_FRAGMENT_ATMOSPHERE\n computeAtmosphereScattering(\n positionWC.xyz,\n lightDirection,\n v_rayleighColor,\n v_mieColor,\n v_opacity,\n v_translucent\n );\n #endif\n \n v_outerPositionWC = positionWC.xyz;\n vec4 realPosition = czm_model * position;\n realPosition.xyz -= czm_relativeOrigin;\n gl_Position = czm_viewProjection * realPosition;\n}\n";function h$6(e){e=u$Z(e,t$12.WGS84),this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;const t=o$1p.multiplyByScalar(e.radii,1.025,new o$1p);this._scaleMatrix=p$1d.fromScale(t),this._modelMatrix=new p$1d,this._command=new i$$({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new o$1p(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new o$1p(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new o$1p;const i=new o$1p;i.x=1.025*e.maximumRadius,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;const n=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return n._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return n._hueSaturationBrightness.x=n.hueShift,n._hueSaturationBrightness.y=n.saturationShift,n._hueSaturationBrightness.z=n.brightnessShift,n._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return n.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return n.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return n.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return n.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return n.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return n.atmosphereMieAnisotropy}}}Object.defineProperties(h$6.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),h$6.prototype.setDynamicAtmosphereColor=function(e,t){const i=e?t?2:1:0;this._radiiAndDynamicAtmosphereColor.z=i};const u$6=new p$1d;function V$5(e){return!(e$2d.equalsEpsilon(e.hueShift,0,e$2d.EPSILON7)&&e$2d.equalsEpsilon(e.saturationShift,0,e$2d.EPSILON7)&&e$2d.equalsEpsilon(e.brightnessShift,0,e$2d.EPSILON7))}h$6.prototype.update=function(e,t){if(!this.show)return;const i=e.mode;if(i!==C$14.SCENE3D&&i!==C$14.MORPHING||!e.passes.render)return;const n=p$1d.fromRotationTranslation(e.context.uniformState.inverseViewRotation,o$1p.ZERO,u$6),r=p$1d.multiplyTransformation(n,v$y.Y_UP_TO_Z_UP,u$6),o=p$1d.multiply(this._scaleMatrix,r,u$6);p$1d.clone(o,this._modelMatrix);const a=e.context,s=V$5(this),l=e.globeTranslucencyState.translucent,u=this.perFragmentAtmosphere||l||!e$2e(t)||!t.show,c=this._command;if(!e$2e(c.vertexArray)){const e=b$O.createGeometry(new b$O({radii:new o$1p(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:n$13.POSITION_ONLY}));this._attributeLocations=k$14.createAttributeLocations(e),c.vertexArray=c$13.fromGeometry({context:a,geometry:e,attributeLocations:this._attributeLocations,bufferUsage:A$18.STATIC_DRAW}),c.renderState=d$1m.fromCache({cull:{enabled:!0,face:G$1a.FRONT},blending:Ee$r.ALPHA_BLEND,depthMask:!1})}const h=s|u<<2|l<<3;if(h!==this._flags){this._flags=h;const e=[];s&&e.push("COLOR_CORRECT"),u&&e.push("PER_FRAGMENT_ATMOSPHERE"),l&&e.push("GLOBE_TRANSLUCENT");const t=new s$V({name:"SkyAtmosphereVS",defines:e,sources:[g$8,x$6,I$3]}),i=new s$V({name:"SkyAtmosphereFS",defines:e,sources:[g$8,x$6,B$3]});this._spSkyAtmosphere=r$14.fromCache({context:a,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:this._attributeLocations}),c.shaderProgram=this._spSkyAtmosphere}return c},h$6.prototype.isDestroyed=function(){return!1},h$6.prototype.destroy=function(){const e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),i$11(this)};var J$2="uniform samplerCube u_cubeMap;\nuniform float u_alpha;\nvarying vec3 v_texCoord;\n\nvoid main()\n{\n vec4 color = textureCube(u_cubeMap, normalize(v_texCoord));\n float alpha = czm_sceneMode == czm_sceneModeColumbusView ? u_alpha : u_alpha * czm_morphTime;\n gl_FragColor = vec4(czm_gammaCorrect(color).rgb, alpha);\n}\n",$$3="attribute vec3 position;\nuniform mat3 u_rotateMatrix;\nvarying vec3 v_texCoord;\n\nvoid main()\n{\n if (czm_sceneMode == czm_sceneModeColumbusView) {\n vec3 worldPosition = czm_entireFrustum.y * position;\n gl_Position = czm_modelViewProjection * vec4(worldPosition, 1.0);\n vec3 texCoord = normalize(worldPosition);\n v_texCoord = texCoord.zxy;\n }\n else{\n vec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position.xyz;\n }\n}\n";function h$5(e){LicenseChecker.LICENSECHECKER.verify("SkyBox"),this.sources=e.sources,this._sources=void 0,this.show=u$Z(e.show,!0),this._command=new i$$({modelMatrix:p$1d.clone(p$1d.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0,this.alpha=1,this._uSpeed=0,this._vSpeed=0,this._wSpeed=0,this._horizontalRotationAngle=0,this._axisChanged=!0,this.imageUrl=e.imageUrl,this._imageUrl=void 0,this._PreprocessCubeMap=void 0}function oe$3(e){return!(0!==e._horizontalRotationAngle||0!==e._wSpeed||0!==e._uSpeed||0!==e._vSpeed)}Object.defineProperties(h$5.prototype,{USpeed:{get:function(){return this._uSpeed},set:function(e){o$1q.typeOf.number("SkyBox.uSpeed",e),this._uSpeed=e,this._axisChanged=!0}},VSpeed:{get:function(){return this._vSpeed},set:function(e){o$1q.typeOf.number("SkyBox.vSpeed",e),this._vSpeed=e,this._axisChanged=!0}},WSpeed:{get:function(){return this._wSpeed},set:function(e){o$1q.typeOf.number("SkyBox.wSpeed",e),this._wSpeed=e,this._axisChanged=!0}},horizontalRotationAngle:{get:function(){return this._horizontalRotationAngle},set:function(e){o$1q.typeOf.number("SkyBox.horizontalRotationAngle",e),this._horizontalRotationAngle=e,this._axisChanged=!0}}});var ae$2=new o$1p,S$2=new o$1p,w$3=new o$1p,C$5=new o$1p,ne$3=new o$1p(1,1,1),A$8=new n$15,d$b=new o$1p,P$5=0,R$4=p$1d.IDENTITY.clone(new p$1d);function t$8(){}h$5.prototype.update=function(e,t){oe$3(this)||LicenseChecker.LICENSECHECKER.verify("SkyBox");var i=this;if(this.show&&(e.mode===C$14.SCENE3D||e.mode===C$14.COLUMBUS_VIEW||e.mode===C$14.MORPHING)&&e.passes.render){var n=e.context;if(this._sources!==this.sources){this._sources=this.sources;var r=this.sources;if(!(e$2e(r.positiveX)&&e$2e(r.negativeX)&&e$2e(r.positiveY)&&e$2e(r.negativeY)&&e$2e(r.positiveZ)&&e$2e(r.negativeZ)))throw new t$15("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof r.positiveX!=typeof r.negativeX||typeof r.positiveX!=typeof r.positiveY||typeof r.positiveX!=typeof r.negativeY||typeof r.positiveX!=typeof r.positiveZ||typeof r.positiveX!=typeof r.negativeZ)throw new t$15("this.sources properties must all be the same type.");"string"==typeof r.positiveX?d$q(n,this._sources).then((function(e){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=e})):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new e$1P({context:n,source:r}))}this._imageUrl!==this.imageUrl&&!this._sources&&(this._imageUrl=this.imageUrl,this._PreprocessCubeMap=new b$s(n,this._imageUrl)),e$2e(this._PreprocessCubeMap)&&(this._PreprocessCubeMap.update(e),this._PreprocessCubeMap.ready&&(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=this._PreprocessCubeMap.cubeMap,this._PreprocessCubeMap=void 0));var o=this._command;if(e.mode===C$14.COLUMBUS_VIEW?o.modelMatrix=e.camera._actualInvTransform:o.modelMatrix=m$19.eastNorthUpToFixedFrame(e.camera._positionWC),o.removeAllFastBundleAndBindGroups(),this._axisChanged){var a=p$1d.multiplyByPoint(o.modelMatrix,o$1p.ZERO,ae$2),s=p$1d.multiplyByPoint(o.modelMatrix,o$1p.UNIT_X,S$2),l=p$1d.multiplyByPoint(o.modelMatrix,o$1p.UNIT_Y,w$3),u=p$1d.multiplyByPoint(o.modelMatrix,o$1p.UNIT_Z,C$5),c=o$1p.subtract(s,a,S$2),h=o$1p.subtract(l,a,w$3),d=o$1p.subtract(u,a,C$5),f=n$15.fromAxisAngle(c,this._uSpeed*performance.now()/1e5),p=n$15.fromAxisAngle(h,this._vSpeed*performance.now()/1e5),_=n$15.fromAxisAngle(d,this._wSpeed*performance.now()/1e5);this._horizontalRotationAngle&&(_=n$15.fromAxisAngle(d,this._horizontalRotationAngle));var m=n$15.multiply(f,n$15.multiply(p,_,A$8),A$8);d$b=n$15.computeAxis(m,d$b),P$5=Math.max(Math.max(Math.abs(this._uSpeed),Math.abs(this._vSpeed)),Math.abs(this._wSpeed)),this._axisChanged=!1}var g=p$1d.IDENTITY.clone(R$4);if(!o$1p.equals(d$b,o$1p.ZERO)&&!e.camera.bReflect){var x=P$5*performance.now()/1e5;this._horizontalRotationAngle&&(x=this._horizontalRotationAngle),g=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,n$15.fromAxisAngle(d$b,x),ne$3,R$4),p$1d.multiply(g,o.modelMatrix,o.modelMatrix)}if(!e$2e(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return i._cubeMap},u_rotateMatrix:function(){return p$1d.getRotation(o.modelMatrix,new p$1e)},u_alpha:function(){return i.alpha}};var y=O$z.createGeometry(O$z.fromDimensions({dimensions:new o$1p(2,2,2),vertexFormat:n$13.POSITION_ONLY})),v=this._attributeLocations=k$14.createAttributeLocations(y);o.vertexArray=c$13.fromGeometry({context:n,geometry:y,attributeLocations:v,bufferUsage:A$18.STATIC_DRAW}),o.renderState=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND})}if(!e$2e(o.shaderProgram)||this._useHdr!==t){var $=new s$V({defines:[t?"HDR":""],sources:[J$2]});o.shaderProgram=r$14.fromCache({name:"spSkyBox",context:n,vertexShaderSource:$$3,fragmentShaderSource:$,attributeLocations:this._attributeLocations}),this._useHdr=t}if(e$2e(this._cubeMap))return o}},h$5.prototype.isDestroyed=function(){return!1},h$5.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),i$11(this)},t$8.prototype.evaluate=function(e,t){t$15.throwInstantiationError()},t$8.prototype.evaluateColor=function(e,t){t$15.throwInstantiationError()},t$8.prototype.getShaderFunction=function(e,t,i,n){t$15.throwInstantiationError()};var rt$3="uniform sampler2D u_texture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color = texture2D(u_texture, v_textureCoordinates);\n gl_FragColor = czm_gammaCorrect(color);\n}\n",et$2="uniform float u_radiusTS;\n\nvarying vec2 v_textureCoordinates;\n\nvec2 rotate(vec2 p, vec2 direction)\n{\n return vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);\n}\n\nvec4 addBurst(vec2 position, vec2 direction, float lengthScalar)\n{\n vec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);\n float radius = length(rotatedPosition) * lengthScalar;\n float burst = 1.0 - smoothstep(0.0, 0.55, radius);\n return vec4(burst);\n}\n\nvoid main()\n{\n float lengthScalar = 2.0 / sqrt(2.0);\n vec2 position = v_textureCoordinates - vec2(0.5);\n float radius = length(position) * lengthScalar;\n float surface = step(radius, u_radiusTS);\n vec4 color = vec4(vec2(1.0), surface + 0.2, surface);\n\n float glow = 1.0 - smoothstep(0.0, 0.55, radius);\n color.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;\n\n vec4 burst = vec4(0.0);\n\n // The following loop has been manually unrolled for speed, to\n // avoid sin() and cos().\n //\n //for (float i = 0.4; i < 3.2; i += 1.047) {\n // vec2 direction = vec2(sin(i), cos(i));\n // burst += 0.4 * addBurst(position, direction, lengthScalar);\n //\n // direction = vec2(sin(i - 0.08), cos(i - 0.08));\n // burst += 0.3 * addBurst(position, direction, lengthScalar);\n //}\n\n burst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar); // angle == 0.4\n burst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar); // angle == 0.4 + 1.047\n burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar); // angle == 0.4 + 1.047 * 2.0\n\n burst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar); // angle == 0.4 - 0.08\n burst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar); // angle == 0.4 + 1.047 - 0.08\n burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar); // angle == 0.4 + 1.047 * 2.0 - 0.08\n\n // End of manual loop unrolling.\n\n color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;\n\n gl_FragColor = clamp(color, vec4(0.0), vec4(1.0));\n}\n",it$1="attribute vec2 direction;\n\nuniform float u_size;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main() \n{\n vec4 position;\n if (czm_morphTime == 1.0)\n {\n position = vec4(czm_sunPositionWC, 1.0);\n }\n else\n {\n position = vec4(czm_sunPositionColumbusView.zxy, 1.0);\n }\n \n vec4 positionEC = czm_view * position;\n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n \n vec2 halfSize = vec2(u_size * 0.5);\n halfSize *= ((direction * 2.0) - 1.0);\n \n gl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);\n \n v_textureCoordinates = direction;\n}\n",nt$2="attribute direction : vec2<f32>;\n\nuniform u_size : f32;\n\nvarying v_textureCoordinates : vec2<f32>;\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs { \n var position : vec4<f32>;\n if (uniforms.czm_morphTime == 1.0)\n {\n position = vec4<f32>(uniforms.czm_sunPositionWC, 1.0);\n }\n else\n {\n position = vec4<f32>(uniforms.czm_sunPositionColumbusView.zxy, 1.0);\n }\n \n var positionEC = uniforms.czm_view * position;\n var positionWC = czm_eyeToWindowCoordinates(positionEC);\n \n var halfSize = vec2<f32>(uniforms.u_size * 0.5);\n halfSize *= ((direction * 2.0) - 1.0);\n \n gl_Position = uniforms.czm_viewportOrthographic * vec4<f32>(positionWC.xy + halfSize, -positionWC.z, 1.0);\n \n v_textureCoordinates = direction;\n}\n",at$3="\nvar u_texture : texture_2d<f32>;\nvar u_textureSampler : sampler;\n\nvarying v_textureCoordinates : vec2<f32>;\n\nfn gammaCorrect(color : vec4<f32>) -> vec4<f32>\n{\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3(uniforms.czm_gamma));\n#endif\n return color;\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var color = textureSample(u_texture, u_textureSampler, v_textureCoordinates);\n gl_FragColor = gammaCorrect(color);\n}\n";function u$5(){this.show=!0,this._drawCommand=new i$$({primitiveType:W$18.TRIANGLES,boundingVolume:new i$1d,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new i$1d,this._boundingVolume2D=new i$1d,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;var e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(u$5.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var ut$3=new o$1o,st$1=new o$1o,dt$2=new e$2c,s$8=new e$2c;u$5.prototype.update=function(e,t,i){if(this.show){var n=e.mode;if(n!==C$14.SCENE2D&&n!==C$14.MORPHING&&e.passes.render){var r=e.context,o=t.viewport.width,a=t.viewport.height;if(!e$2e(this._texture)||o!==this._drawingBufferWidth||a!==this._drawingBufferHeight||this._glowFactorDirty||i!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=o,this._drawingBufferHeight=a,this._glowFactorDirty=!1,this._useHdr=i;var s=Math.max(o,a);s=Math.pow(2,Math.ceil(Math.log(s)/Math.log(2))-2),s=Math.max(1,s);var l=i?r.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT:_$_.UNSIGNED_BYTE;this._texture=new t$U({context:r,width:s,height:s,pixelFormat:V$12.RGBA,pixelDatatype:l}),this._glowLengthTS=5*this._glowFactor,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;var u=this,c={u_radiusTS:function(){return u._radiusTS}},h=r$14.fromCache({name:"SunTextureSP",context:r,vertexShaderSource:ot$8,fragmentShaderSource:et$2,attributeLocations:{aPosition:0,textureCoordinates:1}});this._commands.computeCommand=new t$H({name:"Sun",shaderProgram:h,outputTexture:this._texture,uniformMap:c,persists:!1,owner:this,postExecute:function(){u._commands.computeCommand.shaderProgram._isReady()&&(u._commands.computeCommand=void 0)}})}var d=this._drawCommand;if(!e$2e(d.vertexArray)){var f={direction:0},p=new Float32Array(8);p[0]=0,p[1]=0,p[2]=255,p[3]=0,p[4]=255,p[5]=255,p[6]=0,p[7]=255;var _=t$X.createVertexBuffer({context:r,typedArray:p,usage:A$18.STATIC_DRAW}),m=[{name:"direction",index:f.direction,vertexBuffer:_,componentsPerAttribute:2,normalize:!0,componentDatatype:S$14.FLOAT}],g=t$X.createIndexBuffer({context:r,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});d.vertexArray=new c$13({context:r,attributes:m,indexBuffer:g}),d.shaderProgram=r$14.fromCache({name:"spSun",context:r,vertexShaderSource:r.webgpu?nt$2:it$1,fragmentShaderSource:r.webgpu?at$3:rt$3,attributeLocations:f,useWGSL:r.webgpu}),d.renderState=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND}),d.uniformMap=this._uniformMap}var x=r.uniformState.sunPositionWC,y=r.uniformState.sunPositionColumbusView,v=this._boundingVolume,$=this._boundingVolume2D;o$1p.clone(x,v.center),$.center.x=y.z,$.center.y=y.x,$.center.z=y.y,v.radius=e$2d.SOLAR_RADIUS+e$2d.SOLAR_RADIUS*this._glowLengthTS,$.radius=v.radius,n===C$14.SCENE3D?i$1d.clone(v,d.boundingVolume):n===C$14.COLUMBUS_VIEW&&i$1d.clone($,d.boundingVolume);var b=s$R.computeActualWgs84Position(e,x,s$8),T=o$1p.magnitude(o$1p.subtract(b,e.camera.position,s$8)),C=r.uniformState.projection,S=dt$2;S.x=0,S.y=0,S.z=-T,S.w=1;var w=p$1d.multiplyByVector(C,S,s$8),E=s$R.clipToGLWindowCoordinates(t.viewport,w,ut$3);S.x=e$2d.SOLAR_RADIUS;var P=p$1d.multiplyByVector(C,S,s$8),A=s$R.clipToGLWindowCoordinates(t.viewport,P,st$1);return this._size=o$1o.magnitude(o$1o.subtract(A,E,s$8)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands}}},u$5.prototype.isDestroyed=function(){return!1},u$5.prototype.destroy=function(){var e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),i$11(this)};var L$7=null;try{L$7=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function s$7(e,t,i){this.low=0|e,this.high=0|t,this.unsigned=!!i}function l$8(e){return!0===(e&&e.__isLong__)}s$7.prototype.__isLong__,Object.defineProperty(s$7.prototype,"__isLong__",{value:!0}),s$7.isLong=l$8;var M$4={},R$3={};function d$a(e,t){var i,n,r;return t?(r=0<=(e>>>=0)&&e<256)&&(n=R$3[e])?n:(i=e$1(e,(0|e)<0?-1:0,!0),r&&(R$3[e]=i),i):(r=-128<=(e|=0)&&e<128)&&(n=M$4[e])?n:(i=e$1(e,e<0?-1:0,!1),r&&(M$4[e]=i),i)}function v$5(e,t){if(isNaN(e))return t?U$5:q$3;if(t){if(e<0)return U$5;if(e>=Z$5)return H$4}else{if(e<=-P$4)return c$a;if(e+1>=P$4)return D$3}return e<0?v$5(-e,t).neg():e$1(e%T$6|0,e/T$6|0,t)}function e$1(e,t,i){return new s$7(e,t,i)}s$7.fromInt=d$a,s$7.fromNumber=v$5,s$7.fromBits=e$1;var x$5=Math.pow;function I$2(e,t,i){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return q$3;if("number"==typeof t?(i=t,t=!1):t=!!t,(i=i||10)<2||36<i)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return I$2(e.substring(1),t,i).neg();for(var r=v$5(x$5(i,8)),o=q$3,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),l=parseInt(e.substring(a,a+s),i);if(s<8){var u=v$5(x$5(i,s));o=o.mul(u).add(v$5(l))}else o=(o=o.mul(r)).add(v$5(l))}return o.unsigned=t,o}function O$4(e,t){return"number"==typeof e?v$5(e,t):"string"==typeof e?I$2(e,t):e$1(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}s$7.fromString=I$2,s$7.fromValue=O$4;var W$5=65536,C$4=1<<24,T$6=W$5*W$5,Z$5=T$6*T$6,P$4=Z$5/2,S$1=d$a(C$4),q$3=d$a(0);s$7.ZERO=q$3;var U$5=d$a(0,!0);s$7.UZERO=U$5;var b$8=d$a(1);s$7.ONE=b$8;var V$4=d$a(1,!0);s$7.UONE=V$4;var A$7=d$a(-1);s$7.NEG_ONE=A$7;var D$3=e$1(-1,2147483647,!1);s$7.MAX_VALUE=D$3;var H$4=e$1(-1,-1,!0);s$7.MAX_UNSIGNED_VALUE=H$4;var c$a=e$1(0,-2147483648,!1);s$7.MIN_VALUE=c$a;var h$4=s$7.prototype;h$4.toInt=function(){return this.unsigned?this.low>>>0:this.low},h$4.toNumber=function(){return this.unsigned?(this.high>>>0)*T$6+(this.low>>>0):this.high*T$6+(this.low>>>0)},h$4.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(c$a)){var t=v$5(e),i=this.div(t),n=i.mul(t).sub(this);return i.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var r=v$5(x$5(e,6),this.unsigned),o=this,a="";;){var s=o.div(r),l=(o.sub(s.mul(r)).toInt()>>>0).toString(e);if((o=s).isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},h$4.getHighBits=function(){return this.high},h$4.getHighBitsUnsigned=function(){return this.high>>>0},h$4.getLowBits=function(){return this.low},h$4.getLowBitsUnsigned=function(){return this.low>>>0},h$4.getNumBitsAbs=function(){if(this.isNegative())return this.eq(c$a)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},h$4.isZero=function(){return 0===this.high&&0===this.low},h$4.eqz=h$4.isZero,h$4.isNegative=function(){return!this.unsigned&&this.high<0},h$4.isPositive=function(){return this.unsigned||this.high>=0},h$4.isOdd=function(){return 1==(1&this.low)},h$4.isEven=function(){return 0==(1&this.low)},h$4.equals=function(e){return l$8(e)||(e=O$4(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},h$4.eq=h$4.equals,h$4.notEquals=function(e){return!this.eq(e)},h$4.neq=h$4.notEquals,h$4.ne=h$4.notEquals,h$4.lessThan=function(e){return this.comp(e)<0},h$4.lt=h$4.lessThan,h$4.lessThanOrEqual=function(e){return this.comp(e)<=0},h$4.lte=h$4.lessThanOrEqual,h$4.le=h$4.lessThanOrEqual,h$4.greaterThan=function(e){return this.comp(e)>0},h$4.gt=h$4.greaterThan,h$4.greaterThanOrEqual=function(e){return this.comp(e)>=0},h$4.gte=h$4.greaterThanOrEqual,h$4.ge=h$4.greaterThanOrEqual,h$4.compare=function(e){if(l$8(e)||(e=O$4(e)),this.eq(e))return 0;var t=this.isNegative(),i=e.isNegative();return t&&!i?-1:!t&&i?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},h$4.comp=h$4.compare,h$4.negate=function(){return!this.unsigned&&this.eq(c$a)?c$a:this.not().add(b$8)},h$4.neg=h$4.negate,h$4.add=function(e){l$8(e)||(e=O$4(e));var t=this.high>>>16,i=65535&this.high,n=this.low>>>16,r=65535&this.low,o=e.high>>>16,a=65535&e.high,s=e.low>>>16,l=0,u=0,c=0,h=0;return c+=(h+=r+(65535&e.low))>>>16,u+=(c+=n+s)>>>16,l+=(u+=i+a)>>>16,l+=t+o,e$1((c&=65535)<<16|(h&=65535),(l&=65535)<<16|(u&=65535),this.unsigned)},h$4.subtract=function(e){return l$8(e)||(e=O$4(e)),this.add(e.neg())},h$4.sub=h$4.subtract,h$4.multiply=function(e){if(this.isZero())return q$3;if(l$8(e)||(e=O$4(e)),L$7)return e$1(L$7.mul(this.low,this.high,e.low,e.high),L$7.get_high(),this.unsigned);if(e.isZero())return q$3;if(this.eq(c$a))return e.isOdd()?c$a:q$3;if(e.eq(c$a))return this.isOdd()?c$a:q$3;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(S$1)&&e.lt(S$1))return v$5(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,i=65535&this.high,n=this.low>>>16,r=65535&this.low,o=e.high>>>16,a=65535&e.high,s=e.low>>>16,l=65535&e.low,u=0,c=0,h=0,d=0;return h+=(d+=r*l)>>>16,c+=(h+=n*l)>>>16,h&=65535,c+=(h+=r*s)>>>16,u+=(c+=i*l)>>>16,c&=65535,u+=(c+=n*s)>>>16,c&=65535,u+=(c+=r*a)>>>16,u+=t*l+i*s+n*a+r*o,e$1((h&=65535)<<16|(d&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},h$4.mul=h$4.multiply,h$4.divide=function(e){if(l$8(e)||(e=O$4(e)),e.isZero())throw Error("division by zero");var t,i,n;if(L$7)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?e$1((this.unsigned?L$7.div_u:L$7.div_s)(this.low,this.high,e.low,e.high),L$7.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?U$5:q$3;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return U$5;if(e.gt(this.shru(1)))return V$4;n=U$5}else{if(this.eq(c$a))return e.eq(b$8)||e.eq(A$7)?c$a:e.eq(c$a)?b$8:(t=this.shr(1).div(e).shl(1)).eq(q$3)?e.isNegative()?b$8:A$7:(i=this.sub(e.mul(t)),n=t.add(i.div(e)));if(e.eq(c$a))return this.unsigned?U$5:q$3;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=q$3}for(i=this;i.gte(e);){t=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var r=Math.ceil(Math.log(t)/Math.LN2),o=r<=48?1:x$5(2,r-48),a=v$5(t),s=a.mul(e);s.isNegative()||s.gt(i);)s=(a=v$5(t-=o,this.unsigned)).mul(e);a.isZero()&&(a=b$8),n=n.add(a),i=i.sub(s)}return n},h$4.div=h$4.divide,h$4.modulo=function(e){return l$8(e)||(e=O$4(e)),L$7?e$1((this.unsigned?L$7.rem_u:L$7.rem_s)(this.low,this.high,e.low,e.high),L$7.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},h$4.mod=h$4.modulo,h$4.rem=h$4.modulo,h$4.not=function(){return e$1(~this.low,~this.high,this.unsigned)},h$4.and=function(e){return l$8(e)||(e=O$4(e)),e$1(this.low&e.low,this.high&e.high,this.unsigned)},h$4.or=function(e){return l$8(e)||(e=O$4(e)),e$1(this.low|e.low,this.high|e.high,this.unsigned)},h$4.xor=function(e){return l$8(e)||(e=O$4(e)),e$1(this.low^e.low,this.high^e.high,this.unsigned)},h$4.shiftLeft=function(e){return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$1(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):e$1(0,this.low<<e-32,this.unsigned)},h$4.shl=h$4.shiftLeft,h$4.shiftRight=function(e){return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$1(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):e$1(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},h$4.shr=h$4.shiftRight,h$4.shiftRightUnsigned=function(e){return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$1(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):e$1(32===e?this.high:this.high>>>e-32,0,this.unsigned)},h$4.shru=h$4.shiftRightUnsigned,h$4.shr_u=h$4.shiftRightUnsigned,h$4.rotateLeft=function(e){var t;return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?e$1(this.high,this.low,this.unsigned):e<32?(t=32-e,e$1(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),e$1(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},h$4.rotl=h$4.rotateLeft,h$4.rotateRight=function(e){var t;return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?e$1(this.high,this.low,this.unsigned):e<32?(t=32-e,e$1(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),e$1(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},h$4.rotr=h$4.rotateRight,h$4.toSigned=function(){return this.unsigned?e$1(this.low,this.high,!1):this},h$4.toUnsigned=function(){return this.unsigned?this:e$1(this.low,this.high,!0)},h$4.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},h$4.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},h$4.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},s$7.fromBytes=function(e,t,i){return i?s$7.fromBytesLE(e,t):s$7.fromBytesBE(e,t)},s$7.fromBytesLE=function(e,t){return new s$7(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},s$7.fromBytesBE=function(e,t){return new s$7(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var u$4=function(e,t,i){if(typeof e>"u"&&(e=u$4.DEFAULT_CAPACITY),typeof t>"u"&&(t=u$4.DEFAULT_ENDIAN),typeof i>"u"&&(i=u$4.DEFAULT_NOASSERT),!i){if((e|=0)<0)throw RangeError("Illegal capacity");t=!!t,i=!!i}this.buffer=0===e?x$4:new ArrayBuffer(e),this.view=0===e?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=e,this.littleEndian=t,this.noAssert=i};u$4.VERSION="5.0.1",u$4.LITTLE_ENDIAN=!0,u$4.BIG_ENDIAN=!1,u$4.DEFAULT_CAPACITY=16,u$4.DEFAULT_ENDIAN=u$4.BIG_ENDIAN,u$4.DEFAULT_NOASSERT=!1,u$4.Long=s$7||null;var l$7=u$4.prototype;l$7.__isByteBuffer__,Object.defineProperty(l$7,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var x$4=new ArrayBuffer(0),I$1=String.fromCharCode;function c$9(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function d$9(){var e=[],t=[];return function(){if(0===arguments.length)return t.join("")+I$1.apply(String,e);e.length+arguments.length>1024&&(t.push(I$1.apply(String,e)),e.length=0),Array.prototype.push.apply(e,arguments)}}function E$4(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)}function m$7(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_}u$4.accessor=function(){return Uint8Array},u$4.allocate=function(e,t,i){return new u$4(e,t,i)},u$4.concat=function(e,t,i,n){("boolean"==typeof t||"string"!=typeof t)&&(n=i,i=t,t=void 0);for(var r,o=0,a=0,s=e.length;a<s;++a)u$4.isByteBuffer(e[a])||(e[a]=u$4.wrap(e[a],t)),(r=e[a].limit-e[a].offset)>0&&(o+=r);if(0===o)return new u$4(0,i,n);var l,u=new u$4(o,i,n);for(a=0;a<s;)!((r=(l=e[a++]).limit-l.offset)<=0)&&(u.view.set(l.view.subarray(l.offset,l.limit),u.offset),u.offset+=r);return u.limit=u.offset,u.offset=0,u},u$4.isByteBuffer=function(e){return!0===(e&&e.__isByteBuffer__)},u$4.type=function(){return ArrayBuffer},u$4.wrap=function(e,t,i,n){if("string"!=typeof t&&(n=i,i=t,t=void 0),"string"==typeof e)switch(typeof t>"u"&&(t="utf8"),t){case"base64":return u$4.fromBase64(e,i);case"hex":return u$4.fromHex(e,i);case"binary":return u$4.fromBinary(e,i);case"utf8":return u$4.fromUTF8(e,i);case"debug":return u$4.fromDebug(e,i);default:throw Error("Unsupported encoding: "+t)}if(null===e||"object"!=typeof e)throw TypeError("Illegal buffer");var r;if(u$4.isByteBuffer(e))return(r=l$7.clone.call(e)).markedOffset=-1,r;if(e instanceof Uint8Array)r=new u$4(0,i,n),e.length>0&&(r.buffer=e.buffer,r.offset=e.byteOffset,r.limit=e.byteOffset+e.byteLength,r.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)r=new u$4(0,i,n),e.byteLength>0&&(r.buffer=e,r.offset=0,r.limit=e.byteLength,r.view=e.byteLength>0?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");(r=new u$4(e.length,i,n)).limit=e.length;for(var o=0;o<e.length;++o)r.view[o]=e[o]}return r},l$7.writeBitSet=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t,o=e.length,a=o>>3,s=0;for(t+=this.writeVarint32(o,t);a--;)n=1&!!e[s++]|(1&!!e[s++])<<1|(1&!!e[s++])<<2|(1&!!e[s++])<<3|(1&!!e[s++])<<4|(1&!!e[s++])<<5|(1&!!e[s++])<<6|(1&!!e[s++])<<7,this.writeByte(n,t++);if(s<o){var l=0;for(n=0;s<o;)n|=(1&!!e[s++])<<l++;this.writeByte(n,t++)}return i?(this.offset=t,this):t-r},l$7.readBitSet=function(e){var t=typeof e>"u";t&&(e=this.offset);var i,n=this.readVarint32(e),r=n.value,o=r>>3,a=0,s=[];for(e+=n.length;o--;)i=this.readByte(e++),s[a++]=!!(1&i),s[a++]=!!(2&i),s[a++]=!!(4&i),s[a++]=!!(8&i),s[a++]=!!(16&i),s[a++]=!!(32&i),s[a++]=!!(64&i),s[a++]=!!(128&i);if(a<r){var l=0;for(i=this.readByte(e++);a<r;)s[a++]=!!(i>>l++&1)}return t&&(this.offset=e),s},l$7.readBytes=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}var n=this.slice(t,t+e);return i&&(this.offset+=e),n},l$7.writeBytes=l$7.append,l$7.writeInt8=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=1,this.view[t]=e,i&&(this.offset+=1),this},l$7.writeByte=l$7.writeInt8,l$7.readInt8=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=this.view[e];return 128==(128&i)&&(i=-(255-i+1)),t&&(this.offset+=1),i},l$7.readByte=l$7.readInt8,l$7.writeUint8=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=1,this.view[t]=e,i&&(this.offset+=1),this},l$7.writeUInt8=l$7.writeUint8,l$7.readUint8=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=this.view[e];return t&&(this.offset+=1),i},l$7.readUInt8=l$7.readUint8,l$7.writeInt16=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),i&&(this.offset+=2),this},l$7.writeShort=l$7.writeInt16,l$7.readInt16=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e],i|=this.view[e+1]<<8):(i=this.view[e]<<8,i|=this.view[e+1]),32768==(32768&i)&&(i=-(65535-i+1)),t&&(this.offset+=2),i},l$7.readShort=l$7.readInt16,l$7.writeUint16=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),i&&(this.offset+=2),this},l$7.writeUInt16=l$7.writeUint16,l$7.readUint16=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e],i|=this.view[e+1]<<8):(i=this.view[e]<<8,i|=this.view[e+1]),t&&(this.offset+=2),i},l$7.readUInt16=l$7.readUint16,l$7.writeInt32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),i&&(this.offset+=4),this},l$7.writeInt=l$7.writeInt32,l$7.readInt32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0),i|=0,t&&(this.offset+=4),i},l$7.readInt=l$7.readInt32,l$7.writeUint32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),i&&(this.offset+=4),this},l$7.writeUInt32=l$7.writeUint32,l$7.readUint32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0),t&&(this.offset+=4),i},l$7.readUInt32=l$7.readUint32,s$7&&(l$7.writeInt64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s$7.fromNumber(e);else if("string"==typeof e)e=s$7.fromString(e);else if(!(e&&e instanceof s$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s$7.fromNumber(e):"string"==typeof e&&(e=s$7.fromString(e)),t+=8;var n=this.buffer.byteLength;t>n&&this.resize((n*=2)>t?n:t),t-=8;var r=e.low,o=e.high;return this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=o>>>24&255,this.view[t+2]=o>>>16&255,this.view[t+1]=o>>>8&255,this.view[t]=255&o):(this.view[t]=o>>>24&255,this.view[t+1]=o>>>16&255,this.view[t+2]=o>>>8&255,this.view[t+3]=255&o,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),i&&(this.offset+=8),this},l$7.writeLong=l$7.writeInt64,l$7.readInt64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=0,n=0;this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0);var r=new s$7(i,n,!1);return t&&(this.offset+=8),r},l$7.readLong=l$7.readInt64,l$7.writeUint64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s$7.fromNumber(e);else if("string"==typeof e)e=s$7.fromString(e);else if(!(e&&e instanceof s$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s$7.fromNumber(e):"string"==typeof e&&(e=s$7.fromString(e)),t+=8;var n=this.buffer.byteLength;t>n&&this.resize((n*=2)>t?n:t),t-=8;var r=e.low,o=e.high;return this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=o>>>24&255,this.view[t+2]=o>>>16&255,this.view[t+1]=o>>>8&255,this.view[t]=255&o):(this.view[t]=o>>>24&255,this.view[t+1]=o>>>16&255,this.view[t+2]=o>>>8&255,this.view[t+3]=255&o,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),i&&(this.offset+=8),this},l$7.writeUInt64=l$7.writeUint64,l$7.readUint64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=0,n=0;this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0);var r=new s$7(i,n,!0);return t&&(this.offset+=8),r},l$7.readUInt64=l$7.readUint64),l$7.writeFloat32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,m$7(this.view,e,t,this.littleEndian,23,4),i&&(this.offset+=4),this},l$7.writeFloat=l$7.writeFloat32,l$7.readFloat32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=E$4(this.view,e,this.littleEndian,23,4);return t&&(this.offset+=4),i},l$7.readFloat=l$7.readFloat32,l$7.writeFloat64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=8,m$7(this.view,e,t,this.littleEndian,52,8),i&&(this.offset+=8),this},l$7.writeDouble=l$7.writeFloat64,l$7.readFloat64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=E$4(this.view,e,this.littleEndian,52,8);return t&&(this.offset+=8),i},l$7.readDouble=l$7.readFloat64,u$4.MAX_VARINT32_BYTES=5,u$4.calculateVarint32=function(e){return(e>>>=0)<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},u$4.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},u$4.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},l$7.writeVarint32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=u$4.calculateVarint32(e);t+=r;var o=this.buffer.byteLength;for(t>o&&this.resize((o*=2)>t?o:t),t-=r,e>>>=0;e>=128;)n=127&e|128,this.view[t++]=n,e>>>=7;return this.view[t++]=e,i?(this.offset=t,this):r},l$7.writeVarint32ZigZag=function(e,t){return this.writeVarint32(u$4.zigZagEncode32(e),t)},l$7.readVarint32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,n=0,r=0;do{if(!this.noAssert&&e>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}i=this.view[e++],n<5&&(r|=(127&i)<<7*n),++n}while(0!=(128&i));return r|=0,t?(this.offset=e,r):{value:r,length:n}},l$7.readVarint32ZigZag=function(e){var t=this.readVarint32(e);return"object"==typeof t?t.value=u$4.zigZagDecode32(t.value):t=u$4.zigZagDecode32(t),t},s$7&&(u$4.MAX_VARINT64_BYTES=10,u$4.calculateVarint64=function(e){"number"==typeof e?e=s$7.fromNumber(e):"string"==typeof e&&(e=s$7.fromString(e));var t=e.toInt()>>>0,i=e.shiftRightUnsigned(28).toInt()>>>0,n=e.shiftRightUnsigned(56).toInt()>>>0;return 0==n?0==i?t<16384?t<128?1:2:t<1<<21?3:4:i<16384?i<128?5:6:i<1<<21?7:8:n<128?9:10},u$4.zigZagEncode64=function(e){return"number"==typeof e?e=s$7.fromNumber(e,!1):"string"==typeof e?e=s$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},u$4.zigZagDecode64=function(e){return"number"==typeof e?e=s$7.fromNumber(e,!1):"string"==typeof e?e=s$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(s$7.ONE).toSigned().negate()).toSigned()},l$7.writeVarint64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s$7.fromNumber(e);else if("string"==typeof e)e=s$7.fromString(e);else if(!(e&&e instanceof s$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s$7.fromNumber(e,!1):"string"==typeof e?e=s$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned());var n=u$4.calculateVarint64(e),r=e.toInt()>>>0,o=e.shiftRightUnsigned(28).toInt()>>>0,a=e.shiftRightUnsigned(56).toInt()>>>0;t+=n;var s=this.buffer.byteLength;switch(t>s&&this.resize((s*=2)>t?s:t),t-=n,n){case 10:this.view[t+9]=a>>>7&1;case 9:this.view[t+8]=9!==n?128|a:127&a;case 8:this.view[t+7]=8!==n?o>>>21|128:o>>>21&127;case 7:this.view[t+6]=7!==n?o>>>14|128:o>>>14&127;case 6:this.view[t+5]=6!==n?o>>>7|128:o>>>7&127;case 5:this.view[t+4]=5!==n?128|o:127&o;case 4:this.view[t+3]=4!==n?r>>>21|128:r>>>21&127;case 3:this.view[t+2]=3!==n?r>>>14|128:r>>>14&127;case 2:this.view[t+1]=2!==n?r>>>7|128:r>>>7&127;case 1:this.view[t]=1!==n?128|r:127&r}return i?(this.offset+=n,this):n},l$7.writeVarint64ZigZag=function(e,t){return this.writeVarint64(u$4.zigZagEncode64(e),t)},l$7.readVarint64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=e,n=0,r=0,o=0,a=0;if(n=127&(a=this.view[e++]),128&a&&(n|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&typeof a>"u")&&(n|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&typeof a>"u")&&(n|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&typeof a>"u")&&(r=127&(a=this.view[e++]),(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&typeof a>"u")&&(o=127&(a=this.view[e++]),(128&a||this.noAssert&&typeof a>"u")&&(o|=(127&(a=this.view[e++]))<<7,128&a||this.noAssert&&typeof a>"u"))))))))))throw Error("Buffer overrun");var s=s$7.fromBits(n|r<<28,r>>>4|o<<24,!1);return t?(this.offset=e,s):{value:s,length:e-i}},l$7.readVarint64ZigZag=function(e){var t=this.readVarint64(e);return t&&t.value instanceof s$7?t.value=u$4.zigZagDecode64(t.value):t=u$4.zigZagDecode64(t),t}),l$7.writeCString=function(e,t){var i=typeof t>"u";i&&(t=this.offset);var n,r=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(n=0;n<r;++n)if(0===e.charCodeAt(n))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}r=b$7.calculateUTF16asUTF8(c$9(e))[1],t+=r+1;var o=this.buffer.byteLength;return t>o&&this.resize((o*=2)>t?o:t),t-=r+1,b$7.encodeUTF16toUTF8(c$9(e),function(e){this.view[t++]=e}.bind(this)),this.view[t++]=0,i?(this.offset=t,this):r},l$7.readCString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,n=e,r=-1;return b$7.decodeUTF8toUTF16(function(){if(0===r)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return 0===(r=this.view[e++])?null:r}.bind(this),i=d$9(),!0),t?(this.offset=e,i()):{string:i(),length:e-n}},l$7.writeIString=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t;n=b$7.calculateUTF16asUTF8(c$9(e),this.noAssert)[1],t+=4+n;var o=this.buffer.byteLength;if(t>o&&this.resize((o*=2)>t?o:t),t-=4+n,this.littleEndian?(this.view[t+3]=n>>>24&255,this.view[t+2]=n>>>16&255,this.view[t+1]=n>>>8&255,this.view[t]=255&n):(this.view[t]=n>>>24&255,this.view[t+1]=n>>>16&255,this.view[t+2]=n>>>8&255,this.view[t+3]=255&n),t+=4,b$7.encodeUTF16toUTF8(c$9(e),function(e){this.view[t++]=e}.bind(this)),t!==r+4+n)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+n));return i?(this.offset=t,this):t-r},l$7.readIString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=e,n=this.readUint32(e),r=this.readUTF8String(n,u$4.METRICS_BYTES,e+=4);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-i}},u$4.METRICS_CHARS="c",u$4.METRICS_BYTES="b",l$7.writeUTF8String=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t;n=b$7.calculateUTF16asUTF8(c$9(e))[1],t+=n;var o=this.buffer.byteLength;return t>o&&this.resize((o*=2)>t?o:t),t-=n,b$7.encodeUTF16toUTF8(c$9(e),function(e){this.view[t++]=e}.bind(this)),i?(this.offset=t,this):t-r},l$7.writeString=l$7.writeUTF8String,u$4.calculateUTF8Chars=function(e){return b$7.calculateUTF16asUTF8(c$9(e))[0]},u$4.calculateUTF8Bytes=function(e){return b$7.calculateUTF16asUTF8(c$9(e))[1]},u$4.calculateString=u$4.calculateUTF8Bytes,l$7.readUTF8String=function(e,t,i){"number"==typeof t&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),typeof t>"u"&&(t=u$4.METRICS_CHARS),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var r,o=0,a=i;if(t===u$4.METRICS_CHARS){if(r=d$9(),b$7.decodeUTF8(function(){return o<e&&i<this.limit?this.view[i++]:null}.bind(this),(function(e){++o,b$7.UTF8toUTF16(e,r)})),o!==e)throw RangeError("Illegal range: Truncated data, "+o+" == "+e);return n?(this.offset=i,r()):{string:r(),length:i-a}}if(t===u$4.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+"+e+") <= "+this.buffer.byteLength)}var s=i+e;if(b$7.decodeUTF8toUTF16(function(){return i<s?this.view[i++]:null}.bind(this),r=d$9(),this.noAssert),i!==s)throw RangeError("Illegal range: Truncated data, "+i+" == "+s);return n?(this.offset=i,r()):{string:r(),length:i-a}}throw TypeError("Unsupported metrics: "+t)},l$7.readString=l$7.readUTF8String,l$7.writeVString=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r,o=t;n=b$7.calculateUTF16asUTF8(c$9(e),this.noAssert)[1],r=u$4.calculateVarint32(n),t+=r+n;var a=this.buffer.byteLength;if(t>a&&this.resize((a*=2)>t?a:t),t-=r+n,t+=this.writeVarint32(n,t),b$7.encodeUTF16toUTF8(c$9(e),function(e){this.view[t++]=e}.bind(this)),t!==o+n+r)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+n+r));return i?(this.offset=t,this):t-o},l$7.readVString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=e,n=this.readVarint32(e),r=this.readUTF8String(n.value,u$4.METRICS_BYTES,e+=n.length);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-i}},l$7.append=function(e,t,i){("number"==typeof t||"string"!=typeof t)&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}e instanceof u$4||(e=u$4.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;i+=r;var o=this.buffer.byteLength;return i>o&&this.resize((o*=2)>i?o:i),i-=r,this.view.set(e.view.subarray(e.offset,e.limit),i),e.offset+=r,n&&(this.offset+=r),this},l$7.appendTo=function(e,t){return e.append(this,t),this},l$7.assert=function(e){return this.noAssert=!e,this},l$7.capacity=function(){return this.buffer.byteLength},l$7.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},l$7.clone=function(e){var t=new u$4(0,this.littleEndian,this.noAssert);return e?(t.buffer=new ArrayBuffer(this.buffer.byteLength),t.view=new Uint8Array(t.buffer)):(t.buffer=this.buffer,t.view=this.view),t.offset=this.offset,t.markedOffset=this.markedOffset,t.limit=this.limit,t},l$7.compact=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var i=t-e;if(0===i)return this.buffer=x$4,this.view=null,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(i),r=new Uint8Array(n);return r.set(this.view.subarray(e,t)),this.buffer=n,this.view=r,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=i,this},l$7.copy=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(e===t)return new u$4(0,this.littleEndian,this.noAssert);var i=t-e,n=new u$4(i,this.littleEndian,this.noAssert);return n.offset=0,n.limit=i,n.markedOffset>=0&&(n.markedOffset-=e),this.copyTo(n,0,e,t),n},l$7.copyTo=function(e,t,i,n){var r,o;if(!this.noAssert&&!u$4.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(t=(o=typeof t>"u")?e.offset:0|t,i=(r=typeof i>"u")?this.offset:0|i,n=typeof n>"u"?this.limit:0|n,t<0||t>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+t+" <= "+e.buffer.byteLength);if(i<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+i+" <= "+this.buffer.byteLength);var a=n-i;return 0===a?e:(e.ensureCapacity(t+a),e.view.set(this.view.subarray(i,n),t),r&&(this.offset+=a),o&&(e.offset+=a),this)},l$7.ensureCapacity=function(e){var t=this.buffer.byteLength;return t<e?this.resize((t*=2)>e?t:e):this},l$7.fill=function(e,t,i){var n=typeof t>"u";if(n&&(t=this.offset),"string"==typeof e&&e.length>0&&(e=e.charCodeAt(0)),typeof t>"u"&&(t=this.offset),typeof i>"u"&&(i=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(t>=i)return this;for(;t<i;)this.view[t++]=e;return n&&(this.offset=t),this},l$7.flip=function(){return this.limit=this.offset,this.offset=0,this},l$7.mark=function(e){if(e=typeof e>"u"?this.offset:e,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},l$7.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},l$7.LE=function(e){return this.littleEndian=!(typeof e<"u")||!!e,this},l$7.BE=function(e){return this.littleEndian=typeof e<"u"&&!e,this},l$7.prepend=function(e,t,i){("number"==typeof t||"string"!=typeof t)&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}e instanceof u$4||(e=u$4.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;var o=r-i;if(o>0){var a=new ArrayBuffer(this.buffer.byteLength+o),s=new Uint8Array(a);s.set(this.view.subarray(i,this.buffer.byteLength),r),this.buffer=a,this.view=s,this.offset+=o,this.markedOffset>=0&&(this.markedOffset+=o),this.limit+=o,i+=o}else new Uint8Array(this.buffer);return this.view.set(e.view.subarray(e.offset,e.limit),i-r),e.offset=e.limit,n&&(this.offset-=r),this},l$7.prependTo=function(e,t){return e.prepend(this,t),this},l$7.printDebug=function(e){"function"!=typeof e&&(e=console.log.bind(console)),e(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},l$7.remaining=function(){return this.limit-this.offset},l$7.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},l$7.resize=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal capacity: "+e+" (not an integer)");if((e|=0)<0)throw RangeError("Illegal capacity: 0 <= "+e)}if(this.buffer.byteLength<e){var t=new ArrayBuffer(e),i=new Uint8Array(t);i.set(this.view),this.buffer=t,this.view=i}return this},l$7.reverse=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t||Array.prototype.reverse.call(this.view.subarray(e,t)),this},l$7.skip=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},l$7.slice=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i=this.clone();return i.offset=e,i.limit=t,i},l$7.toBuffer=function(e){var t=this.offset,i=this.limit;if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal limit: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(!e&&0===t&&i===this.buffer.byteLength)return this.buffer;if(t===i)return x$4;var n=new ArrayBuffer(i-t);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(t,i),0),n},l$7.toArrayBuffer=l$7.toBuffer,l$7.toString=function(e,t,i){if(typeof e>"u")return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof e&&(i=t=e="utf8"),e){case"utf8":return this.toUTF8(t,i);case"base64":return this.toBase64(t,i);case"hex":return this.toHex(t,i);case"binary":return this.toBinary(t,i);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var T$5=function(){for(var e={},t=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],i=[],n=0,r=t.length;n<r;++n)i[t[n]]=n;return e.encode=function(e,i){for(var n,r;null!==(n=e());)i(t[n>>2&63]),r=(3&n)<<4,null!==(n=e())?(i(t[63&((r|=n>>4&15)|n>>4&15)]),r=(15&n)<<2,null!==(n=e())?(i(t[63&(r|n>>6&3)]),i(t[63&n])):(i(t[63&r]),i(61))):(i(t[63&r]),i(61),i(61))},e.decode=function(e,t){var n,r,o;function a(e){throw Error("Illegal character code: "+e)}for(;null!==(n=e());)if(typeof(r=i[n])>"u"&&a(n),null!==(n=e())&&(typeof(o=i[n])>"u"&&a(n),t(r<<2>>>0|(48&o)>>4),null!==(n=e()))){if(typeof(r=i[n])>"u"){if(61===n)break;a(n)}if(t((15&o)<<4>>>0|(60&r)>>2),null!==(n=e())){if(typeof(o=i[n])>"u"){if(61===n)break;a(n)}t((3&r)<<6>>>0|o)}}},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},e}();l$7.toBase64=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity||e>t)throw RangeError("begin, end");var i;return T$5.encode(function(){return e<t?this.view[e++]:null}.bind(this),i=d$9()),i()},u$4.fromBase64=function(e,t){if("string"!=typeof e)throw TypeError("str");var i=new u$4(e.length/4*3,t),n=0;return T$5.decode(c$9(e),(function(e){i.view[n++]=e})),i.limit=n,i},u$4.btoa=function(e){return u$4.fromBinary(e).toBase64()},u$4.atob=function(e){return u$4.fromBase64(e).toBinary()},l$7.toBinary=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity()||e>t)throw RangeError("begin, end");if(e===t)return"";for(var i=[],n=[];e<t;)i.push(this.view[e++]),i.length>=1024&&(n.push(String.fromCharCode.apply(String,i)),i=[]);return n.join("")+String.fromCharCode.apply(String,i)},u$4.fromBinary=function(e,t){if("string"!=typeof e)throw TypeError("str");for(var i,n=0,r=e.length,o=new u$4(r,t);n<r;){if((i=e.charCodeAt(n))>255)throw RangeError("illegal char code: "+i);o.view[n++]=i}return o.limit=r,o},l$7.toDebug=function(e){for(var t,i=-1,n=this.buffer.byteLength,r="",o="",a="";i<n;){if(-1!==i&&(r+=(t=this.view[i])<16?"0"+t.toString(16).toUpperCase():t.toString(16).toUpperCase(),e&&(o+=t>32&&t<127?String.fromCharCode(t):".")),++i,e&&i>0&&i%16==0&&i!==n){for(;r.length<51;)r+=" ";a+=r+o+"\n",r=o=""}i===this.offset&&i===this.limit?r+=i===this.markedOffset?"!":"|":i===this.offset?r+=i===this.markedOffset?"[":"<":i===this.limit?r+=i===this.markedOffset?"]":">":r+=i===this.markedOffset?"'":e||0!==i&&i!==n?" ":""}if(e&&" "!==r){for(;r.length<51;)r+=" ";a+=r+o+"\n"}return e?a:r},u$4.fromDebug=function(e,t,i){for(var n,r,o=e.length,a=new u$4((o+1)/3|0,t,i),s=0,l=0,u=!1,c=!1,h=!1,d=!1,f=!1;s<o;){switch(n=e.charAt(s++)){case"!":if(!i){if(c||h||d){f=!0;break}c=h=d=!0}a.offset=a.markedOffset=a.limit=l,u=!1;break;case"|":if(!i){if(c||d){f=!0;break}c=d=!0}a.offset=a.limit=l,u=!1;break;case"[":if(!i){if(c||h){f=!0;break}c=h=!0}a.offset=a.markedOffset=l,u=!1;break;case"<":if(!i){if(c){f=!0;break}c=!0}a.offset=l,u=!1;break;case"]":if(!i){if(d||h){f=!0;break}d=h=!0}a.limit=a.markedOffset=l,u=!1;break;case">":if(!i){if(d){f=!0;break}d=!0}a.limit=l,u=!1;break;case"'":if(!i){if(h){f=!0;break}h=!0}a.markedOffset=l,u=!1;break;case" ":u=!1;break;default:if(!i&&u){f=!0;break}if(r=parseInt(n+e.charAt(s++),16),!i&&(isNaN(r)||r<0||r>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[l++]=r,u=!0}if(f)throw TypeError("Illegal str: Invalid symbol at "+s)}if(!i){if(!c||!d)throw TypeError("Illegal str: Missing offset or limit");if(l<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+l+" < "+o)}return a},l$7.toHex=function(e,t){if(e=typeof e>"u"?this.offset:e,t=typeof t>"u"?this.limit:t,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var i,n=new Array(t-e);e<t;)(i=this.view[e++])<16?n.push("0",i.toString(16)):n.push(i.toString(16));return n.join("")},u$4.fromHex=function(e,t,i){if(!i){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if(e.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var n,r=e.length,o=new u$4(r/2|0,t),a=0,s=0;a<r;a+=2){if(n=parseInt(e.substring(a,a+2),16),!i&&(!isFinite(n)||n<0||n>255))throw TypeError("Illegal str: Contains non-hex characters");o.view[s++]=n}return o.limit=s,o};var b$7=function(){var e={MAX_CODEPOINT:1114111,encodeUTF8:function(e,t){var i=null;for("number"==typeof e&&(i=e,e=function(){return null});null!==i||null!==(i=e());)i<128?t(127&i):i<2048?(t(i>>6&31|192),t(63&i|128)):i<65536?(t(i>>12&15|224),t(i>>6&63|128),t(63&i|128)):(t(i>>18&7|240),t(i>>12&63|128),t(i>>6&63|128),t(63&i|128)),i=null},decodeUTF8:function(e,t){for(var i,n,r,o,a=function(e){e=e.slice(0,e.indexOf(null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(i=e());)if(0==(128&i))t(i);else if(192==(224&i))null===(n=e())&&a([i,n]),t((31&i)<<6|63&n);else if(224==(240&i))(null===(n=e())||null===(r=e()))&&a([i,n,r]),t((15&i)<<12|(63&n)<<6|63&r);else{if(240!=(248&i))throw RangeError("Illegal starting byte: "+i);(null===(n=e())||null===(r=e())||null===(o=e()))&&a([i,n,r,o]),t((7&i)<<18|(63&n)<<12|(63&r)<<6|63&o)}},UTF16toUTF8:function(e,t){for(var i,n=null;null!==(i=null!==n?n:e());)i>=55296&&i<=57343&&null!==(n=e())&&n>=56320&&n<=57343?(t(1024*(i-55296)+n-56320+65536),n=null):t(i);null!==n&&t(n)},UTF8toUTF16:function(e,t){var i=null;for("number"==typeof e&&(i=e,e=function(){return null});null!==i||null!==(i=e());)i<=65535?t(i):(t(55296+((i-=65536)>>10)),t(i%1024+56320)),i=null},encodeUTF16toUTF8:function(t,i){e.UTF16toUTF8(t,(function(t){e.encodeUTF8(t,i)}))},decodeUTF8toUTF16:function(t,i){e.decodeUTF8(t,(function(t){e.UTF8toUTF16(t,i)}))},calculateCodePoint:function(e){return e<128?1:e<2048?2:e<65536?3:4},calculateUTF8:function(e){for(var t,i=0;null!==(t=e());)i+=t<128?1:t<2048?2:t<65536?3:4;return i},calculateUTF16asUTF8:function(t){var i=0,n=0;return e.UTF16toUTF8(t,(function(e){++i,n+=e<128?1:e<2048?2:e<65536?3:4})),[i,n]}};return e}();l$7.toUTF8=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i;try{b$7.decodeUTF8toUTF16(function(){return e<t?this.view[e++]:null}.bind(this),i=d$9())}catch{if(e!==t)throw RangeError("Illegal range: Truncated data, "+e+" != "+t)}return i()},u$4.fromUTF8=function(e,t,i){if(!i&&"string"!=typeof e)throw TypeError("Illegal str: Not a string");var n=new u$4(b$7.calculateUTF16asUTF8(c$9(e),!0)[1],t,i),r=0;return b$7.encodeUTF16toUTF8(c$9(e),(function(e){n.view[r++]=e})),n.limit=r,n};var f$7={};function h$3(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.proxy=e.proxy,this.viewer=e.viewer,this.url=e.url,this.metadata=u$Z(e.metadata,{boundBox:{minX:-180,minY:-90,maxX:180,maxY:90},minLevel:1,maxLevel:20}),this.roadMetadata=e.roadMetadata,this.roadUrl=e.roadUrl,this.labelGraphics=e.labelGraphics?e.labelGraphics:{},this.billboardGraphics=e.billboardGraphics?e.billboardGraphics:{},this.aotuCollide=u$Z(e.aotuCollide,!0),this.collisionPadding=e.collisionPadding?e.collisionPadding:[3,5,3,5],this.subdomains=e.subdomains,Array.isArray(this.subdomains)?this.subdomains=this.subdomains.slice():e$2e(this.subdomains)&&0<this.subdomains.length?this.subdomains=this.subdomains.split(""):this.subdomains=["t0","t1","t2","t3","t4","t5","t6","t7"],this.token=e.token,this.depthTestOptimization=u$Z(e.depthTestOptimization,!1),this.dTOElevation=u$Z(e.dTOElevation,2e4),this.dTOPitch=u$Z(e.dTOPitch,-1.22),this.tileCache=[],this.labelCache=[],this._isInitial=!1,this._latelyGrid=[],this._latelyRefreshStamp=0,this._latelyCollisionStamp=0;var t=e$1T();this._UUID="TDT_WTFS_LABEL_"+t,this._UUIDRoad="TDT_WTFS_LABEL_ROAD_"+t,this._isDTP=!1,this.viewer.camera.percentageChanged=.18,this.bindEvent()}function G$3(e,t){return t.minX>=e.minX&&t.minX<=e.maxX&&t.minY>=e.minY&&t.minY<=e.maxY||t.maxX>=e.minX&&t.maxX<=e.maxX&&t.maxY>=e.minY&&t.maxY<=e.maxY||t.minX>=e.minX&&t.minX<=e.maxX&&t.maxY>=e.minY&&t.maxY<=e.maxY||t.maxX>=e.minX&&t.maxX<=e.maxX&&t.minY>=e.minY&&t.minY<=e.maxY}function A$6(e){return e.coord.x}function N$3(e){return e.coord.y}function F$3(e){return{x:e.anno.collisionBox.x,y:e.anno.collisionBox.y,width:e.anno.collisionBox.width,height:e.anno.collisionBox.height}}function M$3(e,t,i,n,r,o,a,s){a.anno;var l=s,u={x:i,y:n,width:r-i,height:o-n},c=l.x,h=l.y,d=u.x,f=u.y;return!(c>d+u.width||c+l.width<d||h+l.height<f||h>f+u.height)}f$7.ByteBuffer=u$4,f$7.Long=u$4.Long||null,f$7.VERSION="5.0.3",f$7.WIRE_TYPES={},f$7.WIRE_TYPES.VARINT=0,f$7.WIRE_TYPES.BITS64=1,f$7.WIRE_TYPES.LDELIM=2,f$7.WIRE_TYPES.STARTGROUP=3,f$7.WIRE_TYPES.ENDGROUP=4,f$7.WIRE_TYPES.BITS32=5,f$7.PACKABLE_WIRE_TYPES=[f$7.WIRE_TYPES.VARINT,f$7.WIRE_TYPES.BITS64,f$7.WIRE_TYPES.BITS32],f$7.TYPES={int32:{name:"int32",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},uint32:{name:"uint32",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},sint32:{name:"sint32",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},int64:{name:"int64",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:f$7.Long?f$7.Long.ZERO:void 0},uint64:{name:"uint64",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:f$7.Long?f$7.Long.UZERO:void 0},sint64:{name:"sint64",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:f$7.Long?f$7.Long.ZERO:void 0},bool:{name:"bool",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:!1},double:{name:"double",wireType:f$7.WIRE_TYPES.BITS64,defaultValue:0},string:{name:"string",wireType:f$7.WIRE_TYPES.LDELIM,defaultValue:""},bytes:{name:"bytes",wireType:f$7.WIRE_TYPES.LDELIM,defaultValue:null},fixed32:{name:"fixed32",wireType:f$7.WIRE_TYPES.BITS32,defaultValue:0},sfixed32:{name:"sfixed32",wireType:f$7.WIRE_TYPES.BITS32,defaultValue:0},fixed64:{name:"fixed64",wireType:f$7.WIRE_TYPES.BITS64,defaultValue:f$7.Long?f$7.Long.UZERO:void 0},sfixed64:{name:"sfixed64",wireType:f$7.WIRE_TYPES.BITS64,defaultValue:f$7.Long?f$7.Long.ZERO:void 0},float:{name:"float",wireType:f$7.WIRE_TYPES.BITS32,defaultValue:0},enum:{name:"enum",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},message:{name:"message",wireType:f$7.WIRE_TYPES.LDELIM,defaultValue:null},group:{name:"group",wireType:f$7.WIRE_TYPES.STARTGROUP,defaultValue:null}},f$7.MAP_KEY_TYPES=[f$7.TYPES.int32,f$7.TYPES.sint32,f$7.TYPES.sfixed32,f$7.TYPES.uint32,f$7.TYPES.fixed32,f$7.TYPES.int64,f$7.TYPES.sint64,f$7.TYPES.sfixed64,f$7.TYPES.uint64,f$7.TYPES.fixed64,f$7.TYPES.bool,f$7.TYPES.string,f$7.TYPES.bytes],f$7.ID_MIN=1,f$7.ID_MAX=536870911,f$7.convertFieldsToCamelCase=!1,f$7.populateAccessors=!0,f$7.populateDefaults=!0,f$7.Util=function(){var e={};return e.IS_NODE="object"==typeof process&&process+""=="[object process]"&&!process.browser,e.XHR=function(){for(var e=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],t=null,i=0;i<e.length;i++){try{t=e[i]()}catch{continue}break}if(!t)throw Error("XMLHttpRequest is not supported");return t},e.fetch=function(t,i){if(i&&"function"!=typeof i&&(i=null),e.IS_NODE){var n=require("fs");if(i)n.readFile(t,(function(e,t){i(e?null:""+t)}));else try{return n.readFileSync(t)}catch{return null}}else{var r=e.XHR();if(r.open("GET",t,!!i),r.setRequestHeader("Accept","text/plain"),"function"==typeof r.overrideMimeType&&r.overrideMimeType("text/plain"),!i)return r.send(null),200==r.status||0==r.status&&"string"==typeof r.responseText?r.responseText:null;if(r.onreadystatechange=function(){4==r.readyState&&(200==r.status||0==r.status&&"string"==typeof r.responseText?i(r.responseText):i(null))},4==r.readyState)return;r.send(null)}},e.toCamelCase=function(e){return e.replace(/_([a-zA-Z])/g,(function(e,t){return t.toUpperCase()}))},e}(),f$7.Lang={DELIM:/[\s\{\}=;:\[\],'"\(\)<>]/g,RULE:/^(?:required|optional|repeated|map)$/,TYPE:/^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,NAME:/^[a-zA-Z_][a-zA-Z_0-9]*$/,TYPEDEF:/^[a-zA-Z][a-zA-Z_0-9]*$/,TYPEREF:/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,FQTYPEREF:/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/,NUMBER:/^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,NUMBER_DEC:/^(?:[1-9][0-9]*|0)$/,NUMBER_HEX:/^0[xX][0-9a-fA-F]+$/,NUMBER_OCT:/^0[0-7]+$/,NUMBER_FLT:/^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,BOOL:/^(?:true|false)$/i,ID:/^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,NEGID:/^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,WHITESPACE:/\s/,STRING:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,STRING_DQ:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,STRING_SQ:/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},f$7.DotProto=function(e,t){var i={},n=function(e){this.source=e+"",this.index=0,this.line=1,this.stack=[],this._stringOpen=null},r=n.prototype;r._readString=function(){var e='"'===this._stringOpen?t.STRING_DQ:t.STRING_SQ;e.lastIndex=this.index-1;var i=e.exec(this.source);if(!i)throw Error("unterminated string");return this.index=e.lastIndex,this.stack.push(this._stringOpen),this._stringOpen=null,i[1]},r.next=function(){if(this.stack.length>0)return this.stack.shift();if(this.index>=this.source.length)return null;if(null!==this._stringOpen)return this._readString();var e,i,n;do{for(e=!1;t.WHITESPACE.test(n=this.source.charAt(this.index));)if("\n"===n&&++this.line,++this.index===this.source.length)return null;if("/"===this.source.charAt(this.index))if(++this.index,"/"===this.source.charAt(this.index)){for(;"\n"!==this.source.charAt(++this.index);)if(this.index==this.source.length)return null;++this.index,++this.line,e=!0}else{if("*"!==(n=this.source.charAt(this.index)))return"/";do{if("\n"===n&&++this.line,++this.index===this.source.length)return null;i=n,n=this.source.charAt(this.index)}while("*"!==i||"/"!==n);++this.index,e=!0}}while(e);if(this.index===this.source.length)return null;var r=this.index;if(t.DELIM.lastIndex=0,!t.DELIM.test(this.source.charAt(r++)))for(;r<this.source.length&&!t.DELIM.test(this.source.charAt(r));)++r;var o=this.source.substring(this.index,this.index=r);return('"'===o||"'"===o)&&(this._stringOpen=o),o},r.peek=function(){if(0===this.stack.length){var e=this.next();if(null===e)return null;this.stack.push(e)}return this.stack[0]},r.skip=function(e){var t=this.next();if(t!==e)throw Error("illegal '"+t+"', '"+e+"' expected")},r.omit=function(e){return this.peek()===e&&(this.next(),!0)},r.toString=function(){return"Tokenizer ("+this.index+"/"+this.source.length+" at line "+this.line+")"},i.Tokenizer=n;var o=function(e){this.tn=new n(e),this.proto3=!1},a=o.prototype;function s(e,i){var n=-1,r=1;if("-"==e.charAt(0)&&(r=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))n=parseInt(e);else if(t.NUMBER_HEX.test(e))n=parseInt(e.substring(2),16);else{if(!t.NUMBER_OCT.test(e))throw Error("illegal id value: "+(r<0?"-":"")+e);n=parseInt(e.substring(1),8)}if(n=r*n|0,!i&&n<0)throw Error("illegal id value: "+(r<0?"-":"")+e);return n}function l(e){var i=1;if("-"==e.charAt(0)&&(i=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))return i*parseInt(e,10);if(t.NUMBER_HEX.test(e))return i*parseInt(e.substring(2),16);if(t.NUMBER_OCT.test(e))return i*parseInt(e.substring(1),8);if("inf"===e)return i*(1/0);if("nan"===e)return NaN;if(t.NUMBER_FLT.test(e))return i*parseFloat(e);throw Error("illegal number value: "+(i<0?"-":"")+e)}function u(e,t,i){typeof e[t]>"u"?e[t]=i:(Array.isArray(e[t])||(e[t]=[e[t]]),e[t].push(i))}return a.parse=function(){var e,i,n={name:"[ROOT]",package:null,messages:[],enums:[],imports:[],options:{},services:[]},r=!0;try{for(;e=this.tn.next();)switch(e){case"package":if(!r||null!==n.package)throw Error("unexpected 'package'");if(e=this.tn.next(),!t.TYPEREF.test(e))throw Error("illegal package name: "+e);this.tn.skip(";"),n.package=e;break;case"import":if(!r)throw Error("unexpected 'import'");("public"===(e=this.tn.peek())||(i="weak"===e))&&this.tn.next(),e=this._readString(),this.tn.skip(";"),i||n.imports.push(e);break;case"syntax":if(!r)throw Error("unexpected 'syntax'");this.tn.skip("="),"proto3"===(n.syntax=this._readString())&&(this.proto3=!0),this.tn.skip(";");break;case"message":this._parseMessage(n,null),r=!1;break;case"enum":this._parseEnum(n),r=!1;break;case"option":this._parseOption(n);break;case"service":this._parseService(n);break;case"extend":this._parseExtend(n);break;default:throw Error("unexpected '"+e+"'")}}catch(e){throw e.message="Parse error at line "+this.tn.line+": "+e.message,e}return delete n.name,n},o.parse=function(e){return new o(e).parse()},a._readString=function(){var e,t,i="";do{if("'"!==(t=this.tn.next())&&'"'!==t)throw Error("illegal string delimiter: "+t);i+=this.tn.next(),this.tn.skip(t),e=this.tn.peek()}while('"'===e||'"'===e);return i},a._readValue=function(e){var i=this.tn.peek();if('"'===i||"'"===i)return this._readString();if(this.tn.next(),t.NUMBER.test(i))return l(i);if(t.BOOL.test(i))return"true"===i.toLowerCase();if(e&&t.TYPEREF.test(i))return i;throw Error("illegal value: "+i)},a._parseOption=function(e,i){var n=this.tn.next(),r=!1;if("("===n&&(r=!0,n=this.tn.next()),!t.TYPEREF.test(n))throw Error("illegal option name: "+n);var o=n;r&&(this.tn.skip(")"),o="("+o+")",n=this.tn.peek(),t.FQTYPEREF.test(n)&&(o+=n,this.tn.next())),this.tn.skip("="),this._parseOptionValue(e,o),i||this.tn.skip(";")},a._parseOptionValue=function(e,i){var n=this.tn.peek();if("{"!==n)u(e.options,i,this._readValue(!0));else for(this.tn.skip("{");"}"!==(n=this.tn.next());){if(!t.NAME.test(n))throw Error("illegal option name: "+i+"."+n);this.tn.omit(":")?u(e.options,i+"."+n,this._readValue(!0)):this._parseOptionValue(e,i+"."+n)}},a._parseService=function(e){var i=this.tn.next();if(!t.NAME.test(i))throw Error("illegal service name at line "+this.tn.line+": "+i);var n={name:i,rpc:{},options:{}};for(this.tn.skip("{");"}"!==(i=this.tn.next());)if("option"===i)this._parseOption(n);else{if("rpc"!==i)throw Error("illegal service token: "+i);this._parseServiceRPC(n)}this.tn.omit(";"),e.services.push(n)},a._parseServiceRPC=function(e){var i="rpc",n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal rpc service method name: "+n);var r=n,o={request:null,response:null,request_stream:!1,response_stream:!1,options:{}};if(this.tn.skip("("),"stream"===(n=this.tn.next()).toLowerCase()&&(o.request_stream=!0,n=this.tn.next()),!t.TYPEREF.test(n))throw Error("illegal rpc service request type: "+n);if(o.request=n,this.tn.skip(")"),"returns"!==(n=this.tn.next()).toLowerCase())throw Error("illegal rpc service request type delimiter: "+n);if(this.tn.skip("("),"stream"===(n=this.tn.next()).toLowerCase()&&(o.response_stream=!0,n=this.tn.next()),o.response=n,this.tn.skip(")"),"{"===(n=this.tn.peek())){for(this.tn.next();"}"!==(n=this.tn.next());){if("option"!==n)throw Error("illegal rpc service token: "+n);this._parseOption(o)}this.tn.omit(";")}else this.tn.skip(";");typeof e[i]>"u"&&(e[i]={}),e[i][r]=o},a._parseMessage=function(e,i){var n=!!i,r=this.tn.next(),o={name:"",fields:[],enums:[],messages:[],options:{},services:[],oneofs:{}};if(!t.NAME.test(r))throw Error("illegal "+(n?"group":"message")+" name: "+r);for(o.name=r,n&&(this.tn.skip("="),i.id=s(this.tn.next()),o.isGroup=!0),"["===(r=this.tn.peek())&&i&&this._parseFieldOptions(i),this.tn.skip("{");"}"!==(r=this.tn.next());)if(t.RULE.test(r))this._parseMessageField(o,r);else if("oneof"===r)this._parseMessageOneOf(o);else if("enum"===r)this._parseEnum(o);else if("message"===r)this._parseMessage(o);else if("option"===r)this._parseOption(o);else if("service"===r)this._parseService(o);else if("extensions"===r)o.hasOwnProperty("extensions")?o.extensions=o.extensions.concat(this._parseExtensionRanges()):o.extensions=this._parseExtensionRanges();else if("reserved"===r)this._parseIgnored();else if("extend"===r)this._parseExtend(o);else{if(!t.TYPEREF.test(r))throw Error("illegal message token: "+r);if(!this.proto3)throw Error("illegal field rule: "+r);this._parseMessageField(o,"optional",r)}return this.tn.omit(";"),e.messages.push(o),o},a._parseIgnored=function(){for(;";"!==this.tn.peek();)this.tn.next();this.tn.skip(";")},a._parseMessageField=function(e,i,n){if(!t.RULE.test(i))throw Error("illegal message field rule: "+i);var r,o={rule:i,type:"",name:"",options:{},id:0};if("map"===i){if(n)throw Error("illegal type: "+n);if(this.tn.skip("<"),r=this.tn.next(),!t.TYPE.test(r)&&!t.TYPEREF.test(r))throw Error("illegal message field type: "+r);if(o.keytype=r,this.tn.skip(","),r=this.tn.next(),!t.TYPE.test(r)&&!t.TYPEREF.test(r))throw Error("illegal message field: "+r);if(o.type=r,this.tn.skip(">"),r=this.tn.next(),!t.NAME.test(r))throw Error("illegal message field name: "+r);o.name=r,this.tn.skip("="),o.id=s(this.tn.next()),"["===(r=this.tn.peek())&&this._parseFieldOptions(o),this.tn.skip(";")}else if("group"===(n=typeof n<"u"?n:this.tn.next())){var a=this._parseMessage(e,o);if(!/^[A-Z]/.test(a.name))throw Error("illegal group name: "+a.name);o.type=a.name,o.name=a.name.toLowerCase(),this.tn.omit(";")}else{if(!t.TYPE.test(n)&&!t.TYPEREF.test(n))throw Error("illegal message field type: "+n);if(o.type=n,r=this.tn.next(),!t.NAME.test(r))throw Error("illegal message field name: "+r);o.name=r,this.tn.skip("="),o.id=s(this.tn.next()),"["===(r=this.tn.peek())&&this._parseFieldOptions(o),this.tn.skip(";")}return e.fields.push(o),o},a._parseMessageOneOf=function(e){var i=this.tn.next();if(!t.NAME.test(i))throw Error("illegal oneof name: "+i);var n,r=i,o=[];for(this.tn.skip("{");"}"!==(i=this.tn.next());)(n=this._parseMessageField(e,"optional",i)).oneof=r,o.push(n.id);this.tn.omit(";"),e.oneofs[r]=o},a._parseFieldOptions=function(e){this.tn.skip("[");for(var t=!0;"]"!==this.tn.peek();)t||this.tn.skip(","),this._parseOption(e,!0),t=!1;this.tn.next()},a._parseEnum=function(e){var i={name:"",values:[],options:{}},n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal name: "+n);for(i.name=n,this.tn.skip("{");"}"!==(n=this.tn.next());)if("option"===n)this._parseOption(i);else{if(!t.NAME.test(n))throw Error("illegal name: "+n);this.tn.skip("=");var r={name:n,id:s(this.tn.next(),!0)};"["===(n=this.tn.peek())&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),i.values.push(r)}this.tn.omit(";"),e.enums.push(i)},a._parseExtensionRanges=function(){var t,i,n,r=[];do{for(i=[];;){switch(t=this.tn.next()){case"min":n=e.ID_MIN;break;case"max":n=e.ID_MAX;break;default:n=l(t)}if(i.push(n),2===i.length)break;if("to"!==this.tn.peek()){i.push(n);break}this.tn.next()}r.push(i)}while(this.tn.omit(","));return this.tn.skip(";"),r},a._parseExtend=function(e){var i=this.tn.next();if(!t.TYPEREF.test(i))throw Error("illegal extend reference: "+i);var n={ref:i,fields:[]};for(this.tn.skip("{");"}"!==(i=this.tn.next());)if(t.RULE.test(i))this._parseMessageField(n,i);else{if(!t.TYPEREF.test(i))throw Error("illegal extend token: "+i);if(!this.proto3)throw Error("illegal field rule: "+i);this._parseMessageField(n,"optional",i)}return this.tn.omit(";"),e.messages.push(n),n},a.toString=function(){return"Parser at line "+this.tn.line},i.Parser=o,i}(f$7,f$7.Lang),f$7.Reflect=function(e){var t={},i=function(e,t,i){this.builder=e,this.parent=t,this.name=i,this.className},n=i.prototype;n.fqn=function(){for(var e=this.name,t=this;;){if(null==(t=t.parent))break;e=t.name+"."+e}return e},n.toString=function(e){return(e?this.className+" ":"")+this.fqn()},n.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},t.T=i;var r=function(e,t,n,r,o){i.call(this,e,t,n),this.className="Namespace",this.children=[],this.options=r||{},this.syntax=o||"proto2"},o=r.prototype=Object.create(i.prototype);o.getChildren=function(e){if(null==(e=e||null))return this.children.slice();for(var t=[],i=0,n=this.children.length;i<n;++i)this.children[i]instanceof e&&t.push(this.children[i]);return t},o.addChild=function(e){var t;if(t=this.getChild(e.name))if(t instanceof u.Field&&t.name!==t.originalName&&null===this.getChild(t.originalName))t.name=t.originalName;else{if(!(e instanceof u.Field&&e.name!==e.originalName&&null===this.getChild(e.originalName)))throw Error("Duplicate name in namespace "+this.toString(!0)+": "+e.name);e.name=e.originalName}this.children.push(e)},o.getChild=function(e){for(var t="number"==typeof e?"id":"name",i=0,n=this.children.length;i<n;++i)if(this.children[i][t]===e)return this.children[i];return null},o.resolve=function(e,i){var n,r="string"==typeof e?e.split("."):e,o=this,a=0;if(""===r[a]){for(;null!==o.parent;)o=o.parent;a++}do{do{if(!(o instanceof t.Namespace)){o=null;break}if(!(n=o.getChild(r[a]))||!(n instanceof t.T)||i&&!(n instanceof t.Namespace)){o=null;break}o=n,a++}while(a<r.length);if(null!=o)break;if(null!==this.parent)return this.parent.resolve(e,i)}while(null!=o);return o},o.qn=function(e){var i=[],n=e;do{i.unshift(n.name),n=n.parent}while(null!==n);for(var r=1;r<=i.length;r++){var o=i.slice(i.length-r);if(e===this.resolve(o,e instanceof t.Namespace))return o.join(".")}return e.fqn()},o.build=function(){for(var e,t={},i=this.children,n=0,o=i.length;n<o;++n)(e=i[n])instanceof r&&(t[e.name]=e.build());return Object.defineProperty&&Object.defineProperty(t,"$options",{value:this.buildOpt()}),t},o.buildOpt=function(){for(var e={},t=Object.keys(this.options),i=0,n=t.length;i<n;++i){var r=t[i],o=this.options[t[i]];e[r]=o}return e},o.getOption=function(e){return typeof e>"u"?this.options:typeof this.options[e]<"u"?this.options[e]:null},t.Namespace=r;var a=function(t,i,n,r,o){if(this.type=t,this.resolvedType=i,this.isMapKey=n,this.syntax=r,this.name=o,n&&e.MAP_KEY_TYPES.indexOf(t)<0)throw Error("Invalid map key type: "+t.name)},s=a.prototype;function l(t,i){if(t&&"number"==typeof t.low&&"number"==typeof t.high&&"boolean"==typeof t.unsigned&&t.low==t.low&&t.high==t.high)return new e.Long(t.low,t.high,typeof i>"u"?t.unsigned:i);if("string"==typeof t)return e.Long.fromString(t,i||!1,10);if("number"==typeof t)return e.Long.fromNumber(t,i||!1);throw Error("not convertible to Long")}a.defaultFieldValue=function(t){if("string"==typeof t&&(t=e.TYPES[t]),typeof t.defaultValue>"u")throw Error("default value for type "+t.name+" is not supported");return t==e.TYPES.bytes?new u$4(0):t.defaultValue},s.toString=function(){return(this.name||"")+(this.isMapKey?"map":"value")+" element"},s.verifyValue=function(t){var i=this;function n(e,t){throw Error("Illegal value for "+i.toString(!0)+" of type "+i.type.name+": "+e+" ("+t+")")}switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),t>4294967295?0|t:t;case e.TYPES.uint32:case e.TYPES.fixed32:return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),t<0?t>>>0:t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:if(e.Long)try{return l(t,!1)}catch(e){n(typeof t,e.message)}else n(typeof t,"requires Long.js");case e.TYPES.uint64:case e.TYPES.fixed64:if(e.Long)try{return l(t,!0)}catch(e){n(typeof t,e.message)}else n(typeof t,"requires Long.js");case e.TYPES.bool:return"boolean"!=typeof t&&n(typeof t,"not a boolean"),t;case e.TYPES.float:case e.TYPES.double:return"number"!=typeof t&&n(typeof t,"not a number"),t;case e.TYPES.string:return"string"!=typeof t&&!(t&&t instanceof String)&&n(typeof t,"not a string"),""+t;case e.TYPES.bytes:return u$4.isByteBuffer(t)?t:u$4.wrap(t,"base64");case e.TYPES.enum:var r=this.resolvedType.getChildren(e.Reflect.Enum.Value);for(a=0;a<r.length;a++){if(r[a].name==t)return r[a].id;if(r[a].id==t)return r[a].id}if("proto3"===this.syntax)return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),(t>4294967295||t<0)&&n(typeof t,"not in range for uint32"),t;n(t,"not a valid enum value");case e.TYPES.group:case e.TYPES.message:if((!t||"object"!=typeof t)&&n(typeof t,"object expected"),t instanceof this.resolvedType.clazz)return t;if(t instanceof e.Builder.Message){var o={};for(var a in t)t.hasOwnProperty(a)&&(o[a]=t[a]);t=o}return new this.resolvedType.clazz(t)}throw Error("[INTERNAL] Illegal value for "+this.toString(!0)+": "+t+" (undefined type "+this.type+")")},s.calculateLength=function(t,i){if(null===i)return 0;var n;switch(this.type){case e.TYPES.int32:return i<0?u$4.calculateVarint64(i):u$4.calculateVarint32(i);case e.TYPES.uint32:return u$4.calculateVarint32(i);case e.TYPES.sint32:return u$4.calculateVarint32(u$4.zigZagEncode32(i));case e.TYPES.fixed32:case e.TYPES.sfixed32:case e.TYPES.float:return 4;case e.TYPES.int64:case e.TYPES.uint64:return u$4.calculateVarint64(i);case e.TYPES.sint64:return u$4.calculateVarint64(u$4.zigZagEncode64(i));case e.TYPES.fixed64:case e.TYPES.sfixed64:return 8;case e.TYPES.bool:return 1;case e.TYPES.enum:return u$4.calculateVarint32(i);case e.TYPES.double:return 8;case e.TYPES.string:return n=u$4.calculateUTF8Bytes(i),u$4.calculateVarint32(n)+n;case e.TYPES.bytes:if(i.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+i.remaining()+" bytes remaining");return u$4.calculateVarint32(i.remaining())+i.remaining();case e.TYPES.message:return n=this.resolvedType.calculate(i),u$4.calculateVarint32(n)+n;case e.TYPES.group:return(n=this.resolvedType.calculate(i))+u$4.calculateVarint32(t<<3|e.WIRE_TYPES.ENDGROUP)}throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+i+" (unknown type)")},s.encodeValue=function(t,i,n){if(null===i)return n;switch(this.type){case e.TYPES.int32:i<0?n.writeVarint64(i):n.writeVarint32(i);break;case e.TYPES.uint32:n.writeVarint32(i);break;case e.TYPES.sint32:n.writeVarint32ZigZag(i);break;case e.TYPES.fixed32:n.writeUint32(i);break;case e.TYPES.sfixed32:n.writeInt32(i);break;case e.TYPES.int64:case e.TYPES.uint64:n.writeVarint64(i);break;case e.TYPES.sint64:n.writeVarint64ZigZag(i);break;case e.TYPES.fixed64:n.writeUint64(i);break;case e.TYPES.sfixed64:n.writeInt64(i);break;case e.TYPES.bool:"string"==typeof i?n.writeVarint32("false"===i.toLowerCase()?0:!!i):n.writeVarint32(i?1:0);break;case e.TYPES.enum:n.writeVarint32(i);break;case e.TYPES.float:n.writeFloat32(i);break;case e.TYPES.double:n.writeFloat64(i);break;case e.TYPES.string:n.writeVString(i);break;case e.TYPES.bytes:if(i.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+i.remaining()+" bytes remaining");var r=i.offset;n.writeVarint32(i.remaining()),n.append(i),i.offset=r;break;case e.TYPES.message:var o=(new u$4).LE();this.resolvedType.encode(i,o),n.writeVarint32(o.offset),n.append(o.flip());break;case e.TYPES.group:this.resolvedType.encode(i,n),n.writeVarint32(t<<3|e.WIRE_TYPES.ENDGROUP);break;default:throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+i+" (unknown type)")}return n},s.decode=function(t,i,n){if(i!=this.type.wireType)throw Error("Unexpected wire type for element");var r,o;switch(this.type){case e.TYPES.int32:return 0|t.readVarint32();case e.TYPES.uint32:return t.readVarint32()>>>0;case e.TYPES.sint32:return 0|t.readVarint32ZigZag();case e.TYPES.fixed32:return t.readUint32()>>>0;case e.TYPES.sfixed32:return 0|t.readInt32();case e.TYPES.int64:return t.readVarint64();case e.TYPES.uint64:return t.readVarint64().toUnsigned();case e.TYPES.sint64:return t.readVarint64ZigZag();case e.TYPES.fixed64:return t.readUint64();case e.TYPES.sfixed64:return t.readInt64();case e.TYPES.bool:return!!t.readVarint32();case e.TYPES.enum:return t.readVarint32();case e.TYPES.float:return t.readFloat();case e.TYPES.double:return t.readDouble();case e.TYPES.string:return t.readVString();case e.TYPES.bytes:if(o=t.readVarint32(),t.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+t.remaining());return(r=t.clone()).limit=r.offset+o,t.offset+=o,r;case e.TYPES.message:return o=t.readVarint32(),this.resolvedType.decode(t,o);case e.TYPES.group:return this.resolvedType.decode(t,-1,n)}throw Error("[INTERNAL] Illegal decode type")},s.valueFromString=function(t){if(!this.isMapKey)throw Error("valueFromString() called on non-map-key element");switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return this.verifyValue(parseInt(t));case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return this.verifyValue(t);case e.TYPES.bool:return"true"===t;case e.TYPES.string:return this.verifyValue(t);case e.TYPES.bytes:return u$4.fromBinary(t)}},s.valueToString=function(t){if(!this.isMapKey)throw Error("valueToString() called on non-map-key element");return this.type===e.TYPES.bytes?t.toString("binary"):t.toString()},t.Element=a;var u=function(e,t,i,n,o,a){r.call(this,e,t,i,n,a),this.className="Message",this.extensions=void 0,this.clazz=null,this.isGroup=!!o,this._fields=null,this._fieldsById=null,this._fieldsByName=null},c=u.prototype=Object.create(r.prototype);function h(t,i){var n=i.readVarint32(),r=7&n,o=n>>>3;switch(r){case e.WIRE_TYPES.VARINT:do{n=i.readUint8()}while(128==(128&n));break;case e.WIRE_TYPES.BITS64:i.offset+=8;break;case e.WIRE_TYPES.LDELIM:n=i.readVarint32(),i.offset+=n;break;case e.WIRE_TYPES.STARTGROUP:h(o,i);break;case e.WIRE_TYPES.ENDGROUP:if(o===t)return!1;throw Error("Illegal GROUPEND after unknown group: "+o+" ("+t+" expected)");case e.WIRE_TYPES.BITS32:i.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+t+": "+r)}return!0}c.build=function(t){if(this.clazz&&!t)return this.clazz;var i=function(e,t){var i=t.getChildren(e.Reflect.Message.Field),n=t.getChildren(e.Reflect.Message.OneOf),r=function(o,a){e.Builder.Message.call(this);for(var s=0,l=n.length;s<l;++s)this[n[s].name]=null;for(s=0,l=i.length;s<l;++s){var u=i[s];this[u.name]=u.repeated?[]:u.map?new e.Map(u):null,(u.required||"proto3"===t.syntax)&&null!==u.defaultValue&&(this[u.name]=u.defaultValue)}var c;if(arguments.length>0)if(1!==arguments.length||null===o||"object"!=typeof o||!("function"!=typeof o.encode||o instanceof r)||Array.isArray(o)||o instanceof e.Map||u$4.isByteBuffer(o)||o instanceof ArrayBuffer||e.Long&&o instanceof e.Long)for(s=0,l=arguments.length;s<l;++s)typeof(c=arguments[s])<"u"&&this.$set(i[s].name,c);else this.$set(o)},o=r.prototype=Object.create(e.Builder.Message.prototype);o.add=function(i,n,r){var o=t._fieldsByName[i];if(!r){if(!o)throw Error(this+"#"+i+" is undefined");if(!(o instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+o.toString(!0));if(!o.repeated)throw Error(this+"#"+i+" is not a repeated field");n=o.verifyValue(n,!0)}return null===this[i]&&(this[i]=[]),this[i].push(n),this},o.$add=o.add,o.set=function(i,n,r){if(i&&"object"==typeof i){for(var o in r=n,i)i.hasOwnProperty(o)&&typeof(n=i[o])<"u"&&void 0===t._oneofsByName[o]&&this.$set(o,n,r);return this}var a=t._fieldsByName[i];if(r)this[i]=n;else{if(!a)throw Error(this+"#"+i+" is not a field: undefined");if(!(a instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+a.toString(!0));this[a.name]=n=a.verifyValue(n)}if(a&&a.oneof){var s=this[a.oneof.name];null!==n?(null!==s&&s!==a.name&&(this[s]=null),this[a.oneof.name]=a.name):s===i&&(this[a.oneof.name]=null)}return this},o.$set=o.set,o.get=function(i,n){if(n)return this[i];var r=t._fieldsByName[i];if(!(r&&r instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: undefined");if(!(r instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+r.toString(!0));return this[r.name]},o.$get=o.get;for(var a=0;a<i.length;a++){var s=i[a];s instanceof e.Reflect.Message.ExtensionField||t.builder.options.populateAccessors&&function(e){var i=e.originalName.replace(/(_[a-zA-Z])/g,(function(e){return e.toUpperCase().replace("_","")}));i=i.substring(0,1).toUpperCase()+i.substring(1);var n=e.originalName.replace(/([A-Z])/g,(function(e){return"_"+e})),r=function(t,i){return this[e.name]=i?t:e.verifyValue(t),this},a=function(){return this[e.name]};null===t.getChild("set"+i)&&(o["set"+i]=r),null===t.getChild("set_"+n)&&(o["set_"+n]=r),null===t.getChild("get"+i)&&(o["get"+i]=a),null===t.getChild("get_"+n)&&(o["get_"+n]=a)}(s)}function l(t,i,n,r){if(null===t||"object"!=typeof t){if(r&&r instanceof e.Reflect.Enum){var o=e.Reflect.Enum.getName(r.object,t);if(null!==o)return o}return t}if(u$4.isByteBuffer(t))return i?t.toBase64():t.toBuffer();if(e.Long.isLong(t))return n?t.toString():e.Long.fromValue(t);var a;if(Array.isArray(t))return a=[],t.forEach((function(e,t){a[t]=l(e,i,n,r)})),a;if(a={},t instanceof e.Map){for(var s=t.entries(),u=s.next();!u.done;u=s.next())a[t.keyElem.valueToString(u.value[0])]=l(u.value[1],i,n,t.valueElem.resolvedType);return a}var c=t.$type,h=void 0;for(var d in t)t.hasOwnProperty(d)&&(c&&(h=c.getChild(d))?a[d]=l(t[d],i,n,h.resolvedType):a[d]=l(t[d],i,n));return a}return o.encode=function(e,i){"boolean"==typeof e&&(i=e,e=void 0);var n=!1;e||(e=new u$4,n=!0);var r=e.littleEndian;try{return t.encode(this,e.LE(),i),(n?e.flip():e).LE(r)}catch(t){throw e.LE(r),t}},r.encode=function(e,t,i){return new r(e).encode(t,i)},o.calculate=function(){return t.calculate(this)},o.encodeDelimited=function(e,i){var n=!1;e||(e=new u$4,n=!0);var r=(new u$4).LE();return t.encode(this,r,i).flip(),e.writeVarint32(r.remaining()),e.append(r),n?e.flip():e},o.encodeAB=function(){try{return this.encode().toArrayBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toArrayBuffer()),e}},o.toArrayBuffer=o.encodeAB,o.encodeNB=function(){try{return this.encode().toBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBuffer()),e}},o.toBuffer=o.encodeNB,o.encode64=function(){try{return this.encode().toBase64()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBase64()),e}},o.toBase64=o.encode64,o.encodeHex=function(){try{return this.encode().toHex()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toHex()),e}},o.toHex=o.encodeHex,o.toRaw=function(e,t){return l(this,!!e,!!t,this.$type)},o.encodeJSON=function(){return JSON.stringify(l(this,!0,!0,this.$type))},r.decode=function(e,i,n){"string"==typeof i&&(n=i,i=-1),"string"==typeof e?e=u$4.wrap(e,n||"base64"):u$4.isByteBuffer(e)||(e=u$4.wrap(e));var r=e.littleEndian;try{var o=t.decode(e.LE(),i);return e.LE(r),o}catch(t){throw e.LE(r),t}},r.decodeDelimited=function(e,i){if("string"==typeof e?e=u$4.wrap(e,i||"base64"):u$4.isByteBuffer(e)||(e=u$4.wrap(e)),e.remaining()<1)return null;var n=e.offset,r=e.readVarint32();if(e.remaining()<r)return e.offset=n,null;try{var o=t.decode(e.slice(e.offset,e.offset+r).LE());return e.offset+=r,o}catch(t){throw e.offset+=r,t}},r.decode64=function(e){return r.decode(e,"base64")},r.decodeHex=function(e){return r.decode(e,"hex")},r.decodeJSON=function(e){return new r(JSON.parse(e))},o.toString=function(){return t.toString()},Object.defineProperty&&(Object.defineProperty(r,"$options",{value:t.buildOpt()}),Object.defineProperty(o,"$options",{value:r.$options}),Object.defineProperty(r,"$type",{value:t}),Object.defineProperty(o,"$type",{value:t})),r}(e,this);this._fields=[],this._fieldsById={},this._fieldsByName={},this._oneofsByName={};for(var n,r=0,o=this.children.length;r<o;r++)if((n=this.children[r])instanceof _||n instanceof u||n instanceof x){if(i.hasOwnProperty(n.name))throw Error("Illegal reflect child of "+this.toString(!0)+": "+n.toString(!0)+" cannot override static property '"+n.name+"'");i[n.name]=n.build()}else if(n instanceof u.Field)n.build(),this._fields.push(n),this._fieldsById[n.id]=n,this._fieldsByName[n.name]=n;else if(n instanceof u.OneOf)this._oneofsByName[n.name]=n;else if(!(n instanceof u.OneOf||n instanceof g))throw Error("Illegal reflect child of "+this.toString(!0)+": "+this.children[r].toString(!0));return this.clazz=i},c.encode=function(e,t,i){for(var n,r,o=null,a=0,s=this._fields.length;a<s;++a)r=e[(n=this._fields[a]).name],n.required&&null===r?null===o&&(o=n):n.encode(i?r:n.verifyValue(r),t,e);if(null!==o){var l=Error("Missing at least one required field for "+this.toString(!0)+": "+o);throw l.encoded=t,l}return t},c.calculate=function(e){for(var t,i,n=0,r=0,o=this._fields.length;r<o;++r){if(i=e[(t=this._fields[r]).name],t.required&&null===i)throw Error("Missing at least one required field for "+this.toString(!0)+": "+t);n+=t.calculate(i,e)}return n},c.decode=function(t,i,n){"number"!=typeof i&&(i=-1);for(var r,o,a,s,l=t.offset,u=new this.clazz;t.offset<l+i||-1===i&&t.remaining()>0;){if(a=(r=t.readVarint32())>>>3,(o=7&r)===e.WIRE_TYPES.ENDGROUP){if(a!==n)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+a+" ("+(n?n+" expected":"not a group")+")");break}if(s=this._fieldsById[a]){if(s.repeated&&!s.options.packed)u[s.name].push(s.decode(o,t));else if(s.map){var c=s.decode(o,t);u[s.name].set(c[0],c[1])}else if(u[s.name]=s.decode(o,t),s.oneof){var d=u[s.oneof.name];null!==d&&d!==s.name&&(u[d]=null),u[s.oneof.name]=s.name}}else switch(o){case e.WIRE_TYPES.VARINT:t.readVarint32();break;case e.WIRE_TYPES.BITS32:t.offset+=4;break;case e.WIRE_TYPES.BITS64:t.offset+=8;break;case e.WIRE_TYPES.LDELIM:var f=t.readVarint32();t.offset+=f;break;case e.WIRE_TYPES.STARTGROUP:for(;h(a,t););break;default:throw Error("Illegal wire type for unknown field "+a+" in "+this.toString(!0)+"#decode: "+o)}}for(var p=0,_=this._fields.length;p<_;++p)if(null===u[(s=this._fields[p]).name])if("proto3"===this.syntax)u[s.name]=s.defaultValue;else{if(s.required){var m=Error("Missing at least one required field for "+this.toString(!0)+": "+s.name);throw m.decoded=u,m}e.populateDefaults&&null!==s.defaultValue&&(u[s.name]=s.defaultValue)}return u},t.Message=u;var d=function(t,n,r,o,a,s,l,c,h,d){i.call(this,t,n,s),this.className="Message.Field",this.required="required"===r,this.repeated="repeated"===r,this.map="map"===r,this.keyType=o||null,this.type=a,this.resolvedType=null,this.id=l,this.options=c||{},this.defaultValue=null,this.oneof=h||null,this.syntax=d||"proto2",this.originalName=this.name,this.element=null,this.keyElement=null,this.builder.options.convertFieldsToCamelCase&&!(this instanceof u.ExtensionField)&&(this.name=e.Util.toCamelCase(this.name))},f=d.prototype=Object.create(i.prototype);f.build=function(){this.element=new a(this.type,this.resolvedType,!1,this.syntax,this.name),this.map&&(this.keyElement=new a(this.keyType,void 0,!0,this.syntax,this.name)),"proto3"!==this.syntax||this.repeated||this.map?typeof this.options.default<"u"&&(this.defaultValue=this.verifyValue(this.options.default)):this.defaultValue=a.defaultFieldValue(this.type)},f.verifyValue=function(t,i){i=i||!1;var n,r=this;function o(e,t){throw Error("Illegal value for "+r.toString(!0)+" of type "+r.type.name+": "+e+" ("+t+")")}if(null===t)return this.required&&o(typeof t,"required"),"proto3"===this.syntax&&this.type!==e.TYPES.message&&o(typeof t,"proto3 field without field presence cannot be null"),null;if(this.repeated&&!i){Array.isArray(t)||(t=[t]);var a=[];for(n=0;n<t.length;n++)a.push(this.element.verifyValue(t[n]));return a}return this.map&&!i?t instanceof e.Map?t:(t instanceof Object||o(typeof t,"expected ProtoBuf.Map or raw object for map field"),new e.Map(this,t)):(!this.repeated&&Array.isArray(t)&&o(typeof t,"no array expected"),this.element.verifyValue(t))},f.hasWirePresence=function(t,i){if("proto3"!==this.syntax)return null!==t;if(this.oneof&&i[this.oneof.name]===this.name)return!0;switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return 0!==t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return 0!==t.low||0!==t.high;case e.TYPES.bool:return t;case e.TYPES.float:case e.TYPES.double:return 0!==t;case e.TYPES.string:return t.length>0;case e.TYPES.bytes:return t.remaining()>0;case e.TYPES.enum:return 0!==t;case e.TYPES.message:return null!==t;default:return!0}},f.encode=function(t,i,n){if(null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===t||this.repeated&&0==t.length)return i;try{var r;if(this.repeated)if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){i.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),i.ensureCapacity(i.offset+=1);var o=i.offset;for(r=0;r<t.length;r++)this.element.encodeValue(this.id,t[r],i);var a=i.offset-o,s=u$4.calculateVarint32(a);if(s>1){var l=i.slice(o,i.offset);o+=s-1,i.offset=o,i.append(l)}i.writeVarint32(a,o-s)}else for(r=0;r<t.length;r++)i.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,t[r],i);else this.map?t.forEach((function(t,n,r){var o=u$4.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,n)+u$4.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,t);i.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),i.writeVarint32(o),i.writeVarint32(8|this.keyType.wireType),this.keyElement.encodeValue(1,n,i),i.writeVarint32(16|this.type.wireType),this.element.encodeValue(2,t,i)}),this):this.hasWirePresence(t,n)&&(i.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,t,i))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+t+" ("+e+")")}return i},f.calculate=function(t,i){if(t=this.verifyValue(t),null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===t||this.repeated&&0==t.length)return 0;var n=0;try{var r,o;if(this.repeated)if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){for(n+=u$4.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),o=0,r=0;r<t.length;r++)o+=this.element.calculateLength(this.id,t[r]);n+=u$4.calculateVarint32(o),n+=o}else for(r=0;r<t.length;r++)n+=u$4.calculateVarint32(this.id<<3|this.type.wireType),n+=this.element.calculateLength(this.id,t[r]);else this.map?t.forEach((function(t,i,r){var o=u$4.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,i)+u$4.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,t);n+=u$4.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),n+=u$4.calculateVarint32(o),n+=o}),this):this.hasWirePresence(t,i)&&(n+=u$4.calculateVarint32(this.id<<3|this.type.wireType),n+=this.element.calculateLength(this.id,t))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+t+" ("+e+")")}return n},f.decode=function(t,i,n){var r,o;if(!(!this.map&&t==this.type.wireType||!n&&this.repeated&&this.options.packed&&t==e.WIRE_TYPES.LDELIM||this.map&&t==e.WIRE_TYPES.LDELIM))throw Error("Illegal wire type for field "+this.toString(!0)+": "+t+" ("+this.type.wireType+" expected)");if(t==e.WIRE_TYPES.LDELIM&&this.repeated&&this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0&&!n){o=i.readVarint32(),o=i.offset+o;for(var s=[];i.offset<o;)s.push(this.decode(this.type.wireType,i,!0));return s}if(this.map){var l=a.defaultFieldValue(this.keyType);if(r=a.defaultFieldValue(this.type),o=i.readVarint32(),i.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+i.remaining());var u=i.clone();for(u.limit=u.offset+o,i.offset+=o;u.remaining()>0;){var c=u.readVarint32();t=7&c;var h=c>>>3;if(1===h)l=this.keyElement.decode(u,t,h);else{if(2!==h)throw Error("Unexpected tag in map field key/value submessage");r=this.element.decode(u,t,h)}}return[l,r]}return this.element.decode(i,t,this.id)},t.Message.Field=d;var p=function(e,t,i,n,r,o,a){d.call(this,e,t,i,null,n,r,o,a),this.extension};p.prototype=Object.create(d.prototype),t.Message.ExtensionField=p;t.Message.OneOf=function(e,t,n){i.call(this,e,t,n),this.fields=[]};var _=function(e,t,i,n,o){r.call(this,e,t,i,n,o),this.className="Enum",this.object=null};_.getName=function(e,t){for(var i,n=Object.keys(e),r=0;r<n.length;++r)if(e[i=n[r]]===t)return i;return null},(_.prototype=Object.create(r.prototype)).build=function(t){if(this.object&&!t)return this.object;for(var i=new e.Builder.Enum,n=this.getChildren(_.Value),r=0,o=n.length;r<o;++r)i[n[r].name]=n[r].id;return Object.defineProperty&&Object.defineProperty(i,"$options",{value:this.buildOpt(),enumerable:!1}),this.object=i},t.Enum=_;var m=function(e,t,n,r){i.call(this,e,t,n),this.className="Enum.Value",this.id=r};m.prototype=Object.create(i.prototype),t.Enum.Value=m;var g=function(e,t,n,r){i.call(this,e,t,n),this.field=r};g.prototype=Object.create(i.prototype),t.Extension=g;var x=function(e,t,i,n){r.call(this,e,t,i,n),this.className="Service",this.clazz=null};(x.prototype=Object.create(r.prototype)).build=function(t){return this.clazz&&!t?this.clazz:this.clazz=function(e,t){for(var i=function(t){e.Builder.Service.call(this),this.rpcImpl=t||function(e,t,i){setTimeout(i.bind(this,Error("Not implemented")),0)}},n=i.prototype=Object.create(e.Builder.Service.prototype),r=t.getChildren(e.Reflect.Service.RPCMethod),o=0;o<r.length;o++)!function(e){n[e.name]=function(i,n){try{try{i=e.resolvedRequestType.clazz.decode(u$4.wrap(i))}catch(e){if(!(e instanceof TypeError))throw e}if(null===i||"object"!=typeof i)throw Error("Illegal arguments");i instanceof e.resolvedRequestType.clazz||(i=new e.resolvedRequestType.clazz(i)),this.rpcImpl(e.fqn(),i,(function(i,r){if(i)n(i);else{null===r&&(r="");try{r=e.resolvedResponseType.clazz.decode(r)}catch{}r&&r instanceof e.resolvedResponseType.clazz?n(null,r):n(Error("Illegal response type received in service method "+t.name+"#"+e.name))}}))}catch(e){setTimeout(n.bind(this,e),0)}},i[e.name]=function(t,n,r){new i(t)[e.name](n,r)},Object.defineProperty&&(Object.defineProperty(i[e.name],"$options",{value:e.buildOpt()}),Object.defineProperty(n[e.name],"$options",{value:i[e.name].$options}))}(r[o]);return Object.defineProperty&&(Object.defineProperty(i,"$options",{value:t.buildOpt()}),Object.defineProperty(n,"$options",{value:i.$options}),Object.defineProperty(i,"$type",{value:t}),Object.defineProperty(n,"$type",{value:t})),i}(e,this)},t.Service=x;var y=function(e,t,n,r){i.call(this,e,t,n),this.className="Service.Method",this.options=r||{}};(y.prototype=Object.create(i.prototype)).buildOpt=o.buildOpt,t.Service.Method=y;var v=function(e,t,i,n,r,o,a,s){y.call(this,e,t,i,s),this.className="Service.RPCMethod",this.requestName=n,this.responseName=r,this.requestStream=o,this.responseStream=a,this.resolvedRequestType=null,this.resolvedResponseType=null};return v.prototype=Object.create(y.prototype),t.Service.RPCMethod=v,t}(f$7),f$7.Builder=function(e,t,i){var n=function(e){this.ns=new i.Namespace(this,null,""),this.ptr=this.ns,this.resolved=!1,this.result=null,this.files={},this.importRoot=null,this.options=e||{}},r=n.prototype;function o(e){e.messages&&e.messages.forEach((function(t){t.syntax=e.syntax,o(t)})),e.enums&&e.enums.forEach((function(t){t.syntax=e.syntax}))}return n.isMessage=function(e){return!("string"!=typeof e.name||typeof e.values<"u"||typeof e.rpc<"u")},n.isMessageField=function(e){return!("string"!=typeof e.rule||"string"!=typeof e.name||"string"!=typeof e.type||typeof e.id>"u")},n.isEnum=function(e){return!("string"!=typeof e.name||typeof e.values>"u"||!Array.isArray(e.values)||0===e.values.length)},n.isService=function(e){return!("string"!=typeof e.name||"object"!=typeof e.rpc||!e.rpc)},n.isExtend=function(e){return"string"==typeof e.ref},r.reset=function(){return this.ptr=this.ns,this},r.define=function(e){if("string"!=typeof e||!t.TYPEREF.test(e))throw Error("illegal namespace: "+e);return e.split(".").forEach((function(e){var t=this.ptr.getChild(e);null===t&&this.ptr.addChild(t=new i.Namespace(this,this.ptr,e)),this.ptr=t}),this),this},r.create=function(t){if(!t)return this;if(Array.isArray(t)){if(0===t.length)return this;t=t.slice()}else t=[t];for(var r=[t];r.length>0;){if(t=r.pop(),!Array.isArray(t))throw Error("not a valid namespace: "+JSON.stringify(t));for(;t.length>0;){var o=t.shift();if(n.isMessage(o)){var a=new i.Message(this,this.ptr,o.name,o.options,o.isGroup,o.syntax),s={};o.oneofs&&Object.keys(o.oneofs).forEach((function(e){a.addChild(s[e]=new i.Message.OneOf(this,a,e))}),this),o.fields&&o.fields.forEach((function(e){if(null!==a.getChild(0|e.id))throw Error("duplicate or invalid field id in "+a.name+": "+e.id);if(e.options&&"object"!=typeof e.options)throw Error("illegal field options in "+a.name+"#"+e.name);var t=null;if("string"==typeof e.oneof&&!(t=s[e.oneof]))throw Error("illegal oneof in "+a.name+"#"+e.name+": "+e.oneof);e=new i.Message.Field(this,a,e.rule,e.keytype,e.type,e.name,e.id,e.options,t,o.syntax),t&&t.fields.push(e),a.addChild(e)}),this);var l=[];if(o.enums&&o.enums.forEach((function(e){l.push(e)})),o.messages&&o.messages.forEach((function(e){l.push(e)})),o.services&&o.services.forEach((function(e){l.push(e)})),o.extensions&&("number"==typeof o.extensions[0]?a.extensions=[o.extensions]:a.extensions=o.extensions),this.ptr.addChild(a),l.length>0){r.push(t),t=l,l=null,this.ptr=a,a=null;continue}l=null}else if(n.isEnum(o))a=new i.Enum(this,this.ptr,o.name,o.options,o.syntax),o.values.forEach((function(e){a.addChild(new i.Enum.Value(this,a,e.name,e.id))}),this),this.ptr.addChild(a);else if(n.isService(o))a=new i.Service(this,this.ptr,o.name,o.options),Object.keys(o.rpc).forEach((function(e){var t=o.rpc[e];a.addChild(new i.Service.RPCMethod(this,a,e,t.request,t.response,!!t.request_stream,!!t.response_stream,t.options))}),this),this.ptr.addChild(a);else{if(!n.isExtend(o))throw Error("not a valid definition: "+JSON.stringify(o));if(a=this.ptr.resolve(o.ref,!0))o.fields.forEach((function(t){if(null!==a.getChild(0|t.id))throw Error("duplicate extended field id in "+a.name+": "+t.id);if(a.extensions){var n=!1;if(a.extensions.forEach((function(e){t.id>=e[0]&&t.id<=e[1]&&(n=!0)})),!n)throw Error("illegal extended field id in "+a.name+": "+t.id+" (not within valid ranges)")}var r=t.name;this.options.convertFieldsToCamelCase&&(r=e.Util.toCamelCase(r));var o=new i.Message.ExtensionField(this,a,t.rule,t.type,this.ptr.fqn()+"."+r,t.id,t.options),s=new i.Extension(this,this.ptr,t.name,o);o.extension=s,this.ptr.addChild(s),a.addChild(o)}),this);else if(!/\.?google\.protobuf\./.test(o.ref))throw Error("extended message "+o.ref+" is not defined")}o=null,a=null}t=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},r.import=function(t,i){var n="/";if("string"==typeof i){if(e.Util.IS_NODE&&(i=require("path").resolve(i)),!0===this.files[i])return this.reset();this.files[i]=!0}else if("object"==typeof i){var r,a=i.root;if(e.Util.IS_NODE&&(a=require("path").resolve(a)),(a.indexOf("\\")>=0||i.file.indexOf("\\")>=0)&&(n="\\"),r=e.Util.IS_NODE?require("path").join(a,i.file):a+n+i.file,!0===this.files[r])return this.reset();this.files[r]=!0}if(t.imports&&t.imports.length>0){var s,l=!1;"object"==typeof i?(this.importRoot=i.root,l=!0,s=this.importRoot,i=i.file,(s.indexOf("\\")>=0||i.indexOf("\\")>=0)&&(n="\\")):"string"==typeof i?this.importRoot?s=this.importRoot:i.indexOf("/")>=0?""===(s=i.replace(/\/[^\/]*$/,""))&&(s="/"):i.indexOf("\\")>=0?(s=i.replace(/\\[^\\]*$/,""),n="\\"):s=".":s=null;for(var u=0;u<t.imports.length;u++)if("string"==typeof t.imports[u]){if(!s)throw Error("cannot determine import root");var c=t.imports[u];if("google/protobuf/descriptor.proto"===c||(c=e.Util.IS_NODE?require("path").join(s,c):s+n+c,!0===this.files[c]))continue;/\.proto$/i.test(c)&&!e.DotProto&&(c=c.replace(/\.proto$/,".json"));var h=e.Util.fetch(c);if(null===h)throw Error("failed to import '"+c+"' in '"+i+"': file not found");/\.json$/i.test(c)?this.import(JSON.parse(h+""),c):this.import(e.DotProto.Parser.parse(h),c)}else i?/\.(\w+)$/.test(i)?this.import(t.imports[u],i.replace(/^(.+)\.(\w+)$/,(function(e,t,i){return t+"_import"+u+"."+i}))):this.import(t.imports[u],i+"_import"+u):this.import(t.imports[u]);l&&(this.importRoot=null)}t.package&&this.define(t.package),t.syntax&&o(t);var d=this.ptr;return t.options&&Object.keys(t.options).forEach((function(e){d.options[e]=t.options[e]})),t.messages&&(this.create(t.messages),this.ptr=d),t.enums&&(this.create(t.enums),this.ptr=d),t.services&&(this.create(t.services),this.ptr=d),t.extends&&this.create(t.extends),this.reset()},r.resolveAll=function(){var n;if(null==this.ptr||"object"==typeof this.ptr.type)return this;if(this.ptr instanceof i.Namespace)this.ptr.children.forEach((function(e){this.ptr=e,this.resolveAll()}),this);else if(this.ptr instanceof i.Message.Field){if(t.TYPE.test(this.ptr.type))this.ptr.type=e.TYPES[this.ptr.type];else{if(!t.TYPEREF.test(this.ptr.type))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(!(n=(this.ptr instanceof i.Message.ExtensionField?this.ptr.extension.parent:this.ptr.parent).resolve(this.ptr.type,!0)))throw Error("unresolvable type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(this.ptr.resolvedType=n,n instanceof i.Enum){if(this.ptr.type=e.TYPES.enum,"proto3"===this.ptr.syntax&&"proto3"!==n.syntax)throw Error("proto3 message cannot reference proto2 enum")}else{if(!(n instanceof i.Message))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);this.ptr.type=n.isGroup?e.TYPES.group:e.TYPES.message}}if(this.ptr.map){if(!t.TYPE.test(this.ptr.keyType))throw Error("illegal key type for map field in "+this.ptr.toString(!0)+": "+this.ptr.keyType);this.ptr.keyType=e.TYPES[this.ptr.keyType]}"proto3"===this.ptr.syntax&&this.ptr.repeated&&void 0===this.ptr.options.packed&&-1!==e.PACKABLE_WIRE_TYPES.indexOf(this.ptr.type.wireType)&&(this.ptr.options.packed=!0)}else if(this.ptr instanceof e.Reflect.Service.Method){if(!(this.ptr instanceof e.Reflect.Service.RPCMethod))throw Error("illegal service type in "+this.ptr.toString(!0));if(!((n=this.ptr.parent.resolve(this.ptr.requestName,!0))&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.requestName);if(this.ptr.resolvedRequestType=n,!((n=this.ptr.parent.resolve(this.ptr.responseName,!0))&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.responseName);this.ptr.resolvedResponseType=n}else if(!(this.ptr instanceof e.Reflect.Message.OneOf||this.ptr instanceof e.Reflect.Extension||this.ptr instanceof e.Reflect.Enum.Value))throw Error("illegal object in namespace: "+typeof this.ptr+": "+this.ptr);return this.reset()},r.build=function(e){if(this.reset(),this.resolved||(this.resolveAll(),this.resolved=!0,this.result=null),null===this.result&&(this.result=this.ns.build()),!e)return this.result;for(var t="string"==typeof e?e.split("."):e,i=this.result,n=0;n<t.length;n++){if(!i[t[n]]){i=null;break}i=i[t[n]]}return i},r.lookup=function(e,t){return e?this.ns.resolve(e,t):this.ns},r.toString=function(){return"Builder"},n.Message=function(){},n.Enum=function(){},n.Service=function(){},n}(f$7,f$7.Lang,f$7.Reflect),f$7.Map=function(e,t){var i=function(e,i){if(!e.map)throw Error("field is not a map");if(this.field=e,this.keyElem=new t.Element(e.keyType,null,!0,e.syntax),this.valueElem=new t.Element(e.type,e.resolvedType,!1,e.syntax),this.map={},Object.defineProperty(this,"size",{get:function(){return Object.keys(this.map).length}}),i)for(var n=Object.keys(i),r=0;r<n.length;r++){var o=this.keyElem.valueFromString(n[r]),a=this.valueElem.verifyValue(i[n[r]]);this.map[this.keyElem.valueToString(o)]={key:o,value:a}}},n=i.prototype;function r(e){var t=0;return{next:function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}}return n.clear=function(){this.map={}},n.delete=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e)),i=t in this.map;return delete this.map[t],i},n.entries=function(){for(var e,t=[],i=Object.keys(this.map),n=0;n<i.length;n++)t.push([(e=this.map[i[n]]).key,e.value]);return r(t)},n.keys=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].key);return r(e)},n.values=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].value);return r(e)},n.forEach=function(e,t){for(var i,n=Object.keys(this.map),r=0;r<n.length;r++)e.call(t,(i=this.map[n[r]]).value,i.key,this)},n.set=function(e,t){var i=this.keyElem.verifyValue(e),n=this.valueElem.verifyValue(t);return this.map[this.keyElem.valueToString(i)]={key:i,value:n},this},n.get=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e));if(t in this.map)return this.map[t].value},n.has=function(e){return this.keyElem.valueToString(this.keyElem.verifyValue(e))in this.map},i}(0,f$7.Reflect),f$7.loadProto=function(e,t,i){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(i=t,t=void 0),f$7.loadJson(f$7.DotProto.Parser.parse(e),t,i)},f$7.protoFromString=f$7.loadProto,f$7.loadProtoFile=function(e,t,i){if(t&&"object"==typeof t?(i=t,t=null):(!t||"function"!=typeof t)&&(t=null),t)return f$7.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,(function(n){if(null!==n)try{t(null,f$7.loadProto(n,i,e))}catch(e){t(e)}else t(Error("Failed to fetch file"))}));var n=f$7.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===n?null:f$7.loadProto(n,i,e)},f$7.protoFromFile=f$7.loadProtoFile,f$7.newBuilder=function(e){return typeof(e=e||{}).convertFieldsToCamelCase>"u"&&(e.convertFieldsToCamelCase=f$7.convertFieldsToCamelCase),typeof e.populateAccessors>"u"&&(e.populateAccessors=f$7.populateAccessors),new f$7.Builder(e)},f$7.loadJson=function(e,t,i){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(i=t,t=null),(!t||"object"!=typeof t)&&(t=f$7.newBuilder()),"string"==typeof e&&(e=JSON.parse(e)),t.import(e,i),t.resolveAll(),t},f$7.loadJsonFile=function(e,t,i){if(t&&"object"==typeof t?(i=t,t=null):(!t||"function"!=typeof t)&&(t=null),t)return f$7.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,(function(n){if(null!==n)try{t(null,f$7.loadJson(JSON.parse(n),i,e))}catch(e){t(e)}else t(Error("Failed to fetch file"))}));var n=f$7.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===n?null:f$7.loadJson(JSON.parse(n),i,e)},h$3.prototype.getCacheTile=function(e,t,i,n){for(var r=0;r<this.tileCache.length;r++)if(this.tileCache[r].x===e&&this.tileCache[r].y===t&&this.tileCache[r].z===i&&this.tileCache[r].t===n)return this.tileCache[r];return null},h$3.prototype.addCacheTile=function(e){this.tileCache.length>999&&this.tileCache.splice(0,500),this.removeCacheTile(e.x,e.y,e.z,e.t),this.tileCache.push(e)},h$3.prototype.removeCacheTile=function(e,t,i,n){for(var r=0;r<this.tileCache.length;r++)if(this.tileCache[r].x===e&&this.tileCache[r].y===t&&this.tileCache[r].z===i&&this.tileCache[r].t===n){this.tileCache.splice(r,1);break}},h$3.prototype.getCacheLabel=function(e){for(var t=0;t<this.labelCache.length;t++)if(this.labelCache[t].name===this._UUID&&this.labelCache[t].oid===e)return this.labelCache[t];return null},h$3.prototype.addCacheLabel=function(e){this.labelCache.length>999&&this.labelCache.splice(0,250),this.removeCacheLabel(e.oid),e.timestamp=(new Date).getTime(),this.labelCache.push(e)},h$3.prototype.removeCacheLabel=function(e){for(var t=0;t<this.labelCache.length;t++)if(this.labelCache[t].name===this._UUID&&this.labelCache[t].oid===e){this.labelCache.splice(t,1);break}},h$3.prototype.getTileUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.url+"/GetTiles?lxys={z},{x},{y}"+(this.token?"&tk="+this.token:"")},h$3.prototype.getIcoUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.url+"/GetIcon?id={id}"+(this.token?"&tk="+this.token:"")},h$3.prototype.getRoadTileUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.roadUrl},h$3.prototype._cluster=function(e){if(!(e$2e(e)&&e<.05)){var t=this;clearTimeout(this._timer);var i=this.viewer.scene.globe._surface;if(i._tilesToRender.length<8||0<i._tileLoadQueueHigh.length)this._timer=setTimeout((function(){t._cluster()}),100);else{var n=this.getTilesToRender();if(this.compareArray(n,this._latelyGrid))return;this._queueCall(n),t.delaySynchronous()}}},h$3.prototype._changed=function(e){if(!(e$2e(e)&&e<.05)){var t=(new Date).getTime(),i=t-this._latelyRefreshStamp,n=t-this._latelyCollisionStamp;if(i>300&&this._cluster(),n>150&&this.aotuCollide&&this.collisionDetection(),this.depthTestOptimization){var r=this.viewer.scene,o=r.globe,a=r.camera,s=a.positionCartographic.height,l=a.pitch,u=this.dTOElevation,c=this.dTOPitch;this._isDTP=o.depthTestAgainstTerrain=s<u&&c<l}}},h$3.prototype._queueCall=function(e){var t=this;t._latelyGrid=e,t._latelyRefreshStamp=(new Date).getTime(),e.forEach((function(e,i,n){if(t.metadata&&G$3(t.metadata.boundBox,e.boundBox)){if(t.metadata.minLevel>e.level+1||t.metadata.maxLevel<e.level+1)return;var r=t.getCacheTile(e.x,e.y,e.level+1,0);if(r)t.addLabelAndIco(r);else{var o=t.getTileUrl().replace("{z}",e.level+1).replace("{y}",e.y).replace("{x}",e.x).replace("{s}",t.subdomains[(e.x+e.y+e.level)%t.subdomains.length]);(a=new XMLHttpRequest).open("GET",o,!0),a.responseType="arraybuffer",a.onload=function(){if(!(a.status<200||300<=a.status)){var e=t.CutString(a.response);if(e)(i=H$3(e)).x=this.tile.x,i.y=this.tile.y,i.z=this.tile.z,i.t=0,t.addCacheTile(i),t.addLabelAndIco(i);else{var i={x:this.tile.x,y:this.tile.y,z:this.tile.z,t:0};t.addCacheTile(i),t.delaySynchronous()}}},a.onerror=function(e){console.error(e)},a.send(),a.tile={x:e.x,y:e.y,z:e.level+1}}}if(t.roadMetadata&&G$3(t.roadMetadata.boundBox,e.boundBox)){if(t.roadMetadata.minLevel>e.level+1||t.roadMetadata.maxLevel<e.level+1)return;if(b=t.getCacheTile(e.x,e.y,e.level+1,1))t.addLabelAndIco(b);else{var a,s=t.getRoadTileUrl().replace("{z}",e.level+1).replace("{y}",e.y).replace("{x}",e.x);(a=new XMLHttpRequest).open("GET",s,!0),a.responseType="json",a.onload=function(){if(!(a.status<200||300<=a.status)){var e=a.response;if(e){var i={pois:e.map((function(e,t,i){return{oid:e.LabelPoint.X+"_"+e.LabelPoint.Y,name:e.Feature.properties.Name,coordinate:[e.LabelPoint.X,e.LabelPoint.Y,e.LabelPoint.Z?e.LabelPoint.Z:0]}})),x:this.tile.x,y:this.tile.y,z:this.tile.z,t:1};t.addCacheTile(i),t.addLabelAndIco(i)}else i={x:this.tile.x,y:this.tile.y,z:this.tile.z,t:1};t.addCacheTile(i),t.delaySynchronous()}},a.onerror=function(e){console.error(e)},a.send(),a.tile={x:e.x,y:e.y,z:e.level+1}}}}))},h$3.prototype.getTilesToRender=function(){var e=this.viewer.scene.globe._surface._tilesToRender.map((function(e){return{x:e.x,y:e.y,level:e.level,boundBox:{minX:e$2d.toDegrees(e.rectangle.west),minY:e$2d.toDegrees(e.rectangle.south),maxX:e$2d.toDegrees(e.rectangle.east),maxY:e$2d.toDegrees(e.rectangle.north)}}})).sort((function(e,t){return t.level-e.level}));return e},h$3.prototype.addLabelAndIco=function(e){if(e.pois)for(var t=0;t<e.pois.length;t++){var i=this.getCacheLabel(e.pois[t].oid);i=i||this.createLabel(e.pois[t],e),this.addCacheLabel(i)}this.delaySynchronous()},h$3.prototype.delaySynchronous=function(){var e=this;clearTimeout(this._timer2),e._timer2=setTimeout((function(){e.synchronousLabel()}),100)},h$3.prototype.synchronousLabel=function(){for(var e=0;e<this.labelCache.length;e++)this.labelCache[e].timestamp>=this._latelyRefreshStamp&&!this.viewer.entities.contains(this.labelCache[e])&&(this._isInitial&&this.aotuCollide&&(this.labelCache[e].show=!1),this.viewer.entities.add(this.labelCache[e]));if(!this._isInitial){for(e=0;e<this.viewer.entities.values.length;e++)!this.viewer.entities.values[e].name||this.viewer.entities.values[e].name!==this._UUID&&this.viewer.entities.values[e].name!==this._UUIDRoad||this.viewer.entities.values[e].timestamp<this._latelyRefreshStamp&&(this.viewer.entities.remove(this.viewer.entities.values[e]),e--);this.aotuCollide&&this.collisionDetection()}},h$3.prototype.createLabel=function(e,t){if(e$2e(e)){var i={show:!0,position:o$1p.fromDegrees(e.coordinate[0],e.coordinate[1],e.coordinate[2]),label:{text:e.name}};i.label.font=this.labelGraphics.font||e.fontSize+"px "+t.stringTable[e.fontNameIndex]||"30px 微软雅黑",i.label.style=this.labelGraphics.style||R$S.FILL_AND_OUTLINE,i.label.scale=this.labelGraphics.scale||e.scale||1,i.label.showBackground=this.labelGraphics.showBackground||e.showBackground||!1,i.label.backgroundColor=this.labelGraphics.backgroundColor||e.backgroundColor,i.label.backgroundPadding=this.labelGraphics.backgroundPadding||e.backgroundPadding,i.label.pixelOffset=this.labelGraphics.pixelOffset||e.pixelOffset||new o$1o(0,0),i.label.eyeOffset=this.labelGraphics.eyeOffset||e.eyeOffset,i.label.horizontalOrigin=this.labelGraphics.horizontalOrigin||e.horizontalOrigin,i.label.verticalOrigin=this.labelGraphics.verticalOrigin||e.verticalOrigin,i.label.heightReference=this.labelGraphics.heightReference||k$R.NONE,i.label.fillColor=this.labelGraphics.fillColor||e$1X.fromCssColorString(this.HexadecimalConversion(e.fontColor)),i.label.outlineColor=this.labelGraphics.outlineWidth||e$1X.fromCssColorString(this.HexadecimalConversion(e.shiningColor)),i.label.outlineWidth=this.labelGraphics.outlineWidth||e.shiningSize,i.label.translucencyByDistance=void 0,i.label.pixelOffsetScaleByDistance=void 0,i.label.scaleByDistance=this.labelGraphics.scaleByDistance||void 0,i.label.distanceDisplayCondition=void 0,i.label.disableDepthTestDistance=Number.POSITIVE_INFINITY;var n=new h$W(i);return n.name=t.t?this._UUIDRoad:this._UUID,n.oid=e.oid,n.priority=e.priority?e.priority:0,n.xyz=t.x+"_"+t.y+"_"+(t.z-1),n}},h$3.prototype.collisionDetection=function(){var e=this.viewer.scene._view.viewport,t=e.x,i=e.x+e.width,n=e.y,r=e.y+e.height,o=[],a=this,s=this.viewer.entities.values;s.sort((function(e,t){return e.priority-t.priority})),s.map((function(e){if(e.name&&(e.name===a._UUID||e.name===a._UUIDRoad)){var s=s$R.wgs84ToDrawingBufferCoordinates(a.viewer.scene,e.position.getValue(0));if(e$2e(s)){e._screenSpacePosition=s;var l=a.getLabelReact({point:s,entity:e});e.collisionBox=l,s.x>=t&&s.x<=i&&s.y>=n&&s.y<=r?(e.show=!0,o.push({anno:e,clustered:!0,coord:s})):e.show=!1}else e.show=!1}}));for(var l=O$D(o,A$6,N$3,64,Int32Array),u=o.length,c=0;c<u;c++){for(var h=o[c],d=h.anno.collisionBox,f=l.intersect(d.x,d.y,d.x+d.width,d.y+d.height,o,F$3,M$3),p=f.length,_=0,m=0;m<p;m++){var g=f[m],x=o[g];c!==g&&!x.clustered&&++_}_<1?h.clustered=!1:h.anno.show=!1}},h$3.prototype.bindEvent=function(){this.viewer.scene.camera.moveEnd.addEventListener(this._cluster,this),this.viewer.scene.camera.changed.addEventListener(this._changed,this);this.viewer.scene.terrainProvider.readyPromise.then(this._cluster.bind(this))},h$3.prototype.unbindEvent=function(){this.viewer.scene.camera.moveEnd.removeEventListener(this._cluster,this),this.viewer.scene.camera.changed.removeEventListener(this._changed,this)},h$3.prototype.activate=function(){this._latelyGrid=[],this._cluster()},h$3.prototype.destroy=function(){for(var e=0;e<this.viewer.entities.values.length;e++)!this.viewer.entities.values[e].name||this.viewer.entities.values[e].name!==this._UUID&&this.viewer.entities.values[e].name!==this._UUIDRoad||(this.viewer.entities.remove(this.viewer.entities.values[e]),e--);this.viewer.camera.percentageChanged=.5,this.unbindEvent(),this.handler=this.handler&&this.handler.destroy(),this.proxy=void 0,this.viewer=void 0,this.url=void 0,this.labelGraphics=void 0,this.billboardGraphics=void 0,this.aotuCollide=void 0,this.collisionPadding=void 0,this.tileCache=void 0,this.labelCache=void 0,this._latelyGrid=void 0,this._latelyRefreshStamp=void 0,this._roadTileset=void 0},h$3.prototype.compareArray=function(e,t){for(var i=!1,n=0;n<e.length;n++){for(var r=!1,o=0;o<t.length;o++)if(e[n].x===t[o].x&&e[n].y===t[o].y&&e[n].level===t[o].level){r=!0;break}if(!r){i=!0;break}}return!i},h$3.prototype.getLabelReact=function(e){var t=parseInt(e.entity.label.font);t=t>0?t:15;for(var i=e.entity.label.text.getValue(0).split("\n"),n=0,r=i.length,o=0;o<i.length;o++){var a=V$3(i[o])/2;n<a&&(n=a)}var s=e.entity.billboard?e.entity.billboard.width.getValue(0)*e.entity.billboard.scale.getValue(0):1,l=e.entity.billboard?e.entity.billboard.height.getValue(0)*e.entity.billboard.scale.getValue(0):1,u=e.entity.label.pixelOffset,c=u.getValue(0).x;c<0&&(c=0);var h=u.getValue(0).y;return h<0&&(h=0),{x:(e.point?e.point.x:-999)-s/2-this.collisionPadding[3],y:(e.point?e.point.y:-999)-l/2-this.collisionPadding[0],width:t*e.entity.label.scale.getValue(0)*n+c+s+this.collisionPadding[1],height:t*e.entity.label.scale.getValue(0)*(r+.5*(r-1))+h+l/2+this.collisionPadding[2]}},h$3.prototype.CutString=function(e){if(!e)return"";var t=e.byteLength;return t<=28?"":e.slice(19,t-9)},h$3.prototype.HexadecimalConversion=function(e){if(4278190080===e)return"#000000";var t=4278190080|parseInt(-Number(e));if(e="",(t=t.toString(16).substring(1)).length<6)for(var i=6-t.length,n=0;n<i;n++)e+="0";return"#"+e+t},h$3.prototype.getLabelVisibility=function(e){if(!e)return!1;var t=this.viewer.canvas.getBoundingClientRect();return!(e.x<-10||e.x>t.right+10||e.y<-10||e.y>t.bottom+10)};var V$3=function(e){for(var t=0,i=0;i<e.length;i++)null!=e.charAt(i).match(/[^\x00-\xff]/gi)?t+=2:t+=1;return t},H$3=function(e){var t={stringTable:[],pois:[],enumGeometryType:[{ePoint:0},{eMultiLineString:1},{ePolygon:2}],enumZCoordType:[{eCloseGround:0},{eCloseSeaSurface:1},{eRelativelyGround:2},{eAbsolute:3}]},i=function(){if(!f$7)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return f$7.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;} ;message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Interate = 5;optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI.proto").build("GEOPOI").PBPOITile}(),n=function(){if(!f$7)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return f$7.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;};enum enumZCoordType {eCloseGround = 0;eCloseSeaSurface = 1;eRelativelyGround = 2;eAbsolute = 3;};message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Interate = 5;optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];optional enumZCoordType ZCoordType = 16 [default = eAbsolute];};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI2.proto").build("GEOPOI").PBPOITile}(),r=function(){if(!f$7)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return f$7.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;};enum enumZCoordType {eCloseGround = 0;eCloseSeaSurface = 1;eRelativelyGround = 2;eAbsolute = 3;};message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Priority = 5;repeated int32 Interates =6 [packed=true];optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];optional enumZCoordType ZCoordType = 16 [default = eAbsolute];optional int32 FontStyle=17;optional int32 ShiningSize=18;};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI3.proto").build("GEOPOI").PBPOITile}();t.pois.length=0;var o,a=e;try{o=r.decode(a)}catch{console.log("message")}if(!o)try{results=n.decode(a)}catch{console.log("message"),results=i.decode(a)}t.version=parseInt(o.Version.toString()),t.titleKey=parseInt(o.TileKey.toString()),t.stringTable=[];for(var s=o.StringTable.s.length,l=0;l<s;l++)t.stringTable.push(o.StringTable.s[l].toString());return o.POIS.forEach((function(e){var i={};i.oid=parseInt(e.OID.toString())+"_"+t.titleKey,i.name=e.Name.toString(),i.symbolID=parseInt(e.SymbolID.toString()),i.displayHeight=e.DisplayHeight,i.shiningColor=e.ShiningColor,i.fontNameIndex=e.FontNameIndex,i.fontSize=e.FontSize,i.fontColor=e.FontColor,e.ZCoordType&&(i.zCoordType=e.ZCoordType),i.geometryType=e.GeometryType,i.coordinate=e.Coordinates,i.priority=void 0===e.Priority?null:e.Priority,i.interates=void 0===e.Interates?null:e.Interates,i.fontStyle=void 0===e.FontStyle?null:e.FontStyle,i.shiningSize=void 0===e.ShiningSize?null:e.ShiningSize,t.pois.push(i)})),t},_$5={IMG_W:"img_w",IMG_C:"img_c",CIA_W:"cia_w",CIA_C:"cia_c",VEC_W:"vec_w",VEC_C:"vec_c",TER_W:"ter_w",TER_C:"ter_c",CVA_W:"cva_w",CVA_C:"cva_c",CTA_W:"cta_w",CTA_C:"cta_c",IBO_W:"ibo_w",IBO_C:"ibo_c",EIA_W:"eia_w",EIA_C:"eia_c",EVA_W:"eva_w",EVA_C:"eva_c"},t$7=Object.freeze(_$5);function f$6(e){e=u$Z(e,{}),this._mapStyle=u$Z(e.mapStyle,t$7.IMG_W),this._url=u$Z(e.url,_$4[this._mapStyle]),this._token=e.token,this._layer=u$Z(e.layer,r$c[this._mapStyle]),this._style=u$Z(e.style,"default"),this._tileMatrixSetID=u$Z(e.tileMatrixSetID,a$1[this._mapStyle]),this._tileMatrixLabels=u$Z(e.tileMatrixLabels,i$7[this._mapStyle]),this._format=u$Z(e.format,n$5[this._mapStyle]),this._epsgCode=s$6[this._mapStyle],this._tilingScheme=u$Z(e.tilingScheme,new c$S({})),"4490"==this._epsgCode&&(this._tilingScheme=new g$15),this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._minimumLevel=u$Z(e.minimumLevel,0),this._maximumLevel=u$Z(e.maximumLevel,i$7[this._mapStyle].length),this._rectangle=u$Z(e.rectangle,this._tilingScheme.rectangle),this._readyPromise=o$1l.resolve(!0),this._errorEvent=new o$1h;var t=e.credit;this._credit="string"==typeof t?new r$U(t):t,this._subdomains=u$Z(e.subdomains,["t0","t1","t2","t3","t4","t5","t6","t7"]),this._tileDiscardPolicy=e.tileDiscardPolicy;var i=this,n=this._url;i.tablename=this._url,new l$14({name:n}).then((function(e){e.checkObjectStoreExit(i.tablename)?i._indexedDBScheduler=e:e.createObjectStore(i.tablename).then((function(){i._indexedDBScheduler=e}))})),i._indexedDBSetting={isOpen:!1,clear:function(){i._indexedDBScheduler.clear(i.tablename)},cache:[]}}function B$2(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(f$6.prototype,{url:{get:function(){return this._url}},mapStyle:{get:function(){return this._mapStyle}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}}}),f$6.prototype.requestImage=function(e,t,i,n){var r=D$2(this,e,t,i),o=B$2(e,t,i);if(n.quadKey=o,!0===this._indexedDBSetting.isOpen&&n.cacheEnable){if(e$2e(this._indexedDBScheduler)){var a=this._indexedDBScheduler.getElementFromDB(this.tablename,o);return e$2e(a)?o$1l(a,(function(e){return e$2e(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$i.loadImage(this,r)}return e$i.loadImage(this,r)}return e$i.loadImage(this,r)};var L$6=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function D$2(e,t,i,n){"900913"==e._epsgCode&&(n-=1);var r=e._tileMatrixLabels,o=e$2e(r)?r[n]:n.toString(),a=e._subdomains,s=e._url.replace("[subdomain]",a[(t+i+n)%a.length]),l=new h$16(s),u=m$1c(u$Z(l.query,""));(u=p$19(L$6,u)).tilematrix=o,u.layer=e._layer,u.style=e._style,u.tilerow=i,u.tilecol=t,u.tilematrixset=e._tileMatrixSetID,u.format=e._format,l.query=m$1d(u),s=l.toString();var c=e._proxy;return e$2e(c)&&(s=c.getURL(s)),e$2e(e._token)&&(s+="&tk="+e._token),s}f$6.prototype.pickFeatures=function(){};var _$4={};_$4[t$7.IMG_W]="https://[subdomain].tianditu.gov.cn/img_w/wmts",_$4[t$7.IMG_C]="https://[subdomain].tianditu.gov.cn/img_c/wmts",_$4[t$7.CIA_W]="https://[subdomain].tianditu.gov.cn/cia_w/wmts",_$4[t$7.CIA_C]="https://[subdomain].tianditu.gov.cn/cia_c/wmts",_$4[t$7.VEC_W]="https://[subdomain].tianditu.gov.cn/vec_w/wmts",_$4[t$7.VEC_C]="https://[subdomain].tianditu.gov.cn/vec_c/wmts",_$4[t$7.TER_W]="https://[subdomain].tianditu.gov.cn/ter_w/wmts",_$4[t$7.TER_C]="https://[subdomain].tianditu.gov.cn/ter_c/wmts",_$4[t$7.CVA_W]="https://[subdomain].tianditu.gov.cn/cva_w/wmts",_$4[t$7.CVA_C]="https://[subdomain].tianditu.gov.cn/cva_c/wmts",_$4[t$7.CTA_W]="https://[subdomain].tianditu.gov.cn/cta_w/wmts",_$4[t$7.CTA_C]="https://[subdomain].tianditu.gov.cn/cta_c/wmts",_$4[t$7.EIA_W]="https://[subdomain].tianditu.gov.cn/eia_w/wmts",_$4[t$7.EIA_C]="https://[subdomain].tianditu.gov.cn/eia_c/wmts",_$4[t$7.EVA_W]="https://[subdomain].tianditu.gov.cn/eva_w/wmts",_$4[t$7.EVA_C]="https://[subdomain].tianditu.gov.cn/eva_c/wmts",_$4[t$7.IBO_W]="https://[subdomain].tianditu.gov.cn/ibo_w/wmts",_$4[t$7.IBO_C]="https://[subdomain].tianditu.gov.cn/ibo_c/wmts";var r$c={};r$c[t$7.IMG_W]="img",r$c[t$7.IMG_C]="img",r$c[t$7.IBO_W]="ibo",r$c[t$7.IBO_C]="ibo",r$c[t$7.CIA_W]="cia",r$c[t$7.CIA_C]="cia",r$c[t$7.VEC_W]="vec",r$c[t$7.VEC_C]="vec",r$c[t$7.TER_W]="ter",r$c[t$7.TER_C]="ter",r$c[t$7.CVA_W]="cva",r$c[t$7.CVA_C]="cva",r$c[t$7.CTA_W]="cta",r$c[t$7.CTA_C]="cta",r$c[t$7.EIA_W]="eia",r$c[t$7.EIA_C]="eia",r$c[t$7.EVA_W]="eva",r$c[t$7.EVA_C]="eva";var a$1={};a$1[t$7.IMG_W]="w",a$1[t$7.IMG_C]="c",a$1[t$7.IBO_W]="w",a$1[t$7.IBO_C]="c",a$1[t$7.CIA_W]="w",a$1[t$7.CIA_C]="c",a$1[t$7.VEC_W]="w",a$1[t$7.VEC_C]="c",a$1[t$7.TER_W]="w",a$1[t$7.TER_C]="c",a$1[t$7.CVA_W]="w",a$1[t$7.CVA_C]="c",a$1[t$7.CTA_W]="w",a$1[t$7.CTA_C]="c",a$1[t$7.EIA_W]="w",a$1[t$7.EIA_C]="c",a$1[t$7.EVA_W]="w",a$1[t$7.EVA_C]="c";var n$5={};n$5[t$7.IMG_W]="tiles",n$5[t$7.IMG_C]="tiles",n$5[t$7.IBO_W]="tiles",n$5[t$7.IBO_C]="tiles",n$5[t$7.CIA_W]="tiles",n$5[t$7.CIA_C]="tiles",n$5[t$7.VEC_W]="tiles",n$5[t$7.VEC_C]="tiles",n$5[t$7.TER_W]="tiles",n$5[t$7.TER_C]="tiles",n$5[t$7.CVA_W]="tiles",n$5[t$7.CVA_C]="tiles",n$5[t$7.CTA_W]="tiles",n$5[t$7.CTA_C]="tiles",n$5[t$7.EIA_W]="tiles",n$5[t$7.EIA_C]="tiles",n$5[t$7.EVA_W]="tiles",n$5[t$7.EVA_C]="tiles";var s$6={};s$6[t$7.IMG_W]="900913",s$6[t$7.IMG_C]="4490",s$6[t$7.IBO_W]="900913",s$6[t$7.IBO_C]="4490",s$6[t$7.CIA_W]="900913",s$6[t$7.CIA_C]="4490",s$6[t$7.VEC_W]="900913",s$6[t$7.VEC_C]="4490",s$6[t$7.TER_W]="900913",s$6[t$7.TER_C]="4490",s$6[t$7.CVA_W]="900913",s$6[t$7.CVA_C]="4490",s$6[t$7.CTA_W]="900913",s$6[t$7.CTA_C]="4490",s$6[t$7.EIA_W]="900913",s$6[t$7.EIA_C]="4490",s$6[t$7.EVA_W]="900913",s$6[t$7.EVA_C]="4490";var i$7={};function d$8(e){if(!e$2e(e)||!e$2e(e.token))throw new t$15("options.token is required.");if(!e$2e(e)||!e$2e(e.url))throw new t$15("options.url is required.");this._url=e.url+"&tk="+e.token,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():e$2e(this._subdomains)&&this._subdomains.length>0?this._subdomains=[this._subdomains]:this._subdomains=["t0","t1","t2","t3","t4","t5","t6","t7"],this._dataType=u$Z(e.dataType,"int"),this._errorEvent=new o$1h,this._ready=!0,this._readyPromise=o$1l.resolve(!0),this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0};var t=e.credit;"string"==typeof t&&(t=new r$U(t)),this._credit=t;var i=u$Z(e.ellipsoid,t$12.WGS84);this._tilingScheme=new g$15({ellipsoid:i}),this._heightmapWidth=64,this._heightmapHeight=64,this._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(i,Math.min(this._heightmapWidth,this._heightmapHeight),this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._minimumLevel=u$Z(e.minimumLevel,5),this._maximumLevel=u$Z(e.maximumLevel,25),this._hasWaterMask=!1,this._hasVertexNormals=!1}function A$5(e,t){return(t=e$2e(t)?t:new r$1c({url:e})).requestFunction=function(){var t=new XMLHttpRequest;t.open("get",e,!0),t.responseType="arraybuffer",t.async=!1,t.send(null);var i=o$1l.defer();return t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status&&e$2e(t.response)){for(var e=new DataView(t.response),n=e.byteLength,r=new Uint8Array(n),o=0;o<n;o++)r[o]=e.getUint8(o,!0);if(n>1e3){var a=nt$b.inflate(r).buffer;e$2e(a)?i.resolve(new Uint8Array(a)):i.reject(!1)}else i.reject(!1)}else(t.status>=400||0===t.status)&&i.reject(!1)},i.promise},r$1b.request(t)}function o$8(){}function n$4(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._tilingScheme=e$2e(e.tilingScheme)?e.tilingScheme:new g$15({ellipsoid:e.ellipsoid}),this._color=u$Z(e.color,e$1X.YELLOW),this._errorEvent=new o$1h,this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._readyPromise=o$1l.resolve(!0)}function r$b(e){t$15.throwInstantiationError()}i$7[t$7.IMG_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.IMG_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.IBO_W]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.IBO_C]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.CIA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.CIA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.VEC_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.VEC_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.TER_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],i$7[t$7.TER_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],i$7[t$7.CVA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.CVA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.CTA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.CTA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.EIA_W]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.EIA_C]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.EVA_W]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.EVA_C]=["1","2","3","4","5","6","7","8","9","10"],Object.defineProperties(d$8.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),d$8.prototype.requestTileGeometry=function(e,t,i,n){if(i<this._maximumLevel&&i>=this._minimumLevel){var r=this._url.replace("{s}",this._subdomains[(e+t+i)%this._subdomains.length]),o=-1===r.indexOf("?")?"?":"&",a=A$5(r+o+"x="+e+"&y="+t+"&l="+(i+1));if(!e$2e(a))return;var s=this;return o$1l(a,(function(e){var t=s.transformBuffer(e);return e$2e(t)?new T$L({buffer:t,width:s._heightmapWidth,height:s._heightmapHeight,childTileMask:void 0,structure:s._terrainDataStructure}):new T$L({buffer:s.getvHeightBuffer(),width:s._heightmapWidth,height:s._heightmapHeight,childTileMask:void 0,structure:s._terrainDataStructure})}))}if(i<this._minimumLevel)return new T$L({buffer:this.getvHeightBuffer(),width:this._heightmapWidth,height:this._heightmapHeight,childTileMask:void 0,structure:this._terrainDataStructure})},d$8.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},d$8.prototype.getTileDataAvailable=function(e,t,i){return i<25},d$8.prototype.getvHeightBuffer=function(){var e=this._vHeightBuffer;if(!e$2e(e)){e=this._vHeightBuffer=new Uint8ClampedArray(this._heightmapWidth*this._heightmapHeight*4);for(var t=this._heightmapWidth*this._heightmapHeight*4,i=0;i<t;)e[i++]=15,e[i++]=66,e[i++]=64,e[i++]=255}return e},d$8.prototype.transformBuffer=function(e){var t=2;"int"===this._dataType?t=2:"float"===this._dataType&&(t=4);var i,n,r,o,a,s,l,u=new ArrayBuffer(t),c=new DataView(u),h=this._heightmapWidth,d=this._heightmapHeight,f=new Uint8Array(h*d*4);for(i=0;i<d;i++)for(n=0;n<h;n++){r=parseInt(149*i/(d-1)),o=parseInt(149*n/(h-1)),4===t?(a=t*(150*r+o),c.setInt8(0,e[a]),c.setInt8(0,e[a+1]),c.setInt8(0,e[a+2]),c.setInt8(0,e[a+3]),l=c.getFloat32(0,!0)):l=e[a=t*(150*r+o)]+256*e[a+1],(l>1e4||l<-2e3)&&(l=0);var p=(l+1e3)/.001;f[s=4*(i*h+n)]=p/65536,f[s+1]=(p-256*f[s]*256)/256,f[s+2]=p-256*f[s]*256-256*f[s+1],f[s+3]=256}return f},o$8.prototype.boundingVolume=void 0,o$8.prototype.boundingSphere=void 0,o$8.prototype.distanceToCamera=function(e){t$15.throwInstantiationError()},o$8.prototype.intersectPlane=function(e){t$15.throwInstantiationError()},o$8.prototype.createDebugVolume=function(e){t$15.throwInstantiationError()},Object.defineProperties(n$4.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),n$4.prototype.getTileCredits=function(e,t,i){},n$4.prototype.requestImage=function(e,t,i,n){var r=document.createElement("canvas");r.width=256,r.height=256;var o=r.getContext("2d"),a=this._color.toCssColorString();return o.strokeStyle=a,o.lineWidth=2,o.strokeRect(1,1,255,255),o.font="bold 25px Arial",o.textAlign="center",o.fillStyle=a,o.fillText("L: "+i,124,86),o.fillText("X: "+e,124,136),o.fillText("Y: "+t,124,186),r},n$4.prototype.pickFeatures=function(e,t,i,n,r){},r$b.prototype.isReady=t$15.throwInstantiationError,r$b.prototype.shouldDiscardImage=t$15.throwInstantiationError;var e={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},TileState=Object.freeze(e);function g$7(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.typeOf.object("options.clock",e.clock),o$1q.typeOf.object("options.intervals",e.intervals),this.show=u$Z(e.show,!0),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this.shadows=u$Z(e.shadows,W$X.ENABLED),this.maximumMemoryUsage=u$Z(e.maximumMemoryUsage,256),this.shading=new o$Z(e.shading),this.style=e.style,this.frameFailed=new o$1h,this.frameChanged=new o$1h,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new m$W,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._readyPromise=o$1l.defer(),this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=d$1s(new Array(5),0),this._runningAverage=0}function W$4(e){return"uniform vec4 czm_pickColor;\n"+e}function X$3(e){return function(t){return p$19(t,{czm_pickColor:function(){return e._pickId.color}})}}function Z$4(){return"czm_pickColor"}Object.defineProperties(g$7.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){h$L.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(e$2e(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}},readyPromise:{get:function(){return this._readyPromise.promise}}}),g$7.prototype.makeStyleDirty=function(){this._styleDirty=!0},g$7.prototype._getAverageLoadTime=function(){return 0===this._runningLength?.05:this._runningAverage};var $$2=new a$15;function k$4(e){var t=e._clock,i=t.canAnimate&&t.shouldAnimate,n=t.multiplier;return i?n:0}function p$2(e,t){return e._intervals.indexOf(t.start)}function ee$2(e,t){var i=e._intervals,n=e._clock,r=k$4(e);if(0!==r){var o=e._getAverageLoadTime(),a=a$15.addSeconds(n.currentTime,o*r,$$2),s=i.indexOf(a);return s===p$2(e,t)&&(r>=0?++s:--s),i.get(s)}}function ie$1(e){var t=e._intervals,i=e._clock.currentTime,n=t.indexOf(i);return t.get(n)}function ne$2(e,t,i){var n=k$4(e),r=p$2(e,t),o=p$2(e,i);return n>=0?r>=o:r<=o}function re$2(e,t){return function(i){var n=e$2e(i.message)?i.message:i.toString();e.frameFailed.numberOfListeners>0?e.frameFailed.raiseEvent({uri:t,message:n}):(console.log("A frame failed to load: "+t),console.log("Error: "+n))}}function te$2(e,t,i){var n=p$2(e,t),r=e._frames,o=r[n];if(!e$2e(o)){var a=t.data.transform,s=e$2e(a)?p$1d.fromArray(a):void 0,l=t.data.uri;o={pointCloud:void 0,transform:s,timestamp:Et$c(),sequential:!0,ready:!1,touchedFrameNumber:i.frameNumber},r[n]=o,t$10.fetchArrayBuffer({url:l}).then((function(t){return o.pointCloud=new ie$g({arrayBuffer:t,cull:!0,fragmentShaderLoaded:W$4,uniformMapLoaded:X$3(e),pickIdLoaded:Z$4}),o.pointCloud.readyPromise})).otherwise(re$2(e,l))}return o}function ae$1(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function se$1(e,t,i,n){t.touchedFrameNumber<n.frameNumber-1&&(t.sequential=!1);var r=t.pointCloud;if(e$2e(r)&&!t.ready){var o=n.commandList,a=o.length;if(A$4(e,t,i,n),r.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=r.geometryByteLength,o.length=a,t.sequential))ae$1(e,(Et$c()-t.timestamp)/1e3)}t.touchedFrameNumber=n.frameNumber}var oe$2=new p$1d;function le$2(e,t){var i=e.shading;return e$2e(i)&&e$2e(i.baseResolution)?i.baseResolution:e$2e(t.boundingSphere)?e$2d.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function ue$2(e){var t=e.shading;return e$2e(t)&&e$2e(t.maximumAttenuation)?t.maximumAttenuation:10}var de$1=new o$Z;function A$4(e,t,i,n){var r=u$Z(e.shading,de$1),o=t.pointCloud,a=u$Z(t.transform,p$1d.IDENTITY);o.modelMatrix=p$1d.multiplyTransformation(e.modelMatrix,a,oe$2),o.style=e.style,o.time=i.timeSinceLoad,o.shadows=e.shadows,o.clippingPlanes=e._clippingPlanes,o.isClipped=i.isClipped,o.attenuation=r.attenuation,o.backFaceCulling=r.backFaceCulling,o.normalShading=r.normalShading,o.geometricError=le$2(e,o),o.geometricErrorScale=r.geometricErrorScale,o.maximumAttenuation=ue$2(e),o.update(n),t.touchedFrameNumber=n.frameNumber}function L$5(e,t,i,n){se$1(e,te$2(e,t,n),i,n)}function me$2(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function T$4(e,t){for(var i=e._frames,n=i.length,r=0;r<n;++r){var o=i[r];if(e$2e(o)&&(!e$2e(t)||t(o))){var a=o.pointCloud;o.ready&&(e._totalMemoryUsageInBytes-=a.geometryByteLength),e$2e(a)&&a.destroy(),o===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),i[r]=void 0}}}function ce$3(e,t){var i=p$2(e,t),n=e._frames[i];if(e$2e(n)&&n.ready)return n}function E$3(e,t,i,n,r){return!!e$2e(i)&&(!!i.ready||(L$5(e,t,n,r),i.ready))}function fe$1(e,t,i,n,r){var o,a,s=e._intervals,l=e._frames,u=p$2(e,i),c=p$2(e,t);if(u>=c){for(o=u;o>=c;--o)if(E$3(e,a=s.get(o),l[o],n,r))return a}else for(o=u;o<=c;++o)if(E$3(e,a=s.get(o),l[o],n,r))return a;return t}function ge$2(e,t,i){for(var n=e._frames,r=n.length,o=0;o<r;++o){var a=n[o];e$2e(a)&&e$2e(a.pointCloud)&&(a.pointCloud.clippingPlanesDirty=t,a.pointCloud.styleDirty=i)}}var y$6={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};function t$6(e,t){this._show=u$Z(t,!0),this._command=new i$$({owner:this}),this._radius=6378137-e,this._ellipsoid=t$12.fromCartesian3(new o$1p(this._radius,this._radius,this._radius)),this._baseColor=new e$1X(0,0,0,1)}g$7.prototype.update=function(e){if(e.mode!==C$14.MORPHING&&this.show){e$2e(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),e$2e(this._loadTimestamp)||(this._loadTimestamp=a$15.clone(e.time));var t=Math.max(1e3*a$15.secondsDifference(e.time,this._loadTimestamp),0),i=this._clippingPlanes,n=0,r=!1,o=e$2e(i)&&i.enabled;o&&(i.update(e),n=i.clippingPlanesState),this._clippingPlanesState!==n&&(this._clippingPlanesState=n,r=!0);var a=this._styleDirty;this._styleDirty=!1,(r||a)&&ge$2(this,r,a),y$6.timeSinceLoad=t,y$6.isClipped=o;var s=this.shading,l=this._pointCloudEyeDomeLighting,u=e.commandList,c=u.length,h=this._previousInterval,d=this._nextInterval,f=ie$1(this);if(e$2e(f)){var p=!1,_=k$4(this),m=0===_;_!==this._clockMultiplier&&(p=!0,this._clockMultiplier=_),(!e$2e(h)||m)&&(h=f),(!e$2e(d)||p||ne$2(this,f,d))&&(d=ee$2(this,f));var g=ce$3(this,h=fe$1(this,h,f,y$6,e));e$2e(g)||(L$5(this,h,y$6,e),g=this._lastRenderedFrame),e$2e(g)&&A$4(this,g,y$6,e),e$2e(d)&&L$5(this,d,y$6,e);var x=this;e$2e(g)&&!e$2e(this._lastRenderedFrame)&&e.afterRender.push((function(){x._readyPromise.resolve(x)})),e$2e(g)&&g!==this._lastRenderedFrame&&x.frameChanged.numberOfListeners>0&&e.afterRender.push((function(){x.frameChanged.raiseEvent(x)})),this._previousInterval=h,this._nextInterval=d,this._lastRenderedFrame=g,this._totalMemoryUsageInBytes>1024*this.maximumMemoryUsage*1024&&T$4(this,me$2(e));var y=u.length-c;e$2e(s)&&s.attenuation&&s.eyeDomeLighting&&y>0&&l.update(e,c,s)}}},g$7.prototype.isDestroyed=function(){return!1},g$7.prototype.destroy=function(){return T$4(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),i$11(this)},Object.defineProperties(t$6.prototype,{show:{get:function(){return this._show},set:function(e){o$1q.defined("UnderGlobe show",e),this._show=e}},radius:{get:function(){return this._radius},set:function(e){if(o$1q.defined("UnderGlobe radius",e),this._radius!==e){var t=this._command;e$2e(t)&&(t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),this._ellipsoid=t$12.fromCartesian3(new o$1p(this._radius,this._radius,this._radius))}this._radius=e}},ellipsoid:{get:function(){return this._ellipsoid}},baseColor:{get:function(){return this._baseColor},set:function(e){o$1q.defined("UnderGlobe baseColor",e),this._baseColor=e}}});var O$3="attribute vec4 position;\nvoid main(void)\n{\ngl_Position = czm_modelViewProjection * vec4(position.xyz - czm_relativeOrigin, 1.0);\n}",U$4="uniform vec4 uBaseColor;\nvoid main (void)\n{\ngl_FragColor = uBaseColor;\n}";t$6.prototype.update=function(e){var t=e.camera.positionCartographic.height;if(this._show&&e.passes.render&&!(t>1e4)){var i=e.mode;if(i===C$14.SCENE3D||i===C$14.MORPHING){var n=this._command,r=this;if(!e$2e(n.vertexArray)){var o=e.context,a=b$O.createGeometry(new b$O({radii:new o$1p(this._radius,this._radius,this._radius),slicePartitions:256,stackPartitions:256,vertexFormat:n$13.POSITION_ONLY})),s=k$14.createAttributeLocations(a);n.vertexArray=c$13.fromGeometry({context:o,geometry:a,attributeLocations:s,bufferUsage:A$18.STATIC_DRAW}),n.renderState=d$1m.fromCache({cull:{enabled:!0}}),n.uniformMap={uBaseColor:function(){return r._baseColor}};var l=new s$V({sources:[O$3]}),u=new s$V({sources:[U$4]});n.shaderProgram=r$14.fromCache({context:o,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:s})}return n}}},t$6.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),i$11(this)};var _$3="\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n czm_materialInput materialInput;\n \n materialInput.s = v_textureCoordinates.s;\n materialInput.st = v_textureCoordinates;\n materialInput.str = vec3(v_textureCoordinates, 0.0);\n materialInput.normalEC = vec3(0.0, 0.0, -1.0);\n \n czm_material material = czm_getMaterial(materialInput);\n\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n}\n";function o$7(e,t){this.show=!0,e$2e(e)||(e=new f$1a),this.rectangle=f$1a.clone(e),e$2e(t)||(t=r$Y.fromType(r$Y.ColorType,{color:new e$1X(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}function A$3(e){this._url=e.url,this._hypsometricTexture=void 0,this.hypsometricSetting=e.hypsometricSetting,this._ready=!1,this._volBounds=void 0,this._volImageBuffer=void 0,this._volTexture=void 0,this._dataBuffer=void 0,this.loadData(this._url)}function pt$1(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a=r[o],s=4*o;if(a<0||a>1)e[s+0]=255,e[s+1]=255,e[s+2]=255,e[s+3]=255;else{a=a*(t._ceiling-t._floor)+t._floor,i&&(a=Math.round(a));var l=t._dictColorTable.getColor(a);e[s+0]=255*l.red,e[s+1]=255*l.green,e[s+2]=255*l.blue,e[s+3]=255*l.alpha}}return new Uint8Array(e.buffer,0,e.length)}function gt$1(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function ut$2(e){for(var t=e.length/4,i=new Float32Array(e.buffer,e.byteOffset,t),n=0;n<i.length;n++){var r,o,a,s,l=i[n],u=4*n,c=new e$2c(0,0,0,0);if(l>=0&&l<=1){l<e$2d.EPSILON9?l=e$2d.EPSILON9:1-l<e$2d.EPSILON9&&(l=1-e$2d.EPSILON9);var h=gt$1(l);c.x=h.x,c.y=h.y,c.z=h.z,c.w=1}r=255*c.x,o=255*c.y,a=255*c.z,s=255*c.w,e[u+0]=parseInt(r),e[u+1]=parseInt(o),e[u+2]=parseInt(a),e[u+3]=parseInt(s)}return new Uint8Array(e.buffer,0,e.length)}o$7.prototype.update=function(e){if(this.show){if(!e$2e(this.material))throw new t$15("this.material must be defined.");if(!e$2e(this.rectangle))throw new t$15("this.rectangle must be defined.");var t=this._rs;if((!e$2e(t)||!f$1a.equals(t.viewport,this.rectangle))&&(this._rs=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render){var i=e.context;if(this._material!==this.material||!e$2e(this._overlayCommand)){this._material=this.material,e$2e(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();var n=new s$V({sources:[this._material.shaderSource,_$3]});this._overlayCommand=i.createViewportQuadCommand(n,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Le$q.OVERLAY}this._material.update(i),this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}}},o$7.prototype.isDestroyed=function(){return!1},o$7.prototype.destroy=function(){return e$2e(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),i$11(this)},Object.defineProperties(A$3.prototype,{hypsometricSetting:{get:function(){return this._hypsometricSetting},set:function(e){this._hypsometricSetting=e}}});var d$7=-9999,ct$2=new DOMParser;function _t$1(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t)return a}}A$3.prototype.loadData=function(e){var t=this;t._ready=!1;var i=u$Q(e+"/config");!e$2e(i)||i.then((function(i){var n=_t$1((i=ct$2.parseFromString(i,"application/xml")).childNodes[0],"sml:Bounds").textContent.split("\n"),r=Number(n[1]),o=Number(n[2]),a=Number(n[3]),s=Number(n[4]),l='/data/index/1/1.stream?bounds={"leftBottom":{"x":xLeft,"y":yBottom},"rightTop":{"x":xRight,"y":yTop}}';l=l.replace("xLeft",r).replace("yBottom",s).replace("xRight",a).replace("yTop",o);var u=o$10(e+l);!e$2e(u)||u.then((function(e){var i=new Uint8Array(e,8),n=nt$b.inflate(i).buffer,r=new Float64Array(n,0,1),o=new Uint32Array(n,48,1);if(0===r[0]||3200===o[0]||3201===o[0]){var a=0;0===r[0]&&(a=8);var s=new Float64Array(n,a,6),l={left:s[0],top:s[1],right:s[2],bottom:s[3],minHeight:s[4]<s[5]?s[4]:s[5],maxHeight:s[4]>s[5]?s[4]:s[5]},u=new Uint32Array(n,48+a,7),c=u[0],h=u[1],d=u[2],f=u[3],p=u[4],_=u[5],m=u[6],g=new Uint8Array(n,76+a,f*f*4),x=new Float32Array(n,76+a,f*f),y=!1;Math.abs(t._hypsometricSetting._ceiling-Math.round(t._hypsometricSetting._ceiling))<e$2d.EPSILON6&&Math.abs(t._hypsometricSetting._floor-Math.round(t._hypsometricSetting._floor))<e$2d.EPSILON6&&(y=!0),t._dataBuffer=new Float32Array(p*_*m);for(var v=0;v<m;v++)for(var $=Math.floor(v/h),b=v%h,T=0;T<_;T++)for(var C=d*$+T,S=0;S<p;S++){var w=C*f+(d*b+S);if(x[w]<0||x[w]>1)t._dataBuffer[v*_*p+T*p+S]=d$7;else{var E=x[w]*(t._hypsometricSetting._ceiling-t._hypsometricSetting._floor)+t._hypsometricSetting._floor;y&&(E=Math.round(E)),t._dataBuffer[v*_*p+T*p+S]=E}}t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST?pt$1(g,t.hypsometricSetting,y):ut$2(g);var P={nFormat:c,nSideBlockCount:h,nBlockLength:d,nLength:f,nWidth:p,nHeight:_,nDepth:m,imageArray:g};t._volBounds=l,t._volImageBuffer=P,t._ready=!0}e=null})).otherwise((function(e){}))})).otherwise((function(e){}))},A$3.prototype.loadTexture=function(e){if(!e$2e(this._volTexture)){var t=tt$i.NEAREST,i=rt$k.NEAREST;if(this._hypsometricSetting.filterMode!==k$S.FilterMode.NEAREST)t=tt$i.LINEAR,i=rt$k.LINEAR;this._volTexture=new t$U({context:e,width:this._volImageBuffer.nLength,height:this._volImageBuffer.nLength,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({minificationFilter:t,magnificationFilter:i})}),this._volTexture.copyFrom({width:this._volImageBuffer.nLength,height:this._volImageBuffer.nLength,arrayBufferView:this._volImageBuffer.imageArray}),this._volImageBuffer.imageArray=null}e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:e,width:1024,height:64,pixelFormat:V$12.RGBA,flipY:!1}),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer}))},A$3.prototype.getPixel=function(e,t,i){var n=i*this._volImageBuffer.nWidth*this._volImageBuffer.nHeight+t*this._volImageBuffer.nWidth+e;return this._dataBuffer[n]},A$3.prototype.getValue=function(e){var t=SuperMap3D.Cartographic.fromCartesian(e),i=SuperMap3D.Math.toDegrees(t.longitude),n=SuperMap3D.Math.toDegrees(t.latitude),r=t.height,o=(i-this._volBounds.left)/(this._volBounds.right-this._volBounds.left);if(!(o>1||o<0)){var a=(n-this._volBounds.bottom)/(this._volBounds.top-this._volBounds.bottom);if(!(a>1||a<0)){var s=(r-this._volBounds.minHeight)/(this._volBounds.maxHeight-this._volBounds.minHeight);if(!(s>1||s<0)){var l=o*this._volImageBuffer.nWidth-.5,u=a*this._volImageBuffer.nHeight-.5,c=s*(this._volImageBuffer.nDepth-1),h=Math.floor(l),d=Math.ceil(l),f=Math.floor(u),p=Math.ceil(u),_=Math.floor(c),m=Math.ceil(c);if(h=e$2d.clamp(h,0,this._volImageBuffer.nWidth-1),d=e$2d.clamp(d,0,this._volImageBuffer.nWidth-1),f=e$2d.clamp(f,0,this._volImageBuffer.nHeight-1),p=e$2d.clamp(p,0,this._volImageBuffer.nHeight-1),_=e$2d.clamp(_,0,this._volImageBuffer.nDepth-1),m=e$2d.clamp(m,0,this._volImageBuffer.nDepth-1),this._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST)return l=l-h>.5?d:h,u=u-f>.5?p:f,c=c-_>.5?m:_,M=this.getPixel(l,u,c);var g=this.getPixel(h,f,_),x=this.getPixel(d,f,_);g==d$7&&(g=0),x==d$7&&(x=0);var y=g;h!=d&&(y=x*(l-h)+g*(d-l));var v=this.getPixel(h,p,_),$=this.getPixel(d,p,_);v==d$7&&(v=0),$==d$7&&($=0);var b=v;h!=d&&(b=$*(l-h)+v*(d-l));var T=b;if(f!=p)T=b*(u-f)+y*(p-u);var C=this.getPixel(h,f,m),S=this.getPixel(d,f,m);C==d$7&&(C=0),S==d$7&&(S=0);var w=C;h!=d&&(w=S*(l-h)+C*(d-l));var E=this.getPixel(h,p,m),P=this.getPixel(d,p,m);E==d$7&&(E=0),P==d$7&&(P=0);var A=E;h!=d&&(A=P*(l-h)+E*(d-l));var L=A;if(f!=p)L=A*(u-f)+w*(p-u);var M=L;if(_!=m)M=L*(c-_)+T*(m-c);return M}}}};var ve$1="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nuniform vec4 u_tileRangeAndImageSize;\nattribute vec4 volTexCoord;\nvarying vec4 v_volTexCoord;\nvarying vec2 v_textureCoordinates;\n\nfloat getGlobeDepth(vec4 positionEC){\n vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n if (globeDepth == 0.0){\n return 0.0; // not on the globe\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction)\n{\n vec2 halfSize = imageSize * scale * czm_resolutionScale * 0.5;\n halfSize *= ((direction * 2.0) - 1.0);\n positionEC.xy += halfSize;\n return positionEC;\n}\n\nvoid main()\n{\n vec3 positionHigh = positionHighAndScale.xyz;\n vec3 positionLow = positionLowAndRotation.xyz;\n float scale = positionHighAndScale.w;\n vec2 textureCoordinates = direction;\n vec2 imageSize = u_tileRangeAndImageSize.zw;\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n float depthsilon = 10.0;\n float globeDepth = getGlobeDepth(positionEC);\n if (globeDepth != 0.0 && positionEC.z + depthsilon < globeDepth)\n {\n positionEC.xyz = vec3(0.0);\n }\n else{\n positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction);\n }\n gl_Position = czm_projection * positionEC;\n v_textureCoordinates = textureCoordinates;\n#ifdef LOG_DEPTH\n czm_vertexLogDepth();\n#endif\n v_volTexCoord = volTexCoord;\n vec2 halfSize = imageSize * scale * czm_resolutionScale * 0.5 / u_tileRangeAndImageSize.xy;\n halfSize *= ((direction * 2.0) - 1.0);\n v_volTexCoord.xy += halfSize;\n}",pe$1="#extension GL_EXT_draw_buffers : enable\nuniform sampler2D u_atlas;\nuniform vec4 u_voxelGridLayerColor;\nuniform sampler2D u_colorTable;\nuniform vec4 u_minMaxValueAndFiltration;\nuniform vec3 u_maxVisibleTextureCoord;\nuniform vec3 u_minVisibleTextureCoord;\nvarying vec4 v_volTexCoord;\nvarying vec2 v_textureCoordinates;\nbool getSampleValueForVolume(float volumeValue, out vec4 colorFromColorTable)\n{\n float minValue = u_minMaxValueAndFiltration.x;\n float maxValue = u_minMaxValueAndFiltration.y;\n float minFiltration = u_minMaxValueAndFiltration.z;\n float maxFiltration = u_minMaxValueAndFiltration.w;\n colorFromColorTable = vec4(1.0);\n float realValue = minValue + volumeValue * (maxValue - minValue);\n if(realValue > maxFiltration || realValue < minFiltration)\n {\n return false;\n }\n#ifdef HAS_COLORTABLE\n colorFromColorTable = texture2D(u_colorTable, vec2(0.0, 1.0 - realValue)).rgba;\n#endif\n return true;\n}\nvoid main()\n{\n vec4 color = texture2D(u_atlas, v_textureCoordinates);\n color = czm_gammaCorrect(color);\n if (color.a < 0.005)\n {\n discard;\n }\n#ifdef TEXTURECOORD_CLIP\n if(v_volTexCoord.x > u_maxVisibleTextureCoord.x || v_volTexCoord.x < u_minVisibleTextureCoord.x\n\t|| v_volTexCoord.y > u_maxVisibleTextureCoord.y || v_volTexCoord.y < u_minVisibleTextureCoord.y\n\t|| v_volTexCoord.z > u_maxVisibleTextureCoord.z || v_volTexCoord.z < u_minVisibleTextureCoord.z)\n\t{\n\t\tdiscard;\n\t}\n#endif\n vec4 volumeColor = vec4(1.0);\n float noValue;\n float volumeValue = czm_getVolumeValue(v_volTexCoord.xyz, noValue);\n vec4 colorFromColorTable = vec4(1.0);\n if(!getSampleValueForVolume(volumeValue, colorFromColorTable))\n {\n discard;\n }\n #ifdef HAS_COLORTABLE\n volumeColor = colorFromColorTable;\n #else\n float power = volumeValue * 40.0 - 30.0;\n vec3 hdrColor = u_voxelGridLayerColor.rgb * pow(2.0, power);\n volumeColor.rgb = hdrColor;\n #endif\n color.rgb *= volumeColor.rgb;\n czm_writeLogDepth();\n#ifdef OIT\n vec3 Ci = color.rgb * color.a;\n float ai = color.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n#else\n gl_FragColor = color;\n#endif\n}",me$1=n$J.POSITION_INDEX,ee$1=n$J.NUMBER_OF_PROPERTIES,m$6,Ae$2={positionHighAndScale:0,positionLowAndRotation:1,volTexCoord:3},ge$1={direction:0,positionHighAndScale:1,positionLowAndRotation:2,volTexCoord:3},z$3;function c$8(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(ee$1),this._maxScale=1,this._allSizedInMeters=!0,this._baseVolume=new i$1d,this._baseVolumeWC=new i$1d,this._baseVolume2D=new i$1d,this._boundingVolume=new i$1d,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.volumeShaderPredefine=u$Z(e.volumeShaderPredefine,[]),this._volumeShaderPredefine=void 0,this._mode=C$14.SCENE3D,this._highlightColor=e$1X.clone(e$1X.WHITE);var t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture}};var i=this._scene;e$2e(i)&&e$2e(i.terrainProviderChanged)&&(this._removeCallbackFunc=i.terrainProviderChanged.addEventListener((function(){for(var e=this._billboards,t=e.length,i=0;i<t;++i)e[i]._updateClamping()}),this)),this.transparent=u$Z(e.OIT,!0),this._transparent=void 0,this._postRender=e.postRender}function te$1(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function W$3(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;for(var t=[],i=e._billboards,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._billboards=t}}function ye(e){var t=e.cache.billboardCollection_indexBufferBatched;if(e$2e(t))return t;for(var i=new Uint16Array(98298),n=0,r=0;n<98298;n+=6,r+=4)i[n]=r,i[n+1]=r+1,i[n+2]=r+2,i[n+3]=r+0,i[n+4]=r+2,i[n+5]=r+3;return(t=t$X.createIndexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=t,t}function Te$1(e){var t=e.cache.billboardCollection_indexBufferInstanced;return e$2e(t)||((t=t$X.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function Ie$1(e){var t=e.cache.billboardCollection_vertexBufferInstanced;return e$2e(t)||((t=t$X.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:A$18.STATIC_DRAW})).vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}function Se$1(e,t,i,n){var r=[{index:m$6.positionHighAndScale,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:A$18.STATIC_DRAW},{index:m$6.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:A$18.STATIC_DRAW},{index:m$6.volTexCoord,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:A$18.STATIC_DRAW}];return i&&r.push({index:m$6.direction,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,vertexBuffer:Ie$1(e)}),e$2e(n)&&r.push({index:m$6.a_batchId,componentsPerAttribute:1,componentDatatyps:S$14.FLOAT,bufferUsage:A$18.STATIC_DRAW}),new v$F(e,r,i?t:4*t,i)}Object.defineProperties(c$8.prototype,{length:{get:function(){return W$3(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}}}),c$8.prototype.add=function(e){var t=new n$J(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t},c$8.prototype.remove=function(e){return!!this.contains(e)&&(this._billboards[e._index]=null,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},c$8.prototype.removeAll=function(){te$1(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},c$8.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},c$8.prototype.contains=function(e){return e$2e(e)&&e._billboardCollection===this},c$8.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return W$3(this),this._billboards[e]};var H$2=new i$12;function re$1(e,t,i,n,r){var o,a=n[m$6.positionHighAndScale],s=n[m$6.positionLowAndRotation],l=r._getActualPosition();e._mode===C$14.SCENE3D&&(i$1d.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),i$12.fromCartesian(l,H$2);var u=r.scale,c=r.rotation;0!==c&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,u);var h=H$2.high,d=H$2.low;e._instanced?(a(o=r._index,h.x,h.y,h.z,u),s(o,d.x,d.y,d.z,c)):(a((o=4*r._index)+0,h.x,h.y,h.z,u),a(o+1,h.x,h.y,h.z,u),a(o+2,h.x,h.y,h.z,u),a(o+3,h.x,h.y,h.z,u),s(o+0,d.x,d.y,d.z,c),s(o+1,d.x,d.y,d.z,c),s(o+2,d.x,d.y,d.z,c),s(o+3,d.x,d.y,d.z,c))}function De$1(e,t,i,n,r){var o,a=n[m$6.volTexCoord],s=0,l=0,u=0;e$2e(r._volTexCoord)&&(s=r._volTexCoord.x,l=r._volTexCoord.y,u=r._volTexCoord.z),e._instanced?a(o=r._index,s,l,u,0):(a((o=4*r._index)+0,s,l,u,0),a(o+1,s,l,u,0),a(o+2,s,l,u,0),a(o+3,s,l,u,0))}function be$1(e,t,i,n,r){re$1(e,t,i,n,r),De$1(e,t,i,n,r)}function G$2(e,t,i,n,r,o){var a;n.mode===C$14.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=n$J._computeActualPosition(u,c,n,r);e$2e(h)&&(u._setActualPosition(h),o?s.push(h):i$1d.expand(a,h,a))}o&&i$1d.fromPoints(s,a)}function Ce$1(e,t){var i=t.mode,n=e._billboards,r=e._billboardsToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==C$14.SCENE3D&&!p$1d.equals(o,e.modelMatrix)?(e._mode=i,p$1d.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===C$14.SCENE3D||i===C$14.SCENE2D||i===C$14.COLUMBUS_VIEW)&&G$2(e,n,n.length,t,o,!0)):i===C$14.MORPHING?G$2(e,n,n.length,t,o,!0):(i===C$14.SCENE2D||i===C$14.COLUMBUS_VIEW)&&G$2(e,r,e._billboardsToUpdateIndex,t,o,!1)}function Ve$3(e){var t=e._volumeShaderPredefine,i=e.volumeShaderPredefine;if(!e$2e(t)||t.length!==i.length)return!0;for(var n=0;n<i.length;n++)if(t[n]!=i[n])return!0;return!1}var Ee$1=[];c$8.prototype.update=function(e){W$3(this);var t=this._billboards,i=t.length,n=e.context;this._instanced=n.instancedArrays,m$6=this._instanced?ge$1:Ae$2,z$3=this._instanced?Te$1:ye;var r=this._textureAtlas;if(!e$2e(r)){r=this._textureAtlas=new v$I({context:n});for(var o=0;o<i;++o)t[o]._loadImage()}var a=r.textureCoordinates;if(0!==a.length){Ce$1(this,e),i=(t=this._billboards).length;var s=this._billboardsToUpdate,l=this._billboardsToUpdateIndex,u=this._propertiesChanged,c=r.guid,h=this._createVertexArray||this._textureAtlasGUID!==c;this._textureAtlasGUID=c;var d,f=e.passes;if(f.pick,h){this._createVertexArray=!1;for(var p=0;p<ee$1;++p)u[p]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),i>0){this._vaf=Se$1(n,i,this._instanced,this._batchTable),d=this._vaf.writers;for(var _=0;_<i;++_){var m=this._billboards[_];m._dirty=!1,be$1(this,n,a,d,m)}this._vaf.commit(z$3(n))}this._billboardsToUpdateIndex=0}else if(l>0){var g=Ee$1;g.length=0,u[me$1]&&g.push(re$1);var x=g.length;if(d=this._vaf.writers,l/i>.1){for(var y=0;y<l;++y){var v=s[y];v._dirty=!1;for(var $=0;$<x;++$)g[$](this,n,a,d,v)}this._vaf.commit(z$3(n))}else{for(var b=0;b<l;++b){var T=s[b];T._dirty=!1;for(var C=0;C<x;++C)g[C](this,n,a,d,T);this._instanced?this._vaf.subCommit(T._index,1):this._vaf.subCommit(4*T._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(l>1.5*i&&(s.length=i),e$2e(this._vaf)&&e$2e(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,i$1d.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var S,w=p$1d.IDENTITY;e.mode===C$14.SCENE3D?(w=this.modelMatrix,S=i$1d.clone(this._baseVolumeWC,this._boundingVolume)):S=i$1d.clone(this._baseVolume2D,this._boundingVolume);var E=this._transparent!==this.transparent;this._transparent=this.transparent;var P,A,L=Ve$3(this);if(this._volumeShaderPredefine=this.volumeShaderPredefine,E&&(this._rsTranslucent=d$1m.fromCache({depthTest:{enabled:!1,func:de$y.LESS},depthMask:!this._transparent,blending:Ee$r.ALPHA_BLEND})),E||L)P=new s$V({defines:this._volumeShaderPredefine,sources:[ve$1]}),this._instanced&&P.defines.push("INSTANCED"),A=new s$V({defines:this._volumeShaderPredefine,sources:[pe$1]}),this._transparent&&A.defines.push("OIT"),this._sp=r$14.replaceCache({context:n,shaderProgram:this._sp,vertexShaderSource:P,fragmentShaderSource:A,attributeLocations:m$6});var M=e.commandList;if(f.render||f.pick){var R=this._colorCommands,O=this._vaf.va,D=O.length,I=this._uniforms;R.length=D;for(var F=0;F<D;++F){var B=R[F];e$2e(B)||(B=R[F]=new i$$),B.pass=Le$q.Voxel_Billboard,B.boundingVolume=S,B.modelMatrix=w,B.count=O[F].indicesCount,B.shaderProgram=this._sp,B.uniformMap=I,B.vertexArray=O[F].va,B.renderState=this._rsTranslucent,B.debugShowBoundingVolume=this.debugShowBoundingVolume,this._instanced&&(B.count=6,B.instanceCount=i),M.push(B)}}}}},c$8.prototype.isDestroyed=function(){return!1},c$8.prototype.destroy=function(){return e$2e(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),te$1(this._billboards),i$11(this)};var kr=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;typeof __filename<"u"&&(kr=kr||__filename);var c$7=typeof assimpjs<"u"?assimpjs:{},pe,Pr;c$7.ready=new Promise((function(e,t){pe=e,Pr=t}));var me=Object.assign({},c$7),Vr="./this.program",ge="object"==typeof window,ir="function"==typeof importScripts,cr="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,I="",lr,dr,Cr;function Pt(e){return c$7.locateFile?c$7.locateFile(e,I):I+e}if(cr){var Yr=require("fs"),qr=require("path");I=ir?qr.dirname(I)+"/":__dirname+"/",lr=(e,t)=>(e=Fr(e)?new URL(e):qr.normalize(e),Yr.readFileSync(e,t?void 0:"utf8")),Cr=e=>{var t=lr(e,!0);return t.buffer||(t=new Uint8Array(t)),t},dr=(e,t,i)=>{e=Fr(e)?new URL(e):qr.normalize(e),Yr.readFile(e,(function(e,n){e?i(e):t(n.buffer)}))},!c$7.thisProgram&&process.argv.length>1&&(Vr=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),c$7.inspect=function(){return"[Emscripten Module object]"}}else(ge||ir)&&(ir?I=self.location.href:typeof document<"u"&&document.currentScript&&(I=document.currentScript.src),kr&&(I=kr),I=0!==I.indexOf("blob:")?I.substr(0,I.replace(/[?#].*/,"").lastIndexOf("/")+1):"",lr=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ir&&(Cr=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),dr=(e,t,i)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)});var Xr=c$7.print||console.log.bind(console),K$1=c$7.printErr||console.warn.bind(console),vr;Object.assign(c$7,me),me=null,c$7.arguments&&c$7.arguments,c$7.thisProgram&&(Vr=c$7.thisProgram),c$7.quit&&c$7.quit,c$7.wasmBinary&&(vr=c$7.wasmBinary),c$7.noExitRuntime,"object"!=typeof WebAssembly&&B$1("no native wasm support detected");var Tr,we=!1,U$3,W$2,Z$3,Sr,b$6,S,be,ke;function Ee(e,t){e||B$1(t)}function Pe(){var e=Tr.buffer;c$7.HEAP8=U$3=new Int8Array(e),c$7.HEAP16=Z$3=new Int16Array(e),c$7.HEAP32=b$6=new Int32Array(e),c$7.HEAPU8=W$2=new Uint8Array(e),c$7.HEAPU16=Sr=new Uint16Array(e),c$7.HEAPU32=S=new Uint32Array(e),c$7.HEAPF32=be=new Float32Array(e),c$7.HEAPF64=ke=new Float64Array(e)}var Ce,Te=[],Se=[],je=[];function jt(){if(c$7.preRun)for("function"==typeof c$7.preRun&&(c$7.preRun=[c$7.preRun]);c$7.preRun.length;)Dt$1(c$7.preRun.shift());Jr(Te)}function Ft(){!c$7.noFSInit&&!o$6.init.initialized&&o$6.init(),o$6.ignorePermissions=!1,Jr(Se)}function At(){if(c$7.postRun)for("function"==typeof c$7.postRun&&(c$7.postRun=[c$7.postRun]);c$7.postRun.length;)Rt(c$7.postRun.shift());Jr(je)}function Dt$1(e){Te.unshift(e)}function Mt(e){Se.unshift(e)}function Rt(e){je.unshift(e)}var rr=0,hr=null;function Kr(e){rr++,c$7.monitorRunDependencies&&c$7.monitorRunDependencies(rr)}function jr(e){if(rr--,c$7.monitorRunDependencies&&c$7.monitorRunDependencies(rr),0==rr&&hr){var t=hr;hr=null,t()}}function B$1(e){c$7.onAbort&&c$7.onAbort(e),K$1(e="Aborted("+e+")"),we=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw Pr(t),t}var $t="data:application/octet-stream;base64,",or,T$3,H$1;function Fe$1(e){return e.startsWith($t)}function Fr(e){return e.startsWith("file://")}function Ae$1(e){try{if(e==or&&vr)return new Uint8Array(vr);if(Cr)return Cr(e);throw"both async and sync fetching of the wasm failed"}catch(e){B$1(e)}}function Ot(e){if(!vr&&(ge||ir)){if("function"==typeof fetch&&!Fr(e))return fetch(e,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((function(){return Ae$1(e)}));if(dr)return new Promise((function(t,i){dr(e,(function(e){t(new Uint8Array(e))}),i)}))}return Promise.resolve().then((function(){return Ae$1(e)}))}function De(e,t,i){return Ot(e).then((function(e){return WebAssembly.instantiate(e,t)})).then((function(e){return e})).then(i,(function(e){K$1("failed to asynchronously prepare wasm: "+e),B$1(e)}))}function Ut(e,t,i,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||Fe$1(t)||Fr(t)||cr||"function"!=typeof fetch?De(t,i,n):fetch(t,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,i).then(n,(function(e){return K$1("wasm streaming compile failed: "+e),K$1("falling back to ArrayBuffer instantiation"),De(t,i,n)}))}))}function Ht(){var e={a:Xi};function t(e,t){var i=e.exports;return c$7.asm=i,Tr=c$7.asm.jb,Pe(),Ce=c$7.asm.nb,Mt(c$7.asm.kb),jr(),i}if(Kr(),c$7.instantiateWasm)try{return c$7.instantiateWasm(e,t)}catch(e){K$1("Module.instantiateWasm callback failed with error: "+e),Pr(e)}return Ut(vr,or,e,(function(e){t(e.instance)})).catch(Pr),{}}function Jr(e){for(;e.length>0;)e.shift()(c$7)}or="ThirdParty/assimpjs.wasm",Fe$1(or)||(or=Pt(or));var er=[];function Qr(e){e.add_ref()}var Ar=0;function xt(e){var t=new pr(e);return t.get_caught()||(t.set_caught(!0),Ar--),t.set_rethrown(!1),er.push(t),Qr(t),t.get_exception_ptr()}function Lt(){if(!er.length)return 0;var e=er[er.length-1];return Qr(e),e.excPtr}var Dr=[];function k$3(e){var t=Dr[e];return t||(e>=Dr.length&&(Dr.length=e+1),Dr[e]=t=Ce.get(e)),t}function Me$1(e){if(e.release_ref()&&!e.get_rethrown()){var t=e.get_destructor();t&&k$3(t)(e.excPtr),tt$1(e.excPtr)}}function pr(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){S[this.ptr+4>>2]=e},this.get_type=function(){return S[this.ptr+4>>2]},this.set_destructor=function(e){S[this.ptr+8>>2]=e},this.get_destructor=function(){return S[this.ptr+8>>2]},this.set_refcount=function(e){b$6[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,U$3[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=U$3[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,U$3[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=U$3[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=b$6[this.ptr>>2];b$6[this.ptr>>2]=e+1},this.release_ref=function(){var e=b$6[this.ptr>>2];return b$6[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){S[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return S[this.ptr+16>>2]},this.get_exception_ptr=function(){if(at$2(this.get_type()))return S[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function Wt(e){!e||Me$1(new pr(e))}var V$2=0;function zt(){g$6(0),Me$1(er.pop()),V$2=0}function It$1(e){throw V$2||(V$2=e),V$2}function Mr(){var e=V$2;if(!e)return br(0),0;var t=new pr(e);t.set_adjusted_ptr(e);var i=t.get_type();if(!i)return br(0),e;for(var n=0;n<arguments.length;n++){var r=arguments[n];if(0===r||r===i)break;var o=t.ptr+16;if(ot$1(r,i,o))return br(r),e}return br(i),e}var Nt=Mr,Bt$1=Mr,Vt=Mr,Yt=Mr;function qt(e){!e||Qr(new pr(e))}function Xt(){var e=er.pop();e||B$1("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(er.push(e),e.set_rethrown(!0),e.set_caught(!1),Ar++),V$2=t}function Gt(e,t,i){throw new pr(e).init(t,i),Ar++,V$2=e}function Kt(){return Ar}var F$2={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var i=0,n=e.length-1;n>=0;n--){var r=e[n];"."===r?e.splice(n,1):".."===r?(e.splice(n,1),i++):i&&(e.splice(n,1),i--)}if(t)for(;i;i--)e.unshift("..");return e},normalize:e=>{var t=F$2.isAbs(e),i="/"===e.substr(-1);return e=F$2.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),!e&&!t&&(e="."),e&&i&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=F$2.splitPath(e),i=t[0],n=t[1];return i||n?(n&&(n=n.substr(0,n.length-1)),i+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=F$2.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return F$2.normalize(e.join("/"))},join2:(e,t)=>F$2.normalize(e+"/"+t)};function Jt(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(cr)try{var e=require("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch{}B$1("initRandomDevice")}function Re$1(e){return(Re$1=Jt())(e)}var Y$2={resolve:function(){for(var e="",t=!1,i=arguments.length-1;i>=-1&&!t;i--){var n=i>=0?arguments[i]:o$6.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=F$2.isAbs(n)}return(t?"/":"")+(e=F$2.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function i(e){for(var t=0;t<e.length&&""===e[t];t++);for(var i=e.length-1;i>=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=Y$2.resolve(e).substr(1),t=Y$2.resolve(t).substr(1);for(var n=i(e.split("/")),r=i(t.split("/")),o=Math.min(n.length,r.length),a=o,s=0;s<o;s++)if(n[s]!==r[s]){a=s;break}var l=[];for(s=a;s<n.length;s++)l.push("..");return(l=l.concat(r.slice(a))).join("/")}};function mr(e){for(var t=0,i=0;i<e.length;++i){var n=e.charCodeAt(i);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++i):t+=3}return t}function Zr(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+3>=o)break;t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r}function Rr(e,t,i){var n=i>0?i:mr(e)+1,r=new Array(n),o=Zr(e,r,0,r.length);return t&&(r.length=o),r}var J$1={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){J$1.ttys[e]={input:[],output:[],ops:t},o$6.registerDevice(e,J$1.stream_ops)},stream_ops:{open:function(e){var t=J$1.ttys[e.node.rdev];if(!t)throw new o$6.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,i,n,r){if(!e.tty||!e.tty.ops.get_char)throw new o$6.ErrnoError(60);for(var o=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch{throw new o$6.ErrnoError(29)}if(void 0===s&&0===o)throw new o$6.ErrnoError(6);if(null==s)break;o++,t[i+a]=s}return o&&(e.node.timestamp=Date.now()),o},write:function(e,t,i,n,r){if(!e.tty||!e.tty.ops.put_char)throw new o$6.ErrnoError(60);try{for(var o=0;o<n;o++)e.tty.ops.put_char(e.tty,t[i+o])}catch{throw new o$6.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if(cr){var i=Buffer.alloc(256),n=0;try{n=Yr.readSync(process.stdin.fd,i,0,256,-1)}catch(e){if(!e.toString().includes("EOF"))throw e;n=0}t=n>0?i.slice(0,n).toString("utf-8"):null}else typeof window<"u"&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&(null!==(t=readline())&&(t+="\n"));if(!t)return null;e.input=Rr(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(Xr(ar(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(Xr(ar(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(K$1(ar(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(K$1(ar(e.output,0)),e.output=[])}}};function $e(e){B$1()}var P$3={ops_table:null,mount:function(e){return P$3.createNode(null,"/",16895,0)},createNode:function(e,t,i,n){if(o$6.isBlkdev(i)||o$6.isFIFO(i))throw new o$6.ErrnoError(63);P$3.ops_table||(P$3.ops_table={dir:{node:{getattr:P$3.node_ops.getattr,setattr:P$3.node_ops.setattr,lookup:P$3.node_ops.lookup,mknod:P$3.node_ops.mknod,rename:P$3.node_ops.rename,unlink:P$3.node_ops.unlink,rmdir:P$3.node_ops.rmdir,readdir:P$3.node_ops.readdir,symlink:P$3.node_ops.symlink},stream:{llseek:P$3.stream_ops.llseek}},file:{node:{getattr:P$3.node_ops.getattr,setattr:P$3.node_ops.setattr},stream:{llseek:P$3.stream_ops.llseek,read:P$3.stream_ops.read,write:P$3.stream_ops.write,allocate:P$3.stream_ops.allocate,mmap:P$3.stream_ops.mmap,msync:P$3.stream_ops.msync}},link:{node:{getattr:P$3.node_ops.getattr,setattr:P$3.node_ops.setattr,readlink:P$3.node_ops.readlink},stream:{}},chrdev:{node:{getattr:P$3.node_ops.getattr,setattr:P$3.node_ops.setattr},stream:o$6.chrdev_stream_ops}});var r=o$6.createNode(e,t,i,n);return o$6.isDir(r.mode)?(r.node_ops=P$3.ops_table.dir.node,r.stream_ops=P$3.ops_table.dir.stream,r.contents={}):o$6.isFile(r.mode)?(r.node_ops=P$3.ops_table.file.node,r.stream_ops=P$3.ops_table.file.stream,r.usedBytes=0,r.contents=null):o$6.isLink(r.mode)?(r.node_ops=P$3.ops_table.link.node,r.stream_ops=P$3.ops_table.link.stream):o$6.isChrdev(r.mode)&&(r.node_ops=P$3.ops_table.chrdev.node,r.stream_ops=P$3.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r,e.timestamp=r.timestamp),r},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var i=e.contents?e.contents.length:0;if(!(i>=t)){t=Math.max(t,i*(i<1048576?2:1.125)>>>0),0!=i&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var i=e.contents;e.contents=new Uint8Array(t),i&&e.contents.set(i.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=o$6.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,o$6.isDir(e.mode)?t.size=4096:o$6.isFile(e.mode)?t.size=e.usedBytes:o$6.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&P$3.resizeFileStorage(e,t.size)},lookup:function(e,t){throw o$6.genericErrors[44]},mknod:function(e,t,i,n){return P$3.createNode(e,t,i,n)},rename:function(e,t,i){if(o$6.isDir(e.mode)){var n;try{n=o$6.lookupNode(t,i)}catch{}if(n)for(var r in n.contents)throw new o$6.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=i,t.contents[i]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var i=o$6.lookupNode(e,t);for(var n in i.contents)throw new o$6.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var i in e.contents)!e.contents.hasOwnProperty(i)||t.push(i);return t},symlink:function(e,t,i){var n=P$3.createNode(e,t,41471,0);return n.link=i,n},readlink:function(e){if(!o$6.isLink(e.mode))throw new o$6.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,i,n,r){var o=e.node.contents;if(r>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-r,n);if(a>8&&o.subarray)t.set(o.subarray(r,r+a),i);else for(var s=0;s<a;s++)t[i+s]=o[r+s];return a},write:function(e,t,i,n,r,o){if(t.buffer===U$3.buffer&&(o=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(o)return a.contents=t.subarray(i,i+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===r)return a.contents=t.slice(i,i+n),a.usedBytes=n,n;if(r+n<=a.usedBytes)return a.contents.set(t.subarray(i,i+n),r),n}if(P$3.expandFileStorage(a,r+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(i,i+n),r);else for(var s=0;s<n;s++)a.contents[r+s]=t[i+s];return a.usedBytes=Math.max(a.usedBytes,r+n),n},llseek:function(e,t,i){var n=t;if(1===i?n+=e.position:2===i&&o$6.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new o$6.ErrnoError(28);return n},allocate:function(e,t,i){P$3.expandFileStorage(e.node,t+i),e.node.usedBytes=Math.max(e.node.usedBytes,t+i)},mmap:function(e,t,i,n,r){if(!o$6.isFile(e.node.mode))throw new o$6.ErrnoError(43);var o,a,s=e.node.contents;if(2&r||s.buffer!==U$3.buffer){if((i>0||i+t<s.length)&&(s=s.subarray?s.subarray(i,i+t):Array.prototype.slice.call(s,i,i+t)),a=!0,!(o=$e()))throw new o$6.ErrnoError(48);U$3.set(s,o)}else a=!1,o=s.byteOffset;return{ptr:o,allocated:a}},msync:function(e,t,i,n,r){return P$3.stream_ops.write(e,t,0,n,i,!1),0}}};function Qt(e,t,i,n){var r=n?"":"al "+e;dr(e,(i=>{Ee(i,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(i)),r&&jr()}),(t=>{if(!i)throw'Loading data file "'+e+'" failed.';i()})),r&&Kr()}var o$6={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=Y$2.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new o$6.ErrnoError(32);for(var i=e.split("/").filter((e=>!!e)),n=o$6.root,r="/",o=0;o<i.length;o++){var a=o===i.length-1;if(a&&t.parent)break;if(n=o$6.lookupNode(n,i[o]),r=F$2.join2(r,i[o]),o$6.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;o$6.isLink(n.mode);){var l=o$6.readlink(r);if(r=Y$2.resolve(F$2.dirname(r),l),n=o$6.lookupPath(r,{recurse_count:t.recurse_count+1}).node,s++>40)throw new o$6.ErrnoError(32)}}return{path:r,node:n}},getPath:e=>{for(var t;;){if(o$6.isRoot(e)){var i=e.mount.mountpoint;return t?"/"!==i[i.length-1]?i+"/"+t:i+t:i}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var i=0,n=0;n<t.length;n++)i=(i<<5)-i+t.charCodeAt(n)|0;return(e+i>>>0)%o$6.nameTable.length},hashAddNode:e=>{var t=o$6.hashName(e.parent.id,e.name);e.name_next=o$6.nameTable[t],o$6.nameTable[t]=e},hashRemoveNode:e=>{var t=o$6.hashName(e.parent.id,e.name);if(o$6.nameTable[t]===e)o$6.nameTable[t]=e.name_next;else for(var i=o$6.nameTable[t];i;){if(i.name_next===e){i.name_next=e.name_next;break}i=i.name_next}},lookupNode:(e,t)=>{var i=o$6.mayLookup(e);if(i)throw new o$6.ErrnoError(i,e);for(var n=o$6.hashName(e.id,t),r=o$6.nameTable[n];r;r=r.name_next){var o=r.name;if(r.parent.id===e.id&&o===t)return r}return o$6.lookup(e,t)},createNode:(e,t,i,n)=>{var r=new o$6.FSNode(e,t,i,n);return o$6.hashAddNode(r),r},destroyNode:e=>{o$6.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=o$6.flagModes[e];if(typeof t>"u")throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>o$6.ignorePermissions?0:t.includes("r")&&!(292&e.mode)||t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0,mayLookup:e=>o$6.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,t)=>{try{o$6.lookupNode(e,t);return 20}catch{}return o$6.nodePermissions(e,"wx")},mayDelete:(e,t,i)=>{var n;try{n=o$6.lookupNode(e,t)}catch(e){return e.errno}var r=o$6.nodePermissions(e,"wx");if(r)return r;if(i){if(!o$6.isDir(n.mode))return 54;if(o$6.isRoot(n)||o$6.getPath(n)===o$6.cwd())return 10}else if(o$6.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?o$6.isLink(e.mode)?32:o$6.isDir(e.mode)&&("r"!==o$6.flagsToPermissionString(t)||512&t)?31:o$6.nodePermissions(e,o$6.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=o$6.MAX_OPEN_FDS)=>{for(var i=e;i<=t;i++)if(!o$6.streams[i])return i;throw new o$6.ErrnoError(33)},getStream:e=>o$6.streams[e],createStream:(e,t,i)=>{o$6.FSStream||(o$6.FSStream=function(){this.shared={}},o$6.FSStream.prototype={},Object.defineProperties(o$6.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new o$6.FSStream,e);var n=o$6.nextfd(t,i);return e.fd=n,o$6.streams[n]=e,e},closeStream:e=>{o$6.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=o$6.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new o$6.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{o$6.devices[e]={stream_ops:t}},getDevice:e=>o$6.devices[e],getMounts:e=>{for(var t=[],i=[e];i.length;){var n=i.pop();t.push(n),i.push.apply(i,n.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),o$6.syncFSRequests++,o$6.syncFSRequests>1&&K$1("warning: "+o$6.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var i=o$6.getMounts(o$6.root.mount),n=0;function r(e){return o$6.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,r(e));++n>=i.length&&r(null)}i.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:(e,t,i)=>{var n,r="/"===i,o=!i;if(r&&o$6.root)throw new o$6.ErrnoError(10);if(!r&&!o){var a=o$6.lookupPath(i,{follow_mount:!1});if(i=a.path,n=a.node,o$6.isMountpoint(n))throw new o$6.ErrnoError(10);if(!o$6.isDir(n.mode))throw new o$6.ErrnoError(54)}var s={type:e,opts:t,mountpoint:i,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,r?o$6.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount:e=>{var t=o$6.lookupPath(e,{follow_mount:!1});if(!o$6.isMountpoint(t.node))throw new o$6.ErrnoError(28);var i=t.node,n=i.mounted,r=o$6.getMounts(n);Object.keys(o$6.nameTable).forEach((e=>{for(var t=o$6.nameTable[e];t;){var i=t.name_next;r.includes(t.mount)&&o$6.destroyNode(t),t=i}})),i.mounted=null;var o=i.mount.mounts.indexOf(n);i.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,i)=>{var n=o$6.lookupPath(e,{parent:!0}).node,r=F$2.basename(e);if(!r||"."===r||".."===r)throw new o$6.ErrnoError(28);var o=o$6.mayCreate(n,r);if(o)throw new o$6.ErrnoError(o);if(!n.node_ops.mknod)throw new o$6.ErrnoError(63);return n.node_ops.mknod(n,r,t,i)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,o$6.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,o$6.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var i=e.split("/"),n="",r=0;r<i.length;++r)if(i[r]){n+="/"+i[r];try{o$6.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,i)=>(typeof i>"u"&&(i=t,t=438),t|=8192,o$6.mknod(e,t,i)),symlink:(e,t)=>{if(!Y$2.resolve(e))throw new o$6.ErrnoError(44);var i=o$6.lookupPath(t,{parent:!0}).node;if(!i)throw new o$6.ErrnoError(44);var n=F$2.basename(t),r=o$6.mayCreate(i,n);if(r)throw new o$6.ErrnoError(r);if(!i.node_ops.symlink)throw new o$6.ErrnoError(63);return i.node_ops.symlink(i,n,e)},rename:(e,t)=>{var i,n,r=F$2.dirname(e),o=F$2.dirname(t),a=F$2.basename(e),s=F$2.basename(t);if(i=o$6.lookupPath(e,{parent:!0}).node,n=o$6.lookupPath(t,{parent:!0}).node,!i||!n)throw new o$6.ErrnoError(44);if(i.mount!==n.mount)throw new o$6.ErrnoError(75);var l,u=o$6.lookupNode(i,a),c=Y$2.relative(e,o);if("."!==c.charAt(0))throw new o$6.ErrnoError(28);if("."!==(c=Y$2.relative(t,r)).charAt(0))throw new o$6.ErrnoError(55);try{l=o$6.lookupNode(n,s)}catch{}if(u!==l){var h=o$6.isDir(u.mode),d=o$6.mayDelete(i,a,h);if(d)throw new o$6.ErrnoError(d);if(d=l?o$6.mayDelete(n,s,h):o$6.mayCreate(n,s))throw new o$6.ErrnoError(d);if(!i.node_ops.rename)throw new o$6.ErrnoError(63);if(o$6.isMountpoint(u)||l&&o$6.isMountpoint(l))throw new o$6.ErrnoError(10);if(n!==i&&(d=o$6.nodePermissions(i,"w")))throw new o$6.ErrnoError(d);o$6.hashRemoveNode(u);try{i.node_ops.rename(u,n,s)}catch(e){throw e}finally{o$6.hashAddNode(u)}}},rmdir:e=>{var t=o$6.lookupPath(e,{parent:!0}).node,i=F$2.basename(e),n=o$6.lookupNode(t,i),r=o$6.mayDelete(t,i,!0);if(r)throw new o$6.ErrnoError(r);if(!t.node_ops.rmdir)throw new o$6.ErrnoError(63);if(o$6.isMountpoint(n))throw new o$6.ErrnoError(10);t.node_ops.rmdir(t,i),o$6.destroyNode(n)},readdir:e=>{var t=o$6.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new o$6.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=o$6.lookupPath(e,{parent:!0}).node;if(!t)throw new o$6.ErrnoError(44);var i=F$2.basename(e),n=o$6.lookupNode(t,i),r=o$6.mayDelete(t,i,!1);if(r)throw new o$6.ErrnoError(r);if(!t.node_ops.unlink)throw new o$6.ErrnoError(63);if(o$6.isMountpoint(n))throw new o$6.ErrnoError(10);t.node_ops.unlink(t,i),o$6.destroyNode(n)},readlink:e=>{var t=o$6.lookupPath(e).node;if(!t)throw new o$6.ErrnoError(44);if(!t.node_ops.readlink)throw new o$6.ErrnoError(28);return Y$2.resolve(o$6.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var i=o$6.lookupPath(e,{follow:!t}).node;if(!i)throw new o$6.ErrnoError(44);if(!i.node_ops.getattr)throw new o$6.ErrnoError(63);return i.node_ops.getattr(i)},lstat:e=>o$6.stat(e,!0),chmod:(e,t,i)=>{var n;"string"==typeof e?n=o$6.lookupPath(e,{follow:!i}).node:n=e;if(!n.node_ops.setattr)throw new o$6.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{o$6.chmod(e,t,!0)},fchmod:(e,t)=>{var i=o$6.getStream(e);if(!i)throw new o$6.ErrnoError(8);o$6.chmod(i.node,t)},chown:(e,t,i,n)=>{var r;"string"==typeof e?r=o$6.lookupPath(e,{follow:!n}).node:r=e;if(!r.node_ops.setattr)throw new o$6.ErrnoError(63);r.node_ops.setattr(r,{timestamp:Date.now()})},lchown:(e,t,i)=>{o$6.chown(e,t,i,!0)},fchown:(e,t,i)=>{var n=o$6.getStream(e);if(!n)throw new o$6.ErrnoError(8);o$6.chown(n.node,t,i)},truncate:(e,t)=>{if(t<0)throw new o$6.ErrnoError(28);var i;"string"==typeof e?i=o$6.lookupPath(e,{follow:!0}).node:i=e;if(!i.node_ops.setattr)throw new o$6.ErrnoError(63);if(o$6.isDir(i.mode))throw new o$6.ErrnoError(31);if(!o$6.isFile(i.mode))throw new o$6.ErrnoError(28);var n=o$6.nodePermissions(i,"w");if(n)throw new o$6.ErrnoError(n);i.node_ops.setattr(i,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var i=o$6.getStream(e);if(!i)throw new o$6.ErrnoError(8);if(0==(2097155&i.flags))throw new o$6.ErrnoError(28);o$6.truncate(i.node,t)},utime:(e,t,i)=>{var n=o$6.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,i)})},open:(e,t,i)=>{if(""===e)throw new o$6.ErrnoError(44);var n;if(i=typeof i>"u"?438:i,i=64&(t="string"==typeof t?o$6.modeStringToFlags(t):t)?4095&i|32768:0,"object"==typeof e)n=e;else{e=F$2.normalize(e);try{n=o$6.lookupPath(e,{follow:!(131072&t)}).node}catch{}}var r=!1;if(64&t)if(n){if(128&t)throw new o$6.ErrnoError(20)}else n=o$6.mknod(e,i,0),r=!0;if(!n)throw new o$6.ErrnoError(44);if(o$6.isChrdev(n.mode)&&(t&=-513),65536&t&&!o$6.isDir(n.mode))throw new o$6.ErrnoError(54);if(!r){var o=o$6.mayOpen(n,t);if(o)throw new o$6.ErrnoError(o)}512&t&&!r&&o$6.truncate(n,0),t&=-131713;var a=o$6.createStream({node:n,path:o$6.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),c$7.logReadFiles&&!(1&t)&&(o$6.readFiles||(o$6.readFiles={}),e in o$6.readFiles||(o$6.readFiles[e]=1)),a},close:e=>{if(o$6.isClosed(e))throw new o$6.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{o$6.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,i)=>{if(o$6.isClosed(e))throw new o$6.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new o$6.ErrnoError(70);if(0!=i&&1!=i&&2!=i)throw new o$6.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,i),e.ungotten=[],e.position},read:(e,t,i,n,r)=>{if(n<0||r<0)throw new o$6.ErrnoError(28);if(o$6.isClosed(e))throw new o$6.ErrnoError(8);if(1==(2097155&e.flags))throw new o$6.ErrnoError(8);if(o$6.isDir(e.node.mode))throw new o$6.ErrnoError(31);if(!e.stream_ops.read)throw new o$6.ErrnoError(28);var o=typeof r<"u";if(o){if(!e.seekable)throw new o$6.ErrnoError(70)}else r=e.position;var a=e.stream_ops.read(e,t,i,n,r);return o||(e.position+=a),a},write:(e,t,i,n,r,o)=>{if(n<0||r<0)throw new o$6.ErrnoError(28);if(o$6.isClosed(e))throw new o$6.ErrnoError(8);if(0==(2097155&e.flags))throw new o$6.ErrnoError(8);if(o$6.isDir(e.node.mode))throw new o$6.ErrnoError(31);if(!e.stream_ops.write)throw new o$6.ErrnoError(28);e.seekable&&1024&e.flags&&o$6.llseek(e,0,2);var a=typeof r<"u";if(a){if(!e.seekable)throw new o$6.ErrnoError(70)}else r=e.position;var s=e.stream_ops.write(e,t,i,n,r,o);return a||(e.position+=s),s},allocate:(e,t,i)=>{if(o$6.isClosed(e))throw new o$6.ErrnoError(8);if(t<0||i<=0)throw new o$6.ErrnoError(28);if(0==(2097155&e.flags))throw new o$6.ErrnoError(8);if(!o$6.isFile(e.node.mode)&&!o$6.isDir(e.node.mode))throw new o$6.ErrnoError(43);if(!e.stream_ops.allocate)throw new o$6.ErrnoError(138);e.stream_ops.allocate(e,t,i)},mmap:(e,t,i,n,r)=>{if(0!=(2&n)&&0==(2&r)&&2!=(2097155&e.flags))throw new o$6.ErrnoError(2);if(1==(2097155&e.flags))throw new o$6.ErrnoError(2);if(!e.stream_ops.mmap)throw new o$6.ErrnoError(43);return e.stream_ops.mmap(e,t,i,n,r)},msync:(e,t,i,n,r)=>e.stream_ops.msync?e.stream_ops.msync(e,t,i,n,r):0,munmap:e=>0,ioctl:(e,t,i)=>{if(!e.stream_ops.ioctl)throw new o$6.ErrnoError(59);return e.stream_ops.ioctl(e,t,i)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var i,n=o$6.open(e,t.flags),r=o$6.stat(e).size,o=new Uint8Array(r);return o$6.read(n,o,0,r,0),"utf8"===t.encoding?i=ar(o,0):"binary"===t.encoding&&(i=o),o$6.close(n),i},writeFile:(e,t,i={})=>{i.flags=i.flags||577;var n=o$6.open(e,i.flags,i.mode);if("string"==typeof t){var r=new Uint8Array(mr(t)+1),o=Zr(t,r,0,r.length);o$6.write(n,r,0,o,void 0,i.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");o$6.write(n,t,0,t.byteLength,void 0,i.canOwn)}o$6.close(n)},cwd:()=>o$6.currentPath,chdir:e=>{var t=o$6.lookupPath(e,{follow:!0});if(null===t.node)throw new o$6.ErrnoError(44);if(!o$6.isDir(t.node.mode))throw new o$6.ErrnoError(54);var i=o$6.nodePermissions(t.node,"x");if(i)throw new o$6.ErrnoError(i);o$6.currentPath=t.path},createDefaultDirectories:()=>{o$6.mkdir("/tmp"),o$6.mkdir("/home"),o$6.mkdir("/home/web_user")},createDefaultDevices:()=>{o$6.mkdir("/dev"),o$6.registerDevice(o$6.makedev(1,3),{read:()=>0,write:(e,t,i,n,r)=>n}),o$6.mkdev("/dev/null",o$6.makedev(1,3)),J$1.register(o$6.makedev(5,0),J$1.default_tty_ops),J$1.register(o$6.makedev(6,0),J$1.default_tty1_ops),o$6.mkdev("/dev/tty",o$6.makedev(5,0)),o$6.mkdev("/dev/tty1",o$6.makedev(6,0));var e=new Uint8Array(1024),t=0,i=()=>(0===t&&(t=Re$1(e).byteLength),e[--t]);o$6.createDevice("/dev","random",i),o$6.createDevice("/dev","urandom",i),o$6.mkdir("/dev/shm"),o$6.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{o$6.mkdir("/proc");var e=o$6.mkdir("/proc/self");o$6.mkdir("/proc/self/fd"),o$6.mount({mount:()=>{var t=o$6.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var i=+t,n=o$6.getStream(i);if(!n)throw new o$6.ErrnoError(8);var r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{c$7.stdin?o$6.createDevice("/dev","stdin",c$7.stdin):o$6.symlink("/dev/tty","/dev/stdin"),c$7.stdout?o$6.createDevice("/dev","stdout",null,c$7.stdout):o$6.symlink("/dev/tty","/dev/stdout"),c$7.stderr?o$6.createDevice("/dev","stderr",null,c$7.stderr):o$6.symlink("/dev/tty1","/dev/stderr"),o$6.open("/dev/stdin",0),o$6.open("/dev/stdout",1),o$6.open("/dev/stderr",1)},ensureErrnoError:()=>{o$6.ErrnoError||(o$6.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},o$6.ErrnoError.prototype=new Error,o$6.ErrnoError.prototype.constructor=o$6.ErrnoError,[44].forEach((e=>{o$6.genericErrors[e]=new o$6.ErrnoError(e),o$6.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{o$6.ensureErrnoError(),o$6.nameTable=new Array(4096),o$6.mount(P$3,{},"/"),o$6.createDefaultDirectories(),o$6.createDefaultDevices(),o$6.createSpecialDirectories(),o$6.filesystems={MEMFS:P$3}},init:(e,t,i)=>{o$6.init.initialized=!0,o$6.ensureErrnoError(),c$7.stdin=e||c$7.stdin,c$7.stdout=t||c$7.stdout,c$7.stderr=i||c$7.stderr,o$6.createStandardStreams()},quit:()=>{o$6.init.initialized=!1;for(var e=0;e<o$6.streams.length;e++){var t=o$6.streams[e];!t||o$6.close(t)}},getMode:(e,t)=>{var i=0;return e&&(i|=365),t&&(i|=146),i},findObject:(e,t)=>{var i=o$6.analyzePath(e,t);return i.exists?i.object:null},analyzePath:(e,t)=>{try{e=(n=o$6.lookupPath(e,{follow:!t})).path}catch{}var i={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=o$6.lookupPath(e,{parent:!0});i.parentExists=!0,i.parentPath=n.path,i.parentObject=n.node,i.name=F$2.basename(e),n=o$6.lookupPath(e,{follow:!t}),i.exists=!0,i.path=n.path,i.object=n.node,i.name=n.node.name,i.isRoot="/"===n.path}catch(e){i.error=e.errno}return i},createPath:(e,t,i,n)=>{e="string"==typeof e?e:o$6.getPath(e);for(var r=t.split("/").reverse();r.length;){var o=r.pop();if(o){var a=F$2.join2(e,o);try{o$6.mkdir(a)}catch{}e=a}}return a},createFile:(e,t,i,n,r)=>{var o=F$2.join2("string"==typeof e?e:o$6.getPath(e),t),a=o$6.getMode(n,r);return o$6.create(o,a)},createDataFile:(e,t,i,n,r,o)=>{var a=t;e&&(e="string"==typeof e?e:o$6.getPath(e),a=t?F$2.join2(e,t):e);var s=o$6.getMode(n,r),l=o$6.create(a,s);if(i){if("string"==typeof i){for(var u=new Array(i.length),c=0,h=i.length;c<h;++c)u[c]=i.charCodeAt(c);i=u}o$6.chmod(l,146|s);var d=o$6.open(l,577);o$6.write(d,i,0,i.length,0,o),o$6.close(d),o$6.chmod(l,s)}return l},createDevice:(e,t,i,n)=>{var r=F$2.join2("string"==typeof e?e:o$6.getPath(e),t),o=o$6.getMode(!!i,!!n);o$6.createDevice.major||(o$6.createDevice.major=64);var a=o$6.makedev(o$6.createDevice.major++,0);return o$6.registerDevice(a,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,t,n,r,o)=>{for(var a=0,s=0;s<r;s++){var l;try{l=i()}catch{throw new o$6.ErrnoError(29)}if(void 0===l&&0===a)throw new o$6.ErrnoError(6);if(null==l)break;a++,t[n+s]=l}return a&&(e.node.timestamp=Date.now()),a},write:(e,t,i,r,o)=>{for(var a=0;a<r;a++)try{n(t[i+a])}catch{throw new o$6.ErrnoError(29)}return r&&(e.node.timestamp=Date.now()),a}}),o$6.mkdev(r,o,a)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!lr)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Rr(lr(e.url),!0),e.usedBytes=e.contents.length}catch{throw new o$6.ErrnoError(29)}},createLazyFile:(e,t,i,n,r)=>{function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,i=e/this.chunkSize|0;return this.getter(i)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),r=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;r||(a=n);var s=this;s.setDataGetter((e=>{var t=e*a,r=(e+1)*a-1;if(r=Math.min(r,n-1),typeof s.chunks[e]>"u"&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var r=new XMLHttpRequest;if(r.open("GET",i,!1),n!==a&&r.setRequestHeader("Range","bytes="+e+"-"+t),r.responseType="arraybuffer",r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+i+". Status: "+r.status);return void 0!==r.response?new Uint8Array(r.response||[]):Rr(r.responseText||"",!0)})(t,r)),typeof s.chunks[e]>"u")throw new Error("doXHR failed!");return s.chunks[e]})),(o||!n)&&(a=n=1,n=this.getter(0).length,a=n,Xr("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!ir)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new o;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:i};var l=o$6.createFile(e,t,s,n,r);s.contents?l.contents=s.contents:s.url&&(l.contents=null,l.url=s.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var u={};function c(e,t,i,n,r){var o=e.node.contents;if(r>=o.length)return 0;var a=Math.min(o.length-r,n);if(o.slice)for(var s=0;s<a;s++)t[i+s]=o[r+s];else for(s=0;s<a;s++)t[i+s]=o.get(r+s);return a}return Object.keys(l.stream_ops).forEach((e=>{var t=l.stream_ops[e];u[e]=function(){return o$6.forceLoadFile(l),t.apply(null,arguments)}})),u.read=(e,t,i,n,r)=>(o$6.forceLoadFile(l),c(e,t,i,n,r)),u.mmap=(e,t,i,n,r)=>{o$6.forceLoadFile(l);var o=$e();if(!o)throw new o$6.ErrnoError(48);return c(e,U$3,o,t,i),{ptr:o,allocated:!0}},l.stream_ops=u,l},createPreloadedFile:(e,t,i,n,r,o,a,s,l,u)=>{var c=t?Y$2.resolve(F$2.join2(e,t)):e;function h(i){function h(i){u&&u(),s||o$6.createDataFile(e,t,i,n,r,l),o&&o(),jr()}Browser.handledByPreloadPlugin(i,c,h,(()=>{a&&a(),jr()}))||h(i)}Kr(),"string"==typeof i?Qt(i,(e=>h(e)),a):h(i)}},Oe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function ar(e,t,i){for(var n=t+i,r=t;e[r]&&!(r>=n);)++r;if(r-t>16&&e.buffer&&Oe)return Oe.decode(e.subarray(t,r));for(var o="";t<r;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var l=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|l:(7&a)<<18|s<<12|l<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var u=a-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function $r(e,t){return e?ar(W$2,e,t):""}var A$2={DEFAULT_POLLMASK:5,calculateAt:function(e,t,i){if(F$2.isAbs(t))return t;var n;-100===e?n=o$6.cwd():n=A$2.getStreamFromFD(e).path;if(0==t.length){if(!i)throw new o$6.ErrnoError(44);return n}return F$2.join2(n,t)},doStat:function(e,t,i){try{var n=e(t)}catch(e){if(e&&e.node&&F$2.normalize(t)!==F$2.normalize(o$6.getPath(e.node)))return-54;throw e}b$6[i>>2]=n.dev,b$6[i+8>>2]=n.ino,b$6[i+12>>2]=n.mode,S[i+16>>2]=n.nlink,b$6[i+20>>2]=n.uid,b$6[i+24>>2]=n.gid,b$6[i+28>>2]=n.rdev,H$1=[n.size>>>0,(T$3=n.size,+Math.abs(T$3)>=1?T$3>0?(0|Math.min(+Math.floor(T$3/4294967296),4294967295))>>>0:~~+Math.ceil((T$3-+(~~T$3>>>0))/4294967296)>>>0:0)],b$6[i+40>>2]=H$1[0],b$6[i+44>>2]=H$1[1],b$6[i+48>>2]=4096,b$6[i+52>>2]=n.blocks;var r=n.atime.getTime(),o=n.mtime.getTime(),a=n.ctime.getTime();return H$1=[Math.floor(r/1e3)>>>0,(T$3=Math.floor(r/1e3),+Math.abs(T$3)>=1?T$3>0?(0|Math.min(+Math.floor(T$3/4294967296),4294967295))>>>0:~~+Math.ceil((T$3-+(~~T$3>>>0))/4294967296)>>>0:0)],b$6[i+56>>2]=H$1[0],b$6[i+60>>2]=H$1[1],S[i+64>>2]=r%1e3*1e3,H$1=[Math.floor(o/1e3)>>>0,(T$3=Math.floor(o/1e3),+Math.abs(T$3)>=1?T$3>0?(0|Math.min(+Math.floor(T$3/4294967296),4294967295))>>>0:~~+Math.ceil((T$3-+(~~T$3>>>0))/4294967296)>>>0:0)],b$6[i+72>>2]=H$1[0],b$6[i+76>>2]=H$1[1],S[i+80>>2]=o%1e3*1e3,H$1=[Math.floor(a/1e3)>>>0,(T$3=Math.floor(a/1e3),+Math.abs(T$3)>=1?T$3>0?(0|Math.min(+Math.floor(T$3/4294967296),4294967295))>>>0:~~+Math.ceil((T$3-+(~~T$3>>>0))/4294967296)>>>0:0)],b$6[i+88>>2]=H$1[0],b$6[i+92>>2]=H$1[1],S[i+96>>2]=a%1e3*1e3,H$1=[n.ino>>>0,(T$3=n.ino,+Math.abs(T$3)>=1?T$3>0?(0|Math.min(+Math.floor(T$3/4294967296),4294967295))>>>0:~~+Math.ceil((T$3-+(~~T$3>>>0))/4294967296)>>>0:0)],b$6[i+104>>2]=H$1[0],b$6[i+108>>2]=H$1[1],0},doMsync:function(e,t,i,n,r){if(!o$6.isFile(t.node.mode))throw new o$6.ErrnoError(43);if(2&n)return 0;var o=W$2.slice(e,e+i);o$6.msync(t,o,r,i,n)},varargs:void 0,get:function(){return A$2.varargs+=4,b$6[A$2.varargs-4>>2]},getStr:function(e){return $r(e)},getStreamFromFD:function(e){var t=o$6.getStream(e);if(!t)throw new o$6.ErrnoError(8);return t}};function Zt(e){try{return e=A$2.getStr(e),o$6.chdir(e),0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function rn(e){return b$6[it()>>2]=e,e}function en(e,t,i){A$2.varargs=i;try{var n=A$2.getStreamFromFD(e);switch(t){case 0:return(r=A$2.get())<0?-28:o$6.createStream(n,r).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var r=A$2.get();return n.flags|=r,0;case 5:r=A$2.get();return Z$3[r+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return rn(28),-1}}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function re(e,t,i){return Zr(e,W$2,t,i)}function tn(e,t){try{if(0===t)return-28;var i=o$6.cwd(),n=mr(i)+1;return t<n?-68:(re(i,e,t),n)}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function nn(e,t,i){A$2.varargs=i;try{var n=A$2.getStreamFromFD(e);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var r=A$2.get();return b$6[r>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:r=A$2.get();return o$6.ioctl(n,t,r);default:return-28}}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function on(e,t,i){try{return t=A$2.getStr(t),t=A$2.calculateAt(e,t),"/"===(t=F$2.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),o$6.mkdir(t,i,0),0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function an(e,t,i,n){A$2.varargs=n;try{t=A$2.getStr(t),t=A$2.calculateAt(e,t);var r=n?A$2.get():0;return o$6.open(t,i,r).fd}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function sn(e,t,i,n){try{if(t=A$2.getStr(t),t=A$2.calculateAt(e,t),n<=0)return-28;var r=o$6.readlink(t),o=Math.min(n,mr(r)),a=U$3[i+o];return re(r,i,n+1),U$3[i+o]=a,o}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function un(e){try{return e=A$2.getStr(e),o$6.rmdir(e),0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function fn(e,t){try{return e=A$2.getStr(e),A$2.doStat(o$6.stat,e,t)}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function cn(e,t,i){try{return t=A$2.getStr(t),t=A$2.calculateAt(e,t),0===i?o$6.unlink(t):512===i?o$6.rmdir(t):B$1("Invalid flags passed to unlinkat"),0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function ln(e,t,i,n,r){}function ee(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function dn(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ue$1=e}var Ue$1=void 0;function z$2(e){for(var t="",i=e;W$2[i];)t+=Ue$1[W$2[i++]];return t}var sr={},tr={},Or={},vn=48,hn=57;function te(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=vn&&t<=hn?"_"+e:e}function ne$1(e,t){return{[e=te(e)]:function(){return t.apply(this,arguments)}}[e]}function ie(e,t){var i=ne$1(t,(function(e){this.name=t,this.message=e;var i=new Error(e).stack;void 0!==i&&(this.stack=this.toString()+"\n"+i.replace(/^Error(:[^\n]*)?\n/,""))}));return i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},i}var ur=void 0;function j$6(e){throw new ur(e)}var He$1=void 0;function Ur(e){throw new He$1(e)}function fr(e,t,i){function n(t){var n=i(t);n.length!==e.length&&Ur("Mismatched type converter count");for(var r=0;r<e.length;++r)q$2(e[r],n[r])}e.forEach((function(e){Or[e]=t}));var r=new Array(t.length),o=[],a=0;t.forEach(((e,t)=>{tr.hasOwnProperty(e)?r[t]=tr[e]:(o.push(e),sr.hasOwnProperty(e)||(sr[e]=[]),sr[e].push((()=>{r[t]=tr[e],++a===o.length&&n(r)})))})),0===o.length&&n(r)}function q$2(e,t,i={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||j$6('type "'+n+'" must have a positive integer typeid pointer'),tr.hasOwnProperty(e)){if(i.ignoreDuplicateRegistrations)return;j$6("Cannot register type '"+n+"' twice")}if(tr[e]=t,delete Or[e],sr.hasOwnProperty(e)){var r=sr[e];delete sr[e],r.forEach((e=>e()))}}function pn(e,t,i,n,r){var o=ee(i);q$2(e,{name:t=z$2(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===i)n=U$3;else if(2===i)n=Z$3;else{if(4!==i)throw new TypeError("Unknown boolean type size: "+t);n=b$6}return this.fromWireType(n[e>>o])},destructorFunction:null})}function mn(e){if(!(this instanceof Q$3&&e instanceof Q$3))return!1;for(var t=this.$$.ptrType.registeredClass,i=this.$$.ptr,n=e.$$.ptrType.registeredClass,r=e.$$.ptr;t.baseClass;)i=t.upcast(i),t=t.baseClass;for(;n.baseClass;)r=n.upcast(r),n=n.baseClass;return t===n&&i===r}function yn(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function oe$1(e){j$6(function(e){return e.$$.ptrType.registeredClass.name}(e)+" instance already deleted")}var ae=!1;function xe$1(e){}function _n(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function Le$1(e){e.count.value-=1,0===e.count.value&&_n(e)}function We(e,t,i){if(t===i)return e;if(void 0===i.baseClass)return null;var n=We(e,t,i.baseClass);return null===n?null:i.downcast(n)}var ze$2={};function gn(){return Object.keys(gr).length}function wn(){var e=[];for(var t in gr)gr.hasOwnProperty(t)&&e.push(gr[t]);return e}var yr=[];function se(){for(;yr.length;){var e=yr.pop();e.$$.deleteScheduled=!1,e.delete()}}var _r=void 0;function En(e){_r=e,yr.length&&_r&&_r(se)}function bn(){c$7.getInheritedInstanceCount=gn,c$7.getLiveInheritedInstances=wn,c$7.flushPendingDeletes=se,c$7.setDelayFunction=En}var gr={};function kn(e,t){for(void 0===t&&j$6("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function Pn(e,t){return t=kn(e,t),gr[t]}function Hr(e,t){return(!t.ptrType||!t.ptr)&&Ur("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&Ur("Both smartPtrType and smartPtr must be specified"),t.count={value:1},wr(Object.create(e,{$$:{value:t}}))}function Cn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var i=Pn(this.registeredClass,t);if(void 0!==i){if(0===i.$$.count.value)return i.$$.ptr=t,i.$$.smartPtr=e,i.clone();var n=i.clone();return this.destructor(e),n}function r(){return this.isSmartPointer?Hr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Hr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,a=this.registeredClass.getActualType(t),s=ze$2[a];if(!s)return r.call(this);o=this.isConst?s.constPointerType:s.pointerType;var l=We(t,this.registeredClass,o.registeredClass);return null===l?r.call(this):this.isSmartPointer?Hr(o.registeredClass.instancePrototype,{ptrType:o,ptr:l,smartPtrType:this,smartPtr:e}):Hr(o.registeredClass.instancePrototype,{ptrType:o,ptr:l})}function wr(e){return typeof FinalizationRegistry>"u"?(wr=e=>e,e):(ae=new FinalizationRegistry((e=>{Le$1(e.$$)})),wr=e=>{var t=e.$$;if(!!t.smartPtr){var i={$$:t};ae.register(e,i,e)}return e},xe$1=e=>ae.unregister(e),wr(e))}function Tn(){if(this.$$.ptr||oe$1(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=wr(Object.create(Object.getPrototypeOf(this),{$$:{value:yn(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Sn(){this.$$.ptr||oe$1(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&j$6("Object already scheduled for deletion"),xe$1(this),Le$1(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function jn(){return!this.$$.ptr}function Fn(){return this.$$.ptr||oe$1(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&j$6("Object already scheduled for deletion"),yr.push(this),1===yr.length&&_r&&_r(se),this.$$.deleteScheduled=!0,this}function An(){Q$3.prototype.isAliasOf=mn,Q$3.prototype.clone=Tn,Q$3.prototype.delete=Sn,Q$3.prototype.isDeleted=jn,Q$3.prototype.deleteLater=Fn}function Q$3(){}function Ie(e,t,i){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||j$6("Function '"+i+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function Ne(e,t,i){c$7.hasOwnProperty(e)?((void 0===i||void 0!==c$7[e].overloadTable&&void 0!==c$7[e].overloadTable[i])&&j$6("Cannot register public name '"+e+"' twice"),Ie(c$7,e,e),c$7.hasOwnProperty(i)&&j$6("Cannot register multiple overloads of a function with the same number of arguments ("+i+")!"),c$7[e].overloadTable[i]=t):(c$7[e]=t,void 0!==i&&(c$7[e].numArguments=i))}function Dn(e,t,i,n,r,o,a,s){this.name=e,this.constructor=t,this.instancePrototype=i,this.rawDestructor=n,this.baseClass=r,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function ue$1(e,t,i){for(;t!==i;)t.upcast||j$6("Expected null or instance of "+i.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Mn(e,t){if(null===t)return this.isReference&&j$6("null is not a valid "+this.name),0;t.$$||j$6('Cannot pass "'+de(t)+'" as a '+this.name),t.$$.ptr||j$6("Cannot pass deleted object as a pointer of type "+this.name);var i=t.$$.ptrType.registeredClass;return ue$1(t.$$.ptr,i,this.registeredClass)}function Rn(e,t){var i;if(null===t)return this.isReference&&j$6("null is not a valid "+this.name),this.isSmartPointer?(i=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,i),i):0;t.$$||j$6('Cannot pass "'+de(t)+'" as a '+this.name),t.$$.ptr||j$6("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&j$6("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(i=ue$1(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&j$6("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?i=t.$$.smartPtr:j$6("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:i=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)i=t.$$.smartPtr;else{var r=t.clone();i=this.rawShare(i,x$3.toHandle((function(){r.delete()}))),null!==e&&e.push(this.rawDestructor,i)}break;default:j$6("Unsupporting sharing policy")}return i}function $n(e,t){if(null===t)return this.isReference&&j$6("null is not a valid "+this.name),0;t.$$||j$6('Cannot pass "'+de(t)+'" as a '+this.name),t.$$.ptr||j$6("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&j$6("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var i=t.$$.ptrType.registeredClass;return ue$1(t.$$.ptr,i,this.registeredClass)}function xr(e){return this.fromWireType(b$6[e>>2])}function On(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Un(e){this.rawDestructor&&this.rawDestructor(e)}function Hn(e){null!==e&&e.delete()}function xn(){X$2.prototype.getPointee=On,X$2.prototype.destructor=Un,X$2.prototype.argPackAdvance=8,X$2.prototype.readValueFromPointer=xr,X$2.prototype.deleteObject=Hn,X$2.prototype.fromWireType=Cn}function X$2(e,t,i,n,r,o,a,s,l,u,c){this.name=e,this.registeredClass=t,this.isReference=i,this.isConst=n,this.isSmartPointer=r,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=u,this.rawDestructor=c,r||void 0!==t.baseClass?this.toWireType=Rn:n?(this.toWireType=Mn,this.destructorFunction=null):(this.toWireType=$n,this.destructorFunction=null)}function Be$1(e,t,i){c$7.hasOwnProperty(e)||Ur("Replacing nonexistant public symbol"),void 0!==c$7[e].overloadTable&&void 0!==i?c$7[e].overloadTable[i]=t:(c$7[e]=t,c$7[e].argCount=i)}function Ln(e,t,i){var n=c$7["dynCall_"+e];return i&&i.length?n.apply(null,[t].concat(i)):n.call(null,t)}function Wn(e,t,i){return e.includes("j")?Ln(e,t,i):k$3(t).apply(null,i)}function zn(e,t){var i=[];return function(){return i.length=0,Object.assign(i,arguments),Wn(e,t,i)}}function nr(e,t){var i=(e=z$2(e)).includes("j")?zn(e,t):k$3(t);return"function"!=typeof i&&j$6("unknown function pointer with signature "+e+": "+t),i}var Ve$2=void 0;function Ye(e){var t=nt$1(e),i=z$2(t);return G$1(t),i}function Lr(e,t){var i=[],n={};throw t.forEach((function e(t){if(!n[t]&&!tr[t]){if(Or[t])return void Or[t].forEach(e);i.push(t),n[t]=!0}})),new Ve$2(e+": "+i.map(Ye).join([", "]))}function In(e,t,i,n,r,o,a,s,l,u,c,h,d){c=z$2(c),o=nr(r,o),s&&(s=nr(a,s)),u&&(u=nr(l,u)),d=nr(h,d);var f=te(c);Ne(f,(function(){Lr("Cannot construct "+c+" due to unbound types",[n])})),fr([e,t,i],n?[n]:[],(function(t){var i,r;t=t[0],n?r=(i=t.registeredClass).instancePrototype:r=Q$3.prototype;var a=ne$1(f,(function(){if(Object.getPrototypeOf(this)!==l)throw new ur("Use 'new' to construct "+c);if(void 0===h.constructor_body)throw new ur(c+" has no accessible constructor");var e=h.constructor_body[arguments.length];if(void 0===e)throw new ur("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(h.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),l=Object.create(r,{constructor:{value:a}});a.prototype=l;var h=new Dn(c,a,l,d,i,o,s,u),p=new X$2(c,h,!0,!1,!1),_=new X$2(c+"*",h,!1,!1,!1),m=new X$2(c+" const*",h,!1,!0,!1);return ze$2[e]={pointerType:_,constPointerType:m},Be$1(f,a),[p,_,m]}))}function fe(e,t){for(var i=[],n=0;n<e;n++)i.push(S[t+4*n>>2]);return i}function qe(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Nn(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var i=ne$1(e.name||"unknownFunctionName",(function(){}));i.prototype=e.prototype;var n=new i,r=e.apply(n,t);return r instanceof Object?r:n}function ce$2(e,t,i,n,r,o){var a=t.length;a<2&&j$6("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==i,l=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){l=!0;break}var c="void"!==t[0].name,h="",d="";for(u=0;u<a-2;++u)h+=(0!==u?", ":"")+"arg"+u,d+=(0!==u?", ":"")+"arg"+u+"Wired";var f="return function "+te(e)+"("+h+") {\nif (arguments.length !== "+(a-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(a-2)+" args!');\n}\n";l&&(f+="var destructors = [];\n");var p=l?"destructors":"null",_=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],m=[j$6,n,r,qe,t[0],t[1]];s&&(f+="var thisWired = classParam.toWireType("+p+", this);\n");for(u=0;u<a-2;++u)f+="var arg"+u+"Wired = argType"+u+".toWireType("+p+", arg"+u+"); // "+t[u+2].name+"\n",_.push("argType"+u),m.push(t[u+2]);if(s&&(d="thisWired"+(d.length>0?", ":"")+d),f+=(c||o?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",l)f+="runDestructors(destructors);\n";else for(u=s?1:2;u<t.length;++u){var g=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==t[u].destructorFunction&&(f+=g+"_dtor("+g+"); // "+t[u].name+"\n",_.push(g+"_dtor"),m.push(t[u].destructorFunction))}return c&&(f+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),f+="}\n",_.push(f),Nn(Function,_).apply(null,m)}function Bn(e,t,i,n,r,o){Ee(t>0);var a=fe(t,i);r=nr(n,r),fr([],[e],(function(e){var i="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new ur("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=()=>{Lr("Cannot construct "+e.name+" due to unbound types",a)},fr([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=ce$2(i,n,null,r,o),[]})),[]}))}function Vn(e,t,i,n,r,o,a,s,l){var u=fe(i,n);t=z$2(t),o=nr(r,o),fr([],[e],(function(e){var n=(e=e[0]).name+"."+t;function r(){Lr("Cannot call "+n+" due to unbound types",u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,h=c[t];return void 0===h||void 0===h.overloadTable&&h.className!==e.name&&h.argCount===i-2?(r.argCount=i-2,r.className=e.name,c[t]=r):(Ie(c,t,n),c[t].overloadTable[i-2]=r),fr([],u,(function(r){var s=ce$2(n,r,e,o,a,l);return void 0===c[t].overloadTable?(s.argCount=i-2,c[t]=s):c[t].overloadTable[i-2]=s,[]})),[]}))}function Yn(){this.allocated=[void 0],this.freelist=[],this.get=function(e){return this.allocated[e]},this.allocate=function(e){let t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},this.free=function(e){this.allocated[e]=void 0,this.freelist.push(e)}}var N$2=new Yn;function le$1(e){e>=N$2.reserved&&0==--N$2.get(e).refcount&&N$2.free(e)}function qn(){for(var e=0,t=N$2.reserved;t<N$2.allocated.length;++t)void 0!==N$2.allocated[t]&&++e;return e}function Xn(){N$2.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),N$2.reserved=N$2.allocated.length,c$7.count_emval_handles=qn}var x$3={toValue:e=>(e||j$6("Cannot use deleted val. handle = "+e),N$2.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return N$2.allocate({refcount:1,value:e})}}};function Gn(e,t){q$2(e,{name:t=z$2(t),fromWireType:function(e){var t=x$3.toValue(e);return le$1(e),t},toWireType:function(e,t){return x$3.toHandle(t)},argPackAdvance:8,readValueFromPointer:xr,destructorFunction:null})}function de(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Kn(e,t){switch(t){case 2:return function(e){return this.fromWireType(be[e>>2])};case 3:return function(e){return this.fromWireType(ke[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Jn(e,t,i){var n=ee(i);q$2(e,{name:t=z$2(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:Kn(t,n),destructorFunction:null})}function Qn(e,t,i,n,r,o,a){var s=fe(t,i);e=z$2(e),r=nr(n,r),Ne(e,(function(){Lr("Cannot call "+e+" due to unbound types",s)}),t-1),fr([],s,(function(i){var n=[i[0],null].concat(i.slice(1));return Be$1(e,ce$2(e,n,null,r,o,a),t-1),[]}))}function Zn(e,t,i){switch(t){case 0:return i?function(e){return U$3[e]}:function(e){return W$2[e]};case 1:return i?function(e){return Z$3[e>>1]}:function(e){return Sr[e>>1]};case 2:return i?function(e){return b$6[e>>2]}:function(e){return S[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function ri(e,t,i,n,r){t=z$2(t);var o=ee(i),a=e=>e;if(0===n){var s=32-8*i;a=e=>e<<s>>>s}var l,u=t.includes("unsigned");l=u?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},q$2(e,{name:t,fromWireType:a,toWireType:l,argPackAdvance:8,readValueFromPointer:Zn(t,o,0!==n),destructorFunction:null})}function ei(e,t,i){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function r(e){var t=S,i=t[e>>=2],r=t[e+1];return new n(t.buffer,r,i)}q$2(e,{name:i=z$2(i),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ignoreDuplicateRegistrations:!0})}function ti(e,t){var i="std::string"===(t=z$2(t));q$2(e,{name:t,fromWireType:function(e){var t,n=S[e>>2],r=e+4;if(i)for(var o=r,a=0;a<=n;++a){var s=r+a;if(a==n||0==W$2[s]){var l=$r(o,s-o);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),o=s+1}}else{var u=new Array(n);for(a=0;a<n;++a)u[a]=String.fromCharCode(W$2[r+a]);t=u.join("")}return G$1(e),t},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n,r="string"==typeof t;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||j$6("Cannot pass non-string to std::string"),n=i&&r?mr(t):t.length;var o=he$1(4+n+1),a=o+4;if(S[o>>2]=n,i&&r)re(t,a,n+1);else if(r)for(var s=0;s<n;++s){var l=t.charCodeAt(s);l>255&&(G$1(a),j$6("String has UTF-16 code units that do not fit in 8 bits")),W$2[a+s]=l}else for(s=0;s<n;++s)W$2[a+s]=t[s];return null!==e&&e.push(G$1,o),o},argPackAdvance:8,readValueFromPointer:xr,destructorFunction:function(e){G$1(e)}})}var Xe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function ni(e,t){for(var i=e,n=i>>1,r=n+t/2;!(n>=r)&&Sr[n];)++n;if((i=n<<1)-e>32&&Xe)return Xe.decode(W$2.subarray(e,i));for(var o="",a=0;!(a>=t/2);++a){var s=Z$3[e+2*a>>1];if(0==s)break;o+=String.fromCharCode(s)}return o}function ii(e,t,i){if(void 0===i&&(i=2147483647),i<2)return 0;for(var n=t,r=(i-=2)<2*e.length?i/2:e.length,o=0;o<r;++o){var a=e.charCodeAt(o);Z$3[t>>1]=a,t+=2}return Z$3[t>>1]=0,t-n}function oi(e){return 2*e.length}function ai(e,t){for(var i=0,n="";!(i>=t/4);){var r=b$6[e+4*i>>2];if(0==r)break;if(++i,r>=65536){var o=r-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(r)}return n}function si(e,t,i){if(void 0===i&&(i=2147483647),i<4)return 0;for(var n=t,r=n+i-4,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o);if(b$6[t>>2]=a,(t+=4)+4>r)break}return b$6[t>>2]=0,t-n}function ui(e){for(var t=0,i=0;i<e.length;++i){var n=e.charCodeAt(i);n>=55296&&n<=57343&&++i,t+=4}return t}function fi(e,t,i){var n,r,o,a,s;i=z$2(i),2===t?(n=ni,r=ii,a=oi,o=()=>Sr,s=1):4===t&&(n=ai,r=si,a=ui,o=()=>S,s=2),q$2(e,{name:i,fromWireType:function(e){for(var i,r=S[e>>2],a=o(),l=e+4,u=0;u<=r;++u){var c=e+4+u*t;if(u==r||0==a[c>>s]){var h=n(l,c-l);void 0===i?i=h:(i+=String.fromCharCode(0),i+=h),l=c+t}}return G$1(e),i},toWireType:function(e,n){"string"!=typeof n&&j$6("Cannot pass non-string to C++ string type "+i);var o=a(n),l=he$1(4+o+t);return S[l>>2]=o>>s,r(n,l+4,o+t),null!==e&&e.push(G$1,l),l},argPackAdvance:8,readValueFromPointer:xr,destructorFunction:function(e){G$1(e)}})}function ci(e,t){q$2(e,{isVoid:!0,name:t=z$2(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}var li=!0;function di(){return li}function Wr(e,t){var i=tr[e];return void 0===i&&j$6(t+" has unknown type "+Ye(e)),i}function vi(e,t,i){e=x$3.toValue(e),t=Wr(t,"emval::as");var n=[],r=x$3.toHandle(n);return S[i>>2]=r,t.toWireType(n,e)}function hi(e,t){for(var i=new Array(e),n=0;n<e;++n)i[n]=Wr(S[t+4*n>>2],"parameter "+n);return i}function pi(e,t,i,n){e=x$3.toValue(e);for(var r=hi(t,i),o=new Array(t),a=0;a<t;++a){var s=r[a];o[a]=s.readValueFromPointer(n),n+=s.argPackAdvance}var l=e.apply(void 0,o);return x$3.toHandle(l)}var mi={};function Ge$1(e){var t=mi[e];return void 0===t?z$2(e):t}function Ke(){return"object"==typeof globalThis?globalThis:Function("return this")()}function yi(e){return 0===e?x$3.toHandle(Ke()):(e=Ge$1(e),x$3.toHandle(Ke()[e]))}function _i(e,t){return e=x$3.toValue(e),t=x$3.toValue(t),x$3.toHandle(e[t])}function gi(e){e>4&&(N$2.get(e).refcount+=1)}function wi(e){for(var t="",i=0;i<e;++i)t+=(0!==i?", ":"")+"arg"+i;var n="return function emval_allocator_"+e+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(i=0;i<e;++i)n+="var argType"+i+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+i+"');\nvar arg"+i+" = argType"+i+".readValueFromPointer(args);\nargs += argType"+i+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+t+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(Wr,c$7,x$3.toHandle,(()=>S))}var Je={};function Ei(e,t,i,n){e=x$3.toValue(e);var r=Je[t];return r||(r=wi(t),Je[t]=r),r(e,i,n)}function bi(e){return x$3.toHandle(Ge$1(e))}function ki(e){qe(x$3.toValue(e)),le$1(e)}function Pi(e,t){var i=(e=Wr(e,"_emval_take_value")).readValueFromPointer(t);return x$3.toHandle(i)}function Ci(){B$1("")}function Ti(){return Date.now()}function Si(e,t,i){W$2.copyWithin(e,t,t+i)}function ji(){return 2147483648}function Fi(e){var t=Tr.buffer;try{return Tr.grow(e-t.byteLength+65535>>>16),Pe(),1}catch{}}function Ai(e){var t=W$2.length;e>>>=0;var i=ji();if(e>i)return!1;let n=(e,t)=>e+(t-e%t)%t;for(var r=1;r<=4;r*=2){var o=t*(1+.2/r);if(o=Math.min(o,e+100663296),Fi(Math.min(i,n(Math.max(e,o),65536))))return!0}return!1}var ve={};function Di(){return Vr||"./this.program"}function Er(){if(!Er.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Di()};for(var t in ve)void 0===ve[t]?delete e[t]:e[t]=ve[t];var i=[];for(var t in e)i.push(t+"="+e[t]);Er.strings=i}return Er.strings}function Mi(e,t){for(var i=0;i<e.length;++i)U$3[t++>>0]=e.charCodeAt(i);U$3[t>>0]=0}function Ri(e,t){var i=0;return Er().forEach((function(n,r){var o=t+i;S[e+4*r>>2]=o,Mi(n,o),i+=n.length+1})),0}function $i(e,t){var i=Er();S[e>>2]=i.length;var n=0;return i.forEach((function(e){n+=e.length+1})),S[t>>2]=n,0}function Oi(e){try{var t=A$2.getStreamFromFD(e);return o$6.close(t),0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return e.errno}}function Ui(e,t,i,n){for(var r=0,o=0;o<i;o++){var a=S[t>>2],s=S[t+4>>2];t+=8;var l=o$6.read(e,U$3,a,s,n);if(l<0)return-1;if(r+=l,l<s)break;typeof n<"u"&&(n+=l)}return r}function Hi(e,t,i,n){try{var r=Ui(A$2.getStreamFromFD(e),t,i);return S[n>>2]=r,0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return e.errno}}function xi(e,t){return t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN}function Li(e,t,i,n,r){try{var o=xi(t,i);if(isNaN(o))return 61;var a=A$2.getStreamFromFD(e);return o$6.llseek(a,o,n),H$1=[a.position>>>0,(T$3=a.position,+Math.abs(T$3)>=1?T$3>0?(0|Math.min(+Math.floor(T$3/4294967296),4294967295))>>>0:~~+Math.ceil((T$3-+(~~T$3>>>0))/4294967296)>>>0:0)],b$6[r>>2]=H$1[0],b$6[r+4>>2]=H$1[1],a.getdents&&0===o&&0===n&&(a.getdents=null),0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return e.errno}}function Wi(e,t,i,n){for(var r=0,o=0;o<i;o++){var a=S[t>>2],s=S[t+4>>2];t+=8;var l=o$6.write(e,U$3,a,s,n);if(l<0)return-1;r+=l,typeof n<"u"&&(n+=l)}return r}function zi(e,t,i,n){try{var r=Wi(A$2.getStreamFromFD(e),t,i);return S[n>>2]=r,0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return e.errno}}function Ii(e){return e}function zr(e){return e%4==0&&(e%100!=0||e%400==0)}function Ni(e,t){for(var i=0,n=0;n<=t;i+=e[n++]);return i}var Ze=[31,29,31,30,31,30,31,31,30,31,30,31],rt$2=[31,28,31,30,31,30,31,31,30,31,30,31];function Bi(e,t){for(var i=new Date(e.getTime());t>0;){var n=zr(i.getFullYear()),r=i.getMonth(),o=(n?Ze:rt$2)[r];if(!(t>o-i.getDate()))return i.setDate(i.getDate()+t),i;t-=o-i.getDate()+1,i.setDate(1),r<11?i.setMonth(r+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1))}return i}function Vi(e,t){U$3.set(e,t)}function Yi(e,t,i,n){var r=b$6[n+40>>2],o={tm_sec:b$6[n>>2],tm_min:b$6[n+4>>2],tm_hour:b$6[n+8>>2],tm_mday:b$6[n+12>>2],tm_mon:b$6[n+16>>2],tm_year:b$6[n+20>>2],tm_wday:b$6[n+24>>2],tm_yday:b$6[n+28>>2],tm_isdst:b$6[n+32>>2],tm_gmtoff:b$6[n+36>>2],tm_zone:r?$r(r):""},a=$r(i),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)a=a.replace(new RegExp(l,"g"),s[l]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(e,t,i){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=i[0]+n;return n}function d(e,t){return h(e,t,"0")}function f(e,t){function i(e){return e<0?-1:e>0?1:0}var n;return 0===(n=i(e.getFullYear()-t.getFullYear()))&&0===(n=i(e.getMonth()-t.getMonth()))&&(n=i(e.getDate()-t.getDate())),n}function p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function _(e){var t=Bi(new Date(e.tm_year+1900,0,1),e.tm_yday),i=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),r=p(i),o=p(n);return f(r,t)<=0?f(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return u[e.tm_wday].substring(0,3)},"%A":function(e){return u[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return h(e.tm_mday,2," ")},"%g":function(e){return _(e).toString().substring(2)},"%G":function(e){return _(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+Ni(zr(e.tm_year+1900)?Ze:rt$2,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return d(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var i=(e.tm_wday+371-e.tm_yday)%7;4!=i&&(3!=i||!zr(e.tm_year))&&(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&zr(e.tm_year%400-1))&&t++}return d(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,i=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(i?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in a=a.replace(/%%/g,"\0\0"),m)a.includes(l)&&(a=a.replace(new RegExp(l,"g"),m[l](o)));var g=Rr(a=a.replace(/\0\0/g,"%"),!1);return g.length>t?0:(Vi(g,e),g.length-1)}function qi(e,t,i,n,r){return Yi(e,t,i,n)}var et$1=function(e,t,i,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=o$6.nextInode++,this.name=t,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=n},Ir=365,Nr=146;Object.defineProperties(et$1.prototype,{read:{get:function(){return(this.mode&Ir)===Ir},set:function(e){e?this.mode|=Ir:this.mode&=~Ir}},write:{get:function(){return(this.mode&Nr)===Nr},set:function(e){e?this.mode|=Nr:this.mode&=~Nr}},isFolder:{get:function(){return o$6.isDir(this.mode)}},isDevice:{get:function(){return o$6.isChrdev(this.mode)}}}),o$6.FSNode=et$1,o$6.staticInit(),dn(),ur=c$7.BindingError=ie(Error,"BindingError"),He$1=c$7.InternalError=ie(Error,"InternalError"),An(),bn(),xn(),Ve$2=c$7.UnboundTypeError=ie(Error,"UnboundTypeError"),Xn();var Xi={t:xt,ja:Lt,Z:Wt,u:zt,a:Nt,i:Bt$1,z:Vt,C:Yt,ka:qt,da:Xt,m:Gt,la:Kt,c:It$1,za:Zt,aa:en,ta:tn,wa:nn,ua:on,xa:an,sa:sn,qa:un,pa:fn,ra:cn,Ya:ln,Ba:pn,X:In,W:Bn,N:Vn,Aa:Gn,ca:Jn,fa:Qn,I:ri,E:ei,ba:ti,S:fi,Ca:ci,ma:di,Qa:vi,Na:pi,Ra:le$1,La:yi,Sa:_i,Ma:gi,Ka:Ei,Ta:bi,Pa:ki,Oa:Pi,R:Ci,na:Ti,ya:Si,oa:Ai,ha:Ri,ia:$i,_:Oi,va:Hi,Xa:Li,$:zi,P:vo,x:Eo,M:Po,A:Lo,j:mo,b:no,Ea:zo,d:uo,ea:_o,g:io,k:ho,Y:Bo,o:yo,p:fo,r:ko$1,y:Ro,F:Oo,J:$o,K:Uo,fb:Ko,eb:Jo,Va:aa,ab:ea,$a:ta,Wa:oa,ga:Yo,Ua:sa,l:ao,Ga:xo,h:lo,Fa:Wo,Ha:Ho,e:oo,Ia:Mo,V:bo,f:so,L:Do,n:co,T:No,q:go,Da:Io,s:po,w:wo,D:Co,G:To,B:Ao,O:Fo,U:So,Ja:jo,Q:Vo,gb:Go,bb:ra,cb:Zo,db:Qo,_a:na,hb:Xo,Za:ia,ib:qo,v:Ii,H:qi};Ht();var tt$1=function(){return(tt$1=c$7.asm.lb).apply(null,arguments)},he$1=function(){return(he$1=c$7.asm.mb).apply(null,arguments)},G$1=function(){return(G$1=c$7.asm.ob).apply(null,arguments)},nt$1=c$7.___getTypeName=function(){return(nt$1=c$7.___getTypeName=c$7.asm.pb).apply(null,arguments)};c$7.__embind_initialize_bindings=function(){return(c$7.__embind_initialize_bindings=c$7.asm.qb).apply(null,arguments)};var it=function(){return(it=c$7.asm.rb).apply(null,arguments)},g$6=function(){return(g$6=c$7.asm.sb).apply(null,arguments)},br=function(){return(br=c$7.asm.tb).apply(null,arguments)},w$2=function(){return(w$2=c$7.asm.ub).apply(null,arguments)},E$2=function(){return(E$2=c$7.asm.vb).apply(null,arguments)},ot$1=function(){return(ot$1=c$7.asm.wb).apply(null,arguments)},at$2=function(){return(at$2=c$7.asm.xb).apply(null,arguments)},st=c$7.dynCall_ji=function(){return(st=c$7.dynCall_ji=c$7.asm.yb).apply(null,arguments)},ut$1=c$7.dynCall_vijii=function(){return(ut$1=c$7.dynCall_vijii=c$7.asm.zb).apply(null,arguments)},ft=c$7.dynCall_viiiiijjii=function(){return(ft=c$7.dynCall_viiiiijjii=c$7.asm.Ab).apply(null,arguments)},ct$1=c$7.dynCall_viiji=function(){return(ct$1=c$7.dynCall_viiji=c$7.asm.Bb).apply(null,arguments)},lt=c$7.dynCall_iiiiiijjii=function(){return(lt=c$7.dynCall_iiiiiijjii=c$7.asm.Cb).apply(null,arguments)},dt$1=c$7.dynCall_iiiiiijjiii=function(){return(dt$1=c$7.dynCall_iiiiiijjiii=c$7.asm.Db).apply(null,arguments)},vt=c$7.dynCall_viiijj=function(){return(vt=c$7.dynCall_viiijj=c$7.asm.Eb).apply(null,arguments)},ht$1=c$7.dynCall_viiiijjii=function(){return(ht$1=c$7.dynCall_viiiijjii=c$7.asm.Fb).apply(null,arguments)},pt=c$7.dynCall_viiiijjiii=function(){return(pt=c$7.dynCall_viiiijjiii=c$7.asm.Gb).apply(null,arguments)},mt=c$7.dynCall_iijiii=function(){return(mt=c$7.dynCall_iijiii=c$7.asm.Hb).apply(null,arguments)},yt=c$7.dynCall_iijiiiii=function(){return(yt=c$7.dynCall_iijiiiii=c$7.asm.Ib).apply(null,arguments)},_t=c$7.dynCall_viij=function(){return(_t=c$7.dynCall_viij=c$7.asm.Jb).apply(null,arguments)},gt=c$7.dynCall_viijii=function(){return(gt=c$7.dynCall_viijii=c$7.asm.Kb).apply(null,arguments)};c$7.dynCall_jii=function(){return(c$7.dynCall_jii=c$7.asm.Lb).apply(null,arguments)},c$7.dynCall_viji=function(){return(c$7.dynCall_viji=c$7.asm.Mb).apply(null,arguments)},c$7.dynCall_iiiji=function(){return(c$7.dynCall_iiiji=c$7.asm.Nb).apply(null,arguments)},c$7.dynCall_jiji=function(){return(c$7.dynCall_jiji=c$7.asm.Ob).apply(null,arguments)};var wt$1=c$7.dynCall_j=function(){return(wt$1=c$7.dynCall_j=c$7.asm.Pb).apply(null,arguments)},Et=c$7.dynCall_iiiiij=function(){return(Et=c$7.dynCall_iiiiij=c$7.asm.Qb).apply(null,arguments)},bt=c$7.dynCall_jiiii=function(){return(bt=c$7.dynCall_jiiii=c$7.asm.Rb).apply(null,arguments)},Br,Module;function no(e,t){var i=w$2();try{return k$3(e)(t)}catch(e){if(E$2(i),e!==e+0)throw e;g$6(1,0)}}function io(e,t,i,n){var r=w$2();try{return k$3(e)(t,i,n)}catch(e){if(E$2(r),e!==e+0)throw e;g$6(1,0)}}function oo(e,t,i){var n=w$2();try{k$3(e)(t,i)}catch(e){if(E$2(n),e!==e+0)throw e;g$6(1,0)}}function ao(e){var t=w$2();try{k$3(e)()}catch(e){if(E$2(t),e!==e+0)throw e;g$6(1,0)}}function so(e,t,i,n){var r=w$2();try{k$3(e)(t,i,n)}catch(e){if(E$2(r),e!==e+0)throw e;g$6(1,0)}}function uo(e,t,i){var n=w$2();try{return k$3(e)(t,i)}catch(e){if(E$2(n),e!==e+0)throw e;g$6(1,0)}}function fo(e,t,i,n,r,o,a){var s=w$2();try{return k$3(e)(t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function co(e,t,i,n,r){var o=w$2();try{k$3(e)(t,i,n,r)}catch(e){if(E$2(o),e!==e+0)throw e;g$6(1,0)}}function lo(e,t){var i=w$2();try{k$3(e)(t)}catch(e){if(E$2(i),e!==e+0)throw e;g$6(1,0)}}function vo(e,t,i,n){var r=w$2();try{return k$3(e)(t,i,n)}catch(e){if(E$2(r),e!==e+0)throw e;g$6(1,0)}}function ho(e,t,i,n,r){var o=w$2();try{return k$3(e)(t,i,n,r)}catch(e){if(E$2(o),e!==e+0)throw e;g$6(1,0)}}function po(e,t,i,n,r,o,a){var s=w$2();try{k$3(e)(t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function mo(e){var t=w$2();try{return k$3(e)()}catch(e){if(E$2(t),e!==e+0)throw e;g$6(1,0)}}function yo(e,t,i,n,r,o){var a=w$2();try{return k$3(e)(t,i,n,r,o)}catch(e){if(E$2(a),e!==e+0)throw e;g$6(1,0)}}function _o(e,t,i,n){var r=w$2();try{return k$3(e)(t,i,n)}catch(e){if(E$2(r),e!==e+0)throw e;g$6(1,0)}}function go(e,t,i,n,r,o){var a=w$2();try{k$3(e)(t,i,n,r,o)}catch(e){if(E$2(a),e!==e+0)throw e;g$6(1,0)}}function wo(e,t,i,n,r,o,a,s){var l=w$2();try{k$3(e)(t,i,n,r,o,a,s)}catch(e){if(E$2(l),e!==e+0)throw e;g$6(1,0)}}function Eo(e,t){var i=w$2();try{return k$3(e)(t)}catch(e){if(E$2(i),e!==e+0)throw e;g$6(1,0)}}function bo(e,t,i,n,r){var o=w$2();try{k$3(e)(t,i,n,r)}catch(e){if(E$2(o),e!==e+0)throw e;g$6(1,0)}}function ko$1(e,t,i,n,r,o,a,s){var l=w$2();try{return k$3(e)(t,i,n,r,o,a,s)}catch(e){if(E$2(l),e!==e+0)throw e;g$6(1,0)}}function Po(e,t,i){var n=w$2();try{return k$3(e)(t,i)}catch(e){if(E$2(n),e!==e+0)throw e;g$6(1,0)}}function Co(e,t,i,n,r,o,a,s,l){var u=w$2();try{k$3(e)(t,i,n,r,o,a,s,l)}catch(e){if(E$2(u),e!==e+0)throw e;g$6(1,0)}}function To(e,t,i,n,r,o,a,s,l,u){var c=w$2();try{k$3(e)(t,i,n,r,o,a,s,l,u)}catch(e){if(E$2(c),e!==e+0)throw e;g$6(1,0)}}function So(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=w$2();try{k$3(e)(t,i,n,r,o,a,s,l,u,c,h,d)}catch(e){if(E$2(f),e!==e+0)throw e;g$6(1,0)}}function jo(e,t,i,n,r,o,a,s,l,u,c,h,d,f){var p=w$2();try{k$3(e)(t,i,n,r,o,a,s,l,u,c,h,d,f)}catch(e){if(E$2(p),e!==e+0)throw e;g$6(1,0)}}function Fo(e,t,i,n,r,o,a,s,l,u,c,h){var d=w$2();try{k$3(e)(t,i,n,r,o,a,s,l,u,c,h)}catch(e){if(E$2(d),e!==e+0)throw e;g$6(1,0)}}function Ao(e,t,i,n,r,o,a,s,l,u,c){var h=w$2();try{k$3(e)(t,i,n,r,o,a,s,l,u,c)}catch(e){if(E$2(h),e!==e+0)throw e;g$6(1,0)}}function Do(e,t,i,n,r,o,a){var s=w$2();try{k$3(e)(t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function Mo(e,t,i,n){var r=w$2();try{k$3(e)(t,i,n)}catch(e){if(E$2(r),e!==e+0)throw e;g$6(1,0)}}function Ro(e,t,i,n,r,o,a,s,l){var u=w$2();try{return k$3(e)(t,i,n,r,o,a,s,l)}catch(e){if(E$2(u),e!==e+0)throw e;g$6(1,0)}}function $o(e,t,i,n,r,o,a,s,l,u,c){var h=w$2();try{return k$3(e)(t,i,n,r,o,a,s,l,u,c)}catch(e){if(E$2(h),e!==e+0)throw e;g$6(1,0)}}function Oo(e,t,i,n,r,o,a,s,l,u){var c=w$2();try{return k$3(e)(t,i,n,r,o,a,s,l,u)}catch(e){if(E$2(c),e!==e+0)throw e;g$6(1,0)}}function Uo(e,t,i,n,r,o,a,s,l,u,c,h){var d=w$2();try{return k$3(e)(t,i,n,r,o,a,s,l,u,c,h)}catch(e){if(E$2(d),e!==e+0)throw e;g$6(1,0)}}function Ho(e,t,i,n,r){var o=w$2();try{k$3(e)(t,i,n,r)}catch(e){if(E$2(o),e!==e+0)throw e;g$6(1,0)}}function xo(e,t,i,n,r,o,a){var s=w$2();try{k$3(e)(t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function Lo(e,t,i,n){var r=w$2();try{return k$3(e)(t,i,n)}catch(e){if(E$2(r),e!==e+0)throw e;g$6(1,0)}}function Wo(e,t,i){var n=w$2();try{k$3(e)(t,i)}catch(e){if(E$2(n),e!==e+0)throw e;g$6(1,0)}}function zo(e,t,i){var n=w$2();try{return k$3(e)(t,i)}catch(e){if(E$2(n),e!==e+0)throw e;g$6(1,0)}}function Io(e,t,i,n,r,o,a){var s=w$2();try{k$3(e)(t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function No(e,t,i,n,r,o,a){var s=w$2();try{k$3(e)(t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function Bo(e,t,i,n,r,o){var a=w$2();try{return k$3(e)(t,i,n,r,o)}catch(e){if(E$2(a),e!==e+0)throw e;g$6(1,0)}}function Vo(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=w$2();try{k$3(e)(t,i,n,r,o,a,s,l,u,c,h,d,f,p,_)}catch(e){if(E$2(m),e!==e+0)throw e;g$6(1,0)}}function Yo(e,t){var i=w$2();try{return st(e,t)}catch(e){if(E$2(i),e!==e+0)throw e;g$6(1,0)}}function qo(e,t,i,n,r,o){var a=w$2();try{ut$1(e,t,i,n,r,o)}catch(e){if(E$2(a),e!==e+0)throw e;g$6(1,0)}}function Xo(e,t,i,n,r,o){var a=w$2();try{ct$1(e,t,i,n,r,o)}catch(e){if(E$2(a),e!==e+0)throw e;g$6(1,0)}}function Go(e,t,i,n,r,o,a,s,l,u,c,h){var d=w$2();try{ft(e,t,i,n,r,o,a,s,l,u,c,h)}catch(e){if(E$2(d),e!==e+0)throw e;g$6(1,0)}}function Ko(e,t,i,n,r,o,a,s,l,u,c,h){var d=w$2();try{return lt(e,t,i,n,r,o,a,s,l,u,c,h)}catch(e){if(E$2(d),e!==e+0)throw e;g$6(1,0)}}function Jo(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=w$2();try{return dt$1(e,t,i,n,r,o,a,s,l,u,c,h,d)}catch(e){if(E$2(f),e!==e+0)throw e;g$6(1,0)}}function Qo(e,t,i,n,r,o,a,s){var l=w$2();try{vt(e,t,i,n,r,o,a,s)}catch(e){if(E$2(l),e!==e+0)throw e;g$6(1,0)}}function Zo(e,t,i,n,r,o,a,s,l,u,c,h){var d=w$2();try{pt(e,t,i,n,r,o,a,s,l,u,c,h)}catch(e){if(E$2(d),e!==e+0)throw e;g$6(1,0)}}function ra(e,t,i,n,r,o,a,s,l,u,c){var h=w$2();try{ht$1(e,t,i,n,r,o,a,s,l,u,c)}catch(e){if(E$2(h),e!==e+0)throw e;g$6(1,0)}}function ea(e,t,i,n,r,o,a){var s=w$2();try{return mt(e,t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function ta(e,t,i,n,r,o,a,s,l){var u=w$2();try{return yt(e,t,i,n,r,o,a,s,l)}catch(e){if(E$2(u),e!==e+0)throw e;g$6(1,0)}}function na(e,t,i,n,r){var o=w$2();try{_t(e,t,i,n,r)}catch(e){if(E$2(o),e!==e+0)throw e;g$6(1,0)}}function ia(e,t,i,n,r,o,a){var s=w$2();try{gt(e,t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function oa(e){var t=w$2();try{return wt$1(e)}catch(e){if(E$2(t),e!==e+0)throw e;g$6(1,0)}}function aa(e,t,i,n,r,o,a){var s=w$2();try{return Et(e,t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function sa(e,t,i,n,r){var o=w$2();try{return bt(e,t,i,n,r)}catch(e){if(E$2(o),e!==e+0)throw e;g$6(1,0)}}function kt(){function e(){Br||(Br=!0,c$7.calledRun=!0,!we&&(Ft(),pe(c$7),c$7.onRuntimeInitialized&&c$7.onRuntimeInitialized(),At()))}rr>0||(jt(),rr>0)||(c$7.setStatus?(c$7.setStatus("Running..."),setTimeout((function(){setTimeout((function(){c$7.setStatus("")}),1),e()}),1)):e())}if(c$7.dynCall_iiiiijj=function(){return(c$7.dynCall_iiiiijj=c$7.asm.Sb).apply(null,arguments)},c$7.dynCall_iiiiiijj=function(){return(c$7.dynCall_iiiiiijj=c$7.asm.Tb).apply(null,arguments)},hr=function e(){Br||kt(),Br||(hr=e)},c$7.preInit)for("function"==typeof c$7.preInit&&(c$7.preInit=[c$7.preInit]);c$7.preInit.length>0;)c$7.preInit.pop()();kt(),Module||(Module=(typeof Module<"u"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1,nodeFS,nodePath;if(Module.ENVIRONMENT)if("WEB"===Module.ENVIRONMENT)ENVIRONMENT_IS_WEB=!0;else if("WORKER"===Module.ENVIRONMENT)ENVIRONMENT_IS_WORKER=!0;else if("NODE"===Module.ENVIRONMENT)ENVIRONMENT_IS_NODE=!0;else{if("SHELL"!==Module.ENVIRONMENT)throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");ENVIRONMENT_IS_SHELL=!0}else ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"function"==typeof require&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE)Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn),Module.read=function(e,t){nodeFS||(nodeFS=require("fs")),nodePath||(nodePath=require("path")),e=nodePath.normalize(e);var i=nodeFS.readFileSync(e);return t?i:i.toString()},Module.readBinary=function(e){var t=Module.read(e,!0);return t.buffer||(t=new Uint8Array(t)),assert(t.buffer),t},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),process.on("uncaughtException",(function(e){if(!(e instanceof ExitStatus))throw e})),Module.inspect=function(){return"[Emscripten Module object]"};else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<"u"&&(Module.printErr=printErr),typeof read<"u"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(e){if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));var t=read(e,"binary");return assert("object"==typeof t),t},typeof scriptArgs<"u"?Module.arguments=scriptArgs:typeof arguments<"u"&&(Module.arguments=arguments),"function"==typeof quit&&(Module.quit=function(e,t){quit(e)});else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw"Unknown runtime environment. Where are we?";if(Module.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),Module.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},typeof arguments<"u"&&(Module.arguments=arguments),typeof console<"u")Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<"u"?function(e){dump(e)}:function(e){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>"u"&&(Module.setWindowTitle=function(e){document.title=e})}function globalEval(e){eval.call(null,e)}for(var key in!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(e,t){throw t}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[],moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(e){return tempRet0=e,e},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(e){STACKTOP=e},getNativeTypeSize:function(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":case"float":return 4;case"i64":case"double":return 8;default:if("*"===e[e.length-1])return Runtime.QUANTUM_SIZE;if("i"===e[0]){var t=parseInt(e.substr(1));return assert(t%8==0),t/8}return 0}},getNativeFieldSize:function(e){return Math.max(Runtime.getNativeTypeSize(e),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(e,t){return"double"===t||"i64"===t?7&e&&(assert(4==(7&e)),e+=4):assert(0==(3&e)),e},getAlignSize:function(e,t,i){return i||"i64"!=e&&"double"!=e?e?Math.min(t||(e?Runtime.getNativeFieldSize(e):0),Runtime.QUANTUM_SIZE):Math.min(t,8):8},dynCall:function(e,t,i){return i&&i.length?Module["dynCall_"+e].apply(null,[t].concat(i)):Module["dynCall_"+e].call(null,t)},functionPointers:[],addFunction:function(e){for(var t=0;t<Runtime.functionPointers.length;t++)if(!Runtime.functionPointers[t])return Runtime.functionPointers[t]=e,2*(1+t);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},removeFunction:function(e){Runtime.functionPointers[(e-2)/2]=null},warnOnce:function(e){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[e]||(Runtime.warnOnce.shown[e]=1,Module.printErr(e))},funcWrappers:{},getFuncWrapper:function(e,t){assert(t),Runtime.funcWrappers[t]||(Runtime.funcWrappers[t]={});var i=Runtime.funcWrappers[t];return i[e]||(1===t.length?i[e]=function(){return Runtime.dynCall(t,e)}:2===t.length?i[e]=function(i){return Runtime.dynCall(t,e,[i])}:i[e]=function(){return Runtime.dynCall(t,e,Array.prototype.slice.call(arguments))}),i[e]},getCompilerSetting:function(e){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},stackAlloc:function(e){var t=STACKTOP;return STACKTOP=(STACKTOP=STACKTOP+e|0)+15&-16,t},staticAlloc:function(e){var t=STATICTOP;return STATICTOP=(STATICTOP=STATICTOP+e|0)+15&-16,t},dynamicAlloc:function(e){var t=HEAP32[DYNAMICTOP_PTR>>2],i=-16&(t+e+15|0);if((HEAP32[DYNAMICTOP_PTR>>2]=i,i>=TOTAL_MEMORY)&&!enlargeMemory())return HEAP32[DYNAMICTOP_PTR>>2]=t,0;return t},alignMemory:function(e,t){return e=Math.ceil(e/(t||16))*(t||16)},makeBigInt:function(e,t,i){return i?+(e>>>0)+4294967296*+(t>>>0):+(e>>>0)+4294967296*+(0|t)},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,cwrap,ccall;function assert(e,t){e||abort("Assertion failed: "+t)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(e){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}function setValue(e,t,i,n){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":HEAP8[e>>0]=t;break;case"i16":HEAP16[e>>1]=t;break;case"i32":HEAP32[e>>2]=t;break;case"i64":tempI64=[t>>>0,(tempDouble=t,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=t;break;case"double":HEAPF64[e>>3]=t;break;default:abort("invalid type for setValue: "+i)}}function getValue(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return HEAP8[e>>0];case"i16":return HEAP16[e>>1];case"i32":case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];default:abort("invalid type for setValue: "+t)}return null}(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(e){var t=Runtime.stackAlloc(e.length);return writeArrayToMemory(e,t),t},stringToC:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);stringToUTF8(e,t=Runtime.stackAlloc(i),i)}return t}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,t,i,n,r){var o=getCFunc(e),a=[],s=0;if(n)for(var l=0;l<n.length;l++){var u=toC[i[l]];u?(0===s&&(s=Runtime.stackSave()),a[l]=u(n[l])):a[l]=n[l]}var c=o.apply(null,a);if("string"===t&&(c=Pointer_stringify(c)),0!==s){if(r&&r.async)return void EmterpreterAsync.asyncFinalizers.push((function(){Runtime.stackRestore(s)}));Runtime.stackRestore(s)}return c};var sourceRegex=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(e){var t=e.toString().match(sourceRegex).slice(1);return{arguments:t[0],body:t[1],returnValue:t[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource)for(var e in JSsource={},JSfuncs)JSfuncs.hasOwnProperty(e)&&(JSsource[e]=parseJSFunc(JSfuncs[e]))}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every((function(e){return"number"===e})),numericRet="string"!==returnType;if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map((function(e,t){return"$"+t})),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if("number"!==type){var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";",funcstr+=convertCode.body+";",funcstr+=arg+"=("+convertCode.returnValue+");"}}}var cfuncname=parseJSFunc((function(){return cfunc})).returnValue;if(funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");",!numericRet){var strgfy=parseJSFunc((function(){return Pointer_stringify})).returnValue;funcstr+="ret = "+strgfy+"(ret);"}return numericArgs||(ensureJSsource(),funcstr+=JSsource.stackRestore.body.replace("()","(stack)")+";"),funcstr+="return ret})",eval(funcstr)}})(),Module.ccall=ccall,Module.cwrap=cwrap,Module.setValue=setValue,Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;function allocate(e,t,i,n){var r,o;"number"==typeof e?(r=!0,o=e):(r=!1,o=e.length);var a,s="string"==typeof t?t:null;if(a=i==ALLOC_NONE?n:["function"==typeof _malloc?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][void 0===i?ALLOC_STATIC:i](Math.max(o,s?1:t.length)),r){var l;n=a;for(assert(0==(3&a)),l=a+(-4&o);n<l;n+=4)HEAP32[n>>2]=0;for(l=a+o;n<l;)HEAP8[n++>>0]=0;return a}if("i8"===s)return e.subarray||e.slice?HEAPU8.set(e,a):HEAPU8.set(new Uint8Array(e),a),a;for(var u,c,h,d=0;d<o;){var f=e[d];("function"==typeof f&&(f=Runtime.getFunctionIndex(f)),0!==(u=s||t[d]))?("i64"==u&&(u="i32"),setValue(a+d,f,u),h!==u&&(c=Runtime.getNativeTypeSize(u),h=u),d+=c):d++}return a}function getMemory(e){return staticSealed?runtimeInitialized?_malloc(e):Runtime.dynamicAlloc(e):Runtime.staticAlloc(e)}function Pointer_stringify(e,t){if(0===t||!e)return"";for(var i,n=0,r=0;n|=i=HEAPU8[e+r>>0],(0!=i||t)&&(r++,!t||r!=t););t||(t=r);var o="";if(n<128){for(var a,s=1024;t>0;)a=String.fromCharCode.apply(String,HEAPU8.subarray(e,e+Math.min(t,s))),o=o?o+a:a,e+=s,t-=s;return o}return Module.UTF8ToString(e)}function AsciiToString(e){for(var t="";;){var i=HEAP8[e++>>0];if(!i)return t;t+=String.fromCharCode(i)}}function stringToAscii(e,t){return writeAsciiToMemory(e,t,!1)}Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE,Module.allocate=allocate,Module.getMemory=getMemory,Module.Pointer_stringify=Pointer_stringify,Module.AsciiToString=AsciiToString,Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(e,t){for(var i=t;e[i];)++i;if(i-t>16&&e.subarray&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,i));for(var n,r,o,a,s,l="";;){if(!(n=e[t++]))return l;if(128&n)if(r=63&e[t++],192!=(224&n))if(o=63&e[t++],224==(240&n)?n=(15&n)<<12|r<<6|o:(a=63&e[t++],240==(248&n)?n=(7&n)<<18|r<<12|o<<6|a:(s=63&e[t++],248==(252&n)?n=(3&n)<<24|r<<18|o<<12|a<<6|s:n=(1&n)<<30|r<<24|o<<18|a<<12|s<<6|63&e[t++])),n<65536)l+=String.fromCharCode(n);else{var u=n-65536;l+=String.fromCharCode(55296|u>>10,56320|1023&u)}else l+=String.fromCharCode((31&n)<<6|r);else l+=String.fromCharCode(n)}}function UTF8ToString(e){return UTF8ArrayToString(HEAPU8,e)}function stringToUTF8Array(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else if(s<=2097151){if(i+3>=o)break;t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}else if(s<=67108863){if(i+4>=o)break;t[i++]=248|s>>24,t[i++]=128|s>>18&63,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+5>=o)break;t[i++]=252|s>>30,t[i++]=128|s>>24&63,t[i++]=128|s>>18&63,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r}function stringToUTF8(e,t,i){return stringToUTF8Array(e,HEAPU8,t,i)}function lengthBytesUTF8(e){for(var t=0,i=0;i<e.length;++i){var n=e.charCodeAt(i);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++i)),n<=127?++t:t+=n<=2047?2:n<=65535?3:n<=2097151?4:n<=67108863?5:6}return t}function demangle(e){var t=Module.___cxa_demangle||Module.__cxa_demangle;if(t){try{var i=e.substr(1),n=lengthBytesUTF8(i)+1,r=_malloc(n);stringToUTF8(i,r,n);var o=_malloc(4),a=t(r,0,0,o);if(0===getValue(o,"i32")&&a)return Pointer_stringify(a)}catch{}finally{r&&_free(r),o&&_free(o),a&&_free(a)}return e}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function demangleAll(e){return e.replace(/__Z[\w\d_]+/g,(function(e){var t=demangle(e);return e===t?e:e+" ["+t+"]"}))}function jsStackTrace(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function stackTrace(){var e=jsStackTrace();return Module.extraStackTrace&&(e+="\n"+Module.extraStackTrace()),demangleAll(e)}Module.UTF8ArrayToString=UTF8ArrayToString,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8Array=stringToUTF8Array,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,typeof TextDecoder<"u"&&new TextDecoder("utf-16le"),Module.stackTrace=stackTrace;var WASM_PAGE_SIZE=65536,ASMJS_PAGE_SIZE=16777216,MIN_TOTAL_MEMORY=16777216,HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR,byteLength;function alignUp(e,t){return e%t>0&&(e+=t-e%t),e}function updateGlobalBuffer(e){Module.buffer=buffer=e}function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){var e=Module.usingWasm?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE,t=2147483648-e;if(HEAP32[DYNAMICTOP_PTR>>2]>t)return!1;var i=TOTAL_MEMORY;for(TOTAL_MEMORY=Math.max(TOTAL_MEMORY,MIN_TOTAL_MEMORY);TOTAL_MEMORY<HEAP32[DYNAMICTOP_PTR>>2];)TOTAL_MEMORY=TOTAL_MEMORY<=536870912?alignUp(2*TOTAL_MEMORY,e):Math.min(alignUp((3*TOTAL_MEMORY+2147483648)/4,e),t);var n=Module.reallocBuffer(TOTAL_MEMORY);return n&&n.byteLength==TOTAL_MEMORY?(updateGlobalBuffer(n),updateGlobalBufferViews(),!0):(TOTAL_MEMORY=i,!1)}STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1,Module.reallocBuffer||(Module.reallocBuffer=function(e){var t;try{if(ArrayBuffer.transfer)t=ArrayBuffer.transfer(buffer,e);else{var i=HEAP8;t=new ArrayBuffer(e),new Int8Array(t).set(i)}}catch{return!1}return!!_emscripten_replace_memory(t)&&t});try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get),byteLength(new ArrayBuffer(4))}catch(d){byteLength=function(e){return e.byteLength}}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216;function getTotalMemory(){return TOTAL_MEMORY}if(TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),buffer=Module.buffer?Module.buffer:new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews(),HEAP32[0]=1668509029,HEAP16[1]=25459,115!==HEAPU8[2]||99!==HEAPU8[3])throw"Runtime error: expected the system to be little-endian!";function callRuntimeCallbacks(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?Module.dynCall_v(i):Module.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}}Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__)}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPreMain(e){__ATMAIN__.unshift(e)}function addOnExit(e){__ATEXIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}function intArrayFromString(e,t,i){var n=i>0?i:lengthBytesUTF8(e)+1,r=new Array(n),o=stringToUTF8Array(e,r,0,r.length);return t&&(r.length=o),r}function intArrayToString(e){for(var t=[],i=0;i<e.length;i++){var n=e[i];n>255&&(n&=255),t.push(String.fromCharCode(n))}return t.join("")}function writeStringToMemory(e,t,i){var n,r;Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!"),i&&(r=t+lengthBytesUTF8(e),n=HEAP8[r]),stringToUTF8(e,t,1/0),i&&(HEAP8[r]=n)}function writeArrayToMemory(e,t){HEAP8.set(e,t)}function writeAsciiToMemory(e,t,i){for(var n=0;n<e.length;++n)HEAP8[t++>>0]=e.charCodeAt(n);i||(HEAP8[t>>0]=0)}Module.addOnPreRun=addOnPreRun,Module.addOnInit=addOnInit,Module.addOnPreMain=addOnPreMain,Module.addOnExit=addOnExit,Module.addOnPostRun=addOnPostRun,Module.intArrayFromString=intArrayFromString,Module.intArrayToString=intArrayToString,Module.writeStringToMemory=writeStringToMemory,Module.writeArrayToMemory=writeArrayToMemory,Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||-5!==Math.imul(4294967295,5))&&(Math.imul=function(e,t){var i=65535&e,n=65535&t;return i*n+((e>>>16)*n+i*(t>>>16)<<16)|0}),Math.imul=Math.imul,Math.clz32||(Math.clz32=function(e){e>>>=0;for(var t=0;t<32;t++)if(e&1<<31-t)return t;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_min=Math.min,runDependencies=0,dependenciesFulfilled=null;function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={},STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+6192,__ATINIT__.push(),allocate([228,2,0,0,81,16,0,0,12,3,0,0,177,16,0,0,32,0,0,0,0,0,0,0,12,3,0,0,94,16,0,0,48,0,0,0,0,0,0,0,228,2,0,0,127,16,0,0,12,3,0,0,140,16,0,0,16,0,0,0,0,0,0,0,12,3,0,0,183,17,0,0,32,0,0,0,0,0,0,0,12,3,0,0,147,17,0,0,72,0,0,0,0,0,0,0,108,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,32,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,1,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,40,20,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,16,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,56,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,37,115,40,37,117,41,58,32,65,115,115,101,114,116,105,111,110,32,102,97,105,108,117,114,101,58,32,34,37,115,34,10,0,109,95,115,105,122,101,32,60,61,32,109,95,99,97,112,97,99,105,116,121,0,46,47,105,110,99,92,99,114,110,95,100,101,99,111,109,112,46,104,0,109,105,110,95,110,101,119,95,99,97,112,97,99,105,116,121,32,60,32,40,48,120,55,70,70,70,48,48,48,48,85,32,47,32,101,108,101,109,101,110,116,95,115,105,122,101,41,0,110,101,119,95,99,97,112,97,99,105,116,121,32,38,38,32,40,110,101,119,95,99,97,112,97,99,105,116,121,32,62,32,109,95,99,97,112,97,99,105,116,121,41,0,110,117,109,95,99,111,100,101,115,91,99,93,0,115,111,114,116,101,100,95,112,111,115,32,60,32,116,111,116,97,108,95,117,115,101,100,95,115,121,109,115,0,112,67,111,100,101,115,105,122,101,115,91,115,121,109,95,105,110,100,101,120,93,32,61,61,32,99,111,100,101,115,105,122,101,0,116,32,60,32,40,49,85,32,60,60,32,116,97,98,108,101,95,98,105,116,115,41,0,109,95,108,111,111,107,117,112,91,116,93,32,61,61,32,99,85,73,78,84,51,50,95,77,65,88,0,99,114,110,100,95,109,97,108,108,111,99,58,32,115,105,122,101,32,116,111,111,32,98,105,103,0,99,114,110,100,95,109,97,108,108,111,99,58,32,111,117,116,32,111,102,32,109,101,109,111,114,121,0,40,40,117,105,110,116,51,50,41,112,95,110,101,119,32,38,32,40,67,82,78,68,95,77,73,78,95,65,76,76,79,67,95,65,76,73,71,78,77,69,78,84,32,45,32,49,41,41,32,61,61,32,48,0,99,114,110,100,95,114,101,97,108,108,111,99,58,32,98,97,100,32,112,116,114,0,99,114,110,100,95,102,114,101,101,58,32,98,97,100,32,112,116,114,0,102,97,108,115,101,0,40,116,111,116,97,108,95,115,121,109,115,32,62,61,32,49,41,32,38,38,32,40,116,111,116,97,108,95,115,121,109,115,32,60,61,32,112,114,101,102,105,120,95,99,111,100,105,110,103,58,58,99,77,97,120,83,117,112,112,111,114,116,101,100,83,121,109,115,41,0,17,18,19,20,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,16,48,0,110,117,109,95,98,105,116,115,32,60,61,32,51,50,85,0,109,95,98,105,116,95,99,111,117,110,116,32,60,61,32,99,66,105,116,66,117,102,83,105,122,101,0,116,32,33,61,32,99,85,73,78,84,51,50,95,77,65,88,0,109,111,100,101,108,46,109,95,99,111,100,101,95,115,105,122,101,115,91,115,121,109,93,32,61,61,32,108,101,110,0,0,2,3,1,0,2,3,4,5,6,7,1,40,108,101,110,32,62,61,32,49,41,32,38,38,32,40,108,101,110,32,60,61,32,99,77,97,120,69,120,112,101,99,116,101,100,67,111,100,101,83,105,122,101,41,0,105,32,60,32,109,95,115,105,122,101,0,110,101,120,116,95,108,101,118,101,108,95,111,102,115,32,62,32,99,117,114,95,108,101,118,101,108,95,111,102,115,0,1,2,2,3,3,3,3,4,0,0,0,0,0,0,1,1,0,1,0,1,0,0,1,2,1,2,0,0,0,1,0,2,1,0,2,0,0,1,2,3,110,117,109,32,38,38,32,40,110,117,109,32,61,61,32,126,110,117,109,95,99,104,101,99,107,41,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,83,116,57,101,120,99,101,112,116,105,111,110,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,83,116,57,116,121,112,101,95,105,110,102,111,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;function _abort(){Module.abort()}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}STATICTOP+=16;var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function(e){if(!e||EXCEPTIONS.infos[e])return e;for(var t in EXCEPTIONS.infos){if(EXCEPTIONS.infos[t].adjusted===e)return t}return e},addRef:function(e){e&&EXCEPTIONS.infos[e].refcount++},decRef:function(e){if(e){var t=EXCEPTIONS.infos[e];assert(t.refcount>0),t.refcount--,0===t.refcount&&!t.rethrown&&(t.destructor&&Module.dynCall_vi(t.destructor,e),delete EXCEPTIONS.infos[e],___cxa_free_exception(e))}},clearRef:function(e){e&&(EXCEPTIONS.infos[e].refcount=0)}};function ___cxa_begin_catch(e){var t=EXCEPTIONS.infos[e];return t&&!t.caught&&(t.caught=!0,__ZSt18uncaught_exceptionv.uncaught_exception--),t&&(t.rethrown=!1),EXCEPTIONS.caught.push(e),EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(e)),e}function _pthread_once(e,t){_pthread_once.seen||(_pthread_once.seen={}),!(e in _pthread_once.seen)&&(Module.dynCall_v(t),_pthread_once.seen[e]=1)}function _emscripten_memcpy_big(e,t,i){return HEAPU8.set(HEAPU8.subarray(t,t+i),e),e}var SYSCALLS={varargs:0,get:function(e){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(){return Pointer_stringify(SYSCALLS.get())},get64:function(){var e=SYSCALLS.get(),t=SYSCALLS.get();return assert(e>=0?0===t:-1===t),e},getZero:function(){assert(0===SYSCALLS.get())}};function ___syscall6(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.getStreamFromFD();return FS.close(i),0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC),PTHREAD_SPECIFIC={};function _pthread_getspecific(e){return PTHREAD_SPECIFIC[e]||0}function ___setErrNo(e){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=e),e}var PTHREAD_SPECIFIC_NEXT_KEY=1,ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _pthread_key_create(e,t){return 0==e?ERRNO_CODES.EINVAL:(HEAP32[e>>2]=PTHREAD_SPECIFIC_NEXT_KEY,PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0,PTHREAD_SPECIFIC_NEXT_KEY++,0)}function ___resumeException(e){throw EXCEPTIONS.last||(EXCEPTIONS.last=e),e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var e=EXCEPTIONS.last;if(!e)return Runtime.setTempRet0(0),0;var t=EXCEPTIONS.infos[e],i=t.type;if(!i)return Runtime.setTempRet0(0),0|e;var n=Array.prototype.slice.call(arguments);Module.___cxa_is_pointer_type(i),___cxa_find_matching_catch.buffer||(___cxa_find_matching_catch.buffer=_malloc(4)),HEAP32[___cxa_find_matching_catch.buffer>>2]=e,e=___cxa_find_matching_catch.buffer;for(var r=0;r<n.length;r++)if(n[r]&&Module.___cxa_can_catch(n[r],i,e))return e=HEAP32[e>>2],t.adjusted=e,Runtime.setTempRet0(n[r]),0|e;return e=HEAP32[e>>2],Runtime.setTempRet0(i),0|e}function ___gxx_personality_v0(){}function _pthread_setspecific(e,t){return e in PTHREAD_SPECIFIC?(PTHREAD_SPECIFIC[e]=t,0):ERRNO_CODES.EINVAL}function ___syscall140(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.getStreamFromFD(),n=(SYSCALLS.get(),SYSCALLS.get()),r=SYSCALLS.get(),o=SYSCALLS.get(),a=n;return FS.llseek(i,a,o),HEAP32[r>>2]=i.position,i.getdents&&0===a&&0===o&&(i.getdents=null),0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function ___syscall146(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.get(),n=SYSCALLS.get(),r=SYSCALLS.get(),o=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(e,t){var i=___syscall146.buffers[e];assert(i),0===t||10===t?((1===e?Module.print:Module.printErr)(UTF8ArrayToString(i,0)),i.length=0):i.push(t)});for(var a=0;a<r;a++){for(var s=HEAP32[n+8*a>>2],l=HEAP32[n+(8*a+4)>>2],u=0;u<l;u++)___syscall146.printChar(i,HEAPU8[s+u]);o+=l}return o}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function ___syscall54(e,t){SYSCALLS.varargs=t;try{return 0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function invoke_iiii(e,t,i,n){try{return Module.dynCall_iiii(e,t,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiiii(e,t,i,n,r,o){try{Module.dynCall_viiiii(e,t,i,n,r,o)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_vi(e,t){try{Module.dynCall_vi(e,t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_ii(e,t){try{return Module.dynCall_ii(e,t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viii(e,t,i,n){try{Module.dynCall_viii(e,t,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_v(e){try{Module.dynCall_v(e)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiiiii(e,t,i,n,r,o,a){try{Module.dynCall_viiiiii(e,t,i,n,r,o,a)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiii(e,t,i,n,r){try{Module.dynCall_viiii(e,t,i,n,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}__ATEXIT__.push((function(){var e=Module._fflush;e&&e(0);var t=___syscall146.printChar;if(t){var i=___syscall146.buffers;i[1].length&&t(1,10),i[2].length&&t(2,10)}})),DYNAMICTOP_PTR=allocate(1,"i32",ALLOC_STATIC),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX),HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE,staticSealed=!0,Module.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:1/0,byteLength:byteLength},Module.asmLibraryArg={abort:abort,assert:assert,enlargeMemory:enlargeMemory,getTotalMemory:getTotalMemory,abortOnCannotGrowMemory:abortOnCannotGrowMemory,invoke_iiii:invoke_iiii,invoke_viiiii:invoke_viiiii,invoke_vi:invoke_vi,invoke_ii:invoke_ii,invoke_viii:invoke_viii,invoke_v:invoke_v,invoke_viiiiii:invoke_viiiiii,invoke_viiii:invoke_viiii,_pthread_getspecific:_pthread_getspecific,___syscall54:___syscall54,_pthread_setspecific:_pthread_setspecific,___gxx_personality_v0:___gxx_personality_v0,___syscall6:___syscall6,___setErrNo:___setErrNo,_abort:_abort,___cxa_begin_catch:___cxa_begin_catch,_pthread_once:_pthread_once,_emscripten_memcpy_big:_emscripten_memcpy_big,_pthread_key_create:_pthread_key_create,___syscall140:___syscall140,___resumeException:___resumeException,___cxa_find_matching_catch:___cxa_find_matching_catch,___syscall146:___syscall146,__ZSt18uncaught_exceptionv:__ZSt18uncaught_exceptionv,DYNAMICTOP_PTR:DYNAMICTOP_PTR,tempDoublePtr:tempDoublePtr,ABORT:ABORT,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX,cttz_i8:cttz_i8};var asm=function(e,t,i){var n=e.Int8Array,r=new n(i),o=e.Int16Array,a=new o(i),s=e.Int32Array,l=new s(i),u=e.Uint8Array,c=new u(i),h=e.Uint16Array,d=new h(i),f=e.Uint32Array;new f(i);var p=e.Float32Array;new p(i);var _=e.Float64Array,m=new _(i),g=e.byteLength,x=0|t.DYNAMICTOP_PTR,y=0|t.tempDoublePtr;t.ABORT;var v=0|t.STACKTOP;t.STACK_MAX;var $=0|t.cttz_i8;e.NaN,e.Infinity;var b=0;e.Math.floor,e.Math.abs,e.Math.sqrt,e.Math.pow,e.Math.cos,e.Math.sin,e.Math.tan,e.Math.acos,e.Math.asin,e.Math.atan,e.Math.atan2,e.Math.exp,e.Math.log,e.Math.ceil;var T=e.Math.imul;e.Math.min,e.Math.max;var C=e.Math.clz32,S=t.abort;t.assert;var w=t.enlargeMemory,E=t.getTotalMemory,P=t.abortOnCannotGrowMemory;t.invoke_iiii,t.invoke_viiiii,t.invoke_vi,t.invoke_ii,t.invoke_viii,t.invoke_v,t.invoke_viiiiii,t.invoke_viiii;var A=t._pthread_getspecific,L=t.___syscall54,M=t._pthread_setspecific;t.___gxx_personality_v0;var R=t.___syscall6,O=t.___setErrNo,D=t._abort;t.___cxa_begin_catch;var I=t._pthread_once,F=t._emscripten_memcpy_big,B=t._pthread_key_create,N=t.___syscall140;t.___resumeException,t.___cxa_find_matching_catch;var G=t.___syscall146;function z(e){e|=0;var t,i=0,n=0,r=0,o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,y=0,$=0,b=0,T=0;t=v,v=v+16|0,p=t;do{if(e>>>0<245){if(e=(h=e>>>0<11?16:e+11&-8)>>>3,3&(n=(f=0|l[1144])>>>e)|0)return r=0|l[(n=(e=4616+((i=(1&n^1)+e|0)<<1<<2)|0)+8|0)>>2],(0|e)==(0|(a=0|l[(o=r+8|0)>>2]))?l[1144]=f&~(1<<i):(l[a+12>>2]=e,l[n>>2]=a),T=i<<3,l[r+4>>2]=3|T,l[(T=r+T+4|0)>>2]=1|l[T>>2],v=t,0|(T=o);if(h>>>0>(d=0|l[1146])>>>0){if(0|n)return i=((i=n<<e&((i=2<<e)|0-i))&0-i)-1|0,o=0|l[(e=(i=4616+((r=((n=(i>>>=s=i>>>12&16)>>>5&8)|s|(o=(i>>>=n)>>>2&4)|(e=(i>>>=o)>>>1&2)|(r=(i>>>=e)>>>1&1))+(i>>>r)|0)<<1<<2)|0)+8|0)>>2],(0|i)==(0|(n=0|l[(s=o+8|0)>>2]))?(e=f&~(1<<r),l[1144]=e):(l[n+12>>2]=i,l[e>>2]=n,e=f),a=(r<<3)-h|0,l[o+4>>2]=3|h,l[(r=o+h|0)+4>>2]=1|a,l[r+a>>2]=a,0|d&&(o=0|l[1149],n=4616+((i=d>>>3)<<1<<2)|0,e&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=o,l[i+12>>2]=o,l[o+8>>2]=i,l[o+12>>2]=n),l[1146]=a,l[1149]=r,v=t,0|(T=s);if(u=0|l[1145]){if(n=(u&0-u)-1|0,e=0|l[4880+(((a=(n>>>=s=n>>>12&16)>>>5&8)|s|(c=(n>>>=a)>>>2&4)|(r=(n>>>=c)>>>1&2)|(e=(n>>>=r)>>>1&1))+(n>>>e)<<2)>>2],n=(-8&l[e+4>>2])-h|0,r=0|l[e+16+((0==(0|l[e+16>>2])&1)<<2)>>2]){do{n=(c=(s=(-8&l[r+4>>2])-h|0)>>>0<n>>>0)?s:n,e=c?r:e,r=0|l[r+16+((0==(0|l[r+16>>2])&1)<<2)>>2]}while(0!=(0|r));c=e,a=n}else c=e,a=n;if(c>>>0<(s=c+h|0)>>>0){o=0|l[c+24>>2],i=0|l[c+12>>2];do{if((0|i)==(0|c)){if(!(i=0|l[(e=c+20|0)>>2])&&!(i=0|l[(e=c+16|0)>>2])){n=0;break}for(;;)if(0|(r=0|l[(n=i+20|0)>>2]))i=r,e=n;else{if(!(r=0|l[(n=i+16|0)>>2]))break;i=r,e=n}l[e>>2]=0,n=i}else n=0|l[c+8>>2],l[n+12>>2]=i,l[i+8>>2]=n,n=i}while(0);do{if(0|o){if(i=0|l[c+28>>2],(0|c)==(0|l[(e=4880+(i<<2)|0)>>2])){if(l[e>>2]=n,!n){l[1145]=u&~(1<<i);break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|c)&1)<<2)>>2]=n,!n)break;l[n+24>>2]=o,0|(i=0|l[c+16>>2])&&(l[n+16>>2]=i,l[i+24>>2]=n),0|(i=0|l[c+20>>2])&&(l[n+20>>2]=i,l[i+24>>2]=n)}}while(0);return a>>>0<16?(T=a+h|0,l[c+4>>2]=3|T,l[(T=c+T+4|0)>>2]=1|l[T>>2]):(l[c+4>>2]=3|h,l[s+4>>2]=1|a,l[s+a>>2]=a,0|d&&(r=0|l[1149],n=4616+((i=d>>>3)<<1<<2)|0,f&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=f|i,i=n,e=n+8|0),l[e>>2]=r,l[i+12>>2]=r,l[r+8>>2]=i,l[r+12>>2]=n),l[1146]=a,l[1149]=s),v=t,0|(T=c+8|0)}f=h}else f=h}else f=h}else if(e>>>0<=4294967231)if(h=-8&(e=e+11|0),c=0|l[1145]){r=0-h|0,(e>>>=8)?h>>>0>16777215?u=31:u=h>>>((u=14-((d=((b=e<<(f=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|f|(u=((b<<=d)+245760|0)>>>16&2))+(b<<u>>>15)|0)+7|0)&1|u<<1:u=0,n=0|l[4880+(u<<2)>>2];e:do{if(n)for(e=0,s=h<<(31==(0|u)?0:25-(u>>>1)|0),a=0;;){if((o=(-8&l[n+4>>2])-h|0)>>>0<r>>>0){if(!o){e=n,r=0,o=n,b=61;break e}e=n,r=o}if(a=0==(0|(o=0|l[n+20>>2]))|(0|o)==(0|(n=0|l[n+16+(s>>>31<<2)>>2]))?a:o,o=0==(0|n)){n=a,b=57;break}s<<=1&(1^o)}else n=0,e=0,b=57}while(0);if(57==(0|b)){if(0==(0|n)&0==(0|e)){if(!(e=c&((e=2<<u)|0-e))){f=h;break}f=(e&0-e)-1|0,e=0,n=0|l[4880+(((a=(f>>>=s=f>>>12&16)>>>5&8)|s|(u=(f>>>=a)>>>2&4)|(d=(f>>>=u)>>>1&2)|(n=(f>>>=d)>>>1&1))+(f>>>n)<<2)>>2]}n?(o=n,b=61):(u=e,s=r)}if(61==(0|b))for(;;){if(b=0,n=(f=(n=(-8&l[o+4>>2])-h|0)>>>0<r>>>0)?n:r,e=f?o:e,!(o=0|l[o+16+((0==(0|l[o+16>>2])&1)<<2)>>2])){u=e,s=n;break}r=n,b=61}if(0!=(0|u)&&s>>>0<((0|l[1146])-h|0)>>>0){if(u>>>0>=(a=u+h|0)>>>0)return v=t,0|(T=0);o=0|l[u+24>>2],i=0|l[u+12>>2];do{if((0|i)==(0|u)){if(!(i=0|l[(e=u+20|0)>>2])&&!(i=0|l[(e=u+16|0)>>2])){i=0;break}for(;;)if(0|(r=0|l[(n=i+20|0)>>2]))i=r,e=n;else{if(!(r=0|l[(n=i+16|0)>>2]))break;i=r,e=n}l[e>>2]=0}else T=0|l[u+8>>2],l[T+12>>2]=i,l[i+8>>2]=T}while(0);do{if(o){if(e=0|l[u+28>>2],(0|u)==(0|l[(n=4880+(e<<2)|0)>>2])){if(l[n>>2]=i,!i){r=c&~(1<<e),l[1145]=r;break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|u)&1)<<2)>>2]=i,!i){r=c;break}l[i+24>>2]=o,0|(e=0|l[u+16>>2])&&(l[i+16>>2]=e,l[e+24>>2]=i),(e=0|l[u+20>>2])&&(l[i+20>>2]=e,l[e+24>>2]=i),r=c}else r=c}while(0);do{if(s>>>0>=16){if(l[u+4>>2]=3|h,l[a+4>>2]=1|s,l[a+s>>2]=s,i=s>>>3,s>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=a,l[i+12>>2]=a,l[a+8>>2]=i,l[a+12>>2]=n;break}if((i=s>>>8)?s>>>0>16777215?i=31:i=s>>>((i=14-(($=((T=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(i=((T<<=$)+245760|0)>>>16&2))+(T<<i>>>15)|0)+7|0)&1|i<<1:i=0,n=4880+(i<<2)|0,l[a+28>>2]=i,l[(e=a+16|0)+4>>2]=0,l[e>>2]=0,!(r&(e=1<<i))){l[1145]=r|e,l[n>>2]=a,l[a+24>>2]=n,l[a+12>>2]=a,l[a+8>>2]=a;break}for(e=s<<(31==(0|i)?0:25-(i>>>1)|0),n=0|l[n>>2];;){if((-8&l[n+4>>2]|0)==(0|s)){b=97;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=96;break}e<<=1,n=i}if(96==(0|b)){l[r>>2]=a,l[a+24>>2]=n,l[a+12>>2]=a,l[a+8>>2]=a;break}if(97==(0|b)){T=0|l[(b=n+8|0)>>2],l[T+12>>2]=a,l[b>>2]=a,l[a+8>>2]=T,l[a+12>>2]=n,l[a+24>>2]=0;break}}else T=s+h|0,l[u+4>>2]=3|T,l[(T=u+T+4|0)>>2]=1|l[T>>2]}while(0);return v=t,0|(T=u+8|0)}f=h}else f=h;else f=-1}while(0);if((n=0|l[1146])>>>0>=f>>>0)return i=n-f|0,e=0|l[1149],i>>>0>15?(T=e+f|0,l[1149]=T,l[1146]=i,l[T+4>>2]=1|i,l[T+i>>2]=i,l[e+4>>2]=3|f):(l[1146]=0,l[1149]=0,l[e+4>>2]=3|n,l[(T=e+n+4|0)>>2]=1|l[T>>2]),v=t,0|(T=e+8|0);if((s=0|l[1147])>>>0>f>>>0)return $=s-f|0,l[1147]=$,b=(T=0|l[1150])+f|0,l[1150]=b,l[b+4>>2]=1|$,l[T+4>>2]=3|f,v=t,0|(T=T+8|0);if(0|l[1262]?e=0|l[1264]:(l[1264]=4096,l[1263]=4096,l[1265]=-1,l[1266]=-1,l[1267]=0,l[1255]=0,e=-16&p^1431655768,l[p>>2]=e,l[1262]=e,e=4096),u=f+48|0,(h=(a=e+(c=f+47|0)|0)&(o=0-e|0))>>>0<=f>>>0||0|(e=0|l[1254])&&(p=(d=0|l[1252])+h|0)>>>0<=d>>>0|p>>>0>e>>>0)return v=t,0|(T=0);e:do{if(4&l[1255])i=0,b=133;else{n=0|l[1150];t:do{if(n){for(r=5024;!((e=0|l[r>>2])>>>0<=n>>>0&&(g=r+4|0,(e+(0|l[g>>2])|0)>>>0>n>>>0));){if(!(e=0|l[r+8>>2])){b=118;break t}r=e}if((i=a-s&o)>>>0<2147483647)if((0|(e=0|Se(0|i)))==((0|l[r>>2])+(0|l[g>>2])|0)){if(-1!=(0|e)){s=i,a=e,b=135;break e}}else r=e,b=126;else i=0}else b=118}while(0);do{if(118==(0|b))if(-1!=(0|(n=0|Se(0)))&&(i=n,m=(i=(0==((m=(_=0|l[1263])+-1|0)&i|0)?0:(m+i&0-_)-i|0)+h|0)+(_=0|l[1252])|0,i>>>0>f>>>0&i>>>0<2147483647)){if(0|(g=0|l[1254])&&m>>>0<=_>>>0|m>>>0>g>>>0){i=0;break}if((0|(e=0|Se(0|i)))==(0|n)){s=i,a=n,b=135;break e}r=e,b=126}else i=0}while(0);do{if(126==(0|b)){if(n=0-i|0,!(u>>>0>i>>>0&i>>>0<2147483647&-1!=(0|r))){if(-1==(0|r)){i=0;break}s=i,a=r,b=135;break e}if((e=c-i+(e=0|l[1264])&0-e)>>>0>=2147483647){s=i,a=r,b=135;break e}if(-1==(0|Se(0|e))){Se(0|n),i=0;break}s=e+i|0,a=r,b=135;break e}}while(0);l[1255]=4|l[1255],b=133}}while(0);if(133==(0|b)&&h>>>0<2147483647&&!(-1==(0|($=0|Se(0|h)))|1^(y=(x=(g=0|Se(0))-$|0)>>>0>(f+40|0)>>>0)|$>>>0<g>>>0&-1!=(0|$)&-1!=(0|g)^1)&&(s=y?x:i,a=$,b=135),135==(0|b)){i=(0|l[1252])+s|0,l[1252]=i,i>>>0>(0|l[1253])>>>0&&(l[1253]=i),c=0|l[1150];do{if(c){for(i=5024;;){if((0|a)==((e=0|l[i>>2])+(r=0|l[(n=i+4|0)>>2])|0)){b=145;break}if(!(o=0|l[i+8>>2]))break;i=o}if(145==(0|b)&&0==(8&l[i+12>>2]|0)&&c>>>0<a>>>0&c>>>0>=e>>>0){l[n>>2]=r+s,b=c+(T=0==(7&(T=c+8|0)|0)?0:0-T&7)|0,T=(0|l[1147])+(s-T)|0,l[1150]=b,l[1147]=T,l[b+4>>2]=1|T,l[b+T+4>>2]=40,l[1151]=l[1266];break}for(a>>>0<(0|l[1148])>>>0&&(l[1148]=a),n=a+s|0,i=5024;;){if((0|l[i>>2])==(0|n)){b=153;break}if(!(e=0|l[i+8>>2]))break;i=e}if(153==(0|b)&&0==(8&l[i+12>>2]|0)){l[i>>2]=a,l[(d=i+4|0)>>2]=(0|l[d>>2])+s,h=(d=a+(0==(7&(d=a+8|0)|0)?0:0-d&7)|0)+f|0,u=(i=n+(0==(7&(i=n+8|0)|0)?0:0-i&7)|0)-d-f|0,l[d+4>>2]=3|f;do{if((0|i)!=(0|c)){if((0|i)==(0|l[1149])){T=(0|l[1146])+u|0,l[1146]=T,l[1149]=h,l[h+4>>2]=1|T,l[h+T>>2]=T;break}if(1==(3&(e=0|l[i+4>>2])|0)){s=-8&e,r=e>>>3;e:do{if(e>>>0<256){if(e=0|l[i+8>>2],(0|(n=0|l[i+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<r);break}l[e+12>>2]=n,l[n+8>>2]=e;break}a=0|l[i+24>>2],e=0|l[i+12>>2];do{if((0|e)==(0|i)){if(!(e=0|l[(n=(r=i+16|0)+4|0)>>2])){if(!(e=0|l[r>>2])){e=0;break}n=r}for(;;)if(0|(o=0|l[(r=e+20|0)>>2]))e=o,n=r;else{if(!(o=0|l[(r=e+16|0)>>2]))break;e=o,n=r}l[n>>2]=0}else T=0|l[i+8>>2],l[T+12>>2]=e,l[e+8>>2]=T}while(0);if(!a)break;r=4880+((n=0|l[i+28>>2])<<2)|0;do{if((0|i)==(0|l[r>>2])){if(l[r>>2]=e,0|e)break;l[1145]=l[1145]&~(1<<n);break e}if(l[a+16+(((0|l[a+16>>2])!=(0|i)&1)<<2)>>2]=e,!e)break e}while(0);if(l[e+24>>2]=a,0|(r=0|l[(n=i+16|0)>>2])&&(l[e+16>>2]=r,l[r+24>>2]=e),!(n=0|l[n+4>>2]))break;l[e+20>>2]=n,l[n+24>>2]=e}while(0);i=i+s|0,o=s+u|0}else o=u;if(l[(i=i+4|0)>>2]=-2&l[i>>2],l[h+4>>2]=1|o,l[h+o>>2]=o,i=o>>>3,o>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=h,l[i+12>>2]=h,l[h+8>>2]=i,l[h+12>>2]=n;break}i=o>>>8;do{if(i){if(o>>>0>16777215){i=31;break}i=o>>>((i=14-(($=((T=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(i=((T<<=$)+245760|0)>>>16&2))+(T<<i>>>15)|0)+7|0)&1|i<<1}else i=0}while(0);if(r=4880+(i<<2)|0,l[h+28>>2]=i,l[(e=h+16|0)+4>>2]=0,l[e>>2]=0,!((e=0|l[1145])&(n=1<<i))){l[1145]=e|n,l[r>>2]=h,l[h+24>>2]=r,l[h+12>>2]=h,l[h+8>>2]=h;break}for(e=o<<(31==(0|i)?0:25-(i>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|o)){b=194;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=193;break}e<<=1,n=i}if(193==(0|b)){l[r>>2]=h,l[h+24>>2]=n,l[h+12>>2]=h,l[h+8>>2]=h;break}if(194==(0|b)){T=0|l[(b=n+8|0)>>2],l[T+12>>2]=h,l[b>>2]=h,l[h+8>>2]=T,l[h+12>>2]=n,l[h+24>>2]=0;break}}else T=(0|l[1147])+u|0,l[1147]=T,l[1150]=h,l[h+4>>2]=1|T}while(0);return v=t,0|(T=d+8|0)}for(i=5024;!((e=0|l[i>>2])>>>0<=c>>>0&&(T=e+(0|l[i+4>>2])|0,T>>>0>c>>>0));)i=0|l[i+8>>2];i=(e=(e=(o=T+-47|0)+(0==(7&(e=o+8|0)|0)?0:0-e&7)|0)>>>0<(o=c+16|0)>>>0?c:e)+8|0,b=a+(n=0==(7&(n=a+8|0)|0)?0:0-n&7)|0,n=s+-40-n|0,l[1150]=b,l[1147]=n,l[b+4>>2]=1|n,l[b+n+4>>2]=40,l[1151]=l[1266],l[(n=e+4|0)>>2]=27,l[i>>2]=l[1256],l[i+4>>2]=l[1257],l[i+8>>2]=l[1258],l[i+12>>2]=l[1259],l[1256]=a,l[1257]=s,l[1259]=0,l[1258]=i,i=e+24|0;do{b=i,l[(i=i+4|0)>>2]=7}while((b+8|0)>>>0<T>>>0);if((0|e)!=(0|c)){if(a=e-c|0,l[n>>2]=-2&l[n>>2],l[c+4>>2]=1|a,l[e>>2]=a,i=a>>>3,a>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=c,l[i+12>>2]=c,l[c+8>>2]=i,l[c+12>>2]=n;break}if((i=a>>>8)?a>>>0>16777215?n=31:n=a>>>((n=14-(($=((T=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(n=((T<<=$)+245760|0)>>>16&2))+(T<<n>>>15)|0)+7|0)&1|n<<1:n=0,r=4880+(n<<2)|0,l[c+28>>2]=n,l[c+20>>2]=0,l[o>>2]=0,!((i=0|l[1145])&(e=1<<n))){l[1145]=i|e,l[r>>2]=c,l[c+24>>2]=r,l[c+12>>2]=c,l[c+8>>2]=c;break}for(e=a<<(31==(0|n)?0:25-(n>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|a)){b=216;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=215;break}e<<=1,n=i}if(215==(0|b)){l[r>>2]=c,l[c+24>>2]=n,l[c+12>>2]=c,l[c+8>>2]=c;break}if(216==(0|b)){T=0|l[(b=n+8|0)>>2],l[T+12>>2]=c,l[b>>2]=c,l[c+8>>2]=T,l[c+12>>2]=n,l[c+24>>2]=0;break}}}else{0==(0|(T=0|l[1148]))|a>>>0<T>>>0&&(l[1148]=a),l[1256]=a,l[1257]=s,l[1259]=0,l[1153]=l[1262],l[1152]=-1,i=0;do{l[(T=4616+(i<<1<<2)|0)+12>>2]=T,l[T+8>>2]=T,i=i+1|0}while(32!=(0|i));b=a+(T=0==(7&(T=a+8|0)|0)?0:0-T&7)|0,T=s+-40-T|0,l[1150]=b,l[1147]=T,l[b+4>>2]=1|T,l[b+T+4>>2]=40,l[1151]=l[1266]}}while(0);if((i=0|l[1147])>>>0>f>>>0)return $=i-f|0,l[1147]=$,b=(T=0|l[1150])+f|0,l[1150]=b,l[b+4>>2]=1|$,l[T+4>>2]=3|f,v=t,0|(T=T+8|0)}return T=0|tt(),l[T>>2]=12,v=t,0|(T=0)}function U(e,t,i,n,o,a){e|=0,t=+t,i|=0,n|=0,o|=0,a|=0;var s,u=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,y=0,$=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,D=0;s=v,v=v+560|0,d=s+8|0,O=D=s+524|0,f=s+512|0,l[($=s)>>2]=0,R=f+12|0,Ne(t),(0|b)<0?(t=-t,L=1,A=2087):(L=0!=(2049&o|0)&1,A=0==(2048&o|0)?0==(1&o|0)?2088:2093:2090),Ne(t),M=2146435072&b;do{if(M>>>0<2146435072|2146435072==(0|M)&!1){if((u=0!=(g=2*+et(t,$)))&&(l[$>>2]=(0|l[$>>2])-1),97==(0|(S=32|a))){m=0==(0|(x=32&a))?A:A+9|0,_=2|L,u=12-n|0;do{if(!(n>>>0>11|0==(0|u))){t=8;do{u=u+-1|0,t*=16}while(0!=(0|u));if(45==(0|r[m>>0])){t=-(t+(-g-t));break}t=g+t-t;break}t=g}while(0);(0|(u=0|xe(u=(0|(h=0|l[$>>2]))<0?0-h|0:h,((0|u)<0)<<31>>31,R)))==(0|R)&&(r[(u=f+11|0)>>0]=48),r[u+-1>>0]=43+(h>>31&2),r[(p=u+-2|0)>>0]=a+15,f=(0|n)<1,d=0==(8&o|0),u=D;do{M=~~t,h=u+1|0,r[u>>0]=c[2122+M>>0]|x,t=16*(t-+(0|M)),1!=(h-O|0)||d&f&0==t?u=h:(r[h>>0]=46,u=u+2|0)}while(0!=t);M=u-O|0,be(e,32,i,u=(O=R-p|0)+_+(R=0!=(0|n)&(M+-2|0)<(0|n)?n+2|0:M)|0,o),Ve(e,m,_),be(e,48,i,u,65536^o),Ve(e,D,M),be(e,48,R-M|0,0,0),Ve(e,p,O),be(e,32,i,u,8192^o);break}h=(0|n)<0?6:n,u?(u=(0|l[$>>2])-28|0,l[$>>2]=u,t=268435456*g):(t=g,u=0|l[$>>2]),d=M=(0|u)<0?d:d+288|0;do{E=~~t>>>0,l[d>>2]=E,d=d+4|0,t=1e9*(t-+(E>>>0))}while(0!=t);if((0|u)>0)for(f=M,_=d;;){if(p=(0|u)<29?u:29,(u=_+-4|0)>>>0>=f>>>0){d=0;do{C=0|Me(0|(w=0|Ge(0|(w=0|De(0|l[u>>2],0,0|p)),0|b,0|d,0)),0|(E=b),1e9,0),l[u>>2]=C,d=0|je(0|w,0|E,1e9,0),u=u+-4|0}while(u>>>0>=f>>>0);d&&(l[(f=f+-4|0)>>2]=d)}for(d=_;!(d>>>0<=f>>>0)&&!(0|l[(u=d+-4|0)>>2]);)d=u;if(u=(0|l[$>>2])-p|0,l[$>>2]=u,!((0|u)>0))break;_=d}else f=M;if((0|u)<0){n=1+((h+25|0)/9|0)|0,y=102==(0|S);do{if(x=(0|(x=0-u|0))<9?x:9,f>>>0<d>>>0){p=(1<<x)-1|0,_=1e9>>>x,m=0,u=f;do{E=0|l[u>>2],l[u>>2]=(E>>>x)+m,m=0|T(E&p,_),u=u+4|0}while(u>>>0<d>>>0);u=0==(0|l[f>>2])?f+4|0:f,m?(l[d>>2]=m,f=u,u=d+4|0):(f=u,u=d)}else f=0==(0|l[f>>2])?f+4|0:f,u=d;d=(u-(d=y?M:f)>>2|0)>(0|n)?d+(n<<2)|0:u,u=(0|l[$>>2])+x|0,l[$>>2]=u}while((0|u)<0);u=f,n=d}else u=f,n=d;if(E=M,u>>>0<n>>>0){if(d=9*(E-u>>2)|0,(p=0|l[u>>2])>>>0>=10){f=10;do{f=10*f|0,d=d+1|0}while(p>>>0>=f>>>0)}}else d=0;if((0|(f=h-(102!=(0|S)?d:0)+(((C=0!=(0|h))&(y=103==(0|S)))<<31>>31)|0))<((9*(n-E>>2)|0)-9|0)){if(x=M+4+(((0|(f=f+9216|0))/9|0)-1024<<2)|0,(0|(f=1+((0|f)%9|0)|0))<9){p=10;do{p=10*p|0,f=f+1|0}while(9!=(0|f))}else p=10;if((f=(x+4|0)==(0|n))&0==(0|(m=((_=0|l[x>>2])>>>0)%(p>>>0)|0)))f=x;else if(g=0==(1&((_>>>0)/(p>>>0)|0)|0)?9007199254740992:9007199254740994,t=m>>>0<(w=(0|p)/2|0)>>>0?.5:f&(0|m)==(0|w)?1:1.5,L&&(t=(w=45==(0|r[A>>0]))?-t:t,g=w?-g:g),f=_-m|0,l[x>>2]=f,g+t!=g){if(w=f+p|0,l[x>>2]=w,w>>>0>999999999)for(d=x;f=d+-4|0,l[d>>2]=0,f>>>0<u>>>0&&(l[(u=u+-4|0)>>2]=0),w=1+(0|l[f>>2])|0,l[f>>2]=w,w>>>0>999999999;)d=f;else f=x;if(d=9*(E-u>>2)|0,(_=0|l[u>>2])>>>0>=10){p=10;do{p=10*p|0,d=d+1|0}while(_>>>0>=p>>>0)}}else f=x;f=n>>>0>(f=f+4|0)>>>0?f:n,w=u}else f=n,w=u;for(S=f;;){if(S>>>0<=w>>>0){$=0;break}if(0|l[(u=S+-4|0)>>2]){$=1;break}S=u}n=0-d|0;do{if(y){if((0|(u=(1&(1^C))+h|0))>(0|d)&(0|d)>-5?(p=a+-1|0,h=u+-1-d|0):(p=a+-2|0,h=u+-1|0),!(u=8&o)){if($&&0!=(0|(P=0|l[S+-4>>2])))if((P>>>0)%10|0)f=0;else{f=0,u=10;do{u=10*u|0,f=f+1|0}while(!(0|(P>>>0)%(u>>>0)))}else f=9;if(u=(9*(S-E>>2)|0)-9|0,102==(32|p)){h=(0|h)<(0|(x=(0|(x=u-f|0))>0?x:0))?h:x,x=0;break}h=(0|h)<(0|(x=(0|(x=u+d-f|0))>0?x:0))?h:x,x=0;break}x=u}else p=a,x=8&o}while(0);if(_=0!=(0|(y=h|x))&1,m=102==(32|p))C=0,u=(0|d)>0?d:0;else{if(((f=R)-(u=0|xe(u=(0|d)<0?n:d,((0|u)<0)<<31>>31,R))|0)<2)do{r[(u=u+-1|0)>>0]=48}while((f-u|0)<2);r[u+-1>>0]=43+(d>>31&2),r[(u=u+-2|0)>>0]=p,C=u,u=f-u|0}if(be(e,32,i,u=L+1+h+_+u|0,o),Ve(e,A,L),be(e,48,i,u,65536^o),m){_=x=D+9|0,m=D+8|0,f=p=w>>>0>M>>>0?M:w;do{if(d=0|xe(0|l[f>>2],0,x),(0|f)==(0|p))(0|d)==(0|x)&&(r[m>>0]=48,d=m);else if(d>>>0>D>>>0){de(0|D,48,d-O|0);do{d=d+-1|0}while(d>>>0>D>>>0)}Ve(e,d,_-d|0),f=f+4|0}while(f>>>0<=M>>>0);if(0|y&&Ve(e,2138,1),f>>>0<S>>>0&(0|h)>0)for(;;){if((d=0|xe(0|l[f>>2],0,x))>>>0>D>>>0){de(0|D,48,d-O|0);do{d=d+-1|0}while(d>>>0>D>>>0)}if(Ve(e,d,(0|h)<9?h:9),d=h+-9|0,!((f=f+4|0)>>>0<S>>>0&(0|h)>9)){h=d;break}h=d}be(e,48,h+9|0,9,0)}else{if(y=$?S:w+4|0,(0|h)>-1){x=0==(0|x),n=$=D+9|0,_=0-O|0,m=D+8|0,p=w;do{(0|(d=0|xe(0|l[p>>2],0,$)))==(0|$)&&(r[m>>0]=48,d=m);do{if((0|p)==(0|w)){if(f=d+1|0,Ve(e,d,1),x&(0|h)<1){d=f;break}Ve(e,2138,1),d=f}else{if(d>>>0<=D>>>0)break;de(0|D,48,d+_|0);do{d=d+-1|0}while(d>>>0>D>>>0)}}while(0);Ve(e,d,(0|h)>(0|(O=n-d|0))?O:h),h=h-O|0,p=p+4|0}while(p>>>0<y>>>0&(0|h)>-1)}be(e,48,h+18|0,18,0),Ve(e,C,R-C|0)}be(e,32,i,u,8192^o)}else D=0!=(32&a|0),be(e,32,i,u=L+3|0,-65537&o),Ve(e,A,L),Ve(e,t!=t|!1?D?2114:2118:D?2106:2110,3),be(e,32,i,u,8192^o)}while(0);return v=s,0|((0|u)<(0|i)?i:u)}function V(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0,o|=0;var s,u,c,h,d,f,p,_,g,x=0,y=0,$=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0;g=v,v=v+64|0,f=g,O=g+24|0,p=g+8|0,_=g+20|0,l[(d=g+16|0)>>2]=t,s=0!=(0|e),c=u=O+40|0,O=O+39|0,h=p+4|0,y=0,x=0,S=0;e:for(;;){do{if((0|x)>-1){if((0|y)>(2147483647-x|0)){x=0|tt(),l[x>>2]=75,x=-1;break}x=y+x|0;break}}while(0);if(!((y=0|r[t>>0])<<24>>24)){R=87;break}$=t;t:for(;;){switch(y<<24>>24){case 37:y=$,R=9;break t;case 0:y=$;break t}M=$+1|0,l[d>>2]=M,y=0|r[M>>0],$=M}t:do{if(9==(0|R))for(;;){if(R=0,37!=(0|r[$+1>>0]))break t;if(y=y+1|0,$=$+2|0,l[d>>2]=$,37!=(0|r[$>>0]))break;R=9}}while(0);if(y=y-t|0,s&&Ve(e,t,y),0|y)t=$;else{(y=(0|r[(T=$+1|0)>>0])-48|0)>>>0<10?(L=(M=36==(0|r[$+2>>0]))?y:-1,S=M?1:S,T=M?$+3|0:T):L=-1,l[d>>2]=T,$=((y=0|r[T>>0])<<24>>24)-32|0;t:do{if($>>>0<32)for(C=0,w=y;;){if(!(75913&(y=1<<$))){y=w;break t}if(C|=y,T=T+1|0,l[d>>2]=T,($=((y=0|r[T>>0])<<24>>24)-32|0)>>>0>=32)break;w=y}else C=0}while(0);if(y<<24>>24==42){if((y=(0|r[($=T+1|0)>>0])-48|0)>>>0<10&&36==(0|r[T+2>>0]))l[o+(y<<2)>>2]=10,y=0|l[n+((0|r[$>>0])-48<<3)>>2],S=1,T=T+3|0;else{if(0|S){x=-1;break}s?(S=3+(0|l[i>>2])&-4,y=0|l[S>>2],l[i>>2]=S+4,S=0,T=$):(y=0,S=0,T=$)}l[d>>2]=T,y=(M=(0|y)<0)?0-y|0:y,C=M?8192|C:C}else{if((0|(y=0|we(d)))<0){x=-1;break}T=0|l[d>>2]}do{if(46==(0|r[T>>0])){if(42!=(0|r[T+1>>0])){l[d>>2]=T+1,$=0|we(d),T=0|l[d>>2];break}if(($=(0|r[(w=T+2|0)>>0])-48|0)>>>0<10&&36==(0|r[T+3>>0])){l[o+($<<2)>>2]=10,$=0|l[n+((0|r[w>>0])-48<<3)>>2],T=T+4|0,l[d>>2]=T;break}if(0|S){x=-1;break e}s?(M=3+(0|l[i>>2])&-4,$=0|l[M>>2],l[i>>2]=M+4):$=0,l[d>>2]=w,T=w}else $=-1}while(0);for(A=0;;){if(((0|r[T>>0])-65|0)>>>0>57){x=-1;break e}if(M=T+1|0,l[d>>2]=M,!(((E=255&(w=0|r[(0|r[T>>0])-65+(1606+(58*A|0))>>0]))+-1|0)>>>0<8))break;A=E,T=M}if(!(w<<24>>24)){x=-1;break}P=(0|L)>-1;do{if(w<<24>>24==19){if(P){x=-1;break e}R=49}else{if(P){l[o+(L<<2)>>2]=E,L=0|l[(P=n+(L<<3)|0)+4>>2],l[(R=f)>>2]=l[P>>2],l[R+4>>2]=L,R=49;break}if(!s){x=0;break e}Z(f,E,i)}}while(0);if(49!=(0|R)||(R=0,s)){T=0!=(0|A)&3==(15&(T=0|r[T>>0])|0)?-33&T:T,P=-65537&C,L=0==(8192&C|0)?C:P;t:do{switch(0|T){case 110:switch((255&A)<<24>>24){case 0:case 1:case 6:l[l[f>>2]>>2]=x,y=0,t=M;continue e;case 2:case 7:y=0|l[f>>2],l[y>>2]=x,l[y+4>>2]=((0|x)<0)<<31>>31,y=0,t=M;continue e;case 3:a[l[f>>2]>>1]=x,y=0,t=M;continue e;case 4:r[l[f>>2]>>0]=x,y=0,t=M;continue e;default:y=0,t=M;continue e}case 112:T=120,$=$>>>0>8?$:8,t=8|L,R=61;break;case 88:case 120:t=L,R=61;break;case 111:C=0,w=2070,$=0==(8&L|0)|(0|$)>(0|(P=c-(E=0|Le(t=0|l[(T=f)>>2],T=0|l[T+4>>2],u))|0))?$:P+1|0,P=L,R=67;break;case 105:case 100:if(t=0|l[(T=f)>>2],(0|(T=0|l[T+4>>2]))<0){t=0|Be(0,0,0|t,0|T),T=b,l[(C=f)>>2]=t,l[C+4>>2]=T,C=1,w=2070,R=66;break t}C=0!=(2049&L|0)&1,w=0==(2048&L|0)?0==(1&L|0)?2070:2072:2071,R=66;break t;case 117:C=0,w=2070,t=0|l[(T=f)>>2],T=0|l[T+4>>2],R=66;break;case 99:r[O>>0]=l[f>>2],t=O,C=0,w=2070,E=u,T=1,$=P;break;case 109:T=0|tt(),T=0|ke(0|l[T>>2]),R=71;break;case 115:T=0|(T=0|l[f>>2])?T:2080,R=71;break;case 67:l[p>>2]=l[f>>2],l[h>>2]=0,l[f>>2]=p,E=-1,T=p,R=75;break;case 83:t=0|l[f>>2],$?(E=$,T=t,R=75):(be(e,32,y,0,L),t=0,R=84);break;case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:y=0|U(e,+m[f>>3],y,$,L,T),t=M;continue e;default:C=0,w=2070,E=u,T=$,$=L}}while(0);t:do{if(61==(0|R))L=f,A=0|l[L>>2],L=0|l[L+4>>2],E=0|Ee(A,L,u,32&T),w=0==(8&t|0)|0==(0|A)&0==(0|L),C=w?0:2,w=w?2070:2070+(T>>4)|0,P=t,t=A,T=L,R=67;else if(66==(0|R))E=0|xe(t,T,u),P=L,R=67;else if(71==(0|R))R=0,L=0|se(T,0,$),A=0==(0|L),t=T,C=0,w=2070,E=A?T+$|0:L,T=A?$:L-T|0,$=P;else if(75==(0|R)){for(R=0,w=T,t=0,$=0;(C=0|l[w>>2])&&!((0|($=0|We(_,C)))<0|$>>>0>(E-t|0)>>>0)&&E>>>0>(t=$+t|0)>>>0;)w=w+4|0;if((0|$)<0){x=-1;break e}if(be(e,32,y,t,L),t)for(C=0;;){if(!($=0|l[T>>2])){R=84;break t}if((0|(C=($=0|We(_,$))+C|0))>(0|t)){R=84;break t}if(Ve(e,_,$),C>>>0>=t>>>0){R=84;break}T=T+4|0}else t=0,R=84}}while(0);if(67==(0|R))R=0,L=0!=(0|$)|(T=0!=(0|t)|0!=(0|T)),T=c-E+(1&(1^T))|0,t=L?E:u,E=u,T=L?(0|$)>(0|T)?$:T:$,$=(0|$)>-1?-65537&P:P;else if(84==(0|R)){R=0,be(e,32,y,t,8192^L),y=(0|y)>(0|t)?y:t,t=M;continue}be(e,32,y=(0|y)<(0|(L=(P=(0|T)<(0|(A=E-t|0))?A:T)+C|0))?L:y,L,$),Ve(e,w,C),be(e,48,y,L,65536^$),be(e,48,P,A,0),Ve(e,t,A),be(e,32,y,L,8192^$),t=M}else y=0,t=M}}e:do{if(87==(0|R)&&!e)if(S){for(x=1;t=0|l[o+(x<<2)>>2];)if(Z(n+(x<<3)|0,t,i),(0|(x=x+1|0))>=10){x=1;break e}for(;;){if(0|l[o+(x<<2)>>2]){x=-1;break e}if((0|(x=x+1|0))>=10){x=1;break}}}else x=0}while(0);return v=g,0|x}function k(e,t){t|=0;var i,n,o,a,s,u,h,d,f,p,_,m,g,x,y,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0;if(y=v,v=v+704|0,g=y+144|0,m=y+128|0,_=y+112|0,p=y+96|0,f=y+80|0,d=y+64|0,h=y+48|0,x=y+32|0,i=y+16|0,w=y,o=y+184|0,L=y+160|0,a=0|function(e,t){e|=0;var i=0,n=0,r=0,o=0,a=0,s=0,u=0,h=0;if(h=v,v=v+528|0,a=h,o=h+16|0,!(t|=0))return v=h,0|(u=0);if(t>>>0<=16)return u=0|ae(e,t),v=h,0|u;if(s=0|ae(e,t+-16|0),(0|(t=0|l[(u=e+20|0)>>2]))<16){n=e+4|0,r=e+8|0,i=e+16|0;do{(0|(e=0|l[n>>2]))==(0|l[r>>2])?e=0:(l[n>>2]=e+1,e=0|c[e>>0]),t=t+8|0,l[u>>2]=t,(0|t)>=33&&(l[a>>2]=866,l[a+4>>2]=3208,l[a+8>>2]=1366,Oe(o,812,a),$e(o),t=0|l[u>>2]),e=e<<32-t|l[i>>2],l[i>>2]=e}while((0|t)<16)}else i=e=e+16|0,e=0|l[e>>2];return l[i>>2]=e<<16,l[u>>2]=t+-16,v=h,0|(u=e>>>16|s<<16)}(e|=0,14),!a)return function(e){var t=0,i=0,n=0,o=0,a=0,s=0;if(s=v,v=v+544|0,a=s+16|0,n=s,o=s+32|0,l[(e|=0)>>2]=0,0|(i=0|l[(t=e+4|0)>>2])&&(7&i?(l[n>>2]=866,l[n+4>>2]=2506,l[n+8>>2]=1232,Oe(o,812,n),$e(o)):_e(i,0,0,1,0),l[t>>2]=0,l[e+8>>2]=0,l[e+12>>2]=0),r[e+16>>0]=0,!(t=0|l[(e=e+20|0)>>2]))return void(v=s);re(t),7&t?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1232,Oe(o,812,a),$e(o)):_e(t,0,0,1,0),l[e>>2]=0,v=s}(t),v=y,0|(L=1);if(s=t+4|0,(0|($=0|l[(u=t+8|0)>>2]))!=(0|a)){if($>>>0<=a>>>0){do{if((0|l[t+12>>2])>>>0<a>>>0){if(0|K(s,a,($+1|0)==(0|a),1,0)){$=0|l[u>>2];break}return r[t+16>>0]=1,v=y,0|(L=0)}}while(0);de((0|l[s>>2])+$|0,0,a-$|0)}l[u>>2]=a}if(de(0|l[s>>2],0,0|a),(0|($=0|l[(n=e+20|0)>>2]))<5){C=e+4|0,S=e+8|0,T=e+16|0;do{(0|(b=0|l[C>>2]))==(0|l[S>>2])?b=0:(l[C>>2]=b+1,b=0|c[b>>0]),$=$+8|0,l[n>>2]=$,(0|$)>=33&&(l[w>>2]=866,l[w+4>>2]=3208,l[w+8>>2]=1366,Oe(o,812,w),$e(o),$=0|l[n>>2]),b=b<<32-$|l[T>>2],l[T>>2]=b}while((0|$)<5)}else T=b=e+16|0,b=0|l[b>>2];if(P=b>>>27,l[T>>2]=b<<5,l[n>>2]=$+-5,(P+-1|0)>>>0>20)return v=y,0|(L=0);l[L+20>>2]=0,l[L>>2]=0,l[L+4>>2]=0,l[L+8>>2]=0,l[L+12>>2]=0,r[L+16>>0]=0,$=L+4|0,b=L+8|0;e:do{if(0|K($,21,0,1,0)){C=0|l[b>>2],de((E=0|l[$>>2])+C|0,0,21-C|0),l[b>>2]=21,C=e+4|0,S=e+8|0,w=e+16|0,T=0;do{if((0|($=0|l[n>>2]))<3)do{(0|(b=0|l[C>>2]))==(0|l[S>>2])?b=0:(l[C>>2]=b+1,b=0|c[b>>0]),$=$+8|0,l[n>>2]=$,(0|$)>=33&&(l[i>>2]=866,l[i+4>>2]=3208,l[i+8>>2]=1366,Oe(o,812,i),$e(o),$=0|l[n>>2]),b=b<<32-$|l[w>>2],l[w>>2]=b}while((0|$)<3);else b=0|l[w>>2];l[w>>2]=b<<3,l[n>>2]=$+-3,r[E+(0|c[1327+T>>0])>>0]=b>>>29,T=T+1|0}while((0|T)!=(0|P));if(0|ne(L)){w=e+4|0,E=e+8|0,P=e+16|0,$=0;t:do{S=a-$|0,T=0|X(e,L);i:do{if(T>>>0<17)(0|l[u>>2])>>>0<=$>>>0&&(l[x>>2]=866,l[x+4>>2]=910,l[x+8>>2]=1497,Oe(o,812,x),$e(o)),r[(0|l[s>>2])+$>>0]=T,$=$+1|0;else switch(0|T){case 17:if((0|(b=0|l[n>>2]))<3)do{(0|(T=0|l[w>>2]))==(0|l[E>>2])?T=0:(l[w>>2]=T+1,T=0|c[T>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[h>>2]=866,l[h+4>>2]=3208,l[h+8>>2]=1366,Oe(o,812,h),$e(o),b=0|l[n>>2]),T=T<<32-b|l[P>>2],l[P>>2]=T}while((0|b)<3);else T=0|l[P>>2];if(l[P>>2]=T<<3,l[n>>2]=b+-3,b=(T=3+(T>>>29)|0)>>>0>S>>>0){$=0;break e}$=(b?0:T)+$|0;break i;case 18:if((0|(b=0|l[n>>2]))<7)do{(0|(T=0|l[w>>2]))==(0|l[E>>2])?T=0:(l[w>>2]=T+1,T=0|c[T>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[d>>2]=866,l[d+4>>2]=3208,l[d+8>>2]=1366,Oe(o,812,d),$e(o),b=0|l[n>>2]),T=T<<32-b|l[P>>2],l[P>>2]=T}while((0|b)<7);else T=0|l[P>>2];if(l[P>>2]=T<<7,l[n>>2]=b+-7,b=(T=11+(T>>>25)|0)>>>0>S>>>0){$=0;break e}$=(b?0:T)+$|0;break i;default:if((T+-19|0)>>>0>=2){A=81;break t}if(b=0|l[n>>2],19==(0|T)){if((0|b)<2)for(T=b;(0|(b=0|l[w>>2]))==(0|l[E>>2])?C=0:(l[w>>2]=b+1,C=0|c[b>>0]),b=T+8|0,l[n>>2]=b,(0|b)>=33&&(l[f>>2]=866,l[f+4>>2]=3208,l[f+8>>2]=1366,Oe(o,812,f),$e(o),b=0|l[n>>2]),T=C<<32-b|l[P>>2],l[P>>2]=T,(0|b)<2;)T=b;else T=0|l[P>>2];l[P>>2]=T<<2,T>>>=30,C=3,b=b+-2|0}else{if((0|b)<6)do{(0|(T=0|l[w>>2]))==(0|l[E>>2])?T=0:(l[w>>2]=T+1,T=0|c[T>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[p>>2]=866,l[p+4>>2]=3208,l[p+8>>2]=1366,Oe(o,812,p),$e(o),b=0|l[n>>2]),T=T<<32-b|l[P>>2],l[P>>2]=T}while((0|b)<6);else T=0|l[P>>2];l[P>>2]=T<<6,T>>>=26,C=7,b=b+-6|0}if(l[n>>2]=b,0==(0|$)|(T=T+C|0)>>>0>S>>>0){$=0;break e}if(b=$+-1|0,(0|l[u>>2])>>>0<=b>>>0&&(l[_>>2]=866,l[_+4>>2]=910,l[_+8>>2]=1497,Oe(o,812,_),$e(o)),!((C=0|r[(0|l[s>>2])+b>>0])<<24>>24)){$=0;break e}if($>>>0>=(b=T+$|0)>>>0)break i;do{(0|l[u>>2])>>>0<=$>>>0&&(l[m>>2]=866,l[m+4>>2]=910,l[m+8>>2]=1497,Oe(o,812,m),$e(o)),r[(0|l[s>>2])+$>>0]=C,$=$+1|0}while((0|$)!=(0|b));$=b}}while(0)}while(a>>>0>$>>>0);if(81==(0|A)){l[g>>2]=866,l[g+4>>2]=3149,l[g+8>>2]=1348,Oe(o,812,g),$e(o),$=0;break}$=(0|a)==(0|$)?0|ne(t):0}else $=0}else r[L+16>>0]=1,$=0}while(0);return ce(L),v=y,0|(L=$)}function W(e,t,i,n){i|=0;var o,s,u,h,f,p,_=0,m=0,g=0,x=0,y=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,D=0,I=0,F=0,B=0;if(p=v,v=v+880|0,F=p+144|0,f=p+128|0,h=p+112|0,u=p+96|0,D=p+80|0,A=p+64|0,E=p+48|0,P=p+32|0,T=p+16|0,b=p,o=p+360|0,s=p+296|0,B=p+224|0,w=p+156|0,0==(0|(t|=0))|(n|=0)>>>0>11)return v=p,0|(B=0);l[(e|=0)>>2]=t,m=(_=B)+68|0;do{l[_>>2]=0,_=_+4|0}while((0|_)<(0|m));_=0;do{m=B+((255&(I=0|r[i+_>>0]))<<2)|0,I<<24>>24&&(l[m>>2]=1+(0|l[m>>2])),_=_+1|0}while((0|_)!=(0|t));for(m=0,g=0,x=0,y=-1,$=1;(_=0|l[B+($<<2)>>2])?(l[s+((C=$+-1|0)<<2)>>2]=m,m=_+m|0,I=16-$|0,l[e+28+(C<<2)>>2]=1+(m+-1<<I|(1<<I)-1),l[e+96+(C<<2)>>2]=g,l[w+($<<2)>>2]=g,C=_+g|0,x=x>>>0>$>>>0?x:$,y=y>>>0<$>>>0?y:$):(l[e+28+($+-1<<2)>>2]=0,C=g),17!=(0|($=$+1|0));)m<<=1,g=C;l[e+4>>2]=C,m=e+172|0;do{if(C>>>0>(0|l[m>>2])>>>0){(_=C+-1|0)&C?(_|=_>>>16,_|=_>>>8,_|=_>>>4,_=(_=1+((_|=_>>>2)>>>1|_)|0)>>>0>t>>>0?t:_):_=C,l[m>>2]=_,_=0|l[(g=e+176|0)>>2];do{if(0|_){if(I=0|l[_+-4>>2],_=_+-8|0,0!=(0|I)&&(0|I)==(0|~l[_>>2])||(l[b>>2]=866,l[b+4>>2]=651,l[b+8>>2]=1579,Oe(o,812,b),$e(o)),7&_){l[T>>2]=866,l[T+4>>2]=2506,l[T+8>>2]=1232,Oe(o,812,T),$e(o);break}_e(_,0,0,1,0);break}}while(0);if(m=0|he(8+((_=0|(_=0|l[m>>2])?_:1)<<1)|0,0)){l[m+4>>2]=_,l[m>>2]=~_,l[g>>2]=m+8,S=24;break}l[g>>2]=0,n=0;break}S=24}while(0);e:do{if(24==(0|S)){r[(I=e+24|0)>>0]=y,r[e+25>>0]=x,g=e+176|0,m=0;do{_=255&(O=0|r[i+m>>0]),O<<24>>24&&(0|l[B+(_<<2)>>2]||(l[P>>2]=866,l[P+4>>2]=2276,l[P+8>>2]=977,Oe(o,812,P),$e(o)),_=0|l[(O=w+(_<<2)|0)>>2],l[O>>2]=_+1,_>>>0>=C>>>0&&(l[E>>2]=866,l[E+4>>2]=2280,l[E+8>>2]=990,Oe(o,812,E),$e(o)),a[(0|l[g>>2])+(_<<1)>>1]=m),m=m+1|0}while((0|m)!=(0|t));if(R=(0|c[I>>0])>>>0<n>>>0?n:0,l[(O=e+8|0)>>2]=R,M=0!=(0|R)){L=1<<R,_=e+164|0;do{if(L>>>0>(0|l[_>>2])>>>0){l[_>>2]=L,_=0|l[(g=e+168|0)>>2];do{if(0|_){if(P=0|l[_+-4>>2],_=_+-8|0,0!=(0|P)&&(0|P)==(0|~l[_>>2])||(l[A>>2]=866,l[A+4>>2]=651,l[A+8>>2]=1579,Oe(o,812,A),$e(o)),7&_){l[D>>2]=866,l[D+4>>2]=2506,l[D+8>>2]=1232,Oe(o,812,D),$e(o);break}_e(_,0,0,1,0);break}}while(0);if(m=0|he((_=L<<2)+8|0,0)){D=m+8|0,l[m+4>>2]=L,l[m>>2]=~L,l[g>>2]=D,m=D;break}l[g>>2]=0,n=0;break e}_=L<<2,g=m=e+168|0,m=0|l[m>>2]}while(0);de(0|m,-1,0|_),E=e+176|0,w=1;do{if(0|l[B+(w<<2)>>2]&&(A=1<<(P=R-w|0),m=0|l[s+((_=w+-1|0)<<2)>>2],_>>>0>=16&&(l[u>>2]=866,l[u+4>>2]=1960,l[u+8>>2]=1453,Oe(o,812,u),$e(o)),m>>>0<=(t=0==(0|(t=0|l[e+28+(_<<2)>>2]))?-1:(t+-1|0)>>>(16-w|0))>>>0)){C=(0|l[e+96+(_<<2)>>2])-m|0,S=w<<16;do{_=0|d[(0|l[E>>2])+(C+m<<1)>>1],(0|c[i+_>>0])!=(0|w)&&(l[h>>2]=866,l[h+4>>2]=2322,l[h+8>>2]=1019,Oe(o,812,h),$e(o)),T=m<<P,$=_|S,y=0;do{(b=y+T|0)>>>0>=L>>>0&&(l[f>>2]=866,l[f+4>>2]=2328,l[f+8>>2]=1053,Oe(o,812,f),$e(o)),_=0|l[g>>2],-1!=(0|l[_+(b<<2)>>2])&&(l[F>>2]=866,l[F+4>>2]=2330,l[F+8>>2]=1076,Oe(o,812,F),$e(o),_=0|l[g>>2]),l[_+(b<<2)>>2]=$,y=y+1|0}while(y>>>0<A>>>0);m=m+1|0}while(m>>>0<=t>>>0)}w=w+1|0}while(R>>>0>=w>>>0)}l[(_=e+96|0)>>2]=(0|l[_>>2])-(0|l[s>>2]),l[(_=e+100|0)>>2]=(0|l[_>>2])-(0|l[s+4>>2]),l[(_=e+104|0)>>2]=(0|l[_>>2])-(0|l[s+8>>2]),l[(_=e+108|0)>>2]=(0|l[_>>2])-(0|l[s+12>>2]),l[(_=e+112|0)>>2]=(0|l[_>>2])-(0|l[s+16>>2]),l[(_=e+116|0)>>2]=(0|l[_>>2])-(0|l[s+20>>2]),l[(_=e+120|0)>>2]=(0|l[_>>2])-(0|l[s+24>>2]),l[(_=e+124|0)>>2]=(0|l[_>>2])-(0|l[s+28>>2]),l[(_=e+128|0)>>2]=(0|l[_>>2])-(0|l[s+32>>2]),l[(_=e+132|0)>>2]=(0|l[_>>2])-(0|l[s+36>>2]),l[(_=e+136|0)>>2]=(0|l[_>>2])-(0|l[s+40>>2]),l[(_=e+140|0)>>2]=(0|l[_>>2])-(0|l[s+44>>2]),l[(_=e+144|0)>>2]=(0|l[_>>2])-(0|l[s+48>>2]),l[(_=e+148|0)>>2]=(0|l[_>>2])-(0|l[s+52>>2]),l[(_=e+152|0)>>2]=(0|l[_>>2])-(0|l[s+56>>2]),l[(_=e+156|0)>>2]=(0|l[_>>2])-(0|l[s+60>>2]),l[(_=e+16|0)>>2]=0,l[(m=e+20|0)>>2]=c[I>>0];t:do{if(M){do{if(!n)break t;F=n,n=n+-1|0}while(!(0|l[B+(F<<2)>>2]));if(l[_>>2]=l[e+28+(n<<2)>>2],n=R+1|0,l[m>>2]=n,n>>>0<=x>>>0){for(;!(0|l[B+(n<<2)>>2]);)if((n=n+1|0)>>>0>x>>>0)break t;l[m>>2]=n}}}while(0);l[e+92>>2]=-1,l[e+160>>2]=1048575,l[e+12>>2]=32-(0|l[O>>2]),n=1}}while(0);return v=p,0|(B=n)}function H(e){var t=0,i=0,n=0,r=0,o=0,a=0,s=0,u=0;if(e|=0){i=e+-8|0,r=0|l[1148],u=i+(t=-8&(e=0|l[e+-4>>2]))|0;do{if(1&e)s=i,a=i;else{if(n=0|l[i>>2],!(3&e)||(o=n+t|0,(a=i+(0-n)|0)>>>0<r>>>0))return;if((0|a)==(0|l[1149])){if(3!=(3&(t=0|l[(e=u+4|0)>>2])|0)){s=a,t=o;break}return l[1146]=o,l[e>>2]=-2&t,l[a+4>>2]=1|o,void(l[a+o>>2]=o)}if(i=n>>>3,n>>>0<256){if(e=0|l[a+8>>2],(0|(t=0|l[a+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<i),s=a,t=o;break}l[e+12>>2]=t,l[t+8>>2]=e,s=a,t=o;break}r=0|l[a+24>>2],e=0|l[a+12>>2];do{if((0|e)==(0|a)){if(!(e=0|l[(t=(i=a+16|0)+4|0)>>2])){if(!(e=0|l[i>>2])){e=0;break}t=i}for(;;)if(0|(n=0|l[(i=e+20|0)>>2]))e=n,t=i;else{if(!(n=0|l[(i=e+16|0)>>2]))break;e=n,t=i}l[t>>2]=0}else s=0|l[a+8>>2],l[s+12>>2]=e,l[e+8>>2]=s}while(0);if(r){if(t=0|l[a+28>>2],(0|a)==(0|l[(i=4880+(t<<2)|0)>>2])){if(l[i>>2]=e,!e){l[1145]=l[1145]&~(1<<t),s=a,t=o;break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|a)&1)<<2)>>2]=e,!e){s=a,t=o;break}l[e+24>>2]=r,0|(i=0|l[(t=a+16|0)>>2])&&(l[e+16>>2]=i,l[i+24>>2]=e),(t=0|l[t+4>>2])?(l[e+20>>2]=t,l[t+24>>2]=e,s=a,t=o):(s=a,t=o)}else s=a,t=o}}while(0);if(!(a>>>0>=u>>>0)&&1&(n=0|l[(e=u+4|0)>>2])){if(2&n)l[e>>2]=-2&n,l[s+4>>2]=1|t,l[a+t>>2]=t,r=t;else{if(e=0|l[1149],(0|u)==(0|l[1150])){if(u=(0|l[1147])+t|0,l[1147]=u,l[1150]=s,l[s+4>>2]=1|u,(0|s)!=(0|e))return;return l[1149]=0,void(l[1146]=0)}if((0|u)==(0|e))return u=(0|l[1146])+t|0,l[1146]=u,l[1149]=a,l[s+4>>2]=1|u,void(l[a+u>>2]=u);r=(-8&n)+t|0,i=n>>>3;do{if(n>>>0<256){if(t=0|l[u+8>>2],(0|(e=0|l[u+12>>2]))==(0|t)){l[1144]=l[1144]&~(1<<i);break}l[t+12>>2]=e,l[e+8>>2]=t;break}o=0|l[u+24>>2],e=0|l[u+12>>2];do{if((0|e)==(0|u)){if(!(e=0|l[(t=(i=u+16|0)+4|0)>>2])){if(!(e=0|l[i>>2])){i=0;break}t=i}for(;;)if(0|(n=0|l[(i=e+20|0)>>2]))e=n,t=i;else{if(!(n=0|l[(i=e+16|0)>>2]))break;e=n,t=i}l[t>>2]=0,i=e}else i=0|l[u+8>>2],l[i+12>>2]=e,l[e+8>>2]=i,i=e}while(0);if(0|o){if(e=0|l[u+28>>2],(0|u)==(0|l[(t=4880+(e<<2)|0)>>2])){if(l[t>>2]=i,!i){l[1145]=l[1145]&~(1<<e);break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|u)&1)<<2)>>2]=i,!i)break;l[i+24>>2]=o,0|(t=0|l[(e=u+16|0)>>2])&&(l[i+16>>2]=t,l[t+24>>2]=i),0|(e=0|l[e+4>>2])&&(l[i+20>>2]=e,l[e+24>>2]=i)}}while(0);if(l[s+4>>2]=1|r,l[a+r>>2]=r,(0|s)==(0|l[1149]))return void(l[1146]=r)}if(e=r>>>3,r>>>0<256)return i=4616+(e<<1<<2)|0,(t=0|l[1144])&(e=1<<e)?e=0|l[(t=i+8|0)>>2]:(l[1144]=t|e,e=i,t=i+8|0),l[t>>2]=s,l[e+12>>2]=s,l[s+8>>2]=e,void(l[s+12>>2]=i);(e=r>>>8)?r>>>0>16777215?e=31:e=r>>>((e=14-((o=((u=e<<(a=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(e=((u<<=o)+245760|0)>>>16&2))+(u<<e>>>15)|0)+7|0)&1|e<<1:e=0,n=4880+(e<<2)|0,l[s+28>>2]=e,l[s+20>>2]=0,l[s+16>>2]=0,t=0|l[1145],i=1<<e;do{if(t&i){for(t=r<<(31==(0|e)?0:25-(e>>>1)|0),i=0|l[n>>2];;){if((-8&l[i+4>>2]|0)==(0|r)){e=73;break}if(!(e=0|l[(n=i+16+(t>>>31<<2)|0)>>2])){e=72;break}t<<=1,i=e}if(72==(0|e)){l[n>>2]=s,l[s+24>>2]=i,l[s+12>>2]=s,l[s+8>>2]=s;break}if(73==(0|e)){u=0|l[(a=i+8|0)>>2],l[u+12>>2]=s,l[a>>2]=s,l[s+8>>2]=u,l[s+12>>2]=i,l[s+24>>2]=0;break}}else l[1145]=t|i,l[n>>2]=s,l[s+24>>2]=n,l[s+12>>2]=s,l[s+8>>2]=s}while(0);if(u=(0|l[1152])-1|0,l[1152]=u,u)return;for(e=5032;e=0|l[e>>2];)e=e+8|0;l[1152]=-1}}}function q(e,t){var i=0,n=0,r=0,o=0,a=0,s=0,u=0;u=(e|=0)+(t|=0)|0,i=0|l[e+4>>2];do{if(1&i)s=e,i=t;else{if(n=0|l[e>>2],!(3&i))return;if(a=n+t|0,(0|(o=e+(0-n)|0))==(0|l[1149])){if(3!=(3&(i=0|l[(e=u+4|0)>>2])|0)){s=o,i=a;break}return l[1146]=a,l[e>>2]=-2&i,l[o+4>>2]=1|a,void(l[o+a>>2]=a)}if(t=n>>>3,n>>>0<256){if(e=0|l[o+8>>2],(0|(i=0|l[o+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<t),s=o,i=a;break}l[e+12>>2]=i,l[i+8>>2]=e,s=o,i=a;break}r=0|l[o+24>>2],e=0|l[o+12>>2];do{if((0|e)==(0|o)){if(!(e=0|l[(i=(t=o+16|0)+4|0)>>2])){if(!(e=0|l[t>>2])){e=0;break}i=t}for(;;)if(0|(n=0|l[(t=e+20|0)>>2]))e=n,i=t;else{if(!(n=0|l[(t=e+16|0)>>2]))break;e=n,i=t}l[i>>2]=0}else s=0|l[o+8>>2],l[s+12>>2]=e,l[e+8>>2]=s}while(0);if(r){if(i=0|l[o+28>>2],(0|o)==(0|l[(t=4880+(i<<2)|0)>>2])){if(l[t>>2]=e,!e){l[1145]=l[1145]&~(1<<i),s=o,i=a;break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|o)&1)<<2)>>2]=e,!e){s=o,i=a;break}l[e+24>>2]=r,0|(t=0|l[(i=o+16|0)>>2])&&(l[e+16>>2]=t,l[t+24>>2]=e),(i=0|l[i+4>>2])?(l[e+20>>2]=i,l[i+24>>2]=e,s=o,i=a):(s=o,i=a)}else s=o,i=a}}while(0);if(2&(n=0|l[(e=u+4|0)>>2]))l[e>>2]=-2&n,l[s+4>>2]=1|i,l[s+i>>2]=i;else{if(e=0|l[1149],(0|u)==(0|l[1150])){if(u=(0|l[1147])+i|0,l[1147]=u,l[1150]=s,l[s+4>>2]=1|u,(0|s)!=(0|e))return;return l[1149]=0,void(l[1146]=0)}if((0|u)==(0|e))return u=(0|l[1146])+i|0,l[1146]=u,l[1149]=s,l[s+4>>2]=1|u,void(l[s+u>>2]=u);o=(-8&n)+i|0,t=n>>>3;do{if(n>>>0<256){if(i=0|l[u+8>>2],(0|(e=0|l[u+12>>2]))==(0|i)){l[1144]=l[1144]&~(1<<t);break}l[i+12>>2]=e,l[e+8>>2]=i;break}r=0|l[u+24>>2],e=0|l[u+12>>2];do{if((0|e)==(0|u)){if(!(e=0|l[(i=(t=u+16|0)+4|0)>>2])){if(!(e=0|l[t>>2])){t=0;break}i=t}for(;;)if(0|(n=0|l[(t=e+20|0)>>2]))e=n,i=t;else{if(!(n=0|l[(t=e+16|0)>>2]))break;e=n,i=t}l[i>>2]=0,t=e}else t=0|l[u+8>>2],l[t+12>>2]=e,l[e+8>>2]=t,t=e}while(0);if(0|r){if(e=0|l[u+28>>2],(0|u)==(0|l[(i=4880+(e<<2)|0)>>2])){if(l[i>>2]=t,!t){l[1145]=l[1145]&~(1<<e);break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|u)&1)<<2)>>2]=t,!t)break;l[t+24>>2]=r,0|(i=0|l[(e=u+16|0)>>2])&&(l[t+16>>2]=i,l[i+24>>2]=t),0|(e=0|l[e+4>>2])&&(l[t+20>>2]=e,l[e+24>>2]=t)}}while(0);if(l[s+4>>2]=1|o,l[s+o>>2]=o,(0|s)==(0|l[1149]))return void(l[1146]=o);i=o}if(e=i>>>3,i>>>0<256)return t=4616+(e<<1<<2)|0,(i=0|l[1144])&(e=1<<e)?e=0|l[(i=t+8|0)>>2]:(l[1144]=i|e,e=t,i=t+8|0),l[i>>2]=s,l[e+12>>2]=s,l[s+8>>2]=e,void(l[s+12>>2]=t);if((e=i>>>8)?i>>>0>16777215?e=31:e=i>>>((e=14-((o=((u=e<<(a=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(e=((u<<=o)+245760|0)>>>16&2))+(u<<e>>>15)|0)+7|0)&1|e<<1:e=0,r=4880+(e<<2)|0,l[s+28>>2]=e,l[s+20>>2]=0,l[s+16>>2]=0,!((t=0|l[1145])&(n=1<<e)))return l[1145]=t|n,l[r>>2]=s,l[s+24>>2]=r,l[s+12>>2]=s,void(l[s+8>>2]=s);for(t=i<<(31==(0|e)?0:25-(e>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|i)){e=69;break}if(!(e=0|l[(r=n+16+(t>>>31<<2)|0)>>2])){e=68;break}t<<=1,n=e}return 68==(0|e)?(l[r>>2]=s,l[s+24>>2]=n,l[s+12>>2]=s,void(l[s+8>>2]=s)):69==(0|e)?(u=0|l[(a=n+8|0)>>2],l[u+12>>2]=s,l[a>>2]=s,l[s+8>>2]=u,l[s+12>>2]=n,void(l[s+24>>2]=0)):void 0}function j(e,t,i,n,r){r|=0;var o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0,_=0;if(h=e|=0,a=i|=0,s=f=n|=0,!(c=u=t|=0))return o=0!=(0|r),s?o?(l[r>>2]=0|e,l[r+4>>2]=0&t,b=f=0,0|(r=0)):(b=f=0,0|(r=0)):(o&&(l[r>>2]=(h>>>0)%(a>>>0),l[r+4>>2]=0),b=f=0,0|(r=(h>>>0)/(a>>>0)>>>0));o=0==(0|s);do{if(a){if(!o){if((o=(0|C(0|s))-(0|C(0|c))|0)>>>0<=31){a=d=o+1|0,e=h>>>(d>>>0)&(t=o-31>>31)|c<<(s=31-o|0),t&=c>>>(d>>>0),o=0,s=h<<s;break}return r?(l[r>>2]=0|e,l[r+4>>2]=u|0&t,b=f=0,0|(r=0)):(b=f=0,0|(r=0))}if((o=a-1|0)&a|0){a=s=33+(0|C(0|a))-(0|C(0|c))|0,e=(d=32-s|0)-1>>31&c>>>((p=s-32|0)>>>0)|(c<<d|h>>>(s>>>0))&(t=p>>31),t&=c>>>(s>>>0),o=h<<(_=64-s|0)&(u=d>>31),s=(c<<_|h>>>(p>>>0))&u|h<<d&s-33>>31;break}return 0|r&&(l[r>>2]=o&h,l[r+4>>2]=0),1==(0|a)?(b=p=u|0&t,0|(_=0|e)):(_=0|Pe(0|a),b=p=c>>>(_>>>0)|0,0|(_=c<<32-_|h>>>(_>>>0)|0))}if(o)return 0|r&&(l[r>>2]=(c>>>0)%(a>>>0),l[r+4>>2]=0),b=p=0,0|(_=(c>>>0)/(a>>>0)>>>0);if(!h)return 0|r&&(l[r>>2]=0,l[r+4>>2]=(c>>>0)%(s>>>0)),b=p=0,0|(_=(c>>>0)/(s>>>0)>>>0);if(!((o=s-1|0)&s))return 0|r&&(l[r>>2]=0|e,l[r+4>>2]=o&c|0&t),p=0,_=c>>>((0|Pe(0|s))>>>0),b=p,0|_;if((o=(0|C(0|s))-(0|C(0|c))|0)>>>0<=30){a=t=o+1|0,e=c<<(s=31-o|0)|h>>>(t>>>0),t=c>>>(t>>>0),o=0,s=h<<s;break}return r?(l[r>>2]=0|e,l[r+4>>2]=u|0&t,b=p=0,0|(_=0)):(b=p=0,0|(_=0))}while(0);if(a){c=0|Ge(0|(d=0|i),0|(h=f|0&n),-1,-1),i=b,u=s,s=0;do{n=u,u=o>>>31|u<<1,o=s|o<<1,Be(0|c,0|i,0|(n=e<<1|n>>>31|0),0|(f=e>>>31|t<<1|0)),s=1&(p=(_=b)>>31|((0|_)<0?-1:0)<<1),e=0|Be(0|n,0|f,p&d|0,(((0|_)<0?-1:0)>>31|((0|_)<0?-1:0)<<1)&h|0),t=b,a=a-1|0}while(0!=(0|a));c=u,u=0}else c=s,u=0,s=0;return a=0,0|r&&(l[r>>2]=e,l[r+4>>2]=t),b=p=(0|o)>>>31|(c|a)<<1|0&(a<<1|o>>>31)|u,0|(_=-2&(o<<1|0)|s)}function X(e,t){e|=0;var i,n,r,o,a,s,u,h,f=0,p=0,_=0,m=0,g=0,x=0;h=v,v=v+576|0,r=h+48|0,a=h+32|0,o=h+16|0,n=h,u=h+64|0,s=0|l[(t|=0)+20>>2],(0|(i=0|l[(x=e+20|0)>>2]))<24?(p=(f=0|l[(g=e+4|0)>>2])>>>0<(_=0|l[e+8>>2])>>>0,(0|i)<16?(p?(m=(0|c[f>>0])<<8,f=f+1|0):m=0,f>>>0<_>>>0?(_=0|c[f>>0],f=f+1|0):_=0,l[g>>2]=f,l[x>>2]=i+16,p=16,f=_|m):(p?(l[g>>2]=f+1,f=0|c[f>>0]):f=0,l[x>>2]=i+8,p=24),_=l[(g=e+16|0)>>2]|f<<p-i,l[g>>2]=_):(g=_=e+16|0,_=0|l[_>>2]),m=1+(_>>>16)|0;do{if(!(m>>>0<=(0|l[s+16>>2])>>>0)){for(p=0|l[s+20>>2];m>>>0>(0|l[s+28+((f=p+-1|0)<<2)>>2])>>>0;)p=p+1|0;if((f=(_>>>(32-p|0))+(0|l[s+96+(f<<2)>>2])|0)>>>0<(0|l[t>>2])>>>0){f=0|d[(0|l[s+176>>2])+(f<<1)>>1];break}return l[r>>2]=866,l[r+4>>2]=3275,l[r+8>>2]=1348,Oe(u,812,r),$e(u),v=h,0|(x=0)}-1==(0|(p=0|l[(0|l[s+168>>2])+(_>>>(32-(0|l[s+8>>2])|0)<<2)>>2]))&&(l[n>>2]=866,l[n+4>>2]=3253,l[n+8>>2]=1393,Oe(u,812,n),$e(u)),f=65535&p,p>>>=16,(0|l[t+8>>2])>>>0<=f>>>0&&(l[o>>2]=866,l[o+4>>2]=909,l[o+8>>2]=1497,Oe(u,812,o),$e(u)),(0|c[(0|l[t+4>>2])+f>>0])!=(0|p)&&(l[a>>2]=866,l[a+4>>2]=3257,l[a+8>>2]=1410,Oe(u,812,a),$e(u))}while(0);return l[g>>2]=l[g>>2]<<p,l[x>>2]=(0|l[x>>2])-p,v=h,0|(x=f)}function Y(e){var t,i,n,o,a,s=0,u=0,c=0;if(a=v,v=v+576|0,c=a+48|0,n=a+32|0,i=a+16|0,t=a,o=a+64|0,l[(e|=0)>>2]=0,0|(u=0|l[(s=e+284|0)>>2])&&(7&u?(l[t>>2]=866,l[t+4>>2]=2506,l[t+8>>2]=1232,Oe(o,812,t),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+288>>2]=0,l[e+292>>2]=0),r[e+296>>0]=0,0|(u=0|l[(s=e+268|0)>>2])&&(7&u?(l[i>>2]=866,l[i+4>>2]=2506,l[i+8>>2]=1232,Oe(o,812,i),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+272>>2]=0,l[e+276>>2]=0),r[e+280>>0]=0,0|(u=0|l[(s=e+252|0)>>2])&&(7&u?(l[n>>2]=866,l[n+4>>2]=2506,l[n+8>>2]=1232,Oe(o,812,n),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+256>>2]=0,l[e+260>>2]=0),r[e+264>>0]=0,!(u=0|l[(s=e+236|0)>>2]))return r[(c=e+248|0)>>0]=0,ce(c=e+212|0),ce(c=e+188|0),ce(c=e+164|0),ce(c=e+140|0),ce(c=e+116|0),void(v=a);7&u?(l[c>>2]=866,l[c+4>>2]=2506,l[c+8>>2]=1232,Oe(o,812,c),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+240>>2]=0,l[e+244>>2]=0,r[(c=e+248|0)>>0]=0,ce(c=e+212|0),ce(c=e+188|0),ce(c=e+164|0),ce(c=e+140|0),ce(c=e+116|0),v=a}function Z(e,t,i){e|=0,t|=0,i|=0;var n=0,r=0,o=0;e:do{if(t>>>0<=20){switch(0|t){case 9:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[e>>2]=t;break e;case 10:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[(n=e)>>2]=t,l[n+4>>2]=((0|t)<0)<<31>>31;break e;case 11:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[(n=e)>>2]=t,l[n+4>>2]=0;break e;case 12:n=7+(0|l[i>>2])&-8,r=0|l[(t=n)>>2],t=0|l[t+4>>2],l[i>>2]=n+8,l[(n=e)>>2]=r,l[n+4>>2]=t;break e;case 13:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,n=(65535&n)<<16>>16,l[(r=e)>>2]=n,l[r+4>>2]=((0|n)<0)<<31>>31;break e;case 14:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,l[(r=e)>>2]=65535&n,l[r+4>>2]=0;break e;case 15:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,n=(255&n)<<24>>24,l[(r=e)>>2]=n,l[r+4>>2]=((0|n)<0)<<31>>31;break e;case 16:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,l[(r=e)>>2]=255&n,l[r+4>>2]=0;break e;case 17:case 18:r=7+(0|l[i>>2])&-8,o=+m[r>>3],l[i>>2]=r+8,m[e>>3]=o;break e;default:break e}}}while(0)}function K(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0;var o,a,s,u,c,h,d=0,f=0,p=0,_=0;if(h=v,v=v+576|0,u=h+48|0,o=h+32|0,f=h+16|0,d=h,s=h+64|0,c=h+60|0,_=(e|=0)+8|0,(0|l[(a=e+4|0)>>2])>>>0>(0|l[_>>2])>>>0&&(l[d>>2]=866,l[d+4>>2]=2123,l[d+8>>2]=845,Oe(s,812,d),$e(s)),(2147418112/(n>>>0)|0)>>>0<=t>>>0&&(l[f>>2]=866,l[f+4>>2]=2124,l[f+8>>2]=885,Oe(s,812,f),$e(s)),(d=0|l[_>>2])>>>0>=t>>>0)return v=h,0|(_=1);if(i&&0!=((p=t+-1|0)&t|0)?(t=p>>>16|p,t|=t>>>8,t|=t>>>4,(t=1+((t|=t>>>2)>>>1|t)|0)?i=9:(t=0,i=10)):i=9,9==(0|i)&&t>>>0<=d>>>0&&(i=10),10==(0|i)&&(l[o>>2]=866,l[o+4>>2]=2133,l[o+8>>2]=933,Oe(s,812,o),$e(s)),p=0|T(t,n),r)if(f=0|he(p,c)){ct[0&r](f,0|l[e>>2],0|l[a>>2]),d=0|l[e>>2];do{if(0|d){if(7&d){l[u>>2]=866,l[u+4>>2]=2506,l[u+8>>2]=1232,Oe(s,812,u),$e(s);break}_e(d,0,0,1,0);break}}while(0);l[e>>2]=f,i=20}else t=0;else d=0|function(e,t,i,n){t|=0,i|=0,n|=0;var r=0,o=0,a=0,s=0,u=0,c=0;return c=v,v=v+560|0,u=c+32|0,o=c+16|0,r=c,a=c+48|0,s=c+44|0,7&(e|=0)|0?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1210,Oe(a,812,r),$e(a),v=c,0|(u=0)):t>>>0>2147418112?(l[o>>2]=866,l[o+4>>2]=2506,l[o+8>>2]=1103,Oe(a,812,o),$e(a),v=c,0|(u=0)):(l[s>>2]=t,e=0|_e(e,t,s,n,0),0|i&&(l[i>>2]=l[s>>2]),7&e|0&&(l[u>>2]=866,l[u+4>>2]=2558,l[u+8>>2]=1156,Oe(a,812,u),$e(a)),v=c,0|(u=e))}(0|l[e>>2],p,c,1),d?(l[e>>2]=d,i=20):t=0;return 20==(0|i)&&((d=0|l[c>>2])>>>0>p>>>0&&(t=(d>>>0)/(n>>>0)|0),l[_>>2]=t,t=1),v=h,0|(_=t)}function Q(e,t,i,n,o,a,s){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0;var u=0,h=0,f=0,p=0;if(p=0|l[(e|=0)+88>>2],h=(((h=(c[p+12>>0]<<8|c[p+13>>0])>>>s)>>>0>1?h:1)+3|0)>>>2,f=(((f=(c[p+14>>0]<<8|c[p+15>>0])>>>s)>>>0>1?f:1)+3|0)>>>2,s=0|r[(p=p+18|0)>>0],s=0|T(h,s<<24>>24==0|s<<24>>24==9?8:16),a){if(!(0==(3&a|0)&s>>>0<=a>>>0))return 0|(o=0);s=a}if((0|T(s,f))>>>0>o>>>0||(a=(h+1|0)>>>1,u=(f+1|0)>>>1,!i))return 0|(o=0);switch(l[e+92>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,0|r[p>>0]){case 0:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,d,f,p,_,m,g,x,y,$,b,C,S,w,E,P,A,L,M,R,O,D,I,F,B,N,G,z,U,V,k,W,H=0,q=0,j=0,Y=0,Z=0,K=0,Q=0,J=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0;if(W=v,v=v+656|0,V=W+112|0,z=W+96|0,G=W+80|0,N=W+64|0,B=W+48|0,k=W+32|0,U=W+16|0,F=W,D=W+144|0,I=W+128|0,w=0|l[(S=240+(e|=0)|0)>>2],P=0|l[(E=e+256|0)>>2],A=255&(se=0|r[17+(0|l[e+88>>2])>>0]),!(se<<24>>24))return v=W,1;M=0==(0|u),O=(R=s+-1|0)<<4,se=u+-1|0,g=0!=(1&a|0),x=n<<1,y=e+92|0,$=e+116|0,b=e+140|0,C=e+236|0,m=0!=(1&o|0),_=e+188|0,h=e+252|0,d=1+(L=n>>>2)|0,f=L+2|0,p=L+3|0,ae=0,a=0,i=0,o=1;do{if(!M)for(re=0|l[t+(ae<<2)>>2],oe=0;;){if(q=0==(0|(ie=1&oe)),te=(ie<<5^32)-16|0,ie=(ie<<1^2)-1|0,ne=g&(e=(0|oe)==(0|se)),(0|(H=q?0:R))!=(0|(ee=q?s:-1)))for(J=g&e^1,Q=q?re:re+O|0;;){1==(0|o)&&(o=512|X(y,$)),K=7&o,o>>>=3,q=0|c[1539+K>>0],e=0;do{i=(Z=(Y=(j=(0|X(y,b))+i|0)-w|0)>>31)&j|Y&~Z,(0|l[S>>2])>>>0<=i>>>0&&(l[F>>2]=866,l[F+4>>2]=910,l[F+8>>2]=1497,Oe(D,812,F),$e(D)),l[I+(e<<2)>>2]=l[(0|l[C>>2])+(i<<2)>>2],e=e+1|0}while(e>>>0<q>>>0);if(ne|(Z=m&(0|H)==(0|R))){Y=0;do{e=Q+(0|T(Y,n))|0,j=0==(0|Y)|J,q=Y<<1,a=(a=(le=(ue=(0|X(y,_))+a|0)-P|0)>>31)&ue|le&~a;do{if(Z){if(!j){a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a;break}l[e>>2]=l[I+((0|c[1547+(K<<2)+q>>0])<<2)>>2],(0|l[E>>2])>>>0<=a>>>0&&(l[z>>2]=866,l[z+4>>2]=910,l[z+8>>2]=1497,Oe(D,812,z),$e(D)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2],a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a}else j&&(l[e>>2]=l[I+((0|c[1547+(K<<2)+q>>0])<<2)>>2],(0|l[E>>2])>>>0<=a>>>0&&(l[G>>2]=866,l[G+4>>2]=910,l[G+8>>2]=1497,Oe(D,812,G),$e(D)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2]),e=e+8|0,a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a,j&&(l[e>>2]=l[I+((0|c[1547+(K<<2)+(1|q)>>0])<<2)>>2],(0|l[E>>2])>>>0<=a>>>0&&(l[V>>2]=866,l[V+4>>2]=910,l[V+8>>2]=1497,Oe(D,812,V),$e(D)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2])}while(0);Y=Y+1|0}while(2!=(0|Y))}else l[Q>>2]=l[I+((0|c[1547+(K<<2)>>0])<<2)>>2],a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[U>>2]=866,l[U+4>>2]=910,l[U+8>>2]=1497,Oe(D,812,U),$e(D)),l[Q+4>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[Q+8>>2]=l[I+((0|c[1547+(K<<2)+1>>0])<<2)>>2],a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[k>>2]=866,l[k+4>>2]=910,l[k+8>>2]=1497,Oe(D,812,k),$e(D)),l[Q+12>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[Q+(L<<2)>>2]=l[I+((0|c[1547+(K<<2)+2>>0])<<2)>>2],a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[B>>2]=866,l[B+4>>2]=910,l[B+8>>2]=1497,Oe(D,812,B),$e(D)),l[Q+(d<<2)>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[Q+(f<<2)>>2]=l[I+((0|c[1547+(K<<2)+3>>0])<<2)>>2],a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[N>>2]=866,l[N+4>>2]=910,l[N+8>>2]=1497,Oe(D,812,N),$e(D)),l[Q+(p<<2)>>2]=l[(0|l[h>>2])+(a<<2)>>2];if((0|(H=ie+H|0))==(0|ee))break;Q=Q+te|0}if((0|(oe=oe+1|0))==(0|u))break;re=re+x|0}ae=ae+1|0}while((0|ae)!=(0|A));return v=W,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 4:case 6:case 5:case 3:case 2:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,g,x,y,$,b,T,C,S,w,E,P,A,L,M,R,O,D,I,F,B,N,G,z,U,V,k,W,H,q,j,Y=0,Z=0,K=0,Q=0,J=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0,ce=0,he=0,de=0,fe=0,pe=0,_e=0,me=0;if(j=v,v=v+640|0,W=j+80|0,k=j+64|0,V=j+48|0,q=j+32|0,H=j+16|0,U=j,G=j+128|0,z=j+112|0,g=j+96|0,y=0|l[(x=240+(e|=0)|0)>>2],b=0|l[($=e+256|0)>>2],C=0|l[(T=e+272|0)>>2],me=0|l[e+88>>2],S=(0|c[me+63>>0])<<8|0|c[me+64>>0],w=255&(me=0|r[me+17>>0]),!(me<<24>>24))return v=j,1;E=0==(0|u),A=(P=s+-1|0)<<5,L=u+-1|0,M=n<<1,R=e+92|0,O=e+116|0,D=e+164|0,I=e+268|0,F=e+140|0,B=e+236|0,N=e+212|0,me=e+188|0,m=0==(1&o|0),_=0==(1&a|0),f=e+288|0,p=e+284|0,h=e+252|0,_e=0,e=0,a=0,o=0,i=0,Y=1;do{if(!E)for(fe=0|l[t+(_e<<2)>>2],pe=0;;){if(K=0==(0|(de=1&pe)),he=(de<<6^64)-32|0,de=(de<<1^2)-1|0,(0|(Z=K?0:P))!=(0|(ue=K?s:-1)))for(ce=_|(0|pe)!=(0|L),le=K?fe:fe+A|0;;){1==(0|Y)&&(Y=512|X(R,O)),se=7&Y,Y>>>=3,Q=0|c[1539+se>>0],K=0;do{a=(ae=(oe=(re=(0|X(R,D))+a|0)-C|0)>>31)&re|oe&~ae,(0|l[T>>2])>>>0<=a>>>0&&(l[U>>2]=866,l[U+4>>2]=910,l[U+8>>2]=1497,Oe(G,812,U),$e(G)),l[g+(K<<2)>>2]=d[(0|l[I>>2])+(a<<1)>>1],K=K+1|0}while(K>>>0<Q>>>0);K=0;do{i=(ae=(oe=(re=(0|X(R,F))+i|0)-y|0)>>31)&re|oe&~ae,(0|l[x>>2])>>>0<=i>>>0&&(l[H>>2]=866,l[H+4>>2]=910,l[H+8>>2]=1497,Oe(G,812,H),$e(G)),l[z+(K<<2)>>2]=l[(0|l[B>>2])+(i<<2)>>2],K=K+1|0}while(K>>>0<Q>>>0);for(ae=m|(0|Z)!=(0|P),re=0,oe=le;;){if(te=ce|0==(0|re),ie=re<<1,ae)for(J=0,ee=oe;e=(e=(Q=(ne=(0|X(R,N))+e|0)-S|0)>>31)&ne|Q&~e,o=(o=(ne=(Q=(0|X(R,me))+o|0)-b|0)>>31)&Q|ne&~o,te&&(K=0|c[J+ie+(1547+(se<<2))>>0],Q=3*e|0,(0|l[f>>2])>>>0<=Q>>>0&&(l[q>>2]=866,l[q+4>>2]=910,l[q+8>>2]=1497,Oe(G,812,q),$e(G)),ne=(0|l[p>>2])+(Q<<1)|0,l[ee>>2]=(0|d[ne>>1])<<16|l[g+(K<<2)>>2],l[ee+4>>2]=(0|d[ne+4>>1])<<16|0|d[ne+2>>1],l[ee+8>>2]=l[z+(K<<2)>>2],(0|l[$>>2])>>>0<=o>>>0&&(l[V>>2]=866,l[V+4>>2]=910,l[V+8>>2]=1497,Oe(G,812,V),$e(G)),l[ee+12>>2]=l[(0|l[h>>2])+(o<<2)>>2]),2!=(0|(J=J+1|0));)ee=ee+16|0;else for(ne=1^te,te=1547+(se<<2)+ie|0,J=0,ee=oe;e=(e=(Q=(ie=(0|X(R,N))+e|0)-S|0)>>31)&ie|Q&~e,o=(o=(ie=(Q=(0|X(R,me))+o|0)-b|0)>>31)&Q|ie&~o,0!=(0|J)|ne||(K=0|c[te>>0],Q=3*e|0,(0|l[f>>2])>>>0<=Q>>>0&&(l[k>>2]=866,l[k+4>>2]=910,l[k+8>>2]=1497,Oe(G,812,k),$e(G)),ie=(0|l[p>>2])+(Q<<1)|0,l[ee>>2]=(0|d[ie>>1])<<16|l[g+(K<<2)>>2],l[ee+4>>2]=(0|d[ie+4>>1])<<16|0|d[ie+2>>1],l[ee+8>>2]=l[z+(K<<2)>>2],(0|l[$>>2])>>>0<=o>>>0&&(l[W>>2]=866,l[W+4>>2]=910,l[W+8>>2]=1497,Oe(G,812,W),$e(G)),l[ee+12>>2]=l[(0|l[h>>2])+(o<<2)>>2]),2!=(0|(J=J+1|0));)ee=ee+16|0;if(2==(0|(re=re+1|0)))break;oe=oe+n|0}if((0|(Z=de+Z|0))==(0|ue))break;le=le+he|0}if((0|(pe=pe+1|0))==(0|u))break;fe=fe+M|0}_e=_e+1|0}while((0|_e)!=(0|w));return v=j,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 9:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,g,x,y,$,b,T,C,S,w,E,P,A,L,M,R,O,D,I,F,B=0,N=0,G=0,z=0,U=0,V=0,k=0,W=0,H=0,q=0,j=0,Y=0,Z=0,K=0,Q=0,J=0,ee=0,te=0;if(F=v,v=v+592|0,O=F+48|0,I=F+32|0,D=F+16|0,R=F,L=F+80|0,M=F+64|0,g=0|l[(m=272+(e|=0)|0)>>2],te=0|l[e+88>>2],x=(0|c[te+63>>0])<<8|0|c[te+64>>0],y=255&(te=0|r[te+17>>0]),!(te<<24>>24))return v=F,1;$=0==(0|u),T=(b=s+-1|0)<<4,C=u+-1|0,S=n<<1,w=e+92|0,E=e+116|0,P=e+164|0,A=e+268|0,te=e+212|0,_=0==(1&o|0),p=0==(1&a|0),f=e+288|0,h=e+284|0,ee=0,o=0,i=0,a=1;do{if(!$)for(Q=0|l[t+(ee<<2)>>2],J=0;;){if(B=0==(0|(K=1&J)),Z=(K<<5^32)-16|0,K=(K<<1^2)-1|0,(0|(e=B?0:b))!=(0|(j=B?s:-1)))for(Y=p|(0|J)!=(0|C),q=B?Q:Q+T|0;;){1==(0|a)&&(a=512|X(w,E)),H=7&a,a>>>=3,N=0|c[1539+H>>0],B=0;do{i=(W=(k=(V=(0|X(w,P))+i|0)-g|0)>>31)&V|k&~W,(0|l[m>>2])>>>0<=i>>>0&&(l[R>>2]=866,l[R+4>>2]=910,l[R+8>>2]=1497,Oe(L,812,R),$e(L)),l[M+(B<<2)>>2]=d[(0|l[A>>2])+(i<<1)>>1],B=B+1|0}while(B>>>0<N>>>0);for(W=_|(0|e)!=(0|b),V=0,k=q;U=Y|0==(0|V),N=V<<1,z=(z=(G=(B=(0|X(w,te))+o|0)-x|0)>>31)&B|G&~z,W?(U&&(o=0|c[1547+(H<<2)+N>>0],B=3*z|0,(0|l[f>>2])>>>0<=B>>>0&&(l[D>>2]=866,l[D+4>>2]=910,l[D+8>>2]=1497,Oe(L,812,D),$e(L)),G=(0|l[h>>2])+(B<<1)|0,l[k>>2]=(0|d[G>>1])<<16|l[M+(o<<2)>>2],l[k+4>>2]=(0|d[G+4>>1])<<16|0|d[G+2>>1]),G=k+8|0,o=(o=(z=(B=(0|X(w,te))+z|0)-x|0)>>31)&B|z&~o,U&&(B=0|c[1547+(H<<2)+(1|N)>>0],N=3*o|0,(0|l[f>>2])>>>0<=N>>>0&&(l[O>>2]=866,l[O+4>>2]=910,l[O+8>>2]=1497,Oe(L,812,O),$e(L)),U=(0|l[h>>2])+(N<<1)|0,l[G>>2]=(0|d[U>>1])<<16|l[M+(B<<2)>>2],l[k+12>>2]=(0|d[U+4>>1])<<16|0|d[U+2>>1])):(U&&(o=0|c[1547+(H<<2)+N>>0],B=3*z|0,(0|l[f>>2])>>>0<=B>>>0&&(l[I>>2]=866,l[I+4>>2]=910,l[I+8>>2]=1497,Oe(L,812,I),$e(L)),U=(0|l[h>>2])+(B<<1)|0,l[k>>2]=(0|d[U>>1])<<16|l[M+(o<<2)>>2],l[k+4>>2]=(0|d[U+4>>1])<<16|0|d[U+2>>1]),o=(o=(U=(z=(0|X(w,te))+z|0)-x|0)>>31)&z|U&~o),2!=(0|(V=V+1|0));)k=k+n|0;if((0|(e=K+e|0))==(0|j))break;q=q+Z|0}if((0|(J=J+1|0))==(0|u))break;Q=Q+S|0}ee=ee+1|0}while((0|ee)!=(0|y));return v=F,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 8:case 7:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,g,x,y,$,b,T,C,S,w,E,P,A,L,M,R,O,D,I,F,B,N,G,z=0,U=0,V=0,k=0,W=0,H=0,q=0,j=0,Y=0,Z=0,K=0,Q=0,J=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0,ce=0,he=0;if(G=v,v=v+640|0,F=G+80|0,I=G+64|0,D=G+48|0,N=G+32|0,B=G+16|0,O=G,M=G+128|0,R=G+112|0,m=G+96|0,x=0|l[(g=272+(e|=0)|0)>>2],he=0|l[e+88>>2],y=(0|c[he+63>>0])<<8|0|c[he+64>>0],$=255&(he=0|r[he+17>>0]),!(he<<24>>24))return v=G,1;b=0==(0|u),C=(T=s+-1|0)<<5,S=u+-1|0,w=n<<1,E=e+92|0,P=e+116|0,A=e+164|0,L=e+268|0,he=e+212|0,_=0==(1&o|0),p=0==(1&a|0),f=e+288|0,h=e+284|0,ce=0,e=0,a=0,o=0,i=0,z=1;do{if(!b)for(le=0|l[t+(ce<<2)>>2],ue=0;;){if(V=0==(0|(se=1&ue)),ae=(se<<6^64)-32|0,se=(se<<1^2)-1|0,(0|(U=V?0:T))!=(0|(re=V?s:-1)))for(oe=p|(0|ue)!=(0|S),ne=V?le:le+C|0;;){1==(0|z)&&(z=512|X(E,P)),ie=7&z,z>>>=3,k=0|c[1539+ie>>0],V=0;do{i=(te=(ee=(J=(0|X(E,A))+i|0)-x|0)>>31)&J|ee&~te,(0|l[g>>2])>>>0<=i>>>0&&(l[O>>2]=866,l[O+4>>2]=910,l[O+8>>2]=1497,Oe(M,812,O),$e(M)),l[R+(V<<2)>>2]=d[(0|l[L>>2])+(i<<1)>>1],V=V+1|0}while(V>>>0<k>>>0);V=0;do{a=(te=(ee=(J=(0|X(E,A))+a|0)-x|0)>>31)&J|ee&~te,(0|l[g>>2])>>>0<=a>>>0&&(l[B>>2]=866,l[B+4>>2]=910,l[B+8>>2]=1497,Oe(M,812,B),$e(M)),l[m+(V<<2)>>2]=d[(0|l[L>>2])+(a<<1)>>1],V=V+1|0}while(V>>>0<k>>>0);for(te=_|(0|U)!=(0|T),J=0,ee=ne;;){if(Z=oe|0==(0|J),K=J<<1,te)for(j=0,Y=ee;o=(o=(q=(Q=(0|X(E,he))+o|0)-y|0)>>31)&Q|q&~o,e=(e=(Q=(q=(0|X(E,he))+e|0)-y|0)>>31)&q|Q&~e,Z&&(q=0|c[j+K+(1547+(ie<<2))>>0],k=3*o|0,(V=0|l[f>>2])>>>0<=k>>>0&&(l[N>>2]=866,l[N+4>>2]=910,l[N+8>>2]=1497,Oe(M,812,N),$e(M),V=0|l[f>>2]),k=(W=0|l[h>>2])+(k<<1)|0,V>>>0>(H=3*e|0)>>>0?V=W:(l[D>>2]=866,l[D+4>>2]=910,l[D+8>>2]=1497,Oe(M,812,D),$e(M),V=0|l[h>>2]),Q=V+(H<<1)|0,l[Y>>2]=(0|d[k>>1])<<16|l[R+(q<<2)>>2],l[Y+4>>2]=(0|d[k+4>>1])<<16|0|d[k+2>>1],l[Y+8>>2]=(0|d[Q>>1])<<16|l[m+(q<<2)>>2],l[Y+12>>2]=(0|d[Q+4>>1])<<16|0|d[Q+2>>1]),2!=(0|(j=j+1|0));)Y=Y+16|0;else for(Q=1^Z,Z=1547+(ie<<2)+K|0,j=0,Y=ee;o=(o=(q=(K=(0|X(E,he))+o|0)-y|0)>>31)&K|q&~o,e=(e=(K=(q=(0|X(E,he))+e|0)-y|0)>>31)&q|K&~e,0!=(0|j)|Q||(q=0|c[Z>>0],k=3*o|0,(V=0|l[f>>2])>>>0<=k>>>0&&(l[I>>2]=866,l[I+4>>2]=910,l[I+8>>2]=1497,Oe(M,812,I),$e(M),V=0|l[f>>2]),k=(W=0|l[h>>2])+(k<<1)|0,V>>>0>(H=3*e|0)>>>0?V=W:(l[F>>2]=866,l[F+4>>2]=910,l[F+8>>2]=1497,Oe(M,812,F),$e(M),V=0|l[h>>2]),K=V+(H<<1)|0,l[Y>>2]=(0|d[k>>1])<<16|l[R+(q<<2)>>2],l[Y+4>>2]=(0|d[k+4>>1])<<16|0|d[k+2>>1],l[Y+8>>2]=(0|d[K>>1])<<16|l[m+(q<<2)>>2],l[Y+12>>2]=(0|d[K+4>>1])<<16|0|d[K+2>>1]),2!=(0|(j=j+1|0));)Y=Y+16|0;if(2==(0|(J=J+1|0)))break;ee=ee+n|0}if((0|(U=se+U|0))==(0|re))break;ne=ne+ae|0}if((0|(ue=ue+1|0))==(0|u))break;le=le+w|0}ce=ce+1|0}while((0|ce)!=(0|$));return v=G,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;default:return 0|(o=0)}return 0|(o=1)}function J(e,t,i){e|=0,t|=0;var n,o,a=0;if((0|(i|=0))>=8192)return 0|F(0|e,0|t,0|i);if(o=0|e,n=e+i|0,(3&e)==(3&t)){for(;3&e;){if(!i)return 0|o;r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0,i=i-1|0}for(a=(i=-4&n|0)-64|0;(0|e)<=(0|a);)l[e>>2]=l[t>>2],l[e+4>>2]=l[t+4>>2],l[e+8>>2]=l[t+8>>2],l[e+12>>2]=l[t+12>>2],l[e+16>>2]=l[t+16>>2],l[e+20>>2]=l[t+20>>2],l[e+24>>2]=l[t+24>>2],l[e+28>>2]=l[t+28>>2],l[e+32>>2]=l[t+32>>2],l[e+36>>2]=l[t+36>>2],l[e+40>>2]=l[t+40>>2],l[e+44>>2]=l[t+44>>2],l[e+48>>2]=l[t+48>>2],l[e+52>>2]=l[t+52>>2],l[e+56>>2]=l[t+56>>2],l[e+60>>2]=l[t+60>>2],e=e+64|0,t=t+64|0;for(;(0|e)<(0|i);)l[e>>2]=l[t>>2],e=e+4|0,t=t+4|0}else for(i=n-4|0;(0|e)<(0|i);)r[e>>0]=0|r[t>>0],r[e+1>>0]=0|r[t+1>>0],r[e+2>>0]=0|r[t+2>>0],r[e+3>>0]=0|r[t+3>>0],e=e+4|0,t=t+4|0;for(;(0|e)<(0|n);)r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0;return 0|o}function ee(e,t,i){t|=0,i|=0;var n,r,o,a,s,u=0,c=0,h=0,d=0,f=0,p=0;s=v,v=v+48|0,a=s+16|0,h=s,c=s+32|0,u=0|l[(r=(e|=0)+28|0)>>2],l[c>>2]=u,u=(0|l[(o=e+20|0)>>2])-u|0,l[c+4>>2]=u,l[c+8>>2]=t,l[c+12>>2]=i,u=u+i|0,n=e+60|0,l[h>>2]=l[n>>2],l[h+4>>2]=c,l[h+8>>2]=2,h=0|ze(0|G(146,0|h));e:do{if((0|u)!=(0|h)){for(t=2;!((0|h)<0);)if(u=u-h|0,t=((f=h>>>0>(p=0|l[c+4>>2])>>>0)<<31>>31)+t|0,p=h-(f?p:0)|0,l[(c=f?c+8|0:c)>>2]=(0|l[c>>2])+p,l[(f=c+4|0)>>2]=(0|l[f>>2])-p,l[a>>2]=l[n>>2],l[a+4>>2]=c,l[a+8>>2]=t,(0|u)==(0|(h=0|ze(0|G(146,0|a))))){d=3;break e}l[e+16>>2]=0,l[r>>2]=0,l[o>>2]=0,l[e>>2]=32|l[e>>2],i=2==(0|t)?0:i-(0|l[c+4>>2])|0}else d=3}while(0);return 3==(0|d)&&(p=0|l[e+44>>2],l[e+16>>2]=p+(0|l[e+48>>2]),l[r>>2]=p,l[o>>2]=p),v=s,0|i}function te(e,t,i){e|=0,t|=0,i|=0;var n,o,a,s,u,c=0,h=0,d=0,f=0,p=0,_=0,m=0;u=v,v=v+224|0,n=u+120|0,a=u,s=u+136|0,h=(c=o=u+80|0)+40|0;do{l[c>>2]=0,c=c+4|0}while((0|c)<(0|h));return l[n>>2]=l[i>>2],(0|V(0,t,n,a,o))<0?i=-1:(l[e+76>>2],m=32&(i=0|l[e>>2]),(0|r[e+74>>0])<1&&(l[e>>2]=-33&i),0|l[(c=e+48|0)>>2]?i=0|V(e,t,n,a,o):(d=0|l[(h=e+44|0)>>2],l[h>>2]=s,l[(f=e+28|0)>>2]=s,l[(p=e+20|0)>>2]=s,l[c>>2]=80,l[(_=e+16|0)>>2]=s+80,i=0|V(e,t,n,a,o),d&&(at[7&l[e+36>>2]](e,0,0),i=0==(0|l[p>>2])?-1:i,l[h>>2]=d,l[c>>2]=0,l[_>>2]=0,l[f>>2]=0,l[p>>2]=0)),c=0|l[e>>2],l[e>>2]=c|m,i=0==(32&c|0)?i:-1),v=u,0|i}function ie(e,t,i,n){t|=0,i|=0,n|=0;var o,s,u,c,h,d,f,p=0,_=0;f=v,v=v+64|0,h=f,_=0|l[(e|=0)>>2],d=e+(0|l[_+-8>>2])|0,_=0|l[_+-4>>2],l[h>>2]=i,l[h+4>>2]=e,l[h+8>>2]=t,l[h+12>>2]=n,t=h+20|0,n=h+24|0,o=h+28|0,s=h+32|0,u=h+40|0,c=(p=e=h+16|0)+36|0;do{l[p>>2]=0,p=p+4|0}while((0|p)<(0|c));a[e+36>>1]=0,r[e+38>>0]=0;e:do{if(0|He(_,i))l[h+48>>2]=1,dt[3&l[20+(0|l[_>>2])>>2]](_,h,d,d,1,0),e=1==(0|l[n>>2])?d:0;else{switch(st[3&l[24+(0|l[_>>2])>>2]](_,h,d,1,0),0|l[h+36>>2]){case 0:e=1==(0|l[u>>2])&1==(0|l[o>>2])&1==(0|l[s>>2])?0|l[t>>2]:0;break e;case 1:break;default:e=0;break e}if(1!=(0|l[n>>2])&&!(0==(0|l[u>>2])&1==(0|l[o>>2])&1==(0|l[s>>2]))){e=0;break}e=0|l[e>>2]}}while(0);return v=f,0|e}function ne(e){var t,i=0,n=0,r=0,o=0,a=0,s=0,u=0;if(t=v,v=v+544|0,s=t+16|0,i=t,o=t+32|0,((n=0|l[(a=(e|=0)+8|0)>>2])+-1|0)>>>0>=8192&&(l[i>>2]=866,l[i+4>>2]=3006,l[i+8>>2]=1257,Oe(o,812,i),$e(o)),l[e>>2]=n,(i=0|l[(r=e+20|0)>>2])?u=n:((i=0|he(180,0))?(l[(u=i+164|0)>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0):i=0,l[r>>2]=i,u=0|l[e>>2]),0|l[a>>2]?s=u:(l[s>>2]=866,l[s+4>>2]=910,l[s+8>>2]=1497,Oe(o,812,s),$e(o),s=0|l[e>>2]),o=0|l[e+4>>2],!(s>>>0>16))return e=0|W(i,u,o,e=0),v=t,0|e;for(n=s,r=0;a=r+1|0,n>>>0>3;)n>>>=1,r=a;return e=0|W(i,u,o,e=255&((e=r+2+(32!=(0|a)&1<<a>>>0<s>>>0&1)|0)>>>0<11?e:11)),v=t,0|e}function re(e){var t,i,n,r,o,a,s=0,u=0;a=v,v=v+576|0,r=a+48|0,o=a+32|0,i=a+16|0,t=a,n=a+64|0,s=0|l[(e|=0)+168>>2];do{if(0|s){if(u=0|l[s+-4>>2],s=s+-8|0,0!=(0|u)&&(0|u)==(0|~l[s>>2])||(l[t>>2]=866,l[t+4>>2]=651,l[t+8>>2]=1579,Oe(n,812,t),$e(n)),7&s){l[i>>2]=866,l[i+4>>2]=2506,l[i+8>>2]=1232,Oe(n,812,i),$e(n);break}_e(s,0,0,1,0);break}}while(0);if(s=0|l[e+176>>2])return u=0|l[s+-4>>2],s=s+-8|0,0!=(0|u)&&(0|u)==(0|~l[s>>2])||(l[o>>2]=866,l[o+4>>2]=651,l[o+8>>2]=1579,Oe(n,812,o),$e(n)),7&s?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1232,Oe(n,812,r),$e(n),void(v=a)):(_e(s,0,0,1,0),void(v=a));v=a}function oe(e,t,i){var n=0;return!(0!=(0|(e|=0))&(t|=0)>>>0>73&0!=(0|(i|=0)))||40!=(0|l[i>>2])||18552!=((0|c[e>>0])<<8|0|c[e+1>>0]|0)||((0|c[e+2>>0])<<8|0|c[e+3>>0])>>>0<74||((0|c[e+7>>0])<<16|(0|c[e+6>>0])<<24|(0|c[e+8>>0])<<8|0|c[e+9>>0])>>>0>t>>>0?0|(i=0):(l[i+4>>2]=(0|c[e+12>>0])<<8|0|c[e+13>>0],l[i+8>>2]=(0|c[e+14>>0])<<8|0|c[e+15>>0],l[i+12>>2]=c[e+16>>0],l[i+16>>2]=c[e+17>>0],t=e+18|0,l[(n=i+32|0)>>2]=c[t>>0],l[n+4>>2]=0,t=0|r[t>>0],l[i+20>>2]=t<<24>>24==0|t<<24>>24==9?8:16,l[i+24>>2]=(0|c[e+26>>0])<<16|(0|c[e+25>>0])<<24|(0|c[e+27>>0])<<8|0|c[e+28>>0],l[i+28>>2]=(0|c[e+30>>0])<<16|(0|c[e+29>>0])<<24|(0|c[e+31>>0])<<8|0|c[e+32>>0],0|(i=1))}function ae(e,t){e|=0;var i,n,r,o=0,a=0,s=0,u=0,h=0;if(r=v,v=v+544|0,h=r+16|0,o=r,u=r+32|0,(t|=0)>>>0>=33&&(l[o>>2]=866,l[o+4>>2]=3199,l[o+8>>2]=1350,Oe(u,812,o),$e(u)),(0|(o=0|l[(n=e+20|0)>>2]))>=(0|t))return s=a=e+16|0,u=o,h=(a=0|l[a>>2])>>>(h=32-t|0),a<<=t,l[s>>2]=a,t=u-t|0,l[n>>2]=t,v=r,0|h;a=e+4|0,s=e+8|0,i=e+16|0;do{(0|(e=0|l[a>>2]))==(0|l[s>>2])?e=0:(l[a>>2]=e+1,e=0|c[e>>0]),o=o+8|0,l[n>>2]=o,(0|o)>=33&&(l[h>>2]=866,l[h+4>>2]=3208,l[h+8>>2]=1366,Oe(u,812,h),$e(u),o=0|l[n>>2]),e=e<<32-o|l[i>>2],l[i>>2]=e}while((0|o)<(0|t));return h=e>>>(h=32-t|0),u=e<<t,l[i>>2]=u,t=o-t|0,l[n>>2]=t,v=r,0|h}function se(e,t,i){e|=0;var n=0,o=0,a=0,s=0;a=255&(t|=0),n=0!=(0|(i|=0));e:do{if(n&0!=(3&e|0))for(o=255&t;;){if((0|r[e>>0])==o<<24>>24){s=6;break e}if(!((n=0!=(0|(i=i+-1|0)))&0!=(3&(e=e+1|0)|0))){s=5;break}}else s=5}while(0);5==(0|s)&&(n?s=6:i=0);e:do{if(6==(0|s)&&(o=255&t,(0|r[e>>0])!=o<<24>>24)){n=0|T(a,16843009);t:do{if(i>>>0>3){for(;!((-2139062144&(a=l[e>>2]^n)^-2139062144)&a+-16843009|0);)if(e=e+4|0,(i=i+-4|0)>>>0<=3){s=11;break t}}else s=11}while(0);if(11==(0|s)&&!i){i=0;break}for(;;){if((0|r[e>>0])==o<<24>>24)break e;if(e=e+1|0,!(i=i+-1|0)){i=0;break}}}}while(0);return 0|(0|i?e:0)}function le(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0;var o,a,s,u=0,h=0,d=0;return s=v,v=v+528|0,d=s,h=s+16|0,o=0|l[(e|=0)+88>>2],a=(0|c[o+70+(r<<2)+1>>0])<<16|(0|c[o+70+(r<<2)>>0])<<24|(0|c[o+70+(r<<2)+2>>0])<<8|0|c[o+70+(r<<2)+3>>0],(u=(u=r+1|0)>>>0<(0|c[o+16>>0])>>>0?(0|c[o+70+(u<<2)+1>>0])<<16|(0|c[o+70+(u<<2)>>0])<<24|(0|c[o+70+(u<<2)+2>>0])<<8|0|c[o+70+(u<<2)+3>>0]:0|l[e+8>>2])>>>0>a>>>0?(d=0|Q(e,h=(h=0|l[(h=e+4|0)>>2])+a|0,d=u-a|0,t,i,n,r),v=s,0|d):(l[d>>2]=866,l[d+4>>2]=3694,l[d+8>>2]=1508,Oe(h,812,d),$e(h),d=0|Q(e,h=(h=0|l[(h=e+4|0)>>2])+a|0,d=u-a|0,t,i,n,r),v=s,0|d)}function ue(e,t,i){e|=0,t|=0;var n=0,o=0,a=0,s=0,u=0;(o=0|l[(n=(i|=0)+16|0)>>2])?a=5:0|Te(i)?n=0:(o=0|l[n>>2],a=5);e:do{if(5==(0|a)){if(n=s=0|l[(u=i+20|0)>>2],(o-s|0)>>>0<t>>>0){n=0|at[7&l[i+36>>2]](i,e,t);break}t:do{if((0|r[i+75>>0])>-1){for(s=t;;){if(!s){a=0,o=e;break t}if(10==(0|r[e+(o=s+-1|0)>>0]))break;s=o}if((n=0|at[7&l[i+36>>2]](i,e,s))>>>0<s>>>0)break e;a=s,o=e+s|0,t=t-s|0,n=0|l[u>>2]}else a=0,o=e}while(0);J(0|n,0|o,0|t),l[u>>2]=(0|l[u>>2])+t,n=a+t|0}}while(0);return 0|n}function ce(e){var t,i,n=0,o=0,a=0;i=v,v=v+544|0,a=i+16|0,o=i,t=i+32|0,n=0|l[(e|=0)+20>>2];do{if(0|n){if(re(n),7&n){l[o>>2]=866,l[o+4>>2]=2506,l[o+8>>2]=1232,Oe(t,812,o),$e(t);break}_e(n,0,0,1,0);break}}while(0);if(!(o=0|l[(n=e+4|0)>>2]))return r[(a=e+16|0)>>0]=0,void(v=i);7&o?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1232,Oe(t,812,a),$e(t)):_e(o,0,0,1,0),l[n>>2]=0,l[e+8>>2]=0,l[e+12>>2]=0,r[(a=e+16|0)>>0]=0,v=i}function he(e,t){t|=0;var i,n,r,o,a=0,s=0,u=0;return o=v,v=v+560|0,u=o+32|0,r=o+16|0,a=o,n=o+48|0,i=o+44|0,(s=0|(s=(e|=0)+3&-4)?s:4)>>>0>2147418112?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1103,Oe(n,812,a),$e(n),v=o,0|(u=0)):(l[i>>2]=s,e=0|_e(0,s,i,1,0),a=0|l[i>>2],0|t&&(l[t>>2]=a),0==(0|e)|a>>>0<s>>>0?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1129,Oe(n,812,r),$e(n),e=0):7&e&&(l[u>>2]=866,l[u+4>>2]=2533,l[u+8>>2]=1156,Oe(n,812,u),$e(n)),v=o,0|(u=e))}function de(e,t,i){t|=0;var n,o=0,a=0,s=0;if(n=(e|=0)+(i|=0)|0,t&=255,(0|i)>=67){for(;3&e;)r[e>>0]=t,e=e+1|0;for(a=(o=-4&n|0)-64|0,s=t|t<<8|t<<16|t<<24;(0|e)<=(0|a);)l[e>>2]=s,l[e+4>>2]=s,l[e+8>>2]=s,l[e+12>>2]=s,l[e+16>>2]=s,l[e+20>>2]=s,l[e+24>>2]=s,l[e+28>>2]=s,l[e+32>>2]=s,l[e+36>>2]=s,l[e+40>>2]=s,l[e+44>>2]=s,l[e+48>>2]=s,l[e+52>>2]=s,l[e+56>>2]=s,l[e+60>>2]=s,e=e+64|0;for(;(0|e)<(0|o);)l[e>>2]=s,e=e+4|0}for(;(0|e)<(0|n);)r[e>>0]=t,e=e+1|0;return n-i|0}function fe(e,t,i,n,o){e|=0,i|=0,n|=0,o|=0;var a=0,s=0,u=0,c=0;r[(t|=0)+53>>0]=1;do{if((0|l[t+4>>2])==(0|n)){if(r[t+52>>0]=1,u=t+54|0,c=t+48|0,s=t+24|0,e=t+36|0,!(a=0|l[(n=t+16|0)>>2])){if(l[n>>2]=i,l[s>>2]=o,l[e>>2]=1,!(1==(0|l[c>>2])&1==(0|o)))break;r[u>>0]=1;break}if((0|a)!=(0|i)){l[e>>2]=1+(0|l[e>>2]),r[u>>0]=1;break}2==(0|(e=0|l[s>>2]))&&(l[s>>2]=o,e=o),1==(0|l[c>>2])&1==(0|e)&&(r[u>>0]=1)}}while(0)}function pe(e,t){e|=0;var i,n,o,a=0,s=0,u=0,h=0;o=v,v=v+16|0,n=255&(t|=0),r[(i=o)>>0]=n,(u=0|l[(s=e+16|0)>>2])?h=4:0|Te(e)?a=-1:(u=0|l[s>>2],h=4);do{if(4==(0|h)){if((s=0|l[(h=e+20|0)>>2])>>>0<u>>>0&&(0|(a=255&t))!=(0|r[e+75>>0])){l[h>>2]=s+1,r[s>>0]=n;break}a=1==(0|at[7&l[e+36>>2]](e,i,1))?0|c[i>>0]:-1}}while(0);return v=o,0|a}function _e(e,t,i,n,r){e|=0,t|=0,i|=0,n|=0,r|=0;do{if(e){if(!t){if(H(e),!i){t=0;break}l[i>>2]=0,t=0;break}n?e=0==(0|(t=0|ye(e,t)))?e:t:t=0,i&&(r=0|Re(e),l[i>>2]=r)}else t=0|z(t),i&&(e=t?0|Re(t):0,l[i>>2]=e)}while(0);return 0|t}function me(e,t){e=+e,t|=0;var i,n,r=0;switch(m[y>>3]=e,2047&(n=0|Ie(0|(r=0|l[y>>2]),0|(i=0|l[y+4>>2]),52))){case 0:0!=e?(e=+me(0x10000000000000000*e,t),r=(0|l[t>>2])-64|0):r=0,l[t>>2]=r;break;case 2047:break;default:l[t>>2]=(2047&n)-1022,l[y>>2]=r,l[y+4>>2]=-2146435073&i|1071644672,e=+m[y>>3]}return+e}function ge(e,t){e|=0,t|=0;var i=0,n=0;for(n=0;;){if((0|c[2140+n>>0])==(0|e)){e=2;break}if(87==(0|(i=n+1|0))){i=2228,n=87,e=5;break}n=i}if(2==(0|e)&&(n?(i=2228,e=5):i=2228),5==(0|e))for(;;){do{e=i,i=i+1|0}while(0!=(0|r[e>>0]));if(!(n=n+-1|0))break;e=5}return 0|function(e,t){return 0|function(e,t){return e|=0,t=(t|=0)?0|function(e,t,i){t|=0,i|=0;var n,o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0;n=1794895138+(0|l[(e|=0)>>2])|0,s=0|qe(0|l[e+8>>2],n),o=0|qe(0|l[e+12>>2],n),a=0|qe(0|l[e+16>>2],n);e:do{if(s>>>0<t>>>2>>>0&&(p=t-(s<<2)|0,o>>>0<p>>>0&a>>>0<p>>>0)&&0==(3&(a|o)|0)){for(p=o>>>2,f=a>>>2,d=0;;){if(o=0|qe(0|l[e+((a=(u=(h=d+(c=s>>>1)|0)<<1)+p|0)<<2)>>2],n),!((a=0|qe(0|l[e+(a+1<<2)>>2],n))>>>0<t>>>0&o>>>0<(t-a|0)>>>0)){o=0;break e}if(0|r[e+(a+o)>>0]){o=0;break e}if(!(o=0|Ce(i,e+a|0)))break;if(o=(0|o)<0,1==(0|s)){o=0;break e}d=o?d:h,s=o?c:s-c|0}a=0|qe(0|l[e+((o=u+f|0)<<2)>>2],n),o=(o=0|qe(0|l[e+(o+1<<2)>>2],n))>>>0<t>>>0&a>>>0<(t-o|0)>>>0&&0==(0|r[e+(o+a)>>0])?e+o|0:0}else o=0}while(0);return 0|o}(0|l[t>>2],0|l[t+4>>2],e):0,0|(0|t?t:e)}(e|=0,t|=0)}(i,0|l[t+20>>2])}function xe(e,t,i){i|=0;var n=0;if((t|=0)>>>0>0|0==(0|t)&(e|=0)>>>0>4294967295){for(;n=0|Me(0|e,0|t,10,0),r[(i=i+-1|0)>>0]=255&n|48,n=e,e=0|je(0|e,0|t,10,0),t>>>0>9|9==(0|t)&n>>>0>4294967295;)t=b;t=e}else t=e;if(t)for(;r[(i=i+-1|0)>>0]=48|(t>>>0)%10,!(t>>>0<10);)t=(t>>>0)/10|0;return 0|i}function ye(e,t){t|=0;var i=0,n=0;return(e|=0)?t>>>0>4294967231?(t=0|tt(),l[t>>2]=12,0|(t=0)):(i=0|function(e,t){t|=0;var i,n=0,r=0,o=0,a=0,s=0,u=0,c=0,h=0,d=0;if(i=(e|=0)+(n=-8&(h=0|l[(d=e+4|0)>>2]))|0,!(3&h))return t>>>0<256?0|(e=0):(n>>>0>=(t+4|0)>>>0&&(n-t|0)>>>0<=l[1264]<<1>>>0||(e=0),0|e);if(n>>>0>=t>>>0)return(n=n-t|0)>>>0<=15||(c=e+t|0,l[d>>2]=1&h|t|2,l[c+4>>2]=3|n,l[(d=c+n+4|0)>>2]=1|l[d>>2],q(c,n)),0|e;if((0|i)==(0|l[1150]))return n=(c=(0|l[1147])+n|0)-t|0,r=e+t|0,c>>>0<=t>>>0?0|(e=0):(l[d>>2]=1&h|t|2,l[r+4>>2]=1|n,l[1150]=r,l[1147]=n,0|e);if((0|i)==(0|l[1149]))return(o=(0|l[1146])+n|0)>>>0<t>>>0?0|(e=0):(r=1&h,(n=o-t|0)>>>0>15?(c=(h=e+t|0)+n|0,l[d>>2]=r|t|2,l[h+4>>2]=1|n,l[c>>2]=n,l[(r=c+4|0)>>2]=-2&l[r>>2],r=h):(l[d>>2]=r|o|2,l[(r=e+o+4|0)>>2]=1|l[r>>2],r=0,n=0),l[1146]=n,l[1149]=r,0|e);if(2&(r=0|l[i+4>>2])|0||(u=(-8&r)+n|0)>>>0<t>>>0)return 0;c=u-t|0,o=r>>>3;do{if(r>>>0<256){if(r=0|l[i+8>>2],(0|(n=0|l[i+12>>2]))==(0|r)){l[1144]=l[1144]&~(1<<o);break}l[r+12>>2]=n,l[n+8>>2]=r;break}s=0|l[i+24>>2],n=0|l[i+12>>2];do{if((0|n)==(0|i)){if(n=0|l[(r=4+(o=i+16|0)|0)>>2])a=r;else{if(!(n=0|l[o>>2])){o=0;break}a=o}for(;;)if(0|(r=0|l[(o=n+20|0)>>2]))n=r,a=o;else{if(!(o=0|l[(r=n+16|0)>>2]))break;n=o,a=r}l[a>>2]=0,o=n}else o=0|l[i+8>>2],l[o+12>>2]=n,l[n+8>>2]=o,o=n}while(0);if(0|s){if(n=0|l[i+28>>2],(0|i)==(0|l[(r=4880+(n<<2)|0)>>2])){if(l[r>>2]=o,!o){l[1145]=l[1145]&~(1<<n);break}}else if(l[s+16+(((0|l[s+16>>2])!=(0|i)&1)<<2)>>2]=o,!o)break;l[o+24>>2]=s,0|(r=0|l[(n=i+16|0)>>2])&&(l[o+16>>2]=r,l[r+24>>2]=o),0|(n=0|l[n+4>>2])&&(l[o+20>>2]=n,l[n+24>>2]=o)}}while(0);return n=1&h,c>>>0<16?(l[d>>2]=u|n|2,l[(d=e+u+4|0)>>2]=1|l[d>>2],0|e):(h=e+t|0,l[d>>2]=n|t|2,l[h+4>>2]=3|c,l[(d=h+c+4|0)>>2]=1|l[d>>2],q(h,c),0|e)}(e+-8|0,t>>>0<11?16:t+11&-8),0|i?0|(t=i+8|0):(i=0|z(t))?(J(0|i,0|e,0|((n=(-8&(n=0|l[e+-4>>2]))-(0==(3&n|0)?8:4)|0)>>>0<t>>>0?n:t)),H(e),0|(t=i)):0|(t=0)):0|(t=0|z(t))}function ve(e,t,i,n){e|=0,i|=0,n|=0;var o,a,s;o=0|l[(e=(t|=0)+16|0)>>2],a=t+36|0,s=t+24|0;do{if(o){if((0|o)!=(0|i)){l[a>>2]=1+(0|l[a>>2]),l[s>>2]=2,r[t+54>>0]=1;break}2==(0|l[s>>2])&&(l[s>>2]=n)}else l[e>>2]=i,l[s>>2]=n,l[a>>2]=1}while(0)}function $e(e){e|=0;var t,i=0,n=0;t=0|l[119],l[t+76>>2];do{if((0|Ue(e,t))<0)e=1;else{if(10!=(0|r[t+75>>0])&&(n=0|l[(i=t+20|0)>>2])>>>0<(0|l[t+16>>2])>>>0){l[i>>2]=n+1,r[n>>0]=10,e=0;break}e=(0|pe(t,10))<0}}while(0);return e<<31>>31|0}function be(e,t,i,n,r){e|=0,t|=0;var o,a;if(a=v,v=v+256|0,o=a,(0|(i|=0))>(0|(n|=0))&0==(73728&(r|=0)|0)){if(de(0|o,0|t,0|((r=i-n|0)>>>0<256?r:256)),r>>>0>255){t=i-n|0;do{Ve(e,o,256),r=r+-256|0}while(r>>>0>255);r=255&t}Ve(e,o,r)}v=a}function Te(e){var t=0,i=0;return i=0|r[(t=(e|=0)+74|0)>>0],r[t>>0]=i+255|i,8&(t=0|l[e>>2])?(l[e>>2]=32|t,e=-1):(l[e+8>>2]=0,l[e+4>>2]=0,i=0|l[e+44>>2],l[e+28>>2]=i,l[e+20>>2]=i,l[e+16>>2]=i+(0|l[e+48>>2]),e=0),0|e}function Ce(e,t){t|=0;var i=0,n=0;if(i=0|r[(e|=0)>>0],n=0|r[t>>0],i<<24>>24==0||i<<24>>24!=n<<24>>24)e=n;else{do{t=t+1|0,i=0|r[(e=e+1|0)>>0],n=0|r[t>>0]}while(i<<24>>24!=0&&i<<24>>24==n<<24>>24);e=n}return(255&i)-(255&e)|0}function Se(e){var t,i;return(0|(i=(e|=0)+15&-16|0))>0&(0|(e=(t=0|l[x>>2])+i|0))<(0|t)|(0|e)<0?(P(),O(12),-1):(l[x>>2]=e,(0|e)>(0|E())&&0==(0|w())?(l[x>>2]=t,O(12),-1):0|t)}function we(e){var t=0,i=0,n=0;if(i=0|l[(e|=0)>>2],(n=(0|r[i>>0])-48|0)>>>0<10){t=0;do{t=n+(10*t|0)|0,i=i+1|0,l[e>>2]=i,n=(0|r[i>>0])-48|0}while(n>>>0<10)}else t=0;return 0|t}function Ee(e,t,i,n){if(i|=0,n|=0,!(0==(0|(e|=0))&0==(0|(t|=0))))do{r[(i=i+-1|0)>>0]=0|c[2122+(15&e)>>0]|n,e=0|Ie(0|e,0|t,4),t=b}while(!(0==(0|e)&0==(0|t)));return 0|i}function Pe(e){var t=0;return(0|(t=0|r[$+(255&(e|=0))>>0]))<8?0|t:(0|(t=0|r[$+(e>>8&255)>>0]))<8?t+8|0:(0|(t=0|r[$+(e>>16&255)>>0]))<8?t+16|0:24+(0|r[$+(e>>>24)>>0])|0}function Ae(e,t,i,n){i|=0,n|=0;var r=0;(0|l[(t|=0)+4>>2])==(0|i)&&1!=(0|l[(r=t+28|0)>>2])&&(l[r>>2]=n)}function Le(e,t,i){if(i|=0,!(0==(0|(e|=0))&0==(0|(t|=0))))do{r[(i=i+-1|0)>>0]=7&e|48,e=0|Ie(0|e,0|t,3),t=b}while(!(0==(0|e)&0==(0|t)));return 0|i}function Me(e,t,i,n){var r,o;return o=v,v=v+16|0,j(e|=0,t|=0,i|=0,n|=0,r=0|o),v=o,b=0|l[r+4>>2],0|l[r>>2]}function Re(e){var t=0;return(e|=0)?0|(1==(0|(e=3&(t=0|l[e+-4>>2])))?0:(-8&t)-(0==(0|e)?8:4)|0):0}function Oe(e,t,i){e|=0,t|=0,i|=0;var n,o;return n=v,v=v+16|0,l[(o=n)>>2]=i,i=0|function(e,t,i){return 0|function(e,t,i,n){e|=0,t|=0,i|=0,n|=0;var o,a,s=0,u=0,c=0,h=0,d=0;a=v,v=v+128|0,s=a+124|0,c=604,o=(u=d=a)+124|0;do{l[u>>2]=l[c>>2],u=u+4|0,c=c+4|0}while((0|u)<(0|o));return(t+-1|0)>>>0>2147483646?t?(t=0|tt(),l[t>>2]=75,t=-1):(e=s,t=1,h=4):h=4,4==(0|h)&&(h=t>>>0>(h=-2-e|0)>>>0?h:t,l[d+48>>2]=h,l[(s=d+20|0)>>2]=e,l[d+44>>2]=e,t=e+h|0,l[(e=d+16|0)>>2]=t,l[d+28>>2]=t,t=0|te(d,i,n),h&&(d=0|l[s>>2],r[d+(((0|d)==(0|l[e>>2]))<<31>>31)>>0]=0)),v=a,0|t}(e|=0,2147483647,t|=0,i|=0)}(e,t,o),v=n,0|i}function De(e,t,i){return e|=0,t|=0,(0|(i|=0))<32?(b=t<<i|(e&(1<<i)-1<<32-i)>>>32-i,e<<i):(b=e<<i-32,0)}function Ie(e,t,i){return e|=0,t|=0,(0|(i|=0))<32?(b=t>>>i,e>>>i|(t&(1<<i)-1)<<32-i):(b=0,t>>>i-32|0)}function Fe(e,t){e|=0,t|=0;var i;i=v,v=v+16|0,l[i>>2]=t,te(t=0|l[26],e,i),function(e,t){var i,n=0,o=0,a=0,s=0;i=255&(e|=0),n=255&e,l[76+(t|=0)>>2],s=3;do{if(3==(0|s)){if((0|n)!=(0|r[t+75>>0])&&(a=0|l[(o=t+20|0)>>2])>>>0<(0|l[t+16>>2])>>>0){l[o>>2]=a+1,r[a>>0]=i;break}n=0|pe(t,e)}}while(0)}(10,t),D()}function Be(e,t,i,n){return b=n=(t|=0)-(n|=0)-((i|=0)>>>0>(e|=0)>>>0|0)>>>0,0|e-i>>>0}function Ne(e){e=+e;var t;return m[y>>3]=e,t=0|l[y>>2],b=0|l[y+4>>2],0|t}function Ge(e,t,i,n){return b=(t|=0)+(n|=0)+((i=(e|=0)+(i|=0)>>>0)>>>0<e>>>0|0)>>>0,0|i}function ze(e){var t=0;return(e|=0)>>>0>4294963200&&(t=0|tt(),l[t>>2]=0-e,e=-1),0|e}function Ue(e,t){t|=0;var i;return i=0|function(e){var t,i=0,n=0;t=e|=0;e:do{if(3&t)for(i=t;;){if(!(0|r[e>>0])){e=i;break e}if(!(3&(i=e=e+1|0))){n=4;break}}else n=4}while(0);if(4==(0|n)){for(;!((-2139062144&(i=0|l[e>>2])^-2139062144)&i+-16843009);)e=e+4|0;if((255&i)<<24>>24)do{e=e+1|0}while(0!=(0|r[e>>0]))}return e-t|0}(e|=0),((0|function(e,t,i,n){var r;return e|=0,n|=0,r=0|T(i|=0,t|=0),i=0==(0|t)?0:i,(0|(e=(l[n+76>>2],0|ue(e,r,n))))!=(0|r)&&(i=(e>>>0)/(t>>>0)|0),0|i}(e,1,i,t))!=(0|i))<<31>>31|0}function Ve(e,t,i){t|=0,i|=0,32&l[(e|=0)>>2]||ue(t,i,e)}function ke(e){e|=0;var t;return t=188+(0|it())|0,0|ge(e,0|l[t>>2])}function We(e,t){return t|=0,e=(e|=0)?0|function(e,t,i){e|=0,t|=0,i|=0;do{if(e){if(t>>>0<128){r[e>>0]=t,e=1;break}if(i=188+(0|it())|0,!(0|l[l[i>>2]>>2])){if(57216==(-128&t|0)){r[e>>0]=t,e=1;break}e=0|tt(),l[e>>2]=84,e=-1;break}if(t>>>0<2048){r[e>>0]=t>>>6|192,r[e+1>>0]=63&t|128,e=2;break}if(t>>>0<55296|57344==(-8192&t|0)){r[e>>0]=t>>>12|224,r[e+1>>0]=t>>>6&63|128,r[e+2>>0]=63&t|128,e=3;break}if((t+-65536|0)>>>0<1048576){r[e>>0]=t>>>18|240,r[e+1>>0]=t>>>12&63|128,r[e+2>>0]=t>>>6&63|128,r[e+3>>0]=63&t|128,e=4;break}e=0|tt(),l[e>>2]=84,e=-1;break}e=1}while(0);return 0|e}(e,t,0):0,0|e}function He(e,t,i){return(0|(e|=0))==(0|(t|=0))|0}function qe(e,t){t|=0;var i;return i=0|Xe(0|(e|=0)),0|(0==(0|t)?e:i)}function je(e,t,i,n){return 0|j(e|=0,t|=0,i|=0,n|=0,0)}function Xe(e){return(255&(e|=0))<<24|(e>>8&255)<<16|(e>>16&255)<<8|e>>>24|0}function Ye(e,t,i,n,r,o){S(6)}function Ze(e,t,i,n,r){S(1)}function Ke(e){(function(e){H(e|=0)})(e|=0)}function Qe(e,t,i,n){S(7)}function Je(e,t,i){return S(0),0}function et(e,t){return+ +me(e=+e,t|=0)}function tt(){return 64+(0|it())|0}function it(){return 232}function nt(e){}function rt(e){S(2)}function ot(){S(5)}t.__ZSt18uncaught_exceptionv;var at=[Je,ee,function(e,t,i){var n,r,o;return e|=0,t|=0,i|=0,r=v,v=v+32|0,n=r+20|0,l[(o=r)>>2]=l[e+60>>2],l[o+4>>2]=0,l[o+8>>2]=t,l[o+12>>2]=n,l[o+16>>2]=i,(0|ze(0|N(140,0|o)))<0?(l[n>>2]=-1,e=-1):e=0|l[n>>2],v=r,0|e},function(e,t,i){t|=0,i|=0;var n,o=0;return n=v,v=v+32|0,o=n,l[(e|=0)+36>>2]=1,0==(64&l[e>>2]|0)&&(l[o>>2]=l[e+60>>2],l[o+4>>2]=21523,l[o+8>>2]=n+16,0|L(54,0|o))&&(r[e+75>>0]=-1),o=0|ee(e,t,i),v=n,0|o},function(e,t,i){var n,r;return t|=0,i|=0,J(0|(r=0|l[(n=(e|=0)+20|0)>>2]),0|t,0|(e=(e=(0|l[e+16>>2])-r|0)>>>0>i>>>0?i:e)),l[n>>2]=(0|l[n>>2])+e,0|i},function(e,t,i){i|=0;var n,r,o=0,a=0;if(r=v,v=v+64|0,n=r,0|He(e|=0,t|=0))t=1;else if(0!=(0|t)&&0!=(0|(a=0|ie(t,32,16,0)))){o=(t=n+4|0)+52|0;do{l[t>>2]=0,t=t+4|0}while((0|t)<(0|o));l[n>>2]=a,l[n+8>>2]=e,l[n+12>>2]=-1,l[n+48>>2]=1,ft[3&l[28+(0|l[a>>2])>>2]](a,n,0|l[i>>2],1),1==(0|l[n+24>>2])?(l[i>>2]=l[n+16>>2],t=1):t=0}else t=0;return v=r,0|t},Je,Je],st=[Ze,function(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0;var a=0;do{if(0|He(e,0|l[t+8>>2]))Ae(0,t,i,n);else if(0|He(e,0|l[t>>2])){if(e=t+32|0,(0|l[t+16>>2])!=(0|i)&&(0|l[(a=t+20|0)>>2])!=(0|i)){l[e>>2]=n,l[a>>2]=i,l[(n=t+40|0)>>2]=1+(0|l[n>>2]),1==(0|l[t+36>>2])&&2==(0|l[t+24>>2])&&(r[t+54>>0]=1),l[t+44>>2]=4;break}1==(0|n)&&(l[e>>2]=1)}}while(0)},function(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0,o|=0;var a=0,s=0,u=0,c=0;do{if(0|He(e,0|l[t+8>>2]))Ae(0,t,i,n);else{if(a=e+8|0,!(0|He(e,0|l[t>>2]))){u=0|l[a>>2],st[3&l[24+(0|l[u>>2])>>2]](u,t,i,n,o);break}if(e=t+32|0,(0|l[t+16>>2])!=(0|i)&&(0|l[(s=t+20|0)>>2])!=(0|i)){if(l[e>>2]=n,4==(0|l[(n=t+44|0)>>2]))break;r[(e=t+52|0)>>0]=0,r[(c=t+53|0)>>0]=0,a=0|l[a>>2],dt[3&l[20+(0|l[a>>2])>>2]](a,t,i,i,1,o),0|r[c>>0]?0|r[e>>0]?e=3:(e=3,u=11):(e=4,u=11),11==(0|u)&&(l[s>>2]=i,l[(c=t+40|0)>>2]=1+(0|l[c>>2]),1==(0|l[t+36>>2])&&2==(0|l[t+24>>2])&&(r[t+54>>0]=1)),l[n>>2]=e;break}1==(0|n)&&(l[e>>2]=1)}}while(0)},Ze],lt=[rt,nt,Ke,nt,nt,Ke,function(e){var t;t=v,v=v+16|0,H(e|=0),0|M(0|l[1285],0)?Fe(4406,t):v=t},rt],ut=[function(e){return S(3),0},function(e){var t,i;return t=v,v=v+16|0,i=t,e=0|function(e){return 0|(e|=0)}(0|l[(e|=0)+60>>2]),l[i>>2]=e,e=0|ze(0|R(6,0|i)),v=t,0|e}],ct=[function(e,t,i){S(4)}],ht=[ot,function(){var e,t,i,n=0,r=0,o=0,a=0,s=0;a=v,v=v+48|0,i=a+32|0,e=a+24|0,s=a+16|0,t=a,a=a+36|0,n=0|function(){var e=0,t=0;if(e=v,v=v+16|0,!(0|I(5136,2)))return t=0|A(0|l[1285]),v=e,0|t;Fe(4307,e);return 0}(),0|n&&0|(o=0|l[n>>2])&&(1126902528==(-256&(r=0|l[(n=o+48|0)>>2])|0)&1129074247==(0|(n=0|l[n+4>>2]))||(l[e>>2]=4168,Fe(4118,e)),n=1126902529==(0|r)&1129074247==(0|n)?0|l[o+44>>2]:o+80|0,l[a>>2]=n,o=0|l[o>>2],n=0|l[o+4>>2],0|at[7&l[16+(0|l[2])>>2]](8,o,a)?(s=0|l[a>>2],s=0|ut[1&l[8+(0|l[s>>2])>>2]](s),l[t>>2]=4168,l[t+4>>2]=n,l[t+8>>2]=s,Fe(4032,t)):(l[s>>2]=4168,l[s+4>>2]=n,Fe(4077,s))),Fe(4156,i)},function(){var e;e=v,v=v+16|0,0|B(5140,6)?Fe(4356,e):v=e},ot],dt=[Ye,function(e,t,i,n,r,o){i|=0,n|=0,r|=0,0|He(e|=0,0|l[(t|=0)+8>>2])&&fe(0,t,i,n,r)},function(e,t,i,n,r,o){i|=0,n|=0,r|=0,o|=0,0|He(e|=0,0|l[(t|=0)+8>>2])?fe(0,t,i,n,r):(e=0|l[e+8>>2],dt[3&l[20+(0|l[e>>2])>>2]](e,t,i,n,r,o))},Ye],ft=[Qe,function(e,t,i,n){i|=0,n|=0,0|He(e|=0,0|l[(t|=0)+8>>2])&&ve(0,t,i,n)},function(e,t,i,n){i|=0,n|=0,0|He(e|=0,0|l[(t|=0)+8>>2])?ve(0,t,i,n):(e=0|l[e+8>>2],ft[3&l[28+(0|l[e>>2])>>2]](e,t,i,n))},Qe];return{stackSave:function(){return 0|v},_i64Subtract:Be,_crn_get_bytes_per_block:function(e,t){e|=0,t|=0;var i,n,r,o=0;switch(r=v,v=v+576|0,n=r+40|0,i=r+56|0,l[(o=r)>>2]=40,oe(e,t,o),e=0|l[(t=o+32|0)+4>>2],0|l[t>>2]){case 0:case 9:case 10:if(!e)return v=r,0|(o=8);e=14;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:e=e?14:13;break;default:e=14}return 13==(0|e)?(v=r,0|(o=16)):14==(0|e)?(l[n>>2]=866,l[n+4>>2]=2672,l[n+8>>2]=1251,Oe(i,812,n),$e(i),v=r,0|(o=0)):0},setThrew:function(e,t){},dynCall_viii:function(e,t,i,n){t|=0,i|=0,n|=0,ct[0&(e|=0)](0|t,0|i,0|n)},_bitshift64Lshr:Ie,_bitshift64Shl:De,dynCall_viiii:function(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0,ft[3&(e|=0)](0|t,0|i,0|n,0|r)},setTempRet0:function(e){b=e|=0},_crn_decompress:function(e,t,i,n,o,s){e|=0,t|=0,i|=0,n|=0,o|=0,s|=0;var u,h,d,f,p=0,_=0,m=0,g=0,x=0;switch(f=v,v=v+592|0,d=f+56|0,m=f+40|0,u=f+72|0,h=f+68|0,l[(x=f)>>2]=40,oe(e,t,x),p=(0|l[x+4>>2])>>>o,_=(0|l[x+8>>2])>>>o,n=0|l[(x=x+32|0)+4>>2],0|l[x>>2]){case 0:case 9:case 10:n?g=14:x=8;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:g=n?14:13;break;default:g=14}13==(0|g)?x=16:14==(0|g)&&(l[m>>2]=866,l[m+4>>2]=2672,l[m+8>>2]=1251,Oe(u,812,m),$e(u),x=0),l[h>>2]=i,g=0|function(e,t){var i=0,n=0,o=0,s=0,u=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0;if(m=v,v=v+528|0,p=m,h=m+16|0,0==(0|(e|=0))|(t|=0)>>>0<62||!(d=0|he(300,0)))return v=m,0|(g=0);l[d>>2]=519686845,l[d+4>>2]=0,l[d+8>>2]=0,f=d+88|0,i=d+136|0,n=d+160|0,o=d+184|0,s=d+208|0,u=d+232|0,l[(_=d+252|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,l[(_=d+268|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,l[(_=d+284|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,g=(_=f)+44|0;do{l[_>>2]=0,_=_+4|0}while((0|_)<(0|g));return r[f+44>>0]=0,l[i>>2]=0,l[i+4>>2]=0,l[i+8>>2]=0,l[i+12>>2]=0,l[i+16>>2]=0,r[i+20>>0]=0,l[n>>2]=0,l[n+4>>2]=0,l[n+8>>2]=0,l[n+12>>2]=0,l[n+16>>2]=0,r[n+20>>0]=0,l[o>>2]=0,l[o+4>>2]=0,l[o+8>>2]=0,l[o+12>>2]=0,l[o+16>>2]=0,r[o+20>>0]=0,l[s>>2]=0,l[s+4>>2]=0,l[s+8>>2]=0,l[s+12>>2]=0,l[s+16>>2]=0,r[s+20>>0]=0,l[u>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0,r[u+16>>0]=0,0|function(e,t,i){e|=0;var n=0,o=0;return!(0==(0|(t|=0))|(i|=0)>>>0<74)&&18552==((0|c[t>>0])<<8|0|c[t+1>>0]|0)&&((0|c[t+2>>0])<<8|0|c[t+3>>0])>>>0>=74&&((0|c[t+7>>0])<<16|(0|c[t+6>>0])<<24|(0|c[t+8>>0])<<8|0|c[t+9>>0])>>>0<=i>>>0?(l[(n=e+88|0)>>2]=t,l[e+4>>2]=t,l[e+8>>2]=i,0|function(e){var t=0,i=0,n=0,r=0;if(r=92+(e|=0)|0,i=0|l[(n=e+88|0)>>2],t=(0|l[e+4>>2])+((0|c[i+68>>0])<<8|(0|c[i+67>>0])<<16|0|c[i+69>>0])|0,!((i=(0|c[i+65>>0])<<8|0|c[i+66>>0])&&(l[r>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,0|k(r,e+116|0))))return 0|(r=0);t=0|l[n>>2];do{if((0|c[t+39>>0])<<8|0|c[t+40>>0]){if(!(0|k(r,e+140|0)))return 0|(r=0);if(0|k(r,e+188|0)){t=0|l[n>>2];break}return 0|(r=0)}if(!((0|c[t+55>>0])<<8|0|c[t+56>>0]))return 0|(r=0)}while(0);return!((0|c[t+55>>0])<<8|0|c[t+56>>0]|0)||0|k(r,e+164|0)&&0|k(r,e+212|0)?0|(r=1):0|(r=0)}(e)?(t=0|l[n>>2],(0|c[t+39>>0])<<8|0|c[t+40>>0]?0|function(e){var t=0,i=0,n=0,o=0,a=0,s=0,u=0,h=0,d=0,f=0,p=0,_=0,m=0;if(m=v,v=v+576|0,s=m,o=m+64|0,_=m+16|0,t=0|l[(n=88+(e|=0)|0)>>2],p=(0|c[t+39>>0])<<8|0|c[t+40>>0],d=e+236|0,(0|(i=0|l[(a=e+240|0)>>2]))!=(0|p)){if(i>>>0<=p>>>0){do{if((0|l[e+244>>2])>>>0<p>>>0){if(0|K(d,p,(i+1|0)==(0|p),4,0)){t=0|l[a>>2];break}return r[e+248>>0]=1,v=m,0|(_=0)}t=i}while(0);de((0|l[d>>2])+(t<<2)|0,0,p-t<<2|0),t=0|l[n>>2]}l[a>>2]=p}if(f=e+92|0,i=(0|l[e+4>>2])+((0|c[t+34>>0])<<8|(0|c[t+33>>0])<<16|0|c[t+35>>0])|0,!(t=(0|c[t+37>>0])<<8|(0|c[t+36>>0])<<16|0|c[t+38>>0]))return v=m,0|(_=0);if(l[f>>2]=i,l[e+96>>2]=i,l[e+104>>2]=t,l[e+100>>2]=i+t,l[e+108>>2]=0,l[e+112>>2]=0,u=_+20|0,l[_>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,l[_+12>>2]=0,r[_+16>>0]=0,h=_+24|0,l[_+44>>2]=0,l[u>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0,l[u+16>>2]=0,r[u+20>>0]=0,0|k(f,_)&&0|k(f,h))if(0|l[a>>2]||(l[s>>2]=866,l[s+4>>2]=910,l[s+8>>2]=1497,Oe(o,812,s),$e(o)),p)for(s=0,u=0,i=0|l[d>>2],n=0,e=0,t=0,o=0,a=0;;){if(s=(0|X(f,_))+s&31,a=(0|X(f,h))+a&63,o=(0|X(f,_))+o&31,t=(0|X(f,_))+t|0,e=(0|X(f,h))+e&63,n=(0|X(f,_))+n&31,l[i>>2]=a<<5|s<<11|o|t<<27|e<<21|n<<16,(u=u+1|0)>>>0>=p>>>0){t=1;break}i=i+4|0,t&=31}else t=1;else t=0;return ce(_+24|0),ce(_),v=m,0|(_=t)}(e)&&0|function(e){var t,i,n,o,a,s,u=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,y=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,D=0,I=0,F=0,B=0,N=0,G=0,z=0,U=0,V=0,W=0;if(s=v,v=v+1008|0,_=s,p=s+496|0,A=s+472|0,n=s+276|0,o=s+80|0,a=s+16|0,h=0|l[88+(e|=0)>>2],t=(0|c[h+47>>0])<<8|0|c[h+48>>0],i=e+92|0,u=(0|l[e+4>>2])+((0|c[h+42>>0])<<8|(0|c[h+41>>0])<<16|0|c[h+43>>0])|0,!(h=(0|c[h+45>>0])<<8|(0|c[h+44>>0])<<16|0|c[h+46>>0]))return v=s,0;if(l[i>>2]=u,l[e+96>>2]=u,l[e+104>>2]=h,l[e+100>>2]=u+h,l[e+108>>2]=0,l[e+112>>2]=0,l[A+20>>2]=0,l[A>>2]=0,l[A+4>>2]=0,l[A+8>>2]=0,l[A+12>>2]=0,r[A+16>>0]=0,0|k(i,A)){for(u=0,h=-3,d=-3;l[n+(u<<2)>>2]=d,l[o+(u<<2)>>2]=h,f=(0|d)>2,49!=(0|(u=u+1|0));)h=(1&f)+h|0,d=f?-3:d+1|0;h=(u=a)+64|0;do{l[u>>2]=0,u=u+4|0}while((0|u)<(0|h));d=e+252|0,u=0|l[(h=e+256|0)>>2];e:do{if((0|u)==(0|t))m=13;else{if(u>>>0<=t>>>0){do{if((0|l[e+260>>2])>>>0<t>>>0){if(0|K(d,t,(u+1|0)==(0|t),4,0)){u=0|l[h>>2];break}r[e+264>>0]=1,u=0;break e}}while(0);de((0|l[d>>2])+(u<<2)|0,0,t-u<<2|0)}l[h>>2]=t,m=13}}while(0);do{if(13==(0|m)){if(!t){l[_>>2]=866,l[_+4>>2]=910,l[_+8>>2]=1497,Oe(p,812,_),$e(p),u=1;break}for(e=a+4|0,p=a+8|0,_=a+12|0,m=a+16|0,g=a+20|0,x=a+24|0,y=a+28|0,$=a+32|0,b=a+36|0,T=a+40|0,C=a+44|0,S=a+48|0,w=a+52|0,E=a+56|0,P=a+60|0,f=0,u=0|l[d>>2],h=0|l[e>>2],d=0|l[a>>2];V=0|X(i,A),d=d+(0|l[n+(V<<2)>>2])&3,h=h+(0|l[o+(V<<2)>>2])&3,V=0|X(i,A),W=(0|l[p>>2])+(0|l[n+(V<<2)>>2])&3,l[p>>2]=W,V=(0|l[_>>2])+(0|l[o+(V<<2)>>2])&3,l[_>>2]=V,z=0|X(i,A),U=(0|l[m>>2])+(0|l[n+(z<<2)>>2])&3,l[m>>2]=U,z=(0|l[g>>2])+(0|l[o+(z<<2)>>2])&3,l[g>>2]=z,N=0|X(i,A),G=(0|l[x>>2])+(0|l[n+(N<<2)>>2])&3,l[x>>2]=G,N=(0|l[y>>2])+(0|l[o+(N<<2)>>2])&3,l[y>>2]=N,F=0|X(i,A),B=(0|l[$>>2])+(0|l[n+(F<<2)>>2])&3,l[$>>2]=B,F=(0|l[b>>2])+(0|l[o+(F<<2)>>2])&3,l[b>>2]=F,D=0|X(i,A),I=(0|l[T>>2])+(0|l[n+(D<<2)>>2])&3,l[T>>2]=I,D=(0|l[C>>2])+(0|l[o+(D<<2)>>2])&3,l[C>>2]=D,R=0|X(i,A),O=(0|l[S>>2])+(0|l[n+(R<<2)>>2])&3,l[S>>2]=O,R=(0|l[w>>2])+(0|l[o+(R<<2)>>2])&3,l[w>>2]=R,L=0|X(i,A),M=(0|l[E>>2])+(0|l[n+(L<<2)>>2])&3,l[E>>2]=M,L=(0|l[P>>2])+(0|l[o+(L<<2)>>2])&3,l[P>>2]=L,l[u>>2]=(0|c[1441+h>>0])<<2|0|c[1441+d>>0]|(0|c[1441+W>>0])<<4|(0|c[1441+V>>0])<<6|(0|c[1441+U>>0])<<8|(0|c[1441+z>>0])<<10|(0|c[1441+G>>0])<<12|(0|c[1441+N>>0])<<14|(0|c[1441+B>>0])<<16|(0|c[1441+F>>0])<<18|(0|c[1441+I>>0])<<20|(0|c[1441+D>>0])<<22|(0|c[1441+O>>0])<<24|(0|c[1441+R>>0])<<26|(0|c[1441+M>>0])<<28|(0|c[1441+L>>0])<<30,!((f=f+1|0)>>>0>=t>>>0);)u=u+4|0;l[a>>2]=d,l[e>>2]=h,u=1}}while(0)}else u=0;return ce(A),v=s,0|u}(e)&&(t=0|l[n>>2],o=11):o=11,11!=(0|o)||(0|c[t+55>>0])<<8|0|c[t+56>>0]&&!(0|function(e){var t=0,i=0,n=0,o=0,s=0,u=0,h=0,d=0,f=0;if(f=v,v=v+560|0,o=f,n=f+40|0,d=f+16|0,i=0|l[88+(e|=0)>>2],u=(0|c[i+55>>0])<<8|0|c[i+56>>0],h=e+92|0,t=(0|l[e+4>>2])+((0|c[i+50>>0])<<8|(0|c[i+49>>0])<<16|0|c[i+51>>0])|0,!(i=(0|c[i+53>>0])<<8|(0|c[i+52>>0])<<16|0|c[i+54>>0]))return v=f,0|(d=0);l[h>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,l[d+20>>2]=0,l[d>>2]=0,l[d+4>>2]=0,l[d+8>>2]=0,l[d+12>>2]=0,r[d+16>>0]=0;e:do{if(0|k(h,d)){if(s=e+268|0,(0|(t=0|l[(i=e+272|0)>>2]))!=(0|u)){if(t>>>0<=u>>>0){do{if((0|l[e+276>>2])>>>0<u>>>0){if(0|K(s,u,(t+1|0)==(0|u),2,0)){t=0|l[i>>2];break}r[e+280>>0]=1,t=0;break e}}while(0);de((0|l[s>>2])+(t<<1)|0,0,u-t<<1|0)}l[i>>2]=u}if(!u){l[o>>2]=866,l[o+4>>2]=910,l[o+8>>2]=1497,Oe(n,812,o),$e(n),t=1;break}for(i=0,e=0,n=0,t=0|l[s>>2];;){if(n=(s=0|X(h,d))+n&255,e=(0|X(h,d))+e&255,a[t>>1]=e<<8|n,(i=i+1|0)>>>0>=u>>>0){t=1;break}t=t+2|0}}else t=0}while(0);return ce(d),v=f,0|(d=t)}(e)&&0|function(e){var t,i,n,o,s,u,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,y=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,D=0,I=0,F=0,B=0,N=0,G=0,z=0,U=0,V=0,W=0,H=0,q=0,j=0;if(u=v,v=v+2416|0,m=u,_=u+1904|0,H=u+1880|0,n=u+980|0,o=u+80|0,s=u+16|0,d=0|l[88+(e|=0)>>2],t=(0|c[d+63>>0])<<8|0|c[d+64>>0],i=e+92|0,h=(0|l[e+4>>2])+((0|c[d+58>>0])<<8|(0|c[d+57>>0])<<16|0|c[d+59>>0])|0,!(d=(0|c[d+61>>0])<<8|(0|c[d+60>>0])<<16|0|c[d+62>>0]))return v=u,0;if(l[i>>2]=h,l[e+96>>2]=h,l[e+104>>2]=d,l[e+100>>2]=h+d,l[e+108>>2]=0,l[e+112>>2]=0,l[H+20>>2]=0,l[H>>2]=0,l[H+4>>2]=0,l[H+8>>2]=0,l[H+12>>2]=0,r[H+16>>0]=0,0|k(i,H)){for(h=0,d=-7,f=-7;l[n+(h<<2)>>2]=f,l[o+(h<<2)>>2]=d,p=(0|f)>6,225!=(0|(h=h+1|0));)d=(1&p)+d|0,f=p?-7:f+1|0;d=(h=s)+64|0;do{l[h>>2]=0,h=h+4|0}while((0|h)<(0|d));p=e+284|0,d=3*t|0,h=0|l[(f=e+288|0)>>2];e:do{if((0|h)==(0|d))g=13;else{if(h>>>0<=d>>>0){do{if((0|l[e+292>>2])>>>0<d>>>0){if(0|K(p,d,(h+1|0)==(0|d),2,0)){h=0|l[f>>2];break}r[e+296>>0]=1,h=0;break e}}while(0);de((0|l[p>>2])+(h<<1)|0,0,d-h<<1|0)}l[f>>2]=d,g=13}}while(0);do{if(13==(0|g)){if(!t){l[m>>2]=866,l[m+4>>2]=910,l[m+8>>2]=1497,Oe(_,812,m),$e(_),h=1;break}for(A=s+4|0,L=s+8|0,M=s+12|0,R=s+16|0,O=s+20|0,D=s+24|0,I=s+28|0,F=s+32|0,B=s+36|0,N=s+40|0,G=s+44|0,z=s+48|0,U=s+52|0,V=s+56|0,W=s+60|0,P=0,h=0|l[p>>2],d=0|l[s>>2],f=0|l[A>>2],p=0|l[L>>2],e=0|l[M>>2],_=0|l[R>>2],m=0|l[O>>2],g=0|l[D>>2],x=0|l[I>>2],y=0|l[F>>2],$=0|l[B>>2],b=0|l[N>>2],T=0|l[G>>2],C=0,S=0,w=0,E=0;j=0|X(i,H),d=d+(0|l[n+(j<<2)>>2])&7,f=f+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),p=p+(0|l[n+(j<<2)>>2])&7,e=e+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),_=_+(0|l[n+(j<<2)>>2])&7,m=m+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),g=g+(0|l[n+(j<<2)>>2])&7,x=x+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),y=y+(0|l[n+(j<<2)>>2])&7,$=$+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),b=b+(0|l[n+(j<<2)>>2])&7,T=T+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),C=C+(0|l[n+(j<<2)>>2])&7,S=S+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),w=w+(0|l[n+(j<<2)>>2])&7,E=E+(0|l[o+(j<<2)>>2])&7,j=0|c[1445+m>>0],a[h>>1]=(0|c[1445+f>>0])<<3|0|c[1445+d>>0]|(0|c[1445+p>>0])<<6|(0|c[1445+e>>0])<<9|(0|c[1445+_>>0])<<12|j<<15,q=0|c[1445+b>>0],a[h+2>>1]=(0|c[1445+g>>0])<<2|j>>>1|(0|c[1445+x>>0])<<5|(0|c[1445+y>>0])<<8|(0|c[1445+$>>0])<<11|q<<14,a[h+4>>1]=(0|c[1445+T>>0])<<1|q>>>2|(0|c[1445+C>>0])<<4|(0|c[1445+S>>0])<<7|(0|c[1445+w>>0])<<10|(0|c[1445+E>>0])<<13,!((P=P+1|0)>>>0>=t>>>0);)h=h+6|0;l[s>>2]=d,l[A>>2]=f,l[L>>2]=p,l[M>>2]=e,l[R>>2]=_,l[O>>2]=m,l[D>>2]=g,l[I>>2]=x,l[F>>2]=y,l[B>>2]=$,l[N>>2]=b,l[G>>2]=T,l[z>>2]=C,l[U>>2]=S,l[V>>2]=w,l[W>>2]=E,h=1}}while(0)}else h=0;return ce(H),v=u,0|h}(e))?0|(o=0):0|(o=1)):0|(o=0)):(l[e+88>>2]=0,0|(o=0))}(d,e,t)?(v=m,0|(g=d)):(Y(d),7&d?(l[p>>2]=866,l[p+4>>2]=2506,l[p+8>>2]=1232,Oe(h,812,p),$e(h),v=m,0|(g=0)):(_e(d,0,0,1,0),v=m,0|(g=0)))}(e,t),t=s+o|0;do{if(t>>>0>o>>>0){if(!g){for(n=i;n=n+(0|T(0|T((p+3|0)>>>2,x),(_+3|0)>>>2))|0,(0|(o=o+1|0))!=(0|t);)_>>>=1,p>>>=1;l[h>>2]=n;break}for(e=_,n=i;_=0|T((p+3|0)>>>2,x),!(o>>>0>15|(m=0|T(_,(e+3|0)>>>2))>>>0<8)&&519686845==(0|l[g>>2])&&(le(g,h,m,_,o),n=0|l[h>>2]),n=n+m|0,l[h>>2]=n,(0|(o=o+1|0))!=(0|t);)e>>>=1,p>>>=1}}while(0);if(g){if(519686845==(0|l[g>>2]))return Y(g),7&g?(l[d>>2]=866,l[d+4>>2]=2506,l[d+8>>2]=1232,Oe(u,812,d),$e(u),void(v=f)):(_e(g,0,0,1,0),void(v=f));v=f}else v=f},_memset:de,_sbrk:Se,_memcpy:J,stackAlloc:function(e){var t;return t=v,v=(v=v+(e|=0)|0)+15&-16,0|t},_crn_get_height:function(e,t){var i,n;return e|=0,t|=0,n=v,v=v+48|0,l[(i=n)>>2]=40,oe(e,t,i),v=n,0|l[i+8>>2]},dynCall_vi:function(e,t){t|=0,lt[7&(e|=0)](0|t)},getTempRet0:function(){return 0|b},_crn_get_levels:function(e,t){var i,n;return e|=0,t|=0,n=v,v=v+48|0,l[(i=n)>>2]=40,oe(e,t,i),v=n,0|l[i+12>>2]},_crn_get_uncompressed_size:function(e,t,i){e|=0,t|=0,i|=0;var n,r,o,a,s=0,u=0;switch(a=v,v=v+576|0,o=a+40|0,r=a+56|0,l[(u=a)>>2]=40,oe(e,t,u),n=(3+((0|l[u+4>>2])>>>i)|0)>>>2,t=(3+((0|l[u+8>>2])>>>i)|0)>>>2,e=0|l[(i=u+32|0)+4>>2],0|l[i>>2]){case 0:case 9:case 10:e?s=14:e=8;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:s=e?14:13;break;default:s=14}return 13==(0|s)?e=16:14==(0|s)&&(l[o>>2]=866,l[o+4>>2]=2672,l[o+8>>2]=1251,Oe(r,812,o),$e(r),e=0),u=0|T(0|T(t,n),e),v=a,0|u},_i64Add:Ge,dynCall_iiii:function(e,t,i,n){return t|=0,i|=0,n|=0,0|at[7&(e|=0)](0|t,0|i,0|n)},_emscripten_get_global_libc:function(){return 5072},dynCall_ii:function(e,t){return t|=0,0|ut[1&(e|=0)](0|t)},___udivdi3:je,_llvm_bswap_i32:Xe,dynCall_viiiii:function(e,t,i,n,r,o){t|=0,i|=0,n|=0,r|=0,o|=0,st[3&(e|=0)](0|t,0|i,0|n,0|r,0|o)},___cxa_can_catch:function(e,t,i){var n,r;return e|=0,t|=0,i|=0,r=v,v=v+16|0,l[(n=r)>>2]=l[i>>2],(e=0|at[7&l[16+(0|l[e>>2])>>2]](e,t,n))&&(l[i>>2]=l[n>>2]),v=r,1&e|0},_free:H,runPostSets:function(){},dynCall_viiiiii:function(e,t,i,n,r,o,a){t|=0,i|=0,n|=0,r|=0,o|=0,a|=0,dt[3&(e|=0)](0|t,0|i,0|n,0|r,0|o,0|a)},establishStackSpace:function(e,t){v=e|=0},___uremdi3:Me,___cxa_is_pointer_type:function(e){return 1&(e=(e|=0)?0!=(0|ie(e,32,88,0)):0)|0},stackRestore:function(e){v=e|=0},_malloc:z,_emscripten_replace_memory:function(e){return!(16777215&g(e)||g(e)<=16777215||g(e)>2147483648)&&(r=new n(e),a=new o(e),l=new s(e),c=new u(e),d=new h(e),new f(e),new p(e),m=new _(e),i=e,!0)},dynCall_v:function(e){ht[3&(e|=0)]()},_crn_get_width:function(e,t){var i,n;return e|=0,t|=0,n=v,v=v+48|0,l[(i=n)>>2]=40,oe(e,t,i),v=n,0|l[i+4>>2]},_crn_get_dxt_format:function(e,t){var i,n;return e|=0,t|=0,n=v,v=v+48|0,l[(i=n)>>2]=40,oe(e,t,i),v=n,0|l[i+32>>2]}}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer);Module.stackSave=asm.stackSave,Module.getTempRet0=asm.getTempRet0,Module._memset=asm._memset,Module.setThrew=asm.setThrew,Module._bitshift64Lshr=asm._bitshift64Lshr,Module._bitshift64Shl=asm._bitshift64Shl,Module.setTempRet0=asm.setTempRet0,Module._crn_decompress=asm._crn_decompress,Module._crn_get_bytes_per_block=asm._crn_get_bytes_per_block,Module._sbrk=asm._sbrk,Module._memcpy=asm._memcpy,Module.stackAlloc=asm.stackAlloc,Module._crn_get_height=asm._crn_get_height,Module._i64Subtract=asm._i64Subtract,Module._crn_get_levels=asm._crn_get_levels,Module._crn_get_uncompressed_size=asm._crn_get_uncompressed_size,Module._i64Add=asm._i64Add,Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,Module.___udivdi3=asm.___udivdi3,Module._llvm_bswap_i32=asm._llvm_bswap_i32,Module.___cxa_can_catch=asm.___cxa_can_catch;var _free=Module._free=asm._free;Module.runPostSets=asm.runPostSets,Module.establishStackSpace=asm.establishStackSpace,Module.___uremdi3=asm.___uremdi3,Module.___cxa_is_pointer_type=asm.___cxa_is_pointer_type,Module.stackRestore=asm.stackRestore;var _malloc=Module._malloc=asm._malloc,_emscripten_replace_memory=Module._emscripten_replace_memory=asm._emscripten_replace_memory,initialStackTop;function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function run(e){function t(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(e),postRun()))}e=e||Module.arguments,runDependencies>0||(preRun(),runDependencies>0)||Module.calledRun||(Module.setStatus?(Module.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module.setStatus("")}),1),t()}),1)):t())}function exit(e,t){t&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(e)),ENVIRONMENT_IS_NODE&&process.exit(e),Module.quit(e,new ExitStatus(e)))}Module._crn_get_width=asm._crn_get_width,Module._crn_get_dxt_format=asm._crn_get_dxt_format,Module.dynCall_iiii=asm.dynCall_iiii,Module.dynCall_viiiii=asm.dynCall_viiiii,Module.dynCall_vi=asm.dynCall_vi,Module.dynCall_ii=asm.dynCall_ii,Module.dynCall_viii=asm.dynCall_viii,Module.dynCall_v=asm.dynCall_v,Module.dynCall_viiiiii=asm.dynCall_viiiiii,Module.dynCall_viiii=asm.dynCall_viiii,Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm,ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus,dependenciesFulfilled=function e(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=e)},Module.callMain=Module.callMain=function(e){e=e||[],ensureInitRuntime();var t=e.length+1;function i(){for(var e=0;e<3;e++)n.push(0)}var n=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];i();for(var r=0;r<t-1;r+=1)n.push(allocate(intArrayFromString(e[r]),"i8",ALLOC_NORMAL)),i();n.push(0),n=allocate(n,"i32",ALLOC_NORMAL);try{exit(Module._main(t,n,0),!0)}catch(e){if(e instanceof ExitStatus)return;if("SimulateInfiniteLoop"==e)return void(Module.noExitRuntime=!0);var o=e;e&&"object"==typeof e&&e.stack&&(o=[e,e.stack]),Module.printErr("exception thrown: "+o),Module.quit(1,e)}},Module.run=Module.run=run,Module.exit=Module.exit=exit;var abortDecorators=[];function abort(e){Module.onAbort&&Module.onAbort(e),void 0!==e?(Module.print(e),Module.printErr(e),e=JSON.stringify(e)):e="",ABORT=!0;var t="abort("+e+") at "+stackTrace()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw abortDecorators&&abortDecorators.forEach((function(i){t=i(t,e)})),t}if(Module.abort=Module.abort=abort,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),Module.noExitRuntime=!0,run();var Module$1=Module,G;typeof ko<"u"&&(G=ko),function(e){var t=this||(0,eval)("this"),i=t.document,n=t.navigator,r=t.jQuery,o=t.JSON;r||typeof jQuery>"u"||(r=jQuery),function(a,s){function l(e,t){return(null===e||typeof e in _)&&e===t}function u(t,i){var n;return function(){n||(n=p.a.setTimeout((function(){n=e,t()}),i))}}function c(e,t){var i;return function(){clearTimeout(i),i=p.a.setTimeout(e,t)}}function h(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function d(e,t){null!==t&&t.s&&t.s()}function f(e,t){var i=this.qd,n=i[v];n.ra||(this.Qb&&this.mb[t]?(i.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):n.I[t]||i.uc(t,e,n.J?{da:e}:i.$c(e)),e.Ja&&e.gd())}var p=typeof a<"u"?a:{};p.b=function(e,t){for(var i=e.split("."),n=p,r=0;r<i.length-1;r++)n=n[i[r]];n[i[i.length-1]]=t},p.L=function(e,t,i){e[t]=i},p.version="3.5.1",p.b("version",p.version),p.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},p.a=function(){function a(e,t){for(var i in e)c.call(e,i)&&t(i,e[i])}function s(e,t){if(t)for(var i in t)c.call(t,i)&&(e[i]=t[i]);return e}function l(e,t){return e.__proto__=t,e}function u(e,t,i,n){var r=e[t].match(y)||[];p.a.D(i.match(y),(function(e){p.a.Na(r,e,n)})),e[t]=r.join(" ")}var c=Object.prototype.hasOwnProperty,h={__proto__:[]}instanceof Array,d="function"==typeof Symbol,f={},_={};f[n&&/Firefox\/2/i.test(n.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],f.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),a(f,(function(e,t){if(t.length)for(var i=0,n=t.length;i<n;i++)_[t[i]]=e}));var m,g={propertychange:!0},x=i&&function(){for(var t=3,n=i.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e",r[0];);return 4<t?t:e}(),y=/\S+/g;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(e,t,i){for(var n=0,r=e.length;n<r;n++)t.call(i,e[n],n,e)},A:"function"==typeof Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t)}:function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},Lb:function(t,i,n){for(var r=0,o=t.length;r<o;r++)if(i.call(n,t[r],r,t))return t[r];return e},Pa:function(e,t){var i=p.a.A(e,t);0<i?e.splice(i,1):0===i&&e.shift()},wc:function(e){var t=[];return e&&p.a.D(e,(function(e){0>p.a.A(t,e)&&t.push(e)})),t},Mb:function(e,t,i){var n=[];if(e)for(var r=0,o=e.length;r<o;r++)n.push(t.call(i,e[r],r));return n},jb:function(e,t,i){var n=[];if(e)for(var r=0,o=e.length;r<o;r++)t.call(i,e[r],r)&&n.push(e[r]);return n},Nb:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var i=0,n=t.length;i<n;i++)e.push(t[i]);return e},Na:function(e,t,i){var n=p.a.A(p.a.bc(e),t);0>n?i&&e.push(t):i||e.splice(n,1)},Ba:h,extend:s,setPrototypeOf:l,Ab:h?l:s,P:a,Ga:function(e,t,i){if(!e)return e;var n,r={};for(n in e)c.call(e,n)&&(r[n]=t.call(i,e[n],n,e));return r},Tb:function(e){for(;e.firstChild;)p.removeNode(e.firstChild)},Yb:function(e){for(var t=((e=p.a.la(e))[0]&&e[0].ownerDocument||i).createElement("div"),n=0,r=e.length;n<r;n++)t.appendChild(p.oa(e[n]));return t},Ca:function(e,t){for(var i=0,n=e.length,r=[];i<n;i++){var o=e[i].cloneNode(!0);r.push(t?p.oa(o):o)}return r},va:function(e,t){if(p.a.Tb(e),t)for(var i=0,n=t.length;i<n;i++)e.appendChild(t[i])},Xc:function(e,t){var i=e.nodeType?[e]:e;if(0<i.length){for(var n=i[0],r=n.parentNode,o=0,a=t.length;o<a;o++)r.insertBefore(t[o],n);for(o=0,a=i.length;o<a;o++)p.removeNode(i[o])}},Ua:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.splice(0,1);for(;1<e.length&&e[e.length-1].parentNode!==t;)e.length--;if(1<e.length){var i=e[0],n=e[e.length-1];for(e.length=0;i!==n;)e.push(i),i=i.nextSibling;e.push(n)}}return e},Zc:function(e,t){7>x?e.setAttribute("selected",t):e.selected=t},Db:function(t){return null===t||t===e?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},vd:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(1!==e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Sb:function(e){return p.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!p.a.Lb(e,p.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return p.onError?function(){try{return e.apply(this,arguments)}catch(e){throw p.onError&&p.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(p.a.Ac(e),t)},Gc:function(e){setTimeout((function(){throw p.onError&&p.onError(e),e}),0)},B:function(e,t,i){var n=p.a.Ac(i);if(i=g[t],p.options.useOnlyNativeEvents||i||!r)if(i||"function"!=typeof e.addEventListener){if(!(typeof e.attachEvent<"u"))throw Error("Browser doesn't support addEventListener or attachEvent");var o=function(t){n.call(e,t)},a="on"+t;e.attachEvent(a,o),p.a.K.za(e,(function(){e.detachEvent(a,o)}))}else e.addEventListener(t,n,!1);else m||(m="function"==typeof r(e).on?"on":"bind"),r(e)[m](t,n)},Fb:function(e,n){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var o;if(o=!("input"!==p.a.R(e)||!e.type||"click"!=n.toLowerCase()||"checkbox"!=(o=e.type)&&"radio"!=o),p.options.useOnlyNativeEvents||!r||o)if("function"==typeof i.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(o=i.createEvent(_[n]||"HTMLEvents")).initEvent(n,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(o)}else if(o&&e.click)e.click();else{if(!(typeof e.fireEvent<"u"))throw Error("Browser doesn't support triggering events");e.fireEvent("on"+n)}else r(e).trigger(n)},f:function(e){return p.O(e)?e():e},bc:function(e){return p.O(e)?e.v():e},Eb:function(e,t,i){var n;t&&("object"==typeof e.classList?(n=e.classList[i?"add":"remove"],p.a.D(t.match(y),(function(t){n.call(e.classList,t)}))):"string"==typeof e.className.baseVal?u(e.className,"baseVal",t,i):u(e,"className",t,i))},Bb:function(t,i){var n=p.a.f(i);(null===n||n===e)&&(n="");var r=p.h.firstChild(t);!r||3!=r.nodeType||p.h.nextSibling(r)?p.h.va(t,[t.ownerDocument.createTextNode(n)]):r.data=n,p.a.Ad(t)},Yc:function(e,t){if(e.name=t,7>=x)try{var n=e.name.replace(/[&<>'"]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}));e.mergeAttributes(i.createElement("<input name='"+n+"'/>"),!1)}catch{}},Ad:function(e){9<=x&&(e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom)},wd:function(e){if(x){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=p.a.f(e),t=p.a.f(t);for(var i=[],n=e;n<=t;n++)i.push(n);return i},la:function(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(e[i]);return t},Da:function(e){return d?Symbol(e):e},Zd:6===x,$d:7===x,W:x,Lc:function(e,t){for(var i=p.a.la(e.getElementsByTagName("input")).concat(p.a.la(e.getElementsByTagName("textarea"))),n="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},r=[],o=i.length-1;0<=o;o--)n(i[o])&&r.push(i[o]);return r},Nd:function(e){return"string"==typeof e&&(e=p.a.Db(e))?o&&o.parse?o.parse(e):new Function("return "+e)():null},hc:function(e,t,i){if(!o||!o.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js.");return o.stringify(p.a.f(e),t,i)},Od:function(e,t,n){var r=(n=n||{}).params||{},o=n.includeFields||this.Jc,s=e;if("object"==typeof e&&"form"===p.a.R(e)){s=e.action;for(var l=o.length-1;0<=l;l--)for(var u=p.a.Lc(e,o[l]),c=u.length-1;0<=c;c--)r[u[c].name]=u[c].value}t=p.a.f(t);var h=i.createElement("form");for(var d in h.style.display="none",h.action=s,h.method="post",t)(e=i.createElement("input")).type="hidden",e.name=d,e.value=p.a.hc(p.a.f(t[d])),h.appendChild(e);a(r,(function(e,t){var n=i.createElement("input");n.type="hidden",n.name=e,n.value=t,h.appendChild(n)})),i.body.appendChild(h),n.submitter?n.submitter(h):h.submit(),setTimeout((function(){h.parentNode.removeChild(h)}),0)}}}(),p.b("utils",p.a),p.b("utils.arrayForEach",p.a.D),p.b("utils.arrayFirst",p.a.Lb),p.b("utils.arrayFilter",p.a.jb),p.b("utils.arrayGetDistinctValues",p.a.wc),p.b("utils.arrayIndexOf",p.a.A),p.b("utils.arrayMap",p.a.Mb),p.b("utils.arrayPushAll",p.a.Nb),p.b("utils.arrayRemoveItem",p.a.Pa),p.b("utils.cloneNodes",p.a.Ca),p.b("utils.createSymbolOrString",p.a.Da),p.b("utils.extend",p.a.extend),p.b("utils.fieldsIncludedWithJsonPost",p.a.Jc),p.b("utils.getFormFields",p.a.Lc),p.b("utils.objectMap",p.a.Ga),p.b("utils.peekObservable",p.a.bc),p.b("utils.postJson",p.a.Od),p.b("utils.parseJson",p.a.Nd),p.b("utils.registerEventHandler",p.a.B),p.b("utils.stringifyJson",p.a.hc),p.b("utils.range",p.a.Pd),p.b("utils.toggleDomNodeCssClass",p.a.Eb),p.b("utils.triggerEvent",p.a.Fb),p.b("utils.unwrapObservable",p.a.f),p.b("utils.objectForEach",p.a.P),p.b("utils.addOrRemoveItem",p.a.Na),p.b("utils.setTextContent",p.a.Bb),p.b("unwrap",p.a.f),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(1===arguments.length)return function(){return t.apply(e,arguments)};var i=Array.prototype.slice.call(arguments,1);return function(){var n=i.slice(0);return n.push.apply(n,arguments),t.apply(e,n)}}),p.a.g=new function(){var t,i,n=0,r="__ko__"+(new Date).getTime(),o={};return p.a.W?(t=function(t,i){var a=t[r];if(!a||"null"===a||!o[a]){if(!i)return e;a=t[r]="ko"+n++,o[a]={}}return o[a]},i=function(e){var t=e[r];return!!t&&(delete o[t],e[r]=null,!0)}):(t=function(e,t){var i=e[r];return!i&&t&&(i=e[r]={}),i},i=function(e){return!!e[r]&&(delete e[r],!0)}),{get:function(e,i){var n=t(e,!1);return n&&n[i]},set:function(i,n,r){(i=t(i,r!==e))&&(i[n]=r)},Ub:function(e,i,n){return(e=t(e,!0))[i]||(e[i]=n)},clear:i,Z:function(){return n+++r}}},p.b("utils.domData",p.a.g),p.b("utils.domData.clear",p.a.g.clear),p.a.K=new function(){function t(t,i){var n=p.a.g.get(t,o);return n===e&&i&&(n=[],p.a.g.set(t,o,n)),n}function i(e){if(i=t(e,!1))for(var i=i.slice(0),r=0;r<i.length;r++)i[r](e);p.a.g.clear(e),p.a.K.cleanExternalData(e),s[e.nodeType]&&n(e.childNodes,!0)}function n(e,t){for(var n,r=[],o=0;o<e.length;o++)if((!t||8===e[o].nodeType)&&(i(r[r.length]=n=e[o]),e[o]!==n))for(;o--&&-1==p.a.A(r,e[o]););}var o=p.a.g.Z(),a={1:!0,8:!0,9:!0},s={1:!0,9:!0};return{za:function(e,i){if("function"!=typeof i)throw Error("Callback must be a function");t(e,!0).push(i)},yb:function(i,n){var r=t(i,!1);r&&(p.a.Pa(r,n),0==r.length&&p.a.g.set(i,o,e))},oa:function(e){return p.u.G((function(){a[e.nodeType]&&(i(e),s[e.nodeType]&&n(e.getElementsByTagName("*")))})),e},removeNode:function(e){p.oa(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){r&&"function"==typeof r.cleanData&&r.cleanData([e])}}},p.oa=p.a.K.oa,p.removeNode=p.a.K.removeNode,p.b("cleanNode",p.oa),p.b("removeNode",p.removeNode),p.b("utils.domNodeDisposal",p.a.K),p.b("utils.domNodeDisposal.addDisposeCallback",p.a.K.za),p.b("utils.domNodeDisposal.removeDisposeCallback",p.a.K.yb),function(){var n=[0,"",""],o=[1,"<table>","</table>"],a=[3,"<table><tbody><tr>","</tr></tbody></table>"],s=[1,"<select multiple='multiple'>","</select>"],l={thead:o,tbody:o,tfoot:o,tr:[2,"<table><tbody>","</tbody></table>"],td:a,th:a,option:s,optgroup:s},u=8>=p.a.W;p.a.ua=function(e,o){var a;if(r){if(r.parseHTML)a=r.parseHTML(e,o)||[];else if((a=r.clean([e],o))&&a[0]){for(var s=a[0];s.parentNode&&11!==s.parentNode.nodeType;)s=s.parentNode;s.parentNode&&s.parentNode.removeChild(s)}}else{(a=o)||(a=i),s=a.parentWindow||a.defaultView||t;var c,h=p.a.Db(e).toLowerCase(),d=a.createElement("div");for(c=(h=h.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&l[h[1]]||n,h=c[0],c="ignored<div>"+c[1]+e+c[2]+"</div>","function"==typeof s.innerShiv?d.appendChild(s.innerShiv(c)):(u&&a.body.appendChild(d),d.innerHTML=c,u&&d.parentNode.removeChild(d));h--;)d=d.lastChild;a=p.a.la(d.lastChild.childNodes)}return a},p.a.Md=function(e,t){var i=p.a.ua(e,t);return i.length&&i[0].parentElement||p.a.Yb(i)},p.a.fc=function(t,i){if(p.a.Tb(t),null!==(i=p.a.f(i))&&i!==e)if("string"!=typeof i&&(i=i.toString()),r)r(t).html(i);else for(var n=p.a.ua(i,t.ownerDocument),o=0;o<n.length;o++)t.appendChild(n[o])}}(),p.b("utils.parseHtmlFragment",p.a.ua),p.b("utils.setHtml",p.a.fc),p.aa=function(){function t(e,i){if(e)if(8==e.nodeType)null!=(n=p.aa.Uc(e.nodeValue))&&i.push({ud:e,Kd:n});else if(1==e.nodeType)for(var n=0,r=e.childNodes,o=r.length;n<o;n++)t(r[n],i)}var i={};return{Xb:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var t=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return i[t]=e,"\x3c!--[ko_memo:"+t+"]--\x3e"},bd:function(t,n){var r=i[t];if(r===e)throw Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized.");try{return r.apply(null,n||[]),!0}finally{delete i[t]}},cd:function(e,i){var n=[];t(e,n);for(var r=0,o=n.length;r<o;r++){var a=n[r].ud,s=[a];i&&p.a.Nb(s,i),p.aa.bd(n[r].Kd,s),a.nodeValue="",a.parentNode&&a.parentNode.removeChild(a)}},Uc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),p.b("memoization",p.aa),p.b("memoization.memoize",p.aa.Xb),p.b("memoization.unmemoize",p.aa.bd),p.b("memoization.parseMemoText",p.aa.Uc),p.b("memoization.unmemoizeDomNodeAndDescendants",p.aa.cd),p.na=function(){function e(){if(a)for(var e,t=a,i=0;l<a;)if(e=o[l++]){if(l>t){if(5e3<=++i){l=a,p.a.Gc(Error("'Too much recursion' after processing "+i+" task groups."));break}t=a}try{e()}catch(e){p.a.Gc(e)}}}function n(){e(),l=a=o.length=0}var r,o=[],a=0,s=1,l=0;return r=t.MutationObserver?function(e){var t=i.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(n):i&&"onreadystatechange"in i.createElement("script")?function(e){var t=i.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,i.documentElement.removeChild(t),t=null,e()},i.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},{scheduler:r,zb:function(e){return a||p.na.scheduler(n),o[a++]=e,s++},cancel:function(e){(e-=s-a)>=l&&e<a&&(o[e]=null)},resetForTesting:function(){var e=a-l;return l=a=o.length=0,e},Sd:e}}(),p.b("tasks",p.na),p.b("tasks.schedule",p.na.zb),p.b("tasks.runEarly",p.na.Sd),p.Ta={throttle:function(e,t){e.throttleEvaluation=t;var i=null;return p.$({read:e,write:function(n){clearTimeout(i),i=p.a.setTimeout((function(){e(n)}),t)}})},rateLimit:function(e,t){var i,n,r;"number"==typeof t?i=t:(i=t.timeout,n=t.method),e.Hb=!1,r="function"==typeof n?n:"notifyWhenChangesStop"==n?c:u,e.ub((function(e){return r(e,i,t)}))},deferred:function(t,i){if(!0!==i)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");t.Hb||(t.Hb=!0,t.ub((function(i){var n,r=!1;return function(){if(!r){p.na.cancel(n),n=p.na.zb(i);try{r=!0,t.notifySubscribers(e,"dirty")}finally{r=!1}}}})))},notify:function(e,t){e.equalityComparer="always"==t?null:l}};var _={undefined:1,boolean:1,number:1,string:1};p.b("extenders",p.Ta),p.ic=function(e,t,i){this.da=e,this.lc=t,this.mc=i,this.Ib=!1,this.fb=this.Jb=null,p.L(this,"dispose",this.s),p.L(this,"disposeWhenNodeIsRemoved",this.l)},p.ic.prototype.s=function(){this.Ib||(this.fb&&p.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},p.ic.prototype.l=function(e){this.Jb=e,p.a.K.za(e,this.fb=this.s.bind(this))},p.T=function(){p.a.Ab(this,m),m.qb(this)};var m={qb:function(e){e.U={change:[]},e.sc=1},subscribe:function(e,t,i){var n=this;i=i||"change";var r=new p.ic(n,t?e.bind(t):e,(function(){p.a.Pa(n.U[i],r),n.hb&&n.hb(i)}));return n.Qa&&n.Qa(i),n.U[i]||(n.U[i]=[]),n.U[i].push(r),r},notifySubscribers:function(e,t){if("change"===(t=t||"change")&&this.Gb(),this.Wa(t)){var i="change"===t&&this.ed||this.U[t].slice(0);try{p.u.xc();for(var n,r=0;n=i[r];++r)n.Ib||n.lc(e)}finally{p.u.end()}}},ob:function(){return this.sc},Dd:function(e){return this.ob()!==e},Gb:function(){++this.sc},ub:function(e){var t,i,n,r,o,a=this,s=p.O(a);a.gb||(a.gb=a.notifySubscribers,a.notifySubscribers=h);var l=e((function(){a.Ja=!1,s&&r===a&&(r=a.nc?a.nc():a());var e=i||o&&a.sb(n,r);o=i=t=!1,e&&a.gb(n=r)}));a.qc=function(e,i){i&&a.Ja||(o=!i),a.ed=a.U.change.slice(0),a.Ja=t=!0,r=e,l()},a.pc=function(e){t||(n=e,a.gb(e,"beforeChange"))},a.rc=function(){o=!0},a.gd=function(){a.sb(n,a.v(!0))&&(i=!0)}},Wa:function(e){return this.U[e]&&this.U[e].length},Bd:function(e){if(e)return this.U[e]&&this.U[e].length||0;var t=0;return p.a.P(this.U,(function(e,i){"dirty"!==e&&(t+=i.length)})),t},sb:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},toString:function(){return"[object Object]"},extend:function(e){var t=this;return e&&p.a.P(e,(function(e,i){var n=p.Ta[e];"function"==typeof n&&(t=n(t,i)||t)})),t}};p.L(m,"init",m.qb),p.L(m,"subscribe",m.subscribe),p.L(m,"extend",m.extend),p.L(m,"getSubscriptionsCount",m.Bd),p.a.Ba&&p.a.setPrototypeOf(m,Function.prototype),p.T.fn=m,p.Qc=function(e){return null!=e&&"function"==typeof e.subscribe&&"function"==typeof e.notifySubscribers},p.b("subscribable",p.T),p.b("isSubscribable",p.Qc),p.S=p.u=function(){function e(e){n.push(i),i=e}function t(){i=n.pop()}var i,n=[],r=0;return{xc:e,end:t,cc:function(e){if(i){if(!p.Qc(e))throw Error("Only subscribable things can act as dependencies");i.od.call(i.pd,e,e.fd||(e.fd=++r))}},G:function(i,n,r){try{return e(),i.apply(n,r||[])}finally{t()}},qa:function(){if(i)return i.o.qa()},Va:function(){if(i)return i.o.Va()},Ya:function(){if(i)return i.Ya},o:function(){if(i)return i.o}}}(),p.b("computedContext",p.S),p.b("computedContext.getDependenciesCount",p.S.qa),p.b("computedContext.getDependencies",p.S.Va),p.b("computedContext.isInitial",p.S.Ya),p.b("computedContext.registerDependency",p.S.cc),p.b("ignoreDependencies",p.Yd=p.u.G);var g=p.a.Da("_latestValue");p.ta=function(e){function t(){return 0<arguments.length?(t.sb(t[g],arguments[0])&&(t.ya(),t[g]=arguments[0],t.xa()),this):(p.u.cc(t),t[g])}return t[g]=e,p.a.Ba||p.a.extend(t,p.T.fn),p.T.fn.qb(t),p.a.Ab(t,x),p.options.deferUpdates&&p.Ta.deferred(t,!0),t};var x={equalityComparer:l,v:function(){return this[g]},xa:function(){this.notifySubscribers(this[g],"spectate"),this.notifySubscribers(this[g])},ya:function(){this.notifySubscribers(this[g],"beforeChange")}};p.a.Ba&&p.a.setPrototypeOf(x,p.T.fn);var y=p.ta.Ma="__ko_proto__";x[y]=p.ta,p.O=function(e){if((e="function"==typeof e&&e[y])&&e!==x[y]&&e!==p.o.fn[y])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e},p.Za=function(e){return"function"==typeof e&&(e[y]===x[y]||e[y]===p.o.fn[y]&&e.Nc)},p.b("observable",p.ta),p.b("isObservable",p.O),p.b("isWriteableObservable",p.Za),p.b("isWritableObservable",p.Za),p.b("observable.fn",x),p.L(x,"peek",x.v),p.L(x,"valueHasMutated",x.xa),p.L(x,"valueWillMutate",x.ya),p.Ha=function(e){if("object"!=typeof(e=e||[])||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=p.ta(e),p.a.Ab(e,p.Ha.fn),e.extend({trackArrayChanges:!0})},p.Ha.fn={remove:function(e){for(var t=this.v(),i=[],n="function"!=typeof e||p.O(e)?function(t){return t===e}:e,r=0;r<t.length;r++){var o=t[r];if(n(o)){if(0===i.length&&this.ya(),t[r]!==o)throw Error("Array modified during remove; cannot remove item");i.push(o),t.splice(r,1),r--}}return i.length&&this.xa(),i},removeAll:function(t){if(t===e){var i=this.v(),n=i.slice(0);return this.ya(),i.splice(0,i.length),this.xa(),n}return t?this.remove((function(e){return 0<=p.a.A(t,e)})):[]},destroy:function(e){var t=this.v(),i="function"!=typeof e||p.O(e)?function(t){return t===e}:e;this.ya();for(var n=t.length-1;0<=n;n--){var r=t[n];i(r)&&(r._destroy=!0)}this.xa()},destroyAll:function(t){return t===e?this.destroy((function(){return!0})):t?this.destroy((function(e){return 0<=p.a.A(t,e)})):[]},indexOf:function(e){var t=this();return p.a.A(t,e)},replace:function(e,t){var i=this.indexOf(e);0<=i&&(this.ya(),this.v()[i]=t,this.xa())},sorted:function(e){var t=this().slice(0);return e?t.sort(e):t.sort()},reversed:function(){return this().slice(0).reverse()}},p.a.Ba&&p.a.setPrototypeOf(p.Ha.fn,p.ta.fn),p.a.D("pop push reverse shift sort splice unshift".split(" "),(function(e){p.Ha.fn[e]=function(){var t=this.v();this.ya(),this.zc(t,e,arguments);var i=t[e].apply(t,arguments);return this.xa(),i===t?this:i}})),p.a.D(["slice"],(function(e){p.Ha.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}})),p.Pc=function(e){return p.O(e)&&"function"==typeof e.remove&&"function"==typeof e.push},p.b("observableArray",p.Ha),p.b("isObservableArray",p.Pc),p.Ta.trackArrayChanges=function(t,i){function n(){function e(){if(u){var e,i=[].concat(t.v()||[]);t.Wa("arrayChange")&&((!l||1<u)&&(l=p.a.Pb(a,i,t.Ob)),e=l),a=i,l=null,u=0,e&&e.length&&t.notifySubscribers(e,"arrayChange")}}s?e():(s=!0,o=t.subscribe((function(){++u}),null,"spectate"),a=[].concat(t.v()||[]),l=null,r=t.subscribe(e))}if(t.Ob={},i&&"object"==typeof i&&p.a.extend(t.Ob,i),t.Ob.sparse=!0,!t.zc){var r,o,a,s=!1,l=null,u=0,c=t.Qa,h=t.hb;t.Qa=function(e){c&&c.call(t,e),"arrayChange"===e&&n()},t.hb=function(i){h&&h.call(t,i),"arrayChange"!==i||t.Wa("arrayChange")||(r&&r.s(),o&&o.s(),o=r=null,s=!1,a=e)},t.zc=function(e,t,i){function n(e,t,i){return r[r.length]={status:e,value:t,index:i}}if(s&&!u){var r=[],o=e.length,a=i.length,c=0;switch(t){case"push":c=o;case"unshift":for(t=0;t<a;t++)n("added",i[t],c+t);break;case"pop":c=o-1;case"shift":o&&n("deleted",e[c],c);break;case"splice":t=Math.min(Math.max(0,0>i[0]?o+i[0]:i[0]),o),o=1===a?o:Math.min(t+(i[1]||0),o),a=t+a-2,c=Math.max(o,a);for(var h=[],d=[],f=2;t<c;++t,++f)t<o&&d.push(n("deleted",e[t],t)),t<a&&h.push(n("added",i[f],t));p.a.Kc(d,h);break;default:return}l=r}}}};var v=p.a.Da("_state");p.o=p.$=function(t,i,n){function r(){if(0<arguments.length){if("function"!=typeof o)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return o.apply(a.nb,arguments),this}return a.ra||p.u.cc(r),(a.ka||a.J&&r.Xa())&&r.ha(),a.X}if("object"==typeof t?n=t:(n=n||{},t&&(n.read=t)),"function"!=typeof n.read)throw Error("Pass a function that returns the value of the ko.computed");var o=n.write,a={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:n.read,nb:i||n.owner,l:n.disposeWhenNodeIsRemoved||n.l||null,Sa:n.disposeWhen||n.Sa,Rb:null,I:{},V:0,Ic:null};return r[v]=a,r.Nc="function"==typeof o,p.a.Ba||p.a.extend(r,p.T.fn),p.T.fn.qb(r),p.a.Ab(r,$),n.pure?(a.wb=!0,a.J=!0,p.a.extend(r,b)):n.deferEvaluation&&p.a.extend(r,T),p.options.deferUpdates&&p.Ta.deferred(r,!0),a.l&&(a.jc=!0,a.l.nodeType||(a.l=null)),a.J||n.deferEvaluation||r.ha(),a.l&&r.ja()&&p.a.K.za(a.l,a.Rb=function(){r.s()}),r};var $={equalityComparer:l,qa:function(){return this[v].V},Va:function(){var e=[];return p.a.P(this[v].I,(function(t,i){e[i.Ka]=i.da})),e},Vb:function(e){if(!this[v].V)return!1;var t=this.Va();return-1!==p.a.A(t,e)||!!p.a.Lb(t,(function(t){return t.Vb&&t.Vb(e)}))},uc:function(e,t,i){if(this[v].wb&&t===this)throw Error("A 'pure' computed must not be called recursively");this[v].I[e]=i,i.Ka=this[v].V++,i.La=t.ob()},Xa:function(){var e,t,i=this[v].I;for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)&&(t=i[e],this.Ia&&t.da.Ja||t.da.Dd(t.La)))return!0},Jd:function(){this.Ia&&!this[v].rb&&this.Ia(!1)},ja:function(){var e=this[v];return e.ka||0<e.V},Rd:function(){this.Ja?this[v].ka&&(this[v].sa=!0):this.Hc()},$c:function(e){if(e.Hb){var t=e.subscribe(this.Jd,this,"dirty"),i=e.subscribe(this.Rd,this);return{da:e,s:function(){t.s(),i.s()}}}return e.subscribe(this.Hc,this)},Hc:function(){var e=this,t=e.throttleEvaluation;t&&0<=t?(clearTimeout(this[v].Ic),this[v].Ic=p.a.setTimeout((function(){e.ha(!0)}),t)):e.Ia?e.Ia(!0):e.ha(!0)},ha:function(e){var t=this[v],i=t.Sa,n=!1;if(!t.rb&&!t.ra){if(t.l&&!p.a.Sb(t.l)||i&&i()){if(!t.jc)return void this.s()}else t.jc=!1;t.rb=!0;try{n=this.zd(e)}finally{t.rb=!1}return n}},zd:function(t){var i=this[v],n=!1,r=i.wb?e:!i.V;n={qd:this,mb:i.I,Qb:i.V},p.u.xc({pd:n,od:f,o:this,Ya:r}),i.I={},i.V=0;var o=this.yd(i,n);return i.V?n=this.sb(i.X,o):(this.s(),n=!0),n&&(i.J?this.Gb():this.notifySubscribers(i.X,"beforeChange"),i.X=o,this.notifySubscribers(i.X,"spectate"),!i.J&&t&&this.notifySubscribers(i.X),this.rc&&this.rc()),r&&this.notifySubscribers(i.X,"awake"),n},yd:function(e,t){try{var i=e.Wc;return e.nb?i.call(e.nb):i()}finally{p.u.end(),t.Qb&&!e.J&&p.a.P(t.mb,d),e.sa=e.ka=!1}},v:function(e){var t=this[v];return(t.ka&&(e||!t.V)||t.J&&this.Xa())&&this.ha(),t.X},ub:function(e){p.T.fn.ub.call(this,e),this.nc=function(){return this[v].J||(this[v].sa?this.ha():this[v].ka=!1),this[v].X},this.Ia=function(e){this.pc(this[v].X),this[v].ka=!0,e&&(this[v].sa=!0),this.qc(this,!e)}},s:function(){var t=this[v];!t.J&&t.I&&p.a.P(t.I,(function(e,t){t.s&&t.s()})),t.l&&t.Rb&&p.a.K.yb(t.l,t.Rb),t.I=e,t.V=0,t.ra=!0,t.sa=!1,t.ka=!1,t.J=!1,t.l=e,t.Sa=e,t.Wc=e,this.Nc||(t.nb=e)}},b={Qa:function(e){var t=this,i=t[v];if(!i.ra&&i.J&&"change"==e){if(i.J=!1,i.sa||t.Xa())i.I=null,i.V=0,t.ha()&&t.Gb();else{var n=[];p.a.P(i.I,(function(e,t){n[t.Ka]=e})),p.a.D(n,(function(e,n){var r=i.I[e],o=t.$c(r.da);o.Ka=n,o.La=r.La,i.I[e]=o})),t.Xa()&&t.ha()&&t.Gb()}i.ra||t.notifySubscribers(i.X,"awake")}},hb:function(t){var i=this[v];i.ra||"change"!=t||this.Wa("change")||(p.a.P(i.I,(function(e,t){t.s&&(i.I[e]={da:t.da,Ka:t.Ka,La:t.La},t.s())})),i.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var e=this[v];return e.J&&(e.sa||this.Xa())&&this.ha(),p.T.fn.ob.call(this)}},T={Qa:function(e){"change"!=e&&"beforeChange"!=e||this.v()}};p.a.Ba&&p.a.setPrototypeOf($,p.T.fn);var C=p.ta.Ma;$[C]=p.o,p.Oc=function(e){return"function"==typeof e&&e[C]===$[C]},p.Fd=function(e){return p.Oc(e)&&e[v]&&e[v].wb},p.b("computed",p.o),p.b("dependentObservable",p.o),p.b("isComputed",p.Oc),p.b("isPureComputed",p.Fd),p.b("computed.fn",$),p.L($,"peek",$.v),p.L($,"dispose",$.s),p.L($,"isActive",$.ja),p.L($,"getDependenciesCount",$.qa),p.L($,"getDependencies",$.Va),p.xb=function(e,t){return"function"==typeof e?p.o(e,t,{pure:!0}):((e=p.a.extend({},e)).pure=!0,p.o(e,t))},p.b("pureComputed",p.xb),function(){function t(r,o,a){if(a=a||new n,"object"!=typeof(r=o(r))||null===r||r===e||r instanceof RegExp||r instanceof Date||r instanceof String||r instanceof Number||r instanceof Boolean)return r;var s=r instanceof Array?[]:{};return a.save(r,s),i(r,(function(i){var n=o(r[i]);switch(typeof n){case"boolean":case"number":case"string":case"function":s[i]=n;break;case"object":case"undefined":var l=a.get(n);s[i]=l!==e?l:t(n,o,a)}})),s}function i(e,t){if(e instanceof Array){for(var i=0;i<e.length;i++)t(i);"function"==typeof e.toJSON&&t("toJSON")}else for(i in e)t(i)}function n(){this.keys=[],this.values=[]}p.ad=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return t(e,(function(e){for(var t=0;p.O(e)&&10>t;t++)e=e();return e}))},p.toJSON=function(e,t,i){return e=p.ad(e),p.a.hc(e,t,i)},n.prototype={constructor:n,save:function(e,t){var i=p.a.A(this.keys,e);0<=i?this.values[i]=t:(this.keys.push(e),this.values.push(t))},get:function(t){return 0<=(t=p.a.A(this.keys,t))?this.values[t]:e}}}(),p.b("toJS",p.ad),p.b("toJSON",p.toJSON),p.Wd=function(e,t,i){function n(t){var n=p.xb(e,i).extend({ma:"always"}),r=n.subscribe((function(e){e&&(r.s(),t(e))}));return n.notifySubscribers(n.v()),r}return"function"!=typeof Promise||t?n(t.bind(i)):new Promise(n)},p.b("when",p.Wd),p.w={M:function(t){switch(p.a.R(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?p.a.g.get(t,p.c.options.$b):7>=p.a.W?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?p.w.M(t.options[t.selectedIndex]):e;default:return t.value}},cb:function(t,i,n){switch(p.a.R(t)){case"option":"string"==typeof i?(p.a.g.set(t,p.c.options.$b,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i):(p.a.g.set(t,p.c.options.$b,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:"");break;case"select":(""===i||null===i)&&(i=e);for(var r,o=-1,a=0,s=t.options.length;a<s;++a)if((r=p.w.M(t.options[a]))==i||""===r&&i===e){o=a;break}(n||0<=o||i===e&&1<t.size)&&(t.selectedIndex=o,6===p.a.W&&p.a.setTimeout((function(){t.selectedIndex=o}),0));break;default:(null===i||i===e)&&(i=""),t.value=i}}},p.b("selectExtensions",p.w),p.b("selectExtensions.readValue",p.w.M),p.b("selectExtensions.writeValue",p.w.cb),p.m=function(){function e(e){123===(e=p.a.Db(e)).charCodeAt(0)&&(e=e.slice(1,-1));var t,i=[],a=(e+="\n,").match(n),s=[],l=0;if(1<a.length){for(var u,c=0;u=a[c];++c){var h=u.charCodeAt(0);if(44===h){if(0>=l){i.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=l=0,s=[];continue}}else if(58===h){if(!l&&!t&&1===s.length){t=s.pop();continue}}else{if(47===h&&1<u.length&&(47===u.charCodeAt(1)||42===u.charCodeAt(1)))continue;47===h&&c&&1<u.length?(h=a[c-1].match(r))&&!o[h[0]]&&(a=(e=e.substr(e.indexOf(u)+1)).match(n),c=-1,u="/"):40===h||123===h||91===h?++l:41===h||125===h||93===h?--l:t||s.length||34!==h&&39!==h||(u=u.slice(1,-1))}s.push(u)}if(0<l)throw Error("Unbalanced parentheses, braces, or brackets")}return i}var t=["true","false","null","undefined"],i=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,n=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),r=/[\])"'A-Za-z0-9_$]+$/,o={in:1,return:1,typeof:1},a={};return{Ra:[],wa:a,ac:e,vb:function(n,r){function o(e,n){var r;if(!c){var h=p.getBindingHandler(e);if(h&&h.preprocess&&!(n=h.preprocess(n,e,o)))return;(h=a[e])&&(r=n,0<=p.a.A(t,r)?r=!1:(h=r.match(i),r=null!==h&&(h[1]?"Object("+h[1]+")"+h[2]:r)),h=r),h&&l.push("'"+("string"==typeof a[e]?a[e]:e)+"':function(_z){"+r+"=_z}")}u&&(n="function(){return "+n+" }"),s.push("'"+e+"':"+n)}var s=[],l=[],u=(r=r||{}).valueAccessors,c=r.bindingParams,h="string"==typeof n?e(n):n;return p.a.D(h,(function(e){o(e.key||e.unknown,e.value)})),l.length&&o("_ko_property_writers","{"+l.join(",")+" }"),s.join(",")},Id:function(e,t){for(var i=0;i<e.length;i++)if(e[i].key==t)return!0;return!1},eb:function(e,t,i,n,r){e&&p.O(e)?!p.Za(e)||r&&e.v()===n||e(n):(e=t.get("_ko_property_writers"))&&e[i]&&e[i](n)}}}(),p.b("expressionRewriting",p.m),p.b("expressionRewriting.bindingRewriteValidators",p.m.Ra),p.b("expressionRewriting.parseObjectLiteral",p.m.ac),p.b("expressionRewriting.preProcessBindings",p.m.vb),p.b("expressionRewriting._twoWayBindings",p.m.wa),p.b("jsonExpressionRewriting",p.m),p.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",p.m.vb),function(){function e(e){return 8==e.nodeType&&a.test(o?e.text:e.nodeValue)}function t(e){return 8==e.nodeType&&s.test(o?e.text:e.nodeValue)}function n(i,n){for(var r=i,o=1,a=[];r=r.nextSibling;){if(t(r)&&(p.a.g.set(r,u,!0),0==--o))return a;a.push(r),e(r)&&o++}if(!n)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function r(e,t){var i=n(e,t);return i?0<i.length?i[i.length-1].nextSibling:e.nextSibling:null}var o=i&&"\x3c!--test--\x3e"===i.createComment("test").text,a=o?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,s=o?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0},u="__ko_matchedEndComment__";p.h={ea:{},childNodes:function(t){return e(t)?n(t):t.childNodes},Ea:function(t){if(e(t))for(var i=0,n=(t=p.h.childNodes(t)).length;i<n;i++)p.removeNode(t[i]);else p.a.Tb(t)},va:function(t,i){if(e(t)){p.h.Ea(t);for(var n=t.nextSibling,r=0,o=i.length;r<o;r++)n.parentNode.insertBefore(i[r],n)}else p.a.va(t,i)},Vc:function(t,i){var n;e(t)?(n=t.nextSibling,t=t.parentNode):n=t.firstChild,n?i!==n&&t.insertBefore(i,n):t.appendChild(i)},Wb:function(t,i,n){n?(n=n.nextSibling,e(t)&&(t=t.parentNode),n?i!==n&&t.insertBefore(i,n):t.appendChild(i)):p.h.Vc(t,i)},firstChild:function(i){if(e(i))return!i.nextSibling||t(i.nextSibling)?null:i.nextSibling;if(i.firstChild&&t(i.firstChild))throw Error("Found invalid end comment, as the first child of "+i);return i.firstChild},nextSibling:function(i){if(e(i)&&(i=r(i)),i.nextSibling&&t(i.nextSibling)){var n=i.nextSibling;if(t(n)&&!p.a.g.get(n,u))throw Error("Found end comment without a matching opening comment, as child of "+i);return null}return i.nextSibling},Cd:e,Vd:function(e){return(e=(o?e.text:e.nodeValue).match(a))?e[1]:null},Sc:function(i){if(l[p.a.R(i)]){var n=i.firstChild;if(n)do{if(1===n.nodeType){var o,a=null;if(o=n.firstChild)do{if(a)a.push(o);else if(e(o)){var s=r(o,!0);s?o=s:a=[o]}else t(o)&&(a=[o])}while(o=o.nextSibling);if(o=a)for(a=n.nextSibling,s=0;s<o.length;s++)a?i.insertBefore(o[s],a):i.appendChild(o[s])}}while(n=n.nextSibling)}}}}(),p.b("virtualElements",p.h),p.b("virtualElements.allowedBindings",p.h.ea),p.b("virtualElements.emptyNode",p.h.Ea),p.b("virtualElements.insertAfter",p.h.Wb),p.b("virtualElements.prepend",p.h.Vc),p.b("virtualElements.setDomNodeChildren",p.h.va),p.ga=function(){this.nd={}},p.a.extend(p.ga.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||p.j.getComponentNameForNode(e);case 8:return p.h.Cd(e);default:return!1}},getBindings:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e):null;return p.j.tc(i,e,t,!1)},getBindingAccessors:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e,{valueAccessors:!0}):null;return p.j.tc(i,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return p.h.Vd(e);default:return null}},parseBindingsString:function(e,t,i,n){try{var r,o=this.nd,a=e+(n&&n.valueAccessors||"");if(!(r=o[a])){var s,l="with($context){with($data||{}){return{"+p.m.vb(e,n)+"}}}";s=new Function("$context","$element",l),r=o[a]=s}return r(t,i)}catch(t){throw t.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+t.message,t}}}),p.ga.instance=new p.ga,p.b("bindingProvider",p.ga),function(){function n(e){var t=(e=p.a.g.get(e,b))&&e.N;t&&(e.N=null,t.Tc())}function o(e,t,i){this.node=e,this.yc=t,this.kb=[],this.H=!1,t.N||p.a.K.za(e,n),i&&i.N&&(i.N.kb.push(e),this.Kb=i)}function a(e){return function(){return e}}function s(e){return e()}function l(e){return p.a.Ga(p.u.G(e),(function(t,i){return function(){return e()[i]}}))}function u(e,t,i){return"function"==typeof e?l(e.bind(null,t,i)):p.a.Ga(e,a)}function c(e,t){return l(this.getBindings.bind(this,e,t))}function h(e,t){var i=p.h.firstChild(t);if(i){var n,r=p.ga.instance,o=r.preprocessNode;if(o){for(;n=i;)i=p.h.nextSibling(n),o.call(r,n);i=p.h.firstChild(t)}for(;n=i;)i=p.h.nextSibling(n),d(e,n)}p.i.ma(t,p.i.H)}function d(e,t){var i=e,n=1===t.nodeType;n&&p.h.Sc(t),(n||p.ga.instance.nodeHasBindings(t))&&(i=_(t,null,e).bindingContextForDescendants),i&&!v[p.a.R(t)]&&h(i,t)}function f(e){var t=[],i={},n=[];return p.a.P(e,(function r(o){if(!i[o]){var a=p.getBindingHandler(o);a&&(a.after&&(n.push(o),p.a.D(a.after,(function(t){if(e[t]){if(-1!==p.a.A(n,t))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+n.join(", "));r(t)}})),n.length--),t.push({key:o,Mc:a})),i[o]=!0}})),t}function _(t,i,n){var r,o=p.a.g.Ub(t,b,{}),a=o.hd;if(!i){if(a)throw Error("You cannot apply bindings multiple times to the same element.");o.hd=!0}if(a||(o.context=n),o.Zb||(o.Zb={}),i&&"function"!=typeof i)r=i;else{var l=p.ga.instance,u=l.getBindingAccessors||c,h=p.$((function(){return(r=i?i(n,t):u.call(l,t,n))&&(n[g]&&n[g](),n[y]&&n[y]()),r}),null,{l:t});r&&h.ja()||(h=null)}var d,_=n;if(r){var m=function(){return p.a.Ga(h?h():r,s)},x=h?function(e){return function(){return s(h()[e])}}:function(e){return r[e]};m.get=function(e){return r[e]&&s(x(e))},m.has=function(e){return e in r},p.i.H in r&&p.i.subscribe(t,p.i.H,(function(){var e=(0,r[p.i.H])();if(e){var i=p.h.childNodes(t);i.length&&e(i,p.Ec(i[0]))}})),p.i.pa in r&&(_=p.i.Cb(t,n),p.i.subscribe(t,p.i.pa,(function(){var e=(0,r[p.i.pa])();e&&p.h.firstChild(t)&&e(t)}))),o=f(r),p.a.D(o,(function(i){var n=i.Mc.init,o=i.Mc.update,a=i.key;if(8===t.nodeType&&!p.h.ea[a])throw Error("The binding '"+a+"' cannot be used with virtual elements");try{"function"==typeof n&&p.u.G((function(){var i=n(t,x(a),m,_.$data,_);if(i&&i.controlsDescendantBindings){if(d!==e)throw Error("Multiple bindings ("+d+" and "+a+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");d=a}})),"function"==typeof o&&p.$((function(){o(t,x(a),m,_.$data,_)}),null,{l:t})}catch(e){throw e.message='Unable to process binding "'+a+": "+r[a]+'"\nMessage: '+e.message,e}}))}return{shouldBindDescendants:o=d===e,bindingContextForDescendants:o&&_}}function m(t,i){return t&&t instanceof p.fa?t:new p.fa(t,e,e,i)}var g=p.a.Da("_subscribable"),x=p.a.Da("_ancestorBindingInfo"),y=p.a.Da("_dataDependency");p.c={};var v={script:!0,textarea:!0,template:!0};p.getBindingHandler=function(e){return p.c[e]};var $={};p.fa=function(t,i,n,r,o){function a(){var e=h?c():c,t=p.a.f(e);return i?(p.a.extend(l,i),x in i&&(l[x]=i[x])):(l.$parents=[],l.$root=t,l.ko=p),l[g]=s,u?t=l.$data:(l.$rawData=e,l.$data=t),n&&(l[n]=t),r&&r(l,i,t),i&&i[g]&&!p.S.o().Vb(i[g])&&i[g](),d&&(l[y]=d),l.$data}var s,l=this,u=t===$,c=u?e:t,h="function"==typeof c&&!p.O(c),d=o&&o.dataDependency;o&&o.exportDependencies?a():((s=p.xb(a)).v(),s.ja()?s.equalityComparer=null:l[g]=e)},p.fa.prototype.createChildContext=function(e,t,i,n){if(!n&&t&&"object"==typeof t&&(t=(n=t).as,i=n.extend),t&&n&&n.noChildContext){var r="function"==typeof e&&!p.O(e);return new p.fa($,this,null,(function(n){i&&i(n),n[t]=r?e():e}),n)}return new p.fa(e,this,t,(function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),i&&i(e)}),n)},p.fa.prototype.extend=function(e,t){return new p.fa($,this,null,(function(t){p.a.extend(t,"function"==typeof e?e(t):e)}),t)};var b=p.a.g.Z();o.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},o.prototype.sd=function(e){p.a.Pa(this.kb,e),!this.kb.length&&this.H&&this.Cc()},o.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,p.a.K.yb(this.node,n),p.i.ma(this.node,p.i.pa),this.Tc())},p.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(e,t,i,n,r){var o=p.a.g.Ub(e,b,{});return o.Fa||(o.Fa=new p.T),r&&r.notifyImmediately&&o.Zb[t]&&p.u.G(i,n,[e]),o.Fa.subscribe(i,n,t)},ma:function(t,i){var n=p.a.g.get(t,b);if(n&&(n.Zb[i]=!0,n.Fa&&n.Fa.notifySubscribers(t,i),i==p.i.H))if(n.N)n.N.Cc();else if(n.N===e&&n.Fa&&n.Fa.Wa(p.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")},Cb:function(e,t){var i=p.a.g.Ub(e,b,{});return i.N||(i.N=new o(e,i,t[x])),t[x]==i?t:t.extend((function(e){e[x]=i}))}},p.Td=function(e){return(e=p.a.g.get(e,b))&&e.context},p.ib=function(e,t,i){return 1===e.nodeType&&p.h.Sc(e),_(e,t,m(i))},p.ld=function(e,t,i){return i=m(i),p.ib(e,u(t,i,e),i)},p.Oa=function(e,t){1!==t.nodeType&&8!==t.nodeType||h(m(e),t)},p.vc=function(e,n,o){if(!r&&t.jQuery&&(r=t.jQuery),2>arguments.length){if(!(n=i.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!n||1!==n.nodeType&&8!==n.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");d(m(e,o),n)},p.Dc=function(t){return!t||1!==t.nodeType&&8!==t.nodeType?e:p.Td(t)},p.Ec=function(t){return(t=p.Dc(t))?t.$data:e},p.b("bindingHandlers",p.c),p.b("bindingEvent",p.i),p.b("bindingEvent.subscribe",p.i.subscribe),p.b("bindingEvent.startPossiblyAsyncContentBinding",p.i.Cb),p.b("applyBindings",p.vc),p.b("applyBindingsToDescendants",p.Oa),p.b("applyBindingAccessorsToNode",p.ib),p.b("applyBindingsToNode",p.ld),p.b("contextFor",p.Dc),p.b("dataFor",p.Ec)}(),function(e){function t(t,n){var a,s=Object.prototype.hasOwnProperty.call(r,t)?r[t]:e;s?s.subscribe(n):((s=r[t]=new p.T).subscribe(n),i(t,(function(e,i){var n=!(!i||!i.synchronous);o[t]={definition:e,Gd:n},delete r[t],a||n?s.notifySubscribers(e):p.na.zb((function(){s.notifySubscribers(e)}))})),a=!0)}function i(e,t){n("getConfig",[e],(function(i){i?n("loadComponent",[e,i],(function(e){t(e,i)})):t(null,null)}))}function n(t,i,r,o){o||(o=p.j.loaders.slice(0));var a=o.shift();if(a){var s=a[t];if(s){var l=!1;if(s.apply(a,i.concat((function(e){l?r(null):null!==e?r(e):n(t,i,r,o)})))!==e&&(l=!0,!a.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else n(t,i,r,o)}else r(null)}var r={},o={};p.j={get:function(i,n){var r=Object.prototype.hasOwnProperty.call(o,i)?o[i]:e;r?r.Gd?p.u.G((function(){n(r.definition)})):p.na.zb((function(){n(r.definition)})):t(i,n)},Bc:function(e){delete o[e]},oc:n},p.j.loaders=[],p.b("components",p.j),p.b("components.get",p.j.get),p.b("components.clearCachedDefinition",p.j.Bc)}(),function(){function e(e,t,i,n){function r(){0==--s&&n(o)}var o={},s=2,l=i.template;i=i.viewModel,l?a(t,l,(function(t){p.j.oc("loadTemplate",[e,t],(function(e){o.template=e,r()}))})):r(),i?a(t,i,(function(t){p.j.oc("loadViewModel",[e,t],(function(e){o[c]=e,r()}))})):r()}function n(e,t,i){if("function"==typeof t)i((function(e){return new t(e)}));else if("function"==typeof t[c])i(t[c]);else if("instance"in t){var r=t.instance;i((function(){return r}))}else"viewModel"in t?n(e,t.viewModel,i):e("Unknown viewModel value: "+t)}function r(e){switch(p.a.R(e)){case"script":return p.a.ua(e.text);case"textarea":return p.a.ua(e.value);case"template":if(o(e.content))return p.a.Ca(e.content.childNodes)}return p.a.Ca(e.childNodes)}function o(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function a(e,i,n){"string"==typeof i.require?s||t.require?(s||t.require)([i.require],(function(e){e&&"object"==typeof e&&e.Xd&&e.default&&(e=e.default),n(e)})):e("Uses require, but no AMD loader is present"):n(i)}function l(e){return function(t){throw Error("Component '"+e+"': "+t)}}var u={};p.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(p.j.tb(e))throw Error("Component "+e+" is already registered");u[e]=t},p.j.tb=function(e){return Object.prototype.hasOwnProperty.call(u,e)},p.j.unregister=function(e){delete u[e],p.j.Bc(e)},p.j.Fc={getConfig:function(e,t){t(p.j.tb(e)?u[e]:null)},loadComponent:function(t,i,n){var r=l(t);a(r,i,(function(i){e(t,r,i,n)}))},loadTemplate:function(e,n,a){if(e=l(e),"string"==typeof n)a(p.a.ua(n));else if(n instanceof Array)a(n);else if(o(n))a(p.a.la(n.childNodes));else if(n.element)if(n=n.element,t.HTMLElement?n instanceof HTMLElement:n&&n.tagName&&1===n.nodeType)a(r(n));else if("string"==typeof n){var s=i.getElementById(n);s?a(r(s)):e("Cannot find element with ID "+n)}else e("Unknown element type: "+n);else e("Unknown template value: "+n)},loadViewModel:function(e,t,i){n(l(e),t,i)}};var c="createViewModel";p.b("components.register",p.j.register),p.b("components.isRegistered",p.j.tb),p.b("components.unregister",p.j.unregister),p.b("components.defaultLoader",p.j.Fc),p.j.loaders.push(p.j.Fc),p.j.dd=u}(),function(){function e(e,i){if(n=e.getAttribute("params")){var n=t.parseBindingsString(n,i,e,{valueAccessors:!0,bindingParams:!0}),r=(n=p.a.Ga(n,(function(t){return p.o(t,null,{l:e})})),p.a.Ga(n,(function(t){var i=t.v();return t.ja()?p.o({read:function(){return p.a.f(t())},write:p.Za(i)&&function(e){t()(e)},l:e}):i})));return Object.prototype.hasOwnProperty.call(r,"$raw")||(r.$raw=n),r}return{$raw:{}}}p.j.getComponentNameForNode=function(e){var t=p.a.R(e);if(p.j.tb(t)&&(-1!=t.indexOf("-")||""+e=="[object HTMLUnknownElement]"||8>=p.a.W&&e.tagName===t))return t},p.j.tc=function(t,i,n,r){if(1===i.nodeType){var o=p.j.getComponentNameForNode(i);if(o){if((t=t||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var a={name:o,params:e(i,n)};t.component=r?function(){return a}:a}}return t};var t=new p.ga;9>p.a.W&&(p.j.register=function(e){return function(t){return e.apply(this,arguments)}}(p.j.register),i.createDocumentFragment=function(e){return function(){var t=e();return p.j.dd,t}}(i.createDocumentFragment))}(),function(){function e(e,t,i){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=p.a.Ca(t),p.h.va(i,e)}function t(e,t,i){var n=e.createViewModel;return n?n.call(e,t,i):t}var i=0;p.c.component={init:function(n,r,o,a,s){function l(){var e=u&&u.dispose;"function"==typeof e&&e.call(u),h&&h.s(),c=u=h=null}var u,c,h,d=p.a.la(p.h.childNodes(n));return p.h.Ea(n),p.a.K.za(n,l),p.o((function(){var o,a,f=p.a.f(r());if("string"==typeof f?o=f:(o=p.a.f(f.name),a=p.a.f(f.params)),!o)throw Error("No component name specified");var _=p.i.Cb(n,s),m=c=++i;p.j.get(o,(function(i){if(c===m){if(l(),!i)throw Error("Unknown component '"+o+"'");e(o,i,n);var r=t(i,a,{element:n,templateNodes:d});i=_.createChildContext(r,{extend:function(e){e.$component=r,e.$componentTemplateNodes=d}}),r&&r.koDescendantsComplete&&(h=p.i.subscribe(n,p.i.pa,r.koDescendantsComplete,r)),u=r,p.Oa(i,n)}}))}),null,{l:n}),{controlsDescendantBindings:!0}}},p.h.ea.component=!0}();var S={class:"className",for:"htmlFor"};p.c.attr={update:function(t,i){var n=p.a.f(i())||{};p.a.P(n,(function(i,n){n=p.a.f(n);var r=i.indexOf(":"),o=(r="lookupNamespaceURI"in t&&0<r&&t.lookupNamespaceURI(i.substr(0,r)),!1===n||null===n||n===e);o?r?t.removeAttributeNS(r,i):t.removeAttribute(i):n=n.toString(),8>=p.a.W&&i in S?(i=S[i],o?t.removeAttribute(i):t[i]=n):o||(r?t.setAttributeNS(r,i,n):t.setAttribute(i,n)),"name"===i&&p.a.Yc(t,o?"":n)}))}},p.c.checked={after:["value","attr"],init:function(t,i,n){function r(){var r=t.checked,o=a();if(!p.S.Ya()&&(r||!l&&!p.S.qa())){var u=p.u.G(i);if(c){var d=h?u.v():u,_=f;f=o,_!==o?r&&(p.a.Na(d,o,!0),p.a.Na(d,_,!1)):p.a.Na(d,o,r),h&&p.Za(u)&&u(d)}else s&&(o===e?o=r:r||(o=e)),p.m.eb(u,n,"checked",o,!0)}}function o(){var n=p.a.f(i()),r=a();c?(t.checked=0<=p.a.A(n,r),f=r):t.checked=s&&r===e?!!n:a()===n}var a=p.xb((function(){return n.has("checkedValue")?p.a.f(n.get("checkedValue")):d?n.has("value")?p.a.f(n.get("value")):t.value:void 0})),s="checkbox"==t.type,l="radio"==t.type;if(s||l){var u=i(),c=s&&p.a.f(u)instanceof Array,h=!(c&&u.push&&u.splice),d=l||c,f=c?a():e;l&&!t.name&&p.c.uniqueName.init(t,(function(){return!0})),p.o(r,null,{l:t}),p.a.B(t,"click",r),p.o(o,null,{l:t}),u=e}}},p.m.wa.checked=!0,p.c.checkedValue={update:function(e,t){e.value=p.a.f(t())}},p.c.class={update:function(e,t){var i=p.a.Db(p.a.f(t()));p.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=i,p.a.Eb(e,i,!0)}},p.c.css={update:function(e,t){var i=p.a.f(t());null!==i&&"object"==typeof i?p.a.P(i,(function(t,i){i=p.a.f(i),p.a.Eb(e,t,i)})):p.c.class.update(e,t)}},p.c.enable={update:function(e,t){var i=p.a.f(t());i&&e.disabled?e.removeAttribute("disabled"):i||e.disabled||(e.disabled=!0)}},p.c.disable={update:function(e,t){p.c.enable.update(e,(function(){return!p.a.f(t())}))}},p.c.event={init:function(e,t,i,n,r){var o=t()||{};p.a.P(o,(function(o){"string"==typeof o&&p.a.B(e,o,(function(e){var a,s=t()[o];if(s){try{var l=p.a.la(arguments);n=r.$data,l.unshift(n),a=s.apply(n,l)}finally{!0!==a&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===i.get(o+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}}))}))}},p.c.foreach={Rc:function(e){return function(){var t=e(),i=p.a.bc(t);return i&&"number"!=typeof i.length?(p.a.f(t),{foreach:i.data,as:i.as,noChildContext:i.noChildContext,includeDestroyed:i.includeDestroyed,afterAdd:i.afterAdd,beforeRemove:i.beforeRemove,afterRender:i.afterRender,beforeMove:i.beforeMove,afterMove:i.afterMove,templateEngine:p.ba.Ma}):{foreach:t,templateEngine:p.ba.Ma}}},init:function(e,t){return p.c.template.init(e,p.c.foreach.Rc(t))},update:function(e,t,i,n,r){return p.c.template.update(e,p.c.foreach.Rc(t),i,n,r)}},p.m.Ra.foreach=!1,p.h.ea.foreach=!0,p.c.hasfocus={init:function(e,t,i){function n(n){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var o;try{o=r.activeElement}catch{o=r.body}n=o===e}r=t(),p.m.eb(r,i,"hasfocus",n,!0),e.__ko_hasfocusLastValue=n,e.__ko_hasfocusUpdating=!1}var r=n.bind(null,!0),o=n.bind(null,!1);p.a.B(e,"focus",r),p.a.B(e,"focusin",r),p.a.B(e,"blur",o),p.a.B(e,"focusout",o),e.__ko_hasfocusLastValue=!1},update:function(e,t){var i=!!p.a.f(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===i||(i?e.focus():e.blur(),!i&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),p.u.G(p.a.Fb,null,[e,i?"focusin":"focusout"]))}},p.m.wa.hasfocus=!0,p.c.hasFocus=p.c.hasfocus,p.m.wa.hasFocus="hasfocus",p.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){p.a.fc(e,t())}},function(){function e(e,t,i){p.c[e]={init:function(e,n,r,o,a){var s,l,u,c,h,d={};if(t){o=r.get("as");var f=r.get("noChildContext");d={as:o,noChildContext:f,exportDependencies:h=!(o&&f)}}return c=(u="render"==r.get("completeOn"))||r.has(p.i.pa),p.o((function(){var r,o=p.a.f(n()),f=!i!=!o,_=!l;(h||f!==s)&&(c&&(a=p.i.Cb(e,a)),f&&((!t||h)&&(d.dataDependency=p.S.o()),r=t?a.createChildContext("function"==typeof o?o:n,d):p.S.qa()?a.extend(null,d):a),_&&p.S.qa()&&(l=p.a.Ca(p.h.childNodes(e),!0)),f?(_||p.h.va(e,p.a.Ca(l)),p.Oa(r,e)):(p.h.Ea(e),u||p.i.ma(e,p.i.H)),s=f)}),null,{l:e}),{controlsDescendantBindings:!0}}},p.m.Ra[e]=!1,p.h.ea[e]=!0}e("if"),e("ifnot",!1,!0),e("with",!0)}(),p.c.let={init:function(e,t,i,n,r){return t=r.extend(t),p.Oa(t,e),{controlsDescendantBindings:!0}}},p.h.ea.let=!0;var w={};p.c.options={init:function(e){if("select"!==p.a.R(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,n){function r(){return p.a.jb(t.options,(function(e){return e.selected}))}function o(e,t,i){var n=typeof t;return"function"==n?t(e):"string"==n?e[t]:i}function a(e,i){if(_&&c)p.i.ma(t,p.i.H);else if(f.length){var n=0<=p.a.A(f,p.w.M(i[0]));p.a.Zc(i[0],n),_&&!n&&p.u.G(p.a.Fb,null,[t,"change"])}}var s=t.multiple,l=0!=t.length&&s?t.scrollTop:null,u=p.a.f(i()),c=n.get("valueAllowUnset")&&n.has("value"),h=n.get("optionsIncludeDestroyed");i={};var d,f=[];c||(s?f=p.a.Mb(r(),p.w.M):0<=t.selectedIndex&&f.push(p.w.M(t.options[t.selectedIndex]))),u&&(typeof u.length>"u"&&(u=[u]),d=p.a.jb(u,(function(t){return h||t===e||null===t||!p.a.f(t._destroy)})),n.has("optionsCaption")&&null!==(u=p.a.f(n.get("optionsCaption")))&&u!==e&&d.unshift(w));var _=!1;i.beforeRemove=function(e){t.removeChild(e)},u=a,n.has("optionsAfterRender")&&"function"==typeof n.get("optionsAfterRender")&&(u=function(t,i){a(0,i),p.u.G(n.get("optionsAfterRender"),null,[i[0],t!==w?t:e])}),p.a.ec(t,d,(function(i,r,a){return a.length&&(f=!c&&a[0].selected?[p.w.M(a[0])]:[],_=!0),r=t.ownerDocument.createElement("option"),i===w?(p.a.Bb(r,n.get("optionsCaption")),p.w.cb(r,e)):(a=o(i,n.get("optionsValue"),i),p.w.cb(r,p.a.f(a)),i=o(i,n.get("optionsText"),a),p.a.Bb(r,i)),[r]}),i,u),c||(s?f.length&&r().length<f.length:f.length&&0<=t.selectedIndex?p.w.M(t.options[t.selectedIndex])!==f[0]:f.length||0<=t.selectedIndex)&&p.u.G(p.a.Fb,null,[t,"change"]),(c||p.S.Ya())&&p.i.ma(t,p.i.H),p.a.wd(t),l&&20<Math.abs(l-t.scrollTop)&&(t.scrollTop=l)}},p.c.options.$b=p.a.g.Z(),p.c.selectedOptions={init:function(e,t,i){function n(){var n=t(),r=[];p.a.D(e.getElementsByTagName("option"),(function(e){e.selected&&r.push(p.w.M(e))})),p.m.eb(n,i,"selectedOptions",r)}function r(){var i=p.a.f(t()),n=e.scrollTop;i&&"number"==typeof i.length&&p.a.D(e.getElementsByTagName("option"),(function(e){var t=0<=p.a.A(i,p.w.M(e));e.selected!=t&&p.a.Zc(e,t)})),e.scrollTop=n}if("select"!=p.a.R(e))throw Error("selectedOptions binding applies only to SELECT elements");var o;p.i.subscribe(e,p.i.H,(function(){o?n():(p.a.B(e,"change",n),o=p.o(r,null,{l:e}))}),null,{notifyImmediately:!0})},update:function(){}},p.m.wa.selectedOptions=!0,p.c.style={update:function(t,i){var n=p.a.f(i()||{});p.a.P(n,(function(i,n){if((null===(n=p.a.f(n))||n===e||!1===n)&&(n=""),r)r(t).css(i,n);else if(/^--/.test(i))t.style.setProperty(i,n);else{i=i.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));var o=t.style[i];t.style[i]=n,n===o||t.style[i]!=o||isNaN(n)||(t.style[i]=n+"px")}}))}},p.c.submit={init:function(e,t,i,n,r){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");p.a.B(e,"submit",(function(i){var n,o=t();try{n=o.call(r.$data,e)}finally{!0!==n&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}}))}},p.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){p.a.Bb(e,t())}},p.h.ea.text=!0,function(){if(t&&t.navigator){var i,n,r,o,a,s=function(e){if(e)return parseFloat(e[1])},l=t.navigator.userAgent;(i=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(a=s(l.match(/Edge\/([^ ]+)$/)))||s(l.match(/Chrome\/([^ ]+)/))||(n=s(l.match(/Version\/([^ ]+) Safari/)))||(r=s(l.match(/Firefox\/([^ ]+)/)))||(o=p.a.W||s(l.match(/MSIE ([^ ]+)/)))||(o=s(l.match(/rv:([^ )]+)/)))}if(8<=o&&10>o)var u=p.a.g.Z(),c=p.a.g.Z(),h=function(e){var t=this.activeElement;(t=t&&p.a.g.get(t,c))&&t(e)},d=function(e,t){var i=e.ownerDocument;p.a.g.get(i,u)||(p.a.g.set(i,u,!0),p.a.B(i,"selectionchange",h)),p.a.g.set(e,c,t)};p.c.textInput={init:function(t,s,l){function u(e,i){p.a.B(t,e,i)}function c(){var i=p.a.f(s());(null===i||i===e)&&(i=""),m!==e&&i===m?p.a.setTimeout(c,4):t.value!==i&&(y=!0,t.value=i,y=!1,g=t.value)}function h(){_||(m=t.value,_=p.a.setTimeout(f,4))}function f(){clearTimeout(_),m=_=e;var i=t.value;g!==i&&(g=i,p.m.eb(s(),l,"textInput",i))}var _,m,g=t.value,x=9==p.a.W?h:f,y=!1;o&&u("keypress",f),11>o&&u("propertychange",(function(e){y||"value"!==e.propertyName||x()})),8==o&&(u("keyup",f),u("keydown",f)),d&&(d(t,x),u("dragend",h)),(!o||9<=o)&&u("input",x),5>n&&"textarea"===p.a.R(t)?(u("keydown",h),u("paste",h),u("cut",h)):11>i?u("keydown",h):4>r?(u("DOMAutoComplete",f),u("dragdrop",f),u("drop",f)):a&&"number"===t.type&&u("keydown",h),u("change",f),u("blur",f),p.o(c,null,{l:t})}},p.m.wa.textInput=!0,p.c.textinput={preprocess:function(e,t,i){i("textInput",e)}}}(),p.c.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++p.c.uniqueName.rd;p.a.Yc(e,i)}}},p.c.uniqueName.rd=0,p.c.using={init:function(e,t,i,n,r){var o;return i.has("as")&&(o={as:i.get("as"),noChildContext:i.get("noChildContext")}),t=r.createChildContext(t,o),p.Oa(t,e),{controlsDescendantBindings:!0}}},p.h.ea.using=!0,p.c.value={init:function(t,i,n){var r=p.a.R(t),o="input"==r;if(!o||"checkbox"!=t.type&&"radio"!=t.type){var a=[],s=n.get("valueUpdate"),l=!1,u=null;s&&(a="string"==typeof s?[s]:p.a.wc(s),p.a.Pa(a,"change"));var c,h,d=function(){u=null,l=!1;var e=i(),r=p.w.M(t);p.m.eb(e,n,"value",r)};!p.a.W||!o||"text"!=t.type||"off"==t.autocomplete||t.form&&"off"==t.form.autocomplete||-1!=p.a.A(a,"propertychange")||(p.a.B(t,"propertychange",(function(){l=!0})),p.a.B(t,"focus",(function(){l=!1})),p.a.B(t,"blur",(function(){l&&d()}))),p.a.D(a,(function(e){var i=d;p.a.Ud(e,"after")&&(i=function(){u=p.w.M(t),p.a.setTimeout(d,0)},e=e.substring(5)),p.a.B(t,e,i)})),c=o&&"file"==t.type?function(){var n=p.a.f(i());null===n||n===e||""===n?t.value="":p.u.G(d)}:function(){var o=p.a.f(i()),a=p.w.M(t);null!==u&&o===u?p.a.setTimeout(c,0):(o!==a||a===e)&&("select"===r?(a=n.get("valueAllowUnset"),p.w.cb(t,o,a),a||o===p.w.M(t)||p.u.G(d)):p.w.cb(t,o))},"select"===r?p.i.subscribe(t,p.i.H,(function(){h?n.get("valueAllowUnset")?c():d():(p.a.B(t,"change",d),h=p.o(c,null,{l:t}))}),null,{notifyImmediately:!0}):(p.a.B(t,"change",d),p.o(c,null,{l:t}))}else p.ib(t,{checkedValue:i})},update:function(){}},p.m.wa.value=!0,p.c.visible={update:function(e,t){var i=p.a.f(t()),n="none"!=e.style.display;i&&!n?e.style.display="":!i&&n&&(e.style.display="none")}},p.c.hidden={update:function(e,t){p.c.visible.update(e,(function(){return!p.a.f(t())}))}},function(e){p.c[e]={init:function(t,i,n,r,o){return p.c.event.init.call(this,t,(function(){var t={};return t[e]=i(),t}),n,r,o)}}}("click"),p.ca=function(){},p.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},p.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},p.ca.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){var n=(t=t||i).getElementById(e);if(!n)throw Error("Cannot find template with ID "+e);return new p.C.F(n)}if(1==e.nodeType||8==e.nodeType)return new p.C.ia(e);throw Error("Unknown template type: "+e)},p.ca.prototype.renderTemplate=function(e,t,i,n){return e=this.makeTemplateSource(e,n),this.renderTemplateSource(e,t,i,n)},p.ca.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},p.ca.prototype.rewriteTemplate=function(e,t,i){t=t((e=this.makeTemplateSource(e,i)).text()),e.text(t),e.data("isRewritten",!0)},p.b("templateEngine",p.ca),p.kc=function(){function e(e,t,i,n){e=p.m.ac(e);for(var r=p.m.Ra,o=0;o<e.length;o++){var a=e[o].key;if(Object.prototype.hasOwnProperty.call(r,a)){var s=r[a];if("function"==typeof s){if(a=s(e[o].value))throw Error(a)}else if(!s)throw Error("This template engine does not support the '"+a+"' binding within its templates")}}return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+p.m.vb(e,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",n.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(e,t,i){t.isTemplateRewritten(e,i)||t.rewriteTemplate(e,(function(e){return p.kc.Ld(e,t)}),i)},Ld:function(n,r){return n.replace(t,(function(t,i,n,o,a){return e(a,i,n,r)})).replace(i,(function(t,i){return e(i,"\x3c!-- ko --\x3e","#comment",r)}))},md:function(e,t){return p.aa.Xb((function(i,n){var r=i.nextSibling;r&&r.nodeName.toLowerCase()===t&&p.ib(r,e,n)}))}}}(),p.b("__tr_ambtns",p.kc.md),function(){p.C={},p.C.F=function(e){if(this.F=e){var t=p.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},p.C.F.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[e];var t=arguments[0];"innerHTML"===e?p.a.fc(this.F,t):this.F[e]=t};var t=p.a.g.Z()+"_";p.C.F.prototype.data=function(e){if(1===arguments.length)return p.a.g.get(this.F,t+e);p.a.g.set(this.F,t+e,arguments[1])};var i=p.a.g.Z();p.C.F.prototype.nodes=function(){var t=this.F;if(0==arguments.length){var n=p.a.g.get(t,i)||{},r=n.lb||(3===this.ab?t.content:4===this.ab?t:e);if(!r||n.jd){var o=this.text();o&&o!==n.bb&&(r=p.a.Md(o,t.ownerDocument),p.a.g.set(t,i,{lb:r,bb:o,jd:!0}))}return r}n=arguments[0],this.ab!==e&&this.text(""),p.a.g.set(t,i,{lb:n})},p.C.ia=function(e){this.F=e},p.C.ia.prototype=new p.C.F,p.C.ia.prototype.constructor=p.C.ia,p.C.ia.prototype.text=function(){if(0==arguments.length){var t=p.a.g.get(this.F,i)||{};return t.bb===e&&t.lb&&(t.bb=t.lb.innerHTML),t.bb}p.a.g.set(this.F,i,{bb:arguments[0]})},p.b("templateSources",p.C),p.b("templateSources.domElement",p.C.F),p.b("templateSources.anonymousTemplate",p.C.ia)}(),function(){function t(e,t,i){var n;for(t=p.h.nextSibling(t);e&&(n=e)!==t;)i(n,e=p.h.nextSibling(n))}function i(e,i){if(e.length){var n=e[0],r=e[e.length-1],o=n.parentNode,a=p.ga.instance,s=a.preprocessNode;if(s){if(t(n,r,(function(e,t){var i=e.previousSibling,o=s.call(a,e);o&&(e===n&&(n=o[0]||t),e===r&&(r=o[o.length-1]||i))})),e.length=0,!n)return;n===r?e.push(n):(e.push(n,r),p.a.Ua(e,o))}t(n,r,(function(e){1!==e.nodeType&&8!==e.nodeType||p.vc(i,e)})),t(n,r,(function(e){1!==e.nodeType&&8!==e.nodeType||p.aa.cd(e,[i])})),p.a.Ua(e,o)}}function n(e){return e.nodeType?e:0<e.length?e[0]:null}function r(e,t,r,o,s){s=s||{};var l=(e&&n(e)||r||{}).ownerDocument,u=s.templateEngine||a;if(p.kc.xd(r,u,l),"number"!=typeof(r=u.renderTemplate(r,o,s,l)).length||0<r.length&&"number"!=typeof r[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(l=!1,t){case"replaceChildren":p.h.va(e,r),l=!0;break;case"replaceNode":p.a.Xc(e,r),l=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t)}return l&&(i(r,o),s.afterRender&&p.u.G(s.afterRender,null,[r,o[s.as||"$data"]]),"replaceChildren"==t&&p.i.ma(e,p.i.H)),r}function o(e,t,i){return p.O(e)?e():"function"==typeof e?e(t,i):e}var a;p.gc=function(t){if(t!=e&&!(t instanceof p.ca))throw Error("templateEngine must inherit from ko.templateEngine");a=t},p.dc=function(t,i,s,l,u){if(((s=s||{}).templateEngine||a)==e)throw Error("Set a template engine before calling renderTemplate");if(u=u||"replaceChildren",l){var c=n(l);return p.$((function(){var e=i&&i instanceof p.fa?i:new p.fa(i,null,null,null,{exportDependencies:!0}),a=o(t,e.$data,e);e=r(l,u,a,e,s),"replaceNode"==u&&(c=n(l=e))}),null,{Sa:function(){return!c||!p.a.Sb(c)},l:c&&"replaceNode"==u?c.parentNode:c})}return p.aa.Xb((function(e){p.dc(t,i,s,e,"replaceNode")}))},p.Qd=function(t,n,a,s,l){function u(e,t){p.u.G(p.a.ec,null,[s,e,h,a,c,t]),p.i.ma(s,p.i.H)}function c(e,t){i(t,d),a.afterRender&&a.afterRender(t,e),d=null}function h(e,i){d=l.createChildContext(e,{as:f,noChildContext:a.noChildContext,extend:function(e){e.$index=i,f&&(e[f+"Index"]=i)}});var n=o(t,e,d);return r(s,"ignoreTargetNode",n,d,a)}var d,f=a.as,_=!1===a.includeDestroyed||p.options.foreachHidesDestroyed&&!a.includeDestroyed;if(_||a.beforeRemove||!p.Pc(n))return p.$((function(){var t=p.a.f(n)||[];typeof t.length>"u"&&(t=[t]),_&&(t=p.a.jb(t,(function(t){return t===e||null===t||!p.a.f(t._destroy)}))),u(t)}),null,{l:s});u(n.v());var m=n.subscribe((function(e){u(n(),e)}),null,"arrayChange");return m.l(s),m};var s=p.a.g.Z(),l=p.a.g.Z();p.c.template={init:function(e,t){var i=p.a.f(t());if("string"==typeof i||"name"in i)p.h.Ea(e);else if("nodes"in i){if(i=i.nodes||[],p.O(i))throw Error('The "nodes" option must be a plain, non-observable array.');var n=i[0]&&i[0].parentNode;n&&p.a.g.get(n,l)||(n=p.a.Yb(i),p.a.g.set(n,l,!0)),new p.C.ia(e).nodes(n)}else{if(!(0<(i=p.h.childNodes(e)).length))throw Error("Anonymous template defined, but no template content was provided");n=p.a.Yb(i),new p.C.ia(e).nodes(n)}return{controlsDescendantBindings:!0}},update:function(t,i,n,r,o){var a=i();n=!0,r=null,"string"==typeof(i=p.a.f(a))?i={}:(a="name"in i?i.name:t,"if"in i&&(n=p.a.f(i.if)),n&&"ifnot"in i&&(n=!p.a.f(i.ifnot)),n&&!a&&(n=!1)),"foreach"in i?r=p.Qd(a,n&&i.foreach||[],i,t,o):n?(n=o,"data"in i&&(n=o.createChildContext(i.data,{as:i.as,noChildContext:i.noChildContext,exportDependencies:!0})),r=p.dc(a,n,i,t)):p.h.Ea(t),o=r,(i=p.a.g.get(t,s))&&"function"==typeof i.s&&i.s(),p.a.g.set(t,s,!o||o.ja&&!o.ja()?e:o)}},p.m.Ra.template=function(e){return 1==(e=p.m.ac(e)).length&&e[0].unknown||p.m.Id(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"},p.h.ea.template=!0}(),p.b("setTemplateEngine",p.gc),p.b("renderTemplate",p.dc),p.a.Kc=function(e,t,i){var n,r,o,a,s;if(e.length&&t.length)for(n=r=0;(!i||n<i)&&(a=e[r]);++r){for(o=0;s=t[o];++o)if(a.value===s.value){a.moved=s.index,s.moved=a.index,t.splice(o,1),n=o=0;break}n+=o}},p.a.Pb=function(){function e(e,t,i,n,r){var o,a,s,l,u,c=Math.min,h=Math.max,d=[],f=e.length,_=t.length,m=_-f||1,g=f+_+1;for(o=0;o<=f;o++)for(l=s,d.push(s=[]),u=c(_,o+m),a=h(0,o-1);a<=u;a++)s[a]=a?o?e[o-1]===t[a-1]?l[a-1]:c(l[a]||g,s[a-1]||g)+1:a+1:o+1;for(c=[],h=[],m=[],o=f,a=_;o||a;)_=d[o][a]-1,a&&_===d[o][a-1]?h.push(c[c.length]={status:i,value:t[--a],index:a}):o&&_===d[o-1][a]?m.push(c[c.length]={status:n,value:e[--o],index:o}):(--a,--o,r.sparse||c.push({status:"retained",value:t[a]}));return p.a.Kc(m,h,!r.dontLimitMoves&&10*f),c.reverse()}return function(t,i,n){return n="boolean"==typeof n?{dontLimitMoves:n}:n||{},i=i||[],(t=t||[]).length<i.length?e(t,i,"added","deleted",n):e(i,t,"deleted","added",n)}}(),p.b("utils.compareArrays",p.a.Pb),function(){function t(t,i,n,r,o){var a=[],s=p.$((function(){var e=i(n,o,p.a.Ua(a,t))||[];0<a.length&&(p.a.Xc(a,e),r&&p.u.G(r,null,[n,e,o])),a.length=0,p.a.Nb(a,e)}),null,{l:t,Sa:function(){return!p.a.kd(a)}});return{Y:a,$:s.ja()?s:e}}var i=p.a.g.Z(),n=p.a.g.Z();p.a.ec=function(r,o,a,s,l,u){function c(e){f={Aa:e,pb:p.ta(b++)},v.push(f),y||E.push(f)}function h(e){f=x[e],b!==f.pb.v()&&w.push(f),f.pb(b++),p.a.Ua(f.Y,r),v.push(f)}function d(e,t){if(e)for(var i=0,n=t.length;i<n;i++)p.a.D(t[i].Y,(function(n){e(n,i,t[i].Aa)}))}typeof(o=o||[]).length>"u"&&(o=[o]),s=s||{};var f,_,m,g,x=p.a.g.get(r,i),y=!x,v=[],$=0,b=0,T=[],C=[],S=[],w=[],E=[],P=0;if(y)p.a.D(o,c);else{if(!u||x&&x._countWaitingForRemove){var A=p.a.Mb(x,(function(e){return e.Aa}));u=p.a.Pb(A,o,{dontLimitMoves:s.dontLimitMoves,sparse:!0})}var L,M,R;for(A=0;L=u[A];A++)switch(M=L.moved,R=L.index,L.status){case"deleted":for(;$<R;)h($++);M===e&&((f=x[$]).$&&(f.$.s(),f.$=e),p.a.Ua(f.Y,r).length&&(s.beforeRemove&&(v.push(f),P++,f.Aa===n?f=null:S.push(f)),f&&T.push.apply(T,f.Y))),$++;break;case"added":for(;b<R;)h($++);M!==e?(C.push(v.length),h(M)):c(L.value)}for(;b<o.length;)h($++);v._countWaitingForRemove=P}p.a.g.set(r,i,v),d(s.beforeMove,w),p.a.D(T,s.beforeRemove?p.oa:p.removeNode);try{g=r.ownerDocument.activeElement}catch{}if(C.length)for(;(A=C.shift())!=e;){for(f=v[A],_=e;A;)if((m=v[--A].Y)&&m.length){_=m[m.length-1];break}for(o=0;$=f.Y[o];_=$,o++)p.h.Wb(r,$,_)}for(A=0;f=v[A];A++){for(f.Y||p.a.extend(f,t(r,a,f.Aa,l,f.pb)),o=0;$=f.Y[o];_=$,o++)p.h.Wb(r,$,_);!f.Ed&&l&&(l(f.Aa,f.Y,f.pb),f.Ed=!0,_=f.Y[f.Y.length-1])}for(g&&r.ownerDocument.activeElement!=g&&g.focus(),d(s.beforeRemove,S),A=0;A<S.length;++A)S[A].Aa=n;d(s.afterMove,w),d(s.afterAdd,E)}}(),p.b("utils.setDomNodeChildrenFromArrayMapping",p.a.ec),p.ba=function(){this.allowTemplateRewriting=!1},p.ba.prototype=new p.ca,p.ba.prototype.constructor=p.ba,p.ba.prototype.renderTemplateSource=function(e,t,i,n){return(t=9>p.a.W||!e.nodes?null:e.nodes())?p.a.la(t.cloneNode(!0).childNodes):(e=e.text(),p.a.ua(e,n))},p.ba.Ma=new p.ba,p.gc(p.ba.Ma),p.b("nativeTemplateEngine",p.ba),function(){p.$a=function(){var e=this.Hd=function(){if(!r||!r.tmpl)return 0;try{if(0<=r.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch{}return 1}();this.renderTemplateSource=function(t,n,o,a){if(a=a||i,o=o||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=t.data("precompiled");return s||(s=t.text()||"",s=r.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),t.data("precompiled",s)),t=[n.$data],n=r.extend({koBindingContext:n},o.templateOptions),(n=r.tmpl(s,t,n)).appendTo(a.createElement("div")),r.fragments={},n},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){i.write("<script type='text/html' id='"+e+"'>"+t+"<\/script>")},0<e&&(r.tmpl.tag.ko_code={open:"__.push($1 || '');"},r.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},p.$a.prototype=new p.ca,p.$a.prototype.constructor=p.$a;var e=new p.$a;0<e.Hd&&p.gc(e),p.b("jqueryTmplTemplateEngine",p.$a)}()}(t.ko={})}();var ce$1=ko;typeof window<"u"?(ko=window.ko,typeof G<"u"?window.ko=G:delete window.ko):(ko=global.ko,typeof G<"u"?global.ko=G:delete global.ko);var s$5="__knockoutObservables",o$5="__knockoutSubscribable";function f$5(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var i=this,n=c$6(e,!0);return(t=t||Object.getOwnPropertyNames(e)).forEach((function(t){if(t!==s$5&&t!==o$5&&!(t in n)){var r=e[t],o=r instanceof Array,a=i.isObservable(r)?r:o?i.observableArray(r):i.observable(r);Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:a,set:i.isWriteableObservable(a)?a:void 0}),n[t]=a,o&&d$6(i,a)}})),e}function c$6(e,t){var i=e[s$5];return!i&&t&&(i={},Object.defineProperty(e,s$5,{value:i})),i}function v$4(e,t,i){var n={owner:e,deferEvaluation:!0};if("function"==typeof i)n.read=i;else{if("value"in i)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof i.get)throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');n.read=i.get,n.write=i.set}return e[t]=this.computed(n),f$5.call(this,e,[t]),e}function d$6(e,t){var i=null;e.computed((function(){i&&(i.dispose(),i=null);var n=t();n instanceof Array&&(i=h$2(e,t,n))}))}function h$2(e,t,i){return y$5(e,i).subscribe(t)}function y$5(e,t){var i=t[o$5];if(!i){i=new e.subscribable,Object.defineProperty(t,o$5,{value:i});var n={};p$1(t,i,n),A$1(e,t,i,n)}return i}function p$1(e,t,i){["pop","push","reverse","shift","sort","splice","unshift"].forEach((function(n){var r=e[n];e[n]=function(){var e=r.apply(this,arguments);return!0!==i.pause&&t.notifySubscribers(this),e}}))}function A$1(e,t,i,n){["remove","removeAll","destroy","destroyAll","replace"].forEach((function(r){Object.defineProperty(t,r,{enumerable:!1,value:function(){var o;n.pause=!0;try{o=e.observableArray.fn[r].apply(e.observableArray(t),arguments)}finally{n.pause=!1}return i.notifySubscribers(t),o}})}))}function b$5(e,t){if(!e)return null;var i=c$6(e,!1);return i&&i[t]||null}function g$5(e,t){var i=b$5(e,t);i&&i.valueHasMutated()}function w$1(e){e.track=f$5,e.getObservable=b$5,e.valueHasMutated=g$5,e.defineProperty=v$4}var t$5={attachToKo:w$1},d$5="http://www.w3.org/2000/svg",v$3="supermap3d-svgPath-svg",g$4={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,i){var n=document.createElementNS(d$5,"svg:svg");n.setAttribute("class",v$3);var r=document.createElementNS(d$5,"path");return n.appendChild(r),e.virtualElements.setDomNodeChildren(t,[n]),e.computed({read:function(){var t=e.unwrap(i());r.setAttribute("d",e.unwrap(t.path));var o=e.unwrap(t.width),a=e.unwrap(t.height);n.setAttribute("width",o),n.setAttribute("height",a),n.setAttribute("viewBox","0 0 "+o+" "+a),t.css&&n.setAttribute("class",v$3+" "+e.unwrap(t.css))},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}};t$5.attachToKo(ce$1),g$4.register(ce$1);var j$5={};!function(){var e=function(){var e={defaultNoDataValue:-34027999387901484e22,decode:function(o,a){var s=(a=a||{}).encodedMaskData||null===a.encodedMaskData,l=r(o,a.inputOffset||0,s),u=null!==a.noDataValue?a.noDataValue:e.defaultNoDataValue,c=t(l,a.pixelType||Float32Array,a.encodedMaskData,u,a.returnMask),h={width:l.width,height:l.height,pixelData:c.resultPixels,minValue:c.minValue,maxValue:l.pixels.maxValue,noDataValue:u};return c.resultMask&&(h.maskData=c.resultMask),a.returnEncodedMask&&l.mask&&(h.encodedMaskData=l.mask.bitset?l.mask.bitset:null),a.returnFileInfo&&(h.fileInfo=i(l),a.computeUsedBitDepths&&(h.fileInfo.bitDepths=n(l))),h}},t=function(e,t,i,n,r){var a,s,l,u=0,c=e.pixels.numBlocksX,h=e.pixels.numBlocksY,d=Math.floor(e.width/c),f=Math.floor(e.height/h),p=2*e.maxZError,_=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),s=new t(e.width*e.height),r&&i&&(l=new Uint8Array(e.width*e.height));for(var m,g,x=new Float32Array(d*f),y=0;y<=h;y++){var v=y!==h?f:e.height%h;if(0!==v)for(var $=0;$<=c;$++){var b=$!==c?d:e.width%c;if(0!==b){var T,C,S,w,E=y*e.width*f+$*d,P=e.width-b,A=e.pixels.blocks[u];if(A.encoding<2?(0===A.encoding?T=A.rawData:(o(A.stuffedData,A.bitsPerPixel,A.numValidPixels,A.offset,p,x,e.pixels.maxValue),T=x),C=0):S=2===A.encoding?0:A.offset,i)for(g=0;g<v;g++){for(7&E&&(w=i[E>>3],w<<=7&E),m=0;m<b;m++)7&E||(w=i[E>>3]),128&w?(l&&(l[E]=1),_=_>(a=A.encoding<2?T[C++]:S)?a:_,s[E++]=a):(l&&(l[E]=0),s[E++]=n),w<<=1;E+=P}else if(A.encoding<2)for(g=0;g<v;g++){for(m=0;m<b;m++)_=_>(a=T[C++])?a:_,s[E++]=a;E+=P}else for(_=_>S?S:_,g=0;g<v;g++){for(m=0;m<b;m++)s[E++]=S;E+=P}if(1===A.encoding&&C!==A.numValidPixels)throw"Block and Mask do not match";u++}}}return{resultPixels:s,resultMask:l,minValue:_}},i=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},n=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,i={},n=0;n<t;n++){var r=e.pixels.blocks[n];0===r.encoding?i.float32=!0:1===r.encoding?i[r.bitsPerPixel]=!0:i[0]=!0}return Object.keys(i)},r=function(e,t,i){var n={},r=new Uint8Array(e,t,10);if(n.fileIdentifierString=String.fromCharCode.apply(null,r),"CntZImage"!==n.fileIdentifierString.trim())throw"Unexpected file identifier string: "+n.fileIdentifierString;t+=10;var o=new DataView(e,t,24);if(n.fileVersion=o.getInt32(0,!0),n.imageType=o.getInt32(4,!0),n.height=o.getUint32(8,!0),n.width=o.getUint32(12,!0),n.maxZError=o.getFloat64(16,!0),t+=24,!i)if(o=new DataView(e,t,16),n.mask={},n.mask.numBlocksY=o.getUint32(0,!0),n.mask.numBlocksX=o.getUint32(4,!0),n.mask.numBytes=o.getUint32(8,!0),n.mask.maxValue=o.getFloat32(12,!0),t+=16,n.mask.numBytes>0){var a=new Uint8Array(Math.ceil(n.width*n.height/8)),s=(o=new DataView(e,t,n.mask.numBytes)).getInt16(0,!0),l=2,u=0;do{if(s>0)for(;s--;)a[u++]=o.getUint8(l++);else{var c=o.getUint8(l++);for(s=-s;s--;)a[u++]=c}s=o.getInt16(l,!0),l+=2}while(l<n.mask.numBytes);if(-32768!==s||u<a.length)throw"Unexpected end of mask RLE encoding";n.mask.bitset=a,t+=n.mask.numBytes}else 0==(n.mask.numBytes|n.mask.numBlocksY|n.mask.maxValue)&&(n.mask.bitset=new Uint8Array(Math.ceil(n.width*n.height/8)));o=new DataView(e,t,16),n.pixels={},n.pixels.numBlocksY=o.getUint32(0,!0),n.pixels.numBlocksX=o.getUint32(4,!0),n.pixels.numBytes=o.getUint32(8,!0),n.pixels.maxValue=o.getFloat32(12,!0),t+=16;var h=n.pixels.numBlocksX,d=n.pixels.numBlocksY,f=h+(n.width%h>0?1:0),p=d+(n.height%d>0?1:0);n.pixels.blocks=new Array(f*p);for(var _=0,m=0;m<p;m++)for(var g=0;g<f;g++){var x=0,y=e.byteLength-t;o=new DataView(e,t,Math.min(10,y));var v={};n.pixels.blocks[_++]=v;var $=o.getUint8(0);if(x++,v.encoding=63&$,v.encoding>3)throw"Invalid block encoding ("+v.encoding+")";if(2!==v.encoding){if(0!==$&&2!==$){if($>>=6,v.offsetType=$,2===$)v.offset=o.getInt8(1),x++;else if(1===$)v.offset=o.getInt16(1,!0),x+=2;else{if(0!==$)throw"Invalid block offset type";v.offset=o.getFloat32(1,!0),x+=4}if(1===v.encoding)if($=o.getUint8(x),x++,v.bitsPerPixel=63&$,$>>=6,v.numValidPixelsType=$,2===$)v.numValidPixels=o.getUint8(x),x++;else if(1===$)v.numValidPixels=o.getUint16(x,!0),x+=2;else{if(0!==$)throw"Invalid valid pixel count type";v.numValidPixels=o.getUint32(x,!0),x+=4}}var b;if(t+=x,3!==v.encoding)if(0===v.encoding){var T=(n.pixels.numBytes-1)/4;if(T!==Math.floor(T))throw"uncompressed block has invalid length";b=new ArrayBuffer(4*T),new Uint8Array(b).set(new Uint8Array(e,t,4*T));var C=new Float32Array(b);v.rawData=C,t+=4*T}else if(1===v.encoding){var S=Math.ceil(v.numValidPixels*v.bitsPerPixel/8),w=Math.ceil(S/4);b=new ArrayBuffer(4*w),new Uint8Array(b).set(new Uint8Array(e,t,S)),v.stuffedData=new Uint32Array(b),t+=S}}else t++}return n.eofOffset=t,n},o=function(e,t,i,n,r,o,a){var s,l,u,c=(1<<t)-1,h=0,d=0,f=Math.ceil((a-n)/r),p=4*e.length-Math.ceil(t*i/8);for(e[e.length-1]<<=8*p,s=0;s<i;s++){if(0===d&&(u=e[h++],d=32),d>=t)l=u>>>d-t&c,d-=t;else{var _=t-d;l=(u&c)<<_&c,l+=(u=e[h++])>>>(d=32-_)}o[s]=l<f?n+l*r:a}return o};return e}(),t=function(){var e=function(e,t,i,n,r,o,a,s){var l,u,c,h,d,f=(1<<i)-1,p=0,_=0,m=4*e.length-Math.ceil(i*n/8);if(e[e.length-1]<<=8*m,r)for(l=0;l<n;l++)0===_&&(c=e[p++],_=32),_>=i?(u=c>>>_-i&f,_-=i):(u=(c&f)<<(h=i-_)&f,u+=(c=e[p++])>>>(_=32-h)),t[l]=r[u];else for(d=Math.ceil((s-o)/a),l=0;l<n;l++)0===_&&(c=e[p++],_=32),_>=i?(u=c>>>_-i&f,_-=i):(u=(c&f)<<(h=i-_)&f,u+=(c=e[p++])>>>(_=32-h)),t[l]=u<d?o+u*a:s},t=function(e,t,i,n,r,o){var a,s=(1<<t)-1,l=0,u=0,c=0,h=0,d=0,f=[],p=4*e.length-Math.ceil(t*i/8);e[e.length-1]<<=8*p;var _=Math.ceil((o-n)/r);for(u=0;u<i;u++)0===h&&(a=e[l++],h=32),h>=t?(d=a>>>h-t&s,h-=t):(d=(a&s)<<(c=t-h)&s,d+=(a=e[l++])>>>(h=32-c)),f[u]=d<_?n+d*r:o;return f.unshift(n),f},i=function(e,t,i,n,r,o,a,s){var l,u,c,h,d=(1<<i)-1,f=0,p=0,_=0;if(r)for(l=0;l<n;l++)0===p&&(c=e[f++],p=32,_=0),p>=i?(u=c>>>_&d,p-=i,_+=i):(u=c>>>_&d,p=32-(h=i-p),u|=((c=e[f++])&(1<<h)-1)<<i-h,_=h),t[l]=r[u];else{var m=Math.ceil((s-o)/a);for(l=0;l<n;l++)0===p&&(c=e[f++],p=32,_=0),p>=i?(u=c>>>_&d,p-=i,_+=i):(u=c>>>_&d,p=32-(h=i-p),u|=((c=e[f++])&(1<<h)-1)<<i-h,_=h),t[l]=u<m?o+u*a:s}return t},n=function(e,t,i,n,r,o){var a,s=(1<<t)-1,l=0,u=0,c=0,h=0,d=0,f=0,p=[],_=Math.ceil((o-n)/r);for(u=0;u<i;u++)0===h&&(a=e[l++],h=32,f=0),h>=t?(d=a>>>f&s,h-=t,f+=t):(d=a>>>f&s,h=32-(c=t-h),d|=((a=e[l++])&(1<<c)-1)<<t-c,f=c),p[u]=d<_?n+d*r:o;return p.unshift(n),p},r=function(e,t,i,n){var r,o,a,s,l=(1<<i)-1,u=0,c=0,h=4*e.length-Math.ceil(i*n/8);for(e[e.length-1]<<=8*h,r=0;r<n;r++)0===c&&(a=e[u++],c=32),c>=i?(o=a>>>c-i&l,c-=i):(o=(a&l)<<(s=i-c)&l,o+=(a=e[u++])>>>(c=32-s)),t[r]=o;return t},o=function(e,t,i,n){var r,o,a,s,l=(1<<i)-1,u=0,c=0,h=0;for(r=0;r<n;r++)0===c&&(a=e[u++],c=32,h=0),c>=i?(o=a>>>h&l,c-=i,h+=i):(o=a>>>h&l,c=32-(s=i-c),o|=((a=e[u++])&(1<<s)-1)<<i-s,h=s),t[r]=o;return t},a={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,i=65535,n=e.length,r=Math.floor(n/2),o=0;r;){var a=r>=359?359:r;r-=a;do{t+=e[o++]<<8,i+=t+=e[o++]}while(--a);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&n&&(i+=t+=e[o]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,n=new Uint8Array(e,i,6),r={};if(r.fileIdentifierString=String.fromCharCode.apply(null,n),0!==r.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+r.fileIdentifierString;i+=6;var o,a=new DataView(e,i,8),s=a.getInt32(0,!0);if(r.fileVersion=s,i+=4,s>=3&&(r.checksum=a.getUint32(4,!0),i+=4),a=new DataView(e,i,12),r.height=a.getUint32(0,!0),r.width=a.getUint32(4,!0),i+=8,s>=4?(r.numDims=a.getUint32(8,!0),i+=4):r.numDims=1,a=new DataView(e,i,40),r.numValidPixel=a.getUint32(0,!0),r.microBlockSize=a.getInt32(4,!0),r.blobSize=a.getInt32(8,!0),r.imageType=a.getInt32(12,!0),r.maxZError=a.getFloat64(16,!0),r.zMin=a.getFloat64(24,!0),r.zMax=a.getFloat64(32,!0),i+=40,t.headerInfo=r,t.ptr=i,s>=3&&(o=s>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-o,r.blobSize-14))!==r.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,n=this.getDataTypeArray(i.imageType),r=i.numDims*this.getDataTypeSize(i.imageType),o=this.readSubArray(e,t.ptr,n,r),a=this.readSubArray(e,t.ptr+r,n,r);t.ptr+=2*r;var s,l=!0;for(s=0;s<i.numDims;s++)if(o[s]!==a[s]){l=!1;break}return i.minValues=o,i.maxValues=a,l},readSubArray:function(e,t,i,n){var r;if(i===Uint8Array)r=new Uint8Array(e,t,n);else{var o=new ArrayBuffer(n);new Uint8Array(o).set(new Uint8Array(e,t,n)),r=new i(o)}return r},readMask:function(e,t){var i,n,r=t.ptr,o=t.headerInfo,a=o.width*o.height,s=o.numValidPixel,l=new DataView(e,r,4),u={};if(u.numBytes=l.getUint32(0,!0),r+=4,(0===s||a===s)&&0!==u.numBytes)throw"invalid mask";if(0===s)i=new Uint8Array(Math.ceil(a/8)),u.bitset=i,n=new Uint8Array(a),t.pixels.resultMask=n,r+=u.numBytes;else if(u.numBytes>0){i=new Uint8Array(Math.ceil(a/8));var c=(l=new DataView(e,r,u.numBytes)).getInt16(0,!0),h=2,d=0,f=0;do{if(c>0)for(;c--;)i[d++]=l.getUint8(h++);else for(f=l.getUint8(h++),c=-c;c--;)i[d++]=f;c=l.getInt16(h,!0),h+=2}while(h<u.numBytes);if(-32768!==c||d<i.length)throw"Unexpected end of mask RLE encoding";n=new Uint8Array(a);var p=0,_=0;for(_=0;_<a;_++)7&_?(p=i[_>>3],p<<=7&_):p=i[_>>3],128&p&&(n[_]=1);t.pixels.resultMask=n,u.bitset=i,r+=u.numBytes}return t.ptr=r,t.mask=u,!0},readDataOneSweep:function(e,t,i){var n,r=t.ptr,o=t.headerInfo,s=o.numDims,l=o.width*o.height,u=o.imageType,c=o.numValidPixel*a.getDataTypeSize(u)*s,h=t.pixels.resultMask;if(i===Uint8Array)n=new Uint8Array(e,r,c);else{var d=new ArrayBuffer(c);new Uint8Array(d).set(new Uint8Array(e,r,c)),n=new i(d)}if(n.length===l*s)t.pixels.resultPixels=n;else{t.pixels.resultPixels=new i(l*s);var f=0,p=0,_=0,m=0;if(s>1)for(_=0;_<s;_++)for(m=_*l,p=0;p<l;p++)h[p]&&(t.pixels.resultPixels[m+p]=n[f++]);else for(p=0;p<l;p++)h[p]&&(t.pixels.resultPixels[p]=n[f++])}return r+=c,t.ptr=r,!0},readHuffmanTree:function(e,t){var i=this.HUFFMAN_LUT_BITS_MAX,n=new DataView(e,t.ptr,16);if(t.ptr+=16,n.getInt32(0,!0)<2)throw"unsupported Huffman version";var r=n.getInt32(4,!0),o=n.getInt32(8,!0),l=n.getInt32(12,!0);if(o>=l)return!1;var u=new Uint32Array(l-o);a.decodeBits(e,t,u);var c,h,d,f,p=[];for(c=o;c<l;c++)p[h=c-(c<r?0:r)]={first:u[c-o],second:null};var _=e.byteLength-t.ptr,m=Math.ceil(_/4),g=new ArrayBuffer(4*m);new Uint8Array(g).set(new Uint8Array(e,t.ptr,_));var x,y=new Uint32Array(g),v=0,$=0;for(x=y[0],c=o;c<l;c++)(f=p[h=c-(c<r?0:r)].first)>0&&(p[h].second=x<<v>>>32-f,32-v>=f?32===(v+=f)&&(v=0,x=y[++$]):(v+=f-32,x=y[++$],p[h].second|=x>>>32-v));var b=0,T=0,C=new s;for(c=0;c<p.length;c++)void 0!==p[c]&&(b=Math.max(b,p[c].first));T=b>=i?i:b,b>=30&&console.log("WARning, large NUM LUT BITS IS "+b);var S,w,E,P,A,L=[];for(c=o;c<l;c++)if((f=p[h=c-(c<r?0:r)].first)>0)if(S=[f,h],f<=T)for(w=p[h].second<<T-f,E=1<<T-f,d=0;d<E;d++)L[w|d]=S;else for(w=p[h].second,A=C,P=f-1;P>=0;P--)w>>>P&1?(A.right||(A.right=new s),A=A.right):(A.left||(A.left=new s),A=A.left),0===P&&!A.val&&(A.val=S[1]);return{decodeLut:L,numBitsLUTQick:T,numBitsLUT:b,tree:C,stuffedData:y,srcPtr:$,bitPos:v}},readHuffman:function(e,t,i){var n,r,o,a,s,l,u,c,h,d=t.headerInfo,f=d.numDims,p=t.headerInfo.height,_=t.headerInfo.width,m=_*p,g=this.readHuffmanTree(e,t),x=g.decodeLut,y=g.tree,v=g.stuffedData,$=g.srcPtr,b=g.bitPos,T=g.numBitsLUTQick,C=g.numBitsLUT,S=0===t.headerInfo.imageType?128:0,w=t.pixels.resultMask,E=0;b>0&&($++,b=0);var P,A=v[$],L=1===t.encodeMode,M=new i(m*f),R=M;for(P=0;P<d.numDims;P++){if(f>1&&(R=new i(M.buffer,m*P,m),E=0),t.headerInfo.numValidPixel===_*p)for(c=0,l=0;l<p;l++)for(u=0;u<_;u++,c++){if(r=0,s=a=A<<b>>>32-T,32-b<T&&(s=a|=v[$+1]>>>64-b-T),x[s])r=x[s][1],b+=x[s][0];else for(s=a=A<<b>>>32-C,32-b<C&&(s=a|=v[$+1]>>>64-b-C),n=y,h=0;h<C;h++)if(!(n=a>>>C-h-1&1?n.right:n.left).left&&!n.right){r=n.val,b=b+h+1;break}b>=32&&(b-=32,A=v[++$]),o=r-S,L?(o+=u>0?E:l>0?R[c-_]:E,o&=255,R[c]=o,E=o):R[c]=o}else for(c=0,l=0;l<p;l++)for(u=0;u<_;u++,c++)if(w[c]){if(r=0,s=a=A<<b>>>32-T,32-b<T&&(s=a|=v[$+1]>>>64-b-T),x[s])r=x[s][1],b+=x[s][0];else for(s=a=A<<b>>>32-C,32-b<C&&(s=a|=v[$+1]>>>64-b-C),n=y,h=0;h<C;h++)if(!(n=a>>>C-h-1&1?n.right:n.left).left&&!n.right){r=n.val,b=b+h+1;break}b>=32&&(b-=32,A=v[++$]),o=r-S,L?(u>0&&w[c-1]?o+=E:l>0&&w[c-_]?o+=R[c-_]:o+=E,o&=255,R[c]=o,E=o):R[c]=o}t.ptr=t.ptr+4*($+1)+(b>0?4:0)}t.pixels.resultPixels=M},decodeBits:function(a,s,l,u,c){var h=s.headerInfo,d=h.fileVersion,f=0,p=a.byteLength-s.ptr>=5?5:a.byteLength-s.ptr,_=new DataView(a,s.ptr,p),m=_.getUint8(0);f++;var g=m>>6,x=0===g?4:3-g,y=(32&m)>0,v=31&m,$=0;if(1===x)$=_.getUint8(f),f++;else if(2===x)$=_.getUint16(f,!0),f+=2;else{if(4!==x)throw"Invalid valid pixel count type";$=_.getUint32(f,!0),f+=4}var b,T,C,S,w,E,P,A,L,M=2*h.maxZError,R=h.numDims>1?h.maxValues[c]:h.zMax;if(y){for(s.counter.lut++,A=_.getUint8(f),f++,S=Math.ceil((A-1)*v/8),w=Math.ceil(S/4),T=new ArrayBuffer(4*w),C=new Uint8Array(T),s.ptr+=f,C.set(new Uint8Array(a,s.ptr,S)),P=new Uint32Array(T),s.ptr+=S,L=0;A-1>>>L;)L++;S=Math.ceil($*L/8),w=Math.ceil(S/4),T=new ArrayBuffer(4*w),(C=new Uint8Array(T)).set(new Uint8Array(a,s.ptr,S)),b=new Uint32Array(T),s.ptr+=S,E=d>=3?n(P,v,A-1,u,M,R):t(P,v,A-1,u,M,R),d>=3?i(b,l,L,$,E):e(b,l,L,$,E)}else s.counter.bitstuffer++,L=v,s.ptr+=f,L>0&&(S=Math.ceil($*L/8),w=Math.ceil(S/4),T=new ArrayBuffer(4*w),(C=new Uint8Array(T)).set(new Uint8Array(a,s.ptr,S)),b=new Uint32Array(T),s.ptr+=S,d>=3?null===u?o(b,l,L,$):i(b,l,L,$,!1,u,M,R):null===u?r(b,l,L,$):e(b,l,L,$,!1,u,M,R))},readTiles:function(e,t,i){var n=t.headerInfo,r=n.width,o=n.height,s=n.microBlockSize,l=n.imageType,u=a.getDataTypeSize(l),c=Math.ceil(r/s),h=Math.ceil(o/s);t.pixels.numBlocksY=h,t.pixels.numBlocksX=c,t.pixels.ptr=0;var d,f,p,_,m,g,x,y,v=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,D=0,I=new i(s*s),F=o%s||s,B=r%s||s,N=n.numDims,G=t.pixels.resultMask,z=t.pixels.resultPixels;for(b=0;b<h;b++)for(C=b!==h-1?s:F,T=0;T<c;T++)for(A=b*r*s+T*s,L=r-(S=T!==c-1?s:B),y=0;y<N;y++){if(N>1&&(z=new i(t.pixels.resultPixels.buffer,r*o*y*u,r*o)),w=e.byteLength-t.ptr,f={},D=0,D++,P=(E=(d=new DataView(e,t.ptr,Math.min(10,w))).getUint8(0))>>6&255,(E>>2&15)!==(T*s>>3&15))throw"integrity issue";if((m=3&E)>3)throw t.ptr+=D,"Invalid block encoding ("+m+")";if(2!==m)if(0===m){if(t.counter.uncompressed++,t.ptr+=D,M=(M=C*S*u)<(R=e.byteLength-t.ptr)?M:R,p=new ArrayBuffer(M%u==0?M:M+u-M%u),new Uint8Array(p).set(new Uint8Array(e,t.ptr,M)),_=new i(p),O=0,G)for(v=0;v<C;v++){for($=0;$<S;$++)G[A]&&(z[A]=_[O++]),A++;A+=L}else for(v=0;v<C;v++){for($=0;$<S;$++)z[A++]=_[O++];A+=L}t.ptr+=O*u}else if(g=a.getDataTypeUsed(l,P),x=a.getOnePixel(f,D,g,d),D+=a.getDataTypeSize(g),3===m)if(t.ptr+=D,t.counter.constantoffset++,G)for(v=0;v<C;v++){for($=0;$<S;$++)G[A]&&(z[A]=x),A++;A+=L}else for(v=0;v<C;v++){for($=0;$<S;$++)z[A++]=x;A+=L}else if(t.ptr+=D,a.decodeBits(e,t,I,x,y),D=0,G)for(v=0;v<C;v++){for($=0;$<S;$++)G[A]&&(z[A]=I[D++]),A++;A+=L}else for(v=0;v<C;v++){for($=0;$<S;$++)z[A++]=I[D++];A+=L}else t.counter.constant++,t.ptr+=D}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:a.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t=e.headerInfo.zMax,i=e.headerInfo.numDims,n=e.headerInfo.height*e.headerInfo.width,r=n*i,o=0,a=0,s=0,l=e.pixels.resultMask;if(l)if(i>1)for(o=0;o<i;o++)for(s=o*n,a=0;a<n;a++)l[a]&&(e.pixels.resultPixels[s+a]=t);else for(a=0;a<n;a++)l[a]&&(e.pixels.resultPixels[a]=t);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(t);else for(a=0;a<r;a++)e.pixels.resultPixels[a]=t},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:default:t=Float32Array;break;case 7:t=Float64Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:default:t="F32";break;case 7:t="F64"}return t},isValidPixelValue:function(e,t){if(null===t)return!1;var i;switch(e){case 0:i=t>=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,n){var r=0;switch(i){case 0:r=n.getInt8(t);break;case 1:r=n.getUint8(t);break;case 2:r=n.getInt16(t,!0);break;case 3:r=n.getUint16(t,!0);break;case 4:r=n.getInt32(t,!0);break;case 5:r=n.getUInt32(t,!0);break;case 6:r=n.getFloat32(t,!0);break;case 7:r=n.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return r}},s=function(e,t,i){this.val=e,this.left=t,this.right=i},l={decode:function(e,t){var i=(t=t||{}).noDataValue,n=0,r={};if(r.ptr=t.inputOffset||0,r.pixels={},a.readHeaderInfo(e,r)){var o=r.headerInfo,s=o.fileVersion,l=a.getDataTypeArray(o.imageType);a.readMask(e,r),o.numValidPixel!==o.width*o.height&&!r.pixels.resultMask&&(r.pixels.resultMask=t.maskData);var u,c=o.width*o.height;if(r.pixels.resultPixels=new l(c*o.numDims),r.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==o.numValidPixel)if(o.zMax===o.zMin)a.constructConstantSurface(r);else if(s>=4&&a.checkMinMaxRanges(e,r))a.constructConstantSurface(r);else{var h=new DataView(e,r.ptr,2),d=h.getUint8(0);if(r.ptr++,d)a.readDataOneSweep(e,r,l);else if(s>1&&o.imageType<=1&&Math.abs(o.maxZError-.5)<1e-5){var f=h.getUint8(1);if(r.ptr++,r.encodeMode=f,f>2||s<4&&f>1)throw"Invalid Huffman flag "+f;f?a.readHuffman(e,r,l):a.readTiles(e,r,l)}else a.readTiles(e,r,l)}r.eofOffset=r.ptr,t.inputOffset?(u=r.headerInfo.blobSize+t.inputOffset-r.ptr,Math.abs(u)>=1&&(r.eofOffset=t.inputOffset+r.headerInfo.blobSize)):(u=r.headerInfo.blobSize-r.ptr,Math.abs(u)>=1&&(r.eofOffset=r.headerInfo.blobSize));var p={width:o.width,height:o.height,pixelData:r.pixels.resultPixels,minValue:o.zMin,maxValue:o.zMax,validPixelCount:o.numValidPixel,dimCount:o.numDims,dimStats:{minValues:o.minValues,maxValues:o.maxValues},maskData:r.pixels.resultMask};if(r.pixels.resultMask&&a.isValidPixelValue(o.imageType,i)){var _=r.pixels.resultMask;for(n=0;n<c;n++)_[n]||(p.pixelData[n]=i);p.noDataValue=i}return r.noDataValue=i,t.returnFileInfo&&(p.fileInfo=a.formatFileInfo(r)),p}},getBandCount:function(e){for(var t=0,i=0,n={ptr:0,pixels:{}};i<e.byteLength-58;)a.readHeaderInfo(e,n),i+=n.headerInfo.blobSize,t++,n.ptr=i;return t}};return l}(),i=function(){var e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]}(),n={decode:function(n,r){if(!i)throw"Big endian system is not supported.";var o,a,s,l,u,c=(r=r||{}).inputOffset||0,h=new Uint8Array(n,c,10),d=String.fromCharCode.apply(null,h);if("CntZImage"===d.trim())o=e,a=1;else{if("Lerc2"!==d.substring(0,5))throw"Unexpected file identifier string: "+d;o=t,a=2}for(var f,p,_,m=0,g=n.byteLength-10,x=[],y={width:0,height:0,pixels:[],pixelType:r.pixelType,mask:null,statistics:[]};c<g;){var v=o.decode(n,{inputOffset:c,encodedMaskData:f,maskData:_,returnMask:0===m,returnEncodedMask:0===m,returnFileInfo:!0,pixelType:r.pixelType||null,noDataValue:r.noDataValue||null});c=v.fileInfo.eofOffset,0===m&&(f=v.encodedMaskData,_=v.maskData,y.width=v.width,y.height=v.height,y.dimCount=v.dimCount||1,y.pixelType=v.pixelType||v.fileInfo.pixelType,y.mask=v.maskData),a>1&&v.fileInfo.mask&&v.fileInfo.mask.numBytes>0&&x.push(v.maskData),m++,y.pixels.push(v.pixelData),y.statistics.push({minValue:v.minValue,maxValue:v.maxValue,noDataValue:v.noDataValue,dimStats:v.dimStats})}if(a>1&&x.length>1){for(u=y.width*y.height,y.bandMasks=x,(_=new Uint8Array(u)).set(x[0]),s=1;s<x.length;s++)for(p=x[s],l=0;l<u;l++)_[l]=_[l]&p[l];y.maskData=_}return y}};j$5.Lerc=n}();var LercDecode=j$5.Lerc,V$1=function(){var e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if("object"!=typeof WebAssembly)return{supported:!1};var i="B9h79tEBBBE8fV9gBB9gVUUUUUEU9gIUUUB9gEUEU9gIUUUEUIKQBEEEDDDILLLVE9wEEEVIEBEOWEUEC+Q/IEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBEy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBDe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBIl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBLk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBOL79iv9rBRQ+x8yQDBK/qMEZU8jJJJJBCJ/EB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rADZ1JJJBHWCJ/ABAD9uC/wfBgGOCJDAOCJD6eHdAICEFHLCBHQDNINAQAE9PMEAdAEAQ9rAQAdFAE6eHKDNDNADtMBAKCSFGOC9wgHXAOCL4CIFCD4HMAWCJDFHpCBHSALHZINDNARAZ9rAM9PMBCBHLXIKAZAMFHLDNAXtMBCBHhCBHIINDNARAL9rCk9PMBCBHLXVKAWCJ/CBFAIFHODNDNDNDNDNAZAICO4FrBBAhCOg4CIgpLBEDIBKAO9CB83IBAOCWF9CB83IBXIKAOALrBLALrBBGoCO4GaAaCIsGae86BBAOCEFALCLFAaFGarBBAoCL4CIgGcAcCIsGce86BBAOCDFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCIFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCLFAaAoFGarBBALrBEGoCO4GcAcCIsGce86BBAOCVFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCOFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCRFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCWFAaAoFGarBBALrBDGoCO4GcAcCIsGce86BBAOCdFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCQFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCKFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCXFAaAoFGorBBALrBIGLCO4GaAaCIsGae86BBAOCMFAoAaFGorBBALCL4CIgGaAaCIsGae86BBAOCpFAoAaFGorBBALCD4CIgGaAaCIsGae86BBAOCSFAoAaFGOrBBALCIgGLALCIsGLe86BBAOALFHLXDKAOALrBWALrBBGoCL4GaAaCSsGae86BBAOCEFALCWFAaFGarBBAoCSgGoAoCSsGoe86BBAOCDFAaAoFGorBBALrBEGaCL4GcAcCSsGce86BBAOCIFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCLFAoAaFGorBBALrBDGaCL4GcAcCSsGce86BBAOCVFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCOFAoAaFGorBBALrBIGaCL4GcAcCSsGce86BBAOCRFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCWFAoAaFGorBBALrBLGaCL4GcAcCSsGce86BBAOCdFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCQFAoAaFGorBBALrBVGaCL4GcAcCSsGce86BBAOCKFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCXFAoAaFGorBBALrBOGaCL4GcAcCSsGce86BBAOCMFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCpFAoAaFGorBBALrBRGLCL4GaAaCSsGae86BBAOCSFAoAaFGOrBBALCSgGLALCSsGLe86BBAOALFHLXEKAOAL8pBB83BBAOCWFALCWF8pBB83BBALCZFHLKAhCDFHhAICZFGIAX6MBKKDNALMBCBHLXIKDNAKtMBAWASFrBBHhCBHOApHIINAIAWCJ/CBFAOFrBBGZCE4CBAZCEg9r7AhFGh86BBAIADFHIAOCEFGOAK9HMBKKApCEFHpALHZASCEFGSAD9HMBKKABAQAD2FAWCJDFAKAD2Z1JJJB8aAWAWCJDFAKCUFAD2FADZ1JJJB8aKAKCBALeAQFHQALMBKC9+HOXEKCBC99ARAL9rADCAADCA0eseHOKAVCJ/EBF8kJJJJBAOK+OoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJEZ+JJJJB8aAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK+lVOEUE99DUD99EUD99DNDNADCL9HMBAEtMEINDNDNjBBBzjBBB+/ABCDFGD8sBB+yAB8sBBGI+yGL+L+TABCEFGV8sBBGO+yGR+L+TGWjBBBB9gGdeAWjBB/+9CAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI86BBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD86BBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD86BBABCLFHBAECUFGEMBXDKKAEtMBINDNDNjBBBzjBBB+/ABCLFGD8uEB+yAB8uEBGI+yGL+L+TABCDFGV8uEBGO+yGR+L+TGWjBBBB9gGdeAWjB/+fsAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI87EBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD87EBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD87EBABCWFHBAECUFGEMBKKK/SILIUI99IUE99DNAEtMBCBHIABHLINDNDNj/zL81zALCOF8uEBGVCIv+y+VGOAL8uEB+ynGRjB/+fsnjBBBzjBBB+/ARjBBBB9gemGW+LjBBB9P9dtMBAW+oHdXEKCJJJJ94HdKALCLF8uEBHQALCDF8uEBHKABAVCEFCIgAIvCETFAd87EBDNDNAOAK+ynGWjB/+fsnjBBBzjBBB+/AWjBBBB9gemGX+LjBBB9P9dtMBAX+oHKXEKCJJJJ94HKKABAVCDFCIgAIvCETFAK87EBDNDNAOAQ+ynGOjB/+fsnjBBBzjBBB+/AOjBBBB9gemGX+LjBBB9P9dtMBAX+oHQXEKCJJJJ94HQKABAVCUFCIgAIvCETFAQ87EBDNDNjBBJzARARn+TAWAWn+TAOAOn+TGRjBBBBARjBBBB9ge+RjB/+fsnjBBBzmGR+LjBBB9P9dtMBAR+oHQXEKCJJJJ94HQKABAVCIgAIvCETFAQ87EBALCWFHLAICLFHIAECUFGEMBKKK6BDNADCD4AE2GEtMBINABABYDBGDCWTCW91+yADCk91ClTCJJJ/8IF++nuDBABCLFHBAECUFGEMBKKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABKKKEBCJWKLZ9kBB";WebAssembly.validate(e)&&(i="B9h79tEBBBE5V9gBB9gVUUUUUEU9gIUUUB9gDUUB9gEUEUIMXBBEBEEDIDIDLLVE9wEEEVIEBEOWEUEC+Q/aEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBDy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBLe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBOk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBWl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBQL79iv9rBKQ/j6XLBZIK9+EVU8jJJJJBCZ9rHBCBHEINCBHDCBHIINABCWFADFAICJUAEAD4CEgGLe86BBAIALFHIADCEFGDCW9HMBKAEC+Q+YJJBFAI86BBAECITC+Q1JJBFAB8pIW83IBAECEFGECJD9HMBKK1HLSUD97EUO978jJJJJBCJ/KB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rAD/8QBBCJ/ABAD9uC/wfBgGOCJDAOCJD6eHWAICEFHOCBHdDNINAdAE9PMEAWAEAd9rAdAWFAE6eHQDNDNADtMBAQCSFGLC9wgGKCI2HXAKCETHMALCL4CIFCD4HpCBHSINAOHZCBHhDNINDNARAZ9rAp9PMBCBHOXVKAVCJ/CBFAhAK2FHoAZApFHOCBHIDNAKC/AB6MBARAO9rC/gB6MBCBHLINAoALFHIDNDNDNDNDNAZALCO4FrBBGaCIgpLBEDIBKAICBPhPKLBXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLBAOCZFHOKDNDNDNDNDNAaCD4CIgpLBEDIBKAICBPhPKLZXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLZAOCZFHOKDNDNDNDNDNAaCL4CIgpLBEDIBKAICBPhPKLAXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLAAOCZFHOKDNDNDNDNDNAaCO4pLBEDIBKAICBPhPKL8wXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCLFAlPqBFAaC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCWFAlPqBFAaC+Q+YJJBFrBBFHOXEKAIAOPBBBPKL8wAOCZFHOKALC/ABFHIALCJEFAK0MEAIHLARAO9rC/fB0MBKKDNAIAK9PMBAICI4HLINDNARAO9rCk9PMBCBHOXRKAoAIFHaDNDNDNDNDNAZAICO4FrBBALCOg4CIgpLBEDIBKAaCBPhPKLBXIKAaAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAaAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAaAOPBBBPKLBAOCZFHOKALCDFHLAICZFGIAK6MBKKDNAOtMBAOHZAhCEFGhCLsMDXEKKCBHOXIKDNAKtMBAVCJDFASFHIAVASFPBDBHlCBHaINAIAVCJ/CBFAaFGLPBLBGxCEP9tAxCEPSGcP9OP9hP9RGxALAKFPBLBGkCEP9tAkAcP9OP9hP9RGkPMBZEhDoIaLcVxOqRlGyALAMFPBLBG8aCEP9tA8aAcP9OP9hP9RG8aALAXFPBLBGeCEP9tAeAcP9OP9hP9RGePMBZEhDoIaLcVxOqRlG3PMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIAlP9uGlPeBbDBAIADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAyA3PMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWkdyQ8aKeX3M5p8eS8fGxA8aAePMWkdyQ8aKeX3M5p8eS8fGkPMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFHIAaCZFGaAK6MBKKASCLFGSAD6MBKKABAdAD2FAVCJDFAQAD2/8QBBAVAVCJDFAQCUFAD2FAD/8QBBKAQCBAOeAdFHdAOMBKC9+HOXEKCBC99ARAO9rADCAADCA0eseHOKAVCJ/KBF8kJJJJBAOKWBZ+BJJJBK+KoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJE/8KBAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK/xVDIUO978jJJJJBCA9rGI8kJJJJBDNDNADCL9HMBDNAEC98gGLtMBABHDCBHVINADADPBBBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKBBADCZFHDAVCLFGVAL6MBKKALAE9PMEAIAECIgGVCDTGDvCBCZAD9r/8KBAIABALCDTFGLAD/8QBBDNAVtMBAIAIPBLBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKLBKALAIAD/8QBBXEKABAEC98gGDZ+HJJJBADAE9PMBAIAECIgGLCITGVFCBCAAV9r/8KBAIABADCITFGDAV/8QBBAIALZ+HJJJBADAIAV/8QBBKAICAF8kJJJJBK+yIDDUR97DNAEtMBCBHDINABCZFGIAIPBBBGLCBPhGVCJJ98P3ECJJ98P3IGOP9OABPBBBGRALPMLVORXMpScxql358e8fCffEPhP9OP/6EARALPMBEDIWdQKZhoaky8aeGLCZP+sEP/6EGWP/gEALCZP+rECZP+sEP/6EGdP/gEP/kEP/lEGLjB/+fsPaAdALAVP+2EGVAdCJJJJ94PhGQP9OP9RP/kEGdAdP/mEALALP/mEAWAVAWAQP9OP9RP/kEGLALP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGVP/kECZP+rEAdAWP/mEAVP/kECffIPhP9OP9QGdALAWP/mEAVP/kECUPSCBPlDCBPlICBPlOCBPlRCBPlQCBPlKCBPlpCBPlSP9OGLPMWdkyQK8aeXM35pS8e8fP9QPKBBABARAOP9OAdALPMBEZhDIoaLVcxORqlP9QPKBBABCAFHBADCLFGDAE6MBKKK94EIU8jJJJJBCA9rGI8kJJJJBABAEC98gGLZ+JJJJBDNALAE9PMBAIAECIgGVCITGEFCBCAAE9r/8KBAIABALCITFGBAE/8QBBAIAVZ+JJJJBABAIAE/8QBBKAICAF8kJJJJBK/hILDUE97EUV978jJJJJBCZ9rHDDNAEtMBCBHIINADABPBBBGLABCZFGVPBBBGOPMLVORXMpScxql358e8fGRCZP+sEGWCLP+rEPKLBABjBBJzPaj/zL81zPaAWCIPhP9QP/6EP/nEGWALAOPMBEDIWdQKZhoaky8aeGLCZP+rECZP+sEP/6EP/mEGOAOP/mEAWALCZP+sEP/6EP/mEGdAdP/mEAWARCZP+rECZP+sEP/6EP/mEGRARP/mEP/kEP/kEP/lECBPhP+4EP/jEjB/+fsPaGWP/mEjBBN0PaGLP/kECffIPhGQP9OAdAWP/mEALP/kECZP+rEP9QGdARAWP/mEALP/kECZP+rEAOAWP/mEALP/kEAQP9OP9QGWPMBEZhDIoaLVcxORqlGLP5BADPBLBPeB+t+J83IBABCWFALP5EADPBLBPeE+t+J83IBAVAdAWPMWdkyQK8aeXM35pS8e8fGWP5BADPBLBPeD+t+J83IBABCkFAWP5EADPBLBPeI+t+J83IBABCAFHBAICLFGIAE6MBKKK/3EDIUE978jJJJJBC/AB9rHIDNADCD4AE2GLC98gGVtMBCBHDABHEINAEAEPBBBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKBBAECZFHEADCLFGDAV6MBKKDNAVAL9PMBAIALCIgGDCDTGEvCBC/ABAE9r/8KBAIABAVCDTFGVAE/8QBBDNADtMBAIAIPBLBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKLBKAVAIAE/8QBBKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIKKKEBCJWKLZ9tBB");var n,r=WebAssembly.instantiate(function(e){for(var i=new Uint8Array(e.length),n=0;n<e.length;++n){var r=e.charCodeAt(n);i[n]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}var o=0;for(n=0;n<e.length;++n)i[o++]=i[n]<60?t[i[n]]:64*(i[n]-60)+i[++n];return i.buffer.slice(0,o)}(i),{}).then((function(e){(n=e.instance).exports.__wasm_call_ctors()}));function o(e,t,i,r,o,a){var s=n.exports.sbrk,l=i+3&-4,u=s(l*r),c=s(o.length),h=new Uint8Array(n.exports.memory.buffer);h.set(o,c);var d=e(u,i,r,c,o.length);if(0==d&&a&&a(u,l,r),t.set(h.subarray(u,u+i*r)),s(u-s(0)),0!=d)throw new Error("Malformed buffer data: "+d)}var a={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},s={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return{ready:r,supported:!0,decodeVertexBuffer:function(e,t,i,r,s){o(n.exports.meshopt_decodeVertexBuffer,e,t,i,r,n.exports[a[s]])},decodeIndexBuffer:function(e,t,i,r){o(n.exports.meshopt_decodeIndexBuffer,e,t,i,r)},decodeIndexSequence:function(e,t,i,r){o(n.exports.meshopt_decodeIndexSequence,e,t,i,r)},decodeGltfBuffer:function(e,t,i,r,l,u){o(n.exports[s[l]],e,t,i,r,n.exports[a[u]])}}}(),C$3={};C$3.NoSleep=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=i(1),a=o.webm,s=o.mp4,l=typeof navigator<"u"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,u=function(){function e(){var t=this;r(this,e),l?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("muted",""),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",a),this._addSourceToVideo(this.noSleepVideo,"mp4",s),this.noSleepVideo.addEventListener("loadedmetadata",(function(){t.noSleepVideo.duration<=1?t.noSleepVideo.setAttribute("loop",""):t.noSleepVideo.addEventListener("timeupdate",(function(){t.noSleepVideo.currentTime>.5&&(t.noSleepVideo.currentTime=Math.random())}))})))}return n(e,[{key:"_addSourceToVideo",value:function(e,t,i){var n=document.createElement("source");n.src=i,n.type="video/"+t,e.appendChild(n)}},{key:"enable",value:function(){l?(this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n .\n "),this.noSleepTimer=window.setInterval((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3)):this.noSleepVideo.play()}},{key:"disable",value:function(){l?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),e}();e.exports=u},function(e,t,i){e.exports={webm:"data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA=",mp4:"data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}}]);var b$4=C$3.NoSleep;function t$4(){}t$4.array={},t$4.array.binarySearch=function(e,t,i){for(var n,r,o=i||t$4.array.numberSafeCompareFunction,a=0,s=e.length,l=!1;a<s;)(r=+o(e[n=a+(s-a>>1)],t))<0?a=n+1:(s=n,l=!r);return l?a:~a},t$4.array.numberSafeCompareFunction=function(e,t){return e>t?1:e<t?-1:0},t$4.array.includes=function(e,t){return e.indexOf(t)>=0},t$4.array.linearFindNearest=function(e,t,i){var n,r=e.length;if(e[0]<=t)return 0;if(t<=e[r-1])return r-1;if(i>0){for(n=1;n<r;++n)if(e[n]<t)return n-1}else if(i<0){for(n=1;n<r;++n)if(e[n]<=t)return n}else for(n=1;n<r;++n){if(e[n]==t)return n;if(e[n]<t)return e[n-1]-t<t-e[n]?n-1:n}return r-1},t$4.array.reverseSubArray=function(e,t,i){for(;t<i;){var n=e[t];e[t]=e[i],e[i]=n,++t,--i}},t$4.array.extend=function(e,t){var i,n=Array.isArray(t)?t:[t],r=n.length;for(i=0;i<r;i++)e[e.length]=n[i]},t$4.array.remove=function(e,t){var i=e.indexOf(t),n=i>-1;return n&&e.splice(i,1),n},t$4.array.find=function(e,t){for(var i,n=e.length>>>0,r=0;r<n;r++)if(t(i=e[r],r,e))return i;return null},t$4.array.equals=function(e,t){var i=e.length;if(i!==t.length)return!1;for(var n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0},t$4.array.stableSort=function(e,t){var i,n=e.length,r=Array(e.length);for(i=0;i<n;i++)r[i]={index:i,value:e[i]};for(r.sort((function(e,i){return t(e.value,i.value)||e.index-i.index})),i=0;i<e.length;i++)e[i]=r[i].value},t$4.array.findIndex=function(e,t){var i,n=!e.every((function(n,r){return i=r,!t(n,r,e)}));return n?i:-1},t$4.array.isSorted=function(e,t,i){var n=t||t$4.array.numberSafeCompareFunction;return e.every((function(t,r){if(0===r)return!0;var o=n(e[r-1],t);return!(o>0||i&&0===o)}))},t$4.ASSUME_TOUCH=!1,t$4.DEFAULT_MAX_ZOOM=42,t$4.DEFAULT_MIN_ZOOM=0,t$4.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD=.5,t$4.DEFAULT_TILE_SIZE=256,t$4.DEFAULT_WMS_VERSION="1.3.0",t$4.ENABLE_CANVAS=!0,t$4.ENABLE_PROJ4JS=!0,t$4.ENABLE_RASTER_REPROJECTION=!0,t$4.ENABLE_WEBGL=!0,t$4.DEBUG_WEBGL=!0,t$4.INITIAL_ATLAS_SIZE=256,t$4.MAX_ATLAS_SIZE=-1,t$4.MOUSEWHEELZOOM_MAXDELTA=1,t$4.OVERVIEWMAP_MAX_RATIO=.75,t$4.OVERVIEWMAP_MIN_RATIO=.1,t$4.RASTER_REPROJECTION_MAX_SOURCE_TILES=100,t$4.RASTER_REPROJECTION_MAX_SUBDIVISION=10,t$4.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH=.25,t$4.SIMPLIFY_TOLERANCE=.5,t$4.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK=1024,t$4.VERSION="",t$4.inherits=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},t$4.nullFunction=function(){},t$4.getUid=function(e){return e.ol_uid||(e.ol_uid=++t$4.uidCounter_)},t$4.asserts={},t$4.asserts.assert=function(e,t){},t$4.has={};var U$2=typeof navigator<"u"?navigator.userAgent.toLowerCase():"";function r$a(e){e$2e(e)||(e=new u$H),this._clock=e,this._eventHelper=new n$x,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=ce$1.observable(a$15.now()),this.systemTime.equalityComparer=a$15.equals,this.startTime=ce$1.observable(e.startTime),this.startTime.equalityComparer=a$15.equals,this.startTime.subscribe((function(t){e.startTime=t,this.synchronize()}),this),this.stopTime=ce$1.observable(e.stopTime),this.stopTime.equalityComparer=a$15.equals,this.stopTime.subscribe((function(t){e.stopTime=t,this.synchronize()}),this),this.currentTime=ce$1.observable(e.currentTime),this.currentTime.equalityComparer=a$15.equals,this.currentTime.subscribe((function(t){e.currentTime=t,this.synchronize()}),this),this.multiplier=ce$1.observable(e.multiplier),this.multiplier.subscribe((function(t){e.multiplier=t,this.synchronize()}),this),this.clockStep=ce$1.observable(e.clockStep),this.clockStep.subscribe((function(t){e.clockStep=t,this.synchronize()}),this),this.clockRange=ce$1.observable(e.clockRange),this.clockRange.subscribe((function(t){e.clockRange=t,this.synchronize()}),this),this.canAnimate=ce$1.observable(e.canAnimate),this.canAnimate.subscribe((function(t){e.canAnimate=t,this.synchronize()}),this),this.shouldAnimate=ce$1.observable(e.shouldAnimate),this.shouldAnimate.subscribe((function(t){e.shouldAnimate=t,this.synchronize()}),this),ce$1.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}function t$3(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,t$15.throwInstantiationError()}function s$4(e,t){if(!e$2e(e))throw new t$15("func is required.");t=u$Z(t,!0);var i=new o$1h,n=new o$1h;function r(){if(!r.canExecute)throw new t$15("Cannot execute command, canExecute is false.");var t,o={args:arguments,cancel:!1};return i.raiseEvent(o),o.cancel||(t=e.apply(null,arguments),n.raiseEvent(t)),t}return r.canExecute=t,ce$1.track(r,["canExecute"]),Object.defineProperties(r,{beforeExecute:{value:i},afterExecute:{value:n}}),r}t$4.has.FIREFOX=-1!==U$2.indexOf("firefox"),t$4.has.SAFARI=-1!==U$2.indexOf("safari")&&-1==U$2.indexOf("chrom"),t$4.has.WEBKIT=-1!==U$2.indexOf("webkit")&&-1==U$2.indexOf("edge"),t$4.has.MAC=-1!==U$2.indexOf("macintosh"),t$4.has.DEVICE_PIXEL_RATIO=1,t$4.has.CANVAS_LINE_DASH=!0,t$4.structs={},t$4.CollectionEventType={ADD:"add",REMOVE:"remove"},t$4.ObjectEventType={PROPERTYCHANGE:"propertychange"},t$4.events={},t$4.events.bindListener_=function(e){var t=function(t){var i=e.listener,n=e.bindTo||e.target;return e.callOnce&&t$4.events.unlistenByKey(e),i.call(n,t)};return e.boundListener=t,t},t$4.events.findListener_=function(e,t,i,n){for(var r,o=0,a=e.length;o<a;++o)if((r=e[o]).listener===t&&r.bindTo===i)return n&&(r.deleteIndex=o),r},t$4.events.getListeners=function(e,t){var i=e.ol_lm;return i?i[t]:void 0},t$4.events.getListenerMap_=function(e){var t=e.ol_lm;return t||(t=e.ol_lm={}),t},t$4.events.removeListeners_=function(e,t){var i=t$4.events.getListeners(e,t);if(i){for(var n=0,r=i.length;n<r;++n)e.removeEventListener(t,i[n].boundListener),t$4.obj.clear(i[n]);i.length=0;var o=e.ol_lm;o&&(delete o[t],0===Object.keys(o).length&&delete e.ol_lm)}},t$4.events.listen=function(e,t,i,n,r){var o=t$4.events.getListenerMap_(e),a=o[t];a||(a=o[t]=[]);var s=t$4.events.findListener_(a,i,n,!1);return s?r||(s.callOnce=!1):(s={bindTo:n,callOnce:!!r,listener:i,target:e,type:t},e.addEventListener(t,t$4.events.bindListener_(s)),a.push(s)),s},t$4.events.listenOnce=function(e,t,i,n){return t$4.events.listen(e,t,i,n,!0)},t$4.events.unlisten=function(e,t,i,n){var r=t$4.events.getListeners(e,t);if(r){var o=t$4.events.findListener_(r,i,n,!0);o&&t$4.events.unlistenByKey(o)}},t$4.events.unlistenByKey=function(e){if(e&&e.target){e.target.removeEventListener(e.type,e.boundListener);var t=t$4.events.getListeners(e.target,e.type);if(t){var i="deleteIndex"in e?e.deleteIndex:t.indexOf(e);-1!==i&&t.splice(i,1),0===t.length&&t$4.events.removeListeners_(e.target,e.type)}t$4.obj.clear(e)}},t$4.events.unlistenAll=function(e){var t=t$4.events.getListenerMap_(e);for(var i in t)t$4.events.removeListeners_(e,i)},t$4.Disposable=function(){},t$4.Disposable.prototype.disposed_=!1,t$4.Disposable.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())},t$4.Disposable.prototype.disposeInternal=t$4.nullFunction,t$4.events.Event={},t$4.events.Event=function(e){this.propagationStopped,this.type=e,this.target=null},t$4.events.Event.prototype.preventDefault=t$4.events.Event.prototype.stopPropagation=function(){this.propagationStopped=!0},t$4.events.Event.stopPropagation=function(e){e.stopPropagation()},t$4.events.Event.preventDefault=function(e){e.preventDefault()},t$4.events.EventTarget={},t$4.events.EventTarget=function(){t$4.Disposable.call(this),this.pendingRemovals_={},this.dispatching_={},this.listeners_={}},t$4.inherits(t$4.events.EventTarget,t$4.Disposable),t$4.events.EventTarget.prototype.addEventListener=function(e,t){var i=this.listeners_[e];i||(i=this.listeners_[e]=[]),-1===i.indexOf(t)&&i.push(t)},t$4.events.EventTarget.prototype.dispatchEvent=function(e){var t="string"==typeof e?new t$4.events.Event(e):e,i=t.type;t.target=this;var n,r=this.listeners_[i];if(r){i in this.dispatching_||(this.dispatching_[i]=0,this.pendingRemovals_[i]=0),++this.dispatching_[i];for(var o=0,a=r.length;o<a;++o)if(!1===r[o].call(this,t)||t.propagationStopped){n=!1;break}if(--this.dispatching_[i],0===this.dispatching_[i]){var s=this.pendingRemovals_[i];for(delete this.pendingRemovals_[i];s--;)this.removeEventListener(i,t$4.nullFunction);delete this.dispatching_[i]}return n}},t$4.events.EventTarget.prototype.disposeInternal=function(){t$4.events.unlistenAll(this)},t$4.events.EventTarget.prototype.getListeners=function(e){return this.listeners_[e]},t$4.events.EventTarget.prototype.hasListener=function(e){return e?e in this.listeners_:Object.keys(this.listeners_).length>0},t$4.events.EventTarget.prototype.removeEventListener=function(e,t){var i=this.listeners_[e];if(i){var n=i.indexOf(t);e in this.pendingRemovals_?(i[n]=t$4.nullFunction,++this.pendingRemovals_[e]):(i.splice(n,1),0===i.length&&delete this.listeners_[e])}},t$4.events.EventType={CHANGE:"change",CLEAR:"clear",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",ERROR:"error",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",MOUSEDOWN:"mousedown",MOUSEMOVE:"mousemove",MOUSEOUT:"mouseout",MOUSEUP:"mouseup",MOUSEWHEEL:"mousewheel",MSPOINTERDOWN:"MSPointerDown",RESIZE:"resize",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",WHEEL:"wheel"},t$4.Observable=function(){this.revision_=0},t$4.inherits(t$4.Observable,t$4.events.EventTarget),t$4.Observable.unByKey=function(e){if(Array.isArray(e))for(var t=0,i=e.length;t<i;++t)t$4.events.unlistenByKey(e[t]);else t$4.events.unlistenByKey(e)},t$4.Observable.prototype.changed=function(){++this.revision_},t$4.Observable.prototype.dispatchEvent,t$4.Observable.prototype.getRevision=function(){return this.revision_},t$4.Observable.prototype.on=function(e,t,i){if(Array.isArray(e)){for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=t$4.events.listen(this,e[o],t,i);return r}return t$4.events.listen(this,e,t,i)},t$4.Observable.prototype.once=function(e,t,i){if(Array.isArray(e)){for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=t$4.events.listenOnce(this,e[o],t,i);return r}return t$4.events.listenOnce(this,e,t,i)},t$4.Observable.prototype.un=function(e,t,i){if(Array.isArray(e))for(var n=0,r=e.length;n<r;++n)t$4.events.unlisten(this,e[n],t,i);else t$4.events.unlisten(this,e,t,i)},t$4.uidCounter_=0,t$4.Object=function(e){t$4.Observable.call(this),t$4.getUid(this),this.values_={},void 0!==e&&this.setProperties(e)},t$4.inherits(t$4.Object,t$4.Observable),t$4.Object.changeEventTypeCache_={},t$4.Object.getChangeEventType=function(e){return t$4.Object.changeEventTypeCache_.hasOwnProperty(e)?t$4.Object.changeEventTypeCache_[e]:t$4.Object.changeEventTypeCache_[e]="change:"+e},t$4.Object.prototype.get=function(e){var t;return this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t},t$4.Object.prototype.getKeys=function(){return Object.keys(this.values_)},t$4.Object.prototype.getProperties=function(){return t$4.obj.assign({},this.values_)},t$4.Object.prototype.notify=function(e,t){},t$4.Object.prototype.set=function(e,t,i){if(i)this.values_[e]=t;else{var n=this.values_[e];this.values_[e]=t,n!==t&&this.notify(e,n)}},t$4.Object.prototype.setProperties=function(e,t){var i;for(i in e)this.set(i,e[i],t)},t$4.Object.prototype.unset=function(e,t){if(e in this.values_){var i=this.values_[e];delete this.values_[e],t||this.notify(e,i)}},t$4.Object.Event=function(e,t,i){t$4.events.Event.call(this,e),this.key=t,this.oldValue=i},t$4.inherits(t$4.Object.Event,t$4.events.Event),t$4.functions={},t$4.functions.TRUE=function(){return!0},t$4.functions.FALSE=function(){return!1},t$4.math={},t$4.math.clamp=function(e,t,i){return Math.min(Math.max(e,t),i)},t$4.math.cosh=function(){var e;return e="cosh"in Math?Math.cosh:function(e){var t=Math.exp(e);return(t+1/t)/2},e}(),t$4.math.roundUpToPowerOfTwo=function(e){return t$4.asserts.assert(0<e,29),Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},t$4.math.squaredSegmentDistance=function(e,t,i,n,r,o){var a=r-i,s=o-n;if(0!==a||0!==s){var l=((e-i)*a+(t-n)*s)/(a*a+s*s);l>1?(i=r,n=o):l>0&&(i+=a*l,n+=s*l)}return t$4.math.squaredDistance(e,t,i,n)},t$4.math.squaredDistance=function(e,t,i,n){var r=i-e,o=n-t;return r*r+o*o},t$4.math.solveLinearSystem=function(e){for(var t=e.length,i=0;i<t;i++){for(var n=i,r=Math.abs(e[i][i]),o=i+1;o<t;o++){var a=Math.abs(e[o][i]);a>r&&(r=a,n=o)}if(0===r)return null;var s=e[n];e[n]=e[i],e[i]=s;for(var l=i+1;l<t;l++)for(var u=-e[l][i]/e[i][i],c=i;c<t+1;c++)i==c?e[l][c]=0:e[l][c]+=u*e[i][c]}for(var h=new Array(t),d=t-1;d>=0;d--){h[d]=e[d][t]/e[d][d];for(var f=d-1;f>=0;f--)e[f][t]-=e[f][d]*h[d]}return h},t$4.math.toDegrees=function(e){return 180*e/Math.PI},t$4.math.toRadians=function(e){return e*Math.PI/180},t$4.math.modulo=function(e,t){var i=e%t;return i*t<0?i+t:i},t$4.math.lerp=function(e,t,i){return e+i*(t-e)},t$4.ImageState={IDLE:0,LOADING:1,LOADED:2,ERROR:3},t$4.color={},t$4.color.HEX_COLOR_RE_=/^#(?:[0-9a-f]{3,4}){1,2}$/i,t$4.color.NAMED_COLOR_RE_=/^([a-z]*)$/i,t$4.color.asArray=function(e){return Array.isArray(e)?e:t$4.color.fromString(e)},t$4.color.asString=function(e){return"string"==typeof e?e:t$4.color.toString(e)},t$4.color.fromNamed=function(e){var t=document.createElement("div");t.style.color=e,document.body.appendChild(t);var i=getComputedStyle(t).color;return document.body.removeChild(t),i},t$4.color.fromString=function(){var e={},t=0;return function(i){var n;if(e.hasOwnProperty(i))n=e[i];else{if(t>=1024){var r,o=0;for(r in e)0==(3&o++)&&(delete e[r],--t)}n=t$4.color.fromStringInternal_(i),e[i]=n,++t}return n}}(),t$4.color.fromStringInternal_=function(e){var t,i,n,r,o,a;if(t$4.color.NAMED_COLOR_RE_.exec(e)&&(e=t$4.color.fromNamed(e)),t$4.color.HEX_COLOR_RE_.exec(e)){var s,l=e.length-1;s=l<=4?1:2;var u=4===l||8===l;t=parseInt(e.substr(1+0*s,s),16),i=parseInt(e.substr(1+1*s,s),16),n=parseInt(e.substr(1+2*s,s),16),r=u?parseInt(e.substr(1+3*s,s),16):255,1==s&&(t=(t<<4)+t,i=(i<<4)+i,n=(n<<4)+n,u&&(r=(r<<4)+r)),o=[t,i,n,r/255]}else 0==e.indexOf("rgba(")?(a=e.slice(5,-1).split(",").map(Number),o=t$4.color.normalize(a)):0==e.indexOf("rgb(")?((a=e.slice(4,-1).split(",").map(Number)).push(1),o=t$4.color.normalize(a)):t$4.asserts.assert(!1,14);return o},t$4.color.normalize=function(e,t){var i=t||[];return i[0]=t$4.math.clamp(e[0]+.5|0,0,255),i[1]=t$4.math.clamp(e[1]+.5|0,0,255),i[2]=t$4.math.clamp(e[2]+.5|0,0,255),i[3]=t$4.math.clamp(e[3],0,1),i},t$4.color.toString=function(e){var t=e[0];t!=(0|t)&&(t=t+.5|0);var i=e[1];i!=(0|i)&&(i=i+.5|0);var n=e[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+t+","+i+","+n+","+(void 0===e[3]?1:e[3])+")"},t$4.colorlike={},t$4.colorlike.asColorLike=function(e){return t$4.colorlike.isColorLike(e)?e:t$4.color.asString(e)},t$4.colorlike.isColorLike=function(e){return"string"==typeof e||e instanceof CanvasPattern||e instanceof CanvasGradient},t$4.css={},t$4.css.CLASS_HIDDEN="ol-hidden",t$4.css.CLASS_SELECTABLE="ol-selectable",t$4.css.CLASS_UNSELECTABLE="ol-unselectable",t$4.css.CLASS_UNSUPPORTED="ol-unsupported",t$4.css.CLASS_CONTROL="ol-control",t$4.css.getFontFamilies=function(){var e,t={};return function(i){if(e||(e=document.createElement("div").style),!(i in t)){e.font=i;var n=e.fontFamily;if(e.font="",!n)return null;t[i]=n.split(/,\s?/)}return t[i]}}(),t$4.dom={},t$4.dom.createCanvasContext2D=function(e,t){return(e&&t?new OffscreenCanvas(e,t):new OffscreenCanvas(1,1)).getContext("2d")},t$4.dom.outerWidth=function(e){var t=e.offsetWidth,i=getComputedStyle(e);return t+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)},t$4.dom.outerHeight=function(e){var t=e.offsetHeight,i=getComputedStyle(e);return t+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)},t$4.dom.replaceNode=function(e,t){var i=t.parentNode;i&&i.replaceChild(e,t)},t$4.dom.removeNode=function(e){return e&&e.parentNode?e.parentNode.removeChild(e):null},t$4.dom.removeChildren=function(e){for(;e.lastChild;)e.removeChild(e.lastChild)},t$4.extent={},t$4.extent.Corner={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},t$4.extent.Relationship={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16},t$4.extent.boundingExtent=function(e){for(var t=t$4.extent.createEmpty(),i=0,n=e.length;i<n;++i)t$4.extent.extendCoordinate(t,e[i]);return t},t$4.extent.boundingExtentXYs_=function(e,t,i){var n=Math.min.apply(null,e),r=Math.min.apply(null,t),o=Math.max.apply(null,e),a=Math.max.apply(null,t);return t$4.extent.createOrUpdate(n,r,o,a,i)},t$4.extent.buffer=function(e,t,i){return i?(i[0]=e[0]-t,i[1]=e[1]-t,i[2]=e[2]+t,i[3]=e[3]+t,i):[e[0]-t,e[1]-t,e[2]+t,e[3]+t]},t$4.extent.clone=function(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e.slice()},t$4.extent.closestSquaredDistanceXY=function(e,t,i){var n,r;return(n=t<e[0]?e[0]-t:e[2]<t?t-e[2]:0)*n+(r=i<e[1]?e[1]-i:e[3]<i?i-e[3]:0)*r},t$4.extent.containsCoordinate=function(e,t){return t$4.extent.containsXY(e,t[0],t[1])},t$4.extent.containsExtent=function(e,t){return e[0]<=t[0]&&t[2]<=e[2]&&e[1]<=t[1]&&t[3]<=e[3]},t$4.extent.containsXY=function(e,t,i){return e[0]<=t&&t<=e[2]&&e[1]<=i&&i<=e[3]},t$4.extent.coordinateRelationship=function(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t$4.extent.Relationship.UNKNOWN;return a<i?l|=t$4.extent.Relationship.LEFT:a>r&&(l|=t$4.extent.Relationship.RIGHT),s<n?l|=t$4.extent.Relationship.BELOW:s>o&&(l|=t$4.extent.Relationship.ABOVE),l===t$4.extent.Relationship.UNKNOWN&&(l=t$4.extent.Relationship.INTERSECTING),l},t$4.extent.createEmpty=function(){return[1/0,1/0,-1/0,-1/0]},t$4.extent.createOrUpdate=function(e,t,i,n,r){return r?(r[0]=e,r[1]=t,r[2]=i,r[3]=n,r):[e,t,i,n]},t$4.extent.createOrUpdateEmpty=function(e){return t$4.extent.createOrUpdate(1/0,1/0,-1/0,-1/0,e)},t$4.extent.createOrUpdateFromCoordinate=function(e,t){var i=e[0],n=e[1];return t$4.extent.createOrUpdate(i,n,i,n,t)},t$4.extent.createOrUpdateFromCoordinates=function(e,t){var i=t$4.extent.createOrUpdateEmpty(t);return t$4.extent.extendCoordinates(i,e)},t$4.extent.createOrUpdateFromFlatCoordinates=function(e,t,i,n,r){var o=t$4.extent.createOrUpdateEmpty(r);return t$4.extent.extendFlatCoordinates(o,e,t,i,n)},t$4.extent.createOrUpdateFromRings=function(e,t){var i=t$4.extent.createOrUpdateEmpty(t);return t$4.extent.extendRings(i,e)},t$4.extent.equals=function(e,t){return e[0]==t[0]&&e[2]==t[2]&&e[1]==t[1]&&e[3]==t[3]},t$4.extent.extend=function(e,t){return t[0]<e[0]&&(e[0]=t[0]),t[2]>e[2]&&(e[2]=t[2]),t[1]<e[1]&&(e[1]=t[1]),t[3]>e[3]&&(e[3]=t[3]),e},t$4.extent.extendCoordinate=function(e,t){t[0]<e[0]&&(e[0]=t[0]),t[0]>e[2]&&(e[2]=t[0]),t[1]<e[1]&&(e[1]=t[1]),t[1]>e[3]&&(e[3]=t[1])},t$4.extent.extendCoordinates=function(e,t){var i,n;for(i=0,n=t.length;i<n;++i)t$4.extent.extendCoordinate(e,t[i]);return e},t$4.extent.extendFlatCoordinates=function(e,t,i,n,r){for(;i<n;i+=r)t$4.extent.extendXY(e,t[i],t[i+1]);return e},t$4.extent.extendRings=function(e,t){var i,n;for(i=0,n=t.length;i<n;++i)t$4.extent.extendCoordinates(e,t[i]);return e},t$4.extent.extendXY=function(e,t,i){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],i),e[2]=Math.max(e[2],t),e[3]=Math.max(e[3],i)},t$4.extent.forEachCorner=function(e,t,i){var n;return!!((n=t.call(i,t$4.extent.getBottomLeft(e)))||(n=t.call(i,t$4.extent.getBottomRight(e)),n)||(n=t.call(i,t$4.extent.getTopRight(e)),n)||(n=t.call(i,t$4.extent.getTopLeft(e)),n))&&n},t$4.extent.getArea=function(e){var t=0;return t$4.extent.isEmpty(e)||(t=t$4.extent.getWidth(e)*t$4.extent.getHeight(e)),t},t$4.extent.getBottomLeft=function(e){return[e[0],e[1]]},t$4.extent.getBottomRight=function(e){return[e[2],e[1]]},t$4.extent.getCenter=function(e){return[(e[0]+e[2])/2,(e[1]+e[3])/2]},t$4.extent.getCorner=function(e,t){var i;return t===t$4.extent.Corner.BOTTOM_LEFT?i=t$4.extent.getBottomLeft(e):t===t$4.extent.Corner.BOTTOM_RIGHT?i=t$4.extent.getBottomRight(e):t===t$4.extent.Corner.TOP_LEFT?i=t$4.extent.getTopLeft(e):t===t$4.extent.Corner.TOP_RIGHT?i=t$4.extent.getTopRight(e):t$4.asserts.assert(!1,13),i},t$4.extent.getEnlargedArea=function(e,t){var i=Math.min(e[0],t[0]),n=Math.min(e[1],t[1]);return(Math.max(e[2],t[2])-i)*(Math.max(e[3],t[3])-n)},t$4.extent.getForViewAndSize=function(e,t,i,n,r){var o=t*n[0]/2,a=t*n[1]/2,s=Math.cos(i),l=Math.sin(i),u=o*s,c=o*l,h=a*s,d=a*l,f=e[0],p=e[1],_=f-u+d,m=f-u-d,g=f+u-d,x=f+u+d,y=p-c-h,v=p-c+h,$=p+c+h,b=p+c-h;return t$4.extent.createOrUpdate(Math.min(_,m,g,x),Math.min(y,v,$,b),Math.max(_,m,g,x),Math.max(y,v,$,b),r)},t$4.extent.getHeight=function(e){return e[3]-e[1]},t$4.extent.getIntersectionArea=function(e,t){var i=t$4.extent.getIntersection(e,t);return t$4.extent.getArea(i)},t$4.extent.getIntersection=function(e,t,i){var n=i||t$4.extent.createEmpty();return t$4.extent.intersects(e,t)&&(e[0]>t[0]?n[0]=e[0]:n[0]=t[0],e[1]>t[1]?n[1]=e[1]:n[1]=t[1],e[2]<t[2]?n[2]=e[2]:n[2]=t[2],e[3]<t[3]?n[3]=e[3]:n[3]=t[3]),n},t$4.extent.getMargin=function(e){return t$4.extent.getWidth(e)+t$4.extent.getHeight(e)},t$4.extent.getSize=function(e){return[e[2]-e[0],e[3]-e[1]]},t$4.extent.getTopLeft=function(e){return[e[0],e[3]]},t$4.extent.getTopRight=function(e){return[e[2],e[3]]},t$4.extent.getWidth=function(e){return e[2]-e[0]},t$4.extent.intersects=function(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]},t$4.extent.isEmpty=function(e){return e[2]<e[0]||e[3]<e[1]},t$4.extent.returnOrUpdate=function(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e},t$4.extent.scaleFromCenter=function(e,t){var i=(e[2]-e[0])/2*(t-1),n=(e[3]-e[1])/2*(t-1);e[0]-=i,e[2]+=i,e[1]-=n,e[3]+=n},t$4.extent.intersectsSegment=function(e,t,i){var n=!1,r=t$4.extent.coordinateRelationship(e,t),o=t$4.extent.coordinateRelationship(e,i);if(r===t$4.extent.Relationship.INTERSECTING||o===t$4.extent.Relationship.INTERSECTING)n=!0;else{var a,s,l=e[0],u=e[1],c=e[2],h=e[3],d=t[0],f=t[1],p=i[0],_=i[1],m=(_-f)/(p-d);!!(o&t$4.extent.Relationship.ABOVE)&&!(r&t$4.extent.Relationship.ABOVE)&&(n=(a=p-(_-h)/m)>=l&&a<=c),!n&&!!(o&t$4.extent.Relationship.RIGHT)&&!(r&t$4.extent.Relationship.RIGHT)&&(n=(s=_-(p-c)*m)>=u&&s<=h),!n&&!!(o&t$4.extent.Relationship.BELOW)&&!(r&t$4.extent.Relationship.BELOW)&&(n=(a=p-(_-u)/m)>=l&&a<=c),!n&&o&t$4.extent.Relationship.LEFT&&!(r&t$4.extent.Relationship.LEFT)&&(n=(s=_-(p-l)*m)>=u&&s<=h)}return n},t$4.extent.applyTransform=function(e,t,i){var n=[e[0],e[1],e[0],e[3],e[2],e[1],e[2],e[3]];t(n,n,2);var r=[n[0],n[2],n[4],n[6]],o=[n[1],n[3],n[5],n[7]];return t$4.extent.boundingExtentXYs_(r,o,i)},t$4.obj={},t$4.obj.assign="function"==typeof Object.assign?Object.assign:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(e),n=1,r=arguments.length;n<r;++n){var o=arguments[n];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(i[a]=o[a])}return i},t$4.obj.clear=function(e){for(var t in e)delete e[t]},t$4.obj.getValues=function(e){var t=[];for(var i in e)t.push(e[i]);return t},t$4.obj.isEmpty=function(e){var t;for(t in e)return!1;return!t},t$4.transform={},t$4.transform.tmp_=new Array(6),t$4.transform.create=function(){return[1,0,0,1,0,0]},t$4.transform.reset=function(e){return t$4.transform.set(e,1,0,0,1,0,0)},t$4.transform.multiply=function(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],u=t[1],c=t[2],h=t[3],d=t[4],f=t[5];return e[0]=i*l+r*u,e[1]=n*l+o*u,e[2]=i*c+r*h,e[3]=n*c+o*h,e[4]=i*d+r*f+a,e[5]=n*d+o*f+s,e},t$4.transform.set=function(e,t,i,n,r,o,a){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e},t$4.transform.setFromArray=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},t$4.transform.apply=function(e,t){var i=t[0],n=t[1];return t[0]=e[0]*i+e[2]*n+e[4],t[1]=e[1]*i+e[3]*n+e[5],t},t$4.transform.rotate=function(e,t){var i=Math.cos(t),n=Math.sin(t);return t$4.transform.multiply(e,t$4.transform.set(t$4.transform.tmp_,i,n,-n,i,0,0))},t$4.transform.scale=function(e,t,i){return t$4.transform.multiply(e,t$4.transform.set(t$4.transform.tmp_,t,0,0,i,0,0))},t$4.transform.translate=function(e,t,i){return t$4.transform.multiply(e,t$4.transform.set(t$4.transform.tmp_,1,0,0,1,t,i))},t$4.transform.compose=function(e,t,i,n,r,o,a,s){var l=Math.sin(o),u=Math.cos(o);return e[0]=n*u,e[1]=r*l,e[2]=-n*l,e[3]=r*u,e[4]=a*n*u-s*n*l+t,e[5]=a*r*l+s*r*u+i,e},t$4.transform.invert=function(e){var t=t$4.transform.determinant(e),i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5];return e[0]=o/t,e[1]=-n/t,e[2]=-r/t,e[3]=i/t,e[4]=(r*s-o*a)/t,e[5]=-(i*s-n*a)/t,e},t$4.transform.determinant=function(e){return e[0]*e[3]-e[1]*e[2]},t$4.geom={},t$4.geom.flat={},t$4.geom.flat.center={},t$4.geom.flat.reverse={},t$4.geom.flat.orient={},t$4.geom.flat.transform={},t$4.geom.flat.transform.transform2D=function(e,t,i,n,r,o){var a,s=o||[],l=0;for(a=t;a<i;a+=n){var u=e[a],c=e[a+1];s[l++]=r[0]*u+r[2]*c+r[4],s[l++]=r[1]*u+r[3]*c+r[5]}return o&&s.length!=l&&(s.length=l),s},t$4.geom.flat.transform.rotate=function(e,t,i,n,r,o,a){for(var s=a||[],l=Math.cos(r),u=Math.sin(r),c=o[0],h=o[1],d=0,f=t;f<i;f+=n){var p=e[f]-c,_=e[f+1]-h;s[d++]=c+p*l-_*u,s[d++]=h+p*u+_*l;for(var m=f+2;m<f+n;++m)s[d++]=e[m]}return a&&s.length!=d&&(s.length=d),s},t$4.geom.flat.transform.scale=function(e,t,i,n,r,o,a,s){for(var l=s||[],u=a[0],c=a[1],h=0,d=t;d<i;d+=n){var f=e[d]-u,p=e[d+1]-c;l[h++]=u+r*f,l[h++]=c+o*p;for(var _=d+2;_<d+n;++_)l[h++]=e[_]}return s&&l.length!=h&&(l.length=h),l},t$4.geom.GeometryLayout={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"},t$4.geom.flat.reverse.coordinates=function(e,t,i,n){for(;t<i-n;){var r;for(r=0;r<n;++r){var o=e[t+r];e[t+r]=e[i-n+r],e[i-n+r]=o}t+=n,i-=n}},t$4.geom.flat.orient.linearRingIsClockwise=function(e,t,i,n){for(var r=0,o=e[i-n],a=e[i-n+1];t<i;t+=n){var s=e[t],l=e[t+1];r+=(s-o)*(l+a),o=s,a=l}return r>0},t$4.geom.flat.orient.linearRingsAreOriented=function(e,t,i,n,r){var o,a,s=void 0!==r&&r;for(o=0,a=i.length;o<a;++o){var l=i[o],u=t$4.geom.flat.orient.linearRingIsClockwise(e,t,l,n);if(0===o){if(s&&u||!s&&!u)return!1}else if(s&&!u||!s&&u)return!1;t=l}return!0},t$4.geom.flat.orient.linearRingssAreOriented=function(e,t,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o)if(!t$4.geom.flat.orient.linearRingsAreOriented(e,t,i[o],n,r))return!1;return!0},t$4.geom.flat.orient.orientLinearRings=function(e,t,i,n,r){var o,a,s=void 0!==r&&r;for(o=0,a=i.length;o<a;++o){var l=i[o],u=t$4.geom.flat.orient.linearRingIsClockwise(e,t,l,n);(0===o?s&&u||!s&&!u:s&&!u||!s&&u)&&t$4.geom.flat.reverse.coordinates(e,t,l,n),t=l}return t},t$4.geom.flat.orient.orientLinearRingss=function(e,t,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o)t=t$4.geom.flat.orient.orientLinearRings(e,t,i[o],n,r);return t},t$4.geom.flat.simplify={},t$4.geom.flat.simplify.lineString=function(e,t,i,n,r,o,a){var s=void 0!==a?a:[];return o||(i=t$4.geom.flat.simplify.radialDistance(e,t,i,n,r,s,0),e=s,t=0,n=2),s.length=t$4.geom.flat.simplify.douglasPeucker(e,t,i,n,r,s,0),s},t$4.geom.flat.simplify.douglasPeucker=function(e,t,i,n,r,o,a){var s=(i-t)/n;if(s<3){for(;t<i;t+=n)o[a++]=e[t],o[a++]=e[t+1];return a}var l=new Array(s);l[0]=1,l[s-1]=1;for(var u,c=[t,i-n],h=0;c.length>0;){var d=c.pop(),f=c.pop(),p=0,_=e[f],m=e[f+1],g=e[d],x=e[d+1];for(u=f+n;u<d;u+=n){var y=e[u],v=e[u+1],$=t$4.math.squaredSegmentDistance(y,v,_,m,g,x);$>p&&(h=u,p=$)}p>r&&(l[(h-t)/n]=1,f+n<h&&c.push(f,h),h+n<d&&c.push(h,d))}for(u=0;u<s;++u)l[u]&&(o[a++]=e[t+u*n],o[a++]=e[t+u*n+1]);return a},t$4.geom.flat.simplify.douglasPeuckers=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l];a=t$4.geom.flat.simplify.douglasPeucker(e,t,c,n,r,o,a),s.push(a),t=c}return a},t$4.geom.flat.simplify.douglasPeuckerss=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l],h=[];a=t$4.geom.flat.simplify.douglasPeuckers(e,t,c,n,r,o,a,h),s.push(h),t=c[c.length-1]}return a},t$4.geom.flat.simplify.radialDistance=function(e,t,i,n,r,o,a){if(i<=t+n){for(;t<i;t+=n)o[a++]=e[t],o[a++]=e[t+1];return a}var s=e[t],l=e[t+1];o[a++]=s,o[a++]=l;var u=s,c=l;for(t+=n;t<i;t+=n)u=e[t],c=e[t+1],t$4.math.squaredDistance(s,l,u,c)>r&&(o[a++]=u,o[a++]=c,s=u,l=c);return(u!=s||c!=l)&&(o[a++]=u,o[a++]=c),a},t$4.geom.flat.simplify.snap=function(e,t){return t*Math.round(e/t)},t$4.geom.flat.simplify.quantize=function(e,t,i,n,r,o,a){if(t==i)return a;var s,l,u=t$4.geom.flat.simplify.snap(e[t],r),c=t$4.geom.flat.simplify.snap(e[t+1],r);t+=n,o[a++]=u,o[a++]=c;do{if(s=t$4.geom.flat.simplify.snap(e[t],r),l=t$4.geom.flat.simplify.snap(e[t+1],r),(t+=n)==i)return o[a++]=s,o[a++]=l,a}while(s==u&&l==c);for(;t<i;){var h,d;if(h=t$4.geom.flat.simplify.snap(e[t],r),d=t$4.geom.flat.simplify.snap(e[t+1],r),t+=n,h!=s||d!=l){var f=s-u,p=l-c,_=h-u,m=d-c;if(f*m==p*_&&(f<0&&_<f||f==_||f>0&&_>f)&&(p<0&&m<p||p==m||p>0&&m>p)){s=h,l=d;continue}o[a++]=s,o[a++]=l,u=s,c=l,s=h,l=d}}return o[a++]=s,o[a++]=l,a},t$4.geom.flat.simplify.quantizes=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l];a=t$4.geom.flat.simplify.quantize(e,t,c,n,r,o,a),s.push(a),t=c}return a},t$4.geom.flat.simplify.quantizess=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l],h=[];a=t$4.geom.flat.simplify.quantizes(e,t,c,n,r,o,a,h),s.push(h),t=c[c.length-1]}return a},t$4.geom.GeometryType={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},t$4.geom.Geometry=function(){t$4.Object.call(this),this.extent_=t$4.extent.createEmpty(),this.extentRevision_=-1,this.simplifiedGeometryCache={},this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.tmpTransform_=t$4.transform.create()},t$4.inherits(t$4.geom.Geometry,t$4.Object),t$4.geom.Geometry.prototype.clone=function(){},t$4.geom.Geometry.prototype.closestPointXY=function(e,t,i,n){},t$4.geom.Geometry.prototype.getClosestPoint=function(e,t){var i=t||[NaN,NaN];return this.closestPointXY(e[0],e[1],i,1/0),i},t$4.geom.Geometry.prototype.intersectsCoordinate=function(e){return this.containsXY(e[0],e[1])},t$4.geom.Geometry.prototype.computeExtent=function(e){},t$4.geom.Geometry.prototype.containsXY=t$4.functions.FALSE,t$4.geom.Geometry.prototype.getExtent=function(e){return this.extentRevision_!=this.getRevision()&&(this.extent_=this.computeExtent(this.extent_),this.extentRevision_=this.getRevision()),t$4.extent.returnOrUpdate(this.extent_,e)},t$4.geom.Geometry.prototype.rotate=function(e,t){},t$4.geom.Geometry.prototype.scale=function(e,t,i){},t$4.geom.Geometry.prototype.simplify=function(e){return this.getSimplifiedGeometry(e*e)},t$4.geom.Geometry.prototype.getSimplifiedGeometry=function(e){},t$4.geom.Geometry.prototype.getType=function(){},t$4.geom.Geometry.prototype.applyTransform=function(e){},t$4.geom.Geometry.prototype.intersectsExtent=function(e){},t$4.geom.Geometry.prototype.translate=function(e,t){},t$4.geom.Geometry.prototype.transform=function(e,t){var i=this.tmpTransform_,n=(e=t$4.proj.get(e)).getUnits()==t$4.proj.Units.TILE_PIXELS?function(n,r,o){var a=e.getExtent(),s=e.getWorldExtent(),l=t$4.extent.getHeight(s)/t$4.extent.getHeight(a);return t$4.transform.compose(i,s[0],s[3],l,-l,0,0,0),t$4.geom.flat.transform.transform2D(n,0,n.length,o,i,r),t$4.proj.getTransform(e,t)(n,r,o)}:t$4.proj.getTransform(e,t);return this.applyTransform(n),this},t$4.geom.SimpleGeometry=function(){t$4.geom.Geometry.call(this),this.layout=t$4.geom.GeometryLayout.XY,this.stride=2,this.flatCoordinates=null},t$4.inherits(t$4.geom.SimpleGeometry,t$4.geom.Geometry),t$4.geom.SimpleGeometry.getLayoutForStride_=function(e){var t;return 2==e?t=t$4.geom.GeometryLayout.XY:3==e?t=t$4.geom.GeometryLayout.XYZ:4==e&&(t=t$4.geom.GeometryLayout.XYZM),t},t$4.geom.SimpleGeometry.getStrideForLayout=function(e){var t;return e==t$4.geom.GeometryLayout.XY?t=2:e==t$4.geom.GeometryLayout.XYZ||e==t$4.geom.GeometryLayout.XYM?t=3:e==t$4.geom.GeometryLayout.XYZM&&(t=4),t},t$4.geom.SimpleGeometry.prototype.containsXY=t$4.functions.FALSE,t$4.geom.SimpleGeometry.prototype.computeExtent=function(e){return t$4.extent.createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t$4.geom.SimpleGeometry.prototype.getCoordinates=function(){},t$4.geom.SimpleGeometry.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},t$4.geom.SimpleGeometry.prototype.getFlatCoordinates=function(){return this.flatCoordinates},t$4.geom.SimpleGeometry.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},t$4.geom.SimpleGeometry.prototype.getLayout=function(){return this.layout},t$4.geom.SimpleGeometry.prototype.getSimplifiedGeometry=function(e){if(this.simplifiedGeometryRevision!=this.getRevision()&&(t$4.obj.clear(this.simplifiedGeometryCache),this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var t=e.toString();if(this.simplifiedGeometryCache.hasOwnProperty(t))return this.simplifiedGeometryCache[t];var i=this.getSimplifiedGeometryInternal(e);return i.getFlatCoordinates().length<this.flatCoordinates.length?(this.simplifiedGeometryCache[t]=i,i):(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)},t$4.geom.SimpleGeometry.prototype.getSimplifiedGeometryInternal=function(e){return this},t$4.geom.SimpleGeometry.prototype.getStride=function(){return this.stride},t$4.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal=function(e,t){this.stride=t$4.geom.SimpleGeometry.getStrideForLayout(e),this.layout=e,this.flatCoordinates=t},t$4.geom.SimpleGeometry.prototype.setCoordinates=function(e,t){},t$4.geom.SimpleGeometry.prototype.setLayout=function(e,t,i){var n;if(e)n=t$4.geom.SimpleGeometry.getStrideForLayout(e);else{var r;for(r=0;r<i;++r){if(0===t.length)return this.layout=t$4.geom.GeometryLayout.XY,void(this.stride=2);t=t[0]}n=t.length,e=t$4.geom.SimpleGeometry.getLayoutForStride_(n)}this.layout=e,this.stride=n},t$4.geom.SimpleGeometry.prototype.applyTransform=function(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},t$4.geom.SimpleGeometry.prototype.rotate=function(e,t){var i=this.getFlatCoordinates();if(i){var n=this.getStride();t$4.geom.flat.transform.rotate(i,0,i.length,n,e,t,i),this.changed()}},t$4.geom.SimpleGeometry.prototype.scale=function(e,t,i){var n=t;void 0===n&&(n=e);var r=i;r||(r=t$4.extent.getCenter(this.getExtent()));var o=this.getFlatCoordinates();if(o){var a=this.getStride();t$4.geom.flat.transform.scale(o,0,o.length,a,e,n,r,o),this.changed()}},t$4.geom.SimpleGeometry.prototype.translate=function(e,t){var i=this.getFlatCoordinates();if(i){var n=this.getStride();t$4.geom.flat.transform.translate(i,0,i.length,n,e,t,i),this.changed()}},t$4.geom.SimpleGeometry.transform2D=function(e,t,i){var n=e.getFlatCoordinates();if(n){var r=e.getStride();return t$4.geom.flat.transform.transform2D(n,0,n.length,r,t,i)}return null},t$4.geom.Polygon=function(e,t){t$4.geom.SimpleGeometry.call(this),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.Polygon,t$4.geom.SimpleGeometry),t$4.geom.Polygon.prototype.appendLinearRing=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},t$4.geom.Polygon.prototype.clone=function(){var e=new t$4.geom.Polygon(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice()),e},t$4.geom.Polygon.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,i,n))},t$4.geom.Polygon.prototype.containsXY=function(e,t){return t$4.geom.flat.contains.linearRingsContainsXY(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)},t$4.geom.Polygon.prototype.getArea=function(){return t$4.geom.flat.area.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},t$4.geom.Polygon.prototype.getCoordinates=function(e){var t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),t$4.geom.flat.orient.orientLinearRings(t,0,this.ends_,this.stride,e)):t=this.flatCoordinates,t$4.geom.flat.inflate.coordinatess(t,0,this.ends_,this.stride)},t$4.geom.Polygon.prototype.getEnds=function(){return this.ends_},t$4.geom.Polygon.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var e=t$4.extent.getCenter(this.getExtent());this.flatInteriorPoint_=t$4.geom.flat.interiorpoint.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},t$4.geom.Polygon.prototype.getInteriorPoint=function(){return new t$4.geom.Point(this.getFlatInteriorPoint(),t$4.geom.GeometryLayout.XYM)},t$4.geom.Polygon.prototype.getLinearRingCount=function(){return this.ends_.length},t$4.geom.Polygon.prototype.getLinearRing=function(e){if(e<0||this.ends_.length<=e)return null;var t=new t$4.geom.LinearRing(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e])),t},t$4.geom.Polygon.prototype.getLinearRings=function(){var e,t,i=this.layout,n=this.flatCoordinates,r=this.ends_,o=[],a=0;for(e=0,t=r.length;e<t;++e){var s=r[e],l=new t$4.geom.LinearRing(null);l.setFlatCoordinates(i,n.slice(a,s)),o.push(l),a=s}return o},t$4.geom.Polygon.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;t$4.geom.flat.orient.linearRingsAreOriented(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=t$4.geom.flat.orient.orientLinearRings(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t$4.geom.Polygon.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$4.geom.flat.simplify.quantizes(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,i);var n=new t$4.geom.Polygon(null);return n.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t,i),n},t$4.geom.Polygon.prototype.getType=function(){return t$4.geom.GeometryType.POLYGON},t$4.geom.Polygon.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)},t$4.geom.Polygon.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$4.geom.flat.deflate.coordinatess(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1]}else this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null,this.ends_)},t$4.geom.Polygon.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.ends_=i},t$4.geom.Polygon.circular=function(e,t,i,n){var r,o=n||32,a=[];for(r=0;r<o;++r)t$4.array.extend(a,e.offset(t,i,2*Math.PI*r/o));a.push(a[0],a[1]);var s=new t$4.geom.Polygon(null);return s.setFlatCoordinates(t$4.geom.GeometryLayout.XY,a,[a.length]),s},t$4.geom.Polygon.fromExtent=function(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=[t,i,t,r,n,r,n,i,t,i],a=new t$4.geom.Polygon(null);return a.setFlatCoordinates(t$4.geom.GeometryLayout.XY,o,[o.length]),a},t$4.geom.Polygon.fromCircle=function(e,t,i){for(var n=t||32,r=e.getStride(),o=e.getLayout(),a=new t$4.geom.Polygon(null,o),s=r*(n+1),l=new Array(s),u=0;u<s;u++)l[u]=0;var c=[l.length];return a.setFlatCoordinates(o,l,c),t$4.geom.Polygon.makeRegular(a,e.getCenter(),e.getRadius(),i),a},t$4.geom.Polygon.makeRegular=function(e,t,i,n){for(var r,o,a=e.getFlatCoordinates(),s=e.getLayout(),l=e.getStride(),u=e.getEnds(),c=a.length/l-1,h=n||0,d=0;d<=c;++d)o=d*l,r=h+2*t$4.math.modulo(d,c)*Math.PI/c,a[o]=t[0]+i*Math.cos(r),a[o+1]=t[1]+i*Math.sin(r);e.setFlatCoordinates(s,a,u)},t$4.geom.LineString=function(e,t){t$4.geom.SimpleGeometry.call(this),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.LineString,t$4.geom.SimpleGeometry),t$4.geom.LineString.prototype.appendCoordinate=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()},t$4.geom.LineString.prototype.clone=function(){var e=new t$4.geom.LineString(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$4.geom.LineString.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getMaxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,i,n))},t$4.geom.LineString.prototype.forEachSegment=function(e,t){return t$4.geom.flat.segments.forEach(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t)},t$4.geom.LineString.prototype.getCoordinateAtM=function(e,t){if(this.layout!=t$4.geom.GeometryLayout.XYM&&this.layout!=t$4.geom.GeometryLayout.XYZM)return null;var i=void 0!==t&&t;return t$4.geom.flat.interpolate.lineStringCoordinateAtM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,i)},t$4.geom.LineString.prototype.getCoordinates=function(){return t$4.geom.flat.inflate.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$4.geom.LineString.prototype.getCoordinateAt=function(e,t){return t$4.geom.flat.interpolate.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t)},t$4.geom.LineString.prototype.getLength=function(){return t$4.geom.flat.length.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$4.geom.LineString.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},t$4.geom.LineString.prototype.getSimplifiedGeometryInternal=function(e){var t=[];t.length=t$4.geom.flat.simplify.douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0);var i=new t$4.geom.LineString(null);return i.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t),i},t$4.geom.LineString.prototype.getType=function(){return t$4.geom.GeometryType.LINE_STRING},t$4.geom.LineString.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t$4.geom.LineString.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$4.geom.flat.deflate.coordinates(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null)},t$4.geom.LineString.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$4.geom.Point=function(e,t){t$4.geom.SimpleGeometry.call(this),this.setCoordinates(e,t)},t$4.inherits(t$4.geom.Point,t$4.geom.SimpleGeometry),t$4.geom.Point.prototype.clone=function(){var e=new t$4.geom.Point(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$4.geom.Point.prototype.closestPointXY=function(e,t,i,n){var r=this.flatCoordinates,o=t$4.math.squaredDistance(e,t,r[0],r[1]);if(o<n){var a,s=this.stride;for(a=0;a<s;++a)i[a]=r[a];return i.length=s,o}return n},t$4.geom.Point.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},t$4.geom.Point.prototype.computeExtent=function(e){return t$4.extent.createOrUpdateFromCoordinate(this.flatCoordinates,e)},t$4.geom.Point.prototype.getType=function(){return t$4.geom.GeometryType.POINT},t$4.geom.Point.prototype.intersectsExtent=function(e){return t$4.extent.containsXY(e,this.flatCoordinates[0],this.flatCoordinates[1])},t$4.geom.Point.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$4.geom.flat.deflate.coordinate(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null)},t$4.geom.Point.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$4.geom.MultiLineString=function(e,t){t$4.geom.SimpleGeometry.call(this),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.MultiLineString,t$4.geom.SimpleGeometry),t$4.geom.MultiLineString.prototype.appendLineString=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates().slice()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},t$4.geom.MultiLineString.prototype.clone=function(){var e=new t$4.geom.MultiLineString(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice()),e},t$4.geom.MultiLineString.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,i,n))},t$4.geom.MultiLineString.prototype.getCoordinateAtM=function(e,t,i){if(this.layout!=t$4.geom.GeometryLayout.XYM&&this.layout!=t$4.geom.GeometryLayout.XYZM||0===this.flatCoordinates.length)return null;var n=void 0!==t&&t,r=void 0!==i&&i;return t$4.geom.flat.interpolate.lineStringsCoordinateAtM(this.flatCoordinates,0,this.ends_,this.stride,e,n,r)},t$4.geom.MultiLineString.prototype.getCoordinates=function(){return t$4.geom.flat.inflate.coordinatess(this.flatCoordinates,0,this.ends_,this.stride)},t$4.geom.MultiLineString.prototype.getEnds=function(){return this.ends_},t$4.geom.MultiLineString.prototype.getLineString=function(e){if(e<0||this.ends_.length<=e)return null;var t=new t$4.geom.LineString(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e])),t},t$4.geom.MultiLineString.prototype.getLineStrings=function(){var e,t,i=this.flatCoordinates,n=this.ends_,r=this.layout,o=[],a=0;for(e=0,t=n.length;e<t;++e){var s=n[e],l=new t$4.geom.LineString(null);l.setFlatCoordinates(r,i.slice(a,s)),o.push(l),a=s}return o},t$4.geom.MultiLineString.prototype.getFlatMidpoints=function(){var e,t,i=[],n=this.flatCoordinates,r=0,o=this.ends_,a=this.stride;for(e=0,t=o.length;e<t;++e){var s=o[e],l=t$4.geom.flat.interpolate.lineString(n,r,s,a,.5);t$4.array.extend(i,l),r=s}return i},t$4.geom.MultiLineString.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$4.geom.flat.simplify.douglasPeuckers(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,i);var n=new t$4.geom.MultiLineString(null);return n.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t,i),n},t$4.geom.MultiLineString.prototype.getType=function(){return t$4.geom.GeometryType.MULTI_LINE_STRING},t$4.geom.MultiLineString.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.lineStrings(this.flatCoordinates,0,this.ends_,this.stride,e)},t$4.geom.MultiLineString.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$4.geom.flat.deflate.coordinatess(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}else this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null,this.ends_)},t$4.geom.MultiLineString.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.ends_=i,this.changed()},t$4.geom.MultiLineString.prototype.setLineStrings=function(e){var t,i,n=this.getLayout(),r=[],o=[];for(t=0,i=e.length;t<i;++t){var a=e[t];0===t&&(n=a.getLayout()),t$4.array.extend(r,a.getFlatCoordinates()),o.push(r.length)}this.setFlatCoordinates(n,r,o)},t$4.geom.MultiPoint=function(e,t){t$4.geom.SimpleGeometry.call(this),this.setCoordinates(e,t)},t$4.inherits(t$4.geom.MultiPoint,t$4.geom.SimpleGeometry),t$4.geom.MultiPoint.prototype.appendPoint=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()},t$4.geom.MultiPoint.prototype.clone=function(){var e=new t$4.geom.MultiPoint(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$4.geom.MultiPoint.prototype.closestPointXY=function(e,t,i,n){if(n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t))return n;var r,o,a,s=this.flatCoordinates,l=this.stride;for(r=0,o=s.length;r<o;r+=l){var u=t$4.math.squaredDistance(e,t,s[r],s[r+1]);if(u<n){for(n=u,a=0;a<l;++a)i[a]=s[r+a];i.length=l}}return n},t$4.geom.MultiPoint.prototype.getCoordinates=function(){return t$4.geom.flat.inflate.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$4.geom.MultiPoint.prototype.getPoint=function(e){var t=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;if(e<0||t<=e)return null;var i=new t$4.geom.Point(null);return i.setFlatCoordinates(this.layout,this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride)),i},t$4.geom.MultiPoint.prototype.getPoints=function(){var e,t,i=this.flatCoordinates,n=this.layout,r=this.stride,o=[];for(e=0,t=i.length;e<t;e+=r){var a=new t$4.geom.Point(null);a.setFlatCoordinates(n,i.slice(e,e+r)),o.push(a)}return o},t$4.geom.MultiPoint.prototype.getType=function(){return t$4.geom.GeometryType.MULTI_POINT},t$4.geom.MultiPoint.prototype.intersectsExtent=function(e){var t,i,n,r,o=this.flatCoordinates,a=this.stride;for(t=0,i=o.length;t<i;t+=a)if(n=o[t],r=o[t+1],t$4.extent.containsXY(e,n,r))return!0;return!1},t$4.geom.MultiPoint.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$4.geom.flat.deflate.coordinates(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null)},t$4.geom.MultiPoint.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$4.geom.flat.center.linearRingss={},t$4.geom.flat.center.linearRingss=function(e,t,i,n){var r,o,a=[],s=t$4.extent.createEmpty();for(r=0,o=i.length;r<o;++r){var l=i[r];s=t$4.extent.createOrUpdateFromFlatCoordinates(e,t,l[0],n),a.push((s[0]+s[2])/2,(s[1]+s[3])/2),t=l[l.length-1]}return a},t$4.geom.MultiPolygon=function(e,t){t$4.geom.SimpleGeometry.call(this),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.MultiPolygon,t$4.geom.SimpleGeometry),t$4.geom.MultiPolygon.prototype.appendPolygon=function(e){var t;if(this.flatCoordinates){var i,n,r=this.flatCoordinates.length;for(t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates()),i=0,n=(t=e.getEnds().slice()).length;i<n;++i)t[i]+=r}else this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();this.endss_.push(t),this.changed()},t$4.geom.MultiPolygon.prototype.clone=function(){for(var e=new t$4.geom.MultiPolygon(null),t=this.endss_.length,i=new Array(t),n=0;n<t;++n)i[n]=this.endss_[n].slice();return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),i),e},t$4.geom.MultiPolygon.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getssMaxSquaredDelta(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getssClosestPoint(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,t,i,n))},t$4.geom.MultiPolygon.prototype.containsXY=function(e,t){return t$4.geom.flat.contains.linearRingssContainsXY(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)},t$4.geom.MultiPolygon.prototype.getArea=function(){return t$4.geom.flat.area.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},t$4.geom.MultiPolygon.prototype.getCoordinates=function(e){var t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),t$4.geom.flat.orient.orientLinearRingss(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,t$4.geom.flat.inflate.coordinatesss(t,0,this.endss_,this.stride)},t$4.geom.MultiPolygon.prototype.getEndss=function(){return this.endss_},t$4.geom.MultiPolygon.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var e=t$4.geom.flat.center.linearRingss(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=t$4.geom.flat.interiorpoint.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},t$4.geom.MultiPolygon.prototype.getInteriorPoints=function(){var e=new t$4.geom.MultiPoint(null);return e.setFlatCoordinates(t$4.geom.GeometryLayout.XYM,this.getFlatInteriorPoints().slice()),e},t$4.geom.MultiPolygon.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;t$4.geom.flat.orient.linearRingssAreOriented(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=t$4.geom.flat.orient.orientLinearRingss(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t$4.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$4.geom.flat.simplify.quantizess(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,i);var n=new t$4.geom.MultiPolygon(null);return n.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t,i),n},t$4.geom.MultiPolygon.prototype.getPolygon=function(e){if(e<0||this.endss_.length<=e)return null;var t;if(0===e)t=0;else{var i=this.endss_[e-1];t=i[i.length-1]}var n,r,o=this.endss_[e].slice(),a=o[o.length-1];if(0!==t)for(n=0,r=o.length;n<r;++n)o[n]-=t;var s=new t$4.geom.Polygon(null);return s.setFlatCoordinates(this.layout,this.flatCoordinates.slice(t,a),o),s},t$4.geom.MultiPolygon.prototype.getPolygons=function(){var e,t,i,n,r=this.layout,o=this.flatCoordinates,a=this.endss_,s=[],l=0;for(e=0,t=a.length;e<t;++e){var u=a[e].slice(),c=u[u.length-1];if(0!==l)for(i=0,n=u.length;i<n;++i)u[i]-=l;var h=new t$4.geom.Polygon(null);h.setFlatCoordinates(r,o.slice(l,c),u),s.push(h),l=c}return s},t$4.geom.MultiPolygon.prototype.getType=function(){return t$4.geom.GeometryType.MULTI_POLYGON},t$4.geom.MultiPolygon.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)},t$4.geom.MultiPolygon.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$4.geom.flat.deflate.coordinatesss(this.flatCoordinates,0,e,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{var n=i[i.length-1];this.flatCoordinates.length=0===n.length?0:n[n.length-1]}this.changed()}else this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null,this.endss_)},t$4.geom.MultiPolygon.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.endss_=i,this.changed()},t$4.geom.MultiPolygon.prototype.setPolygons=function(e){var t,i,n,r=this.getLayout(),o=[],a=[];for(t=0,i=e.length;t<i;++t){var s=e[t];0===t&&(r=s.getLayout());var l,u,c=o.length;for(l=0,u=(n=s.getEnds()).length;l<u;++l)n[l]+=c;t$4.array.extend(o,s.getFlatCoordinates()),a.push(n)}this.setFlatCoordinates(r,o,a)},t$4.Feature=function(e){if(t$4.Object.call(this),this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,void 0!==e)if(e instanceof t$4.geom.Geometry||!e){var t=e;this.setGeometry(t)}else{var i=e;this.setProperties(i)}},t$4.inherits(t$4.Feature,t$4.Object),t$4.Feature.prototype.clone=function(){var e=new t$4.Feature(this.getProperties());e.setGeometryName(this.getGeometryName());var t=this.getGeometry();t&&e.setGeometry(t.clone());var i=this.getStyle();return i&&e.setStyle(i),e},t$4.Feature.prototype.getGeometry=function(){return this.get(this.geometryName_)},t$4.Feature.prototype.getId=function(){return this.id_},t$4.Feature.prototype.getGeometryName=function(){return this.geometryName_},t$4.Feature.prototype.getStyle=function(){return this.style_},t$4.Feature.prototype.getStyleFunction=function(){return this.styleFunction_},t$4.Feature.prototype.handleGeometryChange_=function(){this.changed()},t$4.Feature.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(t$4.events.unlistenByKey(this.geometryChangeKey_),this.geometryChangeKey_=null);var e=this.getGeometry();e&&(this.geometryChangeKey_=t$4.events.listen(e,t$4.events.EventType.CHANGE,this.handleGeometryChange_,this)),this.changed()},t$4.Feature.prototype.setGeometry=function(e){this.set(this.geometryName_,e)},t$4.Feature.prototype.setStyle=function(e){this.style_=e,this.styleFunction_=e?t$4.Feature.createStyleFunction(e):void 0,this.changed()},t$4.Feature.prototype.setId=function(e){this.id_=e,this.changed()},t$4.Feature.prototype.setGeometryName=function(e){t$4.events.unlisten(this,t$4.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this),this.geometryName_=e,t$4.events.listen(this,t$4.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this),this.handleGeometryChanged_()},t$4.Feature.createStyleFunction=function(e){var t,i;"function"==typeof e?t=2==e.length?function(t){return e(this,t)}:e:(Array.isArray(e)?i=e:(t$4.asserts.assert(e instanceof t$4.style.Style,41),i=[e]),t=function(){return i});return t},t$4.format={},t$4.format.Feature=function(){this.defaultDataProjection=null,this.defaultFeatureProjection=null},t$4.format.Feature.prototype.getReadOptions=function(e,t){var i;return t&&(i={dataProjection:t.dataProjection?t.dataProjection:this.readProjection(e),featureProjection:t.featureProjection}),this.adaptOptions(i)},t$4.format.Feature.prototype.adaptOptions=function(e){return t$4.obj.assign({dataProjection:this.defaultDataProjection,featureProjection:this.defaultFeatureProjection},e)},t$4.format.Feature.prototype.getLastExtent=function(){return null},t$4.format.Feature.prototype.getType=function(){},t$4.format.Feature.prototype.readFeature=function(e,t){},t$4.format.Feature.prototype.readFeatures=function(e,t){},t$4.format.Feature.prototype.readGeometry=function(e,t){},t$4.format.Feature.prototype.readProjection=function(e){},t$4.format.Feature.prototype.writeFeature=function(e,t){},t$4.format.Feature.prototype.writeFeatures=function(e,t){},t$4.format.Feature.prototype.writeGeometry=function(e,t){},t$4.format.Feature.transformWithOptions=function(e,t,i){var n;if(n=e,t&&i&&void 0!==i.decimals){var r=Math.pow(10,i.decimals);n===e&&(n=n.clone()),n.applyTransform((function(e){for(var t=0,i=e.length;t<i;++t)e[t]=Math.round(e[t]*r)/r;return e}))}return n},t$4.format.MVT=function(e){t$4.format.Feature.call(this);var t=e||{};this.featureClass_=t.featureClass?t.featureClass:t$4.render.Feature,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.extent_=null},t$4.inherits(t$4.format.MVT,t$4.format.Feature),t$4.format.MVT.pbfReaders_={layers:function(e,t,i){if(3===e){var n={keys:[],values:[],features:[]},r=i.readVarint()+i.pos;i.readFields(t$4.format.MVT.pbfReaders_.layer,n,r),n.length=n.features.length,n.length&&(t[n.name]=n)}},layer:function(e,t,i){if(15===e)t.version=i.readVarint();else if(1===e)t.name=i.readString();else if(5===e)t.extent=i.readVarint();else if(2===e)t.features.push(i.pos);else if(3===e)t.keys.push(i.readString());else if(4===e){for(var n=null,r=i.readVarint()+i.pos;i.pos<r;)n=1===(e=i.readVarint()>>3)?i.readString():2===e?i.readFloat():3===e?i.readDouble():4===e?i.readVarint64():5===e?i.readVarint():6===e?i.readSVarint():7===e?i.readBoolean():null;t.values.push(n)}},feature:function(e,t,i){if(1==e)t.id=i.readVarint();else if(2==e)for(var n=i.readVarint()+i.pos;i.pos<n;){var r=t.layer.keys[i.readVarint()],o=t.layer.values[i.readVarint()];t.properties[r]=o}else 3==e?t.type=i.readVarint():4==e&&(t.geometry=i.pos)}},t$4.format.MVT.readRawFeature_=function(e,t,i){e.pos=t.features[i];var n=e.readVarint()+e.pos,r={layer:t,type:0,properties:{}};return e.readFields(t$4.format.MVT.pbfReaders_.feature,r,n),r},t$4.format.MVT.readRawGeometry_=function(e,t,i,n){e.pos=t.geometry;for(var r=e.readVarint()+e.pos,o=1,a=0,s=0,l=0,u=0,c=0;e.pos<r;){if(!a){var h=e.readVarint();o=7&h,a=h>>3}a--,1===o||2===o?(s+=e.readSVarint(),l+=e.readSVarint(),1===o&&u>c&&(n.push(u),c=u),i.push(s,l),u+=2):7===o?u>c&&(i.push(i[c],i[c+1]),u+=2):t$4.asserts.assert(!1,59)}u>c&&(n.push(u),c=u)},t$4.format.MVT.getGeometryType_=function(e,t){var i;return 1===e?i=1===t?t$4.geom.GeometryType.POINT:t$4.geom.GeometryType.MULTI_POINT:2===e?i=1===t?t$4.geom.GeometryType.LINE_STRING:t$4.geom.GeometryType.MULTI_LINE_STRING:3===e&&(i=t$4.geom.GeometryType.POLYGON),i},t$4.format.MVT.prototype.createFeature_=function(e,t,i){var n=t.type;if(0===n)return null;var r,o=t.id,a=t.properties;a[this.layerName_]=t.layer.name;var s=[],l=[];t$4.format.MVT.readRawGeometry_(e,t,s,l);var u,c=t$4.format.MVT.getGeometryType_(n,l.length);if(c==t$4.geom.GeometryType.POLYGON){for(var h=[],d=0,f=0,p=0,_=l.length;p<_;++p){var m=l[p];t$4.geom.flat.orient.linearRingIsClockwise(s,d,m,2)||(h.push(l.slice(f,p+1)),f=p+1),d=m}h.length>1?(l=h,u=new t$4.geom.MultiPolygon(null)):u=new t$4.geom.Polygon(null)}else u=c===t$4.geom.GeometryType.POINT?new t$4.geom.Point(null):c===t$4.geom.GeometryType.LINE_STRING?new t$4.geom.LineString(null):c===t$4.geom.GeometryType.POLYGON?new t$4.geom.Polygon(null):c===t$4.geom.GeometryType.MULTI_POINT?new t$4.geom.MultiPoint(null):c===t$4.geom.GeometryType.MULTI_LINE_STRING?new t$4.geom.MultiLineString(null):null;u.setFlatCoordinates(t$4.geom.GeometryLayout.XY,s,l),r=new this.featureClass_,this.geometryName_&&r.setGeometryName(this.geometryName_);var g=t$4.format.Feature.transformWithOptions(u,!1,this.adaptOptions(i));return r.setGeometry(g),r.setId(o),r.setProperties(a),r},t$4.format.MVT.prototype.readFeatures=function(e,t){var i,n=this.layers_,r=new h$V(e),o=r.readFields(t$4.format.MVT.pbfReaders_.layers,{}),a=[];for(var s in o)if(!n||-1!=n.indexOf(s)){if(void 0!==t){var l=t.needSourceLayerNames;if(void 0!==l&&void 0===l[s])continue}for(var u,c=0,h=(i=o[s]).length;c<h;++c)u=t$4.format.MVT.readRawFeature_(r,i,c),a.push(this.createFeature_(r,u));this.extent_=i?[0,0,i.extent,i.extent]:null}return a},t$4.style={},t$4.style.IconImageCache=function(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32},t$4.style.IconImageCache.getKey=function(e,t,i){return t+":"+e+":"+(i?t$4.color.asString(i):"null")},t$4.style.IconImageCache.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t$4.style.IconImageCache.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){var e,t,i=0;for(e in this.cache_)t=this.cache_[e],0==(3&i++)&&!t.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}},t$4.style.IconImageCache.prototype.get=function(e,t,i){var n=t$4.style.IconImageCache.getKey(e,t,i);return n in this.cache_?this.cache_[n]:null},t$4.style.IconImageCache.prototype.set=function(e,t,i,n){var r=t$4.style.IconImageCache.getKey(e,t,i);this.cache_[r]=n,++this.cacheSize_},t$4.style.IconImageCache.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},t$4.style.iconImageCache=new t$4.style.IconImageCache,t$4.style.Image=function(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.snapToPixel_=e.snapToPixel},t$4.style.Image.prototype.getOpacity=function(){return this.opacity_},t$4.style.Image.prototype.getRotateWithView=function(){return this.rotateWithView_},t$4.style.Image.prototype.getRotation=function(){return this.rotation_},t$4.style.Image.prototype.getScale=function(){return this.scale_},t$4.style.Image.prototype.getSnapToPixel=function(){return this.snapToPixel_},t$4.style.Image.prototype.getAnchor=function(){},t$4.style.Image.prototype.getImage=function(e){},t$4.style.Image.prototype.getHitDetectionImage=function(e){},t$4.style.Image.prototype.getImageState=function(){},t$4.style.Image.prototype.getImageSize=function(){},t$4.style.Image.prototype.getHitDetectionImageSize=function(){},t$4.style.Image.prototype.getOrigin=function(){},t$4.style.Image.prototype.getSize=function(){},t$4.style.Image.prototype.setOpacity=function(e){this.opacity_=e},t$4.style.Image.prototype.setRotateWithView=function(e){this.rotateWithView_=e},t$4.style.Image.prototype.setRotation=function(e){this.rotation_=e},t$4.style.Image.prototype.setScale=function(e){this.scale_=e},t$4.style.Image.prototype.setSnapToPixel=function(e){this.snapToPixel_=e},t$4.style.Image.prototype.listenImageChange=function(e,t){},t$4.style.Image.prototype.load=function(){},t$4.style.Image.prototype.unlistenImageChange=function(e,t){},t$4.style.RegularShape=function(e){this.checksums_=null,this.canvas_=null,this.hitDetectionCanvas_=null,this.fill_=void 0!==e.fill?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=void 0!==e.radius?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=void 0!==e.angle?e.angle:0,this.stroke_=void 0!==e.stroke?e.stroke:null,this.anchor_=null,this.size_=null,this.imageSize_=null,this.hitDetectionImageSize_=null,this.atlasManager_=e.atlasManager,this.render_(this.atlasManager_);var t=void 0===e.snapToPixel||e.snapToPixel,i=void 0!==e.rotateWithView&&e.rotateWithView;t$4.style.Image.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:1,snapToPixel:t})},t$4.inherits(t$4.style.RegularShape,t$4.style.Image),t$4.style.RegularShape.prototype.clone=function(){var e=new t$4.style.RegularShape({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),snapToPixel:this.getSnapToPixel(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),atlasManager:this.atlasManager_});return e.setOpacity(this.getOpacity()),e.setScale(this.getScale()),e},t$4.style.RegularShape.prototype.getAnchor=function(){return this.anchor_},t$4.style.RegularShape.prototype.getAngle=function(){return this.angle_},t$4.style.RegularShape.prototype.getFill=function(){return this.fill_},t$4.style.RegularShape.prototype.getHitDetectionImage=function(e){return this.hitDetectionCanvas_},t$4.style.RegularShape.prototype.getImage=function(e){return this.canvas_},t$4.style.RegularShape.prototype.getImageSize=function(){return this.imageSize_},t$4.style.RegularShape.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},t$4.style.RegularShape.prototype.getImageState=function(){return t$4.ImageState.LOADED},t$4.style.RegularShape.prototype.getOrigin=function(){return this.origin_},t$4.style.RegularShape.prototype.getPoints=function(){return this.points_},t$4.style.RegularShape.prototype.getRadius=function(){return this.radius_},t$4.style.RegularShape.prototype.getRadius2=function(){return this.radius2_},t$4.style.RegularShape.prototype.getSize=function(){return this.size_},t$4.style.RegularShape.prototype.getStroke=function(){return this.stroke_},t$4.style.RegularShape.prototype.listenImageChange=function(e,t){},t$4.style.RegularShape.prototype.load=function(){},t$4.style.RegularShape.prototype.unlistenImageChange=function(e,t){},t$4.style.RegularShape.prototype.render_=function(e){var t,i,n="",r="",o=0,a=null,s=0,l=0;this.stroke_&&(null===(i=this.stroke_.getColor())&&(i=t$4.render.canvas.defaultStrokeStyle),i=t$4.colorlike.asColorLike(i),void 0===(l=this.stroke_.getWidth())&&(l=t$4.render.canvas.defaultLineWidth),a=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset(),t$4.has.CANVAS_LINE_DASH||(a=null,s=0),void 0===(r=this.stroke_.getLineJoin())&&(r=t$4.render.canvas.defaultLineJoin),void 0===(n=this.stroke_.getLineCap())&&(n=t$4.render.canvas.defaultLineCap),void 0===(o=this.stroke_.getMiterLimit())&&(o=t$4.render.canvas.defaultMiterLimit));var u=2*(this.radius_+l)+1,c={strokeStyle:i,strokeWidth:l,size:u,lineCap:n,lineDash:a,lineDashOffset:s,lineJoin:r,miterLimit:o};if(void 0===e){var h=t$4.dom.createCanvasContext2D(u,u);this.canvas_=h.canvas,t=u=this.canvas_.width,this.draw_(c,h,0,0),this.createHitDetectionCanvas_(c)}else{u=Math.round(u);var d,f=!this.fill_;f&&(d=this.drawHitDetectionCanvas_.bind(this,c));var p=this.getChecksum(),_=e.add(p,u,u,this.draw_.bind(this,c),d);this.canvas_=_.image,this.origin_=[_.offsetX,_.offsetY],t=_.image.width,f?(this.hitDetectionCanvas_=_.hitImage,this.hitDetectionImageSize_=[_.hitImage.width,_.hitImage.height]):(this.hitDetectionCanvas_=this.canvas_,this.hitDetectionImageSize_=[t,t])}this.anchor_=[u/2,u/2],this.size_=[u,u],this.imageSize_=[t,t]},t$4.style.RegularShape.prototype.draw_=function(e,t,i,n){var r,o,a;t.setTransform(1,0,0,1,0,0),t.translate(i,n),t.beginPath();var s=this.points_;if(s===1/0)t.arc(e.size/2,e.size/2,this.radius_,0,2*Math.PI,!0);else{var l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(s*=2),r=0;r<=s;r++)o=2*r*Math.PI/s-Math.PI/2+this.angle_,a=r%2==0?this.radius_:l,t.lineTo(e.size/2+a*Math.cos(o),e.size/2+a*Math.sin(o))}if(this.fill_){var u=this.fill_.getColor();null===u&&(u=t$4.render.canvas.defaultFillStyle),t.fillStyle=t$4.colorlike.asColorLike(u),t.fill()}this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke()),t.closePath()},t$4.style.RegularShape.prototype.createHitDetectionCanvas_=function(e){if(this.hitDetectionImageSize_=[e.size,e.size],this.fill_)this.hitDetectionCanvas_=this.canvas_;else{var t=t$4.dom.createCanvasContext2D(e.size,e.size);this.hitDetectionCanvas_=t.canvas,this.drawHitDetectionCanvas_(e,t,0,0)}},t$4.style.RegularShape.prototype.drawHitDetectionCanvas_=function(e,t,i,n){t.setTransform(1,0,0,1,0,0),t.translate(i,n),t.beginPath();var r=this.points_;if(r===1/0)t.arc(e.size/2,e.size/2,this.radius_,0,2*Math.PI,!0);else{var o,a,s,l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(r*=2),o=0;o<=r;o++)s=2*o*Math.PI/r-Math.PI/2+this.angle_,a=o%2==0?this.radius_:l,t.lineTo(e.size/2+a*Math.cos(s),e.size/2+a*Math.sin(s))}t.fillStyle=t$4.render.canvas.defaultFillStyle,t.fill(),this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.stroke()),t.closePath()},t$4.style.RegularShape.prototype.getChecksum=function(){var e=this.stroke_?this.stroke_.getChecksum():"-",t=this.fill_?this.fill_.getChecksum():"-";if(!this.checksums_||e!=this.checksums_[1]||t!=this.checksums_[2]||this.radius_!=this.checksums_[3]||this.radius2_!=this.checksums_[4]||this.angle_!=this.checksums_[5]||this.points_!=this.checksums_[6]){var i="r"+e+t+(void 0!==this.radius_?this.radius_.toString():"-")+(void 0!==this.radius2_?this.radius2_.toString():"-")+(void 0!==this.angle_?this.angle_.toString():"-")+(void 0!==this.points_?this.points_.toString():"-");this.checksums_=[i,e,t,this.radius_,this.radius2_,this.angle_,this.points_]}return this.checksums_[0]},t$4.style.Circle=function(e){var t=e||{};t$4.style.RegularShape.call(this,{points:1/0,fill:t.fill,radius:t.radius,snapToPixel:t.snapToPixel,stroke:t.stroke,atlasManager:t.atlasManager})},t$4.inherits(t$4.style.Circle,t$4.style.RegularShape),t$4.style.Circle.prototype.clone=function(){var e=new t$4.style.Circle({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),snapToPixel:this.getSnapToPixel(),atlasManager:this.atlasManager_});return e.setOpacity(this.getOpacity()),e.setScale(this.getScale()),e},t$4.style.Circle.prototype.setRadius=function(e){this.radius_=e,this.render_(this.atlasManager_)},t$4.style.Fill=function(e){var t=e||{};this.color_=void 0!==t.color?t.color:null,this.checksum_=void 0},t$4.style.Fill.prototype.clone=function(){var e=this.getColor();return new t$4.style.Fill({color:e&&e.slice?e.slice():e||void 0})},t$4.style.Fill.prototype.getColor=function(){return this.color_},t$4.style.Fill.prototype.setColor=function(e){this.color_=e,this.checksum_=void 0},t$4.style.Fill.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.color_ instanceof CanvasPattern||this.color_ instanceof CanvasGradient?this.checksum_=t$4.getUid(this.color_).toString():this.checksum_="f"+(this.color_?t$4.color.asString(this.color_):"-")),this.checksum_},t$4.style.Stroke=function(e){var t=e||{};this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width,this.checksum_=void 0},t$4.style.Stroke.prototype.clone=function(){var e=this.getColor();return new t$4.style.Stroke({color:e&&e.slice?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t$4.style.Stroke.prototype.getColor=function(){return this.color_},t$4.style.Stroke.prototype.getLineCap=function(){return this.lineCap_},t$4.style.Stroke.prototype.getLineDash=function(){return this.lineDash_},t$4.style.Stroke.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t$4.style.Stroke.prototype.getLineJoin=function(){return this.lineJoin_},t$4.style.Stroke.prototype.getMiterLimit=function(){return this.miterLimit_},t$4.style.Stroke.prototype.getWidth=function(){return this.width_},t$4.style.Stroke.prototype.setColor=function(e){this.color_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineCap=function(e){this.lineCap_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineDash=function(e){this.lineDash_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineDashOffset=function(e){this.lineDashOffset_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineJoin=function(e){this.lineJoin_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setMiterLimit=function(e){this.miterLimit_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setWidth=function(e){this.width_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.checksum_="s",this.color_?"string"==typeof this.color_?this.checksum_+=this.color_:this.checksum_+=t$4.getUid(this.color_).toString():this.checksum_+="-",this.checksum_+=","+(void 0!==this.lineCap_?this.lineCap_.toString():"-")+","+(this.lineDash_?this.lineDash_.toString():"-")+","+(void 0!==this.lineDashOffset_?this.lineDashOffset_:"-")+","+(void 0!==this.lineJoin_?this.lineJoin_:"-")+","+(void 0!==this.miterLimit_?this.miterLimit_.toString():"-")+","+(void 0!==this.width_?this.width_.toString():"-")),this.checksum_},t$4.style.IconAnchorUnits={FRACTION:"fraction",PIXELS:"pixels"},t$4.style.IconImage=function(e,t,i,n,r,o){t$4.events.EventTarget.call(this),this.hitDetectionImage_=null,this.image_=e||new Image,null!==n&&(this.image_.crossOrigin=n),this.canvas_=o?document.createElement("CANVAS"):null,this.color_=o,this.imageListenerKeys_=null,this.imageState_=r,this.size_=i,this.src_=t,this.tainting_=!1,this.imageState_==t$4.ImageState.LOADED&&this.determineTainting_()},t$4.inherits(t$4.style.IconImage,t$4.events.EventTarget),t$4.style.IconImage.get=function(e,t,i,n,r,o){var a=t$4.style.iconImageCache,s=a.get(t,n,o);return s||(s=new t$4.style.IconImage(e,t,i,n,r,o),a.set(t,n,o,s)),s},t$4.style.IconImage.prototype.determineTainting_=function(){var e=t$4.dom.createCanvasContext2D(1,1);try{e.drawImage(this.image_,0,0),e.getImageData(0,0,1,1)}catch{this.tainting_=!0}},t$4.style.IconImage.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(t$4.events.EventType.CHANGE)},t$4.style.IconImage.prototype.handleImageError_=function(){this.imageState_=t$4.ImageState.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},t$4.style.IconImage.prototype.handleImageLoad_=function(){this.imageState_=t$4.ImageState.LOADED,this.size_&&(this.image_.width=this.size_[0],this.image_.height=this.size_[1]),this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.determineTainting_(),this.replaceColor_(),this.dispatchChangeEvent_()},t$4.style.IconImage.prototype.getImage=function(e){return this.canvas_?this.canvas_:this.image_},t$4.style.IconImage.prototype.getImageState=function(){return this.imageState_},t$4.style.IconImage.prototype.getHitDetectionImage=function(e){if(!this.hitDetectionImage_)if(this.tainting_){var t=this.size_[0],i=this.size_[1],n=t$4.dom.createCanvasContext2D(t,i);n.fillRect(0,0,t,i),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},t$4.style.IconImage.prototype.getSize=function(){return this.size_},t$4.style.IconImage.prototype.getSrc=function(){return this.src_},t$4.style.IconImage.prototype.load=function(){if(this.imageState_==t$4.ImageState.IDLE){this.imageState_=t$4.ImageState.LOADING,this.imageListenerKeys_=[t$4.events.listenOnce(this.image_,t$4.events.EventType.ERROR,this.handleImageError_,this),t$4.events.listenOnce(this.image_,t$4.events.EventType.LOAD,this.handleImageLoad_,this)];try{this.image_.src=this.src_}catch{this.handleImageError_()}}},t$4.style.IconImage.prototype.replaceColor_=function(){if(!this.tainting_&&null!==this.color_){this.canvas_.width=this.image_.width,this.canvas_.height=this.image_.height;var e=this.canvas_.getContext("2d");e.drawImage(this.image_,0,0);for(var t=e.getImageData(0,0,this.image_.width,this.image_.height),i=t.data,n=this.color_[0]/255,r=this.color_[1]/255,o=this.color_[2]/255,a=0,s=i.length;a<s;a+=4)i[a]*=n,i[a+1]*=r,i[a+2]*=o;e.putImageData(t,0,0)}},t$4.style.IconImage.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(t$4.events.unlistenByKey),this.imageListenerKeys_=null},t$4.style.IconOrigin={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},t$4.style.Icon=function(e){var t=e||{};this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:t$4.style.IconOrigin.TOP_LEFT,this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:t$4.style.IconAnchorUnits.FRACTION,this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:t$4.style.IconAnchorUnits.FRACTION,this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;var i=void 0!==t.img?t.img:null,n=void 0!==t.imgSize?t.imgSize:null,r=t.src;(void 0===r||0===r.length)&&i&&(r=i.src||t$4.getUid(i).toString());var o=void 0!==t.src?t$4.ImageState.IDLE:t$4.ImageState.LOADED;this.color_=void 0!==t.color?t$4.color.asArray(t.color):null,this.iconImage_=t$4.style.IconImage.get(i,r,n,this.crossOrigin_,o,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:t$4.style.IconOrigin.TOP_LEFT,this.origin_=null,this.size_=void 0!==t.size?t.size:null;var a=void 0!==t.opacity?t.opacity:1,s=void 0!==t.rotateWithView&&t.rotateWithView,l=void 0!==t.rotation?t.rotation:0,u=void 0!==t.scale?t.scale:1,c=void 0===t.snapToPixel||t.snapToPixel;t$4.style.Image.call(this,{opacity:a,rotation:l,scale:u,snapToPixel:c,rotateWithView:s})},t$4.inherits(t$4.style.Icon,t$4.style.Image),t$4.style.Icon.prototype.clone=function(){return new t$4.style.Icon({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:this.getScale(),snapToPixel:this.getSnapToPixel(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},t$4.style.Icon.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var e=this.anchor_,t=this.getSize();if(this.anchorXUnits_==t$4.style.IconAnchorUnits.FRACTION||this.anchorYUnits_==t$4.style.IconAnchorUnits.FRACTION){if(!t)return null;e=this.anchor_.slice(),this.anchorXUnits_==t$4.style.IconAnchorUnits.FRACTION&&(e[0]*=t[0]),this.anchorYUnits_==t$4.style.IconAnchorUnits.FRACTION&&(e[1]*=t[1])}if(this.anchorOrigin_!=t$4.style.IconOrigin.TOP_LEFT){if(!t)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_==t$4.style.IconOrigin.TOP_RIGHT||this.anchorOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[0]=-e[0]+t[0]),(this.anchorOrigin_==t$4.style.IconOrigin.BOTTOM_LEFT||this.anchorOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[1]=-e[1]+t[1])}return this.normalizedAnchor_=e,this.normalizedAnchor_},t$4.style.Icon.prototype.getColor=function(){return this.color_},t$4.style.Icon.prototype.getImage=function(e){return this.iconImage_.getImage(e)},t$4.style.Icon.prototype.getImageSize=function(){return this.iconImage_.getSize()},t$4.style.Icon.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},t$4.style.Icon.prototype.getImageState=function(){return this.iconImage_.getImageState()},t$4.style.Icon.prototype.getHitDetectionImage=function(e){return this.iconImage_.getHitDetectionImage(e)},t$4.style.Icon.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var e=this.offset_;if(this.offsetOrigin_!=t$4.style.IconOrigin.TOP_LEFT){var t=this.getSize(),i=this.iconImage_.getSize();if(!t||!i)return null;e=e.slice(),(this.offsetOrigin_==t$4.style.IconOrigin.TOP_RIGHT||this.offsetOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[0]=i[0]-t[0]-e[0]),(this.offsetOrigin_==t$4.style.IconOrigin.BOTTOM_LEFT||this.offsetOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[1]=i[1]-t[1]-e[1])}return this.origin_=e,this.origin_},t$4.style.Icon.prototype.getSrc=function(){return this.iconImage_.getSrc()},t$4.style.Icon.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},t$4.style.Icon.prototype.listenImageChange=function(e,t){return t$4.events.listen(this.iconImage_,t$4.events.EventType.CHANGE,e,t)},t$4.style.Icon.prototype.load=function(){this.iconImage_.load()},t$4.style.Icon.prototype.unlistenImageChange=function(e,t){t$4.events.unlisten(this.iconImage_,t$4.events.EventType.CHANGE,e,t)},t$4.style.Text=function(e){var t=e||{};this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.text_=t.text,this.textAlign_=t.textAlign,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new t$4.style.Fill({color:t$4.style.Text.DEFAULT_FILL_COLOR_}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:t$4.style.TextPlacement.POINT;var i=void 0===t.overflow?t.exceedLength:t.overflow;this.overflow_=void 0!==i&&i,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding},t$4.style.Text.DEFAULT_FILL_COLOR_="#333",t$4.style.Text.prototype.clone=function(){return new t$4.style.Text({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:this.getScale(),text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY()})},t$4.style.Text.prototype.getOverflow=function(){return this.overflow_},t$4.style.Text.prototype.getFont=function(){return this.font_},t$4.style.Text.prototype.getMaxAngle=function(){return this.maxAngle_},t$4.style.Text.prototype.getPlacement=function(){return this.placement_},t$4.style.Text.prototype.getOffsetX=function(){return this.offsetX_},t$4.style.Text.prototype.getOffsetY=function(){return this.offsetY_},t$4.style.Text.prototype.getFill=function(){return this.fill_},t$4.style.Text.prototype.getRotateWithView=function(){return this.rotateWithView_},t$4.style.Text.prototype.getRotation=function(){return this.rotation_},t$4.style.Text.prototype.getScale=function(){return this.scale_},t$4.style.Text.prototype.getStroke=function(){return this.stroke_},t$4.style.Text.prototype.getText=function(){return this.text_},t$4.style.Text.prototype.getTextAlign=function(){return this.textAlign_},t$4.style.Text.prototype.getTextBaseline=function(){return this.textBaseline_},t$4.style.Text.prototype.getBackgroundFill=function(){return this.backgroundFill_},t$4.style.Text.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t$4.style.Text.prototype.getPadding=function(){return this.padding_},t$4.style.Text.prototype.setOverflow=function(e){this.overflow_=e},t$4.style.Text.prototype.setFont=function(e){this.font_=e},t$4.style.Text.prototype.setMaxAngle=function(e){this.maxAngle_=e},t$4.style.Text.prototype.setOffsetX=function(e){this.offsetX_=e},t$4.style.Text.prototype.setOffsetY=function(e){this.offsetY_=e},t$4.style.Text.prototype.setPlacement=function(e){this.placement_=e},t$4.style.Text.prototype.setFill=function(e){this.fill_=e},t$4.style.Text.prototype.setRotation=function(e){this.rotation_=e},t$4.style.Text.prototype.setScale=function(e){this.scale_=e},t$4.style.Text.prototype.setStroke=function(e){this.stroke_=e},t$4.style.Text.prototype.setText=function(e){this.text_=e},t$4.style.Text.prototype.setTextAlign=function(e){this.textAlign_=e},t$4.style.Text.prototype.setTextBaseline=function(e){this.textBaseline_=e},t$4.style.Text.prototype.setBackgroundFill=function(e){this.backgroundFill_=e},t$4.style.Text.prototype.setBackgroundStroke=function(e){this.backgroundStroke_=e},t$4.style.Text.prototype.setPadding=function(e){this.padding_=e},t$4.style.Style=function(e){var t=e||{};this.geometry_=null,this.geometryFunction_=t$4.style.Style.defaultGeometryFunction,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex},t$4.style.Style.prototype.clone=function(){var e=this.getGeometry();return e&&e.clone&&(e=e.clone()),new t$4.style.Style({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t$4.style.Style.prototype.getRenderer=function(){return this.renderer_},t$4.style.Style.prototype.setRenderer=function(e){this.renderer_=e},t$4.style.Style.prototype.getGeometry=function(){return this.geometry_},t$4.style.Style.prototype.getGeometryFunction=function(){return this.geometryFunction_},t$4.style.Style.prototype.getFill=function(){return this.fill_},t$4.style.Style.prototype.setFill=function(e){this.fill_=e},t$4.style.Style.prototype.getImage=function(){return this.image_},t$4.style.Style.prototype.setImage=function(e){this.image_=e},t$4.style.Style.prototype.getStroke=function(){return this.stroke_},t$4.style.Style.prototype.setStroke=function(e){this.stroke_=e},t$4.style.Style.prototype.getText=function(){return this.text_},t$4.style.Style.prototype.setText=function(e){this.text_=e},t$4.style.Style.prototype.getZIndex=function(){return this.zIndex_},t$4.style.Style.prototype.setGeometry=function(e){"function"==typeof e?this.geometryFunction_=e:"string"==typeof e?this.geometryFunction_=function(t){return t.get(e)}:e?void 0!==e&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=t$4.style.Style.defaultGeometryFunction,this.geometry_=e},t$4.style.Style.prototype.setZIndex=function(e){this.zIndex_=e},t$4.style.Style.createFunction=function(e){var t,i;"function"==typeof e?t=e:(Array.isArray(e)?i=e:(t$4.asserts.assert(e instanceof t$4.style.Style,41),i=[e]),t=function(){return i});return t},t$4.style.Style.default_=null,t$4.style.Style.defaultFunction=function(e,t){if(!t$4.style.Style.default_){var i=new t$4.style.Fill({color:"rgba(255,255,255,0.4)"}),n=new t$4.style.Stroke({color:"#3399CC",width:1.25});t$4.style.Style.default_=[new t$4.style.Style({image:new t$4.style.Circle({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return t$4.style.Style.default_},t$4.style.Style.createDefaultEditing=function(){var e={},t=[255,255,255,1],i=[0,153,255,1];return e[t$4.geom.GeometryType.POLYGON]=[new t$4.style.Style({fill:new t$4.style.Fill({color:[255,255,255,.5]})})],e[t$4.geom.GeometryType.MULTI_POLYGON]=e[t$4.geom.GeometryType.POLYGON],e[t$4.geom.GeometryType.LINE_STRING]=[new t$4.style.Style({stroke:new t$4.style.Stroke({color:t,width:5})}),new t$4.style.Style({stroke:new t$4.style.Stroke({color:i,width:3})})],e[t$4.geom.GeometryType.MULTI_LINE_STRING]=e[t$4.geom.GeometryType.LINE_STRING],e[t$4.geom.GeometryType.CIRCLE]=e[t$4.geom.GeometryType.POLYGON].concat(e[t$4.geom.GeometryType.LINE_STRING]),e[t$4.geom.GeometryType.POINT]=[new t$4.style.Style({image:new t$4.style.Circle({radius:6,fill:new t$4.style.Fill({color:i}),stroke:new t$4.style.Stroke({color:t,width:1.5})}),zIndex:1/0})],e[t$4.geom.GeometryType.MULTI_POINT]=e[t$4.geom.GeometryType.POINT],e[t$4.geom.GeometryType.GEOMETRY_COLLECTION]=e[t$4.geom.GeometryType.POLYGON].concat(e[t$4.geom.GeometryType.LINE_STRING],e[t$4.geom.GeometryType.POINT]),e},t$4.style.Style.defaultGeometryFunction=function(e){return e.getGeometry()},t$4.ext={},t$4.ext.rbush=function(){},function(){!function(e){var t=n,i=n;function n(e,t,i,n,o){r(e,t,i||0,n||e.length-1,o||a)}function r(e,t,i,n,a){for(;n>i;){if(n-i>600){var s=n-i+1,l=t-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);r(e,t,Math.max(i,Math.floor(t-l*c/s+h)),Math.min(n,Math.floor(t+(s-l)*c/s+h)),a)}var d=e[t],f=i,p=n;for(o(e,i,t),a(e[n],d)>0&&o(e,i,n);f<p;){for(o(e,f,p),f++,p--;a(e[f],d)<0;)f++;for(;a(e[p],d)>0;)p--}0===a(e[i],d)?o(e,i,p):o(e,++p,n),p<=t&&(i=p+1),t<=p&&(n=p-1)}}function o(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function a(e,t){return e<t?-1:e>t?1:0}t.default=i;var s=l;function l(e,t){if(!(this instanceof l))return new l(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function u(e,t,i){if(!i)return t.indexOf(e);for(var n=0;n<t.length;n++)if(i(e,t[n]))return n;return-1}function c(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,n,r){r||(r=$(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=t;a<i;a++)o=e.children[a],d(r,e.leaf?n(o):o);return r}function d(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function f(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function _(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function x(e,t){var i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function $(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(e,i,n,r,o){for(var a,s=[i,n];s.length;)!((n=s.pop())-(i=s.pop())<=r)&&(a=i+Math.ceil((n-i)/r/2)*r,t(e,a,i,n,o),s.push(i,a,a,n))}l.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,i=[],n=this.toBBox;if(!v(e,t))return i;for(var r,o,a,s,l=[];t;){for(r=0,o=t.children.length;r<o;r++)a=t.children[r],v(e,s=t.leaf?n(a):a)&&(t.leaf?i.push(a):y(e,s)?this._all(a,i):l.push(a));t=l.pop()}return i},collides:function(e){var t=this.data,i=this.toBBox;if(!v(e,t))return!1;for(var n,r,o,a,s=[];t;){for(n=0,r=t.children.length;n<r;n++)if(o=t.children[n],v(e,a=t.leaf?i(o):o)){if(t.leaf||y(e,a))return!0;s.push(o)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=$([]),this},remove:function(e,t){if(!e)return this;for(var i,n,r,o,a=this.data,s=this.toBBox(e),l=[],c=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=c.pop(),o=!0),a.leaf&&-1!==(r=u(e,a.children,t)))return a.children.splice(r,1),l.push(a),this._condense(l),this;o||a.leaf||!y(a,s)?n?(i++,a=n.children[i],o=!1):a=null:(l.push(a),c.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:f,compareMinY:p,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},_build:function(e,t,i,n){var r,o=i-t+1,a=this._maxEntries;if(o<=a)return c(r=$(e.slice(t,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=$([])).leaf=!1,r.height=n;var s,l,u,h,d=Math.ceil(o/a),f=d*Math.ceil(Math.sqrt(a));for(b(e,t,i,f,this.compareMinX),s=t;s<=i;s+=f)for(b(e,s,u=Math.min(s+f-1,i),d,this.compareMinY),l=s;l<=u;l+=d)h=Math.min(l+d-1,u),r.children.push(this._build(e,l,h,n-1));return c(r,this.toBBox),r},_chooseSubtree:function(e,t,i,n){for(var r,o,a,s,l,u,c,h;n.push(t),!t.leaf&&n.length-1!==i;){for(c=h=1/0,r=0,o=t.children.length;r<o;r++)l=_(a=t.children[r]),(u=g(e,a)-l)<h?(h=u,c=l<c?l:c,s=a):u===h&&l<c&&(c=l,s=a);t=s||t.children[0]}return t},_insert:function(e,t,i){var n=this.toBBox,r=i?e:n(e),o=[],a=this._chooseSubtree(r,this.data,t,o);for(a.children.push(e),d(a,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},_split:function(e,t){var i=e[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=$(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,c(i,this.toBBox),c(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(e,t){this.data=$([e,t]),this.data.height=e.height+1,this.data.leaf=!1,c(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,i){var n,r,o,a,s,l,u,c;for(l=u=1/0,n=t;n<=i-t;n++)a=x(r=h(e,0,n,this.toBBox),o=h(e,n,i,this.toBBox)),s=_(r)+_(o),a<l?(l=a,c=n,u=s<u?s:u):a===l&&s<u&&(u=s,c=n);return c},_chooseSplitAxis:function(e,t,i){var n=e.leaf?this.compareMinX:f,r=e.leaf?this.compareMinY:p;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)},_allDistMargin:function(e,t,i,n){e.children.sort(n);var r,o,a=this.toBBox,s=h(e,0,t,a),l=h(e,i-t,i,a),u=m(s)+m(l);for(r=t;r<i-t;r++)o=e.children[r],d(s,e.leaf?a(o):o),u+=m(s);for(r=i-t-1;r>=t;r--)o=e.children[r],d(l,e.leaf?a(o):o),u+=m(l);return u},_adjustParentBBoxes:function(e,t,i){for(var n=i;n>=0;n--)d(t[n],e)},_condense:function(e){for(var t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children).splice(t.indexOf(e[i]),1):this.clear():c(e[i],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}},e.default=s}(this.rbush=this.rbush||{})}.call(t$4.ext),t$4.ext.rbush=t$4.ext.rbush.default,t$4.render={},t$4.render.VectorContext=function(){},t$4.render.VectorContext.prototype.drawCustom=function(e,t,i){},t$4.render.VectorContext.prototype.drawGeometry=function(e){},t$4.render.VectorContext.prototype.setStyle=function(e){},t$4.render.VectorContext.prototype.drawCircle=function(e,t){},t$4.render.VectorContext.prototype.drawFeature=function(e,t){},t$4.render.VectorContext.prototype.drawGeometryCollection=function(e,t){},t$4.render.VectorContext.prototype.drawLineString=function(e,t){},t$4.render.VectorContext.prototype.drawMultiLineString=function(e,t){},t$4.render.VectorContext.prototype.drawMultiPoint=function(e,t){},t$4.render.VectorContext.prototype.drawMultiPolygon=function(e,t){},t$4.render.VectorContext.prototype.drawPoint=function(e,t){},t$4.render.VectorContext.prototype.drawPolygon=function(e,t){},t$4.render.VectorContext.prototype.drawText=function(e,t){},t$4.render.VectorContext.prototype.setFillStrokeStyle=function(e,t){},t$4.render.VectorContext.prototype.setImageStyle=function(e,t){},t$4.render.VectorContext.prototype.setTextStyle=function(e,t){},t$4.render.ReplayGroup={},t$4.render.ReplayGroup=function(){},t$4.render.ReplayGroup.prototype.getReplay=function(e,t){},t$4.render.ReplayGroup.prototype.isEmpty=function(){},t$4.render.ReplayType={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"},t$4.geom.flat.length={},t$4.geom.flat.length.lineString=function(e,t,i,n){var r,o=e[t],a=e[t+1],s=0;for(r=t+n;r<i;r+=n){var l=e[r],u=e[r+1];s+=Math.sqrt((l-o)*(l-o)+(u-a)*(u-a)),o=l,a=u}return s},t$4.geom.flat.length.linearRing=function(e,t,i,n){var r=t$4.geom.flat.length.lineString(e,t,i,n),o=e[i-n]-e[t],a=e[i-n+1]-e[t+1];return r+=Math.sqrt(o*o+a*a)},t$4.geom.flat.textpath={},t$4.geom.flat.textpath.lineString=function(e,t,i,n,r,o,a,s){for(var l,u,c,h=[],d=e[t]>e[i-n],f=r.length,p=e[t],_=e[t+1],m=e[t+=n],g=e[t+1],x=0,y=Math.sqrt(Math.pow(m-p,2)+Math.pow(g-_,2)),v="",$=0,b=0;b<f;++b){u=d?f-b-1:b;var T=r.charAt(u),C=o(v=d?T+v:v+T)-$;$+=C;for(var S=a+C/2;t<i-n&&x+y<S;)p=m,_=g,m=e[t+=n],g=e[t+1],x+=y,y=Math.sqrt(Math.pow(m-p,2)+Math.pow(g-_,2));var w=S-x,E=Math.atan2(g-_,m-p);if(d&&(E+=E>0?-Math.PI:Math.PI),void 0!==c){var P=E-c;if(P+=P>Math.PI?-2*Math.PI:P<-Math.PI?2*Math.PI:0,Math.abs(P)>s)return null}var A=w/y,L=t$4.math.lerp(p,m,A),M=t$4.math.lerp(_,g,A);c==E?(d&&(l[0]=L,l[1]=M,l[2]=C/2),l[4]=v):($=C,l=[L,M,C/2,E,v=T],d?h.unshift(l):h.push(l),c=E),a+=C}return h},t$4.structs.LRUCache=function(e){t$4.events.EventTarget.call(this),this.highWaterMark=void 0!==e?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t$4.inherits(t$4.structs.LRUCache,t$4.events.EventTarget),t$4.structs.LRUCache.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark},t$4.structs.LRUCache.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null,this.dispatchEvent(t$4.events.EventType.CLEAR)},t$4.structs.LRUCache.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},t$4.structs.LRUCache.prototype.forEach=function(e,t){for(var i=this.oldest_;i;)e.call(t,i.value_,i.key_,this),i=i.newer},t$4.structs.LRUCache.prototype.get=function(e){var t=this.entries_[e];return t$4.asserts.assert(void 0!==t,15),t===this.newest_||(t===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(t.newer.older=t.older,t.older.newer=t.newer),t.newer=null,t.older=this.newest_,this.newest_.newer=t,this.newest_=t),t.value_},t$4.structs.LRUCache.prototype.remove=function(e){var t=this.entries_[e];return t$4.asserts.assert(void 0!==t,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_},t$4.structs.LRUCache.prototype.getCount=function(){return this.count_},t$4.structs.LRUCache.prototype.getKeys=function(){var e,t=new Array(this.count_),i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t},t$4.structs.LRUCache.prototype.getValues=function(){var e,t=new Array(this.count_),i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t},t$4.structs.LRUCache.prototype.peekLast=function(){return this.oldest_.value_},t$4.structs.LRUCache.prototype.peekLastKey=function(){return this.oldest_.key_},t$4.structs.LRUCache.prototype.peekFirstKey=function(){return this.newest_.key_},t$4.structs.LRUCache.prototype.pop=function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_},t$4.structs.LRUCache.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},t$4.structs.LRUCache.prototype.set=function(e,t){t$4.asserts.assert(!(e in this.entries_),16);var i={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_},t$4.structs.LRUCache.prototype.prune=function(){for(;this.canExpireCache();)this.pop()},t$4.render.canvas={},t$4.render.canvas.defaultFont="10px sans-serif",t$4.render.canvas.defaultFillStyle=[0,0,0,1],t$4.render.canvas.defaultLineCap="round",t$4.render.canvas.defaultLineDash=[],t$4.render.canvas.defaultLineDashOffset=0,t$4.render.canvas.defaultLineJoin="round",t$4.render.canvas.defaultMiterLimit=10,t$4.render.canvas.defaultStrokeStyle=[0,0,0,1],t$4.render.canvas.defaultTextAlign="center",t$4.render.canvas.defaultTextBaseline="middle",t$4.render.canvas.defaultPadding=[0,0,0,0],t$4.render.canvas.defaultLineWidth=1,t$4.render.canvas.labelCache=new t$4.structs.LRUCache,t$4.render.canvas.checkedFonts_={},t$4.render.canvas.measureContext_=null,t$4.render.canvas.textHeights_={},t$4.render.canvas.checkFont=function(){var e,t,i=t$4.render.canvas.checkedFonts_,n=t$4.render.canvas.labelCache,r="wmytzilWMYTZIL@#/&?$%10";function o(e){var i=t$4.render.canvas.getMeasureContext();i.font="32px monospace",t=i.measureText(r).width;var n=!0;"monospace"!=e&&(i.font="32px "+e+",monospace",n=i.measureText(r).width!=t);return n}function a(){var t=!0;for(var r in i)i[r]<60&&(o(r)?(i[r]=60,t$4.obj.clear(t$4.render.canvas.textHeights_),t$4.render.canvas.measureContext_=null,n.clear()):(++i[r],t=!1));t&&(window.clearInterval(e),e=void 0)}return function(t){var n=t$4.css.getFontFamilies(t);if(n)for(var r=0,s=n.length;r<s;++r){var l=n[r];l in i||(i[l]=60,o(l)||(i[l]=0,void 0===e&&(e=window.setInterval(a,32))))}}}(),t$4.render.canvas.getMeasureContext=function(){var e=t$4.render.canvas.measureContext_;return e||(e=t$4.render.canvas.measureContext_=t$4.dom.createCanvasContext2D(1,1)),e},t$4.render.canvas.measureTextHeight=function(){var e=t$4.render.canvas.textHeights_;return function(t){var i=e[t];return null==i&&(i=e[t]=19),i}}(),t$4.render.canvas.measureTextWidth=function(e,t){var i=t$4.render.canvas.getMeasureContext();return e!=i.font&&(i.font=e),i.measureText(t).width},t$4.render.canvas.rotateAtOffset=function(e,t,i,n){0!==t&&(e.translate(i,n),e.rotate(t),e.translate(-i,-n))},t$4.render.canvas.resetTransform_=t$4.transform.create(),t$4.render.canvas.drawImage=function(e,t,i,n,r,o,a,s,l,u,c){var h;1!=i&&(h=e.globalAlpha,e.globalAlpha=h*i),t&&e.setTransform.apply(e,t),e.drawImage(n,r,o,a,s,l,u,a*c,s*c),h&&(e.globalAlpha=h),t&&e.setTransform.apply(e,t$4.render.canvas.resetTransform_)},t$4.render.canvas.Instruction={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},t$4.render.replay={},t$4.render.replay.ORDER=[t$4.render.ReplayType.POLYGON,t$4.render.ReplayType.CIRCLE,t$4.render.ReplayType.LINE_STRING,t$4.render.ReplayType.IMAGE,t$4.render.ReplayType.TEXT,t$4.render.ReplayType.DEFAULT],t$4.render.replay.TEXT_ALIGN={},t$4.render.replay.TEXT_ALIGN.left=0,t$4.render.replay.TEXT_ALIGN.end=0,t$4.render.replay.TEXT_ALIGN.center=.5,t$4.render.replay.TEXT_ALIGN.right=1,t$4.render.replay.TEXT_ALIGN.start=1,t$4.render.replay.TEXT_ALIGN.top=0,t$4.render.replay.TEXT_ALIGN.middle=.5,t$4.render.replay.TEXT_ALIGN.hanging=.2,t$4.render.replay.TEXT_ALIGN.alphabetic=.8,t$4.render.replay.TEXT_ALIGN.ideographic=.8,t$4.render.replay.TEXT_ALIGN.bottom=1,t$4.render.canvas.Replay=function(e,t,i,n,r,o){t$4.render.VectorContext.call(this),this.declutterTree=o,this.tmpExtent_=t$4.extent.createEmpty(),this.tolerance=e,this.maxExtent=t,this.overlaps=r,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.fillOrigin_,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.coordinateCache_={},this.renderedTransform_=t$4.transform.create(),this.hitDetectionInstructions=[],this.pixelCoordinates_=null,this.state={},this.viewRotation_=0,this.tmpLocalTransform_=t$4.transform.create(),this.resetTransform_=t$4.transform.create()},t$4.inherits(t$4.render.canvas.Replay,t$4.render.VectorContext),t$4.render.canvas.Replay.prototype.replayTextBackground_=function(e,t,i,n,r,o,a){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,i),e.lineTo.apply(e,n),e.lineTo.apply(e,r),e.lineTo.apply(e,t),o&&(this.fillOrigin_=o[2],this.fill_(e)),a&&(this.setStrokeStyle_(e,a),e.stroke())},t$4.render.canvas.Replay.prototype.replayImage_=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g){var x=m||g,y=this.tmpLocalTransform_;t-=r*=d,i-=o*=d,f&&(t=Math.round(t),i=Math.round(i));var v,$,b,T,C=p+u>n.width?n.width-u:p,S=s+c>n.height?n.height-c:s,w=this.tmpExtent_,E=_[3]+C*d+_[1],P=_[0]+S*d+_[2],A=t-_[3],L=i-_[0];(x||0!==h)&&(v=[A,L],$=[A+E,L],b=[A+E,L+P],T=[A,L+P]);var M=null;if(0!==h){var R=t+r,O=i+o;M=t$4.transform.compose(y,R,O,1,1,h,-R,-O),t$4.extent.createOrUpdateEmpty(w),t$4.extent.extendCoordinate(w,t$4.transform.apply(y,v)),t$4.extent.extendCoordinate(w,t$4.transform.apply(y,$)),t$4.extent.extendCoordinate(w,t$4.transform.apply(y,b)),t$4.extent.extendCoordinate(w,t$4.transform.apply(y,T))}else t$4.extent.createOrUpdate(A,L,A+E,L+P,w);var D=e.canvas,I=w[0]<=D.width&&w[2]>=0&&w[1]<=D.height&&w[3]>=0;if(a){if(!I&&1==a[4])return;t$4.extent.extend(a,w);var F=I?[e,M?M.slice(0):null,l,n,u,c,C,S,t,i,d]:null;F&&x&&F.push(m,g,v,$,b,T),a.push(F)}else I&&(x&&this.replayTextBackground_(e,v,$,b,T,m,g),t$4.render.canvas.drawImage(e,M,l,n,u,c,C,S,t,i,d))},t$4.render.canvas.Replay.prototype.applyPixelRatio=function(e){var t=this.pixelRatio;return 1==t?e:e.map((function(e){return e*t}))},t$4.render.canvas.Replay.prototype.appendFlatCoordinates=function(e,t,i,n,r,o){var a=this.coordinates.length,s=this.getBufferedMaxExtent();o&&(t+=n);var l,u,c,h=[e[t],e[t+1]],d=[NaN,NaN],f=!0;for(l=t+n;l<i;l+=n)d[0]=e[l],d[1]=e[l+1],(c=t$4.extent.coordinateRelationship(s,d))!==u?(f&&(this.coordinates[a++]=h[0],this.coordinates[a++]=h[1]),this.coordinates[a++]=d[0],this.coordinates[a++]=d[1],f=!1):c===t$4.extent.Relationship.INTERSECTING?(this.coordinates[a++]=d[0],this.coordinates[a++]=d[1],f=!1):f=!0,h[0]=d[0],h[1]=d[1],u=c;return(r&&f||l===t+n)&&(this.coordinates[a++]=h[0],this.coordinates[a++]=h[1]),a},t$4.render.canvas.Replay.prototype.drawCustomCoordinates_=function(e,t,i,n,r){for(var o=0,a=i.length;o<a;++o){var s=i[o],l=this.appendFlatCoordinates(e,t,s,n,!1,!1);r.push(l),t=s}return t},t$4.render.canvas.Replay.prototype.drawCustom=function(e,t,i){this.beginGeometry(e,t);var n,r,o,a,s,l=e.getType(),u=e.getStride(),c=this.coordinates.length;if(l==t$4.geom.GeometryType.MULTI_POLYGON){n=(e=e).getOrientedFlatCoordinates(),a=[];var h=e.getEndss();s=0;for(var d=0,f=h.length;d<f;++d){var p=[];s=this.drawCustomCoordinates_(n,s,h[d],u,p),a.push(p)}this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,a,e,i,t$4.geom.flat.inflate.coordinatesss])}else l==t$4.geom.GeometryType.POLYGON||l==t$4.geom.GeometryType.MULTI_LINE_STRING?(o=[],n=l==t$4.geom.GeometryType.POLYGON?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),s=this.drawCustomCoordinates_(n,0,e.getEnds(),u,o),this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,o,e,i,t$4.geom.flat.inflate.coordinatess])):l==t$4.geom.GeometryType.LINE_STRING||l==t$4.geom.GeometryType.MULTI_POINT?(n=e.getFlatCoordinates(),r=this.appendFlatCoordinates(n,0,n.length,u,!1,!1),this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,r,e,i,t$4.geom.flat.inflate.coordinates])):l==t$4.geom.GeometryType.POINT&&(n=e.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),r=this.coordinates.length,this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,r,e,i]));this.endGeometry(e,t)},t$4.render.canvas.Replay.prototype.beginGeometry=function(e,t){this.beginGeometryInstruction1_=[t$4.render.canvas.Instruction.BEGIN_GEOMETRY,t,0],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[t$4.render.canvas.Instruction.BEGIN_GEOMETRY,t,0],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},t$4.render.canvas.Replay.prototype.fill_=function(e){if(this.fillOrigin_){var t=t$4.transform.apply(this.renderedTransform_,this.fillOrigin_.slice());e.translate(t[0],t[1]),e.rotate(this.viewRotation_)}e.fill(),this.fillOrigin_&&e.setTransform.apply(e,t$4.render.canvas.resetTransform_)},t$4.render.canvas.Replay.prototype.setStrokeStyle_=function(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],t$4.has.CANVAS_LINE_DASH&&(e.lineDashOffset=t[7],e.setLineDash(t[6]))},t$4.render.canvas.Replay.prototype.renderDeclutter_=function(e,t){if(e&&e.length>5){var i=e[4];if(1==i||i==e.length-5){var n={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};if(!this.declutterTree.collides(n)){this.declutterTree.insert(n);for(var r=t$4.render.canvas.drawImage,o=5,a=e.length;o<a;++o){var s=e[o];s&&(s.length>11&&this.replayTextBackground_(s[0],s[13],s[14],s[15],s[16],s[11],s[12]),r.apply(void 0,s))}}e.length=5,t$4.extent.createOrUpdateEmpty(e)}}},t$4.render.canvas.Replay.prototype.replay_=function(e,t,i,n,r,o){var a;this.pixelCoordinates_&&t$4.array.equals(t,this.renderedTransform_)?a=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),a=t$4.geom.flat.transform.transform2D(this.coordinates,0,this.coordinates.length,2,t,this.pixelCoordinates_),t$4.transform.setFromArray(this.renderedTransform_,t));for(var s,l,u,c,h,d,f,p,_,m=!t$4.obj.isEmpty(i),g=0,x=n.length,y=0,v=0,$=0,b=null,T=null,C=this.coordinateCache_,S=this.viewRotation_,w={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:S},E=this.instructions!=n||this.overlaps?0:200;g<x;){var P,A,L,M=n[g];switch(M[0]){case t$4.render.canvas.Instruction.BEGIN_GEOMETRY:P=M[1],m&&i[t$4.getUid(P).toString()]||!P.getGeometry()?g=M[2]:void 0===o||t$4.extent.intersects(o,P.getGeometry().getExtent())?++g:g=M[2]+1;break;case t$4.render.canvas.Instruction.BEGIN_PATH:v>E&&(this.fill_(e),v=0),$>E&&(e.stroke(),$=0),!v&&!$&&(e.beginPath(),c=h=NaN),++g;break;case t$4.render.canvas.Instruction.CIRCLE:var R=a[y=M[1]],O=a[y+1],D=a[y+2]-R,I=a[y+3]-O,F=Math.sqrt(D*D+I*I);e.moveTo(R+F,O),e.arc(R,O,F,0,2*Math.PI,!0),++g;break;case t$4.render.canvas.Instruction.CLOSE_PATH:e.closePath(),++g;break;case t$4.render.canvas.Instruction.CUSTOM:y=M[1],s=M[2];var B=M[3],N=M[4],G=6==M.length?M[5]:void 0;w.geometry=B,w.feature=P,g in C||(C[g]=[]);var z=C[g];G?G(a,y,s,2,z):(z[0]=a[y],z[1]=a[y+1],z.length=2),N(z,w),++g;break;case t$4.render.canvas.Instruction.DRAW_IMAGE:y=M[1],s=M[2],_=M[3],l=M[4],u=M[5],p=r?null:M[6];var U,V,k,W=M[7],H=M[8],q=M[9],j=M[10],X=M[11],Y=M[12],Z=M[13],K=M[14],Q=M[15];for(M.length>16?(U=M[16],V=M[17],k=M[18]):(U=t$4.render.canvas.defaultPadding,V=k=!1),X&&(Y+=S);y<s;y+=2)this.replayImage_(e,a[y],a[y+1],_,l,u,p,W,H,q,j,Y,Z,K,Q,U,V?b:null,k?T:null);this.renderDeclutter_(p,P),++g;break;case t$4.render.canvas.Instruction.DRAW_CHARS:var J=M[1],ee=M[2],te=M[3];p=r?null:M[4];var ie=M[5],ne=M[6],re=M[7],oe=M[8],ae=M[9],se=M[10],le=M[11],ue=M[12],ce=M[13],he=M[14],de=t$4.geom.flat.length.lineString(a,J,ee,2),fe=oe(ue);if(ie||fe<=de){var pe=this.textStates[ce].textAlign,_e=(de-fe)*t$4.render.replay.TEXT_ALIGN[pe],me=t$4.geom.flat.textpath.lineString(a,J,ee,2,ue,oe,_e,re);if(me){var ge,xe,ye,ve,$e;if(se)for(ge=0,xe=me.length;ge<xe;++ge)ye=($e=me[ge])[4],ve=this.getImage(ye,ce,"",se),l=$e[2]+le,u=te*ve.height+2*(.5-te)*le-ae,this.replayImage_(e,$e[0],$e[1],ve,l,u,p,ve.height,1,0,0,$e[3],he,!1,ve.width,t$4.render.canvas.defaultPadding,null,null);if(ne)for(ge=0,xe=me.length;ge<xe;++ge)ye=($e=me[ge])[4],ve=this.getImage(ye,ce,ne,""),l=$e[2],u=te*ve.height-ae,this.replayImage_(e,$e[0],$e[1],ve,l,u,p,ve.height,1,0,0,$e[3],he,!1,ve.width,t$4.render.canvas.defaultPadding,null,null)}}this.renderDeclutter_(p,P),++g;break;case t$4.render.canvas.Instruction.END_GEOMETRY:if(void 0!==r){var be=r(P=M[1]);if(be)return be}++g;break;case t$4.render.canvas.Instruction.FILL:E?v++:this.fill_(e),++g;break;case t$4.render.canvas.Instruction.MOVE_TO_LINE_TO:for(y=M[1],s=M[2],A=a[y],f=(L=a[y+1])+.5|0,((d=A+.5|0)!==c||f!==h)&&(e.moveTo(A,L),c=d,h=f),y+=2;y<s;y+=2)d=(A=a[y])+.5|0,f=(L=a[y+1])+.5|0,(y==s-2||d!==c||f!==h)&&(e.lineTo(A,L),c=d,h=f);++g;break;case t$4.render.canvas.Instruction.SET_FILL_STYLE:b=M,this.fillOrigin_=M[2],v&&(this.fill_(e),v=0,$&&(e.stroke(),$=0)),e.fillStyle=M[1],++g;break;case t$4.render.canvas.Instruction.SET_STROKE_STYLE:T=M,$&&(e.stroke(),$=0),this.setStrokeStyle_(e,M),++g;break;case t$4.render.canvas.Instruction.STROKE:E?$++:e.stroke(),++g;break;default:++g}}v&&this.fill_(e),$&&e.stroke()},t$4.render.canvas.Replay.prototype.replay=function(e,t,i,n){this.viewRotation_=i,this.replay_(e,t,n,this.instructions,void 0,void 0)},t$4.render.canvas.Replay.prototype.replayHitDetection=function(e,t,i,n,r,o){return this.viewRotation_=i,this.replay_(e,t,n,this.hitDetectionInstructions,r,o)},t$4.render.canvas.Replay.prototype.reverseHitDetectionInstructions=function(){var e=this.hitDetectionInstructions;e.reverse();var t,i,n,r=e.length,o=-1;for(t=0;t<r;++t)(n=(i=e[t])[0])==t$4.render.canvas.Instruction.END_GEOMETRY?o=t:n==t$4.render.canvas.Instruction.BEGIN_GEOMETRY&&(i[2]=t,t$4.array.reverseSubArray(this.hitDetectionInstructions,o,t),o=-1)},t$4.render.canvas.Replay.prototype.setFillStrokeStyle=function(e,t){var i=this.state;if(e){var n=e.getColor();i.fillStyle=t$4.colorlike.asColorLike(n||t$4.render.canvas.defaultFillStyle)}else i.fillStyle=void 0;if(t){var r=t.getColor();i.strokeStyle=t$4.colorlike.asColorLike(r||t$4.render.canvas.defaultStrokeStyle);var o=t.getLineCap();i.lineCap=void 0!==o?o:t$4.render.canvas.defaultLineCap;var a=t.getLineDash();i.lineDash=a?a.slice():t$4.render.canvas.defaultLineDash;var s=t.getLineDashOffset();i.lineDashOffset=s||t$4.render.canvas.defaultLineDashOffset;var l=t.getLineJoin();i.lineJoin=void 0!==l?l:t$4.render.canvas.defaultLineJoin;var u=t.getWidth();i.lineWidth=void 0!==u?u:t$4.render.canvas.defaultLineWidth;var c=t.getMiterLimit();i.miterLimit=void 0!==c?c:t$4.render.canvas.defaultMiterLimit,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},t$4.render.canvas.Replay.prototype.applyFill=function(e,t){var i=e.fillStyle,n=[t$4.render.canvas.Instruction.SET_FILL_STYLE,i];if("string"!=typeof i){var r=t.getExtent();n.push([r[0],r[3]])}this.instructions.push(n)},t$4.render.canvas.Replay.prototype.applyStroke=function(e){this.instructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio])},t$4.render.canvas.Replay.prototype.updateFillStyle=function(e,t,i){var n=e.fillStyle;("string"!=typeof n||e.currentFillStyle!=n)&&(t.call(this,e,i),e.currentFillStyle=n)},t$4.render.canvas.Replay.prototype.updateStrokeStyle=function(e,t){var i=e.strokeStyle,n=e.lineCap,r=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,s=e.lineWidth,l=e.miterLimit;(e.currentStrokeStyle!=i||e.currentLineCap!=n||r!=e.currentLineDash&&!t$4.array.equals(e.currentLineDash,r)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=s||e.currentMiterLimit!=l)&&(t.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=n,e.currentLineDash=r,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=s,e.currentMiterLimit=l)},t$4.render.canvas.Replay.prototype.endGeometry=function(e,t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var i=[t$4.render.canvas.Instruction.END_GEOMETRY,t];this.instructions.push(i),this.hitDetectionInstructions.push(i)},t$4.render.canvas.Replay.prototype.finish=t$4.nullFunction,t$4.render.canvas.Replay.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=t$4.extent.clone(this.maxExtent),this.maxLineWidth>0)){var e=this.resolution*(this.maxLineWidth+1)/2;t$4.extent.buffer(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},t$4.render.canvas.ImageReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o),this.declutterGroup_=null,this.hitDetectionImage_=null,this.image_=null,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.snapToPixel_=void 0,this.width_=void 0},t$4.inherits(t$4.render.canvas.ImageReplay,t$4.render.canvas.Replay),t$4.render.canvas.ImageReplay.prototype.drawCoordinates_=function(e,t,i,n){return this.appendFlatCoordinates(e,t,i,n,!1,!1)},t$4.render.canvas.ImageReplay.prototype.drawPoint=function(e,t){if(this.image_){this.beginGeometry(e,t);var i=e.getFlatCoordinates(),n=e.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]),this.endGeometry(e,t)}},t$4.render.canvas.ImageReplay.prototype.drawMultiPoint=function(e,t){if(this.image_){this.beginGeometry(e,t);var i=e.getFlatCoordinates(),n=e.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]),this.endGeometry(e,t)}},t$4.render.canvas.ImageReplay.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.snapToPixel_=void 0,this.width_=void 0},t$4.render.canvas.ImageReplay.prototype.setImageStyle=function(e,t){var i=e.getAnchor(),n=e.getSize(),r=e.getHitDetectionImage(1),o=e.getImage(1),a=e.getOrigin();this.anchorX_=i[0],this.anchorY_=i[1],this.declutterGroup_=t,this.hitDetectionImage_=r,this.image_=o,this.height_=n[1],this.opacity_=e.getOpacity(),this.originX_=a[0],this.originY_=a[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScale(),this.snapToPixel_=e.getSnapToPixel(),this.width_=n[0]},t$4.render.canvas.LineStringReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o)},t$4.inherits(t$4.render.canvas.LineStringReplay,t$4.render.canvas.Replay),t$4.render.canvas.LineStringReplay.prototype.drawFlatCoordinates_=function(e,t,i,n){var r=this.coordinates.length,o=this.appendFlatCoordinates(e,t,i,n,!1,!1),a=[t$4.render.canvas.Instruction.MOVE_TO_LINE_TO,r,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i},t$4.render.canvas.LineStringReplay.prototype.drawLineString=function(e,t){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],[t$4.render.canvas.Instruction.BEGIN_PATH]);var o=e.getFlatCoordinates(),a=e.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.STROKE]),this.endGeometry(e,t)}},t$4.render.canvas.LineStringReplay.prototype.drawMultiLineString=function(e,t){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],[t$4.render.canvas.Instruction.BEGIN_PATH]);var o,a,s=e.getEnds(),l=e.getFlatCoordinates(),u=e.getStride(),c=0;for(o=0,a=s.length;o<a;++o)c=this.drawFlatCoordinates_(l,c,s[o],u);this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.STROKE]),this.endGeometry(e,t)}},t$4.render.canvas.LineStringReplay.prototype.finish=function(){var e=this.state;null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push([t$4.render.canvas.Instruction.STROKE]),this.reverseHitDetectionInstructions(),this.state=null},t$4.render.canvas.LineStringReplay.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push([t$4.render.canvas.Instruction.STROKE]),e.lastStroke=this.coordinates.length),e.lastStroke=0,t$4.render.canvas.Replay.prototype.applyStroke.call(this,e),this.instructions.push([t$4.render.canvas.Instruction.BEGIN_PATH])},t$4.render.canvas.PolygonReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o)},t$4.inherits(t$4.render.canvas.PolygonReplay,t$4.render.canvas.Replay),t$4.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_=function(e,t,i,n){var r=this.state,o=void 0!==r.fillStyle,a=null!=r.strokeStyle,s=i.length,l=[t$4.render.canvas.Instruction.BEGIN_PATH];this.instructions.push(l),this.hitDetectionInstructions.push(l);for(var u=0;u<s;++u){var c=i[u],h=this.coordinates.length,d=this.appendFlatCoordinates(e,t,c,n,!0,!a),f=[t$4.render.canvas.Instruction.MOVE_TO_LINE_TO,h,d];if(this.instructions.push(f),this.hitDetectionInstructions.push(f),a){var p=[t$4.render.canvas.Instruction.CLOSE_PATH];this.instructions.push(p),this.hitDetectionInstructions.push(p)}t=c}var _=[t$4.render.canvas.Instruction.FILL];if(this.hitDetectionInstructions.push(_),o&&this.instructions.push(_),a){var m=[t$4.render.canvas.Instruction.STROKE];this.instructions.push(m),this.hitDetectionInstructions.push(m)}return t},t$4.render.canvas.PolygonReplay.prototype.drawCircle=function(e,t){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_FILL_STYLE,t$4.color.asString(t$4.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=e.getFlatCoordinates(),a=e.getStride(),s=this.coordinates.length;this.appendFlatCoordinates(o,0,o.length,a,!1,!1);var l=[t$4.render.canvas.Instruction.BEGIN_PATH],u=[t$4.render.canvas.Instruction.CIRCLE,s];this.instructions.push(l,u),this.hitDetectionInstructions.push(l,u);var c=[t$4.render.canvas.Instruction.FILL];if(this.hitDetectionInstructions.push(c),void 0!==i.fillStyle&&this.instructions.push(c),void 0!==i.strokeStyle){var h=[t$4.render.canvas.Instruction.STROKE];this.instructions.push(h),this.hitDetectionInstructions.push(h)}this.endGeometry(e,t)}},t$4.render.canvas.PolygonReplay.prototype.drawPolygon=function(e,t){var i=this.state;this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_FILL_STYLE,t$4.color.asString(t$4.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var n=e.getEnds(),r=e.getOrientedFlatCoordinates(),o=e.getStride();this.drawFlatCoordinatess_(r,0,n,o),this.endGeometry(e,t)},t$4.render.canvas.PolygonReplay.prototype.drawMultiPolygon=function(e,t){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_FILL_STYLE,t$4.color.asString(t$4.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o,a,s=e.getEndss(),l=e.getOrientedFlatCoordinates(),u=e.getStride(),c=0;for(o=0,a=s.length;o<a;++o)c=this.drawFlatCoordinatess_(l,c,s[o],u);this.endGeometry(e,t)}},t$4.render.canvas.PolygonReplay.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e){var t,i,n=this.coordinates;for(t=0,i=n.length;t<i;++t)n[t]=t$4.geom.flat.simplify.snap(n[t],e)}},t$4.render.canvas.PolygonReplay.prototype.setFillStrokeStyles_=function(e){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.applyFill,e),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},t$4.geom.flat.straightchunk={},t$4.geom.flat.straightchunk.lineString=function(e,t,i,n,r){var o,a,s,l,u,c,h,d,f,p=i,_=i,m=0,g=0,x=i;for(o=i;o<n;o+=r){var y=t[o],v=t[o+1];void 0!==l&&(d=y-l,f=v-u,s=Math.sqrt(d*d+f*f),void 0!==c&&(g+=a,Math.acos((c*d+h*f)/(a*s))>e&&(g>m&&(m=g,p=x,_=o),g=0,x=o-r)),a=s,c=d,h=f),l=y,u=v}return(g+=s)>m?[x,o]:[p,_]},t$4.style.TextPlacement={POINT:"point",LINE:"line"},t$4.render.canvas.TextReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o),this.declutterGroup_,this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.widths_={},t$4.render.canvas.labelCache.prune()},t$4.inherits(t$4.render.canvas.TextReplay,t$4.render.canvas.Replay),t$4.render.canvas.TextReplay.measureTextWidths=function(e,t,i){var n,r,o=t.length,a=0;for(r=0;r<o;++r)n=t$4.render.canvas.measureTextWidth(e,t[r]),a=Math.max(a,n),i.push(n);return a},t$4.render.canvas.TextReplay.prototype.drawText=function(e,t){var i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(i||n)){var o,a,s=this.coordinates.length,l=e.getType(),u=null,c=2,h=2;if(r.placement===t$4.style.TextPlacement.LINE){if(!t$4.extent.intersects(this.getBufferedMaxExtent(),e.getExtent()))return;var d;if(u=e.getFlatCoordinates(),h=e.getStride(),l==t$4.geom.GeometryType.LINE_STRING)d=[u.length];else if(l==t$4.geom.GeometryType.MULTI_LINE_STRING)d=e.getEnds();else if(l==t$4.geom.GeometryType.POLYGON)d=e.getEnds().slice(0,1);else if(l==t$4.geom.GeometryType.MULTI_POLYGON){var f=e.getEndss();for(d=[],o=0,a=f.length;o<a;++o)d.push(f[o][0])}this.beginGeometry(e,t);for(var p,_=r.textAlign,m=0,g=0,x=d.length;g<x;++g){if(null==_){var y=t$4.geom.flat.straightchunk.lineString(r.maxAngle,u,m,d[g],h);m=y[0],p=y[1]}else p=d[g];for(o=m;o<p;o+=h)this.coordinates.push(u[o],u[o+1]);c=this.coordinates.length,m=d[g],this.drawChars_(s,c,this.declutterGroup_),s=c}this.endGeometry(e,t)}else{var v=this.getImage(this.text_,this.textKey_,this.fillKey_,this.strokeKey_),$=v.width/this.pixelRatio;switch(l){case t$4.geom.GeometryType.POINT:case t$4.geom.GeometryType.MULTI_POINT:c=(u=e.getFlatCoordinates()).length;break;case t$4.geom.GeometryType.LINE_STRING:u=e.getFlatMidpoint();break;case t$4.geom.GeometryType.CIRCLE:u=e.getCenter();break;case t$4.geom.GeometryType.MULTI_LINE_STRING:c=(u=e.getFlatMidpoints()).length;break;case t$4.geom.GeometryType.POLYGON:if(u=e.getFlatInteriorPoint(),!r.overflow&&u[2]/this.resolution<$)return;h=3;break;case t$4.geom.GeometryType.MULTI_POLYGON:var b=e.getFlatInteriorPoints();for(u=[],o=0,a=b.length;o<a;o+=3)(r.overflow||b[o+2]/this.resolution>=$)&&u.push(b[o],b[o+1]);if(0==(c=u.length))return}c=this.appendFlatCoordinates(u,0,c,h,!1,!1),this.beginGeometry(e,t),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),this.updateFillStyle(this.state,this.applyFill,e),this.updateStrokeStyle(this.state,this.applyStroke)),this.drawTextImage_(v,s,c),this.endGeometry(e,t)}}},t$4.render.canvas.TextReplay.prototype.getImage=function(e,t,i,n){var r,o=n+t+e+i+this.pixelRatio,a=t$4.render.canvas.labelCache;if(!a.containsKey(o)){var s=n?this.strokeStates[n]||this.textStrokeState_:null,l=i?this.fillStates[i]||this.textFillState_:null,u=this.textStates[t]||this.textState_,c=this.pixelRatio,h=u.scale*c,d=t$4.render.replay.TEXT_ALIGN[u.textAlign||t$4.render.canvas.defaultTextAlign],f=n&&s.lineWidth?s.lineWidth:0,p=e.split("\n"),_=p.length,m=[],g=t$4.render.canvas.TextReplay.measureTextWidths(u.font,p,m),x=t$4.render.canvas.measureTextHeight(u.font),y=x*_,v=g+f,$=t$4.dom.createCanvasContext2D(Math.ceil(v*h),Math.ceil((y+f)*h));r=$.canvas,a.set(o,r),1!=h&&$.scale(h,h),$.font=u.font,n&&($.strokeStyle=s.strokeStyle,$.lineWidth=f*(t$4.has.SAFARI?h:1),$.lineCap=s.lineCap,$.lineJoin=s.lineJoin,$.miterLimit=s.miterLimit,t$4.has.CANVAS_LINE_DASH&&s.lineDash.length&&($.setLineDash(s.lineDash),$.lineDashOffset=s.lineDashOffset)),i&&($.fillStyle=l.fillStyle),$.textBaseline="middle",$.textAlign="center";var b,T=.5-d,C=d*r.width/h+T*f;if(n)for(b=0;b<_;++b)$.strokeText(p[b],C+T*m[b],.5*(f+x)+b*x);if(i)for(b=0;b<_;++b)$.fillText(p[b],C+T*m[b],.5*(f+x)+b*x)}return a.get(o)},t$4.render.canvas.TextReplay.prototype.drawTextImage_=function(e,t,i){var n=this.textState_,r=this.textStrokeState_,o=this.pixelRatio,a=t$4.render.replay.TEXT_ALIGN[n.textAlign||t$4.render.canvas.defaultTextAlign],s=t$4.render.replay.TEXT_ALIGN[n.textBaseline],l=r&&r.lineWidth?r.lineWidth:0,u=a*e.width/o+2*(.5-a)*l,c=s*e.height/o+2*(.5-s)*l;this.instructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,t,i,e,(u-this.textOffsetX_)*o,(c-this.textOffsetY_)*o,this.declutterGroup_,e.height,1,0,0,this.textRotateWithView_,this.textRotation_,1,!0,e.width,n.padding==t$4.render.canvas.defaultPadding?t$4.render.canvas.defaultPadding:n.padding.map((function(e){return e*o})),!!n.backgroundFill,!!n.backgroundStroke]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,t,i,e,(u-this.textOffsetX_)*o,(c-this.textOffsetY_)*o,this.declutterGroup_,e.height,1,0,0,this.textRotateWithView_,this.textRotation_,1/o,!0,e.width,n.padding,!!n.backgroundFill,!!n.backgroundStroke])},t$4.render.canvas.TextReplay.prototype.drawChars_=function(e,t,i){var n=this.textStrokeState_,r=this.textState_,o=this.textFillState_,a=this.strokeKey_;n&&(a in this.strokeStates||(this.strokeStates[a]={strokeStyle:n.strokeStyle,lineCap:n.lineCap,lineDashOffset:n.lineDashOffset,lineWidth:n.lineWidth,lineJoin:n.lineJoin,miterLimit:n.miterLimit,lineDash:n.lineDash}));var s=this.textKey_;this.textKey_ in this.textStates||(this.textStates[this.textKey_]={font:r.font,textAlign:r.textAlign||t$4.render.canvas.defaultTextAlign,scale:r.scale});var l=this.fillKey_;o&&(l in this.fillStates||(this.fillStates[l]={fillStyle:o.fillStyle}));var u=this.pixelRatio,c=t$4.render.replay.TEXT_ALIGN[r.textBaseline],h=this.textOffsetY_*u,d=this.text_,f=r.font,p=r.scale,_=n?n.lineWidth*p/2:0,m=this.widths_[f];m||(this.widths_[f]=m={}),this.instructions.push([t$4.render.canvas.Instruction.DRAW_CHARS,e,t,c,i,r.overflow,l,r.maxAngle,function(e){var t=m[e];return t||(t=m[e]=t$4.render.canvas.measureTextWidth(f,e)),t*p*u},h,a,_*u,d,s,1]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_CHARS,e,t,c,i,r.overflow,l,r.maxAngle,function(e){var t=m[e];return t||(t=m[e]=t$4.render.canvas.measureTextWidth(f,e)),t*p},h,a,_,d,s,1/u])},t$4.render.canvas.TextReplay.prototype.setTextStyle=function(e,t){var i,n,r;if(e){this.declutterGroup_=t;var o=e.getFill();o?((n=this.textFillState_)||(n=this.textFillState_={}),n.fillStyle=t$4.colorlike.asColorLike(o.getColor()||t$4.render.canvas.defaultFillStyle)):n=this.textFillState_=null;var a=e.getStroke();if(a){(r=this.textStrokeState_)||(r=this.textStrokeState_={});var s=a.getLineDash(),l=a.getLineDashOffset(),u=a.getWidth(),c=a.getMiterLimit();r.lineCap=a.getLineCap()||t$4.render.canvas.defaultLineCap,r.lineDash=s?s.slice():t$4.render.canvas.defaultLineDash,r.lineDashOffset=void 0===l?t$4.render.canvas.defaultLineDashOffset:l,r.lineJoin=a.getLineJoin()||t$4.render.canvas.defaultLineJoin,r.lineWidth=void 0===u?t$4.render.canvas.defaultLineWidth:u,r.miterLimit=void 0===c?t$4.render.canvas.defaultMiterLimit:c,r.strokeStyle=t$4.colorlike.asColorLike(a.getColor()||t$4.render.canvas.defaultStrokeStyle)}else r=this.textStrokeState_=null;i=this.textState_;var h=e.getFont()||t$4.render.canvas.defaultFont,d=e.getScale();i.overflow=e.getOverflow(),i.font=h,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.textBaseline=e.getTextBaseline()||t$4.render.canvas.defaultTextBaseline,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||t$4.render.canvas.defaultPadding,i.scale=void 0===d?1:d;var f=e.getOffsetX(),p=e.getOffsetY(),_=e.getRotateWithView(),m=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===p?0:p,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0===m?0:m,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:t$4.getUid(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+t$4.getUid(n.fillStyle):""}else this.text_=""},t$4.render.canvas.ReplayGroup=function(e,t,i,n,r,o,a){t$4.render.ReplayGroup.call(this),this.declutterTree_=o,this.declutterGroup_=null,this.tolerance_=e,this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=i,this.renderBuffer_=a,this.replaysByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=t$4.transform.create()},t$4.inherits(t$4.render.canvas.ReplayGroup,t$4.render.ReplayGroup),t$4.render.canvas.ReplayGroup.circleArrayCache_={0:[[!0]]},t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_=function(e,t,i){var n,r=Math.floor(e.length/2);if(t>=r)for(n=r;n<t;n++)e[n][i]=!0;else if(t<r)for(n=t+1;n<r;n++)e[n][i]=!0},t$4.render.canvas.ReplayGroup.getCircleArray_=function(e){if(void 0!==t$4.render.canvas.ReplayGroup.circleArrayCache_[e])return t$4.render.canvas.ReplayGroup.circleArrayCache_[e];for(var t=2*e+1,i=new Array(t),n=0;n<t;n++)i[n]=new Array(t);for(var r=e,o=0,a=0;r>=o;)t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+r,e+o),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+o,e+r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-o,e+r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-r,e+o),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-r,e-o),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-o,e-r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+o,e-r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+r,e-o),2*((a+=1+2*++o)-r)+1>0&&(a+=1-2*(r-=1));return t$4.render.canvas.ReplayGroup.circleArrayCache_[e]=i,i},t$4.render.canvas.ReplayGroup.replayDeclutter=function(e,t,i){for(var n=Object.keys(e).map(Number).sort(t$4.array.numberSafeCompareFunction),r={},o=0,a=n.length;o<a;++o)for(var s=e[n[o].toString()],l=0,u=s.length;l<u;){var c=s[l++],h=s[l++];c.replay(t,h,i,r)}},t$4.render.canvas.ReplayGroup.prototype.addDeclutter=function(e){var t=null;return this.declutterTree_&&(e?(t=this.declutterGroup_)[4]++:(t=this.declutterGroup_=t$4.extent.createEmpty()).push(1)),t},t$4.render.canvas.ReplayGroup.prototype.clip=function(e,t){var i=this.getClipCoords(t);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()},t$4.render.canvas.ReplayGroup.prototype.hasReplays=function(e){for(var t in this.replaysByZIndex_)for(var i=this.replaysByZIndex_[t],n=0,r=e.length;n<r;++n)if(e[n]in i)return!0;return!1},t$4.render.canvas.ReplayGroup.prototype.finish=function(){var e;for(e in this.replaysByZIndex_){var t,i=this.replaysByZIndex_[e];for(t in i)i[t].finish()}},t$4.render.canvas.ReplayGroup.prototype.forEachFeatureAtCoordinate=function(e,t,i,n,r,o,a){var s,l=2*(n=Math.round(n))+1,u=t$4.transform.compose(this.hitDetectionTransform_,n+.5,n+.5,1/t,-1/t,-i,-e[0],-e[1]),c=this.hitDetectionContext_;c.canvas.width!==l||c.canvas.height!==l?(c.canvas.width=l,c.canvas.height=l):c.clearRect(0,0,l,l),void 0!==this.renderBuffer_&&(s=t$4.extent.createEmpty(),t$4.extent.extendCoordinate(s,e),t$4.extent.buffer(s,t*(this.renderBuffer_+n),s));var h,d,f=t$4.render.canvas.ReplayGroup.getCircleArray_(n);function p(e){for(var t=c.getImageData(0,0,l,l).data,i=0;i<l;i++)for(var n=0;n<l;n++)if(f[i][n]&&t[4*(n*l+i)+3]>0){var r;return(!(h&&(d==t$4.render.ReplayType.IMAGE||d==t$4.render.ReplayType.TEXT))||-1!==h.indexOf(e))&&(r=o(e)),r?r:void c.clearRect(0,0,l,l)}}this.declutterTree_&&(h=this.declutterTree_.all().map((function(e){return e.value})));var _,m,g,x,y,v=Object.keys(this.replaysByZIndex_).map(Number);for(v.sort(t$4.array.numberSafeCompareFunction),_=v.length-1;_>=0;--_){var $=v[_].toString();for(g=this.replaysByZIndex_[$],m=t$4.render.replay.ORDER.length-1;m>=0;--m)if(void 0!==(x=g[d=t$4.render.replay.ORDER[m]]))if(!a||d!=t$4.render.ReplayType.IMAGE&&d!=t$4.render.ReplayType.TEXT){if(y=x.replayHitDetection(c,u,i,r,p,s))return y}else{var b=a[$];b?b.push(x,u.slice(0)):a[$]=[x,u.slice(0)]}}},t$4.render.canvas.ReplayGroup.prototype.getClipCoords=function(e){var t=this.maxExtent_,i=t[0],n=t[1],r=t[2],o=t[3],a=[i,n,i,o,r,o,r,n];return t$4.geom.flat.transform.transform2D(a,0,8,2,e,a),a},t$4.render.canvas.ReplayGroup.prototype.getReplay=function(e,t){var i=void 0!==e?e.toString():"0",n=this.replaysByZIndex_[i];void 0===n&&(n={},this.replaysByZIndex_[i]=n);var r=n[t];void 0===r&&(r=new(0,t$4.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_[t])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_),n[t]=r);return r},t$4.render.canvas.ReplayGroup.prototype.getReplays=function(){return this.replaysByZIndex_},t$4.render.canvas.ReplayGroup.prototype.isEmpty=function(){return t$4.obj.isEmpty(this.replaysByZIndex_)},t$4.render.canvas.ReplayGroup.prototype.replay=function(e,t,i,n,r,o){var a=Object.keys(this.replaysByZIndex_).map(Number);a.sort(t$4.array.numberSafeCompareFunction),e.save(),this.clip(e,t);var s,l,u,c,h,d,f=r||t$4.render.replay.ORDER;for(s=0,l=a.length;s<l;++s){var p=a[s].toString();for(h=this.replaysByZIndex_[p],u=0,c=f.length;u<c;++u){var _=f[u];if(void 0!==(d=h[_]))if(!o||_!=t$4.render.ReplayType.IMAGE&&_!=t$4.render.ReplayType.TEXT)d.replay(e,t,i,n);else{var m=o[p];m?m.push(d,t.slice(0)):o[p]=[d,t.slice(0)]}}}e.restore()},t$4.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_={Circle:t$4.render.canvas.PolygonReplay,Default:t$4.render.canvas.Replay,Image:t$4.render.canvas.ImageReplay,LineString:t$4.render.canvas.LineStringReplay,Polygon:t$4.render.canvas.PolygonReplay,Text:t$4.render.canvas.TextReplay},t$4.renderer={},t$4.renderer.vector={},t$4.renderer.vector.defaultOrder=function(e,t){return t$4.getUid(e)-t$4.getUid(t)},t$4.renderer.vector.getSquaredTolerance=function(e,t){var i=t$4.renderer.vector.getTolerance(e,t);return i*i},t$4.renderer.vector.getTolerance=function(e,t){return t$4.SIMPLIFY_TOLERANCE*e/t},t$4.renderer.vector.renderCircleGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var a=e.getReplay(i.getZIndex(),t$4.render.ReplayType.CIRCLE);a.setFillStrokeStyle(r,o),a.drawCircle(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$4.renderer.vector.renderFeature=function(e,t,i,n,r,o){var a,s,l=!1;return(a=i.getImage())&&((s=a.getImageState())==t$4.ImageState.LOADED||s==t$4.ImageState.ERROR?a.unlistenImageChange(r,o):(s==t$4.ImageState.IDLE&&a.load(),s=a.getImageState(),a.listenImageChange(r,o),l=!0)),t$4.renderer.vector.renderFeature_(e,t,i,n),l},t$4.renderer.vector.renderFeature_=function(e,t,i,n){var r=i.getGeometryFunction()(t);if(r){var o=r.getSimplifiedGeometry(n);if(i.getRenderer())t$4.renderer.vector.renderGeometry_(e,o,i,t);else(0,t$4.renderer.vector.GEOMETRY_RENDERERS_[o.getType()])(e,o,i,t)}},t$4.renderer.vector.renderGeometry_=function(e,t,i,n){if(t.getType()!=t$4.geom.GeometryType.GEOMETRY_COLLECTION)e.getReplay(i.getZIndex(),t$4.render.ReplayType.DEFAULT).drawCustom(t,n,i.getRenderer());else for(var r=t.getGeometries(),o=0,a=r.length;o<a;++o)t$4.renderer.vector.renderGeometry_(e,r[o],i,n)},t$4.renderer.vector.renderGeometryCollectionGeometry_=function(e,t,i,n){var r,o,a=t.getGeometriesArray();for(r=0,o=a.length;r<o;++r){(0,t$4.renderer.vector.GEOMETRY_RENDERERS_[a[r].getType()])(e,a[r],i,n)}},t$4.renderer.vector.renderLineStringGeometry_=function(e,t,i,n){var r=i.getStroke();if(r){var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.LINE_STRING);o.setFillStrokeStyle(null,r),o.drawLineString(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!1)),s.drawText(t,n)}},t$4.renderer.vector.renderMultiLineStringGeometry_=function(e,t,i,n){var r=i.getStroke();if(r){var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.LINE_STRING);o.setFillStrokeStyle(null,r),o.drawMultiLineString(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!1)),s.drawText(t,n)}},t$4.renderer.vector.renderMultiPolygonGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(o||r){var a=e.getReplay(i.getZIndex(),t$4.render.ReplayType.POLYGON);a.setFillStrokeStyle(r,o),a.drawMultiPolygon(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$4.renderer.vector.renderPointGeometry_=function(e,t,i,n){var r=i.getImage();if(r){if(r.getImageState()!=t$4.ImageState.LOADED)return;var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.IMAGE);o.setImageStyle(r,e.addDeclutter(!1)),o.drawPoint(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!!r)),s.drawText(t,n)}},t$4.renderer.vector.renderMultiPointGeometry_=function(e,t,i,n){var r=i.getImage();if(r){if(r.getImageState()!=t$4.ImageState.LOADED)return;var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.IMAGE);o.setImageStyle(r,e.addDeclutter(!1)),o.drawMultiPoint(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!!r)),s.drawText(t,n)}},t$4.renderer.vector.renderPolygonGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var a=e.getReplay(i.getZIndex(),t$4.render.ReplayType.POLYGON);a.setFillStrokeStyle(r,o),a.drawPolygon(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$4.renderer.vector.GEOMETRY_RENDERERS_={Point:t$4.renderer.vector.renderPointGeometry_,LineString:t$4.renderer.vector.renderLineStringGeometry_,Polygon:t$4.renderer.vector.renderPolygonGeometry_,MultiPoint:t$4.renderer.vector.renderMultiPointGeometry_,MultiLineString:t$4.renderer.vector.renderMultiLineStringGeometry_,MultiPolygon:t$4.renderer.vector.renderMultiPolygonGeometry_,GeometryCollection:t$4.renderer.vector.renderGeometryCollectionGeometry_,Circle:t$4.renderer.vector.renderCircleGeometry_},Object.defineProperties(r$a.prototype,{clock:{get:function(){return this._clock}}}),r$a.prototype.synchronize=function(){var e=this._clock;this.systemTime=a$15.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate},r$a.prototype.isDestroyed=function(){return!1},r$a.prototype.destroy=function(){this._eventHelper.removeAll(),i$11(this)};var o$4={};function c$5(e,t,i,n,r){return i.call(n,e[t]),ce$1.getObservable(e,t).subscribe(i,n,r)}function r$9(e,t){if(!e$2e(e))throw new t$15("command is required.");this._command=e,t=u$Z(t,u$Z.EMPTY_OBJECT),this.toggled=u$Z(t.toggled,!1),this.tooltip=u$Z(t.tooltip,""),ce$1.track(this,["toggled","tooltip"])}o$4.createCheckbox=function(e,t,i){o$1q.typeOf.string("labelText",e),o$1q.typeOf.string("checkedBinding",t);var n=document.createElement("div"),r=document.createElement("label"),o=document.createElement("input");o.type="checkbox";var a="checked: "+t;return e$2e(i)&&(a+=", enable: "+i),o.setAttribute("data-bind",a),r.appendChild(o),r.appendChild(document.createTextNode(e)),n.appendChild(r),n},o$4.createSection=function(e,t,i,n){o$1q.defined("panel",e),o$1q.typeOf.string("headerText",t),o$1q.typeOf.string("sectionVisibleBinding",i),o$1q.typeOf.string("toggleSectionVisibilityBinding",n);var r=document.createElement("div");r.className="supermap3d-cesiumInspector-section",r.setAttribute("data-bind",'css: { "supermap3d-cesiumInspector-section-collapsed": !'+i+" }"),e.appendChild(r);var o=document.createElement("h3");o.className="supermap3d-cesiumInspector-sectionHeader",o.appendChild(document.createTextNode(t)),o.setAttribute("data-bind","click: "+n),r.appendChild(o);var a=document.createElement("div");return a.className="supermap3d-cesiumInspector-sectionContent",r.appendChild(a),a},Object.defineProperties(r$9.prototype,{command:{get:function(){return this._command}}});var _0x1c2e12=(_0x518b97=!0,function(e,t){var i=_0x518b97?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x518b97=!1,i}),_0x1d62b3=_0x1c2e12(void 0,(function(){return _0x1d62b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d62b3).search("(((.+)+)+)+$")})),_0x518b97;function _0x82cfb9(e){this.clampMode=0,this.handlerDis=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.Distance,this.clampMode),this.handlerArea=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.Area,this.clampMode),this.handlerHeight=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.DVH)}_0x1d62b3(),_0x82cfb9.prototype.calDistance=function(){this.handlerDis.measureEvt.addEventListener(function(e){var t=Number(e.distance),i=t>1e3?(t/1e3).toFixed(2)+"km":t.toFixed(2)+"m";this.handlerDis.disLabel.text=WebGLPlot.plotI18n("Distance")+":"+i}.bind(this)),this.deactiveAll(),this.handlerDis&&this.handlerDis.activate()},_0x82cfb9.prototype.calArea=function(){this.handlerArea.measureEvt.addEventListener(function(e){var t=Number(e.area),i=t>1e6?(t/1e6).toFixed(2)+"km²":t.toFixed(2)+"㎡";this.handlerArea.areaLabel.text=WebGLPlot.plotI18n("Area")+":"+i}.bind(this)),this.deactiveAll(),this.handlerArea&&this.handlerArea.activate()},_0x82cfb9.prototype.calHeight=function(){this.handlerHeight.measureEvt.addEventListener((e=>{var t=e.distance>1e3?(e.distance/1e3).toFixed(2)+"km":e.distance+"m",i=e.verticalHeight>1e3?(e.verticalHeight/1e3).toFixed(2)+"km":e.verticalHeight+"m",n=e.horizontalDistance>1e3?(e.horizontalDistance/1e3).toFixed(2)+"km":e.horizontalDistance+"m";this.handlerHeight.disLabel.text=WebGLPlot.plotI18n("SpaceDistance")+":"+t,this.handlerHeight.vLabel.text=WebGLPlot.plotI18n("VerticalHeight")+":"+i,this.handlerHeight.hLabel.text=WebGLPlot.plotI18n("LevelDistance")+":"+n})),this.handlerHeight.clear(),this.deactiveAll(),this.handlerHeight&&this.handlerHeight.activate()},_0x82cfb9.prototype.clear=function(){this.deactiveAll(),this.handlerDis&&this.handlerDis.clear(),this.handlerArea&&this.handlerArea.clear(),this.handlerHeight&&this.handlerHeight.clear()},_0x82cfb9.prototype.deactiveAll=function(){this.handlerDis&&this.handlerDis.deactivate(),this.handlerArea&&this.handlerArea.deactivate(),this.handlerHeight&&this.handlerHeight.deactivate()};var _0x55debf=(_0xba868a=!0,function(e,t){var i=_0xba868a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xba868a=!1,i}),_0x32e19a=_0x55debf(void 0,(function(){return _0x32e19a.toString().search("(((.+)+)+)+$").toString().constructor(_0x32e19a).search("(((.+)+)+)+$")})),_0xba868a;_0x32e19a();var _0x2bbdab=null,_0x55e448=null;function _0x253cc(e){this.sightline=new WebGLPlot.Sightline(e.scene),this.handlerPoint=new WebGLPlot.DrawHandler(e,WebGLPlot.DrawMode.Point),this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.scene.canvas),this.sightline.lineWidth=5,this.sightline.build(),this.num=0,this.viewer=e,_0x2bbdab=this.sightline,_0x55e448=this.num}function _0x589efd(e){_0x55e448+=1;var t=_0x295a48(e),i="point"+_0x55e448;_0x2bbdab.addTargetPoint({position:t,name:i})}function _0x295a48(e){var t=WebGLPlot.Cartographic.fromCartesian(e);return[WebGLPlot.CesiumMath.toDegrees(t.longitude),WebGLPlot.CesiumMath.toDegrees(t.latitude),t.height]}_0x253cc.prototype.activate=function(){var e=!0;if(this.sightline.removeAllTargetPoint(),this.handlerPoint.clear(),this.num=0,!this.handlerPoint.active){var t=null;this.handlerPoint.activate(),this.handlerPoint.drawEvt.addEventListener(function(i){var n=_0x295a48(i.object.position);this.sightline.viewPosition=n,e=!1,t=i}.bind(this)),this.handler.setInputAction(function(i){e||t||_0x589efd(this.viewer.scene.pickPosition(i.position));t=null}.bind(this),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction(function(t){if(!e){var i=this.viewer.scene.pickPosition(t.endPosition);if(this.num>0){this.sightline.removeAllTargetPoint("point0");var n=Cartesian2toDegress(i);sightline.addTargetPoint({position:n,name:"point0"})}}}.bind(this),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(){e||(this.viewer.enableCursorStyle=!0,this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK))}.bind(this),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}},_0x253cc.prototype.clear=function(){this.handlerPoint.deactivate(),this.handlerPoint.clear(),this.num=0,this.viewer.entities.removeAll(),this.sightline.removeAllTargetPoint()},_0x253cc.prototype.deactivate=function(){this.handlerPoint.deactivate()};var _0x5cfc90=(_0x4586bc=!0,function(e,t){var i=_0x4586bc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4586bc=!1,i}),_0x5134b4=_0x5cfc90(void 0,(function(){return _0x5134b4.toString().search("(((.+)+)+)+$").toString().constructor(_0x5134b4).search("(((.+)+)+)+$")})),_0x4586bc;function _0x4dfa3a(e){(WebGLPlot.ViewShed3D||WebGLPlot.DrawHandler)&&(this.pointHandler=new WebGLPlot.DrawHandler(e,WebGLPlot.DrawMode.Point),this.viewshed3D=new WebGLPlot.ViewShed3D(e.scene)),this.viewer=e,this.handler=new WebGLPlot.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.viewer.scene.ViewFlag=!0,this.viewPosition=null}_0x5134b4(),_0x4dfa3a.prototype.activate=function(){this.pointHandler.active||(this.viewshed3D.distance=.1,this.viewer.scene.ViewFlag=!0,this.pointHandler.activate(),this.handler.setInputAction(function(e){if(!this.viewer.scene.ViewFlag){var t=e.endPosition,i=this.viewer.scene.pickPosition(t);if(WebGLPlot.Cartesian3.distance(this.viewPosition,i)>0){var n=WebGLPlot.Cartographic.fromCartesian(i),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=n.height;this.viewshed3D.setDistDirByPoint([r,o,a])}}}.bind(this),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(e){this.viewer.scene.ViewFlag=!0}.bind(this),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this.handler.setInputAction(function(e){!this.viewer.scene.ViewFlag&&.1!==this.viewshed3D.distance&&(this.viewer.scene.ViewFlag=!0)}.bind(this),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.pointHandler.drawEvt.addEventListener(function(e){var t=e.object,i=t.position;this.viewPosition=i;var n=WebGLPlot.Cartographic.fromCartesian(i),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=n.height+1.8;t.position=WebGLPlot.Cartesian3.fromDegrees(r,o,a),this.viewer.scene.ViewFlag&&(this.viewshed3D.viewPosition=[r,o,a],this.viewshed3D.build(),this.viewer.scene.ViewFlag=!1)}.bind(this)))},_0x4dfa3a.prototype.clear=function(){this.viewer.entities.removeAll(),this.viewshed3D.distance=.1,this.viewer.scene.ViewFlag=!0,this.pointHandler.clear()},_0x4dfa3a.prototype.deactivate=function(){this.pointHandler.deactivate(),this.viewer.scene.ViewFlag=!0};var _0x2e02dd=(_0x287e0a=!0,function(e,t){var i=_0x287e0a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x287e0a=!1,i}),_0x5a5292=_0x2e02dd(void 0,(function(){return _0x5a5292.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a5292).search("(((.+)+)+)+$")})),_0x287e0a;function _0x10b943(e){if(!WebGLPlot.DrawHandler&&!WebGLPlot.SlopeSetting)throw new WebGLPlot.DeveloperError("SuperMap_DrawHandler SlopeSetting is required.");this.viewer=e,this.handlerPolygon=new WebGLPlot.DrawHandler(this.viewer,WebGLPlot.DrawMode.Polygon,1),this.slope=new WebGLPlot.SlopeSetting;var t=_0x406a95(this.viewer._element);this.handlerPolygon.activeEvt.addEventListener(function(e){1==e?(this.viewer.enableCursorStyle=!1,this.viewer._element.style.cursor="crosshair"):(this.viewer.enableCursorStyle=!0,this.viewer._element.style.cursor="")}.bind(this)),this.handlerPolygon.movingEvt.addEventListener((function(e){e.x<200&&e.y<150&&t.setVisible(!1)})),this.handlerPolygon.drawEvt.addEventListener(function(e){if(e.object.positions){var i=[].concat(e.object.positions);t.setVisible(!1);for(var n=[],r=0,o=i.length;r<o;r++){var a=WebGLPlot.Cartographic.fromCartesian(i[r]),s=WebGLPlot.CesiumMath.toDegrees(a.longitude),l=WebGLPlot.CesiumMath.toDegrees(a.latitude),u=a.height;-1==n.indexOf(s)&&-1==n.indexOf(l)&&(n.push(s),n.push(l),n.push(u))}this.slope.CoverageArea=n;var c=WebGLPlot.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION;this.viewer.scene.globe.SlopeSetting={slopeSetting:this.slope,analysisMode:c},this.handlerPolygon.polygon.show=!1,this.handlerPolygon.polyline.show=!0,this.handlerPolygon.deactivate(),this.handlerPolygon.activate()}else this.clear()}.bind(this))}function _0x406a95(e){var t=function(e){var t=document.createElement("DIV");t.className="twipsy right";var i=document.createElement("DIV");i.className="twipsy-arrow",t.appendChild(i);var n=document.createElement("DIV");n.className="twipsy-inner",t.appendChild(n),this._div=t,this._title=n,this.message="",e.appendChild(t);var r=this;t.onmousemove=function(e){r.showAt({x:e.clientX,y:e.clientY},r.message)}};return t.prototype.setVisible=function(e){this._div.style.display=e?"block":"none"},t.prototype.showAt=function(e,t){e&&t&&(this.setVisible(!0),this._title.innerHTML=t,this._div.style.left=e.x+10+"px",this._div.style.top=e.y-this._div.clientHeight/2+"px",this.message=t)},new t(e)}_0x5a5292(),_0x10b943.prototype.activate=function(){if(this.slope){this.slope.DisplayMode=WebGLPlot.SlopeSettingEnum.DisplayMode.FACE_AND_ARROW,this.slope.MaxVisibleValue=78,this.slope.MinVisibleValue=0;var e=new WebGLPlot.ColorTable;e.insert(80,new WebGLPlot.Color(1,0,0)),e.insert(50,new WebGLPlot.Color(221/255,224/255,7/255)),e.insert(30,new WebGLPlot.Color(20/255,187/255,18/255)),e.insert(20,new WebGLPlot.Color(0,161/255,1)),e.insert(0,new WebGLPlot.Color(9/255,9/255,1)),this.slope.ColorTable=e,this.slope.Opacity=.5,this.handlerPolygon.activate()}},_0x10b943.prototype.deactivate=function(){this.handlerPolygon.deactivate()},_0x10b943.prototype.clear=function(){!this.slope||(this.slope.CoverageArea=[],null!=this.viewer.scene.globe.SlopeSetting.slopeSetting&&(this.viewer.scene.globe.SlopeSetting={slopeSetting:this.slope,analysisMode:WebGLPlot.HypsometricSettingEnum.AnalysisRegionMode.ARM_NONE},this.handlerPolygon.clear(),this.handlerPolygon.deactivate()))};var _0x529804=(_0x500260=!0,function(e,t){var i=_0x500260?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x500260=!1,i}),_0x502115=_0x529804(void 0,(function(){return _0x502115.toString().search("(((.+)+)+)+$").toString().constructor(_0x502115).search("(((.+)+)+)+$")})),_0x500260;function _0x5b82ce(e){null!=e&&(this.measurementTool=new _0x82cfb9(e),this.sightLineTool=new _0x253cc(e),this.viewshedTool=new _0x4dfa3a(e),this.terrainSlopeTool=new _0x10b943(e))}_0x502115(),_0x5b82ce.prototype.activeDisMeasure=function(){this.measurementTool.calDistance()},_0x5b82ce.prototype.activeAreaMeasure=function(){this.measurementTool.calArea()},_0x5b82ce.prototype.activeHeightMeasure=function(){this.measurementTool.calHeight()},_0x5b82ce.prototype.activeSightLine=function(){this.sightLineTool.activate()},_0x5b82ce.prototype.activeViewShed=function(){this.viewshedTool.activate()},_0x5b82ce.prototype.activeTerrainSlope=function(){this.terrainSlopeTool.activate()},_0x5b82ce.prototype.clear=function(){this.measurementTool.clear(),this.sightLineTool.clear(),this.viewshedTool.clear(),this.terrainSlopeTool.clear()},_0x5b82ce.prototype.deactivate=function(){this.measurementTool.deactiveAll(),this.sightLineTool.deactivate(),this.viewshedTool.deactivate(),this.terrainSlopeTool.deactivate()};var _0x47ba8a=(_0x3a57b3=!0,function(e,t){var i=_0x3a57b3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a57b3=!1,i}),_0x3003b0=_0x47ba8a(void 0,(function(){return _0x3003b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x3003b0).search("(((.+)+)+)+$")})),_0x3a57b3;function _0x2c1b91(){this._code=_0x1c668c.SYMBOL_ARBITRARYPOLYGON,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_ARBITRARYPOLYGON,this._symbolName=WebGLPlot.plotI18n("polygon"),this._minEditPts=3,this._maxEditPts=9999}_0x3003b0(),_0x2c1b91.prototype.getMinEditPts=function(){return this._minEditPts},_0x2c1b91.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x2c1b91.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;for(var i=[],n=0;n<t.length;++n)i.push(t[n].clone());return i.push(t[0].clone()),new _0x4c78d5({symbolType:this._symbolType,points:i})},_0x2c1b91.prototype.getSymbolName=function(){return this._symbolName};var _0x1a2b25=(_0x335cd7=!0,function(e,t){var i=_0x335cd7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x335cd7=!1,i}),_0xe92b42=_0x1a2b25(void 0,(function(){return _0xe92b42.toString().search("(((.+)+)+)+$").toString().constructor(_0xe92b42).search("(((.+)+)+)+$")})),_0x335cd7;function _0x26b741(){this._code=_0x1c668c.SYMBOL_BRACE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_BRACE,this._symbolName=WebGLPlot.plotI18n("brace"),this._minEditPts=2,this._maxEditPts=2,this._scaleValues=[],this._scaleValues.push(.1),this._scaleValues.push(.1),this._scalePoints=[]}_0xe92b42(),_0x26b741.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x26b741.prototype.getMinEditPts=function(){return this._minEditPts},_0x26b741.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2===t.length&&_0x2909c1.isSamePt(t[0],t[1]))return null;for(var i=[],n=0;n<t.length;++n)i.push(t[n].clone());i.length;var r=i[0],o=i[1],a=_0x2909c1.distance(r,o);this._scaleValues.length<2&&(this._scaleValues=[],this._scaleValues.push(.1),this._scaleValues.push(.1));var s=this._scaleValues[0],l=this._scaleValues[1],u=new WebGLPlot.Cartesian3(a*s,a*s,0),c=new WebGLPlot.Cartesian3(a*(.5-l/2),0,0),h=new WebGLPlot.Cartesian3(.5*a,-a*l,0),d=new WebGLPlot.Cartesian3(a*(.5+l/2),0,0),f=new WebGLPlot.Cartesian3(a*(1-s),a*s,0),p=[],_=180*Math.PI/180,m=270*Math.PI/180,g=3*Math.PI/180;for(n=_;n<=m;n+=g){var x=new WebGLPlot.Cartesian3(u.x+a*s,u.y,0);x=_0x2909c1.rotateAngle(u,n,x),p.push(x)}p.push(c),p.push(h),p.push(d),_=270*Math.PI/180,m=360*Math.PI/180;for(n=_;n<=m;n+=g){x=new WebGLPlot.Cartesian3(f.x+a*s,f.y,0);x=_0x2909c1.rotateAngle(f,n,x),p.push(x)}for(var y=_0x2909c1.radian(r,o),v=[],$=0;$<p.length;$++){var b=new WebGLPlot.Cartesian3(p[$].x+r.x,p[$].y+r.y,0);b=_0x2909c1.rotateAngle(r,y,b),v.push(b)}var T=new _0x4c78d5({points:v,symbolType:_0x1c668c.SYMBOL_POLYLINE}),C=new WebGLPlot.Cartesian3(a*s,0,0),S=new WebGLPlot.Cartesian3(C.x+r.x,C.y+r.y,0);S=_0x2909c1.rotateAngle(r,y,S),this._scalePoints.push(S);var w=new WebGLPlot.Cartesian3(h.x+r.x,h.y+r.y,0);return w=_0x2909c1.rotateAngle(r,y,w),this._scalePoints.push(w),T},_0x26b741.prototype.modifyScalePoint=function(e,t,i){var n=e.points,r=_0x2909c1.distance(n[0],n[1]);if(0===t){var o=_0x2909c1.distance(n[0],i)/r;o>0&&o<.4&&(this._scaleValues[0]=o)}else if(1===t){var a=new WebGLPlot.Cartesian3((n[0].x+n[1].x)/2,(n[0].y+n[1].y)/2,0);new WebGLPlot.Cartesian3(i.x,a.y,0);var s=_0x2909c1.distance(i,a)/r;0<s&&.2>s&&(this._scaleValues[1]=s)}return this.calculateParts({points:n})},_0x26b741.prototype.getSymbolName=function(){return this._symbolName};var _0x166a1a=(_0x51b571=!0,function(e,t){var i=_0x51b571?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51b571=!1,i}),_0x53cf7a=_0x166a1a(void 0,(function(){return _0x53cf7a.toString().search("(((.+)+)+)+$").toString().constructor(_0x53cf7a).search("(((.+)+)+)+$")})),_0x51b571;function _0x431d2c(){this._code=_0x1c668c.SYMBOL_CONCENTRICCIRCLE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_CONCENTRICCIRCLE,this._symbolName=WebGLPlot.plotI18n("concentricCircle"),this._startAngle=0,this._endAngle=360,this._minEditPts=3,this._maxEditPts=3}_0x53cf7a(),_0x431d2c.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x431d2c.prototype.getMinEditPts=function(){return this._minEditPts},_0x431d2c.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;for(var t=[],i=0;i<e.points.length;++i)t.push(e.points[i].clone());if(t.length<this._minEditPts||2===t.length&&_0x2909c1.isSamePt(t[0],t[1]))return null;for(2===t.length&&t.push(t[1].clone());this._startAngle>360;)this._startAngle-=360;for(;this._startAngle<0;)this._startAngle+=360;for(;this._endAngle>360;)this._endAngle-=360;for(;this._endAngle<0;)this._endAngle+=360;for(;this._endAngle<this._startAngle;)this._endAngle+=360;for(var n=_0x2909c1.distance(t[0],t[1]),r=_0x2909c1.distance(t[0],t[2]),o=[],a=[],s=[],l=Math.PI/180,u=(this._endAngle-this._startAngle)/72,c=this._startAngle;c<this._endAngle+u/2;c+=u){var h=t[0].x+n*Math.cos(c*l),d=t[0].y+n*Math.sin(c*l),f=t[0].x+r*Math.cos(c*l),p=t[0].y+r*Math.sin(c*l);o.push(new WebGLPlot.Cartesian3(h,d,0)),a.push(new WebGLPlot.Cartesian3(f,p,0))}o.push(o[0].clone()),a.push(a[0].clone());var _=new _0x4c78d5({points:o,symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON});s.push(_);var m=new _0x4c78d5({points:a,symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON});return s.push(m),s},_0x431d2c.prototype.getSymbolName=function(){return this._symbolName};var _0x3f249a=(_0x620ce0=!0,function(e,t){var i=_0x620ce0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x620ce0=!1,i}),_0x5f3fd2=_0x3f249a(void 0,(function(){return _0x5f3fd2.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f3fd2).search("(((.+)+)+)+$")})),_0x620ce0;function _0x105b3f(){this._code=_0x1c668c.SYMBOL_CURVEEIGHT,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_CURVEEIGHT,this._symbolName=WebGLPlot.plotI18n("curveEight"),this._minEditPts=2,this._maxEditPts=3}_0x5f3fd2(),_0x105b3f.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x105b3f.prototype.getMinEditPts=function(){return this._minEditPts},_0x105b3f.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2==t.length&&_0x2909c1.isSamePt(t[0],t[1]))return null;var i,n,r,o,a=[];if(2===t.length){var s=t[0].clone(),l=t[1].clone(),u=_0x2909c1.distance(s,l)/2,c=180*_0x2909c1.radian(s,l)/Math.PI,h=new WebGLPlot.Cartesian3((s.x+l.x)/2,(s.y+l.y)/2,0);i=_0x2909c1.circlePoint(h,u,u,c+90);a=[];var d=new _0x4c78d5({points:r=_0x2909c1.calcCirclePts(u,i),symbolType:_0x1c668c.SYMBOL_CIRCLE});a.push(d),n=_0x2909c1.circlePoint(h,3*u,3*u,c+90);var f=new _0x4c78d5({points:o=_0x2909c1.calcCirclePts(u,n),symbolType:_0x1c668c.SYMBOL_CIRCLE});a.push(f)}else{s=t[0],l=t[1];var p=t[2];c=0;c=_0x2909c1.isRight(p,s,l)?180*_0x2909c1.radian(l,s)/Math.PI+90:180*_0x2909c1.radian(s,l)/Math.PI+90;u=_0x2909c1.distance(s,l)/2,h=new WebGLPlot.Cartesian3((s.x+l.x)/2,(s.y+l.y)/2,0);i=_0x2909c1.circlePoint(h,u,u,c);var _=_0x2909c1.plumbLineLen(p,s,l);if(_<=4*u)n=_0x2909c1.circlePoint(h,3*u,3*u,c),r=_0x2909c1.calcCirclePts(u,i),a.push(new _0x4c78d5({points:r,symbolType:_0x1c668c.SYMBOL_SYMBOL_ARBITRARYPOLYGON})),o=_0x2909c1.calcCirclePts(u,n),a.push(new _0x4c78d5({points:o,symbolType:_0x1c668c.SYMBOL_SYMBOL_ARBITRARYPOLYGON}));else{n=_0x2909c1.circlePoint(h,_-u,_-u,c);for(var m=180*Math.acos(u/(_-2*u))/Math.PI,g=c-m,x=c-180+m,y=c-180-m+360,v=[],$=c+m-360;$<=g;$+=4){var b=_0x2909c1.circlePoint(i,u,u,$);v.push(b)}var T=_0x2909c1.circlePoint(i,u,u,g);v.push(T);var C=[];for($=x;$<y;$+=4){b=_0x2909c1.circlePoint(n,u,u,$);C.push(b)}var S=_0x2909c1.circlePoint(n,u,u,y);C.push(S);var w=[];w=w.concat(v);for($=C.length-1;$>=0;$--)w.push(C[$]);w.push(w[0].clone()),a.push(new _0x4c78d5({points:w,symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON}))}}return a},_0x105b3f.prototype.getSymbolName=function(){return this._symbolName};var _0x3a0bfe=(_0x1138b2=!0,function(e,t){var i=_0x1138b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1138b2=!1,i}),_0x4a0619=_0x3a0bfe(void 0,(function(){return _0x4a0619.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a0619).search("(((.+)+)+)+$")})),_0x1138b2;function _0x399148(){this._code=_0x1c668c.SYMBOL_KIDNEY,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_KIDNEY,this._symbolName=WebGLPlot.plotI18n("kidney"),this._minEditPts=2,this._maxEditPts=3}_0x4a0619(),_0x399148.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x399148.prototype.getMinEditPts=function(){return this._minEditPts},_0x399148.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;return 2==t.length&&_0x2909c1.isSamePt(t[0],t[1])||t.length<this._minEditPts?null:new _0x4c78d5({points:_0x2909c1.generateKidneyShapePts(t),symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON})},_0x399148.prototype.getSymbolName=function(){return this._symbolName};var _0x28af7a=(_0x458831=!0,function(e,t){var i=_0x458831?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x458831=!1,i}),_0x3a6a34=_0x28af7a(void 0,(function(){return _0x3a6a34.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a6a34).search("(((.+)+)+)+$")})),_0x458831;function _0x1daae0(){this._code=_0x1c668c.SYMBOL_PIE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_PIE,this._symbolName=WebGLPlot.plotI18n("sector"),this._maxEditPts=3,this._minEditPts=3}_0x3a6a34(),_0x1daae0.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i,n=_0x2909c1.innerAngle(t[0],t[1],t[2]),r=_0x2909c1.distance(t[0],t[1]),o=_0x2909c1.radian(t[0],t[1]),a=_0x2909c1.radian(t[0],t[2]),s=[];return s.push(t[0]),(s=s.concat(_0x2909c1.generateArcSpatialData(t[0],r,r,n,o,a))).push(t[0]),0!==s.length&&(i=new _0x4c78d5({symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON,points:s})),i},_0x1daae0.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x1daae0.prototype.getMinEditPts=function(){return this._minEditPts},_0x1daae0.prototype.getSymbolName=function(){return this._symbolName};var _0xa1e8ea=(_0x113d82=!0,function(e,t){var i=_0x113d82?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x113d82=!1,i}),_0x26a419=_0xa1e8ea(void 0,(function(){return _0x26a419.toString().search("(((.+)+)+)+$").toString().constructor(_0x26a419).search("(((.+)+)+)+$")})),_0x113d82;function _0x5ea7dc(){this._code=_0x1c668c.SYMBOL_POLYBEZIERCLOSED,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_POLYBEZIERCLOSED,this._symbolName=WebGLPlot.plotI18n("closedBesselCurve"),this._minEditPts=3,this._maxEditPts=9999}_0x26a419(),_0x5ea7dc.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points,i=t.length;if(2==i&&_0x2909c1.isSamePt(t[0],t[1])||i<this._minEditPts)return null;for(var n=[],r=0;r<i;++r)n.push(t[r].clone());n.push(t[0].clone());var o=_0x2909c1.generateBezierCtrlPts(n),a=_0x2909c1.generateBezierPointsWithCtrlPts(o);return new _0x4c78d5({points:a=_0x2909c1.clearNextSamePts(a),symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON})},_0x5ea7dc.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5ea7dc.prototype.getMinEditPts=function(){return this._minEditPts},_0x5ea7dc.prototype.getSymbolName=function(){return this._symbolName};var _0x439cd0=(_0x17de2e=!0,function(e,t){var i=_0x17de2e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17de2e=!1,i}),_0x1d238d=_0x439cd0(void 0,(function(){return _0x1d238d.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d238d).search("(((.+)+)+)+$")})),_0x17de2e;function _0x5e520d(){this._code=_0x1c668c.SYMBOL_POLYLINE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_POLYLINE,this._symbolName=WebGLPlot.plotI18n("polyLine"),this._minEditPts=2,this._maxEditPts=9999}_0x1d238d(),_0x5e520d.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;return null===t||t.length<this._minEditPts||t.length<this._minEditPts?null:new _0x4c78d5({symbolType:this._symbolType,points:t})},_0x5e520d.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5e520d.prototype.getMinEditPts=function(){return this._minEditPts},_0x5e520d.prototype.getSymbolName=function(){return this._symbolName};var _0x4193ee=(_0x3aeab6=!0,function(e,t){var i=_0x3aeab6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3aeab6=!1,i}),_0x5e5813=_0x4193ee(void 0,(function(){return _0x5e5813.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e5813).search("(((.+)+)+)+$")})),_0x3aeab6;function _0x362083(){this._code=_0x1c668c.SYMBOL_REGULARPOLYGON,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_REGULARPOLYGON,this._symbolName=WebGLPlot.plotI18n("regularPolygon"),this._minEditPts=2,this._maxEditPts=9999}_0x5e5813(),_0x362083.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(null===t||t.length<this._minEditPts)return null;var i=[],n=t.length,r=2*Math.PI/(n+1),o=Math.PI/2,a=_0x2909c1.distance(t[0],t[n-1]),s=new WebGLPlot.Cartesian3(t[0].x+a,t[0].y,t[0].z).clone();s=_0x2909c1.rotateAngle(t[0],o,s),i.push(s.clone());for(var l=1;l<n+1;++l)s=_0x2909c1.rotateAngle(t[0],r,s),i.push(s.clone());return i.push(i[0]),new _0x4c78d5({symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON,points:i})},_0x362083.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x362083.prototype.getMinEditPts=function(){return this._minEditPts},_0x362083.prototype.getSymbolName=function(){return this._symbolName};var _0x18a725=(_0x141fd1=!0,function(e,t){var i=_0x141fd1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x141fd1=!1,i}),_0x3b6af9=_0x18a725(void 0,(function(){return _0x3b6af9.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b6af9).search("(((.+)+)+)+$")})),_0x141fd1;function _0x41bd10(){this._code=_0x1c668c.SYMBOL_RUNWAY,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_RUNWAY,this._symbolName=WebGLPlot.plotI18n("runway"),this._scalePoints=[],this._scaleValues=[],this._scaleValues.push(.2),this._minEditPts=2,this._maxEditPts=2}_0x3b6af9(),_0x41bd10.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x41bd10.prototype.getMinEditPts=function(){return this._minEditPts},_0x41bd10.prototype.getSymbolName=function(){return this._symbolName},_0x41bd10.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2===t.length&&_0x2909c1.isSamePt(t[0],t[1]))return null;for(var i=t[0].clone(),n=t[1].clone(),r=_0x2909c1.distance(i,n)*this._scaleValues[0],o=_0x2909c1.parallel(t,r/2),a=_0x2909c1.parallel(t,-r/2),s=180*_0x2909c1.radian(i,n)/Math.PI,l=[],u=s+90;u<=s+270;u+=10){var c=_0x2909c1.circlePoint(i,r/2,r/2,u);l.push(c)}for(var h=[],d=s-90;d<=s+90;d+=10){c=_0x2909c1.circlePoint(n,r/2,r/2,d);h.push(c)}var f=[];f=(f=(f=(f=f.concat(l)).concat(a)).concat(h)).concat(o);var p=new _0x4c78d5({points:f=_0x2909c1.clearNextSamePts(f),symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON}),_=new WebGLPlot.Cartesian3(l[0].x,l[0].y,l[0].z);return this._scalePoints.push(_),p},_0x41bd10.prototype.modifyScalePoint=function(e,t,i){if(0==t){var n=_0x2909c1.distance(i,e.points[0]),r=_0x2909c1.distance(e.points[0],e.points[1]);this._scalePoints[0]=2*n/r}};var _0x588169=(_0x5aa292=!0,function(e,t){var i=_0x5aa292?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5aa292=!1,i}),_0x32ea84=_0x588169(void 0,(function(){return _0x32ea84.toString().search("(((.+)+)+)+$").toString().constructor(_0x32ea84).search("(((.+)+)+)+$")})),_0x5aa292;function _0x5d985d(){this._code=_0x1c668c.SYMBOL_TRAPEZOID,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_TRAPEZOID,this._symbolName=WebGLPlot.plotI18n("trapezoid"),this._minEditPts=3,this._maxEditPts=3}_0x32ea84(),_0x5d985d.prototype.calculateParts=function(e){if(!defined(e)||!defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;t.length;var i=[],n=t[0].clone(),r=t[1].clone(),o=t[2].clone(),a=new WebGLPlot.Cartesian3(0,0,0);_0x2909c1.getTrapezoidPoints(1,o,r,n,a),i.push(n),i.push(r),i.push(o),i.push(a);var s,l=_0x2909c1.intersectLines(n,r,o,a),u=l.intersectPoint;return l.isIntersectLines&&(u.x>n.x&&u.x<r.x||u.y>n.y&&u.y<r.y||u.x<n.x&&u.x>r.x||u.y<n.y&&u.y>r.y)&&(i[0]=a,i[3]=n),4===i.length&&(i.push(i[0].clone()),s=new _0x4c78d5({symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON,points:i})),s},_0x5d985d.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5d985d.prototype.getMinEditPts=function(){return this._minEditPts},_0x5d985d.prototype.getSymbolName=function(){return this._symbolName};var _0xbc7073=(_0x5a4a82=!0,function(e,t){var i=_0x5a4a82?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a4a82=!1,i}),_0x3c51a3=_0xbc7073(void 0,(function(){return _0x3c51a3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c51a3).search("(((.+)+)+)+$")})),_0x5a4a82;function _0x392e98(){}_0x3c51a3(),_0x392e98.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%2525")).replace(/&/g,"%26");case Array:for(var i=[],n=0,r=t.length;n<r;n++)i.push(this.toJSON(t[n]));return"["+i.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){for(i=[],n=0,r=t.length;n<r;n++)i.push(this.toJSON(t[n]));return"["+i.join(",")+"]"}i=[];for(var o in t)"function"!=typeof t[o]&&"CLASS_NAME"!==o&&"parent"!==o&&i.push('"'+o+'":'+this.toJSON(t[o]));return i.length>0?"{"+i.join(",")+"}":"{}"}return t.toString()}},_0x392e98.geoGraphicObjectToSmlFeature=function(e,t){return WebGLPlot.defined(e)?e.getSymbolData():null},_0x392e98.smlFeatureToGeoGraphicObject=function(e,t){t.geoJsonToGeoGraphicObject(e)};var _0x5f41ef=(_0x462c22=!0,function(e,t){var i=_0x462c22?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x462c22=!1,i}),_0x8ef3b2=_0x5f41ef(void 0,(function(){return _0x8ef3b2.toString().search("(((.+)+)+)+$").toString().constructor(_0x8ef3b2).search("(((.+)+)+)+$")})),_0x462c22;function _0x483060(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.layerName=WebGLPlot.defaultValue(e.layerName,""),this.spatialAnalystUrl=WebGLPlot.defaultValue(e.spatialAnalystUrl,null),this.useCanvas2=WebGLPlot.defaultValue(e.useCanvas2,!1),this.useCanvas=WebGLPlot.defaultValue(e.useCanvas,!1),this.features=WebGLPlot.defaultValue(e.features,[])}_0x8ef3b2();var _0xde9d5c=(_0x20afc6=!0,function(e,t){var i=_0x20afc6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x20afc6=!1,i}),_0x5748d4=_0xde9d5c(void 0,(function(){return _0x5748d4.toString().search("(((.+)+)+)+$").toString().constructor(_0x5748d4).search("(((.+)+)+)+$")})),_0x20afc6;function _0x545b8d(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),WebGLPlot.Check.defined("options.url",e.url);var t=e.url,i=e.responseType,n=WebGLPlot.defaultValue(e.method,"GET"),r=e.data,o=e.headers,a=e.overrideMimeType;t=WebGLPlot.defaultValue(t,e.url);var s=WebGLPlot.defined(e.request)?e.request:new WebGLPlot.Request;return s.url=t,s.requestFunction=function(e){var l=WebGLPlot.when.defer(),u=_0x545b8d.load(WebGLPlot.defaultValue(e,t),i,n,r,o,l,a);return WebGLPlot.defined(u)&&WebGLPlot.defined(u.abort)&&(s.cancelFunction=function(){u.abort()}),l.promise},WebGLPlot.RequestScheduler.request(s)}_0x5748d4();var _0x1c8d7b=/^data:(.*?)(;base64)?,(.*)$/;function _0x902b8b(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function _0x2f3485(e,t){for(var i=_0x902b8b(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return n}function _0x2c4b6a(e,t){t=WebGLPlot.defaultValue(t,"");var i=e[1],n=!!e[2],r=e[3];switch(t){case"":case"text":return _0x902b8b(n,r);case"arraybuffer":return _0x2f3485(n,r);case"blob":var o=_0x2f3485(n,r);return new Blob([o],{type:i});case"document":return(new DOMParser).parseFromString(_0x902b8b(n,r),i);case"json":return JSON.parse(_0x902b8b(n,r));default:throw new WebGLPlot.DeveloperError("Unhandled responseType: "+t)}}_0x545b8d.load=function(e,t,i,n,r,o,a){var s=_0x1c8d7b.exec(e);if(null===s){var l=new XMLHttpRequest;if(WebGLPlot.TrustedServers.contains(e)&&(l.withCredentials=!0),WebGLPlot.defined(a)&&WebGLPlot.defined(l.overrideMimeType)&&l.overrideMimeType(a),l.open(i,e,!0),WebGLPlot.defined(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);WebGLPlot.defined(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,i=l.responseType;if(!WebGLPlot.defined(e)||WebGLPlot.defined(t)&&i!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===i||"document"===i)&&WebGLPlot.defined(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==i&&"text"!==i||!WebGLPlot.defined(l.responseText)?o.reject(new WebGLPlot.RuntimeError("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new WebGLPlot.RequestErrorEvent(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new WebGLPlot.RequestErrorEvent)},l.send(n),l}o.resolve(_0x2c4b6a(s,t))},_0x545b8d.defaultLoad=_0x545b8d.load;var _0x103584=(_0x19afe7=!0,function(e,t){var i=_0x19afe7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19afe7=!1,i}),_0x3441f3=_0x103584(void 0,(function(){return _0x3441f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3441f3).search("(((.+)+)+)+$")})),_0x19afe7;function _0x2d198d(e,t,i){return _0x545b8d({url:e,headers:t,request:i})}_0x3441f3();var _0x245251=(_0x4fbb25=!0,function(e,t){var i=_0x4fbb25?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fbb25=!1,i}),_0x36abc8=_0x245251(void 0,(function(){return _0x36abc8.toString().search("(((.+)+)+)+$").toString().constructor(_0x36abc8).search("(((.+)+)+)+$")})),_0x4fbb25;_0x36abc8();var _0x4bb626={Accept:"application/json,*/*;q=0.01"};function _0x386520(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("url is required.");WebGLPlot.defined(t)?WebGLPlot.defined(t.Accept)||((t=WebGLPlot.clone(t)).Accept=_0x4bb626.Accept):t=_0x4bb626;var n=_0x2d198d(e,t,i);if(WebGLPlot.defined(n))return n.then((function(e){return JSON.parse(e)}))}var _0x5366dd=(_0x2ba86e=!0,function(e,t){var i=_0x2ba86e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ba86e=!1,i}),_0x33e6ef=_0x5366dd(void 0,(function(){return _0x33e6ef.toString().search("(((.+)+)+)+$").toString().constructor(_0x33e6ef).search("(((.+)+)+)+$")})),_0x2ba86e;function _0x102a68(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.smlInfo=WebGLPlot.defaultValue(e.smlInfo,void 0),this.mapInfo=WebGLPlot.defaultValue(e.mapInfo,""),this.layerDatas=WebGLPlot.defaultValue(e.layerDatas,void 0)}_0x33e6ef(),_0x102a68.prototype.destory=function(){this.smlInfo=null,this.mapInfo=null,this.layerDatas=null};var _0xa2fe75=(_0x144cba=!0,function(e,t){var i=_0x144cba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x144cba=!1,i}),_0x30bf76=_0xa2fe75(void 0,(function(){return _0x30bf76.toString().search("(((.+)+)+)+$").toString().constructor(_0x30bf76).search("(((.+)+)+)+$")})),_0x144cba;function _0x1e67d8(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.smlName=WebGLPlot.defaultValue(e.smlName,""),this.smlDesc=WebGLPlot.defaultValue(e.smlDesc,""),this.smlSeclevel=WebGLPlot.defaultValue(e.smlSeclevel,""),this.smlDepat=WebGLPlot.defaultValue(e.smlDepat,""),this.smlAuthor=WebGLPlot.defaultValue(e.smlAuthor,""),this.smlTime=WebGLPlot.defaultValue(e.smlTime,"")}_0x30bf76(),_0x1e67d8.prototype.fromJSON=function(e){this.smlName=e.SMLName,this.smlDesc=e.SMLDesc,this.smlSeclevel=e.SMLSeclevel,this.smlDepat=e.SMLDepat,this.smlAuthor=e.SMLAuthor,this.smlTime=e.SMLTime},_0x1e67d8.prototype.toJSON=function(){return'{"SMLName":'+WebGLPlot.toJSON(this.smlName)+',"SMLDesc":'+WebGLPlot.toJSON(this.smlDesc)+',"SMLSeclevel":'+WebGLPlot.toJSON(this.smlSeclevel)+',"SMLDepat":'+WebGLPlot.toJSON(this.smlDepat)+',"SMLAuthor":'+WebGLPlot.toJSON(this.smlAuthor)+',"SMLTime":'+WebGLPlot.toJSON(this.smlTime)+"}"},_0x1e67d8.prototype.destroy=function(){this.smlName="",this.smlDesc="",this.smlAuthor="",this.smlSeclevel="",this.smlDepat="",this.smlTime=""};var _0x4824e8=(_0x1fd86b=!0,function(e,t){var i=_0x1fd86b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fd86b=!1,i}),_0x14cf12=_0x4824e8(void 0,(function(){return _0x14cf12.toString().search("(((.+)+)+)+$").toString().constructor(_0x14cf12).search("(((.+)+)+)+$")})),_0x1fd86b;_0x14cf12();var WebGLPlot$9=window.WebGLPlot=window.WebGLPlot||{},_0x177c60=new Map;function _0x1c2819(e){e=WebGLPlot$9.defaultValue(e,WebGLPlot$9.defaultValue.EMPTY_OBJECT),this._scene=WebGLPlot$9.defaultValue(e.scene,void 0),this._serverUrl=WebGLPlot$9.defaultValue(e.serverUrl,""),this._smlInfo=WebGLPlot$9.defaultValue(e.smlInfo,new _0x1e67d8),this._smlFileName=WebGLPlot$9.defaultValue(e.smlFileName,"situationMap"),this._sitData=WebGLPlot$9.defaultValue(e.sitData,new _0x102a68),this._openSmlFileCompleted=new WebGLPlot$9.Event,this._openSmlFileFailed=new WebGLPlot$9.Event,this._saveSmlFileCompleted=new WebGLPlot$9.Event,this._saveSmlFileFailed=new WebGLPlot$9.Event,this._getSmlInfosCompleted=new WebGLPlot$9.Event,this._getSmlInfosFailed=new WebGLPlot$9.Event,this._getSmlInfoCompleted=new WebGLPlot$9.Event,this._getSmlInfoFailed=new WebGLPlot$9.Event,this._deleteSmlFileCompleted=new WebGLPlot$9.Event,this._deleteSmlFileFailed=new WebGLPlot$9.Event,this._openLocalSmlFileCompleted=new WebGLPlot$9.Event,this._openLocalSmlFileFailed=new WebGLPlot$9.Event,this._addSmlFileCompleted=new WebGLPlot$9.Event,this._addSmlFileFailed=new WebGLPlot$9.Event,this._addSmlFileToLayerCompleted=new WebGLPlot$9.Event,this._addSmlFileToLayerFailed=new WebGLPlot$9.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},e.options&&e.options.serviceParams&&_0x2909c1.extend(this.options,e.options)}_0x1c2819.getInstance=function(e){let t;return e.scene&&(t=_0x177c60.get(e.scene._plottingID)),WebGLPlot$9.defined(e)&&!WebGLPlot$9.defined(t)&&(t=new WebGLPlot$9.SitDataManager(e),_0x177c60.set(e.scene._plottingID,t)),t},_0x1c2819.prototype.openJsonSitData=function(e,t){!WebGLPlot$9.defined(e)||null===e||((!WebGLPlot$9.defined(t)||""===t)&&(t="situationMap"),this._getCompletedInit(e,t))},_0x1c2819.prototype.openAndUploadLocalSmlFile=function(e){var t=this;this.uploadSmlFile((function(i){i.success?t.openSmlFileOnServer(i.smlFileName,e):t._openSmlFileFailed.raiseEvent()}))},_0x1c2819.prototype.openLocalSmlFile=function(){if(!window.FileReader)return;let e=document.createElement("input");e.setAttribute("type","file"),e.click(),e.onchange=function(){if(!e.files||0===e.files.length)return;let t=e.files[0].name;var i=new FileReader;i.readAsText(e.files[0]),i.onloadstart=function(e){(e.total>=5242880||e.total<=0)&&_self._openLocalSmlFileFailed.raiseEvent()},i.onerror=function(e){_self._openLocalSmlFileFailed.raiseEvent()},i.onloadend=function(){_self._openLocalSmlFileCompleted.raiseEvent()},i.onload=function(i){self._getCompletedInit(JSON.parse(i.target.result),t),e.remove()}}},_0x1c2819.prototype.addLocalSmlFile=function(e){var t=this;this.uploadSmlFile((function(i){if(!i.success)throw new WebGLPlot$9.DeveloperError("uploadSmlFile failed!!!");t.addSmlFileOnServer(i.smlFileName,e)}))},_0x1c2819.prototype.uploadSmlFile=function(e){if(!window.FileReader)return;let t=document.createElement("input");t.setAttribute("type","file"),t.click();var i=this;t.onchange=function(){if(!t.files||0===t.files.length)return;const n=t.files[0].name.split(".")[0];var r=new FileReader;r.readAsText(t.files[0]),r.onload=function(r){var o=WebGLPlot$9.smlFileService(i._serverUrl,i.options.serviceParams);if(!o)return;let a=JSON.parse(r.target.result);var s=o.editSmlFileParams;s.method="POST",s.sitData=a,s.smlFileName=n,s.isCover=!0,o.smlFileService.editSMLFile(s,(function(t){t.result.succeed&&"function"==typeof e?e({success:!0,smlFileName:n,message:"success"}):"function"==typeof e&&e({success:!1,message:"failed"})}),i),t.remove()}}},_0x1c2819.prototype.addSmlFileToLayer=function(e){var t=this;this.uploadSmlFile((function(i){i.success?t.addSmlFileToLayerOnServer(i.smlFileName,e):t._addSmlFileToLayerFailed.raiseEvent()}))},_0x1c2819.prototype.addSmlFileOnServer=function(e,t){var i=this,n=this._scene;var r=WebGLPlot$9.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?function(e){if(WebGLPlot$9.defined(e)){for(var r=e.layerDatas,o=null,a=0;a<r.length;++a)if(null!==r[a].layerName){var s=_0x2909c1.getPlotLayers(n);if(null===s)return;o=s.find(r[a].layerName),t&&!WebGLPlot$9.defined(o)&&(o=new _0x394df6(n,r[a].layerName),s.add(o)),WebGLPlot$9.defined(o)&&i._load(r[a],o)}null!==o?i._addSmlFileCompleted.raiseEvent():i._addSmlFileFailed.raiseEvent()}}(e.result):i._addSmlFileFailed.raiseEvent()}),this)}},_0x1c2819.prototype.addSmlFileToLayerOnServer=function(e,t){var i=this,n=this._scene;var r=WebGLPlot$9.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?function(e){if(WebGLPlot$9.defined(e)){var r,o=e.layerDatas,a=_0x2909c1.getPlotLayers(n);r=a.find(t),WebGLPlot$9.defined(r)||(r=new _0x394df6(n,t),a.add(r));for(var s=0;s<o.length;++s)i._load(o[s],r);i._addSmlFileToLayerCompleted.raiseEvent()}}(e.result):i._addSmlFileToLayerFailed.raiseEvent()}),this)}},_0x1c2819.prototype.downloadSmlFileUrl=function(e){return"smlFileDownload/"+e+".sml"},_0x1c2819.prototype.openSmlFileOnServer=function(e,t){var i=this;var n=WebGLPlot$9.smlFileService(this._serverUrl,this.options.serviceParams);if(n){var r=n.editSmlFileParams;r.method="GET",r.smlFileName=e,n.smlFileService.editSMLFile(r,(function(n){var r;n.result&&n.result.succeed?(r=n.result,i._getCompletedInit(r,e),"function"==typeof t&&t({success:!0,smlFileName:e,sitDataLayers:i.getPlottingLayers()})):(i._openSmlFileFailed.raiseEvent(),"function"==typeof t&&t({success:!1,message:"Open failed"}))}),this)}},_0x1c2819.prototype.deleteSmlFileOnServer=function(e){var t=this;var i={smlFileName:e},n=this.buildUrl(i);n+="?isCover=false";var r=WebGLPlot$9.EditSmlFile(n,this.options.serviceParams);if(r){var o=r.editSmlFile;o.events.on({processCompleted:function(e){t._deleteSmlFileCompleted.raiseEvent()},processFailed:function(e){t._deleteSmlFileFailed.raiseEvent()},scope:this});var a=r.editSmlFileParams;a.method="DELETE",a.smlFileName=e,o.processAsync(a)}},_0x1c2819.prototype.updateLayerData=function(e){if(WebGLPlot$9.defined(this._sitData)&&WebGLPlot$9.defined(this._sitData.layerDatas))for(var t=0;t<this._sitData.layerDatas.length;++t)if(e._name==this._sitData.layerDatas[t].layerName){for(var i=this._sitData.layerDatas[t],n=[],r=e.geoGraphicObjects,o=0;o<r.length;++o){var a,s=r[o];a=_0x392e98.geoGraphicObjectToSmlFeature(s,s.feature),n.push(a)}i.features=n,i.isEditable=e.isEditable,i.isLocked=e.isLocked,i.isSelected=e.isSelected,i.vivibility=e.visibility}},_0x1c2819.prototype.getSmlInfos=function(e,t){var i=this;var n=e*t,r=t,o=i._serverUrl,a=o.substr(o.length-1,1);o+="/"===a?"smlInfos":"/smlInfos",o+=".json",_0x386520(o+="?start="+n+"&count="+r).then((function(e){var t;t=e,i._getSmlInfosCompleted.raiseEvent(t)}),(function(e){var t;t=e,i._getSmlInfosFailed.raiseEvent(t)}))},_0x1c2819.prototype.getSmlInfo=function(e){this._scene;var t={smlFileName:e};_0x386520(this.buildUrl(t)).then((function(e){!function(e){this._getSmlInfoCompleted.raiseEvent(e.smlInfo)}(e)}),(function(e){!function(e){this._getSmlInfoFailed.raiseEvent(null)}()}))},_0x1c2819.prototype.saveAsSmlFile=function(e){this._save(e,!0)},_0x1c2819.prototype.newSmlFile=function(){this._smlFileName="",this._smlInfo.destroy();for(var e,t=_0x2909c1.getPlotLayers(this._scene),i=0;i<t._layerQueue.length;++i)(e=t.findByIndex(i))instanceof _0x394df6&&t.remove(e._name);_0x4786d3.removeAll(this._scene)},_0x1c2819.prototype._getCompletedInit=function(e,t){this._smlFileName=t,this.openSitDataFromJson(e)},_0x1c2819.prototype.openSitDataFromJson=function(e){this._smlInfo.fromJSON(e.smlInfo),e.mapInfo&&(this._sitData.mapInfo=e.mapInfo),this._sitData.layerDatas=e.layerDatas;var t=e.layerDatas,i=this._scene,n=_0x2909c1.getPlotLayers(i);if(null!==n){for(var r,o=n._layerQueue.length,a=0;a<o;){var s=n.findByIndex(a);s instanceof _0x394df6?(s._removeAll(!0),n.remove(s._name),o--):a++}for(var l=0;l<t.length;++l)r=new _0x394df6(i,t[l].layerName),n.add(r),this._load(t[l],r),void 0!==t[l].isEditable&&null!==t[l].isEditable&&(r._isEditable=t[l].isEditable),void 0!==t[l].isSelected&&null!==t[l].isSelected&&(r._isSelected=t[l].isSelected),void 0!==t[l].isLocked&&null!==t[l].isLocked&&(r.isLocked=t[l].isLocked),void 0!==t[l].visibility&&null!==t[l].visibility&&(r.visibility=t[l].visibility),WebGLPlot$9.defined(t[l]._bIsUseDepthTest)&&r.setUseDepthTest(t[l]._bIsUseDepthTest);this._openSmlFileCompleted.raiseEvent(e)}},_0x1c2819.prototype._load=function(e,t){for(var i=0,n=e.features.length;i<n;++i){var r=e.features[i];null!==r&&(r.hasOwnProperty("isEdit")||(r.isEdit=!0),_0x392e98.smlFeatureToGeoGraphicObject(r,t))}},_0x1c2819.prototype.saveSmlFile=function(e,t){WebGLPlot$9.defined(e)||(e=this.smlFileName),WebGLPlot$9.defined(t)||(t=!0),this._save(e,t)},_0x1c2819.prototype._save=function(e,t){_0x25263a.getInstance({scene:this._scene}).reset();var i=this;function n(e){var t,n;e?(n=e,i._saveSmlFileCompleted.raiseEvent(n)):i._saveSmlFileFailed.raiseEvent(t)}var r=i._serverUrl,o=WebGLPlot$9.smlFileService(r,this.options.serviceParams);if(o){var a=o.editSmlFileParams;a.method="POST",a.sitData=this.saveSitData(),a.smlFileName=e,a.isCover=t,o.smlFileService.editSMLFile(a,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}},_0x1c2819.prototype.saveSitData=function(){var e=this._scene,t=new _0x102a68;t.smlInfo=this._smlInfo,this._sitData.mapInfo?t.mapInfo=this._sitData.mapInfo:t.mapInfo={zoom:4,centerX:112.5,centerY:36.5},t.layerDatas=[];var i=_0x2909c1.getPlotLayers(e);if(null===i)return t;for(var n,r,o=0;o<i._layerQueue.length;++o)if((n=i.findByIndex(o))instanceof _0x394df6){(r=new _0x483060).layerName=n._name,r.spatialAnalystUrl=WebGLPlot$9.defaultValue(n.spatialAnalystUrl,null),r.useCanvas=!0,r.isEditable=n.isEditable,r.isLocked=n.isLocked,r.isSelected=n.isSelected,r.visibility=n.visibility,r._bIsUseDepthTest=n._bIsUseDepthTest;for(var a=0;a<n.geoGraphicObjects.length;++a){var s=_0x392e98.geoGraphicObjectToSmlFeature(n.geoGraphicObjects[a]);r.features.push(s)}t.layerDatas.push(r)}return t},_0x1c2819.prototype.getPlottingLayers=function(){for(var e=[],t=this._scene,i=_0x2909c1.getPlotLayers(t),n=0;n<i._layerQueue.length;++n){var r=i.findByIndex(n);r instanceof _0x394df6&&e.push(r)}return e},_0x1c2819.prototype.buildUrl=function(e){var t=this._serverUrl,i=t.substr(t.length-1,1);t+="/"===i?"smlInfos/":"/smlInfos/";var n=e.smlFileName,r=RegExp(/./);return n.match(r)&&(n=n.split(".")[0]),t+=n+".json"},Object.defineProperties(_0x1c2819.prototype,{scene:{get:function(){return this._scene}},serverUrl:{get:function(){return this._serverUrl}},smlInfo:{get:function(){return this._smlInfo},set:function(e){e!==this._smlInfo&&(this._smlInfo=e)}},smlFileName:{get:function(){return this._smlFileName},set:function(e){e!==this._smlFileName&&(this._smlFileName=e)}},openSmlFileCompleted:{get:function(){return this._openSmlFileCompleted}},openSmlFileFailed:{get:function(){return this._openSmlFileFailed}},saveSmlFileFailed:{get:function(){return this._saveSmlFileFailed}},saveSmlFileCompleted:{get:function(){return this._saveSmlFileCompleted}},getSmlInfosCompleted:{get:function(){return this._getSmlInfosCompleted}},getSmlInfosFailed:{get:function(){return this._getSmlInfosFailed}},getSmlInfoCompleted:{get:function(){return this._getSmlInfoCompleted}},getSmlInfoFailed:{get:function(){return this._getSmlInfoFailed}},openLocalSmlFileCompleted:{get:function(){return this._openLocalSmlFileCompleted}},openLocalSmlFileFailed:{get:function(){return this._openLocalSmlFileFailed}},addSmlFileToLayerCompleted:{get:function(){return this._addSmlFileToLayerCompleted}},addSmlFileToLayerFailed:{get:function(){return this._addSmlFileToLayerFailed}},addSmlFileCompleted:{get:function(){return this._addSmlFileCompleted}},addSmlFileFailed:{get:function(){return this._addSmlFileFailed}},deleteSmlFileCompleted:{get:function(){return this._deleteSmlFileCompleted}},deleteSmlFileFailed:{get:function(){return this._deleteSmlFileFailed}}}),WebGLPlot$9.SitDataManager=_0x1c2819;var _0x556e86=(_0x2e74f3=!0,function(e,t){var i=_0x2e74f3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e74f3=!1,i}),_0x2bddce=_0x556e86(void 0,(function(){return _0x2bddce.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bddce).search("(((.+)+)+)+$")})),_0x2e74f3;function _0x10cb0b(e){this.style=this.getDefaultStyle(),this.viewer=e,this.rainStage=null,this.snowStage=null}_0x2bddce(),_0x10cb0b.prototype.smoke=function(e,t){var i=this.createSmokeSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x10cb0b.prototype.flame=function(e,t){var i=this.createFlameSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x10cb0b.prototype.blast=function(e,t){var i=this.createBlastSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x10cb0b.prototype.removeEfficiency=function(e){this.viewer.scene.primitives.remove(e)},_0x10cb0b.prototype.startRain=function(){this.rain()},_0x10cb0b.prototype.stopRain=function(){null!==this.rainStage&&(this.viewer.scene.postProcessStages.remove(this.rainStage),this.rainStage=null)},_0x10cb0b.prototype.startSnow=function(){this.snow()},_0x10cb0b.prototype.stopSnow=function(){null!==this.snowStage&&(this.viewer.scene.postProcessStages.remove(this.snowStage),this.snowStage=null)},_0x10cb0b.prototype.rain=function(){if(null===this.rainStage){var e=new Cesium.PostProcessStage({name:"czm_rain",fragmentShader:"uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n \n float hash(float x){\n return fract(sin(x*133.3)*13.13);\n }\n \n void main(void){\n \n float time = czm_frameNumber / 60.0;\n vec2 resolution = czm_viewport.zw;\n \n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 c=vec3(.6,.7,.8);\n \n float a=-.4;\n float si=sin(a),co=cos(a);\n uv*=mat2(co,-si,si,co);\n uv*=length(uv+vec2(0,4.9))*.3+1.;\n \n float v=1.-sin(hash(floor(uv.x*100.))*100.);\n float b=clamp(abs(sin(15.*time*v+uv.y*(10./(2.+v))))-.95,0.,1.)*4.;\n c*=v*b; \n \n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c,1), 0.5); \n }\n"});this.viewer.scene.postProcessStages.add(e),this.rainStage=e}},_0x10cb0b.prototype.snow=function(){if(null===this.snowStage){var e=new Cesium.PostProcessStage({name:"czm_snow",fragmentShader:"uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n \n float snow(vec2 uv,float scale)\n {\n float time = czm_frameNumber / 60.0;\n float w=smoothstep(1.,0.,-uv.y*(scale/10.));if(w<.1)return 0.;\n uv+=time/scale;uv.y+=time*2./scale;uv.x+=sin(uv.y+time*.5)/scale;\n uv*=scale;vec2 s=floor(uv),f=fract(uv),p;float k=3.,d;\n p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;d=length(p);k=min(d,k);\n k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\n return k*w;\n }\n \n void main(void){\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 finalColor=vec3(0);\n float c = 0.0;\n c+=snow(uv,30.)*.0;\n c+=snow(uv,20.)*.0;\n c+=snow(uv,15.)*.0;\n c+=snow(uv,10.);\n c+=snow(uv,8.);\n c+=snow(uv,6.);\n c+=snow(uv,5.);\n finalColor=(vec3(c)); \n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.5); \n \n }\n "});this.viewer.scene.postProcessStages.add(e),this.snowStage=e}},_0x10cb0b.prototype.createSmokeSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:new WebGLPlot.Color(0,0,0,.6),endColor:new WebGLPlot.Color(0,0,0,0),startScale:this.style.startScale,endScale:this.style.endScale,minimumParticleLife:this.style.minimumParticleLife,maximumParticleLife:this.style.maximumParticleLife,minimumSpeed:this.style.minimumSpeed,maximumSpeed:this.style.maximumSpeed,imageSize:new WebGLPlot.Cartesian2(this.style.particleSize,this.style.particleSize),emissionRate:this.style.emissionRate,lifetime:16,emitter:new WebGLPlot.CircleEmitter(5),sizeInMeters:!0,performance:!1,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x10cb0b.prototype.createFlameSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:new WebGLPlot.Color(1,1,1,1),endColor:new WebGLPlot.Color(.5,0,0,0),startScale:this.style.startScale,endScale:1.5,minimumParticleLife:this.style.minimumParticleLife,maximumParticleLife:this.style.maximumParticleLife,minimumSpeed:this.style.minimumSpeed,maximumSpeed:this.style.maximumSpeed,imageSize:new WebGLPlot.Cartesian2(2,2),emissionRate:this.style.emissionRate,lifetime:16,loop:!0,emitter:new WebGLPlot.ConeEmitter(.785398185),sizeInMeters:!0,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x10cb0b.prototype.createBlastSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:WebGLPlot.Color.RED.withAlpha(.7),endColor:WebGLPlot.Color.YELLOW.withAlpha(.3),startScale:1,endScale:2,particleLife:1,speed:5,imageSize:new WebGLPlot.Cartesian2(2,2),emissionRate:50,lifetime:5,loop:!0,emitter:new WebGLPlot.BoxEmitter(new WebGLPlot.Cartesian3(1,1,1)),sizeInMeters:!0,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x10cb0b.prototype.getDefaultStyle=function(e){return{fireImage:e,startScale:0,endScale:1.5,minimumParticleLife:1.5,maximumParticleLife:1.8,minimumSpeed:7,maximumSpeed:9,particleSize:2,emissionRate:200}},_0x10cb0b.prototype.computeModelMatrix=function(e,t){var i=WebGLPlot.Property.getValueOrUndefined(e.position,t,new WebGLPlot.Cartesian3);if(WebGLPlot.defined(i)){var n=WebGLPlot.Property.getValueOrUndefined(e.orientation,t,new WebGLPlot.Quaternion);if(WebGLPlot.defined(n))r=WebGLPlot.Matrix4.fromRotationTranslation(WebGLPlot.Matrix3.fromQuaternion(n,new WebGLPlot.Matrix3),i,new WebGLPlot.Matrix4);else var r=WebGLPlot.Transforms.eastNorthUpToFixedFrame(i,void 0,new WebGLPlot.Matrix4);return r}},_0x10cb0b.prototype.computeEmitterModelMatrix=function(){var e=WebGLPlot.HeadingPitchRoll.fromDegrees(0,0,0,new WebGLPlot.HeadingPitchRoll),t=new WebGLPlot.TranslationRotationScale;return t.translation=WebGLPlot.Cartesian3.fromElements(2.5,4,1,new WebGLPlot.Cartesian3),t.rotation=WebGLPlot.Quaternion.fromHeadingPitchRoll(e,new WebGLPlot.Quaternion),WebGLPlot.Matrix4.fromTranslationRotationScale(t,new WebGLPlot.Matrix4)};var _0x3cd34a=(_0x3c6f5f=!0,function(e,t){var i=_0x3c6f5f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3c6f5f=!1,i}),_0x34b7bd=_0x3cd34a(void 0,(function(){return _0x34b7bd.toString().search("(((.+)+)+)+$").toString().constructor(_0x34b7bd).search("(((.+)+)+)+$")})),_0x3c6f5f;_0x34b7bd();var _0x5375f6={u_globeMinimumAltitude:function(){return 55e3}};function _0x5c1673(e){var t=(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)).appearance,i=e.geometryInstances;if(!WebGLPlot.defined(t)&&WebGLPlot.defined(i))for(var n=Array.isArray(i)?i:[i],r=n.length,o=0;o<r;o++){var a=n[o].attributes;if(WebGLPlot.defined(a)&&WebGLPlot.defined(a.color)){t=new WebGLPlot.PerInstanceColorAppearance({flat:!0});break}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=WebGLPlot.defaultValue(e.show,!0),this.classificationType=WebGLPlot.defaultValue(e.classificationType,WebGLPlot.ClassificationType.BOTH),this.debugShowBoundingVolume=WebGLPlot.defaultValue(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=WebGLPlot.defaultValue(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._readyPromise=WebGLPlot.when.defer(),this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=WebGLPlot.defaultValue(e.maxTerrainHeight,WebGLPlot.ApproximateTerrainHeights._defaultMaxTerrainHeight),this._minTerrainHeight=WebGLPlot.defaultValue(e.minTerrainHeight,WebGLPlot.ApproximateTerrainHeights._defaultMinTerrainHeight),this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:WebGLPlot.defaultValue(e.vertexCacheOptimize,!1),interleave:WebGLPlot.defaultValue(e.interleave,!1),releaseGeometryInstances:WebGLPlot.defaultValue(e.releaseGeometryInstances,!0),allowPicking:WebGLPlot.defaultValue(e.allowPicking,!0),asynchronous:WebGLPlot.defaultValue(e.asynchronous,!0),compressVertices:WebGLPlot.defaultValue(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:_0x5375f6,classificationType:this.classificationType}}function _0x132895(e){return function(t,i){return e._maxTerrainHeight}}function _0xa7ebb1(e){return function(t,i){return e._minHeight}}Object.defineProperties(_0x5c1673.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),_0x5c1673.isSupported=WebGLPlot.ClassificationPrimitive.isSupported;var _0x437e2d=new WebGLPlot.Cartesian3,_0x597fb7=new WebGLPlot.Cartesian3,_0x3792b6=new WebGLPlot.Cartesian3,_0x5e7fb0=new WebGLPlot.Cartographic,_0x4ad76e=new WebGLPlot.Rectangle;function _0x247de1(e,t){var i=e.mapProjection.ellipsoid;if(!WebGLPlot.defined(t.attributes)||!WebGLPlot.defined(t.attributes.position3DHigh))return WebGLPlot.defined(t.rectangle)?t.rectangle:void 0;for(var n=t.attributes.position3DHigh.values,r=t.attributes.position3DLow.values,o=n.length,a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=0;c<o;c+=3){var h=WebGLPlot.Cartesian3.unpack(n,c,_0x437e2d),d=WebGLPlot.Cartesian3.unpack(r,c,_0x597fb7),f=WebGLPlot.Cartesian3.add(h,d,_0x3792b6),p=i.cartesianToCartographic(f,_0x5e7fb0),_=p.latitude,m=p.longitude;a=Math.min(a,_),s=Math.min(s,m),l=Math.max(l,_),u=Math.max(u,m)}var g=_0x4ad76e;return g.north=l,g.south=a,g.east=u,g.west=s,g}function _0x15b5dc(e,t,i){var n=t.mapProjection.ellipsoid,r=_0x247de1(t,i);if(e.geometryInstances){var o=Number.MIN_VALUE,a=Number.MAX_VALUE,s=!1;for(let t=0;t<e.geometryInstances.length>0;t++){var l=e.geometryInstances[t].geometry._groundBottomAltitude,u=e.geometryInstances[t].geometry._groundExtrudedHeight;if(WebGLPlot.defined(l)&&WebGLPlot.defined(u)){var c=l+u;o=Math.max(o,c),a=Math.min(a,l),s=!0}}e._maxHeight=s?o:e._maxHeight,e._minHeight=s?a:e._minHeight}var h=(Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances])[0].geometry._granularity,d=WebGLPlot.OrientedBoundingBox.fromRectangle(r,_0xa7ebb1(e)(h,n),_0x132895(e)(h,n),n);if(e._boundingVolumes.push(d),!t.scene3DOnly){var f=t.mapProjection,p=WebGLPlot.BoundingSphere.fromRectangleWithHeights2D(r,f,e._maxHeight,e._minHeight);WebGLPlot.Cartesian3.fromElements(p.center.z,p.center.x,p.center.y,p.center),e._boundingVolumes2D.push(p)}}function _0x42dbde(e,t){return Math.floor(e%t/3)}function _0x10d472(e,t,i,n,r,o,a){var s=e._primitive;i.mode!==WebGLPlot.SceneMode.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&t.derivedCommands&&t.derivedCommands.appearance2D&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t)}function _0x1f21a5(e,t,i,n,r,o){var a=e._primitive;i.mode!==WebGLPlot.SceneMode.SCENE3D&&t.shaderProgram===a._spPick&&a._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,i.commandList.push(t)}function _0x50cc66(e,t,i,n,r,o,a,s){var l;l=t.mode===WebGLPlot.SceneMode.SCENE3D?e._boundingVolumes:e._boundingVolumes2D;var u,c,h=e.classificationType,d=h!==WebGLPlot.ClassificationType.CESIUM_3D_TILE&&h!==WebGLPlot.ClassificationType.S3M_TILE,f=h!==WebGLPlot.ClassificationType.TERRAIN&&h!==WebGLPlot.ClassificationType.S3M_TILE,p=h!==WebGLPlot.ClassificationType.TERRAIN&&h!==WebGLPlot.ClassificationType.CESIUM_3D_TILE,_=t.passes,m=e._primitive;if(_.render){var g=i.length;for(u=0;u<g;++u)c=l[_0x42dbde(u,g)],d&&_0x10d472(e,i[u],t,r,o,c,a),f&&_0x10d472(e,i[u].derivedCommands.tileset,t,r,o,c,a),p&&_0x10d472(e,i[u].derivedCommands.s3mtiles,t,r,o,c,a);if(t.invertClassification){var x=m._commandsIgnoreShow,y=x.length;for(u=0;u<y;++u)c=l[Math.floor(u/2)],_0x10d472(e,x[u],t,r,o,c,a)}}if(_.pick){var v,$=n.length;for(e._useFragmentCulling||(v=m._primitive._pickOffsets),u=0;u<$;++u){if(c=l[_0x42dbde(u,$)],!e._useFragmentCulling)c=l[v[_0x42dbde(u,$)].index];d&&_0x1f21a5(e,n[u],t,r,o,c),f&&_0x1f21a5(e,n[u].derivedCommands.tileset,t,r,o,c),p&&_0x10d472(e,n[u].derivedCommands.s3mtiles,t,r,o,c,a)}}}_0x5c1673.initializeTerrainHeights=function(){return WebGLPlot.ApproximateTerrainHeights.initialize()},_0x5c1673.prototype.update=function(e){if(WebGLPlot.defined(this._primitive)||WebGLPlot.defined(this.geometryInstances)){if(!WebGLPlot.ApproximateTerrainHeights.initialized){if(!this.asynchronous)throw new WebGLPlot.DeveloperError("For synchronous GroundPrimitives, you must call PlotGroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");return void _0x5c1673.initializeTerrainHeights()}var t=this,i=this._classificationPrimitiveOptions;if(!WebGLPlot.defined(this._primitive)){var n,r,o,a,s,l=e.mapProjection.ellipsoid,u=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=u.length,h=new Array(c);for(a=0;a<c;++a){var d=_0x247de1(e,r=(n=u[a]).geometry);WebGLPlot.defined(s)?WebGLPlot.defined(d)&&WebGLPlot.Rectangle.union(s,d,s):s=WebGLPlot.Rectangle.clone(d);var f=n.id;if(WebGLPlot.defined(f)&&WebGLPlot.defined(d)){var p=WebGLPlot.ApproximateTerrainHeights.getBoundingSphere(d,l);this._boundingSpheresKeys.push(f),this._boundingSpheres.push(p)}if(o=r.constructor,!WebGLPlot.defined(o)||!WebGLPlot.defined(o.createShadowVolume))throw new WebGLPlot.DeveloperError("Not all of the geometry instances have PlotGroundPrimitive support.")}var _=e.terrainExaggeration;this._minHeight=this._minTerrainHeight*_,this._maxHeight=this._maxTerrainHeight*_;var m=_0x5c1673._supportsMaterials(e.context);if(this._useFragmentCulling=m,m){var g,x=!0;for(a=0;a<c;++a)if(s=_0x247de1(e,r=(n=u[a]).geometry),WebGLPlot.ShadowVolumeAppearance.shouldUseSphericalCoordinates(s)){x=!1;break}for(a=0;a<c;++a){o=(r=(n=u[a]).geometry).constructor;var y=_0x247de1(e,r),v=r.textureCoordinateRotationPoints,$=e.context.floatTextureSixPlaces;g=x?WebGLPlot.ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes(y,v,l,e.mapProjection,$,this._maxHeight):WebGLPlot.ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes(y,v,l,e.mapProjection,$);var b=n.attributes;for(var T in b)b.hasOwnProperty(T)&&(g[T]=b[T]);n.created?h[a]=new WebGLPlot.GeometryInstance({geometry:n._groundGeometry,attributes:g,id:n.id}):(h[a]=new WebGLPlot.GeometryInstance({geometry:o.createShadowVolume(r,_0xa7ebb1(this),_0x132895(this)),attributes:g,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0)}}else for(a=0;a<c;++a)o=(r=(n=u[a]).geometry).constructor,n.created?h[a]=new WebGLPlot.GeometryInstance({geometry:r,attributes:n.attributes,id:n.id}):(h[a]=new WebGLPlot.GeometryInstance({geometry:o.createShadowVolume(r,_0xa7ebb1(this),_0x132895(this)),attributes:n.attributes,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0);i.geometryInstances=h,i.appearance=this.appearance,i._createBoundingVolumeFunction=function(e,i){_0x15b5dc(t,e,i)},i._updateAndQueueCommandsFunction=function(e,i,n,r,o,a,s,l){_0x50cc66(t,i,n,r,o,a,s)},this._primitive=new WebGLPlot.ClassificationPrimitive(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0);var i=e._error;WebGLPlot.defined(i)?t._readyPromise.reject(i):t._readyPromise.resolve(t)}))}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},_0x5c1673.prototype.getBoundingSphere=function(e){var t=this._boundingSpheresKeys.indexOf(e);if(-1!==t)return this._boundingSpheres[t]},_0x5c1673.prototype.getGeometryInstanceAttributes=function(e){if(!WebGLPlot.defined(this._primitive))throw new WebGLPlot.DeveloperError("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},_0x5c1673.prototype.isDestroyed=function(){return!1},_0x5c1673.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),WebGLPlot.destroyObject(this)},_0x5c1673._supportsMaterials=function(e){return e.depthTexture},_0x5c1673.supportsMaterials=function(e){return WebGLPlot.Check.typeOf.object("scene",e),_0x5c1673._supportsMaterials(e.frameState.context)};var _0x38d5b7=(_0x37d294=!0,function(e,t){var i=_0x37d294?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37d294=!1,i}),_0x3bd03f=_0x38d5b7(void 0,(function(){return _0x3bd03f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3bd03f).search("(((.+)+)+)+$")})),_0x37d294;function _0x48550f(e){if(!e||!e.scene)throw new WebGLPlot.defined("GroundEffect scene is required.");this._scene=e.scene,this._show=WebGLPlot.defaultValue(e.show,!0),this._positions=WebGLPlot.defaultValue(e.positions,!0),this._color=WebGLPlot.defaultValue(e.color,WebGLPlot.Color.BLACK.withAlpha(.8)),this._maxTerrainHeight=WebGLPlot.defaultValue(e.maxTerrainHeight,void 0),this._minTerrainHeight=WebGLPlot.defaultValue(e.minTerrainHeight,void 0),this._id=WebGLPlot.defaultValue(e.id,WebGLPlot.createGuid()),this.initialize()}_0x3bd03f(),_0x48550f.prototype.initialize=function(){if(Array.isArray(this._positions)&&!(this._positions.length<3)){this._primitive&&this.destroy();var e=WebGLPlot.Cartesian3.fromDegreesArray(this._positions),t=new WebGLPlot.PolygonHierarchy(e),i=new WebGLPlot.PolygonGeometry({polygonHierarchy:t}),n={show:new WebGLPlot.ShowGeometryInstanceAttribute(this._show),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(this._color)},r=new WebGLPlot.GeometryInstance({geometry:i,attributes:n,id:this._id}),o=new _0x5c1673({show:this._show,asynchronous:!0,geometryInstances:r,classificationType:3,appearance:new WebGLPlot.PerInstanceColorAppearance,maxTerrainHeight:this._maxTerrainHeight,minTerrainHeight:this._minTerrainHeight});this._primitive=this._scene.primitives.add(o)}},_0x48550f.prototype.destroy=function(){this._scene&&this._primitive&&(this._scene.primitives.removeAndDestroy(this._primitive),this._primitive=void 0)},_0x48550f.prototype._update=function(){this.destroy(),this.initialize()},Object.defineProperties(_0x48550f.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._primitive&&(this._primitive.show=e))}},positions:{get:function(){return this._positions},set:function(e){Array.isArray(e)&&e.length>=3&&(this._positions=e,this._update())}},color:{get:function(){return this._color},set:function(e){WebGLPlot.Color.equals(e,this._color)||(this._color=e,this._update())}},maxTerrainHeight:{get:function(){return this._maxTerrainHeight},set:function(e){this._maxTerrainHeight!==e&&(this._maxTerrainHeight=e,this._update())}},minTerrainHeight:{get:function(){return this._minTerrainHeight},set:function(e){this._minTerrainHeight!==e&&(this._minTerrainHeight=e,this._update())}}});const _0x2a1e2f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4424ad=_0x2a1e2f(void 0,(function(){return _0x4424ad.toString().search("(((.+)+)+)+$").toString().constructor(_0x4424ad).search("(((.+)+)+)+$")}));function _0x2a2c3d(e){if(!e)throw new WebGLPlot.DeveloperError("CameraMoveHandler is required to initialize viewer");this._cameraMoveRate=100;let t=e.scene.globe.ellipsoid;_0x2a2c3d.flags={looking:!1,moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1};let i=this;e.clock.onTick.addEventListener((function(n){const r=e.camera,o=t.cartesianToCartographic(r.position).height/i._cameraMoveRate;_0x2a2c3d.flags.moveForward&&r.moveForward(o),_0x2a2c3d.flags.moveBackward&&r.moveBackward(o),_0x2a2c3d.flags.moveUp&&r.moveUp(o),_0x2a2c3d.flags.moveDown&&r.moveDown(o),_0x2a2c3d.flags.moveLeft&&r.moveLeft(o),_0x2a2c3d.flags.moveRight&&r.moveRight(o)}))}function _0x25cb6f(e){switch(e){case"Z".charCodeAt(0):return"moveForward";case"X".charCodeAt(0):return"moveBackward";case"W".charCodeAt(0):return"moveUp";case"S".charCodeAt(0):return"moveDown";case"D".charCodeAt(0):return"moveRight";case"A".charCodeAt(0):case 37:return"moveLeft";case 38:return"moveUp";case 39:return"moveRight";case 40:return"moveDown";default:return}}_0x4424ad(),_0x2a2c3d.prototype.activate=function(){document.addEventListener("keydown",this.keydown,!1),document.addEventListener("keyup",this.keyup,!1)},_0x2a2c3d.prototype.deActivate=function(){document.removeEventListener("keydown",this.keydown),document.removeEventListener("keyup",this.keyup)},_0x2a2c3d.prototype.keydown=function(e){const t=_0x25cb6f(e.keyCode);typeof t<"u"&&(_0x2a2c3d.flags[t]=!0)},_0x2a2c3d.prototype.keyup=function(e){const t=_0x25cb6f(e.keyCode);typeof t<"u"&&(_0x2a2c3d.flags[t]=!1)},Object.defineProperties(_0x2a2c3d.prototype,{cameraMoveRate:{get:function(){return this._cameraMoveRate},set:function(e){if(e===this._cameraMoveRate||"number"!=typeof e)return!1;this._cameraMoveRate=e}}});var _0x851894=(_0xee019d=!0,function(e,t){var i=_0xee019d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xee019d=!1,i}),_0x47ad60=_0x851894(void 0,(function(){return _0x47ad60.toString().search("(((.+)+)+)+$").toString().constructor(_0x47ad60).search("(((.+)+)+)+$")})),_0xee019d;function _0x21611c(e){e=e||{},this.method=e.method?e.method:"POST",this.sitData=e.sitData?e.sitData:null,this.smlFileName=e.smlFileName?e.smlFileName:"",this.isCover=!!e.isCover&&e.isCover,this.CLASS_NAME="SuperMap.EditSmlFileParameters"}_0x47ad60(),_0x21611c.prototype.destroy=function(){var e=this;e.method="POST",e.sitData=null,e.isCover=!1,e.smlFileName=""},_0x21611c.toJsonParameters=function(e){if(e)return WebGLPlot.toJSON(e.sitData)};var _0x3b4041=(_0x145227=!0,function(e,t){var i=_0x145227?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x145227=!1,i}),_0x580b87=_0x3b4041(void 0,(function(){return _0x580b87.toString().search("(((.+)+)+)+$").toString().constructor(_0x580b87).search("(((.+)+)+)+$")})),_0x145227;_0x580b87();class _0x5b4a7d extends _0x476176{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i=this;i.events=new _0x421885(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),this.CLASS_NAME="SuperMap.EditSmlFileService"}destroy(){super.destroy()}processAsync(e){if(e){var t=this,i=e.method,n=t.url.substr(t.url.length-1,1);t.url+="/"==n?"smlInfos/":"/smlInfos/",t.url+=e.smlFileName+".json",t.url+="?isCover="+e.isCover;var r=null;e.method&&"POST"===e.method&&(r=_0x21611c.toJsonParameters(e)),t.request({method:i,data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}const _0x3292bb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2fbeb3=_0x3292bb(void 0,(function(){return _0x2fbeb3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fbeb3).search("(((.+)+)+)+$")}));function _0x29d385(e){e=e||{},this.libID=e.libID,this.code=e.code,this.inputPoints=e.inputPoints?e.inputPoints:null,this.symbolRank=e.symbolRank?e.symbolRank:0,this.negativeImage=!!e.negativeImage&&e.negativeImage,this.surroundLineType=e.surroundLineType?e.surroundLineType:0,this.subSymbols=e.subSymbols?e.subSymbols:null,this.scaleValues=e.scaleValues?e.scaleValues:null,this.scalePoints=e.scalePoints?e.scalePoints:null,this.newScalePoint=e.newScalePoint?e.newScalePoint:null,this.newScalePointIndex=e.newScalePointIndex?e.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}_0x2fbeb3(),_0x29d385.prototype.destroy=function(){var e=this;e.libID=null,e.code=null,e.inputPoints=null,e.symbolRank=null,e.negativeImage=null,e.surroundLineType=null,e.subSymbols=null,e.scaleValues=null,e.scalePoints=null,e.newScalePoint=null,e.newScalePointIndex=null},_0x29d385.toUrlParameters=function(e){if(e&&null!==e.libID&&null!==e.code){var t="libID="+encodeURIComponent(e.libID)+"&code="+encodeURIComponent(e.code);if(e.inputPoints&&null!==e.inputPoints&&0!==e.inputPoints.length){let i="[";for(let t=0;t<e.inputPoints.length;t++)t===e.inputPoints.length-1?i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"}]":i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"},";t+="&inputPoints="+encodeURIComponent(i)}if(e.scalePoints&&null!==e.scalePoints&&0!==e.scalePoints.length){let i="[";for(let t=0;t<e.scalePoints.length;t++)t===e.scalePoints.length-1?i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"}]":i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"},";t+="&scalePoints="+encodeURIComponent(i)}if(e.scaleValues&&null!==e.scaleValues&&0!==e.scaleValues.length){let i="[";for(let t=0;t<e.scaleValues.length;t++)t===e.scaleValues.length-1?i+=e.scaleValues[t]+"]":i+=e.scaleValues[t]+",";t+="&scaleValues="+encodeURIComponent(i)}if(e.subSymbols&&null!==e.subSymbols&&0!==e.subSymbols.length){let i="[";for(let t=0;t<e.subSymbols.length;t++)t===e.subSymbols.length-1?i+=e.subSymbols[t].code+"]":i+=e.subSymbols[t].code+",";t+="&subSymbols="+encodeURIComponent(i)}return e.newScalePoint&&null!==e.newScalePoint&&(t+="&newScalePoint="+encodeURIComponent('{"x":'+e.newScalePoint.x+', "y":'+e.newScalePoint.y+"}")),e.newScalePointIndex&&null!==e.newScalePointIndex&&(t+="&newScalePointIndex="+encodeURIComponent(e.newScalePointIndex)),e.symbolRank&&null!==e.symbolRank&&(t+="&symbolRank="+encodeURIComponent(e.symbolRank)),e.negativeImage&&null!==e.negativeImage&&(t+="&negativeImage="+encodeURIComponent(e.negativeImage)),e.surroundLineType&&null!==e.surroundLineType&&(t+="&surroundLineType="+encodeURIComponent(e.surroundLineType)),t}};var _0x26b4a3=(_0x592e30=!0,function(e,t){var i=_0x592e30?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x592e30=!1,i}),_0x48a323=_0x26b4a3(void 0,(function(){return _0x48a323.toString().search("(((.+)+)+)+$").toString().constructor(_0x48a323).search("(((.+)+)+)+$")})),_0x592e30;_0x48a323();class _0xa6b4bc extends _0x476176{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i,n=this;n.events=new _0x421885(n,null,n.EVENT_TYPES,!0),n.eventListeners instanceof Object&&n.events.on(n.eventListeners),i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"smlInfos":"/smlInfos",n.url+=".json",this.CLASS_NAME="SuperMap.GetSMLInfosService"}destroy(){super.destroy()}processAsync(e){if(e){var t=this;t.url+=_0x29d385.toUrlParameters(e),t.request({method:"GET",data:null,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x1f2324=(_0x1d2163=!0,function(e,t){var i=_0x1d2163?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d2163=!1,i}),_0x421d6c=_0x1f2324(void 0,(function(){return _0x421d6c.toString().search("(((.+)+)+)+$").toString().constructor(_0x421d6c).search("(((.+)+)+)+$")})),_0x1d2163;function _0x583b79(e,t){this.url=e,this.options=t}_0x421d6c(),_0x583b79.prototype.getSMLInfos=function(e,t,i){var n=this;return i||(i=n),new _0xa6b4bc(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n},_0x583b79.prototype.editSMLFile=function(e,t,i){var n=this;return i||(i=n),new _0x5b4a7d(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n};var _0x61db6=(_0x1ae4f7=!0,function(e,t){var i=_0x1ae4f7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ae4f7=!1,i}),_0x3a4160=_0x61db6(void 0,(function(){return _0x3a4160.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a4160).search("(((.+)+)+)+$")})),_0x1ae4f7;_0x3a4160();class _0x204238 extends _0x476176{constructor(e,t){super(e,t=t||{});var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"graphicObject.json?":"/graphicObject.json?",this.CLASS_NAME="SuperMap.GetSymbolInfoService"}destroy(){super.destroy()}processAsync(e){if(e){var t,i=this;t=_0x51e0df.toUrlParameters(e),i.url+=t,e.dynamicToken&&(i.url+="&dynamicToken="+e.dynamicToken),navigator.userAgent.toUpperCase().includes("MSIE")&&(i.url=encodeURI(i.url)),i.request({method:"GET",params:null,scope:i,success:i.myServiceProcessCompleted,failure:i.serviceProcessFailed})}}myServiceProcessCompleted(e){null!=(e=this.transformResult(e))&&null!=e.textStyle2D&&null!=e.textStyle2D.fontHeight&&(e.textStyle2D.fontHeight=3),this.events.triggerEvent("processCompleted",{result:e})}transformResult(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e}}var _0x211ef3=(_0xaa7370=!0,function(e,t){var i=_0xaa7370?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xaa7370=!1,i}),_0x13588b=_0x211ef3(void 0,(function(){return _0x13588b.toString().search("(((.+)+)+)+$").toString().constructor(_0x13588b).search("(((.+)+)+)+$")})),_0xaa7370;_0x13588b();var WebGLPlot$8=window.WebGLPlot=window.WebGLPlot||{};function _0x14876e(){}var createAlgo=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoSymbol({libID:e.libID,code:e.code}):void 0},getDefaultStyle=function(e){return void 0!==SuperMapAlgoPlot?_0x48d607.defaultStyle:void 0},getSpatialData=function(e,t){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.Primitives.getSpatialData(e,t):void 0},getServerData=function(e,t,i,n){if(void 0===i&&(i=_0x48d607.serverUrl),void 0===SuperMap||0===e||WebGLPlot$8.getLibManager(n).getSymbolLibByLibId(this.libID))return 0===e?e:null;var r=new _0x51e0df;return r.libID=e,r.code=t,r.surroundLineType=1,{getSymbolInfoParameters:r,getSymbolInfo:new _0x204238(i,WebGLPlot$8.getLibManager(n).options.serviceParams)}},toJSON=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.toJSON(e):""},clonePoints=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.clonePoints(e):[]},EditSmlFile=function(e,t){return void 0!==SuperMap?{editSmlFile:new _0x5b4a7d(e,t),editSmlFileParams:new _0x21611c}:void 0},smlFileService=function(e,t){return{smlFileService:new _0x583b79(e,t),editSmlFileParams:new _0x21611c}},isAccessServer=function(e,t){return void 0!==SuperMapAlgoPlot&&SuperMapAlgoPlot.AlgoSymbolFactory.isAccessServer(e,t)},polylineDistance=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.polylineDistance(e):0},analysisSymbolCells=function(e){if(void 0!==SuperMapAlgoPlot)return SuperMapAlgoPlot.AnalysisSymbol.analysisSymbolCells(e)},rotateAngle=function(e,t,i){void 0!==SuperMapAlgoPlot&&SuperMapAlgoPlot.PlottingUtil.rotateAngle(e,t,i)},plotI18n=function(e){if(void 0!==SuperMapAlgoPlot)return SuperMapAlgoPlot.plotI18n(e)},getLibManager=function(e){let t=WebGLPlot$8.Plotting.g_Plotting.get(e);if(t)return t.getSymbolLibManager()},createProperty=function(e,t){return new _0x117656(e,t)};WebGLPlot$8.createAlgo=createAlgo,WebGLPlot$8.getDefaultStyle=getDefaultStyle,WebGLPlot$8.getSpatialData=getSpatialData,WebGLPlot$8.getServerData=getServerData,WebGLPlot$8.toJSON=toJSON,WebGLPlot$8.EditSmlFile=EditSmlFile,WebGLPlot$8.clonePoints=clonePoints,WebGLPlot$8.isAccessServer=isAccessServer,WebGLPlot$8.polylineDistance=polylineDistance,WebGLPlot$8.analysisSymbolCells=analysisSymbolCells,WebGLPlot$8.rotateAngle=rotateAngle,WebGLPlot$8.plotI18n=plotI18n,WebGLPlot$8.getLibManager=getLibManager,WebGLPlot$8.createProperty=createProperty,WebGLPlot$8.smlFileService=smlFileService,function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));(n(),"object"==typeof exports&&typeof module<"u")?module.exports=e():"function"==typeof define&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).html2canvas=e()}((function(){return function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){(function(e){!function(n){var r="object"==typeof i&&i&&!i.nodeType&&i,o="object"==typeof t&&t&&!t.nodeType&&t,a="object"==typeof e&&e;(a.global===a||a.window===a||a.self===a)&&(n=a);var s,l,u=2147483647,c=36,h=/^xn--/,d=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=Math.floor,m=String.fromCharCode;function g(e){throw new RangeError(p[e])}function x(e,t){for(var i=e.length,n=[];i--;)n[i]=t(e[i]);return n}function y(e,t){var i=e.split("@"),n="";return i.length>1&&(n=i[0]+"@",e=i[1]),n+x((e=e.replace(f,".")).split("."),t).join(".")}function v(e){for(var t,i,n=[],r=0,o=e.length;r<o;)(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<o?56320==(64512&(i=e.charCodeAt(r++)))?n.push(((1023&t)<<10)+(1023&i)+65536):(n.push(t),r--):n.push(t);return n}function $(e){return x(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,i){var n=0;for(e=i?_(e/700):e>>1,e+=_(e/t);e>455;n+=c)e=_(e/35);return _(n+36*e/(e+38))}function C(e){var t,i,n,r,o,a,s,l,h,d,f,p=[],m=e.length,x=0,y=128,v=72;for((i=e.lastIndexOf("-"))<0&&(i=0),n=0;n<i;++n)e.charCodeAt(n)>=128&&g("not-basic"),p.push(e.charCodeAt(n));for(r=i>0?i+1:0;r<m;){for(o=x,a=1,s=c;r>=m&&g("invalid-input"),((l=(f=e.charCodeAt(r++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:c)>=c||l>_((u-x)/a))&&g("overflow"),x+=l*a,!(l<(h=s<=v?1:s>=v+26?26:s-v));s+=c)a>_(u/(d=c-h))&&g("overflow"),a*=d;v=T(x-o,t=p.length+1,0==o),_(x/t)>u-y&&g("overflow"),y+=_(x/t),x%=t,p.splice(x++,0,y)}return $(p)}function S(e){var t,i,n,r,o,a,s,l,h,d,f,p,x,y,$,C=[];for(p=(e=v(e)).length,t=128,i=0,o=72,a=0;a<p;++a)(f=e[a])<128&&C.push(m(f));for(n=r=C.length,r&&C.push("-");n<p;){for(s=u,a=0;a<p;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>_((u-i)/(x=n+1))&&g("overflow"),i+=(s-t)*x,t=s,a=0;a<p;++a)if((f=e[a])<t&&++i>u&&g("overflow"),f==t){for(l=i,h=c;!(l<(d=h<=o?1:h>=o+26?26:h-o));h+=c)$=l-d,y=c-d,C.push(m(b(d+$%y,0))),l=_($/y);C.push(m(b(l,0))),o=T(i,x,n==r),i=0,++n}++i,++t}return C.join("")}if(s={version:"1.4.1",ucs2:{decode:v,encode:$},decode:C,encode:S,toASCII:function(e){return y(e,(function(e){return d.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return y(e,(function(e){return h.test(e)?C(e.slice(4).toLowerCase()):e}))}},r&&o)if(t.exports==r)o.exports=s;else for(l in s)s.hasOwnProperty(l)&&(r[l]=s[l]);else n.punycode=s}(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,i){var n=e("./log");function r(e,t){for(var i=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),o=e.firstChild;o;)(!0===t||1!==o.nodeType||"SCRIPT"!==o.nodeName)&&i.appendChild(r(o,t)),o=o.nextSibling;return 1===e.nodeType&&(i._scrollTop=e.scrollTop,i._scrollLeft=e.scrollLeft,"CANVAS"===e.nodeName?function(e,t){try{t&&(t.width=e.width,t.height=e.height,t.getContext("2d").putImageData(e.getContext("2d").getImageData(0,0,e.width,e.height),0,0))}catch(t){n("Unable to copy canvas content from",e,t)}}(e,i):("TEXTAREA"===e.nodeName||"SELECT"===e.nodeName)&&(i.value=e.value)),i}function o(e){if(1===e.nodeType){e.scrollTop=e._scrollTop,e.scrollLeft=e._scrollLeft;for(var t=e.firstChild;t;)o(t),t=t.nextSibling}}t.exports=function(e,t,i,n,a,s,l){var u=r(e.documentElement,a.javascriptEnabled),c=t.createElement("iframe");return c.className="html2canvas-container",c.style.visibility="hidden",c.style.position="fixed",c.style.left="-10000px",c.style.top="0px",c.style.border="0",c.width=i,c.height=n,c.scrolling="no",t.body.appendChild(c),new Promise((function(t){var i,n,r,h=c.contentWindow.document;c.contentWindow.onload=c.onload=function(){var e=setInterval((function(){h.body.childNodes.length>0&&(o(h.documentElement),clearInterval(e),"view"===a.type&&(c.contentWindow.scrollTo(s,l),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(c.contentWindow.scrollY!==l||c.contentWindow.scrollX!==s)&&(h.documentElement.style.top=-l+"px",h.documentElement.style.left=-s+"px",h.documentElement.style.position="absolute")),t(c))}),50)},h.open(),h.write("<!DOCTYPE html><html></html>"),n=s,r=l,(i=e).defaultView&&(n!==i.defaultView.pageXOffset||r!==i.defaultView.pageYOffset)&&i.defaultView.scrollTo(n,r),h.replaceChild(h.adoptNode(u),h.documentElement),h.close()}))}},{"./log":13}],3:[function(e,t,i){function n(e){this.r=0,this.g=0,this.b=0,this.a=null,this.fromArray(e)||this.namedColor(e)||this.rgb(e)||this.rgba(e)||this.hex6(e)||this.hex3(e)}n.prototype.darken=function(e){var t=1-e;return new n([Math.round(this.r*t),Math.round(this.g*t),Math.round(this.b*t),this.a])},n.prototype.isTransparent=function(){return 0===this.a},n.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},n.prototype.fromArray=function(e){return Array.isArray(e)&&(this.r=Math.min(e[0],255),this.g=Math.min(e[1],255),this.b=Math.min(e[2],255),e.length>3&&(this.a=e[3])),Array.isArray(e)};var r=/^#([a-f0-9]{3})$/i;n.prototype.hex3=function(e){var t;return null!==(t=e.match(r))&&(this.r=parseInt(t[1][0]+t[1][0],16),this.g=parseInt(t[1][1]+t[1][1],16),this.b=parseInt(t[1][2]+t[1][2],16)),null!==t};var o=/^#([a-f0-9]{6})$/i;n.prototype.hex6=function(e){var t=null;return null!==(t=e.match(o))&&(this.r=parseInt(t[1].substring(0,2),16),this.g=parseInt(t[1].substring(2,4),16),this.b=parseInt(t[1].substring(4,6),16)),null!==t};var a=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;n.prototype.rgb=function(e){var t;return null!==(t=e.match(a))&&(this.r=Number(t[1]),this.g=Number(t[2]),this.b=Number(t[3])),null!==t};var s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;n.prototype.rgba=function(e){var t;return null!==(t=e.match(s))&&(this.r=Number(t[1]),this.g=Number(t[2]),this.b=Number(t[3]),this.a=Number(t[4])),null!==t},n.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},n.prototype.namedColor=function(e){e=e.toLowerCase();var t=l[e];if(t)this.r=t[0],this.g=t[1],this.b=t[2];else if("transparent"===e)return this.r=this.g=this.b=this.a=0,!0;return!!t},n.prototype.isColor=!0;var l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};t.exports=n},{}],4:[function(e,t,i){var n=e("./support"),r=e("./renderers/canvas"),o=e("./imageloader"),a=e("./nodeparser"),s=e("./nodecontainer"),l=e("./log"),u=e("./utils"),c=e("./clone"),h=e("./proxy").loadUrlDocument,d=u.getBounds,f="data-html2canvas-node",p=0;function _(e,t){var i,n,o=p++;if((t=t||{}).logging&&(l.options.logging=!0,l.options.start=Date.now()),t.async=typeof t.async>"u"||t.async,t.allowTaint=!(typeof t.allowTaint>"u")&&t.allowTaint,t.removeContainer=typeof t.removeContainer>"u"||t.removeContainer,t.javascriptEnabled=!(typeof t.javascriptEnabled>"u")&&t.javascriptEnabled,t.imageTimeout=typeof t.imageTimeout>"u"?1e4:t.imageTimeout,t.renderer="function"==typeof t.renderer?t.renderer:r,t.strict=!!t.strict,"string"==typeof e){if("string"!=typeof t.proxy)return Promise.reject("Proxy must be used when rendering url");var a=null!=t.width?t.width:window.innerWidth,s=null!=t.height?t.height:window.innerHeight;return h((i=e,n=document.createElement("a"),n.href=i,n.href=n.href,n),t.proxy,document,a,s,t).then((function(e){return g(e.contentWindow.document.documentElement,e,t,a,s)}))}var u,d,_,m,x,y=(void 0===e?[document.documentElement]:e.length?e:[e])[0];return y.setAttribute(f+o,o),(u=y.ownerDocument,d=t,_=y.ownerDocument.defaultView.innerWidth,m=y.ownerDocument.defaultView.innerHeight,x=o,c(u,u,_,m,d,u.defaultView.pageXOffset,u.defaultView.pageYOffset).then((function(e){l("Document cloned");var t=f+x,i="["+t+"='"+x+"']";u.querySelector(i).removeAttribute(t);var n=e.contentWindow,r=n.document.querySelector(i);return("function"==typeof d.onclone?Promise.resolve(d.onclone(n.document)):Promise.resolve(!0)).then((function(){return g(r,e,d,_,m)}))}))).then((function(e){return"function"==typeof t.onrendered&&(l("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),t.onrendered(e)),e}))}_.CanvasRenderer=r,_.NodeContainer=s,_.log=l,_.utils=u;var m=typeof document>"u"||"function"!=typeof Object.create||"function"!=typeof document.createElement("canvas").getContext?function(){return Promise.reject("No canvas support")}:_;function g(e,t,i,r,s){var u=t.contentWindow,c=new n(u.document),h=new o(i,c),f=d(e),p="view"===i.type?r:f.right+1,_="view"===i.type?s:f.bottom+1,m=new i.renderer(p,_,h,i,document);return new a(e,m,c,h,i).ready.then((function(){var n,r;if(l("Finished rendering"),"view"===i.type)n=x(m.canvas,{width:m.canvas.width,height:m.canvas.height,top:0,left:0,x:0,y:0});else if(e===u.document.body||e===u.document.documentElement||null!=i.canvas)n=m.canvas;else if(i.scale){var o={width:null!=i.width?i.width:f.width,height:null!=i.height?i.height:f.height,top:f.top,left:f.left,x:0,y:0},a={};for(var s in o)o.hasOwnProperty(s)&&(a[s]=o[s]*i.scale);(n=x(m.canvas,a)).style.width=o.width+"px",n.style.height=o.height+"px"}else n=x(m.canvas,{width:null!=i.width?i.width:f.width,height:null!=i.height?i.height:f.height,top:f.top,left:f.left,x:0,y:0});return r=t,i.removeContainer&&(r.parentNode.removeChild(r),l("Cleaned up container")),n}))}function x(e,t){var i=document.createElement("canvas"),n=Math.min(e.width-1,Math.max(0,t.left)),r=Math.min(e.width,Math.max(1,t.left+t.width)),o=Math.min(e.height-1,Math.max(0,t.top)),a=Math.min(e.height,Math.max(1,t.top+t.height));i.width=t.width,i.height=t.height;var s=r-n,u=a-o;return l("Cropping canvas at:","left:",t.left,"top:",t.top,"width:",s,"height:",u),l("Resulting crop with width",t.width,"and height",t.height,"with x",n,"and y",o),i.getContext("2d").drawImage(e,n,o,s,u,t.x,t.y,s,u),i}t.exports=m},{"./clone":2,"./imageloader":11,"./log":13,"./nodecontainer":14,"./nodeparser":15,"./proxy":16,"./renderers/canvas":20,"./support":22,"./utils":26}],5:[function(e,t,i){var n=e("./log"),r=e("./utils").smallImage;t.exports=function e(t){if(this.src=t,n("DummyImageContainer for",t),!this.promise||!this.image){n("Initiating DummyImageContainer"),e.prototype.image=new Image;var i=this.image;e.prototype.promise=new Promise((function(e,t){i.onload=e,i.onerror=t,i.src=r(),!0===i.complete&&e(i)}))}}},{"./log":13,"./utils":26}],6:[function(e,t,i){var n=e("./utils").smallImage;t.exports=function(e,t){var i,r,o=document.createElement("div"),a=document.createElement("img"),s=document.createElement("span"),l="Hidden Text";o.style.visibility="hidden",o.style.fontFamily=e,o.style.fontSize=t,o.style.margin=0,o.style.padding=0,document.body.appendChild(o),a.src=n(),a.width=1,a.height=1,a.style.margin=0,a.style.padding=0,a.style.verticalAlign="baseline",s.style.fontFamily=e,s.style.fontSize=t,s.style.margin=0,s.style.padding=0,s.appendChild(document.createTextNode(l)),o.appendChild(s),o.appendChild(a),i=a.offsetTop-s.offsetTop+1,o.removeChild(s),o.appendChild(document.createTextNode(l)),o.style.lineHeight="normal",a.style.verticalAlign="super",r=a.offsetTop-o.offsetTop+1,document.body.removeChild(o),this.baseline=i,this.lineWidth=1,this.middle=r}},{"./utils":26}],7:[function(e,t,i){var n=e("./font");function r(){this.data={}}r.prototype.getMetrics=function(e,t){return void 0===this.data[e+"-"+t]&&(this.data[e+"-"+t]=new n(e,t)),this.data[e+"-"+t]},t.exports=r},{"./font":6}],8:[function(e,t,i){var n=e("./utils").getBounds,r=e("./proxy").loadUrlDocument;function o(t,i,r){this.image=null,this.src=t;var o=this,a=n(t);this.promise=(i?new Promise((function(e){"about:blank"===t.contentWindow.document.URL||null==t.contentWindow.document.documentElement?t.contentWindow.onload=t.onload=function(){e(t)}:e(t)})):this.proxyLoad(r.proxy,a,r)).then((function(t){return e("./core")(t.contentWindow.document.documentElement,{type:"view",width:t.width,height:t.height,proxy:r.proxy,javascriptEnabled:r.javascriptEnabled,removeContainer:r.removeContainer,allowTaint:r.allowTaint,imageTimeout:r.imageTimeout/2})})).then((function(e){return o.image=e}))}o.prototype.proxyLoad=function(e,t,i){var n=this.src;return r(n.src,e,n.ownerDocument,t.width,t.height,i)},t.exports=o},{"./core":4,"./proxy":16,"./utils":26}],9:[function(e,t,i){function n(e){this.src=e.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=Promise.resolve(!0)}n.TYPES={LINEAR:1,RADIAL:2},n.REGEXP_COLORSTOP=/^\s*(rgba?\(\s*\d{1,3},\s*\d{1,3},\s*\d{1,3}(?:,\s*[0-9\.]+)?\s*\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\s+(\d{1,3}(?:\.\d+)?)(%|px)?)?(?:\s|$)/i,t.exports=n},{}],10:[function(e,t,i){t.exports=function(e,t){this.src=e,this.image=new Image;var i=this;this.tainted=null,this.promise=new Promise((function(n,r){i.image.onload=n,i.image.onerror=r,t&&(i.image.crossOrigin="anonymous"),i.image.src=e,!0===i.image.complete&&n(i.image)}))}},{}],11:[function(e,t,i){var n=e("./log"),r=e("./imagecontainer"),o=e("./dummyimagecontainer"),a=e("./proxyimagecontainer"),s=e("./framecontainer"),l=e("./svgcontainer"),u=e("./svgnodecontainer"),c=e("./lineargradientcontainer"),h=e("./webkitgradientcontainer"),d=e("./utils").bind;function f(e,t){this.link=null,this.options=e,this.support=t,this.origin=this.getOrigin(window.location.href)}f.prototype.findImages=function(e){var t=[];return e.reduce((function(e,t){switch(t.node.nodeName){case"IMG":return e.concat([{args:[t.node.src],method:"url"}]);case"svg":case"IFRAME":return e.concat([{args:[t.node],method:t.node.nodeName}])}return e}),[]).forEach(this.addImage(t,this.loadImage),this),t},f.prototype.findBackgroundImage=function(e,t){return t.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(e,this.loadImage),this),e},f.prototype.addImage=function(e,t){return function(i){i.args.forEach((function(r){this.imageExists(e,r)||(e.splice(0,0,t.call(this,i)),n("Added image #"+e.length,"string"==typeof r?r.substring(0,100):r))}),this)}},f.prototype.hasImageBackground=function(e){return"none"!==e.method},f.prototype.loadImage=function(e){if("url"===e.method){var t=e.args[0];return!this.isSVG(t)||this.support.svg||this.options.allowTaint?t.match(/data:image\/.*;base64,/i)?new r(t.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(t)||!0===this.options.allowTaint||this.isSVG(t)?new r(t,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new r(t,!0):this.options.proxy?new a(t,this.options.proxy):new o(t):new l(t)}return"linear-gradient"===e.method?new c(e):"gradient"===e.method?new h(e):"svg"===e.method?new u(e.args[0],this.support.svg):"IFRAME"===e.method?new s(e.args[0],this.isSameOrigin(e.args[0].src),this.options):new o(e)},f.prototype.isSVG=function(e){return"svg"===e.substring(e.length-3).toLowerCase()||l.prototype.isInline(e)},f.prototype.imageExists=function(e,t){return e.some((function(e){return e.src===t}))},f.prototype.isSameOrigin=function(e){return this.getOrigin(e)===this.origin},f.prototype.getOrigin=function(e){var t=this.link||(this.link=document.createElement("a"));return t.href=e,t.href=t.href,t.protocol+t.hostname+t.port},f.prototype.getPromise=function(e){return this.timeout(e,this.options.imageTimeout).catch((function(){return new o(e.src).promise.then((function(t){e.image=t}))}))},f.prototype.get=function(e){var t=null;return this.images.some((function(i){return(t=i).src===e}))?t:null},f.prototype.fetch=function(e){return this.images=e.reduce(d(this.findBackgroundImage,this),this.findImages(e)),this.images.forEach((function(e,t){e.promise.then((function(){n("Succesfully loaded image #"+(t+1),e)}),(function(i){n("Failed loading image #"+(t+1),e,i)}))})),this.ready=Promise.all(this.images.map(this.getPromise,this)),n("Finished searching images"),this},f.prototype.timeout=function(e,t){var i,r=Promise.race([e.promise,new Promise((function(r,o){i=setTimeout((function(){n("Timed out loading image",e),o(e)}),t)}))]).then((function(e){return clearTimeout(i),e}));return r.catch((function(){clearTimeout(i)})),r},t.exports=f},{"./dummyimagecontainer":5,"./framecontainer":8,"./imagecontainer":10,"./lineargradientcontainer":12,"./log":13,"./proxyimagecontainer":17,"./svgcontainer":23,"./svgnodecontainer":24,"./utils":26,"./webkitgradientcontainer":27}],12:[function(e,t,i){var n=e("./gradientcontainer"),r=e("./color");function o(e){n.apply(this,arguments),this.type=n.TYPES.LINEAR;var t=o.REGEXP_DIRECTION.test(e.args[0])||!n.REGEXP_COLORSTOP.test(e.args[0]);t?e.args[0].split(/\s+/).reverse().forEach((function(e,t){switch(e){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var i=this.y0,n=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=n,this.y1=i;break;case"center":break;default:var r=.01*parseFloat(e,10);if(isNaN(r))break;0===t?(this.y0=r,this.y1=1-this.y0):(this.x0=r,this.x1=1-this.x0)}}),this):(this.y0=0,this.y1=1),this.colorStops=e.args.slice(t?1:0).map((function(e){var t=e.match(n.REGEXP_COLORSTOP),i=+t[2],o=0===i?"%":t[3];return{color:new r(t[1]),stop:"%"===o?i/100:null}})),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach((function(e,t){null===e.stop&&this.colorStops.slice(t).some((function(i,n){return null!==i.stop&&(e.stop=(i.stop-this.colorStops[t-1].stop)/(n+1)+this.colorStops[t-1].stop,!0)}),this)}),this)}o.prototype=Object.create(n.prototype),o.REGEXP_DIRECTION=/^\s*(?:to|left|right|top|bottom|center|\d{1,3}(?:\.\d+)?%?)(?:\s|$)/i,t.exports=o},{"./color":3,"./gradientcontainer":9}],13:[function(e,t,i){var n=function(){n.options.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-n.options.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))};n.options={logging:!1},t.exports=n},{}],14:[function(e,t,i){var n=e("./color"),r=e("./utils"),o=r.getBounds,a=r.parseBackgrounds,s=r.offsetBounds;function l(e,t){this.node=e,this.parent=t,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function u(e){return-1!==e.toString().indexOf("%")}function c(e){return e.replace("px","")}function h(e){return parseFloat(e)}l.prototype.cloneTo=function(e){e.visible=this.visible,e.borders=this.borders,e.bounds=this.bounds,e.clip=this.clip,e.backgroundClip=this.backgroundClip,e.computedStyles=this.computedStyles,e.styles=this.styles,e.backgroundImages=this.backgroundImages,e.opacity=this.opacity},l.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat("opacity"):this.opacity},l.prototype.assignStack=function(e){this.stack=e,e.children.push(this)},l.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},l.prototype.css=function(e){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[e]||(this.styles[e]=this.computedStyles[e])},l.prototype.prefixedCss=function(e){var t=this.css(e);return void 0===t&&["webkit","moz","ms","o"].some((function(i){return void 0!==(t=this.css(i+e.substr(0,1).toUpperCase()+e.substr(1)))}),this),void 0===t?null:t},l.prototype.computedStyle=function(e){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,e)},l.prototype.cssInt=function(e){var t=parseInt(this.css(e),10);return isNaN(t)?0:t},l.prototype.color=function(e){return this.colors[e]||(this.colors[e]=new n(this.css(e)))},l.prototype.cssFloat=function(e){var t=parseFloat(this.css(e));return isNaN(t)?0:t},l.prototype.fontWeight=function(){var e=this.css("fontWeight");switch(parseInt(e,10)){case 401:e="bold";break;case 400:e="normal"}return e},l.prototype.parseClip=function(){var e=this.css("clip").match(this.CLIP);return e?{top:parseInt(e[1],10),right:parseInt(e[2],10),bottom:parseInt(e[3],10),left:parseInt(e[4],10)}:null},l.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=a(this.css("backgroundImage")))},l.prototype.cssList=function(e,t){var i=(this.css(e)||"").split(",");return 1===(i=(i=i[t||0]||i[0]||"auto").trim().split(" ")).length&&(i=[i[0],u(i[0])?"auto":i[0]]),i},l.prototype.parseBackgroundSize=function(e,t,i){var n,r,o=this.cssList("backgroundSize",i);if(u(o[0]))n=e.width*parseFloat(o[0])/100;else{if(/contain|cover/.test(o[0])){var a=e.width/e.height,s=t.width/t.height;return a<s^"contain"===o[0]?{width:e.height*s,height:e.height}:{width:e.width,height:e.width/s}}n=parseInt(o[0],10)}return r="auto"===o[0]&&"auto"===o[1]?t.height:"auto"===o[1]?n/t.width*t.height:u(o[1])?e.height*parseFloat(o[1])/100:parseInt(o[1],10),"auto"===o[0]&&(n=r/t.height*t.width),{width:n,height:r}},l.prototype.parseBackgroundPosition=function(e,t,i,n){var r,o,a=this.cssList("backgroundPosition",i);return r=u(a[0])?(e.width-(n||t).width)*(parseFloat(a[0])/100):parseInt(a[0],10),o="auto"===a[1]?r/t.width*t.height:u(a[1])?(e.height-(n||t).height)*parseFloat(a[1])/100:parseInt(a[1],10),"auto"===a[0]&&(r=o/t.height*t.width),{left:r,top:o}},l.prototype.parseBackgroundRepeat=function(e){return this.cssList("backgroundRepeat",e)[0]},l.prototype.parseTextShadows=function(){var e=this.css("textShadow"),t=[];if(e&&"none"!==e)for(var i=e.match(this.TEXT_SHADOW_PROPERTY),r=0;i&&r<i.length;r++){var o=i[r].match(this.TEXT_SHADOW_VALUES);t.push({color:new n(o[0]),offsetX:o[1]?parseFloat(o[1].replace("px","")):0,offsetY:o[2]?parseFloat(o[2].replace("px","")):0,blur:o[3]?o[3].replace("px",""):0})}return t},l.prototype.parseTransform=function(){if(!this.transformData)if(this.hasTransform()){var e=this.parseBounds(),t=this.prefixedCss("transformOrigin").split(" ").map(c).map(h);t[0]+=e.left,t[1]+=e.top,this.transformData={origin:t,matrix:this.parseTransformMatrix()}}else this.transformData={origin:[0,0],matrix:[1,0,0,1,0,0]};return this.transformData},l.prototype.parseTransformMatrix=function(){if(!this.transformMatrix){var e=this.prefixedCss("transform"),t=e?function(e){if(e&&"matrix"===e[1])return e[2].split(",").map((function(e){return parseFloat(e.trim())}));if(e&&"matrix3d"===e[1]){var t=e[2].split(",").map((function(e){return parseFloat(e.trim())}));return[t[0],t[1],t[4],t[5],t[12],t[13]]}}(e.match(this.MATRIX_PROPERTY)):null;this.transformMatrix=t||[1,0,0,1,0,0]}return this.transformMatrix},l.prototype.inverseTransform=function(){var e,t,i,n,r,o,a,s,l,u=this.parseTransform();return{origin:u.origin,matrix:(e=u.matrix,t=e[0],i=e[2],n=e[4],r=e[1],o=e[3],a=e[5],s=t*o-i*r,l=[o,-r,-i,t,i*a-n*o,n*r-t*a].map((function(e){return e/s})),l)}},l.prototype.parseBounds=function(){return this.bounds||(this.bounds=this.hasTransform()?s(this.node):o(this.node))},l.prototype.hasTransform=function(){return"1,0,0,1,0,0"!==this.parseTransformMatrix().join(",")||this.parent&&this.parent.hasTransform()},l.prototype.getValue=function(){var e,t,i=this.node.value||"";return"SELECT"===this.node.tagName?(e=this.node,i=(t=e.options[e.selectedIndex||0])&&t.text||""):"password"===this.node.type&&(i=Array(i.length+1).join("•")),0===i.length?this.node.placeholder||"":i},l.prototype.MATRIX_PROPERTY=/(matrix|matrix3d)\((.+)\)/,l.prototype.TEXT_SHADOW_PROPERTY=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,l.prototype.TEXT_SHADOW_VALUES=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g,l.prototype.CLIP=/^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/,t.exports=l},{"./color":3,"./utils":26}],15:[function(e,t,i){var n=e("./log"),r=e("punycode"),o=e("./nodecontainer"),a=e("./textcontainer"),s=e("./pseudoelementcontainer"),l=e("./fontmetrics"),u=e("./color"),c=e("./stackingcontext"),h=e("./utils"),d=h.bind,f=h.getBounds,p=h.parseBackgrounds,_=h.offsetBounds;function m(e,t,i,r,a){n("Starting NodeParser"),this.renderer=t,this.options=a,this.range=null,this.support=i,this.renderQueue=[],this.stack=new c(!0,1,e.ownerDocument,null);var s=new o(e,null);if(a.background&&t.rectangle(0,0,t.width,t.height,new u(a.background)),e===e.ownerDocument.documentElement){var h=new o(s.color("backgroundColor").isTransparent()?e.ownerDocument.body:e.ownerDocument.documentElement,null);t.rectangle(0,0,t.width,t.height,h.color("backgroundColor"))}s.visibile=s.isElementVisible(),this.createPseudoHideStyles(e.ownerDocument),this.disableAnimations(e.ownerDocument),this.nodes=k([s].concat(this.getChildren(s)).filter((function(e){return e.visible=e.isElementVisible()})).map(this.getPseudoElements,this)),this.fontMetrics=new l,n("Fetched nodes, total:",this.nodes.length),n("Calculate overflow clips"),this.calculateOverflowClips(),n("Start fetching images"),this.images=r.fetch(this.nodes.filter(B)),this.ready=this.images.ready.then(d((function(){return n("Images loaded, starting parsing"),n("Creating stacking contexts"),this.createStackingContexts(),n("Sorting stacking contexts"),this.sortStackingContexts(this.stack),this.parse(this.stack),n("Render queue created with "+this.renderQueue.length+" items"),new Promise(d((function(e){a.async?"function"==typeof a.async?a.async.call(this,this.renderQueue,e):this.renderQueue.length>0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,e)):e():(this.renderQueue.forEach(this.paint,this),e())}),this))}),this))}function g(e){return e.parent&&e.parent.clip.length}function x(){}m.prototype.calculateOverflowClips=function(){this.nodes.forEach((function(e){if(B(e)){N(e)&&e.appendToDOM(),e.borders=this.parseBorders(e);var t="hidden"===e.css("overflow")?[e.borders.clip]:[],i=e.parseClip();i&&-1!==["absolute","fixed"].indexOf(e.css("position"))&&t.push([["rect",e.bounds.left+i.left,e.bounds.top+i.top,i.right-i.left,i.bottom-i.top]]),e.clip=g(e)?e.parent.clip.concat(t):t,e.backgroundClip="hidden"!==e.css("overflow")?e.clip.concat([e.borders.clip]):e.clip,N(e)&&e.cleanDOM()}else G(e)&&(e.clip=g(e)?e.parent.clip:[]);N(e)||(e.bounds=null)}),this)},m.prototype.asyncRenderer=function(e,t,i){i=i||Date.now(),this.paint(e[this.renderIndex++]),e.length===this.renderIndex?t():i+20>Date.now()?this.asyncRenderer(e,t,i):setTimeout(d((function(){this.asyncRenderer(e,t)}),this),0)},m.prototype.createPseudoHideStyles=function(e){this.createStyles(e,"."+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},m.prototype.disableAnimations=function(e){this.createStyles(e,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},m.prototype.createStyles=function(e,t){var i=e.createElement("style");i.innerHTML=t,e.body.appendChild(i)},m.prototype.getPseudoElements=function(e){var t=[[e]];if(e.node.nodeType===Node.ELEMENT_NODE){var i=this.getPseudoElement(e,":before"),n=this.getPseudoElement(e,":after");i&&t.push(i),n&&t.push(n)}return k(t)},m.prototype.getPseudoElement=function(e,t){var i,n,r=e.computedStyle(t);if(!r||!r.content||"none"===r.content||"-moz-alt-content"===r.content||"none"===r.display)return null;for(var o=(i=r.content,n=void 0,(n=i.substr(0,1))===i.substr(i.length-1)&&n.match(/'|"/)?i.substr(1,i.length-2):i),l="url"===o.substr(0,3),u=document.createElement(l?"img":"html2canvaspseudoelement"),c=new s(u,e,t),h=r.length-1;h>=0;h--){var d=r.item(h).replace(/(\-[a-z])/g,(function(e){return e.toUpperCase().replace("-","")}));u.style[d]=r[d]}if(u.className=s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,l)return u.src=p(o)[0].args[0],[c];var f=document.createTextNode(o);return u.appendChild(f),[c,new a(f,c)]},m.prototype.getChildren=function(e){return k([].filter.call(e.node.childNodes,O).map((function(t){var i=[t.nodeType===Node.TEXT_NODE?new a(t,e):new o(t,e)].filter(V);return t.nodeType===Node.ELEMENT_NODE&&i.length&&"TEXTAREA"!==t.tagName?i[0].isElementVisible()?i.concat(this.getChildren(i[0])):[]:i}),this))},m.prototype.newStackingContext=function(e,t){var i=new c(t,e.getOpacity(),e.node,e.parent);e.cloneTo(i),(t?i.getParentStack(this):i.parent.stack).contexts.push(i),e.stack=i},m.prototype.createStackingContexts=function(){this.nodes.forEach((function(e){var t,i;B(e)&&(this.isRootElement(e)||e.getOpacity()<1||(i=(t=e).css("position"),"auto"!==(-1!==["absolute","relative","fixed"].indexOf(i)?t.css("zIndex"):"auto"))||this.isBodyWithTransparentRoot(e)||e.hasTransform())?this.newStackingContext(e,!0):B(e)&&(D(e)&&A(e)||-1!==["inline-block","inline-table"].indexOf(e.css("display"))||I(e))?this.newStackingContext(e,!1):e.assignStack(e.parent.stack)}),this)},m.prototype.isBodyWithTransparentRoot=function(e){return"BODY"===e.node.nodeName&&e.parent.color("backgroundColor").isTransparent()},m.prototype.isRootElement=function(e){return null===e.parent},m.prototype.sortStackingContexts=function(e){var t;e.contexts.sort((t=e.contexts.slice(0),function(e,i){return e.cssInt("zIndex")+t.indexOf(e)/t.length-(i.cssInt("zIndex")+t.indexOf(i)/t.length)})),e.contexts.forEach(this.sortStackingContexts,this)},m.prototype.parseTextBounds=function(e){return function(t,i,n){if("none"!==e.parent.css("textDecoration").substr(0,4)||0!==t.trim().length){if(this.support.rangeBounds&&!e.parent.hasTransform()){var r=n.slice(0,i).join("").length;return this.getRangeBounds(e.node,r,t.length)}if(e.node&&"string"==typeof e.node.data){var o=e.node.splitText(t.length),a=this.getWrapperBounds(e.node,e.parent.hasTransform());return e.node=o,a}}else(!this.support.rangeBounds||e.parent.hasTransform())&&(e.node=e.node.splitText(t.length));return{}}},m.prototype.getWrapperBounds=function(e,t){var i=e.ownerDocument.createElement("html2canvaswrapper"),n=e.parentNode,r=e.cloneNode(!0);i.appendChild(e.cloneNode(!0)),n.replaceChild(i,e);var o=t?_(i):f(i);return n.replaceChild(r,i),o},m.prototype.getRangeBounds=function(e,t,i){var n=this.range||(this.range=e.ownerDocument.createRange());return n.setStart(e,t),n.setEnd(e,t+i),n.getBoundingClientRect()},m.prototype.parse=function(e){var t=e.contexts.filter(E),i=e.children.filter(B),n=i.filter(F(I)),r=n.filter(F(D)).filter(F(L)),o=i.filter(F(D)).filter(I),a=n.filter(F(D)).filter(L),s=e.contexts.concat(n.filter(D)).filter(A),l=e.children.filter(G).filter(R),u=e.contexts.filter(P);t.concat(r).concat(o).concat(a).concat(s).concat(l).concat(u).forEach((function(e){this.renderQueue.push(e),M(e)&&(this.parse(e),this.renderQueue.push(new x))}),this)},m.prototype.paint=function(e){try{e instanceof x?this.renderer.ctx.restore():G(e)?(N(e.parent)&&e.parent.appendToDOM(),this.paintText(e),N(e.parent)&&e.parent.cleanDOM()):this.paintNode(e)}catch(e){if(n(e),this.options.strict)throw e}},m.prototype.paintNode=function(e){M(e)&&(this.renderer.setOpacity(e.opacity),this.renderer.ctx.save(),e.hasTransform()&&this.renderer.setTransform(e.parseTransform())),"INPUT"===e.node.nodeName&&"checkbox"===e.node.type?this.paintCheckbox(e):"INPUT"===e.node.nodeName&&"radio"===e.node.type?this.paintRadio(e):this.paintElement(e)},m.prototype.paintElement=function(e){var t=e.parseBounds();this.renderer.clip(e.backgroundClip,(function(){this.renderer.renderBackground(e,t,e.borders.borders.map(U))}),this,e),this.renderer.mask(e.backgroundClip,(function(){this.renderer.renderShadows(e,e.borders.clip)}),this,e),this.renderer.clip(e.clip,(function(){this.renderer.renderBorders(e.borders.borders)}),this,e),this.renderer.clip(e.backgroundClip,(function(){switch(e.node.nodeName){case"svg":case"IFRAME":var i=this.images.get(e.node);i?this.renderer.renderImage(e,t,e.borders,i):n("Error loading <"+e.node.nodeName+">",e.node);break;case"IMG":var r=this.images.get(e.node.src);r?this.renderer.renderImage(e,t,e.borders,r):n("Error loading <img>",e.node.src);break;case"CANVAS":this.renderer.renderImage(e,t,e.borders,{image:e.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(e)}}),this,e)},m.prototype.paintCheckbox=function(e){var t=e.parseBounds(),i=Math.min(t.width,t.height),n={width:i-1,height:i-1,top:t.top,left:t.left},r=[3,3],o=[r,r,r,r],a=[1,1,1,1].map((function(e){return{color:new u("#A5A5A5"),width:e}})),s=b(n,o,a);this.renderer.clip(e.backgroundClip,(function(){this.renderer.rectangle(n.left+1,n.top+1,n.width-2,n.height-2,new u("#DEDEDE")),this.renderer.renderBorders(v(a,n,s,o)),e.node.checked&&(this.renderer.font(new u("#424242"),"normal","normal","bold",i-3+"px","arial"),this.renderer.text("✔",n.left+i/6,n.top+i-1))}),this,e)},m.prototype.paintRadio=function(e){var t=e.parseBounds(),i=Math.min(t.width,t.height)-2;this.renderer.clip(e.backgroundClip,(function(){this.renderer.circleStroke(t.left+1,t.top+1,i,new u("#DEDEDE"),1,new u("#A5A5A5")),e.node.checked&&this.renderer.circle(Math.ceil(t.left+i/4)+1,Math.ceil(t.top+i/4)+1,Math.floor(i/2),new u("#424242"))}),this,e)},m.prototype.paintFormValue=function(e){var t=e.getValue();if(t.length>0){var i=e.node.ownerDocument,r=i.createElement("html2canvaswrapper");["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"].forEach((function(t){try{r.style[t]=e.css(t)}catch(e){n("html2canvas: Parse: Exception caught in renderFormValue: "+e.message)}}));var o=e.parseBounds();r.style.position="fixed",r.style.left=o.left+"px",r.style.top=o.top+"px",r.textContent=t,i.body.appendChild(r),this.paintText(new a(r.firstChild,e)),i.body.removeChild(r)}},m.prototype.paintText=function(e){e.applyTextTransform();var t,i=r.ucs2.decode(e.node.data),n=(!this.options.letterRendering||/^(normal|none|0px)$/.test(e.parent.css("letterSpacing")))&&(t=e.node.data,!/[^\u0000-\u00ff]/.test(t)),o=n?function(e){for(var t,i=[],n=0,o=!1;e.length;)W(e[n])===o?((t=e.splice(0,n)).length&&i.push(r.ucs2.encode(t)),o=!o,n=0):n++,n>=e.length&&(t=e.splice(0,n)).length&&i.push(r.ucs2.encode(t));return i}(i):i.map((function(e){return r.ucs2.encode([e])}));n||(e.parent.node.style.fontVariantLigatures="none");var a=e.parent.fontWeight(),s=e.parent.css("fontSize"),l=e.parent.css("fontFamily"),u=e.parent.parseTextShadows();this.renderer.font(e.parent.color("color"),e.parent.css("fontStyle"),e.parent.css("fontVariant"),a,s,l),u.length?this.renderer.fontShadow(u[0].color,u[0].offsetX,u[0].offsetY,u[0].blur):this.renderer.clearShadow(),this.renderer.clip(e.parent.clip,(function(){o.map(this.parseTextBounds(e),this).forEach((function(t,i){t&&(this.renderer.text(o[i],t.left,t.bottom),this.renderTextDecoration(e.parent,t,this.fontMetrics.getMetrics(l,s)))}),this)}),this,e.parent)},m.prototype.renderTextDecoration=function(e,t,i){switch(e.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(t.left,Math.round(t.top+i.baseline+i.lineWidth),t.width,1,e.color("color"));break;case"overline":this.renderer.rectangle(t.left,Math.round(t.top),t.width,1,e.color("color"));break;case"line-through":this.renderer.rectangle(t.left,Math.ceil(t.top+i.middle+i.lineWidth),t.width,1,e.color("color"))}};var y={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};function v(e,t,i,n){var r={top:t.top+e[0].width/2,right:t.right-e[1].width/2,bottom:t.bottom-e[2].width/2,left:t.left+e[3].width/2};return e.map((function(o,a){if(o.width>0){var s=t.left,l=t.top,u=t.width,c=t.height-e[2].width;switch(a){case 0:c=e[0].width,o.args=C({c1:[s,l],c2:[s+u,l],c3:[s+u-e[1].width,l+c],c4:[s+e[3].width,l+c]},n[0],n[1],i.topLeftOuter,i.topLeftInner,i.topRightOuter,i.topRightInner),o.pathArgs=S({c1:[r.left,r.top],c2:[r.right,r.top]},n[0],n[1],i.topLeft,i.topRight);break;case 1:s=t.left+t.width-e[1].width,u=e[1].width,o.args=C({c1:[s+u,l],c2:[s+u,l+c+e[2].width],c3:[s,l+c],c4:[s,l+e[0].width]},n[1],n[2],i.topRightOuter,i.topRightInner,i.bottomRightOuter,i.bottomRightInner),o.pathArgs=S({c1:[r.right,r.top],c2:[r.right,r.bottom]},n[1],n[2],i.topRight,i.bottomRight);break;case 2:l=l+t.height-e[2].width,c=e[2].width,o.args=C({c1:[s+u,l+c],c2:[s,l+c],c3:[s+e[3].width,l],c4:[s+u-e[3].width,l]},n[2],n[3],i.bottomRightOuter,i.bottomRightInner,i.bottomLeftOuter,i.bottomLeftInner),o.pathArgs=S({c1:[r.right,r.bottom],c2:[r.left,r.bottom]},n[2],n[3],i.bottomRight,i.bottomLeft);break;case 3:u=e[3].width,o.args=C({c1:[s,l+c+e[2].width],c2:[s,l],c3:[s+u,l+e[0].width],c4:[s+u,l+c]},n[3],n[0],i.bottomLeftOuter,i.bottomLeftInner,i.topLeftOuter,i.topLeftInner),o.pathArgs=S({c1:[r.left,r.bottom],c2:[r.left,r.top]},n[3],n[0],i.bottomLeft,i.topLeft)}}return o}))}function $(e,t,i,n){var r=(Math.sqrt(2)-1)/3*4,o=i*r,a=n*r,s=e+i,l=t+n;return{topLeft:T({x:e,y:l},{x:e,y:l-a},{x:s-o,y:t},{x:s,y:t}),topRight:T({x:e,y:t},{x:e+o,y:t},{x:s,y:l-a},{x:s,y:l}),bottomRight:T({x:s,y:t},{x:s,y:t+a},{x:e+o,y:l},{x:e,y:l}),bottomLeft:T({x:s,y:l},{x:s-o,y:l},{x:e,y:t+a},{x:e,y:t})}}function b(e,t,i){var n=e.left,r=e.top,o=e.width,a=e.height,s=t[0][0]<o/2?t[0][0]:o/2,l=t[0][1]<a/2?t[0][1]:a/2,u=t[1][0]<o/2?t[1][0]:o/2,c=t[1][1]<a/2?t[1][1]:a/2,h=t[2][0]<o/2?t[2][0]:o/2,d=t[2][1]<a/2?t[2][1]:a/2,f=t[3][0]<o/2?t[3][0]:o/2,p=t[3][1]<a/2?t[3][1]:a/2,_=o-u,m=a-d,g=o-h,x=a-p;return{topLeft:$(n+i[3].width/2,r+i[0].width/2,Math.max(0,s-i[3].width/2),Math.max(0,l-i[0].width/2)).topLeft.subdivide(.5),topRight:$(n+Math.min(_,o+i[3].width/2),r+i[0].width/2,_>o+i[3].width/2?0:u-i[3].width/2,c-i[0].width/2).topRight.subdivide(.5),bottomRight:$(n+Math.min(g,o-i[3].width/2),r+Math.min(m,a+i[0].width/2),Math.max(0,h-i[1].width/2),d-i[2].width/2).bottomRight.subdivide(.5),bottomLeft:$(n+i[3].width/2,r+x,Math.max(0,f-i[3].width/2),p-i[2].width/2).bottomLeft.subdivide(.5),topLeftOuter:$(n,r,s,l).topLeft.subdivide(.5),topLeftInner:$(n+i[3].width,r+i[0].width,Math.max(0,s-i[3].width),Math.max(0,l-i[0].width)).topLeft.subdivide(.5),topRightOuter:$(n+_,r,u,c).topRight.subdivide(.5),topRightInner:$(n+Math.min(_,o+i[3].width),r+i[0].width,_>o+i[3].width?0:u-i[3].width,c-i[0].width).topRight.subdivide(.5),bottomRightOuter:$(n+g,r+m,h,d).bottomRight.subdivide(.5),bottomRightInner:$(n+Math.min(g,o-i[3].width),r+Math.min(m,a+i[0].width),Math.max(0,h-i[1].width),d-i[2].width).bottomRight.subdivide(.5),bottomLeftOuter:$(n,r+x,f,p).bottomLeft.subdivide(.5),bottomLeftInner:$(n+i[3].width,r+x,Math.max(0,f-i[3].width),p-i[2].width).bottomLeft.subdivide(.5)}}function T(e,t,i,n){var r=function(e,t,i){return{x:e.x+(t.x-e.x)*i,y:e.y+(t.y-e.y)*i}};return{start:e,startControl:t,endControl:i,end:n,subdivide:function(o){var a=r(e,t,o),s=r(t,i,o),l=r(i,n,o),u=r(a,s,o),c=r(s,l,o),h=r(u,c,o);return[T(e,a,u,h),T(h,c,l,n)]},curveTo:function(e){e.push(["bezierCurve",t.x,t.y,i.x,i.y,n.x,n.y])},curveToReversed:function(n){n.push(["bezierCurve",i.x,i.y,t.x,t.y,e.x,e.y])}}}function C(e,t,i,n,r,o,a){var s=[];return t[0]>0||t[1]>0?(s.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(s)):s.push(["line",e.c1[0],e.c1[1]]),i[0]>0||i[1]>0?(s.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(s),s.push(["line",a[0].end.x,a[0].end.y]),a[0].curveToReversed(s)):(s.push(["line",e.c2[0],e.c2[1]]),s.push(["line",e.c3[0],e.c3[1]])),t[0]>0||t[1]>0?(s.push(["line",r[1].end.x,r[1].end.y]),r[1].curveToReversed(s)):s.push(["line",e.c4[0],e.c4[1]]),s}function S(e,t,i,n,r){var o=[];return t[0]>0||t[1]>0?(o.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(o)):o.push(["line",e.c1[0],e.c1[1]]),i[0]>0||i[1]>0?(o.push(["line",r[0].start.x,r[0].start.y]),r[0].curveTo(o)):o.push(["line",e.c2[0],e.c2[1]]),o}function w(e,t,i,n,r,o,a){t[0]>0||t[1]>0?(e.push(["line",n[0].start.x,n[0].start.y]),n[0].curveTo(e),n[1].curveTo(e)):e.push(["line",o,a]),(i[0]>0||i[1]>0)&&e.push(["line",r[0].start.x,r[0].start.y])}function E(e){return e.cssInt("zIndex")<0}function P(e){return e.cssInt("zIndex")>0}function A(e){return 0===e.cssInt("zIndex")}function L(e){return-1!==["inline","inline-block","inline-table"].indexOf(e.css("display"))}function M(e){return e instanceof c}function R(e){return e.node.data.trim().length>0}function O(e){return e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE}function D(e){return"static"!==e.css("position")}function I(e){return"none"!==e.css("float")}function F(e){var t=this;return function(){return!e.apply(t,arguments)}}function B(e){return e.node.nodeType===Node.ELEMENT_NODE}function N(e){return!0===e.isPseudoElement}function G(e){return e.node.nodeType===Node.TEXT_NODE}function z(e){return parseInt(e,10)}function U(e){return e.width}function V(e){return e.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(e.node.nodeName)}function k(e){return[].concat.apply([],e)}function W(e){return-1!==[32,13,10,9,45].indexOf(e)}m.prototype.parseBorders=function(e){var t,i=e.parseBounds(),n=(t=e,["TopLeft","TopRight","BottomRight","BottomLeft"].map((function(e){var i=t.css("border"+e+"Radius").split(" ");return i.length<=1&&(i[1]=i[0]),i.map(z)}))),r=["Top","Right","Bottom","Left"].map((function(t,i){var n=e.css("border"+t+"Style"),r=e.color("border"+t+"Color");"inset"===n&&r.isBlack()&&(r=new u([255,255,255,r.a]));var o=y[n]?y[n][i]:null;return{width:e.cssInt("border"+t+"Width"),color:o?r[o[0]](o[1]):r,style:n,pathArgs:null,args:null}})),o=b(i,n,r);return{clip:this.parseBackgroundClip(e,o,r,n,i),borders:v(r,i,o,n)}},m.prototype.parseBackgroundClip=function(e,t,i,n,r){var o=[];switch(e.css("backgroundClip")){case"content-box":case"padding-box":w(o,n[0],n[1],t.topLeftInner,t.topRightInner,r.left+i[3].width,r.top+i[0].width),w(o,n[1],n[2],t.topRightInner,t.bottomRightInner,r.left+r.width-i[1].width,r.top+i[0].width),w(o,n[2],n[3],t.bottomRightInner,t.bottomLeftInner,r.left+r.width-i[1].width,r.top+r.height-i[2].width),w(o,n[3],n[0],t.bottomLeftInner,t.topLeftInner,r.left+i[3].width,r.top+r.height-i[2].width);break;default:w(o,n[0],n[1],t.topLeftOuter,t.topRightOuter,r.left,r.top),w(o,n[1],n[2],t.topRightOuter,t.bottomRightOuter,r.left+r.width,r.top),w(o,n[2],n[3],t.bottomRightOuter,t.bottomLeftOuter,r.left+r.width,r.top+r.height),w(o,n[3],n[0],t.bottomLeftOuter,t.topLeftOuter,r.left,r.top+r.height)}return o},t.exports=m},{"./color":3,"./fontmetrics":7,"./log":13,"./nodecontainer":14,"./pseudoelementcontainer":18,"./stackingcontext":21,"./textcontainer":25,"./utils":26,punycode:1}],16:[function(e,t,i){var n=e("./xhr"),r=e("./utils"),o=e("./log"),a=e("./clone"),s=r.decode64;function l(e,t,i){var r="withCredentials"in new XMLHttpRequest;if(!t)return Promise.reject("No proxy configured");var o=h(r),a=d(t,e,o);return r?n(a):c(i,a,o).then((function(e){return s(e.content)}))}var u=0;function c(e,t,i){return new Promise((function(n,r){var o=e.createElement("script"),a=function(){delete window.html2canvas.proxy[i],e.body.removeChild(o)};window.html2canvas.proxy[i]=function(e){a(),n(e)},o.src=t,o.onerror=function(e){a(),r(e)},e.body.appendChild(o)}))}function h(e){return e?"":"html2canvas_"+Date.now()+"_"+ ++u+"_"+Math.round(1e5*Math.random())}function d(e,t,i){return e+"?url="+encodeURIComponent(t)+(i.length?"&callback=html2canvas.proxy."+i:"")}i.Proxy=l,i.ProxyURL=function(e,t,i){var n="crossOrigin"in new Image,r=h(n),o=d(t,e,r);return n?Promise.resolve(o):c(i,o,r).then((function(e){return"data:"+e.type+";base64,"+e.content}))},i.loadUrlDocument=function(e,t,i,n,r,s){return new l(e,t,window.document).then((u=e,function(e){var t,i=new DOMParser;try{t=i.parseFromString(e,"text/html")}catch{o("DOMParser not supported, falling back to createHTMLDocument"),t=document.implementation.createHTMLDocument("");try{t.open(),t.write(e),t.close()}catch{o("createHTMLDocument write not supported, falling back to document.body.innerHTML"),t.body.innerHTML=e}}var n=t.querySelector("base");if(!n||!n.href.host){var r=t.createElement("base");r.href=u,t.head.insertBefore(r,t.head.firstChild)}return t})).then((function(e){return a(e,i,n,r,s,0,0)}));var u}},{"./clone":2,"./log":13,"./utils":26,"./xhr":28}],17:[function(e,t,i){var n=e("./proxy").ProxyURL;t.exports=function(e,t){var i=document.createElement("a");i.href=e,e=i.href,this.src=e,this.image=new Image;var r=this;this.promise=new Promise((function(i,o){r.image.crossOrigin="Anonymous",r.image.onload=i,r.image.onerror=o,new n(e,t,document).then((function(e){r.image.src=e})).catch(o)}))}},{"./proxy":16}],18:[function(e,t,i){var n=e("./nodecontainer");function r(e,t,i){n.call(this,e,t),this.isPseudoElement=!0,this.before=":before"===i}r.prototype.cloneTo=function(e){r.prototype.cloneTo.call(this,e),e.isPseudoElement=!0,e.before=this.before},r.prototype=Object.create(n.prototype),r.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},r.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},r.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",t.exports=r},{"./nodecontainer":14}],19:[function(e,t,i){var n=e("./log");function r(e,t,i,n,r){this.width=e,this.height=t,this.images=i,this.options=n,this.document=r}r.prototype.renderImage=function(e,t,i,n){var r=e.cssInt("paddingLeft"),o=e.cssInt("paddingTop"),a=e.cssInt("paddingRight"),s=e.cssInt("paddingBottom"),l=i.borders,u=t.width-(l[1].width+l[3].width+r+a),c=t.height-(l[0].width+l[2].width+o+s);this.drawImage(n,0,0,n.image.width||u,n.image.height||c,t.left+r+l[3].width,t.top+o+l[0].width,u,c)},r.prototype.renderBackground=function(e,t,i){t.height>0&&t.width>0&&(this.renderBackgroundColor(e,t),this.renderBackgroundImage(e,t,i))},r.prototype.renderBackgroundColor=function(e,t){var i=e.color("backgroundColor");i.isTransparent()||this.rectangle(t.left,t.top,t.width,t.height,i)},r.prototype.renderShadows=function(e,t){var i=e.css("boxShadow");if("none"!==i){var n=i.split(/,(?![^(]*\))/);this.shadow(t,n)}},r.prototype.renderBorders=function(e){e.forEach(this.renderBorder,this)},r.prototype.renderBorder=function(e){if(!e.color.isTransparent()&&null!==e.args)if("dashed"===e.style||"dotted"===e.style){var t="dashed"===e.style?3:e.width;this.ctx.setLineDash([t]),this.path(e.pathArgs),this.ctx.strokeStyle=e.color,this.ctx.lineWidth=e.width,this.ctx.stroke()}else this.drawShape(e.args,e.color)},r.prototype.renderBackgroundImage=function(e,t,i){e.parseBackgroundImages().reverse().forEach((function(r,o,a){switch(r.method){case"url":var s=this.images.get(r.args[0]);s?this.renderBackgroundRepeating(e,t,s,a.length-(o+1),i):n("Error loading background-image",r.args[0]);break;case"linear-gradient":case"gradient":var l=this.images.get(r.value);l?this.renderBackgroundGradient(l,t,i):n("Error loading background-image",r.args[0]);break;case"none":break;default:n("Unknown background-image type",r.args[0])}}),this)},r.prototype.renderBackgroundRepeating=function(e,t,i,n,r){var o=e.parseBackgroundSize(t,i.image,n),a=e.parseBackgroundPosition(t,i.image,n,o);switch(e.parseBackgroundRepeat(n)){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(i,a,o,t,t.left+r[3],t.top+a.top+r[0],99999,o.height,r);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(i,a,o,t,t.left+a.left+r[3],t.top+r[0],o.width,99999,r);break;case"no-repeat":this.backgroundRepeatShape(i,a,o,t,t.left+a.left+r[3],t.top+a.top+r[0],o.width,o.height,r);break;default:this.renderBackgroundRepeat(i,a,o,{top:t.top,left:t.left},r[3],r[0])}},t.exports=r},{"./log":13}],20:[function(e,t,i){var n=e("../renderer"),r=e("../lineargradientcontainer"),o=e("../log");function a(e,t){n.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.options.canvas||(this.options.dpi&&(this.options.scale=this.options.dpi/96),this.options.scale?(this.canvas.style.width=e+"px",this.canvas.style.height=t+"px",this.canvas.width=Math.floor(e*this.options.scale),this.canvas.height=Math.floor(t*this.options.scale),this.ctx.scale(this.options.scale,this.options.scale)):(this.canvas.width=e,this.canvas.height=t)),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},o("Initialized CanvasRenderer with size",e,"x",t)}function s(e){return e.length>0}a.prototype=Object.create(n.prototype),a.prototype.setFillStyle=function(e){return this.ctx.fillStyle="object"==typeof e&&e.isColor?e.toString():e,this.ctx},a.prototype.rectangle=function(e,t,i,n,r){this.setFillStyle(r).fillRect(e,t,i,n)},a.prototype.circle=function(e,t,i,n){this.setFillStyle(n),this.ctx.beginPath(),this.ctx.arc(e+i/2,t+i/2,i/2,0,2*Math.PI,!0),this.ctx.closePath(),this.ctx.fill()},a.prototype.circleStroke=function(e,t,i,n,r,o){this.circle(e,t,i,n),this.ctx.strokeStyle=o.toString(),this.ctx.stroke()},a.prototype.shadow=function(e,t){var i=this.setFillStyle("white");i.save(),this.shape(e),t.forEach((function(e){var t=function(e){var t={color:/^(#|rgb|hsl|(?!(inset|initial|inherit))\D+)/i,inset:/^inset/i,px:/px$/i},i=["x","y","blur","spread"],n=e.split(/ (?![^(]*\))/),r={};for(var o in t)r[o]=n.filter(t[o].test.bind(t[o])),r[o]=0===r[o].length?null:1===r[o].length?r[o][0]:r[o];for(var a=0;a<r.px.length;a++)r[i[a]]=parseInt(r.px[a]);return r}(e);t.inset||(i.shadowOffsetX=t.x,i.shadowOffsetY=t.y,i.shadowColor=t.color,i.shadowBlur=t.blur,i.fill())}),this),i.restore()},a.prototype.drawShape=function(e,t){this.shape(e),this.setFillStyle(t).fill()},a.prototype.taints=function(e){if(null===e.tainted){this.taintCtx.drawImage(e.image,0,0);try{this.taintCtx.getImageData(0,0,1,1),e.tainted=!1}catch{this.taintCtx=document.createElement("canvas").getContext("2d"),e.tainted=!0}}return e.tainted},a.prototype.drawImage=function(e,t,i,n,r,o,a,s,l){(!this.taints(e)||this.options.allowTaint)&&this.ctx.drawImage(e.image,t,i,n,r,o,a,s,l)},a.prototype.clip=function(e,t,i,n){this.ctx.save(),n&&n.hasTransform()?(this.setTransform(n.inverseTransform()),e.filter(s).forEach((function(e){this.shape(e).clip()}),this),this.setTransform(n.parseTransform())):e.filter(s).forEach((function(e){this.shape(e).clip()}),this),t.call(i),this.ctx.restore()},a.prototype.mask=function(e,t,i,n){var r=e[e.length-1];if(r&&r.length){var o=[["rect",this.canvas.width,0,-this.canvas.width,this.canvas.height]].concat(r).concat([r[0]]);e=e.slice(0,-1).concat([o])}this.clip(e,t,i,n)},a.prototype.shape=function(e){return this.ctx.beginPath(),e.forEach((function(e,t){"rect"===e[0]?this.ctx.rect.apply(this.ctx,e.slice(1)):this.ctx[0===t?"moveTo":e[0]+"To"].apply(this.ctx,e.slice(1))}),this),this.ctx.closePath(),this.ctx},a.prototype.path=function(e){return this.ctx.beginPath(),e.forEach((function(e,t){"rect"===e[0]?this.ctx.rect.apply(this.ctx,e.slice(1)):this.ctx[0===t?"moveTo":e[0]+"To"].apply(this.ctx,e.slice(1))}),this),this.ctx},a.prototype.font=function(e,t,i,n,r,o){i=/^(normal|small-caps)$/i.test(i)?i:"",this.setFillStyle(e).font=[t,i,n,r,o].join(" ").split(",")[0]},a.prototype.fontShadow=function(e,t,i,n){this.setVariable("shadowColor",e.toString()).setVariable("shadowOffsetY",t).setVariable("shadowOffsetX",i).setVariable("shadowBlur",n)},a.prototype.clearShadow=function(){this.setVariable("shadowColor","rgba(0,0,0,0)")},a.prototype.setOpacity=function(e){this.ctx.globalAlpha=e},a.prototype.setTransform=function(e){this.ctx.translate(e.origin[0],e.origin[1]),this.ctx.transform.apply(this.ctx,e.matrix),this.ctx.translate(-e.origin[0],-e.origin[1])},a.prototype.setVariable=function(e,t){return this.variables[e]!==t&&(this.variables[e]=this.ctx[e]=t),this},a.prototype.text=function(e,t,i){this.ctx.fillText(e,t,i)},a.prototype.backgroundRepeatShape=function(e,t,i,n,r,o,a,s,l){var u=[["line",Math.round(r),Math.round(o)],["line",Math.round(r+a),Math.round(o)],["line",Math.round(r+a),Math.round(s+o)],["line",Math.round(r),Math.round(s+o)]];this.clip([u],(function(){this.renderBackgroundRepeat(e,t,i,n,l[3],l[0])}),this)},a.prototype.renderBackgroundRepeat=function(e,t,i,n,r,o){var a=Math.round(n.left+t.left+r),s=Math.round(n.top+t.top+o);this.setFillStyle(this.ctx.createPattern(this.resizeImage(e,i),"repeat")),this.ctx.translate(a,s),this.ctx.fill(),this.ctx.translate(-a,-s)},a.prototype.renderBackgroundGradient=function(e,t){if(e instanceof r){var i=this.ctx.createLinearGradient(t.left+t.width*e.x0,t.top+t.height*e.y0,t.left+t.width*e.x1,t.top+t.height*e.y1);e.colorStops.forEach((function(e){i.addColorStop(e.stop,e.color.toString())})),this.rectangle(t.left,t.top,t.width,t.height,i)}},a.prototype.resizeImage=function(e,t){var i=e.image;if(i.width===t.width&&i.height===t.height)return i;var n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(i,0,0,i.width,i.height,0,0,t.width,t.height),n},t.exports=a},{"../lineargradientcontainer":12,"../log":13,"../renderer":19}],21:[function(e,t,i){var n=e("./nodecontainer");function r(e,t,i,r){n.call(this,i,r),this.ownStacking=e,this.contexts=[],this.children=[],this.opacity=(this.parent?this.parent.stack.opacity:1)*t}r.prototype=Object.create(n.prototype),r.prototype.getParentStack=function(e){var t=this.parent?this.parent.stack:null;return t?t.ownStacking?t:t.getParentStack(e):e.stack},t.exports=r},{"./nodecontainer":14}],22:[function(e,t,i){function n(e){this.rangeBounds=this.testRangeBounds(e),this.cors=this.testCORS(),this.svg=this.testSVG()}n.prototype.testRangeBounds=function(e){var t,i,n=!1;return e.createRange&&((t=e.createRange()).getBoundingClientRect&&((i=e.createElement("boundtest")).style.height="123px",i.style.display="block",e.body.appendChild(i),t.selectNode(i),123===t.getBoundingClientRect().height&&(n=!0),e.body.removeChild(i))),n},n.prototype.testCORS=function(){return typeof(new Image).crossOrigin<"u"},n.prototype.testSVG=function(){var e=new Image,t=document.createElement("canvas"),i=t.getContext("2d");e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(e,0,0),t.toDataURL()}catch{return!1}return!0},t.exports=n},{}],23:[function(e,t,i){var n=e("./xhr"),r=e("./utils").decode64;function o(e){this.src=e,this.image=null;var t=this;this.promise=this.hasFabric().then((function(){return t.isInline(e)?Promise.resolve(t.inlineFormatting(e)):n(e)})).then((function(e){return new Promise((function(i){window.html2canvas.svg.fabric.loadSVGFromString(e,t.createCanvas.call(t,i))}))}))}o.prototype.hasFabric=function(){return window.html2canvas.svg&&window.html2canvas.svg.fabric?Promise.resolve():Promise.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},o.prototype.inlineFormatting=function(e){return/^data:image\/svg\+xml;base64,/.test(e)?this.decode64(this.removeContentType(e)):this.removeContentType(e)},o.prototype.removeContentType=function(e){return e.replace(/^data:image\/svg\+xml(;base64)?,/,"")},o.prototype.isInline=function(e){return/^data:image\/svg\+xml/i.test(e)},o.prototype.createCanvas=function(e){var t=this;return function(i,n){var r=new window.html2canvas.svg.fabric.StaticCanvas("c");t.image=r.lowerCanvasEl,r.setWidth(n.width).setHeight(n.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(i,n)).renderAll(),e(r.lowerCanvasEl)}},o.prototype.decode64=function(e){return"function"==typeof window.atob?window.atob(e):r(e)},t.exports=o},{"./utils":26,"./xhr":28}],24:[function(e,t,i){var n=e("./svgcontainer");function r(e,t){this.src=e,this.image=null;var i=this;this.promise=t?new Promise((function(t,n){i.image=new Image,i.image.onload=t,i.image.onerror=n,i.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(e),!0===i.image.complete&&t(i.image)})):this.hasFabric().then((function(){return new Promise((function(t){window.html2canvas.svg.fabric.parseSVGDocument(e,i.createCanvas.call(i,t))}))}))}r.prototype=Object.create(n.prototype),t.exports=r},{"./svgcontainer":23}],25:[function(e,t,i){var n=e("./nodecontainer");function r(e,t){n.call(this,e,t)}function o(e,t,i){if(e.length>0)return t+i.toUpperCase()}r.prototype=Object.create(n.prototype),r.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},r.prototype.transform=function(e){var t=this.node.data;switch(e){case"lowercase":return t.toLowerCase();case"capitalize":return t.replace(/(^|\s|:|-|\(|\))([a-z])/g,o);case"uppercase":return t.toUpperCase();default:return t}},t.exports=r},{"./nodecontainer":14}],26:[function(e,t,i){i.smallImage=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},i.bind=function(e,t){return function(){return e.apply(t,arguments)}},i.decode64=function(e){var t,i,n,r,o,a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=e.length,c="";for(t=0;t<u;t+=4)o=l.indexOf(e[t])<<2|(i=l.indexOf(e[t+1]))>>4,a=(15&i)<<4|(n=l.indexOf(e[t+2]))>>2,s=(3&n)<<6|(r=l.indexOf(e[t+3])),c+=64===n?String.fromCharCode(o):64===r||-1===r?String.fromCharCode(o,a):String.fromCharCode(o,a,s);return c},i.getBounds=function(e){if(e.getBoundingClientRect){var t=e.getBoundingClientRect(),i=null==e.offsetWidth?t.width:e.offsetWidth;return{top:t.top,bottom:t.bottom||t.top+t.height,right:t.left+i,left:t.left,width:i,height:null==e.offsetHeight?t.height:e.offsetHeight}}return{}},i.offsetBounds=function(e){var t=e.offsetParent?i.offsetBounds(e.offsetParent):{top:0,left:0};return{top:e.offsetTop+t.top,bottom:e.offsetTop+e.offsetHeight+t.top,right:e.offsetLeft+t.left+e.offsetWidth,left:e.offsetLeft+t.left,width:e.offsetWidth,height:e.offsetHeight}},i.parseBackgrounds=function(e){var t,i,n,r,o,a,s,l=[],u=0,c=0,h=function(){t&&('"'===i.substr(0,1)&&(i=i.substr(1,i.length-2)),i&&s.push(i),"-"===t.substr(0,1)&&(r=t.indexOf("-",1)+1)>0&&(n=t.substr(0,r),t=t.substr(r)),l.push({prefix:n,method:t.toLowerCase(),value:o,args:s,image:null})),s=[],t=n=i=o=""};return s=[],t=n=i=o="",e.split("").forEach((function(e){if(!(0===u&&" \r\n\t".indexOf(e)>-1)){switch(e){case'"':a?a===e&&(a=null):a=e;break;case"(":if(a)break;if(0===u)return u=1,void(o+=e);c++;break;case")":if(a)break;if(1===u){if(0===c)return u=0,o+=e,void h();c--}break;case",":if(a)break;if(0===u)return void h();if(1===u&&0===c&&!t.match(/^url$/i))return s.push(i),i="",void(o+=e)}o+=e,0===u?t+=e:i+=e}})),h(),l}},{}],27:[function(e,t,i){var n=e("./gradientcontainer");function r(e){n.apply(this,arguments),this.type="linear"===e.args[0]?n.TYPES.LINEAR:n.TYPES.RADIAL}r.prototype=Object.create(n.prototype),t.exports=r},{"./gradientcontainer":9}],28:[function(e,t,i){t.exports=function(e){return new Promise((function(t,i){var n=new XMLHttpRequest;n.open("GET",e),n.onload=function(){200===n.status?t(n.responseText):i(new Error(n.statusText))},n.onerror=function(){i(new Error("Network Error"))},n.send()}))}},{}]},{},[4])(4)}));var _0x4a4fab=html2canvas,_0x39853b=(_0x289862=!0,function(e,t){var i=_0x289862?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x289862=!1,i}),_0x55cd10=_0x39853b(void 0,(function(){return _0x55cd10.toString().search("(((.+)+)+)+$").toString().constructor(_0x55cd10).search("(((.+)+)+)+$")})),_0x289862;_0x55cd10();class _0x3c4ba1{constructor(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.rotateX=WebGLPlot.defaultValue(e.rotateX,0),this.rotateY=WebGLPlot.defaultValue(e.rotateY,0),this.rotateZ=WebGLPlot.defaultValue(e.rotateZ,0),this.offsetX=WebGLPlot.defaultValue(e.offsetX,0),this.offsetY=WebGLPlot.defaultValue(e.offsetY,0),this.offsetZ=WebGLPlot.defaultValue(e.offsetZ,0)}}var _0x443ecd=(_0x130afe=!0,function(e,t){var i=_0x130afe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x130afe=!1,i}),_0x4a6571=_0x443ecd(void 0,(function(){return _0x4a6571.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a6571).search("(((.+)+)+)+$")})),_0x130afe;_0x4a6571();var _0x509f23=Object.freeze({simple:0,detail:1,notitle:2,notitle2:3,element:4}),_0x33c5a3=(_0xa1c9f4=!0,function(e,t){var i=_0xa1c9f4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa1c9f4=!1,i}),_0x227143=_0x33c5a3(void 0,(function(){return _0x227143.toString().search("(((.+)+)+)+$").toString().constructor(_0x227143).search("(((.+)+)+)+$")})),_0xa1c9f4;_0x227143();var WebGLPlot$7=window.WebGLPlot=window.WebGLPlot||{};class _0x504ed3{constructor(){this.boxModelMatrix=null,this.symbol=null,this.fixedFrameTransform=WebGLPlot$7.Transforms.localFrameToFixedFrameGenerator("north","west")}static getElement(e){var t=null,i=null;return e===_0x509f23.detail?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0),i=".popup {position: absolute;border:0.1px solid white;}.popup-content-wrapper {max-height: 200px;overflow-y: auto;text-align: left;/*border-radius: 6px;*/background-color:rgb(48, 123, 250,0.3);}.popup-content {/* margin: 5px 20px;*/color: rgb(255, 255, 255); line-height: 0.5;font-size:xx-small;font-weight:normal;}.popup-content div {text-align: center;background-color: #8585bf;}.popup-content div {line-height: 1;}.popup-content table {margin-left: 1px;margin-right: 3px;}.popup-content table tr {height: 15px;}"):e===_0x509f23.notitle?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0),i=".popup {z-index:100;position: absolute;/*margin-left:400px;*/border:0.1px solid white;margin:1px;}.popup-content div{color: rgb(255, 255, 255);font-size:small;}.popup-content-wrapper {max-height: 200px;overflow-y: auto;/*height: 133px;padding: 1px;*/text-align: left;/*border-radius: 6px;*/background-color:rgb(67, 60, 252, 0.45);}.popup-content {color: rgb(255, 255, 255); line-height: 1;font-size:xx-small;font-weight:normal;}.popup-content div {line-height: 1;}.popup-content table {margin-left: 1px;margin-right: 3px;}.popup-content table tr {height: 15px;}"):e===_0x509f23.notitle2?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0),i=".popup {position: absolute;border:0.05px solid white;padding:1px;}.popup-content div{color: rgb(255, 255, 255);font-size:small;}.popup-content-wrapper {height:50%;text-align: left;background-color:rgb(48, 123, 250,0.3);}.popup-content {color: rgb(255, 255, 255); line-height: 1;font-size:xx-small;font-weight:normal;}.popup-content div {line-height: 1;}.popup-content table {margin-left: 1px;margin-right: 3px;}.popup-content table tr {height: 15px;}"):e===_0x509f23.notitle3?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div class="main"><div id="trackPopUpLink" class="popup-content"></div></div></div></div>').get(0),i=".popup {position: absolute;}.popup-content {padding:11.6px;color: rgb(255, 255, 255); line-height: 1;font-size:xx-small;font-weight:normal;}.popup-content div {line-height: 1;}.popup-content table tr {height: 15px;}.popup-content-wrapper .main{background: url('../Source/Assets/Images/overlayer.png') no-repeat;background-size: cover;}"):e===_0x509f23.simple&&(t=$('<div id="trackPopUpContent" class="popup"></div>').get(0),i=".popup {z-index: -1;position: absolute;text-align: center;/*font-weight:bold;*/color: rgb(255, 255, 255);background-color:rgb(255,0,0,0.3);border:0.1px solid red;}"),{element:t,style:i}}static getModelHeight(e){if(void 0===e)return 0;this.symbol=e.clone();var t=e.localPoints[0].clone(),i=e._model;let n=i.modelMatrix;var r=i._boundingSphere.center;let o=r.x>r.y?r.x:r.y;o=(o>r.z?o:r.z)*i.scale;var a=_0x2909c1.getModelMinAndMaxCorner(i),s=i.scale,l=WebGLPlot$7.Cartesian3.multiplyByScalar(WebGLPlot$7.Cartesian3.fromElements(a.minCorner.z,a.minCorner.x,a.minCorner.y),s,new WebGLPlot$7.Cartesian3),u=WebGLPlot$7.Cartesian3.multiplyByScalar(WebGLPlot$7.Cartesian3.fromElements(a.maxCorner.z,a.maxCorner.x,a.maxCorner.y),s,new WebGLPlot$7.Cartesian3),c=new WebGLPlot$7.AxisAlignedBoundingBox(l,u);this.BoundingBoxCenter=c.center,this.boxModelMatrix=this.computeBoundingBoxMatrix(t,e._modelRotate,n.clone(),this.fixedFrameTransform);var h=this.getLinePts(t,u,l,this.boxModelMatrix),d=[];for(let e=0;e<h.length;e++){let t=WebGLPlot$7.Cartographic.fromCartesian(h[e]);var f=WebGLPlot$7.CesiumMath.toDegrees(t.latitude),p=WebGLPlot$7.CesiumMath.toDegrees(t.longitude);let i=t.height;d.push({x:p,y:f,z:i})}return d}static getLinePts(e,t,i,n){var r=0,o=0,a=0,s=0;return WebGLPlot$7.defined(t)&&WebGLPlot$7.defined(i)?(r=Math.abs(t.x-i.x)/2,o=Math.abs(t.y-i.y)/2,a=i.z<=0?t.z:t.z-i.z,s=r>o?o:r):(s=(this.centerMax+this.modelRadius)/2,a=1.5*this.centerMax+this.modelRadius/2),this.rotateCircleCenter=WebGLPlot$7.Cartesian3.fromDegrees(e.x,e.y,a+e.z),this.computeHeightLines(r,o,s,a,n)}static computeHeightLines(e,t,i,n,r){var o=[],a=new WebGLPlot$7.Cartesian3,s=new WebGLPlot$7.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot$7.Cartesian3.fromDegrees(this.symbol.localPoints[0].x,this.symbol.localPoints[0].y,this.symbol.localPoints[0].z),h=new WebGLPlot$7.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.symbol?h.heading=d*this.symbol._modelRotate.z:h.heading=d*this.symbol.vectorRotate.z;var f=WebGLPlot$7.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot$7.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot$7.Cartesian3.multiplyByScalar(new WebGLPlot$7.Cartesian3(l,1,u),i,s),a=WebGLPlot$7.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot$7.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot$7.Cartesian3.multiplyByScalar(new WebGLPlot$7.Cartesian3(l,1,.7*u),i,s),a=WebGLPlot$7.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot$7.Cartesian3(a.x,a.y,a.z)),o}static computeBoundingBoxMatrix(e,t,i,n){var r=WebGLPlot$7.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot$7.HeadingPitchRoll,a=Math.PI/180;return o.pitch=0,o.roll=0,o.heading=a*t.z+90*a,WebGLPlot$7.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot$7.Ellipsoid.WGS84,n,i),i}}var _0x474aeb=(_0x1dd577=!0,function(e,t){var i=_0x1dd577?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1dd577=!1,i}),_0x12943f=_0x474aeb(void 0,(function(){return _0x12943f.toString().search("(((.+)+)+)+$").toString().constructor(_0x12943f).search("(((.+)+)+)+$")})),_0x1dd577;_0x12943f();var WebGLPlot$6=window.WebGLPlot=window.WebGLPlot||{};class _0x3b1009 extends _0x10d3db{constructor(e,t){if(!WebGLPlot$6.defined(t))throw new WebGLPlot$6.DeveloperError("OverLayerPicture viewer is required.");(e=WebGLPlot$6.defaultValue(e,WebGLPlot$6.defaultValue.EMPTY_OBJECT)).scene=t.scene,super(e),this.position=e.position.clone(),this.symbol=e.model,this.content=e.content,this.style=e.style,this.showline=e.showline,this.viewer=t,this.primitive=null,this._element=null,this._images=null,this._id=null,this._divContent=null,this._endPosition=e.position.clone(),this._bimHeight=0,this._modelHeight=0,this._lineEnd=null,this._initOverlayer(),this._initHandler()}updateEffect(e){WebGLPlot$6.defined(e.point)&&(this._getModelHeight(),e.point.z=this._modelHeight,this.setPosition(e.point)),WebGLPlot$6.defined(e.visible)&&this.setVisible(e.visible)}_initOverlayer(){if(this.style===_0x509f23.detail){var e=_0x504ed3.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);var t="";for(var i in this.content)"title"===i?t="<div>"+this.content[i]+"</div><table><tbody>":t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=WebGLPlot$6.createGuid(),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=WebGLPlot$6.createGuid(),this._divContent=this._element}else if(this.style===_0x509f23.notitle||this.style===_0x509f23.notitle2||this.style===_0x509f23.notitle3){e=_0x504ed3.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t='<div class="information">'+WebGLPlot$6.plotI18n("OVERLAYER_DETAIL")+"</div><table><tbody>";for(var i in this.content)t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=WebGLPlot$6.createGuid(),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=WebGLPlot$6.createGuid(),this._divContent=this._element}else if(this.style===_0x509f23.simple){e=_0x504ed3.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t=this.content;this._element.id=WebGLPlot$6.createGuid(),this._element.append(t),this._divContent=this._element}else this.style===_0x509f23.element&&(this.bpDom=document.createElement("div"),this.bpDom.style.cssText=this.content.style.cssText,this.bpDom.id=WebGLPlot$6.createGuid(),this.bpDom.appendChild(this.content),document.body.appendChild(this.bpDom),this._divContent=this.bpDom);var n=this._divContent.offsetWidth,r=this._divContent.offsetHeight,o=1.5,a=document.createElement("canvas"),s=a.getContext("2d");a.width=n*o,a.height=r*o,a.style.width=n+"px",a.style.height=r+"px",s.scale(o,o);var l={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:a,width:n,height:r,foreignObjectRendering:!0,tainTest:!1};_0x4a4fab(this._divContent,l).then(function(e){let t=e.toDataURL("image/png",1);this.images=t,this._divContent.style.display="none",this._create()}.bind(this))}_create(){this._getModelHeight(),this._endPosition.x=this.position.x,this._endPosition.y=this.position.y,this._endPosition.z=this._modelHeight,this.position.z=this._endPosition.z,this._id=WebGLPlot$6.createGuid();let e={id:this._id,show:!0,position:WebGLPlot$6.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z),image:this.images,pixelOffset:new WebGLPlot$6.Cartesian2(0,0),horizontalOrigin:WebGLPlot$6.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$6.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,sizeInMeters:!1,scale:1};if(this._billboard&&(_0x4786d3.removeBillboard(this._billboard,this.viewer.scene),this._billboard=void 0),this._billboard=_0x4786d3.addBillboard(e,this.viewer.scene),!this._polyline){let e={show:this.showline,width:1,positions:[WebGLPlot$6.Cartesian3.fromDegrees(this.position.x,this.position.y,this.position.z),WebGLPlot$6.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z)]};this._polyline=_0x4786d3.addOverLayerPolyLine(e,this.viewer.scene)}}_getModelHeight(){var e=_0x504ed3.getModelHeight(this.symbol);let t=this.viewer.scene.sampleHeight(new WebGLPlot$6.Cartographic(WebGLPlot$6.CesiumMath.toRadians(e[0].x),WebGLPlot$6.CesiumMath.toRadians(e[0].y))),i=this.viewer.scene.sampleHeight(new WebGLPlot$6.Cartographic(WebGLPlot$6.CesiumMath.toRadians(e[1].x),WebGLPlot$6.CesiumMath.toRadians(e[1].y)));e[0].z<e[1].z?(this._bimHeight=t,this._modelHeight=e[1].z):(this._bimHeight=i,this._modelHeight=e[0].z)}delete(){this._billboard&&(_0x4786d3.removeBillboard(this._billboard,this.viewer.scene),this._billboard=void 0),this._polyline&&(_0x4786d3.removeOverLayerPolyLine(this._polyline,this.viewer.scene),this._polyline=void 0)}setPosition(e){this._endPosition=e,this._billboard&&(this._billboard.position=WebGLPlot$6.Cartesian3.fromDegrees(e.x,e.y,e.z)),this._polyline&&(this._polyline.positions=[WebGLPlot$6.Cartesian3.fromDegrees(this.position.x,this.position.y,this.position.z),WebGLPlot$6.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z)])}setShowline(e){this._polyline&&(this.showline=e,this._polyline.show=this.showline)}_initHandler(){var e=!1,t=-1,i=new WebGLPlot$6.ScreenSpaceEventHandler(viewer.scene.canvas);i.setInputAction(function(i){var n=viewer.scene.pick(i.position);n?null===n.id||n.id!==this._id||e?(e=!1,t=-1,this.viewer.scene.canvas.style.cursor="default"):(e=!0,t=n.id,this.viewer.scene.canvas.style.cursor="move"):(e=!1,t=-1,this.viewer.scene.canvas.style.cursor="default")}.bind(this),WebGLPlot$6.ScreenSpaceEventType.LEFT_CLICK),i.setInputAction(function(i){e=!1,t=-1}.bind(this),WebGLPlot$6.ScreenSpaceEventType.RIGHT_CLICK),i.setInputAction(function(i){if(e&&-1!==t){var n=this._bimHeight,r=WebGLPlot$6.Cartesian3.fromDegrees(this.position.x,this.position.y,n),o=WebGLPlot$6.SceneTransforms.wgs84ToWindowCoordinates(scene,r),a=this._modifyModelPosition(this.position,i.endPosition);i.endPosition.y=o.y;var s=_0x2909c1.getPosition(this.viewer.scene,i.endPosition);this._endPosition={x:s.x,y:s.y,z:a.z};var l=WebGLPlot$6.Cartesian3.fromDegrees(s.x,s.y,a.z);this._billboard.position=l,this._polyline.positions=[WebGLPlot$6.Cartesian3.fromDegrees(this.position.x,this.position.y,this.position.z),WebGLPlot$6.Cartesian3.fromDegrees(s.x,s.y,a.z)]}}.bind(this),WebGLPlot$6.ScreenSpaceEventType.MOUSE_MOVE)}_modifyModelPosition(e,t){var i=1,n=this.viewer.scene,r=WebGLPlot$6.SceneTransforms.transformWindowToDrawingBuffer(n,t);r.y=n.drawingBufferHeight-r.y;var o=WebGLPlot$6.Cartesian3.fromDegrees(e.x,e.y,0),a=WebGLPlot$6.SceneTransforms.wgs84ToWindowCoordinates(n,o),s=this._getAltitudeByLogical(o,r,n);if(WebGLPlot$6.defined(s)){a.y<t.y&&(i=-1);var l=WebGLPlot$6.Cartesian3.distance(o,s)*i,u=n.globe.ellipsoid.cartesianToCartographic(s),c=WebGLPlot$6.CesiumMath.toDegrees(u.latitude);return new _0x23de81(WebGLPlot$6.CesiumMath.toDegrees(u.longitude),c,l)}}_getAltitudeByLogical(e,t,i){var n=WebGLPlot$6.Cartographic.fromCartesian(e);n.height+=1,n=WebGLPlot$6.Cartesian3.fromRadians(n.longitude,n.latitude,n.height);var r=WebGLPlot$6.SceneTransforms.wgs84ToWindowCoordinates(i,e),o=WebGLPlot$6.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(o){var a;o.x===r.x?(-1,a=0):o.y===r.y?(0,a=-1):a=-1/((o.y-r.y)/(o.x-r.x));var s=i._view.viewport,l={left:s.x,right:s.x+s.width,bottom:s.y,top:s.y+s.height},u=_0x2909c1.intersectionOfRectByPointslopeline(t,a,l),c=u[0],h=u[1],d=new WebGLPlot$6.Cartesian3,f=new WebGLPlot$6.Cartesian3;WebGLPlot$6.SceneTransforms.drawingBufferToWgs84Coordinates(i,c,1,d),WebGLPlot$6.SceneTransforms.drawingBufferToWgs84Coordinates(i,h,1,f);var p=i.camera.position,_=new WebGLPlot$6.Cartesian3;WebGLPlot$6.Cartesian3.subtract(e,n,_);var m=new WebGLPlot$6.Cartesian3;WebGLPlot$6.Cartesian3.negate(_,m),WebGLPlot$6.Cartesian3.normalize(_,_),WebGLPlot$6.Cartesian3.normalize(m,m);var g=new WebGLPlot$6.Ray(e,_),x=new WebGLPlot$6.Ray(e,m),y=WebGLPlot$6.IntersectionTests.rayTriangleParametric(g,d,f,p);if(y)return WebGLPlot$6.Ray.getPoint(g,y);if(y=WebGLPlot$6.IntersectionTests.rayTriangleParametric(x,d,f,p))return WebGLPlot$6.Ray.getPoint(x,y)}}setVisible(e){this.setShowline(e),this._billboard&&(this._billboard.show=e)}destroy(){this.delete()}clone(){}}var _0x721f7f=(_0x1d47a2=!0,function(e,t){var i=_0x1d47a2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d47a2=!1,i}),_0x351293=_0x721f7f(void 0,(function(){return _0x351293.toString().search("(((.+)+)+)+$").toString().constructor(_0x351293).search("(((.+)+)+)+$")})),_0x1d47a2;_0x351293();var WebGLPlot$5=window.WebGLPlot=window.WebGLPlot||{};class _0x77f391 extends _0x10d3db{constructor(e,t){if(!WebGLPlot$5.defined(t))throw new WebGLPlot$5.DeveloperError("OverLayerPicture viewer is required.");(e=WebGLPlot$5.defaultValue(e,WebGLPlot$5.defaultValue.EMPTY_OBJECT)).scene=t.scene,super(e),this.position=e.position,this.symbol=e.model,this.content=e.content,this.style=e.style,this.viewer=t,this.primitive=null,this._element=null,this._images=null,this._width=0,this._height=0,this._divContent=null,this._offSetOptions=new _0x3c4ba1,this._initOverlayer()}updateEffect(e){WebGLPlot$5.defined(e.point)&&this.setOffSet(e.point,void 0),WebGLPlot$5.defined(e.visible)&&this.setVisible(e.visible)}_initOverlayer(){if(this.style===_0x509f23.detail){var e=_0x504ed3.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.style=document.createElement("style"),this.style.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.style);var t="";for(var i in this.content)"title"===i?t="<div>"+this.content[i]+"</div><table><tbody>":t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=Math.random().toString(15).slice(2,15),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=Math.random().toString(15).slice(2,15),this._divContent=this._element}else if(this.style===_0x509f23.simple){e=_0x504ed3.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t=this.content;this._element.id=Math.random().toString(15).slice(2,15),this._element.append(t),this._divContent=this._element}else if(this.style===_0x509f23.element){this.bpDom=document.createElement("div"),this.bpDom.style.cssText=this.content.style.cssText;var n=Math.random().toString(15);this.bpDom.id=n.slice(2,n.length),this.bpDom.appendChild(this.content),document.body.appendChild(this.bpDom),this._divContent=this.bpDom}else if(this.style===_0x509f23.notitle||this.style===_0x509f23.notitle2||this.style===_0x509f23.notitle3){e=_0x504ed3.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t='<div class="information">'+WebGLPlot$5.plotI18n("OVERLAYER_DETAIL")+"</div><table><tbody>";for(var i in this.content)t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=Math.random().toString(15).slice(2,15),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=Math.random().toString(15).slice(2,15),this._divContent=this._element}this._width=this._divContent.offsetWidth,this._height=this._divContent.offsetHeight;var r=1.5,o=document.createElement("canvas"),a=o.getContext("2d");o.width=this._width*r,o.height=this._height*r,o.style.width=this._width+"px",o.style.height=this._height+"px",o.style.background="transparent",a.scale(r,r),a.mozImageSmoothingEnabled=!1,a.webkitImageSmoothingEnabled=!1,a.msImageSmoothingEnabled=!1,a.imageSmoothingEnabled=!1,a.globalAlpha=.1,document.documentElement.scrollTop||document.body.scrollTop;var s={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:o,width:this._width,height:this._height,foreignObjectRendering:!0,tainTest:!1};_0x4a4fab(this._divContent,s).then(function(e){var t=new Image;t.src=e.toDataURL("image/png",1),this._images=t,this._divContent.style.display="none",this._create()}.bind(this))}_create(){this.setOffSet(this.position,void 0)}setOffSet(e,t){if(e&&(!WebGLPlot$5.defined(t)||t instanceof _0x3c4ba1)){WebGLPlot$5.defined(t)&&(this._offSetOptions=t);var i=e.x,n=e.y,r=this.viewer.scene.sampleHeight(new WebGLPlot$5.Cartographic(WebGLPlot$5.CesiumMath.toRadians(this.position.x),WebGLPlot$5.CesiumMath.toRadians(this.position.y)))+.5,o=this._offSetOptions.rotateX,a=this._offSetOptions.rotateY,s=this._offSetOptions.rotateZ;i+=this._offSetOptions.offsetX,n+=this._offSetOptions.offsetY,r+=this._offSetOptions.offsetZ;var l=new WebGLPlot$5.Cartesian3(this._width/40,this._height/40,1),u=WebGLPlot$5.Cartesian3.fromDegrees(i,n,r),c=WebGLPlot$5.Transforms.eastNorthUpToFixedFrame(u),h=WebGLPlot$5.Matrix4.fromRotationTranslation(WebGLPlot$5.Matrix3.fromRotationX(WebGLPlot$5.CesiumMath.toRadians(90+o))),d=WebGLPlot$5.Matrix4.fromRotationTranslation(WebGLPlot$5.Matrix3.fromRotationY(WebGLPlot$5.CesiumMath.toRadians(180+a))),f=WebGLPlot$5.Matrix4.fromRotationTranslation(WebGLPlot$5.Matrix3.fromRotationZ(WebGLPlot$5.CesiumMath.toRadians(0+s))),p=new WebGLPlot$5.Matrix4,_=new WebGLPlot$5.Matrix4,m=new WebGLPlot$5.Matrix4,g=WebGLPlot$5.Matrix4.fromScale(l);WebGLPlot$5.Matrix4.multiply(c,h,p),WebGLPlot$5.Matrix4.multiply(p,g,p),WebGLPlot$5.Matrix4.multiply(p,d,_),WebGLPlot$5.Matrix4.multiply(_,f,m),null!==this.primitive&&this.delete();var x=new WebGLPlot$5.PlaneGeometry,y=new WebGLPlot$5.GeometryInstance({geometry:x,modelMatrix:m}),v=new WebGLPlot$5.Material({fabric:{type:"DiffuseMap",uniforms:{image:this._images}},translucent:!0});this.primitive=this.viewer.scene.primitives.add(new WebGLPlot$5.Primitive({geometryInstances:y,appearance:new WebGLPlot$5.MaterialAppearance({closed:!0,translucent:!0,material:v})}))}}setVisible(e){null!==this.primitive&&(this.primitive.show=e)}delete(){null!==this.primitive&&(this.viewer.scene.primitives.removeAndDestroy(this.primitive),this.primitive=void 0)}destroy(){this.delete()}clone(){}}var _0x4d5d3d=(_0x2e21ca=!0,function(e,t){var i=_0x2e21ca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e21ca=!1,i}),_0xe65ade=_0x4d5d3d(void 0,(function(){return _0xe65ade.toString().search("(((.+)+)+)+$").toString().constructor(_0xe65ade).search("(((.+)+)+)+$")})),_0x2e21ca;_0xe65ade();var WebGLPlot$4=window.WebGLPlot=window.WebGLPlot||{};function _0x2f7f36(e,t){void 0===e.showLine?this.showLine=!0:this.showLine=e.showLine,this.scene=t.scene,this.position=this.lonLatToPixel(e.position),void 0===this.position&&(this.position={x:100,y:200,z:0}),this.finalPosition=e.position,this.style=document.createElement("style"),this.style.innerHTML=".dialog{min-width:150px;min-height:100px;position:absolute; background-color: rgba(42, 69, 105,.3);border: none;display: block;left:"+this.position.x+"px;top:"+this.position.y+"px;z-index: 1;\n}\n.dialog-content{padding:4px;color:#00a7d0}\n",this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.style),this.bpDom=document.createElement("div"),this.bpDom.classList.add("dialog"),this.bpDom.style.cssText="display: block;";var i=Math.random().toString(15);this.bpDom.id=i.slice(2,i.length),this.bpDom.position=e.position,this.canvasDom=document.createElement("canvas"),this.canvasDom.id=this.bpDom.id+"c",this.canvasDom.style.cssText="position: absolute; z-index: 1",document.body.appendChild(this.canvasDom),this.contentDom=document.createElement("div"),this.contentDom.classList.add("dialog-content"),this.contentDom.appendChild(e.element),this.bpDom.appendChild(this.contentDom),document.body.appendChild(this.bpDom),this.Dragging(this.getDraggingDialog).enable(),this.self=this,this.canvas=document.getElementById(this.bpDom.id+"c"),this.lineCtx=this.canvas.getContext("2d"),this.bpDiv=document.getElementById(this.bpDom.id),this.bpPosition=this.getCordInContainer(this.bpDiv),t.camera.changed.addEventListener(function(){var t=document.getElementsByClassName("dialog");for(let e=0;e<t.length;e++){this.bpDiv=t[e],this.bpPosition=this.getCordInContainer(t[e]);var i=this.bpDiv.id,n=document.getElementById(i+"c");this.lineCtx=n.getContext("2d"),this.canvas=n,this.position=this.lonLatToPixel(this.bpDiv.position),void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx)}var r=this.lonLatToPixel(this.finalPosition),o=this.lonLatToPixel(e.position),a=null!==r&&r.x>=0&&r.y>=0&&r.x<this.scene.drawingBufferWidth&&r.y<this.scene.drawingBufferHeight,s=null!==o&&o.x>=0&&o.y>=0&&o.x<this.scene.drawingBufferWidth&&o.y<this.scene.drawingBufferHeight;if(a&&s){this.setLineVisible(!0),this.bpDiv.style.cssText="display: block;",this.pt=this.pixelToLonlat(r);var l=WebGLPlot$4.Cartesian3.fromDegrees(this.pt[0],this.pt[1]),u=new WebGLPlot$4.Cartesian2,c=this.scene.cartesianToCanvasCoordinates(l,u);WebGLPlot$4.defined(c)&&(this.bpDom.style.top=c.y+"px",this.bpDom.style.left=c.x+"px")}else this.bpDiv.style.cssText="display: none;",this.setLineVisible(!1)}.bind(this))}_0x2f7f36.prototype.Dragging=function(e){var t=null,i=0,n=0,r=null,o=o=>{switch(o.type){case"touchstart":case"mousedown":if(null!=(t=e(o))){this.bpDiv=t,this.bpPosition=this.getCordInContainer(this.bpDiv);var a=this.bpDiv.id,s=document.getElementById(a+"c");this.lineCtx=s.getContext("2d"),this.canvas=s,this.position=this.lonLatToPixel(this.bpDiv.position)}r=o.touches?o.touches[0]:o,null!=t&&(i=r.clientX-t.offsetLeft,n=r.clientY-t.offsetTop);break;case"touchmove":case"mousemove":r=o.touches?o.touches[0]:o,null!=t&&(t.style.left=r.clientX-i+"px",t.style.top=r.clientY-n+"px",void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx));break;case"touchend":case"mouseup":t=null,i=0,n=0;var l={x:this.bpDom.offsetLeft,y:this.bpDom.offsetTop};null!==l&&l.x>=0&&l.y>=0&&l.x<this.scene.drawingBufferWidth&&l.y<this.scene.drawingBufferHeight&&(this.finalPosition=this.pixelToLonlat(l))}};return{enable:function(){document.addEventListener("mousedown",o),document.addEventListener("mousemove",o),document.addEventListener("mouseup",o),document.addEventListener("touchstart",o),document.addEventListener("touchmove",o),document.addEventListener("touchend",o)},disable:function(){document.removeEventListener("mousedown",o),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",o),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",o),document.removeEventListener("touchend",o)}}},_0x2f7f36.prototype.getDraggingDialog=function(e){for(var t=e.target;t&&-1==t.className.indexOf("dialog");)t=t.offsetParent;return t},_0x2f7f36.prototype.getCordInContainer=function(e){return{x:e.getBoundingClientRect().left,y:e.getBoundingClientRect().top}},_0x2f7f36.prototype.getMinDisPoint=function(){let e={x:this.bpDiv.offsetLeft,y:this.bpDiv.offsetTop},t={x:this.bpDiv.offsetLeft,y:this.bpDiv.offsetTop+this.bpDiv.clientHeight},i={x:this.bpDiv.offsetLeft+this.bpDiv.clientWidth,y:this.bpDiv.offsetTop},n={x:this.bpDiv.offsetLeft+this.bpDiv.clientWidth,y:this.bpDiv.offsetTop+this.bpDiv.clientHeight};this.position;let r=(this.position.x-e.x)*(this.position.x-e.x)+(this.position.y-e.y)*(this.position.y-e.y),o=(this.position.x-t.x)*(this.position.x-t.x)+(this.position.y-t.y)*(this.position.y-t.y),a=(this.position.x-i.x)*(this.position.x-i.x)+(this.position.y-i.y)*(this.position.y-i.y),s=(this.position.x-n.x)*(this.position.x-n.x)+(this.position.y-n.y)*(this.position.y-n.y),l=[];l.push(r),l.push(o),l.push(a),l.push(s);let u=l[0],c=0;for(var h=1;h<l.length;h++)l[h]<u&&(u=l[h],c=h);return 0==c?e:1==c?t:2==c?i:3==c?n:null},_0x2f7f36.prototype.drawLine=function(e,t){let i=this.getMinDisPoint();if(null==i||0==i.x&&0==i.y)return;let n=Math.abs(i.x-this.position.x),r=Math.abs(this.position.y-i.y),o=this.position.x,a=this.position.y,s=i.x,l=i.y,u=Math.min(o,s),c=Math.min(a,l);e.width=Math.abs(n),e.height=Math.abs(r),e.style.setProperty("left",u+"px",""),e.style.setProperty("top",c+"px",""),e.style.setProperty("pointer-events","none"),t.clearRect(0,0,e.width,e.height),t.beginPath(),t.moveTo(o-u,a-c),t.lineTo(s-u,l-c),t.stroke()},_0x2f7f36.prototype.lonLatToPixel=function(e){2===e.length&&(e[2]=0);var t=WebGLPlot$4.Cartesian3.fromDegrees(e[0],e[1],e[2]);return WebGLPlot$4.SceneTransforms.wgs84ToWindowCoordinates(this.scene,t)},_0x2f7f36.prototype.pixelToLonlat=function(e){var t=this.scene.pickPosition(e),i=Cesium.Cartographic.fromCartesian(t);return[Cesium.Math.toDegrees(i.longitude),Cesium.Math.toDegrees(i.latitude),i.height]},_0x2f7f36.prototype.setPosition=function(e){this.position=this.lonLatToPixel(e),null!=this.position&&(this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height),this.drawLine(this.canvas,this.lineCtx))},_0x2f7f36.prototype.setLineVisible=function(e){this.showLine=e,e?void 0!==this.position&&this.drawLine(this.canvas,this.lineCtx):this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height)},_0x2f7f36.prototype.getPosition=function(){return this.bpDiv.position},_0x2f7f36.prototype.setContent=function(e){this.contentDom.childNodes.forEach((e=>e.remove())),this.contentDom.appendChild(e)},_0x2f7f36.prototype.setVisible=function(e){const t=this.bpDiv;if(t&&e){t.style.cssText="display: block;";var i=this.bpDiv.id,n=document.getElementById(i+"c");this.lineCtx=n.getContext("2d"),this.canvas=n,this.position=this.lonLatToPixel(this.bpDiv.position),void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx)}else t.style.cssText="display: none;",this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height)},_0x2f7f36.prototype.remove=function(){document.body.removeChild(this.bpDiv),document.body.removeChild(this.canvas)},_0x2f7f36.prototype.updateDom=function(e){this.contentDom.childNodes.forEach((e=>e.remove())),this.contentDom.appendChild(e)};var _0x5cec4d=(_0x4583ca=!0,function(e,t){var i=_0x4583ca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4583ca=!1,i}),_0x5d1e20=_0x5cec4d(void 0,(function(){return _0x5d1e20.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d1e20).search("(((.+)+)+)+$")})),_0x4583ca;_0x5d1e20();var _0x3db533=new WebGLPlot.Cartesian3,_0x5a7e30=new WebGLPlot.Cartesian3,_0x35ecbf=new WebGLPlot.Cartesian3,_0x410461=new WebGLPlot.Cartesian3,_0x11b1a9=new WebGLPlot.Cartesian3;function _0x1fc894(e){this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),this.positions=WebGLPlot.defaultValue(e.customPts,[]),this.numThetas=WebGLPlot.defaultValue(e.slicePartitions,65),this.numPhis=WebGLPlot.defaultValue(e.stackPartitions,65),this.vertexFormat=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),this._offsetAttribute=e.offsetAttribute,this._indices=e.indices,this._workerName="createPlotCustomRadarGeometry"}function _0x84d02(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_0x1fc894.createGeometry=function(e,t){if(e.numPhis<2||e.numThetas<2||e.positions.length<2)return;let i=_0x84d02(e.positions),n=e.numThetas,r=e.numPhis;var o=e.vertexFormat,a=n*r,s=6*a,l=WebGLPlot.IndexDatatype.createTypedArray(a,s),u=o.normal?new Float32Array(3*a):void 0,c=o.tangent?new Float32Array(3*a):void 0,h=o.bitangent?new Float32Array(3*a):void 0,d=o.st?new Float32Array(2*a):void 0;if(e._indices)l=e._indices;else{var f,p;let e=0;var _,m;if(t)for(f=0;f<=r-1;f++)for(_=f*n,m=(f+1)*n,p=0;p<n-1;p++)l[e++]=m+p,l[e++]=m+p+1,l[e++]=_+p+1,l[e++]=m+p,l[e++]=_+p+1,l[e++]=_+p;else for(f=0;f<=r-1;f++)for(_=f*n,m=(f+1)*n,p=0;p<n-1;p++)0===p&&(l[e++]=0,l[e++]=_,l[e++]=m),l[e++]=m+p,l[e++]=m+p+1,l[e++]=_+p+1,l[e++]=m+p,l[e++]=_+p+1,l[e++]=_+p,p===n-2&&(l[e++]=0,l[e++]=_+p+1,l[e++]=m+p+1)}var g=new WebGLPlot.GeometryAttributes;o.position&&(g.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:i}));var x,y=0,v=0,$=0,b=0,T=WebGLPlot.Ellipsoid.fromCartesian3(e.radii);if(o.st||o.normal||o.tangent||o.bitangent){for(f=0;f<a;f++){x=T;var C=WebGLPlot.Cartesian3.fromArray(i,3*f,_0x3db533);0===C.x&&(C.x=1e-10),0===C.y&&(C.y=1e-10),0===C.z&&(C.z=1e-10);var S=x.geodeticSurfaceNormal(C,_0x5a7e30);if(o.st){var w=WebGLPlot.Cartesian2.negate(S,_0x11b1a9);d[y++]=Math.atan2(w.y,w.x)/WebGLPlot.CesiumMath.TWO_PI+.5,d[y++]=Math.asin(S.z)/WebGLPlot.CesiumMath.PI+.5}if(o.normal&&(u[v++]=S.x,u[v++]=S.y,u[v++]=S.z),o.tangent||o.bitangent){var E,P=_0x35ecbf;if(E=!isTopOpen&&f>=0&&f<0+2*n?WebGLPlot.Cartesian3.UNIT_X:WebGLPlot.Cartesian3.UNIT_Z,WebGLPlot.Cartesian3.cross(E,S,P),WebGLPlot.Cartesian3.normalize(P,P),o.tangent&&(c[$++]=P.x,c[$++]=P.y,c[$++]=P.z),o.bitangent){var A=WebGLPlot.Cartesian3.cross(S,P,_0x410461);WebGLPlot.Cartesian3.normalize(A,A),h[b++]=A.x,h[b++]=A.y,h[b++]=A.z}}}o.st&&(g.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),o.normal&&(g.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:u})),o.tangent&&(g.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),o.bitangent&&(g.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:h}))}if(WebGLPlot.defined(e._offsetAttribute)){var L=i.length,M=new Uint8Array(L/3),R=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(M,R),g.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:M})}return new WebGLPlot.Geometry({attributes:g,indices:l,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(T),offsetAttribute:e._offsetAttribute})};var _0x78f787=(_0x59788f=!0,function(e,t){var i=_0x59788f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59788f=!1,i}),_0x22ac30=_0x78f787(void 0,(function(){return _0x22ac30.toString().search("(((.+)+)+)+$").toString().constructor(_0x22ac30).search("(((.+)+)+)+$")})),_0x59788f;function _0xe8531(e){this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),this.positions=WebGLPlot.defaultValue(e.customPts,[]),this.slicePartitions=WebGLPlot.defaultValue(e.slicePartitions,65),this.stackPartitions=WebGLPlot.defaultValue(e.stackPartitions,65),this.vertexFormat=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),this._offsetAttribute=e.offsetAttribute,this._workerName="createPlotCustomRadarOutlineGeometry"}function _0x1eefd4(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_0x22ac30(),_0xe8531.createGeometry=function(e,t){if(e.numPhis<3||e.numThetas<3||e.positions.length<3)return;var i=WebGLPlot.Ellipsoid.fromCartesian3(e.radii);let n=_0x1eefd4(e.positions),r=e.slicePartitions,o=e.stackPartitions;var a,s,l=r*o,u=4*l,c=WebGLPlot.IndexDatatype.createTypedArray(l,u);let h=0;if(t){for(a=0;a<o;a++){var d=a*r;for(s=0;s<r-1;s++)c[h++]=d+s,c[h++]=d+s+1}for(a=0;a<r-1;a++)for(s=0;s<o-1;s++)c[h++]=a+s*r,c[h++]=a+(s+1)*r}else{for(a=0;a<o;a++){d=a*r;for(s=0;s<r-1;s++)c[h++]=d+s,c[h++]=d+s+1}for(a=0;a<=r-1;a++)for(s=0;s<o-1;s++)c[h++]=a+s*r,c[h++]=a+(s+1)*r}var f=new WebGLPlot.GeometryAttributes({position:new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})});if(WebGLPlot.defined(e._offsetAttribute)){var p=n.length,_=new Uint8Array(p/3),m=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(_,m),f.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new WebGLPlot.Geometry({attributes:f,indices:c,primitiveType:WebGLPlot.PrimitiveType.LINES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(i),offsetAttribute:e._offsetAttribute})};var _0x47abbe=(_0x26ffdc=!0,function(e,t){var i=_0x26ffdc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x26ffdc=!1,i}),_0x2ef0de=_0x47abbe(void 0,(function(){return _0x2ef0de.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ef0de).search("(((.+)+)+)+$")})),_0x26ffdc;_0x2ef0de();var _0x3393e0=new WebGLPlot.Cartesian3,_0x4b44a4=new WebGLPlot.Cartesian3,_0x537e04=new WebGLPlot.Cartesian3,_0x4a94a3=new WebGLPlot.Cartesian3,_0x597df6=new WebGLPlot.Cartesian3,_0xc6eee4=new WebGLPlot.Cartesian3(1,1,1),_0x487b6f=Math.cos,_0xba82f0=Math.sin;function _0x3daff3(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT);var t=WebGLPlot.defaultValue(e.scale,1),i=WebGLPlot.defaultValue(e.radii,_0xc6eee4),n=WebGLPlot.defaultValue(e.innerRadii,i),r=WebGLPlot.defaultValue(e._minimumClock,0),o=WebGLPlot.defaultValue(e._maximumClock,WebGLPlot.CesiumMath.TWO_PI),a=WebGLPlot.defaultValue(e._minimumCone,0),s=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),l=Math.round(WebGLPlot.defaultValue(e.stackPartitions,64)),u=Math.round(WebGLPlot.defaultValue(e.slicePartitions,64)),c=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT);if(u<3)throw new WebGLPlot.DeveloperError("options.slicePartitions cannot be less than three.");if(l<3)throw new WebGLPlot.DeveloperError("options.stackPartitions cannot be less than three.");this._radii=new WebGLPlot.Cartesian3(i.x*t,i.y*t,i.z*t),this._innerRadii=new WebGLPlot.Cartesian3(n.x*t,n.y*t,n.z*t),this._minimumClock=r,this._maximumClock=o,this._minimumCone=a,this._maximumCone=s,this._stackPartitions=l,this._slicePartitions=u,this._vertexFormat=WebGLPlot.VertexFormat.clone(c),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}_0x3daff3.packedLength=2*WebGLPlot.Cartesian3.packedLength+WebGLPlot.VertexFormat.packedLength+7,_0x3daff3.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.Cartesian3.pack(e._radii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.Cartesian3.pack(e._innerRadii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.VertexFormat.pack(e._vertexFormat,t,i),i+=WebGLPlot.VertexFormat.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x10f0d9=new WebGLPlot.Cartesian3,_0x1230ff=new WebGLPlot.Cartesian3,_0x46b17b=new WebGLPlot.VertexFormat,_0x102deb={radii:_0x10f0d9,innerRadii:_0x1230ff,vertexFormat:_0x46b17b,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0},_0x2c59d6;_0x3daff3.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.Cartesian3.unpack(e,t,_0x10f0d9);t+=WebGLPlot.Cartesian3.packedLength;var r=WebGLPlot.Cartesian3.unpack(e,t,_0x1230ff);t+=WebGLPlot.Cartesian3.packedLength;var o=WebGLPlot.VertexFormat.unpack(e,t,_0x46b17b);t+=WebGLPlot.VertexFormat.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return WebGLPlot.defined(i)?(i._radii=WebGLPlot.Cartesian3.clone(n,i._radii),i._innerRadii=WebGLPlot.Cartesian3.clone(r,i._innerRadii),i._vertexFormat=WebGLPlot.VertexFormat.clone(o,i._vertexFormat),i._minimumClock=a,i._maximumClock=s,i._minimumCone=l,i._maximumCone=u,i._stackPartitions=c,i._slicePartitions=h,i._offsetAttribute=-1===d?void 0:d,i):(_0x102deb.minimumClock=a,_0x102deb.maximumClock=s,_0x102deb.minimumCone=l,_0x102deb.maximumCone=u,_0x102deb.stackPartitions=c,_0x102deb.slicePartitions=h,_0x102deb.offsetAttribute=-1===d?void 0:d,new _0x3daff3(_0x102deb))},_0x3daff3.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._vertexFormat,l=e._slicePartitions+1,u=e._stackPartitions+1;(l=Math.round(l*Math.abs(r-n)/WebGLPlot.CesiumMath.TWO_PI))<2&&(l=2),(u=Math.round(u*Math.abs(a-o)/WebGLPlot.CesiumMath.PI))<2&&(u=2);var c,h,d=0,f=[o],p=[n];for(c=0;c<u;c++)f.push(o+c*(a-o)/(u-1));for(f.push(a),h=0;h<l;h++)p.push(n+h*(r-n)/(l-1));p.push(r);var _=f.length,m=p.length,g=0,x=1,y=i.x!==t.x||i.y!==t.y||i.z!==t.z,v=!1,$=!1,b=!1;y&&(x=2,o>0&&(v=!0,g+=l-1),a<WebGLPlot.CesiumMath.PI&&($=!0,g+=l-1),(r-n)%WebGLPlot.CesiumMath.TWO_PI?(b=!0,g+=2*(u-1)+1):g+=1);var T=m*_*x,C=new Float64Array(3*T),S=WebGLPlot.arrayFill(new Array(T),!1),w=WebGLPlot.arrayFill(new Array(T),!1),E=l*u*x,P=6*(E+g+1-(l+u)*x),A=WebGLPlot.IndexDatatype.createTypedArray(E,P),L=s.normal?new Float32Array(3*T):void 0,M=s.tangent?new Float32Array(3*T):void 0,R=s.bitangent?new Float32Array(3*T):void 0,O=s.st?new Float32Array(2*T):void 0,D=new Array(_),I=new Array(_);for(c=0;c<_;c++)D[c]=_0xba82f0(f[c]),I[c]=_0x487b6f(f[c]);var F=new Array(m),B=new Array(m);for(h=0;h<m;h++)B[h]=_0x487b6f(p[h]),F[h]=_0xba82f0(p[h]);for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=t.x*D[c]*B[h],C[d++]=t.y*D[c]*F[h],C[d++]=t.z*I[c];var N,G,z,U,V=T/2;if(y)for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=i.x*D[c]*B[h],C[d++]=i.y*D[c]*F[h],C[d++]=i.z*I[c],S[V]=!0,c>0&&c!==_-1&&0!==h&&h!==m-1&&(w[V]=!0),V++;for(d=0,c=1;c<_-2;c++)for(N=c*m,G=(c+1)*m,h=1;h<m-2;h++)A[d++]=G+h,A[d++]=G+h+1,A[d++]=N+h+1,A[d++]=G+h,A[d++]=N+h+1,A[d++]=N+h;if(y){var k=_*m;for(c=1;c<_-2;c++)for(N=k+c*m,G=k+(c+1)*m,h=1;h<m-2;h++)A[d++]=G+h,A[d++]=N+h,A[d++]=N+h+1,A[d++]=G+h,A[d++]=N+h+1,A[d++]=G+h+1}if(y){if(v)for(U=_*m,c=1;c<m-2;c++)A[d++]=c,A[d++]=c+1,A[d++]=U+c+1,A[d++]=c,A[d++]=U+c+1,A[d++]=U+c;if($)for(z=_*m-m,U=_*m*x-m,c=1;c<m-2;c++)A[d++]=z+c+1,A[d++]=z+c,A[d++]=U+c,A[d++]=z+c+1,A[d++]=U+c,A[d++]=U+c+1}if(b){for(c=1;c<_-2;c++)U=m*_+m*c,z=m*c,A[d++]=U,A[d++]=z+m,A[d++]=z,A[d++]=U,A[d++]=U+m,A[d++]=z+m;for(c=1;c<_-2;c++)U=m*_+m*(c+1)-1,z=m*(c+1)-1,A[d++]=z+m,A[d++]=U,A[d++]=z,A[d++]=z+m,A[d++]=U+m,A[d++]=U}var W=new WebGLPlot.GeometryAttributes;s.position&&(W.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:C}));var H,q=0,j=0,X=0,Y=0,Z=T/2,K=WebGLPlot.Ellipsoid.fromCartesian3(t),Q=WebGLPlot.Ellipsoid.fromCartesian3(i);if(s.st||s.normal||s.tangent||s.bitangent){for(c=0;c<T;c++){H=S[c]?Q:K;var J=WebGLPlot.Cartesian3.fromArray(C,3*c,_0x3393e0),ee=H.geodeticSurfaceNormal(J,_0x4b44a4);if(w[c]&&WebGLPlot.Cartesian3.negate(ee,ee),s.st){var te=WebGLPlot.Cartesian2.negate(ee,_0x597df6);O[q++]=Math.atan2(te.y,te.x)/WebGLPlot.CesiumMath.TWO_PI+.5,O[q++]=Math.asin(ee.z)/WebGLPlot.CesiumMath.PI+.5}if(s.normal&&(L[j++]=ee.x,L[j++]=ee.y,L[j++]=ee.z),s.tangent||s.bitangent){var ie,ne=_0x537e04,re=0;if(S[c]&&(re=Z),ie=!v&&c>=re&&c<re+2*m?WebGLPlot.Cartesian3.UNIT_X:WebGLPlot.Cartesian3.UNIT_Z,WebGLPlot.Cartesian3.cross(ie,ee,ne),WebGLPlot.Cartesian3.normalize(ne,ne),s.tangent&&(M[X++]=ne.x,M[X++]=ne.y,M[X++]=ne.z),s.bitangent){var oe=WebGLPlot.Cartesian3.cross(ee,ne,_0x4a94a3);WebGLPlot.Cartesian3.normalize(oe,oe),R[Y++]=oe.x,R[Y++]=oe.y,R[Y++]=oe.z}}}s.st&&(W.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:O})),s.normal&&(W.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),s.tangent&&(W.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:M})),s.bitangent&&(W.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R}))}if(WebGLPlot.defined(e._offsetAttribute)){var ae=C.length,se=new Uint8Array(ae/3),le=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(se,le),W.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:se})}return new WebGLPlot.Geometry({attributes:W,indices:A,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(K),offsetAttribute:e._offsetAttribute})}}},_0x3daff3.getUnitEllipsoid=function(){return WebGLPlot.defined(_0x2c59d6)||(_0x2c59d6=_0x3daff3.createGeometry(new _0x3daff3({radii:new WebGLPlot.Cartesian3(1,1,1),vertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY}))),_0x2c59d6};var _0x33aaa4=(_0x3bab97=!0,function(e,t){var i=_0x3bab97?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3bab97=!1,i}),_0x209c0e=_0x33aaa4(void 0,(function(){return _0x209c0e.toString().search("(((.+)+)+)+$").toString().constructor(_0x209c0e).search("(((.+)+)+)+$")})),_0x3bab97;_0x209c0e();var _0x4a4269=new WebGLPlot.Cartesian3(1,1,1),_0x14009c=Math.cos,_0x3c24fe=Math.sin;function _0x465603(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT);var t=WebGLPlot.defaultValue(e.scale,1),i=WebGLPlot.defaultValue(e.radii,_0x4a4269),n=WebGLPlot.defaultValue(e.innerRadii,i),r=WebGLPlot.defaultValue(e._minimumClock,0),o=WebGLPlot.defaultValue(e._maximumClock,WebGLPlot.CesiumMath.TWO_PI),a=WebGLPlot.defaultValue(e._minimumCone,0),s=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),l=Math.round(WebGLPlot.defaultValue(e.stackPartitions,10)),u=Math.round(WebGLPlot.defaultValue(e.slicePartitions,8)),c=Math.round(WebGLPlot.defaultValue(e.subdivisions,128));if(l<1)throw new WebGLPlot.DeveloperError("options.stackPartitions cannot be less than 1");if(u<0)throw new WebGLPlot.DeveloperError("options.slicePartitions cannot be less than 0");if(c<0)throw new WebGLPlot.DeveloperError("options.subdivisions must be greater than or equal to zero.");if(WebGLPlot.defined(e.offsetAttribute)&&e.offsetAttribute===WebGLPlot.GeometryOffsetAttribute.TOP)throw new WebGLPlot.DeveloperError("WebGLPlot.GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=new WebGLPlot.Cartesian3(i.x*t,i.y*t,i.z*t),this._innerRadii=new WebGLPlot.Cartesian3(n.x*t,n.y*t,n.z*t),this._minimumClock=r,this._maximumClock=o,this._minimumCone=a,this._maximumCone=s,this._stackPartitions=l,this._slicePartitions=u,this._subdivisions=c,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}_0x465603.packedLength=2*WebGLPlot.Cartesian3.packedLength+8,_0x465603.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.Cartesian3.pack(e._radii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.Cartesian3.pack(e._innerRadii,t,i),i+=WebGLPlot.Cartesian3.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i++]=e._subdivisions,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x261c36=new WebGLPlot.Cartesian3,_0x13dfd8=new WebGLPlot.Cartesian3,_0x40572c={radii:_0x261c36,innerRadii:_0x13dfd8,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};_0x465603.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.Cartesian3.unpack(e,t,_0x261c36);t+=WebGLPlot.Cartesian3.packedLength;var r=WebGLPlot.Cartesian3.unpack(e,t,_0x13dfd8);t+=WebGLPlot.Cartesian3.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return WebGLPlot.defined(i)?(i._radii=WebGLPlot.Cartesian3.clone(n,i._radii),i._innerRadii=WebGLPlot.Cartesian3.clone(r,i._innerRadii),i._minimumClock=o,i._maximumClock=a,i._minimumCone=s,i._maximumCone=l,i._stackPartitions=u,i._slicePartitions=c,i._subdivisions=h,i._offsetAttribute=-1===d?void 0:d,i):(_0x40572c.minimumClock=o,_0x40572c.maximumClock=a,_0x40572c.minimumCone=s,_0x40572c.maximumCone=l,_0x40572c.stackPartitions=u,_0x40572c.slicePartitions=c,_0x40572c.subdivisions=h,_0x40572c.offsetAttribute=-1===d?void 0:d,new _0x465603(_0x40572c))},_0x465603.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._subdivisions,l=WebGLPlot.Ellipsoid.fromCartesian3(t),u=e._slicePartitions+1,c=e._stackPartitions+1;(u=Math.round(u*Math.abs(r-n)/WebGLPlot.CesiumMath.TWO_PI))<2&&(u=2),(c=Math.round(c*Math.abs(a-o)/WebGLPlot.CesiumMath.PI))<2&&(c=2);var h=0,d=1,f=i.x!==t.x||i.y!==t.y||i.z!==t.z,p=!1,_=!1;f&&(d=2,o>0&&(p=!0,h+=u),a<WebGLPlot.CesiumMath.PI&&(_=!0,h+=u));var m,g,x,y,v=s*d*(c+u),$=new Float64Array(3*v),b=2*(v+h-(u+c)*d),T=WebGLPlot.IndexDatatype.createTypedArray(v,b),C=0,S=new Array(c),w=new Array(c);for(m=0;m<c;m++)y=o+m*(a-o)/(c-1),S[m]=_0x3c24fe(y),w[m]=_0x14009c(y);var E=new Array(s),P=new Array(s);for(m=0;m<s;m++)x=n+m*(r-n)/(s-1),E[m]=_0x3c24fe(x),P[m]=_0x14009c(x);for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(S.length=s,w.length=s,m=0;m<s;m++)y=o+m*(a-o)/(s-1),S[m]=_0x3c24fe(y),w[m]=_0x14009c(y);for(E.length=u,P.length=u,m=0;m<u;m++)x=n+m*(r-n)/(u-1),E[m]=_0x3c24fe(x),P[m]=_0x14009c(x);for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(C=0,m=0;m<c*d;m++){var A=m*s;for(g=0;g<s-1;g++)T[C++]=A+g,T[C++]=A+g+1}var L=c*s*d;for(m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f)for(L=c*s*d+u*s,m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f){var M=c*s*d,R=M+s*u;if(p)for(m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m;if(_)for(M+=s*u-u,R+=s*u-u,m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m}var O=new WebGLPlot.GeometryAttributes({position:new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:$})});if(WebGLPlot.defined(e._offsetAttribute)){var D=$.length,I=new Uint8Array(D/3),F=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(I,F),O.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new WebGLPlot.Geometry({attributes:O,indices:T,primitiveType:WebGLPlot.PrimitiveType.LINES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(l),offsetAttribute:e._offsetAttribute})}}};const _0x3aafda=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x7cca8f=_0x3aafda(void 0,(function(){return _0x7cca8f.toString().search("(((.+)+)+)+$").toString().constructor(_0x7cca8f).search("(((.+)+)+)+$")}));_0x7cca8f();var _0x2b9fc2=void 0;function _0x16f21a(e){if(!e)throw new WebGLPlot.DeveloperError("PlotRadarUpdater scene is required.");_0x2b9fc2||(this.start(50),this._primitives=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._primitives)),this.radarArray=[]}_0x16f21a.getInstance=function(e){return _0x2b9fc2||(_0x2b9fc2=new _0x16f21a(e)),_0x2b9fc2},_0x16f21a.prototype.add=function(e){e.PlotRadarType&&this.radarArray.push(e)},_0x16f21a.prototype.radarUpdate=function(e){for(let t=0;t<this.radarArray.length;t++)this.radarArray[t]._updated(e)},_0x16f21a.prototype.start=function(e){this.stop();let t=this;this.IntervalID=setInterval((function(){t.radarUpdate(e)}),e)},_0x16f21a.prototype.stop=function(){clearInterval(this.IntervalID),this.IntervalID=-1},_0x16f21a.prototype.destroy=function(){this.stop(),_0x2b9fc2=void 0,this._primitives.destroy()};const _0x12e196=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x25d2e7=_0x12e196(void 0,(function(){return _0x25d2e7.toString().search("(((.+)+)+)+$").toString().constructor(_0x25d2e7).search("(((.+)+)+)+$")}));_0x25d2e7();class _0x4638ce extends _0x10d3db{constructor(e,t){super(e),this._scene=t,this._isNeedUpdate=!1,this.PlotRadarType="PlotRadarBase",e&&(this._scale=WebGLPlot$e.defaultValue(e.scale,1),this._id=WebGLPlot$e.defaultValue(e.id,WebGLPlot$e.createGuid()),this._point=WebGLPlot$e.defaultValue(e.point,new WebGLPlot$e.Cartesian3),this._offset=WebGLPlot$e.defaultValue(e.offset,new WebGLPlot$e.Cartesian3),this._customPts=WebGLPlot$e.defaultValue(e.customPts,[]),this._radii=WebGLPlot$e.defaultValue(e.radii,new WebGLPlot$e.Cartesian3(1,1,1)),this._slicePartitions=WebGLPlot$e.defaultValue(e.slicePartitions,67),this._stackPartitions=WebGLPlot$e.defaultValue(e.stackPartitions,67),this._show=WebGLPlot$e.defaultValue(e.show,!0),this._fill=WebGLPlot$e.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$e.defaultValue(e.fillColor,new WebGLPlot$e.Color(1,0,0,.5)),this._outline=WebGLPlot$e.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$e.defaultValue(e.outlineColor,new WebGLPlot$e.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$e.defaultValue(e.outlineWidth,1),e.rotate?this._rotate=new WebGLPlot$e.Cartesian3(WebGLPlot$e.CesiumMath.toRadians(e.rotate.x),WebGLPlot$e.CesiumMath.toRadians(e.rotate.y),WebGLPlot$e.CesiumMath.toRadians(e.rotate.z)):this._rotate=new WebGLPlot$e.Cartesian3(0,0,0),this.shadows=WebGLPlot$e.defaultValue(e.shadows,WebGLPlot$e.ShadowMode.DISABLED)),t&&(_0x16f21a.getInstance(t).add(this),this._primitives=_0x16f21a.getInstance()._primitives),this._primitive=void 0,this._outlinePrimitive=void 0}updateEffect(e){WebGLPlot$e.defined(e.point)&&(this.point=e.point),WebGLPlot$e.defined(e.rotate)&&(this.rotate=e.rotate),WebGLPlot$e.defined(e.visible)&&(this.show=e.visible)}_createRadarPrimitive(){var e=new WebGLPlot$e.HeadingPitchRoll(this._rotate.z,this._rotate.y,this._rotate.x);const t=WebGLPlot$e.Cartesian3.fromDegrees(this.point.x+this._offset.x,this.point.y+this._offset.y,this.point.z+this._offset.z),i=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(t,e);this.isFill&&this._addFillPrimitive(i),this.isOutline&&this._addOutlinePrimitive(i)}_addFillPrimitive(e){if(this._primitive&&this._primitives.removeAndDestroy(this._primitive),!this.show)return;let t=this._createFillPrimitive(e);this._primitive=this._primitives.add(t)}_addOutlinePrimitive(e){if(this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),!this.show)return;let t=this._createOutlinePrimitive(e);this._outlinePrimitive=this._primitives.add(t)}_createFillPrimitive(e,t){t||(t=this);var i={show:new WebGLPlot$e.ShowGeometryInstanceAttribute(t.isFill),distanceDisplayCondition:new WebGLPlot$e.DistanceDisplayConditionGeometryInstanceAttribute,color:void 0,offset:void 0},n=new WebGLPlot$e.MaterialAppearance({material:WebGLPlot$e.Material.fromType(WebGLPlot$e.Material.ColorType,{color:t.fillColor}),translucent:!0,closed:!0});let r=this._createRadarFillGeometry(t),o=new WebGLPlot$e.GeometryInstance({id:t.id,geometry:r,modelMatrix:e,attributes:i});return new WebGLPlot$e.Primitive({geometryInstances:o,appearance:n,asynchronous:!1,shadows:t.shadows})}_createOutlinePrimitive(e,t){t||(t=this);var i={show:new WebGLPlot$e.ShowGeometryInstanceAttribute(t.isOutline),distanceDisplayCondition:new WebGLPlot$e.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot$e.ColorGeometryInstanceAttribute.fromColor(t.outlineColor),offset:void 0};let n=this._createRadarOutLineGeometry(t),r=new WebGLPlot$e.GeometryInstance({id:t.id,geometry:n,modelMatrix:e,attributes:i}),o=new WebGLPlot$e.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:t.outlineWidth}});return new WebGLPlot$e.Primitive({geometryInstances:r,appearance:o,asynchronous:!1,shadows:t.shadows})}clone(e){if(!WebGLPlot$e.defined(e))throw new WebGLPlot$e.DeveloperError("PlotRadar clone result is required.");return e.PlotRadarType="PlotRadarBase",e._scene=this._scene,e._id=this.id,e._point=this.point.clone(),e._rotate=this._rotate.clone(),e._radii=this.radii.clone(),e._slicePartitions=this.slicePartitions,e._stackPartitions=this.stackPartitions,e._show=this.show,e._fill=this.isFill,e._fillColor=this.fillColor,e._outline=this.isOutline,e._outlineColor=this.outlineColor,e._outlineWidth=this._outlineWidth,e.shadows=this.shadows,e._customPts=this._customPts,e}getEffectParameter(){let e={};return e.point=this.point,e.rotate=this.rotate,e.visible=this.visible,e}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[])}toGeoJson(){return{}}fromGeoJson(e){}}Object.defineProperties(_0x4638ce.prototype,{id:{get:function(){return this._id},set:function(e){"string"==typeof e&&this._id!==e&&(this._id=e)}},point:{get:function(){return this._point},set:function(e){(e instanceof WebGLPlot$e.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._point)&&(this._point=e.clone(),this._scanArray&&this._scanArray.length>0&&this._scanArray.forEach((t=>{t.point=e})),this._isNeedUpdate=!0)}},offset:{get:function(){return this._offset},set:function(e){(e instanceof WebGLPlot$e.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._offset)&&(this._offset=e,this._scanArray&&this._scanArray.length>0&&this._scanArray.forEach((t=>{t.offset=e})),this._isNeedUpdate=!0)}},rotate:{get:function(){return new WebGLPlot$e.Cartesian3(WebGLPlot$e.CesiumMath.toDegrees(this._rotate.x),WebGLPlot$e.CesiumMath.toDegrees(this._rotate.y),WebGLPlot$e.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot$e.Cartesian3||e instanceof _0x23de81){let t=new WebGLPlot$e.Cartesian3(WebGLPlot$e.CesiumMath.toRadians(e.x),WebGLPlot$e.CesiumMath.toRadians(e.y),WebGLPlot$e.CesiumMath.toRadians(e.z));WebGLPlot$e.Cartesian3(t,this._rotate)||(this._rotate=t,this._isNeedUpdate=!0)}}},slicePartitions:{get:function(){return this._slicePartitions},set:function(e){"number"==typeof e&&this._slicePartitions!==e&&(this._slicePartitions=e,this._isNeedUpdate=!0)}},stackPartitions:{get:function(){return this._stackPartitions}},show:{get:function(){return this._show},set:function(e){"boolean"==typeof e&&this._show!==e&&(this._show=e,this._isNeedUpdate=!0)}},isFill:{get:function(){return this._fill},set:function(e){"boolean"==typeof e&&this._fill!==e&&(this._fill=e,this._primitive&&(this._primitive.show=e))}},isOutline:{get:function(){return this._outline},set:function(e){"boolean"==typeof e&&this._outline!==e&&(this._outline=e,this._outlinePrimitive&&(this._outlinePrimitive.show=e))}},fillColor:{get:function(){return this._fillColor},set:function(e){e instanceof WebGLPlot$e.Color&&!WebGLPlot$e.Color.equals(e,this._fillColor)&&(this._fillColor=e,this._primitive&&(this._primitive.appearance.material=WebGLPlot$e.Material.fromType(WebGLPlot$e.Material.ColorType,{color:e})))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){e instanceof WebGLPlot$e.Color&&!WebGLPlot$e.Color.equals(e,this._outlineColor)&&(this._outlineColor=e,this._isNeedUpdate=!0)}},material:{get:function(){return this._fillColor},set:function(e){if(e instanceof WebGLPlot$e.Color&&!WebGLPlot$e.Color.equals(e,this._fillColor)){this.fillColor=e;let t=2*e.alpha>=1?1:2*e.alpha;this.outlineColor=new WebGLPlot$e.Color(e.red,e.green,e.blue,t)}}},radii:{get:function(){return this._radii},set:function(e){(e instanceof WebGLPlot$e.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._radii)&&(this._radii=e.clone(),this._createScan&&this._createScan(),this._isNeedUpdate=!0)}},isShowScan:{get:function(){return this._isShowScan},set:function(e){"boolean"==typeof e&&this.__isShowScan!==e&&(this._isShowScan=e)}},dScanSpeed:{get:function(){return WebGLPlot$e.CesiumMath.toDegrees(this._dScanSpeed)},set:function(e){if("number"==typeof e){let t=WebGLPlot$e.CesiumMath.toRadians(e);this._dScanSpeed=t}}},scale:{get:function(){return this._scale},set:function(e){"number"==typeof e&&this._scale!==e&&(this._scale=e,this._isNeedUpdate=!0)}}});var _0x275507=(_0x106acc=!0,function(e,t){var i=_0x106acc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x106acc=!1,i}),_0x39263a=_0x275507(void 0,(function(){return _0x39263a.toString().search("(((.+)+)+)+$").toString().constructor(_0x39263a).search("(((.+)+)+)+$")})),_0x106acc;_0x39263a();var _0x2a1630={PlotMechanicalRadar:0,PlotParameterRadar:1,PlotWarningRadar:2,PlotScanRadar:3,PlotRotateRadar:4,PlotCustomRadar:5},_0x2c0193=Object.freeze(_0x2a1630),_0x53c1b5=(_0x59ea31=!0,function(e,t){var i=_0x59ea31?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59ea31=!1,i}),_0x5a049d=_0x53c1b5(void 0,(function(){return _0x5a049d.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a049d).search("(((.+)+)+)+$")})),_0x59ea31;_0x5a049d();class _0x3e0fb4 extends _0x4638ce{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotCustomRadar scene is required.");super(e,t),this.PlotRadarType=_0x2c0193.PlotCustomRadar,this._add2Scene()}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive())}_add2Scene(){this._createRadarPrimitive()}_createRadarFillGeometry(e){return _0x1fc894.createGeometry(new _0x1fc894({customPts:e._customPts,slicePartitions:e.slicePartitions,stackPartitions:e.stackPartitions,radii:e.radii}),!0)}_createRadarOutLineGeometry(e){return _0xe8531.createGeometry(new _0xe8531({customPts:e._customPts,slicePartitions:e.slicePartitions,stackPartitions:e.stackPartitions,radii:e.radii}),!0)}getScanPts(e,t){var i=[];for(let r=0;r<e.length;r++){var n=[];const o=e[r];for(let e=0;e<t;e++){const t=o[e];n.push(t)}i.push(n)}return i}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e.rotate=this.rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x3e0fb4(this,this._scene)}}Object.defineProperties(_0x3e0fb4.prototype,{customPts:{get:function(){return this._customPts},set:function(e){Array.isArray(e)&&(this._customPts=e,this._isNeedUpdate=!0)}}});const _0x268597=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1be771=_0x268597(void 0,(function(){return _0x1be771.toString().search("(((.+)+)+)+$").toString().constructor(_0x1be771).search("(((.+)+)+)+$")}));_0x1be771();class _0x2de2c6 extends _0x4638ce{constructor(e){super(e),this.PlotRadarType="PlotRotateRadarScan",this._slicePartitions=2,this._computeScanPts(e)}_computeScanPts(e){WebGLPlot.defined(e)&&(this.scanAngle=e.rotateAngle*(this._slicePartitions/e.slicePartitions),e._radarPts.length>3&&this._getScanPts(e._radarPts))}_getScanPts(e){this._radarPts=[];for(let i=0;i<e.length;i++){var t=[];const n=e[i];for(let e=0;e<this._slicePartitions;e++){const i=n[e];t.push(i)}this._radarPts.push(t)}}clone(e){return(!WebGLPlot.defined(e)||!(e instanceof _0x2de2c6))&&(e=new _0x2de2c6),(e=super.clone(e))._radarPts=this._radarPts,e.PlotRadarType=this.PlotRadarType,e._slicePartitions=this._slicePartitions,e.scanAngle=this.scanAngle,e._isNeedUpdate=!0,e}}const _0x33f217=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x8f77a1=_0x33f217(void 0,(function(){return _0x8f77a1.toString().search("(((.+)+)+)+$").toString().constructor(_0x8f77a1).search("(((.+)+)+)+$")}));_0x8f77a1();class _0xbdfb44 extends _0x4638ce{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotRotateRadar scene is required.");super(e,t),this.PlotRadarType=_0x2c0193.PlotRotateRadar,this._primitiveScnaFillArry=[],this._primitiveScnaOutLineArry=[],this._scanArray=[],this._merge(e),this._add2Scene()}getScanArray(){return this._scanArray}setScanArray(e){this.removeAllScanArray();for(let t=0;t<e.length;t++){const i=e[t];i instanceof _0x2de2c6&&this._scanArray.push(i)}return this._createScanGeoArray(),this._scanArray}addScan(e){(!e||!(e instanceof _0x2de2c6))&&(e=new _0x2de2c6(this)),this._scanArray.push(e),this._createScanGeoArray()}removeAllScanArray(){this._removeAllScanArrayPrimitive(),this._scanArray=[]}removeScan(e){if(this._primitiveScnaFillArry.length>e){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaFillArry.splice(e,1)}if(this._primitiveScnaOutLineArry.length>e){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaOutLineArry.splice(e,1)}return this._scanArray.length>e&&(this._scanArray.splice(e,1),this._createScanGeoArray(),!0)}setScan(e,t){return e instanceof _0x2de2c6&&(this.removeScan(t),this._scanArray.splice(t,0,e),this._createScanGeoArray(),!0)}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[]),this.removeAllScanArray()}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive());const t=this._dScanSpeed*e/1e3;this._updated_Scan(-t)}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScan()}_createScan(){if(this.removeAllScanArray(),!this.isShowScan||!this.show)return;const e=this.rotateAngle/this.scanCount;for(let r=0;r<this.scanCount;r++){var t=new _0x2de2c6(this),i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*r);t._rotate=i,t.material=this.scanColor,this._scanArray.push(t);var n=new WebGLPlot.HeadingPitchRoll(t._rotate.z,t._rotate.y,t._rotate.x);const o=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this._offset.x,t.point.y+this._offset.y,t.point.z+this._offset.z),a=WebGLPlot.Transforms.headingPitchRollToFixedFrame(o,n);if(t.isFill){let e=this._createFillPrimitive(a,t);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(a,t);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan(e){if(this._removeAllScanArrayPrimitive(),this.isShowScan&&this.show)for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n];this.rotateAngle>=WebGLPlot.CesiumMath.TWO_PI?(t._rotate.z+=e,Math.abs(t._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(t._rotate.z=t._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(t.__bIsBack_?t._rotate.z-=e:t._rotate.z+=e,-t._rotate.z>=this.rotateAngle-this._rotate.z-t.scanAngle/2?t.__bIsBack_=!0:-t._rotate.z<=-this._rotate.z&&(t.__bIsBack_=!1));var i=new WebGLPlot.HeadingPitchRoll(t._rotate.z,t._rotate.y,t._rotate.x);const r=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this.offset.x,t.point.y+this.offset.y,t.point.z+this.offset.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,i);if(t.isFill){let e=this._createFillPrimitive(o,t);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(o,t);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_removeAllScanArrayPrimitive(){if(this._primitiveScnaFillArry.length>0){for(let e=0;e<this._primitiveScnaFillArry.length;e++){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaFillArry=[]}if(this._primitiveScnaOutLineArry.length>0){for(let e=0;e<this._primitiveScnaOutLineArry.length;e++){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaOutLineArry=[]}}_createRadarFillGeometry(e){return e||(e=this),_0x1fc894.createGeometry(new _0x1fc894({customPts:e._radarPts,slicePartitions:e.slicePartitions,stackPartitions:e._radarPts.length,radii:e.radii}),e.isClose)}_createRadarOutLineGeometry(e){return e||(e=this),_0xe8531.createGeometry(new _0xe8531({customPts:e._radarPts,slicePartitions:e.slicePartitions,stackPartitions:e._radarPts.length,radii:e.radii}),e.isClose)}_computerRadarPts(){if(this._customPts.length<3)throw new WebGLPlot.defined("PlotRotateRadar Property customPts.length < 3.");let e=[];for(let n=0;n<this._customPts.length;n++){const r=this._customPts[n],o=this.rotateAngle/(this.slicePartitions-1);for(var t=[],i=0;i<this.slicePartitions;i++){const e=i*o;t.push(new WebGLPlot.Cartesian3(r.x*Math.cos(e),r.x*Math.sin(e),r.y))}e.push(t)}return e}_createScanGeoArray(){const e=this.rotateAngle/this._scanArray.length;for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n],i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*n);t._rotate=i}}_merge(e){this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,.5)),e.dScanSpeed?this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),e.rotateAngle?this.rotateAngle=WebGLPlot.CesiumMath.toRadians(e.rotateAngle):this.rotateAngle=WebGLPlot.CesiumMath.toRadians(360),this.isClose=this.rotateAngle%WebGLPlot.CesiumMath.TWO_PI==0,this._radarPts=this._computerRadarPts()}}Object.defineProperties(_0xbdfb44.prototype,{customPts:{get:function(){return this._customPts},set:function(e){Array.isArray(e)&&(this._customPts=e,this._radarPts=this._computerRadarPts())}}});const _0x532198=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x204d9d=_0x532198(void 0,(function(){return _0x204d9d.toString().search("(((.+)+)+)+$").toString().constructor(_0x204d9d).search("(((.+)+)+)+$")}));_0x204d9d();class _0x28b85b extends _0xbdfb44{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotMechanicalRadar scene is required.");e.rotateAngle=360,e.scale=WebGLPlot.defaultValue(e.scale,1),e.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1e4,1e4,1e4)),e.cellAngle=WebGLPlot.defaultValue(e.cellAngle,5),e.customPts=_0x2d8b0b(e.radii.x/10*e.scale),e.slicePartitions=e.rotateAngle/e.cellAngle,super(e,t),this.PlotRadarType=_0x2c0193.PlotMechanicalRadar}}function _0x2d8b0b(e){var t=[];return t.push(new WebGLPlot.Cartesian3(0,0,0)),t.push(new WebGLPlot.Cartesian3(1.10296043731977*e,.046804145634484*e,0)),t.push(new WebGLPlot.Cartesian3(2.21610390044188*e,.11759698792659*e,0)),t.push(new WebGLPlot.Cartesian3(3.23948463412258*e,.207919742367934*e,0)),t.push(new WebGLPlot.Cartesian3(4.24306826853316*e,.304605633553736*e,0)),t.push(new WebGLPlot.Cartesian3(5.07593366806073*e,.449055607644075*e,0)),t.push(new WebGLPlot.Cartesian3(6.09774013826592*e,.626275021765735*e,0)),t.push(new WebGLPlot.Cartesian3(6.82649676873021*e,.854033937659516*e,0)),t.push(new WebGLPlot.Cartesian3(7.59836360255064*e,1.13340451890574*e,0)),t.push(new WebGLPlot.Cartesian3(8.12046765798091*e,1.39526442140232*e,0)),t.push(new WebGLPlot.Cartesian3(8.77215268479149*e,1.76316819829927*e,0)),t.push(new WebGLPlot.Cartesian3(9.24420050024946*e,2.26394442518268*e,0)),t.push(new WebGLPlot.Cartesian3(9.41437066670075*e,2.78004341750028*e,0)),t.push(new WebGLPlot.Cartesian3(9.37677016147896*e,3.37826190260998*e,0)),t.push(new WebGLPlot.Cartesian3(9.02402463279236*e,4.05665157036142*e,0)),t.push(new WebGLPlot.Cartesian3(8.49067600110484*e,4.52027646588052*e,0)),t.push(new WebGLPlot.Cartesian3(7.93178024681909*e,4.83964546832953*e,0)),t.push(new WebGLPlot.Cartesian3(7.37859457443028*e,4.95818525526998*e,0)),t.push(new WebGLPlot.Cartesian3(6.73933014626123*e,4.97031713954619*e,0)),t.push(new WebGLPlot.Cartesian3(6.1144105659988*e,4.8548345993221*e,0)),t.push(new WebGLPlot.Cartesian3(5.51606295388907*e,4.68304158511523*e,0)),t.push(new WebGLPlot.Cartesian3(4.84103177562709*e,4.34900006813962*e,0)),t.push(new WebGLPlot.Cartesian3(4.09846873384157*e,3.95082720446673*e,0)),t.push(new WebGLPlot.Cartesian3(3.26846203349058*e,3.4279079135254*e,0)),t.push(new WebGLPlot.Cartesian3(2.2493811983941*e,2.68004157158963*e,0)),t.push(new WebGLPlot.Cartesian3(1.43802404023069*e,1.88816148893958*e,0)),t.push(new WebGLPlot.Cartesian3(.67580571600966*e,.925081705540024*e,0)),t.push(new WebGLPlot.Cartesian3(0,0,0)),t}Object.defineProperties(_0x28b85b.prototype,{radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._radii)){this._radii=e.clone(),this.customPts=_0x2d8b0b(this._radii.x/10*this._scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e,this.customPts=_0x2d8b0b(this._radii.x/10*e);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}}});const _0x363c10=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2dfc92=_0x363c10(void 0,(function(){return _0x2dfc92.toString().search("(((.+)+)+)+$").toString().constructor(_0x2dfc92).search("(((.+)+)+)+$")}));_0x2dfc92();class _0x3ed677 extends _0x4638ce{constructor(e){if(super(e),this.PlotRadarType="PlotParameterRadarScan",this.scale=WebGLPlot.defaultValue(e.scale,1),this.radii=WebGLPlot.defaultValue(e.radii,0),this.innerRadii=WebGLPlot.defaultValue(e.innerRadii,0),this._minimumClock=WebGLPlot.CesiumMath.toRadians(0),this._maximumClock=WebGLPlot.CesiumMath.toRadians(5),this._minimumCone=WebGLPlot.defaultValue(e._minimumCone,0),this._maximumCone=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),this.heightReference=WebGLPlot.defaultValue(e.heightReference,void 0),this.subdivisions=WebGLPlot.defaultValue(e.subdivisions,128),this.shadows=WebGLPlot.defaultValue(e.shadows,WebGLPlot.ShadowMode.DISABLED),this.distanceDisplayCondition=WebGLPlot.defaultValue(e.distanceDisplayCondition,new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute),this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this.isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),this.__bIsBack_=void 0,this._minimumClock>this._maximumClock){let e=this._minimumClock;this._minimumClock=this._maximumClock,this._maximumClock=e}this.scanAngle=this._maximumClock-this._minimumClock,"PlotParameterRadar"===e.PlotRadarType&&(this.isOutline=!1)}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e.rotate=this.rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x3ed677(this)}}const _0x10d7f7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4b9cff=_0x10d7f7(void 0,(function(){return _0x4b9cff.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b9cff).search("(((.+)+)+)+$")}));_0x4b9cff();class _0x3f4ebc extends _0x4638ce{constructor(e,t){super(e,t),this.PlotRadarType=_0x2c0193.PlotParameterRadar,this._primitiveScnaFillArry=[],this._primitiveScnaOutLineArry=[],this._scanArray=[],this._merge(e),this._add2Scene()}getScanArray(){return this._scanArray}setScanArray(e){this.removeAllScanArray();for(let t=0;t<e.length;t++){const i=e[t];i instanceof _0x3ed677&&this._scanArray.push(i)}return this._createScanGeoArray(),this._scanArray}addScan(e){(!e||!(e instanceof _0x3ed677))&&(e=new _0x3ed677(this)),this._scanArray.push(e),this._createScanGeoArray()}removeAllScanArray(){this._removeAllScanArrayPrimitive(),this._scanArray=[]}removeScan(e){if(this._primitiveScnaFillArry.length>e){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaFillArry.splice(e,1)}if(this._primitiveScnaOutLineArry.length>e){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaOutLineArry.splice(e,1)}return this._scanArray.length>e&&(this._scanArray.splice(e,1),this._createScanGeoArray(),!0)}setScan(e,t){return!(t>=this._scanArray.length)&&((!e||!(e instanceof _0x3ed677))&&(e=new _0x3ed677(this)),this.removeScan(t),this._scanArray.splice(t,0,e),this._createScanGeoArray(),!0)}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive());const t=this._dScanSpeed*e/1e3;this._updated_Scan(-t)}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScan()}_createScan(){if(this.removeAllScanArray(),!this.isShowScan||!this.show)return;const e=(this._maximumClock-this._minimumClock)/this.scanCount;for(let r=0;r<this.scanCount;r++){var t=new _0x3ed677(this),i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-this._minimumClock-e*r);t._rotate=i,t.material=this.scanColor,this._scanArray.push(t);var n=new WebGLPlot.HeadingPitchRoll(t._rotate.z,t._rotate.y,t._rotate.x);const o=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this.offset.x,t.point.y+this.offset.y,t.point.z+this.offset.z),a=WebGLPlot.Transforms.headingPitchRollToFixedFrame(o,n);if(t.isFill){let e=this._createFillPrimitive(a,t);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(a,t);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan(e){if(this._removeAllScanArrayPrimitive(),this.isShowScan&&this.show)for(let i=0;i<this._scanArray.length;i++){const n=this._scanArray[i];this.radarClock>=WebGLPlot.CesiumMath.TWO_PI?(n._rotate.z+=e,Math.abs(n._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(n._rotate.z=n._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(n.__bIsBack_?n._rotate.z-=e:n._rotate.z+=e,-n._rotate.z>=this._maximumClock-this._rotate.z-n.scanAngle?n.__bIsBack_=!0:-n._rotate.z<=this._minimumClock-this._rotate.z&&(n.__bIsBack_=!1));var t=new WebGLPlot.HeadingPitchRoll(n._rotate.z,n._rotate.y,n._rotate.x);const r=WebGLPlot.Cartesian3.fromDegrees(n.point.x+this.offset.x,n.point.y+this.offset.y,n.point.z+this.offset.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,t);if(n.isFill){let e=this._createFillPrimitive(o,n);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(n.isOutline){let e=this._createOutlinePrimitive(o,n);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan2(e){if(this._primitiveScnaFillArry.length>0)for(let o=0;o<this._primitiveScnaFillArry.length;o++){let a=this._primitiveScnaFillArry[o];const s=this._scanArray[o];this.radarClock>=WebGLPlot.CesiumMath.TWO_PI?(s._rotate.z+=e,Math.abs(s._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(s._rotate.z=s._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(s.__bIsBack_?s._rotate.z-=e:s._rotate.z+=e,-s._rotate.z>=this._maximumClock-this._rotate.z-s.scanAngle?s.__bIsBack_=!0:-s._rotate.z<=this._minimumClock-this._rotate.z&&(s.__bIsBack_=!1));const l=WebGLPlot.Cartesian3.fromDegrees(s.point.x,s.point.y,s.point.z);var t=WebGLPlot.Matrix4.fromTranslation(l),i=WebGLPlot.Cartesian3.multiplyByScalar(l,-1,new WebGLPlot.Cartesian3),n=WebGLPlot.Matrix4.fromTranslation(i);let u=WebGLPlot.Matrix3.fromRotationX(s._rotate.x),c=WebGLPlot.Matrix3.fromRotationY(s._rotate.y),h=WebGLPlot.Matrix3.fromRotationZ(s._rotate.z);n=WebGLPlot.Matrix4.multiplyByMatrix3(n,u,n),n=WebGLPlot.Matrix4.multiplyByMatrix3(n,c,n),n=WebGLPlot.Matrix4.multiplyByMatrix3(n,h,n);var r=WebGLPlot.Matrix4.multiply(t,n,new WebGLPlot.Matrix4);a.modelMatrix=r}if(this._primitiveScnaOutLineArry.length>0)for(let e=0;e<this._primitiveScnaOutLineArry.length;e++)this._primitiveScnaOutLineArry[e]}_createRadarFillGeometry(e){return _0x3daff3.createGeometry(new _0x3daff3(e))}_createRadarOutLineGeometry(e){return _0x465603.createGeometry(new _0x465603(e))}_removeAllScanArrayPrimitive(){if(this._primitiveScnaFillArry.length>0){for(let e=0;e<this._primitiveScnaFillArry.length;e++){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaFillArry=[]}if(this._primitiveScnaOutLineArry.length>0){for(let e=0;e<this._primitiveScnaOutLineArry.length;e++){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaOutLineArry=[]}}_createScanGeoArray(){const e=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n],i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*n);t._rotate=i,t.scanAngle=t.maximumClock-t.minimumClock}}clone(e){return WebGLPlot.defined(e)?(e.PlotRadarType=this.PlotRadarType,e.id=this.id,e.point=this.point.clone(),e._rotate=this._rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this._innerRadii,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.fillColor,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x3f4ebc(this)}_merge(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("PlotParameterRadar merge source is required.");if(this._innerRadii=WebGLPlot.defaultValue(e.innerRadii,0),e.minimumClock?this._minimumClock=WebGLPlot.CesiumMath.toRadians(e.minimumClock):this._minimumClock=0,e.maximumClock?this._maximumClock=WebGLPlot.CesiumMath.toRadians(e.maximumClock):this._maximumClock=WebGLPlot.CesiumMath.TWO_PI,e.minimumCone?this._minimumCone=WebGLPlot.CesiumMath.toRadians(e.minimumCone):this._minimumCone=0,e.maximumCone?this._maximumCone=WebGLPlot.CesiumMath.toRadians(e.maximumCone):this._maximumCone=WebGLPlot.CesiumMath.PI,this.heightReference=WebGLPlot.defaultValue(e.heightReference,void 0),this.distanceDisplayCondition=WebGLPlot.defaultValue(e.distanceDisplayCondition,new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute),this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),e.dScanSpeed?this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),this._minimumClock>this._maximumClock){let e=this._minimumClock;this._minimumClock=this._maximumClock,this._maximumClock=e}this.radarClock=this._maximumClock-this._minimumClock}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[]),this.removeAllScanArray()}}Object.defineProperties(_0x3f4ebc.prototype,{point:{get:function(){return this._point},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._point)){this._point=e.clone();for(let t=0;t<this._scanArray.length;t++){this._scanArray[t].point=e}this._isNeedUpdate=!0}}},rotate:{get:function(){return new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toDegrees(this._rotate.x),WebGLPlot.CesiumMath.toDegrees(this._rotate.y),WebGLPlot.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81){let i=new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toRadians(e.x),WebGLPlot.CesiumMath.toRadians(e.y),WebGLPlot.CesiumMath.toRadians(e.z));if(!WebGLPlot.Cartesian3(i,this._rotate)){this._rotate=i;const e=(this._maximumClock-this._minimumClock)/this.scanCount;for(let i=0;i<this._scanArray.length;i++){const n=this._scanArray[i];var t=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*i);n._rotate=t}this._isNeedUpdate=!0}}}},innerRadii:{get:function(){return this._innerRadii.x<=1e-8||this._innerRadii.y<=1e-8||this._innerRadii.z<=1e-8?new _0x23de81(0,0,0):this._innerRadii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._point)){(e.x<=0||e.y<=0||e.z<=0)&&(e=new _0x23de81(1e-8,1e-8,1e-8)),this._innerRadii=e.clone(),this._innerRadii.x>this.radii.x&&(this._innerRadii=this.radii.clone());for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].innerRadii=this.innerRadii.clone()}this._isNeedUpdate=!0}}},radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._point)){this._radii=e.clone(),this._innerRadii.x>this.radii.x&&(this._innerRadii=this.radii.clone());for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].radii=this.radii.clone()}this._isNeedUpdate=!0}}},minimumClock:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._minimumClock)},set:function(e){if("number"!=typeof e||e===this.minimumClock||e>this.maximumClock)return;this._minimumClock=WebGLPlot.CesiumMath.toRadians(e),this._isNeedUpdate=!0;const t=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let e=0;e<this._scanArray.length;e++){var i=this._scanArray[e],n=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-t*e);i._rotate=n}this.radarClock=this._maximumClock-this._minimumClock}},maximumClock:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._maximumClock)},set:function(e){if("number"!=typeof e||e===this.maximumClock||e<this.minimumClock)return;this._maximumClock=WebGLPlot.CesiumMath.toRadians(e),this._isNeedUpdate=!0;const t=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let e=0;e<this._scanArray.length;e++){var i=this._scanArray[e],n=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-t*e);i._rotate=n}this.radarClock=this._maximumClock-this._minimumClock}},minimumCone:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._minimumCone)},set:function(e){if("number"==typeof e&&e!==this.minimumCone){this._minimumCone=WebGLPlot.CesiumMath.toRadians(e);for(let e=0;e<this._scanArray.length;e++){this._scanArray[e]._minimumCone=this._minimumCone}this._isNeedUpdate=!0}}},maximumCone:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._maximumCone)},set:function(e){if("number"==typeof e&&e!==this.maximumCone){this._maximumCone=WebGLPlot.CesiumMath.toRadians(e);for(let e=0;e<this._scanArray.length;e++){this._scanArray[e]._maximumCone=this._maximumCone}this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e;for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].scale=this._scale}this._isNeedUpdate=!0}}}});var _0xa16377=(_0xae7f04=!0,function(e,t){var i=_0xae7f04?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xae7f04=!1,i}),_0x5c561d=_0xa16377(void 0,(function(){return _0x5c561d.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c561d).search("(((.+)+)+)+$")})),_0xae7f04;_0x5c561d();class _0x342bfb extends _0x4638ce{constructor(e){super(e),this._slicePartitions=2,this.scaningRow=0,e._radarPts.length>3&&this._computeScanPts(e._radarPts),this.PlotRadarType="PlotScanRadarScan",e.scanConeColor&&(this._fillColor=e.scanConeColor),this.isBackIng=!1}_computeScanPts(e){const t=e[0],i=e[this.scaningRow+1],n=e[this.scaningRow+2];var r=[];r.push(new WebGLPlot.Cartesian3(t[0].x,t[0].y,t[0].z)),r.push(new WebGLPlot.Cartesian3(t[1].x,t[1].y,t[1].z));var o=[];o.push(new WebGLPlot.Cartesian3(i[0].x,i[0].y,i[0].z)),o.push(new WebGLPlot.Cartesian3(i[1].x,i[1].y,i[1].z));var a=[];a.push(new WebGLPlot.Cartesian3(n[0].x,n[0].y,n[0].z)),a.push(new WebGLPlot.Cartesian3(n[1].x,n[1].y,n[1].z));var s=[];s.push(new WebGLPlot.Cartesian3(t[0].x,t[0].y,t[0].z)),s.push(new WebGLPlot.Cartesian3(t[1].x,t[1].y,t[1].z)),this._radarPts=[r,o,a,s],this._indices=[0,3,2,0,4,5,0,2,4,0,5,3,4,2,3,3,5,4]}}const _0x458257=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2dd787=_0x458257(void 0,(function(){return _0x2dd787.toString().search("(((.+)+)+)+$").toString().constructor(_0x2dd787).search("(((.+)+)+)+$")}));_0x2dd787();class _0x49f493 extends _0x4638ce{constructor(e,t){super(e,t),this._primitiveScnaFill=void 0,this._primitiveScnaOutLine=void 0,this.PlotRadarType=_0x2c0193.PlotScanRadar,e.isShowScan&&(this.scaningRow=1),this._fillPrimitives=[],this._merge(e),this._add2Scene()}_updated(e){if(this._isNeedUpdate&&(this._isNeedUpdate=!1,this._computeRadarPts2(),this._createRadarPrimitive()),this.isShowScan){const t=this.dScanSpeed*e/1e3;this._updated_Scan(-t)}}_updated_Scan(e){if(this._removeScanConePrimitive(),!this.scanCone)return;this.scaningRow%2!=0?this.scanCone.isBackIng=!1:(e*=-1,this.scanCone.isBackIng=!0),this.scanCone._rotate.z+=e,(-this.scanCone._rotate.z+this.cellAngle>=-this._rotate.z+this.scanHAngle||-this.scanCone._rotate.z<=-this._rotate.z&&this.scanCone.isBackIng)&&(this.scaningRow+=1,this.scanCone.scaningRow+=1,this.scaningRow-1>=this.scanVAngle/this.cellAngle&&(this.scanCone.scaningRow=0,this.scaningRow=1,this.scanCone._rotate.z=this._rotate.z),this._isNeedUpdate=!0,this.scanCone._computeScanPts(this._radarPts));var t=new WebGLPlot.HeadingPitchRoll(this.scanCone._rotate.z,this._rotate.y,this._rotate.x);const i=WebGLPlot.Cartesian3.fromDegrees(this.scanCone.point.x+this.offset.x,this.scanCone.point.y+this.offset.y,this.scanCone.point.z+this.offset.z),n=WebGLPlot.Transforms.headingPitchRollToFixedFrame(i,t);if(this.scanCone.isFill){let e=this._createFillPrimitive(n,this.scanCone);this._primitiveScnaFill=this._primitives.add(e[0])}if(this.scanCone.isOutline){let e=this._createOutlinePrimitive(n,this.scanCone);this._primitiveScnaOutLine=this._primitives.add(e)}}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScanCone()}_createRadarFillGeometry(e,t){return e||(e=this),t||(t=e._radarPts),_0x1fc894.createGeometry(new _0x1fc894({customPts:t,slicePartitions:e.slicePartitions,stackPartitions:t.length,radii:e.radii,indices:e._indices}),this.isClose)}_createRadarOutLineGeometry(e,t){return e||(e=this),t||(t=e._radarPts),_0xe8531.createGeometry(new _0xe8531({customPts:t,slicePartitions:e.slicePartitions,stackPartitions:t.length,radii:this.radii}),this.isClose)}_createScanCone(){this._removeScanConePrimitive(),this.scanCone||(this.scanCone=new _0x342bfb(this)),this.scanCone.rotate=this.rotate,this.scanCone.material=this.scanConeColor;var e=new WebGLPlot.HeadingPitchRoll(this.scanCone._rotate.z,this.scanCone._rotate.y,this.scanCone._rotate.x);const t=WebGLPlot.Cartesian3.fromDegrees(this.point.x+this.offset.x,this.point.y+this.offset.y,this.point.z+this.offset.z),i=WebGLPlot.Transforms.headingPitchRollToFixedFrame(t,e);if(this.scanCone.isFill){let e=this._createFillPrimitive(i,this.scanCone);this._primitiveScnaFill=this._primitives.add(e[0])}if(this.scanCone.isOutline){let e=this._createOutlinePrimitive(i,this.scanCone);this._primitiveScnaOutLine=this._primitives.add(e)}}_removeScanConePrimitive(){this._primitiveScnaFill&&(this._primitives.removeAndDestroy(this._primitiveScnaFill),this._primitiveScnaFill=void 0),this._primitiveScnaOutLine&&(this._primitives.removeAndDestroy(this._primitiveScnaOutLine),this._primitiveScnaOutLine=void 0)}_addFillPrimitive(e){if(this._fillPrimitives.length>0){for(var t in this._fillPrimitives)this._primitives.removeAndDestroy(this._fillPrimitives[t]);this._fillPrimitives=[]}let i=this._createFillPrimitive(e);for(var t in i)this._fillPrimitives.push(this._primitives.add(i[t]))}_createFillPrimitive(e,t){t||(t=this);var i=[],n={show:new WebGLPlot.ShowGeometryInstanceAttribute(t.isFill),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:void 0,offset:void 0},r=new WebGLPlot.MaterialAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:t.fillColor}),translucent:!0,closed:!0});let o=this._createRadarFillGeometry(t,t._radarPts1),a=new WebGLPlot.GeometryInstance({id:t.id,geometry:o,modelMatrix:e,attributes:n}),s=new WebGLPlot.Primitive({geometryInstances:a,appearance:r,asynchronous:!1,shadows:t.shadows});if(i.push(s),t._radarPts2&&t._radarPts2.length>2){let r=this._createRadarFillGeometry(t,t._radarPts2),o=new WebGLPlot.GeometryInstance({id:t.id,geometry:r,modelMatrix:e,attributes:n});var l=new WebGLPlot.MaterialAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:t.scanedColor}),translucent:!0,closed:!0});let a=new WebGLPlot.Primitive({geometryInstances:o,appearance:l,asynchronous:!1,shadows:t.shadows});i.push(a)}return i}_createOutlinePrimitive(e,t){t||(t=this);var i={show:new WebGLPlot.ShowGeometryInstanceAttribute(t.isOutline),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(t.outlineColor),offset:void 0};let n=this._createRadarOutLineGeometry(t,t._radarPts),r=new WebGLPlot.GeometryInstance({id:t.id,geometry:n,modelMatrix:e,attributes:i}),o=new WebGLPlot.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:t.outlineWidth}});return new WebGLPlot.Primitive({geometryInstances:r,appearance:o,asynchronous:!1,shadows:t.shadows})}_merge(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("PlotScanRadar merge source is required.");this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),e.cellAngle?this.cellAngle=WebGLPlot.CesiumMath.toRadians(e.cellAngle):this.cellAngle=WebGLPlot.CesiumMath.toRadians(5);let t=30,i=60,n=WebGLPlot.CesiumMath.toDegrees(this.cellAngle);WebGLPlot.defined(e.scanVAngle)?t=e.scanVAngle%n!=0?e.scanVAngle+(n-e.scanVAngle%n):e.scanVAngle:t%n!=0?t+=n-t%n:t=t,WebGLPlot.defined(e.scanHAngle)?i=e.scanHAngle%n!=0?e.scanHAngle+(n-e.scanHAngle%n):e.scanHAngle:i%n!=0?i+=n-i%n:i=i,this.scanVAngle=WebGLPlot.CesiumMath.toRadians(t),this.scanHAngle=WebGLPlot.CesiumMath.toRadians(i),this._stackPartitions=t/n+1,this._slicePartitions=i/n+1,this.scanHAngle>=WebGLPlot.CesiumMath.TWO_PI&&(this.isClose=!0),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this._scanConeColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(0,1,0,.8)),this._scanedColor=WebGLPlot.defaultValue(e.scanedColor,new WebGLPlot.Color(0,1,0,.3)),e.dScanSpeed?this.dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this.dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),this._computeRadarPts(),this._computeRadarPts2()}_computeRadarPts(){const e=this.radii.x*this.scale;this._customPts=[],this._customPts.push(new WebGLPlot.Cartesian2(0,0));for(let t=0;t<=this.scanVAngle;t+=this.cellAngle){const i=Math.cos(t)*e,n=Math.sin(t)*e;this._customPts.push(new WebGLPlot.Cartesian2(i,n))}this._customPts.push(new WebGLPlot.Cartesian2(0,0));let t=[];for(let e=0;e<this._customPts.length;e++){const r=this._customPts[e];for(var i=[],n=0;n<=this.scanHAngle;n+=this.cellAngle)i.push(new WebGLPlot.Cartesian3(r.x*Math.cos(n),r.x*Math.sin(n),r.y));t.push(i)}this._radarPts=t}_computeRadarPts2(){const e=this.radii.x*this.scale;this._customPts1=[],this._customPts1.push(new WebGLPlot.Cartesian2(0,0));for(let t=this.scaningRow*this.cellAngle;t<=this.scanVAngle;t+=this.cellAngle){const i=Math.cos(t)*e,n=Math.sin(t)*e;this._customPts1.push(new WebGLPlot.Cartesian2(i,n))}if(this._customPts1.push(new WebGLPlot.Cartesian2(0,0)),this._customPts2=[],this.scaningRow>0){this._customPts2.push(new WebGLPlot.Cartesian2(0,0));for(let t=0;t<=this.scaningRow*this.cellAngle;t+=this.cellAngle){const i=Math.cos(t)*e,n=Math.sin(t)*e;this._customPts2.push(new WebGLPlot.Cartesian2(i,n))}this._customPts2.push(new WebGLPlot.Cartesian2(0,0))}let t=[];for(let e=0;e<this._customPts1.length;e++){const r=this._customPts1[e];for(var i=[],n=0;n<=this.scanHAngle;n+=this.cellAngle)i.push(new WebGLPlot.Cartesian3(r.x*Math.cos(n),r.x*Math.sin(n),r.y));t.push(i)}this._radarPts1=t;let r=[];for(let e=0;e<this._customPts2.length;e++){const t=this._customPts2[e];for(i=[],n=0;n<=this.scanHAngle;n+=this.cellAngle)i.push(new WebGLPlot.Cartesian3(t.x*Math.cos(n),t.x*Math.sin(n),t.y));r.push(i)}this._radarPts2=r}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e._rotate=this._rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x49f493(this,this._scene)}destroy(){if(this._removeScanConePrimitive(),this._fillPrimitives.length>0){for(var e in this._fillPrimitives)this._primitives.removeAndDestroy(this._fillPrimitives[e]);this._fillPrimitives=[]}this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this.scanCone=void 0}}Object.defineProperties(_0x49f493.prototype,{point:{get:function(){return this._point},set:function(e){(e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._point)&&(this._point=e.clone(),this.scanCone.point=e.clone(),this._isNeedUpdate=!0)}},radii:{get:function(){return this._radii},set:function(e){(e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._radii)&&(this._radii=e.clone(),this._computeRadarPts(),this._computeRadarPts2(),this.scanCone._computeScanPts(this._radarPts),this._isNeedUpdate=!0)}},scale:{get:function(){return this._scale},set:function(e){"number"==typeof e&&this._scale!==e&&(this._scale=e,this._computeRadarPts(),this._computeRadarPts2(),this.scanCone._computeScanPts(this._radarPts),this._isNeedUpdate=!0)}},rotate:{get:function(){return new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toDegrees(0),WebGLPlot.CesiumMath.toDegrees(0),WebGLPlot.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81){let t=new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toRadians(0),WebGLPlot.CesiumMath.toRadians(0),WebGLPlot.CesiumMath.toRadians(e.z));WebGLPlot.Cartesian3.equals(t,this._rotate)||(this._rotate=t,this._createScanCone(),this._isNeedUpdate=!0)}}},scanedColor:{get:function(){return this._scanedColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._scanedColor)&&(this._scanedColor=e,this._createRadarPrimitive())}},fillColor:{get:function(){return this._fillColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._fillColor)&&(this._fillColor=e,this._createRadarPrimitive())}},scanConeColor:{get:function(){return this._scanConeColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._scanConeColor)&&(this._scanConeColor=e,this._createScanCone())}}});const _0x112a89=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2490bd=_0x112a89(void 0,(function(){return _0x2490bd.toString().search("(((.+)+)+)+$").toString().constructor(_0x2490bd).search("(((.+)+)+)+$")}));_0x2490bd();class _0x46b837 extends _0xbdfb44{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotWarningRadar scene is required.");e.rotateAngle=360,e.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1e4,1e4,1e4)),e.cellAngle=WebGLPlot.defaultValue(e.cellAngle,5),e.customPts=_0x47389e(e.radii.x),e.slicePartitions=e.rotateAngle/e.cellAngle,super(e,t),this.PlotRadarType=_0x2c0193.PlotWarningRadar}clone(e){if(!WebGLPlot.defined(e)){var t=new _0x46b837(this,this._scene);return t.id=WebGLPlot.createGuid(),t}return e._id=this.id,e._point=this.point.clone(),e._rotate=this.rotate.clone(),e._show=this.show,e._radii=this.radii,e._innerRadii=this.innerRadii,e._minimumClock=this.minimumClock,e._maximumClock=this.maximumClock,e._minimumCone=this.minimumCone,e._maximumCone=this.maximumCone,e._heightReference=this.heightReference,e._fill=this.fill,e._material=this.material,e._outline=this.outline,e._outlineColor=this.outlineColor,e._outlineWidth=this.outlineWidth,e._stackPartitions=this.stackPartitions,e._slicePartitions=this.slicePartitions,e._shadows=this.shadows,e._distanceDisplayCondition=this.distanceDisplayCondition,e}}function _0x47389e(e){return[new WebGLPlot.Cartesian3(0,e/5,0),new WebGLPlot.Cartesian3(e,e/5*2,0),new WebGLPlot.Cartesian3(e,0,0),new WebGLPlot.Cartesian3(0,e/5,0)]}Object.defineProperties(_0x46b837.prototype,{radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._radii)){this._radii=e.clone(),this.customPts=_0x47389e(this._radii.x*this.scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e,this.customPts=_0x47389e(this._radii.x*this.scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}}});var _0x275007=(_0x51c252=!0,function(e,t){var i=_0x51c252?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51c252=!1,i}),_0x12bf19=_0x275007(void 0,(function(){return _0x12bf19.toString().search("(((.+)+)+)+$").toString().constructor(_0x12bf19).search("(((.+)+)+)+$")})),_0x51c252;_0x12bf19();var _0x241bfe={LocationPt:0,ScalePt:1,AlgoMovePt:2,UnkownPt:4},_0x9797a1=Object.freeze(_0x241bfe),_0x36c68b=(_0x37a8ce=!0,function(e,t){var i=_0x37a8ce?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37a8ce=!1,i}),_0x332745=_0x36c68b(void 0,(function(){return _0x332745.toString().search("(((.+)+)+)+$").toString().constructor(_0x332745).search("(((.+)+)+)+$")})),_0x37a8ce;function _0x841f89(e,t){this._scene=e,this._graphicObject=null,this._ctrlPoints=new WebGLPlot.BillboardCollection,this._scene.primitives.add(this._ctrlPoints),this.positionPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointWhite_Go.png"),this.scalePointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointYellow_Go.png"),this.anchorPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointRed_Go.png"),this.handle=t,this.isShiftPress=!1,this.shiftKeyDownFun=void 0,this.shiftKeyUpFun=void 0,this.editHeightMode=!1,this.ctrlPointCallBack=null}function _0x156f5e(e,t,i){e[t]=i}function _0x23af04(e,t,i){for(var n=0;n<e._ctrlPoints.length;++n){var r=e._ctrlPoints.get(n);r.index===t.index&&r.type===t.type||(r.show=i)}}function _0x12775c(e,t,i,n){if(e._graphicObject){var r=1,o=e._scene,a=WebGLPlot.SceneTransforms.transformWindowToDrawingBuffer(o,n);a.y=o.drawingBufferHeight-a.y;var s=WebGLPlot.Cartesian3.fromDegrees(e.startPoint.x,e.startPoint.y,0),l=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(o,s),u=_0x841f89.getAltitudeByLogical(s,a,o);if(WebGLPlot.defined(u)){l.y<n.y&&(r=-1);var c=WebGLPlot.Cartesian3.distance(s,u)*r,h=new _0x23de81(e.startPoint.x,e.startPoint.y,c);if(WebGLPlot.defined(i.index)){var d=i.index;t.localPoints[d]=h}else WebGLPlot.defined(i.annotationIndex)&&(t._localPoint=h);_0x2909c1.isSymbolDot(t.symbolType)?e._graphicObject.billboard.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z):e._graphicObject._initialize=!1,i.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z),e._graphicObject._wholeHeight=0}}}function _0x2329f1(e,t,i,n){if(WebGLPlot.defined(n)&&t._graphicObject){var r,o=i.type;t.getCtrlPt(i.type,i.index);var a=t._graphicObject;if(0===e)o===_0x9797a1.LocationPt&&t.isShiftPress&&(t.editHeightMode=!0),o===_0x9797a1.ScalePt&&(i.startScalePtn=n);else if(1===e){if(o===_0x9797a1.LocationPt&&(t.editHeightMode?_0x12775c(t,t._graphicObject,i,n):(t._graphicObject.localPoints[i.index]=n,_0x2909c1.isSymbolDot(t._graphicObject.symbolType)?(t._graphicObject.__setEffectParameter({point:n}),t._graphicObject.billboard.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)):t._graphicObject.localPoints[0]=new WebGLPlot.Cartesian3(n.x,n.y,n.z),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z))),o===_0x9797a1.ScalePt){if(null===t._graphicObject)return;r=t.modifyDotSymbolSize(n,i.startScalePtn),a._sizeInMeters?(a.showMode===_0x2bcc5b.Grid&&(a.billboard.scale=a.symbolSizeInMeters.x/a.gridSymbolSize.x*r,i.eyeOffset=new WebGLPlot.Cartesian3(i.eyeOffsetX*r,i.eyeOffsetY*r,0)),a.showMode===_0x2bcc5b.Picture&&(a.billboard.scale=a.symbolPictureSizeInMeters.x/a._pictureSymbolSize.x*r,i.eyeOffset=new WebGLPlot.Cartesian3(i.eyeOffsetX*r,i.eyeOffsetY*r,0))):(i.pixelOffset=new WebGLPlot.Cartesian3(i.pixelOffsetX*r,i.pixelOffsetY*r,0),a.billboard.scale=r)}}else 2===e&&o===_0x9797a1.ScalePt&&(r=t.modifyDotSymbolSize(n,i.startScalePtn),a._sizeInMeters?(a.showMode===_0x2bcc5b.Grid&&(a.symbolSizeInMeters=new WebGLPlot.Cartesian2(a.symbolSizeInMeters.x*r,a.symbolSizeInMeters.y*r)),a.showMode===_0x2bcc5b.Picture&&(a.symbolPictureSizeInMeters=new WebGLPlot.Cartesian2(a.symbolPictureSizeInMeters.x*r,a.symbolPictureSizeInMeters.y*r))):(i.pixelOffsetX*=r,i.pixelOffsetY*=r,a.showMode===_0x2bcc5b.Picture?(a.pictureSymbolSize.x*=r,a.pictureSymbolSize.y*=r):a.showMode===_0x2bcc5b.Grid&&(a.gridSymbolSize.x*=r,a.gridSymbolSize.y*=r)),a._initialize=!1,t.createCtrlPoints(a))}}function _0x202fe6(e,t,i,n){if(WebGLPlot.defined(n)&&WebGLPlot.defined(t._graphicObject)){var r=i.type,o=i.index;if(r===_0x9797a1.LocationPt){if(t.editHeightMode)_0x12775c(t,t._graphicObject,i,n);else{if(!(n instanceof _0x23de81))return;var a=SuperMapAlgoPlot.PlottingUtil.clonePoints(t._graphicObject.localPoints);if(a[o]=n,(a=_0x2909c1.clearNextSamePts(a)).length!==t._graphicObject.localPoints.length)return;t._graphicObject.localPoints[o]=n,t.isogon&&0!==o&&(o=1),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)}t._graphicObject._isScalePtModify=!1}else if(r===_0x9797a1.ScalePt){if(!(n instanceof _0x23de81))return;if(1===e){t._graphicObject._isScalePtModify=!0,t._graphicObject._modifyScalePtParams={index:o,position:n};var s=_0x5f2d78(t._graphicObject._scalePoints);i.position=s[o]}else if(2===e){var l=t._graphicObject._scalePoints[o],u=WebGLPlot.Cartesian3.fromDegrees(l.x,l.y,l.z);i.position=u,t._graphicObject._isScalePtModify=!1}}else if(r===_0x9797a1.AlgoMovePt){if(!(n instanceof _0x23de81))return;t.getCtrlPt(r,o).position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z);for(var c=n.x-t.redPntPos.x,h=n.y-t.redPntPos.y,d=0;d<t._graphicObject.localPoints.length;++d){var f=t._graphicObject.localPoints[d];t._graphicObject.localPoints[d]=new WebGLPlot.Cartesian3(f.x+c,f.y+h,f.z)}t._graphicObject._isScalePtModify=!1,t.redPntPos.x=n.x,t.redPntPos.y=n.y}t._graphicObject._initialize=!1}}function _0x567f36(e,t,i){if(i instanceof _0x23de81&&e._graphicObject&&e._graphicObject.annotationArray){var n=0,r=0;e._graphicObject.code;var o=e._graphicObject.symbolType;if(_0x2909c1.isSymbolDot(o)||t.type!==_0x9797a1.AlgoMovePt){if(!_0x2909c1.isSymbolDot(o)&&o!==_0x1c668c.SYMBOL_TEXT||t.type!==_0x9797a1.LocationPt)return;n=i.x-e._graphicObject.localPoints[t.index].x,r=i.y-e._graphicObject.localPoints[t.index].y}else n=i.x-e.redPntPos.x,r=i.y-e.redPntPos.y;for(var a=0;a<e._graphicObject.annotationArray.length;a++){var s=e._graphicObject.annotationArray[a];s._localPoint.x+=n,s._localPoint.y+=r,s._localPoint.z=i.z}}}function _0x144858(e,t,i,n){if(WebGLPlot.defined(n)&&t._graphicObject){if(WebGLPlot.defined(i.index)){_0x567f36(t,i,n);var r=t._graphicObject.symbolType;t._graphicObject.code,_0x2909c1.isSymbolDot(r)||r===_0x1c668c.SYMBOL_TEXT?_0x2329f1(e,t,i,n):_0x202fe6(e,t,i,n)}else if(t._graphicObject.annotationArray.length>0){var o=t._graphicObject.annotationArray[i.annotationIndex];t.editHeightMode?_0x12775c(t,o,i,n):n instanceof _0x23de81&&(o._localPoint=n,i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z))}0===e&&t.isShiftPress?t.editHeightMode=!0:2===e&&(t._graphicObject._initialize=!1)}}function _0x5f2d78(e){var t=[];if(!WebGLPlot.defined(e)||0===e.length)return t;for(var i=0;i<e.length;++i){var n=e[i];t.push(n.x),t.push(n.y),t.push(0)}return WebGLPlot.Cartesian3.fromDegreesArrayHeights(t)}function _0x5ddfa0(e,t,i,n){if(t.editHeightMode){var r=1,o=t._scene,a=WebGLPlot.SceneTransforms.transformWindowToDrawingBuffer(o,n);a.y=o.drawingBufferHeight-a.y;var s=WebGLPlot.Cartesian3.fromDegrees(t.startPoint.x,t.startPoint.y,0),l=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(o,s),u=_0x841f89.getAltitudeByLogical(s,a,o);if(!WebGLPlot.defined(u))return;l.y<n.y&&(r=-1);var c=WebGLPlot.Cartesian3.distance(s,u)*r,h=new _0x23de81(t.startPoint.x,t.startPoint.y,c);t._graphicObject instanceof _0x8c2e6e&&t._graphicObject.setOffset(h,!0),i.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z)}else{if(!(n instanceof _0x23de81))return;var d=WebGLPlot.Cartographic.fromCartesian(i.position),f=new _0x23de81(WebGLPlot.CesiumMath.toDegrees(d.longitude),WebGLPlot.CesiumMath.toDegrees(d.latitude),d.height),p=new _0x23de81(n.x-f.x,n.y-f.y,n.z-f.z);t._graphicObject instanceof _0x8c2e6e&&t._graphicObject.setOffset(p),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)}}_0x332745(),_0x841f89.prototype.createCtrlPoint=function(e,t){if(WebGLPlot.defined(e)){var i=this;this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t){i.isShiftPress&&(i.editHeightMode=!0),_0x144858(0,i,e,t),_0x23af04(i,e,!1)},onDrag:function(e,t){_0x144858(1,i,e,t)},onDragEnd:function(t,n){_0x144858(2,i,t,n),i.createCtrlPoints(i._graphicObject),i.handle._featureModifiedEvent.raiseEvent(e),_0x5ac1e1.getInstance().symbolModified.raiseEvent(e),t.type===_0x9797a1.LocationPt&&i.handle._featureDragEvent.raiseEvent(i._graphicObject)}}},e.code;var n=e.symbolType,r=null,o=new WebGLPlot.Cartesian3(0,0,0),a=[];if(t===_0x9797a1.LocationPt)r=this.positionPointIconUrl,0===e.libID&&_0x1c668c.SYMBOL_REGULARPOLYGON===e.code?(a.push(e.localPoints[0]),a.push(e.localPoints[e.localPoints.length-1]),this.isogon=!0):0===e.libID&&_0x1c668c.SYMBOL_TEXT===e.code?a.push(e.localPoints[0]):a=e.localPoints;else if(t===_0x9797a1.ScalePt)r=this.scalePointIconUrl,_0x2909c1.isSymbolDot(n)?(o=i.getSaclePtOffset(e),a=e.localPoints):n!==_0x1c668c.SYMBOL_DOT&&n!==_0x1c668c.SYMBOL_TEXT&&(a=e._scalePoints);else if(t===_0x9797a1.AlgoMovePt){r=this.anchorPointIconUrl,a.push(i.computeRedPoint(e));var s=i.computeRedPoint(e);i.redPntPos=s}var l=Number.MIN_VALUE;this._scene.globe.depthTestAgainstTerrain&&(l=Number.MAX_VALUE);for(var u=0;u<a.length;++u){(void 0===a[u].z||isNaN(a[u].z))&&(a[u].z=0);var c={show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(a[u].x,a[u].y,a[u].z),scale:2,image:r,id:e.id,disableDepthTestDistance:l};if(e._sizeInMeters?c.eyeOffset=o:c.pixelOffset=o,(c=this._ctrlPoints.add(c)).index=u,c.type=t,c.SymbolType=_0x1c668c.SYMBOL_UNKNOW,e._sizeInMeters)c.eyeOffsetX=o.x,c.eyeOffsetY=o.y;else{if(void 0===o)return;c.pixelOffsetX=o.x,c.pixelOffsetY=o.y}this.addCallback(c,i.ctrlPointCallBack)}}},_0x841f89.prototype.createCtrlPoints=function(e){if(this.removeAll(),e&&this.handle._plottingLayer._isEditable){this._graphicObject=e;var t=e.symbolType;t===_0x1c668c.SYMBOL_DOT&&e.showMode===_0x2bcc5b.Marker||(this.createCtrlPoint(e,_0x9797a1.LocationPt),this.createCtrlPoint(e,_0x9797a1.ScalePt),!_0x2909c1.isSymbolDot(e.symbolType)&&t!==_0x1c668c.SYMBOL_TEXT&&this.createCtrlPoint(e,_0x9797a1.AlgoMovePt),this.createAnnotationArrayCtrlPoints(e))}},_0x841f89.prototype.createAnnotationArrayCtrlPoints=function(e){if(e&&e.annotationArray.length>0)for(var t=0;t<e.annotationArray.length;t++){var i=e.annotationArray[t];this.createAnnotationCtrlPoint(i,t)}},_0x841f89.prototype.createAnnotationCtrlPoint=function(e,t){if(this._graphicObject){var i=e._localPoint,n=this._ctrlPoints.add({show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(i.x,i.y,i.z),scale:2,image:this.scalePointIconUrl,id:this._graphicObject.id,horizontalOrigin:WebGLPlot.HorizontalOrigin.LEFT});n.annotationIndex=t,n.type=_0x9797a1.LocationPt,n.SymbolType=_0x1c668c.SYMBOL_UNKNOW,this.addCallback(n,this.ctrlPointCallBack)}},_0x841f89.prototype.addCallback=function(e,t){var i=this;t.dragHandlers&&(_0x156f5e(e,"LEFT_DOWN",(function(n,r){function o(n,r){_0x2909c1.screenSpaceCameraController(i._scene,!1),void 0!==e.index&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(n,r),void 0!==e.annotationIndex&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(n,r)}function a(n,o){r.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x2909c1.screenSpaceCameraController(i._scene,!0),void 0!==e.index&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(n,o),void 0!==e.annotationIndex&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(n,o)}r.setInputAction((function(t){if(i._graphicObject)if(i.editHeightMode||e.type===_0x9797a1.ScalePt&&_0x2909c1.isSymbolDot(i._graphicObject.symbolType))o(e,t.endPosition);else{var n=_0x2909c1.getPosition(i._scene,t.endPosition);o(e,n)}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.setInputAction((function(t){i.editHeightMode||e.type===_0x9797a1.ScalePt&&_0x2909c1.isSymbolDot(i._graphicObject.symbolType)?a(e,t.position):a(e,_0x2909c1.getPosition(i._scene,t.position))}),WebGLPlot.ScreenSpaceEventType.LEFT_UP),void 0!==e.index&&t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(e,n),void 0!==e.annotationIndex&&t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(e,n)})),_0x156f5e(e,"mouseMove",(function(t){i.editHeightMode||(i.isShiftPress&&0===e.type?i._scene._canvas.style.cursor="n-resize":i._scene._canvas.style.cursor="default")})),_0x156f5e(e,"mouseOut",(function(e){i.editHeightMode||(i._scene._canvas.style.cursor="")})))},_0x841f89.prototype.getSaclePtOffset=function(e){var t,i,n=e.billboardBoundsLineWidth,r=new WebGLPlot.Cartesian3(0,0,0);if(e.showMode===_0x2bcc5b.Picture){let o=e._dotGrid._canvas.getContext("2d").measureText(e._textContent).width;t=(o>e.pictureSymbolSize.x?o:e.pictureSymbolSize.x)+n,i=e.pictureSymbolSize.y+n,e.sizeInMeters&&(i*=-1,t*=e.billboard.scale,i*=e.billboard.scale),r=new WebGLPlot.Cartesian3(t/2*e.scale,-i*e.scale,0)}else if(e.showMode===_0x2bcc5b.Grid){if(null===e._dotGrid)return;t=e._dotGrid.selectedRectBounds.x+e._dotGrid.selectedRectBounds.width-e._dotGrid._canvas.width/2,i=e._dotGrid._canvas.height-e._dotGrid.selectedRectBounds.y,i-=e._dotGrid._OffsetText_Down,e.sizeInMeters&&(i*=-1,t*=e.billboard.scale/e.scale,i*=e.billboard.scale/e.scale),r=new WebGLPlot.Cartesian3(t,-i,0)}return r},_0x841f89.prototype.getCtrlPt=function(e,t){for(var i=0;i<this._ctrlPoints.length;i++){var n=this._ctrlPoints.get(i);if(n.type===e&&t===n.index)return this._ctrlPoints.get(i)}return null},_0x841f89.prototype.removeAll=function(){this._ctrlPoints.removeAll(),this._graphicObject=null},_0x841f89.prototype.modifyDotSymbolSize=function(e,t){if(this._graphicObject){if(!WebGLPlot.defined(e))return this._graphicObject.billboard.scale;var i=this._scene,n=this._graphicObject.localPoints[0],r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)),o=_0x2909c1.distance(r,t);return _0x2909c1.distance(r,e)/o}},_0x841f89.prototype.addListener=function(){var e=this;e.handle._featureRemoveEvent.addEventListener((function(){WebGLPlot.defined(e._ctrlPoints)&&e._ctrlPoints.removeAll()})),e.shiftKeyDownFun=function(t){72===t.keyCode&&(e.isShiftPress=!0)},e.shiftKeyUpFun=function(t){72===t.keyCode&&(e.isShiftPress=!1,e.editHeightMode=!1)},document.addEventListener("keydown",e.shiftKeyDownFun),document.addEventListener("keyup",e.shiftKeyUpFun)},_0x841f89.prototype.removeListener=function(){document.removeEventListener("keydown",this.shiftKeyDownFun),document.removeEventListener("keyup",this.shiftKeyUpFun)},_0x841f89.getAltitudeByLogical=function(e,t,i){var n=WebGLPlot.Cartographic.fromCartesian(e);n.height+=1,n=WebGLPlot.Cartesian3.fromRadians(n.longitude,n.latitude,n.height);var r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,e),o=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(o){var a;o.x===r.x?(-1,a=0):o.y===r.y?(0,a=-1):a=-1/((o.y-r.y)/(o.x-r.x));var s=i._view.viewport,l={left:s.x,right:s.x+s.width,bottom:s.y,top:s.y+s.height},u=_0x2909c1.intersectionOfRectByPointslopeline(t,a,l),c=u[0],h=u[1],d=new WebGLPlot.Cartesian3,f=new WebGLPlot.Cartesian3;WebGLPlot.SceneTransforms.drawingBufferToWgs84Coordinates(i,c,1,d),WebGLPlot.SceneTransforms.drawingBufferToWgs84Coordinates(i,h,1,f);var p=i.camera.position,_=new WebGLPlot.Cartesian3;WebGLPlot.Cartesian3.subtract(e,n,_);var m=new WebGLPlot.Cartesian3;WebGLPlot.Cartesian3.negate(_,m),WebGLPlot.Cartesian3.normalize(_,_),WebGLPlot.Cartesian3.normalize(m,m);var g=new WebGLPlot.Ray(e,_),x=new WebGLPlot.Ray(e,m),y=WebGLPlot.IntersectionTests.rayTriangleParametric(g,d,f,p);if(y)return WebGLPlot.Ray.getPoint(g,y);if(y=WebGLPlot.IntersectionTests.rayTriangleParametric(x,d,f,p))return WebGLPlot.Ray.getPoint(x,y)}},_0x841f89.prototype.computeRedPoint=function(e){if(WebGLPlot.defined(e)||"function"!==e.computeBounds){var t=e.computeBounds(),i=this.pixelDisToRealDis(t,3);return new WebGLPlot.Cartesian3(t.x,t.y-i,t.z)}},_0x841f89.prototype.pixelDisToRealDis=function(e,t){var i=this._scene,n=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(!WebGLPlot.defined(r))return 0;var o=new WebGLPlot.Cartesian3(r.x+t,r.y,0),a=_0x2909c1.getPosition(i,r),s=_0x2909c1.getPosition(i,o);return _0x2909c1.distance(a,s)},_0x841f89.prototype.createGroupObjectCtrlPoint=function(e,t,i){if(WebGLPlot.defined(e)){this._graphicObject=e;var n=this;this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t){n.isShiftPress&&(n.editHeightMode=!0),n.handle.removeGroupObjectEditObject(),_0x5ddfa0(0,n,e,t)},onDrag:function(e,t){_0x5ddfa0(1,n,e,t)},onDragEnd:function(t,i){_0x5ddfa0(2,n,t,i),n.handle._featureModifiedEvent.raiseEvent(e),_0x5ac1e1.getInstance().symbolModified.raiseEvent(e),n.handle.drawGroupObjectEditObject(n._graphicObject,!0)}}};var r=null;i===_0x9797a1.LocationPt&&(r=this.positionPointIconUrl);var o=Number.MIN_VALUE;this._scene.globe.depthTestAgainstTerrain&&(o=Number.MAX_VALUE),(void 0===t.z||isNaN(t.z))&&(t.z=0);var a={show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z),scale:2,image:r,id:e.id,disableDepthTestDistance:o};(a=this._ctrlPoints.add(a)).index=0,a.type=i,a.SymbolType=_0x1c668c.SYMBOL_UNKNOW,this.addCallback(a,n.ctrlPointCallBack)}};var _0x4c5f88=(_0x47f66f=!0,function(e,t){var i=_0x47f66f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47f66f=!1,i}),_0x5c8396=_0x4c5f88(void 0,(function(){return _0x5c8396.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c8396).search("(((.+)+)+)+$")})),_0x47f66f;function _0xd9687d(e,t){this._scene=e,this.handle=t,this.model=null,this.fixedFrameTransform=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("north","west"),this.initCallBack()}function _0x379a7e(e,t,i){e[t]=i}function _0x4a0f88(e){e.destoryBoundsCtrl(),e.model?(e.createModelCtrl(),e.geoEdit._modelScale.x=e.model.scale):e.vector&&e.createVectorCtrl(e)}function _0x30be08(e){e.scaleLeft1.show=!1,e.rotateCircle.show=!1,e.heightCtrl.show=!1,e.boxBounds.show=!1,e.moveFillCtrl.show=!1}function _0x30e610(e,t,i,n){var r=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot.HeadingPitchRoll,a=Math.PI/180;return o.pitch=a*t.x,o.roll=a*t.y,o.heading=a*t.z,WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot.Ellipsoid.WGS84,n,i),i}function _0x3f61be(e,t,i,n){var r=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot.HeadingPitchRoll,a=Math.PI/180;return o.pitch=0,o.roll=0,o.heading=a*t.z+90*a,WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot.Ellipsoid.WGS84,n,i),i}function _0x53f636(e,t,i){if(WebGLPlot.defined(i)&&_0x1c6256(t)){var n=e._scene;if("heightCtrl"===t._instanceIds[0]){_0x30be08(e);var r=_0x2909c1.pixelHeightToRealHeight(n,e.pixeStartPoint,i);e.geoEdit.localPoints[0].z=e.startPoint.z+r;var o=new _0x23de81(e.geoEdit.localPoints[0].x,e.geoEdit.localPoints[0].y,e.geoEdit.localPoints[0].z);e.geoEdit.localPoints[0]=o,e.model&&_0x30e610(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform),e.vector&&e.geoEdit.initSymbol(!0)}if("moveFillCtrl"===t._instanceIds[0]&&(_0x30be08(e),e.geoEdit.localPoints[0].x=i.x,e.geoEdit.localPoints[0].y=i.y,e.model?_0x30e610(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform):e.vector&&e.geoEdit.initSymbol(!0)),"rotateCircle"===t._instanceIds[0]){var a=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(n,e.rotateCircleCenter),s=i,l=_0x2909c1.radian(a,e.rotateStartPosition),u=_0x2909c1.radian(a,s)-l;e.model&&(e.geoEdit._modelRotate.z=e.startRotate+180*u/Math.PI,_0x30e610(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform)),e.vector&&(e.geoEdit.vectorRotate.z=e.startRotate+180*u/Math.PI,e.geoEdit.initSymbol(!0))}if("ScaleLeft1_1"===t._instanceIds[0]){var c=e.geoEdit.localPoints[0],h=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(n,WebGLPlot.Cartesian3.fromDegrees(c.x,c.y,c.z)),d=_0x2909c1.distance(h,e.startSCalePtn),f=_0x2909c1.distance(h,i)/d;e.model&&(e.geoEdit._model.scale=e.startScale*f),e.vector&&(e.geoEdit._vectorScale=e.startScale*f,e.geoEdit.initSymbol(!0))}}}function _0x1c6256(e){return!!(e&&e._instanceIds&&e._instanceIds.length>0)}_0x5c8396(),_0xd9687d.prototype.initCallBack=function(){this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t,i,n){if("rotateCircle"===t._instanceIds[0]){if(!i)return;e.rotateStartPosition=n,e.startRotate=e.geoEdit._modelRotate.z}"ScaleLeft1_1"===t._instanceIds[0]&&(e.startSCalePtn=n,e.model?e.startScale=e.geoEdit._modelScale.x:e.vector&&(e.startScale=e.geoEdit.vectorScale))},onDrag:function(e,t,i){_0x53f636(e,t,i)},onDragEnd:function(e,t,i){_0x1c6256(t)&&"moveFillCtrl"===t._instanceIds[0]&&e.handle._featureDragEvent.raiseEvent(e.geoEdit),_0x4a0f88(e),e.geoEdit._initialize=!1,e.geoEdit.__setEffectParameter({point:e.geoEdit.localPoints[0],rotate:e.geoEdit.modelRotate}),e.handle._featureModifiedEvent.raiseEvent(e.geoEdit),_0x5ac1e1.getInstance().symbolModified.raiseEvent(e.geoEdit)}}}},_0xd9687d.prototype.addCallback=function(e,t){var i=this;t.dragHandlers&&(_0x379a7e(e,"LEFT_DOWN",(function(n,r){function o(e,n){_0x2909c1.screenSpaceCameraController(i._scene,!1),void 0!==e.type&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(i,e,n)}if(r.setInputAction((function(t){if(_0x1c6256(e))if("heightCtrl"===e._instanceIds[0]||"ScaleLeft1_1"===e._instanceIds[0]||"rotateCircle"===e._instanceIds[0])o(e,t.endPosition);else{var n=_0x2909c1.getPosition(i._scene,t.endPosition);o(e,n)}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.setInputAction((function(n){var o;!_0x1c6256(e)||(o=_0x2909c1.getPosition(i._scene,n.position),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x2909c1.screenSpaceCameraController(i._scene,!0),void 0!==e.type&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(i,e,o))}),WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x1c6256(e)){if("rotateCircle"===e._instanceIds[0]||"ScaleLeft1_1"===e._instanceIds[0]){var a=_0x2909c1.getPosition(i._scene,n);t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(i,e,a,n)}if("heightCtrl"===e._instanceIds[0]){var s=i.geoEdit.localPoints[0].clone();i.startPoint=s,i.pixeStartPoint=n}}})),_0x379a7e(e,"mouseMove",(function(t){if(i.editHeightMode||!_0x1c6256(e))return;i._scene._canvas.style.cursor="default";var n=null;if(n=e.getGeometryInstanceAttributes("heightCtrl"))return i._scene._canvas.style.cursor="n-resize",void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)));if(n=e.getGeometryInstanceAttributes("rotateCircle"))return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)));n=e.getGeometryInstanceAttributes("ScaleLeft1_1");let r=e.getGeometryInstanceAttributes("ScaleLeft1_2");return n&&r?(r.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)),void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)))):void 0})),_0x379a7e(e,"mouseOut",(function(t){if(i.editHeightMode)return;i._scene._canvas.style.cursor="";var n=e.getGeometryInstanceAttributes("heightCtrl");if(n)return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,0,1,1)));if(n=e.getGeometryInstanceAttributes("rotateCircle"))return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,1,0,1)));n=e.getGeometryInstanceAttributes("ScaleLeft1_1");let r=e.getGeometryInstanceAttributes("ScaleLeft1_2");return n?(r.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,1,0,1)),void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,1,0,1)))):void 0})))},_0xd9687d.prototype.hideModeEditBouds=function(e){!WebGLPlot.defined(this.boxBounds)||null===this.boxBounds||(this.scaleLeft1.show=e,this.rotateCircle.show=e,this.heightCtrl.show=e,this.boxBounds.show=e,this.moveFillCtrl.show=e)},_0xd9687d.prototype.createModeEditBouds=function(e){e&&!WebGLPlot.defined(this.boxBounds)||e&&WebGLPlot.defined(this.boxBounds)?this.createModelCtrl():e||this.destoryBoundsCtrl()},_0xd9687d.prototype.createModelCtrl=function(){if(this.vector=null,this.handle._graphicObject){this.geoEdit=this.handle._graphicObject;var e=this.geoEdit.localPoints[0];this.model=this.geoEdit._model,this.modelMatrix=this.model.modelMatrix;var t=this.model._boundingSphere.center;this.centerMax=t.x>t.y?t.x:t.y,this.centerMax=(this.centerMax>t.z?this.centerMax:t.z)*this.model.scale,this.modelRadius=this.model._initialRadius*this.model.scale;var i=new WebGLPlot.Cartesian3(this.modelRadius+this.centerMax,this.modelRadius+this.centerMax,this.modelRadius+this.centerMax),n=new _0x23de81(e.x,e.y,e.z),r=_0x2909c1.getModelMinAndMaxCorner(this.model),o=this.model.scale;if(0!==this.geoEdit._modelRotate.x||0!==this.geoEdit._modelRotate.y){var a=Math.abs(this.model._maxCorner.x-r.minCorner.x),s=Math.abs(this.model._maxCorner.y-r.minCorner.y),l=Math.abs(this.model._maxCorner.z-r.minCorner.z),u=a>s?a:s,c=a<s?a:s;o*=(u>l?u:l)/(c<l?c:l)}var h=Math.abs(r.minCorner.z)>Math.abs(r.minCorner.x)?r.minCorner.z:r.minCorner.x,d=Math.abs(r.maxCorner.z)>Math.abs(r.maxCorner.x)?r.maxCorner.z:r.maxCorner.x,f=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(h,h,r.minCorner.y),o,new WebGLPlot.Cartesian3),p=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(d,d,r.maxCorner.y),o,new WebGLPlot.Cartesian3),_=new WebGLPlot.AxisAlignedBoundingBox(f,p);this.BoundingBoxCenter=_.center,this.boxBounds=this.createBoxGeometry(n,i,_);var m=this.getLinePts(e,p,f,this.boxModelMatrix);if(this.moveFillCtrl=this.createFillCtrl(m.moveFillCtrl,new WebGLPlot.Color(1,1,0,.3),"moveFillCtrl"),this.scaleLeft1=this.createScaleLeft1(m.left1[0],m.left1[1]),this.rotateCircle=this.createRotateCircle(m.rotateCircle),this.heightCtrl=this.createHeightCtrl(m.heightCtrl),!this.handle._plottingLayer._isEditable)return void(this.boxBounds=this._scene._primitives.add(this.boxBounds));this.scaleLeft1=this._scene._primitives.add(this.scaleLeft1),this.rotateCircle=this._scene._primitives.add(this.rotateCircle),this.heightCtrl=this._scene._primitives.add(this.heightCtrl),this.moveFillCtrl=this._scene._primitives.add(this.moveFillCtrl),this.boxBounds=this._scene._primitives.add(this.boxBounds),this.addCallback(this.scaleLeft1,this.ctrlPointCallBack),this.addCallback(this.rotateCircle,this.ctrlPointCallBack),this.addCallback(this.heightCtrl,this.ctrlPointCallBack),this.addCallback(this.moveFillCtrl,this.ctrlPointCallBack)}},_0xd9687d.prototype.createBoxGeometry=function(e,t,i){if(null===e||null===t)return null;var n,r=[];return this.model?this.boxModelMatrix=_0x3f61be(e,this.geoEdit._modelRotate,this.modelMatrix.clone(),this.fixedFrameTransform):this.vector?this.boxModelMatrix=_0x3f61be(e,this.geoEdit.vectorRotate,this.modelMatrix.clone(),this.fixedFrameTransform):this.boxModelMatrix=_0x3f61be(e,new WebGLPlot.Cartesian3(0,0,0),new WebGLPlot.Matrix4,this.fixedFrameTransform),n=WebGLPlot.defined(i)?WebGLPlot.BoxOutlineGeometry.fromAxisAlignedBoundingBox(i):WebGLPlot.BoxOutlineGeometry.fromDimensions({dimensions:t}),r.push(new WebGLPlot.GeometryInstance({geometry:n,modelMatrix:this.boxModelMatrix,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(WebGLPlot.Color.YELLOW)}})),new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.PerInstanceColorAppearance({flat:!0,translucent:!1,renderState:{lineWidth:Math.min(3,this._scene.maximumAliasedLineWidth)}})})},_0xd9687d.prototype.createScaleLeft1=function(e,t){var i=[],n=new WebGLPlot.Color(0,1,0);return i.push(this.createLineGometryInstance(e,6,n,"ScaleLeft1_1")),i.push(this.createLineGometryInstance(t,6,n,"ScaleLeft1_2")),this.createPrimitive(i)},_0xd9687d.prototype.createRotateCircle=function(e){var t=[],i=new WebGLPlot.Color(1,1,0);return t.push(this.createLineGometryInstance(e,3,i,"rotateCircle")),this.createPrimitive(t)},_0xd9687d.prototype.createHeightCtrl=function(e){var t=[],i=new WebGLPlot.Color(0,0,1);return t.push(this.createLineGometryInstance(e,5,i,"heightCtrl")),this.createPrimitive(t)},_0xd9687d.prototype.createPrimitive=function(e){var t=WebGLPlot.Material.fromType("Color",{color:new WebGLPlot.Color(1,1,0,1),fill:!0}),i=new WebGLPlot.PolylineColorAppearance({translucent:!0,closed:!0,material:t}),n=new WebGLPlot.Primitive({geometryInstances:e,appearance:i,asynchronous:!1,compressVertices:!0,show:!0});return n.type="ModelEdit",n.SymbolType=1,n},_0xd9687d.prototype.createLineGometryInstance=function(e,t,i,n){var r=new WebGLPlot.PolylineGeometry({positions:e,width:t}),o=WebGLPlot.PolylineGeometry.createGeometry(r);return i=WebGLPlot.ColorGeometryInstanceAttribute.fromColor(i),new WebGLPlot.GeometryInstance({geometry:o,id:n,attributes:{color:i}})},_0xd9687d.prototype.getLinePts=function(e,t,i,n){var r=[],o=[],a=[],s=[],l=0,u=0,c=0,h=0;WebGLPlot.defined(t)&&WebGLPlot.defined(i)?(l=Math.abs(t.x-i.x)/2,u=Math.abs(t.y-i.y)/2,c=i.z<=0?t.z:t.z-i.z,h=l>u?u:l):(h=(this.centerMax+this.modelRadius)/2,c=1.5*this.centerMax+this.modelRadius/2),c=Math.abs(c),this.rotateCircleCenter=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,c+e.z);var d=this.computeHeightLines(l,u,h,c,n);a=a.concat(d);var f=this.computeScaleLines(l,u,h,c,n);r.push(f[0]),r.push(f[1]),r.push(f[2]),o.push(f[3]),o.push(f[4]),this.scaleLeft1Pnt=f[1],this.rotateCircle=this.computeRotateCircle(h,c,n);var p=this.computeMoveFill(h,c,n);return s.push(p[0]),s.push(p[1]),s.push(p[2]),s.push(p[3]),{left1:[r,o],rotateCircle:this.rotateCircle,heightCtrl:a,moveFillCtrl:s}},_0xd9687d.prototype.createFillCtrl=function(e,t,i){var n=WebGLPlot.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0}),r=WebGLPlot.PolygonGeometry.createGeometry(n),o=new WebGLPlot.GeometryInstance({geometry:r,id:i}),a=new WebGLPlot.Material.fromType("Color",{color:t,fill:!0}),s=new WebGLPlot.Primitive({geometryInstances:[o],appearance:new WebGLPlot.EllipsoidSurfaceAppearance({material:a,aboveGround:!0}),show:this._display,asynchronous:!1});return s.type="ModelEdit",s.SymbolType=1,s},_0xd9687d.prototype.getCartesian3ByLength=function(e,t,i,n){var r,o,a,s,l;(!WebGLPlot.defined(t)||!WebGLPlot.defined(i)||!WebGLPlot.defined(n))&&(t=0,i=0,n=0),r=Math.sqrt(e.x*e.x+e.y*e.y),o=Math.sqrt(r*r+e.z*e.z);var u=Math.acos((o*o+r*r-e.z*e.z)/(2*o*r));o+=n,l=Math.sin(u)*o;var c=Math.cos(u)*o;return a=c*e.x/r,s=c*e.y/r,new WebGLPlot.Cartesian3(a,s,l)},_0xd9687d.prototype.computeHeightLines=function(e,t,i,n,r){var o=[],a=new WebGLPlot.Cartesian3,s=new WebGLPlot.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot.Cartesian3.fromDegrees(this.geoEdit.localPoints[0].x,this.geoEdit.localPoints[0].y,this.geoEdit.localPoints[0].z),h=new WebGLPlot.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.model?h.heading=d*this.geoEdit._modelRotate.z:h.heading=d*this.geoEdit.vectorRotate.z;var f=WebGLPlot.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1*l,1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1*l,1,.7*u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),o},_0xd9687d.prototype.computeScaleLines=function(e,t,i,n,r){var o=[],a=new WebGLPlot.Cartesian3,s=new WebGLPlot.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot.Cartesian3.fromDegrees(this.geoEdit.localPoints[0].x,this.geoEdit.localPoints[0].y,this.geoEdit.localPoints[0].z),h=new WebGLPlot.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.model?h.heading=d*this.geoEdit._modelRotate.z:h.heading=d*this.geoEdit.vectorRotate.z;var f=WebGLPlot.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-.8,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.8*l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,.8*u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),o},_0xd9687d.prototype.computeMoveFill=function(e,t,i){var n=[],r=new WebGLPlot.Cartesian3,o=new WebGLPlot.Cartesian3,a=t/e;return o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.3,.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-.3,.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-.3,-.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.3,-.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),n},_0xd9687d.prototype.computeRotateCircle=function(e,t,i){for(var n=[],r=new WebGLPlot.Cartesian3,o=new WebGLPlot.Cartesian3,a=t/e,s=_0x2909c1.calcCirclePts(1,new WebGLPlot.Cartesian3(0,0,0),72),l=0;l<s.length;l++)o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.8*s[l].x,.8*s[l].y,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z));return n},_0xd9687d.prototype.createVectorEditBouds=function(e){e&&!WebGLPlot.defined(this.boxBounds)?this.createVectorCtrl(this):e&&WebGLPlot.defined(this.boxBounds)?(_0x30be08(this),this.createVectorCtrl(this)):e||this.destoryBoundsCtrl()},_0xd9687d.prototype.destoryBoundsCtrl=function(){this.scaleLeft1&&(this.scaleLeft1.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.scaleLeft1),this.scaleLeft1=void 0),this.rotateCircle&&(this.rotateCircle.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.rotateCircle),this.rotateCircle=void 0),this.heightCtrl&&(this.heightCtrl.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.heightCtrl),this.heightCtrl=void 0),this.moveFillCtrl&&(this.moveFillCtrl.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.moveFillCtrl),this.moveFillCtrl=void 0),this.boxBounds&&(this.boxBounds.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.boxBounds),this.boxBounds=void 0)},_0xd9687d.prototype.createVectorCtrl=function(e){if(this.handle._graphicObject){this.model=null,this.geoEdit=this.handle._graphicObject;var t=this.geoEdit.localPoints[0];this.vector=this.geoEdit._dotVector,this.modelMatrix=this.vector.modelMatrix,this.centerMax=this.vector.vectorHeight/2,this.modelRadius=this.vector.vectorHeight/2;var i=new WebGLPlot.Cartesian3(e.modelRadius+this.centerMax,e.modelRadius+this.centerMax,e.modelRadius+this.centerMax),n=new _0x23de81(t.x,t.y,this.centerMax+t.z);e.boxBounds=e.createBoxGeometry(n,i);var r=_0x3f61be(t,this.geoEdit.vectorRotate,this.vector.modelMatrix.clone(),this.fixedFrameTransform),o=e.getLinePts(t,void 0,void 0,r);if(e.moveFillCtrl=e.createFillCtrl(o.moveFillCtrl,new WebGLPlot.Color(1,1,0,.3),"moveFillCtrl"),e.scaleLeft1=e.createScaleLeft1(o.left1[0],o.left1[1]),e.rotateCircle=e.createRotateCircle(o.rotateCircle),e.heightCtrl=e.createHeightCtrl(o.heightCtrl),!this.handle._plottingLayer._isEditable)return void(e.boxBounds=e._scene._primitives.add(e.boxBounds));e.scaleLeft1=e._scene._primitives.add(e.scaleLeft1),e.rotateCircle=e._scene._primitives.add(e.rotateCircle),e.heightCtrl=e._scene._primitives.add(e.heightCtrl),e.moveFillCtrl=e._scene._primitives.add(e.moveFillCtrl),e.boxBounds=e._scene._primitives.add(e.boxBounds),e.addCallback(e.scaleLeft1,e.ctrlPointCallBack),e.addCallback(e.rotateCircle,e.ctrlPointCallBack),e.addCallback(e.heightCtrl,e.ctrlPointCallBack),e.addCallback(e.moveFillCtrl,e.ctrlPointCallBack)}};var _0x2a4c83=(_0x5f4e2f=!0,function(e,t){var i=_0x5f4e2f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f4e2f=!1,i}),_0x4d2d95=_0x2a4c83(void 0,(function(){return _0x4d2d95.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d2d95).search("(((.+)+)+)+$")})),_0x5f4e2f;function _0x4ea0dc(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("plottingLayer is required!");this._scene=e,this._plottingLayer=t,this._active=!1,t._plottingEdit=this,this.CtrlPosition=new _0x841f89(e,this),this.ModelEditControl=new _0xd9687d(e,this),this.pasteGeoJson=null,this.initialize()}function _0x14111a(e,t,i,n){if(i&&i._plottingLayer&&i._plottingLayer._scene&&i._plottingLayer._isSelected&&t){if("LEFT_DOWN"!==e||WebGLPlot.defined(i._graphicObject)){var r=[],o=[];o=void 0===n?i._scene.drillPick(t,void 0,10,10):i._scene.drillPick(t,void 0,n.width,n.height);for(var a=[],s=0;s<o.length;s++)if(o[s]&&o[s].id&&null!==o[s].primitive&&WebGLPlot.defined(o[s].primitive.SymbolType)){var l=i._plottingLayer.getFeatureByUuid(o[s].id);l&&a.push(l),r.push(o[s])}if(void 0!==n)return a;for(var u=!1,c=0;c<r.length;c++)if("heightCtrl"===r[c].id){u=!0;break}for(s=0;s<r.length;s++){var h,d=r[s];if(d&&d.primitive&&d.primitive[e]){if(0===d.primitive.type&&i.CtrlPosition.isShiftPress&&(void 0!==d.primitive.index?i._graphicObject instanceof _0x8c2e6e?(h=i._graphicObject._centerPt3D,WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h):(h=i._graphicObject.localPoints[d.primitive.index],WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h):void 0!==d.primitive.annotationIndex&&(h=i._graphicObject.annotationArray[d.primitive.annotationIndex].localPoint,WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h)),!u){d.primitive[e](t,i._CtrlPointhandler);break}if("heightCtrl"===d.id){d.primitive[e](t,i._CtrlPointhandler);break}}else if(d&&d.primitive&&d.id&&"LEFT_CLICK"===e){var f=i._plottingLayer.getFeatureByUuid(d.id);if(f instanceof _0x8c2e6e)return i.releaseSelection(),i.drawGroupObjectEditObject(f,!0),i._graphicObject=f,i._graphicObject._isSelected=!0,i._graphicObject._isEdit=!0,i._plottingLayer.setSelectedFeatureByID(f._id),void i._featureSelectedEvent.raiseEvent(i._graphicObject);if(WebGLPlot.defined(i._graphicObject)){if(i._graphicObject.id===d.id)return;if(i.unSelection(!0),i._graphicObject=i._plottingLayer.getFeatureByUuid(d.id),!WebGLPlot.defined(i._graphicObject))return;return void i.DoSelectObjectEdit(f)}if(!f)continue;return i._graphicObject=f,void i.DoSelectObjectEdit(f)}}if("LEFT_CLICK"===e&&(!WebGLPlot.defined(r)||0===r.length)&&WebGLPlot.defined(i._graphicObject)){const e=i._graphicObject.id;i.unSelection(!0);var p=i._featureReleaseEvent;let t=i._plottingLayer.getFeatureByUuid(e);p.raiseEvent(t)}}}else i.releaseSelection()}function _0x45026d(e){const t=_0xf6490f(e.keyCode);let i=_self._graphicObject;if(i&&(i.showMode===_0x2bcc5b.Marker||i.code===_0x1c668c.SYMBOL_Model))switch(t){case"Z":i.modelScale*=1.1;break;case"X":i.modelScale*=.9;break;case"W":i.modelRotate.y+=1,i._initialize=!1;break;case"S":i.modelRotate.y-=1,i._initialize=!1;break;case"A":i.modelRotate.z-=1,i._initialize=!1;break;case"D":i.modelRotate.z+=1,i._initialize=!1;break;case"Q":i.modelRotate.x+=1,i._initialize=!1;break;case"E":i.modelRotate.x-=1,i._initialize=!1}}function _0xf6490f(e){switch(e){case"Z".charCodeAt(0):return"Z";case"X".charCodeAt(0):return"X";case"W".charCodeAt(0):case 38:return"W";case"S".charCodeAt(0):case 40:return"S";case"D".charCodeAt(0):case 39:return"D";case"A".charCodeAt(0):case 37:return"A";case"Q".charCodeAt(0):return"Q";case"E".charCodeAt(0):return"E";default:return}}_0x4d2d95(),_0x4ea0dc.prototype.initialize=function(){this._graphicObject=void 0,this._handler=new WebGLPlot.ScreenSpaceEventHandler(this._scene.canvas),this._ctrlPoints=new WebGLPlot.BillboardCollection,this._scene.primitives.add(this._ctrlPoints),this.positionPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointWhite_Go.png"),this.scalePointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointYellow_Go.png"),this.anchorPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointRed_Go.png"),this._featureSelectedEvent=new WebGLPlot.Event,this._featureModifiedEvent=new WebGLPlot.Event,this._featureReleaseEvent=new WebGLPlot.Event,this._featureRemoveEvent=new WebGLPlot.Event,this.isShiftPress=!1,this.shiftKeyDownFun=void 0,this.shiftKeyUpFun=void 0,this.editHeightMode=!1,this._CtrlPointhandler=new WebGLPlot.ScreenSpaceEventHandler(this._scene.canvas),this._featureLeftClickEvent=new WebGLPlot.Event,this._featureRightClickEvent=new WebGLPlot.Event,this._sceneLeftClickEvent=new WebGLPlot.Event,this._sceneRightClickEvent=new WebGLPlot.Event,this._featureDragEvent=new WebGLPlot.Event,this._featureDoubleClickEvent=new WebGLPlot.Event,this.CtrlPosition.addListener();let e=this;this._handler.setInputAction((function(t){!e._active||_0x14111a("LEFT_CLICK",t.position,e)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK);var t=null;this._handler.setInputAction((function(i){if(WebGLPlot.defined(e._graphicObject)&&(e._graphicObject.showMode===_0x2bcc5b.Vector||e._graphicObject.showMode===_0x2bcc5b.Marker)&&e._active){var n=e._scene.pick(i.endPosition);t&&(!n||t!==n.primitive)&&(!(t.isDestroyed&&t.isDestroyed())&&t.mouseOut(i.endPosition),t=null),n&&n.primitive&&((n=n.primitive).mouseOut&&(t=n),n.mouseMove&&n.mouseMove(i.endPosition))}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this._handler.setInputAction((function(t){!e._active||_0x14111a("LEFT_DOWN",t.position,e,void 0)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),this._handler28s=new WebGLPlot.ScreenSpaceEventHandler(e._scene.canvas),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),i?e._featureLeftClickEvent.raiseEvent(i,t.position):e._sceneLeftClickEvent.raiseEvent(t.position)}}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),i?e._featureRightClickEvent.raiseEvent(i,t.position):e._sceneRightClickEvent.raiseEvent(t.position)}}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),e._featureDoubleClickEvent.raiseEvent(i,t.position)}}),WebGLPlot.ScreenSpaceEventType.LEFT_DOUBLE_CLICK)},_0x4ea0dc.prototype.setPlottingLayer=function(e){return!!e&&(this.releaseSelection(),this._plottingLayer=e,e._plottingEdit=this,!0)},Object.defineProperties(_0x4ea0dc.prototype,{plottingLayer:{get:function(){return this._plottingLayer},set:function(e){e!==this._plottingLayer&&(this._plottingLayer=e)}},SelectedEvent:{get:function(){return this._featureSelectedEvent}},FeatureSelectedEvent:{get:function(){return this._featureSelectedEvent}},ModifiedEvent:{get:function(){return this._featureModifiedEvent}},FeatureModifiedEvent:{get:function(){return this._featureModifiedEvent}},UnSelectedEvent:{get:function(){return this._featureReleaseEvent}},RemoveFeatureEvent:{get:function(){return this._featureRemoveEvent}},FeatureRemoveEvent:{get:function(){return this._featureRemoveEvent}},FeatureLeftClickEvent:{get:function(){return this._featureLeftClickEvent}},FeatureRightClickEvent:{get:function(){return this._featureRightClickEvent}},SceneLeftClickEvent:{get:function(){return this._sceneLeftClickEvent}},SceneRightClickEvent:{get:function(){return this._sceneRightClickEvent}},FeatureDoubleClickEvent:{get:function(){return this._featureDoubleClickEvent}},FeatureDragEvent:{get:function(){return this._featureDragEvent}}}),_0x4ea0dc.prototype.unSelection=function(e){WebGLPlot.defined(this._graphicObject)&&e&&_0x5ac1e1.getInstance().symbolUnSelected.raiseEvent(this._graphicObject.id),this.releaseSelection(!1)},_0x4ea0dc.prototype.releaseSelection=function(e){WebGLPlot.defined(this._graphicObject)&&(this.clearAllEditCtrl(),e||(this._plottingLayer._selectedFeature=void 0))},_0x4ea0dc.prototype.clearAllEditCtrl=function(){WebGLPlot.defined(this._graphicObject)&&null!==this._graphicObject&&(this.CtrlPosition.removeAll(),this._graphicObject._initialize=!1,this._graphicObject._isSelected=!1,this._graphicObject instanceof _0x8c2e6e&&this.drawGroupObjectEditObject(this._graphicObject,!1),_0x2bcc5b.Marker===this._graphicObject.showMode&&this.drawModelEditObject(!1),_0x2bcc5b.Vector===this._graphicObject.showMode&&this.drawVectorEditObject(!1),this._graphicObject=null)},_0x4ea0dc.prototype.activate=function(){!this._plottingLayer||!this._plottingLayer._isSelected||this.isActive()||(this._active=!0)},_0x4ea0dc.prototype.pickRect=function(e,t){var i=t.x-e.x,n=t.y-e.y,r=(t.x+e.x)/2,o=(t.y+e.y)/2;return _0x14111a("LEFT_CLICK",new WebGLPlot.Cartesian2(r,o),this,{width:i,height:n})},_0x4ea0dc.prototype.DoSelectObject=function(e,t=!0){this._graphicObject=e,this._graphicObject._isEdit=!0,this._graphicObject._isSelected=!0,this._plottingLayer._selectedFeature=e,this._graphicObject._initialize=!1,t&&(this._featureSelectedEvent.raiseEvent(this._graphicObject),_0x5ac1e1.getInstance().symbolSelected.raiseEvent(this._graphicObject))},_0x4ea0dc.prototype.DoSelectObjectEdit=function(e){!e||!(e instanceof _0x2d9130)||!this._plottingLayer.isSelected||(this.releaseSelection(),this.DoSelectObject(e),this._plottingLayer._isEditable&&this.drawSymbolExtend(e))},_0x4ea0dc.prototype.drawSymbolExtend=function(e){var t=e.symbolType;e.showMode,_0x1c668c.SYMBOL_UNKNOW!==t&&(_0x1c668c.SYMBOL_Model!==t||_0x1c668c.SYMBOL_DOT!==t||_0x1c668c.SYMBOL_PICTURE!==t)&&this.createCtrlPoints(e)},_0x4ea0dc.prototype.addAnnotationArrayPositionPt=function(e,t){this.CtrlPosition.createAnnotationCtrlPoint(e,t)},_0x4ea0dc.prototype.deactivate=function(){this.releaseSelection(),this._active=!1},_0x4ea0dc.prototype.isActive=function(){return this._active},_0x4ea0dc.prototype.createCtrlPoints=function(e){this.CtrlPosition.createCtrlPoints(e),this.ModelEditControl.hideModeEditBouds(!1)},_0x4ea0dc.prototype.drawModelEditObject=function(e){this.CtrlPosition.removeAll(),this._graphicObject&&_0x2bcc5b.Marker===this._graphicObject.showMode&&(this.ModelEditControl.destoryBoundsCtrl(),this.ModelEditControl.createModeEditBouds(e))},_0x4ea0dc.prototype.drawVectorEditObject=function(e){this.CtrlPosition.removeAll(),this.ModelEditControl.destoryBoundsCtrl(),this.ModelEditControl.createVectorEditBouds(e)},_0x4ea0dc.prototype.drawGroupObjectEditObject=function(e,t){if(e instanceof _0x8c2e6e)if(t&&!this.groupObjectEditObject){var i=e.getBounds(),n=.5*(i.max_X+i.min_X),r=.5*(i.max_Y+i.min_Y);i.max_Z,i.min_Z;var o=new WebGLPlot.Cartesian3(i.min_X,i.max_Y,0),a=new WebGLPlot.Cartesian3(i.max_X,i.max_Y,0),s=new WebGLPlot.Cartesian3(i.min_X,i.min_Y,0),l=_0x2909c1.getSpaceDistance(o,a)+i.modelRadius,u=_0x2909c1.getSpaceDistance(o,s)+i.modelRadius,c=i.max_Z-i.min_Z;c=c>i.modelRadius?c:i.modelRadius,e._centerPt3D=new WebGLPlot.Cartesian3(n,r,i.min_Z);var h=new WebGLPlot.Cartesian3(l,u,c);h.z<0&&(h.z=0);var d=this.ModelEditControl.createBoxGeometry(new WebGLPlot.Cartesian3(n,r,i.min_Z+.5*c),h);this.groupObjectEditObject=this._scene.primitives.add(d),this.CtrlPosition._ctrlPoints.removeAll(),this.CtrlPosition.createGroupObjectCtrlPoint(e,e._centerPt3D,0)}else t||(this.CtrlPosition._ctrlPoints.removeAll(),this._scene.primitives.remove(this.groupObjectEditObject),this.groupObjectEditObject=null)},_0x4ea0dc.prototype.removeGroupObjectEditObject=function(){this.groupObjectEditObject&&(this._scene.primitives.remove(this.groupObjectEditObject),this.groupObjectEditObject=null)},_0x4ea0dc.prototype.cut=function(){null!==this._graphicObject&&this._plottingLayer&&this._plottingLayer._isEditable&&(this.pasteGeoJson=_0x2d9130.toGeoJson(this._graphicObject,this.pasteGeoJson),this._plottingLayer.removeGeoGraphicObject(this._graphicObject))},_0x4ea0dc.prototype.copy=function(){null!==this._graphicObject&&(this.pasteGeoJson=_0x2d9130.toGeoJson(this._graphicObject,this.pasteGeoJson))},_0x4ea0dc.prototype.paste=function(e){if(null!==this.pasteGeoJson&&this._plottingLayer&&this._plottingLayer._isEditable){var t=JSON.parse(this.pasteGeoJson);if(t.uuid=WebGLPlot.createGuid(),WebGLPlot.defined(e))if(parseInt(t.symbolType)===_0x1c668c.SYMBOL_DOT||parseInt(t.symbolType)===_0x1c668c.SYMBOL_TEXT)t.localePoints[0].x=e.x,t.localePoints[0].y=e.y,t.localePoints[0].z=e.z;else for(var i=e.x-t._CenterPosition.x,n=e.y-t._CenterPosition.y,r=0;r<t.localePoints.length;++r)t.localePoints[r].x=t.localePoints[r].x+i,t.localePoints[r].y=t.localePoints[r].y+n,t.localePoints[r].z=e.z;this._plottingLayer.geoJsonToGeoGraphicObject(t)}},_0x4ea0dc.prototype.clearCopyOrCut=function(){this.pasteGeoJson=null},_0x4ea0dc.prototype.activateModelShortCutEdit=function(){this.ModelScaleShortCuts_Active||document.addEventListener("keydown",_0x45026d,!1),this.ModelScaleShortCuts_Active=!0},_0x4ea0dc.prototype.deActivateModelShortCutEdit=function(){document.removeEventListener("keydown",_0x45026d),this.ModelScaleShortCuts_Active=!1};var _0x100499=(_0x53ed4b=!0,function(e,t){var i=_0x53ed4b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53ed4b=!1,i}),_0x403b5f=_0x100499(void 0,(function(){return _0x403b5f.toString().search("(((.+)+)+)+$").toString().constructor(_0x403b5f).search("(((.+)+)+)+$")})),_0x53ed4b;function _0xc0ccbe(e,t){if(!WebGLPlot.defined(t)||!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("plottingLayer || scene is required!");this._handler=new WebGLPlot.ScreenSpaceEventHandler(e.canvas),this._scene=e,this._isDrawing=!1,this._geoGraphicObject=void 0,this._layer=t,this._active=!1,this._drawFinishEvent=new WebGLPlot.Event,this._drawControlEndEvent=new WebGLPlot.Event,this._libID=-1,this._code=-1,this._Url="",this._serverUrl="";var i=this;this._handler.setInputAction((function(e){_0x4c3fd5(e,i)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this._handler.setInputAction((function(e){_0x5cbd9a(e,i)}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this._handler.setInputAction((function(e){_0x4f50ec(e,i)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),this._handler.setInputAction((function(e){_0x1da04f(e,i)}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}function _0x4c3fd5(e,t){var i=t;if(i._active&&i._layer&&i&&i._active){var n=i._scene,r=_0x2909c1.getPosition(n,e.position);if(r)if(i._isDrawing){if(null===i._geoGraphicObject||void 0===i._geoGraphicObject)return void(i._isDrawing=!1);i._geoGraphicObject.localPoints.length>=i._geoGraphicObject.getMaxEditPts()?_0x318638(t):(r.z+=1,i._geoGraphicObject.localPoints.push(r),i._geoGraphicObject._initialize=!1)}else{i._isDrawing=!0;var o=null;if(0===i._libID){switch(i._code){case _0x1c668c.SYMBOL_Model:case _0x1c668c.SYMBOL_PICTURE:case _0x1c668c.SYMBOL_POINT:o=new _0x4844fd({layer:i._layer,libID:i._libID,code:i._code,localPoints:[]}),i._code===_0x1c668c.SYMBOL_Model?(o._modelPath=i._Url,o._showMode=_0x2bcc5b.Marker):i._code===_0x1c668c.SYMBOL_PICTURE&&(o._picturePath=i._Url,o._showMode=_0x2bcc5b.Picture);break;default:o=new _0x330d7a({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],isDrawing:!0,isEdit:!1})}o._symbolType=i._code}else void 0!==i._serverData&&null!==i._serverData&&i._serverData.symbolType===_0x1c668c.SYMBOL_DOT?o=new _0x4844fd({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],serverData:i._serverData}):i._serverData.symbolType===_0x1c668c.SYMBOL_ALGO&&(o=new _0x330d7a({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],serverData:i._serverData,isDrawing:!0}));if(null===o||o._symbolType===_0x1c668c.SYMBOL_UNKNOW)return void(i._isDrawing=!1);_0x2909c1.isSymbolDot(o._symbolType)?(i._geoGraphicObject=o,i._geoGraphicObject.localPoints.push(r),i._layer.isEditable&&i._layer._geoGraphicObjects.push(o),_0x318638(t)):(i._geoGraphicObject=o,i._geoGraphicObject.localPoints.push(r),i._layer.isEditable&&i._layer._geoGraphicObjects.push(o),0===i._libID&&34===i._code&&_0x318638(t))}}}function _0x5cbd9a(e,t){var i=t;if(i._active&&i&&i._active&&i._isDrawing&&i._geoGraphicObject){var n=i._scene,r=_0x2909c1.getPosition(n,e.endPosition);if(r)i._geoGraphicObject.localPoints.length>=2&&i._geoGraphicObject.localPoints.pop(),i._geoGraphicObject.localPoints.push(r),i._geoGraphicObject._initialize=!1}}function _0x4f50ec(e,t){var i=t;if(i._active){if(i._geoGraphicObject._symbolType!==_0x1c668c.SYMBOL_DOT){var n=i._geoGraphicObject.localPoints.length;i._geoGraphicObject.localPoints.splice(n-2,2)}_0x318638(t)}}function _0x1da04f(e,t){var i=t;i._active?(_0x318638(t),i._drawControlEndEvent.raiseEvent(t._geoGraphicObject),i._serverData=null,t._isDrawing||t.deactivate()):i._scene._canvas.style.cursor=""}function _0x318638(e){var t=e;if(t._isDrawing&&WebGLPlot.defined(t._geoGraphicObject)){var i=t._geoGraphicObject;if(_0x2909c1.clearSamePtsXY(i.localPoints).length<i.getMinEditPts())return t._layer.removeGeoGraphicObject(i),t._isDrawing=!1,void(t._geoGraphicObject=void 0);t._geoGraphicObject.isDrawing=!1,t._geoGraphicObject._initialize=!1,t._isDrawing=!1,t._drawFinishEvent.raiseEvent(e._geoGraphicObject),t._layer.symbolAddedEvent.raiseEvent(e._geoGraphicObject),_0x5ac1e1.getInstance().symbolAdded.raiseEvent(e._geoGraphicObject,t._layer.name)}}function _0x5eb9f6(e){e.setDrawPrototype()}_0x403b5f(),_0xc0ccbe.prototype.activate=function(e,t,i){if(this._layer&&this._layer._scene&&this._layer.isEditable)if(WebGLPlot.defined(e)&&WebGLPlot.defined(t)){if("number"!=typeof e||"number"!=typeof t)return void console.log("PlotDrawControl activate libID or code should be number");(!WebGLPlot.defined(i)||null==i)&&(i=""),this._libID=e,this._code=t,this._Url=i,0===e?this.setDrawPrototype():this.getServerData(this._libID,this._code,_0x5eb9f6(this))}else(null===this._serverData||!WebGLPlot.defined(this._serverData))&&0!==this._libID&&!WebGLPlot.getLibManager(this._scene._plottingID).useServerData&&this.getServerDataFromLocal(symbolLibManager,this._libID,this._code),this.setDrawPrototype()},_0xc0ccbe.prototype.setDrawPrototype=function(){-1===this._libID&&-1===this._code||(this._active=!0,this._scene._canvas.style.cursor="crosshair",_0x2909c1.screenSpaceCameraController(this._scene,!1))},_0xc0ccbe.prototype.setAction=function(e,t,i){if(!this._active&&((!WebGLPlot.defined(i)||null==i)&&(i=""),WebGLPlot.defined(e)&&WebGLPlot.defined(t)&&null!==e&&null!==t&&this._layer&&this._layer._scene)){if("number"!=typeof e||"number"!=typeof t)return void console.log("PlotDrawControl setAction libId or code should be number");this._libID=e,this._code=t,this._Url=i,0!==e&&this.getServerData(this._libID,this._code)}},_0xc0ccbe.prototype.getServerData=function(e,t,i){var n=this,r=WebGLPlot.getLibManager(this._layer._scene._plottingID),o=r.getSymbolData(e,t);if(WebGLPlot.defined(o)&&null!==o)return n._serverData=o,void(i&&i());var a=WebGLPlot.getServerData(e,t,void 0,this._layer._scene._plottingID);!a||(a.getSymbolInfo.events.on({processCompleted:function(t){return n._serverData=t.result,r.setSymbolData(e,t.result),i&&i(),!0},processFailed:function(){},scope:n}),a.getSymbolInfo.processAsync(a.getSymbolInfoParameters))},_0xc0ccbe.prototype.getServerDataFromLocal=function(e,t,i){var n=e.localSymbolLibData;this._serverData=n[t][i]},Object.defineProperties(_0xc0ccbe.prototype,{libID:{get:function(){return this._libID}},code:{get:function(){return this._code}},serverUrl:{get:function(){return this._serverUrl},set:function(e){e!==this._serverUrl&&(this._serverUrl=e)}},drawFinishEvent:{get:function(){return this._drawFinishEvent}},drawControlEndEvent:{get:function(){return this._drawControlEndEvent}},plottingLayer:{get:function(){return this._layer},set:function(e){e!==this._layer&&(this._layer=e)}}}),_0xc0ccbe.prototype.setPlottingLayer=function(e){return!!e&&(this._layer=e,!0)},_0xc0ccbe.prototype.deactivate=function(){this._active=!1,this._isDrawing=!1,this._libID=-1,this._code=-1,delete this._geoGraphicObject,this._scene._canvas.style.cursor="",_0x2909c1.screenSpaceCameraController(this._layer._scene,!0)};const _0x1bc001=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x51c91a=_0x1bc001(void 0,(function(){return _0x51c91a.toString().search("(((.+)+)+)+$").toString().constructor(_0x51c91a).search("(((.+)+)+)+$")}));_0x51c91a();class _0x4cd539{constructor(e,t){this._isGroup=t,this._UUID=WebGLPlot$e.createGuid(),this._name=e,this._parentNode=void 0,this._childNodes=[],this._isModified=!1}_getRootNode(){let e=this;for(;!e.isRootNode();)e=e._parentNode;return e}_removeGeoEntityNode(e){let t=this.findNode(e);if(!t.isGroupNode()){let i=t._parentNode,n=i.indexOf(e);i._childNodes.splice(n,1),this._isModified=!0,this._save()}}_getParentNode(){return this._parentNode}_clear(){this._childNodes.splice(0),this._isModified=!0,this._save()}_isModify(){return!!this._isModified||(this._childNodes.forEach((e=>{if(e._isModify())return!0})),!1)}_setIsModify(e){this._isModified=e,this._childNodes.forEach((t=>{t._setIsModify(e)}))}_save(){_0x2e28f1.getInstance()._saveGeoEntity(!1)}_fromJson(e,t){if(!WebGLPlot$e.defined(t))return;let i=JSON.parse(e);!WebGLPlot$e.defined(i)||(WebGLPlot$e.defined(i.isGroup)&&(this._isGroup=i.isGroup),WebGLPlot$e.defined(i.UUID)&&(this._UUID=i.UUID),WebGLPlot$e.defined(i.name)&&(this._name=i.name),WebGLPlot$e.defined(i.parentUUID)&&(this._parentNode=t.findNode(i.parentUUID)),WebGLPlot$e.defined(i.childNodes)&&(this._childNodes=[],i.childNodes.forEach((e=>{let i=new _0x4cd539("",!1);this._childNodes.push(i),i._fromJson(e,t)}))))}_toJson(){let e={};return e.hasOwnProperty("isGroup")||(e.isGroup=this._isGroup),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),WebGLPlot$e.defined(this._parentNode)&&(e.hasOwnProperty("parentUUID")||(e.parentUUID=this._parentNode.getUUID())),e.hasOwnProperty("childNodes")||(e.childNodes=[],this._childNodes.forEach((t=>{e.childNodes.push(t._toJson())}))),JSON.stringify(e)}isRootNode(){return void 0===this._parentNode}isGroupNode(){return this._isGroup}getUUID(){return this._UUID}getName(){return this._name}setName(e){this._name=e,this._isModified=!0,this._save()}createGroupNode(e){let t;return this._isGroup&&(t=new _0x4cd539(e,!0),t._parentNode=this,this._childNodes.push(t),this._isModified=!0,this._save()),t}createGeoEntityNode(e){let t;return this._isGroup&&(t=new _0x4cd539(e.getName(),!1),t._UUID=e.getUUID(),t._parentNode=this,this._childNodes.push(t),this._isModified=!0,this._save()),t}getChildNodes(){return this._childNodes}findNode(e){let t;if(this._UUID===e)return this;for(let i=0;i<this._childNodes.length;i++){const n=this._childNodes[i];if(n.getUUID()===e){t=n;break}if(n._isGroup&&(t=n.findNode(e),WebGLPlot$e.defined(t)))break}return t}indexOf(e){let t=-1;for(let i=0;i<this._childNodes.length;i++)if(this._childNodes[i].getUUID()===e){t=i;break}return t}moveNodeTo(e,t,i){if(!this.isGroupNode()||!t.isGroupNode()||e>=this._childNodes.length)return!1;let n=this._childNodes.splice(e,1);if(0===n.length)return!1;let r=n[0];return r._parentNode=t,-1===i||i>=t.getChildNodes().length?t._childNodes.push(r):t._childNodes.splice(i,0,r),this._isModified=!0,this._save(),!0}moveTo(e,t){if(!e.isGroupNode())return!1;let i=this._getParentNode();if(WebGLPlot$e.defined(i)){let n=i.indexOf(this.UUID);if(i.moveNodeTo(n,e,t))return this._isModified=!0,this._save(),!0}return!1}}const _0xfa5b25=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x388518=_0xfa5b25(void 0,(function(){return _0x388518.toString().search("(((.+)+)+)+$").toString().constructor(_0x388518).search("(((.+)+)+)+$")}));_0x388518();class _0xf52e1d{constructor(){this._mapModelPathToModelSize=void 0}static cartesian3ToDegrees(e){let t=WebGLPlot$e.Cartographic.fromCartesian(e);return new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(t.longitude),WebGLPlot$e.CesiumMath.toDegrees(t.latitude),t.height)}static degreesToCartesian3(e){return WebGLPlot$e.Cartesian3.fromDegrees(e.x,e.y,e.z)}static getPositionFromModelMatrix(e){let t=WebGLPlot$e.Matrix4.getTranslation(e,new WebGLPlot$e.Cartesian3);return this.cartesian3ToDegrees(t)}static getScaleFromModelMatrix(e){let t=WebGLPlot$e.Matrix4.getScale(e,new WebGLPlot$e.Cartesian3);return this.cartesian3ToDegrees(t)}static getRotationFromModelMatrix(e){let t=WebGLPlot$e.Matrix4.getRotation(e,new WebGLPlot$e.Matrix4),i=WebGLPlot$e.Matrix4.getMatrix3(t,new WebGLPlot$e.Matrix3),n=WebGLPlot$e.Quaternion.fromRotationMatrix(i),r=WebGLPlot$e.HeadingPitchRoll.fromQuaternion(n);return new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(r.pitch),WebGLPlot$e.CesiumMath.toDegrees(r.roll),WebGLPlot$e.CesiumMath.toDegrees(r.heading))}static getHeading(e,t){let i=WebGLPlot$e.Transforms.eastNorthUpToFixedFrame(e),n=Cesium.Cartesian3.subtract(t,e,new Cesium.Cartesian3),r=WebGLPlot$e.Matrix4.multiplyByPointAsVector(WebGLPlot$e.Matrix4.inverse(i,new WebGLPlot$e.Matrix4),n,new WebGLPlot$e.Cartesian3),o=WebGLPlot$e.Cartesian3.normalize(r,new WebGLPlot$e.Cartesian3),a=Math.atan2(o.y,o.x)-WebGLPlot$e.CesiumMath.PI_OVER_TWO;return WebGLPlot$e.CesiumMath.TWO_PI-WebGLPlot$e.CesiumMath.zeroToTwoPi(a)}static getPitch(e,t){let i=WebGLPlot$e.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$e.Cartesian3.subtract(t,e,new WebGLPlot$e.Cartesian3),r=WebGLPlot$e.Matrix4.multiplyByPointAsVector(WebGLPlot$e.Matrix4.inverse(i,i),n,n);return WebGLPlot$e.Cartesian3.normalize(r,r),WebGLPlot$e.CesiumMath.PI_OVER_TWO-WebGLPlot$e.CesiumMath.acosClamped(r.z)}static getModelSize(e){WebGLPlot$e.defined(this._mapModelPathToModelSize)||(this._mapModelPathToModelSize=new Map);let t=(e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT)).modelPath,i=e.scene,n=this._mapModelPathToModelSize.get(t);if(WebGLPlot$e.defined(n))return n;if(!WebGLPlot$e.defined(i))return;const r=t.split(".");let o=r[r.length-1];if("gltf"===o||"glb"===o){let e=i.primitives.add(WebGLPlot$e.Model.fromGltf({url:t})),n=this;e.readyPromise.then((function(e){if(WebGLPlot$e.defined(e._maxCorner)&&WebGLPlot$e.defined(e._minCorner)){var r=Math.abs(e._maxCorner.x-e._minCorner.x),o=Math.abs(e._maxCorner.y-e._minCorner.y),a=Math.abs(e._maxCorner.z-e._minCorner.z);n._mapModelPathToModelSize.set(t,new _0x23de81(r,o,a)),i.primitives.remove(e)}}))}return n}static getModelSizeSyn(e){if(!WebGLPlot$e.defined(e)||WebGLPlot$e.defined(e.modelPath))return;let t=e.modelPath,i=e.modelJson,n=this._mapModelPathToModelSize.get(t);if(WebGLPlot$e.defined(n))return n;if(WebGLPlot$e.defined(e.modelJson))return;for(var r=new WebGLPlot$e.Cartesian3,o=new WebGLPlot$e.Cartesian3,a=i.nodes,s=i.meshes,l=i.scenes[i.scene].nodes,u=l.length,c=[],h=new WebGLPlot$e.Cartesian3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),d=new WebGLPlot$e.Cartesian3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),f=0;f<u;++f){var p=a[l[f]];for(p._transformToRoot=WebGLPlot$e.ModelUtility.getTransform(p),c.push(p);c.length>0;){var _=(p=c.pop())._transformToRoot,m=p.mesh;if(WebGLPlot$e.defined(m))for(var g=s[m].primitives,x=g.length,y=0;y<x;++y){var v=g[y].attributes.POSITION;if(WebGLPlot$e.defined(v)){var $=WebGLPlot$e.ModelUtility.getAccessorMinMax(i,v),b=WebGLPlot$e.Cartesian3.fromArray($.min,0,r),T=WebGLPlot$e.Cartesian3.fromArray($.max,0,o);WebGLPlot$e.defined(h)&&WebGLPlot$e.defined(d)&&(WebGLPlot$e.Matrix4.multiplyByPoint(_,b,b),WebGLPlot$e.Matrix4.multiplyByPoint(_,T,T),WebGLPlot$e.Cartesian3.minimumByComponent(h,b,h),WebGLPlot$e.Cartesian3.maximumByComponent(d,T,d))}}var C=p.children;if(WebGLPlot$e.defined(C))for(var S=C.length,w=0;w<S;++w){var E=a[C[w]];E._transformToRoot=WebGLPlot$e.ModelUtility.getTransform(E),WebGLPlot$e.Matrix4.multiplyTransformation(_,E._transformToRoot,E._transformToRoot),c.push(E)}delete p._transformToRoot}}let P={};if(P._minCorner=h,P._maxCorner=d,WebGLPlot$e.defined(P._maxCorner)&&WebGLPlot$e.defined(P._minCorner)){var A=Math.abs(P._maxCorner.x-P._minCorner.x),L=Math.abs(P._maxCorner.y-P._minCorner.y),M=Math.abs(P._maxCorner.z-P._minCorner.z);this._mapModelPathToModelSize.set(t,new WebGLPlot$e.PlotPoint3D(A,L,M))}return n=this._mapModelPathToModelSize.get(t),n}static getPositionByDistanceOnOld(e,t,i,n){if(e.length>=2&&t>=0&&i>=0&&n>=0){if(0==t)return{index:i,point:e[i],distanceIndexOld:n};let r=n;for(let n=i;n<e.length-1;n++){let i=e[n],o=e[n+1],a=WebGLPlot$e.Cartesian3.distance(i,o);if(r+=a,r==t)return{index:n+1,point:o,distanceIndexOld:r};if(r>t){let e=(r-t)/a,s=o.x+(i.x-o.x)*e,l=o.y+(i.y-o.y)*e,u=o.z+(i.z-o.z)*e;return{index:n,point:new WebGLPlot$e.Cartesian3(s,l,u),distanceIndexOld:r-a}}}}return{index:-1,point:new WebGLPlot$e.Cartesian3}}static getPositionByDistance(e,t){if(e.length>=2&&t>=0){if(0==t)return{index:0,point:e[0],distanceIndex:0};let i=0;for(let n=0;n<e.length-1;n++){let r=e[n],o=e[n+1],a=WebGLPlot$e.Cartesian3.distance(r,o);if(i+=a,i==t)return{index:n+1,point:o,distanceIndex:i};if(i>t){let e=(i-t)/a,s=o.x+(r.x-o.x)*e,l=o.y+(r.y-o.y)*e,u=o.z+(r.z-o.z)*e;return{index:n,point:new WebGLPlot$e.Cartesian3(s,l,u),distanceIndex:i-a}}}}return{index:-1,point:new WebGLPlot$e.Cartesian3,distanceIndex:0}}static getAllDistance(e){let t=0;for(let i=0;i<e.length-1;i++){let n=e[i],r=e[i+1];t+=WebGLPlot$e.Cartesian3.distance(n,r)}return t}static calcControlPosMatrix(e,t,i){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t))return null;let n=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west"),r=null;if(e.getShowMode()!=_0x2bcc5b.Marker){const t=this.degreesToCartesian3(e.getPosition());r=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(t,new WebGLPlot$e.HeadingPitchRoll,WebGLPlot$e.Ellipsoid.WGS84,n)}else{const o=e.getModelRotate(),a=WebGLPlot$e.HeadingPitchRoll.fromDegrees(o.z,o.x,o.y,new WebGLPlot$e.HeadingPitchRoll),s=this.degreesToCartesian3(e.getPosition()),l=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(s,a,WebGLPlot$e.Ellipsoid.WGS84,n),u=e.getModelScale(),c=e.getModelPath(),h=this.getModelSize({modelPath:c,scene:i});if(WebGLPlot$e.defined(h)){const e=WebGLPlot$e.Cartesian3.fromElements(h.x*t.y*u,h.y*t.x*u,h.z*t.z*u);r=WebGLPlot$e.Matrix4.multiplyByTranslation(l,e,new WebGLPlot$e.Matrix4)}}return r}static calcControlPoint(e,t,i){if(0==t.x&&0==t.y&&0==t.z)return e.getPosition();let n=this.calcControlPosMatrix(e,t,i);return WebGLPlot$e.defined(n)?this.getPositionFromModelMatrix(n):null}static colorToObject(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}static objectToColor(e){var t=new WebGLPlot$e.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,WebGLPlot$e.defined(e.red)||(t.red=1),WebGLPlot$e.defined(e.green)||(t.green=1),WebGLPlot$e.defined(e.blue)||(t.blue=1),WebGLPlot$e.defined(e.alpha)||(t.alpha=1),t}static circlePoint(e,t,i,n){n*=Math.PI/180;let r=e.x+t*Math.cos(n),o=e.y+i*Math.sin(n);return new Cesium.Cartesian2(r,o)}static calcCameraDistance(e,t){if(WebGLPlot$e.defined(e)&&WebGLPlot$e.defined(t)){let i=this.degreesToCartesian3(e);return WebGLPlot$e.Cartesian3.distance(i,t.camera.positionWC)}return null}}const _0x5c64ab=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x261f98=_0x5c64ab(void 0,(function(){return _0x261f98.toString().search("(((.+)+)+)+$").toString().constructor(_0x261f98).search("(((.+)+)+)+$")}));_0x261f98();class _0x15cea8{constructor(){this._symbolStyle=new _0x291171,this._lineSymbolID=0,this._lineWidth=3,this._surroundLineWidth=3,this._gridSymbolSize=new WebGLPlot$e.Cartesian2(-1,-1),this._symbolRank=0}clone(){let e=new _0x15cea8;return e._symbolStyle=this._symbolStyle.clone(),e._lineSymbolID=this._lineSymbolID,e._lineWidth=this._lineWidth,e._surroundLineWidth=this._surroundLineWidth,e._gridSymbolSize=this._gridSymbolSize,e._symbolRank=this._symbolRank,e}getSymbolStyle(){return this._symbolStyle}setSymbolStyle(e){this._symbolStyle=e}getLineSymbolID(){return this._lineSymbolID}setLineSymbolID(e){this._lineSymbolID=e}getLineWidth(){return this._lineWidth}setLineWidth(e){this._lineWidth=e}getSurroundLineWidth(){return this._surroundLineWidth}setSurroundLineWidth(e){this._surroundLineWidth=e}getGridSymbolSize(){return this._gridSymbolSize}setGridSymbolSize(e){this._gridSymbolSize=e}getSymbolRank(){return this._symbolRank}setSymbolRank(e){this._symbolRank=e}setGeoGraphicObjectStyle(e){e.symbolStyle=this._symbolStyle,e.lineSymbolID=this._lineSymbolID,e.gridLineWidth=this._lineWidth,e.gridSurroundLineWidth=this._surroundLineWidth,-1!=this._gridSymbolSize.x&&-1!=this._gridSymbolSize.y&&(e.gridSymbolSize=this._gridSymbolSize),e.symbolRank=this._symbolRank}getGeoGraphicObjectStyle(e){this._symbolStyle=e.symbolStyle,this._lineSymbolID=e.lineSymbolID,this._lineWidth=e.gridLineWidth,this._surroundLineWidth=e.gridSurroundLineWidth,this._gridSymbolSize=e.gridSymbolSize,this._symbolRank=e.symbolRank}toJson(){let e={};if(!e.hasOwnProperty("symbolStyle")){var t={};t.lineColor=_0xf52e1d.colorToObject(this._symbolStyle.lineColor),t.fillSymbolID=this._symbolStyle._fillSymbolID,t.fillBackColor=_0xf52e1d.colorToObject(this._symbolStyle._fillBackColor),t.fillForeColor=_0xf52e1d.colorToObject(this._symbolStyle._fillForeColor),t.fillBackOpaque=this._symbolStyle._fillBackOpaque,t.fillGradientMode=this._symbolStyle._fillGradientMode,t.fillCenterOffsetX=this._symbolStyle.fillGradientOffsetRatioX,t.fillCenterOffsetY=this._symbolStyle.fillGradientOffsetRatioY,t.fillAngle=this._symbolStyle.fillGradientAngle,t.fillOpaqueRate=100-this._symbolStyle.fillOpaqueRate,t.lineWidth3D=this._symbolStyle.lineWidth,e.symbolStyle=t}return e.hasOwnProperty("lineSymbolID")||(e.lineSymbolID=this._lineSymbolID),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("surroundLineWidth")||(e.surroundLineWidth=this._surroundLineWidth),e.hasOwnProperty("gridSymbolSize")||(e.gridSymbolSize={x:this._gridSymbolSize.x,y:this._gridSymbolSize.y}),e.hasOwnProperty("symbolRank")||(e.symbolRank=this._symbolRank),JSON.stringify(e)}fromJson(e){let t=JSON.parse(e);if(WebGLPlot$e.defined(t.symbolStyle)){let e=t.symbolStyle;WebGLPlot$e.defined(e.lineColor)&&(this._symbolStyle.lineColor=_0xf52e1d.objectToColor(e.lineColor),this._symbolStyle._opacity=this._symbolStyle.lineColor.alpha),WebGLPlot$e.defined(e.fillSymbolID)&&(this._symbolStyle.fillSymbolID=e.fillSymbolID),WebGLPlot$e.defined(e.fillForeColor)&&(this._symbolStyle.fillForeColor=_0xf52e1d.objectToColor(e.fillForeColor)),WebGLPlot$e.defined(e.fillBackColor)&&(this._symbolStyle.fillBackColor=_0xf52e1d.objectToColor(e.fillBackColor)),WebGLPlot$e.defined(e.fillGradientMode)&&(this._symbolStyle.fillGradientMode=e.fillGradientMode),WebGLPlot$e.defined(e.fillBackOpaque)&&(this._symbolStyle.fillBackOpaque=e.fillBackOpaque),WebGLPlot$e.defined(e.fillGradientAngle)&&(this._symbolStyle.fillGradientAngle=e.fillGradientAngle),WebGLPlot$e.defined(e.fillOpaqueRate)&&(this._symbolStyle.fillOpaqueRate=100-e.fillOpaqueRate),WebGLPlot$e.defined(e.fillGradientAngle)&&(this._symbolStyle.fillGradientAngle=e.fillGradientAngle),WebGLPlot$e.defined(e.fillGradientOffsetRatioX)&&(this._symbolStyle.fillGradientOffsetRatioX=e.fillGradientOffsetRatioX),WebGLPlot$e.defined(e.fillGradientOffsetRatioY)&&(this._symbolStyle.fillGradientOffsetRatioY=e.fillGradientOffsetRatioY),WebGLPlot$e.defined(e.lineWidth3D)?this._symbolStyle.lineWidth=e.lineWidth3D:this._symbolStyle.lineWidth=3}WebGLPlot$e.defined(t.lineSymbolID)&&(this._lineSymbolID=t.lineSymbolID),WebGLPlot$e.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$e.defined(t.surroundLineWidth)&&(this._surroundLineWidth=t.surroundLineWidth),WebGLPlot$e.defined(t.gridSymbolSize)&&(this._gridSymbolSize=new WebGLPlot$e.Cartesian2(t.gridSymbolSize.x,t.gridSymbolSize.y)),WebGLPlot$e.defined(t.symbolRank)&&(this._symbolRank=t.symbolRank)}}const _0x1753c2=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x38769b=_0x1753c2(void 0,(function(){return _0x38769b.toString().search("(((.+)+)+)+$").toString().constructor(_0x38769b).search("(((.+)+)+)+$")}));_0x38769b();class _0x4920fc{constructor(){this._position=new _0x23de81,this._isPositionUpdate=!1,this._modelScale=1,this._isModelScaleUpdate=!1,this._vectorScale=1,this._isVectorScaleUpdate=!1,this._modelRotate=new _0x23de81,this._isModelRotateUpdate=!1,this._vectorRotate=new _0x23de81,this._isVectorRotateUpdate=!1,this._modelPath="",this._isModelPathUpdate=!1,this._visible=!0,this._isVisibleUpdate=!1,this._dotPlotLibID=0,this._isDotPlotLibIDUpdate=!1,this._dotPlotCode=0,this._isDotPlotCodeUpdate=!1,this._dotPlotStyle=new _0x15cea8,this._isDotPlotStyleUpdate=!1,this._pictureSymbolSize=new WebGLPlot$e.Cartesian2(0,0),this._isPictureSymbolSizeUpdate=!1,this._picturePath="",this._isPicturePathUpdate=!1,this._showMode=_0x2bcc5b.Unkown,this._isShowModeUpdate=!1,this._isDistanceChangeMode=!1,this._isDistanceChangeModeUpdate=!1,this._changeModeDistance=5e3,this._isChangeModeDistanceUpdate=!1}_update(e){this._position=e._position,this._isPositionUpdate=!0,this._modelScale=e._modelScale,this._isModelScaleUpdate=!0,this._vectorScale=e._vectorScale,this._isVectorScaleUpdate=!0,this._modelRotate=e._modelRotate,this._isModelRotateUpdate=!0,this._vectorRotate=e._vectorRotate,this._isVectorRotateUpdate=!0,this._modelPath=e._modelPath,this._isModelPathUpdate=!0,this._visible=e._visible,this._isVisibleUpdate=!0,this._dotPlotLibID=e._dotPlotLibID,this._isDotPlotLibIDUpdate=!0,this._dotPlotCode=e._dotPlotCode,this._isDotPlotCodeUpdate=!0,this._dotPlotStyle=e._dotPlotStyle,this._isDotPlotStyleUpdate=!0,this._pictureSymbolSize=e._pictureSymbolSize,this._isPictureSymbolSizeUpdate=!0,this._picturePath=e._picturePath,this._isPicturePathUpdate=!0,this._showMode=e._showMode,this._isShowModeUpdate=!0,this._isDistanceChangeMode=e._isDistanceChangeMode,this._isDistanceChangeModeUpdate=!0,this._changeModeDistance=e._changeModeDistance,this._isChangeModeDistanceUpdate=!0}_merge(e){e._isPositionUpdate&&(this._position=new _0x23de81(e._position.x,e._position.y,e._position.z),this._isPositionUpdate=!0),e._isModelScaleUpdate&&(this._modelScale=e._modelScale,this._isModelScaleUpdate=!0),e._isVectorScaleUpdate&&(this._vectorScale=e._vectorScale,this._isVectorScaleUpdate=!0),e._isModelRotateUpdate&&(this._modelRotate=new _0x23de81(e._modelRotate.x,e._modelRotate.y,e._modelRotate.z),this._isModelRotateUpdate=!0),e._isVectorRotateUpdate&&(this._vectorRotate=new _0x23de81(e._vectorRotate.x,e._vectorRotate.y,e._vectorRotate.z),this._isVectorRotateUpdate=!0),e._isModelPathUpdate&&(this._modelPath=e._modelPath,this._isModelPathUpdate=!0),e._isVisibleUpdate&&(this._visible=e._visible,this._isVisibleUpdate=!0),e._isDotPlotLibIDUpdate&&(this._dotPlotLibID=e._dotPlotLibID,this._isDotPlotLibIDUpdate=!0),e._isDotPlotCodeUpdate&&(this._dotPlotCode=e._dotPlotCode,this._isDotPlotCodeUpdate=!0),e._isDotPlotStyleUpdate&&(this._dotPlotStyle=e._dotPlotStyle.clone(),this._isDotPlotStyleUpdate=!0),e._isPictureSymbolSizeUpdate&&(this._pictureSymbolSize=new WebGLPlot$e.Cartesian2(e._pictureSymbolSize.x,e._pictureSymbolSize.y),this._isPictureSymbolSizeUpdate=!0),e._isPicturePathUpdate&&(this._picturePath=e._picturePath,this._isPicturePathUpdate=!0),e._isShowModeUpdate&&(this._showMode=e._showMode,this._isShowModeUpdate=!0),e._isDistanceChangeModeUpdate&&(this._isDistanceChangeMode=e._isDistanceChangeMode,this._isDistanceChangeModeUpdate=!0),e._isChangeModeDistanceUpdate&&(this._changeModeDistance=e._changeModeDistance,this._isChangeModeDistanceUpdate=!0)}_initParm(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){this._position=new _0x23de81(e.x,e.y,e.z),this._isPositionUpdate=!1,this._modelScale=t,this._isModelScaleUpdate=!1,this._vectorScale=i,this._isVectorScaleUpdate=!1,this._modelRotate=new _0x23de81(n.x,n.y,n.z),this._isModelRotateUpdate=!1,this._vectorRotate=new _0x23de81(r.x,r.y,r.z),this._isVectorRotateUpdate=!1,this._modelPath=o,this._isModelPathUpdate=!1,this._visible=a,this._isVisibleUpdate=!1,this._dotPlotLibID=s,this._isDotPlotLibIDUpdate=!1,this._dotPlotCode=l,this._isDotPlotCodeUpdate=!1,this._dotPlotStyle=u,this._isDotPlotStyleUpdate=!1,this._pictureSymbolSize=new WebGLPlot$e.Cartesian2(c.x,c.y),this._isPictureSymbolSizeUpdate=!1,this._picturePath=h,this._isPicturePathUpdate=!1,this._showMode=d,this._isShowModeUpdate=!1,this._isDistanceChangeMode=f,this._isDistanceChangeModeUpdate=!1,this._changeModeDistance=p,this._isChangeModeDistanceUpdate=!1}_toJson(){let e={};return e.hasOwnProperty("position")||(e.position={x:this._position.x,y:this._position.y,z:this._position.z}),e.hasOwnProperty("isPositionUpdate")||(e.isPositionUpdate=this._isPositionUpdate),e.hasOwnProperty("modelScale")||(e.modelScale=this._modelScale),e.hasOwnProperty("isModelScaleUpdate")||(e.isModelScaleUpdate=this._isModelScaleUpdate),e.hasOwnProperty("vectorScale")||(e.vectorScale=this._vectorScale),e.hasOwnProperty("isVectorScaleUpdate")||(e.isVectorScaleUpdate=this._isVectorScaleUpdate),e.hasOwnProperty("modelRotate")||(e.modelRotate={x:this._modelRotate.x,y:this._modelRotate.y,z:this._modelRotate.z}),e.hasOwnProperty("isModelRotateUpdate")||(e.isModelRotateUpdate=this._isModelRotateUpdate),e.hasOwnProperty("vectorRotate")||(e.vectorRotate={x:this._vectorRotate.x,y:this._vectorRotate.y,z:this._vectorRotate.z}),e.hasOwnProperty("isVectorRotateUpdate")||(e.isVectorRotateUpdate=this._isVectorRotateUpdate),e.hasOwnProperty("modelPath")||(e.modelPath=this._modelPath),e.hasOwnProperty("isModelPathUpdate")||(e.isModelPathUpdate=this._isModelPathUpdate),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("isVisibleUpdate")||(e.isVisibleUpdate=this._isVisibleUpdate),e.hasOwnProperty("dotPlotLibID")||(e.dotPlotLibID=this._dotPlotLibID),e.hasOwnProperty("isDotPlotLibIDUpdate")||(e._isDotPlotLibIDUpdate=this._isDotPlotLibIDUpdate),e.hasOwnProperty("dotPlotCode")||(e.dotPlotCode=this._dotPlotCode),e.hasOwnProperty("isDotPlotCodeUpdate")||(e._isDotPlotCodeUpdate=this._isDotPlotCodeUpdate),e.hasOwnProperty("dotPlotSyle")||(e.dotPlotStyle=this._dotPlotStyle.toJson()),e.hasOwnProperty("isDotPlotStyleUpdate")||(e._isDotPlotStyleUpdate=this._isDotPlotStyleUpdate),e.hasOwnProperty("pictureSymbolSize")||(e.pictureSymbolSize={x:this._pictureSymbolSize.x,y:this._pictureSymbolSize.y}),e.hasOwnProperty("isPictureSymbolSizeUpdate")||(e.isPictureSymbolSizeUpdate=this._isPictureSymbolSizeUpdate),e.hasOwnProperty("picturePath")||(e.picturePath=this._picturePath),e.hasOwnProperty("isPicturePathUpdate")||(e.isPicturePathUpdate=this._isPicturePathUpdate),e.hasOwnProperty("showMode")||(e.showMode=this._showMode),e.hasOwnProperty("isShowModeUpdate")||(e.isShowModeUpdate=this._isShowModeUpdate),e.hasOwnProperty("isDistanceChangeMode")||(e.isDistanceChangeMode=this._isDistanceChangeMode),e.hasOwnProperty("isDistanceChangeModeUpdate")||(e.isDistanceChangeModeUpdate=this._isDistanceChangeModeUpdate),e.hasOwnProperty("changeModeDistance")||(e.changeModeDistance=this._changeModeDistance),e.hasOwnProperty("isChangeModeDistanceUpdate")||(e.isChangeModeDistanceUpdate=this._isChangeModeDistanceUpdate),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);if(WebGLPlot$e.defined(t.position)&&(this._position=new _0x23de81(t.position.x,t.position.y,t.position.z)),WebGLPlot$e.defined(t.isPositionUpdate)&&(this._isPositionUpdate=t.isPositionUpdate),WebGLPlot$e.defined(t.modelScale)&&(this._modelScale=t.modelScale),WebGLPlot$e.defined(t.isModelScaleUpdate)&&(this._isModelScaleUpdate=t.isModelScaleUpdate),WebGLPlot$e.defined(t.vectorScale)&&(this._vectorScale=t.vectorScale),WebGLPlot$e.defined(t.isVectorScaleUpdate)&&(this._isVectorScaleUpdate=t.isVectorScaleUpdate),WebGLPlot$e.defined(t.modelRotate)&&(this._modelRotate=new _0x23de81(t.modelRotate.x,t.modelRotate.y,t.modelRotate.z)),WebGLPlot$e.defined(t.isModelRotateUpdate)&&(this._isModelRotateUpdate=t.isModelRotateUpdate),WebGLPlot$e.defined(t.vectorRotate)&&(this._vectorRotate=new _0x23de81(t.vectorRotate.x,t.vectorRotate.y,t.vectorRotate.z)),WebGLPlot$e.defined(t.isVectorRotateUpdate)&&(this._isVectorRotateUpdate=t.isVectorRotateUpdate),WebGLPlot$e.defined(t.modelPath)&&(this._modelPath=t.modelPath),WebGLPlot$e.defined(t.isModelRotateUpdate)&&(this._isModelPathUpdate=t.isModelPathUpdate),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.isVisibleUpdate)&&(this._isVisibleUpdate=t.isVisibleUpdate),WebGLPlot$e.defined(t.dotPlotLibID)&&(this._dotPlotLibID=t.dotPlotLibID),WebGLPlot$e.defined(t.isDotPlotParmUpdate)&&(this._isDotPlotLibIDUpdate=t.isDotPlotLibIDUpdate),WebGLPlot$e.defined(t.dotPlotCode)&&(this._dotPlotCode=t.dotPlotCode),WebGLPlot$e.defined(t.isDotPlotCodeUpdate)&&(this._isDotPlotCodeUpdate=t.isDotPlotCodeUpdate),WebGLPlot$e.defined(t.dotPlotStyle)){let e=new _0x15cea8;e.fromJson(t.dotPlotStyle),this._dotPlotStyle=e}WebGLPlot$e.defined(t.isDotPlotStyleUpdate)&&(this._isDotPlotStyleUpdate=t.isDotPlotStyleUpdate),WebGLPlot$e.defined(t.pictureSymbolSize)&&(this._pictureSymbolSize=new WebGLPlot$e.Cartesian2(t.pictureSymbolSize.x,t.pictureSymbolSize.y)),WebGLPlot$e.defined(t.isPictureSymbolSizeUpdate)&&(this._isPictureSymbolSizeUpdate=t.isPictureSymbolSizeUpdate),WebGLPlot$e.defined(t.picturePath)&&(this._picturePath=t.picturePath),WebGLPlot$e.defined(t.isPicturePathUpdate)&&(this._isPicturePathUpdate=t.isPicturePathUpdate),WebGLPlot$e.defined(t.showMode)&&(this._showMode=t.showMode),WebGLPlot$e.defined(t.isShowModeUpdate)&&(this._isShowModeUpdate=t.isShowModeUpdate),WebGLPlot$e.defined(t.isDistanceChangeMode)&&(this._isDistanceChangeMode=t.isDistanceChangeMode),WebGLPlot$e.defined(t.isDistanceChangeModeUpdate)&&(this._isDistanceChangeModeUpdate=t.isDistanceChangeModeUpdate),WebGLPlot$e.defined(t.changeModeDistance)&&(this._changeModeDistance=t.changeModeDistance),WebGLPlot$e.defined(t.isChangeModeDistanceUpdate)&&(this._isChangeModeDistanceUpdate=t.isChangeModeDistanceUpdate)}clone(){let e=new _0x4920fc;return e._position=new _0x23de81(this._position.x,this._position.y,this._position.z),e._isPositionUpdate=this._isPositionUpdate,e._modelScale=this._modelScale,e._isModelScaleUpdate=this._isModelScaleUpdate,e._vectorScale=this._vectorScale,e._isVectorScaleUpdate=this._isVectorScaleUpdate,e._modelRotate=new _0x23de81(this._modelRotate.x,this._modelRotate.y,this._modelRotate.z),e._isModelRotateUpdate=this._isModelRotateUpdate,e._vectorRotate=new _0x23de81(this._vectorRotate.x,this._vectorRotate.y,this._vectorRotate.z),e._isVectorRotateUpdate=this._isVectorRotateUpdate,e._modelPath=this._modelPath,e._isModelPathUpdate=this._isModelPathUpdate,e._visible=this._visible,e._isVisibleUpdate=this._isVisibleUpdate,e._dotPlotLibID=this._dotPlotLibID,e._isDotPlotLibIDUpdate=this._isDotPlotLibIDUpdate,e._dotPlotCode=this._dotPlotCode,e._isDotPlotCodeUpdate=this._isDotPlotCodeUpdate,e._dotPlotStyle=this._dotPlotStyle.clone(),e._isDotPlotStyleUpdate=this._isDotPlotStyleUpdate,e._pictureSymbolSize=new WebGLPlot$e.Cartesian2(this._pictureSymbolSize.x,this._pictureSymbolSize.y),e._isPictureSymbolSizeUpdate=this._isPictureSymbolSizeUpdate,e._picturePath=this._picturePath,e._isPicturePathUpdate=this._isPicturePathUpdate,e._showMode=this._showMode,e._isShowModeUpdate=this._isShowModeUpdate,e._isDistanceChangeMode=this._isDistanceChangeMode,e._isDistanceChangeModeUpdate=this._isDistanceChangeModeUpdate,e._changeModeDistance=this._changeModeDistance,e._isChangeModeDistanceUpdate=this._isChangeModeDistanceUpdate,e}setPosition(e){this._position=e,this._isPositionUpdate=!0}getPosition(){return this._position}isPositionUpdate(){return this._isPositionUpdate}setModelScale(e){this._modelScale=e,this._isModelScaleUpdate=!0}getModelScale(){return this._modelScale}isModelScaleUpdate(){return this._isModelScaleUpdate}setVectorScale(e){this._vectorScale=e,this._isVectorScaleUpdate=!0}getVectorScale(){return this._vectorScale}isVectorScaleUpdate(){return this._isVectorScaleUpdate}setModelRotate(e){this._modelRotate=e,this._isModelRotateUpdate=!0}getModelRotate(){return this._modelRotate}isModelRotateUpdate(){return this._isModelRotateUpdate}setVectorRotate(e){this._vectorRotate=e,this._isVectorRotateUpdate=!0}getVectorRotate(){return this._vectorRotate}isVectorRotateUpdate(){return this._isVectorRotateUpdate}setModelPath(e){this._modelPath=e,this._isModelPathUpdate=!0}getModelPath(){return this._modelPath}isModelPathUpdate(){return this._isModelPathUpdate}setDotPlotLibID(e){this._dotPlotLibID=e,this._isDotPlotLibIDUpdate=!0}getDotPlotLibID(){return this._dotPlotLibID}isDotPlotLibIDUpdate(){return this._isDotPlotLibIDUpdate}setDotPlotCode(e){this._dotPlotCode=e,this._isDotPlotCodeUpdate=!0}getDotPlotCode(){return this._dotPlotCode}isDotPlotCodeUpdate(){return this._isDotPlotCodeUpdate}setDotPlotStyle(e){this._dotPlotStyle=e,this._isDotPlotStyleUpdate=!0}getDotPlotStyle(){return this._dotPlotStyle}isDotPlotStyleUpdate(){return this._isDotPlotStyleUpdate}setVisible(e){this._visible=e,this._isVisibleUpdate=!0}isVisible(){return this._visible}isVisibleUpdate(){return this._isVisibleUpdate}setPicturePath(e){this._picturePath=e,this._isPicturePathUpdate=!0}getPicturePath(){return this._picturePath}isPicturePathUpdate(){return this._isPicturePathUpdate}setPictureSymbolSize(e){this._pictureSymbolSize=e,this._isPictureSymbolSizeUpdate=!0}getPictureSymbolSize(){return this._pictureSymbolSize}isPictureSymbolSizeUpdate(){return this._isPictureSymbolSizeUpdate}setShowMode(e){this._showMode=e,this._isShowModeUpdate=!0}getShowMode(){return this._showMode}isShowModeUpdate(){return this._isShowModeUpdate}setIsDistanceChangeMode(e){this._isDistanceChangeMode=e,this._isDistanceChangeModeUpdate=!0}getIsDistanceChangeMode(){return this._isDistanceChangeMode}isDistanceChangeModeUpdate(){return this._isDistanceChangeModeUpdate}setChangeModeDistance(e){this._changeModeDistance=e,this._isChangeModeDistanceUpdate=!0}getChangeModeDistance(){return this._changeModeDistance}isChangeModeDistanceUpdate(){return this._isChangeModeDistanceUpdate}}var _0x9a7668=(_0xe09243=!0,function(e,t){var i=_0xe09243?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe09243=!1,i}),_0x38401d=_0x9a7668(void 0,(function(){return _0x38401d.toString().search("(((.+)+)+)+$").toString().constructor(_0x38401d).search("(((.+)+)+)+$")})),_0xe09243;_0x38401d();var _0x5826a4={UNKNOW:0,WAKE:1,ROTORWASH:2,FIRESMOKE:3,BURST:4,TAILFLAME:5,TAILGAS:6,RADAR:7,SCANWAVE:8,SCANCONE:9,DETECTIONCONE:10,TRACKLINE:11,ATTACKLINE:12,SIGN:13,COMMUNICATIONLINK:14,DYNAMICMODEL:15,TEXT:16,EXTENDACTION:17,AUGMENT:18,ANNULARDIFFUSION:19},_0xaadec6=Object.freeze(_0x5826a4);const _0x7fff87=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe0b1c6=_0x7fff87(void 0,(function(){return _0xe0b1c6.toString().search("(((.+)+)+)+$").toString().constructor(_0xe0b1c6).search("(((.+)+)+)+$")}));_0xe0b1c6();class _0x1b7397{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._name=WebGLPlot$e.defaultValue(e.name,""),this._geoEntity=WebGLPlot$e.defaultValue(e.geoEntity,null),this._visible=WebGLPlot$e.defaultValue(e.visible,!0),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._UUID=WebGLPlot$e.createGuid(),this._type=_0xaadec6.UNKNOW,this._geoEntityParameter=void 0,this._initialized=!1,this._scene=void 0;let t=this;this._execute=function(e,i){t._executeFunction(e),t._initialized||(t._removeEffectFromScene(e),t._visible?t._initialized=t._addEffectToScene(e):t._initialized=!0)}}getType(){return this._type}setGeoEntity(e){this._geoEntity=e}getGeoEntity(){return this._geoEntity}setVisible(e){this._visible=e,this._initialized=!1}isVisible(){return this._visible}setOffset(e){this._pntOffset=e,this._initialized=!1}getOffset(){return this._pntOffset}setChangeSizeFlowModel(e){this._bChangeSizeFlowModel=e}isChangeSizeFlowModel(){return this._bChangeSizeFlowModel}getUUID(){return this._UUID}addEffectToScene(e){this._scene=e,e.preUpdate.addEventListener(this._execute)}removeEffectFromScene(e){e.preUpdate.removeEventListener(this._execute),this._removeEffectFromScene(e),this._initialized=!1}setGeoEntityParameter(e,t){}_addEffectToScene(e){}_removeEffectFromScene(e){}_executeFunction(e){}destroy(){}toJSON(){return{}}fromJSON(e){}clone(){}getName(){return this._name}setName(e){this._name=e}}const _0x5c3c8e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x58fcbd=_0x5c3c8e(void 0,(function(){return _0x58fcbd.toString().search("(((.+)+)+)+$").toString().constructor(_0x58fcbd).search("(((.+)+)+)+$")}));_0x58fcbd();class _0x5a68dc extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.TAILFLAME,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectTailflame_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,-.5,.5)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._crossDiameter=WebGLPlot$e.defaultValue(e.crossDiameter,20),this._particleTailflame=void 0}setCrossDiameter(e){this._crossDiameter=e,this._initialized=!1}getCrossDiameter(){return this._crossDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._particleTailflame)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._particleTailflame.emitterModelMatrix=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){if(0==this._geoEntityParameter.getModelScale()){let t=1*e.getModelScale();this._crossDiameter=t}else{let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._crossDiameter*=t}this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleTailflame=this._createTailFlameParticle(e),WebGLPlot$e.defined(this._particleTailflame)&&(e.primitives.add(this._particleTailflame),t=!0),t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._particleTailflame)&&e.primitives.contains(this._particleTailflame)&&e.primitives.remove(this._particleTailflame),this._particleTailflame=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("crossDiameter")||(e.crossDiameter=this._crossDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.crossDiameter)&&(this._crossDiameter=t.crossDiameter),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x5a68dc;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._crossDiameter=this._crossDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createTailFlameParticle(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset)||!WebGLPlot$e.defined(this._crossDiameter))return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=this._crossDiameter/1,n=1*i;n<.5&&(n=.5);let r=20*i,o=80*i;return new WebGLPlot$e.ParticleSystem({image:_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/flame.png",startColor:new WebGLPlot$e.Color(1,1,1,1),endColor:new WebGLPlot$e.Color(.5,0,0,0),startScale:1,endScale:1,minimumParticleLife:.1,maximumParticleLife:.3,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$e.Cartesian2(n,n),emissionRate:600,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$e.ConeEmitter(WebGLPlot$e.CesiumMath.toRadians(10)),sizeInMeters:!0})}_calcControlPoint(e,t,i){const n=_0xf52e1d.calcControlPosMatrix(e,t,i);if(!WebGLPlot$e.defined(n))return null;const r=WebGLPlot$e.HeadingPitchRoll.fromDegrees(0,90,0,new WebGLPlot$e.HeadingPitchRoll),o=WebGLPlot$e.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$e.Matrix3);return WebGLPlot$e.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$e.Matrix4)}}const _0x48c900=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x179ad4=_0x48c900(void 0,(function(){return _0x179ad4.toString().search("(((.+)+)+)+$").toString().constructor(_0x179ad4).search("(((.+)+)+)+$")}));_0x179ad4();class _0x1d9822 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.TAILGAS,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectTailgas_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,-.5,.5)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._crossDiameter=WebGLPlot$e.defaultValue(e.crossDiameter,20),this._particleTailgas=void 0}setCrossDiameter(e){this._crossDiameter=e,this._initialized=!1}getCrossDiameter(){return this._crossDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._particleTailgas)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._particleTailgas.emitterModelMatrix=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._crossDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleTailgas=this._createTailgasParticle(e),WebGLPlot$e.defined(this._particleTailgas)&&(e.primitives.add(this._particleTailgas),t=!0),t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._particleTailgas)&&e.primitives.contains(this._particleTailgas)&&e.primitives.remove(this._particleTailgas),this._particleTailgas=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("crossDiameter")||(e.crossDiameter=this._crossDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.crossDiameter)&&(this._crossDiameter=t.crossDiameter),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x1d9822;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._crossDiameter=this._crossDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createTailgasParticle(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset)||!WebGLPlot$e.defined(this._crossDiameter))return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=this._crossDiameter/1,n=1*i;n<.5&&(n=.5);let r=5*i,o=5*i;return new WebGLPlot$e.ParticleSystem({image:_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/gas.png",startColor:new WebGLPlot$e.Color(.57,.57,.57,1),endColor:new WebGLPlot$e.Color(.57,.57,.57,0),startScale:1,endScale:1,minimumParticleLife:7,maximumParticleLife:7,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$e.Cartesian2(n,n),emissionRate:80,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$e.ConeEmitter(WebGLPlot$e.CesiumMath.toRadians(5)),sizeInMeters:!0})}_calcControlPoint(e,t,i){const n=_0xf52e1d.calcControlPosMatrix(e,t,i);if(!WebGLPlot$e.defined(n))return null;const r=WebGLPlot$e.HeadingPitchRoll.fromDegrees(0,90,0,new WebGLPlot$e.HeadingPitchRoll),o=WebGLPlot$e.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$e.Matrix3);return WebGLPlot$e.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$e.Matrix4)}}const _0x43933a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x497efa=_0x43933a(void 0,(function(){return _0x497efa.toString().search("(((.+)+)+)+$").toString().constructor(_0x497efa).search("(((.+)+)+)+$")}));_0x497efa();class _0x492aac extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.FIRESMOKE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectFiresmoke_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,.5)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._firesmokeDiameter=WebGLPlot$e.defaultValue(e.firesmokeDiameter,50),this._particleFiresmoke=void 0}setFiresmokeDiameter(e){this._firesmokeDiameter=e,this._initialized=!1}getFiresmokeDiameter(){return this._firesmokeDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._particleFiresmoke)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._particleFiresmoke.emitterModelMatrix=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._firesmokeDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleFiresmoke=this._createFiresmokeParticle(e),WebGLPlot$e.defined(this._particleFiresmoke)&&(e.primitives.add(this._particleFiresmoke),t=!0),t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._particleFiresmoke)&&e.primitives.contains(this._particleFiresmoke)&&e.primitives.remove(this._particleFiresmoke),this._particleFiresmoke=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("firesmokeDiameter")||(e.firesmokeDiameter=this._firesmokeDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.firesmokeDiameter)&&(this._firesmokeDiameter=t.firesmokeDiameter),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x492aac;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._firesmokeDiameter=this._firesmokeDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createFiresmokeParticle(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset)||!WebGLPlot$e.defined(this._firesmokeDiameter)||this._firesmokeDiameter<=0)return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=this._firesmokeDiameter/1,n=1*i;n<.5&&(n=.5);let r=7*i,o=9*i;return new WebGLPlot$e.ParticleSystem({image:_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/fire.png",startColor:new WebGLPlot$e.Color(1,1,1,1),endColor:new WebGLPlot$e.Color(.2,0,0,0),startScale:3,endScale:3,minimumParticleLife:1.5,maximumParticleLife:1.8,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$e.Cartesian2(n,n),emissionRate:200,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$e.ConeEmitter(WebGLPlot$e.CesiumMath.toRadians(30)),sizeInMeters:!0})}_calcControlPoint(e,t,i){let n=_0xf52e1d.calcControlPoint(e,t,i);return WebGLPlot$e.defined(n)?WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(_0xf52e1d.degreesToCartesian3(n),new WebGLPlot$e.HeadingPitchRoll,WebGLPlot$e.Ellipsoid.WGS84,WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west")):null}}const _0x35821b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4d0c02=_0x35821b(void 0,(function(){return _0x4d0c02.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d0c02).search("(((.+)+)+)+$")}));_0x4d0c02();class _0x584c60 extends _0x1b7397{constructor(){super(),this._UUID="GeoEntityEffectExtend_"+WebGLPlot$e.createGuid(),this._type=_0xaadec6.EXTENDACTION,this._name="",this._param=""}toJSON(){let e={};return e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("param")||(e.param=this._param),JSON.stringify(e)}fromJSON(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.param)&&(this._param=t.param)}_executeExtend(){_0x584c60.extendCallBacks.forEach(((e,t)=>{t(e,this._name,this._param)}))}getName(){return this._name}setName(e){this._name=e}getParam(){return this._param}setParam(e){this._param=e}static addExtendCallBack(e,t){WebGLPlot$e.defined(_0x584c60.extendCallBacks.get(e))||_0x584c60.extendCallBacks.set(e,t)}static removeExtendCallBack(e){WebGLPlot$e.defined(_0x584c60.extendCallBacks.get(e))&&_0x584c60.extendCallBacks.delete(e)}}_0x584c60.extendCallBacks=new Map;var _0x1e0f65=(_0x47f197=!0,function(e,t){var i=_0x47f197?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47f197=!1,i}),_0x3c74f9=_0x1e0f65(void 0,(function(){return _0x3c74f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c74f9).search("(((.+)+)+)+$")})),_0x47f197;_0x3c74f9();class _0x496759 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new WebGLPlot$e.Cartesian3(0,0,0)),this._type=_0xaadec6.DYNAMICMODEL,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectDynamic_"+WebGLPlot$e.createGuid(),this._dynamicModelUrl=WebGLPlot$e.defaultValue(e.dynamicModelUrl,""),this._angleTimes=WebGLPlot$e.defaultValue(e.angleTimes,[{time:3,start:{x:0,y:0,z:0},end:{x:45,y:45,z:45},isloop:!0}]),this._scaleTimes=WebGLPlot$e.defaultValue(e.scaleTimes,[{time:3,start:500,end:2e3,isloop:!0}]),this._dynamicModel=void 0,this._angleLoop=WebGLPlot$e.defaultValue(e.angleLoop,!1),this._scaleLoop=WebGLPlot$e.defaultValue(e.scaleLoop,!1),this._gapTime=WebGLPlot$e.defaultValue(e.gapTime,30),this._timer=null}setModelPath(e){this._dynamicModelUrl=e,this._initialized=!1}getModelPath(){return this._dynamicModelUrl}setAngleTimes(e){this._angleTimes=e,this._initialized=!1}getAngleTimes(){return this._angleTimes}setScaleTimes(e){this._scaleTimes=e,this._initialized=!1}getScaleTimes(){return this._scaleTimes}setAngleLoop(e){this._angleLoop=e,this._initialized=!1}getAngleLoop(){return this._angleLoop}setScaleLoop(e){this._scaleLoop=e,this._initialized=!1}getScaleLoop(){return this._scaleLoop}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._dynamicModel)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0xf52e1d.calcControlPosMatrix(e,this._pntOffset,null);WebGLPlot$e.defined(t)&&(this._dynamicModel.modelMatrix=t)}e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()||this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)&&(this._initialized=!1)}this._geoEntityParameter=e}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("dynamicModelUrl")||(e.dynamicModelUrl=this._dynamicModelUrl);let t=[];if(!e.hasOwnProperty("angleTimes")){e.angleTimes=t;for(var i=0;i<this._angleTimes.length;i++)!e.angleTimes.hasOwnProperty("time")&&!e.angleTimes.hasOwnProperty("start")&&!e.angleTimes.hasOwnProperty("end")&&!e.angleTimes.hasOwnProperty("isloop")&&e.angleTimes.push({time:this._angleTimes[i].time,start:this._angleTimes[i].start,end:this._angleTimes[i].end,isloop:this._angleTimes[i].isloop})}let n=[];if(!e.hasOwnProperty("scaleTimes")){e.scaleTimes=n;for(i=0;i<this._scaleTimes.length;i++)!e.scaleTimes.hasOwnProperty("time")&&!e.scaleTimes.hasOwnProperty("start")&&!e.scaleTimes.hasOwnProperty("end")&&!e.scaleTimes.hasOwnProperty("isloop")&&e.scaleTimes.push({time:this._scaleTimes[i].time,start:this._scaleTimes[i].start,end:this._scaleTimes[i].end,isloop:this._scaleTimes[i].isloop})}return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("angleLoop")||(e.angleLoop=this._angleLoop),e.hasOwnProperty("scaleLoop")||(e.scaleLoop=this._scaleLoop),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);if(WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.angleTimes))for(var i=0;i<t.angleTimes.length;i++)WebGLPlot$e.defined(t.angleTimes[i].time),WebGLPlot$e.defined(t.angleTimes[i].start),WebGLPlot$e.defined(t.angleTimes[i].end),WebGLPlot$e.defined(t.angleTimes[i].isloop)&&this._angleTimes.push({time:t.angleTimes[i].time,start:t.angleTimes[i].start,end:t.angleTimes[i].end,isloop:t.angleTimes[i].isloop});if(WebGLPlot$e.defined(t.scaleTimes))for(i=0;i<t.scaleTimes.length;i++)WebGLPlot$e.defined(t.scaleTimes[i].time),WebGLPlot$e.defined(t.scaleTimes[i].start),WebGLPlot$e.defined(t.scaleTimes[i].end),WebGLPlot$e.defined(t.scaleTimes[i].isloop)&&this._scaleTimes.push({time:t.scaleTimes[i].time,start:t.scaleTimes[i].start,end:t.scaleTimes[i].end,isloop:t.scaleTimes[i].isloop});WebGLPlot$e.defined(t.angleLoop)&&(this._angleLoop=t.angleLoop),WebGLPlot$e.defined(t.scaleLoop)&&(this._scaleLoop=t.scaleLoop)}clone(){let e=new _0x496759;return e.name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._initialized=this._initialized,e._dynamicModelUrl=this._dynamicModelUrl,e._angleTimes=this._angleTimes,e._scaleTimes=this._scaleTimes,e._angleLoop=this._angleLoop,e._scaleLoop=this._scaleLoop,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e}_addEffectToScene(e){let t=!1;if(this._dynamicModel=this._createDynamicModel(e),WebGLPlot$e.defined(this._dynamicModel)){e.primitives.add(this._dynamicModel);var i=this._getdata(this._angleTimes,this._scaleTimes);this._startChange(i),t=!0}return t}_startChange(e){var t=new WebGLPlot$e.JulianDate.fromDate(new Date),i=new WebGLPlot$e.JulianDate.fromDate(new Date),n=new WebGLPlot$e.JulianDate.fromDate(new Date),r=t,o=i,a=e.angle.as[0].x,s=e.angle.as[0].y,l=e.angle.as[0].z,u=e.scale.ss[0],c=this._dynamicModel.modelMatrix,h=e.angle.at,d=e.scale.st,f=0,p=0;h.forEach((e=>{f+=e})),d.forEach((e=>{p+=e}));var _=null;_=f>p?f:p;let m=this;this._timer=setInterval((function(){var g=new WebGLPlot$e.JulianDate.fromDate(new Date),x=WebGLPlot$e.JulianDate.secondsDifference(g,r),y=WebGLPlot$e.JulianDate.secondsDifference(g,o),v=WebGLPlot$e.JulianDate.secondsDifference(g,t),$=WebGLPlot$e.JulianDate.secondsDifference(g,i),b=WebGLPlot$e.JulianDate.secondsDifference(g,n),T=m._findIndex(v,h),C=m._findIndex($,d),S=1e3*x,w=1e3*y;r=g,o=g;var E=m._dynamicModel.modelMatrix;if(v<=f){let t=S*e.angleVX[T],i=S*e.angleVY[T],n=S*e.angleVZ[T];a+=t,s+=i,l+=n;const r=WebGLPlot$e.HeadingPitchRoll.fromDegrees(l,a,s,new WebGLPlot$e.HeadingPitchRoll),o=WebGLPlot$e.Matrix4.getTranslation(E,new WebGLPlot$e.Cartesian3);let u=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west");E=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(o,r,WebGLPlot$e.Ellipsoid.WGS84,u)}if(v<=f)try{WebGLPlot$e.defined(E)&&(m._dynamicModel.modelMatrix=E)}catch(e){console.log(e)}if($<=p)try{u+=w*e.scaleVS[C],m._dynamicModel.scale=u}catch(e){console.log(e)}if(b>_){if(m._angleLoop){t=WebGLPlot$e.JulianDate.fromDate(new Date),r=t;try{m._dynamicModel.modelMatrix=c,a=e.angle.as[0].x,s=e.angle.as[0].y,l=e.angle.as[0].z}catch(e){console.log(e)}}if(m._scaleLoop){i=WebGLPlot$e.JulianDate.fromDate(new Date),o=i;try{m._dynamicModel.scale=e.scale.ss[0],u=e.scale.ss[0]}catch(e){console.log(e)}}(m._angleLoop||m._scaleLoop)&&(n=WebGLPlot$e.JulianDate.fromDate(new Date)),!m._angleLoop&&!m._scaleLoop&&clearInterval(m._timer)}}),m._gapTime)}_getdata(e,t){for(var i=[],n=[],r=[],o=[],a=[],s=[],l=[],u=[],c=0;c<e.length;c++)i.push(e[c].time),n.push(e[c].start),r.push(e[c].end),o.push(e[c].isloop);for(c=0;c<t.length;c++)a.push(t[c].time),s.push(t[c].start),l.push(t[c].end),u.push(t[c].isloop);var h=[],d=[],f=[],p=[];for(c=0;c<i.length;c++){var _=this._calspeed(i[c],n[c].x,r[c].x),m=this._calspeed(i[c],n[c].y,r[c].y),g=this._calspeed(i[c],n[c].z,r[c].z);h.push(_),d.push(m),f.push(g)}for(c=0;c<a.length;c++){var x=this._calspeed(a[c],s[c],l[c]);p.push(x)}return{angle:{at:i,as:n,ae:r,al:o},scale:{st:a,ss:s,se:l,sl:u},angleVX:h,angleVY:d,angleVZ:f,scaleVS:p}}_calspeed(e,t,i){return(i-t)/(e*=1e3)}_findIndex(e,t){for(var i=[],n=0,r=0;r<t.length;r++)n+=t[r],i.push(n);var o=0;for(r=0;r<i.length;r++)if(e<i[r]){o=r;break}return o}_removeEffectFromScene(e){WebGLPlot$e.defined(this._timer)&&clearInterval(this._timer),WebGLPlot$e.defined(this._dynamicModel)&&e.primitives.contains(this._dynamicModel)&&e.primitives.remove(this._dynamicModel),this._dynamicModel=null}_createDynamicModel(){if(!(WebGLPlot$e.defined(this._geoEntityParameter)&&WebGLPlot$e.defined(this._pntOffset)&&WebGLPlot$e.defined(this._angleTimes)&&WebGLPlot$e.defined(this._scaleTimes)))return null;var e=_0xf52e1d.calcControlPosMatrix(this._geoEntityParameter,this._pntOffset,scene);return WebGLPlot$e.defined(e)?new WebGLPlot$e.Model.fromGltf({url:this._dynamicModelUrl,modelMatrix:e,allowPicking:!0}):null}}const _0x35a8ca=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x49ecc0=_0x35a8ca(void 0,(function(){return _0x49ecc0.toString().search("(((.+)+)+)+$").toString().constructor(_0x49ecc0).search("(((.+)+)+)+$")}));_0x49ecc0();const _0x165a1c={AXES:0,STREAMER:1,WALL:2};var _0x51a685=Object.freeze(_0x165a1c);const _0x55c0ea=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x789444=_0x55c0ea(void 0,(function(){return _0x789444.toString().search("(((.+)+)+)+$").toString().constructor(_0x789444).search("(((.+)+)+)+$")}));_0x789444();class _0x297e6a extends _0x1b7397{constructor(e){super(e),e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._UUID="GeoEntityEffectTrackline"+WebGLPlot.createGuid(),this._pntOffset=WebGLPlot.defaultValue(e.pntOffset,new _0x23de81(0,-.5,.5)),this._type=_0xaadec6.TRACKLINE,this._name=WebGLPlot.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._trackType=_0x51a685.AXES,this._initialColor=WebGLPlot.defaultValue(e.initialColor,WebGLPlot.Color.RED),this._lineWidth=WebGLPlot.defaultValue(e.lineWidth,1),this._streamerWidth=WebGLPlot.defaultValue(e.streamerWidth,1),this._showPntCount=WebGLPlot.defaultValue(e.showPntCount,500),this._aryGradientColors=WebGLPlot.defaultValue(e.aryGradientColors,[]),this._pntsTmp=[],this._wallCollection=null,this._polylineCollection=null,this._polygonCollection=null,this._appearance=new WebGLPlot.PerInstanceColorAppearance}setTrackType(e){this._trackType!==e&&(this._trackType=e,this._initialized=!1)}getTrackType(){return this._trackType}setTrackColor(e){this._initialColor=e}getTrackColor(){return this._initialColor}setLineWidth(e){this._lineWidth!==e&&(this._lineWidth=e,this._initialized=!1)}getLineWidth(){return this._lineWidth}setStreamerWidth(e){this._streamerWidth!==e&&(this._streamerWidth=e,this._initialized=!1)}getStreamerWidth(){return this._streamerWidth}setShowPntCount(e){this._showPntCount=e}getShowPntCount(){return this._showPntCount}setGradients(e){this._aryGradientColors=e}getGradients(){return this._aryGradientColors}setGeoEntityParameter(e,t){WebGLPlot.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(e.getPosition())&&this._updateTrack(e),this._geoEntityParameter=e}_addEffectToScene(e){this._polylineCollection=new WebGLPlot.PolylineCollection,e.primitives.add(this._polylineCollection),this._wallCollection=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._wallCollection),this._polygonCollection=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._polygonCollection);let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);return WebGLPlot.defined(t)}_removeEffectFromScene(e){WebGLPlot.defined(this._polylineCollection)&&this._polylineCollection.removeAll(),WebGLPlot.defined(this._wallCollection)&&this._wallCollection.removeAll(),WebGLPlot.defined(this._polygonCollection)&&this._polygonCollection.removeAll(),this._pntsTmp=[]}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("trackType")||(e.trackType=this._trackType),e.hasOwnProperty("initialColor")||(e.initialColor=this._initialColor.toCssColorString()),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("streamerWidth")||(e.streamerWidth=this._streamerWidth),e.hasOwnProperty("showPntCount")||(e.showPntCount=this._showPntCount),e.hasOwnProperty("aryGradientColors")||(e.aryGradientColors=[],this._aryGradientColors.forEach((t=>{e.aryGradientColors.push(t.toCssColorString())}))),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),WebGLPlot.toJSON(e)}fromJSON(e){if(!WebGLPlot.defined(e))return;let t=JSON.parse(e);WebGLPlot.defined(t.type)&&(this._type=t.type),WebGLPlot.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot.defined(t.name)&&(this._name=t.name),WebGLPlot.defined(t.trackType)&&(this._trackType=t.trackType),WebGLPlot.defined(t.initialColor)&&(this._initialColor=WebGLPlot.Color.fromCssColorString(t.initialColor)),WebGLPlot.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot.defined(t.streamerWidth)&&(this._streamerWidth=t.streamerWidth),WebGLPlot.defined(t.showPntCount)&&(this._showPntCount=t.showPntCount),WebGLPlot.defined(t.aryGradientColors)&&(this._aryGradientColors=[],t.aryGradientColors.forEach((e=>{this._aryGradientColors.push(WebGLPlot.Color.fromCssColorString(e))}))),WebGLPlot.defined(t.visible)&&(this._visible=t.visible),WebGLPlot.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot.defined(t.offset)&&(WebGLPlot.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x297e6a;return e._name=this._name,e._type=this._type,e._trackType=this._trackType,e._initialColor=this._initialColor.clone(),e._lineWidth=this._lineWidth,e._streamerWidth=this._streamerWidth,e._showPntCount=this._showPntCount,e._aryGradientColors=this._aryGradientColors,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_updateTrack(e){this._trackType===_0x51a685.AXES?this._updateTrackLine(e):this._trackType===_0x51a685.STREAMER?this._updateTrackStreamer(e):this._trackType===_0x51a685.WALL&&this._updateTrackWall(e)}_updateTrackLine(e){if(0==e.getModelScale())return;let t=_0xf52e1d.degreesToCartesian3(_0xf52e1d.calcControlPoint(e,this._pntOffset,this._scene));if(0===this._pntsTmp.length)this._pntsTmp.push(t);else if(1===this._pntsTmp.length){let e=[];e.push(this._pntsTmp[0]),e.push(t),this._polylineCollection.add({positions:e,width:this._lineWidth,material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}})}),this._pntsTmp.push(t)}else{let e=[];for(e.push(this._pntsTmp[1]),e.push(t),this._polylineCollection.add({positions:e,width:this._lineWidth,material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}})}),this._pntsTmp[1]=t;this._polylineCollection.length>this._showPntCount&&this._showPntCount>0;)this._polylineCollection.remove(this._polylineCollection.get(0));for(let e=0,t=0;e<this._polylineCollection.length;e++,t++){let i=(t+1)/this._polylineCollection.length,n=this._calcGradientColor(i),r=this._polylineCollection.get(e);null!=r&&(r.material.uniforms.color=n)}}}_updateTrackStreamer(e){let t=this._streamerWidth/2,i=new _0x23de81(this._pntOffset.x-t,this._pntOffset.y,this._pntOffset.z),n=new _0x23de81(this._pntOffset.x+t,this._pntOffset.y,this._pntOffset.z),r=_0xf52e1d.calcControlPoint(e,i,this._scene),o=_0xf52e1d.calcControlPoint(e,n,this._scene);if(!WebGLPlot.defined(r)||!WebGLPlot.defined(o))return;let a=_0xf52e1d.degreesToCartesian3(r),s=_0xf52e1d.degreesToCartesian3(o);if(0===this._pntsTmp.length)this._pntsTmp.push(a),this._pntsTmp.push(s);else if(2===this._pntsTmp.length){let e=[];e.push(this._pntsTmp[0]),e.push(a),e.push(s),e.push(this._pntsTmp[1]),e.push(this._pntsTmp[0]),this._polygonCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(e),perPositionHeight:!0}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp.push(a),this._pntsTmp.push(s)}else{let e=[];for(e.push(this._pntsTmp[2]),e.push(a),e.push(s),e.push(this._pntsTmp[3]),e.push(this._pntsTmp[2]),this._polygonCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(e),perPositionHeight:!0}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp[2]=a,this._pntsTmp[3]=s;this._polygonCollection.length>this._showPntCount&&this._showPntCount>0;)this._polygonCollection.remove(this._polygonCollection.get(0));for(let e=0,t=0;e<this._polygonCollection.length;e++,t++){let i=(t+1)/this._polygonCollection.length,n=this._calcGradientColor(i),r=this._polygonCollection.get(e);null!=r&&(r.appearance.material.uniforms.color=n)}}}_updateTrackWall(e){let t=_0xf52e1d.degreesToCartesian3(e.getPosition());if(0===this._pntsTmp.length)this._pntsTmp.push(t);else if(1===this._pntsTmp.length){let e=[];e.push(this._pntsTmp[0]),e.push(t),this._wallCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.WallGeometry({positions:e}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp.push(t)}else{let e=[];for(e.push(this._pntsTmp[1]),e.push(t),this._wallCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.WallGeometry({positions:e}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp[1]=t;this._wallCollection.length>this._showPntCount&&this._showPntCount>0;)this._wallCollection.remove(this._wallCollection.get(0));for(let e=0,t=0;e<this._wallCollection.length;e++,t++){let i=(t+1)/this._wallCollection.length,n=this._calcGradientColor(i),r=this._wallCollection.get(e);null!=r&&(r.appearance.material.uniforms.color=n)}}}_calcGradientColor(e){let t=this._initialColor;if(this._aryGradientColors.length>0){let i=this._aryGradientColors.slice().reverse(),n=i.length-1,r=1;for(;r/n<=e&&r<n;)r++;let o=r-1,a=o/n,s=i[o],l=i[o+1];if(e===a)t=new WebGLPlot.Color(s.r,s.g,s.b,s.a);else{let i=(e-a)*n,r=s.red+(l.red-s.red)*i,o=s.green+(l.green-s.green)*i,u=s.blue+(l.blue-s.blue)*i,c=s.alpha+(l.alpha-s.alpha)*i;t=new WebGLPlot.Color(r,o,u,c)}}return t}}const _0x153df0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x47f188=_0x153df0(void 0,(function(){return _0x47f188.toString().search("(((.+)+)+)+$").toString().constructor(_0x47f188).search("(((.+)+)+)+$")}));_0x47f188();class _0x42e779 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.ATTACKLINE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAttackline"+WebGLPlot$e.createGuid(),this._visible=WebGLPlot$e.defaultValue(e.visible,!0),this._pathInfo=WebGLPlot$e.defaultValue(e.pathInfo,[{totalLengthProportion:.3,relativeHeight:200},{totalLengthProportion:.5,relativeHeight:100},{totalLengthProportion:.7,relativeHeight:300}]),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,-.5,.5)),WebGLPlot$e.defined(e.start)&&(this._start=new WebGLPlot$e.Cartesian3.fromDegrees(e.start.x,e.start.y,e.start.z)),WebGLPlot$e.defined(e.target)&&(this._target=new WebGLPlot$e.Cartesian3.fromDegrees(e.target.x,e.target.y,e.target.z)),this._attactModelPath=WebGLPlot$e.defaultValue(e.attactModelPath,""),this._attactModelScale=WebGLPlot$e.defaultValue(e.attactModelScale,40),this._during=WebGLPlot$e.defaultValue(e.during,5),this._lineWide=WebGLPlot$e.defaultValue(e.lineWide,1),this._lineColor=WebGLPlot$e.defaultValue(e.lineColor,new WebGLPlot$e.Color(0,255,0)),this._Attackline=void 0,this._modelLinePrimitice=void 0,this._ispause=!1,this._isBack=!1,this._isForward=!1,this._isRewind=!1}setPathInfo(e){this._pathInfo=e,this._initialized=!1}getPathInfo(){return this._pathInfo}setStartpoint(e){this._start=e,this._initialized=!1}getStartpoint(){return _0xf52e1d.cartesian3ToDegrees(this._start)}setTargetpoint(e){this._target=e,this._initialized=!1}getTargetpoint(){return _0xf52e1d.cartesian3ToDegrees(this._target)}setAttactModelPath(e){this._attactModelPath=decodeURI(e),this._initialized=!1}getAttactModelPath(){return this._attactModelPath}setAttactModelScale(e){this._attactModelScale=e,this._initialized=!1}getAttactModelScale(){return this._attactModelScale}setDuring(e){this._during=e,this._initialized=!1}getDuring(){return this._during}setLineWide(e){this._lineWide=e,this._initialized=!1}getLineWide(){return this._lineWide}setLineColor(e){this._lineColor=e,this._initialized=!1}getLineColor(){return this._lineColor}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible);let t=[];if(!e.hasOwnProperty("pathInfo")){e.pathInfo=t;for(var i=0;i<this._pathInfo.length;i++)!e.pathInfo.hasOwnProperty("totalLengthProportion")&&!e.pathInfo.hasOwnProperty("relativeHeight")&&e.pathInfo.push({totalLengthProportion:this._pathInfo[i].totalLengthProportion,relativeHeight:this._pathInfo[i].relativeHeight})}return e.hasOwnProperty("start")||(e.start=this._start),e.hasOwnProperty("target")||(e.target=this._target),e.hasOwnProperty("attactModelPath")||(e.attactModelPath=this._attactModelPath),e.hasOwnProperty("attactModelScale")||(e.attactModelScale=this._attactModelScale),e.hasOwnProperty("during")||(e.during=this._during),e.hasOwnProperty("lineWide")||(e.lineWide=this._lineWide),e.hasOwnProperty("lineColor")||(e.lineColor=_0xf52e1d.colorToObject(this._lineColor)),WebGLPlot$e.toJSON(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);if(WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),this._pathInfo=[],WebGLPlot$e.defined(t.pathInfo))for(var i=0;i<t.pathInfo.length;i++)WebGLPlot$e.defined(t.pathInfo[i].totalLengthProportion),WebGLPlot$e.defined(t.pathInfo[i].relativeHeight)&&this._pathInfo.push({totalLengthProportion:t.pathInfo[i].totalLengthProportion,relativeHeight:t.pathInfo[i].relativeHeight});WebGLPlot$e.defined(t.start)&&(this._start=t.start),WebGLPlot$e.defined(t.target)&&(this._target=t.target),WebGLPlot$e.defined(t.attactModelPath)&&(this._attactModelPath=t.attactModelPath),WebGLPlot$e.defined(t.attactModelScale)&&(this._attactModelScale=t.attactModelScale),WebGLPlot$e.defined(t.during)&&(this._during=t.during),WebGLPlot$e.defined(t.lineWide)&&(this._lineWide=t.lineWide),WebGLPlot$e.defined(t.lineColor)&&(this._lineColor=_0xf52e1d.objectToColor(t.lineColor))}clone(){let e=new _0x42e779;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pathInfo=this._pathInfo,e._start=this._start,e._target=this._target,e._attactModelPath=this._attactModelPath,e._attactModelScale=this._attactModelScale,e._during=this._during,e._lineWide=this._lineWide,e._lineColor=this._lineColor.clone(),e._initialized=this._initialized,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e}_addEffectToScene(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return!1;let t=!1,i=this._createAttackline(e);if(!WebGLPlot$e.defined(i))return!1;if(this._Attackline=i,WebGLPlot$e.defined(this._Attackline)){var n=this._start,r=this._target,o=this._pathInfo,a=this._during,s=this._calPoints(n,r,o),l=this._createCurve3D(s),u=this._getAllDistance(l.curvePath3D)/(1e3*a),c=WebGLPlot$e.JulianDate.fromDate(new Date),h=0,d=new WebGLPlot$e.HeadingPitchRoll,f=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west"),p=this._lineColor,_=this._lineWide;this._modelLinePrimitice=e.primitives.add(new WebGLPlot$e.PolylineCollection);var m=l.curvePath3D[0],g=WebGLPlot$e.Cartographic.fromCartesian(m),x=WebGLPlot$e.CesiumMath.toDegrees(g.longitude),y=WebGLPlot$e.CesiumMath.toDegrees(g.latitude),v=g.height;m=[{lon:x,lat:y,height:v}];var $=this;this._ispause,this._isBack,this._isBack,this._isRewind,setInterval((function(){var e,t=WebGLPlot$e.JulianDate.fromDate(new Date),i=1e3*(t.secondsOfDay-c.secondsOfDay);if(c=t,$._ispause)return;e=$._isBack?-u:u,$._isForward&&(h+=2e3*e*1),$._isRewind&&(h-=2e3*e*1);var n=h+i*e*1;h=n;var r=_0xf52e1d.getPositionByDistance(l.curvePath3D,n);let o=r.index;if(!(o>=l.curvePath3D.length||-1==o)){if(o<l.curvePath3D.length-1){var a=l.curvePath3D[o+1];const e=$._getHeading(l.curvePath3D[o],a);e&&(d.heading=e);const t=$._getPitch(l.curvePath3D[o],a);t&&(d.pitch=t)}var s=WebGLPlot$e.Cartographic.fromCartesian(r.point),g=[{lon:WebGLPlot$e.CesiumMath.toDegrees(s.longitude),lat:WebGLPlot$e.CesiumMath.toDegrees(s.latitude),height:s.height}],x=new WebGLPlot$e.Cartesian3.fromDegreesArrayHeights([m[0].lon,m[0].lat,m[0].height,g[0].lon,g[0].lat,g[0].height]),y=new WebGLPlot$e.Matrix4;WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(r.point,d,WebGLPlot$e.Ellipsoid.WGS84,f,y);var v=WebGLPlot$e.Matrix3.fromRotationZ(WebGLPlot$e.CesiumMath.toRadians(180));y=WebGLPlot$e.Matrix4.multiplyByMatrix3(y,v,new WebGLPlot$e.Matrix4),WebGLPlot$e.defined(y)&&WebGLPlot$e.defined($._Attackline)&&($._Attackline.modelMatrix=y,$._modelLinePrimitice.add({positions:x,width:_,material:new WebGLPlot$e.Material.fromType("Color",{color:p})})),m=g}}),30),t=!0}return t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._Attackline)&&WebGLPlot$e.defined(this._modelLinePrimitice)&&(e.primitives.contains(this._Attackline)&&(e.primitives.remove(this._Attackline),this._Attackline=null),e.primitives.contains(this._modelLinePrimitice)&&(e.primitives.remove(this._modelLinePrimitice),this._modelLinePrimitice=null))}setGeoEntityParameter(e,t){this._geoEntityParameter=e}_createAttackline(e){var t,i,n=this._attactModelPath,r=this._pathInfo,o=this._attactModelScale;let a=this._calcControlPoint(this._start,this._geoEntityParameter,this._pntOffset,e),s=this._calcControlPoint(this._target,this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(a)&&!WebGLPlot$e.defined(s))return null;t=_0xf52e1d.getPositionFromModelMatrix(a),i=_0xf52e1d.getPositionFromModelMatrix(s);var l=this._calPoints(t,i,r),u=this._createCurve3D(l),c=new WebGLPlot$e.HeadingPitchRoll;const h=this._getHeading(u.curvePath3D[0],u.curvePath3D[1]);h&&(c.heading=h);const d=this._getPitch(u.curvePath3D[0],u.curvePath3D[1]);d&&(c.pitch=d);var f=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west"),p=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(u.curvePath3D[0],c,WebGLPlot$e.Ellipsoid.WGS84,f);return viewer.scene.primitives.add(WebGLPlot$e.Model.fromGltf({url:n,scale:o,modelMatrix:p}))}_calPoints(e,t,i){var n=[];n.push(e);for(var r=e.x-t.x,o=e.y-t.y,a=e.z-t.z,s=0;s<i.length;s++){var l=i[s].totalLengthProportion,u=new WebGLPlot$e.Cartesian3(e.x-r*l,e.y-o*l,e.z-a*l+i[s].relativeHeight);n.push(u)}return n.push(t),n}_getHeading(e,t){let i=WebGLPlot$e.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$e.Cartesian3.subtract(t,e,new Cesium.Cartesian3),r=WebGLPlot$e.Matrix4.multiplyByPointAsVector(WebGLPlot$e.Matrix4.inverse(i,new WebGLPlot$e.Matrix4),n,new WebGLPlot$e.Cartesian3),o=WebGLPlot$e.Cartesian3.normalize(r,new WebGLPlot$e.Cartesian3),a=Math.atan2(o.y,o.x)-WebGLPlot$e.CesiumMath.PI_OVER_TWO;return WebGLPlot$e.CesiumMath.TWO_PI-WebGLPlot$e.CesiumMath.zeroToTwoPi(a)}_getPitch(e,t){let i=WebGLPlot$e.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$e.Cartesian3.subtract(t,e,new WebGLPlot$e.Cartesian3),r=WebGLPlot$e.Matrix4.multiplyByPointAsVector(WebGLPlot$e.Matrix4.inverse(i,i),n,n);return WebGLPlot$e.Cartesian3.normalize(r,r),WebGLPlot$e.CesiumMath.PI_OVER_TWO-WebGLPlot$e.CesiumMath.acosClamped(r.z)}_getAllDistance(e){let t=0;for(let i=0;i<e.length-1;i++){let n=e[i],r=e[i+1];t+=WebGLPlot$e.Cartesian3.distance(n,r)}return t}_createCurve3D(e){let t=this._getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$e.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new WebGLPlot$e.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_calcControlPoint(e,t,i,n){const r=t.getModelRotate(),o=WebGLPlot$e.HeadingPitchRoll.fromDegrees(r.z,r.x,r.y,new WebGLPlot$e.HeadingPitchRoll),a=_0xf52e1d.degreesToCartesian3(e);let s=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west");const l=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(a,o,WebGLPlot$e.Ellipsoid.WGS84,s),u=t.getModelScale(),c=t.getModelPath(),h=_0xf52e1d.getModelSize({modelPath:c,scene:n});if(!WebGLPlot$e.defined(h))return null;const d=WebGLPlot$e.Cartesian3.fromElements(h.x*i.x*u,h.y*i.y*u,h.z*i.z*u),f=WebGLPlot$e.Matrix4.multiplyByTranslation(l,d,new WebGLPlot$e.Matrix4),p=WebGLPlot$e.HeadingPitchRoll.fromDegrees(0,90,0,new WebGLPlot$e.HeadingPitchRoll),_=WebGLPlot$e.Matrix3.fromHeadingPitchRoll(p,new WebGLPlot$e.Matrix3);return WebGLPlot$e.Matrix4.multiplyByMatrix3(f,_,new WebGLPlot$e.Matrix4)}}const _0x32af59=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x13965d=_0x32af59(void 0,(function(){return _0x13965d.toString().search("(((.+)+)+)+$").toString().constructor(_0x13965d).search("(((.+)+)+)+$")}));_0x13965d();const _0x1ed5fe={ColorMode:0,TextureMode:1};var _0xa16fcf=Object.freeze(_0x1ed5fe);const _0x278aca=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x411935=_0x278aca(void 0,(function(){return _0x411935.toString().search("(((.+)+)+)+$").toString().constructor(_0x411935).search("(((.+)+)+)+$")}));_0x411935();class _0x3cd5dc extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._UUID="GeoEntityEffectScanWave_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new WebGLPlot$e.Cartesian3(0,.5,.5)),this._type=WebGLPlot$e.defaultValue(e.type,_0xaadec6.SCANWAVE),this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._length=WebGLPlot$e.defaultValue(e.length,15),this._width=WebGLPlot$e.defaultValue(e.width,5),this._height=WebGLPlot$e.defaultValue(e.height,3),this._scanAngle=WebGLPlot$e.defaultValue(e.scanAngle,30),this._sectionSlices=WebGLPlot$e.defaultValue(e.sectionSlices,360),this._initRotate=WebGLPlot$e.defaultValue(e.initRotate,new WebGLPlot$e.Cartesian3(90,0,0)),this._repeatCount=WebGLPlot$e.defaultValue(e.repeatCount,8),this._flowSpeed=WebGLPlot$e.defaultValue(e.flowSpeed,3),this._scanAxis=WebGLPlot$e.defaultValue(e.scanAxis,0),this._scanSpeed=WebGLPlot$e.defaultValue(e.scanSpeed,.5),this._picturePath=WebGLPlot$e.defaultValue(e.picturePath,""),this._pictureColorScale=WebGLPlot$e.defaultValue(e.pictureColorScale,5),this._colorBack=WebGLPlot$e.defaultValue(e.colorBack,new WebGLPlot$e.Color(0,1,0,.3)),this._colorBackScale=WebGLPlot$e.defaultValue(e.colorBackScale,1),this._colorForward=WebGLPlot$e.defaultValue(e.colorForward,new WebGLPlot$e.Color(1,1,0,1)),this._colorForwardScale=WebGLPlot$e.defaultValue(e.colorForwardScale,5),this._colorForwardLengthRatio=WebGLPlot$e.defaultValue(e.colorForwardLengthRatio,.08),this._sectionAngle=WebGLPlot$e.defaultValue(e.sectionAngle,360),this._mode=WebGLPlot$e.defaultValue(e.mode,_0xa16fcf.ColorMode),this._scanWavePrimitive=void 0,this._currentRotateDirection=1,this._currentRotateDirectionAngle=0}getLength(){return this._length}setLength(e){this._length=e,this._initialized=!1}getWidth(){return this._width}setWidth(e){this._width=e,this._initialized=!1}getHeight(){return this._height}setHeight(e){this._height=e,this._initialized=!1}getScanAngle(){return this._scanAngle}setScanAngle(e){this._scanAngle=e}getSectionSlices(){return this._sectionSlices}setSectionSlices(e){this._sectionSlices=e,this._initialized=!1}getInitRotate(){return this._initRotate}setInitRotate(e){this._initRotate=e,this._initialized=!1}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getFlowSpeed(){return this._flowSpeed}setFlowSpeed(e){this._flowSpeed=e,this._initialized=!1}getScanAxis(){return this._scanAxis}setScanAxis(e){this._scanAxis=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getPicturePath(){return this._picturePath}setPicturePath(e){this._picturePath=e,this._initialized=!1}getPictureColorScale(){return this._pictureColorScale}setPictureColorScale(e){this._pictureColorScale=e,this._initialized=!1}getColorBack(){return this._colorBack}setColorBack(e){this._colorBack=e,this._initialized=!1}getColorBackScale(){return this._colorBackScale}setColorBackScale(e){this._colorBackScale=e,this._initialized=!1}getColorForward(){return this._colorForward}setColorForward(e){this._colorForward=e,this._initialized=!1}getColorForwardScale(){return this._colorForwardScale}setColorForwardScale(e){this._colorForwardScale=e,this._initialized=!1}getColorForwardLengthRatio(){return this._colorForwardLengthRatio}setColorForwardLengthRatio(e){this._colorForwardLengthRatio=e,this._initialized=!1}getSectionAngle(){return this._sectionAngle}setSectionAngle(e){this._sectionAngle=e,this._initialized=!1}getMode(){return this._mode}setMode(e){this._mode=e,this._initialized=!1}_addEffectToScene(e){let t=!1;return this._scanWavePrimitive=this._createScanWavePrimitive(e),WebGLPlot$e.defined(this._scanWavePrimitive)&&(e.primitives.add(this._scanWavePrimitive),t=!0),t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._scanWavePrimitive)&&e.primitives.contains(this._scanWavePrimitive)&&e.primitives.remove(this._scanWavePrimitive),this._scanWavePrimitive=void 0}_executeFunction(e){if(!WebGLPlot$e.defined(this._scanWavePrimitive)||!this._visible||this._scanAngle<=0)return;let t=this._scanAngle/2;(this._currentRotateDirectionAngle>t||this._currentRotateDirectionAngle<-t)&&(this._currentRotateDirection=-this._currentRotateDirection);let i=this._scanSpeed*this._currentRotateDirection;this._currentRotateDirectionAngle+=i;let n=this._getRotateMatrix(i);this._scanWavePrimitive.modelMatrix=WebGLPlot$e.Matrix4.multiplyByMatrix3(this._scanWavePrimitive.modelMatrix,n,new WebGLPlot$e.Matrix4)}_getRotateMatrix(e){let t;return 0===this._scanAxis?t=WebGLPlot$e.Matrix3.fromRotationX(WebGLPlot$e.CesiumMath.toRadians(e)):1===this._scanAxis?t=WebGLPlot$e.Matrix3.fromRotationY(WebGLPlot$e.CesiumMath.toRadians(e)):2===this._scanAxis&&(t=WebGLPlot$e.Matrix3.fromRotationZ(WebGLPlot$e.CesiumMath.toRadians(e))),t}_createScanWavePrimitive(e){this._currentRotateDirection=1,this._currentRotateDirectionAngle=0;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=this._generateGeometry();if(!WebGLPlot$e.defined(i))return;let n,r="";r=this._mode===_0xa16fcf.ColorMode?" uniform vec4 colorForward; uniform float colorForwardScale; uniform vec4 colorBack; uniform float colorBackScale; uniform float repeat; uniform float flowSpeed; uniform float colorForwardLengthRatio; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); float sp = 1.0 / repeat; float dis = materialInput.st.t; float m = mod(dis - fract(czm_frameNumber * 0.001 * flowSpeed), sp); if(m <= sp * colorForwardLengthRatio){ material.diffuse = colorForward.rgb * colorForwardScale; material.alpha = colorForward.a; } else { material.diffuse = colorBack.rgb * colorBackScale; material.alpha = colorBack.a; } return material; }":" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }",n=this._mode===_0xa16fcf.ColorMode?new WebGLPlot$e.Material({fabric:{uniforms:{colorForward:this._colorForward,colorForwardScale:this._colorForwardScale,colorBack:this._colorBack,colorBackScale:this._colorBackScale,repeat:this._repeatCount,flowSpeed:this._flowSpeed,colorForwardLengthRatio:this._colorForwardLengthRatio},source:r},translucent:!0}):new WebGLPlot$e.Material({fabric:{uniforms:{picture:this._picturePath,pictureColorScale:this._pictureColorScale,repeat:new WebGLPlot$e.Cartesian2(1,this._repeatCount),flowSpeed:this._flowSpeed},source:r},translucent:!0});let o=e.frameState;o.scene3DOnly=!0;let a=new WebGLPlot$e.MaterialAppearance({material:n,faceForward:!1,closed:!0,frameState:o});return new WebGLPlot$e.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$e.GeometryInstance({geometry:i}),asynchronous:!1,appearance:a,modelMatrix:t})}_generateGeometry(){let e=this._sectionSlices,t=new Array(3*(e+1)),i=this._sectionAngle/e;for(let n=0;n<e+1;n++)if(0==n)t[3*n]=0,t[3*n+1]=0,t[3*n+2]=0;else{let e=_0xf52e1d.circlePoint(new WebGLPlot$e.Cartesian2(0,0),this._height,this._width,i*n);t[3*n]=e.x,t[3*n+1]=e.y,t[3*n+2]=-this._length}let n=new Float64Array(t),r=WebGLPlot$e.BoundingSphere.fromVertices(t),o=new Array(3*e);for(let t=0;t<e;t++)t==e-1?(o[3*t]=0,o[3*t+1]=t+1,o[3*t+2]=1):(o[3*t]=0,o[3*t+1]=t+1,o[3*t+2]=t+2);this._sectionAngle<360&&o.splice(o.length-3,3);let a=new Uint16Array(o),s=new Array(4*(e+1));for(let t=0;t<e+1;t++)s[4*t]=1,s[4*t+1]=1,s[4*t+2]=1,s[4*t+3]=1;let l=new Array(2*(e+1));if(this._mode===_0xa16fcf.ColorMode)for(let t=0;t<e+1;t++)0==t?(l[2*t]=0,l[2*t+1]=0):(l[2*t]=0,l[2*t+1]=1);else for(let t=0;t<e+1;t++)0==t?(l[2*t]=.5,l[2*t+1]=0):(l[2*t]=1/e/2+1/e*(t-1),l[2*t+1]=1);let u=new WebGLPlot$e.GeometryAttributes;return u.position=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n}),u.color=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:new Float32Array(s)}),u.st=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(l)}),new WebGLPlot$e.Geometry({attributes:u,indices:a,primitiveType:WebGLPlot$e.PrimitiveType.TRIANGLES,boundingSphere:r})}_calcModelMatrix(e,t){let i=WebGLPlot$e.Matrix3.fromRotationX(WebGLPlot$e.CesiumMath.toRadians(t.x));return e=WebGLPlot$e.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$e.Matrix4),i=WebGLPlot$e.Matrix3.fromRotationY(WebGLPlot$e.CesiumMath.toRadians(t.y)),e=WebGLPlot$e.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$e.Matrix4),i=WebGLPlot$e.Matrix3.fromRotationZ(WebGLPlot$e.CesiumMath.toRadians(t.z)),e=WebGLPlot$e.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$e.Matrix4)}_calcControlPoint(e,t,i){const n=_0xf52e1d.calcControlPosMatrix(e,t,i);if(!WebGLPlot$e.defined(n))return null;const r=WebGLPlot$e.HeadingPitchRoll.fromDegrees(this._initRotate.z,this._initRotate.x,this._initRotate.y,new WebGLPlot$e.HeadingPitchRoll),o=WebGLPlot$e.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$e.Matrix3);return WebGLPlot$e.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$e.Matrix4)}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._scanWavePrimitive)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);if(WebGLPlot$e.defined(t)){let e=this._getRotateMatrix(this._currentRotateDirectionAngle);this._scanWavePrimitive.modelMatrix=WebGLPlot$e.Matrix4.multiplyByMatrix3(t,e,new WebGLPlot$e.Matrix4)}}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._length*=t,this._width*=t,this._height*=t,this._initialized=!1}}this._geoEntityParameter=e}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("length")||(e.length=this._length),e.hasOwnProperty("width")||(e.width=this._width),e.hasOwnProperty("height")||(e.height=this._height),e.hasOwnProperty("scanAngle")||(e.scanAngle=this._scanAngle),e.hasOwnProperty("sectionSlices")||(e.sectionSlices=this._sectionAngle),e.hasOwnProperty("initRotate")||(e.initRotate={x:this._initRotate.x,y:this._initRotate.y,z:this._initRotate.z}),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("flowSpeed")||(e.flowSpeed=this._flowSpeed),e.hasOwnProperty("scanAxis")||(e.scanAxis=this._scanAxis),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("picturePath")||(e._picturePath=this._picturePath),e.hasOwnProperty("pictureColorScale")||(e.pictureColorScale=this._pictureColorScale),e.hasOwnProperty("colorBack")||(e.colorBack=_0xf52e1d.colorToObject(this._colorBack)),e.hasOwnProperty("colorBackScale")||(e.colorBackScale=this._colorBackScale),e.hasOwnProperty("colorForward")||(e.colorForward=_0xf52e1d.colorToObject(this._colorForward)),e.hasOwnProperty("colorForwardScale")||(e.colorForwardScale=this._colorForwardScale),e.hasOwnProperty("colorForwardLengthRatio")||(e.colorForwardLengthRatio=this._colorForwardLengthRatio),e.hasOwnProperty("sectionAngle")||(e.sectionAngle=this._sectionAngle),e.hasOwnProperty("mode")||(e.mode=this._mode),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$e.defined(t.length)&&(this._length=t.length),WebGLPlot$e.defined(t.width)&&(this._width=t.width),WebGLPlot$e.defined(t.height)&&(this._height=t.height),WebGLPlot$e.defined(t.scanAngle)&&(this._scanAngle=t.scanAngle),WebGLPlot$e.defined(t.sectionSlices)&&(this._sectionSlices=t.sectionSlices),WebGLPlot$e.defined(t.initRotate)&&(this._initRotate=new WebGLPlot$e.Cartesian3(t.initRotate.x,t.initRotate.y,t.initRotate.z)),WebGLPlot$e.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$e.defined(this.flowSpeed)&&(this._flowSpeed=t.flowSpeed),WebGLPlot$e.defined(t.scanAxis)&&(this._scanAxis=t.scanAxis),WebGLPlot$e.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$e.defined(t.picturePath)&&(this._picturePath=t.picturePath),WebGLPlot$e.defined(t.pictureColorScale)&&(this._pictureColorScale=t.pictureColorScale),WebGLPlot$e.defined(t.colorBack)&&(this._colorBack=_0xf52e1d.objectToColor(t.colorBack)),WebGLPlot$e.defined(t.colorBackScale)&&(this._colorBackScale=t.colorBackScale),WebGLPlot$e.defined(t.colorForward)&&(this._colorForward=_0xf52e1d.objectToColor(t.colorForward)),WebGLPlot$e.defined(t.colorForwardScale)&&(this._colorForwardScale=t.colorForwardScale),WebGLPlot$e.defined(t.colorForwardLengthRatio)&&(this._colorForwardLengthRatio=t.colorForwardLengthRatio),WebGLPlot$e.defined(t.sectionAngle)&&(this._sectionAngle=t.sectionAngle),WebGLPlot$e.defined(t.mode)&&(this._mode=t.mode)}clone(){let e=new _0x3cd5dc;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new WebGLPlot$e.Cartesian3(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._length=this._length,e._width=this._width,e._height=this._height,e._scanAngle=this._scanAngle,e._sectionSlices=this._sectionSlices,e._initRotate=this._initRotate,e._repeatCount=this._repeatCount,e._flowSpeed=this._flowSpeed,e._scanAxis=this._scanAxis,e._scanSpeed=this._scanSpeed,e._picturePath=this._picturePath,e._pictureColorScale=this._pictureColorScale,e._colorBack=this._colorBack.clone(),e._colorBackScale=this._colorBackScale,e._colorForward=this._colorForward.clone(),e._colorForwardScale=this._colorForwardScale,e._colorForwardLengthRatio=this._colorForwardLengthRatio,e._sectionAngle=this._sectionAngle,e._mode=this._mode,e}}const _0x798c14=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x238bc0=_0x798c14(void 0,(function(){return _0x238bc0.toString().search("(((.+)+)+)+$").toString().constructor(_0x238bc0).search("(((.+)+)+)+$")}));_0x238bc0();class _0x236442 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.BURST,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectBurst_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,.5)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._burstDiameter=WebGLPlot$e.defaultValue(e.burstDiameter,50),this._paricleBurst=void 0}setBurstDiameter(e){this._burstDiameter=e,this._initialized=!1}getBurstDiameter(){return this._burstDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._paricleBurst)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._paricleBurst.emitterModelMatrix=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._burstDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._paricleBurst=this._createBurstParticle(e),WebGLPlot$e.defined(this._paricleBurst)&&(e.primitives.add(this._paricleBurst),t=!0),t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._paricleBurst)&&e.primitives.contains(this._paricleBurst)&&e.primitives.remove(this._paricleBurst),this._paricleBurst=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("burstDiameter")||(e.burstDiameter=this._burstDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.burstDiameter)&&(this._burstDiameter=t.burstDiameter),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x236442;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._burstDiameter=this._burstDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createBurstParticle(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset)||!WebGLPlot$e.defined(this._burstDiameter)||this._burstDiameter<=0)return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=this._burstDiameter/1,n=1*i;n<.5&&(n=.5);let r=2*i,o=2*i;return new WebGLPlot$e.ParticleSystem({image:_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/explosion.png",startColor:new Cesium.Color(1,1,1,1),endColor:new Cesium.Color(.5,0,0,0),startScale:1,endScale:.8,minimumParticleLife:.5,maximumParticleLife:1.2,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$e.Cartesian2(n,n),emissionRate:300,lifetime:1,bursts:[{time:0,minimum:500,maximum:500},{time:1,minimum:500,maximum:500}],loop:!0,emitterModelMatrix:t,emitter:new Cesium.SphereEmitter(n),sizeInMeters:!0})}_calcControlPoint(e,t,i){let n=_0xf52e1d.calcControlPoint(e,t,i);return WebGLPlot$e.defined(n)?WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(_0xf52e1d.degreesToCartesian3(n),new WebGLPlot$e.HeadingPitchRoll,WebGLPlot$e.Ellipsoid.WGS84,WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west")):null}}const _0x2372e1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3b6372=_0x2372e1(void 0,(function(){return _0x3b6372.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b6372).search("(((.+)+)+)+$")}));_0x3b6372();class _0x458424 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,-.5,.5)),this._type=_0xaadec6.AUGMENT,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAugment_"+WebGLPlot$e.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._augmentPicture=WebGLPlot$e.defaultValue(e.augmentPicture,_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/AugPicture/Augment_Blue.png"),this._pictureWidth=WebGLPlot$e.defaultValue(e.pictureWidth,50),this._pictureHeight=WebGLPlot$e.defaultValue(e.pictureHeight,50),this._minDistanceDisplay=WebGLPlot$e.defaultValue(e.minDistanceDisplay,10),this._maxDistanceDisplay=WebGLPlot$e.defaultValue(e.maxDistanceDisplay,5e4),this._augmentCollection=null,this._augmentGeo=null}setAugmentPicture(e){this._augmentPicture=e,this._initialized=!1}getAugmentPicture(){return this._augmentPicture}setPictureWidth(e){this._pictureWidth=e,this._initialized=!1}getPictureWidth(){return this._pictureWidth}setPictureHeight(e){this._pictureHeight=e,this._initialized=!1}getPictureHeight(){return this._pictureHeight}setMinDistanceDisplay(e){this._minDistanceDisplay=e,this._initialized=!1}getMinDistanceDisplay(){return this._minDistanceDisplay}setMaxDistanceDisplay(e){this._maxDistanceDisplay=e,this._initialized=!1}getMaxDistanceDisplay(){return this._maxDistanceDisplay}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._augmentGeo)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())){let t=_0xf52e1d.degreesToCartesian3(e.getPosition());WebGLPlot$e.defined(t)&&(this._augmentGeo.position=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._pictureWidth*=t,this._pictureHeight*=t,this._initialized=!1}}this._geoEntityParameter=e}_executeFunction(e){if(!WebGLPlot$e.defined(this._augmentGeo)||!WebGLPlot$e.defined(this._geoEntityParameter)||!this._augmentGeo.show)return;let t=Math.abs(WebGLPlot$e.CesiumMath.toDegrees(e.camera.pitch))/90*this._pictureHeight;t!=this._augmentGeo.height&&(this._augmentGeo.height=t)}_addEffectToScene(e){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(this._augmentPicture))return!1;if(!WebGLPlot$e.defined(this._geoEntityParameter))return;let t=_0xf52e1d.degreesToCartesian3(this._geoEntityParameter.getPosition());return this._augmentCollection=e.primitives.add(new WebGLPlot$e.BillboardCollection),this._augmentGeo=this._augmentCollection.add({position:t,image:this._augmentPicture,horizontalOrigin:WebGLPlot$e.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$e.VerticalOrigin.CENTER,distanceDisplayCondition:new WebGLPlot$e.DistanceDisplayCondition(this._minDistanceDisplay,this._maxDistanceDisplay),show:!0,width:this._pictureWidth,height:this._pictureHeight}),!!WebGLPlot$e.defined(this._augmentGeo)}_removeEffectFromScene(e){WebGLPlot$e.defined(this._augmentGeo)&&WebGLPlot$e.defined(this._augmentCollection)&&e.primitives.contains(this._augmentCollection)&&(e.primitives.remove(this._augmentCollection),this._augmentCollection=void 0,this._augmentGeo=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel),e.hasOwnProperty("augmentPicture")||(e.augmentPicture=this._augmentPicture),e.hasOwnProperty("pictureWidth")||(e.pictureWidth=this._pictureWidth),e.hasOwnProperty("pictureHeight")||(e.pictureHeight=this._pictureHeight),e.hasOwnProperty("minDistanceDisplay")||(e.minDistanceDisplay=this._minDistanceDisplay),e.hasOwnProperty("maxDistanceDisplay")||(e.maxDistanceDisplay=this._maxDistanceDisplay),e.hasOwnProperty("visible")||(e.visible=this._visible);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.augmentPicture)&&(this._augmentPicture=t.augmentPicture),WebGLPlot$e.defined(t.pictureWidth)&&(this._pictureWidth=t.pictureWidth),WebGLPlot$e.defined(t.pictureHeight)&&(this._pictureHeight=t.pictureHeight),WebGLPlot$e.defined(t.minDistanceDisplay)&&(this._minDistanceDisplay=t.minDistanceDisplay),WebGLPlot$e.defined(t.maxDistanceDisplay)&&(this._maxDistanceDisplay=t.maxDistanceDisplay),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x458424;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._augmentPicture=this._augmentPicture,e._pictureWidth=this._pictureWidth,e._pictureHeight=this._pictureHeight,e._minDistanceDisplay=this._minDistanceDisplay,e._maxDistanceDisplay=this._maxDistanceDisplay,e}}const _0x7765a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x975dda=_0x7765a(void 0,(function(){return _0x975dda.toString().search("(((.+)+)+)+$").toString().constructor(_0x975dda).search("(((.+)+)+)+$")}));_0x975dda();const _0xf4d434={ScanCone_ARC:0,ScanCone_FLAT:1};var _0x1892f9=Object.freeze(_0xf4d434);const _0x548510=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe5ec3=_0x548510(void 0,(function(){return _0xe5ec3.toString().search("(((.+)+)+)+$").toString().constructor(_0xe5ec3).search("(((.+)+)+)+$")}));_0xe5ec3();class _0x524880 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,.3,.5)),this._type=_0xaadec6.SCANCONE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectScancone_"+WebGLPlot$e.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$e.defaultValue(e.radius,15e3),this._scanHAngle=WebGLPlot$e.defaultValue(e.scanHAngle,50),this._scanVAngle=WebGLPlot$e.defaultValue(e.scanVAngle,30),this._cellAngle=WebGLPlot$e.defaultValue(e.cellAngle,5),this._isFill=WebGLPlot$e.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$e.defaultValue(e.fillColor,new WebGLPlot$e.Color(1,0,0,.3)),this._isOutline=WebGLPlot$e.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$e.defaultValue(e.outlineColor,new WebGLPlot$e.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$e.defaultValue(e.outlineWidth,1),this._scanConeType=WebGLPlot$e.defaultValue(e.scanConeType,_0x1892f9.ScanCone_ARC),this._scanSpeed=WebGLPlot$e.defaultValue(e.scanSpeed,.5),this._pitchAngle=WebGLPlot$e.defaultValue(e.pitchAngle,0),this._scanRange=WebGLPlot$e.defaultValue(e.scanRange,30),this._linePrimitiveCone=null,this._fillPrimitiveCone=null,this._currentScanAngle=0,this._unitScanAngle=1}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._fillPrimitiveCone)||WebGLPlot$e.defined(this._linePrimitiveCone)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,new _0x23de81(this._pitchAngle,this._currentScanAngle,0),this._scene);WebGLPlot$e.defined(t)&&(WebGLPlot$e.defined(this._fillPrimitiveCone)&&(this._fillPrimitiveCone.modelMatrix=t),WebGLPlot$e.defined(this._linePrimitiveCone)&&(this._linePrimitiveCone.modelMatrix=t))}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){this._currentScanAngle=0;let t=!1;if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return!1;let i=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,new _0x23de81(this._pitchAngle,0,0),e);return!!WebGLPlot$e.defined(i)&&(this._isOutline&&(this._linePrimitiveCone=this._createLinePrimitiveCone(i),WebGLPlot$e.defined(this._linePrimitiveCone)&&(e.primitives.add(this._linePrimitiveCone),t=!0)),this._isFill&&(this._fillPrimitiveCone=this._createFillPrimitiveCone(i),WebGLPlot$e.defined(this._fillPrimitiveCone)&&(e.primitives.add(this._fillPrimitiveCone),t=!0)),t)}_removeEffectFromScene(e){WebGLPlot$e.defined(this._linePrimitiveCone)&&e.primitives.contains(this._linePrimitiveCone)&&e.primitives.remove(this._linePrimitiveCone),WebGLPlot$e.defined(this._fillPrimitiveCone)&&e.primitives.contains(this._fillPrimitiveCone)&&e.primitives.remove(this._fillPrimitiveCone),this._linePrimitiveCone=null,this._fillPrimitiveCone=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("radius")||(e.radius=this._radius),e.hasOwnProperty("scanHAngle")||(e.scanHAngle=this._scanHAngle),e.hasOwnProperty("scanVAngle")||(e.scanVAngle=this._scanVAngle),e.hasOwnProperty("cellAngle")||(e.cellAngle=this._cellAngle),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),e.hasOwnProperty("outlineWidth")||(e.outlineWidth=this._outlineWidth),e.hasOwnProperty("scanConeType")||(e.scanConeType=this._scanConeType),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("pitchAngle")||(e.pitchAngle=this._pitchAngle),e.hasOwnProperty("scanRange")||(e.scanRange=this._scanRange),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$e.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$e.defined(t.scanHAngle)&&(this._scanHAngle=t.scanHAngle),WebGLPlot$e.defined(t.scanVAngle)&&(this._scanVAngle=t.scanVAngle),WebGLPlot$e.defined(t.cellAngle)&&(this._cellAngle=t.cellAngle),WebGLPlot$e.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$e.defined(t.fillColor)&&(this._fillColor=WebGLPlot$e.Color.fromCssColorString(t.fillColor)),WebGLPlot$e.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$e.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$e.Color.fromCssColorString(t.outlineColor)),WebGLPlot$e.defined(t.outlineWidth)&&(this._outlineWidth=t.outlineWidth),WebGLPlot$e.defined(t.scanConeType)&&(this._scanConeType=t.scanConeType),WebGLPlot$e.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$e.defined(t.pitchAngle)&&(this._pitchAngle=t.pitchAngle),WebGLPlot$e.defined(t.scanRange)&&(this._scanRange=t.scanRange)}clone(){let e=new _0x524880;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._radius=this._radius,e._scanHAngle=this._scanHAngle,e._scanVAngle=this._scanVAngle,e._cellAngle=this._cellAngle,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth,e._scanConeType=this._scanConeType,e._scanSpeed=this._scanSpeed,e._pitchAngle=this._pitchAngle,e._scanRange=this._scanRange,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanHAngle(e){this._scanHAngle=e,this._initialized=!1}getScanHAngle(){return this._scanHAngle}setScanVAngle(e){this._scanVAngle=e,this._initialized=!1}getScanVAngle(){return this._scanVAngle}setCellAngle(e){this._cellAngle=e,this._initialized=!1}getCellAngle(){return this._cellAngle}setIsFill(e){this._isFill=e,this._initialized=!1}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e,this._initialized=!1}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e,this._initialized=!1}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e,this._initialized=!1}getOutlineColor(){return this._outlineColor}setOutlineWidth(e){this._outlineWidth=e,this._initialized=!1}getOutlineWidth(){return this._outlineWidth}setScanConeType(e){this._scanConeType=e,this._initialized=!1}getScanConeType(){return this._scanConeType}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setPitchAngle(e){this._pitchAngle=e,this._initialized=!1}getPitchAngle(){return this._pitchAngle}setScanRange(e){this._scanRange=e}getScanRange(){return this._scanRange}_executeFunction(e){if(!WebGLPlot$e.defined(this._linePrimitiveCone)&&!WebGLPlot$e.defined(this._fillPrimitiveCone)||!this._visible||this._scanRange<=0)return;let t=this._scanRange/2;(this._currentScanAngle>t||this._currentScanAngle<-t)&&(this._unitScanAngle=-this._unitScanAngle);let i=this._scanSpeed*this._unitScanAngle;this._currentScanAngle+=i;let n=WebGLPlot$e.Matrix3.fromRotationZ(WebGLPlot$e.CesiumMath.toRadians(i));WebGLPlot$e.defined(this._linePrimitiveCone)&&(this._linePrimitiveCone.modelMatrix=WebGLPlot$e.Matrix4.multiplyByMatrix3(this._linePrimitiveCone.modelMatrix,n,new WebGLPlot$e.Matrix4)),WebGLPlot$e.defined(this._fillPrimitiveCone)&&(this._fillPrimitiveCone.modelMatrix=WebGLPlot$e.Matrix4.multiplyByMatrix3(this._fillPrimitiveCone.modelMatrix,n,new WebGLPlot$e.Matrix4))}_createFillPrimitiveCone(e){if(!WebGLPlot$e.defined(e))return null;let t=this._createFillGeometry();if(!WebGLPlot$e.defined(t))return null;let i=new WebGLPlot$e.Material({fabric:{type:"Color",uniforms:{color:this._fillColor}},translucent:!0}),n=scene.frameState;n.scene3DOnly=!0;let r=new WebGLPlot$e.MaterialAppearance({material:i,faceForward:!1,closed:!0,frameState:n});return new WebGLPlot$e.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$e.GeometryInstance({geometry:WebGLPlot$e.GeometryPipeline.computeNormal(t)}),asynchronous:!1,modelMatrix:e,appearance:r})}_createLinePrimitiveCone(e){let t=this._outlineWidth,i=this._outlineColor;if(!WebGLPlot$e.defined(e))return null;let n=this._createLineGeometry();return WebGLPlot$e.defined(n)?new WebGLPlot$e.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$e.GeometryInstance({geometry:n,attributes:{show:new WebGLPlot$e.ShowGeometryInstanceAttribute(!0),distanceDisplayCondition:new WebGLPlot$e.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot$e.ColorGeometryInstanceAttribute.fromColor(i),offset:void 0}}),asynchronous:!1,modelMatrix:e,appearance:new WebGLPlot$e.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:t}})}):null}_createFillGeometry(){let e=this._scanConeType,t=this._radius,i=WebGLPlot$e.CesiumMath.toRadians(this._scanVAngle),n=WebGLPlot$e.CesiumMath.toRadians(this._scanHAngle),r=WebGLPlot$e.CesiumMath.toRadians(this._cellAngle);i%r!=0&&(i+=r-i%r),n%r!=0&&(n+=r-n%r);let o=0,a=[],s=0,l=n/r,u=i/r,c=new Array(l*u*6+6*u+6*l),h=[],d=l+1,f=u+1,p=-i/2;for(let i=0;i<f;i++){let n=p+r*i;const o=Math.cos(n)*t,a=Math.sin(n)*t;e==_0x1892f9.ScanCone_ARC?h.push(new WebGLPlot$e.Cartesian2(o,a)):e==_0x1892f9.ScanCone_FLAT&&h.push(new WebGLPlot$e.Cartesian2(t,a))}for(let t=0;t<h.length;t++){const i=h[t];let o=-n/2;for(let t=0;t<d;t++){let n=o+r*t;e==_0x1892f9.ScanCone_ARC?a.push(new WebGLPlot$e.Cartesian3(i.x*Math.cos(n),i.x*Math.sin(n),i.y)):e==_0x1892f9.ScanCone_FLAT&&a.push(new WebGLPlot$e.Cartesian3(i.x,i.x*Math.sin(n),i.y))}}for(let e=0;e<f-1;e++){let t=e*d;for(let e=0;e<d-1;e++)c[s++]=t+e,c[s++]=t+e+1,c[s++]=t+d+e,c[s++]=t+d+e,c[s++]=t+e+1,c[s++]=t+d+e+1}o=a.length;let _=[];for(let e=0;e<f;e++)_.push(a[e*d+d-1]);_.push(new WebGLPlot$e.Cartesian3(0,0,0));for(let e=0;e<f-1;e++)c[s++]=o+(e+1),c[s++]=o+e,c[s++]=o+_.length-1;a=a.concat(_),o=a.length;let m=[];for(let e=0;e<d;e++)m.push(a[e]);m.push(new WebGLPlot$e.Cartesian3(0,0,0));for(let e=0;e<d-1;e++)c[s++]=o+e,c[s++]=o+(e+1),c[s++]=o+m.length-1;a=a.concat(m),o=a.length;let g=[];for(let e=0;e<f;e++)g.push(a[e*d]);g.push(new WebGLPlot$e.Cartesian3(0,0,0));for(let e=0;e<f-1;e++)c[s++]=o+e,c[s++]=o+(e+1),c[s++]=o+g.length-1;a=a.concat(g),o=a.length;let x=[];for(let e=0;e<d;e++)x.push(a[e+(f-1)*d]);x.push(new WebGLPlot$e.Cartesian3(0,0,0));for(let e=0;e<d-1;e++)c[s++]=o+e,c[s++]=o+(e+1),c[s++]=o+x.length-1;a=a.concat(x);let y=this._ptsTransform([a]),v=new Uint16Array(c),$=WebGLPlot$e.BoundingSphere.fromVertices(y),b=new WebGLPlot$e.GeometryAttributes;b.position=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(y)});let T=new Array(y.length/3*2);for(let e=0;e<y.length/3;e+=2)T[e]=1,T[e+1]=1;return b.st=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(T)}),new WebGLPlot$e.Geometry({attributes:b,indices:v,primitiveType:WebGLPlot$e.PrimitiveType.TRIANGLES,boundingSphere:$})}_createLineGeometry(){let e=this._scanConeType,t=this._radius,i=WebGLPlot$e.CesiumMath.toRadians(this._scanVAngle),n=WebGLPlot$e.CesiumMath.toRadians(this._scanHAngle),r=WebGLPlot$e.CesiumMath.toRadians(this._cellAngle);i%r!=0&&(i+=r-i%r),n%r!=0&&(n+=r-n%r);let o=[],a=n/r+1,s=i/r+1,l=[],u=-i/2;for(let i=0;i<s;i++){let n=u+r*i;const o=Math.cos(n)*t,a=Math.sin(n)*t;e==_0x1892f9.ScanCone_ARC?l.push(new WebGLPlot$e.Cartesian2(o,a)):e==_0x1892f9.ScanCone_FLAT&&l.push(new WebGLPlot$e.Cartesian2(t,a))}for(let t=0;t<l.length;t++){const i=l[t];let s=-n/2;for(let t=0;t<a;t++){let n=s+r*t;e==_0x1892f9.ScanCone_ARC?o.push(new WebGLPlot$e.Cartesian3(i.x*Math.cos(n),i.x*Math.sin(n),i.y)):e==_0x1892f9.ScanCone_FLAT&&o.push(new WebGLPlot$e.Cartesian3(i.x,i.x*Math.sin(n),i.y))}}let c=this._ptsTransform([o]),h=a*s,d=WebGLPlot$e.IndexDatatype.createTypedArray(h,4*h+8),f=0,p=h;for(let e=0;e<s;e++)for(let t=0;t<a-1;t++)d[f++]=e*a+t,d[f++]=e*a+t+1;for(let e=0;e<a;e++)for(let t=0;t<s-1;t++)d[f++]=e+t*a,d[f++]=e+(t+1)*a;d[f++]=p,d[f++]=0,d[f++]=p,d[f++]=a-1,d[f++]=p,d[f++]=(s-1)*a,d[f++]=p,d[f++]=s*a-1;let _=new WebGLPlot$e.GeometryAttributes;_.position=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(c)});let m=new Array(c.length/3*2);for(let e=0;e<c.length/3;e+=2)m[e]=1,m[e+1]=1;return _.st=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(m)}),new WebGLPlot$e.Geometry({attributes:_,indices:d,primitiveType:WebGLPlot$e.PrimitiveType.LINES,boundingSphere:WebGLPlot$e.BoundingSphere.fromVertices(c)})}_ptsTransform(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_calcControlPoint(e,t,i,n){const r=_0xf52e1d.calcControlPosMatrix(e,t,n);if(!WebGLPlot$e.defined(r))return null;const o=WebGLPlot$e.HeadingPitchRoll.fromDegrees(i.y,i.x,i.z,new WebGLPlot$e.HeadingPitchRoll),a=WebGLPlot$e.Matrix3.fromHeadingPitchRoll(o,new WebGLPlot$e.Matrix3);return WebGLPlot$e.Matrix4.multiplyByMatrix3(r,a,new WebGLPlot$e.Matrix4)}}const _0x334a8a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x54bb8c=_0x334a8a(void 0,(function(){return _0x54bb8c.toString().search("(((.+)+)+)+$").toString().constructor(_0x54bb8c).search("(((.+)+)+)+$")}));_0x54bb8c();class _0x570f72 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.DETECTIONCONE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectDetecttoncone"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._bottomRadius=WebGLPlot$e.defaultValue(e.bottomRadius,15e4),this._bottomPosition=e.bottomPosition,this._repeatCount=WebGLPlot$e.defaultValue(e.repeatCount,8),this._colorBack=WebGLPlot$e.defaultValue(e.colorBack,new WebGLPlot$e.Color(0,1,0,.3)),this._colorBackScale=WebGLPlot$e.defaultValue(e.colorBackScale,1),this._colorForward=WebGLPlot$e.defaultValue(e.colorForward,new WebGLPlot$e.Color(1,1,0,1)),this._colorForwardScale=WebGLPlot$e.defaultValue(e.colorForwardScale,5),this._flowSpeed=WebGLPlot$e.defaultValue(e.flowSpeed,3),this._mode=WebGLPlot$e.defaultValue(e.mdoe,_0xa16fcf.ColorMode),this._picturePath=WebGLPlot$e.defaultValue(e.picturePath,""),this._pictureColorScale=WebGLPlot$e.defaultValue(e.pictureColorScale,5),this._speed=WebGLPlot$e.defaultValue(e.speed,.005),this._detecttoncone=void 0,this._currentScale=0}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getFlowSpeed(){return this._flowSpeed}setFlowSpeed(e){this._flowSpeed=e,this._initialized=!1}getPicturePath(){return this._picturePath}setPicturePath(e){this._picturePath=e,this._initialized=!1}getPictureColorScale(){return this._pictureColorScale}setPictureColorScale(e){this._pictureColorScale=e,this._initialized=!1}getColorBack(){return this._colorBack}setColorBack(e){this._colorBack=e,this._initialized=!1}getColorBackScale(){return this._colorBackScale}setColorBackScale(e){this._colorBackScale=e,this._initialized=!1}getColorForward(){return this._colorForward}setColorForward(e){this._colorForward=e,this._initialized=!1}getColorForwardScale(){return this._colorForwardScale}setColorForwardScale(e){this._colorForwardScale=e,this._initialized=!1}setRadius(e){this._bottomRadius=e,this._initialized=!1}getRadius(){return this._bottomRadius}setPosition(e){this._bottomPosition=e,this._initialized=!1}getPosition(){return this._bottomPosition}setSpeed(e){this._speed=e,this._initialized=!1}getSpeed(){return this._speed}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("bottomRadius")||(e.bottomRadius=this._bottomRadius),e.hasOwnProperty("bottomPosition")||(e.bottomPosition={x:this._bottomPosition.x,y:this._bottomPosition.y,z:this._bottomPosition.z}),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("flowSpeed")||(e.flowSpeed=this._flowSpeed),e.hasOwnProperty("picturePath")||(e.picturePath=this._picturePath),e.hasOwnProperty("pictureColorScale")||(e.pictureColorScale=this._pictureColorScale),e.hasOwnProperty("colorBack")||(e.colorBack=this._colorBack.toCssColorString()),e.hasOwnProperty("colorBackScale")||(e.colorBackScale=this._colorBackScale),e.hasOwnProperty("colorForward")||(e.colorForward=this._colorForward.toCssColorString()),e.hasOwnProperty("colorForwardScale")||(e.colorForwardScale=this._colorForwardScale),e.hasOwnProperty("mode")||(e.mode=this._mode),e.hasOwnProperty("speed")||(e.speed=this._speed),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$e.defined(t.bottomRadius)&&(this._bottomRadius=t.bottomRadius),WebGLPlot$e.defined(t.bottomPosition)&&(this._bottomPosition=new _0x23de81(t.bottomPosition.x,t.bottomPosition.y,t.bottomPosition.z)),WebGLPlot$e.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$e.defined(this.flowSpeed)&&(this._flowSpeed=t.flowSpeed),WebGLPlot$e.defined(t.picturePath)&&(this._picturePath=t.picturePath),WebGLPlot$e.defined(t.pictureColorScale)&&(this._pictureColorScale=t.pictureColorScale),WebGLPlot$e.defined(t.colorBack)&&(this._colorBack=WebGLPlot$e.Color.fromCssColorString(t.colorBack)),WebGLPlot$e.defined(t.colorBackScale)&&(this._colorBackScale=t.colorBackScale),WebGLPlot$e.defined(t.colorForward)&&(this._colorForward=WebGLPlot$e.Color.fromCssColorString(t.colorForward)),WebGLPlot$e.defined(t.colorForwardScale)&&(this._colorForwardScale=t.colorForwardScale),WebGLPlot$e.defined(t.mode)&&(this._mode=t.mode),WebGLPlot$e.defined(t.speed)&&(this._speed=t.speed)}clone(){let e=new _0x570f72;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bottomRadius=this._bottomRadius,e._bottomPosition=new _0x23de81(this._bottomPosition.x,this._bottomPosition.y,this._bottomPosition.z),e._repeatCount=this._repeatCount,e._flowSpeed=this._flowSpeed,e._pictureColorScale=this._pictureColorScale,e._colorBack=this._colorBack.clone(),e._colorBackScale=this._colorBackScale,e._colorForward=this._colorForward.clone(),e._colorForwardScale=this._colorForwardScale,e._mode=this._mode,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._speed=this._speed}setGeoEntityParameter(e,t){this._geoEntityParameter=e,this._initialized=!1}_executeFunction(e){!WebGLPlot$e.defined(this._detecttoncone)||!this._visible||this._currentScale>1||(this._currentScale+=this._speed,this._detecttoncone.modelMatrix=WebGLPlot$e.Matrix4.setScale(this._detecttoncone.modelMatrix,new WebGLPlot$e.Cartesian3(this._currentScale,this._currentScale,this._currentScale),new WebGLPlot$e.Matrix4))}_addEffectToScene(e){let t=!1;return this._detecttoncone=this._createDetecttoncone(e),WebGLPlot$e.defined(this._detecttoncone)&&(e.primitives.add(this._detecttoncone),t=!0),t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._detecttoncone)&&e.primitives.contains(this._detecttoncone)&&e.primitives.remove(this._detecttoncone),this._currentScale=0,this._detecttoncone=null}_createDetecttoncone(e){let t;t=null!=this._bottomPosition?_0xf52e1d.degreesToCartesian3(this._bottomPosition):WebGLPlot$e.Cartesian3.fromDegrees(this._geoEntityParameter.getPosition().x,this._geoEntityParameter.getPosition().y,0);let i=this._bottomRadius,n=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(n))return null;n=_0xf52e1d.degreesToCartesian3(n);let r=WebGLPlot$e.Transforms.eastNorthUpToFixedFrame(n);if(r=WebGLPlot$e.Matrix4.setScale(r,new WebGLPlot$e.Cartesian3(.005,.005,.005),new WebGLPlot$e.Matrix4),!WebGLPlot$e.defined(r))return null;let o,a="";a=this._mode===_0xa16fcf.ColorMode?" uniform vec4 colorForward; uniform float colorForwardScale; uniform vec4 colorBack; uniform float colorBackScale; uniform float repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); float sp = 1.0 / repeat; vec2 st = materialInput.st; float dis = distance(st, vec2(0.0, 0.0)); float m = mod(dis - fract(czm_frameNumber * 0.001 * flowSpeed), sp); float a = step(sp / repeat * 0.2, m); if(a == 0.0){ material.diffuse = colorForward.rgb * colorForwardScale; material.alpha = colorForward.a; } else { material.diffuse = colorBack.rgb * colorBackScale; material.alpha = colorBack.a; } return material; }":" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }",o=this._mode===_0xa16fcf.ColorMode?new WebGLPlot$e.Material({fabric:{uniforms:{colorForward:this._colorForward,colorForwardScale:this._colorForwardScale,colorBack:this._colorBack,colorBackScale:this._colorBackScale,repeat:this._repeatCount,flowSpeed:this._flowSpeed},source:a},translucent:!0}):new WebGLPlot$e.Material({fabric:{uniforms:{picture:this._picturePath,pictureColorScale:this._pictureColorScale,repeat:new WebGLPlot$e.Cartesian2(1,this._repeatCount),flowSpeed:this._flowSpeed},source:a},translucent:!0});let s=e.frameState;s.scene3DOnly=!0;let l=_0xf52e1d.degreesToCartesian3(this._geoEntityParameter.getPosition()),u=this._generateGeometry(t,l,i),c=new WebGLPlot$e.GeometryInstance({geometry:u});return new WebGLPlot$e.Primitive({geometryInstances:c,appearance:new WebGLPlot$e.MaterialAppearance({material:o,faceForward:!1,closed:!0,frameState:s}),releaseGeometryInstances:!1,modelMatrix:r,asynchronous:!1})}_create(e){let t=this._geoEntityParameter.getPosition(),i=this._geoEntityParameter.getModelRotate(),n=WebGLPlot$e.HeadingPitchRoll.fromDegrees(i.z,i.x,i.y,new WebGLPlot$e.HeadingPitchRoll),r=this._detecttonconeColor,o=this._geoEntityParameter.getPosition().z,a=WebGLPlot$e.Cartesian3.fromDegrees(t.x,t.y,.5*t.z),s=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west");const l=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(a,n,WebGLPlot$e.Ellipsoid.WGS84,s);let u=new WebGLPlot$e.CylinderGeometry({length:o,topRadius:0,bottomRadius:.5*o,vertexFormat:WebGLPlot$e.MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat}),c=new WebGLPlot$e.GeometryInstance({geometry:u,modelMatrix:l,id:"Detecttoncone"});const h=new WebGLPlot$e.Material({fabric:{type:"VtxfShader1",uniforms:{color:r,repeat:30,offset:0,thickness:.3},source:"uniform vec4 color;\n uniform float repeat;\n uniform float offset;\n uniform float thickness;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n float sp = 1.0 / repeat;\n vec2 st = materialInput.st;\n float dis = distance(st,vec2(0.5));\n float m = mod(dis + offset,sp);\n float a = step(sp * (1.0 - thickness), m);\n material.diffuse = color.rgb;\n material.alpha = a*color.a;\n return material;}"},translucent:!1}),d=new WebGLPlot$e.MaterialAppearance({material:h,faceForward:!1,closed:!0});return new WebGLPlot$e.Primitive({geometryInstances:[c],appearance:d})}_generateGeometry(e,t,i){let n=361,r=new Array(1086),o=WebGLPlot$e.Transforms.eastNorthUpToFixedFrame(t),a=WebGLPlot$e.Matrix4.inverse(o,new WebGLPlot$e.Matrix4);WebGLPlot$e.Matrix4.multiplyByPoint(a,t,new WebGLPlot$e.Cartesian3);let s=WebGLPlot$e.Matrix4.multiplyByPoint(a,e,new WebGLPlot$e.Cartesian3),l=this._bottomPosition.z-this._geoEntityParameter.getPosition().z;for(let e=0;e<362;e++)if(0==e)r[3*e]=0,r[3*e+1]=0,r[3*e+2]=0;else{let t=_0xf52e1d.circlePoint(s,i,i,1*e);r[3*e]=t.x,r[3*e+1]=t.y,r[3*e+2]=l}let u=new Float64Array(r),c=WebGLPlot$e.BoundingSphere.fromVertices(r),h=new Array(1083);for(let e=0;e<n;e++)360==e?(h[3*e]=0,h[3*e+1]=e+1,h[3*e+2]=1):(h[3*e]=0,h[3*e+1]=e+1,h[3*e+2]=e+2);h.splice(h.length-3,3);let d=new Uint16Array(h),f=new Array(1448);for(let e=0;e<362;e++)f[4*e]=1,f[4*e+1]=1,f[4*e+2]=1,f[4*e+3]=1;let p=new Array(724);for(let e=0;e<362;e++)0==e?(p[2*e]=0,p[2*e+1]=0):(p[2*e]=1,p[2*e+1]=1);let _=new WebGLPlot$e.GeometryAttributes;return _.position=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),_.color=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:new Float32Array(f)}),_.st=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(p)}),new WebGLPlot$e.Geometry({attributes:_,indices:d,primitiveType:WebGLPlot$e.PrimitiveType.TRIANGLES,boundingSphere:c})}_getRotateMatrix(e){let t;return 0===this._scanAxis?t=WebGLPlot$e.Matrix3.fromRotationX(WebGLPlot$e.CesiumMath.toRadians(e)):1===this._scanAxis?t=WebGLPlot$e.Matrix3.fromRotationY(WebGLPlot$e.CesiumMath.toRadians(e)):2===this._scanAxis&&(t=WebGLPlot$e.Matrix3.fromRotationZ(WebGLPlot$e.CesiumMath.toRadians(e))),t}}const _0x4693d0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x17685f=_0x4693d0(void 0,(function(){return _0x17685f.toString().search("(((.+)+)+)+$").toString().constructor(_0x17685f).search("(((.+)+)+)+$")}));_0x17685f();const _0x361e43={SIMPLE:0,TITLE:1,PICTUREBACKGROUND_WHALE:2,PICTUREBACKGROUND_SCIENCE:3,PICTUREBACKGROUND_FUTURE:4};var _0x1837ea=Object.freeze(_0x361e43);const _0x2b81c7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe69822=_0x2b81c7(void 0,(function(){return _0xe69822.toString().search("(((.+)+)+)+$").toString().constructor(_0xe69822).search("(((.+)+)+)+$")}));_0xe69822();class _0x392050 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,.5)),this._type=_0xaadec6.SIGN,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectSign_"+WebGLPlot$e.createGuid(),this._imagePath=WebGLPlot$e.defaultValue(e.imagePath,""),this._text=WebGLPlot$e.defaultValue(e.text,"飞机"),this._billboardCollection=null,this._signType=WebGLPlot$e.defaultValue(e.signType,_0x1837ea.SIMPLE),this._scale=WebGLPlot$e.defaultValue(e.scale,1)}setImagePath(e){this._imagePath=e,this._initialized=!1}getImagePath(){return this._imagePath}setText(e){this._text=e,this._initialized=!1}getText(){return this._text}setSignType(e){this._signType=e,this._initialized=!1}getSignType(){return this._signType}setScale(e){this._scale=e,this._initialized=!1}getScale(){return this._scale}setGeoEntityParameter(e,t){if(null!=this._billboardCollection&&this._billboardCollection.length>0){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!==e.getShowMode()||e.getShowMode()===_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0xf52e1d.calcControlPoint(e,this._pntOffset,null);WebGLPlot$e.defined(t)&&(t=_0xf52e1d.degreesToCartesian3(t),this._billboardCollection.get(0).position=t)}e.getShowMode()===_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!==e.getModelPath()||this._geoEntityParameter.getModelScale()!==e.getModelScale())&&(this._initialized=!1)}if(WebGLPlot$e.defined(this._geoEntityParameter)){let t=this._geoEntityParameter.getModelScale();this._geoEntityParameter=e,this._bChangeSizeFlowModel||this._geoEntityParameter.setModelScale(t)}else this._geoEntityParameter=e}_addEffectToScene(e){let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);return!!WebGLPlot$e.defined(t)&&(t=_0xf52e1d.degreesToCartesian3(t),this._createSign(e,function(i){if(WebGLPlot$e.defined(this._billboardCollection)||(this._billboardCollection=e.primitives.add(new WebGLPlot$e.BillboardCollection)),0===this._billboardCollection.length&&this._billboardCollection.add({show:!0,position:t,image:i,pixelOffset:new WebGLPlot$e.Cartesian2(0,0),horizontalOrigin:WebGLPlot$e.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$e.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,sizeInMeters:!1,scale:1}),WebGLPlot$e.defined(this._billboardCollection)&&this._billboardCollection.length>0)return this._initialized=!0,!0}.bind(this)),!0)}_removeEffectFromScene(e){WebGLPlot$e.defined(e)&&WebGLPlot$e.defined(this._billboardCollection)&&e.primitives.remove(this._billboardCollection),this._billboardCollection=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("imagePath")||(e.imagePath=this._imagePath),e.hasOwnProperty("text")||(e.text=this._text),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("changeSizeFlowModel")||(e.changeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.imagePath)&&(this._imagePath=t.imagePath),WebGLPlot$e.defined(t.text)&&(this._text=t.text),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.changeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.changeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x392050;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._imagePath=this._imagePath,e._text=this._text,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createSign(e,t){let i="red",n=30,r=30,o=null;if(this._signType===_0x1837ea.SIMPLE&&"string"!=typeof this._text||this._signType!==_0x1837ea.SIMPLE&&"object"!=typeof this._text)return;if(this._signType===_0x1837ea.SIMPLE){let e={element:$('<div id="simpleSign" class="simpleSign"></div>').get(0),style:".simpleSign {z-index: -1;position: absolute;text-align: center;color: rgb(255, 255, 255);background-color:rgb(255,0,0,0.5);border:2px solid red;}"},t=e.element;document.body.appendChild(t);let i=document.createElement("style");i.innerHTML=e.style,document.getElementsByTagName("head").item(0).appendChild(i),t.id=Math.random().toString(15).slice(2,15),t.append(this._text),o=t}else if(this._signType===_0x1837ea.TITLE){let e={element:$('<div id="titleSign" class="titleSign"><div class="titleSignContent-wrapper"><div id="titleSignContent" class="titleSignContent"></div></div></div>').get(0),style:".titleSign {z-index: -1;position: absolute;border:2px solid rgb(0,160,233);padding:0.1px;border-bottom: 2px solid rgb(0,255,0);}.titleSignContent-wrapper {max-height: 200px;overflow-y: auto;text-align: left;/*border-radius: 6px;*/background-color:rgb(164,255,176,0.5);padding: 5px;padding-top: 8px;}.titleSignContent {/* margin: 5px 20px;*/line-height: 0.5;font-size:xx-small;font-weight:normal;}.titleSignContent div {text-align: center;color: rgb(226, 249, 46);}.titleSignContent div {line-height: 1;}.titleSignContent table {margin-left: 2px;margin-right: 2px;color: rgb(238, 154, 78);}.titleSignContent table tr {height: 15px;}"};i="green";let t=e.element;document.body.appendChild(t);let n=document.createElement("style");n.innerHTML=e.style,document.getElementsByTagName("head").item(0).appendChild(n);let r="";for(let e in this._text)"title"===e?r="<div>"+this._text[e]+"</div><table><tbody>":r+="<tr><td>"+e+": </th><td>"+this._text[e]+"</td></tr>";r+="</tbody></table>",t.id=Math.random().toString(15).slice(2,15),$("#titleSignContent").append(r),$("#titleSignContent").get(0).id=Math.random().toString(15).slice(2,15),o=t}else if(this._signType===_0x1837ea.PICTUREBACKGROUND_WHALE||this._signType===_0x1837ea.PICTUREBACKGROUND_SCIENCE||this._signType===_0x1837ea.PICTUREBACKGROUND_FUTURE){let e=_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/鲸鱼.png",t="padding: 20px;padding-right: 45px;";i="#8b9ec6",this._signType===_0x1837ea.PICTUREBACKGROUND_SCIENCE?(e=_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/科技.png",n=36,r=20,t="padding: 20px",i="#1cd0fd"):this._signType===_0x1837ea.PICTUREBACKGROUND_FUTURE&&(e=_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/未来.png",n=45,r=0,t="padding: 20px;padding-top: 55px;padding-bottom: 55px",i="#1cd0fd");let a={element:$('<div id="pictureSign" class="pictureSign"><div class="pictureSign-wrapper"><div id="pictureSignContent" class="pictureSignContent"></div></div></div>').get(0),style:".pictureSign {z-index: -1;position: absolute;background-image: url("+e+");background-size: 100% 100%;"+t+"}.pictureSign-wrapper {max-height: 200px;overflow-y: auto;text-align: left;}.pictureSignContent {line-height: 0.5;font-size:xx-small;font-weight:normal;}.pictureSignContent div {text-align: center;color: rgb(0, 255, 0);}.pictureSignContent div {line-height: 1;}.pictureSignContent table {margin-left: 2px;margin-right: 2px;color: rgb(238, 154, 78);}.pictureSignContent table tr {height: 15px;}"},s=a.element;document.body.appendChild(s);let l=document.createElement("style");l.innerHTML=a.style,document.getElementsByTagName("head").item(0).appendChild(l);let u="";for(let e in this._text)"title"===e?u="<div>"+this._text[e]+"</div><table><tbody>":u+="<tr><td>"+e+": </th><td>"+this._text[e]+"</td></tr>";u+="</tbody></table>",s.id=Math.random().toString(15).slice(2,15),$("#pictureSignContent").append(u),$("#pictureSignContent").get(0).id=Math.random().toString(15).slice(2,15),o=s}let a=o.offsetWidth,s=o.offsetHeight+r,l=document.createElement("canvas");l.width=a*this._scale,l.height=s*this._scale,l.style.width=a+"px",l.style.height=s+"px";let u=l.getContext("2d");u.scale(this._scale,this._scale),u.beginPath(),u.moveTo(a/2,s-n),u.lineTo(a/2,s),u.strokeStyle=i,u.stroke();let c={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:l,width:a,height:s,foreignObjectRendering:!0,tainTest:!1,scale:this._scale};_0x4a4fab(o,c).then((function(e){let i=new Image;i.src=e.toDataURL("image/png",1),document.body.removeChild(o),"function"==typeof t&&t(i)}))}}const _0x12b23a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xeae18=_0x12b23a(void 0,(function(){return _0xeae18.toString().search("(((.+)+)+)+$").toString().constructor(_0xeae18).search("(((.+)+)+)+$")}));_0xeae18();class _0x597b34 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._type=_0xaadec6.ANNULARDIFFUSION,this._name=WebGLPlot.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAnnularDiffusion_"+WebGLPlot.createGuid(),this._bChangeSizeFlowModel=WebGLPlot.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot.defaultValue(e.radius,1e3),this._scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),this._scanSpeed=WebGLPlot.defaultValue(e.scanSpeed,5),WebGLPlot.defined(e.repeat)?this.setRepeat(e.repeat):this._repeat=1,this._diffusionPrimitive=void 0}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanColor(e){this._scanColor=e,this._initialized=!1}getScanColor(){return this._scanColor}setRepeat(e){let t=parseInt(e);t<1?t=1:t>5&&(t=5),this._repeat=t,this._initialized=!1}getRepeat(){return this._repeat}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setGeoEntityParameter(e,t){if(WebGLPlot.defined(this._diffusionPrimitive)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0xf52e1d.calcControlPosMatrix(e,this._pntOffset,this._scene);WebGLPlot.defined(t)&&(this._initialized=!1)}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._diffusionPrimitive=this._createAnnularDiffusion(e),WebGLPlot.defined(this._diffusionPrimitive)&&(e.primitives.add(this._diffusionPrimitive),t=!0),t}_removeEffectFromScene(e){WebGLPlot.defined(this._diffusionPrimitive)&&e.primitives.contains(this._diffusionPrimitive)&&e.primitives.remove(this._diffusionPrimitive),this._diffusionPrimitive=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("radius")||(e.radius=this._radius),e.hasOwnProperty("scanColor")||(e.scanColor=this._scanColor.toCssColorString()),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("repeat")||(e.repeat=this._repeat),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot.defined(e))return;let t=JSON.parse(e);WebGLPlot.defined(t.type)&&(this._type=t.type),WebGLPlot.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot.defined(t.name)&&(this._name=t.name),WebGLPlot.defined(t.radius)&&(this._radius=t.radius),WebGLPlot.defined(t.scanColor)&&(this._scanColor=WebGLPlot.Color.fromCssColorString(t.scanColor)),WebGLPlot.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot.defined(t.repeat)&&(this._repeat=t.repeat),WebGLPlot.defined(t.visible)&&(this._visible=t.visible),WebGLPlot.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot.defined(t.offset)&&(WebGLPlot.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x597b34;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._radius=this._radius,e._scanColor=this._scanColor.clone(),e._scanSpeed=this._scanSpeed,e._repeat=this._repeat,e}_createAnnularDiffusion(){if(!WebGLPlot.defined(this._geoEntityParameter)||!WebGLPlot.defined(this._pntOffset)||!WebGLPlot.defined(this._radius))return null;let e=_0xf52e1d.calcControlPosMatrix(this._geoEntityParameter,this._pntOffset,scene);if(!WebGLPlot.defined(e))return null;let t=_0xf52e1d.getPositionFromModelMatrix(e);let i=new WebGLPlot.Material({fabric:{type:"MyAnnularDiffusion",uniforms:{color:this._scanColor,speed:this._scanSpeed,count:this._repeat,gradient:.2},source:"uniform vec4 color;\n uniform float speed;\n uniform float count;\n uniform float gradient;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(czm_frameNumber * speed / 1000.0);\n vec3 str = materialInput.str;\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = 0.0;\n for(int i = 0; i <= 5; i++){\n if(float(i) <= count){\n disNum = perDis * float(i) - dis + per / count;\n if(disNum > 0.0){\n if(disNum < perDis){\n bl = 1.0 - disNum / perDis;\n } else if(disNum - perDis < perDis){\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl,(1.0 + 10.0 * (1.0 - gradient)));\n }\n }\n }\n }\n return material;\n }"}});return new WebGLPlot.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.EllipseGeometry({center:_0xf52e1d.degreesToCartesian3(t),semiMajorAxis:this._radius,semiMinorAxis:this._radius,height:t.z})}),appearance:new WebGLPlot.EllipsoidSurfaceAppearance({material:i})})}}var _0x1c4ae4=(_0x3957f8=!0,function(e,t){var i=_0x3957f8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3957f8=!1,i}),_0x4cccb7=_0x1c4ae4(void 0,(function(){return _0x4cccb7.toString().search("(((.+)+)+)+$").toString().constructor(_0x4cccb7).search("(((.+)+)+)+$")})),_0x3957f8;_0x4cccb7();var _0x2b898b={UNKNOW:0,BASICLINE:1,DASHLINE:2,METEORLINE:3,TUBULAR:4,ARROW:5},_0x2f1f44=Object.freeze(_0x2b898b);const _0x26f345=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x18bab6=_0x26f345(void 0,(function(){return _0x18bab6.toString().search("(((.+)+)+)+$").toString().constructor(_0x18bab6).search("(((.+)+)+)+$")}));_0x18bab6();class _0x33a928 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.COMMUNICATIONLINK,this._linkType=_0x2f1f44.UNKNOW,this._UUID=WebGLPlot$e.createGuid(),this._bChangeSizeFlowModel=!1,this._startUUID=WebGLPlot$e.defaultValue(e.startUUID,""),this._endUUID=WebGLPlot$e.defaultValue(e.endUUID,""),this._startOffset=WebGLPlot$e.defaultValue(e.startOffset,new _0x23de81(0,0,.5)),this._endOffset=WebGLPlot$e.defaultValue(e.endOffset,new _0x23de81(0,0,.5)),this._maxVisibleDistance=WebGLPlot$e.defaultValue(e.maxVisibleDistance,-1),this._linkPrimitive=void 0,this._pntStart=void 0,this._pntEnd=void 0}getLinkType(){return this._linkType}setStartUUID(e){this._startUUID=e}getStartUUID(){return this._startUUID}setEndUUID(e){this._endUUID=e}getEndUUID(){return this._endUUID}setStartOffset(e){this._startOffset=e}getStartOffset(){return this._startOffset}setEndOffset(e){this._endOffset=e}getEndOffset(){return this._endOffset}setMaxVisibleDistance(e){this._maxVisibleDistance=e}getMaxVisibleDistance(){return this._maxVisibleDistance}_executeFunction(e){if(WebGLPlot$e.defined(this._pntStart)&&WebGLPlot$e.defined(this._pntEnd)&&this._visible){let t=WebGLPlot$e.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),i=WebGLPlot$e.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z),n=Math.sqrt(WebGLPlot$e.Cartesian3.distanceSquared(t,i)),r=!0;-1!=this._maxVisibleDistance&&(r=n<=this._maxVisibleDistance),r&&!WebGLPlot$e.defined(this._linkPrimitive)?this._addEffectToScene(e):!r&&WebGLPlot$e.defined(this._linkPrimitive)&&this._removeEffectFromScene(e)}}}const _0x580857=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2f1834=_0x580857(void 0,(function(){return _0x2f1834.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f1834).search("(((.+)+)+)+$")}));_0x2f1834();class _0x4ec5ba extends _0x33a928{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._linkType=_0x2f1f44.BASICLINE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="BasicLineCommunicationLink_"+WebGLPlot$e.createGuid(),this._speedV=WebGLPlot$e.defaultValue(e.speedV,5),this._lineWidth=WebGLPlot$e.defaultValue(e.lineWidth,1),this._signalLengthRatio=WebGLPlot$e.defaultValue(e.signalLengthRatio,.15),this._signalColor=WebGLPlot$e.defaultValue(e.signalColor,new WebGLPlot$e.Color(.21,1,.027,.78)),this._linkLineColor=WebGLPlot$e.defaultValue(e.linkLineColor,new WebGLPlot$e.Color(.92,.92,.92,.19)),this._bBothWay=WebGLPlot$e.defaultValue(e.bBothWay,!0),this._polylineCollection=void 0,this._linkPrimitive=void 0,this._direct=1;let t=this;this._executeAni=function(e,i){if(!WebGLPlot$e.defined(t._linkPrimitive)||!WebGLPlot$e.defined(t._polylineCollection))return;let n=.001*t._speedV,r=t._linkPrimitive.material.uniforms.start;t._bBothWay?(r<=0&&(t._direct=1),r+t._signalLengthRatio>=1&&(t._direct=-1),r+=n*t._direct):r>.8?r=0:r+=n,t._linkPrimitive.material.uniforms.start=r}}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0xf52e1d.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$e.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0xf52e1d.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$e.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$e.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x1b8e09.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$e.defined(t)&&(this._pntStart=_0xf52e1d.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x1b8e09.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$e.defined(i)&&(this._pntEnd=_0xf52e1d.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$e.defined(this._pntStart)||!WebGLPlot$e.defined(this._pntEnd))return!1;let n=new WebGLPlot$e.Material({fabric:{type:"MyBaseLineMaterial",uniforms:{color:this._signalColor,color1:this._linkLineColor,start:0,signalLengthRatio:this._signalLengthRatio},source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; \n if(st.s > start && st.s < start + signalLengthRatio){ material.diffuse = color.rgb; \n material.alpha = color.a; \n }\n else{\n material.diffuse = color1.rgb; \n material.alpha = color1.a; \n }\n return material;\n }"}});this._polylineCollection=new WebGLPlot$e.PolylineCollection;let r=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(r),width:this._lineWidth,material:n});let o=!1;return WebGLPlot$e.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),e.preUpdate.addEventListener(this._executeAni),o=!0),o}_removeEffectFromScene(e){WebGLPlot$e.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.preUpdate.removeEventListener(this._executeAni),e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("signalLengthRatio")||(e.signalLengthRatio=this._signalLengthRatio),e.hasOwnProperty("signalColor")||(e.signalColor=this._signalColor.toCssColorString()),e.hasOwnProperty("linkLineColor")||(e.linkLineColor=this._linkLineColor.toCssColorString()),e.hasOwnProperty("bBothWay")||(e.bBothWay=this._bBothWay),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$e.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$e.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$e.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$e.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$e.defined(t.signalLengthRatio)&&(this._signalLengthRatio=t.signalLengthRatio),WebGLPlot$e.defined(t.signalColor)&&(this._signalColor=WebGLPlot$e.Color.fromCssColorString(t.signalColor)),WebGLPlot$e.defined(t.linkLineColor)&&(this._linkLineColor=WebGLPlot$e.Color.fromCssColorString(t.linkLineColor)),WebGLPlot$e.defined(t.bBothWay)&&(this._bBothWay=t.bBothWay),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.startOffset)&&(WebGLPlot$e.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$e.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$e.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$e.defined(t.endOffset)&&(WebGLPlot$e.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$e.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$e.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x4ec5ba;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x23de81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x23de81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._signalLengthRatio=this._signalLengthRatio,e._signalColor=WebGLPlot$e.Color.clone(this._signalColor),e._linkLineColor=WebGLPlot$e.Color.clone(this._linkLineColor),e._bBothWay=this._bBothWay,e}setSpeedV(e){this._speedV=e}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setSignalLengthRatio(e){this._signalLengthRatio=e,this._initialized=!1}getSignalLengthRatio(){return this._signalLengthRatio}setSignalColor(e){this._signalColor=e,this._initialized=!1}getSignalColor(){return this._signalColor}setLinkLineColor(e){this._linkLineColor=e,this._initialized=!1}getLinkLineColor(){return this._linkLineColor}setbBothWay(e){this._bBothWay=e}getbBothWay(){return this._bBothWay}}const _0x12e083=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2d83a5=_0x12e083(void 0,(function(){return _0x2d83a5.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d83a5).search("(((.+)+)+)+$")}));_0x2d83a5();class _0x2d907f extends _0x33a928{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._linkType=_0x2f1f44.ARROW,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="ArrowCommunicationLink_"+WebGLPlot$e.createGuid(),this._speedV=WebGLPlot$e.defaultValue(e.speedV,1),this._lineWidth=WebGLPlot$e.defaultValue(e.lineWidth,5),this._repeatCount=WebGLPlot$e.defaultValue(e.repeatCount,50),this._arrowImage=WebGLPlot$e.defaultValue(e.arrowImage,_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/Arrow.png"),this._polylineCollection=null,this._linkPrimitive=void 0}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0xf52e1d.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$e.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0xf52e1d.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$e.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$e.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x1b8e09.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$e.defined(t)&&(this._pntStart=_0xf52e1d.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x1b8e09.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$e.defined(i)&&(this._pntEnd=_0xf52e1d.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$e.defined(this._pntStart)||!WebGLPlot$e.defined(this._pntEnd))return!1;let n=new WebGLPlot$e.Material({fabric:{type:"MyArrowImage",uniforms:{image:this._arrowImage,repeat:new WebGLPlot$e.Cartesian2(this._repeatCount,1),time:this._speedV},source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = repeat * materialInput.st;\n vec4 colorImage = texture2D(image, vec2(fract(st.s - czm_frameNumber * time * 0.005), st.t));\n material.alpha = colorImage.a;\n material.diffuse = colorImage.rgb;\n return material;\n }"}});this._polylineCollection=new WebGLPlot$e.PolylineCollection;let r=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(r),width:this._lineWidth,material:n});let o=!1;return WebGLPlot$e.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),o=!0),o}_removeEffectFromScene(e){WebGLPlot$e.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("arrowImage")||(e.arrowImage=this._arrowImage),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$e.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$e.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$e.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$e.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$e.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$e.defined(t.arrowImage)&&(this._arrowImage=t.arrowImage),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.startOffset)&&(WebGLPlot$e.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$e.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$e.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$e.defined(t.endOffset)&&(WebGLPlot$e.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$e.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$e.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x2d907f;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x23de81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x23de81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._repeatCount=this._repeatCount,e._arrowImage=this._arrowImage,e}setSpeedV(e){this._speedV=e,this._initialized=!1}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getRepeatCount(){return this._repeatCount}setArrowImage(e){this._arrowImage=e,this._initialized=!1}getArrowImage(){return this._arrowImage}}const _0x1b6bac=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe61de3=_0x1b6bac(void 0,(function(){return _0xe61de3.toString().search("(((.+)+)+)+$").toString().constructor(_0xe61de3).search("(((.+)+)+)+$")}));_0xe61de3();class _0x2e6536 extends _0x33a928{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._linkType=_0x2f1f44.TUBULAR,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="TubularCommunicationLink_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,.5)),!WebGLPlot$e.defined(e.sectionSlices)||e.sectionSlices<3||e.sectionSlices>128?this._sectionSlices=60:this._sectionSlices=e.sectionSlices,this._topRadius=WebGLPlot$e.defaultValue(e.topRadius,1e3),this._bottomRadius=WebGLPlot$e.defaultValue(e.bottomRadius,1e3),this._speedV=WebGLPlot$e.defaultValue(e.speedV,1.5),this._repeatCount=WebGLPlot$e.defaultValue(e.repeatCount,10),this._image=WebGLPlot$e.defaultValue(e.image,_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/TubularLinkSpacer.png"),this._linkPrimitive=void 0,this._linkLength=0}getSectionSlices(){return this._sectionSlices}setSectionSlices(e){!WebGLPlot$e.defined(e)||e<3||e>128||(this._sectionSlices=e,this._initialized=!1)}getTopRadius(){return this._topRadius}setTopRadius(e){this._topRadius=e,this._initialized=!1}getBottomRadius(){return this._bottomRadius}setBottomRadius(e){this._bottomRadius=e,this._initialized=!1}getSpeedV(){return this._speedV}setSpeedV(e){this._speedV=e}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e}getImage(){return this._image}setImage(e){this._image=e,this._initialized=!1}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0xf52e1d.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$e.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0xf52e1d.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$e.defined(this._pntEnd)&&(i=!0)),i){let e=this._getModelMatrix(this._pntStart,this._pntEnd),t=WebGLPlot$e.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),i=WebGLPlot$e.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z),n=WebGLPlot$e.Cartesian3.distance(t,i)/this._linkLength;this._linkPrimitive.modelMatrix=WebGLPlot$e.Matrix4.multiplyByScale(e,new WebGLPlot$e.Cartesian3(n,1,1),new WebGLPlot$e.Matrix4)}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;this._pntStart=void 0;let i=_0x1b8e09.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$e.defined(i)&&(this._pntStart=_0xf52e1d.calcControlPoint(i,this._startOffset,e)),this._pntEnd=void 0;let n=_0x1b8e09.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$e.defined(n)&&(this._pntEnd=_0xf52e1d.calcControlPoint(n,this._endOffset,e)),!WebGLPlot$e.defined(this._pntStart)||!WebGLPlot$e.defined(this._pntEnd))return!1;let r=this._getModelMatrix(this._pntStart,this._pntEnd);return!!WebGLPlot$e.defined(r)&&(this._linkPrimitive=this._createFillPrimitive(r),WebGLPlot$e.defined(this._linkPrimitive)&&(e.primitives.add(this._linkPrimitive),t=!0),t)}_removeEffectFromScene(e){WebGLPlot$e.defined(this._linkPrimitive)&&e.primitives.contains(this._linkPrimitive)&&(e.primitives.remove(this._linkPrimitive),this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("sectionSlices")||(e.sectionSlices=this._sectionSlices),e.hasOwnProperty("topRadius")||(e.topRadius=this._topRadius),e.hasOwnProperty("bottomRadius")||(e.bottomRadius=this._bottomRadius),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("image")||(e.image=this._image),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$e.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$e.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$e.defined(t.sectionSlices)&&(this._sectionSlices=t.sectionSlices),WebGLPlot$e.defined(t.topRadius)&&(this._topRadius=t.topRadius),WebGLPlot$e.defined(t.bottomRadius)&&(this._bottomRadius=t.bottomRadius),WebGLPlot$e.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$e.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$e.defined(t.image)&&(this._image=t.image),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.startOffset)&&(WebGLPlot$e.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$e.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$e.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$e.defined(t.endOffset)&&(WebGLPlot$e.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$e.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$e.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x2e6536;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x23de81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x23de81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._sectionSlices=this._sectionSlices,e._topRadius=this._topRadius,e._bottomRadius=this._bottomRadius,e._speedV=this._speedV,e._repeatCount=this._repeatCount,e._image=this._image,e}_getModelMatrix(e,t){const i=_0xf52e1d.degreesToCartesian3(e),n=_0xf52e1d.degreesToCartesian3(t);let r=new WebGLPlot$e.HeadingPitchRoll,o=_0xf52e1d.getHeading(i,n);o&&(r.heading=o);let a=_0xf52e1d.getPitch(i,n);return a&&(r.pitch=a),WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(i,r,WebGLPlot$e.Ellipsoid.WGS84,WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west"))}_createFillPrimitive(e){if(!WebGLPlot$e.defined(e))return null;let t=this._createFillGeometry();if(!WebGLPlot$e.defined(t))return null;let i=new WebGLPlot$e.Material({fabric:{type:"TubularImage",uniforms:{picture:this._image,pictureColorScale:1,repeat:new WebGLPlot$e.Cartesian2(1,this._repeatCount),flowSpeed:this._speedV},source:" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }"}}),n=scene.frameState;n.scene3DOnly=!0;let r=new WebGLPlot$e.MaterialAppearance({material:i,faceForward:!1,closed:!0,frameState:n});return new WebGLPlot$e.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$e.GeometryInstance({geometry:WebGLPlot$e.GeometryPipeline.computeNormal(t)}),asynchronous:!1,modelMatrix:e,appearance:r})}_createFillGeometry(){let e=WebGLPlot$e.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),t=WebGLPlot$e.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z);this._linkLength=WebGLPlot$e.Cartesian3.distance(e,t);let i=this._linkLength,n=this._topRadius,r=this._bottomRadius,o=this._sectionSlices,a=[],s=[],l=WebGLPlot$e.CesiumMath.toRadians(360/o);for(let e=0;e<o;e++){let t=l*e;const o=Math.cos(t)*n,u=Math.sin(t)*n;a.push(new WebGLPlot$e.Cartesian3(0,o,u));const c=Math.cos(t)*r,h=Math.sin(t)*r;s.push(new WebGLPlot$e.Cartesian3(i,c,h))}let u=[],c=s.length;u=a.concat(s);let h=this._ptsTransform([u]),d=WebGLPlot$e.BoundingSphere.fromVertices(h),f=new Array(2*c*3),p=0;for(let e=0;e<c-1;e++)f[p++]=e,f[p++]=e+1,f[p++]=c+e,f[p++]=e+1,f[p++]=c+(e+1),f[p++]=c+e;f[p++]=c-1,f[p++]=0,f[p++]=2*c-1,f[p++]=0,f[p++]=c,f[p++]=2*c-1;let _=new Uint16Array(f),m=new WebGLPlot$e.GeometryAttributes;m.position=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(h)});let g=0,x=2*u.length,y=new Array(x);for(let e=0;e<u.length;e++){let t=e,i=0;e>=c&&(t=e-c,i=1),y[g++]=1*t/c,y[g++]=i}return m.st=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(y)}),new WebGLPlot$e.Geometry({attributes:m,indices:_,primitiveType:WebGLPlot$e.PrimitiveType.TRIANGLES,boundingSphere:d})}_ptsTransform(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}}const _0x289351=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x55e4a4=_0x289351(void 0,(function(){return _0x55e4a4.toString().search("(((.+)+)+)+$").toString().constructor(_0x55e4a4).search("(((.+)+)+)+$")}));_0x55e4a4();class _0x4071a9 extends _0x33a928{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._linkType=_0x2f1f44.METEORLINE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="MeteorCommunicationLink_"+WebGLPlot$e.createGuid(),this._color=WebGLPlot$e.defaultValue(e.color,new WebGLPlot$e.Color(1,1,.3,.8)),this._speedV=WebGLPlot$e.defaultValue(e.speedV,1),this._percent=WebGLPlot$e.defaultValue(e.percent,.1),this._gradient=WebGLPlot$e.defaultValue(e.gradient,.01),this._lineWidth=WebGLPlot$e.defaultValue(e.lineWidth,1),this._linkPrimitive=void 0,this._polylineCollection=void 0}getColor(){return this._color}setColor(e){this._color=e}getSpeedV(){return this._speedV}setSpeedV(e){this._speedV=e}getPercent(){return this._percent}setPercent(e){this._percent=e}getGradient(){return this._gradient}setGradient(e){this._gradient=e}getLineWidth(){return this._lineWidth}setLineWidth(e){this._lineWidth=e}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0xf52e1d.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$e.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0xf52e1d.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$e.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$e.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x1b8e09.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$e.defined(t)&&(this._pntStart=_0xf52e1d.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x1b8e09.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$e.defined(i)&&(this._pntEnd=_0xf52e1d.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$e.defined(this._pntStart)||!WebGLPlot$e.defined(this._pntEnd))return!1;let n=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z],r=new WebGLPlot$e.Material({fabric:{type:"MeteorLine",uniforms:{color:this._color,speedV:this._speedV,percent:this._percent,gradient:this._gradient},source:"\n uniform vec4 color;\n uniform float speedV;\n uniform float percent;\n uniform float gradient;\n \n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float t =fract(czm_frameNumber * speedV / 1000.0);\n t *= (1.0 + percent);\n float alpha = smoothstep(t- percent, t, st.s) * step(-t, -st.s);\n \n if(alpha < 1.0 && alpha > 0.0){\n material.diffuse = color.rgb;\n alpha = alpha * (pow(2.0, alpha * 5.0) / pow(2.0, 5.0));\n }else{\n material.diffuse = color.rgb;\n }\n alpha += gradient;\n material.alpha = alpha;\n \n return material;\n }\n "}});this._polylineCollection=new WebGLPlot$e.PolylineCollection,this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(n),width:this._lineWidth,material:r});let o=!1;return WebGLPlot$e.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),o=!0),o}_removeEffectFromScene(e){WebGLPlot$e.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("color")||(e.color=this._color),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("percent")||(e.percent=this._percent),e.hasOwnProperty("gradient")||(e.gradient=this._gradient),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$e.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$e.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$e.defined(t.color)&&(this._color=t.color),WebGLPlot$e.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$e.defined(t.percent)&&(this._percent=t.percent),WebGLPlot$e.defined(t.gradient)&&(this._gradient=t.gradient),WebGLPlot$e.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.startOffset)&&(WebGLPlot$e.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$e.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$e.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$e.defined(t.endOffset)&&(WebGLPlot$e.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$e.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$e.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x4071a9;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x23de81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x23de81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._color=WebGLPlot$e.Color.clone(this._color),e._speedV=this._speedV,e._percent=this._percent,e._gradient=this._gradient,e._wide=this._wide,e}}const _0xd65e14=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2af003=_0xd65e14(void 0,(function(){return _0x2af003.toString().search("(((.+)+)+)+$").toString().constructor(_0x2af003).search("(((.+)+)+)+$")}));_0x2af003();class _0x124e32 extends _0x33a928{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._linkType=_0x2f1f44.DASHLINE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="DashLineCommunicationLink"+WebGLPlot$e.createGuid(),this._speedV=WebGLPlot$e.defaultValue(e.speedV,5),this._lineWidth=WebGLPlot$e.defaultValue(e.lineWidth,1),this._dashLength=WebGLPlot$e.defaultValue(e.dashLength,30),this._dashPattern=WebGLPlot$e.defaultValue(e.dashPattern,255),this._signalColor=WebGLPlot$e.defaultValue(e.signalColor,new WebGLPlot$e.Color(1,0,0,1)),this._gapColor=WebGLPlot$e.defaultValue(e.gapColor,new WebGLPlot$e.Color(0,0,0,0)),this._polylineCollection=void 0,this._linkPrimitive=void 0}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0xf52e1d.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$e.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0xf52e1d.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$e.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$e.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x1b8e09.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$e.defined(t)&&(this._pntStart=_0xf52e1d.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x1b8e09.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$e.defined(i)&&(this._pntEnd=_0xf52e1d.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$e.defined(this._pntStart)||!WebGLPlot$e.defined(this._pntEnd))return!1;let n=new Cesium.Material({fabric:{type:"MyDashLineMaterial",uniforms:{color:this._signalColor,gapColor:this._gapColor,dashLength:this._dashLength,dashPattern:this._dashPattern,speedV:this._speedV},source:"uniform vec4 gapColor;\n uniform float dashLength;\n uniform float dashPattern;\n uniform float xy;\n varying float v_polylineAngle;\n \n const float maskLength = 16.0;\n \n mat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(\n c, s,\n -s, c\n );\n }\n \n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n \n // Get the relative position within the dash from 0 to 1\n float dashPosition = fract(pos.x/ (dashLength * czm_pixelRatio) + czm_frameNumber * 0.01 * speedV);\n // Figure out the mask index.\n float maskIndex = floor(dashPosition * maskLength);\n // Test the bit mask.\n float maskTest = floor((dashPattern) / pow(2.0, maskIndex));\n vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\n if (fragColor.a < 0.005) { // matches 0/255 and 1/255\n discard;\n }\n \n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n }"},translucent:!0});this._polylineCollection=new WebGLPlot$e.PolylineCollection;let r=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(r),width:this._lineWidth,material:n});let o=!1;return WebGLPlot$e.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),o=!0),o}_removeEffectFromScene(e){WebGLPlot$e.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("dashLength")||(e.dashLength=this._dashLength),e.hasOwnProperty("dashPattern")||(e.dashPattern=this._dashPattern),e.hasOwnProperty("signalColor")||(e.signalColor=this._signalColor.toCssColorString()),e.hasOwnProperty("gapColor")||(e.gapColor=this._gapColor.toCssColorString()),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$e.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$e.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$e.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$e.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$e.defined(t.dashLength)&&(this._dashLength=t.dashLength),WebGLPlot$e.defined(t.dashPattern)&&(this._dashPattern=t.dashPattern),WebGLPlot$e.defined(t.signalColor)&&(this._signalColor=WebGLPlot$e.Color.fromCssColorString(t.signalColor)),WebGLPlot$e.defined(t.gapColor)&&(this._gapColor=WebGLPlot$e.Color.fromCssColorString(t.gapColor)),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.startOffset)&&(WebGLPlot$e.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$e.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$e.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$e.defined(t.endOffset)&&(WebGLPlot$e.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$e.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$e.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x124e32;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x23de81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x23de81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._dashLength=this._dashLength,e._dashPattern=this._dashPattern,e._signalColor=WebGLPlot$e.Color.clone(this._signalColor),e._gapColor=WebGLPlot$e.Color.clone(this._gapColor),e}setSpeedV(e){this._speedV=e}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setDashLength(e){this._dashLength=e,this._initialized=!1}getDashLength(){return this._dashLength}setDashPattern(e){this._dashPattern=e,this._initialized=!1}getDashPattern(){return this._dashPattern}setSignalColor(e){this._signalColor=e,this._initialized=!1}getSignalColor(){return this._signalColor}setGapColor(e){this._gapColor=e,this._initialized=!1}getGapColor(){return this._gapColor}}const _0x432e25=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x49380d=_0x432e25(void 0,(function(){return _0x49380d.toString().search("(((.+)+)+)+$").toString().constructor(_0x49380d).search("(((.+)+)+)+$")}));_0x49380d();class _0x2ceb89{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._shadows=WebGLPlot$e.defaultValue(e.shadows,WebGLPlot$e.ShadowMode.DISABLED),this._isFill=WebGLPlot$e.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$e.defaultValue(e.fillColor,new WebGLPlot$e.Color(1,1,0,.5)),this._isOutline=WebGLPlot$e.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$e.defaultValue(e.outlineColor,new WebGLPlot$e.Color(1,1,0,1))}setShadows(e){this._shadows=e}getShadows(){return this._shadows}setIsFill(e){this._isFill=e}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e}getOutlineColor(){return this._outlineColor}toJSON(){let e={};return e.hasOwnProperty("shadows")||(e.shadows=this._shadows),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.shadows)&&(this._shadows=t.shadows),WebGLPlot$e.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$e.defined(t.fillColor)&&(this._fillColor=WebGLPlot$e.Color.fromCssColorString(t.fillColor)),WebGLPlot$e.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$e.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$e.Color.fromCssColorString(t.outlineColor))}clone(){let e=new _0x2ceb89;return e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e}_updateScan(e){e.shadows=this._shadows,e.isFill=this._isFill,e.fillColor=this._fillColor.clone(),e.isOutline=this._isOutline,e.outlineColor=this._outlineColor.clone()}}const _0x1540c7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5c7c85=_0x1540c7(void 0,(function(){return _0x5c7c85.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c7c85).search("(((.+)+)+)+$")}));_0x5c7c85();class _0x208f92 extends _0x1b7397{constructor(e){if(super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.RADAR,this._radarType=_0x2c0193.PlotCustomRadar,this._UUID=WebGLPlot$e.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._scanSpeed=WebGLPlot$e.defaultValue(e.scanSpeed,60),this._shadows=WebGLPlot$e.defaultValue(e.shadows,WebGLPlot$e.ShadowMode.DISABLED),this._isFill=WebGLPlot$e.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$e.defaultValue(e.fillColor,new WebGLPlot$e.Color(1,0,0,.3)),this._isOutline=WebGLPlot$e.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$e.defaultValue(e.outlineColor,new WebGLPlot$e.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$e.defaultValue(e.outlineWidth,1),this._isShowScan=!0,WebGLPlot$e.defined(e.arrGeoEntityEffectRadarScans))this._arrGeoEntityEffectRadarScans=e.arrGeoEntityEffectRadarScans;else{let e=[];for(let t=0;t<3;t++){let t=new _0x2ceb89;e.push(t)}this._arrGeoEntityEffectRadarScans=e}}getRadarType(){return this._radarType}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setShadows(e){this._shadows=e,this._initialized=!1}getShadows(){return this._shadows}setIsFill(e){this._isFill=e,this._initialized=!1}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e,this._initialized=!1}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e,this._initialized=!1}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e,this._initialized=!1}getOutlineColor(){return this._outlineColor}setOutlineWidth(e){this._outlineWidth=e,this._initialized=!1}getOutlineWidth(){return this._outlineWidth}getGeoEntityEffectRadarScans(){return this._arrGeoEntityEffectRadarScans}setGeoEntityEffectRadarScans(e){this._arrGeoEntityEffectRadarScans=e,this._initialized=!1}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("shadows")||(e.shadows=this._shadows),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),e.hasOwnProperty("outlineWidth")||(e.outlineWidth=this._outlineWidth);let t=[];return e.hasOwnProperty("arrGeoEntityEffectRadarScans")||(e.arrGeoEntityEffectRadarScans=t,this._arrGeoEntityEffectRadarScans.forEach((e=>{t.push(e.toJSON())}))),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$e.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$e.defined(t.shadows)&&(this._shadows=t.shadows),WebGLPlot$e.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$e.defined(t.fillColor)&&(this._fillColor=WebGLPlot$e.Color.fromCssColorString(t.fillColor)),WebGLPlot$e.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$e.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$e.Color.fromCssColorString(t.outlineColor)),WebGLPlot$e.defined(t.outlineWidth)&&(this._outlineWidth=t.outlineWidth),this._arrGeoEntityEffectRadarScans=[],t.arrGeoEntityEffectRadarScans.forEach((e=>{let t=new _0x2ceb89;t.fromJSON(e),this._arrGeoEntityEffectRadarScans.push(t)}))}}const _0x4bc750=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3c07f6=_0x4bc750(void 0,(function(){return _0x3c07f6.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c07f6).search("(((.+)+)+)+$")}));_0x3c07f6();class _0x57d7b0 extends _0x208f92{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._radarType=_0x2c0193.PlotMechanicalRadar,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectMechanicalRadar_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$e.defaultValue(e.radius,15e4),this._mechanicalRadar=null,this._cellAngle=5,this._isShowScan=!0}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._mechanicalRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0xf52e1d.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._mechanicalRadar.point=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._mechanicalRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return null;let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=new _0x23de81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x2bcc5b.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._mechanicalRadar=new _0x28b85b({id:this._UUID,point:t,rotate:new WebGLPlot$e.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,cellAngle:this._cellAngle,radii:new WebGLPlot$e.Cartesian3(this._radius,this._radius,this._radius),isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$e.defined(this._mechanicalRadar))return!1;let n=this._mechanicalRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._mechanicalRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$e.defined(this._mechanicalRadar)&&(this._mechanicalRadar.destroy(),this._mechanicalRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$e.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$e.defined(t.radius)&&(this._radius=t.radius)}clone(){let e=new _0x57d7b0;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}}const _0x5e9747=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4c4c3c=_0x5e9747(void 0,(function(){return _0x4c4c3c.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c4c3c).search("(((.+)+)+)+$")}));_0x4c4c3c();class _0x3897ec extends _0x208f92{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._radarType=_0x2c0193.PlotParameterRadar,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectParameterRadar_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$e.defaultValue(e.radius,15e4),this._innerRadius=WebGLPlot$e.defaultValue(e.innerRadius,5e3),this._minimumClock=WebGLPlot$e.defaultValue(e.minimumClock,0),this._maximumClock=WebGLPlot$e.defaultValue(e.maximumClock,360),this._minimumCone=WebGLPlot$e.defaultValue(e.minimumCone,0),this._maximumCone=WebGLPlot$e.defaultValue(e.maximumCone,90),this._parameterRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._parameterRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0xf52e1d.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._parameterRadar.point=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._parameterRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._innerRadius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return null;let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=new _0x23de81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x2bcc5b.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._parameterRadar=new _0x3f4ebc({id:this._UUID,point:t,rotate:new WebGLPlot$e.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,radii:new WebGLPlot$e.Cartesian3(this._radius,this._radius,this._radius),innerRadii:new WebGLPlot$e.Cartesian3(this._innerRadius,this._innerRadius,this._innerRadius),minimumClock:this._minimumClock,maximumClock:this._maximumClock,minimumCone:this._minimumCone,maximumCone:this._maximumCone,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$e.defined(this._parameterRadar))return!1;let n=this._parameterRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._parameterRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$e.defined(this._parameterRadar)&&(this._parameterRadar.destroy(),this._parameterRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),t.hasOwnProperty("innerRadius")||(t.innerRadius=this._innerRadius),t.hasOwnProperty("minimumClock")||(t.minimumClock=this._minimumClock),t.hasOwnProperty("maximumClock")||(t.maximumClock=this._maximumClock),t.hasOwnProperty("minimumCone")||(t.minimumCone=this._minimumCone),t.hasOwnProperty("maximumCone")||(t.maximumCone=this._maximumCone),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$e.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$e.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$e.defined(t.innerRadius)&&(this._innerRadius=t.innerRadius),WebGLPlot$e.defined(t.minimumClock)&&(this._minimumClock=t.minimumClock),WebGLPlot$e.defined(t.maximumClock)&&(this._maximumClock=t.maximumClock),WebGLPlot$e.defined(t.minimumCone)&&(this._minimumCone=t.minimumCone),WebGLPlot$e.defined(t.maximumCone)&&(this._maximumCone=t.maximumCone)}clone(){let e=new _0x3897ec;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e._innerRadius=this._innerRadius,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setInnerRadius(e){this._innerRadius=e,this._initialized=!1}getInnerRadius(){return this._innerRadius}setMinimumClock(e){this._minimumClock=e,this._initialized=!1}getMinimumClock(){return this._minimumClock}setMaximumClock(e){this._maximumClock=e,this._initialized=!1}getMaximumClock(){return this._maximumClock}setMinimumCone(e){this._minimumCone=e,this._initialized=!1}getMinimumCone(){return this._minimumCone}setMaximumCone(e){this._maximumCone=e,this._initialized=!1}getMaximumCone(){return this._maximumCone}}const _0x198536=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4532b0=_0x198536(void 0,(function(){return _0x4532b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x4532b0).search("(((.+)+)+)+$")}));_0x4532b0();class _0x54c3a0 extends _0x208f92{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._radarType=_0x2c0193.PlotWarningRadar,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectWarningRadar_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$e.defaultValue(e.radius,15e4),this._warningRadar=null,this._cellAngle=5}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._warningRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0xf52e1d.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._warningRadar.point=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._warningRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return null;let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=new _0x23de81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x2bcc5b.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._warningRadar=new _0x46b837({id:this._UUID,point:t,rotate:new WebGLPlot$e.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,cellAngle:this._cellAngle,radii:new WebGLPlot$e.Cartesian3(this._radius,this._radius,this._radius),isFill:this._isFill,fillColor:this._fillColor.clone(),isOutline:this._isOutline,outlineColor:this._outlineColor.clone(),outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$e.defined(this._warningRadar))return!1;let n=this._warningRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._warningRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$e.defined(this._warningRadar)&&(this._warningRadar.destroy(),this._warningRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$e.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$e.defined(t.radius)&&(this._radius=t.radius)}clone(){let e=new _0x54c3a0;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}}const _0x3744cb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3875ee=_0x3744cb(void 0,(function(){return _0x3875ee.toString().search("(((.+)+)+)+$").toString().constructor(_0x3875ee).search("(((.+)+)+)+$")}));_0x3875ee();class _0xc2c75d extends _0x208f92{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._radarType=_0x2c0193.PlotScanRadar,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectScanRadar_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._scanSpeed=WebGLPlot$e.defaultValue(e.scanSpeed,30),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$e.defaultValue(e.radius,15e4),this._scanVAngle=WebGLPlot$e.defaultValue(e.scanVAngle,30),this._scanHAngle=WebGLPlot$e.defaultValue(e.scanHAngle,90),this._cellAngle=WebGLPlot$e.defaultValue(e.cellAngle,5),this._scanColor=WebGLPlot$e.defaultValue(e.scanColor,new WebGLPlot$e.Color(1,0,0,.3)),this._scanedColor=WebGLPlot$e.defaultValue(e.scanedColor,new WebGLPlot$e.Color(0,1,0,.3)),this._scanRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._scanRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0xf52e1d.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._scanRadar.point=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._scanRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return null;let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=new _0x23de81(0,0,0);return this._geoEntityParameter.getShowMode()==_0x2bcc5b.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._scanRadar=new _0x49f493({id:this._UUID,point:t,rotate:new WebGLPlot$e.Cartesian3(i.x,i.y,i.z-45),scale:this._radius,dScanSpeed:this._scanSpeed,shadows:this._shadows,scanVAngle:this._scanVAngle,scanHAngle:this._scanHAngle,cellAngle:this._cellAngle,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanColor:this._scanColor,scanedColor:this._scanedColor,show:!0},e),!!WebGLPlot$e.defined(this._scanRadar)}_removeEffectFromScene(e){WebGLPlot$e.defined(this._scanRadar)&&(this._scanRadar.destroy(),this._scanRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),t.hasOwnProperty("scanVAngle")||(t.scanVAngle=this._scanVAngle),t.hasOwnProperty("scanHAngle")||(t.scanHAngle=this._scanHAngle),t.hasOwnProperty("cellAngle")||(t.cellAngle=this._cellAngle),t.hasOwnProperty("scanColor")||(t.scanColor=this._scanColor.toCssColorString()),t.hasOwnProperty("scanedColor")||(t.scanedColor=this._scanedColor.toCssColorString()),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$e.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$e.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$e.defined(t.scanVAngle)&&(this._scanVAngle=t.scanVAngle),WebGLPlot$e.defined(t.scanHAngle)&&(this._scanHAngle=t.scanHAngle),WebGLPlot$e.defined(t.cellAngle)&&(this._cellAngle=t.cellAngle),WebGLPlot$e.defined(t.scanColor)&&(this._scanColor=WebGLPlot$e.Color.fromCssColorString(t.scanColor)),WebGLPlot$e.defined(t.scanedColor)&&(this._scanedColor=WebGLPlot$e.Color.fromCssColorString(t.scanedColor))}clone(){let e=new _0xc2c75d;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e._scanVAngle=this._scanVAngle,e._scanHAngle=this._scanHAngle,e._cellAngle=this._cellAngle,e._scanColor=this._scanColor.clone(),e._scanedColor=this._scanedColor.clone(),e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanVAngle(e){this._scanVAngle=e}getScanVAngle(){return this._scanVAngle}setScanHAngle(e){this._scanHAngle=e}getScanHAngle(){return this._scanHAngle}setCellAngle(e){this._cellAngle=e}getCellAngle(){return this._cellAngle}setScanColor(e){this._scanColor=e}getScanColor(){return this._scanColor}setScanedColor(e){this._scanedColor=e}getScanedColor(){return this._scanedColor}}const _0x15091e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x404e16=_0x15091e(void 0,(function(){return _0x404e16.toString().search("(((.+)+)+)+$").toString().constructor(_0x404e16).search("(((.+)+)+)+$")}));_0x404e16();class _0x425466 extends _0x208f92{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._radarType=_0x2c0193.PlotRotateRadar,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectRotateRadar_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0);var t=[new WebGLPlot$e.Cartesian3(0,2e3,0),new WebGLPlot$e.Cartesian3(2e4,8e3,0),new WebGLPlot$e.Cartesian3(4e4,2e3,0),new WebGLPlot$e.Cartesian3(0,2e3,0)];this._customPts=WebGLPlot$e.defaultValue(e.customPts,t),this._customAngle=WebGLPlot$e.defaultValue(e.customAngle,360),this._rotateRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._rotateRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0xf52e1d.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._rotateRadar.point=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._rotateRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._rotateRadar.scale*=t}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return null;let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=new _0x23de81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x2bcc5b.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._rotateRadar=new _0xbdfb44({id:this._UUID,point:t,rotate:new WebGLPlot$e.Cartesian3(i.x,i.y,i.z-45),dScanSpeed:this._scanSpeed,shadows:this._shadows,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,customPts:this._customPts,rotateAngle:this._customAngle,slicePartitions:this._customAngle/5,show:!0},e),!WebGLPlot$e.defined(this._rotateRadar))return!1;this._rotateRadar.scale=this._geoEntityParameter.getModelScale();let n=this._rotateRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._rotateRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$e.defined(this._rotateRadar)&&(this._rotateRadar.destroy(),this._rotateRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("customAngle")||(t.customAngle=this._customAngle);return t.hasOwnProperty("customPts")||(t.customPts=[]),this._customPts.forEach((e=>{t.customPts.push({x:e.x,y:e.y,z:e.z})})),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$e.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$e.defined(t.customAngle)&&(this._customAngle=t.customAngle),WebGLPlot$e.defined(t.customPts)&&(this._customPts=[],t.customPts.forEach((e=>{this._customPts.push(new WebGLPlot$e.Cartesian3(e.x,e.y,e.z))})))}clone(){let e=new _0x425466;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._customAngle=this._customAngle,e._customPts=[],this._customPts.forEach((t=>{e._customPts.push(new WebGLPlot$e.Cartesian3(t.x,t.y,t.z))})),e}}const _0x48b0c4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x23d3ab=_0x48b0c4(void 0,(function(){return _0x23d3ab.toString().search("(((.+)+)+)+$").toString().constructor(_0x23d3ab).search("(((.+)+)+)+$")}));_0x23d3ab();class _0x1b8e09{constructor(){}static createGeoEntityEffectFromJson(e){let t,i,n,r,o=JSON.parse(e);return WebGLPlot$e.defined(o.type)&&(i=o.type,o.type===_0xaadec6.COMMUNICATIONLINK?WebGLPlot$e.defined(o.linkType)&&(n=o.linkType):o.type===_0xaadec6.RADAR&&WebGLPlot$e.defined(o.radarType)&&(r=o.radarType),t=this.createGeoEntityEffectFromType({effectType:i,linkType:n,radarType:r}),WebGLPlot$e.defined(t)&&t.fromJSON(e)),t}static createGeoEntityEffectFromType(e){let t,i=(e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT)).effectType,n=e.linkType,r=e.radarType;switch(i){case _0xaadec6.WAKE:case _0xaadec6.ROTORWASH:break;case _0xaadec6.FIRESMOKE:t=new _0x492aac;break;case _0xaadec6.BURST:t=new _0x236442;break;case _0xaadec6.TAILFLAME:t=new _0x5a68dc;break;case _0xaadec6.TAILGAS:t=new _0x1d9822;break;case _0xaadec6.RADAR:switch(r){case _0x2c0193.PlotMechanicalRadar:t=new _0x57d7b0;break;case _0x2c0193.PlotParameterRadar:t=new _0x3897ec;break;case _0x2c0193.PlotWarningRadar:t=new _0x54c3a0;break;case _0x2c0193.PlotScanRadar:t=new _0xc2c75d;break;case _0x2c0193.PlotRotateRadar:t=new _0x425466}break;case _0xaadec6.SCANWAVE:t=new _0x3cd5dc;break;case _0xaadec6.SCANCONE:t=new _0x524880;break;case _0xaadec6.DETECTIONCONE:t=new _0x570f72;break;case _0xaadec6.TRACKLINE:t=new _0x297e6a;break;case _0xaadec6.ATTACKLINE:t=new _0x42e779;break;case _0xaadec6.SIGN:t=new _0x392050;break;case _0xaadec6.COMMUNICATIONLINK:switch(n){case _0x2f1f44.BASICLINE:t=new _0x4ec5ba;break;case _0x2f1f44.ARROW:t=new _0x2d907f;break;case _0x2f1f44.TUBULAR:t=new _0x2e6536;break;case _0x2f1f44.METEORLINE:t=new _0x4071a9;break;case _0x2f1f44.DASHLINE:t=new _0x124e32}break;case _0xaadec6.DYNAMICMODEL:t=new _0x496759;break;case _0xaadec6.TEXT:break;case _0xaadec6.EXTENDACTION:t=new _0x584c60;break;case _0xaadec6.AUGMENT:t=new _0x458424;break;case _0xaadec6.ANNULARDIFFUSION:t=new _0x597b34}return t}static linkToAnotherGeoEntity(e,t,i){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t))return!1;let n=null;if(t.getStartUUID()==e?n=t.getEndUUID():t.getEndUUID()===e&&(n=t.getStartUUID()),!WebGLPlot$e.defined(n))return!1;let r=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(n);WebGLPlot$e.defined(r)||(r=_0x2e28f1.getInstance().getGeoEntityManager().getGeoEntityByUUID(n)),WebGLPlot$e.defined(r)||(r=_0x2e28f1.getInstance().getSatelliteEntityManager().getSatelliteEntityByUUID(n));let o=!1;return WebGLPlot$e.defined(r)&&(o=i?r._connectLinkToGeoEntity(t):r._disConnectLinkToGeoEntity(t)),o}static getGeoEntityParamByUUID(e){if(!WebGLPlot$e.defined(e))return;let t,i=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(e);return WebGLPlot$e.defined(i)||(i=_0x2e28f1.getInstance().getGeoEntityManager().getGeoEntityByUUID(e)),WebGLPlot$e.defined(i)||(i=_0x2e28f1.getInstance().getSatelliteEntityManager().getSatelliteEntityByUUID(e)),WebGLPlot$e.defined(i)&&(t=i.getGeoEntityParameter()),t}static getResourceURI(){return _0x2e28f1.getInstance().getURI()}static getDefaultName(e){let t=(e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT)).effectType,i=e.linkType,n=e.radarType,r="";switch(t){case _0xaadec6.WAKE:case _0xaadec6.ROTORWASH:break;case _0xaadec6.FIRESMOKE:r="燃烧";break;case _0xaadec6.BURST:r="爆炸";break;case _0xaadec6.TAILFLAME:r="尾焰";break;case _0xaadec6.TAILGAS:r="尾气";break;case _0xaadec6.RADAR:switch(n){case _0x2c0193.PlotMechanicalRadar:r="机械雷达";break;case _0x2c0193.PlotParameterRadar:r="参数雷达";break;case _0x2c0193.PlotWarningRadar:r="预警雷达";break;case _0x2c0193.PlotScanRadar:r="扫描雷达";break;case _0x2c0193.PlotRotateRadar:r="旋转雷达"}break;case _0xaadec6.SCANWAVE:r="扫描波";break;case _0xaadec6.SCANCONE:r="扫描棱锥";break;case _0xaadec6.DETECTIONCONE:r="探视锥";break;case _0xaadec6.TRACKLINE:r="尾迹";break;case _0xaadec6.ATTACKLINE:r="攻击线";break;case _0xaadec6.SIGN:r="标牌";break;case _0xaadec6.COMMUNICATIONLINK:switch(i){case _0x2f1f44.BASICLINE:r="基础线";break;case _0x2f1f44.ARROW:r="箭头线";break;case _0x2f1f44.TUBULAR:r="管状线";break;case _0x2f1f44.METEORLINE:r="流星线";break;case _0x2f1f44.DASHLINE:r="间断线"}break;case _0xaadec6.DYNAMICMODEL:r="渐变体";break;case _0xaadec6.TEXT:r="文本";break;case _0xaadec6.EXTENDACTION:r="扩展特效";break;case _0xaadec6.AUGMENT:r="增强";break;case _0xaadec6.ANNULARDIFFUSION:r="扩散圆"}return r}}const _0x2bddea=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x36087d=_0x2bddea(void 0,(function(){return _0x36087d.toString().search("(((.+)+)+)+$").toString().constructor(_0x36087d).search("(((.+)+)+)+$")}));_0x36087d();class _0x3fd6e5{constructor(e){this._geoGraphicObject=e,this._name="",this._geoEntityEffects=[];let t=this;this._getScene().preUpdate.addEventListener((function(){let e=t.getGeoEntityParameter();if(e.getIsDistanceChangeMode()){let i=_0xf52e1d.calcCameraDistance(e.getPosition(),t._getScene());i>e.getChangeModeDistance()&&e.getShowMode()!==_0x2bcc5b.Picture?e.setShowMode(_0x2bcc5b.Picture):i<e.getChangeModeDistance()&&e.getShowMode()!==_0x2bcc5b.Marker&&e.setShowMode(_0x2bcc5b.Marker),t.setGeoEntityParameter(e)}})),this._isModified=!1,this._isMoveGeoEntity=!1,this._isDistanceChangeMode=!1,this._changeModeDistance=5e3}_getGeoGraphicObject(){return this._geoGraphicObject}_getScene(){return this._geoGraphicObject.layer._scene}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){this._isMoveGeoEntity||_0x2e28f1.getInstance()._saveGeoEntity(!1)}destroy(){this.clearGeoEntityEffects()}clone(e){e.id=WebGLPlot$e.createGuid();let t=new _0x3fd6e5(e);t._name=this._name;let i=[];return this._geoEntityEffects.forEach((e=>{let t=e.clone();e.getType()!=_0xaadec6.COMMUNICATIONLINK&&i.push(t)})),t.updateGeoEntityEffects(i),t}setName(e){this._name=e,this._isModified=!0,this._save()}getName(){return this._name}setUUID(e){this._geoGraphicObject.id=e}getUUID(){return this._geoGraphicObject.id}setGeoEntityParameter(e){WebGLPlot$e.defined(this._geoGraphicObject)&&(e.isPositionUpdate()&&(this._geoGraphicObject.localPoints=[e.getPosition()]),e.isModelScaleUpdate()&&(this._geoGraphicObject.modelScale=e.getModelScale()),e.isVectorScaleUpdate()&&(this._geoGraphicObject.vectorScale=e.getVectorScale()),e.isModelRotateUpdate()&&(this._geoGraphicObject.modelRotate=e.getModelRotate()),e.isVectorRotateUpdate()&&(this._geoGraphicObject.vectorRotate=e.getVectorRotate()),e.isModelPathUpdate()&&(this._geoGraphicObject.modelPath=e.getModelPath()),e.isVisibleUpdate()&&(this._geoGraphicObject.display=e.isVisible()),e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())):e.isDotPlotLibIDUpdate()&&!e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())):!e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()&&(this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())),e.isDotPlotStyleUpdate()&&e.getDotPlotStyle().setGeoGraphicObjectStyle(this._geoGraphicObject),e.isPictureSymbolSizeUpdate()&&(this._geoGraphicObject.pictureSymbolSize=e.getPictureSymbolSize()),e.isPicturePathUpdate()&&(this._geoGraphicObject.picturePath=e.getPicturePath()),e.isShowModeUpdate()&&this._geoGraphicObject.setGeoEntityShowMode(e.getShowMode()),e.isChangeModeDistanceUpdate()&&(this._changeModeDistance=e.getChangeModeDistance()),e.isDistanceChangeModeUpdate()&&(this._isDistanceChangeMode=e.getIsDistanceChangeMode()),this._geoEntityEffects.forEach((e=>{e.setGeoEntityParameter(this.getGeoEntityParameter(),this.getUUID())})),this._isModified=!0,this._save())}getGeoEntityParameter(){if(WebGLPlot$e.defined(this._geoGraphicObject)){let e=new _0x4920fc,t=new _0x15cea8;return t.getGeoGraphicObjectStyle(this._geoGraphicObject),e._initParm(this._geoGraphicObject.localPoints[0],this._geoGraphicObject.modelScale,this._geoGraphicObject.vectorScale,this._geoGraphicObject.modelRotate,this._geoGraphicObject.vectorRotate,this._geoGraphicObject.modelPath,this._geoGraphicObject.display,this._geoGraphicObject.__dotPlotLibID,this._geoGraphicObject.__dotPlotCode,t,this._geoGraphicObject.pictureSymbolSize,this._geoGraphicObject.picturePath,this._geoGraphicObject.getGeoEntityShowMode(),this._isDistanceChangeMode,this._changeModeDistance),e}}toJson(){if(WebGLPlot$e.defined(this._geoGraphicObject)){let e={},t=JSON.stringify(this._geoGraphicObject.getSymbolData());if(e.hasOwnProperty("geoGraphicObject")||(e.geoGraphicObject=t),!e.hasOwnProperty("geoEntity")){let t={};t.hasOwnProperty("name")||(t.name=this._name),t.hasOwnProperty("isDistanceChangeMode")||(t.isDistanceChangeMode=this._isDistanceChangeMode),t.hasOwnProperty("changeModeDistance")||(t.changeModeDistance=this._changeModeDistance),t.hasOwnProperty("geoEntityEffects")||(t.geoEntityEffects=[],this._geoEntityEffects.forEach((e=>{(e.getType()!=_0xaadec6.COMMUNICATIONLINK||e.getStartUUID()===this.getUUID())&&t.geoEntityEffects.push(e.toJSON())}))),e.geoEntity=JSON.stringify(t)}return JSON.stringify(e)}return""}fromJson(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.isDistanceChangeMode)&&(this._isDistanceChangeMode=t.isDistanceChangeMode),WebGLPlot$e.defined(t.changeModeDistance)&&(this._changeModeDistance=t.changeModeDistance),WebGLPlot$e.defined(t.geoEntityEffects)&&t.geoEntityEffects.forEach((e=>{let t=_0x1b8e09.createGeoEntityEffectFromJson(e);WebGLPlot$e.defined(t)&&(t.setGeoEntity(this),t.getType()!=_0xaadec6.COMMUNICATIONLINK&&this.addGeoEntityEffect(t))}))}getGeoEntityEffects(){return this._geoEntityEffects}addGeoEntityEffect(e){for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID())return!1;let t=this._getScene();return WebGLPlot$e.defined(t)&&(e.setGeoEntityParameter(this.getGeoEntityParameter(),this.getUUID()),e.addEffectToScene(t)),this._geoEntityEffects.push(e),e.getType()===_0xaadec6.COMMUNICATIONLINK&&_0x1b8e09.linkToAnotherGeoEntity(this.getUUID(),e,!0),this._isModified=!0,this._save(),!0}removeGeoEntityEffect(e){for(let t=0;t<this._geoEntityEffects.length;t++){const i=this._geoEntityEffects[t];if(i.getUUID()===e){i.getType()===_0xaadec6.COMMUNICATIONLINK&&_0x1b8e09.linkToAnotherGeoEntity(this.getUUID(),i,!1);let e=this._getScene();return WebGLPlot$e.defined(e)&&i.removeEffectFromScene(e),this._geoEntityEffects.splice(t,1),!0}}return this._isModified=!0,this._save(),!1}updateGeoEntityEffects(e){for(let e=0;e<this._geoEntityEffects.length;e++){const t=this._geoEntityEffects[e];t.getType()===_0xaadec6.COMMUNICATIONLINK&&_0x1b8e09.linkToAnotherGeoEntity(this.getUUID(),t,!1);let i=this._getScene();WebGLPlot$e.defined(i)&&t.removeEffectFromScene(i)}this._geoEntityEffects.splice(0),e.forEach((e=>{this.addGeoEntityEffect(e)})),this._isModified=!0,this._save()}updateGeoEntityEffect(e){let t=-1;for(let i=0;i<this.geoEntityEffects.length;i++)if(this.geoEntityEffects[i].getUUID()===e.getUUID()){t=i;break}-1!==t&&(this.removeGeoEntityEffect(e.getUUID()),this.addGeoEntityEffect(e),this._isModified=!0,this._save())}clearGeoEntityEffects(){this.updateGeoEntityEffects([])}_connectLinkToGeoEntity(e){if(!WebGLPlot$e.defined(e))return!1;for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID())return!1;return this._geoEntityEffects.push(e),!0}_disConnectLinkToGeoEntity(e){if(!WebGLPlot$e.defined(e))return!1;let t=!1,i=-1;for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID()){i=t;break}return-1!=i&&(this._geoEntityEffects.splice(i,1),t=!0),t}}const _0x56d16b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2c934a=_0x56d16b(void 0,(function(){return _0x2c934a.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c934a).search("(((.+)+)+)+$")}));_0x2c934a();class _0x3c98af{constructor(){this._geoEntitys=new Map,this._geoEntityRootNode=new _0x4cd539("GeoEntityRootNode",!0),this._geoEntityLayer=void 0,this._geoEntityEditControl=void 0,this._geoEntityDrawControl=void 0,this._addGeoEntitys=[],this._removeEntityUUIDs=[]}_setScene(e){this._geoEntityLayer=new _0x394df6(e,"GeoEntitys"),e.plotLayers.add(this._geoEntityLayer),this._geoEntityEditControl=new _0x4ea0dc(e,this._geoEntityLayer),this._geoEntityDrawControl=new _0xc0ccbe(e,this._geoEntityLayer)}_getAddAndRemoveGeoEntitys(){return{add:this._addGeoEntitys,remove:this._removeEntityUUIDs}}_clearAddAndRemoveGeoEntitys(){this._addGeoEntitys.splice(0),this._removeEntityUUIDs.splice(0)}_save(){_0x2e28f1.getInstance()._saveGeoEntity(!1)}_removeAllGeoEntityFromScene(){this._geoEntitys.forEach(((e,t)=>{e.clearGeoEntityEffects();let i=e._getGeoGraphicObject();WebGLPlot$e.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i)})),this._geoEntitys.clear(),this._geoEntityRootNode._clear()}addGeoEntity(e){if(WebGLPlot$e.defined(this.getGeoEntityByUUID(e.getGeoEntity().getUUID())))return"";if(this._geoEntityLayer.addFeature(e)){let t=new _0x3fd6e5(e);e.setGeoEntity(t);let i=t.getUUID();return this._geoEntitys.set(i,t),this._geoEntityRootNode.createGeoEntityNode(t),this._addGeoEntitys.push(t),this._save(),i}return""}addGeoEntityModel(e,t,i,n,r){let o=this;this._geoEntityLayer.createSymbol(0,99999,[t],{url:i},(function(t){t.feature.__dotPlotLibID=0,t.feature.__dotPlotCode=99998;let i=_0x2e28f1.getInstance().getURI();t.feature.picturePath=i+"/iserver/mgis/situationSimulation/Picture/DafaultPicture.png",WebGLPlot$e.defined(r)&&(WebGLPlot$e.defined(r.modelScale)&&(t.feature.modelScale=r.modelScale),WebGLPlot$e.defined(r.modelRotate)&&(t.feature.modelRotate=r.modelRotate),WebGLPlot$e.defined(r.picturePath)&&(t.feature.picturePath=r.picturePath),WebGLPlot$e.defined(r.pictureSymbolSize)&&(t.feature.pictureSymbolSize=r.pictureSymbolSize),WebGLPlot$e.defined(r.plotLibID)&&WebGLPlot$e.defined(r.plotCode)&&(t.feature.__dotPlotLibID=r.plotLibID,t.feature.__dotPlotCode=r.plotCode),WebGLPlot$e.defined(r.dotPlotStyle)&&r.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$e.defined(r.vectorScale)&&(t.feature.vectorScale=r.vectorScale),WebGLPlot$e.defined(r.vectorRotate)&&(t.feature.vectorRotate=r.vectorRotate),WebGLPlot$e.defined(r.visible)&&(t.feature.display=r.visible));let a=new _0x3fd6e5(t.feature);t.feature.setGeoEntity(a),a.setName(e);let s=a.getUUID();o._geoEntitys.set(s,a),o._geoEntityRootNode.createGeoEntityNode(a),"function"==typeof n&&n({UUID:s}),o._addGeoEntitys.push(a),o._save()}))}addGeoEntityPicture(e,t,i,n,r){let o=this;this._geoEntityLayer.createSymbol(0,20,[t],{url:i},(function(t){t.feature.__dotPlotLibID=0,t.feature.__dotPlotCode=99998;let i=_0x2e28f1.getInstance().getURI();t.feature.modelPath=i+"/iserver/mgis/situationSimulation/Model/DafaultModel.gltf",WebGLPlot$e.defined(r)&&(WebGLPlot$e.defined(r.modelScale)&&(t.feature.modelScale=r.modelScale),WebGLPlot$e.defined(r.modelRotate)&&(t.feature.modelRotate=r.modelRotate),WebGLPlot$e.defined(r.modelPath)&&(t.feature.modelPath=r.modelPath),WebGLPlot$e.defined(r.pictureSymbolSize)&&(t.feature.pictureSymbolSize=r.pictureSymbolSize),WebGLPlot$e.defined(r.plotLibID)&&WebGLPlot$e.defined(r.plotCode)&&(t.feature.__dotPlotLibID=r.plotLibID,t.feature.__dotPlotCode=r.plotCode),WebGLPlot$e.defined(r.dotPlotStyle)&&r.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$e.defined(r.vectorScale)&&(t.feature.vectorScale=r.vectorScale),WebGLPlot$e.defined(r.vectorRotate)&&(t.feature.vectorRotate=r.vectorRotate),WebGLPlot$e.defined(r.visible)&&(t.feature.display=r.visible));let a=new _0x3fd6e5(t.feature);t.feature.setGeoEntity(a),a.setName(e);let s=a.getUUID();o._geoEntitys.set(s,a),o._geoEntityRootNode.createGeoEntityNode(a),"function"==typeof n&&n({UUID:s}),o._addGeoEntitys.push(a),o._save()}))}addGeoEntityDotPlot(e,t,i,n,r,o){let a=this;this._geoEntityLayer.createSymbol(i,n,[t],(function(t){t.feature.__dotPlotLibID=t.feature.libID,t.feature.__dotPlotCode=t.feature.code;let i=_0x2e28f1.getInstance().getURI();t.feature.modelPath=i+"/iserver/mgis/situationSimulation/Model/DafaultModel.gltf",t.feature.picturePath=i+"/iserver/mgis/situationSimulation/Picture/DafaultPicture.png",WebGLPlot$e.defined(o)&&(WebGLPlot$e.defined(o.modelScale)&&(t.feature.modelScale=o.modelScale),WebGLPlot$e.defined(o.modelRotate)&&(t.feature.modelRotate=o.modelRotate),WebGLPlot$e.defined(o.modelPath)&&(t.feature.modelPath=o.modelPath),WebGLPlot$e.defined(o.picturePath)&&(t.feature.picturePath=o.picturePath),WebGLPlot$e.defined(o.pictureSymbolSize)&&(t.feature.pictureSymbolSize=o.pictureSymbolSize),WebGLPlot$e.defined(o.dotPlotStyle)&&o.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$e.defined(o.vectorScale)&&(t.feature.vectorScale=o.vectorScale),WebGLPlot$e.defined(o.vectorRotate)&&(t.feature.vectorRotate=o.vectorRotate),WebGLPlot$e.defined(o.visible)&&(t.feature.display=o.visible));let n=new _0x3fd6e5(t.feature);t.feature.setGeoEntity(n),n.setName(e);let s=n.getUUID();a._geoEntitys.set(s,n),a._geoEntityRootNode.createGeoEntityNode(n),"function"==typeof r&&r({UUID:s}),a._addGeoEntitys.push(n),a._save()}))}removeGeoEntity(e){let t=this._geoEntitys.get(e);if(WebGLPlot$e.defined(t)){let i=t._getGeoGraphicObject();if(t.clearGeoEntityEffects(),WebGLPlot$e.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i))return this._geoEntityRootNode._removeGeoEntityNode(e),this._geoEntitys.delete(e),this._removeEntityUUIDs.push(e),this._save(),!0}return!1}removeAllGeoEntity(){this._geoEntitys.forEach(((e,t)=>{e.clearGeoEntityEffects();let i=e._getGeoGraphicObject();WebGLPlot$e.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i),this._removeEntityUUIDs.push(t)})),this._geoEntitys.clear(),this._geoEntityRootNode._clear(),this._save()}getGeoEntityByUUID(e){return this._geoEntitys.get(e)}isGeoEntityLayerEditable(){return!!WebGLPlot$e.defined(this._geoEntityEditControl)&&this._geoEntityEditControl.isActive()}setGeoEntityLayerEditable(e){WebGLPlot$e.defined(this._geoEntityEditControl)&&(e?this._geoEntityEditControl.activate():this._geoEntityEditControl.deactivate())}getGeoEntityRootNode(){return this._geoEntityRootNode}getGeoEntitys(){return this._geoEntitys}toJson(){let e=new Map;this._geoEntitys.forEach(((t,i)=>{e.set(t.getUUID(),t.toJson())}));let t=this._geoEntityRootNode._toJson();return{geoEntityJsons:e,geoEntityNodeJson:t}}fromJson(e,t){let i=e.geoEntityJsons,n=e.geoEntityNodeJson;if(this.removeAllGeoEntity(!1),WebGLPlot$e.defined(this._geoEntityLayer)){let e=this,n=[],r=new Map;i.forEach(((o,a)=>{if(o.length>0){let s=JSON.parse(o);WebGLPlot$e.defined(s.geoGraphicObject)&&this._geoEntityLayer.geoJsonToGeoGraphicObject(JSON.parse(s.geoGraphicObject),(function(o){if(WebGLPlot$e.defined(s.geoEntity)){let l=o.feature;if(WebGLPlot$e.defined(l)){let o=new _0x3fd6e5(l);l.setGeoEntity(o),o.fromJson(s.geoEntity),e._geoEntitys.set(a,o),n.push(a),"function"==typeof t&&n.length===i.size&&t({UUIDs:n}),r.set(o,s)}}}))}})),this._fromJsonLink(r)}this._geoEntityRootNode._clear(),n.length>0&&this._geoEntityRootNode._fromJson(n,this._geoEntityRootNode)}_fromJsonLink(e){e.forEach(((e,t)=>{let i=JSON.parse(e.geoEntity);WebGLPlot$e.defined(i.geoEntityEffects)&&i.geoEntityEffects.forEach((e=>{let i=_0x1b8e09.createGeoEntityEffectFromJson(e);WebGLPlot$e.defined(i)&&i.getType()==_0xaadec6.COMMUNICATIONLINK&&t.getUUID()===i.getStartUUID()&&t.addGeoEntityEffect(i)}))}))}}function _0x415334(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),WebGLPlot$e.PolylineCollection.call(this,e),this._visible=WebGLPlot$e.defaultValue(e.visible,!0),this._orbitsWidth=WebGLPlot$e.defaultValue(e.orbitsWidth,1),this._orbitsColor=WebGLPlot$e.defaultValue(e.orbitsColor,new WebGLPlot$e.Color(.8,.8,.2,.39)),this._initialized=!1}(function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();var i=function(){};i.prototype=WebGLPlot$e.PolylineCollection.prototype,_0x415334.prototype=new i,_0x415334.prototype.constructor=_0x415334,_0x415334.prototype.update=function(e){!this._visible&&!this._initialized||(i.prototype.update.apply(this,Array.prototype.slice.apply(arguments)),this._initialized&&(this._initialized=!1))}})(),Object.defineProperties(_0x415334.prototype,{visible:{get:function(){return this._visible},set:function(e){for(let t=0;t<this.length;t++)this.get(t).show=e;this._visible=e,this._initialized=!0}},orbitsWidth:{get:function(){return this._orbitsWidth},set:function(e){for(let t=0;t<this.length;t++)this.get(t).width=e;this._orbitsWidth=e,this._initialized=!0}},orbitsColor:{get:function(){return this._orbitsWidth},set:function(e){for(let t=0;t<this.length;t++)this.get(t).material=WebGLPlot$e.Material.fromType("Color",{color:e});this._orbitsColor=e,this._initialized=!0}}}),function(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));r(),"object"==typeof exports&&typeof module<"u"?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).SatelliteToolkit=t()}(void 0,(function(){var e=Math.PI,t=2*e,i=e/180,n=180/e,r=1440,o=398600.8,a=6378.135,s=60/Math.sqrt(650942.9922085947),l=a*s/60,u=1/s,c=.001082616,h=-253881e-11,d=-165597e-11,f=h/c,p=2/3;function _(e,t){for(var i=[31,e%4==0?29:28,31,30,31,30,31,31,30,31,30,31],n=Math.floor(t),r=1,o=0;n>o+i[r-1]&&r<12;)o+=i[r-1],r+=1;var a=r,s=n-o,l=24*(t-n),u=Math.floor(l);l=60*(l-u);var c=Math.floor(l);return{mon:a,day:s,hr:u,minute:c,sec:60*(l-c)}}function m(e,t,i,n,r,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;return 367*e-Math.floor(7*(e+Math.floor((t+9)/12))*.25)+Math.floor(275*t/9)+i+1721013.5+((a/6e4+o/60+r)/60+n)/24}function g(e,t,i,n,r,o,a){if(e instanceof Date){var s=e;return m(s.getUTCFullYear(),s.getUTCMonth()+1,s.getUTCDate(),s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds())}return m(e,t,i,n,r,o,a)}function x(i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b=i.e3,T=i.ee2,C=i.peo,S=i.pgho,w=i.pho,E=i.pinco,P=i.plo,A=i.se2,L=i.se3,M=i.sgh2,R=i.sgh3,O=i.sgh4,D=i.sh2,I=i.sh3,F=i.si2,B=i.si3,N=i.sl2,G=i.sl3,z=i.sl4,U=i.t,V=i.xgh2,k=i.xgh3,W=i.xgh4,H=i.xh2,q=i.xh3,j=i.xi2,X=i.xi3,Y=i.xl2,Z=i.xl3,K=i.xl4,Q=i.zmol,J=i.zmos,ee=n.init,te=n.opsmode,ie=n.ep,ne=n.inclp,re=n.nodep,oe=n.argpp,ae=n.mp;$=J+119459e-10*U,"y"===ee&&($=J),v=$+.0335*Math.sin($);var se=A*(c=.5*(g=Math.sin(v))*g-.25)+L*(h=-.5*g*Math.cos(v)),le=F*c+B*h,ue=N*c+G*h+z*g,ce=M*c+R*h+O*g,he=D*c+I*h;return $=Q+.00015835218*U,"y"===ee&&($=Q),v=$+.1098*Math.sin($),d=se+(T*(c=.5*(g=Math.sin(v))*g-.25)+b*(h=-.5*g*Math.cos(v))),_=le+(j*c+X*h),m=ue+(Y*c+Z*h+K*g),f=ce+(V*c+k*h+W*g),p=he+(H*c+q*h),"n"===ee&&(m-=P,f-=S,p-=w,ne+=_-=E,ie+=d-=C,s=Math.sin(ne),a=Math.cos(ne),ne>=.2?(oe+=f-=a*(p/=s),re+=p,ae+=m):(r=s*(u=Math.sin(re)),o=s*(l=Math.cos(re)),r+=p*l+_*a*u,o+=-p*u+_*a*l,(re%=t)<0&&"a"===te&&(re+=t),x=ae+oe+a*re,x+=m+f-_*re*s,y=re,(re=Math.atan2(r,o))<0&&"a"===te&&(re+=t),Math.abs(y-re)>e&&(re<y?re+=t:re-=t),oe=x-(ae+=m)-a*re)),{ep:ie,inclp:ne,nodep:re,argpp:oe,mp:ae}}function y(e){var n=(e-2451545)/36525,r=-62e-7*n*n*n+.093104*n*n+3164400184.812866*n+67310.54841;return(r=r*i/240%t)<0&&(r+=t),r}function v(){return(arguments.length<=0?void 0:arguments[0])instanceof Date||arguments.length>1?y(g.apply(void 0,arguments)):y.apply(void 0,arguments)}function $(i,n){var r,o,u,c,h,d,_,m,g,y,v,$,b,T,C,S,w,E,P,A,L,M,R,O,D,I;i.t=n,i.error=0;var F=i.mo+i.mdot*i.t,B=i.argpo+i.argpdot*i.t,N=i.nodeo+i.nodedot*i.t;m=B,A=F;var G=i.t*i.t;if(M=N+i.nodecf*G,S=1-i.cc1*i.t,w=i.bstar*i.cc4*i.t,E=i.t2cof*G,1!==i.isimp){d=i.omgcof*i.t;var z=1+i.eta*Math.cos(F);A=F+(C=d+i.xmcof*(z*z*z-i.delmo)),m=B-C,$=(v=G*i.t)*i.t,S=S-i.d2*G-i.d3*v-i.d4*$,w+=i.bstar*i.cc5*(Math.sin(A)-i.sinmao),E=E+i.t3cof*v+$*(i.t4cof+i.t*i.t5cof)}L=i.no;var U=i.ecco;if(P=i.inclo,"d"===i.method){b=i.t;var V=function(e){var i,n,r,o,a,s,l,u,c=e.irez,h=e.d2201,d=e.d2211,f=e.d3210,p=e.d3222,_=e.d4410,m=e.d4422,g=e.d5220,x=e.d5232,y=e.d5421,v=e.d5433,$=e.dedt,b=e.del1,T=e.del2,C=e.del3,S=e.didt,w=e.dmdt,E=e.dnodt,P=e.domdt,A=e.argpo,L=e.argpdot,M=e.t,R=e.tc,O=e.gsto,D=e.xfact,I=e.xlamo,F=e.no,B=e.atime,N=e.em,G=e.argpm,z=e.inclm,U=e.xli,V=e.mm,k=e.xni,W=e.nodem,H=e.nm,q=.13130908,j=2.8843198,X=.37448087,Y=5.7686396,Z=.95240898,K=1.8014998,Q=1.050833,J=4.4108898,ee=259200,te=0,ie=0,ne=(O+.0043752690880113*R)%t;if(N+=$*M,z+=S*M,G+=P*M,W+=E*M,V+=w*M,0!==c){(0===B||M*B<=0||Math.abs(M)<Math.abs(B))&&(B=0,k=F,U=I),i=M>0?720:-720;for(var re=381;381===re;)2!==c?(l=b*Math.sin(U-q)+T*Math.sin(2*(U-j))+C*Math.sin(3*(U-X)),a=k+D,s=b*Math.cos(U-q)+2*T*Math.cos(2*(U-j))+3*C*Math.cos(3*(U-X)),s*=a):(r=(u=A+L*B)+u,n=U+U,l=h*Math.sin(r+U-Y)+d*Math.sin(U-Y)+f*Math.sin(u+U-Z)+p*Math.sin(-u+U-Z)+_*Math.sin(r+n-K)+m*Math.sin(n-K)+g*Math.sin(u+U-Q)+x*Math.sin(-u+U-Q)+y*Math.sin(u+n-J)+v*Math.sin(-u+n-J),a=k+D,s=h*Math.cos(r+U-Y)+d*Math.cos(U-Y)+f*Math.cos(u+U-Z)+p*Math.cos(-u+U-Z)+g*Math.cos(u+U-Q)+x*Math.cos(-u+U-Q)+2*(_*Math.cos(r+n-K)+m*Math.cos(n-K)+y*Math.cos(u+n-J)+v*Math.cos(-u+n-J)),s*=a),Math.abs(M-B)>=720?re=381:(ie=M-B,re=0),381===re&&(U+=a*i+l*ee,k+=l*i+s*ee,B+=i);H=k+l*ie+s*ie*ie*.5,o=U+a*ie+l*ie*ie*.5,1!==c?(V=o-2*W+2*ne,te=H-F):(V=o-W-G+ne,te=H-F),H=F+te}return{atime:B,em:N,argpm:G,inclm:z,xli:U,mm:V,xni:k,nodem:W,dndt:te,nm:H}}({irez:i.irez,d2201:i.d2201,d2211:i.d2211,d3210:i.d3210,d3222:i.d3222,d4410:i.d4410,d4422:i.d4422,d5220:i.d5220,d5232:i.d5232,d5421:i.d5421,d5433:i.d5433,dedt:i.dedt,del1:i.del1,del2:i.del2,del3:i.del3,didt:i.didt,dmdt:i.dmdt,dnodt:i.dnodt,domdt:i.domdt,argpo:i.argpo,argpdot:i.argpdot,t:i.t,tc:b,gsto:i.gsto,xfact:i.xfact,xlamo:i.xlamo,no:i.no,atime:i.atime,em:U,argpm:m,inclm:P,xli:i.xli,mm:A,xni:i.xni,nodem:M,nm:L});U=V.em,m=V.argpm,P=V.inclm,A=V.mm,M=V.nodem,L=V.nm}if(L<=0)return i.error=2,[!1,!1];var k=Math.pow(s/L,p)*S*S;if(L=s/Math.pow(k,1.5),(U-=w)>=1||U<-.001)return i.error=1,[!1,!1];U<1e-6&&(U=1e-6),O=(A+=i.no*E)+m+M;var W=U;if(R=P,g=m%=t,I=M%=t,D=A=((O%=t)-m-M)%t,c=Math.sin(P),u=Math.cos(P),"d"===i.method){var H=x(i,{inclo:i.inclo,init:"n",ep:W,inclp:R,nodep:I,argpp:g,mp:D,opsmode:i.operationmode});if(W=H.ep,I=H.nodep,g=H.argpp,D=H.mp,(R=H.inclp)<0&&(R=-R,I+=e,g-=e),W<0||W>1)return i.error=3,[!1,!1]}"d"===i.method&&(c=Math.sin(R),u=Math.cos(R),i.aycof=-.5*f*c,Math.abs(u+1)>15e-13?i.xlcof=-.25*f*c*(3+5*u)/(1+u):i.xlcof=-.25*f*c*(3+5*u)/15e-13);var q=W*Math.cos(g);C=1/(k*(1-W*W));var j=W*Math.sin(g)+C*i.aycof,X=(D+g+I+C*i.xlcof*q-I)%t;_=X,T=9999.9;for(var Y=1;Math.abs(T)>=1e-12&&Y<=10;)o=Math.sin(_),T=(X-j*(r=Math.cos(_))+q*o-_)/(T=1-r*q-o*j),Math.abs(T)>=.95&&(T=T>0?.95:-.95),_+=T,Y+=1;var Z=q*r+j*o,K=q*o-j*r,Q=q*q+j*j,J=k*(1-Q);if(J<0)return i.error=4,[!1,!1];var ee=k*(1-Z),te=Math.sqrt(k)*K/ee,ie=Math.sqrt(J)/ee,ne=Math.sqrt(1-Q),re=k/ee*(o-j-q*(C=K/(1+ne))),oe=k/ee*(r-q+j*C);y=Math.atan2(re,oe);var ae=(oe+oe)*re,se=1-2*re*re,le=541308e-9*(C=1/J),ue=le*C;"d"===i.method&&(h=u*u,i.con41=3*h-1,i.x1mth2=1-h,i.x7thm1=7*h-1);var ce=ee*(1-1.5*ue*ne*i.con41)+.5*le*i.x1mth2*se;if(ce<1)return i.error=6,{position:!1,velocity:!1};y-=.25*ue*i.x7thm1*ae;var he=I+1.5*ue*u*ae,de=R+1.5*ue*u*c*se,fe=te-L*le*i.x1mth2*ae/s,pe=ie+L*le*(i.x1mth2*se+1.5*i.con41)/s,_e=Math.sin(y),me=Math.cos(y),ge=Math.sin(he),xe=Math.cos(he),ye=Math.sin(de),ve=Math.cos(de),$e=-ge*ve,be=xe*ve,Te=$e*_e+xe*me,Ce=be*_e+ge*me,Se=ye*_e;return{position:{x:ce*Te*a,y:ce*Ce*a,z:ce*Se*a},velocity:{x:(fe*Te+pe*($e*me-xe*_e))*l,y:(fe*Ce+pe*(be*me-ge*_e))*l,z:(fe*Se+pe*(ye*me))*l}}}function b(i,n){var r,o,l,h,d,_,m,g,y,b,T,C,S,w,E,P,A,L,M,R,O,D,I,F,B,N,G,z,U,V,k,W,H,q,j,X,Y,Z,K,Q,J,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he=n.opsmode,de=n.satn,fe=n.epoch,pe=n.xbstar,_e=n.xecco,me=n.xargpo,ge=n.xinclo,xe=n.xmo,ye=n.xno,ve=n.xnodeo;i.isimp=0,i.method="n",i.aycof=0,i.con41=0,i.cc1=0,i.cc4=0,i.cc5=0,i.d2=0,i.d3=0,i.d4=0,i.delmo=0,i.eta=0,i.argpdot=0,i.omgcof=0,i.sinmao=0,i.t=0,i.t2cof=0,i.t3cof=0,i.t4cof=0,i.t5cof=0,i.x1mth2=0,i.x7thm1=0,i.mdot=0,i.nodedot=0,i.xlcof=0,i.xmcof=0,i.nodecf=0,i.irez=0,i.d2201=0,i.d2211=0,i.d3210=0,i.d3222=0,i.d4410=0,i.d4422=0,i.d5220=0,i.d5232=0,i.d5421=0,i.d5433=0,i.dedt=0,i.del1=0,i.del2=0,i.del3=0,i.didt=0,i.dmdt=0,i.dnodt=0,i.domdt=0,i.e3=0,i.ee2=0,i.peo=0,i.pgho=0,i.pho=0,i.pinco=0,i.plo=0,i.se2=0,i.se3=0,i.sgh2=0,i.sgh3=0,i.sgh4=0,i.sh2=0,i.sh3=0,i.si2=0,i.si3=0,i.sl2=0,i.sl3=0,i.sl4=0,i.gsto=0,i.xfact=0,i.xgh2=0,i.xgh3=0,i.xgh4=0,i.xh2=0,i.xh3=0,i.xi2=0,i.xi3=0,i.xl2=0,i.xl3=0,i.xl4=0,i.xlamo=0,i.zmol=0,i.zmos=0,i.atime=0,i.xli=0,i.xni=0,i.bstar=pe,i.ecco=_e,i.argpo=me,i.inclo=ge,i.mo=xe,i.no=ye,i.nodeo=ve,i.operationmode=he;i.init="y",i.t=0;var $e=function(e){var i=e.ecco,n=e.epoch,r=e.inclo,o=e.opsmode,a=e.no,l=i*i,u=1-l,h=Math.sqrt(u),d=Math.cos(r),f=d*d,_=Math.pow(s/a,p),m=.75*c*(3*f-1)/(h*u),g=m/(_*_),x=_*(1-g*g-g*(1/3+134*g*g/81));a/=1+(g=m/(x*x));var y,$=Math.pow(s/a,p),b=Math.sin(r),T=$*u,C=1-5*f,S=-C-f-f,w=1/$,E=T*T,P=$*(1-i);if("a"===o){var A=n-7305,L=Math.floor(A+1e-8),M=.017202791694070362;(y=(1.7321343856509375+M*L+(M+t)*(A-L)+A*A*5075514194322695e-30)%t)<0&&(y+=t)}else y=v(n+2433281.5);return{no:a,method:"n",ainv:w,ao:$,con41:S,con42:C,cosio:d,cosio2:f,eccsq:l,omeosq:u,posq:E,rp:P,rteosq:h,sinio:b,gsto:y}}({satn:de,ecco:i.ecco,epoch:fe,inclo:i.inclo,no:i.no,method:i.method,opsmode:i.operationmode}),be=$e.ao,Te=$e.con42,Ce=$e.cosio,Se=$e.cosio2,we=$e.eccsq,Ee=$e.omeosq,Pe=$e.posq,Ae=$e.rp,Le=$e.rteosq,Me=$e.sinio;if(i.no=$e.no,i.con41=$e.con41,i.gsto=$e.gsto,i.a=Math.pow(i.no*u,-2/3),i.alta=i.a*(1+i.ecco)-1,i.altp=i.a*(1-i.ecco)-1,i.error=0,Ee>=0||i.no>=0){if(i.isimp=0,Ae<220/a+1&&(i.isimp=1),F=1.0122292801892716,L=1.880279159015271e-9,(E=(Ae-1)*a)<156){F=E-78,E<98&&(F=20);var Re=(120-F)/a;L=Re*Re*Re*Re,F=F/a+1}P=1/Pe,ee=1/(be-F),i.eta=be*i.ecco*ee,C=i.eta*i.eta,T=i.ecco*i.eta,A=Math.abs(1-C),h=(m=(_=L*Math.pow(ee,4))/Math.pow(A,3.5))*i.no*(be*(1+1.5*C+T*(4+C))+.375*c*ee/A*i.con41*(8+3*C*(8+C))),i.cc1=i.bstar*h,d=0,i.ecco>1e-4&&(d=-2*_*ee*f*i.no*Me/i.ecco),i.x1mth2=1-Se,i.cc4=2*i.no*m*be*Ee*(i.eta*(2+.5*C)+i.ecco*(.5+2*C)-c*ee/(be*A)*(-3*i.con41*(1-2*T+C*(1.5-.5*T))+.75*i.x1mth2*(2*C-T*(1+C))*Math.cos(2*i.argpo))),i.cc5=2*m*be*Ee*(1+2.75*(C+T)+T*C),g=Se*Se,Q=.5*(K=1.5*c*P*i.no)*c*P,J=7.762359375e-7*P*P*i.no,i.mdot=i.no+.5*K*Le*i.con41+.0625*Q*Le*(13-78*Se+137*g),i.argpdot=-.5*K*Te+.0625*Q*(7-114*Se+395*g)+J*(3-36*Se+49*g),ie=-K*Ce,i.nodedot=ie+(.5*Q*(4-19*Se)+2*J*(3-7*Se))*Ce,te=i.argpdot+i.nodedot,i.omgcof=i.bstar*d*Math.cos(i.argpo),i.xmcof=0,i.ecco>1e-4&&(i.xmcof=-p*_*i.bstar/T),i.nodecf=3.5*Ee*ie*i.cc1,i.t2cof=1.5*i.cc1,Math.abs(Ce+1)>15e-13?i.xlcof=-.25*f*Me*(3+5*Ce)/(1+Ce):i.xlcof=-.25*f*Me*(3+5*Ce)/15e-13,i.aycof=-.5*f*Me;var Oe=1+i.eta*Math.cos(i.mo);if(i.delmo=Oe*Oe*Oe,i.sinmao=Math.sin(i.mo),i.x7thm1=7*Se-1,2*e/i.no>=225){i.method="d",i.isimp=1,0,S=i.inclo;var De=function(e){var i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S,w,E,P,A,L,M,R,O,D,I,F,B,N,G,z,U,V,k,W,H,q,j,X,Y,Z,K,Q,J,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he=e.epoch,de=e.ep,fe=e.argpp,pe=e.tc,_e=e.inclp,me=e.nodep,ge=.01675,xe=.0549,ye=e.np,ve=de,$e=Math.sin(me),be=Math.cos(me),Te=Math.sin(fe),Ce=Math.cos(fe),Se=Math.sin(_e),we=Math.cos(_e),Ee=ve*ve,Pe=1-Ee,Ae=Math.sqrt(Pe),Le=he+18261.5+pe/1440,Me=(4.523602-.00092422029*Le)%t,Re=Math.sin(Me),Oe=Math.cos(Me),De=.91375164-.03568096*Oe,Ie=Math.sqrt(1-De*De),Fe=.089683511*Re/Ie,Be=Math.sqrt(1-Fe*Fe),Ne=5.8351514+.001944368*Le,Ge=.39785416*Re/Ie,ze=Be*Oe+.91744867*Fe*Re;Ge=Math.atan2(Ge,ze),Ge+=Ne-Me;var Ue=Math.cos(Ge),Ve=Math.sin(Ge);$=.1945905,b=-.98088458,S=.91744867,w=.39785416,T=be,C=$e,d=29864797e-13;for(var ke=1/ye,We=0;We<2;)ie=-6*(i=$*T+b*S*C)*(a=-Se*(l=-$*C+b*S*T)+we*(u=b*w))+Ee*(-24*(f=i*Ce+(n=we*l+Se*u)*Te)*(y=a*Ce)-6*(_=-i*Te+n*Ce)*(g=a*Te)),ne=-6*(i*(s=-Se*(c=b*C+$*S*T)+we*(h=$*w))+(r=-b*T+$*S*C)*a)+Ee*(-24*((p=r*Ce+(o=we*c+Se*h)*Te)*y+f*(v=s*Ce))+-6*(_*(x=s*Te)+(m=-r*Te+o*Ce)*g)),re=-6*r*s+Ee*(-24*p*v-6*m*x),oe=6*n*a+Ee*(24*f*g-6*_*y),ae=6*(o*a+n*s)+Ee*(24*(p*g+f*x)-6*(m*y+_*v)),se=6*o*s+Ee*(24*p*x-6*m*v),J=(J=3*(i*i+n*n)+(le=12*f*f-3*_*_)*Ee)+J+Pe*le,ee=(ee=6*(i*r+n*o)+(ue=24*f*p-6*_*m)*Ee)+ee+Pe*ue,te=(te=3*(r*r+o*o)+(ce=12*p*p-3*m*m)*Ee)+te+Pe*ce,j=-.5*(X=d*ke)/Ae,q=-15*ve*(Y=X*Ae),Z=f*_+p*m,K=p*_+f*m,Q=p*m-f*_,1===(We+=1)&&(E=q,P=j,A=X,L=Y,M=Z,R=K,O=Q,D=J,I=ee,F=te,B=ie,N=ne,G=re,z=oe,U=ae,V=se,k=le,W=ue,H=ce,$=Ue,b=Ve,S=De,w=Ie,T=Be*be+Fe*$e,C=$e*Be-be*Fe,d=4.7968065e-7);return{snodm:$e,cnodm:be,sinim:Se,cosim:we,sinomm:Te,cosomm:Ce,day:Le,e3:2*q*Q,ee2:2*q*K,em:ve,emsq:Ee,gam:Ne,peo:0,pgho:0,pho:0,pinco:0,plo:0,rtemsq:Ae,se2:2*E*R,se3:2*E*O,sgh2:2*L*W,sgh3:2*L*(H-k),sgh4:-18*L*ge,sh2:-2*P*U,sh3:-2*P*(V-z),si2:2*P*N,si3:2*P*(G-B),sl2:-2*A*I,sl3:-2*A*(F-D),sl4:-2*A*(-21-9*Ee)*ge,s1:q,s2:j,s3:X,s4:Y,s5:Z,s6:K,s7:Q,ss1:E,ss2:P,ss3:A,ss4:L,ss5:M,ss6:R,ss7:O,sz1:D,sz2:I,sz3:F,sz11:B,sz12:N,sz13:G,sz21:z,sz22:U,sz23:V,sz31:k,sz32:W,sz33:H,xgh2:2*Y*ue,xgh3:2*Y*(ce-le),xgh4:-18*Y*xe,xh2:-2*j*ae,xh3:-2*j*(se-oe),xi2:2*j*ne,xi3:2*j*(re-ie),xl2:-2*X*ee,xl3:-2*X*(te-J),xl4:-2*X*(-21-9*Ee)*xe,nm:ye,z1:J,z2:ee,z3:te,z11:ie,z12:ne,z13:re,z21:oe,z22:ae,z23:se,z31:le,z32:ue,z33:ce,zmol:(.2299715*Le-Ne+4.7199672)%t,zmos:(6.2565837+.017201977*Le)%t}}({epoch:fe,ep:i.ecco,argpp:i.argpo,tc:0,inclp:i.inclo,nodep:i.nodeo,np:i.no,e3:i.e3,ee2:i.ee2,peo:i.peo,pgho:i.pgho,pho:i.pho,pinco:i.pinco,plo:i.plo,se2:i.se2,se3:i.se3,sgh2:i.sgh2,sgh3:i.sgh3,sgh4:i.sgh4,sh2:i.sh2,sh3:i.sh3,si2:i.si2,si3:i.si3,sl2:i.sl2,sl3:i.sl3,sl4:i.sl4,xgh2:i.xgh2,xgh3:i.xgh3,xgh4:i.xgh4,xh2:i.xh2,xh3:i.xh3,xi2:i.xi2,xi3:i.xi3,xl2:i.xl2,xl3:i.xl3,xl4:i.xl4,zmol:i.zmol,zmos:i.zmos});i.e3=De.e3,i.ee2=De.ee2,i.peo=De.peo,i.pgho=De.pgho,i.pho=De.pho,i.pinco=De.pinco,i.plo=De.plo,i.se2=De.se2,i.se3=De.se3,i.sgh2=De.sgh2,i.sgh3=De.sgh3,i.sgh4=De.sgh4,i.sh2=De.sh2,i.sh3=De.sh3,i.si2=De.si2,i.si3=De.si3,i.sl2=De.sl2,i.sl3=De.sl3,i.sl4=De.sl4,o=De.sinim,r=De.cosim,y=De.em,b=De.emsq,M=De.s1,R=De.s2,O=De.s3,D=De.s4,I=De.s5,B=De.ss1,N=De.ss2,G=De.ss3,z=De.ss4,U=De.ss5,V=De.sz1,k=De.sz3,W=De.sz11,H=De.sz13,q=De.sz21,j=De.sz23,X=De.sz31,Y=De.sz33,i.xgh2=De.xgh2,i.xgh3=De.xgh3,i.xgh4=De.xgh4,i.xh2=De.xh2,i.xh3=De.xh3,i.xi2=De.xi2,i.xi3=De.xi3,i.xl2=De.xl2,i.xl3=De.xl3,i.xl4=De.xl4,i.zmol=De.zmol,i.zmos=De.zmos,w=De.nm,ne=De.z1,re=De.z3,oe=De.z11,ae=De.z13,se=De.z21,le=De.z23,ue=De.z31,ce=De.z33;var Ie=x(i,{inclo:S,init:i.init,ep:i.ecco,inclp:i.inclo,nodep:i.nodeo,argpp:i.argpo,mp:i.mo,opsmode:i.operationmode});i.ecco=Ie.ep,i.inclo=Ie.inclp,i.nodeo=Ie.nodep,i.argpo=Ie.argpp,i.mo=Ie.mp,0,0,0;var Fe=function(i){var n,r,o,a,l,u,c,h,d,f,_,m,g,x,y,v,$,b=i.cosim,T=i.argpo,C=i.s1,S=i.s2,w=i.s3,E=i.s4,P=i.s5,A=i.sinim,L=i.ss1,M=i.ss2,R=i.ss3,O=i.ss4,D=i.ss5,I=i.sz1,F=i.sz3,B=i.sz11,N=i.sz13,G=i.sz21,z=i.sz23,U=i.sz31,V=i.sz33,k=i.t,W=i.tc,H=i.gsto,q=i.mo,j=i.mdot,X=i.no,Y=i.nodeo,Z=i.nodedot,K=i.xpidot,Q=i.z1,J=i.z3,ee=i.z11,te=i.z13,ie=i.z21,ne=i.z23,re=i.z31,oe=i.z33,ae=i.ecco,se=i.eccsq,le=i.emsq,ue=i.em,ce=i.argpm,he=i.inclm,de=i.mm,fe=i.nm,pe=i.nodem,_e=i.irez,me=i.atime,ge=i.d2201,xe=i.d2211,ye=i.d3210,ve=i.d3222,$e=i.d4410,be=i.d4422,Te=i.d5220,Ce=i.d5232,Se=i.d5421,we=i.d5433,Ee=i.dedt,Pe=i.didt,Ae=i.dmdt,Le=i.dnodt,Me=i.domdt,Re=i.del1,Oe=i.del2,De=i.del3,Ie=i.xfact,Fe=i.xlamo,Be=i.xli,Ne=i.xni,Ge=.0043752690880113,ze=.00015835218,Ue=119459e-10;_e=0,fe<.0052359877&&fe>.0034906585&&(_e=1),fe>=.00826&&fe<=.00924&&ue>=.5&&(_e=2);var Ve=-Ue*M*(G+z);(he<.052359877||he>e-.052359877)&&(Ve=0),0!==A&&(Ve/=A);var ke=-ze*S*(ie+ne);(he<.052359877||he>e-.052359877)&&(ke=0),Me=O*Ue*(U+V-6)-b*Ve+E*ze*(re+oe-6),Le=Ve,0!==A&&(Me-=b/A*ke,Le+=ke/A);var We=(H+W*Ge)%t;if(ue+=(Ee=L*Ue*D+C*ze*P)*k,he+=(Pe=M*Ue*(B+N)+S*ze*(ee+te))*k,ce+=Me*k,pe+=Le*k,de+=(Ae=-Ue*R*(I+F-14-6*le)-ze*w*(Q+J-14-6*le))*k,0!==_e){if(y=Math.pow(fe/s,p),2===_e){var He=ue,qe=le;$=(ue=ae)*(le=se),ue<=.65?(o=3.616-13.247*ue+16.29*le,a=117.39*ue-19.302-228.419*le+156.591*$,l=109.7927*ue-18.9068-214.6334*le+146.5816*$,u=242.694*ue-41.122-471.094*le+313.953*$,c=841.88*ue-146.407-1629.014*le+1083.435*$,h=3017.977*ue-532.114-5740.032*le+3708.276*$):(o=331.819*ue-72.099-508.738*le+266.724*$,a=1582.851*ue-346.844-2415.925*le+1246.113*$,l=1554.908*ue-342.585-2366.899*le+1215.972*$,u=4758.686*ue-1052.797-7193.992*le+3651.957*$,c=16178.11*ue-3581.69-24462.77*le+12422.52*$,h=ue>.715?29936.92*ue-5149.66-54087.36*le+31324.56*$:1464.74-4664.75*ue+3763.64*le),ue<.7?(_=4988.61*ue-919.2277-9064.77*le+5542.21*$,d=4568.6173*ue-822.71072-8491.4146*le+5337.524*$,f=4690.25*ue-853.666-8624.77*le+5341.4*$):(_=161616.52*ue-37995.78-229838.2*le+109377.94*$,d=218913.95*ue-51752.104-309468.16*le+146349.42*$,f=170470.89*ue-40023.88-242699.48*le+115605.82*$),ge=(g=17891679e-13*(x=fe*fe*3*(y*y)))*(n=.75*(1+2*b+(v=b*b)))*(-.306-.44*(ue-.64)),xe=g*(1.5*(m=A*A))*o,ye=(g=3.7393792e-7*(x*=y))*(1.875*A*(1-2*b-3*v))*a,ve=g*(-1.875*A*(1+2*b-3*v))*l,$e=(g=2*(x*=y)*7.3636953e-9)*(35*m*n)*u,be=g*(39.375*m*m)*c,Te=(g=1.1428639e-7*(x*=y))*(9.84375*A*(m*(1-2*b-5*v)+.33333333*(4*b-2+6*v)))*h,Ce=g*(A*(4.92187512*m*(-2-4*b+10*v)+6.56250012*(1+2*b-3*v)))*f,Se=(g=2*x*2.1765803e-9)*(29.53125*A*(2-8*b+v*(8*b-12+10*v)))*d,we=g*(29.53125*A*(-2-8*b+v*(12+8*b-10*v)))*_,Fe=(q+Y+Y-(We+We))%t,Ie=j+Ae+2*(Z+Le-Ge)-X,ue=He,le=qe}1===_e&&(r=1+b,Oe=2*(Re=3*fe*fe*y*y)*(n=.75*(1+b)*(1+b))*(1+le*(.8125*le-2.5))*17891679e-13,De=3*Re*(r*=1.875*r*r)*(1+le*(6.60937*le-6))*2.2123015e-7*y,Re=Re*(.9375*A*A*(1+3*b)-.75*(1+b))*(a=1+2*le)*21460748e-13*y,Fe=(q+Y+T-We)%t,Ie=j+K+Ae+Me+Le-(X+Ge)),Be=Fe,Ne=X,me=0,fe=X+0}return{em:ue,argpm:ce,inclm:he,mm:de,nm:fe,nodem:pe,irez:_e,atime:me,d2201:ge,d2211:xe,d3210:ye,d3222:ve,d4410:$e,d4422:be,d5220:Te,d5232:Ce,d5421:Se,d5433:we,dedt:Ee,didt:Pe,dmdt:Ae,dndt:0,dnodt:Le,domdt:Me,del1:Re,del2:Oe,del3:De,xfact:Ie,xlamo:Fe,xli:Be,xni:Ne}}({cosim:r,emsq:b,argpo:i.argpo,s1:M,s2:R,s3:O,s4:D,s5:I,sinim:o,ss1:B,ss2:N,ss3:G,ss4:z,ss5:U,sz1:V,sz3:k,sz11:W,sz13:H,sz21:q,sz23:j,sz31:X,sz33:Y,t:i.t,tc:0,gsto:i.gsto,mo:i.mo,mdot:i.mdot,no:i.no,nodeo:i.nodeo,nodedot:i.nodedot,xpidot:te,z1:ne,z3:re,z11:oe,z13:ae,z21:se,z23:le,z31:ue,z33:ce,ecco:i.ecco,eccsq:we,em:y,argpm:0,inclm:S,mm:0,nm:w,nodem:0,irez:i.irez,atime:i.atime,d2201:i.d2201,d2211:i.d2211,d3210:i.d3210,d3222:i.d3222,d4410:i.d4410,d4422:i.d4422,d5220:i.d5220,d5232:i.d5232,d5421:i.d5421,d5433:i.d5433,dedt:i.dedt,didt:i.didt,dmdt:i.dmdt,dnodt:i.dnodt,domdt:i.domdt,del1:i.del1,del2:i.del2,del3:i.del3,xfact:i.xfact,xlamo:i.xlamo,xli:i.xli,xni:i.xni});i.irez=Fe.irez,i.atime=Fe.atime,i.d2201=Fe.d2201,i.d2211=Fe.d2211,i.d3210=Fe.d3210,i.d3222=Fe.d3222,i.d4410=Fe.d4410,i.d4422=Fe.d4422,i.d5220=Fe.d5220,i.d5232=Fe.d5232,i.d5421=Fe.d5421,i.d5433=Fe.d5433,i.dedt=Fe.dedt,i.didt=Fe.didt,i.dmdt=Fe.dmdt,i.dnodt=Fe.dnodt,i.domdt=Fe.domdt,i.del1=Fe.del1,i.del2=Fe.del2,i.del3=Fe.del3,i.xfact=Fe.xfact,i.xlamo=Fe.xlamo,i.xli=Fe.xli,i.xni=Fe.xni}1!==i.isimp&&(l=i.cc1*i.cc1,i.d2=4*be*ee*l,Z=i.d2*ee*i.cc1/3,i.d3=(17*be+F)*Z,i.d4=.5*Z*be*ee*(221*be+31*F)*i.cc1,i.t3cof=i.d2+2*l,i.t4cof=.25*(3*i.d3+i.cc1*(12*i.d2+10*l)),i.t5cof=.2*(3*i.d4+12*i.cc1*i.d3+6*i.d2*i.d2+15*l*(2*i.d2+l)))}$(i,0),i.init="n"}function T(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return C(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function S(e){return e*n}function w(e){return e*i}function E(e){var t=e.longitude,i=e.latitude,n=e.height,r=6378.137,o=.006694380004260718,a=r/Math.sqrt(1-o*(Math.sin(i)*Math.sin(i)));return{x:(a+n)*Math.cos(i)*Math.cos(t),y:(a+n)*Math.cos(i)*Math.sin(t),z:(a*(1-o)+n)*Math.sin(i)}}var P={constants:Object.freeze({__proto__:null,deg2rad:i,earthRadius:a,j2:c,j3:h,j3oj2:f,j4:d,minutesPerDay:r,mu:o,pi:e,rad2deg:n,tumin:u,twoPi:t,vkmpersec:l,x2o3:p,xke:s}),propagate:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],o=Array.prototype.slice.call(t,1),a=g.apply(void 0,T(o)),s=(a-n.jdsatepoch)*r;return $(n,s)},sgp4:$,twoline2satrec:function(t,n){var r=1440/(2*e),o=0,a={error:0};a.satnum=t.substring(2,7),a.epochyr=parseInt(t.substring(18,20),10),a.epochdays=parseFloat(t.substring(20,32)),a.ndot=parseFloat(t.substring(33,43)),a.nddot=parseFloat(".".concat(parseInt(t.substring(44,50),10),"E").concat(t.substring(50,52))),a.bstar=parseFloat("".concat(t.substring(53,54),".").concat(parseInt(t.substring(54,59),10),"E").concat(t.substring(59,61))),a.inclo=parseFloat(n.substring(8,16)),a.nodeo=parseFloat(n.substring(17,25)),a.ecco=parseFloat(".".concat(n.substring(26,33))),a.argpo=parseFloat(n.substring(34,42)),a.mo=parseFloat(n.substring(43,51)),a.no=parseFloat(n.substring(52,63)),a.nc=parseFloat(n.substring(52,63)),a.no/=r,a.inclo*=i,a.nodeo*=i,a.argpo*=i,a.mo*=i;var s=_(o=a.epochyr<57?a.epochyr+2e3:a.epochyr+1900,a.epochdays),l=s.mon,u=s.day,c=s.hr,h=s.minute,d=s.sec;return a.jdsatepoch=g(o,l,u,c,h,d),b(a,{opsmode:"i",satn:a.satnum,epoch:a.jdsatepoch-2433281.5,xbstar:a.bstar,xecco:a.ecco,xargpo:a.argpo,xinclo:a.inclo,xmo:a.mo,xno:a.no,xnodeo:a.nodeo}),a},gstime:v,jday:g,invjday:function(e,t){var i=e-2415019.5,n=i/365.25,r=1900+Math.floor(n),o=Math.floor(.25*(r-1901)),a=i-(365*(r-1900)+o)+1e-11;a<1&&(a=i-(365*((r-=1)-1900)+(o=Math.floor(.25*(r-1901)))));var s=_(r,a),l=s.mon,u=s.day,c=s.hr,h=s.minute,d=s.sec-864e-9;return t?[r,l,u,c,h,Math.floor(d)]:new Date(Date.UTC(r,l-1,u,c,h,Math.floor(d)))},dopplerFactor:function(e,t,i){var n=7292115e-11,r={x:t.x-e.x,y:t.y-e.y,z:t.z-e.z};r.w=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)+Math.pow(r.z,2));var o=i.x+n*e.y,a=i.y-n*e.x,s=i.z,l=(r.x*o+r.y*a+r.z*s)/r.w;return 1+l/299792.458*(l>=0?1:-1)},radiansToDegrees:S,degreesToRadians:w,degreesLat:function(t){if(t<-e/2||t>e/2)throw new RangeError("Latitude radians must be in range [-pi/2; pi/2].");return S(t)},degreesLong:function(t){if(t<-e||t>e)throw new RangeError("Longitude radians must be in range [-pi; pi].");return S(t)},radiansLat:function(e){if(e<-90||e>90)throw new RangeError("Latitude degrees must be in range [-90; 90].");return w(e)},radiansLong:function(e){if(e<-180||e>180)throw new RangeError("Longitude degrees must be in range [-180; 180].");return w(e)},geodeticToEcf:E,eciToGeodetic:function(i,n){for(var r=6378.137,o=Math.sqrt(i.x*i.x+i.y*i.y),a=.006694380004260718,s=Math.atan2(i.y,i.x)-n;s<-e;)s+=t;for(;s>e;)s-=t;for(var l,u=0,c=Math.atan2(i.z,Math.sqrt(i.x*i.x+i.y*i.y));u<20;)l=1/Math.sqrt(1-a*(Math.sin(c)*Math.sin(c))),c=Math.atan2(i.z+r*l*a*Math.sin(c),o),u+=1;return{longitude:s,latitude:c,height:o/Math.cos(c)-r*l}},eciToEcf:function(e,t){return{x:e.x*Math.cos(t)+e.y*Math.sin(t),y:e.x*-Math.sin(t)+e.y*Math.cos(t),z:e.z}},ecfToEci:function(e,t){return{x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t),z:e.z}},ecfToLookAngles:function(t,i){var n,r,o,a,s,l,u,c,h,d,f,p,_,m,g=(r=i,o=(n=t).longitude,a=n.latitude,s=E(n),l=r.x-s.x,u=r.y-s.y,c=r.z-s.z,{topS:Math.sin(a)*Math.cos(o)*l+Math.sin(a)*Math.sin(o)*u-Math.cos(a)*c,topE:-Math.sin(o)*l+Math.cos(o)*u,topZ:Math.cos(a)*Math.cos(o)*l+Math.cos(a)*Math.sin(o)*u+Math.sin(a)*c});return d=(h=g).topS,f=h.topE,p=h.topZ,_=Math.sqrt(d*d+f*f+p*p),m=Math.asin(p/_),{azimuth:Math.atan2(-f,d)+e,elevation:m,rangeSat:_}}};return P}));var _0x3121bb=SatelliteToolkit;const _0x25a3bb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x571615=_0x25a3bb(void 0,(function(){return _0x571615.toString().search("(((.+)+)+)+$").toString().constructor(_0x571615).search("(((.+)+)+)+$")}));_0x571615();class _0x5bf86f{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._name=WebGLPlot$e.defaultValue(e.name,void 0),this._tleLine1=WebGLPlot$e.defaultValue(e.tleLine1,void 0),this._tleLine2=WebGLPlot$e.defaultValue(e.tleLine2,void 0),this._networking=WebGLPlot$e.defaultValue(e.networking,void 0),this._mapExtendProperty=new Map,this._satrec=_0x3121bb.twoline2satrec(this._tleLine1,this._tleLine2)}setName(e){this._name}getName(){return this._name}getUUID(){return this._name+" #"+this._satrec.satnum}setNetworking(e){this._networking=e}getNetworking(){return this._networking}getPositionEci(e){let t=null,i=_0x3121bb.propagate(this._satrec,new Date(e)).position;return WebGLPlot$e.defined(i)&&!isNaN(i.x)&&!isNaN(i.y)&&!isNaN(i.z)&&(t=new WebGLPlot$e.Cartesian3(1e3*i.x,1e3*i.y,1e3*i.z)),t}getPositionMatrix(e){var t=new WebGLPlot$e.HeadingPitchRoll;const i=this.getPositionEci(e),n=this.getPositionEci(e+1e3),r=_0xf52e1d.getHeading(i,n);r&&(t.heading=r);const o=_0xf52e1d.getPitch(i,n);return o&&(t.pitch=o),WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(i,t,WebGLPlot$e.Ellipsoid.WGS84,new WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west"))}getOrbitPoints(e){let t=864e5/this._satrec.nc/100,i=[];for(let n=0;n<100;n++){let r=e+parseInt(n*t),o=this.getPositionEci(r);null!=o&&i.push(o)}return i.push(i[0].clone()),i}getExtendProperty(e){return this._mapExtendProperty.get(e)}setExtendProperty(e,t){this._mapExtendProperty.set(e,t)}removeExtendProperty(e){this._mapExtendProperty.delete(e)}getllExtendProperty(){return this._mapExtendProperty}removeAllExtendProperty(){this._mapExtendProperty.clear()}toGeoJson(){let e={};if(!e.hasOwnProperty("SatelliteProperty")){const e=Object.fromEntries(_mapExtendProperty);dataJSON.SatelliteProperty=e}return JSON.stringify(e)}fromGeoJson(e){let t=e.SatelliteProperty;_mapExtendProperty=new Map(Object.entries(t))}clone(){let e=new _0x5bf86f({name:this._name,tleLine1:this._tleLine1,tleLine2:this._tleLine2,networking:this._networking});return this._mapExtendProperty.forEach(((t,i)=>{e._mapExtendProperty.set(i,t)})),e}}const _0x35cd1f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xad5652=_0x35cd1f(void 0,(function(){return _0xad5652.toString().search("(((.+)+)+)+$").toString().constructor(_0xad5652).search("(((.+)+)+)+$")}));_0xad5652();class _0x464966{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._groupName=WebGLPlot$e.defaultValue(e.groupName,""),this._modelPath=WebGLPlot$e.defaultValue(e.modelPath,""),this._modelScale=WebGLPlot$e.defaultValue(e.modelScale,1e4),this._visible=WebGLPlot$e.defaultValue(e.visible,!0),this._orbitsVisible=WebGLPlot$e.defaultValue(e.orbitsVisible,!0),this._orbitsWidth=WebGLPlot$e.defaultValue(e.orbitsWidth,1),this._orbitsColor=WebGLPlot$e.defaultValue(e.orbitsColor,new WebGLPlot$e.Color(.8,.8,.2,.39)),this._tleFilePaths=WebGLPlot$e.defaultValue(e.tleFilePaths,[]),this._scene=void 0,this._mapSatellites=new Map,this._tleInfos=[],this._lUTCtime=void 0,this._isModel=void 0,this._satelliteCollection=void 0,this._orbitsCollection=[],this._POLYLINE_ALL_COUNT=150}setScene(e){if(WebGLPlot$e.defined(e)){this._scene=e,this._scene.primitives.add(this._satelliteCollection);const t=this._orbitsCollection.length;for(let e=0;e<t;e++)this._scene.primitives.add(this._orbitsCollection[e])}}getAllSatelliteScale(){return this._modelScale}setAllSatelliteScale(e){const t=this._satelliteCollection.length;for(let i=0;i<t;i++){this._satelliteCollection.get(i).scale=e}this._modelScale=e,this._saveToScheme()}isVisible(){return this._visible}setVisible(e){this._visible=e;const t=this._satelliteCollection.length;for(let i=0;i<t;i++){this._satelliteCollection.get(i).show=e}let i=!1;this._visible&&this._orbitsVisible&&(i=!0);for(let e=0;e<this._orbitsCollection.length;e++)this._orbitsCollection[e].visible=i;this._saveToScheme()}isOrbitsVisible(){return this._orbitsVisible}setOrbitsVisible(e){this._orbitsVisible=e;let t=!1;this._visible&&this._orbitsVisible&&(t=!0);const i=this._orbitsCollection.length;for(let e=0;e<i;e++)this._orbitsCollection[e].visible=t;this._saveToScheme()}getOrbitsWidth(){return Number(this._orbitsWidth)}setOrbitsWidth(e){const t=this._orbitsCollection.length;for(let i=0;i<t;i++)this._orbitsCollection[i].orbitsWidth=e;this._orbitsWidth=e,this._saveToScheme()}getOrbitsColor(){return this._orbitsColor}setOrbitsColor(e){const t=this._orbitsCollection.length;for(let i=0;i<t;i++)this._orbitsCollection[i].orbitsColor=e;this._orbitsColor=e,this._saveToScheme()}getGroupName(){return this._groupName}getSatelliteFileNames(){let e=[];const t=this._tleInfos.length;for(let i=0;i<t;i++)e.push(this._tleInfos[i].fileName);return e}getSatellites(e){const t=this._tleInfos.length;for(let i=0;i<t;i++){const t=this._tleInfos[i];if(t.fileName===e)return t.satellites}return[]}getSatellitePos(e){let t=null;const i=this._satelliteCollection.length;for(let n=0;n<i;n++){const i=this._satelliteCollection.get(n);if(WebGLPlot$e.defined(i)&&i.id===e){t=this._isModel?_0xf52e1d.getPositionFromModelMatrix(i.modelMatrix):_0xf52e1d.cartesian3ToDegrees(i.position);break}}return t}getSatelliteZRotation(e){let t=new _0x23de81(0,0,0);const i=this._satelliteCollection.length;for(let r=0;r<i;r++){const i=this._satelliteCollection.get(r);if(WebGLPlot$e.defined(i)&&i.id===e&&this._isModel){const i=this._mapSatellites.get(e);var n=new WebGLPlot$e.HeadingPitchRoll;const r=i.getPositionEci(this._lUTCtime),o=i.getPositionEci(this._lUTCtime+1e3),a=_0xf52e1d.getHeading(r,o);a&&(n.heading=a);const s=_0xf52e1d.getPitch(r,o);s&&(n.pitch=s),t=new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(n.pitch),WebGLPlot$e.CesiumMath.toDegrees(n.roll),WebGLPlot$e.CesiumMath.toDegrees(n.heading))}}return t}setGroupModelPath(e){if(WebGLPlot$e.defined(e)&&-1!==e.lastIndexOf(".")){WebGLPlot$e.defined(this._satelliteCollection)&&WebGLPlot$e.defined(this._scene)&&this._scene.primitives.contains(this._satelliteCollection)&&this._scene.primitives.remove(this._satelliteCollection),this._modelPath=e,this._isModel=this._isModelPath(e),this._isModel?this._satelliteCollection=new WebGLPlot$e.PrimitiveCollection:this._satelliteCollection=new WebGLPlot$e.BillboardCollection;for(let e of this._mapSatellites.values())if(this._isModel){let t=e.getPositionMatrix(this._lUTCtime);this._satelliteCollection.add(WebGLPlot$e.Model.fromGltf({id:e.getUUID(),url:this._modelPath,scale:this._modelScale,modelMatrix:t,show:this._visible}))}else{const t=e.getPositionEci(this._lUTCtime);this._satelliteCollection.add({id:e.getUUID(),position:t,image:this._modelPath,scale:this._modelScale,horizontalOrigin:WebGLPlot$e.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$e.VerticalOrigin.CENTER,show:this._visible})}WebGLPlot$e.defined(this._scene)&&this._scene.primitives.add(this._satelliteCollection),this._saveToScheme()}}getGroupModelPath(){return this._modelPath}setGroupModelScale(e){this._modelScale=e;const t=this._satelliteCollection.length;for(let i=0;i<t;i++){let t=this._satelliteCollection.get(i);WebGLPlot$e.defined(t)&&(t.scale=e)}this._saveToScheme()}getGroupModelScale(){return this._modelScale}isModel(){return this._isModel}updateAllSatellitePosition(e){const t=this._satelliteCollection.length;for(let i=0;i<t;i++){const t=this._satelliteCollection.get(i);if(!WebGLPlot$e.defined(t))continue;let n=this.getSatelliteByUUID(t.id);if(!WebGLPlot$e.defined(n))continue;let r=n.getPositionEci(e);WebGLPlot$e.defined(r)&&(this._isModel?t.modelMatrix=n.getPositionMatrix(e):t.position=r)}}updateAllOrbitPosition(e){const t=this._orbitsCollection.length;for(let i=0;i<t;i++){const t=this._orbitsCollection[i].length;for(let n=0;n<t;n++){let t=this._orbitsCollection[i].get(n),r=this._mapSatellites.get(t.id);WebGLPlot$e.defined(r)&&(t.point3Ds=r.getPositionMatrix(e))}}}getSatelliteByUUID(e){return this._mapSatellites.get(e)}_removeSatelliteFromScene(e){if(!WebGLPlot$e.defined(e))return!1;let t=!1;const i=this._satelliteCollection.length;let n=null;for(let t=0;t<i;t++){const i=this._satelliteCollection.get(t);if(WebGLPlot$e.defined(i)&&i.id===e){n=i;break}}null!=n&&(this._satelliteCollection.remove(n),t=!0);let r=!1;const o=this._orbitsCollection.length;for(let t=0;t<o&&!r;t++){let i=null,n=this._orbitsCollection[t];const o=n.length;for(let t=0;t<o;t++){const r=n.get(t);if(WebGLPlot$e.defined(r)&&r.id===e){i=r;break}}null!=i&&(n.remove(i),r=!0)}return t&&r}_addSatelliteToScene(e){if(!WebGLPlot$e.defined(e))return!1;const t=this._mapSatellites.get(e);if(!WebGLPlot$e.defined(t))return!1;if(this._isModel){let e=t.getPositionMatrix(this._lUTCtime);this._satelliteCollection.add(WebGLPlot$e.Model.fromGltf({id:t.getUUID(),url:this._modelPath,scale:this._modelScale,modelMatrix:e,show:this._visible}))}else{const e=t.getPositionEci(this._lUTCtime);this._satelliteCollection.add({id:t.getUUID(),position:e,image:this._modelPath,scale:this._modelScale,horizontalOrigin:WebGLPlot$e.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$e.VerticalOrigin.CENTER,show:this._visible})}const i=t.getOrbitPoints(this._lUTCtime);let n=this._orbitsCollection[this._orbitsCollection.length-1];return n.add({id:t.getUUID(),positions:i}),n.orbitsColor=this._orbitsColor,n.orbitsWidth=this._orbitsWidth,n.orbitsVisible=this._orbitsVisible,!0}fromJson(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.groupName)&&(this._groupName=t.groupName),WebGLPlot$e.defined(t.modelPath)&&(this._modelPath=t.modelPath),WebGLPlot$e.defined(t.modelScale)&&(this._modelScale=t.modelScale),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.orbitsVisible)&&(this._orbitsVisible=t.orbitsVisible),WebGLPlot$e.defined(t.orbitsWidth)&&(this._orbitsWidth=t.orbitsWidth),WebGLPlot$e.defined(t.orbitsColor)&&(this._orbitsColor=WebGLPlot$e.Color.fromCssColorString(t.orbitsColor)),WebGLPlot$e.defined(t.tleFilePaths)&&(this._tleFilePaths=[],t.tleFilePaths.forEach((e=>{this._tleFilePaths.push(e)})))}toJson(){let e={};e.hasOwnProperty("groupName")||(e.groupName=this._groupName),e.hasOwnProperty("modelPath")||(e.modelPath=this._modelPath),e.hasOwnProperty("modelScale")||(e.modelScale=this._modelScale),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("orbitsVisible")||(e.orbitsVisible=this._orbitsVisible),e.hasOwnProperty("orbitsWidth")||(e.orbitsWidth=this._orbitsWidth),e.hasOwnProperty("orbitsColor")||(e.orbitsColor=this._orbitsColor.toCssColorString());let t=[];return e.hasOwnProperty("tleFilePaths")||(this._tleFilePaths.forEach((e=>{t.push(e)})),e.tleFilePaths=t),JSON.stringify(e)}initGroup(){if(!WebGLPlot$e.defined(this._modelPath)||!WebGLPlot$e.defined(this._tleFilePaths)||!WebGLPlot$e.defined(this._groupName))return;let e=_0x2e28f1.getInstance().getURI();if(!WebGLPlot$e.defined(e))return;this._lUTCtime=Date.now(),this._isModel=this._isModelPath(this._modelPath),this._isModel?this._satelliteCollection=new WebGLPlot$e.PrimitiveCollection:this._satelliteCollection=new WebGLPlot$e.BillboardCollection,this._POLYLINE_ALL_COUNT=150,this._orbitsCollection=[],this._orbitsCollection.push(new _0x415334),this._tleInfos=[];let t=this._tleFilePaths.length;for(let i=0;i<t;i++){let t=this._loadTLE(e+this._tleFilePaths[i]);WebGLPlot$e.defined(t)&&(this._tleInfos.push(t),this._addSatellites(t))}this.setOrbitsColor(this._orbitsColor),this.setOrbitsWidth(this._orbitsWidth),this.setOrbitsVisible(this._orbitsVisible)}destory(){if(WebGLPlot$e.defined(this._scene)){WebGLPlot$e.defined(this._satelliteCollection)&&this._scene.primitives.remove(this._satelliteCollection);const e=this._orbitsCollection.length;for(let t=0;t<e;t++)WebGLPlot$e.defined(this._orbitsCollection[t])&&this._scene.primitives.remove(this._orbitsCollection[t])}this._satelliteCollection=void 0,this._orbitsCollection=[],this._tleInfos=[]}_loadTLE(e){if(!WebGLPlot$e.defined(e))return null;var t=(e=e.replace(/\\+/g,"/")).lastIndexOf("/");if(-1==t)return null;let i=e.substring(t+1),n=i.substring(0,i.lastIndexOf(".")),r=[];var o;(o=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open("GET",e,!1),o.send();let a=o.responseText.split(/\r\n/).filter((function(e){return e&&e.trim()})),s=0,l=a.length/3;for(let e=0;e<l;e++){let e=new _0x5bf86f({name:a[s].trim(),tleLine1:a[s+1].trim(),tleLine2:a[s+2].trim(),networking:n});null!=e&&r.push(e),s+=3}return{fileName:n,filePath:e,satellites:r}}_addSatellites(e){let t=this._orbitsCollection[this._orbitsCollection.length-1],i=e.satellites.length;for(let n=0;n<i;n++){let i=e.satellites[n];if(!WebGLPlot$e.defined(i))continue;this._mapSatellites.set(i.getUUID(),i);const r=i.getPositionEci(this._lUTCtime);if(null==r)continue;const o=i.getOrbitPoints(this._lUTCtime);if(WebGLPlot$e.defined(o)&&0!=o.length){if(this._isModel){let e=i.getPositionMatrix(this._lUTCtime);this._satelliteCollection.add(WebGLPlot$e.Model.fromGltf({id:i.getUUID(),url:this._modelPath,scale:this._modelScale,modelMatrix:e,show:this._visible}))}else this._satelliteCollection.add({id:i.getUUID(),position:r,image:this._modelPath,scale:this._modelScale,horizontalOrigin:WebGLPlot$e.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$e.VerticalOrigin.CENTER,show:this._visible});t.length>this._POLYLINE_ALL_COUNT&&(t=new _0x415334,this._orbitsCollection.push(t)),t.add({id:i.getUUID(),positions:o})}}}_saveToScheme(){_0x2e28f1.getInstance().getSatelliteManager()._setIsModify(!0),_0x2e28f1.getInstance().getSatelliteManager()._save()}_isModelPath(e){let t=!1;if(WebGLPlot$e.defined(e)){let i=e.lastIndexOf(".");if(-1!=i){let n=e.substring(i+1).toUpperCase();("GLTF"===n||"GLB"===n)&&(t=!0)}}return t}}const _0x4ad14a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2cb9a4=_0x4ad14a(void 0,(function(){return _0x2cb9a4.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cb9a4).search("(((.+)+)+)+$")}));_0x2cb9a4();class _0x5e00a7{constructor(){this._scene=void 0,this._arrSatelliteGroup=[],this._isModified=!1}setScene(e){this._scene=e}getGroups(){return this._arrSatelliteGroup}getGroup(e){const t=this._arrSatelliteGroup.length;for(let i=0;i<t;i++)if(this._arrSatelliteGroup[i].getGroupName()===e)return this._arrSatelliteGroup[i];return null}updateAllSatellitePosition(e){const t=this._arrSatelliteGroup.length;for(let i=0;i<t;i++)this._arrSatelliteGroup[i].updateAllSatellitePosition(e)}updateAllOrbitPosition(e){const t=this._arrSatelliteGroup.length;for(let e=0;e<t;e++)this._arrSatelliteGroup[e].updateAllOrbitPosition()}fromJson(e){let t=this._arrSatelliteGroup.length;for(let e=0;e<t;e++)this._arrSatelliteGroup[e].destory();if(this._arrSatelliteGroup=[],e.length>0){let t=JSON.parse(e);WebGLPlot$e.defined(t.groups)&&t.groups.forEach((e=>{let t=new _0x464966;t.fromJson(JSON.stringify(e)),t.initGroup(),WebGLPlot$e.defined(this._scene)&&t.setScene(this._scene),this._arrSatelliteGroup.push(t)}))}}toJson(){let e={},t=[];return this._arrSatelliteGroup.forEach((e=>{t.push(JSON.parse(e.toJson()))})),e.hasOwnProperty("groups")||(e.groups=t),JSON.stringify(e)}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){this._isModified&&_0x2e28f1.getInstance()._saveSatelliteGroups(!1)}}const _0x32aff3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x42111d=_0x32aff3(void 0,(function(){return _0x42111d.toString().search("(((.+)+)+)+$").toString().constructor(_0x42111d).search("(((.+)+)+)+$")}));_0x42111d();const _0x1cc0d7={ENTITY:0,SCRIPT:1,SATELLITE:2};var _0x489b6c=Object.freeze(_0x1cc0d7);const _0x28c581=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x275ee3=_0x28c581(void 0,(function(){return _0x275ee3.toString().search("(((.+)+)+)+$").toString().constructor(_0x275ee3).search("(((.+)+)+)+$")}));_0x275ee3();class _0x2e5655 extends _0x3fd6e5{constructor(e){super(e.geoGraphicObject),this._satelliteGroupName=e.satelliteGroupName,this._satellite=e.satellite,this._orbit=e.orbit,this._name=this._satellite.getUUID(),this._orbitVisible=void 0,WebGLPlot$e.defined(e.orbit)&&(this.setOrbitVisible(e.orbitVisible),this.setOrbitWidth(e.orbitWidth),this.setOrbitColor(e.orbitColor))}setGeoEntityParameter(e){super.setGeoEntityParameter(e),e.isVisible()&&this._orbitVisible?this._orbit.show=!0:this._orbit.show=!1,this._isModified=!0,this._save()}getSatellite(){return this._satellite}getSatelliteGroupName(){return this._satelliteGroupName}getOrbit(){return this._orbit}isOrbitVisible(){if(WebGLPlot$e.defined(this._orbit))return this._orbit.show}setOrbitVisible(e){this.getGeoEntityParameter().isVisible()&&e?this._orbit.show=!0:this._orbit.show=!1,this._orbitVisible=e,this._isModified=!0,this._save()}getOrbitWidth(){if(WebGLPlot$e.defined(this._orbit))return this._orbit.width}setOrbitWidth(e){this._orbit.width=e,this._isModified=!0,this._save()}getOrbitColor(){if(WebGLPlot$e.defined(this._orbit))return this._orbit.material.uniforms.color}setOrbitColor(e){this._orbit.material.uniforms.color=e,this._isModified=!0,this._save()}updateOrbitPosition(e){let t=this._satellite.getOrbitPoints(e);this._orbit.positions=t}toJson(){let e=super.toJson();if(""==e)return"";let t=JSON.parse(e);t.hasOwnProperty("satellite")||(t.satellite={},t.satellite.hasOwnProperty("satelliteGroupName")||(t.satellite.satelliteGroupName=this._satelliteGroupName),t.satellite.hasOwnProperty("satelliteUUID")||(t.satellite.satelliteUUID=this._satellite.getUUID()));return t.hasOwnProperty("orbit")||(t.orbit={},t.orbit.hasOwnProperty("orbitVisible")||(t.orbit.orbitVisible=this._orbitVisible),t.orbit.hasOwnProperty("orbitWidth")||(t.orbit.orbitWidth=this._orbit.width),t.orbit.hasOwnProperty("orbitColor")||(t.orbit.orbitColor=this._orbit.material.uniforms.color.toCssColorString())),JSON.stringify(t)}fromJson(e){return super.fromJson(e)}_save(){this._isMoveGeoEntity||_0x2e28f1.getInstance()._saveSatelliteGeoEntity(!1)}}const _0x5a3eb3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x45d966=_0x5a3eb3(void 0,(function(){return _0x45d966.toString().search("(((.+)+)+)+$").toString().constructor(_0x45d966).search("(((.+)+)+)+$")}));_0x45d966();class _0x535f91{constructor(){this._mapSatelliteEntitys=new Map,this._scene=void 0,this._geoEntityLayer=void 0,this._satelliteOrbitsLayer=new _0x415334,this._addGeoEntitys=[],this._removeEntityUUIDs=[]}setScene(e){WebGLPlot$e.defined(e)&&(this._geoEntityLayer=new _0x394df6(e,"SatelliteEntitys"),e.plotLayers.add(this._geoEntityLayer),e.primitives.add(this._satelliteOrbitsLayer),this._scene=e)}addSatelliteEntity(e,t,i,n){if(!WebGLPlot$e.defined(t))return;const r=t.getGroup(i);if(!WebGLPlot$e.defined(r))return;let o=r.getSatelliteByUUID(e);if(!WebGLPlot$e.defined(o))return;let a=o.getName(),s=r.getAllSatelliteScale(),l=r.getOrbitsWidth(),u=r.getOrbitsColor(),c=r.getSatelliteZRotation(o.getUUID()),h=r.getSatellitePos(o.getUUID()),d=r.getGroupModelPath(),f=r.isModel(),p=this;if(f)this._geoEntityLayer.createSymbol(0,99999,[h],{url:d},(function(e){if(WebGLPlot$e.defined(e)){e.feature.__dotPlotLibID=0,e.feature.__dotPlotCode=99998;let t=o.getOrbitPoints(r._lUTCtime),h=p._satelliteOrbitsLayer.add({id:o.getUUID(),positions:t}),d=new _0x2e5655({geoGraphicObject:e.feature,satelliteGroupName:i,satellite:o,orbit:h,orbitWidth:l,orbitColor:u,orbitVisible:true});e.feature.setGeoEntity(d),p._mapSatelliteEntitys.set(d.getUUID(),d),p._addGeoEntitys.push(d),p._save();let f=d.getGeoEntityParameter();f.setModelScale(s),f.setModelRotate(c),d.setGeoEntityParameter(f),d.setName(a),r._removeSatelliteFromScene(o.getUUID()),"function"==typeof n&&n({uuid:d.getUUID()})}}));else{let e=new Image;e.src=d,e.onload=function(){let t=new WebGLPlot$e.Cartesian2(e.width*s,e.height*s),c=p;p._geoEntityLayer.createSymbol(0,20,[h],{url:d},(function(e){if(WebGLPlot$e.defined(e)){e.feature.__dotPlotLibID=0,e.feature.__dotPlotCode=99998,e.feature.anchorPoint=new WebGLPlot$e.Cartesian2(.5,1.5);let s=o.getOrbitPoints(r._lUTCtime),h=c._satelliteOrbitsLayer.add({id:o.getUUID(),positions:s}),d=new _0x2e5655({geoGraphicObject:e.feature,satelliteGroupName:i,satellite:o,orbit:h,orbitWidth:l,orbitColor:u,orbitVisible:true});e.feature.setGeoEntity(d),c._mapSatelliteEntitys.set(d.getUUID(),d),c._addGeoEntitys.push(d),c._save();let f=d.getGeoEntityParameter();f.setPictureSymbolSize(t),d.setGeoEntityParameter(f),d.setName(a),r._removeSatelliteFromScene(o.getUUID()),"function"==typeof n&&n({uuid:d.getUUID()})}}))}}}removeSatelliteEntity(e,t){let i=this._convertEntityToSatellite(e,t);return i&&(this._removeEntityUUIDs.push(e),this._save()),i}getSatelliteEntityByUUID(e){return this._mapSatelliteEntitys.get(e)}getSatelliteEntitys(){let e=[];for(let t of this._mapSatelliteEntitys.values())e.push(t);return e}updateAllSatelliteEntityPosition(e){for(let t of this._mapSatelliteEntitys.values()){let i=t.getSatellite();if(WebGLPlot$e.defined(i)){let n=i.getPositionEci(e);if(WebGLPlot$e.defined(n)){let e=t.getGeoEntityParameter();e.setPosition(_0xf52e1d.cartesian3ToDegrees(n)),t.setGeoEntityParameter(e)}}}}updateAllOrbitPosition(e){for(let t of this._mapSatelliteEntitys.values())t.updateOrbitPosition(e)}removeAllSatelliteEntity(e){this._mapSatelliteEntitys.forEach(((t,i)=>{this._convertEntityToSatellite(i,e)&&this._removeEntityUUIDs.push(i)})),this._mapSatelliteEntitys.clear(),this._save()}toJson(){let e=new Map;return this._mapSatelliteEntitys.forEach(((t,i)=>{e.set(t.getUUID(),t.toJson())})),e}fromJson(e,t){let i=e.satelliteEntityJsons,n=e.satelliteManager;if(this.removeAllSatelliteEntity(n),!WebGLPlot$e.defined(this._geoEntityLayer))return;let r=this,o=[];i.forEach(((e,a)=>{let s=JSON.parse(e);WebGLPlot$e.defined(s.geoGraphicObject)&&this._geoEntityLayer.geoJsonToGeoGraphicObject(JSON.parse(s.geoGraphicObject),(function(e){if(WebGLPlot$e.defined(e)){let a=e.feature;if(WebGLPlot$e.defined(a)){let e,l,u,c,h;if(WebGLPlot$e.defined(s.satellite)&&(e=n.getGroup(s.satellite.satelliteGroupName),l=e.getSatelliteByUUID(s.satellite.satelliteUUID)),WebGLPlot$e.defined(s.orbit)&&(u=s.orbit.orbitVisible,c=s.orbit.orbitWidth,h=WebGLPlot$e.Color.fromCssColorString(s.orbit.orbitColor)),WebGLPlot$e.defined(s.geoEntity)&&WebGLPlot$e.defined(e)&&WebGLPlot$e.defined(l)){let n=l.getOrbitPoints(e._lUTCtime),d=r._satelliteOrbitsLayer.add({id:l.getUUID(),positions:n}),f=new _0x2e5655({geoGraphicObject:a,satelliteGroupName:e.getGroupName(),satellite:l,orbit:d,orbitWidth:c,orbitColor:h,orbitVisible:u});f.fromJson(s.geoEntity),a.setGeoEntity(f),r._mapSatelliteEntitys.set(f.getUUID(),f),o.push(f.getUUID()),"function"==typeof t&&o.length===i.size&&t({UUIDs:o})}}}}))}))}_convertEntityToSatellite(e,t){if(!WebGLPlot$e.defined(t))return!1;const i=this._mapSatelliteEntitys.get(e);if(!WebGLPlot$e.defined(i))return!1;const n=i.getSatelliteGroupName();if(!WebGLPlot$e.defined(n))return!1;this._satelliteOrbitsLayer.remove(i.getOrbit()),this._mapSatelliteEntitys.delete(e);let r=i._getGeoGraphicObject();WebGLPlot$e.defined(r)&&(r.removeAllGeoEffect(),this._geoEntityLayer.removeGeoGraphicObject(r));const o=t.getGroup(n);return!!WebGLPlot$e.defined(o)&&(o._addSatelliteToScene(i.getSatellite().getUUID()),!0)}_removeAllSatelliteEntityFromScene(e){this._mapSatelliteEntitys.forEach(((t,i)=>{this._convertEntityToSatellite(i,e)})),this._mapSatelliteEntitys.clear()}_getAddAndRemoveGeoEntitys(){return{add:this._addGeoEntitys,remove:this._removeEntityUUIDs}}_clearAddAndRemoveGeoEntitys(){this._addGeoEntitys.splice(0),this._removeEntityUUIDs.splice(0)}_save(){_0x2e28f1.getInstance()._saveSatelliteGeoEntity(!1)}}const _0x3db4e9=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x251594=_0x3db4e9(void 0,(function(){return _0x251594.toString().search("(((.+)+)+)+$").toString().constructor(_0x251594).search("(((.+)+)+)+$")}));_0x251594();class _0x56b6ed{constructor(e){this._UUID=WebGLPlot$e.createGuid(),this._geoEntityParameter=WebGLPlot$e.defaultValue(e,new _0x4920fc)}_getGeoEntityParameter(){return this._geoEntityParameter}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityParameter")||(e.geoEntityParameter=this._geoEntityParameter._toJson()),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.geoEntityParameter)&&this._geoEntityParameter._fromJson(t.geoEntityParameter)}clone(){let e=new _0x56b6ed;return e._UUID=this._UUID,e._geoEntityParameter=this._geoEntityParameter.clone(),e}getUUID(){return this._UUID}setModelPath(e){this._geoEntityParameter.setModelPath(e)}getModelPath(){return this._geoEntityParameter.getModelPath()}setDotPlotLibID(e){this._geoEntityParameter.setDotPlotLibID(e)}getDotPlotLibID(){return this._geoEntityParameter.getDotPlotLibID()}setDotPlotCode(e){this._geoEntityParameter.setDotPlotCode(e)}getDotPlotCode(){return this._geoEntityParameter.getDotPlotCode()}setDotPlotStyle(e){this._geoEntityParameter.setDotPlotStyle(e)}getDotPlotStyle(){return this._geoEntityParameter.getDotPlotStyle()}setVisible(e){this._geoEntityParameter.setVisible(e)}isVisible(){return this._visible}setPicturePath(e){this._geoEntityParameter.setPicturePath(e)}getPicturePath(){return this._geoEntityParameter.getPicturePath()}setShowMode(e){this._geoEntityParameter.setShowMode(e)}getShowMode(){return this._geoEntityParameter.getShowMode()}setIsDistanceChangeMode(e){this._geoEntityParameter.setIsDistanceChangeMode(e)}getIsDistanceChangeMode(){return this._geoEntityParameter.getIsDistanceChangeMode()}setChangeModeDistance(e){this._geoEntityParameter.setChangeModeDistance(e)}getChangeModeDistance(){return this._geoEntityParameter.getChangeModeDistance()}}const _0x38cda1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x173131=_0x38cda1(void 0,(function(){return _0x173131.toString().search("(((.+)+)+)+$").toString().constructor(_0x173131).search("(((.+)+)+)+$")}));_0x173131();class _0x5a492f{constructor(e){this._UUID=WebGLPlot$e.createGuid(),this._geoEntityEffects=WebGLPlot$e.defaultValue(e,[])}_fromJson(e){let t=JSON.parse(e);!WebGLPlot$e.defined(t)||(WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.geoEntityEffects)&&(this._geoEntityEffects=[],t.geoEntityEffects.forEach((e=>{this._geoEntityEffects.push(_0x1b8e09.createGeoEntityEffectFromJson(e))}))))}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityEffects")||(e.geoEntityEffects=[],this._geoEntityEffects.forEach((t=>{e.geoEntityEffects.push(t.toJSON())}))),JSON.stringify(e)}getUUID(){return this._UUID}setGeoEntityEffects(e){this._geoEntityEffects=e}getGeoEntityEffects(){return this._geoEntityEffects}}const _0x4ba655=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x415728=_0x4ba655(void 0,(function(){return _0x415728.toString().search("(((.+)+)+)+$").toString().constructor(_0x415728).search("(((.+)+)+)+$")}));_0x415728();class _0x1e6774{constructor(){this._UUID=WebGLPlot$e.createGuid(),this._isTimeMode=!0,this._time=void 0,this._speed=void 0,this._isCurvePath=!1,this._pathPoint3D=void 0,this._scalePoint2D=void 0,this._originPosition=void 0,this._targetPosition=void 0,this._originGeoEntityUUID=void 0,this._targetGeoEntityUUID=void 0}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("isTimeMode")||(e.isTimeMode=this._isTimeMode),!e.hasOwnProperty("time")&&WebGLPlot$e.defined(this._time)&&(e.time=this._time),!e.hasOwnProperty("speed")&&WebGLPlot$e.defined(this._speed)&&(e.speed=this._speed),e.hasOwnProperty("isCurvePath")||(e.isCurvePath=this._isCurvePath),!e.hasOwnProperty("pathPoint3D")&&WebGLPlot$e.defined(this._pathPoint3D)&&(e.pathPoint3D=[],this._pathPoint3D.forEach((t=>{e.pathPoint3D.push({x:t.x,y:t.y,z:t.z})}))),!e.hasOwnProperty("scalePoint2D")&&WebGLPlot$e.defined(this._scalePoint2D)&&(e.scalePoint2D=[],this._scalePoint2D.forEach((t=>{e.scalePoint2D.push({x:t.x,y:t.y})}))),!e.hasOwnProperty("originPosition")&&WebGLPlot$e.defined(this._originPosition)&&(e.originPosition={x:this._originPosition.x,y:this._originPosition.y,z:this._originPosition.z}),!e.hasOwnProperty("targetPosition")&&WebGLPlot$e.defined(this._targetPosition)&&(e.targetPosition={x:this._targetPosition.x,y:this._targetPosition.y,z:this._targetPosition.z}),!e.hasOwnProperty("targetGeoEntityUUID")&&WebGLPlot$e.defined(this._targetGeoEntityUUID)&&(e.targetGeoEntityUUID=this._targetGeoEntityUUID),!e.hasOwnProperty("originGeoEntityUUID")&&WebGLPlot$e.defined(this._originGeoEntityUUID)&&(e.originGeoEntityUUID=this._originGeoEntityUUID),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.isTimeMode)&&(this._isTimeMode=t.isTimeMode),WebGLPlot$e.defined(t.time)&&(this._time=t.time),WebGLPlot$e.defined(t.speed)&&(this._speed=t.speed),WebGLPlot$e.defined(t.isCurvePath)&&(this._isCurvePath=t.isCurvePath),WebGLPlot$e.defined(t.pathPoint3D)&&(this._pathPoint3D=[],t.pathPoint3D.forEach((e=>{this._pathPoint3D.push(new _0x23de81(e.x,e.y,e.z))}))),WebGLPlot$e.defined(t.scalePoint2D)&&(this._scalePoint2D=[],t.scalePoint2D.forEach((e=>{this._scalePoint2D.push(new WebGLPlot$e.Cartesian2(e.x,e.y))}))),WebGLPlot$e.defined(t.targetPosition)&&(this._targetPosition=new _0x23de81(t.targetPosition.x,t.targetPosition.y,t.targetPosition.z)),WebGLPlot$e.defined(t.originPosition)&&(this._originPosition=new _0x23de81(t.originPosition.x,t.originPosition.y,t.originPosition.z)),WebGLPlot$e.defined(t.targetGeoEntityUUID)&&(this._targetGeoEntityUUID=t.targetGeoEntityUUID),WebGLPlot$e.defined(t.originGeoEntityUUID)&&(this._originGeoEntityUUID=t.originGeoEntityUUID)}getUUID(){return this._UUID}setIsTimeMode(e){this._isTimeMode=e}isTimeMode(){return this._isTimeMode}setTime(e){this._time=e}getTime(){return this._time}setSpeed(e){this._speed=e}getSpeed(){return this._speed}setScalePoint2D(e){this._scalePoint2D=e,this._pathPoint3D=void 0}getScalePoint2D(){return this._scalePoint2D}setPathPoint3D(e){this._pathPoint3D=e,this._scalePoint2D=void 0}getPathPoint3D(){return this._pathPoint3D}setTargetPosition(e){this._targetPosition=e}getTargetPosition(){return this._targetPosition}setOriginPosition(e){this._originPosition=e}getOriginPosition(){return this._originPosition}setTargetGeoEntityUUID(e){this._targetGeoEntityUUID=e}getTargetGeoEntityUUID(){return this._targetGeoEntityUUID}setOriginGeoEntityUUID(e){this._originGeoEntityUUID=e}getOriginGeoEntityUUID(){return this._originGeoEntityUUID}setIsCurvePath(e){this._isCurvePath=e}isCurvePath(){return this._isCurvePath}clone(){let e=new _0x1e6774;return e._UUID=this._UUID,e._isTimeMode=this._isTimeMode,e._time=this._time,e._speed=this._speed,e._isCurvePath=this._isCurvePath,WebGLPlot$e.defined(this._pathPoint3D)&&(e._pathPoint3D=[],this._pathPoint3D.forEach((t=>{e._pathPoint3D.push(new _0x23de81(t.x,t.y,t.z))}))),WebGLPlot$e.defined(this._scalePoint2D)&&(e._scalePoint2D=[],this._scalePoint2D.forEach((t=>{e._scalePoint2D.push(new WebGLPlot$e.Cartesian2(t.x,t.y))}))),e._originPosition=this._originPosition,e._targetPosition=this._targetPosition,e._targetGeoEntityUUID=this._targetGeoEntityUUID,e._originGeoEntityUUID=this._originGeoEntityUUID,e}}var _0x37701d=(_0x5c0174=!0,function(e,t){var i=_0x5c0174?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c0174=!1,i}),_0x43cb64=_0x37701d(void 0,(function(){return _0x43cb64.toString().search("(((.+)+)+)+$").toString().constructor(_0x43cb64).search("(((.+)+)+)+$")})),_0x5c0174;_0x43cb64();var _0xbe49b1={NO:0,ONEWAY:1,BOTHWAY:2},_0x4c8ffe=Object.freeze(_0xbe49b1);const _0x18b194=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x10aeb7=_0x18b194(void 0,(function(){return _0x10aeb7.toString().search("(((.+)+)+)+$").toString().constructor(_0x10aeb7).search("(((.+)+)+)+$")}));_0x10aeb7();class _0x4d2fe0{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._time=WebGLPlot$e.defaultValue(e.time,0),this._startRotation=WebGLPlot$e.defaultValue(e.startRotation,new _0x23de81(0,0,0)),this._endRotation=WebGLPlot$e.defaultValue(e.endRotation,new _0x23de81(0,0,0)),this._cyclicType=WebGLPlot$e.defaultValue(e.cyclicType,_0x4c8ffe.NO),this._isGradient=WebGLPlot$e.defaultValue(e.isGradient,!0),WebGLPlot$e.defined(e.time)||WebGLPlot$e.defined(e.totalTime)?this._totalTime=WebGLPlot$e.defaultValue(e.totalTime,e.time):this._totalTime=void 0,this._UUID=WebGLPlot$e.createGuid()}getUUID(){return this._UUID}setTotalTime(e){this._totalTime=e}getTotalTime(){return this._totalTime}setTime(e){this._time=e,WebGLPlot$e.defined(this._totalTime)||(this._totalTime=this._time)}getTime(){return this._time}setStartRotation(e){this._startRotation=e}getStartRotation(){return this._startRotation}setEndRotation(e){this._endRotation=e}getEndRotation(){return this._endRotation}setCyclicType(e){this._cyclicType=e}getCyclicType(){return this._cyclicType}setIsGradient(e){this._isGradient=e}isGradient(){return this._isGradient}_toJson(){let e={};e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("time")||(e.time=this._time);e.hasOwnProperty("startRotation")||(e.startRotation={},e.startRotation.hasOwnProperty("x")||(e.startRotation.x=this._startRotation.x),e.startRotation.hasOwnProperty("y")||(e.startRotation.y=this._startRotation.y),e.startRotation.hasOwnProperty("z")||(e.startRotation.z=this._startRotation.z));return e.hasOwnProperty("endRotation")||(e.endRotation={},e.endRotation.hasOwnProperty("x")||(e.endRotation.x=this._endRotation.x),e.endRotation.hasOwnProperty("y")||(e.endRotation.y=this._endRotation.y),e.endRotation.hasOwnProperty("z")||(e.endRotation.z=this._endRotation.z)),e.hasOwnProperty("cyclicType")||(e.cyclicType=this._cyclicType),e.hasOwnProperty("isGradient")||(e.isGradient=this._isGradient),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.time)&&(this._time=t.time),WebGLPlot$e.defined(t.startRotation)&&(WebGLPlot$e.defined(t.startRotation.x)&&(this._startRotation.x=t.startRotation.x),WebGLPlot$e.defined(t.startRotation.y)&&(this._startRotation.y=t.startRotation.y),WebGLPlot$e.defined(t.startRotation.z)&&(this._startRotation.z=t.startRotation.z)),WebGLPlot$e.defined(t.endRotation)&&(WebGLPlot$e.defined(t.endRotation.x)&&(this._endRotation.x=t.endRotation.x),WebGLPlot$e.defined(t.endRotation.y)&&(this._endRotation.y=t.endRotation.y),WebGLPlot$e.defined(t.endRotation.z)&&(this._endRotation.z=t.endRotation.z)),WebGLPlot$e.defined(t.cyclicType)&&(this._cyclicType=t.cyclicType),WebGLPlot$e.defined(t.isGradient)&&(this._isGradient=t.isGradient)}}const _0x9ff03d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x15a13a=_0x9ff03d(void 0,(function(){return _0x15a13a.toString().search("(((.+)+)+)+$").toString().constructor(_0x15a13a).search("(((.+)+)+)+$")}));_0x15a13a();class _0xc7aed0{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._time=WebGLPlot$e.defaultValue(e.time,0),this._startScale=WebGLPlot$e.defaultValue(e.startScale,1),this._endScale=WebGLPlot$e.defaultValue(e.endScale,1),this._cyclicType=WebGLPlot$e.defaultValue(e.cyclicType,_0x4c8ffe.NO),this._isGradient=WebGLPlot$e.defaultValue(e.isGradient,!0),WebGLPlot$e.defined(e.time)||WebGLPlot$e.defined(e.totalTime)?this._totalTime=WebGLPlot$e.defaultValue(e.totalTime,e.time):this._totalTime=void 0,this._UUID=WebGLPlot$e.createGuid()}getUUID(){return this._UUID}setTotalTime(e){this._totalTime=e}getTotalTime(){return this._totalTime}setTime(e){this._time=e,WebGLPlot$e.defined(this._totalTime)||(this._totalTime=this._time)}getTime(){return this._time}setStartScale(e){this._startScale=e}getStartScale(){return this._startScale}setEndScale(e){this._endScale=e}getEndScale(){return this._endScale}setCyclicType(e){this._cyclicType=e}getCyclicType(){return this._cyclicType}setIsGradient(e){this._isGradient=e}isGradient(){return this._isGradient}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("time")||(e.time=this._time),e.hasOwnProperty("startScale")||(e.startScale=this._startScale),e.hasOwnProperty("endScale")||(e.endScale=this._endScale),e.hasOwnProperty("cyclicType")||(e.cyclicType=this._cyclicType),e.hasOwnProperty("isGradient")||(e.isGradient=this._isGradient),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.time)&&(this._time=t.time),WebGLPlot$e.defined(t.startScale)&&(this._startScale=t.startScale),WebGLPlot$e.defined(t.endScale)&&(this._endScale=t.endScale),WebGLPlot$e.defined(t.cyclicType)&&(this._cyclicType=t.cyclicType),WebGLPlot$e.defined(t.isGradient)&&(this._isGradient=t.isGradient)}}const _0xdb8c76=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x185e26=_0xdb8c76(void 0,(function(){return _0x185e26.toString().search("(((.+)+)+)+$").toString().constructor(_0x185e26).search("(((.+)+)+)+$")}));_0x185e26();class _0xcc97e1{constructor(e,t,i,n,r,o,a){this._geoEntityUUID=e,this._geoEntityMoveParameter=t,this._executeManagerCalc=n,this._groupIndex=r,this._speed=0,this._curvePath3D=[],this._controlPointIndexs=[],this._isToTarget=!1,this._lastTime=void 0,this._lastDistance=0,this._isFinished=!1,this._isChangeCurve=!1,this._moveMode=-1,this._position=o,this._rotation=a,this._geoEntityMoveParameter=t,this._init(t,i)}_createCurve3D(e){let t=_0xf52e1d.getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$e.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new Cesium.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_init(e,t){let i=e.isTimeMode(),n=e.getTime(),r=e.getSpeed(),o=e.getPathPoint3D(),a=e.getScalePoint2D();if(i&&WebGLPlot$e.defined(n)){let i=1e3*n;if(i>0){let n,r=[],s=e.getOriginGeoEntityUUID();WebGLPlot$e.defined(s)&&(n=this._executeManagerCalc._getPosition(this._groupIndex,s,t));let l,u=e.getTargetGeoEntityUUID();if(WebGLPlot$e.defined(u)&&(l=this._executeManagerCalc._getPosition(this._groupIndex,u,t+i)),WebGLPlot$e.defined(o))WebGLPlot$e.defined(n)&&r.push(n),o.forEach((e=>{r.push(e)})),WebGLPlot$e.defined(l)&&r.push(l);else if(WebGLPlot$e.defined(a)){if(WebGLPlot$e.defined(n)&&WebGLPlot$e.defined(l)){let e=[n,l];r=[n,l];let t=_0xf52e1d.getAllDistance(e);a.forEach((i=>{let n=t*i.x,o=_0xf52e1d.getPositionByDistance(e,n);r.splice(r.length-1,0,new WebGLPlot$e.Cartesian3(o.point.x,o.point.y,o.point.z+i.y))}))}}else WebGLPlot$e.defined(n)&&r.push(n),WebGLPlot$e.defined(l)&&r.push(l);if(r=this._convertToCartesian3(r),r.length>=2&&_0xf52e1d.getAllDistance(r)>.001){if(this._moveMode=0,e.isCurvePath()){let e=this._createCurve3D(r);this._curvePath3D=e.curvePath3D}else this._curvePath3D=r;let n=_0xf52e1d.getAllDistance(this._curvePath3D);this._speed=n/i,this._lastTime=t,this._lastDistance=0}}}else if(!i&&WebGLPlot$e.defined(r)){let i=r/1e3;if(i>0){let n,r=[],s=e.getOriginGeoEntityUUID();WebGLPlot$e.defined(s)&&(n=this._executeManagerCalc._getPosition(this._groupIndex,s,t));let l,u=e.getTargetGeoEntityUUID();if(WebGLPlot$e.defined(u)&&(l=this._executeManagerCalc._getPosition(this._groupIndex,u,t)),WebGLPlot$e.defined(o))WebGLPlot$e.defined(n)&&r.push(n),o.forEach((e=>{r.push(e)})),WebGLPlot$e.defined(l)&&r.push(l);else if(WebGLPlot$e.defined(a)){if(WebGLPlot$e.defined(n)&&WebGLPlot$e.defined(l)){let e=[n,l];r=[n,l];let t=_0xf52e1d.getAllDistance(e);a.forEach((i=>{let n=t*i.x,o=_0xf52e1d.getPositionByDistance(e,n);r.splice(r.length-1,0,new WebGLPlot$e.Cartesian3(o.point.x,o.point.y,o.point.z+i.y))}))}}else WebGLPlot$e.defined(n)&&r.push(n),WebGLPlot$e.defined(l)&&r.push(l);if(r=this._convertToCartesian3(r),r.length>=2&&_0xf52e1d.getAllDistance(r)>.001){if(WebGLPlot$e.defined(l)?this._moveMode=1:this._moveMode=0,e.isCurvePath()){let e=this._createCurve3D(r);this._curvePath3D=e.curvePath3D,this._controlPointIndexs=e.controlPointIndexs}else{this._curvePath3D=r;for(let e=0;e<r.length;e++)this._controlPointIndexs.push(e)}1===this._moveMode&&this._controlPointIndexs.splice(this._controlPointIndexs.length-1,1),this._speed=i,this._lastTime=t,this._lastDistance=0}}}}_convertToCartesian3(e){let t=[];return e.forEach((e=>{t.push(_0xf52e1d.degreesToCartesian3(e))})),t}_caclulate(e){if(!this._isFinished)if(this._geoEntityMoveParameter.isTimeMode()&&0===this._geoEntityMoveParameter.getTime()){this._isFinished=!0;let t,i=this._geoEntityMoveParameter.getTargetGeoEntityUUID();if(WebGLPlot$e.defined(i)&&(t=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityMoveParameter.getTargetGeoEntityUUID(),e)),!WebGLPlot$e.defined(t)){let e=this._geoEntityMoveParameter.getPathPoint3D();WebGLPlot$e.defined(e)&&e.length>0&&(t=e[e.length-1])}WebGLPlot$e.defined(t)&&(this._position=t)}else{let t=e-this._lastTime;this._lastTime=e;let i=this._lastDistance+t*this._speed;this._lastDistance=i;let n=[];if(this._isToTarget){let t=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityUUID,e),i=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityMoveParameter.getTargetGeoEntityUUID(),e),r=_0xf52e1d.degreesToCartesian3(t),o=_0xf52e1d.degreesToCartesian3(i);WebGLPlot$e.defined(t)&&WebGLPlot$e.defined(i)&&WebGLPlot$e.Cartesian3.distance(this._curvePath3D[this._curvePath3D.length-1],o)>.001?(this._isChangeCurve?this._curvePath3D.splice(this._curvePath3D.length-1):(this._curvePath3D.splice(this._controlPointIndexs[this._controlPointIndexs.length-1]),this._isChangeCurve=!0),n.push(r),n.push(o),this._curvePath3D=this._curvePath3D.concat(n),n=this._curvePath3D):n=this._curvePath3D}else n=this._curvePath3D;if(i>_0xf52e1d.getAllDistance(n))this._isFinished=!0;else{let e=_0xf52e1d.getPositionByDistance(n,i),t=e.index;if(t<n.length&&t>=0){if(!this._isToTarget&&1===this._moveMode&&t>=this._controlPointIndexs[this._controlPointIndexs.length-1]&&(this._isToTarget=!0),this._position=_0xf52e1d.cartesian3ToDegrees(e.point),t!==n.length-1){let i=n[t+1];if(e.point.x!==i.x||e.point.y!==i.y||e.point.z!==i.z){let t=_0xf52e1d.getPitch(e.point,i),n=_0xf52e1d.getHeading(e.point,i);if(t&&n){let e=new _0x23de81(0);e.x=WebGLPlot$e.CesiumMath.toDegrees(t),e.z=WebGLPlot$e.CesiumMath.toDegrees(n),this._rotation=e}}}}else this._isFinished=!0}}return{position:this._position,rotation:this._rotation}}}const _0x39bdf3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xca4cc0=_0x39bdf3(void 0,(function(){return _0xca4cc0.toString().search("(((.+)+)+)+$").toString().constructor(_0xca4cc0).search("(((.+)+)+)+$")}));_0xca4cc0();class _0x9cc9ee{constructor(e,t){this._geoEntityRotationParameter=e,this._speed=void 0,this._startTime=t,this._cyclicStartTime=void 0,this._lastTime=void 0,this._isBack=!1,this._isFinished=!1,this._rotate=void 0,this._init(e,t)}_init(e,t){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t))return void(this._isFinished=!0);let i=1e3*e.getTime();if(i<0)return void(this._isFinished=!0);let n=e.getStartRotation(),r=e.getEndRotation();this._isBack&&(n=e.getEndRotation(),r=e.getStartRotation()),this._speed=new _0x23de81(0,0,0),e.isGradient()&&(this._speed=new _0x23de81((r.x-n.x)/i,(r.y-n.y)/i,(r.z-n.z)/i)),this._cyclicStartTime=t,this._lastTime=t,this._rotate=new _0x23de81(n.x,n.y,n.z),this._isFinished=!1}_caclulate(e){if(WebGLPlot$e.defined(this._geoEntityRotationParameter)){if(this._isFinished)return this._rotate;if(e-this._startTime>1e3*this._geoEntityRotationParameter.getTotalTime()&&(this._isFinished=!0),e-this._cyclicStartTime>1e3*this._geoEntityRotationParameter.getTime()){let t=this._geoEntityRotationParameter.getCyclicType();t==_0x4c8ffe.NO?(this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isFinished=!0):t==_0x4c8ffe.ONEWAY?(this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isFinished||this._init(this._geoEntityRotationParameter,e)):t==_0x4c8ffe.BOTHWAY&&(this._isBack?this._rotate=this._geoEntityRotationParameter.getStartRotation().clone():this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isBack=!this._isBack,this._isFinished||this._init(this._geoEntityRotationParameter,e))}else{let t=e-this._lastTime;this._lastTime=e;let i=this._rotate.x+t*this._speed.x,n=this._rotate.y+t*this._speed.y,r=this._rotate.z+t*this._speed.z;this._rotate=new _0x23de81(i,n,r)}return this._rotate}}}const _0xc29ed9=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x323d40=_0xc29ed9(void 0,(function(){return _0x323d40.toString().search("(((.+)+)+)+$").toString().constructor(_0x323d40).search("(((.+)+)+)+$")}));_0x323d40();class _0x4f7cca{constructor(e,t){this._geoEntityScaleParameter=e,this._speed=void 0,this._startTime=t,this._cyclicStartTime=void 0,this._lastTime=void 0,this._isBack=!1,this._isFinished=!1,this._scale=void 0,this._init(e,t)}_init(e,t){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t))return void(this._isFinished=!0);let i=1e3*e.getTime();if(i<0)return void(this._isFinished=!0);let n=e.getStartScale(),r=e.getEndScale();this._isBack&&(n=e.getEndScale(),r=e.getStartScale()),this._speed=0,e.isGradient()&&(this._speed=(r-n)/i),this._cyclicStartTime=t,this._lastTime=t,this._scale=n,this._isFinished=!1}_caclulate(e){if(WebGLPlot$e.defined(this._geoEntityScaleParameter)){if(this._isFinished)return this._scale;if(e-this._startTime>1e3*this._geoEntityScaleParameter.getTotalTime()&&(this._isFinished=!0),e-this._cyclicStartTime>1e3*this._geoEntityScaleParameter.getTime()){let t=this._geoEntityScaleParameter.getCyclicType();t==_0x4c8ffe.NO?(this._isFinished=!0,this._scale=this._geoEntityScaleParameter.getEndScale()):t==_0x4c8ffe.ONEWAY?(this._scale=this._geoEntityScaleParameter.getEndScale(),this._isFinished||this._init(this._geoEntityScaleParameter,e)):t==_0x4c8ffe.BOTHWAY&&(this._isBack?this._scale=this._geoEntityScaleParameter.getStartScale():this._scale=this._geoEntityScaleParameter.getEndScale(),this._isBack=!this._isBack,this._isFinished||this._init(this._geoEntityScaleParameter,e))}else{let t=e-this._lastTime;this._lastTime=e,this._scale+=t*this._speed}return this._scale}}}const _0x547199=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x305126=_0x547199(void 0,(function(){return _0x305126.toString().search("(((.+)+)+)+$").toString().constructor(_0x305126).search("(((.+)+)+)+$")}));_0x305126();class _0x2ac9f9{constructor(e,t,i){this._deductionScript=e,this._executeManagerCalc=t,this._currentGroupIndex=i,this._currentGeoEntityBasicParameter=void 0,this._currentGeoEntityEffectParameter=void 0,this._currentGeoEntityMoveParameter=void 0,this._currentGeoEntityRotationParameter=void 0,this._currentGeoEntityScaleParameter=void 0,this._geoEntity=void 0,this._finishTime=void 0,this._geoEntityMoveCalc=void 0,this._geoEntityRotationCalc=void 0,this._geoEntityScaleCalc=void 0,this._position=void 0,this._scale=void 0,this._rotation=void 0,this._startTime=void 0}_getGeoEntityUUID(){return this._deductionScript.getGeoEntityUUID()}_setGeoEntityMoveParameter(e,t){this._geoEntityMoveCalc=new _0xcc97e1(this._deductionScript.getGeoEntityUUID(),e,t,this._executeManagerCalc,this._currentGroupIndex,this._position,this._rotation)}_setGeoEntityRotationParameter(e,t){this._geoEntityRotationCalc=new _0x9cc9ee(e,t)}_setGeoEntityScaleParameter(e,t){this._geoEntityScaleCalc=new _0x4f7cca(e,t)}_getPosition(){return this._position}_start(e){this._startTime=e,this._geoEntity=_0x2e28f1.getInstance().getGeoEntityManager().getGeoEntityByUUID(this._deductionScript.getGeoEntityUUID()),WebGLPlot$e.defined(this._geoEntity)&&(this._position=this._geoEntity.getGeoEntityParameter().getPosition(),this._rotation=this._geoEntity.getGeoEntityParameter().getModelRotate(),this._scale=this._geoEntity.getGeoEntityParameter().getModelScale())}_excuteMove(e){if(!WebGLPlot$e.defined(this._geoEntityMoveCalc))return;let t={},i=this._geoEntityMoveCalc._caclulate(e);return WebGLPlot$e.defined(i)&&(WebGLPlot$e.defined(i.position)&&(t.position=i.position),WebGLPlot$e.defined(i.rotation)&&(t.moveRotate=i.rotation)),t}_excuteRotation(e){if(!WebGLPlot$e.defined(this._geoEntityRotationCalc))return;let t=this._geoEntityRotationCalc._caclulate(e);return WebGLPlot$e.defined(t)?t:void 0}_excuteScale(e){if(!WebGLPlot$e.defined(this._geoEntityScaleCalc))return;let t=this._geoEntityScaleCalc._caclulate(e);return WebGLPlot$e.defined(t)?t:void 0}_isLegal(e){if(!WebGLPlot$e.defined(e))return!1;let t=e._getGeoEntityParameter();return!!(t._isModelPathUpdate&&t._isVisibleUpdate&&t._isDotPlotLibIDUpdate&&t._isDotPlotCodeUpdate&&t._isDotPlotStyleUpdate&&t._isPicturePathUpdate&&t._isShowModeUpdate&&t._isDistanceChangeModeUpdate&&t._isChangeModeDistanceUpdate)}_execute(e){if(this._isDeductionScriptExecuteStop(e))return;let t=e-this._startTime,i=t/1e3,n=this._deductionScript.getGeoEntityBasicParameterTimes();for(let e=0;e<n.length;e++){let t=n[e],r=this._deductionScript.getGeoEntityBasicParameter(t);if(i>=t){if(e===n.length-1){this._currentGeoEntityBasicParameter=r.clone();break}if(i<n[e+1]){this._currentGeoEntityBasicParameter=r.clone();break}}}let r=this._deductionScript.getGeoEntityEffectParameterTimes();for(let e=0;e<r.length;e++){let t=r[e],n=this._deductionScript.getGeoEntityEffectParameter(t);if(i>=t){if(e===r.length-1){this._currentGeoEntityEffectParameter=n;break}if(i<r[e+1]){this._currentGeoEntityEffectParameter=n;break}}}let o,a,s=this._deductionScript.getGeoEntityMoveParameterTimes();for(let e=0;e<s.length;e++){let t=s[e],n=this._deductionScript.getGeoEntityMoveParameter(t);if(i>=t){if(e===s.length-1){o=n,a=1e3*t;break}if(i<s[e+1]){o=n,a=1e3*t;break}}}let l,u,c=this._deductionScript.getGeoEntityRotationParameterTimes();for(let e=0;e<c.length;e++){let t=c[e],n=this._deductionScript.getGeoEntityRotationParameter(t);if(i>=t){if(e===c.length-1){l=n,u=1e3*t;break}if(i<c[e+1]){l=n,u=1e3*t;break}}}let h,d,f=this._deductionScript.getGeoEntityScaleParameterTimes();for(let e=0;e<f.length;e++){let t=f[e],n=this._deductionScript.getGeoEntityScaleParameter(t);if(i>=t){if(e===f.length-1){h=n,d=1e3*t;break}if(i<f[e+1]){h=n,d=1e3*t;break}}}!WebGLPlot$e.defined(this._currentGeoEntityBasicParameter)&&WebGLPlot$e.defined(this._geoEntity)&&(this._currentGeoEntityBasicParameter=new _0x56b6ed,this._currentGeoEntityBasicParameter._UUID="InitGeoEntityBasicParameter",this._currentGeoEntityBasicParameter._geoEntityParameter=this._geoEntity.getGeoEntityParameter()),WebGLPlot$e.defined(this._currentGeoEntityEffectParameter)||(this._currentGeoEntityEffectParameter=new _0x5a492f,this._currentGeoEntityEffectParameter._UUID="InitGeoEntityEffectParameter",WebGLPlot$e.defined(this._geoEntity)&&this._geoEntity.getGeoEntityEffects().forEach((e=>{this._currentGeoEntityEffectParameter._geoEntityEffects.push(e.clone())}))),WebGLPlot$e.defined(o)&&(!WebGLPlot$e.defined(this._currentGeoEntityMoveParameter)||this._currentGeoEntityMoveParameter.getUUID()!=o.getUUID())&&(this._currentGeoEntityMoveParameter=o,this._setGeoEntityMoveParameter(o,a)),WebGLPlot$e.defined(l)&&(!WebGLPlot$e.defined(this._currentGeoEntityRotationParameter)||this._currentGeoEntityRotationParameter.getUUID()!=l.getUUID())&&(this._currentGeoEntityRotationParameter=l,this._setGeoEntityRotationParameter(l,u)),WebGLPlot$e.defined(h)&&(!WebGLPlot$e.defined(this._currentGeoEntityScaleParameter)||this._currentGeoEntityScaleParameter.getUUID()!=h.getUUID())&&(this._currentGeoEntityScaleParameter=h,this._setGeoEntityScaleParameter(h,d));let p={position:this._position,rotation:this._rotation,scale:this._scale};p.UUID=this._deductionScript.getGeoEntityUUID(),WebGLPlot$e.defined(this._currentGeoEntityMoveParameter)&&(p.geoEntityMoveParameter={UUID:this._currentGeoEntityMoveParameter.getUUID(),geoEntityMoveParameter:this._currentGeoEntityMoveParameter}),WebGLPlot$e.defined(this._currentGeoEntityBasicParameter)&&(p.geoEntityBasicParameter={UUID:this._currentGeoEntityBasicParameter.getUUID(),geoEntityBasicParameter:this._currentGeoEntityBasicParameter}),WebGLPlot$e.defined(this._currentGeoEntityEffectParameter)&&(p.geoEntityEffectParameter={UUID:this._currentGeoEntityEffectParameter.getUUID(),geoEntityEffectParameter:this._currentGeoEntityEffectParameter});let _=this._excuteMove(t),m=this._excuteRotation(t),g=this._excuteScale(t);return WebGLPlot$e.defined(_)&&WebGLPlot$e.defined(_.position)&&(p.position=_.position),WebGLPlot$e.defined(_)&&WebGLPlot$e.defined(_.moveRotate)&&(p.rotation=_.moveRotate),WebGLPlot$e.defined(m)&&(p.rotation=new _0x23de81(p.rotation.x+m.x,p.rotation.y+m.y,p.rotation.z+m.z)),WebGLPlot$e.defined(g)&&(p.scale=g),p}_isDeductionScriptExecuteStop(e){let t=!1,i=this._deductionScript.getGeoEntityMoveParameterTimes();if(0===i.length)t=!0;else{let e=i[i.length-1];WebGLPlot$e.defined(this._currentGeoEntityMoveParameter)&&this._currentGeoEntityMoveParameter.getUUID()===this._deductionScript.getGeoEntityMoveParameter(e).getUUID()&&(!WebGLPlot$e.defined(this._geoEntityMoveCalc)||!0===this._geoEntityMoveCalc._isFinished)&&(t=!0)}let n=!1,r=this._deductionScript.getGeoEntityRotationParameterTimes();if(0===r.length)n=!0;else{let e=r[r.length-1];WebGLPlot$e.defined(this._currentGeoEntityRotationParameter)&&this._currentGeoEntityRotationParameter.getUUID()===this._deductionScript.getGeoEntityRotationParameter(e).getUUID()&&(!WebGLPlot$e.defined(this._geoEntityRotationCalc)||!0===this._geoEntityRotationCalc._isFinished)&&(n=!0)}let o=!1,a=this._deductionScript.getGeoEntityScaleParameterTimes();if(0===a.length)o=!0;else{let e=a[a.length-1];WebGLPlot$e.defined(this._currentGeoEntityScaleParameter)&&this._currentGeoEntityScaleParameter.getUUID()===this._deductionScript.getGeoEntityScaleParameter(e).getUUID()&&(!WebGLPlot$e.defined(this._geoEntityScaleCalc)||!0===this._geoEntityScaleCalc._isFinished)&&(o=!0)}let s=!1,l=this._deductionScript.getGeoEntityBasicParameterTimes();if(0===l.length)s=!0;else{let e=l[l.length-1];WebGLPlot$e.defined(this._currentGeoEntityBasicParameter)&&this._currentGeoEntityBasicParameter.getUUID()===this._deductionScript.getGeoEntityBasicParameter(e).getUUID()&&(s=!0)}let u=!1,c=this._deductionScript.getGeoEntityEffectParameterTimes();if(0===c.length)u=!0;else{let e=c[c.length-1];WebGLPlot$e.defined(this._currentGeoEntityEffectParameter)&&this._currentGeoEntityEffectParameter.getUUID()===this._deductionScript.getGeoEntityEffectParameter(e).getUUID()&&(u=!0)}if(t&&n&&o&&s&&u){if(this._deductionScript.getDelayFinishTime()>0){if(!WebGLPlot$e.defined(this._finishTime))return this._finishTime=e,!1;if(e-this._finishTime<=1e3*this._deductionScript.getDelayFinishTime())return!1}return!0}return!1}}const _0x35d5f9=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xda1e28=_0x35d5f9(void 0,(function(){return _0xda1e28.toString().search("(((.+)+)+)+$").toString().constructor(_0xda1e28).search("(((.+)+)+)+$")}));_0xda1e28();class _0x820831{constructor(){this._deductionScriptGroups=void 0,this._allActions=void 0}static getInstance(){return _0x820831._instance||(_0x820831._instance=new _0x820831),_0x820831._instance}_reset(){this._deductionScriptGroups=void 0,this._allActions=void 0}_getAllActions(){return this._allActions}_containDeductionScriptGeoEntity(e,t){let i=e.getDeductionScripts();for(let e=0;e<i.length;e++)if(i[e].getGeoEntityUUID()===t)return i[e]}_calcDeductionScript(e,t,i,n,r){if(-1!==t.indexOf(n.getUUID()))return;n.getGeoEntityMoveParameterTimes().forEach((o=>{let a=n.getGeoEntityMoveParameter(o),s=a.getOriginGeoEntityUUID(),l=a.getTargetGeoEntityUUID();if(WebGLPlot$e.defined(s)&&s!==n.getGeoEntityUUID()){let n=this._containDeductionScriptGeoEntity(i,s);WebGLPlot$e.defined(n)&&-1===t.indexOf(n.getUUID())&&this._calcDeductionScript(e,t,i,n,r)}if(WebGLPlot$e.defined(l)){let n=this._containDeductionScriptGeoEntity(i,l);WebGLPlot$e.defined(n)&&-1===t.indexOf(n.getUUID())&&this._calcDeductionScript(e,t,i,n,r)}})),t.push(n.getUUID()),e.set(n.getGeoEntityUUID(),[]);let o=new _0x2ac9f9(n,this,r);o._start(0);let a=10;for(;;){let t=o._execute(a);if(!WebGLPlot$e.defined(t))break;t.time=a,e.get(n.getGeoEntityUUID()).push(t),a+=10}}_getPosition(e,t,i){let n;if(WebGLPlot$e.defined(this._allActions)){let r=this._allActions.groupActions;if(r.length>0){let o=r[e].actions;if(o.has(t)){let e=o.get(t);for(let t=0;t<e.length;t++){let r=e[t];if(i>=r.time){if(t===e.length-1){n=r.position;break}if(i<e[t+1].time){n=r.position;break}}}}if(!WebGLPlot$e.defined(n))for(let i=e-1;i>=0;i--){let e=r[i].actions;if(e.has(t)){let i=e.get(t);i.length>0&&(n=i[i.length-1].position);break}}}}if(!WebGLPlot$e.defined(n)){let e=_0x2e28f1.getInstance().getGeoEntityManager().getGeoEntityByUUID(t);WebGLPlot$e.defined(e)&&(n=e.getGeoEntityParameter().getPosition())}return n}_calcute(){this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._allActions={};let e=0,t=[];this._allActions.groupActions=t;for(let i=0;i<this._deductionScriptGroups.length;i++){let n=this._deductionScriptGroups[i],r={};t.push(r);let o=new Map;r.actions=o;let a=[],s=n.getDeductionScriptExtend()._getDeductionScript();this._calcDeductionScript(o,a,n,s,i),n.getDeductionScripts().forEach((e=>{this._calcDeductionScript(o,a,n,e,i)}));let l=0;o.forEach(((e,t)=>{if(e.length>0){let t=e[e.length-1].time;t>l&&(l=t)}})),r.time=l,e+=l}this._allActions.time=e,console.log(this._allActions)}_findGeoEntityMoveParameter(e){if(WebGLPlot$e.defined(this._deductionScriptGroups))for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t].getDeductionScripts();for(let n=0;n<i.length;n++){let r=i[n],o=r.getGeoEntityMoveParameterTimes();for(let i=0;i<o.length;i++){let n=r.getGeoEntityMoveParameter(o[i]);if(n.getUUID()===e)return{geoEntityMoveParameter:n,deductionScript:r,groupIndex:t,time:o[i]}}}}}_indexOfDeductionScript(e){if(WebGLPlot$e.defined(this._deductionScriptGroups))for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t].getDeductionScripts();for(let n=0;n<i.length;n++)if(i[n].getUUID()===e)return t}return-1}_calcGeoEntityMoveParameter(e,t,i){let n=this._getMoveParameterTime(e.getUUID()),r=this._getMoveParameterSpeed(e.getUUID());WebGLPlot$e.defined(n)&&WebGLPlot$e.defined(r)&&(WebGLPlot$e.defined(e.getOriginGeoEntityUUID())&&e.setOriginPosition(this._getPosition(i,e.getOriginGeoEntityUUID(),1e3*t)),WebGLPlot$e.defined(e.getTargetGeoEntityUUID())&&WebGLPlot$e.defined(n)&&e.setTargetPosition(this._getPosition(i,e.getTargetGeoEntityUUID(),1e3*(t+n))),e.setTime(n),e.setSpeed(r))}_getMoveParameterTime(e){let t;if(WebGLPlot$e.defined(this._deductionScriptGroups)){let i=this._findGeoEntityMoveParameter(e);if(WebGLPlot$e.defined(i)){t=i.geoEntityMoveParameter.getTime();let n=i.groupIndex,r=i.deductionScript.getGeoEntityUUID();if(!i.geoEntityMoveParameter.isTimeMode()&&WebGLPlot$e.defined(n)&&WebGLPlot$e.defined(r)&&WebGLPlot$e.defined(this._allActions)){let i=this._allActions.groupActions;if(n<i.length){let o=i[n].actions;if(o.has(r)){let i=o.get(r);if(WebGLPlot$e.defined(i)){let n;for(let r=0;r<i.length;r++){let o=i[r];if(Cesium.defined(o.geoEntityMoveParameter)&&o.geoEntityMoveParameter.UUID===e)WebGLPlot$e.defined(n)||(n=o.time);else if(WebGLPlot$e.defined(n)){t=(o.time-n)/1e3;break}}Cesium.defined(n)&&!Cesium.defined(t)&&(t=(i[i.length-1].time-n)/1e3)}}}}}}return t}_getMoveParameterSpeed(e){let t;if(WebGLPlot$e.defined(this._deductionScriptGroups)){let i=this._findGeoEntityMoveParameter(e);if(WebGLPlot$e.defined(i)){t=i.geoEntityMoveParameter.getSpeed();let n=i.groupIndex,r=i.deductionScript.getGeoEntityUUID();if(i.geoEntityMoveParameter.isTimeMode()&&WebGLPlot$e.defined(n)&&WebGLPlot$e.defined(r)&&WebGLPlot$e.defined(this._allActions)){let i,o,a=this._allActions.groupActions;if(n<a.length){let t=a[n].actions;if(t.has(r)){let n=t.get(r);if(WebGLPlot$e.defined(n)){let t;for(let r=0;r<n.length;r++){let a=n[r];if(Cesium.defined(a.geoEntityMoveParameter)&&a.geoEntityMoveParameter.UUID===e)WebGLPlot$e.defined(i)||(t=a.time,i=[]),i.push(a.position);else if(WebGLPlot$e.defined(t)){o=(a.time-t)/1e3;break}}WebGLPlot$e.defined(t)&&!WebGLPlot$e.defined(o)&&(o=(n[n.length-1].time-t)/1e3)}}}let s=[];i.forEach((e=>{s.push(_0xf52e1d.degreesToCartesian3(e))})),t=_0xf52e1d.getAllDistance(s)/o}}}return t}_getDependsDeductionScriptInfos(e,t){let i=[];if(WebGLPlot$e.defined(this._deductionScriptGroups)&&e<this._deductionScriptGroups.length)for(let n=e;n<this._deductionScriptGroups.length;n++)this._deductionScriptGroups[n].getDeductionScripts().forEach((r=>{if(r.getGeoEntityUUID()!==t||n!==e){let e=r.getGeoEntityMoveParameterTimes();for(let o=0;o<e.length;o++){let a=r.getGeoEntityMoveParameter(e[o]);(a.getOriginGeoEntityUUID()===t||a.getTargetGeoEntityUUID()===t)&&i.push({deductionScript:r,groupIndex:n})}}}));return i}_calcFlowMoveParameter(e,t,i){e.getGeoEntityMoveParameterTimes().forEach((n=>{if(n>t){let t=e.getGeoEntityMoveParameter(n);this._calcGeoEntityMoveParameter(t,n,i)}}))}_updateGeoEntityMoveParameter(e,t,i){let n=this._indexOfDeductionScript(e.getUUID());this._calcGeoEntityMoveParameter(i,t,n),this._calcFlowMoveParameter(e,t,n),this._getDependsDeductionScriptInfos(n,e.getGeoEntityUUID()).forEach((e=>{let t=e.deductionScript.getGeoEntityMoveParameterTimes();t.length>0&&this._updateGeoEntityMoveParameter(e.deductionScript,t[0],e.deductionScript.getGeoEntityMoveParameter(t[0]))}))}_removeGeoEntityMoveParameter(e,t){let i=this._indexOfDeductionScript(e.getUUID());this._calcFlowMoveParameter(e,t,i),this._getDependsDeductionScriptInfos(i,e.getGeoEntityUUID()).forEach((e=>{let t=e.deductionScript.getGeoEntityMoveParameterTimes();t.length>0&&this._updateGeoEntityMoveParameter(e.deductionScript,t[0],e.deductionScript.getGeoEntityMoveParameter(t[0]))}))}}const _0x2c117b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4c6ab6=_0x2c117b(void 0,(function(){return _0x4c6ab6.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c6ab6).search("(((.+)+)+)+$")}));_0x4c6ab6();class _0x3fc8dd{constructor(e){this._UUID=WebGLPlot$e.createGuid(),this._geoEntityUUID=e,this._delayFinishTime=0,this._geoEntityBasicParameters=new Map,this._geoEntityEffectParameters=new Map,this._geoEntityMoveParameters=new Map,this._geoEntityRotationParameters=new Map,this._geoEntityScaleParameters=new Map,this._isModified=!1}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){_0x2e28f1.getInstance()._saveDeductionScript(!1)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.geoEntityUUID)&&(this._geoEntityUUID=t.geoEntityUUID),WebGLPlot$e.defined(t.delayFinishTime)&&(this._delayFinishTime=t.delayFinishTime),WebGLPlot$e.defined(t.geoBaseEntityParameters)&&(this._geoEntityBasicParameters.clear(),t.geoBaseEntityParameters.forEach((e=>{let t=e.time,i=new _0x56b6ed;i._fromJson(e.geoEntityBasicParameter),this._geoEntityBasicParameters.set(t,i)}))),WebGLPlot$e.defined(t.geoEntityEffectParameters)&&(this._geoEntityEffectParameters.clear(),t.geoEntityEffectParameters.forEach((e=>{let t=e.time,i=new _0x5a492f;i._fromJson(e.geoEntityEffectParameter),this._geoEntityEffectParameters.set(t,i)}))),WebGLPlot$e.defined(t.geoEntityMoveParameters)&&(this._geoEntityMoveParameters.clear(),t.geoEntityMoveParameters.forEach((e=>{let t=e.time,i=new _0x1e6774;i._fromJson(e.geoEntityMoveParameter),this._geoEntityMoveParameters.set(t,i)}))),WebGLPlot$e.defined(t.geoEntityRotationParameters)&&(this._geoEntityRotationParameters.clear(),t.geoEntityRotationParameters.forEach((e=>{let t=e.time,i=new _0x4d2fe0;i._fromJson(e.geoEntityRotationParameter),this._geoEntityRotationParameters.set(t,i)}))),WebGLPlot$e.defined(t.geoEntityScaleParameters)&&(this._geoEntityScaleParameters.clear(),t.geoEntityScaleParameters.forEach((e=>{let t=e.time,i=new _0xc7aed0;i._fromJson(e.geoEntityScaleParameter),this._geoEntityScaleParameters.set(t,i)})))}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityUUID")||(e.geoEntityUUID=this._geoEntityUUID),e.hasOwnProperty("delayFinishTime")||(e.delayFinishTime=this._delayFinishTime),e.hasOwnProperty("geoBaseEntityParameters")||(e.geoBaseEntityParameters=[],this._geoEntityBasicParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityBasicParameter")||(n.geoEntityBasicParameter=t._toJson()),e.geoBaseEntityParameters.push(n)}))),e.hasOwnProperty("geoEntityEffectParameters")||(e.geoEntityEffectParameters=[],this._geoEntityEffectParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityEffectParameter")||(n.geoEntityEffectParameter=t._toJson()),e.geoEntityEffectParameters.push(n)}))),e.hasOwnProperty("geoEntityMoveParameters")||(e.geoEntityMoveParameters=[],this._geoEntityMoveParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityMoveParameter")||(n.geoEntityMoveParameter=t._toJson()),e.geoEntityMoveParameters.push(n)}))),e.hasOwnProperty("geoEntityRotationParameters")||(e.geoEntityRotationParameters=[],this._geoEntityRotationParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityRotationParameter")||(n.geoEntityRotationParameter=t._toJson()),e.geoEntityRotationParameters.push(n)}))),e.hasOwnProperty("geoEntityScaleParameters")||(e.geoEntityScaleParameters=[],this._geoEntityScaleParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityScaleParameter")||(n.geoEntityScaleParameter=t._toJson()),e.geoEntityScaleParameters.push(n)}))),JSON.stringify(e)}_getTotalTime(){let e=0,t=this.getGeoEntityBasicParameterTimes();if(t.length>0){let i=1e3*t[t.length-1];e<i&&(e=i)}let i=this.getGeoEntityEffectParameterTimes();if(i.length>0){let t=1e3*i[i.length-1];e<t&&(e=t)}let n=this.getGeoEntityMoveParameterTimes();if(n.length>0){let t=n[n.length-1],i=this.getGeoEntityMoveParameter(t),r=1e3*(n[n.length-1]+i.getTime());e<r&&(e=r)}let r=this.getGeoEntityRotationParameterTimes();if(r.length>0){let t=r[r.length-1],i=this.getGeoEntityRotationParameter(t),n=1e3*(r[r.length-1]+i.getTotalTime());e<n&&(e=n)}let o=this.getGeoEntityScaleParameterTimes();if(o.length>0){let t=o[o.length-1],i=this.getGeoEntityScaleParameter(t),n=1e3*(o[o.length-1]+i.getTotalTime());e<n&&(e=n)}return e+=1e3*this._delayFinishTime,e}getGeoEntityUUID(){return this._geoEntityUUID}getUUID(){return this._UUID}getGeoEntityBasicParameterTimes(){let e=[];return this._geoEntityBasicParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityBasicParameter(e){let t;return this._geoEntityBasicParameters.has(e)&&(t=this._geoEntityBasicParameters.get(e)),t}setGeoEntityBasicParameter(e,t){this._geoEntityBasicParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityBasicParameter(e){this._geoEntityBasicParameters.has(e)&&(this._geoEntityBasicParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityEffectParameterTimes(){let e=[];return this._geoEntityEffectParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityEffectParameter(e){let t;return this._geoEntityEffectParameters.has(e)&&(t=this._geoEntityEffectParameters.get(e)),t}setGeoEntityEffectParameter(e,t){this._geoEntityEffectParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityEffectParameter(e){this._geoEntityEffectParameters.has(e)&&(this._geoEntityEffectParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityMoveParameterTimes(){let e=[];return this._geoEntityMoveParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityMoveParameter(e){let t;return this._geoEntityMoveParameters.has(e)&&(t=this._geoEntityMoveParameters.get(e)),t}setGeoEntityMoveParameter(e,t){this._geoEntityMoveParameters.set(e,t),_0x820831.getInstance()._calcute(),_0x820831.getInstance()._updateGeoEntityMoveParameter(this,e,t),this._isModified=!0,this._save()}removeGeoEntityMoveParameter(e){this._geoEntityMoveParameters.has(e)&&(this._geoEntityMoveParameters.delete(e),_0x820831.getInstance()._calcute(),_0x820831.getInstance()._removeGeoEntityMoveParameter(this,e),this._isModified=!0,this._save())}setDelayFinishTime(e){this._delayFinishTime=e,this._isModified=!0,this._save()}getDelayFinishTime(){return this._delayFinishTime}getGeoEntityRotationParameterTimes(){let e=[];return this._geoEntityRotationParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityRotationParameter(e){let t;return this._geoEntityRotationParameters.has(e)&&(t=this._geoEntityRotationParameters.get(e)),t}setGeoEntityRotationParameter(e,t){this._geoEntityRotationParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityRotationParameter(e){this._geoEntityRotationParameters.has(e)&&(this._geoEntityRotationParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityScaleParameterTimes(){let e=[];return this._geoEntityScaleParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityScaleParameter(e){let t;return this._geoEntityScaleParameters.has(e)&&(t=this._geoEntityScaleParameters.get(e)),t}setGeoEntityScaleParameter(e,t){this._geoEntityScaleParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityScaleParameter(e){this._geoEntityScaleParameters.has(e)&&(this._geoEntityScaleParameters.delete(e),this._isModified=!0,this._save())}}const _0x5316b8=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5b1da6=_0x5316b8(void 0,(function(){return _0x5b1da6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b1da6).search("(((.+)+)+)+$")}));_0x5b1da6();class _0x4de595{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityMoveParameter=void 0,this._speed=0,this._curvePath3D=[],this._startTime=void 0,this._isFinished=!1,this._position=void 0,this._rotation=void 0,this._geoEntityMoveParameter=void 0,this._allDistance=void 0,this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityMoveParameterUUID=void 0}_init(e,t,i,n){this._geoEntityMoveParameter=e,this._startTime=t,this._position=i,this._rotation=n;let r=e.getSpeed()/1e3;if(r>0){let t=[],i=e.getPathPoint3D(),n=e.getScalePoint2D(),o=e.getOriginPosition(),a=e.getTargetPosition();if(WebGLPlot$e.defined(i))WebGLPlot$e.defined(o)&&t.push(o),i.forEach((e=>{t.push(e)})),WebGLPlot$e.defined(a)&&t.push(a);else if(WebGLPlot$e.defined(n)){if(WebGLPlot$e.defined(o)&&WebGLPlot$e.defined(a)){let e=[o,a];t=[o,a];let i=_0xf52e1d.getAllDistance(e);n.forEach((n=>{let r=i*n.x,o=_0xf52e1d.getPositionByDistance(e,r);t.splice(t.length-1,0,new WebGLPlot$e.Cartesian3(o.point.x,o.point.y,o.point.z+n.y))}))}}else WebGLPlot$e.defined(o)&&t.push(o),WebGLPlot$e.defined(a)&&t.push(a);if(t=this._convertToCartesian3(t),t.length>=2&&_0xf52e1d.getAllDistance(t)>.001){if(e.isCurvePath()){let e=this._createCurve3D(t);this._curvePath3D=e.curvePath3D}else this._curvePath3D=t;this._speed=r}}this._allDistance=_0xf52e1d.getAllDistance(this._curvePath3D),this._isFinished=!1}_update(e,t,i){let n={},r=e/1e3,o=this._getCurrentGeoEntityMoveParameter(r);if(WebGLPlot$e.defined(o.geoEntityMoveParameter)&&WebGLPlot$e.defined(o.geoEntityMoveParameterActionTime)){this._currentGeoEntityMoveParameterUUID!=o.geoEntityMoveParameter.getUUID()&&(this._currentGeoEntityMoveParameterUUID=o.geoEntityMoveParameter.getUUID(),this._init(o.geoEntityMoveParameter,o.geoEntityMoveParameterActionTime,t,i));let r=this._caclulate(e);WebGLPlot$e.defined(r)&&(n.position=r.position,n.isCurrent=!0,n.finishTime=o.geoEntityMoveParameterActionTime+1e3*this._geoEntityMoveParameter.getTime(),n.isFinished=this._isFinished,n.rotation=r.rotation)}else{let e,r,o;if(this._groupIndex>0)for(let t=this._groupIndex-1;t>=0;t--){let i=this._deductionScriptGroups[t]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$e.defined(i)){let n=i.getGeoEntityMoveParameterTimes();if(n.length>0){e=n[n.length-1],r=i.getGeoEntityMoveParameter(e),o=t;break}}}if(WebGLPlot$e.defined(r)){let t=new _0x4de595;t._init(r);let i,a=t._getFinalPosition(),s=t._curvePath3D;if(s.length>1){let e=_0xf52e1d.getPitch(s[s.length-2],s[s.length-1]),t=_0xf52e1d.getHeading(s[s.length-2],s[s.length-1]);e&&t&&(i=new _0x23de81(0),i.x=WebGLPlot$e.CesiumMath.toDegrees(e),i.z=WebGLPlot$e.CesiumMath.toDegrees(t))}n.position=a,n.isCurrent=!1,n.rotation=i,n.groupIndex=o,n.finishTime=1e3*(e+r.getTime())}else n.position=t,n.isCurrent=!1,n.rotation=i}return n}_getCurrentGeoEntityMoveParameter(e){let t,i,n=this._deductionScript.getGeoEntityMoveParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityMoveParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityMoveParameter:t,geoEntityMoveParameterActionTime:i}}_createCurve3D(e){let t=_0xf52e1d.getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$e.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new Cesium.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_convertToCartesian3(e){let t=[];return e.forEach((e=>{t.push(_0xf52e1d.degreesToCartesian3(e))})),t}_getFinalPosition(){let e=this._geoEntityMoveParameter.getTargetPosition();if(WebGLPlot$e.defined(e))return e;let t=this._geoEntityMoveParameter.getPathPoint3D();return t.length>0&&(e=t[t.length-1]),WebGLPlot$e.defined(e)||(e=this._geoEntityMoveParameter.getOriginPosition(),WebGLPlot$e.defined(e))?e:void 0}_caclulate(e){if(!this._isFinished)if(this._geoEntityMoveParameter.isTimeMode()&&0===this._geoEntityMoveParameter.getTime())this._isFinished=!0,this._position=this._getFinalPosition();else{let t=(e-this._startTime)*this._speed;if(t>this._allDistance)this._isFinished=!0,this._currentGeoEntityMoveParameterUUID=void 0;else{let e=_0xf52e1d.getPositionByDistance(this._curvePath3D,t),i=e.index;if(i<=this._curvePath3D.length&&i>=0){if(this._position=_0xf52e1d.cartesian3ToDegrees(e.point),i!==this._curvePath3D.length-1){let t=this._curvePath3D[i+1];if(e.point.x!==t.x||e.point.y!==t.y||e.point.z!==t.z){let i=_0xf52e1d.getPitch(e.point,t),n=_0xf52e1d.getHeading(e.point,t);if(i&&n){let e=new _0x23de81(0);e.x=WebGLPlot$e.CesiumMath.toDegrees(i),e.z=WebGLPlot$e.CesiumMath.toDegrees(n),this._rotation=e}}}}else this._isFinished=!0,this._currentGeoEntityMoveParameterUUID=void 0}if(this._isFinished){let e=this._getFinalPosition();if(WebGLPlot$e.defined(e)&&(this._position=e),!WebGLPlot$e.defined(this._curvePath3D)){let e=this._geoEntityMoveParameter.getPathPoint3D();if(WebGLPlot$e.defined(e)&&e.length>0&&e.length>1){let t=_0xf52e1d.getPitch(e[e.length-2],e[e.length-1]),i=_0xf52e1d.getHeading(e[e.length-2],e[e.length-1]);if(t&&i){let e=new _0x23de81(0);e.x=WebGLPlot$e.CesiumMath.toDegrees(t),e.z=WebGLPlot$e.CesiumMath.toDegrees(i),this._rotation=e}}}}}return{position:this._position,rotation:this._rotation}}}const _0x176109=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3684c5=_0x176109(void 0,(function(){return _0x3684c5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3684c5).search("(((.+)+)+)+$")}));_0x3684c5();class _0x17d8f6{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityRotationParameter=void 0,this._speed=void 0,this._startTime=void 0,this._isBack=!1,this._isFinished=!1,this._rotate=void 0,this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityRotationParameterUUID=void 0,this._startRotation=void 0,this._endRotation=void 0}_init(e,t){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t))return void(this._isFinished=!0);this._geoEntityRotationParameter=e,this._startTime=t,this._rotate=new _0x23de81(0);let i=1e3*e.getTime();i<0?this._isFinished=!0:(this._startRotation=e.getStartRotation(),this._endRotation=e.getEndRotation(),(!WebGLPlot$e.defined(this._startRotation)||!WebGLPlot$e.defined(this._endRotation)||this._startRotation.x===this._endRotation.x&&this._startRotation.y===this._endRotation.y&&this._startRotation.z===this._endRotation.z)&&(this._isFinished=!0),e.isGradient()&&(this._speed=new _0x23de81((this._endRotation.x-this._startRotation.x)/i,(this._endRotation.y-this._startRotation.y)/i,(this._endRotation.z-this._startRotation.z)/i),e.getCyclicType()==_0x4c8ffe.BOTHWAY&&(this._speed=new _0x23de81(2*this._speed.x,2*this._speed.y,2*this._speed.z))),this._isFinished=!1)}_update(e){let t=e/1e3,i=this._getCurrentGeoEntityRotationParameter(t);if(WebGLPlot$e.defined(i.geoEntityRotationParameter)&&WebGLPlot$e.defined(i.geoEntityRotationParameterActionTime))return this._currentGeoEntityRotationParameterUUID!=i.geoEntityRotationParameter.getUUID()&&(this._currentGeoEntityRotationParameterUUID=i.geoEntityRotationParameter.getUUID(),this._init(i.geoEntityRotationParameter,i.geoEntityRotationParameterActionTime)),{rotation:this._caclulate(e),isCurrent:!0,isFinished:this._isFinished};{let e,t,i;if(this._groupIndex>0)for(let n=this._groupIndex-1;n>=0;n--){let r=this._deductionScriptGroups[n]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$e.defined(r)){let o=r.getGeoEntityRotationParameterTimes();if(o.length>0){e=o[o.length-1],t=r.getGeoEntityRotationParameter(e),i=n;break}}}if(WebGLPlot$e.defined(t)){let n=new _0x17d8f6;return n._init(t),{rotation:n._caclulate(1e3*t.getTotalTime()+1),isCurrent:!1,groupIndex:i,finishTime:1e3*(e+t.getTotalTime())}}return{rotation:new _0x23de81(0),isCurrent:!1}}}_getCurrentGeoEntityRotationParameter(e){let t,i,n=this._deductionScript.getGeoEntityRotationParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityRotationParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityRotationParameter:t,geoEntityRotationParameterActionTime:i}}_caclulate(e){if(!WebGLPlot$e.defined(this._geoEntityRotationParameter))return;if(this._isFinished)return this._rotate;let t=this._geoEntityRotationParameter.getCyclicType(),i=1e3*this._geoEntityRotationParameter.getTime(),n=this._geoEntityRotationParameter.isGradient(),r=e-this._startTime;if(t==_0x4c8ffe.NO)if(r>=i)this._isFinished=!0,this._rotate=this._endRotation.clone();else if(n){let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x23de81(e,t,i)}else this._rotate=this._startRotation.clone();else{let e=1e3*this._geoEntityRotationParameter.getTotalTime();if(r>=e){this._isFinished=!0;let r=e%i;if(0===r)n?t==_0x4c8ffe.ONEWAY?this._rotate=this._endRotation.clone():t==_0x4c8ffe.BOTHWAY&&(this._rotate=this._startRotation.clone()):this._rotate=this._endRotation.clone();else if(n){if(t==_0x4c8ffe.ONEWAY){let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x23de81(e,t,i)}else if(t==_0x4c8ffe.BOTHWAY){let e=i/2;if(r>e){let t=this._endRotation.x-(r-e)*this._speed.x,i=this._endRotation.y-(r-e)*this._speed.y,n=this._endRotation.z-(r-e)*this._speed.z;this._rotate=new _0x23de81(t,i,n)}else{let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x23de81(e,t,i)}}}else{let e=i/2;this._rotate=r>e?this._endRotation.clone():this._startRotation.clone()}}else{let e=r%i;if(n){if(t==_0x4c8ffe.ONEWAY){let t=this._startRotation.x+e*this._speed.x,i=this._startRotation.y+e*this._speed.y,n=this._startRotation.z+e*this._speed.z;this._rotate=new _0x23de81(t,i,n)}else if(t==_0x4c8ffe.BOTHWAY){let t=i/2;if(e>t){let i=this._endRotation.x-(e-t)*this._speed.x,n=this._endRotation.y-(e-t)*this._speed.y,r=this._endRotation.z-(e-t)*this._speed.z;this._rotate=new _0x23de81(i,n,r)}else{let t=this._startRotation.x+e*this._speed.x,i=this._startRotation.y+e*this._speed.y,n=this._startRotation.z+e*this._speed.z;this._rotate=new _0x23de81(t,i,n)}}}else{let t=i/2;this._rotate=e>t?this._endRotation.clone():this._startRotation.clone()}}}return this._rotate}}const _0x37ca4a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2ac6e2=_0x37ca4a(void 0,(function(){return _0x2ac6e2.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ac6e2).search("(((.+)+)+)+$")}));_0x2ac6e2();class _0x179128{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityScaleParameter=void 0,this._speed=void 0,this._startTime=void 0,this._cyclicStartTime=void 0,this._isBack=!1,this._isFinished=!1,this._scale=void 0,this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityScaleParameterUUID=void 0,this._startScale=void 0,this._endScale=void 0}_init(e,t,i){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t))return void(this._isFinished=!0);this._geoEntityScaleParameter=e,this._startTime=t,this._scale=i;let n=1e3*e.getTime();n<0?this._isFinished=!0:(this._startScale=e.getStartScale(),WebGLPlot$e.defined(this._startScale)||(this._startScale=i),this._endScale=e.getEndScale(),WebGLPlot$e.defined(this._endScale)||(this._endScale=i),this._startScale!==this._endScale?(e.isGradient()&&(this._speed=(this._endScale-this._startScale)/n,this._geoEntityScaleParameter.getCyclicType()==_0x4c8ffe.BOTHWAY&&(this._speed=2*this._speed)),this._isFinished=!1):this._isFinished=!0)}_update(e){let t=e/1e3,i=this._getCurrentGeoEntityScaleParameter(t);if(WebGLPlot$e.defined(i.geoEntityScaleParameter)&&WebGLPlot$e.defined(i.geoEntityScaleParameterActionTime))return this._currentGeoEntityScaleParameterUUID!=i.geoEntityScaleParameter.getUUID()&&(this._currentGeoEntityScaleParameterUUID=i.geoEntityScaleParameter.getUUID(),this._init(i.geoEntityScaleParameter,i.geoEntityScaleParameterActionTime)),this._caclulate(e);{let e,t;if(this._groupIndex>0)for(let i=this._groupIndex-1;i>=0;i--){let n=this._deductionScriptGroups[i]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$e.defined(n)){let i=n.getGeoEntityScaleParameterTimes();if(i.length>0){e=i[i.length-1],t=n.getGeoEntityScaleParameter(e);break}}}if(WebGLPlot$e.defined(t)){let e=new _0x179128;return e._init(t),e._caclulate(1e3*t.getTotalTime()+1)}return this._scale}}_getCurrentGeoEntityScaleParameter(e){let t,i,n=this._deductionScript.getGeoEntityScaleParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityScaleParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityScaleParameter:t,geoEntityScaleParameterActionTime:i}}_caclulate(e){if(!WebGLPlot$e.defined(this._geoEntityScaleParameter))return;if(this._isFinished)return this._scale;let t=this._geoEntityScaleParameter.getCyclicType(),i=1e3*this._geoEntityScaleParameter.getTime(),n=this._geoEntityScaleParameter.getStartScale();WebGLPlot$e.defined(n)||(n=this._initScale);let r=this._geoEntityScaleParameter.getEndScale();WebGLPlot$e.defined(n)||(r=this._initScale);let o=this._geoEntityScaleParameter.isGradient(),a=e-this._startTime;if(t==_0x4c8ffe.NO)a>=i?(this._isFinished=!0,this._scale=r):this._scale=o?n+a*this._speed:this._initScale;else{let e=1e3*this._geoEntityScaleParameter.getTotalTime();if(a>=e){this._isFinished=!0;let a=e%i;if(0===a)o?t==_0x4c8ffe.ONEWAY?this._scale=r:t==_0x4c8ffe.BOTHWAY&&(this._scale=n):this._scale=r;else if(o){if(t==_0x4c8ffe.ONEWAY)this._scale=n+a*this._speed;else if(t==_0x4c8ffe.BOTHWAY){let e=i/2;this._scale=a>e?r-(a-e)*this._speed:n+a*this._speed}}else{let e=i/2;this._scale=a>e?r:n}}else{let e=a%i;if(o){if(t==_0x4c8ffe.ONEWAY)this._scale=n+e*this._speed;else if(t==_0x4c8ffe.BOTHWAY){let t=i/2;this._scale=e>t?r-(e-t)*this._speed:n+e*this._speed}}else{let t=i/2;this._scale=e>t?r:n}}}return this._scale}}const _0x2fe827=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xb18f52=_0x2fe827(void 0,(function(){return _0xb18f52.toString().search("(((.+)+)+)+$").toString().constructor(_0xb18f52).search("(((.+)+)+)+$")}));_0xb18f52();class _0x5a32e4{constructor(e,t,i,n,r){this._geoEntity=e,this._moveGeoEntity=t,this._deductionScript=i,this._groupIndex=n,this._geoEntityStartVisible=r,this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityBasicParameterUUID=void 0}_setGeoEntityBasicParamerter(e){WebGLPlot$e.defined(this._moveGeoEntity)&&this._moveGeoEntity.setGeoEntityParameter(e._getGeoEntityParameter())}_caclulate(e){if(!WebGLPlot$e.defined(this._geoEntity)||!WebGLPlot$e.defined(this._deductionScript))return;let t,i=this._deductionScript.getGeoEntityBasicParameterTimes();for(let n=0;n<i.length;n++){let r=i[n],o=this._deductionScript.getGeoEntityBasicParameter(r);if(e>=r){if(n===i.length-1){t=o;break}if(e<i[n+1]){t=o;break}}}if(!WebGLPlot$e.defined(t)&&this._groupIndex>0)for(let e=this._groupIndex-1;e>=0;e--){let i=this._deductionScriptGroups[e]._getDeductionScriptByGeoEntityUUID(this._geoEntity.getUUID());if(WebGLPlot$e.defined(i)){let e=i.getGeoEntityBasicParameterTimes();if(e.length>0){t=i.getGeoEntityBasicParameter(e[e.length-1]);break}}}if(WebGLPlot$e.defined(t))return{geoEntityBasicParameter:t,geoEntityBasicParameterUUID:t.getUUID()};{let e=this._geoEntity.getGeoEntityParameter(),t=new _0x4920fc;return t._update(e),t.setVisible(this._geoEntityStartVisible),{geoEntityBasicParameter:new _0x56b6ed(t),geoEntityBasicParameterUUID:"initGeoEntityBasicParameter"}}}_update(e){let t=e/1e3,i=this._caclulate(t);WebGLPlot$e.defined(i)&&WebGLPlot$e.defined(i.geoEntityBasicParameter)&&this._currentGeoEntityBasicParameterUUID!==i.geoEntityBasicParameterUUID&&(this._setGeoEntityBasicParamerter(i.geoEntityBasicParameter),this._currentGeoEntityBasicParameterUUID=i.geoEntityBasicParameterUUID)}}const _0x3d0f06=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x587758=_0x3d0f06(void 0,(function(){return _0x587758.toString().search("(((.+)+)+)+$").toString().constructor(_0x587758).search("(((.+)+)+)+$")}));_0x587758();class _0x1c7405{constructor(e,t,i,n,r){this._geoEntity=e,this._moveGeoEntity=t,this._deductionScript=i,this._groupIndex=n,this._geoEntityStartEffectVisible=r,this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityEffectParameterUUID=void 0}_setGeoEntityEffectParameter(e){let t=e.getGeoEntityEffects(),i=[];t.forEach((e=>{let t=e.clone();if(t.setGeoEntity(this._moveGeoEntity),t.getType()==_0xaadec6.COMMUNICATIONLINK){let e=t.getStartUUID(),i=t.getEndUUID();if(this._geoEntity.getUUID()==e){e=this._moveGeoEntity.getUUID();let t=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(i);WebGLPlot$e.defined(t)&&(i=t.getUUID())}else if(this._geoEntity.getUUID()==i){i=this._moveGeoEntity.getUUID();let t=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(e);WebGLPlot$e.defined(t)&&(e=t.getUUID())}t.setStartUUID(e),t.setEndUUID(i)}i.push(t)})),this._moveGeoEntity.updateGeoEntityEffects(i)}_caclulate(e){if(!WebGLPlot$e.defined(this._geoEntity)||!WebGLPlot$e.defined(this._deductionScript))return;let t,i=this._deductionScript.getGeoEntityEffectParameterTimes();for(let n=0;n<i.length;n++){let r=i[n],o=this._deductionScript.getGeoEntityEffectParameter(r);if(e>=r){if(n===i.length-1){t=o;break}if(e<i[n+1]){t=o;break}}}if(!WebGLPlot$e.defined(t)&&this._groupIndex>0)for(let e=this._groupIndex-1;e>=0;e--){let i=this._deductionScriptGroups[e]._getDeductionScriptByGeoEntityUUID(this._geoEntity.getUUID());if(WebGLPlot$e.defined(i)){let e=i.getGeoEntityEffectParameterTimes();if(e.length>0){t=i.getGeoEntityEffectParameter(e[e.length-1]);break}}}if(WebGLPlot$e.defined(t))return{geoEntityEffectParameter:t,geoEntityEffectParameterUUID:t.getUUID()};{let e=this._geoEntity.getGeoEntityEffects(),t=[];return e.forEach((e=>{let i=e.clone(),n=this._geoEntityStartEffectVisible.get(e.getUUID());i.setVisible(n),t.push(i)})),{geoEntityEffectParameter:new _0x5a492f(t),geoEntityEffectParameterUUID:"initGeoEntityEffectParameter"}}}_update(e){let t=e/1e3,i=this._caclulate(t);WebGLPlot$e.defined(i)&&WebGLPlot$e.defined(i.geoEntityEffectParameter)&&this._currentGeoEntityEffectParameterUUID!==i.geoEntityEffectParameterUUID&&(this._setGeoEntityEffectParameter(i.geoEntityEffectParameter),this._currentGeoEntityEffectParameterUUID=i.geoEntityEffectParameterUUID)}}const _0x20e2ae=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x264807=_0x20e2ae(void 0,(function(){return _0x264807.toString().search("(((.+)+)+)+$").toString().constructor(_0x264807).search("(((.+)+)+)+$")}));_0x264807();class _0x42795a{constructor(e,t,i){this._geoEntityMoveLayer=e,this._deductionScript=t,this._groupIndex=i,this._geoEntity=void 0,this._moveGeoEntity=void 0,this._position=void 0,this._scale=void 0,this._rotation=void 0,this._currentExtendEffectParameterUUID=void 0,this._deductionScriptActionBasicParm=void 0,this._deductionScriptActionEffect=void 0,this._deductionScriptActionMove=void 0,this._deductionScriptActionRotation=void 0,this._deductionScriptActionScale=void 0,this._geoEntityStartEffectVisible=void 0,this._geoEntityStartVisible=void 0,this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups()}_getMoveGeoEntity(){return this._moveGeoEntity}_getGeoEntityUUID(){return this._deductionScript.getGeoEntityUUID()}_setGeoEntityParamerter(e){WebGLPlot$e.defined(this._moveGeoEntity)&&this._moveGeoEntity.setGeoEntityParameter(e)}_setExtendEffectParameter(e){e.getGeoEntityEffects().forEach((e=>{e.getType()===_0xaadec6.EXTENDACTION&&e._executeExtend()}))}_updateDeductionScript(e,t){this._deductionScript=e,this._groupIndex=t,this._currentGeoEntityEffectParameterUUID=void 0,this._deductionScriptActionBasicParm=new _0x5a32e4(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionEffect=new _0x1c7405(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionMove=new _0x4de595(this._deductionScript,this._groupIndex),this._deductionScriptActionRotation=new _0x17d8f6(this._deductionScript,this._groupIndex),this._deductionScriptActionScale=new _0x179128(this._deductionScript,this._groupIndex)}_start(){let e=_0x2e28f1.getInstance().getGeoEntityManager();if(!WebGLPlot$e.defined(e)||(this._geoEntity=e.getGeoEntityByUUID(this._deductionScript.getGeoEntityUUID()),!WebGLPlot$e.defined(this._geoEntity)))return;let t=this._geoEntity._getGeoGraphicObject();if(!WebGLPlot$e.defined(t))return;let i=t.clone();this._geoEntityStartEffectVisible=new Map,this._geoEntity.getGeoEntityEffects().forEach((e=>{e.getType()!=_0xaadec6.COMMUNICATIONLINK&&(this._geoEntityStartEffectVisible.set(e.getUUID(),e.isVisible()),e.setVisible(!1))}));let n=[];if(t.getGeoEntity().getGeoEntityEffects().forEach((e=>{e.getType()==_0xaadec6.COMMUNICATIONLINK&&n.push(e)})),n.forEach((e=>{let n=t.getGeoEntity().getUUID(),r=i.getGeoEntity().getUUID(),o=!1,a=e.getStartUUID();n==a&&(o=!0,a=e.getEndUUID());let s=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(a);if(WebGLPlot$e.defined(s))o?e.setStartUUID(r):e.setEndUUID(r),i.getGeoEntity()._connectLinkToGeoEntity(e);else{let t=e.clone();o?t.setStartUUID(r):t.setEndUUID(r),i.getGeoEntity().addGeoEntityEffect(t),this._geoEntityStartEffectVisible.set(e.getUUID(),e.isVisible()),e.isVisible()&&e.setVisible(!1)}})),this._geoEntityMoveLayer.addFeature(i),this._geoEntityStartVisible=this._geoEntity.getGeoEntityParameter().isVisible(),this._geoEntityStartVisible){let e=new _0x4920fc;e.setVisible(!1),this._geoEntity.setGeoEntityParameter(e)}this._moveGeoEntity=i.getGeoEntity(),this._moveGeoEntity._isMoveGeoEntity=!0,this._position=this._geoEntity.getGeoEntityParameter().getPosition(),this._rotation=this._geoEntity.getGeoEntityParameter().getModelRotate(),this._scale=this._geoEntity.getGeoEntityParameter().getModelScale(),this._deductionScriptActionBasicParm=new _0x5a32e4(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionEffect=new _0x1c7405(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartEffectVisible),this._deductionScriptActionMove=new _0x4de595(this._deductionScript,this._groupIndex),this._deductionScriptActionRotation=new _0x17d8f6(this._deductionScript,this._groupIndex),this._deductionScriptActionScale=new _0x179128(this._deductionScript,this._groupIndex)}_reset(e){if(!WebGLPlot$e.defined(this._geoEntity)||!WebGLPlot$e.defined(this._moveGeoEntity))return;let t=new _0x4920fc;if(e){t.setVisible(this._geoEntityStartVisible),this._geoEntity.getGeoEntityEffects().forEach((e=>{let t=this._geoEntityStartEffectVisible.get(e.getUUID());if(e.getType()==_0xaadec6.COMMUNICATIONLINK){let i=e.getStartUUID();i==this._geoEntity.getUUID()&&(i=e.getEndUUID());let n=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(i);WebGLPlot$e.defined(n)||e.setVisible(t)}else e.setVisible(t)}));let e=this._moveGeoEntity.getGeoEntityEffects(),i=[],n=[];e.forEach((e=>{if(e.getType()==_0xaadec6.COMMUNICATIONLINK){let t=!1,r=e.getStartUUID();r==this._moveGeoEntity.getUUID()&&(t=!0,r=e.getEndUUID());let o=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(r);WebGLPlot$e.defined(o)?(t?e.setStartUUID(this._geoEntity.getUUID()):e.setEndUUID(this._geoEntity.getUUID()),n.push(e)):i.push(e)}})),i.forEach((e=>{this._moveGeoEntity.removeGeoEntityEffect(e.getUUID())})),n.forEach((e=>{this._moveGeoEntity._disConnectLinkToGeoEntity(e),this._geoEntity._connectLinkToGeoEntity(e)}))}else{let e=this._moveGeoEntity.getGeoEntityParameter();WebGLPlot$e.defined(e)&&t._update(e);let i=[],n=[];this._moveGeoEntity.getGeoEntityEffects().forEach((e=>{e.getType()==_0xaadec6.COMMUNICATIONLINK?i.push(e):n.push(e.clone())})),this._geoEntity.updateGeoEntityEffects(n),i.forEach((e=>{this._moveGeoEntity._disConnectLinkToGeoEntity(e),this._geoEntity._connectLinkToGeoEntity(e)}))}this._geoEntity.setGeoEntityParameter(t),this._geoEntityMoveLayer.removeGeoGraphicObject(this._moveGeoEntity._getGeoGraphicObject()),this._moveGeoEntity=void 0}_execute(e){if(WebGLPlot$e.defined(this._geoEntity)){this._deductionScriptActionBasicParm._update(e),this._deductionScriptActionEffect._update(e);let t=this._deductionScriptActionMove._update(e,this._position,this._rotation),i=this._deductionScriptActionRotation._update(e),n=this._deductionScriptActionScale._update(e);if(WebGLPlot$e.defined(t)||WebGLPlot$e.defined(i)||WebGLPlot$e.defined(n)){let e=new _0x4920fc;WebGLPlot$e.defined(t)&&WebGLPlot$e.defined(t.position)&&e.setPosition(t.position);let r=new _0x23de81(0);if(t.isCurrent?r=i.isCurrent?t.isFinished?i.isFinished&&t.currentFinishTime>i.currentFinishTime?new _0x23de81(t.rotation.x,i.rotation.y,t.rotation.z):new _0x23de81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):i.isFinished?new _0x23de81(t.rotation.x,i.rotation.y,t.rotation.z):new _0x23de81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):new _0x23de81(t.rotation.x,i.rotation.y,t.rotation.z):i.isCurrent?r=new _0x23de81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):WebGLPlot$e.defined(t.groupIndex)?WebGLPlot$e.defined(i.groupIndex)?t.groupIndex===i.groupIndex?r=t.finishTime>i.finishTime?new _0x23de81(t.rotation.x,i.rotation.y,t.rotation.z):new _0x23de81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):t.groupIndex<i.groupIndex?r=new _0x23de81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):t.groupIndex>i.groupIndex&&(r=new _0x23de81(t.rotation.x,i.rotation.y,t.rotation.z)):r=t.rotation:r=WebGLPlot$e.defined(i.groupIndex)?new _0x23de81(t.rotation.x+i.rotation.x,t.rotation.y+i.rotation.y,t.rotation.z+i.rotation.z):t.rotation,e.setModelRotate(r),e.setVectorRotate(r),WebGLPlot$e.defined(n)){e.setModelScale(n),e.setVectorRotate(n);let t=this._moveGeoEntity._getGeoGraphicObject()._symbolSizeInLib;if(-1!=t.x&&-1!=t.y){let i=this._moveGeoEntity.getGeoEntityParameter().getDotPlotStyle();0===n?i.setGridSymbolSize(new WebGLPlot$e.Cartesian2(.1,.1)):i.setGridSymbolSize(new WebGLPlot$e.Cartesian2(t.x*n,t.y*n)),e.setDotPlotStyle(i)}let i=new WebGLPlot$e.Cartesian2(64,64);e.setPictureSymbolSize(new WebGLPlot$e.Cartesian2(i.x*n,i.y*n))}this._setGeoEntityParamerter(e)}}else{let t,i=e/1e3,n=this._deductionScript.getGeoEntityEffectParameterTimes();for(let e=0;e<n.length;e++){let r=n[e],o=this._deductionScript.getGeoEntityEffectParameter(r);if(i>=r){if(e===n.length-1){t=o;break}if(i<n[e+1]){t=o;break}}}WebGLPlot$e.defined(t)&&this._currentExtendEffectParameterUUID!==t.getUUID()&&(this._setExtendEffectParameter(t),this._currentExtendEffectParameterUUID=t.getUUID())}}}var _0x349d34=(_0x1d2fa3=!0,function(e,t){var i=_0x1d2fa3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d2fa3=!1,i}),_0x49ce5c=_0x349d34(void 0,(function(){return _0x49ce5c.toString().search("(((.+)+)+)+$").toString().constructor(_0x49ce5c).search("(((.+)+)+)+$")})),_0x1d2fa3;_0x49ce5c();var _0x4d689c={Ready:0,Executing:1,Stop:2},_0x1c1a40=Object.freeze(_0x4d689c);const _0x2e4946=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x210d10=_0x2e4946(void 0,(function(){return _0x210d10.toString().search("(((.+)+)+)+$").toString().constructor(_0x210d10).search("(((.+)+)+)+$")}));_0x210d10();class _0x1a5240{constructor(e,t,i){this._geoEntityMoveLayer=e,this._deductionScriptGroup=t,this._deductionScriptExcuteManager=i,this._deductionScriptExcutes=[],this._executeState=_0x1c1a40.Ready,this._totalTime=this._calcTotalTime()}_calcTotalTime(){let e=this._deductionScriptGroup.getDeductionScripts(),t=0;e.forEach((e=>{let i=e._getTotalTime();t<i&&(t=i)}));let i=this._deductionScriptGroup.getDeductionScriptExtend()._getDeductionScript()._getTotalTime();return t<i&&(t=i),t}_getTotalTime(){return this._totalTime}_getExecuteState(){return this._executeState}_getDeductionScriptExcutes(){return this._deductionScriptExcutes}_execute(e,t){this._executeState===_0x1c1a40.Executing&&this._deductionScriptExcutes.forEach((i=>{i._execute(e,t)}))}_start(e){let t=this._deductionScriptGroup.getDeductionScripts();for(let i=0;i<t.length;i++){let n=t[i],r=this._deductionScriptExcuteManager._getDeductionScriptExecute(n.getGeoEntityUUID());WebGLPlot$e.defined(r)?r._updateDeductionScript(n,e):(r=new _0x42795a(this._geoEntityMoveLayer,n,e),r._start()),this._deductionScriptExcutes.push(r)}let i=this._deductionScriptGroup.getDeductionScriptExtend()._getDeductionScript(),n=new _0x42795a(this._geoEntityMoveLayer,i,e);n._start(),this._deductionScriptExcutes.push(n),this._executeState=_0x1c1a40.Executing}_reset(e){this._deductionScriptExcutes.forEach((t=>{this._executeState!==_0x1c1a40.Ready&&t._reset(e)})),this._executeState=_0x1c1a40.Ready}}var _0x2b0b55=(_0x4876ab=!0,function(e,t){var i=_0x4876ab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4876ab=!1,i}),_0x48a126=_0x2b0b55(void 0,(function(){return _0x48a126.toString().search("(((.+)+)+)+$").toString().constructor(_0x48a126).search("(((.+)+)+)+$")})),_0x4876ab;_0x48a126();var _0x2afae9={NoReset:0,ManualReset:1,AutoReset:2},_0x2b1f2e=Object.freeze(_0x2afae9);const _0x11d5c1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x305ed5=_0x11d5c1(void 0,(function(){return _0x305ed5.toString().search("(((.+)+)+)+$").toString().constructor(_0x305ed5).search("(((.+)+)+)+$")}));_0x305ed5();class _0x3c9d86{constructor(e){this._geoEntityMoveLayer=e,this._UUID=WebGLPlot$e.createGuid(),this._resetType=_0x2b1f2e.AutoReset,this._executeState=_0x1c1a40.Ready,this._executeCallBackFunction=void 0,this._groupIndex=-1,this._deductionScriptExecuteGroups=[],this._currentDeductionScriptExecuteGroup=void 0,this._totalPassTime=0,this._lastTime=void 0}_getUUID(){return this._UUID}_getDeductionScriptExecute(e){for(let t=0;t<=this._groupIndex;t++){let i=this._deductionScriptExecuteGroups[t]._getDeductionScriptExcutes();if(WebGLPlot$e.defined(i))for(let t=0;t<i.length;t++){const n=i[t];if(n._getGeoEntityUUID()===e)return n}}}_execute(e){if(this._executeState===_0x1c1a40.Executing){let t=e-this._lastTime;if(this._totalPassTime+=t,this._totalPassTime>0){let e=-1,t=0;for(let i=0;i<this._deductionScriptExecuteGroups.length;i++){let n=t+this._deductionScriptExecuteGroups[i]._getTotalTime();if(this._totalPassTime>=t&&this._totalPassTime<n+30){e=i;break}t=n}-1===e?this._stop():e!=this._groupIndex?(this._groupIndex=e,this._currentDeductionScriptExecuteGroup=this._deductionScriptExecuteGroups[this._groupIndex],this._currentDeductionScriptExecuteGroup._start(e)):this._currentDeductionScriptExecuteGroup._execute(this._totalPassTime-t,this._deductionScriptGroups[e-1]),WebGLPlot$e.defined(this._executeCallBackFunction)&&this._executeCallBackFunction({allPassTime:this._totalPassTime,groupIndex:this._groupIndex,groupPassTime:this._totalPassTime-t})}}this._lastTime=e}_start(e){this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._lastTime=e,this._deductionScriptGroups.forEach((e=>{let t=new _0x1a5240(this._geoEntityMoveLayer,e,this);this._deductionScriptExecuteGroups.push(t)})),this._executeState=_0x1c1a40.Executing;let t=0;return this._deductionScriptExecuteGroups.forEach((e=>{t+=e._getTotalTime()})),t}_stop(){this._executeState===_0x1c1a40.Executing&&(this._resetType===_0x2b1f2e.AutoReset||this._resetType===_0x2b1f2e.NoReset?this._reset(this._UUID):this._executeState=_0x1c1a40.Stop)}_reset(){this._executeState!==_0x1c1a40.Ready&&(this._deductionScriptExecuteGroups.forEach((e=>{this._resetType===_0x2b1f2e.NoReset?e._reset(!1):e._reset(!0)})),this._executeState=_0x1c1a40.Ready,this._groupIndex=-1,this._deductionScriptExecuteGroups=[],this._currentDeductionScriptExecuteGroup=void 0,this._totalPassTime=0,this._lastTime=void 0)}_setExecuteCallBackFunc(e){this._executeCallBackFunction=e}_setResetType(e){this._resetType=e}}var _0x1993fe=(_0x160323=!0,function(e,t){var i=_0x160323?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x160323=!1,i}),_0x221a72=_0x1993fe(void 0,(function(){return _0x221a72.toString().search("(((.+)+)+)+$").toString().constructor(_0x221a72).search("(((.+)+)+)+$")})),_0x160323;_0x221a72();class _0x209786{constructor(){this._deductionScript=new _0x3fc8dd("Extend"),this._isModified=!1}_getDeductionScript(){return this._deductionScript}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){_0x2e28f1.getInstance()._saveDeductionScript(!1)}_toJson(){return this._deductionScript._toJson()}_fromJson(e){this._deductionScript._fromJson(e)}getUUID(){return this._deductionScript.getUUID()}getGeoEntityEffectExtendParameterTimes(){return this._deductionScript.getGeoEntityEffectParameterTimes()}getGeoEntityEffectExtendParameter(e){this._deductionScript.getGeoEntityEffectParameter(e)}setGeoEntityEffectExtendParameter(e,t){this._deductionScript.setGeoEntityEffectParameter(e,t),this._isModified=!0,this._save()}removeGeoEntityEffectExtendParameter(e){this._deductionScript.removeGeoEntityEffectParameter(e),this._isModified=!0,this._save()}getDelayFinishTime(){return this._deductionScript.getDelayFinishTime()}setDelayFinishTime(e){this._deductionScript.setDelayFinishTime(e),this._isModified=!0}}const _0x5f1a8d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x6080de=_0x5f1a8d(void 0,(function(){return _0x6080de.toString().search("(((.+)+)+)+$").toString().constructor(_0x6080de).search("(((.+)+)+)+$")}));_0x6080de();class _0x5f47f0{constructor(e){this._deductionScriptManager=e,this._UUID=WebGLPlot$e.createGuid(),this._name="",this._deductionScripts=[],this._deductionScriptExtend=new _0x209786,this._isModified=!1}_fromJson(e,t){let i=JSON.parse(e);WebGLPlot$e.defined(i.UUID)&&(this._UUID=i.UUID),WebGLPlot$e.defined(i.name)&&(this._name=i.name),WebGLPlot$e.defined(i.deductionScriptUUIDs)&&(this._deductionScripts.splice(0),i.deductionScriptUUIDs.forEach((e=>{this._deductionScripts.push(t.get(e))}))),WebGLPlot$e.defined(i.deductionScriptExtend)&&this._deductionScriptExtend._fromJson(i.deductionScriptExtend)}_toJson(){let e=new Map,t={};return t.hasOwnProperty("UUID")||(t.UUID=this._UUID),t.hasOwnProperty("name")||(t.name=this._name),t.hasOwnProperty("deductionScriptUUIDs")||(t.deductionScriptUUIDs=[],this._deductionScripts.forEach((i=>{e.set(i.getUUID(),i._toJson()),t.deductionScriptUUIDs.push(i.getUUID())}))),t.hasOwnProperty("deductionScriptExtend")||(t.deductionScriptExtend=this._deductionScriptExtend._toJson()),{deductionScriptJsons:e,json:JSON.stringify(t)}}_isModify(){return!!this._isModified||!!this._deductionScriptExtend._isModify()}_setIsModify(e){this._isModified=e,this._deductionScriptExtend._setIsModify(e)}_save(){_0x2e28f1.getInstance()._saveDeductionScript(!1)}_getDeductionScriptByGeoEntityUUID(e){for(let t=0;t<this._deductionScripts.length;t++){let i=this._deductionScripts[t];if(i.getGeoEntityUUID()===e)return i}}createDeductionScript(e){let t=new _0x3fc8dd(e);return this._deductionScripts.push(t),this._deductionScriptManager._addDeductionScripts.push(t),this._isModified=!0,this._save(),t}removeDeductionScript(e){for(let t=0;t<this._deductionScripts.length;t++){const i=this._deductionScripts[t];if(i.getUUID()===e){let n=i.getGeoEntityMoveParameterTimes();for(let e=n.length-1;e>=0;e--)i.removeGeoEntityMoveParameter(n[e]);this._deductionScripts.splice(t,1),this._deductionScriptManager._removeDeductionScriptUUIDs.push(e),this._isModified=!0,this._save();break}}}getDeductionScripts(){return this._deductionScripts}setName(e){this._name=e,this._isModified=!0,this._save()}getName(){return this._name}getUUID(){return this._UUID}getDeductionScriptExtend(){return this._deductionScriptExtend}}const _0xd87666=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3550f5=_0xd87666(void 0,(function(){return _0x3550f5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3550f5).search("(((.+)+)+)+$")}));_0x3550f5();class _0x1a04d1{constructor(){this._deductionScriptGroups=[],this._scene=void 0,this._geoEntityMoveLayer=void 0,this._deductionScriptExecuteManager=void 0,this._addDeductionScripts=[],this._removeDeductionScriptUUIDs=[],this._isGroupInfoModified=!1}_setScene(e){this._geoEntityMoveLayer=new _0x394df6(e,"GeoEntityMoveLayer"),e.plotLayers.add(this._geoEntityMoveLayer),this._scene=e,this._deductionScriptExecuteManager=new _0x3c9d86(this._geoEntityMoveLayer)}_execute(e){WebGLPlot$e.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._execute(e)}_getDeductionScriptExecute(e){if(WebGLPlot$e.defined(this._deductionScriptExecuteManager)){let t=this._deductionScriptExecuteManager._getDeductionScriptExecute(e);if(WebGLPlot$e.defined(t))return t}}_saveDeduscriptGroupsDataToScheme(){let e=_0x2e28f1.getInstance()._getOpenedSchemeName();if(WebGLPlot$e.defined(e)){let t=[];this._deductionScriptGroups.forEach((e=>{let i=e._toJson();t.push(i.json)})),_0x2e28f1.getInstance().getSituationSimulationSchemeManager().saveScriptStructure(e,t)}}_getAddAndRemoveDeductionScripts(){return{add:this._addDeductionScripts,remove:this._removeDeductionScriptUUIDs}}_clearAddAndRemoveDeductionScripts(){this._addDeductionScripts.splice(0),this._removeDeductionScriptUUIDs.splice(0)}_isGroupInfoModify(){if(this._isGroupInfoModified)return!0;for(let e=0;e<this._deductionScriptGroups.length;e++)if(this._deductionScriptGroups[e]._isModify())return!0;return!1}_setIsGroupInfoModify(e){this._isGroupInfoModified=e,this._deductionScriptGroups.forEach((t=>{t._setIsModify(e)}))}_save(){_0x2e28f1.getInstance()._saveDeductionScript(!1)}_start(e){return this._reset(),this._deductionScriptExecuteManager._start(e)}_stop(){WebGLPlot$e.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._stop()}_reset(){WebGLPlot$e.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._reset(),_0x2e28f1.getInstance().getGeoEntityEffectExtendFactory().clearText()}_setResetType(e){WebGLPlot$e.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._setResetType(e)}_setExecuteCallBackFunc(e){WebGLPlot$e.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._setExecuteCallBackFunc(e)}_removeAllScriptGroupFromScene(){this._deductionScriptGroups.splice(0)}getDeductionScriptGroups(){return this._deductionScriptGroups}removeScriptGroup(e){for(let t=0;t<this._deductionScriptGroups.length;t++){const i=this._deductionScriptGroups[t];if(i.getUUID()===e){i.getDeductionScripts().forEach((e=>{this._removeDeductionScriptUUIDs.push(e.getUUID())})),this._deductionScriptGroups.splice(t,1),this._isGroupInfoModified=!0,this._save();break}}}getScriptGroupByUUID(e){for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t];if(i.getUUID()===e)return i}}removeAllScriptGroup(){this._deductionScriptGroups.forEach((e=>{e.getDeductionScripts().forEach((e=>{this._removeDeductionScriptUUIDs.push(e.getUUID())}))})),this._deductionScriptGroups.splice(0),this._isGroupInfoModified=!0,this._save()}createScriptGroup(e){let t=new _0x5f47f0(this);return t.setName(e),this._deductionScriptGroups.push(t),this._isGroupInfoModified=!0,this._save(),t}toJson(){let e=new Map,t=[];return this._deductionScriptGroups.forEach((i=>{let n=i._toJson();e=new Map([...e,...n.deductionScriptJsons]),t.push(n.json)})),{deductionScriptJsons:e,deductionScriptGroupJsons:JSON.stringify(t)}}fromJson(e){this.removeAllScriptGroup(!1);let t=e.deductionScriptJsons,i=new Map;if(t.forEach(((e,t)=>{if(e.length>0){let n=new _0x3fc8dd("");n._fromJson(e),i.set(t,n)}})),e.deductionScriptGroupJsons.length>0){let t=JSON.parse(e.deductionScriptGroupJsons);WebGLPlot$e.defined(t)&&t.forEach((e=>{let t=new _0x5f47f0(this);t._fromJson(e,i),this._deductionScriptGroups.push(t)}))}}_getMoveGeoEntityByUUID(e){let t=this._getDeductionScriptExecute(e);if(WebGLPlot$e.defined(t))return t._getMoveGeoEntity();if(WebGLPlot$e.defined(this._deductionScriptExecuteManager))for(let t=0;t<=this._deductionScriptExecuteManager._groupIndex;t++){let i=this._deductionScriptExecuteManager._deductionScriptExecuteGroups[t]._getDeductionScriptExcutes();if(WebGLPlot$e.defined(i))for(let t=0;t<i.length;t++){const n=i[t];if(WebGLPlot$e.defined(n)&&WebGLPlot$e.defined(n._getMoveGeoEntity())){let t=n._getMoveGeoEntity();if(t.getUUID()==e)return t}}}return null}}const _0x33cb65=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3b696f=_0x33cb65(void 0,(function(){return _0x3b696f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b696f).search("(((.+)+)+)+$")}));_0x3b696f();class _0x572365{constructor(){this._datasetNameSuffix=["_Structure","_Entity","_Script","_Satellite"],this._commit=this._getCommit(),this._URI=null}_setURI(e){this._URI=e,this._SatelliteConfigURI=e+"/iserver/mgis/situationSimulation/Satellite/SatelliteGroupsTemplate.json",this._datasetsURI=e+"/iserver/services/data-SituationSimulationSchemeWorkspace/rest/data/datasources/SituationSimulationSchemeDatasource/datasets",this._featureResultsURI=e+"/iserver/services/data-SituationSimulationSchemeWorkspace/rest/data/featureResults.rjson?returnContent=true"}newScheme(e){if(null==e||0===e.length||/^\d/.test(e))return!1;let t=this._queryFeatures("metadata","SchemeName",e);if(null==t||null!=t&&t.length>0)return!1;let i=this._datasetsURI+"/metadata/features.rjson",n=[{fieldNames:["SmID","SmUserID","SchemeName"],fieldValues:["0","0",e],geometry:null}];this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(WebGLPlot$e.toJSON(n));for(let t=0;t<this._datasetNameSuffix.length;t++){let i={datasetType:"TABULAR",datasetName:e+this._datasetNameSuffix[t]};if(this._commit.open("POST",encodeURI(this._datasetsURI+".json"),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(i)),JSON.parse(this._commit.responseText,null).succeed){let i=this._datasetsURI+"/"+e+this._datasetNameSuffix[t]+"/fields.rjson",n=["uuid","Content"];0===t&&(n=["EntityStructure","ScriptStructure","SatelliteGroupStructure"]);for(let e=0;e<n.length;e++){let t={isZeroLengthAllowed:"false",maxLength:"100000",isRequired:"false",name:n[e],caption:n[e],type:"WTEXT",defaultValue:"null",isSystemField:"false"};this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(t))}}}let r=this._loadSateGroupInfos(this._SatelliteConfigURI);return WebGLPlot$e.defined(r)&&this.saveSatelliteGroupStructure(e,r),!0}getAllSchemeName(){let e=this._queryFeatures("metadata","",""),t=[];if(null!=e)for(let i=0;i<e.length;i++)t.push(e[i].fieldValues[2]);return t}deleteScheme(e){let t=this._datasetsURI+"/metadata/features.rjson?_method=DELETE&deleteMode=SQL",i={attributeFilter:'SchemeName="'+e+'"'};this._commit.open("POST",encodeURI(t),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(WebGLPlot$e.toJSON(i));for(let t=0;t<this._datasetNameSuffix.length;t++){let i=this._datasetsURI+"/"+e+this._datasetNameSuffix[t]+".rjson";this._commit.open("DELETE",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null)}}saveEntityStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","EntityStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","EntityStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getEntityStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[2]:""}saveScriptStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","ScriptStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","ScriptStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getScriptStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[3]:""}saveSatelliteGroupStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","SatelliteGroupStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","SatelliteGroupStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getSatelliteGroupStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[4]:""}addFeature(e,t,i,n){return this._editFeature(e,t,i,n)}addFeatures(e,t,i){i.forEach(((i,n)=>{this._editFeature(e,t,n,i)}))}getFeatures(e,t){let i=this._getDatasetNameSuffix(t),n=this._queryFeatures(e+i,"","");const r=new Map;if(null!=n)for(let e=0;e<n.length;e++)r.set(n[e].fieldValues[2],n[e].fieldValues[3]);return r}updateFeature(e,t,i,n){return this._editFeature(e,t,i,n)}updateFeatures(e,t,i){let n=this._getDatasetNameSuffix(t),r=this._datasetsURI+"/"+e+n+"/features.rjson";this._commit.open("GET",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let o=JSON.parse(this._commit.responseText,null);if(null!=o&&o.featureCount>0){r=this._datasetsURI+"/"+e+n+"/features.rjson?_method=DELETE&deleteMode=SQL";let t={attributeFilter:"SmID>=0"};this._commit.open("POST",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(t))}i.forEach(((i,n)=>{this._editFeature(e,t,n,i)}))}deleteFeature(e,t,i){let n=this._getDatasetNameSuffix(t),r=this._datasetsURI+"/"+e+n+"/features.rjson?_method=DELETE&deleteMode=SQL",o={attributeFilter:'uuid="'+i+'"'};return this._commit.open("POST",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(o)),JSON.parse(this._commit.responseText,null).succeed}_getCommit(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{this.commit=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}_editFeature(e,t,i,n){let r=this._getDatasetNameSuffix(t),o=this._queryFeatures(e+r,"uuid",i),a=this._datasetsURI+"/"+e+r+"/features.rjson",s=[{fieldNames:["SmID","SmUserID","uuid","Content"],fieldValues:["0","0",i,n],geometry:null}];return null!=o&&o.length>0&&(a+="?_method=PUT",s=[{ID:o[0].ID,fieldNames:["SmID","SmUserID","Content"],fieldValues:["0","0",n],geometry:null}]),this._commit.open("POST",encodeURI(a),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(s)),JSON.parse(this._commit.responseText,null).succeed}_getDatasetNameSuffix(e){let t="";switch(e){case _0x489b6c.ENTITY:t="_Entity";break;case _0x489b6c.SCRIPT:t="_Script";break;case _0x489b6c.SATELLITE:t="_Satellite"}return t}_queryFeatures(e,t,i){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let n={getFeatureMode:"SQL",datasetNames:["SituationSimulationSchemeDatasource:"+e],maxFeatures:1e4,queryParameter:{sortClause:null,ids:null,name:null,attributeFilter:0===t.length?"":t+'="'+i+'"',groupClause:null,linkItems:null,joinItems:null,fields:null}};this._commit.send(WebGLPlot$e.toJSON(n));let r=JSON.parse(this._commit.responseText,null);return null==r?null:r.features}_loadSateGroupInfos(e){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(this._URI))return null;var t;if(-1==(e=e.replace(/\\+/g,"/")).lastIndexOf("/"))return null;(t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open("GET",e,!1),t.send();var i=t.responseText;if(!WebGLPlot$e.defined(i))return null;let n=JSON.parse(i);return WebGLPlot$e.defined(n.groups)&&n.groups.forEach((e=>{WebGLPlot$e.defined(e.modelPath)&&(e.modelPath=this._URI+e.modelPath)})),JSON.stringify(n)}_convertToRgba(e){if(e.startsWith("RGBA(")&&e.endsWith(")")){let t=e.replace("RGBA(","");t=t.substring(0,t.lastIndexOf(")"));let i=t.split(",");if(4===i.length)return new WebGLPlot$e.Color(i[0].trim(),i[1].trim(),i[2].trim(),i[3].trim())}return null}}const _0xa3a7ad=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4d95e4=_0xa3a7ad(void 0,(function(){return _0x4d95e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d95e4).search("(((.+)+)+)+$")}));_0x4d95e4();class _0x2d2a0c{constructor(){this._textNames=[],this._funcs=new Map,this._time=void 0}_execute(e){this._time=e,this._funcs.forEach(((e,t)=>{e.func(e.parms)}))}init(e){let t=this;WebGLPlot$e.defined(e.viewer)&&_0x584c60.addExtendCallBack((function(e,t,i){if("camera"===t){let t=e.viewer,n=JSON.parse(i);t.camera.flyTo({destination:new Cesium.Cartesian3(n.position.x,n.position.y,n.position.z),orientation:{heading:n.heading,pitch:n.pitch,roll:n.roll},duration:n.duration})}}),{viewer:e.viewer}),WebGLPlot$e.defined(e.document)&&_0x584c60.addExtendCallBack((function(e,i,n){if("text"===i){let i=e.document,r=JSON.parse(n),o=i.createElement("Div");o.onselectstart=function(){return!1},o.style.position="absolute",o.style.zIndex="9999",o.style.whiteSpace="pre-wrap",o.style.wordBreak="break-all",o.style.width=r.width,o.style.height=r.height,o.style.background=r.backColor,o.style.webkitBorderRadius=r.borderRadius,o.style.paddingLeft=r.paddingLeft,o.style.paddingRight=r.paddingRight,o.style.paddingTop=r.paddingTop,o.style.paddingBottom=r.paddingBottom;let a=r.texts;for(let e=0;e<a.length;e++){let t=a[e],n=i.createElement("p");n.style.marginTop="0px",n.style.marginBottom="0px";let r=t.fontSize,s=r.slice(0,r.length-2);n.style.paddingTop=String(Number(s)/2)+"px",n.style.paddingBottom=String(Number(s)/2)+"px",n.style.color=t.color,n.style.fontFamily=t.fontFamily,n.style.fontSize=t.fontSize,n.style.fontWeight=t.fontWeight,n.style.fontStyle=t.fontStyle,n.style.lineHeight=t.lineHeight,n.style.letterSpacing=t.letterSpacing,n.style.textDecoration=t.textDecoration,n.style.textShadow=t.textShadow,n.style["-webkit-text-stroke"]=t.stroke,n.style.textAlign=t.textAlign,"left"===n.style.textAlign?n.style.marginLeft=t.margin:"right"===n.style.textAlign&&(n.style.marginRight=t.margin);let l=i.createTextNode(t.text);n.appendChild(l),o.appendChild(n)}i.body.appendChild(o);let s=o.offsetWidth,l=o.offsetHeight;switch(r.position.type){case 0:o.style.left=r.position.customPos.left,o.style.top=r.position.customPos.top;break;case 1:o.style.left="1px",o.style.top="1px";break;case 2:o.style.left="calc(50% - "+String(s/2)+"px)",o.style.top="1px";break;case 3:o.style.left="calc(100% - "+String(s+1)+"px)",o.style.top="1px";break;case 4:o.style.left="1px",o.style.top="calc(50% - "+String(l/2)+"px)";break;case 5:o.style.left="calc(50% - "+String(s/2)+"px)",o.style.top="calc(50% - "+String(l/2)+"px)";break;case 6:o.style.left="calc(100% - "+String(s+1)+"px)",o.style.top="calc(50% - "+String(l/2)+"px)";break;case 7:o.style.left="1px",o.style.top="calc(100% - "+String(l+1)+"px)";break;case 8:o.style.left="calc(50% - "+String(s/2)+"px)",o.style.top="calc(100% - "+String(l+1)+"px)";break;case 9:o.style.left="calc(50% - "+String(s+1)+"px)",o.style.top="calc(100% - "+String(l+1)+"px)"}let u=WebGLPlot$e.createGuid(),c=function(e){if(t._time-e.startTime>e.time){e.div.remove(),t._funcs.delete(u);for(let e=0;e<t._textNames.length;e++)if(t._textNames[e]===u){t._textNames.splice(e,1);break}}};t._funcs.set(u,{parms:{startTime:t._time,time:r.time,div:o},func:c}),t._textNames.push(u)}}),{document:e.document})}clearText(){this._textNames.forEach((e=>{this._funcs.get(e).parms.div.remove(),this._funcs.delete(e)})),this._textNames=[]}createCameraFlyExtendEffect(e){let t=new _0x584c60;t.setName("camera");let i={};return i.position={x:e.position.x,y:e.position.y,z:e.position.z},i.heading=e.heading,i.pitch=e.pitch,i.roll=e.roll,i.duration=e.duration,t.setParam(JSON.stringify(i)),t}createTextExtendEffect(e){if(!WebGLPlot$e.defined(e.texts))return;let t=new _0x584c60;t.setName("text");let i={};return i.time=WebGLPlot$e.defaultValue(1e3*e.time,3e3),i.width=WebGLPlot$e.defined(e.width)?String(e.width)+"px":"",i.height=WebGLPlot$e.defined(e.height)?String(e.height)+"px":"",WebGLPlot$e.defined(e.position)?(i.position={type:WebGLPlot$e.defaultValue(e.position.type,8)},WebGLPlot$e.defined(e.position.customPos)?i.position.customPos={left:WebGLPlot$e.defined(e.position.customPos.x)?String(e.position.customPos.x)+"px":"0px",top:WebGLPlot$e.defined(e.position.customPos.y)?String(e.position.customPos.y)+"px":"0px"}:i.position.customPos={left:"0px",top:"0px"}):i.position={type:8},i.backColor=WebGLPlot$e.defined(e.backColor)?e.backColor.toCssColorString():"white",i.borderRadius=WebGLPlot$e.defined(e.borderRadius)?e.borderRadius+"px":"0px",i.paddingLeft=WebGLPlot$e.defined(e.paddingLeft)?String(e.paddingLeft)+"px":"0px",i.paddingRight=WebGLPlot$e.defined(e.paddingRight)?String(e.paddingRight)+"px":"0px",i.paddingTop=WebGLPlot$e.defined(e.paddingTop)?String(e.paddingTop)+"px":"0px",i.paddingBottom=WebGLPlot$e.defined(e.paddingBottom)?String(e.paddingBottom)+"px":"0px",i.texts=[],e.texts.forEach((e=>{let t={text:WebGLPlot$e.defaultValue(e.text,"Text"),fontFamily:WebGLPlot$e.defaultValue(e.fontFamily,"Microsoft YaHei"),fontStyle:WebGLPlot$e.defaultValue(e.fontStyle,"normal"),lineHeight:WebGLPlot$e.defaultValue(e.lineHeight,1),fontSize:WebGLPlot$e.defined(e.fontSize)?String(e.fontSize)+"px":"16px",fontWeight:WebGLPlot$e.defined(e.fontWeight)?String(e.fontWeight)+"px":"normal",letterSpacing:WebGLPlot$e.defined(e.letterSpacing)?String(e.letterSpacing)+"px":"0px",color:WebGLPlot$e.defined(e.color)?e.color.toCssColorString():"black",textAlign:WebGLPlot$e.defaultValue(e.textAlign,"left"),margin:WebGLPlot$e.defined(e.margin)?String(e.margin)+"px":"0px"};if(WebGLPlot$e.defined(e.textDecoration)){let i=WebGLPlot$e.defined(e.textDecoration.type)?e.textDecoration.type:"none",n=WebGLPlot$e.defined(e.textDecoration.color)?e.textDecoration.color.toCssColorString():"black";t.textDecoration=i+" "+n}if(WebGLPlot$e.defined(e.textShadow)){let i=WebGLPlot$e.defined(e.textShadow.color)?e.textShadow.color.toCssColorString():"black",n=WebGLPlot$e.defined(e.textShadow.left)?String(e.textShadow.left)+"px":"4px",r=WebGLPlot$e.defined(e.textShadow.top)?String(e.textShadow.top)+"px":"4px",o=WebGLPlot$e.defined(e.textShadow.size)?String(e.textShadow.size)+"px":"4px";t.textShadow=i+" "+n+" "+r+" "+o}if(WebGLPlot$e.defined(e.stroke)){let i=WebGLPlot$e.defined(e.stroke.width)?String(e.stroke.width)+"px":"0px",n=WebGLPlot$e.defined(e.stroke.color)?e.stroke.color.toCssColorString():"black";t.stroke=i+" "+n}i.texts.push(t)})),t.setParam(JSON.stringify(i)),t}}const _0x3ea46e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe6c571=_0x3ea46e(void 0,(function(){return _0xe6c571.toString().search("(((.+)+)+)+$").toString().constructor(_0xe6c571).search("(((.+)+)+)+$")}));_0xe6c571();class _0x120b1f{constructor(){this._bPlay=!1,this._lUTCTime=(new Date).getTime(),this._lSimulationTime=this._lUTCTime,this._dSimulationSpeed=1,this._lCumnlativeTime=0,this._bReverse=!1,this._bAutoUpdate=!1,this._lOrbitTime=this._lSimulationTime;let e=this;this._timer=setInterval((function(){e._execute()}),30)}setResetType(e){_0x2e28f1.getInstance().getDeductionScriptManager()._setResetType(e)}start(){return this._bPlay=!0,_0x2e28f1.getInstance().getDeductionScriptManager()._start(this._lSimulationTime)}stop(){this._bPlay=!1,_0x2e28f1.getInstance().getDeductionScriptManager()._stop()}reset(){this._bPlay=!1,_0x2e28f1.getInstance().getDeductionScriptManager()._reset()}pause(){this._bPlay=!1}continue(){this._bPlay=!0}setExecutePassTimeOffset(e){this._lSimulationTime+=e}setExecuteCallBackFunc(e){_0x2e28f1.getInstance().getDeductionScriptManager()._setExecuteCallBackFunc(e)}getUTCTime(){return this._lUTCTime}setSimulationSpeed(e){this._dSimulationSpeed=e}getSimulationSpeed(){return this._dSimulationSpeed}setSimulationTime(e){this._lSimulationTime=e,this._executeSatellite(),this._executeDeductionScript()}getSimulationTime(){return this._lSimulationTime}setIsReverse(e){this._bReverse=e}getIsReverse(){return this._bReverse}getAutoUpdate(){return this._bAutoUpdate}isPlay(){return this._bPlay}updataAllOrbitPosition(){_0x2e28f1.getInstance().getSatelliteManager().updateAllOrbitPosition(this._lSimulationTime)}_execute(){let e=(new Date).getTime();if(this._bPlay){let t=(e-this._lUTCTime)*this._dSimulationSpeed;this._bReverse?this._lSimulationTime=this._lSimulationTime-t:this._lSimulationTime=this._lSimulationTime+t,this._executeSatellite(),this._executeDeductionScript(),this._lCumnlativeTime=0}this._lUTCTime=e}_executeSatellite(){_0x2e28f1.getInstance().getSatelliteManager().updateAllSatellitePosition(this._lSimulationTime),_0x2e28f1.getInstance().getSatelliteEntityManager().updateAllSatelliteEntityPosition(this._lSimulationTime)}_executeDeductionScript(){_0x2e28f1.getInstance().getDeductionScriptManager()._execute(this._lSimulationTime),_0x2e28f1.getInstance().getGeoEntityEffectExtendFactory()._execute(this._lSimulationTime)}}const _0x2590d4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x22f061=_0x2590d4(void 0,(function(){return _0x22f061.toString().search("(((.+)+)+)+$").toString().constructor(_0x22f061).search("(((.+)+)+)+$")}));_0x22f061();class _0x2e28f1{constructor(){this._geoEntityManager=new _0x3c98af,this._satelliteEntityManager=new _0x535f91,this._satelliteManager=new _0x5e00a7,this._deductionScriptManager=new _0x1a04d1,this._situationSimulationSchemeManager=new _0x572365,this._geoEntityEffectExtendFactory=new _0x2d2a0c,this._simulationController=new _0x120b1f,this._schemeName=void 0,this._isAutoSave=!1,this._uri=void 0}_getOpenedSchemeName(){return this._schemeName}_saveGeoEntity(e){if(e||this._isAutoSave){if(!WebGLPlot$e.defined(this._schemeName))return;let e=this._geoEntityManager._getAddAndRemoveGeoEntitys();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x489b6c.ENTITY,e.getUUID(),e.toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x489b6c.ENTITY,e)}));let t=this._geoEntityManager.getGeoEntityRootNode();(e.add.length>0||e.remove.length>0||t._isModify())&&(this._situationSimulationSchemeManager.saveEntityStructure(this._schemeName,t._toJson()),t._isModify()&&t._setIsModify(!1)),this._geoEntityManager.getGeoEntitys().forEach((t=>{-1===e.add.indexOf(t)&&t._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x489b6c.ENTITY,t.getUUID(),t.toJson()),t._setIsModify(!1))})),this._geoEntityManager._clearAddAndRemoveGeoEntitys()}}_saveSatelliteGeoEntity(e){if(e||this._isAutoSave){if(!WebGLPlot$e.defined(this._schemeName))return;let e=this._satelliteEntityManager._getAddAndRemoveGeoEntitys();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x489b6c.SATELLITE,e.getUUID(),e.toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x489b6c.SATELLITE,e)})),this._satelliteEntityManager.getSatelliteEntitys().forEach((t=>{-1===e.add.indexOf(t)&&t._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x489b6c.SATELLITE,t.getUUID(),t.toJson()),t._setIsModify(!1))})),this._satelliteEntityManager._clearAddAndRemoveGeoEntitys()}}_saveDeductionScript(e){if(e||this._isAutoSave){if(!WebGLPlot$e.defined(this._schemeName))return;let e=this._deductionScriptManager._getAddAndRemoveDeductionScripts();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x489b6c.SCRIPT,e.getUUID(),e._toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x489b6c.SCRIPT,e)})),(e.add.length>0||e.remove.length>0||this._deductionScriptManager._isGroupInfoModify())&&(this._situationSimulationSchemeManager.saveScriptStructure(this._schemeName,this._deductionScriptManager.toJson().deductionScriptGroupJsons),this._deductionScriptManager._isGroupInfoModify()&&this._deductionScriptManager._setIsGroupInfoModify(!1)),this._deductionScriptManager.getDeductionScriptGroups().forEach((e=>{e.getDeductionScripts().forEach((e=>{e._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x489b6c.SCRIPT,e.getUUID(),e._toJson()),e._setIsModify(!1))}))}))}}_saveSatelliteGroups(e){if(e||this._isAutoSave){if(!WebGLPlot$e.defined(this._schemeName))return;this._satelliteManager._isModify()&&(this._situationSimulationSchemeManager.saveSatelliteGroupStructure(this._schemeName,this._satelliteManager.toJson()),this._satelliteManager._setIsModify(!1))}}static getInstance(){return _0x2e28f1._instance||(_0x2e28f1._instance=new _0x2e28f1),_0x2e28f1._instance}getSimulationController(){return this._simulationController}getGeoEntityManager(){return this._geoEntityManager}getSatelliteEntityManager(){return this._satelliteEntityManager}getSatelliteManager(){return this._satelliteManager}getDeductionScriptManager(){return this._deductionScriptManager}getSituationSimulationSchemeManager(){return this._situationSimulationSchemeManager}getGeoEntityEffectExtendFactory(){return this._geoEntityEffectExtendFactory}setScene(e){this._geoEntityManager._setScene(e),this._satelliteEntityManager.setScene(e),this._satelliteManager.setScene(e),this._deductionScriptManager._setScene(e)}openScheme(e,t){let i=this._isAutoSave;this._isAutoSave=!1;let n=this._situationSimulationSchemeManager.getSatelliteGroupStructure(e);this._satelliteManager.fromJson(n);let r=this._situationSimulationSchemeManager.getFeatures(e,_0x489b6c.ENTITY),o=this._situationSimulationSchemeManager.getEntityStructure(e);this._geoEntityManager.fromJson({geoEntityJsons:r,geoEntityNodeJson:o},(function(e){"function"==typeof t&&t(e)}));let a=this._situationSimulationSchemeManager.getFeatures(e,_0x489b6c.SCRIPT),s=this._situationSimulationSchemeManager.getScriptStructure(e);this._deductionScriptManager.fromJson({deductionScriptJsons:a,deductionScriptGroupJsons:s});let l=this._situationSimulationSchemeManager.getFeatures(e,_0x489b6c.SATELLITE);this._satelliteEntityManager.fromJson({satelliteEntityJsons:l,satelliteManager:this._satelliteManager},(function(e){"function"==typeof t&&t(e)})),this._schemeName=e,this._isAutoSave=i}closeScheme(){let e=this._isAutoSave;this._isAutoSave=!1,this._geoEntityManager._removeAllGeoEntityFromScene(),this._deductionScriptManager._removeAllScriptGroupFromScene(),this._satelliteEntityManager._removeAllSatelliteEntityFromScene(this._satelliteManager),this._schemeName=void 0,this._isAutoSave=e}saveScheme(){this._saveGeoEntity(!0),this._saveSatelliteGeoEntity(!0),this._saveDeductionScript(!0),this._saveSatelliteGroups(!0)}setIsAutoSave(e){this._isAutoSave=e}isAutoSave(){return this._isAutoSave}setURI(e){this._situationSimulationSchemeManager._setURI(e),this._uri=e}getURI(){return this._uri}}var _0x143301=(_0x49e33d=!0,function(e,t){var i=_0x49e33d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49e33d=!1,i}),_0x253a07=_0x143301(void 0,(function(){return _0x253a07.toString().search("(((.+)+)+)+$").toString().constructor(_0x253a07).search("(((.+)+)+)+$")})),_0x49e33d;_0x253a07();var WebGLPlot$3=window.WebGLPlot=window.WebGLPlot||{};function _0x181e05(e){e=e||{},this.defaultFlag=!!e.defaultFlag&&e.defaultFlag,this.symbolStyle=new _0x291171,this.symbolTextStyle=new _0x40b7f2,this._gridSymbolSize=e.gridSymbolSize?e.gridSymbolSize:new WebGLPlot$3.Cartesian2(-1,-1),this._lineSymbolID=e.lineSymbolID?e.lineSymbolID:-1,this._gridLineWidth=e.gridLineWidth?e.gridLineWidth:-1,this._modelPath=e.modelPath?e.modelPath:"",this.CLASS_NAME="DefaultStyle"}Object.defineProperties(_0x181e05.prototype,{lineColor:{get:function(){return this.symbolStyle._lineColor},set:function(e){e!==this.symbolStyle._lineColor&&(this.symbolStyle.lineColor=e)}},lineWidth:{get:function(){return this.symbolStyle._lineWidth},set:function(e){e!==this.symbolStyle._lineWidth&&(this.symbolStyle.lineWidth=e)}},fillBackColor:{get:function(){return this.symbolStyle._fillBackColor},set:function(e){e!==this.symbolStyle._fillBackColor&&(this.symbolStyle.fillBackColor=e)}},fillForeColor:{get:function(){return this.symbolStyle._fillForeColor},set:function(e){e!==this.symbolStyle._fillForeColor&&(this.symbolStyle.fillForeColor=e)}},fillBackOpaque:{get:function(){return this.symbolStyle._fillBackOpaque},set:function(e){e!==this.symbolStyle._fillBackOpaque&&(this.symbolStyle.fillBackOpaque=e)}},fillGradientAngle:{get:function(){return this.symbolStyle._fillGradientAngle},set:function(e){e!==this.symbolStyle._fillGradientAngle&&(this.symbolStyle.fillGradientAngle=e)}},fillGradientMode:{get:function(){return this.symbolStyle._fillGradientMode},set:function(e){e!==this.symbolStyle._fillGradientMode&&(this.symbolStyle.fillGradientMode=e)}},fillGradientOffsetRatioY:{get:function(){return this.symbolStyle._fillGradientOffsetRatioY},set:function(e){e!==this.symbolStyle._fillGradientOffsetRatioY&&(this.symbolStyle.fillGradientOffsetRatioY=e)}},fillGradientOffsetRatioX:{get:function(){return this.symbolStyle._fillGradientOffsetRatioX},set:function(e){e!==this.symbolStyle._fillGradientOffsetRatioX&&(this.symbolStyle.fillGradientOffsetRatioX=e)}},fillSymbolID:{get:function(){return this.symbolStyle._fillSymbolID},set:function(e){e!==this.symbolStyle._fillSymbolID&&(this.symbolStyle.fillSymbolID=e)}},fillOpaqueRate:{get:function(){return this.symbolStyle._fillOpaqueRate},set:function(e){e===this.symbolStyle._fillOpaqueRate||e>100||e<0||(this.symbolStyle.fillOpaqueRate=e)}},surroundLineWidth:{get:function(){return this.symbolStyle._surroundLineWidth},set:function(e){e!==this.symbolStyle._surroundLineWidth&&(this.symbolStyle.surroundLineWidth=e)}},surroundLineColor:{get:function(){return this.symbolStyle._surroundLineColor},set:function(e){e!==this.symbolStyle._surroundLineColor&&(this.symbolStyle.surroundLineColor=e)}},opacity:{get:function(){return this.symbolStyle._opacity},set:function(e){e!==this.symbolStyle._opacity&&(this.symbolStyle.opacity=e)}},surroundLineType:{get:function(){return this.symbolStyle._surroundLineType},set:function(e){e!==this.symbolStyle._surroundLineType&&(this.symbolStyle.surroundLineType=e)}},height:{get:function(){return this.symbolTextStyle._height},set:function(e){e!==this.symbolTextStyle._height&&(this.symbolTextStyle.height=e)}},foreColor:{get:function(){return this.symbolTextStyle._foreColor},set:function(e){e!==this.symbolTextStyle._foreColor&&(this.symbolTextStyle.foreColor=e)}},backColor:{get:function(){return this.symbolTextStyle._backColor},set:function(e){e!==this.symbolTextStyle._backColor&&(this.symbolTextStyle.backColor=e)}},outline:{get:function(){return this.symbolTextStyle._outline},set:function(e){e!==this.symbolTextStyle._outline&&(this.symbolTextStyle.outline=e)}},fontName:{get:function(){return this.symbolTextStyle._fontName},set:function(e){e!==this.symbolTextStyle._fontName&&(this.symbolTextStyle.fontName=e)}},italic:{get:function(){return this.symbolTextStyle._italic},set:function(e){e!==this.symbolTextStyle._italic&&(this.symbolTextStyle.italic=e)}},bold:{get:function(){return this.symbolTextStyle._bold},set:function(e){e!==this.symbolTextStyle._bold&&(this.symbolTextStyle.bold=e)}},align:{get:function(){return this.symbolTextStyle._align},set:function(e){e!==this.symbolTextStyle._italic&&(this.symbolTextStyle.align=e)}},italicAngle:{get:function(){return this.symbolTextStyle._italicAngle},set:function(e){e!==this.symbolTextStyle._italicAngle&&(this.symbolTextStyle.italicAngle=e)}},shadow:{get:function(){return this.symbolTextStyle._shadow},set:function(e){e!==this.symbolTextStyle._shadow&&(this.symbolTextStyle.shadow=e)}},sizeFixed:{get:function(){return this.symbolTextStyle._sizeFixed},set:function(e){e!==this.symbolTextStyle._sizeFixed&&(this.symbolTextStyle.sizeFixed=e)}},underline:{get:function(){return this.symbolTextStyle._underline},set:function(e){e!==this.symbolTextStyle._underline&&(this.symbolTextStyle.underline=e)}},backOpaque:{get:function(){return this.symbolTextStyle._backOpaque},set:function(e){e!==this.symbolTextStyle._backOpaque&&(this.symbolTextStyle.backOpaque=e)}},strikeout:{get:function(){return this.symbolTextStyle._strikeout},set:function(e){e!==this.symbolTextStyle._strikeout&&(this.symbolTextStyle.strikeout=e)}},borderSpacingWidth:{get:function(){return this._borderSpacingWidth},set:function(e){e!==this._borderSpacingWidth&&(this._borderSpacingWidth=e)}},outlineWidth:{get:function(){return this.symbolTextStyle._outlineWidth},set:function(e){e!==this.symbolTextStyle._outlineWidth&&(this.symbolTextStyle.outlineWidth=e)}},fontWidth:{get:function(){return this.symbolTextStyle._fontWidth},set:function(e){e!==this.symbolTextStyle._fontWidth&&(this.symbolTextStyle.fontWidth=e)}},opaqueRate:{get:function(){return this.symbolTextStyle._opaqueRate},set:function(e){e!==this.symbolTextStyle._opaqueRate&&(this.symbolTextStyle.opaqueRate=e)}},stringAlignment:{get:function(){return this.symbolTextStyle._stringAlignment},set:function(e){e!==this.symbolTextStyle._stringAlignment&&(this.symbolTextStyle.stringAlignment=e)}},text3DScale:{get:function(){return this.symbolTextStyle._text3DScale},set:function(e){e!==this.symbolTextStyle._text3DScale&&(this.symbolTextStyle.text3DScale=e)}},fontWeight:{get:function(){return this.symbolTextStyle._fontWeight},set:function(e){e!==this.symbolTextStyle._fontWeight&&(this.symbolTextStyle.fontWeight=e)}},fontSize:{get:function(){return this.symbolTextStyle._fontSize},set:function(e){e!==this.symbolTextStyle._fontSize&&(this.symbolTextStyle.fontSize=e)}},outlineColor:{get:function(){return this.symbolTextStyle._outlineColor},set:function(e){e!==this.symbolTextStyle._outlineColor&&(this.symbolTextStyle.outlineColor=e)}},gridSymbolSize:{get:function(){return this._gridSymbolSize},set:function(e){e.x>0&&e.y>0&&(this._gridSymbolSize=e)}},lineSymbolID:{get:function(){return this._lineSymbolID},set:function(e){this._lineSymbolID!==e&&(this._lineSymbolID=e)}},gridLineWidth:{get:function(){return this._gridLineWidth},set:function(e){this._gridLineWidth!==e&&(this._gridLineWidth=e)}},modelPath:{get:function(){return this._modelPath},set:function(e){this._modelPath!==e&&(this._modelPath=e)}}}),WebGLPlot$3.DefaultStyle=_0x181e05;var _0x2188f6=(_0x441ebc=!0,function(e,t){var i=_0x441ebc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x441ebc=!1,i}),_0x545870=_0x2188f6(void 0,(function(){return _0x545870.toString().search("(((.+)+)+)+$").toString().constructor(_0x545870).search("(((.+)+)+)+$")})),_0x441ebc;_0x545870();var WebGLPlot$2=window.WebGLPlot=window.WebGLPlot||{};function _0x29b810(e){e=e||{},this.properties=e.properties?e.properties:[],this.CLASS_NAME="ExtendProperty"}function t$2(e){this._shaderProgramText=e.shaderProgramText,this._name=e.name,this._context=e.context}function r$8(e,t){this.name=e.name,this._engine=e.engine,this._shaderProgram=e.shaderProgram,this._threadGroupsize=[],this._computerShader=new _0x45d8f5(this.name,this._engine,{computeSource:this._shaderProgram},t)}_0x29b810.prototype.addProperty=function(e,t){var i=this.findProperty(e);return null===i?this.properties.push(WebGLPlot$2.createProperty(e,t)):i.setValue(t),!0},_0x29b810.prototype.deleteProperty=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties.slice(t,1),!0;return!1},_0x29b810.prototype.findProperty=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties[t];return null},_0x29b810.prototype.getPropertyValue=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties[t].value;return null},_0x29b810.prototype.getPropertyByIndex=function(e){return e<this.properties.length?this.properties[e]:null},_0x29b810.prototype.getPropertyCount=function(){return this.properties.length},_0x29b810.prototype.destroy=function(){this.properties=null},WebGLPlot$2.ExtendProperty=_0x29b810,Object.defineProperties(t$2.prototype,{shaderProgram:{get:function(){return this._shaderProgramText}},shaderName:{get:function(){return this._name}},engine:{get:function(){return this._context.engine}}}),Object.defineProperties(r$8.prototype,{threadGroupsize:{get:function(){return this._threadGroupsize}}}),r$8.prototype.dispatch=function(e,t,i,n){e$2e(t)||(t=1),e$2e(i)||(i=1),0==this.threadGroupsize.length&&this.getThreadGroupSizes(this._shaderProgram);const r=this.threadGroupsize,o=Math.ceil(e/r[0]),a=Math.ceil(t/r[1]),s=Math.ceil(i/r[2]);return e$2e(n)?this._computerShader.dispatchWhenReady(o,a,s,n):(this._computerShader.dispatch(o,a,s),null)},r$8.prototype.getThreadGroupSizes=function(e){var t=/workgroup_size\s*?\(\s*?(\d+)\s*?,\s*?(\d+)\s*?,\s*?(\d+)/g.exec(e);return t=t?[0|t[1],0|t[2],0|t[3]]:[1,1,1],this._threadGroupsize=t,t},r$8.prototype.bindStorageBuffer=function(e,t){this._computerShader.setStorageBuffer(e,t)},r$8.prototype.bindUniformBuffer=function(e,t){this._computerShader.setUniformBuffer(e,t)},r$8.prototype.bindTextureSampler=function(e,t){this._computerShader.setTextureSampler(e,t)},r$8.prototype.bindStorageTexture=function(e,t){this._computerShader.setStorageTexture(e,t)},r$8.prototype.bindTexture=function(e,t,i){this._computerShader.setTexture(e,t,i)};var _0x408a20=(_0x376f44=!0,function(e,t){var i=_0x376f44?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x376f44=!1,i}),_0x11e83e=_0x408a20(void 0,(function(){return _0x11e83e.toString().search("(((.+)+)+)+$").toString().constructor(_0x11e83e).search("(((.+)+)+)+$")})),_0x376f44;_0x11e83e();var CommonNoLigthOneTextureVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\n#ifdef RENDER_POINT\nuniform float uPointSize;\n#endif\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n gl_Position = depthClampFarPlane(pos);\n vTexCoord = aTexCoord0.xy;\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n#ifdef RENDER_POINT\n gl_PointSize = uPointSize;\n#endif\n}",_0x54e704=(_0x49d88=!0,function(e,t){var i=_0x49d88?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49d88=!1,i}),_0x154bb1=_0x54e704(void 0,(function(){return _0x154bb1.toString().search("(((.+)+)+)+$").toString().constructor(_0x154bb1).search("(((.+)+)+)+$")})),_0x49d88;_0x154bb1();var CommonOneTextureFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uTexture0;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec2 texcoord = vTexCoord.xy;\n gl_FragColor = texture2D(uTexture0, texcoord);\n}",_0x1e7009=(_0x24e464=!0,function(e,t){var i=_0x24e464?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24e464=!1,i}),_0x3e45cb=_0x1e7009(void 0,(function(){return _0x3e45cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e45cb).search("(((.+)+)+)+$")})),_0x24e464;_0x3e45cb();var DepthMapAnalysisVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nuniform mat4 uRenderTextureMatrix;\nvarying vec4 renderTextureCoord;\nvarying float texcoordX;\n#ifdef LOG_DEPTH\nvarying float v_rttLogZ;\n#endif\nvarying vec4 vPositionEC;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n vPositionEC = viewPos;\n renderTextureCoord = uRenderTextureMatrix * viewPos;\n texcoordX = aTexCoord0.x;\n}",_0x379980=(_0x37dc8b=!0,function(e,t){var i=_0x37dc8b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37dc8b=!1,i}),_0x10612b=_0x379980(void 0,(function(){return _0x10612b.toString().search("(((.+)+)+)+$").toString().constructor(_0x10612b).search("(((.+)+)+)+$")})),_0x37dc8b;_0x10612b();var ModifyRegionBottomFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uColorTexture;\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\nuniform vec4 uGeoBounds;\nuniform vec4 uHypRect;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying float fHeight;\n\n\nfloat computeMixCon(float height)\n{\n\tfloat distanceToContour = mod(height - 0.0002, uHypContourInterval);\n\tfloat dxc = abs(dFdx(height));\n\tfloat dyc = abs(dFdy(height));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float height)\n{\n\tfloat threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat contourRate = (height - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tvec2 contourCoord = vec2(0.0, finalCoord);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec2 texcoord = vTexCoord.xy;\n gl_FragColor = texture2D(uColorTexture, texcoord);\n if(uHypHasColorTable > 0.1)\n {\n float bNext = 1.0;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (uGeoBounds.z - uGeoBounds.x) + uGeoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uGeoBounds.w - uGeoBounds.y) + uGeoBounds.y;\n if(polyTexCoord.x>uHypRect.x && polyTexCoord.x<uHypRect.z && polyTexCoord.y> uHypRect.y&& polyTexCoord.y < uHypRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uHypRect.x, uHypRect.w);\n polyTexCoord.x = polyTexCoord.x / (uHypRect.z - uHypRect.x);\n polyTexCoord.y = 1.0 - polyTexCoord.y / (uHypRect.y - uHypRect.w);\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n bNext = 0.0;\n }\n }\n else\n {\n bNext = 0.0;\n }\n }\n if(bNext > 0.2)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(fHeight <= uHypMaxVisibleValue && fHeight >= uHypMinVisibleValue)\n {\n#ifdef GL_OES_standard_derivatives\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fHeight);\n contourMapColor = mix(computeContourMapColor(fHeight), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fHeight);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fHeight);\n }\n else\n {\n finalOpacity = 0.0;\n }\n }\n else\n {\n finalOpacity = 0.5;\n }\n gl_FragColor = mix(gl_FragColor, contourMapColor, finalOpacity);\n }\n }\n}",_0x4f0dd6=(_0x1e0f84=!0,function(e,t){var i=_0x1e0f84?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e0f84=!1,i}),_0x5a213b=_0x4f0dd6(void 0,(function(){return _0x5a213b.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a213b).search("(((.+)+)+)+$")})),_0x1e0f84;_0x5a213b();var ModifyRegionBottomVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\n#ifdef RENDER_POINT\nuniform float uPointSize;\n#endif\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying float fHeight;\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n gl_Position = depthClampFarPlane(pos);\n vTexCoord = aTexCoord0.xy;\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n fHeight = aPosition.w;\n#ifdef RENDER_POINT\n gl_PointSize = uPointSize;\n#endif\n}",_0x346d05=(_0x40cc79=!0,function(e,t){var i=_0x40cc79?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40cc79=!1,i}),_0x160d21=_0x346d05(void 0,(function(){return _0x160d21.toString().search("(((.+)+)+)+$").toString().constructor(_0x160d21).search("(((.+)+)+)+$")})),_0x40cc79;_0x160d21();var ModifyRegionOuterFS="varying vec2 vTexCoord;\nuniform sampler2D uColorTexture;\nvoid main()\n{\n gl_FragColor = texture2D(uColorTexture, vTexCoord);\n}",_0x128ac1=(_0x160fd2=!0,function(e,t){var i=_0x160fd2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x160fd2=!1,i}),_0x5c51cf=_0x128ac1(void 0,(function(){return _0x5c51cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c51cf).search("(((.+)+)+)+$")})),_0x160fd2;_0x5c51cf();var ModifyRegionOuterVS="attribute vec4 aPosition;\nattribute vec2 aTexCoord;\nuniform vec2 uMinMaxModifyHeight;\nvarying vec2 vTexCoord;\nuniform sampler2D uHeightTexture;\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uHeightTexture, aTexCoord));\n float height = aPosition.z + terrainHeight;\n vec4 vertexPos = vec4(aPosition.xy, height, 1.0);\n gl_Position = czm_modelViewProjection * vertexPos;\n vTexCoord = aTexCoord;\n}",_0x14464a=(_0x37d141=!0,function(e,t){var i=_0x37d141?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37d141=!1,i}),_0x5149c6=_0x14464a(void 0,(function(){return _0x5149c6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5149c6).search("(((.+)+)+)+$")})),_0x37d141;_0x5149c6();var ModifyRegionSideFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uHeightTexture;\nuniform sampler2D uColorTexture;\n\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\nuniform vec4 uGeoBounds;\nuniform vec4 uHypRect;\nvarying vec2 vTexcoord;\nvarying float fHeight;\nvarying float height;\nvarying float regionHeight;\n#ifdef Excavation\nvarying vec2 vTexcoord1;\n#endif\n\nfloat computeMixCon(float height)\n{\n\tfloat distanceToContour = mod(height - 0.0002, uHypContourInterval);\n\tfloat dxc = abs(dFdx(height));\n\tfloat dyc = abs(dFdy(height));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float height)\n{\n\tfloat threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat contourRate = (height - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tvec2 contourCoord = vec2(0.0, finalCoord);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvoid main()\n{\nczm_writeDepthClampedToFarPlane();\n\tvec2 texcoord = vTexcoord;\n#ifdef Excavation\n\ttexcoord = vTexcoord1;\n#endif\nfloat terrainHeight = max(czm_unpackValue(texture2D(uHeightTexture, vTexcoord)), 0.0);\nif(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n}\n#ifndef Excavation\n if(regionHeight > terrainHeight)\n {\n if(height > regionHeight|| height < terrainHeight - 500.0)\n {\n discard;\n }\n }\n else\n {\n if(height > terrainHeight || height < regionHeight - 500.0)\n {\n discard;\n }\n }\n#else\n if(height > terrainHeight || height < regionHeight)\n {\n discard;\n }\n#endif\n\tgl_FragColor = vec4(texture2D(uColorTexture, texcoord).rgb, 1.0);\n\tif(uHypHasColorTable > 0.1)\n {\n float bNext = 1.0;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexcoord.xy;\n polyTexCoord.x = polyTexCoord.x * (uGeoBounds.z - uGeoBounds.x) + uGeoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uGeoBounds.w - uGeoBounds.y) + uGeoBounds.y;\n if(polyTexCoord.x>uHypRect.x && polyTexCoord.x<uHypRect.z && polyTexCoord.y> uHypRect.y&& polyTexCoord.y < uHypRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uHypRect.x, uHypRect.w);\n polyTexCoord.x = polyTexCoord.x / (uHypRect.z - uHypRect.x);\n polyTexCoord.y = 1.0 - polyTexCoord.y / (uHypRect.y - uHypRect.w);\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n bNext = 0.0;\n }\n }\n else\n {\n bNext = 0.0;\n }\n }\n if(bNext > 0.2)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(fHeight <= uHypMaxVisibleValue && fHeight >= uHypMinVisibleValue)\n {\n#ifdef GL_OES_standard_derivatives\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fHeight);\n contourMapColor = mix(computeContourMapColor(fHeight), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fHeight);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fHeight);\n }\n else\n {\n finalOpacity = 0.0;\n }\n }\n else\n {\n finalOpacity = 0.5;\n }\n gl_FragColor = mix(gl_FragColor, contourMapColor, finalOpacity);\n }\n }\n}",_0x7a4782=(_0x4eb208=!0,function(e,t){var i=_0x4eb208?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4eb208=!1,i}),_0x48dd6c=_0x7a4782(void 0,(function(){return _0x48dd6c.toString().search("(((.+)+)+)+$").toString().constructor(_0x48dd6c).search("(((.+)+)+)+$")})),_0x4eb208;_0x48dd6c();var ModifyRegionSideVp="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n\nuniform sampler2D uTexture0;\nvarying vec2 vTexcoord;\nvarying float fHeight;\nvarying float height;\nvarying float regionHeight;\n#ifdef Excavation\nvarying vec2 vTexcoord1;\n#endif\n\nvoid main()\n{\n\tvTexcoord = aTexCoord0.xy;\n#ifdef Excavation\n\tvTexcoord1 = aTexCoord1.xy;\n#endif\n\tgl_Position = czm_depthClampFarPlane(czm_modelViewProjection * vec4(aPosition.xyz, 1.0));\n\theight = aPosition.w;\n\tregionHeight = aTexCoord0.z;\n}",_0x28770c=(_0x1d37df=!0,function(e,t){var i=_0x1d37df?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d37df=!1,i}),_0x1b7abd=_0x28770c(void 0,(function(){return _0x1b7abd.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b7abd).search("(((.+)+)+)+$")})),_0x1d37df;_0x1b7abd();var S3MTilesBillboardVp="attribute vec3 aPosition; \n \nattribute vec3 aNormal; \n \nattribute vec4 aTexCoord0; \n \nattribute vec4 aTexCoord1; \n \n#ifdef VertexColor \nattribute vec4 aColor; \n#endif \n#ifdef BatchTable \nattribute float batchId; \n#endif \n \nvarying vec4 vColor; \nvarying float fVertexColor; \nvarying vec4 vSecondColor; \nvarying vec4 vAmbientColor; \nvarying vec2 vTexCoord; \nvarying vec2 vSecondTexCoord; \nvarying vec4 clip_vertex; \n \nuniform vec4 uDiffuseColor; \nuniform vec4 uAmbientColor; \n \nvoid main() \n{ \n vTexCoord = aTexCoord0.xy; \n vSecondTexCoord = aTexCoord1.xy; \n\tvec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n vertexColor = aColor; \n#endif \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n vec4 operationType = czm_batchTable_operation(batchId); \n vec4 objsColor = czm_batchTable_color(batchId); \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor); \n#endif \n vColor = vertexColor * uDiffuseColor; \n fVertexColor = vertexColor.a; \n vec4 viewPos = czm_modelView * vec4(aPosition, 1.0); \n viewPos.xyz = viewPos.xyz + aNormal; \n clip_vertex = viewPos; \n gl_Position = czm_projection * viewPos; \n vAmbientColor = uAmbientColor; \n}",_0xb35eb5=(_0x31ec1e=!0,function(e,t){var i=_0x31ec1e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31ec1e=!1,i}),_0x12dc23=_0xb35eb5(void 0,(function(){return _0x12dc23.toString().search("(((.+)+)+)+$").toString().constructor(_0x12dc23).search("(((.+)+)+)+$")})),_0x31ec1e;_0x12dc23();var S3MVoxelGridFp="#extension GL_EXT_draw_buffers : enable\nvarying vec4 vColor;\nvarying vec4 vPosition;\nvarying vec4 vPositionMC;\nvarying float v_pixelDistance;\nvoid main()\n{\n#ifdef CLIP\n czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n vec4 color = vColor;\n float distanceToCenter = length(gl_PointCoord - vec2(0.5));\n float maxDistance = max(0.0, 0.5 - v_pixelDistance);\n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n color.a *= wholeAlpha;\n\tcolor = czm_gammaCorrect(color);\n#ifdef EXCAVATION\n if(czm_executeExcavation())\n {\n discard;\n }\n#endif\n#ifdef OIT\n vec3 Ci = color.rgb * color.a;\n float ai = color.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n#else\n gl_FragColor = color;\n#endif\n}",_0x103279=(_0x5a1ea3=!0,function(e,t){var i=_0x5a1ea3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a1ea3=!1,i}),_0x58fba0=_0x103279(void 0,(function(){return _0x58fba0.toString().search("(((.+)+)+)+$").toString().constructor(_0x58fba0).search("(((.+)+)+)+$")})),_0x5a1ea3;_0x58fba0();var S3MVoxelGridVp="attribute vec4 aPosition;\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n#endif\nattribute vec4 aColor;\nvarying float v_pixelDistance;\nvarying vec4 vPosition;\nuniform mat4 uGeoMatrix;\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\n#ifdef HYPSOMETRIC\n uniform sampler2D uHypsometricTexture;\n uniform float uHypOpacity;\n uniform float uHypContourFillMode;\n uniform float uHypFloor;\n uniform float uHypCeil;\n uniform float uHypMaxVisibleValue;\n uniform float uHypMinVisibleValue;\n uniform vec4 uNoValueColor;\n#endif\n uniform float uPointCloudSize;\n uniform vec4 uFillForeColor;\n varying vec4 vColor;\n varying vec4 vPositionMC;\n#ifdef HYPSOMETRIC\nvec4 computeContourMapColor(float fValue)\n{\n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n float contourRate = (fValue - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n float count = floor(finalCoord * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 contourCoord = vec2(x, y);\n return texture2D(uHypsometricTexture, contourCoord).rgba;\n}\nvec4 getHypsometricColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n contourMapColor = computeContourMapColor(fValue);\n finalOpacity *= sign(uHypContourFillMode);\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n return mixColor;\n}\n#endif\n\nfloat getGlobeDepth(vec4 positionEC)\n{\n vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n if (globeDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n\nvoid main()\n{\n vec4 vertexPos = aPosition;\n vertexPos.w = 1.0;\n vPositionMC.xyz = vertexPos.xyz;\n vPositionMC.w = 0.0;\n vColor = aColor;\n float wValue = aTexCoord0.x;\n gl_Position = czm_modelViewProjection * vertexPos;\n#ifdef HYPSOMETRIC\n if(wValue > uHypMaxVisibleValue || wValue < uHypMinVisibleValue)\n {\n gl_Position = czm_projection * vec4(0.0, 0.0, 0.0, 1.0);\n }\n vColor = getHypsometricColor(vColor, wValue);\n#endif\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n vColor *= uFillForeColor;\n vPosition = czm_modelView * vertexPos;\n float depthsilon = 10.0;\n float globeDepth = getGlobeDepth(vPosition);\n if (globeDepth != 0.0 && vPosition.z + depthsilon < globeDepth)\n {\n gl_Position = czm_projection * vec4(0.0, 0.0, 0.0, 1.0);\n }\n float mpp = czm_metersPerPixel(vPosition);\n float pointSize = uPointCloudSize / mpp;\n v_pixelDistance = 2.0 / pointSize;\n gl_PointSize = pointSize;\n}",_0x472b2d=(_0x280451=!0,function(e,t){var i=_0x280451?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x280451=!1,i}),_0x4c5e43=_0x472b2d(void 0,(function(){return _0x4c5e43.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c5e43).search("(((.+)+)+)+$")})),_0x280451;_0x4c5e43();var SightlineAnalysisFp="uniform sampler2D uTexture0;\nuniform vec4 uVisibleColor;\nuniform vec4 uHiddenColor;\n\nvarying vec4 renderTextureCoord;\nvarying float texcoordX;\nvarying vec4 vPositionEC;void main()\n{\n vec4 resultColor = vec4(uVisibleColor.rgb, 1.0);\n vec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n float depth = texCoord.z * 0.5 + 0.5;\n // float depthBias = 0.0005 * max(-vPositionEC.z * 0.01, 1.0);\n // depth -= depthBias;\n texCoord.xy = texCoord.xy * 0.5 + 0.5;\n if(abs(texcoordX - 1.0) < 0.0001)\n {\n\t\tfloat z_window = czm_unpackDepth(texture2D(uTexture0, texCoord.xy));\n\t\tif(z_window < depth && z_window > 0.0 && z_window < 1.0)\n\t\t{\n\t\t\tresultColor = vec4(uHiddenColor.rgb, 1.0);\n\t\t}\n }\n else\n {\n\t\tresultColor = vec4(0.4, 0.4, 0.4, 1.0);\n }\n gl_FragColor = resultColor;\n}";const _0x57e7b0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2b1d5e=_0x57e7b0(void 0,(function(){return _0x2b1d5e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b1d5e).search("(((.+)+)+)+$")}));function _0x47febb(e){var t=_0x37a515.call(this)||this;t._layer=e,t._name=_0x2e0417.Polyline,this._initUniformMap()}_0x2b1d5e(),_0x37a515&&(_0x47febb.__proto__=_0x37a515),_0x47febb.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x47febb.prototype.constructor=_0x37a515,Object.defineProperties(_0x47febb.prototype,{}),_0x47febb.prototype._initUBOStruct=function(){const e=this._ubo;e.addUniform("uForeColor",4),e.addUniform("uBackColor",4),e.addUniform("uRotationAngle",1),e.addUniform("uType",1),e.addUniform("uLineWidthX",1),e.addUniform("uLineWidthY",1),e.addUniform("uRepeatX",1),e.addUniform("uRepeatY",1),e.addUniform("uOffsetX",1),e.addUniform("uOffsetY",1)},_0x47febb.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),this._initUBOStruct(),this._ubo.create()},_0x47febb.prototype.update=function(e){if(!e.webgpu&&!e.webgl2)return;e$2e(this._ubo)||this._initUBO(e);const t=this._layer,i=this._ubo,n=t._effect;i.updateDirectColor4("uForeColor",n._foreColor),i.updateDirectColor4("uBackColor",n._backColor),i.updateFloat("uRotationAngle",n._rotationAngle),i.updateFloat("uType",n._type),i.updateFloat("uLineWidthX",n._lineWidthX),i.updateFloat("uLineWidthY",n._lineWidthY),i.updateFloat("uRepeatX",n._repeatX),i.updateFloat("uRepeatY",n._repeatY),i.updateFloat("uOffsetX",n._offsetX),i.updateFloat("uOffsetY",n._offsetY),i.update()},_0x47febb.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x47febb.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x47febb.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(t.webgl2||t.webgpu)return;const i=e._effect;var n={uForeColor:function(){return i._foreColor},uBackColor:function(){return i._backColor},uRotationAngle:function(){return i._rotationAngle},uType:function(){return i._type},uLineWidthX:function(){return i._lineWidthX},uLineWidthY:function(){return i._lineWidthY},uRepeatX:function(){return i._repeatX},uRepeatY:function(){return i._repeatY},uOffsetX:function(){return i._offsetX},uOffsetY:function(){return i._offsetY}};this._uniformMap=n},_0x47febb.prototype.isDestroyed=function(){return!1},_0x47febb.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};var RasterLayerUboDecl="\n uniform RasterLayer {\n \n };\n",N$1="http://www.w3.org/2000/svg",O$2="http://www.w3.org/1999/xlink",w,x$2=e$1X.fromCssColorString("rgba(247,250,255,0.384)"),E$1=e$1X.fromCssColorString("rgba(143,191,255,0.216)"),M$2=e$1X.fromCssColorString("rgba(153,197,255,0.098)"),k$2=e$1X.fromCssColorString("rgba(255,255,255,0.086)"),K=e$1X.fromCssColorString("rgba(255,255,255,0.267)"),X$1=e$1X.fromCssColorString("rgba(255,255,255,0)"),F$1=e$1X.fromCssColorString("rgba(66,67,68,0.3)"),W$1=e$1X.fromCssColorString("rgba(0,0,0,0.5)");function b$3(e){return e$1X.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}function c$4(e){var t=document.createElementNS(N$1,e.tagName);for(var i in e)if(e.hasOwnProperty(i)&&"tagName"!==i)if("children"===i){var n,r=e.children.length;for(n=0;n<r;++n)t.appendChild(c$4(e.children[n]))}else 0===i.indexOf("xlink:")?t.setAttributeNS(O$2,i.substring(6),e[i]):"textContent"===i?t.textContent=e[i]:t.setAttribute(i,e[i]);return t}function B(e,t,i){var n=document.createElementNS(N$1,"text");n.setAttribute("x",e),n.setAttribute("y",t),n.setAttribute("class","supermap3d-animation-svgText");var r=document.createElementNS(N$1,"tspan");return r.textContent=i,n.appendChild(r),n}function q$1(e,t,i){e.setAttribute("transform","translate(100,100) rotate("+i+")"),t.setAttribute("transform","rotate("+i+")")}var R$2=new e$1X;function i$6(e,t){var i=t.alpha,n=1-i;return R$2.red=e.red*n+t.red*i,R$2.green=e.green*n+t.green*i,R$2.blue=e.blue*n+t.blue*i,R$2.toCssColorString()}function z$1(e,t,i){return c$4({tagName:"g",class:"supermap3d-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"rect",class:"supermap3d-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect",class:"supermap3d-animation-buttonMain",width:32,height:32,rx:4,ry:4},{tagName:"use",class:"supermap3d-animation-buttonPath","xlink:href":i},{tagName:"title",textContent:""}]})}function J(e,t,i){return c$4({tagName:"g",class:"supermap3d-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"use",class:"supermap3d-animation-buttonGlow","xlink:href":"#animation_pathWingButton"},{tagName:"use",class:"supermap3d-animation-buttonMain","xlink:href":"#animation_pathWingButton"},{tagName:"use",class:"supermap3d-animation-buttonPath","xlink:href":i},{tagName:"title",textContent:""}]})}function Q$2(e,t){var i=e._viewModel,n=i.shuttleRingDragging;if(!n||w===e)if("mousedown"===t.type||n&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||n&&"touchmove"===t.type&&1===t.touches.length){var r,o,a=e._centerX,s=e._centerY,l=e._svgNode.getBoundingClientRect();if("touchstart"===t.type||"touchmove"===t.type?(r=t.touches[0].clientX,o=t.touches[0].clientY):(r=t.clientX,o=t.clientY),!n&&(r>l.right||r<l.left||o<l.top||o>l.bottom))return;var u=e._shuttleRingPointer.getBoundingClientRect(),c=r-a-l.left,h=o-s-l.top,d=180*Math.atan2(h,c)/Math.PI+90;d>180&&(d-=360);var f=i.shuttleRingAngle;n||r<u.right&&r>u.left&&o>u.top&&o<u.bottom?(w=e,i.shuttleRingDragging=!0,i.shuttleRingAngle=d):d<f?i.slower():d>f&&i.faster(),t.preventDefault()}else e===w&&(w=void 0),i.shuttleRingDragging=!1}function f$4(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;var i=this;this._clickFunction=function(){var e=i._viewModel.command;e.canExecute&&e()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[c$5(t,"toggled",this.setToggled,this),c$5(t,"tooltip",this.setTooltip,this),c$5(t.command,"canExecute",this.setEnabled,this)]}function y$4(e,t){if(!e$2e(e))throw new t$15("container is required.");if(!e$2e(t))throw new t$15("viewModel is required.");e=i$c(e),this._viewModel=t,this._container=e,this._centerX=0,this._centerY=0,this._defsElement=void 0,this._svgNode=void 0,this._topG=void 0,this._lastHeight=void 0,this._lastWidth=void 0;var i=document.createElement("style");i.textContent=".supermap3d-animation-rectButton .supermap3d-animation-buttonGlow { filter: url(#animation_blurred); }.supermap3d-animation-rectButton .supermap3d-animation-buttonMain { fill: url(#animation_buttonNormal); }.supermap3d-animation-buttonToggled .supermap3d-animation-buttonMain { fill: url(#animation_buttonToggled); }.supermap3d-animation-rectButton:hover .supermap3d-animation-buttonMain { fill: url(#animation_buttonHovered); }.supermap3d-animation-buttonDisabled .supermap3d-animation-buttonMain { fill: url(#animation_buttonDisabled); }.supermap3d-animation-shuttleRingG .supermap3d-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.supermap3d-animation-shuttleRingG:hover .supermap3d-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.supermap3d-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.supermap3d-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.supermap3d-animation-knobOuter { fill: url(#animation_knobOuter); }.supermap3d-animation-knobInner { fill: url(#animation_knobInner); }",document.head.insertBefore(i,document.head.childNodes[0]);var n=document.createElement("div");n.className="supermap3d-animation-theme",n.innerHTML='<div class="supermap3d-animation-themeNormal"></div><div class="supermap3d-animation-themeHover"></div><div class="supermap3d-animation-themeSelect"></div><div class="supermap3d-animation-themeDisabled"></div><div class="supermap3d-animation-themeKnob"></div><div class="supermap3d-animation-themePointer"></div><div class="supermap3d-animation-themeSwoosh"></div><div class="supermap3d-animation-themeSwooshHover"></div>',this._theme=n,this._themeNormal=n.childNodes[0],this._themeHover=n.childNodes[1],this._themeSelect=n.childNodes[2],this._themeDisabled=n.childNodes[3],this._themeKnob=n.childNodes[4],this._themePointer=n.childNodes[5],this._themeSwoosh=n.childNodes[6],this._themeSwooshHover=n.childNodes[7];var r=document.createElementNS(N$1,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",O$2);var o=document.createElementNS(N$1,"g");this._topG=o,this._realtimeSVG=new f$4(J(3,4,"#animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new f$4(z$1(44,99,"#animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new f$4(z$1(124,99,"#animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new f$4(z$1(84,99,"#animation_pathPause"),t.pauseViewModel);var a=document.createElementNS(N$1,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);var s=c$4({tagName:"circle",class:"supermap3d-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=s;var l=c$4({tagName:"g",class:"supermap3d-animation-shuttleRingSwoosh",children:[{tagName:"use",transform:"translate(100,97) scale(-1,1)","xlink:href":"#animation_pathSwooshFX"},{tagName:"use",transform:"translate(100,97)","xlink:href":"#animation_pathSwooshFX"},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=l,this._shuttleRingPointer=c$4({tagName:"use",class:"supermap3d-animation-shuttleRingPointer","xlink:href":"#animation_pathPointer"});var u=c$4({tagName:"g",transform:"translate(100,100)"});this._knobOuter=c$4({tagName:"circle",class:"supermap3d-animation-knobOuter",cx:0,cy:0,r:71});var c=c$4({tagName:"circle",class:"supermap3d-animation-knobInner",cx:0,cy:0,r:61});this._knobDate=B(0,-24,""),this._knobTime=B(0,-7,""),this._knobStatus=B(0,-41,"");var h=c$4({tagName:"circle",class:"supermap3d-animation-blank",cx:0,cy:0,r:61}),d=document.createElementNS(N$1,"g");d.setAttribute("class","supermap3d-animation-shuttleRingG"),e.appendChild(n),o.appendChild(d),o.appendChild(u),o.appendChild(a),d.appendChild(s),d.appendChild(l),d.appendChild(this._shuttleRingPointer),u.appendChild(this._knobOuter),u.appendChild(c),u.appendChild(this._knobDate),u.appendChild(this._knobTime),u.appendChild(this._knobStatus),u.appendChild(h),r.appendChild(o),e.appendChild(r);var f=this;function p(e){Q$2(f,e)}this._mouseCallback=p,s.addEventListener("mousedown",p,!0),s.addEventListener("touchstart",p,!0),l.addEventListener("mousedown",p,!0),l.addEventListener("touchstart",p,!0),document.addEventListener("mousemove",p,!0),document.addEventListener("touchmove",p,!0),document.addEventListener("mouseup",p,!0),document.addEventListener("touchend",p,!0),document.addEventListener("touchcancel",p,!0),this._shuttleRingPointer.addEventListener("mousedown",p,!0),this._shuttleRingPointer.addEventListener("touchstart",p,!0),this._knobOuter.addEventListener("mousedown",p,!0),this._knobOuter.addEventListener("touchstart",p,!0);var _,m=this._knobTime.childNodes[0],g=this._knobDate.childNodes[0],x=this._knobStatus.childNodes[0];this._subscriptions=[c$5(t.pauseViewModel,"toggled",(function(e){_!==e&&((_=e)?f._shuttleRingPointer.setAttribute("class","supermap3d-animation-shuttleRingPausePointer"):f._shuttleRingPointer.setAttribute("class","supermap3d-animation-shuttleRingPointer"))})),c$5(t,"shuttleRingAngle",(function(e){q$1(f._shuttleRingPointer,f._knobOuter,e)})),c$5(t,"dateLabel",(function(e){g.textContent!==e&&(g.textContent=e)})),c$5(t,"timeLabel",(function(e){m.textContent!==e&&(m.textContent=e)})),c$5(t,"multiplierLabel",(function(e){x.textContent!==e&&(x.textContent=e)}))],this.applyThemeChanges(),this.resize()}f$4.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);for(var e=this._subscriptions,t=0,i=e.length;t<i;t++)e[t].dispose();i$11(this)},f$4.prototype.isDestroyed=function(){return!1},f$4.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e)return void this.svgElement.setAttribute("class","supermap3d-animation-buttonDisabled");if(this._toggled)return void this.svgElement.setAttribute("class","supermap3d-animation-rectButton supermap3d-animation-buttonToggled");this.svgElement.setAttribute("class","supermap3d-animation-rectButton")}},f$4.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","supermap3d-animation-rectButton supermap3d-animation-buttonToggled"):this.svgElement.setAttribute("class","supermap3d-animation-rectButton")))},f$4.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e},Object.defineProperties(y$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),y$4.prototype.isDestroyed=function(){return!1},y$4.prototype.destroy=function(){e$2e(this._observer)&&(this._observer.disconnect(),this._observer=void 0);var e=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",e,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",e,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",e,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",e,!0),document.removeEventListener("mousemove",e,!0),document.removeEventListener("touchmove",e,!0),document.removeEventListener("mouseup",e,!0),document.removeEventListener("touchend",e,!0),document.removeEventListener("touchcancel",e,!0),this._shuttleRingPointer.removeEventListener("mousedown",e,!0),this._shuttleRingPointer.removeEventListener("touchstart",e,!0),this._knobOuter.removeEventListener("mousedown",e,!0),this._knobOuter.removeEventListener("touchstart",e,!0),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();for(var t=this._subscriptions,i=0,n=t.length;i<n;i++)t[i].dispose();return i$11(this)},y$4.prototype.resize=function(){var e=this._container.clientWidth,t=this._container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){var i=this._svgNode,n=200,r=132,o=e,a=t;0===e&&0===t?(o=n,a=r):0===e?(a=t,o=n*(t/r)):0===t&&(o=e,a=r*(e/n));var s=o/n,l=a/r;i.style.cssText="width: "+o+"px; height: "+a+"px; position: absolute; bottom: 0; left: 0; overflow: hidden;",i.setAttribute("width",o),i.setAttribute("height",a),i.setAttribute("viewBox","0 0 "+o+" "+a),this._topG.setAttribute("transform","scale("+s+","+l+")"),this._centerX=Math.max(1,100*s),this._centerY=Math.max(1,100*l),this._lastHeight=e,this._lastWidth=t}},y$4.prototype.applyThemeChanges=function(){if(!document.body.contains(this._container)){if(e$2e(this._observer))return;var e=this;return e._observer=new MutationObserver((function(){document.body.contains(e._container)&&(e._observer.disconnect(),e._observer=void 0,e.applyThemeChanges())})),void e._observer.observe(document,{childList:!0,subtree:!0})}var t=b$3(this._themeNormal),i=b$3(this._themeHover),n=b$3(this._themeSelect),r=b$3(this._themeDisabled),o=b$3(this._themeKnob),a=b$3(this._themePointer),s=b$3(this._themeSwoosh),l=b$3(this._themeSwooshHover),u=c$4({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(t,x$2)},{tagName:"stop",offset:"12%","stop-color":i$6(t,E$1)},{tagName:"stop",offset:"46%","stop-color":i$6(t,M$2)},{tagName:"stop",offset:"81%","stop-color":i$6(t,k$2)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(i,x$2)},{tagName:"stop",offset:"12%","stop-color":i$6(i,E$1)},{tagName:"stop",offset:"46%","stop-color":i$6(i,M$2)},{tagName:"stop",offset:"81%","stop-color":i$6(i,k$2)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(n,x$2)},{tagName:"stop",offset:"12%","stop-color":i$6(n,E$1)},{tagName:"stop",offset:"46%","stop-color":i$6(n,M$2)},{tagName:"stop",offset:"81%","stop-color":i$6(n,k$2)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(r,K)},{tagName:"stop",offset:"75%","stop-color":i$6(r,X$1)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,in:"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":s.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":l.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":i$6(a,W$1)},{tagName:"stop",offset:"100%","stop-color":i$6(a,W$1)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":i$6(o,x$2)},{tagName:"stop",offset:"60%","stop-color":i$6(o,F$1)},{tagName:"stop",offset:"85%","stop-color":i$6(o,E$1)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":i$6(o,F$1)},{tagName:"stop",offset:"60%","stop-color":i$6(o,x$2)},{tagName:"stop",offset:"85%","stop-color":i$6(o,k$2)}]},{id:"animation_pathReset",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},{id:"animation_pathPause",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},{id:"animation_pathPlay",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},{id:"animation_pathPlayReverse",tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},{id:"animation_pathLoop",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},{id:"animation_pathClock",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},{id:"animation_pathWingButton",tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},{id:"animation_pathPointer",tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},{id:"animation_pathSwooshFX",tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}]});e$2e(this._defsElement)?this._svgNode.replaceChild(u,this._defsElement):this._svgNode.appendChild(u),this._defsElement=u};var F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],f$3=15,_$2=105;function R$1(e,t){return e-t}function y$3(e,t){var i=a$17(t,e,R$1);return i<0?~i:i}function b$2(e,t){if(Math.abs(e)<=f$3)return e/f$3;var i,n=f$3,r=_$2;return e>0?(i=(Math.log(t[t.length-1])-0)/(r-n),Math.exp(0+i*(e-n))):(i=(Math.log(-t[0])-0)/(r-n),-Math.exp(0+i*(Math.abs(e)-n)))}function C$2(e,t,i){if(i.clockStep===g$R.SYSTEM_CLOCK)return f$3;if(Math.abs(e)<=1)return e*f$3;var n=t[t.length-1];e>n?e=n:e<-n&&(e=-n);var r,o=f$3,a=_$2;return e>0?(r=(Math.log(n)-0)/(a-o),(Math.log(e)-0)/r+o):(r=(Math.log(-t[0])-0)/(a-o),-((Math.log(Math.abs(e))-0)/r+o))}function m$5(e){if(!e$2e(e))throw new t$15("clockViewModel is required.");var t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=m$5.defaultDateFormatter,this._timeFormatter=m$5.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,ce$1.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(m$5.defaultTicks),this.timeLabel=void 0,ce$1.defineProperty(this,"timeLabel",(function(){return t._timeFormatter(t._clockViewModel.currentTime,t)})),this.dateLabel=void 0,ce$1.defineProperty(this,"dateLabel",(function(){return t._dateFormatter(t._clockViewModel.currentTime,t)})),this.multiplierLabel=void 0,ce$1.defineProperty(this,"multiplierLabel",(function(){var e=t._clockViewModel;if(e.clockStep===g$R.SYSTEM_CLOCK)return"Today";var i=e.multiplier;return i%1==0?i.toFixed(0)+"x":i.toFixed(3).replace(/0{0,3}$/,"")+"x"})),this.shuttleRingAngle=void 0,ce$1.defineProperty(this,"shuttleRingAngle",{get:function(){return C$2(e.multiplier,t._allShuttleRingTicks,e)},set:function(e){e=Math.max(Math.min(e,_$2),-_$2);var i=t._allShuttleRingTicks,n=t._clockViewModel;if(n.clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER,Math.abs(e)!==_$2){var r=b$2(e,i);if(t.snapToTicks)r=i[y$3(r,i)];else if(0!==r){var o=Math.abs(r);if(o>100){var a=o.toFixed(0).length-2,s=Math.pow(10,a);r=Math.round(r/s)*s|0}else o>f$3?r=Math.round(r):o>1?r=+r.toFixed(1):o>0&&(r=+r.toFixed(2))}n.multiplier=r}else n.multiplier=e>0?i[i.length-1]:i[0]}}),this._canAnimate=void 0,ce$1.defineProperty(this,"_canAnimate",(function(){var e=t._clockViewModel,i=e.clockRange;if(t.shuttleRingDragging||i===tt$a.UNBOUNDED)return!0;var n=e.multiplier,r=e.currentTime,o=e.startTime,a=!1;if(i===tt$a.LOOP_STOP)a=a$15.greaterThan(r,o)||r.equals(o)&&n>0;else{var s=e.stopTime;a=a$15.greaterThan(r,o)&&a$15.lessThan(r,s)||r.equals(o)&&n>0||r.equals(s)&&n<0}return a||(e.shouldAnimate=!1),a})),this._isSystemTimeAvailable=void 0,ce$1.defineProperty(this,"_isSystemTimeAvailable",(function(){var e=t._clockViewModel;if(e.clockRange===tt$a.UNBOUNDED)return!0;var i=e.systemTime;return a$15.greaterThanOrEquals(i,e.startTime)&&a$15.lessThanOrEquals(i,e.stopTime)})),this._isAnimating=void 0,ce$1.defineProperty(this,"_isAnimating",(function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)}));var i=s$4((function(){var e=t._clockViewModel;e.shouldAnimate?e.shouldAnimate=!1:t._canAnimate&&(e.shouldAnimate=!0)}));this._pauseViewModel=new r$9(i,{toggled:ce$1.computed((function(){return!t._isAnimating})),tooltip:"Pause"});var n=s$4((function(){var e=t._clockViewModel,i=e.multiplier;i>0&&(e.multiplier=-i),e.shouldAnimate=!0}));this._playReverseViewModel=new r$9(n,{toggled:ce$1.computed((function(){return t._isAnimating&&e.multiplier<0})),tooltip:"Play Reverse"});var r=s$4((function(){var e=t._clockViewModel,i=e.multiplier;i<0&&(e.multiplier=-i),e.shouldAnimate=!0}));this._playForwardViewModel=new r$9(r,{toggled:ce$1.computed((function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==g$R.SYSTEM_CLOCK})),tooltip:"Play Forward"});var o=s$4((function(){t._clockViewModel.clockStep=g$R.SYSTEM_CLOCK}),ce$1.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new r$9(o,{toggled:ce$1.computed((function(){return e.clockStep===g$R.SYSTEM_CLOCK})),tooltip:ce$1.computed((function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"}))}),this._slower=s$4((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,n=y$3(e.multiplier,i)-1;n>=0&&(e.multiplier=i[n])})),this._faster=s$4((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,n=y$3(e.multiplier,i)+1;n<i.length&&(e.multiplier=i[n])}))}function V(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).globe,i=u$Z(e.imageryProviderViewModels,[]),n=u$Z(e.terrainProviderViewModels,[]);if(!e$2e(t))throw new t$15("globe is required");this._globe=t,this.imageryProviderViewModels=i.slice(0),this.terrainProviderViewModels=n.slice(0),this.dropDownVisible=!1,ce$1.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);var r=ce$1.getObservable(this,"imageryProviderViewModels"),o=ce$1.pureComputed((function(){var e,t=r(),i={};for(e=0;e<t.length;e++){var n=t[e],o=n.category;e$2e(i[o])?i[o].push(n):i[o]=[n]}var a=Object.keys(i),s=[];for(e=0;e<a.length;e++){var l=a[e];s.push({name:l,providers:i[l]})}return s}));this._imageryProviders=o;var a=ce$1.getObservable(this,"terrainProviderViewModels"),s=ce$1.pureComputed((function(){var e,t=a(),i={};for(e=0;e<t.length;e++){var n=t[e],r=n.category;e$2e(i[r])?i[r].push(n):i[r]=[n]}var o=Object.keys(i),s=[];for(e=0;e<o.length;e++){var l=o[e];s.push({name:l,providers:i[l]})}return s}));this._terrainProviders=s,this.buttonTooltip=void 0,ce$1.defineProperty(this,"buttonTooltip",(function(){var e=this.selectedImagery,t=this.selectedTerrain,i=e$2e(e)?e.name:void 0,n=e$2e(t)?t.name:void 0;return e$2e(i)&&e$2e(n)?i+"\n"+n:e$2e(i)?i:n})),this.buttonImageUrl=void 0,ce$1.defineProperty(this,"buttonImageUrl",(function(){var e=this.selectedImagery;if(e$2e(e))return e.iconUrl})),this.selectedImagery=void 0;var l=ce$1.observable();this._currentImageryProviders=[],ce$1.defineProperty(this,"selectedImagery",{get:function(){return l()},set:function(e){if(l()!==e){var t,i=this._currentImageryProviders,n=i.length,r=this._globe.imageryLayers,o=!1;for(t=0;t<n;t++)for(var a=r.length,s=0;s<a;s++){var u=r.get(s);if(u.imageryProvider===i[t]){r.remove(u),o=!0;break}}if(e$2e(e)){var c=e.creationCommand();if(Array.isArray(c)){for(t=c.length-1;t>=0;t--)r.addImageryProvider(c[t],0);this._currentImageryProviders=c.slice(0)}else if(this._currentImageryProviders=[c],o)r.addImageryProvider(c,0);else{var h=r.get(0);e$2e(h)&&r.remove(h),r.addImageryProvider(c,0)}}l(e),this.dropDownVisible=!1}else this.dropDownVisible=!1}}),this.selectedTerrain=void 0;var u=ce$1.observable();ce$1.defineProperty(this,"selectedTerrain",{get:function(){return u()},set:function(e){var t;u()!==e?(e$2e(e)&&(t=e.creationCommand()),this._globe.depthTestAgainstTerrain=!(t instanceof t$z),this._globe.terrainProvider=t,u(e),this.dropDownVisible=!1):this.dropDownVisible=!1}});var c=this;this._toggleDropDown=s$4((function(){c.dropDownVisible=!c.dropDownVisible})),this.selectedImagery=u$Z(e.selectedImageryProviderViewModel,i[0]),this.selectedTerrain=u$Z(e.selectedTerrainProviderViewModel,n[0])}function g$3(e,t){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e);var i=new V(t),n=document.createElement("button");n.type="button",n.className="supermap3d-button supermap3d-toolbar-button",n.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(n);var r=document.createElement("img");r.setAttribute("draggable","false"),r.className="supermap3d-baseLayerPicker-selected",r.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),n.appendChild(r);var o=document.createElement("div");o.className="supermap3d-baseLayerPicker-dropDown",o.setAttribute("data-bind",'css: { "supermap3d-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(o);var a=document.createElement("div");a.className="supermap3d-baseLayerPicker-sectionTitle",a.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),a.innerHTML="Imagery",o.appendChild(a);var s=document.createElement("div");s.className="supermap3d-baseLayerPicker-section",s.setAttribute("data-bind","foreach: _imageryProviders"),o.appendChild(s);var l=document.createElement("div");l.className="supermap3d-baseLayerPicker-category",s.appendChild(l);var u=document.createElement("div");u.className="supermap3d-baseLayerPicker-categoryTitle",u.setAttribute("data-bind","text: name"),l.appendChild(u);var c=document.createElement("div");c.className="supermap3d-baseLayerPicker-choices",c.setAttribute("data-bind","foreach: providers"),l.appendChild(c);var h=document.createElement("div");h.className="supermap3d-baseLayerPicker-item",h.setAttribute("data-bind",'css: { "supermap3d-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),c.appendChild(h);var d=document.createElement("img");d.className="supermap3d-baseLayerPicker-itemIcon",d.setAttribute("data-bind","attr: { src: iconUrl }"),d.setAttribute("draggable","false"),h.appendChild(d);var f=document.createElement("div");f.className="supermap3d-baseLayerPicker-itemLabel",f.setAttribute("data-bind","text: name"),h.appendChild(f);var p=document.createElement("div");p.className="supermap3d-baseLayerPicker-sectionTitle",p.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),p.innerHTML="Terrain",o.appendChild(p);var _=document.createElement("div");_.className="supermap3d-baseLayerPicker-section",_.setAttribute("data-bind","foreach: _terrainProviders"),o.appendChild(_);var m=document.createElement("div");m.className="supermap3d-baseLayerPicker-category",_.appendChild(m);var g=document.createElement("div");g.className="supermap3d-baseLayerPicker-categoryTitle",g.setAttribute("data-bind","text: name"),m.appendChild(g);var x=document.createElement("div");x.className="supermap3d-baseLayerPicker-choices",x.setAttribute("data-bind","foreach: providers"),m.appendChild(x);var y=document.createElement("div");y.className="supermap3d-baseLayerPicker-item",y.setAttribute("data-bind",'css: { "supermap3d-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),x.appendChild(y);var v=document.createElement("img");v.className="supermap3d-baseLayerPicker-itemIcon",v.setAttribute("data-bind","attr: { src: iconUrl }"),v.setAttribute("draggable","false"),y.appendChild(v);var $=document.createElement("div");$.className="supermap3d-baseLayerPicker-itemLabel",$.setAttribute("data-bind","text: name"),y.appendChild($),ce$1.applyBindings(i,n),ce$1.applyBindings(i,o),this._viewModel=i,this._container=e,this._element=n,this._dropPanel=o,this._closeDropDown=function(e){n.contains(e.target)||o.contains(e.target)||(i.dropDownVisible=!1)},s$Z.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function i$5(e){if(!e$2e(e.name))throw new t$15("options.name is required.");if(!e$2e(e.tooltip))throw new t$15("options.tooltip is required.");if(!e$2e(e.iconUrl))throw new t$15("options.iconUrl is required.");if("function"!=typeof e.creationFunction)throw new t$15("options.creationFunction is required.");var t=e.creationFunction;e$2e(t.canExecute)||(t=s$4(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=u$Z(e.category,""),ce$1.track(this,["name","tooltip","iconUrl"])}function m$4(){var e=[];return e.push(new i$5({name:"Bing Maps Aerial",iconUrl:n$17("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return o$k({style:n$e.AERIAL})}})),e.push(new i$5({name:"Bing Maps Aerial with Labels",iconUrl:n$17("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return o$k({style:n$e.AERIAL_WITH_LABELS})}})),e.push(new i$5({name:"Bing Maps Roads",iconUrl:n$17("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return o$k({style:n$e.ROAD})}})),e.push(new i$5({name:"Mapbox Satellite",tooltip:"Mapbox satellite imagery ",iconUrl:n$17("Widgets/Images/ImageryProviders/mapboxSatellite.png"),category:"Other",creationFunction:function(){return new m$h({mapId:"mapbox.satellite"})}})),e.push(new i$5({name:"Mapbox Streets",tooltip:"Mapbox streets imagery",iconUrl:n$17("Widgets/Images/ImageryProviders/mapboxTerrain.png"),category:"Other",creationFunction:function(){return new m$h({mapId:"mapbox.streets"})}})),e.push(new i$5({name:"Mapbox Streets Classic",tooltip:"Mapbox streets basic imagery",iconUrl:n$17("Widgets/Images/ImageryProviders/mapboxStreets.png"),category:"Other",creationFunction:function(){return new m$h({mapId:"mapbox.streets-basic"})}})),e.push(new i$5({name:"ESRI World Imagery",iconUrl:n$17("Widgets/Images/ImageryProviders/esriWorldImagery.png"),tooltip:"World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. The map includes NASA Blue Marble: Next Generation 500m resolution imagery at small scales (above 1:1,000,000), i-cubed 15m eSAT imagery at medium-to-large scales (down to 1:70,000) for the world, and USGS 15m Landsat imagery for Antarctica. The map features 0.3m resolution imagery in the continental United States and 0.6m resolution imagery in parts of Western Europe from DigitalGlobe. In other parts of the world, 1 meter resolution imagery is available from GeoEye IKONOS, i-cubed Nationwide Prime, Getmapping, AeroGRID, IGN Spain, and IGP Portugal. Additionally, imagery at different resolutions has been contributed by the GIS User Community.\n",category:"Other",creationFunction:function(){return new b$q({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",enablePickFeatures:!1})}})),e.push(new i$5({name:"ESRI World Street Map",iconUrl:n$17("Widgets/Images/ImageryProviders/esriWorldStreetMap.png"),tooltip:"This worldwide street map presents highway-level data for the world. Street-level data includes the United States; much of Canada; Japan; most countries in Europe; Australia and New Zealand; India; parts of South America including Argentina, Brazil, Chile, Colombia, and Venezuela; Ghana; and parts of southern Africa including Botswana, Lesotho, Namibia, South Africa, and Swaziland.\n",category:"Other",creationFunction:function(){return new b$q({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",enablePickFeatures:!1})}})),e.push(new i$5({name:"ESRI National Geographic",iconUrl:n$17("Widgets/Images/ImageryProviders/esriNationalGeographic.png"),tooltip:"This web map contains the National Geographic World Map service. This map service is designed to be used as a general reference map for informational and educational purposes as well as a basemap by GIS professionals and other users for creating web maps and web mapping applications.\n",category:"Other",creationFunction:function(){return new b$q({url:"https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/",enablePickFeatures:!1})}})),e.push(new i$5({name:"Open­Street­Map",iconUrl:n$17("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:"OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org",category:"Other",creationFunction:function(){return L$j({url:"https://a.tile.openstreetmap.org/"})}})),e.push(new i$5({name:"Stamen Watercolor",iconUrl:n$17("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:"Reminiscent of hand drawn maps, Stamen watercolor maps apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.\n",category:"Other",creationFunction:function(){return L$j({url:"https://stamen-tiles.a.ssl.fastly.net/watercolor/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new i$5({name:"Stamen Toner",iconUrl:n$17("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:"A high contrast black and white map.\n",category:"Other",creationFunction:function(){return L$j({url:"https://stamen-tiles.a.ssl.fastly.net/toner/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new i$5({name:"Sentinel-2",iconUrl:n$17("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"SuperMap3D ion",creationFunction:function(){return new o$l({assetId:3954})}})),e.push(new i$5({name:"Blue Marble",iconUrl:n$17("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"SuperMap3D ion",creationFunction:function(){return new o$l({assetId:3845})}})),e.push(new i$5({name:"Earth at night",iconUrl:n$17("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"SuperMap3D ion",creationFunction:function(){return new o$l({assetId:3812})}})),e.push(new i$5({name:"Natural Earth II",iconUrl:n$17("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\n",category:"SuperMap3D ion",creationFunction:function(){return te$8({url:n$17("Assets/Textures/NaturalEarthII")})}})),e}function n$3(){var e=[];return e.push(new i$5({name:"WGS84 Ellipsoid",iconUrl:n$17("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"SuperMap3D ion",creationFunction:function(){return new t$z}})),e.push(new i$5({name:"SuperMap3D World Terrain",iconUrl:n$17("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return u$G({requestWaterMask:!0,requestVertexNormals:!0})}})),e}function ne(e){return function(t){var i=e._scene.pick(t.position);e$2e(i)&&i.primitive instanceof p$u&&(e.tileset=i.primitive),e.pickActive=!1}}function Y$1(e,t){t?e._eventHandler.setInputAction((function(t){var i=e._scene.pick(t.endPosition);e$2e(i)&&i.primitive instanceof p$u&&(e.tileset=i.primitive)}),G$J.MOUSE_MOVE):(e._eventHandler.removeInputAction(G$J.MOUSE_MOVE),e.picking=e.picking)}m$5.defaultDateFormatter=function(e,t){var i=a$15.toGregorianDate(e);return F[i.month-1]+" "+i.day+" "+i.year},m$5.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800],m$5.defaultTimeFormatter=function(e,t){var i=a$15.toGregorianDate(e),n=Math.round(i.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?$$15("%02d:%02d:%02d.%03d",i.hour,i.minute,i.second,n):$$15("%02d:%02d:%02d UTC",i.hour,i.minute,i.second)},m$5.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)},m$5.prototype.setShuttleRingTicks=function(e){if(!e$2e(e))throw new t$15("positiveTicks is required.");var t,i,n,r={},o=this._sortedFilteredPositiveTicks;for(o.length=0,t=0,i=e.length;t<i;++t)n=e[t],r.hasOwnProperty(n)||(r[n]=!0,o.push(n));o.sort(R$1);var a=[];for(t=(i=o.length)-1;t>=0;--t)0!==(n=o[t])&&a.push(-n);Array.prototype.push.apply(a,o),this._allShuttleRingTicks=a},Object.defineProperties(m$5.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){if("function"!=typeof e)throw new t$15("dateFormatter must be a function");this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){if("function"!=typeof e)throw new t$15("timeFormatter must be a function");this._timeFormatter=e}}}),m$5._maxShuttleRingAngle=_$2,m$5._realtimeShuttleRingAngle=f$3,Object.defineProperties(V.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}}),Object.defineProperties(g$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),g$3.prototype.isDestroyed=function(){return!1},g$3.prototype.destroy=function(){return s$Z.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ce$1.cleanNode(this._element),ce$1.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),i$11(this)},Object.defineProperties(i$5.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var oe={maximumFractionDigits:3};function P$2(e){var t=e/1048576;return t<1?t.toLocaleString(void 0,oe):Math.round(t).toLocaleString()}function y$2(e,t){if(!e$2e(e))return"";var i=t?e._statisticsLastPick:e._statisticsLastRender,n='<ul class="supermap3d-cesiumInspector-statistics">';return n+="<li><strong>Visited: </strong>"+i.visited.toLocaleString()+"</li><li><strong>Selected: </strong>"+i.selected.toLocaleString()+"</li><li><strong>Commands: </strong>"+i.numberOfCommands.toLocaleString()+"</li>",n+="</ul>",t||(n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Requests: </strong>"+i.numberOfPendingRequests.toLocaleString()+"</li><li><strong>Attempted: </strong>"+i.numberOfAttemptedRequests.toLocaleString()+"</li><li><strong>Processing: </strong>"+i.numberOfTilesProcessing.toLocaleString()+"</li><li><strong>Content Ready: </strong>"+i.numberOfTilesWithContentReady.toLocaleString()+"</li><li><strong>Total: </strong>"+i.numberOfTilesTotal.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Features Selected: </strong>"+i.numberOfFeaturesSelected.toLocaleString()+"</li><li><strong>Features Loaded: </strong>"+i.numberOfFeaturesLoaded.toLocaleString()+"</li><li><strong>Points Selected: </strong>"+i.numberOfPointsSelected.toLocaleString()+"</li><li><strong>Points Loaded: </strong>"+i.numberOfPointsLoaded.toLocaleString()+"</li><li><strong>Triangles Selected: </strong>"+i.numberOfTrianglesSelected.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Tiles styled: </strong>"+i.numberOfTilesStyled.toLocaleString()+"</li><li><strong>Features styled: </strong>"+i.numberOfFeaturesStyled.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Children Union Culled: </strong>"+i.numberOfTilesCulledWithChildrenUnion.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Geometry Memory (MB): </strong>"+P$2(i.geometryByteLength)+"</li><li><strong>Texture Memory (MB): </strong>"+P$2(i.texturesByteLength)+"</li><li><strong>Batch Table Memory (MB): </strong>"+P$2(i.batchTableByteLength)+"</li>",n+="</ul>"),n}var le=[{text:"Highlight",value:L$I.HIGHLIGHT},{text:"Replace",value:L$I.REPLACE},{text:"Mix",value:L$I.MIX}],Z$2=new e$1X(1,1,0,.4),ce=new e$1X,v$2=new e$1X;function l$6(e,t){o$1q.typeOf.object("scene",e),o$1q.typeOf.object("performanceContainer",t);var i=this,n=e.canvas;this._eventHandler=new g$K(n),this._scene=e,this._performanceContainer=t,this._canvas=n,this._performanceDisplay=new o$d({container:t}),this._statisticsText="",this._pickStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this._tileset=void 0,this._feature=void 0,this._tile=void 0,ce$1.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_editorError","showPickStatistics","showStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile"]),this._properties=ce$1.observable({}),this.properties=[],ce$1.defineProperty(this,"properties",(function(){var e=[],t=i._properties();for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}));var r=ce$1.observable();ce$1.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return r()},set:function(e){r(e),e$2e(i._tileset)&&(i._tileset.dynamicScreenSpaceError=e)}}),this.dynamicScreenSpaceError=!1;var o=ce$1.observable();ce$1.defineProperty(this,"colorBlendMode",{get:function(){return o()},set:function(e){o(e),e$2e(i._tileset)&&(i._tileset.colorBlendMode=e,i._scene.requestRender())}}),this.colorBlendMode=L$I.HIGHLIGHT;var a=ce$1.observable();ce$1.defineProperty(this,"picking",{get:function(){return a()},set:function(t){a(t),t?i._eventHandler.setInputAction((function(t){var n=e.pick(t.endPosition);if(n instanceof e$M?(i.feature=n,i.tile=n.content.tile):e$2e(n)&&e$2e(n.content)?(i.feature=void 0,i.tile=n.content.tile):(i.feature=void 0,i.tile=void 0),e$2e(i._tileset)){var r;if(f&&e$2e(n)&&e$2e(n.content))e.pickPositionSupported&&(e$2e(r=e.pickPosition(t.endPosition))&&(i._tileset.debugPickPosition=r)),i._tileset.debugPickedTile=n.content.tile;else i._tileset.debugPickedTile=void 0;i._scene.requestRender()}}),G$J.MOUSE_MOVE):(i.feature=void 0,i.tile=void 0,i._eventHandler.removeInputAction(G$J.MOUSE_MOVE))}}),this.picking=!0;var s=ce$1.observable();ce$1.defineProperty(this,"colorize",{get:function(){return s()},set:function(e){s(e),e$2e(i._tileset)&&(i._tileset.debugColorizeTiles=e,i._scene.requestRender())}}),this.colorize=!1;var l=ce$1.observable();ce$1.defineProperty(this,"wireframe",{get:function(){return l()},set:function(e){l(e),e$2e(i._tileset)&&(i._tileset.debugWireframe=e,i._scene.requestRender())}}),this.wireframe=!1;var u=ce$1.observable();ce$1.defineProperty(this,"showBoundingVolumes",{get:function(){return u()},set:function(e){u(e),e$2e(i._tileset)&&(i._tileset.debugShowBoundingVolume=e,i._scene.requestRender())}}),this.showBoundingVolumes=!1;var c=ce$1.observable();ce$1.defineProperty(this,"showContentBoundingVolumes",{get:function(){return c()},set:function(e){c(e),e$2e(i._tileset)&&(i._tileset.debugShowContentBoundingVolume=e,i._scene.requestRender())}}),this.showContentBoundingVolumes=!1;var h=ce$1.observable();ce$1.defineProperty(this,"showRequestVolumes",{get:function(){return h()},set:function(e){h(e),e$2e(i._tileset)&&(i._tileset.debugShowViewerRequestVolume=e,i._scene.requestRender())}}),this.showRequestVolumes=!1;var d=ce$1.observable();ce$1.defineProperty(this,"freezeFrame",{get:function(){return d()},set:function(e){d(e),e$2e(i._tileset)&&(i._tileset.debugFreezeFrame=e,i._scene.debugShowFrustumPlanes=e,i._scene.requestRender())}}),this.freezeFrame=!1;var f=ce$1.observable();ce$1.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return f()},set:function(e){f(e),e$2e(i._tileset)&&(i._tileset.debugPickedTileLabelOnly=e,i._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;var p=ce$1.observable();ce$1.defineProperty(this,"showGeometricError",{get:function(){return p()},set:function(e){p(e),e$2e(i._tileset)&&(i._tileset.debugShowGeometricError=e,i._scene.requestRender())}}),this.showGeometricError=!1;var _=ce$1.observable();ce$1.defineProperty(this,"showRenderingStatistics",{get:function(){return _()},set:function(e){_(e),e$2e(i._tileset)&&(i._tileset.debugShowRenderingStatistics=e,i._scene.requestRender())}}),this.showRenderingStatistics=!1;var m=ce$1.observable();ce$1.defineProperty(this,"showMemoryUsage",{get:function(){return m()},set:function(e){m(e),e$2e(i._tileset)&&(i._tileset.debugShowMemoryUsage=e,i._scene.requestRender())}}),this.showMemoryUsage=!1;var g=ce$1.observable();ce$1.defineProperty(this,"showUrl",{get:function(){return g()},set:function(e){g(e),e$2e(i._tileset)&&(i._tileset.debugShowUrl=e,i._scene.requestRender())}}),this.showUrl=!1;var x=ce$1.observable();ce$1.defineProperty(this,"maximumScreenSpaceError",{get:function(){return x()},set:function(e){e=Number(e),isNaN(e)||(x(e),e$2e(i._tileset)&&(i._tileset.maximumScreenSpaceError=e))}}),this.maximumScreenSpaceError=16;var y=ce$1.observable();ce$1.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return y()},set:function(e){e=Number(e),isNaN(e)||(y(e),e$2e(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorDensity=e))}}),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,ce$1.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(y(),1/6)},set:function(e){y(Math.pow(e,6))}});var v=ce$1.observable();ce$1.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return v()},set:function(e){e=Number(e),isNaN(e)||(v(e),e$2e(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorFactor=e))}}),this.dynamicScreenSpaceErrorFactor=4;var $=ne(this),b=ce$1.observable();ce$1.defineProperty(this,"pickActive",{get:function(){return b()},set:function(e){b(e),e?i._eventHandler.setInputAction($,G$J.LEFT_CLICK):i._eventHandler.removeInputAction(G$J.LEFT_CLICK)}});var T=ce$1.observable();ce$1.defineProperty(this,"pointCloudShading",{get:function(){return T()},set:function(e){T(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.attenuation=e)}}),this.pointCloudShading=!1;var C=ce$1.observable();ce$1.defineProperty(this,"geometricErrorScale",{get:function(){return C()},set:function(e){e=Number(e),isNaN(e)||(C(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.geometricErrorScale=e))}}),this.geometricErrorScale=1;var S=ce$1.observable();ce$1.defineProperty(this,"maximumAttenuation",{get:function(){return S()},set:function(e){e=Number(e),isNaN(e)||(S(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.maximumAttenuation=0===e?void 0:e))}}),this.maximumAttenuation=0;var w=ce$1.observable();ce$1.defineProperty(this,"baseResolution",{get:function(){return w()},set:function(e){e=Number(e),isNaN(e)||(w(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.baseResolution=0===e?void 0:e))}}),this.baseResolution=0;var E=ce$1.observable();ce$1.defineProperty(this,"eyeDomeLighting",{get:function(){return E()},set:function(e){E(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLighting=e)}}),this.eyeDomeLighting=!1;var P=ce$1.observable();ce$1.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return P()},set:function(e){e=Number(e),isNaN(e)||(P(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingStrength=e))}}),this.eyeDomeLightingStrength=1;var A=ce$1.observable();ce$1.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return A()},set:function(e){e=Number(e),isNaN(e)||(A(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingRadius=e))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;var L=ce$1.observable();ce$1.defineProperty(this,"skipLevelOfDetail",{get:function(){return L()},set:function(e){L(e),e$2e(i._tileset)&&(i._tileset.skipLevelOfDetail=e)}}),this.skipLevelOfDetail=!0;var M=ce$1.observable();ce$1.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return M()},set:function(e){e=Number(e),isNaN(e)||(M(e),e$2e(i._tileset)&&(i._tileset.skipScreenSpaceErrorFactor=e))}}),this.skipScreenSpaceErrorFactor=16;var R=ce$1.observable();ce$1.defineProperty(this,"baseScreenSpaceError",{get:function(){return R()},set:function(e){e=Number(e),isNaN(e)||(R(e),e$2e(i._tileset)&&(i._tileset.baseScreenSpaceError=e))}}),this.baseScreenSpaceError=1024;var O=ce$1.observable();ce$1.defineProperty(this,"skipLevels",{get:function(){return O()},set:function(e){e=Number(e),isNaN(e)||(O(e),e$2e(i._tileset)&&(i._tileset.skipLevels=e))}}),this.skipLevels=1;var D=ce$1.observable();ce$1.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return D()},set:function(e){D(e),e$2e(i._tileset)&&(i._tileset.immediatelyLoadDesiredLevelOfDetail=e)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;var I=ce$1.observable();ce$1.defineProperty(this,"loadSiblings",{get:function(){return I()},set:function(e){I(e),e$2e(i._tileset)&&(i._tileset.loadSiblings=e)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()})),e$2e(this._tileset)||Y$1(this,!0)}function k$1(e){if(e.featuresLength>0)return!0;var t=e.innerContents;if(e$2e(t)){for(var i=t.length,n=0;n<i;++n)if(!k$1(t[n]))return!1;return!0}return!1}function y$1(e,t){o$1q.defined("container",e),o$1q.typeOf.object("scene",t),e=i$c(e);var i=document.createElement("div"),n=document.createElement("div");n.setAttribute("data-bind","visible: performance");var r=new l$6(t,n);this._viewModel=r,this._container=e,this._element=i;var o=document.createElement("div");o.textContent="3D Tiles Inspector",o.className="supermap3d-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),i.appendChild(o),i.className="supermap3d-cesiumInspector supermap3d-3DTilesInspector",i.setAttribute("data-bind",'css: { "supermap3d-cesiumInspector-visible" : inspectorVisible, "supermap3d-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(i);var a=document.createElement("div");this._panel=a,a.className="supermap3d-cesiumInspector-dropDown",i.appendChild(a);var s=o$4.createSection,l=o$4.createCheckbox,u=s(a,"Tileset","tilesetVisible","toggleTileset"),c=s(a,"Display","displayVisible","toggleDisplay"),h=s(a,"Update","updateVisible","toggleUpdate"),d=s(a,"Logging","loggingVisible","toggleLogging"),f=s(a,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),p=s(a,"Style","styleVisible","toggleStyle"),_=s(a,"Optimization","optimizationVisible","toggleOptimization"),m=document.createElement("div");m.className="field-group";var g=document.createElement("label");g.className="field-label",g.appendChild(document.createTextNode("Properties: "));var x=document.createElement("div");x.setAttribute("data-bind","text: properties"),m.appendChild(g),m.appendChild(x),u.appendChild(m),u.appendChild(L$4("togglePickTileset","Pick Tileset","pickActive")),u.appendChild(L$4("trimTilesCache","Trim Tiles Cache")),u.appendChild(l("Enable Picking","picking")),c.appendChild(l("Colorize","colorize")),c.appendChild(l("Wireframe","wireframe")),c.appendChild(l("Bounding Volumes","showBoundingVolumes")),c.appendChild(l("Content Volumes","showContentBoundingVolumes")),c.appendChild(l("Request Volumes","showRequestVolumes")),c.appendChild(l("Point Cloud Shading","pointCloudShading"));var y=document.createElement("div");y.setAttribute("data-bind","visible: pointCloudShading"),y.appendChild(r$7("geometricErrorScale",0,2,.01,"Geometric Error Scale")),y.appendChild(r$7("maximumAttenuation",0,32,1,"Maximum Attenuation")),y.appendChild(r$7("baseResolution",0,1,.01,"Base Resolution")),y.appendChild(l("Eye Dome Lighting (EDL)","eyeDomeLighting")),c.appendChild(y);var v=document.createElement("div");v.setAttribute("data-bind","visible: eyeDomeLighting"),v.appendChild(r$7("eyeDomeLightingStrength",0,2,.1,"EDL Strength")),v.appendChild(r$7("eyeDomeLightingRadius",0,4,.1,"EDL Radius")),y.appendChild(v),h.appendChild(l("Freeze Frame","freezeFrame")),h.appendChild(l("Dynamic Screen Space Error","dynamicScreenSpaceError"));var $=document.createElement("div");$.appendChild(r$7("maximumScreenSpaceError",0,128,1,"Maximum Screen Space Error")),h.appendChild($);var b=document.createElement("div");b.setAttribute("data-bind","visible: dynamicScreenSpaceError"),b.appendChild(r$7("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"Screen Space Error Density","dynamicScreenSpaceErrorDensity")),b.appendChild(r$7("dynamicScreenSpaceErrorFactor",1,10,.1,"Screen Space Error Factor")),h.appendChild(b),d.appendChild(l("Performance","performance")),d.appendChild(n),d.appendChild(l("Statistics","showStatistics"));var T=document.createElement("div");T.className="supermap3d-3dTilesInspector-statistics",T.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),d.appendChild(T),d.appendChild(l("Pick Statistics","showPickStatistics"));var C=document.createElement("div");C.className="supermap3d-3dTilesInspector-statistics",C.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),d.appendChild(C);var S=document.createElement("div");p.appendChild(S),S.appendChild(document.createTextNode("Color Blend Mode: "));var w=document.createElement("select");w.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),S.appendChild(w);var E=document.createElement("textarea");E.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),S.className="supermap3d-cesiumInspector-styleEditor",S.appendChild(E);var P=L$4("compileStyle","Compile (Ctrl+Enter)");S.appendChild(P);var A=document.createElement("div");A.className="supermap3d-cesiumInspector-error",A.setAttribute("data-bind","text: editorError"),S.appendChild(A),f.appendChild(l("Show Picked Only","showOnlyPickedTileDebugLabel")),f.appendChild(l("Geometric Error","showGeometricError")),f.appendChild(l("Rendering Statistics","showRenderingStatistics")),f.appendChild(l("Memory Usage (MB)","showMemoryUsage")),f.appendChild(l("Url","showUrl")),_.appendChild(l("Skip Tile LODs","skipLevelOfDetail"));var L=document.createElement("div");L.appendChild(r$7("skipScreenSpaceErrorFactor",1,50,1,"Skip SSE Factor")),_.appendChild(L);var M=document.createElement("div");M.appendChild(r$7("baseScreenSpaceError",0,4096,1,"SSE before skipping LOD")),_.appendChild(M);var R=document.createElement("div");R.appendChild(r$7("skipLevels",0,10,1,"Min. levels to skip")),_.appendChild(R),_.appendChild(l("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),_.appendChild(l("Load siblings of visible tiles","loadSiblings")),ce$1.applyBindings(r,i)}function r$7(e,t,i,n,r,o){o=u$Z(o,e);var a=document.createElement("input");a.setAttribute("data-bind","value: "+o),a.type="number";var s=document.createElement("input");s.type="range",s.min=t,s.max=i,s.step=n,s.setAttribute("data-bind",'valueUpdate: "input", value: '+e);var l=document.createElement("div");l.appendChild(s);var u=document.createElement("div");return u.className="supermap3d-cesiumInspector-slider",u.appendChild(document.createTextNode(r)),u.appendChild(a),u.appendChild(l),u}function L$4(e,t,i){var n=document.createElement("button");n.type="button",n.textContent=t,n.className="supermap3d-cesiumInspector-pickButton";var r="click: "+e;return e$2e(i)&&(r+=', css: {"supermap3d-cesiumInspector-pickButtonHighlight" : '+i+"}"),n.setAttribute("data-bind",r),n}function M$1(e){var t;if(e$2e(e)){t="Command Statistics";var i=e.commandsInFrustums;for(var n in i)if(i.hasOwnProperty(n)){var r,o=parseInt(n,10);if(7===o)r="1, 2 and 3";else{for(var a=[],s=2;s>=0;s--){var l=Math.pow(2,s);o>=l&&(a.push(s+1),o-=l)}r=a.reverse().join(" and ")}t+="<br>    "+i[n]+" in frustum "+r}t+="<br>Total: "+e.totalCommands}return t}function g$2(e,t,i){var n=Math.min(i,t);return n=Math.max(n,e)}function m$3(e,t){if(!e$2e(e))throw new t$15("scene is required");if(!e$2e(t))throw new t$15("performanceContainer is required");var i=this,n=e.canvas,r=new g$K(n);this._eventHandler=r,this._scene=e,this._canvas=n,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;var o,a=this._scene.globe;function s(e){var t=i._scene.pick({x:e.position.x,y:e.position.y});e$2e(t)&&(i.primitive=e$2e(t.collection)?t.collection:t.primitive),i._scene.requestRender(),i.pickPrimitiveActive=!1}function l(e){var t,n=a.ellipsoid,r=i._scene.camera.pickEllipsoid({x:e.position.x,y:e.position.y},n);if(e$2e(r))for(var o=n.cartesianToCartographic(r),s=a._surface.tileProvider._tilesToRenderByTextureCount,l=0;!t&&l<s.length;++l){var u=s[l];if(e$2e(u))for(var c=0;!t&&c<u.length;++c){var h=u[c];h$18.contains(h.rectangle,o)&&(t=h)}}i.tile=t,i.pickTileActive=!1}a.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.globeDepth=!1,this.pickDepth=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",ce$1.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","globeDepth","pickDepth","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=s$4((function(){i.dropDownVisible=!i.dropDownVisible})),this._toggleGeneral=s$4((function(){i.generalVisible=!i.generalVisible})),this._togglePrimitives=s$4((function(){i.primitivesVisible=!i.primitivesVisible})),this._toggleTerrain=s$4((function(){i.terrainVisible=!i.terrainVisible})),this._frustumsSubscription=ce$1.getObservable(this,"frustums").subscribe((function(e){i._scene.debugShowFrustums=e,i._scene.requestRender()})),this._frustumPlanesSubscription=ce$1.getObservable(this,"frustumPlanes").subscribe((function(e){i._scene.debugShowFrustumPlanes=e,i._scene.requestRender()})),this._performanceSubscription=ce$1.getObservable(this,"performance").subscribe((function(e){e?i._performanceDisplay=new o$d({container:i._performanceContainer}):i._performanceContainer.innerHTML=""})),this._showPrimitiveBoundingSphere=s$4((function(){return i._primitive.debugShowBoundingVolume=i.primitiveBoundingSphere,i._scene.requestRender(),!0})),this._primitiveBoundingSphereSubscription=ce$1.getObservable(this,"primitiveBoundingSphere").subscribe((function(){i._showPrimitiveBoundingSphere()})),this._showPrimitiveReferenceFrame=s$4((function(){if(i.primitiveReferenceFrame){var e=i._primitive.modelMatrix;i._modelMatrixPrimitive=new s$d({modelMatrix:e}),i._scene.primitives.add(i._modelMatrixPrimitive)}else e$2e(i._modelMatrixPrimitive)&&(i._scene.primitives.remove(i._modelMatrixPrimitive),i._modelMatrixPrimitive=void 0);return i._scene.requestRender(),!0})),this._primitiveReferenceFrameSubscription=ce$1.getObservable(this,"primitiveReferenceFrame").subscribe((function(){i._showPrimitiveReferenceFrame()})),this._doFilterPrimitive=s$4((function(){return i.filterPrimitive?i._scene.debugCommandFilter=function(e){return!(!e$2e(i._modelMatrixPrimitive)||e.owner!==i._modelMatrixPrimitive._primitive)||!!e$2e(i._primitive)&&(e.owner===i._primitive||e.owner===i._primitive._billboardCollection||e.owner.primitive===i._primitive)}:i._scene.debugCommandFilter=void 0,!0})),this._filterPrimitiveSubscription=ce$1.getObservable(this,"filterPrimitive").subscribe((function(){i._doFilterPrimitive(),i._scene.requestRender()})),this._wireframeSubscription=ce$1.getObservable(this,"wireframe").subscribe((function(e){a._surface.tileProvider._debug.wireframe=e,i._scene.requestRender()})),this._globeDepthSubscription=ce$1.getObservable(this,"globeDepth").subscribe((function(e){i._scene.debugShowGlobeDepth=e,i._scene.requestRender()})),this._pickDepthSubscription=ce$1.getObservable(this,"pickDepth").subscribe((function(e){i._scene.debugShowPickDepth=e,i._scene.requestRender()})),this._depthFrustumSubscription=ce$1.getObservable(this,"depthFrustum").subscribe((function(e){i._scene.debugShowDepthFrustum=e,i._scene.requestRender()})),this._incrementDepthFrustum=s$4((function(){var e=i.depthFrustum+1;return i.depthFrustum=g$2(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._decrementDepthFrustum=s$4((function(){var e=i.depthFrustum-1;return i.depthFrustum=g$2(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._suspendUpdatesSubscription=ce$1.getObservable(this,"suspendUpdates").subscribe((function(e){a._surface._debug.suspendLodUpdate=e,e||(i.filterTile=!1)})),this._showTileCoordinates=s$4((function(){return i.tileCoordinates&&!e$2e(o)?o=e.imageryLayers.addImageryProvider(new n$4({tilingScheme:e.terrainProvider.tilingScheme})):!i.tileCoordinates&&e$2e(o)&&(e.imageryLayers.remove(o),o=void 0),!0})),this._tileCoordinatesSubscription=ce$1.getObservable(this,"tileCoordinates").subscribe((function(){i._showTileCoordinates(),i._scene.requestRender()})),this._tileBoundingSphereSubscription=ce$1.getObservable(this,"tileBoundingSphere").subscribe((function(){i._showTileBoundingSphere(),i._scene.requestRender()})),this._showTileBoundingSphere=s$4((function(){return i.tileBoundingSphere?a._surface.tileProvider._debug.boundingSphereTile=i._tile:a._surface.tileProvider._debug.boundingSphereTile=void 0,i._scene.requestRender(),!0})),this._doFilterTile=s$4((function(){return i.filterTile?(i.suspendUpdates=!0,a._surface._tilesToRender=[],e$2e(i._tile)&&i._tile.renderable&&a._surface._tilesToRender.push(i._tile)):i.suspendUpdates=!1,!0})),this._filterTileSubscription=ce$1.getObservable(this,"filterTile").subscribe((function(){i.doFilterTile(),i._scene.requestRender()})),this._pickPrimitive=s$4((function(){i.pickPrimitiveActive=!i.pickPrimitiveActive})),this._pickPrimitiveActiveSubscription=ce$1.getObservable(this,"pickPrimitiveActive").subscribe((function(e){e?r.setInputAction(s,G$J.LEFT_CLICK):r.removeInputAction(G$J.LEFT_CLICK)})),this._pickTile=s$4((function(){i.pickTileActive=!i.pickTileActive})),this._pickTileActiveSubscription=ce$1.getObservable(this,"pickTileActive").subscribe((function(e){e?r.setInputAction(l,G$J.LEFT_CLICK):r.removeInputAction(G$J.LEFT_CLICK)})),this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()}))}function g$1(e,t){if(!e$2e(e))throw new t$15("container is required.");if(!e$2e(t))throw new t$15("scene is required.");e=i$c(e);var i=document.createElement("div"),n=new m$3(t,i);this._viewModel=n,this._container=e;var r=document.createElement("div");this._element=r;var o=document.createElement("div");o.textContent="SuperMap3D Inspector",o.className="supermap3d-cesiumInspector-button",o.setAttribute("data-bind","click: toggleDropDown"),r.appendChild(o),r.className="supermap3d-cesiumInspector",r.setAttribute("data-bind",'css: { "supermap3d-cesiumInspector-visible" : dropDownVisible, "supermap3d-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);var a=document.createElement("div");this._panel=a,a.className="supermap3d-cesiumInspector-dropDown",r.appendChild(a);var s=o$4.createSection,l=o$4.createCheckbox,u=s(a,"General","generalVisible","toggleGeneral"),c=l("Show Frustums","frustums"),h=document.createElement("div");h.className="supermap3d-cesiumInspector-frustumStatistics",h.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),c.appendChild(h),u.appendChild(c),u.appendChild(l("Show Frustum Planes","frustumPlanes")),u.appendChild(l("Performance Display","performance")),i.className="supermap3d-cesiumInspector-performanceDisplay",u.appendChild(i);var d=document.createElement("div");d.className="supermap3d-cesiumInspector-shaderCache",d.setAttribute("data-bind","html: shaderCacheText"),u.appendChild(d);var f=document.createElement("div");u.appendChild(f);var p=document.createElement("span");p.setAttribute("data-bind",'html: "     Frustum:"'),f.appendChild(p);var _=document.createElement("span");_.setAttribute("data-bind","text: depthFrustumText"),f.appendChild(_);var m=document.createElement("input");m.type="button",m.value="-",m.className="supermap3d-cesiumInspector-pickButton",m.setAttribute("data-bind","click: decrementDepthFrustum"),f.appendChild(m);var g=document.createElement("input");g.type="button",g.value="+",g.className="supermap3d-cesiumInspector-pickButton",g.setAttribute("data-bind","click: incrementDepthFrustum"),f.appendChild(g);var x=s(a,"Primitives","primitivesVisible","togglePrimitives"),y=document.createElement("div");y.className="supermap3d-cesiumInspector-pickSection",x.appendChild(y);var v=document.createElement("input");v.type="button",v.value="Pick a primitive",v.className="supermap3d-cesiumInspector-pickButton",v.setAttribute("data-bind",'css: {"supermap3d-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');var $=document.createElement("div");$.className="supermap3d-cesiumInspector-center",$.appendChild(v),y.appendChild($),y.appendChild(l("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),y.appendChild(l("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=l("Show only selected","filterPrimitive","hasPickedPrimitive"),y.appendChild(this._primitiveOnly);var b=s(a,"Terrain","terrainVisible","toggleTerrain"),T=document.createElement("div");T.className="supermap3d-cesiumInspector-pickSection",b.appendChild(T);var C=document.createElement("input");C.type="button",C.value="Pick a tile",C.className="supermap3d-cesiumInspector-pickButton",C.setAttribute("data-bind",'css: {"supermap3d-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),($=document.createElement("div")).appendChild(C),$.className="supermap3d-cesiumInspector-center",T.appendChild($);var S=document.createElement("div");T.appendChild(S);var w=document.createElement("input");w.type="button",w.value="Parent",w.className="supermap3d-cesiumInspector-pickButton",w.setAttribute("data-bind","click: selectParent");var E=document.createElement("input");E.type="button",E.value="NW",E.className="supermap3d-cesiumInspector-pickButton",E.setAttribute("data-bind","click: selectNW");var P=document.createElement("input");P.type="button",P.value="NE",P.className="supermap3d-cesiumInspector-pickButton",P.setAttribute("data-bind","click: selectNE");var A=document.createElement("input");A.type="button",A.value="SW",A.className="supermap3d-cesiumInspector-pickButton",A.setAttribute("data-bind","click: selectSW");var L=document.createElement("input");L.type="button",L.value="SE",L.className="supermap3d-cesiumInspector-pickButton",L.setAttribute("data-bind","click: selectSE");var M=document.createElement("div");M.className="supermap3d-cesiumInspector-tileText",S.className="supermap3d-cesiumInspector-frustumStatistics",S.appendChild(M),S.setAttribute("data-bind","visible: hasPickedTile"),M.setAttribute("data-bind","html: tileText");var R=document.createElement("div");R.className="supermap3d-cesiumInspector-relativeText",R.textContent="Select relative:",S.appendChild(R);var O=document.createElement("table"),D=document.createElement("tr"),I=document.createElement("tr"),F=document.createElement("td");F.appendChild(w);var B=document.createElement("td");B.appendChild(E);var N=document.createElement("td");N.appendChild(P),D.appendChild(F),D.appendChild(B),D.appendChild(N);var G=document.createElement("td"),z=document.createElement("td");z.appendChild(A);var U=document.createElement("td");U.appendChild(L),I.appendChild(G),I.appendChild(z),I.appendChild(U),O.appendChild(D),O.appendChild(I),S.appendChild(O),T.appendChild(l("Show bounding volume","tileBoundingSphere","hasPickedTile")),T.appendChild(l("Show only selected","filterTile","hasPickedTile")),b.appendChild(l("Wireframe","wireframe")),b.appendChild(l("Suspend LOD update","suspendUpdates")),b.appendChild(l("Show tile coordinates","tileCoordinates")),ce$1.applyBindings(n,this._element)}function r$6(e){var t=this,i=ce$1.observable(l$1e.fullscreen),n=ce$1.observable(l$1e.enabled);this.isFullscreen=void 0,ce$1.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,ce$1.defineProperty(this,"isFullscreenEnabled",{get:function(){return n()},set:function(e){n(e&&l$1e.enabled)}}),this.tooltip=void 0,ce$1.defineProperty(this,"tooltip",(function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"})),this._command=s$4((function(){l$1e.fullscreen?l$1e.exitFullscreen():l$1e.requestFullscreen(t._fullscreenElement)}),ce$1.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=u$Z(i$c(e),document.body),this._callback=function(){i(l$1e.fullscreen)},document.addEventListener(l$1e.changeEventName,this._callback)}Object.defineProperties(l$6.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},colorBlendModes:{get:function(){return le}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,e$2e(e)){var t=this;e.readyPromise.then((function(e){t.isDestroyed()||t._properties(e.properties)}));for(var i=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],n=i.length,r=0;r<n;++r){var o=i[r];this[o]=this[o]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings;var a=e.pointCloudShading;this.pointCloudShading=a.attenuation,this.geometricErrorScale=a.geometricErrorScale,this.maximumAttenuation=a.maximumAttenuation?a.maximumAttenuation:0,this.baseResolution=a.baseResolution?a.baseResolution:0,this.eyeDomeLighting=a.eyeDomeLighting,this.eyeDomeLightingStrength=a.eyeDomeLightingStrength,this.eyeDomeLightingRadius=a.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=y$2(e,!1),this._pickStatisticsText=y$2(e,!0),Y$1(this,!1)}},feature:{get:function(){return this._feature},set:function(e){if(this._feature!==e){var t=this._feature;e$2e(t)&&!t.content.isDestroyed()&&(!this.colorize&&e$2e(this._style)?t.color=e$2e(this._style.color)?this._style.color.evaluateColor(t,ce):e$1X.WHITE:t.color=v$2,this._scene.requestRender()),e$2e(e)&&(e$1X.clone(e.color,v$2),e.color=Z$2,this._scene.requestRender()),this._feature=e}}},tile:{get:function(){return this._tile},set:function(e){if(this._tile!==e){var t=this._tile;e$2e(t)&&!t.isDestroyed()&&!k$1(t.content)&&(t.color=v$2,this._scene.requestRender()),e$2e(e)&&!k$1(e.content)&&(e$1X.clone(e.color,v$2),e.color=Z$2,this._scene.requestRender()),this._tile=e}}}}),l$6.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive},l$6.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible},l$6.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible},l$6.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible},l$6.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible},l$6.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible},l$6.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible},l$6.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible},l$6.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible},l$6.prototype.trimTilesCache=function(){e$2e(this._tileset)&&this._tileset.trimLoadedTiles()},l$6.prototype.compileStyle=function(){var e=this._tileset;if(e$2e(e)&&this.styleString!==JSON.stringify(e.style)){this._editorError="";try{0===this.styleString.length&&(this.styleString="{}"),this._style=new d$n(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(e){this._editorError=e.toString()}this.feature=this._feature,this.tile=this._tile}},l$6.prototype.styleEditorKeyPress=function(e,t){if(9===t.keyCode){t.preventDefault();var i,n=t.target,r=n.selectionStart,o=n.selectionEnd,a=o,s=n.value.slice(r,o).split("\n"),l=s.length;if(t.shiftKey)for(i=0;i<l;++i)" "===s[i][0]&&(" "===s[i][1]?(s[i]=s[i].substr(2),a-=2):(s[i]=s[i].substr(1),a-=1));else for(i=0;i<l;++i)s[i]=" "+s[i],a+=2;var u=s.join("\n");n.value=n.value.slice(0,r)+u+n.value.slice(o),n.selectionStart=r!==o?r:a,n.selectionEnd=a}else t.ctrlKey&&(10===t.keyCode||13===t.keyCode)&&this.compileStyle();return!0},l$6.prototype._update=function(){var e=this._tileset;if(this.performance&&this._performanceDisplay.update(),e$2e(e)){if(e.isDestroyed())return this.tile=void 0,this.feature=void 0,void(this.tileset=void 0);var t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=y$2(e,!1),this._pickStatisticsText=y$2(e,!0))},l$6.prototype.isDestroyed=function(){return!1},l$6.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();var e=this;return this._definedProperties.forEach((function(t){ce$1.getObservable(e,t).dispose()})),i$11(this)},l$6.getStatistics=y$2,Object.defineProperties(y$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),y$1.prototype.isDestroyed=function(){return!1},y$1.prototype.destroy=function(){return ce$1.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),i$11(this)},Object.defineProperties(m$3.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.parent}))}},selectNW:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.northwestChild}))}},selectNE:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.northeastChild}))}},selectSW:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.southwestChild}))}},selectSE:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.southeastChild}))}},primitive:{get:function(){return this._primitive},set:function(e){var t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,e$2e(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,e$2e(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout((function(){e.show=!0}),50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(e$2e(e)){if(this.hasPickedTile=!0,e!==this._tile){this.tileText="L: "+e.level+" X: "+e.x+" Y: "+e.y,this.tileText+="<br>SW corner: "+e.rectangle.west+", "+e.rectangle.south,this.tileText+="<br>NE corner: "+e.rectangle.east+", "+e.rectangle.north;var t=e.data;e$2e(t)?this.tileText+="<br>Min: "+t.minimumHeight+" Max: "+t.maximumHeight:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}}),m$3.prototype._update=function(){this.frustums&&(this.frustumStatisticText=M$1(this._scene.debugFrustumStatistics));var e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=g$2(1,e,this.depthFrustum),this.depthFrustumText=this.depthFrustum+" of "+e,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText="Cached shaders: "+this._scene.context.shaderCache.numberOfShaders},m$3.prototype.isDestroyed=function(){return!1},m$3.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._globeDepthSubscription.dispose(),this._pickDepthSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),i$11(this)},Object.defineProperties(g$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),g$1.prototype.isDestroyed=function(){return!1},g$1.prototype.destroy=function(){return ce$1.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),i$11(this)},Object.defineProperties(r$6.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){if(!(e instanceof Element))throw new t$15("value must be a valid Element.");this._fullscreenElement=e}},command:{get:function(){return this._command}}}),r$6.prototype.isDestroyed=function(){return!1},r$6.prototype.destroy=function(){document.removeEventListener(l$1e.changeEventName,this._callback),i$11(this)};var c$3="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",d$4="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function r$5(e,t){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e);var i=new r$6(t);i._exitFullScreenPath=d$4,i._enterFullScreenPath=c$3;var n=document.createElement("button");n.type="button",n.className="supermap3d-button supermap3d-fullscreenButton",n.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(n),ce$1.applyBindings(i,n),this._container=e,this._viewModel=i,this._element=n}function D$1(e){if(!e$2e(e)||!e$2e(e.scene)||!e$2e(e.viewer))throw new t$15("options.scene and optinss.viewer is required.");this._viewer=e.viewer,this._url=u$Z(e.url,"//dev.virtualearth.net/"),this._url.length>0&&"/"!==this._url[this._url.length-1]&&(this._url+="/"),this._key=e$12.getKey(e.key),this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodeInProgress=void 0,this._complete=new o$1h,this._dataSource=void 0;var t=this;this._searchCommand=s$4((function(){t.isSearchInProgress?U$1(t):Q$1(t)})),this.keepExpanded=!1,ce$1.track(this,["_searchText","_isSearchInProgress","keepExpanded"]),this.isSearchInProgress=void 0,ce$1.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,ce$1.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(e){if("string"!=typeof e)throw new t$15("value must be a valid string.");this._searchText=e}}),this.flightDuration=void 0,ce$1.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(e){if(e$2e(e)&&e<0)throw new t$15("value must be positive.");this._flightDuration=e}})}function j$4(e,t){e._scene.camera.flyTo({destination:t,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:p$1d.IDENTITY})}Object.defineProperties(r$5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),r$5.prototype.isDestroyed=function(){return!1},r$5.prototype.destroy=function(){return this._viewModel.destroy(),ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$11(this)},Object.defineProperties(D$1.prototype,{url:{get:function(){return this._url}},key:{get:function(){return this._key}},complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},dataSource:{get:function(){return this._dataSource}}});var L$3="https://www.supermapol.com/iserver/services/localsearch/rest/searchdatas/China/poiinfos.json";function Q$1(e){var t=e.searchText;if(!/^\s*$/.test(t)){var i=t.match(/[^\s,\n]+/g);if(2===i.length||3===i.length){var n=+i[0],r=+i[1],o=3===i.length?+i[2]:300;if(!isNaN(n)&&!isNaN(r)&&!isNaN(o))return void j$4(e,o$1p.fromDegrees(n,r,o))}e._isSearchInProgress=!0;var a={key:e.geoKey},s=t.match(/[^\s-\n]+/g);2===s.length?(a.city=s[0],a.keywords=s[1]):a.keywords=s[0],t$10.fetch({url:L$3,queryParameters:a}).then((t=>{t=JSON.parse(t);if(e._isSearchInProgress=!1,e$2e(t.error))return e._isSearchInProgress=!1,void(e.searchText=t.error.errorMsg);e$2e(e._datasource)&&(e._viewer.dataSources.remove(e._datasource),e._datasource=void 0);var i=t.poiInfos[0];e._searchText=i.name;var n=i.location;n.lon=n.x,n.lat=n.y,!e$2e(o$1p.fromDegrees(n.x,n.y,500))||(e._datasource=Y(t,e),e._viewer.dataSources.add(e._datasource),o$1l(e._datasource,(function(t){e._datasource=t,e._viewer.flyTo(t)}),(function(e){console.log(e)})))})).catch((e=>{console.log("error",e)}))}}function U$1(e){e._isSearchInProgress=!1,e$2e(e._geocodeInProgress)&&(e._geocodeInProgress.cancel=!0,e._geocodeInProgress=void 0)}function Y(e,t){for(var i={type:"FeatureCollection",features:[]},n=e.poiInfos,r=[],o=0,a=n.length;o<a;o++){var s=n[o];s.address;var l=s.location,u=e$2d.toRadians(l.x),c=e$2d.toRadians(l.y);r.push(new a$18(u,c))}return o$1l(y$C(t._viewer.terrainProvider,9,r),(function(e){for(var t=0,r=n.length;t<r;t++){var o=n[t],a=o.address,s=e[t],l={type:"Feature",geometry:{type:"Point",coordinates:[e$2d.toDegrees(s.longitude),e$2d.toDegrees(s.latitude),s.height]},properties:{title:o.name,"marker-color":"#B9EB14",tel:o.telephone,address:a}};i.features.push(l)}return(new y$p).loadPoiJsonData(i)}))}var l$5="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",f$2="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function s$3(e){if(!e$2e(e)||!e$2e(e.container))throw new t$15("options.container is required.");if(!e$2e(e.scene)||!e$2e(e.viewer))throw new t$15("options.scene and options.viewer is required.");var t=i$c(e.container),i=new D$1(e);i._startSearchPath=l$5,i._stopSearchPath=f$2;var n=document.createElement("form");n.setAttribute("data-bind","submit: search");var r=document.createElement("input");r.type="search",r.className="supermap3d-geocoder-input",r.setAttribute("placeholder","Enter an address or landmark..."),r.setAttribute("data-bind",'value: searchText,valueUpdate: "afterkeydown",disable: isSearchInProgress,css: { "supermap3d-geocoder-input-wide" : keepExpanded || searchText.length > 0 }'),n.appendChild(r);var o=document.createElement("span");o.className="supermap3d-geocoder-searchButton",o.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),n.appendChild(o),t.appendChild(n),ce$1.applyBindings(i,n),this._container=t,this._viewModel=i,this._form=n,this._onInputBegin=function(e){t.contains(e.target)||r.blur()},this._onInputEnd=function(e){t.contains(e.target)&&r.focus()},s$Z.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),document.addEventListener("pointerup",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),document.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),document.addEventListener("touchend",this._onInputEnd,!0))}function r$4(e,t){if(!e$2e(e))throw new t$15("scene is required.");this._scene=e,this._duration=t;var i=this;this._command=s$4((function(){i._scene.camera.flyHome(i._duration)})),this.tooltip="View Home",ce$1.track(this,["tooltip"])}function o$3(e,t,i){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e);var n=new r$4(t,i);n._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";var r=document.createElement("button");r.type="button",r.className="supermap3d-button supermap3d-toolbar-button supermap3d-home-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(r),ce$1.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}Object.defineProperties(s$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),s$3.prototype.isDestroyed=function(){return!1},s$3.prototype.destroy=function(){return s$Z.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),document.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),document.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),document.removeEventListener("touchend",this._onInputEnd,!0)),ce$1.cleanNode(this._form),this._container.removeChild(this._form),i$11(this)},Object.defineProperties(r$4.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){if(e$2e(e)&&e<0)throw new t$15("value must be positive.");this._duration=e}}}),Object.defineProperties(o$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),o$3.prototype.isDestroyed=function(){return!1},o$3.prototype.destroy=function(){return ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$11(this)};var r$3="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",o$2="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function t$1(){this._cameraClicked=new o$1h,this._closeClicked=new o$1h,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",ce$1.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="supermap3d-infoBox-loadingContainer"><span class="supermap3d-infoBox-loading"></span></div>',this.cameraIconPath=void 0,ce$1.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?o$2:r$3}}),ce$1.defineProperty(this,"_bodyless",{get:function(){return!e$2e(this.description)||0===this.description.length}})}function l$4(e){o$1q.defined("container",e),e=i$c(e);var t=document.createElement("div");t.className="supermap3d-infoBox",t.setAttribute("data-bind",'css: { "supermap3d-infoBox-visible" : showInfo, "supermap3d-infoBox-bodyless" : _bodyless }'),e.appendChild(t);var i=document.createElement("div");i.className="supermap3d-infoBox-title",i.setAttribute("data-bind","text: titleText"),t.appendChild(i);var n=document.createElement("button");n.type="button",n.className="supermap3d-button supermap3d-infoBox-camera",n.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(n);var r=document.createElement("button");r.type="button",r.className="supermap3d-infoBox-close",r.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),r.innerHTML="×",t.appendChild(r);var o=document.createElement("iframe");o.className="supermap3d-infoBox-iframe",o.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),o.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),o.setAttribute("allowfullscreen",!0),t.appendChild(o);var a=new t$1;ce$1.applyBindings(a,t),this._container=e,this._element=t,this._frame=o,this._viewModel=a,this._descriptionSubscription=void 0;var s=this;o.addEventListener("load",(function(){var e=o.contentDocument,i=e.createElement("link");i.href=n$17("Widgets/InfoBox/InfoBoxDescription.css"),i.rel="stylesheet",i.type="text/css";var n=e.createElement("div");n.className="supermap3d-infoBox-description",e.head.appendChild(i),e.body.appendChild(n),s._descriptionSubscription=c$5(a,"description",(function(e){o.style.height="5px",n.innerHTML=e;var i=null,r=n.firstElementChild;if(null!==r&&1===n.childNodes.length){var a=window.getComputedStyle(r);if(null!==a){var s=a["background-color"],l=e$1X.fromCssColorString(s);e$2e(l)&&0!==l.alpha&&(i=a["background-color"])}}t.style["background-color"]=i;var u=n.getBoundingClientRect().height;o.style.height=u+"px"}))})),o.setAttribute("src","about:blank")}t$1.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},Object.defineProperties(t$1.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}}),Object.defineProperties(l$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),l$4.prototype.isDestroyed=function(){return!1},l$4.prototype.destroy=function(){var e=this._container;return ce$1.cleanNode(this._element),e.removeChild(this._element),e$2e(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),i$11(this)};var n$2=function(e){var t=document.createElement("div");t.innerHTML=e;for(var i=document.createDocumentFragment();t.firstChild;)i.appendChild(t.firstChild);return i},f$1=function(e,t,i){t=i$c(t);var n,r=n$2(e),o=[];for(n=0;n<r.childNodes.length;++n)o.push(r.childNodes[n]);for(t.appendChild(r),n=0;n<o.length;++n){var a=o[n];(1===a.nodeType||8===a.nodeType)&&ce$1.applyBindings(i,a)}return o},y=function(e,t){if(!e$2e(e)||!e$2e(e.viewer)||!e$2e(e.scene))throw new t$15("options and options.viewer and optins.scene is required.");this.viewer=e.viewer,this.viewer.afterViewerChanged=new o$1h,this.viewer.beforeViewerChanged=new o$1h,this.scene=e.scene,this.eventHelper=new n$x,this.showCompass=e$2e(this.scene),this.heading=this.showCompass?this.scene.camera.heading:0,this.isOrbiting=!1,this.orbitCursorAngle=0,this.isRotating=!1,this.rotateInitialCursorAngle=void 0,this.rotateFrame=void 0,this.rotateMouseMoveFunction=void 0,this.rotateMouseUpFunction=void 0,this._unsubcribeFromPostRender=void 0,this.tiltbarLeft=56,this.tiltbarTop=3,this.isTilting=!1,this.zoombarTop=65,this.tiltInitialCursorAngle=0,this.screenSpaceEventHandler=new g$K(t),this.clickStartPosition=null,ce$1.track(this,["showCompass","heading","isOrbiting","orbitCursorAngle","isRotating","tiltbarLeft","tiltbarTop","isTilting","zoombarTop"]);var i=this;function n(){e$2e(i.viewer)?(i._unsubcribeFromPostRender&&(i._unsubcribeFromPostRender(),i._unsubcribeFromPostRender=void 0),i.showCompass=!0,i._unsubcribeFromPostRender=i.scene.postRender.addEventListener((function(){var e=Math.abs(i.scene.camera.heading-i.heading);if((e<e$2d.PI_OVER_TWO||e>3*e$2d.PI_OVER_TWO)&&(i.heading=i.scene.camera.heading),i.scene.screenSpaceCameraController,!i.isTilting){var t=i.scene.camera.pitch+e$2d.PI_OVER_TWO,n=e$2d.PI_OVER_TWO/20,r=Math.floor(t/n);r=(r=r>19?19:r)<0?0:r,i.tiltbarLeft=C$1[r].x,i.tiltbarTop=C$1[r].y}}))):(i._unsubcribeFromPostRender&&(i._unsubcribeFromPostRender(),i._unsubcribeFromPostRender=void 0),i.showCompass=!1)}this.eventHelper.add(this.viewer.afterViewerChanged,n,this),function(){var t=e$2d.PI_OVER_TWO+e.scene.camera.pitch,n=Math.PI/2/20,r=Math.floor(t/n);r=(r=r>19?19:r)<0?0:r,i.tiltbarLeft=C$1[r].x,i.tiltbarTop=C$1[r].y}(),n()},z=new o$1o;new o$1p,y.prototype.handleZoomBarScrollMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e.screenSpaceEventHandler.removeInputAction(G$J.MOUSE_MOVE),e$2e(e.zoombarTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoombarTickFunction),e.zoomBarScrollMouseUpFunction=void 0,e.zoombarTickFunction=void 0,e.isZoomBarScrolling=!0;var i=e.viewer.scene.camera;e.zoombarTickFunction=function(t){var n=e.zoombarTop-65;n>0?e.viewer.scene.mode===C$14.COLUMBUS_VIEW||e.viewer.scene.mode===C$14.SCENE2D?i.zoomOut():L$2(e,-1):n<0&&(e.viewer.scene.mode===C$14.COLUMBUS_VIEW||e.viewer.scene.mode===C$14.SCENE2D?i.zoomIn():L$2(e,1))},e.zoomBarScrollMouseMoveFunction=function(t,n){var r=e.zoombarTop,o=t.endPosition.y-t.startPosition.y+r;o=(o=o<0?0:o)>120?120:o,e.zoombarTop=o,e.zoombarTop-r>0?e.viewer.scene.mode===C$14.COLUMBUS_VIEW?i.zoomOut():L$2(e,-1):e.viewer.scene.mode===C$14.COLUMBUS_VIEW?i.zoomIn():L$2(e,1)},e.zoomBarScrollMouseUpFunction=function(t){e.isZoomBarScrolling=!1,e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e.screenSpaceEventHandler.removeInputAction(G$J.MOUSE_MOVE),e$2e(e.zoombarTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoombarTickFunction),e.zoomBarScrollMouseUpFunction=void 0,e.zoomBarScrollMouseMoveFunction=void 0,e.zoombarTickFunction=void 0,e.zoombarTop=65},e.screenSpaceEventHandler.setInputAction(e.zoomBarScrollMouseUpFunction,G$J.LEFT_UP),e.screenSpaceEventHandler.setInputAction(e.zoomBarScrollMouseMoveFunction,G$J.MOUSE_MOVE),e.viewer.clock.onTick.addEventListener(e.zoombarTickFunction)},y.prototype.handleZoomInMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e$2e(e.zoominTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoominTickFunction),e.zoominMouseUpFunction=void 0,e.zoominTickFunction=void 0,e.isZoomin=!0,e.zoominLastTimestamp=Et$c();var i=e.viewer.scene,n=i.camera;e.zoominTickFunction=function(t){if(e.viewer.scene.mode===C$14.COLUMBUS_VIEW){var r=j$3(i,1);e$2e(r)&&n.zoomIn(r)}else e.viewer.scene.mode===C$14.SCENE2D?n.zoomIn():L$2(e,1)},e.zoominMouseUpFunction=function(t){e.isZoomin=!1,e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e$2e(e.zoominTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoominTickFunction),e.zoominMouseUpFunction=void 0,e.zoominTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.zoominMouseUpFunction,G$J.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.zoominTickFunction)},y.prototype.handleZoomOutMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e$2e(e.zoomoutTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoomoutTickFunction),e.zoomoutMouseUpFunction=void 0,e.zoomoutTickFunction=void 0,e.iszoomout=!0,e.zoomoutLastTimestamp=Et$c();var i=e.viewer.scene,n=i.camera;e.zoomoutTickFunction=function(t){if(e.viewer.scene.mode===C$14.COLUMBUS_VIEW){var r=j$3(i,1);e$2e(r)&&n.zoomOut(r)}else e.viewer.scene.mode===C$14.SCENE2D?n.zoomOut():L$2(e,-1)},e.zoomoutMouseUpFunction=function(t){e.iszoomout=!1,e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e$2e(e.zoomoutTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoomoutTickFunction),e.zoomoutMouseUpFunction=void 0,e.zoomoutTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.zoomoutMouseUpFunction,G$J.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.zoomoutTickFunction)};var X=1;function M(e,t,i){e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e$2e(e.rotateEastTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.rotateEastTickFunction),e.rotateEastMouseUpFunction=void 0,e.rotateEastTickFunction=void 0,e.isrotateEasting=!0,e.rotateEastLastTimestamp=Et$c(),e.viewer.scene.camera;var n=e$2d.PI_OVER_TWO-Math.atan2(-i.y,i.x),r=Math.PI/4,o=0,a=1,s=2,l=3,u=4;o=n>=-r&&n<=r?u:n>=r&&n<=3*r?s:n>=3*r&&n<=5*r?l:a,e.rotateEastTickFunction=function(t){var i=e.viewer.scene.camera,r=Et$c();switch(e.rotateEastLastTimestamp,n=20*Math.abs(i._positionCartographic.height/6378317)*5e-4,o){case a:i.rotate(i.up,n);break;case s:i.rotate(i.up,-n);break;case l:i.rotate(i.right,-n);break;case u:i.rotate(i.right,n)}e.rotateLastTimestamp=r},e.rotateEastMouseUpFunction=function(t){e.isRotateEasting=!1,e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e$2e(e.rotateEastTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.rotateEastTickFunction),e.rotateEastMouseUpFunction=void 0,e.rotateEastTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.rotateEastMouseUpFunction,G$J.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.rotateEastTickFunction)}y.prototype.handleMouseDown=function(e,t){var i=t.currentTarget,n=t.currentTarget.getBoundingClientRect();X=n.height/i.clientHeight,n.width;var r=new o$1o((n.right-n.left)/2,(n.bottom-n.top)/2),o=0;o="mousedown"===t.type?new o$1o(t.clientX-n.left,t.clientY-n.top):new o$1o(t.originalEvent.touches[0].clientX-n.left,t.originalEvent.touches[0].clientY-n.top);var a=o$1o.subtract(o,r,z);this.clickStartPosition=new o$1o(t.clientX,t.clientY);var s=o$1o.magnitude(a);if((s/=X)>30&&s<45)tt(this,i,a);else{if(!(s>50&&s<70))return e.viewer.scene.mode===C$14.SCENE2D?void 0:M(this,i,a);if(e.viewer.scene.mode===C$14.SCENE2D)return;var l=e$2d.PI_OVER_TWO-Math.atan2(-a.y,a.x);l>=0&&l<=e$2d.PI_OVER_TWO&&nt(this,i,a)}},y.prototype.handleMouseUp=function(e,t){var i=t.currentTarget.getBoundingClientRect(),n=new o$1o((i.right-i.left)/2,(i.bottom-i.top)/2),r=0;r="mouseup"===t.type?new o$1o(t.clientX-i.left,t.clientY-i.top):new o$1o(t.originalEvent.touches[0].clientX-i.left,t.originalEvent.touches[0].clientY-i.top);var o=o$1o.subtract(r,n,z),a=o$1o.magnitude(o);if(a>30&&a<45){var s=e$2d.toDegrees(Math.atan2(-o.y,o.x)),l=new o$1o(t.clientX,t.clientY),u=l.x-this.clickStartPosition.x,c=l.y-this.clickStartPosition.y;if(Math.sqrt(u*u+c*c)>5)return;var h=e$2d.toDegrees(e.heading),d=Math.abs(s-h),f=e.viewer.scene;(s>0&&h>0&&h<90&&d>80&&d<100||d>260&&d<280)&&f.camera.flyTo({destination:f.camera.position,orientation:{heading:0,pitch:f.camera.pitch}})}};var x$1=new p$1d,W=new p$1d,d$3=new o$1p,N=new o$1o;function tt(e,t,i){e.screenSpaceEventHandler.removeInputAction(G$J.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e.rotateMouseMoveFunction=void 0,e.rotateMouseUpFunction=void 0,e.isRotating=!0,e.rotateInitialCursorAngle=Math.atan2(-i.y,i.x);var n=e.viewer.scene,r=n.camera,o=N;o.x=n.canvas.clientWidth/2,o.y=n.canvas.clientHeight/2;var a=r.pickEllipsoid(o,n.globe.ellipsoid,d$3);e$2e(a)?(e.rotateFrame=m$19.eastNorthUpToFixedFrame(a,n.globe.ellipsoid,W),e.rotateIsLook=!1):(e.rotateFrame=m$19.eastNorthUpToFixedFrame(r.positionWC,n.globe.ellipsoid,W),e.rotateIsLook=!0);var s=p$1d.clone(r.transform,x$1);r.lookAtTransform(e.rotateFrame),e.rotateInitialCameraAngle=-r.heading,e.rotateInitialCameraDistance=o$1p.magnitude(new o$1p(r.position.x,r.position.y,0)),r.lookAtTransform(s),e.rotateMouseMoveFunction=function(i,n){var r=t.getBoundingClientRect(),o=new o$1o((r.right-r.left)/2,(r.bottom-r.top)/2),a=new o$1o(n.clientX-r.left,n.clientY-r.top),s=o$1o.subtract(a,o,z),l=Math.atan2(-s.y,s.x)-e.rotateInitialCursorAngle,u=e$2d.zeroToTwoPi(e.rotateInitialCameraAngle-l),c=e.viewer.scene.camera,h=p$1d.clone(c.transform,x$1);c.lookAtTransform(e.rotateFrame);var d=-c.heading;c.rotateRight(u-d),c.lookAtTransform(h)},e.rotateMouseUpFunction=function(t){e.isRotating=!1,e.screenSpaceEventHandler.removeInputAction(G$J.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e.rotateMouseMoveFunction=void 0,e.rotateMouseUpFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.rotateMouseMoveFunction,G$J.MOUSE_MOVE),e.screenSpaceEventHandler.setInputAction(e.rotateMouseUpFunction,G$J.LEFT_UP)}var C$1=[{x:56,y:3},{x:59,y:4},{x:64,y:5},{x:69,y:6},{x:74,y:7},{x:79,y:9},{x:84,y:12},{x:89,y:15},{x:92,y:19},{x:94,y:20},{x:99,y:25},{x:104,y:34},{x:106,y:40},{x:107,y:44},{x:107,y:46},{x:107,y:48},{x:107,y:50},{x:107,y:52},{x:107,y:54},{x:107,y:56}],Z$1=Math.PI/40;function nt(e,t,i){e.screenSpaceEventHandler.removeInputAction(G$J.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e.tiltMouseMoveFunction=void 0,e.tiltMouseUpFunction=void 0;var n=e$2d.PI_OVER_TWO-Math.atan2(-i.y,i.x);n=(n=n<0?0:n)>e$2d.PI_OVER_TWO?e$2d.PI_OVER_TWO:n,e.tiltInitialCursorAngle=n,e.isTilting=!0;var r=e.viewer.scene,o=r.camera,a=N;a.x=r.canvas.clientWidth/2,a.y=r.canvas.clientHeight/2;for(var s=o.pickEllipsoid(a,r.globe.ellipsoid,d$3);!e$2e(s)&&a.y<r.canvas.clientHeight;)a.y+=5,s=o.pickEllipsoid(a,r.globe.ellipsoid,d$3);!e$2e(s)||(e.tiltFrame=m$19.eastNorthUpToFixedFrame(s,r.globe.ellipsoid,W),e.tiltMouseMoveFunction=function(i,n){e.isTilting=!0;var r=t.getBoundingClientRect(),o=new o$1o((r.right-r.left)/2,(r.bottom-r.top)/2),a=new o$1o(n.clientX-r.left,n.clientY-r.top),s=o$1o.subtract(a,o,z),l=e$2d.PI_OVER_TWO-Math.atan2(-s.y,s.x);l=(l=l<0?0:l)>e$2d.PI_OVER_TWO?e$2d.PI_OVER_TWO:l;var u=e.viewer.scene.camera,c=p$1d.clone(u.transform,x$1);u.lookAtTransform(e.tiltFrame);var h=l-e.tiltInitialCursorAngle;u.rotateUp(h),e.tiltInitialCursorAngle=l,u.lookAtTransform(c);var d=Math.ceil(l/Z$1),f=C$1[d=d>19?19:d];e.tiltbarLeft=f.x,e.tiltbarTop=f.y},e.tiltMouseUpFunction=function(t){e.isTilting=!1,e.screenSpaceEventHandler.removeInputAction(G$J.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e.tiltMouseMoveFunction=void 0,e.tiltMouseUpFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.tiltMouseMoveFunction,G$J.MOUSE_MOVE),e.screenSpaceEventHandler.setInputAction(e.tiltMouseUpFunction,G$J.LEFT_UP))}function j$3(e,t){var i=e.camera,n=e.canvas,r=new o$1o;r.x=n.clientWidth/2,r.y=n.clientHeight/2;var o=q(e,r);if(e$2e(o)){var a=o$1p.distance(i.positionWC,o),s=.0618*t*.2;return a*(s=a>300?s:2*s)}}function L$2(e,t){var i=e.viewer.scene,n=i.camera,r=i.canvas,o=new o$1o;o.x=r.clientWidth/2,o.y=r.clientHeight/2;var a=q(i,o);if(e$2e(a)){var s=o$1p.distance(n.position,a),l=.0618*t*.2;l=s>300?l:2*l,n.position;var u=s*l,c=new o$1p;o$1p.subtract(a,n.position,c);var h=new o$1p,d=(h=o$1p.clone(n.right,h),o$1p.dot(c,h)),f=new o$1p;f=o$1p.multiplyByScalar(h,d,f);var p=new o$1p;p=o$1p.subtract(c,f,p);var _=new o$1p;_=o$1p.normalize(p,_),new o$1p,n.move(_,u);var m=new o$1p;m=o$1p.normalize(a,m);var g=o$1p.magnitude(a),x=t$12.fromCartesian3(g),y=n.pickEllipsoid(o,x,new o$1p);if(e$2e(y)&&!isNaN(y.x)&&!isNaN(y.y)&&!isNaN(y.z)&&(y=o$1p.normalize(y,y),!(n._positionCartographic.height<0))){var v=o$1p.angleBetween(m,y);if(!e$2d.equalsEpsilon(v,0,e$2d.EPSILON10)){var $=new o$1p;$=o$1p.cross(m,y,$),n.rotate($,v)}}}}var et=new f$19,rt$1=new o$1p,at$1=new o$1p;function q(e,t){var i=e.globe,n=e.camera;if(e$2e(i)){var r;e.pickPositionSupported&&(r=e.pickPositionWorldCoordinates(t,rt$1));var o=n.getPickRay(t,et),a=i.pick(o,e,at$1);return(e$2e(r)?o$1p.distance(r,n.positionWC):Number.POSITIVE_INFINITY)<(e$2e(a)?o$1p.distance(a,n.positionWC):Number.POSITIVE_INFINITY)?r:a}}var t=function(e){if(!e$2e(e)||!e$2e(e.container))throw new t$15("options.container is required.");if(!e$2e(e.scene))throw new t$15("options.scene is required.");if(!e$2e(e.viewer))throw new t$15("options.viewer is required.");var t=i$c(e.container);this._viewModel=new y(e,t),m$2(t,this._viewModel),s$Z.isPCBroswer()||(document.querySelector(".sm-zoom").style.visibility="visible",document.querySelector(".sm-compass-tiltbar").style.visibility="visible",document.querySelector(".sm-compass-arrows").style.visibility="visible",document.querySelector(".sm-compass-tilt").style.visibility="visible")};function m$2(e,t){var i=['<div class="sm-compass" data-bind="visible: showCompass, event: { mousedown: handleMouseDown , touchstart : handleMouseDown, mouseup: handleMouseUp, touchend: handleMouseUp}">','<div class="sm-compass-tilt"></div>',"<div class=\"sm-compass-tiltbar\" data-bind = \"style : { left : + tiltbarLeft + 'px',top : + tiltbarTop + 'px'}\"></div>",'<div class="sm-compass-arrows"></div>',"<div class=\"sm-compass-outer-ring\" data-bind=\"style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }\"></div>",'<div class="arrows_e_active"></div>','<div class="arrows_n_active"></div>','<div class="arrows_s_active"></div>','<div class="arrows_w_active"></div>',"</div>",'<div class="sm-zoom">','<div class="sm-zoomin" data-bind="event : {mousedown : handleZoomInMouseDown,touchstart : handleZoomInMouseDown}"></div>','<div class="sm-zoomout" data-bind="event : {mousedown : handleZoomOutMouseDown, touchstart : handleZoomOutMouseDown}"></div>','<div class="sm-zoombar" data-bind="event : {mousedown : handleZoomBarScrollMouseDown, touchstart : handleZoomBarScrollMouseDown},style : {top : + zoombarTop + \'px\' }"></div>'," </div>"].join("");f$1(i,e,t)}function i$4(){this.showInstructions=!1;var e=this;this._command=s$4((function(){e.showInstructions=!e.showInstructions})),this._showClick=s$4((function(){e._touch=!1})),this._showTouch=s$4((function(){e._touch=!0})),this._touch=!1,this.tooltip="Navigation Instructions",ce$1.track(this,["tooltip","showInstructions","_touch"])}function l$3(e){if(!e$2e(e)||!e$2e(e.container))throw new t$15("options.container is required.");var t=i$c(e.container),i=new i$4,n=u$Z(e.instructionsInitiallyVisible,!1);i.showInstructions=n,i._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";var r=document.createElement("span");r.className="supermap3d-navigationHelpButton-wrapper",t.appendChild(r);var o=document.createElement("button");o.type="button",o.className="supermap3d-button supermap3d-toolbar-button supermap3d-navigation-help-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),r.appendChild(o);var a=document.createElement("div");a.className="supermap3d-navigation-help",a.setAttribute("data-bind",'css: { "supermap3d-navigation-help-visible" : showInstructions}'),r.appendChild(a);var s=document.createElement("button");s.type="button",s.className="supermap3d-navigation-button supermap3d-navigation-button-left",s.setAttribute("data-bind",'click: showClick, css: {"supermap3d-navigation-button-selected": !_touch, "supermap3d-navigation-button-unselected": _touch}');var l=document.createElement("img");l.src=n$17("Widgets/Images/NavigationHelp/Mouse.svg"),l.className="supermap3d-navigation-button-icon",l.style.width="25px",l.style.height="25px",s.appendChild(l),s.appendChild(document.createTextNode("Mouse"));var u=document.createElement("button");u.type="button",u.className="supermap3d-navigation-button supermap3d-navigation-button-right",u.setAttribute("data-bind",'click: showTouch, css: {"supermap3d-navigation-button-selected": _touch, "supermap3d-navigation-button-unselected": !_touch}');var c=document.createElement("img");c.src=n$17("Widgets/Images/NavigationHelp/Touch.svg"),c.className="supermap3d-navigation-button-icon",c.style.width="25px",c.style.height="25px",u.appendChild(c),u.appendChild(document.createTextNode("Touch")),a.appendChild(s),a.appendChild(u);var h=document.createElement("div");h.className="supermap3d-click-navigation-help supermap3d-navigation-help-instructions",h.setAttribute("data-bind",'css: { "supermap3d-click-navigation-help-visible" : !_touch}'),h.innerHTML=' <table> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/MouseLeft.svg")+'" width="48" height="48" /></td> <td> <div class="supermap3d-navigation-help-pan">Pan view</div> <div class="supermap3d-navigation-help-details">Left click + drag</div> </td> </tr> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/MouseRight.svg")+'" width="48" height="48" /></td> <td> <div class="supermap3d-navigation-help-zoom">Zoom view</div> <div class="supermap3d-navigation-help-details">Right click + drag, or</div> <div class="supermap3d-navigation-help-details">Mouse wheel scroll</div> </td> </tr> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/MouseMiddle.svg")+'" width="48" height="48" /></td> <td> <div class="supermap3d-navigation-help-rotate">Rotate view</div> <div class="supermap3d-navigation-help-details">Middle click + drag, or</div> <div class="supermap3d-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>',a.appendChild(h);var d=document.createElement("div");d.className="supermap3d-touch-navigation-help supermap3d-navigation-help-instructions",d.setAttribute("data-bind",'css: { "supermap3d-touch-navigation-help-visible" : _touch}'),d.innerHTML=' <table> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/TouchDrag.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-pan">Pan view</div> <div class="supermap3d-navigation-help-details">One finger drag</div> </td> </tr> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/TouchZoom.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-zoom">Zoom view</div> <div class="supermap3d-navigation-help-details">Two finger pinch</div> </td> </tr> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/TouchTilt.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-rotate">Tilt view</div> <div class="supermap3d-navigation-help-details">Two finger drag, same direction</div> </td> </tr> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/TouchRotate.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-tilt">Rotate view</div> <div class="supermap3d-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>',a.appendChild(d),ce$1.applyBindings(i,r),this._container=t,this._viewModel=i,this._wrapper=r,this._closeInstructions=function(e){r.contains(e.target)||(i.showInstructions=!1)},s$Z.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}function r$2(e){if(!e$2e(e)||!e$2e(e.scene))throw new t$15("options.scene is required.");this._scene=e.scene,this.lowFrameRateMessage=u$Z(e.lowFrameRateMessage,"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,ce$1.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);var t=this;this._dismissMessage=s$4((function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0}));var i=i$f.fromScene(e.scene);this._unsubscribeLowFrameRate=i.lowFrameRate.addEventListener((function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)})),this._unsubscribeNominalFrameRate=i.nominalFrameRate.addEventListener((function(){t.showingLowFrameRateMessage=!1}))}function i$3(e){if(!e$2e(e)||!e$2e(e.container))throw new t$15("options.container is required.");if(!e$2e(e.scene))throw new t$15("options.scene is required.");var t=i$c(e.container),i=new r$2(e),n=document.createElement("div");n.className="supermap3d-performance-watchdog-message-area",n.setAttribute("data-bind","visible: showingLowFrameRateMessage");var r=document.createElement("button");r.setAttribute("type","button"),r.className="supermap3d-performance-watchdog-message-dismiss",r.innerHTML="×",r.setAttribute("data-bind","click: dismissMessage"),n.appendChild(r);var o=document.createElement("div");o.className="supermap3d-performance-watchdog-message",o.setAttribute("data-bind","html: lowFrameRateMessage"),n.appendChild(o),t.appendChild(n),ce$1.applyBindings(i,n),this._container=t,this._viewModel=i,this._element=n}function o$1(e){if(!e$2e(e))throw new t$15("scene is required.");this._scene=e,this._orthographic=e.camera.frustum instanceof a$V,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,ce$1.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);var t=this;ce$1.defineProperty(this,"selectedTooltip",(function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective})),this._toggleDropDown=s$4((function(){t.sceneMode===C$14.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)})),this._eventHelper=new n$x,this._eventHelper.add(e.morphComplete,(function(e,i,n,r){t.sceneMode=n,t._orthographic=n===C$14.SCENE2D||t._scene.camera.frustum instanceof a$V})),this._eventHelper.add(e.preRender,(function(){t._flightInProgress=e$2e(e.camera._currentFlight)})),this._switchToPerspective=s$4((function(){t.sceneMode!==C$14.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)})),this._switchToOrthographic=s$4((function(){t.sceneMode!==C$14.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)})),this._sceneMode=C$14}Object.defineProperties(t.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Object.defineProperties(i$4.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}}),Object.defineProperties(l$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),l$3.prototype.isDestroyed=function(){return!1},l$3.prototype.destroy=function(){return s$Z.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),ce$1.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i$11(this)},Object.defineProperties(r$2.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}}),r$2.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),i$11(this)},Object.defineProperties(i$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),i$3.prototype.isDestroyed=function(){return!1},i$3.prototype.destroy=function(){return this._viewModel.destroy(),ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$11(this)},Object.defineProperties(o$1.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}}),o$1.prototype.isDestroyed=function(){return!1},o$1.prototype.destroy=function(){this._eventHelper.removeAll(),i$11(this)};var v$1="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",b$1="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function n$1(e,t){if(!e$2e(e))throw new t$15("container is required.");if(!e$2e(t))throw new t$15("scene is required.");e=i$c(e);var i=new o$1(t);i._perspectivePath=v$1,i._orthographicPath=b$1;var n=document.createElement("span");n.className="supermap3d-projectionPicker-wrapper supermap3d-toolbar-button",e.appendChild(n);var r=document.createElement("button");r.type="button",r.className="supermap3d-button supermap3d-toolbar-button",r.setAttribute("data-bind",'css: { "supermap3d-projectionPicker-buttonPerspective": !_orthographic, "supermap3d-projectionPicker-buttonOrthographic": _orthographic, "supermap3d-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "supermap3d-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "supermap3d-projectionPicker-iconPerspective" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "supermap3d-projectionPicker-iconOrthographic" } --\x3e\x3c!-- /ko --\x3e',n.appendChild(r);var o=document.createElement("button");o.type="button",o.className="supermap3d-button supermap3d-toolbar-button supermap3d-projectionPicker-dropDown-icon",o.setAttribute("data-bind",'css: { "supermap3d-projectionPicker-visible" : (dropDownVisible && _orthographic), "supermap3d-projectionPicker-none" : !_orthographic, "supermap3d-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),n.appendChild(o);var a=document.createElement("button");a.type="button",a.className="supermap3d-button supermap3d-toolbar-button supermap3d-projectionPicker-dropDown-icon",a.setAttribute("data-bind",'css: { "supermap3d-projectionPicker-visible" : (dropDownVisible && !_orthographic), "supermap3d-projectionPicker-none" : _orthographic, "supermap3d-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),n.appendChild(a),ce$1.applyBindings(i,n),this._viewModel=i,this._container=e,this._wrapper=n,this._closeDropDown=function(e){n.contains(e.target)||(i.dropDownVisible=!1)},s$Z.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function i$2(e,t){if(!e$2e(e))throw new t$15("scene is required.");this._scene=e;var i=this;this._eventHelper=new n$x,this._eventHelper.add(e.morphStart,(function(e,t,n,r){i.sceneMode=n,i.dropDownVisible=!1})),this._duration=u$Z(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",ce$1.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,ce$1.defineProperty(this,"selectedTooltip",(function(){var e=i.sceneMode;return e===C$14.SCENE2D?i.tooltip2D:e===C$14.SCENE3D?i.tooltip3D:i.tooltipColumbusView})),this._toggleDropDown=s$4((function(){i.dropDownVisible=!i.dropDownVisible})),this._morphTo2D=s$4((function(){e.morphTo2D(i._duration)})),this._morphTo3D=s$4((function(){e.morphTo3D(i._duration)})),this._morphToColumbusView=s$4((function(){e.morphToColumbusView(i._duration)})),this._sceneMode=C$14}Object.defineProperties(n$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),n$1.prototype.isDestroyed=function(){return!1},n$1.prototype.destroy=function(){return this._viewModel.destroy(),s$Z.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ce$1.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i$11(this)},Object.defineProperties(i$2.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){if(e<0)throw new t$15("duration value must be positive.");this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}}),i$2.prototype.isDestroyed=function(){return!1},i$2.prototype.destroy=function(){this._eventHelper.removeAll(),i$11(this)};var D="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",P$1="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",_$1="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function c$2(e,t,i){if(!e$2e(e))throw new t$15("container is required.");if(!e$2e(t))throw new t$15("scene is required.");e=i$c(e);var n=new i$2(t,i);n._globePath=D,n._flatMapPath=P$1,n._columbusViewPath=_$1;var r=document.createElement("span");r.className="supermap3d-sceneModePicker-wrapper supermap3d-toolbar-button",e.appendChild(r);var o=document.createElement("button");o.type="button",o.className="supermap3d-button supermap3d-toolbar-button",o.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "supermap3d-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "supermap3d-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "supermap3d-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "supermap3d-sceneModePicker-slide-svg supermap3d-sceneModePicker-icon3D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "supermap3d-sceneModePicker-slide-svg supermap3d-sceneModePicker-icon2D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "supermap3d-sceneModePicker-slide-svg supermap3d-sceneModePicker-iconColumbusView" } --\x3e\x3c!-- /ko --\x3e',r.appendChild(o);var a=document.createElement("button");a.type="button",a.className="supermap3d-button supermap3d-toolbar-button supermap3d-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "supermap3d-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "supermap3d-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),r.appendChild(a);var s=document.createElement("button");s.type="button",s.className="supermap3d-button supermap3d-toolbar-button supermap3d-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "supermap3d-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "supermap3d-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),r.appendChild(s);var l=document.createElement("button");l.type="button",l.className="supermap3d-button supermap3d-toolbar-button supermap3d-sceneModePicker-dropDown-icon",l.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "supermap3d-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "supermap3d-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),r.appendChild(l),ce$1.applyBindings(n,r),this._viewModel=n,this._container=e,this._wrapper=r,this._closeDropDown=function(e){r.contains(e.target)||(n.dropDownVisible=!1)},s$Z.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(c$2.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),c$2.prototype.isDestroyed=function(){return!1},c$2.prototype.destroy=function(){return this._viewModel.destroy(),s$Z.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ce$1.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i$11(this)};var m$1=new o$1o,s$2="-1000px";function n(e,t,i){if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(t))throw new t$15("selectionIndicatorElement is required.");if(!e$2e(i))throw new t$15("container is required.");this._scene=e,this._screenPositionX=s$2,this._screenPositionY=s$2,this._tweens=e.tweens,this._container=u$Z(i,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,ce$1.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,ce$1.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&e$2e(this.position)}}),ce$1.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return s$R.wgs84ToWindowCoordinates(e,t,i)}}function i$1(e,t){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e),this._container=e;var i=document.createElement("div");i.className="supermap3d-selection-wrapper",i.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "supermap3d-selection-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var r="http://www.w3.org/2000/svg",o=document.createElementNS(r,"svg:svg");o.setAttribute("width",160),o.setAttribute("height",160),o.setAttribute("viewBox","0 0 160 160");var a=document.createElementNS(r,"g");a.setAttribute("transform","translate(80,80)"),o.appendChild(a);var s=document.createElementNS(r,"path");s.setAttribute("data-bind","attr: { transform: _transform }"),s.setAttribute("d","M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z"),a.appendChild(s),i.appendChild(o);var l=new n(t,this._element,this._container);this._viewModel=l,ce$1.applyBindings(this._viewModel,this._element)}n.prototype.update=function(){if(this.showSelection&&e$2e(this.position)){var e=this.computeScreenSpacePosition(this.position,m$1);if(e$2e(e)){var t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,r=this._selectionIndicatorElement.clientWidth,o=.5*r;e.x=Math.min(Math.max(e.x,-r),i+r)-o,e.y=Math.min(Math.max(e.y,-r),n+r)-o,this._screenPositionX=Math.floor(e.x+.25)+"px",this._screenPositionY=Math.floor(e.y+.25)+"px"}else this._screenPositionX=s$2,this._screenPositionY=s$2}},n.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:m$Y.EXPONENTIAL_OUT})},n.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:m$Y.EXPONENTIAL_OUT})},Object.defineProperties(n.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(i$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),i$1.prototype.isDestroyed=function(){return!1},i$1.prototype.destroy=function(){var e=this._container;return ce$1.cleanNode(this._element),e.removeChild(this._element),i$11(this)};var C={UNLOAD:0,LOADING:1,LOADED:2,LOST:3},Be=new i$W("S3MTilesParser",1e4);function g(e,t,i,n,r){this._viewer=e,this._context=t,this._state=C.UNLOAD,this._url=i,this._gl=t._gl,this._renderEntities=[],this._visible=!1,this._scale=u$Z(r,1),this._position=o$1p.clone(n),this._modelMatrix=m$19.eastNorthUpToFixedFrame(n,void 0,new p$1d),null!==t.s3tc?this._supportCompressType=1:null!==t.pvrtc?this._supportCompressType=2:null!==t.etc1&&(this._supportCompressType=3)}function Ue(e){let t=o$1p.distance(e._position,e._viewer.camera.position),i=e._viewer.camera.frustum.near,n=e._viewer.scene._view.viewport.height,r=e._viewer.camera.frustum.fov;return 25/n*Math.tan(r/2)*i*2/(i/(i+t))}function d$2(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(e$2e(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function he(e,t,i){if(e$2e(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];e$2e(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}}function Fe(e,t,i){if(!e$2e(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];e$2e(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function l$2(e,t,i){var n=d$2(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function R(e,t,i){var n=d$2(e,t,i);if(e$2e(n))return n.textContent.trim()}function Ve$1(e,t,i){var n=d$2(e,t,i);if(e$2e(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}Object.defineProperties(g.prototype,{visible:{set:function(e){this._visible=e},get:function(){return this._visible}},position:{get:function(){return this._position}},scale:{get:function(){return this._scale}}}),g.prototype.setModelMatrix=function(e,t){this._position=o$1p.clone(t);var i=Ue(this),n=m$19.eastNorthUpToFixedFrame(t,void 0,new p$1d);p$1d.multiplyByUniformScale(n,i,this._modelMatrix);for(var r=this._renderEntities,o=0,a=r.length;o<a;o++){var s=r[o],l=s._oriCenter,u=s._colorCommand;e$2e(u)&&(u.modelMatrix=p$1d.clone(this._modelMatrix),p$1d.multiplyByPoint(this._modelMatrix,l,u.boundingVolume.center))}},g.prototype.load=function(){var e=this,t=this._state;if(C.UNLOAD==t){var i=o$O(this._url,(function(e){return o$10(e)}));e$2e(i)&&(this._state=C.LOADING,i.then((function(t){Ge(e,t)}),(function(e){this._state=C.UNLOAD})))}},g.prototype.update=function(e){if(this._visible&&!e.passes.fbo){if(!this._ready)return void this.load();e.context;var t=this._renderEntities;if(t&&0!=t.length)for(var i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r._colorCommand)&&!o$1p.equals(r._colorCommand.boundingVolume.center,o$1p.ZERO)&&e.commandList.push(r._colorCommand)}}},g.prototype.isDestroyed=function(){return!1},g.prototype.destroy=function(){for(var e=this._renderEntities,t=0,i=e.length;t<i;t++){e[t].destroy()}return this._renderEntities.length=0,this._viewer._tiltIndicator=void 0,i$11(this)};var Me=new s$T;function Ge(e,t){var i={buffer:t,supportCompressType:e._supportCompressType},n=Be.scheduleTask(i,[t]);e$2e(n)?n.then((function(t){if(t.result){e._gl;for(var i=e._context,n=Me.read(t.xmlDoc).firstChild,r=n.namespaceURI,o=Fe(d$2(n,"Material3Ds",r),"material",r),a={},s=0,l=o.length;s<l;s++){var u=o[s],c=R(u,"name",r),h=new _0xf77618({});a[c]=h;var d=d$2(u,"Ambient",r),f=l$2(d,"AmbientR",r),p=l$2(d,"AmbientG",r),_=l$2(d,"AmbientB",r),m=l$2(d,"AmbientA",r);h._ambientColor=new e$1X(f,p,_,m);var g=d$2(u,"Diffuse",r);f=l$2(g,"DiffuseR",r),p=l$2(g,"DiffuseG",r),_=l$2(g,"DiffuseB",r),m=l$2(g,"DiffuseA",r),h._diffuseColor=new e$1X(f,p,_,m);var x=d$2(u,"Specular",r);f=l$2(x,"SpecularR",r),p=l$2(x,"SpecularG",r),_=l$2(x,"SpecularB",r),m=l$2(x,"SpecularA",r),h._specularColor=new e$1X(f,p,_,m);var y=l$2(u,"Shininess",r);h._shininess=y,d$2(u,"TransparentSorting",r),h._bTransparentSorting=Ve$1(u,"TransparentSorting",r);var v=d$2(u,"texture",r),$=R(v,"name",r),b=d$2(v,"AddressMode",r),T=R(b,"u",r),S=R(b,"v",r);T="TAM_WRAP"===T?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,S="TAM_WRAP"===S?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;var w=t.texturePackage[$];if(e$2e(w)){$=i._id+"_"+$;var E=Se$e.CreateTexture($,i,w.width,w.height,w.nFormat,w.compressType,w.imageBuffer,!1,T,S);h._textures.push(E)}}var P=he(d$2(n,"PageLods",r),"Geode",r);for(s=0,l=P.length;s<l;s++){for(var A=P[s],L=R(A,"GeoDeModMatrix",r).split(","),M=0;M<16;M++)L[M]=parseFloat(L[M]);L=p$1d.unpack(L,0);for(var O=he(A,"GeoName",r),D=[],I=0,F=O.length;I<F;I++){var B=O[I].textContent.trim();D.push(B)}for(var N=[],G=new i$1d,z=0;z<D.length;z++){var U=ze$1(W=(k=t.geoPackage[D[z]]).vertexPackage,L);N.push(U)}var V=new o$1p;N.length>0&&(i$1d.fromBoundingSpheres(N,G),V=o$1p.clone(G.center),N.length=0),e.oriRadius=G.radius;for(F=0;F<D.length;F++){var k,W=(k=t.geoPackage[D[F]]).vertexPackage,H=k.arrIndexPackage,q={};for(var j in H){var X=H[j];if(e$2e(X)){h=a[c=X.materialCode];q[c]=h}}var Y=new T$2({vertexPackage:W,arrIndexPackage:H,version:t.version,mapPass:q,boundingVolume:G,oriCenter:V,owner:e});Y.initialize(e._context),e._renderEntities.push(Y)}}e._ready=!0,e._state=C.LOADED}else e._state=C.UNLOAD})):e.state=C.UNLOAD}function ze$1(e,t){for(var i=[],n=new i$1d,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1d.fromPoints(i,n),i.length=0,i$1d.transform(n,t,n),n}function T$2(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;this._arrIndexPackage=t,this._vertexPackage=i,this._owner=e.owner,this._attributeLocations={},this._initialize=!1,this._mapPass=n,this._boundingVolume=e.boundingVolume,this._oriCenter=e.oriCenter}function s$1(e,t,i){this._color=e,this._height=t,this._base=u$Z(i,0)}function v(e,t,i,n){this.interval=e,this.height=t,this.color=i||new e$1X(.5,.5,.5,1),this.backgroundColor=n||new e$1X(0,0,0,0)}T$2.prototype.initialize=function(e){this._initialize||(this.createCommand(e),this._initialize=!0)},T$2.prototype.createVertexData=function(e){var t=this._vertexPackage.vertexAttributes;for(var i in this._vertexPackage.attrLocation){var n=this._vertexPackage.attrLocation[i];this._vertexPackage.vertexAttributes[n].name=i}for(var r=0,o=t.length;r<o;r++){var a=t[r];!e$2e(a.typedArray)||(a.vertexBuffer=t$X.createVertexBuffer({context:e,typedArray:a.typedArray,usage:A$18.STATIC_DRAW}),a.typedArray=null,delete a.typedArray)}return this._attributeLocations=this._vertexPackage.attrLocation,t},T$2.prototype.createCommand=function(e){var t=this.createVertexData(e),i=Le$q.OPAQUE,n=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),r=this._vertexPackage.verticesCount,o=this._arrIndexPackage[0];if(e$2e(o)){var a=ce$z.UNSIGNED_SHORT;(1===o.indexType||r>=e$2d.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(a=ce$z.UNSIGNED_INT);var s=t$X.createIndexBuffer({context:e,typedArray:o.indicesTypedArray,usage:A$18.STATIC_DRAW,indexDatatype:a}),l=this._mapPass[o.materialCode]||_0xf77618.Default,u=W$18.TRIANGLES;switch(o.primitiveType){case 1:u=W$18.POINTS;break;case 2:u=W$18.LINES;break;case 4:u=W$18.TRIANGLES}var c=new i$$({primitiveType:u,boundingVolume:this._boundingVolume,pass:i,owner:this,cull:!1,modelMatrix:p$1d.clone(this._owner._modelMatrix)});c.vertexArray=new c$13({context:e,attributes:t,indexBuffer:s});var h=new s$V({name:"tiltIndicatorVS",sources:["attribute vec4 aPosition;\n attribute vec3 aNormal;\n attribute vec4 aTexCoord0;\n #ifdef VertexColor\n attribute vec4 aColor;\n #endif\n uniform vec4 uAmbientColor;\n uniform vec4 uDiffuseColor;\n uniform vec4 uSpecularColor;\n varying vec2 vTexCoord;\n varying vec4 vColor;\n const float SHIFT_LEFT8 = 256.0;\n const float SHIFT_RIGHT8 = 1.0 / 256.0;\n const vec4 LIGHT_COLOR = vec4(0.8, 0.8, 0.8, 1.0);\n vec4 vertexColor = vec4(1.0);\n #ifdef VertexColor\n vertexColor = aColor;\n #endif\n void main()\n {\n vec4 vertexPos = aPosition;\n vTexCoord = aTexCoord0.xy;\n vertexPos.w = 1.0;\n gl_Position = czm_modelViewProjection * vertexPos;\n vColor = vertexColor;\n vec4 eyePosition = czm_modelView * vertexPos;\n vec3 normal = normalize(aNormal);\n vec3 lightDirection = normalize(czm_sunPositionWC - vec3(eyePosition));\n float nDotL = max(dot(lightDirection, normal), 0.0);\n vec4 diffuse = uDiffuseColor * LIGHT_COLOR * nDotL;\n vec4 ambient = uAmbientColor * LIGHT_COLOR;\n vec4 materialColor = clamp(diffuse + ambient, vec4(0.0), vec4(1.0));\n vColor = vColor * materialColor;\n }"]}),d=new s$V({name:"tiltIndicatorFS",sources:["#ifdef TEXTURE_ENABLE\n uniform sampler2D uTexture;\n #endif\n varying vec2 vTexCoord;\n varying vec4 vColor;\n void main()\n {\n #ifdef TEXTURE_ENABLE\n vec2 vecTexCoord = vec2(vTexCoord.x,1.0-vTexCoord.y);\n gl_FragColor = texture2D(uTexture, vecTexCoord.xy, 0.0) * vColor;\n #else\n gl_FragColor = vColor;\n #endif\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n }"]});e$2e(this._attributeLocations.aTexCoord0)&&l._textures.length>0&&d.defines.push("TEXTURE_ENABLE"),e$2e(this._attributeLocations.aColor)&&h.defines.push("VertexColor"),c.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:this._attributeLocations}),c.uniformMap={uTexture:function(){return l._textures[0]},uAmbientColor:function(){return l._ambientColor},uDiffuseColor:function(){return l._diffuseColor},uSpecularColor:function(){return l._specularColor}},c.renderState=n,this._colorCommand=c,this._vertexPackage=null,this._arrIndexPackage.length=0}},T$2.prototype.isDestroyed=function(){return!1},T$2.prototype.destroy=function(){for(var e in this._mapPass)this._mapPass.hasOwnProperty(e)&&this._mapPass[e].destroy();return this._mapPass.length=0,e$2e(this._colorCommand)&&(this._colorCommand.vertexArray=this._colorCommand.vertexArray&&!this._colorCommand.vertexArray.isDestroyed()&&this._colorCommand.vertexArray.destroy(),this._colorCommand.shaderProgram=this._colorCommand.shaderProgram&&!this._colorCommand.shaderProgram.isDestroyed()&&this._colorCommand.shaderProgram.destroy(),this._colorCommand=void 0),this._vertexPackage=null,this._arrIndexPackage.length=0,this._attributeLocations=void 0,i$11(this)},s$1.prototype.getHeight=function(){return this._height},s$1.prototype.getBase=function(){return this._base},s$1.prototype.getStartTime=function(){return this._start},s$1.prototype.getStopTime=function(){return this._stop},s$1.prototype.setRange=function(e,t){this._start=e,this._stop=t},s$1.prototype.render=function(e){var t="";if(this._start&&this._stop&&this._color){var i=a$15.secondsDifference(this._start,e.epochJulian),n=Math.round(e.timeBarWidth*e.getAlpha(i)),r=a$15.secondsDifference(this._stop,e.epochJulian),o=Math.round(e.timeBarWidth*e.getAlpha(r))-n;n<0&&(o+=n,n=0),n+o>e.timeBarWidth&&(o=e.timeBarWidth-n),o>0&&(t='<span class="supermap3d-timeline-highlight" style="left: '+n.toString()+"px; width: "+o.toString()+"px; bottom: "+this._base.toString()+"px; height: "+this._height+"px; background-color: "+this._color+';"></span>')}return t},v.prototype.render=function(e,t){var i=this.interval.start,n=this.interval.stop,r=t.startJulian,o=a$15.addSeconds(t.startJulian,t.duration,new a$15);if(a$15.lessThan(i,r)&&a$15.greaterThan(n,o))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(a$15.lessThanOrEquals(i,o)&&a$15.greaterThanOrEquals(n,r)){var a,s,l;for(a=0;a<t.timeBarWidth;++a){var u=a$15.addSeconds(t.startJulian,a/t.timeBarWidth*t.duration,new a$15);!e$2e(s)&&a$15.greaterThanOrEquals(u,i)?s=a:!e$2e(l)&&a$15.greaterThanOrEquals(u,n)&&(l=a)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),e$2e(s)&&(e$2e(l)||(l=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(s,t.y,Math.max(l-s,1),this.height))}};var Z=1e12,_={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},c$1={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},T$1=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6];function u$3(e,t){if(!e$2e(e))throw new t$15("container is required.");if(!e$2e(t))throw new t$15("clock is required.");e=i$c(e),this.container=e;var i=document.createElement("div");i.className="supermap3d-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=_.none,this._touchMode=c$1.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="supermap3d-timeline-bar"></div><div class="supermap3d-timeline-trackContainer"><canvas class="supermap3d-timeline-tracks" width="10" height="1"></canvas></div><div class="supermap3d-timeline-needle"></div><span class="supermap3d-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=ot(this),this._onMouseUp=at(this),this._onMouseMove=rt(this),this._onMouseWheel=ht(this),this._onTouchStart=ct(this),this._onTouchMove=dt(this),this._onTouchEnd=ut(this);var n=this._timeBarEle;document.addEventListener("mouseup",this._onMouseUp,!1),document.addEventListener("mousemove",this._onMouseMove,!1),n.addEventListener("mousedown",this._onMouseDown,!1),n.addEventListener("touchstart",this._onTouchStart,!1),n.addEventListener("touchend",this._onTouchEnd,!1),n.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}function A(e){return e<10?"0"+e.toString():e.toString()}function ot(e){return function(t){e._mouseMode!==_.touchOnly&&(0===t.button?(e._mouseMode=_.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,2===t.button?e._mouseMode=_.zoom:e._mouseMode=_.slide)),t.preventDefault()}}function at(e){return function(t){e._mouseMode=_.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function rt(e){return function(t){var i;if(e._mouseMode===_.scrub){t.preventDefault();var n=t.clientX-e._topDiv.getBoundingClientRect().left;n<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):n>e._topDiv.clientWidth||(e._timelineDragLocation=void 0,e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===_.slide){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i){var r=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(a$15.addSeconds(e._startJulian,r,new a$15),a$15.addSeconds(e._endJulian,r,new a$15))}}else e._mouseMode===_.zoom&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i&&e.zoomFrom(Math.pow(1.01,i)))}}function ht(e){return function(t){var i=t.wheelDeltaY||t.wheelDelta||-t.detail;i/=Z=Math.max(Math.min(Math.abs(i),Z),1),e.zoomFrom(Math.pow(1.05,-i))}}function ct(e){return function(t){var i,n,r=t.touches.length,o=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=_.touchOnly,1===r?(i=a$15.secondsDifference(e._scrubJulian,e._startJulian),n=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+o),Math.abs(t.touches[0].clientX-n)<50?(e._touchMode=c$1.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===r?"-16px 0":"0 0")):(e._touchMode=c$1.singleTap,e._touchState.centerX=t.touches[0].clientX-o)):2===r?(e._touchMode=c$1.slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-o,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=c$1.ignore}}function ut(e){return function(t){var i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===c$1.singleTap?(e._touchMode=c$1.scrub,e._onTouchMove(t)):e._touchMode===c$1.scrub&&e._onTouchMove(t),e._mouseMode=_.touchOnly,1!==i?e._touchMode=i>0?c$1.ignore:c$1.none:e._touchMode===c$1.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function dt(e){return function(t){var i,n,r,o,a,s,l=1,u=e._topDiv.getBoundingClientRect().left;e._touchMode===c$1.singleTap&&(e._touchMode=c$1.slideZoom),e._mouseMode=_.touchOnly,e._touchMode===c$1.scrub?(t.preventDefault(),1===t.changedTouches.length&&((n=t.changedTouches[0].clientX-u)>=0&&n<=e._topDiv.clientWidth&&e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===c$1.slideZoom&&(2===(r=t.touches.length)?(o=.5*(t.touches[0].clientX+t.touches[1].clientX)-u,a=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===r&&(o=t.touches[0].clientX-u,a=0),e$2e(o)&&(a>0&&e._touchState.spanX>0?(l=e._touchState.spanX/a,s=a$15.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-o*e._timeBarSecondsSpan*l)/e._topDiv.clientWidth,new a$15)):(i=e._touchState.centerX-o,s=a$15.addSeconds(e._startJulian,i*e._timeBarSecondsSpan/e._topDiv.clientWidth,new a$15)),e.zoomTo(s,a$15.addSeconds(s,e._timeBarSecondsSpan*l,new a$15)),e._touchState.centerX=o,e._touchState.spanX=a))}}function f(e){return n$17("Assets/Textures/SkyBox/tycho2t3_80_"+e+".jpg")}function U(e){e._renderLoopRunning=!0;var t=0;p$H((function i(n){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{var r=e._targetFrameRate;if(e$2e(r)){var o=1e3/r,a=n-t;a>o&&(e.resize(),e.render(),t=n-a%o),p$H(i)}else e.resize(),e.render(),p$H(i)}catch(t){e._errorListenerEvent.raiseEvent(t)}else e._renderLoopRunning=!1}))}function j$2(e){var t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,e._pixelRatio=t,e$2e(e._scene)&&(e._scene.pixelRatio=t),t}function x(e){var t=e._canvas,i=t.clientWidth,n=t.clientHeight,r=j$2(e);e._canvasClientWidth=i,e._canvasClientHeight=n,i*=r,n*=r,t.width=i,t.height=n,e._canRender=0!==i&&0!==n,e._lastDevicePixelRatio=window.devicePixelRatio}function L$1(e){var t=e._canvas,i=t.width,n=t.height;if(0!==i&&0!==n){var r=e._scene.camera.frustum;e$2e(r.aspectRatio)?r.aspectRatio=i/n:(r.top=r.right*(n/i),r.bottom=-r.top)}}function u$2(e,t){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e),t=u$Z(t,{}),this._options=t;var i=document.createElement("div");i.className="supermap3d-widget",e.appendChild(i);var n=document.createElement("canvas"),r=s$Z.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=r,r&&(n.style.imageRendering=s$Z.imageRenderingValue()),n.oncontextmenu=function(){return!1},n.onselectstart=function(){return!1},i.appendChild(n);var o=document.createElement("div");o.className="supermap3d-widget-credits";var a=e$2e(t.creditContainer)?i$c(t.creditContainer):i;a.appendChild(o);var s=e$2e(t.creditViewport)?i$c(t.creditViewport):i,l=u$Z(t.showRenderLoopErrors,!0),u=u$Z(t.useBrowserRecommendedResolution,!0);this._element=i,this._container=e,this._canvas=n,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=s,this._creditContainer=a,this._innerCreditContainer=o,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=l,this._resolutionScale=1,this._useBrowserRecommendedResolution=u,this._forceResize=!1,this._clock=e$2e(t.clock)?t.clock:new u$H,this._isShowErrorPanel=!0,this._errorListenerEvent=new o$1h,x(this),(!e$2e(t.contextOptions)||!e$2e(t.contextOptions)||t.contextOptions.contextType!=Me$j.WebGPU)&&this._initScene()}function E(e){var t=!1,i=window.screen;return e$2e(i)&&(e$2e(i.lockOrientation)?t=i.lockOrientation(e):e$2e(i.mozLockOrientation)?t=i.mozLockOrientation(e):e$2e(i.msLockOrientation)?t=i.msLockOrientation(e):e$2e(i.orientation&&i.orientation.lock)&&(t=i.orientation.lock(e))),t}function u$1(){var e=window.screen;e$2e(e)&&(e$2e(e.unlockOrientation)?e.unlockOrientation():e$2e(e.mozUnlockOrientation)?e.mozUnlockOrientation():e$2e(e.msUnlockOrientation)?e.msUnlockOrientation():e$2e(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function O$1(e,t,i,n){n()||(i()?(t.useWebVR=!1,e._locked&&(u$1(),e._locked=!1),e._noSleep.disable(),l$1e.exitFullscreen(),i(!1)):(l$1e.fullscreen||l$1e.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=E("landscape")),t.useWebVR=!0,i(!0)))}function a(e,t){if(!e$2e(e))throw new t$15("scene is required.");var i=this,n=ce$1.observable(l$1e.enabled),r=ce$1.observable(!1);this.isVRMode=void 0,ce$1.defineProperty(this,"isVRMode",{get:function(){return r()}}),this.isVREnabled=void 0,ce$1.defineProperty(this,"isVREnabled",{get:function(){return n()},set:function(e){n(e&&l$1e.enabled)}}),this.tooltip=void 0,ce$1.defineProperty(this,"tooltip",(function(){return n()?r()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"}));var o=ce$1.observable(!1);this._isOrthographic=void 0,ce$1.defineProperty(this,"_isOrthographic",{get:function(){return o()}}),this._eventHelper=new n$x,this._eventHelper.add(e.preRender,(function(){o(e.camera.frustum instanceof a$V)})),this._locked=!1,this._noSleep=new b$4,this._command=s$4((function(){O$1(i,e,r,o)}),ce$1.getObservable(this,"isVREnabled")),this._vrElement=u$Z(i$c(t),document.body),this._callback=function(){!l$1e.fullscreen&&r()&&(e.useWebVR=!1,i._locked&&(u$1(),i._locked=!1),i._noSleep.disable(),r(!1))},document.addEventListener(l$1e.changeEventName,this._callback)}u$3.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},u$3.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},u$3.prototype.isDestroyed=function(){return!1},u$3.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this),document.removeEventListener("mouseup",this._onMouseUp,!1),document.removeEventListener("mousemove",this._onMouseMove,!1);var e=this._timeBarEle;e.removeEventListener("mousedown",this._onMouseDown,!1),e.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),e.removeEventListener("mousewheel",this._onMouseWheel,!1),e.removeEventListener("touchstart",this._onTouchStart,!1),e.removeEventListener("touchmove",this._onTouchMove,!1),e.removeEventListener("touchend",this._onTouchEnd,!1),e.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),i$11(this)},u$3.prototype.addHighlightRange=function(e,t,i){var n=new s$1(e,t,i);return this._highlightRanges.push(n),this.resize(),n},u$3.prototype.addTrack=function(e,t,i,n){var r=new v(e,t,i,n);return this._trackList.push(r),this._lastHeight=void 0,this.resize(),r},u$3.prototype.zoomTo=function(e,t){if(!e$2e(e))throw new t$15("startTime is required.");if(!e$2e(t))throw new t$15("stopTime is required");if(a$15.lessThanOrEquals(t,e))throw new t$15("Start time must come before end time.");if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=a$15.secondsDifference(t,e),this._clock&&this._clock.clockRange!==tt$a.UNBOUNDED){var i=this._clock.startTime,n=this._clock.stopTime,r=a$15.secondsDifference(n,i),o=a$15.secondsDifference(i,this._startJulian),a=a$15.secondsDifference(n,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):o>0?(this._endJulian=a$15.addSeconds(this._endJulian,o,new a$15),this._startJulian=i,this._timeBarSecondsSpan=a$15.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=a$15.addSeconds(this._startJulian,a,new a$15),this._endJulian=n,this._timeBarSecondsSpan=a$15.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();var s=document.createEvent("Event");s.initEvent("setzoom",!0,!0),s.startJulian=this._startJulian,s.endJulian=this._endJulian,s.epochJulian=this._epochJulian,s.totalSpan=this._timeBarSecondsSpan,s.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(s)},u$3.prototype.zoomFrom=function(e){var t=a$15.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;var i=this._timeBarSecondsSpan-t;this.zoomTo(a$15.addSeconds(this._startJulian,t-t*e,new a$15),a$15.addSeconds(this._endJulian,i*e-i,new a$15))},u$3.prototype.makeLabel=function(e){var t=a$15.toGregorianDate(e),i=t.hour+8;return i>=24&&(i-=24),A(i)+":"+A(t.minute)+":"+A(t.second)},u$3.prototype.smallestTicInPixels=7,u$3.prototype._makeTics=function(){var e,t=this._timeBarEle,i=a$15.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(i*this._topDiv.clientWidth/this._timeBarSecondsSpan),r=n-8,o=this;this._needleEle.style.left=n.toString()+"px";var a="",s=.01,l=31536e6,u=1e-10,c=0,h=this._timeBarSecondsSpan;h<s?(h=s,this._timeBarSecondsSpan=s,this._endJulian=a$15.addSeconds(this._startJulian,s,new a$15)):h>l&&(h=l,this._timeBarSecondsSpan=l,this._endJulian=a$15.addSeconds(this._startJulian,l,new a$15));var d=this._timeBarEle.clientWidth;d<10&&(d=10);var f,p=this._startJulian,_=Math.min(h/d*1e-5,.4),m=a$15.toGregorianDate(p);f=h>31536e4?a$15.fromDate(new Date(Date.UTC(100*Math.floor(m.year/100),0))):h>31536e3?a$15.fromDate(new Date(Date.UTC(10*Math.floor(m.year/10),0))):h>86400?a$15.fromDate(new Date(Date.UTC(m.year,0))):a$15.fromDate(new Date(Date.UTC(m.year,m.month,m.day)));var g=a$15.secondsDifference(this._startJulian,a$15.addSeconds(f,_,new a$15)),x=g+h;function y(e){return Math.floor(g/e)*e}function v(e,t){return Math.ceil(e/t+.5)*t}function $(e){return(e-g)/h}function b(e,t){return e-t*Math.round(e/t)}this._epochJulian=f,this._rulerEle.innerHTML=this.makeLabel(a$15.addSeconds(this._endJulian,-s,new a$15));var T=this._rulerEle.offsetWidth+20;T<30&&(T=180);var C=c;c-=u;var S={startTime:g,startJulian:p,epochJulian:f,duration:h,timeBarWidth:d,getAlpha:$};this._highlightRanges.forEach((function(e){a+=e.render(S)}));var w=0,E=0,P=0,A=T/d;A>1&&(A=1),A*=this._timeBarSecondsSpan;var L,M=-1,R=-1,O=T$1.length;for(L=0;L<O;++L){var D=T$1[L];if(++M,w=D,D>A&&D>c)break;R<0&&d*(D/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(R=M)}if(M>0){for(;M>0;)if(--M,Math.abs(b(w,T$1[M]))<1e-5){T$1[M]>=c&&(E=T$1[M]);break}if(R>=0)for(;R<M;){if(Math.abs(b(E,T$1[R]))<1e-5&&T$1[R]>=c){P=T$1[R];break}++R}}(c=C)>u&&P<1e-5&&Math.abs(c-w)>u&&(P=c,c<=w+u&&(E=0));var I,F=-999999;if(d*(P/this._timeBarSecondsSpan)>=3)for(e=y(P);e<=x;e=v(e,P))a+='<span class="supermap3d-timeline-ticTiny" style="left: '+Math.round(d*$(e)).toString()+'px;"></span>';if(d*(E/this._timeBarSecondsSpan)>=3)for(e=y(E);e<=x;e=v(e,E))a+='<span class="supermap3d-timeline-ticSub" style="left: '+Math.round(d*$(e)).toString()+'px;"></span>';if(d*(w/this._timeBarSecondsSpan)>=2){this._mainTicSpan=w,x+=w,e=y(w);for(var B=a$15.computeTaiMinusUtc(f);e<=x;){var N=a$15.addSeconds(p,e-g,new a$15);if(w>2.1){var G=a$15.computeTaiMinusUtc(N);Math.abs(G-B)>.1&&(e+=G-B,N=a$15.addSeconds(p,e-g,new a$15))}var z=Math.round(d*$(e)),U=this.makeLabel(N);this._rulerEle.innerHTML=U,(I=this._rulerEle.offsetWidth)<10&&(I=T);var V=z-(I/2-1);V>F?(F=V+I+271,a+='<span class="supermap3d-timeline-ticMain" style="left: '+z.toString()+'px;"></span><span class="supermap3d-timeline-ticLabel" style="left: '+V.toString()+'px;">'+U+"</span>"):a+='<span class="supermap3d-timeline-ticSub" style="left: '+z.toString()+'px;"></span>',e=v(e,w)}}else this._mainTicSpan=-1;a+='<span class="supermap3d-timeline-icon16" style="left:'+r+'px;bottom:0;background-position: 0 0;"></span>',t.innerHTML=a,this._scrubElement=t.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),S.y=0,this._trackList.forEach((function(e){e.render(o._context,S),S.y+=e.height}))},u$3.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;var e=this._scrubElement;if(e$2e(this._scrubElement)){var t=a$15.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==i&&(this._lastXPos=i,e.style.left=i-8+"px",this._needleEle.style.left=i+"px")}e$2e(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(a$15.addSeconds(this._startJulian,this._timelineDrag,new a$15),a$15.addSeconds(this._endJulian,this._timelineDrag,new a$15)))},u$3.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=a$15.addSeconds(this._startJulian,t,new a$15),this._scrubElement){var i=e-8;this._scrubElement.style.left=i.toString()+"px",this._needleEle.style.left=e.toString()+"px"}var n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)},u$3.prototype.resize=function(){var e=this.container.clientWidth,t=this.container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){this._trackContainer.style.height=t+"px";var i=1;this._trackList.forEach((function(e){i+=e.height})),this._trackListEle.style.height=i.toString()+"px",this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=i,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t}},Object.defineProperties(u$2.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},scenePromise:{get:function(){if(e$2e(this._options)&&e$2e(this._options.contextOptions)&&e$2e(this._options.contextOptions.contextType)&&this._options.contextOptions.contextType==Me$j.WebGPU){var e=this;return _0x4cd9cc.CreateAsync(this._canvas,{doNotHandleContextLost:!0,deviceDescriptor:{requiredFeatures:["depth-clamping","depth32float-stencil8","depth24unorm-stencil8","texture-compression-bc","timestamp-query"]}}).then((function(t){return e._options.engine=t,t.compatibilityMode=!1,e._initScene(),console.log("SuperMap - WebGPU Engine"),e._scene})).catch((function(e){console.log("Can not create WebGPU Device and/or context.")}))}return Promise.resolve(this._scene)}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){if(e<=0)throw new t$15("targetFrameRate must be greater than 0, or undefined.");this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&U(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){if(e<=0)throw new t$15("resolutionScale must be greater than 0.");this._resolutionScale=e,this._forceResize=!0}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}},setErrorPanelIsShow:{get:function(){return this._isShowErrorPanel},set:function(e){this._isShowErrorPanel!==e&&(this._isShowErrorPanel=e)}},errorListenerEvent:{get:function(){return this._errorListenerEvent}}}),u$2.prototype._initScene=function(){var e=this._options;try{var t=new w$4({canvas:this._canvas,contextOptions:e.contextOptions,engine:e.engine,creditContainer:this._innerCreditContainer,creditViewport:this._creditViewport,mapProjection:e.mapProjection,orderIndependentTranslucency:e.orderIndependentTranslucency,scene3DOnly:u$Z(e.scene3DOnly,!1),terrainExaggeration:e.terrainExaggeration,shadows:e.shadows,mapMode2D:e.mapMode2D,requestRenderMode:e.requestRenderMode,maximumRenderTimeChange:e.maximumRenderTimeChange,pcss:e.pcss,shadowQuality:u$Z(e.shadowQuality,0)});t.pixelRatio=this._pixelRatio,this._scene=t,t.camera.constrainedAxis=o$1p.UNIT_Z,L$1(this);var i=u$Z(t.mapProjection.ellipsoid,t$12.WGS84),n=e.globe;e$2e(n)||(n=new h$d(i)),!1!==n&&(t.globe=n,t.globe.shadows=u$Z(e.terrainShadows,W$X.RECEIVE_ONLY));var r=e.skyBox;e$2e(r)||(r=new h$5({sources:{positiveX:f("px"),negativeX:f("mx"),positiveY:f("py"),negativeY:f("my"),positiveZ:f("pz"),negativeZ:f("mz")}})),!1!==r&&(t.skyBox=r,t.sun=new u$5,t.moon=new n$9);var o=e.cloudBox;e$2e(o)&&(t.cloudBox=o);var a=e.skyAtmosphere;e$2e(a)||(a=new h$6(i)),!1!==a&&(t.skyAtmosphere=a);var s=!1!==e.globe&&e.imageryProvider;e$2e(s)||(s=new u$f({url:n$17("Assets/Textures/GlobalBkLayer.jpg")})),!1!==s&&t.imageryLayers.addImageryProvider(s),e$2e(e.terrainProvider)&&!1!==e.globe&&(t.terrainProvider=e.terrainProvider,e.terrainProvider.readyPromise.otherwise((function(){t.terrainProvider=t.globe._defaultTerrainProvider}))),e$2e(e.gridProvider)&&t.imageryLayers.addGridProvider(e.gridProvider),this._screenSpaceEventHandler=new g$K(this._canvas,!1),e$2e(e.sceneMode)&&(e.sceneMode===C$14.SCENE2D&&this._scene.morphTo2D(0),e.sceneMode===C$14.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=u$Z(e.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=e.targetFrameRate;var l=this;t.renderError.addEventListener((function(e,t){if(l._useDefaultRenderLoop=!1,l._renderLoopRunning=!1,l._showRenderLoopErrors){l.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,t)}}))}catch(e){if(this._showRenderLoopErrors){this.showErrorPanel("Error constructing Widget.","verify your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:",e)}throw e}},u$2.prototype.showErrorPanel=function(e,t,i){var n=this._element,r=document.createElement("div");r.className="supermap3d-widget-errorPanel",!1===this.setErrorPanelIsShow?r.style.display="none":r.style.display="block";var o=document.createElement("div");o.className="supermap3d-widget-errorPanel-content",r.appendChild(o);var a=document.createElement("div");a.className="cessupermap3dium-widget-errorPanel-header",a.appendChild(document.createTextNode(e)),o.appendChild(a);var s=document.createElement("div");function l(){s.style.maxHeight=Math.max(Math.round(.9*n.clientHeight-100),30)+"px"}if(s.className="supermap3d-widget-errorPanel-scroll",o.appendChild(s),l(),e$2e(window.addEventListener)&&window.addEventListener("resize",l,!1),e$2e(t)){var u=document.createElement("div");u.className="supermap3d-widget-errorPanel-message",u.innerHTML="<p>"+t+"</p>",s.appendChild(u)}var c="(no error details available)";e$2e(i)&&(c=f$T(i));var h=document.createElement("div");h.className="supermap3d-widget-errorPanel-message",h.appendChild(document.createTextNode(c)),s.appendChild(h);var d=document.createElement("div");d.className="supermap3d-widget-errorPanel-buttonPanel",o.appendChild(d);var f=document.createElement("button");f.setAttribute("type","button"),f.className="supermap3d-button",f.appendChild(document.createTextNode("OK")),f.onclick=function(){e$2e(l)&&e$2e(window.removeEventListener)&&window.removeEventListener("resize",l,!1),n.removeChild(r)},d.appendChild(f),n.appendChild(r),typeof console<"u"&&console.error(e+"\n"+t+"\n"+c)},u$2.prototype.isDestroyed=function(){return!1},u$2.prototype.destroy=function(){this._scene=this._scene&&this._scene.destroy(),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),i$11(this)},u$2.prototype.resize=function(){var e=this._canvas,t=e.clientWidth,i=e.clientHeight;!this._forceResize&&this._canvasClientWidth===t&&this._canvasClientHeight===i&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,x(this),L$1(this),this._scene.requestRender())},u$2.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();var e=this._clock.tick();this._scene.render(e)}else this._clock.tick()},Object.defineProperties(a.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){if(!(e instanceof Element))throw new t$15("value must be a valid Element.");this._vrElement=e}},command:{get:function(){return this._command}}}),a.prototype.isDestroyed=function(){return!1},a.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(l$1e.changeEventName,this._callback),i$11(this)};var p="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",h$1="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function r$1(e,t,i){if(!e$2e(e))throw new t$15("container is required.");if(!e$2e(t))throw new t$15("scene is required.");e=i$c(e);var n=new a(t,i);n._exitVRPath=h$1,n._enterVRPath=p;var r=document.createElement("button");r.type="button",r.className="supermap3d-button supermap3d-vrButton",r.setAttribute("data-bind",'css: { "supermap3d-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(r),ce$1.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}Object.defineProperties(r$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),r$1.prototype.isDestroyed=function(){return!1},r$1.prototype.destroy=function(){return this._viewModel.destroy(),ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$11(this)},new o$1o;var l$1="-1000px";function r(e,t,i){if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(t))throw new t$15("zoomIndicatorElement is required.");if(!e$2e(i))throw new t$15("container is required.");this._scene=e,this._screenPositionX=l$1,this._screenPositionY=l$1,this._tweens=e.tweens,this._container=u$Z(i,document.body),this._zoomIndicatorElement=t,this._scale=1,this._opacity=1,this.position=void 0,this.showSelection=!1,ce$1.track(this,["position","_screenPositionX","_screenPositionY","_opacity","showSelection"]),this.isVisible=void 0,ce$1.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&e$2e(this.position)}}),ce$1.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return s$R.wgs84ToWindowCoordinates(e,t,i)}}function o(e,t){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e),this._container=e;var i=document.createElement("div");i.className="supermap3d-zoom-wrapper",i.setAttribute("data-bind",' style: { "top" : _screenPositionY, "left" : _screenPositionX,"opacity" : _opacity }, css: { "supermap3d-zoom-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var n=document.createElement("img");n.src=n$17("Widgets/Images/ZoomIndicator/zoom_Identifiers.png"),n.style.width="48px",n.style.height="48px",i.appendChild(n);var o=new r(t,this._element,this._container);this._viewModel=o,ce$1.applyBindings(this._viewModel,this._element)}r.prototype.update=function(){var e=this.scene._screenSpaceCameraController;if(e.zoomActive){e.zoomActive=!1;var t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,r=o$1o.clone(e._zoomMouseStart);r.x=Math.min(Math.max(r.x,-48),i+48)-24,r.y=Math.min(Math.max(r.y,-48),n+48)-24,this._screenPositionX=Math.floor(r.x+.25)+"px",this._screenPositionY=Math.floor(r.y+.25)+"px",this._opacity=1,this.showSelection=!0,this.animateDepart()}},r.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:m$Y.EXPONENTIAL_OUT})},r.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_opacity",startValue:this._opacity,stopValue:0,duration:1,easingFunction:m$Y.EXPONENTIAL_OUT})},Object.defineProperties(r.prototype,{container:{get:function(){return this._container}},zoomIndicatorElement:{get:function(){return this._zoomIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(o.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),o.prototype.isDestroyed=function(){return!1},o.prototype.destroy=function(){var e=this._container;return ce$1.cleanNode(this._element),e.removeChild(this._element),i$11(this)};var P=new i$1d;function xe(e){var t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function Le(e,t){if(e$2e(e.scene._frameState)&&e$2e(e.scene._frameState.pickIDColor)&&(e.scene._frameState.pickIDColor=new e$1X(1,1,1,1)),e$2e(e._activeBillboard)){if(e$2e(e._activeBillboard.billboard._billboardsBySymbol))for(var i=e._activeBillboard.billboard._billboardsBySymbol.length,n=0;n<i;n++)e._activeBillboard.billboard._billboardsBySymbol[n].color=e._activeBillboard.originalColor;e._activeBillboard=void 0}return e.scene.pickAsync(t.position).then((i=>{if(i){var n=u$Z(i.id,i.primitive.id);if(n instanceof h$W)return Promise.resolve(n);if(e$2e(i.primitive)){if(e.scene.layers._layerQueue.length>0&&wt(e,t.position),e$2e(i.collection)&&i.collection._isMVT){if(e$2e(i.primitive)&&i.primitive instanceof n$J&&e$2e(i.primitive._billboardsBySymbol))for(var r=0;r<i.primitive._billboardsBySymbol.length;r++)e._activeBillboard={billboard:i.primitive,originalColor:e$1X.clone(i.primitive._billboardsBySymbol[r].color)},i.primitive._billboardsBySymbol[r].color=e$1X.CYAN;var o={pickResult:{featureID:i.primitive._id,layerID:i.primitive._mvtLayerID,mapName:i.primitive._mapName,position:i.primitive._position,primitive:i.primitive,properties:i.primitive._mvtProperties}};return Promise.resolve(o)}for(var a=e.scene._vectorTileSource.values.length-1;a>=0;a--){var s=e.scene._vectorTileSource.values[a];s._MVTStyle.cancelHighLight(s)}return Promise.resolve(i)}}return e$2e(e.scene.globe)?Promise.resolve(Ae(e.scene,t.position)):Promise.resolve(!1)}))}function Ve(e,t,i){if(e$2e(i)){var n=i.clock;e$2e(n)&&(n.getValue(t),e$2e(e)&&(e.updateFromClock(),e.zoomTo(n.startTime,n.stopTime)))}}var Re=new o$1p;function Ae(e,t){var i=null,n=e._frameState;return e.pickPositionAsync(t).then((t=>{if(!e$2e(t))return Promise.resolve(null);for(var r=a$18.fromCartesian(t),o=e._vectorTileSource.values.length-1;o>=0;o--){var a=e._vectorTileSource.values[o];if((!e$2e(a._selectEnabled)||a._selectEnabled)&&e$2e(i=a.pick(r,n)))return i.mapName=a._owner._name,Promise.resolve(new h$W({id:i.featureID,layerID:i.layerID,pickResult:i}))}return Promise.resolve(null)}))}function wt(e,t){var i=e.scene,n=i.layers.pickFeatures(t,i);if(!e$2e(n))return!1;var r=new h$W({id:"Loading...",description:"Loading feature information..."});o$1l(n,(function(i){if(e$2e(i)){var n=i.fieldNames,r=i.fieldValues;if(e$2e(n)&&e$2e(r)){for(var o={},a=0,s=n.length;a<s;a++)o[n[a]]=r[a];var l=new h$W({feature:o});if(e.scene.pickPositionAsync(t).then((e=>{l.scenePos=e})),e$2e(o.position)){var u=e.scene.globe.ellipsoid.cartographicToCartesian(o.position,Re);l.position=new r$V(u)}e$2e(i.geometry)&&(o.geometry=i.geometry),e.selectedEntity=l,e.pickEvent.raiseEvent(o)}else e.selectedEntity=void 0}else e.selectedEntity=void 0}),(function(){e.selectedEntity===r&&(e.selectedEntity=void 0)}))}function Bt(e,t){var i=e._geocoder,n=e._homeButton,r=e._sceneModePicker,o=e._projectionPicker,a=e._baseLayerPicker,s=e._animation,l=e._timeline,u=e._fullscreenButton,c=e._infoBox,h=e._selectionIndicator,d=t?"hidden":"visible";if(e$2e(i)&&(i.container.style.visibility=d),e$2e(n)&&(n.container.style.visibility=d),e$2e(r)&&(r.container.style.visibility=d),e$2e(o)&&(o.container.style.visibility=d),e$2e(a)&&(a.container.style.visibility=d),e$2e(s)&&(s.container.style.visibility=d),e$2e(l)&&(l.container.style.visibility=d),e$2e(u)&&u.viewModel.isFullscreenEnabled&&(u.container.style.visibility=d),e$2e(c)&&(c.container.style.visibility=d),e$2e(h)&&(h.container.style.visibility=d),e._container){var f=t||!e$2e(u)?0:u.container.clientWidth;e._vrButton.container.style.right=f+"px",e.forceResize()}}function u(e,t){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e),this._container=e;var i=(!e$2e((t=u$Z(t,u$Z.EMPTY_OBJECT)).globe)||!1!==t.globe)&&e$2e(t.baseLayerPicker)&&!1!==t.baseLayerPicker;if(!i&&e$2e(t.selectedImageryProviderViewModel))throw new t$15("options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.imageryProvider instead or set options.baseLayerPicker to true.");if(!i&&e$2e(t.selectedTerrainProviderViewModel))throw new t$15("options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.terrainProvider instead or set options.baseLayerPicker to true.");var n=document.createElement("div");n.className="supermap3d-viewer",e.appendChild(n);var r=document.createElement("div");r.className="supermap3d-viewer-WidgetContainer",n.appendChild(r);var o=document.createElement("div");o.className="supermap3d-viewer-bottom",n.appendChild(o),this._bottomContainer=o,this._viewerContainer=n;var a,s=u$Z(t.scene3DOnly,!1);if(e$2e(t.clockViewModel))a=t.clockViewModel.clock;else{var l=new Date;l.setHours(10),new r$a(a=new u$H({currentTime:a$15.fromDate(l)}))}a.shouldAnimate=u$Z(t.shouldAnimate,!1),this._clock=a;var u=new u$2(r,{terrainProvider:t.terrainProvider,imageryProvider:!i&&!e$2e(t.imageryProvider)&&void 0,gridProvider:t.gridProvider,clock:a,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:e$2e(t.creditContainer)?t.creditContainer:o,creditViewport:t.creditViewport,scene3DOnly:s,terrainExaggeration:t.terrainExaggeration,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,cloudBox:t.cloudBox,pcss:t.pcss,shadowQuality:t.shadowQuality});this._Widget=u,this._options=t,(!e$2e(t.contextOptions)||!e$2e(t.contextOptions.contextType)||t.contextOptions.contextType!=Me$j.WebGPU)&&this._initScene(t)}Object.defineProperties(u.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},Widget:{get:function(){return this._Widget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},navigation:{get:function(){return this._navigation}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._Widget.canvas}},cesiumLogo:{get:function(){return this._Widget.cesiumLogo}},scene:{get:function(){return this._Widget.scene}},scenePromise:{get:function(){var e=this;return this._Widget.scenePromise.then((t=>(e$2e(e._options)&&e$2e(e._options.contextOptions)&&e$2e(e._options.contextOptions.contextType)&&e._options.contextOptions.contextType==Me$j.WebGPU&&e._initScene(e._options),Promise.resolve(t))))}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainLayers:{get:function(){return this.scene.terrainLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e;var t=this;e.readyPromise.otherwise((function(){t.scene.terrainProvider=t.scene.globe._defaultTerrainProvider}))}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._Widget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._Widget.targetFrameRate},set:function(e){this._Widget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._Widget.useDefaultRenderLoop},set:function(e){this._Widget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._Widget.resolutionScale},set:function(e){this._Widget.resolutionScale=e,this._forceResize=!0}},useBrowserRecommendedResolution:{get:function(){return this._Widget.useBrowserRecommendedResolution},set:function(e){this._Widget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,ue(this);var t=this.scene,i=t.mode;e$2e(e)&&e$2e(e.position)?this._needTrackedEntityUpdate=!0:(this._needTrackedEntityUpdate=!1,(i===C$14.COLUMBUS_VIEW||i===C$14.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(i===C$14.COLUMBUS_VIEW||i===C$14.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(p$1d.IDENTITY)),this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;var t=e$2e(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;e$2e(e)?e$2e(t)&&t.animateAppear():e$2e(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,Ve(this._timeline,this.clock,e))}}}),u.prototype._initScene=function(e){var i=this,n=this._Widget.scene,r=e.dataSources,a=!1;e$2e(r)||(r=new i$t,a=!0);var s,l=new u$p({scene:n,dataSourceCollection:r}),c=this._clock,h=!1;e$2e(e.clockViewModel)?s=e.clockViewModel:(s=new r$a(c),h=!0);var d=new n$x;d.add(c.onTick,u.prototype._onTick,this),d.add(n.morphStart,u.prototype._clearTrackedObject,this);var f,p,_=this._viewerContainer;if(!e$2e(e.selectionIndicator)||!1!==e.selectionIndicator){var m=document.createElement("div");m.className="supermap3d-viewer-selectionIndicatorContainer",_.appendChild(m),f=new i$1(m,n)}if(!e$2e(e.infoBox)||!1!==e.infoBox){var g=document.createElement("div");g.className="supermap3d-viewer-infoBoxContainer",_.appendChild(g);var x=(p=new l$4(g)).viewModel;d.add(x.cameraClicked,u.prototype._onInfoBoxCameraClicked,this),d.add(x.closeClicked,u.prototype._onInfoBoxClockClicked,this)}var y,v,$=document.createElement("div");if($.className="supermap3d-viewer-toolbar",_.appendChild($),e$2e(e.geocoder)&&!1!==e.geocoder){var b,T=document.createElement("div");T.className="supermap3d-viewer-geocoderContainer",$.appendChild(T),e$2e(e.geocoder)&&"boolean"!=typeof e.geocoder&&(b=Array.isArray(e.geocoder)?e.geocoder:[e.geocoder]),y=new s$3({container:T,geocoderServices:b,scene:n,viewer:this}),d.add(y.viewModel.search.beforeExecute,u.prototype._clearObjects,this)}if(e$2e(e.homeButton)&&!1!==e.homeButton&&(v=new o$3($,n),e$2e(y)&&d.add(v.viewModel.command.afterExecute,(function(){var e=y.viewModel;e.searchText="",e.isSearchInProgress&&e.search()})),d.add(v.viewModel.command.beforeExecute,u.prototype._clearTrackedObject,this)),!0===e.sceneModePicker&&w)throw new t$15("options.sceneModePicker is not available when options.scene3DOnly is set to true.");var C,S,w=u$Z(e.scene3DOnly,!1);!w&&e$2e(e.sceneModePicker)&&!1!==e.sceneModePicker&&(C=new c$2($,n)),e.projectionPicker&&(S=new n$1($,n));var E,P,A,L,M,R,O,D,I,F,B,N,G=(!e$2e(e.globe)||!1!==e.globe)&&e$2e(e.baseLayerPicker)&&!1!==e.baseLayerPicker;if(G){var z=u$Z(e.imageryProviderViewModels,m$4()),U=u$Z(e.terrainProviderViewModels,n$3());E=new g$3($,{globe:n.globe,imageryProviderViewModels:z,selectedImageryProviderViewModel:e.selectedImageryProviderViewModel,terrainProviderViewModels:U,selectedTerrainProviderViewModel:e.selectedTerrainProviderViewModel}),P=$.getElementsByClassName("supermap3d-baseLayerPicker-dropDown")[0]}if(e$2e(e.imageryProvider)&&!1!==e.imageryProvider&&(G&&(E.viewModel.selectedImagery=void 0),n.imageryLayers.removeAll(),n.imageryLayers.addImageryProvider(e.imageryProvider)),e$2e(e.terrainProvider)&&(G&&(E.viewModel.selectedTerrain=void 0),n.terrainProvider=e.terrainProvider),e$2e(e.navigationHelpButton)&&!1!==e.navigationHelpButton){var V=!0;try{if(e$2e(window.localStorage)){var k=window.localStorage.getItem("supermap3d-hasSeenNavHelp");e$2e(k)&&Boolean(k)?V=!1:window.localStorage.setItem("supermap3d-hasSeenNavHelp","true")}}catch{}A=new l$3({container:$,instructionsInitiallyVisible:u$Z(e.navigationInstructionsInitiallyVisible,V)})}if(e$2e(e.animation)&&!1!==e.animation){var W=document.createElement("div");W.className="supermap3d-viewer-animationContainer",_.appendChild(W),L=new y$4(W,new m$5(s))}if(e$2e(e.timeline)&&!1!==e.timeline){var H=document.createElement("div");H.className="supermap3d-viewer-timelineContainer",_.appendChild(H),(M=new u$3(H,c)).addEventListener("settime",xe,!1);var q=a$15.clone(c.startTime);q.secondsOfDay=14400;var j=a$15.clone(c.stopTime);j.secondsOfDay=14400,M.zoomTo(q,j)}if(e$2e(e.fullscreenButton)&&!1!==e.fullscreenButton&&((D=document.createElement("div")).className="supermap3d-viewer-fullscreenContainer",_.appendChild(D),O=c$5((R=new r$5(D,e.fullscreenElement)).viewModel,"isFullscreenEnabled",(function(e){D.style.display=e?"block":"none",e$2e(M)&&(M.container.style.right=D.clientWidth+"px",M.resize())}))),e.vrButton){var X=document.createElement("div");X.className="supermap3d-viewer-vrContainer",_.appendChild(X),F=c$5((I=new r$1(X,n,e.fullScreenElement)).viewModel,"isVREnabled",(function(e){X.style.display=e?"block":"none",e$2e(R)&&(X.style.right=D.clientWidth+"px"),e$2e(M)&&(M.container.style.right=X.clientWidth+"px",M.resize())})),B=c$5(I.viewModel,"isVRMode",(function(e){Bt(i,e)}))}if(!e$2e(e.navigation)||!1!==e.navigation){var Y=document.createElement("div");Y.className="supermap3d-viewer-navigationContainer",_.appendChild(Y),N=new t({container:Y,scene:n,viewer:this})}this._scratchHoldUrl="url("+n$17("Widgets/Images/cur/Hold.cur")+"), auto",this._scratchPanUrl="url("+n$17("Widgets/Images/cur/Pan.cur")+"), auto",this._activeBillboard=void 0,this._baseLayerPickerDropDown=P,this._fullscreenSubscription=O,this._vrSubscription=F,this._vrModeSubscription=B,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=u$Z(e.automaticallyTrackDataSourceClocks,!0),this._element=_,this._selectionIndicator=f,this._infoBox=p,this._dataSourceCollection=r,this._destroyDataSourceCollection=a,this._dataSourceDisplay=l,this._clockViewModel=s,this._destroyClockViewModel=h,this._toolbar=$,this._homeButton=v,this._sceneModePicker=C,this._projectionPicker=S,this._baseLayerPicker=E,this._navigationHelpButton=A,this._animation=L,this._timeline=M,this._fullscreenButton=R,this._vrButton=I,this._geocoder=y,this._navigation=N,this._eventHelper=d,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=e$2e(p)||e$2e(f),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._clockTrackedDataSource=void 0,this._forceResize=!1,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new o$1h,this._trackedEntityChanged=new o$1h,this._capturePointSize=16,this._capturePointColor=e$1X.fromCssColorString("#0173c7"),ce$1.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),d.add(r.dataSourceAdded,u.prototype._onDataSourceAdded,this),d.add(r.dataSourceRemoved,u.prototype._onDataSourceRemoved,this),d.add(n.postUpdate,u.prototype.resize,this),d.add(n.postRender,u.prototype._postRender,this);for(var Z=r.length,K=0;K<Z;K++)this._dataSourceAdded(r,r.get(K));this._dataSourceAdded(void 0,l.defaultDataSource),d.add(r.dataSourceAdded,u.prototype._dataSourceAdded,this),d.add(r.dataSourceRemoved,u.prototype._dataSourceRemoved,this);var Q=this._Widget;Q.screenSpaceEventHandler.setInputAction((function(e){Le(i,e).then((e=>{i.selectedEntity=e}))}),G$J.LEFT_CLICK),Q.screenSpaceEventHandler.setInputAction((function(e){Le(i,e).then((e=>{var t=e;e$2e(t)?r$_.getValueOrUndefined(t.position,i.clock.currentTime)?i.trackedEntity=t:i.zoomTo(t):e$2e(i.trackedEntity)&&(i.trackedEntity=void 0)}))}),G$J.LEFT_DOUBLE_CLICK),this.pickEvent=new o$1h;var J=document.createElement("div");J.className="supermap3d-viewer-zoomIndicatorContainer",_.appendChild(J),this._zoomIndicator=new o(J,Q.scene);var ee=this._zoomIndicator._viewModel;ee._screenPositionX="100px",ee._screenPositionY="100px",ee.position="absolute",ee.showSelection=!1},u.prototype.extend=function(e,t){if(!e$2e(e))throw new t$15("mixin is required.");e(this,t)},u.prototype.resize=function(){var e=this._Widget,t=this._container,i=t.clientWidth,n=t.clientHeight,r=e$2e(this._animation),o=e$2e(this._timeline);if(this._forceResize||i!==this._lastWidth||n!==this._lastHeight){e.resize(),this.scene.context.resize(),this._forceResize=!1;var a=n-125,s=this._baseLayerPickerDropDown;e$2e(s)&&(s.style.maxHeight=a+"px"),e$2e(this._infoBox)&&(this._infoBox.viewModel.maxHeight=a);var l,u=this._timeline,c=0,h=0,d=0;if(r&&"hidden"!==window.getComputedStyle(this._animation.container).visibility){var f=this._lastWidth;l=this._animation.container,i>900?(c=169,f<=900&&(l.style.width="169px",l.style.height="112px",this._animation.resize())):i>=600?(c=136,(f<600||f>900)&&(l.style.width="136px",l.style.height="90px",this._animation.resize())):(c=106,(f>600||0===f)&&(l.style.width="106px",l.style.height="70px",this._animation.resize())),h=c+5}if(o&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility){var p=this._fullscreenButton,_=this._vrButton,m=u.container,g=m.style;d=m.clientHeight+3,g.left=c+"px";var x=0;e$2e(p)&&(x+=p.container.clientWidth),e$2e(_)&&(x+=_.container.clientWidth),g.right=x+"px",u.resize()}this._bottomContainer.style.left=h+"px",this._bottomContainer.style.bottom=d+"px",this._lastWidth=i,this._lastHeight=n}},u.prototype.forceResize=function(){this._lastWidth=0,this.resize()},u.prototype.render=function(){this._Widget.render()},u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){var e;this.screenSpaceEventHandler.removeInputAction(G$J.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(G$J.LEFT_DOUBLE_CLICK);var t=this.dataSources,i=t.length;for(e=0;e<i;e++)this._dataSourceRemoved(t,t.get(e));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),e$2e(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),e$2e(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),e$2e(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),e$2e(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),e$2e(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),e$2e(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),e$2e(this._timeline)&&(this._timeline.removeEventListener("settime",xe,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),e$2e(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),e$2e(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),e$2e(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),e$2e(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._Widget=this._Widget.destroy(),this._destroyDataSourceCollection&&!this._dataSourceCollection.isDestroyed()&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),i$11(this)},u.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(u.prototype._onEntityCollectionChanged,this)},u.prototype._dataSourceRemoved=function(e,t){var i=t.entities;i.collectionChanged.removeEventListener(u.prototype._onEntityCollectionChanged,this),e$2e(this.trackedEntity)&&i.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),e$2e(this.selectedEntity)&&i.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};var Q=!1,H,ze=0;function He(e,t,i,n){if(!e$2e(t))throw new t$15("zoomTarget is required.");ue(e);var r=o$1l.defer();return e._zoomPromise=r,e._zoomIsFlight=n,e._zoomOptions=i,o$1l(t,(function(t){if(e._zoomPromise===r){if(t instanceof h$R)return void t.getViewableRectangle().then((function(t){return a$d(t,e.scene)})).then((function(t){e._zoomPromise===r&&(e._zoomTarget=t)}));if(t instanceof p$u)return void(e._zoomTarget=t);if(t instanceof g$7)return void(e._zoomTarget=t);if(t.isLoading&&e$2e(t.loadingEvent)){var i=t.loadingEvent.addEventListener((function(){i(),e._zoomPromise===r&&(e._zoomTarget=t.entities.values.slice(0))}));return}if(Array.isArray(t))return void(e._zoomTarget=t.slice(0));if(t instanceof _0x1a71e8)return void(e._zoomTarget=t.layerBounds);if(t instanceof p$b)return void t.getViewableRectangle().then((function(t){return a$d(t,e.scene)})).then((function(t){e._zoomPromise===r&&(e._zoomTarget=t)}));e$2e((t=u$Z(t.values,t)).entities)&&(t=t.entities.values),Array.isArray(t)?e._zoomTarget=t.slice(0):e._zoomTarget=[t]}})),e.scene.requestRender(),r.promise}function T(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function ue(e){var t=e._zoomPromise;e$2e(t)&&(T(e),t.resolve(!1))}function It(e){var t=e._zoomTarget;if(e$2e(t)&&e.scene.mode!==C$14.MORPHING){var i=e.scene,n=i.camera,r=e._zoomPromise,o=u$Z(e._zoomOptions,{});if(t instanceof p$u)return t.readyPromise.then((function(){var i=t.boundingSphere;e$2e(o.offset)||(o.offset=new a$T(0,-.5,i.radius)),s={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(t.boundingSphere,s):(n.viewBoundingSphere(i,o.offset),n.lookAtTransform(p$1d.IDENTITY),r.resolve(!0)),T(e)}));if(t instanceof g$7)return t.readyPromise.then((function(){var i=t.boundingSphere;e$2e(o.offset)||(o.offset=new a$T(0,-.5,i.radius)),s={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(i,s):(n.viewBoundingSphere(i,o.offset),n.lookAtTransform(p$1d.IDENTITY),r.resolve(!0)),T(e)}));if(t instanceof a$18)return s={destination:i.mapProjection.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyTo(s):(n.setView(s),r.resolve(!0)),void T(e);var a=t;if(a instanceof h$18){var s={offset:o.offset,destination:a,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}};if(e._zoomIsFlight){var l=i$1d.fromRectangle3D(t);n.flyToBoundingSphere(l,s)}else n.setView(s),r.resolve(!0);return void T(e)}for(var u=[],c=0,h=a.length;c<h;c++){var d=e._dataSourceDisplay.getBoundingSphere(a[c],!1,P);if(d===R$w.PENDING)return;d!==R$w.FAILED&&u.push(i$1d.clone(P))}if(0===u.length)return void ue(e);e.trackedEntity=void 0,l=i$1d.fromBoundingSpheres(u),e._zoomIsFlight?(T(e),n.flyToBoundingSphere(l,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)},offset:o.offset})):(n.viewBoundingSphere(l,o.offset),n.lookAtTransform(p$1d.IDENTITY),T(e),r.resolve(!0))}}function Dt(e){if(e._needTrackedEntityUpdate){var t=e._trackedEntity,i=e.clock.currentTime;if(e$2e(r$_.getValueOrUndefined(t.position,i))){var n=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,P);if(r!==R$w.PENDING){var o=n.mode;(o===C$14.COLUMBUS_VIEW||o===C$14.SCENE2D)&&(n.screenSpaceCameraController.enableTranslate=!1),(o===C$14.COLUMBUS_VIEW||o===C$14.SCENE3D)&&(n.screenSpaceCameraController.enableTilt=!1);var a=r!==R$w.FAILED?P:void 0;e._entityView=new V$l(t,n,n.mapProjection.ellipsoid),e._entityView.update(i,a),e._needTrackedEntityUpdate=!1}}}}function s(e){o$1q.typeOf.object("viewer",e);var t=document.createElement("div");t.className="supermap3d-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);var i=new y$1(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return i}}})}function c(e){if(!e$2e(e))throw new t$15("viewer is required.");var t=document.createElement("div");t.className="supermap3d-viewer-cesiumInspectorContainer",e.container.appendChild(t);var i=new g$1(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return i}}})}function $$1(e,t){if(!e$2e(e))throw new t$15("viewer is required.");if(e.hasOwnProperty("dropTarget"))throw new t$15("dropTarget is already defined by another mixin.");if(e.hasOwnProperty("dropEnabled"))throw new t$15("dropEnabled is already defined by another mixin.");if(e.hasOwnProperty("dropError"))throw new t$15("dropError is already defined by another mixin.");if(e.hasOwnProperty("clearOnDrop"))throw new t$15("clearOnDrop is already defined by another mixin.");if(e.hasOwnProperty("flyToOnDrop"))throw new t$15("flyToOnDrop is already defined by another mixin.");t=u$Z(t,u$Z.EMPTY_OBJECT);var i=!0,n=u$Z(t.flyToOnDrop,!0),r=new o$1h,o=u$Z(t.clearOnDrop,!0),a=u$Z(t.dropTarget,e.container),s=u$Z(t.clampToGround,!0),l=t.proxy;function u(t){d$1(t),o&&(e.entities.removeAll(),e.dataSources.removeAll());for(var i=t.dataTransfer.files,n=i.length,r=0;r<n;r++){var a=i[r],u=new FileReader;u.onload=j$1(e,a,l,s),u.onerror=k(e,a),u.readAsText(a)}}a=i$c(a),Object.defineProperties(e,{dropTarget:{get:function(){return a},set:function(e){if(!e$2e(e))throw new t$15("value is required.");O(a,u),h(a=e,u)}},dropEnabled:{get:function(){return i},set:function(e){e!==i&&(e?h(a,u):O(a,u),i=e)}},dropError:{get:function(){return r}},clearOnDrop:{get:function(){return o},set:function(e){o=e}},flyToOnDrop:{get:function(){return n},set:function(e){n=e}},proxy:{get:function(){return l},set:function(e){l=e}},clampToGround:{get:function(){return s},set:function(e){s=e}}}),h(a,u),e.destroy=e$P(e,e.destroy,(function(){e.dropEnabled=!1})),e._handleDrop=u}function d$1(e){e.stopPropagation(),e.preventDefault()}function O(e,t){var i=e;e$2e(i)&&(i.removeEventListener("drop",t,!1),i.removeEventListener("dragenter",d$1,!1),i.removeEventListener("dragover",d$1,!1),i.removeEventListener("dragexit",d$1,!1))}function h(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",d$1,!1),e.addEventListener("dragover",d$1,!1),e.addEventListener("dragexit",d$1,!1)}function j$1(e,t,i,n){var r=e.scene;return function(o){var a=t.name;try{var s;if(/\.czml$/i.test(a))s=E$w.load(JSON.parse(o.target.result),{sourceUri:a});else if(/\.geojson$/i.test(a)||/\.json$/i.test(a)||/\.topojson$/i.test(a))s=y$p.load(JSON.parse(o.target.result),{sourceUri:a,clampToGround:n});else{if(!/\.(kml|kmz)$/i.test(a))return void e.dropError.raiseEvent(e,a,"Unrecognized file: "+a);s=U$n.load(t,{sourceUri:a,proxy:i,camera:r.camera,canvas:r.canvas,clampToGround:n})}e$2e(s)&&e.dataSources.add(s).then((function(t){e.flyToOnDrop&&e.flyTo(t)})).otherwise((function(t){e.dropError.raiseEvent(e,a,t)}))}catch(t){e.dropError.raiseEvent(e,a,t)}}}function k(e,t){return function(i){e.dropError.raiseEvent(e,t.name,i.target.error)}}function m(e,t){if(!e$2e(e))throw new t$15("viewer is required.");t=u$Z(t,u$Z.EMPTY_OBJECT);var i=new i$3({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return i}}})}u.prototype._onTick=function(e){var t=e.currentTime,i=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=i);var n=this._entityView;if(e$2e(n)){var r=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(r,!1,P)===R$w.DONE&&n.update(t,P)}var o,a=!1,s=this.selectedEntity,l=e$2e(s)&&this._enableInfoOrSelection,u=this.customInfobox;if(e$2e(u))if(this._enableInfoOrSelection=!1,e$2e(s)&&e$2e(s.scenePos)){var c=this.scene.canvas.height,h=s.scenePos,d=new o$1o;s$R.wgs84ToWindowCoordinates(this.scene,h,d),u.style.bottom=c-d.y+45+"px",u.style.left=d.x-70+"px",u.style.visibility="visible"}else u.style.visibility="hidden";(l=e$2e(s)&&this._enableInfoOrSelection)&&s.isShowing&&s.isAvailable(t)&&(this._dataSourceDisplay.getBoundingSphere(s,!0,P)!==R$w.FAILED?o=P.center:e$2e(s.position)&&(o=s.position.getValue(t,o)),a=e$2e(o));var f=e$2e(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;e$2e(f)&&(f.position=o$1p.clone(o,f.position),f.showSelection=l&&a,f.update());var p=e$2e(this._infoBox)?this._infoBox.viewModel:void 0;e$2e(p)&&(p.showInfo=l,p.enableCamera=a,p.isCameraTracking=this.trackedEntity===this.selectedEntity,l?(p.titleText=u$Z(s.name,s.id),p.description=r$_.getValueOrDefault(s.description,t,"")):(p.titleText="",p.description="")),this._zoomIndicator._viewModel.update();var _=this.scene._screenSpaceCameraController,m=_.tiltEventTypes,x=_._aggregator._isDown;(x[m[0]]&&3==this.scene.mode?(e$2e(this._tiltIndicator)?this._tiltIndicator.setModelMatrix(this.scene.frameState,_._tiltCenter):(this._tiltIndicator=new g(this,this.scene.context,n$17("Widgets/Images/compass.s3m"),_._tiltCenter),this.scene.primitives.add(this._tiltIndicator)),this._tiltIndicator._visible=!0):e$2e(this._tiltIndicator)&&(this._tiltIndicator._visible=!1),e$2e(this.enableCursorStyle)&&0==this.enableCursorStyle)||(""==this._element.style.cursor&&(this._element.style.cursor=this._scratchPanUrl),x[_.rotateEventTypes]?Q||(Q=!0,this._element.style.cursor=this._scratchHoldUrl):Q&&(Q=!1,this._element.style.cursor=this._scratchPanUrl));if(_._scene.pickPointEnabled){e$2e(this.pointCloudIndicator)||(this.pointCloudIndicator=this.entities.add({id:"pont-cloud-indicator",position:new n$X((function(){return _._scene.pickPoint}),!1),point:{pixelSize:this._capturePointSize,color:this._capturePointColor,disableDepthTestDistance:Number.POSITIVE_INFINITY}})),this.pointCloudIndicator.show=!0;var y=_._aggregator;e$2e(H)||(H=o$1o.clone(y.currentMousePosition));var v=Et$c();if(v-ze>_._scene.pickPointInterval){ze=v;var $=o$1o.clone(y.currentMousePosition),b=$.x-H.x,T=$.y-H.y,C=Math.sqrt(b*b+T*T);H=o$1o.clone(y.currentMousePosition),C>5&&_._scene.pointPick($)}}else e$2e(this.pointCloudIndicator)&&(this.pointCloudIndicator.show=!1)},u.prototype._onEntityCollectionChanged=function(e,t,i){for(var n=i.length,r=0;r<n;r++){var o=i[r];this.trackedEntity===o&&(this.trackedEntity=void 0),this.selectedEntity===o&&(this.selectedEntity=void 0)}},u.prototype._onInfoBoxCameraClicked=function(e){e.isCameraTracking&&this.trackedEntity===this.selectedEntity?this.trackedEntity=void 0:e$2e(this.selectedEntity.position)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)},u.prototype._clearTrackedObject=function(){this.trackedEntity=void 0},u.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0},u.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0},u.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Ve(this.timeline,this.clock,e)},u.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);var i=t.entities.id,n=this._eventHelper.add(t.changedEvent,u.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[i]=n},u.prototype._onDataSourceRemoved=function(e,t){var i=this.clockTrackedDataSource===t,n=t.entities.id;if(this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0,i){var r=e.length;this._automaticallyTrackDataSourceClocks&&r>0?this.clockTrackedDataSource=e.get(r-1):this.clockTrackedDataSource=void 0}},u.prototype.zoomTo=function(e,t){return He(this,e,{offset:t},!1)},u.prototype.flyTo=function(e,t){return He(this,e,t,!0)},u.prototype._postRender=function(){It(this),Dt(this)};const _0x47df05=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5df888=_0x47df05(void 0,(function(){return _0x5df888.toString().search("(((.+)+)+)+$").toString().constructor(_0x5df888).search("(((.+)+)+)+$")}));_0x5df888();var _0x264886,_0x11c773=[],_0x29ef83=.1,_0x4e9110,_0x1c230e,_0x2e5895="Selection_Cube";function _0x558853(e){this._scene=e,_0x264886=new WebGLPlot.ScreenSpaceEventHandler(e.canvas)}function _0x1b213c(e,t){let i=[];if(e&&e.plotLayers){let t=e.plotLayers._layerQueue.length;for(let n=0;n<t;n++){let t=e.plotLayers._layerQueue[n];if(WebGLPlot.defined(t)&&t instanceof _0x394df6){let e=t._geoGraphicObjects.length;for(let n=0;n<e;n++){let e=t._geoGraphicObjects[n];_0x516ab4(e)&&i.push(e)}}}}"function"==typeof t&&t({geoArray:i})}function _0x516ab4(e){let t=_0x11c773[0].x>_0x11c773[1].x?_0x11c773[0].x:_0x11c773[1].x,i=_0x11c773[0].y>_0x11c773[1].y?_0x11c773[0].y:_0x11c773[1].y,n=_0x11c773[0].z>_0x29ef83?_0x11c773[0].z:_0x29ef83,r=_0x11c773[0].x<_0x11c773[1].x?_0x11c773[0].x:_0x11c773[1].x,o=_0x11c773[0].y<_0x11c773[1].y?_0x11c773[0].y:_0x11c773[1].y,a=_0x11c773[0].z<_0x29ef83?_0x11c773[0].z:_0x29ef83,s=e.localPoints.length;for(let l=0;l<s;l++){let s=e.localPoints[l];if(s.x>r&&s.x<t&&s.y>o&&s.y<i&&s.z>a&&s.z<n)return!0}return!1}function _0x3e423a(e,t){_0x264886.setInputAction((function(i){var n=_0x2909c1.getPosition(e._scene,i.position);if(n){if(_0x11c773.length>=3)return _0x1c230e=i.position,_0x596e87(),_0x1b213c(e._scene,t),void e.deActivate();2===_0x11c773.length&&(_0x11c773[_0x11c773.length-1]=n,_0x4e9110=i.position),0===_0x11c773.length&&_0x11c773.push(n),_0x11c773.push(n),_0x11c773.length>=2&&_0x596e87()}}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x264886.setInputAction((function(t){var i=_0x2909c1.getPosition(e._scene,t.endPosition);_0x11c773.length>=2&&(_0x11c773.pop(),_0x11c773.push(i),_0x11c773.length>=3&&(_0x1c230e=t.endPosition),_0x596e87(e._scene))}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE)}function _0x596e87(e){if(!e||_0x11c773.length<2||_0x11c773[0].x===_0x11c773[1].x&&_0x11c773[0].y===_0x11c773[1].y)return;var t=WebGLPlot.Cartesian3.fromDegrees(_0x11c773[0].x,_0x11c773[0].y,_0x11c773[0].z),i=[t,WebGLPlot.Cartesian3.fromDegrees(_0x11c773[1].x,_0x11c773[0].y,_0x11c773[0].z),WebGLPlot.Cartesian3.fromDegrees(_0x11c773[1].x,_0x11c773[1].y,_0x11c773[0].z),WebGLPlot.Cartesian3.fromDegrees(_0x11c773[0].x,_0x11c773[1].y,_0x11c773[0].z),t];if(_0x4e9110&&_0x1c230e){let t=e.camera;var n=t.getPickRay(_0x4e9110),r=new WebGLPlot.Cartesian2(_0x4e9110.x+1,_0x4e9110.y),o=t.getPickRay(r),a=e.globe.pick(n,e),s=e.globe.pick(o,e);let i=WebGLPlot.Cartesian3.distance(a,s);_0x29ef83=(_0x4e9110.y-_0x1c230e.y)*i}const l=new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(i),perPositionHeight:!0,closeTop:!0,closeBottom:!0,extrudedHeight:_0x29ef83}),u=WebGLPlot.PolygonGeometry.createGeometry(l);var c=new WebGLPlot.GeometryInstance({geometry:u,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(new WebGLPlot.Color(1,0,0,.2))}});_0x4786d3.setScaneInstances(_0x2e5895,[c],this._scene)}WebGLPlot.g_CubeHandler=null,_0x558853.getInstance=function(e){return WebGLPlot.defined(e)&&(!WebGLPlot.g_CubeHandler||WebGLPlot.g_CubeHandler._scene!==e)&&(WebGLPlot.g_CubeHandler=new _0x558853(e)),WebGLPlot.g_CubeHandler},_0x558853.prototype.activate=function(e){_0x11c773=[],_0x3e423a(this,e)},_0x558853.prototype.deActivate=function(){_0x11c773=[],_0x264886&&(_0x264886.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x264886.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE)),_0x29ef83=.1,_0x4e9110=void 0,_0x1c230e=void 0,_0x4786d3.setScaneInstances(_0x2e5895,[],this._scene)};const _0x48f8ca=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x33fcd4=_0x48f8ca(void 0,(function(){return _0x33fcd4.toString().search("(((.+)+)+)+$").toString().constructor(_0x33fcd4).search("(((.+)+)+)+$")}));_0x33fcd4();let _0x4244c8,_0x3cb87f,_0x122435=!1,_0x3b9953,_0x38423e=[],_0xa1956e;function _0x81479b(e,t){this.dom=e,this.viewer=t,_0x3cb87f=this,_0x3b9953=new WebGLPlot.ScreenSpaceEventHandler(e),_0xa1956e=new _0x2b172d(e),this.isDestroyed=!1,this.activeEvt=new WebGLPlot.Event,this.cancelEvt=new WebGLPlot.Event,this.movingEvt=new WebGLPlot.Event,this.drawEvt=new WebGLPlot.Event}function _0x2b172d(e){this.rect=document.createElement("div"),this.rect.style.visibility="hidden",e.appendChild(this.rect),this.leftTopPoint=new WebGLPlot.Cartesian2,this.rightBottomPoint=new WebGLPlot.Cartesian2,_0x2b172d.prototype.setPosition=function(e,t){let i,n,r,o,a=t.x-e.x,s=t.y-e.y;a<0?(i=t.x,r=-a):(i=e.x,r=a),s<0?(n=t.y,o=-s):(n=e.y,o=s),this.leftTopPoint=new WebGLPlot.Cartesian2(i,n),this.rightBottomPoint=new WebGLPlot.Cartesian2(i+r,n+o),this.rect.style="position:fixed;top:"+n+"px;left:"+i+"px;width:"+r+"px;height:"+o+"px;border:2px dashed #333;",this.setVisible(!0)},_0x2b172d.prototype.setVisible=function(e){this.rect.style.visibility=e?"visible":"hidden"},_0x2b172d.prototype.getRectPoint=function(){return{leftTopPoint:this.leftTopPoint,rightBottomPoint:this.rightBottomPoint}},_0x2b172d.prototype.destroy=function(){e.removeChild(_0xa1956e),this.rect=null}}function _0x6916c0(e,t){let i=t.screenSpaceCameraController;i.enableRotate=e,i.enableTranslate=e,i.enableZoom=e,i.enableTilt=e,i.enableLook=e}function _0xf5f99b(e,t,i){t?(i.enableCursorStyle=!1,i._element.style.cursor="",e.style.cursor="default"):i.enableCursorStyle=!0}function _0x2044f9(){_0x3b9953.setInputAction((function(e){_0x122435=!0,_0x4244c8=new WebGLPlot.Cartesian2(e.position.x,e.position.y)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN);let e=function(e){_0x3cb87f.cancelEvt.raiseEvent(),"Shift"===e.key&&_0x122435&&!_0x3cb87f.isDestroyed&&(_0x122435=!1,_0xa1956e.setVisible(!1))};document.addEventListener("keyup",e),_0x38423e.push((function(){document.removeEventListener("keyup",e)})),_0x3b9953.setInputAction((function(e){let t=e.endPosition;_0x3cb87f.activeEvt.raiseEvent(t),_0x122435&&(_0xa1956e.setPosition(_0x4244c8,t),_0xa1956e.setVisible(!0),_0x3cb87f.movingEvt.raiseEvent(_0xa1956e.getRectPoint()))}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),_0x3b9953.setInputAction((function(e){_0x122435=!1,_0xa1956e.setVisible(!1),_0x3cb87f.drawEvt.raiseEvent(_0xa1956e.getRectPoint())}),WebGLPlot.ScreenSpaceEventType.LEFT_UP)}function _0x2c6799(){_0x3b9953.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x3b9953.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),_0x3b9953.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x3b9953.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP)}_0x81479b.prototype.destroy=function(){if(!this.isDestroyed){_0x6916c0(!0,this.viewer.scene),_0x2c6799();for(let e=0,t=_0x38423e.length;e<t;e++)_0x38423e[e]();_0x3b9953.destroy(),_0xa1956e.destroy(),_0xa1956e=null,this.isDestroyed=!0}},_0x81479b.prototype.activate=function(){this.isDestroyed||(_0x6916c0(!1,this.viewer.scene),_0xf5f99b(this.dom,!0,this.viewer),_0x2044f9())},_0x81479b.prototype.deactivate=function(){this.isDestroyed||(_0x6916c0(!0,this.viewer.scene),_0xf5f99b(this.dom,!1,this.viewer),_0x2c6799())};var _0x3994ba=(_0x1ea0c7=!0,function(e,t){var i=_0x1ea0c7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ea0c7=!1,i}),_0x58c0d3=_0x3994ba(void 0,(function(){return _0x58c0d3.toString().search("(((.+)+)+)+$").toString().constructor(_0x58c0d3).search("(((.+)+)+)+$")})),_0x1ea0c7;_0x58c0d3();var _0xd5c6ca={GEOJSON:"GEOJSON",ISERVER:"ISERVER"};class NetworkAnalystServiceBase extends _0x5958f9{constructor(e,t){super(e,t),this.format=_0xd5c6ca.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t,i=this;(e=_0x278499.transformResult(e))&&i.format===_0xd5c6ca.GEOJSON&&"function"==typeof i.toGeoJSONResult&&(t=i.toGeoJSONResult(e)),t||(t=e),i.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){return null}}function _0x2e06c5(){}_0x2e06c5.extend=function(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},_0x2e06c5.copy=function(e,t){var i;if(e=e||{},t)for(var n in e)typeof(i=t[n])<"u"&&(e[n]=i)},_0x2e06c5.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"===_typeof(e[t])&&e[t]instanceof Array){for(var i in e[t])e[t][i].destroy&&e[t][i].destroy();e[t].length=0}else"object"===_typeof(e[t])&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},_0x2e06c5.getElement=function(){for(var e=[],t=0,i=arguments.length;t<i;t++){var n=arguments[t];if("string"==typeof n&&(n=document.getElementById(n)),1===arguments.length)return n;e.push(n)}return e},_0x2e06c5.isElement=function(e){return!(!e||1!==e.nodeType)},_0x2e06c5.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},_0x2e06c5.removeItem=function(e,t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1);return e},_0x2e06c5.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},_0x2e06c5.modifyDOMElement=function(e,t,i,n,r,o,a,s){t&&(e.id=t),i&&(e.style.left=i.x+"px",e.style.top=i.y+"px"),n&&(e.style.width=n.w+"px",e.style.height=n.h+"px"),r&&(e.style.position=r),o&&(e.style.border=o),a&&(e.style.overflow=a),parseFloat(s)>=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},_0x2e06c5.applyDefaults=function(e,t){e=e||{};var i="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!i&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!i&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},_0x2e06c5.getParameterString=function(e){var t=[];for(var i in e){var n,r=e[i];if(null!=r&&"function"!=typeof r)n=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(i)+"="+n)}return t.join("&")},_0x2e06c5.urlAppend=function(e,t){var i=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i},_0x2e06c5.urlPathAppend=function(e,t){var i=e;if(!t)return i;0===t.indexOf("/")&&(t=t.substring(1));var n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),i="".concat(n[0]).concat(t).concat(n.length>1?"?".concat(n[1]):"")},_0x2e06c5.DEFAULT_PRECISION=14,_0x2e06c5.toFloat=function(e,t){return null==t&&(t=_0x2e06c5.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},_0x2e06c5.rad=function(e){return e*Math.PI/180},_0x2e06c5.getParameters=function(e){e=e??window.location.href;var t="";if(StringExt.contains(e,"?")){var i=e.indexOf("?")+1,n=StringExt.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(i,n)}for(var r={},o=t.split(/[&;]/),a=0,s=o.length;a<s;++a){var l=o[a].split("=");if(l[0]){var u=l[0];try{u=decodeURIComponent(u)}catch{u=unescape(u)}var c=(l[1]||"").replace(/\+/g," ");try{c=decodeURIComponent(c)}catch{c=unescape(c)}1==(c=c.split(",")).length&&(c=c[0]),r[u]=c}}return r},_0x2e06c5.lastSeqID=0,_0x2e06c5.createUniqueID=function(e){return null==e&&(e="id_"),_0x2e06c5.lastSeqID+=1,e+_0x2e06c5.lastSeqID},_0x2e06c5.normalizeScale=function(e){return e>1?1/e:e},_0x2e06c5.getResolutionFromScale=function(e,t){var i;e&&(null==t&&(t="degrees"),i=1/(_0x2e06c5.normalizeScale(e)*_0x30af6f[t]*_0x108625));return i},_0x2e06c5.getScaleFromResolution=function(e,t){return null==t&&(t="degrees"),e*_0x30af6f[t]*_0x108625},_0x2e06c5.getBrowser=function(){return _0x4f2d9b},_0x2e06c5.isSupportCanvas=_0x1c0f3b,_0x2e06c5.supportCanvas=function(){return _0x2e06c5.isSupportCanvas},_0x2e06c5.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l},_0x2e06c5.calculateDpi=function(e,t,i,n,r){if(e&&t&&i){var o,a=1e4,s=e.getWidth(),l=e.getHeight(),u=t.w,c=t.h;if(r=r||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){var h=s/u,d=l/c;o=254/(h>d?h:d)/i/(2*Math.PI*r/360)/a}else{o=254/(s/u)/i/a}return o}},_0x2e06c5.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var i="",n=0,r=t.length;n<r;n++)i+=_0x2e06c5.toJSON(t[n]),n!==t.length-1&&(i+=",");return"["+i+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"===_typeof(t)){if(t.length){for(var o=[],a=0,s=t.length;a<s;a++)o.push(_0x2e06c5.toJSON(t[a]));return"["+o.join(",")+"]"}var l=[];for(var u in t)"function"!=typeof t[u]&&"CLASS_NAME"!==u&&"parent"!==u&&l.push("'"+u+"':"+_0x2e06c5.toJSON(t[u]));return l.length>0?"{"+l.join(",")+"}":"{}"}return t.toString()}},_0x2e06c5.getResolutionFromScaleDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?(e=_0x2e06c5.normalizeScale(e),"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r):-1},_0x2e06c5.getScaleFromResolutionDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r:-1},_0x2e06c5.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},_0x2e06c5.copyAttributes=function(e,t){if(e=e||{},t)for(var i in t){var n=t[i];void 0!==n&&"CLASS_NAME"!==i&&"function"!=typeof n&&(e[i]=n)}return e},_0x2e06c5.copyAttributesWithClip=function(e,t,i){if(e=e||{},t)for(var n in t){var r=!1;if(i&&i.length)for(var o=0,a=i.length;o<a;o++)if(n===i[o]){r=!0;break}if(!0!==r){var s=t[n];void 0!==s&&"CLASS_NAME"!==n&&"function"!=typeof s&&(e[n]=s)}}return e},_0x2e06c5.cloneObject=function(e){if(null===e||"object"!==_typeof(e))return e;if(e instanceof Date){var t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.slice(0);if(e instanceof Object){var i={};for(var n in e)e.hasOwnProperty(n)&&(i[n]=_0x2e06c5.cloneObject(e[n]));return i}throw new Error("Unable to copy obj! Its type isn't supported.")},_0x2e06c5.lineIntersection=function(e,t,i,n){var r,o,a=null,s=(n.x-i.x)*(e.y-i.y)-(n.y-i.y)*(e.x-i.x),l=(t.x-e.x)*(e.y-i.y)-(t.y-e.y)*(e.x-i.x),u=(n.y-i.y)*(t.x-e.x)-(n.x-i.x)*(t.y-e.y);if(0!=u)o=l/u,a=(r=s/u)>=0&&o<=1&&r<=1&&o>=0?new Geometry.Point(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y)):"No Intersection";else if(0==s&&0==l){var c=Math.max(e.y,t.y),h=Math.min(e.y,t.y),d=Math.max(e.x,t.x),f=Math.min(e.x,t.x);a=(i.y>=h&&i.y<=c||n.y>=h&&n.y<=c)&&i.x>=f&&i.x<=d||n.x>=f&&n.x<=d?"Coincident":"Parallel"}else a="Parallel";return a},_0x2e06c5.getTextBounds=function(e,t,i){document.body.appendChild(i),i.style.width="auto",i.style.height="auto",e.fontSize&&(i.style.fontSize=e.fontSize),e.fontFamily&&(i.style.fontFamily=e.fontFamily),e.fontWeight&&(i.style.fontWeight=e.fontWeight),i.style.position="relative",i.style.visibility="hidden",i.style.display="inline-block",i.innerHTML=t;var n=i.clientWidth,r=i.clientHeight;return document.body.removeChild(i),{textWidth:n,textHeight:r}},_0x2e06c5.convertPath=function(e,t){return t?e.replace(/\{([\w-\.]+)\}/g,(function(e,i){var n;return n=t.hasOwnProperty(i)?paramToString(t[i]):e,encodeURIComponent(n)})):e};var _0x108625=96,_0x30af6f={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};_0x30af6f.in=_0x30af6f.inches,_0x30af6f.degrees=_0x30af6f.dd,_0x30af6f.nmi=1852*_0x30af6f.m;var _0x4f2d9b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();var n,r="",o="",a="pc",s=navigator.userAgent.toLowerCase();return s.indexOf("msie")>-1||s.indexOf("trident")>-1&&s.indexOf("rv")>-1?(r="msie",n=s.match(/msie ([\d.]+)/)||s.match(/rv:([\d.]+)/)):s.indexOf("chrome")>-1?(r="chrome",n=s.match(/chrome\/([\d.]+)/)):s.indexOf("firefox")>-1?(r="firefox",n=s.match(/firefox\/([\d.]+)/)):s.indexOf("opera")>-1?(r="opera",n=s.match(/version\/([\d.]+)/)):s.indexOf("safari")>-1&&(r="safari",n=s.match(/version\/([\d.]+)/)),o=n?n[1]:"",s.indexOf("ipad")>-1||s.indexOf("ipod")>-1||s.indexOf("iphone")>-1?a="apple":s.indexOf("android")>-1&&(o=(n=s.match(/version\/([\d.]+)/))?n[1]:"",a="android"),{name:r,version:o,device:a}}(),_0x1c0f3b=(_0x46ab38=!0,_0x493857=_0x4f2d9b,document.createElement("canvas").getContext?("firefox"===_0x493857.name&&parseFloat(_0x493857.version)<5&&(_0x46ab38=!1),"safari"===_0x493857.name&&parseFloat(_0x493857.version)<4&&(_0x46ab38=!1),"opera"===_0x493857.name&&parseFloat(_0x493857.version)<10&&(_0x46ab38=!1),"msie"===_0x493857.name&&parseFloat(_0x493857.version)<9&&(_0x46ab38=!1)):_0x46ab38=!1,_0x46ab38),_0x46ab38,_0x493857,_0x2f498d=(_0x242b43=!0,function(e,t){var i=_0x242b43?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x242b43=!1,i}),_0x537e4a=_0x2f498d(void 0,(function(){return _0x537e4a.toString().search("(((.+)+)+)+$").toString().constructor(_0x537e4a).search("(((.+)+)+)+$")})),_0x242b43;_0x537e4a();class BurstPipelineAnalystService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof BurstPipelineAnalystParameters))return null;var t,i=this;if(i.url=_0x2e06c5.urlPathAppend(i.url,"burstAnalyse"),t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");if(null===e.edgeID&&null===e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}var _0x3e8cd4=(_0x242030=!0,function(e,t){var i=_0x242030?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x242030=!1,i}),_0x3e383e=_0x3e8cd4(void 0,(function(){return _0x3e383e.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e383e).search("(((.+)+)+)+$")})),_0x242030;_0x3e383e();class TransportationAnalystResultSetting{constructor(e){!e||(this.returnEdgeFeatures=!1,this.returnEdgeGeometry=!1,this.returnEdgeIDs=!1,this.returnNodeFeatures=!1,this.returnNodeGeometry=!1,this.returnNodeIDs=!1,this.returnPathGuides=!1,this.returnRoutes=!1,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystResultSetting")}destroy(){var e=this;e.returnEdgeFeatures=null,e.returnEdgeGeometry=null,e.returnEdgeIDs=null,e.returnNodeFeatures=null,e.returnNodeGeometry=null,e.returnNodeIDs=null,e.returnPathGuides=null,e.returnRoutes=null}}var _0x2803d3=(_0x33538b=!0,function(e,t){var i=_0x33538b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33538b=!1,i}),_0x9dc897=_0x2803d3(void 0,(function(){return _0x9dc897.toString().search("(((.+)+)+)+$").toString().constructor(_0x9dc897).search("(((.+)+)+)+$")})),_0x33538b;_0x9dc897();class TransportationAnalystParameter{constructor(e){!e||(this.barrierEdgeIDs=null,this.barrierNodeIDs=null,this.barrierPoints=null,this.weightFieldName=null,this.turnWeightField=null,this.resultSetting=new TransportationAnalystResultSetting,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystParameter")}destroy(){var e=this;if(e.barrierEdgeIDs=null,e.barrierNodeIDs=null,e.weightFieldName=null,e.turnWeightField=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.barrierPoints&&e.barrierPoints.length)for(var t in e.barrierPoints)e.barrierPoints[t].destroy();e.barrierPoints=null}}var _0x4e96fe=(_0x3dc939=!0,function(e,t){var i=_0x3dc939?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3dc939=!1,i}),_0x5b8013=_0x4e96fe(void 0,(function(){return _0x5b8013.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b8013).search("(((.+)+)+)+$")})),_0x3dc939;_0x5b8013();class ComputeWeightMatrixParameters{constructor(e){this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.ComputeWeightMatrixParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x16098c=(_0x585787=!0,function(e,t){var i=_0x585787?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x585787=!1,i}),_0x49d708=_0x16098c(void 0,(function(){return _0x49d708.toString().search("(((.+)+)+)+$").toString().constructor(_0x49d708).search("(((.+)+)+)+$")})),_0x585787;_0x49d708();class ComputeWeightMatrixService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ComputeWeightMatrixService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ComputeWeightMatrixParameters){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"weightmatrix"),t={parameter:_0x278499.toJSON(e.parameter),nodes:i.getJson(e.isAnalyzeById,e.nodes)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}}var _0x1054d9=(_0x465424=!0,function(e,t){var i=_0x465424?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x465424=!1,i}),_0x2e9548=_0x1054d9(void 0,(function(){return _0x2e9548.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e9548).search("(((.+)+)+)+$")})),_0x465424;_0x2e9548();class _0x211aff{constructor(e){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=!1,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalyst3DParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null}}var _0x106818=(_0x3fe529=!0,function(e,t){var i=_0x3fe529?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3fe529=!1,i}),_0x45d965=_0x106818(void 0,(function(){return _0x45d965.toString().search("(((.+)+)+)+$").toString().constructor(_0x45d965).search("(((.+)+)+)+$")})),_0x3fe529;_0x45d965();class FacilityAnalystStreamParameters{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,this.queryType=null,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystStreamParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null,e.type=null}}var _0x3848ba=(_0x520e73=!0,function(e,t){var i=_0x520e73?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x520e73=!1,i}),_0x43fd43=_0x3848ba(void 0,(function(){return _0x43fd43.toString().search("(((.+)+)+)+$").toString().constructor(_0x43fd43).search("(((.+)+)+)+$")})),_0x520e73;_0x43fd43();class FacilityAnalystStreamService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystStreamService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FacilityAnalystStreamParameters){var t,i=this;if(0===e.queryType)i.url=_0x2e06c5.urlPathAppend(i.url,"upstreamcirticalfaclilities");else{if(1!==e.queryType)return;i.url=_0x2e06c5.urlPathAppend(i.url,"downstreamcirticalfaclilities")}t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},(null===e.edgeID||null===e.nodeID)&&(null===e.edgeID&&null===e.nodeID||(null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})))}}}var _0x2cc3ce=(_0x581fb5=!0,function(e,t){var i=_0x581fb5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x581fb5=!1,i}),_0x2ad429=_0x2cc3ce(void 0,(function(){return _0x2ad429.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ad429).search("(((.+)+)+)+$")})),_0x581fb5;_0x2ad429();class _0x61bc6c extends _0x211aff{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DParameters"}destroy(){super.destroy()}}var _0x2a678a=(_0x53c455=!0,function(e,t){var i=_0x53c455?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53c455=!1,i}),_0x507e6c=_0x2a678a(void 0,(function(){return _0x507e6c.toString().search("(((.+)+)+)+$").toString().constructor(_0x507e6c).search("(((.+)+)+)+$")})),_0x53c455;_0x507e6c();class _0x4d0341 extends _0x5958f9{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _0x61bc6c){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"tracedownresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}var _0x28f8b4=(_0x39ab1e=!0,function(e,t){var i=_0x39ab1e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39ab1e=!1,i}),_0x535c48=_0x28f8b4(void 0,(function(){return _0x535c48.toString().search("(((.+)+)+)+$").toString().constructor(_0x535c48).search("(((.+)+)+)+$")})),_0x39ab1e;_0x535c48();class _0x2932d4 extends _0x211aff{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DParameters"}destroy(){super.destroy()}}var _0x511f86=(_0x375e89=!0,function(e,t){var i=_0x375e89?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x375e89=!1,i}),_0x1f8f92=_0x511f86(void 0,(function(){return _0x1f8f92.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f8f92).search("(((.+)+)+)+$")})),_0x375e89;_0x1f8f92();class _0x2499f1 extends _0x5958f9{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _0x2932d4){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"traceupresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}var _0x4c6f68=(_0x5441da=!0,function(e,t){var i=_0x5441da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5441da=!1,i}),_0x337ff2=_0x4c6f68(void 0,(function(){return _0x337ff2.toString().search("(((.+)+)+)+$").toString().constructor(_0x337ff2).search("(((.+)+)+)+$")})),_0x5441da;_0x337ff2();class _0x551fc0{constructor(e,t,i,n){_0x278499.isArray(e)&&(n=e[3],i=e[2],t=e[1],e=e[0]),this.left=null!=e?_0x278499.toFloat(e):this.left,this.bottom=null!=t?_0x278499.toFloat(t):this.bottom,this.right=null!=i?_0x278499.toFloat(i):this.right,this.top=null!=n?_0x278499.toFloat(n):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new _0x551fc0(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var i=Math.pow(10,e),n=Math.round(this.left*i)/i,r=Math.round(this.bottom*i)/i,o=Math.round(this.right*i)/i,a=Math.round(this.top*i)/i;return!0===t?r+","+n+","+a+","+o:n+","+r+","+o+","+a}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new Size(this.getWidth(),this.getHeight())}getCenterPixel(){return new Pixel((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new LonLat((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var i,n;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(i=t.lon,n=t.lat):(i=t.x,n=t.y);var r=(this.left-i)*e+i,o=(this.bottom-n)*e+n,a=(this.right-i)*e+i,s=(this.top-n)*e+n;return new _0x551fc0(r,o,a,s)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new _0x551fc0(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new _0x551fc0(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new _0x551fc0(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var i=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!i){var r=n.getWidth(),o=(n.left+n.right)/2,a=Math.round((e.lon-o)/r);i=this.containsLonLat({lon:e.lon-a*r,lat:e.lat},{inclusive:t.inclusive})}return i}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,i){if(null==i&&(i=!0),null==e||null==t)return!1;return i?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var i=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else i=this;null==t.inclusive&&(t.inclusive=!0);var n=!1,r=i.left===e.right||i.right===e.left||i.top===e.bottom||i.bottom===e.top;if(t.inclusive||!r){var o=e.bottom>=i.bottom&&e.bottom<=i.top||i.bottom>=e.bottom&&i.bottom<=e.top,a=e.top>=i.bottom&&e.top<=i.top||i.top>e.bottom&&i.top<e.top,s=e.left>=i.left&&e.left<=i.right||i.left>=e.left&&i.left<=e.right,l=e.right>=i.left&&e.right<=i.right||i.right>=e.left&&i.right<=e.right;n=(o||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),h=!u.containsBounds(i),d=!u.containsBounds(e);h&&!d?(e=e.add(-c,0),n=i.intersectsBounds(e,{inclusive:t.inclusive})):d&&!h&&(i=i.add(-c,0),n=e.intersectsBounds(i,{inclusive:t.inclusive}))}return n}containsBounds(e,t,i){null==t&&(t=!1),null==i&&(i=!0);var n=this.contains(e.left,e.bottom,i),r=this.contains(e.right,e.bottom,i),o=this.contains(e.left,e.top,i),a=this.contains(e.right,e.top,i);return t?n||r||o||a:n&&r&&o&&a}determineQuadrant(e){var t="",i=this.getCenterLonLat();return t+=e.lat<i.lat?"b":"t",t+=e.lon<i.lon?"l":"r"}wrapDateLine(e,t){var i=(t=t||{}).leftTolerance||0,n=t.rightTolerance||0,r=this.clone();if(e){for(var o=e.getWidth();r.left<e.left&&r.right-n<=e.left;)r=r.add(o,0);for(;r.left+i>=e.right&&r.right>e.right;)r=r.add(-o,0);var a=r.left+i;a<e.right&&a>e.left&&r.right-n>e.right&&(r=r.add(-o,0))}return r}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}fromString(e,t){var i=e.split(",");return _0x551fc0.fromArray(i,t)}fromArray(e,t){return!0===t?new _0x551fc0(e[1],e[0],e[3],e[2]):new _0x551fc0(e[0],e[1],e[2],e[3])}fromSize(e){return new _0x551fc0(0,e.h,e.w,0)}oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}var _0x338cc9=(_0x4d7f66=!0,function(e,t){var i=_0x4d7f66?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d7f66=!1,i}),_0x3220f2=_0x338cc9(void 0,(function(){return _0x3220f2.toString().search("(((.+)+)+)+$").toString().constructor(_0x3220f2).search("(((.+)+)+)+$")})),_0x4d7f66;_0x3220f2();class _0x204609{constructor(){this.CLASS_NAME="SuperMap.GeometryServer",this.id=_0x278499.createUniqueID(this.CLASS_NAME+"_"),this.parent=null,this.bounds=null,this.SRID=null}destroy(){this.id=null,this.bounds=null,this.SRID=null}clone(){return new _0x204609}setBounds(e){e&&(this.bounds=e.clone())}clearBounds(){this.bounds=null,this.parent&&this.parent.clearBounds()}extendBounds(e){this.getBounds()?this.bounds.extend(e):this.setBounds(e)}getBounds(){return null==this.bounds&&this.calculateBounds(),this.bounds}calculateBounds(){}getVertices(e){}getArea(){return 0}}var _0x3281d4=(_0x220560=!0,function(e,t){var i=_0x220560?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x220560=!1,i}),_0xde3fc5=_0x3281d4(void 0,(function(){return _0xde3fc5.toString().search("(((.+)+)+)+$").toString().constructor(_0xde3fc5).search("(((.+)+)+)+$")})),_0x220560;_0xde3fc5();class Collection$1 extends _0x204609{constructor(e){super(),this.components=[],this.componentTypes=null,null!=e&&this.addComponents(e),this.CLASS_NAME="SuperMap.Geometry.Collection",this.geometryType="Collection"}destroy(){this.components.length=0,this.components=null,super.destroy()}clone(){for(var e=new Collection$1,t=0,i=this.components.length;t<i;t++)e.addComponent(this.components[t].clone());return _0x278499.applyDefaults(e,this),e}getComponentsString(){for(var e=[],t=0,i=this.components.length;t<i;t++)e.push(this.components[t].toShortString());return e.join(",")}calculateBounds(){this.bounds=null;var e=new _0x551fc0,t=this.components;if(t)for(var i=0,n=t.length;i<n;i++)e.extend(t[i].getBounds());null!=e.left&&null!=e.bottom&&null!=e.right&&null!=e.top&&this.setBounds(e)}addComponents(e){_0x278499.isArray(e)||(e=[e]);for(var t=0,i=e.length;t<i;t++)this.addComponent(e[t])}addComponent(e,t){var i=!1;if(e&&(null==this.componentTypes||_0x278499.indexOf(this.componentTypes,e.CLASS_NAME)>-1)){if(null!=t&&t<this.components.length){var n=this.components.slice(0,t),r=this.components.slice(t,this.components.length);n.push(e),this.components=n.concat(r)}else this.components.push(e);e.parent=this,this.clearBounds(),i=!0}return i}removeComponents(e){var t=!1;_0x278499.isArray(e)||(e=[e]);for(var i=e.length-1;i>=0;--i)t=this.removeComponent(e[i])||t;return t}removeComponent(e){return _0x278499.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,i=this.components.length;t<i;t++)e+=this.components[t].getArea();return e}equals(e){var t=!0;if(e&&e.CLASS_NAME&&this.CLASS_NAME===e.CLASS_NAME)if(_0x278499.isArray(e.components)&&e.components.length===this.components.length){for(var i=0,n=this.components.length;i<n;++i)if(!this.components[i].equals(e.components[i])){t=!1;break}}else t=!1;else t=!1;return t}getVertices(e){for(var t=[],i=0,n=this.components.length;i<n;++i)Array.prototype.push.apply(t,this.components[i].getVertices(e));return t}}var _0x805d8d=(_0x33bf57=!0,function(e,t){var i=_0x33bf57?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33bf57=!1,i}),_0x5b0c6f=_0x805d8d(void 0,(function(){return _0x5b0c6f.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b0c6f).search("(((.+)+)+)+$")})),_0x33bf57;_0x5b0c6f();class MultiPolygon extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Polygon"],this.CLASS_NAME="SuperMap.Geometry.MultiPolygon",this.geometryType="MultiPolygon"}}var _0x3a5fce=(_0x51bf0d=!0,function(e,t){var i=_0x51bf0d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51bf0d=!1,i}),_0xcd062a=_0x3a5fce(void 0,(function(){return _0xcd062a.toString().search("(((.+)+)+)+$").toString().constructor(_0xcd062a).search("(((.+)+)+)+$")})),_0x51bf0d;_0xcd062a();class Point$1 extends _0x204609{constructor(e,t,i,n){super(e,t,i,n),this.x=parseFloat(e),this.y=parseFloat(t),this.tag=n||0==n?parseFloat(n):null,this.type=i||"Point",this.CLASS_NAME="SuperMap.Geometry.Point",this.geometryType="Point"}clone(e){return null==e&&(e=new Point$1(this.x,this.y)),_0x278499.applyDefaults(e,this),e}calculateBounds(){this.bounds=new _0x551fc0(this.x,this.y,this.x,this.y)}equals(e){var t=!1;return null!=e&&(t=this.x===e.x&&this.y===e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}move(e,t){this.x=this.x+e,this.y=this.y+t,this.clearBounds()}toShortString(){return this.x+", "+this.y}destroy(){this.x=null,this.y=null,this.tag=null,super.destroy()}getVertices(){return[this]}}var _0x4ea5ed=(_0x1c7a61=!0,function(e,t){var i=_0x1c7a61?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c7a61=!1,i}),_0x2b2857=_0x4ea5ed(void 0,(function(){return _0x2b2857.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b2857).search("(((.+)+)+)+$")})),_0x1c7a61;_0x2b2857();class MultiPoint extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.MultiPoint",this.geometryType="MultiPoint"}addPoint(e,t){this.addComponent(e,t)}removePoint(e){this.removeComponent(e)}}var _0x5be3ef=(_0x219a64=!0,function(e,t){var i=_0x219a64?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x219a64=!1,i}),_0x4f3f20=_0x5be3ef(void 0,(function(){return _0x4f3f20.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f3f20).search("(((.+)+)+)+$")})),_0x219a64;_0x4f3f20();class Curve extends MultiPoint{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point","SuperMap.PointWithMeasure"],this.CLASS_NAME="SuperMap.Geometry.Curve",this.geometryType="Curve"}}var _0x263751=(_0x2a3d18=!0,function(e,t){var i=_0x2a3d18?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a3d18=!1,i}),_0x38c8cf=_0x263751(void 0,(function(){return _0x38c8cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x38c8cf).search("(((.+)+)+)+$")})),_0x2a3d18;_0x38c8cf();class LineString extends Curve{constructor(e){super(e),this.CLASS_NAME="SuperMap.Geometry.LineString",this.geometryType="LineString"}removeComponent(e){var t=this.components&&this.components.length>2;return t&&LineString_get(LineString_getPrototypeOf(LineString.prototype),"removeComponent",this).apply(this,arguments),t}getSortedSegments(){for(var e,t,i=this.components.length-1,n=new Array(i),r=0;r<i;++r)e=this.components[r],t=this.components[r+1],e.x<t.x?n[r]={x1:e.x,y1:e.y,x2:t.x,y2:t.y}:n[r]={x1:t.x,y1:t.y,x2:e.x,y2:e.y};return n.sort((function(e,t){return e.x1-t.x1}))}getVertices(e){return!0===e?[this.components[0],this.components[this.components.length-1]]:!1===e?this.components.slice(1,this.components.length-1):this.components.slice()}calculateCircle(e){if(e.length<3)return e;var t={},i=e[0],n=e[1],r=e[2],o=0,a=0,s=!0,l=0,u=0,c=0,h=[],d=(r.y-i.y)/(r.x-i.x),f=r.y-d*r.x;if(r.x!=i.x&&r.y!=i.y&&n.y==d*n.x+f||r.x==i.x&&n.x==i.x||r.y==i.y&&n.y==i.y||r.x==i.x&&r.y==i.y||r.x==n.x&&r.y==n.y||i.x==n.x&&i.y==n.y)h.push(i),h.push(n),h.push(r);else{var p=(n.x*n.x+n.y*n.y-(i.x*i.x+i.y*i.y))*(2*(r.y-i.y))-(r.x*r.x+r.y*r.y-(i.x*i.x+i.y*i.y))*(2*(n.y-i.y)),_=2*(n.x-i.x)*(r.x*r.x+r.y*r.y-(i.x*i.x+i.y*i.y))-2*(r.x-i.x)*(n.x*n.x+n.y*n.y-(i.x*i.x+i.y*i.y)),m=4*((n.x-i.x)*(r.y-i.y)-(r.x-i.x)*(n.y-i.y));t.x=p/m,t.y=_/m;var g=(2*(o=Math.sqrt((i.x-t.x)*(i.x-t.x)+(i.y-t.y)*(i.y-t.y)))*o-((i.x-r.x)*(i.x-r.x)+(i.y-r.y)*(i.y-r.y)))/(2*o*o);g=(g=g>=1?1:g)<=-1?-1:g,c=180*Math.acos(g)/Math.PI,a=(c=r.x==i.x?t.x>i.x&&n.x>i.x||t.x<i.x&&n.x<i.x?360-c:c:t.y>d*t.x+f&&n.y>d*n.x+f||t.y<d*t.x+f&&n.y<d*n.x+f?360-c:c)/72,r.y!=i.y?r.x==i.x?r.y>i.y?n.x<i.x&&(s=!1):n.x>i.x&&(s=!1):r.x<i.x?n.y<d*n.x+f&&(s=!1):n.y>d*n.x+f&&(s=!1):r.x>i.x?n.y>i.y&&(s=!1):n.y<i.y&&(s=!1);var x=(i.y-t.y)/(i.x-t.x),y=x>=0?180*Math.atan(x)/Math.PI:Math.abs(180*Math.atan(x)/Math.PI)+90,v=Math.abs(t.y);i.y==v&&v==r.y&&i.x<r.x&&(y+=180);var $=i.y-t.y;h.push(i);for(var b=1;b<72;b++){l=a*b,u=y,s?$>=0?x>=0?u+=l:u=180-(u-90)+l:u=x>0?u-180+l:90-u+l:$>=0?x>=0?u-=l:u=180-(u-90)-l:u=x>=0?u-180-l:90-u-l,u=u*Math.PI/180;var T=t.x+o*Math.cos(u),C=t.y+o*Math.sin(u);h.push(new Point(T,C))}h.push(r)}return h}createLineEPS(e){var t=[],i=e.length;if(i<2)return e;for(var n=0;n<i;){if("LTypeArc"==e[n].type){var r=LineString.createLineArc(t,n,i,e);t=r[0],n=r[1]}else t.push(e[n]),n++}return t}createLineArc(e,t,i,n){if(0==t){var r=LineString.addPointEPS(n,t,i,"LTypeArc");Array.prototype.push.apply(e,r[0]),t=r[1]+1}else if(t==i-1){var o=[n[t-1],n[t]],a=LineString.calculateCircle(o);Array.prototype.push.apply(e,a),t++}else{var s=LineString.addPointEPS(n,t,i,"LTypeArc");e.pop(),Array.prototype.push.apply(e,s[0]),t=s[1]+1}return[e,t]}addPointEPS(e,t,i,n){var r,o=[],a=t+1;return 0==t?Array.prototype.push.apply(o,[e[t],e[t+1]]):t==i-1?Array.prototype.push.apply(o,[e[t-1],e[t]]):Array.prototype.push.apply(o,[e[t-1],e[t],e[t+1]]),"LTypeCurve"==n?r=LineString.calculatePointsFBZN(o):"LTypeArc"==n&&(r=LineString.calculateCircle(o)),[r,a]}}var _0x6f4cd5=(_0x24220a=!0,function(e,t){var i=_0x24220a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24220a=!1,i}),_0x1fdeb7=_0x6f4cd5(void 0,(function(){return _0x1fdeb7.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fdeb7).search("(((.+)+)+)+$")})),_0x24220a;_0x1fdeb7();class MultiLineString extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Geometry.MultiLineString",this.geometryType="MultiLineString"}}var _0x1e5ba0=(_0x2c94e9=!0,function(e,t){var i=_0x2c94e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c94e9=!1,i}),_0x5ea51c=_0x1e5ba0(void 0,(function(){return _0x5ea51c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ea51c).search("(((.+)+)+)+$")})),_0x2c94e9;_0x5ea51c();class LinearRing extends LineString{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var i=!1,n=this.components.pop();(null!=t||!e.equals(n))&&(i=LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,arguments));var r=this.components[0];return LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,[r]),i}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"removeComponent",this).apply(this,arguments);var i=this.components[0];LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,[i])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,i=0,n=this.components.length;i<n-1;i++){var r=this.components[i],o=this.components[i+1];t+=(r.x+o.x)*(o.y-r.y)}e=-t/2}return e}getVertices(e){return!0===e?[]:this.components.slice(0,this.components.length-1)}}var _0x39701b=(_0xedb9a1=!0,function(e,t){var i=_0xedb9a1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xedb9a1=!1,i}),_0x2cb336=_0x39701b(void 0,(function(){return _0x2cb336.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cb336).search("(((.+)+)+)+$")})),_0xedb9a1;_0x2cb336();class Polygon extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LinearRing"],this.CLASS_NAME="SuperMap.Geometry.Polygon",this.geometryType="Polygon"}getArea(){var e=0;if(this.components&&this.components.length>0){e+=Math.abs(this.components[0].getArea());for(var t=1,i=this.components.length;t<i;t++)e-=Math.abs(this.components[t].getArea())}return e}}var _0x110b9d=(_0x335f86=!0,function(e,t){var i=_0x335f86?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x335f86=!1,i}),_0x80fb76=_0x110b9d(void 0,(function(){return _0x80fb76.toString().search("(((.+)+)+)+$").toString().constructor(_0x80fb76).search("(((.+)+)+)+$")})),_0x335f86;_0x80fb76();class Feature{constructor(e,t,i){this.CLASS_NAME="SuperMap.Feature",this.layer=e,this.id=_0x278499.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=t,this.data=i??{}}destroy(){this.id=null,this.lonlat=null,this.data=null}}var _0x26c875=(_0x24ffd8=!0,function(e,t){var i=_0x24ffd8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24ffd8=!1,i}),_0x2f772f=_0x26c875(void 0,(function(){return _0x2f772f.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f772f).search("(((.+)+)+)+$")})),_0x24ffd8;_0x2f772f();var _0x25fd66={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"};class Vector extends Feature{constructor(e,t,i){super(null,null,t),this.fid=null,this.geometry=e||null,this.attributes={},t&&(this.attributes=Util.extend(_this.attributes,t)),this.bounds=null,this.state=null,this.style=i||null,this.url=null,this.lonlat=null,this.CLASS_NAME="SuperMap.Feature.Vector",Vector.style={default:{fillColor:"#ee9900",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},select:{fillColor:"blue",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},temporary:{fillColor:"#66cccc",fillOpacity:.2,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"default",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},delete:{display:"none"}}}destroy(){this.layer&&(this.layer.removeFeatures(this),this.layer=null),this.geometry=null,Vector_get(Vector_getPrototypeOf(Vector.prototype),"destroy",this).call(this)}clone(){return new Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style)}toState(e){if(e===_0x25fd66.UPDATE)switch(this.state){case _0x25fd66.UNKNOWN:case _0x25fd66.DELETE:this.state=e}else if(e===_0x25fd66.INSERT)if(this.state===_0x25fd66.UNKNOWN);else this.state=e;else if(e===_0x25fd66.DELETE)switch(this.state){case _0x25fd66.INSERT:case _0x25fd66.DELETE:break;case _0x25fd66.UNKNOWN:case _0x25fd66.UPDATE:this.state=e}else e===_0x25fd66.UNKNOWN&&(this.state=e)}}var _0x1987ed=(_0x44e23d=!0,function(e,t){var i=_0x44e23d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x44e23d=!1,i}),_0x21844b=_0x1987ed(void 0,(function(){return _0x21844b.toString().search("(((.+)+)+)+$").toString().constructor(_0x21844b).search("(((.+)+)+)+$")})),_0x44e23d;_0x21844b();class PointWithMeasure extends Point$1{constructor(e){super(e),this.measure=null,this.CLASS_NAME="SuperMap.PointWithMeasure"}equals(e){var t=!1;if(null!=e){var i=this.x===e.x&&this.y===e.y&&this.measure===e.measure,n=isNaN(this.x)&&isNaN(this.y)&&isNaN(this.measure),r=isNaN(e.x)&&isNaN(e.y)&&isNaN(e.measure);t=i||n&&r}return t}static toJson(){var e="{";return null!=this.measure&&null!=this.measure&&(e+='"measure":'+this.measure+","),e+='"x":'+this.x+",",e+='"y":'+this.y,e+="}"}destroy(){var e=this;e.measure=null,e.x=null,e.y=null}static fromJson(e){if(e)return new PointWithMeasure({x:e.x,y:e.y,measure:e.measure})}}var _0x2c9e3b=(_0x156171=!0,function(e,t){var i=_0x156171?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x156171=!1,i}),_0x2c5fbe=_0x2c9e3b(void 0,(function(){return _0x2c5fbe.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c5fbe).search("(((.+)+)+)+$")})),_0x156171;_0x2c5fbe();class Route extends Collection$1{constructor(e,t){super(e,t),this.id=null,this.center=null,this.style=null,this.length=null,this.maxM=null,this.minM=null,this.parts=null,this.points=null,this.type=null,this.componentTypes=["SuperMap.Geometry.LinearRing","SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Route",this.geometryType="LINEM"}static toJson(){var e="{";if(null!=this.id&&null!=this.id&&(e+='"id":'+this.id+","),null!=this.center&&null!=this.center&&(e+='"center":'+this.center+","),null!=this.style&&null!=this.style&&(e+='"style":'+this.style+","),null!=this.length&&null!=this.length&&(e+='"length":'+this.length+","),null!=this.maxM&&null!=this.maxM&&(e+='"maxM":'+this.maxM+","),null!=this.minM&&null!=this.minM&&(e+='"minM":'+this.minM+","),null!=this.type&&null!=this.type&&(e+='"type":"'+this.type+'",'),null!=this.parts&&null!=this.parts){e+='"parts":['+this.parts[0];for(var t=1;t<this.parts.length;t++)e+=","+this.parts[t];e+="],"}if(null!=this.components&&this.components.length>0){e+='"points":[';for(var i=0,n=this.components.length;i<n;i++)for(var r=0,o=this.components[i].components.length;r<o;r++)e+=this.components[i].components[r].toJson()+",";e=e.replace(/,$/g,""),e+="]"}return e=e.replace(/,$/g,""),e+="}"}destroy(){var e=this;e.id=null,e.center=null,e.style=null,e.length=null,e.maxM=null,e.minM=null,e.type=null,e.parts=null,e.components.length=0,e.components=null,e.componentTypes=null}static fromJson(e){if(e){var t=e.parts||[],i=e.points||[],n=t.length,r=[];if(!(n>0))return null;for(var o=0,a=0,s=[];o<n;o++){for(var l=0;l<t[o];l++)s.push(PointWithMeasure.fromJson(i[a+l]));a+=t[o],s[0].equals(s[t[o]-1])?r.push(new LinearRing(s)):r.push(new LineString(s)),s=[]}return new Route(r,{id:e.id,center:e.center,style:e.style,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type,parts:e.parts})}}}var _0x2d380a=(_0x1e5cb8=!0,function(e,t){var i=_0x1e5cb8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e5cb8=!1,i}),_0x53589c=_0x2d380a(void 0,(function(){return _0x53589c.toString().search("(((.+)+)+)+$").toString().constructor(_0x53589c).search("(((.+)+)+)+$")})),_0x1e5cb8;_0x53589c();var _0x46c692={LINE:"LINE",LINEM:"LINEM",POINT:"POINT",REGION:"REGION",POINTEPS:"POINTEPS",LINEEPS:"LINEEPS",REGIONEPS:"REGIONEPS",ELLIPSE:"ELLIPSE",CIRCLE:"CIRCLE",TEXT:"TEXT",RECTANGLE:"RECTANGLE",UNKNOWN:"UNKNOWN",GEOCOMPOUND:"GEOCOMPOUND"};class ServerGeometry{constructor(e){this.id=0,this.style=null,this.parts=null,this.points=null,this.type=null,this.prjCoordSys=null,e&&_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.ServerGeometry"}destroy(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}toGeometry(){var e=this;switch(e.type.toUpperCase()){case _0x46c692.POINT:return e.toGeoPoint();case _0x46c692.LINE:return e.toGeoLine();case _0x46c692.LINEM:return e.toGeoLinem();case _0x46c692.REGION:return e.toGeoRegion();case _0x46c692.POINTEPS:return e.toGeoPoint();case _0x46c692.LINEEPS:return e.toGeoLineEPS();case _0x46c692.REGIONEPS:return e.toGeoRegionEPS();case _0x46c692.GEOCOMPOUND:return e.transformGeoCompound()}}toGeoPoint(){var e=this.parts||[],t=this.points||[],i=e.length;if(i>0){if(1===i)return new Point$1(t[0].x,t[0].y);for(var n=[],r=0;r<i;r++)n.push(new Point$1(t[r].x,t[r].y));return new MultiPoint(n)}return null}toGeoLine(){var e=this.parts||[],t=this.points||[],i=e.length;if(i>0){if(1===i){for(var n=[],r=0;r<e[0];r++)n.push(new Point$1(t[r].x,t[r].y));return n[0].equals(n[e[0]-1])?new LinearRing(n):new LineString(n)}for(var o=[],a=0;a<i;a++){for(var s=[],l=0;l<e[a];l++)s.push(new Point$1(t[l].x,t[l].y));o.push(new LineString(s)),t.splice(0,e[a])}return new MultiLineString(o)}return null}toGeoLineEPS(){var e,t,i,n,r,o=this.parts||[],a=this.points||[],s=o.length;if(s>0){if(1===s){for(e=0,i=[];e<o[0];e++)i.push(new Point$1(a[e].x,a[e].y,a[e].type));return i[0].equals(i[o[0]-1])?(r=LineString.createLineEPS(i),new LinearRing(r)):(r=LineString.createLineEPS(i),new LineString(r))}for(e=0,n=[];e<s;e++){for(t=0,i=[];t<o[e];t++)i.push(new Point$1(a[t].x,a[t].y));r=LineString.createLineEPS(i),n.push(new LineString(r)),a.splice(0,o[e])}return new MultiLineString(n)}return null}toGeoLinem(){return Route.fromJson(this)}toGeoRegion(){var e=this,t=e.parts||[],i=e.partTopo||[],n=e.points||[],r=t.length;if(r<=0)return null;var o=[],a=[];if(1==r){for(var s=0;s<n.length;s++)a.push(new Point$1(n[s].x,n[s].y));return o.push(new Polygon([new LinearRing(a)])),new MultiPolygon(o)}for(var l=[],u=[],c=[],h=[],d=[],f=0,p=0;f<r;f++){for(var _=0;_<t[f];_++)a.push(new Point$1(n[p+_].x,n[p+_].y));p+=t[f];var m=new Polygon([new LinearRing(a)]);a=[],c.push(m),0===i.length&&h.push(m.getBounds()),d.push(1),u.push(m.getArea())}if(0===i.length){ServerGeometry.bubbleSort(u,c,i,h);for(var g=[],x=1;x<c.length;x++)for(var y=x-1;y>=0;y--)if(g[x]=-1,h[y].containsBounds(h[x])){d[x]=-1*d[y],d[x]<0&&(g[x]=y);break}for(var v=0;v<c.length;v++)d[v]>0?o.push(c[v]):(o[g[v]].components=o[g[v]].components.concat(c[v].components),o.push(""))}else{o=new Array;for(var $=0;$<c.length;$++)if(i[$]&&-1==i[$]?l=l.concat(c[$].components):(l.length>0&&o.length>0&&(o[o.length-1].components=o[o.length-1].components.concat(l),l=[]),o.push(c[$])),$==r-1){var b=o.length;if(b)o[b-1].components=o[b-1].components.concat(l);else for(var T=0,C=l.length;T<C;T++)o.push(new Polygon(l))}}return new MultiPolygon(o)}toGeoRegionEPS(){var e=this,t=e.parts||[],i=e.partTopo||[],n=e.points||[],r=t.length;if(r<=0)return null;var o,a=[],s=[];if(1==r){for(var l=0;l<n.length;l++)s.push(new Point$1(n[l].x,n[l].y));return o=LineString.createLineEPS(s),a.push(new Polygon([new LinearRing(o)])),new MultiPolygon(a)}for(var u=[],c=[],h=[],d=[],f=[],p=0,_=0;p<r;p++){for(var m=0;m<t[p];m++)s.push(new Point$1(n[_+m].x,n[_+m].y));_+=t[p],o=LineString.createLineEPS(s);var g=new Polygon([new LinearRing(o)]);s=[],h.push(g),0===i.length&&d.push(g.getBounds()),f.push(1),c.push(g.getArea())}if(0===i.length){ServerGeometry.bubbleSort(c,h,i,d);for(var x=[],y=1;y<h.length;y++)for(var v=y-1;v>=0;v--)if(x[y]=-1,d[v].containsBounds(d[y])){f[y]=-1*f[v],f[y]<0&&(x[y]=v);break}for(var $=0;$<h.length;$++)f[$]>0?a.push(h[$]):(a[x[$]].components=a[x[$]].components.concat(h[$].components),a.push(""))}else{a=new Array;for(var b=0;b<h.length;b++)if(i[b]&&-1==i[b]?u=u.concat(h[b].components):(u.length>0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(u),u=[]),a.push(h[b])),b==r-1){var T=a.length;if(T)a[T-1].components=a[T-1].components.concat(u);else for(var C=0,S=u.length;C<S;C++)a.push(new Polygon(u))}}return new MultiPolygon(a)}transformGeoCompound(){var e=this.geoParts||[],t=e.length;if(t<=0)return null;for(var i=[],n=0;n<t;n++){var r=e[n];i.push(new ServerGeometry(r).toGeometry())}return new Collection(i)}fromJson(e){if(e)return new ServerGeometry({id:e.id,style:ServerStyle.fromJson(e.style),parts:e.parts,partTopo:e.partTopo,points:e.points,center:e.center,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type})}fromGeometry(e){if(e){var t=0,i=[],n=[],r=null,o=e.components,a=e.CLASS_NAME,s={epsgCode:e.SRID};if(isNaN(e.id)||(t=e.id),"SuperMap.Geometry.LinearRing"!=a&&"SuperMap.Geometry.LineString"!=a&&(e instanceof MultiPoint||e instanceof MultiLineString)){for(var l=o.length,u=0;u<l;u++){var c=o[u].getVertices(),h=c.length;i.push(h);for(var d=0;d<h;d++)n.push(new Point$1(c[d].x,c[d].y))}r="SuperMap.Geometry.MultiPoint"==a?_0x46c692.POINT:_0x46c692.LINE}else if(e instanceof MultiPolygon){for(var f=o.length,p=0;p<f;p++)for(var _=o[p].components,m=_.length,g=0;g<m;g++){var x=_[g].getVertices(),y=x.length+1;i.push(y);for(var v=0;v<y-1;v++)n.push(new Point$1(x[v].x,x[v].y));n.push(new Point$1(x[0].x,x[0].y))}r=_0x46c692.REGION}else if(e instanceof Polygon){for(var $=o.length,b=0;b<$;b++){var T=o[b].getVertices(),C=T.length+1;i.push(C);for(var S=0;S<C-1;S++)n.push(new Point$1(T[S].x,T[S].y));n.push(new Point$1(T[0].x,T[0].y))}r=_0x46c692.REGION}else{for(var w=e.getVertices(),E=w.length,P=0;P<E;P++)n.push(new Point$1(w[P].x,w[P].y));e instanceof LinearRing&&(n.push(new Point$1(w[0].x,w[0].y)),E++),i.push(E),r=e instanceof Point$1?_0x46c692.POINT:_0x46c692.LINE}return new ServerGeometry({id:t,style:null,parts:i,points:n,type:r,prjCoordSys:s})}}IsClockWise(e){var t=e.length;if(t<3)return 0;var i=e[0].y*(e[t-1].x-e[1].x);e.push(e[0]);for(var n=1;n<t;n++)i+=e[n].y*(e[n-1].x-e[n+1].x);return.5*i}bubbleSort(e,t,i,n){for(var r=0;r<e.length;r++)for(var o=0;o<e.length;o++)if(e[r]>e[o]){var a=e[o];e[o]=e[r],e[r]=a;var s=t[o];if(t[o]=t[r],t[r]=s,i&&i.length>0){var l=i[o];i[o]=i[r],i[r]=l}if(n&&n.length>0){var u=n[o];n[o]=n[r],n[r]=u}}}}var _0x46bdf9=(_0x56c590=!0,function(e,t){var i=_0x56c590?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56c590=!1,i}),_0x15c609=_0x46bdf9(void 0,(function(){return _0x15c609.toString().search("(((.+)+)+)+$").toString().constructor(_0x15c609).search("(((.+)+)+)+$")})),_0x56c590;_0x15c609();class _0x19437a extends _0x4590c8{constructor(e){super(e),this.ignoreExtraDims=!0,this.CLASS_NAME="SuperMap.Format.GeoJSON",this.parseCoords={point:function(e){if(!1===this.ignoreExtraDims&&2!=e.length)throw"Only 2D points are supported: "+e;return new Point$1(e[0],e[1])},multipoint:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.point.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiPoint(t)},linestring:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.point.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new LineString(t)},multilinestring:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.linestring.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiLineString(t)},polygon:function(e){for(var t,i,n=[],r=0,o=e.length;r<o;++r){try{i=this.parseCoords.linestring.apply(this,[e[r]])}catch(e){throw e}t=new LinearRing(i.components),n.push(t)}return new Polygon(n)},multipolygon:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.polygon.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiPolygon(t)},box:function(e){if(2!=e.length)throw"GeoJSON box coordinates must have 2 elements";return new Polygon([new LinearRing([new Point$1(e[0][0],e[0][1]),new Point$1(e[1][0],e[0][1]),new Point$1(e[1][0],e[1][1]),new Point$1(e[0][0],e[1][1]),new Point$1(e[0][0],e[0][1])])])}},this.extract={feature:function(e){var t=this.extract.geometry.apply(this,[e.geometry]),i={type:"Feature",properties:this.createAttributes(e),geometry:t};return e.geometry&&"TEXT"===e.geometry.type&&(i.properties.texts=e.geometry.texts,i.properties.textStyle=e.geometry.textStyle),e.fid&&(i.id=e.fid),e.ID&&(i.id=e.ID),i},geometry:function(e){if(null==e)return null;!e.parts&&e.points&&(e.parts=[e.points.length]);var t,i=e.hasOwnProperty("geometryType")?e:new ServerGeometry(e).toGeometry()||e,n=i.geometryType||i.type;return"LinearRing"===n&&(n="LineString"),"LINEM"===n&&(n="MultiLineString"),t=this.extract[n.toLowerCase()].apply(this,[i]),"Collection"===(n="TEXT"===n?"Point":n)?{type:"GeometryCollection",geometries:t}:{type:n,coordinates:t}},point:function(e){var t=[e.x,e.y];for(var i in e)"x"!==i&&"y"!==i&&null!==e[i]&&!isNaN(e[i])&&t.push(e[i]);return t},text:function(e){return[e.points[0].x,e.points[0].y]},multipoint:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t},linestring:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t},multilinestring:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.linestring.apply(this,[e.components[i]]));return t},polygon:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.linestring.apply(this,[e.components[i]]));return t},multipolygon:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.polygon.apply(this,[e.components[i]]));return t},collection:function(e){for(var t=e.components.length,i=new Array(t),n=0;n<t;++n)i[n]=this.extract.geometry.apply(this,[e.components[n]]);return i}}}read(e,t,i){t=t||"FeatureCollection";var n=null,r=null;if((r="string"==typeof e?GeoJSON_get(GeoJSON_getPrototypeOf(_0x19437a.prototype),"read",this).call(this,e,i):e)&&"string"==typeof r.type&&this.isValidType(r,t))switch(t){case"Geometry":try{n=this.parseGeometry(r)}catch{}break;case"Feature":try{(n=this.parseFeature(r)).type="Feature"}catch{}break;case"FeatureCollection":switch(n=[],r.type){case"Feature":try{n.push(this.parseFeature(r))}catch{n=null}break;case"FeatureCollection":for(var o=0,a=r.features.length;o<a;++o)try{n.push(this.parseFeature(r.features[o]))}catch{n=null}break;default:try{var s=this.parseGeometry(r);n.push(new Vector(s))}catch{n=null}}}return n}write(e,t){return GeoJSON_get(GeoJSON_getPrototypeOf(_0x19437a.prototype),"write",this).call(this,this.toGeoJSON(e),t)}fromGeoJSON(e,t,i){var n=this,r=this.read(e,t,i);return Array.isArray(r)?r.map((function(e){return n._toiSevrerFeature(e)})):this._toiSevrerFeature(r)}toGeoJSON(e){var t={type:null};if(Array.isArray(e)){t.type="FeatureCollection";var i=e.length;t.features=new Array(i);for(var n=0;n<i;++n){var r=e[n];if(s(r)){var o={};o.geometry=r,t.features[n]=this.extract.feature.apply(this,[o])}else t.features[n]=this.extract.feature.apply(this,[r])}}else if(s(e)){var a={};a.geometry=e,t=this.extract.feature.apply(this,[a])}else t=this.extract.feature.apply(this,[e]);function s(e){return e.hasOwnProperty("parts")&&e.hasOwnProperty("points")||e.hasOwnProperty("geoParts")}return t}isValidType(e,t){var i=!1;switch(t){case"Geometry":-1==_0x278499.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],e.type)||(i=!0);break;case"FeatureCollection":i=!0;break;default:e.type==t&&(i=!0)}return i}parseFeature(e){var t,i,n,r;n=e.properties?e.properties:{},r=e.geometry&&e.geometry.bbox||e.bbox;try{i=this.parseGeometry(e.geometry)}catch(e){throw e}return t=new Vector(i,n),r&&(t.bounds=_0x551fc0.fromArray(r)),e.id&&(t.fid=e.id),t}parseGeometry(e){if(null==e)return null;var t;if("GeometryCollection"==e.type){if(!Array.isArray(e.geometries))throw"GeometryCollection must have geometries array: "+e;for(var i=e.geometries.length,n=new Array(i),r=0;r<i;++r)n[r]=this.parseGeometry.apply(this,[e.geometries[r]]);t=new Collection$1(n)}else{if(!Array.isArray(e.coordinates))throw"Geometry must have coordinates array: "+e;if(!this.parseCoords[e.type.toLowerCase()])throw"Unsupported geometry type: "+e.type;try{t=this.parseCoords[e.type.toLowerCase()].apply(this,[e.coordinates])}catch(e){throw e}}return t}createCRSObject(e){var t=e.layer.projection.toString(),i={};if(t.match(/epsg:/i)){var n=parseInt(t.substring(t.indexOf(":")+1));i=4326==n?{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"name",properties:{name:"EPSG:"+n}}}return i}_toiSevrerFeature(e){var t=e.attributes,i=[],n=[];for(var r in t)i.push(r),n.push(t[r]);var o={fieldNames:i,fieldValues:n,geometry:ServerGeometry.fromGeometry(e.geometry)};return o.geometry.id=e.fid,o}createAttributes(e){if(!e)return null;return{}}}var _0x45b403=(_0x2db74e=!0,function(e,t){var i=_0x2db74e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2db74e=!1,i}),_0x54b1e2=_0x45b403(void 0,(function(){return _0x54b1e2.toString().search("(((.+)+)+)+$").toString().constructor(_0x54b1e2).search("(((.+)+)+)+$")})),_0x2db74e;_0x54b1e2();class FindClosestFacilitiesService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindClosestFacilitiesService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindClosestFacilitiesParameters){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"closestfacility"),t={expectFacilityCount:e.expectFacilityCount,fromEvent:e.fromEvent,maxWeight:e.maxWeight,parameter:_0x278499.toJSON(e.parameter),event:_0x278499.toJSON(e.event),facilities:i.getJson(e.isAnalyzeById,e.facilities)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new _0x19437a;return e.facilityPathList.map((function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e})),e}}var _0x551656=(_0x523aad=!0,function(e,t){var i=_0x523aad?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x523aad=!1,i}),_0x5730d5=_0x551656(void 0,(function(){return _0x5730d5.toString().search("(((.+)+)+)+$").toString().constructor(_0x5730d5).search("(((.+)+)+)+$")})),_0x523aad;_0x5730d5();class FindLocationParameters{constructor(e){this.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FindLocationParameters"}destroy(){var e=this;if(e.expectedSupplyCenterCount=null,e.isFromCenter=null,e.turnWeightField=null,e.weightName=null,e.supplyCenters){for(var t=0,i=e.supplyCenters,n=i.length;t<n;t++)i[t].destroy();e.supplyCenters=null}}}var _0x523470=(_0x344de6=!0,function(e,t){var i=_0x344de6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x344de6=!1,i}),_0x46242e=_0x523470(void 0,(function(){return _0x46242e.toString().search("(((.+)+)+)+$").toString().constructor(_0x46242e).search("(((.+)+)+)+$")})),_0x344de6;_0x46242e();class FindLocationService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindLocationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindLocationParameters){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"location"),t={isFromCenter:e.isFromCenter,expectedSupplyCenterCount:e.expectedSupplyCenterCount,weightName:e.weightName,turnWeightField:e.turnWeightField,returnEdgeFeature:!0,returnEdgeGeometry:!0,returnNodeFeature:!0,mapParameter:_0x278499.toJSON(e.mapParameter),supplyCenters:i.getCentersJson(e.supplyCenters)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getCentersJson(e){for(var t="[",i=e?e.length:0,n=0;n<i;n++)n>0&&(t+=","),t+=_0x278499.toJSON(e[n]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new _0x19437a;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}var _0x56eb22=(_0x445516=!0,function(e,t){var i=_0x445516?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x445516=!1,i}),_0x5be6a7=_0x56eb22(void 0,(function(){return _0x5be6a7.toString().search("(((.+)+)+)+$").toString().constructor(_0x5be6a7).search("(((.+)+)+)+$")})),_0x445516;_0x5be6a7();class FindMTSPPathsParameters{constructor(e){this.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FindMTSPPathsParameters"}destroy(){var e=this;e.centers=null,e.hasLeastTotalCost=null,e.isAnalyzeById=null,e.nodes=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x31227a=(_0x53e96b=!0,function(e,t){var i=_0x53e96b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53e96b=!1,i}),_0x48a7c8=_0x31227a(void 0,(function(){return _0x48a7c8.toString().search("(((.+)+)+)+$").toString().constructor(_0x48a7c8).search("(((.+)+)+)+$")})),_0x53e96b;_0x48a7c8();class FindMTSPPathsService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindMTSPPathsParameters){var t,i=this,n=i.getJson(e.isAnalyzeById,e.centers),r=i.getJson(e.isAnalyzeById,e.nodes);i.url=_0x2e06c5.urlPathAppend(i.url,"mtsppath"),t={centers:n,nodes:r,parameter:_0x278499.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new _0x19437a;return e.pathList.map((function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e})),e}}var _0x192ac3=(_0x24fe3d=!0,function(e,t){var i=_0x24fe3d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24fe3d=!1,i}),_0xee59ba=_0x192ac3(void 0,(function(){return _0xee59ba.toString().search("(((.+)+)+)+$").toString().constructor(_0xee59ba).search("(((.+)+)+)+$")})),_0x24fe3d;_0xee59ba();class FindPathParameters{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FindPathParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.hasLeastEdgeCount=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x28bf5a=(_0x5ed5e2=!0,function(e,t){var i=_0x5ed5e2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ed5e2=!1,i}),_0x5ba370=_0x28bf5a(void 0,(function(){return _0x5ba370.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ba370).search("(((.+)+)+)+$")})),_0x5ed5e2;_0x5ba370();class FindPathService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindPathParameters){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"path"),t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:_0x278499.toJSON(e.parameter),nodes:i.getJson(e.isAnalyzeById,e.nodes)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new _0x19437a;return e.pathList.forEach((function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))})),e}}var _0x5775cf=(_0x1b5d32=!0,function(e,t){var i=_0x1b5d32?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b5d32=!1,i}),_0x2ac4ef=_0x5775cf(void 0,(function(){return _0x2ac4ef.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ac4ef).search("(((.+)+)+)+$")})),_0x1b5d32;_0x2ac4ef();class FindServiceAreasParameters{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new TransportationAnalystParameter,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FindServiceAreasParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.isCenterMutuallyExclusive=null,e.centers=null,e.isFromCenter=null,e.weights=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x533090=(_0x162499=!0,function(e,t){var i=_0x162499?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x162499=!1,i}),_0x200222=_0x533090(void 0,(function(){return _0x200222.toString().search("(((.+)+)+)+$").toString().constructor(_0x200222).search("(((.+)+)+)+$")})),_0x162499;_0x200222();class FindServiceAreasService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){this.destroy()}processAsync(e){if(e instanceof FindServiceAreasParameters){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"servicearea"),t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:_0x278499.toJSON(e.parameter),centers:i.getJson(e.isAnalyzeById,e.centers),weights:i.getJson(!0,e.weights)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new _0x19437a;return e.serviceAreaList.map((function(e){return e.serviceRegion&&(e.serviceRegion=t.toGeoJSON(e.serviceRegion)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e.routes&&(e.routes=t.toGeoJSON(e.routes)),e})),e}}var _0x34a074=(_0x399716=!0,function(e,t){var i=_0x399716?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x399716=!1,i}),_0x23a91d=_0x34a074(void 0,(function(){return _0x23a91d.toString().search("(((.+)+)+)+$").toString().constructor(_0x23a91d).search("(((.+)+)+)+$")})),_0x399716;_0x23a91d();class FindTSPPathsParameters{constructor(e){this.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FindTSPPathsParameters"}destroy(){var e=this;e.endNodeAssigned=null,e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0xcd95eb=(_0x371a76=!0,function(e,t){var i=_0x371a76?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x371a76=!1,i}),_0xfb5575=_0xcd95eb(void 0,(function(){return _0xfb5575.toString().search("(((.+)+)+)+$").toString().constructor(_0xfb5575).search("(((.+)+)+)+$")})),_0x371a76;_0xfb5575();class FindTSPPathsService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindTSPPathsParameters){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"tsppath"),t={parameter:_0x278499.toJSON(e.parameter),endNodeAssigned:e.endNodeAssigned,nodes:i.getNodesJson(e)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getNodesJson(e){var t,i,n,r,o="";if(!1===e.isAnalyzeById){for(t="[",i=0,n=(r=e.nodes).length;i<n;i++)i>0&&(t+=","),t+='{"x":'+r[i].x+',"y":'+r[i].y+"}";o+=t+="]"}else if(!0===e.isAnalyzeById){for(var a="[",s=e.nodes,l=s.length,u=0;u<l;u++)u>0&&(a+=","),a+=s[u];o+=a+="]"}return o}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new _0x19437a;return e.tspPathList.forEach((function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))})),e}}var _0x5cddc5={extend:function(e){var t,i,n,r;for(i=1,n=arguments.length;i<n;i++)for(t in r=arguments[i])e[t]=r[t];return e},create:Object.create||function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));function n(){}return i(),function(e){return n.prototype=e,new n}}(),bind:function(e,t){var i=Array.prototype.slice;if(e.bind)return e.bind.apply(e,i.call(arguments,1));var n=i.call(arguments,2);return function(){return e.apply(t,n.length?n.concat(i.call(arguments)):arguments)}},stamp:function(e){return e._leaflet_id=e._leaflet_id||++L.Util.lastId,e._leaflet_id},lastId:0,throttle:function(e,t,i){var n,r,o,a;return a=function(){n=!1,r&&(o.apply(i,r),r=!1)},o=function(){n?r=arguments:(e.apply(i,arguments),setTimeout(a,t),n=!0)},o},wrapNum:function(e,t,i){var n=t[1],r=t[0],o=n-r;return e===n&&i?e:((e-r)%o+o)%o+r},falseFn:function(){return!1},formatNum:function(e,t){var i=Math.pow(10,t||5);return Math.round(e*i)/i},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},splitWords:function(e){return _0x5cddc5.trim(e).split(/\s+/)},setOptions:function(e,t){for(var i in e.hasOwnProperty("options")||(e.options=e.options?_0x5cddc5.create(e.options):{}),t)e.options[i]=t[i];return e.options},getParamString:function(e,t,i){var n=[];for(var r in e)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(e[r]));return(t&&-1!==t.indexOf("?")?"&":"?")+n.join("&")},template:function(e,t){return e.replace(_0x5cddc5.templateRe,(function(e,i){var n=t[i];if(void 0===n)throw new Error("No value provided for variable "+e);return"function"==typeof n&&(n=n(t)),n}))},templateRe:/\{ *([\w_\-]+) *\}/g,isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},indexOf:function(e,t){for(var i=0;i<e.length;i++)if(e[i]===t)return i;return-1},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},_0x57fb1f=(_0x2210dd=!0,function(e,t){var i=_0x2210dd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2210dd=!1,i}),_0x106d75=_0x57fb1f(void 0,(function(){return _0x106d75.toString().search("(((.+)+)+)+$").toString().constructor(_0x106d75).search("(((.+)+)+)+$")})),_0x2210dd;function _0x1523c4(){}_0x106d75(),_0x1523c4.extend=function(e){var t=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=t.__super__=this.prototype,n=_0x5cddc5.create(i);for(var r in n.constructor=t,t.prototype=n,this)this.hasOwnProperty(r)&&"prototype"!==r&&(t[r]=this[r]);return e.statics&&(_0x5cddc5.extend(t,e.statics),delete e.statics),e.includes&&(_0x5cddc5.extend.apply(null,[n].concat(e.includes)),delete e.includes),n.options&&(e.options=_0x5cddc5.extend(_0x5cddc5.create(n.options),e.options)),_0x5cddc5.extend(n,e),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=n._initHooks.length;e<t;e++)n._initHooks[e].call(this)}},t},_0x1523c4.include=function(e){return _0x5cddc5.extend(this.prototype,e),this},_0x1523c4.mergeOptions=function(e){return _0x5cddc5.extend(this.prototype.options,e),this},_0x1523c4.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),i="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var _0xfe7e99=(_0x42515c=!0,function(e,t){var i=_0x42515c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42515c=!1,i}),_0x5272fd=_0xfe7e99(void 0,(function(){return _0x5272fd.toString().search("(((.+)+)+)+$").toString().constructor(_0x5272fd).search("(((.+)+)+)+$")})),_0x42515c;_0x5272fd();var _0x38cf22=_0x1523c4.extend({on:function(e,t,i){if("object"==typeof e)for(var n in e)this._on(n,e[n],t);else for(var r=0,o=(e=_0x5cddc5.splitWords(e)).length;r<o;r++)this._on(e[r],t,i);return this},off:function(e,t,i){if(e)if("object"==typeof e)for(var n in e)this._off(n,e[n],t);else for(var r=0,o=(e=_0x5cddc5.splitWords(e)).length;r<o;r++)this._off(e[r],t,i);else delete this._events;return this},_on:function(e,t,i){this._events=this._events||{};var n=this._events[e];n||(n=[],this._events[e]=n),i===this&&(i=void 0);for(var r={fn:t,ctx:i},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===t&&o[a].ctx===i)return;o.push(r)},_off:function(e,t,i){var n,r,o;if(this._events&&(n=this._events[e])){if(!t){for(r=0,o=n.length;r<o;r++)n[r].fn=_0x5cddc5.falseFn;return void delete this._events[e]}if(i===this&&(i=void 0),n)for(r=0,o=n.length;r<o;r++){var a=n[r];if(a.ctx===i&&a.fn===t)return a.fn=_0x5cddc5.falseFn,this._firingCount&&(this._events[e]=n=n.slice()),void n.splice(r,1)}}},fire:function(e,t,i){if(!this.listens(e,i))return this;var n=_0x5cddc5.extend({},t,{type:e,target:this});if(this._events){var r=this._events[e];if(r){this._firingCount=this._firingCount+1||1;for(var o=0,a=r.length;o<a;o++){var s=r[o];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(e,t){var i=this._events&&this._events[e];if(i&&i.length)return!0;if(t)for(var n in this._eventParents)if(this._eventParents[n].listens(e,t))return!0;return!1},once:function(e,t,i){if("object"==typeof e){for(var n in e)this.once(n,e[n],t);return this}var r=_0x5cddc5.bind((function(){this.off(e,t,i).off(e,r,i)}),this);return this.on(e,t,i).on(e,r,i)},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[_0x5cddc5.stamp(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[_0x5cddc5.stamp(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,_0x5cddc5.extend({layer:e.target},e),!0)}}),_0x4b682b=(_0x3a6fdd=!0,function(e,t){var i=_0x3a6fdd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a6fdd=!1,i}),_0x2fbc93=_0x4b682b(void 0,(function(){return _0x2fbc93.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fbc93).search("(((.+)+)+)+$")})),_0x3a6fdd;_0x2fbc93();class ServiceBase extends _0x38cf22{constructor(e,t){super(),e&&(e=e.indexOf("/")!==e.length-1?e:e.substr(0,e.length-1)),this.url=e,_0x5cddc5.setOptions(this,t),this.fire("initialized",this)}destroy(){this.fire("destroy",this)}}var _0x314a42=(_0x129c9d=!0,function(e,t){var i=_0x129c9d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x129c9d=!1,i}),_0x2ca2b5=_0x314a42(void 0,(function(){return _0x2ca2b5.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ca2b5).search("(((.+)+)+)+$")})),_0x129c9d;_0x2ca2b5();class UpdateEdgeWeightParameters{constructor(e){!e||(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}}var _0x457549=(_0xd2c072=!0,function(e,t){var i=_0xd2c072?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd2c072=!1,i}),_0x3dd66c=_0x457549(void 0,(function(){return _0x3dd66c.toString().search("(((.+)+)+)+$").toString().constructor(_0x3dd66c).search("(((.+)+)+)+$")})),_0xd2c072;_0x3dd66c();class UpdateEdgeWeightService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof UpdateEdgeWeightParameters){var t=this,i=t.parse(e);t.url=_0x2e06c5.urlPathAppend(t.url,i);var n=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:n,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var i in e)if(""!==e[i]&&"edgeWeight"!==e[i])switch(i){case"edgeId":t+="/edgeweight/"+e[i];break;case"fromNodeId":t+="/fromnode/"+e[i];break;case"toNodeId":t+="/tonode/"+e[i];break;case"weightField":t+="/weightfield/"+e[i]}return t}}}var _0x274501=(_0x2e2f67=!0,function(e,t){var i=_0x2e2f67?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e2f67=!1,i}),_0x45bcce=_0x274501(void 0,(function(){return _0x45bcce.toString().search("(((.+)+)+)+$").toString().constructor(_0x45bcce).search("(((.+)+)+)+$")})),_0x2e2f67;_0x45bcce();class UpdateTurnNodeWeightParameters{constructor(e){!e||(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}}var _0x17d025=(_0x4d1884=!0,function(e,t){var i=_0x4d1884?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d1884=!1,i}),_0xdb1f81=_0x17d025(void 0,(function(){return _0xdb1f81.toString().search("(((.+)+)+)+$").toString().constructor(_0xdb1f81).search("(((.+)+)+)+$")})),_0x4d1884;_0xdb1f81();class UpdateTurnNodeWeightService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof UpdateTurnNodeWeightParameters){var t=this,i=t.parse(e);t.url=_0x2e06c5.urlPathAppend(t.url,i);var n=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:n,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var i in e)if(""!==e[i]&&"turnNodeWeight"!==e[i])switch(i){case"nodeId":t+="/turnnodeweight/"+e[i];break;case"fromEdgeId":t+="/fromedge/"+e[i];break;case"toEdgeId":t+="/toedge/"+e[i];break;case"weightField":t+="/weightfield/"+e[i]}return t}}}var _0x5a71ae=(_0x45a6c4=!0,function(e,t){var i=_0x45a6c4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45a6c4=!1,i}),_0x6d593e=_0x5a71ae(void 0,(function(){return _0x6d593e.toString().search("(((.+)+)+)+$").toString().constructor(_0x6d593e).search("(((.+)+)+)+$")})),_0x45a6c4;_0x6d593e();var _0xf20e4e=function(e,t,i){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==i&&(this.alt=+i)};_0xf20e4e.prototype={equals:function(e,t){return!!e&&(e=L.latLng(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+L.Util.formatNum(this.lat,e)+", "+L.Util.formatNum(this.lng,e)+")"},distanceTo:function(e){return L.CRS.Earth.distance(this,L.latLng(e))},wrap:function(){return L.CRS.Earth.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,i=t/Math.cos(Math.PI/180*this.lat);return L.latLngBounds([this.lat-t,this.lng-i],[this.lat+t,this.lng+i])},clone:function(){return new L.LatLng(this.lat,this.lng,this.alt)}};var _0x1cbbfd=(_0x1cc2c6=!0,function(e,t){var i=_0x1cc2c6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1cc2c6=!1,i}),_0x5850aa=_0x1cbbfd(void 0,(function(){return _0x5850aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x5850aa).search("(((.+)+)+)+$")})),_0x1cc2c6;_0x5850aa();var _0x25f24d={GEOJSON:"GEOJSON",ISERVER:"ISERVER"};class NetworkAnalystService extends ServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.NetworkAnalystService"}burstPipelineAnalyst(e,t){var i=this;new BurstPipelineAnalystService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))}computeWeightMatrix(e,t){var i=this;new ComputeWeightMatrixService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))}findClosestFacilities(e,t,i){var n=this;new FindClosestFacilitiesService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}streamFacilityAnalyst(e,t,i){var n=this;new FacilityAnalystStreamService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findLocation(e,t,i){var n=this;new FindLocationService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findPath(e,t,i){var n=this;new FindPathService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findTSPPaths(e,t,i){var n=this;new FindTSPPathsService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findMTSPPaths(e,t,i){var n=this;new FindMTSPPathsService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findServiceAreas(e,t,i){var n=this;new FindServiceAreasService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}updateEdgeWeight(e,t){var i=this;new UpdateEdgeWeightService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}updateTurnNodeWeight(e,t){var i=this;new UpdateTurnNodeWeightService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}_processParams(e){if(!e)return{};if(e.centers&&Array.isArray(e.centers)&&e.centers.map((function(t,i){return e.centers[i]=t instanceof _0xf20e4e?{x:t.lng,y:t.lat}:t,e.centers[i]})),e.nodes&&Array.isArray(e.nodes)&&e.nodes.map((function(t,i){return e.nodes[i]=t instanceof _0xf20e4e?{x:t.lng,y:t.lat}:t,e.nodes[i]})),e.event&&e.event instanceof _0xf20e4e&&(e.event={x:e.event.lng,y:e.event.lat}),e.facilities&&Array.isArray(e.facilities)&&e.facilities.map((function(t,i){return e.facilities[i]=t instanceof _0xf20e4e?{x:t.lng,y:t.lat}:t,e.facilities[i]})),e.parameter&&e.parameter.barrierPoints){var t=e.parameter.barrierPoints;Array.isArray(t)?t.map((function(t,i){return e.parameter.barrierPoints[i]=t instanceof _0xf20e4e?{x:t.lng,y:t.lat}:t,e.parameter.barrierPoints[i]})):e.parameter.barrierPoints=[t instanceof _0xf20e4e?{x:t.lng,y:t.lat}:t]}return e}_processFormat(e){return e||_0x25f24d.GEOJSON}}const _0x4a0af5=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1f13f4=_0x4a0af5(void 0,(function(){return _0x1f13f4.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f13f4).search("(((.+)+)+)+$")}));_0x1f13f4();class _0x2befe4{constructor(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.scene))throw new WebGLPlot.DeveloperError("BIMInfoClickQueryHandler scene is required.");if(!WebGLPlot.defined(e.axiosUrl)||""==e.axiosUrl||!e.axiosUrl.includes("MGISDataQueryImpl"))throw new WebGLPlot.DeveloperError("BIMInfoClickQueryHandler url is required.");this._scene=e.scene,this.axiosUrl=e.axiosUrl,this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.scene.canvas)}activate(e){if(!WebGLPlot.defined(this._scene)||!WebGLPlot.defined(this.handler))return;let t=this;this.handler.setInputAction((function(i){const n=i.position,r=t._scene.pick(n);if(!r)return;let{id:o,primitive:a}=r;if(!a||null==o)return;a._transparentBackColor=new Cesium.Color(1,0,0,1),a._section=!0;let s=a.name;if(WebGLPlot.defined(s)&&s.includes("@")){let i=s.split("@")[0].toUpperCase();_0x2b4a20(t.axiosUrl,i,o,"BIMDataBox",n,e)}else if("string"==typeof o&&-1!==o.indexOf("_")){let i=o.split("_")[0],r=Number(o.split("_")[1]);if("people"===i)return void _0x2b4a20(t.axiosUrl,"LJBD_PB_SY_JBXX",r,"PeopleDataBox",n,e);if("build"===i)return void _0x2b4a20(t.axiosUrl,"LJBD_PB_JZW_JBXX",r,"BuildDataBox",n,e)}}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK)}deactivate(){this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK)}}function _0x2b4a20(e,t,i,n,r,o){const a=e+"getDataByIDsWithOutCfgResults.json";let s={arg0:t,arg1:[i]};var l=JSON.stringify(s);let u=_0x1fbf8();u.open("POST",a,!1,"",""),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.send(l);var c=JSON.parse(u.responseText,null).newResourceLocation;u.open("GET",encodeURI(c),!1,"",""),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.send();let h=JSON.parse(u.responseText);WebGLPlot.defined(h)&&o&&o(h,r)}function _0x1fbf8(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}var _0x299d9e=(_0x27bafe=!0,function(e,t){var i=_0x27bafe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27bafe=!1,i}),_0x3c78ad=_0x299d9e(void 0,(function(){return _0x3c78ad.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c78ad).search("(((.+)+)+)+$")})),_0x27bafe;_0x3c78ad();class _0x32744e{constructor(e){this.datasetNames=null,this.targetEpsgCode=null,this.targetPrj=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnCountOnly=!1,this.maxFeatures=null,this.hasGeometry=!0,this.aggregations=null,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesParametersBase"}destroy(){var e=this;e.datasetNames=null,e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.hasGeometry=null,e.maxFeatures=null,e.targetEpsgCode=null,e.targetPrj=null,e.aggregation&&(e.aggregation=null)}}const _0x184d46=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4d520c=_0x184d46(void 0,(function(){return _0x4d520c.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d520c).search("(((.+)+)+)+$")}));_0x4d520c();class _0x35b861{constructor(e){this.attributeFilter=null,this.name=null,this.joinItems=null,this.linkItems=null,this.ids=null,this.orderBy=null,this.groupBy=null,this.fields=null,e&&Util.extend(this,e),this.CLASS_NAME="SuperMap.FilterParameter"}destroy(){var e=this;if(e.attributeFilter=null,e.name=null,e.joinItems){for(let t=0,i=e.joinItems,n=i.length;t<n;t++)i[t].destroy();e.joinItems=null}if(e.linkItems){for(let t=0,i=e.linkItems,n=i.length;t<n;t++)i[t].destroy();e.linkItems=null}e.ids=null,e.orderBy=null,e.groupBy=null,e.fields=null}}var _0x5f1f05=(_0x16a04c=!0,function(e,t){var i=_0x16a04c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16a04c=!1,i}),_0x2cb219=_0x5f1f05(void 0,(function(){return _0x2cb219.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cb219).search("(((.+)+)+)+$")})),_0x16a04c;_0x2cb219();class _0xaafaf2 extends _0x32744e{constructor(e){super(e),this.getFeatureMode="BOUNDS",this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode="CONTAIN",_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsParameters"}destroy(){super.destroy();var e=this;if(e.bounds&&(e.bounds.destroy(),e.bounds=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,i,n;return i={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},n={datasetNames:e.datasetNames,getFeatureMode:"BOUNDS",bounds:i,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new _0x35b861).name=e.datasetNames,t.fields=e.fields,n.queryParameter=t),e.attributeFilter&&(n.attributeFilter=e.attributeFilter,n.getFeatureMode="BOUNDS_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(n.maxFeatures=e.maxFeatures),"boolean"==typeof e.hasGeometry&&(n.hasGeometry=e.hasGeometry),e.targetEpsgCode&&(n.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(n.targetPrj=e.targetPrj),e.aggregations&&(n.aggregations=e.aggregations),_0x278499.toJSON(n)}}var _0x3c9001=(_0x303110=!0,function(e,t){var i=_0x303110?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x303110=!1,i}),_0x164e39=_0x3c9001(void 0,(function(){return _0x164e39.toString().search("(((.+)+)+)+$").toString().constructor(_0x164e39).search("(((.+)+)+)+$")})),_0x303110;_0x164e39();class _0x28aab6 extends _0x5958f9{constructor(e,t){super(e,t),t=t||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.hasGeometry=!0,this.maxFeatures=null,this.format="GEOJSON",_0x278499.extend(this,t),this.url=_0x278499.urlPathAppend(this.url,"featureResults"),this.CLASS_NAME="SuperMap.GetFeaturesServiceBase"}destroy(){super.destroy();var e=this;e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.format=null,e.hasGeometry=null}processAsync(e){if(e){var t,i=this,n=!0;i.returnContent=e.returnContent,i.fromIndex=e.fromIndex,i.toIndex=e.toIndex,i.maxFeatures=e.maxFeatures,i.hasGeometry=e.hasGeometry,i.returnContent&&(i.url=_0x278499.urlAppend(i.url,"returnContent="+i.returnContent),n=!1),null!=i.fromIndex&&null!=i.toIndex&&!isNaN(i.fromIndex)&&!isNaN(i.toIndex)&&i.fromIndex>=0&&i.toIndex>=0&&!n&&(i.url=_0x278499.urlAppend(i.url,"fromIndex="+i.fromIndex+"&toIndex="+i.toIndex)),e.returnCountOnly&&(i.url=_0x278499.urlAppend(i.url,"&returnCountOnly="+e.returnContent)),t=i.getJsonParameters(e),i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}serviceProcessCompleted(e){e=_0x278499.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}getJsonParameters(e){var t="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata",i=this;return i.url=_0x278499.urlPathAppend(i.url,t),i.url=_0x278499.urlAppend(i.url,"returnContent=true"),_0x278499.toJSON(e)}}var _0x247c39=(_0x4ec20a=!0,function(e,t){var i=_0x4ec20a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4ec20a=!1,i}),_0xe50d6e=_0x247c39(void 0,(function(){return _0xe50d6e.toString().search("(((.+)+)+)+$").toString().constructor(_0xe50d6e).search("(((.+)+)+)+$")})),_0x4ec20a;_0xe50d6e();class _0x4f0a2a extends _0x28aab6{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return _0xaafaf2.toJsonParameters(e)}}var _0x2fd27a=(_0x791f5f=!0,function(e,t){var i=_0x791f5f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x791f5f=!1,i}),_0x47b91f=_0x2fd27a(void 0,(function(){return _0x47b91f.toString().search("(((.+)+)+)+$").toString().constructor(_0x47b91f).search("(((.+)+)+)+$")})),_0x791f5f;_0x47b91f();class _0x5a768f{constructor(e,t,i,n){SuperMap.Util.isArray(e)&&(n=e[3],i=e[2],t=e[1],e=e[0]),this.left=null!=e?SuperMap.Util.toFloat(e):this.left,this.bottom=null!=t?SuperMap.Util.toFloat(t):this.bottom,this.right=null!=i?SuperMap.Util.toFloat(i):this.right,this.top=null!=n?SuperMap.Util.toFloat(n):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.PlotBounds"}clone(){return new _0x5a768f(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var i=Math.pow(10,e),n=Math.round(this.left*i)/i,r=Math.round(this.bottom*i)/i,o=Math.round(this.right*i)/i,a=Math.round(this.top*i)/i;return!0===t?r+","+n+","+a+","+o:n+","+r+","+o+","+a}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new WebGLPlot.Cartesian2(this.getWidth(),this.getHeight())}getCenterPixel(){return new WebGLPlot.Cartesian2((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new WebGLPlot.Cartesian2((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var i,n;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(i=t.lon,n=t.lat):(i=t.x,n=t.y);var r=(this.left-i)*e+i,o=(this.bottom-n)*e+n,a=(this.right-i)*e+i,s=(this.top-n)*e+n;return new _0x5a768f(r,o,a,s)}add(e,t){if(null==e||null==t)throw new WebGLPlot.DeveloperError("PlotBounds.add cannot receive null values");return new _0x5a768f(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new _0x5a768f(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new _0x5a768f(e.x,e.y,e.x,e.y);break;case"SuperMap.PlotBounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var i=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!i){var r=n.getWidth(),o=(n.left+n.right)/2,a=Math.round((e.lon-o)/r);i=this.containsLonLat({lon:e.lon-a*r,lat:e.lat},{inclusive:t.inclusive})}return i}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,i){if(null==i&&(i=!0),null==e||null==t)return!1;return i?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var i=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else i=this;null==t.inclusive&&(t.inclusive=!0);var n=!1,r=i.left===e.right||i.right===e.left||i.top===e.bottom||i.bottom===e.top;if(t.inclusive||!r){var o=e.bottom>=i.bottom&&e.bottom<=i.top||i.bottom>=e.bottom&&i.bottom<=e.top,a=e.top>=i.bottom&&e.top<=i.top||i.top>e.bottom&&i.top<e.top,s=e.left>=i.left&&e.left<=i.right||i.left>=e.left&&i.left<=e.right,l=e.right>=i.left&&e.right<=i.right||i.right>=e.left&&i.right<=e.right;n=(o||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),h=!u.containsBounds(i),d=!u.containsBounds(e);h&&!d?(e=e.add(-c,0),n=i.intersectsBounds(e,{inclusive:t.inclusive})):d&&!h&&(i=i.add(-c,0),n=e.intersectsBounds(i,{inclusive:t.inclusive}))}return n}containsBounds(e,t,i){null==t&&(t=!1),null==i&&(i=!0);var n=this.contains(e.left,e.bottom,i),r=this.contains(e.right,e.bottom,i),o=this.contains(e.left,e.top,i),a=this.contains(e.right,e.top,i);return t?n||r||o||a:n&&r&&o&&a}determineQuadrant(e){var t="",i=this.getCenterLonLat();return t+=e.lat<i.lat?"b":"t",t+=e.lon<i.lon?"l":"r"}wrapDateLine(e,t){var i=(t=t||{}).leftTolerance||0,n=t.rightTolerance||0,r=this.clone();if(e){for(var o=e.getWidth();r.left<e.left&&r.right-n<=e.left;)r=r.add(o,0);for(;r.left+i>=e.right&&r.right>e.right;)r=r.add(-o,0);var a=r.left+i;a<e.right&&a>e.left&&r.right-n>e.right&&(r=r.add(-o,0))}return r}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}static fromString(e,t){var i=e.split(",");return _0x5a768f.fromArray(i,t)}static fromArray(e,t){return!0===t?new _0x5a768f(e[1],e[0],e[3],e[2]):new _0x5a768f(e[0],e[1],e[2],e[3])}static fromSize(e){return new _0x5a768f(0,e.h,e.w,0)}static oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}var _0x4376c4=(_0x641691=!0,function(e,t){var i=_0x641691?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x641691=!1,i}),_0x12d552=_0x4376c4(void 0,(function(){return _0x12d552.toString().search("(((.+)+)+)+$").toString().constructor(_0x12d552).search("(((.+)+)+)+$")})),_0x641691;_0x12d552();class _0xac67be extends ServiceBase{constructor(e,t){super(e,t)}getFeaturesByBounds(e,t,i){var n=this;new _0x4f0a2a(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}_processParams(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.fromIndex=e.fromIndex?e.fromIndex:0,e.toIndex=e.toIndex?e.toIndex:-1,e.isUseBatch=null!=e.isUseBatch&&e.isUseBatch,e.bounds&&(e.bounds=_0x15e032(e.bounds)),e):{}}_processFormat(e){return e||"GEOJSON"}}function _0x15e032(e){if(Array.isArray(e)&&e[0]instanceof WebGLPlot.Cartesian2){let t=Math.min(e[0].x,e[1].x),i=Math.min(e[0].y,e[1].y),n=Math.max(e[0].x,e[1].x),r=Math.max(e[0].y,e[1].y);return new _0x5a768f(t,i,n,r)}return new _0x5a768f}var _0x3f9ca7=(_0x59b7cf=!0,function(e,t){var i=_0x59b7cf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59b7cf=!1,i}),_0x3f2ec4=_0x3f9ca7(void 0,(function(){return _0x3f2ec4.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f2ec4).search("(((.+)+)+)+$")})),_0x59b7cf;_0x3f2ec4();class _0x33b36a{constructor(e,t){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.viewer))throw new WebGLPlot.DeveloperError("RectQueryHandler viewer is required.");if(!WebGLPlot.defined(e.superMapDataUrl)||""===e.superMapDataUrl)throw new WebGLPlot.DeveloperError("RectQueryHandler superMapDataUrl is required.");this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.viewer.scene.canvas),this.active=!1,this.isDrawing=!1,this.bounds=null,this.boundsPts=[],this.fillColor=new WebGLPlot.Color(0,.35,.91,.4),this.outlineColor=new WebGLPlot.Color(0,1,0,1),this._superMapDataUrl=WebGLPlot.defaultValue(e.superMapDataUrl,""),this._queryFeatures=WebGLPlot.defaultValue(e.queryFeatures,[]),this._viewer=e.viewer,this.callback=t}setQueryFeatures(e){e&&e.length>0&&(this._queryFeatures=e)}activate(e){if(!0!==this.active){this._viewer.scene._canvas.style.cursor="crosshair",this.polygon&&(this._viewer.entities.remove(this.polygon),this.polygon=void 0),this.active=!0;var t=this;this.handler.setInputAction((function(i){_0x50d90f(i,t,e)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction((function(e){_0x512152(e,t)}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction((function(i){_0x300c01(i,t,e)}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}}deactivate(){this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this.polygon&&(this._viewer.entities.remove(this.polygon),this.polygon=void 0),this._viewer.scene._canvas.style.cursor=""}queryByDrawRect(){_0x136ca9(this)}queryByBounds(e,t){let i=Math.min(e.x,t.x),n=Math.min(e.y,t.y),r=Math.max(e.x,t.x),o=Math.max(e.y,t.y);this._positions=[],this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(i,o,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(r,o,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(r,n,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(i,n,0)),this.boundsPts=[],this.boundsPts.push(new WebGLPlot.Cartesian2(i,o)),this.boundsPts.push(new WebGLPlot.Cartesian2(r,n)),this.bounds={leftBottom:{x:i,y:n},rightTop:{x:r,y:o}},_0x136ca9(this)}}function _0x50d90f(e,t,i){var n=t;if(n&&n.active){var r=n._viewer.scene.pickPosition(e.position);r&&(n.isDrawing||n.polygon?n.polygon&&(n.isDrawing=!1,n.active=!1,n._clickPts[1]=r,n._positions=_0x21b619(n,n._clickPts),i&&i(n.boundsPts),n._viewer.scene._canvas.style.cursor=""):(n.isDrawing=!0,n._clickPts=[r.clone(),r.clone()],n._positions=[r.clone(),r.clone()],n.polygon=n._viewer.entities.add({name:"RectQuery__Rect",polygon:{hierarchy:new WebGLPlot.CallbackProperty((function(){return{positions:n._positions}}),!1),material:n.fillColor,outline:!0,outlineColor:n.outlineColor},depthTestEnabled:!0})))}}function _0x512152(e,t){var i=t;if(i&&i.active&&i.isDrawing){var n=i._viewer.scene.pickPosition(e.endPosition);n&&(i._clickPts[1]=n,i._positions=_0x21b619(i,i._clickPts))}}function _0x300c01(e,t,i){var n=t;if(n&&n.active&&n.isDrawing){n.isDrawing=!1,n.active=!1;var r=n._viewer.scene.pickPosition(e.position);r&&(n._clickPts[1]=r,n._positions=_0x21b619(n,n._clickPts)),i&&i(n.boundsPts),n._viewer.scene._canvas.style.cursor=""}}function _0x21b619(e,t){var i=[];if(e.boundsPts=[],2===t.length){var n=WebGLPlot.Cartographic.fromCartesian(t[0]),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=WebGLPlot.Cartographic.fromCartesian(t[1]),s=WebGLPlot.CesiumMath.toDegrees(a.longitude),l=WebGLPlot.CesiumMath.toDegrees(a.latitude);let u=Math.min(r,s),c=Math.min(o,l),h=Math.max(r,s),d=Math.max(o,l);i.push(new WebGLPlot.Cartesian3.fromDegrees(u,d,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(h,d,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(h,c,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(u,c,0)),e.bounds={leftBottom:{x:u,y:c},rightTop:{x:h,y:d}},e.boundsPts.push(new WebGLPlot.Cartesian2(r,o)),e.boundsPts.push(new WebGLPlot.Cartesian2(s,l))}return i}function _0x136ca9(e){let t=[];for(let r=0;r<e._queryFeatures.length;r++){const o=e._queryFeatures[r],a=o.axiosUrl+"queryByBoundsResults.json";let s=o.datasetNames;if(s.length>0){let r={arg0:s,arg1:e.bounds};var i=JSON.stringify(r);let o=_0x31f55e();o.open("POST",encodeURI(a),!1,"",""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),o.send(i);var n=JSON.parse(o.responseText,null).newResourceLocation;o.open("GET",encodeURI(n),!1,"",""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),o.send();let l=JSON.parse(o.responseText);t.push(l)}e.callback&&e.callback(t)}}function _0x31f55e(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}const _0x5a1c7f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1f29d0=_0x5a1c7f(void 0,(function(){return _0x1f29d0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f29d0).search("(((.+)+)+)+$")}));_0x1f29d0();class _0x184a5e{constructor(e,t){this.viewer=e,this.init(e),this.updateOptionsParams(t)}init(e){this.clipPlanePositions=null,this.ClipPlaneShow=!1,this.clipPlaneScale=.1,this.LocalToWorldMatrix=null,this.layerNmaes=null}updateOptionsParams(e){!e||(WebGLPlot.defined(e.ClipPlaneShow)&&(this.ClipPlaneShow=e.ClipPlaneShow),WebGLPlot.defined(e.clipPlaneScale)&&(this.clipPlaneScale=e.clipPlaneScale))}setPlanePositions(e){this.LocalToWorldMatrix=e;let t=10*this.clipPlaneScale,i=new WebGLPlot.Cartesian3(t,t,0),n=new WebGLPlot.Cartesian3(t,-t,0),r=new WebGLPlot.Cartesian3(-t,-t,0),o=new WebGLPlot.Cartesian3(-t,t,0),a=WebGLPlot.Matrix4.multiplyByPoint(e,o,new WebGLPlot.Cartesian3),s=WebGLPlot.Matrix4.multiplyByPoint(e,r,new WebGLPlot.Cartesian3),l=WebGLPlot.Matrix4.multiplyByPoint(e,n,new WebGLPlot.Cartesian3),u=WebGLPlot.Matrix4.multiplyByPoint(e,i,new WebGLPlot.Cartesian3);this.clipPlanePositions=[a,s,l,u],this.clipPlaneUpdate()}addsurface(){this.planeSurface=this.viewer.entities.add({id:"clip-plane",polygon:{hierarchy:new Cesium.CallbackProperty((()=>({positions:this.clipPlanePositions,holes:[]})),!1),show:new Cesium.CallbackProperty((()=>this.ClipPlaneShow),!1),material:WebGLPlot.Color.GOLD.withAlpha(.2),outline:!0,outlineColor:WebGLPlot.Color.GOLD,perPositionHeight:!0}})}setClipPlane(e,t){this.clear();let i=this.degreeToCartesian3(e),n=WebGLPlot.Transforms.eastNorthUpToFixedFrame(i);this.layerNmaes=t,this.setPlanePositions(n),this.addsurface()}clipPlaneUpdate(){if(!this.clipPlanePositions)return;const e=this.getAllS3MTilesLayer(this.viewer.scene);0!==e.size&&e.forEach((e=>{if(this.layerNmaes&&this.layerNmaes.includes(e.name))e.setCustomClipPlane(this.clipPlanePositions[0],this.clipPlanePositions[1],this.clipPlanePositions[2]);else if(this.layerNmaes&&this.layerNmaes.includes(e._name))for(let t of e._s3mLayers._array)t.setCustomClipPlane(this.clipPlanePositions[0],this.clipPlanePositions[1],this.clipPlanePositions[2])}))}clear(){const e=this.getAllS3MTilesLayer(this.viewer.scene);0!==e.size&&(e.forEach((e=>{if(null==e._layerConfigs)e.clearCustomClipBox();else for(let t of e._s3mLayers._array)t.clearCustomClipBox()})),this.planeSurface&&(this.viewer.entities.remove(this.planeSurface),this.planeSurface=null,this.clipPlanePositions=null,this.LocalToWorldMatrix=null))}degreeToCartesian3(e){let t=this.viewer.scene.globe.ellipsoid,i=WebGLPlot.Cartographic.fromDegrees(e.lng,e.lat,e.alt);return t.cartographicToCartesian(i)}destroy(){this.clear(),this.modelEditor&&this.modelEditor.destroy()}getAllS3MTilesLayer(){var e=new Map;if(window.SuperMap3D&&void 0===this.viewer.scene.layers){let t=this.viewer.scene.primitives._primitives;for(let i=0;i<t.length;i++){const n=t[i];n instanceof WebGLPlot.S3MTilesLayer&&e.set(n.name,n)}}else this.viewer.scene.layers instanceof WebGLPlot.Layers&&this.viewer.scene.layers._layers._array.map((t=>{t instanceof WebGLPlot.S3MTilesLayer&&e.set(t.name,t)}));return e}}const _0x29c030=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe7752=_0x29c030(void 0,(function(){return _0xe7752.toString().search("(((.+)+)+)+$").toString().constructor(_0xe7752).search("(((.+)+)+)+$")}));function _0x112c02(e,t){this.viewer=e,this.clipPlaneclipPlane=new _0x184a5e(e,{ClipPlaneShow:!1}),this.tsBuildDatas=t.tsBuildDatas,this.levelHeight=t.levelHeight,this.BIMHeight=t.BIMHeight,this.levelNum=t.levelNum}function _0x4cc342(e){var t=new Map;if(window.SuperMap3D&&void 0===e.scene.layers){let i=e.scene.primitives._primitives;for(let e=0;e<i.length;e++){const n=i[e];n instanceof WebGLPlot.S3MTilesLayer&&t.set(n.name,n)}}else e.scene.layers instanceof WebGLPlot.Layers&&e.scene.layers._layers._array.map((e=>{e instanceof WebGLPlot.S3MTilesLayer&&t.set(e.name,e)}));return t}_0xe7752(),_0x112c02.prototype.setLayerShow=function(e,t){for(let r=0;r<this.tsBuildDatas.length;r++){let o=this.tsBuildDatas[r].Name,a=this.tsBuildDatas[r].CilpLayers,s=this.tsBuildDatas[r].HideLayers,l=this.tsBuildDatas[r].ShowLayers,u=this.tsBuildDatas[r].ShowImageLayers,c=this.tsBuildDatas[r].Center,h=this.tsBuildDatas[r].Height,d=this.tsBuildDatas[r].BaseHeight;if(e===o){if(0!==a.length&&void 0!==h&&void 0!==d&&this.clipPlaneclipPlane.setClipPlane({lng:c.x,lat:c.y,alt:this.BIMHeight-this.levelHeight*(this.levelNum-t)},a),0===a.length&&this.clipPlaneclipPlane.clear(),0!==s.length&&this.hideLayers(s),0!==l.length&&(this.showLayers(l),"showUnderLinePipe"===o)){var i=WebGLPlot.CesiumMath.toDegrees(1.9875852260482232),n=WebGLPlot.CesiumMath.toDegrees(.3928307475708383);this.viewer.scene.camera.setView({destination:new WebGLPlot.Cartesian3.fromDegrees(i,n,360),orientation:{heading:1.1366928213021517,pitch:-1.063671189141393,roll:6.283184795466507}})}!0===u?this.showImageryLayers():this.hideImageryLayers()}}},_0x112c02.prototype.showLayers=function(e){const t=_0x4cc342(this.viewer);0!==t.size&&t.forEach((t=>{if(e.includes(t.name)||e.includes(t._name))if(null==t._layerConfigs)t.visible=!0;else for(let e of t._layerConfigs._array)e.isVisible=!0}))},_0x112c02.prototype.hideLayers=function(e){const t=_0x4cc342(this.viewer);0!==t.size&&t.forEach((t=>{if(e.includes(t.name)||e.includes(t._name))if(null==t._layerConfigs)t.visible=!1;else for(let e of t._layerConfigs._array)e.isVisible=!1}))},_0x112c02.prototype.hideImageryLayers=function(){let e=this.viewer.scene.imageryLayers._layers;for(let t=1;t<e.length;++t)e[t].show=!1},_0x112c02.prototype.showImageryLayers=function(){let e=this.viewer.scene.imageryLayers._layers;for(let t=1;t<e.length;++t)e[t].show=!0};var _0x514894=(_0x24abeb=!0,function(e,t){var i=_0x24abeb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24abeb=!1,i}),_0x2a605a=_0x514894(void 0,(function(){return _0x2a605a.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a605a).search("(((.+)+)+)+$")})),_0x24abeb;function _0x291996(){this.dataStorege=new Array,this.add=_0x3465c6,this.show=_0x52d470,this.find=_0x34beb6,this.remove=_0x2630ac,this.count=_0x35f75f,this.kSort=_0x18d704,this.vSort=_0x12c31c,this.clear=_0x99274d}function _0x3465c6(e,t){this.dataStorege[e]=t}function _0x52d470(){for(var e in this.dataStorege)console.log(e+":"+this.dataStorege[e])}function _0x34beb6(e){return this.dataStorege[e]}function _0x2630ac(e){delete this.dataStorege[e]}function _0x35f75f(){var e=0;for(var t in Object.keys(this.dataStorege))++e;return e}function _0x18d704(){var e=this.dataStorege,t=Object.keys(e).sort();for(var i in t)console.log(t[i]+":"+e[t[i]])}function _0x12c31c(){var e=this.dataStorege,t=Object.keys(e).sort((function(t,i){return e[t]-e[i]}));for(var i in t)console.log(t[i]+":"+e[t[i]])}function _0x99274d(){for(var e in this.dataStorege)delete this.dataStorege[e]}_0x2a605a();const _0x1b383b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xb552df=_0x1b383b(void 0,(function(){return _0xb552df.toString().search("(((.+)+)+)+$").toString().constructor(_0xb552df).search("(((.+)+)+)+$")}));_0xb552df();class _0x1e464a{constructor(){}static getAllS3MTilesLayer(e){var t=new Map;if(window.SuperMap3D&&void 0===e.layers){let i=e.primitives._primitives;for(let e=0;e<i.length;e++){const n=i[e];n instanceof WebGLPlot.S3MTilesLayer&&t.set(n.name,n)}}else e.layers instanceof WebGLPlot.Layers&&e.layers._layers._array.map((e=>{e instanceof WebGLPlot.S3MTilesLayer&&t.set(e.name,e)}));return t}static createS3MTilesLayersTreeData(e,t){let i=[],n=[];const r=this.getAllS3MTilesLayer(e.scene);if(WebGLPlot.defined(t)){let e=function(t){return t?t.filter((t=>{if(t.children=e(t.children),t.node){if(!r.get(t.label))return!1;n.push(t.label),t.data=r.get(t.label)}return!0})):[]};i=e(window.tsLayerPanelConfig),r.forEach((e=>{n.includes(e.name)||i.push({label:e.name,data:e,show:e.visible})}))}else r.size>0&&r.forEach((e=>{var t={label:e.name,data:e,children:[],show:e.visible};i.push(t)}));return i}static createImageryLayerTreeData(e){let t=[];return e&&e.imageryLayers.length>0&&e.imageryLayers._layers&&(t=e.imageryLayers._layers.map((e=>{const t=e._imageryProvider;let i="";if(t._image){const e=t.url.split("/");i=e[e.length-1].split(".")[0],i=decodeURI(i)}else if(t._resource){const e=t._resource.url.split("/");i=e[e.length-1].split("/")[0],i.includes(".")&&(i=i.split(".")[0]),""===i&&(i=e[e.length-2].split("/")[0]),i=decodeURI(i)}return{label:i,data:e,show:e.show}}))),t}static createTerrainProviderTreeData(e){let t=[];return e&&e.terrainProvider&&e.terrainProvider.tablename&&(t=e.terrainProvider._layers.map((t=>{let i=e.terrainProvider;return{label:e.terrainProvider.tablename,data:i,show:i.visible}}))),t}}const _0x5cae56=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x19e641=_0x5cae56(void 0,(function(){return _0x19e641.toString().search("(((.+)+)+)+$").toString().constructor(_0x19e641).search("(((.+)+)+)+$")}));_0x19e641(),WebGLPlot.wtsConfigManager=void 0;class _0x18273d{constructor(e){try{if(!e||""===e||!e.includes("http://"))throw console.log("WTSConfig dataServerUrl is error!!!"),this._urlIsError=!0,"PlotCustomRadar scene is required.";if(this.dataServerUrl=e,this.queryServerUrl=this.dataServerUrl.split("datasources")[0]+"featureResults.rjson?returnContent=true",this._commit=_0x3f3fdd(),this._commit.open("GET",encodeURI(e),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(),404===this._commit.status)throw this._urlIsError=!0,"PlotCustomRadar scene is required."}catch(e){console.log(e)}}static getInstance(e){return e&&(!WebGLPlot.wtsConfigManager||WebGLPlot.wtsConfigManager.plotServerUrl!==e)&&(WebGLPlot.wtsConfigManager=new _0x18273d(e)),WebGLPlot.wtsConfigManager}updateDoorsCfg(e){if(e.length<=0||this._urlIsError)return!1;_0x357ff6(this._commit,e,this.dataServerUrl,"doorsConfig")}getDoorsCfg(){if(this._urlIsError)return[];return _0x36d4f7(this._commit,this.dataServerUrl,"doorsConfig")}updateQuickPositionCfg(e){if(e.length<0||this._urlIsError)return!1;const t="quickPositionConfig",i=this.dataServerUrl+"/"+t+"/features.rjson";let n=[];n.push("groupName"),n.push("groupUuID"),n.push("keyCode"),n.push("stopUuID");let r=Object.keys(e[0].stops[0].stop);for(let e=0;e<r.length;e++)"key"!==r[e]&&n.push(r[e]);_0x1efb0b(this._commit,this.dataServerUrl,t)?_0x5c71d1(this._commit,i):_0x5492ab(this._commit,t,this.dataServerUrl,n);let o=[];o.push(_0xefaa70(n));for(let t=0;t<e.length;t++){const i=e[t];for(let e=0;e<i.stops.length;e++){const t=i.stops[e].stop;t.stopUuID=i.stops[e].uuid,t.keyCode=t.key,t.groupName=i.groupName,t.groupUuID=i.uuid;let r=[];for(let e=0;e<n.length;e++)r.push(t[n[e]]);let a=_0x1aa1c1(n,r);o.push(a)}}_0x111aeb(this._commit,i,o)}getQuickPositionCfg(){if(this._urlIsError)return[];let e=_0x36d4f7(this._commit,this.dataServerUrl,"quickPositionConfig"),t=new Map;for(let i=0;i<e.length;i++){const n=e[i];let r={};r.key=n.keyCode,r.lat=n.lat,r.lng=n.lng,r.alt=n.alt,r.heading=n.heading,r.roll=n.roll,r.pitch=n.pitch,r.second=n.second,r.uuid=n.stopUuID,r.name=n.name,r.groupName=n.groupName,r.groupUuID=n.groupUuID,t.get(n.groupName)||t.set(n.groupName,[]),t.get(n.groupName).push(r)}let i=[];return t.forEach((function(e,t,n){let r={};r.groupName=t,e.length>0&&(r.uuid=e[0].groupUuID),r.stops=e,i.push(r)})),i}updateBuildClipCfg(e){if(e.length<0||this._urlIsError)return!1;_0x357ff6(this._commit,e,this.dataServerUrl,"buildClipsConfig")}getBuildClipCfg(){if(this._urlIsError)return[];return _0x36d4f7(this._commit,this.dataServerUrl,"buildClipsConfig")}updataLayer3DGroupCfg(e){if(e.length<0||this._urlIsError)return!1;_0x357ff6(this._commit,e,this.dataServerUrl,"Layer3DGroupCfg")}getLayer3DGroupCfg(){if(this._urlIsError)return[];return _0x36d4f7(this._commit,this.dataServerUrl,"Layer3DGroupCfg")}updateCommonSymbolsCfg(e){if(e.length<0||this._urlIsError)return!1;_0x357ff6(this._commit,e,this.dataServerUrl,"commonSymbolsConfig")}getCommonSymbols(){if(this._urlIsError)return[];return _0x36d4f7(this._commit,this.dataServerUrl,"commonSymbolsConfig")}updateOhterSimpleCfg(e,t){if(e.length<0||this._urlIsError)return!1;_0x357ff6(this._commit,e,this.dataServerUrl,t)}getOhterSimpleCfg(e){return this._urlIsError?[]:_0x36d4f7(this._commit,this.dataServerUrl,e)}deleteDataset(e){_0x17b0f8(this._commit,e,this.dataServerUrl)}}function _0x111aeb(e,t,i){_0x5a92b3(e,t,i)}function _0x5c71d1(e,t){t+="?_method=DELETE&deleteMode=SQL";e.open("POST",encodeURI(t),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify({attributeFilter:"SmID>0"}))}function _0x5a92b3(e,t,i){e.open("POST",encodeURI(t),!0,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(i))}function _0xefaa70(e){let t={fieldNames:["SmID","SmUserID"],fieldValues:["0","0"],geometry:null};for(let i in e){const n=e[i];t.fieldNames.push(n),t.fieldValues.push(n)}return t}function _0x1aa1c1(e,t){let i={fieldNames:["SmID","SmUserID"],fieldValues:["0","0"],geometry:null};for(let n in e){const r=e[n],o=t[n];i.fieldNames.push(r),i.fieldValues.push(o)}return i}function _0x351224(e){let t=[];for(let i=1;i<e.length;i++){const n=e[i];let r={};for(let t=2;t<n.fieldValues.length;t++){const i=e[0].fieldValues[t];r[i]=n.fieldValues[t],n.fieldValues[t].includes(",")&&(r[i]=JSON.parse(n.fieldValues[t]))}t.push(r)}return t}function _0x1efb0b(e,t,i){e.open("GET",encodeURI(t+".json"),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(null);let n=JSON.parse(e.responseText,null);return!!(n&&n.datasetNames&&n.datasetNames.includes(i))}function _0x357ff6(e,t,i,n){const r=i+"/"+n+"/features.rjson";if(t.length<=0)return void _0x5c71d1(e,r);let o=[],a=Object.keys(t[0]);for(let e=0;e<a.length;e++)o.push(a[e]);_0x1efb0b(e,i,n)?_0x5c71d1(e,r):_0x5492ab(e,n,i,o);let s=[];s.push(_0xefaa70(o));for(let e=0;e<t.length;e++){const i=t[e];let n=[];for(let e=0;e<o.length;e++)n.push(i[o[e]]);let r=_0x1aa1c1(o,n);s.push(r)}_0x111aeb(e,r,s)}function _0x36d4f7(e,t,i){return _0x351224(_0x29a3b1(e,t,i))}function _0x29a3b1(e,t,i){const n=t+"/"+i+"/features.json";let r;e.open("GET",encodeURI(n),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");try{if(e.send(),r=JSON.parse(e.responseText,null),r.error)return console.log("WTSConfig request error!!!",r.error),[];if(r.featureCount<=0)return[]}catch(e){return console.log("WTSConfig request error!!!",e),[]}const o=n+"?fromIndex=0&toIndex="+(r.featureCount-1).toString();e.open("GET",encodeURI(o),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(),r=JSON.parse(e.responseText,null);let a=[];for(let t=0;t<r.childUriList.length;t++){const i=r.childUriList[t]+".json";e.open("GET",encodeURI(i),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send();let n=JSON.parse(e.responseText,null);a.push(n)}return a}function _0x5492ab(e,t,i,n){let r=i+".json",o={datasetType:"TABULAR",datasetName:t};if(e.open("POST",encodeURI(r),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(o)),JSON.parse(e.responseText,null).succeed){let r=i+"/"+t+"/fields.rjson";for(let t=0;t<n.length;t++){const i=n[t];let o={isZeroLengthAllowed:"true",maxLength:"50000",isRequired:"false",name:i,caption:i,type:"WTEXT",defaultValue:"null",isSystemField:"false"};e.open("POST",encodeURI(r),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(o)),JSON.parse(e.responseText,null)}}}function _0x17b0f8(e,t,i){let n=i+"/"+t+".rjson";e.open("DELETE",encodeURI(n),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(null)}function _0x3f3fdd(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}var _0x42030b=(_0x393400=!0,function(e,t){var i=_0x393400?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x393400=!1,i}),_0x2cde66=_0x42030b(void 0,(function(){return _0x2cde66.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cde66).search("(((.+)+)+)+$")})),_0x393400;function _0x5c4244(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.SampleDataModelsCfg=WebGLPlot.defaultValue(e.SampleDataModelsCfg,[]),this.elementsCfg=WebGLPlot.defaultValue(e.elementsCfg,[]),this.tsBuildDatas=WebGLPlot.defaultValue(e.tsBuildDatas,[]),this.geoLayerConfig=WebGLPlot.defaultValue(e.geoLayerConfig,[]),this.MGISQueryConfig=WebGLPlot.defaultValue(e.MGISQueryConfig,[]),this.tsPositions=WebGLPlot.defaultValue(e.tsPositions,[])}_0x2cde66(),_0x5c4244.prototype.fromJSON=function(e){this.SampleDataModelsCfg=e.SampleDataModelsCfg,this.elementsCfg=e.elementsCfg,this.tsBuildDatas=e.tsBuildDatas,this.geoLayerConfig=e.geoLayerConfig,this.MGISQueryConfig=e.MGISQueryConfig,this.tsPositions=e.tsPositions},_0x5c4244.prototype.toJSON=function(){return'{"SampleDataModelsCfg":'+WebGLPlot.toJSON(this.SampleDataModelsCfg)+',"elementsCfg":'+WebGLPlot.toJSON(this.elementsCfg)+',"tsBuildDatas":'+WebGLPlot.toJSON(this.tsBuildDatas)+',"geoLayerConfig":'+WebGLPlot.toJSON(this.geoLayerConfig)+',"MGISQueryConfig":'+WebGLPlot.toJSON(this.MGISQueryConfig)+',"tsPositions":'+WebGLPlot.toJSON(this.tsPositions)+"}"},_0x5c4244.prototype.destory=function(){this.SampleDataModelsCfg=null,this.elementsCfg=null,this.tsBuildDatas=null,this.geoLayerConfig=null,this.MGISQueryConfig=null,this.tsPositions=null};var _0x401449=(_0x175552=!0,function(e,t){var i=_0x175552?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x175552=!1,i}),_0x58a95b=_0x401449(void 0,(function(){return _0x58a95b.toString().search("(((.+)+)+)+$").toString().constructor(_0x58a95b).search("(((.+)+)+)+$")})),_0x175552;_0x58a95b();class _0x15a278{constructor(){}static doContourAnalyst(e,t,i,n,r){void 0===t&&(t=theCrimePoint),_0x15a278.entity&&_0x15a278.clear(e);let o=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,i);_0x15a278.entityEllipse=e.entities.add({position:o,ellipse:{height:i,semiMinorAxis:n,semiMajorAxis:n,material:new WebGLPlot.Color(1,1,0,.35),outline:!0}}),_0x15a278.entityCirclePt=e.entities.add({position:o,point:{pixelSize:5,color:WebGLPlot.Color.WHITE,outlineColor:WebGLPlot.Color.fromCssColorString("#fff"),outlineWidth:2,show:!0}}),_0x15a278.entityPolyline=e.entities.add({polyline:{show:!0,positions:WebGLPlot.Cartesian3.fromDegreesArrayHeights([t.x,t.y,i,r.x,r.y,i,r.x,r.y,0]),width:3,material:WebGLPlot.Color.fromCssColorString("#51ff00"),loop:!0,clampToGround:!1}});var a=(r.x+t.x)/2,s=(r.y+t.y)/2;_0x15a278.labels=e.scene.primitives.add(new WebGLPlot.LabelCollection({depthTestEnable:!1})),_0x15a278.labels.add({position:WebGLPlot.Cartesian3.fromDegrees(a,s,i+10),font:"500 16px sans-serif",style:WebGLPlot.LabelStyle.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:WebGLPlot.Color.BLACK,showBackground:!0,backgroundColor:WebGLPlot.Color.fromCssColorString("rgba(38, 38, 38, 0.85)"),pixelOffset:new WebGLPlot.Cartesian2(15,0),pixelOffsetScaleByDistance:new WebGLPlot.NearFarScalar(150,3,15e6,.5),text:"height:"+i+"m\nradius:"+n+"m",show:!0,horizontalOrigin:WebGLPlot.HorizontalOrigin.LEFT})}static clear(e){_0x15a278.entity&&(e.entities.remove(_0x15a278.entity),e.entities.remove(_0x15a278.entityCirclePt),e.entities.remove(_0x15a278.entityPolyline),e.entities.remove(_0x15a278.labels),_0x15a278.entity=void 0),_0x15a278.textGeo&&superMapTrackingLayer.removeGeoGraphicObject(_0x15a278.textGeo)}}_0x15a278.entity=1,_0x15a278.textGeo=void 0;var _0x1d0a16=(_0x4146e6=!0,function(e,t){var i=_0x4146e6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4146e6=!1,i}),_0x534cd8=_0x1d0a16(void 0,(function(){return _0x534cd8.toString().search("(((.+)+)+)+$").toString().constructor(_0x534cd8).search("(((.+)+)+)+$")})),_0x4146e6;_0x534cd8();var WebGLPlot$1=window.WebGLPlot=window.WebGLPlot||{};function _0x15b84c(e){this.viewer=e.viewer,this.theCrimePoint=WebGLPlot$1.defaultValue(e.theCrimePoint,new _0x23de81(113.88122956581786,22.50809724778502,0)),this.groundEfficiency=void 0}function _0x3ba76e(e,t,i){WebGLPlot$1.defined(i)||(i=15);const n=e/6378137;for(var r=[_0xb327cc(t[1]),_0xb327cc(t[0])],o=[],a=0;a<i;a++){const e=a*(360/i)*Math.PI/180,t=r[0]+n*Math.cos(e),s=r[1]+n*Math.sin(e);o.push([_0x46998b(s),_0x46998b(t)])}return o.push(o[0]),[o]}function _0xb327cc(e){return e*Math.PI/180}function _0x46998b(e){return 180*e/Math.PI}_0x15b84c.prototype.contourAnalysisConfirm=function(e){this.groundEfficiency&&(this.groundEfficiency.destroy(),this.groundEfficiency=void 0);let t=e.height,i=e.radius,n=WebGLPlot$1.defined(e.minTerrainHeight)?e.minTerrainHeight:0;if(0===i)throw new WebGLPlot$1.DeveloperError("height or radius can not be empty!");for(var r=_0x3ba76e(i,[this.theCrimePoint.x,this.theCrimePoint.y],50),o=[],a=0;a<r[0].length;a++)o.push(r[0][a][0]),o.push(r[0][a][1]);_0x15a278.doContourAnalyst(this.viewer,this.theCrimePoint,t,i,o),this.groundEfficiency=new _0x48550f({scene:scene,id:"sniperGroundEffect",color:WebGLPlot$1.Color.RED.withAlpha(.5),positions:o,minTerrainHeight:n})},_0x15b84c.prototype.contourAnalysisClose=function(){_0x15a278.clear(this.viewer),this.groundEfficiency&&this.groundEfficiency.destroy()},WebGLPlot$1.BuildContourAnalyst=_0x15b84c;const _0x50f7c7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x564378=_0x50f7c7(void 0,(function(){return _0x564378.toString().search("(((.+)+)+)+$").toString().constructor(_0x564378).search("(((.+)+)+)+$")}));function _0x2dc179(e){this.viewer=e,this.doorEntitise=[],this.doorExcID=-1,this._doorClickEvent=new WebGLPlot.Event}function _0x485cc2(e,t){let i=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),n=WebGLPlot.Transforms.headingPitchRollQuaternion(i,new WebGLPlot.HeadingPitchRoll(WebGLPlot.CesiumMath.toRadians(e.radians),WebGLPlot.CesiumMath.toRadians(90),0)),r=t.entities.add({position:i,box:{dimensions:new WebGLPlot.Cartesian3(e.width,e.height,.5),material:new WebGLPlot.Color(1,0,0,.5)},orientation:n,show:!1});return r.show=!0,r}function _0x485006(e,t){isNaN(e.lon)||isNaN(e.lat)||isNaN(e.height)?console.warn("flyToMap:option is not correct"):e.heading?t.camera.flyTo({destination:WebGLPlot.Cartesian3.fromDegrees(e.lon,e.lat,e.height),orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},aim:!0}):t.camera.flyTo({destination:WebGLPlot.Cartesian3.fromDegrees(e.lon,e.lat,e.height),aim:!0})}_0x564378(),_0x2dc179.prototype.createDoors=function(e){if(-1===this.doorExcID){for(let t=0;t<e.length;t++){let i=e[t];this.doorEntitise.push(_0x485cc2(i,this.viewer))}this._doorClickEvent.raiseEvent(e)}},_0x2dc179.prototype.removeDoors=function(){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1),this.doorEntitise&&this.doorEntitise.length>0&&(this.doorEntitise.map((e=>{this.viewer.entities.remove(e)})),this.doorEntitise=[])},_0x2dc179.prototype.blinkDoor=function(e){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1);var t=this.doorEntitise[e];this.doorExcID=window.setInterval(function(){t.show=!t.show}.bind(this),500)},_0x2dc179.prototype.blinkDoors=function(e){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1);for(var t=[],i=0;i<e.length;i++)t.push(this.doorEntitise[e[i]]);this.doorExcID=window.setInterval(function(){t.map((e=>{e.show=!e.show}))}.bind(this),500)},_0x2dc179.prototype.blinkAllDoors=function(){if(-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1),!this.doorEntitise||this.doorEntitise.length<=0)return;let e=this;this.doorExcID=window.setInterval(function(){e.doorEntitise.map((e=>{e.show=!e.show}))}.bind(this),500)},_0x2dc179.prototype.flytoLocation=function(e){_0x485006(e,this.viewer)},Object.defineProperties(_0x2dc179.prototype,{doorClickEvent:{get:function(){return this._doorClickEvent}}});const _0x2fd29c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5c9364=_0x2fd29c(void 0,(function(){return _0x5c9364.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c9364).search("(((.+)+)+)+$")}));_0x5c9364();class _0x1eef11{constructor(){}createXMLflyLine(e){let t=new DOMParser;window.parser=t;let i=t.parseFromString("<cusxmlRoute></cusxmlRoute>","text/xml");window.xmlDoc=i;let n=this.createSceneRouteNode(i),r=this.createRouteNode(i,e),o=this.createRouteStyleNode(i);r.appendChild(o);let a=this,s=e.routeStops;if(!(s.length<2)){for(let e=0;e<s.length;e++){let t=s[e],n={longitude:t.point[0],latitude:t.point[1],altitude:t.point[2],heading:t.heading*(180/Math.PI),tilt:t.tilt*(180/Math.PI)+90},o=a.createStopNode(i,n,t,e);r.appendChild(o)}return n.appendChild(r),i.children[0].appendChild(n),i.children[0].innerHTML}}createXMLflyLines(e){let t=new DOMParser;window.parser=t;let i=t.parseFromString("<cusxmlRoute></cusxmlRoute>","text/xml");window.xmlDoc=i;let n=this.createSceneRouteNode(i);for(let t=0;t<e.length;t++){var r=e[t];let o=this.createRouteNode(i,r),a=this.createRouteStyleNode(i);o.appendChild(a);let s=this,l=r.routeStops;if(l.length<2)return void console.warn("节点数小于2");for(let e=0;e<l.length;e++){let t=l[e],n={longitude:t.point[0],latitude:t.point[1],altitude:t.point[2],heading:t.heading*(180/Math.PI),tilt:t.tilt*(180/Math.PI)+90},r=s.createStopNode(i,n,t,e);o.appendChild(r)}n.appendChild(o)}return i.children[0].appendChild(n),i.children[0].innerHTML}createSceneRouteNode(e){let t=e.createElement("SceneRoute");return t.setAttribute("xmlns","http://www.supermap.com"),t}createRouteNode(e,t){let i=e.createElement("route"),n={name:t.routeName||"飞行路线",speed:t.speed||"200",lineType:"0",showroutestop:"False",showrouteline:"False",altitudefree:"False",headingfree:"False",tiltfree:"False",flycircle:"False",alongline:t.isAlongLine||"False"};for(const e in n)i.setAttribute(e,n[e]);return i}createRouteStyleNode(e){let t=e.createElement("style"),i=e.createElement("geostyle3d"),n=e.createElement("linecolor");n.textContent="RGBA(147,112,219,255)";let r=e.createElement("linewidth");r.textContent=2;let o=e.createElement("altitudeMode");o.textContent="Absolute";let a=e.createElement("bottomAltitude");return a.textContent=0,i.appendChild(n),i.appendChild(r),i.appendChild(o),i.appendChild(a),t.appendChild(i),t}createStopNode(e,t,i,n){let r=e.createElement("routestop"),o={name:i.stopName||"Stop"+(n+1),speed:i.speed,excluded:"False",viewType:"camera"};for(const e in o)r.setAttribute(e,o[e]);let a=this.createStopCameraNode(e,t);r.appendChild(a);let s=this.createStopStyleNode(e,i);r.appendChild(s);let l=this.createStopSettingNode(e,i);return r.appendChild(l),r}createStopCameraNode(e,t){let i=e.createElement("camera");for(const n in t){let r=e.createElement(n);r.textContent=t[n],i.appendChild(r)}return i}createStopStyleNode(e,t){let i={icon:t.img,markersize:4.8,markericonscale:1,markercolor:"RGBA(255, 255, 255, 255)"},n=e.createElement("style"),r=e.createElement("geostyle3d");for(const t in i){let n=e.createElement(t);n.textContent=i[t],r.appendChild(n)}return n.appendChild(r),n}createStopSettingNode(e,t){let i=e.createElement("setting"),n={turnTime:t.surroundDuration||1.5,turnSlowly:"False",stopPlayMode:t.stopPlayMode||"StopPause",autoPlay:"False",pauseTime:t.waitTime||0,angularSpeed:1};for(const t in n){let r=e.createElement(t);r.textContent=n[t],i.appendChild(r)}return i}}const _0xa5a91d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3d2533=_0xa5a91d(void 0,(function(){return _0x3d2533.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d2533).search("(((.+)+)+)+$")}));_0x3d2533();class _0x5bc321{constructor(e){this.viewer=e,this.flyManager,this.routeCollection,this.reader=new FileReader,this.createXml,this.flyLineXmls=new _0x291996,this.routesDictionary=new _0x291996,this.routes=[],this.duration=5,this.showRoute=!1,this.showStop=!1,this.setStopSpeed=0,this.stopPlayMode="StopPause",this.waitTime=.001,this.surroundDuration=1,this.isAlongline=!1,this.routeSpeed=0,this.initFlyManager()}initFlyManager(){this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.flyManager=new Cesium.FlyManager({scene:this.viewer.scene,routes:this.routeCollection}),this.createXml=new _0x1eef11}addStop(e){this.route=this.routesDictionary.find(e);let t=this.route.routeStops,i=this.viewer.camera.position,n=this.CartesiantoDegrees(i);var r=0;if(t.length>0){let e=t[t.length-1],i=e.point,o=Cesium.Cartesian3.fromDegrees(i[0],i[1],i[2]),a=Cesium.Cartesian3.fromDegrees(n[0],n[1],n[2]);r=Cesium.Cartesian3.distance(o,a)/this.duration,e.speed=r}let o=t.length,a="视点"+(Number(o)+1),s={uuid:Math.random().toString(15).slice(2,15),stopName:a,point:n,heading:this.viewer.camera.heading,tilt:this.viewer.camera.pitch,speed:r,stopPlayMode:this.stopPlayMode,surroundDuration:this.surroundDuration,waitTime:this.waitTime,duration:this.duration};t.push(s),this.loadRoute(e)}changeStop(e,t){this.flyManager&&this.flyManager.stop();let i=e.routename;this.route=this.routesDictionary.find(i);let n=this.route.routeStops,r=this.viewer.camera.position,o=this.CartesiantoDegrees(r),a=null,s=null,l=null;for(let t=0;t<n.length;t++){let i=n[t];if(t>0&&(s=n[t-1]),n.length!==t+1&&(l=n[t+1]),i.uuid===e.stop.uuid){a=i;break}}let u=a.speed;if(t.position&&null!==l){let e=l.point,i=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]),n=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),r=Cesium.Cartesian3.distance(i,n);u=t.duration?r/t.duration:r/a.duration}else if(t.position&&null!==s&&null===l){let e=s.point,t=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]),i=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),n=Cesium.Cartesian3.distance(t,i);s.speed=n/s.duration}else if(!t.position&&t.duration&&null!==l){o=a.point;let e=l.point,i=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]),n=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),r=Cesium.Cartesian3.distance(i,n);t.duration&&(u=r/t.duration)}var c=null,h=null,d=null;t.position?(c=this.viewer.camera.heading,h=this.viewer.camera.pitch):(c=a.heading,h=a.tilt,o=a.point,d=t.duration?parseInt(t.duration):a.duration);let f={uuid:e.stop.uuid,stopName:t.name||e.stop.stopName,point:o,heading:c,tilt:h,speed:u,stopPlayMode:this.stopPlayMode,surroundDuration:this.surroundDuration,waitTime:this.waitTime,duration:d||this.duration};for(let t=0;t<n.length;t++)if(n[t].uuid===e.stop.uuid){n[t]=f;break}this.loadRoute(i)}locateStop(e,t){this.flyManager&&this.flyManager.stop(),this.route=this.routesDictionary.find(e);let i=this.route.routeStops;for(let e=0;e<i.length;e++){let n=i[e];if(n.stopName===t){this.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(n.point[0],n.point[1],n.point[2]),orientation:{heading:n.heading,pitch:n.tilt,roll:0},duration:1});break}}}deleteStop(e,t){this.flyManager&&this.flyManager.stop(),this.route=this.routesDictionary.find(e);let i=this.route.routeStops;for(let e=0;e<i.length;e++)if(i[e].stopName===t){i.splice(e,1);break}this.loadRoute(e)}createImage(){return this.viewer.render(),this.viewer.scene.canvas.toDataURL("image/png").replace("image/png","image/octet-stream")}addRoute(){let e={routeName:"飞行路线"+(this.routes.length+1),speed:this.routeSpeed,isAlongLine:"False",routeStops:[],showLine:!1};this.routesDictionary.add(e.routeName,e),this.routes.push(e)}changeRoute(e,t){this.flyManager&&this.flyManager.stop();let i=e.name;this.route=this.routesDictionary.find(i),this.route.routeName=t.name;let n=this.createXml.createXMLflyLine(this.route);this.routesDictionary.remove(i),this.routesDictionary.add(t.name,this.route),n&&(this.flyLineXmls.remove(i),this.flyLineXmls.add(t.name,n))}deleteRoute(e){if(this.flyManager&&this.flyManager.stop(),!(this.flyLineXmls.length<1)){this.flyLineXmls.remove(e);var t=this.routesDictionary.find(e);this.routes.splice(this.routes.indexOf(t),1),this.routesDictionary.remove(e)}}showCurRoute(e,t){let i=this.flyLineXmls.find(e),n=this.flyManager.currentRoute;if(this.route=this.routesDictionary.find(e),n.routeName===e)n.isLineVisible=t,n.isStopVisible=t,this.route.showLine=t;else{n&&n.clear(),this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.routeCollection.fromXML(i),this.flyManager.routes=this.routeCollection,this.route.showLine=!0;for(let t=0;t<this.flyManager.routes._routes.length;t++){let i=this.flyManager.routes._routes[t];i.routeName===e&&(i.isLineVisible=!0,i.isStopVisible=!0)}}}loadRoute(e){var t=this.routesDictionary.find(e);if(t.routeStops.length<2)return;let i=this.createXml.createXMLflyLine(t);if(!i||(this.flyLineXmls.add(e,i),!e))return;let n=this.flyManager.currentRoute;n&&n.clear(),this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.routeCollection.fromXML(i),this.flyManager.routes=this.routeCollection}readyPromise(){this.routesDictionary.clear(),this.flyLineXmls.clear(),this.routes=[],this.routeCollection.readyPromise.then((()=>{this.flyManager.routes=this.routeCollection;for(let e=0;e<this.routeCollection._routes.length;e++){let t=this.routeCollection._routes[e],i={routeName:t._routeName,speed:t._speed,isAlongLine:t._isAlongline,routeStops:[]};for(let e=0;e<t._stopCollection.length;e++){let n=t._stopCollection.get(e),r=n._point,o=this.CartesiantoDegrees(r),a=n._duration;(e===t._stopCollection.length-1||200===n._speed&&10===n._duration)&&(a=5);let s=n._waitTime;0===s&&(s=.001);let l={uuid:Math.random().toString(15).slice(2,15),stopName:n._stopName,point:o,heading:n._heading,tilt:n._tilt,speed:n._speed,stopPlayMode:n._stopPlayMode,surroundDuration:n._surroundDuration,waitTime:s,duration:a};i.routeStops.push(l)}this.routesDictionary.add(i.routeName,i),this.routes.push(i);let n=this.createXml.createXMLflyLine(i);if(!n)return;this.flyLineXmls.add(i.routeName,n)}}))}download(e){let t=this.flyLineXmls.find(e);if(!t)return;let i=new Blob([t]),n=document.createElement("a");n.download="view-flight-route.fpf",n.href=URL.createObjectURL(i),n.click()}downloadAll(){if(this.flyLineXmls.count()<1)return;let e=this.createXml.createXMLflyLines(this.routes);if(!e)return;let t=new Blob(["\ufeff",e],{type:"text/plain"}),i=document.createElement("a");i.download="view-flight-route.fpf",i.href=URL.createObjectURL(t),i.click()}uploading(e){this.flyManager.stop();let t=this.flyManager.currentRoute;t&&t.clear(),this.routeCollection=new Cesium.RouteCollection(viewer.entities),e&&(this.reader.onload=e=>{let t=e.target.result;this.routeCollection.fromXML(t),this.readyPromise()},this.reader.readAsText(e,"UTF-8"))}play(e){let t=this.flyLineXmls.find(e),i=this.flyManager.currentRoute;i&&i.clear(),this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.routeCollection.fromXML(t),this.flyManager.routes=this.routeCollection,this.flyManager.readyPromise.then((()=>{this.flyManager.play()}))}pause(){this.flyManager&&this.flyManager.pause()}stop(){this.flyManager&&this.flyManager.stop()}CartesiantoDegrees(e){let t=[].concat(e),i=[];for(let e=0,n=t.length;e<n;e++){let n=Cesium.Cartographic.fromCartesian(t[e]),r=Cesium.Math.toDegrees(n.longitude),o=Cesium.Math.toDegrees(n.latitude),a=n.height;-1==i.indexOf(r)&&-1==i.indexOf(o)&&(i.push(r),i.push(o),i.push(a))}return i}}var _0xd1b838=(_0x184a33=!0,function(e,t){var i=_0x184a33?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x184a33=!1,i}),_0x5dd27d=_0xd1b838(void 0,(function(){return _0x5dd27d.toString().search("(((.+)+)+)+$").toString().constructor(_0x5dd27d).search("(((.+)+)+)+$")})),_0x184a33;_0x5dd27d();class _0x547cc0{constructor(e){this.name=WebGLPlot.defaultValue(e.name,""),this.key=WebGLPlot.defaultValue(e.key,""),this.second=WebGLPlot.defaultValue(e.second,""),e.position&&e.position.heading&&(this.heading=e.position.heading,this.pitch=e.position.pitch,this.roll=e.position.roll,this.lng=e.position.point.lng,this.lat=e.position.point.lat,this.alt=e.position.point.alt)}}var _0x1108c0=(_0x563195=!0,function(e,t){var i=_0x563195?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x563195=!1,i}),_0x2f3a40=_0x1108c0(void 0,(function(){return _0x2f3a40.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f3a40).search("(((.+)+)+)+$")})),_0x563195;function _0x560429(e){this.viewer=e}_0x2f3a40(),_0x560429.prototype.addCamera=function(e,t){if(!this.viewer)return;let i=this.viewer.scene.camera,n=i.positionCartographic,r={point:{lng:Cesium.Math.toDegrees(n.longitude),lat:Cesium.Math.toDegrees(n.latitude),alt:n.height},heading:i.heading,pitch:i.pitch,roll:i.roll},o=t.root.uuid,a=this.groupDic.find(o),s=a.stops.count(),l=e+(Number(s)+1);o=Math.random().toString(15).slice(2,15),this.quickPosPara=new positionPara({name:l,position:r}),a.stops.add(o,this.quickPosPara)},_0x560429.prototype.addRoute=function(e){if(!this.viewer)return;let t=Math.random().toString(15).slice(2,15),i={groupName:e+(this.groupDic.count()+1),uuid:t,stops:new _0x291996};this.quickGroupPara=i,this.groupDic.add(t,i)},_0x560429.prototype.inputRoute=function(){for(var e in this.keyboards=[],this.groupJson=[],this.groupDic.dataStorege){var t=this.groupDic.find(e),i=[];for(var n in t.stops.dataStorege){var r=t.stops.find(n);i.push({uuid:n,stop:r}),this.keyboards.push(r)}this.groupJson.push({groupName:t.groupName,uuid:e,stops:i})}return this.groupJson},_0x560429.prototype.locateCamera=function(e){let t=e.heading,i=e.pitch,n=e.roll,r=e.lng,o=e.lat,a=e.alt;this.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(r,o,a),orientation:{heading:t,pitch:i,roll:n}})};var _0x299ec1=(_0x12c28e=!0,function(e,t){var i=_0x12c28e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12c28e=!1,i}),_0x3d8e63=_0x299ec1(void 0,(function(){return _0x3d8e63.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d8e63).search("(((.+)+)+)+$")})),_0x12c28e;_0x3d8e63();var _0x12f1c7={on:function(e,t,i){if("object"==typeof e)for(var n in e)this._on(n,e[n],t);else for(var r=0,o=(e=splitWords(e)).length;r<o;r++)this._on(e[r],t,i);return this},off:function(e,t,i){if(e)if("object"==typeof e)for(var n in e)this._off(n,e[n],t);else for(var r=0,o=(e=splitWords(e)).length;r<o;r++)this._off(e[r],t,i);else delete this._events;return this},_on:function(e,t,i){this._events=this._events||{};var n=this._events[e];n||(n=[],this._events[e]=n),i===this&&(i=void 0);for(var r={fn:t,ctx:i},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===t&&o[a].ctx===i)return;o.push(r)},_off:function(e,t,i){var n,r,o;if(this._events&&(n=this._events[e])){if(!t){for(r=0,o=n.length;r<o;r++)n[r].fn=falseFn;return void delete this._events[e]}if(i===this&&(i=void 0),n)for(r=0,o=n.length;r<o;r++){var a=n[r];if(a.ctx===i&&a.fn===t)return a.fn=falseFn,this._firingCount&&(this._events[e]=n=n.slice()),void n.splice(r,1)}}},fire:function(e,t,i){if(!this.listens(e,i))return this;var n=extend({},t,{type:e,target:this});if(this._events){var r=this._events[e];if(r){this._firingCount=this._firingCount+1||1;for(var o=0,a=r.length;o<a;o++){var s=r[o];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(e,t){var i=this._events&&this._events[e];if(i&&i.length)return!0;if(t)for(var n in this._eventParents)if(this._eventParents[n].listens(e,t))return!0;return!1},once:function(e,t,i){if("object"==typeof e){for(var n in e)this.once(n,e[n],t);return this}var r=bind((function(){this.off(e,t,i).off(e,r,i)}),this);return this.on(e,t,i).on(e,r,i)},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[stamp(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[stamp(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,extend({layer:e.target},e),!0)}};function d(e,t,i){try{return e(t,i)}catch(e){return o$1l.reject(e)}}function l(e){var t;return function(i){var n=i.data,r=[],o={id:n.id,result:void 0,error:void 0};return o$1l(d(e,n.parameters,r)).then((function(e){o.result=e})).otherwise((function(e){e instanceof Error?o.error={name:e.name,message:e.message,stack:e.stack}:o.error=e})).always((function(){e$2e(t)||(t=u$Z(self.webkitPostMessage,self.postMessage)),n.canTransferArrayBuffer||(r.length=0);try{t(o,r)}catch(e){o.result=void 0,o.error="postMessage failed with error: "+f$T(e)+"\n with responseMessage: "+JSON.stringify(o),t(o)}}))}}var VERSION="11i(2023)",SuperMapVersion="svnversion";export{_0x1d0ffc as AbstractMesh,_0x14876e as AlgoInclude,_0x330d7a as AlgoSymbol,_0x36a597 as AlphaMode,_0x5b82ce as AnalysisTool,_0x48b138 as Animation,y$4 as Animation2,_0x3884c0 as AnimationBlink,_0xe89a1c as AnimationBrokenLine,_0x5b3a44 as AnimationCurve,_0x192aa1 as AnimationFollowType,_0x17c29c as AnimationGrow,_0xb1e5d0 as AnimationHide,_0x2980fc as AnimationMoveIn,_0x42ff63 as AnimationMoveOut,_0x5a1aa1 as AnimationPlayType,_0x1ecde6 as AnimationReduce,_0x116c0b as AnimationShow,m$5 as AnimationViewModel,_0x36afe8 as AnimationWay,_0x5eeaa0 as AnimationZoomIn,_0x2c95d7 as AnimationZoomOut,a$S as Appearance,e$1H as ApproximateTerrainHeights,_$E as ArcGISTiledElevationTerrainProvider,m$M as ArcGisGeographicTilingScheme,b$q as ArcGisMapServerImageryProvider,m$1h as ArcType,_0x2d907f as ArrowCommunicationLink,e$1Q as AssociativeArray,t$$ as AttributeCompression,Q$z as AttributeType,a$h as AutoExposure,zr$1 as Autolinker,l$18 as AutomaticUniforms,v$y as Axis,e$29 as AxisAlignedBoundingBox,_0x2befe4 as BIMInfoClickQueryHandler,g$3 as BaseLayerPicker,V as BaseLayerPickerViewModel,_0x439851 as BaseParticleSystem,_0x4ec5ba as BasicLineCommunicationLink,h$X as BatchTable,n$p as Batched3DModel3DTileContent,n$J as Billboard,_0x258e9c as BillboardAxialVp,w$O as BillboardCollection,n$V as BillboardGraphics,yr$2 as BillboardMode,_0xe606d6 as BillboardPixelSizeWithAngleVp,g$J as BillboardVisualizer,e$12 as BingMapsApi,o$M as BingMapsGeocoderService,o$q as BingMapsImageryProvider,I$l as BingMapsStyle,b$17 as BlendEquation,l$13 as BlendFunction,S$L as BlendOption,Ee$r as BlendingState,_0x2b55c5 as BlinkAnimationBlinkStyle,_0x1ab3a1 as BlinkAnimationReplaceStyle,r$R as BlockCacheList,e$1e as BlockCacheNode,_0x353f01 as BloodPosition,_0x211e34 as BloodVolume,e$g as BloomEffect,t$9 as BoundingBoxRenderer,f$1a as BoundingRectangle,i$1d as BoundingSphere,R$w as BoundingSphereState,_0x551fc0 as Bounds,d$s as BoundsOctree,S$m as BoxEditor,a$j as BoxEmitter,O$z as BoxGeometry,i$F as BoxGeometryUpdater,n$U as BoxGraphics,o$17 as BoxOutlineGeometry,_0x4c62f8 as BoxParticleEmitter,t$c as BrdfLutGenerator,t$X as Buffer,h$11 as BufferGL,r$13 as BufferGPU,f$$ as BufferIDRecorder,_0x23bf52 as BufferManager,A$18 as BufferUsage,_0x15b84c as BuildContourAnalyst,_0x2dc179 as BuildingDoors,BurstPipelineAnalystService,D$g as CGCS2000MapServerImageryProvider,n$X as CallbackProperty,v$K as Camera,l$l as CameraEventAggregator,Q$d as CameraEventType,mr$5 as CameraFlightPath,_0x2a2c3d as CameraMoveHandler,o$1o as Cartesian2,o$1p as Cartesian3,e$2c as Cartesian4,a$18 as Cartographic,N$D as CartographicGeocoderService,_0x413409 as CaseTable,_0x70e866 as CategoryVisibleMode,z$o as Catenaryline,c$L as CatmullRomSpline,c$s as Cesium3DTile,h$D as Cesium3DTileBatchTable,L$I as Cesium3DTileColorBlendMode,r$n as Cesium3DTileContent,i$y as Cesium3DTileContentFactory,X$q as Cesium3DTileContentState,e$M as Cesium3DTileFeature,o$C as Cesium3DTileFeatureTable,s$q as Cesium3DTileOptimizationHint,I$F as Cesium3DTileOptimizations,ue$e as Cesium3DTilePass,a$g as Cesium3DTilePassState,i$A as Cesium3DTilePointFeature,f$E as Cesium3DTileRefine,d$n as Cesium3DTileStyle,e$1u as Cesium3DTileStyleEngine,y$1 as Cesium3DTilesInspector,l$6 as Cesium3DTilesInspectorViewModel,p$u as Cesium3DTileset,h$j as Cesium3DTilesetAsyncTraversal,e$C as Cesium3DTilesetCache,i$S as Cesium3DTilesetGraphics,a$s as Cesium3DTilesetHeatmap,f$D as Cesium3DTilesetMostDetailedTraversal,r$x as Cesium3DTilesetStatistics,W$x as Cesium3DTilesetTraversal,l$E as Cesium3DTilesetVisualizer,g$1 as CesiumInspector,m$3 as CesiumInspectorViewModel,o$1q as Check,r$w as CheckerboardMaterialProperty,u$l as CircleEmitter,n$A as CircleGeometry,a$H as CircleOutlineGeometry,t$g as ClampFramebuffer,l$p as ClampMode,_0x1523c4 as Class,A$F as ClassificationModel,x$$ as ClassificationPrimitive,_0x2b86ba as ClassificationType,t$W as ClearCommand,_0x112c02 as ClipBuild,_0x162bd8 as ClipPlaneDepthFp,_0x2e70eb as ClipPlaneFp,_0x1f23e7 as ClipPlaneMode,R$M as ClipPlaneVp,a$I as ClippingPlane,h$L as ClippingPlaneCollection,R$L as ClippingType,u$H as Clock,tt$a as ClockRange,g$R as ClockStep,r$a as ClockViewModel,a$i as ClosedDepthFramebuffer,e$e as CloudBox,Collection$1 as Collection,e$1X as Color,_0x30da6f as Color3Gradient,I$K as ColorBlendMode,o$o as ColorCorrection,o$16 as ColorGeometryInstanceAttribute,_0x180241 as ColorGradient,t$P as ColorMaterialProperty,i$T as ColorTable,_0x5a9a06 as ColorTransferFunction,t$3 as Command,_0x126a39 as CommonBillboardVp,Ht$8 as CommonNoLigthNoTextureVp,CommonNoLigthOneTextureVp,_0x37e2ae as CommonNoTextureFS,Yt$8 as CommonNoTextureFp,_0x4c39c3 as CommonNoTextureVS,CommonOneTextureFp,_0x5958f9 as CommonServiceBase,_0x2e06c5 as CommonUtil,_0x33a928 as CommunicationLinkBase,_0x2f1f44 as CommunicationLinkType,S$14 as ComponentDatatype,w$I as ComponentIntersectionData,i$C as Composite3DTileContent,s$p as CompositeEntityCollection,e$A as CompositeMaterialProperty,t$p as CompositePositionProperty,e$B as CompositeProperty,o$m as Compositor,e$1K as CompressedTextureBuffer,t$H as ComputeCommand,f$n as ComputeEngine,r$8 as ComputePipeline,ComputeWeightMatrixParameters,ComputeWeightMatrixService,u$h as ConditionsExpression,n$j as ConeEmitter,_0x36b207 as ConeParticleEmitter,_0x5c4244 as ConfigData,r$V as ConstantPositionProperty,e$1L as ConstantProperty,i$i as Context,g$b as ContextGL,e$1W as ContextLimits,Me$j as ContextType,f$8 as ContextWebGPU,_0x15a278 as ContourAnalyst,vi$2 as ControlMode,P$H as CoplanarPolygonGeometry,g$Q as CoplanarPolygonGeometryLibrary,a$G as CoplanarPolygonOutlineGeometry,ar$6 as CornerType,P$F as CorridorGeometry,b$R as CorridorGeometryLibrary,f$z as CorridorGeometryUpdater,n$T as CorridorGraphics,V$z as CorridorOutlineGeometry,a$O as Credential,E$Y as CredentialType,r$U as Credit,r$l as CreditDisplay,_0x841f89 as CtrlPosition,_0x9797a1 as CtrlPositionType,e$1P as CubeMap,c$10 as CubeMapFace,X$X as CubeMapGL,y$S as CubeMapGPU,j$1j as CubicRealPolynomial,G$1a as CullFace,i$X as CullingVolume,Curve,n$o as CustomDataSource,m$s as CustomGeometryUpdater,_0x42bbfb as CustomParticleEmitter,p$L as CustomProjection,_0x5a4942 as CylinderDirectedParticleEmitter,l$Q as CylinderGeometry,I$S as CylinderGeometryLibrary,s$n as CylinderGeometryUpdater,n$S as CylinderGraphics,d$Z as CylinderOutlineGeometry,_0x18139b as CylinderParticleEmitter,E$w as CzmlDataSource,_0x5e76de as DDSTexture,o$$ as DDSTextureGL,o$_ as DDSTextureGPU,Se$e as DDSTextureManager,L$W as DXTTextureDecode,r$k as DamBreakAnalysis,_0x124e32 as DashLineCommunicationLink,p$T as DataFileType,o$B as DataSource,e$z as DataSourceClock,i$t as DataSourceCollection,u$p as DataSourceDisplay,i$h as DebugAppearance,p$V as DebugCameraPrimitive,_0x5993b9 as DebugCommand,s$d as DebugModelMatrixPrimitive,_0x3fc8dd as DeductionScript,_0x5a32e4 as DeductionScriptActionBasicParm,_0x1c7405 as DeductionScriptActionEffect,_0x4de595 as DeductionScriptActionMove,_0x17d8f6 as DeductionScriptActionRotation,_0x179128 as DeductionScriptActionScale,_0x820831 as DeductionScriptCalc,_0x42795a as DeductionScriptExecute,_0x2ac9f9 as DeductionScriptExecuteCalc,_0x1a5240 as DeductionScriptExecuteGroup,_0x3c9d86 as DeductionScriptExecuteManager,_0x2b1f2e as DeductionScriptExecuteResetType,_0x1c1a40 as DeductionScriptExecuteState,_0x209786 as DeductionScriptExtend,_0x5f47f0 as DeductionScriptGroup,_0x1a04d1 as DeductionScriptManager,o$L as DefaultProxy,_0x181e05 as DefaultStyle,s$U as DepthFramebuffer,re$G as DepthFunction,DepthMapAnalysisVp,n$g as DepthOfFieldEffect,c$d as DepthPlane,l$i as DerivedCommand,t$15 as DeveloperError,h$g as DeviceOrientationCameraController,_0x291996 as Dictionary,c$i as DirectionalLight,r$j as DiscardColorTileImagePolicy,A$n as DiscardEmptyTileImagePolicy,u$i as DiscardMissingTileImagePolicy,r$Z as DistanceDisplayCondition,t$A as DistanceDisplayConditionGeometryInstanceAttribute,_0x2bcc5b as DotMode,_0x15cea8 as DotPlotStyle,h$Q as DoublyLinkedList,r$A as DracoLoader,i$$ as DrawCommand,_0x558853 as DrawCubeHandler,w$n as DrawHandler,_0x1522bc as DrawMode,_0x81479b as DrawRectHandler,_0x5c31bd as DxtTexture,_0x507f80 as DynamicExtendRegionFp,_0x1dd94 as DynamicExtendRegionVp,r$s as DynamicGeometryBatch,a$C as DynamicGeometryUpdater,_0x256afc as DynamicLayer3D,_0x41f4a0 as DynamicLayerVertex,_0x34a477 as DynamicObjectScane,_0x15cf65 as DynamicObjectState,x$1h as EarthOrientationParameters,n$1c as EarthOrientationParametersSample,m$Y as EasingFunction,_0x511b25 as EdgePreprocessing,_$l as EditHandler,_0x21611c as EditSmlFileParameters,_0x5b4a7d as EditSmlFileService,_0x10cb0b as EfficiencyManager,Y$A as EllipseGeometry,C$L as EllipseGeometryLibrary,u$s as EllipseGeometryUpdater,n$R as EllipseGraphics,M$K as EllipseOutlineGeometry,t$12 as Ellipsoid,E$1t as EllipsoidGeodesic,b$O as EllipsoidGeometry,l$z as EllipsoidGeometryUpdater,e$1q as EllipsoidGraphics,x$13 as EllipsoidOutlineGeometry,p$c as EllipsoidPrimitive,P$15 as EllipsoidRhumbLine,t$h as EllipsoidSurfaceAppearance,f$16 as EllipsoidTangentPlane,t$z as EllipsoidTerrainProvider,s$H as EllipsoidalOccluder,t$j as EmissionMaterialProperty,_0x3a711b as EmissionTextureUnit,t$r as Empty3DTileContent,i$12 as EncodedCartesian3,h$W as Entity,a$r as EntityCluster,r$v as EntityCollection,V$l as EntityView,R$12 as EnumConvertor,o$1h as Event,n$x as EventHelper,_0x38cf22 as Evented,_0x12f1c7 as Events,Ca$2 as ExcavationBottomFS,Ra$3 as ExcavationBottomVS,$$M as ExcavationFS,b$V as ExcavationSources,Z$K as ExcavationVS,L$E as Expression,s$u as ExpressionNodeType,_0x29b810 as ExtendProperty,_0x1015ec as ExtrapolationType,k$K as FXAA3_11,C$l as Facade,_0x211aff as FacilityAnalyst3DParameters,FacilityAnalystStreamParameters,FacilityAnalystStreamService,_0x61bc6c as FacilityAnalystTracedown3DParameters,_0x4d0341 as FacilityAnalystTracedown3DService,_0x2932d4 as FacilityAnalystTraceup3DParameters,_0x2499f1 as FacilityAnalystTraceup3DService,_0x341870 as FactorGradient,Feature,s$Z as FeatureDetection,_0xac67be as FeatureService,i$g as FieldLayer3D,_0x1e78ea as FillGradientMode,fr$3 as FillStyle,_0x35b861 as FilterParameter,FindClosestFacilitiesService,FindLocationParameters,FindLocationService,FindMTSPPathsParameters,FindMTSPPathsService,FindPathParameters,FindPathService,FindServiceAreasParameters,FindServiceAreasService,FindTSPPathsParameters,FindTSPPathsService,f$Z as FlattenRegion,I$e as FloodAnalysis3D,j$16 as FlyInterpolationMode,l$r as FlyManager,v$p as FlyTurningMode,g$j as Fog,e$L as ForEach,_0x16512b as Format,_0x3fcb29 as Forward3D,Qe$c as FrameBufferType,i$f as FrameRateMonitor,h$f as FrameState,t$V as Framebuffer,a$W as FramebufferGL,r$12 as FramebufferGPU,s$g as FramebufferManager,i$e as FrustumCommands,z$U as FrustumGeometry,s$O as FrustumOutlineGeometry,l$1e as Fullscreen,r$5 as FullscreenButton,r$6 as FullscreenButtonViewModel,_0xe25a5e as FunctionExt,i$z as GLBModel3DTileContent,_0x21ced6 as GOAnimation,_0x224004 as GOAnimationAttribute,_0x400916 as GOAnimationBlink,_0x597fad as GOAnimationGrow,_0x25263a as GOAnimationManager,GOAnimationManagerBase,_0x8d847f as GOAnimationRotate,_0x22137f as GOAnimationScale,_0x1368e5 as GOAnimationShow,_0x577f4c as GOAnimationState,_0x144579 as GOAnimationType,_0x371aa9 as GOAnimationWay,_0x269f67 as GOAnimationWay_ModelGroup,i$q as GeoBillboard,i$p as GeoBox,i$o as GeoCircle3D,r$q as GeoCone,i$n as GeoCylinder,i$m as GeoEllipsoid,_0x3fd6e5 as GeoEntity,_0x56b6ed as GeoEntityBasicParameter,_0x1b7397 as GeoEntityEffect,_0x597b34 as GeoEntityEffectAnnularDiffusion,_0x42e779 as GeoEntityEffectAttackline,_0x458424 as GeoEntityEffectAugment,_0x236442 as GeoEntityEffectBurst,_0x570f72 as GeoEntityEffectDetecttoncone,_0x496759 as GeoEntityEffectDynamic,_0x584c60 as GeoEntityEffectExtend,_0x2d2a0c as GeoEntityEffectExtendFactory,_0x492aac as GeoEntityEffectFiresmoke,_0x57d7b0 as GeoEntityEffectMechanicalRadar,_0x5a492f as GeoEntityEffectParameter,_0x3897ec as GeoEntityEffectParameterRadar,_0x208f92 as GeoEntityEffectRadarBase,_0x2ceb89 as GeoEntityEffectRadarScanBase,_0x425466 as GeoEntityEffectRotateRadar,_0xc2c75d as GeoEntityEffectScanRadar,_0x3cd5dc as GeoEntityEffectScanWave,_0xa16fcf as GeoEntityEffectScanWaveColorMode,_0x524880 as GeoEntityEffectScancone,_0x1892f9 as GeoEntityEffectScanconeType,_0x392050 as GeoEntityEffectSign,_0x1837ea as GeoEntityEffectSignType,_0x5a68dc as GeoEntityEffectTailflame,_0x1d9822 as GeoEntityEffectTailgas,_0x1b8e09 as GeoEntityEffectToolkit,_0x51a685 as GeoEntityEffectTrackLineType,_0x297e6a as GeoEntityEffectTrackline,_0xaadec6 as GeoEntityEffectType,_0x54c3a0 as GeoEntityEffectWarningRadar,_0x3c98af as GeoEntityManager,_0xcc97e1 as GeoEntityMoveCalc,_0x1e6774 as GeoEntityMoveParameter,_0x4cd539 as GeoEntityNode,_0x4c8ffe as GeoEntityParamCyclicType,_0x4920fc as GeoEntityParameter,_0x9cc9ee as GeoEntityRotationCalc,_0x4d2fe0 as GeoEntityRotationParameter,_0x4f7cca as GeoEntityScaleCalc,_0xc7aed0 as GeoEntityScaleParameter,_0x2d9130 as GeoGraphicObject,_0x392e98 as GeoGraphicObjectConvert,_0x19437a as GeoJSON,y$p as GeoJsonDataSource,p$U as GeoLine3D,t$i as GeoModel3D,e$r as GeoPoint3D,o$u as GeoPolyline,n$F as GeoRegion3D,e$q as GeoSphere,c$H as GeocodeType,s$3 as Geocoder,o$K as GeocoderService,D$1 as GeocoderViewModel,n$1d as GeographicProjection,g$15 as GeographicTilingScheme,I$1p as Geometry,o$11 as Geometry3D,p$w as Geometry3DTileContent,P$U as Geometry3DType,o$1c as GeometryAttribute,a$_ as GeometryAttributes,d$1o as GeometryInstance,o$13 as GeometryInstanceAttribute,_0x39c22a as GeometryOffsetAttribute,k$14 as GeometryPipeline,_0x204609 as GeometryServer,Me$s as GeometryType,i$G as GeometryUpdater,c$l as GeometryVisualizer,R$h as GetFeatureInfoFormat,_0xaafaf2 as GetFeaturesByBoundsParameters,_0x4f0a2a as GetFeaturesByBoundsService,_0x32744e as GetFeaturesParametersBase,_0x28aab6 as GetFeaturesServiceBase,_0x53b796 as GetLibIDsService,_0x90ce as GetLibInfoParameter,GetLibInfoService,_0x29d385 as GetSMLInfosParameters,_0xa6b4bc as GetSMLInfosService,_0x51e0df as GetSymbolInfoParameters,_0x204238 as GetSymbolInfoService,h$d as Globe,a$a as GlobeDepth,U$f as GlobeSurfaceShaderSet,v$C as GlobeSurfaceTile,R$H as GlobeSurfaceTileProvider,_0x5c8da9 as GlobeTileUBO,i$d as GlobeTranslucency,p$8 as GlobeTranslucencyFramebuffer,F$c as GlobeTranslucencyState,_0x3248fd as GltfSkeleton,_0x176948 as GltfSkeletonProcessor,h$b as GoogleEarthEnterpriseImageryProvider,n$f as GoogleEarthEnterpriseMapsProvider,c$G as GoogleEarthEnterpriseMetadata,T$I as GoogleEarthEnterpriseTerrainData,_$B as GoogleEarthEnterpriseTerrainProvider,e$W as GoogleEarthEnterpriseTileInformation,_0x313aa5 as GpuParticleSystem,_0xdebb2b as GradientHelper,d$1r as GregorianDate,n$c as GridImagery,o$h as GridImageryProvider,p$b as GridLayer,t$o as GridMaterialProperty,w$b as GridProvider,_$e as GridState,d$j as GridTileImagery,_0x48550f as GroundEffect,i$x as GroundGeometryUpdater,aa$5 as GroundPolylineGeometry,g$13 as GroundPolylinePrimitive,d$15 as GroundPrimitive,_0x8c2e6e as GroupObject,a$T as HeadingPitchRange,i$16 as HeadingPitchRoll,o$1g as Heap,o$g as HeatMap,k$R as HeightReference,T$N as HeightmapEncoding,T$L as HeightmapTerrainData,m$P as HeightmapTessellator,e$l as HemisphereLight,_0x4b20a8 as HemisphericParticleEmitter,E$J as HermitePolynomialApproximation,m$N as HermiteSpline,o$3 as HomeButton,r$4 as HomeButtonViewModel,j$V as HorizontalOrigin,R$$ as HypSometric,u$L as HypsometricSetting,k$S as HypsometricSettingEnum,y$F as Iau2000Orientation,D$17 as Iau2006XysData,a$10 as Iau2006XysSample,h$I as IauOrientationAxes,o$J as IauOrientationParameters,_0x5651c5 as ImageMarchingCubes,a$R as ImageMaterialProperty,n$M as Imagery,h$R as ImageryLayer,n$b as ImageryLayerCollection,o$r as ImageryLayerFeatureInfo,e$i as ImageryProvider,Xe$d as ImagerySplitDirection,wt$7 as ImageryState,ce$z as IndexDatatype,l$14 as IndexedDBScheduler,l$4 as InfoBox,t$1 as InfoBoxViewModel,o$4 as InspectorShared,_0x55c8b4 as Instance,_0x36b665 as InstanceInfo,_0x468844 as InstanceLayer,_0x14dd8d as InstanceMode,_0x13fd1b as InstanceSkeletonManager,_0x5bb99e as InstanceTile,_0x260003 as InstanceTilesLayerVS,u$y as Instanced3DModel3DTileContent,bt$6 as InstancedType,r$L as InterpolationAlgorithm,_0x301856 as InterpolationType,Ae$w as Intersect,g$1j as IntersectionTests,d$10 as Intersections2D,o$1n as Interval,t$a as InvertClassification,e$Z as Ion,s$C as IonGeocoderService,o$l as IonImageryProvider,n$y as IonResource,n$e as IonWorldImageryStyle,o$I as Iso8601,_0x4590c8 as JSONFormat,o$f as JobScheduler,i$R as JobType,a$15 as JulianDate,o$V as KTX2Transcoder,Aa$1 as KeyboardEventModifier,o$w as KmlCamera,U$n as KmlDataSource,o$v as KmlLookAt,l$s as KmlTour,a$m as KmlTourFlyTo,i$r as KmlTourWait,D$R as Label,g$W as LabelCollection,n$Q as LabelGraphics,R$S as LabelStyle,l$w as LabelVisualizer,i$J as LagrangePolynomialApproximation,_0xf20e4e as LatLng,_0x483060 as LayerDataStruct,d$1h as LayerUboDecl,u$k as Layers,a$16 as LeapSecond,LercDecode,r$g as Light,_0x707ed3 as LightCount,Ze$4 as LightGroupType,s$J as LightSource,_0x4970c2 as LightSourceType,_0x3261f9 as LightUBO,K$W as LightUboDecl,_0x6cc60b as LimitBody,_0x5ef453 as LimitBodyVp,_$K as LineCallOut,X$O as LineCallOutVp,J$U as LineDisplayType,LineString,v$A as LinearApproximation,LinearRing,r$Q as LinearSpline,N$Q as LoadState,_0x539352 as LoadingPriorityMode,r$S as ManagedArray,Rr$3 as MapMode2D,r$J as MapProjection,e$U as MapboxApi,m$h as MapboxImageryProvider,o$e as MapboxStyleImageryProvider,r$Y as Material,t$v as MaterialAppearance,_0x1772f5 as MaterialExt,_0x27114a as MaterialManager,_0xf77618 as MaterialPass,r$C as MaterialProperty,b$1b as MaterialUboDecl,e$2d as Math,f$15 as Matrix2,p$1e as Matrix3,p$1d as Matrix4,T$n as MeasureHandler,_0x3c1870 as MeasureMode,_0x82cfb9 as Measurement,ti$4 as MemoryManager,_0x4b03f3 as MeshParticleEmitter,_0x49281f as MeshProcessing,u$S as MeshUboDecl,_0x4071a9 as MeteorCommunicationLink,I$1e as MipmapHint,_0x2b839f as MixColorType,F$B as Model,a$x as ModelAnimation,S$u as ModelAnimationCache,f$G as ModelAnimationCollection,_0x1ea9f2 as ModelAnimationLoop,E$C as ModelAnimationState,_0x59e865 as ModelEdgeFp,_0x115b1e as ModelEdgeVp,_0xd9687d as ModelEditControl,u$o as ModelEditor,t$I as ModelGraphics,e$H as ModelInstance,w$u as ModelInstanceCollection,t$t as ModelLoadResources,a$w as ModelMaterial,a$v as ModelMesh,r$z as ModelNode,_0x34cdef as ModelObject,s$v as ModelUtility,d$z as ModelVisualizer,ModifyRegionBottomFp,ModifyRegionBottomVp,_0x454473 as ModifyRegionMode,ModifyRegionOuterFS,ModifyRegionOuterVS,ModifyRegionSideFp,ModifyRegionSideVp,Ne$h as ModifyTerrain,_0x3c481f as Module,n$9 as Moon,MultiLineString,MultiPoint,MultiPolygon,_0x3489f1 as MultiTemporalFresnelFp,_0x4f9793 as MultiViewShed3D,_0x20cd45 as MultiViewShedAnalysisFp,B$e as MultiViewportMode,f$m as MultisampleFramebuffer,M$S as MvtProviderGL,t as Navigation,l$3 as NavigationHelpButton,i$4 as NavigationHelpButtonViewModel,y as NavigationViewModel,o$Y as NearFarScalar,x$c as NetCDFParser,NetworkAnalystService,NetworkAnalystServiceBase,e$7 as NeverTileDiscardPolicy,b$4 as NoSleep,a$N as NodeTransformationProperty,s$h as NormalFramebuffer,C$c as OIT,_0x27a6bb as ObjsOperationType,d$U as Occluder,g$a as OcclusionFp,i$10 as OcclusionMesh,e$1Y as OcclusionQueryStastics,A$a as OcclusionVp,u$A as OctahedralProjectedCubeMap,e$1E as OffsetGeometryInstanceAttribute,s$B as OpenCageGeocoderService,a$9 as OpenStreetMapImageryProvider,r$t as OrderedGroundPrimitiveCollection,y$Y as OrientedBoundingBox,a$V as OrthographicFrustum,l$11 as OrthographicOffCenterFrustum,_0x3c4ba1 as OverLayerOffsetOptions,_0x3b1009 as OverLayerPicture,_0x77f391 as OverLayerSolid,_0x509f23 as OverLayerStyle,_0x2f7f36 as OverLayerSymbol,_0x504ed3 as OverLayerUtilityTools,ie$p as PBRExtensionParamterType,Xe$e as PBRMaterialType,t$x as Packable,o$G as PackableForInterpolation,Z$P as PackingRequest,_0x4d13e0 as PagedLOD,_0xf9b57a as Particle,a$k as Particle2,_0xbf6524 as ParticleBillboardMode,_0x4d4f68 as ParticleBlendMode,m$c as ParticleBurst,e$6 as ParticleEmitter,_0x38f4df as ParticleHelper,u$b as ParticlePostRenderer,_0xee24b0 as ParticleSystem,g$t as ParticleSystem2,_0xcf9486 as ParticleSystemSet,v$o as ParticleSystemType,r$f as ParticleTrailsPostRenderer,P$g as ParticleVelocityFieldEffect,Le$q as Pass,n$$ as PassState,n$P as PathGraphics,w$p as PathVisualizer,i$K as PeliasGeocoderService,t$Q as PerInstanceColorAppearance,o$d as PerformanceDisplay,i$3 as PerformanceWatchdog,r$2 as PerformanceWatchdogViewModel,o$15 as PerspectiveFrustum,l$10 as PerspectiveOffCenterFrustum,f$d as PickDepth,s$b as PickDepthFramebuffer,f$c as PickFramebuffer,a$7 as PickPointFramebuffer,t$e as PickRectFramebuffer,d$g as Picking,_0x4d473e as PiecewiseFunction,s$A as PinBuilder,_$_ as PixelDatatype,V$12 as PixelFormat,o$1m as Plane,f$L as PlaneGeometry,p$n as PlaneGeometryUpdater,e$1o as PlaneGraphics,i$I as PlaneOutlineGeometry,_0x5b011c as PlotAnimationLayer,_0x5a768f as PlotBounds,_0xdbf888 as PlotCesium,_0x23999b as PlotCollentionLayer,_0x4786d3 as PlotCollentionManager,_0x476176 as PlotCommonServiceBase,_0x4893d6 as PlotCredential,_0x3e0fb4 as PlotCustomRadar,_0x1fc894 as PlotCustomRadarGeometry,_0xe8531 as PlotCustomRadarOutlineGeometry,_0x8764e6 as PlotCylinderGeometry,_0x10d0f0 as PlotCylinderGeometryLibrary,_0xc0ccbe as PlotDrawControl,_0x4ea0dc as PlotEditControl,_0x504b3e as PlotEvent,_0x5ac1e1 as PlotEventManager,_0x421885 as PlotEvents,_0x20b2e4 as PlotFetchJsonp,_0x11db66 as PlotFetchRequest,_0x10d3db as PlotGeoEffectBase,_0x5c1673 as PlotGroundPrimitive,_0x386d8c as PlotLayers,_0x28b85b as PlotMechanicalRadar,_0x3f4ebc as PlotParameterRadar,_0x3ed677 as PlotParameterRadarScan,_0x23de81 as PlotPoint3D,_0x117656 as PlotProperty,_0x4638ce as PlotRadarBase,_0x3daff3 as PlotRadarGeometry,_0x465603 as PlotRadarOutlineGeometry,_0x2c0193 as PlotRadarType,_0x16f21a as PlotRadarUpdater,_0xbdfb44 as PlotRotateRadar,_0x2de2c6 as PlotRotateRadarScan,_0x49f493 as PlotScanRadar,_0x342bfb as PlotScanRadarScan,_0x278499 as PlotServicesUtil,_0x1e464a as PlotUtilityTools,_0x46b837 as PlotWarningRadar,_0x48d607 as Plotting,_0x394df6 as PlottingLayer,Point$1 as Point,s$N as Point3D,t$L as Point3Ds,ie$g as PointCloud,a$u as PointCloud3DTileContent,_0x2226fe as PointCloudClassificationInfo,m$W as PointCloudEyeDomeLighting,_0x2c4f4b as PointCloudRenderMode,o$Z as PointCloudShading,n$O as PointGraphics,d$v as PointHandler,c$h as PointLight,_0xaf014b as PointParticleEmitter,s$o as PointPrimitive,D$s as PointPrimitiveCollection,v$r as PointVisualizer,PointWithMeasure,Polygon,M$a as PolygonEmitter,U$18 as PolygonGeometry,y$Z as PolygonGeometryLibrary,l$y as PolygonGeometryUpdater,l$Y as PolygonGraphics,l$n as PolygonHandler,e$1M as PolygonHierarchy,A$U as PolygonOutlineGeometry,A$1f as PolygonPipeline,o$14 as Polyline,t$n as PolylineArrowMaterialProperty,J$T as PolylineCollection,e$1F as PolylineColorAppearance,o$A as PolylineDashMaterialProperty,e$v as PolylineDynamicMaterialProperty,H$14 as PolylineEffectUboDecl,_0x501956 as PolylineFp,R$A as PolylineGeometry,f$r as PolylineGeometryUpdater,t$m as PolylineGlowMaterialProperty,a$L as PolylineGraphics,d$u as PolylineHandler,r$X as PolylineMaterialAppearance,e$y as PolylineOutlineMaterialProperty,m$X as PolylinePipeline,_0x4bddb0 as PolylineRasterVp,_0xfeefe2 as PolylineShadowVolumeFS,_0x48d945 as PolylineShadowVolumeVS,o$x as PolylineTrailMaterialProperty,l$u as PolylineVisualizer,N$A as PolylineVolumeGeometry,J$C as PolylineVolumeGeometryLibrary,a$n as PolylineVolumeGeometryUpdater,e$1n as PolylineVolumeGraphics,_$z as PolylineVolumeOutlineGeometry,_0x1568b2 as PolylineVp,j$Z as PositionMode,t$J as PositionProperty,n$n as PositionPropertyArray,t$f as PostEffectFilterlFramebuffer,p$h as PostProcessStage,_$a as PostProcessStageCollection,s$f as PostProcessStageComposite,i$b as PostProcessStageLibrary,e$j as PostProcessStageSampleMode,g$r as PostProcessStageTextureCache,v$9 as PrefilterRadianceMap,_0x4a04df as PrepassRenderer,b$s as PreprocessCubeMap,y$R as Primitive,o$y as PrimitiveCollection,_e$s as PrimitiveEdgeFp,ge$q as PrimitiveEdgeVp,k$U as PrimitivePipeline,_0x26a83e as PrimitiveState,W$18 as PrimitiveType,_0x3c54f4 as Profile,h$8 as ProfilePlaneGeometry,f$a as ProfileRender,D$V as ProgramDefines,_0x337a3e as ProjectionImage,_0x287c41 as ProjectionImageFp,_0x403af5 as ProjectionMode,ProjectionName,n$1 as ProjectionPicker,o$1 as ProjectionPickerViewModel,r$_ as Property,i$v as PropertyArray,f$V as PropertyBag,i$5 as ProviderViewModel,m$1f as QuadraticRealPolynomial,e$9 as QuadtreeOccluders,C$e as QuadtreePrimitive,h$e as QuadtreeTile,re$A as QuadtreeTileLoadState,r$e as QuadtreeTileProvider,Quality,p$O as QuantizedMeshTerrainData,F$1i as QuarticRealPolynomial,n$15 as Quaternion,r$P as QuaternionSpline,r$17 as Queue,_0x547cc0 as QuickPosition,_0x560429 as QuickPositionManager,U$i as RGBELoader,k$g as RPListenerType,_0x219958 as RangeMode,t$E as RasterFramebuffer,C$q as RasterGeometryType,RasterLayerUboDecl,p$9 as RasterVectorCollection,f$19 as Ray,_0x33b36a as RectQueryHandler,h$18 as Rectangle,r$G as RectangleCollisionChecker,j$N as RectangleGeometry,j$O as RectangleGeometryLibrary,d$B as RectangleGeometryUpdater,n$N as RectangleGraphics,k$I as RectangleOutlineGeometry,Re$l as ReferenceFrame,a$p as ReferenceProperty,i$j as ReflectFramebuffer,_0x3d8f6e as RegionAltitudeVectex,q$16 as RegionEffectUboDecl,_0x51e90e as RegionFragment,_0x3c68b9 as RegionMaterialFp,_0x33ffa2 as RegionMaterialVp,_0x57c608 as RegionTextureVertex,_0x302e68 as RegionVectex,_0x597498 as RenderClipPlane,_0x4881fc as RenderEntityPagedLOD,_0x5430eb as RenderPipeline,d$1m as RenderState,t$Z as RenderStateGL,n$12 as RenderStateGPU,s$M as RenderTexture,r$10 as Renderbuffer,M$13 as RenderbufferFormat,o$19 as RenderbufferGL,r$11 as RenderbufferGPU,t$d as Renderer2D,r$1c as Request,s$$ as RequestErrorEvent,r$1b as RequestScheduler,W$1c as RequestState,U$1f as RequestType,t$10 as Resource,_0x520814 as RotateDirection,m$r as Rotation,O$K as RotationOrigin,f$p as Route,Route as Route2,d$x as RouteCollection,e$t as RouteStop,t$13 as RuntimeError,_0x1393e5 as S3MBDataParser,_0x590c0e as S3MBSkeletonProcessor,_0x3763f9 as S3MBlock,_0x24cbe4 as S3MBlockCache,_0x37a6f4 as S3MBloomEffect,_0x22a8f5 as S3MCompressType,_0x5659c7 as S3MCreateIndexJob,_0x2787b1 as S3MCreateVertexJob,_0x46f77a as S3MDataParser,_0x5a4a56 as S3MDracoDecode,_0x28a85f as S3MEdgeProcessor,_0x128750 as S3MEntity,_0xee2f65 as S3MFeature,_0x17cdca as S3MGroupLayer,_0x24f13b as S3MInstance,_0xd633a7 as S3MInstanceCollection,_0x4b6e8f as S3MInstanceCollectionVertex,_0x408010 as S3MLayerScheduler,_0x12db87 as S3MLayerUBO,_0x4f8f70 as S3MMaterialUBO,_0x35e02f as S3MMeshUBO,M$16 as S3MOperationFSDecl,_0x3b1e53 as S3MPBRMaterialLib,_0x2ddc8c as S3MPixelFormat,_0x153701 as S3MPointCloudEDL,_0x23a343 as S3MPointCloudEDLFp,_0x248cf1 as S3MPointCloudEDLFpWGSL,_0x589347 as S3MPointCloudFp,_0x138829 as S3MPointCloudFpWGSL,_0x21e433 as S3MPointCloudVp,_0x2cd408 as S3MPointCloudVpWGSL,_0x5175d0 as S3MPolylineEffect,_0x8dd7b2 as S3MPolylineEffectUBO,_0x2adae6 as S3MRegionEffect,_0x47febb as S3MRegionEffectUBO,_0x45bcf8 as S3MRenderStateCreator,_0x5adff0 as S3MShaderProgramJob,_0x1c4b07 as S3MSkeleton,_0x432861 as S3MSkeletonProcessor,_0x29d1c7 as S3MTaskManager,_0x1451be as S3MTextureManager,_0x1a0b3c as S3MThemeGraph,_0x43476e as S3MTilesBillboardPixelSizeVp,S3MTilesBillboardVp,_0x357523 as S3MTilesCommonOntTextureFP,_0xb2d90 as S3MTilesExtendPolygonShadowVP,_0xf44c9d as S3MTilesFontWithHaloFp,_0x355815 as S3MTilesFpPointWGSL,_0x4c43d7 as S3MTilesFpWGSL,_0x1931a7 as S3MTilesFragment,_0xb37562 as S3MTilesFragmentRaster,_0x3c2cd7 as S3MTilesLabelStyle,_0x1a71e8 as S3MTilesLayer,_0x4faa00 as S3MTilesLineShadowVectex,_0x4f0656 as S3MTilesRectSelection,_0xcc5af2 as S3MTilesRectSelectionWGSL,_0x5099e1 as S3MTilesRegionShadowVectex,_0x53b856 as S3MTilesSelection,_0x4a0943 as S3MTilesShadowVolumeFP,_0x359ef7 as S3MTilesVectex,_0x903893 as S3MTilesVectexRaster,_0x108a30 as S3MTilesVpPointWGSL,_0x36d142 as S3MTilesVpWGSL,_0x2c7aca as S3MUniformMapCreator,_0x2445e0 as S3MUploadSubTextureJob,_0x43b37d as S3MVersion,v$R as S3MVertexFactory,_0x3ad44f as S3MVertexPackage,_0x1f4c64 as S3MVolumeUBO,X$Z as S3MVolumeUboDecl,S3MVoxelGridFp,S3MVoxelGridVp,_0x44ae93 as S3MWaterLayerUBO,_0x47b2f7 as S3ModelFP,se$r as SCTTerrainProvider,V$L as SDFSettings,i$a as SMAA,_0x583b79 as SMLFileService,t$K as SQFramebuffer,s$W as SRGBtoLINEAR,a$f as SSAOEffect,o$z as SampledPositionProperty,g$y as SampledProperty,e$1S as Sampler,_0x5bf86f as Satellite,_0x2e5655 as SatelliteEntity,_0x535f91 as SatelliteEntityManager,_0x464966 as SatelliteGroup,_0x5e00a7 as SatelliteManager,_0x415334 as SatelliteOrbitsLayer,_0x3121bb as SatelliteToolkit,_0x442216 as Scalar,i$s as ScaledPositionProperty,h$i as ScanEffect,A$l as ScanEffectMode,w$4 as Scene,De$2 as SceneConfigLoader,n$i as SceneFramebuffer,C$14 as SceneMode,c$2 as SceneModePicker,i$2 as SceneModePickerViewModel,s$R as SceneTransforms,R$8 as SceneTransitioner,_0x3a935d as SceneUBO,x$16 as SceneUboDecl,_a as ScreenSpaceCameraController,g$K as ScreenSpaceEventHandler,G$J as ScreenSpaceEventType,Zr$3 as SelectColorType,i$1 as SelectionIndicator,n as SelectionIndicatorViewModel,ServerGeometry,ServiceBase,h$m as ShaderCache,to as ShaderChunk,r$14 as ShaderProgram,t$2 as ShaderProgramCompute,_0x273cff as ShaderProgramCreator,g$1a as ShaderProgramGL,m$$ as ShaderProgramGPU,s$V as ShaderSource,_0x46d19a as ShadowAnalysisFp,C$Z as ShadowMap,g$12 as ShadowMapShader,W$X as ShadowMode,_0x138bac as ShadowQueryFp,_0x19393b as ShadowQueryPoints,_0x1f9203 as ShadowQueryVp,_0x325616 as ShadowType,_0x32f9aa as ShadowUBO,J$$ as ShadowUboDecl,y$Q as ShadowVolumeAppearance,_0x460335 as SharedEDLFrameBuffer,e$1I as ShowGeometryInstanceAttribute,_0x253cc as SightLineAnalysis,_0x393ad5 as Sightline,SightlineAnalysisFp,_0x35ab06 as SightlineAnalysisVp,n$6 as SilverLightingAtmosphere,a$2 as SilverLightingEphemeris,e$2 as SilverLightingLocalTime,i$8 as SilverLightingLocation,a$3 as SilverLightingLuminanceMapper,l$a as SilverLightingSky,o$9 as SilverLightingSolarSpectrum,G$6 as SilverLightingSpectrum,F$G as Simon1994PlanetaryPositions,S$A as SimplePolylineGeometry,_0x120b1f as SimulationController,u$f as SingleTileImageryProvider,_0x1c2819 as SitDataManager,_0x102a68 as SitDataStruct,_0x2e28f1 as SituationSimulationManager,_0x489b6c as SituationSimulationSchemeDataType,_0x572365 as SituationSimulationSchemeManager,_0xf52e1d as SituationSimulationToolkit,_0x18a7ac as SkeletonProcessor,_0x172047 as SkeletonState,h$6 as SkyAtmosphere,h$5 as SkyBox,_0x733981 as Skyline,_0x3315e4 as SkylineFp,_0x88ad48 as SkylineVp,l$K as SlopeSetting,_0x25bb47 as SlopeSettingEnum,_0x1e67d8 as SmlInfoStruct,r$O as SmoothStepSpline,r$d as SolidModelsProfile,V$8 as SolidProfileFp,_0x16da97 as SpatialQuery3D,_0x12eef8 as SpatialQueryFp,_0xaa057c as SpatialQueryFpWGSL,_0x33b36c as SphereDirectedParticleEmitter,o$s as SphereEmitter,n$u as SphereGeometry,a$U as SphereOutlineGeometry,_0x4ccf7f as SphereParticleEmitter,c$B as Spherical,n$H as Spline,_0x2d4a08 as SplitDirection,_$k as SpotLight,y$s as StaticGeometryColorBatch,u$r as StaticGeometryPerMaterialBatch,p$l as StaticGroundGeometryColorBatch,f$t as StaticGroundGeometryPerMaterialBatch,m$o as StaticGroundPolylinePerMaterialBatch,y$r as StaticOutlineGeometryBatch,u$M as StencilConstants,m$Z as StencilFunction,n$_ as StencilOperation,A$s as StopPlayMode,i$u as StripeMaterialProperty,mr$2 as StripeOrientation,e$1v as Style3D,t$8 as StyleExpression,_0x5e1712 as SubEmitter,_0x5142be as SubEmitterType,_0x4bc96b as SubTextureCache,_0x57fbd1 as SubTextureManager,u$5 as Sun,i$k as SunLight,s$e as SunPostProcess,P$6 as SuperMapImageryProvider,ne$u as SuperMapTerrainProvider,SuperMapVersion,f$J as SupportTools,_0x3fcacb as SurroundLineType,g$4 as SvgPathBindingHandler,_0x2909c1 as SymbolAlgoUtil,_0x39500c as SymbolAnnotation,_0x2c1b91 as SymbolArbitraryPolygon,_0x5cf148 as SymbolArc,_0x26b741 as SymbolBrace,_0x4c78d5 as SymbolCell,_0x10c3cc as SymbolChord,_0x4d54a5 as SymbolCircle,_0x431d2c as SymbolConcentricCircle,_0x105b3f as SymbolCurveEight,_0x4844fd as SymbolDot,_0x3bca92 as SymbolDotGraphic,_0x231a11 as SymbolDotPicture,_0x180939 as SymbolDotVector,_0x509a13 as SymbolEllipse,_0x399148 as SymbolKidney,_0x467baf as SymbolLib,_0x18c058 as SymbolLibManager,_0x5228e4 as SymbolLibService,_0x3b0548 as SymbolParallelogram,_0x1daae0 as SymbolPie,_0x1e88b8 as SymbolPolyBezier,_0x5ea7dc as SymbolPolyBezierClosed,_0x5e520d as SymbolPolyline,_0x5f1d0b as SymbolRectangle,_0x362083 as SymbolRegularPolygon,_0x41bd10 as SymbolRunWay,_0x291171 as SymbolStyle,_0x40b7f2 as SymbolTextStyle,_0x5d985d as SymbolTrapezoid,_0x1c668c as SymbolType,_0x184a5e as TSClipPlane,i$W as TaskProcessor,a$e as TemporalAA,o$U as TemporalSetting,r$E as TerrainData,h$M as TerrainEncoding,Q$L as TerrainFillMesh,r$h as TerrainLayer,o$i as TerrainLayerCollection,T$M as TerrainMesh,h$E as TerrainOffsetProperty,I$12 as TerrainProvider,ye$j as TerrainQuantization,_0x10b943 as TerrainSlopeAnalysis,Ee$j as TerrainState,_0x21df38 as TextOverlapInfo,_0x26dfeb as TextPos,t$U as Texture,e$k as Texture3D,E$m as Texture3DGL,f$l as Texture3DGPU,v$I as TextureAtlas,r$o as TextureCache,w$V as TextureGL,u$R as TextureGPU,rt$k as TextureMagnificationFilter,_0xa08fda as TextureManager,tt$i as TextureMinificationFilter,q$1a as TextureWrap,_0x680f96 as ThreeDModeling,h$3 as TiandituAnnotationProvider,f$6 as TiandituImageryProvider,t$7 as TiandituMapsStyle,d$8 as TiandituTerrainProvider,n$C as TileAvailability,y$K as TileBoundingRegion,t$q as TileBoundingSphere,o$8 as TileBoundingVolume,n$4 as TileCoordinatesImageryProvider,r$b as TileDiscardPolicy,T$K as TileEdge,o$T as TileImagery,g$n as TileMapServiceImageryProvider,c$t as TileOrientedBoundingBox,l$V as TileProviderError,i$L as TileReplacementQueue,D$J as TileSelectionResult,TileState,x$R as TileTerrain,t$s as Tileset3DTileContent,o$D as TilingScheme,g as TiltIndicator,h$17 as TimeConstants,f$R as TimeDynamicImagery,g$7 as TimeDynamicPointCloud,d$W as TimeInterval,c$A as TimeIntervalCollection,t$l as TimeIntervalCollectionPositionProperty,t$k as TimeIntervalCollectionProperty,H$1d as TimeStandard,u$3 as Timeline,s$1 as TimelineHighlightRange,v as TimelineTrack,D$14 as Tipsify,r$9 as ToggleButtonViewModel,M$8 as Tonemapper,s$i as TransformFeedback,m$19 as Transforms,e$1_ as TranslationRotationScale,TransportationAnalystParameter,TransportationAnalystResultSetting,m$O as TridiagonalSystemSolver,u$W as TrustedServers,_0x2e6536 as TubularCommunicationLink,f$X as Tween,s$a as TweenCollection,_0x37a515 as UBOBase,_0x2e0417 as UBONames,UBONames as UBONames2,t$6 as UnderGlobe,F$6 as UniformBufferEngineGL,e$1C as UniformBufferGL,P$l as UniformState,n$G as UniformlyVariableMotionSpline,UpdateEdgeWeightParameters,UpdateEdgeWeightService,UpdateTurnNodeWeightParameters,UpdateTurnNodeWeightService,h$16 as Uri,_$g as UrlTemplateImageryProvider,Tr$4 as UrlType,_0x5cddc5 as Util,VERSION,r$1 as VRButton,a as VRButtonViewModel,l$J as VRTheWorldTerrainProvider,Vector,c$x as Vector3DTileBatch,y$v as Vector3DTileContent,e$I as Vector3DTileGeometry,b$G as Vector3DTilePoints,a$t as Vector3DTilePolygons,h$C as Vector3DTilePolylines,y$y as Vector3DTilePrimitive,_$8 as VectorTilesLayer,i$P as VectorTilesMap,e$w as VelocityOrientationProperty,r$u as VelocityVectorProperty,c$13 as VertexArray,v$F as VertexArrayFacade,l$15 as VertexArrayGL,m$_ as VertexArrayGPU,_0x64fca6 as VertexCompressOption,n$13 as VertexFormat,_0x132759 as VertexWeightMode,S$Q as VerticalOrigin,n$t as VideoSynchronizer,L$c as View,_0x4036ab as ViewDome,_0x2232ed as ViewDomeFp,_0x19446b as ViewDomeType,_0x48338c as ViewDomeVp,_0x13f223 as ViewShed3D,_0x4dfa3a as ViewShedAnalysis,_0x55e263 as ViewShedAnalysisFp,_0x56b405 as ViewShedAnalysisVp,u as Viewer,o$7 as ViewportQuad,fe$r as Visibility,r$r as Visualizer,A$3 as Volume,c$8 as VolumeBillboardCollection,Nt$2 as VolumeBoxFp,Mt$2 as VolumeBoxVp,gt$2 as VolumeRenderMode,g$e as VoxelGridLayer3D,a$5 as VoxelGridPostRenderer,_$9 as VoxelGridTile,o$b as VoxelGridTileMultiResolution,VulkanConstants,_0x18273d as WTSConfigManager,Ct as WalkingMode,E$G as WallGeometry,D$C as WallGeometryLibrary,n$m as WallGeometryUpdater,e$1m as WallGraphics,w$x as WallOutlineGeometry,G$1f as WaterLayerUboDecl,K$a as WaterMode,h$J as WaterParameter,s$E as WaterbodySize,i$O as WaveStrength,_0x2187ca as WayPathType,de$y as WebGLConstants,m$g as WebMapServiceImageryProvider,v$E as WebMapTileServiceImageryProvider,t$N as WebMercatorProjection,c$S as WebMercatorTilingScheme,r$D as WeightSpline,u$2 as Widget,W$13 as WindingOrder,_0x1d226a as WireFrameType,s$T as XML,o as ZoomIndicator,r as ZoomIndicatorViewModel,a$y as addBuffer,E$E as addDefaults,s$x as addExtensionsRequired,i$D as addExtensionsUsed,s$z as addPipelineExtras,d$P as addToArray,O$P as adjustColor,n$1a as appendForwardSlash,d$1s as arrayFill,D$13 as arrayRemoveDuplicates,l$R as arraySlice,c$7 as assimpjs,S$$ as barycentricCoordinates,tr$1 as bignumber,a$17 as binarySearch,b$_ as bitmap_sdf,ro$1 as blinnPhong,l$16 as brdf,n$17 as buildModuleUrl,u$4 as bytebuffer,eo as calcTexCoordDecl,V$Z as calculateMipLevel,T$12 as calculatePolyTexCoord,t$C as cancelAnimationFrame,r$p as checkFloatTexturePrecision,_$W as clip,l$1f as clone,p$19 as combine,a$d as computeFlyToLocationForRectangle,N$Y as computeWValue,i$B as createBillboardPointCallback,s$4 as createCommand,m$4 as createDefaultImageryProviderViewModels,n$3 as createDefaultTerrainProviderViewModels,n$2 as createFragmentFromTemplate,e$1T as createGuid,c$$ as createMaterialPropertyDescriptor,L$j as createOpenStreetMapImageryProvider,C$10 as createPropertyDescriptor,c$X as createRawPropertyDescriptor,y$e as createTangentSpaceDebugPrimitive,l as createTaskProcessorWorker,te$8 as createTileMapServiceImageryProvider,I$1m as createUniform,V$$ as createUniformArray,j$1a as createUniformArrayGPU,V$_ as createUniformGPU,o$k as createWorldImagery,u$G as createWorldTerrain,Module$1 as crunchprevious,c$14 as cubeUV_reflection,f$M as decodeGoogleEarthEnterpriseData,u$Z as defaultValue,e$2e as defined,t$11 as deprecationWarning,i$11 as destroyObject,i$Z as directionLightDecl,h$s as dynamicGeometryGetBoundingSphere,_0x53e246 as earcut,z$$ as earcut_2_2_1,I$1i as executeExcavation,f$_ as executeServerExcavationDecl,oe$a as exportKml,_0x304cf3 as fill_style_layer,B$y as findAccessorMinMax,_0x1eef11 as flightLineXml,_0x5bc321 as flyManager,f$T as formatError,c$16 as freezeRenderState,o$1j as getAbsoluteUri,p$A as getAccessorByteStride,i$1b as getBaseUri,M$B as getBinaryAccessor,p$x as getClipAndStyleCode,f$H as getClippingFunction,c$y as getComponentReader,i$c as getElement,k$_ as getEmissiveTextureAtlasColor,Z$11 as getEnvironmentColor,a$13 as getExtensionFromUri,f$Q as getFilenameFromUri,w$X as getFusionModePosition,d$14 as getImagePixels,a$F as getMagic,mo$2 as getNormalEC,z$Y as getNormalMatrix,A$1a as getPBRParamFromTexture,R$C as getPreciseArea,a$K as getStringFromTypedArray,y$V as getTextureColorDecl,Et$c as getTimestamp,E$19 as getUVMatrixDecl,P$11 as getVertexByFlatten,j$19 as getVolumeValue,g$17 as globeAnalysis,D$$ as globeOcean,T$O as graphemesplitter,i$E as hasExtension,a$B as heightReferenceOnEntityPropertyChanged,e$1U as hemisphereLightDecl,_0x4a4fab as html2canvas,i$Q as isBitSet,i$1a as isBlobUri,i$19 as isCrossOriginUrl,e$26 as isDataUri,i$1c as isLeapYear,n$W as joinUrls,q$C as jsep,O$D as kdbush,ce$1 as knockout,ce$1 as knockout_3_5_1,t$5 as knockout_es5,p$11 as lightSourceImpl,_0x11ec06 as line_style_layer,a$11 as loadAndExecuteScript,o$10 as loadArrayBuffer,l$O as loadBlob,a$P as loadCRN,h$U as loadCRNForS3M,d$q as loadCubeMap,B$M as loadDXTZ,t$S as loadImage,w$R as loadImageFromTypedArray,c$F as loadImageViaBlob,u$P as loadJson,_0x386520 as loadJson2,d$V as loadJsonp,k$W as loadKTX,f$U as loadKTX2,u$Q as loadText,_0x2d198d as loadText2,f$1 as loadView,p$$ as loadWithXhr,_0x545b8d as loadWithXhr2,d$1f as loadXML,s$7 as long,F$T as measureText,m$I as mergeSort,s$12 as mersenne_twister,V$1 as meshopt_decoder_module,S$W as modernizeShader,R$v as moveTechniqueRenderStates,R$u as moveTechniquesToExtension,k$6 as netcdf,r$B as numberOfComponentsForType,m$1d as objectToQuery,e$22 as oneTimeWarning,O$u as parseGlb,n$19 as parseResponseHeaders,h$V as pbf,c$D as pointInsideTriangle,m$10 as pointLightDecl,W$V as potpack,C$17 as preClipFS,ue$l as processModelMaterialsCommon,he$h as processPbrMaterials,k$D as proj4_src,f$7 as protobuf,R$B as protobuf_minimal,je$d as purify,m$1c as queryToObject,s$K as quickselect,o$1a as rainDecl,B$B as rbush,T$B as readAccessorPacked,s$y as removeExtensionsRequired,d$N as removeExtensionsUsed,f$F as removePipelineExtras,d$L as removeUnusedElements,h$12 as renderNormal,S$V as renderNormalAndDepth,U$12 as renderPrePass,p$H as requestAnimationFrame,B$_ as s3mComputeVaryings,y$C as sampleTerrain,y$B as sampleTerrainMostDetailed,P$1d as scaleToGeodeticSurface,F$13 as setAlphaByWValue,Y$Q as shaderModelBase,a$X as shadowReceive,n$10 as shadowVisibility,Q$12 as sketchMode,r$15 as snowDecl,W$11 as splitClip,t$Y as spotLightDecl,$$15 as sprintf,u$O as subdivideArray,c$5 as subscribeAndEvaluate,t$4 as supermap3D_openlayer_4_6_5,o$O as throttleRequestByServer,ke$7 as topojson,_0x5f4c81 as unzip,T$A as updateAccessorComponentTypes,re$s as updateVersion,$$_ as vertexLogDepthDecl,s as viewerCesium3DTilesInspectorMixin,c as viewerCesiumInspectorMixin,$$1 as viewerDragDropMixin,m as viewerPerformanceWatchdogMixin,t$w as webGLConstantToGlslType,l$I as websocketScheduler,o$1l as when,e$P as wrapFunction,L$19 as writeFragDepth,oo$1 as writeLogDepthDecl,x$W as writeTextToCanvas,he$a as zip}; diff --git a/SuperMap iEarth/public/SuperMap3D/SuperMap3D.js b/SuperMap iEarth/public/SuperMap3D/SuperMap3D.js index ee9b3dd7..b50a1908 100644 --- a/SuperMap iEarth/public/SuperMap3D/SuperMap3D.js +++ b/SuperMap iEarth/public/SuperMap3D/SuperMap3D.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SuperMap3D={})}(this,(function(exports){"use strict";var factory;function e$2b(e){return null!=e}function t$16(e){var t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}factory=function(){var e,t;e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(void 0,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();var n=1,r=function(e,t){var i=t.pixelRatio,n=t.version,r=t.stretchX,o=t.stretchY,a=t.content;this.paddedRect=e,this.pixelRatio=i,this.stretchX=r,this.stretchY=o,this.content=a,this.version=n},o={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};o.tl.get=function(){return[this.paddedRect.x+n,this.paddedRect.y+n]},o.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-n,this.paddedRect.y+this.paddedRect.h-n]},o.tlbr.get=function(){return this.tl.concat(this.br)},o.displaySize.get=function(){return[(this.paddedRect.w-2*n)/this.pixelRatio,(this.paddedRect.h-2*n)/this.pixelRatio]},Object.defineProperties(r.prototype,o);var a,s=(a=!0,function(e,t){var i=a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return a=!1,i}),l=s(void 0,(function(){return l.toString().search("(((.+)+)+)+$").toString().constructor(l).search("(((.+)+)+)+$")}));l();var u=function(e,t){c(this,e,4,t)};function c(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function h(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=c({},{width:n,height:r},i);d(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function d(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)return console.log("out of range source coordinates for image copy"),t;if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)return console.log("out of range destination coordinates for image copy"),t;for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}function f(e){for(var t=0,i=0,n=0,r=e;n<r.length;n+=1){var o=r[n];t+=o.w*o.h,i=Math.max(i,o.w)}e.sort((function(e,t){return t.h-e.h}));for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}],s=0,l=0,u=0,c=e;u<c.length;u+=1)for(var h=c[u],d=a.length-1;d>=0;d--){var f=a[d];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var p=a.pop();d<a.length&&(a[d]=p)}else h.h===f.h?(f.x+=h.w,f.w-=h.w):h.w===f.w?(f.y+=h.h,f.h-=h.h):(a.push({x:f.x+h.w,y:f.y,w:f.w-h.w,h:h.h}),f.y+=h.h,f.h-=h.h);break}}return{w:s,h:l,fill:t/(s*l)||0}}u.prototype.resize=function(e){h(this,e,4)},u.prototype.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},u.prototype.clone=function(){return new u({width:this.width,height:this.height},new Uint8Array(this.data))},u.copy=function(e,t,i,n,r){d(e,t,i,n,r,4)};var p,_=(p=!0,function(e,t){var i=p?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return p=!1,i}),m=_(void 0,(function(){return m.toString().search("(((.+)+)+)+$").toString().constructor(m).search("(((.+)+)+)+$")}));m();var g=1,x=function(e,t){var i={},n={};this.haveRenderCallbacks=[];var r=[];this.addImages(e,i,r),this.addImages(t,n,r);var o=f(r),a=o.w,s=o.h,l=new u({width:a||1,height:s||1});for(var c in e){var h=e[c],d=i[c].paddedRect;u.copy(h.data,l,{x:0,y:0},{x:d.x+g,y:d.y+g},h.data)}for(var p in t){var _=t[p],m=n[p].paddedRect,x=m.x+g,v=m.y+g,y=_.data.width,$=_.data.height;u.copy(_.data,l,{x:0,y:0},{x:x,y:v},_.data),u.copy(_.data,l,{x:0,y:$-1},{x:x,y:v-1},{width:y,height:1}),u.copy(_.data,l,{x:0,y:0},{x:x,y:v+$},{width:y,height:1}),u.copy(_.data,l,{x:y-1,y:0},{x:x-1,y:v},{width:1,height:$}),u.copy(_.data,l,{x:0,y:0},{x:x+y,y:v},{width:1,height:$})}this.image=l,this.iconPositions=i,this.patternPositions=n};x.prototype.addImages=function(e,t,i){for(var n in e){var o=e[n],a={x:0,y:0,w:o.data.width+2*g,h:o.data.height+2*g};i.push(a),t[n]=new r(a,o),o.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},x.prototype.patchUpdatedImages=function(e,t){for(var i in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[i],e.getImage(i),t),this.patchUpdatedImage(this.patternPositions[i],e.getImage(i),t)},x.prototype.patchUpdatedImage=function(e,t,i){if(e&&t&&e.version!==t.version){e.version=t.version;var n=e.tl,r=n[0],o=n[1];i.update(t.data,void 0,{x:r,y:o})}};var v,y=(v=!0,function(e,t){var i=v?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return v=!1,i}),$=y(void 0,(function(){return $.toString().search("(((.+)+)+)+$").toString().constructor($).search("(((.+)+)+)+$")}));$();var b={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function T(e){return(e=Math.round(e))<0?0:e>255?255:e}function C(e){return e<0?0:e>1?1:e}function S(e){return"%"===e[e.length-1]?T(parseFloat(e)/100*255):T(parseInt(e))}function w(e){return"%"===e[e.length-1]?C(parseFloat(e)/100):C(parseFloat(e))}function E(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function P(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in b)return b[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===i.length){var o=i.substr(0,n),a=i.substr(n+1,r-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=w(a.pop());case"rgb":return 3!==a.length?null:[S(a[0]),S(a[1]),S(a[2]),s];case"hsla":if(4!==a.length)return null;s=w(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=w(a[1]),c=w(a[2]),h=c<=.5?c*(u+1):c+u-c*u,d=2*c-h;return[T(255*E(d,h,l+1/3)),T(255*E(d,h,l)),T(255*E(d,h,l-1/3)),s];default:return null}}return null}const A=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),L=A(void 0,(function(){return L.toString().search("(((.+)+)+)+$").toString().constructor(L).search("(((.+)+)+)+$")}));L();class M{constructor(e,t,i,n=1){this.r=e,this.g=t,this.b=i,this.a=n}static parse(e){if(!e)return;if(e instanceof M)return e;if("string"!=typeof e)return;const t=P(e);return t?new M(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,i,n]=this.toArray();return"rgba("+Math.round(e)+","+Math.round(t)+","+Math.round(i)+","+n+")"}toArray(){const{r:e,g:t,b:i,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*i/n,n]}}M.black=new M(0,0,0,1),M.white=new M(1,1,1,1),M.transparent=new M(0,0,0,0),M.red=new M(1,0,0,1);var R={kind:"null"},O={kind:"number"},I={kind:"string"},D={kind:"boolean"},B={kind:"color"},N={kind:"object"},F={kind:"value"},U={kind:"formatted"},G={kind:"resolvedImage"};function z(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));return r(),{kind:"array",itemType:e,N:t}}function V(e){if("array"===e.kind){var t=V(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var k=[R,O,I,D,B,U,N,z(F),G];function W(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!W(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var i=0,n=k;i<n.length;i+=1)if(!W(n[i],t))return null}return"Expected "+V(e)+" but found "+V(t)+" instead."}var H,q=(H=!0,function(e,t){var i=H?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return H=!1,i}),j=q(void 0,(function(){return j.toString().search("(((.+)+)+)+$").toString().constructor(j).search("(((.+)+)+)+$")}));j();var Y=function(e,t,i){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Y.prototype.compare=function(e,t){return this.collator.compare(e,t)},Y.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var X,K=(X=!0,function(e,t){var i=X?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return X=!1,i}),Q=K(void 0,(function(){return Q.toString().search("(((.+)+)+)+$").toString().constructor(Q).search("(((.+)+)+)+$")}));Q();var Z,J=function(e,t,i,n,r){this.text=e,this.image=t,this.scale=i,this.fontStack=n,this.textColor=r},ee=(Z=!0,function(e,t){var i=Z?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Z=!1,i}),te=ee(void 0,(function(){return te.toString().search("(((.+)+)+)+$").toString().constructor(te).search("(((.+)+)+)+$")}));te();var ie=function(e){this.sections=e};ie.fromString=function(e){return new ie([new J(e,null,null,null,null)])},ie.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},ie.factory=function(e){return e instanceof ie?e:ie.fromString(e)},ie.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},ie.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];if(n.image)e.push(["image",n.image.name]);else{e.push(n.text);var r={};n.fontStack&&(r["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(r["font-scale"]=n.scale),n.textColor&&(r["text-color"]=["rgba"].concat(n.textColor.toArray())),e.push(r)}}return e};var ne,re=(ne=!0,function(e,t){var i=ne?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ne=!1,i}),oe=re(void 0,(function(){return oe.toString().search("(((.+)+)+)+$").toString().constructor(oe).search("(((.+)+)+)+$")}));oe();var ae=function(e){this.name=e.name,this.available=e.available};ae.prototype.toString=function(){return this.name},ae.fromString=function(e){return new ae({name:e,available:!1})},ae.prototype.serialize=function(){return["image",this.name]};var se,le=(se=!0,function(e,t){var i=se?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return se=!1,i}),ue=le(void 0,(function(){return ue.toString().search("(((.+)+)+)+$").toString().constructor(ue).search("(((.+)+)+)+$")}));ue();var ce={kind:"null"},he={kind:"number"},de={kind:"string"},fe={kind:"boolean"},pe={kind:"color"},_e={kind:"object"},me={kind:"value"},ge={kind:"collator"},xe={kind:"formatted"},ve={kind:"resolvedImage"};function ye(e,t){return{kind:"array",itemType:e,N:t}}function $e(){}$e.validateRGBA=function(e,t,i,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,i,n]:[e,t,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."},$e.isValue=function(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof M)return!0;if(e instanceof Y)return!0;if(e instanceof ie)return!0;if(e instanceof ae)return!0;if(Array.isArray(e)){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(!$e.isValue(n))return!1}return!0}if("object"==typeof e){for(var r in e)if(!$e.isValue(e[r]))return!1;return!0}return!1},$e.typeOf=function(e){if(null===e)return ce;if("string"==typeof e)return de;if("boolean"==typeof e)return fe;if("number"==typeof e)return he;if(e instanceof M)return pe;if(e instanceof Y)return ge;if(e instanceof ie)return xe;if(e instanceof ae)return ve;if(Array.isArray(e)){for(var t,i=e.length,n=0,r=e;n<r.length;n+=1){var o=r[n],a=$e.typeOf(o);if(t){if(t===a)continue;t=me;break}t=a}return ye(t||me,i)}return _e},$e.toString$1=function(e){var t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof M||e instanceof ie||e instanceof ae?e.toString():JSON.stringify(e)};var be,Te=(be=!0,function(e,t){var i=be?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return be=!1,i}),Ce=Te(void 0,(function(){return Ce.toString().search("(((.+)+)+)+$").toString().constructor(Ce).search("(((.+)+)+)+$")}));Ce();var Se={kind:"number"},we={kind:"string"},Ee={kind:"boolean"},Pe={kind:"object"},Ae={kind:"value"};function Le(e,t){return{kind:"array",itemType:e,N:t}}var Me={string:we,number:Se,boolean:Ee,object:Pe},Re=function(e,t){this.type=e,this.args=t};Re.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i,n=1,r=e[0];if("array"===r){var o,a;if(e.length>2){var s=e[1];if("string"!=typeof s||!(s in Me)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=Me[s],n++}else o=Ae;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}i=Le(o,a)}else i=Me[r];for(var l=[];n<e.length;n++){var u=t.parse(e[n],n,Ae);if(!u)return null;l.push(u)}return new Re(i,l)},Re.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var i=this.args[t].evaluate(e);if(!W(this.type,$e.typeOf(i)))return i;if(t===this.args.length-1)throw new RuntimeError("Expected value to be of type "+toString(this.type)+", but found "+toString($e.typeOf(i))+" instead.")}return null},Re.prototype.eachChild=function(e){this.args.forEach(e)},Re.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},Re.prototype.serialize=function(){var e=this.type,t=[e.kind];if("array"===e.kind){var i=e.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){t.push(i.kind);var n=e.N;("number"==typeof n||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var Oe,Ie=(Oe=!0,function(e,t){var i=Oe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Oe=!1,i}),De=Ie(void 0,(function(){return De.toString().search("(((.+)+)+)+$").toString().constructor(De).search("(((.+)+)+)+$")}));De();var Be={kind:"number"},Ne={kind:"value"};function Fe(e,t){return{kind:"array",itemType:e,N:t}}var Ue=function(e,t,i){this.type=e,this.index=t,this.input=i};Ue.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,Be),n=t.parse(e[2],2,Fe(t.expectedType||Ne));if(!i||!n)return null;var r=n.type;return new Ue(r.itemType,i,n)},Ue.prototype.evaluate=function(e){var t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new RuntimeError("Array index out of bounds: "+t+" < 0.");if(t>=i.length)throw new RuntimeError("Array index out of bounds: "+t+" > "+(i.length-1)+".");if(t!==Math.floor(t))throw new RuntimeError("Array index must be an integer, but found "+t+" instead.");return i[t]},Ue.prototype.eachChild=function(e){e(this.index),e(this.input)},Ue.prototype.possibleOutputs=function(){return[void 0]},Ue.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Ge,ze=(Ge=!0,function(e,t){var i=Ge?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ge=!1,i}),Ve=ze(void 0,(function(){return Ve.toString().search("(((.+)+)+)+$").toString().constructor(Ve).search("(((.+)+)+)+$")}));Ve();var ke={kind:"boolean"},We=function(e,t,i){this.type=e,this.branches=t,this.otherwise=i};We.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var i;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(var n=[],r=1;r<e.length-1;r+=2){var o=t.parse(e[r],r,ke);if(!o)return null;var a=t.parse(e[r+1],r+1,i);if(!a)return null;n.push([o,a]),i=i||a.type}var s=t.parse(e[e.length-1],e.length-1,i);return s?new We(i,n,s):null},We.prototype.evaluate=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];if(r.evaluate(e))return o.evaluate(e)}return this.otherwise.evaluate(e)},We.prototype.eachChild=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e(r),e(o)}e(this.otherwise)},We.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.branches.map((function(e){return e[0],e[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},We.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var He,qe=(He=!0,function(e,t){var i=He?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return He=!1,i}),je=qe(void 0,(function(){return je.toString().search("(((.+)+)+)+$").toString().constructor(je).search("(((.+)+)+)+$")}));je();var Ye={kind:"value"},Xe=function(e,t){this.type=e,this.args=t};Xe.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var i=null,n=t.expectedType;n&&"value"!==n.kind&&(i=n);for(var r=[],o=0,a=e.slice(1);o<a.length;o+=1){var s=a[o],l=t.parse(s,1+r.length,i,void 0,{typeAnnotation:"omit"});if(!l)return null;i=i||l.type,r.push(l)}var u=n&&r.some((function(e){return W(n,e.type)}));return new Xe(u?Ye:i,r)},Xe.prototype.evaluate=function(e){for(var t,i=null,n=0,r=0,o=this.args;r<o.length&&(n++,(i=o[r].evaluate(e))&&i instanceof ae&&!i.available&&(!t&&(t=i.name),i=null,n===this.args.length&&(i=t)),null===i);r+=1);return i},Xe.prototype.eachChild=function(e){this.args.forEach(e)},Xe.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},Xe.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Ke,Qe=(Ke=!0,function(e,t){var i=Ke?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ke=!1,i}),Ze=Qe(void 0,(function(){return Ze.toString().search("(((.+)+)+)+$").toString().constructor(Ze).search("(((.+)+)+)+$")}));Ze();var Je={kind:"number"},et={kind:"string"},tt={kind:"boolean"},it={kind:"color"},nt={kind:"value"},rt={"to-boolean":tt,"to-color":it,"to-number":Je,"to-string":et},ot=function(e,t){this.type=e,this.args=t};ot.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[0];if(("to-boolean"===i||"to-string"===i)&&2!==e.length)return t.error("Expected one argument.");for(var n=rt[i],r=[],o=1;o<e.length;o++){var a=t.parse(e[o],o,nt);if(!a)return null;r.push(a)}return new ot(n,r)},ot.prototype.evaluate=function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){for(var t,i,n=0,r=this.args;n<r.length;n+=1){if(i=null,(t=r[n].evaluate(e))instanceof M)return t;if("string"==typeof t){var o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&!(i=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":validateRGBA(t[0],t[1],t[2],t[3])))return new M(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new RuntimeError(i||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null===(a=l[s].evaluate(e)))return 0;var u=Number(a);if(!isNaN(u))return u}throw new RuntimeError("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?Formatted.fromString($e.toString$1(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?ae.fromString($e.toString$1(this.args[0].evaluate(e))):$e.toString$1(this.args[0].evaluate(e))},ot.prototype.eachChild=function(e){this.args.forEach(e)},ot.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},ot.prototype.serialize=function(){if("formatted"===this.type.kind)return new FormatExpression([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ImageExpression(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var at,st=(at=!0,function(e,t){var i=at?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return at=!1,i}),lt=st(void 0,(function(){return lt.toString().search("(((.+)+)+)+$").toString().constructor(lt).search("(((.+)+)+)+$")}));lt();var ut={kind:"string"},ct={kind:"boolean"},ht={kind:"collator"},dt=function(e,t,i){this.type=ht,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=t};dt.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var i=e[1];if("object"!=typeof i||Array.isArray(i))return t.error("Collator options argument must be an object.");var n=t.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,ct);if(!n)return null;var r=t.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,ct);if(!r)return null;var o=null;return i.locale&&!(o=t.parse(i.locale,1,ut))?null:new dt(n,r,o)},dt.prototype.evaluate=function(e){return new Y(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},dt.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},dt.prototype.possibleOutputs=function(){return[void 0]},dt.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var ft={kind:"boolean"},pt={kind:"value"},_t={kind:"collator"};function mt(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function gt(e,t,i){return t===i}function xt(e,t,i){return t!==i}function vt(e,t,i){return t<i}function yt(e,t,i){return t>i}function $t(e,t,i){return t<=i}function bt(e,t,i){return t>=i}function Tt(e,t,i,n){return 0===n.compare(t,i)}function Ct(e,t,i,n){return!Tt(0,t,i,n)}function St(e,t,i,n){return n.compare(t,i)<0}function wt(e,t,i,n){return n.compare(t,i)>0}function Et(e,t,i,n){return n.compare(t,i)<=0}function Pt(e,t,i,n){return n.compare(t,i)>=0}function At(e,t,i){var n,r=(n=!0,function(e,t){var i=n?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}),o="=="!==e&&"!="!==e;return function(){var n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function a(e,t,i){this.type=ft,this.lhs=e,this.rhs=t,this.collator=i,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return n(),a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var i=e[0],n=t.parse(e[1],1,pt);if(!n)return null;if(!mt(i,n.type))return t.concat(1).error('"'+i+"\" comparisons are not supported for type '"+toString(n.type)+"'.");var r=t.parse(e[2],2,pt);if(!r)return null;if(!mt(i,r.type))return t.concat(2).error('"'+i+"\" comparisons are not supported for type '"+toString(r.type)+"'.");if(n.type.kind!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot compare types '"+toString(n.type)+"' and '"+toString(r.type)+"'.");o&&("value"===n.type.kind&&"value"!==r.type.kind?n=new Re(r.type,[n]):"value"!==n.type.kind&&"value"===r.type.kind&&(r=new Re(n.type,[r])));var s=null;if(4===e.length){if("string"!==n.type.kind&&"string"!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,_t)))return null}return new a(n,r,s)},a.prototype.evaluate=function(n){var r=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(o&&this.hasUntypedArgument){var s=$e.typeOf(r),l=$e.typeOf(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new RuntimeError('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!o&&this.hasUntypedArgument){var u=$e.typeOf(r),c=$e.typeOf(a);if("string"!==u.kind||"string"!==c.kind)return t(n,r,a)}return this.collator?i(n,r,a,this.collator.evaluate(n)):t(n,r,a)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.possibleOutputs=function(){return[!0,!1]},a.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},a}()}var Lt={};Lt.Equals=At("==",gt,Tt),Lt.NotEquals=At("!=",xt,Ct),Lt.LessThan=At("<",vt,St),Lt.GreaterThan=At(">",yt,wt),Lt.LessThanOrEqual=At("<=",$t,Et),Lt.GreaterThanOrEqual=At(">=",bt,Pt);var Mt,Rt=(Mt=!0,function(e,t){var i=Mt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Mt=!1,i}),Ot=Rt(void 0,(function(){return Ot.toString().search("(((.+)+)+)+$").toString().constructor(Ot).search("(((.+)+)+)+$")}));Ot();var It={kind:"number"},Dt={kind:"string"},Bt={kind:"color"},Nt={kind:"value"},Ft={kind:"formatted"},Ut={kind:"resolvedImage"};function Gt(e,t){return{kind:"array",itemType:e,N:t}}var zt=function(e){this.type=Ft,this.sections=e};zt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[1];if(!Array.isArray(i)&&"object"==typeof i)return t.error("First argument must be an image or text section.");for(var n=[],r=!1,o=1;o<=e.length-1;++o){var a=e[o];if(r&&"object"==typeof a&&!Array.isArray(a)){r=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,It)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,Gt(Dt))))return null;var u=null;if(a["text-color"]&&!(u=t.parse(a["text-color"],1,Bt)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var h=t.parse(e[o],1,Nt);if(!h)return null;var d=h.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new zt(n)},zt.prototype.evaluate=function(e){return new ie(this.sections.map((function(t){var i=t.content.evaluate(e);return $e.typeOf(i)===Ut?new J("",i,null,null,null):new J($e.toString$1(i),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},zt.prototype.eachChild=function(e){for(var t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e(n.content),n.scale&&e(n.scale),n.font&&e(n.font),n.textColor&&e(n.textColor)}},zt.prototype.possibleOutputs=function(){return[void 0]},zt.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e.push(n.content.serialize());var r={};n.scale&&(r["font-scale"]=n.scale.serialize()),n.font&&(r["text-font"]=n.font.serialize()),n.textColor&&(r["text-color"]=n.textColor.serialize()),e.push(r)}return e};var Vt,kt=(Vt=!0,function(e,t){var i=Vt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Vt=!1,i}),Wt=kt(void 0,(function(){return Wt.toString().search("(((.+)+)+)+$").toString().constructor(Wt).search("(((.+)+)+)+$")}));Wt();var Ht={kind:"string"},qt={kind:"resolvedImage"},jt=function(e){this.type=qt,this.input=e};jt.parse=function(e,t){if(2!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,Ht);return i?new jt(i):t.error("No image name provided.")},jt.prototype.evaluate=function(e){var t=this.input.evaluate(e),i=!1;return e.availableImages&&e.availableImages.indexOf(t)>-1&&(i=!0),new ae({name:t,available:i})},jt.prototype.eachChild=function(e){e(this.input)},jt.prototype.possibleOutputs=function(){return[void 0]},jt.prototype.serialize=function(){return["image",this.input.serialize()]};var Yt,Xt=(Yt=!0,function(e,t){var i=Yt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Yt=!1,i}),Kt=Xt(void 0,(function(){return Kt.toString().search("(((.+)+)+)+$").toString().constructor(Kt).search("(((.+)+)+)+$")}));Kt();var Qt=function(e,t,i,n,r){this.type=e,this.operator=t,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=r;o<a.length;o+=1){var s=a[o],l=s[0],u=s[1];this.labels.push(l),this.outputs.push(u)}},Zt={kind:"number"},Jt={kind:"color"};function ei(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}Qt.interpolationFactor=function(e,t,i,n){var r=0;if("exponential"===e.name)r=ei(t,e.base,i,n);else if("linear"===e.name)r=ei(t,1,i,n);else if("cubic-bezier"===e.name){var o=e.controlPoints;r=new unitbezier(o[0],o[1],o[2],o[3]).solve(ei(t,1,i,n))}return r},Qt.parse=function(e,t){var i=e[0],n=e[1],r=e[2],o=e.slice(3);if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var a=n[1];if("number"!=typeof a)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:a}}else{if("cubic-bezier"!==n[0])return t.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some((function(e){return"number"!=typeof e||e<0||e>1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(r=t.parse(r,2,Zt)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=Jt:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c<o.length;c+=2){var h=o[c],d=o[c+1],f=c+3,p=c+4;if("number"!=typeof h)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var _=t.parse(d,p,u);if(!_)return null;u=u||_.type,l.push([h,_])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new Qt(u,i,n,r,l):t.error("Type "+toString(u)+" is not interpolatable.")},Qt.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;if(n>=t[r-1])return i[r-1].evaluate(e);var o=findStopLessThanOrEqualTo(t,n),a=t[o],s=t[o+1],l=Qt.interpolationFactor(this.interpolation,n,a,s),u=i[o].evaluate(e),c=i[o+1].evaluate(e);return"interpolate"===this.operator?interpolate[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?hcl.reverse(hcl.interpolate(hcl.forward(u),hcl.forward(c),l)):lab.reverse(lab.interpolate(lab.forward(u),lab.forward(c),l))},Qt.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1)e(i[t])},Qt.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},Qt.prototype.serialize=function(){var e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],i=0;i<this.labels.length;i++)t.push(this.labels[i],this.outputs[i].serialize());return t};var ti,ii=(ti=!0,function(e,t){var i=ti?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ti=!1,i}),ni=ii(void 0,(function(){return ni.toString().search("(((.+)+)+)+$").toString().constructor(ni).search("(((.+)+)+)+$")}));ni();var ri={kind:"boolean"},oi={kind:"value"};function ai(e){return"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind}function si(e){return"boolean"==typeof e||"string"==typeof e||"number"==typeof e}function li(e){return Array.isArray(e)||"string"==typeof e}var ui=function(e,t){this.type=ri,this.needle=e,this.haystack=t};ui.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,oi),n=t.parse(e[2],2,oi);return i&&n?ai(i.type)?new ui(i,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+toString(i.type)+" instead"):null},ui.prototype.evaluate=function(e){var t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!t||!i)return!1;if(!si(t))throw new RuntimeError("Expected first argument to be of type boolean, string or number, but found "+toString(typeOf(t))+" instead.");if(!li(i))throw new RuntimeError("Expected second argument to be of type array or string, but found "+toString(typeOf(i))+" instead.");return i.indexOf(t)>=0},ui.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},ui.prototype.possibleOutputs=function(){return[!0,!1]},ui.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var ci,hi=(ci=!0,function(e,t){var i=ci?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ci=!1,i}),di=hi(void 0,(function(){return di.toString().search("(((.+)+)+)+$").toString().constructor(di).search("(((.+)+)+)+$")}));di();var fi=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};fi.prototype.evaluate=function(e){return this.result.evaluate(e)},fi.prototype.eachChild=function(e){for(var t=0,i=this.bindings;t<i.length;t+=1)e(i[t][1]);e(this.result)},fi.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var i=[],n=1;n<e.length-1;n+=2){var r=e[n];if("string"!=typeof r)return t.error("Expected string, but found "+typeof r+" instead.",n);if(/[^a-zA-Z0-9_]/.test(r))return t.error("Variable names must contain only alphanumeric characters or '_'.",n);var o=t.parse(e[n+1],n+1);if(!o)return null;i.push([r,o])}var a=t.parse(e[e.length-1],e.length-1,t.expectedType,i);return a?new fi(i,a):null},fi.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},fi.prototype.serialize=function(){for(var e=["let"],t=0,i=this.bindings;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e.push(r,o.serialize())}return e.push(this.result.serialize()),e};var pi,_i=(pi=!0,function(e,t){var i=pi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return pi=!1,i}),mi=_i(void 0,(function(){return mi.toString().search("(((.+)+)+)+$").toString().constructor(mi).search("(((.+)+)+)+$")}));mi();var gi={kind:"number"},xi=function(e){this.type=gi,this.input=e};xi.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?t.error("Expected argument of type string or array, but found "+toString(i.type)+" instead."):new xi(i):null},xi.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new RuntimeError("Expected value to be of type string or array, but found "+toString(typeOf(t))+" instead.")},xi.prototype.eachChild=function(e){e(this.input)},xi.prototype.possibleOutputs=function(){return[void 0]},xi.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var vi,yi=(vi=!0,function(e,t){var i=vi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return vi=!1,i}),$i=yi(void 0,(function(){return $i.toString().search("(((.+)+)+)+$").toString().constructor($i).search("(((.+)+)+)+$")}));$i();var bi=function(e,t){this.type=e,this.value=t};bi.parse=function(e,t){if(2!==e.length)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!$e.isValue(e[1]))return t.error("invalid value");var i=e[1],n=$e.typeOf(i),r=t.expectedType;return"array"===n.kind&&0===n.N&&r&&"array"===r.kind&&("number"!=typeof r.N||0===r.N)&&(n=r),new bi(n,i)},bi.prototype.evaluate=function(){return this.value},bi.prototype.eachChild=function(){},bi.prototype.possibleOutputs=function(){return[this.value]},bi.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Color?["rgba"].concat(this.value.toArray()):this.value instanceof ie?this.value.serialize():this.value};var Ti,Ci=(Ti=!0,function(e,t){var i=Ti?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ti=!1,i}),Si=Ci(void 0,(function(){return Si.toString().search("(((.+)+)+)+$").toString().constructor(Si).search("(((.+)+)+)+$")}));Si();var wi={kind:"value"},Ei=function(e,t,i,n,r,o){this.inputType=e,this.type=t,this.input=i,this.cases=n,this.outputs=r,this.otherwise=o};Ei.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var i,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var r={},o=[],a=2;a<e.length-1;a+=2){var s=e[a],l=e[a+1];!Array.isArray(s)&&(s=[s]);var u=t.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,h=s;c<h.length;c+=1){var d=h[c];if("number"!=typeof d&&"string"!=typeof d)return u.error("Branch labels must be numbers or strings.");if("number"==typeof d&&Math.abs(d)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,$e.typeOf(d)))return null}else i=$e.typeOf(d);if(void 0!==r[String(d)])return u.error("Branch labels must be unique.");r[String(d)]=o.length}var f=t.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var p=t.parse(e[1],1,wi);if(!p)return null;var _=t.parse(e[e.length-1],e.length-1,n);return _?"value"!==p.type.kind&&t.concat(1).checkSubtype(i,p.type)?null:new Ei(i,n,p,r,o,_):null},Ei.prototype.evaluate=function(e){var t=this.input.evaluate(e);return($e.typeOf(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},Ei.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},Ei.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},Ei.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],i=[],n={},r=0,o=Object.keys(this.cases).sort();r<o.length;r+=1){var a=o[r];void 0===(h=n[this.cases[a]])?(n[this.cases[a]]=i.length,i.push([this.cases[a],[a]])):i[h][1].push(a)}for(var s=function(t){return"number"===e.inputType.kind?Number(t):t},l=0,u=i;l<u.length;l+=1){var c=u[l],h=c[0],d=c[1];1===d.length?t.push(s(d[0])):t.push(d.map(s)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var Pi,Ai=(Pi=!0,function(e,t){var i=Pi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Pi=!1,i}),Li=Ai(void 0,(function(){return Li.toString().search("(((.+)+)+)+$").toString().constructor(Li).search("(((.+)+)+)+$")}));Li();var Mi={kind:"number"},Ri={kind:"string"},Oi=function(e,t,i,n,r){this.type=Ri,this.number=e,this.locale=t,this.currency=i,this.minFractionDigits=n,this.maxFractionDigits=r};Oi.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,Mi);if(!i)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var r=null;if(n.locale&&!(r=t.parse(n.locale,1,Ri)))return null;var o=null;if(n.currency&&!(o=t.parse(n.currency,1,Ri)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=t.parse(n["min-fraction-digits"],1,Mi)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,Mi))?null:new Oi(i,r,o,a,s)},Oi.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},Oi.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},Oi.prototype.possibleOutputs=function(){return[void 0]},Oi.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Ii,Di=(Ii=!0,function(e,t){var i=Ii?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ii=!1,i}),Bi=Di(void 0,(function(){return Bi.toString().search("(((.+)+)+)+$").toString().constructor(Bi).search("(((.+)+)+)+$")}));function Ni(e,t){for(var i,n,r=e.length-1,o=0,a=r,s=0;o<=a;)if(i=e[s=Math.floor((o+a)/2)],n=e[s+1],i<=t){if(s===r||t<n)return s;o=s+1}else{if(!(i>t))throw new RuntimeError("Input is not a number.");a=s-1}return 0}Bi();var Fi,Ui=(Fi=!0,function(e,t){var i=Fi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Fi=!1,i}),Gi=Ui(void 0,(function(){return Gi.toString().search("(((.+)+)+)+$").toString().constructor(Gi).search("(((.+)+)+)+$")}));Gi();var zi={kind:"number"},Vi=function(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,r=i;n<r.length;n+=1){var o=r[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};Vi.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var i=t.parse(e[1],1,zi);if(!i)return null;var n=[],r=null;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var o=1;o<e.length;o+=2){var a=1===o?-1/0:e[o],s=e[o+1],l=o,u=o+1;if("number"!=typeof a)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,r);if(!c)return null;r=r||c.type,n.push([a,c])}return new Vi(r,i,n)},Vi.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;return n>=t[r-1]?i[r-1].evaluate(e):i[Ni(t,n)].evaluate(e)},Vi.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1)e(i[t])},Vi.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},Vi.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var ki,Wi=(ki=!0,function(e,t){var i=ki?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ki=!1,i}),Hi=Wi(void 0,(function(){return Hi.toString().search("(((.+)+)+)+$").toString().constructor(Hi).search("(((.+)+)+)+$")}));Hi();var qi=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};qi.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var i=e[1];return t.scope.has(i)?new qi(i,t.scope.get(i)):t.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},qi.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},qi.prototype.eachChild=function(){},qi.prototype.possibleOutputs=function(){return[void 0]},qi.prototype.serialize=function(){return["var",this.name]};var ji,Yi=(ji=!0,function(e,t){var i=ji?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ji=!1,i}),Xi=Yi(void 0,(function(){return Xi.toString().search("(((.+)+)+)+$").toString().constructor(Xi).search("(((.+)+)+)+$")}));Xi();var Ki,Qi={"==":Lt.Equals,"!=":Lt.NotEquals,">":Lt.GreaterThan,"<":Lt.LessThan,">=":Lt.GreaterThanOrEqual,"<=":Lt.LessThanOrEqual,array:Re,at:Ue,boolean:Re,case:We,coalesce:Xe,collator:dt,format:zt,image:jt,in:ui,interpolate:Qt,"interpolate-hcl":Qt,"interpolate-lab":Qt,length:xi,let:fi,literal:bi,match:Ei,number:Re,"number-format":Oi,object:Re,step:Vi,string:Re,"to-boolean":ot,"to-color":ot,"to-number":ot,"to-string":ot,var:qi},Zi=(Ki=!0,function(e,t){var i=Ki?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ki=!1,i}),Ji=Zi(void 0,(function(){return Ji.toString().search("(((.+)+)+)+$").toString().constructor(Ji).search("(((.+)+)+)+$")}));function en(){}Ji();var tn={};for(var nn in en.register=function(e,t,i){void 0===i&&(i={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),tn[e]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}},en.register("Object",Object),en.register("Color",M),en.register("Error",Error),en.register("ResolvedImage",ae),en.register("ImageAtlas",x),en.register("ImagePosition",r),en.register("RGBAImage",u),en.register("Formatted",ie),en.register("FormattedSection",J),Qi)Qi[nn]._classRegistryKey||en.register("Expression_"+nn,Qi[nn]);function rn(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}en.serialize=function(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(rn(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var i=e;return t&&t.push(i.buffer),i}if(e instanceof ImageData)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var n=[],r=0,o=e;r<o.length;r+=1){var a=o[r];n.push(en.serialize(a,t))}return n}if("object"==typeof e){var s=e.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var u=s.serialize?s.serialize(e,t):{};if(!s.serialize){for(var c in e)if(e.hasOwnProperty(c)&&!(tn[l].omit.indexOf(c)>=0)){var h=e[c];"function"!=typeof h&&(u[c]=tn[l].shallow.indexOf(c)>=0?h:en.serialize(h,t))}e instanceof Error&&(u.message=e.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof e)},en.deserialize=function(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||rn(e)||ArrayBuffer.isView(e)||e instanceof ImageData)return e;if(Array.isArray(e))return e.map(en.deserialize);if("object"==typeof e){var t=e.$name||"Object",i=tn[t].klass;if(!i)throw new Error("can't deserialize unregistered class "+t);if(i.deserialize)return i.deserialize(e);for(var n=Object.create(i.prototype),r=0,o=Object.keys(e);r<o.length;r+=1){var a=o[r];if("$name"!==a){var s=e[a];n[a]=tn[t].shallow.indexOf(a)>=0?s:en.deserialize(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)};var on,an=(on=!0,function(e,t){var i=on?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return on=!1,i}),sn=an(void 0,(function(){return sn.toString().search("(((.+)+)+)+$").toString().constructor(sn).search("(((.+)+)+)+$")}));function ln(e){this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}sn(),ln.prototype.trigger=function(){!this._triggered&&(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))};const un=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),cn=un(void 0,(function(){return cn.toString().search("(((.+)+)+)+$").toString().constructor(cn).search("(((.+)+)+)+$")}));function hn(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function dn(e,t,i){this.target=e,this.parent=t,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},hn(["receive","process"],this),this.invoker=new ln(this.process),this.target.addEventListener("message",this.receive,!1)}cn(),dn.prototype.send=function(e,t,i,n){const r=++dn.taskId;i&&(this.callbacks[r]=i);const o=[];return this.target.postMessage({id:r,type:e,hasCallback:!!i,targetMapId:n,sourceMapId:this.mapId,data:en.serialize(t,o)},o),{cancel:()=>{i&&delete this.callbacks[r],this.target.postMessage({id:r,type:"<cancel>",targetMapId:n,sourceMapId:this.mapId})}}},dn.prototype.receive=function(e){const t=e.data,i=t.id;if(i&&(!t.targetMapId||this.mapId===t.targetMapId))if("<cancel>"===t.type){delete this.tasks[i];const e=this.cancelCallbacks[i];delete this.cancelCallbacks[i],e&&e()}else this.tasks[i]=t,this.taskQueue.push(i),this.invoker.trigger()},dn.prototype.process=function(){if(!this.taskQueue.length)return;const e=this.taskQueue.shift(),t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t)if("<response>"===t.type){const i=this.callbacks[e];delete this.callbacks[e],i&&(t.error?i(en.deserialize(t.error)):i(null,en.deserialize(t.data)))}else{let i=!1;const n=t.hasCallback?(t,n)=>{i=!0,delete this.cancelCallbacks[e];const r=[];this.target.postMessage({id:e,type:"<response>",sourceMapId:this.mapId,error:t?en.serialize(t):null,data:en.serialize(n,r)},r)}:e=>{i=!0};let r=null;const o=en.deserialize(t.data);if(this.parent[t.type])r=this.parent[t.type](t.sourceMapId,o,n);else if(this.parent.getWorkerSource){const e=t.type.split(".");r=this.parent.getWorkerSource(t.sourceMapId,e[0],o.source)[e[1]](o,n)}else n(new Error("Could not find function "+t.type));!i&&r&&r.cancel&&(this.cancelCallbacks[e]=r.cancel)}},dn.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},dn.taskId=0;var fn,pn=(fn=!0,function(e,t){var i=fn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return fn=!1,i}),_n=pn(void 0,(function(){return _n.toString().search("(((.+)+)+)+$").toString().constructor(_n).search("(((.+)+)+)+$")}));_n();var mn=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var i=0,n=t;i<n.length;i+=1){var r=n[i],o=r[0],a=r[1];this.bindings[o]=a}};mn.prototype.concat=function(e){return new mn(this,e)},mn.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},mn.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var gn,xn=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,i),this.message=i,this.key=t}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r}(Error),vn=(gn=!0,function(e,t){var i=gn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return gn=!1,i}),yn=vn(void 0,(function(){return yn.toString().search("(((.+)+)+)+$").toString().constructor(yn).search("(((.+)+)+)+$")}));yn();var $n=["Unknown","Point","LineString","Polygon"],bn=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null};bn.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},bn.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?$n[this.feature.type]:this.feature.type:null},bn.prototype.properties=function(){return this.feature&&this.feature.properties||{}},bn.prototype.parseColor=function(e){var t=this._parseColorCache[e];return!t&&(t=this._parseColorCache[e]=M.parse(e)),t},en.register("EvaluationContext",bn);var Tn,Cn=(Tn=!0,function(e,t){var i=Tn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Tn=!1,i}),Sn=Cn(void 0,(function(){return Sn.toString().search("(((.+)+)+)+$").toString().constructor(Sn).search("(((.+)+)+)+$")}));function wn(){}Sn(),wn.isFeatureConstant=function(e){if(e instanceof Ln.CompoundExpression){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}var t=!0;return e.eachChild((function(e){t&&!wn.isFeatureConstant(e)&&(t=!1)})),t},wn.isStateConstant=function(e){if(e instanceof Ln.CompoundExpression&&"feature-state"===e.name)return!1;var t=!0;return e.eachChild((function(e){t&&!wn.isStateConstant(e)&&(t=!1)})),t},wn.isGlobalPropertyConstant=function(e,t){if(e instanceof Ln.CompoundExpression&&t.indexOf(e.name)>=0)return!1;var i=!0;return e.eachChild((function(e){i&&!wn.isGlobalPropertyConstant(e,t)&&(i=!1)})),i};var En,Pn=(En=!0,function(e,t){var i=En?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return En=!1,i}),An=Pn(void 0,(function(){return An.toString().search("(((.+)+)+)+$").toString().constructor(An).search("(((.+)+)+)+$")}));An();var Ln=function(e,t,i,n,r){void 0===t&&(t=[]),void 0===n&&(n=new mn),void 0===r&&(r=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=r,this.expectedType=i};function Mn(e,t){const i=t[e];return void 0===i?null:i}Ln.prototype.parse=function(e,t,i,n,r){return void 0===r&&(r={}),t?this.concat(t,i,n)._parse(e,r):this._parse(e,r)},Ln.prototype._parse=function(e,t){function i(e,t,i){return"assert"===i?new Re(t,[e]):"coerce"===i?new ot(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var o=r.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=i(o,a,t.typeAnnotation||"coerce");else o=i(o,a,t.typeAnnotation||"assert")}return!(o instanceof bi)&&o.type.kind,o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},Ln.prototype.concat=function(e,t,i){var n="number"==typeof e?this.path.concat(e):this.path,r=i?this.scope.concat(i):this.scope;return new Ln(this.registry,n,t||null,r,this.errors)},Ln.prototype.error=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new xn(n,e))},Ln.prototype.checkSubtype=function(e,t){var i=W(e,t);return i&&this.error(i),i};var Rn=function(e,t,i,n){this.name=e,this.type=t,this._evaluate=i,this.args=n};function On(e){return Array.isArray(e)?"("+e.map(toString).join(", ")+")":"("+toString(e.type)+"...)"}Rn.prototype.evaluate=function(e,t){return this._evaluate(e,this.args,t)},Rn.prototype.eachChild=function(e){this.args.forEach(e)},Rn.prototype.possibleOutputs=function(){return[void 0]},Rn.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},Rn.parse=function(e,t){var i,n=e[0],r=Rn.definitions[n];if(!r)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=a.filter((function(t){var i=t[0];return!Array.isArray(i)||i.length===e.length-1})),l=null,u=0,c=s;u<c.length;u+=1){var h=c[u],d=h[0],f=h[1];l=new Ln(t.registry,t.path,null,t.scope);for(var p=[],_=!1,m=1;m<e.length;m++){var g=e[m],x=Array.isArray(d)?d[m-1]:d.type,v=l.parse(g,1+p.length,x);if(!v){_=!0;break}p.push(v)}if(!_)if(Array.isArray(d)&&d.length!==p.length)l.error("Expected "+d.length+" arguments, but found "+p.length+" instead.");else{for(var y=0;y<p.length;y++){var $=Array.isArray(d)?d[y]:d.type,b=p[y];l.concat(y+1).checkSubtype($,b.type)}if(0===l.errors.length)return new Rn(n,o,f,p)}}if(1===s.length)(i=t.errors).push.apply(i,l.errors);else{for(var T=(s.length?s:a).map((function(e){return On(e[0])})).join(" | "),C=[],S=1;S<e.length;S++){var w=t.parse(e[S],1+C.length);if(!w)return null;C.push(toString(w.type))}t.error("Expected arguments of type "+T+", but found ("+C.join(", ")+") instead.")}return null},Rn.register=function(e,t){for(var i in Rn.definitions=t,t)e[i]=Rn},en.register("CompoundExpression",Rn);var In={kind:"number"},Dn={kind:"string"},Bn={kind:"boolean"},Nn={kind:"color"},Fn={kind:"object"},Un={kind:"value"},Gn={kind:"error"},zn={kind:"collator"};function Vn(e,t){return{kind:"array",itemType:e,N:t}}function kn(e){return{type:e}}function Wn(e,t){var i=t[0],n=t[1],r=t[2],o=t[3];i=i.evaluate(e),n=n.evaluate(e),r=r.evaluate(e);var a=o?o.evaluate(e):1,s=Values.validateRGBA(i,n,r,a);if(s)throw new RuntimeError(s);return new Color(i/255*a,n/255*a,r/255*a,a)}Rn.register(Qi,{error:[Gn,[Dn],function(e,t){var i=t[0];throw new RuntimeError(i.evaluate(e))}],typeof:[Dn,[Un],function(e,t){var i=t[0];return toString(Values.typeOf(i.evaluate(e)))}],"to-rgba":[Vn(In,4),[Nn],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[Nn,[In,In,In],Wn],rgba:[Nn,[In,In,In,In],Wn],has:{type:Bn,overloads:[[[Dn],function(e,t){var i=t[0];return has(i.evaluate(e),e.properties())}],[[Dn,Fn],function(e,t){var i=t[0],n=t[1];return has(i.evaluate(e),n.evaluate(e))}]]},get:{type:Un,overloads:[[[Dn],function(e,t){return Mn(t[0].evaluate(e),e.properties())}],[[Dn,Fn],function(e,t){var i=t[0],n=t[1];return Mn(i.evaluate(e),n.evaluate(e))}]]},"feature-state":[Un,[Dn],function(e,t){return Mn(t[0].evaluate(e),e.featureState||{})}],properties:[Fn,[],function(e){return e.properties()}],"geometry-type":[Dn,[],function(e){return e.geometryType()}],id:[Un,[],function(e){return e.id()}],zoom:[In,[],function(e){return e.globals.zoom}],"heatmap-density":[In,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[In,[],function(e){return e.globals.lineProgress||0}],accumulated:[Un,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[In,kn(In),function(e,t){for(var i=0,n=0,r=t;n<r.length;n+=1)i+=r[n].evaluate(e);return i}],"*":[In,kn(In),function(e,t){for(var i=1,n=0,r=t;n<r.length;n+=1)i*=r[n].evaluate(e);return i}],"-":{type:In,overloads:[[[In,In],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)-n.evaluate(e)}],[[In],function(e,t){return-t[0].evaluate(e)}]]},"/":[In,[In,In],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)/n.evaluate(e)}],"%":[In,[In,In],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)%n.evaluate(e)}],ln2:[In,[],function(){return Math.LN2}],pi:[In,[],function(){return Math.PI}],e:[In,[],function(){return Math.E}],"^":[In,[In,In],function(e,t){var i=t[0],n=t[1];return Math.pow(i.evaluate(e),n.evaluate(e))}],sqrt:[In,[In],function(e,t){var i=t[0];return Math.sqrt(i.evaluate(e))}],log10:[In,[In],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN10}],ln:[In,[In],function(e,t){var i=t[0];return Math.log(i.evaluate(e))}],log2:[In,[In],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN2}],sin:[In,[In],function(e,t){var i=t[0];return Math.sin(i.evaluate(e))}],cos:[In,[In],function(e,t){var i=t[0];return Math.cos(i.evaluate(e))}],tan:[In,[In],function(e,t){var i=t[0];return Math.tan(i.evaluate(e))}],asin:[In,[In],function(e,t){var i=t[0];return Math.asin(i.evaluate(e))}],acos:[In,[In],function(e,t){var i=t[0];return Math.acos(i.evaluate(e))}],atan:[In,[In],function(e,t){var i=t[0];return Math.atan(i.evaluate(e))}],min:[In,kn(In),function(e,t){return Math.min.apply(Math,t.map((function(t){return t.evaluate(e)})))}],max:[In,kn(In),function(e,t){return Math.max.apply(Math,t.map((function(t){return t.evaluate(e)})))}],abs:[In,[In],function(e,t){var i=t[0];return Math.abs(i.evaluate(e))}],round:[In,[In],function(e,t){var i=t[0].evaluate(e);return i<0?-Math.round(-i):Math.round(i)}],floor:[In,[In],function(e,t){var i=t[0];return Math.floor(i.evaluate(e))}],ceil:[In,[In],function(e,t){var i=t[0];return Math.ceil(i.evaluate(e))}],"filter-==":[Bn,[Dn,Un],function(e,t,i){var n=t[0],r=t[1];if(i){var o,a,s=n.value,l=r.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":o=c+d;break;case"-":o=c-d}return o===(a=r.value)}if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(o="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);a="left"==g?d.substring(0,x):d.substring(d.length-x)}else a=r.value;return o===a}return e.properties()[n.value]===e.properties()[r.value]}return e.properties()[n.value]===r.value}],"filter-id-==":[Bn,[Un],function(e,t){var i=t[0];return e.id()===i.value}],"filter-like":[Bn,[Dn,Dn],function(e,t){var i=t[0].value,n=t[1].value,r=e.properties();return i in r&&(/^%.*[^%]$/.test(n)?(n=n.replace("%",""),r[i].endsWith(n)):/^(?!%).+%$/.test(n)?(n=n.replace("%",""),r[i].startsWith(n)):(n=n.replace(/%/g,""),r[i].indexOf(n)>-1))}],"filter-type-==":[Bn,[Dn],function(e,t){var i=t[0];return e.geometryType()===i.value}],"filter-<":[Bn,[Dn,Un],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<r}],"filter-id-<":[Bn,[Un],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<r}],"filter->":[Bn,[Dn,Un],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>r}],"filter-id->":[Bn,[Un],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[Bn,[Dn,Un],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<=r}],"filter-id-<=":[Bn,[Un],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[Bn,[Dn,Un],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>=r}],"filter-id->=":[Bn,[Un],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[Bn,[Un],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[Bn,[],function(e){return null!==e.id()}],"filter-type-in":[Bn,[Vn(Dn)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[Bn,[Vn(Un)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[Bn,[Dn,Vn(Un)],function(e,t){var i=t[0];return t[1].value.indexOf(e.properties()[i.value])>=0}],"filter-in-large":[Bn,[Dn,Vn(Un)],function(e,t){var i=t[0],n=t[1];return binarySearch(e.properties()[i.value],n.value,0,n.value.length-1)}],all:{type:Bn,overloads:[[[Bn,Bn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)&&n.evaluate(e)}],[kn(Bn),function(e,t){for(var i=0,n=t;i<n.length;i+=1)if(!n[i].evaluate(e))return!1;return!0}]]},crossFields:{type:Bn,overloads:[[[Bn,Bn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e,!0)&&n.evaluate(e,!0)}],[kn(Bn),function(e,t){for(var i=0,n=t;i<n.length;i+=1)if(!n[i].evaluate(e,!0))return!1;return!0}]]},any:{type:Bn,overloads:[[[Bn,Bn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)||n.evaluate(e)}],[kn(Bn),function(e,t){for(var i=0,n=t;i<n.length;i+=1)if(n[i].evaluate(e))return!0;return!1}]]},"!":[Bn,[Bn],function(e,t,i){return!t[0].evaluate(e,i)}],"is-supported-script":[Bn,[Dn],function(e,t){var i=t[0],n=e.globals&&e.globals.isSupportedScript;return!n||n(i.evaluate(e))}],upcase:[Dn,[Dn],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[Dn,[Dn],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[Dn,kn(Un),function(e,t){return t.map((function(t){return Values.toString$1(t.evaluate(e))})).join("")}],"resolved-locale":[Dn,[zn],function(e,t){return t[0].evaluate(e).resolvedLocale()}]}),Ln.CompoundExpression=Rn;var Hn,qn=(Hn=!0,function(e,t){var i=Hn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Hn=!1,i}),jn=qn(void 0,(function(){return jn.toString().search("(((.+)+)+)+$").toString().constructor(jn).search("(((.+)+)+)+$")}));jn();var Yn=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new bn,this._defaultValue=t?Kn(t):null,this._enumValues=t&&"enum"===t.type?t.values:null};function Xn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Kn(e){return"color"===e.type&&Xn(e.default)?new M(0,0,0,0):"color"===e.type?M.parse(e.default)||null:void 0===e.default?null:e.default}Yn.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r,this.expression.evaluate(this._evaluator)},Yn.prototype.evaluate=function(e,t,i,n,r){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=i||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new RuntimeError("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(e){return!this._warningHistory[e.message]&&(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}},en.register("StyleExpression",Yn);var Qn,Zn=(Qn=!0,function(e,t){var i=Qn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Qn=!1,i}),Jn=Zn(void 0,(function(){return Jn.toString().search("(((.+)+)+)+$").toString().constructor(Jn).search("(((.+)+)+)+$")}));function er(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function tr(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function ir(e){return!!e.expression&&e.expression.interpolated}Jn();var nr,rr=(nr=!0,function(e,t){var i=nr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return nr=!1,i}),or=rr(void 0,(function(){return or.toString().search("(((.+)+)+)+$").toString().constructor(or).search("(((.+)+)+)+$")}));function ar(){}function sr(e){return{result:"success",value:e}}function lr(e){return{result:"error",value:e}}or(),ar.isExpression=function(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in Qi};var ur={kind:"number"},cr={kind:"string"},hr={kind:"boolean"},dr={kind:"color"},fr={kind:"value"},pr={kind:"formatted"},_r={kind:"resolvedImage"};function mr(e,t){return{kind:"array",itemType:e,N:t}}function gr(e){var t=null;if(e instanceof fi)t=gr(e.result);else if(e instanceof Xe){for(var i of e.args)if(t=gr(i))break}else(e instanceof Vi||e instanceof Qt)&&e.input instanceof Ln.CompoundExpression&&"zoom"===e.input.name&&(t=e);return t instanceof xn||e.eachChild((e=>{var i=gr(e);i instanceof xn?t=i:!t&&i?t=new xn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new xn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function xr(e){var t={color:dr,string:cr,number:ur,enum:cr,boolean:hr,formatted:pr,resolvedImage:_r};return"array"===e.type?mr(t[e.value]||fr,e.length):t[e.type]}function vr(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function yr(e){return e}function $r(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}function br(e,t,i){var n=void 0!==e.base?e.base:1;if("number"!==Rr(i))return Ar(e.default,t.default);var r=e.stops.length;if(1===r)return e.stops[0][1];if(i<=e.stops[0][0])return e.stops[0][1];if(i>=e.stops[r-1][0])return e.stops[r-1][1];var o=Ni(e.stops.map((e=>e[0])),i),a=Lr(i,n,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],u=interpolate[t.type]||yr;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=colorSpaces[e.colorSpace];u=(e,t)=>c.reverse(c.interpolate(c.forward(e),c.forward(t),a))}return"function"==typeof s.evaluate?{evaluate(...e){var t=s.evaluate.apply(void 0,e),i=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==i)return u(t,i,a)}}:u(s,l,a)}function Tr(e,t,i){return"color"===t.type?i=M.parse(i):"formatted"===t.type?i=Formatted.fromString(i.toString()):"resolvedImage"===t.type?i=ResolvedImage.fromString(i.toString()):Rr(i)!==t.type&&("enum"!==t.type||!t.values[i])&&(i=void 0),Ar(i,e.default,t.default)}function Cr(e,t){var i=new Ln(Qi,[],t?xr(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?sr(new Yn(n,t)):lr(i.errors)}function Sr(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!wn.isStateConstant(t.expression)}function wr(e,t,i,n){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent="camera"!==e&&!wn.isStateConstant(t.expression),this.interpolationType=n}function Er(e,t){if("error"===(e=Cr(e,t)).result)return e;var i=e.value.expression,n=wn.isFeatureConstant(i);if(!n&&!er(t))return lr([new xn("","data expressions not supported")]);var r=wn.isGlobalPropertyConstant(i,["zoom"]);if(!r&&!tr(t))return lr([new xn("","zoom expressions not supported")]);var o=gr(i);if(!o&&!r)return lr([new xn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof xn)return lr([o]);if(o instanceof Qt&&!ir(t))return lr([new xn("",'"interpolate" expressions cannot be used with this property')]);if(!o)return sr(new Sr(n?"constant":"source",e.value));var a=o instanceof Qt?o.interpolation:void 0;return sr(new wr(n?"camera":"composite",e.value,o.labels,a))}function Pr(e,t){var i,n,r,o="color"===t.type,a=e.stops&&"object"==typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,u=e.type||(ir(t)?"exponential":"interval");if(o&&((e=$r({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],M.parse(e[1])]}))),e.default?e.default=M.parse(e.default):e.default=M.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!colorSpaces[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)i=br;else if("interval"===u)i=evaluateIntervalFunction;else if("categorical"===u){i=evaluateCategoricalFunction,n=Object.create(null);for(var c=0,h=e.stops;c<h.length;c+=1){var d=h[c];n[d[0]]=d[1]}r=typeof e.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');i=Tr}if(a){for(var f={},p=[],_=0;_<e.stops.length;_++){var m=e.stops[_],g=m[0].zoom;void 0===f[g]&&(f[g]={zoom:g,type:e.type,property:e.property,default:e.default,stops:[]},p.push(g)),f[g].stops.push([m[0].value,m[1]])}for(var x=[],v=0,y=p;v<y.length;v+=1){var $=y[v];x.push([f[$].zoom,Pr(f[$],t)])}var b={name:"linear"};return{kind:"composite",interpolationType:b,interpolationFactor:Qt.interpolationFactor.bind(void 0,b),zoomStops:x.map((function(e){return e[0]})),evaluate:function(i,n){var r=i.zoom;return br({stops:x,base:e.base},t,r).evaluate(r,n)}}}if(l){var T="exponential"===u?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:T,interpolationFactor:Qt.interpolationFactor.bind(void 0,T),zoomStops:e.stops.map((function(e){return e[0]})),evaluate:function(o){var a=o.zoom;return i(e,t,a,n,r)}}}return{kind:"source",evaluate:function(o,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?Ar(e.default,t.default):i(e,t,s,n,r)}}}function Ar(e,t,i){return void 0!==e?e:void 0!==t?t:void 0!==i?i:void 0}function Lr(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}ar.createExpression=function(e,t){var i=new Ln(Qi,[],t?xr(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?sr(new Yn(n,t)):lr(i.errors)},Sr.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},Sr.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},en.register("ZoomConstantExpression",Sr),wr.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},wr.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},wr.prototype.interpolationFactor=function(e,t,i){return this.interpolationType?Qt.interpolationFactor(this.interpolationType,e,t,i):0},en.register("ZoomDependentExpression",wr);var Mr=function(e,t){this._parameters=e,this._specification=t,$r(this,Pr(this._parameters,this._specification))};function Rr(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}Mr.deserialize=function(e){return new Mr(e._parameters,e._specification)},Mr.serialize=function(e){return{_parameters:e._parameters,_specification:e._specification}},en.register("StylePropertyFunction",Mr),ar.normalizePropertyExpression=function(e,t){if(vr(e))return new Mr(e,t);if(ar.isExpression(e)){var i=Er(e,t);if("error"===i.result)throw new Error(i.value.map((function(e){return e.key+": "+e.message})).join(", "));return i.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=M.parse(e)),{kind:"constant",evaluate:function(){return n}}};var Or,Ir=(Or=!0,function(e,t){var i=Or?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Or=!1,i}),Dr=Ir(void 0,(function(){return Dr.toString().search("(((.+)+)+)+$").toString().constructor(Dr).search("(((.+)+)+)+$")}));function Br(){}Dr(),Br.isExpressionFilter=function(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&Array.isArray(e[2]);case"!in":case"!has":case"none":case"crossFields":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":case"like":case"!like":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,i=e.slice(1);t<i.length;t+=1){var n=i[t];if(!Br.isExpressionFilter(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}};var Nr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Fr(e,t){return e<t?-1:e>t?1:0}function Ur(e){if(!e)return!0;var t=e[0];return e.length<=1?"any"!==t:"=="===t?Gr(e[1],e[2],"=="):"!="===t?Wr(Gr(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?Gr(e[1],e[2],t):"any"===t?zr(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(Ur)):"crossFields"===t?["crossFields"].concat(e.slice(1).map(Ur)):"none"===t?["all"].concat(e.slice(1).map(Ur).map(Wr)):"in"===t?Vr(e[1],e.slice(2)):"!in"===t?Wr(Vr(e[1],e.slice(2))):"has"===t?kr(e[1]):"!has"===t?Wr(kr(e[1])):"like"===t?Gr(e[1],e[2],"like"):"!like"!==t||Wr(Gr(e[1],e[2],"like"))}function Gr(e,t,i){switch(e){case"$type":return["filter-type-"+i,t];case"$id":return["filter-id-"+i,t];default:return["filter-"+i,e,t]}}function zr(e){return["any"].concat(e.map(Ur))}function Vr(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(Fr)]]:["filter-in-small",e,["literal",t]]}}function kr(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Wr(e){return["!",e]}Br.createFilter=function(e){if(null==e)return function(){return!0};!Br.isExpressionFilter(e)&&(e=Ur(e));var t=ar.createExpression(e,Nr);if("error"===t.result)throw new Error(t.value.map((function(e){return e.key+": "+e.message})).join(", "));return function(e,i){return t.value.evaluate(e,i)}};var Hr,qr=(Hr=!0,function(e,t){var i=Hr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Hr=!1,i}),jr=qr(void 0,(function(){return jr.toString().search("(((.+)+)+)+$").toString().constructor(jr).search("(((.+)+)+)+$")}));jr();const Yr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Xr(e){var t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var i="[",n=0,r=e;n<r.length;n+=1)i+=Xr(r[n])+",";return i+"]"}for(var o=Object.keys(e).sort(),a="{",s=0;s<o.length;s++)a+=JSON.stringify(o[s])+":"+Xr(e[o[s]])+",";return a+"}"}function Kr(e){for(var t="",i=0,n=Yr;i<n.length;i+=1)t+="/"+Xr(e[n[i]]);return t}function Qr(e,t){for(var i={},n=0;n<e.length;n++){var r=t&&t[e[n].id]||Kr(e[n]);t&&(t[e[n].id]=r);var o=i[r];!o&&(o=i[r]=[]),o.push(e[n])}var a=[];for(var s in i)a.push(i[s]);return a}var Zr,Jr=(Zr=!0,function(e,t){var i=Zr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Zr=!1,i}),eo=Jr(void 0,(function(){return eo.toString().search("(((.+)+)+)+$").toString().constructor(eo).search("(((.+)+)+)+$")}));function to(e,t){this.x=e,this.y=t}eo(),to.prototype={clone:function(){return new to(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,i=e.y-this.y;return t*t+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,i=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=i,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),i=Math.sin(e),n=t*this.x-i*this.y,r=i*this.x+t*this.y;return this.x=n,this.y=r,this},_rotateAround:function(e,t){var i=Math.cos(e),n=Math.sin(e),r=t.x+i*(this.x-t.x)-n*(this.y-t.y),o=t.y+n*(this.x-t.x)+i*(this.y-t.y);return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},to.convert=function(e){return e instanceof to?e:Array.isArray(e)?new to(e[0],e[1]):e};var io,no=(io=!0,function(e,t){var i=io?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return io=!1,i}),ro=no(void 0,(function(){return ro.toString().search("(((.+)+)+)+$").toString().constructor(ro).search("(((.+)+)+)+$")}));ro();var oo={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};function ao(e,t){void 0===t&&(t=1);var i=0,n=0;return{members:e.map((function(e){var r=so(e.type),o=i=lo(i,Math.max(t,r)),a=e.components||1;return n=Math.max(n,r),i+=r*a,{name:e.name,type:e.type,components:a,offset:o}})),size:lo(i,Math.max(n,t)),alignment:t}}function so(e){return oo[e].BYTES_PER_ELEMENT}function lo(e,t){return Math.ceil(e/t)*t}var uo,co=(uo=!0,function(e,t){var i=uo?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return uo=!1,i}),ho=co(void 0,(function(){return ho.toString().search("(((.+)+)+)+$").toString().constructor(ho).search("(((.+)+)+)+$")}));ho();var fo=function(){this.first=!0};fo.prototype.update=function(e,t){var i=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<i&&(this.lastIntegerZoom=i,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=i,!0))},en.register("ZoomHistory",fo);var po,_o=(po=!0,function(e,t){var i=po?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return po=!1,i}),mo=_o(void 0,(function(){return mo.toString().search("(((.+)+)+)+$").toString().constructor(mo).search("(((.+)+)+)+$")}));mo();var go=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new fo,this.transition={})};go.prototype.isSupportedScript=function(e){return!1},go.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},go.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),i=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*t}},en.register("EvaluationParameters",go);var xo,vo=(xo=!0,function(e,t){var i=xo?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return xo=!1,i}),yo=vo(void 0,(function(){return yo.toString().search("(((.+)+)+)+$").toString().constructor(yo).search("(((.+)+)+)+$")}));yo();var $o=8192;function bo(e,t,i){return Math.min(i,Math.max(t,e))}function To(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),{min:-1*Math.pow(2,e-1),max:Math.pow(2,e-1)-1}}var Co=To(15);function So(e){for(var t=$o/e.extent,i=e.loadGeometry(),n=0;n<i.length;n++)for(var r=i[n],o=0;o<r.length;o++){var a=r[o];a.x=Math.round(a.x*t),a.y=$o-Math.round(a.y*t),(a.x<Co.min||a.x>Co.max||a.y<Co.min||a.y>Co.max)&&(a.x=bo(a.x,Co.min,Co.max),a.y=bo(a.y,Co.min,Co.max))}return i}var wo,Eo=(wo=!0,function(e,t){var i=wo?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wo=!1,i}),Po=Eo(void 0,(function(){return Po.toString().search("(((.+)+)+)+$").toString().constructor(Po).search("(((.+)+)+)+$")}));Po();var Ao=function(e){void 0===e&&(e=[]),this.segments=e};Ao.prototype.prepareSegment=function(e,t,i,n){var r=this.segments[this.segments.length-1];return(!r||r.vertexLength+e>Ao.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==n)&&(r={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},void 0!==n&&(r.sortKey=n),this.segments.push(r)),r},Ao.prototype.get=function(){return this.segments},Ao.prototype.destroy=function(){for(var e=0,t=this.segments;e<t.length;e+=1){var i=t[e];for(var n in i.cesiumVaos)i.cesiumVaos[n].destroy()}},Ao.simpleSegment=function(e,t,i,n){return new Ao([{vertexOffset:e,primitiveOffset:t,vertexLength:i,primitiveLength:n,vaos:{},cesiumVaos:{},drawCommands:{},sortKey:0}])},Ao.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,en.register("SegmentVector",Ao);const Lo=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Mo=Lo(void 0,(function(){return Mo.toString().search("(((.+)+)+)+$").toString().constructor(Mo).search("(((.+)+)+)+$")}));Mo();var Ro=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8};const Oo=128,Io=5;var Do=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Do.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},Do.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},Do.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Do.prototype.clear=function(){this.length=0},Do.prototype.resize=function(e){this.reserve(e),this.length=e},Do.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*Io),Oo),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&(0==t.length&&console.log("oldUint8Array.length == 0"),this.uint8.set(t))}},Do.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Bo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=i,e},t}(Do);Bo.prototype.bytesPerElement=4,en.register("StructArrayLayout2i4",Bo);var No=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=i,this.int16[o+2]=n,this.int16[o+3]=r,e},t}(Do);No.prototype.bytesPerElement=8,en.register("StructArrayLayout4i8",No);var Fo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(Do);Fo.prototype.bytesPerElement=12,en.register("StructArrayLayout2i4i12",Fo);var Uo=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},r.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},r.prototype.emplace=function(e,t,i,n,r,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.uint8[l+4]=n,this.uint8[l+5]=r,this.uint8[l+6]=o,this.uint8[l+7]=a,e},r}(Do);Uo.prototype.bytesPerElement=8,en.register("StructArrayLayout2i4ub8",Uo);var Go=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=i,this.uint16[u+2]=n,this.uint16[u+3]=r,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,e},t}(Do);Go.prototype.bytesPerElement=16,en.register("StructArrayLayout8ui16",Go);var zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.int16[f+0]=t,this.int16[f+1]=i,this.int16[f+2]=n,this.int16[f+3]=r,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=d,e},t}(Do);zo.prototype.bytesPerElement=24,en.register("StructArrayLayout4i4ui4i24",zo);var Vo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.float32[r+0]=t,this.float32[r+1]=i,this.float32[r+2]=n,e},t}(Do);Vo.prototype.bytesPerElement=12,en.register("StructArrayLayout3f12",Vo);var ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint32[i+0]=t,e},t}(Do);ko.prototype.bytesPerElement=4,en.register("StructArrayLayout1ul4",ko);var Wo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c){var h=this.length;return this.resize(h+1),this.emplace(h,e,t,i,n,r,o,a,s,l,u,c)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=12*e,f=6*e;return this.int16[d+0]=t,this.int16[d+1]=i,this.int16[d+2]=n,this.int16[d+3]=r,this.int16[d+4]=o,this.int16[d+5]=a,this.uint32[f+3]=s,this.uint16[d+8]=l,this.uint16[d+9]=u,this.int16[d+10]=c,this.int16[d+11]=h,e},t}(Do);Wo.prototype.bytesPerElement=24,en.register("StructArrayLayout6i1ul2ui2i24",Wo);var Ho=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(Do);Ho.prototype.bytesPerElement=12,en.register("StructArrayLayout2i2i2i12",Ho);var qo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=i,this.float32[a+1]=n,this.float32[a+2]=r,e},t}(Do);qo.prototype.bytesPerElement=12,en.register("StructArrayLayout2ub2f12",qo);var jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var g=this.length;return this.resize(g+1),this.emplace(g,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g){var x=24*e,v=12*e,y=48*e;return this.int16[x+0]=t,this.int16[x+1]=i,this.uint16[x+2]=n,this.uint16[x+3]=r,this.uint32[v+2]=o,this.uint32[v+3]=a,this.uint32[v+4]=s,this.uint16[x+10]=l,this.uint16[x+11]=u,this.uint16[x+12]=c,this.float32[v+7]=h,this.float32[v+8]=d,this.uint8[y+36]=f,this.uint8[y+37]=p,this.uint8[y+38]=_,this.uint32[v+10]=m,this.int16[x+22]=g,e},t}(Do);jo.prototype.bytesPerElement=48,en.register("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",jo);var Yo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S){var w=this.length;return this.resize(w+1),this.emplace(w,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S,w){var E=30*e,P=15*e;return this.int16[E+0]=t,this.int16[E+1]=i,this.int16[E+2]=n,this.int16[E+3]=r,this.int16[E+4]=o,this.int16[E+5]=a,this.int16[E+6]=s,this.int16[E+7]=l,this.uint16[E+8]=u,this.uint16[E+9]=c,this.uint16[E+10]=h,this.uint16[E+11]=d,this.uint16[E+12]=f,this.uint16[E+13]=p,this.uint16[E+14]=_,this.uint16[E+15]=m,this.uint16[E+16]=g,this.uint16[E+17]=x,this.uint16[E+18]=v,this.uint16[E+19]=y,this.uint16[E+20]=$,this.uint16[E+21]=b,this.uint32[P+11]=T,this.float32[P+12]=C,this.float32[P+13]=S,this.float32[P+14]=w,e},t}(Do);Yo.prototype.bytesPerElement=60,en.register("StructArrayLayout8i14ui1ul3f60",Yo);var Xo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.float32[i+0]=t,e},t}(Do);Xo.prototype.bytesPerElement=4,en.register("StructArrayLayout1f4",Xo);var Ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.int16[r+0]=t,this.int16[r+1]=i,this.int16[r+2]=n,e},t}(Do);Ko.prototype.bytesPerElement=6,en.register("StructArrayLayout3i6",Ko);var Qo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=2*e,o=4*e;return this.uint32[r+0]=t,this.uint16[o+2]=i,this.uint16[o+3]=n,e},t}(Do);Qo.prototype.bytesPerElement=8,en.register("StructArrayLayout1ul2ui8",Qo);var Zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.uint16[r+0]=t,this.uint16[r+1]=i,this.uint16[r+2]=n,e},t}(Do);Zo.prototype.bytesPerElement=6,en.register("StructArrayLayout3ui6",Zo);var Jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=i,e},t}(Do);Jo.prototype.bytesPerElement=4,en.register("StructArrayLayout2ui4",Jo);var ea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint16[i+0]=t,e},t}(Do);ea.prototype.bytesPerElement=2,en.register("StructArrayLayout1ui2",ea);var ta=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=i,e},t}(Do);ta.prototype.bytesPerElement=8,en.register("StructArrayLayout2f8",ta);var ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=i,this.float32[o+2]=n,this.float32[o+3]=r,e},t}(Do);ia.prototype.bytesPerElement=16,en.register("StructArrayLayout4f16",ia);var na=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.float32[s+0]=t,this.float32[s+1]=i,this.float32[s+2]=n,this.float32[s+3]=r,this.float32[s+4]=o,this.float32[s+5]=a,e},t}(Do);na.prototype.bytesPerElement=24,en.register("StructArrayLayout6f24",na);var ra=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.float32[u+0]=t,this.float32[u+1]=i,this.float32[u+2]=n,this.float32[u+3]=r,this.float32[u+4]=o,this.float32[u+5]=a,this.float32[u+6]=s,this.float32[u+7]=l,e},t}(Do);ra.prototype.bytesPerElement=32,en.register("StructArrayLayout8f32",ra);var oa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.float32[f+0]=t,this.float32[f+1]=i,this.float32[f+2]=n,this.float32[f+3]=r,this.float32[f+4]=o,this.float32[f+5]=a,this.float32[f+6]=s,this.float32[f+7]=l,this.float32[f+8]=u,this.float32[f+9]=c,this.float32[f+10]=h,this.float32[f+11]=d,e},t}(Do);oa.prototype.bytesPerElement=48,en.register("StructArrayLayout12f48",oa);var aa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return i.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.x1.get=function(){return this._structArray.int16[this._pos2+2]},i.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},i.y1.get=function(){return this._structArray.int16[this._pos2+3]},i.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},i.x2.get=function(){return this._structArray.int16[this._pos2+4]},i.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},i.y2.get=function(){return this._structArray.int16[this._pos2+5]},i.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.radius.get=function(){return this._structArray.int16[this._pos2+10]},i.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},i.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},i.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},i.anchorPoint.get=function(){return new pointGeometry(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,i),t}(Ro);aa.prototype.size=24;var sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new aa(this,e)},t}(Wo);en.register("CollisionBoxArray",sa);var la=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},i.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},i.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},i.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},i.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},i.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},i.segment.get=function(){return this._structArray.uint16[this._pos2+10]},i.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},i.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},i.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},i.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},i.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},i.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},i.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},i.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},i.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},i.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},i.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},i.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},i.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},i.associatedIconIndex.set=function(e){this._structArray.int16[this._pos2+22]=e},Object.defineProperties(t.prototype,i),t}(Ro);la.prototype.size=48;var ua=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new la(this,e)},t}(jo);en.register("PlacedSymbolArray",ua);var ca=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},i.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},i.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},i.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},i.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},i.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},i.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},i.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},i.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},i.placedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+6]=e},i.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},i.verticalPlacedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+7]=e},i.key.get=function(){return this._structArray.uint16[this._pos2+8]},i.key.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},i.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},i.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},i.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},i.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},i.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},i.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+14]=e},i.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},i.verticalIconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+15]=e},i.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},i.verticalIconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+16]=e},i.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},i.featureIndex.set=function(e){this._structArray.uint16[this._pos2+17]=e},i.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},i.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+18]=e},i.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},i.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+19]=e},i.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},i.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+20]=e},i.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},i.numVerticalIconVertices.set=function(e){this._structArray.uint16[this._pos2+21]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+11]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+11]=e},i.textBoxScale.get=function(){return this._structArray.float32[this._pos4+12]},i.textBoxScale.set=function(e){this._structArray.float32[this._pos4+12]=e},i.textOffset0.get=function(){return this._structArray.float32[this._pos4+13]},i.textOffset0.set=function(e){this._structArray.float32[this._pos4+13]=e},i.textOffset1.get=function(){return this._structArray.float32[this._pos4+14]},i.textOffset1.set=function(e){this._structArray.float32[this._pos4+14]=e},Object.defineProperties(t.prototype,i),t}(Ro);ca.prototype.size=60;var ha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ca(this,e)},t}(Yo);en.register("SymbolInstanceArray",ha);var da=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={offsetX:{configurable:!0}};return i.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},i.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,i),t}(Ro);da.prototype.size=4;var fa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new da(this,e)},t}(Xo);en.register("GlyphOffsetArray",fa);var pa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return i.x.get=function(){return this._structArray.int16[this._pos2+0]},i.x.set=function(e){this._structArray.int16[this._pos2+0]=e},i.y.get=function(){return this._structArray.int16[this._pos2+1]},i.y.set=function(e){this._structArray.int16[this._pos2+1]=e},i.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},i.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,i),t}(Ro);pa.prototype.size=6;var _a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new pa(this,e)},t}(Ko);en.register("SymbolLineVertexArray",_a);var ma=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,i),t}(Ro);ma.prototype.size=8;var ga=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ma(this,e)},t}(Qo);en.register("FeatureIndexArray",ga);var xa,va=(xa=!0,function(e,t){var i=xa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return xa=!1,i}),ya=va(void 0,(function(){return ya.toString().search("(((.+)+)+)+$").toString().constructor(ya).search("(((.+)+)+)+$")}));ya();var $a=function(e,t,i){this.property=e,this.value=t,this.parameters=i};$a.prototype.isConstant=function(){return"constant"===this.value.kind},$a.prototype.constantOr=function(e){return"constant"===this.value.kind?this.value.value:e},$a.prototype.evaluate=function(e,t,i){return this.property.evaluate(this.value,this.parameters,e,t,i)};var ba={},Ta=function(e,t){this.gl=e.gl,this.location=t};ba.Uniform1i=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},t}(Ta),ba.Uniform1f=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(Ta),ba.Uniform2f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(Ta),ba.Uniform3f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(Ta),ba.Uniform4f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},t}(Ta),ba.UniformColor=function(e){function t(t,i){e.call(this,t,i),this.current=M.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(Ta);var Ca=new Float32Array(16);function Sa(e,t){return e??t}function wa(e){return null!=e}function Ea(e){var t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}ba.UniformMatrix4f=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,t,i),this.current=Ca}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.set=function(e){this.gl.uniformMatrix4fv(this.location,!1,e)},r}(Ta),Sa.EMPTY_OBJECT=Object.freeze({}),wa(Object.create)&&(Ea.prototype=Object.create(Error.prototype),Ea.prototype.constructor=Ea),Ea.prototype.toString=function(){var e=this.name+": "+this.message;return wa(this.stack)&&(e+="\n"+this.stack.toString()),e},Ea.throwInstantiationError=function(){throw new Ea("This function defines an interface and should not be called directly.")};const Pa={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047};var Aa=Object.freeze(Pa),La={BYTE:Aa.BYTE,UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,SHORT:Aa.SHORT,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,INT:Aa.INT,UNSIGNED_INT:Aa.UNSIGNED_INT,FLOAT:Aa.FLOAT,DOUBLE:Aa.DOUBLE,getSizeInBytes:function(e){if(!wa(e))throw new Ea("value is required.");switch(e){case La.BYTE:return Int8Array.BYTES_PER_ELEMENT;case La.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case La.SHORT:return Int16Array.BYTES_PER_ELEMENT;case La.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case La.INT:return Int32Array.BYTES_PER_ELEMENT;case La.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case La.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case La.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new Ea("componentDatatype is not a valid value.")}},fromTypedArray:function(e){return e instanceof Int8Array?La.BYTE:e instanceof Uint8Array?La.UNSIGNED_BYTE:e instanceof Int16Array?La.SHORT:e instanceof Uint16Array?La.UNSIGNED_SHORT:e instanceof Int32Array?La.INT:e instanceof Uint32Array?La.UNSIGNED_INT:e instanceof Float32Array?La.FLOAT:e instanceof Float64Array?La.DOUBLE:void 0},validate:function(e){return wa(e)&&(e===La.BYTE||e===La.UNSIGNED_BYTE||e===La.SHORT||e===La.UNSIGNED_SHORT||e===La.INT||e===La.UNSIGNED_INT||e===La.FLOAT||e===La.DOUBLE)},createTypedArray:function(e,t){if(!wa(e))throw new Ea("componentDatatype is required.");if(!wa(t))throw new Ea("valuesOrLength is required.");switch(e){case La.BYTE:return new Int8Array(t);case La.UNSIGNED_BYTE:return new Uint8Array(t);case La.SHORT:return new Int16Array(t);case La.UNSIGNED_SHORT:return new Uint16Array(t);case La.INT:return new Int32Array(t);case La.UNSIGNED_INT:return new Uint32Array(t);case La.FLOAT:return new Float32Array(t);case La.DOUBLE:return new Float64Array(t);default:throw new Ea("componentDatatype is not a valid value.")}},createArrayBufferView:function(e,t,i,n){if(!wa(e))throw new Ea("componentDatatype is required.");if(!wa(t))throw new Ea("buffer is required.");switch(i=Sa(i,0),n=Sa(n,(t.byteLength-i)/La.getSizeInBytes(e)),e){case La.BYTE:return new Int8Array(t,i,n);case La.UNSIGNED_BYTE:return new Uint8Array(t,i,n);case La.SHORT:return new Int16Array(t,i,n);case La.UNSIGNED_SHORT:return new Uint16Array(t,i,n);case La.INT:return new Int32Array(t,i,n);case La.UNSIGNED_INT:return new Uint32Array(t,i,n);case La.FLOAT:return new Float32Array(t,i,n);case La.DOUBLE:return new Float64Array(t,i,n);default:throw new Ea("componentDatatype is not a valid value.")}},fromName:function(e){switch(e){case"BYTE":return La.BYTE;case"UNSIGNED_BYTE":return La.UNSIGNED_BYTE;case"SHORT":return La.SHORT;case"UNSIGNED_SHORT":return La.UNSIGNED_SHORT;case"INT":return La.INT;case"UNSIGNED_INT":return La.UNSIGNED_INT;case"FLOAT":return La.FLOAT;case"DOUBLE":return La.DOUBLE;default:throw new Ea("name is not a valid value.")}}},Ma=Object.freeze(La),Ra=function(e){null==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};Ra.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++)e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30,this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0},Ra.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i<this.N-this.M;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+this.M]^e>>>1^t[1&e];for(;i<this.N-1;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+(this.M-this.N)]^e>>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},Ra.prototype.random=function(){return this.genrand_int32()*(1/4294967296)};var Oa={};function Ia(e){return e+" is required, actual value was undefined"}function Da(e,t,i){return"Expected "+i+" to be typeof "+t+", actual typeof was "+e}Oa.typeOf={},Oa.defined=function(e,t){if(!wa(t))throw new Ea(Ia(e))},Oa.typeOf.func=function(e,t){if("function"!=typeof t)throw new Ea(Da(typeof t,"function",e))},Oa.typeOf.string=function(e,t){if("string"!=typeof t)throw new Ea(Da(typeof t,"string",e))},Oa.typeOf.number=function(e,t){if("number"!=typeof t)throw new Ea(Da(typeof t,"number",e))},Oa.typeOf.number.lessThan=function(e,t,i){if(Oa.typeOf.number(e,t),t>=i)throw new Ea("Expected "+e+" to be less than "+i+", actual value was "+t)},Oa.typeOf.number.lessThanOrEquals=function(e,t,i){if(Oa.typeOf.number(e,t),t>i)throw new Ea("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},Oa.typeOf.number.greaterThan=function(e,t,i){if(Oa.typeOf.number(e,t),t<=i)throw new Ea("Expected "+e+" to be greater than "+i+", actual value was "+t)},Oa.typeOf.number.greaterThanOrEquals=function(e,t,i){if(Oa.typeOf.number(e,t),t<i)throw new Ea("Expected "+e+" to be greater than or equal to"+i+", actual value was "+t)},Oa.typeOf.object=function(e,t){if("object"!=typeof t)throw new Ea(Da(typeof t,"object",e))},Oa.typeOf.bool=function(e,t){if("boolean"!=typeof t)throw new Ea(Da(typeof t,"boolean",e))},Oa.typeOf.number.equals=function(e,t,i,n){if(Oa.typeOf.number(e,i),Oa.typeOf.number(t,n),i!==n)throw new Ea(e+" must be equal to "+t+", the actual values are "+i+" and "+n)};var Ba={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536};Ba.sign=Sa(Math.sign,(function(e){return 0==(e=+e)||e!=e?e:e>0?1:-1})),Ba.signNotZero=function(e){return e<0?-1:1},Ba.toSNorm=function(e,t){return t=Sa(t,255),Math.round((.5*Ba.clamp(e,-1,1)+.5)*t)},Ba.fromSNorm=function(e,t){return t=Sa(t,255),Ba.clamp(e,0,t)/t*2-1},Ba.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:Ba.clamp((e-t)/i,0,1)},Ba.sinh=Sa(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),Ba.cosh=Sa(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),Ba.lerp=function(e,t,i){return(1-i)*e+i*t},Ba.PI=Math.PI,Ba.ONE_OVER_PI=1/Math.PI,Ba.PI_OVER_TWO=Math.PI/2,Ba.PI_OVER_THREE=Math.PI/3,Ba.PI_OVER_FOUR=Math.PI/4,Ba.PI_OVER_SIX=Math.PI/6,Ba.THREE_PI_OVER_TWO=3*Math.PI/2,Ba.TWO_PI=2*Math.PI,Ba.ONE_OVER_TWO_PI=1/(2*Math.PI),Ba.RADIANS_PER_DEGREE=Math.PI/180,Ba.DEGREES_PER_RADIAN=180/Math.PI,Ba.RADIANS_PER_ARCSECOND=Ba.RADIANS_PER_DEGREE/3600,Ba.toRadians=function(e){if(!wa(e))throw new Ea("degrees is required.");return e*Ba.RADIANS_PER_DEGREE},Ba.toDegrees=function(e){if(!wa(e))throw new Ea("radians is required.");return e*Ba.DEGREES_PER_RADIAN},Ba.convertLongitudeRange=function(e){if(!wa(e))throw new Ea("angle is required.");var t=Ba.TWO_PI,i=e-Math.floor(e/t)*t;return i<-Math.PI?i+t:i>=Math.PI?i-t:i},Ba.clampToLatitudeRange=function(e){if(!wa(e))throw new Ea("angle is required.");return Ba.clamp(e,-1*Ba.PI_OVER_TWO,Ba.PI_OVER_TWO)},Ba.negativePiToPi=function(e){if(!wa(e))throw new Ea("angle is required.");return Ba.zeroToTwoPi(e+Ba.PI)-Ba.PI},Ba.zeroToTwoPi=function(e){if(!wa(e))throw new Ea("angle is required.");var t=Ba.mod(e,Ba.TWO_PI);return Math.abs(t)<Ba.EPSILON14&&Math.abs(e)>Ba.EPSILON14?Ba.TWO_PI:t},Ba.mod=function(e,t){if(!wa(e))throw new Ea("m is required.");if(!wa(t))throw new Ea("n is required.");return(e%t+t)%t},Ba.equalsEpsilon=function(e,t,i,n){if(!wa(e))throw new Ea("left is required.");if(!wa(t))throw new Ea("right is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");n=Sa(n,i);var r=Math.abs(e-t);return r<=n||r<=i*Math.max(Math.abs(e),Math.abs(t))},Ba.lessThan=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t<-i},Ba.lessThanOrEquals=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t<i},Ba.greaterThan=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t>i},Ba.greaterThanOrEquals=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t>-i};var Na=[1];Ba.factorial=function(e){if("number"!=typeof e||e<0)throw new Ea("A number greater than or equal to 0 is required.");var t=Na.length;if(e>=t)for(var i=Na[t-1],n=t;n<=e;n++){var r=i*n;Na.push(r),i=r}return Na[e]},Ba.incrementWrap=function(e,t,i){if(i=Sa(i,0),!wa(e))throw new Ea("n is required.");if(t<=i)throw new Ea("maximumValue must be greater than minimumValue.");return++e>t&&(e=i),e},Ba.isPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new Ea("A number greater than or equal to 0 is required.");return 0!==e&&0==(e&e-1)},Ba.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new Ea("A number greater than or equal to 0 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},Ba.clamp=function(e,t,i){if(!wa(e))throw new Ea("value is required");if(!wa(t))throw new Ea("min is required.");if(!wa(i))throw new Ea("max is required.");return e<t?t:e>i?i:e};var Fa=new Ra;Ba.setRandomNumberSeed=function(e){if(!wa(e))throw new Ea("seed is required.");Fa=new Ra(e)},Ba.nextRandomNumber=function(){return Fa.random()},Ba.randomBetween=function(e,t){return Ba.nextRandomNumber()*(t-e)+e},Ba.acosClamped=function(e){if(!wa(e))throw new Ea("value is required.");return Math.acos(Ba.clamp(e,-1,1))},Ba.asinClamped=function(e){if(!wa(e))throw new Ea("value is required.");return Math.asin(Ba.clamp(e,-1,1))},Ba.chordLength=function(e,t){if(!wa(e))throw new Ea("angle is required.");if(!wa(t))throw new Ea("radius is required.");return 2*t*Math.sin(.5*e)},Ba.logBase=function(e,t){if(!wa(e))throw new Ea("number is required.");if(!wa(t))throw new Ea("base is required.");return Math.log(e)/Math.log(t)},Ba.cbrt=Sa(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t})),Ba.log2=Sa(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),Ba.fog=function(e,t){var i=e*t;return 1-Math.exp(-i*i)},Ba.fastApproximateAtan=function(e){return Oa.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},Ba.fastApproximateAtan2=function(e,t){Oa.typeOf.number("x",e),Oa.typeOf.number("y",t);var i,n,r=Math.abs(e);i=Math.abs(t),n=Math.max(r,i);var o=(i=Math.min(r,i))/n;if(isNaN(o))throw new Ea("either x or y must be nonzero");return r=Ba.fastApproximateAtan(o),r=Math.abs(t)>Math.abs(e)?Ba.PI_OVER_TWO-r:r,r=e<0?Ba.PI-r:r,r=t<0?-r:r};var Ua={UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,UNSIGNED_INT:Aa.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case Ua.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Ua.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Ua.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new Ea("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return Ua.UNSIGNED_SHORT;case 4:return Ua.UNSIGNED_INT;case 1:return Ua.UNSIGNED_BYTE;default:throw new Ea("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return wa(e)&&(e===Ua.UNSIGNED_BYTE||e===Ua.UNSIGNED_SHORT||e===Ua.UNSIGNED_INT)},createTypedArray:function(e,t){if(!wa(e))throw new Ea("numberOfVertices is required.");return e>=Ba.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,i,n){if(!wa(e))throw new Ea("numberOfVertices is required.");if(!wa(t))throw new Ea("sourceArray is required.");if(!wa(i))throw new Ea("byteOffset is required.");return e>=Ba.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,i,n):new Uint16Array(t,i,n)}},Ga=Object.freeze(Ua),za={STREAM_DRAW:Aa.STREAM_DRAW,STATIC_DRAW:Aa.STATIC_DRAW,DYNAMIC_DRAW:Aa.DYNAMIC_DRAW,validate:function(e){return e===za.STREAM_DRAW||e===za.STATIC_DRAW||e===za.DYNAMIC_DRAW}};function Va(){return!0}function ka(e,t){function i(){throw new Ea(t)}for(var n in t=Sa(t,"This object was destroyed, i.e., destroy() was called."),e)"function"==typeof e[n]&&(e[n]=i);e.isDestroyed=Va}function Wa(e){if(e=Sa(e,Sa.EMPTY_OBJECT),Oa.defined("options.context",e.context),!wa(e.typedArray)&&!wa(e.sizeInBytes))throw new Ea("Either options.sizeInBytes or options.typedArray is required.");if(wa(e.typedArray)&&wa(e.sizeInBytes))throw new Ea("Cannot pass in both options.sizeInBytes and options.typedArray.");if(wa(e.typedArray)&&(Oa.typeOf.object("options.typedArray",e.typedArray),Oa.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!za.validate(e.usage))throw new Ea("usage is invalid.");var t=e.context._gl,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=wa(n);a&&(r=n.byteLength),Oa.typeOf.number.greaterThan("sizeInBytes",r,0);var s=t.createBuffer();t.bindBuffer(i,s),t.bufferData(i,a?n:r,o),t.bindBuffer(i,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this._buffer=s,this.context=e.context,e.context.memorySize+=r}Object.defineProperties(Wa.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),Wa.prototype._getBuffer=function(){return this._buffer},Wa.prototype.copyFromArrayView=function(e,t){t=Sa(t,0),Oa.defined("arrayView",e),Oa.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);var i=this._gl,n=this._bufferTarget;i.bindBuffer(n,this._buffer),i.bufferSubData(n,t,e),i.bindBuffer(n,null)},Wa.prototype.copyFromBuffer=function(e,t,i,n){if(!this._webgl2)throw new Ea("A WebGL 2 context is required.");if(!wa(e))throw new Ea("readBuffer must be defined.");if(!wa(n)||n<=0)throw new Ea("sizeInBytes must be defined and be greater than zero.");if(!wa(t)||t<0||t+n>e._sizeInBytes)throw new Ea("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!wa(i)||i<0||i+n>this._sizeInBytes)throw new Ea("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(i>=t&&i<t+n||t>i&&t<i+n))throw new Ea("When readBuffer is equal to this, the ranges [readOffset + sizeInBytes) and [writeOffset, writeOffset + sizeInBytes) must not overlap.");if(this._bufferTarget===Aa.ELEMENT_ARRAY_BUFFER&&e._bufferTarget!==Aa.ELEMENT_ARRAY_BUFFER||this._bufferTarget!==Aa.ELEMENT_ARRAY_BUFFER&&e._bufferTarget===Aa.ELEMENT_ARRAY_BUFFER)throw new Ea("Can not copy an index buffer into another buffer type.");var r=Aa.COPY_READ_BUFFER,o=Aa.COPY_WRITE_BUFFER,a=this._gl;a.bindBuffer(o,this._buffer),a.bindBuffer(r,e._buffer),a.copyBufferSubData(r,o,t,i,n),a.bindBuffer(o,null),a.bindBuffer(r,null)},Wa.prototype.getBufferData=function(e,t,i,n){if(t=Sa(t,0),i=Sa(i,0),!this._webgl2)throw new Ea("A WebGL 2 context is required.");if(!wa(e))throw new Ea("arrayView is required.");var r,o,a=e.byteLength;if(wa(n)?(r=n,wa(a)?o=1:(a=e.length,o=e.BYTES_PER_ELEMENT)):wa(a)?(r=a-i,o=1):(r=(a=e.length)-i,o=e.BYTES_PER_ELEMENT),i<0||i>a)throw new Ea("destinationOffset must be greater than zero and less than the arrayView length.");if(i+r>a)throw new Ea("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new Ea("sourceOffset must be greater than zero and less than the buffers size.");if(t+r*o>this._sizeInBytes)throw new Ea("sourceOffset + length must be less than the buffers size.");var s=this._gl,l=Aa.COPY_READ_BUFFER;s.bindBuffer(l,this._buffer),s.getBufferSubData(l,t,e,i,n),s.bindBuffer(l,null)},Wa.prototype.isDestroyed=function(){return!1},Wa.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),this.context.memorySize-=this.sizeInBytes,ka(this)};var Ha,qa=(Ha=!0,function(e,t){var i=Ha?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ha=!1,i}),ja=qa(void 0,(function(){return ja.toString().search("(((.+)+)+)+$").toString().constructor(ja).search("(((.+)+)+)+$")}));function Ya(){}ja(),Ya.ALPHA_DISABLE=0,Ya.ALPHA_ADD=1,Ya.ALPHA_COMBINE=2,Ya.ALPHA_SUBTRACT=3,Ya.ALPHA_MULTIPLY=4,Ya.ALPHA_MAXIMIZED=5,Ya.ALPHA_ONEONE=6,Ya.ALPHA_PREMULTIPLIED=7,Ya.ALPHA_PREMULTIPLIED_PORTERDUFF=8,Ya.ALPHA_INTERPOLATE=9,Ya.ALPHA_SCREENMODE=10,Ya.ALPHA_ONEONE_ONEONE=11,Ya.ALPHA_ALPHATOCOLOR=12,Ya.ALPHA_REVERSEONEMINUS=13,Ya.ALPHA_SRC_DSTONEMINUSSRCALPHA=14,Ya.ALPHA_ONEONE_ONEZERO=15,Ya.ALPHA_EXCLUSION=16,Ya.ALPHA_LAYER_ACCUMULATE=17,Ya.ALPHA_EQUATION_ADD=0,Ya.ALPHA_EQUATION_SUBSTRACT=1,Ya.ALPHA_EQUATION_REVERSE_SUBTRACT=2,Ya.ALPHA_EQUATION_MAX=3,Ya.ALPHA_EQUATION_MIN=4,Ya.ALPHA_EQUATION_DARKEN=5,Ya.DELAYLOADSTATE_NONE=0,Ya.DELAYLOADSTATE_LOADED=1,Ya.DELAYLOADSTATE_LOADING=2,Ya.DELAYLOADSTATE_NOTLOADED=4,Ya.NEVER=512,Ya.ALWAYS=519,Ya.LESS=513,Ya.EQUAL=514,Ya.LEQUAL=515,Ya.GREATER=516,Ya.GEQUAL=518,Ya.NOTEQUAL=517,Ya.KEEP=7680,Ya.ZERO=0,Ya.REPLACE=7681,Ya.INCR=7682,Ya.DECR=7683,Ya.INVERT=5386,Ya.INCR_WRAP=34055,Ya.DECR_WRAP=34056,Ya.FRONT=0,Ya.BACK=1,Ya.TEXTURE_CLAMP_ADDRESSMODE=0,Ya.TEXTURE_WRAP_ADDRESSMODE=1,Ya.TEXTURE_MIRROR_ADDRESSMODE=2,Ya.TEXTURE_CREATIONFLAG_STORAGE=1,Ya.TEXTUREFORMAT_ALPHA=0,Ya.TEXTUREFORMAT_LUMINANCE=1,Ya.TEXTUREFORMAT_LUMINANCE_ALPHA=2,Ya.TEXTUREFORMAT_RGB=4,Ya.TEXTUREFORMAT_RGBA=5,Ya.TEXTUREFORMAT_RED=6,Ya.TEXTUREFORMAT_R=6,Ya.TEXTUREFORMAT_RG=7,Ya.TEXTUREFORMAT_RED_INTEGER=8,Ya.TEXTUREFORMAT_R_INTEGER=8,Ya.TEXTUREFORMAT_RG_INTEGER=9,Ya.TEXTUREFORMAT_RGB_INTEGER=10,Ya.TEXTUREFORMAT_RGBA_INTEGER=11,Ya.TEXTUREFORMAT_BGRA=12,Ya.TEXTUREFORMAT_DEPTH24_STENCIL8=13,Ya.TEXTUREFORMAT_DEPTH32_FLOAT=14,Ya.TEXTUREFORMAT_DEPTH16=15,Ya.TEXTUREFORMAT_DEPTH24=16,Ya.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8=17,Ya.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8=18,Ya.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM=36492,Ya.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM=36493,Ya.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT=36495,Ya.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT=36494,Ya.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5=33779,Ya.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919,Ya.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3=33778,Ya.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918,Ya.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1=33777,Ya.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1=33776,Ya.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917,Ya.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT=35916,Ya.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4=37808,Ya.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840,Ya.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL=36196,Ya.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2=37492,Ya.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2=37493,Ya.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494,Ya.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495,Ya.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC=37496,Ya.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497,Ya.TEXTURETYPE_UNSIGNED_BYTE=0,Ya.TEXTURETYPE_UNSIGNED_INT=0,Ya.TEXTURETYPE_FLOAT=1,Ya.TEXTURETYPE_HALF_FLOAT=2,Ya.TEXTURETYPE_BYTE=3,Ya.TEXTURETYPE_SHORT=4,Ya.TEXTURETYPE_UNSIGNED_SHORT=5,Ya.TEXTURETYPE_INT=6,Ya.TEXTURETYPE_UNSIGNED_INTEGER=7,Ya.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,Ya.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,Ya.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,Ya.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,Ya.TEXTURETYPE_UNSIGNED_INT_24_8=12,Ya.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,Ya.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,Ya.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,Ya.TEXTURETYPE_UNDEFINED=16,Ya.TEXTURE_NEAREST_SAMPLINGMODE=1,Ya.TEXTURE_NEAREST_NEAREST=1,Ya.TEXTURE_BILINEAR_SAMPLINGMODE=2,Ya.TEXTURE_LINEAR_LINEAR=2,Ya.TEXTURE_TRILINEAR_SAMPLINGMODE=3,Ya.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,Ya.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,Ya.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,Ya.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,Ya.TEXTURE_NEAREST_LINEAR=7,Ya.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,Ya.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,Ya.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,Ya.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,Ya.TEXTURE_LINEAR_NEAREST=12,Ya.TEXTURE_EXPLICIT_MODE=0,Ya.TEXTURE_SPHERICAL_MODE=1,Ya.TEXTURE_PLANAR_MODE=2,Ya.TEXTURE_CUBIC_MODE=3,Ya.TEXTURE_PROJECTION_MODE=4,Ya.TEXTURE_SKYBOX_MODE=5,Ya.TEXTURE_INVCUBIC_MODE=6,Ya.TEXTURE_EQUIRECTANGULAR_MODE=7,Ya.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,Ya.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,Ya.TEXTURE_FILTERING_QUALITY_OFFLINE=4096,Ya.TEXTURE_FILTERING_QUALITY_HIGH=64,Ya.TEXTURE_FILTERING_QUALITY_MEDIUM=16,Ya.TEXTURE_FILTERING_QUALITY_LOW=8,Ya.SCALEMODE_FLOOR=1,Ya.SCALEMODE_NEAREST=2,Ya.SCALEMODE_CEILING=3,Ya.MATERIAL_TextureDirtyFlag=1,Ya.MATERIAL_LightDirtyFlag=2,Ya.MATERIAL_FresnelDirtyFlag=4,Ya.MATERIAL_AttributesDirtyFlag=8,Ya.MATERIAL_MiscDirtyFlag=16,Ya.MATERIAL_PrePassDirtyFlag=32,Ya.MATERIAL_AllDirtyFlag=63,Ya.MATERIAL_TriangleFillMode=0,Ya.MATERIAL_WireFrameFillMode=1,Ya.MATERIAL_PointFillMode=2,Ya.MATERIAL_PointListDrawMode=3,Ya.MATERIAL_LineListDrawMode=4,Ya.MATERIAL_LineLoopDrawMode=5,Ya.MATERIAL_LineStripDrawMode=6,Ya.MATERIAL_TriangleStripDrawMode=7,Ya.MATERIAL_TriangleFanDrawMode=8,Ya.MATERIAL_ClockWiseSideOrientation=0,Ya.MATERIAL_CounterClockWiseSideOrientation=1,Ya.ACTION_NothingTrigger=0,Ya.ACTION_OnPickTrigger=1,Ya.ACTION_OnLeftPickTrigger=2,Ya.ACTION_OnRightPickTrigger=3,Ya.ACTION_OnCenterPickTrigger=4,Ya.ACTION_OnPickDownTrigger=5,Ya.ACTION_OnDoublePickTrigger=6,Ya.ACTION_OnPickUpTrigger=7,Ya.ACTION_OnPickOutTrigger=16,Ya.ACTION_OnLongPressTrigger=8,Ya.ACTION_OnPointerOverTrigger=9,Ya.ACTION_OnPointerOutTrigger=10,Ya.ACTION_OnEveryFrameTrigger=11,Ya.ACTION_OnIntersectionEnterTrigger=12,Ya.ACTION_OnIntersectionExitTrigger=13,Ya.ACTION_OnKeyDownTrigger=14,Ya.ACTION_OnKeyUpTrigger=15,Ya.PARTICLES_BILLBOARDMODE_Y=2,Ya.PARTICLES_BILLBOARDMODE_ALL=7,Ya.PARTICLES_BILLBOARDMODE_STRETCHED=8,Ya.MESHES_CULLINGSTRATEGY_STANDARD=0,Ya.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,Ya.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=2,Ya.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=3,Ya.SCENELOADER_NO_LOGGING=0,Ya.SCENELOADER_MINIMAL_LOGGING=1,Ya.SCENELOADER_SUMMARY_LOGGING=2,Ya.SCENELOADER_DETAILED_LOGGING=3,Ya.PREPASS_IRRADIANCE_TEXTURE_TYPE=0,Ya.PREPASS_POSITION_TEXTURE_TYPE=1,Ya.PREPASS_VELOCITY_TEXTURE_TYPE=2,Ya.PREPASS_REFLECTIVITY_TEXTURE_TYPE=3,Ya.PREPASS_COLOR_TEXTURE_TYPE=4,Ya.PREPASS_DEPTH_TEXTURE_TYPE=5,Ya.PREPASS_NORMAL_TEXTURE_TYPE=6,Ya.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE=7,Ya.BUFFER_CREATIONFLAG_READ=1,Ya.BUFFER_CREATIONFLAG_WRITE=2,Ya.BUFFER_CREATIONFLAG_READWRITE=3,Ya.BUFFER_CREATIONFLAG_UNIFORM=4,Ya.BUFFER_CREATIONFLAG_VERTEX=8,Ya.BUFFER_CREATIONFLAG_INDEX=16,Ya.BUFFER_CREATIONFLAG_STORAGE=32,Ya.RENDERPASS_MAIN=0,Ya.INPUT_ALT_KEY=18,Ya.INPUT_CTRL_KEY=17,Ya.INPUT_META_KEY1=91,Ya.INPUT_META_KEY2=92,Ya.INPUT_META_KEY3=93,Ya.INPUT_SHIFT_KEY=16,Ya.SNAPSHOTRENDERING_STANDARD=0,Ya.SNAPSHOTRENDERING_FAST=1,Ya.PERSPECTIVE_CAMERA=0,Ya.ORTHOGRAPHIC_CAMERA=1,Ya.FOVMODE_VERTICAL_FIXED=0,Ya.FOVMODE_HORIZONTAL_FIXED=1,Ya.RIG_MODE_NONE=0,Ya.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,Ya.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,Ya.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,Ya.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,Ya.RIG_MODE_STEREOSCOPIC_INTERLACED=14,Ya.RIG_MODE_VR=20,Ya.RIG_MODE_WEBVR=21,Ya.RIG_MODE_CUSTOM=22,Ya.MAX_SUPPORTED_UV_SETS=6,Ya.GL_ALPHA_EQUATION_ADD=32774,Ya.GL_ALPHA_EQUATION_MIN=32775,Ya.GL_ALPHA_EQUATION_MAX=32776,Ya.GL_ALPHA_EQUATION_SUBTRACT=32778,Ya.GL_ALPHA_EQUATION_REVERSE_SUBTRACT=32779,Ya.GL_ALPHA_FUNCTION_SRC=768,Ya.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR=769,Ya.GL_ALPHA_FUNCTION_SRC_ALPHA=770,Ya.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA=771,Ya.GL_ALPHA_FUNCTION_DST_ALPHA=772,Ya.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA=773,Ya.GL_ALPHA_FUNCTION_DST_COLOR=774,Ya.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR=775,Ya.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED=776,Ya.GL_ALPHA_FUNCTION_CONSTANT_COLOR=32769,Ya.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR=32770,Ya.GL_ALPHA_FUNCTION_CONSTANT_ALPHA=32771,Ya.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA=32772,Ya.SnippetUrl="";var Xa,Ka=(Xa=!0,function(e,t){var i=Xa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Xa=!1,i}),Qa=Ka(void 0,(function(){return Qa.toString().search("(((.+)+)+)+$").toString().constructor(Qa).search("(((.+)+)+)+$")}));function Za(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=Za._Counter++}Qa(),Object.defineProperty(Za.prototype,"underlyingResource",{get:function(){return null},enumerable:!1,configurable:!0}),Za._Counter=0;var Ja,es=(Ja=!0,function(e,t){var i=Ja?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ja=!1,i}),ts=es(void 0,(function(){return ts.toString().search("(((.+)+)+)+$").toString().constructor(ts).search("(((.+)+)+)+$")}));function is(e,t,i,n,r,o,a,s){void 0===n&&(n=0),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),this._isAlreadyOwned=!1,e.getScene?this._engine=e.getScene().getEngine():this._engine=e,this._updatable=i,this._instanced=o,this._divisor=s||1,t instanceof Za?(this._data=null,this._buffer=t):(this._data=t,this._buffer=null),this.byteStride=a?n:n*Float32Array.BYTES_PER_ELEMENT,!r&&this.create()}function ns(e,t,i,n,r,o,a,s,l,u,c,h,d,f){if(void 0===c&&(c=!1),void 0===h&&(h=!1),void 0===d&&(d=1),void 0===f&&(f=!1),t instanceof is?(this._buffer=t,this._ownsBuffer=f):(this._buffer=new is(e,t,n,o,r,a,h),this._ownsBuffer=!0),this.uniqueId=ns._Counter++,this._kind=i,null==u){var p=this.getData();this.type=ns.FLOAT,p instanceof Int8Array?this.type=ns.BYTE:p instanceof Uint8Array?this.type=ns.UNSIGNED_BYTE:p instanceof Int16Array?this.type=ns.SHORT:p instanceof Uint16Array?this.type=ns.UNSIGNED_SHORT:p instanceof Int32Array?this.type=ns.INT:p instanceof Uint32Array&&(this.type=ns.UNSIGNED_INT)}else this.type=u;var _=ns.GetTypeByteLength(this.type);h?(this._size=l||(o?o/_:ns.DeduceStride(i)),this.byteStride=o||this._buffer.byteStride||this._size*_,this.byteOffset=s||0):(this._size=l||o||ns.DeduceStride(i),this.byteStride=o?o*_:this._buffer.byteStride||this._size*_,this.byteOffset=(s||0)*_),this.normalized=c,this._instanced=void 0!==a&&a,this._instanceDivisor=a?d:0,this._computeHashCode()}ts(),is.prototype.createVertexBuffer=function(e,t,i,n,r,o,a){void 0===o&&(o=!1);var s=o?t:t*Float32Array.BYTES_PER_ELEMENT,l=n?o?n:n*Float32Array.BYTES_PER_ELEMENT:this.byteStride;return new ns(this._engine,this,e,this._updatable,!0,l,void 0===r?this._instanced:r,s,i,void 0,void 0,!0,this._divisor||a)},is.prototype.isUpdatable=function(){return this._updatable},is.prototype.getData=function(){return this._data},is.prototype.getBuffer=function(){return this._buffer},is.prototype.getStrideSize=function(){return this.byteStride/Float32Array.BYTES_PER_ELEMENT},is.prototype.create=function(e){void 0===e&&(e=null),!e&&this._buffer||(e=e||this._data)&&(this._buffer?this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e),this._data=e):this._updatable?(this._buffer=this._engine.createDynamicVertexBuffer(e),this._data=e):this._buffer=this._engine.createVertexBuffer(e))},is.prototype._rebuild=function(){this._buffer=null,this.create(this._data)},is.prototype.update=function(e){this.create(e)},is.prototype.updateDirectly=function(e,t,i,n){void 0===n&&(n=!1),this._buffer&&this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e,n?t:t*Float32Array.BYTES_PER_ELEMENT,i?i*this.byteStride:void 0),this._data=0===t&&void 0===i?e:null)},is.prototype._increaseReferences=function(){this._buffer&&(this._isAlreadyOwned?this._buffer.references++:this._isAlreadyOwned=!0)},is.prototype.dispose=function(){this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null,this._data=null)},Object.defineProperty(ns.prototype,"instanceDivisor",{get:function(){return this._instanceDivisor},set:function(e){this._instanceDivisor=e,this._instanced=0!=e,this._computeHashCode()},enumerable:!1,configurable:!0}),ns.prototype._computeHashCode=function(){this.hashCode=(this.type-5120<<0)+((this.normalized?1:0)<<3)+(this._size<<4)+((this._instanced?1:0)<<6)+(this.byteStride<<12)},ns.prototype._rebuild=function(){this._buffer&&this._buffer._rebuild()},ns.prototype.getKind=function(){return this._kind},ns.prototype.isUpdatable=function(){return this._buffer.isUpdatable()},ns.prototype.getData=function(){return this._buffer.getData()},ns.prototype.getFloatData=function(e,t){var i=this.getData();if(!i)return null;var n=this.getSize()*ns.GetTypeByteLength(this.type),r=e*this.getSize();if(this.type!==ns.FLOAT||this.byteStride!==n){var o=new Float32Array(r);return this.forEach(r,(function(e,t){return o[t]=e})),o}if(!(i instanceof Array||i instanceof Float32Array)||0!==this.byteOffset||i.length!==r){if(i instanceof Array){var a=this.byteOffset/4;return i.slice(a,a+r)}if(i instanceof ArrayBuffer)return new Float32Array(i,this.byteOffset,r);if(a=i.byteOffset+this.byteOffset,t){var s=new Float32Array(r),l=new Float32Array(i.buffer,a,r);return s.set(l),s}var u=a%4;return u&&(a=Math.max(0,a-u)),new Float32Array(i.buffer,a,r)}return t?i.slice():i},ns.prototype.getBuffer=function(){return this._buffer.getBuffer()},ns.prototype.getStrideSize=function(){return this.byteStride/ns.GetTypeByteLength(this.type)},ns.prototype.getOffset=function(){return this.byteOffset/ns.GetTypeByteLength(this.type)},ns.prototype.getSize=function(e){return void 0===e&&(e=!1),e?this._size*ns.GetTypeByteLength(this.type):this._size},ns.prototype.getIsInstanced=function(){return this._instanced},ns.prototype.getInstanceDivisor=function(){return this._instanceDivisor},ns.prototype.create=function(e){this._buffer.create(e)},ns.prototype.update=function(e){this._buffer.update(e)},ns.prototype.updateDirectly=function(e,t,i){void 0===i&&(i=!1),this._buffer.updateDirectly(e,t,void 0,i)},ns.prototype.dispose=function(){this._ownsBuffer&&this._buffer.dispose()},ns.prototype.forEach=function(e,t){ns.ForEach(this._buffer.getData(),this.byteOffset,this.byteStride,this._size,this.type,e,this.normalized,t)},ns.DeduceStride=function(e){switch(e){case ns.UVKind:case ns.UV2Kind:case ns.UV3Kind:case ns.UV4Kind:case ns.UV5Kind:case ns.UV6Kind:return 2;case ns.NormalKind:case ns.PositionKind:return 3;case ns.ColorKind:case ns.MatricesIndicesKind:case ns.MatricesIndicesExtraKind:case ns.MatricesWeightsKind:case ns.MatricesWeightsExtraKind:case ns.TangentKind:return 4;default:throw new Error("Invalid kind '"+e+"'")}},ns.GetTypeByteLength=function(e){switch(e){case ns.BYTE:case ns.UNSIGNED_BYTE:return 1;case ns.SHORT:case ns.UNSIGNED_SHORT:return 2;case ns.INT:case ns.UNSIGNED_INT:case ns.FLOAT:return 4;default:throw new Error("Invalid type '".concat(e,"'"))}},ns.ForEach=function(e,t,i,n,r,o,a,s){if(e instanceof Array)for(var l=t/4,u=i/4,c=0;c<o;c+=n){for(var h=0;h<n;h++)s(e[l+h],c+h);l+=u}else{var d=e instanceof ArrayBuffer?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),f=ns.GetTypeByteLength(r);for(c=0;c<o;c+=n){var p=t;for(h=0;h<n;h++)s(ns._GetFloatValue(d,r,p,a),c+h),p+=f;t+=i}}},ns._GetFloatValue=function(e,t,i,n){switch(t){case ns.BYTE:var r=e.getInt8(i);return n&&(r=Math.max(r/127,-1)),r;case ns.UNSIGNED_BYTE:return r=e.getUint8(i),n&&(r/=255),r;case ns.SHORT:return r=e.getInt16(i,!0),n&&(r=Math.max(r/32767,-1)),r;case ns.UNSIGNED_SHORT:return r=e.getUint16(i,!0),n&&(r/=65535),r;case ns.INT:return e.getInt32(i,!0);case ns.UNSIGNED_INT:return e.getUint32(i,!0);case ns.FLOAT:return e.getFloat32(i,!0);default:throw new Error("Invalid component type ".concat(t))}},ns._Counter=0,ns.BYTE=5120,ns.UNSIGNED_BYTE=5121,ns.SHORT=5122,ns.UNSIGNED_SHORT=5123,ns.INT=5124,ns.UNSIGNED_INT=5125,ns.FLOAT=5126,ns.PositionKind="position",ns.NormalKind="normal",ns.TangentKind="tangent",ns.UVKind="uv",ns.UV2Kind="uv2",ns.UV3Kind="uv3",ns.UV4Kind="uv4",ns.UV5Kind="uv5",ns.UV6Kind="uv6",ns.ColorKind="color",ns.ColorInstanceKind="instanceColor",ns.MatricesIndicesKind="matricesIndices",ns.MatricesWeightsKind="matricesWeights",ns.MatricesIndicesExtraKind="matricesIndicesExtra",ns.MatricesWeightsExtraKind="matricesWeightsExtra";var rs,os=(rs=!0,function(e,t){var i=rs?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return rs=!1,i}),as=os(void 0,(function(){return as.toString().search("(((.+)+)+)+$").toString().constructor(as).search("(((.+)+)+)+$")}));function ss(e,t,i){void 0===i&&(i=Ya.BUFFER_CREATIONFLAG_READWRITE),this._engine=e,this._engine._storageBuffers.push(this),this._create(t,i)}function ls(e){var t=(e=Sa(e,Sa.EMPTY_OBJECT)).context,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=wa(n);a?r=n.byteLength:n=new Uint8Array(r);var s=Ya.BUFFER_CREATIONFLAG_STORAGE;wa(o)&&(o==za.STREAM_DRAW||o==za.STATIC_DRAW?s|=Ya.BUFFER_CREATIONFLAG_WRITE:o==za.DYNAMIC_DRAW&&(s|=Ya.BUFFER_CREATIONFLAG_READWRITE)),wa(i)?i==Aa.ELEMENT_ARRAY_BUFFER?(n instanceof Uint8Array&&(e.indexDatatype==Ga.UNSIGNED_INT?n=new Uint32Array(n.buffer,n.byteOffset,n.byteLength/4):e.indexDatatype==Ga.UNSIGNED_SHORT&&(n=new Uint16Array(n.buffer,n.byteOffset,n.byteLength/2))),this._dataBuffer=t.engine.createIndexBuffer(n)):i==Aa.ARRAY_BUFFER?(this._dataBuffer=new is(t.engine,n,!0),this._dataBuffer._data=null):console.log("BufferGPU not supported bufferTarget"):(this._dataBuffer=new ss(t.engine,r,s),a&&this._dataBuffer.update(n,0,r)),this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this.context=e.context,e.context.memorySize+=r}function us(e){if(e=Sa(e,Sa.EMPTY_OBJECT),Oa.defined("options.context",e.context),!wa(e.typedArray)&&!wa(e.sizeInBytes))throw new Ea("Either options.sizeInBytes or options.typedArray is required.");if(wa(e.typedArray)&&wa(e.sizeInBytes))throw new Ea("Cannot pass in both options.sizeInBytes and options.typedArray.");wa(e.typedArray)&&(Oa.typeOf.object("options.typedArray",e.typedArray),Oa.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),e.context.webgpu?this._inner=new ls(e):this._inner=new Wa(e),this.vertexArrayDestroyable=!0}function cs(e,t){this.x=Sa(e,0),this.y=Sa(t,0)}as(),ss.prototype._create=function(e,t){this._bufferSize=e,this._creationFlags=t,this._buffer=this._engine.createStorageBuffer(e,t)},ss.prototype._rebuild=function(){this._create(this._bufferSize,this._creationFlags)},ss.prototype.getBuffer=function(){return this._buffer},ss.prototype.update=function(e,t,i){this._buffer&&this._engine.updateStorageBuffer(this._buffer,e,t,i)},ss.prototype.read=function(e,t,i){return this._engine.readFromStorageBuffer(this._buffer,e,t,i)},ss.prototype.dispose=function(){var e=this._engine._storageBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._engine._releaseBuffer(this._buffer),this._buffer=null},Object.defineProperties(ls.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}},dataBuffer:{get:function(){return this._dataBuffer}}}),ls.prototype._getBuffer=function(){return console.log("BufferGPU.prototype._getBuffer"),this._dataBuffer},ls.prototype.copyFromArrayView=function(e,t){this._dataBuffer.updateDirectly(e,t,null,!0)},ls.prototype.copyFromBuffer=function(e,t,i,n){console.log("BufferGPU.prototype.copyFromBuffer")},ls.prototype.getBufferData=function(e,t,i,n){console.log("BufferGPU.prototype.getBufferData")},ls.prototype.isDestroyed=function(){return!1},ls.prototype.destroy=function(){return this._bufferTarget!==Aa.ELEMENT_ARRAY_BUFFER?this._dataBuffer.dispose():this.context._engine._releaseBuffer(this._dataBuffer),this.context.memorySize-=this.sizeInBytes,ka(this)},us.createVertexBuffer=function(e){return Oa.defined("options.context",e.context),new us({context:e.context,bufferTarget:Aa.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},us.createIndexBuffer=function(e){if(Oa.defined("options.context",e.context),!Ga.validate(e.indexDatatype))throw new Ea("Invalid indexDatatype.");if(e.indexDatatype===Ga.UNSIGNED_INT&&!e.context.elementIndexUint)throw new Ea("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");var t=e.context,i=e.indexDatatype,n=Ga.getSizeInBytes(i),r=new us({context:t,bufferTarget:Aa.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage,indexDatatype:i}),o=r.sizeInBytes/n;return Object.defineProperties(r,{indexDatatype:{get:function(){return i}},bytesPerIndex:{get:function(){return n}},numberOfIndices:{get:function(){return o}}}),r},Object.defineProperties(us.prototype,{sizeInBytes:{get:function(){return this._inner.sizeInBytes}},usage:{get:function(){return this._inner.usage}}}),us.prototype._getBuffer=function(){return this._inner._getBuffer()},us.prototype.copyFromArrayView=function(e,t){this._inner.copyFromArrayView(e,t)},us.prototype.copyFromBuffer=function(e,t,i,n){this._inner.copyFromBuffer(e,t,i,n)},us.prototype.getBufferData=function(e,t,i,n){this._inner.getBufferData(e,t,i,n)},us.prototype.isDestroyed=function(){return!1},us.prototype.destroy=function(){return this._inner.destroy(),ka(this)},cs.fromElements=function(e,t,i){return wa(i)?(i.x=e,i.y=t,i):new cs(e,t)},cs.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t):new cs(e.x,e.y)},cs.fromCartesian3=cs.clone,cs.fromCartesian4=cs.clone,cs.packedLength=2,cs.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i]=e.y,t},cs.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new cs),i.x=e[t++],i.y=e[t],i},cs.packArray=function(e,t){Oa.defined("array",e);var i=e.length,n=2*i;if(wa(t)){if(!Array.isArray(t)&&t.length!==n)throw new Ea("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)cs.pack(e[r],t,2*r);return t},cs.unpackArray=function(e,t){if(Oa.defined("array",e),Oa.typeOf.number.greaterThanOrEquals("array.length",e.length,2),e.length%2!=0)throw new Ea("array length must be a multiple of 2.");var i=e.length;wa(t)?t.length=i/2:t=new Array(i/2);for(var n=0;n<i;n+=2){var r=n/2;t[r]=cs.unpack(e,n,t[r])}return t},cs.fromArray=cs.unpack,cs.maximumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.max(e.x,e.y)},cs.minimumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.min(e.x,e.y)},cs.minimumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i},cs.maximumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i},cs.magnitudeSquared=function(e){return Oa.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y},cs.magnitude=function(e){return Math.sqrt(cs.magnitudeSquared(e))};var hs=new cs;cs.distance=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),cs.subtract(e,t,hs),cs.magnitude(hs)},cs.distanceSquared=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),cs.subtract(e,t,hs),cs.magnitudeSquared(hs)},cs.normalize=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=cs.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,isNaN(t.x)||isNaN(t.y))throw new Ea("normalized result is not a number");return t},cs.dot=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),e.x*t.x+e.y*t.y},cs.multiplyComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i},cs.divideComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i},cs.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i},cs.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i},cs.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i},cs.divideByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i},cs.negate=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t},cs.abs=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var ds=new cs;cs.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),cs.multiplyByScalar(t,i,ds),n=cs.multiplyByScalar(e,1-i,n),cs.add(ds,n,n)};var fs=new cs,ps=new cs;cs.angleBetween=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),cs.normalize(e,fs),cs.normalize(t,ps),Ba.acosClamped(cs.dot(fs,ps))};var _s=new cs;function ms(e,t,i){this.x=Sa(e,0),this.y=Sa(t,0),this.z=Sa(i,0)}cs.mostOrthogonalAxis=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=cs.normalize(e,_s);return cs.abs(i,i),t=i.x<=i.y?cs.clone(cs.UNIT_X,t):cs.clone(cs.UNIT_Y,t)},cs.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y},cs.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]},cs.equalsEpsilon=function(e,t,i,n){return e===t||wa(e)&&wa(t)&&Ba.equalsEpsilon(e.x,t.x,i,n)&&Ba.equalsEpsilon(e.y,t.y,i,n)},cs.ZERO=Object.freeze(new cs(0,0)),cs.UNIT_X=Object.freeze(new cs(1,0)),cs.UNIT_Y=Object.freeze(new cs(0,1)),cs.prototype.clone=function(e){return cs.clone(this,e)},cs.prototype.equals=function(e){return cs.equals(this,e)},cs.prototype.equalsEpsilon=function(e,t,i){return cs.equalsEpsilon(this,e,t,i)},cs.prototype.toString=function(){return"("+this.x+", "+this.y+")"},cs.prototype.toArray=function(e,t){cs.pack(this,e,t)},ms.fromSpherical=function(e,t){Oa.typeOf.object("spherical",e),wa(t)||(t=new ms);var i=e.clock,n=e.cone,r=Sa(e.magnitude,1),o=r*Math.sin(n);return t.x=o*Math.cos(i),t.y=o*Math.sin(i),t.z=r*Math.cos(n),t},ms.fromElements=function(e,t,i,n){return wa(n)?(n.x=e,n.y=t,n.z=i,n):new ms(e,t,i)},ms.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new ms(e.x,e.y,e.z)},ms.fromCartesian4=ms.clone,ms.packedLength=3,ms.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i++]=e.y,t[i]=e.z,t},ms.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new ms),i.x=e[t++],i.y=e[t++],i.z=e[t],i},ms.packArray=function(e,t){Oa.defined("array",e);var i=e.length,n=3*i;if(wa(t)){if(!Array.isArray(t)&&t.length!==n)throw new Ea("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)ms.pack(e[r],t,3*r);return t},ms.unpackArray=function(e,t){if(Oa.defined("array",e),Oa.typeOf.number.greaterThanOrEquals("array.length",e.length,3),e.length%3!=0)throw new Ea("array length must be a multiple of 3.");var i=e.length;wa(t)?t.length=i/3:t=new Array(i/3);for(var n=0;n<i;n+=3){var r=n/3;t[r]=ms.unpack(e,n,t[r])}return t},ms.fromArray=ms.unpack,ms.maximumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z)},ms.minimumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z)},ms.minimumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i},ms.maximumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i},ms.magnitudeSquared=function(e){return Oa.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z},ms.magnitude=function(e){return Math.sqrt(ms.magnitudeSquared(e))};var gs=new ms;ms.distance=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),ms.subtract(e,t,gs),ms.magnitude(gs)},ms.distanceSquared=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),ms.subtract(e,t,gs),ms.magnitudeSquared(gs)},ms.normalize=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=ms.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new Ea("normalized result is not a number");return t},ms.dot=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z},ms.multiplyComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i},ms.divideComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i},ms.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i},ms.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i},ms.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i},ms.divideByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i},ms.negate=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t},ms.abs=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var xs=new ms;ms.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),ms.multiplyByScalar(t,i,xs),n=ms.multiplyByScalar(e,1-i,n),ms.add(xs,n,n)};var vs=new ms,ys=new ms;ms.angleBetween=function(e,t){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),ms.normalize(e,vs),ms.normalize(t,ys);var i=ms.dot(vs,ys),n=ms.magnitude(ms.cross(vs,ys,vs));return Math.atan2(n,i)};var $s=new ms;ms.mostOrthogonalAxis=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=ms.normalize(e,$s);return ms.abs(i,i),t=i.x<=i.y?i.x<=i.z?ms.clone(ms.UNIT_X,t):ms.clone(ms.UNIT_Z,t):i.y<=i.z?ms.clone(ms.UNIT_Y,t):ms.clone(ms.UNIT_Z,t)},ms.projectVector=function(e,t,i){Oa.defined("a",e),Oa.defined("b",t),Oa.defined("result",i);var n=ms.dot(e,t)/ms.dot(t,t);return ms.multiplyByScalar(t,n,i)},ms.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},ms.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]},ms.equalsEpsilon=function(e,t,i,n){return e===t||wa(e)&&wa(t)&&Ba.equalsEpsilon(e.x,t.x,i,n)&&Ba.equalsEpsilon(e.y,t.y,i,n)&&Ba.equalsEpsilon(e.z,t.z,i,n)},ms.cross=function(e,t,i){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i);var n=e.x,r=e.y,o=e.z,a=t.x,s=t.y,l=t.z,u=r*l-o*s,c=o*a-n*l,h=n*s-r*a;return i.x=u,i.y=c,i.z=h,i},ms.midpoint=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=.5*(e.x+t.x),i.y=.5*(e.y+t.y),i.z=.5*(e.z+t.z),i},ms.fromDegrees=function(e,t,i,n,r){return Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),e=Ba.toRadians(e),t=Ba.toRadians(t),ms.fromRadians(e,t,i,n,r)};var bs=new ms,Ts=new ms,Cs=new ms(40680631590769,40680631590769,40408299984661.445);ms.fromRadians=function(e,t,i,n,r){Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),i=Sa(i,0);var o=wa(n)?n.radiiSquared:Cs,a=Math.cos(t);bs.x=a*Math.cos(e),bs.y=a*Math.sin(e),bs.z=Math.sin(t),bs=ms.normalize(bs,bs),ms.multiplyComponents(o,bs,Ts);var s=Math.sqrt(ms.dot(bs,Ts));return Ts=ms.divideByScalar(Ts,s,Ts),bs=ms.multiplyByScalar(bs,i,bs),wa(r)||(r=new ms),ms.add(Ts,bs,r)},ms.fromDegreesArray=function(e,t,i){if(Oa.defined("coordinates",e),e.length<2||e.length%2!=0)throw new Ea("the number of coordinates must be a multiple of 2 and at least 2");var n=e.length;wa(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var o=e[r],a=e[r+1],s=r/2;i[s]=ms.fromDegrees(o,a,0,t,i[s])}return i},ms.fromRadiansArray=function(e,t,i){if(Oa.defined("coordinates",e),e.length<2||e.length%2!=0)throw new Ea("the number of coordinates must be a multiple of 2 and at least 2");var n=e.length;wa(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var o=e[r],a=e[r+1],s=r/2;i[s]=ms.fromRadians(o,a,0,t,i[s])}return i},ms.fromDegreesArrayHeights=function(e,t,i){if(Oa.defined("coordinates",e),e.length<3||e.length%3!=0)throw new Ea("the number of coordinates must be a multiple of 3 and at least 3");var n=e.length;wa(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var o=e[r],a=e[r+1],s=e[r+2],l=r/3;i[l]=ms.fromDegrees(o,a,s,t,i[l])}return i},ms.fromRadiansArrayHeights=function(e,t,i){if(Oa.defined("coordinates",e),e.length<3||e.length%3!=0)throw new Ea("the number of coordinates must be a multiple of 3 and at least 3");var n=e.length;wa(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var o=e[r],a=e[r+1],s=e[r+2],l=r/3;i[l]=ms.fromRadians(o,a,s,t,i[l])}return i},ms.ZERO=Object.freeze(new ms(0,0,0)),ms.UNIT_X=Object.freeze(new ms(1,0,0)),ms.UNIT_Y=Object.freeze(new ms(0,1,0)),ms.UNIT_Z=Object.freeze(new ms(0,0,1)),ms.UNIT_XYZ=Object.freeze(new ms(1,1,1)),ms.prototype.clone=function(e){return ms.clone(this,e)},ms.prototype.equals=function(e){return ms.equals(this,e)},ms.prototype.equalsEpsilon=function(e,t,i){return ms.equalsEpsilon(this,e,t,i)},ms.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},ms.prototype.toArray=function(e,t){ms.pack(this,e,t)},ms.globalOffset=new ms(0,0,0);var Ss=new ms,ws=new ms;function Es(e,t,i,n,r){if(!wa(e))throw new Ea("cartesian is required.");if(!wa(t))throw new Ea("oneOverRadii is required.");if(!wa(i))throw new Ea("oneOverRadiiSquared is required.");if(!wa(n))throw new Ea("centerToleranceSquared is required.");var o=e.x,a=e.y,s=e.z,l=t.x,u=t.y,c=t.z,h=o*o*l*l,d=a*a*u*u,f=s*s*c*c,p=h+d+f,_=Math.sqrt(1/p),m=ms.multiplyByScalar(e,_,Ss);if(p<n)return isFinite(_)?ms.clone(m,r):void 0;var g=i.x,x=i.y,v=i.z,y=ws;y.x=m.x*g*2,y.y=m.y*x*2,y.z=m.z*v*2;var $,b,T,C,S,w,E,P=(1-_)*ms.magnitude(e)/(.5*ms.magnitude(y)),A=0;do{A=($=h*(S=(b=1/(1+(P-=A)*g))*b)+d*(w=(T=1/(1+P*x))*T)+f*(E=(C=1/(1+P*v))*C)-1)/(-2*(h*(S*b)*g+d*(w*T)*x+f*(E*C)*v))}while(Math.abs($)>Ba.EPSILON12);return wa(r)?(r.x=o*b,r.y=a*T,r.z=s*C,r):new ms(o*b,a*T,s*C)}function Ps(e,t,i){this.longitude=Sa(e,0),this.latitude=Sa(t,0),this.height=Sa(i,0)}Ps.fromRadians=function(e,t,i,n){return Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),i=Sa(i,0),wa(n)?(n.longitude=e,n.latitude=t,n.height=i,n):new Ps(e,t,i)},Ps.fromDegrees=function(e,t,i,n){return Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),e=Ba.toRadians(e),t=Ba.toRadians(t),Ps.fromRadians(e,t,i,n)};var As=new ms,Ls=new ms,Ms=new ms,Rs=new ms(1/6378137,1/6378137,1/6356752.314245179),Os=new ms(1/40680631590769,1/40680631590769,1/40408299984661.445),Is=Ba.EPSILON1;function Ds(e,t,i,n){t=Sa(t,0),i=Sa(i,0),n=Sa(n,0),Oa.typeOf.number.greaterThanOrEquals("x",t,0),Oa.typeOf.number.greaterThanOrEquals("y",i,0),Oa.typeOf.number.greaterThanOrEquals("z",n,0),e._radii=new ms(t,i,n),e._radiiSquared=new ms(t*t,i*i,n*n),e._radiiToTheFourth=new ms(t*t*t*t,i*i*i*i,n*n*n*n),e._oneOverRadii=new ms(0===t?0:1/t,0===i?0:1/i,0===n?0:1/n),e._oneOverRadiiSquared=new ms(0===t?0:1/(t*t),0===i?0:1/(i*i),0===n?0:1/(n*n)),e._minimumRadius=Math.min(t,i,n),e._maximumRadius=Math.max(t,i,n),e._centerToleranceSquared=Ba.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function Bs(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,Ds(this,e,t,i)}Ps.fromCartesian=function(e,t,i){var n=wa(t)?t.oneOverRadii:Rs,r=wa(t)?t.oneOverRadiiSquared:Os,o=Es(e,n,r,wa(t)?t._centerToleranceSquared:Is,Ls);if(wa(o)){var a=ms.multiplyComponents(o,r,As);a=ms.normalize(a,a);var s=ms.subtract(e,o,Ms),l=Math.atan2(a.y,a.x),u=Math.asin(a.z),c=Ba.sign(ms.dot(s,e))*ms.magnitude(s);return wa(i)?(i.longitude=l,i.latitude=u,i.height=c,i):new Ps(l,u,c)}},Ps.toCartesian=function(e,t,i){return Oa.defined("cartographic",e),ms.fromRadians(e.longitude,e.latitude,e.height,t,i)},Ps.sphericalDistance=function(e,t,i,n){if(Oa.defined("longitudeA",e),Oa.defined("longitudeB",i),Oa.defined("latitudeA",t),Oa.defined("latitudeB",n),e===i&&t===n)return 0;var r=Ba.toRadians(t),o=Ba.toRadians(n),a=Ba.toRadians(e),s=Ba.toRadians(i),l=a*a+r*r,u=s*s+o*o,c=(l+u-((a-s)*(a-s)+(r-o)*(r-o)))/(2*Math.sqrt(l)*Math.sqrt(u));return c=Ba.clamp(c,-1,1),6378137*Math.acos(c)},Ps.clone=function(e,t){if(wa(e))return wa(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new Ps(e.longitude,e.latitude,e.height)},Ps.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},Ps.equalsEpsilon=function(e,t,i){return Oa.typeOf.number("epsilon",i),e===t||wa(e)&&wa(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},Ps.ZERO=Object.freeze(new Ps(0,0,0)),Ps.prototype.clone=function(e){return Ps.clone(this,e)},Ps.prototype.equals=function(e){return Ps.equals(this,e)},Ps.prototype.equalsEpsilon=function(e,t){return Ps.equalsEpsilon(this,e,t)},Ps.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},Object.defineProperties(Bs.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),Bs.clone=function(e,t){if(wa(e)){var i=e._radii;return wa(t)?(ms.clone(i,t._radii),ms.clone(e._radiiSquared,t._radiiSquared),ms.clone(e._radiiToTheFourth,t._radiiToTheFourth),ms.clone(e._oneOverRadii,t._oneOverRadii),ms.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new Bs(i.x,i.y,i.z)}},Bs.fromCartesian3=function(e,t){return wa(t)||(t=new Bs),wa(e)&&Ds(t,e.x,e.y,e.z),t},Bs.WGS84=Object.freeze(new Bs(6378137,6378137,6356752.314245179)),Bs.XIAN80=Object.freeze(new Bs(6378140,6378140,6356755.29)),Bs.CGCS2000=Object.freeze(new Bs(6378137,6378137,6356752.31)),Bs.UNIT_SPHERE=Object.freeze(new Bs(1,1,1)),Bs.MOON=Object.freeze(new Bs(Ba.LUNAR_RADIUS,Ba.LUNAR_RADIUS,Ba.LUNAR_RADIUS)),Bs.prototype.clone=function(e){return Bs.clone(this,e)},Bs.packedLength=ms.packedLength,Bs.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),ms.pack(e._radii,t,i),t},Bs.unpack=function(e,t,i){Oa.defined("array",e),t=Sa(t,0);var n=ms.unpack(e,t);return Bs.fromCartesian3(n,i)},Bs.prototype.geocentricSurfaceNormal=ms.normalize,Bs.prototype.geodeticSurfaceNormalCartographic=function(e,t){Oa.typeOf.object("cartographic",e);var i=e.longitude,n=e.latitude,r=Math.cos(n),o=r*Math.cos(i),a=r*Math.sin(i),s=Math.sin(n);return wa(t)||(t=new ms),t.x=o,t.y=a,t.z=s,ms.normalize(t,t)},Bs.prototype.geodeticSurfaceNormal=function(e,t){return wa(t)||(t=new ms),t=ms.multiplyComponents(e,this._oneOverRadiiSquared,t),ms.normalize(t,t)};var Ns=new ms,Fs=new ms;Bs.prototype.cartographicToCartesian=function(e,t){var i=Ns,n=Fs;this.geodeticSurfaceNormalCartographic(e,i),ms.multiplyComponents(this._radiiSquared,i,n);var r=Math.sqrt(ms.dot(i,n));return ms.divideByScalar(n,r,n),ms.multiplyByScalar(i,e.height,i),wa(t)||(t=new ms),ms.add(n,i,t)},Bs.prototype.cartographicArrayToCartesianArray=function(e,t){Oa.defined("cartographics",e);var i=e.length;wa(t)?t.length=i:t=new Array(i);for(var n=0;n<i;n++)t[n]=this.cartographicToCartesian(e[n],t[n]);return t};var Us=new ms,Gs=new ms,zs=new ms;function Vs(e){this._ellipsoid=Sa(e,Bs.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Bs.prototype.cartesianToCartographic=function(e,t){var i=this.scaleToGeodeticSurface(e,Gs);if(wa(i)){var n=this.geodeticSurfaceNormal(i,Us),r=ms.subtract(e,i,zs),o=Math.atan2(n.y,n.x),a=Math.asin(n.z),s=Ba.sign(ms.dot(r,e))*ms.magnitude(r);return wa(t)?(t.longitude=o,t.latitude=a,t.height=s,t):new Ps(o,a,s)}},Bs.prototype.cartesianArrayToCartographicArray=function(e,t){Oa.defined("cartesians",e);var i=e.length;wa(t)?t.length=i:t=new Array(i);for(var n=0;n<i;++n)t[n]=this.cartesianToCartographic(e[n],t[n]);return t},Bs.prototype.scaleToGeodeticSurface=function(e,t){return Es(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},Bs.prototype.scaleToGeocentricSurface=function(e,t){Oa.typeOf.object("cartesian",e),wa(t)||(t=new ms);var i=e.x,n=e.y,r=e.z,o=this._oneOverRadiiSquared,a=1/Math.sqrt(i*i*o.x+n*n*o.y+r*r*o.z);return ms.multiplyByScalar(e,a,t)},Bs.prototype.transformPositionToScaledSpace=function(e,t){return wa(t)||(t=new ms),ms.multiplyComponents(e,this._oneOverRadii,t)},Bs.prototype.transformPositionFromScaledSpace=function(e,t){return wa(t)||(t=new ms),ms.multiplyComponents(e,this._radii,t)},Bs.prototype.equals=function(e){return this===e||wa(e)&&ms.equals(this._radii,e._radii)},Bs.prototype.toString=function(){return this._radii.toString()},Bs.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,i){if(Oa.typeOf.object("position",e),!Ba.equalsEpsilon(this._radii.x,this._radii.y,Ba.EPSILON15))throw new Ea("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");Oa.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),t=Sa(t,0);var n=this._squaredXOverSquaredZ;if(wa(i)||(i=new ms),i.x=0,i.y=0,i.z=e.z*(1-n),!(Math.abs(i.z)>=this._radii.z-t))return i},Object.defineProperties(Vs.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),Vs.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=e.latitude*i,o=e.height;return wa(t)?(t.x=n,t.y=r,t.z=o,t):new ms(n,r,o)},Vs.prototype.unproject=function(e,t){if(!wa(e))throw new Ea("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=e.y*i,o=e.z;return wa(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new Ps(n,r,o)};var ks={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Ws=Object.freeze(ks);function Hs(e,t,i,n){this.west=Sa(e,0),this.south=Sa(t,0),this.east=Sa(i,0),this.north=Sa(n,0)}Object.defineProperties(Hs.prototype,{width:{get:function(){return Hs.computeWidth(this)}},height:{get:function(){return Hs.computeHeight(this)}}}),Hs.packedLength=4,Hs.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.west,t[i++]=e.south,t[i++]=e.east,t[i]=e.north,t},Hs.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new Hs),i.west=e[t++],i.south=e[t++],i.east=e[t++],i.north=e[t],i},Hs.computeWidth=function(e){Oa.typeOf.object("rectangle",e);var t=e.east,i=e.west;return t<i&&(t+=Ba.TWO_PI),t-i},Hs.computeHeight=function(e){return Oa.typeOf.object("rectangle",e),e.north-e.south},Hs.fromDegrees=function(e,t,i,n,r){return e=Ba.toRadians(Sa(e,0)),t=Ba.toRadians(Sa(t,0)),i=Ba.toRadians(Sa(i,0)),n=Ba.toRadians(Sa(n,0)),wa(r)?(r.west=e,r.south=t,r.east=i,r.north=n,r):new Hs(e,t,i,n)},Hs.fromRadians=function(e,t,i,n,r){return wa(r)?(r.west=Sa(e,0),r.south=Sa(t,0),r.east=Sa(i,0),r.north=Sa(n,0),r):new Hs(e,t,i,n)},Hs.fromCartographicArray=function(e,t){Oa.defined("cartographics",e);for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0,u=e.length;l<u;l++){var c=e[l];i=Math.min(i,c.longitude),n=Math.max(n,c.longitude),a=Math.min(a,c.latitude),s=Math.max(s,c.latitude);var h=c.longitude>=0?c.longitude:c.longitude+Ba.TWO_PI;r=Math.min(r,h),o=Math.max(o,h)}return n-i>o-r&&(i=r,(n=o)>Ba.PI&&(n-=Ba.TWO_PI),i>Ba.PI&&(i-=Ba.TWO_PI)),wa(t)?(t.west=i,t.south=a,t.east=n,t.north=s,t):new Hs(i,a,n,s)},Hs.fromCartesianArray=function(e,t,i){Oa.defined("cartesians",e),t=Sa(t,Bs.WGS84);for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0,c=e.length;u<c;u++){var h=t.cartesianToCartographic(e[u]);n=Math.min(n,h.longitude),r=Math.max(r,h.longitude),s=Math.min(s,h.latitude),l=Math.max(l,h.latitude);var d=h.longitude>=0?h.longitude:h.longitude+Ba.TWO_PI;o=Math.min(o,d),a=Math.max(a,d)}return r-n>a-o&&(n=o,(r=a)>Ba.PI&&(r-=Ba.TWO_PI),n>Ba.PI&&(n-=Ba.TWO_PI)),wa(i)?(i.west=n,i.south=s,i.east=r,i.north=l,i):new Hs(n,s,r,l)},Hs.clone=function(e,t){if(wa(e))return wa(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new Hs(e.west,e.south,e.east,e.north)},Hs.equalsEpsilon=function(e,t,i){return Oa.typeOf.number("absoluteEpsilon",i),e===t||wa(e)&&wa(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},Hs.prototype.clone=function(e){return Hs.clone(this,e)},Hs.prototype.equals=function(e){return Hs.equals(this,e)},Hs.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},Hs.prototype.equalsEpsilon=function(e,t){return Oa.typeOf.number("epsilon",t),Hs.equalsEpsilon(this,e,t)},Hs.validate=function(e){Oa.typeOf.object("rectangle",e);var t=e.north;Oa.typeOf.number.greaterThanOrEquals("north",t,-Ba.PI_OVER_TWO),Oa.typeOf.number.lessThanOrEquals("north",t,Ba.PI_OVER_TWO);var i=e.south;Oa.typeOf.number.greaterThanOrEquals("south",i,-Ba.PI_OVER_TWO),Oa.typeOf.number.lessThanOrEquals("south",i,Ba.PI_OVER_TWO);var n=e.west;Oa.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),Oa.typeOf.number.lessThanOrEquals("west",n,Math.PI);var r=e.east;Oa.typeOf.number.greaterThanOrEquals("east",r,-Math.PI),Oa.typeOf.number.lessThanOrEquals("east",r,Math.PI)},Hs.southwest=function(e,t){return Oa.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new Ps(e.west,e.south)},Hs.northwest=function(e,t){return Oa.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new Ps(e.west,e.north)},Hs.northeast=function(e,t){return Oa.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new Ps(e.east,e.north)},Hs.southeast=function(e,t){return Oa.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new Ps(e.east,e.south)},Hs.center=function(e,t){Oa.typeOf.object("rectangle",e);var i=e.east,n=e.west;i<n&&(i+=Ba.TWO_PI);var r=Ba.negativePiToPi(.5*(n+i)),o=.5*(e.south+e.north);return wa(t)?(t.longitude=r,t.latitude=o,t.height=0,t):new Ps(r,o)},Hs.intersection=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("otherRectangle",t);var n=e.east,r=e.west,o=t.east,a=t.west;n<r&&o>0?n+=Ba.TWO_PI:o<a&&n>0&&(o+=Ba.TWO_PI),n<r&&a<0?a+=Ba.TWO_PI:o<a&&r<0&&(r+=Ba.TWO_PI);var s=Ba.negativePiToPi(Math.max(r,a)),l=Ba.negativePiToPi(Math.min(n,o));if(!((e.west<e.east||t.west<t.east)&&l<=s)){var u=Math.max(e.south,t.south),c=Math.min(e.north,t.north);if(!(u>=c))return wa(i)?(i.west=s,i.south=u,i.east=l,i.north=c,i):new Hs(s,u,l,c)}},Hs.simpleIntersection=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("otherRectangle",t);var n=Math.max(e.west,t.west),r=Math.max(e.south,t.south),o=Math.min(e.east,t.east),a=Math.min(e.north,t.north);if(!(r>=a||n>=o))return wa(i)?(i.west=n,i.south=r,i.east=o,i.north=a,i):new Hs(n,r,o,a)},Hs.union=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("otherRectangle",t),wa(i)||(i=new Hs);var n=e.east,r=e.west,o=t.east,a=t.west;n<r&&o>0?n+=Ba.TWO_PI:o<a&&n>0&&(o+=Ba.TWO_PI),n<r&&a<0?a+=Ba.TWO_PI:o<a&&r<0&&(r+=Ba.TWO_PI);var s=Ba.convertLongitudeRange(Math.min(r,a)),l=Ba.convertLongitudeRange(Math.max(n,o));return i.west=s,i.south=Math.min(e.south,t.south),i.east=l,i.north=Math.max(e.north,t.north),i},Hs.expand=function(e,t,i){return Oa.typeOf.object("rectangle",e),Oa.typeOf.object("cartographic",t),wa(i)||(i=new Hs),i.west=Math.min(e.west,t.longitude),i.south=Math.min(e.south,t.latitude),i.east=Math.max(e.east,t.longitude),i.north=Math.max(e.north,t.latitude),i},Hs.contains=function(e,t){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("cartographic",t);var i=t.longitude,n=t.latitude,r=e.west,o=e.east;return o<r&&(o+=Ba.TWO_PI,i<0&&(i+=Ba.TWO_PI)),(i>r||Ba.equalsEpsilon(i,r,Ba.EPSILON14))&&(i<o||Ba.equalsEpsilon(i,o,Ba.EPSILON14))&&n>=e.south&&n<=e.north};var qs=new Ps;Hs.subsample=function(e,t,i,n){Oa.typeOf.object("rectangle",e),t=Sa(t,Bs.WGS84),i=Sa(i,0),wa(n)||(n=[]);var r=0,o=e.north,a=e.south,s=e.east,l=e.west,u=qs;u.height=i,u.longitude=l,u.latitude=o,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=a,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=o<0?o:a>0?a:0;for(var c=1;c<8;++c)u.longitude=-Math.PI+c*Ba.PI_OVER_TWO,Hs.contains(e,u)&&(n[r]=t.cartographicToCartesian(u,n[r]),r++);return 0===u.latitude&&(u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++),n.length=r,n};var js=new Ps;function Ys(e,t,i,n){this.x=Sa(e,0),this.y=Sa(t,0),this.width=Sa(i,0),this.height=Sa(n,0)}Hs.prototype.contains=function(e){return Hs.contains(this,Hs.southwest(e,js))&&Hs.contains(this,Hs.northwest(e,js))&&Hs.contains(this,Hs.southeast(e,js))&&Hs.contains(this,Hs.northeast(e,js))},Hs.MAX_VALUE=Object.freeze(new Hs(-Math.PI,-Ba.PI_OVER_TWO,Math.PI,Ba.PI_OVER_TWO)),Ys.packedLength=4,Ys.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.width,t[i]=e.height,t},Ys.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new Ys),i.x=e[t++],i.y=e[t++],i.width=e[t++],i.height=e[t],i},Ys.fromPoints=function(e,t){if(wa(t)||(t=new Ys),!wa(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,n=e[0].x,r=e[0].y,o=e[0].x,a=e[0].y,s=1;s<i;s++){var l=e[s],u=l.x,c=l.y;n=Math.min(u,n),o=Math.max(u,o),r=Math.min(c,r),a=Math.max(c,a)}return t.x=n,t.y=r,t.width=o-n,t.height=a-r,t};var Xs=new Vs,Ks=new Ps,Qs=new Ps;Ys.fromRectangle=function(e,t,i){if(wa(i)||(i=new Ys),!wa(e))return i.x=0,i.y=0,i.width=0,i.height=0,i;var n=(t=Sa(t,Xs)).project(Hs.southwest(e,Ks)),r=t.project(Hs.northeast(e,Qs));return cs.subtract(r,n,r),i.x=n.x,i.y=n.y,i.width=r.x,i.height=r.y,i},Ys.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new Ys(e.x,e.y,e.width,e.height)},Ys.union=function(e,t,i){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),wa(i)||(i=new Ys);var n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),o=Math.max(e.x+e.width,t.x+t.width),a=Math.max(e.y+e.height,t.y+t.height);return i.x=n,i.y=r,i.width=o-n,i.height=a-r,i},Ys.expand=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("point",t),i=Ys.clone(e,i);var n=t.x-i.x,r=t.y-i.y;return n>i.width?i.width=n:n<0&&(i.width-=n,i.x=t.x),r>i.height?i.height=r:r<0&&(i.height-=r,i.y=t.y),i},Ys.intersect=function(e,t){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t);var i=e.x,n=e.y,r=t.x,o=t.y;return i>r+t.width||i+e.width<r||n+e.height<o||n>o+t.height?Ws.OUTSIDE:Ws.INTERSECTING},Ys.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},Ys.prototype.clone=function(e){return Ys.clone(this,e)},Ys.prototype.intersect=function(e){return Ys.intersect(this,e)},Ys.prototype.equals=function(e){return Ys.equals(this,e)};var Zs,Js,el,tl,il,nl,rl,ol,al,sl,ll,ul,cl,hl,dl,fl,pl,_l,ml,gl,xl,vl,yl,$l,bl={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},Tl={};function Cl(e,t,i,n){return Sl(e).then(t,i,n)}function Sl(e){var t,i;return e instanceof El?t=e:Ml(e)?(i=Ll(),e.then((function(e){i.resolve(e)}),(function(e){i.reject(e)}),(function(e){i.progress(e)})),t=i.promise):t=Pl(e),t}function wl(e){return Cl(e,Al)}function El(e){this.then=e}function Pl(e){var t=new El((function(t){try{return Sl(t?t(e):e)}catch(e){return Al(e)}}));return t}function Al(e){var t=new El((function(t,i){try{return i?Sl(i(e)):Al(e)}catch(e){return Al(e)}}));return t}function Ll(){var e,t,i,n,r,o;return e=new El(a),t=[],i=[],n=function(e,n,r){var o,a;return o=Ll(),a="function"==typeof r?function(e){try{o.progress(r(e))}catch(e){o.progress(e)}}:function(e){o.progress(e)},t.push((function(t){t.then(e,n).then(o.resolve,o.reject,a)})),i.push(a),o.promise},r=function(e){return Gl(i,e),e},o=function(e){return e=Sl(e),n=e.then,o=Sl,r=Vl,Gl(t,e),i=t=tl,e},{then:a,resolve:s,reject:l,progress:u,promise:e,resolver:{resolve:s,reject:l,progress:u}};function a(e,t,i){return n(e,t,i)}function s(e){return o(e)}function l(e){return o(Al(e))}function u(e){return r(e)}}function Ml(e){return e&&"function"==typeof e.then}function Rl(e,t,i,n,r){return zl(2,arguments),Cl(e,(function(e){var o,a,s,l,u,c,h,d,f,p;if(f=e.length>>>0,o=Math.max(0,Math.min(t,f)),s=[],a=f-o+1,l=[],u=Ll(),o)for(d=u.progress,h=function(e){l.push(e),--a||(c=h=Vl,u.reject(l))},c=function(e){s.push(e),--o||(c=h=Vl,u.resolve(s))},p=0;p<f;++p)p in e&&Cl(e[p],m,_,d);else u.resolve(s);return u.then(i,n,r);function _(e){h(e)}function m(e){c(e)}}))}function Ol(e,t,i,n){return zl(1,arguments),Cl(e,(function(e){var r,o,a,s,l,u,c,h,d;for(c=e.length>>>0,h=e.length>>>0,r=[],o=[],u=(a=Ll()).progress,l=function(e){o.push(e),--h||(s=l=Vl,a.resolve(r))},s=function(e,t){r[t]=e,--h||(s=l=Vl,a.resolve(r))},d=0;d<c;++d)switch(d){case 0:Cl(e[d],_,f,u);break;case 1:Cl(e[d],m,f,u);break;case 2:Cl(e[d],g,f,u);break;case 3:Cl(e[d],x,f,u);break;case 4:Cl(e[d],v,f,u);break;default:Cl(e[d],p,f,u)}return a.then(t,i,n);function f(e){l(e)}function p(e){s(e,0)}function _(e){s(e,0)}function m(e){s(e,1)}function g(e){s(e,2)}function x(e){s(e,3)}function v(e){s(e,4)}}))}function Il(e,t,i,n){return Rl(e,1,(function(e){return t?t(e[0]):e[0]}),i,n)}function Dl(e,t,i,n){return zl(1,arguments),Nl(e,kl).then(t,i,n)}function Bl(){return Nl(arguments,kl)}function Nl(e,t){return Cl(e,(function(e){var i,n,r,o,a,s;if(r=n=e.length>>>0,i=[],s=Ll(),r)for(o=function(e,n){Cl(e,t).then((function(e){i[n]=e,--r||s.resolve(i)}),s.reject)},a=0;a<n;a++)a in e?o(e[a],a):--r;else s.resolve(i);return s.promise}))}function Fl(e,t){var i=el.call(arguments,1);return Cl(e,(function(e){var n;return n=e.length,i[0]=function(e,i,r){return Cl(e,(function(e){return Cl(i,(function(i){return t(e,i,r,n)}))}))},Js.apply(e,i)}))}function Ul(e,t,i){var n=arguments.length>2;return Cl(e,(function(e){return e=n?i:e,t.resolve(e),e}),(function(e){return t.reject(e),Al(e)}),t.progress)}function Gl(e,t){for(var i,n=0;i=e[n++];)i(t)}function zl(e,t){for(var i,n=t.length;n>e;)if(null!=(i=t[--n])&&"function"!=typeof i)throw new Error("arg "+n+" must be a function")}function Vl(){}function kl(e){return e}function Wl(e){for(var t=e.split("."),i=0,n=t.length;i<n;++i)t[i]=parseInt(t[i],10);return t}function Hl(){if(!wa(nl)&&(nl=!1,!Jl())){var e=/ Chrome\/([\.0-9]+)/.exec(il.userAgent);null!==e&&(nl=!0,rl=Wl(e[1]))}return nl}function ql(){return Hl()&&rl}function jl(){if(!wa(ol)&&(ol=!1,!Hl()&&!Jl()&&/ Safari\/[\.0-9]+/.test(il.userAgent))){var e=/ Version\/([\.0-9]+)/.exec(il.userAgent);null!==e&&(ol=!0,al=Wl(e[1]))}return ol}function Yl(){return jl()&&al}function Xl(){if(!wa(sl)){sl=!1;var e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(il.userAgent);null!==e&&(sl=!0,(ll=Wl(e[1])).isNightly=!!e[2])}return sl}function Kl(){return Xl()&&ll}function Ql(){var e;return wa(ul)||(ul=!1,"Microsoft Internet Explorer"===il.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(il.userAgent))&&(ul=!0,cl=Wl(e[1])):"Netscape"===il.appName&&null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(il.userAgent))&&(ul=!0,cl=Wl(e[1]))),ul}function Zl(){return Ql()&&cl}function Jl(){if(!wa(hl)){hl=!1;var e=/ Edge\/([\.0-9]+)/.exec(il.userAgent);null!==e&&(hl=!0,dl=Wl(e[1]))}return hl}function eu(){return Jl()&&dl}function tu(){if(!wa(fl)){fl=!1;var e=/Firefox\/([\.0-9]+)/.exec(il.userAgent);null!==e&&(fl=!0,pl=Wl(e[1]))}return fl}function iu(){return wa(_l)||(_l=/Windows/i.test(il.appVersion)),_l}function nu(){return tu()&&pl}function ru(){return wa(ml)||(ml="object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)),ml}function ou(){return wa(gl)||(gl=!tu()&&typeof PointerEvent<"u"&&(!wa(il.pointerEnabled)||il.pointerEnabled)),gl}function au(){if(!wa(vl)){var e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");var t=e.style.imageRendering;(vl=wa(t)&&""!==t)&&(xl=t)}return vl}function su(){return au()?xl:void 0}function lu(){if(wa($l))return $l.promise;$l=Cl.defer(),Jl()&&(yl=!1,$l.resolve(yl));var e=new Image;return e.onload=function(){yl=e.width>0&&e.height>0,$l.resolve(yl)},e.onerror=function(){yl=!1,$l.resolve(yl)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",$l.promise}function uu(){return wa($l)||lu(),yl}Object.defineProperties(Tl,{element:{get:function(){if(Tl.supportsFullscreen())return document[bl.fullscreenElement]}},changeEventName:{get:function(){if(Tl.supportsFullscreen())return bl.fullscreenchange}},errorEventName:{get:function(){if(Tl.supportsFullscreen())return bl.fullscreenerror}},enabled:{get:function(){if(Tl.supportsFullscreen())return document[bl.fullscreenEnabled]}},fullscreen:{get:function(){if(Tl.supportsFullscreen())return null!==Tl.element}}}),Tl.supportsFullscreen=function(){if(wa(Zs))return Zs;Zs=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return bl.requestFullscreen="requestFullscreen",bl.exitFullscreen="exitFullscreen",bl.fullscreenEnabled="fullscreenEnabled",bl.fullscreenElement="fullscreenElement",bl.fullscreenchange="fullscreenchange",bl.fullscreenerror="fullscreenerror",Zs=!0;for(var t,i=["webkit","moz","o","ms","khtml"],n=0,r=i.length;n<r;++n){var o=i[n];("function"==typeof e[t=o+"RequestFullscreen"]||"function"==typeof e[t=o+"RequestFullScreen"])&&(bl.requestFullscreen=t,Zs=!0),t=o+"ExitFullscreen","function"==typeof document[t]?bl.exitFullscreen=t:(t=o+"CancelFullScreen","function"==typeof document[t]&&(bl.exitFullscreen=t)),t=o+"FullscreenEnabled",void 0!==document[t]?bl.fullscreenEnabled=t:(t=o+"FullScreenEnabled",void 0!==document[t]&&(bl.fullscreenEnabled=t)),t=o+"FullscreenElement",void 0!==document[t]?bl.fullscreenElement=t:(t=o+"FullScreenElement",void 0!==document[t]&&(bl.fullscreenElement=t)),t=o+"fullscreenchange",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenChange"),bl.fullscreenchange=t),t=o+"fullscreenerror",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenError"),bl.fullscreenerror=t)}return Zs},Tl.requestFullscreen=function(e,t){!Tl.supportsFullscreen()||e[bl.requestFullscreen]({vrDisplay:t})},Tl.exitFullscreen=function(){!Tl.supportsFullscreen()||document[bl.exitFullscreen]()},Tl._names=bl,Cl.defer=Ll,Cl.resolve=Sl,Cl.reject=wl,Cl.join=Bl,Cl.all=Dl,Cl.map=Nl,Cl.reduce=Fl,Cl.any=Il,Cl.some=Rl,Cl.allSettled=Ol,Cl.chain=Ul,Cl.isPromise=Ml,El.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(tl,e)},yield:function(e){return this.then((function(){return e}))},spread:function(e){return this.then((function(t){return Dl(t,(function(t){return e.apply(tl,t)}))}))}},el=[].slice,Js=[].reduce||function(e){var t,i,n,r,o;if(o=0,r=(t=Object(this)).length>>>0,(i=arguments).length<=1)for(;;){if(o in t){n=t[o++];break}if(++o>=r)throw new TypeError}else n=i[1];for(;o<r;++o)o in t&&(n=e(n,t[o],o,t));return n},il=typeof navigator<"u"?navigator:{};var cu=[];typeof ArrayBuffer<"u"&&(cu.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&cu.push(Uint8ClampedArray),typeof CanvasPixelArray<"u"&&cu.push(CanvasPixelArray));var hu,du,fu,pu={isChrome:Hl,chromeVersion:ql,isSafari:jl,safariVersion:Yl,isWebkit:Xl,webkitVersion:Kl,isInternetExplorer:Ql,internetExplorerVersion:Zl,isEdge:Jl,edgeVersion:eu,isFirefox:tu,firefoxVersion:nu,isWindows:iu,isNodeJs:ru,hardwareConcurrency:Sa(il.hardwareConcurrency,3),supportsPointerEvents:ou,supportsImageRenderingPixelated:au,supportsWebP:lu,supportsWebPSync:uu,imageRenderingValue:su,typedArrayTypes:cu,isPCBroswer:_u};function _u(){var e=window.navigator.userAgent.toLowerCase(),t="ipad"==e.match(/ipad/i),i="iphone os"==e.match(/iphone os/i),n="midp"==e.match(/midp/i),r="ucweb"==e.match(/ucweb/i),o="android"==e.match(/android/i),a="windows ce"==e.match(/windows ce/i),s="windows mobile"==e.match(/windows mobile/i);return!(t||i||n||r||o||a||s)}function mu(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function gu(e,t,i,n){this.red=Sa(e,1),this.green=Sa(t,1),this.blue=Sa(i,1),this.alpha=Sa(n,1)}pu.supportsFullscreen=function(){return Tl.supportsFullscreen()},pu.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},pu.supportsWebWorkers=function(){return typeof Worker<"u"},pu.supportsWebAssembly=function(){return typeof WebAssembly<"u"&&!pu.isEdge()},pu.supportsOffscreenCanvas=function(){return typeof OffscreenCanvas<"u"&&!pu.isEdge()},gu.fromCartesian4=function(e,t){return Oa.typeOf.object("cartesian",e),wa(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new gu(e.x,e.y,e.z,e.w)},gu.fromBytes=function(e,t,i,n,r){return e=gu.byteToFloat(Sa(e,255)),t=gu.byteToFloat(Sa(t,255)),i=gu.byteToFloat(Sa(i,255)),n=gu.byteToFloat(Sa(n,255)),wa(r)?(r.red=e,r.green=t,r.blue=i,r.alpha=n,r):new gu(e,t,i,n)},gu.fromAlpha=function(e,t,i){return Oa.typeOf.object("color",e),Oa.typeOf.number("alpha",t),wa(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=t,i):new gu(e.red,e.green,e.blue,t)},pu.supportsTypedArrays()&&(hu=new ArrayBuffer(4),du=new Uint32Array(hu),fu=new Uint8Array(hu)),gu.fromRgba=function(e,t){return du[0]=e,gu.fromBytes(fu[0],fu[1],fu[2],fu[3],t)},gu.byteToRgba=function(e,t,i,n){return fu[0]=e,fu[1]=t,fu[2]=i,fu[3]=n,du[0]},gu.fromHsl=function(e,t,i,n,r){e=Sa(e,0)%1,t=Sa(t,0),i=Sa(i,0),n=Sa(n,1);var o=i,a=i,s=i;if(0!==t){var l,u=2*i-(l=i<.5?i*(1+t):i+t-i*t);o=mu(u,l,e+1/3),a=mu(u,l,e),s=mu(u,l,e-1/3)}return wa(r)?(r.red=o,r.green=a,r.blue=s,r.alpha=n,r):new gu(o,a,s,n)},gu.fromRandom=function(e,t){var i=(e=Sa(e,Sa.EMPTY_OBJECT)).red;if(!wa(i)){var n=Sa(e.minimumRed,0),r=Sa(e.maximumRed,1);Oa.typeOf.number.lessThanOrEquals("minimumRed",n,r),i=n+Ba.nextRandomNumber()*(r-n)}var o=e.green;if(!wa(o)){var a=Sa(e.minimumGreen,0),s=Sa(e.maximumGreen,1);Oa.typeOf.number.lessThanOrEquals("minimumGreen",a,s),o=a+Ba.nextRandomNumber()*(s-a)}var l=e.blue;if(!wa(l)){var u=Sa(e.minimumBlue,0),c=Sa(e.maximumBlue,1);Oa.typeOf.number.lessThanOrEquals("minimumBlue",u,c),l=u+Ba.nextRandomNumber()*(c-u)}var h=e.alpha;if(!wa(h)){var d=Sa(e.minimumAlpha,0),f=Sa(e.maximumAlpha,1);Oa.typeOf.number.lessThanOrEquals("minumumAlpha",d,f),h=d+Ba.nextRandomNumber()*(f-d)}return wa(t)?(t.red=i,t.green=o,t.blue=l,t.alpha=h,t):new gu(i,o,l,h)};var xu=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,vu=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,yu=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,$u=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;gu.fromCssColorString=function(e,t){Oa.typeOf.string("color",e),wa(t)||(t=new gu);var i=gu[e.toUpperCase()];if(wa(i))return gu.clone(i,t),t;var n=xu.exec(e);return null!==n?(t.red=parseInt(n[1],16)/15,t.green=parseInt(n[2],16)/15,t.blue=parseInt(n[3],16)/15,t.alpha=1,t):null!==(n=vu.exec(e))?(t.red=parseInt(n[1],16)/255,t.green=parseInt(n[2],16)/255,t.blue=parseInt(n[3],16)/255,t.alpha=1,t):null!==(n=yu.exec(e))?(t.red=parseFloat(n[1])/("%"===n[1].substr(-1)?100:255),t.green=parseFloat(n[2])/("%"===n[2].substr(-1)?100:255),t.blue=parseFloat(n[3])/("%"===n[3].substr(-1)?100:255),t.alpha=parseFloat(Sa(n[4],"1.0")),t):null!==(n=$u.exec(e))?gu.fromHsl(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(Sa(n[4],"1.0")),t):t=void 0},gu.packedLength=4,gu.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.red,t[i++]=e.green,t[i++]=e.blue,t[i]=e.alpha,t},gu.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new gu),i.red=e[t++],i.green=e[t++],i.blue=e[t++],i.alpha=e[t],i},gu.byteToFloat=function(e){return e/255},gu.floatToByte=function(e){return 1===e?255:256*e|0},gu.clone=function(e,t){if(wa(e))return wa(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new gu(e.red,e.green,e.blue,e.alpha)},gu.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},gu.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},gu.prototype.clone=function(e){return gu.clone(this,e)},gu.prototype.equals=function(e){return gu.equals(this,e)},gu.prototype.equalsEpsilon=function(e,t){return this===e||wa(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},gu.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},gu.prototype.toCssColorString=function(){var e=gu.floatToByte(this.red),t=gu.floatToByte(this.green),i=gu.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},gu.prototype.toBytes=function(e){var t=gu.floatToByte(this.red),i=gu.floatToByte(this.green),n=gu.floatToByte(this.blue),r=gu.floatToByte(this.alpha);return wa(e)?(e[0]=t,e[1]=i,e[2]=n,e[3]=r,e):[t,i,n,r]},gu.prototype.toRgba=function(){return fu[0]=gu.floatToByte(this.red),fu[1]=gu.floatToByte(this.green),fu[2]=gu.floatToByte(this.blue),fu[3]=gu.floatToByte(this.alpha),du[0]},gu.prototype.brighten=function(e,t){return Oa.typeOf.number("magnitude",e),Oa.typeOf.number.greaterThanOrEquals("magnitude",e,0),Oa.typeOf.object("result",t),e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},gu.prototype.darken=function(e,t){return Oa.typeOf.number("magnitude",e),Oa.typeOf.number.greaterThanOrEquals("magnitude",e,0),Oa.typeOf.object("result",t),e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},gu.prototype.withAlpha=function(e,t){return gu.fromAlpha(this,e,t)},gu.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},gu.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},gu.multiply=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},gu.divide=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},gu.mod=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},gu.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),n.red=Ba.lerp(e.red,t.red,i),n.green=Ba.lerp(e.green,t.green,i),n.blue=Ba.lerp(e.blue,t.blue,i),n.alpha=Ba.lerp(e.alpha,t.alpha,i),n},gu.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("color",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},gu.divideByScalar=function(e,t,i){return Oa.typeOf.object("color",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},gu.ALICEBLUE=Object.freeze(gu.fromCssColorString("#F0F8FF")),gu.ANTIQUEWHITE=Object.freeze(gu.fromCssColorString("#FAEBD7")),gu.AQUA=Object.freeze(gu.fromCssColorString("#00FFFF")),gu.AQUAMARINE=Object.freeze(gu.fromCssColorString("#7FFFD4")),gu.AZURE=Object.freeze(gu.fromCssColorString("#F0FFFF")),gu.BEIGE=Object.freeze(gu.fromCssColorString("#F5F5DC")),gu.BISQUE=Object.freeze(gu.fromCssColorString("#FFE4C4")),gu.BLACK=Object.freeze(gu.fromCssColorString("#000000")),gu.BLANCHEDALMOND=Object.freeze(gu.fromCssColorString("#FFEBCD")),gu.BLUE=Object.freeze(gu.fromCssColorString("#0000FF")),gu.BLUEVIOLET=Object.freeze(gu.fromCssColorString("#8A2BE2")),gu.BROWN=Object.freeze(gu.fromCssColorString("#A52A2A")),gu.BURLYWOOD=Object.freeze(gu.fromCssColorString("#DEB887")),gu.CADETBLUE=Object.freeze(gu.fromCssColorString("#5F9EA0")),gu.CHARTREUSE=Object.freeze(gu.fromCssColorString("#7FFF00")),gu.CHOCOLATE=Object.freeze(gu.fromCssColorString("#D2691E")),gu.CORAL=Object.freeze(gu.fromCssColorString("#FF7F50")),gu.CORNFLOWERBLUE=Object.freeze(gu.fromCssColorString("#6495ED")),gu.CORNSILK=Object.freeze(gu.fromCssColorString("#FFF8DC")),gu.CRIMSON=Object.freeze(gu.fromCssColorString("#DC143C")),gu.CYAN=Object.freeze(gu.fromCssColorString("#00FFFF")),gu.DARKBLUE=Object.freeze(gu.fromCssColorString("#00008B")),gu.DARKCYAN=Object.freeze(gu.fromCssColorString("#008B8B")),gu.DARKGOLDENROD=Object.freeze(gu.fromCssColorString("#B8860B")),gu.DARKGRAY=Object.freeze(gu.fromCssColorString("#A9A9A9")),gu.DARKGREEN=Object.freeze(gu.fromCssColorString("#006400")),gu.DARKGREY=gu.DARKGRAY,gu.DARKKHAKI=Object.freeze(gu.fromCssColorString("#BDB76B")),gu.DARKMAGENTA=Object.freeze(gu.fromCssColorString("#8B008B")),gu.DARKOLIVEGREEN=Object.freeze(gu.fromCssColorString("#556B2F")),gu.DARKORANGE=Object.freeze(gu.fromCssColorString("#FF8C00")),gu.DARKORCHID=Object.freeze(gu.fromCssColorString("#9932CC")),gu.DARKRED=Object.freeze(gu.fromCssColorString("#8B0000")),gu.DARKSALMON=Object.freeze(gu.fromCssColorString("#E9967A")),gu.DARKSEAGREEN=Object.freeze(gu.fromCssColorString("#8FBC8F")),gu.DARKSLATEBLUE=Object.freeze(gu.fromCssColorString("#483D8B")),gu.DARKSLATEGRAY=Object.freeze(gu.fromCssColorString("#2F4F4F")),gu.DARKSLATEGREY=gu.DARKSLATEGRAY,gu.DARKTURQUOISE=Object.freeze(gu.fromCssColorString("#00CED1")),gu.DARKVIOLET=Object.freeze(gu.fromCssColorString("#9400D3")),gu.DEEPPINK=Object.freeze(gu.fromCssColorString("#FF1493")),gu.DEEPSKYBLUE=Object.freeze(gu.fromCssColorString("#00BFFF")),gu.DIMGRAY=Object.freeze(gu.fromCssColorString("#696969")),gu.DIMGREY=gu.DIMGRAY,gu.DODGERBLUE=Object.freeze(gu.fromCssColorString("#1E90FF")),gu.FIREBRICK=Object.freeze(gu.fromCssColorString("#B22222")),gu.FLORALWHITE=Object.freeze(gu.fromCssColorString("#FFFAF0")),gu.FORESTGREEN=Object.freeze(gu.fromCssColorString("#228B22")),gu.FUCHSIA=Object.freeze(gu.fromCssColorString("#FF00FF")),gu.GAINSBORO=Object.freeze(gu.fromCssColorString("#DCDCDC")),gu.GHOSTWHITE=Object.freeze(gu.fromCssColorString("#F8F8FF")),gu.GOLD=Object.freeze(gu.fromCssColorString("#FFD700")),gu.GOLDENROD=Object.freeze(gu.fromCssColorString("#DAA520")),gu.GRAY=Object.freeze(gu.fromCssColorString("#808080")),gu.GREEN=Object.freeze(gu.fromCssColorString("#008000")),gu.GREENYELLOW=Object.freeze(gu.fromCssColorString("#ADFF2F")),gu.GREY=gu.GRAY,gu.HONEYDEW=Object.freeze(gu.fromCssColorString("#F0FFF0")),gu.HOTPINK=Object.freeze(gu.fromCssColorString("#FF69B4")),gu.INDIANRED=Object.freeze(gu.fromCssColorString("#CD5C5C")),gu.INDIGO=Object.freeze(gu.fromCssColorString("#4B0082")),gu.IVORY=Object.freeze(gu.fromCssColorString("#FFFFF0")),gu.KHAKI=Object.freeze(gu.fromCssColorString("#F0E68C")),gu.LAVENDER=Object.freeze(gu.fromCssColorString("#E6E6FA")),gu.LAVENDAR_BLUSH=Object.freeze(gu.fromCssColorString("#FFF0F5")),gu.LAWNGREEN=Object.freeze(gu.fromCssColorString("#7CFC00")),gu.LEMONCHIFFON=Object.freeze(gu.fromCssColorString("#FFFACD")),gu.LIGHTBLUE=Object.freeze(gu.fromCssColorString("#ADD8E6")),gu.LIGHTCORAL=Object.freeze(gu.fromCssColorString("#F08080")),gu.LIGHTCYAN=Object.freeze(gu.fromCssColorString("#E0FFFF")),gu.LIGHTGOLDENRODYELLOW=Object.freeze(gu.fromCssColorString("#FAFAD2")),gu.LIGHTGRAY=Object.freeze(gu.fromCssColorString("#D3D3D3")),gu.LIGHTGREEN=Object.freeze(gu.fromCssColorString("#90EE90")),gu.LIGHTGREY=gu.LIGHTGRAY,gu.LIGHTPINK=Object.freeze(gu.fromCssColorString("#FFB6C1")),gu.LIGHTSEAGREEN=Object.freeze(gu.fromCssColorString("#20B2AA")),gu.LIGHTSKYBLUE=Object.freeze(gu.fromCssColorString("#87CEFA")),gu.LIGHTSLATEGRAY=Object.freeze(gu.fromCssColorString("#778899")),gu.LIGHTSLATEGREY=gu.LIGHTSLATEGRAY,gu.LIGHTSTEELBLUE=Object.freeze(gu.fromCssColorString("#B0C4DE")),gu.LIGHTYELLOW=Object.freeze(gu.fromCssColorString("#FFFFE0")),gu.LIME=Object.freeze(gu.fromCssColorString("#00FF00")),gu.LIMEGREEN=Object.freeze(gu.fromCssColorString("#32CD32")),gu.LINEN=Object.freeze(gu.fromCssColorString("#FAF0E6")),gu.MAGENTA=Object.freeze(gu.fromCssColorString("#FF00FF")),gu.MAROON=Object.freeze(gu.fromCssColorString("#800000")),gu.MEDIUMAQUAMARINE=Object.freeze(gu.fromCssColorString("#66CDAA")),gu.MEDIUMBLUE=Object.freeze(gu.fromCssColorString("#0000CD")),gu.MEDIUMORCHID=Object.freeze(gu.fromCssColorString("#BA55D3")),gu.MEDIUMPURPLE=Object.freeze(gu.fromCssColorString("#9370DB")),gu.MEDIUMSEAGREEN=Object.freeze(gu.fromCssColorString("#3CB371")),gu.MEDIUMSLATEBLUE=Object.freeze(gu.fromCssColorString("#7B68EE")),gu.MEDIUMSPRINGGREEN=Object.freeze(gu.fromCssColorString("#00FA9A")),gu.MEDIUMTURQUOISE=Object.freeze(gu.fromCssColorString("#48D1CC")),gu.MEDIUMVIOLETRED=Object.freeze(gu.fromCssColorString("#C71585")),gu.MIDNIGHTBLUE=Object.freeze(gu.fromCssColorString("#191970")),gu.MINTCREAM=Object.freeze(gu.fromCssColorString("#F5FFFA")),gu.MISTYROSE=Object.freeze(gu.fromCssColorString("#FFE4E1")),gu.MOCCASIN=Object.freeze(gu.fromCssColorString("#FFE4B5")),gu.NAVAJOWHITE=Object.freeze(gu.fromCssColorString("#FFDEAD")),gu.NAVY=Object.freeze(gu.fromCssColorString("#000080")),gu.OLDLACE=Object.freeze(gu.fromCssColorString("#FDF5E6")),gu.OLIVE=Object.freeze(gu.fromCssColorString("#808000")),gu.OLIVEDRAB=Object.freeze(gu.fromCssColorString("#6B8E23")),gu.ORANGE=Object.freeze(gu.fromCssColorString("#FFA500")),gu.ORANGERED=Object.freeze(gu.fromCssColorString("#FF4500")),gu.ORCHID=Object.freeze(gu.fromCssColorString("#DA70D6")),gu.PALEGOLDENROD=Object.freeze(gu.fromCssColorString("#EEE8AA")),gu.PALEGREEN=Object.freeze(gu.fromCssColorString("#98FB98")),gu.PALETURQUOISE=Object.freeze(gu.fromCssColorString("#AFEEEE")),gu.PALEVIOLETRED=Object.freeze(gu.fromCssColorString("#DB7093")),gu.PAPAYAWHIP=Object.freeze(gu.fromCssColorString("#FFEFD5")),gu.PEACHPUFF=Object.freeze(gu.fromCssColorString("#FFDAB9")),gu.PERU=Object.freeze(gu.fromCssColorString("#CD853F")),gu.PINK=Object.freeze(gu.fromCssColorString("#FFC0CB")),gu.PLUM=Object.freeze(gu.fromCssColorString("#DDA0DD")),gu.POWDERBLUE=Object.freeze(gu.fromCssColorString("#B0E0E6")),gu.PURPLE=Object.freeze(gu.fromCssColorString("#800080")),gu.RED=Object.freeze(gu.fromCssColorString("#FF0000")),gu.ROSYBROWN=Object.freeze(gu.fromCssColorString("#BC8F8F")),gu.ROYALBLUE=Object.freeze(gu.fromCssColorString("#4169E1")),gu.SADDLEBROWN=Object.freeze(gu.fromCssColorString("#8B4513")),gu.SALMON=Object.freeze(gu.fromCssColorString("#FA8072")),gu.SANDYBROWN=Object.freeze(gu.fromCssColorString("#F4A460")),gu.SEAGREEN=Object.freeze(gu.fromCssColorString("#2E8B57")),gu.SEASHELL=Object.freeze(gu.fromCssColorString("#FFF5EE")),gu.SIENNA=Object.freeze(gu.fromCssColorString("#A0522D")),gu.SILVER=Object.freeze(gu.fromCssColorString("#C0C0C0")),gu.SKYBLUE=Object.freeze(gu.fromCssColorString("#87CEEB")),gu.SLATEBLUE=Object.freeze(gu.fromCssColorString("#6A5ACD")),gu.SLATEGRAY=Object.freeze(gu.fromCssColorString("#708090")),gu.SLATEGREY=gu.SLATEGRAY,gu.SNOW=Object.freeze(gu.fromCssColorString("#FFFAFA")),gu.SPRINGGREEN=Object.freeze(gu.fromCssColorString("#00FF7F")),gu.STEELBLUE=Object.freeze(gu.fromCssColorString("#4682B4")),gu.TAN=Object.freeze(gu.fromCssColorString("#D2B48C")),gu.TEAL=Object.freeze(gu.fromCssColorString("#008080")),gu.THISTLE=Object.freeze(gu.fromCssColorString("#D8BFD8")),gu.TOMATO=Object.freeze(gu.fromCssColorString("#FF6347")),gu.TURQUOISE=Object.freeze(gu.fromCssColorString("#40E0D0")),gu.VIOLET=Object.freeze(gu.fromCssColorString("#EE82EE")),gu.WHEAT=Object.freeze(gu.fromCssColorString("#F5DEB3")),gu.WHITE=Object.freeze(gu.fromCssColorString("#FFFFFF")),gu.WHITESMOKE=Object.freeze(gu.fromCssColorString("#F5F5F5")),gu.YELLOW=Object.freeze(gu.fromCssColorString("#FFFF00")),gu.YELLOWGREEN=Object.freeze(gu.fromCssColorString("#9ACD32")),gu.TRANSPARENT=Object.freeze(new gu(0,0,0,0));var bu={CLOCKWISE:Aa.CW,COUNTER_CLOCKWISE:Aa.CCW,NONE:Aa.NONE,validate:function(e){return e===bu.CLOCKWISE||e===bu.COUNTER_CLOCKWISE}},Tu=Object.freeze(bu),Cu={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:10,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1,_uniformBufferOffsetAlignment:256,_maxUniformBufferBinding:36,_maxArrayTextureLayers:256};function Su(e){if("object"!=typeof e||null===e)return e;for(var t,i=Object.keys(e),n=0;n<i.length;n++)t=i[n],e.hasOwnProperty(t)&&"_applyFunctions"!==t&&(e[t]=Su(e[t]));return Object.freeze(e)}Object.defineProperties(Cu,{maximumCombinedTextureImageUnits:{get:function(){return Cu._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return Cu._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return Cu._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return Cu._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return Cu._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return Cu._maximumTextureSize}},maximumVaryingVectors:{get:function(){return Cu._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return Cu._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return Cu._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return Cu._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return Cu._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return Cu._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return Cu._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return Cu._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return Cu._maximumViewportWidth}},maximumViewportHeight:{get:function(){return Cu._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return Cu._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return Cu._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return Cu._maximumColorAttachments}},highpFloatSupported:{get:function(){return Cu._highpFloatSupported}},highpIntSupported:{get:function(){return Cu._highpIntSupported}},uniformBufferOffsetAlignment:{get:function(){return Cu._uniformBufferOffsetAlignment}},maxUniformBufferBinding:{get:function(){return Cu._maxUniformBufferBinding}},maxArrayTextureLayers:{get:function(){return Cu._maxArrayTextureLayers}}});var wu,Eu=(wu=!0,function(e,t){var i=wu?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wu=!1,i}),Pu=Eu(void 0,(function(){return Pu.toString().search("(((.+)+)+)+$").toString().constructor(Pu).search("(((.+)+)+)+$")}));function Au(){this.reset()}Pu(),Au.prototype.reset=function(){this.enabled=!1,this.mask=255,this.funcRef=1,this.funcMask=255,this.frontFunc=Au.ALWAYS,this.backFunc=Au.ALWAYS,this.frontOpStencilFail=Au.KEEP,this.backOpStencilFail=Au.KEEP,this.frontOpDepthFail=Au.KEEP,this.backOpDepthFail=Au.KEEP,this.frontOpStencilDepthPass=Au.REPLACE,this.backOpStencilDepthPass=Au.REPLACE},Object.defineProperty(Au.prototype,"frontStencilFunc",{get:function(){return this.frontFunc},set:function(e){this.frontFunc=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"backStencilFunc",{get:function(){return this.backFunc},set:function(e){this.backFunc=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"stencilFuncRef",{get:function(){return this.funcRef},set:function(e){this.funcRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"stencilFuncMask",{get:function(){return this.funcMask},set:function(e){this.funcMask=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"frontStencilOpStencilFail",{get:function(){return this.frontOpStencilFail},set:function(e){this.frontOpStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"backStencilOpStencilFail",{get:function(){return this.backOpStencilFail},set:function(e){this.backOpStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"frontStencilOpDepthFail",{get:function(){return this.frontOpDepthFail},set:function(e){this.frontOpDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"backStencilOpDepthFail",{get:function(){return this.backOpDepthFail},set:function(e){this.backOpDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"frontStencilOpStencilDepthPass",{get:function(){return this.frontOpStencilDepthPass},set:function(e){this.frontOpStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"backStencilOpStencilDepthPass",{get:function(){return this.backOpStencilDepthPass},set:function(e){this.backOpStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"stencilMask",{get:function(){return this.mask},set:function(e){this.mask=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"stencilTest",{get:function(){return this.enabled},set:function(e){this.enabled=e},enumerable:!1,configurable:!0}),Au.ALWAYS=Ya.ALWAYS,Au.KEEP=Ya.KEEP,Au.REPLACE=Ya.REPLACE,Au.FRONT=Ya.FRONT,Au.BACK=Ya.BACK;var Lu={UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,UNSIGNED_INT:Aa.UNSIGNED_INT,FLOAT:Aa.FLOAT,HALF_FLOAT:Aa.HALF_FLOAT_OES,UNSIGNED_INT_24_8:Aa.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:Aa.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:Aa.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:Aa.UNSIGNED_SHORT_5_6_5,isPacked:function(e){return e===Lu.UNSIGNED_INT_24_8||e===Lu.UNSIGNED_SHORT_4_4_4_4||e===Lu.UNSIGNED_SHORT_5_5_5_1||e===Lu.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case Lu.UNSIGNED_BYTE:return 1;case Lu.UNSIGNED_SHORT:case Lu.UNSIGNED_SHORT_4_4_4_4:case Lu.UNSIGNED_SHORT_5_5_5_1:case Lu.UNSIGNED_SHORT_5_6_5:case Aa.HALF_FLOAT:case Aa.HALF_FLOAT_OES:return 2;case Lu.UNSIGNED_INT:case Lu.FLOAT:case Lu.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===Lu.UNSIGNED_BYTE||e===Lu.UNSIGNED_SHORT||e===Lu.UNSIGNED_INT||e===Lu.FLOAT||e===Aa.HALF_FLOAT||e===Aa.HALF_FLOAT_OES||e===Lu.UNSIGNED_INT_24_8||e===Lu.UNSIGNED_SHORT_4_4_4_4||e===Lu.UNSIGNED_SHORT_5_5_5_1||e===Lu.UNSIGNED_SHORT_5_6_5},toWebGLConstant:function(e,t){switch(e){case Lu.UNSIGNED_BYTE:return Aa.UNSIGNED_BYTE;case Lu.UNSIGNED_SHORT:return Aa.UNSIGNED_SHORT;case Lu.UNSIGNED_INT:return Aa.UNSIGNED_INT;case Lu.FLOAT:return Aa.FLOAT;case Lu.HALF_FLOAT:return t.webgl2?Aa.HALF_FLOAT:Aa.HALF_FLOAT_OES;case Lu.UNSIGNED_INT_24_8:return Aa.UNSIGNED_INT_24_8;case Lu.UNSIGNED_SHORT_4_4_4_4:return Aa.UNSIGNED_SHORT_4_4_4_4;case Lu.UNSIGNED_SHORT_5_5_5_1:return Aa.UNSIGNED_SHORT_5_5_5_1;case Lu.UNSIGNED_SHORT_5_6_5:return Lu.UNSIGNED_SHORT_5_6_5}}},Mu={DEPTH_COMPONENT:Aa.DEPTH_COMPONENT,DEPTH_COMPONENT16:Aa.DEPTH_COMPONENT16,DEPTH_COMPONENT32F:Aa.DEPTH_COMPONENT32F,DEPTH_STENCIL:Aa.DEPTH_STENCIL,ALPHA:Aa.ALPHA,RGB:Aa.RGB,RGBA:Aa.RGBA,LUMINANCE:Aa.LUMINANCE,LUMINANCE_ALPHA:Aa.LUMINANCE_ALPHA,RGB_DXT1:Aa.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:Aa.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:Aa.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:Aa.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:Aa.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:Aa.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:Aa.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:Aa.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:Aa.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:Aa.COMPRESSED_RGB_ETC1_WEBGL,RED_INTEGER:Aa.RED_INTEGER,RED:Aa.RED,RGB8_ETC2:Aa.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:Aa.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:Aa.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(e){switch(e){case Mu.RGB:return 3;case Mu.RGBA:return 4;case Mu.LUMINANCE_ALPHA:return 2;case Mu.ALPHA:case Mu.LUMINANCE:case Mu.RED:case Mu.RED_INTEGER:default:return 1}},validate:function(e){return e===Mu.DEPTH_COMPONENT||e===Mu.DEPTH_COMPONENT16||e===Mu.DEPTH_COMPONENT32F||e===Mu.DEPTH_STENCIL||e===Mu.ALPHA||e===Mu.RED||e===Mu.RED_INTEGER||e===Mu.RGB||e===Mu.RGBA||e===Mu.LUMINANCE||e===Mu.LUMINANCE_ALPHA||e===Mu.RGB_DXT1||e===Mu.RGBA_DXT1||e===Mu.RGBA_DXT3||e===Mu.RGBA_DXT5||e===Mu.RGB_PVRTC_4BPPV1||e===Mu.RGB_PVRTC_2BPPV1||e===Mu.RGBA_PVRTC_4BPPV1||e===Mu.RGBA_PVRTC_2BPPV1||e===Mu.RGBA_ASTC||e===Mu.RGB_ETC1||e===Mu.RGB8_ETC2||e===Mu.RGBA8_ETC2_EAC||e===Mu.RGBA_BC7},isColorFormat:function(e){return e===Mu.ALPHA||e===Mu.RED||e===Mu.RED_INTEGER||e===Mu.RGB||e===Mu.RGBA||e===Mu.LUMINANCE||e===Mu.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===Mu.DEPTH_COMPONENT||e===Mu.DEPTH_COMPONENT16||e===Mu.DEPTH_COMPONENT32F||e===Mu.DEPTH_STENCIL},isCompressedFormat:function(e){return e===Mu.RGB_DXT1||e===Mu.RGBA_DXT1||e===Mu.RGBA_DXT3||e===Mu.RGBA_DXT5||e===Mu.RGB_PVRTC_4BPPV1||e===Mu.RGB_PVRTC_2BPPV1||e===Mu.RGBA_PVRTC_4BPPV1||e===Mu.RGBA_PVRTC_2BPPV1||e===Mu.RGBA_ASTC||e===Mu.RGB_ETC1||e===Mu.RGB8_ETC2||e===Mu.RGBA8_ETC2_EAC||e===Mu.RGBA_BC7},isDXTFormat:function(e){return e===Mu.RGB_DXT1||e===Mu.RGBA_DXT1||e===Mu.RGBA_DXT3||e===Mu.RGBA_DXT5},isPVRTCFormat:function(e){return e===Mu.RGB_PVRTC_4BPPV1||e===Mu.RGB_PVRTC_2BPPV1||e===Mu.RGBA_PVRTC_4BPPV1||e===Mu.RGBA_PVRTC_2BPPV1},isETC1Format:function(e){return e===Mu.RGB_ETC1},compressedTextureSizeInBytes:function(e,t,i,n){var r=wa(n)?n:1;switch(e){case Mu.RGB_DXT1:case Mu.RGBA_DXT1:case Mu.RGB_ETC1:case Mu.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*8*r;case Mu.RGBA_DXT3:case Mu.RGBA_DXT5:case Mu.RGBA_ASTC:case Mu.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*16*r;case Mu.RGB_PVRTC_4BPPV1:case Mu.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8)*r;case Mu.RGB_PVRTC_2BPPV1:case Mu.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8)*r;case Mu.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(i/4)*16;default:return 0}},textureSizeInBytes:function(e,t,i,n,r){var o=wa(r)?r:1,a=Mu.componentsLength(e);return Lu.isPacked(t)&&(a=1),a*Lu.sizeInBytes(t)*i*n*o},alignmentInBytes:function(e,t,i){var n=Mu.textureSizeInBytes(e,t,i,1)%4;return 0===n?4:2===n?2:1},createTypedArray:function(e,t,i,n){var r=Lu.sizeInBytes(t);return new(r===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:r===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:r===Float32Array.BYTES_PER_ELEMENT&&t===Lu.FLOAT?Float32Array:Uint32Array)(Mu.componentsLength(e)*i*n)},flipY:function(e,t,i,n,r){if(1===r)return e;for(var o=Mu.createTypedArray(t,i,n,r),a=Mu.componentsLength(t),s=n*a,l=0;l<r;++l)for(var u=l*n*a,c=(r-l-1)*n*a,h=0;h<s;++h)o[c+h]=e[u+h];return o},RGBToRGBA:function(e,t,i,n){for(var r=Mu.createTypedArray(Mu.RGBA,t,i,n),o=e.length/3,a=0;a<o;a++)r[4*a]=e[3*a],r[4*a+1]=e[3*a+1],r[4*a+2]=e[3*a+2];return r},toInternalFormat:function(e,t,i){if(!i.webgl2)return e;if(e===Mu.DEPTH_STENCIL)return Aa.DEPTH24_STENCIL8;if(e===Mu.DEPTH_COMPONENT){if(t===Lu.UNSIGNED_SHORT)return Aa.DEPTH_COMPONENT16;if(t===Lu.UNSIGNED_INT)return Aa.DEPTH_COMPONENT24;if(t===Lu.FLOAT)return Aa.DEPTH_COMPONENT32F}if(e===Mu.DEPTH_COMPONENT16)return Aa.DEPTH_COMPONENT16;if(e===Mu.DEPTH_COMPONENT32F)return Aa.DEPTH_COMPONENT32F;if(t===Lu.FLOAT)switch(e){case Mu.RGBA:return Aa.RGBA32F;case Mu.RGB:return Aa.RGB32F;case Mu.RG:return Aa.RG32F;case Mu.RED:return Aa.R32F}if(t===Lu.UNSIGNED_BYTE)switch(e){case Mu.RGBA:return Aa.RGBA8;case Mu.RGB:return Aa.RGB8;case Mu.RED:return Aa.R8}if(t===Lu.HALF_FLOAT)switch(e){case Mu.RGBA:return Aa.RGBA16F;case Mu.RGB:return Aa.RGB16F;case Mu.RG:return Aa.RG16F;case Mu.RED:return Aa.R16F}return e}},Ru=Object.freeze(Mu),Ou={POINTS:Aa.POINTS,LINES:Aa.LINES,LINE_LOOP:Aa.LINE_LOOP,LINE_STRIP:Aa.LINE_STRIP,TRIANGLES:Aa.TRIANGLES,TRIANGLE_STRIP:Aa.TRIANGLE_STRIP,TRIANGLE_FAN:Aa.TRIANGLE_FAN,validate:function(e){return e===Ou.POINTS||e===Ou.LINES||e===Ou.LINE_LOOP||e===Ou.LINE_STRIP||e===Ou.TRIANGLES||e===Ou.TRIANGLE_STRIP||e===Ou.TRIANGLE_FAN}},Iu=Object.freeze(Ou),Du={CLAMP_TO_EDGE:Aa.CLAMP_TO_EDGE,REPEAT:Aa.REPEAT,MIRRORED_REPEAT:Aa.MIRRORED_REPEAT,validate:function(e){return e===Du.CLAMP_TO_EDGE||e===Du.REPEAT||e===Du.MIRRORED_REPEAT}},Bu=Object.freeze(Du),Nu={NEAREST:Aa.NEAREST,LINEAR:Aa.LINEAR,validate:function(e){return e===Nu.NEAREST||e===Nu.LINEAR}},Fu=Object.freeze(Nu),Uu={NEAREST:Aa.NEAREST,LINEAR:Aa.LINEAR,NEAREST_MIPMAP_NEAREST:Aa.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:Aa.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:Aa.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:Aa.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===Uu.NEAREST||e===Uu.LINEAR||e===Uu.NEAREST_MIPMAP_NEAREST||e===Uu.LINEAR_MIPMAP_NEAREST||e===Uu.NEAREST_MIPMAP_LINEAR||e===Uu.LINEAR_MIPMAP_LINEAR}},Gu=Object.freeze(Uu);function zu(){}function Vu(){}zu.toPixelFormat=function(e){switch(e){case Ru.RED:return Ya.TEXTUREFORMAT_RED;case Ru.RED_INTEGER:return Ya.TEXTUREFORMAT_RED_INTEGER;case Ru.RGB:return Ya.TEXTUREFORMAT_RGB;case Ru.RGBA:return Ya.TEXTUREFORMAT_RGBA;case Ru.LUMINANCE_ALPHA:return Ya.TEXTUREFORMAT_LUMINANCE_ALPHA;case Ru.ALPHA:return Ya.TEXTUREFORMAT_ALPHA;case Ru.LUMINANCE:return Ya.TEXTUREFORMAT_LUMINANCE;case Ru.DEPTH_COMPONENT16:return Ya.TEXTUREFORMAT_DEPTH16;case Ru.DEPTH_COMPONENT:return Ya.TEXTUREFORMAT_DEPTH24;case Ru.DEPTH_COMPONENT32F:return Ya.TEXTUREFORMAT_DEPTH32_FLOAT;case Ru.DEPTH_STENCIL:return Ya.TEXTUREFORMAT_DEPTH24_STENCIL8;case Ru.RGBA_DXT1:return Ya.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1;case Ru.RGBA_DXT3:return Ya.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3;case Ru.RGBA_DXT5:return Ya.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5;case Ru.RGB_DXT1:return Ya.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1;case Ru.RGBA_PVRTC_2BPPV1:case Ru.RGBA_PVRTC_4BPPV1:case Ru.RGB_ETC1:case Ru.RGB_PVRTC_2BPPV1:case Ru.RGB_PVRTC_4BPPV1:default:return 1}},zu.toPixelType=function(e){switch(e){case Lu.FLOAT:return Ya.TEXTURETYPE_FLOAT;case Lu.HALF_FLOAT:return Ya.TEXTURETYPE_HALF_FLOAT;case Lu.UNSIGNED_BYTE:return Ya.TEXTURETYPE_UNSIGNED_BYTE;case Lu.UNSIGNED_INT:return Ya.TEXTURETYPE_UNSIGNED_INT;case Lu.UNSIGNED_INT_24_8:return Ya.TEXTURETYPE_UNSIGNED_INT_24_8;case Lu.UNSIGNED_SHORT:return Ya.TEXTURETYPE_UNSIGNED_SHORT;case Lu.UNSIGNED_SHORT_4_4_4_4:return Ya.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4;case Lu.UNSIGNED_SHORT_5_5_5_1:return Ya.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1;case Lu.UNSIGNED_SHORT_5_6_5:return Ya.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;default:return Ya.TEXTURETYPE_UNDEFINED}},zu.toSamplerMode=function(e,t){var i=e==Lu.FLOAT||e==Lu.HALF_FLOAT;if(t.magnificationFilter==Fu.NEAREST){if(t.minificationFilter==Gu.NEAREST)return Ya.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==Gu.LINEAR)return Ya.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==Gu.NEAREST_MIPMAP_NEAREST)return Ya.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==Gu.LINEAR_MIPMAP_NEAREST)return Ya.TEXTURE_NEAREST_SAMPLINGMODE}else{if(t.magnificationFilter!=Fu.LINEAR)return console.log("EnumConvertor.toSamplerMode unsupported type"),Ya.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==Gu.NEAREST)return i?Ya.TEXTURE_NEAREST_SAMPLINGMODE:Ya.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==Gu.LINEAR)return i?Ya.TEXTURE_NEAREST_SAMPLINGMODE:Ya.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==Gu.NEAREST_MIPMAP_NEAREST)return i?Ya.TEXTURE_NEAREST_SAMPLINGMODE:Ya.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==Gu.LINEAR_MIPMAP_NEAREST)return i?Ya.TEXTURE_NEAREST_SAMPLINGMODE:Ya.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==Gu.LINEAR_MIPMAP_LINEAR)return i?Ya.TEXTURE_NEAREST_SAMPLINGMODE:Ya.TEXTURE_LINEAR_LINEAR_MIPLINEAR}},zu.toAddressMode=function(e){switch(e){case Bu.CLAMP_TO_EDGE:return Ya.TEXTURE_CLAMP_ADDRESSMODE;case Bu.REPEAT:return Ya.TEXTURE_WRAP_ADDRESSMODE;case Bu.MIRRORED_REPEAT:return Ya.TEXTURE_MIRROR_ADDRESSMODE;default:return Ya.TEXTURE_CLAMP_ADDRESSMODE}},zu.toFillMode=function(e){switch(e){case Iu.TRIANGLES:return Ya.MATERIAL_TriangleFillMode;case Iu.POINTS:return Ya.MATERIAL_PointFillMode;case Iu.LINES:return Ya.MATERIAL_WireFrameFillMode;case Iu.LINE_STRIP:return Ya.MATERIAL_LineStripDrawMode;default:return console.log("EnumConvertor.toFillMode unsupported type"),Ya.MATERIAL_TriangleFillMode}},zu.toCullFace=function(e){switch(e){case Aa.FRONT:return 2;case Aa.BACK:default:return 1}},zu.toFrontFace=function(e,t){switch(e){case Aa.CCW:return t?2:1;case Aa.CW:return t?1:2;default:return 1}},zu.toVertexBufferDataType=function(e){switch(e){case Ma.BYTE:return ns.BYTE;case Ma.UNSIGNED_BYTE:return ns.UNSIGNED_BYTE;case Ma.SHORT:return ns.SHORT;case Ma.UNSIGNED_SHORT:return ns.UNSIGNED_SHORT;case Ma.INT:return ns.INT;case Ma.UNSIGNED_INT:return ns.UNSIGNED_INT;case Ma.FLOAT:return ns.FLOAT;default:throw console.log("EnumConvertor.toVertexBufferDataType unsupported type"),new Ea("componentDatatype is not a valid value.")}},Vu.applyFrontFace=function(e,t,i){e._depthCullingState.frontFace=zu.toFrontFace(t.frontFace,i)},Vu.applyCull=function(e,t){var i=t.cull;i.enabled?(e._depthCullingState.cull=!0,e._depthCullingState.cullFace=zu.toCullFace(i.face)):(e._depthCullingState.cull=!1,e._depthCullingState.cullFace=0)},Vu.applyLineWidth=function(e,t){},Vu.applyPolygonOffset=function(e,t){var i=t.polygonOffset;i.enabled?(e.setZOffset(i.factor),e.setZOffsetUnits(i.units)):(e.setZOffset(0),e.setZOffsetUnits(0))},Vu.applyScissorTest=function(e,t,i){var n=t.scissorTest;if(wa(i.scissorTest)?i.scissorTest.enabled:n.enabled){var r=wa(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.enableScissor(r.x,r.y,r.width,r.height)}else e.disableScissor()},Vu.applyDepthRange=function(e,t){},Vu.applyDepthTest=function(e,t){var i=t.depthTest,n=i.enabled;e.setDepthBuffer(n),n&&e.setDepthFunction(i.func)},Vu.applyColorMask=function(e,t){var i=t.colorMask;e.setColorWrite(i.red)},Vu.applyDepthMask=function(e,t){e.setDepthWrite(t.depthMask)},Vu.applyStencilMask=function(e,t){var i=t.stencilMask;i<0&&(i=255),e.setStencilMask(i)},Vu.applyBlendingColor=function(e,t){e.setAlphaConstants(t.red,t.green,t.blue,t.alpha)},Vu.applyBlending=function(e,t,i){var n=t.blending;(wa(i.blendingEnabled)?i.blendingEnabled:n.enabled)?(Vu.applyBlendingColor(e,n.color),e._alphaState.setAlphaEquationParameters(n.equationRgb,n.equationAlpha),e._alphaState.setAlphaBlendFunctionParameters(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha),e._alphaState.alphaBlend=!0):e.setAlphaMode(Ya.ALPHA_DISABLE)},Vu.applyStencilTest=function(e,t){var i=t.stencilTest,n=i.enabled;if(e.setStencilBuffer(n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.setStencilFunction(Au.FRONT,r);var l=i.frontOperation;e.setStencilOperationFail(Au.FRONT,l.fail),e.setStencilOperationDepthFail(Au.FRONT,l.zFail),e.setStencilOperationPass(Au.FRONT,l.zPass),e.setStencilFunction(Au.BACK,o);var u=i.backOperation;e.setStencilOperationFail(Au.BACK,u.fail),e.setStencilOperationDepthFail(Au.BACK,u.zFail),e.setStencilOperationPass(Au.BACK,u.zPass),e.setStencilFunctionReference(a),e.setStencilFunctionMask(s)}},Vu.applySampleCoverage=function(e,t){};var ku=new Ys;function Wu(){}function Hu(e,t,i){i?e.enable(t):e.disable(t)}Vu.applyViewport=function(e,t,i,n,r){var o=Sa(t.viewport,i.viewport);wa(o)||((o=ku).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight);var a=Sa(n,i.context.drawingBufferWidth),s=Sa(r,i.context.drawingBufferHeight);i.context.uniformState.viewport=o;var l={x:o.x/a,y:o.y/s,width:o.width/a,height:o.height/s};e.setViewport(l,n,r)},Wu.applyFrontFace=function(e,t,i){e.frontFace(t.frontFace)},Wu.applyCull=function(e,t){var i=t.cull,n=i.enabled;Hu(e,e.CULL_FACE,n),n&&e.cullFace(i.face)},Wu.applyLineWidth=function(e,t){e.lineWidth(t.lineWidth)},Wu.applyPolygonOffset=function(e,t){var i=t.polygonOffset,n=i.enabled;Hu(e,e.POLYGON_OFFSET_FILL,n),n&&e.polygonOffset(i.factor,i.units)},Wu.applyScissorTest=function(e,t,i){var n=t.scissorTest,r=wa(i.scissorTest)?i.scissorTest.enabled:n.enabled;if(Hu(e,e.SCISSOR_TEST,r),r){var o=wa(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.scissor(o.x,o.y,o.width,o.height)}},Wu.applyDepthRange=function(e,t){var i=t.depthRange;e.depthRange(i.near,i.far)},Wu.applyDepthTest=function(e,t){var i=t.depthTest,n=i.enabled;Hu(e,e.DEPTH_TEST,n),n&&e.depthFunc(i.func)},Wu.applyColorMask=function(e,t){var i=t.colorMask;e.colorMask(i.red,i.green,i.blue,i.alpha)},Wu.applyDepthMask=function(e,t){e.depthMask(t.depthMask)},Wu.applyStencilMask=function(e,t){e.stencilMask(t.stencilMask)},Wu.applyBlendingColor=function(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)},Wu.applyBlending=function(e,t,i){var n=t.blending,r=wa(i.blendingEnabled)?i.blendingEnabled:n.enabled;Hu(e,e.BLEND,r),r&&(Wu.applyBlendingColor(e,n.color),e.blendEquationSeparate(n.equationRgb,n.equationAlpha),e.blendFuncSeparate(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha))},Wu.applyStencilTest=function(e,t){var i=t.stencilTest,n=i.enabled;if(Hu(e,e.STENCIL_TEST,n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.stencilFunc(r,a,s),e.stencilFuncSeparate(e.BACK,o,a,s),e.stencilFuncSeparate(e.FRONT,r,a,s);var l=i.frontOperation,u=l.fail,c=l.zFail,h=l.zPass;e.stencilOpSeparate(e.FRONT,u,c,h);var d=i.backOperation,f=d.fail,p=d.zFail,_=d.zPass;e.stencilOpSeparate(e.BACK,f,p,_)}},Wu.applySampleCoverage=function(e,t){var i=t.sampleCoverage,n=i.enabled;Hu(e,e.SAMPLE_COVERAGE,n),n&&e.sampleCoverage(i.value,i.invert)};var qu=new Ys;function ju(e){return e===Aa.FUNC_ADD||e===Aa.FUNC_SUBTRACT||e===Aa.FUNC_REVERSE_SUBTRACT||e===Aa.MIN||e===Aa.MAX}function Yu(e){return e===Aa.ZERO||e===Aa.ONE||e===Aa.SRC_COLOR||e===Aa.ONE_MINUS_SRC_COLOR||e===Aa.DST_COLOR||e===Aa.ONE_MINUS_DST_COLOR||e===Aa.SRC_ALPHA||e===Aa.ONE_MINUS_SRC_ALPHA||e===Aa.DST_ALPHA||e===Aa.ONE_MINUS_DST_ALPHA||e===Aa.CONSTANT_COLOR||e===Aa.ONE_MINUS_CONSTANT_COLOR||e===Aa.CONSTANT_ALPHA||e===Aa.ONE_MINUS_CONSTANT_ALPHA||e===Aa.SRC_ALPHA_SATURATE}function Xu(e){return e===Aa.FRONT||e===Aa.BACK||e===Aa.FRONT_AND_BACK}function Ku(e){return e===Aa.NEVER||e===Aa.LESS||e===Aa.EQUAL||e===Aa.LEQUAL||e===Aa.GREATER||e===Aa.NOTEQUAL||e===Aa.GEQUAL||e===Aa.ALWAYS}function Qu(e){return e===Aa.NEVER||e===Aa.LESS||e===Aa.EQUAL||e===Aa.LEQUAL||e===Aa.GREATER||e===Aa.NOTEQUAL||e===Aa.GEQUAL||e===Aa.ALWAYS}function Zu(e){return e===Aa.ZERO||e===Aa.KEEP||e===Aa.REPLACE||e===Aa.INCR||e===Aa.DECR||e===Aa.INVERT||e===Aa.INCR_WRAP||e===Aa.DECR_WRAP}function Ju(e){var t=Sa(e,{}),i=Sa(t.cull,{}),n=Sa(t.polygonOffset,{}),r=Sa(t.scissorTest,{}),o=Sa(r.rectangle,{}),a=Sa(t.depthRange,{}),s=Sa(t.depthTest,{}),l=Sa(t.colorMask,{}),u=Sa(t.blending,{}),c=Sa(u.color,{}),h=Sa(t.stencilTest,{}),d=Sa(h.frontOperation,{}),f=Sa(h.backOperation,{}),p=Sa(t.sampleCoverage,{}),_=t.viewport;if(this.frontFace=Sa(t.frontFace,Tu.COUNTER_CLOCKWISE),this.cull={enabled:Sa(i.enabled,!1),face:Sa(i.face,Aa.BACK)},this.lineWidth=Sa(t.lineWidth,1),this.polygonOffset={enabled:Sa(n.enabled,!1),factor:Sa(n.factor,0),units:Sa(n.units,0)},this.scissorTest={enabled:Sa(r.enabled,!1),rectangle:Ys.clone(o)},this.depthRange={near:Sa(a.near,0),far:Sa(a.far,1)},this.depthTest={enabled:Sa(s.enabled,!1),func:Sa(s.func,Aa.LESS)},this.colorMask={red:Sa(l.red,!0),green:Sa(l.green,!0),blue:Sa(l.blue,!0),alpha:Sa(l.alpha,!0)},this.depthMask=Sa(t.depthMask,!0),this.stencilMask=Sa(t.stencilMask,65535),this.blending={enabled:Sa(u.enabled,!1),color:new gu(Sa(c.red,0),Sa(c.green,0),Sa(c.blue,0),Sa(c.alpha,0)),equationRgb:Sa(u.equationRgb,Aa.FUNC_ADD),equationAlpha:Sa(u.equationAlpha,Aa.FUNC_ADD),functionSourceRgb:Sa(u.functionSourceRgb,Aa.ONE),functionSourceAlpha:Sa(u.functionSourceAlpha,Aa.ONE),functionDestinationRgb:Sa(u.functionDestinationRgb,Aa.ZERO),functionDestinationAlpha:Sa(u.functionDestinationAlpha,Aa.ZERO)},this.stencilTest={enabled:Sa(h.enabled,!1),frontFunction:Sa(h.frontFunction,Aa.ALWAYS),backFunction:Sa(h.backFunction,Aa.ALWAYS),reference:Sa(h.reference,0),mask:Sa(h.mask,65535),frontOperation:{fail:Sa(d.fail,Aa.KEEP),zFail:Sa(d.zFail,Aa.KEEP),zPass:Sa(d.zPass,Aa.KEEP)},backOperation:{fail:Sa(f.fail,Aa.KEEP),zFail:Sa(f.zFail,Aa.KEEP),zPass:Sa(f.zPass,Aa.KEEP)}},this.sampleCoverage={enabled:Sa(p.enabled,!1),value:Sa(p.value,1),invert:Sa(p.invert,!1)},this.viewport=wa(_)?new Ys(_.x,_.y,_.width,_.height):void 0,this.lineWidth<Cu.minimumAliasedLineWidth||this.lineWidth>Cu.maximumAliasedLineWidth)throw new Ea("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!Tu.validate(this.frontFace))throw new Ea("Invalid renderState.frontFace.");if(!Xu(this.cull.face))throw new Ea("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new Ea("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new Ea("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new Ea("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new Ea("renderState.depthRange.far must be less than or equal to one.");if(!Ku(this.depthTest.func))throw new Ea("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new Ea("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!ju(this.blending.equationRgb))throw new Ea("Invalid renderState.blending.equationRgb.");if(!ju(this.blending.equationAlpha))throw new Ea("Invalid renderState.blending.equationAlpha.");if(!Yu(this.blending.functionSourceRgb))throw new Ea("Invalid renderState.blending.functionSourceRgb.");if(!Yu(this.blending.functionSourceAlpha))throw new Ea("Invalid renderState.blending.functionSourceAlpha.");if(!Yu(this.blending.functionDestinationRgb))throw new Ea("Invalid renderState.blending.functionDestinationRgb.");if(!Yu(this.blending.functionDestinationAlpha))throw new Ea("Invalid renderState.blending.functionDestinationAlpha.");if(!Qu(this.stencilTest.frontFunction))throw new Ea("Invalid renderState.stencilTest.frontFunction.");if(!Qu(this.stencilTest.backFunction))throw new Ea("Invalid renderState.stencilTest.backFunction.");if(!Zu(this.stencilTest.frontOperation.fail))throw new Ea("Invalid renderState.stencilTest.frontOperation.fail.");if(!Zu(this.stencilTest.frontOperation.zFail))throw new Ea("Invalid renderState.stencilTest.frontOperation.zFail.");if(!Zu(this.stencilTest.frontOperation.zPass))throw new Ea("Invalid renderState.stencilTest.frontOperation.zPass.");if(!Zu(this.stencilTest.backOperation.fail))throw new Ea("Invalid renderState.stencilTest.backOperation.fail.");if(!Zu(this.stencilTest.backOperation.zFail))throw new Ea("Invalid renderState.stencilTest.backOperation.zFail.");if(!Zu(this.stencilTest.backOperation.zPass))throw new Ea("Invalid renderState.stencilTest.backOperation.zPass.");if(wa(this.viewport)){if(this.viewport.width<0)throw new Ea("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new Ea("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>Cu.maximumViewportWidth)throw new Ea("renderState.viewport.width must be less than or equal to the maximum viewport width ("+Cu.maximumViewportWidth.toString()+"). Check maximumViewportWidth.");if(this.viewport.height>Cu.maximumViewportHeight)throw new Ea("renderState.viewport.height must be less than or equal to the maximum viewport height ("+Cu.maximumViewportHeight.toString()+"). Check maximumViewportHeight.")}this.id=0,this._applyFunctions=[]}Wu.applyViewport=function(e,t,i,n,r){var o=Sa(t.viewport,i.viewport);wa(o)||((o=qu).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=o,e.viewport(o.x,o.y,o.width,o.height)};var ec=0,tc={};function ic(e,t,i){(e?Vu:Wu).applyFrontFace(t,i)}function nc(e,t,i){(e?Vu:Wu).applyCull(t,i)}function rc(e,t,i){(e?Vu:Wu).applyLineWidth(t,i)}function oc(e,t,i){(e?Vu:Wu).applyPolygonOffset(t,i)}function ac(e,t,i){(e?Vu:Wu).applyDepthRange(t,i)}function sc(e,t,i){(e?Vu:Wu).applyDepthTest(t,i)}function lc(e,t,i){(e?Vu:Wu).applyColorMask(t,i)}function uc(e,t,i){(e?Vu:Wu).applyDepthMask(t,i)}function cc(e,t,i){(e?Vu:Wu).applyStencilMask(t,i)}function hc(e,t,i){(e?Vu:Wu).applyStencilTest(t,i)}function dc(e,t,i){(e?Vu:Wu).applySampleCoverage(t,i)}function fc(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(ic),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&i.push(nc),e.lineWidth!==t.lineWidth&&i.push(rc),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&i.push(oc),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&i.push(ac),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&i.push(sc),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&i.push(lc),e.depthMask!==t.depthMask&&i.push(uc),e.stencilMask!==t.stencilMask&&i.push(cc),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&i.push(hc),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&i.push(dc),i}Ju.fromCache=function(e){var t=JSON.stringify(e),i=tc[t];if(wa(i))return++i.referenceCount,i.state;var n=new Ju(e),r=JSON.stringify(n);return wa(i=tc[r])||(n.id=ec++,i={referenceCount:0,state:n=Su(n)},tc[r]=i),++i.referenceCount,tc[t]={referenceCount:1,state:i.state},i.state},Ju.removeFromCache=function(e){var t=new Ju(e),i=JSON.stringify(t),n=tc[i],r=JSON.stringify(e),o=tc[r];wa(o)&&(--o.referenceCount,0===o.referenceCount&&(delete tc[r],wa(n)&&--n.referenceCount)),wa(n)&&0===n.referenceCount&&delete tc[i]},Ju.getCache=function(){return tc},Ju.clearCache=function(){tc={}},Ju.apply=function(e,t,i){const n=wa(e.name)?Vu:Wu;n.applyFrontFace(e,t),n.applyCull(e,t),n.applyLineWidth(e,t),n.applyPolygonOffset(e,t),n.applyDepthRange(e,t),n.applyDepthTest(e,t),n.applyColorMask(e,t),n.applyDepthMask(e,t),n.applyStencilMask(e,t),n.applyStencilTest(e,t),n.applySampleCoverage(e,t),n.applyScissorTest(e,t,i),n.applyBlending(e,t,i),n.applyViewport(e,t,i)},Ju.partialApply=function(e,t,i,n,r,o,a,s,l,u,c){const h=wa(e.name),d=h?Vu:Wu;if(t!==i){var f=i._applyFunctions[t.id];wa(f)||(f=fc(t,i),i._applyFunctions[t.id]=f);for(var p=f.length,_=0;_<p;++_)f[_](h,e,i)}((wa(n.scissorTest)?n.scissorTest:t.scissorTest)!==(wa(r.scissorTest)?r.scissorTest:i.scissorTest)||s)&&d.applyScissorTest(e,i,r);var m=wa(n.blendingEnabled)?n.blendingEnabled:t.blending.enabled,g=wa(r.blendingEnabled)?r.blendingEnabled:i.blending.enabled;(m!==g||g&&t.blending!==i.blending)&&d.applyBlending(e,i,r),(t!==i||n!==r||n.context!==r.context||o!==a)&&d.applyViewport(e,i,r,l,u)},Ju.getState=function(e){if(!wa(e))throw new Ea("renderState is required.");return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:Ys.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:gu.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:wa(e.viewport)?Ys.clone(e.viewport):void 0}};var pc,_c={ADD:Aa.FUNC_ADD,SUBTRACT:Aa.FUNC_SUBTRACT,REVERSE_SUBTRACT:Aa.FUNC_REVERSE_SUBTRACT,MIN:Aa.MIN,MAX:Aa.MAX},mc=Object.freeze(_c),gc={ZERO:Aa.ZERO,ONE:Aa.ONE,SOURCE_COLOR:Aa.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:Aa.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:Aa.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:Aa.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:Aa.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:Aa.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:Aa.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:Aa.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:Aa.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:Aa.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:Aa.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:Aa.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:Aa.SRC_ALPHA_SATURATE},xc=Object.freeze(gc),vc={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:mc.ADD,equationAlpha:mc.ADD,functionSourceRgb:xc.SOURCE_ALPHA,functionSourceAlpha:xc.ONE,functionDestinationRgb:xc.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:xc.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:mc.ADD,equationAlpha:mc.ADD,functionSourceRgb:xc.ONE,functionSourceAlpha:xc.ONE,functionDestinationRgb:xc.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:xc.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:mc.ADD,equationAlpha:mc.ADD,functionSourceRgb:xc.SOURCE_ALPHA,functionSourceAlpha:xc.ONE,functionDestinationRgb:xc.ONE,functionDestinationAlpha:xc.ONE})},yc=Object.freeze(vc),$c=(pc=!0,function(e,t){var i=pc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return pc=!1,i}),bc=$c(void 0,(function(){return bc.toString().search("(((.+)+)+)+$").toString().constructor(bc).search("(((.+)+)+)+$")}));function Tc(){}bc(),Tc.toVertexBuffer=function(e,t,i,n){var r=us.createVertexBuffer({context:e,typedArray:t.arrayBuffer,usage:n?za.DYNAMIC_DRAW:za.STATIC_DRAW});return r.vertexArrayDestroyable=!1,r.bytesPerElement=t.bytesPerElement,r.length=t.length,r.attributes=i,r.itemSize=t.bytesPerElement,r.dynamicDraw=n,!n&&delete t.arrayBuffer,r},Tc.toIndexBuffer=function(e,t,i){if(0!==t.length){var n=us.createIndexBuffer({context:e,typedArray:t.arrayBuffer,usage:za.STATIC_DRAW,indexDatatype:Ga.UNSIGNED_SHORT});return n.vertexArrayDestroyable=!1,n.dynamicDraw=i,!n.dynamicDraw&&delete t.arrayBuffer,n}},Tc.toRenderState=function(e,t,i){var n=yc.DISABLED;e.blendFunction[0]==Aa.ONE&&e.blendFunction[1]==Aa.ONE_MINUS_SRC_ALPHA&&(n=yc.ALPHA_BLEND);var r={frontFace:i.frontFace,cull:{enabled:i.enable,face:i.mode},depthRange:{near:t.range[0],far:t.range[1]},depthTest:{enabled:t.func!==Aa.ALWAYS,func:t.func},depthMask:t.mask,colorMask:{red:e.mask[0],green:e.mask[1],blue:e.mask[2],alpha:e.mask[3]},blending:n};return Ju.fromCache(r)},Tc.toComponentDatatype=function(e){switch(e){case"Int8":return Ma.BYTE;case"Uint8":return Ma.UNSIGNED_BYTE;case"Int16":return Ma.SHORT;case"Uint16":return Ma.UNSIGNED_SHORT;case"Int32":return Ma.INT;case"Uint32":return Ma.UNSIGNED_INT;default:return Ma.FLOAT}},Tc.mbxAttributeToCesiumVertexArrtribute=function(e,t,i,n){var r=this.toComponentDatatype(e.type);Ma.getSizeInBytes(r);var o=t.bytesPerElement,a=e.offset+o*(n||0);return{name:e.name,index:i,vertexBuffer:t,componentsPerAttribute:e.components,componentDatatype:r,offsetInBytes:a,strideInBytes:o,normalize:!1}};var Cc,Sc=(Cc=!0,function(e,t){var i=Cc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Cc=!1,i}),wc=Sc(void 0,(function(){return wc.toString().search("(((.+)+)+)+$").toString().constructor(wc).search("(((.+)+)+)+$")}));wc();var Ec=function(){this.ids=[],this.positions=[],this.indexed=!1};function Pc(e,t,i,n){if(!(i>=n)){for(var r=e[i+n>>1],o=i-1,a=n+1;;){do{o++}while(e[o]<r);do{a--}while(e[a]>r);if(o>=a)break;Ac(e,o,a),Ac(t,3*o,3*a),Ac(t,3*o+1,3*a+1),Ac(t,3*o+2,3*a+2)}Pc(e,t,i,a),Pc(e,t,a+1,n)}}function Ac(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Lc(e,t,i,n){this.x=Sa(e,0),this.y=Sa(t,0),this.z=Sa(i,0),this.w=Sa(n,0)}Ec.prototype.add=function(e,t,i,n){this.ids.push(e),this.positions.push(t,i,n)},Ec.prototype.getPositions=function(e){for(var t=0,i=this.ids.length-1;t<i;){var n=t+i>>1;this.ids[n]>=e?i=n:t=n+1}for(var r=[];this.ids[t]===e;){var o=this.positions[3*t],a=this.positions[3*t+1],s=this.positions[3*t+2];r.push({index:o,start:a,end:s}),t++}return r},Ec.serialize=function(e,t){var i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Pc(i,n,0,i.length-1),t&&t.push(i.buffer,n.buffer),{ids:i,positions:n}},Ec.deserialize=function(e){var t=new Ec;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},en.register("FeaturePositionMap",Ec),Lc.fromElements=function(e,t,i,n,r){return wa(r)?(r.x=e,r.y=t,r.z=i,r.w=n,r):new Lc(e,t,i,n)},Lc.fromColor=function(e,t){return Oa.typeOf.object("color",e),wa(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new Lc(e.red,e.green,e.blue,e.alpha)},Lc.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Lc(e.x,e.y,e.z,e.w)},Lc.packedLength=4,Lc.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},Lc.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new Lc),i.x=e[t++],i.y=e[t++],i.z=e[t++],i.w=e[t],i},Lc.packArray=function(e,t){Oa.defined("array",e);var i=e.length,n=4*i;if(wa(t)){if(!Array.isArray(t)&&t.length!==n)throw new Ea("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)Lc.pack(e[r],t,4*r);return t},Lc.unpackArray=function(e,t){if(Oa.defined("array",e),Oa.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!=0)throw new Ea("array length must be a multiple of 4.");var i=e.length;wa(t)?t.length=i/4:t=new Array(i/4);for(var n=0;n<i;n+=4){var r=n/4;t[r]=Lc.unpack(e,n,t[r])}return t},Lc.fromArray=Lc.unpack,Lc.maximumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)},Lc.minimumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)},Lc.minimumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i.w=Math.min(e.w,t.w),i},Lc.maximumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i.w=Math.max(e.w,t.w),i},Lc.magnitudeSquared=function(e){return Oa.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},Lc.magnitude=function(e){return Math.sqrt(Lc.magnitudeSquared(e))};var Mc=new Lc;Lc.distance=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Lc.subtract(e,t,Mc),Lc.magnitude(Mc)},Lc.distanceSquared=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Lc.subtract(e,t,Mc),Lc.magnitudeSquared(Mc)},Lc.normalize=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=Lc.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t.w=e.w/i,isNaN(t.x)||isNaN(t.y)||isNaN(t.z)||isNaN(t.w))throw new Ea("normalized result is not a number");return t},Lc.dot=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},Lc.multiplyComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i.w=e.w*t.w,i},Lc.divideComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i.w=e.w/t.w,i},Lc.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},Lc.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},Lc.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},Lc.divideByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},Lc.negate=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},Lc.abs=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var Rc=new Lc;Lc.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),Lc.multiplyByScalar(t,i,Rc),n=Lc.multiplyByScalar(e,1-i,n),Lc.add(Rc,n,n)};var Oc=new Lc;Lc.mostOrthogonalAxis=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=Lc.normalize(e,Oc);return Lc.abs(i,i),t=i.x<=i.y?i.x<=i.z?i.x<=i.w?Lc.clone(Lc.UNIT_X,t):Lc.clone(Lc.UNIT_W,t):i.z<=i.w?Lc.clone(Lc.UNIT_Z,t):Lc.clone(Lc.UNIT_W,t):i.y<=i.z?i.y<=i.w?Lc.clone(Lc.UNIT_Y,t):Lc.clone(Lc.UNIT_W,t):i.z<=i.w?Lc.clone(Lc.UNIT_Z,t):Lc.clone(Lc.UNIT_W,t)},Lc.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},Lc.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]&&e.w===t[i+3]},Lc.equalsEpsilon=function(e,t,i,n){return e===t||wa(e)&&wa(t)&&Ba.equalsEpsilon(e.x,t.x,i,n)&&Ba.equalsEpsilon(e.y,t.y,i,n)&&Ba.equalsEpsilon(e.z,t.z,i,n)&&Ba.equalsEpsilon(e.w,t.w,i,n)},Lc.ZERO=Object.freeze(new Lc(0,0,0,0)),Lc.UNIT_X=Object.freeze(new Lc(1,0,0,0)),Lc.UNIT_Y=Object.freeze(new Lc(0,1,0,0)),Lc.UNIT_Z=Object.freeze(new Lc(0,0,1,0)),Lc.UNIT_W=Object.freeze(new Lc(0,0,0,1)),Lc.prototype.clone=function(e){return Lc.clone(this,e)},Lc.prototype.equals=function(e){return Lc.equals(this,e)},Lc.prototype.equalsEpsilon=function(e,t,i){return Lc.equalsEpsilon(this,e,t,i)},Lc.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var Ic=new Float32Array(1),Dc=256,Bc=65536,Nc=16777216,Fc=1/Dc,Uc=1/Bc,Gc=1/Nc,zc=38;Lc.packFloat=function(e,t){if(Oa.typeOf.number("value",e),wa(t)||(t=new Lc),Ic[0]=e,0===(e=Ic[0]))return Lc.clone(Lc.ZERO,t);var i,n=e<0?1:0;isFinite(e)?(e=Math.abs(e),i=Math.floor(Ba.logBase(e,10))+1,e/=Math.pow(10,i)):(e=.1,i=zc);var r=e*Dc;return t.x=Math.floor(r),r=(r-t.x)*Dc,t.y=Math.floor(r),r=(r-t.y)*Dc,t.z=Math.floor(r),t.w=2*(i+zc)+n,t},Lc.unpackFloat=function(e){Oa.typeOf.object("packedFloat",e);var t=e.w/2,i=Math.floor(t),n=2*(t-i);if(n=-(n=2*n-1),(i-=zc)>=zc)return n<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var r=n*e.x*Fc;return r+=n*e.y*Uc,(r+=n*e.z*Gc)*Math.pow(10,i)},Lc.prototype.toArray=function(e,t){Lc.pack(this,e,t)};var Vc,kc=(Vc=!0,function(e,t){var i=Vc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Vc=!1,i}),Wc=kc(void 0,(function(){return Wc.toString().search("(((.+)+)+)+$").toString().constructor(Wc).search("(((.+)+)+)+$")}));function Hc(e,t,i){return Math.min(i,Math.max(t,e))}function qc(e,t){return 256*(e=Hc(Math.floor(e),0,255))+(t=Hc(Math.floor(t),0,255))}function jc(e){return[qc(255*e.r,255*e.g),qc(255*e.b,255*e.a)]}Wc();var Yc=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0};Yc.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},Yc.prototype.setConstantPatternPositions=function(){},Yc.prototype.populatePaintArray=function(){},Yc.prototype.updatePaintArray=function(){},Yc.prototype.upload=function(){},Yc.prototype.destroy=function(){},Yc.prototype.setUniforms=function(e,t,i,n){t.set(n.constantOr(this.value))},Yc.prototype.getBinding=function(e,t){return"color"===this.type?new ba.UniformColor(e,t):new ba.Uniform1f(e,t)},Yc.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){var e=n.get(i).constantOr(r.value);return"color"===r.type&&(e.red=e.r,e.green=e.g,e.blue=e.b,e.alpha=e.a),e}},Yc.serialize=function(e){var t=e.value,i=e.names,n=e.type;return{value:en.serialize(t),names:i,type:n}},Yc.deserialize=function(e){var t=e.value,i=e.names,n=e.type;return new Yc(en.deserialize(t),i,n)};var Xc=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};Xc.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},Xc.prototype.populatePaintArray=function(){},Xc.prototype.updatePaintArray=function(){},Xc.prototype.upload=function(){},Xc.prototype.destroy=function(){},Xc.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},Xc.prototype.setUniforms=function(e,t,i,n,r){var o=this.patternPositions;"u_pattern_to"===r&&o.patternTo&&t.set(Lc(o.patternTo[0],o.patternTo[1],o.patternTo[2],o.patternTo[3])),"u_pattern_from"===r&&o.patternFrom&&t.set(Lc(o.patternFrom[0],o.patternFrom[1],o.patternFrom[2],o.patternFrom[3]))},Xc.prototype.getBinding=function(e,t){return new ba.Uniform4f(e,t)},Xc.prototype.setUniformMap=function(e,t,i,n){var r=this.patternPositions;e[t]=function(){return"u_pattern_to"===t&&r.patternTo?new Lc(r.patternTo[0],r.patternTo[1],r.patternTo[2],r.patternTo[3]):"u_pattern_from"===t&&r.patternFrom?new Lc(r.patternFrom[0],r.patternFrom[1],r.patternFrom[2],r.patternFrom[3]):void console.log("CrossFadedConstantBinder is not support")}};var Kc=function(e,t,i,n){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?2:1,offset:0}})),this.paintVertexArray=new n};Kc.prototype.defines=function(){return[]},Kc.prototype.setConstantPatternPositions=function(){},Kc.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new go(0),t,{},[],n);if("color"===this.type)for(var s=jc(a),l=o;l<e;l++)r.emplaceBack(s[0],s[1]);else{for(var u=o;u<e;u++)r.emplaceBack(a);this.maxValue=Math.max(this.maxValue,a)}},Kc.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:0},i,n);if("color"===this.type)for(var a=jc(o),s=e;s<t;s++)r.emplace(s,a[0],a[1]);else{for(var l=e;l<t;l++)r.emplace(l,o);this.maxValue=Math.max(this.maxValue,o)}},Kc.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=Tc.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},Kc.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Kc.prototype.setUniforms=function(e,t){t.set(0)},Kc.prototype.getBinding=function(e,t){return new ba.Uniform1f(e,t)},Kc.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};var Qc=function(e,t,i,n,r,o){this.expression=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.type=i,this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?4:2,offset:0}})),this.paintVertexArray=new a};Qc.prototype.defines=function(){return[]},Qc.prototype.setConstantPatternPositions=function(){},Qc.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new go(this.zoom),t,{},[],n),s=this.expression.evaluate(new go(this.zoom+1),t,{},[],n);if("color"===this.type)for(var l=jc(a),u=jc(s),c=o;c<e;c++)r.emplaceBack(l[0],l[1],u[0],u[1]);else{for(var h=o;h<e;h++)r.emplaceBack(a,s);this.maxValue=Math.max(this.maxValue,a,s)}},Qc.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},i,n),a=this.expression.evaluate({zoom:this.zoom+1},i,n);if("color"===this.type)for(var s=jc(o),l=jc(a),u=e;u<t;u++)r.emplace(u,s[0],s[1],l[0],l[1]);else{for(var c=e;c<t;c++)r.emplace(c,o,a);this.maxValue=Math.max(this.maxValue,o,a)}},Qc.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=Tc.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},Qc.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Qc.prototype.interpolationFactor=function(e){return this.useIntegerZoom&&(e=Math.floor(e)),Hc(this.expression.interpolationFactor(e,this.zoom,this.zoom+1),0,1)},Qc.prototype.setUniforms=function(e,t,i){t.set(this.interpolationFactor(i.zoom))},Qc.prototype.getBinding=function(e,t){return new ba.Uniform1f(e,t)},Qc.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){return r.interpolationFactor(0)}};var Zc=function(e,t,i,n,r,o,a){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0,this.layerId=a,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:4,offset:0}})),this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o};Zc.prototype.defines=function(){return[]},Zc.prototype.setConstantPatternPositions=function(){},Zc.prototype.populatePaintArray=function(e,t,i){var n=this.zoomInPaintVertexArray,r=this.zoomOutPaintVertexArray,o=this.layerId,a=n.length;if(n.reserve(e),r.reserve(e),i&&t.patterns&&t.patterns[o]){var s=t.patterns[o],l=s.min,u=s.mid,c=s.max,h=i[l],d=i[u],f=i[c];if(!h||!d||!f)return;for(var p=a;p<e;p++)n.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1]),r.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},Zc.prototype.updatePaintArray=function(e,t,i,n,r){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(r&&i.patterns&&i.patterns[s]){var l=i.patterns[s],u=l.min,c=l.mid,h=l.max,d=r[u],f=r[c],p=r[h];if(!d||!f||!p)return;for(var _=e;_<t;_++)o.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],d.tl[0],d.tl[1],d.br[0],d.br[1]),a.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],p.tl[0],p.tl[1],p.br[0],p.br[1])}},Zc.prototype.upload=function(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=Tc.toVertexBuffer(e,this.zoomInPaintVertexArray,this.paintVertexAttributes),this.zoomOutPaintVertexBuffer=Tc.toVertexBuffer(e,this.zoomOutPaintVertexArray,this.paintVertexAttributes))},Zc.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},Zc.prototype.setUniforms=function(e,t){t.set(0)},Zc.prototype.getBinding=function(e,t){return new Uniform1f(e,t)},Zc.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};class Jc{constructor(){this.binders={},this.cacheKey="",this._buffers=[]}static createDynamic(e,t,i){const n=new Jc,r=[];for(const o in e.paint._values){if(!i(o))continue;const a=e.paint.get(o);if(!(a instanceof $a&&er(a.property.specification)))continue;const s=th(o,e.type),l=a.property.specification.type,u=a.property.useIntegerZoom;if("cross-faded"===a.property.specification["property-type"]||"cross-faded-data-driven"===a.property.specification["property-type"])if("constant"===a.value.kind)n.binders[o]=new Xc(a.value.value,s,l),r.push("/u_"+o);else{const i=nh(o,l,"source");n.binders[o]=new Zc(a.value,s,l,u,t,i,e.id),r.push("/a_"+o)}else if("constant"===a.value.kind)n.binders[o]=new Yc(a.value.value,s,l),r.push("/u_"+o);else if("source"===a.value.kind){const e=nh(o,l,"source");n.binders[o]=new Kc(a.value,s,l,e),r.push("/a_"+o)}else{const e=nh(o,l,"composite");n.binders[o]=new Qc(a.value,s,l,u,t,e),r.push("/z_"+o)}}return n.cacheKey=r.sort().join(""),n}populatePaintArrays(e,t,i,n,r){for(const i in this.binders)this.binders[i].populatePaintArray(e,t,n,r)}setConstantPatternPositions(e,t){for(const i in this.binders)this.binders[i].setConstantPatternPositions(e,t)}updatePaintArrays(e,t,i,n,r){let o=!1;for(const a in e){const s=t.getPositions(+a);for(const t of s){const s=i.feature(t.index);for(const i in this.binders){const l=this.binders[i];if(!(l instanceof Yc||l instanceof Xc)&&!0===l.expression.isStateDependent){const u=n.paint.get(i);l.expression=u.value,l.updatePaintArray(t.start,t.end,s,e[a],r),o=!0}}}}return o}defines(){var e=[];for(var t in this.binders)e.push.apply(e,this.binders[t].defines());return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){const i=[];for(const n in this.binders){const r=this.binders[n];for(const o of r.uniformNames)if(t[o]){const a=r.getBinding(e,t[o]);i.push({name:o,property:n,binding:a})}}return i}setUniforms(e,t,i,n){for(const{name:r,property:o,binding:a}of t)this.binders[o].setUniforms(e,a,n,i.get(o),r)}updatePatternPaintBuffers(e){const t=[];for(const i in this.binders){const n=this.binders[i];if(n instanceof Zc){const i=2===e.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;i&&t.push(i)}else(n instanceof Kc||n instanceof Qc)&&n.paintVertexBuffer&&t.push(n.paintVertexBuffer)}this._buffers=t}upload(e){for(const t in this.binders)this.binders[t].upload(e);const t=[];for(const e in this.binders){const i=this.binders[e];(i instanceof Kc||i instanceof Qc)&&i.paintVertexBuffer&&t.push(i.paintVertexBuffer)}this._buffers=t}getAttributeLocation(){for(var e=0,t={},i=0;i<this.layoutAttributes.length;i++)t[this.layoutAttributes[i].name]=i,e++;for(var n=this.getPaintVertexBuffers(),r=0;n&&r<n.length;r++)for(var o=n[r],a=0;a<o.attributes.length;a++)t[o.attributes[a].name]=e++;return t}getUniformMaps(e,t,i){for(var n in this.binders)for(var r=this.binders[n],o=0,a=r.uniformNames;o<a.length;o+=1){var s=a[o];e[s]&&r.setUniformMap(i,s,n,t)}for(var l in e)!i[l]&&l.indexOf("_t")>-1&&(i[l]=function(){return 0});return i}destroy(){for(const e in this.binders)this.binders[e].destroy()}}class eh{constructor(e,t,i,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=Jc.createDynamic(r,i,n),this.programConfigurations[r.id].layoutAttributes=e;this.needsUpload=!1,this._featureMap=new Ec,this._bufferOffset=0}populatePaintArrays(e,t,i,n,r){for(const o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(e,t,i,n,r);void 0!==t.id&&this._featureMap.add(+t.id,i,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,i,n){for(const r of i)this.needsUpload=this.programConfigurations[r.id].updatePaintArrays(e,this._featureMap,t,r,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function th(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"text-show-background":["show-background"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function ih(e){return{"line-pattern":{source:ra,composite:ra},"fill-pattern":{source:ra,composite:ra},"fill-extrusion-pattern":{source:ra,composite:ra}}[e]}function nh(e,t,i){var n={color:{source:ta,composite:ia},number:{source:Xo,composite:ta}},r=ih(e);return r&&r[i]||n[t][i]}en.register("ConstantBinder",Yc),en.register("CrossFadedConstantBinder",Xc),en.register("SourceExpressionBinder",Kc),en.register("CrossFadedCompositeBinder",Zc),en.register("CompositeExpressionBinder",Qc),en.register("ProgramConfiguration",Jc,{omit:["_buffers"]}),en.register("ProgramConfigurationSet",eh);var rh,oh=(rh=!0,function(e,t){var i=rh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return rh=!1,i}),ah=oh(void 0,(function(){return ah.toString().search("(((.+)+)+)+$").toString().constructor(ah).search("(((.+)+)+)+$")}));ah();var sh=ao([{name:"a_pos",components:2,type:"Int16"}],4),lh=sh.members,uh=ao([{name:"a_pos",components:2,type:"Float32"}],4),ch=uh.members;function hh(e,t,i,n,r){e.emplaceBack(2*t+(n+1)/2,2*i+(r+1)/2)}var dh=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this._sourceLayerIds={};var t=this;this.layerIds=this.layers.map((function(e,i){return t._sourceLayerIds[e.sourceLayer]=i,e.sourceLayer})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Bo,this.indexArray=new Zo,this.segments=new Ao,this.programConfigurations=new eh(members,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};dh.prototype.populate=function(e,t){var i=this.layers[0],n=[],r=null;"circle"===i.type&&(r=i.layout.get("circle-sort-key"));for(var o=0,a=e;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.index,c=s.sourceLayerIndex,h=s.sourceLayerId,d=this._sourceLayerIds[h],f=this.layers[d];if(f){var p=$o/512,_=f.paint.get("circle-radius").value.value*p;if(this.layers[0]._featureFilter(new go(0),l)){var m=So(l),g=r?r.evaluate(l,{}):void 0,x={id:l.id,properties:l.properties,type:l.type,sourceLayerIndex:c,index:u,geometry:m,patterns:{},sortKey:g,circleRadius:_};n.push(x)}}}r&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var v=0,y=n;v<y.length;v+=1){var $=y[v],b=$,T=b.geometry,C=b.index,S=b.sourceLayerIndex,w=e[C].feature;this.addFeature($,T,C),t.featureIndex.insert(w,T,C,S,this.index,void 0,b.circleRadius)}},dh.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},dh.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},dh.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},dh.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=e.webgpu?ch:lh;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Tc.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},dh.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},dh.prototype.clear=function(){wa(this.layoutVertexArray)&&(this.layoutVertexArray=null),wa(this.indexArray)&&(this.indexArray=null)},dh.prototype.addFeature=function(e,t,i){for(var n=0,r=t;n<r.length;n+=1)for(var o=0,a=r[n];o<a.length;o+=1){var s=a[o],l=s.x,u=s.y;if(!(l<0||l>=$o||u<0||u>=$o)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),h=c.vertexLength;hh(this.layoutVertexArray,l,u,-1,-1),hh(this.layoutVertexArray,l,u,1,-1),hh(this.layoutVertexArray,l,u,1,1),hh(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,{})},en.register("CircleBucket",dh,{omit:["layers"]});var fh,ph=(fh=!0,function(e,t){var i=fh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return fh=!1,i}),_h=ph(void 0,(function(){return _h.toString().search("(((.+)+)+)+$").toString().constructor(_h).search("(((.+)+)+)+$")}));_h();var mh=function(e){this.specification=e};mh.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},mh.prototype.interpolate=function(e,t,i){var n=interpolate[this.specification.type];return n?n(e,t,i):e},en.register("DataConstantProperty",mh);var gh,xh=(gh=!0,function(e,t){var i=gh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return gh=!1,i}),vh=xh(void 0,(function(){return vh.toString().search("(((.+)+)+)+$").toString().constructor(vh).search("(((.+)+)+)+$")}));vh();var yh=function(e,t){this.specification=e,this.overrides=t};yh.prototype.possiblyEvaluate=function(e,t,i){return"constant"===e.expression.kind||"camera"===e.expression.kind?new $a(this,{kind:"constant",value:e.expression.evaluate(t,null,{},i)},t):new $a(this,e.expression,t)},yh.prototype.interpolate=function(e,t,i){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new $a(this,{kind:"constant",value:void 0},e.parameters);var n=interpolate[this.specification.type];return n?new $a(this,{kind:"constant",value:n(e.value.value,t.value.value,i)},e.parameters):e},yh.prototype.evaluate=function(e,t,i,n,r){return"constant"===e.kind?e.value:e.evaluate(t,i,n,r)},en.register("DataDrivenProperty",yh);var $h,bh=($h=!0,function(e,t){var i=$h?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return $h=!1,i}),Th=bh(void 0,(function(){return Th.toString().search("(((.+)+)+)+$").toString().constructor(Th).search("(((.+)+)+)+$")}));Th();var Ch=function(e,t){this.property=e,this.value=t,this.expression=ar.normalizePropertyExpression(void 0===t?e.specification.default:t,e.specification)};Ch.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Ch.prototype.possiblyEvaluate=function(e,t){return this.property.possiblyEvaluate(this,e,t)};var Sh,wh=(Sh=!0,function(e,t){var i=Sh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Sh=!1,i}),Eh=wh(void 0,(function(){return Eh.toString().search("(((.+)+)+)+$").toString().constructor(Eh).search("(((.+)+)+)+$")}));function Ph(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,i=t*e;return 4*(e<.5?i:3*(e-t)+i-.75)}Eh();var Ah=function(e,t,i,n,r){this.property=e,this.value=t,this.begin=r+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=i)};Ah.prototype.possiblyEvaluate=function(e,t){var i=e.now||0,n=this.value.possiblyEvaluate(e,t),r=this.prior;if(r){if(i>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(i<this.begin)return r.possiblyEvaluate(e,t);var o=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(r.possiblyEvaluate(e,t),n,Ph(o))}return n};const Lh=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Mh=Lh(void 0,(function(){return Mh.toString().search("(((.+)+)+)+$").toString().constructor(Mh).search("(((.+)+)+)+$")}));function Rh(e,t,i,n){const r=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),o=r(this,(function(){return o.toString().search("(((.+)+)+)+$").toString().constructor(o).search("(((.+)+)+)+$")}));o()}function Oh(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}function Ih(e,t){return-1!==e.indexOf(t,e.length-t.length)}function Dh(e,t,i){const n={};for(const r in e)n[r]=t.call(i||this,e[r],r,e);return n}function Bh(e,t,i){const n={};for(const r in e)t.call(i||this,e[r],r,e)&&(n[r]=e[r]);return n}function Nh(e){return Array.isArray(e)?e.map(Nh):"object"==typeof e&&e?Dh(e,Nh):e}function Fh(e,t){for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>=0)return!0;return!1}Mh(),Rh();const Uh={};function Gh(e){Uh[e]||("undefined"!=typeof console&&console.warn(e),Uh[e]=!0)}function zh(e,t,i){return(i.y-e.y)*(t.x-e.x)>(t.y-e.y)*(i.x-e.x)}function Vh(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function kh(e){const t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,i,n,r)=>{const o=n||r;return t[i]=!o||o.toLowerCase(),""})),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}var Wh,Hh=(Wh=!0,function(e,t){var i=Wh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Wh=!1,i}),qh=Hh(void 0,(function(){return qh.toString().search("(((.+)+)+)+$").toString().constructor(qh).search("(((.+)+)+)+$")}));qh();var jh=function(e){this.property=e,this.value=new Ch(e,void 0)};jh.prototype.transitioned=function(e,t){return new Ah(this.property,this.value,t,Oh({},e.transition,this.transition),e.now)},jh.prototype.untransitioned=function(){return new Ah(this.property,this.value,null,{},0)};var Yh,Xh=(Yh=!0,function(e,t){var i=Yh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Yh=!1,i}),Kh=Xh(void 0,(function(){return Kh.toString().search("(((.+)+)+)+$").toString().constructor(Kh).search("(((.+)+)+)+$")}));Kh();var Qh,Zh=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var i=e[t];i.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new Ch(i,void 0),r=this.defaultTransitionablePropertyValues[t]=new jh(i);this.defaultTransitioningPropertyValues[t]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}},Jh=(Qh=!0,function(e,t){var i=Qh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Qh=!1,i}),ed=Jh(void 0,(function(){return ed.toString().search("(((.+)+)+)+$").toString().constructor(ed).search("(((.+)+)+)+$")}));function td(){}ed(),td.getMaximumPaintValue=function(e,t,i){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:i.programConfigurations.get(t.id).binders[e].maxValue},td.translateDistance=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},td.translate=function(e,t,i,n,r){if(!t||!t[0]&&!t[1])return e;var o=to.convert(t)._mult(r);"viewport"===i&&o._rotate(-n);for(var a=[],s=0;s<e.length;s++){var l=e[s];a.push(l.sub(o))}return a};var id,nd=(id=!0,function(e,t){var i=id?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return id=!1,i}),rd=nd(void 0,(function(){return rd.toString().search("(((.+)+)+)+$").toString().constructor(rd).search("(((.+)+)+)+$")}));rd();var od=function(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)};od.prototype.get=function(e){return this._values[e]};var ad,sd=(ad=!0,function(e,t){var i=ad?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ad=!1,i}),ld=sd(void 0,(function(){return ld.toString().search("(((.+)+)+)+$").toString().constructor(ld).search("(((.+)+)+)+$")}));ld();var ud=function(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)};ud.prototype.getValue=function(e){return Nh(this._values[e].value)},ud.prototype.setValue=function(e,t){this._values[e]=new Ch(this._values[e].property,null===t?void 0:Nh(t))},ud.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r)}return e},ud.prototype.possiblyEvaluate=function(e,t){for(var i=new od(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i};var cd,hd=(cd=!0,function(e,t){var i=cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return cd=!1,i}),dd=hd(void 0,(function(){return dd.toString().search("(((.+)+)+)+$").toString().constructor(dd).search("(((.+)+)+)+$")}));dd();var fd=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};fd.prototype.possiblyEvaluate=function(e,t){for(var i=new od(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i},fd.prototype.hasTransition=function(){for(var e=0,t=Object.keys(this._values);e<t.length;e+=1){var i=t[e];if(this._values[i].prior)return!0}return!1};var pd,_d=(pd=!0,function(e,t){var i=pd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return pd=!1,i}),md=_d(void 0,(function(){return md.toString().search("(((.+)+)+)+$").toString().constructor(md).search("(((.+)+)+)+$")}));md();var gd=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};gd.prototype.getValue=function(e){return Nh(this._values[e].value.value)},gd.prototype.setValue=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new jh(this._values[e].property)),this._values[e].value=new Ch(this._values[e].property,null===t?void 0:Nh(t))},gd.prototype.getTransition=function(e){return Nh(this._values[e].transition)},gd.prototype.setTransition=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new jh(this._values[e].property)),this._values[e].transition=Nh(t)||void 0},gd.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r);var o=this.getTransition(n);void 0!==o&&(e[n+"-transition"]=o)}return e},gd.prototype.transitioned=function(e,t){for(var i=new fd(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].transitioned(e,t._values[o])}return i},gd.prototype.untransitioned=function(){for(var e=new fd(this._properties),t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t];e._values[n]=this._values[n].untransitioned()}return e};var xd,vd=(xd=!0,function(e,t){var i=xd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return xd=!1,i}),yd=vd(void 0,(function(){return yd.toString().search("(((.+)+)+)+$").toString().constructor(yd).search("(((.+)+)+)+$")}));yd();var $d="-transition";function bd(e,t){if(this.id=e.id,this.type=e.type,"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new ud(t.layout)),t.paint)){for(var i in this._transitionablePaint=new gd(t.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var n in e.layout)this.setLayoutProperty(n,e.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}bd.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},bd.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},bd.prototype.setLayoutProperty=function(e,t,i){if(null!=t&&this.id,"visibility"===e)return this.visibility=t,void(this.config&&this.config.layout&&(this.config.layout.visibility=t));this._unevaluatedLayout.setValue(e,t)},bd.prototype.getPaintProperty=function(e){return Ih(e,$d)?this._transitionablePaint.getTransition(e.slice(0,-$d.length)):this._transitionablePaint.getValue(e)},bd.prototype.setPaintProperty=function(e,t,i){if(null!=t&&this.id,Ih(e,$d))return this._transitionablePaint.setTransition(e.slice(0,-$d.length),t||void 0),!1;var n=this._transitionablePaint._values[e],r="cross-faded-data-driven"===n.property.specification["property-type"],o=n.value.isDataDriven(),a=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var s=this._transitionablePaint._values[e].value;return s.isDataDriven()||o||r||this._handleOverridablePaintPropertyUpdate(e,a,s)},bd.prototype._handleSpecialPaintPropertyUpdate=function(e){},bd.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!1},bd.prototype.isHidden=function(e){return!!(this.minzoom&&e<this.minzoom)||!!(this.maxzoom&&e>=this.maxzoom)||"none"===this.visibility},bd.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},bd.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},bd.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,t)},bd.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),Bh(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},bd.prototype._validate=function(e,t,i,n,r){return!0},bd.prototype.is3D=function(){return!1},bd.prototype.isTileClipped=function(){return!1},bd.prototype.hasOffscreenPass=function(){return!1},bd.prototype.resize=function(){},bd.prototype.isStateDependent=function(){return!0};var Td,Cd=(Td=!0,function(e,t){var i=Td?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Td=!1,i}),Sd=Cd(void 0,(function(){return Sd.toString().search("(((.+)+)+)+$").toString().constructor(Sd).search("(((.+)+)+)+$")}));Sd();var wd,Ed=8,Pd={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},Ad={"*":{type:"source"}},Ld=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Md={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},Rd={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},Od={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},Id={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},Dd={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Bd={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Nd={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Fd=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Ud={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Gd={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},zd={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Vd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},kd={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Wd={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Hd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},qd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},jd={type:"array",value:"*"},Yd={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},Xd={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Kd={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Qd={type:"array",value:"*",minimum:1},Zd={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},Jd={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},ef=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],tf={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},nf={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},rf={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},of={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},af={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-show-background":{type:"boolean",default:!1,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},sf={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},lf={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},uf={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},cf={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},hf={$version:Ed,$root:Pd,sources:Ad,source:Ld,source_vector:Md,source_raster:Rd,source_raster_dem:Od,source_geojson:Id,source_video:Dd,source_image:Bd,layer:Nd,layout:Fd,layout_background:Ud,layout_fill:Gd,layout_circle:zd,layout_heatmap:Vd,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:kd,layout_symbol:Wd,layout_raster:Hd,layout_hillshade:qd,filter:jd,filter_operator:Yd,geometry_type:Xd,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:Kd,expression:Qd,expression_name:Zd,light:Jd,paint:ef,paint_fill:tf,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:nf,paint_circle:rf,paint_heatmap:of,paint_symbol:af,paint_raster:sf,paint_hillshade:lf,paint_background:uf,transition:cf,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},df=(wd=!0,function(e,t){var i=wd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wd=!1,i}),ff=df(void 0,(function(){return ff.toString().search("(((.+)+)+)+$").toString().constructor(ff).search("(((.+)+)+)+$")}));function pf(){}function _f(e,t,i){if(e.length>1){if(mf(e,t))return!0;for(var n=0;n<t.length;n++)if(xf(t[n],e,i))return!0}for(var r=0;r<e.length;r++)if(xf(e[r],t,i))return!0;return!1}function mf(e,t){if(0===e.length||0===t.length)return!1;for(var i=0;i<e.length-1;i++)for(var n=e[i],r=e[i+1],o=0;o<t.length-1;o++)if(gf(n,r,t[o],t[o+1]))return!0;return!1}function gf(e,t,i,n){return zh(e,i,n)!==zh(t,i,n)&&zh(e,t,i)!==zh(e,t,n)}function xf(e,t,i){var n=i*i;if(1===t.length)return e.distSqr(t[0])<n;for(var r=1;r<t.length;r++){var o=t[r-1],a=t[r];if(pf.distToSegmentSquared(e,o,a)<n)return!0}return!1}function vf(e,t){for(var i,n,r,o=!1,a=0;a<e.length;a++)for(var s=0,l=(i=e[a]).length-1;s<i.length;l=s++)n=i[s],r=i[l],n.y>t.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(o=!o);return o}function yf(e,t){for(var i=!1,n=0,r=e.length-1;n<e.length;r=n++){var o=e[n],a=e[r];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}ff(),pf.polygonIntersectsPolygon=function(e,t){for(var i=0;i<e.length;i++)if(yf(t,e[i]))return!0;for(var n=0;n<t.length;n++)if(yf(e,t[n]))return!0;return!!mf(e,t)},pf.polygonIntersectsBufferedPoint=function(e,t,i){return!!yf(e,t)||!!xf(t,e,i)},pf.polygonIntersectsMultiPolygon=function(e,t){if(1===e.length)return vf(t,e[0]);for(var i=0;i<t.length;i++)for(var n=t[i],r=0;r<n.length;r++)if(yf(e,n[r]))return!0;for(var o=0;o<e.length;o++)if(vf(t,e[o]))return!0;for(var a=0;a<t.length;a++)if(mf(e,t[a]))return!0;return!1},pf.polygonIntersectsBufferedMultiLine=function(e,t,i){for(var n=0;n<t.length;n++){var r=t[n];if(e.length>=3)for(var o=0;o<r.length;o++)if(yf(e,r[o]))return!0;if(_f(e,r,i))return!0}return!1},pf.distToSegmentSquared=function(e,t,i){var n=t.distSqr(i);if(0===n)return e.distSqr(t);var r=((e.x-t.x)*(i.x-t.x)+(e.y-t.y)*(i.y-t.y))/n;return r<0?e.distSqr(t):r>1?e.distSqr(i):e.distSqr(i.sub(t)._mult(r)._add(t))};var $f=new Zh({"circle-sort-key":new yh(hf.layout_circle["circle-sort-key"])}),bf=new Zh({"circle-radius":new yh(hf.paint_circle["circle-radius"]),"circle-color":new yh(hf.paint_circle["circle-color"]),"circle-blur":new yh(hf.paint_circle["circle-blur"]),"circle-opacity":new yh(hf.paint_circle["circle-opacity"]),"circle-translate":new mh(hf.paint_circle["circle-translate"]),"circle-translate-anchor":new mh(hf.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new mh(hf.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new mh(hf.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new yh(hf.paint_circle["circle-stroke-width"]),"circle-stroke-color":new yh(hf.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new yh(hf.paint_circle["circle-stroke-opacity"])}),Tf={paint:bf,layout:$f},Cf=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Tf)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.createBucket=function(e){return new dh(e)},r.prototype.queryRadius=function(e){var t=e;return td.getMaximumPaintValue("circle-radius",this,t)+td.getMaximumPaintValue("circle-stroke-width",this,t)+td.translateDistance(this.paint.get("circle-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a,s,l){s=Ef();for(var u=td.translate(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),0,a),c=this.paint.get("circle-radius")?.evaluate(t,i),h=this.paint.get("circle-stroke-width")?.evaluate(t,i),d=c+h,f="map"===this.paint.get("circle-pitch-alignment"),p=f?u:wf(u,s),_=f?d*a:d,m=0,g=n;m<g.length;m+=1)for(var x=0,v=g[m];x<v.length;x+=1){var y=v[x],$=f?y:Sf(y,s),b=_;if(Pf([],[y.x,y.y,0,1],s),"viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")||"map"===this.paint.get("circle-pitch-scale")&&this.paint.get("circle-pitch-alignment"),l=wa(l)?l:10,pf.polygonIntersectsBufferedPoint(p,$,b*l))return!0}return!1},r}(bd);function Sf(e,t){var i=Pf([],[e.x,e.y,0,1],t);return new to(i[0],i[1])}function wf(e,t){return e.map((function(e){return Sf(e,t)}))}function Ef(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function Pf(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,e[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,e[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,e[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,e}function Af(e,t,i,n,r){Lf(e,t,i||0,n||e.length-1,r||Rf)}function Lf(e,t,i,n,r){for(;n>i;){if(n-i>600){var o=n-i+1,a=t-i+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);Lf(e,t,Math.max(i,Math.floor(t-a*l/o+u)),Math.min(n,Math.floor(t+(o-a)*l/o+u)),r)}var c=e[t],h=i,d=n;for(Mf(e,i,t),r(e[n],c)>0&&Mf(e,i,n);h<d;){for(Mf(e,h,d),h++,d--;r(e[h],c)<0;)h++;for(;r(e[d],c)>0;)d--}0===r(e[i],c)?Mf(e,i,d):Mf(e,++d,n),d<=t&&(i=d+1),t<=d&&(n=d-1)}}function Mf(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Rf(e,t){return e<t?-1:e>t?1:0}var Of,If=(Of=!0,function(e,t){var i=Of?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Of=!1,i}),Df=If(void 0,(function(){return Df.toString().search("(((.+)+)+)+$").toString().constructor(Df).search("(((.+)+)+)+$")}));function Bf(e){for(var t=0,i=0,n=e.length,r=n-1,o=void 0,a=void 0;i<n;r=i++)o=e[i],t+=((a=e[r]).x-o.x)*(o.y+a.y);return t}function Nf(e,t){var i=e.length;if(i<=1)return[e];for(var n,r,o=[],a=0;a<i;a++){var s=Bf(e[a]);0!==s&&(e[a].area=Math.abs(s),void 0===r&&(r=s<0),r===s<0?(n&&o.push(n),n=[e[a]]):n.push(e[a]))}if(n&&o.push(n),t>1)for(var l=0;l<o.length;l++)o[l].length<=t||(Af(o[l],t,1,o[l].length-1,Ff),o[l]=o[l].slice(0,t));return o}function Ff(e,t){return t.area-e.area}function Uf(e,t,i){i=i||2;var n,r,o,a,s,l,u,c=t&&t.length,h=c?t[0]*i:e.length,d=Gf(e,0,h,i,!0),f=[];if(!d||d.next===d.prev)return f;if(c&&(d=jf(e,t,d,i)),e.length>80*i){n=o=e[0],r=a=e[1];for(var p=i;p<h;p+=i)(s=e[p])<n&&(n=s),(l=e[p+1])<r&&(r=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-r))?1/u:0}return Vf(d,f,i,n,r,u),f}function Gf(e,t,i,n,r){var o,a;if(r===mp(e,t,i,n)>0)for(o=t;o<i;o+=n)a=fp(o,e[o],e[o+1],a);else for(o=i-n;o>=t;o-=n)a=fp(o,e[o],e[o+1],a);return a&&op(a,a.next)&&(pp(a),a=a.next),a}function zf(e,t){if(!e)return e;t||(t=e);var i,n=e;do{if(i=!1,n.steiner||!op(n,n.next)&&0!==rp(n.prev,n,n.next))n=n.next;else{if(pp(n),(n=t=n.prev)===n.next)break;i=!0}}while(i||n!==t);return t}function Vf(e,t,i,n,r,o,a){if(e){!a&&o&&Zf(e,n,r,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?Wf(e,n,r,o):kf(e))t.push(s.i/i),t.push(e.i/i),t.push(l.i/i),pp(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?Vf(e=Hf(zf(e),t,i),t,i,n,r,o,2):2===a&&qf(e,t,i,n,r,o):Vf(zf(e),t,i,n,r,o,1);break}}}function kf(e){var t=e.prev,i=e,n=e.next;if(rp(t,i,n)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(ip(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&rp(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Wf(e,t,i,n){var r=e.prev,o=e,a=e.next;if(rp(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,l=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,u=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=ep(s,l,t,i,n),d=ep(u,c,t,i,n),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&rp(f.prev,f,f.next)>=0||(f=f.prevZ,p!==e.prev&&p!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&rp(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&rp(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&rp(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Hf(e,t,i){var n=e;do{var r=n.prev,o=n.next.next;!op(r,o)&&ap(r,n,n.next,o)&&cp(r,o)&&cp(o,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(o.i/i),pp(n),pp(n.next),n=e=o),n=n.next}while(n!==e);return zf(n)}function qf(e,t,i,n,r,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&np(a,s)){var l=dp(a,s);return a=zf(a,a.next),l=zf(l,l.next),Vf(a,t,i,n,r,o),void Vf(l,t,i,n,r,o)}s=s.next}a=a.next}while(a!==e)}function jf(e,t,i,n){var r,o,a,s=[];for(r=0,o=t.length;r<o;r++)(a=Gf(e,t[r]*n,r<o-1?t[r+1]*n:e.length,n,!1))===a.next&&(a.steiner=!0),s.push(tp(a));for(s.sort(Yf),r=0;r<s.length;r++)Xf(s[r],i),i=zf(i,i.next);return i}function Yf(e,t){return e.x-t.x}function Xf(e,t){if(t=Kf(e,t)){var i=dp(t,e);zf(i,i.next)}}function Kf(e,t){var i,n=t,r=e.x,o=e.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if(a=s,s===r){if(o===n.y)return n;if(o===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!i)return null;if(r===a)return i;var l,u=i,c=i.x,h=i.y,d=1/0;n=i;do{r>=n.x&&n.x>=c&&r!==n.x&&ip(o<h?r:a,o,c,h,o<h?a:r,o,n.x,n.y)&&(l=Math.abs(o-n.y)/(r-n.x),cp(n,e)&&(l<d||l===d&&(n.x>i.x||n.x===i.x&&Qf(i,n)))&&(i=n,d=l)),n=n.next}while(n!==u);return i}function Qf(e,t){return rp(e.prev,e,t.prev)<0&&rp(t.next,e,e.next)<0}function Zf(e,t,i,n){var r=e;do{null===r.z&&(r.z=ep(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,Jf(r)}function Jf(e){var t,i,n,r,o,a,s,l,u=1;do{for(i=e,e=null,o=null,a=0;i;){for(a++,n=i,s=0,t=0;t<u&&(s++,n=n.nextZ);t++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=n}o.nextZ=null,u*=2}while(a>1);return e}function ep(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function tp(e){var t=e,i=e;do{(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next}while(t!==e);return i}function ip(e,t,i,n,r,o,a,s){return(r-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(n-s)-(i-a)*(t-s)>=0&&(i-a)*(o-s)-(r-a)*(n-s)>=0}function np(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!up(e,t)&&(cp(e,t)&&cp(t,e)&&hp(e,t)&&(rp(e.prev,e,t.prev)||rp(e,t.prev,t))||op(e,t)&&rp(e.prev,e,e.next)>0&&rp(t.prev,t,t.next)>0)}function rp(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function op(e,t){return e.x===t.x&&e.y===t.y}function ap(e,t,i,n){var r=lp(rp(e,t,i)),o=lp(rp(e,t,n)),a=lp(rp(i,n,e)),s=lp(rp(i,n,t));return!!(r!==o&&a!==s||0===r&&sp(e,i,t)||0===o&&sp(e,n,t)||0===a&&sp(i,e,n)||0===s&&sp(i,t,n))}function sp(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function lp(e){return e>0?1:e<0?-1:0}function up(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&ap(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function cp(e,t){return rp(e.prev,e,e.next)<0?rp(e,t,e.next)>=0&&rp(e,e.prev,t)>=0:rp(e,t,e.prev)<0||rp(e,e.next,t)<0}function hp(e,t){var i=e,n=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}function dp(e,t){var i=new _p(e.i,e.x,e.y),n=new _p(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function fp(e,t,i,n){var r=new _p(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function pp(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _p(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function mp(e,t,i,n){for(var r=0,o=t,a=i-n;o<i;o+=n)r+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return r}Df(),Uf.deviation=function(e,t,i,n){var r=t&&t.length,o=r?t[0]*i:e.length,a=Math.abs(mp(e,0,o,i));if(r)for(var s=0,l=t.length;s<l;s++){var u=t[s]*i,c=s<l-1?t[s+1]*i:e.length;a-=Math.abs(mp(e,u,c,i))}var h=0;for(s=0;s<n.length;s+=3){var d=n[s]*i,f=n[s+1]*i,p=n[s+2]*i;h+=Math.abs((e[d]-e[p])*(e[f+1]-e[d+1])-(e[d]-e[f])*(e[p+1]-e[d+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},Uf.flatten=function(e){for(var t=e[0][0].length,i={vertices:[],holes:[],dimensions:t},n=0,r=0;r<e.length;r++){for(var o=0;o<e[r].length;o++)for(var a=0;a<t;a++)i.vertices.push(e[r][o][a]);r>0&&(n+=e[r-1].length,i.holes.push(n))}return i};var gp,xp=(gp=!0,function(e,t){var i=gp?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return gp=!1,i}),vp=xp(void 0,(function(){return vp.toString().search("(((.+)+)+)+$").toString().constructor(vp).search("(((.+)+)+)+$")}));function yp(e,t,i,n,r){for(var o=r.patternDependencies,a=0,s=t;a<s.length;a+=1){var l=s[a],u=l.paint.get(e+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:n-1},i,{},r.availableImages),h=u.evaluate({zoom:n},i,{},r.availableImages),d=u.evaluate({zoom:n+1},i,{},r.availableImages);c=c&&c.name?c.name:c,h=h&&h.name?h.name:h,d=d&&d.name?d.name:d,o[c]=!0,o[h]=!0,o[d]=!0,i.patterns[l.id]={min:c,mid:h,max:d}}}return i}vp();var $p,bp=($p=!0,function(e,t){var i=$p?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return $p=!1,i}),Tp=bp(void 0,(function(){return Tp.toString().search("(((.+)+)+)+$").toString().constructor(Tp).search("(((.+)+)+)+$")}));function Cp(e,t,i){for(var n=i.patternDependencies,r=!1,o=0,a=t;o<a.length;o+=1){var s=a[o].paint.get(e+"-pattern");!s.isConstant()&&(r=!0);var l=s.constantOr(null);l&&(r=!0,n[l.to]=!0,n[l.from]=!0)}return r}if(Tp(),typeof WebAssembly<"u"){let e=function(e){return wp.locateFile?wp.locateFile(e,Ip):Ip+e},t=function(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1)},i=function(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return Hp[e>>0];case"i16":return jp[e>>1];case"i32":case"i64":return Yp[e>>2];case"float":return Kp[e>>2];case"double":return Qp[e>>3];default:de("invalid type for getValue: "+t)}return null},n=function(e,t){e||de("Assertion failed: "+t)},r=function(e){var t=wp["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=k_(i),c(e,t,i)}return t},array:function(e){var t=k_(e.length);return h(e,t),t}},u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p<o.length;p++){var _=s[i[p]];_?(0===f&&(f=H_()),d[p]=_(o[p])):d[p]=o[p]}var m=u.apply(null,d);return m=function(e){return"string"===t?l(e):"boolean"===t?Boolean(e):e}(m),0!==f&&W_(f),m},a=function(e,t,i,n){return function(){return o(e,t,i,arguments)}},s=function(e,i,n){for(var r=i+n,o=i;e[o]&&!(o>=r);)++o;if(o-i>16&&e.subarray&&kp)return kp.decode(e.subarray(i,o));for(var a="";i<o;){var s=e[i++];if(128&s){var l=63&e[i++];if(192!=(224&s)){var u=63&e[i++];if(224==(240&s)?s=(15&s)<<12|l<<6|u:(240!=(248&s)&&t("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),s=(7&s)<<18|l<<12|u<<6|63&e[i++]),s<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(qp,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343&&(l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s)),l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,qp,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),Hp.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e==e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return wp.extraStackTrace&&(e+="\n"+wp.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){wp.HEAP8=Hp=new Int8Array(Wp),wp.HEAP16=jp=new Int16Array(Wp),wp.HEAP32=Yp=new Int32Array(Wp),wp.HEAPU8=qp=new Uint8Array(Wp),wp.HEAPU16=new Uint16Array(Wp),wp.HEAPU32=Xp=new Uint32Array(Wp),wp.HEAPF32=Kp=new Float32Array(Wp),wp.HEAPF64=Qp=new Float64Array(Wp)},g=function(){n(0==(3&e_)),Xp[(e_>>2)-1]=34821223,Xp[(e_>>2)-2]=2310721022},x=function(){(34821223!=Xp[(e_>>2)-1]||2310721022!=Xp[(e_>>2)-2])&&de("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+Xp[(e_>>2)-2].toString(16)+" "+Xp[(e_>>2)-1].toString(16)),1668509029!==Yp[0]&&de("Runtime error: The application has corrupted its heap memory area (address zero)!")},v=function(e){de("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(e_-H_()+e)+" bytes available!")},y=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?wp.dynCall_v(i):wp.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},$=function(){if(wp.preRun)for("function"==typeof wp.preRun&&(wp.preRun=[wp.preRun]);wp.preRun.length;)S(wp.preRun.shift());y(o_)},b=function(){x(),!u_&&(u_=!0,y(a_))},T=function(){x(),y(s_)},C=function(){if(x(),wp.postRun)for("function"==typeof wp.postRun&&(wp.postRun=[wp.postRun]);wp.postRun.length;)w(wp.postRun.shift());y(l_)},S=function(e){o_.unshift(e)},w=function(e){l_.unshift(e)},E=function(e){h_++,wp.monitorRunDependencies&&wp.monitorRunDependencies(h_),e&&(n(!p_[e]),p_[e]=1,null===d_&&typeof setInterval<"u"&&(d_=setInterval((function(){if(Vp)return clearInterval(d_),void(d_=null)}),1e4)))},P=function(e){if(h_--,wp.monitorRunDependencies&&wp.monitorRunDependencies(h_),e&&(n(p_[e]),delete p_[e]),0==h_&&(null!==d_&&(clearInterval(d_),d_=null),f_)){var t=f_;f_=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(g_):0===e.indexOf(g_)},L=function(){try{if(wp.wasmBinary)return new Uint8Array(wp.wasmBinary);if(wp.readBinary)return wp.readBinary(m_);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}},M=function(){return wp.wasmBinary||!Pp&&!Ap||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(m_,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+m_+"'";return e.arrayBuffer()})).catch((function(){return L()}))},R=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Np};function i(e,t){var i=e.exports;wp.asm=i,P("wasm-instantiate")}E("wasm-instantiate");var r=wp;function o(e){n(wp===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(wp.instantiateWasm)try{return wp.instantiateWasm(t,i)}catch{return!1}return function(){if(wp.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(m_)||"function"!=typeof fetch)return a(o);fetch(m_,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},O=function(e){return V_(e)},I=function(e){e&&y_[e].refcount++},D=function(e){if(!e||y_[e])return e;for(var t in y_)for(var i=+t,n=y_[i].adjusted,r=n.length,o=0;o<r;o++)if(n[o]===e)return i;return e},B=function(e){var t=y_[e];return t&&!t.caught&&(t.caught=!0,z_.uncaught_exception--),t&&(t.rethrown=!1),$_.push(e),I(D(e)),e},N=function(e,t,i){throw y_[e]={ptr:e,adjusted:[e],type:t,destructor:i,refcount:0,caught:!1,rethrown:!1},"uncaught_exception"in z_?z_.uncaught_exception++:z_.uncaught_exception=1,e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."},F=function(){return!!z_.uncaught_exception},U=function(){},G=function(){},z=function(e,t){b_.varargs=t;try{return b_.getStreamFromFD(),b_.get(),b_.get(),b_.get(),b_.get(),de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},V=function(){var e=wp._fflush;e&&e(0);var t=b_.buffers;t[1].length&&b_.printChar(1,10),t[2].length&&b_.printChar(2,10)},k=function(e,t){b_.varargs=t;try{for(var i=b_.get(),n=b_.get(),r=b_.get(),o=0,a=0;a<r;a++){for(var s=Yp[n+8*a>>2],l=Yp[n+(8*a+4)>>2],u=0;u<l;u++)b_.printChar(i,qp[s+u]);o+=l}return o}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},W=function(e,t){b_.varargs=t;try{return 0}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},H=function(e,t){b_.varargs=t;try{return b_.getStreamFromFD(),de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},q=function(){},j=function(){wp.abort()},Y=function(){return Hp.length},X=function(e,t,i){qp.set(qp.subarray(t,t+i),e)},K=function(e){if(!wp.___errno_location)return e;Yp[wp.___errno_location()>>2]=e},Q=function(e){de("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+Hp.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},Z=function(e){e=_(e,65536);var t=Wp.byteLength;try{return-1!==zp.grow((e-t)/65536)&&(Wp=zp.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},J=function(e){var i=Y();n(e>i);var r=65536,o=2147418112;if(e>o)return!1;for(var a=Math.max(i,16777216);a<e;)(a=a<=536870912?_(2*a,r):Math.min(_((3*a+2147483648)/4,r),o))===i&&t("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+Hp.length);return!!Z(a)&&(m(),!0)},ee=function(e){Bp("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},te=function(e){Bp("Invalid function pointer called with signature 'iidiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},ie=function(e){Bp("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},ne=function(e){Bp("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},re=function(e){Bp("Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},oe=function(e){Bp("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},ae=function(e){Bp("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},se=function(e){Bp("Invalid function pointer called with signature 'viiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},le=function(e){Bp("Invalid function pointer called with signature 'viiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},ue=function(e){Bp("Invalid function pointer called with signature 'viiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},ce=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},he=function(e){function t(){wp.calledRun||(wp.calledRun=!0,!Vp&&(b(),T(),wp.onRuntimeInitialized&&wp.onRuntimeInitialized(),n(!wp._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),C()))}e=e||wp.arguments,h_>0||(g(),$(),h_>0)||wp.calledRun||(wp.setStatus?(wp.setStatus("Running..."),setTimeout((function(){setTimeout((function(){wp.setStatus("")}),1),t()}),1)):t(),x())},de=function(e){wp.onAbort&&wp.onAbort(e),Vp=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw q_&&q_.forEach((function(i){t=i(t,e)})),t};var Sp,wp=typeof wp<"u"?wp:{},Ep={};for(Sp in wp)wp.hasOwnProperty(Sp)&&(Ep[Sp]=wp[Sp]);wp.arguments=[],wp.thisProgram="./this.program",wp.quit=function(e,t){throw t},wp.preRun=[],wp.postRun=[];var Pp=!1,Ap=!1,Lp=!1,Mp=!1;if(Pp="object"==typeof window,Ap="function"==typeof importScripts,Lp="object"==typeof process&&"function"==typeof require&&!Pp&&!Ap,Mp=!Pp&&!Lp&&!Ap,wp.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var Rp,Op,Ip="";if(Lp)Ip=__dirname+"/",wp.read=function(e,t){var i;return Rp||(Rp=require("fs")),Op||(Op=require("path")),e=Op.normalize(e),i=Rp.readFileSync(e),t?i:i.toString()},wp.readBinary=function(e){var t=wp.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(wp.thisProgram=process.argv[1].replace(/\\/g,"/")),wp.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=wp),process.on("uncaughtException",(function(e){if(!(e instanceof ce))throw e})),process.on("unhandledRejection",de),wp.quit=function(e){process.exit(e)},wp.inspect=function(){return"[Emscripten Module object]"};else if(Mp)typeof read<"u"&&(wp.read=function(e){return read(e)}),wp.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?wp.arguments=scriptArgs:typeof arguments<"u"&&(wp.arguments=arguments),"function"==typeof quit&&(wp.quit=function(e){quit(e)});else{if(!Pp&&!Ap)throw new Error("environment detection error");Ap?Ip=self.location.href:document.currentScript&&(Ip=document.currentScript.src),Ip=0!==Ip.indexOf("blob:")?Ip.substr(0,Ip.lastIndexOf("/")+1):"",wp.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},Ap&&(wp.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),wp.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},wp.setWindowTitle=function(e){document.title=e}}var Dp=wp.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),Bp=wp.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||Dp);for(Sp in Ep)Ep.hasOwnProperty(Sp)&&(wp[Sp]=Ep[Sp]);Ep=void 0,n(typeof wp.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof wp.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof wp.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof wp.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),H_=W_=k_=function(){de("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Np={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var Fp=0,Up=function(e){Fp=e},Gp=function(){return Fp};"object"!=typeof WebAssembly&&de("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var zp,Vp=!1,kp=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Wp,Hp,qp,jp,Yp,Xp,Kp,Qp,Zp=65536,Jp=5872,e_=5248752,t_=5248752,i_=5840;n(Jp%16==0,"stack must start aligned"),n(t_%16==0,"heap must start aligned");var n_=5242880;wp.TOTAL_STACK&&n(n_===wp.TOTAL_STACK,"the stack size can no longer be determined at runtime");var r_=wp.TOTAL_MEMORY||16777216;if(r_<n_&&Bp("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+r_+"! (TOTAL_STACK="+n_+")"),n(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),wp.buffer?(Wp=wp.buffer,n(Wp.byteLength===r_,"provided buffer should be "+r_+" bytes, but it is "+Wp.byteLength)):("object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(n(r_%Zp==0),zp=new WebAssembly.Memory({initial:r_/Zp}),Wp=zp.buffer):Wp=new ArrayBuffer(r_),n(Wp.byteLength===r_)),m(),Yp[i_>>2]=t_,Yp[0]=1668509029,jp[1]=25459,115!==qp[2]||99!==qp[3])throw"Runtime error: expected the system to be little-endian!";var o_=[],a_=[],s_=[],l_=[],u_=!1,c_=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var h_=0,d_=null,f_=null,p_={};wp.preloadedImages={},wp.preloadedAudios={};var __={error:function(){de("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){__.error()},createDataFile:function(){__.error()},createPreloadedFile:function(){__.error()},createLazyFile:function(){__.error()},open:function(){__.error()},mkdev:function(){__.error()},registerDevice:function(){__.error()},analyzePath:function(){__.error()},loadFilesFromDB:function(){__.error()},ErrnoError:function(){__.error()}};wp.FS_createDataFile=__.createDataFile,wp.FS_createPreloadedFile=__.createPreloadedFile;var m_,g_="data:application/octet-stream;base64,",x_=typeof window>"u"?self:window;m_=x_.location.href.endsWith(".openrealspace")?"../../static/Build/SuperMap3D/ThirdParty/earcut.wasm":"ThirdParty/earcut.wasm",A(m_)||(m_=e(m_)),wp.asm=function(e,t,i){t.memory=zp,t.table=new WebAssembly.Table({initial:260,maximum:260,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=R(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var v_=5856;n(v_%8==0);var y_={},$_=[],b_={buffers:[null,[],[]],printChar:function(e,t){var i=b_.buffers[e];n(i),0===t||10===t?((1===e?Dp:Bp)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return b_.varargs+=4,Yp[b_.varargs-4>>2]},getStr:function(){return l(b_.get())},get64:function(){var e=b_.get(),t=b_.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===b_.get())}},T_={},C_={abort:de,setTempRet0:Up,getTempRet0:Gp,abortStackOverflow:v,nullFunc_ii:ee,nullFunc_iidiiii:te,nullFunc_iiii:ie,nullFunc_jiji:ne,nullFunc_v:re,nullFunc_vi:oe,nullFunc_vii:ae,nullFunc_viiii:se,nullFunc_viiiii:le,nullFunc_viiiiii:ue,___cxa_allocate_exception:O,___cxa_begin_catch:B,___cxa_throw:N,___cxa_uncaught_exception:F,___exception_addRef:I,___exception_deAdjust:D,___gxx_personality_v0:U,___lock:G,___setErrNo:K,___syscall140:z,___syscall146:k,___syscall54:W,___syscall6:H,___unlock:q,_abort:j,_emscripten_get_heap_size:Y,_emscripten_memcpy_big:X,_emscripten_resize_heap:J,abortOnCannotGrowMemory:Q,emscripten_realloc_buffer:Z,flush_NO_FILESYSTEM:V,tempDoublePtr:v_,DYNAMICTOP_PTR:i_},S_=wp.asm(T_,C_,Wp),w_=S_.__ZSt18uncaught_exceptionv;S_.__ZSt18uncaught_exceptionv=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),w_.apply(null,arguments)};var E_=S_.___cxa_can_catch;S_.___cxa_can_catch=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),E_.apply(null,arguments)};var P_=S_.___cxa_is_pointer_type;S_.___cxa_is_pointer_type=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),P_.apply(null,arguments)};var A_=S_.___errno_location;S_.___errno_location=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),A_.apply(null,arguments)};var L_=S_._earcut;S_._earcut=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),L_.apply(null,arguments)};var M_=S_._fflush;S_._fflush=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),M_.apply(null,arguments)};var R_=S_._free;S_._free=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),R_.apply(null,arguments)};var O_=S_._llvm_maxnum_f64;S_._llvm_maxnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),O_.apply(null,arguments)};var I_=S_._llvm_minnum_f64;S_._llvm_minnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),I_.apply(null,arguments)};var D_=S_._malloc;S_._malloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),D_.apply(null,arguments)};var B_=S_._sbrk;S_._sbrk=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),B_.apply(null,arguments)};var N_=S_.establishStackSpace;S_.establishStackSpace=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),N_.apply(null,arguments)};var F_=S_.stackAlloc;S_.stackAlloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),F_.apply(null,arguments)};var U_=S_.stackRestore;S_.stackRestore=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),U_.apply(null,arguments)};var G_=S_.stackSave;S_.stackSave=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),G_.apply(null,arguments)},wp.asm=S_;var z_=wp.__ZSt18uncaught_exceptionv=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.__ZSt18uncaught_exceptionv.apply(null,arguments)};wp.___cxa_can_catch=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.___cxa_can_catch.apply(null,arguments)},wp.___cxa_is_pointer_type=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.___cxa_is_pointer_type.apply(null,arguments)},wp.___errno_location=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.___errno_location.apply(null,arguments)},wp._earcut=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._earcut.apply(null,arguments)},wp._emscripten_replace_memory=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._emscripten_replace_memory.apply(null,arguments)},wp._fflush=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._fflush.apply(null,arguments)},wp._free=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._free.apply(null,arguments)},wp._llvm_maxnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._llvm_maxnum_f64.apply(null,arguments)},wp._llvm_minnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._llvm_minnum_f64.apply(null,arguments)};var V_=wp._malloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._malloc.apply(null,arguments)};wp._memcpy=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._memcpy.apply(null,arguments)},wp._memset=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._memset.apply(null,arguments)},wp._sbrk=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._sbrk.apply(null,arguments)},wp.establishStackSpace=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.establishStackSpace.apply(null,arguments)};var k_=wp.stackAlloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.stackAlloc.apply(null,arguments)},W_=wp.stackRestore=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.stackRestore.apply(null,arguments)},H_=wp.stackSave=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.stackSave.apply(null,arguments)};wp.dynCall_ii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_ii.apply(null,arguments)},wp.dynCall_iidiiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_iidiiii.apply(null,arguments)},wp.dynCall_iiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_iiii.apply(null,arguments)},wp.dynCall_jiji=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_jiji.apply(null,arguments)},wp.dynCall_v=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_v.apply(null,arguments)},wp.dynCall_vi=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_vi.apply(null,arguments)},wp.dynCall_vii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_vii.apply(null,arguments)},wp.dynCall_viiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_viiii.apply(null,arguments)},wp.dynCall_viiiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_viiiii.apply(null,arguments)},wp.dynCall_viiiiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_viiiiii.apply(null,arguments)},wp.asm=S_,wp.intArrayFromString||(wp.intArrayFromString=function(){de("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.intArrayToString||(wp.intArrayToString=function(){de("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.ccall=o,wp.cwrap=a,wp.setValue||(wp.setValue=function(){de("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getValue=i,wp.allocate||(wp.allocate=function(){de("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getMemory||(wp.getMemory=function(){de("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.AsciiToString||(wp.AsciiToString=function(){de("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToAscii||(wp.stringToAscii=function(){de("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF8ArrayToString||(wp.UTF8ArrayToString=function(){de("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF8ToString||(wp.UTF8ToString=function(){de("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF8Array||(wp.stringToUTF8Array=function(){de("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF8||(wp.stringToUTF8=function(){de("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.lengthBytesUTF8||(wp.lengthBytesUTF8=function(){de("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF16ToString||(wp.UTF16ToString=function(){de("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF16||(wp.stringToUTF16=function(){de("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.lengthBytesUTF16||(wp.lengthBytesUTF16=function(){de("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF32ToString||(wp.UTF32ToString=function(){de("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF32||(wp.stringToUTF32=function(){de("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.lengthBytesUTF32||(wp.lengthBytesUTF32=function(){de("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.allocateUTF8||(wp.allocateUTF8=function(){de("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackTrace||(wp.stackTrace=function(){de("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnPreRun||(wp.addOnPreRun=function(){de("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnInit||(wp.addOnInit=function(){de("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnPreMain||(wp.addOnPreMain=function(){de("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnExit||(wp.addOnExit=function(){de("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnPostRun||(wp.addOnPostRun=function(){de("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.writeStringToMemory||(wp.writeStringToMemory=function(){de("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.writeArrayToMemory||(wp.writeArrayToMemory=function(){de("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.writeAsciiToMemory||(wp.writeAsciiToMemory=function(){de("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addRunDependency||(wp.addRunDependency=function(){de("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.removeRunDependency||(wp.removeRunDependency=function(){de("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.ENV||(wp.ENV=function(){de("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.FS||(wp.FS=function(){de("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.FS_createFolder||(wp.FS_createFolder=function(){de("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createPath||(wp.FS_createPath=function(){de("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createDataFile||(wp.FS_createDataFile=function(){de("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createPreloadedFile||(wp.FS_createPreloadedFile=function(){de("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createLazyFile||(wp.FS_createLazyFile=function(){de("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createLink||(wp.FS_createLink=function(){de("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createDevice||(wp.FS_createDevice=function(){de("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_unlink||(wp.FS_unlink=function(){de("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.GL||(wp.GL=function(){de("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.dynamicAlloc||(wp.dynamicAlloc=function(){de("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.warnOnce||(wp.warnOnce=function(){de("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.loadDynamicLibrary||(wp.loadDynamicLibrary=function(){de("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.loadWebAssemblyModule||(wp.loadWebAssemblyModule=function(){de("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getLEB||(wp.getLEB=function(){de("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getFunctionTables||(wp.getFunctionTables=function(){de("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.alignFunctionTables||(wp.alignFunctionTables=function(){de("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.registerFunctions||(wp.registerFunctions=function(){de("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addFunction||(wp.addFunction=function(){de("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.removeFunction||(wp.removeFunction=function(){de("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getFuncWrapper||(wp.getFuncWrapper=function(){de("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.prettyPrint||(wp.prettyPrint=function(){de("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.makeBigInt||(wp.makeBigInt=function(){de("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.dynCall||(wp.dynCall=function(){de("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getCompilerSetting||(wp.getCompilerSetting=function(){de("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackSave||(wp.stackSave=function(){de("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackRestore||(wp.stackRestore=function(){de("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackAlloc||(wp.stackAlloc=function(){de("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.establishStackSpace||(wp.establishStackSpace=function(){de("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.print||(wp.print=function(){de("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.printErr||(wp.printErr=function(){de("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getTempRet0||(wp.getTempRet0=function(){de("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.setTempRet0||(wp.setTempRet0=function(){de("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.Pointer_stringify||(wp.Pointer_stringify=function(){de("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.ALLOC_NORMAL||Object.defineProperty(wp,"ALLOC_NORMAL",{get:function(){de("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wp.ALLOC_STACK||Object.defineProperty(wp,"ALLOC_STACK",{get:function(){de("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wp.ALLOC_DYNAMIC||Object.defineProperty(wp,"ALLOC_DYNAMIC",{get:function(){de("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wp.ALLOC_NONE||Object.defineProperty(wp,"ALLOC_NONE",{get:function(){de("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),ce.prototype=new Error,ce.prototype.constructor=ce,f_=function e(){wp.calledRun||he(),wp.calledRun||(f_=e)},wp.run=he;var q_=[];if(wp.abort=de,wp.preInit)for("function"==typeof wp.preInit&&(wp.preInit=[wp.preInit]);wp.preInit.length>0;)wp.preInit.pop()();wp.noExitRuntime=!0,he()}else wp=null;var j_,Y_=wp,X_=(j_=!0,function(e,t){var i=j_?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return j_=!1,i}),K_=X_(void 0,(function(){return K_.toString().search("(((.+)+)+)+$").toString().constructor(K_).search("(((.+)+)+)+$")}));K_();var Q_=!1;if(wa(Y_)){Y_.onRuntimeInitialized=function(){Q_=!0};var Z_=Y_.cwrap("earcut","number",["number","number","number","number","number","number"])}var J_=ao([{name:"a_pos",components:2,type:"Int16"}],4),em=J_.members,tm=500,im=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Bo,this.indexArray=new Zo,this.indexArray2=new Jo,this.programConfigurations=new eh(em,e.layers,e.zoom),this.segments=new Ao,this.segments2=new Ao,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};im.prototype.populate=function(e,t){this.hasPattern=Cp("fill",this.layers,t);for(var i=[],n=0,r=e;n<r.length;n+=1){var o=r[n],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(this.layers[0]._featureFilter(new go(0),a)){var u=So(a),c={id:a.id,properties:a.properties,type:a.type,sourceLayerIndex:l,index:s,geometry:u,patterns:{},sortKey:void 0};i.push(c)}}for(var h=0,d=i;h<d.length;h+=1){var f=d[h],p=f,_=p.geometry,m=p.index,g=p.sourceLayerIndex;if(this.hasPattern){var x=yp("fill",this.layers,f,this.zoom,t);this.patternFeatures.push(x)}else this.addFeature(f,_,m,{},t.indexData);var v=e[m].feature;t.featureIndex.insert(v,_,m,g,this.index)}},im.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},im.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},im.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},im.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},im.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=em;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Tc.toIndexBuffer(e,this.indexArray),this.cesiumIndexBuffer2=Tc.toIndexBuffer(e,this.indexArray2))}this.programConfigurations.upload(e),this.uploaded=!0},im.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer?.destroy(),this.cesiumIndexBuffer2?.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},im.prototype.clear=function(){wa(this.layoutVertexArray)&&(this.layoutVertexArray=null),wa(this.indexArray)&&(this.indexArray=null),wa(this.indexArray2)&&(this.indexArray2=null)},im.prototype.addFeature=function(e,t,i,n,r){for(var o=0,a=Nf(t,tm);o<a.length;o+=1){for(var s=a[o],l=0,u=0,c=s;u<c.length;u+=1)l+=c[u].length;for(var h,d=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),f=d.vertexLength,p=[],_=[],m=0,g=s;m<g.length;m+=1){var x=g[m];if(0!==x.length){x!==s[0]&&_.push(p.length/2);var v=this.segments2.prepareSegment(x.length,this.layoutVertexArray,this.indexArray2),y=v.vertexLength;this.layoutVertexArray.emplaceBack(x[0].x,x[0].y),this.indexArray2.emplaceBack(y+x.length-1,y),p.push(x[0].x),p.push(x[0].y);for(var $=1;$<x.length;$++)this.layoutVertexArray.emplaceBack(x[$].x,x[$].y),this.indexArray2.emplaceBack(y+$-1,y+$),p.push(x[$].x),p.push(x[$].y);v.vertexLength+=x.length,v.primitiveLength+=x.length}}if(wa(r)&&wa(r[e.id]))h=r[e.id];else if(!0===Q_){var b=new Int32Array(p),T=b.length,C=Y_._malloc(Int32Array.BYTES_PER_ELEMENT*T);Y_.HEAP32.set(b,C/Int32Array.BYTES_PER_ELEMENT);var S=new Int32Array(_),w=S.length,E=Y_._malloc(Int32Array.BYTES_PER_ELEMENT*w);Y_.HEAP32.set(S,E/Int32Array.BYTES_PER_ELEMENT);var P=new Int32Array(10*T),A=Y_._malloc(Int32Array.BYTES_PER_ELEMENT*T*10);Y_.HEAP32.set(P,A/Int32Array.BYTES_PER_ELEMENT);var L=Z_(C,T,E,w,2,A),M=new Int32Array(Y_.HEAP32.buffer,A,L);h=new Int32Array(M),Y_._free(C),Y_._free(E),Y_._free(A)}else h=Uf(p,_);for(var R=0;R<h.length;R+=3)this.indexArray.emplaceBack(f+h[R],f+h[R+1],f+h[R+2]);d.vertexLength+=l,d.primitiveLength+=h.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,n)},en.register("FillBucket",im,{omit:["layers","patternFeatures"]});var nm=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.possiblyEvaluate=function(e,t,i){if(void 0===e.value)return new $a(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i),r="resolvedImage"===e.property.specification.type&&"string"!=typeof n?n.name:n,o=this._calculate(r,r,r,t);return new $a(this,{kind:"constant",value:o},t)}if("camera"===e.expression.kind){var a=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new $a(this,{kind:"constant",value:a},t)}return new $a(this,e.expression,t)},r.prototype.evaluate=function(e,t,i,n,r){if("source"===e.kind){var o=e.evaluate(t,i,n,r);return this._calculate(o,o,o,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},i,n),e.evaluate({zoom:Math.floor(t.zoom)},i,n),e.evaluate({zoom:Math.floor(t.zoom)+1},i,n),t):e.value},r.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},r.prototype.interpolate=function(e){return e},r}(yh);en.register("DataDrivenProperty",yh);var rm,om=new Zh({"fill-sort-key":new yh(hf.layout_fill["fill-sort-key"])}),am=new Zh({"fill-antialias":new mh(hf.paint_fill["fill-antialias"]),"fill-opacity":new yh(hf.paint_fill["fill-opacity"]),"fill-color":new yh(hf.paint_fill["fill-color"]),"fill-outline-color":new yh(hf.paint_fill["fill-outline-color"]),"fill-translate":new mh(hf.paint_fill["fill-translate"]),"fill-translate-anchor":new mh(hf.paint_fill["fill-translate-anchor"]),"fill-pattern":new nm(hf.paint_fill["fill-pattern"])}),sm={paint:am,layout:om},lm=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,sm)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},r.prototype.createBucket=function(e){return new im(e)},r.prototype.queryRadius=function(){return td.translateDistance(this.paint.get("fill-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){var s=td.translate(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),0,a);return pf.polygonIntersectsMultiPolygon(s,n)},r.prototype.isTileClipped=function(){return!0},r}(bd),um=(rm=!0,function(e,t){var i=rm?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return rm=!1,i}),cm=um(void 0,(function(){return cm.toString().search("(((.+)+)+)+$").toString().constructor(cm).search("(((.+)+)+)+$")}));cm();var hm=["Unknown","Point","LineString","Polygon"],dm=ao([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),fm=dm.members,pm=63,_m=Math.cos(Math.PI/180*37.5),mm=15,gm=20,xm=15,vm=.5,ym=Math.pow(2,xm-1)/vm,$m=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Uo,this.indexArray=new Zo,this.programConfigurations=new eh(fm,e.layers,e.zoom),this.segments=new Ao,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};$m.prototype.populate=function(e,t){this.hasPattern=!1;for(var i=this.layers[0].layout.get("line-sort-key"),n=[],r=0,o=e;r<o.length;r+=1){var a=o[r],s=a.feature,l=a.index,u=a.sourceLayerIndex;if(this.layers[0]._featureFilter(new go(0),s)){var c=So(s),h=i?i.evaluate(s,{}):void 0,d={id:s.id,properties:s.properties,type:s.type,sourceLayerIndex:u,index:l,geometry:c,patterns:{},sortKey:h};n.push(d)}}i&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var f=0,p=n;f<p.length;f+=1){var _=p[f],m=_,g=m.geometry,x=m.index,v=m.sourceLayerIndex;if(this.hasPattern){var y=yp("line",this.layers,_,this.zoom,t);this.patternFeatures.push(y)}else this.addFeature(_,g,x,{});var $=e[x].feature;t.featureIndex.insert($,g,x,v,this.index)}},$m.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},$m.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},$m.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},$m.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},$m.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=fm;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Tc.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},$m.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy()),this.programConfigurations.destroy(),this.segments.destroy())},$m.prototype.clear=function(){wa(this.layoutVertexArray)&&(this.layoutVertexArray=null),wa(this.indexArray)&&(this.indexArray=null)},$m.prototype.addFeature=function(e,t,i,n){for(var r=this.layers[0].layout,o=r.get("line-join").evaluate(e,{}),a=r.get("line-cap"),s=r.get("line-miter-limit"),l=r.get("line-round-limit"),u=0,c=t;u<c.length;u+=1){var h=c[u];this.addLine(h,e,o,a,s,l,i,n)}},$m.prototype.addLine=function(e,t,i,n,r,o,a,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+t.properties.mapbox_clip_start,this.clipEnd=+t.properties.mapbox_clip_end;for(var l=0;l<e.length-1;l++)this.totalDistance+=e[l].dist(e[l+1])}for(var u="Polygon"===hm[t.type],c=e.length;c>=2&&e[c-1].equals(e[c-2]);)c--;for(var h=0;h<c-1&&e[h].equals(e[h+1]);)h++;if(!(c<(u?3:2))){"bevel"===i&&(r=1.05);var d,f=this.overscaling<=16?mm*$o/(512*this.overscaling):0,p=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray),_=void 0,m=void 0,g=void 0,x=void 0;this.e1=this.e2=-1,u&&(d=e[c-2],x=e[h].sub(d)._unit()._perp());for(var v=h;v<c;v++)if(!(m=u&&v===c-1?e[h+1]:e[v+1])||!e[v].equals(m)){x&&(g=x),d&&(_=d),d=e[v],x=m?m.sub(d)._unit()._perp():g;var y=(g=g||x).add(x);(0!==y.x||0!==y.y)&&y._unit();var $=g.x*x.x+g.y*x.y,b=y.x*x.x+y.y*x.y,T=0!==b?1/b:1/0,C=2*Math.sqrt(2-2*b),S=b<_m&&_&&m,w=g.x*x.y-g.y*x.x>0;if(S&&v>h){var E=d.dist(_);if(E>2*f){var P=d.sub(d.sub(_)._mult(f/E)._round());this.updateDistance(_,P),this.addCurrentVertex(P,g,0,0,p),_=P}}var A=_&&m,L=A?i:u?"butt":n;if(A&&"round"===L&&(T<o?L="miter":T<=2&&(L="fakeround")),"miter"===L&&T>r&&(L="bevel"),"bevel"===L&&(T>2&&(L="flipbevel"),T<r&&(L="miter")),_&&this.updateDistance(_,d),"miter"===L)y._mult(T),this.addCurrentVertex(d,y,0,0,p);else if("flipbevel"===L){if(T>100)y=x.mult(-1);else{var M=T*g.add(x).mag()/g.sub(x).mag();y._perp()._mult(M*(w?-1:1))}this.addCurrentVertex(d,y,0,0,p),this.addCurrentVertex(d,y.mult(-1),0,0,p)}else if("bevel"===L||"fakeround"===L){var R=-Math.sqrt(T*T-1),O=w?R:0,I=w?0:R;if(_&&this.addCurrentVertex(d,g,O,I,p),"fakeround"===L)for(var D=Math.round(180*C/Math.PI/gm),B=1;B<D;B++){var N=B/D;if(.5!==N){var F=N-.5;N+=N*F*(N-1)*((1.0904+$*($*(3.55645-1.43519*$)-3.2452))*F*F+(.848013+$*(.215638*$-1.06021)))}var U=x.sub(g)._mult(N)._add(g)._unit()._mult(w?-1:1);this.addHalfVertex(d,U.x,U.y,!1,w,0,p)}m&&this.addCurrentVertex(d,x,-O,-I,p)}else if("butt"===L)this.addCurrentVertex(d,y,0,0,p);else if("square"===L){var G=_?1:-1;this.addCurrentVertex(d,y,G,G,p)}else"round"===L&&(_&&(this.addCurrentVertex(d,g,0,0,p),this.addCurrentVertex(d,g,1,1,p,!0)),m&&(this.addCurrentVertex(d,x,-1,-1,p,!0),this.addCurrentVertex(d,x,0,0,p)));if(S&&v<c-1){var z=d.dist(m);if(z>2*f){var V=d.add(m.sub(d)._mult(f/z)._round());this.updateDistance(d,V),this.addCurrentVertex(V,x,0,0,p),d=V}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,a,s)}},$m.prototype.addCurrentVertex=function(e,t,i,n,r,o){void 0===o&&(o=!1);var a=t.x+t.y*i,s=t.y-t.x*i,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,a,s,o,!1,i,r),this.addHalfVertex(e,l,u,o,!0,-n,r),this.distance>ym/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,i,n,r,o))},$m.prototype.addHalfVertex=function(e,t,i,n,r,o,a){var s=e.x,l=e.y,u=this.scaledDistance*vm;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(r?1:0),Math.round(pm*t)+128,Math.round(pm*i)+128,1+(0===o?0:o<0?-1:1)|(63&u)<<2,u>>6);var c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),a.primitiveLength++),r?this.e2=c:this.e1=c},$m.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(ym-1):this.distance},en.register("LineBucket",$m,{omit:["layers","patternFeatures"]});var bm,Tm=(bm=!0,function(e,t){var i=bm?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return bm=!1,i}),Cm=Tm(void 0,(function(){return Cm.toString().search("(((.+)+)+)+$").toString().constructor(Cm).search("(((.+)+)+)+$")}));Cm();var Sm=function(e){this.specification=e};Sm.prototype.possiblyEvaluate=function(e,t,i){if(void 0!==e.value){if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new go(Math.floor(t.zoom-1),t)),e.expression.evaluate(new go(Math.floor(t.zoom),t)),e.expression.evaluate(new go(Math.floor(t.zoom+1),t)),t)}},Sm.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},Sm.prototype.interpolate=function(e){return e},en.register("CrossFadedProperty",Sm);var wm,Em=(wm=!0,function(e,t){var i=wm?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wm=!1,i}),Pm=Em(void 0,(function(){return Pm.toString().search("(((.+)+)+)+$").toString().constructor(Pm).search("(((.+)+)+)+$")}));Pm();var Am=function(e){this.specification=e};Am.prototype.possiblyEvaluate=function(e,t,i){return!!e.expression.evaluate(t,null,{},i)},Am.prototype.interpolate=function(){return!1},en.register("ColorRampProperty",Am);var Lm=new Zh({"line-cap":new mh(hf.layout_line["line-cap"]),"line-join":new yh(hf.layout_line["line-join"]),"line-miter-limit":new mh(hf.layout_line["line-miter-limit"]),"line-round-limit":new mh(hf.layout_line["line-round-limit"]),"line-sort-key":new yh(hf.layout_line["line-sort-key"])}),Mm=new Zh({"line-opacity":new yh(hf.paint_line["line-opacity"]),"line-color":new yh(hf.paint_line["line-color"]),"line-translate":new mh(hf.paint_line["line-translate"]),"line-translate-anchor":new mh(hf.paint_line["line-translate-anchor"]),"line-width":new yh(hf.paint_line["line-width"]),"line-gap-width":new yh(hf.paint_line["line-gap-width"]),"line-offset":new yh(hf.paint_line["line-offset"]),"line-blur":new yh(hf.paint_line["line-blur"]),"line-dasharray":new Sm(hf.paint_line["line-dasharray"]),"line-pattern":new nm(hf.paint_line["line-pattern"]),"line-gradient":new Am(hf.paint_line["line-gradient"])}),Rm={paint:Mm,layout:Lm},Om=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,i){return i=new go(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),e.prototype.possiblyEvaluate.call(this,t,i)},t.prototype.evaluate=function(t,i,n,r){return i=extend({},i,{zoom:Math.floor(i.zoom)}),e.prototype.evaluate.call(this,t,i,n,r)},t}(yh),Im=new Om(Rm.paint.properties["line-width"].specification);Im.useIntegerZoom=!0;var Dm=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Rm)}function o(e,t){return t>0?t+2*e:e}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},r.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=renderColorRamp(e,"lineProgress"),this.gradientTexture=null},r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i),this.paint._values["line-floorwidth"]=Im.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},r.prototype.createBucket=function(e){return new $m(e)},r.prototype.queryRadius=function(e){var t=e,i=o(td.getMaximumPaintValue("line-width",this,t),td.getMaximumPaintValue("line-gap-width",this,t)),n=td.getMaximumPaintValue("line-offset",this,t);return i/2+Math.abs(n)+td.translateDistance(this.paint.get("line-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,a,s){var l=td.translate(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),0,s),u=o(this.paint.get("line-width")?.evaluate(t,i),this.paint.get("line-gap-width")?.evaluate(t,i)),c=s/2*(u=Math.max(u,5)),h=this.paint.get("line-offset")?.evaluate(t,i);return h&&(n=function(e,t){for(var i=[],n=new to(0,0),r=0;r<e.length;r++){for(var o=e[r],a=[],s=0;s<o.length;s++){var l=o[s-1],u=o[s],c=o[s+1],h=0===s?n:u.sub(l)._unit()._perp(),d=s===o.length-1?n:c.sub(u)._unit()._perp(),f=h._add(d)._unit(),p=f.x*d.x+f.y*d.y;f._mult(1/p),a.push(f._mult(t)._add(u))}i.push(a)}return i}(n,h*s)),pf.polygonIntersectsBufferedMultiLine(l,n,c)},r.prototype.isTileClipped=function(){return!0},r}(bd);const Bm=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Nm=Bm(void 0,(function(){return Nm.toString().search("(((.+)+)+)+$").toString().constructor(Nm).search("(((.+)+)+)+$")}));Nm();const Fm=ao([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Um=ao([{name:"a_projected_pos",components:3,type:"Float32"}],4);ao([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ao([{name:"a_fade_opacity",components:1,type:"Float32"}],4);const Gm=ao([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);ao([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]);const zm=ao([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Vm=ao([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);ao([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ao([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"}]),ao([{type:"Float32",name:"offsetX"}]),ao([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var km,Wm=(km=!0,function(e,t){var i=km?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return km=!1,i}),Hm=Wm(void 0,(function(){return Hm.toString().search("(((.+)+)+)+$").toString().constructor(Hm).search("(((.+)+)+)+$")}));Hm();var qm={"Latin-1 Supplement":function(e){return e>=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};const jm=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Ym=jm(void 0,(function(){return Ym.toString().search("(((.+)+)+)+$").toString().constructor(Ym).search("(((.+)+)+)+$")}));function Xm(e){for(const t of e)if(Jm(t.charCodeAt(0)))return!0;return!1}function Km(e){for(const t of e)if(!Qm(t.charCodeAt(0)))return!1;return!0}function Qm(e){return!(qm.Arabic(e)||qm["Arabic Supplement"](e)||qm["Arabic Extended-A"](e)||qm["Arabic Presentation Forms-A"](e)||qm["Arabic Presentation Forms-B"](e))}function Zm(e){return!(e<11904||!(qm["Bopomofo Extended"](e)||qm.Bopomofo(e)||qm["CJK Compatibility Forms"](e)||qm["CJK Compatibility Ideographs"](e)||qm["CJK Compatibility"](e)||qm["CJK Radicals Supplement"](e)||qm["CJK Strokes"](e)||qm["CJK Symbols and Punctuation"](e)||qm["CJK Unified Ideographs Extension A"](e)||qm["CJK Unified Ideographs"](e)||qm["Enclosed CJK Letters and Months"](e)||qm["Halfwidth and Fullwidth Forms"](e)||qm.Hiragana(e)||qm["Ideographic Description Characters"](e)||qm["Kangxi Radicals"](e)||qm["Katakana Phonetic Extensions"](e)||qm.Katakana(e)||qm["Vertical Forms"](e)||qm["Yi Radicals"](e)||qm["Yi Syllables"](e)))}function Jm(e){return!(746!==e&&747!==e&&(e<4352||!(qm["Bopomofo Extended"](e)||qm.Bopomofo(e)||qm["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||qm["CJK Compatibility Ideographs"](e)||qm["CJK Compatibility"](e)||qm["CJK Radicals Supplement"](e)||qm["CJK Strokes"](e)||!(!qm["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||qm["CJK Unified Ideographs Extension A"](e)||qm["CJK Unified Ideographs"](e)||qm["Enclosed CJK Letters and Months"](e)||qm["Hangul Compatibility Jamo"](e)||qm["Hangul Jamo Extended-A"](e)||qm["Hangul Jamo Extended-B"](e)||qm["Hangul Jamo"](e)||qm["Hangul Syllables"](e)||qm.Hiragana(e)||qm["Ideographic Description Characters"](e)||qm.Kanbun(e)||qm["Kangxi Radicals"](e)||qm["Katakana Phonetic Extensions"](e)||qm.Katakana(e)&&12540!==e||!(!qm["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!qm["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||qm["Unified Canadian Aboriginal Syllabics"](e)||qm["Unified Canadian Aboriginal Syllabics Extended"](e)||qm["Vertical Forms"](e)||qm["Yijing Hexagram Symbols"](e)||qm["Yi Syllables"](e)||qm["Yi Radicals"](e))))}function eg(e){return!!(qm["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||qm["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||qm["Letterlike Symbols"](e)||qm["Number Forms"](e)||qm["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||qm["Control Pictures"](e)&&9251!==e||qm["Optical Character Recognition"](e)||qm["Enclosed Alphanumerics"](e)||qm["Geometric Shapes"](e)||qm["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||qm["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||qm["CJK Symbols and Punctuation"](e)||qm.Katakana(e)||qm["Private Use Area"](e)||qm["CJK Compatibility Forms"](e)||qm["Small Form Variants"](e)||qm["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}function tg(e){return!(Jm(e)||eg(e))}function ig(e){return qm.Arabic(e)||qm["Arabic Supplement"](e)||qm["Arabic Extended-A"](e)||qm["Arabic Presentation Forms-A"](e)||qm["Arabic Presentation Forms-B"](e)}function ng(e){return e>=1424&&e<=2303||qm["Arabic Presentation Forms-A"](e)||qm["Arabic Presentation Forms-B"](e)}function rg(e){for(const t of e)if(ng(t.charCodeAt(0)))return!0;return!1}Ym();const og=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),ag=og(void 0,(function(){return ag.toString().search("(((.+)+)+)+$").toString().constructor(ag).search("(((.+)+)+)+$")}));ag();const sg={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function lg(e){let t="";for(let i=0;i<e.length;i++){const n=e.charCodeAt(i+1)||null,r=e.charCodeAt(i-1)||null;n&&tg(n)&&!sg[e[i+1]]||r&&tg(r)&&!sg[e[i-1]]||!sg[e[i]]?t+=e[i]:t+=sg[e[i]]}return t}var ug,cg=(ug=!0,function(e,t){var i=ug?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ug=!1,i}),hg=cg(void 0,(function(){return hg.toString().search("(((.+)+)+)+$").toString().constructor(hg).search("(((.+)+)+)+$")}));hg();var dg,fg=(dg=!0,function(e,t){var i=dg?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return dg=!1,i}),pg=fg(void 0,(function(){return pg.toString().search("(((.+)+)+)+$").toString().constructor(pg).search("(((.+)+)+)+$")}));function _g(e){var t={},i={},n=[],r=0;function o(t){n.push(e[t]),r++}function a(e,t,r){var o=i[e];return delete i[e],i[t]=o,n[o].geometry[0].pop(),n[o].geometry[0]=n[o].geometry[0].concat(r[0]),o}function s(e,i,r){var o=t[i];return delete t[i],t[e]=o,n[o].geometry[0].shift(),n[o].geometry[0]=r[0].concat(n[o].geometry[0]),o}function l(e,t,i){var n=i?t[0][t[0].length-1]:t[0][0];return e+":"+n.x+":"+n.y}for(var u=0;u<e.length;u++){var c=e[u],h=c.geometry,d=c.text?c.text.toString():null;if(d){var f=l(d,h),p=l(d,h,!0);if(f in i&&p in t&&i[f]!==t[p]){var _=s(f,p,h),m=a(f,p,n[_].geometry);delete t[f],delete i[p],i[l(d,n[m].geometry,!0)]=m,n[_].geometry=null}else f in i?a(f,p,h):p in t?s(f,p,h):(o(u),t[f]=r-1,i[p]=r-1)}else o(u)}return n.filter((function(e){return e.geometry}))}pg();var mg=function(e,t){void 0===t&&(t={}),Oh(this,t),this.type=e};!function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){void 0===i&&(i={}),e.call(this,"error",Oh({error:t},i))}n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r}(mg);const gg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),xg=gg(void 0,(function(){return xg.toString().search("(((.+)+)+)+$").toString().constructor(xg).search("(((.+)+)+)+$")}));xg();const vg=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function yg(e){return vg.test(e)}function $g(e){return e.indexOf("sku=")>0&&yg(e)}const bg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Tg=bg(void 0,(function(){return Tg.toString().search("(((.+)+)+)+$").toString().constructor(Tg).search("(((.+)+)+)+$")}));Tg();const Cg="mapbox-tiles",Sg=42e4;let wg;function Eg(e,t){if(void 0===wg)try{new Response(new ReadableStream),wg=!0}catch(e){wg=!1}wg?t(e.body):e.blob().then(t)}function Pg(e,t,i){if(!window.caches)return;const n={status:t.status,statusText:t.statusText,headers:new window.Headers};t.headers.forEach(((e,t)=>n.headers.set(t,e)));const r=kh(t.headers.get("Cache-Control")||"");r["no-store"]||(r["max-age"]&&n.headers.set("Expires",new Date(i+1e3*r["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-i<Sg||Eg(t,(t=>{const i=new window.Response(t,n);window.caches.open(Cg).then((t=>t.put(Ag(e.url),i)))})))}function Ag(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Lg(e,t){if(!window.caches)return t(null);const i=Ag(e.url);window.caches.open(Cg).catch(t).then((e=>{e.match(i).catch(t).then((n=>{const r=Mg(n);e.delete(i),r&&e.put(i,n.clone()),t(null,n,r)}))}))}function Mg(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")),i=kh(e.headers.get("Cache-Control")||"");return t>Date.now()&&!i["no-cache"]}function Rg(e){window.caches&&window.caches.open(Cg).then((t=>{t.keys().then((i=>{for(let n=0;n<i.length-e;n++)t.delete(i[n])}))}))}const Og=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Ig=Og(void 0,(function(){return Ig.toString().search("(((.+)+)+)+$").toString().constructor(Ig).search("(((.+)+)+)+$")}));Ig();const Dg={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(Dg);class Bg extends Error{constructor(e,t,i){401===t&&yg(i)&&(e+=": you may have provided an invalid Mapbox access token."),super(e),this.status=t,this.url=i,this.name=this.constructor.name,this.message=e}toString(){return this.name+": "+this.message+" ("+this.status+"): "+this.url}}const Ng=Vh()?()=>self.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href,Fg=e=>/^file:/.test(e)||/^file:/.test(Ng())&&!/^\w+:/.test(e);function Ug(e,t){const i=Vh()?self:window,n=new i.AbortController,r=new i.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:Ng(),signal:n.signal});let o=!1,a=!1;const s=$g(r.url);"json"===e.type&&r.headers.set("Accept","application/json");const l=(n,o,l)=>{if(a)return;if(n&&"SecurityError"!==n.message&&Gh(n),o&&l)return u(o);const c=Date.now();i.fetch(r).then((i=>{if(i.ok){const e=s?i.clone():null;return u(i,e,c)}return t(new Bg(i.statusText,i.status,e.url))})).catch((e=>{20!==e.code&&t(new Error(e.message))}))},u=(i,n,s)=>{("arrayBuffer"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text()).then((e=>{a||(n&&s&&Pg(r,n,s),o=!0,t(null,e,i.headers.get("Cache-Control"),i.headers.get("Expires")))})).catch((e=>t(new Error(e.message))))};return s?Lg(r,l):l(null,null),{cancel:()=>{a=!0,o||n.abort()}}}function Gg(e,t){const i=new((Vh()?self:window).XMLHttpRequest);i.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(i.responseType="arraybuffer");for(const t in e.headers)i.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=()=>{t(new Error(i.statusText))},i.onload=()=>{if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){let n=i.response;if("json"===e.type)try{n=JSON.parse(i.response)}catch(e){return t(e)}t(null,n,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else t(new Bg(i.statusText,i.status,e.url))},i.send(e.body),{cancel:()=>i.abort()}}const zg=function(e,t){const i=Vh()?self:window;if(!Fg(e.url)){if(i.fetch&&i.Request&&i.AbortController&&i.Request.prototype.hasOwnProperty("signal"))return Ug(e,t);if(Vh()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}return Gg(e,t)},Vg=function(e,t){return zg(Oh(e,{type:"arrayBuffer"}),t)},kg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Wg=kg(void 0,(function(){return Wg.toString().search("(((.+)+)+)+$").toString().constructor(Wg).search("(((.+)+)+)+$")}));Wg();const Hg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),qg=Hg(void 0,(function(){return qg.toString().search("(((.+)+)+)+$").toString().constructor(qg).search("(((.+)+)+)+$")}));qg();const jg={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"};let Yg=jg.unavailable,Xg=null;const Kg={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Yg===jg.loaded||null!=Kg.applyArabicShaping,isLoading:()=>Yg===jg.loading,setState(e){Yg=e.pluginStatus,Xg=e.pluginURL},isParsed:()=>null!=Kg.applyArabicShaping,getPluginURL:()=>Xg};var Qg,Zg=(Qg=!0,function(e,t){var i=Qg?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Qg=!1,i}),Jg=Zg(void 0,(function(){return Jg.toString().search("(((.+)+)+)+$").toString().constructor(Jg).search("(((.+)+)+)+$")}));Jg();var ex,tx=24,ix=(ex=!0,function(e,t){var i=ex?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ex=!1,i}),nx=ix(void 0,(function(){return nx.toString().search("(((.+)+)+)+$").toString().constructor(nx).search("(((.+)+)+)+$")}));nx();var rx=function(e,t){ox(this,e,1,t)};function ox(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function ax(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=ox({},{width:n,height:r},i);sx(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function sx(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}rx.prototype.resize=function(e){ax(this,e,1)},rx.prototype.clone=function(){return new rx({width:this.width,height:this.height},new Uint8Array(this.data))},rx.copy=function(e,t,i,n,r){sx(e,t,i,n,r,1)},en.register("AlphaImage",rx);var lx=function(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},ux=function(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_},cx={read:lx,write:ux};function hx(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}hx.Varint=0,hx.Fixed64=1,hx.Bytes=2,hx.Fixed32=5;var dx=4294967296,fx=1/dx;function px(e,t,i){var n,r,o=i.buf;if(n=(112&(r=o[i.pos++]))>>4,r<128||(n|=(127&(r=o[i.pos++]))<<3,r<128)||(n|=(127&(r=o[i.pos++]))<<10,r<128)||(n|=(127&(r=o[i.pos++]))<<17,r<128)||(n|=(127&(r=o[i.pos++]))<<24,r<128)||(n|=(1&(r=o[i.pos++]))<<31,r<128))return mx(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function _x(e){return e.type===hx.Bytes?e.readVarint()+e.pos:e.pos+1}function mx(e,t,i){return i?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function gx(e,t){var i,n;if(e>=0?(i=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(i=~(-e%4294967296))?i=i+1|0:(i=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),xx(i,0,t),vx(n,t)}function xx(e,t,i){i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}function vx(e,t){var i=(7&e)<<4;t.buf[t.pos++]|=i|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function yx(e,t,i){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=e;r--)i.buf[r+n]=i.buf[r]}function $x(e,t){for(var i=0;i<e.length;i++)t.writeVarint(e[i])}function bx(e,t){for(var i=0;i<e.length;i++)t.writeSVarint(e[i])}function Tx(e,t){for(var i=0;i<e.length;i++)t.writeFloat(e[i])}function Cx(e,t){for(var i=0;i<e.length;i++)t.writeDouble(e[i])}function Sx(e,t){for(var i=0;i<e.length;i++)t.writeBoolean(e[i])}function wx(e,t){for(var i=0;i<e.length;i++)t.writeFixed32(e[i])}function Ex(e,t){for(var i=0;i<e.length;i++)t.writeSFixed32(e[i])}function Px(e,t){for(var i=0;i<e.length;i++)t.writeFixed64(e[i])}function Ax(e,t){for(var i=0;i<e.length;i++)t.writeSFixed64(e[i])}function Lx(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function Mx(e,t,i){e[i]=t,e[i+1]=t>>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function Rx(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function Ox(e,t,i){for(var n="",r=t;r<i;){var o,a,s,l=e[r],u=null,c=l>239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[r+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(o=e[r+1],a=e[r+2],128==(192&o)&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(o=e[r+1],a=e[r+2],s=e[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=c}return n}function Ix(e,t,i){for(var n,r,o=0;o<t.length;o++){if((n=t.charCodeAt(o))>55295&&n<57344){if(!r){n>56319||o+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):r=n;continue}if(n<56320){e[i++]=239,e[i++]=191,e[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(e[i++]=239,e[i++]=191,e[i++]=189,r=null);n<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:(n<65536?e[i++]=n>>12|224:(e[i++]=n>>18|240,e[i++]=n>>12&63|128),e[i++]=n>>6&63|128),e[i++]=63&n|128)}return i}hx.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=7&n,e(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Lx(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Rx(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Lx(this.buf,this.pos)+Lx(this.buf,this.pos+4)*dx;return this.pos+=8,e},readSFixed64:function(){var e=Lx(this.buf,this.pos)+Rx(this.buf,this.pos+4)*dx;return this.pos+=8,e},readFloat:function(){var e=cx.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=cx.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,n=this.buf;return t=127&(i=n[this.pos++]),i<128||(t|=(127&(i=n[this.pos++]))<<7,i<128)||(t|=(127&(i=n[this.pos++]))<<14,i<128)||(t|=(127&(i=n[this.pos++]))<<21,i<128)?t:px(t|=(15&(i=n[this.pos]))<<28,e,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=Ox(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var i=_x(this);for(e=e||[];this.pos<i;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===hx.Varint)for(;this.buf[this.pos++]>127;);else if(t===hx.Bytes)this.pos=this.readVarint()+this.pos;else if(t===hx.Fixed32)this.pos+=4;else{if(t!==hx.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var i=new Uint8Array(t);i.set(this.buf),this.buf=i,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),Mx(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),Mx(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),Mx(this.buf,-1&e,this.pos),Mx(this.buf,Math.floor(e*fx),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),Mx(this.buf,-1&e,this.pos),Mx(this.buf,Math.floor(e*fx),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?gx(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=Ix(this.buf,e,this.pos);var i=this.pos-t;i>=128&&yx(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),cx.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),cx.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i<t;i++)this.buf[this.pos++]=e[i]},writeRawMessage:function(e,t){this.pos++;var i=this.pos;e(t,this);var n=this.pos-i;n>=128&&yx(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,i){this.writeTag(e,hx.Bytes),this.writeRawMessage(t,i)},writePackedVarint:function(e,t){this.writeMessage(e,$x,t)},writePackedSVarint:function(e,t){this.writeMessage(e,bx,t)},writePackedBoolean:function(e,t){this.writeMessage(e,Sx,t)},writePackedFloat:function(e,t){this.writeMessage(e,Tx,t)},writePackedDouble:function(e,t){this.writeMessage(e,Cx,t)},writePackedFixed32:function(e,t){this.writeMessage(e,wx,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,Ex,t)},writePackedFixed64:function(e,t){this.writeMessage(e,Px,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,Ax,t)},writeBytesField:function(e,t){this.writeTag(e,hx.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,hx.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,hx.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,hx.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,hx.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,hx.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,hx.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,hx.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,hx.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,hx.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};const Dx=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Bx=Dx(void 0,(function(){return Bx.toString().search("(((.+)+)+)+$").toString().constructor(Bx).search("(((.+)+)+)+$")}));Bx();const Nx=3,Fx=Nx,Ux=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Gx=Ux(void 0,(function(){return Gx.toString().search("(((.+)+)+)+$").toString().constructor(Gx).search("(((.+)+)+)+$")}));Gx();var zx=1;const Vx={horizontal:1,vertical:2,horizontalOnly:3},kx=-17;function Wx(e){for(const t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}const Hx=57344,qx=63743;class jx{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(e,t){const i=new jx;return i.scale=e||1,i.fontStack=t,i}static forImage(e){const t=new jx;return t.imageName=e,t}}class Yx{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(e,t){const i=new Yx;for(let n=0;n<e.sections.length;n++){const r=e.sections[n];r.image?i.addImageSection(r):i.addTextSection(r,t)}return i}length(){return this.text.length}getSection(e){return this.sections[this.sectionIndex[e]]}getSectionIndex(e){return this.sectionIndex[e]}getCharCode(e){return this.text.charCodeAt(e)}verticalizePunctuation(){this.text=lg(this.text)}trim(){let e=0;for(let t=0;t<this.text.length&&Qx[this.text.charCodeAt(t)];t++)e++;let t=this.text.length;for(let i=this.text.length-1;i>=0&&i>=e&&Qx[this.text.charCodeAt(i)];i--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){const i=new Yx;return i.text=this.text.substring(e,t),i.sectionIndex=this.sectionIndex.slice(e,t),i.sections=this.sections,i}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((e,t)=>Math.max(e,this.sections[t].scale)),0)}addTextSection(e,t){this.text+=e.text,this.sections.push(jx.forText(e.scale,e.fontStack||t));const i=this.sections.length-1;for(let t=0;t<e.text.length;++t)this.sectionIndex.push(i)}addImageSection(e){const t=e.image?e.image.name:"";if(0===t.length)return void Gh("Can't add FormattedSection with an empty image.");const i=this.getNextImageSectionCharCode();i?(this.text+=String.fromCharCode(i),this.sections.push(jx.forImage(t)),this.sectionIndex.push(this.sections.length-1)):Gh("Reached maximum number of images "+(qx-Hx+2))}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=qx?null:++this.imageSectionID:(this.imageSectionID=Hx,this.imageSectionID)}}function Xx(e,t){const i=[],n=e.text;let r=0;for(const n of t)i.push(e.substring(r,n)),r=n;return r<n.length&&i.push(e.substring(r,n.length)),i}function Kx(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){const m=Yx.fromFeature(e,r);let g;h===Vx.vertical&&m.verticalizePunctuation();const{processBidirectionalText:x,processStyledBidirectionalText:v}=Kg;if(x&&1===m.sections.length){g=[];const e=x(m.toString(),ov(m,u,o,t,n,f,p));for(const t of e){const e=new Yx;e.text=t,e.sections=m.sections;for(let i=0;i<t.length;i++)e.sectionIndex.push(0);g.push(e)}}else if(v){g=[];const e=v(m.text,m.sectionIndex,ov(m,u,o,t,n,f,p));for(const t of e){const e=new Yx;e.text=t[0],e.sectionIndex=t[1],e.sections=m.sections,g.push(e)}}else g=Xx(m,ov(m,u,o,t,n,f,p));const y=[],$={positionedLines:y,text:m.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:h,iconsInText:!1,verticalizable:!1};return sv($,t,i,n,g,a,s,l,h,u,d,_),!Wx(y)&&$}const Qx={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Zx={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function Jx(e,t,i,n,r,o){if(t.imageName){const e=n[t.imageName];return e?e.displaySize[0]*t.scale*tx/o+r:0}{const n=i[t.fontStack],o=n&&n[e];return o?o.metrics.advance*t.scale+r:0}}function ev(e,t,i,n,r,o){let a=0;for(let i=0;i<e.length();i++){const s=e.getSection(i);a+=Jx(e.getCharCode(i),s,n,r,t,o)}return a/Math.max(1,Math.ceil(a/i))}function tv(e,t,i,n){const r=Math.pow(e-t,2);return n?e<t?r/2:2*r:r+Math.abs(i)*i}function iv(e,t,i){let n=0;return 10===e&&(n-=1e4),i&&(n+=150),(40===e||65288===e)&&(n+=50),(41===t||65289===t)&&(n+=50),n}function nv(e,t,i,n,r,o){let a=null,s=tv(t,i,r,o);for(const e of n){const n=tv(t-e.x,i,r,o)+e.badness;n<=s&&(a=e,s=n)}return{index:e,x:t,priorBreak:a,badness:s}}function rv(e){return e?rv(e.priorBreak).concat(e.index):[]}function ov(e,t,i,n,r,o,a){if("point"!==o)return[];if(!e)return[];const s=[],l=ev(e,t,i,n,r,a),u=e.text.indexOf("​")>=0;let c=0;for(let i=0;i<e.length();i++){const o=e.getSection(i),h=e.getCharCode(i);if(Qx[h]||(c+=Jx(h,o,n,r,t,a)),i<e.length()-1){const t=Zm(h);(Zx[h]||t||o.imageName)&&s.push(nv(i+1,c,l,s,iv(h,e.getCharCode(i+1),t&&u),!1))}}return rv(nv(e.length(),c,l,s,0,!0))}function av(e){let t=.5,i=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":i=1;break;case"top":case"top-right":case"top-left":i=0}return{horizontalAlign:t,verticalAlign:i}}function sv(e,t,i,n,r,o,a,s,l,u,c,h){let d=0,f=kx,p=0,_=0;const m="right"===s?1:"left"===s?0:.5;let g=0;for(const a of r){a.trim();const r=a.getMaxScale(),s=(r-1)*tx,x={positionedGlyphs:[],lineOffset:0};e.positionedLines[g]=x;const v=x.positionedGlyphs;let y=0;if(!a.length()){f+=o,++g;continue}for(let o=0;o<a.length();o++){const p=a.getSection(o),_=a.getSectionIndex(o),m=a.getCharCode(o);let g=0,x=null,$=null,b=null,T=tx;const C=!(l===Vx.horizontal||!c&&!Jm(m)||c&&(Qx[m]||ig(m)));if(p.imageName){const t=n[p.imageName];if(!t)continue;b=p.imageName,e.iconsInText=e.iconsInText||!0,$=t.paddedRect;const i=t.displaySize;p.scale=p.scale*tx/h,x={width:i[0],height:i[1],left:zx,top:-Fx,advance:C?i[1]:i[0]},g=s+(tx-i[1]*p.scale),T=x.advance;const o=C?i[0]*p.scale-tx*r:i[1]*p.scale-tx*r;o>0&&o>y&&(y=o)}else{const e=i[p.fontStack],n=e&&e[m];if(n&&n.rect)$=n.rect,x=n.metrics;else{const e=t[p.fontStack],i=e&&e[m];if(!i)continue;x=i.metrics}g=(r-p.scale)*tx}C?(e.verticalizable=!0,v.push({glyph:m,imageName:b,x:d,y:f+g,vertical:C,scale:p.scale,fontStack:p.fontStack,sectionIndex:_,metrics:x,rect:$}),d+=T*p.scale+u):(v.push({glyph:m,imageName:b,x:d,y:f+g,vertical:C,scale:p.scale,fontStack:p.fontStack,sectionIndex:_,metrics:x,rect:$}),d+=x.advance*p.scale+u)}if(0!==v.length){const e=d-u;p=Math.max(e,p),lv(v,0,v.length-1,m,y)}d=0;const $=o*r+y;x.lineOffset=Math.max(y,s),f+=$,_=Math.max($,_),++g}const x=f-kx,{horizontalAlign:v,verticalAlign:y}=av(a);uv(e.positionedLines,m,v,y,p,_,o,x,r.length),e.top+=-y*x,e.bottom=e.top+x,e.left+=-v*p,e.right=e.left+p}function lv(e,t,i,n,r){if(!n&&!r)return;const o=e[i],a=o.metrics.advance*o.scale,s=(e[i].x+a)*n;for(let n=t;n<=i;n++)e[n].x-=s,e[n].y+=r}function uv(e,t,i,n,r,o,a,s,l){const u=(t-i)*r;let c=0;c=o!==a?-s*n-kx:(-n*l+.5)*a;for(const t of e)for(const e of t.positionedGlyphs)e.x+=u,e.y+=c}function cv(e,t,i){const{horizontalAlign:n,verticalAlign:r}=av(i),o=t[0],a=t[1],s=o-e.displaySize[0]*n,l=s+e.displaySize[0],u=a-e.displaySize[1]*r;return{image:e,top:u,bottom:u+e.displaySize[1],left:s,right:l}}function hv(e,t,i,n,r,o){const a=e.image;let s;if(a.content){const e=a.content,t=a.pixelRatio||1;s=[e[0]/t,e[1]/t,a.displaySize[0]-e[2]/t,a.displaySize[1]-e[3]/t]}const l=t.left*o,u=t.right*o;let c,h,d,f;"width"===i||"both"===i?(f=r[0]+l-n[3],h=r[0]+u+n[1]):(f=r[0]+(l+u-a.displaySize[0])/2,h=f+a.displaySize[0]);const p=t.top*o,_=t.bottom*o;return"height"===i||"both"===i?(c=r[1]+p-n[0],d=r[1]+_+n[2]):(c=r[1]+(p+_-a.displaySize[1])/2,d=c+a.displaySize[1]),{image:a,top:c,right:h,bottom:d,left:f,collisionPadding:s}}var dv,fv=(dv=!0,function(e,t){var i=dv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return dv=!1,i}),pv=fv(void 0,(function(){return pv.toString().search("(((.+)+)+)+$").toString().constructor(pv).search("(((.+)+)+)+$")}));pv();const _v=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),mv=_v(void 0,(function(){return mv.toString().search("(((.+)+)+)+$").toString().constructor(mv).search("(((.+)+)+)+$")}));mv();const gv=128;function xv(e,t){const{expression:i}=t;if("constant"===i.kind)return{kind:"constant",layoutSize:i.evaluate(new go(e+1))};if("source"===i.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:n}=i;let r=0;for(;r<t.length&&t[r]<=e;)r++;r=Math.max(0,r-1);let o=r;for(;o<t.length&&t[o]<e+1;)o++;o=Math.min(t.length-1,o);const a=t[r],s=t[o];return"composite"===i.kind?{kind:"composite",minZoom:a,maxZoom:s,interpolationType:n}:{kind:"camera",minZoom:a,maxZoom:s,minSize:i.evaluate(new go(a)),maxSize:i.evaluate(new go(s)),interpolationType:n}}}var vv=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n,r){e.call(this,t,i),this.angle=n,void 0!==r&&(this.segment=r)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.clone=function(){return new r(this.x,this.y,this.angle,this.segment)},r}(to);en.register("Anchor",vv);var yv,$v=(yv=!0,function(e,t){var i=yv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return yv=!1,i}),bv=$v(void 0,(function(){return bv.toString().search("(((.+)+)+)+$").toString().constructor(bv).search("(((.+)+)+)+$")}));function Tv(e,t,i,n,r){if(void 0===t.segment)return!0;for(var o=t,a=t.segment+1,s=0;s>-i/2;){if(--a<0)return!1;s-=e[a].dist(o),o=e[a]}s+=e[a].dist(e[a+1]),a++;for(var l=[],u=0;s<i/2;){var c=e[a-1],h=e[a],d=e[a+1];if(!d)return!1;var f=c.angleTo(h)-h.angleTo(d);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:f}),u+=f;s-l[0].distance>n;)u-=l.shift().angleDelta;if(u>r)return!1;a++,s+=h.dist(d)}return!0}bv();var Cv,Sv=(Cv=!0,function(e,t){var i=Cv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Cv=!1,i}),wv=Sv(void 0,(function(){return wv.toString().search("(((.+)+)+)+$").toString().constructor(wv).search("(((.+)+)+)+$")}));function Ev(e,t,i){return e*(1-i)+t*i}wv();var Pv=function(){};function Av(e){for(var t=0,i=0;i<e.length-1;i++)t+=e[i].dist(e[i+1]);return t}function Lv(e,t,i){return e?.6*t*i:0}function Mv(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function Rv(e,t,i,n,r,o,a,s,l){for(var u=o/2,c=Av(e),h=0,d=t-i,f=[],p=0;p<e.length-1;p++){for(var _=e[p],m=e[p+1],g=_.dist(m),x=m.angleTo(_);d+i<h+g;){var v=((d+=i)-h)/g,y=Ev(_.x,m.x,v),$=Ev(_.y,m.y,v);if(y>=0&&y<l&&$>=0&&$<l&&d-u>=0&&d+u<=c){var b=new vv(y,$,x,p);b._round(),(!n||Tv(e,b,o,n,r))&&f.push(b)}}h+=g}return!s&&!f.length&&!a&&(f=Rv(e,h/2,i,n,r,o,a,!0,l)),f}Pv.getCenterAnchor=function(e,t,i,n,r,o){for(var a=Lv(i,r,o),s=Mv(i,n)*o,l=0,u=Av(e)/2,c=0;c<e.length-1;c++){var h=e[c],d=e[c+1],f=h.dist(d);if(l+f>u){var p=(u-l)/f,_=Ev(h.x,d.x,p),m=Ev(h.y,d.y,p),g=new vv(_,m,d.angleTo(h),c);return g._round(),!a||Tv(e,g,s,a,t)?g:void 0}l+=f}},Pv.getAnchors=function(e,t,i,n,r,o,a,s,l){var u=Lv(n,o,a),c=Mv(n,r),h=c*a,d=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-h<t/4&&(t=h+t/4),Rv(e,d?t/2*s%t:(c/2+2*o)*a*s%t,t,u,i,h,d,!1,l)};var Ov,Iv=(Ov=!0,function(e,t){var i=Ov?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ov=!1,i}),Dv=Iv(void 0,(function(){return Dv.toString().search("(((.+)+)+)+$").toString().constructor(Dv).search("(((.+)+)+)+$")}));function Bv(e,t,i,n,r){for(var o=[],a=0;a<e.length;a++)for(var s=e[a],l=void 0,u=0;u<s.length-1;u++){var c=s[u],h=s[u+1];c.x<t&&h.x<t||(c.x<t?c=new to(t,c.y+(h.y-c.y)*((t-c.x)/(h.x-c.x)))._round():h.x<t&&(h=new to(t,c.y+(h.y-c.y)*((t-c.x)/(h.x-c.x)))._round()),c.y<i&&h.y<i||(c.y<i?c=new to(c.x+(h.x-c.x)*((i-c.y)/(h.y-c.y)),i)._round():h.y<i&&(h=new to(c.x+(h.x-c.x)*((i-c.y)/(h.y-c.y)),i)._round()),c.x>=n&&h.x>=n||(c.x>=n?c=new to(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round():h.x>=n&&(h=new to(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round()),c.y>=r&&h.y>=r||(c.y>=r?c=new to(c.x+(h.x-c.x)*((r-c.y)/(h.y-c.y)),r)._round():h.y>=r&&(h=new to(c.x+(h.x-c.x)*((r-c.y)/(h.y-c.y)),r)._round()),(!l||!c.equals(l[l.length-1]))&&(l=[c],o.push(l)),l.push(h)))))}return o}Dv();var Nv,Fv=(Nv=!0,function(e,t){var i=Nv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Nv=!1,i}),Uv=Fv(void 0,(function(){return Uv.toString().search("(((.+)+)+)+$").toString().constructor(Uv).search("(((.+)+)+)+$")}));Uv();var Gv=1,zv=-17,Vv=3,kv=function(){},Wv=Gv;function Hv(e,t,i){for(var n=0,r=0,o=e;r<o.length;r+=1){var a=o[r];n+=Math.max(t,Math.min(i,a[1]))-Math.max(t,Math.min(i,a[0]))}return n}function qv(e,t,i){for(var n=[{fixed:-Wv,stretch:0}],r=0,o=e;r<o.length;r+=1){var a=o[r],s=a[0],l=a[1],u=n[n.length-1];n.push({fixed:s-u.stretch,stretch:u.stretch}),n.push({fixed:s-u.stretch,stretch:u.stretch+(l-s)})}return n.push({fixed:t+Wv,stretch:i}),n}function jv(e,t,i,n){return e/t*i+n}function Yv(e,t,i,n){return e-t*i/n}kv.getIconQuads=function(e,t,i,n){var r=[],o=e.image,a=o.pixelRatio,s=o.paddedRect.w-2*Wv,l=o.paddedRect.h-2*Wv,u=e.right-e.left,c=e.bottom-e.top,h=o.stretchX||[[0,s]],d=o.stretchY||[[0,l]],f=function(e,t){return e+t[1]-t[0]},p=h.reduce(f,0),_=d.reduce(f,0),m=s-p,g=l-_,x=0,v=p,y=0,$=_,b=0,T=m,C=0,S=g;if(o.content&&n){var w=o.content;x=Hv(h,0,w[0]),y=Hv(d,0,w[1]),v=Hv(h,w[0],w[2]),$=Hv(d,w[1],w[3]),b=w[0]-x,C=w[1]-y,T=w[2]-w[0]-v,S=w[3]-w[1]-$}var E=function(n,r,s,l){var h=jv(n.stretch-x,v,u,e.left),d=Yv(n.fixed-b,T,n.stretch,p),f=jv(r.stretch-y,$,c,e.top),m=Yv(r.fixed-C,S,r.stretch,_),g=jv(s.stretch-x,v,u,e.left),w=Yv(s.fixed-b,T,s.stretch,p),E=jv(l.stretch-y,$,c,e.top),P=Yv(l.fixed-C,S,l.stretch,_),A=new to(h,f),L=new to(g,f),M=new to(g,E),R=new to(h,E),O=new to(d/a,m/a),I=new to(w/a,P/a),D=t*Math.PI/180;if(D){var B=Math.sin(D),N=Math.cos(D),F=[N,-B,B,N];A._matMult(F),L._matMult(F),R._matMult(F),M._matMult(F)}var U=n.stretch+n.fixed,G=s.stretch+s.fixed,z=r.stretch+r.fixed,V=l.stretch+l.fixed;return{tl:A,tr:L,bl:R,br:M,tex:{x:o.paddedRect.x+Wv+U,y:o.paddedRect.y+Wv+z,w:G-U,h:V-z},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:O,pixelOffsetBR:I,minFontScaleX:T/a/u,minFontScaleY:S/a/c,isSDF:i}};if(n&&(o.stretchX||o.stretchY))for(var P=qv(h,m,p),A=qv(d,g,_),L=0;L<P.length-1;L++)for(var M=P[L],R=P[L+1],O=0;O<A.length-1;O++){var I=A[O],D=A[O+1];r.push(E(M,I,R,D))}else r.push(E({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:s+1},{fixed:0,stretch:l+1}));return r},kv.getGlyphQuads=function(e,t,i,n,r,o,a,s){for(var l=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=[],c=0,h=t.positionedLines;c<h.length;c+=1)for(var d=h[c],f=0,p=d.positionedGlyphs;f<p.length;f+=1){var _=p[f];if(_.rect){var m=_.rect||{},g=Vv+1,x=!0,v=1,y=0,$=(r||s)&&_.vertical,b=_.metrics.advance*_.scale/2;if(s&&t.verticalizable){var T=(_.scale-1)*tx,C=(tx-_.metrics.width*_.scale)/2;y=d.lineOffset/2-(_.imageName?-C:T)}if(_.imageName){var S=a[_.imageName];x=S.sdf,v=S.pixelRatio,g=Gv/v}var w=r?[_.x+b,_.y]:[0,0],E=r?[0,0]:[_.x+b+i[0],_.y+i[1]-y],P=[0,0];$&&(P=E,E=[0,0]);var A=(_.metrics.left-g)*_.scale-b+E[0],L=(-_.metrics.top-g)*_.scale+E[1],M=A+m.w*_.scale/v,R=L+m.h*_.scale/v,O=new to(A,L),I=new to(M,L),D=new to(A,R),B=new to(M,R);if($){var N=new to(-b,b-zv),F=-Math.PI/2,U=tx/2-b,G=_.imageName?U:0,z=new to(5-zv-U,-G),V=new(Function.prototype.bind.apply(to,[null].concat(P)));O._rotateAround(F,N)._add(z)._add(V),I._rotateAround(F,N)._add(z)._add(V),D._rotateAround(F,N)._add(z)._add(V),B._rotateAround(F,N)._add(z)._add(V)}if(l){var k=Math.sin(l),W=Math.cos(l),H=[W,-k,k,W];O._matMult(H),I._matMult(H),D._matMult(H),B._matMult(H)}var q=new to(0,0),j=new to(0,0);u.push({tl:O,tr:I,bl:D,br:B,tex:m,writingMode:t.writingMode,glyphOffset:w,sectionIndex:_.sectionIndex,isSDF:x,pixelOffsetTL:q,pixelOffsetBR:j,minFontScaleX:0,minFontScaleY:0})}}return u};var Xv,Kv=(Xv=!0,function(e,t){var i=Xv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Xv=!1,i}),Qv=Kv(void 0,(function(){return Qv.toString().search("(((.+)+)+)+$").toString().constructor(Qv).search("(((.+)+)+)+$")}));Qv();var Zv=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=a.top*s-l,f=a.bottom*s+l,p=a.left*s-l,_=a.right*s+l,m=a.collisionPadding;if(m&&(p-=m[0]*s,d-=m[1]*s,_+=m[2]*s,f+=m[3]*s),this.boxStartIndex=e.length,u){var g=f-d,x=_-p;g>0&&(g=Math.max(10*s,g),this._addLineCollisionCircles(e,t,i,i.segment,x,g,n,r,o,c))}else{if(h){var v=new to(p,d),y=new to(_,d),$=new to(p,f),b=new to(_,f),T=h*Math.PI/180;v._rotate(T),y._rotate(T),$._rotate(T),b._rotate(T),p=Math.min(v.x,y.x,$.x,b.x),_=Math.max(v.x,y.x,$.x,b.x),d=Math.min(v.y,y.y,$.y,b.y),f=Math.max(v.y,y.y,$.y,b.y)}e.emplaceBack(i.x,i.y,p,d,_,f,n,r,o,0,0)}this.boxEndIndex=e.length};Zv.prototype._addLineCollisionCircles=function(e,t,i,n,r,o,a,s,l,u){var c=o/2,h=Math.floor(r/c)||1,d=1+.4*Math.log(u)/Math.LN2,f=Math.floor(h*d/2),p=-o/2,_=i,m=n+1,g=p,x=-r/2,v=x-r/4;do{if(--m<0){if(g>x)return;m=0;break}g-=t[m].dist(_),_=t[m]}while(g>v);for(var y=t[m].dist(t[m+1]),$=-f;$<h+f;$++){var b=$*c,T=x+b;if(b<0&&(T+=b),b>r&&(T+=b-r),!(T<g)){for(;g+y<T;){if(g+=y,1+ ++m>=t.length)return;y=t[m].dist(t[m+1])}var C=T-g,S=t[m],w=t[m+1].sub(S)._unit()._mult(C)._add(S)._round(),E=Math.abs(T-p)<c?0:.8*(T-p);e.emplaceBack(w.x,w.y,-o/2,-o/2,o/2,o/2,a,s,l,o/2,E)}}};var Jv,ey=(Jv=!0,function(e,t){var i=Jv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Jv=!1,i}),ty=ey(void 0,(function(){return ty.toString().search("(((.+)+)+)+$").toString().constructor(ty).search("(((.+)+)+)+$")}));function iy(e,t,i){void 0===t&&(t=1),void 0===i&&(i=!1);for(var n=1/0,r=1/0,o=-1/0,a=-1/0,s=e[0],l=0;l<s.length;l++){var u=s[l];(!l||u.x<n)&&(n=u.x),(!l||u.y<r)&&(r=u.y),(!l||u.x>o)&&(o=u.x),(!l||u.y>a)&&(a=u.y)}var c=o-n,h=a-r,d=Math.min(c,h),f=d/2,p=new TinyQueue([],ny);if(0===d)return new to(n,r);for(var _=n;_<o;_+=d)for(var m=r;m<a;m+=d)p.push(new ry(_+f,m+f,f,e));for(var g=ay(e),x=p.length;p.length;){var v=p.pop();(v.d>g.d||!g.d)&&(g=v,i&&console.log("found best %d after %d probes",Math.round(1e4*v.d)/1e4,x)),v.max-g.d<=t||(f=v.h/2,p.push(new ry(v.p.x-f,v.p.y-f,f,e)),p.push(new ry(v.p.x+f,v.p.y-f,f,e)),p.push(new ry(v.p.x-f,v.p.y+f,f,e)),p.push(new ry(v.p.x+f,v.p.y+f,f,e)),x+=4)}return i&&(console.log("num probes: "+x),console.log("best distance: "+g.d)),g.p}function ny(e,t){return t.max-e.max}function ry(e,t,i,n){this.p=new to(e,t),this.h=i,this.d=oy(this.p,n),this.max=this.d+this.h*Math.SQRT2}function oy(e,t){for(var i=!1,n=1/0,r=0;r<t.length;r++)for(var o=t[r],a=0,s=o.length,l=s-1;a<s;l=a++){var u=o[a],c=o[l];u.y>e.y!=c.y>e.y&&e.x<(c.x-u.x)*(e.y-u.y)/(c.y-u.y)+u.x&&(i=!i),n=Math.min(n,pf.distToSegmentSquared(e,u,c))}return(i?1:-1)*Math.sqrt(n)}function ay(e){for(var t=0,i=0,n=0,r=e[0],o=0,a=r.length,s=a-1;o<a;s=o++){var l=r[o],u=r[s],c=l.x*u.y-u.x*l.y;i+=(l.x+u.x)*c,n+=(l.y+u.y)*c,t+=3*c}return new ry(i/t,n/t,0,e)}ty();var sy,ly=(sy=!0,function(e,t){var i=sy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return sy=!1,i}),uy=ly(void 0,(function(){return uy.toString().search("(((.+)+)+)+$").toString().constructor(uy).search("(((.+)+)+)+$")}));function cy(e,t){var i,n,r,o,a,s,l,u;for(i=3&e.length,n=e.length-i,r=t,a=3432918353,s=461845907,u=0;u<n;)l=255&e.charCodeAt(u)|(255&e.charCodeAt(++u))<<8|(255&e.charCodeAt(++u))<<16|(255&e.charCodeAt(++u))<<24,++u,r=27492+(65535&(o=5*(65535&(r=(r^=l=(65535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,i){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:r^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return r^=e.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}uy();const hy=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),dy=hy(void 0,(function(){return dy.toString().search("(((.+)+)+)+$").toString().constructor(dy).search("(((.+)+)+)+$")}));dy();const fy=7,py=Number.POSITIVE_INFINITY;function _y(e,t){return t[1]!==py?function(e,t,i){let n=0,r=0;switch(t=Math.abs(t),i=Math.abs(i),e){case"top-right":case"top-left":case"top":r=i-fy;break;case"bottom-right":case"bottom-left":case"bottom":r=-i+fy}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,r]}(e,t[0],t[1]):function(e,t){let i=0,n=0;t<0&&(t=0);const r=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":n=r-fy;break;case"bottom-right":case"bottom-left":n=-r+fy;break;case"bottom":n=-t+fy;break;case"top":n=t-fy}switch(e){case"top-right":case"bottom-right":i=-r;break;case"top-left":case"bottom-left":i=r;break;case"left":i=t;break;case"right":i=-t}return[i,n]}(e,t[0])}function my(e,t,i,n,r,o){e.createArrays();const a=512*e.overscaling;e.tilePixelRatio=$o/a,e.compareText={},e.iconsNeedLinear=!1;const s=e.layers[0].layout,l=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){const{minZoom:t,maxZoom:i}=e.textSizeData;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new go(t)),l["text-size"].possiblyEvaluate(new go(i))]}if("composite"===e.iconSizeData.kind){const{minZoom:t,maxZoom:i}=e.iconSizeData;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new go(t)),l["icon-size"].possiblyEvaluate(new go(i))]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new go(e.zoom+1)),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new go(e.zoom+1)),u.textMaxSize=l["text-size"].possiblyEvaluate(new go(18));const c=s.get("text-line-height")*tx,h="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),d=s.get("text-keep-upright"),f=s.get("text-size");for(const o of e.features){const a=s.get("text-font").evaluate(o,{}).join(","),l=f.evaluate(o,{}),p=u.layoutTextSize.evaluate(o,{}),_=u.layoutIconSize.evaluate(o,{}),m={horizontal:{},vertical:void 0},g=o.text;let x=[0,0];if(g){const n=g.toString(),u=s.get("text-letter-spacing").evaluate(o,{})*tx,f=Km(n)?u:0,_=s.get("text-anchor").evaluate(o,{}),v=s.get("text-variable-anchor");if(!v){const e=s.get("text-radial-offset").evaluate(o,{});x=e?_y(_,[e*tx,py]):s.get("text-offset").evaluate(o,{}).map((e=>e*tx))}let y=h?"center":s.get("text-justify").evaluate(o,{});const $=s.get("symbol-placement"),b="point"===$?s.get("text-max-width").evaluate(o,{})*tx:0,T=()=>{e.allowVerticalPlacement&&Xm(n)&&(m.vertical=Kx(g,t,i,r,a,b,c,_,"left",f,x,Vx.vertical,!0,$,p,l))};if(!h&&v){const e="auto"===y?v.map((e=>gy(e))):[y];let n=!1;for(let o=0;o<e.length;o++){const s=e[o];if(!m.horizontal[s])if(n)m.horizontal[s]=m.horizontal[0];else{const e=Kx(g,t,i,r,a,b,c,"center",s,f,x,Vx.horizontal,!1,$,p,l);e&&(m.horizontal[s]=e,n=1===e.positionedLines.length)}}T()}else{"auto"===y&&(y=gy(_));const e=Kx(g,t,i,r,a,b,c,_,y,f,x,Vx.horizontal,!1,$,p,l);e&&(m.horizontal[y]=e),T(),Xm(n)&&h&&d&&(m.vertical=Kx(g,t,i,r,a,b,c,_,y,f,x,Vx.vertical,!1,$,p,l))}}let v,y=!1;if(o.icon&&o.icon.name){const t=n[o.icon.name];t&&(v=cv(r[o.icon.name],s.get("icon-offset").evaluate(o,{}),s.get("icon-anchor").evaluate(o,{})),y=t.sdf,void 0===e.sdfIcons?e.sdfIcons=t.sdf:e.sdfIcons!==t.sdf&&Gh("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(t.pixelRatio!==e.pixelRatio||0!==s.get("icon-rotate").constantOr(1))&&(e.iconsNeedLinear=!0))}const $=by(m.horizontal)||m.vertical;e.iconsInText=!!$&&$.iconsInText,($||v)&&xy(e,o,m,v,n,u,p,_,x,y)}o&&e.generateCollisionDebugBuffers()}function gy(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function xy(e,t,i,n,r,o,a,s,l,u){let c=o.textMaxSize.evaluate(t,{});void 0===c&&(c=a);const h=e.layers[0].layout,d=h.get("icon-offset").evaluate(t,{}),f=by(i.horizontal),p=a/24,_=e.tilePixelRatio*p,m=e.tilePixelRatio*c/24,g=e.tilePixelRatio*s,x=e.tilePixelRatio*h.get("symbol-spacing"),v=h.get("text-padding")*e.tilePixelRatio,y=h.get("icon-padding")*e.tilePixelRatio,$=h.get("text-max-angle")/180*Math.PI,b="map"===h.get("text-rotation-alignment")&&"point"!==h.get("symbol-placement"),T="map"===h.get("icon-rotation-alignment")&&"point"!==h.get("symbol-placement"),C=h.get("symbol-placement"),S=x/2,w=h.get("icon-text-fit");let E;n&&"none"!==w&&(e.allowVerticalPlacement&&i.vertical&&(E=hv(n,i.vertical,w,h.get("icon-text-fit-padding"),d,p)),f&&(n=hv(n,f,w,h.get("icon-text-fit-padding"),d,p)));const P=(a,s)=>{s.x<0||s.x>=$o||s.y<0||s.y>=$o||Ty(e,s,a,i,n,r,E,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,_,v,b,l,g,y,T,d,t,o,u)};if("line"===C)for(const r of Bv(t.geometry,0,0,$o,$o)){const t=Pv.getAnchors(r,x,$,i.vertical||f,n,24,m,e.overscaling,$o);for(const i of t){const t=f;(!t||!Cy(e,t.text,S,i))&&P(r,i)}}else if("line-center"===C){for(const e of t.geometry)if(e.length>1){const t=Pv.getCenterAnchor(e,$,i.vertical||f,n,24,m);t&&P(e,t)}}else if("Polygon"===t.type)for(const e of Nf(t.geometry,0)){const t=iy(e,16);P(e[0],new vv(t.x,t.y,0))}else if("LineString"===t.type)for(const e of t.geometry)P(e,new vv(e[0].x,e[0].y,0));else if("Point"===t.type)for(const e of t.geometry)for(const t of e)P([t],new vv(t.x,t.y,0))}const vy=255,yy=vy*gv;function $y(e,t,i,n,r,o,a,s,l,u,c,h,d,f){const p=kv.getGlyphQuads(t,i,s,r,o,a,n,e.allowVerticalPlacement),_=e.textSizeData;let m=null;"source"===_.kind?(m=[gv*r.layout.get("text-size").evaluate(a,{})],m[0]>yy&&Gh(e.layerIds[0]+': Value for "text-size" is >= '+vy+'. Reduce your "text-size".')):"composite"===_.kind&&(m=[gv*f.compositeTextSizes[0].evaluate(a,{}),gv*f.compositeTextSizes[1].evaluate(a,{})],(m[0]>yy||m[1]>yy)&&Gh(e.layerIds[0]+': Value for "text-size" is >= '+vy+'. Reduce your "text-size".')),e.addSymbols(e.text,p,m,s,o,a,u,t,l.lineStartIndex,l.lineLength,d);for(const t of c)h[t]=e.text.placedSymbolArray.length-1;return 4*p.length}function by(e){for(const t in e)return e[t];return null}function Ty(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b){const T=e.addToLineVertexArray(t,i);let C,S,w,E,P=0,A=0,L=0,M=0,R=-1,O=-1;const I={};let D=cy(""),B=0,N=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?[B,N]=s.layout.get("text-offset").evaluate(y,{}).map((e=>e*tx)):(B=s.layout.get("text-radial-offset").evaluate(y,{})*tx,N=py),e.allowVerticalPlacement&&n.vertical){const r=s.layout.get("text-rotate").evaluate(y,{})+90,o=n.vertical;w=new Zv(l,i,t,u,c,h,o,d,f,p,e.overscaling,r),a&&(E=new Zv(l,i,t,u,c,h,a,m,g,p,e.overscaling,r))}if(r){const n=s.layout.get("icon-rotate").evaluate(y,{}),o="none"!==s.layout.get("icon-text-fit"),d=kv.getIconQuads(r,n,b,o),f=a?kv.getIconQuads(a,n,b,o):void 0;S=new Zv(l,i,t,u,c,h,r,m,g,!1,e.overscaling,n),P=4*d.length;const p=e.iconSizeData;let _=null;"source"===p.kind?(_=[gv*s.layout.get("icon-size").evaluate(y,{})],_[0]>yy&&Gh(e.layerIds[0]+': Value for "icon-size" is >= '+vy+'. Reduce your "icon-size".')):"composite"===p.kind&&(_=[gv*$.compositeIconSizes[0].evaluate(y,{}),gv*$.compositeIconSizes[1].evaluate(y,{})],(_[0]>yy||_[1]>yy)&&Gh(e.layerIds[0]+': Value for "icon-size" is >= '+vy+'. Reduce your "icon-size".')),e.addSymbols(e.icon,d,_,v,x,y,!1,t,T.lineStartIndex,T.lineLength,-1),R=e.icon.placedSymbolArray.length-1,f&&(A=4*f.length,e.addSymbols(e.icon,f,_,v,x,y,Vx.vertical,t,T.lineStartIndex,T.lineLength,-1),O=e.icon.placedSymbolArray.length-1)}for(const r in n.horizontal){const a=n.horizontal[r];if(!C){D=cy(a.text);const n=s.layout.get("text-rotate").evaluate(y,{});C=new Zv(l,i,t,u,c,h,a,d,f,p,e.overscaling,n)}const m=1===a.positionedLines.length;if(L+=$y(e,t,a,o,s,p,y,_,T,n.vertical?Vx.horizontal:Vx.horizontalOnly,m?Object.keys(n.horizontal):[r],I,R,$),m)break}n.vertical&&(M+=$y(e,t,n.vertical,o,s,p,y,_,T,Vx.vertical,["vertical"],I,O,$));const F=C?C.boxStartIndex:e.collisionBoxArray.length,U=C?C.boxEndIndex:e.collisionBoxArray.length,G=w?w.boxStartIndex:e.collisionBoxArray.length,z=w?w.boxEndIndex:e.collisionBoxArray.length,V=S?S.boxStartIndex:e.collisionBoxArray.length,k=S?S.boxEndIndex:e.collisionBoxArray.length,W=E?E.boxStartIndex:e.collisionBoxArray.length,H=E?E.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=Gy.MAX_GLYPHS&&Gh("Too many glyphs being rendered in a tile."),e.symbolInstances.emplaceBack(t.x,t.y,I.right>=0?I.right:-1,I.center>=0?I.center:-1,I.left>=0?I.left:-1,I.vertical||-1,R,O,D,F,U,G,z,V,k,W,H,u,L,M,P,A,0,d,B,N)}function Cy(e,t,i,n){const r=e.compareText;if(t in r){const e=r[t];for(let t=e.length-1;t>=0;t--)if(n.dist(e[t])<i)return!0}else r[t]=[];return r[t].push(n),!1}var Sy,wy=(Sy=!0,function(e,t){var i=Sy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Sy=!1,i}),Ey=wy(void 0,(function(){return Ey.toString().search("(((.+)+)+)+$").toString().constructor(Ey).search("(((.+)+)+)+$")}));function Py(e,t,i){var n=t.layout.get("text-transform").evaluate(i,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),e}function Ay(e,t,i){return e.sections.forEach((function(e){e.text=Py(e.text,t,i)})),e}Ey();var Ly,My=(Ly=!0,function(e,t){var i=Ly?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ly=!1,i}),Ry=My(void 0,(function(){return Ry.toString().search("(((.+)+)+)+$").toString().constructor(Ry).search("(((.+)+)+)+$")}));Ry();var Oy=["Unknown","Point","LineString","Polygon"],Iy=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Dy(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=s?Math.min(yy,Math.round(s[0])):0,p=s?Math.min(yy,Math.round(s[1])):0;e.emplaceBack(t,i,Math.round(32*n),Math.round(32*r),o,a,(f<<1)+(l?1:0),p,16*u,16*c,256*h,256*d)}function By(e,t,i){e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i)}function Ny(e){for(var t=0,i=e.sections;t<i.length;t+=1)if(rg(i[t].text))return!0;return!1}var Fy=function(e){this.layoutVertexArray=new zo,this.indexArray=new Zo,this.programConfigurations=e,this.segments=new Ao,this.dynamicLayoutVertexArray=new Vo,this.opacityVertexArray=new ko,this.placedSymbolArray=new ua};Fy.prototype.upload=function(e,t,i,n){i&&(this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,Fm.members)),this.indexArray.length>0&&(this.indexBuffer=Tc.toIndexBuffer(e,this.indexArray,t)),this.dynamicLayoutVertexArray.length>0&&(this.dynamicLayoutVertexBuffer=Tc.toVertexBuffer(e,this.dynamicLayoutVertexArray,Um.members,!0)),this.opacityVertexArray.length>0&&(this.opacityVertexBuffer=Tc.toVertexBuffer(e,this.opacityVertexArray,Iy,!0),this.opacityVertexBuffer.itemSize=1)),(i||n)&&this.programConfigurations.upload(e)},Fy.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.dynamicLayoutVertexBuffer&&(this.dynamicLayoutVertexBuffer.destroy(),this.dynamicLayoutVertexBuffer=null),this.opacityVertexBuffer&&(this.opacityVertexBuffer.destroy(),this.opacityVertexBuffer=null),this.programConfigurations.destroy(),this.segments.destroy()},Fy.prototype.clear=function(){},en.register("SymbolBuffers",Fy);var Uy=function(e,t,i){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new i,this.segments=new Ao,this.collisionVertexArray=new qo};Uy.prototype.upload=function(e){this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,this.layoutAttributes)),this.indexArray.length>0&&(this.indexBuffer=Tc.toIndexBuffer(e,this.indexArray)),this.collisionVertexArray.length>0&&(this.collisionVertexBuffer=Tc.toVertexBuffer(e,this.collisionVertexArray,Gm.members,!0))},Uy.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.collisionVertexBuffer&&(this.collisionVertexBuffer.destroy(),this.collisionVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.segments.destroy()},en.register("CollisionBuffers",Uy);var Gy=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasPaintOverrides=!1,this.hasRTLText=!1;var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=xv(this.zoom,t["text-size"]),this.iconSizeData=xv(this.zoom,t["icon-size"]);var i=this.layers[0].layout,n=i.get("symbol-sort-key"),r=i.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==r&&void 0!==n.constantOr(1);var o="viewport-y"===r||"auto"===r&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map((function(e){return Vx[e]}))),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id})),this.sourceID=e.sourceID,this.overscaling=1};Gy.prototype.createArrays=function(){const e=this.layers[0].layout;this.hasPaintOverrides=Zy.hasPaintOverrides(e);var t=Fm.members;this.text=new Fy(new eh(t,this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new Fy(new eh(t,this.layers,this.zoom,(e=>/^icon/.test(e)))),this.textCollisionBox=new Uy(Ho,zm.members,Jo),this.iconCollisionBox=new Uy(Ho,zm.members,Jo),this.textCollisionCircle=new Uy(Ho,Vm.members,Zo),this.iconCollisionCircle=new Uy(Ho,Vm.members,Zo),this.glyphOffsetArray=new fa,this.lineVertexArray=new _a,this.symbolInstances=new ha},Gy.prototype.calculateGlyphDependencies=function(e,t,i,n,r){for(let o=0;o<e.length;o++)if(t[e.charCodeAt(o)]=!0,(i||n)&&r){const i=sg[e.charAt(o)];i&&(t[i.charCodeAt(0)]=!0)}},Gy.prototype.populate=function(e,t){var i=this.layers[0],n=i.layout,r=n.get("text-font"),o=n.get("text-field"),a=n.get("icon-image"),s=("constant"!==o.value.kind||o.value.value instanceof ie&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&("constant"!==r.value.kind||r.value.value.length>0),l=("constant"!==a.value.kind||!!a.value.value)&&Object.keys(a.parameters).length>0,u=n.get("symbol-sort-key");if(this.features=[],s||l){for(var c=t.iconDependencies,h=t.glyphDependencies,d=t.availableImages,f=new go(this.zoom),p=0,_=e;p<_.length;p+=1){var m=_[p],g=m.feature,x=m.index,v=m.sourceLayerIndex;if(i._featureFilter(f,g)){var y=void 0;if(s){var $=i.getValueAndResolveTokens("text-field",g,d),b=ie.factory($);Ny(b)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===getRTLTextPluginStatus()||this.hasRTLText&&plugin.isParsed())&&(y=Ay(b,i,g))}var T=void 0;if(l){var C=i.getValueAndResolveTokens("icon-image",g,d);T=C instanceof ae?C:ae.fromString(C)}if(y||T){var S=this.sortFeaturesByKey?u.evaluate(g,{}):void 0,w={text:y,icon:T,index:x,sourceLayerIndex:v,geometry:So(g),properties:g.properties,type:Oy[g.type],sortKey:S};if(void 0!==g.id&&(w.id=g.id),this.features.push(w),T&&(c[T.name]=!0),y){var E=r.evaluate(g,{}).join(","),P="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(Vx.vertical)>=0;for(var A=0,L=y.sections;A<L.length;A+=1){var M=L[A];if(M.image)c[M.image.name]=!0;else{var R=Xm(y.toString()),O=M.fontStack||E,I=h[O]=h[O]||{};this.calculateGlyphDependencies(M.text,I,P,this.allowVerticalPlacement,R)}}}}}}"line"===n.get("symbol-placement")&&(this.features=_g(this.features)),this.sortFeaturesByKey&&this.features.sort((function(e,t){return e.sortKey-t.sortKey}))}},Gy.prototype.update=function(e,t,i){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,i),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,i))},Gy.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},Gy.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Gy.prototype.upload=function(e){this.text&&(!this.uploaded&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e),this.textCollisionCircle.upload(e),this.iconCollisionCircle.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0)},Gy.prototype.destroy=function(){this.text&&(this.text.destroy(),this.icon.destroy(),this.textCollisionBox.destroy(),this.iconCollisionBox.destroy(),this.textCollisionCircle.destroy(),this.iconCollisionCircle.destroy())},Gy.prototype.clear=function(){},Gy.prototype.addToLineVertexArray=function(e,t){var i=this.lineVertexArray.length;if(void 0!==e.segment){for(var n=e.dist(t[e.segment+1]),r=e.dist(t[e.segment]),o={},a=e.segment+1;a<t.length;a++)o[a]={x:t[a].x,y:t[a].y,tileUnitDistanceFromAnchor:n},a<t.length-1&&(n+=t[a+1].dist(t[a]));for(var s=e.segment||0;s>=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:r},s>0&&(r+=t[s-1].dist(t[s]));for(var l=0;l<t.length;l++){var u=o[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:i,lineLength:this.lineVertexArray.length-i}},Gy.prototype.addSymbols=function(e,t,i,n,r,o,a,s,l,u,c){var h=this,d=e.indexArray,f=e.layoutVertexArray,p=e.dynamicLayoutVertexArray,_=e.segments.prepareSegment(4*t.length,e.layoutVertexArray,e.indexArray,o.sortKey),m=this.glyphOffsetArray.length,g=_.vertexLength,x=this.allowVerticalPlacement&&a===Vx.vertical?Math.PI/2:0,v=function(e){var t=e.tl,n=e.tr,r=e.bl,o=e.br,a=e.tex,l=e.pixelOffsetTL,u=e.pixelOffsetBR,c=e.minFontScaleX,m=e.minFontScaleY,g=_.vertexLength,v=e.glyphOffset[1];Dy(f,s.x,s.y,t.x,v+t.y,a.x,a.y+a.h,i,e.isSDF,l.x,l.y,c,m),Dy(f,s.x,s.y,n.x,v+n.y,a.x+a.w,a.y+a.h,i,e.isSDF,u.x,l.y,c,m),Dy(f,s.x,s.y,r.x,v+r.y,a.x,a.y,i,e.isSDF,l.x,u.y,c,m),Dy(f,s.x,s.y,o.x,v+o.y,a.x+a.w,a.y,i,e.isSDF,u.x,u.y,c,m),By(p,s,x),d.emplaceBack(g,g+1,g+2),d.emplaceBack(g+1,g+2,g+3),_.vertexLength+=4,_.primitiveLength+=2,h.glyphOffsetArray.emplaceBack(e.glyphOffset[0])};if(o.text&&o.text.sections){var y=o.text.sections;if(this.hasPaintOverrides){for(var $,b=function(t,i){void 0!==$&&($!==t||i)&&e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},y[$]),$=t},T=0,C=t;T<C.length;T+=1){var S=C[T];b(S.sectionIndex,!1),v(S)}b($,!0)}else{for(var w=0,E=t;w<E.length;w+=1)v(E[w]);e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},y[0])}}else{for(var P=0,A=t;P<A.length;P+=1)v(A[P]);e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{})}e.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,g,l,u,s.segment,i?i[0]:0,i?i[1]:0,n[0],n[1],a,0,!1,0,c)},Gy.prototype._addCollisionDebugVertex=function(e,t,i,n,r,o){return t.emplaceBack(0,0),e.emplaceBack(i.x,i.y,n,r,Math.round(o.x),Math.round(o.y))},Gy.prototype.addCollisionDebugVertices=function(e,t,i,n,r,o,a,s){var l=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),u=l.vertexLength,c=r.layoutVertexArray,h=r.collisionVertexArray,d=a.anchorX,f=a.anchorY;if(this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,n)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,n)),l.vertexLength+=4,s){var p=r.indexArray;p.emplaceBack(u,u+1,u+2),p.emplaceBack(u,u+2,u+3),l.primitiveLength+=2}else{var _=r.indexArray;_.emplaceBack(u,u+1),_.emplaceBack(u+1,u+2),_.emplaceBack(u+2,u+3),_.emplaceBack(u+3,u),l.primitiveLength+=4}},Gy.prototype.addDebugCollisionBoxes=function(e,t,i,n){for(var r=e;r<t;r++){var o=this.collisionBoxArray.get(r),a=o.x1,s=o.y1,l=o.x2,u=o.y2,c=o.radius>0;this.addCollisionDebugVertices(a,s,l,u,c?n?this.textCollisionCircle:this.iconCollisionCircle:n?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,i,c)}},Gy.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e<this.symbolInstances.length;e++){var t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}},Gy.prototype._deserializeCollisionBoxesForSymbol=function(e,t,i,n,r,o,a,s,l){for(var u={},c=t;c<i;c++){var h=e.get(c);if(0===h.radius){u.textBox={x1:h.x1,y1:h.y1,x2:h.x2,y2:h.y2,anchorPointX:h.anchorPointX,anchorPointY:h.anchorPointY},u.textFeatureIndex=h.featureIndex;break}!u.textCircles&&(u.textCircles=[],u.textFeatureIndex=h.featureIndex),u.textCircles.push(h.anchorPointX,h.anchorPointY,h.radius,h.signedDistanceFromAnchor,1)}for(var d=n;d<r;d++){var f=e.get(d);if(0===f.radius){u.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalTextFeatureIndex=f.featureIndex;break}}for(var p=o;p<a;p++){var _=e.get(p);if(0===_.radius){u.iconBox={x1:_.x1,y1:_.y1,x2:_.x2,y2:_.y2,anchorPointX:_.anchorPointX,anchorPointY:_.anchorPointY},u.iconFeatureIndex=_.featureIndex;break}}for(var m=s;m<l;m++){var g=e.get(m);if(0===g.radius){u.verticalIconBox={x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,anchorPointX:g.anchorPointX,anchorPointY:g.anchorPointY},u.verticalIconFeatureIndex=g.featureIndex;break}}return u},Gy.prototype.deserializeCollisionBoxes=function(e){this.collisionArrays=[];for(var t=0;t<this.symbolInstances.length;t++){var i=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,i.textBoxStartIndex,i.textBoxEndIndex,i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i.iconBoxStartIndex,i.iconBoxEndIndex,i.verticalIconBoxStartIndex,i.verticalIconBoxEndIndex))}},Gy.prototype.hasTextData=function(){return this.text.segments.get().length>0},Gy.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Gy.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},Gy.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},Gy.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},Gy.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},Gy.prototype.addIndicesForPlacedSymbol=function(e,t){for(var i=e.placedSymbolArray.get(t),n=i.vertexStartIndex+4*i.numGlyphs,r=i.vertexStartIndex;r<n;r+=4)e.indexArray.emplaceBack(r,r+1,r+2),e.indexArray.emplaceBack(r+1,r+2,r+3)},Gy.prototype.getSortedSymbolIndexes=function(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var t=Math.sin(e),i=Math.cos(e),n=[],r=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);n.push(0|Math.round(t*s.anchorX+i*s.anchorY)),r.push(s.featureIndex)}return o.sort((function(e,t){return n[e]-n[t]||r[t]-r[e]})),o},Gy.prototype.sortFeatures=function(e){var t=this;if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var i=0,n=this.symbolInstanceIndexes;i<n.length;i+=1){var r=n[i],o=this.symbolInstances.get(r);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(e,i,n){e>=0&&n.indexOf(e)===i&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},en.register("SymbolBucket",Gy,{omit:["layers","collisionBoxArray","compareText"]}),Gy.MAX_GLYPHS=65535,Gy.addDynamicAttributes=By;var zy,Vy=(zy=!0,function(e,t){var i=zy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return zy=!1,i}),ky=Vy(void 0,(function(){return ky.toString().search("(((.+)+)+)+$").toString().constructor(ky).search("(((.+)+)+)+$")}));function Wy(e,t){return t.replace(/{([^{}]+)}/g,((t,i)=>i in e?String(e[i]):""))}ky();var Hy,qy={kind:"color"},jy={kind:"formatted"},Yy=new Zh({"symbol-placement":new mh(hf.layout_symbol["symbol-placement"]),"symbol-spacing":new mh(hf.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new mh(hf.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new yh(hf.layout_symbol["symbol-sort-key"]),"symbol-z-order":new mh(hf.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new mh(hf.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new mh(hf.layout_symbol["icon-ignore-placement"]),"icon-optional":new mh(hf.layout_symbol["icon-optional"]),"icon-rotation-alignment":new mh(hf.layout_symbol["icon-rotation-alignment"]),"icon-size":new yh(hf.layout_symbol["icon-size"]),"icon-text-fit":new mh(hf.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new mh(hf.layout_symbol["icon-text-fit-padding"]),"icon-image":new yh(hf.layout_symbol["icon-image"]),"icon-rotate":new yh(hf.layout_symbol["icon-rotate"]),"icon-padding":new mh(hf.layout_symbol["icon-padding"]),"icon-keep-upright":new mh(hf.layout_symbol["icon-keep-upright"]),"icon-offset":new yh(hf.layout_symbol["icon-offset"]),"icon-anchor":new yh(hf.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new mh(hf.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new mh(hf.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new mh(hf.layout_symbol["text-rotation-alignment"]),"text-field":new yh(hf.layout_symbol["text-field"]),"text-font":new yh(hf.layout_symbol["text-font"]),"text-size":new yh(hf.layout_symbol["text-size"]),"text-max-width":new yh(hf.layout_symbol["text-max-width"]),"text-line-height":new mh(hf.layout_symbol["text-line-height"]),"text-letter-spacing":new yh(hf.layout_symbol["text-letter-spacing"]),"text-justify":new yh(hf.layout_symbol["text-justify"]),"text-radial-offset":new yh(hf.layout_symbol["text-radial-offset"]),"text-variable-anchor":new mh(hf.layout_symbol["text-variable-anchor"]),"text-anchor":new yh(hf.layout_symbol["text-anchor"]),"text-max-angle":new mh(hf.layout_symbol["text-max-angle"]),"text-writing-mode":new mh(hf.layout_symbol["text-writing-mode"]),"text-rotate":new yh(hf.layout_symbol["text-rotate"]),"text-padding":new mh(hf.layout_symbol["text-padding"]),"text-keep-upright":new mh(hf.layout_symbol["text-keep-upright"]),"text-transform":new yh(hf.layout_symbol["text-transform"]),"text-offset":new yh(hf.layout_symbol["text-offset"]),"text-allow-overlap":new mh(hf.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new mh(hf.layout_symbol["text-ignore-placement"]),"text-optional":new mh(hf.layout_symbol["text-optional"])}),Xy=new Zh({"icon-opacity":new yh(hf.paint_symbol["icon-opacity"]),"icon-color":new yh(hf.paint_symbol["icon-color"]),"icon-halo-color":new yh(hf.paint_symbol["icon-halo-color"]),"icon-halo-width":new yh(hf.paint_symbol["icon-halo-width"]),"icon-halo-blur":new yh(hf.paint_symbol["icon-halo-blur"]),"icon-translate":new mh(hf.paint_symbol["icon-translate"]),"icon-translate-anchor":new mh(hf.paint_symbol["icon-translate-anchor"]),"text-opacity":new yh(hf.paint_symbol["text-opacity"]),"text-color":new yh(hf.paint_symbol["text-color"],{runtimeType:qy,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new yh(hf.paint_symbol["text-halo-color"]),"text-halo-width":new yh(hf.paint_symbol["text-halo-width"]),"text-halo-blur":new yh(hf.paint_symbol["text-halo-blur"]),"text-show-background":new yh(hf.paint_symbol["text-show-background"]),"text-translate":new mh(hf.paint_symbol["text-translate"]),"text-translate-anchor":new mh(hf.paint_symbol["text-translate-anchor"])}),Ky={paint:Xy,layout:Yy},Qy=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Ky)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){if(e.prototype.recalculate.call(this,t,i),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var r=[],o=0,a=n;o<a.length;o+=1){var s=a[o];r.indexOf(s)<0&&r.push(s)}this.layout._values["text-writing-mode"]=r}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},r.prototype.getValueAndResolveTokens=function(e,t,i){var n=this.layout.get(e).evaluate(t,{},i),r=this._unevaluatedLayout._values[e];return r.isDataDriven()||ar.isExpression(r.value)||!n?n:Wy(t.properties,n)},r.prototype.createBucket=function(e){return new Gy(e)},r.prototype.queryRadius=function(){return 0},r.prototype.queryIntersectsFeature=function(){return!1},r.prototype._setPaintOverrides=function(){for(var e=0,t=Ky.paint.overridableProperties;e<t.length;e+=1){var i=t[e];if(r.hasPaintOverride(this.layout,i)){var n=this.paint.get(i);new FormatSectionOverride(n),"constant"===n.value.kind||n.value.kind,this.paint._values[i]=new PossiblyEvaluatedPropertyValue(n.property,null,n.parameters)}}},r.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!(!this.layout||t.isDataDriven()||i.isDataDriven())&&r.hasPaintOverride(this.layout,e)},r.hasPaintOverride=function(e,t){var i=e.get("text-field"),n=Ky.paint.properties[t],r=!1,o=function(e){for(var t=0,i=e;t<i.length;t+=1){var o=i[t];if(n.overrides&&n.overrides.hasOverride(o))return void(r=!0)}};if("constant"===i.value.kind&&i.value.value instanceof ie)o(i.value.value.sections);else if("source"===i.value.kind){var a=function(e){if(!r)if(e instanceof bi&&$e.typeOf(e.value)===jy){var t=e.value;o(t.sections)}else e instanceof zt?o(e.sections):e.eachChild(a)},s=i.value;s._styleExpression&&a(s._styleExpression.expression)}return r},r.hasPaintOverrides=function(e){for(var t=0,i=Ky.paint.overridableProperties;t<i.length;t+=1){var n=i[t];if(r.hasPaintOverride(e,n))return!0}return!1},r}(bd),Zy=Qy,Jy=(Hy=!0,function(e,t){var i=Hy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Hy=!1,i}),e$=Jy(void 0,(function(){return e$.toString().search("(((.+)+)+)+$").toString().constructor(e$).search("(((.+)+)+)+$")}));e$();var t$={circle:Cf,fill:lm,line:Dm,symbol:Zy};function i$(e){return t$[e.type]?new t$[e.type](e):null}var n$,r$=(n$=!0,function(e,t){var i=n$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n$=!1,i}),o$=r$(void 0,(function(){return o$.toString().search("(((.+)+)+)+$").toString().constructor(o$).search("(((.+)+)+)+$")}));o$();var a$=function(e){this.keyCache={},e&&this.replace(e)};function s$(e){var t=[];for(var i in e)t.push(e[i]);return t}a$.prototype.replace=function(e){this._layerConfigs={},this._layers={},this.update(e,[])},a$.prototype.update=function(e,t){for(var i=this,n=0,r=e;n<r.length;n+=1){var o=r[n];this._layerConfigs[o.id]=o;var a=i$(o);null!=a&&(this._layers[o.id]=a,a._featureFilter=Br.createFilter(a.filter),this.keyCache[o.id]&&delete this.keyCache[o.id])}for(var s=0,l=t;s<l.length;s+=1){var u=l[s];delete this.keyCache[u],delete this._layerConfigs[u],delete this._layers[u]}this.familiesBySource={};for(var c=0,h=Qr(s$(this._layerConfigs),this.keyCache);c<h.length;c+=1){var d=h[c].map((function(e){return i._layers[e.id]})),f=d[0];if(null!=f&&"none"!==f.visibility){var p=f.source||"",_=this.familiesBySource[p];!_&&(_=this.familiesBySource[p]={});var m=f.sourceLayer,g=_[m];!g&&(g=_[m]=[]),g.push(d)}}};var l$,u$=(l$=!0,function(e,t){var i=l$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return l$=!1,i}),c$=u$(void 0,(function(){return c$.toString().search("(((.+)+)+)+$").toString().constructor(c$).search("(((.+)+)+)+$")}));function h$(e,t,i,n,r){this.properties={},this.extent=i,this.type=0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=r,e.readFields(d$,this,t)}function d$(e,t,i){1==e?t.id=i.readVarint():2==e?f$(i,t):3==e?t.type=i.readVarint():4==e&&(t._geometry=i.pos)}function f$(e,t){for(var i=e.readVarint()+e.pos;e.pos<i;){var n=t._keys[e.readVarint()],r=t._values[e.readVarint()];t.properties[n]=r}}function p$(e){var t=e.length;if(t<=1)return[e];for(var i,n,r=[],o=0;o<t;o++){var a=_$(e[o]);0!==a&&(void 0===n&&(n=a<0),n===a<0?(i&&r.push(i),i=[e[o]]):i.push(e[o]))}return i&&r.push(i),r}function _$(e){for(var t,i,n=0,r=0,o=e.length,a=o-1;r<o;a=r++)t=e[r],n+=((i=e[a]).x-t.x)*(t.y+i.y);return n}c$(),h$.types=["Unknown","Point","LineString","Polygon"],h$.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,i=e.readVarint()+e.pos,n=1,r=0,o=0,a=0,s=[];e.pos<i;){if(r<=0){var l=e.readVarint();n=7&l,r=l>>3}r--,1===n||2===n?(o+=e.readSVarint(),a+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new to(o,a))):7===n?t&&t.push(t[0].clone()):console.log("VectorTileFeature loadGeometry unknown command "+n)}return t&&s.push(t),s},h$.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,n=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos<t;){if(n<=0){var c=e.readVarint();i=7&c,n=c>>3}if(n--,1===i||2===i)(r+=e.readSVarint())<a&&(a=r),r>s&&(s=r),(o+=e.readSVarint())<l&&(l=o),o>u&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},h$.prototype.toGeoJSON=function(e,t,i){var n,r,o=this.extent*Math.pow(2,i),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=h$.types[this.type];function c(e){for(var t=0;t<e.length;t++){var i=e[t],n=180-360*(i.y+s)/o;e[t]=[360*(i.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(n=0;n<l.length;n++)h[n]=l[n][0];c(l=h);break;case 2:for(n=0;n<l.length;n++)c(l[n]);break;case 3:for(l=p$(l),n=0;n<l.length;n++)for(r=0;r<l[n].length;r++)c(l[n][r])}1===l.length?l=l[0]:u="Multi"+u;var d={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(d.id=this.id),d};var m$,g$=(m$=!0,function(e,t){var i=m$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return m$=!1,i}),x$=g$(void 0,(function(){return x$.toString().search("(((.+)+)+)+$").toString().constructor(x$).search("(((.+)+)+)+$")}));function v$(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(y$,this,t),this.length=this._features.length}function y$(e,t,i){15===e?t.version=i.readVarint():1===e?t.name=i.readString():5===e?t.extent=i.readVarint():2===e?t._features.push(i.pos):3===e?t._keys.push(i.readString()):4===e&&t._values.push($$(i))}function $$(e){for(var t=null,i=e.readVarint()+e.pos;e.pos<i;){var n=e.readVarint()>>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}x$(),v$.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new h$(this._pbf,t,this.extent,this._keys,this._values)};var b$,T$=(b$=!0,function(e,t){var i=b$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return b$=!1,i}),C$=T$(void 0,(function(){return C$.toString().search("(((.+)+)+)+$").toString().constructor(C$).search("(((.+)+)+)+$")}));function S$(e,t){this.layers=e.readFields(w$,{},t)}function w$(e,t,i){if(3===e){var n=new v$(i,i.readVarint()+i.pos);n.length&&(t[n.name]=n)}}C$();var E$,P$=(E$=!0,function(e,t){var i=E$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return E$=!1,i}),A$=P$(void 0,(function(){return A$.toString().search("(((.+)+)+)+$").toString().constructor(A$).search("(((.+)+)+)+$")}));function L$(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t<e.length;t++){var i=e[t];this._stringToNumber[i]=t,this._numberToString[t]=i}}A$(),L$.prototype.encode=function(e){return this._stringToNumber[e]},L$.prototype.decode=function(e){return this._numberToString[e]};var M$,R$=(M$=!0,function(e,t){var i=M$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return M$=!1,i}),O$=R$(void 0,(function(){return O$.toString().search("(((.+)+)+)+$").toString().constructor(O$).search("(((.+)+)+)+$")}));O$();var I$=3;function D$(e,t,i){var n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var r=new Int32Array(this.arrayBuffer);e=r[0],t=r[1],i=r[2],this.d=t+2*i;for(var o=0;o<this.d*this.d;o++){var a=r[I$+o],s=r[I$+o+1];n.push(a===s?null:r.subarray(a,s))}var l=r[I$+n.length],u=r[I$+n.length+1];this.keys=r.subarray(l,u),this.bboxes=r.subarray(u),this.insert=this._insertReadonly}else{this.d=t+2*i;for(var c=0;c<this.d*this.d;c++)n.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=i,this.scale=t/e,this.uid=0;var h=i/t*e;this.min=-h,this.max=e+h}D$.prototype.insert=function(e,t,i,n,r){this._forEachCell(t,i,n,r,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)},D$.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},D$.prototype._insertCell=function(e,t,i,n,r,o){this.cells[r].push(o)},D$.prototype.query=function(e,t,i,n,r){var o=this.min,a=this.max;if(e<=o&&t<=o&&a<=i&&a<=n&&!r)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(e,t,i,n,this._queryCell,s,{},r),s},D$.prototype._queryCell=function(e,t,i,n,r,o,a,s){var l=this.cells[r];if(null!==l)for(var u=this.keys,c=this.bboxes,h=0;h<l.length;h++){var d=l[h];if(void 0===a[d]){var f=4*d;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):e<=c[f+2]&&t<=c[f+3]&&i>=c[f+0]&&n>=c[f+1])?(a[d]=!0,o.push(u[d])):a[d]=!1}}},D$.prototype._forEachCell=function(e,t,i,n,r,o,a,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(i),h=this._convertToCellCoord(n),d=l;d<=c;d++)for(var f=u;f<=h;f++){var p=this.d*f+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(f),this._convertFromCellCoord(d+1),this._convertFromCellCoord(f+1)))&&r.call(this,e,t,i,n,p,o,a,s))return}},D$.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},D$.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},D$.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=I$+this.cells.length+1+1,i=0,n=0;n<this.cells.length;n++)i+=this.cells[n].length;var r=new Int32Array(t+i+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;for(var o=t,a=0;a<e.length;a++){var s=e[a];r[I$+a]=o,r.set(s,o),o+=s.length}return r[I$+e.length]=o,r.set(this.keys,o),o+=this.keys.length,r[I$+e.length+1]=o,r.set(this.bboxes,o),o+=this.bboxes.length,r.buffer},en.register("GridIndex",D$,{omit:["layers","patternFeatures"]});var B$,N$=(B$=!0,function(e,t){var i=B$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return B$=!1,i}),F$=N$(void 0,(function(){return F$.toString().search("(((.+)+)+)+$").toString().constructor(F$).search("(((.+)+)+)+$")}));F$();var U$=function(e,t,i){this.x=e.x,this.y=e.y,this.z=e.z,this.grid=t||new D$($o,16,0),this.featureIndexArray=i||new ga};function G$(e){for(var t=1/0,i=1/0,n=-1/0,r=-1/0,o=0,a=e;o<a.length;o+=1){var s=a[o];t=Math.min(t,s.x),i=Math.min(i,s.y),n=Math.max(n,s.x),r=Math.max(r,s.y)}return{minX:t,minY:i,maxX:n,maxY:r}}function z$(e,t){return t-e}function V$(e,t,i){if(wa(i)&&i.realtime&&wa(i.zoom)){var n=i.zoom-e,r=$o/(t*Math.pow(2,n));return r*=t/512}return $o/t}U$.prototype.insert=function(e,t,i,n,r,o,a){var s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(i,n,r);var l=this.grid;a=a||0;for(var u=0;u<t.length;u++){for(var c=t[u],h=[1/0,1/0,-1/0,-1/0],d=0;d<c.length;d++){var f=c[d];h[0]=Math.min(h[0],f.x),h[1]=Math.min(h[1],f.y),h[2]=Math.max(h[2],f.x),h[3]=Math.max(h[3],f.y)}h[0]<$o&&h[1]<$o&&h[2]>=0&&h[3]>=0&&l.insert(s,h[0]-a,h[1]-a,h[2]+a,h[3]+a)}},U$.prototype.loadVTLayers=function(){return!this.vtLayers&&(this.vtLayers=new S$(new hx(this.rawTileData)).layers,this.sourceLayerCoder=new L$(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},U$.prototype.query=function(e,t,i){var n=this;this.loadVTLayers();var r=e.params||{},o=V$(this.z,e.tileSize,r),a=Br.createFilter(r.filter),s=e.queryGeometry,l=5,u=G$(s),c=[];wa(r.selectTolerance)&&(l+=o*r.selectTolerance),(c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l)).sort(z$);for(var h,d={},f=function(i){var l=c[i];if(l!==h){h=l;var u=n.featureIndexArray.get(l),f=null;n.loadMatchingFeature(d,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,a,r.layers,t,(function(t,i){return!f&&(f=So(t)),i.queryIntersectsFeature(s,t,{},f,n.z,e.transform,o,e.pixelPosMatrix,e.adjustScale)}))}},p=0;p<c.length;p++)f(p);return d},U$.prototype.loadMatchingFeature=function(e,t,i,n,r,o,a,s){if(wa(t)&&wa(i)&&wa(n)){var l=this.bucketLayerIDs[t];if(!o||Fh(o,l)){var u=this.sourceLayerCoder.decode(i),c=this.vtLayers[u].feature(n);if(r(new go(this.z),c))for(var h=0;h<l.length;h++){var d=l[h];if(!(o&&o.indexOf(d)<0)){var f=a[d];if(f){var p=!s||s(c,f);if(p){c.layer=f.serialize();var _=e[d];void 0===_&&(_=e[d]=[]),_.push({featureIndex:n,feature:c,intersectionZ:p})}}}}}}},U$.prototype.lookupSymbolFeatures=function(e,t,i,n,r,o){var a={};this.loadVTLayers();for(var s=createFilter(n),l=0,u=e;l<u.length;l+=1){var c=u[l];this.loadMatchingFeature(a,t,i,c,s,r,o)}return a},U$.prototype.hasLayer=function(e){for(var t=0,i=this.bucketLayerIDs;t<i.length;t+=1)for(var n=0,r=i[t];n<r.length;n+=1)if(e===r[n])return!0;return!1},en.register("FeatureIndex",U$,{omit:["rawTileData","sourceLayerCoder","vtLayers"]});var k$,W$=(k$=!0,function(e,t){var i=k$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return k$=!1,i}),H$=W$(void 0,(function(){return H$.toString().search("(((.+)+)+)+$").toString().constructor(H$).search("(((.+)+)+)+$")}));H$();var q$=1,j$=function(e){var t={},i=[];for(var n in e){var r=e[n],o=t[n]={};for(var a in r){var s=r[+a];if(s&&0!==s.bitmap.width&&0!==s.bitmap.height){var l={x:0,y:0,w:s.bitmap.width+2*q$,h:s.bitmap.height+2*q$};i.push(l),o[a]={rect:l,metrics:s.metrics}}}}var u=f(i),c=u.w,h=u.h,d=new rx({width:c||1,height:h||1});for(var p in e){var _=e[p];for(var m in _){var g=_[+m];if(g&&0!==g.bitmap.width&&0!==g.bitmap.height){var x=t[p][m].rect;rx.copy(g.bitmap,d,{x:0,y:0},{x:x.x+q$,y:x.y+q$},g.bitmap)}}}this.image=d,this.positions=t};en.register("GlyphAtlas",j$);var Y$,X$=(Y$=!0,function(e,t){var i=Y$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Y$=!1,i}),K$=X$(void 0,(function(){return K$.toString().search("(((.+)+)+)+$").toString().constructor(K$).search("(((.+)+)+)+$")}));function Q$(e){this.uid=e.uid,this.source=e.source,this.showCollisionBoxes=!1,this.zoom=e.tileID.z}function Z$(e,t,i){for(var n=new go(t),r=0,o=e;r<o.length;r+=1)o[r].recalculate(n,i)}K$(),en.register("FeatureIndex",U$,{omit:["rawTileData","sourceLayerCoder"]}),Q$.prototype.parse=function(e,t,i,n,r,o){try{this.status="parsing",this.data=t,this.collisionBoxArray=new sa,this.tileID=e.tileID;var a=e.featureIndex;!wa(a)&&((a=new U$(e.tileID)).bucketLayerIDs=[]);var s={},l=new L$(Object.keys(t.layers).sort()),u={},c={featureIndex:a,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:n};for(var h in i.familiesBySource){var d=i.familiesBySource[h];for(var f in d){var p=t.layers[f];if(p){for(var _=l.encode(f),m=[],g=0;g<p.length;g++){var v=p.feature(g);m.push({feature:v,index:g,sourceLayerIndex:_,sourceLayerId:f})}for(var y=0,$=d[f];y<$.length;y+=1){var b=$[y],T=b[0];if("circle"!==T.type&&!(T.minzoom&&this.zoom<Math.floor(T.minzoom)||T.maxzoom&&this.zoom>=T.maxzoom||"none"===T.visibility)){Z$(b,0,n);var C=T.id,S=u[C]=T.createBucket({index:a.bucketLayerIDs.length,layers:b,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_,webgpu:e.webgpu});wa(e.indexData)&&wa(e.indexData[T.id])&&(c.indexData=e.indexData[T.id]),S.populate(m,c),a.bucketLayerIDs.push(b.map((function(e){return e.id})))}}}}}let w,E,P,A;const L=Dh(c.glyphDependencies,(e=>Object.keys(e).map(Number)));Object.keys(L).length?r.send("getGlyphs",{uid:0,stacks:L},((e,t)=>{!w&&(w=e,E=t,O.call(this))})):E={};const M=Object.keys(c.iconDependencies);M.length?r.send("getImages",{icons:M,source:this.source,tileID:this.tileID,type:"icons"},((e,t)=>{!w&&(w=e,P=t,O.call(this))})):P={};const R=Object.keys(c.patternDependencies);function O(){if(w)return o(w);if(E&&P&&A){const n=new j$(E),r=new x(P,A);for(var t in u){var i=u[t];i instanceof Gy?(i.layers[0].layout,my(i,E,n.positions,P,r.iconPositions,this.showCollisionBoxes)):i.hasPattern&&(i instanceof $m||i instanceof im)&&i.addFeatures(c,r.patternPositions)}s.buckets=u,s.imageAtlas=r,s.glyphAtlasImage=n.image,s.featureIndex=a,s.pickId=e.pickId,this.status="done",o(null,s)}}R.length?r.send("getImages",{icons:R,source:this.source,tileID:this.tileID,type:"patterns"},((e,t)=>{!w&&(w=e,A=t,O.call(this))})):A={},O.call(this)}catch(I){console.log(I)}};const J$=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),eb=J$(void 0,(function(){return eb.toString().search("(((.+)+)+)+$").toString().constructor(eb).search("(((.+)+)+)+$")}));function tb(e,t){const i=Vg(e.request,((e,i,n,r)=>{e?t(e):i&&t(null,{vectorTile:new S$(new hx(i)),rawData:i,cacheControl:n,expires:r})}));return()=>{i.cancel(),t()}}eb();class ib{constructor(e,t,i,n){this.actor=e,this.layerIndex=t,this.availableImages=i,this.loadVectorData=n||tb,this.loading={},this.loaded={}}loadTile(e,t){const i=e.uid;this.loading||(this.loading={});const n=this.loading[i]=new Q$(e);n.abort=this.loadVectorData(e,((r,o)=>{if(delete this.loading[i],r||!o)return n.status="done",this.loaded[i]=n,t(r);const a=o.rawData,s={};o.expires&&(s.expires=o.expires),o.cacheControl&&(s.cacheControl=o.cacheControl);const l={};n.vectorTile=o.vectorTile,n.parse(e,o.vectorTile,this.layerIndex,this.availableImages,this.actor,((e,i)=>{if(e||!i)return t(e);t(null,Oh({rawTileData:a.slice(0)},i,s,l))})),this.loaded=this.loaded||{},this.loaded[i]=n}))}reloadTile(e,t){const i=this.loaded,n=e.uid,r=this;if(i&&i[n]){const o=i[n];o.showCollisionBoxes=e.showCollisionBoxes;const a=(i,n)=>{const a=o.reloadCallback;a&&(delete o.reloadCallback,o.parse(e,o.vectorTile,r.layerIndex,this.availableImages,r.actor,a)),t(i,n)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(e,o.vectorTile,this.layerIndex,this.availableImages,this.actor,a):a())}}abortTile(e,t){const i=this.loading,n=e.uid;i&&i[n]&&i[n].abort&&(i[n].abort(),delete i[n]),t()}removeTile(e,t){const i=this.loaded,n=e.uid;i&&i[n]&&delete i[n],t()}}const nb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),rb=nb(void 0,(function(){return rb.toString().search("(((.+)+)+)+$").toString().constructor(rb).search("(((.+)+)+)+$")}));rb();class ob{constructor(e){this.self=e,this.actor=new dn(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:ib},this.workerSources={},this.demWorkerSources={}}setReferrer(e,t){this.referrer=t}setImages(e,t,i){this.availableImages[e]=t,i()}setLayers(e,t,i){this.getLayerIndex(e).replace(t),i()}updateLayers(e,t,i){this.getLayerIndex(e).update(t.layers,t.removedIds),i()}loadTile(e,t,i){this.getWorkerSource(e,t.type,t.source).loadTile(t,i)}reloadTile(e,t,i){this.getWorkerSource(e,t.type,t.source).reloadTile(t,i)}abortTile(e,t,i){this.getWorkerSource(e,t.type,t.source).abortTile(t,i)}removeTile(e,t,i){this.getWorkerSource(e,t.type,t.source).removeTile(t,i)}removeSource(e,t,i){if(!this.workerSources[e]||!this.workerSources[e][t.type]||!this.workerSources[e][t.type][t.source])return;const n=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==n.removeSource?n.removeSource(t,i):i()}loadWorkerSource(e,t,i){try{this.self.importScripts(t.url),i()}catch(e){i(e.toString())}}getAvailableImages(e){let t=this.availableImages[e];return!t&&(t=[]),t}getLayerIndex(e){let t=this.layerIndexes[e];return!t&&(t=this.layerIndexes[e]=new a$),t}getWorkerSource(e,t,i){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][i]){const n={send:(t,i,n)=>{this.actor.send(t,i,n,e)}};this.workerSources[e][t][i]=new this.workerSourceTypes[t](n,this.getLayerIndex(e),this.getAvailableImages(e))}return this.workerSources[e][t][i]}enforceCacheSizeLimit(e,t){Rg(t)}}"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new ob(self))},t="("+e+")()",window.mvtWorkerUrl=window.URL.createObjectURL(new Blob([t],{type:"text/javascript"}))},"function"==typeof define&&define.amd?define(factory):factory(),e$2b(Object.create)&&(t$16.prototype=Object.create(Error.prototype),t$16.prototype.constructor=t$16),t$16.prototype.toString=function(){var e=this.name+": "+this.message;return e$2b(this.stack)&&(e+="\n"+this.stack.toString()),e},t$16.throwInstantiationError=function(){throw new t$16("This function defines an interface and should not be called directly.")};var o$1q={};function p$1f(e){return e+" is required, actual value was undefined"}function t$15(e,t,i){return"Expected "+i+" to be typeof "+t+", actual typeof was "+e}function u$_(e,t){return e??t}o$1q.typeOf={},o$1q.defined=function(e,t){if(!e$2b(t))throw new t$16(p$1f(e))},o$1q.typeOf.func=function(e,t){if("function"!=typeof t)throw new t$16(t$15(typeof t,"function",e))},o$1q.typeOf.string=function(e,t){if("string"!=typeof t)throw new t$16(t$15(typeof t,"string",e))},o$1q.typeOf.number=function(e,t){if("number"!=typeof t)throw new t$16(t$15(typeof t,"number",e))},o$1q.typeOf.number.lessThan=function(e,t,i){if(o$1q.typeOf.number(e,t),t>=i)throw new t$16("Expected "+e+" to be less than "+i+", actual value was "+t)},o$1q.typeOf.number.lessThanOrEquals=function(e,t,i){if(o$1q.typeOf.number(e,t),t>i)throw new t$16("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},o$1q.typeOf.number.greaterThan=function(e,t,i){if(o$1q.typeOf.number(e,t),t<=i)throw new t$16("Expected "+e+" to be greater than "+i+", actual value was "+t)},o$1q.typeOf.number.greaterThanOrEquals=function(e,t,i){if(o$1q.typeOf.number(e,t),t<i)throw new t$16("Expected "+e+" to be greater than or equal to"+i+", actual value was "+t)},o$1q.typeOf.object=function(e,t){if("object"!=typeof t)throw new t$16(t$15(typeof t,"object",e))},o$1q.typeOf.bool=function(e,t){if("boolean"!=typeof t)throw new t$16(t$15(typeof t,"boolean",e))},o$1q.typeOf.number.equals=function(e,t,i,n){if(o$1q.typeOf.number(e,i),o$1q.typeOf.number(t,n),i!==n)throw new t$16(e+" must be equal to "+t+", the actual values are "+i+" and "+n)},u$_.EMPTY_OBJECT=Object.freeze({});var s$11=function(e){null==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};s$11.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++){e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0}},s$11.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i<this.N-this.M;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+this.M]^e>>>1^t[1&e];for(;i<this.N-1;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+(this.M-this.N)]^e>>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},s$11.prototype.random=function(){return this.genrand_int32()*(1/4294967296)};var e$2a={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536};e$2a.sign=u$_(Math.sign,(function(e){return 0===(e=+e)||e!=e?e:e>0?1:-1})),e$2a.signNotZero=function(e){return e<0?-1:1},e$2a.toSNorm=function(e,t){return t=u$_(t,255),Math.round((.5*e$2a.clamp(e,-1,1)+.5)*t)},e$2a.fromSNorm=function(e,t){return t=u$_(t,255),e$2a.clamp(e,0,t)/t*2-1},e$2a.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:e$2a.clamp((e-t)/i,0,1)},e$2a.sinh=u$_(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),e$2a.cosh=u$_(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),e$2a.lerp=function(e,t,i){return(1-i)*e+i*t},e$2a.PI=Math.PI,e$2a.ONE_OVER_PI=1/Math.PI,e$2a.PI_OVER_TWO=Math.PI/2,e$2a.PI_OVER_THREE=Math.PI/3,e$2a.PI_OVER_FOUR=Math.PI/4,e$2a.PI_OVER_SIX=Math.PI/6,e$2a.THREE_PI_OVER_TWO=3*Math.PI/2,e$2a.TWO_PI=2*Math.PI,e$2a.ONE_OVER_TWO_PI=1/(2*Math.PI),e$2a.RADIANS_PER_DEGREE=Math.PI/180,e$2a.DEGREES_PER_RADIAN=180/Math.PI,e$2a.RADIANS_PER_ARCSECOND=e$2a.RADIANS_PER_DEGREE/3600,e$2a.toRadians=function(e){if(!e$2b(e))throw new t$16("degrees is required.");return e*e$2a.RADIANS_PER_DEGREE},e$2a.toDegrees=function(e){if(!e$2b(e))throw new t$16("radians is required.");return e*e$2a.DEGREES_PER_RADIAN},e$2a.convertLongitudeRange=function(e){if(!e$2b(e))throw new t$16("angle is required.");var t=e$2a.TWO_PI,i=e-Math.floor(e/t)*t;return i<-Math.PI?i+t:i>=Math.PI?i-t:i},e$2a.clampToLatitudeRange=function(e){if(!e$2b(e))throw new t$16("angle is required.");return e$2a.clamp(e,-1*e$2a.PI_OVER_TWO,e$2a.PI_OVER_TWO)},e$2a.negativePiToPi=function(e){if(!e$2b(e))throw new t$16("angle is required.");return e$2a.zeroToTwoPi(e+e$2a.PI)-e$2a.PI},e$2a.zeroToTwoPi=function(e){if(!e$2b(e))throw new t$16("angle is required.");var t=e$2a.mod(e,e$2a.TWO_PI);return Math.abs(t)<e$2a.EPSILON14&&Math.abs(e)>e$2a.EPSILON14?e$2a.TWO_PI:t},e$2a.mod=function(e,t){if(!e$2b(e))throw new t$16("m is required.");if(!e$2b(t))throw new t$16("n is required.");return(e%t+t)%t},e$2a.equalsEpsilon=function(e,t,i,n){if(!e$2b(e))throw new t$16("left is required.");if(!e$2b(t))throw new t$16("right is required.");if(!e$2b(i))throw new t$16("relativeEpsilon is required.");n=u$_(n,i);var r=Math.abs(e-t);return r<=n||r<=i*Math.max(Math.abs(e),Math.abs(t))},e$2a.lessThan=function(e,t,i){if(!e$2b(e))throw new t$16("first is required.");if(!e$2b(t))throw new t$16("second is required.");if(!e$2b(i))throw new t$16("relativeEpsilon is required.");return e-t<-i},e$2a.lessThanOrEquals=function(e,t,i){if(!e$2b(e))throw new t$16("first is required.");if(!e$2b(t))throw new t$16("second is required.");if(!e$2b(i))throw new t$16("relativeEpsilon is required.");return e-t<i},e$2a.greaterThan=function(e,t,i){if(!e$2b(e))throw new t$16("first is required.");if(!e$2b(t))throw new t$16("second is required.");if(!e$2b(i))throw new t$16("relativeEpsilon is required.");return e-t>i},e$2a.greaterThanOrEquals=function(e,t,i){if(!e$2b(e))throw new t$16("first is required.");if(!e$2b(t))throw new t$16("second is required.");if(!e$2b(i))throw new t$16("relativeEpsilon is required.");return e-t>-i};var h$1a=[1];e$2a.factorial=function(e){if("number"!=typeof e||e<0)throw new t$16("A number greater than or equal to 0 is required.");var t=h$1a.length;if(e>=t)for(var i=h$1a[t-1],n=t;n<=e;n++){var r=i*n;h$1a.push(r),i=r}return h$1a[e]},e$2a.incrementWrap=function(e,t,i){if(i=u$_(i,0),!e$2b(e))throw new t$16("n is required.");if(t<=i)throw new t$16("maximumValue must be greater than minimumValue.");return++e>t&&(e=i),e},e$2a.isPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new t$16("A number greater than or equal to 0 is required.");return 0!==e&&0==(e&e-1)},e$2a.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new t$16("A number greater than or equal to 0 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},e$2a.clamp=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("min is required.");if(!e$2b(i))throw new t$16("max is required.");return e<t?t:e>i?i:e};var I$1z=new s$11;function o$1p(e,t,i){this.x=u$_(e,0),this.y=u$_(t,0),this.z=u$_(i,0)}e$2a.setRandomNumberSeed=function(e){if(!e$2b(e))throw new t$16("seed is required.");I$1z=new s$11(e)},e$2a.nextRandomNumber=function(){return I$1z.random()},e$2a.randomBetween=function(e,t){return e$2a.nextRandomNumber()*(t-e)+e},e$2a.acosClamped=function(e){if(!e$2b(e))throw new t$16("value is required.");return Math.acos(e$2a.clamp(e,-1,1))},e$2a.asinClamped=function(e){if(!e$2b(e))throw new t$16("value is required.");return Math.asin(e$2a.clamp(e,-1,1))},e$2a.chordLength=function(e,t){if(!e$2b(e))throw new t$16("angle is required.");if(!e$2b(t))throw new t$16("radius is required.");return 2*t*Math.sin(.5*e)},e$2a.logBase=function(e,t){if(!e$2b(e))throw new t$16("number is required.");if(!e$2b(t))throw new t$16("base is required.");return Math.log(e)/Math.log(t)},e$2a.cbrt=u$_(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t})),e$2a.log2=u$_(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),e$2a.fog=function(e,t){var i=e*t;return 1-Math.exp(-i*i)},e$2a.fastApproximateAtan=function(e){return o$1q.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},e$2a.fastApproximateAtan2=function(e,t){o$1q.typeOf.number("x",e),o$1q.typeOf.number("y",t);var i,n,r=Math.abs(e);i=Math.abs(t),n=Math.max(r,i);var o=(i=Math.min(r,i))/n;if(isNaN(o))throw new t$16("either x or y must be nonzero");return r=e$2a.fastApproximateAtan(o),r=Math.abs(t)>Math.abs(e)?e$2a.PI_OVER_TWO-r:r,r=e<0?e$2a.PI-r:r,r=t<0?-r:r},o$1p.fromSpherical=function(e,t){o$1q.typeOf.object("spherical",e),e$2b(t)||(t=new o$1p);var i=e.clock,n=e.cone,r=u$_(e.magnitude,1),o=r*Math.sin(n);return t.x=o*Math.cos(i),t.y=o*Math.sin(i),t.z=r*Math.cos(n),t},o$1p.fromElements=function(e,t,i,n){return e$2b(n)?(n.x=e,n.y=t,n.z=i,n):new o$1p(e,t,i)},o$1p.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new o$1p(e.x,e.y,e.z)},o$1p.fromCartesian4=o$1p.clone,o$1p.packedLength=3,o$1p.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.x,t[i++]=e.y,t[i]=e.z,t},o$1p.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new o$1p),i.x=e[t++],i.y=e[t++],i.z=e[t],i},o$1p.packArray=function(e,t){o$1q.defined("array",e);var i=e.length,n=3*i;if(e$2b(t)){if(!Array.isArray(t)&&t.length!==n)throw new t$16("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)o$1p.pack(e[r],t,3*r);return t},o$1p.unpackArray=function(e,t){if(o$1q.defined("array",e),o$1q.typeOf.number.greaterThanOrEquals("array.length",e.length,3),e.length%3!=0)throw new t$16("array length must be a multiple of 3.");var i=e.length;e$2b(t)?t.length=i/3:t=new Array(i/3);for(var n=0;n<i;n+=3){var r=n/3;t[r]=o$1p.unpack(e,n,t[r])}return t},o$1p.fromArray=o$1p.unpack,o$1p.maximumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z)},o$1p.minimumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z)},o$1p.minimumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i},o$1p.maximumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i},o$1p.magnitudeSquared=function(e){return o$1q.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z},o$1p.magnitude=function(e){return Math.sqrt(o$1p.magnitudeSquared(e))};var v$_=new o$1p;o$1p.distance=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1p.subtract(e,t,v$_),o$1p.magnitude(v$_)},o$1p.distanceSquared=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1p.subtract(e,t,v$_),o$1p.magnitudeSquared(v$_)},o$1p.normalize=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1p.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new t$16("normalized result is not a number");return t},o$1p.dot=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z},o$1p.multiplyComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i},o$1p.divideComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i},o$1p.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i},o$1p.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i},o$1p.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i},o$1p.divideByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i},o$1p.negate=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t},o$1p.abs=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var d$1u=new o$1p;o$1p.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),o$1p.multiplyByScalar(t,i,d$1u),n=o$1p.multiplyByScalar(e,1-i,n),o$1p.add(d$1u,n,n)};var u$Z=new o$1p,x$1o=new o$1p;o$1p.angleBetween=function(e,t){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1p.normalize(e,u$Z),o$1p.normalize(t,x$1o);var i=o$1p.dot(u$Z,x$1o),n=o$1p.magnitude(o$1p.cross(u$Z,x$1o,u$Z));return Math.atan2(n,i)};var S$13=new o$1p;o$1p.mostOrthogonalAxis=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1p.normalize(e,S$13);return o$1p.abs(i,i),t=i.x<=i.y?i.x<=i.z?o$1p.clone(o$1p.UNIT_X,t):o$1p.clone(o$1p.UNIT_Z,t):i.y<=i.z?o$1p.clone(o$1p.UNIT_Y,t):o$1p.clone(o$1p.UNIT_Z,t)},o$1p.projectVector=function(e,t,i){o$1q.defined("a",e),o$1q.defined("b",t),o$1q.defined("result",i);var n=o$1p.dot(e,t)/o$1p.dot(t,t);return o$1p.multiplyByScalar(t,n,i)},o$1p.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},o$1p.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]},o$1p.equalsEpsilon=function(e,t,i,n){return e===t||e$2b(e)&&e$2b(t)&&e$2a.equalsEpsilon(e.x,t.x,i,n)&&e$2a.equalsEpsilon(e.y,t.y,i,n)&&e$2a.equalsEpsilon(e.z,t.z,i,n)},o$1p.cross=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e.x,r=e.y,o=e.z,a=t.x,s=t.y,l=t.z,u=r*l-o*s,c=o*a-n*l,h=n*s-r*a;return i.x=u,i.y=c,i.z=h,i},o$1p.midpoint=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=.5*(e.x+t.x),i.y=.5*(e.y+t.y),i.z=.5*(e.z+t.z),i},o$1p.fromDegrees=function(e,t,i,n,r){return o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),e=e$2a.toRadians(e),t=e$2a.toRadians(t),o$1p.fromRadians(e,t,i,n,r)};var b$1n=new o$1p,z$15=new o$1p,q$1i=new o$1p(40680631590769,40680631590769,40408299984661.445);function e$29(e,t,i,n){this.x=u$_(e,0),this.y=u$_(t,0),this.z=u$_(i,0),this.w=u$_(n,0)}o$1p.fromRadians=function(e,t,i,n,r){o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),i=u$_(i,0);var o=e$2b(n)?n.radiiSquared:q$1i,a=Math.cos(t);b$1n.x=a*Math.cos(e),b$1n.y=a*Math.sin(e),b$1n.z=Math.sin(t),b$1n=o$1p.normalize(b$1n,b$1n),o$1p.multiplyComponents(o,b$1n,z$15);var s=Math.sqrt(o$1p.dot(b$1n,z$15));return z$15=o$1p.divideByScalar(z$15,s,z$15),b$1n=o$1p.multiplyByScalar(b$1n,i,b$1n),e$2b(r)||(r=new o$1p),o$1p.add(z$15,b$1n,r)},o$1p.fromDegreesArray=function(e,t,i){if(o$1q.defined("coordinates",e),e.length<2||e.length%2!=0)throw new t$16("the number of coordinates must be a multiple of 2 and at least 2");var n=e.length;e$2b(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var o=e[r],a=e[r+1],s=r/2;i[s]=o$1p.fromDegrees(o,a,0,t,i[s])}return i},o$1p.fromRadiansArray=function(e,t,i){if(o$1q.defined("coordinates",e),e.length<2||e.length%2!=0)throw new t$16("the number of coordinates must be a multiple of 2 and at least 2");var n=e.length;e$2b(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var o=e[r],a=e[r+1],s=r/2;i[s]=o$1p.fromRadians(o,a,0,t,i[s])}return i},o$1p.fromDegreesArrayHeights=function(e,t,i){if(o$1q.defined("coordinates",e),e.length<3||e.length%3!=0)throw new t$16("the number of coordinates must be a multiple of 3 and at least 3");var n=e.length;e$2b(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var o=e[r],a=e[r+1],s=e[r+2],l=r/3;i[l]=o$1p.fromDegrees(o,a,s,t,i[l])}return i},o$1p.fromRadiansArrayHeights=function(e,t,i){if(o$1q.defined("coordinates",e),e.length<3||e.length%3!=0)throw new t$16("the number of coordinates must be a multiple of 3 and at least 3");var n=e.length;e$2b(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var o=e[r],a=e[r+1],s=e[r+2],l=r/3;i[l]=o$1p.fromRadians(o,a,s,t,i[l])}return i},o$1p.ZERO=Object.freeze(new o$1p(0,0,0)),o$1p.UNIT_X=Object.freeze(new o$1p(1,0,0)),o$1p.UNIT_Y=Object.freeze(new o$1p(0,1,0)),o$1p.UNIT_Z=Object.freeze(new o$1p(0,0,1)),o$1p.UNIT_XYZ=Object.freeze(new o$1p(1,1,1)),o$1p.prototype.clone=function(e){return o$1p.clone(this,e)},o$1p.prototype.equals=function(e){return o$1p.equals(this,e)},o$1p.prototype.equalsEpsilon=function(e,t,i){return o$1p.equalsEpsilon(this,e,t,i)},o$1p.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},o$1p.prototype.toArray=function(e,t){o$1p.pack(this,e,t)},o$1p.globalOffset=new o$1p(0,0,0),e$29.fromElements=function(e,t,i,n,r){return e$2b(r)?(r.x=e,r.y=t,r.z=i,r.w=n,r):new e$29(e,t,i,n)},e$29.fromColor=function(e,t){return o$1q.typeOf.object("color",e),e$2b(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new e$29(e.red,e.green,e.blue,e.alpha)},e$29.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new e$29(e.x,e.y,e.z,e.w)},e$29.packedLength=4,e$29.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},e$29.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new e$29),i.x=e[t++],i.y=e[t++],i.z=e[t++],i.w=e[t],i},e$29.packArray=function(e,t){o$1q.defined("array",e);var i=e.length,n=4*i;if(e$2b(t)){if(!Array.isArray(t)&&t.length!==n)throw new t$16("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)e$29.pack(e[r],t,4*r);return t},e$29.unpackArray=function(e,t){if(o$1q.defined("array",e),o$1q.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!=0)throw new t$16("array length must be a multiple of 4.");var i=e.length;e$2b(t)?t.length=i/4:t=new Array(i/4);for(var n=0;n<i;n+=4){var r=n/4;t[r]=e$29.unpack(e,n,t[r])}return t},e$29.fromArray=e$29.unpack,e$29.maximumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)},e$29.minimumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)},e$29.minimumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i.w=Math.min(e.w,t.w),i},e$29.maximumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i.w=Math.max(e.w,t.w),i},e$29.magnitudeSquared=function(e){return o$1q.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},e$29.magnitude=function(e){return Math.sqrt(e$29.magnitudeSquared(e))};var b$1m=new e$29;e$29.distance=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e$29.subtract(e,t,b$1m),e$29.magnitude(b$1m)},e$29.distanceSquared=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e$29.subtract(e,t,b$1m),e$29.magnitudeSquared(b$1m)},e$29.normalize=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=e$29.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t.w=e.w/i,isNaN(t.x)||isNaN(t.y)||isNaN(t.z)||isNaN(t.w))throw new t$16("normalized result is not a number");return t},e$29.dot=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},e$29.multiplyComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i.w=e.w*t.w,i},e$29.divideComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i.w=e.w/t.w,i},e$29.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},e$29.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},e$29.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},e$29.divideByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},e$29.negate=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},e$29.abs=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var j$1i=new e$29;e$29.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),e$29.multiplyByScalar(t,i,j$1i),n=e$29.multiplyByScalar(e,1-i,n),e$29.add(j$1i,n,n)};var h$19=new e$29;e$29.mostOrthogonalAxis=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=e$29.normalize(e,h$19);return e$29.abs(i,i),t=i.x<=i.y?i.x<=i.z?i.x<=i.w?e$29.clone(e$29.UNIT_X,t):e$29.clone(e$29.UNIT_W,t):i.z<=i.w?e$29.clone(e$29.UNIT_Z,t):e$29.clone(e$29.UNIT_W,t):i.y<=i.z?i.y<=i.w?e$29.clone(e$29.UNIT_Y,t):e$29.clone(e$29.UNIT_W,t):i.z<=i.w?e$29.clone(e$29.UNIT_Z,t):e$29.clone(e$29.UNIT_W,t)},e$29.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},e$29.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]&&e.w===t[i+3]},e$29.equalsEpsilon=function(e,t,i,n){return e===t||e$2b(e)&&e$2b(t)&&e$2a.equalsEpsilon(e.x,t.x,i,n)&&e$2a.equalsEpsilon(e.y,t.y,i,n)&&e$2a.equalsEpsilon(e.z,t.z,i,n)&&e$2a.equalsEpsilon(e.w,t.w,i,n)},e$29.ZERO=Object.freeze(new e$29(0,0,0,0)),e$29.UNIT_X=Object.freeze(new e$29(1,0,0,0)),e$29.UNIT_Y=Object.freeze(new e$29(0,1,0,0)),e$29.UNIT_Z=Object.freeze(new e$29(0,0,1,0)),e$29.UNIT_W=Object.freeze(new e$29(0,0,0,1)),e$29.prototype.clone=function(e){return e$29.clone(this,e)},e$29.prototype.equals=function(e){return e$29.equals(this,e)},e$29.prototype.equalsEpsilon=function(e,t,i){return e$29.equalsEpsilon(this,e,t,i)},e$29.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var i$1f=new Float32Array(1),z$14=256,T$1g=65536,N$$=16777216,_$18=1/z$14,M$1e=1/T$1g,d$1t=1/N$$,O$Y=38;e$29.packFloat=function(e,t){if(o$1q.typeOf.number("value",e),e$2b(t)||(t=new e$29),i$1f[0]=e,0===(e=i$1f[0]))return e$29.clone(e$29.ZERO,t);var i,n=e<0?1:0;isFinite(e)?(e=Math.abs(e),i=Math.floor(e$2a.logBase(e,10))+1,e/=Math.pow(10,i)):(e=.1,i=O$Y);var r=e*z$14;return t.x=Math.floor(r),r=(r-t.x)*z$14,t.y=Math.floor(r),r=(r-t.y)*z$14,t.z=Math.floor(r),t.w=2*(i+O$Y)+n,t},e$29.unpackFloat=function(e){o$1q.typeOf.object("packedFloat",e);var t=e.w/2,i=Math.floor(t),n=2*(t-i);if(n=-(n=2*n-1),(i-=O$Y)>=O$Y)return n<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var r=n*e.x*_$18;return r+=n*e.y*M$1e,(r+=n*e.z*d$1t)*Math.pow(10,i)},e$29.prototype.toArray=function(e,t){e$29.pack(this,e,t)};var F$1m=new o$1p,L$1j=new o$1p;function P$1e(e,t,i,n,r){if(!e$2b(e))throw new t$16("cartesian is required.");if(!e$2b(t))throw new t$16("oneOverRadii is required.");if(!e$2b(i))throw new t$16("oneOverRadiiSquared is required.");if(!e$2b(n))throw new t$16("centerToleranceSquared is required.");var o=e.x,a=e.y,s=e.z,l=t.x,u=t.y,c=t.z,h=o*o*l*l,d=a*a*u*u,f=s*s*c*c,p=h+d+f,_=Math.sqrt(1/p),m=o$1p.multiplyByScalar(e,_,F$1m);if(p<n)return isFinite(_)?o$1p.clone(m,r):void 0;var g=i.x,x=i.y,v=i.z,y=L$1j;y.x=m.x*g*2,y.y=m.y*x*2,y.z=m.z*v*2;var $,b,T,C,S,w,E,P=(1-_)*o$1p.magnitude(e)/(.5*o$1p.magnitude(y)),A=0;do{A=($=h*(S=(b=1/(1+(P-=A)*g))*b)+d*(w=(T=1/(1+P*x))*T)+f*(E=(C=1/(1+P*v))*C)-1)/(-2*(h*(S*b)*g+d*(w*T)*x+f*(E*C)*v))}while(Math.abs($)>e$2a.EPSILON12);return e$2b(r)?(r.x=o*b,r.y=a*T,r.z=s*C,r):new o$1p(o*b,a*T,s*C)}function a$18(e,t,i){this.longitude=u$_(e,0),this.latitude=u$_(t,0),this.height=u$_(i,0)}a$18.fromRadians=function(e,t,i,n){return o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),i=u$_(i,0),e$2b(n)?(n.longitude=e,n.latitude=t,n.height=i,n):new a$18(e,t,i)},a$18.fromDegrees=function(e,t,i,n){return o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),e=e$2a.toRadians(e),t=e$2a.toRadians(t),a$18.fromRadians(e,t,i,n)};var g$1k=new o$1p,l$1i=new o$1p,w$18=new o$1p,b$1l=new o$1p(1/6378137,1/6378137,1/6356752.314245179),y$15=new o$1p(1/40680631590769,1/40680631590769,1/40408299984661.445),C$1h=e$2a.EPSILON1;function p$1e(e,t,i,n,r,o,a,s,l){this[0]=u$_(e,0),this[1]=u$_(n,0),this[2]=u$_(a,0),this[3]=u$_(t,0),this[4]=u$_(r,0),this[5]=u$_(s,0),this[6]=u$_(i,0),this[7]=u$_(o,0),this[8]=u$_(l,0),this.isMatrix3=!0}a$18.fromCartesian=function(e,t,i){var n=e$2b(t)?t.oneOverRadii:b$1l,r=e$2b(t)?t.oneOverRadiiSquared:y$15,o=P$1e(e,n,r,e$2b(t)?t._centerToleranceSquared:C$1h,l$1i);if(e$2b(o)){var a=o$1p.multiplyComponents(o,r,g$1k);a=o$1p.normalize(a,a);var s=o$1p.subtract(e,o,w$18),l=Math.atan2(a.y,a.x),u=Math.asin(a.z),c=e$2a.sign(o$1p.dot(s,e))*o$1p.magnitude(s);return e$2b(i)?(i.longitude=l,i.latitude=u,i.height=c,i):new a$18(l,u,c)}},a$18.toCartesian=function(e,t,i){return o$1q.defined("cartographic",e),o$1p.fromRadians(e.longitude,e.latitude,e.height,t,i)},a$18.sphericalDistance=function(e,t,i,n){if(o$1q.defined("longitudeA",e),o$1q.defined("longitudeB",i),o$1q.defined("latitudeA",t),o$1q.defined("latitudeB",n),e===i&&t===n)return 0;var r=e$2a.toRadians(t),o=e$2a.toRadians(n),a=e$2a.toRadians(e),s=e$2a.toRadians(i),l=a*a+r*r,u=s*s+o*o,c=(l+u-((a-s)*(a-s)+(r-o)*(r-o)))/(2*Math.sqrt(l)*Math.sqrt(u));return c=e$2a.clamp(c,-1,1),6378137*Math.acos(c)},a$18.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new a$18(e.longitude,e.latitude,e.height)},a$18.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},a$18.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},a$18.ZERO=Object.freeze(new a$18(0,0,0)),a$18.prototype.clone=function(e){return a$18.clone(this,e)},a$18.prototype.equals=function(e){return a$18.equals(this,e)},a$18.prototype.equalsEpsilon=function(e,t){return a$18.equalsEpsilon(this,e,t)},a$18.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},p$1e.packedLength=9,p$1e.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t},p$1e.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new p$1e),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i},p$1e.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new p$1e(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},p$1e.fromArray=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new p$1e),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i[4]=e[t+4],i[5]=e[t+5],i[6]=e[t+6],i[7]=e[t+7],i[8]=e[t+8],i},p$1e.fromColumnMajorArray=function(e,t){return o$1q.defined("values",e),p$1e.clone(e,t)},p$1e.fromRowMajorArray=function(e,t){return o$1q.defined("values",e),e$2b(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new p$1e(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},p$1e.fromQuaternion=function(e,t){o$1q.typeOf.object("quaternion",e);var i=e.x*e.x,n=e.x*e.y,r=e.x*e.z,o=e.x*e.w,a=e.y*e.y,s=e.y*e.z,l=e.y*e.w,u=e.z*e.z,c=e.z*e.w,h=e.w*e.w,d=i-a-u+h,f=2*(n-c),p=2*(r+l),_=2*(n+c),m=-i+a-u+h,g=2*(s-o),x=2*(r-l),v=2*(s+o),y=-i-a+u+h;return e$2b(t)?(t[0]=d,t[1]=_,t[2]=x,t[3]=f,t[4]=m,t[5]=v,t[6]=p,t[7]=g,t[8]=y,t):new p$1e(d,f,p,_,m,g,x,v,y)},p$1e.fromHeadingPitchRoll=function(e,t){o$1q.typeOf.object("headingPitchRoll",e);var i=Math.cos(-e.pitch),n=Math.cos(-e.heading),r=Math.cos(e.roll),o=Math.sin(-e.pitch),a=Math.sin(-e.heading),s=Math.sin(e.roll),l=i*n,u=-r*a+s*o*n,c=s*a+r*o*n,h=i*a,d=r*n+s*o*a,f=-s*n+r*o*a,p=-o,_=s*i,m=r*i;return e$2b(t)?(t[0]=l,t[1]=h,t[2]=p,t[3]=u,t[4]=d,t[5]=_,t[6]=c,t[7]=f,t[8]=m,t):new p$1e(l,u,c,h,d,f,p,_,m)},p$1e.fromScale=function(e,t){return o$1q.typeOf.object("scale",e),e$2b(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new p$1e(e.x,0,0,0,e.y,0,0,0,e.z)},p$1e.fromUniformScale=function(e,t){return o$1q.typeOf.number("scale",e),e$2b(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new p$1e(e,0,0,0,e,0,0,0,e)},p$1e.fromCrossProduct=function(e,t){return o$1q.typeOf.object("vector",e),e$2b(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new p$1e(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},p$1e.fromRotationX=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2b(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=i,t[5]=n,t[6]=0,t[7]=-n,t[8]=i,t):new p$1e(1,0,0,0,i,-n,0,n,i)},p$1e.fromRotationY=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2b(t)?(t[0]=i,t[1]=0,t[2]=-n,t[3]=0,t[4]=1,t[5]=0,t[6]=n,t[7]=0,t[8]=i,t):new p$1e(i,0,n,0,1,0,-n,0,i)},p$1e.fromRotationZ=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2b(t)?(t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new p$1e(i,-n,0,n,i,0,0,0,1)},p$1e.toArray=function(e,t){return o$1q.typeOf.object("matrix",e),e$2b(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},p$1e.getElementIndex=function(e,t){return o$1q.typeOf.number.greaterThanOrEquals("row",t,0),o$1q.typeOf.number.lessThanOrEquals("row",t,2),o$1q.typeOf.number.greaterThanOrEquals("column",e,0),o$1q.typeOf.number.lessThanOrEquals("column",e,2),3*e+t},p$1e.getColumn=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("result",i);var n=3*t,r=e[n],o=e[n+1],a=e[n+2];return i.x=r,i.y=o,i.z=a,i},p$1e.setColumn=function(e,t,i,n){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n);var r=3*t;return(n=p$1e.clone(e,n))[r]=i.x,n[r+1]=i.y,n[r+2]=i.z,n},p$1e.getRow=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("result",i);var n=e[t],r=e[t+3],o=e[t+6];return i.x=n,i.y=r,i.z=o,i},p$1e.setRow=function(e,t,i,n){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n),(n=p$1e.clone(e,n))[t]=i.x,n[t+3]=i.y,n[t+6]=i.z,n};var W$1d=new o$1p;p$1e.getScale=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=o$1p.magnitude(o$1p.fromElements(e[0],e[1],e[2],W$1d)),t.y=o$1p.magnitude(o$1p.fromElements(e[3],e[4],e[5],W$1d)),t.z=o$1p.magnitude(o$1p.fromElements(e[6],e[7],e[8],W$1d)),t};var A$1m=new o$1p;p$1e.getMaximumScale=function(e){return p$1e.getScale(e,A$1m),o$1p.maximumComponent(A$1m)},p$1e.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],r=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],o=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],a=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],s=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],l=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],u=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],c=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],h=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return i[0]=n,i[1]=r,i[2]=o,i[3]=a,i[4]=s,i[5]=l,i[6]=u,i[7]=c,i[8]=h,i},p$1e.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i},p$1e.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i},p$1e.multiplyByVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[3]*r+e[6]*o,s=e[1]*n+e[4]*r+e[7]*o,l=e[2]*n+e[5]*r+e[8]*o;return i.x=a,i.y=s,i.z=l,i},p$1e.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i},p$1e.multiplyByScale=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.x,i[3]=e[3]*t.y,i[4]=e[4]*t.y,i[5]=e[5]*t.y,i[6]=e[6]*t.z,i[7]=e[7]*t.z,i[8]=e[8]*t.z,i},p$1e.negate=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},p$1e.transpose=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[3],r=e[6],o=e[1],a=e[4],s=e[7],l=e[2],u=e[5],c=e[8];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=s,t[6]=l,t[7]=u,t[8]=c,t};var F$1l=new o$1p(1,1,1);function X$18(e){for(var t=0,i=0;i<9;++i){var n=e[i];t+=n*n}return Math.sqrt(t)}p$1e.getRotation=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=o$1p.divideComponents(F$1l,p$1e.getScale(e,A$1m),A$1m);return t=p$1e.multiplyByScale(e,i,t)};var D$17=[1,0,0],k$1c=[2,2,1];function H$1d(e){for(var t=0,i=0;i<3;++i){var n=e[p$1e.getElementIndex(k$1c[i],D$17[i])];t+=2*n*n}return Math.sqrt(t)}function Q$1a(e,t){for(var i=e$2a.EPSILON15,n=0,r=1,o=0;o<3;++o){var a=Math.abs(e[p$1e.getElementIndex(k$1c[o],D$17[o])]);a>n&&(r=o,n=a)}var s=1,l=0,u=D$17[r],c=k$1c[r];if(Math.abs(e[p$1e.getElementIndex(c,u)])>i){var h,d=(e[p$1e.getElementIndex(c,c)]-e[p$1e.getElementIndex(u,u)])/2/e[p$1e.getElementIndex(c,u)];l=(h=d<0?-1/(-d+Math.sqrt(1+d*d)):1/(d+Math.sqrt(1+d*d)))*(s=1/Math.sqrt(1+h*h))}return(t=p$1e.clone(p$1e.IDENTITY,t))[p$1e.getElementIndex(u,u)]=t[p$1e.getElementIndex(c,c)]=s,t[p$1e.getElementIndex(c,u)]=l,t[p$1e.getElementIndex(u,c)]=-l,t}var U$1g=new p$1e,V$18=new p$1e;function t$14(e){var t;this.name="RuntimeError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}function p$1d(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){this[0]=u$_(e,0),this[1]=u$_(r,0),this[2]=u$_(l,0),this[3]=u$_(d,0),this[4]=u$_(t,0),this[5]=u$_(o,0),this[6]=u$_(u,0),this[7]=u$_(f,0),this[8]=u$_(i,0),this[9]=u$_(a,0),this[10]=u$_(c,0),this[11]=u$_(p,0),this[12]=u$_(n,0),this[13]=u$_(s,0),this[14]=u$_(h,0),this[15]=u$_(_,0),this.isMatrix4=!0}p$1e.computeEigenDecomposition=function(e,t){o$1q.typeOf.object("matrix",e);var i=e$2a.EPSILON20,n=0,r=0;e$2b(t)||(t={});for(var o=t.unitary=p$1e.clone(p$1e.IDENTITY,t.unitary),a=t.diagonal=p$1e.clone(e,t.diagonal),s=i*X$18(a);r<10&&H$1d(a)>s;)Q$1a(a,U$1g),p$1e.transpose(U$1g,V$18),p$1e.multiply(a,U$1g,a),p$1e.multiply(V$18,a,a),p$1e.multiply(o,U$1g,o),++n>2&&(++r,n=0);return t},p$1e.abs=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},p$1e.determinant=function(e){o$1q.typeOf.object("matrix",e);var t=e[0],i=e[3],n=e[6],r=e[1],o=e[4],a=e[7],s=e[2],l=e[5],u=e[8];return t*(o*u-l*a)+r*(l*n-i*u)+s*(i*a-o*n)},p$1e.inverse=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=p$1e.determinant(e);if(Math.abs(h)<=e$2a.EPSILON15)throw new t$16("matrix is not invertible");t[0]=a*c-u*s,t[1]=u*r-n*c,t[2]=n*s-a*r,t[3]=l*s-o*c,t[4]=i*c-l*r,t[5]=o*r-i*s,t[6]=o*u-l*a,t[7]=l*n-i*u,t[8]=i*a-o*n;var d=1/h;return p$1e.multiplyByScalar(t,d,t)},p$1e.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},p$1e.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i},p$1e.IDENTITY=Object.freeze(new p$1e(1,0,0,0,1,0,0,0,1)),p$1e.ZERO=Object.freeze(new p$1e(0,0,0,0,0,0,0,0,0)),p$1e.COLUMN0ROW0=0,p$1e.COLUMN0ROW1=1,p$1e.COLUMN0ROW2=2,p$1e.COLUMN1ROW0=3,p$1e.COLUMN1ROW1=4,p$1e.COLUMN1ROW2=5,p$1e.COLUMN2ROW0=6,p$1e.COLUMN2ROW1=7,p$1e.COLUMN2ROW2=8,Object.defineProperties(p$1e.prototype,{length:{get:function(){return p$1e.packedLength}}}),p$1e.prototype.clone=function(e){return p$1e.clone(this,e)},p$1e.prototype.equals=function(e){return p$1e.equals(this,e)},p$1e.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]},p$1e.prototype.equalsEpsilon=function(e,t){return p$1e.equalsEpsilon(this,e,t)},p$1e.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},p$1e.prototype.toArray=function(e,t){p$1e.pack(this,e,t)},e$2b(Object.create)&&(t$14.prototype=Object.create(Error.prototype),t$14.prototype.constructor=t$14),t$14.prototype.toString=function(){var e=this.name+": "+this.message;return e$2b(this.stack)&&(e+="\n"+this.stack.toString()),e},p$1d.packedLength=16,p$1d.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t[i++]=e[9],t[i++]=e[10],t[i++]=e[11],t[i++]=e[12],t[i++]=e[13],t[i++]=e[14],t[i]=e[15],t},p$1d.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new p$1d),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i[9]=e[t++],i[10]=e[t++],i[11]=e[t++],i[12]=e[t++],i[13]=e[t++],i[14]=e[t++],i[15]=e[t],i},p$1d.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new p$1d(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])},p$1d.fromArray=p$1d.unpack,p$1d.fromColumnMajorArray=function(e,t){return o$1q.defined("values",e),p$1d.clone(e,t)},p$1d.fromRowMajorArray=function(e,t){return o$1q.defined("values",e),e$2b(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new p$1d(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},p$1d.fromRotationTranslation=function(e,t,i){return o$1q.typeOf.object("rotation",e),t=u$_(t,o$1p.ZERO),e$2b(i)?(i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=0,i[4]=e[3],i[5]=e[4],i[6]=e[5],i[7]=0,i[8]=e[6],i[9]=e[7],i[10]=e[8],i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,i):new p$1d(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)},p$1d.fromTranslationQuaternionRotationScale=function(e,t,i,n){o$1q.typeOf.object("translation",e),o$1q.typeOf.object("rotation",t),o$1q.typeOf.object("scale",i),e$2b(n)||(n=new p$1d);var r=i.x,o=i.y,a=i.z,s=t.x*t.x,l=t.x*t.y,u=t.x*t.z,c=t.x*t.w,h=t.y*t.y,d=t.y*t.z,f=t.y*t.w,p=t.z*t.z,_=t.z*t.w,m=t.w*t.w,g=s-h-p+m,x=2*(l-_),v=2*(u+f),y=2*(l+_),$=-s+h-p+m,b=2*(d-c),T=2*(u-f),C=2*(d+c),S=-s-h+p+m;return n[0]=g*r,n[1]=y*r,n[2]=T*r,n[3]=0,n[4]=x*o,n[5]=$*o,n[6]=C*o,n[7]=0,n[8]=v*a,n[9]=b*a,n[10]=S*a,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n},p$1d.fromTranslationRotationScale=function(e,t){return o$1q.typeOf.object("translationRotationScale",e),p$1d.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},p$1d.fromTranslation=function(e,t){return o$1q.typeOf.object("translation",e),p$1d.fromRotationTranslation(p$1e.IDENTITY,e,t)},p$1d.fromScale=function(e,t){return o$1q.typeOf.object("scale",e),e$2b(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new p$1d(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},p$1d.fromUniformScale=function(e,t){return o$1q.typeOf.number("scale",e),e$2b(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new p$1d(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};var $$1b=new o$1p,I$1y=new o$1p,i$1e=new o$1p;p$1d.fromCamera=function(e,t){o$1q.typeOf.object("camera",e);var i=e.position,n=e.direction,r=e.up;o$1q.typeOf.object("camera.position",i),o$1q.typeOf.object("camera.direction",n),o$1q.typeOf.object("camera.up",r),o$1p.normalize(n,$$1b),o$1p.normalize(o$1p.cross($$1b,r,I$1y),I$1y),o$1p.normalize(o$1p.cross(I$1y,$$1b,i$1e),i$1e);var o=I$1y.x,a=I$1y.y,s=I$1y.z,l=$$1b.x,u=$$1b.y,c=$$1b.z,h=i$1e.x,d=i$1e.y,f=i$1e.z,p=i.x,_=i.y,m=i.z,g=o*-p+a*-_+s*-m,x=h*-p+d*-_+f*-m,v=l*p+u*_+c*m;return e$2b(t)?(t[0]=o,t[1]=h,t[2]=-l,t[3]=0,t[4]=a,t[5]=d,t[6]=-u,t[7]=0,t[8]=s,t[9]=f,t[10]=-c,t[11]=0,t[12]=g,t[13]=x,t[14]=v,t[15]=1,t):new p$1d(o,a,s,g,h,d,f,x,-l,-u,-c,v,0,0,0,1)},p$1d.computePerspectiveFieldOfView=function(e,t,i,n,r){o$1q.typeOf.number.greaterThan("fovY",e,0),o$1q.typeOf.number.lessThan("fovY",e,Math.PI),o$1q.typeOf.number.greaterThan("near",i,0),o$1q.typeOf.number.greaterThan("far",n,0),o$1q.typeOf.object("result",r);var o=1/Math.tan(.5*e),a=o/t,s=(n+i)/(i-n),l=2*n*i/(i-n);return r[0]=a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=o,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=s,r[11]=-1,r[12]=0,r[13]=0,r[14]=l,r[15]=0,r},p$1d.computeOrthographicOffCenter=function(e,t,i,n,r,o,a){o$1q.typeOf.number("left",e),o$1q.typeOf.number("right",t),o$1q.typeOf.number("bottom",i),o$1q.typeOf.number("top",n),o$1q.typeOf.number("near",r),o$1q.typeOf.number("far",o),o$1q.typeOf.object("result",a);var s=1/(t-e),l=1/(n-i),u=1/(o-r),c=-(t+e)*s,h=-(n+i)*l,d=-(o+r)*u;return s*=2,l*=2,u*=-2,a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=u,a[11]=0,a[12]=c,a[13]=h,a[14]=d,a[15]=1,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,a,a),a},p$1d.computePerspectiveOffCenter=function(e,t,i,n,r,o,a){o$1q.typeOf.number("left",e),o$1q.typeOf.number("right",t),o$1q.typeOf.number("bottom",i),o$1q.typeOf.number("top",n),o$1q.typeOf.number("near",r),o$1q.typeOf.number("far",o),o$1q.typeOf.object("result",a);var s=2*r/(t-e),l=2*r/(n-i),u=(t+e)/(t-e),c=(n+i)/(n-i),h=-(o+r)/(o-r),d=-2*o*r/(o-r);return a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=u,a[9]=c,a[10]=h,a[11]=-1,a[12]=0,a[13]=0,a[14]=d,a[15]=0,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,a,a),a},p$1d.computeInfinitePerspectiveOffCenter=function(e,t,i,n,r,o){o$1q.typeOf.number("left",e),o$1q.typeOf.number("right",t),o$1q.typeOf.number("bottom",i),o$1q.typeOf.number("top",n),o$1q.typeOf.number("near",r),o$1q.typeOf.object("result",o);var a=2*r/(t-e),s=2*r/(n-i),l=(t+e)/(t-e),u=(n+i)/(n-i),c=-2*r;return o[0]=a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=l,o[9]=u,o[10]=-1,o[11]=-1,o[12]=0,o[13]=0,o[14]=c,o[15]=0,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,o,o),o},p$1d.computeViewportTransformation=function(e,t,i,n){o$1q.typeOf.object("result",n),e=u$_(e,u$_.EMPTY_OBJECT);var r=u$_(e.x,0),o=u$_(e.y,0),a=u$_(e.width,0),s=u$_(e.height,0);t=u$_(t,0);var l=.5*a,u=.5*s,c=.5*((i=u$_(i,1))-t),h=l,d=u,f=c,p=r+l,_=o+u,m=t+c;return n[0]=h,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=d,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=f,n[11]=0,n[12]=p,n[13]=_,n[14]=m,n[15]=1,n},p$1d.computeView=function(e,t,i,n,r){return o$1q.typeOf.object("position",e),o$1q.typeOf.object("direction",t),o$1q.typeOf.object("up",i),o$1q.typeOf.object("right",n),o$1q.typeOf.object("result",r),r[0]=n.x,r[1]=i.x,r[2]=-t.x,r[3]=0,r[4]=n.y,r[5]=i.y,r[6]=-t.y,r[7]=0,r[8]=n.z,r[9]=i.z,r[10]=-t.z,r[11]=0,r[12]=-o$1p.dot(n,e),r[13]=-o$1p.dot(i,e),r[14]=o$1p.dot(t,e),r[15]=1,r},p$1d.toArray=function(e,t){return o$1q.typeOf.object("matrix",e),e$2b(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},p$1d.getElementIndex=function(e,t){return o$1q.typeOf.number.greaterThanOrEquals("row",t,0),o$1q.typeOf.number.lessThanOrEquals("row",t,3),o$1q.typeOf.number.greaterThanOrEquals("column",e,0),o$1q.typeOf.number.lessThanOrEquals("column",e,3),4*e+t},p$1d.getColumn=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("result",i);var n=4*t,r=e[n],o=e[n+1],a=e[n+2],s=e[n+3];return i.x=r,i.y=o,i.z=a,i.w=s,i},p$1d.setColumn=function(e,t,i,n){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n);var r=4*t;return(n=p$1d.clone(e,n))[r]=i.x,n[r+1]=i.y,n[r+2]=i.z,n[r+3]=i.w,n},p$1d.setTranslation=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("translation",t),o$1q.typeOf.object("result",i),i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=e[15],i};var p0=new o$1p;p$1d.setScale=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i);var n=p$1d.getScale(e,p0),r=o$1p.divideComponents(t,n,p0);return p$1d.multiplyByScale(e,r,i)},p$1d.getRow=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("result",i);var n=e[t],r=e[t+4],o=e[t+8],a=e[t+12];return i.x=n,i.y=r,i.z=o,i.w=a,i},p$1d.setRow=function(e,t,i,n){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n),(n=p$1d.clone(e,n))[t]=i.x,n[t+4]=i.y,n[t+8]=i.z,n[t+12]=i.w,n};var O0=new o$1p;p$1d.getScale=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=o$1p.magnitude(o$1p.fromElements(e[0],e[1],e[2],O0)),t.y=o$1p.magnitude(o$1p.fromElements(e[4],e[5],e[6],O0)),t.z=o$1p.magnitude(o$1p.fromElements(e[8],e[9],e[10],O0)),t};var f0$1=new o$1p;p$1d.getMaximumScale=function(e){return p$1d.getScale(e,f0$1),o$1p.maximumComponent(f0$1)},p$1d.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=e[10],p=e[11],_=e[12],m=e[13],g=e[14],x=e[15],v=t[0],y=t[1],$=t[2],b=t[3],T=t[4],C=t[5],S=t[6],w=t[7],E=t[8],P=t[9],A=t[10],L=t[11],M=t[12],R=t[13],O=t[14],I=t[15],D=n*v+s*y+h*$+_*b,B=r*v+l*y+d*$+m*b,N=o*v+u*y+f*$+g*b,F=a*v+c*y+p*$+x*b,U=n*T+s*C+h*S+_*w,G=r*T+l*C+d*S+m*w,z=o*T+u*C+f*S+g*w,V=a*T+c*C+p*S+x*w,k=n*E+s*P+h*A+_*L,W=r*E+l*P+d*A+m*L,H=o*E+u*P+f*A+g*L,q=a*E+c*P+p*A+x*L,j=n*M+s*R+h*O+_*I,Y=r*M+l*R+d*O+m*I,X=o*M+u*R+f*O+g*I,K=a*M+c*R+p*O+x*I;return i[0]=D,i[1]=B,i[2]=N,i[3]=F,i[4]=U,i[5]=G,i[6]=z,i[7]=V,i[8]=k,i[9]=W,i[10]=H,i[11]=q,i[12]=j,i[13]=Y,i[14]=X,i[15]=K,i},p$1d.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i[9]=e[9]+t[9],i[10]=e[10]+t[10],i[11]=e[11]+t[11],i[12]=e[12]+t[12],i[13]=e[13]+t[13],i[14]=e[14]+t[14],i[15]=e[15]+t[15],i},p$1d.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i[9]=e[9]-t[9],i[10]=e[10]-t[10],i[11]=e[11]-t[11],i[12]=e[12]-t[12],i[13]=e[13]-t[13],i[14]=e[14]-t[14],i[15]=e[15]-t[15],i},p$1d.multiplyTransformation=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],c=e[9],h=e[10],d=e[12],f=e[13],p=e[14],_=t[0],m=t[1],g=t[2],x=t[4],v=t[5],y=t[6],$=t[8],b=t[9],T=t[10],C=t[12],S=t[13],w=t[14],E=n*_+a*m+u*g,P=r*_+s*m+c*g,A=o*_+l*m+h*g,L=n*x+a*v+u*y,M=r*x+s*v+c*y,R=o*x+l*v+h*y,O=n*$+a*b+u*T,I=r*$+s*b+c*T,D=o*$+l*b+h*T,B=n*C+a*S+u*w+d,N=r*C+s*S+c*w+f,F=o*C+l*S+h*w+p;return i[0]=E,i[1]=P,i[2]=A,i[3]=0,i[4]=L,i[5]=M,i[6]=R,i[7]=0,i[8]=O,i[9]=I,i[10]=D,i[11]=0,i[12]=B,i[13]=N,i[14]=F,i[15]=1,i},p$1d.multiplyByMatrix3=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("rotation",t),o$1q.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],c=e[9],h=e[10],d=t[0],f=t[1],p=t[2],_=t[3],m=t[4],g=t[5],x=t[6],v=t[7],y=t[8],$=n*d+a*f+u*p,b=r*d+s*f+c*p,T=o*d+l*f+h*p,C=n*_+a*m+u*g,S=r*_+s*m+c*g,w=o*_+l*m+h*g,E=n*x+a*v+u*y,P=r*x+s*v+c*y,A=o*x+l*v+h*y;return i[0]=$,i[1]=b,i[2]=T,i[3]=0,i[4]=C,i[5]=S,i[6]=w,i[7]=0,i[8]=E,i[9]=P,i[10]=A,i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},p$1d.multiplyByTranslation=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("translation",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=n*e[0]+r*e[4]+o*e[8]+e[12],s=n*e[1]+r*e[5]+o*e[9]+e[13],l=n*e[2]+r*e[6]+o*e[10]+e[14];return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=a,i[13]=s,i[14]=l,i[15]=e[15],i};var r$1e=new o$1p;p$1d.multiplyByUniformScale=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scale",t),o$1q.typeOf.object("result",i),r$1e.x=t,r$1e.y=t,r$1e.z=t,p$1d.multiplyByScale(e,r$1e,i)},p$1d.multiplyByScale=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z;return 1===n&&1===r&&1===o?p$1d.clone(e,i):(i[0]=n*e[0],i[1]=n*e[1],i[2]=n*e[2],i[3]=0,i[4]=r*e[4],i[5]=r*e[5],i[6]=r*e[6],i[7]=0,i[8]=o*e[8],i[9]=o*e[9],i[10]=o*e[10],i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=1,i)},p$1d.multiplyByVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=t.w,s=e[0]*n+e[4]*r+e[8]*o+e[12]*a,l=e[1]*n+e[5]*r+e[9]*o+e[13]*a,u=e[2]*n+e[6]*r+e[10]*o+e[14]*a,c=e[3]*n+e[7]*r+e[11]*o+e[15]*a;return i.x=s,i.y=l,i.z=u,i.w=c,i},p$1d.multiplyByPointAsVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[4]*r+e[8]*o,s=e[1]*n+e[5]*r+e[9]*o,l=e[2]*n+e[6]*r+e[10]*o;return i.x=a,i.y=s,i.z=l,i},p$1d.multiplyByPoint=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[4]*r+e[8]*o+e[12],s=e[1]*n+e[5]*r+e[9]*o+e[13],l=e[2]*n+e[6]*r+e[10]*o+e[14];return i.x=a,i.y=s,i.z=l,i},p$1d.multiplyByDirection=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z;return i.x=n*e[0]+r*e[4]+o*e[8],i.y=n*e[1]+r*e[5]+o*e[9],i.z=n*e[2]+r*e[6]+o*e[10],i},p$1d.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i[9]=e[9]*t,i[10]=e[10]*t,i[11]=e[11]*t,i[12]=e[12]*t,i[13]=e[13]*t,i[14]=e[14]*t,i[15]=e[15]*t,i},p$1d.multiplyByPlane=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("plane",t),o$1q.typeOf.object("result",i);var n=new p$1d,r=new p$1d;p$1d.inverse(e,n),p$1d.transpose(n,r);var o=new e$29(t.normal.x,t.normal.y,t.normal.z,t.distance);p$1d.multiplyByVector(r,o,o),i.normal.x=o.x,i.normal.y=o.y,i.normal.z=o.z;var a=o$1p.magnitude(i.normal);return o$1p.normalize(i.normal,i.normal),i.distance=o.w/a,i},p$1d.negate=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},p$1d.transpose=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[1],n=e[2],r=e[3],o=e[6],a=e[7],s=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=i,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[10]=e[10],t[11]=e[14],t[12]=r,t[13]=a,t[14]=s,t[15]=e[15],t},p$1d.abs=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},p$1d.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},p$1d.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i&&Math.abs(e[9]-t[9])<=i&&Math.abs(e[10]-t[10])<=i&&Math.abs(e[11]-t[11])<=i&&Math.abs(e[12]-t[12])<=i&&Math.abs(e[13]-t[13])<=i&&Math.abs(e[14]-t[14])<=i&&Math.abs(e[15]-t[15])<=i},p$1d.getTranslation=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=e[12],t.y=e[13],t.z=e[14],t},p$1d.getMatrix3=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},p$1d.getRotation=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var z0=new p$1e,h0$2=new p$1e,C0=new e$29,T0=new e$29(0,0,0,1);p$1d.inverse=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[4],r=e[8],o=e[12],a=e[1],s=e[5],l=e[9],u=e[13],c=e[2],h=e[6],d=e[10],f=e[14],p=e[3],_=e[7],m=e[11],g=e[15],x=d*g,v=f*m,y=h*g,$=f*_,b=h*m,T=d*_,C=c*g,S=f*p,w=c*m,E=d*p,P=c*_,A=h*p,L=x*s+$*l+b*u-(v*s+y*l+T*u),M=v*a+C*l+E*u-(x*a+S*l+w*u),R=y*a+S*s+P*u-($*a+C*s+A*u),O=T*a+w*s+A*l-(b*a+E*s+P*l),I=v*n+y*r+T*o-(x*n+$*r+b*o),D=x*i+S*r+w*o-(v*i+C*r+E*o),B=$*i+C*n+A*o-(y*i+S*n+P*o),N=b*i+E*n+P*r-(T*i+w*n+A*r),F=(x=r*u)*_+($=o*s)*m+(b=n*l)*g-((v=o*l)*_+(y=n*u)*m+(T=r*s)*g),U=v*p+(C=i*u)*m+(E=r*a)*g-(x*p+(S=o*a)*m+(w=i*l)*g),G=y*p+S*_+(P=i*s)*g-($*p+C*_+(A=n*a)*g),z=T*p+w*_+A*m-(b*p+E*_+P*m),V=y*d+T*f+v*h-(b*f+x*h+$*d),k=w*f+x*c+S*d-(C*d+E*f+v*c),W=C*h+A*f+$*c-(P*f+y*c+S*h),H=P*d+b*c+E*h-(w*h+A*d+T*c),q=i*L+n*M+r*R+o*O;if(Math.abs(q)<e$2a.EPSILON21){if(p$1e.equalsEpsilon(p$1d.getRotation(e,z0),h0$2,e$2a.EPSILON5)&&e$29.equals(p$1d.getRow(e,3,C0),T0))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new t$14("matrix is not invertible because its determinate is zero.")}return q=1/q,t[0]=L*q,t[1]=M*q,t[2]=R*q,t[3]=O*q,t[4]=I*q,t[5]=D*q,t[6]=B*q,t[7]=N*q,t[8]=F*q,t[9]=U*q,t[10]=G*q,t[11]=z*q,t[12]=V*q,t[13]=k*q,t[14]=W*q,t[15]=H*q,t},p$1d.inverseTransformation=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[1],r=e[2],o=e[4],a=e[5],s=e[6],l=e[8],u=e[9],c=e[10],h=e[12],d=e[13],f=e[14],p=-i*h-n*d-r*f,_=-o*h-a*d-s*f,m=-l*h-u*d-c*f;return t[0]=i,t[1]=o,t[2]=l,t[3]=0,t[4]=n,t[5]=a,t[6]=u,t[7]=0,t[8]=r,t[9]=s,t[10]=c,t[11]=0,t[12]=p,t[13]=_,t[14]=m,t[15]=1,t},p$1d.IDENTITY=Object.freeze(new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),p$1d.ZERO=Object.freeze(new p$1d(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),p$1d.ConvertNDCToHalfZRange=Object.freeze(new p$1d(1,0,0,0,0,1,0,0,0,0,.5,.5,0,0,0,1)),p$1d.COLUMN0ROW0=0,p$1d.COLUMN0ROW1=1,p$1d.COLUMN0ROW2=2,p$1d.COLUMN0ROW3=3,p$1d.COLUMN1ROW0=4,p$1d.COLUMN1ROW1=5,p$1d.COLUMN1ROW2=6,p$1d.COLUMN1ROW3=7,p$1d.COLUMN2ROW0=8,p$1d.COLUMN2ROW1=9,p$1d.COLUMN2ROW2=10,p$1d.COLUMN2ROW3=11,p$1d.COLUMN3ROW0=12,p$1d.COLUMN3ROW1=13,p$1d.COLUMN3ROW2=14,p$1d.COLUMN3ROW3=15,p$1d.halfZRange=!1,Object.defineProperties(p$1d.prototype,{length:{get:function(){return p$1d.packedLength}}}),p$1d.prototype.clone=function(e){return p$1d.clone(this,e)},p$1d.prototype.equals=function(e){return p$1d.equals(this,e)},p$1d.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]&&e[9]===t[i+9]&&e[10]===t[i+10]&&e[11]===t[i+11]&&e[12]===t[i+12]&&e[13]===t[i+13]&&e[14]===t[i+14]&&e[15]===t[i+15]},p$1d.prototype.equalsEpsilon=function(e,t){return p$1d.equalsEpsilon(this,e,t)},p$1d.prototype.toString=function(){return"("+this[0]+", "+this[4]+", "+this[8]+", "+this[12]+")\n("+this[1]+", "+this[5]+", "+this[9]+", "+this[13]+")\n("+this[2]+", "+this[6]+", "+this[10]+", "+this[14]+")\n("+this[3]+", "+this[7]+", "+this[11]+", "+this[15]+")"},p$1d.prototype.toArray=function(e,t){p$1d.pack(this,e,t)};var e$28={NONE:0,GEODESIC:1,RHUMB:2},m$1f=Object.freeze(e$28);function d$1s(e,t,i,n){if(o$1q.defined("array",e),o$1q.defined("value",t),e$2b(i)&&o$1q.typeOf.number("start",i),e$2b(n)&&o$1q.typeOf.number("end",n),"function"==typeof e.fill)return e.fill(t,i,n);for(var r=e.length>>>0,o=u$_(i,0),a=o<0?Math.max(r+o,0):Math.min(o,r),s=u$_(n,r),l=s<0?Math.max(r+s,0):Math.min(s,r);a<l;)e[a]=t,a++;return e}function o$1o(e,t){this.x=u$_(e,0),this.y=u$_(t,0)}o$1o.fromElements=function(e,t,i){return e$2b(i)?(i.x=e,i.y=t,i):new o$1o(e,t)},o$1o.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.x=e.x,t.y=e.y,t):new o$1o(e.x,e.y)},o$1o.fromCartesian3=o$1o.clone,o$1o.fromCartesian4=o$1o.clone,o$1o.packedLength=2,o$1o.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.x,t[i]=e.y,t},o$1o.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new o$1o),i.x=e[t++],i.y=e[t],i},o$1o.packArray=function(e,t){o$1q.defined("array",e);var i=e.length,n=2*i;if(e$2b(t)){if(!Array.isArray(t)&&t.length!==n)throw new t$16("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)o$1o.pack(e[r],t,2*r);return t},o$1o.unpackArray=function(e,t){if(o$1q.defined("array",e),o$1q.typeOf.number.greaterThanOrEquals("array.length",e.length,2),e.length%2!=0)throw new t$16("array length must be a multiple of 2.");var i=e.length;e$2b(t)?t.length=i/2:t=new Array(i/2);for(var n=0;n<i;n+=2){var r=n/2;t[r]=o$1o.unpack(e,n,t[r])}return t},o$1o.fromArray=o$1o.unpack,o$1o.maximumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.max(e.x,e.y)},o$1o.minimumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.min(e.x,e.y)},o$1o.minimumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i},o$1o.maximumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i},o$1o.magnitudeSquared=function(e){return o$1q.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y},o$1o.magnitude=function(e){return Math.sqrt(o$1o.magnitudeSquared(e))};var i$1d=new o$1o;o$1o.distance=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1o.subtract(e,t,i$1d),o$1o.magnitude(i$1d)},o$1o.distanceSquared=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1o.subtract(e,t,i$1d),o$1o.magnitudeSquared(i$1d)},o$1o.normalize=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1o.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,isNaN(t.x)||isNaN(t.y))throw new t$16("normalized result is not a number");return t},o$1o.dot=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.x*t.x+e.y*t.y},o$1o.multiplyComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i},o$1o.divideComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i},o$1o.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i},o$1o.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i},o$1o.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i},o$1o.divideByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i},o$1o.negate=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t},o$1o.abs=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var m$1e=new o$1o;o$1o.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),o$1o.multiplyByScalar(t,i,m$1e),n=o$1o.multiplyByScalar(e,1-i,n),o$1o.add(m$1e,n,n)};var b$1k=new o$1o,O$X=new o$1o;o$1o.angleBetween=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1o.normalize(e,b$1k),o$1o.normalize(t,O$X),e$2a.acosClamped(o$1o.dot(b$1k,O$X))};var x$1n=new o$1o;function _$17(e,t,i,n){t=u$_(t,0),i=u$_(i,0),n=u$_(n,0),o$1q.typeOf.number.greaterThanOrEquals("x",t,0),o$1q.typeOf.number.greaterThanOrEquals("y",i,0),o$1q.typeOf.number.greaterThanOrEquals("z",n,0),e._radii=new o$1p(t,i,n),e._radiiSquared=new o$1p(t*t,i*i,n*n),e._radiiToTheFourth=new o$1p(t*t*t*t,i*i*i*i,n*n*n*n),e._oneOverRadii=new o$1p(0===t?0:1/t,0===i?0:1/i,0===n?0:1/n),e._oneOverRadiiSquared=new o$1p(0===t?0:1/(t*t),0===i?0:1/(i*i),0===n?0:1/(n*n)),e._minimumRadius=Math.min(t,i,n),e._maximumRadius=Math.max(t,i,n),e._centerToleranceSquared=e$2a.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function t$13(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,_$17(this,e,t,i)}o$1o.mostOrthogonalAxis=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1o.normalize(e,x$1n);return o$1o.abs(i,i),t=i.x<=i.y?o$1o.clone(o$1o.UNIT_X,t):o$1o.clone(o$1o.UNIT_Y,t)},o$1o.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.x===t.x&&e.y===t.y},o$1o.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]},o$1o.equalsEpsilon=function(e,t,i,n){return e===t||e$2b(e)&&e$2b(t)&&e$2a.equalsEpsilon(e.x,t.x,i,n)&&e$2a.equalsEpsilon(e.y,t.y,i,n)},o$1o.ZERO=Object.freeze(new o$1o(0,0)),o$1o.UNIT_X=Object.freeze(new o$1o(1,0)),o$1o.UNIT_Y=Object.freeze(new o$1o(0,1)),o$1o.prototype.clone=function(e){return o$1o.clone(this,e)},o$1o.prototype.equals=function(e){return o$1o.equals(this,e)},o$1o.prototype.equalsEpsilon=function(e,t,i){return o$1o.equalsEpsilon(this,e,t,i)},o$1o.prototype.toString=function(){return"("+this.x+", "+this.y+")"},o$1o.prototype.toArray=function(e,t){o$1o.pack(this,e,t)},Object.defineProperties(t$13.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),t$13.clone=function(e,t){if(e$2b(e)){var i=e._radii;return e$2b(t)?(o$1p.clone(i,t._radii),o$1p.clone(e._radiiSquared,t._radiiSquared),o$1p.clone(e._radiiToTheFourth,t._radiiToTheFourth),o$1p.clone(e._oneOverRadii,t._oneOverRadii),o$1p.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new t$13(i.x,i.y,i.z)}},t$13.fromCartesian3=function(e,t){return e$2b(t)||(t=new t$13),e$2b(e)&&_$17(t,e.x,e.y,e.z),t},t$13.WGS84=Object.freeze(new t$13(6378137,6378137,6356752.314245179)),t$13.XIAN80=Object.freeze(new t$13(6378140,6378140,6356755.29)),t$13.CGCS2000=Object.freeze(new t$13(6378137,6378137,6356752.31)),t$13.UNIT_SPHERE=Object.freeze(new t$13(1,1,1)),t$13.MOON=Object.freeze(new t$13(e$2a.LUNAR_RADIUS,e$2a.LUNAR_RADIUS,e$2a.LUNAR_RADIUS)),t$13.prototype.clone=function(e){return t$13.clone(this,e)},t$13.packedLength=o$1p.packedLength,t$13.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),o$1p.pack(e._radii,t,i),t},t$13.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=o$1p.unpack(e,t);return t$13.fromCartesian3(n,i)},t$13.prototype.geocentricSurfaceNormal=o$1p.normalize,t$13.prototype.geodeticSurfaceNormalCartographic=function(e,t){o$1q.typeOf.object("cartographic",e);var i=e.longitude,n=e.latitude,r=Math.cos(n),o=r*Math.cos(i),a=r*Math.sin(i),s=Math.sin(n);return e$2b(t)||(t=new o$1p),t.x=o,t.y=a,t.z=s,o$1p.normalize(t,t)},t$13.prototype.geodeticSurfaceNormal=function(e,t){return e$2b(t)||(t=new o$1p),t=o$1p.multiplyComponents(e,this._oneOverRadiiSquared,t),o$1p.normalize(t,t)};var g$1j=new o$1p,q$1h=new o$1p;t$13.prototype.cartographicToCartesian=function(e,t){var i=g$1j,n=q$1h;this.geodeticSurfaceNormalCartographic(e,i),o$1p.multiplyComponents(this._radiiSquared,i,n);var r=Math.sqrt(o$1p.dot(i,n));return o$1p.divideByScalar(n,r,n),o$1p.multiplyByScalar(i,e.height,i),e$2b(t)||(t=new o$1p),o$1p.add(n,i,t)},t$13.prototype.cartographicArrayToCartesianArray=function(e,t){o$1q.defined("cartographics",e);var i=e.length;e$2b(t)?t.length=i:t=new Array(i);for(var n=0;n<i;n++)t[n]=this.cartographicToCartesian(e[n],t[n]);return t};var T$1f=new o$1p,R$14=new o$1p,y$14=new o$1p;function n$1b(e){this._ellipsoid=u$_(e,t$13.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}t$13.prototype.cartesianToCartographic=function(e,t){var i=this.scaleToGeodeticSurface(e,R$14);if(e$2b(i)){var n=this.geodeticSurfaceNormal(i,T$1f),r=o$1p.subtract(e,i,y$14),o=Math.atan2(n.y,n.x),a=Math.asin(n.z),s=e$2a.sign(o$1p.dot(r,e))*o$1p.magnitude(r);return e$2b(t)?(t.longitude=o,t.latitude=a,t.height=s,t):new a$18(o,a,s)}},t$13.prototype.cartesianArrayToCartographicArray=function(e,t){o$1q.defined("cartesians",e);var i=e.length;e$2b(t)?t.length=i:t=new Array(i);for(var n=0;n<i;++n)t[n]=this.cartesianToCartographic(e[n],t[n]);return t},t$13.prototype.scaleToGeodeticSurface=function(e,t){return P$1e(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},t$13.prototype.scaleToGeocentricSurface=function(e,t){o$1q.typeOf.object("cartesian",e),e$2b(t)||(t=new o$1p);var i=e.x,n=e.y,r=e.z,o=this._oneOverRadiiSquared,a=1/Math.sqrt(i*i*o.x+n*n*o.y+r*r*o.z);return o$1p.multiplyByScalar(e,a,t)},t$13.prototype.transformPositionToScaledSpace=function(e,t){return e$2b(t)||(t=new o$1p),o$1p.multiplyComponents(e,this._oneOverRadii,t)},t$13.prototype.transformPositionFromScaledSpace=function(e,t){return e$2b(t)||(t=new o$1p),o$1p.multiplyComponents(e,this._radii,t)},t$13.prototype.equals=function(e){return this===e||e$2b(e)&&o$1p.equals(this._radii,e._radii)},t$13.prototype.toString=function(){return this._radii.toString()},t$13.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,i){if(o$1q.typeOf.object("position",e),!e$2a.equalsEpsilon(this._radii.x,this._radii.y,e$2a.EPSILON15))throw new t$16("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");o$1q.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),t=u$_(t,0);var n=this._squaredXOverSquaredZ;if(e$2b(i)||(i=new o$1p),i.x=0,i.y=0,i.z=e.z*(1-n),!(Math.abs(i.z)>=this._radii.z-t))return i},Object.defineProperties(n$1b.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),n$1b.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=e.latitude*i,o=e.height;return e$2b(t)?(t.x=n,t.y=r,t.z=o,t):new o$1p(n,r,o)},n$1b.prototype.unproject=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=e.y*i,o=e.z;return e$2b(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new a$18(n,r,o)};var e$27={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Ae$u=Object.freeze(e$27);function h$18(e,t,i,n){this.west=u$_(e,0),this.south=u$_(t,0),this.east=u$_(i,0),this.north=u$_(n,0)}Object.defineProperties(h$18.prototype,{width:{get:function(){return h$18.computeWidth(this)}},height:{get:function(){return h$18.computeHeight(this)}}}),h$18.packedLength=4,h$18.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.west,t[i++]=e.south,t[i++]=e.east,t[i]=e.north,t},h$18.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new h$18),i.west=e[t++],i.south=e[t++],i.east=e[t++],i.north=e[t],i},h$18.computeWidth=function(e){o$1q.typeOf.object("rectangle",e);var t=e.east,i=e.west;return t<i&&(t+=e$2a.TWO_PI),t-i},h$18.computeHeight=function(e){return o$1q.typeOf.object("rectangle",e),e.north-e.south},h$18.fromDegrees=function(e,t,i,n,r){return e=e$2a.toRadians(u$_(e,0)),t=e$2a.toRadians(u$_(t,0)),i=e$2a.toRadians(u$_(i,0)),n=e$2a.toRadians(u$_(n,0)),e$2b(r)?(r.west=e,r.south=t,r.east=i,r.north=n,r):new h$18(e,t,i,n)},h$18.fromRadians=function(e,t,i,n,r){return e$2b(r)?(r.west=u$_(e,0),r.south=u$_(t,0),r.east=u$_(i,0),r.north=u$_(n,0),r):new h$18(e,t,i,n)},h$18.fromCartographicArray=function(e,t){o$1q.defined("cartographics",e);for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0,u=e.length;l<u;l++){var c=e[l];i=Math.min(i,c.longitude),n=Math.max(n,c.longitude),a=Math.min(a,c.latitude),s=Math.max(s,c.latitude);var h=c.longitude>=0?c.longitude:c.longitude+e$2a.TWO_PI;r=Math.min(r,h),o=Math.max(o,h)}return n-i>o-r&&(i=r,(n=o)>e$2a.PI&&(n-=e$2a.TWO_PI),i>e$2a.PI&&(i-=e$2a.TWO_PI)),e$2b(t)?(t.west=i,t.south=a,t.east=n,t.north=s,t):new h$18(i,a,n,s)},h$18.fromCartesianArray=function(e,t,i){o$1q.defined("cartesians",e),t=u$_(t,t$13.WGS84);for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0,c=e.length;u<c;u++){var h=t.cartesianToCartographic(e[u]);n=Math.min(n,h.longitude),r=Math.max(r,h.longitude),s=Math.min(s,h.latitude),l=Math.max(l,h.latitude);var d=h.longitude>=0?h.longitude:h.longitude+e$2a.TWO_PI;o=Math.min(o,d),a=Math.max(a,d)}return r-n>a-o&&(n=o,(r=a)>e$2a.PI&&(r-=e$2a.TWO_PI),n>e$2a.PI&&(n-=e$2a.TWO_PI)),e$2b(i)?(i.west=n,i.south=s,i.east=r,i.north=l,i):new h$18(n,s,r,l)},h$18.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new h$18(e.west,e.south,e.east,e.north)},h$18.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("absoluteEpsilon",i),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},h$18.prototype.clone=function(e){return h$18.clone(this,e)},h$18.prototype.equals=function(e){return h$18.equals(this,e)},h$18.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},h$18.prototype.equalsEpsilon=function(e,t){return o$1q.typeOf.number("epsilon",t),h$18.equalsEpsilon(this,e,t)},h$18.validate=function(e){o$1q.typeOf.object("rectangle",e);var t=e.north;o$1q.typeOf.number.greaterThanOrEquals("north",t,-e$2a.PI_OVER_TWO),o$1q.typeOf.number.lessThanOrEquals("north",t,e$2a.PI_OVER_TWO);var i=e.south;o$1q.typeOf.number.greaterThanOrEquals("south",i,-e$2a.PI_OVER_TWO),o$1q.typeOf.number.lessThanOrEquals("south",i,e$2a.PI_OVER_TWO);var n=e.west;o$1q.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),o$1q.typeOf.number.lessThanOrEquals("west",n,Math.PI);var r=e.east;o$1q.typeOf.number.greaterThanOrEquals("east",r,-Math.PI),o$1q.typeOf.number.lessThanOrEquals("east",r,Math.PI)},h$18.southwest=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2b(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new a$18(e.west,e.south)},h$18.northwest=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2b(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new a$18(e.west,e.north)},h$18.northeast=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2b(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new a$18(e.east,e.north)},h$18.southeast=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2b(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new a$18(e.east,e.south)},h$18.center=function(e,t){o$1q.typeOf.object("rectangle",e);var i=e.east,n=e.west;i<n&&(i+=e$2a.TWO_PI);var r=e$2a.negativePiToPi(.5*(n+i)),o=.5*(e.south+e.north);return e$2b(t)?(t.longitude=r,t.latitude=o,t.height=0,t):new a$18(r,o)},h$18.intersection=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("otherRectangle",t);var n=e.east,r=e.west,o=t.east,a=t.west;n<r&&o>0?n+=e$2a.TWO_PI:o<a&&n>0&&(o+=e$2a.TWO_PI),n<r&&a<0?a+=e$2a.TWO_PI:o<a&&r<0&&(r+=e$2a.TWO_PI);var s=e$2a.negativePiToPi(Math.max(r,a)),l=e$2a.negativePiToPi(Math.min(n,o));if(!((e.west<e.east||t.west<t.east)&&l<=s)){var u=Math.max(e.south,t.south),c=Math.min(e.north,t.north);if(!(u>=c))return e$2b(i)?(i.west=s,i.south=u,i.east=l,i.north=c,i):new h$18(s,u,l,c)}},h$18.simpleIntersection=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("otherRectangle",t);var n=Math.max(e.west,t.west),r=Math.max(e.south,t.south),o=Math.min(e.east,t.east),a=Math.min(e.north,t.north);if(!(r>=a||n>=o))return e$2b(i)?(i.west=n,i.south=r,i.east=o,i.north=a,i):new h$18(n,r,o,a)},h$18.union=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("otherRectangle",t),e$2b(i)||(i=new h$18);var n=e.east,r=e.west,o=t.east,a=t.west;n<r&&o>0?n+=e$2a.TWO_PI:o<a&&n>0&&(o+=e$2a.TWO_PI),n<r&&a<0?a+=e$2a.TWO_PI:o<a&&r<0&&(r+=e$2a.TWO_PI);var s=e$2a.convertLongitudeRange(Math.min(r,a)),l=e$2a.convertLongitudeRange(Math.max(n,o));return i.west=s,i.south=Math.min(e.south,t.south),i.east=l,i.north=Math.max(e.north,t.north),i},h$18.expand=function(e,t,i){return o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("cartographic",t),e$2b(i)||(i=new h$18),i.west=Math.min(e.west,t.longitude),i.south=Math.min(e.south,t.latitude),i.east=Math.max(e.east,t.longitude),i.north=Math.max(e.north,t.latitude),i},h$18.contains=function(e,t){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("cartographic",t);var i=t.longitude,n=t.latitude,r=e.west,o=e.east;return o<r&&(o+=e$2a.TWO_PI,i<0&&(i+=e$2a.TWO_PI)),(i>r||e$2a.equalsEpsilon(i,r,e$2a.EPSILON14))&&(i<o||e$2a.equalsEpsilon(i,o,e$2a.EPSILON14))&&n>=e.south&&n<=e.north};var T$1e=new a$18;h$18.subsample=function(e,t,i,n){o$1q.typeOf.object("rectangle",e),t=u$_(t,t$13.WGS84),i=u$_(i,0),e$2b(n)||(n=[]);var r=0,o=e.north,a=e.south,s=e.east,l=e.west,u=T$1e;u.height=i,u.longitude=l,u.latitude=o,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=a,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=o<0?o:a>0?a:0;for(var c=1;c<8;++c)u.longitude=-Math.PI+c*e$2a.PI_OVER_TWO,h$18.contains(e,u)&&(n[r]=t.cartographicToCartesian(u,n[r]),r++);return 0===u.latitude&&(u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++),n.length=r,n};var p$1c=new a$18;function f$18(e,t,i,n){this.x=u$_(e,0),this.y=u$_(t,0),this.width=u$_(i,0),this.height=u$_(n,0)}h$18.prototype.contains=function(e){return h$18.contains(this,h$18.southwest(e,p$1c))&&h$18.contains(this,h$18.northwest(e,p$1c))&&h$18.contains(this,h$18.southeast(e,p$1c))&&h$18.contains(this,h$18.northeast(e,p$1c))},h$18.MAX_VALUE=Object.freeze(new h$18(-Math.PI,-e$2a.PI_OVER_TWO,Math.PI,e$2a.PI_OVER_TWO)),f$18.packedLength=4,f$18.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.width,t[i]=e.height,t},f$18.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new f$18),i.x=e[t++],i.y=e[t++],i.width=e[t++],i.height=e[t],i},f$18.fromPoints=function(e,t){if(e$2b(t)||(t=new f$18),!e$2b(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,n=e[0].x,r=e[0].y,o=e[0].x,a=e[0].y,s=1;s<i;s++){var l=e[s],u=l.x,c=l.y;n=Math.min(u,n),o=Math.max(u,o),r=Math.min(c,r),a=Math.max(c,a)}return t.x=n,t.y=r,t.width=o-n,t.height=a-r,t};var O$W=new n$1b,g$1i=new a$18,r$1d=new a$18;function o$1n(e,t){this.start=u$_(e,0),this.stop=u$_(t,0)}function i$1c(e,t){this.center=o$1p.clone(u$_(e,o$1p.ZERO)),this.radius=u$_(t,0)}f$18.fromRectangle=function(e,t,i){if(e$2b(i)||(i=new f$18),!e$2b(e))return i.x=0,i.y=0,i.width=0,i.height=0,i;var n=(t=u$_(t,O$W)).project(h$18.southwest(e,g$1i)),r=t.project(h$18.northeast(e,r$1d));return o$1o.subtract(r,n,r),i.x=n.x,i.y=n.y,i.width=r.x,i.height=r.y,i},f$18.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new f$18(e.x,e.y,e.width,e.height)},f$18.union=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e$2b(i)||(i=new f$18);var n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),o=Math.max(e.x+e.width,t.x+t.width),a=Math.max(e.y+e.height,t.y+t.height);return i.x=n,i.y=r,i.width=o-n,i.height=a-r,i},f$18.expand=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("point",t),i=f$18.clone(e,i);var n=t.x-i.x,r=t.y-i.y;return n>i.width?i.width=n:n<0&&(i.width-=n,i.x=t.x),r>i.height?i.height=r:r<0&&(i.height-=r,i.y=t.y),i},f$18.intersect=function(e,t){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t);var i=e.x,n=e.y,r=t.x,o=t.y;return i>r+t.width||i+e.width<r||n+e.height<o||n>o+t.height?Ae$u.OUTSIDE:Ae$u.INTERSECTING},f$18.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},f$18.prototype.clone=function(e){return f$18.clone(this,e)},f$18.prototype.intersect=function(e){return f$18.intersect(this,e)},f$18.prototype.equals=function(e){return f$18.equals(this,e)};var T$1d=new o$1p,F$1k=new o$1p,I$1x=new o$1p,J$13=new o$1p,K$13=new o$1p,Q$19=new o$1p,$$1a=new o$1p,M$1d=new o$1p,L$1i=new o$1p,H$1c=new o$1p,s$10=new o$1p,aa$7=new o$1p,da$4=4/3*e$2a.PI;i$1c.fromPoints=function(e,t){if(e$2b(t)||(t=new i$1c),!e$2b(e)||0===e.length)return t.center=o$1p.clone(o$1p.ZERO,t.center),t.radius=0,t;var i,n=o$1p.clone(e[0],$$1a),r=o$1p.clone(n,T$1d),o=o$1p.clone(n,F$1k),a=o$1p.clone(n,I$1x),s=o$1p.clone(n,J$13),l=o$1p.clone(n,K$13),u=o$1p.clone(n,Q$19),c=e.length;for(i=1;i<c;i++){o$1p.clone(e[i],n);var h=n.x,d=n.y,f=n.z;h<r.x&&o$1p.clone(n,r),h>s.x&&o$1p.clone(n,s),d<o.y&&o$1p.clone(n,o),d>l.y&&o$1p.clone(n,l),f<a.z&&o$1p.clone(n,a),f>u.z&&o$1p.clone(n,u)}var p=o$1p.magnitudeSquared(o$1p.subtract(s,r,M$1d)),_=o$1p.magnitudeSquared(o$1p.subtract(l,o,M$1d)),m=o$1p.magnitudeSquared(o$1p.subtract(u,a,M$1d)),g=r,x=s,v=p;_>v&&(v=_,g=o,x=l),m>v&&(v=m,g=a,x=u);var y=L$1i;y.x=.5*(g.x+x.x),y.y=.5*(g.y+x.y),y.z=.5*(g.z+x.z);var $=o$1p.magnitudeSquared(o$1p.subtract(x,y,M$1d)),b=Math.sqrt($),T=H$1c;T.x=r.x,T.y=o.y,T.z=a.z;var C=s$10;C.x=s.x,C.y=l.y,C.z=u.z;var S=o$1p.midpoint(T,C,aa$7),w=0;for(i=0;i<c;i++){o$1p.clone(e[i],n);var E=o$1p.magnitude(o$1p.subtract(n,S,M$1d));E>w&&(w=E);var P=o$1p.magnitudeSquared(o$1p.subtract(n,y,M$1d));if(P>$){var A=Math.sqrt(P);$=(b=.5*(b+A))*b;var L=A-b;y.x=(b*y.x+L*n.x)/A,y.y=(b*y.y+L*n.y)/A,y.z=(b*y.z+L*n.z)/A}}return b<w?(o$1p.clone(y,t.center),t.radius=b):(o$1p.clone(S,t.center),t.radius=w),t};var ua$6=new n$1b,ma$6=new o$1p,ya$4=new o$1p,ra$8=new a$18,ea$8=new a$18;i$1c.fromRectangle2D=function(e,t,i){return i$1c.fromRectangleWithHeights2D(e,t,0,0,i)},i$1c.fromRectangleWithHeights2D=function(e,t,i,n,r){if(e$2b(r)||(r=new i$1c),!e$2b(e))return r.center=o$1p.clone(o$1p.ZERO,r.center),r.radius=0,r;t=u$_(t,ua$6),h$18.southwest(e,ra$8),ra$8.height=i,h$18.northeast(e,ea$8),ea$8.height=n;var o=t.project(ra$8,ma$6),a=t.project(ea$8,ya$4),s=a.x-o.x,l=a.y-o.y,u=a.z-o.z;r.radius=.5*Math.sqrt(s*s+l*l+u*u);var c=r.center;return c.x=o.x+.5*s,c.y=o.y+.5*l,c.z=o.z+.5*u,r};var xa$6=[];i$1c.fromRectangle3D=function(e,t,i,n){if(t=u$_(t,t$13.WGS84),i=u$_(i,0),e$2b(n)||(n=new i$1c),!e$2b(e))return n.center=o$1p.clone(o$1p.ZERO,n.center),n.radius=0,n;var r=h$18.subsample(e,t,i,xa$6);return i$1c.fromPoints(r,n)},i$1c.fromVertices=function(e,t,i,n){if(e$2b(n)||(n=new i$1c),!e$2b(e)||0===e.length)return n.center=o$1p.clone(o$1p.ZERO,n.center),n.radius=0,n;t=u$_(t,o$1p.ZERO),i=u$_(i,3),o$1q.typeOf.number.greaterThanOrEquals("stride",i,3);var r=$$1a;r.x=e[0]+t.x,r.y=e[1]+t.y,r.z=e[2]+t.z;var o,a=o$1p.clone(r,T$1d),s=o$1p.clone(r,F$1k),l=o$1p.clone(r,I$1x),u=o$1p.clone(r,J$13),c=o$1p.clone(r,K$13),h=o$1p.clone(r,Q$19),d=e.length;for(o=0;o<d;o+=i){var f=e[o]+t.x,p=e[o+1]+t.y,_=e[o+2]+t.z;r.x=f,r.y=p,r.z=_,f<a.x&&o$1p.clone(r,a),f>u.x&&o$1p.clone(r,u),p<s.y&&o$1p.clone(r,s),p>c.y&&o$1p.clone(r,c),_<l.z&&o$1p.clone(r,l),_>h.z&&o$1p.clone(r,h)}var m=o$1p.magnitudeSquared(o$1p.subtract(u,a,M$1d)),g=o$1p.magnitudeSquared(o$1p.subtract(c,s,M$1d)),x=o$1p.magnitudeSquared(o$1p.subtract(h,l,M$1d)),v=a,y=u,$=m;g>$&&($=g,v=s,y=c),x>$&&($=x,v=l,y=h);var b=L$1i;b.x=.5*(v.x+y.x),b.y=.5*(v.y+y.y),b.z=.5*(v.z+y.z);var T=o$1p.magnitudeSquared(o$1p.subtract(y,b,M$1d)),C=Math.sqrt(T),S=H$1c;S.x=a.x,S.y=s.y,S.z=l.z;var w=s$10;w.x=u.x,w.y=c.y,w.z=h.z;var E=o$1p.midpoint(S,w,aa$7),P=0;for(o=0;o<d;o+=i){r.x=e[o]+t.x,r.y=e[o+1]+t.y,r.z=e[o+2]+t.z;var A=o$1p.magnitude(o$1p.subtract(r,E,M$1d));A>P&&(P=A);var L=o$1p.magnitudeSquared(o$1p.subtract(r,b,M$1d));if(L>T){var M=Math.sqrt(L);T=(C=.5*(C+M))*C;var R=M-C;b.x=(C*b.x+R*r.x)/M,b.y=(C*b.y+R*r.y)/M,b.z=(C*b.z+R*r.z)/M}}return C<P?(o$1p.clone(b,n.center),n.radius=C):(o$1p.clone(E,n.center),n.radius=P),n},i$1c.fromEncodedCartesianVertices=function(e,t,i){if(e$2b(i)||(i=new i$1c),!e$2b(e)||!e$2b(t)||e.length!==t.length||0===e.length)return i.center=o$1p.clone(o$1p.ZERO,i.center),i.radius=0,i;var n=$$1a;n.x=e[0]+t[0],n.y=e[1]+t[1],n.z=e[2]+t[2];var r,o=o$1p.clone(n,T$1d),a=o$1p.clone(n,F$1k),s=o$1p.clone(n,I$1x),l=o$1p.clone(n,J$13),u=o$1p.clone(n,K$13),c=o$1p.clone(n,Q$19),h=e.length;for(r=0;r<h;r+=3){var d=e[r]+t[r],f=e[r+1]+t[r+1],p=e[r+2]+t[r+2];n.x=d,n.y=f,n.z=p,d<o.x&&o$1p.clone(n,o),d>l.x&&o$1p.clone(n,l),f<a.y&&o$1p.clone(n,a),f>u.y&&o$1p.clone(n,u),p<s.z&&o$1p.clone(n,s),p>c.z&&o$1p.clone(n,c)}var _=o$1p.magnitudeSquared(o$1p.subtract(l,o,M$1d)),m=o$1p.magnitudeSquared(o$1p.subtract(u,a,M$1d)),g=o$1p.magnitudeSquared(o$1p.subtract(c,s,M$1d)),x=o,v=l,y=_;m>y&&(y=m,x=a,v=u),g>y&&(y=g,x=s,v=c);var $=L$1i;$.x=.5*(x.x+v.x),$.y=.5*(x.y+v.y),$.z=.5*(x.z+v.z);var b=o$1p.magnitudeSquared(o$1p.subtract(v,$,M$1d)),T=Math.sqrt(b),C=H$1c;C.x=o.x,C.y=a.y,C.z=s.z;var S=s$10;S.x=l.x,S.y=u.y,S.z=c.z;var w=o$1p.midpoint(C,S,aa$7),E=0;for(r=0;r<h;r+=3){n.x=e[r]+t[r],n.y=e[r+1]+t[r+1],n.z=e[r+2]+t[r+2];var P=o$1p.magnitude(o$1p.subtract(n,w,M$1d));P>E&&(E=P);var A=o$1p.magnitudeSquared(o$1p.subtract(n,$,M$1d));if(A>b){var L=Math.sqrt(A);b=(T=.5*(T+L))*T;var M=L-T;$.x=(T*$.x+M*n.x)/L,$.y=(T*$.y+M*n.y)/L,$.z=(T*$.z+M*n.z)/L}}return T<E?(o$1p.clone($,i.center),i.radius=T):(o$1p.clone(w,i.center),i.radius=E),i},i$1c.fromCornerPoints=function(e,t,i){o$1q.typeOf.object("corner",e),o$1q.typeOf.object("oppositeCorner",t),e$2b(i)||(i=new i$1c);var n=o$1p.midpoint(e,t,i.center);return i.radius=o$1p.distance(n,t),i},i$1c.fromEllipsoid=function(e,t){return o$1q.typeOf.object("ellipsoid",e),e$2b(t)||(t=new i$1c),o$1p.clone(o$1p.ZERO,t.center),t.radius=e.maximumRadius,t};var za$6=new o$1p;i$1c.fromBoundingSpheres=function(e,t){if(e$2b(t)||(t=new i$1c),!e$2b(e)||0===e.length)return t.center=o$1p.clone(o$1p.ZERO,t.center),t.radius=0,t;var i=e.length;if(1===i)return i$1c.clone(e[0],t);if(2===i)return i$1c.union(e[0],e[1],t);var n,r=[];for(n=0;n<i;n++)r.push(e[n].center);var o=(t=i$1c.fromPoints(r,t)).center,a=t.radius;for(n=0;n<i;n++){var s=e[n];a=Math.max(a,o$1p.distance(o,s.center,za$6)+s.radius)}return t.radius=a,t};var Sa$6=new o$1p,ha$4=new o$1p,pa$4=new o$1p;i$1c.fromOrientedBoundingBox=function(e,t){o$1q.defined("orientedBoundingBox",e),e$2b(t)||(t=new i$1c);var i=e.halfAxes,n=p$1e.getColumn(i,0,Sa$6),r=p$1e.getColumn(i,1,ha$4),o=p$1e.getColumn(i,2,pa$4);return o$1p.add(n,r,n),o$1p.add(n,o,n),t.center=o$1p.clone(e.center,t.center),t.radius=o$1p.magnitude(n),t},i$1c.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.center=o$1p.clone(e.center,t.center),t.radius=e.radius,t):new i$1c(e.center,e.radius)},i$1c.packedLength=4,i$1c.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0);var n=e.center;return t[i++]=n.x,t[i++]=n.y,t[i++]=n.z,t[i]=e.radius,t},i$1c.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new i$1c);var n=i.center;return n.x=e[t++],n.y=e[t++],n.z=e[t++],i.radius=e[t],i};var wa$4=new o$1p,Oa$6=new o$1p;i$1c.union=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e$2b(i)||(i=new i$1c);var n=e.center,r=e.radius,o=t.center,a=t.radius,s=o$1p.subtract(o,n,wa$4),l=o$1p.magnitude(s);if(r>=l+a)return e.clone(i),i;if(a>=l+r)return t.clone(i),i;var u=.5*(r+l+a),c=o$1p.multiplyByScalar(s,(-r+u)/l,Oa$6);return o$1p.add(c,n,c),o$1p.clone(c,i.center),i.radius=u,i};var ba$5=new o$1p;i$1c.expand=function(e,t,i){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("point",t),i=i$1c.clone(e,i);var n=o$1p.magnitude(o$1p.subtract(t,i.center,ba$5));return n>i.radius&&(i.radius=n),i},i$1c.intersectPlane=function(e,t){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("plane",t);var i=e.center,n=e.radius,r=t.normal,o=o$1p.dot(r,i)+t.distance;return o<-n?Ae$u.OUTSIDE:o<n?Ae$u.INTERSECTING:Ae$u.INSIDE},i$1c.transform=function(e,t,i){return o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("transform",t),e$2b(i)||(i=new i$1c),i.center=p$1d.multiplyByPoint(t,e.center,i.center),i.radius=p$1d.getMaximumScale(t)*e.radius,i};var ga$6=new o$1p;i$1c.distanceSquaredTo=function(e,t){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("cartesian",t);var i=o$1p.subtract(e.center,t,ga$6);return o$1p.magnitudeSquared(i)-e.radius*e.radius},i$1c.transformWithoutScale=function(e,t,i){return o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("transform",t),e$2b(i)||(i=new i$1c),i.center=p$1d.multiplyByPoint(t,e.center,i.center),i.radius=e.radius,i};var Ma$6=new o$1p;i$1c.computePlaneDistances=function(e,t,i,n){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("position",t),o$1q.typeOf.object("direction",i),e$2b(n)||(n=new o$1n);var r=o$1p.subtract(e.center,t,Ma$6),o=o$1p.dot(i,r);return n.start=o-e.radius,n.stop=o+e.radius,n};for(var ca$2=new o$1p,Ra$7=new o$1p,qa$7=new o$1p,ja$4=new o$1p,Pa$6=new o$1p,Ba$7=new a$18,ia$4=new Array(8),na$4=0;na$4<8;++na$4)ia$4[na$4]=new o$1p;var Da$8=new n$1b;i$1c.projectTo2D=function(e,t,i){o$1q.typeOf.object("sphere",e);var n,r=(t=u$_(t,Da$8)).ellipsoid,o=e.center,a=e.radius;n=o$1p.equals(o,o$1p.ZERO)?o$1p.clone(o$1p.UNIT_X,ca$2):r.geodeticSurfaceNormal(o,ca$2);var s=o$1p.cross(o$1p.UNIT_Z,n,Ra$7);o$1p.normalize(s,s);var l=o$1p.cross(n,s,qa$7);o$1p.normalize(l,l),o$1p.multiplyByScalar(n,a,n),o$1p.multiplyByScalar(l,a,l),o$1p.multiplyByScalar(s,a,s);var u=o$1p.negate(l,Pa$6),c=o$1p.negate(s,ja$4),h=ia$4,d=h[0];o$1p.add(n,l,d),o$1p.add(d,s,d),d=h[1],o$1p.add(n,l,d),o$1p.add(d,c,d),d=h[2],o$1p.add(n,u,d),o$1p.add(d,c,d),d=h[3],o$1p.add(n,u,d),o$1p.add(d,s,d),o$1p.negate(n,n),d=h[4],o$1p.add(n,l,d),o$1p.add(d,s,d),d=h[5],o$1p.add(n,l,d),o$1p.add(d,c,d),d=h[6],o$1p.add(n,u,d),o$1p.add(d,c,d),d=h[7],o$1p.add(n,u,d),o$1p.add(d,s,d);for(var f=h.length,p=0;p<f;++p){var _=h[p];o$1p.add(o,_,_);var m=r.cartesianToCartographic(_,Ba$7);t.project(m,_)}var g=(o=(i=i$1c.fromPoints(h,i)).center).x,x=o.y,v=o.z;return o.x=v,o.y=g,o.z=x,i},i$1c.isOccluded=function(e,t){return o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)},i$1c.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&o$1p.equals(e.center,t.center)&&e.radius===t.radius},i$1c.prototype.intersectPlane=function(e){return i$1c.intersectPlane(this,e)},i$1c.prototype.distanceSquaredTo=function(e){return i$1c.distanceSquaredTo(this,e)},i$1c.prototype.computePlaneDistances=function(e,t,i){return i$1c.computePlaneDistances(this,e,t,i)},i$1c.prototype.isOccluded=function(e){return i$1c.isOccluded(this,e)},i$1c.prototype.equals=function(e){return i$1c.equals(this,e)},i$1c.prototype.clone=function(e){return i$1c.clone(this,e)},i$1c.prototype.volume=function(){var e=this.radius;return da$4*e*e*e};const E$1t={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047};var de$x=Object.freeze(E$1t),r$1c={BYTE:de$x.BYTE,UNSIGNED_BYTE:de$x.UNSIGNED_BYTE,SHORT:de$x.SHORT,UNSIGNED_SHORT:de$x.UNSIGNED_SHORT,INT:de$x.INT,UNSIGNED_INT:de$x.UNSIGNED_INT,FLOAT:de$x.FLOAT,DOUBLE:de$x.DOUBLE,getSizeInBytes:function(e){if(!e$2b(e))throw new t$16("value is required.");switch(e){case r$1c.BYTE:return Int8Array.BYTES_PER_ELEMENT;case r$1c.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r$1c.SHORT:return Int16Array.BYTES_PER_ELEMENT;case r$1c.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r$1c.INT:return Int32Array.BYTES_PER_ELEMENT;case r$1c.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case r$1c.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case r$1c.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new t$16("componentDatatype is not a valid value.")}},fromTypedArray:function(e){return e instanceof Int8Array?r$1c.BYTE:e instanceof Uint8Array?r$1c.UNSIGNED_BYTE:e instanceof Int16Array?r$1c.SHORT:e instanceof Uint16Array?r$1c.UNSIGNED_SHORT:e instanceof Int32Array?r$1c.INT:e instanceof Uint32Array?r$1c.UNSIGNED_INT:e instanceof Float32Array?r$1c.FLOAT:e instanceof Float64Array?r$1c.DOUBLE:void 0},validate:function(e){return e$2b(e)&&(e===r$1c.BYTE||e===r$1c.UNSIGNED_BYTE||e===r$1c.SHORT||e===r$1c.UNSIGNED_SHORT||e===r$1c.INT||e===r$1c.UNSIGNED_INT||e===r$1c.FLOAT||e===r$1c.DOUBLE)},createTypedArray:function(e,t){if(!e$2b(e))throw new t$16("componentDatatype is required.");if(!e$2b(t))throw new t$16("valuesOrLength is required.");switch(e){case r$1c.BYTE:return new Int8Array(t);case r$1c.UNSIGNED_BYTE:return new Uint8Array(t);case r$1c.SHORT:return new Int16Array(t);case r$1c.UNSIGNED_SHORT:return new Uint16Array(t);case r$1c.INT:return new Int32Array(t);case r$1c.UNSIGNED_INT:return new Uint32Array(t);case r$1c.FLOAT:return new Float32Array(t);case r$1c.DOUBLE:return new Float64Array(t);default:throw new t$16("componentDatatype is not a valid value.")}},createArrayBufferView:function(e,t,i,n){if(!e$2b(e))throw new t$16("componentDatatype is required.");if(!e$2b(t))throw new t$16("buffer is required.");switch(i=u$_(i,0),n=u$_(n,(t.byteLength-i)/r$1c.getSizeInBytes(e)),e){case r$1c.BYTE:return new Int8Array(t,i,n);case r$1c.UNSIGNED_BYTE:return new Uint8Array(t,i,n);case r$1c.SHORT:return new Int16Array(t,i,n);case r$1c.UNSIGNED_SHORT:return new Uint16Array(t,i,n);case r$1c.INT:return new Int32Array(t,i,n);case r$1c.UNSIGNED_INT:return new Uint32Array(t,i,n);case r$1c.FLOAT:return new Float32Array(t,i,n);case r$1c.DOUBLE:return new Float64Array(t,i,n);default:throw new t$16("componentDatatype is not a valid value.")}},fromName:function(e){switch(e){case"BYTE":return r$1c.BYTE;case"UNSIGNED_BYTE":return r$1c.UNSIGNED_BYTE;case"SHORT":return r$1c.SHORT;case"UNSIGNED_SHORT":return r$1c.UNSIGNED_SHORT;case"INT":return r$1c.INT;case"UNSIGNED_INT":return r$1c.UNSIGNED_INT;case"FLOAT":return r$1c.FLOAT;case"DOUBLE":return r$1c.DOUBLE;default:throw new t$16("name is not a valid value.")}}},S$12=Object.freeze(r$1c);function Y$_(e){var t=e._uSquared,i=e._ellipsoid.maximumRadius,n=e._ellipsoid.minimumRadius,r=(i-n)/i,o=Math.cos(e._startHeading),a=Math.sin(e._startHeading),s=(1-r)*Math.tan(e._start.latitude),l=1/Math.sqrt(1+s*s),u=l*s,c=Math.atan2(s,o),h=l*a,d=h*h,f=1-d,p=Math.sqrt(f),_=t/4,m=_*_,g=m*_,x=m*m,v=1+_-3*m/4+5*g/4-175*x/64,y=1-_+15*m/8-35*g/8,$=1-3*_+35*m/4,b=1-5*_,T=v*c-y*Math.sin(2*c)*_/2-$*Math.sin(4*c)*m/16-b*Math.sin(6*c)*g/48-5*Math.sin(8*c)*x/512,C=e._constants;C.a=i,C.b=n,C.f=r,C.cosineHeading=o,C.sineHeading=a,C.tanU=s,C.cosineU=l,C.sineU=u,C.sigma=c,C.sineAlpha=h,C.sineSquaredAlpha=d,C.cosineSquaredAlpha=f,C.cosineAlpha=p,C.u2Over4=_,C.u4Over16=m,C.u6Over64=g,C.u8Over256=x,C.a0=v,C.a1=y,C.a2=$,C.a3=b,C.distanceRatio=T}function Z$1b(e,t){return e*t*(4+e*(4-3*t))/16}function B$15(e,t,i,n,r,o,a){var s=Z$1b(e,i);return(1-s)*e*t*(n+s*r*(a+s*o*(2*a*a-1)))}function $$19(e,t,i,n,r,o,a){var s,l,u,c,h,d=(t-i)/t,f=o-n,p=Math.atan((1-d)*Math.tan(r)),_=Math.atan((1-d)*Math.tan(a)),m=Math.cos(p),g=Math.sin(p),x=Math.cos(_),v=Math.sin(_),y=m*x,$=m*v,b=g*v,T=g*x,C=f,S=e$2a.TWO_PI,w=Math.cos(C),E=Math.sin(C);do{w=Math.cos(C),E=Math.sin(C);var P,A=$-T*w;u=Math.sqrt(x*x*E*E+A*A),l=b+y*w,s=Math.atan2(u,l),0===u?(P=0,c=1):c=1-(P=y*E/u)*P,S=C,h=l-2*b/c,isNaN(h)&&(h=0),C=f+B$15(d,P,c,s,u,l,h)}while(Math.abs(C-S)>e$2a.EPSILON12);var L=c*(t*t-i*i)/(i*i),M=L*(256+L*(L*(74-47*L)-128))/1024,R=h*h,O=i*(1+L*(4096+L*(L*(320-175*L)-768))/16384)*(s-M*u*(h+M*(l*(2*R-1)-M*h*(4*u*u-3)*(4*R-3)/6)/4)),I=Math.atan2(x*E,$-T*w),D=Math.atan2(m*E,$*w-T);e._distance=O,e._startHeading=I,e._endHeading=D,e._uSquared=L}var j$1h=new o$1p,L$1h=new o$1p;function F$1j(e,t,i,n){var r=o$1p.normalize(n.cartographicToCartesian(t,L$1h),j$1h),o=o$1p.normalize(n.cartographicToCartesian(i,L$1h),L$1h);o$1q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(o$1p.angleBetween(r,o))-Math.PI),.0125),$$19(e,n.maximumRadius,n.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude),e._start=a$18.clone(t,e._start),e._end=a$18.clone(i,e._end),e._start.height=0,e._end.height=0,Y$_(e)}function E$1s(e,t,i){var n=u$_(i,t$13.WGS84);this._ellipsoid=n,this._start=new a$18,this._end=new a$18,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,e$2b(e)&&e$2b(t)&&F$1j(this,e,t,n)}function e$26(e,t,i){this.minimum=o$1p.clone(u$_(e,o$1p.ZERO)),this.maximum=o$1p.clone(u$_(t,o$1p.ZERO)),i=e$2b(i)?o$1p.clone(i):o$1p.midpoint(this.minimum,this.maximum,new o$1p),this.center=i}Object.defineProperties(E$1s.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return o$1q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return o$1q.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return o$1q.defined("distance",this._distance),this._endHeading}}}),E$1s.prototype.setEndPoints=function(e,t){o$1q.defined("start",e),o$1q.defined("end",t),F$1j(this,e,t,this._ellipsoid)},E$1s.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},E$1s.prototype.interpolateUsingSurfaceDistance=function(e,t){o$1q.defined("distance",this._distance);var i=this._constants,n=i.distanceRatio+e/i.b,r=Math.cos(2*n),o=Math.cos(4*n),a=Math.cos(6*n),s=Math.sin(2*n),l=Math.sin(4*n),u=Math.sin(6*n),c=Math.sin(8*n),h=n*n,d=n*h,f=i.u8Over256,p=i.u2Over4,_=i.u6Over64,m=i.u4Over16,g=2*d*f*r/3+n*(1-p+7*m/4-15*_/4+579*f/64-(m-15*_/4+187*f/16)*r-(5*_/4-115*f/16)*o-29*f*a/16)+(p/2-m+71*_/32-85*f/16)*s+(5*m/16-5*_/4+383*f/96)*l-h*((_-11*f/2)*s+5*f*l/2)+(29*_/96-29*f/16)*u+539*f*c/1536,x=Math.asin(Math.sin(g)*i.cosineAlpha),v=Math.atan(i.a/i.b*Math.tan(x));g-=i.sigma;var y=Math.cos(2*i.sigma+g),$=Math.sin(g),b=Math.cos(g),T=i.cosineU*b,C=i.sineU*$,S=Math.atan2($*i.sineHeading,T-C*i.cosineHeading)-B$15(i.f,i.sineAlpha,i.cosineSquaredAlpha,g,$,b,y);return e$2b(t)?(t.longitude=this._start.longitude+S,t.latitude=v,t.height=0,t):new a$18(this._start.longitude+S,v,0)},e$26.fromPoints=function(e,t){if(e$2b(t)||(t=new e$26),!e$2b(e)||0===e.length)return t.minimum=o$1p.clone(o$1p.ZERO,t.minimum),t.maximum=o$1p.clone(o$1p.ZERO,t.maximum),t.center=o$1p.clone(o$1p.ZERO,t.center),t;for(var i=e[0].x,n=e[0].y,r=e[0].z,o=e[0].x,a=e[0].y,s=e[0].z,l=e.length,u=1;u<l;u++){var c=e[u],h=c.x,d=c.y,f=c.z;i=Math.min(h,i),o=Math.max(h,o),n=Math.min(d,n),a=Math.max(d,a),r=Math.min(f,r),s=Math.max(f,s)}var p=t.minimum;p.x=i,p.y=n,p.z=r;var _=t.maximum;return _.x=o,_.y=a,_.z=s,t.center=o$1p.midpoint(p,_,t.center),t},e$26.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.minimum=o$1p.clone(e.minimum,t.minimum),t.maximum=o$1p.clone(e.maximum,t.maximum),t.center=o$1p.clone(e.center,t.center),t):new e$26(e.minimum,e.maximum,e.center)},e$26.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&o$1p.equals(e.center,t.center)&&o$1p.equals(e.minimum,t.minimum)&&o$1p.equals(e.maximum,t.maximum)};var x$1m=new o$1p;e$26.intersectPlane=function(e,t){o$1q.defined("box",e),o$1q.defined("plane",t),x$1m=o$1p.subtract(e.maximum,e.minimum,x$1m);var i=o$1p.multiplyByScalar(x$1m,.5,x$1m),n=t.normal,r=i.x*Math.abs(n.x)+i.y*Math.abs(n.y)+i.z*Math.abs(n.z),o=o$1p.dot(e.center,n)+t.distance;return o-r>0?Ae$u.INSIDE:o+r<0?Ae$u.OUTSIDE:Ae$u.INTERSECTING},e$26.prototype.clone=function(e){return e$26.clone(this,e)},e$26.prototype.intersectPlane=function(e){return e$26.intersectPlane(this,e)},e$26.prototype.equals=function(e){return e$26.equals(this,e)};var m$1d={};function p$1b(e,t,i){var n=e+t;return e$2a.sign(e)!==e$2a.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))<i?0:n}m$1d.computeDiscriminant=function(e,t,i){if("number"!=typeof e)throw new t$16("a is a required number.");if("number"!=typeof t)throw new t$16("b is a required number.");if("number"!=typeof i)throw new t$16("c is a required number.");return t*t-4*e*i},m$1d.computeRealRoots=function(e,t,i){if("number"!=typeof e)throw new t$16("a is a required number.");if("number"!=typeof t)throw new t$16("b is a required number.");if("number"!=typeof i)throw new t$16("c is a required number.");var n;if(0===e)return 0===t?[]:[-i/t];if(0===t){if(0===i)return[0,0];var r=Math.abs(i),o=Math.abs(e);if(r<o&&r/o<e$2a.EPSILON14)return[0,0];if(r>o&&o/r<e$2a.EPSILON14)return[];if((n=-i/e)<0)return[];var a=Math.sqrt(n);return[-a,a]}if(0===i)return(n=-t/e)<0?[n,0]:[0,n];var s=p$1b(t*t,-(4*e*i),e$2a.EPSILON14);if(s<0)return[];var l=-.5*p$1b(t,e$2a.sign(t)*Math.sqrt(s),e$2a.EPSILON14);return t>0?[l/e,i/l]:[i/l,l/e]};var j$1g={};function k$1b(e,t,i,n){var r,o,a=e,s=t/3,l=i/3,u=n,c=a*l,h=s*u,d=s*s,f=l*l,p=a*l-d,_=a*u-s*l,m=s*u-f,g=4*p*m-_*_;if(g<0){var x,v,y;d*h>=c*f?(x=a,v=p,y=-2*s*p+a*_):(x=u,v=m,y=-u*_+2*l*m);var $=-(y<0?-1:1)*Math.abs(x)*Math.sqrt(-g),b=(o=-y+$)/2,T=b<0?-Math.pow(-b,1/3):Math.pow(b,1/3),C=o===$?-T:-v/T;return r=v<=0?T+C:-y/(T*T+C*C+v),d*h>=c*f?[(r-s)/a]:[-u/(r+l)]}var S=p,w=-2*s*p+a*_,E=m,P=-u*_+2*l*m,A=Math.sqrt(g),L=Math.sqrt(3)/2,M=Math.abs(Math.atan2(a*A,-w)/3);r=2*Math.sqrt(-S);var R=Math.cos(M);o=r*R;var O=r*(-R/2-L*Math.sin(M)),I=o+O>2*s?o-s:O-s,D=a,B=I/D;M=Math.abs(Math.atan2(u*A,-P)/3);var N=-u,F=(o=(r=2*Math.sqrt(-E))*(R=Math.cos(M)))+(O=r*(-R/2-L*Math.sin(M)))<2*l?o+l:O+l,U=N/F,G=-I*F-D*N,z=(l*G-s*(I*N))/(-s*G+l*(D*F));return B<=z?B<=U?z<=U?[B,z,U]:[B,U,z]:[U,B,z]:B<=U?[z,B,U]:z<=U?[z,U,B]:[U,z,B]}j$1g.computeDiscriminant=function(e,t,i,n){if("number"!=typeof e)throw new t$16("a is a required number.");if("number"!=typeof t)throw new t$16("b is a required number.");if("number"!=typeof i)throw new t$16("c is a required number.");if("number"!=typeof n)throw new t$16("d is a required number.");var r=t*t,o=i*i;return 18*e*t*i*n+r*o-27*(e*e)*(n*n)-4*(e*o*i+r*t*n)},j$1g.computeRealRoots=function(e,t,i,n){if("number"!=typeof e)throw new t$16("a is a required number.");if("number"!=typeof t)throw new t$16("b is a required number.");if("number"!=typeof i)throw new t$16("c is a required number.");if("number"!=typeof n)throw new t$16("d is a required number.");var r,o;if(0===e)return m$1d.computeRealRoots(t,i,n);if(0===t){if(0===i){if(0===n)return[0,0,0];var a=(o=-n/e)<0?-Math.pow(-o,1/3):Math.pow(o,1/3);return[a,a,a]}return 0===n?0===(r=m$1d.computeRealRoots(e,0,i)).Length?[0]:[r[0],0,r[1]]:k$1b(e,0,i,n)}return 0===i?0===n?(o=-t/e)<0?[o,0,0]:[0,0,o]:k$1b(e,t,0,n):0===n?0===(r=m$1d.computeRealRoots(e,t,i)).length?[0]:r[1]<=0?[r[0],r[1],0]:r[0]>=0?[0,r[0],r[1]]:[r[0],0,r[1]]:k$1b(e,t,i,n)};var F$1i={};function P$1d(e,t,i,n){var r=e*e,o=t-3*r/8,a=i-t*e/2+r*e/8,s=n-i*e/4+t*r/16-3*r*r/256,l=j$1g.computeRealRoots(1,2*o,o*o-4*s,-a*a);if(l.length>0){var u=-e/4,c=l[l.length-1];if(Math.abs(c)<e$2a.EPSILON14){var h=m$1d.computeRealRoots(1,o,s);if(2===h.length){var d,f=h[0],p=h[1];if(f>=0&&p>=0){var _=Math.sqrt(f),m=Math.sqrt(p);return[u-m,u-_,u+_,u+m]}if(f>=0&&p<0)return[u-(d=Math.sqrt(f)),u+d];if(f<0&&p>=0)return[u-(d=Math.sqrt(p)),u+d]}return[]}if(c>0){var g=Math.sqrt(c),x=(o+c-a/g)/2,v=(o+c+a/g)/2,y=m$1d.computeRealRoots(1,g,x),$=m$1d.computeRealRoots(1,-g,v);return 0!==y.length?(y[0]+=u,y[1]+=u,0!==$.length?($[0]+=u,$[1]+=u,y[1]<=$[0]?[y[0],y[1],$[0],$[1]]:$[1]<=y[0]?[$[0],$[1],y[0],y[1]]:y[0]>=$[0]&&y[1]<=$[1]?[$[0],y[0],y[1],$[1]]:$[0]>=y[0]&&$[1]<=y[1]?[y[0],$[0],$[1],y[1]]:y[0]>$[0]&&y[0]<$[1]?[$[0],y[0],$[1],y[1]]:[y[0],$[0],y[1],$[1]]):y):0!==$.length?($[0]+=u,$[1]+=u,$):[]}}return[]}function y$13(e,t,i,n){var r=e*e,o=-2*t,a=i*e+t*t-4*n,s=r*n-i*t*e+i*i,l=j$1g.computeRealRoots(1,o,a,s);if(l.length>0){var u,c,h,d,f,p,_=l[0],m=t-_,g=m*m,x=e/2,v=m/2,y=g-4*n,$=g+4*Math.abs(n),b=r-4*_,T=r+4*Math.abs(_);if(_<0||y*T<b*$){var C=Math.sqrt(b);u=C/2,c=0===C?0:(e*v-i)/C}else{var S=Math.sqrt(y);u=0===S?0:(e*v-i)/S,c=S/2}0===x&&0===u?(h=0,d=0):e$2a.sign(x)===e$2a.sign(u)?d=_/(h=x+u):h=_/(d=x-u),0===v&&0===c?(f=0,p=0):e$2a.sign(v)===e$2a.sign(c)?p=n/(f=v+c):f=n/(p=v-c);var w=m$1d.computeRealRoots(1,h,f),E=m$1d.computeRealRoots(1,d,p);if(0!==w.length)return 0!==E.length?w[1]<=E[0]?[w[0],w[1],E[0],E[1]]:E[1]<=w[0]?[E[0],E[1],w[0],w[1]]:w[0]>=E[0]&&w[1]<=E[1]?[E[0],w[0],w[1],E[1]]:E[0]>=w[0]&&E[1]<=w[1]?[w[0],E[0],E[1],w[1]]:w[0]>E[0]&&w[0]<E[1]?[E[0],w[0],E[1],w[1]]:[w[0],E[0],w[1],E[1]]:w;if(0!==E.length)return E}return[]}function f$17(e,t){t=o$1p.clone(u$_(t,o$1p.ZERO)),o$1p.equals(t,o$1p.ZERO)||o$1p.normalize(t,t),this.origin=o$1p.clone(u$_(e,o$1p.ZERO)),this.direction=t}F$1i.computeDiscriminant=function(e,t,i,n,r){if("number"!=typeof e)throw new t$16("a is a required number.");if("number"!=typeof t)throw new t$16("b is a required number.");if("number"!=typeof i)throw new t$16("c is a required number.");if("number"!=typeof n)throw new t$16("d is a required number.");if("number"!=typeof r)throw new t$16("e is a required number.");var o=e*e,a=t*t,s=a*t,l=i*i,u=l*i,c=n*n,h=c*n,d=r*r;return a*l*c-4*s*h-4*e*u*c+18*e*t*i*h-27*o*c*c+256*(o*e)*(d*r)+r*(18*s*i*n-4*a*u+16*e*l*l-80*e*t*l*n-6*e*a*c+144*o*i*c)+d*(144*e*a*i-27*a*a-128*o*l-192*o*t*n)},F$1i.computeRealRoots=function(e,t,i,n,r){if("number"!=typeof e)throw new t$16("a is a required number.");if("number"!=typeof t)throw new t$16("b is a required number.");if("number"!=typeof i)throw new t$16("c is a required number.");if("number"!=typeof n)throw new t$16("d is a required number.");if("number"!=typeof r)throw new t$16("e is a required number.");if(Math.abs(e)<e$2a.EPSILON15)return j$1g.computeRealRoots(t,i,n,r);var o=t/e,a=i/e,s=n/e,l=r/e,u=o<0?1:0;switch(u+=a<0?u+1:u,u+=s<0?u+1:u,u+=l<0?u+1:u){case 0:case 3:case 4:case 6:case 7:case 9:case 10:case 12:case 13:case 14:case 15:return P$1d(o,a,s,l);case 1:case 2:case 5:case 8:case 11:return y$13(o,a,s,l);default:return}},f$17.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.origin=o$1p.clone(e.origin),t.direction=o$1p.clone(e.direction),t):new f$17(e.origin,e.direction)},f$17.getPoint=function(e,t,i){return o$1q.typeOf.object("ray",e),o$1q.typeOf.number("t",t),e$2b(i)||(i=new o$1p),i=o$1p.multiplyByScalar(e.direction,t,i),o$1p.add(e.origin,i,i)};var g$1h={rayPlane:function(e,t,i){if(!e$2b(e))throw new t$16("ray is required.");if(!e$2b(t))throw new t$16("plane is required.");e$2b(i)||(i=new o$1p);var n=e.origin,r=e.direction,o=t.normal,a=o$1p.dot(o,r);if(!(Math.abs(a)<e$2a.EPSILON15)){var s=(-t.distance-o$1p.dot(o,n))/a;if(!(s<0))return i=o$1p.multiplyByScalar(r,s,i),o$1p.add(n,i,i)}}},or$b=new o$1p,dr$6=new o$1p,Y$Z=new o$1p,j$1f=new o$1p,H$1b=new o$1p;g$1h.rayTriangleParametric=function(e,t,i,n,r){if(!e$2b(e))throw new t$16("ray is required.");if(!e$2b(t))throw new t$16("p0 is required.");if(!e$2b(i))throw new t$16("p1 is required.");if(!e$2b(n))throw new t$16("p2 is required.");r=u$_(r,!1);var o,a,s,l,u,c=e.origin,h=e.direction,d=o$1p.subtract(i,t,or$b),f=o$1p.subtract(n,t,dr$6),p=o$1p.cross(h,f,Y$Z),_=o$1p.dot(d,p);if(r){if(_<e$2a.EPSILON6||(o=o$1p.subtract(c,t,j$1f),(s=o$1p.dot(o,p))<0||s>_)||(a=o$1p.cross(o,d,H$1b),(l=o$1p.dot(h,a))<0||s+l>_))return;u=o$1p.dot(f,a)/_}else{if(Math.abs(_)<e$2a.EPSILON6)return;var m=1/_;if(o=o$1p.subtract(c,t,j$1f),(s=o$1p.dot(o,p)*m)<0||s>1||(a=o$1p.cross(o,d,H$1b),(l=o$1p.dot(h,a)*m)<0||s+l>1))return;u=o$1p.dot(f,a)*m}return u},g$1h.rayTriangle=function(e,t,i,n,r,o){var a=g$1h.rayTriangleParametric(e,t,i,n,r);if(e$2b(a)&&!(a<0))return e$2b(o)||(o=new o$1p),o$1p.multiplyByScalar(e.direction,a,o),o$1p.add(e.origin,o,o)};var fr$5=new f$17;function vr$8(e,t,i,n){var r=t*t-4*e*i;if(!(r<0)){if(r>0){var o=1/(2*e),a=Math.sqrt(r),s=(-t+a)*o,l=(-t-a)*o;return s<l?(n.root0=s,n.root1=l):(n.root0=l,n.root1=s),n}var u=-t/(2*e);if(0!==u)return n.root0=n.root1=u,n}}g$1h.lineSegmentTriangle=function(e,t,i,n,r,o,a){if(!e$2b(e))throw new t$16("v0 is required.");if(!e$2b(t))throw new t$16("v1 is required.");if(!e$2b(i))throw new t$16("p0 is required.");if(!e$2b(n))throw new t$16("p1 is required.");if(!e$2b(r))throw new t$16("p2 is required.");var s=fr$5;o$1p.clone(e,s.origin),o$1p.subtract(t,e,s.direction),o$1p.normalize(s.direction,s.direction);var l=g$1h.rayTriangleParametric(s,i,n,r,o);if(!(!e$2b(l)||l<0||l>o$1p.distance(e,t)))return e$2b(a)||(a=new o$1p),o$1p.multiplyByScalar(s.direction,l,a),o$1p.add(s.origin,a,a)};var cr$6={root0:0,root1:0};function J$12(e,t,i){e$2b(i)||(i=new o$1n);var n=e.origin,r=e.direction,o=t.center,a=t.radius*t.radius,s=o$1p.subtract(n,o,Y$Z),l=vr$8(o$1p.dot(r,r),2*o$1p.dot(r,s),o$1p.magnitudeSquared(s)-a,cr$6);if(e$2b(l))return i.start=l.root0,i.stop=l.root1,i}g$1h.raySphere=function(e,t,i){if(!e$2b(e))throw new t$16("ray is required.");if(!e$2b(t))throw new t$16("sphere is required.");if(e$2b(i=J$12(e,t,i))&&!(i.stop<0))return i.start=Math.max(i.start,0),i};var ur$9=new f$17;g$1h.lineSegmentSphere=function(e,t,i,n){if(!e$2b(e))throw new t$16("p0 is required.");if(!e$2b(t))throw new t$16("p1 is required.");if(!e$2b(i))throw new t$16("sphere is required.");var r=ur$9;o$1p.clone(e,r.origin);var o=o$1p.subtract(t,e,r.direction),a=o$1p.magnitude(o);if(o$1p.normalize(o,o),!(!e$2b(n=J$12(r,i,n))||n.stop<0||n.start>a))return n.start=Math.max(n.start,0),n.stop=Math.min(n.stop,a),n};var sr$8=new o$1p,hr$5=new o$1p;function E$1r(e,t,i){var n=e+t;return e$2a.sign(e)!==e$2a.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))<i?0:n}function mr$7(e,t,i,n,r){var o,a=n*n,s=r*r,l=(e[p$1e.COLUMN1ROW1]-e[p$1e.COLUMN2ROW2])*s,u=r*(n*E$1r(e[p$1e.COLUMN1ROW0],e[p$1e.COLUMN0ROW1],e$2a.EPSILON15)+t.y),c=e[p$1e.COLUMN0ROW0]*a+e[p$1e.COLUMN2ROW2]*s+n*t.x+i,h=s*E$1r(e[p$1e.COLUMN2ROW1],e[p$1e.COLUMN1ROW2],e$2a.EPSILON15),d=r*(n*E$1r(e[p$1e.COLUMN2ROW0],e[p$1e.COLUMN0ROW2])+t.z),f=[];if(0===d&&0===h){if(0===(o=m$1d.computeRealRoots(l,u,c)).length)return f;var p=o[0],_=Math.sqrt(Math.max(1-p*p,0));if(f.push(new o$1p(n,r*p,r*-_)),f.push(new o$1p(n,r*p,r*_)),2===o.length){var m=o[1],g=Math.sqrt(Math.max(1-m*m,0));f.push(new o$1p(n,r*m,r*-g)),f.push(new o$1p(n,r*m,r*g))}return f}var x=d*d,v=h*h,y=d*h,$=l*l+v,b=2*(u*l+y),T=2*c*l+u*u-v+x,C=2*(c*u-y),S=c*c-x;if(0===$&&0===b&&0===T&&0===C)return f;var w=(o=F$1i.computeRealRoots($,b,T,C,S)).length;if(0===w)return f;for(var E=0;E<w;++E){var P=o[E],A=P*P,L=Math.max(1-A,0),M=Math.sqrt(L),R=(e$2a.sign(l)===e$2a.sign(c)?E$1r(l*A+c,u*P,e$2a.EPSILON12):e$2a.sign(c)===e$2a.sign(u*P)?E$1r(l*A,u*P+c,e$2a.EPSILON12):E$1r(l*A+u*P,c,e$2a.EPSILON12))*E$1r(h*P,d,e$2a.EPSILON15);R<0?f.push(new o$1p(n,r*P,r*M)):R>0?f.push(new o$1p(n,r*P,r*-M)):0!==M?(f.push(new o$1p(n,r*P,r*-M)),f.push(new o$1p(n,r*P,r*M)),++E):f.push(new o$1p(n,r*P,r*M))}return f}g$1h.rayEllipsoid=function(e,t){if(!e$2b(e))throw new t$16("ray is required.");if(!e$2b(t))throw new t$16("ellipsoid is required.");var i,n,r,o,a,s=t.oneOverRadii,l=o$1p.multiplyComponents(s,e.origin,sr$8),u=o$1p.multiplyComponents(s,e.direction,hr$5),c=o$1p.magnitudeSquared(l),h=o$1p.dot(l,u);if(c>1){if(h>=0)return;var d=h*h;if(i=c-1,d<(r=(n=o$1p.magnitudeSquared(u))*i))return;if(d>r){o=h*h-r;var f=(a=-h+Math.sqrt(o))/n,p=i/a;return f<p?new o$1n(f,p):{start:p,stop:f}}var _=Math.sqrt(i/n);return new o$1n(_,_)}return c<1?(i=c-1,o=h*h-(r=(n=o$1p.magnitudeSquared(u))*i),new o$1n(0,(a=-h+Math.sqrt(o))/n)):h<0?new o$1n(0,-h/(n=o$1p.magnitudeSquared(u))):void 0};var Z$1a=new o$1p,K$12=new o$1p,X$17=new o$1p,V$17=new o$1p,wr$4=new o$1p,gr$7=new p$1e,Sr$5=new p$1e,lr$9=new p$1e,qr$3=new p$1e,yr$6=new p$1e,$$18=new p$1e,k$1a=new p$1e,F$1h=new o$1p,Or$4=new o$1p,Mr$5=new a$18;g$1h.grazingAltitudeLocation=function(e,t){if(!e$2b(e))throw new t$16("ray is required.");if(!e$2b(t))throw new t$16("ellipsoid is required.");var i=e.origin,n=e.direction;if(!o$1p.equals(i,o$1p.ZERO)){var r=t.geodeticSurfaceNormal(i,Z$1a);if(o$1p.dot(n,r)>=0)return i}var o=e$2b(this.rayEllipsoid(e,t)),a=t.transformPositionToScaledSpace(n,Z$1a),s=o$1p.normalize(a,a),l=o$1p.mostOrthogonalAxis(a,V$17),u=o$1p.normalize(o$1p.cross(l,s,K$12),K$12),c=o$1p.normalize(o$1p.cross(s,u,X$17),X$17),h=gr$7;h[0]=s.x,h[1]=s.y,h[2]=s.z,h[3]=u.x,h[4]=u.y,h[5]=u.z,h[6]=c.x,h[7]=c.y,h[8]=c.z;var d=p$1e.transpose(h,Sr$5),f=p$1e.fromScale(t.radii,lr$9),p=p$1e.fromScale(t.oneOverRadii,qr$3),_=yr$6;_[0]=0,_[1]=-n.z,_[2]=n.y,_[3]=n.z,_[4]=0,_[5]=-n.x,_[6]=-n.y,_[7]=n.x,_[8]=0;var m,g,x=p$1e.multiply(p$1e.multiply(d,p,$$18),_,$$18),v=p$1e.multiply(p$1e.multiply(x,f,k$1a),h,k$1a),y=p$1e.multiplyByVector(x,i,wr$4),$=mr$7(v,o$1p.negate(y,Z$1a),0,0,1),b=$.length;if(b>0){for(var T=o$1p.clone(o$1p.ZERO,Or$4),C=Number.NEGATIVE_INFINITY,S=0;S<b;++S){m=p$1e.multiplyByVector(f,p$1e.multiplyByVector(h,$[S],F$1h),F$1h);var w=o$1p.normalize(o$1p.subtract(m,i,V$17),V$17),E=o$1p.dot(w,n);E>C&&(C=E,T=o$1p.clone(m,T))}var P=t.cartesianToCartographic(T,Mr$5);return C=e$2a.clamp(C,0,1),g=o$1p.magnitude(o$1p.subtract(T,i,V$17))*Math.sqrt(1-C*C),g=o?-g:g,P.height=g,t.cartographicToCartesian(P,new o$1p)}};var Pr$4=new o$1p;function o$1m(e,t){if(o$1q.typeOf.object("normal",e),!e$2a.equalsEpsilon(o$1p.magnitude(e),1,e$2a.EPSILON6))throw new t$16("normal must be normalized.");o$1q.typeOf.number("distance",t),this.normal=o$1p.clone(e),this.distance=t}g$1h.lineSegmentPlane=function(e,t,i,n){if(!e$2b(e))throw new t$16("endPoint0 is required.");if(!e$2b(t))throw new t$16("endPoint1 is required.");if(!e$2b(i))throw new t$16("plane is required.");e$2b(n)||(n=new o$1p);var r=o$1p.subtract(t,e,Pr$4),o=i.normal,a=o$1p.dot(o,r);if(!(Math.abs(a)<e$2a.EPSILON6)){var s=o$1p.dot(o,e),l=-(i.distance+s)/a;if(!(l<0||l>1))return o$1p.multiplyByScalar(r,l,n),o$1p.add(e,n,n),n}},g$1h.trianglePlaneIntersection=function(e,t,i,n){if(!(e$2b(e)&&e$2b(t)&&e$2b(i)&&e$2b(n)))throw new t$16("p0, p1, p2, and plane are required.");var r,o,a=n.normal,s=n.distance,l=o$1p.dot(a,e)+s<0,u=o$1p.dot(a,t)+s<0,c=o$1p.dot(a,i)+s<0,h=0;if(h+=l?1:0,h+=u?1:0,(1===(h+=c?1:0)||2===h)&&(r=new o$1p,o=new o$1p),1===h){if(l)return g$1h.lineSegmentPlane(e,t,n,r),g$1h.lineSegmentPlane(e,i,n,o),{positions:[e,t,i,r,o],indices:[0,3,4,1,2,4,1,4,3]};if(u)return g$1h.lineSegmentPlane(t,i,n,r),g$1h.lineSegmentPlane(t,e,n,o),{positions:[e,t,i,r,o],indices:[1,3,4,2,0,4,2,4,3]};if(c)return g$1h.lineSegmentPlane(i,e,n,r),g$1h.lineSegmentPlane(i,t,n,o),{positions:[e,t,i,r,o],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===h){if(!l)return g$1h.lineSegmentPlane(t,e,n,r),g$1h.lineSegmentPlane(i,e,n,o),{positions:[e,t,i,r,o],indices:[1,2,4,1,4,3,0,3,4]};if(!u)return g$1h.lineSegmentPlane(i,t,n,r),g$1h.lineSegmentPlane(e,t,n,o),{positions:[e,t,i,r,o],indices:[2,0,4,2,4,3,1,3,4]};if(!c)return g$1h.lineSegmentPlane(e,i,n,r),g$1h.lineSegmentPlane(t,i,n,o),{positions:[e,t,i,r,o],indices:[0,1,4,0,4,3,2,3,4]}}},o$1m.fromPointNormal=function(e,t,i){if(o$1q.typeOf.object("point",e),o$1q.typeOf.object("normal",t),!e$2a.equalsEpsilon(o$1p.magnitude(t),1,e$2a.EPSILON6))throw new t$16("normal must be normalized.");var n=-o$1p.dot(t,e);return e$2b(i)?(o$1p.clone(t,i.normal),i.distance=n,i):new o$1m(t,n)};var m$1c=new o$1p;o$1m.fromCartesian4=function(e,t){o$1q.typeOf.object("coefficients",e);var i=o$1p.fromCartesian4(e,m$1c),n=e.w;if(!e$2a.equalsEpsilon(o$1p.magnitude(i),1,e$2a.EPSILON6))throw new t$16("normal must be normalized.");return e$2b(t)?(o$1p.clone(i,t.normal),t.distance=n,t):new o$1m(i,n)},o$1m.getPointDistance=function(e,t){return o$1q.typeOf.object("plane",e),o$1q.typeOf.object("point",t),o$1p.dot(e.normal,t)+e.distance};var O$V=new o$1p;o$1m.projectPointOntoPlane=function(e,t,i){o$1q.typeOf.object("plane",e),o$1q.typeOf.object("point",t),e$2b(i)||(i=new o$1p);var n=o$1m.getPointDistance(e,t),r=o$1p.multiplyByScalar(e.normal,n,O$V);return o$1p.subtract(t,r,i)};var l$1h=new o$1p,H$1a,M$1c,S$11;function o$1l(e,t,i,n){return y$12(e).then(t,i,n)}function y$12(e){var t,i;return e instanceof _$16?t=e:T$1c(e)?(i=k$19(),e.then((function(e){i.resolve(e)}),(function(e){i.reject(e)}),(function(e){i.progress(e)})),t=i.promise):t=G$1m(e),t}function D$16(e){return o$1l(e,b$1j)}function _$16(e){this.then=e}function G$1m(e){var t=new _$16((function(t){try{return y$12(t?t(e):e)}catch(e){return b$1j(e)}}));return t}function b$1j(e){var t=new _$16((function(t,i){try{return i?y$12(i(e)):b$1j(e)}catch(e){return b$1j(e)}}));return t}function k$19(){var e,t,i,n,r,o;return e=new _$16(a),t=[],i=[],n=function(e,n,r){var o,a;return o=k$19(),a="function"==typeof r?function(e){try{o.progress(r(e))}catch(e){o.progress(e)}}:function(e){o.progress(e)},t.push((function(t){t.then(e,n).then(o.resolve,o.reject,a)})),i.push(a),o.promise},r=function(e){return Q$18(i,e),e},o=function(e){return e=y$12(e),n=e.then,o=y$12,r=P$1c,Q$18(t,e),i=t=S$11,e},{then:a,resolve:s,reject:l,progress:u,promise:e,resolver:{resolve:s,reject:l,progress:u}};function a(e,t,i){return n(e,t,i)}function s(e){return o(e)}function l(e){return o(b$1j(e))}function u(e){return r(e)}}function T$1c(e){return e&&"function"==typeof e.then}function A$1l(e,t,i,n,r){return E$1q(2,arguments),o$1l(e,(function(e){var o,a,s,l,u,c,h,d,f,p;if(f=e.length>>>0,o=Math.max(0,Math.min(t,f)),s=[],a=f-o+1,l=[],u=k$19(),o)for(d=u.progress,h=function(e){l.push(e),--a||(c=h=P$1c,u.reject(l))},c=function(e){s.push(e),--o||(c=h=P$1c,u.resolve(s))},p=0;p<f;++p)p in e&&o$1l(e[p],m,_,d);else u.resolve(s);return u.then(i,n,r);function _(e){h(e)}function m(e){c(e)}}))}function I$1w(e,t,i,n){return E$1q(1,arguments),o$1l(e,(function(e){var r,o,a,s,l,u,c,h,d;for(c=e.length>>>0,h=e.length>>>0,r=[],o=[],u=(a=k$19()).progress,l=function(e){o.push(e),--h||(s=l=P$1c,a.resolve(r))},s=function(e,t){r[t]=e,--h||(s=l=P$1c,a.resolve(r))},d=0;d<c;++d)switch(d){case 0:o$1l(e[d],_,f,u);break;case 1:o$1l(e[d],m,f,u);break;case 2:o$1l(e[d],g,f,u);break;case 3:o$1l(e[d],x,f,u);break;case 4:o$1l(e[d],v,f,u);break;default:o$1l(e[d],p,f,u)}return a.then(t,i,n);function f(e){l(e)}function p(e){s(e,0)}function _(e){s(e,0)}function m(e){s(e,1)}function g(e){s(e,2)}function x(e){s(e,3)}function v(e){s(e,4)}}))}function J$11(e,t,i,n){return A$1l(e,1,(function(e){return t?t(e[0]):e[0]}),i,n)}function L$1g(e,t,i,n){return E$1q(1,arguments),x$1l(e,q$1g).then(t,i,n)}function K$11(){return x$1l(arguments,q$1g)}function x$1l(e,t){return o$1l(e,(function(e){var i,n,r,o,a,s;if(r=n=e.length>>>0,i=[],s=k$19(),r)for(o=function(e,n){o$1l(e,t).then((function(e){i[n]=e,--r||s.resolve(i)}),s.reject)},a=0;a<n;a++)a in e?o(e[a],a):--r;else s.resolve(i);return s.promise}))}function N$_(e,t){var i=M$1c.call(arguments,1);return o$1l(e,(function(e){var n;return n=e.length,i[0]=function(e,i,r){return o$1l(e,(function(e){return o$1l(i,(function(i){return t(e,i,r,n)}))}))},H$1a.apply(e,i)}))}function U$1f(e,t,i){var n=arguments.length>2;return o$1l(e,(function(e){return e=n?i:e,t.resolve(e),e}),(function(e){return t.reject(e),b$1j(e)}),t.progress)}function Q$18(e,t){for(var i,n=0;i=e[n++];)i(t)}function E$1q(e,t){for(var i,n=t.length;n>e;)if(null!=(i=t[--n])&&"function"!=typeof i)throw new Error("arg "+n+" must be a function")}function P$1c(){}function q$1g(e){return e}function a$17(e,t,i){o$1q.defined("array",e),o$1q.defined("itemToFind",t),o$1q.defined("comparator",i);for(var n,r,o=0,a=e.length-1;o<=a;)if((r=i(e[n=~~((o+a)/2)],t))<0)o=n+1;else{if(!(r>0))return n;a=n-1}return~(a+1)}function n$1a(e,t,i,n,r){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=i,this.yPoleOffset=n,this.ut1MinusUtc=r}function $$17(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,t=arguments,i=0,n=t[i++],r=function(e,t,i,n){i||(i=" ");var r=e.length>=t?"":Array(1+t-e.length>>>0).join(i);return n?e+r:r+e},o=function(e,t,i,n,o,a){var s=n-e.length;return s>0&&(e=i||!o?r(e,n,a,i):e.slice(0,t.length)+r("",s,"0",!0)+e.slice(t.length)),e},a=function(e,t,i,n,a,s,l){var u=e>>>0;return e=(i=i&&u&&{2:"0b",8:"0",16:"0x"}[t]||"")+r(u.toString(t),s||0,"0",!1),o(e,i,n,a,l)},s=function(e,t,i,n,r,a){return null!=n&&(e=e.slice(0,n)),o(e,"",t,i,r,a)},l=function(e,n,l,u,c,h,d){var f,p,_,m,g;if("%%"==e)return"%";for(var x=!1,v="",y=!1,$=!1,b=" ",T=l.length,C=0;l&&C<T;C++)switch(l.charAt(C)){case" ":v=" ";break;case"+":v="+";break;case"-":x=!0;break;case"'":b=l.charAt(C+1);break;case"0":y=!0;break;case"#":$=!0}if((u=u?"*"==u?+t[i++]:"*"==u.charAt(0)?+t[u.slice(1,-1)]:+u:0)<0&&(u=-u,x=!0),!isFinite(u))throw new Error("sprintf: (minimum-)width must be finite");switch(h=h?"*"==h?+t[i++]:"*"==h.charAt(0)?+t[h.slice(1,-1)]:+h:"fFeE".indexOf(d)>-1?6:"d"==d?0:void 0,g=n?t[n.slice(0,-1)]:t[i++],d){case"s":return s(String(g),x,u,h,y,b);case"c":return s(String.fromCharCode(+g),x,u,h,y);case"b":return a(g,2,$,x,u,h,y);case"o":return a(g,8,$,x,u,h,y);case"x":return a(g,16,$,x,u,h,y);case"X":return a(g,16,$,x,u,h,y).toUpperCase();case"u":return a(g,10,$,x,u,h,y);case"i":case"d":return f=+g||0,g=(p=(f=Math.round(f-f%1))<0?"-":v)+r(String(Math.abs(f)),h,"0",!1),o(g,p,x,u,y);case"e":case"E":case"f":case"F":case"g":case"G":return p=(f=+g)<0?"-":v,_=["toExponential","toFixed","toPrecision"]["efg".indexOf(d.toLowerCase())],m=["toString","toUpperCase"]["eEfFgG".indexOf(d)%2],g=p+Math.abs(f)[_](h),o(g,p,x,u,y)[m]();default:return e}};return n.replace(e,l)}function d$1r(e,t,i,n,r,o,a,s){this.year=e,this.month=t,this.day=i,this.hour=n,this.minute=r,this.second=o,this.millisecond=a,this.isLeapSecond=s}function i$1b(e){if(null===e||isNaN(e))throw new t$16("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0}function a$16(e,t){this.julianDate=e,this.offset=t}o$1m.transform=function(e,t,i){return o$1q.typeOf.object("plane",e),o$1q.typeOf.object("transform",t),p$1d.multiplyByPointAsVector(t,e.normal,m$1c),o$1p.normalize(m$1c,m$1c),o$1p.multiplyByScalar(e.normal,-e.distance,l$1h),p$1d.multiplyByPoint(t,l$1h,l$1h),o$1m.fromPointNormal(l$1h,m$1c,i)},o$1m.clone=function(e,t){return o$1q.typeOf.object("plane",e),e$2b(t)?(o$1p.clone(e.normal,t.normal),t.distance=e.distance,t):new o$1m(e.normal,e.distance)},o$1m.equals=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.distance===t.distance&&o$1p.equals(e.normal,t.normal)},o$1m.ORIGIN_XY_PLANE=Object.freeze(new o$1m(o$1p.UNIT_Z,0)),o$1m.ORIGIN_YZ_PLANE=Object.freeze(new o$1m(o$1p.UNIT_X,0)),o$1m.ORIGIN_ZX_PLANE=Object.freeze(new o$1m(o$1p.UNIT_Y,0)),o$1l.defer=k$19,o$1l.resolve=y$12,o$1l.reject=D$16,o$1l.join=K$11,o$1l.all=L$1g,o$1l.map=x$1l,o$1l.reduce=N$_,o$1l.any=J$11,o$1l.some=A$1l,o$1l.allSettled=I$1w,o$1l.chain=U$1f,o$1l.isPromise=T$1c,_$16.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(S$11,e)},yield:function(e){return this.then((function(){return e}))},spread:function(e){return this.then((function(t){return L$1g(t,(function(t){return e.apply(S$11,t)}))}))}},M$1c=[].slice,H$1a=[].reduce||function(e){var t,i,n,r,o;if(o=0,r=(t=Object(this)).length>>>0,(i=arguments).length<=1)for(;;){if(o in t){n=t[o++];break}if(++o>=r)throw new TypeError}else n=i[1];for(;o<r;++o)o in t&&(n=e(n,t[o],o,t));return n};var E$1p={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5},h$17=Object.freeze(E$1p),e$25={UTC:0,TAI:1},H$19=Object.freeze(e$25),Z$19=new d$1r,U$1e=[31,28,31,30,31,30,31,31,30,31,30,31],b$1i=29;function H$18(e,t){return a$15.compare(e.julianDate,t.julianDate)}var O$U=new a$16;function q$1f(e){O$U.julianDate=e;var t=a$15.leapSeconds,i=a$17(t,O$U,H$18);i<0&&(i=~i),i>=t.length&&(i=t.length-1);var n=t[i].offset;i>0&&(a$15.secondsDifference(t[i].julianDate,e)>n&&(n=t[--i].offset));a$15.addSeconds(e,n,e)}function F$1g(e,t){O$U.julianDate=e;var i=a$15.leapSeconds,n=a$17(i,O$U,H$18);if(n<0&&(n=~n),0===n)return a$15.addSeconds(e,-i[0].offset,t);if(n>=i.length)return a$15.addSeconds(e,-i[n-1].offset,t);var r=a$15.secondsDifference(i[n].julianDate,e);return 0===r?a$15.addSeconds(e,-i[n].offset,t):r<=1?void 0:a$15.addSeconds(e,-i[--n].offset,t)}function I$1v(e,t,i){var n=t/h$17.SECONDS_PER_DAY|0;return e+=n,(t-=h$17.SECONDS_PER_DAY*n)<0&&(e--,t+=h$17.SECONDS_PER_DAY),i.dayNumber=e,i.secondsOfDay=t,i}function x$1k(e,t,i,n,r,o,a){var s=(t-14)/12|0,l=e+4800+s,u=(1461*l/4|0)+(367*(t-2-12*s)/12|0)-(3*((l+100)/100|0)/4|0)+i-32075;(n-=12)<0&&(n+=24);var c=o+(n*h$17.SECONDS_PER_HOUR+r*h$17.SECONDS_PER_MINUTE+a*h$17.SECONDS_PER_MILLISECOND);return c>=43200&&(u-=1),[u,c]}var V$16=/^(\d{4})$/,B$14=/^(\d{4})-(\d{2})$/,K$10=/^(\d{4})-?(\d{3})$/,Q$17=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,X$16=/^(\d{4})-?(\d{2})-?(\d{2})$/,G$1l=/([Z+\-])?(\d{2})?:?(\d{2})?$/,j$1e=/^(\d{2})(\.\d+)?/.source+G$1l.source,ee$B=/^(\d{2}):?(\d{2})(\.\d+)?/.source+G$1l.source,ne$L=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+G$1l.source,y$11="Invalid ISO 8601 date.";function a$15(e,t,i){this.dayNumber=void 0,this.secondsOfDay=void 0,e=u$_(e,0),t=u$_(t,0),i=u$_(i,H$19.UTC);var n=0|e;I$1v(n,t+=(e-n)*h$17.SECONDS_PER_DAY,this),i===H$19.UTC&&q$1f(this)}a$15.fromGregorianDate=function(e,t){if(!(e instanceof d$1r))throw new t$16("date must be a valid GregorianDate.");var i=x$1k(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return e$2b(t)?(I$1v(i[0],i[1],t),q$1f(t),t):new a$15(i[0],i[1],H$19.UTC)},a$15.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new t$16("date must be a valid JavaScript Date.");var i=x$1k(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return e$2b(t)?(I$1v(i[0],i[1],t),q$1f(t),t):new a$15(i[0],i[1],H$19.UTC)},a$15.fromIso8601=function(e,t){if("string"!=typeof e)throw new t$16(y$11);var i,n,r,o,a,s=(e=e.replace(",",".")).split("T"),l=1,u=1,c=0,h=0,d=0,f=0,p=s[0],_=s[1];if(!e$2b(p))throw new t$16(y$11);if(null!==(s=p.match(X$16))){if((o=p.split("-").length-1)>0&&2!==o)throw new t$16(y$11);i=+s[1],l=+s[2],u=+s[3]}else if(null!==(s=p.match(B$14)))i=+s[1],l=+s[2];else if(null!==(s=p.match(V$16)))i=+s[1];else{var m;if(null!==(s=p.match(K$10))){if(i=+s[1],m=+s[2],r=i$1b(i),m<1||r&&m>366||!r&&m>365)throw new t$16(y$11)}else{if(null===(s=p.match(Q$17)))throw new t$16(y$11);i=+s[1];var g=+s[2],x=+s[3]||0;if((o=p.split("-").length-1)>0&&(!e$2b(s[3])&&1!==o||e$2b(s[3])&&2!==o))throw new t$16(y$11);m=7*g+x-new Date(Date.UTC(i,0,4)).getUTCDay()-3}(n=new Date(Date.UTC(i,0,1))).setUTCDate(m),l=n.getUTCMonth()+1,u=n.getUTCDate()}if(r=i$1b(i),l<1||l>12||u<1||(2!==l||!r)&&u>U$1e[l-1]||r&&2===l&&u>b$1i)throw new t$16(y$11);if(e$2b(_)){if(null!==(s=_.match(ne$L))){if((o=_.split(":").length-1)>0&&2!==o&&3!==o)throw new t$16(y$11);c=+s[1],h=+s[2],d=+s[3],f=1e3*+(s[4]||0),a=5}else if(null!==(s=_.match(ee$B))){if((o=_.split(":").length-1)>2)throw new t$16(y$11);c=+s[1],h=+s[2],d=60*+(s[3]||0),a=4}else{if(null===(s=_.match(j$1e)))throw new t$16(y$11);c=+s[1],h=60*+(s[2]||0),a=3}if(h>=60||d>=61||c>24||24===c&&(h>0||d>0||f>0))throw new t$16(y$11);var v=s[a],y=+s[a+1],$=+(s[a+2]||0);switch(v){case"+":c-=y,h-=$;break;case"-":c+=y,h+=$;break;case"Z":break;default:h+=new Date(Date.UTC(i,l-1,u,c,h)).getTimezoneOffset()}}var b=60===d;for(b&&d--;h>=60;)h-=60,c++;for(;c>=24;)c-=24,u++;for(n=r&&2===l?b$1i:U$1e[l-1];u>n;)u-=n,++l>12&&(l-=12,i++),n=r&&2===l?b$1i:U$1e[l-1];for(;h<0;)h+=60,c--;for(;c<0;)c+=24,u--;for(;u<1;)--l<1&&(l+=12,i--),u+=n=r&&2===l?b$1i:U$1e[l-1];var T=x$1k(i,l,u,c,h,d,f);return e$2b(t)?(I$1v(T[0],T[1],t),q$1f(t)):t=new a$15(T[0],T[1],H$19.UTC),b&&a$15.addSeconds(t,1,t),t},a$15.now=function(e){return a$15.fromDate(new Date,e)};var g$1g=new a$15(0,0,H$19.TAI);function h$16(e){if(e instanceof h$16)this.scheme=e.scheme,this.authority=e.authority,this.path=e.path,this.query=e.query,this.fragment=e.fragment;else if(e){var t=o$1k.exec(e);this.scheme=t[1],this.authority=t[2],this.path=t[3],this.query=t[4],this.fragment=t[5]}}a$15.toGregorianDate=function(e,t){if(!e$2b(e))throw new t$16("julianDate is required.");var i=!1,n=F$1g(e,g$1g);e$2b(n)||(a$15.addSeconds(e,-1,g$1g),n=F$1g(g$1g,g$1g),i=!0);var r=n.dayNumber,o=n.secondsOfDay;o>=43200&&(r+=1);var a=r+68569|0,s=4*a/146097|0,l=4e3*((a=a-((146097*s+3)/4|0)|0)+1)/1461001|0,u=80*(a=a-(1461*l/4|0)+31|0)/2447|0,c=a-(2447*u/80|0)|0,h=u+2-12*(a=u/11|0)|0,d=100*(s-49)+l+a|0,f=o/h$17.SECONDS_PER_HOUR|0,p=o-f*h$17.SECONDS_PER_HOUR,_=p/h$17.SECONDS_PER_MINUTE|0,m=0|(p-=_*h$17.SECONDS_PER_MINUTE),g=(p-m)/h$17.SECONDS_PER_MILLISECOND;return(f+=12)>23&&(f-=24),i&&(m+=1),e$2b(t)?(t.year=d,t.month=h,t.day=c,t.hour=f,t.minute=_,t.second=m,t.millisecond=g,t.isLeapSecond=i,t):new d$1r(d,h,c,f,_,m,g,i)},a$15.toDate=function(e){if(!e$2b(e))throw new t$16("julianDate is required.");var t=a$15.toGregorianDate(e,Z$19),i=t.second;return t.isLeapSecond&&(i-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,i,t.millisecond))},a$15.toIso8601=function(e,t){if(!e$2b(e))throw new t$16("julianDate is required.");var i=a$15.toGregorianDate(e,Z$19),n=i.year,r=i.month,o=i.day,a=i.hour,s=i.minute,l=i.second,u=i.millisecond;return 1e4===n&&1===r&&1===o&&0===a&&0===s&&0===l&&0===u&&(n=9999,r=12,o=31,a=24),e$2b(t)||0===u?e$2b(t)&&0!==t?$$17("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",n,r,o,a,s,l,(.01*u).toFixed(t).replace(".","").slice(0,t)):$$17("%04d-%02d-%02dT%02d:%02d:%02dZ",n,r,o,a,s,l):$$17("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",n,r,o,a,s,l,(.01*u).toString().replace(".",""))},a$15.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new a$15(e.dayNumber,e.secondsOfDay,H$19.TAI)},a$15.compare=function(e,t){if(!e$2b(e))throw new t$16("left is required.");if(!e$2b(t))throw new t$16("right is required.");var i=e.dayNumber-t.dayNumber;return 0!==i?i:e.secondsOfDay-t.secondsOfDay},a$15.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},a$15.equalsEpsilon=function(e,t,i){if(!e$2b(i))throw new t$16("epsilon is required.");return e===t||e$2b(e)&&e$2b(t)&&Math.abs(a$15.secondsDifference(e,t))<=i},a$15.totalDays=function(e){if(!e$2b(e))throw new t$16("julianDate is required.");return e.dayNumber+e.secondsOfDay/h$17.SECONDS_PER_DAY},a$15.secondsDifference=function(e,t){if(!e$2b(e))throw new t$16("left is required.");if(!e$2b(t))throw new t$16("right is required.");return(e.dayNumber-t.dayNumber)*h$17.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},a$15.daysDifference=function(e,t){if(!e$2b(e))throw new t$16("left is required.");if(!e$2b(t))throw new t$16("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/h$17.SECONDS_PER_DAY},a$15.computeTaiMinusUtc=function(e){O$U.julianDate=e;var t=a$15.leapSeconds,i=a$17(t,O$U,H$18);return i<0&&(i=~i,--i<0&&(i=0)),t[i].offset},a$15.addSeconds=function(e,t,i){if(!e$2b(e))throw new t$16("julianDate is required.");if(!e$2b(t))throw new t$16("seconds is required.");if(!e$2b(i))throw new t$16("result is required.");return I$1v(e.dayNumber,e.secondsOfDay+t,i)},a$15.addMinutes=function(e,t,i){if(!e$2b(e))throw new t$16("julianDate is required.");if(!e$2b(t))throw new t$16("minutes is required.");if(!e$2b(i))throw new t$16("result is required.");var n=e.secondsOfDay+t*h$17.SECONDS_PER_MINUTE;return I$1v(e.dayNumber,n,i)},a$15.addHours=function(e,t,i){if(!e$2b(e))throw new t$16("julianDate is required.");if(!e$2b(t))throw new t$16("hours is required.");if(!e$2b(i))throw new t$16("result is required.");var n=e.secondsOfDay+t*h$17.SECONDS_PER_HOUR;return I$1v(e.dayNumber,n,i)},a$15.addDays=function(e,t,i){if(!e$2b(e))throw new t$16("julianDate is required.");if(!e$2b(t))throw new t$16("days is required.");if(!e$2b(i))throw new t$16("result is required.");return I$1v(e.dayNumber+t,e.secondsOfDay,i)},a$15.lessThan=function(e,t){return a$15.compare(e,t)<0},a$15.lessThanOrEquals=function(e,t){return a$15.compare(e,t)<=0},a$15.greaterThan=function(e,t){return a$15.compare(e,t)>0},a$15.greaterThanOrEquals=function(e,t){return a$15.compare(e,t)>=0},a$15.prototype.clone=function(e){return a$15.clone(this,e)},a$15.prototype.equals=function(e){return a$15.equals(this,e)},a$15.prototype.equalsEpsilon=function(e,t){return a$15.equalsEpsilon(this,e,t)},a$15.prototype.toString=function(){return a$15.toIso8601(this)},a$15.leapSeconds=[new a$16(new a$15(2441317,43210,H$19.TAI),10),new a$16(new a$15(2441499,43211,H$19.TAI),11),new a$16(new a$15(2441683,43212,H$19.TAI),12),new a$16(new a$15(2442048,43213,H$19.TAI),13),new a$16(new a$15(2442413,43214,H$19.TAI),14),new a$16(new a$15(2442778,43215,H$19.TAI),15),new a$16(new a$15(2443144,43216,H$19.TAI),16),new a$16(new a$15(2443509,43217,H$19.TAI),17),new a$16(new a$15(2443874,43218,H$19.TAI),18),new a$16(new a$15(2444239,43219,H$19.TAI),19),new a$16(new a$15(2444786,43220,H$19.TAI),20),new a$16(new a$15(2445151,43221,H$19.TAI),21),new a$16(new a$15(2445516,43222,H$19.TAI),22),new a$16(new a$15(2446247,43223,H$19.TAI),23),new a$16(new a$15(2447161,43224,H$19.TAI),24),new a$16(new a$15(2447892,43225,H$19.TAI),25),new a$16(new a$15(2448257,43226,H$19.TAI),26),new a$16(new a$15(2448804,43227,H$19.TAI),27),new a$16(new a$15(2449169,43228,H$19.TAI),28),new a$16(new a$15(2449534,43229,H$19.TAI),29),new a$16(new a$15(2450083,43230,H$19.TAI),30),new a$16(new a$15(2450630,43231,H$19.TAI),31),new a$16(new a$15(2451179,43232,H$19.TAI),32),new a$16(new a$15(2453736,43233,H$19.TAI),33),new a$16(new a$15(2454832,43234,H$19.TAI),34),new a$16(new a$15(2456109,43235,H$19.TAI),35),new a$16(new a$15(2457204,43236,H$19.TAI),36),new a$16(new a$15(2457754,43237,H$19.TAI),37)],h$16.prototype.scheme=null,h$16.prototype.authority=null,h$16.prototype.path="",h$16.prototype.query=null,h$16.prototype.fragment=null;var o$1k=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");h$16.prototype.getScheme=function(){return this.scheme},h$16.prototype.getAuthority=function(){return this.authority},h$16.prototype.getPath=function(){return this.path},h$16.prototype.getQuery=function(){return this.query},h$16.prototype.getFragment=function(){return this.fragment},h$16.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},h$16.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query},h$16.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment},h$16.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(n$19,u$Y).replace(s$$,a$14)),this.path&&(this.path=this.path.replace(s$$,a$14)),this.query&&(this.query=this.query.replace(s$$,a$14)),this.fragment&&(this.fragment=this.fragment.replace(s$$,a$14))};var s$$=/%[0-9a-z]{2}/gi,p$1a=/[a-zA-Z0-9\-\._~]/,n$19=/(.*@)?([^@:]*)(:.*)?/;function a$14(e){var t=unescape(e);return p$1a.test(t)?t:e.toUpperCase()}function u$Y(e,t,i,n){return(t||"")+i.toLowerCase()+(n||"")}function n$18(e){return(0===e.length||"/"!==e[e.length-1])&&(e+="/"),e}function l$1g(e,t){if(null===e||"object"!=typeof e)return e;t=u$_(t,!1);var i=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t&&(r=l$1g(r,t)),i[n]=r}return i}function p$19(e,t,i){i=u$_(i,!1);var n,r,o,a={},s=e$2b(e),l=e$2b(t);if(s)for(n in e)e.hasOwnProperty(n)&&(r=e[n],l&&i&&"object"==typeof r&&t.hasOwnProperty(n)?(o=t[n],a[n]="object"==typeof o?p$19(r,o,i):r):a[n]=r);if(l)for(n in t)t.hasOwnProperty(n)&&!a.hasOwnProperty(n)&&(o=t[n],a[n]=o);return a}function o$1j(e,t){var i;return typeof document<"u"&&(i=document),o$1j._implementation(e,t,i)}function i$1a(e,t){if(!e$2b(e))throw new t$16("uri is required.");var i="",n=e.lastIndexOf("/");return-1!==n&&(i=e.substring(0,n+1)),t&&(e$2b((e=new h$16(e)).query)&&(i+="?"+e.query),e$2b(e.fragment)&&(i+="#"+e.fragment)),i}function a$13(e){if(!e$2b(e))throw new t$16("uri is required.");var t=new h$16(e);t.normalize();var i=t.path,n=i.lastIndexOf("/");return-1!==n&&(i=i.substr(n+1)),n=i.lastIndexOf("."),i=-1===n?"":i.substr(n+1)}h$16.prototype.resolve=function(e){var t=new h$16;return this.scheme?(t.scheme=this.scheme,t.authority=this.authority,t.path=this.path,t.query=this.query):(t.scheme=e.scheme,this.authority?(t.authority=this.authority,t.path=this.path,t.query=this.query):(t.authority=e.authority,""==this.path?(t.path=e.path,t.query=this.query||e.query):("/"==this.path.charAt(0)?(t.path=this.path,t.removeDotSegments()):(e.authority&&""==e.path?t.path="/"+this.path:t.path=e.path.substring(0,e.path.lastIndexOf("/")+1)+this.path,t.removeDotSegments()),t.query=this.query))),t.fragment=this.fragment,t},h$16.prototype.removeDotSegments=function(){var e,t=this.path.split("/"),i=[],n=""==t[0];n&&t.shift();for(""==t[0]&&t.shift();t.length;)".."==(e=t.shift())?i.pop():"."!=e&&i.push(e);("."==e||".."==e)&&i.push(""),n&&i.unshift(""),this.path=i.join("/")},h$16.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e},o$1j._implementation=function(e,t,i){if(!e$2b(e))throw new t$16("relative uri is required.");if(!e$2b(t)){if(typeof i>"u")return e;t=u$_(i.baseURI,i.location.href)}var n=new h$16(t);return new h$16(e).resolve(n).toString()};var e$24=/^blob:/i,o$1i;function i$19(e){return o$1q.typeOf.string("uri",e),e$24.test(e)}function i$18(e){e$2b(o$1i)||(o$1i=document.createElement("a")),o$1i.href=window.location.href;var t=o$1i.host,i=o$1i.protocol;return o$1i.href=e,o$1i.href=o$1i.href,i!==o$1i.protocol||t!==o$1i.host}var a$12=/^data:/i;function e$23(e){return o$1q.typeOf.string("uri",e),a$12.test(e)}function a$11(e){var t=o$1l.defer(),i=document.createElement("script");i.async=!0,i.src=e;var n=document.getElementsByTagName("head")[0];return i.onload=function(){i.onload=void 0,n.removeChild(i),t.resolve()},i.onerror=function(e){t.reject(e)},n.appendChild(i),t.promise}function m$1b(e,t){if(!e$2b(e))throw new t$16("obj is required.");var i="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=encodeURIComponent(n)+"=";if(Array.isArray(r))for(var a=0,s=r.length;a<s;++a)i+=!0===t?o+encodeURI(r[a])+"&":o+encodeURIComponent(r[a])+"&";else i+=!0===t?o+encodeURI(r)+"&":o+encodeURIComponent(r)+"&"}return i=i.slice(0,-1)}function m$1a(e){if(!e$2b(e))throw new t$16("queryString is required.");var t={};if(""===e)return t;for(var i=e.replace(/\+/g,"%20").split(/[&;]/),n=0,r=i.length;n<r;++n){var o=i[n].split("=");if(o.length>2){var a=i[n].indexOf("=");o=[i[n].substring(0,a),i[n].substring(a+1,i[n].length)]}var s=decodeURIComponent(o[0]),l=o[1];l=e$2b(l)?decodeURIComponent(l):"";var u=t[s];"string"==typeof u?t[s]=[u,l]:Array.isArray(u)?u.push(l):t[s]=l}return t}var e$22={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},W$1c=Object.freeze(e$22),e$21={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3,PACK:4,BLOCK:5,BLOCKPACK:6},V$15=Object.freeze(e$21),e$20;function r$1b(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.throttleByServer,!1),i=u$_(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=u$_(e.priority,0),this.throttle=i,this.throttleByServer=t,this.type=u$_(e.type,V$15.OTHER),this.serverKey=void 0,this.state=W$1c.UNISSUED,this.deferred=void 0,this.cancelled=!1}function n$17(e){var t={};if(!e)return t;for(var i=e.split("\r\n"),n=0;n<i.length;++n){var r=i[n],o=r.indexOf(": ");if(o>0){var a=r.substring(0,o),s=r.substring(o+2);t[a]=s}}return t}function s$_(e,t,i){this.statusCode=e,this.response=t,this.responseHeaders=i,"string"==typeof this.responseHeaders&&(this.responseHeaders=n$17(this.responseHeaders))}function o$1h(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function v$Z(e,t){return t-e}function o$1g(e){o$1q.typeOf.object("options",e),o$1q.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function m$19(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}r$1b.prototype.cancel=function(){this.cancelled=!0},r$1b.prototype.clone=function(e){return e$2b(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new r$1b(this)},s$_.prototype.toString=function(){var e="Request has failed.";return e$2b(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e},Object.defineProperties(o$1h.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),o$1h.prototype.addEventListener=function(e,t){o$1q.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);var i=this;return function(){i.removeEventListener(e,t)}},o$1h.prototype.removeEventListener=function(e,t){o$1q.typeOf.func("listener",e);for(var i=this._listeners,n=this._scopes,r=-1,o=0;o<i.length;o++)if(i[o]===e&&n[o]===t){r=o;break}return-1!==r&&(this._insideRaiseEvent?(this._toRemove.push(r),i[r]=void 0,n[r]=void 0):(i.splice(r,1),n.splice(r,1)),!0)},o$1h.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;var e,t=this._listeners,i=this._scopes,n=t.length;for(e=0;e<n;e++){var r=t[e];e$2b(r)&&t[e].apply(i[e],arguments)}var o=this._toRemove;if((n=o.length)>0){for(o.sort(v$Z),e=0;e<n;e++){var a=o[e];t.splice(a,1),i.splice(a,1)}o.length=0}this._insideRaiseEvent=!1},Object.defineProperties(o$1g.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){this._maximumLength=e,this._length>e&&e>0&&(this._length=e,this._array.length=e)}},comparator:{get:function(){return this._comparator}}}),o$1g.prototype.reserve=function(e){e=u$_(e,this._length),this._array.length=e},o$1g.prototype.heapify=function(e){e=u$_(e,0);for(var t=this._length,i=this._comparator,n=this._array,r=-1,o=!0;o;){var a=2*(e+1),s=a-1;r=s<t&&i(n[s],n[e])<0?s:e,a<t&&i(n[a],n[r])<0&&(r=a),r!==e?(m$19(n,r,e),e=r):o=!1}},o$1g.prototype.resort=function(){for(var e=this._length,t=Math.ceil(e/2);t>=0;--t)this.heapify(t)},o$1g.prototype.insert=function(e){o$1q.defined("element",e);var t,i=this._array,n=this._comparator,r=this._maximumLength,o=this._length++;for(o<i.length?i[o]=e:i.push(e);0!==o;){var a=Math.floor((o-1)/2);if(!(n(i[o],i[a])<0))break;m$19(i,o,a),o=a}return e$2b(r)&&this._length>r&&(t=i[r],i.pop(),this._length=r),t},o$1g.prototype.pop=function(e){if(e=u$_(e,0),0!==this._length){o$1q.typeOf.number.lessThan("index",e,this._length);var t=this._array,i=t[e];return m$19(t,e,--this._length),t[this._length]=void 0,this.heapify(e),i}},e$20=typeof performance<"u"&&"function"==typeof performance.now&&isFinite(performance.now())?function(){return performance.now()}:function(){return Date.now()};var Et$a=e$20;function S$10(e,t){return e.priority-t.priority}var i$17={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0,totalRequestTime:0},b$1h=20,o$1f=new o$1g({comparator:S$10});o$1f.maximumLength=b$1h,o$1f.reserve(b$1h);var c$18=[],v$Y={},I$1u=typeof document<"u"?new h$16(document.location.href):new h$16,k$18=new o$1h;function r$1a(){}function K$$(e){e$2b(e.priorityFunction)&&(e.priority=e.priorityFunction())}function C$1g(e){var t=u$_(r$1a.requestsByServer[e],r$1a.maximumRequestsPerServer);return v$Y[e]<t}function q$1e(e){return e$2b(e.packKey)||(e.packKey=e.serverKey+"_"+e.providerName),e.packKey}function L$1f(e){return e$2b(e.blockKey)||(e.blockKey=e.serverKey+"_"+e.providerName+"_"+e.quadKey+e.url.substring(e.url.indexOf("dataVersion"))),e.blockKey}function N$Z(e){var t=q$1e(e);return e$2b(r$1a.packRequestGroup[t])||(r$1a.packRequestGroup[t]=[]),e$2b(r$1a.packRequestQuadKey[t])||(r$1a.packRequestQuadKey[t]=""),e$2b(r$1a.packRequestPromise[t])||(r$1a.packRequestPromise[t]=o$1l.defer()),e$2b(r$1a.quadKeyIndex[t])||(r$1a.quadKeyIndex[t]=0),e.quadKeyIndex=r$1a.quadKeyIndex[t]++,e.deferred=r$1a.packRequestPromise[t],e.state=W$1c.ISSUED,r$1a.packRequestGroup[t].push(e),e.deferred.promise}function T$1b(e){var t=L$1f(e),i=r$1a.blockDefer[t];return e$2b(i)||(i=r$1a.blockDefer[t]=o$1l.defer(),r$1a.blockRequest[t]=e),e.deferred=i,e.state=W$1c.ISSUED,e.deferred.promise}function H$17(){r$1a.packRequestGroup={},r$1a.packRequestPromise={},r$1a.packRequestQuadKey={},r$1a.quadKeyIndex={}}function U$1d(){r$1a.blockRequest={}}function Q$16(e){for(var t=0,i=e.length;t<i;t++){e[t].state=W$1c.CANCELLED}}function j$1d(e){for(var t=[],i={},n=0,r=e.length;n<r;n++){var o=e[n];if(!o.cancelled){var a=o.quadKey;i[a]||(i[a]=!0,t.push(a))}}return t}function V$14(){var e=r$1a.packRequestGroup;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];if(i.length<1)continue;var n=i[0].clone(),r=-1!==n.url.indexOf("rest/maps");n.serverKey=i[0].serverKey,n.state=i[0].state;var o=n.url,a=j$1d(i);if(a.length<1)continue;r$1a.packRequestQuadKey[t]=r?a.join(","):a.join(";");var s=r$1a.packRequestQuadKey[t];if(n.throttleByServer&&!C$1g(n.serverKey)){Q$16(i),r$1a.packRequestPromise[t].reject();continue}n.deferred=r$1a.packRequestPromise[t];var l=new h$16(o);l.query=r?e$2b(l.query)?l.query+"&tiles="+s:"tiles="+s:e$2b(l.query)?l.query+"&extratiles="+s:"extratiles="+s,n.url=l.toString(),A$1k(n,n.url)}H$17()}function _$15(){var e=r$1a.blockRequest;for(var t in e)if(e.hasOwnProperty(t)){A$1k(e[t])}U$1d()}function x$1j(e){if(e.state===W$1c.UNISSUED)if(e.state=W$1c.ISSUED,e.type===V$15.PACK||e.type===V$15.BLOCKPACK){var t=q$1e(e);e$2b(r$1a.packRequestPromise[t])||(r$1a.packRequestPromise[t]=o$1l.defer()),e.deferred=r$1a.packRequestPromise[t]}else e.deferred=o$1l.defer();return e.deferred.promise}function M$1b(e){return function(t){if(e.state!==W$1c.CANCELLED&&(--i$17.numberOfActiveRequests,--v$Y[e.serverKey],k$18.raiseEvent(),e.state=W$1c.RECEIVED,e.deferred.resolve(t),e.endTime=Et$a(),(r$1a.statisticRequestTime>0||e.type!==V$15.OTHER)&&(i$17.totalRequestTime+=e.endTime-e.startTime),e.type===V$15.BLOCK||e.type===V$15.BLOCKPACK)){var i=L$1f(e);e$2b(r$1a.blockDefer[i])&&(r$1a.blockDefer[i]=void 0,delete r$1a.blockDefer[i])}}}function z$13(e){return function(t){e.state!==W$1c.CANCELLED&&(++i$17.numberOfFailedRequests,--i$17.numberOfActiveRequests,--v$Y[e.serverKey],k$18.raiseEvent(t),e.state=W$1c.FAILED,e.deferred.reject(t))}}function A$1k(e,t){var i=x$1j(e);return e.state=W$1c.ACTIVE,c$18.push(e),++i$17.numberOfActiveRequests,++i$17.numberOfActiveRequestsEver,++v$Y[e.serverKey],e.startTime=Et$a(),e.requestFunction(t).then(M$1b(e)).otherwise(z$13(e)),i}function p$18(e){var t=e.state===W$1c.ACTIVE;e.state=W$1c.CANCELLED,++i$17.numberOfCancelledRequests,e.deferred.reject(),t&&(--i$17.numberOfActiveRequests,--v$Y[e.serverKey],++i$17.numberOfCancelledActiveRequests),e$2b(e.cancelFunction)&&e.cancelFunction()}function G$1k(){for(var e in r$1a.packRequestHeap)if(r$1a.packRequestHeap.hasOwnProperty(e)){for(var t=r$1a.packRequestHeap[e],i=t.internalArray,n=t.length,r=0;r<n;++r)K$$(i[r]);t.resort()}}function J$10(){for(var e in r$1a.packRequestHeap)if(r$1a.packRequestHeap.hasOwnProperty(e))for(var t=r$1a.packRequestHeap[e];t.length>0;){var i=t.pop();i.cancelled?p$18(i):N$Z(i)}V$14()}function W$1b(e){var t=q$1e(e),i=r$1a.packRequestHeap[t];return e$2b(i)||((i=r$1a.packRequestHeap[t]=new o$1g({comparator:S$10})).maximumLength=r$1a.perPacketCount,i.reserve(b$1h)),i}function X$15(){!r$1a.debugShowStatistics||(0===i$17.numberOfActiveRequests&&i$17.lastNumberOfActiveRequests>0&&(i$17.numberOfAttemptedRequests>0&&(console.log("Number of attempted requests: "+i$17.numberOfAttemptedRequests),i$17.numberOfAttemptedRequests=0),i$17.numberOfCancelledRequests>0&&(console.log("Number of cancelled requests: "+i$17.numberOfCancelledRequests),i$17.numberOfCancelledRequests=0),i$17.numberOfCancelledActiveRequests>0&&(console.log("Number of cancelled active requests: "+i$17.numberOfCancelledActiveRequests),i$17.numberOfCancelledActiveRequests=0),i$17.numberOfFailedRequests>0&&(console.log("Number of failed requests: "+i$17.numberOfFailedRequests),i$17.numberOfFailedRequests=0)),i$17.lastNumberOfActiveRequests=i$17.numberOfActiveRequests)}r$1a.TIMEOUT=5e3,r$1a.CANCLE_COUNT=3,r$1a.statisticRequestTime=-1,r$1a.maximumRequests=50,r$1a.maximumRequestsPerServer=6,r$1a.perPacketCount=20,r$1a.requestsByServer={},r$1a.throttleRequests=!0,r$1a.debugShowStatistics=!1,r$1a.requestCompletedEvent=k$18,Object.defineProperties(r$1a,{activeRequestLength:{get:function(){return c$18.length}},statistics:{get:function(){return i$17}},priorityHeapLength:{get:function(){return b$1h},set:function(e){if(e<b$1h)for(;o$1f.length>e;){p$18(o$1f.pop())}b$1h=e,o$1f.maximumLength=e,o$1f.reserve(e)}}}),r$1a.packRequestGroup={},r$1a.packRequestPromise={},r$1a.packRequestQuadKey={},r$1a.quadKeyIndex={},r$1a.packRequestHeap={},r$1a.blockDefer={},r$1a.blockRequest={},r$1a.update=function(){var e,t,i=0,n=c$18.length;for(e=0;e<n;++e)(t=c$18[e]).cancelled&&p$18(t),t.state===W$1c.ACTIVE?i>0&&(c$18[e-i]=t):++i;c$18.length-=i;var r=o$1f.internalArray,o=o$1f.length;for(e=0;e<o;++e)K$$(r[e]);o$1f.resort(),G$1k(),_$15(),J$10();for(var a=Math.max(r$1a.maximumRequests-c$18.length,0),s=0;s<a&&o$1f.length>0;)(t=o$1f.pop()).cancelled?p$18(t):!t.throttleByServer||C$1g(t.serverKey)?(A$1k(t),++s):p$18(t);X$15()},r$1a.getServerKey=function(e){o$1q.typeOf.string("url",e);var t=new h$16(e).resolve(I$1u);t.normalize();var i=t.authority;return/:/.test(i)||(i=i+":"+("https"===t.scheme?"443":"80")),e$2b(v$Y[i])||(v$Y[i]=0),i},r$1a.request=function(e){if(o$1q.typeOf.object("request",e),o$1q.typeOf.string("request.url",e.url),o$1q.typeOf.func("request.requestFunction",e.requestFunction),e$23(e.url)||i$19(e.url))return k$18.raiseEvent(),e.state=W$1c.RECEIVED,e.requestFunction();if(++i$17.numberOfAttemptedRequests,e$2b(e.serverKey)||(e.serverKey=r$1a.getServerKey(e.url)),e.type===V$15.BLOCK)return T$1b(e);if(!e.throttleByServer||C$1g(e.serverKey)){if(!r$1a.throttleRequests||!e.throttle)return A$1k(e);if(!(c$18.length>=r$1a.maximumRequests)){var t;if(K$$(e),e.type===V$15.PACK||e.type===V$15.BLOCKPACK){var i=W$1b(e),n=!0;if(e.type===V$15.BLOCKPACK)for(var r=0;r<i.length;r++)if(i._array[r].quadKey===e.quadKey){e.blockRequest=i._array[r],n=!1;break}n&&(t=i.insert(e))}else t=o$1f.insert(e);if(e$2b(t)){if(t===e)return;p$18(t)}return x$1j(e)}}},r$1a.clearForSpecs=function(){for(;o$1f.length>0;){p$18(o$1f.pop())}for(var e=c$18.length,t=0;t<e;++t)p$18(c$18[t]);c$18.length=0,v$Y={},i$17.numberOfAttemptedRequests=0,i$17.numberOfActiveRequests=0,i$17.numberOfCancelledRequests=0,i$17.numberOfCancelledActiveRequests=0,i$17.numberOfFailedRequests=0,i$17.numberOfActiveRequestsEver=0,i$17.lastNumberOfActiveRequests=0,i$17.totalRequestTime=0},r$1a.numberOfActiveRequestsByServer=function(e){return v$Y[e]},r$1a.requestHeap=o$1f;var u$X={},n$16={};function w$17(e){var t=new h$16(e);t.normalize();var i=t.getAuthority();if(e$2b(i)){if(-1!==i.indexOf("@")){var n=i.split("@");i=n[1]}if(-1===i.indexOf(":")){var r=t.getScheme();if(e$2b(r)||(r=(r=window.location.protocol).substring(0,r.length-1)),"http"===r)i+=":80";else{if("https"!==r)return;i+=":443"}}return i}}u$X.add=function(e,t){if(!e$2b(e))throw new t$16("host is required.");if(!e$2b(t)||t<=0)throw new t$16("port is required to be greater than 0.");var i=e.toLowerCase()+":"+t;e$2b(n$16[i])||(n$16[i]=!0)},u$X.remove=function(e,t){if(!e$2b(e))throw new t$16("host is required.");if(!e$2b(t)||t<=0)throw new t$16("port is required to be greater than 0.");var i=e.toLowerCase()+":"+t;e$2b(n$16[i])&&delete n$16[i]},u$X.contains=function(e){if(!e$2b(e))throw new t$16("url is required.");var t=w$17(e);return!(!e$2b(t)||!e$2b(n$16[t]))},u$X.clear=function(){n$16={}};var i$16={};function e$1$(e,t){if(!e$2b(e))throw new t$16("identifier is required.");e$2b(i$16[e])||(i$16[e]=!0,console.warn(u$_(t,e)))}function t$12(e,t){if(!e$2b(e)||!e$2b(t))throw new t$16("identifier and message are required.");e$1$(e,t)}e$1$.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",e$1$.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",e$1$.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",e$1$.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var k$17=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch{return!1}}(),_$14;function x$1i(e,t,i,n){var r,o=e.query;if(!e$2b(o)||0===o.length)return{};if(-1===o.indexOf("=")){var a={};a[o]=void 0,r=a}else r=m$1a(o);t._queryParameters=i?O$T(r,t._queryParameters,n):r,e.query=void 0}function re$I(e,t){var i=t._queryParameters,n=Object.keys(i);1!==n.length||e$2b(i[n[0]])?e.query=m$1b(i):e.query=n[0]}function v$X(e,t){return e$2b(e)?e$2b(e.clone)?e.clone():l$1g(e):t}function C$1f(e){if(e.state===W$1c.ISSUED||e.state===W$1c.ACTIVE)throw new t$14("The Resource is already being fetched.");e.state=W$1c.UNISSUED,e.deferred=void 0}function O$T(e,t,i){if(!i)return p$19(e,t);var n=l$1g(e,!0);for(var r in t)if(t.hasOwnProperty(r)){var o=n[r],a=t[r];e$2b(o)?(Array.isArray(o)||(o=n[r]=[o]),n[r]=o.concat(a)):n[r]=Array.isArray(a)?a.slice():a}return n}function t$11(e){"string"==typeof(e=u$_(e,u$_.EMPTY_OBJECT))&&(e={url:e}),o$1q.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=v$X(e.templateValues,{}),this._queryParameters=v$X(e.queryParameters,{}),this.headers=v$X(e.headers,{}),this.request=u$_(e.request,new r$1b),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=u$_(e.retryAttempts,0),this._retryCount=0;var t=new h$16(e.url);x$1i(t,this,!0,!0),t.fragment=void 0,this._url=t.toString()}function j$1c(e){var t=e.resource,i=e.flipY,n=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){var e=!1;!t.isDataUri&&!t.isBlobUri&&(e=t.isCrossOriginUrl);var o=o$1l.defer();return t$11._Implementations.createImage(r,e,o,i,n),o.promise};var o=r$1a.request(r);if(e$2b(o))return o.otherwise((function(e){return r.state!==W$1c.FAILED?o$1l.reject(e):t.retryOnError(e).then((function(o){return o?(r.state=W$1c.UNISSUED,r.deferred=void 0,j$1c({resource:t,flipY:i,preferImageBitmap:n})):o$1l.reject(e)}))}))}function L$1e(e,t,i){var n={};n[t]=i,e.setQueryParameters(n);var r=e.request;r.url=e.url,r.requestFunction=function(){var t=o$1l.defer();return window[i]=function(e){t.resolve(e);try{delete window[i]}catch{window[i]=void 0}},t$11._Implementations.loadAndExecuteScript(e.url,i,t),t.promise};var o=r$1a.request(r);if(e$2b(o))return o.otherwise((function(n){return r.state!==W$1c.FAILED?o$1l.reject(n):e.retryOnError(n).then((function(o){return o?(r.state=W$1c.UNISSUED,r.deferred=void 0,L$1e(e,t,i)):o$1l.reject(n)}))}))}t$11.createIfNeeded=function(e){return e instanceof t$11?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new t$11({url:e})},t$11.supportsImageBitmapOptions=function(){if(e$2b(_$14))return _$14;if("function"!=typeof createImageBitmap)return _$14=o$1l.resolve(!1);return _$14=t$11.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then((function(e){return createImageBitmap(e,{imageOrientation:"flipY",premultiplyAlpha:"none"})})).then((function(e){return!0})).otherwise((function(){return!1})),_$14},Object.defineProperties(t$11,{isBlobSupported:{get:function(){return k$17}}}),Object.defineProperties(t$11.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){var t=new h$16(e);x$1i(t,this,!1),t.fragment=void 0,this._url=t.toString()}},extension:{get:function(){return a$13(this._url)}},isDataUri:{get:function(){return e$23(this._url)}},isBlobUri:{get:function(){return i$19(this._url)}},isCrossOriginUrl:{get:function(){return i$18(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}}),t$11.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;var i=new h$16(this._url);e&&re$I(i,this);var n=i.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),r=this._templateValues;return n=n.replace(/{(.*?)}/g,(function(e,t){var i=r[t];return e$2b(i)?encodeURIComponent(i):e})),t&&e$2b(this.proxy)&&(n=this.proxy.getURL(n)),n},t$11.prototype.setQueryParameters=function(e,t){this._queryParameters=t?O$T(this._queryParameters,e,!1):O$T(e,this._queryParameters,!1)},t$11.prototype.appendQueryParameters=function(e){this._queryParameters=O$T(e,this._queryParameters,!0)},t$11.prototype.setTemplateValues=function(e,t){this._templateValues=t?p$19(this._templateValues,e):p$19(e,this._templateValues)},t$11.prototype.getDerivedResource=function(e){var t=this.clone();if(t._retryCount=0,e$2b(e.url)){var i=new h$16(e.url);x$1i(i,t,!0,u$_(e.preserveQueryParameters,!1)),i.fragment=void 0,t._url=i.resolve(new h$16(o$1j(this._url))).toString()}return e$2b(e.queryParameters)&&(t._queryParameters=p$19(e.queryParameters,t._queryParameters)),e$2b(e.templateValues)&&(t._templateValues=p$19(e.templateValues,t.templateValues)),e$2b(e.headers)&&(t.headers=p$19(e.headers,t.headers)),e$2b(e.proxy)&&(t.proxy=e.proxy),e$2b(e.request)&&(t.request=e.request),e$2b(e.retryCallback)&&(t.retryCallback=e.retryCallback),e$2b(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},t$11.prototype.retryOnError=function(e){var t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return o$1l(!1);var i=this;return o$1l(t(this,e)).then((function(e){return++i._retryCount,e}))},t$11.prototype.clone=function(e){return e$2b(e)||(e=new t$11({url:this._url})),e._url=this._url,e._queryParameters=l$1g(this._queryParameters),e._templateValues=l$1g(this._templateValues),e.headers=l$1g(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},t$11.prototype.getBaseUri=function(e){return i$1a(this.getUrlComponent(e),e)},t$11.prototype.appendForwardSlash=function(){this._url=n$18(this._url)},t$11.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},t$11.fetchArrayBuffer=function(e){return new t$11(e).fetchArrayBuffer()},t$11.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},t$11.fetchBlob=function(e){return new t$11(e).fetchBlob()},t$11.prototype.fetchImage=function(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.preferImageBitmap,!1),i=u$_(e.preferBlob,!1),n=u$_(e.flipY,!1);if(C$1f(this.request),!k$17||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!i)return j$1c({resource:this,flipY:n,preferImageBitmap:t});var r,o,a,s=this.fetchBlob();return e$2b(s)?t$11.supportsImageBitmapOptions().then((function(e){return r=e&&t,s})).then((function(e){if(e$2b(e)){if(a=e,r)return t$11.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});var t=window.URL.createObjectURL(e);return j$1c({resource:o=new t$11({url:t}),flipY:n,preferImageBitmap:!1})}})).then((function(e){if(e$2b(e))return e.blob=a,r||window.URL.revokeObjectURL(o.url),e})).otherwise((function(e){return e$2b(o)&&window.URL.revokeObjectURL(o.url),e.blob=a,o$1l.reject(e)})):void 0},t$11.fetchImage=function(e){return new t$11(e).fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},t$11.prototype.fetchText=function(){return this.fetch({responseType:"text"})},t$11.fetchText=function(e){return new t$11(e).fetchText()},t$11.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(e$2b(e))return e.then((function(e){if(e$2b(e))return JSON.parse(e)}))},t$11.fetchJson=function(e){return new t$11(e).fetchJson()},t$11.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},t$11.fetchXML=function(e){return new t$11(e).fetchXML()},t$11.prototype.fetchJsonp=function(e){var t;e=u$_(e,"callback"),C$1f(this.request);do{t="loadJsonp"+Math.random().toString().substring(2,8)}while(e$2b(window[t]));return L$1e(this,e,t)},t$11.fetchJsonp=function(e){return new t$11(e).fetchJsonp(e.callbackParameterName)},t$11.prototype._makeRequest=function(e){var t=this;C$1f(t.request);var i=t.request;i.url=t.url,i.requestFunction=function(n){var r=e.responseType,o=p$19(e.headers,t.headers),a=e.overrideMimeType,s=e.method,l=e.data,u=o$1l.defer(),c=e$2b(n)?n:t.url,h=t$11._Implementations.loadWithXhr(c,r,s,l,o,u,a);return e$2b(h)&&e$2b(h.abort)&&(i.cancelFunction=function(){h.abort()}),u.promise};var n=r$1a.request(i);if(e$2b(n))return n.then((function(e){return e})).otherwise((function(n){return i.state!==W$1c.FAILED?o$1l.reject(n):t.retryOnError(n).then((function(r){return r?(i.state=W$1c.UNISSUED,i.deferred=void 0,t.fetch(e)):o$1l.reject(n)}))}))};var te$D=/^data:(.*?)(;base64)?,(.*)$/;function E$1o(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function Y$Y(e,t){for(var i=E$1o(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return n}function ne$K(e,t){t=u$_(t,"");var i=e[1],n=!!e[2],r=e[3];switch(t){case"":case"text":return E$1o(n,r);case"arraybuffer":return Y$Y(n,r);case"blob":var o=Y$Y(n,r);return new Blob([o],{type:i});case"document":return(new DOMParser).parseFromString(E$1o(n,r),i);case"json":return JSON.parse(E$1o(n,r));default:throw new t$16("Unhandled responseType: "+t)}}function ae$A(e,t,i){var n=new Image;n.onload=function(){i.resolve(n)},n.onerror=function(e){i.reject(e)},t&&(u$X.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e}function F$1f(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}function ie$H(e,t,i,n,r,o,a){var s=require("url").parse(e),l="https:"===s.protocol?require("https"):require("http"),u=require("zlib"),c={protocol:s.protocol,hostname:s.hostname,port:s.port,path:s.path,query:s.query,method:i,headers:r};l.request(c).on("response",(function(e){if(e.statusCode<200||e.statusCode>=300)o.reject(new s$_(e.statusCode,e,e.headers));else{var i=[];e.on("data",(function(e){i.push(e)})),e.on("end",(function(){var n=Buffer.concat(i);"gzip"===e.headers["content-encoding"]?u.gunzip(n,(function(e,i){e?o.reject(new t$14("Error decompressing response.")):o.resolve(F$1f(i,t))})):o.resolve(F$1f(n,t))}))}})).on("error",(function(e){o.reject(new s$_)})).end()}t$11.prototype.fetch=function(e){return(e=v$X(e,{})).method="GET",this._makeRequest(e)},t$11.fetch=function(e){return new t$11(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$11.prototype.delete=function(e){return(e=v$X(e,{})).method="DELETE",this._makeRequest(e)},t$11.delete=function(e){return new t$11(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},t$11.prototype.head=function(e){return(e=v$X(e,{})).method="HEAD",this._makeRequest(e)},t$11.head=function(e){return new t$11(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$11.prototype.options=function(e){return(e=v$X(e,{})).method="OPTIONS",this._makeRequest(e)},t$11.options=function(e){return new t$11(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$11.prototype.post=function(e,t){return o$1q.defined("data",e),(t=v$X(t,{})).method="POST",t.data=e,this._makeRequest(t)},t$11.post=function(e){return new t$11(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$11.prototype.put=function(e,t){return o$1q.defined("data",e),(t=v$X(t,{})).method="PUT",t.data=e,this._makeRequest(t)},t$11.put=function(e){return new t$11(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$11.prototype.patch=function(e,t){return o$1q.defined("data",e),(t=v$X(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},t$11.patch=function(e){return new t$11(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$11._Implementations={},t$11._Implementations.createImage=function(e,t,i,n,r){var o=e.url;t$11.supportsImageBitmapOptions().then((function(a){if(a&&r){var s=o$1l.defer(),l=t$11._Implementations.loadWithXhr(o,"blob","GET",void 0,void 0,s,void 0,void 0,void 0);return e$2b(l)&&e$2b(l.abort)&&(e.cancelFunction=function(){l.abort()}),s.promise.then((function(e){if(e$2b(e))return t$11.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});i.reject(new t$14("Successfully retrieved "+o+" but it contained no content."))})).then(i.resolve)}ae$A(o,t,i)})).otherwise(i.reject)},t$11.createImageBitmapFromBlob=function(e,t){return o$1q.defined("options",t),o$1q.typeOf.bool("options.flipY",t.flipY),o$1q.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none"})};var ue$F=typeof XMLHttpRequest>"u";function x$1h(e){if(e=u$_(e,u$_.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=u$_(e.addNewLeapSeconds,!0),e$2b(e.data))U$1c(this,e.data);else if(e$2b(e.url)){var t=t$11.createIfNeeded(e.url),i=this;this._downloadPromise=o$1l(t.fetchJson(),(function(e){U$1c(i,e)}),(function(){i._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))}else U$1c(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function F$1e(e,t){return a$15.compare(e.julianDate,t)}function U$1c(e,t){if(e$2b(t.columnNames))if(e$2b(t.samples)){var i=t.columnNames.indexOf("modifiedJulianDateUtc"),n=t.columnNames.indexOf("xPoleWanderRadians"),r=t.columnNames.indexOf("yPoleWanderRadians"),o=t.columnNames.indexOf("ut1MinusUtcSeconds"),a=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),s=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(i<0||n<0||r<0||o<0||a<0||s<0||l<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var u=e._samples=t.samples,c=e._dates=[];e._dateColumn=i,e._xPoleWanderRadiansColumn=n,e._yPoleWanderRadiansColumn=r,e._ut1MinusUtcSecondsColumn=o,e._xCelestialPoleOffsetRadiansColumn=a,e._yCelestialPoleOffsetRadiansColumn=s,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var h,d=e._addNewLeapSeconds,f=0,p=u.length;f<p;f+=e._columnCount){var _=u[f+i],m=u[f+l],g=new a$15(_+h$17.MODIFIED_JULIAN_DATE_DIFFERENCE,m,H$19.TAI);if(c.push(g),d){if(m!==h&&e$2b(h)){var x=a$15.leapSeconds,v=a$17(x,g,F$1e);if(v<0){var y=new a$16(g,m);x.splice(~v,0,y)}}h=m}}}}else e._dataError="Error in loaded EOP data: The samples property is required.";else e._dataError="Error in loaded EOP data: The columnNames property is required."}function T$1a(e,t,i,n,r){var o=i*n;r.xPoleWander=t[o+e._xPoleWanderRadiansColumn],r.yPoleWander=t[o+e._yPoleWanderRadiansColumn],r.xPoleOffset=t[o+e._xCelestialPoleOffsetRadiansColumn],r.yPoleOffset=t[o+e._yCelestialPoleOffsetRadiansColumn],r.ut1MinusUtc=t[o+e._ut1MinusUtcSecondsColumn]}function O$S(e,t,i){return t+e*(i-t)}function I$1t(e,t,i,n,r,o,a){var s=e._columnCount;if(o>t.length-1)return a.xPoleWander=0,a.yPoleWander=0,a.xPoleOffset=0,a.yPoleOffset=0,a.ut1MinusUtc=0,a;var l=t[r],u=t[o];if(l.equals(u)||n.equals(l))return T$1a(e,i,r,s,a),a;if(n.equals(u))return T$1a(e,i,o,s,a),a;var c=a$15.secondsDifference(n,l)/a$15.secondsDifference(u,l),h=r*s,d=o*s,f=i[h+e._ut1MinusUtcSecondsColumn],p=i[d+e._ut1MinusUtcSecondsColumn],_=p-f;if(_>.5||_<-.5){var m=i[h+e._taiMinusUtcSecondsColumn],g=i[d+e._taiMinusUtcSecondsColumn];m!==g&&(u.equals(n)?f=p:p-=g-m)}return a.xPoleWander=O$S(c,i[h+e._xPoleWanderRadiansColumn],i[d+e._xPoleWanderRadiansColumn]),a.yPoleWander=O$S(c,i[h+e._yPoleWanderRadiansColumn],i[d+e._yPoleWanderRadiansColumn]),a.xPoleOffset=O$S(c,i[h+e._xCelestialPoleOffsetRadiansColumn],i[d+e._xCelestialPoleOffsetRadiansColumn]),a.yPoleOffset=O$S(c,i[h+e._yCelestialPoleOffsetRadiansColumn],i[d+e._yCelestialPoleOffsetRadiansColumn]),a.ut1MinusUtc=O$S(c,f,p),a}function i$15(e,t,i){this.heading=u$_(e,0),this.pitch=u$_(t,0),this.roll=u$_(i,0)}t$11._Implementations.loadWithXhr=function(e,t,i,n,r,o,a){var s=te$D.exec(e);if(null===s){if(!ue$F){var l=new XMLHttpRequest;if(u$X.contains(e)&&(l.withCredentials=!0),e=e.replace(/{/g,"%7B").replace(/}/g,"%7D"),l.open(i,e,!0),e$2b(a)&&e$2b(l.overrideMimeType)&&l.overrideMimeType(a),e$2b(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);e$2b(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")||typeof window<"u"&&"file://"===window.location.origin),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,n=l.responseType;if("HEAD"===i||"OPTIONS"===i){var r=l.getAllResponseHeaders().trim().split(/[\r\n]+/),a={};return r.forEach((function(e){var t=e.split(": "),i=t.shift();a[i]=t.join(": ")})),void o.resolve(a)}if(204===l.status)o.resolve();else if(!e$2b(e)||e$2b(t)&&n!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===n||"document"===n)&&e$2b(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==n&&"text"!==n||!e$2b(l.responseText)?o.reject(new t$14("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new s$_(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new s$_)},l.send(n),l}ie$H(e,t,i,n,r,o)}else o.resolve(ne$K(s,t))},t$11._Implementations.loadAndExecuteScript=function(e,t,i){return a$11(e).otherwise(i.reject)},t$11._DefaultImplementations={},t$11._DefaultImplementations.createImage=t$11._Implementations.createImage,t$11._DefaultImplementations.loadWithXhr=t$11._Implementations.loadWithXhr,t$11._DefaultImplementations.loadAndExecuteScript=t$11._Implementations.loadAndExecuteScript,t$11.DEFAULT=Object.freeze(new t$11({url:typeof document>"u"?"":document.location.href.split("?")[0]})),x$1h.NONE=Object.freeze({getPromiseToLoad:function(){return o$1l()},compute:function(e,t){return e$2b(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new n$1a(0,0,0,0,0),t}}),x$1h.prototype.getPromiseToLoad=function(){return o$1l(this._downloadPromise)},x$1h.prototype.compute=function(e,t){if(e$2b(this._samples)){if(e$2b(t)||(t=new n$1a(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;var i=this._dates,n=this._lastIndex,r=0,o=0;if(e$2b(n)){var a=i[n],s=i[n+1],l=a$15.lessThanOrEquals(a,e),u=!e$2b(s),c=u||a$15.greaterThanOrEquals(s,e);if(l&&c)return r=n,!u&&s.equals(e)&&++r,o=r+1,I$1t(this,i,this._samples,e,r,o,t),t}var h=a$17(i,e,a$15.compare,this._dateColumn);return h>=0?(h<i.length-1&&i[h+1].equals(e)&&++h,r=h,o=h):(r=(o=~h)-1)<0&&(r=0),this._lastIndex=r,I$1t(this,i,this._samples,e,r,o,t),t}if(e$2b(this._dataError))throw new t$14(this._dataError)},i$15.fromQuaternion=function(e,t){if(!e$2b(e))throw new t$16("quaternion is required");e$2b(t)||(t=new i$15);var i=2*(e.w*e.y-e.z*e.x),n=1-2*(e.x*e.x+e.y*e.y),r=2*(e.w*e.x+e.y*e.z),o=1-2*(e.y*e.y+e.z*e.z),a=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(a,o),t.roll=Math.atan2(r,n),t.pitch=-e$2a.asinClamped(i),t},i$15.fromDegrees=function(e,t,i,n){if(!e$2b(e))throw new t$16("heading is required");if(!e$2b(t))throw new t$16("pitch is required");if(!e$2b(i))throw new t$16("roll is required");return e$2b(n)||(n=new i$15),n.heading=e*e$2a.RADIANS_PER_DEGREE,n.pitch=t*e$2a.RADIANS_PER_DEGREE,n.roll=i*e$2a.RADIANS_PER_DEGREE,n},i$15.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new i$15(e.heading,e.pitch,e.roll)},i$15.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},i$15.equalsEpsilon=function(e,t,i,n){return e===t||e$2b(e)&&e$2b(t)&&e$2a.equalsEpsilon(e.heading,t.heading,i,n)&&e$2a.equalsEpsilon(e.pitch,t.pitch,i,n)&&e$2a.equalsEpsilon(e.roll,t.roll,i,n)},i$15.prototype.clone=function(e){return i$15.clone(this,e)},i$15.prototype.equals=function(e){return i$15.equals(this,e)},i$15.prototype.equalsEpsilon=function(e,t,i){return i$15.equalsEpsilon(this,e,t,i)},i$15.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var d$1q=/((?:.*\/)|^)SuperMap3D\.js$/,u$W,i$14,o$1e;function g$1f(){for(var e=document.getElementsByTagName("script"),t=0,i=e.length;t<i;++t){var n=e[t].getAttribute("src"),r=d$1q.exec(n);if(null!==r)return r[1]}}function f$16(e){return typeof document>"u"?e:(e$2b(u$W)||(u$W=document.createElement("a")),u$W.href=e,u$W.href=u$W.href,u$W.href)}function s$Z(){if(e$2b(i$14))return i$14;var e;if(e=typeof CESIUM_BASE_URL<"u"?CESIUM_BASE_URL:"object"==typeof define&&e$2b(define.amd)&&!define.amd.toUrlUndefined&&e$2b(require.toUrl)?o$1j("..",n$15("Core/buildModuleUrl.js")):g$1f(),!e$2b(e))throw new t$16("Unable to determine SuperMap3D base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return(i$14=new t$11({url:f$16(e)})).appendForwardSlash(),i$14}function v$W(e){return f$16(require.toUrl("../"+e))}function c$17(e){return s$Z().getDerivedResource({url:e}).url}function n$15(e){return e$2b(o$1e)||(o$1e="object"==typeof define&&e$2b(define.amd)&&!define.amd.toUrlUndefined&&e$2b(require.toUrl)?v$W:c$17),o$1e(e)}function a$10(e,t,i){this.x=e,this.y=t,this.s=i}function D$15(e){e=u$_(e,u$_.EMPTY_OBJECT),this._xysFileUrlTemplate=t$11.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=u$_(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=u$_(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new a$15(this._sampleZeroJulianEphemerisDate,0,H$19.TAI),this._stepSizeDays=u$_(e.stepSizeDays,1),this._samplesPerXysFile=u$_(e.samplesPerXysFile,1e3),this._totalSamples=u$_(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,i=this._denominators=new Array(t+1),n=this._xTable=new Array(t+1),r=Math.pow(this._stepSizeDays,t),o=0;o<=t;++o){i[o]=r,n[o]=o*this._stepSizeDays;for(var a=0;a<=t;++a)a!==o&&(i[o]*=o-a);i[o]=1/i[o]}this._work=new Array(t+1),this._coef=new Array(t+1)}n$15._cesiumScriptRegex=d$1q,n$15._buildModuleUrlFromBaseUrl=c$17,n$15._clearBaseResource=function(){i$14=void 0},n$15.setBaseUrl=function(e){i$14=t$11.DEFAULT.getDerivedResource({url:e})},n$15.getCesiumBaseUrl=s$Z;var E$1n=new a$15(0,0,H$19.TAI);function w$16(e,t,i){var n=E$1n;return n.dayNumber=t,n.secondsOfDay=i,a$15.daysDifference(n,e._sampleZeroDateTT)}function T$19(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];var i=o$1l.defer();e._chunkDownloadsInProgress[t]=i;var n=e._xysFileUrlTemplate;return o$1l((e$2b(n)?n.getDerivedResource({templateValues:{0:t}}):new t$11({url:n$15("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")})).fetchJson(),(function(n){e._chunkDownloadsInProgress[t]=!1;for(var r=e._samples,o=n.samples,a=t*e._samplesPerXysFile*3,s=0,l=o.length;s<l;++s)r[a+s]=o[s];i.resolve()})),i.promise}D$15.prototype.preload=function(e,t,i,n){var r=w$16(this,e,t),o=w$16(this,i,n),a=r/this._stepSizeDays-this._interpolationOrder/2|0;a<0&&(a=0);var s=o/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;s>=this._totalSamples&&(s=this._totalSamples-1);for(var l=a/this._samplesPerXysFile|0,u=s/this._samplesPerXysFile|0,c=[],h=l;h<=u;++h)c.push(T$19(this,h));return o$1l.all(c)},D$15.prototype.computeXysRadians=function(e,t,i){var n=w$16(this,e,t);if(!(n<0)){var r=n/this._stepSizeDays|0;if(!(r>=this._totalSamples)){var o=this._interpolationOrder,a=r-(o/2|0);a<0&&(a=0);var s=a+o;s>=this._totalSamples&&((a=(s=this._totalSamples-1)-o)<0&&(a=0));var l=!1,u=this._samples;if(e$2b(u[3*a])||(T$19(this,a/this._samplesPerXysFile|0),l=!0),e$2b(u[3*s])||(T$19(this,s/this._samplesPerXysFile|0),l=!0),!l){e$2b(i)?(i.x=0,i.y=0,i.s=0):i=new a$10(0,0,0);var c,h,d=n-a*this._stepSizeDays,f=this._work,p=this._denominators,_=this._coef,m=this._xTable;for(c=0;c<=o;++c)f[c]=d-m[c];for(c=0;c<=o;++c){for(_[c]=1,h=0;h<=o;++h)h!==c&&(_[c]*=f[h]);_[c]*=p[c];var g=3*(a+c);i.x+=_[c]*u[g++],i.y+=_[c]*u[g++],i.s+=_[c]*u[g]}return i}}}};var r$19,n$14={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},l$1f={},r$18,l$1e,E$1m,c$16,W$1a,d$1p,h$15,f$15,w$15,v$V,k$16,A$1j,S$$,R$13,V$13,I$1s,N$Y,g$1e,a$$,i$13;function o$1d(e){for(var t=e.split("."),i=0,n=t.length;i<n;++i)t[i]=parseInt(t[i],10);return t}function b$1g(){if(!e$2b(l$1e)&&(l$1e=!1,!p$17())){var e=/ Chrome\/([\.0-9]+)/.exec(r$18.userAgent);null!==e&&(l$1e=!0,E$1m=o$1d(e[1]))}return l$1e}function z$12(){return b$1g()&&E$1m}function P$1b(){if(!e$2b(c$16)&&(c$16=!1,!b$1g()&&!p$17()&&/ Safari\/[\.0-9]+/.test(r$18.userAgent))){var e=/ Version\/([\.0-9]+)/.exec(r$18.userAgent);null!==e&&(c$16=!0,W$1a=o$1d(e[1]))}return c$16}function G$1j(){return P$1b()&&W$1a}function C$1e(){if(!e$2b(d$1p)){d$1p=!1;var e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(r$18.userAgent);null!==e&&(d$1p=!0,(h$15=o$1d(e[1])).isNightly=!!e[2])}return d$1p}function K$_(){return C$1e()&&h$15}function F$1d(){var e;e$2b(f$15)||(f$15=!1,"Microsoft Internet Explorer"===r$18.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(r$18.userAgent))&&(f$15=!0,w$15=o$1d(e[1])):"Netscape"===r$18.appName&&(null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(r$18.userAgent))&&(f$15=!0,w$15=o$1d(e[1]))));return f$15}function L$1d(){return F$1d()&&w$15}function p$17(){if(!e$2b(v$V)){v$V=!1;var e=/ Edge\/([\.0-9]+)/.exec(r$18.userAgent);null!==e&&(v$V=!0,k$16=o$1d(e[1]))}return v$V}function X$14(){return p$17()&&k$16}function x$1g(){if(!e$2b(A$1j)){A$1j=!1;var e=/Firefox\/([\.0-9]+)/.exec(r$18.userAgent);null!==e&&(A$1j=!0,S$$=o$1d(e[1]))}return A$1j}function Y$X(){return e$2b(R$13)||(R$13=/Windows/i.test(r$18.appVersion)),R$13}function q$1d(){return x$1g()&&S$$}function H$16(){return e$2b(V$13)||(V$13="object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)),V$13}function Z$18(){return e$2b(I$1s)||(I$1s=!x$1g()&&typeof PointerEvent<"u"&&(!e$2b(r$18.pointerEnabled)||r$18.pointerEnabled)),I$1s}function U$1b(){if(!e$2b(g$1e)){var e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");var t=e.style.imageRendering;(g$1e=e$2b(t)&&""!==t)&&(N$Y=t)}return g$1e}function _$13(){return U$1b()?N$Y:void 0}function B$13(){if(e$2b(i$13))return i$13.promise;i$13=o$1l.defer(),p$17()&&(a$$=!1,i$13.resolve(a$$));var e=new Image;return e.onload=function(){a$$=e.width>0&&e.height>0,i$13.resolve(a$$)},e.onerror=function(){a$$=!1,i$13.resolve(a$$)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",i$13.promise}function $$16(){return e$2b(i$13)||B$13(),a$$}Object.defineProperties(l$1f,{element:{get:function(){if(l$1f.supportsFullscreen())return document[n$14.fullscreenElement]}},changeEventName:{get:function(){if(l$1f.supportsFullscreen())return n$14.fullscreenchange}},errorEventName:{get:function(){if(l$1f.supportsFullscreen())return n$14.fullscreenerror}},enabled:{get:function(){if(l$1f.supportsFullscreen())return document[n$14.fullscreenEnabled]}},fullscreen:{get:function(){if(l$1f.supportsFullscreen())return null!==l$1f.element}}}),l$1f.supportsFullscreen=function(){if(e$2b(r$19))return r$19;r$19=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return n$14.requestFullscreen="requestFullscreen",n$14.exitFullscreen="exitFullscreen",n$14.fullscreenEnabled="fullscreenEnabled",n$14.fullscreenElement="fullscreenElement",n$14.fullscreenchange="fullscreenchange",n$14.fullscreenerror="fullscreenerror",r$19=!0;for(var t,i=["webkit","moz","o","ms","khtml"],n=0,r=i.length;n<r;++n){var o=i[n];"function"==typeof e[t=o+"RequestFullscreen"]?(n$14.requestFullscreen=t,r$19=!0):"function"==typeof e[t=o+"RequestFullScreen"]&&(n$14.requestFullscreen=t,r$19=!0),t=o+"ExitFullscreen","function"==typeof document[t]?n$14.exitFullscreen=t:(t=o+"CancelFullScreen","function"==typeof document[t]&&(n$14.exitFullscreen=t)),t=o+"FullscreenEnabled",void 0!==document[t]?n$14.fullscreenEnabled=t:(t=o+"FullScreenEnabled",void 0!==document[t]&&(n$14.fullscreenEnabled=t)),t=o+"FullscreenElement",void 0!==document[t]?n$14.fullscreenElement=t:(t=o+"FullScreenElement",void 0!==document[t]&&(n$14.fullscreenElement=t)),t=o+"fullscreenchange",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenChange"),n$14.fullscreenchange=t),t=o+"fullscreenerror",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenError"),n$14.fullscreenerror=t)}return r$19},l$1f.requestFullscreen=function(e,t){!l$1f.supportsFullscreen()||e[n$14.requestFullscreen]({vrDisplay:t})},l$1f.exitFullscreen=function(){!l$1f.supportsFullscreen()||document[n$14.exitFullscreen]()},l$1f._names=n$14,r$18=typeof navigator<"u"?navigator:{};var m$18=[];typeof ArrayBuffer<"u"&&(m$18.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&m$18.push(Uint8ClampedArray),typeof CanvasPixelArray<"u"&&m$18.push(CanvasPixelArray));var s$Y={isChrome:b$1g,chromeVersion:z$12,isSafari:P$1b,safariVersion:G$1j,isWebkit:C$1e,webkitVersion:K$_,isInternetExplorer:F$1d,internetExplorerVersion:L$1d,isEdge:p$17,edgeVersion:X$14,isFirefox:x$1g,firefoxVersion:q$1d,isWindows:Y$X,isNodeJs:H$16,hardwareConcurrency:u$_(r$18.hardwareConcurrency,3),supportsPointerEvents:Z$18,supportsImageRenderingPixelated:U$1b,supportsWebP:B$13,supportsWebPSync:$$16,imageRenderingValue:_$13,typedArrayTypes:m$18,isPCBroswer:ee$A};function ee$A(){var e=window.navigator.userAgent.toLowerCase(),t="ipad"==e.match(/ipad/i),i="iphone os"==e.match(/iphone os/i),n="midp"==e.match(/midp/i),r="ucweb"==e.match(/ucweb/i),o="android"==e.match(/android/i),a="windows ce"==e.match(/windows ce/i),s="windows mobile"==e.match(/windows mobile/i);return!(t||i||n||r||o||a||s)}function n$13(e,t,i,n){this.x=u$_(e,0),this.y=u$_(t,0),this.z=u$_(i,0),this.w=u$_(n,0)}s$Y.supportsFullscreen=function(){return l$1f.supportsFullscreen()},s$Y.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},s$Y.supportsWebWorkers=function(){return typeof Worker<"u"},s$Y.supportsWebAssembly=function(){return typeof WebAssembly<"u"&&!s$Y.isEdge()},s$Y.supportsOffscreenCanvas=function(){return typeof OffscreenCanvas<"u"&&!s$Y.isEdge()};var E$1l=new o$1p;n$13.fromAxisAngle=function(e,t,i){o$1q.typeOf.object("axis",e),o$1q.typeOf.number("angle",t);var n=t/2,r=Math.sin(n),o=(E$1l=o$1p.normalize(e,E$1l)).x*r,a=E$1l.y*r,s=E$1l.z*r,l=Math.cos(n);return e$2b(i)?(i.x=o,i.y=a,i.z=s,i.w=l,i):new n$13(o,a,s,l)};var G$1i=[1,2,0],J$$=new Array(3);n$13.fromRotationMatrix=function(e,t){o$1q.typeOf.object("matrix",e);var i,n,r,o,a,s=e[p$1e.COLUMN0ROW0],l=e[p$1e.COLUMN1ROW1],u=e[p$1e.COLUMN2ROW2],c=s+l+u;if(c>0)a=.5*(i=Math.sqrt(c+1)),i=.5/i,n=(e[p$1e.COLUMN1ROW2]-e[p$1e.COLUMN2ROW1])*i,r=(e[p$1e.COLUMN2ROW0]-e[p$1e.COLUMN0ROW2])*i,o=(e[p$1e.COLUMN0ROW1]-e[p$1e.COLUMN1ROW0])*i;else{var h=G$1i,d=0;l>s&&(d=1),u>s&&u>l&&(d=2);var f=h[d],p=h[f];i=Math.sqrt(e[p$1e.getElementIndex(d,d)]-e[p$1e.getElementIndex(f,f)]-e[p$1e.getElementIndex(p,p)]+1);var _=J$$;_[d]=.5*i,i=.5/i,a=(e[p$1e.getElementIndex(p,f)]-e[p$1e.getElementIndex(f,p)])*i,_[f]=(e[p$1e.getElementIndex(f,d)]+e[p$1e.getElementIndex(d,f)])*i,_[p]=(e[p$1e.getElementIndex(p,d)]+e[p$1e.getElementIndex(d,p)])*i,n=-_[0],r=-_[1],o=-_[2]}return e$2b(t)?(t.x=n,t.y=r,t.z=o,t.w=a,t):new n$13(n,r,o,a)};var Y$W=new n$13,Z$17=new n$13,I$1r=new n$13,k$15=new n$13;n$13.fromHeadingPitchRoll=function(e,t){return o$1q.typeOf.object("headingPitchRoll",e),k$15=n$13.fromAxisAngle(o$1p.UNIT_X,e.roll,Y$W),I$1r=n$13.fromAxisAngle(o$1p.UNIT_Y,-e.pitch,t),t=n$13.multiply(I$1r,k$15,I$1r),Z$17=n$13.fromAxisAngle(o$1p.UNIT_Z,-e.heading,Y$W),n$13.multiply(Z$17,t,t)};var g$1d=new o$1p,U$1a=new o$1p,i$12=new n$13,H$15=new n$13,C$1d=new n$13;n$13.packedLength=4,n$13.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},n$13.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new n$13),i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3],i},n$13.packedInterpolationLength=3,n$13.convertPackedArrayForInterpolation=function(e,t,i,n){n$13.unpack(e,4*i,C$1d),n$13.conjugate(C$1d,C$1d);for(var r=0,o=i-t+1;r<o;r++){var a=3*r;n$13.unpack(e,4*(t+r),i$12),n$13.multiply(i$12,C$1d,i$12),i$12.w<0&&n$13.negate(i$12,i$12),n$13.computeAxis(i$12,g$1d);var s=n$13.computeAngle(i$12);n[a]=g$1d.x*s,n[a+1]=g$1d.y*s,n[a+2]=g$1d.z*s}},n$13.unpackInterpolationResult=function(e,t,i,n,r){e$2b(r)||(r=new n$13),o$1p.fromArray(e,0,U$1a);var o=o$1p.magnitude(U$1a);return n$13.unpack(t,4*n,H$15),0===o?n$13.clone(n$13.IDENTITY,i$12):n$13.fromAxisAngle(U$1a,o,i$12),n$13.multiply(i$12,H$15,r)},n$13.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new n$13(e.x,e.y,e.z,e.w)},n$13.conjugate=function(e,t){return o$1q.typeOf.object("quaternion",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},n$13.magnitudeSquared=function(e){return o$1q.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},n$13.magnitude=function(e){return Math.sqrt(n$13.magnitudeSquared(e))},n$13.normalize=function(e,t){o$1q.typeOf.object("result",t);var i=1/n$13.magnitude(e),n=e.x*i,r=e.y*i,o=e.z*i,a=e.w*i;return t.x=n,t.y=r,t.z=o,t.w=a,t},n$13.inverse=function(e,t){o$1q.typeOf.object("result",t);var i=n$13.magnitudeSquared(e);return t=n$13.conjugate(e,t),n$13.multiplyByScalar(t,1/i,t)},n$13.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},n$13.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},n$13.negate=function(e,t){return o$1q.typeOf.object("quaternion",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},n$13.dot=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},n$13.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e.x,r=e.y,o=e.z,a=e.w,s=t.x,l=t.y,u=t.z,c=t.w,h=a*s+n*c+r*u-o*l,d=a*l-n*u+r*c+o*s,f=a*u+n*l-r*s+o*c,p=a*c-n*s-r*l-o*u;return i.x=h,i.y=d,i.z=f,i.w=p,i},n$13.multiplyByVec=function(e,t,i){var n=new o$1p,r=new o$1p,o=new o$1p(e.x,e.y,e.z);n=o$1p.cross(o,t,n),r=o$1p.cross(o,n,r);var a=new o$1p;a=o$1p.multiplyByScalar(n,2*e.w,a);var s=new o$1p;return s=o$1p.multiplyByScalar(n,2,s),i=o$1p.add(t,a,i),i=o$1p.add(i,s,i)},n$13.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("quaternion",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},n$13.divideByScalar=function(e,t,i){return o$1q.typeOf.object("quaternion",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},n$13.computeAxis=function(e,t){o$1q.typeOf.object("quaternion",e),o$1q.typeOf.object("result",t);var i=e.w;if(Math.abs(i-1)<e$2a.EPSILON6)return t.x=t.y=t.z=0,t;var n=1/Math.sqrt(1-i*i);return t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t},n$13.computeAngle=function(e){return o$1q.typeOf.object("quaternion",e),Math.abs(e.w-1)<e$2a.EPSILON6?0:2*Math.acos(e.w)};var W$19=new n$13;n$13.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),W$19=n$13.multiplyByScalar(t,i,W$19),n=n$13.multiplyByScalar(e,1-i,n),n$13.add(W$19,n,n)};var X$13=new n$13,D$14=new n$13,F$1c=new n$13;n$13.slerp=function(e,t,i,n){o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n);var r=n$13.dot(e,t),o=t;if(r<0&&(r=-r,o=X$13=n$13.negate(t,X$13)),1-r<e$2a.EPSILON6)return n$13.lerp(e,o,i,n);var a=Math.acos(r);return D$14=n$13.multiplyByScalar(e,Math.sin((1-i)*a),D$14),F$1c=n$13.multiplyByScalar(o,Math.sin(i*a),F$1c),n=n$13.add(D$14,F$1c,n),n$13.multiplyByScalar(n,1/Math.sin(a),n)},n$13.log=function(e,t){o$1q.typeOf.object("quaternion",e),o$1q.typeOf.object("result",t);var i=e$2a.acosClamped(e.w),n=0;return 0!==i&&(n=i/Math.sin(i)),o$1p.multiplyByScalar(e,n,t)},n$13.exp=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1p.magnitude(e),n=0;return 0!==i&&(n=Math.sin(i)/i),t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t.w=Math.cos(i),t};var K$Z=new o$1p,$$15=new o$1p,N$X=new n$13,l$1d=new n$13;n$13.computeInnerQuadrangle=function(e,t,i,n){o$1q.typeOf.object("q0",e),o$1q.typeOf.object("q1",t),o$1q.typeOf.object("q2",i),o$1q.typeOf.object("result",n);var r=n$13.conjugate(t,N$X);n$13.multiply(r,i,l$1d);var o=n$13.log(l$1d,K$Z);n$13.multiply(r,e,l$1d);var a=n$13.log(l$1d,$$15);return o$1p.add(o,a,o),o$1p.multiplyByScalar(o,.25,o),o$1p.negate(o,o),n$13.exp(o,N$X),n$13.multiply(t,N$X,n)},n$13.squad=function(e,t,i,n,r,o){o$1q.typeOf.object("q0",e),o$1q.typeOf.object("q1",t),o$1q.typeOf.object("s0",i),o$1q.typeOf.object("s1",n),o$1q.typeOf.number("t",r),o$1q.typeOf.object("result",o);var a=n$13.slerp(e,t,r,N$X),s=n$13.slerp(i,n,r,l$1d);return n$13.slerp(a,s,2*r*(1-r),o)};for(var s$X=new n$13,_$12=1.9011074535173003,B$12=s$Y.supportsTypedArrays()?new Float32Array(8):[],L$1c=s$Y.supportsTypedArrays()?new Float32Array(8):[],x$1f=s$Y.supportsTypedArrays()?new Float32Array(8):[],S$_=s$Y.supportsTypedArrays()?new Float32Array(8):[],Q$15=0;Q$15<7;++Q$15){var P$1a=Q$15+1,V$12=2*P$1a+1;B$12[Q$15]=1/(P$1a*V$12),L$1c[Q$15]=P$1a/V$12}B$12[7]=_$12/136,L$1c[7]=8*_$12/17,n$13.fastSlerp=function(e,t,i,n){o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n);var r,o=n$13.dot(e,t);o>=0?r=1:(r=-1,o=-o);for(var a=o-1,s=1-i,l=i*i,u=s*s,c=7;c>=0;--c)x$1f[c]=(B$12[c]*l-L$1c[c])*a,S$_[c]=(B$12[c]*u-L$1c[c])*a;var h=r*i*(1+x$1f[0]*(1+x$1f[1]*(1+x$1f[2]*(1+x$1f[3]*(1+x$1f[4]*(1+x$1f[5]*(1+x$1f[6]*(1+x$1f[7])))))))),d=s*(1+S$_[0]*(1+S$_[1]*(1+S$_[2]*(1+S$_[3]*(1+S$_[4]*(1+S$_[5]*(1+S$_[6]*(1+S$_[7])))))))),f=n$13.multiplyByScalar(e,d,s$X);return n$13.multiplyByScalar(t,h,n),n$13.add(f,n,n)},n$13.fastSquad=function(e,t,i,n,r,o){o$1q.typeOf.object("q0",e),o$1q.typeOf.object("q1",t),o$1q.typeOf.object("s0",i),o$1q.typeOf.object("s1",n),o$1q.typeOf.number("t",r),o$1q.typeOf.object("result",o);var a=n$13.fastSlerp(e,t,r,N$X),s=n$13.fastSlerp(i,n,r,l$1d);return n$13.fastSlerp(a,s,2*r*(1-r),o)},n$13.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},n$13.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e.x-t.x)<=i&&Math.abs(e.y-t.y)<=i&&Math.abs(e.z-t.z)<=i&&Math.abs(e.w-t.w)<=i},n$13.ZERO=Object.freeze(new n$13(0,0,0,0)),n$13.IDENTITY=Object.freeze(new n$13(0,0,0,1)),n$13.prototype.clone=function(e){return n$13.clone(this,e)},n$13.prototype.equals=function(e){return n$13.equals(this,e)},n$13.prototype.equalsEpsilon=function(e,t){return n$13.equalsEpsilon(this,e,t)},n$13.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var m$17={},B$11={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},O$R={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Y$V={},y$10={east:new o$1p,north:new o$1p,up:new o$1p,west:new o$1p,south:new o$1p,down:new o$1p},x$1e=new o$1p,P$19=new o$1p,E$1k=new o$1p;m$17.localFrameToFixedFrameGenerator=function(e,t){if(!B$11.hasOwnProperty(e)||!B$11[e].hasOwnProperty(t))throw new t$16("firstAxis and secondAxis must be east, north, up, west, south or down.");var i,n=B$11[e][t],r=e+t;return e$2b(Y$V[r])?i=Y$V[r]:(i=function(i,r,o){if(!e$2b(i))throw new t$16("origin is required.");if(e$2b(o)||(o=new p$1d),o$1p.equalsEpsilon(i,o$1p.ZERO,e$2a.EPSILON14))o$1p.unpack(O$R[e],0,x$1e),o$1p.unpack(O$R[t],0,P$19),o$1p.unpack(O$R[n],0,E$1k);else if(e$2a.equalsEpsilon(i.x,0,e$2a.EPSILON14)&&e$2a.equalsEpsilon(i.y,0,e$2a.EPSILON14)){var a=e$2a.sign(i.z);o$1p.unpack(O$R[e],0,x$1e),"east"!==e&&"west"!==e&&o$1p.multiplyByScalar(x$1e,a,x$1e),o$1p.unpack(O$R[t],0,P$19),"east"!==t&&"west"!==t&&o$1p.multiplyByScalar(P$19,a,P$19),o$1p.unpack(O$R[n],0,E$1k),"east"!==n&&"west"!==n&&o$1p.multiplyByScalar(E$1k,a,E$1k)}else{(r=u$_(r,t$13.WGS84)).geodeticSurfaceNormal(i,y$10.up);var s=y$10.up,l=y$10.east;l.x=-i.y,l.y=i.x,l.z=0,o$1p.normalize(l,y$10.east),o$1p.cross(s,l,y$10.north),o$1p.multiplyByScalar(y$10.up,-1,y$10.down),o$1p.multiplyByScalar(y$10.east,-1,y$10.west),o$1p.multiplyByScalar(y$10.north,-1,y$10.south),x$1e=y$10[e],P$19=y$10[t],E$1k=y$10[n]}return o[0]=x$1e.x,o[1]=x$1e.y,o[2]=x$1e.z,o[3]=0,o[4]=P$19.x,o[5]=P$19.y,o[6]=P$19.z,o[7]=0,o[8]=E$1k.x,o[9]=E$1k.y,o[10]=E$1k.z,o[11]=0,o[12]=i.x,o[13]=i.y,o[14]=i.z,o[15]=1,o},Y$V[r]=i),i},m$17.eastNorthUpToFixedFrame=m$17.localFrameToFixedFrameGenerator("east","north"),m$17.northEastDownToFixedFrame=m$17.localFrameToFixedFrameGenerator("north","east"),m$17.northUpEastToFixedFrame=m$17.localFrameToFixedFrameGenerator("north","up"),m$17.northWestUpToFixedFrame=m$17.localFrameToFixedFrameGenerator("north","west");var fa$4=new n$13,da$3=new o$1p(1,1,1),ua$5=new p$1d;m$17.headingPitchRollToFixedFrame=function(e,t,i,n,r){o$1q.typeOf.object("HeadingPitchRoll",t),n=u$_(n,m$17.eastNorthUpToFixedFrame);var o=n$13.fromHeadingPitchRoll(t,fa$4),a=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,o,da$3,ua$5);return r=n(e,i,r),p$1d.multiply(r,a,r)};var ya$3=new p$1d,la$6=new p$1e;m$17.headingPitchRollQuaternion=function(e,t,i,n,r){o$1q.typeOf.object("HeadingPitchRoll",t);var o=m$17.headingPitchRollToFixedFrame(e,t,i,n,ya$3),a=p$1d.getMatrix3(o,la$6);return n$13.fromRotationMatrix(a,r)};var Ta$7=new o$1p(1,1,1),xa$5=new o$1p,aa$6=new p$1d,Pa$5=new p$1d,Ea$6=new p$1e,Sa$5=new n$13;m$17.fixedFrameToHeadingPitchRoll=function(e,t,i,n){o$1q.defined("transform",e),t=u$_(t,t$13.WGS84),i=u$_(i,m$17.eastNorthUpToFixedFrame),e$2b(n)||(n=new i$15);var r=p$1d.getTranslation(e,xa$5);if(o$1p.equals(r,o$1p.ZERO))return n.heading=0,n.pitch=0,n.roll=0,n;var o=p$1d.inverseTransformation(i(r,t,aa$6),aa$6),a=p$1d.setScale(e,Ta$7,Pa$5);a=p$1d.setTranslation(a,o$1p.ZERO,a),o=p$1d.multiply(o,a,o);var s=n$13.fromRotationMatrix(p$1d.getMatrix3(o,Ea$6),Sa$5);return s=n$13.normalize(s,s),i$15.fromQuaternion(s,n)};var Fa$6=24110.54841,Ca$3=8640184.812866,Ma$5=.093104,Oa$5=-62e-7,Na$5=11772758384668e-32,Ra$6=72921158553e-15,Da$7=e$2a.TWO_PI/86400,q$1c=new a$15;m$17.computeTemeToPseudoFixedMatrix=function(e,t){if(!e$2b(e))throw new t$16("date is required.");var i,n=(q$1c=a$15.addSeconds(e,-a$15.computeTaiMinusUtc(e),q$1c)).dayNumber,r=q$1c.secondsOfDay,o=n-2451545;i=r>=43200?(o+.5)/h$17.DAYS_PER_JULIAN_CENTURY:(o-.5)/h$17.DAYS_PER_JULIAN_CENTURY;var a=(Fa$6+i*(Ca$3+i*(Ma$5+i*Oa$5)))*Da$7%e$2a.TWO_PI+(Ra$6+Na$5*(n-2451545.5))*((r+.5*h$17.SECONDS_PER_DAY)%h$17.SECONDS_PER_DAY),s=Math.cos(a),l=Math.sin(a);return e$2b(t)?(t[0]=s,t[1]=-l,t[2]=0,t[3]=l,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new p$1e(s,l,0,-l,s,0,0,0,1)},m$17.iau2006XysData=new D$15,m$17.earthOrientationParameters=x$1h.NONE;var H$14=32.184,ga$5=2451545;m$17.preloadIcrfFixed=function(e){var t=e.start.dayNumber,i=e.start.secondsOfDay+H$14,n=e.stop.dayNumber,r=e.stop.secondsOfDay+H$14,o=m$17.iau2006XysData.preload(t,i,n,r),a=m$17.earthOrientationParameters.getPromiseToLoad();return o$1l.all([o,a])},m$17.computeIcrfToFixedMatrix=function(e,t){if(!e$2b(e))throw new t$16("date is required.");e$2b(t)||(t=new p$1e);var i=m$17.computeFixedToIcrfMatrix(e,t);if(e$2b(i))return p$1e.transpose(i,t)};var Ua$6=new a$10(0,0,0),_a$5=new n$1a(0,0,0,0,0,0),Q$14=new p$1e,Z$16=new p$1e;m$17.computeFixedToIcrfMatrix=function(e,t){if(!e$2b(e))throw new t$16("date is required.");e$2b(t)||(t=new p$1e);var i=m$17.earthOrientationParameters.compute(e,_a$5);if(e$2b(i)){var n=e.dayNumber,r=e.secondsOfDay+H$14,o=m$17.iau2006XysData.computeXysRadians(n,r,Ua$6);if(e$2b(o)){var a=o.x+i.xPoleOffset,s=o.y+i.yPoleOffset,l=1/(1+Math.sqrt(1-a*a-s*s)),u=Q$14;u[0]=1-l*a*a,u[3]=-l*a*s,u[6]=a,u[1]=-l*a*s,u[4]=1-l*s*s,u[7]=s,u[2]=-a,u[5]=-s,u[8]=1-l*(a*a+s*s);var c=p$1e.fromRotationZ(-o.s,Z$16),h=p$1e.multiply(u,c,Q$14),d=e.dayNumber-2451545,f=(e.secondsOfDay-a$15.computeTaiMinusUtc(e)+i.ut1MinusUtc)/h$17.SECONDS_PER_DAY,p=.779057273264+f+.00273781191135448*(d+f);p=p%1*e$2a.TWO_PI;var _=p$1e.fromRotationZ(p,Z$16),m=p$1e.multiply(h,_,Q$14),g=Math.cos(i.xPoleWander),x=Math.cos(i.yPoleWander),v=Math.sin(i.xPoleWander),y=Math.sin(i.yPoleWander),$=n-ga$5+r/h$17.SECONDS_PER_DAY,b=-47e-6*($/=36525)*e$2a.RADIANS_PER_DEGREE/3600,T=Math.cos(b),C=Math.sin(b),S=Z$16;return S[0]=g*T,S[1]=g*C,S[2]=v,S[3]=-x*C+y*v*T,S[4]=x*T+y*v*C,S[5]=-y*g,S[6]=-y*C-x*v*T,S[7]=y*T-x*v*C,S[8]=x*g,p$1e.multiply(m,S,t)}}};var Ia$6=new e$29;m$17.pointToWindowCoordinates=function(e,t,i,n){return(n=m$17.pointToGLWindowCoordinates(e,t,i,n)).y=2*t[5]-n.y,n},m$17.pointToGLWindowCoordinates=function(e,t,i,n){if(!e$2b(e))throw new t$16("modelViewProjectionMatrix is required.");if(!e$2b(t))throw new t$16("viewportTransformation is required.");if(!e$2b(i))throw new t$16("point is required.");e$2b(n)||(n=new o$1o);var r=Ia$6;return p$1d.multiplyByVector(e,e$29.fromElements(i.x,i.y,i.z,1,r),r),e$29.multiplyByScalar(r,1/r.w,r),p$1d.multiplyByVector(t,r,r),o$1o.fromCartesian4(r,n)};var za$5=new o$1p,qa$6=new o$1p,Wa$4=new o$1p;m$17.rotationMatrixFromPositionVelocity=function(e,t,i,n){if(!e$2b(e))throw new t$16("position is required.");if(!e$2b(t))throw new t$16("velocity is required.");var r=u$_(i,t$13.WGS84).geodeticSurfaceNormal(e,za$5),o=o$1p.cross(t,r,qa$6);o$1p.equalsEpsilon(o,o$1p.ZERO,e$2a.EPSILON6)&&(o=o$1p.clone(o$1p.UNIT_X,o));var a=o$1p.cross(o,t,Wa$4);return o$1p.normalize(a,a),o$1p.cross(t,a,o),o$1p.negate(o,o),o$1p.normalize(o,o),e$2b(n)||(n=new p$1e),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=o.x,n[4]=o.y,n[5]=o.z,n[6]=a.x,n[7]=a.y,n[8]=a.z,n};var ra$7=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),oa$5=new a$18,ta$5=new o$1p,ba$4=new o$1p,Ga$6=new p$1e,k$14=new p$1d,ea$7=new p$1d;m$17.basisTo2D=function(e,t,i){if(!e$2b(e))throw new t$16("projection is required.");if(!e$2b(t))throw new t$16("matrix is required.");if(!e$2b(i))throw new t$16("result is required.");var n=p$1d.getTranslation(t,ba$4),r=e.ellipsoid,o=r.cartesianToCartographic(n,oa$5),a=e.project(o,ta$5);o$1p.fromElements(a.z,a.x,a.y,a);var s=m$17.eastNorthUpToFixedFrame(n,r,k$14),l=p$1d.inverseTransformation(s,ea$7),u=p$1d.getMatrix3(t,Ga$6),c=p$1d.multiplyByMatrix3(l,u,i);return p$1d.multiply(ra$7,c,i),p$1d.setTranslation(i,a,i),i},m$17.wgs84To2DModelMatrix=function(e,t,i){if(!e$2b(e))throw new t$16("projection is required.");if(!e$2b(t))throw new t$16("center is required.");if(!e$2b(i))throw new t$16("result is required.");var n=e.ellipsoid,r=m$17.eastNorthUpToFixedFrame(t,n,k$14),o=p$1d.inverseTransformation(r,ea$7),a=n.cartesianToCartographic(t,oa$5),s=e.project(a,ta$5);o$1p.fromElements(s.z,s.x,s.y,s);var l=p$1d.fromTranslation(s,k$14);return p$1d.multiply(ra$7,o,i),p$1d.multiply(l,i,i),i},m$17.buildUp=function(e,t){var i=t.clone(),n=e.clone();n=o$1p.normalize(n,n),Math.abs(o$1p.dot(n,i))>=1&&(n=Math.abs(o$1p.dot(i,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,n):o$1p.clone(o$1p.UNIT_Z,n));var r=new o$1p;return o$1p.cross(n,i,r),r=o$1p.normalize(r,r),o$1p.cross(i,r,n),n=o$1p.normalize(n,n)},m$17.getHeading=function(e,t){var i;return i=e$2a.equalsEpsilon(Math.abs(e.z),1,e$2a.EPSILON3)?Math.atan2(t.y,t.x)-e$2a.PI_OVER_TWO:Math.atan2(e.y,e.x)-e$2a.PI_OVER_TWO,e$2a.TWO_PI-e$2a.zeroToTwoPi(i)},m$17.convertToColumbusCartesian=function(e){var t=new n$1b,i=t.ellipsoid,n=new o$1p,r=new a$18;return i.cartesianToCartographic(e,r),t.project(r,n),o$1p.fromElements(n.z,n.x,n.y)},m$17.convertTo3DCartesian=function(e){var t=new n$1b,i=t.ellipsoid,n=new o$1p,r=new a$18;return n=o$1p.fromElements(e.y,e.z,e.x),t.unproject(n,r),i.cartographicToCartesian(r,n)};var l$1c=new e$29;function f$14(e,t){if(o$1q.defined("origin",e),!e$2b(e=(t=u$_(t,t$13.WGS84)).scaleToGeodeticSurface(e)))throw new t$16("origin must not be at the center of the ellipsoid.");var i=m$17.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=o$1p.fromCartesian4(p$1d.getColumn(i,0,l$1c)),this._yAxis=o$1p.fromCartesian4(p$1d.getColumn(i,1,l$1c));var n=o$1p.fromCartesian4(p$1d.getColumn(i,2,l$1c));this._plane=o$1m.fromPointNormal(e,n)}Object.defineProperties(f$14.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var w$14=new e$26;f$14.fromPoints=function(e,t){return o$1q.defined("cartesians",e),new f$14(e$26.fromPoints(e,w$14).center,t)};var x$1d=new f$17,m$16=new o$1p;f$14.prototype.projectPointOntoPlane=function(e,t){o$1q.defined("cartesian",e);var i=x$1d;i.origin=e,o$1p.normalize(e,i.direction);var n=g$1h.rayPlane(i,this._plane,m$16);if(e$2b(n)||(o$1p.negate(i.direction,i.direction),n=g$1h.rayPlane(i,this._plane,m$16)),e$2b(n)){var r=o$1p.subtract(n,this._origin,n),o=o$1p.dot(this._xAxis,r),a=o$1p.dot(this._yAxis,r);return e$2b(t)?(t.x=o,t.y=a,t):new o$1o(o,a)}},f$14.prototype.projectPointsOntoPlane=function(e,t){o$1q.defined("cartesians",e),e$2b(t)||(t=[]);for(var i=0,n=e.length,r=0;r<n;r++){var o=this.projectPointOntoPlane(e[r],t[i]);e$2b(o)&&(t[i]=o,i++)}return t.length=i,t},f$14.prototype.projectPointToNearestOnPlane=function(e,t){o$1q.defined("cartesian",e),e$2b(t)||(t=new o$1o);var i=x$1d;i.origin=e,o$1p.clone(this._plane.normal,i.direction);var n=g$1h.rayPlane(i,this._plane,m$16);e$2b(n)||(o$1p.negate(i.direction,i.direction),n=g$1h.rayPlane(i,this._plane,m$16));var r=o$1p.subtract(n,this._origin,n),o=o$1p.dot(this._xAxis,r),a=o$1p.dot(this._yAxis,r);return t.x=o,t.y=a,t},f$14.prototype.projectPointsToNearestOnPlane=function(e,t){o$1q.defined("cartesians",e),e$2b(t)||(t=[]);var i=e.length;t.length=i;for(var n=0;n<i;n++)t[n]=this.projectPointToNearestOnPlane(e[n],t[n]);return t};var C$1c=new o$1p;f$14.prototype.projectPointOntoEllipsoid=function(e,t){o$1q.defined("cartesian",e),e$2b(t)||(t=new o$1p);var i=this._ellipsoid,n=this._origin,r=this._xAxis,o=this._yAxis,a=C$1c;return o$1p.multiplyByScalar(r,e.x,a),t=o$1p.add(n,a,t),o$1p.multiplyByScalar(o,e.y,a),o$1p.add(t,a,t),i.scaleToGeocentricSurface(t,t),t},f$14.prototype.projectPointsOntoEllipsoid=function(e,t){o$1q.defined("cartesians",e);var i=e.length;e$2b(t)?t.length=i:t=new Array(i);for(var n=0;n<i;++n)t[n]=this.projectPointOntoEllipsoid(e[n],t[n]);return t};var e$1_={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},Me$p=Object.freeze(e$1_);function f$13(e,t,i,n){this[0]=u$_(e,0),this[1]=u$_(i,0),this[2]=u$_(t,0),this[3]=u$_(n,0)}f$13.packedLength=4,f$13.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t},f$13.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new f$13),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i},f$13.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new f$13(e[0],e[2],e[1],e[3])},f$13.fromArray=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new f$13),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i},f$13.fromColumnMajorArray=function(e,t){return o$1q.defined("values",e),f$13.clone(e,t)},f$13.fromRowMajorArray=function(e,t){return o$1q.defined("values",e),e$2b(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new f$13(e[0],e[1],e[2],e[3])},f$13.fromScale=function(e,t){return o$1q.typeOf.object("scale",e),e$2b(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new f$13(e.x,0,0,e.y)},f$13.fromUniformScale=function(e,t){return o$1q.typeOf.number("scale",e),e$2b(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new f$13(e,0,0,e)},f$13.fromRotation=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2b(t)?(t[0]=i,t[1]=n,t[2]=-n,t[3]=i,t):new f$13(i,-n,n,i)},f$13.toArray=function(e,t){return o$1q.typeOf.object("matrix",e),e$2b(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},f$13.getElementIndex=function(e,t){return o$1q.typeOf.number.greaterThanOrEquals("row",t,0),o$1q.typeOf.number.lessThanOrEquals("row",t,1),o$1q.typeOf.number.greaterThanOrEquals("column",e,0),o$1q.typeOf.number.lessThanOrEquals("column",e,1),2*e+t},f$13.getColumn=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,1),o$1q.typeOf.object("result",i);var n=2*t,r=e[n],o=e[n+1];return i.x=r,i.y=o,i},f$13.setColumn=function(e,t,i,n){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,1),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n);var r=2*t;return(n=f$13.clone(e,n))[r]=i.x,n[r+1]=i.y,n},f$13.getRow=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,1),o$1q.typeOf.object("result",i);var n=e[t],r=e[t+2];return i.x=n,i.y=r,i},f$13.setRow=function(e,t,i,n){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,1),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n),(n=f$13.clone(e,n))[t]=i.x,n[t+2]=i.y,n};var u$V=new o$1o;f$13.getScale=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=o$1o.magnitude(o$1o.fromElements(e[0],e[1],u$V)),t.y=o$1o.magnitude(o$1o.fromElements(e[2],e[3],u$V)),t};var w$13=new o$1o;f$13.getMaximumScale=function(e){return f$13.getScale(e,w$13),o$1o.maximumComponent(w$13)},f$13.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0]*t[0]+e[2]*t[1],r=e[0]*t[2]+e[2]*t[3],o=e[1]*t[0]+e[3]*t[1],a=e[1]*t[2]+e[3]*t[3];return i[0]=n,i[1]=o,i[2]=r,i[3]=a,i},f$13.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i},f$13.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i},f$13.multiplyByVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=e[0]*t.x+e[2]*t.y,r=e[1]*t.x+e[3]*t.y;return i.x=n,i.y=r,i},f$13.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i},f$13.multiplyByScale=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.y,i[3]=e[3]*t.y,i},f$13.negate=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},f$13.transpose=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[2],r=e[1],o=e[3];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t},f$13.abs=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},f$13.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},f$13.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]},f$13.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i},f$13.IDENTITY=Object.freeze(new f$13(1,0,0,1)),f$13.ZERO=Object.freeze(new f$13(0,0,0,0)),f$13.COLUMN0ROW0=0,f$13.COLUMN0ROW1=1,f$13.COLUMN1ROW0=2,f$13.COLUMN1ROW1=3,Object.defineProperties(f$13.prototype,{length:{get:function(){return f$13.packedLength}}}),f$13.prototype.clone=function(e){return f$13.clone(this,e)},f$13.prototype.equals=function(e){return f$13.equals(this,e)},f$13.prototype.equalsEpsilon=function(e,t){return f$13.equalsEpsilon(this,e,t)},f$13.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"};var I$1q={POINTS:de$x.POINTS,LINES:de$x.LINES,LINE_LOOP:de$x.LINE_LOOP,LINE_STRIP:de$x.LINE_STRIP,TRIANGLES:de$x.TRIANGLES,TRIANGLE_STRIP:de$x.TRIANGLE_STRIP,TRIANGLE_FAN:de$x.TRIANGLE_FAN,validate:function(e){return e===I$1q.POINTS||e===I$1q.LINES||e===I$1q.LINE_LOOP||e===I$1q.LINE_STRIP||e===I$1q.TRIANGLES||e===I$1q.TRIANGLE_STRIP||e===I$1q.TRIANGLE_FAN}},W$18=Object.freeze(I$1q);function I$1p(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.typeOf.object("options.attributes",e.attributes),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=u$_(e.primitiveType,W$18.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=u$_(e.geometryType,Me$p.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}I$1p.computeNumberOfVertices=function(e){o$1q.typeOf.object("geometry",e);var t=-1;for(var i in e.attributes)if(e.attributes.hasOwnProperty(i)&&e$2b(e.attributes[i])&&e$2b(e.attributes[i].values)){var n=e.attributes[i];if(n.isInstanceAttribute)continue;var r=n.values.length/n.componentsPerAttribute;if(t!==r&&-1!==t)throw new t$16("All attribute lists must have the same number of attributes.");t=r}return t};var R$12=new a$18,W$17=new o$1p,P$18=new p$1d,Z$15=[new a$18,new a$18,new a$18],q$1b=[new o$1o,new o$1o,new o$1o],z$11=[new o$1o,new o$1o,new o$1o],D$13=new o$1p,K$Y=new n$13,$$14=new p$1d,rr$c=new f$13;function o$1c(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).componentDatatype))throw new t$16("options.componentDatatype is required.");if(!e$2b(e.componentsPerAttribute))throw new t$16("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new t$16("options.componentsPerAttribute must be between 1 and 4.");if(!e$2b(e.values))throw new t$16("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=u$_(e.normalize,!1),this.values=e.values}function d$1o(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).geometry))throw new t$16("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=u$_(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}I$1p._textureCoordinateRotationPoints=function(e,t,i,n){var r,o=h$18.center(n,R$12),a=a$18.toCartesian(o,i,W$17),s=m$17.eastNorthUpToFixedFrame(a,i,P$18),l=p$1d.inverse(s,P$18),u=q$1b,c=Z$15;c[0].longitude=n.west,c[0].latitude=n.south,c[1].longitude=n.west,c[1].latitude=n.north,c[2].longitude=n.east,c[2].latitude=n.south;var h=D$13;for(r=0;r<3;r++)a$18.toCartesian(c[r],i,h),h=p$1d.multiplyByPointAsVector(l,h,h),u[r].x=h.x,u[r].y=h.y;var d=n$13.fromAxisAngle(o$1p.UNIT_Z,-t,K$Y),f=p$1e.fromQuaternion(d,$$14),p=e.length,_=Number.POSITIVE_INFINITY,m=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(r=0;r<p;r++)h=p$1d.multiplyByPointAsVector(l,e[r],h),h=p$1e.multiplyByVector(f,h,h),_=Math.min(_,h.x),m=Math.min(m,h.y),g=Math.max(g,h.x),x=Math.max(x,h.y);var v=f$13.fromRotation(t,rr$c),y=z$11;y[0].x=_,y[0].y=m,y[1].x=_,y[1].y=x,y[2].x=g,y[2].y=m;var $=u[0],b=u[2].x-$.x,T=u[1].y-$.y;for(r=0;r<3;r++){var C=y[r];f$13.multiplyByVector(v,C,C),C.x=(C.x-$.x)/b,C.y=(C.y-$.y)/T}var S=y[0],w=y[1],E=y[2],P=new Array(6);return o$1o.pack(S,P),o$1o.pack(w,P,2),o$1o.pack(E,P,4),P};var e$1Z={NONE:0,TOP:1,ALL:2},_0x58701d=Object.freeze(e$1Z),F$1b=1/256,M$1a=256,t$10={octEncodeInRange:function(e,t,i){o$1q.defined("vector",e),o$1q.defined("result",i);var n=o$1p.magnitudeSquared(e);if(Math.abs(n-1)>e$2a.EPSILON6)throw new t$16("vector must be normalized.");if(i.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),i.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){var r=i.x,o=i.y;i.x=(1-Math.abs(o))*e$2a.signNotZero(r),i.y=(1-Math.abs(r))*e$2a.signNotZero(o)}return i.x=e$2a.toSNorm(i.x,t),i.y=e$2a.toSNorm(i.y,t),i},octEncode:function(e,t){return t$10.octEncodeInRange(e,255,t)}},y$$=new o$1o,w$12=new Uint8Array(1);function h$14(e){return w$12[0]=e,w$12[0]}t$10.octEncodeToCartesian4=function(e,t){return t$10.octEncodeInRange(e,65535,y$$),t.x=h$14(y$$.x*F$1b),t.y=h$14(y$$.x),t.z=h$14(y$$.y*F$1b),t.w=h$14(y$$.y),t},t$10.octDecodeInRange=function(e,t,i,n){if(o$1q.defined("result",n),e<0||e>i||t<0||t>i)throw new t$16("x and y must be unsigned normalized integers between 0 and "+i);if(n.x=e$2a.fromSNorm(e,i),n.y=e$2a.fromSNorm(t,i),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){var r=n.x;n.x=(1-Math.abs(n.y))*e$2a.signNotZero(r),n.y=(1-Math.abs(r))*e$2a.signNotZero(n.y)}return o$1p.normalize(n,n)},t$10.octDecode=function(e,t,i){return t$10.octDecodeInRange(e,t,255,i)},t$10.octDecodeFromCartesian4=function(e,t){o$1q.typeOf.object("encoded",e),o$1q.typeOf.object("result",t);var i=e.x,n=e.y,r=e.z,o=e.w;if(i<0||i>255||n<0||n>255||r<0||r>255||o<0||o>255)throw new t$16("x, y, z, and w must be unsigned normalized integers between 0 and 255");var a=i*M$1a+n,s=r*M$1a+o;return t$10.octDecodeInRange(a,s,65535,t)},t$10.octPackFloat=function(e){return o$1q.defined("encoded",e),256*e.x+e.y};var b$1f=new o$1o;function g$1c(e){return e>>1^-(1&e)}t$10.octEncodeFloat=function(e){return t$10.octEncode(e,b$1f),t$10.octPackFloat(b$1f)},t$10.octDecodeFloat=function(e,t){o$1q.defined("value",e);var i=e/256,n=Math.floor(i),r=256*(i-n);return t$10.octDecode(n,r,t)},t$10.octPack=function(e,t,i,n){o$1q.defined("v1",e),o$1q.defined("v2",t),o$1q.defined("v3",i),o$1q.defined("result",n);var r=t$10.octEncodeFloat(e),o=t$10.octEncodeFloat(t),a=t$10.octEncode(i,b$1f);return n.x=65536*a.x+r,n.y=65536*a.y+o,n},t$10.octUnpack=function(e,t,i,n){o$1q.defined("packed",e),o$1q.defined("v1",t),o$1q.defined("v2",i),o$1q.defined("v3",n);var r=e.x/65536,o=Math.floor(r),a=65536*(r-o);r=e.y/65536;var s=Math.floor(r),l=65536*(r-s);t$10.octDecodeFloat(a,t),t$10.octDecodeFloat(l,i),t$10.octDecode(o,s,n)},t$10.compressTextureCoordinates=function(e){return o$1q.defined("textureCoordinates",e),4096*(4095*e.x|0)+(4095*e.y|0)},t$10.decompressTextureCoordinates=function(e,t){o$1q.defined("compressed",e),o$1q.defined("result",t);var i=e/4096,n=Math.floor(i);return t.x=n/4095,t.y=(e-4096*n)/4095,t},t$10.zigZagDeltaDecode=function(e,t,i){o$1q.defined("uBuffer",e),o$1q.defined("vBuffer",t),o$1q.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),e$2b(i)&&o$1q.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,i.length);for(var n=e.length,r=0,o=0,a=0,s=0;s<n;++s)r+=g$1c(e[s]),o+=g$1c(t[s]),e[s]=r,t[s]=o,e$2b(i)&&(a+=g$1c(i[s]),i[s]=a)},t$10.octShortToFloat=function(e){return e$2a.clamp(3051850947599719e-20*e,-1,1)},t$10.octShortDecode=function(e,t,i){if(o$1q.defined("result",i),i.x=t$10.octShortToFloat(e),i.y=t$10.octShortToFloat(t),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){var n=i.x;i.x=(1-Math.abs(i.y))*e$2a.signNotZero(n),i.y=(1-Math.abs(n))*e$2a.signNotZero(i.y)}return o$1p.normalize(i,i)};var L$1b=new o$1p,O$Q=new o$1p,P$17=new o$1p;function S$Z(e,t,i,n,r){var o,a,s,l,u,c,h,d;if(o$1q.defined("point",e),o$1q.defined("p0",t),o$1q.defined("p1",i),o$1q.defined("p2",n),e$2b(r)||(r=new o$1p),e$2b(t.z)){if(o$1p.equalsEpsilon(e,t,e$2a.EPSILON14))return o$1p.clone(o$1p.UNIT_X,r);if(o$1p.equalsEpsilon(e,i,e$2a.EPSILON14))return o$1p.clone(o$1p.UNIT_Y,r);if(o$1p.equalsEpsilon(e,n,e$2a.EPSILON14))return o$1p.clone(o$1p.UNIT_Z,r);o=o$1p.subtract(i,t,L$1b),a=o$1p.subtract(n,t,O$Q),s=o$1p.subtract(e,t,P$17),l=o$1p.dot(o,o),u=o$1p.dot(o,a),c=o$1p.dot(o,s),h=o$1p.dot(a,a),d=o$1p.dot(a,s)}else{if(o$1o.equalsEpsilon(e,t,e$2a.EPSILON14))return o$1p.clone(o$1p.UNIT_X,r);if(o$1o.equalsEpsilon(e,i,e$2a.EPSILON14))return o$1p.clone(o$1p.UNIT_Y,r);if(o$1o.equalsEpsilon(e,n,e$2a.EPSILON14))return o$1p.clone(o$1p.UNIT_Z,r);o=o$1o.subtract(i,t,L$1b),a=o$1o.subtract(n,t,O$Q),s=o$1o.subtract(e,t,P$17),l=o$1o.dot(o,o),u=o$1o.dot(o,a),c=o$1o.dot(o,s),h=o$1o.dot(a,a),d=o$1o.dot(a,s)}r.y=h*c-u*d,r.z=l*d-u*c;var f=l*h-u*u;return 0!==r.y&&(r.y/=f),0!==r.z&&(r.z/=f),r.x=1-r.y-r.z,r}function i$11(){this.high=o$1p.clone(o$1p.ZERO),this.low=o$1p.clone(o$1p.ZERO)}i$11.encode=function(e,t){var i;return o$1q.typeOf.number("value",e),e$2b(t)||(t={high:0,low:0}),e>=0?(i=65536*Math.floor(e/65536),t.high=i,t.low=e-i):(i=65536*Math.floor(-e/65536),t.high=-i,t.low=e+i),t};var n$12={high:0,low:0};i$11.fromCartesian=function(e,t){o$1q.typeOf.object("cartesian",e),e$2b(t)||(t=new i$11);var i=t.high,n=t.low;return i$11.encode(e.x,n$12),i.x=n$12.high,n.x=n$12.low,i$11.encode(e.y,n$12),i.y=n$12.high,n.y=n$12.low,i$11.encode(e.z,n$12),i.z=n$12.high,n.z=n$12.low,t};var t$$=new i$11;i$11.writeElements=function(e,t,i){o$1q.defined("cartesianArray",t),o$1q.typeOf.number("index",i),o$1q.typeOf.number.greaterThanOrEquals("index",i,0),i$11.fromCartesian(e,t$$);var n=t$$.high,r=t$$.low;t[i]=n.x,t[i+1]=n.y,t[i+2]=n.z,t[i+3]=r.x,t[i+4]=r.y,t[i+5]=r.z};var r$17={UNSIGNED_BYTE:de$x.UNSIGNED_BYTE,UNSIGNED_SHORT:de$x.UNSIGNED_SHORT,UNSIGNED_INT:de$x.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case r$17.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r$17.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r$17.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t$16("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return r$17.UNSIGNED_SHORT;case 4:return r$17.UNSIGNED_INT;case 1:return r$17.UNSIGNED_BYTE;default:throw new t$16("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return e$2b(e)&&(e===r$17.UNSIGNED_BYTE||e===r$17.UNSIGNED_SHORT||e===r$17.UNSIGNED_INT)},createTypedArray:function(e,t){if(!e$2b(e))throw new t$16("numberOfVertices is required.");return e>=e$2a.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,i,n){if(!e$2b(e))throw new t$16("numberOfVertices is required.");if(!e$2b(t))throw new t$16("sourceArray is required.");if(!e$2b(i))throw new t$16("byteOffset is required.");return e>=e$2a.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,i,n):new Uint16Array(t,i,n)}},ce$x=Object.freeze(r$17),D$12={calculateACMR:function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).indices,i=e.maximumIndex,n=u$_(e.cacheSize,24);if(!e$2b(t))throw new t$16("indices is required.");var r=t.length;if(r<3||r%3!=0)throw new t$16("indices length must be a multiple of three.");if(i<=0)throw new t$16("maximumIndex must be greater than zero.");if(n<3)throw new t$16("cacheSize must be greater than two.");if(!e$2b(i)){i=0;for(var o=0,a=t[o];o<r;)a>i&&(i=a),a=t[++o]}for(var s=[],l=0;l<i+1;l++)s[l]=0;for(var u=n+1,c=0;c<r;++c)u-s[t[c]]>n&&(s[t[c]]=u,++u);return(u-n+1)/(r/3)}};D$12.tipsify=function(e){var t,i=(e=u$_(e,u$_.EMPTY_OBJECT)).indices,n=e.maximumIndex,r=u$_(e.cacheSize,24);function o(e,i,n,r,o,a,s){for(var l,u=-1,c=-1,h=0;h<n.length;){var d=n[h];r[d].numLiveTriangles&&(l=0,o-r[d].timeStamp+2*r[d].numLiveTriangles<=i&&(l=o-r[d].timeStamp),(l>c||-1===c)&&(c=l,u=d)),++h}return-1===u?function(e,i,n,r){for(;i.length>=1;){var o=i[i.length-1];if(i.splice(i.length-1,1),e[o].numLiveTriangles>0)return o}for(;t<r;){if(e[t].numLiveTriangles>0)return++t-1;++t}return-1}(r,a,0,s):u}if(!e$2b(i))throw new t$16("indices is required.");var a=i.length;if(a<3||a%3!=0)throw new t$16("indices length must be a multiple of three.");if(n<=0)throw new t$16("maximumIndex must be greater than zero.");if(r<3)throw new t$16("cacheSize must be greater than two.");var s=0,l=0,u=i[l],c=a;if(e$2b(n))s=n+1;else{for(;l<c;)u>s&&(s=u),u=i[++l];if(-1===s)return 0;++s}var h,d=[];for(h=0;h<s;h++)d[h]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};l=0;for(var f=0;l<c;)d[i[l]].vertexTriangles.push(f),++d[i[l]].numLiveTriangles,d[i[l+1]].vertexTriangles.push(f),++d[i[l+1]].numLiveTriangles,d[i[l+2]].vertexTriangles.push(f),++d[i[l+2]].numLiveTriangles,++f,l+=3;var p=0,_=r+1;t=1;var m,g,x,v,y=[],$=[],b=0,T=[],C=a/3,S=[];for(h=0;h<C;h++)S[h]=!1;for(;-1!==p;){y=[],v=(g=d[p]).vertexTriangles.length;for(var w=0;w<v;++w)if(!S[f=g.vertexTriangles[w]]){S[f]=!0,l=f+f+f;for(var E=0;E<3;++E)x=i[l],y.push(x),$.push(x),T[b]=x,++b,--(m=d[x]).numLiveTriangles,_-m.timeStamp>r&&(m.timeStamp=_,++_),++l}p=o(0,r,y,d,_,$,s)}return T};var k$13={};function gr$6(e,t,i,n,r){e[t++]=i,e[t++]=n,e[t++]=n,e[t++]=r,e[t++]=r,e[t]=i}function ma$5(e){for(var t=e.length,i=t/3*6,n=ce$x.createTypedArray(t,i),r=0,o=0;o<t;o+=3,r+=6)gr$6(n,r,e[o],e[o+1],e[o+2]);return n}function pa$3(e){var t=e.length;if(t>=3){var i=6*(t-2),n=ce$x.createTypedArray(t,i);gr$6(n,0,e[0],e[1],e[2]);for(var r=6,o=3;o<t;++o,r+=6)gr$6(n,r,e[o-1],e[o],e[o-2]);return n}return new Uint16Array}function ya$2(e){if(e.length>0){for(var t=e.length-1,i=6*(t-1),n=ce$x.createTypedArray(t,i),r=e[0],o=0,a=1;a<t;++a,o+=6)gr$6(n,o,r,e[a],e[a+1]);return n}return new Uint16Array}function Yr$2(e){var t={};for(var i in e)if(e.hasOwnProperty(i)&&e$2b(e[i])&&e$2b(e[i].values)){var n=e[i];t[i]=new o$1c({componentDatatype:n.componentDatatype,componentsPerAttribute:n.componentsPerAttribute,normalize:n.normalize,values:[]})}return t}function wa$3(e,t,i){for(var n in t)if(t.hasOwnProperty(n)&&e$2b(t[n])&&e$2b(t[n].values))for(var r=t[n],o=0;o<r.componentsPerAttribute;++o)e[n].values.push(r.values[i*r.componentsPerAttribute+o])}k$13.toWireframe=function(e){if(!e$2b(e))throw new t$16("geometry is required.");var t=e.indices;if(e$2b(t)){switch(e.primitiveType){case W$18.TRIANGLES:e.indices=ma$5(t);break;case W$18.TRIANGLE_STRIP:e.indices=pa$3(t);break;case W$18.TRIANGLE_FAN:e.indices=ya$2(t);break;default:throw new t$16("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}e.primitiveType=W$18.LINES}return e},k$13.createLineSegmentsForVectors=function(e,t,i){if(t=u$_(t,"normal"),!e$2b(e))throw new t$16("geometry is required.");if(!e$2b(e.attributes.position))throw new t$16("geometry.attributes.position is required.");if(!e$2b(e.attributes[t]))throw new t$16("geometry.attributes must have an attribute with the same name as the attributeName parameter, "+t+".");i=u$_(i,1e4);for(var n=e.attributes.position.values,r=e.attributes[t].values,o=n.length,a=new Float64Array(2*o),s=0,l=0;l<o;l+=3)a[s++]=n[l],a[s++]=n[l+1],a[s++]=n[l+2],a[s++]=n[l]+r[l]*i,a[s++]=n[l+1]+r[l+1]*i,a[s++]=n[l+2]+r[l+2]*i;var u,c=e.boundingSphere;return e$2b(c)&&(u=new i$1c(c.center,c.radius+i)),new I$1p({attributes:{position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:a})},primitiveType:W$18.LINES,boundingSphere:u})},k$13.createAttributeLocations=function(e){if(!e$2b(e))throw new t$16("geometry is required.");var t,i=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,r={},o=0,a=i.length;for(t=0;t<a;++t){var s=i[t];e$2b(n[s])&&(r[s]=o++)}for(var l in n)n.hasOwnProperty(l)&&!e$2b(r[l])&&(r[l]=o++);return r},k$13.reorderForPreVertexCache=function(e){if(!e$2b(e))throw new t$16("geometry is required.");var t=I$1p.computeNumberOfVertices(e),i=e.indices;if(e$2b(i)){for(var n=new Int32Array(t),r=0;r<t;r++)n[r]=-1;for(var o,a=i,s=a.length,l=ce$x.createTypedArray(t,s),u=0,c=0,h=0;u<s;)-1!==(o=n[a[u]])?l[c]=o:(n[o=a[u]]=h,l[c]=h,++h),++u,++c;e.indices=l;var d=e.attributes;for(var f in d)if(d.hasOwnProperty(f)&&e$2b(d[f])&&e$2b(d[f].values)){for(var p=d[f],_=p.values,m=0,g=p.componentsPerAttribute,x=S$12.createTypedArray(p.componentDatatype,h*g);m<t;){var v=n[m];if(-1!==v)for(var y=0;y<g;y++)x[g*v+y]=_[g*m+y];++m}p.values=x}}return e},k$13.reorderForPostVertexCache=function(e,t){if(!e$2b(e))throw new t$16("geometry is required.");var i=e.indices;if(e.primitiveType===W$18.TRIANGLES&&e$2b(i)){for(var n=i.length,r=0,o=0;o<n;o++)i[o]>r&&(r=i[o]);e.indices=D$12.tipsify({indices:i,maximumIndex:r,cacheSize:t})}return e},k$13.fitToUnsignedShortIndices=function(e){if(!e$2b(e))throw new t$16("geometry is required.");if(e$2b(e.indices)&&e.primitiveType!==W$18.TRIANGLES&&e.primitiveType!==W$18.LINES&&e.primitiveType!==W$18.POINTS)throw new t$16("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");var t=[],i=I$1p.computeNumberOfVertices(e);if(e$2b(e.indices)&&i>=e$2a.SIXTY_FOUR_KILOBYTES){var n,r=[],o=[],a=0,s=Yr$2(e.attributes),l=e.indices,u=l.length;e.primitiveType===W$18.TRIANGLES?n=3:e.primitiveType===W$18.LINES?n=2:e.primitiveType===W$18.POINTS&&(n=1);for(var c=0;c<u;c+=n){for(var h=0;h<n;++h){var d=l[c+h],f=r[d];e$2b(f)||(f=a++,r[d]=f,wa$3(s,e.attributes,d)),o.push(f)}a+n>=e$2a.SIXTY_FOUR_KILOBYTES&&(t.push(new I$1p({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),r=[],o=[],a=0,s=Yr$2(e.attributes))}0!==o.length&&t.push(new I$1p({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var Hr$2=new o$1p,da$2=new a$18;k$13.projectTo2D=function(e,t,i,n,r){if(!e$2b(e))throw new t$16("geometry is required.");if(!e$2b(t))throw new t$16("attributeName is required.");if(!e$2b(i))throw new t$16("attributeName3D is required.");if(!e$2b(n))throw new t$16("attributeName2D is required.");if(!e$2b(e.attributes[t]))throw new t$16("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==S$12.DOUBLE)throw new t$16("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var o=e.attributes[t],a=(r=e$2b(r)?r:new n$1b).ellipsoid,s=o.values,l=new Float64Array(s.length),u=0,c=0;c<s.length;c+=3){var h=o$1p.fromArray(s,c,Hr$2),d=a.cartesianToCartographic(h,da$2);if(!e$2b(d))throw new t$16("Could not project point ("+h.x+", "+h.y+", "+h.z+") to 2D.");var f=r.project(d,Hr$2);l[u++]=f.x,l[u++]=f.y,l[u++]=f.z}return e.attributes[i]=o,e.attributes[n]=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:l}),delete e.attributes[t],e};var xr$5={high:0,low:0};k$13.encodeAttribute=function(e,t,i,n){if(!e$2b(e))throw new t$16("geometry is required.");if(!e$2b(t))throw new t$16("attributeName is required.");if(!e$2b(i))throw new t$16("attributeHighName is required.");if(!e$2b(n))throw new t$16("attributeLowName is required.");if(!e$2b(e.attributes[t]))throw new t$16("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==S$12.DOUBLE)throw new t$16("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var r=e.attributes[t],o=r.values,a=o.length,s=new Float32Array(a),l=new Float32Array(a),u=0;u<a;++u)i$11.encode(o[u],xr$5),s[u]=xr$5.high,l[u]=xr$5.low;var c=r.componentsPerAttribute;return e.attributes[i]=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:c,values:s}),e.attributes[n]=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:c,values:l}),delete e.attributes[t],e};var W$16=new o$1p;function Vr$3(e,t){if(e$2b(t))for(var i=t.values,n=i.length,r=0;r<n;r+=3)o$1p.unpack(i,r,W$16),p$1d.multiplyByPoint(e,W$16,W$16),o$1p.pack(W$16,i,r)}function qr$2(e,t){if(e$2b(t))for(var i=t.values,n=i.length,r=0;r<n;r+=3)o$1p.unpack(i,r,W$16),p$1e.multiplyByVector(e,W$16,W$16),W$16=o$1p.normalize(W$16,W$16),o$1p.pack(W$16,i,r)}var Er$5=new p$1d,Lr$5=new p$1e;function Sa$4(e,t){var i,n=e.length,r={},o=e[0][t].attributes;for(i in o)if(o.hasOwnProperty(i)&&e$2b(o[i])&&e$2b(o[i].values)){for(var a=o[i],s=a.values.length,l=!0,u=1;u<n;++u){var c=e[u][t].attributes[i];if(!e$2b(c)||a.componentDatatype!==c.componentDatatype||a.componentsPerAttribute!==c.componentsPerAttribute||a.normalize!==c.normalize){l=!1;break}s+=c.values.length}l&&(r[i]=new o$1c({componentDatatype:a.componentDatatype,componentsPerAttribute:a.componentsPerAttribute,normalize:a.normalize,values:S$12.createTypedArray(a.componentDatatype,s)}),a.isInstanceAttribute&&(r[i].isInstanceAttribute=!0))}return r}k$13.transformToWorldCoordinates=function(e){if(!e$2b(e))throw new t$16("instance is required.");var t=e.modelMatrix;if(p$1d.equals(t,p$1d.IDENTITY))return e;var i=e.geometry.attributes;Vr$3(t,i.position),Vr$3(t,i.prevPosition),Vr$3(t,i.nextPosition),(e$2b(i.normal)||e$2b(i.tangent)||e$2b(i.bitangent))&&(p$1d.inverse(t,Er$5),p$1d.transpose(Er$5,Er$5),p$1d.getRotation(Er$5,Lr$5),qr$2(Lr$5,i.normal),qr$2(Lr$5,i.tangent),qr$2(Lr$5,i.bitangent));var n=e.geometry.boundingSphere;return e$2b(n)&&(e.geometry.boundingSphere=i$1c.transform(n,t,n)),e.modelMatrix=p$1d.clone(p$1d.IDENTITY),e};var Ta$6=new o$1p;function Gr$4(e,t){var i,n,r,o,a=e.length,s=e[0].modelMatrix,l=e$2b(e[0][t].indices),u=e[0][t].primitiveType;for(n=1;n<a;++n){if(!p$1d.equals(e[n].modelMatrix,s))throw new t$16("All instances must have the same modelMatrix.");if(e$2b(e[n][t].indices)!==l)throw new t$16("All instance geometries must have an indices or not have one.");if(e[n][t].primitiveType!==u)throw new t$16("All instance geometries must have the same primitiveType.")}var c,h,d,f,p=Sa$4(e,t);for(i in p)if(p.hasOwnProperty(i))for(c=p[i].values,o=0,n=0;n<a;++n)for(d=(h=e[n][t].attributes[i].values).length,r=0;r<d;++r)c[o++]=h[r];if(l){var _=0;for(n=0;n<a;++n)_+=e[n][t].indices.length;var m=I$1p.computeNumberOfVertices(new I$1p({attributes:p,primitiveType:W$18.POINTS})),g=ce$x.createTypedArray(m,_),x=0,v=0;for(n=0;n<a;++n){var y=e[n][t].indices,$=y.length;for(o=0;o<$;++o)g[x++]=v+y[o];v+=I$1p.computeNumberOfVertices(e[n][t])}f=g}var b,T=new o$1p,C=0;for(n=0;n<a;++n){if(!e$2b(b=e[n][t].boundingSphere)){T=void 0;break}o$1p.add(b.center,T,T)}if(e$2b(T))for(o$1p.divideByScalar(T,a,T),n=0;n<a;++n){b=e[n][t].boundingSphere;var S=o$1p.magnitude(o$1p.subtract(b.center,T,Ta$6))+b.radius;S>C&&(C=S)}return new I$1p({attributes:p,indices:f,primitiveType:u,boundingSphere:e$2b(T)?new i$1c(T,C):void 0})}k$13.combineInstances=function(e){if(!e$2b(e)||e.length<1)throw new t$16("instances is required and must have length greater than zero.");for(var t=[],i=[],n=e.length,r=0;r<n;++r){var o=e[r];e$2b(o.geometry)?t.push(o):e$2b(o.westHemisphereGeometry)&&e$2b(o.eastHemisphereGeometry)&&i.push(o)}var a=[];return t.length>0&&a.push(Gr$4(t,"geometry")),i.length>0&&(a.push(Gr$4(i,"westHemisphereGeometry")),a.push(Gr$4(i,"eastHemisphereGeometry"))),a};var U$19=new o$1p,mr$6=new o$1p,or$a=new o$1p,sr$7=new o$1p;k$13.computeNormal=function(e){if(!e$2b(e))throw new t$16("geometry is required.");if(!e$2b(e.attributes.position)||!e$2b(e.attributes.position.values))throw new t$16("geometry.attributes.position.values is required.");if(!e$2b(e.indices))throw new t$16("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!=0)throw new t$16("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==W$18.TRIANGLES)throw new t$16("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var t,i=e.indices,n=e.attributes,r=n.position.values,o=n.position.values.length/3,a=i.length,s=new Array(o),l=new Array(a/3),u=new Array(a);for(t=0;t<o;t++)s[t]={indexOffset:0,count:0,currentCount:0};var c=0;for(t=0;t<a;t+=3){var h=i[t],d=i[t+1],f=i[t+2],p=3*h,_=3*d,m=3*f;mr$6.x=r[p],mr$6.y=r[p+1],mr$6.z=r[p+2],or$a.x=r[_],or$a.y=r[_+1],or$a.z=r[_+2],sr$7.x=r[m],sr$7.y=r[m+1],sr$7.z=r[m+2],s[h].count++,s[d].count++,s[f].count++,o$1p.subtract(or$a,mr$6,or$a),o$1p.subtract(sr$7,mr$6,sr$7),l[c]=o$1p.cross(or$a,sr$7,new o$1p),c++}var g,x=0;for(t=0;t<o;t++)s[t].indexOffset+=x,x+=s[t].count;for(c=0,t=0;t<a;t+=3){var v=(g=s[i[t]]).indexOffset+g.currentCount;u[v]=c,g.currentCount++,u[v=(g=s[i[t+1]]).indexOffset+g.currentCount]=c,g.currentCount++,u[v=(g=s[i[t+2]]).indexOffset+g.currentCount]=c,g.currentCount++,c++}var y=new Float32Array(3*o);for(t=0;t<o;t++){var $=3*t;if(g=s[t],o$1p.clone(o$1p.ZERO,U$19),g.count>0){for(c=0;c<g.count;c++)o$1p.add(U$19,l[u[g.indexOffset+c]],U$19);o$1p.equalsEpsilon(o$1p.ZERO,U$19,e$2a.EPSILON10)&&o$1p.clone(l[u[g.indexOffset]],U$19)}o$1p.equalsEpsilon(o$1p.ZERO,U$19,e$2a.EPSILON10)&&(U$19.z=1),o$1p.normalize(U$19,U$19),y[$]=U$19.x,y[$+1]=U$19.y,y[$+2]=U$19.z}return e.attributes.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:y}),e};var ba$3=new o$1p,Wr$2=new o$1p,ga$4=new o$1p;k$13.computeTangentAndBitangent=function(e){if(!e$2b(e))throw new t$16("geometry is required.");var t=e.attributes,i=e.indices;if(!e$2b(t.position)||!e$2b(t.position.values))throw new t$16("geometry.attributes.position.values is required.");if(!e$2b(t.normal)||!e$2b(t.normal.values))throw new t$16("geometry.attributes.normal.values is required.");if(!e$2b(t.st)||!e$2b(t.st.values))throw new t$16("geometry.attributes.st.values is required.");if(!e$2b(i))throw new t$16("geometry.indices is required.");if(i.length<2||i.length%3!=0)throw new t$16("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==W$18.TRIANGLES)throw new t$16("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var n,r,o,a,s=e.attributes.position.values,l=e.attributes.normal.values,u=e.attributes.st.values,c=e.attributes.position.values.length/3,h=i.length,d=new Array(3*c);for(n=0;n<d.length;n++)d[n]=0;for(n=0;n<h;n+=3){var f=i[n],p=i[n+1],_=i[n+2];o=3*p,a=3*_;var m=2*f,g=2*p,x=2*_,v=s[r=3*f],y=s[r+1],$=s[r+2],b=u[m],T=u[m+1],C=u[g+1]-T,S=u[x+1]-T,w=1/((u[g]-b)*S-(u[x]-b)*C),E=(S*(s[o]-v)-C*(s[a]-v))*w,P=(S*(s[o+1]-y)-C*(s[a+1]-y))*w,A=(S*(s[o+2]-$)-C*(s[a+2]-$))*w;d[r]+=E,d[r+1]+=P,d[r+2]+=A,d[o]+=E,d[o+1]+=P,d[o+2]+=A,d[a]+=E,d[a+1]+=P,d[a+2]+=A}var L=new Float32Array(3*c),M=new Float32Array(3*c);for(n=0;n<c;n++){o=(r=3*n)+1,a=r+2;var R=o$1p.fromArray(l,r,ba$3),O=o$1p.fromArray(d,r,ga$4),I=o$1p.dot(R,O);o$1p.multiplyByScalar(R,I,Wr$2),o$1p.normalize(o$1p.subtract(O,Wr$2,O),O),L[r]=O.x,L[o]=O.y,L[a]=O.z,o$1p.normalize(o$1p.cross(R,O,O),O),M[r]=O.x,M[o]=O.y,M[a]=O.z}return e.attributes.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:L}),e.attributes.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:M}),e};var pr$5=new o$1o,X$12=new o$1p,Xr$2=new o$1p,Kr$3=new o$1p,Or$3=new o$1o;function Ea$5(e){if(e$2b(e.indices))return e;var t=I$1p.computeNumberOfVertices(e);if(t<3)throw new t$16("The number of vertices must be at least three.");if(t%3!=0)throw new t$16("The number of vertices must be a multiple of three.");for(var i=ce$x.createTypedArray(t,t),n=0;n<t;++n)i[n]=n;return e.indices=i,e}function La$5(e){var t=I$1p.computeNumberOfVertices(e);if(t<3)throw new t$16("The number of vertices must be at least three.");var i=ce$x.createTypedArray(t,3*(t-2));i[0]=1,i[1]=0,i[2]=2;for(var n=3,r=3;r<t;++r)i[n++]=r-1,i[n++]=0,i[n++]=r;return e.indices=i,e.primitiveType=W$18.TRIANGLES,e}function Oa$4(e){var t=I$1p.computeNumberOfVertices(e);if(t<3)throw new t$16("The number of vertices must be at least 3.");var i=ce$x.createTypedArray(t,3*(t-2));i[0]=0,i[1]=1,i[2]=2,t>3&&(i[3]=0,i[4]=2,i[5]=3);for(var n=6,r=3;r<t-1;r+=2)i[n++]=r,i[n++]=r-1,i[n++]=r+1,r+2<t&&(i[n++]=r,i[n++]=r+1,i[n++]=r+2);return e.indices=i,e.primitiveType=W$18.TRIANGLES,e}function Aa$5(e){if(e$2b(e.indices))return e;var t=I$1p.computeNumberOfVertices(e);if(t<2)throw new t$16("The number of vertices must be at least two.");if(t%2!=0)throw new t$16("The number of vertices must be a multiple of 2.");for(var i=ce$x.createTypedArray(t,t),n=0;n<t;++n)i[n]=n;return e.indices=i,e}function Pa$4(e){var t=I$1p.computeNumberOfVertices(e);if(t<2)throw new t$16("The number of vertices must be at least two.");var i=ce$x.createTypedArray(t,2*(t-1));i[0]=0,i[1]=1;for(var n=2,r=2;r<t;++r)i[n++]=r-1,i[n++]=r;return e.indices=i,e.primitiveType=W$18.LINES,e}function za$4(e){var t=I$1p.computeNumberOfVertices(e);if(t<2)throw new t$16("The number of vertices must be at least two.");var i=ce$x.createTypedArray(t,2*t);i[0]=0,i[1]=1;for(var n=2,r=2;r<t;++r)i[n++]=r-1,i[n++]=r;return i[n++]=t-1,i[n]=0,e.indices=i,e.primitiveType=W$18.LINES,e}function Na$4(e){switch(e.primitiveType){case W$18.TRIANGLE_FAN:return La$5(e);case W$18.TRIANGLE_STRIP:return Oa$4(e);case W$18.TRIANGLES:return Ea$5(e);case W$18.LINE_STRIP:return Pa$4(e);case W$18.LINE_LOOP:return za$4(e);case W$18.LINES:return Aa$5(e)}return e}function ar$9(e,t){Math.abs(e.y)<e$2a.EPSILON6&&(e.y=t?-e$2a.EPSILON6:e$2a.EPSILON6)}function Da$6(e,t,i){if(0!==e.y&&0!==t.y&&0!==i.y)return ar$9(e,e.y<0),ar$9(t,t.y<0),void ar$9(i,i.y<0);var n=Math.abs(e.y),r=Math.abs(t.y),o=Math.abs(i.y),a=(n>r?n>o?e$2a.sign(e.y):e$2a.sign(i.y):r>o?e$2a.sign(t.y):e$2a.sign(i.y))<0;ar$9(e,a),ar$9(t,a),ar$9(i,a)}k$13.compressVertices=function(e){if(!e$2b(e))throw new t$16("geometry is required.");var t,i,n=e.attributes.extrudeDirection;if(e$2b(n)){var r=n.values;i=r.length/3;var o=new Float32Array(2*i),a=0;for(t=0;t<i;++t)o$1p.fromArray(r,3*t,X$12),o$1p.equals(X$12,o$1p.ZERO)?a+=2:(Or$3=t$10.octEncodeInRange(X$12,65535,Or$3),o[a++]=Or$3.x,o[a++]=Or$3.y);return e.attributes.compressedAttributes=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:o}),delete e.attributes.extrudeDirection,e}var s=e.attributes.normal,l=e.attributes.st,u=e$2b(s),c=e$2b(l);if(!u&&!c)return e;var h,d,f,p,_=e.attributes.tangent,m=e.attributes.bitangent,g=e$2b(_),x=e$2b(m);u&&(h=s.values),c&&(d=l.values),g&&(f=_.values),x&&(p=m.values);var v=i=(u?h.length:d.length)/(u?3:2),y=c&&u?2:1;y+=g||x?1:0;var $=new Float32Array(v*=y),b=0;for(t=0;t<i;++t){c&&(o$1o.fromArray(d,2*t,pr$5),$[b++]=t$10.compressTextureCoordinates(pr$5));var T=3*t;u&&e$2b(f)&&e$2b(p)?(o$1p.fromArray(h,T,X$12),o$1p.fromArray(f,T,Xr$2),o$1p.fromArray(p,T,Kr$3),t$10.octPack(X$12,Xr$2,Kr$3,pr$5),$[b++]=pr$5.x,$[b++]=pr$5.y):(u&&(o$1p.fromArray(h,T,X$12),$[b++]=t$10.octEncodeFloat(X$12)),g&&(o$1p.fromArray(f,T,X$12),$[b++]=t$10.octEncodeFloat(X$12)),x&&(o$1p.fromArray(p,T,X$12),$[b++]=t$10.octEncodeFloat(X$12)))}return e.attributes.compressedAttributes=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:y,values:$}),u&&delete e.attributes.normal,c&&delete e.attributes.st,x&&delete e.attributes.bitangent,g&&delete e.attributes.tangent,e};var Jr$2=new o$1p;function Z$14(e,t,i,n){o$1p.add(e,o$1p.multiplyByScalar(o$1p.subtract(t,e,Jr$2),e.y/(e.y-t.y),Jr$2),i),o$1p.clone(i,n),ar$9(i,!0),ar$9(n,!1)}var er$c=new o$1p,nr$c=new o$1p,vr$7=new o$1p,tr$b=new o$1p,Rr$4={positions:new Array(7),indices:new Array(9)};function xa$4(e,t,i){if(!(e.x>=0||t.x>=0||i.x>=0)){Da$6(e,t,i);var n=e.y<0,r=t.y<0,o=i.y<0,a=0;a+=n?1:0,a+=r?1:0,a+=o?1:0;var s=Rr$4.indices;1===a?(s[1]=3,s[2]=4,s[5]=6,s[7]=6,s[8]=5,n?(Z$14(e,t,er$c,vr$7),Z$14(e,i,nr$c,tr$b),s[0]=0,s[3]=1,s[4]=2,s[6]=1):r?(Z$14(t,i,er$c,vr$7),Z$14(t,e,nr$c,tr$b),s[0]=1,s[3]=2,s[4]=0,s[6]=2):o&&(Z$14(i,e,er$c,vr$7),Z$14(i,t,nr$c,tr$b),s[0]=2,s[3]=0,s[4]=1,s[6]=0)):2===a&&(s[2]=4,s[4]=4,s[5]=3,s[7]=5,s[8]=6,n?r?o||(Z$14(i,e,er$c,vr$7),Z$14(i,t,nr$c,tr$b),s[0]=0,s[1]=1,s[3]=0,s[6]=2):(Z$14(t,i,er$c,vr$7),Z$14(t,e,nr$c,tr$b),s[0]=2,s[1]=0,s[3]=2,s[6]=1):(Z$14(e,t,er$c,vr$7),Z$14(e,i,nr$c,tr$b),s[0]=1,s[1]=2,s[3]=1,s[6]=0));var l=Rr$4.positions;return l[0]=e,l[1]=t,l[2]=i,l.length=3,(1===a||2===a)&&(l[3]=er$c,l[4]=nr$c,l[5]=vr$7,l[6]=tr$b,l.length=7),Rr$4}}function Qr$2(e,t){var i=e.attributes;if(0!==i.position.values.length){for(var n in i)if(i.hasOwnProperty(n)&&e$2b(i[n])&&e$2b(i[n].values)){var r=i[n];r.values=S$12.createTypedArray(r.componentDatatype,r.values)}var o=I$1p.computeNumberOfVertices(e);return e.indices=ce$x.createTypedArray(o,e.indices),t&&(e.boundingSphere=i$1c.fromVertices(i.position.values)),e}}function ur$8(e){var t=e.attributes,i={};for(var n in t)if(t.hasOwnProperty(n)&&e$2b(t[n])&&e$2b(t[n].values)){var r=t[n];i[n]=new o$1c({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]})}return new I$1p({attributes:i,indices:[],primitiveType:e.primitiveType})}function Br$3(e,t,i){var n=e$2b(e.geometry.boundingSphere);t=Qr$2(t,n),e$2b(i=Qr$2(i,n))&&!e$2b(t)?e.geometry=i:!e$2b(i)&&e$2b(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=i,e.geometry=void 0)}function Fr$3(e,t){var i=new e,n=new e,r=new e;return function(o,a,s,l,u,c,h,d){var f=e.fromArray(u,o*t,i),p=e.fromArray(u,a*t,n),_=e.fromArray(u,s*t,r);e.multiplyByScalar(f,l.x,f),e.multiplyByScalar(p,l.y,p),e.multiplyByScalar(_,l.z,_);var m=e.add(f,p,f);e.add(m,_,m),d&&e.normalize(m,m),e.pack(m,c,h*t)}}var Va$4=Fr$3(e$29,4),Ar$4=Fr$3(o$1p,3),$r$3=Fr$3(o$1o,2),qa$5=function(e,t,i,n,r,o,a){var s=r[e]*n.x,l=r[t]*n.y,u=r[i]*n.z;o[a]=s+l+u>e$2a.EPSILON6?1:0},yr$5=new o$1p,kr$4=new o$1p,Ir$6=new o$1p,Ga$5=new o$1p;function Pr$3(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){if(e$2b(o)||e$2b(a)||e$2b(s)||e$2b(l)||e$2b(u)||0!==f){var m=S$Z(n,o$1p.fromArray(r,3*e,yr$5),o$1p.fromArray(r,3*t,kr$4),o$1p.fromArray(r,3*i,Ir$6),Ga$5);if(e$2b(o)&&Ar$4(e,t,i,m,o,h.normal.values,_,!0),e$2b(u)){var g,x=o$1p.fromArray(u,3*e,yr$5),v=o$1p.fromArray(u,3*t,kr$4),y=o$1p.fromArray(u,3*i,Ir$6);o$1p.multiplyByScalar(x,m.x,x),o$1p.multiplyByScalar(v,m.y,v),o$1p.multiplyByScalar(y,m.z,y),o$1p.equals(x,o$1p.ZERO)&&o$1p.equals(v,o$1p.ZERO)&&o$1p.equals(y,o$1p.ZERO)?((g=yr$5).x=0,g.y=0,g.z=0):(g=o$1p.add(x,v,x),o$1p.add(g,y,g),o$1p.normalize(g,g)),o$1p.pack(g,h.extrudeDirection.values,3*_)}if(e$2b(c)&&qa$5(e,t,i,m,c,h.applyOffset.values,_),e$2b(a)&&Ar$4(e,t,i,m,a,h.tangent.values,_,!0),e$2b(s)&&Ar$4(e,t,i,m,s,h.bitangent.values,_,!0),e$2b(l)&&$r$3(e,t,i,m,l,h.st.values,_),f>0)for(var $=0;$<f;$++){var b=d[$];Ra$5(e,t,i,m,_,p[b],h[b])}}}function Ra$5(e,t,i,n,r,o,a){var s=o.componentsPerAttribute,l=o.values,u=a.values;switch(s){case 4:Va$4(e,t,i,n,l,u,r,!1);break;case 3:Ar$4(e,t,i,n,l,u,r,!1);break;case 2:$r$3(e,t,i,n,l,u,r,!1);break;default:u[r]=l[e]*n.x+l[t]*n.y+l[i]*n.z}}function Q$13(e,t,i,n,r,o){var a=e.position.values.length/3;if(-1!==r){var s=n[r],l=i[s];return-1===l?(i[s]=a,e.position.values.push(o.x,o.y,o.z),t.push(a),a):(t.push(l),l)}return e.position.values.push(o.x,o.y,o.z),t.push(a),a}var Ba$6={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function jr$4(e){var t=e.geometry,i=t.attributes,n=i.position.values,r=e$2b(i.normal)?i.normal.values:void 0,o=e$2b(i.bitangent)?i.bitangent.values:void 0,a=e$2b(i.tangent)?i.tangent.values:void 0,s=e$2b(i.st)?i.st.values:void 0,l=e$2b(i.extrudeDirection)?i.extrudeDirection.values:void 0,u=e$2b(i.applyOffset)?i.applyOffset.values:void 0,c=t.indices,h=[];for(var d in i)i.hasOwnProperty(d)&&!Ba$6[d]&&e$2b(i[d])&&h.push(d);var f,p,_,m,g=h.length,x=ur$8(t),v=ur$8(t),y=[];y.length=n.length/3;var $=[];for($.length=n.length/3,m=0;m<y.length;++m)y[m]=-1,$[m]=-1;var b=c.length;for(m=0;m<b;m+=3){var T=c[m],C=c[m+1],S=c[m+2],w=o$1p.fromArray(n,3*T),E=o$1p.fromArray(n,3*C),P=o$1p.fromArray(n,3*S),A=xa$4(w,E,P);if(e$2b(A)&&A.positions.length>3)for(var L=A.positions,M=A.indices,R=M.length,O=0;O<R;++O){var I=M[O],D=L[I];D.y<0?(f=v.attributes,p=v.indices,_=y):(f=x.attributes,p=x.indices,_=$),Pr$3(T,C,S,D,n,r,a,o,s,l,u,f,h,g,i,Q$13(f,p,_,c,I<3?m+I:-1,D))}else e$2b(A)&&(w=A.positions[0],E=A.positions[1],P=A.positions[2]),w.y<0?(f=v.attributes,p=v.indices,_=y):(f=x.attributes,p=x.indices,_=$),Pr$3(T,C,S,w,n,r,a,o,s,l,u,f,h,g,i,Q$13(f,p,_,c,m,w)),Pr$3(T,C,S,E,n,r,a,o,s,l,u,f,h,g,i,Q$13(f,p,_,c,m+1,E)),Pr$3(T,C,S,P,n,r,a,o,s,l,u,f,h,g,i,Q$13(f,p,_,c,m+2,P))}Br$3(e,v,x)}var ra$6=o$1m.fromPointNormal(o$1p.ZERO,o$1p.UNIT_Y),Fa$5=new o$1p,ka$4=new o$1p;function lr$8(e,t,i,n,r,o,a){if(e$2b(a)){var s=o$1p.fromArray(n,3*e,yr$5);o$1p.equalsEpsilon(s,i,e$2a.EPSILON10)?o.applyOffset.values[r]=a[e]:o.applyOffset.values[r]=a[t]}}function aa$5(e){var t,i=e.geometry,n=i.attributes,r=n.position.values,o=e$2b(n.applyOffset)?n.applyOffset.values:void 0,a=i.indices,s=ur$8(i),l=ur$8(i),u=a.length,c=[];c.length=r.length/3;var h=[];for(h.length=r.length/3,t=0;t<c.length;++t)c[t]=-1,h[t]=-1;for(t=0;t<u;t+=2){var d=a[t],f=a[t+1],p=o$1p.fromArray(r,3*d,yr$5),_=o$1p.fromArray(r,3*f,kr$4);Math.abs(p.y)<e$2a.EPSILON6&&(p.y<0?p.y=-e$2a.EPSILON6:p.y=e$2a.EPSILON6),Math.abs(_.y)<e$2a.EPSILON6&&(_.y<0?_.y=-e$2a.EPSILON6:_.y=e$2a.EPSILON6);var m=s.attributes,g=s.indices,x=h,v=l.attributes,y=l.indices,$=c,b=g$1h.lineSegmentPlane(p,_,ra$6,Ir$6);if(e$2b(b)){var T=o$1p.multiplyByScalar(o$1p.UNIT_Y,5*e$2a.EPSILON9,Fa$5);p.y<0&&(o$1p.negate(T,T),m=l.attributes,g=l.indices,x=c,v=s.attributes,y=s.indices,$=h);var C=o$1p.add(b,T,ka$4);lr$8(d,f,p,r,Q$13(m,g,x,a,t,p),m,o),lr$8(d,f,C,r,Q$13(m,g,x,a,-1,C),m,o),o$1p.negate(T,T),o$1p.add(b,T,C),lr$8(d,f,C,r,Q$13(v,y,$,a,-1,C),v,o),lr$8(d,f,_,r,Q$13(v,y,$,a,t+1,_),v,o)}else{var S,w,E;p.y<0?(S=l.attributes,w=l.indices,E=c):(S=s.attributes,w=s.indices,E=h),lr$8(d,f,p,r,Q$13(S,w,E,a,t,p),S,o),lr$8(d,f,_,r,Q$13(S,w,E,a,t+1,_),S,o)}}Br$3(e,l,s)}var ea$6=new o$1o,Ia$5=new o$1o,na$3=new o$1p,va$3=new o$1p,Cr$4=new o$1p,Ca$2=new o$1p,_a$4=new o$1p,Ma$4=new o$1p,ta$4=new o$1p,ia$3=new e$29;function oa$4(e){for(var t=e.attributes,i=t.position.values,n=t.prevPosition.values,r=t.nextPosition.values,o=i.length,a=0;a<o;a+=3){var s=o$1p.unpack(i,a,na$3);if(!(s.x>0)){var l=o$1p.unpack(n,a,va$3);(s.y<0&&l.y>0||s.y>0&&l.y<0)&&(a-3>0?(n[a]=i[a-3],n[a+1]=i[a-2],n[a+2]=i[a-1]):o$1p.pack(s,n,a));var u=o$1p.unpack(r,a,Cr$4);(s.y<0&&u.y>0||s.y>0&&u.y<0)&&(a+3<o?(r[a]=i[a+3],r[a+1]=i[a+4],r[a+2]=i[a+5]):o$1p.pack(s,r,a))}}}var Ua$5=5*e$2a.EPSILON9,zr$6=e$2a.EPSILON6;function Za$6(e){var t,i,n,r=e.geometry,o=r.attributes,a=o.position.values,s=o.prevPosition.values,l=o.nextPosition.values,u=o.expandAndWidth.values,c=e$2b(o.st)?o.st.values:void 0,h=e$2b(o.color)?o.color.values:void 0,d=e$2b(o.dist)?o.dist.values:void 0,f=ur$8(r),p=ur$8(r),_=!1,m=a.length/3;for(t=0;t<m;t+=4){var g=t,x=t+2,v=o$1p.fromArray(a,3*g,na$3),y=o$1p.fromArray(a,3*x,va$3);if(Math.abs(v.y)<zr$6)for(v.y=zr$6*(y.y<0?-1:1),a[3*t+1]=v.y,a[3*(t+1)+1]=v.y,i=3*g;i<3*g+12;i+=3)s[i]=a[3*t],s[i+1]=a[3*t+1],s[i+2]=a[3*t+2];if(Math.abs(y.y)<zr$6)for(y.y=zr$6*(v.y<0?-1:1),a[3*(t+2)+1]=y.y,a[3*(t+3)+1]=y.y,i=3*g;i<3*g+12;i+=3)l[i]=a[3*(t+2)],l[i+1]=a[3*(t+2)+1],l[i+2]=a[3*(t+2)+2];var $=f.attributes,b=f.indices,T=p.attributes,C=p.indices,S=g$1h.lineSegmentPlane(v,y,ra$6,Ca$2);if(e$2b(S)){_=!0;var w=o$1p.multiplyByScalar(o$1p.UNIT_Y,Ua$5,_a$4);v.y<0&&(o$1p.negate(w,w),$=p.attributes,b=p.indices,T=f.attributes,C=f.indices);var E=o$1p.add(S,w,Ma$4);$.position.values.push(v.x,v.y,v.z,v.x,v.y,v.z),$.position.values.push(E.x,E.y,E.z),$.position.values.push(E.x,E.y,E.z),$.prevPosition.values.push(s[3*g],s[3*g+1],s[3*g+2]),$.prevPosition.values.push(s[3*g+3],s[3*g+4],s[3*g+5]),$.prevPosition.values.push(v.x,v.y,v.z,v.x,v.y,v.z),$.nextPosition.values.push(E.x,E.y,E.z),$.nextPosition.values.push(E.x,E.y,E.z),$.nextPosition.values.push(E.x,E.y,E.z),$.nextPosition.values.push(E.x,E.y,E.z),o$1p.negate(w,w),o$1p.add(S,w,E),T.position.values.push(E.x,E.y,E.z),T.position.values.push(E.x,E.y,E.z),T.position.values.push(y.x,y.y,y.z,y.x,y.y,y.z),T.prevPosition.values.push(E.x,E.y,E.z),T.prevPosition.values.push(E.x,E.y,E.z),T.prevPosition.values.push(E.x,E.y,E.z),T.prevPosition.values.push(E.x,E.y,E.z),T.nextPosition.values.push(y.x,y.y,y.z,y.x,y.y,y.z),T.nextPosition.values.push(l[3*x],l[3*x+1],l[3*x+2]),T.nextPosition.values.push(l[3*x+3],l[3*x+4],l[3*x+5]);var P=o$1o.fromArray(u,2*g,ea$6),A=Math.abs(P.y);$.expandAndWidth.values.push(-1,A,1,A),$.expandAndWidth.values.push(-1,-A,1,-A),T.expandAndWidth.values.push(-1,A,1,A),T.expandAndWidth.values.push(-1,-A,1,-A);var L=o$1p.magnitudeSquared(o$1p.subtract(S,v,Cr$4));if(L/=o$1p.magnitudeSquared(o$1p.subtract(y,v,Cr$4)),e$2b(h)){var M=e$29.fromArray(h,4*g,ia$3),R=e$29.fromArray(h,4*x,ia$3),O=e$2a.lerp(M.x,R.x,L),I=e$2a.lerp(M.y,R.y,L),D=e$2a.lerp(M.z,R.z,L),B=e$2a.lerp(M.w,R.w,L);for(i=4*g;i<4*g+8;++i)$.color.values.push(h[i]);for($.color.values.push(O,I,D,B),$.color.values.push(O,I,D,B),T.color.values.push(O,I,D,B),T.color.values.push(O,I,D,B),i=4*x;i<4*x+8;++i)T.color.values.push(h[i])}if(e$2b(c)){var N=o$1o.fromArray(c,2*g,ea$6),F=o$1o.fromArray(c,2*(t+3),Ia$5),U=e$2a.lerp(N.x,F.x,L);for(i=2*g;i<2*g+4;++i)$.st.values.push(c[i]);for($.st.values.push(U,N.y),$.st.values.push(U,F.y),T.st.values.push(U,N.y),T.st.values.push(U,F.y),i=2*x;i<2*x+4;++i)T.st.values.push(c[i])}if(e$2b(d)){var G=o$1p.fromArray(d,3*g,ta$4),z=o$1p.fromArray(d,3*x,ta$4),V=e$2a.lerp(G.x,z.x,L);for(i=3*g;i<3*g+6;++i)$.dist.values.push(d[i]);for($.dist.values.push(V,G.y,G.z),$.dist.values.push(V,G.y,G.z),T.dist.values.push(V,z.y,z.z),T.dist.values.push(V,z.y,z.z),i=3*x;i<3*x+6;++i)T.dist.values.push(d[i])}n=$.position.values.length/3-4,b.push(n,n+2,n+1),b.push(n+1,n+2,n+3),n=T.position.values.length/3-4,C.push(n,n+2,n+1),C.push(n+1,n+2,n+3)}else{var k,W;for(v.y<0?(k=p.attributes,W=p.indices):(k=f.attributes,W=f.indices),k.position.values.push(v.x,v.y,v.z),k.position.values.push(v.x,v.y,v.z),k.position.values.push(y.x,y.y,y.z),k.position.values.push(y.x,y.y,y.z),i=3*t;i<3*t+12;++i)k.prevPosition.values.push(s[i]),k.nextPosition.values.push(l[i]);for(i=2*t;i<2*t+8;++i)k.expandAndWidth.values.push(u[i]),e$2b(c)&&k.st.values.push(c[i]);if(e$2b(h))for(i=4*t;i<4*t+16;++i)k.color.values.push(h[i]);if(e$2b(d))for(i=3*t;i<3*t+12;++i)k.dist.values.push(d[i]);n=k.position.values.length/3-4,W.push(n,n+2,n+1),W.push(n+1,n+2,n+3)}}_&&(oa$4(p),oa$4(f)),Br$3(e,p,f)}k$13.splitLongitude=function(e){if(!e$2b(e))throw new t$16("instance is required.");var t=e.geometry,i=t.boundingSphere;if(e$2b(i)&&(i.center.x-i.radius>0||i$1c.intersectPlane(i,o$1m.ORIGIN_ZX_PLANE)!==Ae$u.INTERSECTING))return e;if(t.geometryType!==Me$p.NONE)switch(t.geometryType){case Me$p.POLYLINES:Za$6(e);break;case Me$p.TRIANGLES:jr$4(e);break;case Me$p.LINES:aa$5(e)}else Na$4(t),t.primitiveType===W$18.TRIANGLES?jr$4(e):t.primitiveType===W$18.LINES&&aa$5(e);return e};var C$1b=e$2a.EPSILON10;function D$11(e,t,i,n){if(o$1q.defined("equalsEpsilon",t),e$2b(e)){n=u$_(n,C$1b),i=u$_(i,!1);var r,o,a,s=e.length;if(s<2)return e;for(r=1;r<s&&!t(o=e[r-1],a=e[r],n);++r);if(r===s)return i&&t(e[0],e[e.length-1],n)?e.slice(1):e;for(var l=e.slice(0,r);r<s;++r)t(o,a=e[r],n)||(l.push(a),o=a);return i&&l.length>1&&t(l[0],l[l.length-1],n)&&l.shift(),l}}function T$18(e,t,i){if(0===e)return t*i;var n=e*e,r=n*n,o=r*n,a=o*n,s=a*n,l=s*n,u=i;return t*((1-n/4-3*r/64-5*o/256-175*a/16384-441*s/65536-4851*l/1048576)*u-(3*n/8+3*r/32+45*o/1024+105*a/4096+2205*s/131072+6237*l/524288)*Math.sin(2*u)+(15*r/256+45*o/1024+525*a/16384+1575*s/65536+155925*l/8388608)*Math.sin(4*u)-(35*o/3072+175*a/12288+3675*s/262144+13475*l/1048576)*Math.sin(6*u)+(315*a/131072+2205*s/524288+43659*l/8388608)*Math.sin(8*u)-(693*s/1310720+6237*l/5242880)*Math.sin(10*u)+1001*l/8388608*Math.sin(12*u))}function z$10(e,t,i){var n=e/i;if(0===t)return n;var r=n*n,o=r*n,a=o*n,s=t*t,l=s*s,u=l*s,c=u*s,h=c*s,d=h*s,f=Math.sin(2*n),p=Math.cos(2*n),_=Math.sin(4*n),m=Math.cos(4*n),g=Math.sin(6*n),x=Math.cos(6*n),v=Math.sin(8*n),y=Math.cos(8*n),$=Math.sin(10*n);return n+n*s/4+7*n*l/64+15*n*u/256+579*n*c/16384+1515*n*h/65536+16837*n*d/1048576+(3*n*l/16+45*n*u/256-n*(32*r-561)*c/4096-n*(232*r-1677)*h/16384+n*(399985-90560*r+512*a)*d/5242880)*p+(21*n*u/256+483*n*c/4096-n*(224*r-1969)*h/16384-n*(33152*r-112599)*d/1048576)*m+(151*n*c/4096+4681*n*h/65536+1479*n*d/16384-453*o*d/32768)*x+(1097*n*h/65536+42783*n*d/1048576)*y+8011*n*d/1048576*Math.cos(10*n)+(3*s/8+3*l/16+213*u/2048-3*r*u/64+255*c/4096-33*r*c/512+20861*h/524288-33*r*h/512+a*h/1024+28273*d/1048576-471*r*d/8192+9*a*d/4096)*f+(21*l/256+21*u/256+533*c/8192-21*r*c/512+197*h/4096-315*r*h/4096+584039*d/16777216-12517*r*d/131072+7*a*d/2048)*_+(151*u/6144+151*c/4096+5019*h/131072-453*r*h/16384+26965*d/786432-8607*r*d/131072)*g+(1097*c/131072+1097*h/65536+225797*d/10485760-1097*r*d/65536)*v+(8011*h/2621440+8011*d/1048576)*$+293393*d/251658240*Math.sin(12*n)}function p$16(e,t){if(0===e)return Math.log(Math.tan(.5*(e$2a.PI_OVER_TWO+t)));var i=e*Math.sin(t);return Math.log(Math.tan(.5*(e$2a.PI_OVER_TWO+t)))-e/2*Math.log((1+i)/(1-i))}function G$1h(e,t,i,n,r){var o=p$16(e._ellipticity,i),a=p$16(e._ellipticity,r);return Math.atan2(e$2a.negativePiToPi(n-t),a-o)}function k$12(e,t,i,n,r,o,a){var s=e._heading,l=o-n,u=0;if(e$2a.equalsEpsilon(Math.abs(s),e$2a.PI_OVER_TWO,e$2a.EPSILON8))if(t===i)u=t*Math.cos(r)*e$2a.negativePiToPi(l);else{var c=Math.sin(r);u=t*Math.cos(r)*e$2a.negativePiToPi(l)/Math.sqrt(1-e._ellipticitySquared*c*c)}else{var h=T$18(e._ellipticity,t,r);u=(T$18(e._ellipticity,t,a)-h)/Math.cos(s)}return Math.abs(u)}var A$1i=new o$1p,q$1a=new o$1p;function D$10(e,t,i,n){var r=o$1p.normalize(n.cartographicToCartesian(t,q$1a),A$1i),o=o$1p.normalize(n.cartographicToCartesian(i,q$1a),q$1a);o$1q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(o$1p.angleBetween(r,o))-Math.PI),.0125);var a=n.maximumRadius,s=n.minimumRadius,l=a*a,u=s*s;e._ellipticitySquared=(l-u)/l,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=a$18.clone(t,e._start),e._start.height=0,e._end=a$18.clone(i,e._end),e._end.height=0,e._heading=G$1h(e,t.longitude,t.latitude,i.longitude,i.latitude),e._distance=k$12(e,n.maximumRadius,n.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude)}function W$15(e,t,i,n,r,o){var a,s,l,u=r*r;if(Math.abs(e$2a.PI_OVER_TWO-Math.abs(t))>e$2a.EPSILON8){s=z$10(T$18(r,n,e.latitude)+i*Math.cos(t),r,n);var c=p$16(r,e.latitude),h=p$16(r,s);l=Math.tan(t)*(h-c),a=e$2a.negativePiToPi(e.longitude+l)}else{var d;if(s=e.latitude,0===r)d=n*Math.cos(e.latitude);else{var f=Math.sin(e.latitude);d=n*Math.cos(e.latitude)/Math.sqrt(1-u*f*f)}l=i/d,a=t>0?e$2a.negativePiToPi(e.longitude+l):e$2a.negativePiToPi(e.longitude-l)}return e$2b(o)?(o.longitude=a,o.latitude=s,o.height=0,o):new a$18(a,s,0)}function P$16(e,t,i){var n=u$_(i,t$13.WGS84);this._ellipsoid=n,this._start=new a$18,this._end=new a$18,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,e$2b(e)&&e$2b(t)&&D$10(this,e,t,n)}function a$_(e){e=u$_(e,u$_.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}function z$$(e,t,i){i=i||2;var n,r,o,a,s,l,u,c=t&&t.length,h=c?t[0]*i:e.length,d=P$15(e,0,h,i,!0),f=[];if(!d||d.next===d.prev)return f;if(c&&(d=K$X(e,t,d,i)),e.length>80*i){n=o=e[0],r=a=e[1];for(var p=i;p<h;p+=i)(s=e[p])<n&&(n=s),(l=e[p+1])<r&&(r=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-r))?1/u:0}return g$1b(d,f,i,n,r,u),f}function P$15(e,t,i,n,r){var o,a;if(r===E$1j(e,t,i,n)>0)for(o=t;o<i;o+=n)a=D$$(o,e[o],e[o+1],a);else for(o=i-n;o>=t;o-=n)a=D$$(o,e[o],e[o+1],a);return a&&L$1a(a,a.next)&&(M$19(a),a=a.next),a}function Z$13(e,t){if(!e)return e;t||(t=e);var i,n=e;do{if(i=!1,n.steiner||!L$1a(n,n.next)&&0!==h$13(n.prev,n,n.next))n=n.next;else{if(M$19(n),(n=t=n.prev)===n.next)break;i=!0}}while(i||n!==t);return t}function g$1b(e,t,i,n,r,o,a){if(e){!a&&o&&_$11(e,n,r,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?V$11(e,n,r,o):O$P(e))t.push(s.i/i),t.push(e.i/i),t.push(l.i/i),M$19(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?g$1b(e=G$1g(Z$13(e),t,i),t,i,n,r,o,2):2===a&&J$_(e,t,i,n,r,o):g$1b(Z$13(e),t,i,n,r,o,1);break}}}function O$P(e){var t=e.prev,i=e,n=e.next;if(h$13(t,i,n)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(w$11(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&h$13(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function V$11(e,t,i,n){var r=e.prev,o=e,a=e.next;if(h$13(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,l=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,u=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=T$17(s,l,t,i,n),d=T$17(u,c,t,i,n),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&w$11(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&h$13(f.prev,f,f.next)>=0||(f=f.prevZ,p!==e.prev&&p!==e.next&&w$11(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&h$13(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&w$11(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&h$13(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&w$11(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&h$13(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function G$1g(e,t,i){var n=e;do{var r=n.prev,o=n.next.next;!L$1a(r,o)&&C$1a(r,n,n.next,o)&&F$1a(r,o)&&F$1a(o,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(o.i/i),M$19(n),M$19(n.next),n=e=o),n=n.next}while(n!==e);return Z$13(n)}function J$_(e,t,i,n,r,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Y$U(a,s)){var l=B$10(a,s);return a=Z$13(a,a.next),l=Z$13(l,l.next),g$1b(a,t,i,n,r,o),void g$1b(l,t,i,n,r,o)}s=s.next}a=a.next}while(a!==e)}function K$X(e,t,i,n){var r,o,a,s=[];for(r=0,o=t.length;r<o;r++)(a=P$15(e,t[r]*n,r<o-1?t[r+1]*n:e.length,n,!1))===a.next&&(a.steiner=!0),s.push(X$11(a));for(s.sort(Q$12),r=0;r<s.length;r++)R$11(s[r],i),i=Z$13(i,i.next);return i}function Q$12(e,t){return e.x-t.x}function R$11(e,t){if(t=U$18(e,t)){var i=B$10(t,e);Z$13(i,i.next)}}function U$18(e,t){var i,n=t,r=e.x,o=e.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if(a=s,s===r){if(o===n.y)return n;if(o===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!i)return null;if(r===a)return i;var l,u=i,c=i.x,h=i.y,d=1/0;n=i;do{r>=n.x&&n.x>=c&&r!==n.x&&w$11(o<h?r:a,o,c,h,o<h?a:r,o,n.x,n.y)&&(l=Math.abs(o-n.y)/(r-n.x),F$1a(n,e)&&(l<d||l===d&&(n.x>i.x||n.x===i.x&&W$14(i,n)))&&(i=n,d=l)),n=n.next}while(n!==u);return i}function W$14(e,t){return h$13(e.prev,e,t.prev)<0&&h$13(t.next,e,e.next)<0}function _$11(e,t,i,n){var r=e;do{null===r.z&&(r.z=T$17(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,$$13(r)}function $$13(e){var t,i,n,r,o,a,s,l,u=1;do{for(i=e,e=null,o=null,a=0;i;){for(a++,n=i,s=0,t=0;t<u&&(s++,n=n.nextZ);t++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=n}o.nextZ=null,u*=2}while(a>1);return e}function T$17(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function X$11(e){var t=e,i=e;do{(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next}while(t!==e);return i}function w$11(e,t,i,n,r,o,a,s){return(r-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(n-s)-(i-a)*(t-s)>=0&&(i-a)*(o-s)-(r-a)*(n-s)>=0}function Y$U(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!I$1o(e,t)&&(F$1a(e,t)&&F$1a(t,e)&&S$Y(e,t)&&(h$13(e.prev,e,t.prev)||h$13(e,t.prev,t))||L$1a(e,t)&&h$13(e.prev,e,e.next)>0&&h$13(t.prev,t,t.next)>0)}function h$13(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function L$1a(e,t){return e.x===t.x&&e.y===t.y}function C$1a(e,t,i,n){var r=H$13(h$13(e,t,i)),o=H$13(h$13(e,t,n)),a=H$13(h$13(i,n,e)),s=H$13(h$13(i,n,t));return!!(r!==o&&a!==s||0===r&&k$11(e,i,t)||0===o&&k$11(e,n,t)||0===a&&k$11(i,e,n)||0===s&&k$11(i,t,n))}function k$11(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function H$13(e){return e>0?1:e<0?-1:0}function I$1o(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&C$1a(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function F$1a(e,t){return h$13(e.prev,e,e.next)<0?h$13(e,t,e.next)>=0&&h$13(e,e.prev,t)>=0:h$13(e,t,e.prev)<0||h$13(e,e.next,t)<0}function S$Y(e,t){var i=e,n=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}function B$10(e,t){var i=new A$1h(e.i,e.x,e.y),n=new A$1h(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function D$$(e,t,i,n){var r=new A$1h(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function M$19(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function A$1h(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E$1j(e,t,i,n){for(var r=0,o=t,a=i-n;o<i;o+=n)r+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return r}Object.defineProperties(P$16.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return o$1q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return o$1q.defined("distance",this._distance),this._heading}}}),P$16.fromStartHeadingDistance=function(e,t,i,n,r){o$1q.defined("start",e),o$1q.defined("heading",t),o$1q.defined("distance",i),o$1q.typeOf.number.greaterThan("distance",i,0);var o=u$_(n,t$13.WGS84),a=o.maximumRadius,s=o.minimumRadius,l=a*a,u=s*s,c=Math.sqrt((l-u)/l),h=W$15(e,t=e$2a.negativePiToPi(t),i,o.maximumRadius,c);return!e$2b(r)||e$2b(n)&&!n.equals(r.ellipsoid)?new P$16(e,h,o):(r.setEndPoints(e,h),r)},P$16.prototype.setEndPoints=function(e,t){o$1q.defined("start",e),o$1q.defined("end",t),D$10(this,e,t,this._ellipsoid)},P$16.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)},P$16.prototype.interpolateUsingSurfaceDistance=function(e,t){if(o$1q.typeOf.number("distance",e),!e$2b(this._distance)||0===this._distance)throw new t$16("EllipsoidRhumbLine must have distinct start and end set.");return W$15(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)},P$16.prototype.findIntersectionWithLongitude=function(e,t){if(o$1q.typeOf.number("intersectionLongitude",e),!e$2b(this._distance)||0===this._distance)throw new t$16("EllipsoidRhumbLine must have distinct start and end set.");var i=this._ellipticity,n=this._heading,r=Math.abs(n),o=this._start;if(e=e$2a.negativePiToPi(e),e$2a.equalsEpsilon(Math.abs(e),Math.PI,e$2a.EPSILON14)&&(e=e$2a.sign(o.longitude)*Math.PI),e$2b(t)||(t=new a$18),Math.abs(e$2a.PI_OVER_TWO-r)<=e$2a.EPSILON8)return t.longitude=e,t.latitude=o.latitude,t.height=0,t;if(e$2a.equalsEpsilon(Math.abs(e$2a.PI_OVER_TWO-r),e$2a.PI_OVER_TWO,e$2a.EPSILON8))return e$2a.equalsEpsilon(e,o.longitude,e$2a.EPSILON12)?void 0:(t.longitude=e,t.latitude=e$2a.PI_OVER_TWO*e$2a.sign(e$2a.PI_OVER_TWO-n),t.height=0,t);var a,s=o.latitude,l=i*Math.sin(s),u=Math.tan(.5*(e$2a.PI_OVER_TWO+s))*Math.exp((e-o.longitude)/Math.tan(n)),c=(1+l)/(1-l),h=o.latitude;do{a=h;var d=i*Math.sin(a),f=(1+d)/(1-d);h=2*Math.atan(u*Math.pow(f/c,i/2))-e$2a.PI_OVER_TWO}while(!e$2a.equalsEpsilon(h,a,e$2a.EPSILON12));return t.longitude=e,t.latitude=h,t.height=0,t},P$16.prototype.findIntersectionWithLatitude=function(e,t){if(o$1q.typeOf.number("intersectionLatitude",e),!e$2b(this._distance)||0===this._distance)throw new t$16("EllipsoidRhumbLine must have distinct start and end set.");var i=this._ellipticity,n=this._heading,r=this._start;if(!e$2a.equalsEpsilon(Math.abs(n),e$2a.PI_OVER_TWO,e$2a.EPSILON8)){var o=p$16(i,r.latitude),a=p$16(i,e),s=Math.tan(n)*(a-o),l=e$2a.negativePiToPi(r.longitude+s);return e$2b(t)?(t.longitude=l,t.latitude=e,t.height=0,t):new a$18(l,e,0)}},z$$.deviation=function(e,t,i,n){var r=t&&t.length,o=r?t[0]*i:e.length,a=Math.abs(E$1j(e,0,o,i));if(r)for(var s=0,l=t.length;s<l;s++){var u=t[s]*i,c=s<l-1?t[s+1]*i:e.length;a-=Math.abs(E$1j(e,u,c,i))}var h=0;for(s=0;s<n.length;s+=3){var d=n[s]*i,f=n[s+1]*i,p=n[s+2]*i;h+=Math.abs((e[d]-e[p])*(e[f+1]-e[d+1])-(e[d]-e[f])*(e[p+1]-e[d+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},z$$.flatten=function(e){for(var t=e[0][0].length,i={vertices:[],holes:[],dimensions:t},n=0,r=0;r<e.length;r++){for(var o=0;o<e[r].length;o++)for(var a=0;a<t;a++)i.vertices.push(e[r][o][a]);r>0&&(n+=e[r-1].length,i.holes.push(n))}return i};var e$1Y={CLOCKWISE:de$x.CW,COUNTER_CLOCKWISE:de$x.CCW,NONE:de$x.NONE,validate:function(e){return e===e$1Y.CLOCKWISE||e===e$1Y.COUNTER_CLOCKWISE}},W$13=Object.freeze(e$1Y),nr$b=new o$1p,ur$7=new o$1p,A$1g={computeArea2D:function(e){o$1q.defined("positions",e),o$1q.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);for(var t=e.length,i=0,n=t-1,r=0;r<t;n=r++){var o=e[n],a=e[r];i+=o.x*a.y-a.x*o.y}return.5*i},computeWindingOrder2D:function(e){return A$1g.computeArea2D(e)>0?W$13.COUNTER_CLOCKWISE:W$13.CLOCKWISE},triangulate:function(e,t){return o$1q.defined("positions",e),z$$(o$1o.packArray(e),t,2)}},X$10=new o$1p,Y$T=new o$1p,Z$12=new o$1p,$$12=new o$1p,H$12=new o$1p,rr$b=new o$1p,g$1a=new o$1p;A$1g.computeSubdivision=function(e,t,i,n,r){r=u$_(r,!1),n=u$_(n,e$2a.RADIANS_PER_DEGREE),o$1q.typeOf.object("ellipsoid",e),o$1q.defined("positions",t),o$1q.defined("indices",i),o$1q.typeOf.number.greaterThanOrEquals("indices.length",i.length,3),o$1q.typeOf.number.equals("indices.length % 3","0",i.length%3,0),o$1q.typeOf.number.greaterThan("granularity",n,0);var o,a=i.slice(0),s=t.length,l=new Array(3*s),u=0;for(o=0;o<s;o++){var c=t[o];l[u++]=c.x,l[u++]=c.y,l[u++]=c.z}for(var h=[],d={},f=e.maximumRadius,p=e$2a.chordLength(n,f),_=p*p;a.length>0;){var m,g,x=a.pop(),v=a.pop(),y=a.pop(),$=o$1p.fromArray(l,3*y,X$10),b=o$1p.fromArray(l,3*v,Y$T),T=o$1p.fromArray(l,3*x,Z$12),C=r?$:o$1p.multiplyByScalar(o$1p.normalize($,$$12),f,$$12),S=r?b:o$1p.multiplyByScalar(o$1p.normalize(b,H$12),f,H$12),w=r?T:o$1p.multiplyByScalar(o$1p.normalize(T,rr$b),f,rr$b),E=o$1p.magnitudeSquared(o$1p.subtract(C,S,g$1a)),P=o$1p.magnitudeSquared(o$1p.subtract(S,w,g$1a)),A=o$1p.magnitudeSquared(o$1p.subtract(w,C,g$1a)),L=Math.max(E,P,A);L>_?E===L?(e$2b(o=d[m=Math.min(y,v)+" "+Math.max(y,v)])||(g=o$1p.add($,b,g$1a),o$1p.multiplyByScalar(g,.5,g),l.push(g.x,g.y,g.z),o=l.length/3-1,d[m]=o),a.push(y,o,x),a.push(o,v,x)):P===L?(e$2b(o=d[m=Math.min(v,x)+" "+Math.max(v,x)])||(g=o$1p.add(b,T,g$1a),o$1p.multiplyByScalar(g,.5,g),l.push(g.x,g.y,g.z),o=l.length/3-1,d[m]=o),a.push(v,o,y),a.push(o,x,y)):A===L&&(e$2b(o=d[m=Math.min(x,y)+" "+Math.max(x,y)])||(g=o$1p.add(T,$,g$1a),o$1p.multiplyByScalar(g,.5,g),l.push(g.x,g.y,g.z),o=l.length/3-1,d[m]=o),a.push(x,o,v),a.push(o,y,v)):(h.push(y),h.push(v),h.push(x))}return new I$1p({attributes:{position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:l})},indices:h,primitiveType:W$18.TRIANGLES})};var or$9=new a$18,hr$4=new a$18,vr$6=new a$18,F$19=new a$18;function r$16(){this._array=[],this._offset=0,this._length=0}A$1g.computeRhumbLineSubdivision=function(e,t,i,n){n=u$_(n,e$2a.RADIANS_PER_DEGREE),o$1q.typeOf.object("ellipsoid",e),o$1q.defined("positions",t),o$1q.defined("indices",i),o$1q.typeOf.number.greaterThanOrEquals("indices.length",i.length,3),o$1q.typeOf.number.equals("indices.length % 3","0",i.length%3,0),o$1q.typeOf.number.greaterThan("granularity",n,0);var r,o=i.slice(0),a=t.length,s=new Array(3*a),l=0;for(r=0;r<a;r++){var u=t[r];s[l++]=u.x,s[l++]=u.y,s[l++]=u.z}for(var c=[],h={},d=e.maximumRadius,f=e$2a.chordLength(n,d),p=new P$16(void 0,void 0,e),_=new P$16(void 0,void 0,e),m=new P$16(void 0,void 0,e);o.length>0;){var g=o.pop(),x=o.pop(),v=o.pop(),y=o$1p.fromArray(s,3*v,X$10),$=o$1p.fromArray(s,3*x,Y$T),b=o$1p.fromArray(s,3*g,Z$12),T=e.cartesianToCartographic(y,or$9),C=e.cartesianToCartographic($,hr$4),S=e.cartesianToCartographic(b,vr$6);p.setEndPoints(T,C);var w=p.surfaceDistance;_.setEndPoints(C,S);var E=_.surfaceDistance;m.setEndPoints(S,T);var P,A,L,M,R=m.surfaceDistance,O=Math.max(w,E,R);O>f?w===O?(e$2b(r=h[P=Math.min(v,x)+" "+Math.max(v,x)])||(A=p.interpolateUsingFraction(.5,F$19),L=.5*(T.height+C.height),M=o$1p.fromRadians(A.longitude,A.latitude,L,e,g$1a),s.push(M.x,M.y,M.z),r=s.length/3-1,h[P]=r),o.push(v,r,g),o.push(r,x,g)):E===O?(e$2b(r=h[P=Math.min(x,g)+" "+Math.max(x,g)])||(A=_.interpolateUsingFraction(.5,F$19),L=.5*(C.height+S.height),M=o$1p.fromRadians(A.longitude,A.latitude,L,e,g$1a),s.push(M.x,M.y,M.z),r=s.length/3-1,h[P]=r),o.push(x,r,v),o.push(r,g,v)):R===O&&(e$2b(r=h[P=Math.min(g,v)+" "+Math.max(g,v)])||(A=m.interpolateUsingFraction(.5,F$19),L=.5*(S.height+T.height),M=o$1p.fromRadians(A.longitude,A.latitude,L,e,g$1a),s.push(M.x,M.y,M.z),r=s.length/3-1,h[P]=r),o.push(g,r,x),o.push(r,v,x)):(c.push(v),c.push(x),c.push(g))}return new I$1p({attributes:{position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:s})},indices:c,primitiveType:W$18.TRIANGLES})},A$1g.scaleToGeodeticHeight=function(e,t,i,n){i=u$_(i,t$13.WGS84);var r=nr$b,o=ur$7;if(t=u$_(t,0),n=u$_(n,!0),e$2b(e))for(var a=e.length,s=0;s<a;s+=3)o$1p.fromArray(e,s,o),n&&(o=i.scaleToGeodeticSurface(o,o)),0!==t&&(r=i.geodeticSurfaceNormal(o,r),o$1p.multiplyByScalar(r,t,r),o$1p.add(o,r,o)),e[s]=o.x,e[s+1]=o.y,e[s+2]=o.z;return e},Object.defineProperties(r$16.prototype,{length:{get:function(){return this._length}}}),r$16.prototype.enqueue=function(e){this._array.push(e),this._length++},r$16.prototype.dequeue=function(){if(0!==this._length){var e=this._array,t=this._offset,i=e[t];return e[t]=void 0,++t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,i}},r$16.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},r$16.prototype.contains=function(e){return-1!==this._array.indexOf(e)},r$16.prototype.clear=function(){this._array.length=this._offset=this._length=0},r$16.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var y$_={computeHierarchyPackedLength:function(e){for(var t=0,i=[e];i.length>0;){var n=i.pop();if(e$2b(n)){t+=2;var r=n.positions,o=n.holes;if(e$2b(r)&&(t+=r.length*o$1p.packedLength),e$2b(o))for(var a=o.length,s=0;s<a;++s)i.push(o[s])}}return t},packPolygonHierarchy:function(e,t,i){for(var n=[e];n.length>0;){var r=n.pop();if(e$2b(r)){var o=r.positions,a=r.holes;if(t[i++]=e$2b(o)?o.length:0,t[i++]=e$2b(a)?a.length:0,e$2b(o))for(var s=o.length,l=0;l<s;++l,i+=3)o$1p.pack(o[l],t,i);if(e$2b(a))for(var u=a.length,c=0;c<u;++c)n.push(a[c])}}return i},unpackPolygonHierarchy:function(e,t){for(var i=e[t++],n=e[t++],r=new Array(i),o=n>0?new Array(n):void 0,a=0;a<i;++a,t+=o$1p.packedLength)r[a]=o$1p.unpack(e,t);for(var s=0;s<n;++s)o[s]=y$_.unpackPolygonHierarchy(e,t),t=o[s].startingIndex,delete o[s].startingIndex;return{positions:r,holes:o,startingIndex:t}}},G$1f=new o$1p;function P$14(e,t,i,n){return o$1p.subtract(t,e,G$1f),o$1p.multiplyByScalar(G$1f,i/n,G$1f),o$1p.add(e,G$1f,G$1f),[G$1f.x,G$1f.y,G$1f.z]}y$_.subdivideLineCount=function(e,t,i){var n=o$1p.distance(e,t)/i,r=Math.max(0,Math.ceil(e$2a.log2(n)));return Math.pow(2,r)};var _$10=new a$18,Q$11=new a$18,j$1b=new a$18,rr$a=new o$1p;y$_.subdivideRhumbLineCount=function(e,t,i,n){var r=new P$16(e.cartesianToCartographic(t,_$10),e.cartesianToCartographic(i,Q$11),e).surfaceDistance/n,o=Math.max(0,Math.ceil(e$2a.log2(r)));return Math.pow(2,o)},y$_.subdivideLine=function(e,t,i,n){var r=y$_.subdivideLineCount(e,t,i),o=o$1p.distance(e,t),a=o/r;e$2b(n)||(n=[]);var s=n;s.length=3*r;for(var l=0,u=0;u<r;u++){var c=P$14(e,t,u*a,o);s[l++]=c[0],s[l++]=c[1],s[l++]=c[2]}return s},y$_.subdivideRhumbLine=function(e,t,i,n,r){var o=new P$16(e.cartesianToCartographic(t,_$10),e.cartesianToCartographic(i,Q$11),e),a=o.surfaceDistance/n,s=Math.max(0,Math.ceil(e$2a.log2(a))),l=Math.pow(2,s),u=o.surfaceDistance/l;e$2b(r)||(r=[]);var c=r;c.length=3*l;for(var h=0,d=0;d<l;d++){var f=o.interpolateUsingSurfaceDistance(d*u,j$1b),p=e.cartographicToCartesian(f,rr$a);c[h++]=p.x,c[h++]=p.y,c[h++]=p.z}return c};var ar$8=new o$1p,er$b=new o$1p,tr$a=new o$1p,nr$a=new o$1p;y$_.scaleToGeodeticHeightExtruded=function(e,t,i,n,r){n=u$_(n,t$13.WGS84);var o=ar$8,a=er$b,s=tr$a,l=nr$a;if(e$2b(e)&&e$2b(e.attributes)&&e$2b(e.attributes.position))for(var u=e.attributes.position.values,c=u.length/2,h=0;h<c;h+=3)o$1p.fromArray(u,h,s),n.geodeticSurfaceNormal(s,o),l=n.scaleToGeodeticSurface(s,l),a=o$1p.multiplyByScalar(o,i,a),a=o$1p.add(l,a,a),u[h+c]=a.x,u[h+1+c]=a.y,u[h+2+c]=a.z,r&&(l=o$1p.clone(s,l)),a=o$1p.multiplyByScalar(o,t,a),a=o$1p.add(l,a,a),u[h]=a.x,u[h+1]=a.y,u[h+2]=a.z;return e},y$_.polygonOutlinesFromHierarchy=function(e,t,i){var n,r,o,a=[],s=new r$16;for(s.enqueue(e);0!==s.length;){var l=s.dequeue(),u=l.positions;if(t)for(o=u.length,n=0;n<o;n++)i.scaleToGeodeticSurface(u[n],u[n]);if(!((u=D$11(u,o$1p.equalsEpsilon,!0)).length<3)){var c=l.holes?l.holes.length:0;for(n=0;n<c;n++){var h=l.holes[n],d=h.positions;if(t)for(o=d.length,r=0;r<o;++r)i.scaleToGeodeticSurface(d[r],d[r]);if(!((d=D$11(d,o$1p.equalsEpsilon,!0)).length<3)){a.push(d);var f=0;for(e$2b(h.holes)&&(f=h.holes.length),r=0;r<f;r++)s.enqueue(h.holes[r])}}a.push(u)}}return a};var vr$5=new o$1p(6378137,6378137,6378137);y$_.polygonsFromHierarchy=function(e,t,i,n){var r=[],o=[],a=new r$16;for(a.enqueue(e);0!==a.length;){var s,l,u,c=a.dequeue(),h=c.positions,d=c.holes,f=h.slice();if(i)for(l=h.length,s=0;s<l;s++)n.scaleToGeodeticSurface(h[s],f[s]);if(e$2b(n)&&!o$1p.equals(n._radii,vr$5)&&(u=e$2a.EPSILON7),!((h=D$11(f,o$1p.equalsEpsilon,!0,u)).length<3)){var p=t(h);if(e$2b(p)){var _=[],m=A$1g.computeWindingOrder2D(p);m===W$13.CLOCKWISE&&(p.reverse(),h=h.slice().reverse());var g,x=h.slice(),v=e$2b(d)?d.length:0,y=[];for(s=0;s<v;s++){var $=d[s],b=$.positions;if(i)for(l=b.length,g=0;g<l;++g)n.scaleToGeodeticSurface(b[g],b[g]);if(!((b=D$11(b,o$1p.equalsEpsilon,!0,e$2a.EPSILON7)).length<3)){var T=t(b);if(e$2b(T)){(m=A$1g.computeWindingOrder2D(T))===W$13.CLOCKWISE&&(T.reverse(),b=b.slice().reverse()),y.push(b),_.push(x.length),x=x.concat(b),p=p.concat(T);var C=0;for(e$2b($.holes)&&(C=$.holes.length),g=0;g<C;g++)a.enqueue($.holes[g])}}}r.push({outerRing:h,holes:y}),o.push({positions:x,positions2D:p,holes:_})}}}return{hierarchy:r,polygons:o}};var cr$5=new o$1o,ur$6=new o$1p,fr$4=new n$13,ir$7=new p$1e;y$_.computeBoundingRectangle=function(e,t,i,n,r){for(var o=n$13.fromAxisAngle(e,n,fr$4),a=p$1e.fromQuaternion(o,ir$7),s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,h=i.length,d=0;d<h;++d){var f=o$1p.clone(i[d],ur$6);p$1e.multiplyByVector(a,f,f);var p=t(f,cr$5);e$2b(p)&&(s=Math.min(s,p.x),l=Math.max(l,p.x),u=Math.min(u,p.y),c=Math.max(c,p.y))}return r.x=s,r.y=u,r.width=l-s,r.height=c-u,r},y$_.createGeometryFromPositions=function(e,t,i,n,r,o){var a=A$1g.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);var s=t.positions;if(n){for(var l=s.length,u=new Array(3*l),c=0,h=0;h<l;h++){var d=s[h];u[c++]=d.x,u[c++]=d.y,u[c++]=d.z}var f=new I$1p({attributes:{position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:u})},indices:a,primitiveType:W$18.TRIANGLES});return r.normal?k$13.computeNormal(f):f}return o===m$1f.GEODESIC?A$1g.computeSubdivision(e,s,a,i):o===m$1f.RHUMB?A$1g.computeRhumbLineSubdivision(e,s,a,i):void 0};var K$W=[],mr$5=new o$1p,or$8=new o$1p;function n$11(e){e=u$_(e,u$_.EMPTY_OBJECT),this.position=u$_(e.position,!1),this.normal=u$_(e.normal,!1),this.st=u$_(e.st,!1),this.bitangent=u$_(e.bitangent,!1),this.tangent=u$_(e.tangent,!1),this.color=u$_(e.color,!1)}y$_.computeWallGeometry=function(e,t,i,n,r){var o,a,s,l,u,c=e.length,h=0;if(n)for(a=3*c*2,o=new Array(2*a),s=0;s<c;s++)l=e[s],u=e[(s+1)%c],o[h]=o[h+a]=l.x,o[++h]=o[h+a]=l.y,o[++h]=o[h+a]=l.z,o[++h]=o[h+a]=u.x,o[++h]=o[h+a]=u.y,o[++h]=o[h+a]=u.z,++h;else{var d=e$2a.chordLength(i,t.maximumRadius),f=0;if(r===m$1f.GEODESIC)for(s=0;s<c;s++)f+=y$_.subdivideLineCount(e[s],e[(s+1)%c],d);else if(r===m$1f.RHUMB)for(s=0;s<c;s++)f+=y$_.subdivideRhumbLineCount(t,e[s],e[(s+1)%c],d);for(a=3*(f+c),o=new Array(2*a),s=0;s<c;s++){var p;l=e[s],u=e[(s+1)%c],r===m$1f.GEODESIC?p=y$_.subdivideLine(l,u,d,K$W):r===m$1f.RHUMB&&(p=y$_.subdivideRhumbLine(t,l,u,d,K$W));for(var _=p.length,m=0;m<_;++m,++h)o[h]=p[m],o[h+a]=p[m];o[h]=u.x,o[h+a]=u.x,o[++h]=u.y,o[h+a]=u.y,o[++h]=u.z,o[h+a]=u.z,++h}}c=o.length;var g=ce$x.createTypedArray(c/3,c-6*e.length),x=0;for(c/=6,s=0;s<c;s++){var v=s,y=v+1,$=v+c,b=$+1;l=o$1p.fromArray(o,3*v,mr$5),u=o$1p.fromArray(o,3*y,or$8),!o$1p.equalsEpsilon(l,u,e$2a.EPSILON10,e$2a.EPSILON10)&&(g[x++]=v,g[x++]=$,g[x++]=y,g[x++]=y,g[x++]=$,g[x++]=b)}return new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:o})}),indices:g,primitiveType:W$18.TRIANGLES})},n$11.POSITION_ONLY=Object.freeze(new n$11({position:!0})),n$11.POSITION_AND_NORMAL=Object.freeze(new n$11({position:!0,normal:!0})),n$11.POSITION_NORMAL_AND_ST=Object.freeze(new n$11({position:!0,normal:!0,st:!0})),n$11.POSITION_AND_ST=Object.freeze(new n$11({position:!0,st:!0})),n$11.POSITION_AND_COLOR=Object.freeze(new n$11({position:!0,color:!0})),n$11.ALL=Object.freeze(new n$11({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0})),n$11.DEFAULT=n$11.POSITION_NORMAL_AND_ST,n$11.packedLength=6,n$11.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),t[i++]=e.position?1:0,t[i++]=e.normal?1:0,t[i++]=e.st?1:0,t[i++]=e.tangent?1:0,t[i++]=e.bitangent?1:0,t[i]=e.color?1:0,t},n$11.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");return t=u$_(t,0),e$2b(i)||(i=new n$11),i.position=1===e[t++],i.normal=1===e[t++],i.st=1===e[t++],i.tangent=1===e[t++],i.bitangent=1===e[t++],i.color=1===e[t],i},n$11.clone=function(e,t){if(e$2b(e))return e$2b(t)||(t=new n$11),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var De$r=new a$18,Ee$s=new a$18;function Oe$p(e,t,i,n){var r=n.cartesianToCartographic(e,De$r).height,o=n.cartesianToCartographic(t,Ee$s);o.height=r,n.cartographicToCartesian(o,t);var a=n.cartesianToCartographic(i,Ee$s);a.height=r-100,n.cartographicToCartesian(a,i)}var Le$t=new f$18,Ve$l=new o$1p,Be$n=new o$1p,ke$f=new o$1p,ze$g=new o$1p,Ue$j=new o$1p,Ye$h=new o$1p,ve$t=new o$1p,W$12=new o$1p,x$1c=new o$1p,je$i=new o$1o,Me$o=new o$1o,We$n=new o$1p,He$c=new n$13,Qe$d=new p$1e,qe$e=new p$1e;function pe$z(e){var t=e.vertexFormat,i=e.geometry,n=e.shadowVolume,r=i.attributes.position.values,o=r.length,a=e.wall,s=e.top||a,l=e.bottom||a;if(t.st||t.normal||t.tangent||t.bitangent||n){var u=e.boundingRectangle,c=e.tangentPlane,h=e.ellipsoid,d=e.stRotation,f=e.perPositionHeight,p=je$i;p.x=u.x,p.y=u.y;var _,m=e.isComputeTexCoord?new Float32Array(o):new Float32Array(o/3*2),g=t.st?m:void 0;t.normal&&(_=f&&s&&!a?i.attributes.normal.values:new Float32Array(o));var x=t.tangent?new Float32Array(o):void 0,v=t.bitangent?new Float32Array(o):void 0,y=n?new Float32Array(o):void 0,$=0,b=0,T=Be$n,C=ke$f,S=ze$g,w=!0,E=Qe$d,P=qe$e;if(0!==d){var A=n$13.fromAxisAngle(c._plane.normal,d,He$c);E=p$1e.fromQuaternion(A,E),A=n$13.fromAxisAngle(c._plane.normal,-d,He$c),P=p$1e.fromQuaternion(A,P)}else E=p$1e.clone(p$1e.IDENTITY,E),P=p$1e.clone(p$1e.IDENTITY,P);var L=0,M=0;s&&l&&(L=o/2,M=o/3,o/=2);for(var R=0;R<o;R+=3){var O=o$1p.fromArray(r,R,We$n);if(t.st){var I=p$1e.multiplyByVector(E,O,Ve$l);I=h.scaleToGeodeticSurface(I,I);var D=c.projectPointOntoPlane(I,Me$o);o$1o.subtract(D,p,D);var B=e$2a.clamp(D.x/u.width,0,1),N=e$2a.clamp(D.y/u.height,0,1);l&&(g[$+M]=B,g[$+1+M]=N),s&&(g[$]=B,g[$+1]=N),$+=2}if(t.normal||t.tangent||t.bitangent||n){var F=b+1,U=b+2;if(a){if(R+3<o){var G=o$1p.fromArray(r,R+3,Ue$j);if(w){var z=o$1p.fromArray(r,R+o,Ye$h);f&&Oe$p(O,G,z,h),o$1p.subtract(G,O,G),o$1p.subtract(z,O,z),T=o$1p.normalize(o$1p.cross(z,G,T),T),w=!1}o$1p.equalsEpsilon(G,O,e$2a.EPSILON10)&&(w=!0)}(t.tangent||t.bitangent)&&(S=h.geodeticSurfaceNormal(O,S),t.tangent&&(C=o$1p.normalize(o$1p.cross(S,T,C),C)))}else T=h.geodeticSurfaceNormal(O,T),(t.tangent||t.bitangent)&&(f&&(ve$t=o$1p.fromArray(_,b,ve$t),W$12=o$1p.cross(o$1p.UNIT_Z,ve$t,W$12),W$12=o$1p.normalize(p$1e.multiplyByVector(P,W$12,W$12),W$12),t.bitangent&&(x$1c=o$1p.normalize(o$1p.cross(ve$t,W$12,x$1c),x$1c))),C=o$1p.cross(o$1p.UNIT_Z,T,C),C=o$1p.normalize(p$1e.multiplyByVector(P,C,C),C),t.bitangent&&(S=o$1p.normalize(o$1p.cross(T,C,S),S)));t.normal&&(e.wall?(_[b+L]=T.x,_[F+L]=T.y,_[U+L]=T.z):l&&(_[b+L]=-T.x,_[F+L]=-T.y,_[U+L]=-T.z),(s&&!f||a)&&(_[b]=T.x,_[F]=T.y,_[U]=T.z)),n&&(a&&(T=h.geodeticSurfaceNormal(O,T)),y[b+L]=-T.x,y[F+L]=-T.y,y[U+L]=-T.z),t.tangent&&(e.wall?(x[b+L]=C.x,x[F+L]=C.y,x[U+L]=C.z):l&&(x[b+L]=-C.x,x[F+L]=-C.y,x[U+L]=-C.z),s&&(f?(x[b]=W$12.x,x[F]=W$12.y,x[U]=W$12.z):(x[b]=C.x,x[F]=C.y,x[U]=C.z))),t.bitangent&&(l&&(v[b+L]=S.x,v[F+L]=S.y,v[U+L]=S.z),s&&(f?(v[b]=x$1c.x,v[F]=x$1c.y,v[U]=x$1c.z):(v[b]=S.x,v[F]=S.y,v[U]=S.z))),b+=3}}t.st&&(i.attributes.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:g})),t.normal&&(i.attributes.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:_})),t.tangent&&(i.attributes.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:x})),t.bitangent&&(i.attributes.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:v})),n&&(i.attributes.extrudeDirection=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:y}))}if(e.extrude&&e$2b(e.offsetAttribute)){var V=r.length/3,k=new Uint8Array(V);if(e.offsetAttribute===_0x58701d.TOP)s&&l||a?k=d$1s(k,1,0,V/2):s&&(k=d$1s(k,1));else k=d$1s(k,e.offsetAttribute===_0x58701d.NONE?0:1);i.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:k})}return i}var Ke$b=new a$18,Ze$9=new a$18,Z$11={west:0,east:0},I$1n=new E$1s;function Ae$t(e,t,i,n,r){if(r=u$_(r,new h$18),!e$2b(e)||e.length<3)return r.west=0,r.north=0,r.south=0,r.east=0,r;if(i===m$1f.RHUMB)return h$18.fromCartesianArray(e,t,r);I$1n.ellipsoid.equals(t)||(I$1n=new E$1s(void 0,void 0,t)),r.west=Number.POSITIVE_INFINITY,r.east=Number.NEGATIVE_INFINITY,r.south=Number.POSITIVE_INFINITY,r.north=Number.NEGATIVE_INFINITY,Z$11.west=Number.POSITIVE_INFINITY,Z$11.east=Number.NEGATIVE_INFINITY;for(var o,a=1/e$2a.chordLength(n,t.maximumRadius),s=e.length,l=t.cartesianToCartographic(e[0],Ze$9),u=Ke$b,c=1;c<s;c++)o=u,u=l,l=t.cartesianToCartographic(e[c],o),I$1n.setEndPoints(u,l),be$u(I$1n,a,r,Z$11);return o=u,u=l,l=t.cartesianToCartographic(e[0],o),I$1n.setEndPoints(u,l),be$u(I$1n,a,r,Z$11),r.east-r.west>Z$11.west-Z$11.east&&(r.east=Z$11.east,r.west=Z$11.west),r}var Je$9=new a$18;function be$u(e,t,i,n){for(var r=e.surfaceDistance,o=Math.ceil(r*t),a=o>0?r/(o-1):Number.POSITIVE_INFINITY,s=0,l=0;l<o;l++){var u=e.interpolateUsingSurfaceDistance(s,Je$9);s+=a;var c=u.longitude,h=u.latitude;i.west=Math.min(i.west,c),i.east=Math.max(i.east,c),i.south=Math.min(i.south,h),i.north=Math.max(i.north,h),n.west=c>0?Math.min(c,n.west):n.west,n.east=c<0?Math.max(c,n.east):n.east}}var Ne$j=[];function Xe$c(e,t,i,n,r,o,a,s,l,u){var c,h={walls:[]};if(o||a){var d,f,p=y$_.createGeometryFromPositions(e,t,i,r,s,l),_=p.attributes.position.values,m=p.indices;if(o&&a){var g=_.concat(_);d=g.length/3,(f=ce$x.createTypedArray(d,2*m.length)).set(m);var x=m.length,v=d/2;for(c=0;c<x;c+=3){var y=f[c]+v,$=f[c+1]+v,b=f[c+2]+v;f[c+x]=b,f[c+1+x]=$,f[c+2+x]=y}if(p.attributes.position.values=g,r&&s.normal){var T=p.attributes.normal.values;p.attributes.normal.values=new Float32Array(g.length),p.attributes.normal.values.set(T)}p.indices=f}else if(a){for(d=_.length/3,f=ce$x.createTypedArray(d,m.length),c=0;c<m.length;c+=3)f[c]=m[c+2],f[c+1]=m[c+1],f[c+2]=m[c];p.indices=f}h.topAndBottom=new d$1o({geometry:p})}var C,S=n.outerRing,w=f$14.fromPoints(S,e),E=w.projectPointsOntoPlane(S,Ne$j),P=A$1g.computeWindingOrder2D(E);P===W$13.CLOCKWISE&&(S=S.slice().reverse()),u&&(C=y$_.computeWallGeometry(S,e,i,r,l),h.walls.push(new d$1o({geometry:C})));var A=n.holes;for(c=0;c<A.length;c++){var L=A[c];E=(w=f$14.fromPoints(L,e)).projectPointsOntoPlane(L,Ne$j),(P=A$1g.computeWindingOrder2D(E))===W$13.COUNTER_CLOCKWISE&&(L=L.slice().reverse()),C=y$_.computeWallGeometry(L,e,i,r,l),h.walls.push(new d$1o({geometry:C}))}return h}function z$_(e){if(o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e$2b(e.perPositionHeight)&&e.perPositionHeight&&e$2b(e.height))throw new t$16("Cannot use both options.perPositionHeight and options.height");if(e$2b(e.arcType)&&e.arcType!==m$1f.GEODESIC&&e.arcType!==m$1f.RHUMB)throw new t$16("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var t=e.polygonHierarchy,i=u$_(e.vertexFormat,n$11.DEFAULT),n=u$_(e.ellipsoid,t$13.WGS84),r=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),o=u$_(e.stRotation,0),a=u$_(e.perPositionHeight,!1),s=a&&e$2b(e.extrudedHeight),l=u$_(e.height,0),u=u$_(e.extrudedHeight,l);if(!s){var c=Math.max(l,u);u=Math.min(l,u),l=c}this._vertexFormat=n$11.clone(i),this._ellipsoid=t$13.clone(n),this._granularity=r,this._stRotation=o,this._height=l,this._extrudedHeight=u,this._closeTop=u$_(e.closeTop,!0),this._closeBottom=u$_(e.closeBottom,!0),this._extrudeOutering=u$_(e.extrudeOutering,!0),this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=s,this._shadowVolume=u$_(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=u$_(e.arcType,m$1f.GEODESIC),this._groundBottomAltitude=u$_(e.groundBottomAltitude,0),this._groundExtrudedHeight=u$_(e.groundExtrudedHeight,0),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this.packedLength=y$_.computeHierarchyPackedLength(t)+t$13.packedLength+n$11.packedLength+12}z$_.fromPositions=function(e){return e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new z$_({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType})},z$_.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),i=y$_.packPolygonHierarchy(e._polygonHierarchy,t,i),t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._stRotation,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._closeTop?1:0,t[i++]=e._closeBottom?1:0,t[i++]=e._shadowVolume?1:0,t[i++]=u$_(e._offsetAttribute,-1),t[i++]=e._arcType,t[i]=e.packedLength,t};var $e$a=t$13.clone(t$13.UNIT_SPHERE),Ge$i=new n$11,xe$s={polygonHierarchy:{}};function Ie$o(e){var t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];var i=e._ellipsoid,n=e._polygonHierarchy.positions,r=e.rectangle;return I$1p._textureCoordinateRotationPoints(n,t,i,r)}z$_.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=y$_.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=t$13.unpack(e,t,$e$a);t+=t$13.packedLength;var o=n$11.unpack(e,t,Ge$i);t+=n$11.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=1===e[t++],h=1===e[t++],d=1===e[t++],f=1===e[t++],p=1===e[t++],_=e[t++],m=e[t++],g=e[t];return e$2b(i)||(i=new z$_(xe$s)),i._polygonHierarchy=n,i._ellipsoid=t$13.clone(r,i._ellipsoid),i._vertexFormat=n$11.clone(o,i._vertexFormat),i._height=a,i._extrudedHeight=s,i._granularity=l,i._stRotation=u,i._perPositionHeightExtrude=c,i._perPositionHeight=h,i._closeTop=d,i._closeBottom=f,i._shadowVolume=p,i._offsetAttribute=-1===_?void 0:_,i._arcType=m,i.packedLength=g,i},z$_.computeRectangle=function(e,t){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.polygonHierarchy",e.polygonHierarchy);var i=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),n=u$_(e.arcType,m$1f.GEODESIC);if(n!==m$1f.GEODESIC&&n!==m$1f.RHUMB)throw new t$16("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var r=e.polygonHierarchy,o=u$_(e.ellipsoid,t$13.WGS84);return Ae$t(r.positions,o,n,i,t)},z$_.createGeometry=function(e){var t=e._vertexFormat,i=e._ellipsoid,n=e._granularity,r=e._stRotation,o=e._polygonHierarchy,a=e._perPositionHeight,s=e._closeTop,l=e._closeBottom,u=e._arcType,c=o.positions;if(!(c.length<3)){var h=f$14.fromPoints(c,i),d=y$_.polygonsFromHierarchy(o,h.projectPointsOntoPlane.bind(h),!a,i),f=d.hierarchy,p=d.polygons;if(0!==f.length){c=f[0].outerRing;var _,m=y$_.computeBoundingRectangle(h.plane.normal,h.projectPointOntoPlane.bind(h),c,r,Le$t),g=[],x=e._height,v=e._extrudedHeight,y={perPositionHeight:a,vertexFormat:t,geometry:void 0,tangentPlane:h,boundingRectangle:m,ellipsoid:i,stRotation:r,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u};if(e._perPositionHeightExtrude||!e$2a.equalsEpsilon(x,v,0,e$2a.EPSILON2))for(y.extrude=!0,y.top=s,y.bottom=l,y.shadowVolume=e._shadowVolume,y.offsetAttribute=e._offsetAttribute,_=0;_<p.length;_++){var $,b=Xe$c(i,p[_],n,f[_],a,s,l,t,u,e._extrudeOutering);s&&l?($=b.topAndBottom,y.geometry=y$_.scaleToGeodeticHeightExtruded($.geometry,x,v,i,a)):s?(($=b.topAndBottom).geometry.attributes.position.values=A$1g.scaleToGeodeticHeight($.geometry.attributes.position.values,x,i,!a),y.geometry=$.geometry):l&&(($=b.topAndBottom).geometry.attributes.position.values=A$1g.scaleToGeodeticHeight($.geometry.attributes.position.values,v,i,!0),y.geometry=$.geometry),(s||l)&&(y.wall=!1,$.geometry=pe$z(y),g.push($));var T=b.walls;y.wall=!0;for(var C=0;C<T.length;C++){var S=T[C];y.geometry=y$_.scaleToGeodeticHeightExtruded(S.geometry,x,v,i,a),S.geometry=pe$z(y),g.push(S)}}else for(_=0;_<p.length;_++){var w=new d$1o({geometry:y$_.createGeometryFromPositions(i,p[_],n,a,t,u)});if(w.geometry.attributes.position.values=A$1g.scaleToGeodeticHeight(w.geometry.attributes.position.values,x,i,!a),y.geometry=w.geometry,w.geometry=pe$z(y),e$2b(e._offsetAttribute)){var E=w.geometry.attributes.position.values.length,P=new Uint8Array(E/3);d$1s(P,e._offsetAttribute===_0x58701d.NONE?0:1),w.geometry.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:P})}g.push(w)}var A=k$13.combineInstances(g)[0];A.attributes.position.values=new Float64Array(A.attributes.position.values),A.indices=ce$x.createTypedArray(A.attributes.position.values.length/3,A.indices);var L=A.attributes,M=i$1c.fromVertices(L.position.values);return t.position||delete L.position,new I$1p({attributes:L,indices:A.indices,primitiveType:A.primitiveType,boundingSphere:M,offsetAttribute:e._offsetAttribute})}}},z$_.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=e._groundBottomAltitude+e._groundExtrudedHeight,a=e._groundBottomAltitude?e._groundBottomAltitude:t(n,r),s=o!==e._groundBottomAltitude?o:i(n,r);return new z$_({polygonHierarchy:e._polygonHierarchy,ellipsoid:r,stRotation:e._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:a,height:s,vertexFormat:n$11.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(z$_.prototype,{rectangle:{get:function(){if(!e$2b(this._rectangle)){var e=this._polygonHierarchy.positions;this._rectangle=Ae$t(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e$2b(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Ie$o(this)),this._textureCoordinateRotationPoints}}});var E$1i={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE:4,CESIUM_3D_TILE_CLASSIFICATION:5,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:6,S3MTiles:8,S3MTilesClampObjectStencil:9,S3MTilesClampObjectColor:10,ProjectionImage:11,OPAQUE:12,ClampObject:13,NonClampObject:14,Label_Billboard:15,Voxel_Billboard:16,Particle:17,TRANSLUCENT:18,ANALYSIS:19,LOG_DEPTH_OVERLAY:20,OVERLAY:21,OVERLAY_AGAINST_DEPTH:22,NUMBER_OF_PASSES:23},Le$s=Object.freeze(E$1i);function f$12(){return!0}function i$10(e,t){function i(){throw new t$16(t)}for(var n in t=u$_(t,"This object was destroyed, i.e., destroy() was called."),e)"function"==typeof e[n]&&(e[n]=i);e.isDestroyed=f$12}var v$U=[];function y$Z(e,t){this.center=o$1p.clone(u$_(e,o$1p.ZERO)),this.halfAxes=p$1e.clone(u$_(t,p$1e.ZERO)),this.areaDirty=1}v$U[0]={num:0,des:"inside"},v$U[1]={num:4,data:[0,4,7,3],des:"left"},v$U[2]={num:4,data:[1,2,6,5],des:"right"},v$U[3]={num:0},v$U[4]={num:4,data:[0,1,5,4],des:"bottom"},v$U[5]={num:6,data:[0,1,5,4,7,3],des:"bottom, left"},v$U[6]={num:6,data:[0,1,2,6,5,4],des:"bottom, right"},v$U[7]={num:0},v$U[8]={num:4,data:[2,3,7,6],des:"top"},v$U[9]={num:6,data:[4,7,6,2,3,0],des:"top, left"},v$U[10]={num:6,data:[2,3,7,6,5,1],des:"top, right"},v$U[11]={num:0},v$U[12]={num:0},v$U[13]={num:0},v$U[14]={num:0},v$U[15]={num:0},v$U[16]={num:4,data:[0,3,2,1],des:"front"},v$U[17]={num:6,data:[0,4,7,3,2,1],des:"front, left"},v$U[18]={num:6,data:[0,3,2,6,5,1],des:"front, right"},v$U[19]={num:0},v$U[20]={num:6,data:[0,3,2,1,5,4],des:"front, bottom"},v$U[21]={num:6,data:[2,1,5,4,7,3],des:"front, bottom, left"},v$U[22]={num:6,data:[0,3,2,6,5,4],des:"front, bottom, right"},v$U[23]={num:0},v$U[24]={num:6,data:[0,3,7,6,2,1],des:"front, top"},v$U[25]={num:6,data:[0,4,7,6,2,1],des:"front, top, left"},v$U[26]={num:6,data:[0,3,7,6,5,1],des:"front, top, right"},v$U[27]={num:0},v$U[28]={num:0},v$U[29]={num:0},v$U[30]={num:0},v$U[31]={num:0},v$U[32]={num:4,data:[4,5,6,7],des:"back"},v$U[33]={num:6,data:[4,5,6,7,3,0],des:"back, left"},v$U[34]={num:6,data:[1,2,6,7,4,5],des:"back, right"},v$U[35]={num:0},v$U[36]={num:6,data:[0,1,5,6,7,4],des:"back, bottom"},v$U[37]={num:6,data:[0,1,5,6,7,3],des:"back, bottom, left"},v$U[38]={num:6,data:[0,1,2,6,7,4],des:"back, bottom, right"},v$U[39]={num:0},v$U[40]={num:6,data:[2,3,7,4,5,6],des:"back, top"},v$U[41]={num:6,data:[0,4,5,6,2,3],des:"back, top, left"},v$U[42]={num:6,data:[1,2,3,7,4,5],des:"back, top, right"},y$Z.packedLength=o$1p.packedLength+p$1e.packedLength,y$Z.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),o$1p.pack(e.center,t,i),p$1e.pack(e.halfAxes,t,i+o$1p.packedLength),t},y$Z.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new y$Z),o$1p.unpack(e,t,i.center),p$1e.unpack(e,t+o$1p.packedLength,i.halfAxes),i};var Oa$3=new o$1p,Aa$4=new o$1p,Na$3=new o$1p,Ea$4=new o$1p,Ta$5=new o$1p,Ra$4=new o$1p,ga$3=new p$1e,Ba$5={unitary:new p$1e,diagonal:new p$1e},k$10=new o$1p,E$1h=new o$1p,p$15=new o$1p;y$Z.fromPoints=function(e,t){if(e$2b(t)||(t=new y$Z),!e$2b(e)||0===e.length)return t.halfAxes=p$1e.ZERO,t.center=o$1p.ZERO,t;var i,n=e.length,r=o$1p.clone(e[0],Oa$3);for(i=1;i<n;i++)o$1p.add(r,e[i],r);var o=1/n;o$1p.multiplyByScalar(r,o,r);var a,s=0,l=0,u=0,c=0,h=0,d=0;for(i=0;i<n;i++)s+=(a=o$1p.subtract(e[i],r,Aa$4)).x*a.x,l+=a.x*a.y,u+=a.x*a.z,c+=a.y*a.y,h+=a.y*a.z,d+=a.z*a.z;s*=o,l*=o,u*=o,c*=o,h*=o,d*=o;var f=ga$3;f[0]=s,f[1]=l,f[2]=u,f[3]=l,f[4]=c,f[5]=h,f[6]=u,f[7]=h,f[8]=d;var p=p$1e.computeEigenDecomposition(f,Ba$5),_=p$1e.clone(p.unitary,t.halfAxes),m=p$1e.getColumn(_,0,Ea$4),g=p$1e.getColumn(_,1,Ta$5),x=p$1e.getColumn(_,2,Ra$4),v=-Number.MAX_VALUE,y=-Number.MAX_VALUE,$=-Number.MAX_VALUE,b=Number.MAX_VALUE,T=Number.MAX_VALUE,C=Number.MAX_VALUE;for(i=0;i<n;i++)a=e[i],v=Math.max(o$1p.dot(m,a),v),y=Math.max(o$1p.dot(g,a),y),$=Math.max(o$1p.dot(x,a),$),b=Math.min(o$1p.dot(m,a),b),T=Math.min(o$1p.dot(g,a),T),C=Math.min(o$1p.dot(x,a),C);m=o$1p.multiplyByScalar(m,.5*(b+v),m),g=o$1p.multiplyByScalar(g,.5*(T+y),g),x=o$1p.multiplyByScalar(x,.5*(C+$),x);var S=o$1p.add(m,g,t.center);o$1p.add(S,x,S);var w=Na$3;return w.x=v-b,w.y=y-T,w.z=$-C,o$1p.multiplyByScalar(w,.5,w),p$1e.multiplyByScale(t.halfAxes,w,t.halfAxes),t};var va$2=new o$1p,La$4=new o$1p;function ua$4(e,t,i,n,r,o,a,s,l,u,c){if(!(e$2b(r)&&e$2b(o)&&e$2b(a)&&e$2b(s)&&e$2b(l)&&e$2b(u)))throw new t$16("all extents (minimum/maximum X/Y/Z) are required.");e$2b(c)||(c=new y$Z);var h=c.halfAxes;p$1e.setColumn(h,0,t,h),p$1e.setColumn(h,1,i,h),p$1e.setColumn(h,2,n,h);var d=va$2;d.x=(r+o)/2,d.y=(a+s)/2,d.z=(l+u)/2;var f=La$4;f.x=(o-r)/2,f.y=(s-a)/2,f.z=(u-l)/2;var p=c.center;return d=p$1e.multiplyByVector(h,d,d),o$1p.add(e,d,p),p$1e.multiplyByScale(h,f,h),c}var fa$3=new a$18,Ia$4=new o$1p,Sa$3=new a$18,qa$4=new a$18,ka$3=new a$18,Ua$4=new a$18,Da$5=new a$18,Va$3=new o$1p,ma$4=new o$1p,Xa$4=new o$1p,wa$2=new o$1p,ja$3=new o$1p,Wa$3=new o$1o,_a$3=new o$1o,Za$5=new o$1o,Ya$5=new o$1o,Fa$4=new o$1o,Ga$4=new o$1p,Ja$5=new o$1p,Ka$5=new o$1p,Qa$5=new o$1p,$a$5=new o$1o,Ha$3=new o$1p,ar$7=new o$1p,rr$9=new o$1p,tr$9=new o$1m(o$1p.UNIT_X,0);y$Z.fromRectangle=function(e,t,i,n,r){if(!e$2b(e))throw new t$16("rectangle is required");if(e.width<0||e.width>e$2a.TWO_PI)throw new t$16("Rectangle width must be between 0 and 2*pi");if(e.height<0||e.height>e$2a.PI)throw new t$16("Rectangle height must be between 0 and pi");if(e$2b(n)&&!e$2a.equalsEpsilon(n.radii.x,n.radii.y,e$2a.EPSILON15))throw new t$16("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");var o,a,s,l,u,c,h;if(t=u$_(t,0),i=u$_(i,0),n=u$_(n,t$13.WGS84),e.width<=e$2a.PI){var d=h$18.center(e,fa$3),f=new f$14(n.cartographicToCartesian(d,Ia$4),n);h=f.plane;var p=d.longitude,_=e.south<0&&e.north>0?0:d.latitude,m=a$18.fromRadians(p,e.north,i,Sa$3),g=a$18.fromRadians(e.west,e.north,i,qa$4),x=a$18.fromRadians(e.west,_,i,ka$3),v=a$18.fromRadians(e.west,e.south,i,Ua$4),y=a$18.fromRadians(p,e.south,i,Da$5),$=n.cartographicToCartesian(m,Va$3),b=n.cartographicToCartesian(g,ma$4),T=n.cartographicToCartesian(x,Xa$4),C=n.cartographicToCartesian(v,wa$2),S=n.cartographicToCartesian(y,ja$3),w=f.projectPointToNearestOnPlane($,Wa$3),E=f.projectPointToNearestOnPlane(b,_a$3),P=f.projectPointToNearestOnPlane(T,Za$5),A=f.projectPointToNearestOnPlane(C,Ya$5),L=f.projectPointToNearestOnPlane(S,Fa$4);return a=-(o=Math.min(E.x,P.x,A.x)),l=Math.max(E.y,w.y),s=Math.min(A.y,L.y),g.height=v.height=t,b=n.cartographicToCartesian(g,ma$4),C=n.cartographicToCartesian(v,wa$2),u=Math.min(o$1m.getPointDistance(h,b),o$1m.getPointDistance(h,C)),c=i,ua$4(f.origin,f.xAxis,f.yAxis,f.zAxis,o,a,s,l,u,c,r)}var M=e.south>0,R=e.north<0,O=M?e.south:R?e.north:0,I=h$18.center(e,fa$3).longitude,D=o$1p.fromRadians(I,O,i,n,Ga$4);D.z=0;var B=Math.abs(D.x)<e$2a.EPSILON10&&Math.abs(D.y)<e$2a.EPSILON10?o$1p.UNIT_X:o$1p.normalize(D,Ja$5),N=o$1p.UNIT_Z,F=o$1p.cross(B,N,Ka$5);h=o$1m.fromPointNormal(D,B,tr$9);var U=o$1p.fromRadians(I+e$2a.PI_OVER_TWO,O,i,n,Qa$5);o=-(a=o$1p.dot(o$1m.projectPointOntoPlane(h,U,$a$5),F)),l=o$1p.fromRadians(0,e.north,R?t:i,n,Ha$3).z,s=o$1p.fromRadians(0,e.south,M?t:i,n,ar$7).z;var G=o$1p.fromRadians(e.east,O,i,n,rr$9);return ua$4(D,F,N,B,o,a,s,l,u=o$1m.getPointDistance(h,G),c=0,r)},y$Z.clone=function(e,t){if(e$2b(e))return e$2b(t)?(o$1p.clone(e.center,t.center),p$1e.clone(e.halfAxes,t.halfAxes),t.areaDirty=1,t):new y$Z(e.center,e.halfAxes)},y$Z.intersectPlane=function(e,t){if(!e$2b(e))throw new t$16("box is required.");if(!e$2b(t))throw new t$16("plane is required.");var i=e.center,n=t.normal,r=e.halfAxes,o=n.x,a=n.y,s=n.z,l=Math.abs(o*r[p$1e.COLUMN0ROW0]+a*r[p$1e.COLUMN0ROW1]+s*r[p$1e.COLUMN0ROW2])+Math.abs(o*r[p$1e.COLUMN1ROW0]+a*r[p$1e.COLUMN1ROW1]+s*r[p$1e.COLUMN1ROW2])+Math.abs(o*r[p$1e.COLUMN2ROW0]+a*r[p$1e.COLUMN2ROW1]+s*r[p$1e.COLUMN2ROW2]),u=o$1p.dot(n,i)+t.distance;return u<=-l?Ae$u.OUTSIDE:u>=l?Ae$u.INSIDE:Ae$u.INTERSECTING};var ra$5=new o$1p,ta$3=new o$1p,ea$5=new o$1p,er$a=new o$1p,nr$9=new o$1p;y$Z.distanceSquaredTo=function(e,t){if(!e$2b(e))throw new t$16("box is required.");if(!e$2b(t))throw new t$16("cartesian is required.");var i=o$1p.subtract(t,e.center,va$2),n=e.halfAxes,r=p$1e.getColumn(n,0,ra$5),o=p$1e.getColumn(n,1,ta$3),a=p$1e.getColumn(n,2,ea$5),s=o$1p.magnitude(r),l=o$1p.magnitude(o),u=o$1p.magnitude(a);o$1p.normalize(r,r),o$1p.normalize(o,o),o$1p.normalize(a,a);var c=er$a;c.x=o$1p.dot(i,r),c.y=o$1p.dot(i,o),c.z=o$1p.dot(i,a);var h,d=0;return c.x<-s?d+=(h=c.x+s)*h:c.x>s&&(d+=(h=c.x-s)*h),c.y<-l?d+=(h=c.y+l)*h:c.y>l&&(d+=(h=c.y-l)*h),c.z<-u?d+=(h=c.z+u)*h:c.z>u&&(d+=(h=c.z-u)*h),d};var la$5=new o$1p,or$7=new o$1p;y$Z.computePlaneDistances=function(e,t,i,n){if(!e$2b(e))throw new t$16("box is required.");if(!e$2b(t))throw new t$16("position is required.");if(!e$2b(i))throw new t$16("direction is required.");e$2b(n)||(n=new o$1n);var r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=e.center,s=e.halfAxes,l=p$1e.getColumn(s,0,ra$5),u=p$1e.getColumn(s,1,ta$3),c=p$1e.getColumn(s,2,ea$5),h=o$1p.add(l,u,la$5);o$1p.add(h,c,h),o$1p.add(h,a,h);var d=o$1p.subtract(h,t,or$7),f=o$1p.dot(i,d);return r=Math.min(f,r),o=Math.max(f,o),o$1p.add(a,l,h),o$1p.add(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.add(a,l,h),o$1p.subtract(h,u,h),o$1p.add(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.add(a,l,h),o$1p.subtract(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.add(h,u,h),o$1p.add(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.add(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.subtract(h,u,h),o$1p.add(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.subtract(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),n.start=r,n.stop=o,n};var sr$6=new i$1c;y$Z.isOccluded=function(e,t){if(!e$2b(e))throw new t$16("box is required.");if(!e$2b(t))throw new t$16("occluder is required.");var i=i$1c.fromOrientedBoundingBox(e,sr$6);return!t.isBoundingSphereVisible(i)},y$Z.prototype.intersectPlane=function(e){return y$Z.intersectPlane(this,e)},y$Z.prototype.distanceSquaredTo=function(e){return y$Z.distanceSquaredTo(this,e)},y$Z.prototype.computePlaneDistances=function(e,t,i){return y$Z.computePlaneDistances(this,e,t,i)},y$Z.prototype.isOccluded=function(e){return y$Z.isOccluded(this,e)},y$Z.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&o$1p.equals(e.center,t.center)&&p$1e.equals(e.halfAxes,t.halfAxes)},y$Z.prototype.clone=function(e){return y$Z.clone(this,e)},y$Z.prototype.equals=function(e){return y$Z.equals(this,e)};var pa$2=new e$29;y$Z.prototype._updateBBox=function(){if(1==this.areaDirty){var e=p$1e.getColumn(this.halfAxes,0,ra$5),t=o$1p.clone(o$1p.negate(e,k$10)),i=p$1e.getColumn(this.halfAxes,1,ta$3),n=o$1p.clone(o$1p.negate(i,k$10)),r=p$1e.getColumn(this.halfAxes,2,ea$5),o=o$1p.clone(o$1p.negate(r,k$10));this.bbox=[],o$1p.add(this.center,i,k$10),o$1p.add(k$10,o,E$1h),o$1p.add(E$1h,t,p$15),this.bbox[0]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1h,e,p$15),this.bbox[1]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(k$10,r,E$1h),o$1p.add(E$1h,e,p$15),this.bbox[2]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1h,t,p$15),this.bbox[3]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(this.center,n,k$10),o$1p.add(k$10,o,E$1h),o$1p.add(E$1h,t,p$15),this.bbox[4]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1h,e,p$15),this.bbox[5]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(k$10,r,E$1h),o$1p.add(E$1h,e,p$15),this.bbox[6]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1h,t,p$15),this.bbox[7]=new o$1p(p$15.x,p$15.y,p$15.z);var a=o$1p.magnitude(e),s=o$1p.magnitude(i),l=o$1p.magnitude(r),u=new o$1p(-a,-s,-l),c=new o$1p(a,s,l);if(a*s*l==0)return void(this.areaDirty=-1);o$1p.normalize(e,e),o$1p.normalize(i,i),o$1p.normalize(r,r),this.u=o$1p.clone(e),this.v=o$1p.clone(i),this.w=o$1p.clone(r),this.posMin=u,this.posMaX=c,this.areaDirty=0}};var j$1a=[];j$1a.push(new o$1o),j$1a.push(new o$1o),j$1a.push(new o$1o),j$1a.push(new o$1o),j$1a.push(new o$1o),j$1a.push(new o$1o);var cr$4=new a$18,J$Z=new o$1p;y$Z.prototype.calculateBoxArea=function(e,t,i,n,r,o,a,s){this._updateBBox();var l=e,u=o$1p.subtract(l,this.center,nr$9);if(-1==this.areaDirty){var c=r/n*($=-1!=o?o:.5*o$1p.distance(this.posMaX,this.posMin))/i;return e$2a.PI*c*c}var h=o$1p.fromElements(o$1p.dot(u,this.u),o$1p.dot(u,this.v),o$1p.dot(u,this.w),la$5),d=(h.x<this.posMin.x?1:0)+((h.x>this.posMaX.x?1:0)<<1)+((h.z<this.posMin.z?1:0)<<2)+((h.z>this.posMaX.z?1:0)<<3)+((h.y>this.posMaX.y?1:0)<<4)+((h.y<this.posMin.y?1:0)<<5);if(d>42)return console.log("area calculation is wrong"),-100;var f=v$U[d];if(0==f.num){c=r/n*($=-1!=o?o:.5*o$1p.distance(this.posMaX,this.posMin))/i;return e$2a.PI*c*c}if(0==f.num)return console.log("area calculation is wrong"),-100;for(var p,_=[],m=a,g=0;g<f.num;g++){var x=j$1a[g],v=this.bbox[f.data[g]];p=!1;var y,$,b=e$2a.PI;if(3===t)(y=p$1d.multiplyByVector(m,e$29.fromElements(v.x,v.y,v.z,1),pa$2)).z<0&&(p=!0,-1==$&&(b=e$2a.PI_OVER_FOUR,i=o$1p.magnitude(u)));else{var T=s,C=T.ellipsoid.cartesianToCartographic(v,cr$4);e$2b(C)?(T.project(C,J$Z),(y=p$1d.multiplyByVector(m,e$29.fromElements(J$Z.z,J$Z.x,J$Z.y,1),pa$2)).z<0&&(p=!0)):p=!0}if(1==p)return b*(c=r/n*($=-1!=o?o:.5*o$1p.distance(this.posMaX,this.posMin))/i)*c;x.x=y.x/y.w,x.y=r-y.y/y.w,_.push(x)}return Math.abs(A$1g.computeArea2D(_))};var s$W=new o$1p(1,1,1),u$U=o$1p.ZERO,f$11=n$13.IDENTITY,e$1X=function(e,t,i){this.translation=o$1p.clone(u$_(e,u$U)),this.rotation=n$13.clone(u$_(t,f$11)),this.scale=o$1p.clone(u$_(i,s$W))};e$1X.prototype.equals=function(e){return this===e||e$2b(e)&&o$1p.equals(this.translation,e.translation)&&n$13.equals(this.rotation,e.rotation)&&o$1p.equals(this.scale,e.scale)};var _0x3ac7d4=(_0x2d7357=!0,function(e,t){var i=_0x2d7357?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d7357=!1,i}),_0x536b62=_0x3ac7d4(void 0,(function(){return _0x536b62.toString().search("(((.+)+)+)+$").toString().constructor(_0x536b62).search("(((.+)+)+)+$")})),_0x2d7357;function _0x41154e(){}_0x536b62(),_0x41154e._CheckLimit=function(e,t){var i=_0x41154e._LogLimitOutputs[e];return i?i.current++:(i={limit:t,current:1},_0x41154e._LogLimitOutputs[e]=i),i.current<=i.limit},_0x41154e._GenerateLimitMessage=function(e,t){var i=_0x41154e._LogLimitOutputs[e];if(i&&_0x41154e.MessageLimitReached&&i.current===i.limit)switch(t){case 0:_0x41154e.Log(_0x41154e.MessageLimitReached.replace(/%LIMIT%/g,""+i.limit).replace(/%TYPE%/g,"log"));break;case 1:_0x41154e.Warn(_0x41154e.MessageLimitReached.replace(/%LIMIT%/g,""+i.limit).replace(/%TYPE%/g,"warning"));break;case 2:_0x41154e.Error(_0x41154e.MessageLimitReached.replace(/%LIMIT%/g,""+i.limit).replace(/%TYPE%/g,"error"))}},_0x41154e._AddLogEntry=function(e){_0x41154e._LogCache=e+_0x41154e._LogCache,_0x41154e.OnNewCacheEntry&&_0x41154e.OnNewCacheEntry(e)},_0x41154e._FormatMessage=function(e){var t=function(e){return e<10?"0"+e:""+e},i=new Date;return"["+t(i.getHours())+":"+t(i.getMinutes())+":"+t(i.getSeconds())+"]: "+e},_0x41154e._LogDisabled=function(e,t){},_0x41154e._LogEnabled=function(e,t){if(void 0===t||_0x41154e._CheckLimit(e,t)){var i=_0x41154e._FormatMessage(e);console.log("BJS - "+i);var n="<div style='color:white'>"+i+"</div><br>";_0x41154e._AddLogEntry(n),_0x41154e._GenerateLimitMessage(e,0)}},_0x41154e._WarnDisabled=function(e,t){},_0x41154e._WarnEnabled=function(e,t){if(void 0===t||_0x41154e._CheckLimit(e,t)){var i=_0x41154e._FormatMessage(e);console.warn("BJS - "+i);var n="<div style='color:orange'>"+e+"</div><br>";_0x41154e._AddLogEntry(n),_0x41154e._GenerateLimitMessage(e,1)}},_0x41154e._ErrorDisabled=function(e,t){},_0x41154e._ErrorEnabled=function(e,t){if(void 0===t||_0x41154e._CheckLimit(e,t)){var i=_0x41154e._FormatMessage(e);_0x41154e.errorsCount++,console.error("BJS - "+i);var n="<div style='color:red'>"+i+"</div><br>";_0x41154e._AddLogEntry(n),_0x41154e._GenerateLimitMessage(e,2)}},Object.defineProperty(_0x41154e,"LogCache",{get:function(){return _0x41154e._LogCache},enumerable:!1,configurable:!0}),_0x41154e.ClearLogCache=function(){_0x41154e._LogCache="",_0x41154e._LogLimitOutputs={},_0x41154e.errorsCount=0},Object.defineProperty(_0x41154e,"LogLevels",{set:function(e){(e&_0x41154e.MessageLogLevel)===_0x41154e.MessageLogLevel?_0x41154e.Log=_0x41154e._LogEnabled:_0x41154e.Log=_0x41154e._LogDisabled,(e&_0x41154e.WarningLogLevel)===_0x41154e.WarningLogLevel?_0x41154e.Warn=_0x41154e._WarnEnabled:_0x41154e.Warn=_0x41154e._WarnDisabled,(e&_0x41154e.ErrorLogLevel)===_0x41154e.ErrorLogLevel?_0x41154e.Error=_0x41154e._ErrorEnabled:_0x41154e.Error=_0x41154e._ErrorDisabled},enumerable:!1,configurable:!0}),_0x41154e.NoneLogLevel=0,_0x41154e.MessageLogLevel=1,_0x41154e.WarningLogLevel=2,_0x41154e.ErrorLogLevel=4,_0x41154e.AllLogLevel=7,_0x41154e.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",_0x41154e._LogCache="",_0x41154e._LogLimitOutputs={},_0x41154e.errorsCount=0,_0x41154e.Log=_0x41154e._LogEnabled,_0x41154e.Warn=_0x41154e._WarnEnabled,_0x41154e.Error=_0x41154e._ErrorEnabled;var _0x147389=(_0x383ba9=!0,function(e,t){var i=_0x383ba9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x383ba9=!1,i}),_0x27cb1d=_0x147389(void 0,(function(){return _0x27cb1d.toString().search("(((.+)+)+)+$").toString().constructor(_0x27cb1d).search("(((.+)+)+)+$")})),_0x383ba9;function _0x4d7f4f(){}_0x27cb1d(),Object.defineProperty(_0x4d7f4f,"BaseUrl",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.BaseUrl},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.BaseUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d7f4f,"DefaultRetryStrategy",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.DefaultRetryStrategy},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.DefaultRetryStrategy=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d7f4f,"CorsBehavior",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.CorsBehavior},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.CorsBehavior=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d7f4f,"UseFallbackTexture",{get:function(){return _Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.UseFallbackTexture},set:function(e){_Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.UseFallbackTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d7f4f,"RegisteredExternalClasses",{get:function(){return _instantiationTools__WEBPACK_IMPORTED_MODULE_11__.InstantiationTools.RegisteredExternalClasses},set:function(e){_instantiationTools__WEBPACK_IMPORTED_MODULE_11__.InstantiationTools.RegisteredExternalClasses=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d7f4f,"fallbackTexture",{get:function(){return _Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.FallbackTexture},set:function(e){_Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.FallbackTexture=e},enumerable:!1,configurable:!0}),_0x4d7f4f.FetchToRef=function(e,t,i,n,r,o){var a=4*((Math.abs(e)*i%i|0)+(Math.abs(t)*n%n|0)*i);o.r=r[a]/255,o.g=r[a+1]/255,o.b=r[a+2]/255,o.a=r[a+3]/255},_0x4d7f4f.Mix=function(e,t,i){return e*(1-i)+t*i},_0x4d7f4f.Instantiate=function(e){return _instantiationTools__WEBPACK_IMPORTED_MODULE_11__.InstantiationTools.Instantiate(e)},_0x4d7f4f.SetImmediate=function(e){_timingTools__WEBPACK_IMPORTED_MODULE_10__.TimingTools.SetImmediate(e)},_0x4d7f4f.IsExponentOfTwo=function(e){var t=1;do{t*=2}while(t<e);return t===e},_0x4d7f4f.FloatRound=function(e){return Math.fround?Math.fround(e):(_0x4d7f4f._TmpFloatArray[0]=e,_0x4d7f4f._TmpFloatArray[0])},_0x4d7f4f.GetFilename=function(e){var t=e.lastIndexOf("/");return t<0?e:e.substring(t+1)},_0x4d7f4f.GetFolderPath=function(e,t){void 0===t&&(t=!1);var i=e.lastIndexOf("/");return i<0?t?e:"":e.substring(0,i+1)},_0x4d7f4f.ToDegrees=function(e){return 180*e/Math.PI},_0x4d7f4f.ToRadians=function(e){return e*Math.PI/180},_0x4d7f4f.MakeArray=function(e,t){return!0===t||void 0!==e&&null!=e?Array.isArray(e)?e:[e]:null},_0x4d7f4f.GetPointerPrefix=function(e){var t="pointer";return(0,_domManagement__WEBPACK_IMPORTED_MODULE_2__.IsWindowObjectExist)()&&!window.PointerEvent&&(t="mouse"),e._badDesktopOS&&!e._badOS&&!(document&&"ontouchend"in document)&&(t="mouse"),t},_0x4d7f4f.SetCorsBehavior=function(e,t){t.crossOrigin="anonymous"},_0x4d7f4f.CleanUrl=function(e){return e=e.replace(/#/gm,"%23")},Object.defineProperty(_0x4d7f4f,"PreprocessUrl",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.PreprocessUrl},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.PreprocessUrl=e},enumerable:!1,configurable:!0}),_0x4d7f4f.LoadImage=function(e,t,i,n,r,o){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.LoadImage)(e,t,i,n,r,o)},_0x4d7f4f.LoadFile=function(e,t,i,n,r,o){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.LoadFile)(e,t,i,n,r,o)},_0x4d7f4f.LoadFileAsync=function(e,t){return void 0===t&&(t=!0),new Promise((function(i,n){(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.LoadFile)(e,(function(e){i(e)}),void 0,void 0,t,(function(e,t){n(t)}))}))},_0x4d7f4f.LoadScript=function(e,t,i,n){if("undefined"!=typeof window){var r=document.getElementsByTagName("head")[0],o=document.createElement("script");o.setAttribute("type","text/javascript"),o.setAttribute("src",e),n&&(o.id=n),o.onload=function(){t&&t()},o.onerror=function(t){i&&i("Unable to load script '".concat(e,"'"),t)},r.appendChild(o)}},_0x4d7f4f.LoadScriptAsync=function(e){var t=this;return new Promise((function(i,n){t.LoadScript(e,(function(){i()}),(function(e,t){n(t)}))}))},_0x4d7f4f.ReadFileAsDataURL=function(e,t,i){var n=new FileReader,r={onCompleteObservable:new _observable__WEBPACK_IMPORTED_MODULE_1__.Observable,abort:function(){return n.abort()}};return n.onloadend=function(){r.onCompleteObservable.notifyObservers(r)},n.onload=function(e){t(e.target.result)},n.onprogress=i,n.readAsDataURL(e),r},_0x4d7f4f.ReadFile=function(e,t,i,n,r){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.ReadFile)(e,t,i,n,r)},_0x4d7f4f.FileAsURL=function(e){var t=new Blob([e]);return(window.URL||window.webkitURL).createObjectURL(t)},_0x4d7f4f.Format=function(e,t){return void 0===t&&(t=2),e.toFixed(t)},_0x4d7f4f.DeepCopy=function(e,t,i,n){_deepCopier__WEBPACK_IMPORTED_MODULE_4__.DeepCopier.DeepCopy(e,t,i,n)},_0x4d7f4f.IsEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},_0x4d7f4f.RegisterTopRootEvents=function(e,t){for(var i=0;i<t.length;i++){var n=t[i];e.addEventListener(n.name,n.handler,!1);try{window.parent&&window.parent.addEventListener(n.name,n.handler,!1)}catch(e){}}},_0x4d7f4f.UnregisterTopRootEvents=function(e,t){for(var i=0;i<t.length;i++){var n=t[i];e.removeEventListener(n.name,n.handler);try{e.parent&&e.parent.removeEventListener(n.name,n.handler)}catch(e){}}},_0x4d7f4f.DumpFramebuffer=function(e,t,i,n,r,o){return void 0===r&&(r="image/png"),(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this,void 0,void 0,(function(){var a,s;return(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this,(function(l){switch(l.label){case 0:return[4,i.readPixels(0,0,e,t)];case 1:return a=l.sent(),s=new Uint8Array(a.buffer),_0x4d7f4f.DumpData(e,t,s,n,r,o,!0),[2]}}))}))},_0x4d7f4f.DumpData=function(e,t,i,n,r,o,a,s,l){void 0===r&&(r="image/png"),void 0===a&&(a=!1),void 0===s&&(s=!1),!_0x4d7f4f._ScreenshotCanvas&&(_0x4d7f4f._ScreenshotCanvas=document.createElement("canvas")),_0x4d7f4f._ScreenshotCanvas.width=e,_0x4d7f4f._ScreenshotCanvas.height=t;var u=_0x4d7f4f._ScreenshotCanvas.getContext("2d");if(u){if(i instanceof Float32Array){for(var c=new Uint8Array(i.length),h=i.length;h--;){var d=i[h];c[h]=d<0?0:d>1?1:Math.round(255*d)}i=c}var f=u.createImageData(e,t);f.data.set(i),u.putImageData(f,0,0);var p=_0x4d7f4f._ScreenshotCanvas;if(a){var _=document.createElement("canvas");_.width=e,_.height=t;var m=_.getContext("2d");if(!m)return;m.translate(0,t),m.scale(1,-1),m.drawImage(_0x4d7f4f._ScreenshotCanvas,0,0),p=_}s?_0x4d7f4f.ToBlob(p,(function(e){var t=new FileReader;t.onload=function(e){var t=e.target.result;n&&n(t)},t.readAsArrayBuffer(e)}),r,l):_0x4d7f4f.EncodeScreenshotCanvasData(n,r,o,p,l)}},_0x4d7f4f.DumpDataAsync=function(e,t,i,n,r,o,a,s){return void 0===n&&(n="image/png"),void 0===o&&(o=!1),void 0===a&&(a=!1),new Promise((function(l){_0x4d7f4f.DumpData(e,t,i,(function(e){return l(e)}),n,r,o,a,s)}))},_0x4d7f4f.ToBlob=function(e,t,i,n){void 0===i&&(i="image/png"),!e.toBlob&&(e.toBlob=function(e,t,i){var n=this;setTimeout((function(){for(var r=atob(n.toDataURL(t,i).split(",")[1]),o=r.length,a=new Uint8Array(o),s=0;s<o;s++)a[s]=r.charCodeAt(s);e(new Blob([a]))}))}),e.toBlob((function(e){t(e)}),i,n)},_0x4d7f4f.EncodeScreenshotCanvasData=function(e,t,i,n,r){(void 0===t&&(t="image/png"),e)?e((null!=n?n:_0x4d7f4f._ScreenshotCanvas).toDataURL(t,r)):this.ToBlob(null!=n?n:_0x4d7f4f._ScreenshotCanvas,(function(e){if("download"in document.createElement("a")){if(!i){var t=new Date,n=(t.getFullYear()+"-"+(t.getMonth()+1)).slice(2)+"-"+t.getDate()+"_"+t.getHours()+"-"+("0"+t.getMinutes()).slice(-2);i="screenshot_"+n+".png"}_0x4d7f4f.Download(e,i)}else if(e){var r=URL.createObjectURL(e),o=window.open("");if(!o)return;var a=o.document.createElement("img");a.onload=function(){URL.revokeObjectURL(r)},a.src=r,o.document.body.appendChild(a)}}),t,r)},_0x4d7f4f.Download=function(e,t){if(navigator&&navigator.msSaveBlob)navigator.msSaveBlob(e,t);else{var i=window.URL.createObjectURL(e),n=document.createElement("a");document.body.appendChild(n),n.style.display="none",n.href=i,n.download=t,n.addEventListener("click",(function(){n.parentElement&&n.parentElement.removeChild(n)})),n.click(),window.URL.revokeObjectURL(i)}},_0x4d7f4f.BackCompatCameraNoPreventDefault=function(e){return"boolean"==typeof e[0]?e[0]:"boolean"==typeof e[1]&&e[1]},_0x4d7f4f.CreateScreenshot=function(e,t,i,n,r){throw(0,_devTools__WEBPACK_IMPORTED_MODULE_6__._WarnImport)("ScreenshotTools")},_0x4d7f4f.CreateScreenshotAsync=function(e,t,i,n){throw(0,_devTools__WEBPACK_IMPORTED_MODULE_6__._WarnImport)("ScreenshotTools")},_0x4d7f4f.CreateScreenshotUsingRenderTarget=function(e,t,i,n,r,o,a,s){throw(0,_devTools__WEBPACK_IMPORTED_MODULE_6__._WarnImport)("ScreenshotTools")},_0x4d7f4f.CreateScreenshotUsingRenderTargetAsync=function(e,t,i,n,r,o,a){throw(0,_devTools__WEBPACK_IMPORTED_MODULE_6__._WarnImport)("ScreenshotTools")},_0x4d7f4f.RandomId=function(){return(0,_guid__WEBPACK_IMPORTED_MODULE_12__.RandomGUID)()},_0x4d7f4f.IsBase64=function(e){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.IsBase64DataUrl)(e)},_0x4d7f4f.DecodeBase64=function(e){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.DecodeBase64UrlToBinary)(e)},Object.defineProperty(_0x4d7f4f,"errorsCount",{get:function(){return _logger__WEBPACK_IMPORTED_MODULE_3__.Logger.errorsCount},enumerable:!1,configurable:!0}),_0x4d7f4f.Log=function(e){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.Log(e)},_0x4d7f4f.Warn=function(e){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.Warn(e)},_0x4d7f4f.Error=function(e){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.Error(e)},Object.defineProperty(_0x4d7f4f,"LogCache",{get:function(){return _logger__WEBPACK_IMPORTED_MODULE_3__.Logger.LogCache},enumerable:!1,configurable:!0}),_0x4d7f4f.ClearLogCache=function(){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.ClearLogCache()},Object.defineProperty(_0x4d7f4f,"LogLevels",{set:function(e){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.LogLevels=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d7f4f,"PerformanceLogLevel",{set:function(e){return(e&_0x4d7f4f.PerformanceUserMarkLogLevel)===_0x4d7f4f.PerformanceUserMarkLogLevel?(_0x4d7f4f.StartPerformanceCounter=_0x4d7f4f._StartUserMark,void(_0x4d7f4f.EndPerformanceCounter=_0x4d7f4f._EndUserMark)):(e&_0x4d7f4f.PerformanceConsoleLogLevel)===_0x4d7f4f.PerformanceConsoleLogLevel?(_0x4d7f4f.StartPerformanceCounter=_0x4d7f4f._StartPerformanceConsole,void(_0x4d7f4f.EndPerformanceCounter=_0x4d7f4f._EndPerformanceConsole)):(_0x4d7f4f.StartPerformanceCounter=_0x4d7f4f._StartPerformanceCounterDisabled,void(_0x4d7f4f.EndPerformanceCounter=_0x4d7f4f._EndPerformanceCounterDisabled))},enumerable:!1,configurable:!0}),_0x4d7f4f._StartPerformanceCounterDisabled=function(e,t){},_0x4d7f4f._EndPerformanceCounterDisabled=function(e,t){},_0x4d7f4f._StartUserMark=function(e,t){if(void 0===t&&(t=!0),!_0x4d7f4f._Performance){if(!(0,_domManagement__WEBPACK_IMPORTED_MODULE_2__.IsWindowObjectExist)())return;_0x4d7f4f._Performance=window.performance}t&&_0x4d7f4f._Performance.mark&&_0x4d7f4f._Performance.mark(e+"-Begin")},_0x4d7f4f._EndUserMark=function(e,t){void 0===t&&(t=!0),t&&_0x4d7f4f._Performance.mark&&(_0x4d7f4f._Performance.mark(e+"-End"),_0x4d7f4f._Performance.measure(e,e+"-Begin",e+"-End"))},_0x4d7f4f._StartPerformanceConsole=function(e,t){void 0===t&&(t=!0),t&&(_0x4d7f4f._StartUserMark(e,t),console.time&&console.time(e))},_0x4d7f4f._EndPerformanceConsole=function(e,t){void 0===t&&(t=!0),t&&(_0x4d7f4f._EndUserMark(e,t),console.timeEnd(e))},Object.defineProperty(_0x4d7f4f,"Now",{get:function(){return _precisionDate__WEBPACK_IMPORTED_MODULE_5__.PrecisionDate.Now},enumerable:!1,configurable:!0}),_0x4d7f4f.GetClassName=function(e,t){void 0===t&&(t=!1);var i=null;if(!t&&e.getClassName)i=e.getClassName();else{if(e instanceof Object)i=(t?e:Object.getPrototypeOf(e)).constructor.__bjsclassName__;!i&&(i=typeof e)}return i},_0x4d7f4f.First=function(e,t){for(var i=0,n=e;i<n.length;i++){var r=n[i];if(t(r))return r}return null},_0x4d7f4f.getFullClassName=function(e,t){void 0===t&&(t=!1);var i=null,n=null;if(!t&&e.getClassName)i=e.getClassName();else{if(e instanceof Object){var r=t?e:Object.getPrototypeOf(e);i=r.constructor.__bjsclassName__,n=r.constructor.__bjsmoduleName__}!i&&(i=typeof e)}return i?(null!=n?n+".":"")+i:null},_0x4d7f4f.DelayAsync=function(e){return new Promise((function(t){setTimeout((function(){t()}),e)}))},_0x4d7f4f.IsSafari=function(){return!!(0,_domManagement__WEBPACK_IMPORTED_MODULE_2__.IsNavigatorAvailable)()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)};var _0x21146b=(_0xb6e245=!0,function(e,t){var i=_0xb6e245?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb6e245=!1,i}),_0x3347bd=_0x21146b(void 0,(function(){return _0x3347bd.toString().search("(((.+)+)+)+$").toString().constructor(_0x3347bd).search("(((.+)+)+)+$")})),_0xb6e245;function _0x2e52cb(e,t,i,n,r,o){void 0===r&&(r=!1),this._valueCache={},this._engine=e,this._noUBO=!e.supportsUniformBuffers||r,this._dynamic=i,this._name=null!=n?n:"no-name",this._data=t||[],this._uniformLocations={},this._uniformSizes={},this._uniformArraySizes={},this._uniformLocationPointer=0,this._needSync=!1,this._trackUbosInFrame=null!=o?o:this._engine._features.trackUbosInFrame,this._trackUbosInFrame&&(this._buffers=[],this._bufferIndex=-1,this._createBufferOnWrite=!1,this._currentFrameId=0),this._noUBO?(this.updateMatrix3x3=this._updateMatrix3x3ForEffect,this.updateMatrix2x2=this._updateMatrix2x2ForEffect,this.updateFloat=this._updateFloatForEffect,this.updateFloat2=this._updateFloat2ForEffect,this.updateFloat3=this._updateFloat3ForEffect,this.updateFloat4=this._updateFloat4ForEffect,this.updateFloatArray=this._updateFloatArrayForEffect,this.updateArray=this._updateArrayForEffect,this.updateIntArray=this._updateIntArrayForEffect,this.updateMatrix=this._updateMatrixForEffect,this.updateMatrices=this._updateMatricesForEffect,this.updateVector3=this._updateVector3ForEffect,this.updateVector4=this._updateVector4ForEffect,this.updateColor3=this._updateColor3ForEffect,this.updateColor4=this._updateColor4ForEffect,this.updateDirectColor4=this._updateDirectColor4ForEffect,this.updateInt=this._updateIntForEffect,this.updateInt2=this._updateInt2ForEffect,this.updateInt3=this._updateInt3ForEffect,this.updateInt4=this._updateInt4ForEffect):(this._engine._uniformBuffers.push(this),this.updateMatrix3x3=this._updateMatrix3x3ForUniform,this.updateMatrix2x2=this._updateMatrix2x2ForUniform,this.updateFloat=this._updateFloatForUniform,this.updateFloat2=this._updateFloat2ForUniform,this.updateFloat3=this._updateFloat3ForUniform,this.updateFloat4=this._updateFloat4ForUniform,this.updateFloatArray=this._updateFloatArrayForUniform,this.updateArray=this._updateArrayForUniform,this.updateIntArray=this._updateIntArrayForUniform,this.updateMatrix=this._updateMatrixForUniform,this.updateMatrices=this._updateMatricesForUniform,this.updateVector3=this._updateVector3ForUniform,this.updateVector4=this._updateVector4ForUniform,this.updateColor3=this._updateColor3ForUniform,this.updateColor4=this._updateColor4ForUniform,this.updateDirectColor4=this._updateDirectColor4ForUniform,this.updateInt=this._updateIntForUniform,this.updateInt2=this._updateInt2ForUniform,this.updateInt3=this._updateInt3ForUniform,this.updateInt4=this._updateInt4ForUniform)}_0x3347bd(),Object.defineProperty(_0x2e52cb.prototype,"useUbo",{get:function(){return!this._noUBO},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2e52cb.prototype,"isSync",{get:function(){return!this._needSync},enumerable:!1,configurable:!0}),_0x2e52cb.prototype.isDynamic=function(){return void 0!==this._dynamic},_0x2e52cb.prototype.getData=function(){return this._bufferData},_0x2e52cb.prototype.getBuffer=function(){return this._buffer},_0x2e52cb.prototype._fillAlignment=function(e){var t;if(t=e<=2?e:4,this._uniformLocationPointer%t!=0){var i=this._uniformLocationPointer;this._uniformLocationPointer+=t-this._uniformLocationPointer%t;for(var n=this._uniformLocationPointer-i,r=0;r<n;r++)this._data.push(0)}},_0x2e52cb.prototype.addUniform=function(e,t,i){if(void 0===i&&(i=0),!this._noUBO&&void 0===this._uniformLocations[e]){var n;if(i>0){if(t instanceof Array)throw"addUniform should not be use with Array in UBO: "+e;if(this._fillAlignment(4),this._uniformArraySizes[e]={strideSize:t,arraySize:i},16==t)t*=i;else t=t*i+(4-t)*i;n=[];for(var r=0;r<t;r++)n.push(0)}else{if(t instanceof Array)t=(n=t).length;else{t=t,n=[];for(r=0;r<t;r++)n.push(0)}this._fillAlignment(t)}this._uniformSizes[e]=t,this._uniformLocations[e]=this._uniformLocationPointer,this._uniformLocationPointer+=t;for(r=0;r<t;r++)this._data.push(n[r]);this._needSync=!0}},_0x2e52cb.prototype.addMatrix=function(e,t){this.addUniform(e,Array.prototype.slice.call(t.toArray()))},_0x2e52cb.prototype.addFloat2=function(e,t,i){var n=[t,i];this.addUniform(e,n)},_0x2e52cb.prototype.addFloat3=function(e,t,i,n){var r=[t,i,n];this.addUniform(e,r)},_0x2e52cb.prototype.addColor3=function(e,t){var i=[t.r,t.g,t.b];this.addUniform(e,i)},_0x2e52cb.prototype.addColor4=function(e,t,i){var n=[t.r,t.g,t.b,i];this.addUniform(e,n)},_0x2e52cb.prototype.addVector3=function(e,t){var i=[t.x,t.y,t.z];this.addUniform(e,i)},_0x2e52cb.prototype.addMatrix3x3=function(e){this.addUniform(e,12)},_0x2e52cb.prototype.addMatrix2x2=function(e){this.addUniform(e,8)},_0x2e52cb.prototype.create=function(){this._noUBO||this._buffer||(this._fillAlignment(4),this._bufferData=new Float32Array(this._data),this._rebuild(),this._needSync=!0)},_0x2e52cb.prototype._rebuild=function(){!this._noUBO&&this._bufferData&&(this._dynamic?this._buffer=this._engine.createDynamicUniformBuffer(this._bufferData):this._buffer=this._engine.createUniformBuffer(this._bufferData),this._trackUbosInFrame&&(this._buffers.push([this._buffer,this._engine._features.checkUbosContentBeforeUpload?this._bufferData.slice():void 0]),this._bufferIndex=this._buffers.length-1,this._createBufferOnWrite=!1))},Object.defineProperty(_0x2e52cb.prototype,"_numBuffers",{get:function(){return this._buffers.length},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2e52cb.prototype,"_indexBuffer",{get:function(){return this._bufferIndex},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2e52cb.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),_0x2e52cb.prototype._buffersEqual=function(e,t){for(var i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0},_0x2e52cb.prototype._copyBuffer=function(e,t){for(var i=0;i<e.length;++i)t[i]=e[i]},_0x2e52cb.prototype.update=function(){if(!this._noUBO)if(this.bindUniformBuffer(),this._buffer)if(this._dynamic||this._needSync){if(this._buffers&&this._buffers.length>1&&this._buffers[this._bufferIndex][1]){if(this._buffersEqual(this._bufferData,this._buffers[this._bufferIndex][1]))return this._needSync=!1,void(this._createBufferOnWrite=this._trackUbosInFrame);this._copyBuffer(this._bufferData,this._buffers[this._bufferIndex][1])}this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._engine._features._collectUbosUpdatedInFrame&&(!_0x2e52cb._UpdatedUbosInFrame[this._name]&&(_0x2e52cb._UpdatedUbosInFrame[this._name]=0),_0x2e52cb._UpdatedUbosInFrame[this._name]++),this._needSync=!1,this._createBufferOnWrite=this._trackUbosInFrame}else this._createBufferOnWrite=this._trackUbosInFrame;else this.create()},_0x2e52cb.prototype._createNewBuffer=function(){this._bufferIndex+1<this._buffers.length?(this._bufferIndex++,this._buffer=this._buffers[this._bufferIndex][0],this._createBufferOnWrite=!1,this._needSync=!0):this._rebuild()},_0x2e52cb.prototype._checkNewFrame=function(){this._trackUbosInFrame&&this._currentFrameId!==this._engine.frameId&&(this._currentFrameId=this._engine.frameId,this._createBufferOnWrite=!1,this._buffers&&this._buffers.length>0?(this._needSync=0!==this._bufferIndex,this._bufferIndex=0,this._buffer=this._buffers[this._bufferIndex][0]):this._bufferIndex=-1)},_0x2e52cb.prototype.updateUniform=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0===n){if(this._buffer)return void _0x41154e.Error("Cannot add an uniform after UBO has been created.");this.addUniform(e,i),n=this._uniformLocations[e]}if(!this._buffer&&this.create(),this._dynamic)for(o=0;o<i;o++)this._bufferData[n+o]=t[o];else{for(var r=!1,o=0;o<i;o++)(16===i&&!this._engine._features.uniformBufferHardCheckMatrix||this._bufferData[n+o]!==_0x4d7f4f.FloatRound(t[o]))&&(r=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[n+o]=t[o]);this._needSync=this._needSync||r}},_0x2e52cb.prototype.updateUniformArray=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0!==n){!this._buffer&&this.create();var r=this._uniformArraySizes[e];if(this._dynamic)for(l=0;l<i;l++)this._bufferData[n+l]=t[l];else{for(var o=!1,a=0,s=0,l=0;l<i;l++)if(this._bufferData[n+4*s+a]!==_0x4d7f4f.FloatRound(t[l])&&(o=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[n+4*s+a]=t[l]),++a===r.strideSize){for(;a<4;a++)this._bufferData[n+4*s+a]=0;a=0,s++}this._needSync=this._needSync||o}}else _0x41154e.Error("Cannot add an uniform Array dynamically. Please, add it using addUniform.")},_0x2e52cb.prototype._cacheMatrix=function(e,t){this._checkNewFrame();var i=this._valueCache[e],n=t.updateFlag;return(void 0===i||i!==n)&&(this._valueCache[e]=n,!0)},_0x2e52cb.prototype._updateMatrix3x3ForUniform=function(e,t){for(var i=0;i<3;i++)_0x2e52cb._TempBuffer[4*i]=t[3*i],_0x2e52cb._TempBuffer[4*i+1]=t[3*i+1],_0x2e52cb._TempBuffer[4*i+2]=t[3*i+2],_0x2e52cb._TempBuffer[4*i+3]=0;this.updateUniform(e,_0x2e52cb._TempBuffer,12)},_0x2e52cb.prototype._updateMatrix3x3ForEffect=function(e,t){this._currentEffect.setMatrix3x3(e,t)},_0x2e52cb.prototype._updateMatrix2x2ForEffect=function(e,t){this._currentEffect.setMatrix2x2(e,t)},_0x2e52cb.prototype._updateMatrix2x2ForUniform=function(e,t){for(var i=0;i<2;i++)_0x2e52cb._TempBuffer[4*i]=t[2*i],_0x2e52cb._TempBuffer[4*i+1]=t[2*i+1],_0x2e52cb._TempBuffer[4*i+2]=0,_0x2e52cb._TempBuffer[4*i+3]=0;this.updateUniform(e,_0x2e52cb._TempBuffer,8)},_0x2e52cb.prototype._updateFloatForEffect=function(e,t){this._currentEffect.setFloat(e,t)},_0x2e52cb.prototype._updateFloatForUniform=function(e,t){_0x2e52cb._TempBuffer[0]=t,this.updateUniform(e,_0x2e52cb._TempBuffer,1)},_0x2e52cb.prototype._updateFloat2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setFloat2(e+n,t,i)},_0x2e52cb.prototype._updateFloat2ForUniform=function(e,t,i){_0x2e52cb._TempBuffer[0]=t,_0x2e52cb._TempBuffer[1]=i,this.updateUniform(e,_0x2e52cb._TempBuffer,2)},_0x2e52cb.prototype._updateFloat3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setFloat3(e+r,t,i,n)},_0x2e52cb.prototype._updateFloat3ForUniform=function(e,t,i,n){_0x2e52cb._TempBuffer[0]=t,_0x2e52cb._TempBuffer[1]=i,_0x2e52cb._TempBuffer[2]=n,this.updateUniform(e,_0x2e52cb._TempBuffer,3)},_0x2e52cb.prototype._updateFloat4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setFloat4(e+o,t,i,n,r)},_0x2e52cb.prototype._updateFloat4ForUniform=function(e,t,i,n,r){_0x2e52cb._TempBuffer[0]=t,_0x2e52cb._TempBuffer[1]=i,_0x2e52cb._TempBuffer[2]=n,_0x2e52cb._TempBuffer[3]=r,this.updateUniform(e,_0x2e52cb._TempBuffer,4)},_0x2e52cb.prototype._updateFloatArrayForEffect=function(e,t){this._currentEffect.setFloatArray(e,t)},_0x2e52cb.prototype._updateFloatArrayForUniform=function(e,t){this.updateUniformArray(e,t,t.length)},_0x2e52cb.prototype._updateArrayForEffect=function(e,t){this._currentEffect.setArray(e,t)},_0x2e52cb.prototype._updateArrayForUniform=function(e,t){this.updateUniformArray(e,t,t.length)},_0x2e52cb.prototype._updateIntArrayForEffect=function(e,t){this._currentEffect.setIntArray(e,t)},_0x2e52cb.prototype._updateIntArrayForUniform=function(e,t){_0x2e52cb._TempBufferInt32View.set(t),this.updateUniformArray(e,_0x2e52cb._TempBuffer,t.length)},_0x2e52cb.prototype._updateMatrixForEffect=function(e,t){this._currentEffect.setMatrix(e,t)},_0x2e52cb.prototype._updateMatrixForUniform=function(e,t){this._cacheMatrix(e,t)&&this.updateUniform(e,t.toArray(),16)},_0x2e52cb.prototype._updateMatricesForEffect=function(e,t){this._currentEffect.setMatrices(e,t)},_0x2e52cb.prototype._updateMatricesForUniform=function(e,t){this.updateUniform(e,t,t.length)},_0x2e52cb.prototype._updateVector3ForEffect=function(e,t){this._currentEffect.setVector3(e,t)},_0x2e52cb.prototype._updateVector3ForUniform=function(e,t){_0x2e52cb._TempBuffer[0]=t.x,_0x2e52cb._TempBuffer[1]=t.y,_0x2e52cb._TempBuffer[2]=t.z,this.updateUniform(e,_0x2e52cb._TempBuffer,3)},_0x2e52cb.prototype._updateVector4ForEffect=function(e,t){this._currentEffect.setVector4(e,t)},_0x2e52cb.prototype._updateVector4ForUniform=function(e,t){_0x2e52cb._TempBuffer[0]=t.x,_0x2e52cb._TempBuffer[1]=t.y,_0x2e52cb._TempBuffer[2]=t.z,_0x2e52cb._TempBuffer[3]=t.w,this.updateUniform(e,_0x2e52cb._TempBuffer,4)},_0x2e52cb.prototype._updateColor3ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setColor3(e+i,t)},_0x2e52cb.prototype._updateColor3ForUniform=function(e,t){_0x2e52cb._TempBuffer[0]=t.r,_0x2e52cb._TempBuffer[1]=t.g,_0x2e52cb._TempBuffer[2]=t.b,this.updateUniform(e,_0x2e52cb._TempBuffer,3)},_0x2e52cb.prototype._updateColor4ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setColor4(e+n,t,i)},_0x2e52cb.prototype._updateDirectColor4ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setDirectColor4(e+i,t)},_0x2e52cb.prototype._updateColor4ForUniform=function(e,t,i){_0x2e52cb._TempBuffer[0]=t.r,_0x2e52cb._TempBuffer[1]=t.g,_0x2e52cb._TempBuffer[2]=t.b,_0x2e52cb._TempBuffer[3]=i,this.updateUniform(e,_0x2e52cb._TempBuffer,4)},_0x2e52cb.prototype._updateDirectColor4ForUniform=function(e,t){t.red?(_0x2e52cb._TempBuffer[0]=t.red,_0x2e52cb._TempBuffer[1]=t.green,_0x2e52cb._TempBuffer[2]=t.blue,_0x2e52cb._TempBuffer[3]=t.alpha):(_0x2e52cb._TempBuffer[0]=t.r,_0x2e52cb._TempBuffer[1]=t.g,_0x2e52cb._TempBuffer[2]=t.b,_0x2e52cb._TempBuffer[3]=t.a),this.updateUniform(e,_0x2e52cb._TempBuffer,4)},_0x2e52cb.prototype._updateIntForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setInt(e+i,t)},_0x2e52cb.prototype._updateIntForUniform=function(e,t){_0x2e52cb._TempBufferInt32View[0]=t,this.updateUniform(e,_0x2e52cb._TempBuffer,1)},_0x2e52cb.prototype._updateInt2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setInt2(e+n,t,i)},_0x2e52cb.prototype._updateInt2ForUniform=function(e,t,i){_0x2e52cb._TempBufferInt32View[0]=t,_0x2e52cb._TempBufferInt32View[1]=i,this.updateUniform(e,_0x2e52cb._TempBuffer,2)},_0x2e52cb.prototype._updateInt3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setInt3(e+r,t,i,n)},_0x2e52cb.prototype._updateInt3ForUniform=function(e,t,i,n){_0x2e52cb._TempBufferInt32View[0]=t,_0x2e52cb._TempBufferInt32View[1]=i,_0x2e52cb._TempBufferInt32View[2]=n,this.updateUniform(e,_0x2e52cb._TempBuffer,3)},_0x2e52cb.prototype._updateInt4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setInt4(e+o,t,i,n,r)},_0x2e52cb.prototype._updateInt4ForUniform=function(e,t,i,n,r){_0x2e52cb._TempBufferInt32View[0]=t,_0x2e52cb._TempBufferInt32View[1]=i,_0x2e52cb._TempBufferInt32View[2]=n,_0x2e52cb._TempBufferInt32View[3]=r,this.updateUniform(e,_0x2e52cb._TempBuffer,4)},_0x2e52cb.prototype.setTexture=function(e,t){this._currentEffect.setTexture(e,t)},_0x2e52cb.prototype.updateUniformDirectly=function(e,t){this.updateUniform(e,t,t.length),this.update()},_0x2e52cb.prototype.bindToEffect=function(e,t){this._currentEffect=e,this._currentEffectName=t},_0x2e52cb.prototype.bindUniformBuffer=function(){!this._noUBO&&this._buffer&&this._currentEffect&&this._currentEffect.bindUniformBuffer(this._buffer,this._currentEffectName)},_0x2e52cb.prototype.unbindEffect=function(){this._currentEffect=void 0,this._currentEffectName=void 0},_0x2e52cb.prototype.setDataBuffer=function(e){if(!this._buffers)return this._buffer===e;for(var t=0;t<this._buffers.length;++t){if(this._buffers[t][0]===e)return this._bufferIndex=t,this._buffer=e,this._createBufferOnWrite=!1,this._currentEffect=void 0,!0}return!1},_0x2e52cb.prototype.dispose=function(){if(!this._noUBO){var e=this._engine._uniformBuffers,t=e.indexOf(this);if(-1!==t&&(e[t]=e[e.length-1],e.pop()),this._trackUbosInFrame&&this._buffers)for(var i=0;i<this._buffers.length;++i){var n=this._buffers[i][0];this._engine._releaseBuffer(n)}else this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)}},_0x2e52cb._UpdatedUbosInFrame={},_0x2e52cb._MAX_UNIFORM_SIZE=256,_0x2e52cb._TempBuffer=new Float32Array(_0x2e52cb._MAX_UNIFORM_SIZE),_0x2e52cb._TempBufferInt32View=new Uint32Array(_0x2e52cb._TempBuffer.buffer);var e$1W={SCENE:"Scene",LIGHT:"Light",MESH:"Mesh",MATERIAL:"Material",LAYER:"Layer",SHADOW:"Shadow",WaterLayer:"WaterLayer",Polyline:"Polyline",S3MVolume:"S3MVolume"},_0x27131a=Object.freeze(e$1W),_0x371923=(_0x53f553=!0,function(e,t){var i=_0x53f553?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53f553=!1,i}),_0x999922=_0x371923(void 0,(function(){return _0x999922.toString().search("(((.+)+)+)+$").toString().constructor(_0x999922).search("(((.+)+)+)+$")})),_0x53f553;function _0x41a72f(){}_0x999922(),_0x41a72f.BuildArray=function(e,t){for(var i=[],n=0;n<e;++n)i.push(t());return i},_0x41a72f.BuildTuple=function(e,t){return _0x41a72f.BuildArray(e,t)};var _0xa548b4=(_0x413bd2=!0,function(e,t){var i=_0x413bd2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x413bd2=!1,i}),_0xe301b9=_0xa548b4(void 0,(function(){return _0xe301b9.toString().search("(((.+)+)+)+$").toString().constructor(_0xe301b9).search("(((.+)+)+)+$")})),_0x413bd2;function _0x17f3d8(){}_0xe301b9(),_0x17f3d8.SetMatrixPrecision=function(e){if(_0x17f3d8.MatrixTrackPrecisionChange=!1,e&&!_0x17f3d8.MatrixUse64Bits&&_0x17f3d8.MatrixTrackedMatrices)for(var t=0;t<_0x17f3d8.MatrixTrackedMatrices.length;++t){var i=_0x17f3d8.MatrixTrackedMatrices[t],n=i._m;i._m=new Array(16);for(var r=0;r<16;++r)i._m[r]=n[r]}_0x17f3d8.MatrixUse64Bits=e,_0x17f3d8.MatrixCurrentType=_0x17f3d8.MatrixUse64Bits?Array:Float32Array,_0x17f3d8.MatrixTrackedMatrices=null},_0x17f3d8.MatrixUse64Bits=!1,_0x17f3d8.MatrixTrackPrecisionChange=!0,_0x17f3d8.MatrixCurrentType=Float32Array,_0x17f3d8.MatrixTrackedMatrices=[];var _0x1553dc=(_0x5b7ca9=!0,function(e,t){var i=_0x5b7ca9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b7ca9=!1,i}),_0x31cce4=_0x1553dc(void 0,(function(){return _0x31cce4.toString().search("(((.+)+)+)+$").toString().constructor(_0x31cce4).search("(((.+)+)+)+$")})),_0x5b7ca9;_0x31cce4();var _0x2cfc16=function(e){return parseInt(e.toString().replace(/\W/g,""))};function Vector2(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.x=e,this.y=t}function Vector3(e,t,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),this._isDirty=!0,this._x=e,this._y=t,this._z=i}function Vector4(e,t,i,n){this.x=e,this.y=t,this.z=i,this.w=n}function Quaternion(e,t,i,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=1),this._isDirty=!0,this._x=e,this._y=t,this._z=i,this._w=n}function Matrix(){this._isIdentity=!1,this._isIdentityDirty=!0,this._isIdentity3x2=!0,this._isIdentity3x2Dirty=!0,this.updateFlag=-1,_0x17f3d8.MatrixTrackPrecisionChange&&_0x17f3d8.MatrixTrackedMatrices.push(this),this._m=new _0x17f3d8.MatrixCurrentType(16),this.markAsUpdated()}function MathTmp(){}function TmpVectors(){}Vector2.prototype.toString=function(){return"{X: ".concat(this.x," Y: ").concat(this.y,"}")},Vector2.prototype.getClassName=function(){return"Vector2"},Vector2.prototype.getHashCode=function(){var e=_0x2cfc16(this.x);return e=397*e^_0x2cfc16(this.y)},Vector2.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,this},Vector2.prototype.fromArray=function(e,t){return void 0===t&&(t=0),Vector2.FromArrayToRef(e,t,this),this},Vector2.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},Vector2.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this},Vector2.prototype.copyFromFloats=function(e,t){return this.x=e,this.y=t,this},Vector2.prototype.set=function(e,t){return this.copyFromFloats(e,t)},Vector2.prototype.add=function(e){return new Vector2(this.x+e.x,this.y+e.y)},Vector2.prototype.addToRef=function(e,t){return t.x=this.x+e.x,t.y=this.y+e.y,this},Vector2.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this},Vector2.prototype.addVector3=function(e){return new Vector2(this.x+e.x,this.y+e.y)},Vector2.prototype.subtract=function(e){return new Vector2(this.x-e.x,this.y-e.y)},Vector2.prototype.subtractToRef=function(e,t){return t.x=this.x-e.x,t.y=this.y-e.y,this},Vector2.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this},Vector2.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this},Vector2.prototype.multiply=function(e){return new Vector2(this.x*e.x,this.y*e.y)},Vector2.prototype.multiplyToRef=function(e,t){return t.x=this.x*e.x,t.y=this.y*e.y,this},Vector2.prototype.multiplyByFloats=function(e,t){return new Vector2(this.x*e,this.y*t)},Vector2.prototype.divide=function(e){return new Vector2(this.x/e.x,this.y/e.y)},Vector2.prototype.divideToRef=function(e,t){return t.x=this.x/e.x,t.y=this.y/e.y,this},Vector2.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},Vector2.prototype.negate=function(){return new Vector2(-this.x,-this.y)},Vector2.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this},Vector2.prototype.negateToRef=function(e){return e.copyFromFloats(-1*this.x,-1*this.y)},Vector2.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this},Vector2.prototype.scale=function(e){var t=new Vector2(0,0);return this.scaleToRef(e,t),t},Vector2.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,this},Vector2.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,this},Vector2.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y},Vector2.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.x,e.x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.y,e.y,t)},Vector2.prototype.floor=function(){return new Vector2(Math.floor(this.x),Math.floor(this.y))},Vector2.prototype.fract=function(){return new Vector2(this.x-Math.floor(this.x),this.y-Math.floor(this.y))},Vector2.prototype.rotateToRef=function(e,t){var i=Math.cos(e),n=Math.sin(e);return t.x=i*this.x-n*this.y,t.y=n*this.x+i*this.y,this},Vector2.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},Vector2.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y},Vector2.prototype.normalize=function(){return Vector2.NormalizeToRef(this,this),this},Vector2.prototype.clone=function(){return new Vector2(this.x,this.y)},Vector2.Zero=function(){return new Vector2(0,0)},Vector2.One=function(){return new Vector2(1,1)},Vector2.FromArray=function(e,t){return void 0===t&&(t=0),new Vector2(e[t],e[t+1])},Vector2.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1]},Vector2.CatmullRom=function(e,t,i,n,r){var o=r*r,a=r*o;return new Vector2(.5*(2*t.x+(-e.x+i.x)*r+(2*e.x-5*t.x+4*i.x-n.x)*o+(-e.x+3*t.x-3*i.x+n.x)*a),.5*(2*t.y+(-e.y+i.y)*r+(2*e.y-5*t.y+4*i.y-n.y)*o+(-e.y+3*t.y-3*i.y+n.y)*a))},Vector2.Clamp=function(e,t,i){var n=e.x;n=(n=n>i.x?i.x:n)<t.x?t.x:n;var r=e.y;return new Vector2(n,r=(r=r>i.y?i.y:r)<t.y?t.y:r)},Vector2.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o,s=2*a-3*o+1,l=-2*a+3*o,u=a-2*o+r,c=a-o;return new Vector2(e.x*s+i.x*l+t.x*u+n.x*c,e.y*s+i.y*l+t.y*u+n.y*c)},Vector2.Hermite1stDerivative=function(e,t,i,n,r){var o=Vector2.Zero();return this.Hermite1stDerivativeToRef(e,t,i,n,r,o),o},Vector2.Hermite1stDerivativeToRef=function(e,t,i,n,r,o){var a=r*r;o.x=6*(a-r)*e.x+(3*a-4*r+1)*t.x+6*(-a+r)*i.x+(3*a-2*r)*n.x,o.y=6*(a-r)*e.y+(3*a-4*r+1)*t.y+6*(-a+r)*i.y+(3*a-2*r)*n.y},Vector2.Lerp=function(e,t,i){return new Vector2(e.x+(t.x-e.x)*i,e.y+(t.y-e.y)*i)},Vector2.Dot=function(e,t){return e.x*t.x+e.y*t.y},Vector2.Normalize=function(e){var t=Vector2.Zero();return this.NormalizeToRef(e,t),t},Vector2.NormalizeToRef=function(e,t){var i=e.length();0!==i&&(t.x=e.x/i,t.y=e.y/i)},Vector2.Minimize=function(e,t){return new Vector2(e.x<t.x?e.x:t.x,e.y<t.y?e.y:t.y)},Vector2.Maximize=function(e,t){return new Vector2(e.x>t.x?e.x:t.x,e.y>t.y?e.y:t.y)},Vector2.Transform=function(e,t){var i=Vector2.Zero();return Vector2.TransformToRef(e,t,i),i},Vector2.TransformToRef=function(e,t,i){var n=t.m,r=e.x*n[0]+e.y*n[4]+n[12],o=e.x*n[1]+e.y*n[5]+n[13];i.x=r,i.y=o},Vector2.PointInTriangle=function(e,t,i,n){var r=.5*(-i.y*n.x+t.y*(-i.x+n.x)+t.x*(i.y-n.y)+i.x*n.y),o=r<0?-1:1,a=(t.y*n.x-t.x*n.y+(n.y-t.y)*e.x+(t.x-n.x)*e.y)*o,s=(t.x*i.y-t.y*i.x+(t.y-i.y)*e.x+(i.x-t.x)*e.y)*o;return a>0&&s>0&&a+s<2*r*o},Vector2.Distance=function(e,t){return Math.sqrt(Vector2.DistanceSquared(e,t))},Vector2.DistanceSquared=function(e,t){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},Vector2.Center=function(e,t){return Vector2.CenterToRef(e,t,Vector2.Zero())},Vector2.CenterToRef=function(e,t,i){return i.copyFromFloats((e.x+t.x)/2,(e.y+t.y)/2)},Vector2.DistanceOfPointFromSegment=function(e,t,i){var n=Vector2.DistanceSquared(t,i);if(0===n)return Vector2.Distance(e,t);var r=i.subtract(t),o=Math.max(0,Math.min(1,Vector2.Dot(e.subtract(t),r)/n)),a=t.add(r.multiplyByFloats(o,o));return Vector2.Distance(e,a)},Object.defineProperty(Vector3.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3.prototype,"z",{get:function(){return this._z},set:function(e){this._z=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Vector3.prototype.toString=function(){return"{X: ".concat(this._x," Y: ").concat(this._y," Z: ").concat(this._z,"}")},Vector3.prototype.getClassName=function(){return"Vector3"},Vector3.prototype.getHashCode=function(){var e=_0x2cfc16(this._x);return e=397*(e=397*e^_0x2cfc16(this._y))^_0x2cfc16(this._z)},Vector3.prototype.asArray=function(){var e=[];return this.toArray(e,0),e},Vector3.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,this},Vector3.prototype.fromArray=function(e,t){return void 0===t&&(t=0),Vector3.FromArrayToRef(e,t,this),this},Vector3.prototype.toQuaternion=function(){return Quaternion.RotationYawPitchRoll(this._y,this._x,this._z)},Vector3.prototype.addInPlace=function(e){return this.addInPlaceFromFloats(e._x,e._y,e._z)},Vector3.prototype.addInPlaceFromFloats=function(e,t,i){return this.x+=e,this.y+=t,this.z+=i,this},Vector3.prototype.add=function(e){return new Vector3(this._x+e._x,this._y+e._y,this._z+e._z)},Vector3.prototype.addToRef=function(e,t){return t.copyFromFloats(this._x+e._x,this._y+e._y,this._z+e._z)},Vector3.prototype.subtractInPlace=function(e){return this.x-=e._x,this.y-=e._y,this.z-=e._z,this},Vector3.prototype.subtract=function(e){return new Vector3(this._x-e._x,this._y-e._y,this._z-e._z)},Vector3.prototype.subtractToRef=function(e,t){return this.subtractFromFloatsToRef(e._x,e._y,e._z,t)},Vector3.prototype.subtractFromFloats=function(e,t,i){return new Vector3(this._x-e,this._y-t,this._z-i)},Vector3.prototype.subtractFromFloatsToRef=function(e,t,i,n){return n.copyFromFloats(this._x-e,this._y-t,this._z-i)},Vector3.prototype.negate=function(){return new Vector3(-this._x,-this._y,-this._z)},Vector3.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},Vector3.prototype.negateToRef=function(e){return e.copyFromFloats(-1*this._x,-1*this._y,-1*this._z)},Vector3.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this},Vector3.prototype.scale=function(e){return new Vector3(this._x*e,this._y*e,this._z*e)},Vector3.prototype.scaleToRef=function(e,t){return t.copyFromFloats(this._x*e,this._y*e,this._z*e)},Vector3.prototype.applyRotationQuaternionToRef=function(e,t){var i=e.w*this.x+e.y*this.z-e.z*this.y,n=e.w*this.y+e.z*this.x-e.x*this.z,r=e.w*this.z+e.x*this.y-e.y*this.x,o=-e.x*this.x-e.y*this.y-e.z*this.z;return t.x=i*e.w+o*-e.x+n*-e.z-r*-e.y,t.y=n*e.w+o*-e.y+r*-e.x-i*-e.z,t.z=r*e.w+o*-e.z+i*-e.y-n*-e.x,t},Vector3.prototype.applyRotationQuaternionInPlace=function(e){return this.applyRotationQuaternionToRef(e,this)},Vector3.prototype.applyRotationQuaternion=function(e){return this.applyRotationQuaternionToRef(e,Vector3.Zero())},Vector3.prototype.scaleAndAddToRef=function(e,t){return t.addInPlaceFromFloats(this._x*e,this._y*e,this._z*e)},Vector3.prototype.projectOnPlane=function(e,t){var i=Vector3.Zero();return this.projectOnPlaneToRef(e,t,i),i},Vector3.prototype.projectOnPlaneToRef=function(e,t,i){var n=e.normal,r=e.d,o=MathTmp.Vector3[0];this.subtractToRef(t,o),o.normalize();var a=Vector3.Dot(o,n),s=-(Vector3.Dot(t,n)+r)/a,l=o.scaleInPlace(s);t.addToRef(l,i)},Vector3.prototype.equals=function(e){return e&&this._x===e._x&&this._y===e._y&&this._z===e._z},Vector3.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._x,e._x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._y,e._y,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._z,e._z,t)},Vector3.prototype.equalsToFloats=function(e,t,i){return this._x===e&&this._y===t&&this._z===i},Vector3.prototype.multiplyInPlace=function(e){return this.x*=e._x,this.y*=e._y,this.z*=e._z,this},Vector3.prototype.multiply=function(e){return this.multiplyByFloats(e._x,e._y,e._z)},Vector3.prototype.multiplyToRef=function(e,t){return t.copyFromFloats(this._x*e._x,this._y*e._y,this._z*e._z)},Vector3.prototype.multiplyByFloats=function(e,t,i){return new Vector3(this._x*e,this._y*t,this._z*i)},Vector3.prototype.divide=function(e){return new Vector3(this._x/e._x,this._y/e._y,this._z/e._z)},Vector3.prototype.divideToRef=function(e,t){return t.copyFromFloats(this._x/e._x,this._y/e._y,this._z/e._z)},Vector3.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},Vector3.prototype.minimizeInPlace=function(e){return this.minimizeInPlaceFromFloats(e._x,e._y,e._z)},Vector3.prototype.maximizeInPlace=function(e){return this.maximizeInPlaceFromFloats(e._x,e._y,e._z)},Vector3.prototype.minimizeInPlaceFromFloats=function(e,t,i){return e<this._x&&(this.x=e),t<this._y&&(this.y=t),i<this._z&&(this.z=i),this},Vector3.prototype.maximizeInPlaceFromFloats=function(e,t,i){return e>this._x&&(this.x=e),t>this._y&&(this.y=t),i>this._z&&(this.z=i),this},Vector3.prototype.isNonUniformWithinEpsilon=function(e){var t=Math.abs(this._x),i=Math.abs(this._y);if(!_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(t,i,e))return!0;var n=Math.abs(this._z);return!_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(t,n,e)||!_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(i,n,e)},Object.defineProperty(Vector3.prototype,"isNonUniform",{get:function(){var e=Math.abs(this._x);return e!==Math.abs(this._y)||e!==Math.abs(this._z)},enumerable:!1,configurable:!0}),Vector3.prototype.floor=function(){return new Vector3(Math.floor(this._x),Math.floor(this._y),Math.floor(this._z))},Vector3.prototype.fract=function(){return new Vector3(this._x-Math.floor(this._x),this._y-Math.floor(this._y),this._z-Math.floor(this._z))},Vector3.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)},Vector3.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z},Object.defineProperty(Vector3.prototype,"hasAZeroComponent",{get:function(){return this._x*this._y*this._z==0},enumerable:!1,configurable:!0}),Vector3.prototype.normalize=function(){return this.normalizeFromLength(this.length())},Vector3.prototype.reorderInPlace=function(e){var t=this;return"xyz"===(e=e.toLowerCase())||(MathTmp.Vector3[0].copyFrom(this),["x","y","z"].forEach((function(i,n){t[i]=MathTmp.Vector3[0][e[n]]}))),this},Vector3.prototype.rotateByQuaternionToRef=function(e,t){return e.toRotationMatrix(MathTmp.Matrix[0]),Vector3.TransformCoordinatesToRef(this,MathTmp.Matrix[0],t),t},Vector3.prototype.rotateByQuaternionAroundPointToRef=function(e,t,i){return this.subtractToRef(t,MathTmp.Vector3[0]),MathTmp.Vector3[0].rotateByQuaternionToRef(e,MathTmp.Vector3[0]),t.addToRef(MathTmp.Vector3[0],i),i},Vector3.prototype.cross=function(e){return Vector3.Cross(this,e)},Vector3.prototype.normalizeFromLength=function(e){return 0===e||1===e?this:this.scaleInPlace(1/e)},Vector3.prototype.normalizeToNew=function(){var e=new Vector3(0,0,0);return this.normalizeToRef(e),e},Vector3.prototype.normalizeToRef=function(e){var t=this.length();return 0===t||1===t?e.copyFromFloats(this._x,this._y,this._z):this.scaleToRef(1/t,e)},Vector3.prototype.clone=function(){return new Vector3(this._x,this._y,this._z)},Vector3.prototype.copyFrom=function(e){return this.copyFromFloats(e._x,e._y,e._z)},Vector3.prototype.copyFromFloats=function(e,t,i){return this.x=e,this.y=t,this.z=i,this},Vector3.prototype.set=function(e,t,i){return this.copyFromFloats(e,t,i)},Vector3.prototype.setAll=function(e){return this.x=this.y=this.z=e,this},Vector3.GetClipFactor=function(e,t,i,n){var r=Vector3.Dot(e,i)-n;return r/(r-(Vector3.Dot(t,i)-n))},Vector3.GetAngleBetweenVectors=function(e,t,i){var n=e.normalizeToRef(MathTmp.Vector3[1]),r=t.normalizeToRef(MathTmp.Vector3[2]),o=Vector3.Dot(n,r);o=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(o,-1,1);var a=Math.acos(o),s=MathTmp.Vector3[3];return Vector3.CrossToRef(n,r,s),Vector3.Dot(s,i)>0?isNaN(a)?0:a:isNaN(a)?-Math.PI:-Math.acos(o)},Vector3.GetAngleBetweenVectorsOnPlane=function(e,t,i){MathTmp.Vector3[0].copyFrom(e);var n=MathTmp.Vector3[0];MathTmp.Vector3[1].copyFrom(t);var r=MathTmp.Vector3[1];MathTmp.Vector3[2].copyFrom(i);var o=MathTmp.Vector3[2],a=MathTmp.Vector3[3],s=MathTmp.Vector3[4];n.normalize(),r.normalize(),o.normalize(),Vector3.CrossToRef(o,n,a),Vector3.CrossToRef(a,o,s);var l=Math.atan2(Vector3.Dot(r,a),Vector3.Dot(r,s));return _math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.NormalizeRadians(l)},Vector3.SlerpToRef=function(e,t,i,n){i=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(i,0,1);var r=MathTmp.Vector3[0],o=MathTmp.Vector3[1];r.copyFrom(e);var a=r.length();r.normalizeFromLength(a),o.copyFrom(t);var s=o.length();o.normalizeFromLength(s);var l,u,c=Vector3.Dot(r,o);if(c<1-_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon){var h=Math.acos(c),d=1/Math.sin(h);l=Math.sin((1-i)*h)*d,u=Math.sin(i*h)*d}else l=1-i,u=i;r.scaleInPlace(l),o.scaleInPlace(u),n.copyFrom(r).addInPlace(o),n.scaleInPlace(_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Lerp(a,s,i))},Vector3.SmoothToRef=function(e,t,i,n,r){Vector3.SlerpToRef(e,t,0===n?1:i/n,r)},Vector3.FromArray=function(e,t){return void 0===t&&(t=0),new Vector3(e[t],e[t+1],e[t+2])},Vector3.FromFloatArray=function(e,t){return Vector3.FromArray(e,t)},Vector3.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2]},Vector3.FromFloatArrayToRef=function(e,t,i){return Vector3.FromArrayToRef(e,t,i)},Vector3.FromFloatsToRef=function(e,t,i,n){n.copyFromFloats(e,t,i)},Vector3.Zero=function(){return new Vector3(0,0,0)},Vector3.One=function(){return new Vector3(1,1,1)},Vector3.Up=function(){return new Vector3(0,1,0)},Object.defineProperty(Vector3,"UpReadOnly",{get:function(){return Vector3._UpReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"RightReadOnly",{get:function(){return Vector3._RightReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"LeftReadOnly",{get:function(){return Vector3._LeftReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"LeftHandedForwardReadOnly",{get:function(){return Vector3._LeftHandedForwardReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"RightHandedForwardReadOnly",{get:function(){return Vector3._RightHandedForwardReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"ZeroReadOnly",{get:function(){return Vector3._ZeroReadOnly},enumerable:!1,configurable:!0}),Vector3.Down=function(){return new Vector3(0,-1,0)},Vector3.Forward=function(e){return void 0===e&&(e=!1),new Vector3(0,0,e?-1:1)},Vector3.Backward=function(e){return void 0===e&&(e=!1),new Vector3(0,0,e?1:-1)},Vector3.Right=function(){return new Vector3(1,0,0)},Vector3.Left=function(){return new Vector3(-1,0,0)},Vector3.TransformCoordinates=function(e,t){var i=Vector3.Zero();return Vector3.TransformCoordinatesToRef(e,t,i),i},Vector3.TransformCoordinatesToRef=function(e,t,i){Vector3.TransformCoordinatesFromFloatsToRef(e._x,e._y,e._z,t,i)},Vector3.TransformCoordinatesFromFloatsToRef=function(e,t,i,n,r){var o=n.m,a=e*o[0]+t*o[4]+i*o[8]+o[12],s=e*o[1]+t*o[5]+i*o[9]+o[13],l=e*o[2]+t*o[6]+i*o[10]+o[14],u=1/(e*o[3]+t*o[7]+i*o[11]+o[15]);r.x=a*u,r.y=s*u,r.z=l*u},Vector3.TransformNormal=function(e,t){var i=Vector3.Zero();return Vector3.TransformNormalToRef(e,t,i),i},Vector3.TransformNormalToRef=function(e,t,i){this.TransformNormalFromFloatsToRef(e._x,e._y,e._z,t,i)},Vector3.TransformNormalFromFloatsToRef=function(e,t,i,n,r){var o=n.m;r.x=e*o[0]+t*o[4]+i*o[8],r.y=e*o[1]+t*o[5]+i*o[9],r.z=e*o[2]+t*o[6]+i*o[10]},Vector3.CatmullRom=function(e,t,i,n,r){var o=r*r,a=r*o;return new Vector3(.5*(2*t._x+(-e._x+i._x)*r+(2*e._x-5*t._x+4*i._x-n._x)*o+(-e._x+3*t._x-3*i._x+n._x)*a),.5*(2*t._y+(-e._y+i._y)*r+(2*e._y-5*t._y+4*i._y-n._y)*o+(-e._y+3*t._y-3*i._y+n._y)*a),.5*(2*t._z+(-e._z+i._z)*r+(2*e._z-5*t._z+4*i._z-n._z)*o+(-e._z+3*t._z-3*i._z+n._z)*a))},Vector3.Clamp=function(e,t,i){var n=new Vector3;return Vector3.ClampToRef(e,t,i,n),n},Vector3.ClampToRef=function(e,t,i,n){var r=e._x;r=(r=r>i._x?i._x:r)<t._x?t._x:r;var o=e._y;o=(o=o>i._y?i._y:o)<t._y?t._y:o;var a=e._z;a=(a=a>i._z?i._z:a)<t._z?t._z:a,n.copyFromFloats(r,o,a)},Vector3.CheckExtends=function(e,t,i){t.minimizeInPlace(e),i.maximizeInPlace(e)},Vector3.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o,s=2*a-3*o+1,l=-2*a+3*o,u=a-2*o+r,c=a-o;return new Vector3(e._x*s+i._x*l+t._x*u+n._x*c,e._y*s+i._y*l+t._y*u+n._y*c,e._z*s+i._z*l+t._z*u+n._z*c)},Vector3.Hermite1stDerivative=function(e,t,i,n,r){var o=Vector3.Zero();return this.Hermite1stDerivativeToRef(e,t,i,n,r,o),o},Vector3.Hermite1stDerivativeToRef=function(e,t,i,n,r,o){var a=r*r;o.x=6*(a-r)*e.x+(3*a-4*r+1)*t.x+6*(-a+r)*i.x+(3*a-2*r)*n.x,o.y=6*(a-r)*e.y+(3*a-4*r+1)*t.y+6*(-a+r)*i.y+(3*a-2*r)*n.y,o.z=6*(a-r)*e.z+(3*a-4*r+1)*t.z+6*(-a+r)*i.z+(3*a-2*r)*n.z},Vector3.Lerp=function(e,t,i){var n=new Vector3(0,0,0);return Vector3.LerpToRef(e,t,i,n),n},Vector3.LerpToRef=function(e,t,i,n){n.x=e._x+(t._x-e._x)*i,n.y=e._y+(t._y-e._y)*i,n.z=e._z+(t._z-e._z)*i},Vector3.Dot=function(e,t){return e._x*t._x+e._y*t._y+e._z*t._z},Vector3.Cross=function(e,t){var i=Vector3.Zero();return Vector3.CrossToRef(e,t,i),i},Vector3.CrossToRef=function(e,t,i){var n=e._y*t._z-e._z*t._y,r=e._z*t._x-e._x*t._z,o=e._x*t._y-e._y*t._x;i.copyFromFloats(n,r,o)},Vector3.Normalize=function(e){var t=Vector3.Zero();return Vector3.NormalizeToRef(e,t),t},Vector3.NormalizeToRef=function(e,t){e.normalizeToRef(t)},Vector3.Project=function(e,t,i,n){var r=new Vector3;return Vector3.ProjectToRef(e,t,i,n,r),r},Vector3.ProjectToRef=function(e,t,i,n,r){var o=n.width,a=n.height,s=n.x,l=n.y,u=MathTmp.Matrix[1];Matrix.FromValuesToRef(o/2,0,0,0,0,-a/2,0,0,0,0,.5,0,s+o/2,a/2+l,.5,1,u);var c=MathTmp.Matrix[0];return t.multiplyToRef(i,c),c.multiplyToRef(u,c),Vector3.TransformCoordinatesToRef(e,c,r),r},Vector3._UnprojectFromInvertedMatrixToRef=function(e,t,i){Vector3.TransformCoordinatesToRef(e,t,i);var n=t.m,r=e._x*n[3]+e._y*n[7]+e._z*n[11]+n[15];_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(r,1)&&i.scaleInPlace(1/r)},Vector3.UnprojectFromTransform=function(e,t,i,n,r){return this.Unproject(e,t,i,n,r,Matrix.IdentityReadOnly)},Vector3.Unproject=function(e,t,i,n,r,o){var a=Vector3.Zero();return Vector3.UnprojectToRef(e,t,i,n,r,o,a),a},Vector3.UnprojectToRef=function(e,t,i,n,r,o,a){Vector3.UnprojectFloatsToRef(e._x,e._y,e._z,t,i,n,r,o,a)},Vector3.UnprojectFloatsToRef=function(e,t,i,n,r,o,a,s,l){var u,c=MathTmp.Matrix[0];o.multiplyToRef(a,c),c.multiplyToRef(s,c),c.invert();var h=MathTmp.Vector3[0];h.x=e/n*2-1,h.y=-(t/r*2-1),(null===(u=_Engines_engineStore__WEBPACK_IMPORTED_MODULE_5__.EngineStore.LastCreatedEngine)||void 0===u?void 0:u.isNDCHalfZRange)?h.z=i:h.z=2*i-1,Vector3._UnprojectFromInvertedMatrixToRef(h,c,l)},Vector3.Minimize=function(e,t){var i=e.clone();return i.minimizeInPlace(t),i},Vector3.Maximize=function(e,t){var i=e.clone();return i.maximizeInPlace(t),i},Vector3.Distance=function(e,t){return Math.sqrt(Vector3.DistanceSquared(e,t))},Vector3.DistanceSquared=function(e,t){var i=e._x-t._x,n=e._y-t._y,r=e._z-t._z;return i*i+n*n+r*r},Vector3.ProjectOnTriangleToRef=function(e,t,i,n,r){var o=MathTmp.Vector3[0],a=MathTmp.Vector3[1],s=MathTmp.Vector3[2],l=MathTmp.Vector3[3],u=MathTmp.Vector3[4];i.subtractToRef(t,o),n.subtractToRef(t,a),n.subtractToRef(i,s);var c=o.length(),h=a.length(),d=s.length();if(c<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon||h<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon||d<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(t),Vector3.Distance(e,t);e.subtractToRef(t,u),Vector3.CrossToRef(o,a,l);var f=l.length();if(f<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(t),Vector3.Distance(e,t);l.normalizeFromLength(f);var p=u.length();if(p<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(t),0;u.normalizeFromLength(p);var _=Vector3.Dot(l,u),m=MathTmp.Vector3[5],g=MathTmp.Vector3[6];m.copyFrom(l).scaleInPlace(-p*_),g.copyFrom(e).addInPlace(m);var x=MathTmp.Vector3[4],v=MathTmp.Vector3[5],y=MathTmp.Vector3[7],$=MathTmp.Vector3[8];x.copyFrom(o).scaleInPlace(1/c),$.copyFrom(a).scaleInPlace(1/h),x.addInPlace($).scaleInPlace(-1),v.copyFrom(o).scaleInPlace(-1/c),$.copyFrom(s).scaleInPlace(1/d),v.addInPlace($).scaleInPlace(-1),y.copyFrom(s).scaleInPlace(-1/d),$.copyFrom(a).scaleInPlace(-1/h),y.addInPlace($).scaleInPlace(-1);var b=MathTmp.Vector3[9];b.copyFrom(g).subtractInPlace(t),Vector3.CrossToRef(x,b,$);var T=Vector3.Dot($,l);b.copyFrom(g).subtractInPlace(i),Vector3.CrossToRef(v,b,$);var C=Vector3.Dot($,l);b.copyFrom(g).subtractInPlace(n),Vector3.CrossToRef(y,b,$);var S,w,E=Vector3.Dot($,l),P=MathTmp.Vector3[10];T>0&&C<0?(P.copyFrom(o),S=t,w=i):C>0&&E<0?(P.copyFrom(s),S=i,w=n):(P.copyFrom(a).scaleInPlace(-1),S=n,w=t);var A=MathTmp.Vector3[9],L=MathTmp.Vector3[4];if(S.subtractToRef(g,$),w.subtractToRef(g,A),Vector3.CrossToRef($,A,L),!(Vector3.Dot(L,l)<0))return r.copyFrom(g),Math.abs(p*_);var M=MathTmp.Vector3[5];Vector3.CrossToRef(P,L,M),M.normalize();var R=MathTmp.Vector3[9];R.copyFrom(S).subtractInPlace(g);var O=R.length();if(O<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(S),Vector3.Distance(e,S);R.normalizeFromLength(O);var I=Vector3.Dot(M,R),D=MathTmp.Vector3[7];D.copyFrom(g).addInPlace(M.scaleInPlace(O*I)),$.copyFrom(D).subtractInPlace(S),p=P.length(),P.normalizeFromLength(p);var B=Vector3.Dot($,P)/Math.max(p,_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon);return B=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(B,0,1),D.copyFrom(S).addInPlace(P.scaleInPlace(B*p)),r.copyFrom(D),Vector3.Distance(e,D)},Vector3.Center=function(e,t){return Vector3.CenterToRef(e,t,Vector3.Zero())},Vector3.CenterToRef=function(e,t,i){return i.copyFromFloats((e._x+t._x)/2,(e._y+t._y)/2,(e._z+t._z)/2)},Vector3.RotationFromAxis=function(e,t,i){var n=Vector3.Zero();return Vector3.RotationFromAxisToRef(e,t,i,n),n},Vector3.RotationFromAxisToRef=function(e,t,i,n){var r=MathTmp.Quaternion[0];Quaternion.RotationQuaternionFromAxisToRef(e,t,i,r),r.toEulerAnglesToRef(n)},Vector3._UpReadOnly=Vector3.Up(),Vector3._LeftHandedForwardReadOnly=Vector3.Forward(!1),Vector3._RightHandedForwardReadOnly=Vector3.Forward(!0),Vector3._RightReadOnly=Vector3.Right(),Vector3._LeftReadOnly=Vector3.Left(),Vector3._ZeroReadOnly=Vector3.Zero(),Vector4.prototype.toString=function(){return"{X: ".concat(this.x," Y: ").concat(this.y," Z: ").concat(this.z," W: ").concat(this.w,"}")},Vector4.prototype.getClassName=function(){return"Vector4"},Vector4.prototype.getHashCode=function(){var e=_0x2cfc16(this.x);return e=397*(e=397*(e=397*e^_0x2cfc16(this.y))^_0x2cfc16(this.z))^_0x2cfc16(this.w)},Vector4.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},Vector4.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,this},Vector4.prototype.fromArray=function(e,t){return void 0===t&&(t=0),Vector4.FromArrayToRef(e,t,this),this},Vector4.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this},Vector4.prototype.add=function(e){return new Vector4(this.x+e.x,this.y+e.y,this.z+e.z,this.w+e.w)},Vector4.prototype.addToRef=function(e,t){return t.x=this.x+e.x,t.y=this.y+e.y,t.z=this.z+e.z,t.w=this.w+e.w,this},Vector4.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this},Vector4.prototype.subtract=function(e){return new Vector4(this.x-e.x,this.y-e.y,this.z-e.z,this.w-e.w)},Vector4.prototype.subtractToRef=function(e,t){return t.x=this.x-e.x,t.y=this.y-e.y,t.z=this.z-e.z,t.w=this.w-e.w,this},Vector4.prototype.subtractFromFloats=function(e,t,i,n){return new Vector4(this.x-e,this.y-t,this.z-i,this.w-n)},Vector4.prototype.subtractFromFloatsToRef=function(e,t,i,n,r){return r.x=this.x-e,r.y=this.y-t,r.z=this.z-i,r.w=this.w-n,this},Vector4.prototype.negate=function(){return new Vector4(-this.x,-this.y,-this.z,-this.w)},Vector4.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.w*=-1,this},Vector4.prototype.negateToRef=function(e){return e.copyFromFloats(-1*this.x,-1*this.y,-1*this.z,-1*this.w)},Vector4.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},Vector4.prototype.scale=function(e){return new Vector4(this.x*e,this.y*e,this.z*e,this.w*e)},Vector4.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,t.z=this.z*e,t.w=this.w*e,this},Vector4.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,t.z+=this.z*e,t.w+=this.w*e,this},Vector4.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y&&this.z===e.z&&this.w===e.w},Vector4.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.x,e.x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.y,e.y,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.z,e.z,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.w,e.w,t)},Vector4.prototype.equalsToFloats=function(e,t,i,n){return this.x===e&&this.y===t&&this.z===i&&this.w===n},Vector4.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this},Vector4.prototype.multiply=function(e){return new Vector4(this.x*e.x,this.y*e.y,this.z*e.z,this.w*e.w)},Vector4.prototype.multiplyToRef=function(e,t){return t.x=this.x*e.x,t.y=this.y*e.y,t.z=this.z*e.z,t.w=this.w*e.w,this},Vector4.prototype.multiplyByFloats=function(e,t,i,n){return new Vector4(this.x*e,this.y*t,this.z*i,this.w*n)},Vector4.prototype.divide=function(e){return new Vector4(this.x/e.x,this.y/e.y,this.z/e.z,this.w/e.w)},Vector4.prototype.divideToRef=function(e,t){return t.x=this.x/e.x,t.y=this.y/e.y,t.z=this.z/e.z,t.w=this.w/e.w,this},Vector4.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},Vector4.prototype.minimizeInPlace=function(e){return e.x<this.x&&(this.x=e.x),e.y<this.y&&(this.y=e.y),e.z<this.z&&(this.z=e.z),e.w<this.w&&(this.w=e.w),this},Vector4.prototype.maximizeInPlace=function(e){return e.x>this.x&&(this.x=e.x),e.y>this.y&&(this.y=e.y),e.z>this.z&&(this.z=e.z),e.w>this.w&&(this.w=e.w),this},Vector4.prototype.floor=function(){return new Vector4(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z),Math.floor(this.w))},Vector4.prototype.fract=function(){return new Vector4(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z),this.w-Math.floor(this.w))},Vector4.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},Vector4.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},Vector4.prototype.normalize=function(){var e=this.length();return 0===e?this:this.scaleInPlace(1/e)},Vector4.prototype.toVector3=function(){return new Vector3(this.x,this.y,this.z)},Vector4.prototype.clone=function(){return new Vector4(this.x,this.y,this.z,this.w)},Vector4.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},Vector4.prototype.copyFromFloats=function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},Vector4.prototype.set=function(e,t,i,n){return this.copyFromFloats(e,t,i,n)},Vector4.prototype.setAll=function(e){return this.x=this.y=this.z=this.w=e,this},Vector4.FromArray=function(e,t){return!t&&(t=0),new Vector4(e[t],e[t+1],e[t+2],e[t+3])},Vector4.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3]},Vector4.FromFloatArrayToRef=function(e,t,i){Vector4.FromArrayToRef(e,t,i)},Vector4.FromFloatsToRef=function(e,t,i,n,r){r.x=e,r.y=t,r.z=i,r.w=n},Vector4.Zero=function(){return new Vector4(0,0,0,0)},Vector4.One=function(){return new Vector4(1,1,1,1)},Vector4.Normalize=function(e){var t=Vector4.Zero();return Vector4.NormalizeToRef(e,t),t},Vector4.NormalizeToRef=function(e,t){t.copyFrom(e),t.normalize()},Vector4.Minimize=function(e,t){var i=e.clone();return i.minimizeInPlace(t),i},Vector4.Maximize=function(e,t){var i=e.clone();return i.maximizeInPlace(t),i},Vector4.Distance=function(e,t){return Math.sqrt(Vector4.DistanceSquared(e,t))},Vector4.DistanceSquared=function(e,t){var i=e.x-t.x,n=e.y-t.y,r=e.z-t.z,o=e.w-t.w;return i*i+n*n+r*r+o*o},Vector4.Center=function(e,t){return Vector4.CenterToRef(e,t,Vector4.Zero())},Vector4.CenterToRef=function(e,t,i){return i.copyFromFloats((e.x+t.x)/2,(e.y+t.y)/2,(e.z+t.z)/2,(e.w+t.w)/2)},Vector4.TransformCoordinates=function(e,t){var i=Vector4.Zero();return Vector4.TransformCoordinatesToRef(e,t,i),i},Vector4.TransformCoordinatesToRef=function(e,t,i){Vector4.TransformCoordinatesFromFloatsToRef(e._x,e._y,e._z,t,i)},Vector4.TransformCoordinatesFromFloatsToRef=function(e,t,i,n,r){var o=n.m,a=e*o[0]+t*o[4]+i*o[8]+o[12],s=e*o[1]+t*o[5]+i*o[9]+o[13],l=e*o[2]+t*o[6]+i*o[10]+o[14],u=e*o[3]+t*o[7]+i*o[11]+o[15];r.x=a,r.y=s,r.z=l,r.w=u},Vector4.TransformNormal=function(e,t){var i=Vector4.Zero();return Vector4.TransformNormalToRef(e,t,i),i},Vector4.TransformNormalToRef=function(e,t,i){var n=t.m,r=e.x*n[0]+e.y*n[4]+e.z*n[8],o=e.x*n[1]+e.y*n[5]+e.z*n[9],a=e.x*n[2]+e.y*n[6]+e.z*n[10];i.x=r,i.y=o,i.z=a,i.w=e.w},Vector4.TransformNormalFromFloatsToRef=function(e,t,i,n,r,o){var a=r.m;o.x=e*a[0]+t*a[4]+i*a[8],o.y=e*a[1]+t*a[5]+i*a[9],o.z=e*a[2]+t*a[6]+i*a[10],o.w=n},Vector4.FromVector3=function(e,t){return void 0===t&&(t=0),new Vector4(e._x,e._y,e._z,t)},Object.defineProperty(Quaternion.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Quaternion.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Quaternion.prototype,"z",{get:function(){return this._z},set:function(e){this._z=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Quaternion.prototype,"w",{get:function(){return this._w},set:function(e){this._w=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Quaternion.prototype.toString=function(){return"{X: ".concat(this._x," Y: ").concat(this._y," Z: ").concat(this._z," W: ").concat(this._w,"}")},Quaternion.prototype.getClassName=function(){return"Quaternion"},Quaternion.prototype.getHashCode=function(){var e=_0x2cfc16(this._x);return e=397*(e=397*(e=397*e^_0x2cfc16(this._y))^_0x2cfc16(this._z))^_0x2cfc16(this._w)},Quaternion.prototype.asArray=function(){return[this._x,this._y,this._z,this._w]},Quaternion.prototype.equals=function(e){return e&&this._x===e._x&&this._y===e._y&&this._z===e._z&&this._w===e._w},Quaternion.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._x,e._x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._y,e._y,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._z,e._z,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._w,e._w,t)},Quaternion.prototype.clone=function(){return new Quaternion(this._x,this._y,this._z,this._w)},Quaternion.prototype.copyFrom=function(e){return this.x=e._x,this.y=e._y,this.z=e._z,this.w=e._w,this},Quaternion.prototype.copyFromFloats=function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},Quaternion.prototype.set=function(e,t,i,n){return this.copyFromFloats(e,t,i,n)},Quaternion.prototype.add=function(e){return new Quaternion(this._x+e._x,this._y+e._y,this._z+e._z,this._w+e._w)},Quaternion.prototype.addInPlace=function(e){return this._x+=e._x,this._y+=e._y,this._z+=e._z,this._w+=e._w,this},Quaternion.prototype.subtract=function(e){return new Quaternion(this._x-e._x,this._y-e._y,this._z-e._z,this._w-e._w)},Quaternion.prototype.subtractInPlace=function(e){return this._x-=e._x,this._y-=e._y,this._z-=e._z,this._w-=e._w,this},Quaternion.prototype.scale=function(e){return new Quaternion(this._x*e,this._y*e,this._z*e,this._w*e)},Quaternion.prototype.scaleToRef=function(e,t){return t.x=this._x*e,t.y=this._y*e,t.z=this._z*e,t.w=this._w*e,this},Quaternion.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},Quaternion.prototype.scaleAndAddToRef=function(e,t){return t.x+=this._x*e,t.y+=this._y*e,t.z+=this._z*e,t.w+=this._w*e,this},Quaternion.prototype.multiply=function(e){var t=new Quaternion(0,0,0,1);return this.multiplyToRef(e,t),t},Quaternion.prototype.multiplyToRef=function(e,t){var i=this._x*e._w+this._y*e._z-this._z*e._y+this._w*e._x,n=-this._x*e._z+this._y*e._w+this._z*e._x+this._w*e._y,r=this._x*e._y-this._y*e._x+this._z*e._w+this._w*e._z,o=-this._x*e._x-this._y*e._y-this._z*e._z+this._w*e._w;return t.copyFromFloats(i,n,r,o),this},Quaternion.prototype.multiplyInPlace=function(e){return this.multiplyToRef(e,this),this},Quaternion.prototype.conjugateToRef=function(e){return e.copyFromFloats(-this._x,-this._y,-this._z,this._w),this},Quaternion.prototype.conjugateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},Quaternion.prototype.conjugate=function(){return new Quaternion(-this._x,-this._y,-this._z,this._w)},Quaternion.prototype.invert=function(){var e=this.conjugate(),t=this.lengthSquared();return 0==t||1==t||e.scaleInPlace(1/t),e},Quaternion.prototype.invertInPlace=function(){this.conjugateInPlace();var e=this.lengthSquared();return 0==e||1==e||this.scaleInPlace(1/e),this},Quaternion.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},Quaternion.prototype.length=function(){return Math.sqrt(this.lengthSquared())},Quaternion.prototype.normalize=function(){var e=this.length();if(0===e)return this;var t=1/e;return this.scaleInPlace(t),this},Quaternion.prototype.normalizeToNew=function(){var e=this.length();if(0===e)return this.clone();var t=1/e;return this.scale(t)},Quaternion.prototype.toEulerAngles=function(){var e=Vector3.Zero();return this.toEulerAnglesToRef(e),e},Quaternion.prototype.toEulerAnglesToRef=function(e){var t=this._z,i=this._x,n=this._y,r=this._w,o=n*t-i*r,a=.4999999;if(o<-.4999999)e.y=2*Math.atan2(n,r),e.x=Math.PI/2,e.z=0;else if(o>a)e.y=2*Math.atan2(n,r),e.x=-Math.PI/2,e.z=0;else{var s=r*r,l=t*t,u=i*i,c=n*n;e.z=Math.atan2(2*(i*n+t*r),-l-u+c+s),e.x=Math.asin(-2*o),e.y=Math.atan2(2*(t*i+n*r),l-u-c+s)}return this},Quaternion.prototype.toRotationMatrix=function(e){return Matrix.FromQuaternionToRef(this,e),this},Quaternion.prototype.fromRotationMatrix=function(e){return Quaternion.FromRotationMatrixToRef(e,this),this},Quaternion.FromRotationMatrix=function(e){var t=new Quaternion;return Quaternion.FromRotationMatrixToRef(e,t),t},Quaternion.FromRotationMatrixToRef=function(e,t){var i,n=e.m,r=n[0],o=n[4],a=n[8],s=n[1],l=n[5],u=n[9],c=n[2],h=n[6],d=n[10],f=r+l+d;f>0?(i=.5/Math.sqrt(f+1),t.w=.25/i,t.x=(h-u)*i,t.y=(a-c)*i,t.z=(s-o)*i):r>l&&r>d?(i=2*Math.sqrt(1+r-l-d),t.w=(h-u)/i,t.x=.25*i,t.y=(o+s)/i,t.z=(a+c)/i):l>d?(i=2*Math.sqrt(1+l-r-d),t.w=(a-c)/i,t.x=(o+s)/i,t.y=.25*i,t.z=(u+h)/i):(i=2*Math.sqrt(1+d-r-l),t.w=(s-o)/i,t.x=(a+c)/i,t.y=(u+h)/i,t.z=.25*i)},Quaternion.Dot=function(e,t){return e._x*t._x+e._y*t._y+e._z*t._z+e._w*t._w},Quaternion.AreClose=function(e,t){return Quaternion.Dot(e,t)>=0},Quaternion.SmoothToRef=function(e,t,i,n,r){var o=0===n?1:i/n;o=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(o,0,1),Quaternion.SlerpToRef(e,t,o,r)},Quaternion.Zero=function(){return new Quaternion(0,0,0,0)},Quaternion.Inverse=function(e){return new Quaternion(-e._x,-e._y,-e._z,e._w)},Quaternion.InverseToRef=function(e,t){return t.set(-e._x,-e._y,-e._z,e._w),t},Quaternion.Identity=function(){return new Quaternion(0,0,0,1)},Quaternion.IsIdentity=function(e){return e&&0===e._x&&0===e._y&&0===e._z&&1===e._w},Quaternion.RotationAxis=function(e,t){return Quaternion.RotationAxisToRef(e,t,new Quaternion)},Quaternion.RotationAxisToRef=function(e,t,i){var n=Math.sin(t/2);return e.normalize(),i.w=Math.cos(t/2),i.x=e._x*n,i.y=e._y*n,i.z=e._z*n,i},Quaternion.FromArray=function(e,t){return!t&&(t=0),new Quaternion(e[t],e[t+1],e[t+2],e[t+3])},Quaternion.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3]},Quaternion.FromEulerAngles=function(e,t,i){var n=new Quaternion;return Quaternion.RotationYawPitchRollToRef(t,e,i,n),n},Quaternion.FromEulerAnglesToRef=function(e,t,i,n){return Quaternion.RotationYawPitchRollToRef(t,e,i,n),n},Quaternion.FromEulerVector=function(e){var t=new Quaternion;return Quaternion.RotationYawPitchRollToRef(e._y,e._x,e._z,t),t},Quaternion.FromEulerVectorToRef=function(e,t){return Quaternion.RotationYawPitchRollToRef(e._y,e._x,e._z,t),t},Quaternion.FromUnitVectorsToRef=function(e,t,i){var n=Vector3.Dot(e,t)+1;return n<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon?Math.abs(e.x)>Math.abs(e.z)?i.set(-e.y,e.x,0,0):i.set(0,-e.z,e.y,0):(Vector3.CrossToRef(e,t,TmpVectors.Vector3[0]),i.set(TmpVectors.Vector3[0].x,TmpVectors.Vector3[0].y,TmpVectors.Vector3[0].z,n)),i.normalize()},Quaternion.RotationYawPitchRoll=function(e,t,i){var n=new Quaternion;return Quaternion.RotationYawPitchRollToRef(e,t,i,n),n},Quaternion.RotationYawPitchRollToRef=function(e,t,i,n){var r=.5*i,o=.5*t,a=.5*e,s=Math.sin(r),l=Math.cos(r),u=Math.sin(o),c=Math.cos(o),h=Math.sin(a),d=Math.cos(a);n.x=d*u*l+h*c*s,n.y=h*c*l-d*u*s,n.z=d*c*s-h*u*l,n.w=d*c*l+h*u*s},Quaternion.RotationAlphaBetaGamma=function(e,t,i){var n=new Quaternion;return Quaternion.RotationAlphaBetaGammaToRef(e,t,i,n),n},Quaternion.RotationAlphaBetaGammaToRef=function(e,t,i,n){var r=.5*(i+e),o=.5*(i-e),a=.5*t;n.x=Math.cos(o)*Math.sin(a),n.y=Math.sin(o)*Math.sin(a),n.z=Math.sin(r)*Math.cos(a),n.w=Math.cos(r)*Math.cos(a)},Quaternion.RotationQuaternionFromAxis=function(e,t,i){var n=new Quaternion(0,0,0,0);return Quaternion.RotationQuaternionFromAxisToRef(e,t,i,n),n},Quaternion.RotationQuaternionFromAxisToRef=function(e,t,i,n){var r=MathTmp.Matrix[0];Matrix.FromXYZAxesToRef(e.normalize(),t.normalize(),i.normalize(),r),Quaternion.FromRotationMatrixToRef(r,n)},Quaternion.FromLookDirectionLH=function(e,t){var i=new Quaternion;return Quaternion.FromLookDirectionLHToRef(e,t,i),i},Quaternion.FromLookDirectionLHToRef=function(e,t,i){var n=MathTmp.Matrix[0];Matrix.LookDirectionLHToRef(e,t,n),Quaternion.FromRotationMatrixToRef(n,i)},Quaternion.FromLookDirectionRH=function(e,t){var i=new Quaternion;return Quaternion.FromLookDirectionRHToRef(e,t,i),i},Quaternion.FromLookDirectionRHToRef=function(e,t,i){var n=MathTmp.Matrix[0];return Matrix.LookDirectionRHToRef(e,t,n),Quaternion.FromRotationMatrixToRef(n,i)},Quaternion.Slerp=function(e,t,i){var n=Quaternion.Identity();return Quaternion.SlerpToRef(e,t,i,n),n},Quaternion.SlerpToRef=function(e,t,i,n){var r,o,a=e._x*t._x+e._y*t._y+e._z*t._z+e._w*t._w,s=!1;if(a<0&&(s=!0,a=-a),a>.999999)o=1-i,r=s?-i:i;else{var l=Math.acos(a),u=1/Math.sin(l);o=Math.sin((1-i)*l)*u,r=s?-Math.sin(i*l)*u:Math.sin(i*l)*u}n.x=o*e._x+r*t._x,n.y=o*e._y+r*t._y,n.z=o*e._z+r*t._z,n.w=o*e._w+r*t._w},Quaternion.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o,s=2*a-3*o+1,l=-2*a+3*o,u=a-2*o+r,c=a-o;return new Quaternion(e._x*s+i._x*l+t._x*u+n._x*c,e._y*s+i._y*l+t._y*u+n._y*c,e._z*s+i._z*l+t._z*u+n._z*c,e._w*s+i._w*l+t._w*u+n._w*c)},Quaternion.Hermite1stDerivative=function(e,t,i,n,r){var o=Quaternion.Zero();return this.Hermite1stDerivativeToRef(e,t,i,n,r,o),o},Quaternion.Hermite1stDerivativeToRef=function(e,t,i,n,r,o){var a=r*r;o.x=6*(a-r)*e.x+(3*a-4*r+1)*t.x+6*(-a+r)*i.x+(3*a-2*r)*n.x,o.y=6*(a-r)*e.y+(3*a-4*r+1)*t.y+6*(-a+r)*i.y+(3*a-2*r)*n.y,o.z=6*(a-r)*e.z+(3*a-4*r+1)*t.z+6*(-a+r)*i.z+(3*a-2*r)*n.z,o.w=6*(a-r)*e.w+(3*a-4*r+1)*t.w+6*(-a+r)*i.w+(3*a-2*r)*n.w},Object.defineProperty(Matrix,"Use64Bits",{get:function(){return _0x17f3d8.MatrixUse64Bits},enumerable:!1,configurable:!0}),Object.defineProperty(Matrix.prototype,"m",{get:function(){return this._m},enumerable:!1,configurable:!0}),Matrix.prototype.markAsUpdated=function(){this.updateFlag=Matrix._UpdateFlagSeed++,this._isIdentity=!1,this._isIdentity3x2=!1,this._isIdentityDirty=!0,this._isIdentity3x2Dirty=!0},Matrix.prototype._updateIdentityStatus=function(e,t,i,n){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!0),this._isIdentity=e,this._isIdentity3x2=e||i,this._isIdentityDirty=!this._isIdentity&&t,this._isIdentity3x2Dirty=!this._isIdentity3x2&&n},Matrix.prototype.isIdentity=function(){if(this._isIdentityDirty){this._isIdentityDirty=!1;var e=this._m;this._isIdentity=1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]}return this._isIdentity},Matrix.prototype.isIdentityAs3x2=function(){return this._isIdentity3x2Dirty&&(this._isIdentity3x2Dirty=!1,1!==this._m[0]||1!==this._m[5]||1!==this._m[15]||0!==this._m[1]||0!==this._m[2]||0!==this._m[3]||0!==this._m[4]||0!==this._m[6]||0!==this._m[7]||0!==this._m[8]||0!==this._m[9]||0!==this._m[10]||0!==this._m[11]||0!==this._m[12]||0!==this._m[13]||0!==this._m[14]?this._isIdentity3x2=!1:this._isIdentity3x2=!0),this._isIdentity3x2},Matrix.prototype.determinant=function(){if(!0===this._isIdentity)return 1;var e=this._m,t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],f=e[12],p=e[13],_=e[14],m=e[15],g=h*m-_*d,x=c*m-p*d,v=c*_-p*h,y=u*m-f*d,$=u*_-h*f,b=u*p-f*c;return t*+(a*g-s*x+l*v)+i*-(o*g-s*y+l*$)+n*+(o*x-a*y+l*b)+r*-(o*v-a*$+s*b)},Matrix.prototype.toArray=function(){return this._m},Matrix.prototype.asArray=function(){return this._m},Matrix.prototype.invert=function(){return this.invertToRef(this),this},Matrix.prototype.reset=function(){return Matrix.FromValuesToRef(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,this),this._updateIdentityStatus(!1),this},Matrix.prototype.add=function(e){var t=new Matrix;return this.addToRef(e,t),t},Matrix.prototype.addToRef=function(e,t){for(var i=this._m,n=t._m,r=e.m,o=0;o<16;o++)n[o]=i[o]+r[o];return t.markAsUpdated(),this},Matrix.prototype.addToSelf=function(e){for(var t=this._m,i=e.m,n=0;n<16;n++)t[n]+=i[n];return this.markAsUpdated(),this},Matrix.prototype.invertToRef=function(e){if(!0===this._isIdentity)return Matrix.IdentityToRef(e),this;var t=this._m,i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15],x=d*g-m*f,v=h*g-_*f,y=h*m-_*d,$=c*g-p*f,b=c*m-d*p,T=c*_-p*h,C=+(s*x-l*v+u*y),S=-(a*x-l*$+u*b),w=+(a*v-s*$+u*T),E=-(a*y-s*b+l*T),P=i*C+n*S+r*w+o*E;if(0===P)return e.copyFrom(this),this;var A=1/P,L=l*g-m*u,M=s*g-_*u,R=s*m-_*l,O=a*g-p*u,I=a*m-p*l,D=a*_-p*s,B=l*f-d*u,N=s*f-h*u,F=s*d-h*l,U=a*f-c*u,G=a*d-c*l,z=a*h-c*s,V=-(n*x-r*v+o*y),k=+(i*x-r*$+o*b),W=-(i*v-n*$+o*T),H=+(i*y-n*b+r*T),q=+(n*L-r*M+o*R),j=-(i*L-r*O+o*I),Y=+(i*M-n*O+o*D),X=-(i*R-n*I+r*D),K=-(n*B-r*N+o*F),Q=+(i*B-r*U+o*G),Z=-(i*N-n*U+o*z),J=+(i*F-n*G+r*z);return Matrix.FromValuesToRef(C*A,V*A,q*A,K*A,S*A,k*A,j*A,Q*A,w*A,W*A,Y*A,Z*A,E*A,H*A,X*A,J*A,e),this},Matrix.prototype.addAtIndex=function(e,t){return this._m[e]+=t,this.markAsUpdated(),this},Matrix.prototype.multiplyAtIndex=function(e,t){return this._m[e]*=t,this.markAsUpdated(),this},Matrix.prototype.setTranslationFromFloats=function(e,t,i){return this._m[12]=e,this._m[13]=t,this._m[14]=i,this.markAsUpdated(),this},Matrix.prototype.addTranslationFromFloats=function(e,t,i){return this._m[12]+=e,this._m[13]+=t,this._m[14]+=i,this.markAsUpdated(),this},Matrix.prototype.setTranslation=function(e){return this.setTranslationFromFloats(e._x,e._y,e._z)},Matrix.prototype.getTranslation=function(){return new Vector3(this._m[12],this._m[13],this._m[14])},Matrix.prototype.getTranslationToRef=function(e){return e.x=this._m[12],e.y=this._m[13],e.z=this._m[14],this},Matrix.prototype.removeRotationAndScaling=function(){var e=this.m;return Matrix.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,e[12],e[13],e[14],e[15],this),this._updateIdentityStatus(0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]),this},Matrix.prototype.multiply=function(e){var t=new Matrix;return this.multiplyToRef(e,t),t},Matrix.prototype.copyFrom=function(e){e.copyToArray(this._m);var t=e;return this.updateFlag=t.updateFlag,this._updateIdentityStatus(t._isIdentity,t._isIdentityDirty,t._isIdentity3x2,t._isIdentity3x2Dirty),this},Matrix.prototype.copyToArray=function(e,t){void 0===t&&(t=0);var i=this._m;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],this},Matrix.prototype.multiplyToRef=function(e,t){return this._isIdentity?(t.copyFrom(e),this):e._isIdentity?(t.copyFrom(this),this):(this.multiplyToArray(e,t._m,0),t.markAsUpdated(),this)},Matrix.prototype.multiplyToArray=function(e,t,i){var n=this._m,r=e.m,o=n[0],a=n[1],s=n[2],l=n[3],u=n[4],c=n[5],h=n[6],d=n[7],f=n[8],p=n[9],_=n[10],m=n[11],g=n[12],x=n[13],v=n[14],y=n[15],$=r[0],b=r[1],T=r[2],C=r[3],S=r[4],w=r[5],E=r[6],P=r[7],A=r[8],L=r[9],M=r[10],R=r[11],O=r[12],I=r[13],D=r[14],B=r[15];return t[i]=o*$+a*S+s*A+l*O,t[i+1]=o*b+a*w+s*L+l*I,t[i+2]=o*T+a*E+s*M+l*D,t[i+3]=o*C+a*P+s*R+l*B,t[i+4]=u*$+c*S+h*A+d*O,t[i+5]=u*b+c*w+h*L+d*I,t[i+6]=u*T+c*E+h*M+d*D,t[i+7]=u*C+c*P+h*R+d*B,t[i+8]=f*$+p*S+_*A+m*O,t[i+9]=f*b+p*w+_*L+m*I,t[i+10]=f*T+p*E+_*M+m*D,t[i+11]=f*C+p*P+_*R+m*B,t[i+12]=g*$+x*S+v*A+y*O,t[i+13]=g*b+x*w+v*L+y*I,t[i+14]=g*T+x*E+v*M+y*D,t[i+15]=g*C+x*P+v*R+y*B,this},Matrix.prototype.equals=function(e){var t=e;if(!t)return!1;if((this._isIdentity||t._isIdentity)&&!this._isIdentityDirty&&!t._isIdentityDirty)return this._isIdentity&&t._isIdentity;var i=this.m,n=t.m;return i[0]===n[0]&&i[1]===n[1]&&i[2]===n[2]&&i[3]===n[3]&&i[4]===n[4]&&i[5]===n[5]&&i[6]===n[6]&&i[7]===n[7]&&i[8]===n[8]&&i[9]===n[9]&&i[10]===n[10]&&i[11]===n[11]&&i[12]===n[12]&&i[13]===n[13]&&i[14]===n[14]&&i[15]===n[15]},Matrix.prototype.clone=function(){var e=new Matrix;return e.copyFrom(this),e},Matrix.prototype.getClassName=function(){return"Matrix"},Matrix.prototype.getHashCode=function(){for(var e=_0x2cfc16(this._m[0]),t=1;t<16;t++)e=397*e^_0x2cfc16(this._m[t]);return e},Matrix.prototype.decomposeToTransformNode=function(e){return e.rotationQuaternion=e.rotationQuaternion||new Quaternion,this.decompose(e.scaling,e.rotationQuaternion,e.position)},Matrix.prototype.decompose=function(e,t,i,n){if(this._isIdentity)return i&&i.setAll(0),e&&e.setAll(1),t&&t.copyFromFloats(0,0,0,1),!0;var r=this._m;if(i&&i.copyFromFloats(r[12],r[13],r[14]),(e=e||MathTmp.Vector3[0]).x=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]),e.y=Math.sqrt(r[4]*r[4]+r[5]*r[5]+r[6]*r[6]),e.z=Math.sqrt(r[8]*r[8]+r[9]*r[9]+r[10]*r[10]),n){var o=n.scaling.x<0?-1:1,a=n.scaling.y<0?-1:1,s=n.scaling.z<0?-1:1;e.x*=o,e.y*=a,e.z*=s}else this.determinant()<=0&&(e.y*=-1);if(0===e._x||0===e._y||0===e._z)return t&&t.copyFromFloats(0,0,0,1),!1;if(t){var l=1/e._x,u=1/e._y,c=1/e._z;Matrix.FromValuesToRef(r[0]*l,r[1]*l,r[2]*l,0,r[4]*u,r[5]*u,r[6]*u,0,r[8]*c,r[9]*c,r[10]*c,0,0,0,0,1,MathTmp.Matrix[0]),Quaternion.FromRotationMatrixToRef(MathTmp.Matrix[0],t)}return!0},Matrix.prototype.getRow=function(e){if(e<0||e>3)return null;var t=4*e;return new Vector4(this._m[t+0],this._m[t+1],this._m[t+2],this._m[t+3])},Matrix.prototype.setRow=function(e,t){return this.setRowFromFloats(e,t.x,t.y,t.z,t.w)},Matrix.prototype.transpose=function(){return Matrix.Transpose(this)},Matrix.prototype.transposeToRef=function(e){return Matrix.TransposeToRef(this,e),this},Matrix.prototype.setRowFromFloats=function(e,t,i,n,r){if(e<0||e>3)return this;var o=4*e;return this._m[o+0]=t,this._m[o+1]=i,this._m[o+2]=n,this._m[o+3]=r,this.markAsUpdated(),this},Matrix.prototype.scale=function(e){var t=new Matrix;return this.scaleToRef(e,t),t},Matrix.prototype.scaleToRef=function(e,t){for(var i=0;i<16;i++)t._m[i]=this._m[i]*e;return t.markAsUpdated(),this},Matrix.prototype.scaleAndAddToRef=function(e,t){for(var i=0;i<16;i++)t._m[i]+=this._m[i]*e;return t.markAsUpdated(),this},Matrix.prototype.toNormalMatrix=function(e){var t=MathTmp.Matrix[0];this.invertToRef(t),t.transposeToRef(e);var i=e._m;Matrix.FromValuesToRef(i[0],i[1],i[2],0,i[4],i[5],i[6],0,i[8],i[9],i[10],0,0,0,0,1,e)},Matrix.prototype.getRotationMatrix=function(){var e=new Matrix;return this.getRotationMatrixToRef(e),e},Matrix.prototype.getRotationMatrixToRef=function(e){var t=MathTmp.Vector3[0];if(!this.decompose(t))return Matrix.IdentityToRef(e),this;var i=this._m,n=1/t._x,r=1/t._y,o=1/t._z;return Matrix.FromValuesToRef(i[0]*n,i[1]*n,i[2]*n,0,i[4]*r,i[5]*r,i[6]*r,0,i[8]*o,i[9]*o,i[10]*o,0,0,0,0,1,e),this},Matrix.prototype.toggleModelMatrixHandInPlace=function(){var e=this._m;e[2]*=-1,e[6]*=-1,e[8]*=-1,e[9]*=-1,e[14]*=-1,this.markAsUpdated()},Matrix.prototype.toggleProjectionMatrixHandInPlace=function(){var e=this._m;e[8]*=-1,e[9]*=-1,e[10]*=-1,e[11]*=-1,this.markAsUpdated()},Matrix.FromArray=function(e,t){void 0===t&&(t=0);var i=new Matrix;return Matrix.FromArrayToRef(e,t,i),i},Matrix.FromArrayToRef=function(e,t,i){for(var n=0;n<16;n++)i._m[n]=e[n+t];i.markAsUpdated()},Matrix.FromFloat32ArrayToRefScaled=function(e,t,i,n){for(var r=0;r<16;r++)n._m[r]=e[r+t]*i;n.markAsUpdated()},Object.defineProperty(Matrix,"IdentityReadOnly",{get:function(){return Matrix._IdentityReadOnly},enumerable:!1,configurable:!0}),Matrix.FromValuesToRef=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var g=m._m;g[0]=e,g[1]=t,g[2]=i,g[3]=n,g[4]=r,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=u,g[10]=c,g[11]=h,g[12]=d,g[13]=f,g[14]=p,g[15]=_,m.markAsUpdated()},Matrix.FromValues=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=new Matrix,g=m._m;return g[0]=e,g[1]=t,g[2]=i,g[3]=n,g[4]=r,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=u,g[10]=c,g[11]=h,g[12]=d,g[13]=f,g[14]=p,g[15]=_,m.markAsUpdated(),m},Matrix.Compose=function(e,t,i){var n=new Matrix;return Matrix.ComposeToRef(e,t,i,n),n},Matrix.ComposeToRef=function(e,t,i,n){var r=n._m,o=t._x,a=t._y,s=t._z,l=t._w,u=o+o,c=a+a,h=s+s,d=o*u,f=o*c,p=o*h,_=a*c,m=a*h,g=s*h,x=l*u,v=l*c,y=l*h,$=e._x,b=e._y,T=e._z;r[0]=(1-(_+g))*$,r[1]=(f+y)*$,r[2]=(p-v)*$,r[3]=0,r[4]=(f-y)*b,r[5]=(1-(d+g))*b,r[6]=(m+x)*b,r[7]=0,r[8]=(p+v)*T,r[9]=(m-x)*T,r[10]=(1-(d+_))*T,r[11]=0,r[12]=i._x,r[13]=i._y,r[14]=i._z,r[15]=1,n.markAsUpdated()},Matrix.Identity=function(){var e=Matrix.FromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return e._updateIdentityStatus(!0),e},Matrix.IdentityToRef=function(e){Matrix.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,e),e._updateIdentityStatus(!0)},Matrix.Zero=function(){var e=Matrix.FromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return e._updateIdentityStatus(!1),e},Matrix.RotationX=function(e){var t=new Matrix;return Matrix.RotationXToRef(e,t),t},Matrix.Invert=function(e){var t=new Matrix;return e.invertToRef(t),t},Matrix.RotationXToRef=function(e,t){var i=Math.sin(e),n=Math.cos(e);Matrix.FromValuesToRef(1,0,0,0,0,n,i,0,0,-i,n,0,0,0,0,1,t),t._updateIdentityStatus(1===n&&0===i)},Matrix.RotationY=function(e){var t=new Matrix;return Matrix.RotationYToRef(e,t),t},Matrix.RotationYToRef=function(e,t){var i=Math.sin(e),n=Math.cos(e);Matrix.FromValuesToRef(n,0,-i,0,0,1,0,0,i,0,n,0,0,0,0,1,t),t._updateIdentityStatus(1===n&&0===i)},Matrix.RotationZ=function(e){var t=new Matrix;return Matrix.RotationZToRef(e,t),t},Matrix.RotationZToRef=function(e,t){var i=Math.sin(e),n=Math.cos(e);Matrix.FromValuesToRef(n,i,0,0,-i,n,0,0,0,0,1,0,0,0,0,1,t),t._updateIdentityStatus(1===n&&0===i)},Matrix.RotationAxis=function(e,t){var i=new Matrix;return Matrix.RotationAxisToRef(e,t,i),i},Matrix.RotationAxisToRef=function(e,t,i){var n=Math.sin(-t),r=Math.cos(-t),o=1-r;e.normalize();var a=i._m;a[0]=e._x*e._x*o+r,a[1]=e._x*e._y*o-e._z*n,a[2]=e._x*e._z*o+e._y*n,a[3]=0,a[4]=e._y*e._x*o+e._z*n,a[5]=e._y*e._y*o+r,a[6]=e._y*e._z*o-e._x*n,a[7]=0,a[8]=e._z*e._x*o-e._y*n,a[9]=e._z*e._y*o+e._x*n,a[10]=e._z*e._z*o+r,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,i.markAsUpdated()},Matrix.RotationAlignToRef=function(e,t,i){var n=Vector3.Dot(t,e),r=i._m;if(n<-1+_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)r[0]=-1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0;else{var o=Vector3.Cross(t,e),a=1/(1+n);r[0]=o._x*o._x*a+n,r[1]=o._y*o._x*a-o._z,r[2]=o._z*o._x*a+o._y,r[3]=0,r[4]=o._x*o._y*a+o._z,r[5]=o._y*o._y*a+n,r[6]=o._z*o._y*a-o._x,r[7]=0,r[8]=o._x*o._z*a-o._y,r[9]=o._y*o._z*a+o._x,r[10]=o._z*o._z*a+n,r[11]=0}r[12]=0,r[13]=0,r[14]=0,r[15]=1,i.markAsUpdated()},Matrix.RotationYawPitchRoll=function(e,t,i){var n=new Matrix;return Matrix.RotationYawPitchRollToRef(e,t,i,n),n},Matrix.RotationYawPitchRollToRef=function(e,t,i,n){Quaternion.RotationYawPitchRollToRef(e,t,i,MathTmp.Quaternion[0]),MathTmp.Quaternion[0].toRotationMatrix(n)},Matrix.Scaling=function(e,t,i){var n=new Matrix;return Matrix.ScalingToRef(e,t,i,n),n},Matrix.ScalingToRef=function(e,t,i,n){Matrix.FromValuesToRef(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1,n),n._updateIdentityStatus(1===e&&1===t&&1===i)},Matrix.Translation=function(e,t,i){var n=new Matrix;return Matrix.TranslationToRef(e,t,i,n),n},Matrix.TranslationToRef=function(e,t,i,n){Matrix.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,e,t,i,1,n),n._updateIdentityStatus(0===e&&0===t&&0===i)},Matrix.Lerp=function(e,t,i){var n=new Matrix;return Matrix.LerpToRef(e,t,i,n),n},Matrix.LerpToRef=function(e,t,i,n){for(var r=n._m,o=e.m,a=t.m,s=0;s<16;s++)r[s]=o[s]*(1-i)+a[s]*i;n.markAsUpdated()},Matrix.DecomposeLerp=function(e,t,i){var n=new Matrix;return Matrix.DecomposeLerpToRef(e,t,i,n),n},Matrix.DecomposeLerpToRef=function(e,t,i,n){var r=MathTmp.Vector3[0],o=MathTmp.Quaternion[0],a=MathTmp.Vector3[1];e.decompose(r,o,a);var s=MathTmp.Vector3[2],l=MathTmp.Quaternion[1],u=MathTmp.Vector3[3];t.decompose(s,l,u);var c=MathTmp.Vector3[4];Vector3.LerpToRef(r,s,i,c);var h=MathTmp.Quaternion[2];Quaternion.SlerpToRef(o,l,i,h);var d=MathTmp.Vector3[5];Vector3.LerpToRef(a,u,i,d),Matrix.ComposeToRef(c,h,d,n)},Matrix.LookAtLH=function(e,t,i){var n=new Matrix;return Matrix.LookAtLHToRef(e,t,i,n),n},Matrix.LookAtLHToRef=function(e,t,i,n){var r=MathTmp.Vector3[0],o=MathTmp.Vector3[1],a=MathTmp.Vector3[2];t.subtractToRef(e,a),a.normalize(),Vector3.CrossToRef(i,a,r);var s=r.lengthSquared();0===s?r.x=1:r.normalizeFromLength(Math.sqrt(s)),Vector3.CrossToRef(a,r,o),o.normalize();var l=-Vector3.Dot(r,e),u=-Vector3.Dot(o,e),c=-Vector3.Dot(a,e);Matrix.FromValuesToRef(r._x,o._x,a._x,0,r._y,o._y,a._y,0,r._z,o._z,a._z,0,l,u,c,1,n)},Matrix.LookAtRH=function(e,t,i){var n=new Matrix;return Matrix.LookAtRHToRef(e,t,i,n),n},Matrix.LookAtRHToRef=function(e,t,i,n){var r=MathTmp.Vector3[0],o=MathTmp.Vector3[1],a=MathTmp.Vector3[2];e.subtractToRef(t,a),a.normalize(),Vector3.CrossToRef(i,a,r);var s=r.lengthSquared();0===s?r.x=1:r.normalizeFromLength(Math.sqrt(s)),Vector3.CrossToRef(a,r,o),o.normalize();var l=-Vector3.Dot(r,e),u=-Vector3.Dot(o,e),c=-Vector3.Dot(a,e);Matrix.FromValuesToRef(r._x,o._x,a._x,0,r._y,o._y,a._y,0,r._z,o._z,a._z,0,l,u,c,1,n)},Matrix.LookDirectionLH=function(e,t){var i=new Matrix;return Matrix.LookDirectionLHToRef(e,t,i),i},Matrix.LookDirectionLHToRef=function(e,t,i){var n=MathTmp.Vector3[0];n.copyFrom(e),n.scaleInPlace(-1);var r=MathTmp.Vector3[1];Vector3.CrossToRef(t,n,r),Matrix.FromValuesToRef(r._x,r._y,r._z,0,t._x,t._y,t._z,0,n._x,n._y,n._z,0,0,0,0,1,i)},Matrix.LookDirectionRH=function(e,t){var i=new Matrix;return Matrix.LookDirectionRHToRef(e,t,i),i},Matrix.LookDirectionRHToRef=function(e,t,i){var n=MathTmp.Vector3[2];Vector3.CrossToRef(t,e,n),Matrix.FromValuesToRef(n._x,n._y,n._z,0,t._x,t._y,t._z,0,e._x,e._y,e._z,0,0,0,0,1,i)},Matrix.OrthoLH=function(e,t,i,n,r){var o=new Matrix;return Matrix.OrthoLHToRef(e,t,i,n,o,r),o},Matrix.OrthoLHToRef=function(e,t,i,n,r,o){var a=2/e,s=2/t,l=2/(n-i),u=-(n+i)/(n-i);Matrix.FromValuesToRef(a,0,0,0,0,s,0,0,0,0,l,0,0,0,u,1,r),o&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(1===a&&1===s&&1===l&&0===u)},Matrix.OrthoOffCenterLH=function(e,t,i,n,r,o,a){var s=new Matrix;return Matrix.OrthoOffCenterLHToRef(e,t,i,n,r,o,s,a),s},Matrix.OrthoOffCenterLHToRef=function(e,t,i,n,r,o,a,s){var l=2/(t-e),u=2/(n-i),c=2/(o-r),h=-(o+r)/(o-r),d=(e+t)/(e-t),f=(n+i)/(i-n);Matrix.FromValuesToRef(l,0,0,0,0,u,0,0,0,0,c,0,d,f,h,1,a),s&&a.multiplyToRef(mtxConvertNDCToHalfZRange,a),a.markAsUpdated()},Matrix.OrthoOffCenterRH=function(e,t,i,n,r,o,a){var s=new Matrix;return Matrix.OrthoOffCenterRHToRef(e,t,i,n,r,o,s,a),s},Matrix.OrthoOffCenterRHToRef=function(e,t,i,n,r,o,a,s){Matrix.OrthoOffCenterLHToRef(e,t,i,n,r,o,a,s),a._m[10]*=-1},Matrix.PerspectiveLH=function(e,t,i,n,r,o){void 0===o&&(o=0);var a=new Matrix,s=2*i/e,l=2*i/t,u=(n+i)/(n-i),c=-2*n*i/(n-i),h=Math.tan(o);return Matrix.FromValuesToRef(s,0,0,0,0,l,0,h,0,0,u,1,0,0,c,0,a),r&&a.multiplyToRef(mtxConvertNDCToHalfZRange,a),a._updateIdentityStatus(!1),a},Matrix.PerspectiveFovLH=function(e,t,i,n,r,o,a){void 0===o&&(o=0),void 0===a&&(a=!1);var s=new Matrix;return Matrix.PerspectiveFovLHToRef(e,t,i,n,s,!0,r,o,a),s},Matrix.PerspectiveFovLHToRef=function(e,t,i,n,r,o,a,s,l){void 0===o&&(o=!0),void 0===s&&(s=0),void 0===l&&(l=!1);var u=i,c=n,h=1/Math.tan(.5*e),d=o?h/t:h,f=o?h:h*t,p=l&&0===u?-1:0!==c?(c+u)/(c-u):1,_=l&&0===u?2*c:0!==c?-2*c*u/(c-u):-2*u,m=Math.tan(s);Matrix.FromValuesToRef(d,0,0,0,0,f,0,m,0,0,p,1,0,0,_,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovReverseLHToRef=function(e,t,i,n,r,o,a,s){void 0===o&&(o=!0),void 0===s&&(s=0);var l=1/Math.tan(.5*e),u=o?l/t:l,c=o?l:l*t,h=Math.tan(s);Matrix.FromValuesToRef(u,0,0,0,0,c,0,h,0,0,-i,1,0,0,1,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovRH=function(e,t,i,n,r,o,a){void 0===o&&(o=0),void 0===a&&(a=!1);var s=new Matrix;return Matrix.PerspectiveFovRHToRef(e,t,i,n,s,!0,r,o,a),s},Matrix.PerspectiveFovRHToRef=function(e,t,i,n,r,o,a,s,l){void 0===o&&(o=!0),void 0===s&&(s=0),void 0===l&&(l=!1);var u=i,c=n,h=1/Math.tan(.5*e),d=o?h/t:h,f=o?h:h*t,p=l&&0===u?1:0!==c?-(c+u)/(c-u):-1,_=l&&0===u?2*c:0!==c?-2*c*u/(c-u):-2*u,m=Math.tan(s);Matrix.FromValuesToRef(d,0,0,0,0,f,0,m,0,0,p,-1,0,0,_,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovReverseRHToRef=function(e,t,i,n,r,o,a,s){void 0===o&&(o=!0),void 0===s&&(s=0);var l=1/Math.tan(.5*e),u=o?l/t:l,c=o?l:l*t,h=Math.tan(s);Matrix.FromValuesToRef(u,0,0,0,0,c,0,h,0,0,-i,-1,0,0,-1,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovWebVRToRef=function(e,t,i,n,r,o,a){void 0===r&&(r=!1),void 0===a&&(a=0);var s=r?-1:1,l=Math.tan(e.upDegrees*Math.PI/180),u=Math.tan(e.downDegrees*Math.PI/180),c=Math.tan(e.leftDegrees*Math.PI/180),h=Math.tan(e.rightDegrees*Math.PI/180),d=2/(c+h),f=2/(l+u),p=Math.tan(a),_=n._m;_[0]=d,_[1]=_[2]=_[3]=_[4]=0,_[5]=f,_[6]=0,_[7]=p,_[8]=(c-h)*d*.5,_[9]=-(l-u)*f*.5,_[10]=-i/(t-i),_[11]=1*s,_[12]=_[13]=_[15]=0,_[14]=-2*i*t/(i-t),o&&n.multiplyToRef(mtxConvertNDCToHalfZRange,n),n.markAsUpdated()},Matrix.GetFinalMatrix=function(e,t,i,n,r,o){var a=e.width,s=e.height,l=e.x,u=e.y,c=Matrix.FromValues(a/2,0,0,0,0,-s/2,0,0,0,0,o-r,0,l+a/2,s/2+u,r,1),h=MathTmp.Matrix[0];return t.multiplyToRef(i,h),h.multiplyToRef(n,h),h.multiply(c)},Matrix.GetAsMatrix2x2=function(e){var t=e.m,i=[t[0],t[1],t[4],t[5]];return _0x17f3d8.MatrixUse64Bits?i:new Float32Array(i)},Matrix.GetAsMatrix3x3=function(e){var t=e.m,i=[t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]];return _0x17f3d8.MatrixUse64Bits?i:new Float32Array(i)},Matrix.Transpose=function(e){var t=new Matrix;return Matrix.TransposeToRef(e,t),t},Matrix.TransposeToRef=function(e,t){var i=t._m,n=e.m;i[0]=n[0],i[1]=n[4],i[2]=n[8],i[3]=n[12],i[4]=n[1],i[5]=n[5],i[6]=n[9],i[7]=n[13],i[8]=n[2],i[9]=n[6],i[10]=n[10],i[11]=n[14],i[12]=n[3],i[13]=n[7],i[14]=n[11],i[15]=n[15],t.markAsUpdated(),t._updateIdentityStatus(e._isIdentity,e._isIdentityDirty)},Matrix.Reflection=function(e){var t=new Matrix;return Matrix.ReflectionToRef(e,t),t},Matrix.ReflectionToRef=function(e,t){e.normalize();var i=e.normal.x,n=e.normal.y,r=e.normal.z,o=-2*i,a=-2*n,s=-2*r;Matrix.FromValuesToRef(o*i+1,a*i,s*i,0,o*n,a*n+1,s*n,0,o*r,a*r,s*r+1,0,o*e.d,a*e.d,s*e.d,1,t)},Matrix.FromXYZAxesToRef=function(e,t,i,n){Matrix.FromValuesToRef(e._x,e._y,e._z,0,t._x,t._y,t._z,0,i._x,i._y,i._z,0,0,0,0,1,n)},Matrix.FromQuaternionToRef=function(e,t){var i=e._x*e._x,n=e._y*e._y,r=e._z*e._z,o=e._x*e._y,a=e._z*e._w,s=e._z*e._x,l=e._y*e._w,u=e._y*e._z,c=e._x*e._w;t._m[0]=1-2*(n+r),t._m[1]=2*(o+a),t._m[2]=2*(s-l),t._m[3]=0,t._m[4]=2*(o-a),t._m[5]=1-2*(r+i),t._m[6]=2*(u+c),t._m[7]=0,t._m[8]=2*(s+l),t._m[9]=2*(u-c),t._m[10]=1-2*(n+i),t._m[11]=0,t._m[12]=0,t._m[13]=0,t._m[14]=0,t._m[15]=1,t.markAsUpdated()},Matrix._UpdateFlagSeed=0,Matrix._IdentityReadOnly=Matrix.Identity(),MathTmp.Vector3=_0x41a72f.BuildTuple(11,Vector3.Zero),MathTmp.Matrix=_0x41a72f.BuildTuple(2,Matrix.Identity),MathTmp.Quaternion=_0x41a72f.BuildTuple(3,Quaternion.Zero),TmpVectors.Vector2=_0x41a72f.BuildTuple(3,Vector2.Zero),TmpVectors.Vector3=_0x41a72f.BuildTuple(13,Vector3.Zero),TmpVectors.Vector4=_0x41a72f.BuildTuple(3,Vector4.Zero),TmpVectors.Quaternion=_0x41a72f.BuildTuple(2,Quaternion.Zero),TmpVectors.Matrix=_0x41a72f.BuildTuple(8,Matrix.Identity);const mtxConvertNDCToHalfZRange=Matrix.FromValues(1,0,0,0,0,1,0,0,0,0,.5,0,0,0,.5,1);var _0xe00d73=(_0x3670ec=!0,function(e,t){var i=_0x3670ec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3670ec=!1,i}),_0x513fe1=_0xe00d73(void 0,(function(){return _0x513fe1.toString().search("(((.+)+)+)+$").toString().constructor(_0x513fe1).search("(((.+)+)+)+$")})),_0x3670ec;function _0x3e2f69(){this._ubo=void 0,this._name="",this._isValueDirty=!0,this._isTextureDirty=!1,this._uniformMap=void 0}_0x513fe1(),Object.defineProperties(_0x3e2f69.prototype,{GPUbuffer:{get:function(){return this._ubo.getBuffer()}},buffer:{get:function(){return this._ubo}},name:{get:function(){return this._name}},valueDirty:{set:function(e){return this._isValueDirty=e},get:function(){return this._isValueDirty}},textureDirty:{set:function(e){return this._isTextureDirty=e},get:function(){return this._isTextureDirty}},uniformMap:{get:function(){return this._uniformMap}}}),_0x3e2f69.prototype.update=function(e,t){},_0x3e2f69.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x3e2f69.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x3e2f69.writeCartesian2ToUBO=function(e,t,i){t.updateFloat2(e,i.x,i.y)},_0x3e2f69.writeCartesian3ToUBO=function(e,t,i){t.updateFloat3(e,i.x,i.y,i.z)},_0x3e2f69.writeCartesian4ToUBO=function(e,t,i){t.updateFloat4(e,i.x,i.y,i.z,i.w)};var _0x38f719=new Float32Array(16),_0xa3de78=new Matrix,_0x5e6b52=new Float32Array(9);function e$1V(){}function r$15(){(_0x3e2f69.call(this)||this)._name=_0x27131a.MESH}_0x3e2f69.writeMatrix3ToUBO=function(e,t,i){p$1e.toArray(i,_0x5e6b52),t.updateMatrix3x3(e,_0x5e6b52)},_0x3e2f69.writeMatrix4ToUBO=function(e,t,i){p$1d.toArray(i,_0x38f719),Matrix.FromArrayToRef(_0x38f719,0,_0xa3de78),t.updateMatrix(e,_0xa3de78)},_0x3e2f69.writeColorToUBO=function(e,t,i){t.updateFloat4(e,i.red,i.green,i.blue,i.alpha)},_0x3e2f69.setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x3e2f69.setTextureArrayToEffect=function(e,t,i){var n,r=t.length,o=[];for(n=0;n<r;++n){var a=t[n];o.push(a._inner._texture)}r>0&&e.setTextureArray(i,o)},_0x3e2f69.prototype.isDestroyed=function(){return!1},_0x3e2f69.prototype.destroy=function(){return this._ubo.dispose(),i$10(this)},e$1V.totalQueryCount=0,e$1V.thisFrameQueryCount=0,e$1V.maxQueryPerFrame=1,e$1V.updateArrayByQueryID=new Uint32Array(8192),e$1V.reset=function(){e$1V.thisFrameQueryCount=0;var e=e$1V.totalQueryCount/5;e$1V.maxQueryPerFrame=Math.ceil(e)},e$1V.createQuery=function(e){e$1V.totalQueryCount++,e$1V.updateArrayByQueryID[e]=0},e$1V.deleteQuery=function(e){e$1V.totalQueryCount--,e$1V.totalQueryCount<0&&(e$1V.totalQueryCount=0)},e$1V.canQueryThisFrame=function(e,t){return!(e$1V.thisFrameQueryCount>=e$1V.maxQueryPerFrame)&&!(t-e$1V.updateArrayByQueryID[e]<=5)},e$1V.updateQuery=function(e,t){e$1V.updateArrayByQueryID[e]=t},_0x3e2f69&&(r$15.__proto__=_0x3e2f69),r$15.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),r$15.prototype.constructor=_0x3e2f69,r$15.prototype._initUBO=function(e){this._ubo=new _0x2e52cb(e.engine,void 0,!1,_0x27131a.MESH,!1,!1),this._ubo.addUniform("uModelMatrix",16),this._ubo.create()},r$15.prototype.update=function(e,t){this._ubo||this._initUBO(e),_0x3e2f69.writeMatrix4ToUBO("uModelMatrix",this._ubo,t),this._ubo.update()},r$15.prototype.isDestroyed=function(){return!1},r$15.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};const D$_=8192;var M$18={OCCLUSION_TYPE_NONE:0,OCCLUSION_TYPE_OPTIMISTIC:1,OCCLUSION_TYPE_STRICT:2};function w$10(){this.occlusionInternalRetryCounter=0,this.isOcclusionQueryInProgress=!1,this.isOccluded=!1,this.occlusionRetryCount=-1,this.occlusionType=M$18.OCCLUSION_TYPE_OPTIMISTIC,this.forceRenderingWhenOccluded=!1}function i$$(e,t,i){this._occlusionDataStorage=new w$10,this._context=e,this._occlusionQuery=null,this._meshDrawCommand=t,this._occlusionMeshDrawCommand=i,this._matModel=new p$1d,this._relativeModelMatrix=new p$1d,this._createFrameId=-1}i$$.prototype.isOccluded=function(){return this._occlusionDataStorage.isOccluded},i$$.prototype.checkOcclusionQuery=function(e,t){var i=t.frameNumber;const n=this._occlusionDataStorage;if(n.occlusionType===M$18.OCCLUSION_TYPE_NONE)return n.isOccluded=!1,!1;this._prepare();var r=this._context.engine;if(this._occlusionDataStorage.isOcclusionQueryInProgress&&this._occlusionQuery){const e=r.isQueryResultAvailable(this._occlusionQuery,this),t=r.getQueryResultFrameID();if(e&&this._createFrameId<=t){const e=r.getQueryResult(this._occlusionQuery);n.isOcclusionQueryInProgress=!1,n.occlusionInternalRetryCounter=0,n.isOccluded=!(e>0)}else{if(!e)return!1;this._createFrameId>t&&(n.isOccluded=!1)}}if(this._occlusionQuery&&!e$1V.canQueryThisFrame(this._occlusionQuery,i))return n.isOccluded;var o=t.camera.position;if(this._meshDrawCommand.orientedBoundingBox){if(y$Z.isPointIn(this._meshDrawCommand.orientedBoundingBox,o))return n.isOccluded=!1,!1}else if(this._meshDrawCommand.boundingVolume.distanceSquaredTo(o)<0)return n.isOccluded=!1,!1;return null===this._occlusionQuery&&(this._occlusionQuery=r.createQuery(),e$1V.createQuery(this._occlusionQuery),this._createFrameId=r.frameId+5),this._occlusionQuery<D$_&&(this._occlusionMeshDrawCommand.occlusionQueryID=this._occlusionQuery,this._occlusionMeshDrawCommand.execute(this._context,e),this._occlusionDataStorage.isOcclusionQueryInProgress=!0,e$1V.updateQuery(this._occlusionQuery,i)),n.isOccluded},i$$.prototype._prepare=function(){this._meshUBO||(this._meshUBO=new r$15,this._occlusionMeshDrawCommand.addUniformBuffer(this._meshUBO),this._occlusionMeshDrawCommand.addUniformBuffer(this._context.uniformState.sceneUBO),this._meshDrawCommand.orientedBoundingBox?this._obbToWorldMatrix(this._meshDrawCommand.orientedBoundingBox):this._boundingVolumeToWorldMatrix(this._meshDrawCommand.boundingVolume),this.updateRelativeModelMatrix(),this._context._boundingBoxRenderer.initDrawCommand(this._occlusionMeshDrawCommand))};var d$1n=new o$1p;i$$.prototype.updateRelativeModelMatrix=function(){p$1d.clone(this._matModel,this._relativeModelMatrix),p$1d.getTranslation(this._matModel,d$1n),o$1p.subtract(d$1n,this._context.relativeOrigin,d$1n),p$1d.setTranslation(this._relativeModelMatrix,d$1n,this._relativeModelMatrix),this._meshUBO.update(this._context,this._relativeModelMatrix)};var a$Z=new e$1X;i$$.prototype._boundingVolumeToWorldMatrix=function(e){a$Z.translation=o$1p.clone(e.center,a$Z.translation);var t=2*e.radius;a$Z.scale.x=t,a$Z.scale.y=t,a$Z.scale.z=t,p$1d.fromTranslationRotationScale(a$Z,this._matModel)};var x$1b=new p$1e,S$X=new o$1p(2,2,2),l$1b,j$19,E$1g;function i$_(e){if(e=u$_(e,u$_.EMPTY_OBJECT),this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._cull=u$_(e.cull,!0),this._occlude=u$_(e.occlude,!0),this._modelMatrix=e.modelMatrix,this._primitiveType=u$_(e.primitiveType,W$18.TRIANGLES),this._vertexArray=e.vertexArray,this._count=e.count,this._offset=u$_(e.offset,0),this._instanceCount=u$_(e.instanceCount,0),this._shaderProgram=e.shaderProgram,this._uniformMap=e.uniformMap,this._renderState=e.renderState,this._framebuffer=e.framebuffer,this._pass=e.pass,this._executeInClosestFrustum=u$_(e.executeInClosestFrustum,!1),this._owner=e.owner,this._debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this._debugOverlappingFrustums=0,this._castShadows=u$_(e.castShadows,!1),this._receiveShadows=u$_(e.receiveShadows,!1),this._selectCastShadows=!1,this._pickId=e.pickId,this._pickOnly=u$_(e.pickOnly,!1),this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={},this._uniformBuffers=[],this._relativeOrigin=new o$1p,this._relativeModelMatrix=new p$1d,this._useRelativeOrigin=!0,this._fastBundleDirty=!0,e$2b(this._matModel)?p$1d.clone(this._matModel,this._relativeModelMatrix):p$1d.clone(p$1d.IDENTITY,this._relativeModelMatrix),this._activeFrameBufferID=-1,this._fastBundle={},this._s3mlayer=!1,this._occulsionQueryEnable=u$_(e.occulsionQueryEnable,!1),!e$2b(this._count)&&e$2b(this._vertexArray)){var t=this._vertexArray.indexBuffer;e$2b(t)&&(this._count=t.numberOfIndices)}this._vertexArrayID=-1,this._lastUseVertexArrayID=-1}function m$15(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function e$1U(e,t,i,n){this.red=u$_(e,1),this.green=u$_(t,1),this.blue=u$_(i,1),this.alpha=u$_(n,1)}i$$.prototype._obbToWorldMatrix=function(e){p$1e.fromArray(e.halfAxes,0,x$1b),this._matModel=p$1d.fromRotationTranslation(x$1b,e.center,this._matModel),p$1d.multiplyByScale(this._matModel,S$X,this._matModel)},i$$.prototype.isDestroyed=function(){return!1},i$$.prototype.destroy=function(){return this._occlusionQuery&&(this._context.engine.deleteQuery(this._occlusionQuery),this._occlusionQuery=null,this._occlusionDataStorage.isOcclusionQueryInProgress=!1,e$1V.deleteQuery(this._occlusionQuery)),this._meshUBO&&this._meshUBO.destroy(),this._occlusionMeshDrawCommand=null,i$10(this)},Object.defineProperties(i$_.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this.dirty=!0)}},occlude:{get:function(){return this._occlude},set:function(e){this._occlude!==e&&(this._occlude=e,this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){if(this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0,e$2b(e)?this._vertexArrayID=e.uniqueID:this._vertexArrayID=-1,!e$2b(this._count))){var t=e.indexBuffer;e$2b(t)&&(this._count=t.numberOfIndices)}}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0,this._fastBundleDirty=!0)}},castShadows:{get:function(){return this._castShadows},set:function(e){this._castShadows!==e&&(this._castShadows=e,this.dirty=!0)}},selectCastShadows:{get:function(){return this._selectCastShadows},set:function(e){this._selectCastShadows!==e&&(this._selectCastShadows=e,this.dirty=!0)}},receiveShadows:{get:function(){return this._receiveShadows},set:function(e){this._receiveShadows!==e&&(this._receiveShadows=e,this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this._combineUniformMapWithUBO(),this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return this._executeInClosestFrustum},set:function(e){this._executeInClosestFrustum!==e&&(this._executeInClosestFrustum=e,this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickOnly:{get:function(){return this._pickOnly},set:function(e){this._pickOnly!==e&&(this._pickOnly=e,this.dirty=!0)}},transformFeedback:{get:function(){return this._transformFeedback},set:function(e){this._transformFeedback=e}},fastBundleDirty:{get:function(){return this._fastBundleDirty}},s3mLayer:{get:function(){return this._s3mlayer},set:function(e){this._s3mlayer=e}},occlusionQueryEnable:{get:function(){return this._occulsionQueryEnable},set:function(e){this._occulsionQueryEnable=e}},useRelativeOrigin:{get:function(){return this._useRelativeOrigin},set:function(e){this._useRelativeOrigin=e}}}),i$_.prototype.addUniformBuffer=function(e){this._uniformBuffers.push(e),e.uniformMap&&(this._uniformMap=p$19(this._uniformMap,e.uniformMap))},i$_.prototype.removeAllUniformBuffer=function(){this._uniformBuffers=[]},i$_.shallowClone=function(e,t){if(e$2b(e))return e$2b(t)||(t=new i$_),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._cull=e._cull,t._occlude=e._occlude,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._uniformBuffers=e._uniformBuffers,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._executeInClosestFrustum=e._executeInClosestFrustum,t._owner=e._owner,t._debugShowBoundingVolume=e._debugShowBoundingVolume,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._castShadows=e._castShadows,t._receiveShadows=e._receiveShadows,t._selectCastShadows=e._selectCastShadows,t._pickId=e._pickId,t._pickOnly=e._pickOnly,t._pointCloudEyeDomeLighting=e._pointCloudEyeDomeLighting,t._transformFeedback=e._transformFeedback,t._relativeOrigin=e._relativeOrigin,t._relativeModelMatrix=e._relativeModelMatrix,t._occlusionMesh=e._occlusionMesh,t._occulsionQueryEnable=e._occulsionQueryEnable,t._useRelativeOrigin=e._useRelativeOrigin,t.dirty=!0,t.lastDirtyTime=0,t._vertexArrayID=e._vertexArrayID,t._activeFrameBufferID=e._activeFrameBufferID,t},i$_.prototype.execute=function(e,t){e.draw(this,t)},i$_.prototype.setActiveFrameBufferID=function(e){this._activeFrameBufferID=e},i$_.prototype.setFastBundle=function(e){this._fastBundle[this._activeFrameBufferID]=e,this._fastBundleDirty=!1},i$_.prototype.removeAllFastBundleAndBindGroups=function(){this.bindGroups=void 0,this._fastBundle={}},i$_.prototype.getActiveBundle=function(){return this._fastBundle[this._activeFrameBufferID]},i$_.prototype.checkOcclusionQuery=function(e,t,i){return!(!e.webgpu||!this._occulsionQueryEnable)&&(this._occlusionMesh||(this._occlusionMesh=new i$$(e,this,new i$_)),this._occlusionMesh.checkOcclusionQuery(t,i))},i$_.prototype.isOccluded=function(){return!(!this._occulsionQueryEnable||!this._occlusionMesh)&&this._occlusionMesh.isOccluded()},i$_.prototype._combineUniformMapWithUBO=function(){for(var e=0;e<this._uniformBuffers.length;e++){var t=this._uniformBuffers[e];t.uniformMap&&(this._uniformMap=p$19(this._uniformMap,t.uniformMap))}},e$1U.fromCartesian4=function(e,t){return o$1q.typeOf.object("cartesian",e),e$2b(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new e$1U(e.x,e.y,e.z,e.w)},e$1U.fromBytes=function(e,t,i,n,r){return e=e$1U.byteToFloat(u$_(e,255)),t=e$1U.byteToFloat(u$_(t,255)),i=e$1U.byteToFloat(u$_(i,255)),n=e$1U.byteToFloat(u$_(n,255)),e$2b(r)?(r.red=e,r.green=t,r.blue=i,r.alpha=n,r):new e$1U(e,t,i,n)},e$1U.fromAlpha=function(e,t,i){return o$1q.typeOf.object("color",e),o$1q.typeOf.number("alpha",t),e$2b(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=t,i):new e$1U(e.red,e.green,e.blue,t)},s$Y.supportsTypedArrays()&&(l$1b=new ArrayBuffer(4),j$19=new Uint32Array(l$1b),E$1g=new Uint8Array(l$1b)),e$1U.fromRgba=function(e,t){return j$19[0]=e,e$1U.fromBytes(E$1g[0],E$1g[1],E$1g[2],E$1g[3],t)},e$1U.byteToRgba=function(e,t,i,n){return E$1g[0]=e,E$1g[1]=t,E$1g[2]=i,E$1g[3]=n,j$19[0]},e$1U.fromHsl=function(e,t,i,n,r){e=u$_(e,0)%1,t=u$_(t,0),i=u$_(i,0),n=u$_(n,1);var o=i,a=i,s=i;if(0!==t){var l,u=2*i-(l=i<.5?i*(1+t):i+t-i*t);o=m$15(u,l,e+1/3),a=m$15(u,l,e),s=m$15(u,l,e-1/3)}return e$2b(r)?(r.red=o,r.green=a,r.blue=s,r.alpha=n,r):new e$1U(o,a,s,n)},e$1U.fromRandom=function(e,t){var i=(e=u$_(e,u$_.EMPTY_OBJECT)).red;if(!e$2b(i)){var n=u$_(e.minimumRed,0),r=u$_(e.maximumRed,1);o$1q.typeOf.number.lessThanOrEquals("minimumRed",n,r),i=n+e$2a.nextRandomNumber()*(r-n)}var o=e.green;if(!e$2b(o)){var a=u$_(e.minimumGreen,0),s=u$_(e.maximumGreen,1);o$1q.typeOf.number.lessThanOrEquals("minimumGreen",a,s),o=a+e$2a.nextRandomNumber()*(s-a)}var l=e.blue;if(!e$2b(l)){var u=u$_(e.minimumBlue,0),c=u$_(e.maximumBlue,1);o$1q.typeOf.number.lessThanOrEquals("minimumBlue",u,c),l=u+e$2a.nextRandomNumber()*(c-u)}var h=e.alpha;if(!e$2b(h)){var d=u$_(e.minimumAlpha,0),f=u$_(e.maximumAlpha,1);o$1q.typeOf.number.lessThanOrEquals("minumumAlpha",d,f),h=d+e$2a.nextRandomNumber()*(f-d)}return e$2b(t)?(t.red=i,t.green=o,t.blue=l,t.alpha=h,t):new e$1U(i,o,l,h)};var R$10=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,L$19=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,B$$=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,T$16=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;e$1U.fromCssColorString=function(e,t){o$1q.typeOf.string("color",e),e$2b(t)||(t=new e$1U);var i=e$1U[e.toUpperCase()];if(e$2b(i))return e$1U.clone(i,t),t;var n=R$10.exec(e);return null!==n?(t.red=parseInt(n[1],16)/15,t.green=parseInt(n[2],16)/15,t.blue=parseInt(n[3],16)/15,t.alpha=1,t):null!==(n=L$19.exec(e))?(t.red=parseInt(n[1],16)/255,t.green=parseInt(n[2],16)/255,t.blue=parseInt(n[3],16)/255,t.alpha=1,t):null!==(n=B$$.exec(e))?(t.red=parseFloat(n[1])/("%"===n[1].substr(-1)?100:255),t.green=parseFloat(n[2])/("%"===n[2].substr(-1)?100:255),t.blue=parseFloat(n[3])/("%"===n[3].substr(-1)?100:255),t.alpha=parseFloat(u$_(n[4],"1.0")),t):null!==(n=T$16.exec(e))?e$1U.fromHsl(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(u$_(n[4],"1.0")),t):t=void 0},e$1U.packedLength=4,e$1U.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.red,t[i++]=e.green,t[i++]=e.blue,t[i]=e.alpha,t},e$1U.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new e$1U),i.red=e[t++],i.green=e[t++],i.blue=e[t++],i.alpha=e[t],i},e$1U.byteToFloat=function(e){return e/255},e$1U.floatToByte=function(e){return 1===e?255:256*e|0},e$1U.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new e$1U(e.red,e.green,e.blue,e.alpha)},e$1U.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},e$1U.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},e$1U.prototype.clone=function(e){return e$1U.clone(this,e)},e$1U.prototype.equals=function(e){return e$1U.equals(this,e)},e$1U.prototype.equalsEpsilon=function(e,t){return this===e||e$2b(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},e$1U.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},e$1U.prototype.toCssColorString=function(){var e=e$1U.floatToByte(this.red),t=e$1U.floatToByte(this.green),i=e$1U.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},e$1U.prototype.toBytes=function(e){var t=e$1U.floatToByte(this.red),i=e$1U.floatToByte(this.green),n=e$1U.floatToByte(this.blue),r=e$1U.floatToByte(this.alpha);return e$2b(e)?(e[0]=t,e[1]=i,e[2]=n,e[3]=r,e):[t,i,n,r]},e$1U.prototype.toRgba=function(){return E$1g[0]=e$1U.floatToByte(this.red),E$1g[1]=e$1U.floatToByte(this.green),E$1g[2]=e$1U.floatToByte(this.blue),E$1g[3]=e$1U.floatToByte(this.alpha),j$19[0]},e$1U.prototype.brighten=function(e,t){return o$1q.typeOf.number("magnitude",e),o$1q.typeOf.number.greaterThanOrEquals("magnitude",e,0),o$1q.typeOf.object("result",t),e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},e$1U.prototype.darken=function(e,t){return o$1q.typeOf.number("magnitude",e),o$1q.typeOf.number.greaterThanOrEquals("magnitude",e,0),o$1q.typeOf.object("result",t),e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},e$1U.prototype.withAlpha=function(e,t){return e$1U.fromAlpha(this,e,t)},e$1U.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},e$1U.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},e$1U.multiply=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},e$1U.divide=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},e$1U.mod=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},e$1U.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),n.red=e$2a.lerp(e.red,t.red,i),n.green=e$2a.lerp(e.green,t.green,i),n.blue=e$2a.lerp(e.blue,t.blue,i),n.alpha=e$2a.lerp(e.alpha,t.alpha,i),n},e$1U.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("color",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},e$1U.divideByScalar=function(e,t,i){return o$1q.typeOf.object("color",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},e$1U.ALICEBLUE=Object.freeze(e$1U.fromCssColorString("#F0F8FF")),e$1U.ANTIQUEWHITE=Object.freeze(e$1U.fromCssColorString("#FAEBD7")),e$1U.AQUA=Object.freeze(e$1U.fromCssColorString("#00FFFF")),e$1U.AQUAMARINE=Object.freeze(e$1U.fromCssColorString("#7FFFD4")),e$1U.AZURE=Object.freeze(e$1U.fromCssColorString("#F0FFFF")),e$1U.BEIGE=Object.freeze(e$1U.fromCssColorString("#F5F5DC")),e$1U.BISQUE=Object.freeze(e$1U.fromCssColorString("#FFE4C4")),e$1U.BLACK=Object.freeze(e$1U.fromCssColorString("#000000")),e$1U.BLANCHEDALMOND=Object.freeze(e$1U.fromCssColorString("#FFEBCD")),e$1U.BLUE=Object.freeze(e$1U.fromCssColorString("#0000FF")),e$1U.BLUEVIOLET=Object.freeze(e$1U.fromCssColorString("#8A2BE2")),e$1U.BROWN=Object.freeze(e$1U.fromCssColorString("#A52A2A")),e$1U.BURLYWOOD=Object.freeze(e$1U.fromCssColorString("#DEB887")),e$1U.CADETBLUE=Object.freeze(e$1U.fromCssColorString("#5F9EA0")),e$1U.CHARTREUSE=Object.freeze(e$1U.fromCssColorString("#7FFF00")),e$1U.CHOCOLATE=Object.freeze(e$1U.fromCssColorString("#D2691E")),e$1U.CORAL=Object.freeze(e$1U.fromCssColorString("#FF7F50")),e$1U.CORNFLOWERBLUE=Object.freeze(e$1U.fromCssColorString("#6495ED")),e$1U.CORNSILK=Object.freeze(e$1U.fromCssColorString("#FFF8DC")),e$1U.CRIMSON=Object.freeze(e$1U.fromCssColorString("#DC143C")),e$1U.CYAN=Object.freeze(e$1U.fromCssColorString("#00FFFF")),e$1U.DARKBLUE=Object.freeze(e$1U.fromCssColorString("#00008B")),e$1U.DARKCYAN=Object.freeze(e$1U.fromCssColorString("#008B8B")),e$1U.DARKGOLDENROD=Object.freeze(e$1U.fromCssColorString("#B8860B")),e$1U.DARKGRAY=Object.freeze(e$1U.fromCssColorString("#A9A9A9")),e$1U.DARKGREEN=Object.freeze(e$1U.fromCssColorString("#006400")),e$1U.DARKGREY=e$1U.DARKGRAY,e$1U.DARKKHAKI=Object.freeze(e$1U.fromCssColorString("#BDB76B")),e$1U.DARKMAGENTA=Object.freeze(e$1U.fromCssColorString("#8B008B")),e$1U.DARKOLIVEGREEN=Object.freeze(e$1U.fromCssColorString("#556B2F")),e$1U.DARKORANGE=Object.freeze(e$1U.fromCssColorString("#FF8C00")),e$1U.DARKORCHID=Object.freeze(e$1U.fromCssColorString("#9932CC")),e$1U.DARKRED=Object.freeze(e$1U.fromCssColorString("#8B0000")),e$1U.DARKSALMON=Object.freeze(e$1U.fromCssColorString("#E9967A")),e$1U.DARKSEAGREEN=Object.freeze(e$1U.fromCssColorString("#8FBC8F")),e$1U.DARKSLATEBLUE=Object.freeze(e$1U.fromCssColorString("#483D8B")),e$1U.DARKSLATEGRAY=Object.freeze(e$1U.fromCssColorString("#2F4F4F")),e$1U.DARKSLATEGREY=e$1U.DARKSLATEGRAY,e$1U.DARKTURQUOISE=Object.freeze(e$1U.fromCssColorString("#00CED1")),e$1U.DARKVIOLET=Object.freeze(e$1U.fromCssColorString("#9400D3")),e$1U.DEEPPINK=Object.freeze(e$1U.fromCssColorString("#FF1493")),e$1U.DEEPSKYBLUE=Object.freeze(e$1U.fromCssColorString("#00BFFF")),e$1U.DIMGRAY=Object.freeze(e$1U.fromCssColorString("#696969")),e$1U.DIMGREY=e$1U.DIMGRAY,e$1U.DODGERBLUE=Object.freeze(e$1U.fromCssColorString("#1E90FF")),e$1U.FIREBRICK=Object.freeze(e$1U.fromCssColorString("#B22222")),e$1U.FLORALWHITE=Object.freeze(e$1U.fromCssColorString("#FFFAF0")),e$1U.FORESTGREEN=Object.freeze(e$1U.fromCssColorString("#228B22")),e$1U.FUCHSIA=Object.freeze(e$1U.fromCssColorString("#FF00FF")),e$1U.GAINSBORO=Object.freeze(e$1U.fromCssColorString("#DCDCDC")),e$1U.GHOSTWHITE=Object.freeze(e$1U.fromCssColorString("#F8F8FF")),e$1U.GOLD=Object.freeze(e$1U.fromCssColorString("#FFD700")),e$1U.GOLDENROD=Object.freeze(e$1U.fromCssColorString("#DAA520")),e$1U.GRAY=Object.freeze(e$1U.fromCssColorString("#808080")),e$1U.GREEN=Object.freeze(e$1U.fromCssColorString("#008000")),e$1U.GREENYELLOW=Object.freeze(e$1U.fromCssColorString("#ADFF2F")),e$1U.GREY=e$1U.GRAY,e$1U.HONEYDEW=Object.freeze(e$1U.fromCssColorString("#F0FFF0")),e$1U.HOTPINK=Object.freeze(e$1U.fromCssColorString("#FF69B4")),e$1U.INDIANRED=Object.freeze(e$1U.fromCssColorString("#CD5C5C")),e$1U.INDIGO=Object.freeze(e$1U.fromCssColorString("#4B0082")),e$1U.IVORY=Object.freeze(e$1U.fromCssColorString("#FFFFF0")),e$1U.KHAKI=Object.freeze(e$1U.fromCssColorString("#F0E68C")),e$1U.LAVENDER=Object.freeze(e$1U.fromCssColorString("#E6E6FA")),e$1U.LAVENDAR_BLUSH=Object.freeze(e$1U.fromCssColorString("#FFF0F5")),e$1U.LAWNGREEN=Object.freeze(e$1U.fromCssColorString("#7CFC00")),e$1U.LEMONCHIFFON=Object.freeze(e$1U.fromCssColorString("#FFFACD")),e$1U.LIGHTBLUE=Object.freeze(e$1U.fromCssColorString("#ADD8E6")),e$1U.LIGHTCORAL=Object.freeze(e$1U.fromCssColorString("#F08080")),e$1U.LIGHTCYAN=Object.freeze(e$1U.fromCssColorString("#E0FFFF")),e$1U.LIGHTGOLDENRODYELLOW=Object.freeze(e$1U.fromCssColorString("#FAFAD2")),e$1U.LIGHTGRAY=Object.freeze(e$1U.fromCssColorString("#D3D3D3")),e$1U.LIGHTGREEN=Object.freeze(e$1U.fromCssColorString("#90EE90")),e$1U.LIGHTGREY=e$1U.LIGHTGRAY,e$1U.LIGHTPINK=Object.freeze(e$1U.fromCssColorString("#FFB6C1")),e$1U.LIGHTSEAGREEN=Object.freeze(e$1U.fromCssColorString("#20B2AA")),e$1U.LIGHTSKYBLUE=Object.freeze(e$1U.fromCssColorString("#87CEFA")),e$1U.LIGHTSLATEGRAY=Object.freeze(e$1U.fromCssColorString("#778899")),e$1U.LIGHTSLATEGREY=e$1U.LIGHTSLATEGRAY,e$1U.LIGHTSTEELBLUE=Object.freeze(e$1U.fromCssColorString("#B0C4DE")),e$1U.LIGHTYELLOW=Object.freeze(e$1U.fromCssColorString("#FFFFE0")),e$1U.LIME=Object.freeze(e$1U.fromCssColorString("#00FF00")),e$1U.LIMEGREEN=Object.freeze(e$1U.fromCssColorString("#32CD32")),e$1U.LINEN=Object.freeze(e$1U.fromCssColorString("#FAF0E6")),e$1U.MAGENTA=Object.freeze(e$1U.fromCssColorString("#FF00FF")),e$1U.MAROON=Object.freeze(e$1U.fromCssColorString("#800000")),e$1U.MEDIUMAQUAMARINE=Object.freeze(e$1U.fromCssColorString("#66CDAA")),e$1U.MEDIUMBLUE=Object.freeze(e$1U.fromCssColorString("#0000CD")),e$1U.MEDIUMORCHID=Object.freeze(e$1U.fromCssColorString("#BA55D3")),e$1U.MEDIUMPURPLE=Object.freeze(e$1U.fromCssColorString("#9370DB")),e$1U.MEDIUMSEAGREEN=Object.freeze(e$1U.fromCssColorString("#3CB371")),e$1U.MEDIUMSLATEBLUE=Object.freeze(e$1U.fromCssColorString("#7B68EE")),e$1U.MEDIUMSPRINGGREEN=Object.freeze(e$1U.fromCssColorString("#00FA9A")),e$1U.MEDIUMTURQUOISE=Object.freeze(e$1U.fromCssColorString("#48D1CC")),e$1U.MEDIUMVIOLETRED=Object.freeze(e$1U.fromCssColorString("#C71585")),e$1U.MIDNIGHTBLUE=Object.freeze(e$1U.fromCssColorString("#191970")),e$1U.MINTCREAM=Object.freeze(e$1U.fromCssColorString("#F5FFFA")),e$1U.MISTYROSE=Object.freeze(e$1U.fromCssColorString("#FFE4E1")),e$1U.MOCCASIN=Object.freeze(e$1U.fromCssColorString("#FFE4B5")),e$1U.NAVAJOWHITE=Object.freeze(e$1U.fromCssColorString("#FFDEAD")),e$1U.NAVY=Object.freeze(e$1U.fromCssColorString("#000080")),e$1U.OLDLACE=Object.freeze(e$1U.fromCssColorString("#FDF5E6")),e$1U.OLIVE=Object.freeze(e$1U.fromCssColorString("#808000")),e$1U.OLIVEDRAB=Object.freeze(e$1U.fromCssColorString("#6B8E23")),e$1U.ORANGE=Object.freeze(e$1U.fromCssColorString("#FFA500")),e$1U.ORANGERED=Object.freeze(e$1U.fromCssColorString("#FF4500")),e$1U.ORCHID=Object.freeze(e$1U.fromCssColorString("#DA70D6")),e$1U.PALEGOLDENROD=Object.freeze(e$1U.fromCssColorString("#EEE8AA")),e$1U.PALEGREEN=Object.freeze(e$1U.fromCssColorString("#98FB98")),e$1U.PALETURQUOISE=Object.freeze(e$1U.fromCssColorString("#AFEEEE")),e$1U.PALEVIOLETRED=Object.freeze(e$1U.fromCssColorString("#DB7093")),e$1U.PAPAYAWHIP=Object.freeze(e$1U.fromCssColorString("#FFEFD5")),e$1U.PEACHPUFF=Object.freeze(e$1U.fromCssColorString("#FFDAB9")),e$1U.PERU=Object.freeze(e$1U.fromCssColorString("#CD853F")),e$1U.PINK=Object.freeze(e$1U.fromCssColorString("#FFC0CB")),e$1U.PLUM=Object.freeze(e$1U.fromCssColorString("#DDA0DD")),e$1U.POWDERBLUE=Object.freeze(e$1U.fromCssColorString("#B0E0E6")),e$1U.PURPLE=Object.freeze(e$1U.fromCssColorString("#800080")),e$1U.RED=Object.freeze(e$1U.fromCssColorString("#FF0000")),e$1U.ROSYBROWN=Object.freeze(e$1U.fromCssColorString("#BC8F8F")),e$1U.ROYALBLUE=Object.freeze(e$1U.fromCssColorString("#4169E1")),e$1U.SADDLEBROWN=Object.freeze(e$1U.fromCssColorString("#8B4513")),e$1U.SALMON=Object.freeze(e$1U.fromCssColorString("#FA8072")),e$1U.SANDYBROWN=Object.freeze(e$1U.fromCssColorString("#F4A460")),e$1U.SEAGREEN=Object.freeze(e$1U.fromCssColorString("#2E8B57")),e$1U.SEASHELL=Object.freeze(e$1U.fromCssColorString("#FFF5EE")),e$1U.SIENNA=Object.freeze(e$1U.fromCssColorString("#A0522D")),e$1U.SILVER=Object.freeze(e$1U.fromCssColorString("#C0C0C0")),e$1U.SKYBLUE=Object.freeze(e$1U.fromCssColorString("#87CEEB")),e$1U.SLATEBLUE=Object.freeze(e$1U.fromCssColorString("#6A5ACD")),e$1U.SLATEGRAY=Object.freeze(e$1U.fromCssColorString("#708090")),e$1U.SLATEGREY=e$1U.SLATEGRAY,e$1U.SNOW=Object.freeze(e$1U.fromCssColorString("#FFFAFA")),e$1U.SPRINGGREEN=Object.freeze(e$1U.fromCssColorString("#00FF7F")),e$1U.STEELBLUE=Object.freeze(e$1U.fromCssColorString("#4682B4")),e$1U.TAN=Object.freeze(e$1U.fromCssColorString("#D2B48C")),e$1U.TEAL=Object.freeze(e$1U.fromCssColorString("#008080")),e$1U.THISTLE=Object.freeze(e$1U.fromCssColorString("#D8BFD8")),e$1U.TOMATO=Object.freeze(e$1U.fromCssColorString("#FF6347")),e$1U.TURQUOISE=Object.freeze(e$1U.fromCssColorString("#40E0D0")),e$1U.VIOLET=Object.freeze(e$1U.fromCssColorString("#EE82EE")),e$1U.WHEAT=Object.freeze(e$1U.fromCssColorString("#F5DEB3")),e$1U.WHITE=Object.freeze(e$1U.fromCssColorString("#FFFFFF")),e$1U.WHITESMOKE=Object.freeze(e$1U.fromCssColorString("#F5F5F5")),e$1U.YELLOW=Object.freeze(e$1U.fromCssColorString("#FFFF00")),e$1U.YELLOWGREEN=Object.freeze(e$1U.fromCssColorString("#9ACD32")),e$1U.TRANSPARENT=Object.freeze(new e$1U(0,0,0,0));var e$1T={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:10,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1,_uniformBufferOffsetAlignment:256,_maxUniformBufferBinding:36,_maxArrayTextureLayers:256};function c$15(e){if("object"!=typeof e||null===e)return e;for(var t,i=Object.keys(e),n=0;n<i.length;n++)t=i[n],e.hasOwnProperty(t)&&"_applyFunctions"!==t&&(e[t]=c$15(e[t]));return Object.freeze(e)}Object.defineProperties(e$1T,{maximumCombinedTextureImageUnits:{get:function(){return e$1T._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return e$1T._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return e$1T._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return e$1T._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return e$1T._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return e$1T._maximumTextureSize}},maximumVaryingVectors:{get:function(){return e$1T._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return e$1T._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return e$1T._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return e$1T._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return e$1T._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return e$1T._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return e$1T._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return e$1T._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return e$1T._maximumViewportWidth}},maximumViewportHeight:{get:function(){return e$1T._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return e$1T._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return e$1T._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return e$1T._maximumColorAttachments}},highpFloatSupported:{get:function(){return e$1T._highpFloatSupported}},highpIntSupported:{get:function(){return e$1T._highpIntSupported}},uniformBufferOffsetAlignment:{get:function(){return e$1T._uniformBufferOffsetAlignment}},maxUniformBufferBinding:{get:function(){return e$1T._maxUniformBufferBinding}},maxArrayTextureLayers:{get:function(){return e$1T._maxArrayTextureLayers}}});var _0x5ed35c=(_0x5aacde=!0,function(e,t){var i=_0x5aacde?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5aacde=!1,i}),_0x27f060=_0x5ed35c(void 0,(function(){return _0x27f060.toString().search("(((.+)+)+)+$").toString().constructor(_0x27f060).search("(((.+)+)+)+$")})),_0x5aacde;function _0x354cf8(){}_0x27f060(),_0x354cf8.ALPHA_DISABLE=0,_0x354cf8.ALPHA_ADD=1,_0x354cf8.ALPHA_COMBINE=2,_0x354cf8.ALPHA_SUBTRACT=3,_0x354cf8.ALPHA_MULTIPLY=4,_0x354cf8.ALPHA_MAXIMIZED=5,_0x354cf8.ALPHA_ONEONE=6,_0x354cf8.ALPHA_PREMULTIPLIED=7,_0x354cf8.ALPHA_PREMULTIPLIED_PORTERDUFF=8,_0x354cf8.ALPHA_INTERPOLATE=9,_0x354cf8.ALPHA_SCREENMODE=10,_0x354cf8.ALPHA_ONEONE_ONEONE=11,_0x354cf8.ALPHA_ALPHATOCOLOR=12,_0x354cf8.ALPHA_REVERSEONEMINUS=13,_0x354cf8.ALPHA_SRC_DSTONEMINUSSRCALPHA=14,_0x354cf8.ALPHA_ONEONE_ONEZERO=15,_0x354cf8.ALPHA_EXCLUSION=16,_0x354cf8.ALPHA_LAYER_ACCUMULATE=17,_0x354cf8.ALPHA_EQUATION_ADD=0,_0x354cf8.ALPHA_EQUATION_SUBSTRACT=1,_0x354cf8.ALPHA_EQUATION_REVERSE_SUBTRACT=2,_0x354cf8.ALPHA_EQUATION_MAX=3,_0x354cf8.ALPHA_EQUATION_MIN=4,_0x354cf8.ALPHA_EQUATION_DARKEN=5,_0x354cf8.DELAYLOADSTATE_NONE=0,_0x354cf8.DELAYLOADSTATE_LOADED=1,_0x354cf8.DELAYLOADSTATE_LOADING=2,_0x354cf8.DELAYLOADSTATE_NOTLOADED=4,_0x354cf8.NEVER=512,_0x354cf8.ALWAYS=519,_0x354cf8.LESS=513,_0x354cf8.EQUAL=514,_0x354cf8.LEQUAL=515,_0x354cf8.GREATER=516,_0x354cf8.GEQUAL=518,_0x354cf8.NOTEQUAL=517,_0x354cf8.KEEP=7680,_0x354cf8.ZERO=0,_0x354cf8.REPLACE=7681,_0x354cf8.INCR=7682,_0x354cf8.DECR=7683,_0x354cf8.INVERT=5386,_0x354cf8.INCR_WRAP=34055,_0x354cf8.DECR_WRAP=34056,_0x354cf8.FRONT=0,_0x354cf8.BACK=1,_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE=0,_0x354cf8.TEXTURE_WRAP_ADDRESSMODE=1,_0x354cf8.TEXTURE_MIRROR_ADDRESSMODE=2,_0x354cf8.TEXTURE_CREATIONFLAG_STORAGE=1,_0x354cf8.TEXTUREFORMAT_ALPHA=0,_0x354cf8.TEXTUREFORMAT_LUMINANCE=1,_0x354cf8.TEXTUREFORMAT_LUMINANCE_ALPHA=2,_0x354cf8.TEXTUREFORMAT_RGB=4,_0x354cf8.TEXTUREFORMAT_RGBA=5,_0x354cf8.TEXTUREFORMAT_RED=6,_0x354cf8.TEXTUREFORMAT_R=6,_0x354cf8.TEXTUREFORMAT_RG=7,_0x354cf8.TEXTUREFORMAT_RED_INTEGER=8,_0x354cf8.TEXTUREFORMAT_R_INTEGER=8,_0x354cf8.TEXTUREFORMAT_RG_INTEGER=9,_0x354cf8.TEXTUREFORMAT_RGB_INTEGER=10,_0x354cf8.TEXTUREFORMAT_RGBA_INTEGER=11,_0x354cf8.TEXTUREFORMAT_BGRA=12,_0x354cf8.TEXTUREFORMAT_DEPTH24_STENCIL8=13,_0x354cf8.TEXTUREFORMAT_DEPTH32_FLOAT=14,_0x354cf8.TEXTUREFORMAT_DEPTH16=15,_0x354cf8.TEXTUREFORMAT_DEPTH24=16,_0x354cf8.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8=17,_0x354cf8.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8=18,_0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM=36492,_0x354cf8.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM=36493,_0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT=36495,_0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT=36494,_0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5=33779,_0x354cf8.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919,_0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3=33778,_0x354cf8.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918,_0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1=33777,_0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1=33776,_0x354cf8.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917,_0x354cf8.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT=35916,_0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4=37808,_0x354cf8.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840,_0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL=36196,_0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2=37492,_0x354cf8.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2=37493,_0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494,_0x354cf8.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495,_0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC=37496,_0x354cf8.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497,_0x354cf8.TEXTURETYPE_UNSIGNED_BYTE=0,_0x354cf8.TEXTURETYPE_UNSIGNED_INT=0,_0x354cf8.TEXTURETYPE_FLOAT=1,_0x354cf8.TEXTURETYPE_HALF_FLOAT=2,_0x354cf8.TEXTURETYPE_BYTE=3,_0x354cf8.TEXTURETYPE_SHORT=4,_0x354cf8.TEXTURETYPE_UNSIGNED_SHORT=5,_0x354cf8.TEXTURETYPE_INT=6,_0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER=7,_0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,_0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,_0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,_0x354cf8.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,_0x354cf8.TEXTURETYPE_UNSIGNED_INT_24_8=12,_0x354cf8.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,_0x354cf8.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,_0x354cf8.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,_0x354cf8.TEXTURETYPE_UNDEFINED=16,_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE=1,_0x354cf8.TEXTURE_NEAREST_NEAREST=1,_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE=2,_0x354cf8.TEXTURE_LINEAR_LINEAR=2,_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE=3,_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,_0x354cf8.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,_0x354cf8.TEXTURE_NEAREST_LINEAR=7,_0x354cf8.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,_0x354cf8.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,_0x354cf8.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,_0x354cf8.TEXTURE_LINEAR_NEAREST=12,_0x354cf8.TEXTURE_EXPLICIT_MODE=0,_0x354cf8.TEXTURE_SPHERICAL_MODE=1,_0x354cf8.TEXTURE_PLANAR_MODE=2,_0x354cf8.TEXTURE_CUBIC_MODE=3,_0x354cf8.TEXTURE_PROJECTION_MODE=4,_0x354cf8.TEXTURE_SKYBOX_MODE=5,_0x354cf8.TEXTURE_INVCUBIC_MODE=6,_0x354cf8.TEXTURE_EQUIRECTANGULAR_MODE=7,_0x354cf8.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,_0x354cf8.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,_0x354cf8.TEXTURE_FILTERING_QUALITY_OFFLINE=4096,_0x354cf8.TEXTURE_FILTERING_QUALITY_HIGH=64,_0x354cf8.TEXTURE_FILTERING_QUALITY_MEDIUM=16,_0x354cf8.TEXTURE_FILTERING_QUALITY_LOW=8,_0x354cf8.SCALEMODE_FLOOR=1,_0x354cf8.SCALEMODE_NEAREST=2,_0x354cf8.SCALEMODE_CEILING=3,_0x354cf8.MATERIAL_TextureDirtyFlag=1,_0x354cf8.MATERIAL_LightDirtyFlag=2,_0x354cf8.MATERIAL_FresnelDirtyFlag=4,_0x354cf8.MATERIAL_AttributesDirtyFlag=8,_0x354cf8.MATERIAL_MiscDirtyFlag=16,_0x354cf8.MATERIAL_PrePassDirtyFlag=32,_0x354cf8.MATERIAL_AllDirtyFlag=63,_0x354cf8.MATERIAL_TriangleFillMode=0,_0x354cf8.MATERIAL_WireFrameFillMode=1,_0x354cf8.MATERIAL_PointFillMode=2,_0x354cf8.MATERIAL_PointListDrawMode=3,_0x354cf8.MATERIAL_LineListDrawMode=4,_0x354cf8.MATERIAL_LineLoopDrawMode=5,_0x354cf8.MATERIAL_LineStripDrawMode=6,_0x354cf8.MATERIAL_TriangleStripDrawMode=7,_0x354cf8.MATERIAL_TriangleFanDrawMode=8,_0x354cf8.MATERIAL_ClockWiseSideOrientation=0,_0x354cf8.MATERIAL_CounterClockWiseSideOrientation=1,_0x354cf8.ACTION_NothingTrigger=0,_0x354cf8.ACTION_OnPickTrigger=1,_0x354cf8.ACTION_OnLeftPickTrigger=2,_0x354cf8.ACTION_OnRightPickTrigger=3,_0x354cf8.ACTION_OnCenterPickTrigger=4,_0x354cf8.ACTION_OnPickDownTrigger=5,_0x354cf8.ACTION_OnDoublePickTrigger=6,_0x354cf8.ACTION_OnPickUpTrigger=7,_0x354cf8.ACTION_OnPickOutTrigger=16,_0x354cf8.ACTION_OnLongPressTrigger=8,_0x354cf8.ACTION_OnPointerOverTrigger=9,_0x354cf8.ACTION_OnPointerOutTrigger=10,_0x354cf8.ACTION_OnEveryFrameTrigger=11,_0x354cf8.ACTION_OnIntersectionEnterTrigger=12,_0x354cf8.ACTION_OnIntersectionExitTrigger=13,_0x354cf8.ACTION_OnKeyDownTrigger=14,_0x354cf8.ACTION_OnKeyUpTrigger=15,_0x354cf8.PARTICLES_BILLBOARDMODE_Y=2,_0x354cf8.PARTICLES_BILLBOARDMODE_ALL=7,_0x354cf8.PARTICLES_BILLBOARDMODE_STRETCHED=8,_0x354cf8.MESHES_CULLINGSTRATEGY_STANDARD=0,_0x354cf8.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,_0x354cf8.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=2,_0x354cf8.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=3,_0x354cf8.SCENELOADER_NO_LOGGING=0,_0x354cf8.SCENELOADER_MINIMAL_LOGGING=1,_0x354cf8.SCENELOADER_SUMMARY_LOGGING=2,_0x354cf8.SCENELOADER_DETAILED_LOGGING=3,_0x354cf8.PREPASS_IRRADIANCE_TEXTURE_TYPE=0,_0x354cf8.PREPASS_POSITION_TEXTURE_TYPE=1,_0x354cf8.PREPASS_VELOCITY_TEXTURE_TYPE=2,_0x354cf8.PREPASS_REFLECTIVITY_TEXTURE_TYPE=3,_0x354cf8.PREPASS_COLOR_TEXTURE_TYPE=4,_0x354cf8.PREPASS_DEPTH_TEXTURE_TYPE=5,_0x354cf8.PREPASS_NORMAL_TEXTURE_TYPE=6,_0x354cf8.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE=7,_0x354cf8.BUFFER_CREATIONFLAG_READ=1,_0x354cf8.BUFFER_CREATIONFLAG_WRITE=2,_0x354cf8.BUFFER_CREATIONFLAG_READWRITE=3,_0x354cf8.BUFFER_CREATIONFLAG_UNIFORM=4,_0x354cf8.BUFFER_CREATIONFLAG_VERTEX=8,_0x354cf8.BUFFER_CREATIONFLAG_INDEX=16,_0x354cf8.BUFFER_CREATIONFLAG_STORAGE=32,_0x354cf8.RENDERPASS_MAIN=0,_0x354cf8.INPUT_ALT_KEY=18,_0x354cf8.INPUT_CTRL_KEY=17,_0x354cf8.INPUT_META_KEY1=91,_0x354cf8.INPUT_META_KEY2=92,_0x354cf8.INPUT_META_KEY3=93,_0x354cf8.INPUT_SHIFT_KEY=16,_0x354cf8.SNAPSHOTRENDERING_STANDARD=0,_0x354cf8.SNAPSHOTRENDERING_FAST=1,_0x354cf8.PERSPECTIVE_CAMERA=0,_0x354cf8.ORTHOGRAPHIC_CAMERA=1,_0x354cf8.FOVMODE_VERTICAL_FIXED=0,_0x354cf8.FOVMODE_HORIZONTAL_FIXED=1,_0x354cf8.RIG_MODE_NONE=0,_0x354cf8.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,_0x354cf8.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,_0x354cf8.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,_0x354cf8.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,_0x354cf8.RIG_MODE_STEREOSCOPIC_INTERLACED=14,_0x354cf8.RIG_MODE_VR=20,_0x354cf8.RIG_MODE_WEBVR=21,_0x354cf8.RIG_MODE_CUSTOM=22,_0x354cf8.MAX_SUPPORTED_UV_SETS=6,_0x354cf8.GL_ALPHA_EQUATION_ADD=32774,_0x354cf8.GL_ALPHA_EQUATION_MIN=32775,_0x354cf8.GL_ALPHA_EQUATION_MAX=32776,_0x354cf8.GL_ALPHA_EQUATION_SUBTRACT=32778,_0x354cf8.GL_ALPHA_EQUATION_REVERSE_SUBTRACT=32779,_0x354cf8.GL_ALPHA_FUNCTION_SRC=768,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR=769,_0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA=770,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA=771,_0x354cf8.GL_ALPHA_FUNCTION_DST_ALPHA=772,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA=773,_0x354cf8.GL_ALPHA_FUNCTION_DST_COLOR=774,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR=775,_0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED=776,_0x354cf8.GL_ALPHA_FUNCTION_CONSTANT_COLOR=32769,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR=32770,_0x354cf8.GL_ALPHA_FUNCTION_CONSTANT_ALPHA=32771,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA=32772,_0x354cf8.SnippetUrl="";var _0x1336a3=(_0x1bae4c=!0,function(e,t){var i=_0x1bae4c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1bae4c=!1,i}),_0x1af5a3=_0x1336a3(void 0,(function(){return _0x1af5a3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1af5a3).search("(((.+)+)+)+$")})),_0x1bae4c;function _0x4bbfae(){this.reset()}_0x1af5a3(),_0x4bbfae.prototype.reset=function(){this.enabled=!1,this.mask=255,this.funcRef=1,this.funcMask=255,this.frontFunc=_0x4bbfae.ALWAYS,this.backFunc=_0x4bbfae.ALWAYS,this.frontOpStencilFail=_0x4bbfae.KEEP,this.backOpStencilFail=_0x4bbfae.KEEP,this.frontOpDepthFail=_0x4bbfae.KEEP,this.backOpDepthFail=_0x4bbfae.KEEP,this.frontOpStencilDepthPass=_0x4bbfae.REPLACE,this.backOpStencilDepthPass=_0x4bbfae.REPLACE},Object.defineProperty(_0x4bbfae.prototype,"frontStencilFunc",{get:function(){return this.frontFunc},set:function(e){this.frontFunc=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4bbfae.prototype,"backStencilFunc",{get:function(){return this.backFunc},set:function(e){this.backFunc=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4bbfae.prototype,"stencilFuncRef",{get:function(){return this.funcRef},set:function(e){this.funcRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4bbfae.prototype,"stencilFuncMask",{get:function(){return this.funcMask},set:function(e){this.funcMask=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4bbfae.prototype,"frontStencilOpStencilFail",{get:function(){return this.frontOpStencilFail},set:function(e){this.frontOpStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4bbfae.prototype,"backStencilOpStencilFail",{get:function(){return this.backOpStencilFail},set:function(e){this.backOpStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4bbfae.prototype,"frontStencilOpDepthFail",{get:function(){return this.frontOpDepthFail},set:function(e){this.frontOpDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4bbfae.prototype,"backStencilOpDepthFail",{get:function(){return this.backOpDepthFail},set:function(e){this.backOpDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4bbfae.prototype,"frontStencilOpStencilDepthPass",{get:function(){return this.frontOpStencilDepthPass},set:function(e){this.frontOpStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4bbfae.prototype,"backStencilOpStencilDepthPass",{get:function(){return this.backOpStencilDepthPass},set:function(e){this.backOpStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4bbfae.prototype,"stencilMask",{get:function(){return this.mask},set:function(e){this.mask=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4bbfae.prototype,"stencilTest",{get:function(){return this.enabled},set:function(e){this.enabled=e},enumerable:!1,configurable:!0}),_0x4bbfae.ALWAYS=_0x354cf8.ALWAYS,_0x4bbfae.KEEP=_0x354cf8.KEEP,_0x4bbfae.REPLACE=_0x354cf8.REPLACE,_0x4bbfae.FRONT=_0x354cf8.FRONT,_0x4bbfae.BACK=_0x354cf8.BACK;var _$$={UNSIGNED_BYTE:de$x.UNSIGNED_BYTE,UNSIGNED_SHORT:de$x.UNSIGNED_SHORT,UNSIGNED_INT:de$x.UNSIGNED_INT,FLOAT:de$x.FLOAT,HALF_FLOAT:de$x.HALF_FLOAT_OES,UNSIGNED_INT_24_8:de$x.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:de$x.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:de$x.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:de$x.UNSIGNED_SHORT_5_6_5,isPacked:function(e){return e===_$$.UNSIGNED_INT_24_8||e===_$$.UNSIGNED_SHORT_4_4_4_4||e===_$$.UNSIGNED_SHORT_5_5_5_1||e===_$$.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case _$$.UNSIGNED_BYTE:return 1;case _$$.UNSIGNED_SHORT:case _$$.UNSIGNED_SHORT_4_4_4_4:case _$$.UNSIGNED_SHORT_5_5_5_1:case _$$.UNSIGNED_SHORT_5_6_5:case de$x.HALF_FLOAT:case de$x.HALF_FLOAT_OES:return 2;case _$$.UNSIGNED_INT:case _$$.FLOAT:case _$$.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===_$$.UNSIGNED_BYTE||e===_$$.UNSIGNED_SHORT||e===_$$.UNSIGNED_INT||e===_$$.FLOAT||e===de$x.HALF_FLOAT||e===de$x.HALF_FLOAT_OES||e===_$$.UNSIGNED_INT_24_8||e===_$$.UNSIGNED_SHORT_4_4_4_4||e===_$$.UNSIGNED_SHORT_5_5_5_1||e===_$$.UNSIGNED_SHORT_5_6_5},toWebGLConstant:function(e,t){switch(e){case _$$.UNSIGNED_BYTE:return de$x.UNSIGNED_BYTE;case _$$.UNSIGNED_SHORT:return de$x.UNSIGNED_SHORT;case _$$.UNSIGNED_INT:return de$x.UNSIGNED_INT;case _$$.FLOAT:return de$x.FLOAT;case _$$.HALF_FLOAT:return t.webgl2?de$x.HALF_FLOAT:de$x.HALF_FLOAT_OES;case _$$.UNSIGNED_INT_24_8:return de$x.UNSIGNED_INT_24_8;case _$$.UNSIGNED_SHORT_4_4_4_4:return de$x.UNSIGNED_SHORT_4_4_4_4;case _$$.UNSIGNED_SHORT_5_5_5_1:return de$x.UNSIGNED_SHORT_5_5_5_1;case _$$.UNSIGNED_SHORT_5_6_5:return _$$.UNSIGNED_SHORT_5_6_5}}},_$_={DEPTH_COMPONENT:de$x.DEPTH_COMPONENT,DEPTH_COMPONENT16:de$x.DEPTH_COMPONENT16,DEPTH_COMPONENT32F:de$x.DEPTH_COMPONENT32F,DEPTH_STENCIL:de$x.DEPTH_STENCIL,ALPHA:de$x.ALPHA,RGB:de$x.RGB,RGBA:de$x.RGBA,LUMINANCE:de$x.LUMINANCE,LUMINANCE_ALPHA:de$x.LUMINANCE_ALPHA,RGB_DXT1:de$x.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:de$x.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:de$x.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:de$x.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:de$x.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:de$x.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:de$x.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:de$x.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:de$x.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:de$x.COMPRESSED_RGB_ETC1_WEBGL,RED_INTEGER:de$x.RED_INTEGER,RED:de$x.RED,RGB8_ETC2:de$x.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:de$x.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:de$x.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(e){switch(e){case _$_.RGB:return 3;case _$_.RGBA:return 4;case _$_.LUMINANCE_ALPHA:return 2;case _$_.ALPHA:case _$_.LUMINANCE:case _$_.RED:case _$_.RED_INTEGER:default:return 1}},validate:function(e){return e===_$_.DEPTH_COMPONENT||e===_$_.DEPTH_COMPONENT16||e===_$_.DEPTH_COMPONENT32F||e===_$_.DEPTH_STENCIL||e===_$_.ALPHA||e===_$_.RED||e===_$_.RED_INTEGER||e===_$_.RGB||e===_$_.RGBA||e===_$_.LUMINANCE||e===_$_.LUMINANCE_ALPHA||e===_$_.RGB_DXT1||e===_$_.RGBA_DXT1||e===_$_.RGBA_DXT3||e===_$_.RGBA_DXT5||e===_$_.RGB_PVRTC_4BPPV1||e===_$_.RGB_PVRTC_2BPPV1||e===_$_.RGBA_PVRTC_4BPPV1||e===_$_.RGBA_PVRTC_2BPPV1||e===_$_.RGBA_ASTC||e===_$_.RGB_ETC1||e===_$_.RGB8_ETC2||e===_$_.RGBA8_ETC2_EAC||e===_$_.RGBA_BC7},isColorFormat:function(e){return e===_$_.ALPHA||e===_$_.RED||e===_$_.RED_INTEGER||e===_$_.RGB||e===_$_.RGBA||e===_$_.LUMINANCE||e===_$_.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===_$_.DEPTH_COMPONENT||e===_$_.DEPTH_COMPONENT16||e===_$_.DEPTH_COMPONENT32F||e===_$_.DEPTH_STENCIL},isCompressedFormat:function(e){return e===_$_.RGB_DXT1||e===_$_.RGBA_DXT1||e===_$_.RGBA_DXT3||e===_$_.RGBA_DXT5||e===_$_.RGB_PVRTC_4BPPV1||e===_$_.RGB_PVRTC_2BPPV1||e===_$_.RGBA_PVRTC_4BPPV1||e===_$_.RGBA_PVRTC_2BPPV1||e===_$_.RGBA_ASTC||e===_$_.RGB_ETC1||e===_$_.RGB8_ETC2||e===_$_.RGBA8_ETC2_EAC||e===_$_.RGBA_BC7},isDXTFormat:function(e){return e===_$_.RGB_DXT1||e===_$_.RGBA_DXT1||e===_$_.RGBA_DXT3||e===_$_.RGBA_DXT5},isPVRTCFormat:function(e){return e===_$_.RGB_PVRTC_4BPPV1||e===_$_.RGB_PVRTC_2BPPV1||e===_$_.RGBA_PVRTC_4BPPV1||e===_$_.RGBA_PVRTC_2BPPV1},isETC1Format:function(e){return e===_$_.RGB_ETC1},compressedTextureSizeInBytes:function(e,t,i,n){var r=e$2b(n)?n:1;switch(e){case _$_.RGB_DXT1:case _$_.RGBA_DXT1:case _$_.RGB_ETC1:case _$_.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*8*r;case _$_.RGBA_DXT3:case _$_.RGBA_DXT5:case _$_.RGBA_ASTC:case _$_.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*16*r;case _$_.RGB_PVRTC_4BPPV1:case _$_.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8)*r;case _$_.RGB_PVRTC_2BPPV1:case _$_.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8)*r;case _$_.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(i/4)*16;default:return 0}},textureSizeInBytes:function(e,t,i,n,r){var o=e$2b(r)?r:1,a=_$_.componentsLength(e);return _$$.isPacked(t)&&(a=1),a*_$$.sizeInBytes(t)*i*n*o},alignmentInBytes:function(e,t,i){var n=_$_.textureSizeInBytes(e,t,i,1)%4;return 0===n?4:2===n?2:1},createTypedArray:function(e,t,i,n){var r=_$$.sizeInBytes(t);return new(r===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:r===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:r===Float32Array.BYTES_PER_ELEMENT&&t===_$$.FLOAT?Float32Array:Uint32Array)(_$_.componentsLength(e)*i*n)},flipY:function(e,t,i,n,r){if(1===r)return e;for(var o=_$_.createTypedArray(t,i,n,r),a=_$_.componentsLength(t),s=n*a,l=0;l<r;++l)for(var u=l*n*a,c=(r-l-1)*n*a,h=0;h<s;++h)o[c+h]=e[u+h];return o},RGBToRGBA:function(e,t,i,n){for(var r=_$_.createTypedArray(_$_.RGBA,t,i,n),o=e.length/3,a=0;a<o;a++)r[4*a]=e[3*a],r[4*a+1]=e[3*a+1],r[4*a+2]=e[3*a+2];return r},toInternalFormat:function(e,t,i){if(!i.webgl2)return e;if(e===_$_.DEPTH_STENCIL)return de$x.DEPTH24_STENCIL8;if(e===_$_.DEPTH_COMPONENT){if(t===_$$.UNSIGNED_SHORT)return de$x.DEPTH_COMPONENT16;if(t===_$$.UNSIGNED_INT)return de$x.DEPTH_COMPONENT24;if(t===_$$.FLOAT)return de$x.DEPTH_COMPONENT32F}if(e===_$_.DEPTH_COMPONENT16)return de$x.DEPTH_COMPONENT16;if(e===_$_.DEPTH_COMPONENT32F)return de$x.DEPTH_COMPONENT32F;if(t===_$$.FLOAT)switch(e){case _$_.RGBA:return de$x.RGBA32F;case _$_.RGB:return de$x.RGB32F;case _$_.RG:return de$x.RG32F;case _$_.RED:return de$x.R32F}if(t===_$$.UNSIGNED_BYTE)switch(e){case _$_.RGBA:return de$x.RGBA8;case _$_.RGB:return de$x.RGB8;case _$_.RED:return de$x.R8}if(t===_$$.HALF_FLOAT)switch(e){case _$_.RGBA:return de$x.RGBA16F;case _$_.RGB:return de$x.RGB16F;case _$_.RG:return de$x.RG16F;case _$_.RED:return de$x.R16F}return e}},V$10=Object.freeze(_$_),E$1f={CLAMP_TO_EDGE:de$x.CLAMP_TO_EDGE,REPEAT:de$x.REPEAT,MIRRORED_REPEAT:de$x.MIRRORED_REPEAT,validate:function(e){return e===E$1f.CLAMP_TO_EDGE||e===E$1f.REPEAT||e===E$1f.MIRRORED_REPEAT}},q$19=Object.freeze(E$1f),e$1S={NEAREST:de$x.NEAREST,LINEAR:de$x.LINEAR,validate:function(e){return e===e$1S.NEAREST||e===e$1S.LINEAR}},rt$i=Object.freeze(e$1S),E$1e={NEAREST:de$x.NEAREST,LINEAR:de$x.LINEAR,NEAREST_MIPMAP_NEAREST:de$x.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:de$x.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:de$x.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:de$x.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===E$1e.NEAREST||e===E$1e.LINEAR||e===E$1e.NEAREST_MIPMAP_NEAREST||e===E$1e.LINEAR_MIPMAP_NEAREST||e===E$1e.NEAREST_MIPMAP_LINEAR||e===E$1e.LINEAR_MIPMAP_LINEAR}},tt$h=Object.freeze(E$1e),_0x49f20b=(_0x4bd202=!0,function(e,t){var i=_0x4bd202?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4bd202=!1,i}),_0xd376cc=_0x49f20b(void 0,(function(){return _0xd376cc.toString().search("(((.+)+)+)+$").toString().constructor(_0xd376cc).search("(((.+)+)+)+$")})),_0x4bd202;function _0x35d929(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=_0x35d929._Counter++}_0xd376cc(),Object.defineProperty(_0x35d929.prototype,"underlyingResource",{get:function(){return null},enumerable:!1,configurable:!0}),_0x35d929._Counter=0;var _0x2aab4b=(_0x390789=!0,function(e,t){var i=_0x390789?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x390789=!1,i}),_0x58100e=_0x2aab4b(void 0,(function(){return _0x58100e.toString().search("(((.+)+)+)+$").toString().constructor(_0x58100e).search("(((.+)+)+)+$")})),_0x390789;function Buffer$1(e,t,i,n,r,o,a,s){void 0===n&&(n=0),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),this._isAlreadyOwned=!1,e.getScene?this._engine=e.getScene().getEngine():this._engine=e,this._updatable=i,this._instanced=o,this._divisor=s||1,t instanceof _0x35d929?(this._data=null,this._buffer=t):(this._data=t,this._buffer=null),this.byteStride=a?n:n*Float32Array.BYTES_PER_ELEMENT,!r&&this.create()}function VertexBuffer(e,t,i,n,r,o,a,s,l,u,c,h,d,f){if(void 0===c&&(c=!1),void 0===h&&(h=!1),void 0===d&&(d=1),void 0===f&&(f=!1),t instanceof Buffer$1?(this._buffer=t,this._ownsBuffer=f):(this._buffer=new Buffer$1(e,t,n,o,r,a,h),this._ownsBuffer=!0),this.uniqueId=VertexBuffer._Counter++,this._kind=i,null==u){var p=this.getData();this.type=VertexBuffer.FLOAT,p instanceof Int8Array?this.type=VertexBuffer.BYTE:p instanceof Uint8Array?this.type=VertexBuffer.UNSIGNED_BYTE:p instanceof Int16Array?this.type=VertexBuffer.SHORT:p instanceof Uint16Array?this.type=VertexBuffer.UNSIGNED_SHORT:p instanceof Int32Array?this.type=VertexBuffer.INT:p instanceof Uint32Array&&(this.type=VertexBuffer.UNSIGNED_INT)}else this.type=u;var _=VertexBuffer.GetTypeByteLength(this.type);h?(this._size=l||(o?o/_:VertexBuffer.DeduceStride(i)),this.byteStride=o||this._buffer.byteStride||this._size*_,this.byteOffset=s||0):(this._size=l||o||VertexBuffer.DeduceStride(i),this.byteStride=o?o*_:this._buffer.byteStride||this._size*_,this.byteOffset=(s||0)*_),this.normalized=c,this._instanced=void 0!==a&&a,this._instanceDivisor=a?d:0,this._computeHashCode()}function R$$(){}function n$10(){}_0x58100e(),Buffer$1.prototype.createVertexBuffer=function(e,t,i,n,r,o,a){void 0===o&&(o=!1);var s=o?t:t*Float32Array.BYTES_PER_ELEMENT,l=n?o?n:n*Float32Array.BYTES_PER_ELEMENT:this.byteStride;return new VertexBuffer(this._engine,this,e,this._updatable,!0,l,void 0===r?this._instanced:r,s,i,void 0,void 0,!0,this._divisor||a)},Buffer$1.prototype.isUpdatable=function(){return this._updatable},Buffer$1.prototype.getData=function(){return this._data},Buffer$1.prototype.getBuffer=function(){return this._buffer},Buffer$1.prototype.getStrideSize=function(){return this.byteStride/Float32Array.BYTES_PER_ELEMENT},Buffer$1.prototype.create=function(e){void 0===e&&(e=null),!e&&this._buffer||(e=e||this._data)&&(this._buffer?this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e),this._data=e):this._updatable?(this._buffer=this._engine.createDynamicVertexBuffer(e),this._data=e):this._buffer=this._engine.createVertexBuffer(e))},Buffer$1.prototype._rebuild=function(){this._buffer=null,this.create(this._data)},Buffer$1.prototype.update=function(e){this.create(e)},Buffer$1.prototype.updateDirectly=function(e,t,i,n){void 0===n&&(n=!1),this._buffer&&this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e,n?t:t*Float32Array.BYTES_PER_ELEMENT,i?i*this.byteStride:void 0),this._data=0===t&&void 0===i?e:null)},Buffer$1.prototype._increaseReferences=function(){this._buffer&&(this._isAlreadyOwned?this._buffer.references++:this._isAlreadyOwned=!0)},Buffer$1.prototype.dispose=function(){this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null,this._data=null)},Object.defineProperty(VertexBuffer.prototype,"instanceDivisor",{get:function(){return this._instanceDivisor},set:function(e){this._instanceDivisor=e,this._instanced=0!=e,this._computeHashCode()},enumerable:!1,configurable:!0}),VertexBuffer.prototype._computeHashCode=function(){this.hashCode=(this.type-5120<<0)+((this.normalized?1:0)<<3)+(this._size<<4)+((this._instanced?1:0)<<6)+(this.byteStride<<12)},VertexBuffer.prototype._rebuild=function(){this._buffer&&this._buffer._rebuild()},VertexBuffer.prototype.getKind=function(){return this._kind},VertexBuffer.prototype.isUpdatable=function(){return this._buffer.isUpdatable()},VertexBuffer.prototype.getData=function(){return this._buffer.getData()},VertexBuffer.prototype.getFloatData=function(e,t){var i=this.getData();if(!i)return null;var n=this.getSize()*VertexBuffer.GetTypeByteLength(this.type),r=e*this.getSize();if(this.type!==VertexBuffer.FLOAT||this.byteStride!==n){var o=new Float32Array(r);return this.forEach(r,(function(e,t){return o[t]=e})),o}if(!(i instanceof Array||i instanceof Float32Array)||0!==this.byteOffset||i.length!==r){if(i instanceof Array){var a=this.byteOffset/4;return i.slice(a,a+r)}if(i instanceof ArrayBuffer)return new Float32Array(i,this.byteOffset,r);a=i.byteOffset+this.byteOffset;if(t){var s=new Float32Array(r),l=new Float32Array(i.buffer,a,r);return s.set(l),s}var u=a%4;return u&&(a=Math.max(0,a-u)),new Float32Array(i.buffer,a,r)}return t?i.slice():i},VertexBuffer.prototype.getBuffer=function(){return this._buffer.getBuffer()},VertexBuffer.prototype.getStrideSize=function(){return this.byteStride/VertexBuffer.GetTypeByteLength(this.type)},VertexBuffer.prototype.getOffset=function(){return this.byteOffset/VertexBuffer.GetTypeByteLength(this.type)},VertexBuffer.prototype.getSize=function(e){return void 0===e&&(e=!1),e?this._size*VertexBuffer.GetTypeByteLength(this.type):this._size},VertexBuffer.prototype.getIsInstanced=function(){return this._instanced},VertexBuffer.prototype.getInstanceDivisor=function(){return this._instanceDivisor},VertexBuffer.prototype.create=function(e){this._buffer.create(e)},VertexBuffer.prototype.update=function(e){this._buffer.update(e)},VertexBuffer.prototype.updateDirectly=function(e,t,i){void 0===i&&(i=!1),this._buffer.updateDirectly(e,t,void 0,i)},VertexBuffer.prototype.dispose=function(){this._ownsBuffer&&this._buffer.dispose()},VertexBuffer.prototype.forEach=function(e,t){VertexBuffer.ForEach(this._buffer.getData(),this.byteOffset,this.byteStride,this._size,this.type,e,this.normalized,t)},VertexBuffer.DeduceStride=function(e){switch(e){case VertexBuffer.UVKind:case VertexBuffer.UV2Kind:case VertexBuffer.UV3Kind:case VertexBuffer.UV4Kind:case VertexBuffer.UV5Kind:case VertexBuffer.UV6Kind:return 2;case VertexBuffer.NormalKind:case VertexBuffer.PositionKind:return 3;case VertexBuffer.ColorKind:case VertexBuffer.MatricesIndicesKind:case VertexBuffer.MatricesIndicesExtraKind:case VertexBuffer.MatricesWeightsKind:case VertexBuffer.MatricesWeightsExtraKind:case VertexBuffer.TangentKind:return 4;default:throw new Error("Invalid kind '"+e+"'")}},VertexBuffer.GetTypeByteLength=function(e){switch(e){case VertexBuffer.BYTE:case VertexBuffer.UNSIGNED_BYTE:return 1;case VertexBuffer.SHORT:case VertexBuffer.UNSIGNED_SHORT:return 2;case VertexBuffer.INT:case VertexBuffer.UNSIGNED_INT:case VertexBuffer.FLOAT:return 4;default:throw new Error("Invalid type '".concat(e,"'"))}},VertexBuffer.ForEach=function(e,t,i,n,r,o,a,s){if(e instanceof Array)for(var l=t/4,u=i/4,c=0;c<o;c+=n){for(var h=0;h<n;h++)s(e[l+h],c+h);l+=u}else{var d=e instanceof ArrayBuffer?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),f=VertexBuffer.GetTypeByteLength(r);for(c=0;c<o;c+=n){var p=t;for(h=0;h<n;h++){s(VertexBuffer._GetFloatValue(d,r,p,a),c+h),p+=f}t+=i}}},VertexBuffer._GetFloatValue=function(e,t,i,n){switch(t){case VertexBuffer.BYTE:var r=e.getInt8(i);return n&&(r=Math.max(r/127,-1)),r;case VertexBuffer.UNSIGNED_BYTE:r=e.getUint8(i);return n&&(r/=255),r;case VertexBuffer.SHORT:r=e.getInt16(i,!0);return n&&(r=Math.max(r/32767,-1)),r;case VertexBuffer.UNSIGNED_SHORT:r=e.getUint16(i,!0);return n&&(r/=65535),r;case VertexBuffer.INT:return e.getInt32(i,!0);case VertexBuffer.UNSIGNED_INT:return e.getUint32(i,!0);case VertexBuffer.FLOAT:return e.getFloat32(i,!0);default:throw new Error("Invalid component type ".concat(t))}},VertexBuffer._Counter=0,VertexBuffer.BYTE=5120,VertexBuffer.UNSIGNED_BYTE=5121,VertexBuffer.SHORT=5122,VertexBuffer.UNSIGNED_SHORT=5123,VertexBuffer.INT=5124,VertexBuffer.UNSIGNED_INT=5125,VertexBuffer.FLOAT=5126,VertexBuffer.PositionKind="position",VertexBuffer.NormalKind="normal",VertexBuffer.TangentKind="tangent",VertexBuffer.UVKind="uv",VertexBuffer.UV2Kind="uv2",VertexBuffer.UV3Kind="uv3",VertexBuffer.UV4Kind="uv4",VertexBuffer.UV5Kind="uv5",VertexBuffer.UV6Kind="uv6",VertexBuffer.ColorKind="color",VertexBuffer.ColorInstanceKind="instanceColor",VertexBuffer.MatricesIndicesKind="matricesIndices",VertexBuffer.MatricesWeightsKind="matricesWeights",VertexBuffer.MatricesIndicesExtraKind="matricesIndicesExtra",VertexBuffer.MatricesWeightsExtraKind="matricesWeightsExtra",R$$.toPixelFormat=function(e){switch(e){case V$10.RED:return _0x354cf8.TEXTUREFORMAT_RED;case V$10.RED_INTEGER:return _0x354cf8.TEXTUREFORMAT_RED_INTEGER;case V$10.RGB:return _0x354cf8.TEXTUREFORMAT_RGB;case V$10.RGBA:return _0x354cf8.TEXTUREFORMAT_RGBA;case V$10.LUMINANCE_ALPHA:return _0x354cf8.TEXTUREFORMAT_LUMINANCE_ALPHA;case V$10.ALPHA:return _0x354cf8.TEXTUREFORMAT_ALPHA;case V$10.LUMINANCE:return _0x354cf8.TEXTUREFORMAT_LUMINANCE;case V$10.DEPTH_COMPONENT16:return _0x354cf8.TEXTUREFORMAT_DEPTH16;case V$10.DEPTH_COMPONENT:return _0x354cf8.TEXTUREFORMAT_DEPTH24;case V$10.DEPTH_COMPONENT32F:return _0x354cf8.TEXTUREFORMAT_DEPTH32_FLOAT;case V$10.DEPTH_STENCIL:return _0x354cf8.TEXTUREFORMAT_DEPTH24_STENCIL8;case V$10.RGBA_DXT1:return _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1;case V$10.RGBA_DXT3:return _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3;case V$10.RGBA_DXT5:return _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5;case V$10.RGB_DXT1:return _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1;case V$10.RGBA_PVRTC_2BPPV1:case V$10.RGBA_PVRTC_4BPPV1:case V$10.RGB_ETC1:case V$10.RGB_PVRTC_2BPPV1:case V$10.RGB_PVRTC_4BPPV1:default:return 1}},R$$.toPixelType=function(e){switch(e){case _$$.FLOAT:return _0x354cf8.TEXTURETYPE_FLOAT;case _$$.HALF_FLOAT:return _0x354cf8.TEXTURETYPE_HALF_FLOAT;case _$$.UNSIGNED_BYTE:return _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE;case _$$.UNSIGNED_INT:return _0x354cf8.TEXTURETYPE_UNSIGNED_INT;case _$$.UNSIGNED_INT_24_8:return _0x354cf8.TEXTURETYPE_UNSIGNED_INT_24_8;case _$$.UNSIGNED_SHORT:return _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT;case _$$.UNSIGNED_SHORT_4_4_4_4:return _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4;case _$$.UNSIGNED_SHORT_5_5_5_1:return _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1;case _$$.UNSIGNED_SHORT_5_6_5:return _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;default:return _0x354cf8.TEXTURETYPE_UNDEFINED}},R$$.toSamplerMode=function(e,t){var i=e==_$$.FLOAT||e==_$$.HALF_FLOAT;if(t.magnificationFilter==rt$i.NEAREST){if(t.minificationFilter==tt$h.NEAREST)return _0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==tt$h.LINEAR)return _0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==tt$h.NEAREST_MIPMAP_NEAREST)return _0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==tt$h.LINEAR_MIPMAP_NEAREST)return _0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE}else{if(t.magnificationFilter!=rt$i.LINEAR)return console.log("EnumConvertor.toSamplerMode unsupported type"),_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==tt$h.NEAREST)return i?_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE:_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==tt$h.LINEAR)return i?_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE:_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==tt$h.NEAREST_MIPMAP_NEAREST)return i?_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE:_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==tt$h.LINEAR_MIPMAP_NEAREST)return i?_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE:_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==tt$h.LINEAR_MIPMAP_LINEAR)return i?_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE:_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR}},R$$.toAddressMode=function(e){switch(e){case q$19.CLAMP_TO_EDGE:return _0x354cf8.TEXTURE_CLAMP_ADDRESSMODE;case q$19.REPEAT:return _0x354cf8.TEXTURE_WRAP_ADDRESSMODE;case q$19.MIRRORED_REPEAT:return _0x354cf8.TEXTURE_MIRROR_ADDRESSMODE;default:return _0x354cf8.TEXTURE_CLAMP_ADDRESSMODE}},R$$.toFillMode=function(e){switch(e){case W$18.TRIANGLES:return _0x354cf8.MATERIAL_TriangleFillMode;case W$18.POINTS:return _0x354cf8.MATERIAL_PointFillMode;case W$18.LINES:return _0x354cf8.MATERIAL_WireFrameFillMode;case W$18.LINE_STRIP:return _0x354cf8.MATERIAL_LineStripDrawMode;default:return console.log("EnumConvertor.toFillMode unsupported type"),_0x354cf8.MATERIAL_TriangleFillMode}},R$$.toCullFace=function(e){switch(e){case de$x.FRONT:return 2;case de$x.BACK:default:return 1}},R$$.toFrontFace=function(e,t){switch(e){case de$x.CCW:return t?2:1;case de$x.CW:return t?1:2;default:return 1}},R$$.toVertexBufferDataType=function(e){switch(e){case S$12.BYTE:return VertexBuffer.BYTE;case S$12.UNSIGNED_BYTE:return VertexBuffer.UNSIGNED_BYTE;case S$12.SHORT:return VertexBuffer.SHORT;case S$12.UNSIGNED_SHORT:return VertexBuffer.UNSIGNED_SHORT;case S$12.INT:return VertexBuffer.INT;case S$12.UNSIGNED_INT:return VertexBuffer.UNSIGNED_INT;case S$12.FLOAT:return VertexBuffer.FLOAT;default:throw console.log("EnumConvertor.toVertexBufferDataType unsupported type"),new t$16("componentDatatype is not a valid value.")}},n$10.applyFrontFace=function(e,t,i){e._depthCullingState.frontFace=R$$.toFrontFace(t.frontFace,i)},n$10.applyCull=function(e,t){var i=t.cull;i.enabled?(e._depthCullingState.cull=!0,e._depthCullingState.cullFace=R$$.toCullFace(i.face)):(e._depthCullingState.cull=!1,e._depthCullingState.cullFace=0)},n$10.applyLineWidth=function(e,t){},n$10.applyPolygonOffset=function(e,t){var i=t.polygonOffset;i.enabled?(e.setZOffset(i.factor),e.setZOffsetUnits(i.units)):(e.setZOffset(0),e.setZOffsetUnits(0))},n$10.applyScissorTest=function(e,t,i){var n=t.scissorTest;if(e$2b(i.scissorTest)?i.scissorTest.enabled:n.enabled){var r=e$2b(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.enableScissor(r.x,r.y,r.width,r.height)}else e.disableScissor()},n$10.applyDepthRange=function(e,t){},n$10.applyDepthTest=function(e,t){var i=t.depthTest,n=i.enabled;e.setDepthBuffer(n),n&&e.setDepthFunction(i.func)},n$10.applyColorMask=function(e,t){var i=t.colorMask;e.setColorWrite(i.red)},n$10.applyDepthMask=function(e,t){e.setDepthWrite(t.depthMask)},n$10.applyStencilMask=function(e,t){var i=t.stencilMask;i<0&&(i=255),e.setStencilMask(i)},n$10.applyBlendingColor=function(e,t){e.setAlphaConstants(t.red,t.green,t.blue,t.alpha)},n$10.applyBlending=function(e,t,i){var n=t.blending;(e$2b(i.blendingEnabled)?i.blendingEnabled:n.enabled)?(n$10.applyBlendingColor(e,n.color),e._alphaState.setAlphaEquationParameters(n.equationRgb,n.equationAlpha),e._alphaState.setAlphaBlendFunctionParameters(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha),e._alphaState.alphaBlend=!0):e.setAlphaMode(_0x354cf8.ALPHA_DISABLE)},n$10.applyStencilTest=function(e,t){var i=t.stencilTest,n=i.enabled;if(e.setStencilBuffer(n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.setStencilFunction(_0x4bbfae.FRONT,r);var l=i.frontOperation;e.setStencilOperationFail(_0x4bbfae.FRONT,l.fail),e.setStencilOperationDepthFail(_0x4bbfae.FRONT,l.zFail),e.setStencilOperationPass(_0x4bbfae.FRONT,l.zPass),e.setStencilFunction(_0x4bbfae.BACK,o);var u=i.backOperation;e.setStencilOperationFail(_0x4bbfae.BACK,u.fail),e.setStencilOperationDepthFail(_0x4bbfae.BACK,u.zFail),e.setStencilOperationPass(_0x4bbfae.BACK,u.zPass),e.setStencilFunctionReference(a),e.setStencilFunctionMask(s)}},n$10.applySampleCoverage=function(e,t){};var S$W=new f$18;function t$_(){}function l$1a(e,t,i){i?e.enable(t):e.disable(t)}n$10.applyViewport=function(e,t,i,n,r){var o=u$_(t.viewport,i.viewport);e$2b(o)||((o=S$W).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight);var a=u$_(n,i.context.drawingBufferWidth),s=u$_(r,i.context.drawingBufferHeight);i.context.uniformState.viewport=o;var l={x:o.x/a,y:o.y/s,width:o.width/a,height:o.height/s};e.setViewport(l,n,r)},t$_.applyFrontFace=function(e,t,i){e.frontFace(t.frontFace)},t$_.applyCull=function(e,t){var i=t.cull,n=i.enabled;l$1a(e,e.CULL_FACE,n),n&&e.cullFace(i.face)},t$_.applyLineWidth=function(e,t){e.lineWidth(t.lineWidth)},t$_.applyPolygonOffset=function(e,t){var i=t.polygonOffset,n=i.enabled;l$1a(e,e.POLYGON_OFFSET_FILL,n),n&&e.polygonOffset(i.factor,i.units)},t$_.applyScissorTest=function(e,t,i){var n=t.scissorTest,r=e$2b(i.scissorTest)?i.scissorTest.enabled:n.enabled;if(l$1a(e,e.SCISSOR_TEST,r),r){var o=e$2b(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.scissor(o.x,o.y,o.width,o.height)}},t$_.applyDepthRange=function(e,t){var i=t.depthRange;e.depthRange(i.near,i.far)},t$_.applyDepthTest=function(e,t){var i=t.depthTest,n=i.enabled;l$1a(e,e.DEPTH_TEST,n),n&&e.depthFunc(i.func)},t$_.applyColorMask=function(e,t){var i=t.colorMask;e.colorMask(i.red,i.green,i.blue,i.alpha)},t$_.applyDepthMask=function(e,t){e.depthMask(t.depthMask)},t$_.applyStencilMask=function(e,t){e.stencilMask(t.stencilMask)},t$_.applyBlendingColor=function(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)},t$_.applyBlending=function(e,t,i){var n=t.blending,r=e$2b(i.blendingEnabled)?i.blendingEnabled:n.enabled;l$1a(e,e.BLEND,r),r&&(t$_.applyBlendingColor(e,n.color),e.blendEquationSeparate(n.equationRgb,n.equationAlpha),e.blendFuncSeparate(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha))},t$_.applyStencilTest=function(e,t){var i=t.stencilTest,n=i.enabled;if(l$1a(e,e.STENCIL_TEST,n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.stencilFunc(r,a,s),e.stencilFuncSeparate(e.BACK,o,a,s),e.stencilFuncSeparate(e.FRONT,r,a,s);var l=i.frontOperation,u=l.fail,c=l.zFail,h=l.zPass;e.stencilOpSeparate(e.FRONT,u,c,h);var d=i.backOperation,f=d.fail,p=d.zFail,_=d.zPass;e.stencilOpSeparate(e.BACK,f,p,_)}},t$_.applySampleCoverage=function(e,t){var i=t.sampleCoverage,n=i.enabled;l$1a(e,e.SAMPLE_COVERAGE,n),n&&e.sampleCoverage(i.value,i.invert)};var S$V=new f$18;function F$18(e){return e===de$x.FUNC_ADD||e===de$x.FUNC_SUBTRACT||e===de$x.FUNC_REVERSE_SUBTRACT||e===de$x.MIN||e===de$x.MAX}function E$1d(e){return e===de$x.ZERO||e===de$x.ONE||e===de$x.SRC_COLOR||e===de$x.ONE_MINUS_SRC_COLOR||e===de$x.DST_COLOR||e===de$x.ONE_MINUS_DST_COLOR||e===de$x.SRC_ALPHA||e===de$x.ONE_MINUS_SRC_ALPHA||e===de$x.DST_ALPHA||e===de$x.ONE_MINUS_DST_ALPHA||e===de$x.CONSTANT_COLOR||e===de$x.ONE_MINUS_CONSTANT_COLOR||e===de$x.CONSTANT_ALPHA||e===de$x.ONE_MINUS_CONSTANT_ALPHA||e===de$x.SRC_ALPHA_SATURATE}function W$11(e){return e===de$x.FRONT||e===de$x.BACK||e===de$x.FRONT_AND_BACK}function U$17(e){return e===de$x.NEVER||e===de$x.LESS||e===de$x.EQUAL||e===de$x.LEQUAL||e===de$x.GREATER||e===de$x.NOTEQUAL||e===de$x.GEQUAL||e===de$x.ALWAYS}function _$Z(e){return e===de$x.NEVER||e===de$x.LESS||e===de$x.EQUAL||e===de$x.LEQUAL||e===de$x.GREATER||e===de$x.NOTEQUAL||e===de$x.GEQUAL||e===de$x.ALWAYS}function m$14(e){return e===de$x.ZERO||e===de$x.KEEP||e===de$x.REPLACE||e===de$x.INCR||e===de$x.DECR||e===de$x.INVERT||e===de$x.INCR_WRAP||e===de$x.DECR_WRAP}function d$1m(e){var t=u$_(e,{}),i=u$_(t.cull,{}),n=u$_(t.polygonOffset,{}),r=u$_(t.scissorTest,{}),o=u$_(r.rectangle,{}),a=u$_(t.depthRange,{}),s=u$_(t.depthTest,{}),l=u$_(t.colorMask,{}),u=u$_(t.blending,{}),c=u$_(u.color,{}),h=u$_(t.stencilTest,{}),d=u$_(h.frontOperation,{}),f=u$_(h.backOperation,{}),p=u$_(t.sampleCoverage,{}),_=t.viewport;if(this.frontFace=u$_(t.frontFace,W$13.COUNTER_CLOCKWISE),this.cull={enabled:u$_(i.enabled,!1),face:u$_(i.face,de$x.BACK)},this.lineWidth=u$_(t.lineWidth,1),this.polygonOffset={enabled:u$_(n.enabled,!1),factor:u$_(n.factor,0),units:u$_(n.units,0)},this.scissorTest={enabled:u$_(r.enabled,!1),rectangle:f$18.clone(o)},this.depthRange={near:u$_(a.near,0),far:u$_(a.far,1)},this.depthTest={enabled:u$_(s.enabled,!1),func:u$_(s.func,de$x.LESS)},this.colorMask={red:u$_(l.red,!0),green:u$_(l.green,!0),blue:u$_(l.blue,!0),alpha:u$_(l.alpha,!0)},this.depthMask=u$_(t.depthMask,!0),this.stencilMask=u$_(t.stencilMask,65535),this.blending={enabled:u$_(u.enabled,!1),color:new e$1U(u$_(c.red,0),u$_(c.green,0),u$_(c.blue,0),u$_(c.alpha,0)),equationRgb:u$_(u.equationRgb,de$x.FUNC_ADD),equationAlpha:u$_(u.equationAlpha,de$x.FUNC_ADD),functionSourceRgb:u$_(u.functionSourceRgb,de$x.ONE),functionSourceAlpha:u$_(u.functionSourceAlpha,de$x.ONE),functionDestinationRgb:u$_(u.functionDestinationRgb,de$x.ZERO),functionDestinationAlpha:u$_(u.functionDestinationAlpha,de$x.ZERO)},this.stencilTest={enabled:u$_(h.enabled,!1),frontFunction:u$_(h.frontFunction,de$x.ALWAYS),backFunction:u$_(h.backFunction,de$x.ALWAYS),reference:u$_(h.reference,0),mask:u$_(h.mask,65535),frontOperation:{fail:u$_(d.fail,de$x.KEEP),zFail:u$_(d.zFail,de$x.KEEP),zPass:u$_(d.zPass,de$x.KEEP)},backOperation:{fail:u$_(f.fail,de$x.KEEP),zFail:u$_(f.zFail,de$x.KEEP),zPass:u$_(f.zPass,de$x.KEEP)}},this.sampleCoverage={enabled:u$_(p.enabled,!1),value:u$_(p.value,1),invert:u$_(p.invert,!1)},this.viewport=e$2b(_)?new f$18(_.x,_.y,_.width,_.height):void 0,this.lineWidth<e$1T.minimumAliasedLineWidth||this.lineWidth>e$1T.maximumAliasedLineWidth)throw new t$16("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!W$13.validate(this.frontFace))throw new t$16("Invalid renderState.frontFace.");if(!W$11(this.cull.face))throw new t$16("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new t$16("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new t$16("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new t$16("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new t$16("renderState.depthRange.far must be less than or equal to one.");if(!U$17(this.depthTest.func))throw new t$16("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new t$16("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!F$18(this.blending.equationRgb))throw new t$16("Invalid renderState.blending.equationRgb.");if(!F$18(this.blending.equationAlpha))throw new t$16("Invalid renderState.blending.equationAlpha.");if(!E$1d(this.blending.functionSourceRgb))throw new t$16("Invalid renderState.blending.functionSourceRgb.");if(!E$1d(this.blending.functionSourceAlpha))throw new t$16("Invalid renderState.blending.functionSourceAlpha.");if(!E$1d(this.blending.functionDestinationRgb))throw new t$16("Invalid renderState.blending.functionDestinationRgb.");if(!E$1d(this.blending.functionDestinationAlpha))throw new t$16("Invalid renderState.blending.functionDestinationAlpha.");if(!_$Z(this.stencilTest.frontFunction))throw new t$16("Invalid renderState.stencilTest.frontFunction.");if(!_$Z(this.stencilTest.backFunction))throw new t$16("Invalid renderState.stencilTest.backFunction.");if(!m$14(this.stencilTest.frontOperation.fail))throw new t$16("Invalid renderState.stencilTest.frontOperation.fail.");if(!m$14(this.stencilTest.frontOperation.zFail))throw new t$16("Invalid renderState.stencilTest.frontOperation.zFail.");if(!m$14(this.stencilTest.frontOperation.zPass))throw new t$16("Invalid renderState.stencilTest.frontOperation.zPass.");if(!m$14(this.stencilTest.backOperation.fail))throw new t$16("Invalid renderState.stencilTest.backOperation.fail.");if(!m$14(this.stencilTest.backOperation.zFail))throw new t$16("Invalid renderState.stencilTest.backOperation.zFail.");if(!m$14(this.stencilTest.backOperation.zPass))throw new t$16("Invalid renderState.stencilTest.backOperation.zPass.");if(e$2b(this.viewport)){if(this.viewport.width<0)throw new t$16("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new t$16("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>e$1T.maximumViewportWidth)throw new t$16("renderState.viewport.width must be less than or equal to the maximum viewport width ("+e$1T.maximumViewportWidth.toString()+"). Check maximumViewportWidth.");if(this.viewport.height>e$1T.maximumViewportHeight)throw new t$16("renderState.viewport.height must be less than or equal to the maximum viewport height ("+e$1T.maximumViewportHeight.toString()+"). Check maximumViewportHeight.")}this.id=0,this._applyFunctions=[]}t$_.applyViewport=function(e,t,i,n,r){var o=u$_(t.viewport,i.viewport);e$2b(o)||((o=S$V).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=o,e.viewport(o.x,o.y,o.width,o.height)};var q$18=0,g$19={};function B$_(e,t,i){(e?n$10:t$_).applyFrontFace(t,i)}function K$V(e,t,i){(e?n$10:t$_).applyCull(t,i)}function V$$(e,t,i){(e?n$10:t$_).applyLineWidth(t,i)}function H$11(e,t,i){(e?n$10:t$_).applyPolygonOffset(t,i)}function Q$10(e,t,i){(e?n$10:t$_).applyDepthRange(t,i)}function G$1e(e,t,i){(e?n$10:t$_).applyDepthTest(t,i)}function J$Y(e,t,i){(e?n$10:t$_).applyColorMask(t,i)}function Y$S(e,t,i){(e?n$10:t$_).applyDepthMask(t,i)}function Z$10(e,t,i){(e?n$10:t$_).applyStencilMask(t,i)}function X$$(e,t,i){(e?n$10:t$_).applyStencilTest(t,i)}function j$18(e,t,i){(e?n$10:t$_).applySampleCoverage(t,i)}function $$11(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(B$_),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&i.push(K$V),e.lineWidth!==t.lineWidth&&i.push(V$$),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&i.push(H$11),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&i.push(Q$10),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&i.push(G$1e),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&i.push(J$Y),e.depthMask!==t.depthMask&&i.push(Y$S),e.stencilMask!==t.stencilMask&&i.push(Z$10),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&i.push(X$$),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&i.push(j$18),i}d$1m.fromCache=function(e){var t=JSON.stringify(e),i=g$19[t];if(e$2b(i))return++i.referenceCount,i.state;var n=new d$1m(e),r=JSON.stringify(n);return e$2b(i=g$19[r])||(n.id=q$18++,i={referenceCount:0,state:n=c$15(n)},g$19[r]=i),++i.referenceCount,g$19[t]={referenceCount:1,state:i.state},i.state},d$1m.removeFromCache=function(e){var t=new d$1m(e),i=JSON.stringify(t),n=g$19[i],r=JSON.stringify(e),o=g$19[r];e$2b(o)&&(--o.referenceCount,0===o.referenceCount&&(delete g$19[r],e$2b(n)&&--n.referenceCount)),e$2b(n)&&0===n.referenceCount&&delete g$19[i]},d$1m.getCache=function(){return g$19},d$1m.clearCache=function(){g$19={}},d$1m.apply=function(e,t,i){const n=e$2b(e.name)?n$10:t$_;n.applyFrontFace(e,t),n.applyCull(e,t),n.applyLineWidth(e,t),n.applyPolygonOffset(e,t),n.applyDepthRange(e,t),n.applyDepthTest(e,t),n.applyColorMask(e,t),n.applyDepthMask(e,t),n.applyStencilMask(e,t),n.applyStencilTest(e,t),n.applySampleCoverage(e,t),n.applyScissorTest(e,t,i),n.applyBlending(e,t,i),n.applyViewport(e,t,i)},d$1m.partialApply=function(e,t,i,n,r,o,a,s,l,u,c){const h=e$2b(e.name),d=h?n$10:t$_;if(t!==i){var f=i._applyFunctions[t.id];e$2b(f)||(f=$$11(t,i),i._applyFunctions[t.id]=f);for(var p=f.length,_=0;_<p;++_)f[_](h,e,i)}((e$2b(n.scissorTest)?n.scissorTest:t.scissorTest)!==(e$2b(r.scissorTest)?r.scissorTest:i.scissorTest)||s)&&d.applyScissorTest(e,i,r);var m=e$2b(n.blendingEnabled)?n.blendingEnabled:t.blending.enabled,g=e$2b(r.blendingEnabled)?r.blendingEnabled:i.blending.enabled;(m!==g||g&&t.blending!==i.blending)&&d.applyBlending(e,i,r),(t!==i||n!==r||n.context!==r.context||o!==a)&&d.applyViewport(e,i,r,l,u)},d$1m.getState=function(e){if(!e$2b(e))throw new t$16("renderState is required.");return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:f$18.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:e$1U.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:e$2b(e.viewport)?f$18.clone(e.viewport):void 0}};var o$1b=new o$1p;function n$$(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var a$Y={};a$Y[de$x.FLOAT]="float",a$Y[de$x.FLOAT_VEC2]="vec2",a$Y[de$x.FLOAT_VEC3]="vec3",a$Y[de$x.FLOAT_VEC4]="vec4",a$Y[de$x.INT]="int",a$Y[de$x.INT_VEC2]="ivec2",a$Y[de$x.INT_VEC3]="ivec3",a$Y[de$x.INT_VEC4]="ivec4",a$Y[de$x.BOOL]="bool",a$Y[de$x.BOOL_VEC2]="bvec2",a$Y[de$x.BOOL_VEC3]="bvec3",a$Y[de$x.BOOL_VEC4]="bvec4",a$Y[de$x.FLOAT_MAT2]="mat2",a$Y[de$x.FLOAT_MAT3]="mat3",a$Y[de$x.FLOAT_MAT4]="mat4",a$Y[de$x.SAMPLER_2D]="sampler2D",a$Y[de$x.SAMPLER_CUBE]="samplerCube",n$$.prototype.getDeclaration=function(e){var t="uniform "+a$Y[this._datatype]+" "+e,i=this._size;return t+=1===i?";":"["+i.toString()+"];"};var i$Z={};i$Z[de$x.FLOAT]="f32",i$Z[de$x.FLOAT_VEC2]="vec2<f32>",i$Z[de$x.FLOAT_VEC3]="vec3<f32>",i$Z[de$x.FLOAT_VEC4]="vec4<f32>",i$Z[de$x.INT]="i32",i$Z[de$x.INT_VEC2]="vec2<i32>",i$Z[de$x.INT_VEC3]="vec3<i32>",i$Z[de$x.INT_VEC4]="vec4<i32>",i$Z[de$x.BOOL]="bool",i$Z[de$x.BOOL_VEC2]="vec2<bool>",i$Z[de$x.BOOL_VEC3]="vec3<bool>",i$Z[de$x.BOOL_VEC4]="vec4<bool>",i$Z[de$x.FLOAT_MAT2]="mat2x2<f32>",i$Z[de$x.FLOAT_MAT3]="mat3x3<f32>",i$Z[de$x.FLOAT_MAT4]="mat4x4<f32>",i$Z[de$x.SAMPLER_2D]="texture_2d<f32>",i$Z[de$x.SAMPLER_CUBE]="texture_cube<f32>",n$$.prototype.getWgslDeclaration=function(e){var t="";return this._datatype==de$x.SAMPLER_2D||this._datatype==de$x.SAMPLER_CUBE?(t+="var "+e+" : "+i$Z[this._datatype]+";\n",t+="var "+e+"Sampler : sampler;"):t+="uniform "+e+" : "+i$Z[this._datatype]+";",t};var l$19={czm_viewport:new n$$({size:1,datatype:de$x.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new n$$({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_model:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new n$$({size:1,datatype:de$x.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight2D:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_entireFrustum:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new n$$({size:1,datatype:de$x.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_cameraPositionWC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e._cameraPosition}}),czm_viewerPositionWC:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return p$1d.getTranslation(e.inverseView,o$1b)}}),czm_viewerPositionECEF:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return p$1d.getTranslation(e.inverseView,o$1b),o$1p.add(o$1b,e._relativeOrigin,o$1b),o$1b}}),czm_frameNumber:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new n$$({size:1,datatype:de$x.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new n$$({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new n$$({size:1,datatype:de$x.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new n$$({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapSize:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.specularEnvironmentMapsDimensions}}),czm_specularEnvironmentMapsMaximumLOD:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new n$$({size:9,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new n$$({size:1,datatype:de$x.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_resolutionScale:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.resolutionScale}}),czm_fogDensity:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.fogDensity}}),czm_imagerySplitPosition:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.imagerySplitPosition}}),czm_globeSplitPosition:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.globeSplitPosition}}),czm_geometricToleranceOverMeter:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new n$$({size:1,datatype:de$x.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.gamma}}),czm_sunColor:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.sunColor}}),czm_globeDepthTextureDim:new n$$({size:1,datatype:de$x.FLOAT_VEC2,getValue:function(e){return e.globeDepthTextureDim}}),czm_nonSelDepthTexture:new n$$({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.nonSelDepthTexture}}),czm_maskTexture:new n$$({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.maskTexture}}),czm_relativeOrigin:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e._relativeOrigin}}),czm_hdrEnvMap:new n$$({size:1,datatype:de$x.SAMPLER_2D,getValue:function(e){return e.hdrEnvMap}}),czm_toneMappingExposure:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.toneMappingExposure}}),czm_encodedOriginCameraPositionMCHigh:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.encodedOriginCameraPositionMCHigh}}),czm_encodedOriginCameraPositionMCLow:new n$$({size:1,datatype:de$x.FLOAT_VEC3,getValue:function(e){return e.encodedOriginCameraPositionMCLow}}),czm_eyeHeight:new n$$({size:1,datatype:de$x.FLOAT,getValue:function(e){return e.eyeHeight}})};function I$1m(e,t,i,n){switch(t.type){case e.FLOAT:return new d$1l(e,t,i,n);case e.FLOAT_VEC2:return new p$14(e,t,i,n);case e.FLOAT_VEC3:return new m$13(e,t,i,n);case e.FLOAT_VEC4:return new y$Y(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_2D_SHADOW:case e.SAMPLER_CUBE:return new f$10(e,t,i,n);case e.SAMPLER_2D_ARRAY:return new v$T(e,t,i,n);case e.INT:case e.BOOL:return new w$$(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new A$1f(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new x$1a(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new T$15(e,t,i,n);case e.FLOAT_MAT2:return new E$1c(e,t,i,n);case e.FLOAT_MAT3:return new U$16(e,t,i,n);case e.FLOAT_MAT4:return new M$17(e,t,i,n);default:throw new t$14("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function d$1l(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function p$14(e,t,i,n){this.name=i,this.value=void 0,this._value=new o$1o,this._gl=e,this._location=n}function m$13(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function y$Y(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function f$10(e,t,i,n){this.name=i,this.value=void 0,this._gl=e,this._location=n,this.textureUnitIndex=void 0}function v$T(e,t,i,n){this.name=i,this.value=void 0,this._gl=e,this._location=n,this.textureUnitIndex=void 0,this.lastBindTextureID=void 0}function w$$(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function A$1f(e,t,i,n){this.name=i,this.value=void 0,this._value=new o$1o,this._gl=e,this._location=n}function x$1a(e,t,i,n){this.name=i,this.value=void 0,this._value=new o$1p,this._gl=e,this._location=n}function T$15(e,t,i,n){this.name=i,this.value=void 0,this._value=new e$29,this._gl=e,this._location=n}d$1l.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))},p$14.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))},m$13.prototype.set=function(){var e=this.value;if(e$2b(e.red))e$1U.equals(e,this._value)||(this._value=e$1U.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue));else{if(!e$2b(e.x))throw new t$16('Invalid vec3 value for uniform "'+this.name+'".');o$1p.equals(e,this._value)||(this._value=o$1p.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z))}},y$Y.prototype.set=function(){var e=this.value;if(e$2b(e.red))e$1U.equals(e,this._value)||(this._value=e$1U.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha));else{if(!e$2b(e.x))throw new t$16('Invalid vec4 value for uniform "'+this.name+'".');e$29.equals(e,this._value)||(this._value=e$29.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w))}},f$10.prototype.set=function(){var e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);var t=this.value;e.bindTexture(t._target,t._texture)},f$10.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},v$T.prototype.set=function(){var e=this.value;if(!e$2b(e.id)||this.lastBindTextureID!==e.id){var t=this._gl;t.activeTexture(t.TEXTURE0+this.textureUnitIndex),t.bindTexture(e._target,e._texture),this.lastBindTextureID=e.id}},v$T.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},w$$.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))},A$1f.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))},x$1a.prototype.set=function(){var e=this.value;o$1p.equals(e,this._value)||(o$1p.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))},T$15.prototype.set=function(){var e=this.value;e$29.equals(e,this._value)||(e$29.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};var L$18=new Float32Array(4);function E$1c(e,t,i,n){this.name=i,this.value=void 0,this._value=new f$13,this._gl=e,this._location=n}E$1c.prototype.set=function(){if(!f$13.equalsArray(this.value,this._value,0)){f$13.clone(this.value,this._value);var e=f$13.toArray(this.value,L$18);this._gl.uniformMatrix2fv(this._location,!1,e)}};var V$_=new Float32Array(9);function U$16(e,t,i,n){this.name=i,this.value=void 0,this._value=new p$1e,this._gl=e,this._location=n}U$16.prototype.set=function(){if(!p$1e.equalsArray(this.value,this._value,0)){p$1e.clone(this.value,this._value);var e=p$1e.toArray(this.value,V$_);this._gl.uniformMatrix3fv(this._location,!1,e)}};var C$19=new Float32Array(16);function M$17(e,t,i,n){this.name=i,this.value=void 0,this._value=new p$1d,this._gl=e,this._location=n}function V$Z(e,t,i,n){switch(t.type){case e.FLOAT:return new A$1e(e,t,i,n);case e.FLOAT_VEC2:return new p$13(e,t,i,n);case e.FLOAT_VEC3:return new w$_(e,t,i,n);case e.FLOAT_VEC4:return new m$12(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new f$$(e,t,i,n);case e.INT:case e.BOOL:return new d$1k(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new F$17(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new T$14(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new U$15(e,t,i,n);case e.FLOAT_MAT2:return new x$19(e,t,i,n);case e.FLOAT_MAT3:return new E$1b(e,t,i,n);case e.FLOAT_MAT4:return new I$1l(e,t,i,n);default:throw new t$14("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function A$1e(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=e,this._location=n[0]}function p$13(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(2*r),this._gl=e,this._location=n[0]}function w$_(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(3*r),this._gl=e,this._location=n[0]}function m$12(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(4*r),this._gl=e,this._location=n[0]}function f$$(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=e,this._locations=n,this.textureUnitIndex=void 0}function d$1k(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r),this._gl=e,this._location=n[0]}function F$17(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(2*r),this._gl=e,this._location=n[0]}function T$14(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(3*r),this._gl=e,this._location=n[0]}function U$15(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(4*r),this._gl=e,this._location=n[0]}function x$19(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(4*r),this._gl=e,this._location=n[0]}function E$1b(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(9*r),this._gl=e,this._location=n[0]}function I$1l(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(16*r),this._gl=e,this._location=n[0]}M$17.prototype.set=function(){if(!p$1d.equalsArray(this.value,this._value,0)){p$1d.clone(this.value,this._value);var e=p$1d.toArray(this.value,C$19);this._gl.uniformMatrix4fv(this._location,!1,e)}},A$1e.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;r<t;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._gl.uniform1fv(this._location,i)},p$13.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1o.equalsArray(a,i,r)||(o$1o.pack(a,i,r),n=!0),r+=2}n&&this._gl.uniform2fv(this._location,i)},w$_.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(e$2b(a.red))(a.red!==i[r]||a.green!==i[r+1]||a.blue!==i[r+2])&&(i[r]=a.red,i[r+1]=a.green,i[r+2]=a.blue,n=!0);else{if(!e$2b(a.x))throw new t$16("Invalid vec3 value.");o$1p.equalsArray(a,i,r)||(o$1p.pack(a,i,r),n=!0)}r+=3}n&&this._gl.uniform3fv(this._location,i)},m$12.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(e$2b(a.red))e$1U.equalsArray(a,i,r)||(e$1U.pack(a,i,r),n=!0);else{if(!e$2b(a.x))throw new t$16("Invalid vec4 value.");e$29.equalsArray(a,i,r)||(e$29.pack(a,i,r),n=!0)}r+=4}n&&this._gl.uniform4fv(this._location,i)},f$$.prototype.set=function(){for(var e=this._gl,t=e.TEXTURE0+this.textureUnitIndex,i=this.value,n=i.length,r=0;r<n;++r){var o=i[r];e.activeTexture(t+r),e.bindTexture(o._target,o._texture)}},f$$.prototype._setSampler=function(e){this.textureUnitIndex=e;for(var t=this._locations,i=t.length,n=0;n<i;++n){var r=e+n;this._gl.uniform1i(t[n],r)}return e+i},d$1k.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;r<t;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._gl.uniform1iv(this._location,i)},F$17.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1o.equalsArray(a,i,r)||(o$1o.pack(a,i,r),n=!0),r+=2}n&&this._gl.uniform2iv(this._location,i)},T$14.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1p.equalsArray(a,i,r)||(o$1p.pack(a,i,r),n=!0),r+=3}n&&this._gl.uniform3iv(this._location,i)},U$15.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];e$29.equalsArray(a,i,r)||(e$29.pack(a,i,r),n=!0),r+=4}n&&this._gl.uniform4iv(this._location,i)},x$19.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];f$13.equalsArray(a,i,r)||(f$13.pack(a,i,r),n=!0),r+=4}n&&this._gl.uniformMatrix2fv(this._location,!1,i)},E$1b.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];p$1e.equalsArray(a,i,r)||(p$1e.pack(a,i,r),n=!0),r+=9}n&&this._gl.uniformMatrix3fv(this._location,!1,i)},I$1l.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];p$1d.equalsArray(a,i,r)||(p$1d.pack(a,i,r),n=!0),r+=16}n&&this._gl.uniformMatrix4fv(this._location,!1,i)};var V$Y=0;function g$18(e){var t=E$1a(e.vertexShaderText,e.fragmentShaderText);this._context=e.context,this._gl=e.gl,this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=e.attributeLocations,this._transformFeedbackVaryings=e.transformFeedbackVaryings,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._uniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=t.duplicateUniformNames,this._cachedShader=void 0,this._maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=t.fragmentShaderText,this._id=V$Y++,this._uniformBuffersNames={},this._nextUniformBufferPoint=0}function T$13(e){var t=[],i=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(e$2b(i))for(var n=i.length,r=0;r<n;r++){var o=i[r].trim(),a=o.slice(o.lastIndexOf(" ")+1);t.push(a)}return t}function E$1a(e,t){var i={};if(!e$1T.highpFloatSupported||!e$1T.highpIntSupported){var n,r,o,a,s=T$13(e),l=T$13(t),u=s.length,c=l.length;for(n=0;n<u;n++)for(r=0;r<c;r++)if(s[n]===l[r]){a="czm_mediump_"+(o=s[n]);var h=new RegExp(o+"\\b","g");t=t.replace(h,a),i[a]=o}}return{fragmentShaderText:t,duplicateUniformNames:i}}g$18._BaseCache={},Object.defineProperties(g$18.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return p$12(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return p$12(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return p$12(this),this._uniformsByName}},cachedShader:{get:function(){return this._cachedShader},set:function(e){this._cachedShader=e}},name:{get:function(){return""}},program:{get:function(){return this._program}},maximumTextureUnitIndex:{get:function(){return this._maximumTextureUnitIndex}},id:{get:function(){return this._id}}});var l$18="[SuperMap3D WebGL] ";function C$18(e,t){var i=t._vertexShaderText,n=t._fragmentShaderText,r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,i),e.compileShader(r);var o=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(o,n),e.compileShader(o);var a=e.createProgram();e.attachShader(a,r),e.attachShader(a,o),e.deleteShader(r),e.deleteShader(o);var s,l=t._attributeLocations;if(e$2b(l))for(var u in l)l.hasOwnProperty(u)&&e.bindAttribLocation(a,l[u],u);if(e$2b(t._transformFeedbackVaryings)&&e.transformFeedbackVaryings(a,t._transformFeedbackVaryings,e.SEPARATE_ATTRIBS),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS)){var c=t._debugShaders;if(!e.getShaderParameter(o,e.COMPILE_STATUS)){if(s=e.getShaderInfoLog(o),console.error(l$18+"Fragment shader compile log: "+s),e$2b(c)){var h=c.getTranslatedShaderSource(o);console.error(""!==h?l$18+"Translated fragment shader source:\n"+h:l$18+"Fragment shader translation failed.")}throw e.deleteProgram(a),new t$14("Fragment shader failed to compile. Compile log: "+s)}if(!e.getShaderParameter(r,e.COMPILE_STATUS)){if(s=e.getShaderInfoLog(r),console.error(l$18+"Vertex shader compile log: "+s),e$2b(c)){var d=c.getTranslatedShaderSource(r);console.error(""!==d?l$18+"Translated vertex shader source:\n"+d:l$18+"Vertex shader translation failed.")}throw e.deleteProgram(a),new t$14("Vertex shader failed to compile. Compile log: "+s)}throw s=e.getProgramInfoLog(a),console.error(l$18+"Shader program link log: "+s),e$2b(c)&&(console.error(l$18+"Translated vertex shader source:\n"+c.getTranslatedShaderSource(r)),console.error(l$18+"Translated fragment shader source:\n"+c.getTranslatedShaderSource(o))),e.deleteProgram(a),new t$14("Program failed to link. Link log: "+s)}var f=t._logShaderCompilation;return f&&(e$2b(s=e.getShaderInfoLog(r))&&s.length>0&&console.log(l$18+"Vertex shader compile log: "+s)),f&&(e$2b(s=e.getShaderInfoLog(o))&&s.length>0&&console.log(l$18+"Fragment shader compile log: "+s)),f&&(e$2b(s=e.getProgramInfoLog(a))&&s.length>0&&console.log(l$18+"Shader program link log: "+s)),a}function F$16(e,t,i){for(var n={},r=0;r<i;++r){var o=e.getActiveAttrib(t,r),a=e.getAttribLocation(t,o.name);n[o.name]={name:o.name,type:o.type,index:a}}return n}function O$O(e,t){for(var i={},n=[],r=[],o=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),a=0;a<o;++a){var s=e.getActiveUniform(t,a),l=-1!==s.name.indexOf("[0]",s.name.length-"[0]".length)?s.name.slice(0,s.name.length-3):s.name;if(0!==l.indexOf("gl_"))if(s.name.indexOf("[")<0){var u=e.getUniformLocation(t,l);if(null!==u){var c=I$1m(e,s,l,u);i[l]=c,n.push(c),c._setSampler&&r.push(c)}}else{var h,d,f,p,_=l.indexOf("[");if(_>=0){if(!e$2b(h=i[l.slice(0,_)]))continue;(d=h._locations).length<=1&&(f=h.value,null!==(p=e.getUniformLocation(t,l))&&(d.push(p),f.push(e.getUniform(t,p))))}else{d=[];for(var m=0;m<s.size;++m)null!==(p=e.getUniformLocation(t,l+"["+m+"]"))&&d.push(p);d.length>0&&(h=V$Z(e,s,l,d),i[l]=h,n.push(h),h._setSampler&&r.push(h))}}}return{uniformsByName:i,uniforms:n,samplerUniforms:r}}function w$Z(e,t){var i=[],n=[];for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=r,s=e._duplicateUniformNames[a];e$2b(s)&&(o.name=s,a=s);var l=l$19[a];e$2b(l)?i.push({uniform:o,automaticUniform:l}):n.push(o)}return{automaticUniforms:i,manualUniforms:n}}function k$$(e,t,i){e.useProgram(t);for(var n=0,r=i.length,o=0;o<r;++o)n=i[o]._setSampler(n);return e.useProgram(null),n}function p$12(e){if(!e$2b(e._program)){var t=e._gl,i=C$18(t,e,e._debugShaders),n=t.getProgramParameter(i,t.ACTIVE_ATTRIBUTES),r=O$O(t,i),o=w$Z(e,r.uniformsByName);e._program=i,e._numberOfVertexAttributes=n,e._vertexAttributes=F$16(t,i,n),e._uniformsByName=r.uniformsByName,e._uniforms=r.uniforms,e._automaticUniforms=o.automaticUniforms,e._manualUniforms=o.manualUniforms,e._maximumTextureUnitIndex=k$$(t,i,r.samplerUniforms)}}function V$X(e,t,i){switch(i){case"float":case"f32":return new c$14(e,t);case"vec2":case"vec2<f32>":return new _$Y(e,t);case"vec3":case"vec3<f32>":return new m$11(e,t);case"vec4":case"vec4<f32>":return new p$11(e,t);case"texture2D":return new f$_(e,t);case"texture2DArray":return new d$1j(e,t);case"int":case"bool":case"i32":return new y$X(e,t);case"int2":case"bool2":case"vec2<i32>":return new x$18(e,t);case"int3":case"bool3":case"vec3<i32>":return new w$Y(e,t);case"int4":case"bool4":case"vec4<i32>":return new U$14(e,t);case"mat2":case"mat2x2<f32>":return new A$1d(e,t);case"mat3":case"mat3x3<f32>":return new I$1k(e,t);case"mat4":case"mat4x4<f32>":return new q$17(e,t);default:throw new t$14('Unrecognized for uniform "'+t+'".')}}function c$14(e,t){this.name=t,this.value=void 0,this._value=0,this._effect=e}function _$Y(e,t){this.name=t,this.value=void 0,this._value=new o$1o,this._effect=e}function m$11(e,t){this.name=t,this.value=void 0,this._value=void 0,this._effect=e}function p$11(e,t){this.name=t,this.value=void 0,this._value=void 0,this._effect=e,this._valueType=-1}function f$_(e,t){this.name=t,this.value=void 0,this._effect=e,this.id=void 0}function d$1j(e,t){this.name=t,this.value=void 0,this._effect=e,this.lastBindTextureID=void 0}function y$X(e,t){this.name=t,this.value=void 0,this._value=0,this._effect=e}function x$18(e,t){this.name=t,this.value=void 0,this._value=new o$1o,this._effect=e}function w$Y(e,t){this.name=t,this.value=void 0,this._value=new o$1p,this._effect=e}function U$14(e,t){this.name=t,this.value=void 0,this._value=new e$29,this._effect=e}g$18.prototype._bind=function(){p$12(this),this._gl.useProgram(this._program)},g$18.prototype._setUniforms=function(e,t,i,n){var r,o;if(e$2b(e)){var a=this._manualUniforms;for(r=a.length,o=0;o<r;++o){var s=a[o];s.value=e[s.name]()}}var l=this._automaticUniforms;for(r=l.length,o=0;o<r;++o){var u=l[o];u.uniform.value=u.automaticUniform.getValue(t)}var c=this._uniforms;for(r=c.length,o=0;o<r;++o)c[o].set();if(this._context.webgl2){const e=n._uniformBuffers;for(this.initUniformBufferBindPoint(e),o=0,r=e.length;o<r;o++){var h=e[o];this.bindUniformBuffer(h.buffer.getBuffer(),h.name)}}if(i){var d=this._gl,f=this._program;if(d.validateProgram(f),!d.getProgramParameter(f,d.VALIDATE_STATUS))throw new t$16("Program validation failed. Program info log: "+d.getProgramInfoLog(f))}},g$18.prototype.initUniformBufferBindPoint=function(e){if(this._nextUniformBufferPoint>0||0==e.length||!this._context.webgl2)return;const t=this.program,i=this._context._uniformBufferEngine;var n,r;for(n=0,r=e.length;n<r;n++){const r=e[n]._ubo,o=this._allocateBindingPointIndexForUniformBuffer(r.name);i.bindUniformBlock(t,r.name,o)}},g$18.prototype.bindUniformBuffer=function(e,t){const i=this._uniformBuffersNames[t];void 0!==i&&g$18._BaseCache[i]!==e&&(g$18._BaseCache[i]=e,this._context._uniformBufferEngine.bindUniformBufferBase(e,i,t))},g$18.prototype._allocateBindingPointIndexForUniformBuffer=function(e){var t=this._nextUniformBufferPoint;return this._uniformBuffersNames[e]=t,this._nextUniformBufferPoint++,t},g$18.prototype._isReady=function(){return!0},g$18.prototype.isDestroyed=function(){return!1},g$18.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)},g$18.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),i$10(this)},c$14.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._effect.setFloat(this.name,this.value))},_$Y.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._effect.setFloat2(this.name,e.x,e.y))},m$11.prototype.set=function(){var e=this.value;if(e$2b(e.red))e$1U.equals(e,this._value)||(this._value=e$1U.clone(e,this._value),this._effect.setFloat3(this.name,e.red,e.green,e.blue));else{if(!e$2b(e.x))throw new t$16('Invalid vec3 value for uniform "'+this.name+'".');o$1p.equals(e,this._value)||(this._value=o$1p.clone(e,this._value),this._effect.setFloat3(this.name,e.x,e.y,e.z))}},p$11.prototype.set=function(){var e=this.value;this._valueType<0&&(e$2b(e.red)?this._valueType=0:e$2b(e.x)&&(this._valueType=1)),0==this._valueType?e$1U.equals(e,this._value)||(this._value=e$1U.clone(e,this._value),this._effect.setFloat4(this.name,e.red,e.green,e.blue,e.alpha)):e$29.equals(e,this._value)||(this._value=e$29.clone(e,this._value),this._effect.setFloat4(this.name,e.x,e.y,e.z,e.w))},f$_.prototype.set=function(){var e=this.value,t=this._effect.getEngine(),i=e._inner._texture.getInternalTexture();t._setInternalTexture(this.name,i,this.name)},f$_.prototype.getUniqueId=function(e){var t=this.value;this._effect.getEngine();var i=t._inner._texture.getInternalTexture();e.push(i.uniqueId)},d$1j.prototype.set=function(){var e=this.value;this._effect.setTextureArray(this.name,e._texture)},y$X.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._effect.setInt(this.name,this.value))},x$18.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._effect.setInt2(this.name,e.x,e.y))},w$Y.prototype.set=function(){var e=this.value;o$1p.equals(e,this._value)||(o$1p.clone(e,this._value),this._effect.setInt3(this.name,e.x,e.y,e.z))},U$14.prototype.set=function(){var e=this.value;e$29.equals(e,this._value)||(e$29.clone(e,this._value),this._effect.setInt3(this.name,e.x,e.y,e.z,e.w))};var z$Z=new Float32Array(4);function A$1d(e,t){this.name=t,this.value=void 0,this._value=new f$13,this._effect=e}A$1d.prototype.set=function(){if(!f$13.equalsArray(this.value,this._value,0)){f$13.clone(this.value,this._value);var e=f$13.toArray(this.value,z$Z);this._effect.setMatrix2x2(this.name,e)}};var C$17=new Float32Array(9);function I$1k(e,t){this.name=t,this.value=void 0,this._value=new p$1e,this._effect=e}I$1k.prototype.set=function(){if(!p$1e.equalsArray(this.value,this._value,0)){p$1e.clone(this.value,this._value);var e=p$1e.toArray(this.value,C$17);this._effect.setMatrix3x3(this.name,e)}};var F$15=new Float32Array(16),T$12=new Matrix;function q$17(e,t){this.name=t,this.value=void 0,this._value=new p$1d,this._effect=e}function j$17(e,t,i,n){switch(i){case"float":case"f32":return new A$1c(e,t,n);case"vec2":case"vec2<f32>":return new m$10(e,t,n);case"vec3":case"vec3<f32>":return new g$17(e,t,n);case"vec4":case"vec4<f32>":return new w$X(e,t,n);case"texture2D":case"textureCube":return new v$S(e,t,n);case"int":case"bool":case"u32":case"i32":return new d$1i(e,t,n);case"int2":case"bool2":case"vec2<u32>":case"vec2<i32>":return new b$1e(e,t,n);case"int3":case"bool3":case"vec3<u32>":case"vec3<i32>":return new I$1j(e,t,n);case"int4":case"bool4":case"vec4<u32>":case"vec4<i32>":return new x$17(e,t,n);case"mat2":case"mat2x2<f32>":return new U$13(e,t,n);case"mat3":case"mat3x3<f32>":return new q$16(e,t,n);case"mat4":case"mat4x4<f32>":return new k$_(e,t,n);default:throw new t$14('Unrecognized for uniform "'+t+'".')}}function A$1c(e,t,i){this.name=t,this._effect=e}function m$10(e,t,i){this.name=t,this._value=new Float32Array(2*i),this._effect=e}function g$17(e,t,i){this.name=t,this._value=new Float32Array(3*i),this._effect=e}function w$X(e,t,i){this.name=t,this._value=new Float32Array(4*i),this._effect=e}function v$S(e,t,i){this.name=t,this.value=new Array(i),this._effect=e}function d$1i(e,t,i){this.name=t,this._value=new Int32Array(i),this._effect=e}function b$1e(e,t,i){this.name=t,this._value=new Int32Array(2*i),this._effect=e}function I$1j(e,t,i){this.name=t,this._value=new Int32Array(3*i),this._effect=e}function x$17(e,t,i){this.name=t,this._value=new Int32Array(4*i),this._effect=e}function U$13(e,t,i){this.name=t,this._value=new Float32Array(9*i),this._effect=e}function q$16(e,t,i){this.name=t,this._value=new Float32Array(9*i),this._effect=e}function k$_(e,t,i){this.name=t,this._value=new Float32Array(16*i),this._effect=e}q$17.prototype.set=function(){p$1d.equalsArray(this.value,this._value,0)||(p$1d.clone(this.value,this._value),p$1d.toArray(this.value,F$15),Matrix.FromArrayToRef(F$15,0,T$12),this._effect.setMatrix(this.name,T$12))},A$1c.prototype.set=function(){this._effect.setArray(this.name,this.value)},m$10.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1o.equalsArray(a,i,r)||(o$1o.pack(a,i,r),n=!0),r+=2}n&&this._effect.setArray2(this.name,i)},g$17.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(e$2b(a.red))(a.red!==i[r]||a.green!==i[r+1]||a.blue!==i[r+2])&&(i[r]=a.red,i[r+1]=a.green,i[r+2]=a.blue,n=!0);else{if(!e$2b(a.x))throw new t$16("Invalid vec3 value.");o$1p.equalsArray(a,i,r)||(o$1p.pack(a,i,r),n=!0)}r+=3}n&&this._effect.setArray3(this.name,i)},w$X.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(e$2b(a.red))e$1U.equalsArray(a,i,r)||(e$1U.pack(a,i,r),n=!0);else{if(!e$2b(a.x))throw new t$16("Invalid vec4 value.");e$29.equalsArray(a,i,r)||(e$29.pack(a,i,r),n=!0)}r+=4}n&&this._effect.setArray4(this.name,i)},v$S.prototype.set=function(){for(var e=this.value,t=e.length,i=[],n=0;n<t;++n){var r=e[n];i.push(r._inner._texture)}this._effect.setTextureArray(this.name,i)},v$S.prototype._setSampler=function(e){return this.textureUnitIndex=e,e+length},v$S.prototype.getUniqueId=function(e){for(var t=this.value,i=t.length,n=0;n<i;++n){var r=t[n]._inner._texture.getInternalTexture();e.push(r.uniqueId)}},d$1i.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;r<t;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._effect.setIntArray(this.name,i)},b$1e.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1o.equalsArray(a,i,r)||(o$1o.pack(a,i,r),n=!0),r+=2}n&&this._effect.setIntArray2(this.name,i)},I$1j.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1p.equalsArray(a,i,r)||(o$1p.pack(a,i,r),n=!0),r+=3}n&&this._effect.setIntArray3(this.name,i)},x$17.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];e$29.equalsArray(a,i,r)||(e$29.pack(a,i,r),n=!0),r+=4}n&&this._effect.setIntArray4(this.name,i)},U$13.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];f$13.equalsArray(a,i,r)||(f$13.pack(a,i,r),n=!0),r+=4}n&&this._effect.setMatrices(this.name,i)},q$16.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];p$1e.equalsArray(a,i,r)||(p$1e.pack(a,i,r),n=!0),r+=9}n&&this._effect.setMatrices(this.name,i)},k$_.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];p$1d.equalsArray(a,i,r)||(p$1d.pack(a,i,r),n=!0),r+=16}n&&this._effect.setMatrices(this.name,i)};var _0x53f884=(_0x244494=!0,function(e,t){var i=_0x244494?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x244494=!1,i}),_0x31c941=_0x53f884(void 0,(function(){return _0x31c941.toString().search("(((.+)+)+)+$").toString().constructor(_0x31c941).search("(((.+)+)+)+$")})),_0x244494;function _0x3422be(e,t){void 0===t&&(t=!0),this.effect=null,this.defines=null,this.drawContext=e.createDrawContext(),t&&(this.materialContext=e.createMaterialContext())}_0x31c941(),_0x3422be.IsWrapper=function(e){return void 0===e.getPipelineContext},_0x3422be.GetEffect=function(e){return void 0===e.getPipelineContext?e.effect:e},_0x3422be.prototype.setEffect=function(e,t,i){var n;void 0===i&&(i=!0),this.effect=e,void 0!==t&&(this.defines=t),i&&(null===(n=this.drawContext)||void 0===n||n.reset())},_0x3422be.prototype.dispose=function(){var e;null===(e=this.drawContext)||void 0===e||e.dispose()};var _0x2b2775=(_0x2f1df5=!0,function(e,t){var i=_0x2f1df5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f1df5=!1,i}),_0x2c0607=_0x2b2775(void 0,(function(){return _0x2c0607.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c0607).search("(((.+)+)+)+$")})),_0x2f1df5;_0x2c0607();var _0x292fbb={GLSL:0,WGSL:1,0:"GLSL",1:"WGSL"},_0x4cf79a=Object.freeze(_0x292fbb);function f$Z(){this._lastTextureId=[],this._lastLeftOverBufferID=-1,this._init=!1}function S$U(e,t){var i=/#define OUTPUT_DECLARATION/,n=e.split("\n");if(/#version 300 es/g.test(e))return e;var r,o,a=-1;for(r=0;r<n.length;++r)if(o=n[r],i.test(o)){a=r;break}if(-1===a)throw new t$16("Could not find a #define OUTPUT_DECLARATION!");var s=[];for(r=0;r<10;r++){var l="gl_FragData\\["+r+"\\]",u="czm_out"+r;new RegExp(l,"g").test(e)&&(L$17(u,s),g$16(l,u,n),n.splice(a,0,"layout(location = "+r+") out vec4 "+u+";"),a+=1)}var c="czm_fragColor";z$Y("gl_FragColor",n)&&(L$17(c,s),g$16("gl_FragColor",c,n),n.splice(a,0,"layout(location = 0) out vec4 czm_fragColor;"),a+=1);var h=P$13(s,n),d={};for(r=0;r<n.length;r++)for(var f in o=n[r],h)if(h.hasOwnProperty(f)){new RegExp("(layout)[^]+(out)[^]+("+f+")[^]+","g").test(o)&&(d[o]=f)}for(var p in d)if(d.hasOwnProperty(p)){var _,m=d[p],g=n.indexOf(p),x=h[m],v=x.length;for(_=0;_<v;_++)n.splice(g,0,x[_]);for(g+=v+1,_=v-1;_>=0;_--)n.splice(g,0,"#endif //"+x[_])}var y="#version 300 es",$=!1;for(r=0;r<n.length;r++)/#version/.test(n[r])&&(n[r]=y,$=!0);return $||n.splice(0,0,y),R$_("EXT_draw_buffers",n),R$_("EXT_frag_depth",n),g$16("texture2D","texture",n),g$16("texture3D","texture",n),g$16("textureCube","texture",n),g$16("gl_FragDepthEXT","gl_FragDepth",n),t?g$16("varying","in",n):(g$16("attribute","in",n),g$16("varying","out",n)),F$14(n)}function g$16(e,t,i){for(var n=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),r=i.length,o=0;o<r;++o){var a=i[o];i[o]=a.replace(n,"$1"+t+"$3")}}function m$$(e,t,i){for(var n=i.length,r=0;r<n;++r){var o=i[r];i[r]=o.replace(e,t)}}function z$Y(e,t){for(var i=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),n=t.length,r=0;r<n;++r){var o=t[r];if(i.test(o))return!0}return!1}function F$14(e){for(var t="",i=e.length,n=0;n<i;++n)t+=e[n]+"\n";return t}function L$17(e,t){-1===t.indexOf(e)&&t.push(e)}function P$13(e,t){for(var i={},n=e.length,r=[],o=0;o<t.length;++o){var a=t[o],s=/(#ifdef|#if)/g.test(a),l=/#else/g.test(a),u=/#endif/g.test(a);if(s)r.push(a);else if(l){var c=r[r.length-1].replace("ifdef","ifndef");/if/g.test(c)&&(c=c.replace(/(#if\s+)(\S*)([^]*)/,"$1!($2)$3")),r.pop(),r.push(c)}else if(u)r.pop();else if(!/layout/g.test(a))for(var h=0;h<n;++h){var d=e[h];-1!==a.indexOf(d)&&(e$2b(i[d])?i[d]=i[d].filter((function(e){return r.indexOf(e)>=0})):i[d]=r.slice())}}return i}function R$_(e,t){m$$(new RegExp("#extension\\s+GL_"+e+"\\s+:\\s+[a-zA-Z0-9]+\\s*$","g"),"",t)}Object.defineProperties(f$Z.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}}}),f$Z.prototype.isDirty=function(e,t){if(!this._init)return!0;var i=-1;if(e$2b(t.drawContext.buffers.LeftOver)&&(i=t.drawContext.buffers.LeftOver.uniqueId,t.effect._pipelineContext.uniformBuffer.getBuffer().uniqueId!=i))return!0;var n,r=e.length,o=[];for(n=0;n<r;++n)e[n].getUniqueId(o);if((r=o.length)!==this._lastTextureId.length)return!0;for(n=0;n<r;++n)if(this._lastTextureId[n]!==o[n])return!0;return!1},f$Z.prototype.setBufferIDToContext=function(e){this._lastTextureId=[];var t,i=e.length;for(t=0;t<i;++t){var n=e[t];e[t].getUniqueId(this._lastTextureId),n.set()}this._init=!0},f$Z.prototype.isDestroyed=function(){return!1},f$Z.prototype.destroy=function(){return i$10(this)};var czm_degreesPerRadian$1="const float czm_degreesPerRadian = 57.29577951308232;\n",czm_depthRange$1="const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n",czm_ellipsoidInverseRadii$1="const vec3 czm_ellipsoidInverseRadii = vec3(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.314245);\n",czm_ellipsoidRadii$1="const vec3 czm_ellipsoidRadii = vec3(6378137.0, 6378137.0, 6356752.314245);\n",czm_epsilon1$1="const float czm_epsilon1 = 0.1;\n",czm_epsilon2$1="const float czm_epsilon2 = 0.01;\n",czm_epsilon3$1="const float czm_epsilon3 = 0.001;\n",czm_epsilon4$1="const float czm_epsilon4 = 0.0001;\n",czm_epsilon5$1="const float czm_epsilon5 = 0.00001;\n",czm_epsilon6$1="const float czm_epsilon6 = 0.000001;\n",czm_epsilon7$1="const float czm_epsilon7 = 0.0000001;\n",czm_infinity$1="const float czm_infinity = 5906376272000.0;\n",czm_oneOverPi$1="const float czm_oneOverPi = 0.3183098861837907;\n",czm_oneOverTwoPi$1="const float czm_oneOverTwoPi = 0.15915494309189535;\n",czm_passCesium3DTile$1="const float czm_passCesium3DTile = 4.0;\n",czm_passCesium3DTileClassification$1="const float czm_passCesium3DTileClassification = 5.0;\n",czm_passCesium3DTileClassificationIgnoreShow$1="const float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n",czm_passClassification$1="const float czm_passClassification = 7.0;\n",czm_passCompute$1="const float czm_passCompute = 1.0;\n",czm_passEnvironment$1="const float czm_passEnvironment = 0.0;\n",czm_passGlobe$1="const float czm_passGlobe = 2.0;\n",czm_passGround$1="const float czm_passGround = 4.0;\n",czm_passOpaque$1="const float czm_passOpaque = 12.0;\n",czm_passOverlay$1="const float czm_passOverlay = 20.0;\n",czm_passTerrainClassification$1="const float czm_passTerrainClassification = 3.0;\n",czm_passTranslucent$1="const float czm_passTranslucent = 18.0;\n",czm_pi$1="const float czm_pi = 3.141592653589793;\n",czm_piOverFour$1="const float czm_piOverFour = 0.7853981633974483;\n",czm_piOverSix$1="const float czm_piOverSix = 0.5235987755982988;\n",czm_piOverThree$1="const float czm_piOverThree = 1.0471975511965976;\n",czm_piOverTwo$1="const float czm_piOverTwo = 1.5707963267948966;\n",czm_radiansPerDegree$1="const float czm_radiansPerDegree = 0.017453292519943295;\n",czm_sceneMode2D$1="const float czm_sceneMode2D = 2.0;\n",czm_sceneMode3D$1="const float czm_sceneMode3D = 3.0;\n",czm_sceneModeColumbusView$1="const float czm_sceneModeColumbusView = 1.0;\n",czm_sceneModeMorphing$1="const float czm_sceneModeMorphing = 0.0;\n",czm_solarRadius$1="const float czm_solarRadius = 695500000.0;\n",czm_threePiOver2$1="const float czm_threePiOver2 = 4.71238898038469;\n",czm_twoPi$1="const float czm_twoPi = 6.283185307179586;\n",czm_webMercatorMaxLatitude$1="const float czm_webMercatorMaxLatitude = 1.4844222297453324;\n",czm_depthRangeStruct$1="struct czm_depthRangeStruct\n{\nfloat near;\nfloat far;\n};\n",czm_ellipsoid$1="struct czm_ellipsoid\n{\nvec3 center;\nvec3 radii;\nvec3 inverseRadii;\nvec3 inverseRadiiSquared;\n};\n",czm_material$1="struct czm_material\n{\nvec3 diffuse;\nfloat specular;\nfloat shininess;\nvec3 normal;\nvec3 emission;\nfloat alpha;\n};\n",czm_materialInput$1="struct czm_materialInput\n{\nfloat s;\nvec2 st;\nvec3 str;\nvec3 normalEC;\nmat3 tangentToEyeMatrix;\nvec3 positionToEyeEC;\nfloat height;\nfloat slope;\n};\n",czm_ray$1="struct czm_ray\n{\nvec3 origin;\nvec3 direction;\n};\n",czm_raySegment$1="struct czm_raySegment\n{\nfloat start;\nfloat stop;\n};\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n",czm_s3mMaterialInput$1="struct czm_s3mMaterialInput\n{\nvec4 ambientColor;\nvec4 diffuseColor;\nvec4 ambientLightColor;\nvec4 sunLightColor;\nmat4 texMatrix;\nfloat texture0Width;\nfloat texture1Width;\nvec3 sunDirectionEC;\nfloat sunLightON;\n};\n",czm_shadowParameters$1="struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\nvec3 texCoords;\n#else\nvec2 texCoords;\n#endif\nfloat depthBias;\nfloat depth;\nfloat nDotL;\nvec2 texelStepSize;\nfloat normalShadingSmooth;\nfloat darkness;\nvec4 uvRange;\nfloat shadowMapIndex;\n};\n",czm_acesTonemapping$1="vec3 czm_acesTonemapping(vec3 color) {\nfloat g = 0.985;\nfloat a = 0.065;\nfloat b = 0.0001;\nfloat c = 0.433;\nfloat d = 0.238;\ncolor = (color * (color + a) - b) / (color * (g * color + c) + d);\ncolor = clamp(color, 0.0, 1.0);\nreturn color;\n}\n",czm_adjustColor$1="uniform float uBrightness;\nuniform float uContrast;\nuniform float uHue;\nuniform float uSaturation;\nuniform float uOneOverGamma;\nvec3 czm_adjustColor(vec3 inputColor)\n{\nvec3 outputColor = inputColor;\noutputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\noutputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\noutputColor.rgb = czm_hue(outputColor.rgb, uHue);\noutputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\noutputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\noutputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\nreturn outputColor;\n}\n",czm_alphaWeight$1="float czm_alphaWeight(float a)\n{\nfloat z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\nreturn pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n",czm_antialias$1="vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\nfloat val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\nfloat val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\nval1 = val1 * (1.0 - val2);\nval1 = val1 * val1 * (3.0 - (2.0 * val1));\nval1 = pow(val1, 0.5);\nvec4 midColor = (color1 + color2) * 0.5;\nreturn mix(midColor, currentColor, val1);\n}\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\nreturn czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n",czm_approximateSphericalCoordinates$1="vec2 czm_approximateSphericalCoordinates(vec3 normal) {\nfloat latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\nfloat longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\nreturn vec2(latitudeApproximation, longitudeApproximation);\n}\n",czm_branchFreeTernary$1="float czm_branchFreeTernary(bool comparison, float a, float b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\n",czm_cascadeColor$1="vec4 czm_cascadeColor(vec4 weights)\n{\nreturn vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\nvec4(0.0, 1.0, 0.0, 1.0) * weights.y +\nvec4(0.0, 0.0, 1.0, 1.0) * weights.z +\nvec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n",czm_cascadeDistance$1="uniform vec4 shadowMap_cascadeDistances;\nfloat czm_cascadeDistance(vec4 weights)\n{\nreturn dot(shadowMap_cascadeDistances, weights);\n}\n",czm_cascadeMatrix$1="uniform mat4 shadowMap_cascadeMatrices[4];\nmat4 czm_cascadeMatrix(vec4 weights)\n{\nreturn shadowMap_cascadeMatrices[0] * weights.x +\nshadowMap_cascadeMatrices[1] * weights.y +\nshadowMap_cascadeMatrices[2] * weights.z +\nshadowMap_cascadeMatrices[3] * weights.w;\n}\n",czm_cascadeWeights$1="uniform vec4 shadowMap_cascadeSplits[2];\nvec4 czm_cascadeWeights(float depthEye)\n{\nvec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\nvec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\nreturn near * far;\n}\n",czm_clip$1="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform float clip_mode;\nuniform vec4 clip_planes[6];\nuniform vec4 clip_line_color;\nconst float clip_lineWidth = 3.0;\nfloat GetClipDistance(vec3 pos, vec3 planeNormal, float disToOrigin)\n{\nreturn dot(planeNormal, pos) + disToOrigin;\n}\nfloat ClipBehindAllPlane(float fBorderWidth, vec4 clip_vertex)\n{\nfloat distance = 0.0;\nfloat result = -1.0;\n#ifdef CLIPPLANE\ndistance = GetClipDistance(clip_vertex.xyz, clip_planes[0].xyz, clip_planes[0].w);\nif (distance < 0.0)\n{\nreturn 1.0;\n}\nelse if (distance < fBorderWidth)\n{\nresult = 0.0;\n}\n#else\nfor(int i = 0; i < 6; i++)\n{\ndistance = GetClipDistance(clip_vertex.xyz, clip_planes[i].xyz, clip_planes[i].w);\nif(distance < 0.0)\n{\nreturn 1.0;\n}\nelse if(distance < fBorderWidth)\n{\nresult = 0.0;\n}\n}\n#endif\nreturn result;\n}\nfloat ClipBehindAnyPlane(float fBorderWidth, vec4 clip_vertex)\n{\nfloat result = 1.0;\nfor(int i = 0; i < 6; i++)\n{\nfloat distance = GetClipDistance(clip_vertex.xyz, clip_planes[i].xyz, clip_planes[i].w);\nif((distance + fBorderWidth) < 0.0)\n{\nreturn -1.0;\n}\nelse if(distance < 0.0)\n{\nresult = 0.0;\n}\n}\nreturn result;\n}\nfloat ClipAnythingButLine(float fBorderWidth, vec4 clip_vertex)\n{\nfloat result = -1.0;\nfor(int i = 0; i < 6; i++)\n{\nfloat distance = GetClipDistance(clip_vertex.xyz, clip_planes[i].xyz, clip_planes[i].w);\nif(distance < 0.0)\n{\nreturn -1.0;\n}\nelse if(distance < fBorderWidth)\n{\nresult = 0.0;\n}\n}\nreturn result;\n}\nvec4 czm_clip(vec4 clip_vertex, float fIsFiltByID)\n{\nif(fIsFiltByID < 0.1)\n{\nreturn vec4(1.0);\n}\nif(clip_mode < 0.5)\n{\nreturn vec4(1.0);\n}\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nfloat dxc = abs(dFdx(clip_vertex.x));\nfloat dyc = abs(dFdy(clip_vertex.y));\nfloat fBorderWidth = max(dxc, dyc) * clip_lineWidth;\n#else\nfloat fBorderWidth = clip_lineWidth;\n#endif\nfloat clipResult = 1.0;\nif(clip_line_color.a < 0.01)\n{\nfBorderWidth = 0.0;\n}\nif(clip_mode < 1.5)\n{\nclipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n}\nelse if(clip_mode < 2.5)\n{\nclipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n}\nelse if(clip_mode < 3.5)\n{\nclipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n}\nif(clipResult < -0.5)\n{\ndiscard;\n}\nelse if(clipResult < 0.5)\n{\nreturn clip_line_color;\n}\nelse\n{\nreturn vec4(1.0);\n}\n}\n",czm_columbusViewMorph$1="vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)\n{\nvec3 p = mix(position2D.xyz, position3D.xyz, time);\nreturn vec4(p, 1.0);\n}\n",czm_computeLightColorInFP="vec4 czm_computeLightColorInFP(czm_s3mMaterialInput material, vec3 positionMC, float hasNormal, vec3 normal)\n{\nvec3 normalEC;\nif(hasNormal > 0.9)\n{\nnormalEC = normalize(normal);\n}\nelse\n{\nnormalEC = normalize(czm_normal*czm_computeNormal(positionMC));\n}\nvec3 positionEC = vec3(czm_modelView * vec4(positionMC,1.0)).xyz;\nreturn czm_directionLight(material, normalEC, -positionEC, positionMC);\n}\n",czm_computeLightColorInstanceInFP="vec4 czm_computeLightColorInstanceInFP(czm_s3mMaterialInput material, vec3 positionRotateMC, vec3 positionMC, float hasNormal, vec3 normal)\n{\nvec3 normalEC;\nif(hasNormal > 0.9)\n{\nnormalEC = normalize(normal);\n}\nelse\n{\nnormalEC = normalize(czm_normal*czm_computeNormal(positionRotateMC));\n}\nvec3 positionEC = vec3(czm_modelView * vec4(positionMC,1.0)).xyz;\nreturn czm_directionLight(material, normalEC, -positionEC, positionMC);\n}\n",czm_computeNormal$1="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvec3 czm_computeNormal(in vec3 oriVertex)\n{\nvec3 normal = cross(vec3(dFdx(oriVertex.x), dFdx(oriVertex.y), dFdx(oriVertex.z)), vec3(dFdy(oriVertex.x), dFdy(oriVertex.y), dFdy(oriVertex.z)));\nnormal = normalize(normal);\nreturn normal;\n}\n",czm_computePosition$1="vec4 czm_computePosition();\n",czm_cosineAndSine$1="vec2 cordic(float angle)\n{\nvec2 vector = vec2(6.0725293500888267e-1, 0.0);\nfloat sense = (angle < 0.0) ? -1.0 : 1.0;\nmat2 rotation = mat2(1.0, sense, -sense, 1.0);\nvector = rotation * vector;\nangle -= sense * 7.8539816339744828e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfloat factor = sense * 5.0e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.6364760900080609e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.5e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.4497866312686414e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.25e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.2435499454676144e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 6.25e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 6.2418809995957350e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.125e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.1239833430268277e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.5625e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.5623728620476831e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 7.8125e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 7.8123410601011111e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.90625e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.9062301319669718e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.953125e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.9531225164788188e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 9.765625e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 9.7656218955931946e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 4.8828125e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.8828121119489829e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.44140625e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.4414062014936177e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.220703125e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.2207031189367021e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 6.103515625e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 6.1035156174208773e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.0517578125e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.0517578115526096e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.52587890625e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.5258789061315762e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 7.62939453125e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 7.6293945311019700e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.814697265625e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.8146972656064961e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.9073486328125e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.9073486328101870e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 9.5367431640625e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 9.5367431640596084e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 4.76837158203125e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.7683715820308884e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.384185791015625e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.3841857910155797e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.1920928955078125e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nreturn vector;\n}\nvec2 czm_cosineAndSine(float angle)\n{\nif (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n{\nif (angle < 0.0)\n{\nreturn -cordic(angle + czm_pi);\n}\nelse\n{\nreturn -cordic(angle - czm_pi);\n}\n}\nelse\n{\nreturn cordic(angle);\n}\n}\n",czm_decompressTextureCoordinates$1="vec2 czm_decompressTextureCoordinates(float encoded)\n{\nfloat temp = encoded / 4096.0;\nfloat xZeroTo4095 = floor(temp);\nfloat stx = xZeroTo4095 / 4095.0;\nfloat sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\nreturn vec2(stx, sty);\n}\n",czm_depthClampFarPlane$1="#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\nvec4 czm_depthClampFarPlane(vec4 coords)\n{\n#ifndef LOG_DEPTH\nv_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\ncoords.z = min(coords.z, coords.w);\n#endif\nreturn coords;\n}\n",czm_directionLight="const vec3 SideLightColor = vec3(0.0);\nuniform vec4 uSpecularColor;\nuniform float uShininess;\nconst vec3 specular = vec3(0.066666);\nconst float shininess2 = 30.0;\nfloat saturate( in float a ) { return clamp( a, 0.0, 1.0 ); }\nfloat calcLightAttenuation( float lightDistance, float cutoffDistance, float decayExponent ) {\nif ( decayExponent > 0.0 ) {\nreturn pow( saturate( 1.0 - lightDistance / cutoffDistance ), decayExponent );\n}\nreturn 1.0;\n}\n#if POINT_LIGHTS > 0\nuniform vec3 uPointLightPositionEC[POINT_LIGHTS];\nuniform vec3 uPointLightColor[POINT_LIGHTS];\nuniform vec2 uPointLightDistanceAndDecay[POINT_LIGHTS];\n#endif\n#if SPOT_LIGHTS > 0\nuniform vec3 uSpotLightPosition[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightDirection[ SPOT_LIGHTS ];\nuniform float uSpotLightExponent[ SPOT_LIGHTS ];\nuniform vec4 uSpotLightDistanceDecayCosPenumbra[ SPOT_LIGHTS ];\n#endif\n#if DIR_LIGHTS > 0\nuniform vec3 uDirectionalLightDirection[ DIR_LIGHTS ];\nuniform vec3 uDirectionalLightColor[ DIR_LIGHTS];\n#endif\n#if HEMISPHERE_LIGHTS > 0\nuniform vec3 uSkyColor[ HEMISPHERE_LIGHTS ];\nuniform vec3 uGroundColor[ HEMISPHERE_LIGHTS];\n#endif\nvec4 czm_directionLight(czm_s3mMaterialInput material, vec3 normalEC, vec3 positionToEyeEC, vec3 positionMC)\n{\nvec3 totalDiffuseLight = vec3(0.0);\nvec3 totalSpecularLight = vec3(0.0);\nfloat sunLightDiffuseWeight = max( dot( normalEC, material.sunDirectionEC ), 0.0 );\nfloat sideLightDiffuseWeight = max( dot( normalEC, vec3(0.0,0.0,1.0) ), 0.0 );\ntotalDiffuseLight = material.sunLightColor.rgb * sunLightDiffuseWeight * material.sunLightON + sideLightDiffuseWeight * SideLightColor;\nvec3 positionToEyeECDir = normalize(positionToEyeEC);\n#if HEMISPHERE_LIGHTS > 0\nfor ( int i = 0; i < HEMISPHERE_LIGHTS; i ++ )\n{\nvec3 dirVectorEC = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\nfloat dotProduct = dot( normalEC, dirVectorEC );\nvec3 skyColor = uSkyColor[i];\nvec3 groundColor = uGroundColor[i];\nfloat hemiDiffuseWeight = 0.5 * dotProduct + 0.5;\nvec3 irradiance = mix( groundColor, skyColor, hemiDiffuseWeight );\nirradiance *= 3.141592653589793;\ntotalDiffuseLight += irradiance;\n}\n#endif\n#if DIR_LIGHTS > 0\nfor ( int i = 0; i < DIR_LIGHTS; i ++ )\n{\nvec3 dirVectorEC = normalize((czm_view * vec4(uDirectionalLightDirection[ i ], 0.0)).xyz);\nfloat dotProduct = dot( normalEC, dirVectorEC );\nfloat dirDiffuseWeight = max( dotProduct, 0.0 );\ntotalDiffuseLight += uDirectionalLightColor[ i ] * dirDiffuseWeight;\n}\n#endif\n#if POINT_LIGHTS > 0\nfor ( int i = 0; i < POINT_LIGHTS; i ++ )\n{\nvec3 lVector = uPointLightPositionEC[i] + positionToEyeEC;\nfloat lengthToLight = length( lVector );\nfloat cutoffDis = uPointLightDistanceAndDecay[i].x;\nif(lengthToLight > cutoffDis)\n{\ncontinue;\n}\nfloat attenuation = calcLightAttenuation( lengthToLight, cutoffDis, uPointLightDistanceAndDecay[i].y);\nlVector = normalize( lVector );\nfloat dotProduct = dot( normalEC, lVector );\nfloat pointLightDiffuse = max( dotProduct, 0.0 );\ntotalDiffuseLight += uPointLightColor[i] * pointLightDiffuse * attenuation;\nvec3 pointHalfVector = normalize( lVector + positionToEyeECDir );\nfloat pointDotNormalHalf = max( dot( normalEC, pointHalfVector ), 0.0 );\nfloat pointSpecularWeight = max( pow( pointDotNormalHalf, shininess2 ), 0.0 );\nfloat specularNormalization = ( shininess2 + 2.0 ) / 8.0;\nvec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, pointHalfVector ), 0.0 ), 5.0 );\ntotalSpecularLight += schlick * uPointLightColor[ i ] * pointSpecularWeight * pointLightDiffuse * attenuation * specularNormalization;\n}\n#endif\n#if SPOT_LIGHTS > 0\nvec3 positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;\nfor ( int i = 0; i < SPOT_LIGHTS; i ++ )\n{\nvec3 lVector = uSpotLightPositionEC[i] + positionToEyeEC;\nfloat attenuation = calcLightAttenuation( length( lVector ), uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\nlVector = normalize( lVector );\nfloat spotEffect = dot( uSpotLightDirection[ i ], normalize( uSpotLightPosition[ i ] - positionWC ) );\nif ( spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z ) {\nspotEffect = max( pow( max( spotEffect, 0.0 ), uSpotLightExponent[ i ] ), 0.0 );\nfloat dotProduct = dot( normalEC, lVector );\nfloat spotDiffuseWeight = max( dotProduct, 0.0 );\ntotalDiffuseLight += uSpotLightColor[ i ] * spotDiffuseWeight * attenuation * spotEffect;\nvec3 spotHalfVector = normalize( lVector + positionToEyeECDir );\nfloat spotDotNormalHalf = max( dot( normalEC, spotHalfVector ), 0.0 );\nfloat spotSpecularWeight = max( pow( spotDotNormalHalf, shininess2 ), 0.0 );\nfloat specularNormalization = ( shininess2 + 2.0 ) / 8.0;\nvec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\ntotalSpecularLight += schlick * uSpotLightColor[ i ] * spotSpecularWeight * spotDiffuseWeight * attenuation * specularNormalization * spotEffect;\n}\n}\n#endif\nvec4 color = vec4(material.diffuseColor.rgb * totalDiffuseLight + material.ambientColor.rgb * material.ambientLightColor.rgb * 0.6 + totalSpecularLight, material.diffuseColor.a);\nreturn color;\n}\n",czm_eastNorthUpToEyeCoordinates$1="mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\nvec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0));\nvec3 tangentEC = normalize(czm_normal3D * tangentMC);\nvec3 bitangentEC = normalize(cross(normalEC, tangentEC));\nreturn mat3(\ntangentEC.x, tangentEC.y, tangentEC.z,\nbitangentEC.x, bitangentEC.y, bitangentEC.z,\nnormalEC.x, normalEC.y, normalEC.z);\n}\n",czm_ellipsoidContainsPoint$1="bool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\nvec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\nreturn (dot(scaled, scaled) <= 1.0);\n}\n",czm_ellipsoidNew$1="czm_ellipsoid czm_ellipsoidNew(vec3 center, vec3 radii)\n{\nvec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\nvec3 inverseRadiiSquared = inverseRadii * inverseRadii;\nczm_ellipsoid temp = czm_ellipsoid(center, radii, inverseRadii, inverseRadiiSquared);\nreturn temp;\n}\n",czm_ellipsoidWgs84TextureCoordinates$1="vec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\nreturn vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n",czm_equalsEpsilon$1="bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\nreturn (abs(left - right) <= epsilon);\n}\n",czm_executeExcavation$1="#ifdef EXCAVATION\nuniform sampler2D uExcavationTexture;\nuniform float uExcavationMode;\nuniform vec4 uExcavationRect;\nvarying vec4 vExcavationVertexPos;\nvec2 CalculateExcavationPolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect)\n{\nvec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\nvec2 texCoord = vec2(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\ntexCoord.x = texCoord.x / vecRatio.x;\ntexCoord.y = texCoord.y / vecRatio.y;\nptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\ntexCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\nreturn texCoord;\n}\nbool czm_executeExcavation()\n{\nfloat hasExcavation = 1.0;\nvec2 vecExcavationTexCoord = CalculateExcavationPolyTexCoord(vExcavationVertexPos, uExcavationRect, hasExcavation);\nbool excavationInside = (uExcavationMode < 0.5);\nif(hasExcavation < 0.1)\n{\nreturn !excavationInside;\n}\nif(excavationInside)\n{\nreturn texture2D(uExcavationTexture, vecExcavationTexCoord.xy).r > 0.5;\n}\nelse\n{\nreturn texture2D(uExcavationTexture, vecExcavationTexCoord.xy).r < 0.5;\n}\n}\n#endif\n",czm_eyeOffset$1="vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\nvec4 p = positionEC;\nvec4 zEyeOffset = normalize(p) * eyeOffset.z;\np.xy += eyeOffset.xy + zEyeOffset.xy;\np.z += zEyeOffset.z;\nreturn p;\n}\n",czm_eyeToWindowCoordinates$1="vec4 czm_eyeToWindowCoordinates(vec4 positionEC)\n{\nvec4 q = czm_projection * positionEC;\nq.xyz /= q.w;\nq.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz;\nreturn q;\n}\n",czm_fastApproximateAtan$1="float czm_fastApproximateAtan(float x) {\nreturn x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\nfloat czm_fastApproximateAtan(float x, float y) {\nfloat t = abs(x);\nfloat opposite = abs(y);\nfloat adjacent = max(t, opposite);\nopposite = min(t, opposite);\nt = czm_fastApproximateAtan(opposite / adjacent);\nt = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\nt = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\nt = czm_branchFreeTernary(y < 0.0, -t, t);\nreturn t;\n}\n",czm_fog$1="vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)\n{\nfloat scalar = distanceToCamera * czm_fogDensity;\nfloat fog = 1.0 - exp(-(scalar * scalar));\nreturn mix(color, fogColor, fog);\n}\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)\n{\nfloat scalar = distanceToCamera * czm_fogDensity;\nfloat fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\nreturn mix(color, fogColor, fog);\n}\n",czm_gammaCorrect$1="vec3 czm_gammaCorrect(vec3 color) {\n#ifdef HDR\ncolor = pow(color, vec3(czm_gamma));\n#endif\nreturn color;\n}\nvec4 czm_gammaCorrect(vec4 color) {\n#ifdef HDR\ncolor.rgb = pow(color.rgb, vec3(czm_gamma));\n#endif\nreturn color;\n}\n",czm_geodeticSurfaceNormal$1="vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)\n{\nreturn normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial$1="czm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\nczm_material material;\nmaterial.diffuse = vec3(0.0);\nmaterial.specular = 0.0;\nmaterial.shininess = 1.0;\nmaterial.normal = materialInput.normalEC;\nmaterial.emission = vec3(0.0);\nmaterial.alpha = 1.0;\nreturn material;\n}\n",czm_getEmissiveTextureColor$1="uniform float uMaxCategoryOrHypCeil;\nuniform float uMinCategoryOrHypFloor;\nuniform sampler2D uEmissionTexAtlas;\nuniform vec4 uEmissionTexAtlasTilingAndOffset[EMISSION_TEXTURE_COUNT];\nuniform vec4 uEmissionTexAtlasRects[EMISSION_TEXTURE_COUNT];\nuniform float uLayerCornerLength;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 czm_getEmissiveTextureColor(float w)\n{\nvec3 texColor = vec3(0.0);\nvec2 emissionTexCoord;\nint nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\nvec2 atlasTexCoord;\nfor(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\nif(nEmissionTexTexIdx == i){\nemissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\nemissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\nemissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\nemissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\nemissionTexCoord.xy = fract(emissionTexCoord.xy);\natlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\nbreak;\n}\n}\ntexColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\nreturn texColor;\n}\nvec3 czm_getEmissiveTextureColor(float w, vec2 texCoord)\n{\nvec3 texColor = vec3(0.0);\nvec2 emissionTexCoord;\nint nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\nvec2 atlasTexCoord;\nfor(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\nif(nEmissionTexTexIdx == i){\nemissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\nemissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\nemissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\nemissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\nemissionTexCoord.xy = fract(emissionTexCoord.xy);\natlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\nbreak;\n}\n}\ntexColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\nreturn texColor;\n}\n",czm_getHorizontalColor$1="uniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\nfloat distanceToContour = uHorizontalLine;\nfloat dxc = abs(dFdx(fValue));\nfloat dyc = abs(dFdy(fValue));\nfloat dF = max(dxc, dyc);\nreturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\nvec4 czm_getHorizontalColor(vec4 oriColor, float fValue)\n{\nfloat finalOpacity = computeContourline(fValue);\nreturn mix(oriColor,uHorizontalColor, finalOpacity);\n}\n",czm_getHypsometricColor$1="uniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypsometricVisible;\nuniform float uHypOpacity;\nuniform float uHypContourInterval;\nuniform vec4 uHypLineColor;\nuniform float uHypContourFillMode;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypHasAnalysisRegion;\nvarying vec2 vecHypTexCoord;\nuniform float uMixColorType;\nuniform vec4 uNoValueColor;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uVolumeType;\n#endif\n#ifdef Volume2\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uFilterMode;\n#endif\nfloat computeMixCon(float fValue)\n{\nfloat distanceToContour;\nif(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n{\nif(fValue < 0.5)\n{\ndistanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n}\nelse\n{\nfloat t = floor(fValue / uHypContourInterval);\ndistanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n}\n}\nelse\n{\ndistanceToContour = abs(fValue - uHypMaxVisibleValue);\n}\nfloat dxc = abs(dFdx(fValue));\nfloat dyc = abs(dFdy(fValue));\nfloat dF = max(dxc, dyc);\nreturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\nvec4 computeContourMapColor(float fValue)\n{\nfloat threshold = abs(uHypCeil - uHypFloor);\nfloat contourRate = (fValue - uHypFloor) / threshold;\nfloat finalCoord = clamp(contourRate, 0.0, 1.0);\nfloat count = floor(finalCoord * 16.0);\nfloat y = (count*2.0 + 1.0)/32.0;\nfloat x = fract(finalCoord*16.0);\nif(y > 1.0)\n{\nx = 1.0;\n}\nvec2 contourCoord = vec2(x, y);\nreturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n#ifdef Volume2\nvec4 czm_getContourMapColor(vec4 oriColor, vec4 volColor)\n{\nif(uFilterMode > 0.5)\n{\nvec4 finalColor = volColor * oriColor;\nif(uMixColorType > 0.5)\n{\nfinalColor = volColor;\n}\nreturn finalColor;\n}\nvec4 contourMapColor = vec4(0.0);\nfloat finalOpacity = uHypOpacity;\nfloat noValue = volColor.a;\nfloat texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\nfloat fValue;\nif(noValue > 0.5)\n{\nfValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n}\nelse\n{\nfValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n}\nfloat extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\nif(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n{\nreturn uNoValueColor * oriColor;\n}\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nif(uHypContourFillMode > 2.9)\n{\nfloat mix_con = computeMixCon(fValue);\ncontourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n}\nelse if(uHypContourFillMode > 1.9)\n{\nfinalOpacity = computeMixCon(fValue);\ncontourMapColor = uHypLineColor;\n}\nelse if(uHypContourFillMode > 0.9)\n#else\nif(uHypContourFillMode > 0.9)\n#endif\n{\ncontourMapColor = computeContourMapColor(fValue);\n}\nelse\n{\nfinalOpacity = 0.0;\n}\nvec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\nvec4 finalColor = mixColor * oriColor;\n#ifdef PT_CLOUD\nfinalColor = mixColor;\n#endif\nif(uMixColorType > 0.5)\n{\nfinalColor = mixColor;\n}\nreturn finalColor;\n}\n#else\nvec4 czm_getContourMapColor(vec4 oriColor, float fValue)\n{\nvec4 contourMapColor = vec4(0.0);\nfloat finalOpacity = uHypOpacity;\n#ifdef Volume\nvec3 aRatioT = vecRotioCoord;\nif((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n{\nif(uVolumeType > 0.5)\n{\nvec4 volumeColor = czm_getVolumeValue(aRatioT);\nif(uMixColorType > 0.5)\n{\nvolumeColor = volumeColor * oriColor;\n}\nreturn volumeColor;\n}\nfloat noValue;\nfloat texTest = czm_getVolumeValue(aRatioT, noValue);\nif(noValue > 0.5)\n{\nfValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n}\nelse\n{\nfValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n}\n}\nelse\n{\nfValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n}\n#endif\nfloat extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\nif(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n{\nreturn uNoValueColor * oriColor;\n}\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nif(uHypContourFillMode > 2.9)\n{\nfloat mix_con = computeMixCon(fValue);\ncontourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n}\nelse if(uHypContourFillMode > 1.9)\n{\nfinalOpacity = computeMixCon(fValue);\ncontourMapColor = uHypLineColor;\n}\nelse if(uHypContourFillMode > 0.9)\n#else\nif(uHypContourFillMode > 0.9)\n#endif\n{\ncontourMapColor = computeContourMapColor(fValue);\n}\nelse\n{\nfinalOpacity = 0.0;\n}\nvec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\nvec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\nfinalColor = mixColor;\n#endif\n#ifdef Volume\nif(uMixColorType > 0.5)\n{\nfinalColor = mixColor;\n}\n#endif\nreturn finalColor;\n}\n#endif\n#ifdef Volume2\nvec4 czm_getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\nif(uHypHasAnalysisRegion > 0.1)\n{\nvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\nif(hypColor.r < 0.1)\n{\nreturn oriColor;\n}\n}\nreturn czm_getContourMapColor(oriColor, volColor);\n}\n#else\nvec4 czm_getHypsometricColor(vec4 oriColor, float wValue)\n{\nfloat fValue = wValue;\nif(uHypHasAnalysisRegion > 0.1)\n{\nvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\nif(hypColor.r < 0.1)\n{\nreturn oriColor;\n}\n}\nreturn czm_getContourMapColor(oriColor, fValue);\n}\nvec4 czm_getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\nif(uHypHasAnalysisRegion > 0.1)\n{\nvec2 polyTexCoord = vTexCoord.xy;\npolyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\npolyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\nif(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n{\nreturn oriColor;\n}\nvec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\nif(hypColor.r < 0.1)\n{\nreturn oriColor;\n}\n}\nreturn czm_getContourMapColor(oriColor, wValue);\n}\n#endif\n",czm_getLambertDiffuse$1="float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)\n{\nreturn max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getSpecular$1="float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\nvec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\nfloat specular = max(dot(toReflectedLight, toEyeEC), 0.0);\nreturn pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getTexColorForS3M="void CalculateMipLevel(in vec2 inTexCoord, in float vecTile, in float fMaxMip, inout float mipLevel)\n{\nvec2 dx = dFdx(inTexCoord * vecTile);\nvec2 dy = dFdy(inTexCoord * vecTile);\nfloat dotX = dot(dx, dx);\nfloat dotY = dot(dy, dy);\nfloat dMax = max(dotX, dotY);\nfloat dMin = min(dotX, dotY);\nfloat offset = (dMax - dMin) / (dMax + dMin);\noffset = clamp(offset, 0.0, 1.0);\nfloat d = dMax * (1.0 - offset) + dMin * offset;\nmipLevel = 0.5 * log2(d);\nmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\nvoid CalculateMipLevel(in vec2 inTexCoord, in vec2 vecTile, in float fMaxMip, inout float mipLevel)\n{\nvec2 dx = dFdx(inTexCoord * vecTile.x);\nvec2 dy = dFdy(inTexCoord * vecTile.y);\nfloat dotX = dot(dx, dx);\nfloat dotY = dot(dy, dy);\nfloat dMax = max(dotX, dotY);\nfloat dMin = min(dotX, dotY);\nfloat offset = (dMax - dMin) / (dMax + dMin);\noffset = clamp(offset, 0.0, 1.0);\nfloat d = dMax * (1.0 - offset) + dMin * offset;\nmipLevel = 0.5 * log2(d);\nmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\nvoid CalculateTexCoord(in vec3 inTexCoord, in float scale, in float XTran, in float YTran, in float fTile, in float mipLevel, inout vec2 outTexCoord)\n{\nif(inTexCoord.z < -9000.0)\n{\noutTexCoord = inTexCoord.xy;\n}\nelse\n{\nvec2 fTexCoord = fract(inTexCoord.xy);\nfloat offset = 1.0 * pow(2.0, mipLevel) / fTile;\nfTexCoord = clamp(fTexCoord, offset, 1.0 - offset);\noutTexCoord.x = (fTexCoord.x + XTran) * scale;\noutTexCoord.y = (fTexCoord.y + YTran) * scale;\n}\n}\nvec4 czm_getTexColorForS3M(sampler2D curTexture, vec3 oriTexCoord, float texTileWidth, float fMaxMipLev, float fTexCoordScale, vec2 vecTexCoordTranslate,float isRGBA, vec4 texUVoffset, out vec2 outTexCoord)\n{\nvec4 color = vec4(1.0);\nfloat mipLevel = 0.0;\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nCalculateMipLevel(oriTexCoord.xy, texTileWidth, fMaxMipLev, mipLevel);\n#endif\nvec2 realTexCoord;\nCalculateTexCoord(oriTexCoord, fTexCoordScale, vecTexCoordTranslate.x, vecTexCoordTranslate.y, texTileWidth, mipLevel, realTexCoord);\nif(isRGBA > 0.5)\n{\nvec2 rgbTexCoord;\nrgbTexCoord.x = (realTexCoord.x + vecTexCoordTranslate.x * fTexCoordScale) * 0.5;\nrgbTexCoord.y = (realTexCoord.y + vecTexCoordTranslate.y * fTexCoordScale) * 0.5;\nrgbTexCoord.xy += texUVoffset.xy;\ncolor = texture2D(curTexture, rgbTexCoord.xy, -10.0);\nvec2 vecAlphaTexCoord;\nvecAlphaTexCoord.x = rgbTexCoord.x;\nvecAlphaTexCoord.y = rgbTexCoord.y + fTexCoordScale * 0.5;\nvecAlphaTexCoord.xy += texUVoffset.xy;\ncolor.a = texture2D(curTexture, vecAlphaTexCoord.xy, -10.0).r;\n}\nelse\n{\nrealTexCoord = realTexCoord * texUVoffset.zw + texUVoffset.xy;\nif(oriTexCoord.z < -9000.0)\n{\ncolor = texture2D(curTexture, realTexCoord.xy);\n}\nelse\n{\n#ifdef GL_EXT_shader_texture_lod\ncolor = texture2DLodEXT(curTexture, realTexCoord.xy, mipLevel);\n#else\n#ifdef WEBGL2\ncolor = textureLod(curTexture, realTexCoord.xy, mipLevel);\n#else\ncolor = texture2D(curTexture, realTexCoord.xy, mipLevel);\n#endif\n#endif\n}\n#ifdef RGBTOBGR\ncolor = color.bgra;\n#endif\n}\noutTexCoord = realTexCoord;\nreturn color;\n}\nvec4 czm_getTexColorForS3M(sampler2D texture, vec2 uv, vec2 texDim, vec2 texTran, vec2 texScale, float maxMipLevel, out vec2 outTexCoord)\n{\nif(maxMipLevel < 0.0)\n{\nreturn vec4(1.0);\n}\nvec4 colorCeil = vec4(1.0);\nfloat mipLevel = 0.0;\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nCalculateMipLevel(uv, texDim, maxMipLevel, mipLevel);\n#endif\nfloat ceilMipLevel = ceil(mipLevel);\nvec2 translate = vec2(texTran.x, texTran.y);\nfloat temp;\nif(ceilMipLevel > 0.0)\n{\ntranslate.x = texTran.x + texScale.x;\ntemp = pow(2.0, ceilMipLevel - 1.0);\ntranslate.y = texTran.y + texScale.y * (temp - 1.0) / temp;\n}\nfloat scale = 1.0 / pow(2.0, ceilMipLevel);\nvec2 texcoord = fract(uv);\nfloat offsetX = pow(2.0, ceilMipLevel) / texDim.x;\nfloat offsetY = pow(2.0, ceilMipLevel) / texDim.y;\ntexcoord.x = clamp(texcoord.x, 0.0 + offsetX, 1.0 - offsetX);\ntexcoord.y = clamp(texcoord.y, 0.0 + offsetY, 1.0 - offsetY);\ntexcoord.x = texcoord.x * texScale.x * scale + translate.x;\ntexcoord.y = texcoord.y * texScale.y * scale + translate.y;\n#ifdef GL_EXT_shader_texture_lod\ncolorCeil = texture2DLodEXT(texture, texcoord.xy, 0.0);\n#else\n#ifdef WEBGL2\ncolorCeil = textureLod(texture, texcoord.xy, 0.0);\n#else\ncolorCeil = texture2D(texture, texcoord.xy, -10.0);\n#endif\n#endif\nvec4 colorFloor = vec4(1.0);\nfloat floorMipLevel = floor(mipLevel);\ntranslate = vec2(texTran.x, texTran.y);\nif(floorMipLevel > 0.0)\n{\ntranslate.x = texTran.x + texScale.x;\ntemp = pow(2.0, floorMipLevel - 1.0);\ntranslate.y = texTran.y + texScale.y * (temp - 1.0) / temp;\n}\nscale = 1.0 / pow(2.0, floorMipLevel);\ntexcoord = fract(uv);\noffsetX = pow(2.0, floorMipLevel) / texDim.x;\noffsetY = pow(2.0, floorMipLevel) / texDim.y;\ntexcoord.x = clamp(texcoord.x, 0.0 + offsetX, 1.0 - offsetX);\ntexcoord.y = clamp(texcoord.y, 0.0 + offsetY, 1.0 - offsetY);\ntexcoord.x = texcoord.x * texScale.x * scale + translate.x;\ntexcoord.y = texcoord.y * texScale.y * scale + translate.y;\n#ifdef GL_EXT_shader_texture_lod\ncolorFloor = texture2DLodEXT(texture, texcoord.xy, 0.0);\n#else\n#ifdef WEBGL2\ncolorFloor = textureLod(texture, texcoord.xy, 0.0);\n#else\ncolorFloor = texture2D(texture, texcoord.xy, -10.0);\n#endif\n#endif\nvec4 color = colorCeil * 0.5 + colorFloor * 0.5;\nreturn color;\n}\n",czm_getTextureMatrixFromZValue="const float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT4 = 1.0 / 16.0;\nconst float SHIFT_LEFT4 = 16.0;\nvoid czm_getTextureMatrixFromZValue(in float nZ, inout float XTran, inout float YTran, inout float scale, inout float isRGBA)\n{\nif(nZ <= 0.0)\n{\nreturn;\n}\nfloat nDel8 = floor(nZ * SHIFT_RIGHT8);\nfloat nDel16 = floor(nDel8 * SHIFT_RIGHT8);\nfloat nDel20 = floor(nDel16 * SHIFT_RIGHT4);\nisRGBA = floor(nDel20);\nYTran = nZ - nDel8 * SHIFT_LEFT8;\nXTran = nDel8 - nDel16 * SHIFT_LEFT8;\nfloat nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\nscale = 1.0 / pow(2.0, nLevel);\n}\n",czm_getVolumeValue$1="uniform sampler2D uVolumeTexture;\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uTimeRatio;\n#endif\n#ifdef Volume\nuniform float width;\nuniform float height;\nuniform float depth;\nuniform float sideBlockCount;\nuniform float blockLength;\nuniform float texLength;\nuniform float uFilterMode;\n#endif\nfloat czm_unpackVolume(vec3 packedDepth)\n{\nreturn dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n#ifdef Volume\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\nfloat yOffset = floor((fLevel+0.25/sideBlockCount) / sideBlockCount);\nfloat xOffset = fLevel - yOffset * sideBlockCount;\nfloat texCoordV = (texCoord.y * height + yOffset * blockLength) / texLength;\nfloat texCoordU = (texCoord.x * width + xOffset * blockLength) / texLength;\nreturn vec2(texCoordU, texCoordV);\n}\n#define inline\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\nvec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\nvec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\nfloat fValue1 = clamp(czm_unpackVolume(volumeValue1.xyz),0.0,1.0);\nfloat fValue2 = clamp(czm_unpackVolume(volumeValue2.xyz),0.0,1.0);\nif(uFilterMode >0.5)\n{\nif(ratio<0.5)\n{\nratio = 0.0;\n}\nelse\n{\nratio = 1.0;\n}\n}\nnoValue = mix(volumeValue1.a, volumeValue2.a, ratio);\nif(volumeValue1.a < 0.5)\n{\nfValue1 = fValue2;\n}\nif(volumeValue2.a < 0.5)\n{\nfValue2 = fValue1;\n}\nreturn mix(fValue1, fValue2, ratio);\n}\nfloat czm_getVolumeValue(vec3 texCoord, out float noValue)\n{\nfloat fLevel = (depth - 1.0) * texCoord.z;\nfloat bottomLevel= floor(fLevel);\nfloat topLevel = bottomLevel + 1.0;\nfloat ratio = topLevel - fLevel;\nvec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\nvec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\nfloat fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\nfResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\nreturn fResult;\n}\nvec4 czm_getVolumeValue(vec3 texCoord)\n{\nfloat fLevel = (depth - 1.0) * texCoord.z;\nfloat bottomLevel= floor(fLevel);\nfloat topLevel = bottomLevel + 1.0;\nfloat ratio = topLevel - fLevel;\nfloat yOffset1 = floor((topLevel+0.25/sideBlockCount) / sideBlockCount);\nfloat xOffset1 = topLevel - yOffset1 * sideBlockCount;\nfloat texCoordV1 = (texCoord.y * height + yOffset1 * blockLength)/texLength;\nfloat texCoordU1 = (texCoord.x * width + xOffset1 * blockLength)/texLength;\nvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\nfloat yOffset2 = floor((bottomLevel+0.25/sideBlockCount) / sideBlockCount);\nfloat xOffset2 = bottomLevel - yOffset2 * sideBlockCount;\nfloat texCoordV2 = (texCoord.y * height + yOffset2 * blockLength)/texLength;\nfloat texCoordU2 = (texCoord.x * width + xOffset2 * blockLength)/texLength;\nvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\nif(uFilterMode >0.5)\n{\nif(ratio<0.5)\n{\nratio = 0.0;\n}\nelse\n{\nratio = 1.0;\n}\n}\nvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\nreturn volumeColor;\n}\n#endif\n",czm_getVolumeValueMultiResolution="uniform sampler2D uVolumeTexture1;\nuniform sampler2D uVolumeTexture2;\nuniform sampler2D uVolumeTexture3;\nuniform mat4 uMultiResolutionPara1;\nuniform mat4 uMultiResolutionPara2;\nuniform mat4 uMultiResolutionPara3;\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture1;\nuniform sampler2D uNextVolumeTexture2;\nuniform sampler2D uNextVolumeTexture3;\n#endif\n#ifdef Volume\nvec2 computeVolumeTextureCoord(vec2 texCoord, float fLevel, float texWidth, float texHeight, float texSideBlockCount, float texBlockLength, float texTotalLength)\n{\nfloat yOffset = floor((fLevel+0.25/texSideBlockCount) / texSideBlockCount);\nfloat xOffset = fLevel - yOffset * texSideBlockCount;\nfloat texCoordV = (texCoord.y * texHeight + yOffset * texBlockLength) / texTotalLength;\nfloat texCoordU = (texCoord.x * texWidth + xOffset * texBlockLength) / texTotalLength;\nreturn vec2(texCoordU, texCoordV);\n}\nfloat czm_getVolumeValueMultiResolution(vec3 texCoord, out float noValue)\n{\nfloat fLevel = (depth - 1.0) * texCoord.z;\nfloat bottomLevel= floor(fLevel);\nfloat topLevel = bottomLevel + 1.0;\nfloat ratio = topLevel - fLevel;\nvec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\nvec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\nfloat fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\nfResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\nfloat width = uMultiResolutionPara1[2].x;\nfloat height = uMultiResolutionPara1[2].y;\nfloat sideBlockCount = uMultiResolutionPara1[2].z;\nfloat blockLength = uMultiResolutionPara1[2].w;\nfloat texLength = uMultiResolutionPara1[3].x;\nvec4 uMultiResolutionTranslation = uMultiResolutionPara1[0];\nvec2 texCoord1 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\nvec2 topTexCoord1 = computeVolumeTextureCoord(texCoord1, topLevel, width, height, sideBlockCount, blockLength, texLength);\nvec2 bottomTexCoord1 = computeVolumeTextureCoord(texCoord1, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\nfloat alpha1 = 5.0 * clamp( max(abs(texCoord1.x - 0.5), abs(texCoord1.y - 0.5)) - 0.3,0.0,0.2);\nfloat fResult1 = computeVolumeValue(uVolumeTexture1, topTexCoord1, bottomTexCoord1, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult1 = computeVolumeValue(uNextVolumeTexture1, topTexCoord1, bottomTexCoord1, ratio, noValue);\nfResult1 = mix(fResult1, fNextResult1, uTimeRatio);\n#endif\nwidth = uMultiResolutionPara2[2].x;\nheight = uMultiResolutionPara2[2].y;\nsideBlockCount = uMultiResolutionPara2[2].z;\nblockLength = uMultiResolutionPara2[2].w;\ntexLength = uMultiResolutionPara2[3].x;\nuMultiResolutionTranslation = uMultiResolutionPara2[0];\nvec2 texCoord2 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\nvec2 topTexCoord2 = computeVolumeTextureCoord(texCoord2, topLevel, width, height, sideBlockCount, blockLength, texLength);\nvec2 bottomTexCoord2 = computeVolumeTextureCoord(texCoord2, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\nfloat alpha2 = 5.0 * clamp( max(abs(texCoord2.x - 0.5), abs(texCoord2.y - 0.5)) - 0.3,0.0,0.2);\nfloat fResult2 = computeVolumeValue(uVolumeTexture2, topTexCoord2, bottomTexCoord2, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult2 = computeVolumeValue(uNextVolumeTexture2, topTexCoord2, bottomTexCoord2, ratio, noValue);\nfResult2 = mix(fResult2, fNextResult2, uTimeRatio);\n#endif\nwidth = uMultiResolutionPara3[2].x;\nheight = uMultiResolutionPara3[2].y;\nsideBlockCount = uMultiResolutionPara3[2].z;\nblockLength = uMultiResolutionPara3[2].w;\ntexLength = uMultiResolutionPara3[3].x;\nuMultiResolutionTranslation = uMultiResolutionPara3[0];\nvec2 texCoord3 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\nvec2 topTexCoord3 = computeVolumeTextureCoord(texCoord3, topLevel, width, height, sideBlockCount, blockLength, texLength);\nvec2 bottomTexCoord3 = computeVolumeTextureCoord(texCoord3, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\nfloat alpha3 = 5.0 * clamp( max(abs(texCoord3.x - 0.5), abs(texCoord3.y - 0.5)) - 0.3,0.0,0.2);\nfloat fResult3 = computeVolumeValue(uVolumeTexture3, topTexCoord3, bottomTexCoord3, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult3 = computeVolumeValue(uNextVolumeTexture3, topTexCoord3, bottomTexCoord3, ratio, noValue);\nfResult3 = mix(fResult3, fNextResult3, uTimeRatio);\n#endif\nreturn mix(fResult3, mix(fResult2, mix(fResult1, fResult, alpha1), alpha2), alpha3);\n}\n#endif\n",czm_getWaterNoise$1="vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\nfloat cosAngle = cos(angleInRadians);\nfloat sinAngle = sin(angleInRadians);\nvec2 s0 = vec2(1.0/17.0, 0.0);\nvec2 s1 = vec2(-1.0/29.0, 0.0);\nvec2 s2 = vec2(1.0/101.0, 1.0/59.0);\nvec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\ns0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\ns1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\ns2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\ns3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\nvec2 uv0 = (uv/103.0) + (time * s0);\nvec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\nvec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\nvec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\nuv0 = fract(uv0);\nuv1 = fract(uv1);\nuv2 = fract(uv2);\nuv3 = fract(uv3);\nvec4 noise = (texture2D(normalMap, uv0)) +\n(texture2D(normalMap, uv1)) +\n(texture2D(normalMap, uv2)) +\n(texture2D(normalMap, uv3));\nreturn ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_getWgs84EllipsoidEC$1="czm_ellipsoid czm_getWgs84EllipsoidEC()\n{\nvec3 radii = vec3(6378137.0, 6378137.0, 6378137.0);\nvec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\nvec3 inverseRadiiSquared = inverseRadii * inverseRadii;\nczm_ellipsoid temp = czm_ellipsoid(czm_view[3].xyz, radii, inverseRadii, inverseRadiiSquared);\nreturn temp;\n}\n",czm_HSBToRGB$1="const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\nvec3 czm_HSBToRGB(vec3 hsb)\n{\nvec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\nreturn hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);\n}\n",czm_HSLToRGB$1="vec3 hueToRGB(float hue)\n{\nfloat r = abs(hue * 6.0 - 3.0) - 1.0;\nfloat g = 2.0 - abs(hue * 6.0 - 2.0);\nfloat b = 2.0 - abs(hue * 6.0 - 4.0);\nreturn clamp(vec3(r, g, b), 0.0, 1.0);\n}\nvec3 czm_HSLToRGB(vec3 hsl)\n{\nvec3 rgb = hueToRGB(hsl.x);\nfloat c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\nreturn (rgb - 0.5) * c + hsl.z;\n}\n",czm_hue$1="vec3 czm_hue(vec3 rgb, float adjustment)\n{\nconst mat3 toYIQ = mat3(0.299, 0.587, 0.114,\n0.595716, -0.274453, -0.321263,\n0.211456, -0.522591, 0.311135);\nconst mat3 toRGB = mat3(1.0, 0.9563, 0.6210,\n1.0, -0.2721, -0.6474,\n1.0, -1.107, 1.7046);\nvec3 yiq = toYIQ * rgb;\nfloat hue = atan(yiq.z, yiq.y) + adjustment;\nfloat chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\nvec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\nreturn toRGB * color;\n}\n",czm_inverseGamma$1="vec3 czm_inverseGamma(vec3 color) {\nreturn pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_inverseMatrix$1="mat3 czm_inverseMatrix(mat3 m)\n{\nfloat Determinant =\nm[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\n- m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\n+ m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\nmat3 Inverse;\nInverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);\nInverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);\nInverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);\nInverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);\nInverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);\nInverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);\nInverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\nInverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);\nInverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);\nInverse /= Determinant;\nreturn Inverse;\n}\nmat4 czm_inverseMatrix(mat4 m)\n{\nfloat Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\nfloat Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\nfloat Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\nfloat Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\nfloat Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\nfloat Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\nfloat Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\nfloat Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\nfloat Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\nfloat Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\nfloat Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\nfloat Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\nfloat Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\nfloat Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\nfloat Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\nfloat Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\nfloat Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\nfloat Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\nconst vec4 SignA = vec4( 1.0, -1.0, 1.0, -1.0);\nconst vec4 SignB = vec4(-1.0, 1.0, -1.0, 1.0);\nvec4 Fac0 = vec4(Coef00, Coef00, Coef02, Coef03);\nvec4 Fac1 = vec4(Coef04, Coef04, Coef06, Coef07);\nvec4 Fac2 = vec4(Coef08, Coef08, Coef10, Coef11);\nvec4 Fac3 = vec4(Coef12, Coef12, Coef14, Coef15);\nvec4 Fac4 = vec4(Coef16, Coef16, Coef18, Coef19);\nvec4 Fac5 = vec4(Coef20, Coef20, Coef22, Coef23);\nvec4 Vec0 = vec4(m[1][0], m[0][0], m[0][0], m[0][0]);\nvec4 Vec1 = vec4(m[1][1], m[0][1], m[0][1], m[0][1]);\nvec4 Vec2 = vec4(m[1][2], m[0][2], m[0][2], m[0][2]);\nvec4 Vec3 = vec4(m[1][3], m[0][3], m[0][3], m[0][3]);\nvec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);\nvec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);\nvec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);\nvec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);\nmat4 Inverse = mat4(Inv0, Inv1, Inv2, Inv3);\nvec4 Row0 = vec4(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);\nfloat Determinant = dot(m[0], Row0);\nInverse /= Determinant;\nreturn Inverse;\n}\n",czm_isEmpty$1="bool czm_isEmpty(czm_raySegment interval)\n{\nreturn (interval.stop < 0.0);\n}\n",czm_isFull$1="bool czm_isFull(czm_raySegment interval)\n{\nreturn (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction$1="float czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)\n{\nfloat sinLatitude = sin(latitude);\nfloat mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\nreturn (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_lineDistance$1="float czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\nreturn abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_luminance$1="float czm_luminance(vec3 rgb)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nreturn dot(rgb, W);\n}\n",czm_metersPerPixel$1="float czm_metersPerPixel(vec4 positionEC, float pixelRatio)\n{\nfloat width = czm_viewport.z;\nfloat height = czm_viewport.w;\nfloat pixelWidth;\nfloat pixelHeight;\nfloat top = czm_frustumPlanes.x;\nfloat bottom = czm_frustumPlanes.y;\nfloat left = czm_frustumPlanes.z;\nfloat right = czm_frustumPlanes.w;\nif (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n{\nfloat frustumWidth = right - left;\nfloat frustumHeight = top - bottom;\npixelWidth = frustumWidth / width;\npixelHeight = frustumHeight / height;\n}\nelse\n{\nfloat distanceToPixel = -positionEC.z;\nfloat inverseNear = 1.0 / czm_currentFrustum.x;\nfloat tanTheta = top * inverseNear;\npixelHeight = 2.0 * distanceToPixel * tanTheta / height;\ntanTheta = right * inverseNear;\npixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n}\nreturn max(pixelWidth, pixelHeight) * pixelRatio;\n}\nfloat czm_metersPerPixel(vec4 positionEC)\n{\nreturn czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates$1="vec4 czm_modelToWindowCoordinates(vec4 position)\n{\nvec4 q = czm_modelViewProjection * position;\nq.xyz /= q.w;\nq.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz;\nreturn q;\n}\n",czm_multiplyWithColorBalance$1="vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nvec3 target = left * right;\nfloat leftLuminance = dot(left, W);\nfloat rightLuminance = dot(right, W);\nfloat targetLuminance = dot(target, W);\nreturn ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar$1="float czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\nfloat valueAtMin = nearFarScalar.y;\nfloat valueAtMax = nearFarScalar.w;\nfloat nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\nfloat farDistanceSq = nearFarScalar.z * nearFarScalar.z;\nfloat t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\nt = pow(clamp(t, 0.0, 1.0), 0.2);\nreturn mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode$1="vec3 czm_octDecode(vec2 encoded, float range)\n{\nif (encoded.x == 0.0 && encoded.y == 0.0) {\nreturn vec3(0.0, 0.0, 0.0);\n}\nencoded = encoded / range * 2.0 - 1.0;\nvec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\nif (v.z < 0.0)\n{\nv.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);\n}\nreturn normalize(v);\n}\nvec3 czm_octDecode(vec2 encoded)\n{\nreturn czm_octDecode(encoded, 255.0);\n}\nvec3 czm_octDecode(float encoded)\n{\nfloat temp = encoded / 256.0;\nfloat x = floor(temp);\nfloat y = (temp - x) * 256.0;\nreturn czm_octDecode(vec2(x, y));\n}\nvoid czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)\n{\nfloat temp = encoded.x / 65536.0;\nfloat x = floor(temp);\nfloat encodedFloat1 = (temp - x) * 65536.0;\ntemp = encoded.y / 65536.0;\nfloat y = floor(temp);\nfloat encodedFloat2 = (temp - y) * 65536.0;\nvector1 = czm_octDecode(encodedFloat1);\nvector2 = czm_octDecode(encodedFloat2);\nvector3 = czm_octDecode(vec2(x, y));\n}\n",czm_packDepth$1="vec4 czm_packDepth(float depth)\n{\nvec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;\nenc = fract(enc);\nenc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\nreturn enc;\n}\n",czm_packValue$1="vec4 czm_packValue(float value)\n{\nfloat SHIFT_LEFT8 = 256.0;\nfloat SHIFT_RIGHT8 = 1.0 / 256.0;\nvec4 result;\nresult.a = 255.0;\nfloat fPos = abs(value + 9000.0) * SHIFT_RIGHT8;\nresult.b = (fPos - floor(fPos)) * SHIFT_LEFT8;\nfPos = floor(fPos) * SHIFT_RIGHT8;\nresult.g = (fPos - floor(fPos)) * SHIFT_LEFT8;\nresult.r = floor(fPos);\nresult /= 255.0;\nreturn result;\n}\n",czm_phong$1="float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\nreturn czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\nreturn czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\nif (czm_sceneMode == czm_sceneMode3D) {\ndiffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n}\nfloat specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\nvec3 materialDiffuse = material.diffuse * 0.5;\nvec3 ambient = materialDiffuse;\nvec3 color = ambient + material.emission;\ncolor += materialDiffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\nfloat specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\nvec3 ambient = vec3(0.0);\nvec3 color = ambient + material.emission;\ncolor += material.diffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\n",czm_planeDistance$1="float czm_planeDistance(vec4 plane, vec3 point) {\nreturn (dot(plane.xyz, point) + plane.w);\n}\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\nreturn (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay$1="vec3 czm_pointAlongRay(czm_ray ray, float time)\n{\nreturn ray.origin + (time * ray.direction);\n}\n",czm_rayEllipsoidIntersectionInterval$1="czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)\n{\nvec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;\nvec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;\nq = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;\nfloat q2 = dot(q, q);\nfloat qw = dot(q, w);\nif (q2 > 1.0)\n{\nif (qw >= 0.0)\n{\nreturn czm_emptyRaySegment;\n}\nelse\n{\nfloat qw2 = qw * qw;\nfloat difference = q2 - 1.0;\nfloat w2 = dot(w, w);\nfloat product = w2 * difference;\nif (qw2 < product)\n{\nreturn czm_emptyRaySegment;\n}\nelse if (qw2 > product)\n{\nfloat discriminant = qw * qw - product;\nfloat temp = -qw + sqrt(discriminant);\nfloat root0 = temp / w2;\nfloat root1 = difference / temp;\nif (root0 < root1)\n{\nczm_raySegment i = czm_raySegment(root0, root1);\nreturn i;\n}\nelse\n{\nczm_raySegment i = czm_raySegment(root1, root0);\nreturn i;\n}\n}\nelse\n{\nfloat root = sqrt(difference / w2);\nczm_raySegment i = czm_raySegment(root, root);\nreturn i;\n}\n}\n}\nelse if (q2 < 1.0)\n{\nfloat difference = q2 - 1.0;\nfloat w2 = dot(w, w);\nfloat product = w2 * difference;\nfloat discriminant = qw * qw - product;\nfloat temp = -qw + sqrt(discriminant);\nczm_raySegment i = czm_raySegment(0.0, temp / w2);\nreturn i;\n}\nelse\n{\nif (qw < 0.0)\n{\nfloat w2 = dot(w, w);\nczm_raySegment i = czm_raySegment(0.0, -qw / w2);\nreturn i;\n}\nelse\n{\nreturn czm_emptyRaySegment;\n}\n}\n}\n",czm_raySphereIntersectionInterval="czm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)\n{\nvec3 o = ray.origin;\nvec3 d = ray.direction;\nvec3 oc = o - center;\nfloat a = dot(d, d);\nfloat b = 2.0 * dot(d, oc);\nfloat c = dot(oc, oc) - (radius * radius);\nfloat det = (b * b) - (4.0 * a * c);\nif (det < 0.0) {\nreturn czm_emptyRaySegment;\n}\nfloat sqrtDet = sqrt(det);\nfloat t0 = (-b - sqrtDet) / (2.0 * a);\nfloat t1 = (-b + sqrtDet) / (2.0 * a);\nczm_raySegment result = czm_raySegment(t0, t1);\nreturn result;\n}\n",czm_readDepth$1="float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\nreturn czm_reverseLogDepth(texture2D(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective$1="float czm_readNonPerspective(float value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\nreturn value * oneOverW;\n}\n",czm_reverseLogDepth$1="float czm_reverseLogDepth(float logZ)\n{\n#ifdef LOG_DEPTH\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nfloat log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;\nfloat depthFromNear = pow(2.0, log2Depth) - 1.0;\nreturn far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#endif\nreturn logZ;\n}\n",czm_RGBToHSB$1="const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\nvec3 czm_RGBToHSB(vec3 rgb)\n{\nvec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\nvec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\nfloat d = q.x - min(q.w, q.y);\nreturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL$1="vec3 RGBtoHCV(vec3 rgb)\n{\nvec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);\nvec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);\nfloat c = q.x - min(q.w, q.y);\nfloat h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\nreturn vec3(h, c, q.x);\n}\nvec3 czm_RGBToHSL(vec3 rgb)\n{\nvec3 hcv = RGBtoHCV(rgb);\nfloat l = hcv.z - hcv.y * 0.5;\nfloat s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\nreturn vec3(hcv.x, s, l);\n}\n",czm_RGBToXYZ$1="vec3 czm_RGBToXYZ(vec3 rgb)\n{\nconst mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,\n0.3576, 0.7152, 0.1192,\n0.1805, 0.0722, 0.9505);\nvec3 xyz = RGB2XYZ * rgb;\nvec3 Yxy;\nYxy.r = xyz.g;\nfloat temp = dot(vec3(1.0), xyz);\nYxy.gb = xyz.rg / temp;\nreturn Yxy;\n}\n",czm_RollerShutter$1="void czm_RollerShutter(vec2 coord, vec4 region)\n{\nvec2 f = step(region.xw, coord);\nvec2 s = step(coord, region.zy);\nif (f.x * f.y * s.x * s.y < 1.0)\n{\ndiscard;\n};\n}\n",czm_s3mBatchOperation$1="void czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation)\n{\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nvertexColor *= color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nvertexColor *= selectedColor;\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\nfloat isOffset = fract(floor(right_8)* 0.5);\nif(isOffset > 0.1)\n{\nvertexPos.xyz += translation;\n}\nfloat isClip = fract(floor(right_16) * 0.5);\nif(isClip > 0.1)\n{\nvIsFiltByID.x = 1.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout float fSelected)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nvertexColor *= color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nfSelected = 1.0;\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\nfloat isOffset = fract(floor(right_8)* 0.5);\nif(isOffset > 0.1)\n{\nvertexPos.xyz += translation;\n}\nfloat isClip = fract(floor(right_16) * 0.5);\nif(isClip > 0.1)\n{\nvIsFiltByID.x = 1.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout float fSelected)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nvertexColor.rgb = color.rgb;\nvertexColor.a *= color.a;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nfSelected = 1.0;\n#ifdef REPLACE_SELECT_TYPE\nvertexColor = selectedColor;\n#else\nvertexColor *= selectedColor;\n#endif\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\nfloat isOffset = fract(floor(right_8)* 0.5);\nif(isOffset > 0.1)\n{\nvertexPos.xyz += translation;\n}\nfloat isClip = fract(floor(right_16) * 0.5);\nif(isClip > 0.1)\n{\nvIsFiltByID.x = 1.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nvertexColor *= color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nvertexColor *= selectedColor;\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout float fSelected)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nfSelected = 1.0;\nvertexColor = color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nfSelected = 1.0;\nvertexColor = selectedColor;\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout vec2 fSelected)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nfSelected.y = 1.0;\nvertexColor.rgb = color.rgb;\nvertexColor.a *= color.a;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nfSelected.x = 1.0;\n#ifdef REPLACE_SELECT_TYPE\nvertexColor = selectedColor;\n#else\nvertexColor *= selectedColor;\n#endif\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\nfloat isOffset = fract(floor(right_8)* 0.5);\nif(isOffset > 0.1)\n{\nvertexPos.xyz += translation;\n}\nfloat isClip = fract(floor(right_16) * 0.5);\nif(isClip > 0.1)\n{\nvIsFiltByID.x = 1.0;\n}\n}\n",czm_S3MPBR$1="uniform float u_metallicFactor;\nuniform float u_roughnessFactor;\nuniform vec4 u_emissiveFactor;\nuniform vec4 u_baseColorFactor;\nuniform float u_alphaCutoff;\nuniform sampler2D u_baseColorTexture;\nuniform sampler2D u_metallicRoughnessTexture;\nuniform sampler2D u_normalTexture;\nuniform sampler2D u_occlusionTexture;\nuniform sampler2D u_emissiveTexture;\nuniform vec4 u_baseColorUVOffsetAndTiling;\nuniform vec4 u_emissiveUVOffsetAndTiling;\nuniform float uSunLightON;\n#if DIR_LIGHTS > 0\nuniform vec3 uDirectionalLightDirectionEC[ DIR_LIGHTS ];\nuniform vec3 uDirectionalLightColor[ DIR_LIGHTS ];\n#endif\n#if POINT_LIGHTS > 0\nuniform vec3 uPointLightPositionEC[ POINT_LIGHTS ];\nuniform vec3 uPointLightColor[ POINT_LIGHTS ];\nuniform vec2 uPointLightDistanceAndDecay[ POINT_LIGHTS ];\n#endif\n#if SPOT_LIGHTS > 0\nuniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightDirectionEC[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightDistanceDecayCos[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightExponent[ SPOT_LIGHTS ];\n#endif\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor)\n{\nreturn diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n{\nreturn f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nvec3 fresnelSchlick(float metalness, float VdotH)\n{\nreturn metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n}\nvec3 F_Schlick(float ndv, vec3 spec)\n{\nreturn spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n}\nfloat D_Phong(float g, float ndh)\n{\nfloat a = pow(8192.0, g);\nreturn (a + 2.0) / 8.0 * pow(ndh, a);\n}\nfloat smithVisibilityG1(float NdotV, float roughness)\n{\nfloat k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\nreturn NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n{\nreturn smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH)\n{\nfloat roughnessSquared = roughness * roughness;\nfloat f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\nreturn roughnessSquared / (M_PI * f * f);\n}\nvoid getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm)\n{\nvec3 h = normalize(viewDir + lightDir);\nfloat NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\nfloat NdotH = clamp(dot(normal, h), 0.0, 1.0);\nvec3 li = lightColor * NdotL;\ndiffuseTerm = li;\nspecularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n}\nvec3 SRGBtoLINEAR3(vec3 srgbIn)\n{\nreturn pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\nvec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\nreturn vec4(linearOut, srgbIn.a);\n}\nvec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR\nreturn pow(linearIn, vec3(1.0/2.2));\n#else\nreturn linearIn;\n#endif\n}\nfloat calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent)\n{\nreturn pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n}\nvec4 czm_S3MPBR(vec3 normalEC, vec3 positionEC, vec2 texCoord, vec4 vertexColor)\n{\nvec3 ng = normalize(normalEC);\nvec3 positionWC = (czm_inverseView * vec4(positionEC, 1.0)).xyz;\n#ifdef HAS_NORMAL_TEXTURE\nvec3 pos_dx = dFdx(positionEC);\nvec3 pos_dy = dFdy(positionEC);\nvec3 tex_dx = dFdx(vec3(texCoord, 0.0));\nvec3 tex_dy = dFdy(vec3(texCoord, 0.0));\nvec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\nt = normalize(t - ng * dot(ng, t));\nvec3 b = normalize(cross(ng, t));\nmat3 tbn = mat3(t, b, ng);\nvec3 n = texture2D(u_normalTexture, texCoord).rgb;\nn = normalize(tbn * (2.0 * n - 1.0));\n#else\nvec3 n = ng;\n#endif\nvec3 v = -normalize(positionEC);\n#ifdef DOUBLE_SIDED\nif (dot(n, v) < 0.0) {\nn = -n;\n}\n#endif\n#ifdef HAS_BASECOLOR_TEXTURE\nvec2 baseColorTexCoord = texCoord;\nbaseColorTexCoord = baseColorTexCoord * u_baseColorUVOffsetAndTiling.zw + u_baseColorUVOffsetAndTiling.xy;\nvec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, baseColorTexCoord));\nbaseColorWithAlpha *= u_baseColorFactor;\n#else\nvec4 baseColorWithAlpha = u_baseColorFactor;\n#endif\nbaseColorWithAlpha *= vertexColor;\nvec3 baseColor = baseColorWithAlpha.rgb;\n#ifdef HAS_METALLICROUGHNESS_TEXTURE\nvec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, texCoord).rgb;\nfloat metalness = clamp(metallicRoughness.b, 0.0, 1.0);\nfloat roughness = clamp(metallicRoughness.g, 0.04, 1.0);\nmetalness *= u_metallicFactor;\nroughness *= u_roughnessFactor;\n#else\nfloat metalness = clamp(u_metallicFactor, 0.0, 1.0);\nfloat roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n#endif\nvec3 f0 = vec3(0.04);\nvec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\nvec3 specularColor = mix(f0, baseColor, metalness);\nfloat NdotV = abs(dot(n, v)) + 0.001;\nvec3 diffuseTerm = vec3(0.0);\nvec3 specularTerm = vec3(0.0);\nvec3 fresnelTerm = F_Schlick(NdotV, specularColor);\nvec3 color = vec3(0.0);\nvec3 lightDiffuseTerm = vec3(0.0);\nvec3 lightSpecularTerm = vec3(0.0);\ngetLightColor(czm_sunDirectionEC, v, n, vec3(0.8), fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\ndiffuseTerm +=lightDiffuseTerm * uSunLightON;\nspecularTerm += lightSpecularTerm * uSunLightON;\n#if DIR_LIGHTS > 0\nfor (int i = 0; i < DIR_LIGHTS; i++) {\ngetLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\ndiffuseTerm +=lightDiffuseTerm;\nspecularTerm += lightSpecularTerm;\n}\n#endif\n#if POINT_LIGHTS > 0\nfor (int i = 0; i < POINT_LIGHTS; i++) {\nvec3 lVector = uPointLightPositionEC[i] - v_positionEC;\nfloat lightDistance = length(lVector);\nfloat lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\nif(lightAttenuation < 0.001) {\ncontinue;\n}\nvec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\nvec3 lightDiffuseTerm = vec3(0.0);\nvec3 lightSpecularTerm = vec3(0.0);\ngetLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\ndiffuseTerm +=lightDiffuseTerm;\nspecularTerm += lightSpecularTerm;\n}\n#endif\n#if SPOT_LIGHTS > 0\nfor (int i = 0; i < SPOT_LIGHTS; i++) {\nvec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\nfloat lightDistance = length(lVector);\nfloat lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCos[i].x, uSpotLightDistanceDecayCos[i].y);\nif(lightAttenuation < 0.001) {\ncontinue;\n}\nfloat spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\nif(spotEffect > uSpotLightDistanceDecayCos[i].z) {\nvec3 spotLightColor = uSpotLightColor[i] * lightAttenuation * spotEffect;\nvec3 lightDiffuseTerm = vec3(0.0);\nvec3 lightSpecularTerm = vec3(0.0);\ngetLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\ndiffuseTerm +=lightDiffuseTerm;\nspecularTerm += lightSpecularTerm;\n}\n}\n#endif\ncolor = baseColor;\ncolor *= max(diffuseTerm, vec3(0.0));\ncolor += max(specularTerm, vec3(0.0));\n#ifdef USE_IBL_LIGHTING\nvec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\nfloat vertexRadius = length(positionWC);\nfloat horizonDotNadir = 1.0 - min(1.0, 6378137.0 / vertexRadius);\nfloat reflectionDotNadir = dot(r, normalize(positionWC));\nr.x = -r.x;\nr = -normalize(czm_temeToPseudoFixed * r);\nr.x = -r.x;\nfloat inverseRoughness = 1.04 - roughness;\ninverseRoughness *= inverseRoughness;\nvec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\nfloat atmosphereHeight = 0.05;\nfloat blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\nfloat blendRegionOffset = roughness * -1.0;\nfloat farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\nfloat aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\nfloat farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\nfloat smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\nvec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\nvec3 nadirColor = belowHorizonColor * 0.5;\nvec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\nvec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\nvec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\nvec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\nfloat diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\nfloat diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\nvec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\nfloat notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\nvec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\nspecularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\nspecularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\nvec2 iblFactor = vec2(1.0);\nfloat luminanceAtZenith = 0.5;\n#ifdef USE_SUN_LUMINANCE\nfloat LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\nfloat S = acos(LdotZenith);\nfloat NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\nfloat sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\nfloat gamma = acos(sunNdotL);\nfloat numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\nfloat denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\nfloat luminance = luminanceAtZenith * (numerator / denominator);\n#endif\nvec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;\nvec3 IBLColor = (diffuseIrradiance * diffuseColor * iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * iblFactor.y);\n#ifdef USE_SUN_LUMINANCE\ncolor += IBLColor * luminance;\n#else\ncolor += IBLColor;\n#endif // end of USE_SUN_LUMINANCE\n#endif // end of USE_IBL_LIGHTING\n#ifdef HAS_OCCLUSION_TEXTURE\ncolor *= texture2D(u_occlusionTexture, texCoord).r;\n#endif\n#ifdef HAS_EMISSIVE_TEXTURE\nvec2 emissiveTexCoord = texCoord;\nemissiveTexCoord = emissiveTexCoord * u_emissiveUVOffsetAndTiling.zw + u_emissiveUVOffsetAndTiling.xy;\nvec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, emissiveTexCoord).rgb);\nemissive *= u_emissiveFactor.rgb;\ncolor += emissive;\n#else\ncolor += u_emissiveFactor.rgb;\n#endif\ncolor = LINEARtoSRGB(color);\nvec4 resultColor = vec4(color, 1.0);\n#ifdef MASK\nif (baseColorWithAlpha.a < u_alphaCutoff)\n{\ndiscard;\n}\nresultColor = vec4(color, 1.0);\n#endif\n#ifdef BLEND\nresultColor = vec4(color, baseColorWithAlpha.a);\n#endif\nreturn resultColor;\n}\n",czm_sampleAndBlend$1="vec4 czm_sampleAndBlend(\nvec4 currentTextureColor,\nvec4 previousColor,\nvec2 tileTextureCoordinates,\nvec4 textureCoordinateRectangle,\nvec4 transparentBackColor,\nbool imageryClipEnable,\nfloat textureAlpha,\nfloat textureBrightness,\nfloat textureContrast,\nfloat textureHue,\nfloat textureSaturation,\nfloat textureOneOverGamma,\nvec2 split,\nvec4 swipe)\n{\nvec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nalphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nvec3 color = currentTextureColor.rgb;\nfloat alpha = currentTextureColor.a;\nif(transparentBackColor.a > 0.01)\n{\nfloat rDiff = abs(transparentBackColor.r - color.r);\nfloat gDiff = abs(transparentBackColor.g - color.g);\nfloat bDiff = abs(transparentBackColor.b - color.b);\nif(rDiff < transparentBackColor.a && gDiff < transparentBackColor.a && bDiff < transparentBackColor.a)\n{\nalpha = 0.0;\n}\n}\nif(imageryClipEnable)\n{\n#ifdef Apply_ImageryClip\nif(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n{\nalpha = 0.0;\n}\n#else\nalpha = 0.0;\n#endif\n}\n#if !defined(APPLY_GAMMA)\nvec4 tempColor = czm_gammaCorrect(vec4(color, alpha));\ncolor = tempColor.rgb;\nalpha = tempColor.a;\n#else\ncolor = pow(color, vec3(textureOneOverGamma));\n#endif\n#ifdef APPLY_SPLIT\nvec2 splitPosition = czm_imagerySplitPosition;\nif (split.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\nalpha = 0.0;\n}\nelse if (split.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\nalpha = 0.0;\n}\nif(split.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\nalpha = 0.0;\n}\nelse if(split.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_SWIPE\nif (gl_FragCoord.x < swipe.x || gl_FragCoord.y > swipe.y) {\nalpha = 0.0;\n}\nelse if (gl_FragCoord.x > swipe.z || gl_FragCoord.y < swipe.w) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_BRIGHTNESS\ncolor = mix(vec3(0.0), color, textureBrightness);\n#endif\n#ifdef APPLY_CONTRAST\ncolor = mix(vec3(0.5), color, textureContrast);\n#endif\n#ifdef APPLY_HUE\ncolor = czm_hue(color, textureHue);\n#endif\n#ifdef APPLY_SATURATION\ncolor = czm_saturation(color, textureSaturation);\n#endif\nfloat sourceAlpha = alpha * textureAlpha;\nfloat outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\nvec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4(outColor, outAlpha);\n}\nvec4 gridTextureSampleAndBlend(\nvec4 previousColor,\nsampler2D textureToSample,\nvec2 tileTextureCoordinates,\nvec4 textureCoordinateRectangle,\nvec4 textureCoordinateTranslationAndScale)\n{\nfloat textureAlpha = 1.0;\nvec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nalphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nvec2 translation = textureCoordinateTranslationAndScale.xy;\nvec2 scale = textureCoordinateTranslationAndScale.zw;\nvec2 textureCoordinates = tileTextureCoordinates * scale + translation;\nvec4 value = texture2D(textureToSample, textureCoordinates);\nvec3 color = value.rgb;\nfloat alpha = value.a;\nfloat sourceAlpha = alpha * textureAlpha;\nfloat outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\nvec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4(outColor, outAlpha);\n}\nvec2 computeTextureCoord(vec2 tileTextureCoordinates, vec4 textureCoordinateTranslationAndScale, vec4 textureSize, bool flipY)\n{\nvec2 translation = textureCoordinateTranslationAndScale.xy;\nvec2 scale = textureCoordinateTranslationAndScale.zw;\nvec2 textureCoordinates = tileTextureCoordinates * scale + translation;\nif(flipY)\n{\ntextureCoordinates.y = 1.0 - textureCoordinates.y;\n}\n#ifdef WEBGPU\nvec2 texelSize = textureSize.zw;\ntextureCoordinates = clamp(textureCoordinates, texelSize, 1.0 - texelSize);\n#endif\nreturn textureCoordinates;\n}\n",czm_sampleOctahedralProjection$1="vec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod)\n{\ndirection /= dot(vec3(1.0), abs(direction));\nvec2 rev = abs(direction.zx) - vec2(1.0);\nvec2 neg = vec2(direction.x < 0.0 ? rev.x : -rev.x,\ndirection.z < 0.0 ? rev.y : -rev.y);\nvec2 uv = direction.y < 0.0 ? neg : direction.xz;\nvec2 coord = 0.5 * uv + vec2(0.5);\nvec2 pixel = 1.0 / textureSize;\nif (lod > 0.0)\n{\nfloat scale = 1.0 / pow(2.0, lod);\nfloat offset = ((textureSize.y + 1.0) / textureSize.x);\ncoord.x *= offset;\ncoord *= scale;\ncoord.x += offset + pixel.x;\ncoord.y += (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n}\nelse\n{\ncoord.x *= (textureSize.y / textureSize.x);\n}\n#ifndef OES_texture_float_linear\nvec3 color1 = texture2D(projectedMap, coord + vec2(0.0, pixel.y)).rgb;\nvec3 color2 = texture2D(projectedMap, coord + vec2(pixel.x, 0.0)).rgb;\nvec3 color3 = texture2D(projectedMap, coord + pixel).rgb;\nvec3 color4 = texture2D(projectedMap, coord).rgb;\nvec2 texturePosition = coord * textureSize;\nfloat fu = fract(texturePosition.x);\nfloat fv = fract(texturePosition.y);\nvec3 average1 = mix(color4, color2, fu);\nvec3 average2 = mix(color1, color3, fu);\nvec3 color = mix(average1, average2, fv);\n#else\nvec3 color = texture2D(projectedMap, coord).rgb;\n#endif\nreturn color;\n}\nvec3 czm_sampleOctahedralProjection(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod, float maxLod) {\nfloat currentLod = floor(lod);\nfloat nextLod = min(currentLod + 1.0, maxLod);\nvec3 colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, currentLod);\nvec3 colorNextLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, nextLod);\nreturn mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation$1="vec3 czm_saturation(vec3 rgb, float adjustment)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nvec3 intensity = vec3(dot(rgb, W));\nreturn mix(intensity, rgb, adjustment);\n}\n",czm_shadowDepthCompare="float czm_sampleShadowMap(samplerCube shadowMap, vec3 d)\n{\nreturn czm_unpackDepth(textureCube(shadowMap, d));\n}\nfloat czm_sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\nreturn texture2D(shadowMap, uv).r;\n#else\nreturn czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\nfloat czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\nreturn step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\nfloat czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\nreturn step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n",czm_shadowVisibility="float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\nfloat strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\nfloat strength = step(0.0, nDotL);\n#endif\nvisibility *= strength;\n#endif\nvisibility = max(visibility, darkness);\nreturn visibility;\n}\n#ifdef USE_CUBE_MAP_SHADOW\nfloat czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\nfloat depthBias = shadowParameters.depthBias;\nfloat depth = shadowParameters.depth;\nfloat nDotL = shadowParameters.nDotL;\nfloat normalShadingSmooth = shadowParameters.normalShadingSmooth;\nfloat darkness = shadowParameters.darkness;\nvec3 uvw = shadowParameters.texCoords;\ndepth -= depthBias;\nfloat visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\nreturn czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\nfloat czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\nfloat depthBias = shadowParameters.depthBias;\nfloat depth = shadowParameters.depth;\nfloat nDotL = shadowParameters.nDotL;\nfloat normalShadingSmooth = shadowParameters.normalShadingSmooth;\nfloat darkness = shadowParameters.darkness;\nvec2 uv = shadowParameters.texCoords;\ndepth -= depthBias;\n#ifdef USE_SOFT_SHADOWS\nvec2 texelStepSize = shadowParameters.texelStepSize;\nfloat radius = 1.0;\nfloat dx0 = -texelStepSize.x * radius;\nfloat dy0 = -texelStepSize.y * radius;\nfloat dx1 = texelStepSize.x * radius;\nfloat dy1 = texelStepSize.y * radius;\nfloat visibility = (\nczm_shadowDepthCompare(shadowMap, uv, depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\n) * (1.0 / 9.0);\n#else\nfloat visibility = czm_shadowDepthCompare(shadowMap, uv, depth);\n#endif\nreturn czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n",czm_signNotZero$1="float czm_signNotZero(float value)\n{\nreturn value >= 0.0 ? 1.0 : -1.0;\n}\nvec2 czm_signNotZero(vec2 value)\n{\nreturn vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\nvec3 czm_signNotZero(vec3 value)\n{\nreturn vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n}\nvec4 czm_signNotZero(vec4 value)\n{\nreturn vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n}\n",czm_sketchMode$1="uniform sampler2D uNormalDepthTexture;\nuniform int uFillStyle;\nfloat edgeDetection(float lineWidth)\n{\nvec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\nvec2 off = lineWidth / czm_globeDepthTextureDim.xy;\nvec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\nvec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\nval_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\nvec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\nvec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\nval_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\nvec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\nvec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\nval_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\nvec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\nvec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\nval_se.xyz = (val_se.xyz * 2.0) - 1.0;\nfloat discontinuity = 0.0;\nfloat dot0 = dot(val_nw.xyz, val_se.xyz);\nfloat dot1 = dot(val_ne.xyz, val_sw.xyz);\ndiscontinuity = 0.5*(dot0+dot1);\nreturn discontinuity;\n}\nvec4 czm_sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\nvec4 outputColor = inputColor;\nfloat discontinuity = edgeDetection(lineWidth);\ndiscontinuity = clamp(discontinuity, 0.0, 1.0);\nif(uFillStyle == 1)\n{\noutputColor = lineColor;\noutputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\noutputColor.a *= lineColor.a;\n}\nelse\n{\nvec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\noutputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n}\nreturn outputColor;\n}\n",czm_sphericalHarmonics$1="vec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])\n{\nconst float c1 = 0.429043;\nconst float c2 = 0.511664;\nconst float c3 = 0.743125;\nconst float c4 = 0.886227;\nconst float c5 = 0.247708;\nvec3 L00 = coefficients[0];\nvec3 L1_1 = coefficients[1];\nvec3 L10 = coefficients[2];\nvec3 L11 = coefficients[3];\nvec3 L2_2 = coefficients[4];\nvec3 L2_1 = coefficients[5];\nvec3 L20 = coefficients[6];\nvec3 L21 = coefficients[7];\nvec3 L22 = coefficients[8];\nfloat x = normal.x;\nfloat y = normal.y;\nfloat z = normal.z;\nreturn c1 * L22 * (x * x - y * y) + c3 * L20 * z * z + c4 * L00 - c5 * L20 +\n2.0 * c1 * (L2_2 * x * y + L21 * x * z + L2_1 * y * z) +\n2.0 * c2 * (L11 * x + L1_1 * y + L10 * z);\n}\n",czm_tangentToEyeSpaceMatrix$1="mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\nvec3 normal = normalize(normalEC);\nvec3 tangent = normalize(tangentEC);\nvec3 bitangent = normalize(bitangentEC);\nreturn mat3(tangent.x , tangent.y , tangent.z,\nbitangent.x, bitangent.y, bitangent.z,\nnormal.x , normal.y , normal.z);\n}\n",czm_transformPlane$1="vec4 czm_transformPlane(vec4 clippingPlane, mat4 transform) {\nvec3 transformedDirection = normalize((transform * vec4(clippingPlane.xyz, 0.0)).xyz);\nvec3 transformedPosition = (transform * vec4(clippingPlane.xyz * -clippingPlane.w, 1.0)).xyz;\nvec4 transformedPlane;\ntransformedPlane.xyz = transformedDirection;\ntransformedPlane.w = -dot(transformedDirection, transformedPosition);\nreturn transformedPlane;\n}\n",czm_translateRelativeToEye$1="vec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\nvec3 highDifference = high - czm_encodedCameraPositionMCHigh;\nvec3 lowDifference = low - czm_encodedCameraPositionMCLow;\nreturn vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong$1="vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\nif (czm_sceneMode == czm_sceneMode3D) {\ndiffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n}\ndiffuse = clamp(diffuse, 0.0, 1.0);\nfloat specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\nvec3 materialDiffuse = material.diffuse * 0.5;\nvec3 ambient = materialDiffuse;\nvec3 color = ambient + material.emission;\ncolor += materialDiffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\n",czm_transpose$1="mat2 czm_transpose(mat2 matrix)\n{\nreturn mat2(\nmatrix[0][0], matrix[1][0],\nmatrix[0][1], matrix[1][1]);\n}\nmat3 czm_transpose(mat3 matrix)\n{\nreturn mat3(\nmatrix[0][0], matrix[1][0], matrix[2][0],\nmatrix[0][1], matrix[1][1], matrix[2][1],\nmatrix[0][2], matrix[1][2], matrix[2][2]);\n}\nmat4 czm_transpose(mat4 matrix)\n{\nreturn mat4(\nmatrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\nmatrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\nmatrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\nmatrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackDepth$1="float czm_unpackDepth(vec4 packedDepth)\n{\nreturn dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n}\n",czm_unpackFloat$1="#define SHIFT_RIGHT_8 0.00390625 //1.0 / 256.0\n#define SHIFT_RIGHT_16 0.00001525878 //1.0 / 65536.0\n#define SHIFT_RIGHT_24 5.960464477539063e-8//1.0 / 16777216.0\n#define BIAS 38.0\nfloat czm_unpackFloat(vec4 packedFloat)\n{\npackedFloat *= 255.0;\nfloat temp = packedFloat.w / 2.0;\nfloat exponent = floor(temp);\nfloat sign = (temp - exponent) * 2.0;\nexponent = exponent - float(BIAS);\nsign = sign * 2.0 - 1.0;\nsign = -sign;\nfloat unpacked = sign * packedFloat.x * float(SHIFT_RIGHT_8);\nunpacked += sign * packedFloat.y * float(SHIFT_RIGHT_16);\nunpacked += sign * packedFloat.z * float(SHIFT_RIGHT_24);\nreturn unpacked * pow(10.0, exponent);\n}\n",czm_unpackValue$1="float czm_unpackValue(vec4 packedValue)\n{\nfloat SHIFT_LEFT16 = 65536.0;\nfloat SHIFT_LEFT8 = 256.0;\nvec4 value = packedValue * 255.0;\nreturn value.r * SHIFT_LEFT16 + value.g * SHIFT_LEFT8 + value.b - 9000.0;\n}\n",czm_vertexLogDepth$1="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nvarying vec3 v_logPositionEC;\n#endif\n#endif\nvec4 czm_updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n#ifdef SHADOW_MAP\nvec3 logPositionEC = (czm_inverseProjection * coords).xyz;\nv_logPositionEC = logPositionEC;\n#endif\ncoords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\nreturn coords;\n}\nvoid czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = 1.0 - czm_currentFrustum.x + gl_Position.w;\ngl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\nvoid czm_vertexLogDepth(vec4 clipCoords)\n{\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = 1.0 - czm_currentFrustum.x + clipCoords.w;\nczm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates$1="vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)\n{\nfloat x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\nfloat y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\nfloat z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\nvec4 q = vec4(x, y, z, 1.0);\nq /= fragmentCoordinate.w;\nif (!(czm_inverseProjection == mat4(0.0)))\n{\nq = czm_inverseProjection * q;\n}\nelse\n{\nfloat top = czm_frustumPlanes.x;\nfloat bottom = czm_frustumPlanes.y;\nfloat left = czm_frustumPlanes.z;\nfloat right = czm_frustumPlanes.w;\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nq.x = (q.x * (right - left) + left + right) * 0.5;\nq.y = (q.y * (top - bottom) + bottom + top) * 0.5;\nq.z = (q.z * (near - far) - near - far) * 0.5;\nq.w = 1.0;\n}\nreturn q;\n}\nvec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)\n{\n#ifdef LOG_DEPTH\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nfloat log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\nfloat depthFromNear = pow(2.0, log2Depth) - 1.0;\nfloat depthFromCamera = depthFromNear + near;\nvec4 windowCoord = vec4(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\neyeCoordinate.w = 1.0 / depthFromCamera;\nreturn eyeCoordinate;\n#else\nvec4 windowCoord = vec4(fragmentCoordinateXY, depthOrLogDepth, 1.0);\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n#endif\nreturn eyeCoordinate;\n}\n",czm_writeDepthClampedToFarPlane$1="#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\nvoid czm_writeDepthClampedToFarPlane()\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && !defined(LOG_DEPTH)\ngl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n",czm_writeLogDepth$1="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\nuniform vec2 u_polygonOffset;\n#endif\n#endif\nvoid czm_writeLogDepth(float depth)\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && defined(LOG_DEPTH)\nif (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {\ndiscard;\n}\n#ifdef POLYGON_OFFSET\nfloat factor = u_polygonOffset[0];\nfloat units = u_polygonOffset[1];\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nfloat x = dFdx(depth);\nfloat y = dFdy(depth);\nfloat m = sqrt(x * x + y * y);\ndepth += m * factor;\n#endif\n#endif\ngl_FragDepthEXT = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\ngl_FragDepthEXT += czm_epsilon7 * units;\n#endif\n#endif\n}\nvoid czm_writeLogDepth() {\n#ifdef LOG_DEPTH\nczm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",czm_writeNonPerspective$1="float czm_writeNonPerspective(float value, float w) {\nreturn value * w;\n}\nvec2 czm_writeNonPerspective(vec2 value, float w) {\nreturn value * w;\n}\nvec3 czm_writeNonPerspective(vec3 value, float w) {\nreturn value * w;\n}\nvec4 czm_writeNonPerspective(vec4 value, float w) {\nreturn value * w;\n}\n",czm_XYZToRGB$1="vec3 czm_XYZToRGB(vec3 Yxy)\n{\nconst mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n-1.5371, 1.8760, -0.2040,\n-0.4985, 0.0416, 1.0572);\nvec3 xyz;\nxyz.r = Yxy.r * Yxy.g / Yxy.b;\nxyz.g = Yxy.r;\nxyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\nreturn XYZ2RGB * xyz;\n}\n",G$1d={czm_degreesPerRadian:czm_degreesPerRadian$1,czm_depthRange:czm_depthRange$1,czm_ellipsoidInverseRadii:czm_ellipsoidInverseRadii$1,czm_ellipsoidRadii:czm_ellipsoidRadii$1,czm_epsilon1:czm_epsilon1$1,czm_epsilon2:czm_epsilon2$1,czm_epsilon3:czm_epsilon3$1,czm_epsilon4:czm_epsilon4$1,czm_epsilon5:czm_epsilon5$1,czm_epsilon6:czm_epsilon6$1,czm_epsilon7:czm_epsilon7$1,czm_infinity:czm_infinity$1,czm_oneOverPi:czm_oneOverPi$1,czm_oneOverTwoPi:czm_oneOverTwoPi$1,czm_passCesium3DTile:czm_passCesium3DTile$1,czm_passCesium3DTileClassification:czm_passCesium3DTileClassification$1,czm_passCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow$1,czm_passClassification:czm_passClassification$1,czm_passCompute:czm_passCompute$1,czm_passEnvironment:czm_passEnvironment$1,czm_passGlobe:czm_passGlobe$1,czm_passGround:czm_passGround$1,czm_passOpaque:czm_passOpaque$1,czm_passOverlay:czm_passOverlay$1,czm_passTerrainClassification:czm_passTerrainClassification$1,czm_passTranslucent:czm_passTranslucent$1,czm_pi:czm_pi$1,czm_piOverFour:czm_piOverFour$1,czm_piOverSix:czm_piOverSix$1,czm_piOverThree:czm_piOverThree$1,czm_piOverTwo:czm_piOverTwo$1,czm_radiansPerDegree:czm_radiansPerDegree$1,czm_sceneMode2D:czm_sceneMode2D$1,czm_sceneMode3D:czm_sceneMode3D$1,czm_sceneModeColumbusView:czm_sceneModeColumbusView$1,czm_sceneModeMorphing:czm_sceneModeMorphing$1,czm_solarRadius:czm_solarRadius$1,czm_threePiOver2:czm_threePiOver2$1,czm_twoPi:czm_twoPi$1,czm_webMercatorMaxLatitude:czm_webMercatorMaxLatitude$1,czm_depthRangeStruct:czm_depthRangeStruct$1,czm_ellipsoid:czm_ellipsoid$1,czm_material:czm_material$1,czm_materialInput:czm_materialInput$1,czm_ray:czm_ray$1,czm_raySegment:czm_raySegment$1,czm_s3mMaterialInput:czm_s3mMaterialInput$1,czm_shadowParameters:czm_shadowParameters$1,czm_acesTonemapping:czm_acesTonemapping$1,czm_adjustColor:czm_adjustColor$1,czm_alphaWeight:czm_alphaWeight$1,czm_antialias:czm_antialias$1,czm_approximateSphericalCoordinates:czm_approximateSphericalCoordinates$1,czm_branchFreeTernary:czm_branchFreeTernary$1,czm_cascadeColor:czm_cascadeColor$1,czm_cascadeDistance:czm_cascadeDistance$1,czm_cascadeMatrix:czm_cascadeMatrix$1,czm_cascadeWeights:czm_cascadeWeights$1,czm_clip:czm_clip$1,czm_columbusViewMorph:czm_columbusViewMorph$1,czm_computeLightColorInFP:czm_computeLightColorInFP,czm_computeLightColorInstanceInFP:czm_computeLightColorInstanceInFP,czm_computeNormal:czm_computeNormal$1,czm_computePosition:czm_computePosition$1,czm_cosineAndSine:czm_cosineAndSine$1,czm_decompressTextureCoordinates:czm_decompressTextureCoordinates$1,czm_depthClampFarPlane:czm_depthClampFarPlane$1,czm_directionLight:czm_directionLight,czm_eastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates$1,czm_ellipsoidContainsPoint:czm_ellipsoidContainsPoint$1,czm_ellipsoidNew:czm_ellipsoidNew$1,czm_ellipsoidWgs84TextureCoordinates:czm_ellipsoidWgs84TextureCoordinates$1,czm_equalsEpsilon:czm_equalsEpsilon$1,czm_executeExcavation:czm_executeExcavation$1,czm_eyeOffset:czm_eyeOffset$1,czm_eyeToWindowCoordinates:czm_eyeToWindowCoordinates$1,czm_fastApproximateAtan:czm_fastApproximateAtan$1,czm_fog:czm_fog$1,czm_gammaCorrect:czm_gammaCorrect$1,czm_geodeticSurfaceNormal:czm_geodeticSurfaceNormal$1,czm_getDefaultMaterial:czm_getDefaultMaterial$1,czm_getEmissiveTextureColor:czm_getEmissiveTextureColor$1,czm_getHorizontalColor:czm_getHorizontalColor$1,czm_getHypsometricColor:czm_getHypsometricColor$1,czm_getLambertDiffuse:czm_getLambertDiffuse$1,czm_getSpecular:czm_getSpecular$1,czm_getTexColorForS3M:czm_getTexColorForS3M,czm_getTextureMatrixFromZValue:czm_getTextureMatrixFromZValue,czm_getVolumeValue:czm_getVolumeValue$1,czm_getVolumeValueMultiResolution:czm_getVolumeValueMultiResolution,czm_getWaterNoise:czm_getWaterNoise$1,czm_getWgs84EllipsoidEC:czm_getWgs84EllipsoidEC$1,czm_HSBToRGB:czm_HSBToRGB$1,czm_HSLToRGB:czm_HSLToRGB$1,czm_hue:czm_hue$1,czm_inverseGamma:czm_inverseGamma$1,czm_inverseMatrix:czm_inverseMatrix$1,czm_isEmpty:czm_isEmpty$1,czm_isFull:czm_isFull$1,czm_latitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction$1,czm_lineDistance:czm_lineDistance$1,czm_luminance:czm_luminance$1,czm_metersPerPixel:czm_metersPerPixel$1,czm_modelToWindowCoordinates:czm_modelToWindowCoordinates$1,czm_multiplyWithColorBalance:czm_multiplyWithColorBalance$1,czm_nearFarScalar:czm_nearFarScalar$1,czm_octDecode:czm_octDecode$1,czm_packDepth:czm_packDepth$1,czm_packValue:czm_packValue$1,czm_phong:czm_phong$1,czm_planeDistance:czm_planeDistance$1,czm_pointAlongRay:czm_pointAlongRay$1,czm_rayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval$1,czm_raySphereIntersectionInterval:czm_raySphereIntersectionInterval,czm_readDepth:czm_readDepth$1,czm_readNonPerspective:czm_readNonPerspective$1,czm_reverseLogDepth:czm_reverseLogDepth$1,czm_RGBToHSB:czm_RGBToHSB$1,czm_RGBToHSL:czm_RGBToHSL$1,czm_RGBToXYZ:czm_RGBToXYZ$1,czm_RollerShutter:czm_RollerShutter$1,czm_s3mBatchOperation:czm_s3mBatchOperation$1,czm_S3MPBR:czm_S3MPBR$1,czm_sampleAndBlend:czm_sampleAndBlend$1,czm_sampleOctahedralProjection:czm_sampleOctahedralProjection$1,czm_saturation:czm_saturation$1,czm_shadowDepthCompare:czm_shadowDepthCompare,czm_shadowVisibility:czm_shadowVisibility,czm_signNotZero:czm_signNotZero$1,czm_sketchMode:czm_sketchMode$1,czm_sphericalHarmonics:czm_sphericalHarmonics$1,czm_tangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix$1,czm_transformPlane:czm_transformPlane$1,czm_translateRelativeToEye:czm_translateRelativeToEye$1,czm_translucentPhong:czm_translucentPhong$1,czm_transpose:czm_transpose$1,czm_unpackDepth:czm_unpackDepth$1,czm_unpackFloat:czm_unpackFloat$1,czm_unpackValue:czm_unpackValue$1,czm_vertexLogDepth:czm_vertexLogDepth$1,czm_windowToEyeCoordinates:czm_windowToEyeCoordinates$1,czm_writeDepthClampedToFarPlane:czm_writeDepthClampedToFarPlane$1,czm_writeLogDepth:czm_writeLogDepth$1,czm_writeNonPerspective:czm_writeNonPerspective$1,czm_XYZToRGB:czm_XYZToRGB$1},czm_degreesPerRadian="/**\n * A built-in GLSL floating-point constant for converting radians to degrees.\n *\n * @alias czm_degreesPerRadian\n * @glslConstant\n *\n * @see CesiumMath.DEGREES_PER_RADIAN\n *\n * @example\n * // GLSL declaration\n * const float czm_degreesPerRadian = ...;\n *\n * // Example\n * float deg = czm_degreesPerRadian * rad;\n */\nconst float czm_degreesPerRadian = 57.29577951308232;\n",czm_depthRange="/**\n * A built-in GLSL vec2 constant for defining the depth range.\n * This is a workaround to a bug where IE11 does not implement gl_DepthRange.\n *\n * @alias czm_depthRange\n * @glslConstant\n *\n * @example\n * // GLSL declaration\n * float depthRangeNear = czm_depthRange.near;\n * float depthRangeFar = czm_depthRange.far;\n *\n */\nconst czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n",czm_ellipsoidInverseRadii="/**\n * The reciprocal of the radius of the WGS84 ellipsoid.\n *\n * @name czm_ellipsoidInverseRadii\n * @glslConstant\n */\nconst czm_ellipsoidInverseRadii = vec3<f32>(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.314245);\n",czm_ellipsoidRadii="/**\n * The radius of the WGS84 ellipsoid.\n *\n * @name czm_ellipsoidRadii\n * @glslConstant\n */\nconst czm_ellipsoidRadii = vec3<f32>(6378137.0, 6378137.0, 6356752.314245);\n",czm_epsilon1="/**\n * 0.1\n *\n * @name czm_epsilon1\n * @glslConstant\n */\nconst czm_epsilon1 = 0.1;\n",czm_epsilon2="/**\n * 0.01\n *\n * @name czm_epsilon2\n * @glslConstant\n */\nconst czm_epsilon2 = 0.01;\n",czm_epsilon3="/**\n * 0.001\n *\n * @name czm_epsilon3\n * @glslConstant\n */\nconst czm_epsilon3 = 0.001;\n",czm_epsilon4="/**\n * 0.0001\n *\n * @name czm_epsilon4\n * @glslConstant\n */\nconst czm_epsilon4 = 0.0001;\n",czm_epsilon5="/**\n * 0.00001\n *\n * @name czm_epsilon5\n * @glslConstant\n */\nconst czm_epsilon5 = 0.00001;\n",czm_epsilon6="/**\n * 0.000001\n *\n * @name czm_epsilon6\n * @glslConstant\n */\nconst czm_epsilon6 = 0.000001;\n",czm_epsilon7="/**\n * 0.0000001\n *\n * @name czm_epsilon7\n * @glslConstant\n */\nconst czm_epsilon7 = 0.0000001;\n",czm_infinity="/**\n * DOC_TBA\n *\n * @name czm_infinity\n * @glslConstant\n */\nconst float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?\n",czm_oneOverPi="/**\n * A built-in GLSL floating-point constant for <code>1/pi</code>.\n *\n * @alias czm_oneOverPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverPi = ...;\n *\n * // Example\n * float pi = 1.0 / czm_oneOverPi;\n */\nconst float czm_oneOverPi = 0.3183098861837907;\n",czm_oneOverTwoPi="/**\n * A built-in GLSL floating-point constant for <code>1/2pi</code>.\n *\n * @alias czm_oneOverTwoPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverTwoPi = ...;\n *\n * // Example\n * float pi = 2.0 * czm_oneOverTwoPi;\n */\nconst float czm_oneOverTwoPi = 0.15915494309189535;\n",czm_passCesium3DTile="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}\n *\n * @name czm_passCesium3DTile\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTile = 4.0;\n",czm_passCesium3DTileClassification="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}\n *\n * @name czm_passCesium3DTileClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassification = 5.0;\n",czm_passCesium3DTileClassificationIgnoreShow="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}\n *\n * @name czm_passCesium3DTileClassificationIgnoreShow\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n",czm_passClassification="/**\n * The automatic GLSL constant for {@link Pass#CLASSIFICATION}\n *\n * @name czm_passClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passClassification = 7.0;\n",czm_passCompute="/**\n * The automatic GLSL constant for {@link Pass#COMPUTE}\n *\n * @name czm_passCompute\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCompute = 1.0;\n",czm_passEnvironment="/**\n * The automatic GLSL constant for {@link Pass#ENVIRONMENT}\n *\n * @name czm_passEnvironment\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passEnvironment = 0.0;\n",czm_passGlobe="/**\n * The automatic GLSL constant for {@link Pass#GLOBE}\n *\n * @name czm_passGlobe\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGlobe = 2.0;\n",czm_passGround="/**\n * The automatic GLSL constant for {@link Pass#GROUND}\n *\n * @name czm_passGround\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGround = 4.0;\n",czm_passOpaque="/**\n * The automatic GLSL constant for {@link Pass#OPAQUE}\n *\n * @name czm_passOpaque\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOpaque = 12.0;\n",czm_passOverlay="/**\n * The automatic GLSL constant for {@link Pass#OVERLAY}\n *\n * @name czm_passOverlay\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOverlay = 20.0;",czm_passTerrainClassification="/**\n * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}\n *\n * @name czm_passTerrainClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTerrainClassification = 3.0;\n",czm_passTranslucent="/**\n * The automatic GLSL constant for {@link Pass#TRANSLUCENT}\n *\n * @name czm_passTranslucent\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTranslucent = 18.0;",czm_pi="/**\n * A built-in GLSL floating-point constant for <code>Math.PI</code>.\n *\n * @alias czm_pi\n * @glslConstant\n *\n * @see CesiumMath.PI\n *\n * @example\n * // GLSL declaration\n * const float czm_pi = ...;\n *\n * // Example\n * float twoPi = 2.0 * czm_pi;\n */\nconst czm_pi = 3.141592653589793;\n",czm_piOverFour="/**\n * A built-in GLSL floating-point constant for <code>pi/4</code>.\n *\n * @alias czm_piOverFour\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_FOUR\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverFour = ...;\n *\n * // Example\n * float pi = 4.0 * czm_piOverFour;\n */\nconst float czm_piOverFour = 0.7853981633974483;\n",czm_piOverSix="/**\n * A built-in GLSL floating-point constant for <code>pi/6</code>.\n *\n * @alias czm_piOverSix\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_SIX\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverSix = ...;\n *\n * // Example\n * float pi = 6.0 * czm_piOverSix;\n */\nconst float czm_piOverSix = 0.5235987755982988;\n",czm_piOverThree="/**\n * A built-in GLSL floating-point constant for <code>pi/3</code>.\n *\n * @alias czm_piOverThree\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_THREE\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverThree = ...;\n *\n * // Example\n * float pi = 3.0 * czm_piOverThree;\n */\nconst float czm_piOverThree = 1.0471975511965976;\n",czm_piOverTwo="/**\n * A built-in GLSL floating-point constant for <code>pi/2</code>.\n *\n * @alias czm_piOverTwo\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverTwo = ...;\n *\n * // Example\n * float pi = 2.0 * czm_piOverTwo;\n */\nconst float czm_piOverTwo = 1.5707963267948966;\n",czm_radiansPerDegree="/**\n * A built-in GLSL floating-point constant for converting degrees to radians.\n *\n * @alias czm_radiansPerDegree\n * @glslConstant\n *\n * @see CesiumMath.RADIANS_PER_DEGREE\n *\n * @example\n * // GLSL declaration\n * const float czm_radiansPerDegree = ...;\n *\n * // Example\n * float rad = czm_radiansPerDegree * deg;\n */\nconst czm_radiansPerDegree = 0.017453292519943295;\n",czm_sceneMode2D="/**\n * The constant identifier for the 2D {@link SceneMode}\n *\n * @name czm_sceneMode2D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode2D = 2.0;\n",czm_sceneMode3D="/**\n * The constant identifier for the 3D {@link SceneMode}\n *\n * @name czm_sceneMode3D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode3D = 3.0;\n",czm_sceneModeColumbusView="/**\n * The constant identifier for the Columbus View {@link SceneMode}\n *\n * @name czm_sceneModeColumbusView\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneModeColumbusView = 1.0;\n",czm_sceneModeMorphing="/**\n * The constant identifier for the Morphing {@link SceneMode}\n *\n * @name czm_sceneModeMorphing\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n */\nconst float czm_sceneModeMorphing = 0.0;\n",czm_solarRadius="/**\n * A built-in GLSL floating-point constant for one solar radius.\n *\n * @alias czm_solarRadius\n * @glslConstant\n *\n * @see CesiumMath.SOLAR_RADIUS\n *\n * @example\n * // GLSL declaration\n * const float czm_solarRadius = ...;\n */\nconst float czm_solarRadius = 695500000.0;\n",czm_threePiOver2="/**\n * A built-in GLSL floating-point constant for <code>3pi/2</code>.\n *\n * @alias czm_threePiOver2\n * @glslConstant\n *\n * @see CesiumMath.THREE_PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_threePiOver2 = ...;\n *\n * // Example\n * float pi = (2.0 / 3.0) * czm_threePiOver2;\n */\nconst float czm_threePiOver2 = 4.71238898038469;\n",czm_twoPi="/**\n * A built-in GLSL floating-point constant for <code>2pi</code>.\n *\n * @alias czm_twoPi\n * @glslConstant\n *\n * @see CesiumMath.TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_twoPi = ...;\n *\n * // Example\n * float pi = czm_twoPi / 2.0;\n */\nconst float czm_twoPi = 6.283185307179586;\n",czm_webMercatorMaxLatitude="/**\n * The maximum latitude, in radians, both North and South, supported by a Web Mercator\n * (EPSG:3857) projection. Technically, the Mercator projection is defined\n * for any latitude up to (but not including) 90 degrees, but it makes sense\n * to cut it off sooner because it grows exponentially with increasing latitude.\n * The logic behind this particular cutoff value, which is the one used by\n * Google Maps, Bing Maps, and Esri, is that it makes the projection\n * square. That is, the rectangle is equal in the X and Y directions.\n *\n * The constant value is computed as follows:\n * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))\n *\n * @name czm_webMercatorMaxLatitude\n * @glslConstant\n */\nconst float czm_webMercatorMaxLatitude = 1.4844222297453324;\n",czm_depthRangeStruct="/**\n * @name czm_depthRangeStruct\n * @glslStruct\n */\nstruct czm_depthRangeStruct\n{\n float near;\n float far;\n};\n",czm_ellipsoid="/** DOC_TBA\n *\n * @name czm_ellipsoid\n * @glslStruct\n */\nstruct czm_ellipsoid\n{\n vec3 center;\n vec3 radii;\n vec3 inverseRadii;\n vec3 inverseRadiiSquared;\n};\n",czm_material="/**\n * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.\n *\n * @name czm_material\n * @glslStruct\n *\n * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n * @property {float} specular Intensity of incoming light reflecting in a single direction.\n * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n * @property {float} alpha Opacity of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n */\nstruct czm_material\n{\n diffuse : vec3<f32>;\n specular : f32;\n shininess : f32;\n normal : vec3<f32>;\n emission : vec3<f32>;\n alpha : f32;\n};\n",czm_materialInput="/**\n * Used as input to every material's czm_getMaterial function.\n *\n * @name czm_materialInput\n * @glslStruct\n *\n * @property {float} s 1D texture coordinates.\n * @property {vec2} st 2D texture coordinates.\n * @property {vec3} str 3D texture coordinates.\n * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.\n * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.\n * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.\n * @property {float} height The height of the terrain in meters above or below the WGS84 ellipsoid. Only available for globe materials.\n * @property {float} slope The slope of the terrain normalized from 0 to 1. 0 is completely vertical, 1 is completely flat. Only available for globe materials.\n */\nstruct czm_materialInput\n{\n s : f32;\n st : vec2<f32>;\n str : vec3<f32>;\n normalEC : vec3<f32>;\n tangentToEyeMatrix : mat3x3<f32>;\n positionToEyeEC : vec3<f32>;\n height : f32;\n slope : f32;\n};\n",czm_ray="/**\n * DOC_TBA\n *\n * @name czm_ray\n * @glslStruct\n */\nstruct czm_ray\n{\n origin : vec3<f32>;\n direction : vec3<f32>;\n};\n",czm_raySegment="/**\n * DOC_TBA\n *\n * @name czm_raySegment\n * @glslStruct\n */\nstruct czm_raySegment\n{\n start : f32;\n stop : f32;\n};\n\n/**\n * DOC_TBA\n *\n * @name czm_emptyRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\n\n/**\n * DOC_TBA\n *\n * @name czm_fullRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n",czm_s3mMaterialInput="struct czm_s3mMaterialInput\n{\n vec4 ambientColor;\n vec4 diffuseColor;\n vec4 ambientLightColor;\n vec4 sunLightColor;\n mat4 texMatrix;\n float texture0Width;\n float texture1Width;\n vec3 sunDirectionEC;\n float sunLightON;\n};\n",czm_shadowParameters="struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\n texCoords : vec3<f32>,\n#else\n texCoords : vec2<f32>,\n#endif\n\n depthBias : f32,\n depth : f32,\n nDotL : f32,\n texelStepSize : vec2<f32>,\n normalShadingSmooth : f32,\n darkness : f32,\n shadowMapIndex : f32\n};\n",czm_acesTonemapping="// See:\n// https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/\n\nfn czm_acesTonemapping(inColor : vec3<f32>) -> vec3<f32> {\n var color = inColor;\n var g = 0.985f;\n var a = 0.065f;\n var b = 0.0001f;\n var c = 0.433f;\n var d = 0.238f;\n color = (color * (color + a) - b) / (color * (g * color + c) + d);\n color = clamp(color, vec3<f32>(0.0f, 0.0f, 0.0f), vec3<f32>(1.0f, 1.0f, 1.0f));\n return color;\n}\n",czm_adjustColor="uniform float uBrightness;\nuniform float uContrast;\nuniform float uHue;\nuniform float uSaturation;\nuniform float uOneOverGamma;\nvec3 czm_adjustColor(vec3 inputColor)\n{\n vec3 outputColor = inputColor;\n outputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\n outputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\n outputColor.rgb = czm_hue(outputColor.rgb, uHue);\n outputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\n outputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\n outputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\n return outputColor;\n}",czm_alphaWeight="\nfn czm_alphaWeight(a : f32) -> f32\n{\n var z = (gl_FragCoord.z - Scene.uViewportTransformation[3][2]) / Scene.uViewportTransformation[2][2];\n\n // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:\n // http://jcgt.org/published/0002/02/09/\n return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n",czm_antialias="/**\n * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.\n *\n * @name czm_antialias\n * @glslFunction\n *\n * @param {vec4} color1 The color on one side of the edge.\n * @param {vec4} color2 The color on the other side of the edge.\n * @param {vec4} currentcolor The current color, either <code>color1</code> or <code>color2</code>.\n * @param {float} dist The distance to the edge in texture coordinates.\n * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.\n * @returns {vec4} The anti-aliased color.\n *\n * @example\n * // GLSL declarations\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);\n *\n * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space\n * float dist = abs(textureCoordinates.t - 0.5);\n * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));\n * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);\n */\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\n float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\n float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\n val1 = val1 * (1.0 - val2);\n val1 = val1 * val1 * (3.0 - (2.0 * val1));\n val1 = pow(val1, 0.5); //makes the transition nicer\n \n vec4 midColor = (color1 + color2) * 0.5;\n return mix(midColor, currentColor, val1);\n}\n\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\n return czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n",czm_approximateSphericalCoordinates="/**\n * Approximately computes spherical coordinates given a normal.\n * Uses approximate inverse trigonometry for speed and consistency,\n * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.\n *\n * @name czm_approximateSphericalCoordinates\n * @glslFunction\n *\n * @param {vec3} normal arbitrary-length normal.\n *\n * @returns {vec2} Approximate latitude and longitude spherical coordinates.\n */\nvec2 czm_approximateSphericalCoordinates(vec3 normal) {\n // Project into plane with vertical for latitude\n float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\n float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\n return vec2(latitudeApproximation, longitudeApproximation);\n}\n",czm_branchFreeTernary="/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a float expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {float} a Value to return if the comparison is true.\n * @param {float} b Value to return if the comparison is false.\n *\n * @returns {float} equivalent of comparison ? a : b\n */\nfloat czm_branchFreeTernary(bool comparison, float a, float b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec2 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec2} a Value to return if the comparison is true.\n * @param {vec2} b Value to return if the comparison is false.\n *\n * @returns {vec2} equivalent of comparison ? a : b\n */\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec3 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec4 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n",czm_cascadeColor="\nvec4 czm_cascadeColor(vec4 weights)\n{\n return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\n vec4(0.0, 1.0, 0.0, 1.0) * weights.y +\n vec4(0.0, 0.0, 1.0, 1.0) * weights.z +\n vec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n",czm_cascadeDistance="\nuniform vec4 shadowMap_cascadeDistances;\n\nfloat czm_cascadeDistance(vec4 weights)\n{\n return dot(shadowMap_cascadeDistances, weights);\n}\n",czm_cascadeMatrix="\nuniform mat4 shadowMap_cascadeMatrices[4];\n\nmat4 czm_cascadeMatrix(vec4 weights)\n{\n return shadowMap_cascadeMatrices[0] * weights.x +\n shadowMap_cascadeMatrices[1] * weights.y +\n shadowMap_cascadeMatrices[2] * weights.z +\n shadowMap_cascadeMatrices[3] * weights.w;\n}\n",czm_cascadeWeights="\nuniform shadowMap_cascadeSplits : array<vec4<f32>, 2>;\n\nfn czm_cascadeWeights(depthEye : f32) -> vec4<f32>\n{\n // One component is set to 1.0 and all others set to 0.0.\n var near = step(shadowMap_cascadeSplits[0], vec4<f32>(depthEye));\n var far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}\n",czm_clip="\nuniform clip_mode : f32;\nuniform clip_planes : array<vec4<f32>, 6>;\nuniform clip_line_color : vec4<f32>;\nconst clip_lineWidth = 3.0;\n\nfn GetClipDistance(pos : vec3<f32>, planeNormal : vec3<f32>, disToOrigin : f32) -> f32\n{\n\treturn dot(planeNormal, pos) + disToOrigin;\n}\n\nfn ClipBehindAllPlane(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n\tvar distance = 0.0;\n\tvar result = -1.0;\n#ifdef CLIPPLANE\n\tdistance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[0].xyz, uniforms.clip_planes[0].w);\n\tif (distance < 0.0)\n\t{\n\t\treturn 1.0;\n\t}\n\telse if (distance < fBorderWidth)\n\t{\n\t\tresult = 0.0;\n\t}\n#else\n\tvar i : u32;\n\tfor(i = 0; i < 6; i++)\n\t{\n\t\tdistance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[i].xyz, uniforms.clip_planes[i].w);\n\t\tif(distance < 0.0)\n\t\t{\n\t\t\treturn 1.0;\n\t\t}\n\t\telse if(distance < fBorderWidth)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n#endif // CLIPPLANE\n\treturn result;\n}\n\nfn ClipBehindAnyPlane(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n\tvar result = 1.0;\n\tvar i : u32;\n\tfor(i = 0; i < 6; i++)\n\t{\n\t\tvar distance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[i].xyz, uniforms.clip_planes[i].w);\n\t\tif((distance + fBorderWidth) < 0.0)\n\t\t{\n\t\t\treturn -1.0;\n\t\t}\n\t\telse if(distance < 0.0)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n\treturn result;\n}\n\nfn ClipAnythingButLine(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n\tvar result = -1.0;\n\tvar i : u32;\n\tfor(i = 0; i < 6; i++)\n\t{\n\t\tvar distance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[i].xyz, uniforms.clip_planes[i].w);\n\t\tif(distance < 0.0)\n\t\t{\n\t\t\treturn -1.0;\n\t\t}\n\t\telse if(distance < fBorderWidth)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n\treturn result;\n}\n\nfn czm_clip(clip_vertex : vec4<f32>, fIsFiltByID : f32) -> vec4<f32>\n{\n if(fIsFiltByID < 0.1)\n {\n return vec4<f32>(1.0);\n }\n\tif(uniforms.clip_mode < 0.5)\n\t{\n\t\treturn vec4<f32>(1.0);\n\t}\n\n\tvar fBorderWidth = clip_lineWidth;\n\tvar clipResult = 1.0;\n\tif(uniforms.clip_line_color.a < 0.01)\n\t{\n\t\tfBorderWidth = 0.0;\n\t}\n\tif(uniforms.clip_mode < 1.5)\n\t{\n\t\tclipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n\t}\n\telse if(uniforms.clip_mode < 2.5)\n\t{\n\t\tclipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n\t}\n\telse if(uniforms.clip_mode < 3.5)\n\t{\n\t\tclipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n\t}\n\tif(clipResult < -0.5)\n\t{\n\t\tdiscard;\n\t}\n\telse if(clipResult < 0.5)\n\t{\n\t\treturn uniforms.clip_line_color;\n\t}\n\telse\n\t{\n return vec4<f32>(1.0);\n\t}\n}\n",czm_columbusViewMorph="\nfn czm_columbusViewMorph(position2D : vec4<f32>, position3D : vec4<f32>, time : f32) -> vec4<f32>\n{\n // Just linear for now.\n var p = mix(position2D.xyz, position3D.xyz, time);\n return vec4<f32>(p, 1.0);\n}\n",czm_computeNormal="\nfn czm_computeNormal(oriVertex : vec3<f32>) -> vec3<f32> {\n var normal : vec3<f32>;\n normal = cross(vec3<f32>(dpdx(oriVertex.x), dpdx(oriVertex.y), dpdx(oriVertex.z)), vec3<f32>(dpdy(oriVertex.x), dpdy(oriVertex.y), dpdy(oriVertex.z)));\n normal = normalize(normal);\n return normal;\n}",czm_computePosition="/**\n * Returns a position in model coordinates relative to eye taking into\n * account the current scene mode: 3D, 2D, or Columbus view.\n * <p>\n * This uses standard position attributes, <code>position3DHigh</code>, \n * <code>position3DLow</code>, <code>position2DHigh</code>, and <code>position2DLow</code>, \n * and should be used when writing a vertex shader for an {@link Appearance}.\n * </p>\n *\n * @name czm_computePosition\n * @glslFunction\n *\n * @returns {vec4} The position relative to eye.\n *\n * @example\n * vec4 p = czm_computePosition();\n * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n *\n * @see czm_translateRelativeToEye\n */\nvec4 czm_computePosition();\n",czm_cosineAndSine="/**\n * @private\n */\nvec2 cordic(float angle)\n{\n// Scale the vector by the appropriate factor for the 24 iterations to follow.\n vec2 vector = vec2(6.0725293500888267e-1, 0.0);\n// Iteration 1\n float sense = (angle < 0.0) ? -1.0 : 1.0;\n // float factor = sense * 1.0; // 2^-0\n mat2 rotation = mat2(1.0, sense, -sense, 1.0);\n vector = rotation * vector;\n angle -= sense * 7.8539816339744828e-1; // atan(2^-0)\n// Iteration 2\n sense = (angle < 0.0) ? -1.0 : 1.0;\n float factor = sense * 5.0e-1; // 2^-1\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.6364760900080609e-1; // atan(2^-1)\n// Iteration 3\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.5e-1; // 2^-2\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4497866312686414e-1; // atan(2^-2)\n// Iteration 4\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.25e-1; // 2^-3\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2435499454676144e-1; // atan(2^-3)\n// Iteration 5\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.25e-2; // 2^-4\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.2418809995957350e-2; // atan(2^-4)\n// Iteration 6\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.125e-2; // 2^-5\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.1239833430268277e-2; // atan(2^-5)\n// Iteration 7\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.5625e-2; // 2^-6\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5623728620476831e-2; // atan(2^-6)\n// Iteration 8\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.8125e-3; // 2^-7\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.8123410601011111e-3; // atan(2^-7)\n// Iteration 9\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.90625e-3; // 2^-8\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.9062301319669718e-3; // atan(2^-8)\n// Iteration 10\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.953125e-3; // 2^-9\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9531225164788188e-3; // atan(2^-9)\n// Iteration 11\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.765625e-4; // 2^-10\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.7656218955931946e-4; // atan(2^-10)\n// Iteration 12\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.8828125e-4; // 2^-11\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.8828121119489829e-4; // atan(2^-11)\n// Iteration 13\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.44140625e-4; // 2^-12\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4414062014936177e-4; // atan(2^-12)\n// Iteration 14\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.220703125e-4; // 2^-13\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2207031189367021e-4; // atan(2^-13)\n// Iteration 15\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.103515625e-5; // 2^-14\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.1035156174208773e-5; // atan(2^-14)\n// Iteration 16\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.0517578125e-5; // 2^-15\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.0517578115526096e-5; // atan(2^-15)\n// Iteration 17\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.52587890625e-5; // 2^-16\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5258789061315762e-5; // atan(2^-16)\n// Iteration 18\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.62939453125e-6; // 2^-17\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.6293945311019700e-6; // atan(2^-17)\n// Iteration 19\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.814697265625e-6; // 2^-18\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.8146972656064961e-6; // atan(2^-18)\n// Iteration 20\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.9073486328125e-6; // 2^-19\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9073486328101870e-6; // atan(2^-19)\n// Iteration 21\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.5367431640625e-7; // 2^-20\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.5367431640596084e-7; // atan(2^-20)\n// Iteration 22\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.76837158203125e-7; // 2^-21\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.7683715820308884e-7; // atan(2^-21)\n// Iteration 23\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.384185791015625e-7; // 2^-22\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.3841857910155797e-7; // atan(2^-22)\n// Iteration 24\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.1920928955078125e-7; // 2^-23\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n// angle -= sense * 1.1920928955078068e-7; // atan(2^-23)\n\n return vector;\n}\n\n/**\n * Computes the cosine and sine of the provided angle using the CORDIC algorithm.\n *\n * @name czm_cosineAndSine\n * @glslFunction\n *\n * @param {float} angle The angle in radians.\n *\n * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).\n *\n * @example\n * vec2 v = czm_cosineAndSine(czm_piOverSix);\n * float cosine = v.x;\n * float sine = v.y;\n */\nvec2 czm_cosineAndSine(float angle)\n{\n if (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n {\n if (angle < 0.0)\n {\n return -cordic(angle + czm_pi);\n }\n else\n {\n return -cordic(angle - czm_pi);\n }\n }\n else\n {\n return cordic(angle);\n }\n}\n",czm_decompressTextureCoordinates="/**\n * Decompresses texture coordinates that were packed into a single float.\n *\n * @name czm_decompressTextureCoordinates\n * @glslFunction\n *\n * @param {float} encoded The compressed texture coordinates.\n * @returns {vec2} The decompressed texture coordinates.\n */\n fn czm_decompressTextureCoordinates(encoded : f32) -> vec2<f32>\n {\n var temp = encoded / 4096.0;\n var xZeroTo4095 = floor(temp);\n var stx = xZeroTo4095 / 4095.0;\n var sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\n return vec2<f32>(stx, sty);\n }\n",czm_depthClampFarPlane="// emulated noperspective\n#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\n\n/**\n * Clamps a vertex to the far plane.\n *\n * @name czm_depthClampFarPlane\n * @glslFunction\n *\n * @param {vec4} coords The vertex in clip coordinates.\n * @returns {vec4} The vertex clipped to the far plane.\n *\n * @example\n * gl_Position = czm_depthClampFarPlane(czm_modelViewProjection * vec4(position, 1.0));\n *\n * @see czm_writeDepthClampedToFarPlane\n */\nvec4 czm_depthClampFarPlane(vec4 coords)\n{\n#ifndef LOG_DEPTH\n v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\n coords.z = min(coords.z, coords.w);\n#endif\n return coords;\n}\n",czm_eastNorthUpToEyeCoordinates="/**\n * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system \n * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the \n * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.\n * <br /><br />\n * The ellipsoid is assumed to be centered at the model coordinate's origin.\n *\n * @name czm_eastNorthUpToEyeCoordinates\n * @glslFunction\n *\n * @param {vec3} positionMC The position on the ellipsoid in model coordinates.\n * @param {vec3} normalEC The normalized ellipsoid surface normal, at <code>positionMC</code>, in eye coordinates.\n *\n * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.\n *\n * @example\n * // Transform a vector defined in the east-north-up coordinate \n * // system, (0, 0, 1) which is the surface normal, to eye \n * // coordinates.\n * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);\n */\nmat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\n vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates\n vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordiantes\n vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates\n\n return mat3(\n tangentEC.x, tangentEC.y, tangentEC.z,\n bitangentEC.x, bitangentEC.y, bitangentEC.z,\n normalEC.x, normalEC.y, normalEC.z);\n}\n",czm_ellipsoidContainsPoint="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidContainsPoint\n * @glslFunction\n *\n */\nbool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\n vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\n return (dot(scaled, scaled) <= 1.0);\n}\n",czm_ellipsoidNew="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidNew\n * @glslFunction\n *\n */\nczm_ellipsoid czm_ellipsoidNew(vec3 center, vec3 radii)\n{\n vec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n vec3 inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(center, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n",czm_ellipsoidWgs84TextureCoordinates="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidWgs84TextureCoordinates\n * @glslFunction\n */\nvec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\n return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n",czm_equalsEpsilon="/**\n * Compares <code>left</code> and <code>right</code> componentwise. Returns <code>true</code>\n * if they are within <code>epsilon</code> and <code>false</code> otherwise. The inputs\n * <code>left</code> and <code>right</code> can be <code>float</code>s, <code>vec2</code>s,\n * <code>vec3</code>s, or <code>vec4</code>s.\n *\n * @name czm_equalsEpsilon\n * @glslFunction\n *\n * @param {} left The first vector.\n * @param {} right The second vector.\n * @param {float} epsilon The epsilon to use for equality testing.\n * @returns {bool} <code>true</code> if the components are within <code>epsilon</code> and <code>false</code> otherwise.\n *\n * @example\n * // GLSL declarations\n * bool czm_equalsEpsilon(float left, float right, float epsilon);\n * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);\n * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);\n * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);\n */\nbool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\n\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\n return (abs(left - right) <= epsilon);\n}\n",czm_ExcavationFS="uniform sampler2D uColorTexture;\nuniform sampler2D uRasterTexture;\nvarying float vHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying float regionHeight;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uRasterTexture, vTexCoord0));\n if(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n }\n if (vHeight > terrainHeight || vHeight < regionHeight) { \n discard;\n }\n vec4 baseColorWithAlpha = texture2D(uColorTexture, vTexCoord1);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(vTexCoord1.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(vTexCoord1.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, vTexCoord1.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n if(gl_FrontFacing)\n {\n n = -n;\n }\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}\n",czm_ExcavationVS="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nattribute vec2 aTexCoord1;\nvarying float vHeight;\nvarying float regionHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vHeight = aPosition.w;\n vTexCoord0 = aTexCoord0.xy;\n vTexCoord1 = aTexCoord1;\n regionHeight = aTexCoord0.z;\n gl_Position = pos;\n v_positionMC = vec4(aPosition.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\n}\n",czm_executeExcavation="#ifdef EXCAVATION\nvar uExcavationTexture : texture_2d<f32>;\nvar uExcavationTextureSampler : sampler;\n\nvarying vExcavationVertexPos : vec4<f32>;\nfn CalculateExcavationPolyTexCoord(vertexPos :vec4<f32>, rectPos : vec4<f32>) -> vec3<f32>\n{\n var vecRatio = vec2<f32>(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n var texCoord = vec2<f32>(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n var ptInRect : f32 = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2<f32>(0.0), vec2<f32>(1.0));\n var result = vec3<f32>(texCoord.xy, ptInRect);\n return result;\n}\nfn czm_executeExcavation() -> bool\n{\n var vecExcavationTexCoord = CalculateExcavationPolyTexCoord(vExcavationVertexPos, Layer.uExcavationRect);\n var hasExcavation = vecExcavationTexCoord.z;\n var excavationInside : bool = (Layer.uExcavationMode < 0.5);\n var regionColor = textureSample(uExcavationTexture, uExcavationTextureSampler, vecExcavationTexCoord.xy).r;\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n if(excavationInside)\n {\n return regionColor > 0.5;\n }\n else\n {\n return regionColor < 0.5;\n }\n}\n#endif",czm_eyeOffset="/**\n * DOC_TBA\n *\n * @name czm_eyeOffset\n * @glslFunction\n *\n * @param {vec4} positionEC DOC_TBA.\n * @param {vec3} eyeOffset DOC_TBA.\n *\n * @returns {vec4} DOC_TBA.\n */\nvec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\n // This equation is approximate in x and y.\n vec4 p = positionEC;\n vec4 zEyeOffset = normalize(p) * eyeOffset.z;\n p.xy += eyeOffset.xy + zEyeOffset.xy;\n p.z += zEyeOffset.z;\n return p;\n}\n",czm_eyeToWindowCoordinates="/**\n * Transforms a position from eye to window coordinates. The transformation\n * from eye to clip coordinates is done using {@link czm_projection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of <code>near = 0</code> and <code>far = 1</code>.\n * <br /><br />\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *\n * @name czm_eyeToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in eye coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_projection\n * @see czm_viewportTransformation\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n */\nfn czm_eyeToWindowCoordinates(positionEC : vec4<f32>) -> vec4<f32>\n{\n var q = uniforms.czm_projection * positionEC; // clip coordinates\n var qxyz = q.xyz;\n q = vec4<f32>(qxyz / q.w, q.w); // normalized device coordinates\n q = vec4<f32>((uniforms.czm_viewportTransformation * vec4<f32>(q.xyz, 1.0)).xyz, q.w); // window coordinates\n return q;\n}\n",czm_fastApproximateAtan="/**\n * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.\n *\n * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on\n * \"Efficient approximations for the arctangent function,\" Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.\n * Adapted from ShaderFastLibs under MIT License.\n *\n * Chosen for the following characteristics over range [0, 1]:\n * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)\n * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)\n *\n * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);\n * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between 0 and 1 inclusive.\n *\n * @returns {float} Approximation of atan(x)\n */\nfloat czm_fastApproximateAtan(float x) {\n return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\n\n/**\n * Approximation of atan2.\n *\n * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html\n * However, we replaced their atan curve with Michael Drobot's (see above).\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between -1 and 1 inclusive.\n * @param {float} y Value between -1 and 1 inclusive.\n *\n * @returns {float} Approximation of atan2(x, y)\n */\nfloat czm_fastApproximateAtan(float x, float y) {\n // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.\n // So range-reduce using abs and by flipping whether x or y is on top.\n float t = abs(x); // t used as swap and atan result.\n float opposite = abs(y);\n float adjacent = max(t, opposite);\n opposite = min(t, opposite);\n\n t = czm_fastApproximateAtan(opposite / adjacent);\n\n // Undo range reduction\n t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\n t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\n t = czm_branchFreeTernary(y < 0.0, -t, t);\n return t;\n}\n",czm_floodAnalysis="#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nvoid czm_getFloodWaterColor(inout vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n}\n#endif\n}",czm_fog="/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nfn czm_fog(distanceToCamera : f32, color : vec3<f32>, fogColor : vec3<f32>) -> vec3<f32>\n{\n var scalar = distanceToCamera * czm_fogDensity;\n var fog = 1.0 - exp(-(scalar * scalar));\n return mix(color, fogColor, fog);\n}\n\n/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n * @param {float} fogModifierConstant A constant to modify the appearance of fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\n fn czm_fog(distanceToCamera : f32, color : vec3<f32>, fogColor : vec3<f32>, fogModifierConstant : f32) -> vec3<f32>\n{\n var scalar = distanceToCamera * czm_fogDensity;\n var fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\n return mix(color, fogColor, fog);\n}\n",czm_gammaCorrect="/**\n * Converts a color from RGB space to linear space.\n *\n * @name czm_gammaCorrect\n * @glslFunction\n *\n * @param {vec3} color The color in RGB space.\n * @returns {vec3} The color in linear space.\n */\n// vec3 czm_gammaCorrect(vec3 color) {\n// #ifdef HDR\n// color = pow(color, vec3(czm_gamma));\n// #endif\n// return color;\n// }\n\nfn czm_gammaCorrect(color : vec4<f32>) -> vec4<f32> {\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3<f32>(czm_gamma));\n#endif\n return color;\n}\n",czm_geodeticSurfaceNormal="/**\n * DOC_TBA\n *\n * @name czm_geodeticSurfaceNormal\n * @glslFunction\n *\n * @param {vec3} positionOnEllipsoid DOC_TBA\n * @param {vec3} ellipsoidCenter DOC_TBA\n * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA\n * \n * @returns {vec3} DOC_TBA.\n */\nfn czm_geodeticSurfaceNormal(positionOnEllipsoid : vec3<f32>, ellipsoidCenter : vec3<f32>, oneOverEllipsoidRadiiSquared : vec3<f32>) -> vec3<f32>\n{\n return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial="/**\n * An czm_material with default values. Every material's czm_getMaterial\n * should use this default material as a base for the material it returns.\n * The default normal value is given by materialInput.normalEC.\n *\n * @name czm_getDefaultMaterial\n * @glslFunction\n *\n * @param {czm_materialInput} input The input used to construct the default material.\n *\n * @returns {czm_material} The default material.\n *\n * @see czm_materialInput\n * @see czm_material\n * @see czm_getMaterial\n */\nczm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\n czm_material material;\n material.diffuse = vec3(0.0);\n material.specular = 0.0;\n material.shininess = 1.0;\n material.normal = materialInput.normalEC;\n material.emission = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n",czm_getEmissiveTextureColor="uniform float uMaxCategoryOrHypCeil;\nuniform float uMinCategoryOrHypFloor;\nuniform sampler2D uEmissionTexAtlas;\n#if EMISSION_TEXTURE_COUNT > 0\nuniform vec4 uEmissionTexAtlasTilingAndOffset[EMISSION_TEXTURE_COUNT];\nuniform vec4 uEmissionTexAtlasRects[EMISSION_TEXTURE_COUNT];\n#endif\nuniform float uLayerCornerLength;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 czm_getEmissiveTextureColor(float w)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n #if EMISSION_TEXTURE_COUNT > 0\n for(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n #endif\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n return texColor;\n}\nvec3 czm_getEmissiveTextureColor(float w, vec2 texCoord)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n #if EMISSION_TEXTURE_COUNT > 0\n for(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n #endif\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n return texColor;\n}",czm_getFusionModePostiion="\n#ifdef FusionMode\n uniform mat4 uModelView;\n uniform vec2 uPanOffset;\n\n czm_getFusionModePosition(vec4 vertexPos)\n {\n vec4 positionCC = czm_projection * uModelView * vertexPos;\n positionCC.x += (2.0 * uPanOffset.x * positionCC.w);\n positionCC.y += (-2.0 * uPanOffset.y * positionCC.w);\n return positionCC;\n }\n#endif\n",czm_getHorizontalColor="uniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 czm_getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}",czm_getHypsometricColor="uniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypsometricVisible;\nuniform float uHypOpacity;\nuniform float uHypContourInterval;\nuniform vec4 uHypLineColor;\nuniform float uHypContourFillMode;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypHasAnalysisRegion;\nvarying vec2 vecHypTexCoord;\nuniform float uMixColorType;\nuniform vec4 uNoValueColor;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uVolumeType;\n#endif\n\n#ifdef Volume2\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uFilterMode;\n#endif\n\nfloat computeMixCon(float fValue)\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n\t if(fValue < 0.5)\n {\n distanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n }\n else\n {\n float t = floor(fValue / uHypContourInterval);\n distanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n }\n\t}\n\telse\n\t{\n\t distanceToContour = abs(fValue - uHypMaxVisibleValue);\n\t}\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float fValue)\n{\n\t//float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat threshold = abs(uHypCeil - uHypFloor);\n\tfloat contourRate = (fValue - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tfloat count = floor(finalCoord * 16.0);\n\tfloat y = (count*2.0 + 1.0)/32.0;\n\tfloat x = fract(finalCoord*16.0);\n\tif(y > 1.0)\n\t{\n\t x = 1.0;\n\t}\n\tvec2 contourCoord = vec2(x, y);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n#ifdef Volume2\n\nvec4 czm_getContourMapColor(vec4 oriColor, vec4 volColor)\n{\n if(uFilterMode > 0.5)\n {\n vec4 finalColor = volColor * oriColor;\n\n if(uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n\n\tfloat noValue = volColor.a;\n\tfloat texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\n\n\tfloat fValue;\n\tif(noValue > 0.5)\n\t{\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n vec4 finalColor = mixColor * oriColor;\n#ifdef PT_CLOUD\n\tfinalColor = mixColor;\n#endif\n if(uMixColorType > 0.5)\n {\n finalColor = mixColor;\n }\n return finalColor;\n}\n\n#else\n\nvec4 czm_getContourMapColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n#ifdef Volume\n\tvec3 aRatioT = vecRotioCoord;\n\tif((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n\t{\n\t if(uVolumeType > 0.5)\n\t {\n\t\t\tvec4 volumeColor = czm_getVolumeValue(aRatioT);\n\t\t\tif(uMixColorType > 0.5)\n\t\t\t{\n\t\t\t\tvolumeColor = volumeColor * oriColor;\n\t\t\t}\n\t\t\treturn volumeColor;\n\t }\n\t float noValue;\n\t float texTest = czm_getVolumeValue(aRatioT, noValue);\n\t if(noValue > 0.5)\n\t {\n\t fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n\t }\n\t else\n\t {\n\t fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n\t }\n\t}\n\telse\n\t{\n\t fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n\t}\n#endif\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n vec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n\tfinalColor = mixColor;\n#endif\n#ifdef Volume\n if(uMixColorType > 0.5)\n {\n finalColor = mixColor;\n }\n#endif\n return finalColor;\n}\n\n#endif\n\n#ifdef Volume2\nvec4 czm_getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\n\tif(uHypHasAnalysisRegion > 0.1)\n {\n\t\tvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n\t\tif(hypColor.r < 0.1)\n\t\t{\n\t\t\treturn oriColor;\n\t\t}\n\t}\n return czm_getContourMapColor(oriColor, volColor);\n}\n#else\nvec4 czm_getHypsometricColor(vec4 oriColor, float wValue)\n{\n float fValue = wValue;\n\tif(uHypHasAnalysisRegion > 0.1)\n {\n\t\tvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n\t\tif(hypColor.r < 0.1)\n\t\t{\n\t\t\treturn oriColor;\n\t\t}\n\t}\n return czm_getContourMapColor(oriColor, fValue);\n}\n\nvec4 czm_getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return czm_getContourMapColor(oriColor, wValue);\n}\n\n#endif",czm_getLambertDiffuse="/**\n * Calculates the intensity of diffusely reflected light.\n *\n * @name czm_getLambertDiffuse\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n *\n * @returns {float} The intensity of the diffuse reflection.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfn czm_getLambertDiffuse(lightDirectionEC : vec3<f32>, normalEC : vec3<f32>) -> f32\n{\n return max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getPBRParamFromTexture="\n#ifdef USE_BatchPBR\n var uPBRTexture : texture_2d<f32>;\n var uPBRTextureSampler : sampler;\n varying vMetallicRoughness : vec2<f32>;\n varying vEmissiveFactor : vec4<f32>;\n varying vAlphaCutoffAndModeAndDoubleSide : vec3<f32>;\n fn czm_getPBRParamFromTexture(uv : vec2<f32>)\n {\n var x = (uv.x * 2.0f + 0.5f)/ Material.uPBRTexWH.x;\n var y = (uv.x * 2.0f + 1.5f)/ Material.uPBRTexWH.x;\n var pbrParam = textureSampleLevel(uPBRTexture, uPBRTextureSampler, vec2<f32>(x, 0.5f), 0.0f);\n vMetallicRoughness = pbrParam.rg;\n vAlphaCutoffAndModeAndDoubleSide.x = pbrParam.b;\n var temp = pbrParam.a / 65536.0f;\n vAlphaCutoffAndModeAndDoubleSide.y = floor(temp);\n vAlphaCutoffAndModeAndDoubleSide.z = (temp- vAlphaCutoffAndModeAndDoubleSide.y) * 65536.0f;\n vEmissiveFactor = textureSampleLevel(uPBRTexture, uPBRTextureSampler, vec2<f32>(y, 0.5f), 0.0f);\n }\n#endif\n",czm_getSpecular="/**\n * Calculates the specular intensity of reflected light.\n *\n * @name czm_getSpecular\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n *\n * @returns {float} The intensity of the specular highlight.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\n vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\n float specular = max(dot(toReflectedLight, toEyeEC), 0.0);\n\n // pow has undefined behavior if both parameters <= 0.\n // Prevent this by making sure shininess is at least czm_epsilon2.\n return pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getVolumeValue="\nuniform sampler2D uVolumeTexture;\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uVolumeTimeRatio;\n#endif\n\n#ifdef Volume\nuniform float uVolumeWidth;\nuniform float uVolumeHeight;\nuniform float uVolumeDepth;\nuniform float uVolumeSideBlockCount;\nuniform float uVolumeBlockLength;\nuniform float uVolumeTexLength;\nuniform float uVolumeFilterMode;\n#endif\n\nfloat czm_unpackVolume(vec3 packedDepth)\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\n#ifdef Volume\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\n float yOffset = floor((fLevel+0.25/uVolumeSideBlockCount) / uVolumeSideBlockCount);\n float xOffset = fLevel - yOffset * uVolumeSideBlockCount;\n float texCoordV = (texCoord.y * uVolumeHeight + yOffset * uVolumeBlockLength) / uVolumeTexLength;\n float texCoordU = (texCoord.x * uVolumeWidth + xOffset * uVolumeBlockLength) / uVolumeTexLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\n vec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\n vec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\n float fValue1 = clamp(czm_unpackVolume(volumeValue1.xyz),0.0,1.0);\n float fValue2 = clamp(czm_unpackVolume(volumeValue2.xyz),0.0,1.0);\n if(uVolumeFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n noValue = mix(volumeValue1.a, volumeValue2.a, ratio);\n if(volumeValue1.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(volumeValue2.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfloat czm_getVolumeValue(vec3 texCoord, out float noValue)\n{\n float fLevel = (uVolumeDepth - 1.0) * texCoord.z;\n float bottomLevel= floor(fLevel);\n float topLevel = bottomLevel + 1.0;\n float ratio = topLevel - fLevel;\n vec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n vec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n float fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n fResult = mix(fResult, fNextResult, uVolumeTimeRatio);\n#endif\n return fResult;\n}\n\nvec4 czm_getVolumeValue(vec3 texCoord)\n{\n\tfloat fLevel = (uVolumeDepth - 1.0) * texCoord.z;\n\tfloat bottomLevel= floor(fLevel);\n\tfloat topLevel = bottomLevel + 1.0;\n\tfloat ratio = topLevel - fLevel;\n\tfloat yOffset1 = floor((topLevel+0.25/uVolumeSideBlockCount) / uVolumeSideBlockCount);\n\tfloat xOffset1 = topLevel - yOffset1 * uVolumeSideBlockCount;\n\tfloat texCoordV1 = (texCoord.y * uVolumeHeight + yOffset1 * uVolumeBlockLength)/uVolumeTexLength;\n\tfloat texCoordU1 = (texCoord.x * uVolumeWidth + xOffset1 * uVolumeBlockLength)/uVolumeTexLength;\n\tvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\n\tfloat yOffset2 = floor((bottomLevel+0.25/uVolumeSideBlockCount) / uVolumeSideBlockCount);\n\tfloat xOffset2 = bottomLevel - yOffset2 * uVolumeSideBlockCount;\n\tfloat texCoordV2 = (texCoord.y * uVolumeHeight + yOffset2 * uVolumeBlockLength)/uVolumeTexLength;\n\tfloat texCoordU2 = (texCoord.x * uVolumeWidth + xOffset2 * uVolumeBlockLength)/uVolumeTexLength;\n\tvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\n\n\tif(uVolumeFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif\n",czm_getWaterNoise="/**\n * @private\n */\nvec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n\n // time dependent sampling directions\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n\n // rotate sampling direction by specified angle\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (texture2D(normalMap, uv0)) +\n (texture2D(normalMap, uv1)) +\n (texture2D(normalMap, uv2)) +\n (texture2D(normalMap, uv3));\n\n // average and scale to between -1 and 1\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_getWgs84EllipsoidEC="/**\n * Returns the WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @name czm_getWgs84EllipsoidEC\n * @glslFunction\n *\n * @returns {czm_ellipsoid} The WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @see Ellipsoid.WGS84\n *\n * @example\n * czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n */\nfn czm_getWgs84EllipsoidEC() -> czm_ellipsoid\n{\n var radii = vec3<f32>(6378137.0, 6378137.0, 6378137.0);\n var inverseRadii = vec3<f32>(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n var inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(czm_view[3].xyz, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n",czm_HSBToRGB="\nfn czm_HSBToRGB(hsb : vec3<f32>) -> vec3<f32>\n{\n var K_HSB2RGB = vec4<f32>(1.0, 0.66667, 0.33333, 3.0);\n var p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\n return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, vec3<f32>(0.0), vec3<f32>(1.0)), hsb.y);\n}\n",czm_HSLToRGB="/**\n * Converts an HSL color (hue, saturation, lightness) to RGB\n * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}\n *\n * @name czm_HSLToRGB\n * @glslFunction\n * \n * @param {vec3} rgb The color in HSL.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n\nvec3 hueToRGB(float hue)\n{\n float r = abs(hue * 6.0 - 3.0) - 1.0;\n float g = 2.0 - abs(hue * 6.0 - 2.0);\n float b = 2.0 - abs(hue * 6.0 - 4.0);\n return clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 czm_HSLToRGB(vec3 hsl)\n{\n vec3 rgb = hueToRGB(hsl.x);\n float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\n return (rgb - 0.5) * c + hsl.z;\n}\n",czm_hue="/**\n * Adjusts the hue of a color.\n * \n * @name czm_hue\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the hue of the color in radians.\n *\n * @returns {float} The color with the hue adjusted.\n *\n * @example\n * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)\n */\nfn czm_hue(rgb : vec3<f32>, adjustment : f32) -> vec3<f32>\n{\n var toYIQ = mat3x3<f32>(0.299, 0.587, 0.114,\n 0.595716, -0.274453, -0.321263,\n 0.211456, -0.522591, 0.311135);\n var toRGB = mat3x3<f32>(1.0, 0.9563, 0.6210,\n 1.0, -0.2721, -0.6474,\n 1.0, -1.107, 1.7046);\n \n var yiq = toYIQ * rgb;\n var hue = atan2(yiq.z, yiq.y) + adjustment;\n var chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\n \n var color = vec3<f32>(yiq.x, chroma * cos(hue), chroma * sin(hue));\n return toRGB * color;\n}\n",czm_inverseGamma="/**\n * Converts a color in linear space to RGB space.\n *\n * @name czm_inverseGamma\n * @glslFunction\n *\n * @param {vec3} color The color in linear space.\n * @returns {vec3} The color in RGB space.\n */\nvec3 czm_inverseGamma(vec3 color) {\n return pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_inverseMatrix="mat3 czm_inverseMatrix(mat3 m)\n{\n float Determinant =\n m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\n - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\n + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\n\n mat3 Inverse;\n Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);\n Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);\n Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);\n Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);\n Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);\n Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);\n Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\n Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);\n Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);\n Inverse /= Determinant;\n\n return Inverse;\n}\n\nmat4 czm_inverseMatrix(mat4 m)\n{\n float Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\n float Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\n float Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\n\n float Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\n float Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\n float Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\n\n float Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\n float Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\n float Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\n\n float Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\n float Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\n float Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\n\n float Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\n float Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\n float Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\n\n float Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\n float Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\n float Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\n\n const vec4 SignA = vec4( 1.0, -1.0, 1.0, -1.0);\n const vec4 SignB = vec4(-1.0, 1.0, -1.0, 1.0);\n\n vec4 Fac0 = vec4(Coef00, Coef00, Coef02, Coef03);\n vec4 Fac1 = vec4(Coef04, Coef04, Coef06, Coef07);\n vec4 Fac2 = vec4(Coef08, Coef08, Coef10, Coef11);\n vec4 Fac3 = vec4(Coef12, Coef12, Coef14, Coef15);\n vec4 Fac4 = vec4(Coef16, Coef16, Coef18, Coef19);\n vec4 Fac5 = vec4(Coef20, Coef20, Coef22, Coef23);\n\n vec4 Vec0 = vec4(m[1][0], m[0][0], m[0][0], m[0][0]);\n vec4 Vec1 = vec4(m[1][1], m[0][1], m[0][1], m[0][1]);\n vec4 Vec2 = vec4(m[1][2], m[0][2], m[0][2], m[0][2]);\n vec4 Vec3 = vec4(m[1][3], m[0][3], m[0][3], m[0][3]);\n\n vec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);\n vec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);\n vec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);\n vec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);\n\n mat4 Inverse = mat4(Inv0, Inv1, Inv2, Inv3);\n\n vec4 Row0 = vec4(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);\n\n float Determinant = dot(m[0], Row0);\n\n Inverse /= Determinant;\n\n return Inverse;\n}\n",czm_isEmpty="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isEmpty\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isEmpty(czm_raySegment interval)\n{\n return (interval.stop < 0.0);\n}\n",czm_isFull="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isFull\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isFull(czm_raySegment interval)\n{\n return (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction="/**\n * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.\n *\n * @name czm_latitudeToWebMercatorFraction\n * @glslFunction\n *\n * @param {float} latitude The geodetic latitude, in radians.\n * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.\n * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.\n *\n * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern\n * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return\n * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.\n */ \nfn czm_latitudeToWebMercatorFraction(latitude : f32, southMercatorY : f32, oneOverMercatorHeight : f32) -> f32\n{\n var sinLatitude = sin(latitude);\n var mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\n \n return (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_LineCallOutVp="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute float aColor;\nuniform float uLineWidth;\nvarying float vColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nvoid main()\n{\n bool bUsePre = aTexCoord0.x < 0.1;\n float offset = bUsePre ? -uLineWidth : uLineWidth;\n vec4 viewPos1 = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tviewPos1.x = viewPos1.x + offset * computerOnePixelLength();\n\tgl_Position = czm_projection * viewPos1;\n\tvColor = aColor;\n}\n\n\n\n",czm_lineDistance="/**\n * Computes distance from an point in 2D to a line in 2D.\n *\n * @name czm_lineDistance\n * @glslFunction\n *\n * param {vec2} point1 A point along the line.\n * param {vec2} point2 A point along the line.\n * param {vec2} point A point that may or may not be on the line.\n * returns {float} The distance from the point to the line.\n */\nfloat czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\n return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_luminance="/**\n * Computes the luminance of a color. \n *\n * @name czm_luminance\n * @glslFunction\n *\n * @param {vec3} rgb The color.\n * \n * @returns {float} The luminance.\n *\n * @example\n * float light = czm_luminance(vec3(0.0)); // 0.0\n * float dark = czm_luminance(vec3(1.0)); // ~1.0 \n */\nfloat czm_luminance(vec3 rgb)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n return dot(rgb, W);\n}\n",czm_metersPerPixel="/**\n * Computes the size of a pixel in meters at a distance from the eye.\n * <p>\n * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.\n * </p>\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n * @param {float} pixelRatio The scaling factor from pixel space to coordinate space\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfn czm_metersPerPixel(positionEC : vec4<f32>, pixelRatio : f32) -> f32\n{\n var width = czm_viewport.z;\n var height = czm_viewport.w;\n var pixelWidth;\n var pixelHeight;\n\n var top = czm_frustumPlanes.x;\n var bottom = czm_frustumPlanes.y;\n var left = czm_frustumPlanes.z;\n var right = czm_frustumPlanes.w;\n\n if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n {\n var frustumWidth = right - left;\n var frustumHeight = top - bottom;\n pixelWidth = frustumWidth / width;\n pixelHeight = frustumHeight / height;\n }\n else\n {\n var distanceToPixel = -positionEC.z;\n var inverseNear = 1.0 / czm_currentFrustum.x;\n var tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n }\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}\n\n/**\n * Computes the size of a pixel in meters at a distance from the eye.\n * <p>\n * Use this version when scaling by pixel ratio.\n * </p>\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfn czm_metersPerPixel(positionEC : vec4<f32>) -> f32\n{\n return czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates="/**\n * Transforms a position from model to window coordinates. The transformation\n * from model to clip coordinates is done using {@link czm_modelViewProjection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of <code>near = 0</code> and <code>far = 1</code>.\n * <br /><br />\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n * <br /><br />\n * This function should not be confused with {@link czm_viewportOrthographic},\n * which is an orthographic projection matrix that transforms from window \n * coordinates to clip coordinates.\n *\n * @name czm_modelToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in model coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_eyeToWindowCoordinates\n * @see czm_modelViewProjection\n * @see czm_viewportTransformation\n * @see czm_viewportOrthographic\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);\n */\nfn czm_modelToWindowCoordinates(vec4 position) -> vec4<f32>\n{\n var q = uniforms.czm_modelViewProjection * position; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (uniforms.czm_viewportTransformation * vec4<f32>(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n",czm_multiplyWithColorBalance="/**\n * DOC_TBA\n *\n * @name czm_multiplyWithColorBalance\n * @glslFunction\n */\nvec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n \n vec3 target = left * right;\n float leftLuminance = dot(left, W);\n float rightLuminance = dot(right, W);\n float targetLuminance = dot(target, W);\n \n return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar="/**\n * Computes a value that scales with distance. The scaling is clamped at the near and\n * far distances, and does not extrapolate. This function works with the\n * {@link NearFarScalar} JavaScript class.\n *\n * @name czm_nearFarScalar\n * @glslFunction\n *\n * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).\n * @param {float} cameraDistSq The square of the current distance from the camera.\n *\n * @returns {float} The value at this distance.\n */\nfloat czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\n float valueAtMin = nearFarScalar.y;\n float valueAtMax = nearFarScalar.w;\n float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\n float farDistanceSq = nearFarScalar.z * nearFarScalar.z;\n\n float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\n\n t = pow(clamp(t, 0.0, 1.0), 0.2);\n\n return mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode="\n\nfn signNotZero_v2(value : vec2<f32>) -> vec2<f32>\n{\n return vec2<f32>(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\n\nfn czm_octDecode(inEncoded : vec2<f32>, range : f32) -> vec3<f32>\n{\n if (inEncoded.x == 0.0 && inEncoded.y == 0.0) {\n return vec3<f32>(0.0, 0.0, 0.0);\n }\n var encoded = inEncoded / range * 2.0 - 1.0;\n var v = vec3<f32>(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\n if (v.z < 0.0)\n {\n var temp = (vec2(1.0) - abs(v.yx)) * signNotZero_v2(v.xy);\n v.x = temp.x;\n v.y = temp.y;\n }\n\n return normalize(v);\n}\n// wgsl不支持重载\n// fn czm_octDecode(encoded : f32) -> vec3<f32>\n// {\n// var temp = encoded / 256.0;\n// var x = floor(temp);\n// var y = (temp - x) * 256.0;\n// return czm_octDecode(vec2<f32>(x, y));\n// }\n\n// fn czm_octDecode(encoded : vec2<f32>, vector1 : ptr<function, vec3<f32>>, vector2 : ptr<function, vec3<f32>>, vector3 : ptr<function, vec3<f32>>)\n// {\n// var temp = encoded.x / 65536.0;\n// var x = floor(temp);\n// var encodedFloat1 = (temp - x) * 65536.0;\n\n// temp = encoded.y / 65536.0;\n// var y = floor(temp);\n// var encodedFloat2 = (temp - y) * 65536.0;\n\n// vector1 = czm_octDecode(encodedFloat1);\n// vector2 = czm_octDecode(encodedFloat2);\n// vector3 = czm_octDecode(vec2<f32>(x, y));\n// }\n",czm_packDepth="\nfn czm_packDepth(depth : f32) -> vec4<f32>\n{\n var enc = vec4<f32>(1.0, 255.0, 65025.0, 16581375.0) * depth;\n enc = fract(enc);\n enc -= enc.yzww * vec4<f32>(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n return enc;\n}\n",czm_packValue="/**\n * Packs a float value into a vec3 that can be represented by unsigned bytes.\n *\n * @name czm_packValue\n * @glslFunction\n *\n * @param {float} value The floating-point value.\n * @returns {vec3} The packed value.\n */\nvec4 czm_packValue(float value)\n{\n float SHIFT_LEFT8 = 256.0;\n\tfloat SHIFT_RIGHT8 = 1.0 / 256.0;\n\tvec4 result;\n\tresult.a = 255.0;\n\tfloat fPos = abs(value + 9000.0) * SHIFT_RIGHT8;\n\tresult.b = (fPos - floor(fPos)) * SHIFT_LEFT8;\n\tfPos = floor(fPos) * SHIFT_RIGHT8;\n\tresult.g = (fPos - floor(fPos)) * SHIFT_LEFT8;\n\tresult.r = floor(fPos);\n\tresult /= 255.0;\n\treturn result;\n}\n",czm_phong="float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\n return czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\n\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\n return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\n\n/**\n * Computes a color using the Phong lighting model.\n *\n * @name czm_phong\n * @glslFunction\n *\n * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.\n * @param {czm_material} material The fragment's material.\n *\n * @returns {vec4} The computed color.\n *\n * @example\n * vec3 positionToEyeEC = // ...\n * czm_material material = // ...\n * vec3 lightDirectionEC = // ...\n * gl_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);\n *\n * @see czm_getMaterial\n */\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down)\n float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n }\n\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n vec3 ambient = vec3(0.0);\n vec3 color = ambient + material.emission;\n color += material.diffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_planeDistance="/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec4 plane, vec3 point) {\n return (dot(plane.xyz, point) + plane.w);\n}\n\n/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js\n * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\n return (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay="/**\n * Computes the point along a ray at the given time. <code>time</code> can be positive, negative, or zero.\n *\n * @name czm_pointAlongRay\n * @glslFunction\n *\n * @param {czm_ray} ray The ray to compute the point along.\n * @param {float} time The time along the ray.\n * \n * @returns {vec3} The point along the ray at the given time.\n * \n * @example\n * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction\n * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)\n */\nfn czm_pointAlongRay(ray : czm_ray, time : f32) -> vec3<f32>\n{\n return ray.origin + (time * ray.direction);\n}\n",czm_rainMaterial="#ifdef HAS_WETNESS\nuniform float uWetnessFactor;\n#endif\n#ifdef HAS_RAIN\nuniform float uAnimationSpeed;\nuniform sampler2D uRippleTexture;\nuniform float uRippleScale;\nuniform float uWindIntensity;\nuniform float uRain;\nuniform float uCameraDepth;\nvoid getTimeInfo(float animationSpeed, out vec2 timeVec)\n{\n float time = czm_frameNumber * animationSpeed;\n time = floor(30.0 * time);\n float time_diff = floor(time*0.25);\n time = mod(time, 4.0);\n time_diff = mod(time_diff, 4.0);\n timeVec = vec2(time, time_diff);\n}\nvoid getPosInfo(vec4 posMC, out vec2 posMC_frac1, out vec2 posMC_frac2)\n{\n float ripple_scale = 1.0 / uRippleScale;\n vec2 posXY = posMC.xy * ripple_scale;\n posMC_frac1 = fract(posXY);\n vec2 posStep = vec2(0.5);\n posMC_frac2 = fract(posXY + posStep);\n}\nfloat getAlpha(vec2 posMC_frac1)\n{\n vec2 dist = (posMC_frac1 - vec2(0.5)) * 2.0;\n dist = vec2(abs(dist.x), abs(dist.y));\n vec2 result = pow(dist, vec2(5.0));\n return result.x + result.y;\n}\nvec4 getRippleValue(vec2 timeVec, vec2 posMC_frac1, vec2 posMC_frac2, float alpha)\n{\n vec2 rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n vec2 rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n vec4 rippleValue_1 = texture2D(uRippleTexture, rippleUV_1.xy);\n vec4 rippleValue_2 = texture2D(uRippleTexture, rippleUV_2.xy);\n return mix(rippleValue_1, rippleValue_2, alpha);\n}\nvec3 getRippleNormal(vec4 rippleValue, float wind_intensity, float rain, float depthFade)\n{\n vec2 rippleValueXY = rippleValue.xy;\n vec2 rippleValueZW = rippleValue.zw;\n const vec2 _value = vec2(0.5);\n vec2 part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n vec2 part_2 = (rippleValueXY - _value) * 0.6;\n vec2 mergedValue = mix(part_1, part_2, rain) * depthFade;\n return vec3(mergedValue, 1.0);\n}\nfloat getNormalAlpha(vec3 normalWS, float wetness)\n{\n float valueZ = normalWS.z - 0.5;\n float wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n return pow(wet_correction, 15.0);\n}\nvec3 rippleNormalCorrection(vec3 rippleNormal, float normalAlpha)\n{\n const vec3 blueNormal = vec3(0.0, 0.0, 1.0);\n return mix(blueNormal, rippleNormal, normalAlpha);\n}\nvec3 rippleGenerator(float animationSpeed, vec3 normalWS, float wetness)\n{\n vec2 timeVec = vec2(1.0);\n getTimeInfo(animationSpeed, timeVec);\n vec2 posMC_frac1 = vec2(1.0);\n vec2 posMC_frac2 = vec2(1.0);\n getPosInfo(vPositionMC, posMC_frac1, posMC_frac2);\n float alpha = getAlpha(posMC_frac1);\n vec4 rippleValue = getRippleValue(timeVec, posMC_frac1, posMC_frac2, alpha);\n vec3 rippleNormal = getRippleNormal(rippleValue, uWindIntensity, uRain, uCameraDepth);\n float normalAlpha = getNormalAlpha(normalWS, wetness);\n return normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\nvoid czm_getRainMaterialParam(inout vec3 normalEC, inout vec3 baseColor, inout float roughness){\n vec3 normalWS_wetness = vec3(0.0, 0.0, 1.0);\n#ifdef HAS_WETNESS\n mat3 fixedToENU_wetness = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n normalWS_wetness = normalize(fixedToENU_wetness * normalEC);\n#endif\n normalEC = rippleGenerator(uAnimationSpeed, normalWS_wetness, uWetnessFactor);\n#ifdef HAS_WETNESS\n float fWetness = clamp(uWetnessFactor,0.0,1.0);\n float fWetness_correction = pow(4.0 * fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction, clamp(fWetness,0.0,0.9),1.0);\n float fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n baseColor = mix(baseColor,baseColor * 0.7, fWerness_normalized);\n roughness = mix(roughness, 0.05, fWerness_normalized);\n#endif\n}\n#endif\n",czm_rasterCull="\n#ifdef RASTER_CULL\nvarying vec2 vRasterTexCoord;\nuniform float uDepth;\nuniform sampler2D uRasterTexture;\n\nvoid czm_rasterCull()\n{\n float colorByDepth = texture2D(uRasterTexture, vRasterTexCoord.xy).g;\n\tif((colorByDepth * 255.0 - uDepth) > 0.5)\n\t{\n \t\tdiscard;\n\t}\n}\n#endif\n",czm_rayEllipsoidIntersectionInterval="/**\n * DOC_TBA\n *\n * @name czm_rayEllipsoidIntersectionInterval\n * @glslFunction\n */\nfn czm_rayEllipsoidIntersectionInterval(ray : czm_ray, ellipsoid_center : vec3<f32>, ellipsoid_inverseRadii : vec3<f32>) -> czm_raySegment\n{\n // ray and ellipsoid center in eye coordinates. radii in model coordinates.\n var q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4<f32>(ray.origin, 1.0)).xyz;\n var w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4<f32>(ray.direction, 0.0)).xyz;\n\n q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4<f32>(ellipsoid_center, 1.0)).xyz;\n\n var q2 = dot(q, q);\n var qw = dot(q, w);\n\n if (q2 > 1.0) // Outside ellipsoid.\n {\n if (qw >= 0.0) // Looking outward or tangent (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else // qw < 0.0.\n {\n var qw2 = qw * qw;\n var difference = q2 - 1.0; // Positively valued.\n var w2 = dot(w, w);\n var product = w2 * difference;\n\n if (qw2 < product) // Imaginary roots (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else if (qw2 > product) // Distinct roots (2 intersections).\n {\n var discriminant = qw * qw - product;\n var temp = -qw + sqrt(discriminant); // Avoid cancellation.\n var root0 = temp / w2;\n var root1 = difference / temp;\n if (root0 < root1)\n {\n czm_raySegment i = czm_raySegment(root0, root1);\n return i;\n }\n else\n {\n czm_raySegment i = czm_raySegment(root1, root0);\n return i;\n }\n }\n else // qw2 == product. Repeated roots (2 intersections).\n {\n var root = sqrt(difference / w2);\n czm_raySegment i = czm_raySegment(root, root);\n return i;\n }\n }\n }\n else if (q2 < 1.0) // Inside ellipsoid (2 intersections).\n {\n var difference = q2 - 1.0; // Negatively valued.\n var w2 = dot(w, w);\n var product = w2 * difference; // Negatively valued.\n var discriminant = qw * qw - product;\n var temp = -qw + sqrt(discriminant); // Positively valued.\n czm_raySegment i = czm_raySegment(0.0, temp / w2);\n return i;\n }\n else // q2 == 1.0. On ellipsoid.\n {\n if (qw < 0.0) // Looking inward.\n {\n var w2 = dot(w, w);\n czm_raySegment i = czm_raySegment(0.0, -qw / w2);\n return i;\n }\n else // qw >= 0.0. Looking outward or tangent.\n {\n return czm_emptyRaySegment;\n }\n }\n}\n",czm_readDepth="float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\n return czm_reverseLogDepth(texture2D(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective="/**\n * Reads a value previously transformed with {@link czm_writeNonPerspective}\n * by dividing it by `w`, the value used in the perspective divide.\n * This function is intended to be called in a fragment shader to access a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The value should have been\n * previously written in the vertex shader with a call to\n * {@link czm_writeNonPerspective}.\n *\n * @name czm_readNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.\n * @param {float} oneOverW One over the perspective divide value, `w`. Usually this is simply `gl_FragCoord.w`.\n * @returns {float|vec2|vec3|vec4} The usable value.\n */\nfloat czm_readNonPerspective(float value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\n return value * oneOverW;\n}\n",czm_reverseLogDepth="fn czm_reverseLogDepth(logZ : f32) -> f32\n{\n#ifdef LOG_DEPTH\n var near = uniforms.czm_currentFrustum.x;\n var far = uniforms.czm_currentFrustum.y;\n var log2Depth = logZ * uniforms.czm_log2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#else\n return logZ;\n#endif\n}\n",czm_RGBToHSB="\nfn czm_RGBToHSB(rgb : vec3<f32>) -> vec3<f32>\n{\n var K_RGB2HSB = vec4<f32>(0.0, -0.33333, 0.66667, -1.0);\n var p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\n var q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\n var d = q.x - min(q.w, q.y);\n return vec3<f32>(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL="\nfn RGBtoHCV(rgb : vec3<f32>) -> vec3<f32>\n{\n // Based on work by Sam Hocevar and Emil Persson\n var p : vec4<f32>;\n if(rgb.g < rgb.b){\n p = vec4<f32>(rgb.bg, -1.0, 2.0 / 3.0);\n }\n else{\n p = vec4<f32>(rgb.gb, 0.0, -1.0 / 3.0);\n }\n var q : vec4<f32>;\n if(rgb.r < p.x){\n p = vec4(p.xyw, rgb.r);\n }\n else{\n p = vec4(rgb.r, p.yzx);\n }\n var c = q.x - min(q.w, q.y);\n var h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\n return vec3(h, c, q.x);\n}\n\nfn czm_RGBToHSL(rgb : vec3<f32>) -> vec3<f32>\n{\n var hcv = RGBtoHCV(rgb);\n var l = hcv.z - hcv.y * 0.5;\n var s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\n return vec3<f32>(hcv.x, s, l);\n}\n",czm_RGBToXYZ="\nfn czm_RGBToXYZ(rgb : vec3<f32>) -> vec3<f32>\n{\n const RGB2XYZ = mat3x3<f32>(0.4124, 0.2126, 0.0193,\n 0.3576, 0.7152, 0.1192,\n 0.1805, 0.0722, 0.9505);\n var xyz = RGB2XYZ * rgb;\n var Yxy;\n Yxy.r = xyz.g;\n var temp = dot(vec3<f32>(1.0), xyz);\n Yxy.gb = xyz.rg / temp;\n return Yxy;\n}\n",czm_RollerShutter="void czm_RollerShutter(vec2 coord, vec4 region)\n{\n vec2 f = step(region.xw, coord);\n vec2 s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n",czm_s3mBatchOperation="\nfn czm_s3mBatchOperation(inOperationType : vec4<f32>, color : vec4<f32>, selectedColor : vec4<f32>, translation : vec3<f32>,\n vertexColor : ptr<function, vec4<f32>>, vertexPos : ptr<function, vec4<f32>>, vIsFiltByID : ptr<function, vec4<f32>>, fSelected : ptr<function, f32>)\n{\n var operationType = inOperationType;\n operationType.x += 0.001f;\n var right_2 = operationType.x * 0.5f;\n var right_4 = right_2 * 0.5f;\n var right_8 = right_4 * 0.5f;\n var right_16 = right_8 * 0.5f;\n var isSetColor = fract(right_2);\n if(isSetColor > 0.1f)\n {\n var mixA = (*vertexColor).a * color.a;\n (*vertexColor) = vec4(color.rgb, mixA);\n }\n var isPicked = fract(floor(right_2)* 0.5f);\n if(isPicked > 0.1f)\n {\n (*fSelected) = 1.0f;\n #ifdef REPLACE_SELECT_TYPE\n (*vertexColor) = selectedColor;\n #else\n (*vertexColor) *= selectedColor;\n #endif\n }\n var isHide = fract(floor(right_4)* 0.5f);\n if(isHide > 0.1f)\n {\n (*vertexColor).a = 0.0f;\n }\n var isOffset = fract(floor(right_8)* 0.5f);\n if(isOffset > 0.1f)\n {\n (*vertexPos).x += translation.x;\n (*vertexPos).y += translation.y;\n (*vertexPos).z += translation.z;\n }\n var isClip = fract(floor(right_16) * 0.5f);\n if(isClip > 0.1f)\n {\n (*vIsFiltByID).x = 1.0f;\n }\n}\n",czm_s3mBatchOperationForSilhouette="\nfn czm_s3mBatchOperationForSilhouette(inOperationType : vec4<f32>, color : vec4<f32>, vertexColor : ptr<function, vec4<f32>>, vertexPos : ptr<function, vec4<f32>>, vIsFiltByID : ptr<function, vec4<f32>>, translation : vec3<f32>, fSelected : ptr<function, f32>)\n{\n var operationType = inOperationType;\n operationType.x += 0.001;\n var right_2 = operationType.x * 0.5f;\n var right_4 = right_2 * 0.5f;\n var right_8 = right_4 * 0.5f;\n var right_16 = right_8 * 0.5f;\n var isSetColor = fract(right_2);\n if(isSetColor > 0.1f)\n {\n (*vertexColor) *= color;\n }\n var isPicked = fract(floor(right_2)* 0.5f);\n if(isPicked > 0.1f)\n {\n (*fSelected) = 1.0f;\n }\n var isHide = fract(floor(right_4)* 0.5f);\n if(isHide > 0.1f)\n {\n (*vertexColor).a = 0.0f;\n }\n var isOffset = fract(floor(right_8)* 0.5f);\n if(isOffset > 0.1f)\n {\n (*vertexPos).x += translation.x;\n (*vertexPos).y += translation.y;\n (*vertexPos).z += translation.z;\n }\n var isClip = fract(floor(right_16) * 0.5f);\n if(isClip > 0.1f)\n {\n (*vIsFiltByID).x = 1.0f;\n }\n}\n",czm_s3mComputeVaryings="\n#ifdef IMAGERY\n attribute img : vec2<f32>;\n varying imgCoord : vec2<f32>;\n#endif\n\n#ifdef RASTER_CULL\nvarying vRasterTexCoord : vec2<f32>;\nuniform uRasterRactc : vec4<f32>;\n#endif\n\n#ifdef Volume\n attribute aRatio : vec3<f32>;\n varying vecRotioCoord : vec3<f32>;\n#endif\n\n#ifdef QUAD_OUTLINE\n varying vDistanceFromEye : f32;\n#endif\n\n#ifdef HYPSOMETRIC\n varying vecHypTexCoord : vec2<f32>;\n#endif\n\n#ifdef EXCAVATION\n varying vExcavationVertexPos : vec4<f32>;\n#endif\n\n#ifdef SQRESULT\n uniform uSQViewProj : mat4x4<f32>;\n varying vSQ_clip_pos : vec4<f32>;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n uniform uFloodMatrixInvert : mat4x4<f32>;\n varying vFloodPos : vec4<f32>;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n varying vLayerTexCoord : vec2<f32>;\n varying vModIndexAndTexIndex : vec2<f32>;\n#endif\n\n\nfn czm_s3mComputeVaryings(vertexPos : vec4<f32>)\n{\n#ifdef RASTER_CULL\n var rasterPos : vec2<f32> = (Mesh.uGeoMatrix * aPosition).xy;\n vRasterTexCoord.x = (rasterPos.x - uRasterRact.x)/(uRasterRact.z - uRasterRact.x);\n vRasterTexCoord.y = (rasterPos.y - uRasterRact.y)/(uRasterRact.w - uRasterRact.y);\n#endif\n\n#ifdef Volume\n vecRotioCoord = aRatio;\n#endif\n\n#ifdef EXCAVATION\n vExcavationVertexPos = Mesh.uGeoMatrix * vertexPos;\n#endif\n\n#ifdef HYPSOMETRIC\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var ptInRect = 1.0;\n vecHypTexCoord = calculatePolyTexCoord(Mesh.uGeoMatrix * vec4(vertexPos.xyz, 1.0), Layer.uHypRect, &ptInRect);\n }\n#endif\n\n#ifdef SQRESULT\n vSQ_clip_pos = uniforms.uSQViewProj * vec4<f32>(vertexPos.xyz, 1.0);\n#endif\n\n#ifdef IMAGERY\n imgCoord = img;\n#endif\n\n#ifdef QUAD_OUTLINE\n vDistanceFromEye = gl_Position.z;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n const right_8 : f32 = 65280.0;\n const right_16 : f32 = 16711680.0;\n var pickId = vSecondColor.r * 255.0 + vSecondColor.g * right_8 + vSecondColor.b * right_16;\n vModIndexAndTexIndex.x = (pickId - 10.0 * floor(pickId / 10.0)) * 0.1;\n vModIndexAndTexIndex.y = pickId - Layer.uEmissionTexAtlasCount * floor(pickId / Layer.uEmissionTexAtlasCount);\n var realVertexPos = Mesh.uGeoMatrix * vertexPos;\n vLayerTexCoord = (realVertexPos.xy - Layer.uLayerBounds.xy) / Layer.uLayerBounds.zw;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n vFloodPos = uniforms.uFloodMatrixInvert * vec4<f32>(vertexPos.xyz, 1.0);\n#endif\n}\n",czm_s3mImageryColor="\n#ifdef IMAGERY\nvarying vec2 imgCoord;\nuniform sampler2D uImgTexture;\nuniform float uImgTextureAlpha;\nuniform vec2 uImgTextureBound;\n\n//#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\nuniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n//#endif\n\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\n\n\nvoid czm_getImageryColor(inout vec4 color)\n{\n\tvec2 texcood = vec2(imgCoord.x / uImgTextureBound.x, imgCoord.y / uImgTextureBound.y);\n#ifdef MULTIBATCH\n\tcolor = computeDayColor(vec4(1.0,1.0,1.0,0.0), clamp(vec3(texcood,0.0), 0.0, 1.0));\n#else\n\tcolor = computeDayColor(color, clamp(vec3(texcood,0.0), 0.0, 1.0));\n#endif\n}\n#endif\n",czm_s3mOverlay="\n#ifdef OVERLAY\n uniform sampler2D uOverlayTexture;\n varying vec2 vecOverlayTexCoord;\n varying float hasOverlay;\n\tvoid czm_getOverlayColor(inout vec4 color)\n\t{\n\t\tif(hasOverlay > 0.5)\n\t\t{\n\t\t\tvec4 overlayColor = texture2D(uOverlayTexture, vecOverlayTexCoord.xy);\n\t\t\tif(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n\t\t\t{\n\t\t\t\tvec4 mixColor = mix(color, overlayColor, overlayColor.a);\n\t\t\t\tcolor = vec4(mixColor.r, mixColor.g, mixColor.b, color.a);\n\t\t\t}\n\t\t}\n\t}\n#endif\n",czm_S3MPBR=" uniform float u_metallicFactor;\n uniform float u_roughnessFactor;\n uniform vec4 u_emissiveFactor;\n uniform vec4 u_baseColorFactor;\n uniform float u_alphaCutoff;\n uniform sampler2D u_baseColorTexture;\n uniform sampler2D u_metallicRoughnessTexture;\n uniform sampler2D u_normalTexture;\n uniform sampler2D u_occlusionTexture;\n uniform sampler2D u_emissiveTexture;\n uniform vec4 u_baseColorUVOffsetAndTiling;\n uniform vec4 u_emissiveUVOffsetAndTiling;\n\n uniform float uSunLightON;\n #if DIR_LIGHTS > 0\n uniform vec3 uDirectionalLightDirectionEC[ DIR_LIGHTS ];\n uniform vec3 uDirectionalLightColor[ DIR_LIGHTS ];\n #endif\n #if POINT_LIGHTS > 0\n uniform vec3 uPointLightPositionEC[ POINT_LIGHTS ];\n uniform vec3 uPointLightColor[ POINT_LIGHTS ];\n uniform vec2 uPointLightDistanceAndDecay[ POINT_LIGHTS ];\n #endif\n #if SPOT_LIGHTS > 0\n uniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDirectionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDistanceDecayCos[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightExponent[ SPOT_LIGHTS ];\n #endif\n\n const float M_PI = 3.141592653589793;\n\n vec3 lambertianDiffuse(vec3 diffuseColor)\n {\n return diffuseColor / M_PI;\n }\n\n vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n {\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n }\n\n vec3 fresnelSchlick(float metalness, float VdotH)\n {\n return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n }\n\n vec3 F_Schlick(float ndv, vec3 spec)\n {\n return spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n }\n\n float D_Phong(float g, float ndh)\n {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n }\n\n float smithVisibilityG1(float NdotV, float roughness)\n {\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n }\n\n float smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n {\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n }\n\n float GGX(float roughness, float NdotH)\n {\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n }\n\n void getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm)\n {\n vec3 h = normalize(viewDir + lightDir);\n float NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\n float NdotH = clamp(dot(normal, h), 0.0, 1.0);\n vec3 li = lightColor * NdotL;\n diffuseTerm = li;\n specularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n }\n\n vec3 SRGBtoLINEAR3(vec3 srgbIn)\n {\n return pow(srgbIn, vec3(2.2));\n }\n\n vec4 SRGBtoLINEAR4(vec4 srgbIn)\n {\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n }\n\n vec3 LINEARtoSRGB(vec3 linearIn)\n {\n#ifndef HDR\n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n }\n\n float calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent)\n {\n return pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n }\n\n vec4 czm_S3MPBR(vec3 normalEC, vec3 positionEC, vec2 texCoord, vec4 vertexColor)\n {\n vec3 ng = normalize(normalEC);\n vec3 positionWC = (czm_inverseView * vec4(positionEC, 1.0)).xyz;\n#ifdef HAS_NORMAL_TEXTURE\n vec3 pos_dx = dFdx(positionEC);\n vec3 pos_dy = dFdy(positionEC);\n vec3 tex_dx = dFdx(vec3(texCoord, 0.0));\n vec3 tex_dy = dFdy(vec3(texCoord, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(u_normalTexture, texCoord).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n\n vec3 v = -normalize(positionEC);\n#ifdef DOUBLE_SIDED\n if (dot(n, v) < 0.0) {\n n = -n;\n }\n#endif\n\n // Add base color to fragment shader\n#ifdef HAS_BASECOLOR_TEXTURE\n vec2 baseColorTexCoord = texCoord;\n baseColorTexCoord = baseColorTexCoord * u_baseColorUVOffsetAndTiling.zw + u_baseColorUVOffsetAndTiling.xy;\n vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, baseColorTexCoord));\n baseColorWithAlpha *= u_baseColorFactor;\n#else\n vec4 baseColorWithAlpha = u_baseColorFactor;\n#endif\n baseColorWithAlpha *= vertexColor;\n vec3 baseColor = baseColorWithAlpha.rgb;\n#ifdef HAS_METALLICROUGHNESS_TEXTURE\n vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, texCoord).rgb;\n float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n metalness *= u_metallicFactor;\n roughness *= u_roughnessFactor;\n#else\n float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n#endif\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float NdotV = abs(dot(n, v)) + 0.001;\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n vec3 fresnelTerm = F_Schlick(NdotV, specularColor);\n vec3 color = vec3(0.0);\n // 默认加一个平行光作为太阳光\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(czm_sunDirectionEC, v, n, vec3(0.8), fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm * uSunLightON;\n specularTerm += lightSpecularTerm * uSunLightON;\n#if DIR_LIGHTS > 0 \n for (int i = 0; i < DIR_LIGHTS; i++) { \n getLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n } \n#endif \n#if POINT_LIGHTS > 0 \n for (int i = 0; i < POINT_LIGHTS; i++) {\n vec3 lVector = uPointLightPositionEC[i] - v_positionEC;\n float lightDistance = length(lVector);\n float lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\n if(lightAttenuation < 0.001) {\n continue;\n }\n vec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n }\n#endif \n#if SPOT_LIGHTS > 0 \n for (int i = 0; i < SPOT_LIGHTS; i++) {\n vec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\n float lightDistance = length(lVector);\n float lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCos[i].x, uSpotLightDistanceDecayCos[i].y);\n if(lightAttenuation < 0.001) {\n continue;\n }\n float spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\n if(spotEffect > uSpotLightDistanceDecayCos[i].z) {\n vec3 spotLightColor = uSpotLightColor[i] * lightAttenuation * spotEffect;\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n }\n }\n#endif \n color = baseColor; \n color *= max(diffuseTerm, vec3(0.0)); \n color += max(specularTerm, vec3(0.0)); \n // 计算环境光\n #ifdef USE_IBL_LIGHTING\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n // Figure out if the reflection vector hits the ellipsoid\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, 6378137.0 / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z.\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n\n vec2 iblFactor = vec2(1.0);\n float luminanceAtZenith = 0.5;\n // Luminance model from page 40 of http://silviojemma.com/public/papers/lighting/spherical-harmonic-lighting.pdf\n #ifdef USE_SUN_LUMINANCE\n // Angle between sun and zenith\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n // Angle between zenith and current pixel\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n // Angle between sun and current pixel\n float sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\n float gamma = acos(sunNdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = luminanceAtZenith * (numerator / denominator);\n#endif\n\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * iblFactor.y);\n#ifdef USE_SUN_LUMINANCE\n color += IBLColor * luminance;\n#else\n color += IBLColor;\n#endif // end of USE_SUN_LUMINANCE\n#endif // end of USE_IBL_LIGHTING\n\n#ifdef HAS_OCCLUSION_TEXTURE\n color *= texture2D(u_occlusionTexture, texCoord).r;\n#endif\n\n#ifdef HAS_EMISSIVE_TEXTURE\n vec2 emissiveTexCoord = texCoord;\n emissiveTexCoord = emissiveTexCoord * u_emissiveUVOffsetAndTiling.zw + u_emissiveUVOffsetAndTiling.xy;\n vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, emissiveTexCoord).rgb);\n emissive *= u_emissiveFactor.rgb;\n color += emissive;\n#else\n color += u_emissiveFactor.rgb;\n#endif\n color = LINEARtoSRGB(color);\n vec4 resultColor = vec4(color, 1.0);\n#ifdef MASK\n if (baseColorWithAlpha.a < u_alphaCutoff)\n {\n discard;\n }\n resultColor = vec4(color, 1.0);\n#endif\n#ifdef BLEND\n resultColor = vec4(color, baseColorWithAlpha.a);\n#endif\n return resultColor;\n }",czm_s3mVisibleDistance="#ifdef VISIBLEDISTANCEMAX\nuniform float uVisibleDistanceMax;\nvoid czm_s3mGetAlphaByDistance(vec3 positionEC, inout vec4 color)\n{\n if(length(positionEC) > uVisibleDistanceMax)\n {\n float minAlphl = min(1.0, (length(positionEC) - uVisibleDistanceMax) / 2000.0);\n color.a = 1.0 - minAlphl;\n }\n}\n#endif",czm_sampleOctahedralProjection="\nvar uSpecularEnvironmentMaps : texture_2d<f32>;\nvar uSpecularEnvironmentMapsSampler : sampler;\n\n/**\n * Samples the 4 neighboring pixels and return the weighted average.\n *\n * @private\n */\nfn czm_sampleOctahedralProjectionWithFiltering(textureSize : vec2<f32>, inDirection : vec3<f32>, lod : f32) -> vec3<f32> {\n var direction = inDirection / dot(vec3<f32>(1.0), abs(inDirection));\n var rev = abs(direction.zx) - vec2<f32>(1.0);\n var negX : f32;\n var negY : f32;\n if(direction.x < 0.0){\n negX = rev.x;\n }\n else\n {\n negX = -rev.x;\n }\n if(direction.z < 0.0) {\n negY = rev.y;\n }\n else {\n negY = -rev.y;\n }\n var neg = vec2<f32>(negX, negY);\n\n var uv : vec2<f32>;\n if(direction.y < 0.0){\n uv = neg;\n }\n else {\n uv = direction.xz;\n }\n\n var coord = 0.5 * uv + vec2<f32>(0.5);\n var pixel = 1.0 / textureSize;\n\n if (lod > 0.0)\n {\n // Each subseqeuent mip level is half the size\n var scale = 1.0 / pow(2.0, lod);\n var offset = ((textureSize.y + 1.0) / textureSize.x);\n\n coord.x = coord.x * offset;\n coord = coord * scale;\n\n coord.x = coord.x + offset + pixel.x;\n coord.y = coord.y + (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n }\n else\n {\n coord.x = coord.x * (textureSize.y / textureSize.x);\n }\n\n // Do bilinear filtering\n //#ifndef OES_texture_float_linear\n // var color1 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord + vec2<f32>(0.0, pixel.y)).rgb;\n // var color2 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord + vec2<f32>(pixel.x, 0.0)).rgb;\n // var color3 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord + pixel).rgb;\n // var color4 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord).rgb;\n\n // var texturePosition = coord * textureSize;\n\n // var fu = fract(texturePosition.x);\n // var fv = fract(texturePosition.y);\n\n // var average1 = mix(color4, color2, fu);\n // var average2 = mix(color1, color3, fu);\n\n // var color = mix(average1, average2, fv);\n // #else\n var color = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord).rgb;\n // #endif\n\n return color;\n}\n\n\n/**\n * Samples from a cube map that has been projected using an octahedral projection from the given direction.\n *\n * @name czm_sampleOctahedralProjection\n * @glslFunction\n *\n * @param {vec2} textureSize The width and height dimensions in pixels of the projected map.\n * @param {vec3} direction The normalized direction used to sample the cube map.\n * @param {float} lod The level of detail to sample.\n * @param {float} maxLod The maximum level of detail.\n * @returns {vec3} The color of the cube map at the direction.\n */\nfn czm_sampleOctahedralProjection(textureSize : vec2<f32>, direction : vec3<f32>, lod : f32, maxLod : f32) -> vec3<f32>{\n var currentLod = floor(lod);\n var nextLod = min(currentLod + 1.0, maxLod);\n\n var colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(textureSize, direction, currentLod);\n var colorNextLod = czm_sampleOctahedralProjectionWithFiltering(textureSize, direction, nextLod);\n\n return mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation="/**\n * Adjusts the saturation of a color.\n * \n * @name czm_saturation\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the saturation of the color.\n *\n * @returns {float} The color with the saturation adjusted.\n *\n * @example\n * vec3 greyScale = czm_saturation(color, 0.0);\n * vec3 doubleSaturation = czm_saturation(color, 2.0);\n */\nfn czm_saturation(rgb : vec3<f32>, adjustment : f32) -> vec3<f32>\n{\n // Algorithm from Chapter 16 of OpenGL Shading Language\n var W = vec3(0.2125, 0.7154, 0.0721);\n var intensity = vec3<f32>(dot(rgb, W));\n return mix(intensity, rgb, adjustment);\n}\n",czm_setAlphaByWWalue="\n#ifdef W_VISIBLE\n uniform sampler2D uCategorieTexture;\n uniform float uMaxCategory;\n uniform float uMinCategory;\n uniform float uCategoryWidht;\n\n czm_setAlphaByWValue(in float w, inout vec4 color)\n {\n vec2 categoryTexCoord = vec2(abs(w - uMinCategory) / uCategoryWidht + 0.5 /uCategoryWidht , 0.5);\n float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n color.a *= 1.0 - category;\n }\n#endif\n",czm_signNotZero="\nfn czm_signNotZero(value : f32) ->f32\n{\n if(value >= 0.0){\n return 1.0; \n }\n else\n {\n return -1.0;\n }\n}\n// wgsl不支持重载\n// fn czm_signNotZero_v2(value : vec2<f32>) -> vec2<f32>\n// {\n// return vec2<f32>(czm_signNotZero(value.x), czm_signNotZero(value.y));\n// }\n\n// fn czm_signNotZero_v3(value : vec3<f32>) -> vec3<f32>\n// {\n// return vec3<f32>(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n// }\n\n// fn czm_signNotZero_v4(value : vec4<f32>) -> vec4<f32>\n// {\n// return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n// }\n",czm_sketchMode="uniform sampler2D uNormalDepthTexture;\nuniform int uFillStyle;\nfloat edgeDetection(float lineWidth)\n{\n vec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\n vec2 off = lineWidth / czm_globeDepthTextureDim.xy;\n vec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\n val_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\n vec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\n val_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\n vec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\n val_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\n vec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\n val_se.xyz = (val_se.xyz * 2.0) - 1.0;\n float discontinuity = 0.0;\n float dot0 = dot(val_nw.xyz, val_se.xyz);\n float dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nvec4 czm_sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\n vec4 outputColor = inputColor;\n float discontinuity = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0, 1.0);\n if(uFillStyle == 1)\n {\n outputColor = lineColor;\n outputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\n outputColor.a *= lineColor.a;\n }\n else\n {\n vec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\n outputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n }\n return outputColor;\n}",czm_spatialQueryClip="#ifdef SQCLIP\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \nfloat computeDepth()\n{\n#ifdef LOG_DEPTH\n return log2(v_depthFromNearPlusOne) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\n return gl_FragCoord.z;\n#endif\n}\nbool isPointInSpatialQueryObject(vec2 texCoord)\n{\n bool bIn = false;\n vec4 colorInClipTexture = texture2D(uFrontColorTexture,texCoord.xy);\n if(colorInClipTexture.r > 0.99 && colorInClipTexture.g < 0.01 && colorInClipTexture.b < 0.01)\n {\n float depthNear = czm_unpackDepth(texture2D(uFrontDepthTexture, texCoord.xy)) - 0.00001;\n float depthFar = czm_unpackDepth(texture2D(uBackDepthTexture, texCoord.xy)) + 0.00001;\n float currentDepth = computeDepth();\n if(currentDepth > depthNear && currentDepth < depthFar){\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\nvoid czm_spatialQueryClip(){\n\tvec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\n if(!isPointInSpatialQueryObject(texCoord)) \n { \n discard; \n } \n}\n#endif\n}",czm_sphericalHarmonics="/**\n * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.\n * <p>\n * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].\n * </p>\n *\n * @name czm_sphericalHarmonics\n * @glslFunction\n *\n * @param {vec3} normal The normalized direction.\n * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.\n * @returns {vec3} The color at the direction.\n *\n * @see https://graphics.stanford.edu/papers/envmap/envmap.pdf\n */\nfn czm_sphericalHarmonics(normal : vec3<f32>, coefficients : array<vec3<f32>, 9>) -> vec3<f32>\n{\n const c1 = 0.429043;\n const c2 = 0.511664;\n const c3 = 0.743125;\n const c4 = 0.886227;\n const c5 = 0.247708;\n\n var L00 = coefficients[0];\n var L1_1 = coefficients[1];\n var L10 = coefficients[2];\n var L11 = coefficients[3];\n var L2_2 = coefficients[4];\n var L2_1 = coefficients[5];\n var L20 = coefficients[6];\n var L21 = coefficients[7];\n var L22 = coefficients[8];\n\n var x = normal.x;\n var y = normal.y;\n var z = normal.z;\n\n return c1 * L22 * (x * x - y * y) + c3 * L20 * z * z + c4 * L00 - c5 * L20 +\n 2.0 * c1 * (L2_2 * x * y + L21 * x * z + L2_1 * y * z) +\n 2.0 * c2 * (L11 * x + L1_1 * y + L10 * z);\n}\n",czm_splitClip="#ifdef APPLY_SPLIT\nuniform float uSplitDirection;\nuniform float uSplitPosition;\nvoid czm_splitClip(){\n if (uSplitDirection > 1.5)\n {\n if(gl_FragCoord.x > uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection > 0.5)\n {\n if(gl_FragCoord.x < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -1.5)\n {\n if(gl_FragCoord.y < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -0.5)\n {\n if(gl_FragCoord.y > uSplitPosition)\n {\n discard;\n }\n }\n}\n#endif\n}",czm_sRGBToLinear="vec3 czm_sRGBToLinear(vec3 srgbIn)\n{\nreturn pow(srgbIn, vec3(2.2));\n}\nvec4 czm_sRGBToLinear(vec4 srgbIn)\n{\nsrgbIn = srgbIn ;\nvec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\nreturn vec4(linearOut, srgbIn.a);\n}\n",czm_tangentToEyeSpaceMatrix="/**\n * Creates a matrix that transforms vectors from tangent space to eye space.\n *\n * @name czm_tangentToEyeSpaceMatrix\n * @glslFunction\n *\n * @param {vec3} normalEC The normal vector in eye coordinates.\n * @param {vec3} tangentEC The tangent vector in eye coordinates.\n * @param {vec3} bitangentEC The bitangent vector in eye coordinates.\n *\n * @returns {mat3} The matrix that transforms from tangent space to eye space.\n *\n * @example\n * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);\n * vec3 normal = tangentToEye * texture2D(normalMap, st).xyz;\n */\nmat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\n vec3 normal = normalize(normalEC);\n vec3 tangent = normalize(tangentEC);\n vec3 bitangent = normalize(bitangentEC);\n return mat3(tangent.x , tangent.y , tangent.z,\n bitangent.x, bitangent.y, bitangent.z,\n normal.x , normal.y , normal.z);\n}\n",czm_transformPlane="vec4 czm_transformPlane(vec4 clippingPlane, mat4 transform) {\n vec3 transformedDirection = normalize((transform * vec4(clippingPlane.xyz, 0.0)).xyz);\n vec3 transformedPosition = (transform * vec4(clippingPlane.xyz * -clippingPlane.w, 1.0)).xyz;\n vec4 transformedPlane;\n transformedPlane.xyz = transformedDirection;\n transformedPlane.w = -dot(transformedDirection, transformedPosition);\n return transformedPlane;\n}\n",czm_translateRelativeToEye="/**\n * Translates a position (or any <code>vec3</code>) that was encoded with {@link EncodedCartesian3},\n * and then provided to the shader as separate <code>high</code> and <code>low</code> bits to\n * be relative to the eye. As shown in the example, the position can then be transformed in eye\n * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},\n * respectively.\n * <p>\n * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as\n * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.\n * </p>\n *\n * @name czm_translateRelativeToEye\n * @glslFunction\n *\n * @param {vec3} high The position's high bits.\n * @param {vec3} low The position's low bits.\n * @returns {vec3} The position translated to be relative to the camera's position.\n *\n * @example\n * attribute vec3 positionHigh;\n * attribute vec3 positionLow;\n *\n * void main()\n * {\n * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n * }\n *\n * @see czm_modelViewRelativeToEye\n * @see czm_modelViewProjectionRelativeToEye\n * @see czm_computePosition\n * @see EncodedCartesian3\n */\nvec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\n vec3 highDifference = high - czm_encodedCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedCameraPositionMCLow;\n\n return vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong="/**\n * @private\n */\nvec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down and horizon views)\n float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\n\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n }\n\n diffuse = clamp(diffuse, 0.0, 1.0);\n\n float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_transparentColorClip="#ifdef TRANSPARENT_BACK_COLOR\nuniform vec4 uTransparentBackColor;\nuniform float uTransparentBackColorTolerance;\n\nczm_transparentColorClip(vec4 color)\n{\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - color.r);\n float gDiff = abs(uTransparentBackColor.g - color.g);\n float bDiff = abs(uTransparentBackColor.b - color.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n}\n#endif\n",czm_transpose="/**\n * Returns the transpose of the matrix. The input <code>matrix</code> can be\n * a <code>mat2</code>, <code>mat3</code>, or <code>mat4</code>.\n *\n * @name czm_transpose\n * @glslFunction\n *\n * @param {} matrix The matrix to transpose.\n *\n * @returns {} The transposed matrix.\n *\n * @example\n * // GLSL declarations\n * mat2 czm_transpose(mat2 matrix);\n * mat3 czm_transpose(mat3 matrix);\n * mat4 czm_transpose(mat4 matrix);\n *\n * // Transpose a 3x3 rotation matrix to find its inverse.\n * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(\n * positionMC, normalEC);\n * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);\n */\nmat2 czm_transpose(mat2 matrix)\n{\n return mat2(\n matrix[0][0], matrix[1][0],\n matrix[0][1], matrix[1][1]);\n}\n\nmat3 czm_transpose(mat3 matrix)\n{\n return mat3(\n matrix[0][0], matrix[1][0], matrix[2][0],\n matrix[0][1], matrix[1][1], matrix[2][1],\n matrix[0][2], matrix[1][2], matrix[2][2]);\n}\n\nmat4 czm_transpose(mat4 matrix)\n{\n return mat4(\n matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\n matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\n matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\n matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackDepth="\n fn czm_unpackDepth(packedDepth : vec4<f32>) -> f32\n {\n return dot(packedDepth, vec4<f32>(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n }\n",czm_unpackFloat="\n// #define SHIFT_RIGHT_8 0.00390625 //1.0 / 256.0\n// #define SHIFT_RIGHT_16 0.00001525878 //1.0 / 65536.0\n// #define SHIFT_RIGHT_24 5.960464477539063e-8//1.0 / 16777216.0\n// #define BIAS 38.0\n\nfn czm_unpackFloat(packedFloat : vec4<f32>) -> f32\n{\n packedFloat *= 255.0f;\n var temp = packedFloat.w / 2.0f;\n var exponent = floor(temp);\n var sign = (temp - exponent) * 2.0f;\n exponent = exponent - float(38.0f);\n sign = sign * 2.0f - 1.0f;\n sign = -sign;\n var unpacked = sign * packedFloat.x * 0.00390625f;\n unpacked += sign * packedFloat.y * 0.00001525878f;\n unpacked += sign * packedFloat.z * 5.960464477539063e-8f;\n return unpacked * pow(10.0f, exponent);\n}\n",czm_unpackValue="\n fn czm_unpackValue(packedValue : vec4<f32>) -> f32\n {\n const SHIFT_LEFT16 = 65536.0;\n\tconst SHIFT_LEFT8 = 256.0;\n\tvar value = packedValue * 255.0;\n\treturn value.r * SHIFT_LEFT16 + value.g * SHIFT_LEFT8 + value.b - 9000.0;\n }\n",czm_vertexLogDepth="\n#ifdef LOG_DEPTH\n varying v_depthFromNearPlusOne : f32;\n #ifdef SHADOW_MAP\n varying v_logPositionEC : vec3<f32>;\n #endif\n#endif\n\nfn czm_updatePositionDepth(inCoords : vec4<f32>) -> vec4<f32> {\n var coords = inCoords;\n#ifdef LOG_DEPTH\n #ifdef SHADOW_MAP\n var logPositionEC = (Scene.uInverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n #endif\n coords.z = clamp(coords.z / coords.w, -1.0f, 1.0f) * coords.w;\n#endif\n return coords;\n}\n\nfn czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0f - Scene.uCurrentFrustum.x + gl_Position.w;\n gl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\n\nfn czm_vertexLogDepth_v4f(clipCoords : vec4<f32>)\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0f - Scene.uCurrentFrustum.x + clipCoords.w;\n czm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates="/**\n * Transforms a position from window to eye coordinates.\n * The transform from window to normalized device coordinates is done using components\n * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating\n * the inverse of <code>czm_viewportTransformation</code>. The transformation from\n * normalized device coordinates to clip coordinates is done using <code>fragmentCoordinate.w</code>,\n * which is expected to be the scalar used in the perspective divide. The transformation\n * from clip to eye coordinates is done using {@link czm_inverseProjection}.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec4} fragmentCoordinate The position in window coordinates to transform.\n *\n * @returns {vec4} The transformed position in eye coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @example\n * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);\n */\nfn czm_windowToEyeCoordinates(fragmentCoordinate : vec4<f32>) -> vec4<f32>\n{\n // Reconstruct NDC coordinates\n var x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\n var y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\n var z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n var q = vec4<f32>(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= fragmentCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s\n {\n q = czm_inverseProjection * q;\n }\n else\n {\n var top = czm_frustumPlanes.x;\n var bottom = czm_frustumPlanes.y;\n var left = czm_frustumPlanes.z;\n var right = czm_frustumPlanes.w;\n\n var near = czm_currentFrustum.x;\n var far = czm_currentFrustum.y;\n\n q.x = (q.x * (right - left) + left + right) * 0.5;\n q.y = (q.y * (top - bottom) + bottom + top) * 0.5;\n q.z = (q.z * (near - far) - near - far) * 0.5;\n q.w = 1.0;\n }\n\n return q;\n}\n\n/**\n * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.\n * This function produces more accurate results for window positions with log depth than\n * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version\n * of czm_windowToEyeCoordinates.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.\n * @param {float} depthOrLogDepth A depth or log depth for the fragment.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @returns {vec4} The transformed position in eye coordinates.\n */\nfn czm_windowToEyeCoordinates(fragmentCoordinateXY : vec2<f32>, depthOrLogDepth : f32) -> vec4<f32>\n{\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#ifdef LOG_DEPTH\n var near = czm_currentFrustum.x;\n var far = czm_currentFrustum.y;\n var log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n var depthFromCamera = depthFromNear + near;\n var windowCoord = vec4<f32>(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n var eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n return eyeCoordinate;\n#else\n var windowCoord = vec4<f32>(fragmentCoordinateXY, depthOrLogDepth, 1.0);\n var eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n#endif\n return eyeCoordinate;\n}\n",czm_writeDepthClampedToFarPlane="// emulated noperspective\n#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\n/**\n * Clamps a vertex to the far plane by writing the fragments depth.\n * <p>\n * The shader must enable the GL_EXT_frag_depth extension.\n * </p>\n *\n * @name czm_writeDepthClampedToFarPlane\n * @glslFunction\n *\n * @example\n * gl_FragColor = color;\n * czm_writeDepthClampedToFarPlane();\n *\n * @see czm_depthClampFarPlane\n */\nvoid czm_writeDepthClampedToFarPlane()\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && !defined(LOG_DEPTH)\n gl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n",czm_writeLogDepth="#ifdef LOG_DEPTH\nvarying v_depthFromNearPlusOne : f32;\n\n#ifdef POLYGON_OFFSET\nuniform u_polygonOffset : vec2<f32>;\n#endif\n\n#endif\n\nfn czm_writeLogDepth(inDepth : f32)\n{\n var depth = inDepth;\n#ifdef LOG_DEPTH\n if (depth <= 0.9999999 || depth > Scene.uFarDepthFromNearPlusOne) {\n discard;\n }\n\n#ifdef POLYGON_OFFSET\n var factor = u_polygonOffset.x;\n var units = u_polygonOffset.y;\n var x = dpdx(depth);\n var y = dpdy(depth);\n var m = sqrt(x * x + y * y);\n depth += m * factor;\n\n#endif // POLYGON_OFFSET\n\n gl_FragDepth = log2(depth) * Scene.uOneOverLog2FarDepthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\n gl_FragDepth += 0.00000001 * units;\n#endif // POLYGON_OFFSET\n\n#endif // LOG_DEPTH\n}\n",czm_writeNonPerspective="/**\n * Transforms a value for non-perspective interpolation by multiplying\n * it by w, the value used in the perspective divide. This function is\n * intended to be called in a vertex shader to compute the value of a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The fragment shader\n * must call {@link czm_readNonPerspective} to retrieve the final\n * non-perspective value.\n *\n * @name czm_writeNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.\n * @param {float} w The perspective divide value. Usually this is the computed `gl_Position.w`.\n * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a `varying` and read in the\n * fragment shader with {@link czm_readNonPerspective}.\n */\nfloat czm_writeNonPerspective(float value, float w) {\n return value * w;\n}\n\nvec2 czm_writeNonPerspective(vec2 value, float w) {\n return value * w;\n}\n\nvec3 czm_writeNonPerspective(vec3 value, float w) {\n return value * w;\n}\n\nvec4 czm_writeNonPerspective(vec4 value, float w) {\n return value * w;\n}\n",czm_XYZToRGB="/**\n * Converts a CIE Yxy color to RGB.\n * <p>The conversion is described in\n * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n * </p>\n * \n * @name czm_XYZToRGB\n * @glslFunction\n * \n * @param {vec3} Yxy The color in CIE Yxy.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_XYZToRGB(vec3 Yxy)\n{\n const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n -1.5371, 1.8760, -0.2040,\n -0.4985, 0.0416, 1.0572);\n vec3 xyz;\n xyz.r = Yxy.r * Yxy.g / Yxy.b;\n xyz.g = Yxy.r;\n xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\n \n return XYZ2RGB * xyz;\n}\n",czm_getNormalMatrix="\nfn czm_getNormalMatrix(viewMatrix : mat4x4<f32>, modelMatrix : mat4x4<f32>) -> mat3x3<f32> {\n var modelView = viewMatrix * modelMatrix;\n let modelViewRow0 : vec4<f32> = modelView[0u];\n let modelViewRow1 : vec4<f32> = modelView[1u]; \n let modelViewRow2 : vec4<f32> = modelView[2u]; \n var normalMatrix = mat3x3<f32>(\n vec3<f32>(modelViewRow0.x, modelViewRow0.y, modelViewRow0.z), \n vec3<f32>(modelViewRow1.x, modelViewRow1.y, modelViewRow1.z), \n vec3<f32>(modelViewRow2.x, modelViewRow2.y, modelViewRow2.z));\n return normalMatrix;\n}",czm_sampleAndBlend="fn czm_sampleAndBlend(\ncurrentTextureColor : vec4<f32>,\npreviousColor : vec4<f32>,\ntileTextureCoordinates : vec2<f32>,\ntextureCoordinateRectangle : vec4<f32>,\ntransparentBackColor : vec4<f32>,\nimageryClipEnable : bool,\ntextureAlphaIn : f32,\ntextureBrightness : f32,\ntextureContrast : f32,\ntextureHue : f32,\ntextureSaturation : f32,\ntextureOneOverGamma : f32,\nsplit : vec2<f32>,\nswipe : vec4<f32>)\n-> vec4<f32> {\nvar alphaMultiplier : vec2<f32> = step(textureCoordinateRectangle.xy, tileTextureCoordinates);\nvar textureAlpha : f32 = textureAlphaIn * alphaMultiplier.x * alphaMultiplier.y;\nalphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.zw - tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nvar color : vec3<f32> = currentTextureColor.rgb;\nvar alpha : f32 = currentTextureColor.a;\nif(transparentBackColor.a > 0.01)\n{\nvar rDiff = abs(transparentBackColor.r - color.r);\nvar gDiff = abs(transparentBackColor.g - color.g);\nvar bDiff = abs(transparentBackColor.b - color.b);\nif(rDiff < transparentBackColor.a && gDiff < transparentBackColor.a && bDiff < transparentBackColor.a)\n{\nalpha = 0.0;\n}\n}\nif(imageryClipEnable)\n{\n#ifdef Apply_ImageryClip\nif(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n{\nalpha = 0.0;\n}\n#else\nalpha = 0.0;\n#endif\n}\n#if !defined(APPLY_GAMMA)\nvar tempColor : vec4<f32> = czm_gammaCorrect(vec4<f32>(color, alpha));\ncolor = tempColor.rgb;\nalpha = tempColor.a;\n#else\ncolor = pow(color, vec3<f32>(textureOneOverGamma));\n#endif\n#ifdef APPLY_SPLIT\nvar splitPosition : vec2<f32>= czm_imagerySplitPosition;\nif (split.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\nalpha = 0.0;\n}\nelse if (split.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\nalpha = 0.0;\n}\nif(split.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\nalpha = 0.0;\n}\nelse if(split.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_SWIPE\nif (gl_FragCoord.x < swipe.x || gl_FragCoord.y > swipe.y) {\nalpha = 0.0;\n}\nelse if (gl_FragCoord.x > swipe.z || gl_FragCoord.y < swipe.w) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_BRIGHTNESS\ncolor = mix(vec3(0.0), color, textureBrightness);\n#endif\n#ifdef APPLY_CONTRAST\ncolor = mix(vec3(0.5), color, textureContrast);\n#endif\n#ifdef APPLY_HUE\ncolor = czm_hue(color, textureHue);\n#endif\n#ifdef APPLY_SATURATION\ncolor = czm_saturation(color, textureSaturation);\n#endif\nvar sourceAlpha : f32 = alpha * textureAlpha;\nvar outAlpha : f32 = mix(previousColor.a, 1.0, sourceAlpha);\nvar outColor : vec3<f32> = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4<f32>(outColor, outAlpha);\n}\n// fn gridTextureSampleAndBlend(\n// vec4 previousColor,\n// sampler2D textureToSample,\n// vec2 tileTextureCoordinates,\n// vec4 textureCoordinateRectangle,\n// vec4 textureCoordinateTranslationAndScale)\n// -> vec4<f32> {\n// float textureAlpha = 1.0;\n// vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\n// textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n// alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\n// textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n// vec2 translation = textureCoordinateTranslationAndScale.xy;\n// vec2 scale = textureCoordinateTranslationAndScale.zw;\n// vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n// vec4 value = texture2D(textureToSample, textureCoordinates);\n// vec3 color = value.rgb;\n// float alpha = value.a;\n// float sourceAlpha = alpha * textureAlpha;\n// float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\n// vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\n// return vec4(outColor, outAlpha);\n// }\nfn computeTextureCoord(tileTextureCoordinates : vec2<f32>, textureCoordinateTranslationAndScale : vec4<f32>, textureSize : vec4<f32>, flipY : bool) ->vec2<f32>\n{\nvar translation : vec2<f32> = textureCoordinateTranslationAndScale.xy;\nvar scale : vec2<f32> = textureCoordinateTranslationAndScale.zw;\nvar textureCoordinates : vec2<f32> = tileTextureCoordinates * scale + translation;\nif(flipY)\n{\ntextureCoordinates.y = 1.0 - textureCoordinates.y;\n}\n#ifdef WEBGPU\nvar texelSize : vec2<f32> = textureSize.zw;\ntextureCoordinates = clamp(textureCoordinates, texelSize, 1.0 - texelSize);\n#endif\nreturn textureCoordinates;\n}\n",E$19={czm_degreesPerRadian:czm_degreesPerRadian,czm_depthRange:czm_depthRange,czm_ellipsoidInverseRadii:czm_ellipsoidInverseRadii,czm_ellipsoidRadii:czm_ellipsoidRadii,czm_epsilon1:czm_epsilon1,czm_epsilon2:czm_epsilon2,czm_epsilon3:czm_epsilon3,czm_epsilon4:czm_epsilon4,czm_epsilon5:czm_epsilon5,czm_epsilon6:czm_epsilon6,czm_epsilon7:czm_epsilon7,czm_infinity:czm_infinity,czm_oneOverPi:czm_oneOverPi,czm_oneOverTwoPi:czm_oneOverTwoPi,czm_passCesium3DTile:czm_passCesium3DTile,czm_passCesium3DTileClassification:czm_passCesium3DTileClassification,czm_passCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow,czm_passClassification:czm_passClassification,czm_passCompute:czm_passCompute,czm_passEnvironment:czm_passEnvironment,czm_passGlobe:czm_passGlobe,czm_passGround:czm_passGround,czm_passOpaque:czm_passOpaque,czm_passOverlay:czm_passOverlay,czm_passTerrainClassification:czm_passTerrainClassification,czm_passTranslucent:czm_passTranslucent,czm_pi:czm_pi,czm_piOverFour:czm_piOverFour,czm_piOverSix:czm_piOverSix,czm_piOverThree:czm_piOverThree,czm_piOverTwo:czm_piOverTwo,czm_radiansPerDegree:czm_radiansPerDegree,czm_sceneMode2D:czm_sceneMode2D,czm_sceneMode3D:czm_sceneMode3D,czm_sceneModeColumbusView:czm_sceneModeColumbusView,czm_sceneModeMorphing:czm_sceneModeMorphing,czm_solarRadius:czm_solarRadius,czm_threePiOver2:czm_threePiOver2,czm_twoPi:czm_twoPi,czm_webMercatorMaxLatitude:czm_webMercatorMaxLatitude,czm_depthRangeStruct:czm_depthRangeStruct,czm_ellipsoid:czm_ellipsoid,czm_material:czm_material,czm_materialInput:czm_materialInput,czm_ray:czm_ray,czm_raySegment:czm_raySegment,czm_s3mMaterialInput:czm_s3mMaterialInput,czm_shadowParameters:czm_shadowParameters,czm_acesTonemapping:czm_acesTonemapping,czm_adjustColor:czm_adjustColor,czm_alphaWeight:czm_alphaWeight,czm_antialias:czm_antialias,czm_approximateSphericalCoordinates:czm_approximateSphericalCoordinates,czm_branchFreeTernary:czm_branchFreeTernary,czm_cascadeColor:czm_cascadeColor,czm_cascadeDistance:czm_cascadeDistance,czm_cascadeMatrix:czm_cascadeMatrix,czm_cascadeWeights:czm_cascadeWeights,czm_clip:czm_clip,czm_columbusViewMorph:czm_columbusViewMorph,czm_computeNormal:czm_computeNormal,czm_computePosition:czm_computePosition,czm_cosineAndSine:czm_cosineAndSine,czm_decompressTextureCoordinates:czm_decompressTextureCoordinates,czm_depthClampFarPlane:czm_depthClampFarPlane,czm_eastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates,czm_ellipsoidContainsPoint:czm_ellipsoidContainsPoint,czm_ellipsoidNew:czm_ellipsoidNew,czm_ellipsoidWgs84TextureCoordinates:czm_ellipsoidWgs84TextureCoordinates,czm_equalsEpsilon:czm_equalsEpsilon,czm_ExcavationFS:czm_ExcavationFS,czm_ExcavationVS:czm_ExcavationVS,czm_executeExcavation:czm_executeExcavation,czm_eyeOffset:czm_eyeOffset,czm_eyeToWindowCoordinates:czm_eyeToWindowCoordinates,czm_fastApproximateAtan:czm_fastApproximateAtan,czm_floodAnalysis:czm_floodAnalysis,czm_fog:czm_fog,czm_gammaCorrect:czm_gammaCorrect,czm_geodeticSurfaceNormal:czm_geodeticSurfaceNormal,czm_getDefaultMaterial:czm_getDefaultMaterial,czm_getEmissiveTextureColor:czm_getEmissiveTextureColor,czm_getFusionModePostiion:czm_getFusionModePostiion,czm_getHorizontalColor:czm_getHorizontalColor,czm_getHypsometricColor:czm_getHypsometricColor,czm_getLambertDiffuse:czm_getLambertDiffuse,czm_getPBRParamFromTexture:czm_getPBRParamFromTexture,czm_getSpecular:czm_getSpecular,czm_getVolumeValue:czm_getVolumeValue,czm_getWaterNoise:czm_getWaterNoise,czm_getWgs84EllipsoidEC:czm_getWgs84EllipsoidEC,czm_HSBToRGB:czm_HSBToRGB,czm_HSLToRGB:czm_HSLToRGB,czm_hue:czm_hue,czm_inverseGamma:czm_inverseGamma,czm_inverseMatrix:czm_inverseMatrix,czm_isEmpty:czm_isEmpty,czm_isFull:czm_isFull,czm_latitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction,czm_LineCallOutVp:czm_LineCallOutVp,czm_lineDistance:czm_lineDistance,czm_luminance:czm_luminance,czm_metersPerPixel:czm_metersPerPixel,czm_modelToWindowCoordinates:czm_modelToWindowCoordinates,czm_multiplyWithColorBalance:czm_multiplyWithColorBalance,czm_nearFarScalar:czm_nearFarScalar,czm_octDecode:czm_octDecode,czm_packDepth:czm_packDepth,czm_packValue:czm_packValue,czm_phong:czm_phong,czm_planeDistance:czm_planeDistance,czm_pointAlongRay:czm_pointAlongRay,czm_rainMaterial:czm_rainMaterial,czm_rasterCull:czm_rasterCull,czm_rayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval,czm_readDepth:czm_readDepth,czm_readNonPerspective:czm_readNonPerspective,czm_reverseLogDepth:czm_reverseLogDepth,czm_RGBToHSB:czm_RGBToHSB,czm_RGBToHSL:czm_RGBToHSL,czm_RGBToXYZ:czm_RGBToXYZ,czm_RollerShutter:czm_RollerShutter,czm_s3mBatchOperation:czm_s3mBatchOperation,czm_s3mBatchOperationForSilhouette:czm_s3mBatchOperationForSilhouette,czm_s3mComputeVaryings:czm_s3mComputeVaryings,czm_s3mImageryColor:czm_s3mImageryColor,czm_s3mOverlay:czm_s3mOverlay,czm_S3MPBR:czm_S3MPBR,czm_s3mVisibleDistance:czm_s3mVisibleDistance,czm_sampleOctahedralProjection:czm_sampleOctahedralProjection,czm_saturation:czm_saturation,czm_setAlphaByWWalue:czm_setAlphaByWWalue,czm_signNotZero:czm_signNotZero,czm_sketchMode:czm_sketchMode,czm_spatialQueryClip:czm_spatialQueryClip,czm_sphericalHarmonics:czm_sphericalHarmonics,czm_splitClip:czm_splitClip,czm_sRGBToLinear:czm_sRGBToLinear,czm_tangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix,czm_transformPlane:czm_transformPlane,czm_translateRelativeToEye:czm_translateRelativeToEye,czm_translucentPhong:czm_translucentPhong,czm_transparentColorClip:czm_transparentColorClip,czm_transpose:czm_transpose,czm_unpackDepth:czm_unpackDepth,czm_unpackFloat:czm_unpackFloat,czm_unpackValue:czm_unpackValue,czm_vertexLogDepth:czm_vertexLogDepth,czm_windowToEyeCoordinates:czm_windowToEyeCoordinates,czm_writeDepthClampedToFarPlane:czm_writeDepthClampedToFarPlane,czm_writeLogDepth:czm_writeLogDepth,czm_writeNonPerspective:czm_writeNonPerspective,czm_XYZToRGB:czm_XYZToRGB,czm_getNormalMatrix:czm_getNormalMatrix,czm_sampleAndBlend:czm_sampleAndBlend},o$1a="\n#ifdef HAS_RAIN\nuniform sampler2D uRippleTexture;\n \nvoid getTimeInfo(float animationSpeed, out vec2 timeVec)\n{\n\tfloat time = czm_frameNumber * animationSpeed;\n\ttime = floor(30.0 * time);\n\tfloat time_diff = floor(time*0.25);\n\ttime = mod(time, 4.0);\n\ttime_diff = mod(time_diff, 4.0);\n\ttimeVec = vec2(time, time_diff);\n}\n\nvoid getPosInfo(vec4 posMC, out vec2 posMC_frac1, out vec2 posMC_frac2)\n{\n\tfloat ripple_scale = 1.0 / uRippleScale;\n\tvec2 posXY = posMC.xy * ripple_scale;\n\tposMC_frac1 = fract(posXY);\n\tvec2 posStep = vec2(0.5);\n\tposMC_frac2 = fract(posXY + posStep);\n}\n\nfloat getAlpha(vec2 posMC_frac1)\n{\n\tvec2 dist = (posMC_frac1 - vec2(0.5)) * 2.0;\n\tdist = vec2(abs(dist.x), abs(dist.y));\n\tvec2 result = pow(dist, vec2(5.0));\n\treturn result.x + result.y;\n}\n\nvec4 getRippleValue(sampler2D uRippleTexture, vec2 timeVec, vec2 posMC_frac1, vec2 posMC_frac2, float alpha)\n{\n\tvec2 rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n\tvec2 rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n\tvec4 rippleValue_1 = texture2D(uRippleTexture, rippleUV_1.xy);\n\tvec4 rippleValue_2 = texture2D(uRippleTexture, rippleUV_2.xy);\n\treturn mix(rippleValue_1, rippleValue_2, alpha);\n}\n\nvec3 getRippleNormal(vec4 rippleValue, float wind_intensity, float rain, float depthFade)\n{\n\tvec2 rippleValueXY = rippleValue.xy;\n\tvec2 rippleValueZW = rippleValue.zw;\n\tconst vec2 _value = vec2(0.5);\n\tvec2 part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n\tvec2 part_2 = (rippleValueXY - _value) * 0.6;\n\tvec2 mergedValue = mix(part_1, part_2, rain) * depthFade;\n\treturn vec3(mergedValue, 1.0);\n}\n\nfloat getNormalAlpha(vec3 normalWS,float wetness)\n{\n\tfloat valueZ = normalWS.z - 0.5;\n\tfloat wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n\treturn pow(wet_correction, 15.0);\n}\n\nvec3 rippleNormalCorrection(vec3 rippleNormal,float normalAlpha)\n{\n\tconst vec3 blueNormal = vec3(0.0, 0.0, 1.0);\n\treturn mix(blueNormal, rippleNormal, normalAlpha);\n}\n\nvec3 rippleGenerator(sampler2D uRippleTexture, float animationSpeed,vec3 normalWS,float wetness)\n{\n\tvec2 timeVec = vec2(1.0);\n\tgetTimeInfo(animationSpeed, timeVec);\n\tvec2 posMC_frac1 = vec2(1.0);\n\tvec2 posMC_frac2 = vec2(1.0);\n\tgetPosInfo(vPositionMC, posMC_frac1, posMC_frac2);\n\tfloat alpha = getAlpha(posMC_frac1);\n\tvec4 rippleValue = getRippleValue(uRippleTexture, timeVec, posMC_frac1, posMC_frac2, alpha);\n\tvec3 rippleNormal = getRippleNormal(rippleValue, uWindIntensity, uRain, uCameraDepth);\n\tfloat normalAlpha = getNormalAlpha(normalWS, wetness);\n\treturn normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\n#endif\n",r$14="\n#ifdef HAS_SNOW\nuniform sampler2D uSnowMaskTexture;\nuniform sampler2D uSnowNormalTexture;\n\nvec3 getSnowMaskValue(sampler2D uSnowMaskTexture, vec2 snowUV)\n{\n\treturn texture2D(uSnowMaskTexture, snowUV).rgb;\n}\n\nfloat getSnowCoverage(float snow_coverage, float max_snow_coverage, vec3 normalWS, float z_mask)\n{\n\tfloat normal_z = normalWS.z;\n\tnormal_z += 1.1 + z_mask;\n\tnormal_z = clamp(normal_z * 0.5, 0.0, 1.0);\n\tfloat final_snow_coverage = clamp(snow_coverage, 0.0, max_snow_coverage);\n\tfinal_snow_coverage = clamp(final_snow_coverage*normal_z, 0.0, 1.0);\n\treturn final_snow_coverage;\n}\n\nfloat getSnowCoverageWithMaskTexture(float finalSnowCoverage, float heightValue, float snow_scatter_value, float snow_scatter_alpha, float tighten_value)\n{\n\tfloat scatter_value = mix(heightValue, snow_scatter_value, snow_scatter_alpha);\n\treturn clamp((tighten_value + 1.0) * finalSnowCoverage - tighten_value * scatter_value, 0.0, 1.0);\n}\n\nfloat getSnowAlpha(vec3 normalWS, float snow_coverage, float z_mask)\n{\n\treturn clamp((normalWS.z + z_mask) * 5.0, 0.0, 1.0) * snow_coverage;\n}\n\nvec3 getFinalBaseColor(vec3 baseColor, vec3 snow_baseColor, float snowAlpha)\n{\n\treturn mix(baseColor, snow_baseColor, snowAlpha);\n}\n\nfloat getFinalRoughness(float roughness, float snow_roughness, float snowAlpha)\n{\n\treturn mix(roughness, snow_roughness, snowAlpha);\n}\n\nvec3 getFinalNormal(vec3 normalWS, vec3 snowNormal, float blendNormalValue, float snow_coverage)\n{\n\tvec3 snowNormal_part2 = vec3(snowNormal.xy - vec2(0.5), 1.0);\n\tfloat normal_alpha = (1.0 - blendNormalValue)* snow_coverage;\n\treturn mix(normalWS, snowNormal_part2, normal_alpha);\n}\n\nvoid snowGenerator(sampler2D uSnowMaskTexture, sampler2D uSnowNormalTexture, vec2 snowUV, float snow_coverage, inout vec3 normalWS, inout vec3 baseColor, inout float roughness)\n{\n\tvec3 snowMaskValue = texture2D(uSnowMaskTexture, snowUV).rgb;\n\tconst float max_snow_coverage = 1.0;\n\tconst float z_mask = 0.0;\n\tfloat snowCoverage = getSnowCoverage(snow_coverage, max_snow_coverage, normalWS, z_mask);\n\tconst float heightValue = 0.5;\n\tfloat snow_scatter_value = snowMaskValue.g;\n\tconst float snow_scatter_alpha = 0.5;\n\tconst float tighten_value = 4.0;\n snowCoverage = getSnowCoverageWithMaskTexture(snowCoverage, heightValue, snow_scatter_value, snow_scatter_alpha, tighten_value);\n\tfloat snow_alpha = getSnowAlpha(normalWS, snowCoverage, z_mask);\n\tbaseColor = getFinalBaseColor(baseColor, vec3(snowMaskValue.r), snow_alpha);\n\troughness = getFinalRoughness(roughness, snowMaskValue.b, snow_alpha);\n\tvec3 snowNormalValue = texture2D(uSnowNormalTexture, snowUV).rgb;\n\tconst float blendNormalValue = 0.3;\n\tnormalWS = getFinalNormal(normalWS, snowNormalValue, blendNormalValue, snowCoverage);\n}\n\n#endif\n",e$1R="\n#ifdef HAS_HEMISPHERE_LIGHTS\n\nstruct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n};\n\nvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n float dotNL = dot( geometry.normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n}\n\n#endif\n",m$_="\n#ifdef HAS_POINT_LIGHTS\nstruct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n};\n\nvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = pointLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n directLight.color = pointLight.color;\n directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n directLight.visible = ( directLight.color != vec3( 0.0 ) );\n}\n\n#endif\n",t$Z="\n#ifdef HAS_SPOT_LIGHTS\n\nstruct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n};\n\nvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = spotLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n float angleCos = dot( directLight.direction, spotLight.direction );\n if ( angleCos > spotLight.coneCos ) {\n float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n directLight.color = spotLight.color;\n directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n directLight.visible = true;\n } else {\n directLight.color = vec3( 0.0 );\n directLight.visible = false;\n }\n}\n\n#endif\n",i$Y="\n#ifdef HAS_DIR_LIGHTS\n \n#endif\n",p$10="\n\n#ifdef HAS_DIR_LIGHTS\nfor (int i = 0; i < uDirLightCount; i++) {\n directLight.color = uDirectionalLightColor[i];\n directLight.direction = uDirectionalLightDirectionEC[i];\n directLight.visible = true;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n\n#ifdef HAS_POINT_LIGHTS\nPointLight pointLight;\nfor (int i = 0; i < uPointLightCount; i++) {\n pointLight.position = uPointLightPositionEC[i];\n pointLight.color = uPointLightColor[i];\n pointLight.distance = uPointLightDistanceAndDecay[i].x;\n pointLight.decay = uPointLightDistanceAndDecay[i].y;\n getPointDirectLightIrradiance( pointLight, geometry, directLight );\n if(!directLight.visible) continue;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n\n#ifdef HAS_SPOT_LIGHTS\nSpotLight spotLight;\nfor (int i = 0; i < uSpotLightCount; i++) {\n spotLight.position = uSpotLightPositionEC[i];\n spotLight.color = uSpotLightColorAndExponent[i].rgb;\n spotLight.direction = uSpotLightDirectionEC[i];\n spotLight.coneCos = uSpotLightDistanceDecayCosPenumbra[i].z;\n spotLight.penumbraCos = uSpotLightDistanceDecayCosPenumbra[i].w;\n getSpotDirectLightIrradiance( spotLight, geometry, directLight );\n if(!directLight.visible) continue;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n",l$17="\n#ifdef BRDF\n#define RECIPROCAL_PI 0.31830988618\n#define M_PI 3.141592653589793\n#define EPSILON 1e-6\nfloat pow2( const in float x ) { return x * x; }\n\n#ifdef HAS_BASE_TEXTURE\n uniform sampler2D uBaseTexture;\n#endif\n\n#ifdef HAS_NORMAL_TEXTURE\n uniform sampler2D uNormalTexture;\n#endif\n\n#ifdef HAS_EMISSIVE_TEXTURE\n uniform sampler2D uEmissionTexture;\n#endif\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n uniform sampler2D uMetallicRoughnessTexture;\n#endif\n\n#ifdef HAS_OCCLUSION_TEXTURE\n uniform sampler2D uOcclusionTexture;\n#endif\n\n#ifdef USE_BatchPBR\n varying vec2 vMetallicRoughness;\n varying vec4 vEmissiveFactor;\n varying vec3 vAlphaCutoffAndModeAndDoubleSide;\n#endif\n\n#include <directionLightDecl>\n#include <pointLightDecl>\n#include <spotLightDecl>\n#include <snowDecl>\n#include <rainDecl>\n\nvec3 sRGBToLinear(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\nvec4 sRGBToLinear(vec4 srgbIn)\n{\n srgbIn = srgbIn ;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\nvec3 LinearTosRGB(vec3 linearIn) \n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else \n return linearIn;\n#endif \n}\n\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor * RECIPROCAL_PI;\n}\n\nvec3 applyTonemapping(vec3 linearIn) \n{\n vec3 color = linearIn * uToneMappingExposure;\n return czm_acesTonemapping(color);\n}\n\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\n\nfloat GeometrySchlickGGX(float roughness, float NoV)\n{\n float k = pow(roughness + 1.0, 2.0) / 8.0;\n return NoV / (NoV * (1.0 - k) + k);\n}\n\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n float alpha = roughness * roughness;\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = clamp( dot( normal, lightDir ), 0.001, 1.0 );\n float dotNV = abs( dot( normal, viewDir ) ) + 0.001;\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotLH = saturate( dot( lightDir, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n float D = D_GGX( alpha, dotNH );\n return F * ( G * D ) / (4.0 * dotNL * dotNV);\n}\n\nvoid directPhysical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n reflectedLight.directDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n}\n\n#ifdef HAS_NORMAL_TEXTURE\nvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv, vec3 mapN) {\n float fNormalLength = length(mapN);\n vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n if(fNormalLength < 0.5) {\n return surf_norm;\n }\n mapN = mapN * 2.0 - 1.0;\n float scale = sign( st1.t * st0.s - st0.t * st1.s );\n vec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n vec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n vec3 N = normalize( surf_norm );\n mat3 tsn = mat3( S, T, N );\n mapN.xy *= uNormalTextureScale;\n mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n return normalize( tsn * mapN );\n}\n#endif\n\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n\n#ifdef HAS_RAIN\nvoid adjustByWetness(inout vec3 baseColor, inout float roughness, vec3 normalWS_wetness) {\n float fWetness = clamp(uWetnessFactor,0.0,1.0);\n float fWetness_correction = pow(4.0*fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction,clamp(fWetness,0.0,0.9),1.0);\n float fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n baseColor = mix(baseColor,baseColor*0.7,fWerness_normalized);\n roughness = mix(roughness,0.05,fWerness_normalized);\n}\n#endif\n\nfloat getRoughness(vec2 oriTexCoord){\n float roughness = uMetallicRoughnessIntensityScale.y;\n#ifdef PBR_THEME\n int pbrIndex = int(vPBRIndex);\n if(vPBRIndex < 0.0)\n {\n return 1.0;\n }\n mat4 pbrPar = mat4(0.0);\n for(int i = 0;i < NUM_PBR_MATERIALS;i++)\n {\n if(i == pbrIndex)\n {\n pbrPar = uPBRMaterials[i];\n break;\n }\n }\n roughness = clamp(pbrPar[0][0], 0.04, 1.0);\n#endif\n#ifdef USE_BatchPBR\n roughness = vMetallicRoughness.y;\n#endif\n roughness = clamp(roughness, 0.0, 1.0);\n \n#ifdef HAS_MetallicRoughness_TEXTURE\n vec3 metallicRoughness = texture2D(uMetallicRoughnessTexture, oriTexCoord).rgb;\n roughness = clamp(roughness * metallicRoughness.g, 0.04, 1.0);\n#ifdef HAS_RAIN\n adjustByWetness(vec3(1.0), roughness, vec3(0.0));\n#endif\n#endif\n return roughness;\n}\n\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\nvec3 getTexcoordAndMipmapLevel(vec2 uv, vec4 texMatrix, float texCoordZ) {\n vec2 translate = texMatrix.xy;\n float textureWidth = texMatrix.z * uPbrParTextureWidth;\n float scale = texMatrix.z;\n float maxMipmapLevel = texMatrix.w;\n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, vec2(textureWidth), maxMipmapLevel, mipLevel);\n #endif\n vec2 texCoord;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n float offset = pow(2.0, mipLevel) / textureWidth;\n texCoord = clamp(texCoord, offset, 1.0 - offset);\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n return vec3(texCoord.xy, mipLevel);\n}\n#endif\n\nvec4 brdf(in vec4 baseColorWithAlpha, vec2 texCoord, vec2 oriTexCoord, vec3 posEC, vec3 posMC, vec3 vertexNormalEC, mat4 modelMatrix) {\n vec2 uv = oriTexCoord;\n float mipmapLevel = 0.0;\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\n vec3 uvAndMiplevel = getTexcoordAndMipmapLevel(oriTexCoord, vTexMatrix, vTexCoordZ.x);\n uv = uvAndMiplevel.xy;\n mipmapLevel = uvAndMiplevel.z;\n#endif\n#ifndef USE_BatchPBR\n baseColorWithAlpha = baseColorWithAlpha * uBaseColorFactor;\n#endif\n#ifdef BaseColorReplace\n baseColorWithAlpha = uBaseColorFactor;\n#endif\n float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n mat3 normalMatrix = getNormalMatrix(uView, modelMatrix);\n vec3 ng = normalize(vertexNormalEC);\n #ifndef HAS_NORMAL\n ng = normalize(normalMatrix * czm_computeNormal(posMC.xyz));\n #endif\n ng = ng * faceDirection;\n#ifdef HAS_BASE_TEXTURE\n #ifdef USE_BatchPBR\n baseColorWithAlpha *= sRGBToLinear(texture2DLodEXT(uBaseTexture, uv * uTexUVOffset.zw + uTexUVOffset.xy, mipmapLevel));\n #else\n baseColorWithAlpha = sRGBToLinear(texture2D(uBaseTexture, oriTexCoord * uTexUVOffset.zw + uTexUVOffset.xy)) * uBaseColorFactor;\n #endif\n#endif\n#ifdef HAS_NORMAL_TEXTURE\n #ifdef USE_BatchPBR\n vec3 mapN = texture2DLodEXT( uNormalTexture, uv, mipmapLevel).xyz;\n #else\n vec3 mapN = texture2D( uNormalTexture, uv).xyz;\n #endif\n // 切线空间计算纹理坐标需采用原始纹理坐标,边界未做偏移\n vec3 n = ng;\n vec3 oriNg = perturbNormal2Arb(posEC, ng, oriTexCoord, mapN);\n if(!(oriTexCoord.x == 0.0 && oriTexCoord.y == 0.0)){\n n = oriNg;\n }\n#else\n vec3 n = ng;\n#endif\n#ifdef HAS_RAIN\n mat3 fixedToENU_wetness = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n vec3 normalWS_wetness = normalize(fixedToENU_wetness * n);\n n = rippleGenerator(uRippleTexture,uAnimationSpeed,normalWS_wetness,uWetnessFactor);\n#endif\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = uMetallicRoughnessIntensityScale.y;\n float metalness = uMetallicRoughnessIntensityScale.x;\n vec4 emissiveFactor = uEmissiveFactor;\n#ifdef PBR_THEME\n int pbrIndex = int(vPBRIndex);\n if(vPBRIndex < 0.0)\n {\n return baseColorWithAlpha;\n }\n mat4 pbrPar = mat4(0.0);\n for(int i = 0;i < NUM_PBR_MATERIALS;i++)\n {\n if(i == pbrIndex)\n {\n pbrPar = uPBRMaterials[i];\n break;\n }\n }\n roughness = clamp(pbrPar[0][0], 0.04, 1.0);\n metalness = clamp(pbrPar[0][1], 0.0, 1.0);\n baseColor = (baseColorWithAlpha / uBaseColorFactor * vec4(pbrPar[0][2], pbrPar[0][3], pbrPar[1][0], pbrPar[1][1])).rgb;\n#endif\n#ifdef USE_BatchPBR\n metalness = vMetallicRoughness.x;\n roughness = vMetallicRoughness.y;\n emissiveFactor = vEmissiveFactor;\n#endif\n metalness = clamp(metalness, 0.0, 1.0);\n roughness = clamp(roughness, 0.04, 1.0);\n \n#ifdef HAS_MetallicRoughness_TEXTURE\n #ifdef USE_BatchPBR\n vec3 metallicRoughness = texture2DLodEXT(uMetallicRoughnessTexture, uv, mipmapLevel).rgb;\n #else\n vec3 metallicRoughness = texture2D(uMetallicRoughnessTexture, oriTexCoord).rgb;\n #endif\n metalness = clamp(metalness * metallicRoughness.r, 0.0, 1.0);\n roughness = clamp(roughness * metallicRoughness.g, 0.04, 1.0);\n#ifdef HAS_RAIN\n adjustByWetness(baseColor, roughness, normalWS_wetness);\n#endif\n#ifdef HAS_SNOW\n mat3 fixedToENU_snow = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n vec3 normalWS_snow = normalize(fixedToENU_snow * n);\n snowGenerator(uSnowMaskTexture,uSnowNormalTexture, oriTexCoord,uSnowCoverageFactor,normalWS_snow,baseColor,roughness);\n#endif\n#endif\n\n vec3 lightColorHdr = vec3(2.0) * uSunLightColor.rgb * uSunLightON;\n vec3 l = normalize(uSunDirectionEC);\n vec3 v = -normalize(posEC);\n vec3 h = normalize(v + l);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n \n float alpha = roughness * roughness;\n float dotNL = clamp( dot( n, l ), 0.001, 1.0 );\n float dotNV = abs( dot( n, v ) ) + 0.001;\n float dotNH = saturate( dot( n, h ) );\n float dotLH = saturate( dot( l, h ) );\n float dotVH = saturate( dot( v, h ) );\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n float f90 = clamp(reflectance * 25.0, 0.0, 1.0);\n vec3 F = F_Schlick( specularColor, f90, dotVH );\n float G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n float D = D_GGX( alpha, dotNH );\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * dotNL * dotNV);\n\n PhysicalMaterial material;\n material.diffuseColor = diffuseColor;\n material.roughness = max( roughness, 0.0525 );\n material.roughness = min( material.roughness, 1.0 );\n material.specularColor = specularColor;\n material.specularF90 = 1.0;\n \n GeometricContext geometry;\n geometry.position = posEC;\n geometry.normal = n;\n geometry.viewDir = v;\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += dotNL * lightColorHdr * diffuseContribution;\n reflectedLight.directSpecular += dotNL * lightColorHdr * specularContribution;\n \n IncidentLight directLight; \n #include <lightSourceImpl>\n \n getEnvironmentColor(geometry, material, reflectedLight);\n\n#ifdef HAS_OCCLUSION_TEXTURE\n #ifdef USE_BatchPBR\n float ambientOcclusion = texture2DLodEXT(uOcclusionTexture, uv, mipmapLevel).r;\n #else\n float ambientOcclusion = texture2D(uOcclusionTexture, oriTexCoord.xy).r;\n #endif\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n#ifdef IBL\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n#endif\n#endif\n\n float shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), n, -posEC.z);\n#endif\n\nvec3 color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n\n#ifdef HAS_EMISSIVE_TEXTURE\n vec2 emissiveTexCoord = uv * uEmissiveUVOffsetAndTiling.zw + uEmissiveUVOffsetAndTiling.xy;\n #ifdef USE_BatchPBR\n vec3 emissive = texture2DLodEXT(uEmissionTexture, emissiveTexCoord, mipmapLevel).rgb;\n #else\n vec3 emissive = texture2D(uEmissionTexture, emissiveTexCoord).rgb;\n #endif\n emissive *= emissiveFactor.rgb;\n color += emissive;\n#else\n color += emissiveFactor.rgb;\n#endif\n\n color = applyTonemapping(color);\n color = LinearTosRGB(color);\n#ifdef MASK\n if (baseColorWithAlpha.a < uAlphaCutoff)\n {\n discard;\n }\n return vec4(color.rgb, 1.0);\n#endif\n return vec4(color.rgb, baseColorWithAlpha.a);\n}\n#endif\n",f$Y="\n#ifdef SERVEREXCAVATION\nuniform sampler2D uServerExcavationTexture;\nvarying vec4 vServerExcavationVertexPos;\nvec2 CalculateServerExcavationPolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect)\n{\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\nbool executeServerExcavation()\n{\n float hasExcavation = 1.0;\n vec2 vecExcavationTexCoord = CalculateServerExcavationPolyTexCoord(vServerExcavationVertexPos, uServerExcavationRect, hasExcavation);\n bool excavationInside = (uServerExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n if(excavationInside)\n {\n return texture2D(uServerExcavationTexture, vecExcavationTexCoord.xy).r > 0.5;\n }\n else\n {\n return texture2D(uServerExcavationTexture, vecExcavationTexCoord.xy).r < 0.5;\n }\n}\n#endif",c$13="\n\t#define CUBEUV_MAX_MIP 8.0\n\t#define CUBEUV_TEXEL_WIDTH 0.0013020833333333333\n\t#define CUBEUV_TEXEL_HEIGHT 0.0009765625\n #define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\n\t// These shader functions convert between the UV coordinates of a single face of\n\t// a cubemap, the 0-5 integer index of a cube face, and the direction vector for\n\t// sampling a textureCube (not generally normalized ).\n\n\tfloat getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\n\t// RH coordinate system; PMREM face-indexing convention\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t}\n\n\t// These defines must match with PMREMGenerator\n\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\n\tfloat roughnessToMip( float roughness ) {\n\n\t\tfloat mip = 0.0;\n\n\t\tif ( roughness >= cubeUV_r1 ) {\n\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\n\t\t} else {\n\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25\n\t\t}\n\n\t\treturn mip;\n\n\t}\n\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\n\t\tfloat mipF = fract( mip );\n\n\t\tfloat mipInt = floor( mip );\n\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\n\t\tif ( mipF == 0.0 ) {\n\n\t\t\treturn vec4( color0, 1.0 );\n\n\t\t} else {\n\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\n\t\t}\n\n\t}\n",a$X="\n#ifdef USE_CUBE_MAP_SHADOW\n uniform samplerCube shadowMap_textureCube;\n#else\n uniform sampler2D shadowMap_texture;\n #ifdef USE_PCSS\n uniform highp sampler2DShadow u_shadowDepth;\n #endif\n#endif\n\n#include <shadowVisibility>\n\n\nvec4 cascadeWeights(float depthEye)\n{\n // One component is set to 1.0 and all others set to 0.0.\n vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\n vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}\n\n// Offset the shadow position in the direction of the normal for perpendicular and back faces\nvoid applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL)\n{\n#ifdef APPLY_NORMAL_OFFSET\n float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;\n float normalOffsetScale = 1.0 - nDotL;\n vec3 offset = normalOffset * normalOffsetScale * normalEC;\n positionEC.xyz += offset;\n#endif // APPLY_NORMAL_OFFSET\n}\n\nfloat getShadowVisibility(vec4 positionEC, vec3 normalEC, float depth){\n czm_shadowParameters shadowParameters;\n shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\n shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\n shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\n shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\n shadowParameters.uvRange = vec4(0.0, 1.0, 0.0, 1.0);\n\n float visibility = 1.0;\n\n #ifdef IS_TERRAIN\n // Scale depth bias based on view distance to reduce z-fighting in distant terrain\n shadowParameters.depthBias *= max(depth * 0.01, 1.0);\n #endif // IS_TERRAIN\n\n shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);\n \n #ifdef USE_CUBE_MAP_SHADOW // POINT_LIGHT\n vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz;\n float distance = length(directionEC);\n directionEC = normalize(directionEC);\n float radius = shadowMap_lightPositionEC.w;\n // Stop early if the fragment is beyond the point light radius\n if (distance > radius)\n {\n return visibility;\n }\n vec3 directionWC = czm_inverseViewRotation * directionEC;\n \n shadowParameters.depth = distance / radius;\n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n \n shadowParameters.texCoords = directionWC;\n visibility = shadowVisibility(shadowMap_textureCube, shadowParameters);\n #endif // USE_CUBE_MAP_SHADOW\n \n #ifdef SPOT_LIGHT_SHADOW\n vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);\n float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n applyNormalOffset(positionEC, normalEC, nDotL);\n vec4 shadowPosition = shadowMap_matrix * positionEC;\n // Spot light uses a perspective projection, so perform the perspective divide\n shadowPosition /= shadowPosition.w;\n \n // Stop early if the fragment is not in the shadow bounds\n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n {\n return visibility;\n }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n \n visibility = shadowVisibility(shadowMap_texture, shadowParameters);\n #endif // SPOT_LIGHT_SHADOW\n \n #ifdef HAS_CASCADES\n float maxDepth = shadowMap_cascadeSplits[1].w;\n // Stop early if the eye depth exceeds the last cascade\n if (depth > maxDepth)\n {\n return visibility;\n }\n \n // Get the cascade based on the eye-space depth\n vec4 weights = cascadeWeights(depth);\n \n // Apply normal offset\n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(positionEC, normalEC, nDotL);\n \n // Transform position into the cascade\n //vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;\n\n mat4 cascadeMatrix;\n mat4 nextCascadeMatrix;\n bool csmBlend = false;\n float diffRatio = 0.0;\n float shadowMapIndex = 0.0;\n if(weights.x > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[0];\n nextCascadeMatrix = shadowMap_cascadeMatrices[1];\n csmBlend = weights.y > 0.0;\n diffRatio = (depth - shadowMap_cascadeSplits[0].y) / (shadowMap_cascadeSplits[1].x - shadowMap_cascadeSplits[0].y);\n shadowMapIndex = 0.0;\n }\n else if(weights.y > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[1];\n nextCascadeMatrix = shadowMap_cascadeMatrices[2];\n csmBlend = weights.z > 0.0;\n diffRatio = (depth - shadowMap_cascadeSplits[0].z) / (shadowMap_cascadeSplits[1].y - shadowMap_cascadeSplits[0].z);\n shadowMapIndex = 1.0;\n }\n else if(weights.z > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[2];\n nextCascadeMatrix = shadowMap_cascadeMatrices[3];\n csmBlend = weights.w > 0.0;\n diffRatio = (depth - shadowMap_cascadeSplits[0].w) / (shadowMap_cascadeSplits[1].z - shadowMap_cascadeSplits[0].w);\n shadowMapIndex = 2.0;\n }\n else if(weights.w > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[3];\n shadowMapIndex = 3.0;\n }\n vec4 shadowPosition = cascadeMatrix * positionEC;\n \n // Get visibility\n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n shadowParameters.shadowMapIndex = shadowMapIndex;\n visibility = shadowVisibility(shadowMap_texture, shadowParameters);\n\n if(csmBlend){\n vec4 nextShadowPosition = nextCascadeMatrix * positionEC;\n shadowParameters.texCoords = nextShadowPosition.xy;\n shadowParameters.depth = nextShadowPosition.z;\n shadowParameters.shadowMapIndex = shadowMapIndex + 1.0;\n float nextVisibility = shadowVisibility(shadowMap_texture, shadowParameters);\n visibility = mix(visibility, nextVisibility, diffRatio);\n // Draw cascade blend colors for debugging\n //gl_FragColor *= vec4(diffRatio, 0.0, 0.0, 1.0);\n }\n \n // Fade out shadows that are far away\n float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;\n float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);\n visibility = mix(visibility, 1.0, fade);\n \n visibility = clamp(visibility, 0.0, 1.0);\n //// Draw cascade colors for debugging\n //gl_FragColor *= czm_cascadeColor(weights);\n #endif // HAS_CASCADES\n \n #ifdef NO_CASCADES\n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(positionEC, normalEC, nDotL);\n vec4 shadowPosition = shadowMap_matrix * positionEC;\n \n // Stop early if the fragment is not in the shadow bounds\n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n {\n return visibility;\n }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n visibility = shadowVisibility(shadowMap_texture, shadowParameters);\n #endif // NO_CASCADES\n\n return visibility;\n}\n",n$_="\n#ifdef USE_PCSS\nconst vec3 PoissonSamplers32[64] = vec3[64](\n vec3(0.06407013, 0.05409927, 0.),\n vec3(0.7366577, 0.5789394, 0.),\n vec3(-0.6270542, -0.5320278, 0.),\n vec3(-0.4096107, 0.8411095, 0.),\n vec3(0.6849564, -0.4990818, 0.),\n vec3(-0.874181, -0.04579735, 0.),\n vec3(0.9989998, 0.0009880066, 0.),\n vec3(-0.004920578, -0.9151649, 0.),\n vec3(0.1805763, 0.9747483, 0.),\n vec3(-0.2138451, 0.2635818, 0.),\n vec3(0.109845, 0.3884785, 0.),\n vec3(0.06876755, -0.3581074, 0.),\n vec3(0.374073, -0.7661266, 0.),\n vec3(0.3079132, -0.1216763, 0.),\n vec3(-0.3794335, -0.8271583, 0.),\n vec3(-0.203878, -0.07715034, 0.),\n vec3(0.5912697, 0.1469799, 0.),\n vec3(-0.88069, 0.3031784, 0.),\n vec3(0.5040108, 0.8283722, 0.),\n vec3(-0.5844124, 0.5494877, 0.),\n vec3(0.6017799, -0.1726654, 0.),\n vec3(-0.5554981, 0.1559997, 0.),\n vec3(-0.3016369, -0.3900928, 0.),\n vec3(-0.5550632, -0.1723762, 0.),\n vec3(0.925029, 0.2995041, 0.),\n vec3(-0.2473137, 0.5538505, 0.),\n vec3(0.9183037, -0.2862392, 0.),\n vec3(0.2469421, 0.6718712, 0.),\n vec3(0.3916397, -0.4328209, 0.),\n vec3(-0.03576927, -0.6220032, 0.),\n vec3(-0.04661255, 0.7995201, 0.),\n vec3(0.4402924, 0.3640312, 0.),\n\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.)\n);\n\nconst vec3 PoissonSamplers64[64] = vec3[64](\n vec3(-0.613392, 0.617481, 0.),\n vec3(0.170019, -0.040254, 0.),\n vec3(-0.299417, 0.791925, 0.),\n vec3(0.645680, 0.493210, 0.),\n vec3(-0.651784, 0.717887, 0.),\n vec3(0.421003, 0.027070, 0.),\n vec3(-0.817194, -0.271096, 0.),\n vec3(-0.705374, -0.668203, 0.),\n vec3(0.977050, -0.108615, 0.),\n vec3(0.063326, 0.142369, 0.),\n vec3(0.203528, 0.214331, 0.),\n vec3(-0.667531, 0.326090, 0.),\n vec3(-0.098422, -0.295755, 0.),\n vec3(-0.885922, 0.215369, 0.),\n vec3(0.566637, 0.605213, 0.),\n vec3(0.039766, -0.396100, 0.),\n vec3(0.751946, 0.453352, 0.),\n vec3(0.078707, -0.715323, 0.),\n vec3(-0.075838, -0.529344, 0.),\n vec3(0.724479, -0.580798, 0.),\n vec3(0.222999, -0.215125, 0.),\n vec3(-0.467574, -0.405438, 0.),\n vec3(-0.248268, -0.814753, 0.),\n vec3(0.354411, -0.887570, 0.),\n vec3(0.175817, 0.382366, 0.),\n vec3(0.487472, -0.063082, 0.),\n vec3(-0.084078, 0.898312, 0.),\n vec3(0.488876, -0.783441, 0.),\n vec3(0.470016, 0.217933, 0.),\n vec3(-0.696890, -0.549791, 0.),\n vec3(-0.149693, 0.605762, 0.),\n vec3(0.034211, 0.979980, 0.),\n vec3(0.503098, -0.308878, 0.),\n vec3(-0.016205, -0.872921, 0.),\n vec3(0.385784, -0.393902, 0.),\n vec3(-0.146886, -0.859249, 0.),\n vec3(0.643361, 0.164098, 0.),\n vec3(0.634388, -0.049471, 0.),\n vec3(-0.688894, 0.007843, 0.),\n vec3(0.464034, -0.188818, 0.),\n vec3(-0.440840, 0.137486, 0.),\n vec3(0.364483, 0.511704, 0.),\n vec3(0.034028, 0.325968, 0.),\n vec3(0.099094, -0.308023, 0.),\n vec3(0.693960, -0.366253, 0.),\n vec3(0.678884, -0.204688, 0.),\n vec3(0.001801, 0.780328, 0.),\n vec3(0.145177, -0.898984, 0.),\n vec3(0.062655, -0.611866, 0.),\n vec3(0.315226, -0.604297, 0.),\n vec3(-0.780145, 0.486251, 0.),\n vec3(-0.371868, 0.882138, 0.),\n vec3(0.200476, 0.494430, 0.),\n vec3(-0.494552, -0.711051, 0.),\n vec3(0.612476, 0.705252, 0.),\n vec3(-0.578845, -0.768792, 0.),\n vec3(-0.772454, -0.090976, 0.),\n vec3(0.504440, 0.372295, 0.),\n vec3(0.155736, 0.065157, 0.),\n vec3(0.391522, 0.849605, 0.),\n vec3(-0.620106, -0.328104, 0.),\n vec3(0.789239, -0.419965, 0.),\n vec3(-0.545396, 0.538133, 0.),\n vec3(-0.178564, -0.596057, 0.)\n);\n#endif // USE_PCSS\n\n\nfloat getRand(vec2 seed) {\n return fract(sin(dot(seed.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n#define inline\nfloat cubeSampleShadowMap(samplerCube shadowMap, vec3 d)\n{\n return czm_unpackDepth(textureCube(shadowMap, d));\n}\n\n#define inline\nfloat sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture2D(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\n\n#define inline\nfloat cubeShadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\n return step(depth, cubeSampleShadowMap(shadowMap, uv));\n}\n\n#define inline\nfloat shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, sampleShadowMap(shadowMap, uv));\n}\n\nfloat private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n float strength = step(0.0, nDotL);\n#endif\n visibility *= strength;\n#endif\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\n#define inline\nfloat shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec3 uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n float visibility = cubeShadowDepthCompare(shadowMap, uvw, depth);\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\n\n#ifdef USE_PCSS\n #define inline\n float computeShadowWithPCSS(czm_shadowParameters shadowParameters, sampler2D depthSampler, int searchTapCount, int pcfTapCount, vec3[64] poissonSamplers)\n {\n float depthMetric = shadowParameters.depth;\n\n if (depthMetric > 1.0 || depthMetric < 0.0) {\n return 1.0;\n }\n\n vec4 uvRange = shadowParameters.uvRange;\n float depthBias = shadowParameters.depthBias;\n #ifdef WEBGPU\n depthBias *= 2.0;\n #endif\n vec3 clipPos = vec3(shadowParameters.texCoords.xy, shadowParameters.depth - depthBias);\n vec3 uvDepth = clipPos;\n\n float shadowMapSize = 1.0 / shadowParameters.texelStepSize.x;\n float shadowMapSizeInverse = shadowParameters.texelStepSize.x;\n float contactHardeningLightSizeUVRatio = shadowMap_penumbraRatio;\n float shadowMapIndex = shadowParameters.shadowMapIndex;\n // hack : 让不同cascade的阴影看起来没有明显分隔\n float scale = pow(2.0, shadowMapIndex);\n contactHardeningLightSizeUVRatio /= scale;\n float lightSizeUV = shadowMapSize * contactHardeningLightSizeUVRatio;\n float darkness = shadowParameters.darkness;\n\n float blockerDepth = 0.0;\n float sumBlockerDepth = 0.0;\n float numBlocker = 0.0;\n\n for (int i = 0; i < searchTapCount; i ++) {\n blockerDepth = czm_unpackDepth(textureLod(depthSampler, uvDepth.xy + (lightSizeUV * shadowMapSizeInverse * PoissonSamplers32[i].xy), 0.0));\n if (blockerDepth < uvDepth.z) {\n sumBlockerDepth += blockerDepth;\n numBlocker++;\n }\n }\n\n if (numBlocker < 1.0) {\n return 1.0;\n }\n else\n {\n float avgBlockerDepth = sumBlockerDepth / numBlocker;\n\n // Offset preventing aliasing on contact.\n float AAOffset = shadowMapSizeInverse * 10.;\n // Do not dividing by z despite being physically incorrect looks better due to the limited kernel size.\n // float penumbraRatio = (depthMetric - avgBlockerDepth) / avgBlockerDepth;\n float penumbraRatio = ((depthMetric - avgBlockerDepth) + AAOffset);\n float filterRadius = penumbraRatio * lightSizeUV * shadowMapSizeInverse;\n\n float random = getRand(shadowParameters.texCoords.xy);\n float rotationAngle = random * 3.1415926;\n vec2 rotationVector = vec2(cos(rotationAngle), sin(rotationAngle));\n\n float shadow = 0.;\n for (int i = 0; i < pcfTapCount; i++) {\n vec3 offset = poissonSamplers[i];\n // Rotated offset.\n offset = vec3(offset.x * rotationVector.x - offset.y * rotationVector.y, offset.y * rotationVector.x + offset.x * rotationVector.y, 0.);\n vec3 realUV = uvDepth + offset * filterRadius;\n #ifdef WEBGPU\n realUV.z = (realUV.z - 0.5) * 2.0;\n #endif\n shadow += textureLod(u_shadowDepth, realUV, 0.0);\n }\n shadow /= float(pcfTapCount);\n\n // Blocker distance falloff\n shadow = mix(shadow, 1.0, depthMetric - avgBlockerDepth);\n\n // Apply darkness\n shadow = mix(darkness, 1.0, shadow);\n\n return shadow;\n }\n }\n\n #define inline\n float computeShadowWithPCSS16(czm_shadowParameters shadowParameters, sampler2D depthSampler)\n {\n return computeShadowWithPCSS(shadowParameters, depthSampler, 16, 16, PoissonSamplers32);\n }\n\n #define inline\n float computeShadowWithPCSS32(czm_shadowParameters shadowParameters, sampler2D depthSampler)\n {\n return computeShadowWithPCSS(shadowParameters, depthSampler, 16, 32, PoissonSamplers32);\n }\n\n #define inline\n float computeShadowWithPCSS64(czm_shadowParameters shadowParameters, sampler2D depthSampler)\n {\n return computeShadowWithPCSS(shadowParameters, depthSampler, 32, 64, PoissonSamplers64);\n }\n\n#else\n #define inline\n float computeShadowWithPoissonSampling(czm_shadowParameters shadowParameters, sampler2D shadowMap)\n {\n float shadowPixelDepth = shadowParameters.depth;\n float depthBias = shadowParameters.depthBias;\n shadowPixelDepth -= depthBias;\n float darkness = shadowParameters.darkness;\n vec2 uv = shadowParameters.texCoords;\n vec4 uvRange = shadowParameters.uvRange;\n vec2 texelStepSize = shadowParameters.texelStepSize;\n\n float visibility = 1.0;\n vec2 poissonDisk[4];\n poissonDisk[0] = vec2(-0.94201624, -0.39906216);\n poissonDisk[1] = vec2(0.94558609, -0.76890725);\n poissonDisk[2] = vec2(-0.094184101, -0.92938870);\n poissonDisk[3] = vec2(0.34495938, 0.29387760);\n\n // Poisson Sampling\n if (sampleShadowMap(shadowMap, uv + poissonDisk[0] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n if (sampleShadowMap(shadowMap, uv + poissonDisk[1] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n if (sampleShadowMap(shadowMap, uv + poissonDisk[2] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n if (sampleShadowMap(shadowMap, uv + poissonDisk[3] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n\n return visibility;\n }\n#endif // USE_PCSS\n\n#define inline\nfloat shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\n#ifdef USE_SOFT_SHADOWS\n #ifdef USE_PCSS\n #ifdef LOW_QUALITY_SHADOW\n float visibility = computeShadowWithPCSS16(shadowParameters, shadowMap);\n #elif defined(MEDIUM_QUALITY_SHADOW)\n float visibility = computeShadowWithPCSS32(shadowParameters, shadowMap);\n #else\n float visibility = computeShadowWithPCSS64(shadowParameters, shadowMap);\n #endif\n #else\n float visibility = computeShadowWithPoissonSampling(shadowParameters, shadowMap);\n #endif\n#else\n float depth = shadowParameters.depth;\n float depthBias = shadowParameters.depthBias;\n depth -= depthBias;\n vec2 uv = shadowParameters.texCoords;\n float visibility = shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n",D$Z="\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n\nuniform sampler2D u_waterMask;\nuniform vec4 u_waterMaskTranslationAndScale;\nuniform float u_zoomedOutOceanSpecularIntensity;\n\nfloat waveFade(float edge0, float edge1, float x)\n{\n float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n return pow(1.0 - y, 5.0);\n}\n\nfloat linearFade(float edge0, float edge1, float x)\n{\n return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n}\n\n// Based on water rendering by Jonas Wagner:\n\n// low altitude wave settings\nconst float oceanFrequencyLowAltitude = 825000.0;\nconst float oceanAnimationSpeedLowAltitude = 0.004;\nconst float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;\nconst float oceanSpecularIntensity = 0.5;\n\n// high altitude wave settings\nconst float oceanFrequencyHighAltitude = 125000.0;\nconst float oceanAnimationSpeedHighAltitude = 0.008;\nconst float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;\n\nvec4 getWaterNoise(vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (textureLod(u_oceanNormalMap, uv0, 0.0)) +\n (textureLod(u_oceanNormalMap, uv1, 0.0)) +\n (textureLod(u_oceanNormalMap, uv2, 0.0)) +\n (textureLod(u_oceanNormalMap, uv3, 0.0));\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)\n{\n vec3 positionToEyeEC = -positionEyeCoordinates;\n float positionToEyeECLength = length(positionToEyeEC);\n\n // The double normalize below works around a bug in Firefox on Android devices.\n vec3 normalizedpositionToEyeEC = normalize(normalize(positionToEyeEC));\n\n // Fade out the waves as the camera moves far from the surface.\n float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);\n\n#ifdef SHOW_OCEAN_WAVES\n // high altitude waves\n float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;\n vec4 noise = getWaterNoise(textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);\n vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);\n\n // low altitude waves\n time = czm_frameNumber * oceanAnimationSpeedLowAltitude;\n noise = getWaterNoise(textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);\n vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);\n\n // blend the 2 wave layers based on distance to surface\n float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);\n float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);\n vec3 normalTangentSpace =\n (highAltitudeFade * normalTangentSpaceHighAltitude) +\n (lowAltitudeFade * normalTangentSpaceLowAltitude);\n normalTangentSpace = normalize(normalTangentSpace);\n\n // fade out the normal perturbation as we move farther from the water surface\n normalTangentSpace.xy *= waveIntensity;\n normalTangentSpace = normalize(normalTangentSpace);\n#else\n vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);\n#endif\n\n vec3 normalEC = enuToEye * normalTangentSpace;\n\n const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);\n\n // Use diffuse light to highlight the waves\n float diffuseIntensity = czm_getLambertDiffuse(czm_sunDirectionEC, normalEC) * maskValue;\n vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);\n\n#ifdef SHOW_OCEAN_WAVES\n // Where diffuse light is low or non-existent, use wave highlights based solely on\n // the wave bumpiness and no particular light direction.\n float tsPerturbationRatio = normalTangentSpace.z;\n vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);\n#else\n vec3 nonDiffuseHighlight = vec3(0.0);\n#endif\n\n // Add specular highlights in 3D, and in all modes when zoomed in.\n float specularIntensity = czm_getSpecular(czm_sunDirectionEC, normalizedpositionToEyeEC, normalEC, 10.0) + 0.25 * czm_getSpecular(czm_moonDirectionEC, normalizedpositionToEyeEC, normalEC, 10.0);\n float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);\n float specular = specularIntensity * surfaceReflectance;\n\n#ifdef HDR\n specular *= 1.4;\n\n float e = 0.2;\n float d = 3.3;\n float c = 1.7;\n\n vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));\n#else\n vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;\n#endif\n\n return vec4(color, imageryColor.a);\n}\n\nvec4 getOceanColor(vec4 inColor, vec3 positionEC, vec3 positionMC, vec3 normalEC, vec3 normalMC, float fade)\n{\n vec4 color = inColor;\n vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;\n vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;\n vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;\n waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;\n\n float mask = texture2D(u_waterMask, waterMaskTextureCoordinates).r;\n\n if (mask > 0.0)\n {\n mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n\n vec2 ellipsoidTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC);\n vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC.zyx);\n\n vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));\n\n color = computeWaterColor(positionEC, textureCoordinates, enuToEye, color, mask, fade);\n }\n return color;\n}\n\n#endif\n",h$12="\n#ifdef HYPSOMETRIC_ANALYSIS\nuniform sampler2D uHypsometricTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\n\nfloat computeMixCon()\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n float t = floor(v_height2 / uHypContourInterval);\n distanceToContour = abs(v_height2 - t * uHypContourInterval - 0.1) ;\n }\n else\n {\n distanceToContour = abs(v_height2 - uHypMaxVisibleValue);\n }\n float dxc = abs(dFdx(v_height2));\n float dyc = abs(dFdy(v_height2));\n float dF = max(dxc, dyc);\n return (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor()\n{\n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n float contourRate = (v_height2 - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n vec2 contourCoord = vec2(0.0, finalCoord);\n return textureLod(uHypsometricTexture, contourCoord, 0.0).rgba;\n}\n\nvec4 getHypsometricAnalysisColor(vec4 inColor, vec2 textureCoordinates)\n{\n vec4 finalColor = inColor;\n float mixCon = computeMixCon();\n if(uHypHasColorTable > 0.1)\n {\n bool hasHyp = true;\n #ifdef HYPSOMETRIC_REGION\n if(uHypHasAnalysisRegion > 0.1){\n hasHyp = texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w > 0.5;\n }\n #endif\n if(hasHyp)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(v_height2 > uHypMaxVisibleValue + 4.0 || v_height2 < uHypMinVisibleValue - 4.0)\n {\n finalOpacity = 0.5;\n }\n else\n {\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = mixCon;\n contourMapColor = mix(computeContourMapColor(), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = mixCon;\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n #else\n if(uHypContourFillMode > 0.9)\n #endif\n {\n contourMapColor = computeContourMapColor();\n }\n else\n {\n finalOpacity = 0.0;\n }\n finalColor = mix(finalColor, contourMapColor, finalOpacity);\n }\n }\n }\n return finalColor;\n}\n\n#endif\n\n#ifdef SLOPE_ANALYSIS\nuniform sampler2D uSlopeColorTexture;\nuniform sampler2D uSlopeArrowsTexture;\nuniform float uSlopeHasColorTable;\nuniform float uSlopeFillMode;\nuniform float uSlopeOpacity;\nuniform float uSlopeFloor;\nuniform float uSlopeCeil;\nuniform float uSlopeMinVisibleValue;\nuniform float uSlopeMaxVisibleValue;\nuniform float uHasSlopeRegion;\nuniform vec4 uSlopeRect;\nconst float PI = 3.1415926535897932384626;\nvarying vec2 texCoordRotate;\n\n\nvec4 ComputeSlopeArrowColor(in float slopeAngle, in vec3 realNormal)\n{\n vec2 limitTexCoord = fract(texCoordRotate);\n vec2 slopeDirection = realNormal.xy;\n vec4 arrowsTexColor = vec4(0.0);\n float arrowAlpha = 0.0;\n float distance = length(slopeDirection);\n float acosSlopeDirection = acos(slopeDirection.x/distance);\n float slopeArrowsAngle = acosSlopeDirection;//坡向的旋转角\n if(slopeDirection.y<0.0)//第二、三象限\n {\n slopeArrowsAngle = 2.0 * PI - acosSlopeDirection;\n }\n //绕Z轴旋转的旋转矩阵\n vec2 n = vec2(cos(slopeArrowsAngle),-sin(slopeArrowsAngle));\n vec2 t = vec2(sin(slopeArrowsAngle),cos(slopeArrowsAngle));\n mat2 slopeRotateZMatrix = mat2(n,t);\n //1、把旋转点移到(0.5,0.5)\n vec2 transCoord = limitTexCoord - vec2(0.5,0.5);\n //2、以原点为中心点旋转纹理坐标\n transCoord = slopeRotateZMatrix * transCoord;\n //3、把旋转点(0.5,0.5)移到原点处\n transCoord += vec2(0.5,0.5);\n transCoord = smoothstep(0.0,1.0, transCoord);\n arrowsTexColor = textureLod(uSlopeArrowsTexture, transCoord, 0.0);\n if (slopeAngle <= PI/180.0) // 当地形的坡度值小于E-6度时,不显示表示方向的箭头。\n {\n return vec4(0.0);\n }\n arrowAlpha = arrowsTexColor.a;\n // 解决坡向边界有黑线的问题\n float xNum = floor(transCoord.x * 64.0);\n float yNum = floor(transCoord.y * 64.0);\n if ((xNum <= 2.0 || xNum >= 61.0|| yNum <= 2.0||yNum >= 61.0) && arrowAlpha < 1.0)\n {\n arrowAlpha = 0.0;\n }\n arrowsTexColor = vec4(arrowsTexColor.rgb, arrowAlpha);\n return arrowsTexColor;\n}\n\nvec4 getSlopeAnalysisColor(vec4 inColor, vec2 textureCoordinates, vec3 realNormal){\n vec4 finalColor = inColor;\n bool hasSlopeRegion = true;\n #ifdef SlopeRegion\n if(uHasSlopeRegion > 0.1){\n hasSlopeRegion = texture2D(uModifyRasterTexture, textureCoordinates.xy).w > 0.5;\n }\n #endif\n if(hasSlopeRegion)\n {\n float finalOpacity = uSlopeOpacity;\n float slopeRate = abs(normalize(realNormal).z);\n float slopeAngle = acos(slopeRate);\n if (slopeAngle < uSlopeMinVisibleValue || slopeAngle > uSlopeMaxVisibleValue)\n {\n finalOpacity = 0.0;\n }\n float threshold = clamp(abs(uSlopeCeil-uSlopeFloor),0.0000001,PI/2.0);\n float rate = (slopeAngle-uSlopeFloor)/threshold;\n float finalRate = clamp(rate,0.0,1.0);\n float count = floor(finalRate * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalRate*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 slopeCoord = vec2(x, y);\n vec4 slopeFillColor = textureLod(uSlopeColorTexture, slopeCoord, 0.0);\n vec4 slopeMapColor = vec4(0.0);\n if(uSlopeFillMode > 2.9)//填充和坡向\n {\n vec4 arrowsTexColor = ComputeSlopeArrowColor(slopeAngle, realNormal);\n slopeMapColor = mix(slopeFillColor, arrowsTexColor, arrowsTexColor.a);\n }\n else if(uSlopeFillMode > 1.9)//坡向\n {\n vec4 arrowsTexColor = ComputeSlopeArrowColor(slopeAngle, realNormal);\n slopeMapColor = arrowsTexColor;\n finalOpacity *= arrowsTexColor.a;\n }\n else if(uSlopeFillMode > 0.9)//填充\n {\n slopeMapColor = slopeFillColor;\n }\n else\n {\n finalOpacity = 0.0;\n }\n finalColor = mix(finalColor, slopeMapColor, finalOpacity);\n }\n \n return finalColor;\n}\n\n#endif\n\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodTexture;\nuniform vec4 uFloodRect;\nvarying vec3 vProjectionCoord;\n\nvec4 getFloodAnalysisColor(vec4 inColor, vec2 textureCoordinates){\n vec4 finalColor = inColor;\n float bIsFloodColor = 1.0;\n vec2 polyTexCoord = textureCoordinates.xy;\n polyTexCoord.x = polyTexCoord.x * (uTileBounds.z - uTileBounds.x) + uTileBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uTileBounds.w - uTileBounds.y) + uTileBounds.y;\n vec4 floodColor = vec4(0.0);\n if(polyTexCoord.x>uFloodRect.x && polyTexCoord.x<uFloodRect.z && polyTexCoord.y> uFloodRect.y&& polyTexCoord.y < uFloodRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uFloodRect.x, uFloodRect.w);\n polyTexCoord.x = polyTexCoord.x / (uFloodRect.z - uFloodRect.x);\n polyTexCoord.y = 1.0-polyTexCoord.y / (uFloodRect.y - uFloodRect.w);\n }\n floodColor = texture2D(uFloodTexture, polyTexCoord);\n if(floodColor.r > 0.5)\n {\n finalColor = vec4(40.0/255.0,150.0/255.0,200.0/255.0,u_GlobeAlpha);\n }\n return finalColor;\n}\n#endif\n\n\n",g$15="\n#ifdef NORMAL\nvec4 renderNormal(vec3 posMC)\n{\n vec3 normalMC = normalize(czm_computeNormal(posMC));\n normalMC = normalMC * 0.5 + vec3(0.5);\n #include <writeFragDepth>\n return vec4(normalMC, 1.0);\n}\n#endif\n",s$V="\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn ;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\n",u$T="\nUBO_DECL_BEGIN(Mesh)\n UBO_PARAM mat4 uModelMatrix;\n UBO_PARAM mat4 uGeoMatrix;\n UBO_PARAM vec4 batchTextureStep;\n UBO_PARAM vec2 batchTextureDimensions;\n UBO_PARAM vec2 decode_texCoord0_min;\n UBO_PARAM vec2 decode_texCoord1_min;\n UBO_PARAM vec3 decode_texCoord0_vNormConstant;\n UBO_PARAM vec3 decode_texCoord1_vNormConstant;\n UBO_PARAM vec4 decode_position_min;\n UBO_PARAM float decode_position_normConstant;\n UBO_PARAM float normal_rangeConstant;\n UBO_PARAM mat4 uInverseGeoMatrix;\n UBO_PARAM mat4 uSkeletonMatrix;\n UBO_PARAM float uSkeletonCount;\n UBO_PARAM vec2 uImgTextureBound;\n UBO_PARAM float uImgTextureAlpha;\n UBO_PARAM float fMultiTemporalFactor;\n UBO_PARAM vec3 uSouthWest;\n UBO_PARAM vec3 uNorthDir;\n UBO_PARAM vec3 uEastDir;\n UBO_PARAM vec2 textureRepeat;\nUBO_DECL_END\n",d$1h="\nUBO_DECL_BEGIN(Layer)\n UBO_PARAM vec4 uSelColor;\n UBO_PARAM vec4 uTranslationAndBottom;\n UBO_PARAM vec4 uFillForeColor;\n UBO_PARAM vec4 uPolygonOffset;\n UBO_PARAM float uPointSize;\n UBO_PARAM vec2 uMinMaxTransparent;\n UBO_PARAM float uTransparentFilter;\n UBO_PARAM vec4 uHypLineColor;\n UBO_PARAM vec4 uNoValueColor;\n UBO_PARAM vec4 uHypRect;\n UBO_PARAM float uHypHasAnalysisRegion;\n UBO_PARAM float uMixColorType;\n UBO_PARAM float uHypOpacity;\n UBO_PARAM float uHypContourInterval;\n UBO_PARAM float uHypContourFillMode;\n UBO_PARAM float uHypFloor;\n UBO_PARAM float uHypCeil;\n UBO_PARAM float uDataFloor;\n UBO_PARAM float uDataCeil;\n UBO_PARAM float uHypMaxVisibleValue;\n UBO_PARAM float uHypMinVisibleValue;\n UBO_PARAM float uHypsometricVisible;\n UBO_PARAM vec4 uRect;\n UBO_PARAM float uCameraHeight;\n UBO_PARAM vec4 uExcavationRect;\n UBO_PARAM vec4 uServerExcavationRect;\n UBO_PARAM float uExcavationMode;\n UBO_PARAM float uServerExcavationMode;\n UBO_PARAM vec4 uSwipeRegion;\n UBO_PARAM float uBrightness;\n UBO_PARAM float uContrast;\n UBO_PARAM float uHue;\n UBO_PARAM float uSaturation;\n UBO_PARAM float uOneOverGamma;\n UBO_PARAM vec4 uClipPlanes[6];\n UBO_PARAM vec4 uClipLineColor;\n UBO_PARAM float uClipMode;\n UBO_PARAM float uMaxCategory;\n UBO_PARAM float uMinCategory;\n UBO_PARAM float uCategoryWidht;\n UBO_PARAM float uCategoryHeight;\n UBO_PARAM vec4 uLineColor;\n UBO_PARAM float uLineWidth;\n UBO_PARAM float uFillStyle;\n UBO_PARAM vec4 uTransparentBackColor;\n UBO_PARAM float uTransparentBackColorTolerance;\n UBO_PARAM float uVisibleDistanceMax;\n UBO_PARAM vec4 uHorizontalColor;\n UBO_PARAM float uHorizontalLine;\n UBO_PARAM float uDistanceFalloffFactor;\n UBO_PARAM vec2 uStrokesTextureScale;\n UBO_PARAM float uStrokesLog2Resolution;\n UBO_PARAM vec4 uMinMaxTerrainHeightAndPickInfo;\n UBO_PARAM vec4 uOverlayRect;\n UBO_PARAM vec4 uEmissionTexAtlasTilingAndOffset[10];\n UBO_PARAM vec4 uEmissionTexAtlasRects[10];\n UBO_PARAM vec4 uEmissionColor;\n UBO_PARAM vec4 uLayerBounds;\n UBO_PARAM float uLayerCornerLength;\n UBO_PARAM float uMaxCategoryOrHypCeil;\n UBO_PARAM float uMinCategoryOrHypFloor;\n UBO_PARAM float uEmissionTexAtlasCount;\n UBO_PARAM float uSnowCoverageFactor;\n UBO_PARAM float uAnimationSpeed;\n UBO_PARAM float uRippleScale;\n UBO_PARAM float uWindIntensity;\n UBO_PARAM float uRain;\n UBO_PARAM float uCameraDepth;\n UBO_PARAM float uWetnessFactor;\n UBO_PARAM float uSelectColorType;\nUBO_DECL_END\n",b$1d="\nUBO_DECL_BEGIN(Material)\n UBO_PARAM mat4 uTexMatrix;\n UBO_PARAM vec4 uDiffuseColor;\n UBO_PARAM vec4 uAmbientColor;\n UBO_PARAM vec4 uSpecularColor;\n UBO_PARAM vec4 uTexUVOffset;\n UBO_PARAM vec4 uTextureDim;\n UBO_PARAM vec2 uTextureWidths;\n UBO_PARAM vec4 batchTextureStep_baseTex;\n UBO_PARAM vec2 batchTextureDimensions_baseTex;\n UBO_PARAM vec4 batchTextureStep_bakeTex;\n UBO_PARAM vec2 batchTextureDimensions_bakeTex;\n \n UBO_PARAM vec4 uBaseColorFactor;\n UBO_PARAM vec4 uEmissiveFactor;\n UBO_PARAM vec4 uEmissiveUVOffsetAndTiling;\n UBO_PARAM vec3 uMetallicRoughnessIntensityScale;\n UBO_PARAM vec2 uPBRTexWH;\n UBO_PARAM float uNormalTextureScale;\n UBO_PARAM float uAlphaMode;\n UBO_PARAM float uAlphaCutoff;\n UBO_PARAM float uPbrParTextureWidth;\n \n // uIndexOfRefraction;\n // uTransmissionFactor;\n // uThickness;\n // uSnowCoverageFactor;\n // uIntensityScale;\n // uAnimationSpeed;\n // uWetnessFactor;\n // uRippleScale;\n // uWindIntensity;\n // uRain;\n // uCameraDepth;\n // uTintColor;\n // uDiffusionDistance;\n // uClearcoatFactor;\n // uClearcoatRoughnessFactor;\n // uAnisotropy; \nUBO_DECL_END\n",x$16="\nUBO_DECL_BEGIN(Scene)\n UBO_PARAM mat4 uView;\n UBO_PARAM mat4 uProjection;\n UBO_PARAM mat4 uViewProjection;\n UBO_PARAM mat4 uInverseView;\n UBO_PARAM mat4 uInverseProjection;\n UBO_PARAM mat4 uInverseViewProjection;\n UBO_PARAM mat4 uViewportTransformation;\n UBO_PARAM mat3 uViewRotation;\n UBO_PARAM mat3 uInverseViewRotation;\n UBO_PARAM mat3 uTemeToPseudoFixed;\n UBO_PARAM vec4 uViewport;\n UBO_PARAM vec4 uFrustumPlanes;\n UBO_PARAM vec3 uRelativeOrigin;\n UBO_PARAM vec2 uCurrentFrustum;\n UBO_PARAM float uFarDepthFromNearPlusOne;\n UBO_PARAM float uLog2FarDepthFromNearPlusOne;\n UBO_PARAM float uOneOverLog2FarDepthFromNearPlusOne;\n UBO_PARAM float uFrameNumber;\n UBO_PARAM float uPixelRatio;\n UBO_PARAM float uResolutionScale;\n UBO_PARAM float uGamma;\n UBO_PARAM float uToneMappingExposure;\n UBO_PARAM float uEnvMapIntensity;\n UBO_PARAM vec2 uSpecularEnvironmentMapSize;\n UBO_PARAM float uSpecularEnvironmentMapsMaximumLOD;\n UBO_PARAM vec3 uSphericalHarmonicCoefficients[9];\nUBO_DECL_END\n",L$16="\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = gl_FragCoord.z;\n#endif\n\n#ifdef WEBGL2\n gl_FragDepthEXT = gl_FragCoord.z;\n#endif\n",S$T="\n#ifdef NORMAL_AND_DEPTH\nvarying vec4 oriVertex;\nvarying vec3 perVertexNormals;\nvarying float depthInCamera;\nvec4 renderNormalAndDepth(vec3 posMC)\n{\n vec3 normal = normalize(perVertexNormals);\n float dLength = length(perVertexNormals);\n if(dLength <= 0.9)\n {\n normal = vec3(mat3(czm_modelView)*czm_computeNormal(posMC.xyz));\n }\n normal = (normal + 1.0) * 0.5;\n #include <writeFragDepth>\n return vec4(normal, 1.0);\n}\n#endif\n",U$12="\n#ifdef PREPASS\nvoid renderPrePass(float roughness)\n{\n vec3 normalEC = normalize(mat3(czm_view * uModelMatrix) * czm_computeNormal(vPositionMC.xyz));\n // 相机坐标系坐标\n gl_FragData[0] = vec4(v_positionEC, 1.0);\n // 相机坐标系法线\n gl_FragData[1] = vec4(normalEC, 1.0);\n // 反射率\n float reflectivity = 1.0 - roughness;\n gl_FragData[2] = vec4(reflectivity, reflectivity, reflectivity, 1.0);\n}\n#endif\n",V$W="\nvoid calculateMipLevel(in vec2 inTexCoord, in vec2 vecTile, in float fMaxMip, inout float mipLevel)\n{\n\tvec2 dx = dFdx(inTexCoord * vecTile.x);\n\tvec2 dy = dFdy(inTexCoord * vecTile.y);\n\tfloat dotX = dot(dx, dx);\n\tfloat dotY = dot(dy, dy);\n\tfloat dMax = max(dotX, dotY);\n\tfloat dMin = min(dotX, dotY);\n\tfloat offset = (dMax - dMin) / (dMax + dMin);\n\toffset = clamp(offset, 0.0, 1.0);\n\tfloat d = dMax * (1.0 - offset) + dMin * offset;\n\tmipLevel = 0.5 * log2(d);\n\tmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\n",y$W="\n#ifdef Has_Texture\n uniform sampler2D uTexture;\n#ifdef MULTI_TEX\n uniform sampler2D uSecTexture;\n#endif\n#ifndef NO_TEXCOORD\n struct TextureParam {\n vec2 uv;\n vec2 dim;\n vec2 translate;\n vec2 scale;\n vec4 uvOffset;\n float maxMipmapLevel;\n float texCoordZ;\n float isRGBA;\n };\n \n vec4 sampleLod(vec2 uv, float mipLevel, bool bUseFirstTexture) {\n vec4 color = vec4(1.0);\n \n if(bUseFirstTexture)\n {\n #ifdef GL_EXT_shader_texture_lod\n color = texture2DLodEXT(uTexture, uv, mipLevel);\n #else\n #ifdef WEBGL2\n color = textureLod(uTexture, uv, mipLevel);\n #else\n color = texture2D(uTexture, uv, mipLevel);\n #endif\n #endif\n }\n else\n {\n #ifdef MULTI_TEX\n #ifdef GL_EXT_shader_texture_lod\n color = texture2DLodEXT(uSecTexture, uv, mipLevel);\n #else\n #ifdef WEBGL2\n color = textureLod(uSecTexture, uv, mipLevel);\n #else\n color = texture2D(uSecTexture, uv, mipLevel);\n #endif\n #endif\n #endif\n }\n \n return SRGBtoLINEAR4(color);\n }\n \n#ifdef TextureBatch\n\n vec4 getBatchTextureColor(TextureParam textureParam, bool bUseFirstTexture)\n {\n vec2 uv = textureParam.uv;\n vec2 dim = textureParam.dim;\n vec2 translate = textureParam.translate;\n vec2 scale = textureParam.scale;\n vec4 uvOffset = textureParam.uvOffset;\n float maxMipmapLevel = textureParam.maxMipmapLevel;\n if(maxMipmapLevel < 0.0)\n {\n return vec4(1.0);\n }\n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, dim, maxMipmapLevel, mipLevel);\n #endif\n vec2 texCoord = getBatchUV(uv, translate, scale, dim, ceil(mipLevel));\n vec4 colorCeil = sampleLod(texCoord, 0.0, bUseFirstTexture);\n texCoord = getBatchUV(uv, translate, scale, dim, floor(mipLevel));\n vec4 colorFloor = sampleLod(texCoord, 0.0, bUseFirstTexture);\n return colorCeil * 0.5 + colorFloor * 0.5;\n }\n\n#else\n\n vec4 getTextureColor(TextureParam textureParam, vec2 outTexCoord, bool bUseFirstTexture)\n {\n vec2 uv = textureParam.uv;\n vec2 dim = textureParam.dim;\n vec2 translate = textureParam.translate;\n vec2 scale = textureParam.scale;\n vec4 uvOffset = textureParam.uvOffset;\n float maxMipmapLevel = textureParam.maxMipmapLevel;\n float texCoordZ = textureParam.texCoordZ;\n \n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, dim, maxMipmapLevel, mipLevel);\n #endif\n outTexCoord = getUV(uv, translate, uvOffset, scale.x, dim.x, mipLevel, texCoordZ);\n vec4 color = sampleLod(outTexCoord, mipLevel, bUseFirstTexture);\n #ifdef RGBTOBGR\n color = color.bgra;\n #endif\n return color;\n }\n\n#endif\n#endif\n\n vec4 getTextureColorForS3M(out vec4 outTexCoord)\n {\n #ifdef INVALID_OBLIQUE\n return vec4(0.5,0.5,0.5,1.0);\n #endif\n #ifdef NO_TEXCOORD\n return SRGBtoLINEAR4(texture2D(uTexture, vec2(0.5)));\n #endif\n #ifndef NO_TEXCOORD\n TextureParam textureParam;\n textureParam.uv = vTexCoord.xy;\n vec4 firstColor, secColor;\n #ifdef TextureBatch\n textureParam.dim = vTexSize.xy;\n textureParam.translate = vTexTran.xy;\n textureParam.scale = vTexScale.xy;\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.x;\n firstColor = getBatchTextureColor(textureParam, true);\n #else\n if(vTexMatrix.z < 0.0){\n return vec4(1.0);\n }\n float texWidth = vTexMatrix.z * uTextureWidths.x;\n textureParam.dim = vec2(texWidth, texWidth);\n textureParam.translate = vTexMatrix.xy;\n textureParam.scale = vec2(vTexMatrix.z, vTexMatrix.z);\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vTexMatrix.w;\n textureParam.isRGBA = vIsRGBA.x;\n textureParam.texCoordZ = vTexCoordZ.x;\n firstColor = getTextureColor(textureParam, outTexCoord.xy, true);\n #endif\n \n #ifdef MULTI_TEX\n textureParam.uv = vTexCoord.zw;\n #ifdef TextureBatch\n textureParam.dim = vTexSize.zw;\n textureParam.translate = vTexTran.zw;\n textureParam.scale = vTexScale.zw;\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.y;\n secColor = getBatchTextureColor(textureParam, false);\n #else\n texWidth = vTexMatrix2.z * uTextureWidths.y;\n textureParam.dim = vec2(texWidth, texWidth);\n textureParam.translate = vTexMatrix2.xy;\n textureParam.scale = vec2(vTexMatrix2.z, vTexMatrix2.z);\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vTexMatrix2.w;\n textureParam.isRGBA = vIsRGBA.y;\n textureParam.texCoordZ = vTexCoordZ.y;\n secColor = getTextureColor(textureParam, outTexCoord.zw, false);\n #endif\n return firstColor * secColor;\n #endif\n \n return firstColor;\n #endif\n }\n#endif\n",M$16="\n#include <calculatePolyTexCoord>\n#include <executeExcavation>\n#include <splitClip>\n#include <executeServerExcavationDecl>\n#ifdef FINAL_RESOLUTION_CLIP\nvarying vec3 vertexClip;\nuniform vec3 uMaxClip;\nuniform vec3 uMinClip;\n#endif\nvoid preClip()\n{\n if(vColor.a == 0.0)\n {\n discard;\n }\n#ifdef FINAL_RESOLUTION_CLIP\n\tif(vertexClip.x > uMaxClip.x || vertexClip.y > uMaxClip.y || vertexClip.z > uMaxClip.z \n\t|| vertexClip.x < uMinClip.x || vertexClip.y < uMinClip.y || vertexClip.z < uMinClip.z) \n { \n discard; \n } \n#endif\n#ifdef SQCLIP\n czm_spatialQueryClip();\n#endif\n#ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(executeExcavation())\n {\n discard;\n }\n#endif\n#ifdef SERVEREXCAVATION\n if(executeServerExcavation())\n {\n discard;\n }\n#endif\n}\n",v$R="\n#ifdef VISIBLEDISTANCEMAX\nvoid getAlphaByDistance(vec3 positionEC, inout vec4 color) {\n if(length(positionEC) > uVisibleDistanceMax)\n {\n float minAlpha = min(1.0, (length(positionEC) - uVisibleDistanceMax) / 2000.0);\n color.a = 1.0 - minAlpha;\n }\n}\n#endif\n\n#ifdef OVERLAY\nuniform sampler2D uOverlayTexture;\nvoid getOverlayColor(inout vec4 color)\n{\n float ptInRect = 1.0;\n vec4 vertexPos = uGeoMatrix * vec4(vPositionMC.xyz, 1.0);\n vec2 uv = calculatePolyTexCoord(vertexPos, uOverlayRect, ptInRect);\n if(ptInRect > 0.5)\n {\n vec4 overlayColor = texture2D(uOverlayTexture, uv.xy);\n if(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n {\n vec4 mixColor = mix(color, overlayColor, overlayColor.a);\n color = vec4(mixColor.r, mixColor.g, mixColor.b, color.a);\n }\n }\n}\n#endif\n\n#ifdef HORIZONTAL_LINE\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}\n#endif\n\n#ifdef IMAGERY\nvarying vec2 imgCoord;\nuniform sampler2D uImgTexture;\n\n//#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform vec4 u_dayTextureSize[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\nuniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n//#endif\n\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\n\nvoid getImageryColor(inout vec4 color)\n{\n\tvec2 texcood = vec2(imgCoord.x / uImgTextureBound.x, imgCoord.y / uImgTextureBound.y);\n#ifdef MULTIBATCH\n\tcolor = computeDayColor(vec4(1.0,1.0,1.0,0.0), clamp(vec3(texcood,0.0), 0.0, 1.0));\n#else\n\tcolor = computeDayColor(color, clamp(vec3(texcood,0.0), 0.0, 1.0));\n#endif\n}\n#endif\n\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nvoid getFloodWaterColor(inout vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n}\n#endif\n\n#ifdef TRANSPARENT_BACK_COLOR\nvoid transparentColorClip(vec4 color)\n{\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - color.r);\n float gDiff = abs(uTransparentBackColor.g - color.g);\n float bDiff = abs(uTransparentBackColor.b - color.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n}\n#endif\n",C$16="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n#endif\n#ifdef TexCoord2\n attribute vec4 aTexCoord1;\n#endif\n\n#ifdef VertexColor\n attribute vec4 aColor;\n#endif\n\n#ifdef USE_VertexWeight\n attribute float aVertexWeight;\n #ifdef MultiTemporalWeight\n attribute float aVertexWeight_1;\n #endif\n#endif\n\n#ifdef Volume\n attribute vec3 aRatio;\n#endif\n\n#ifdef InstanceRenderBIM\n attribute vec4 uv2;\n attribute vec4 uv3;\n attribute vec4 uv4;\n attribute vec4 secondary_colour;\n attribute vec4 uv6;\n#endif\n\n#ifdef InstanceRenderPipeline\n attribute vec4 uv1;\n attribute vec4 uv2;\n attribute vec4 uv3;\n attribute vec4 uv4;\n attribute vec4 uv5;\n attribute vec4 uv6;\n attribute vec4 uv7;\n attribute vec4 secondary_colour;\n attribute vec4 uv9;\n#endif\n\n#ifdef BatchTable\n#ifdef Instance\n #ifdef InstanceModel\n attribute float batchId;\n #endif\n attribute float instanceId;\n#else\n attribute float batchId;\n#endif\n#endif\n\nstruct VertexFactoryIntermediates{\n vec4 position;\n vec4 vertexColor;\n vec4 secondColor;\n vec3 normal;\n vec3 normalInstance;\n vec4 uv0;\n vec4 uv1;\n float batchTableID;\n vec2 pbrTextureUV;\n};\n\nvec4 GetLocalPosition(){\n vec4 vertexPos = aPosition;\n#ifdef COMPRESS_VERTEX\n vertexPos = decode_position_min + vec4(aPosition.xyz, 1.0) * decode_position_normConstant;\n#endif\n return vertexPos;\n}\nvec4 GetUV0(){\n vec4 result = vec4(0.0);\n#ifdef TexCoord\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n vec2 texCoord0;\n texCoord0.x = aTexCoord0.x * decode_texCoord0_vNormConstant.x;\n texCoord0.y = aTexCoord0.y * decode_texCoord0_vNormConstant.y;\n result.xy = decode_texCoord0_min + texCoord0.xy;\n #else\n result.xy = decode_texCoord0_min.xy + aTexCoord0.xy * decode_texCoord0_normConstant;\n #endif // MeshOPT_Compress\n #else\n result = aTexCoord0;\n #endif // COMPRESS_TEXCOORD\n \n #ifdef InstanceRenderPipeline\n vec4 tex4Vec;\n if(aTexCoord0.y > 0.5) {\n tex4Vec = vec4(uv7.y, aTexCoord0.x, 0.0, 1.0);\n }\n else {\n tex4Vec = vec4(uv7.x, aTexCoord0.x, 0.0, 1.0);\n }\n \n result.xy = tex4Vec.xy;\n #endif\n#endif // TexCoord\n\n return uTexMatrix * result;\n}\nvec4 GetUV1(){\n vec4 result = vec4(0.0);\n#ifdef TexCoord2\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n vec2 texCoord1;\n texCoord1.x = aTexCoord1.x * decode_texCoord1_vNormConstant.x;\n texCoord1.y = aTexCoord1.y * decode_texCoord1_vNormConstant.y;\n result.xy = decode_texCoord1_min + texCoord1.xy;\n #else\n result.xy = decode_texCoord1_min.xy + aTexCoord1.xy * decode_texCoord1_normConstant;\n #endif // MeshOPT_Compress\n #else\n result = aTexCoord1;\n #endif // COMPRESS_TEXCOORD\n#endif // TexCoord2\n return result;\n}\nvec3 GetNormal(){\n#ifdef HAS_NORMAL\n vec3 realNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n #ifdef MeshOPT_Compress\n realNormal.x = aNormal.x / 127.0;\n realNormal.y = aNormal.y / 127.0;\n realNormal.z = 1.0 - abs(realNormal.x) - abs(realNormal.y);\n realNormal = normalize(realNormal);\n #else\n realNormal = czm_octDecode(aNormal.xy, normal_rangeConstant).zxy;\n #endif // MeshOPT_Compress\n #endif // COMPRESS_NORMAL \n \n #ifdef InstanceRenderPipeline\n #ifdef TexCoord\n realNormal.x = realNormal.x * uv7.z;\n #endif \n #endif\n return realNormal;\n#else\n return vec3(0.0, 0.0, 0.0);\n#endif // HAS_NORMAL \n}\nVertexFactoryIntermediates getVertexFactoryIntermediates(){\n VertexFactoryIntermediates intermediates;\n vec4 vertexPos = GetLocalPosition();\n \n#ifdef UseInstanceSkeletonMatrix\n vertexPos = uSkeletonMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n\n#ifdef InstanceRenderBIM\n mat4 worldMatrix;\n worldMatrix[0] = uv2;\n worldMatrix[1] = uv3;\n worldMatrix[2] = uv4;\n worldMatrix[3] = vec4( 0, 0, 0, 1 );\n vertexPos = vec4(vertexPos.xyz, 1.0) * worldMatrix;\n#endif\n\n#ifdef InstanceRenderPipeline\n mat4 worldMatrix;\n mat4 worldMatrix0;\n mat4 worldMatrix1;\n vec4 worldPos0;\n vec4 worldPos1;\n worldMatrix0[0] = uv1;\n worldMatrix0[1] = uv2;\n worldMatrix0[2] = uv3;\n worldMatrix0[3] = vec4( 0, 0, 0, 1 );\n worldMatrix1[0] = uv4;\n worldMatrix1[1] = uv5;\n worldMatrix1[2] = uv6;\n worldMatrix1[3] = vec4( 0, 0, 0, 1 );\n vec4 realVertex = vec4(vertexPos.xyz, 1.0);\n realVertex.x = realVertex.x * uv7.z;\n worldPos0 = realVertex * worldMatrix0;\n worldPos1 = realVertex * worldMatrix1;\n #ifdef TexCoord\n if(aTexCoord0.y > 0.5) {\n vertexPos = worldPos1;\n worldMatrix = worldMatrix1;\n }\n else {\n vertexPos = worldPos0;\n worldMatrix = worldMatrix0;\n }\n #endif\n#endif\n\n\n\n intermediates.position = vertexPos;\n intermediates.normal = GetNormal();\n#ifdef Instance\n intermediates.normalInstance = intermediates.normal * mat3(worldMatrix);\n#endif\n intermediates.uv0 = GetUV0();\n intermediates.uv1 = GetUV1();\n intermediates.vertexColor = vec4(1.0);\n#ifdef VertexColor\n intermediates.vertexColor = aColor;\n#endif\n\n#ifdef Instance\n intermediates.vertexColor *= secondary_colour;\n#endif\n\n#ifdef BatchTable\n #ifdef Instance\n float index = instanceId;\n #else\n float index = batchId;\n #endif\n \n #ifdef InstanceModel\n index = instanceId * uSkeletonCount + batchId;\n #endif\n intermediates.batchTableID = index;\n#endif\n\n#ifdef USE_BatchPBR\n intermediates.pbrTextureUV = aTexCoord1.xy;\n#endif\n\n return intermediates;\n}\n",E$18="\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef USE_TextureCoordMatrix\n attribute vec2 aTextureCoordMatrix;\n#endif\n\n#ifdef TextureBatch\n#ifdef MULTI_TEX\n attribute vec2 aTextureBatchId;\n float getTextureBatchId0(vec2 att)\n {\n return att.x;\n }\n float getTextureBatchId1(vec2 att) \n {\n return att.y;\n }\n#else\n attribute float aTextureBatchId;\n float getTextureBatchId0(float att)\n {\n return att;\n }\n#endif\n// MULTI_TEX \n varying vec4 vTexTran;\n varying vec4 vTexScale;\n varying vec4 vTexSize;\n varying vec2 vMaxMipLevel;\n void getTextureParameter(in vec4 xywh, in vec2 textureDim, inout vec2 translate, inout vec2 scale, inout vec2 texSize, inout float maxMipLevel)\n {\n float width = xywh.z;\n float height = xywh.w;\n width *= 2.0 / 3.0;\n maxMipLevel = log2(min(width, height));\n scale.x = width / textureDim.x;\n scale.y = height / textureDim.y;\n translate.x = xywh.x;\n translate.y = xywh.y;\n translate /= textureDim;\n texSize.x = width;\n texSize.y = height;\n }\n \n void getUVMatrixForBatch(vec4 xywh, vec4 xywh2) {\n if(getTextureBatchId0(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.x = -1.0;\n }\n else\n {\n getTextureParameter(xywh, uTextureDim.xy, vTexTran.xy, vTexScale.xy, vTexSize.xy, vMaxMipLevel.x);\n }\n #ifdef MULTI_TEX\n if(getTextureBatchId1(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.y = -1.0;\n }\n else\n {\n getTextureParameter(xywh2, uTextureDim.zw, vTexTran.zw, vTexScale.zw, vTexSize.zw, vMaxMipLevel.y);\n }\n #endif // MULTI_TEX \n }\n#else\n #ifdef TexCoord\n varying vec2 vTexCoordZ;\n #endif\n \n varying vec4 vTexMatrix;\n varying vec2 vIsRGBA;\t\n #ifdef TexCoord2\n varying vec4 vTexMatrix2;\n #endif // TexCoord2\n \n const float SHIFT_LEFT8 = 256.0;\n const float SHIFT_RIGHT8 = 1.0 / 256.0;\n const float SHIFT_RIGHT4 = 1.0 / 16.0;\n const float SHIFT_LEFT4 = 16.0;\n \n void computeUVMatrixFromZValue(in float nZ, inout float XTran, inout float YTran, inout float scale, inout float isRGBA)\n {\n if(nZ <= 0.0)\n {\n return;\n }\n float nDel8 = floor(nZ * SHIFT_RIGHT8);\n float nDel16 = floor(nDel8 * SHIFT_RIGHT8);\n float nDel20 = floor(nDel16 * SHIFT_RIGHT4);\n isRGBA = floor(nDel20);\n YTran = nZ - nDel8 * SHIFT_LEFT8;\n XTran = nDel8 - nDel16 * SHIFT_LEFT8;\n float nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\n scale = 1.0 / pow(2.0, nLevel);\n }\n \n void getUVMatrix(vec4 uv0, vec4 uv1) {\n vTexCoordZ.x = uv0.z;\n \n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.x = aTextureCoordMatrix.x;\n #endif // USE_TextureCoordMatrix\n \n vTexMatrix = vec4(0.0,0.0,1.0,0.0);\n vIsRGBA.x = 0.0;\n if(vTexCoordZ.x < -90000.0) {\n vTexMatrix.z = -1.0;\n }\n \n #ifndef Instance\n computeUVMatrixFromZValue(floor(vTexCoordZ.x), vTexMatrix.x, vTexMatrix.y, vTexMatrix.z, vIsRGBA.x);\n #ifdef TexCoord2\n vTexMatrix2 = vec4(0.0,0.0,1.0,0.0);\n vIsRGBA.y = 0.0;\n vTexCoordZ.y = uv1.z;\n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.y = aTextureCoordMatrix.y;\n #endif // USE_TextureCoordMatrix \n computeUVMatrixFromZValue(floor(vTexCoordZ.y), vTexMatrix2.x, vTexMatrix2.y, vTexMatrix2.z, vIsRGBA.y);\n #endif // TexCoord2\n #endif // Instance\n vTexMatrix.w = log2(uTextureWidths.x * vTexMatrix.z);\n #ifdef TexCoord2\n vTexMatrix2.w = log2(uTextureWidths.y * vTexMatrix.z);\n #endif // TexCoord2\n }\n \n#endif\n\n#endif // COMPUTE_TEXCOORD\n",P$12="\n#ifdef FALTTEN\n uniform sampler2D uFlattenTexture;\n\n vec4 getVertexByFlatten(vec4 posInLayerCoord, float layerBottom)\n {\n vec4 vecPos = uGeoMatrix * vec4(posInLayerCoord.xyz, 1.0);\n vec2 vecRatio = vec2(uRect.z - uRect.x, uRect.w - uRect.y);\n vec2 vecTexCoord = vec2(vecPos.x - uRect.x, vecPos.y - uRect.y);\n vecTexCoord.x = vecTexCoord.x / vecRatio.x;\n vecTexCoord.y = vecTexCoord.y / vecRatio.y;\n if(vecTexCoord.x > 1.0 || vecTexCoord.x < 0.0 || vecTexCoord.y > 1.0 || vecTexCoord.y < 0.0)\n {\n return posInLayerCoord;\n }\n vec4 value = texture2D(uFlattenTexture, vecTexCoord.xy);\n #ifdef UseFloatTexture\n float fHeight = value.r;\n #else\n float fHeight = czm_unpackValue(value);\n #endif\n if(vecPos.z > fHeight && value.a > 0.5)\n {\n float fDepthOffset = clamp((uCameraHeight - fHeight - layerBottom) * 0.0001 * (vecPos.z + layerBottom - fHeight), 0.001, 3.0);\n vecPos.z = fHeight + fDepthOffset;\n vecPos.w = vecPos.z;\n }\n return uInverseGeoMatrix * vec4(vecPos.xyz, 1.0);\n }\n#endif\n",w$W="\n#ifdef FusionMode\n uniform mat4 uModelView;\n uniform vec2 uPanOffset;\n\n vec4 getFusionModePosition(vec4 vertexPos)\n {\n vec4 positionCC = czm_projection * uModelView * vertexPos;\n positionCC.x += (2.0 * uPanOffset.x * positionCC.w);\n positionCC.y += (-2.0 * uPanOffset.y * positionCC.w);\n return positionCC;\n }\n#endif\n",F$13="\n#ifdef W_VISIBLE\n uniform sampler2D uCategorieTexture;\n\n void setAlphaByWValue(in float w, inout vec4 color)\n {\n float category_u = abs(w - uMinCategory);\n float category_y = ceil(category_u / uCategoryWidht) / uCategoryHeight - 0.5 / uCategoryHeight;\n float category_x = mod(category_u, uCategoryWidht) / uCategoryWidht + 0.5 / uCategoryWidht ;\n vec2 categoryTexCoord = vec2(category_x , category_y);\n float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n color.a *= 1.0 - category;\n }\n#endif\n",A$1b="\n#ifdef USE_BatchPBR\n uniform sampler2D uPBRTexture;\n varying vec2 vMetallicRoughness;\n varying vec4 vEmissiveFactor;\n varying vec3 vAlphaCutoffAndModeAndDoubleSide;\n void getPBRParamFromTexture(vec2 uv1)\n {\n float x = (uv1.x * 2.0 + 0.5)/ uPBRTexWH.x;\n float y = (uv1.x * 2.0 + 1.5)/ uPBRTexWH.x;\n vec4 pbrParam = texture2D(uPBRTexture, vec2(x, 0.5));\n vMetallicRoughness.xy = pbrParam.rg;\n vAlphaCutoffAndModeAndDoubleSide.x = pbrParam.b;\n float temp = pbrParam.a / 65536.0;\n vAlphaCutoffAndModeAndDoubleSide.y = floor(temp);\n vAlphaCutoffAndModeAndDoubleSide.z = (temp- vAlphaCutoffAndModeAndDoubleSide.y) * 65536.0;\n vEmissiveFactor = texture2D(uPBRTexture, vec2(y, 0.5));\n }\n#endif\n",B$Z="\n#ifdef IMAGERY\n attribute vec2 img;\n varying vec2 imgCoord;\n#endif\n\n#ifdef Volume\n varying vec3 vecRotioCoord;\n#endif\n\n#ifdef QUAD_OUTLINE\n varying float vDistanceFromEye;\n#endif\n\n#ifdef HYPSOMETRIC\n varying vec2 vecHypTexCoord;\n#endif\n\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\n\n#ifdef SERVEREXCAVATION\n varying vec4 vServerExcavationVertexPos;\n#endif\n\n#ifdef SQRESULT\n uniform mat4 uSQViewProj;\n varying vec4 vSQ_clip_pos;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n uniform mat4 uFloodMatrixInvert;\n varying vec4 vFloodPos;\n#endif\n\n#ifdef FINAL_RESOLUTION_CLIP\n varying vec3 vertexClip;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n varying vec2 vLayerTexCoord;\n varying vec2 vModIndexAndTexIndex;\n#endif\n\nvoid s3mComputeVaryings(vec4 vertexPos)\n{\n#ifdef Volume\n vecRotioCoord = aRatio;\n#endif\n\n#ifdef FINAL_RESOLUTION_CLIP\n vertexClip = (uGeoMatrix * vec4(vertexPos.xyz, 1.0)).xyz;\n#endif\n\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n\n#ifdef SERVEREXCAVATION\n vServerExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n\n#ifdef HYPSOMETRIC\n if(uHypHasAnalysisRegion > 0.1)\n {\n float ptInRect = 1.0;\n vecHypTexCoord = calculatePolyTexCoord(uGeoMatrix * vec4(vertexPos.xyz, 1.0), uHypRect, ptInRect);\n }\n#endif\n\n#ifdef SQRESULT\n vSQ_clip_pos = uSQViewProj * vec4(vertexPos.xyz, 1.0);\n#endif\n\n#ifdef IMAGERY\n imgCoord = img;\n#endif\n\n#ifdef QUAD_OUTLINE\n vDistanceFromEye = gl_Position.z;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n const float right_8 = 65280.0;\n const float right_16 = 16711680.0;\n float pickId = vSecondColor.r * 255.0 + vSecondColor.g * right_8 + vSecondColor.b * right_16;\n vModIndexAndTexIndex.x = mod(pickId, 10.0) * 0.1;\n vModIndexAndTexIndex.y = mod(pickId, uEmissionTexAtlasCount);\n vec4 realVertexPos = uGeoMatrix * vertexPos;\n vLayerTexCoord = (realVertexPos.xy - uLayerBounds.xy) / uLayerBounds.zw;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n vFloodPos = uFloodMatrixInvert * vec4(vertexPos.xyz, 1.0);\n#endif\n}\n",R$Z="\nfloat computeWValue(inout vec4 vertexPos){\n float realWValue = vertexPos.w;\n#ifdef HypColorByZValue\n realWValue = vertexPos.z;\n#endif\n#ifdef TEXTURE_COORD_ONE_IS_W\n realWValue = aTexCoord0.x;\n#endif\n#ifdef USE_VertexWeight\n realWValue = aVertexWeight;\n #ifdef MultiTemporalWeight\n realWValue = mix(aVertexWeight, aVertexWeight_1, fMultiTemporalFactor);\n #ifdef ChangeZValue\n\t\tvertexPos.z += realWValue;\n\t\t#endif\n\t#endif\n#endif\n#ifdef COMPUTE_W_VALUE\n wValue = realWValue + uTranslationAndBottom.w;\n#endif\n return realWValue;\n}\n",T$11="\n#ifdef HYPSOMETRIC\n#include <getVolumeValue>\n\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nvarying vec2 vecHypTexCoord;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\n#endif\n\nfloat computeMixCon(float fValue)\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n if(fValue < 0.5)\n {\n distanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n }\n else\n {\n float t = floor(fValue / uHypContourInterval);\n distanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n }\n }\n else\n {\n distanceToContour = abs(fValue - uHypMaxVisibleValue);\n }\n float dxc = abs(dFdx(fValue));\n float dyc = abs(dFdy(fValue));\n float dF = max(dxc, dyc);\n return (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float fValue)\n{\n float threshold = abs(uHypCeil - uHypFloor);\n float contourRate = (fValue - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n float count = floor(finalCoord * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 contourCoord = vec2(x, y);\n return texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvec4 getContourMapColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n#ifdef Volume\n vec3 aRatioT = vecRotioCoord;\n if((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n {\n if(uVolumeType > 0.5)\n {\n vec4 volumeColor = getVolumeValue(aRatioT);\n if(uMixColorType > 0.5)\n {\n volumeColor = volumeColor * oriColor;\n }\n return volumeColor;\n }\n float noValue;\n float texTest = getVolumeValue(aRatioT, noValue);\n if(noValue > 0.5)\n {\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n#endif\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n finalColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n#endif\n return finalColor;\n}\n\n#ifdef Volume2\nfloat getContourValue(vec4 volColor) {\n float noValue = volColor.a;\n float texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\n\n float fValue;\n if(noValue > 0.5)\n {\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n \n return fValue;\n}\n\nvec4 getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n \n if(uFilterMode > 0.5) {\n vec4 finalColor = volColor * oriColor;\n\n if(uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n \n float fValue = getContourValue(volColor);\n return getContourMapColor(oriColor, fValue);\n}\n\n#else\n\nvec4 getHypsometricColor(vec4 oriColor, float wValue)\n{\n float fValue = wValue;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return getContourMapColor(oriColor, fValue);\n}\n\nvec4 getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return getContourMapColor(oriColor, wValue);\n}\n#endif\n\n#endif\n",N$W="\nvec2 calculatePolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect){\n vec4 realVertexPos = vertexPos;\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(realVertexPos.x - rectPos.x, realVertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\n",I$1i="\n#ifdef EXCAVATION\nuniform sampler2D uExcavationTexture;\nvarying vec4 vExcavationVertexPos;\nbool executeExcavation()\n{\n float hasExcavation = 1.0;\n vec2 vecExcavationTexCoord = calculatePolyTexCoord(vExcavationVertexPos, uExcavationRect, hasExcavation);\n bool excavationInside = (uExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n \n if(excavationInside)\n {\n return textureLod(uExcavationTexture, vecExcavationTexCoord.xy, 0.0).r > 0.5;\n }\n \n return textureLod(uExcavationTexture, vecExcavationTexCoord.xy, 0.0).r < 0.5;\n}\n#endif\n",W$10="\n#ifdef APPLY_SWIPE\nvoid rollerShutter(vec2 coord, vec4 region)\n{\n vec2 f = step(region.xw, coord);\n vec2 s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n#endif\n",k$Z="\n#ifdef EMISSION_TEXTURE_ATLAS\nuniform sampler2D uEmissionTexAtlas;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 getEmissiveTextureAtlasColor(float w)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n for(int i = 0; i < int(uEmissionTexAtlasCount); i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n vec3 normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n float isNotTopFace = 1.0 - step(0.95, normalMC.z);\n float dayTime = 1.0 - czm_RGBToHSL(uAmbientLightColor.rgb).z;\n vec3 emissionTexColor = uEmissionColor.rgb * texColor * dayTime * isNotTopFace;\n return emissionTexColor;\n}\n\nvec3 getEmissiveTextureAtlasColor(float w, vec2 texCoord)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n for(int i = 0; i < int(uEmissionTexAtlasCount); i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n vec3 normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n float isNotTopFace = 1.0 - step(0.95, normalMC.z);\n float dayTime = 1.0 - czm_RGBToHSL(uAmbientLightColor.rgb).z;\n vec3 emissionTexColor = uEmissionColor.rgb * texColor * dayTime * isNotTopFace;\n return emissionTexColor;\n}\n#endif\n",O$N="\n#ifdef ADJUST_COLOR\nvec3 adjustColor(vec3 inputColor)\n{\n vec3 outputColor = inputColor;\n outputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\n outputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\n outputColor.rgb = czm_hue(outputColor.rgb, uHue);\n outputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\n outputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\n outputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\n return outputColor;\n}\n#endif\n",_$X="\n#ifdef CLIP\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nconst float clip_lineWidth = 3.0;\n\nfloat GetClipDistance(vec3 pos, vec3 planeNormal, float disToOrigin)\n{\n return dot(planeNormal, pos) + disToOrigin;\n}\n\nfloat ClipBehindAllPlane(float fBorderWidth, vec4 clip_vertex)\n{\n float distance = 0.0;\n float result = -1.0;\n #ifdef CLIPPLANE\n distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[0].xyz, uClipPlanes[0].w);\n if (distance < 0.0)\n {\n return 1.0;\n }\n else if (distance < fBorderWidth)\n {\n result = 0.0;\n }\n #else\n for(int i = 0; i < 6; i++)\n {\n distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[i].xyz, uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return 1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n #endif\n return result;\n}\n\nfloat ClipBehindAnyPlane(float fBorderWidth, vec4 clip_vertex)\n{\n float result = 1.0;\n for(int i = 0; i < 6; i++)\n {\n float distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[i].xyz, uClipPlanes[i].w);\n if((distance + fBorderWidth) < 0.0)\n {\n return -1.0;\n }\n else if(distance < 0.0)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nfloat ClipAnythingButLine(float fBorderWidth, vec4 clip_vertex)\n{\n float result = -1.0;\n for(int i = 0; i < 6; i++)\n {\n float distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[i].xyz, uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return -1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nvec4 clip(vec4 clip_vertex, float fIsFiltByID)\n{\n if(fIsFiltByID < 0.1)\n {\n return vec4(1.0);\n }\n if(uClipMode < 0.5)\n {\n return vec4(1.0);\n }\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2) \n float dxc = abs(dFdx(clip_vertex.x));\n float dyc = abs(dFdy(clip_vertex.y));\n float fBorderWidth = max(dxc, dyc) * clip_lineWidth;\n #else\n float fBorderWidth = clip_lineWidth;\n #endif\n float clipResult = 1.0;\n if(uClipLineColor.a < 0.01)\n {\n fBorderWidth = 0.0;\n }\n if(uClipMode < 1.5)\n {\n clipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n }\n else if(uClipMode < 2.5)\n {\n clipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n }\n else if(uClipMode < 3.5)\n {\n clipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n }\n if(clipResult < -0.5)\n {\n discard;\n }\n else if(clipResult < 0.5)\n {\n return uClipLineColor;\n }\n else\n {\n return vec4(1.0);\n }\n}\n#endif\n",j$16="\n#ifdef Volume\nuniform sampler2D uVolumeTexture;\n\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uTimeRatio;\n#endif\n\nfloat unpackVolume(vec3 packedDepth)\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\n float yOffset = floor((fLevel+0.25/uVolSideBlockCount) / uVolSideBlockCount);\n float xOffset = fLevel - yOffset * uVolSideBlockCount;\n float texCoordV = (texCoord.y * uVolHeight + yOffset * uVolBlockLength) / uVolTexLength;\n float texCoordU = (texCoord.x * uVolWidth + xOffset * uVolBlockLength) / uVolTexLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\n vec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\n vec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\n float fValue1 = clamp(unpackVolume(volumeValue1.xyz),0.0,1.0);\n float fValue2 = clamp(unpackVolume(volumeValue2.xyz),0.0,1.0);\n if(uVolFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n noValue = mix(volumeValue1.a, volumeValue2.a, ratio);\n if(volumeValue1.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(volumeValue2.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfloat getVolumeValue(vec3 texCoord, out float noValue)\n{\n float fLevel = (uVolDepth - 1.0) * texCoord.z;\n float bottomLevel= floor(fLevel);\n float topLevel = bottomLevel + 1.0;\n float ratio = topLevel - fLevel;\n vec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n vec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n float fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n fResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\n return fResult;\n}\n\nvec4 getVolumeValue(vec3 texCoord)\n{\n\tfloat fLevel = (uVolDepth - 1.0) * texCoord.z;\n\tfloat bottomLevel= floor(fLevel);\n\tfloat topLevel = bottomLevel + 1.0;\n\tfloat ratio = topLevel - fLevel;\n\tfloat yOffset1 = floor((topLevel+0.25/uVolSideBlockCount) / uVolSideBlockCount);\n\tfloat xOffset1 = topLevel - yOffset1 * uVolSideBlockCount;\n\tfloat texCoordV1 = (texCoord.y * uVolHeight + yOffset1 * uVolBlockLength)/uVolTexLength;\n\tfloat texCoordU1 = (texCoord.x * uVolWidth + xOffset1 * uVolBlockLength)/uVolTexLength;\n\tvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\n\tfloat yOffset2 = floor((bottomLevel+0.25/uVolSideBlockCount) / uVolSideBlockCount);\n\tfloat xOffset2 = bottomLevel - yOffset2 * uVolSideBlockCount;\n\tfloat texCoordV2 = (texCoord.y * uVolHeight + yOffset2 * uVolBlockLength)/uVolTexLength;\n\tfloat texCoordU2 = (texCoord.x * uVolWidth + xOffset2 * uVolBlockLength)/uVolTexLength;\n\tvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\n\n\tif(uVolFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif\n",G$1c="\nUBO_DECL_BEGIN(WaterLayer)\n UBO_PARAM vec4 uWaterColor;\n UBO_PARAM vec4 uSunColor;\n UBO_PARAM vec2 uBumpSpeed;\n UBO_PARAM float uTimeVal;\n UBO_PARAM float uWaterBrightness;\n UBO_PARAM float uUseRefectMap;\n UBO_PARAM float uNoiseScale;\n UBO_PARAM float uMinVisibleValue;\n UBO_PARAM float uMaxVisibleValue;\n UBO_PARAM float uReflectMapLod;\nUBO_DECL_END\n",H$10="\n UBO_DECL_BEGIN(Polyline)\n vec4 uColor;\n vec4 uOutlineColor;\n vec4 uGapColor;\n float uEffectLineWidth;\n float uType;\n float uOutlineWidth;\n float uDashLength;\n float uDashPattern;\n float uGlowPower;\n float uIsArrow;\n UBO_DECL_END\n",q$15="\n UBO_DECL_BEGIN(RegionEffect)\n vec4 uForeColor;\n vec4 uBackColor;\n float uRotationAngle;\n float uType;\n float uLineWidthX;\n float uLineWidthY;\n float uRepeatX;\n float uRepeatY;\n float uOffsetX;\n float uOffsetY;\n UBO_DECL_END\n",z$X="\nmat3 getNormalMatrix(mat4 viewMatrix, mat4 modelMatrix) {\n mat4 modelView = viewMatrix * modelMatrix;\n vec4 modelViewRow0 = modelView[0];\n vec4 modelViewRow1 = modelView[1]; \n vec4 modelViewRow2 = modelView[2]; \n mat3 normalMatrix = mat3(\n vec3(modelViewRow0.x, modelViewRow0.y, modelViewRow0.z), \n vec3(modelViewRow1.x, modelViewRow1.y, modelViewRow1.z), \n vec3(modelViewRow2.x, modelViewRow2.y, modelViewRow2.z));\n return normalMatrix;\n}",J$X="\nUBO_DECL_BEGIN(Shadow)\n UBO_PARAM mat4 shadowMap_matrix;\n UBO_PARAM vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;\n UBO_PARAM vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;\n UBO_PARAM mat4 shadowMap_cascadeMatrices[4];\n UBO_PARAM vec4 shadowMap_cascadeSplits[2];\n UBO_PARAM vec4 shadowMap_lightPositionEC;\n UBO_PARAM vec3 shadowMap_lightDirectionEC;\n UBO_PARAM float shadowMap_penumbraRatio;\nUBO_DECL_END\n",K$U="\n#define MAX_POINT_LIGHT_COUNT 16\n#define MAX_SPOT_LIGHT_COUNT 16\n#define MAX_DIRECTION_LIGHT_COUNT 4\nUBO_DECL_BEGIN(Light)\n UBO_PARAM vec3 uPointLightPositionEC[MAX_POINT_LIGHT_COUNT];\n UBO_PARAM vec3 uPointLightColor[MAX_POINT_LIGHT_COUNT];\n UBO_PARAM vec4 uPointLightDistanceAndDecay[MAX_POINT_LIGHT_COUNT];\n UBO_PARAM vec4 uSpotLightColorAndExponent[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec3 uSpotLightPositionEC[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec3 uSpotLightDirectionEC[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec4 uSpotLightDistanceDecayCosPenumbra[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec3 uDirectionalLightDirectionEC[MAX_DIRECTION_LIGHT_COUNT];\n UBO_PARAM vec3 uDirectionalLightDirection[MAX_DIRECTION_LIGHT_COUNT];\n UBO_PARAM vec3 uDirectionalLightColor[MAX_DIRECTION_LIGHT_COUNT];\n UBO_PARAM vec4 uAmbientLightColor;\n UBO_PARAM vec4 uSunLightColor;\n UBO_PARAM vec3 uSunDirectionEC;\n UBO_PARAM vec3 uSkyColor;\n UBO_PARAM vec3 uGroundColor;\n UBO_PARAM float uSunLightON;\n UBO_PARAM int uPointLightCount;\n UBO_PARAM int uSpotLightCount;\n UBO_PARAM int uDirLightCount;\nUBO_DECL_END\n",Q$$="\nuniform sampler2D uNormalDepthTexture;\nfloat edgeDetection(float lineWidth)\n{\n vec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\n vec2 off = lineWidth / czm_globeDepthTextureDim.xy;\n vec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\n val_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\n vec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\n val_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\n vec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\n val_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\n vec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\n val_se.xyz = (val_se.xyz * 2.0) - 1.0;\n float discontinuity = 0.0;\n float dot0 = dot(val_nw.xyz, val_se.xyz);\n float dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nvec4 sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\n vec4 outputColor = inputColor;\n float discontinuity = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0, 1.0);\n if(uFillStyle == 1.)\n {\n outputColor = lineColor;\n outputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\n outputColor.a *= lineColor.a;\n }\n else\n {\n vec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\n outputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n }\n return outputColor;\n}\n",X$_="\nUBO_DECL_BEGIN(S3MVolume)\n UBO_PARAM float uVolSideBlockCount;\n UBO_PARAM float uVolBlockLength;\n UBO_PARAM float uVolTexLength;\n UBO_PARAM float uVolWidth;\n UBO_PARAM float uVolHeight;\n UBO_PARAM float uVolDepth;\n UBO_PARAM float uVolFilterMode;\n UBO_PARAM float uVolumeType;\nUBO_DECL_END\n",Y$R="\nstruct IncidentLight {\n vec3 direction;\n vec3 color;\n bool visible;\n};\n\nstruct GeometricContext {\n vec3 position;\n vec3 normal;\n vec3 viewDir;\n};\n\nstruct PhysicalMaterial {\n vec3\tdiffuseColor;\n float\troughness;\n vec3\tspecularColor;\n float specularF90;\n};\n\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n\n#define saturate(a) clamp( a, 0.0, 1.0 )\n\n#include <getNormalMatrix>\n#include <getEnvironmentColor>\n\n//参考UE4.24实现计算精确光源的衰减\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n if ( decayExponent > 0.0 ) {\n return pow( clamp( 1.0 - lightDistance / cutoffDistance, 0.0, 1.0 ), decayExponent );\n }\n return 1.0;\n}\n",Z$$="\n\n#include <cubeUV_reflection>\n#include <hemisphereLightDecl>\nvec3 inverseTransformDirection( in vec3 dir ) {\n mat3 fixedToENU = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n const mat3 yUpToZUp = mat3(1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n return normalize( yUpToZUp * fixedToENU * dir );\n}\n\n// void indirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n// reflectedLight.indirectDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n// }\n\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\n\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n vec3 Fr = specularColor;\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\n vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\n\nvoid indirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance;\n computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n vec3 totalScattering = singleScattering + multiScattering;\n vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n reflectedLight.indirectSpecular += radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#ifdef IBL\nvec3 getIBLIrradiance( const in vec3 normal ) {\n vec3 worldNormal = inverseTransformDirection( normal );\n vec4 envMapColor = textureCubeUV( czm_hdrEnvMap, worldNormal, 1.0 );\n return envMapColor.rgb;\n}\n\nvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n vec3 reflectVec = reflect( - viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n reflectVec = inverseTransformDirection( reflectVec );\n vec4 envMapColor = textureCubeUV( czm_hdrEnvMap, reflectVec, roughness );\n return envMapColor.rgb;\n}\n#endif\n\nvoid getEnvironmentColor(GeometricContext geometry, PhysicalMaterial material, inout ReflectedLight reflectedLight)\n{\n float roughness = material.roughness;\n vec3 posEC = geometry.position;\n vec3 n = geometry.normal;\n vec3 v = geometry.viewDir;\n\n vec3 irradiance = vec3(0.0);\n vec3 radiance = vec3(0.0);\n\n#ifdef BRDF\n#ifdef IBL\n\n#ifdef KtxEnvMap\n mat3 fixedToENU = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n vec3 cubeDir = normalize( yUpToZUp * fixedToENU * reflect(-v, n) );\n vec3 worldNormal = normalize( yUpToZUp * fixedToENU * n );\n irradiance = czm_sphericalHarmonics(worldNormal, uSphericalHarmonicCoefficients);\n radiance = czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, uSpecularEnvironmentMapSize, cubeDir, roughness * uSpecularEnvironmentMapsMaximumLOD, uSpecularEnvironmentMapsMaximumLOD);\n#else\n irradiance += getIBLIrradiance( geometry.normal );\n radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n#endif\n \n#else\n vec3 positionWC = vec3(uInverseView * vec4(posEC, 1.0)) + uRelativeOrigin;\n vec3 r = normalize(uInverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(uTemeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(uInverseViewRotation * uSunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(uInverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float sunNdotL = clamp(dot(n, uSunDirectionEC), 0.001, 1.0);\n float gamma = acos(sunNdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n luminance = luminance * uSunLightON + (1.0 - uSunLightON);\n irradiance = diffuseIrradiance * luminance;\n radiance = specularIrradiance * luminance;\n#endif\n irradiance *= uEnvMapIntensity;\n radiance *= uEnvMapIntensity;\n#else\n irradiance = uAmbientLightColor.rgb * 0.6;\n#endif\n\n#ifdef HAS_HEMISPHERE_LIGHTS\n HemisphereLight hemiLight;\n hemiLight.skyColor = uSkyColor;\n hemiLight.groundColor = uGroundColor;\n hemiLight.direction = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\n irradiance += getHemisphereLightIrradiance( hemiLight, geometry );\n#endif\n\n indirectSpecular_Physical(radiance, irradiance, geometry, material, reflectedLight);\n\n}\n\n",$$10="\n#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nvarying vec3 v_logPositionEC;\n#endif\n#endif\n\nvec4 updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n\n#ifdef SHADOW_MAP\n vec3 logPositionEC = (uInverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n#endif\n coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\n\n return coords;\n}\n\nvoid vertexLogDepth() {\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0 - uCurrentFrustum.x + gl_Position.w;\n gl_Position = updatePositionDepth(gl_Position);\n#endif\n}\n",oo="\n#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#endif\n\nvoid writeLogDepth(float depth)\n{\n#ifdef LOG_DEPTH\n#if defined(GL_EXT_frag_depth) || defined(WEBGL2)\n if (depth <= 0.9999999 || depth > uFarDepthFromNearPlusOne) {\n discard;\n }\n#ifdef POLYGON_OFFSET\n float factor = uPolygonOffset.z;\n float units = uPolygonOffset.w;\n\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n float x = dFdx(depth);\n float y = dFdy(depth);\n float m = sqrt(x * x + y * y);\n depth += m * factor;\n#endif\n\n#endif\n\n gl_FragDepthEXT = log2(depth) * uOneOverLog2FarDepthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\n gl_FragDepthEXT += czm_epsilon7 * units;\n#endif\n\n#endif\n#endif\n}\n\n",ro$1="\n#ifndef BRDF\nconst float shininess2 = 30.0;\nconst vec3 specular = vec3(0.066666);\n\nfloat getRoughness(vec2 oriTexCoord){\n return 1.0;\n}\n\nvec4 blinnPhong(in vec4 baseColorWithAlpha, vec2 texCoord, vec2 oriTexCoord, vec3 posEC, vec3 posMC, vec3 vertexNormalEC, mat4 modelMatrix)\n{\n float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n mat3 normalMatrix = getNormalMatrix(uView, modelMatrix);\n vec3 normalEC = normalize(vertexNormalEC);\n #ifndef HAS_NORMAL\n normalEC = normalize(normalMatrix * czm_computeNormal(posMC.xyz));\n #endif\n normalEC = normalEC * faceDirection;\n\n vec3 totalDiffuseLight = vec3(0.0);\n vec3 totalSpecularLight = vec3(0.0);\n float sunLightDiffuseWeight = max( dot( normalEC, uSunDirectionEC ), 0.0 );\n totalDiffuseLight = uSunLightColor.rgb * sunLightDiffuseWeight * uSunLightON;\n vec3 positionToEyeECDir = -normalize(posEC);\n\n #ifdef HAS_DIR_LIGHTS\n for ( int i = 0; i < uDirLightCount; i ++ )\n {\n vec3 dirVectorEC = normalize((uView * vec4(uDirectionalLightDirection[ i ], 0.0)).xyz);\n float dotProduct = dot( normalEC, dirVectorEC );\n float dirDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += uDirectionalLightColor[ i ] * dirDiffuseWeight;\n }\n #endif\n\n #ifdef HAS_POINT_LIGHTS\n for ( int i = 0; i < uPointLightCount; i ++ )\n {\n vec3 lVector = uPointLightPositionEC[i] - posEC;\n float lengthToLight = length( lVector );\n float cutoffDis = uPointLightDistanceAndDecay[i].x;\n if(lengthToLight > cutoffDis)\n {\n continue;\n }\n float attenuation = punctualLightIntensityToIrradianceFactor( lengthToLight, cutoffDis, uPointLightDistanceAndDecay[i].y);\n lVector = normalize( lVector );\n float dotProduct = dot( normalEC, lVector );\n float pointLightDiffuse = max( dotProduct, 0.0 );\n totalDiffuseLight += uPointLightColor[i] * pointLightDiffuse * attenuation;\n vec3 pointHalfVector = normalize( lVector + positionToEyeECDir );\n float pointDotNormalHalf = max( dot( normalEC, pointHalfVector ), 0.0 );\n float pointSpecularWeight = max( pow( pointDotNormalHalf, shininess2 ), 0.0 );\n float specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, pointHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * uPointLightColor[ i ] * pointSpecularWeight * pointLightDiffuse * attenuation * specularNormalization;\n }\n #endif\n\n #ifdef HAS_SPOT_LIGHTS\n vec3 positionWC = (czm_model * vec4(posMC, 1.0)).xyz;\n for ( int i = 0; i < uSpotLightCount; i ++ )\n {\n vec3 lVector = uSpotLightPositionEC[i] - posEC;\n float attenuation = punctualLightIntensityToIrradianceFactor( length( lVector ), uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\n lVector = normalize( lVector );\n float spotEffect = dot( lVector, uSpotLightDirectionEC[ i ] );\n if ( spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z ) {\n spotEffect = max( pow( max( spotEffect, 0.0 ), uSpotLightColorAndExponent[ i ].w ), 0.0 );\n float dotProduct = dot( normalEC, lVector );\n float spotDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += uSpotLightColorAndExponent[ i ].rgb * spotDiffuseWeight * attenuation * spotEffect;\n vec3 spotHalfVector = normalize( lVector + positionToEyeECDir );\n float spotDotNormalHalf = max( dot( normalEC, spotHalfVector ), 0.0 );\n float spotSpecularWeight = max( pow( spotDotNormalHalf, shininess2 ), 0.0 );\n float specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * uSpotLightColorAndExponent[ i ].rgb * spotSpecularWeight * spotDiffuseWeight * attenuation * specularNormalization * spotEffect;\n }\n }\n #endif\n\n vec3 diffuseColor = uDiffuseColor.rgb * baseColorWithAlpha.rgb;\n\n PhysicalMaterial material;\n material.diffuseColor = diffuseColor;\n material.roughness = 1.0;\n float metalness = 0.0;\n vec3 f0 = vec3(0.04);\n material.specularColor = mix(f0, baseColorWithAlpha.rgb, metalness);;\n material.specularF90 = 1.0;\n \n GeometricContext geometry;\n geometry.position = posEC;\n geometry.normal = normalEC;\n geometry.viewDir = positionToEyeECDir;\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += totalDiffuseLight * diffuseColor;\n reflectedLight.directSpecular += totalSpecularLight * uSpecularColor.rgb;\n \n getEnvironmentColor(geometry, material, reflectedLight);\n\n float shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), normalEC, -posEC.z);\n#endif\n\n vec3 color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n return vec4(LINEARtoSRGB(color.rgb), baseColorWithAlpha.a);\n}\n#endif\n",eo="\n#ifdef TexCoord\n varying vec4 vTexCoord;\n varying vec2 vTexCoordZ;\n#endif\n\n#ifdef MULTI_TEX\n varying vec4 vTexMatrix2;\n#endif\n\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef TextureBatch\n varying vec4 vTexTran;\n varying vec4 vTexScale;\n varying vec4 vTexSize;\n varying vec2 vMaxMipLevel;\n#else\n varying vec4 vTexMatrix;\n varying vec2 vIsRGBA;\n#endif\n\n#include <calculateMipLevel>\n\n#ifdef TextureBatch\n\nvec2 getBatchUV(vec2 uv, vec2 translate, vec2 scale, vec2 dim, float mipLevel)\n{\n float temp;\n vec2 texTranslate = vec2(translate.x, translate.y);\t\n\tif(mipLevel > 0.0)\n\t{\n\t\ttexTranslate.x = translate.x + scale.x;\n\t\ttemp = pow(2.0, mipLevel - 1.0);\n\t\ttexTranslate.y = translate.y + scale.y * (temp - 1.0) / temp;\n\t}\n float texScale = 1.0 / pow(2.0, mipLevel);\n\tvec2 outUV = fract(uv);\n\tfloat offsetX = pow(2.0, mipLevel) / dim.x;\n\tfloat offsetY = pow(2.0, mipLevel) / dim.y;\n\toutUV.x = clamp(outUV.x, 0.0 + offsetX, 1.0 - offsetX);\n\toutUV.y = clamp(outUV.y, 0.0 + offsetY, 1.0 - offsetY);\n\toutUV.x = outUV.x * texScale * scale.x + texTranslate.x;\n\toutUV.y = outUV.y * texScale * scale.y + texTranslate.y;\n\treturn outUV;\n}\n\n#else\n\nvec2 getUV(vec2 uv, vec2 translate, vec4 uvOffset, float scale, float width, float mipLevel, float texCoordZ) \n{\n vec2 texCoord;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n float offset = pow(2.0, mipLevel) / width;\n texCoord = clamp(texCoord, offset, 1.0 - offset);\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n texCoord = texCoord * uvOffset.zw + uvOffset.xy;\n return texCoord;\n}\n\n#endif\n\n#endif\n";const mo$1={rainDecl:o$1a,snowDecl:r$14,hemisphereLightDecl:e$1R,pointLightDecl:m$_,spotLightDecl:t$Z,directionLightDecl:i$Y,lightSourceImpl:p$10,brdf:l$17,executeServerExcavationDecl:f$Y,cubeUV_reflection:c$13,shadowReceive:a$X,shadowVisibility:n$_,globeOcean:D$Z,globeAnalysis:h$12,SRGBtoLINEAR:s$V,SceneUboDecl:x$16,LayerUboDecl:d$1h,MaterialUboDecl:b$1d,MeshUboDecl:u$T,writeFragDepth:L$16,renderNormal:g$15,renderNormalAndDepth:S$T,renderPrePass:U$12,calculateMipLevel:V$W,getTextureColorDecl:y$W,preClipFS:M$16,S3MOperationFSDecl:v$R,S3MVertexFactory:C$16,getUVMatrixDecl:E$18,getVertexByFlatten:P$12,getFusionModePosition:w$W,setAlphaByWValue:F$13,getPBRParamFromTexture:A$1b,s3mComputeVaryings:B$Z,computeWValue:R$Z,HypSometric:T$11,calculatePolyTexCoord:N$W,executeExcavation:I$1i,splitClip:W$10,getEmissiveTextureAtlasColor:k$Z,adjustColor:O$N,clip:_$X,getVolumeValue:j$16,WaterLayerUboDecl:G$1c,RegionEffectUboDecl:q$15,PolylineEffectUboDecl:H$10,getNormalMatrix:z$X,ShadowUboDecl:J$X,LightUboDecl:K$U,sketchMode:Q$$,S3MVolumeUboDecl:X$_,vertexLogDepthDecl:$$10,writeLogDepthDecl:oo,getEnvironmentColor:Z$$,shaderModelBase:Y$R,blinnPhong:ro$1,calcTexCoordDecl:eo};var preClipFS="\n#include <calculatePolyTexCoord>\n#include <executeExcavation>\n#include <splitClip>\nfn preClip()\n{\n#ifdef RASTER_CULL\n czm_rasterCull();\n#endif\n#ifdef SQCLIP\n czm_spatialQueryClip();\n#endif\n#ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, Layer.uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(executeExcavation())\n {\n discard;\n }\n#endif\n}\n",writeFragDepth="\ngl_FragDepth = gl_FragCoord.z;\n",renderNormal="\n#ifdef NORMAL\nfn renderNormal(posMC : vec3<f32>) -> vec4<f32>\n{\n var normalMC : vec3<f32> = normalize(czm_computeNormal(posMC));\n normalMC = normalMC * 0.5 + vec3<f32>(0.5);\n #include <writeFragDepth>\n return vec4<f32>(normalMC, 1.0);\n}\n#endif\n",renderNormalAndDepth="\n#ifdef NORMAL_AND_DEPTH\nvarying oriVertex : vec4<f32>;\nvarying perVertexNormals : vec3<f32>;\nfn renderNormalAndDepth(posMC : vec3<f32>) -> vec4<f32>\n{\n var normal = normalize(perVertexNormals);\n var modelView = Scene.uView * Mesh.uModelMatrix;\n var modelViewMat = mat3x3<f32>(modelView[0][0], modelView[1][0], modelView[2][0], modelView[0][1], modelView[1][1], modelView[2][1], modelView[0][2], modelView[1][2], modelView[2][2]);\n var shaderNormal = vec3<f32>(modelViewMat * czm_computeNormal(posMC.xyz));\n var dLength = length(perVertexNormals);\n if(dLength <= 0.9)\n {\n normal = shaderNormal;\n }\n normal = (normal + 1.0) * 0.5;\n #include <writeFragDepth>\n return vec4<f32>(normal, 1.0);\n}\n#endif\n",renderPrePass="\nvar normalEC = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(vPositionMC.xyz));\n// 相机坐标系坐标\ngl_FragData0 = vec4<f32>(v_positionEC, 1.0);\n// 相机坐标系法线\ngl_FragData1 = vec4<f32>(normalEC, 1.0);\n// 反射率\ngl_FragData2 = vec4<f32>(0.5, 0.5, 0.5, 1.0);\n",calculateMipLevel="\nfn calculateMipLevel(inTexCoord : vec2<f32>, vecTile : vec2<f32>, fMaxMip : f32, outMipLevel : ptr<function, f32>) {\n\tvar dx = dpdx((inTexCoord * vecTile.x));\n\tvar dy = dpdy((inTexCoord * vecTile.y));\n\tvar dotX = dot(dx, dx);\n\tvar dotY = dot(dy, dy);\n\tvar dMax = max(dotX, dotY);\n\tvar dMin = min(dotX, dotY);\n\tvar offset = ((dMax - dMin) / (dMax + dMin));\n\toffset = clamp(offset, 0.0f, 1.0f);\n\tvar d = ((dMax * (1.0f - offset)) + (dMin * offset));\n\tvar mipLevel = (0.5f * log2(d));\n\tmipLevel = clamp(mipLevel, 0.0f, (fMaxMip - 1.620000005f));\n\t(*outMipLevel) = mipLevel;\n\treturn;\n }\n \n",getTextureColorDecl="\n#ifdef Has_Texture\n var uTexture : texture_2d<f32>;\n var uTextureSampler : sampler;\n\n#ifdef MULTI_TEX\n var uSecTexture : texture_2d<f32>;\n var uSecTextureSampler : sampler;\n#endif\n#ifndef NO_TEXCOORD\nstruct TextureParam {\n uv : vec2<f32>,\n dim : vec2<f32>,\n translate : vec2<f32>,\n scale : vec2<f32>,\n uvOffset : vec4<f32>,\n maxMipmapLevel : f32,\n texCoordZ : f32,\n isRGBA : f32,\n}\nfn sampleLod(uv : vec2<f32>, mipLevel : f32, bUseFirstTexture : bool) -> vec4<f32> {\n var color = vec4<f32>(1.0f, 1.0f, 1.0f, 1.0f);\n if (bUseFirstTexture) {\n color = textureSampleLevel(uTexture, uTextureSampler, uv, mipLevel);\n }\n else\n {\n#ifdef MULTI_TEX\n color = textureSampleLevel(uSecTexture, uSecTextureSampler, uv, mipLevel);\n#endif\n }\n color = sRGBToLinear(color);\n return color;\n}\n\n #ifdef TextureBatch\n fn getBatchTextureColor(textureParam : TextureParam, bUseFirstTexture : bool) -> vec4<f32>\n {\n var uv = textureParam.uv;\n var dim = textureParam.dim;\n var translate = textureParam.translate;\n var scale = textureParam.scale;\n var uvOffset = textureParam.uvOffset;\n var maxMipmapLevel = textureParam.maxMipmapLevel;\n var mipLevel = 0.0;\n calculateMipLevel(uv, dim, maxMipmapLevel, &mipLevel);\n if(maxMipmapLevel < 0.0)\n {\n return vec4(1.0);\n }\n var texCoord = getBatchUV(uv, translate, scale, dim, ceil(mipLevel));\n var colorCeil = sampleLod(texCoord, 0.0, bUseFirstTexture);\n texCoord = getBatchUV(uv, translate, scale, dim, floor(mipLevel));\n var colorFloor = sampleLod(texCoord, 0.0, bUseFirstTexture);\n return colorCeil * 0.5 + colorFloor * 0.5;\n }\n #else\n fn getTextureColor(textureParam : TextureParam, outTexCoord : ptr<function, vec2<f32>>, bUseFirstTexture : bool) -> vec4<f32> {\n var dim = textureParam.dim;\n var maxMipmapLevel = textureParam.maxMipmapLevel;\n var mipLevel = 0.0f;\n calculateMipLevel(textureParam.uv, dim, maxMipmapLevel, &(mipLevel));\n *(outTexCoord) = getUV(textureParam.uv, textureParam.translate, textureParam.uvOffset, textureParam.scale.x, dim.x, mipLevel, textureParam.texCoordZ);\n var color = sampleLod(*(outTexCoord), mipLevel, bUseFirstTexture);\n return color;\n }\n #endif\n // end TextureBatch\n\n#endif\n\nfn SRGBtoLINEAR4(srgbIn : vec4<f32>) -> vec4<f32>\n{\n var linearOut = pow(srgbIn.rgb, vec3<f32>(2.2));\n return vec4<f32>(linearOut, srgbIn.a);\n}\n\nfn getTextureColorForS3M(outTexCoord : ptr<function, vec4<f32>>, firstColor : ptr<function, vec4<f32>>, secColor : ptr<function, vec4<f32>>) -> vec4<f32> {\n #ifdef INVALID_OBLIQUE\n return vec4<f32>(0.5, 0.5, 0.5, 1.0);\n #endif\n #ifdef NO_TEXCOORD\n return SRGBtoLINEAR4(textureSample(uTexture, uTextureSampler, vec2<f32>(0.5)));\n #endif\n #ifndef NO_TEXCOORD\n var textureParam : TextureParam;\n textureParam.uv = vec2<f32>(vTexCoord.x, vTexCoord.y);\n #ifdef TextureBatch\n textureParam.dim = vTexSize.xy;\n textureParam.translate = vTexTran.xy;\n textureParam.scale = vTexScale.xy;\n textureParam.uvOffset = Material.uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.x;\n *(firstColor) = getBatchTextureColor(textureParam, true);\n #else\n var texWidth : f32;\n texWidth = (vTexMatrix.z * Material.uTextureWidths.x); \n textureParam.dim = vec2<f32>(texWidth, texWidth); \n textureParam.translate = vec2<f32>(vTexMatrix.x, vTexMatrix.y); \n textureParam.scale = vec2<f32>(vTexMatrix.z, vTexMatrix.z); \n textureParam.uvOffset = Material.uTexUVOffset; \n textureParam.maxMipmapLevel = vTexMatrix.w; \n textureParam.texCoordZ = vTexCoordZ.x;\n var param_42 = vec2<f32>((*(outTexCoord)).x, (*(outTexCoord)).y); \n *(firstColor) = getTextureColor(textureParam, &(param_42), true);\n (*outTexCoord).x = param_42.x;\n (*outTexCoord).y = param_42.y;\n #endif\n\n #ifdef MULTI_TEX\n textureParam.uv = vTexCoord.zw;\n #ifdef TextureBatch\n textureParam.dim = vTexSize.zw;\n textureParam.translate = vTexTran.zw;\n textureParam.scale = vTexScale.zw;\n textureParam.uvOffset = Material.uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.y;\n *(secColor) = getBatchTextureColor(textureParam, false);\n #else\n texWidth = vTexMatrix2.z * Material.uTextureWidths.y;\n textureParam.dim = vec2(texWidth, texWidth);\n textureParam.translate = vTexMatrix2.xy;\n textureParam.scale = vec2(vTexMatrix2.z, vTexMatrix2.z);\n textureParam.uvOffset = Material.uTexUVOffset;\n textureParam.maxMipmapLevel = vTexMatrix2.w;\n textureParam.texCoordZ = vTexCoordZ.y;\n param_42 = vec2<f32>((*(outTexCoord)).z, (*(outTexCoord)).w); \n *(secColor) = getTextureColor(textureParam, &(param_42), false);\n #endif\n return *(firstColor) * (*(secColor));\n #else\n return *(firstColor);\n #endif\n #endif\n}\n#endif\n",rainDecl="\n#ifdef HAS_RAIN\nvar uRippleTexture : texture_2d<f32>;\nvar uRippleTextureSampler : sampler;\n \nfn getTimeInfo(animationSpeed : f32, timeVec : ptr<function, vec2<f32>>)\n{\n\tvar time = Scene.uFrameNumber * animationSpeed;\n\ttime = floor(30.0 * time);\n\tvar time_diff = floor(time*0.25);\n\t//time = mod(time, 4.0);\n\ttime = (time - (4.0 * floor(time / 4.0)));\n\t//time_diff = mod(time_diff, 4.0);\n\ttime_diff = (time_diff - (4.0 * floor(time_diff / 4.0)));\n\t(*timeVec) = vec2<f32>(time, time_diff);\n}\n\nfn getPosInfo(posMC : vec4<f32>, posMC_frac1 : ptr<function, vec2<f32>>, posMC_frac2 : ptr<function, vec2<f32>>)\n{\n\tvar ripple_scale = 1.0 / Layer.uRippleScale;\n\tvar posXY = posMC.xy * ripple_scale;\n\t(*posMC_frac1) = fract(posXY);\n\tvar posStep = vec2<f32>(0.5);\n\t(*posMC_frac2) = fract(posXY + posStep);\n}\n\nfn getAlpha(posMC_frac1 : vec2<f32>) -> f32\n{\n\tvar dist = (posMC_frac1 - vec2<f32>(0.5)) * 2.0;\n\tdist = vec2<f32>(abs(dist.x), abs(dist.y));\n\tvar result = pow(dist, vec2<f32>(5.0));\n\treturn result.x + result.y;\n}\n\nfn getRippleValue(timeVec : vec2<f32>, posMC_frac1 : vec2<f32>, posMC_frac2 : vec2<f32>, alpha : f32) -> vec4<f32>\n{\n\tvar rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n\tvar rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n\tvar rippleValue_1 = textureSample(uRippleTexture, uRippleTextureSampler, rippleUV_1.xy);\n\tvar rippleValue_2 = textureSample(uRippleTexture, uRippleTextureSampler, rippleUV_2.xy);\n\treturn mix(rippleValue_1, rippleValue_2, alpha);\n}\n\nfn getRippleNormal(rippleValue : vec4<f32>, wind_intensity : f32, rain : f32, depthFade : f32) -> vec3<f32>\n{\n\tvar rippleValueXY = rippleValue.xy;\n\tvar rippleValueZW = rippleValue.zw;\n\tvar _value = vec2<f32>(0.5);\n\tvar part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n\tvar part_2 = (rippleValueXY - _value) * 0.6;\n\tvar mergedValue = mix(part_1, part_2, rain) * depthFade;\n\treturn vec3<f32>(mergedValue, 1.0);\n}\n\nfn getNormalAlpha(normalWS : vec3<f32>, wetness : f32) -> f32\n{\n\tvar valueZ = normalWS.z - 0.5;\n\tvar wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n\treturn pow(wet_correction, 15.0);\n}\n\nfn rippleNormalCorrection(rippleNormal : vec3<f32>, normalAlpha : f32) -> vec3<f32>\n{\n\tvar blueNormal = vec3<f32>(0.0, 0.0, 1.0);\n\treturn mix(blueNormal, rippleNormal, normalAlpha);\n}\n\nfn rippleGenerator(animationSpeed : f32,normalWS : vec3<f32>, wetness : f32) -> vec3<f32>\n{\n\tvar timeVec = vec2<f32>(1.0);\n\tgetTimeInfo(animationSpeed, &timeVec);\n\tvar posMC_frac1 = vec2(1.0);\n\tvar posMC_frac2 = vec2(1.0);\n\tgetPosInfo(vPositionMC, &posMC_frac1, &posMC_frac2);\n\tvar alpha = getAlpha(posMC_frac1);\n\tvar rippleValue = getRippleValue(timeVec, posMC_frac1, posMC_frac2, alpha);\n\tvar rippleNormal = getRippleNormal(rippleValue, Layer.uWindIntensity, Layer.uRain, Layer.uCameraDepth);\n\tvar normalAlpha = getNormalAlpha(normalWS, wetness);\n\treturn normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\n#endif\n",snowDecl="\n#ifdef HAS_SNOW\n\nvar uSnowMaskTexture : texture_2d<f32>;\nvar uSnowMaskTextureSampler : sampler;\n\nvar uSnowNormalTexture : texture_2d<f32>;\nvar uSnowNormalTextureSampler : sampler;\n\n// fn getSnowMaskValue(sampler2D uSnowMaskTexture, vec2 snowUV) -> vec3<f32>\n// {\n// \treturn textureSample(uSnowMaskTexture, uSnowMaskTextureSampler, snowUV).rgb;\n// }\n\nfn getSnowCoverage(snow_coverage : f32, max_snow_coverage : f32, normalWS : vec3<f32>, z_mask : f32) -> f32\n{\n\tvar normal_z = normalWS.z;\n\tnormal_z += 1.1 + z_mask;\n\tnormal_z = clamp(normal_z * 0.5, 0.0, 1.0);\n\tvar final_snow_coverage = clamp(snow_coverage, 0.0, max_snow_coverage);\n\tfinal_snow_coverage = clamp(final_snow_coverage*normal_z, 0.0, 1.0);\n\treturn final_snow_coverage;\n}\n\nfn getSnowCoverageWithMaskTexture(finalSnowCoverage : f32, heightValue : f32, snow_scatter_value : f32, snow_scatter_alpha : f32, tighten_value : f32) -> f32\n{\n\tvar scatter_value = mix(heightValue, snow_scatter_value, snow_scatter_alpha);\n\treturn clamp((tighten_value + 1.0) * finalSnowCoverage - tighten_value * scatter_value, 0.0, 1.0);\n}\n\nfn getSnowAlpha(normalWS : vec3<f32>, snow_coverage : f32, z_mask : f32) -> f32\n{\n\treturn clamp((normalWS.z + z_mask) * 5.0, 0.0, 1.0) * snow_coverage;\n}\n\nfn getFinalBaseColor(baseColor : vec3<f32>, snow_baseColor : vec3<f32>, snowAlpha : f32) -> vec3<f32>\n{\n\treturn mix(baseColor, snow_baseColor, snowAlpha);\n}\n\nfn getFinalRoughness(roughness : f32, snow_roughness : f32, snowAlpha : f32) -> f32\n{\n\treturn mix(roughness, snow_roughness, snowAlpha);\n}\n\nfn getFinalNormal(normalWS : vec3<f32>, snowNormal : vec3<f32>, blendNormalValue : f32, snow_coverage : f32) -> vec3<f32>\n{\n\tvar snowNormal_part2 = vec3<f32>(snowNormal.xy - vec2<f32>(0.5), 1.0);\n\tvar normal_alpha = (1.0 - blendNormalValue)* snow_coverage;\n\treturn mix(normalWS, snowNormal_part2, normal_alpha);\n}\n\nfn snowGenerator(snowUV : vec2<f32>, snow_coverage : f32, normalWS : ptr<function, vec3<f32>>, baseColor : ptr<function, vec3<f32>>, roughness : ptr<function, f32>)\n{\n\tvar snowMaskValue = textureSample(uSnowMaskTexture, uSnowMaskTextureSampler, snowUV).rgb;\n\tvar max_snow_coverage = 1.0;\n\tvar z_mask = 0.0;\n\tvar snowCoverage = getSnowCoverage(snow_coverage, max_snow_coverage, (*normalWS), z_mask);\n\tvar heightValue = 0.5;\n\tvar snow_scatter_value = snowMaskValue.g;\n\tvar snow_scatter_alpha = 0.5;\n\tvar tighten_value = 4.0;\n snowCoverage = getSnowCoverageWithMaskTexture(snowCoverage, heightValue, snow_scatter_value, snow_scatter_alpha, tighten_value);\n\tvar snow_alpha = getSnowAlpha((*normalWS), snowCoverage, z_mask);\n\t(*baseColor) = getFinalBaseColor((*baseColor), vec3(snowMaskValue.r), snow_alpha);\n\t(*roughness) = getFinalRoughness((*roughness), snowMaskValue.b, snow_alpha);\n\tvar snowNormalValue = textureSample(uSnowNormalTexture, uSnowNormalTextureSampler, snowUV).rgb;\n\tvar blendNormalValue = 0.3;\n\t(*normalWS) = getFinalNormal((*normalWS), snowNormalValue, blendNormalValue, snowCoverage);\n}\n\n#endif\n",directionLightDecl="\n#ifdef HAS_DIR_LIGHTS\n#endif\n",hemisphereLightDecl="\n#ifdef HAS_HEMISPHERE_LIGHTS\n\nuniform uSkyColor : array<vec3<f32>, HEMISPHERE_LIGHTS>;\nuniform uGroundColor : array<vec3<f32>, HEMISPHERE_LIGHTS>;\nuniform uHemisphereLightDirectionEC : array<vec3<f32>, HEMISPHERE_LIGHTS>;\n \nstruct HemisphereLight {\n direction : vec3<f32>;\n skyColor : vec3<f32>;\n groundColor : vec3<f32>;\n};\n\nfn getHemisphereLightIrradiance(hemiLight : HemisphereLight, geometry : GeometricContext) -> vec3<f32>{\n var dotNL = dot( geometry.normal, hemiLight.direction );\n var hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n var irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n}\n\n#endif\n",pointLightDecl="\n#ifdef HAS_POINT_LIGHTS\nstruct PointLight {\n position : vec3<f32>,\n color : vec3<f32>,\n distance : f32,\n decay : f32\n};\n\nfn getPointDirectLightIrradiance(pointLight : PointLight, geometry : GeometricContext, directLight : ptr<function,IncidentLight>) {\n var lVector = pointLight.position - geometry.position;\n (*(directLight)).direction = normalize( lVector );\n var lightDistance = length( lVector );\n (*(directLight)).color = pointLight.color;\n (*(directLight)).color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n var color = (*directLight).color;\n if(lightDistance < pointLight.distance){\n (*(directLight)).visible = true;\n }\n else{\n (*(directLight)).visible = false;\n }\n}\n\n#endif\n",spotLightDecl="\n#ifdef HAS_SPOT_LIGHTS\nstruct SpotLight {\n position : vec3<f32>;\n direction : vec3<f32>;\n color : vec3<f32>;\n distance : f32;\n decay : f32;\n coneCos : f32;\n penumbraCos : f32;\n};\n\nfn getSpotDirectLightIrradiance( spotLight : SpotLight, geometry : GeometricContext, directLight : ptr<function, IncidentLight>) {\n var lVector = spotLight.position - geometry.position;\n (*(directLight)).direction = normalize( lVector );\n var lightDistance = length( lVector );\n var angleCos = dot( directLight.direction, spotLight.direction );\n if ( angleCos > spotLight.coneCos ) {\n var spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n (*(directLight)).color = spotLight.color;\n (*(directLight)).color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n (*(directLight)).visible = true;\n } else {\n (*(directLight)).color = vec3<f32>( 0.0 );\n (*(directLight)).visible = false;\n }\n}\n\n#endif\n",lightSourceImpl="\n\nvar i= 0;\n#ifdef HAS_DIR_LIGHTS\nfor (i = 0; i < Light.uDirLightCount; i++) {\n directLight.color = Light.uDirectionalLightColor[i];\n directLight.direction = Light.uDirectionalLightDirectionEC[i];\n directLight.visible = true;\n directPhysical( directLight, geometry, material, &reflectedLight );\n}\n#endif\n\n#ifdef HAS_POINT_LIGHTS\nvar pointLight : PointLight;\nfor (i = 0; i < Light.uPointLightCount; i++) {\n pointLight.position = Light.uPointLightPositionEC[i];\n pointLight.color = Light.uPointLightColor[i];\n pointLight.distance = Light.uPointLightDistanceAndDecay[i].x;\n pointLight.decay = Light.uPointLightDistanceAndDecay[i].y;\n getPointDirectLightIrradiance( pointLight, geometry, &directLight );\n if(!directLight.visible) {\n continue;\n }\n directPhysical( directLight, geometry, material, &reflectedLight );\n}\n#endif\n\n#ifdef HAS_SPOT_LIGHTS\nvar spotLight : SpotLight;\nfor (i = 0; i < Light.uSpotLightCount; i++) {\n spotLight.position = Light.uSpotLightPositionEC[i];\n spotLight.color = Light.uSpotLightColorAndExponent[i].rgb;\n spotLight.direction = Light.uSpotLightDirectionEC[i];\n spotLight.coneCos = Light.uSpotLightDistanceDecayCosPenumbra[i].z;\n spotLight.penumbraCos = Light.uSpotLightDistanceDecayCosPenumbra[i].w;\n getSpotDirectLightIrradiance( spotLight, geometry, &directLight );\n if(!directLight.visible) {\n continue;\n }\n directPhysical( directLight, geometry, material, &reflectedLight );\n}\n#endif\n",brdf="\n const RECIPROCAL_PI = 0.31830988618;\n const M_PI = 3.141592653589793;\n const EPSILON = 1e-6;\n\n fn pow2( x : f32 ) -> f32 { return x * x; }\n\n#ifdef HAS_BASE_TEXTURE\n var uBaseTexture : texture_2d<f32>;\n var uBaseTextureSampler : sampler;\n#endif\n\n#ifdef HAS_NORMAL_TEXTURE\n var uNormalTexture : texture_2d<f32>;\n var uNormalTextureSampler : sampler;\n#endif // HAS_NORMAL_TEXTURE\n\n#ifdef HAS_EMISSIVE_TEXTURE\n var uEmissionTexture : texture_2d<f32>;\n var uEmissionTextureSampler : sampler;\n#endif\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n var uMetallicRoughnessTexture : texture_2d<f32>;\n var uMetallicRoughnessTextureSampler : sampler;\n#endif // HAS_MetallicRoughness_TEXTURE\n\n#ifdef HAS_OCCLUSION_TEXTURE\n var uOcclusionTexture : texture_2d<f32>;\n var uOcclusionTextureSampler : sampler;\n#endif\n\n#ifdef HAS_WETNESS\n uniform float uWetnessFactor;\n#endif\n\n#include <directionLightDecl>\n#include <pointLightDecl>\n#include <spotLightDecl>\n#include <snowDecl>\n#include <rainDecl>\n\nfn lambertianDiffuse(diffuseColor : vec3<f32>) -> vec3<f32>\n{\n return diffuseColor * RECIPROCAL_PI;\n}\n\nfn applyTonemapping(inLinearIn : vec3<f32>) -> vec3<f32> \n{\n var linearIn = inLinearIn;\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\n\nfn F_Schlick(f0 : vec3<f32>, f90 : f32, dotVH : f32) -> vec3<f32>\n {\n var fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\n\n\nfn GeometrySchlickGGX(roughness : f32, NoV : f32)->f32\n{\n var k = pow(roughness + 1.0, 2.0) / 8.0;\n return NoV / (NoV * (1.0 - k) + k);\n}\n\nfn D_GGX( alpha : f32, dotNH : f32 ) ->f32\n{\n var a2 = pow2( alpha );\n var denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n\nfn BRDF_GGX(lightDir : vec3<f32>, viewDir : vec3<f32>, normal : vec3<f32>, f0 : vec3<f32>, f90 : f32, roughness : f32 ) -> vec3<f32>\n{\n var alpha = roughness * roughness;\n var halfDir = normalize( lightDir + viewDir );\n var dotNL = clamp( dot( normal, lightDir ), 0.001, 1.0 );\n var dotNV = abs( dot( normal, viewDir ) ) + 0.001;\n var dotNH = saturate( dot( normal, halfDir ) );\n var dotLH = saturate( dot( lightDir, halfDir ) );\n var dotVH = saturate( dot( viewDir, halfDir ) );\n var F = F_Schlick( f0, f90, dotVH );\n var G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n var D = D_GGX( alpha, dotNH );\n return F * ( G * D ) / (4.0 * dotNL * dotNV);\n}\n\nfn directPhysical(directLight : IncidentLight, geometry : GeometricContext, material : PhysicalMaterial, reflectedLight : ptr<function, ReflectedLight> )\n {\n var dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n var irradiance = dotNL * directLight.color;\n (*(reflectedLight)).directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n (*(reflectedLight)).directDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n}\n\n#ifdef HAS_NORMAL_TEXTURE\nfn perturbNormal2Arb( eye_pos : vec3<f32>, surf_norm : vec3<f32>, uv : vec2<f32>, mapN : vec3<f32>) -> vec3<f32>\n{\n var fNormalLength = length(mapN);\n var q0 = vec3<f32>( dpdx( eye_pos.x ), dpdx( eye_pos.y ), dpdx( eye_pos.z ) );\n var q1 = vec3<f32>( dpdy( eye_pos.x ), dpdy( eye_pos.y ), dpdy( eye_pos.z ) );\n var st0 = dpdx( uv.xy );\n var st1 = dpdy( uv.xy );\n if(fNormalLength < 0.5) {\n return surf_norm;\n }\n var scale = sign( st1.y * st0.x - st0.y * st1.x );\n var S = normalize( ( q0 * st1.y - q1 * st0.y ) * scale );\n var T = normalize( ( - q0 * st1.x + q1 * st0.x ) * scale );\n var N = normalize( surf_norm );\n var tsn = mat3x3<f32>( S, T, N );\n\n var tempN = mapN * 2.0 - 1.0;\n var flip = f32( gl_FrontFacing ) * 2.0 - 1.0;\n var normMapN = vec3(tempN.x * flip, tempN.y * flip, tempN.z);\n return normalize( tsn * normMapN );\n}\n#endif\n\nfn computeSpecularOcclusion(dotNV : f32, ambientOcclusion : f32, roughness : f32) -> f32\n{\n return saturate(pow(dotNV + ambientOcclusion, exp2(-16.0 * roughness - 1.0 )) - 1.0 + ambientOcclusion);\n}\n\n#ifdef HAS_RAIN\nfn adjustByWetness(baseColor : ptr<function, vec3<f32>>, roughness : ptr<function, f32>, normalWS_wetness : vec3<f32>) {\n var fWetness = clamp(Layer.uWetnessFactor,0.0,1.0);\n var fWetness_correction = pow(4.0*fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction,clamp(fWetness,0.0,0.9),1.0);\n var fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n (*baseColor) = mix((*baseColor),(*baseColor)*0.7,fWerness_normalized);\n (*roughness) = mix((*roughness),0.05,fWerness_normalized);\n}\n#endif\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n#ifdef USE_BatchPBR\n varying vMetallicRoughness : vec2<f32>;\n varying vEmissiveFactor : vec4<f32>;\n varying vAlphaCutoffAndModeAndDoubleSide : vec3<f32>;\n#endif\n\n#ifdef PBR_THEME\n uniform uPBRMaterials : mat4x4<f32>[NUM_PBR_MATERIALS];\n varying vPBRIndex : f32;\n#endif\n\nfn getRoughness(oriTexCoord : vec2<f32>) -> f32{\n var roughness = Material.uMetallicRoughnessIntensityScale.y;\n#ifdef USE_BatchPBR\n roughness = vMetallicRoughness.y;\n#endif // USE_BatchPBR\n roughness = clamp(roughness, 0.0, 1.0);\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n var metallicRoughness = textureSample(uMetallicRoughnessTexture, uMetallicRoughnessTextureSampler, oriTexCoord.xy).rgb;\n roughness = clamp(roughness * metallicRoughness.g, 0.04f, 1.0f);\n #ifdef HAS_RAIN\n adjustByWetness(vec3<f32>(1.0), roughness, vec3<f32>(0.0));\n #endif\n#endif // HAS_MetallicRoughness_TEXTURE\n return roughness;\n}\n\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\nfn getTexcoordAndMipmapLevel(uv : vec2<f32>, texMatrix : vec4<f32>, texCoordZ : f32) -> vec3<f32> {\n var translate = texMatrix.xy;\n var textureWidth = texMatrix.z * Material.uPbrParTextureWidth;\n var scale = texMatrix.z;\n var maxMipmapLevel = texMatrix.w;\n var mipLevel = 0.0;\n calculateMipLevel(uv, vec2(textureWidth), maxMipmapLevel, &mipLevel);\n var texCoord : vec2<f32>;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n var offset = pow(2.0, mipLevel) / textureWidth;\n texCoord = clamp(texCoord, vec2(offset), vec2(1.0 - offset));\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n return vec3<f32>(texCoord.xy, mipLevel);\n}\n#endif\n\nfn brdf(inBaseColorWithAlpha : vec4<f32>, texCoord : vec2<f32>, oriTexCoord : vec2<f32>, posEC : vec3<f32>, posMC : vec4<f32>, vertexNormalEC : vec3<f32>) ->vec4<f32> {\n var uv = oriTexCoord;\n var mipmapLevel = 0.0;\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\n var uvAndMiplevel = getTexcoordAndMipmapLevel(oriTexCoord, vTexMatrix, vTexCoordZ.x);\n uv = uvAndMiplevel.xy;\n mipmapLevel = uvAndMiplevel.z;\n #endif\n\n var baseColorWithAlpha = inBaseColorWithAlpha;\n#ifndef USE_BatchPBR\n baseColorWithAlpha = baseColorWithAlpha * Material.uBaseColorFactor;\n#endif\n\n var faceDirection : f32;\n if(gl_FrontFacing){\n faceDirection = 1.0;\n } \n else {\n faceDirection = -1.0;\n }\n\n var ng : vec3<f32> = normalize(vertexNormalEC);\n #ifndef HAS_NORMAL\n ng = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(posMC.xyz));\n #endif\n \n ng = ng * faceDirection;\n#ifdef HAS_BASE_TEXTURE\n #ifdef USE_BatchPBR\n baseColorWithAlpha *= sRGBToLinear(textureSampleLevel(uBaseTexture, uBaseTextureSampler, uv.xy, mipmapLevel));\n #else\n baseColorWithAlpha = textureSample(uBaseTexture, uBaseTextureSampler, oriTexCoord.xy);\n baseColorWithAlpha = sRGBToLinear(baseColorWithAlpha) * Material.uBaseColorFactor;\n #endif\n#endif\n#ifdef HAS_NORMAL_TEXTURE\n #ifdef USE_BatchPBR\n var mapN = textureSampleLevel(uNormalTexture, uNormalTextureSampler, uv.xy, mipmapLevel).xyz;\n #else\n var mapN = textureSample(uNormalTexture, uNormalTextureSampler, uv).xyz;\n #endif\n var n = ng;\n var oriNg = perturbNormal2Arb(posEC, ng, oriTexCoord, mapN);\n if(!(oriTexCoord.x == 0.0 && oriTexCoord.y == 0.0)){\n var n = oriNg;\n }\n#else\n var n = ng;\n#endif\n\n#ifdef HAS_WETNESS\n var fixedToENU_wetness = mat3x3<f32>(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n var normalWS_wetness = normalize(fixedToENU_wetness * n);\n#endif\n#ifdef HAS_RAIN\n var modelView = Scene.uView * Mesh.uModelMatrix;\n var fixedToENU_wetness = mat3x3<f32>(modelView[0][0], modelView[1][0], modelView[2][0], modelView[0][1], modelView[1][1], modelView[2][1], modelView[0][2], modelView[1][2], modelView[2][2]);\n var normalWS_wetness = normalize(fixedToENU_wetness * n);\n n = rippleGenerator(Layer.uAnimationSpeed,normalWS_wetness,Layer.uWetnessFactor);\n#endif\n\n var baseColor = baseColorWithAlpha.rgb;\n var roughness = Material.uMetallicRoughnessIntensityScale.y;\n var metalness = Material.uMetallicRoughnessIntensityScale.x;\n var emissiveFactor = Material.uEmissiveFactor;\n\n // TODO\n// #ifdef PBR_THEME\n// var pbrIndex = int(vPBRIndex);\n// if(vPBRIndex < 0.0f)\n// {\n// return baseColorWithAlpha;\n// }\n// var pbrPar = mat4x4<f32>(0.0f);\n// for(var i = 0;i < NUM_PBR_MATERIALS;i++)\n// {\n// if(i == pbrIndex)\n// {\n// pbrPar = uPBRMaterials[i];\n// break;\n// }\n// }\n// roughness = clamp(pbrPar[0][0], 0.04f, 1.0f);\n// metalness = clamp(pbrPar[0][1], 0.0f, 1.0f);\n// baseColor = (baseColorWithAlpha / Material.uBaseColorFactor * vec4<f32>(pbrPar[0][2], pbrPar[0][3], pbrPar[1][0], pbrPar[1][1])).rgb;\n// #endif // PBR_THEME\n\n#ifdef USE_BatchPBR\n metalness = vMetallicRoughness.x;\n roughness = vMetallicRoughness.y;\n emissiveFactor = vEmissiveFactor;\n#endif // USE_BatchPBR\n metalness = clamp(metalness, 0.0, 1.0);\n roughness = clamp(roughness, 0.04, 1.0);\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n#ifdef USE_BatchPBR\n var metallicRoughness = textureSampleLevel(uMetallicRoughnessTexture, uMetallicRoughnessTextureSampler, uv, mipmapLevel).rgb;\n#else\n var metallicRoughness = textureSample(uMetallicRoughnessTexture, uMetallicRoughnessTextureSampler, oriTexCoord.xy).rgb;\n#endif\n metalness = clamp(metallicRoughness.r, 0.0f, 1.0f);\n roughness = clamp(metallicRoughness.g, 0.04f, 1.0f);\n #ifdef HAS_RAIN\n adjustByWetness(&baseColor, &roughness, normalWS_wetness);\n #endif\n #ifdef HAS_SNOW\n var modelView = Scene.uView * Mesh.uModelMatrix;\n var fixedToENU_snow = mat3x3<f32>(modelView[0][0], modelView[1][0], modelView[2][0], modelView[0][1], modelView[1][1], modelView[2][1], modelView[0][2], modelView[1][2], modelView[2][2]);\n var normalWS_snow = normalize(fixedToENU_snow * n);\n snowGenerator(oriTexCoord,Layer.uSnowCoverageFactor,&normalWS_snow,&baseColor,&roughness);\n #endif\n#endif // HAS_MetallicRoughness_TEXTURE\n\n var lightColorHdr = vec3<f32>(2.0) * Light.uSunLightColor.rgb * Light.uSunLightON;\n var l = normalize(Light.uSunDirectionEC);\n var v = -normalize(posEC);\n var h = normalize(v + l);\n var f0 = vec3<f32>(0.04);\n var diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n var specularColor = mix(f0, baseColor, metalness);\n\n var alpha = roughness * roughness;\n var dotNL = clamp( dot( n, l ), 0.001, 1.0 );\n var dotNV = abs( dot( n, v ) ) + 0.001;\n var dotNH = saturate( dot( n, h ) );\n var dotLH = saturate( dot( l, h ) );\n var dotVH = saturate( dot( v, h ) );\n var reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n var f90 = clamp(reflectance * 25.0, 0.0, 1.0);\n var F = F_Schlick( specularColor, f90, dotVH );\n var G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n var D = D_GGX( alpha, dotNH );\n var diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n var specularContribution = F * G * D / (4.0 * dotNL * dotNV);\n\n var geometryNormal = ng;\n var material : PhysicalMaterial;\n material.diffuseColor = diffuseColor;\n material.roughness = max( roughness, 0.0525 );\n material.roughness = min( material.roughness, 1.0 );\n material.specularColor = specularColor;\n material.specularF90 = 1.0;\n\n var geometry : GeometricContext;\n geometry.position = posEC;\n geometry.normal = n;\n geometry.viewDir = v;\n var reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += dotNL * lightColorHdr * diffuseContribution;\n reflectedLight.directSpecular += dotNL * lightColorHdr * specularContribution;\n\n var directLight : IncidentLight; \n #include <lightSourceImpl>\n\n getEnvironmentColor(geometry, material, &reflectedLight);\n\n#ifdef HAS_OCCLUSION_TEXTURE\n #ifdef USE_BatchPBR\n var ambientOcclusion = textureSampleLevel(uOcclusionTexture, uOcclusionTextureSampler, uv, mipmapLevel).r;\n #else\n var ambientOcclusion = textureSample(uOcclusionTexture, uOcclusionTextureSampler, oriTexCoord.xy).r;\n #endif\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n#ifdef IBL\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n#endif\n#endif // HAS_OCCLUSION_TEXTURE\n\n var shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), n, -posEC.z);\n#endif\n\n var color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n\n#ifdef HAS_EMISSIVE_TEXTURE\n var emissiveTexCoord = uv * Material.uEmissiveUVOffsetAndTiling.zw + Material.uEmissiveUVOffsetAndTiling.xy;\n var emissive = sRGBToLinear_vf3(textureSample(uEmissionTexture, uEmissionTextureSampler, emissiveTexCoord).rgb);\n emissive *= emissiveFactor.rgb;\n color += emissive;\n#else\n color += emissiveFactor.rgb;\n#endif // HAS_EMISSIVE_TEXTURE\n\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n\n #ifdef MASK\n if (baseColorWithAlpha.a < Material.uAlphaCutoff)\n {\n discard;\n }\n#endif\n return vec4(color.rgb, baseColorWithAlpha.a);\n}",S3MVertexFactory="\n\n#ifdef COMPRESS_VERTEX\n #ifdef DRACO_Compress\n attribute aPosition : vec4<u32>;\n #else\n attribute aPosition : vec4<i32>;\n #endif\n#else\n attribute aPosition : vec4<f32>;\n#endif\n\n#ifdef HAS_NORMAL\n #ifdef COMPRESS_NORMAL \n #ifdef MeshOPT_Compress\n attribute aNormal : vec2<i32>;\n #else\n attribute aNormal : vec3<i32>;\n #endif\n #else\n attribute aNormal : vec3<f32>;\n #endif\n#endif\n\n#ifdef TexCoord\n #ifdef UINT_TEXCOORD0\n attribute aTexCoord0 : vec2<i32>;\n #else\n attribute aTexCoord0 : vec4<f32>;\n #endif\n#endif\n\n#ifdef TexCoord2\n #ifdef USE_BatchPBR\n attribute aTexCoord1 : vec2<f32>;\n #else\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n attribute aTexCoord1 : vec2<i32>;\n #else\n attribute aTexCoord1 : vec2<f32>;\n #endif\n #else\n attribute aTexCoord1 : vec4<f32>;\n #endif //COMPRESS_TEXCOORD\n #endif //USE_BatchPBR\n#endif\n\n#ifdef VertexColor\n attribute aColor : vec4<u32>;\n#endif\n\n#ifdef InstanceRenderBIM\n attribute uv2 : vec4<f32>;\n attribute uv3 : vec4<f32>;\n attribute uv4 : vec4<f32>;\n attribute secondary_colour : vec4<f32>;\n //attribute uv6 : vec4<u32>;\n#endif\n\n#ifdef InstanceRenderPipeline\n attribute uv1 : vec4<f32>;\n attribute uv2 : vec4<f32>;\n attribute uv3 : vec4<f32>;\n attribute uv4 : vec4<f32>;\n attribute uv5 : vec4<f32>;\n attribute uv6 : vec4<f32>;\n attribute uv7 : vec4<f32>;\n // 新版本的管线\n #ifdef InstanceS3MB\n attribute secondary_colour : vec4<u32>;\n attribute uv9 : vec4<u32>;\n #else\n attribute secondary_colour : vec4<f32>;\n attribute uv9 : vec4<f32>;\n #endif\n#endif\n\n#ifdef BatchTable\n #ifdef Instance\n #ifdef InstanceModel\n attribute batchId : f32;\n #endif\n attribute instanceId : f32;\n #else\n attribute batchId : f32;\n #endif\n#endif // BatchTable\n\n#ifdef UseInstanceSkeletonMatrix\n //uniform uSkeletonMatrix : mat4x4<f32>;\n#endif\n\nstruct VertexFactoryIntermediates {\n position : vec4<f32>,\n vertexColor : vec4<f32>,\n secondColor : vec4<f32>,\n normal : vec3<f32>,\n normalInstance : vec3<f32>,\n uv0 : vec4<f32>,\n uv1 : vec4<f32>,\n batchTableID : f32,\n pbrTextureUV : vec2<f32>,\n }\n\nfn GetLocalPosition() -> vec4<f32>{\n#ifdef COMPRESS_VERTEX\n var iAPosition = vec4<f32>(aPosition);\n var vertexPos : vec4<f32>;\n vertexPos = Mesh.decode_position_min + vec4<f32>(iAPosition.xyz, 1.0f) * Mesh.decode_position_normConstant;\n#else\n var vertexPos = aPosition;\n#endif\n return vertexPos;\n}\n\nfn GetUV0() ->vec4<f32> {\n var result = vec4<f32>(0.0f);\n#ifdef TexCoord\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n var texCoord0 : vec2<f32>;\n texCoord0.x = f32(aTexCoord0.x) * f32(Mesh.decode_texCoord0_vNormConstant.x);\n texCoord0.y = f32(aTexCoord0.y) * f32(Mesh.decode_texCoord0_vNormConstant.y);\n result = vec4<f32>(vec2<f32>(Mesh.decode_texCoord0_min) + texCoord0.xy, 0.0f, 0.0f);\n #else\n result.xy = vec2<f32>(Mesh.decode_texCoord0_min.xy) + vec2<f32>(aTexCoord0.xy) * Mesh.decode_texCoord0_normConstant;\n #endif\n #else // COMPRESS_TEXCOORD\n result = aTexCoord0;\n #endif // COMPRESS_TEXCOORD\n \n #ifdef InstanceRenderPipeline\n var tex4Vec:vec4<f32>;\n if(aTexCoord0.y > 0.5) {\n tex4Vec = vec4<f32>(uv7.y, aTexCoord0.x, 0.0, 1.0);\n }\n else {\n tex4Vec = vec4<f32>(uv7.x, aTexCoord0.x, 0.0, 1.0);\n }\n result.x = tex4Vec.x;\n result.y = tex4Vec.y;\n #endif\n#endif // TexCoord\n\n return Material.uTexMatrix * result;\n}\nfn GetUV1() ->vec4<f32>{\n var result = vec4<f32>(0.0f);\n#ifdef TexCoord2\n #ifdef USE_BatchPBR\n result.x = aTexCoord1.x;\n result.y = aTexCoord1.y;\n #else\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n var texCoord1 :vec2<f32>;\n texCoord1.x = f32(aTexCoord1.x) * Mesh.decode_texCoord1_vNormConstant.x;\n texCoord1.y = f32(aTexCoord1.y) * Mesh.decode_texCoord1_vNormConstant.y;\n result = vec4<f32>(Mesh.decode_texCoord1_min + texCoord1.xy, 0.0f, 0.0f);\n #else\n result.x = Mesh.decode_texCoord1_min.x + aTexCoord1.x * Mesh.decode_texCoord1_normConstant.x;\n result.y = Mesh.decode_texCoord1_min.y + aTexCoord1.y * Mesh.decode_texCoord1_normConstant.y;\n #endif // MeshOPT_Compress\n #else\n result = aTexCoord1;\n #endif // COMPRESS_TEXCOORD\n #endif\n#endif // TexCoord2\n return result;\n}\nfn GetNormal() ->vec3<f32> {\n#ifdef HAS_NORMAL\n var realNormal : vec3<f32>;\n #ifdef COMPRESS_NORMAL\n var fANormal = vec2<f32>(aNormal.xy);\n #ifdef MeshOPT_Compress\n realNormal.x = fANormal.x / 127.0f;\n realNormal.y = fANormal.y / 127.0f;\n realNormal.z = 1.0f - abs(realNormal.x) - abs(realNormal.y);\n realNormal = normalize(realNormal);\n #else\n realNormal = czm_octDecode(fANormal.xy, Mesh.normal_rangeConstant).zxy;\n #endif // MeshOPT_Compress\n #else\n realNormal = aNormal;\n #endif // COMPRESS_NORMAL \n \n #ifdef InstanceRenderPipeline\n realNormal.x = realNormal.x * uv7.z;\n #endif\n return realNormal;\n#else\n return vec3<f32>(0.0f, 0.0f, 0.0f);\n#endif // HAS_NORMAL \n}\n\nfn GetVertexFactoryIntermediates() -> VertexFactoryIntermediates {\n var intermediates : VertexFactoryIntermediates;\n var vertexPos = GetLocalPosition();\n\n#ifdef UseInstanceSkeletonMatrix\n vertexPos = Mesh.uSkeletonMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n \n#ifdef InstanceRenderBIM\n var worldMatrix:mat4x4<f32>;\n worldMatrix[0] = uv2;\n worldMatrix[1] = uv3;\n worldMatrix[2] = uv4;\n worldMatrix[3] = vec4( 0, 0, 0, 1 );\n vertexPos = vec4(vertexPos.xyz, 1.0) * worldMatrix;\n#endif\n\n#ifdef InstanceRenderPipeline\n var worldMatrix:mat4x4<f32>;\n var worldMatrix0:mat4x4<f32>;\n var worldMatrix1:mat4x4<f32>;\n var worldPos0:vec4<f32>;\n var worldPos1:vec4<f32>;\n worldMatrix0[0] = uv1;\n worldMatrix0[1] = uv2;\n worldMatrix0[2] = uv3;\n worldMatrix0[3] = vec4<f32>( 0, 0, 0, 1 );\n worldMatrix1[0] = uv4;\n worldMatrix1[1] = uv5;\n worldMatrix1[2] = uv6;\n worldMatrix1[3] = vec4<f32>( 0, 0, 0, 1 );\n var realVertex = vec4<f32>(vertexPos.xyz, 1.0);\n realVertex.x = realVertex.x * uv7.z;\n worldPos0 = realVertex * worldMatrix0;\n worldPos1 = realVertex * worldMatrix1;\n #ifdef TexCoord\n if(aTexCoord0.y > 0.5) {\n vertexPos = worldPos1;\n worldMatrix = worldMatrix1;\n }\n else {\n vertexPos = worldPos0;\n worldMatrix = worldMatrix0;\n }\n #endif\n#endif\n\n intermediates.position = vertexPos;\n intermediates.normal = GetNormal();\n#ifdef Instance\n intermediates.normalInstance = intermediates.normal * mat3x3<f32>(worldMatrix[0].xyz,worldMatrix[1].xyz,worldMatrix[2].xyz);\n#endif\n intermediates.uv0 = GetUV0();\n intermediates.uv1 = GetUV1();\n \n#ifdef VertexColor\n var fColor = vec4<f32>(aColor);\n intermediates.vertexColor = vec4<f32>(fColor.r / 255.0f, fColor.g / 255.0f, fColor.b / 255.0f, fColor.a / 255.0f);\n#else\n intermediates.vertexColor = vec4<f32>(1.0);\n#endif\n\n#ifdef Instance\n #ifdef InstanceRenderPipeline\n #ifdef InstanceS3MB\n var fSecondary = vec4<f32>(secondary_colour);\n intermediates.vertexColor *= vec4<f32>(fSecondary.r / 255.0f, fSecondary.g / 255.0f, fSecondary.b / 255.0f, fSecondary.a / 255.0f);\n #else\n intermediates.vertexColor *= vec4<f32>(secondary_colour);\n #endif\n #else\n intermediates.vertexColor *= vec4<f32>(secondary_colour);\n #endif\n#endif\n\n#ifdef BatchTable\n #ifdef Instance\n var index = instanceId;\n #else\n var index = batchId;\n #endif\n \n #ifdef InstanceModel\n index = instanceId * Mesh.uSkeletonCount + batchId;\n #endif\n intermediates.batchTableID = index;\n#endif\n\n#ifdef USE_BatchPBR\n intermediates.pbrTextureUV.x = f32(aTexCoord1.x);\n intermediates.pbrTextureUV.y = f32(aTexCoord1.y);\n#endif\n return intermediates;\n}\n",getUVMatrixDecl="\n#ifdef TexCoord\n varying vTexCoordZ : vec2<f32>;\n#endif\n\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef USE_TextureCoordMatrix\n attribute aTextureCoordMatrix : vec2<f32>;\n#endif\n\n#ifdef TextureBatch\n #ifdef MULTI_TEX\n attribute aTextureBatchId : vec2<f32>;\n\n fn getTextureBatchId0(att : vec2<f32>) -> f32\n {\n return att.x;\n }\n fn getTextureBatchId1(att : vec2<f32>) ->f32 \n {\n return att.y;\n }\n #else\n attribute aTextureBatchId : f32;\n\n fn getTextureBatchId0(att : f32) -> f32\n {\n return att;\n }\n #endif // MULTI_TEX \n varying vTexTran : vec4<f32>;\n varying vTexScale : vec4<f32>;\n varying vTexSize : vec4<f32>;\n varying vMaxMipLevel : vec2<f32>;\n fn getTextureParameter(xywh : vec4<f32>, textureDim : vec2<f32>, translate : ptr<function, vec2<f32>>, scale : ptr<function, vec2<f32>>, texSize : ptr<function, vec2<f32>>, \n maxMipLevel : ptr<function, f32>)\n {\n var width = xywh.z;\n var height = xywh.w;\n width *= 2.0 / 3.0;\n (*maxMipLevel) = log2(min(width, height));\n var tempScale : vec2<f32>;\n tempScale.x = width / textureDim.x;\n tempScale.y = height / textureDim.y;\n (*scale) = tempScale;\n var tempTranslate : vec2<f32>;\n tempTranslate.x = xywh.x;\n tempTranslate.y = xywh.y;\n tempTranslate /= textureDim;\n (*translate) = tempTranslate;\n var tempTexSize : vec2<f32>;\n tempTexSize.x = width;\n tempTexSize.y = height;\n (*texSize) = tempTexSize;\n }\n \n fn getUVMatrixForBatch(xywh : vec4<f32>, xywh2 : vec4<f32>) {\n if(getTextureBatchId0(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.x = -1.0;\n }\n else\n {\n var outTexTran = vec2(vTexTran.xy);\n var outTexScale = vec2(vTexScale.xy);\n var outTexSize = vec2(vTexSize.xy);\n var outMaxMipLevel = vMaxMipLevel.x;\n getTextureParameter(xywh, Material.uTextureDim.xy, &outTexTran, &outTexScale, &outTexSize, &outMaxMipLevel);\n vTexTran = vec4(outTexTran.x, outTexTran.y, vTexTran.z, vTexTran.w);\n vTexScale = vec4(outTexScale.x, outTexScale.y, vTexScale.z, vTexScale.w);\n vTexSize = vec4(outTexSize.x, outTexSize.y, vTexSize.z, vTexSize.w);\n vMaxMipLevel.x = outMaxMipLevel;\n\n }\n #ifdef MULTI_TEX\n if(getTextureBatchId0(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.y = -1.0;\n }\n else\n {\n var outTexTran = vec2(vTexTran.zw);\n var outTexScale = vec2(vTexScale.zw);\n var outTexSize = vec2(vTexSize.zw);\n var outMaxMipLevel = vMaxMipLevel.y;\n getTextureParameter(xywh2, Material.uTextureDim.zw, &outTexTran, &outTexScale, &outTexSize, &outMaxMipLevel);\n vTexTran = vec4(vTexTran.x, vTexTran.y, outTexTran.x, outTexTran.y);\n vTexScale = vec4(vTexScale.x, vTexScale.y, outTexScale.x, outTexScale.y);\n vTexSize = vec4(vTexSize.x, vTexSize.y, outTexSize.x, outTexSize.y);\n vMaxMipLevel.y = outMaxMipLevel;\n }\n #endif // MULTI_TEX \n }\n#else\n varying vTexMatrix : vec4<f32>;\n\n #ifdef TexCoord2\n varying vTexMatrix2 : vec4<f32>;\n #endif // TexCoord2\n \nconst SHIFT_LEFT8 = 256.0;\nconst SHIFT_RIGHT8 = 1.0 / 256.0;\nconst SHIFT_RIGHT4 = 1.0 / 16.0;\nconst SHIFT_LEFT4 = 16.0;\n\nfn computeUVMatrixFromZValue(nZ : f32, XTran : ptr<function, f32>, YTran : ptr<function, f32>, scale : ptr<function, f32>, isRGBA : ptr<function, f32>) {\n var nDel8 : f32;\n var nDel16 : f32;\n var nDel20 : f32;\n var nLevel : f32;\n if (nZ <= 0.0f) {\n return;\n }\n nDel8 = floor(nZ * SHIFT_RIGHT8);\n nDel16 = floor(nDel8 * SHIFT_RIGHT8);\n nDel20 = floor(nDel16 * SHIFT_RIGHT4);\n *(isRGBA) = floor(nDel20);\n *(YTran) = nZ - nDel8 * SHIFT_LEFT8;\n *(XTran) = nDel8 - nDel16 * SHIFT_LEFT8;\n nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\n *(scale) = 1.0f / pow(2.0f, nLevel);\n return;\n}\n\nfn getUVMatrix(uv0 : vec4<f32>, uv1 : vec4<f32>) { \n var param_1 : f32; \n var param_2 : f32; \n var param_3 : f32; \n var param_4 : f32;\n vTexCoordZ.x = uv0.z;\n\n#ifdef USE_TextureCoordMatrix\n vTexCoordZ.x = aTextureCoordMatrix.x;\n#endif // USE_TextureCoordMatrix\n\n vTexMatrix = vec4<f32>(0.0f, 0.0f, 1.0f, 0.0f); \n if ((vTexCoordZ.x < -90000.0f)) \n { \n vTexMatrix.z = -1.0f; \n } \n param_1 = vTexMatrix.x; \n param_2 = vTexMatrix.y; \n param_3 = vTexMatrix.z; \n computeUVMatrixFromZValue(floor(vTexCoordZ.x), ¶m_1, ¶m_2, ¶m_3, ¶m_4); \n vTexMatrix.x = param_1; \n vTexMatrix.y = param_2; \n vTexMatrix.z = param_3;\n#ifdef TexCoord2\n vTexMatrix2 = vec4(0.0,0.0,1.0,0.0);\n vTexCoordZ.y = uv1.z;\n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.y = aTextureCoordMatrix.y;\n #endif // USE_TextureCoordMatrix\n param_1 = vTexMatrix2.x; \n param_2 = vTexMatrix2.y; \n param_3 = vTexMatrix2.z; \n computeUVMatrixFromZValue(floor(vTexCoordZ.y), &(param_1), &(param_2), &(param_3), &(param_4));\n vTexMatrix2.x = param_1; \n vTexMatrix2.y = param_2; \n vTexMatrix2.z = param_3;\n#endif // TexCoord2\n vTexMatrix.w = log2((Material.uTextureWidths.x * vTexMatrix.z));\n#ifdef TexCoord2\n vTexMatrix2.w = log2(Material.uTextureWidths.y * vTexMatrix.z);\n#endif // TexCoord2\n return;\n} \n \n#endif\n\n#endif // COMPUTE_TEXCOORD\n",S3MOperationFSDecl="\n#ifdef VISIBLEDISTANCEMAX\nuniform float uVisibleDistanceMax;\nvoid getAlphaByDistance(vec3 positionEC, inout vec4 color) {\n if(length(positionEC) > uVisibleDistanceMax)\n {\n float minAlpha = min(1.0, (length(positionEC) - uVisibleDistanceMax) / 2000.0);\n color.a = 1.0 - minAlpha;\n }\n}\n#endif\n\n#ifdef OVERLAY\nvar uOverlayTexture : texture_2d<f32>;\nvar uOverlayTextureSampler : sampler;\nfn getOverlayColor(color : ptr<function, vec4<f32>>)\n{\n var ptInRect = 1.0;\n var vertexPos = Mesh.uGeoMatrix * vec4(vPositionMC.xyz, 1.0);\n var uv = calculatePolyTexCoord(vertexPos, Layer.uOverlayRect, &ptInRect);\n if(ptInRect > 0.5)\n {\n var oldColor = vec4((*color).r, (*color).g, (*color).b, (*color).a);\n var overlayColor = textureSampleLevel(uOverlayTexture, uOverlayTextureSampler, uv.xy, 0.0);\n if(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n {\n var mixColor = mix(oldColor, overlayColor, overlayColor.a);\n (*color) = vec4<f32>(mixColor.r, mixColor.g, mixColor.b, oldColor.a);\n }\n }\n \n}\n#endif\n\n#ifdef HORIZONTAL_LINE\nuniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}\n#endif\n\n#ifdef IMAGERY\nvarying imgCoord : vec2<f32>;\n//uniform sampler2D uImgTexture;\n//uniform float uImgTextureAlpha;\n//uniform vec2 uImgTextureBound;\n//#if TEXTURE_UNITS > 0\nvar u_dayTextures : array<texture_2d<f32>, TEXTURE_UNITS>;\nvar u_dayTexturesSampler : sampler;\nuniform u_dayTextureTranslationAndScale : array<vec4<f32>, TEXTURE_UNITS>;\nuniform u_dayTextureSize : array<vec4<f32>, TEXTURE_UNITS>;\nuniform u_dayTextureUseWebMercatorT : array<u32, TEXTURE_UNITS>;\nuniform u_dayTextureFlipY : array<u32, TEXTURE_UNITS>;\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform u_transparentBackColor : array<vec4<f32>, TEXTURE_UNITS>;\nuniform u_imageryClipEnable : array<u32, TEXTURE_UNITS>;\n\n#ifdef APPLY_ALPHA\nuniform u_dayTextureAlpha : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_SPLIT\nuniform u_dayTextureSplit : array<vec2<f32>, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_SWIPE\nuniform u_dayTextureSwipeRegion : array<vec4<f32>, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform u_GlobeSplitDirection : vec2<f32>;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform u_GlobeSwipeRegion : vec4<f32>;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform u_dayTextureBrightness : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform u_dayTextureContrast : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_HUE\nuniform u_dayTextureHue : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_SATURATION\nuniform u_dayTextureSaturation : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_GAMMA\nuniform u_dayTextureOneOverGamma : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform u_dayTextureCutoutRectangles : array<vec4<f32>, TEXTURE_UNITS>;\n#endif\n\nuniform u_dayTextureTexCoordsRectangle : array<vec4<f32>, TEXTURE_UNITS>;\n//#endif\n\nfn getImageryColor(color : ptr<function, vec4<f32>>)\n{\n\tvar texcood = vec2<f32>(imgCoord.x / Mesh.uImgTextureBound.x, imgCoord.y / Mesh.uImgTextureBound.y);\n#ifdef MULTIBATCH\n\t(*color) = computeDayColor(vec4<f32>(1.0,1.0,1.0,0.0), clamp(vec3<f32>(texcood,0.0), vec3<f32>(0.0), vec3<f32>(1.0)));\n#else\n\t(*color) = computeDayColor((*color), clamp(vec3<f32>(texcood, 0.0), vec3<f32>(0.0), vec3<f32>(1.0)));\n#endif\n}\n#endif\n\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nvoid getFloodWaterColor(inout vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n}\n#endif\n\n#ifdef TRANSPARENT_BACK_COLOR\nuniform vec4 uTransparentBackColor;\nuniform float uTransparentBackColorTolerance;\n\nvoid transparentColorClip(vec4 color)\n{\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - color.r);\n float gDiff = abs(uTransparentBackColor.g - color.g);\n float bDiff = abs(uTransparentBackColor.b - color.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n}\n#endif\n",shadowReceive="\n#ifdef USE_CUBE_MAP_SHADOW\n var shadowMap_textureCube : texture_cube<f32>;\n var shadowMap_textureCubeSampler : sampler;\n#else\n var shadowMap_texture : texture_2d<f32>;\n var shadowMap_textureSampler : sampler;\n #ifdef USE_PCSS\n var u_shadowDepth : texture_depth_2d;\n var u_shadowDepthSampler : sampler_comparison;\n #endif\n#endif\n\n#ifdef HAS_CASCADES\n\nfn cascadeWeights(depthEye : f32) -> vec4<f32>\n{\n // One component is set to 1.0 and all others set to 0.0.\n var near = step(Shadow.shadowMap_cascadeSplits[0], vec4<f32>(depthEye));\n var far = step(vec4<f32>(depthEye), Shadow.shadowMap_cascadeSplits[1]);\n return near * far;\n}\n\nfn cascadeMatrix(weights : vec4<f32>) -> mat4x4<f32>\n{\n return Shadow.shadowMap_cascadeMatrices[0] * weights.x +\n Shadow.shadowMap_cascadeMatrices[1] * weights.y +\n Shadow.shadowMap_cascadeMatrices[2] * weights.z +\n Shadow.shadowMap_cascadeMatrices[3] * weights.w;\n}\n#endif\n\n#include <shadowVisibility>\n\n// Offset the shadow position in the direction of the normal for perpendicular and back faces\n\nfn applyNormalOffset(positionEC : ptr<function, vec4<f32>>, normalEC : vec3<f32>, nDotL : f32)\n{\n#ifdef APPLY_NORMAL_OFFSET\n var normalOffset = Shadow.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;\n var normalOffsetScale = 1.0 - nDotL;\n var offset = normalOffset * normalOffsetScale * normalEC;\n var newPositionEC = (*positionEC).xyz + offset;\n var w = (*positionEC).w;\n (*positionEC) = vec4(newPositionEC, w);\n#endif // APPLY_NORMAL_OFFSET\n}\n\nfn getShadowVisibility(inPositionEC : vec4<f32>, normalEC : vec3<f32>, depth : f32) -> f32\n{\n var positionEC : vec4<f32> = inPositionEC;\n var shadowParameters : czm_shadowParameters;\n shadowParameters.texelStepSize = Shadow.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\n shadowParameters.depthBias = Shadow.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\n shadowParameters.normalShadingSmooth = Shadow.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\n shadowParameters.darkness = Shadow.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\n\n var visibility = 1.0;\n\n #ifdef IS_TERRAIN\n // Scale depth bias based on view distance to reduce z-fighting in distant terrain\n shadowParameters.depthBias *= max(depth * 0.01, 1.0);\n #endif // IS_TERRAIN\n\n shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);\n \n #ifdef USE_CUBE_MAP_SHADOW // POINT_LIGHT\n var directionEC : vec3<f32> = positionEC.xyz - Shadow.shadowMap_lightPositionEC.xyz;\n var distance = length(directionEC);\n directionEC = normalize(directionEC);\n var radius = Shadow.shadowMap_lightPositionEC.w;\n // Stop early if the fragment is beyond the point light radius\n if (distance > radius)\n {\n return visibility;\n }\n var directionWC : vec3<f32> = czm_inverseViewRotation * directionEC;\n \n shadowParameters.depth = distance / radius;\n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n \n shadowParameters.texCoords = directionWC;\n visibility = shadowVisibility(shadowParameters);\n #endif // USE_CUBE_MAP_SHADOW\n \n #ifdef SPOT_LIGHT_SHADOW\n var directionEC = normalize(positionEC.xyz - Shadow.shadowMap_lightPositionEC.xyz);\n var nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n applyNormalOffset(&positionEC, normalEC, nDotL);\n var shadowPosition = Shadow.shadowMap_matrix * positionEC;\n // Spot light uses a perspective projection, so perform the perspective divide\n shadowPosition /= shadowPosition.w;\n \n // Stop early if the fragment is not in the shadow bounds\n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n {\n return visibility;\n }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n \n visibility = shadowVisibility(shadowParameters);\n #endif // SPOT_LIGHT_SHADOW\n \n #ifdef HAS_CASCADES\n var maxDepth = Shadow.shadowMap_cascadeSplits[1].w;\n // Stop early if the eye depth exceeds the last cascade\n if (depth > maxDepth)\n {\n return visibility;\n }\n \n // Get the cascade based on the eye-space depth\n var weights : vec4<f32> = cascadeWeights(depth);\n \n // Apply normal offset\n var nDotL = clamp(dot(normalEC, Shadow.shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(&positionEC, normalEC, nDotL);\n \n var cascadeMatrix : mat4x4<f32>;\n var nextCascadeMatrix : mat4x4<f32>;\n var csmBlend = false;\n var diffRatio = 0.0;\n var shadowMapIndex = 0.0;\n if(weights.x > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[0];\n nextCascadeMatrix = Shadow.shadowMap_cascadeMatrices[1];\n csmBlend = weights.y > 0.0;\n diffRatio = (depth - Shadow.shadowMap_cascadeSplits[0].y) / (Shadow.shadowMap_cascadeSplits[1].x - Shadow.shadowMap_cascadeSplits[0].y);\n shadowMapIndex = 0.0;\n }\n else if(weights.y > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[1];\n nextCascadeMatrix = Shadow.shadowMap_cascadeMatrices[2];\n csmBlend = weights.z > 0.0;\n diffRatio = (depth - Shadow.shadowMap_cascadeSplits[0].z) / (Shadow.shadowMap_cascadeSplits[1].y - Shadow.shadowMap_cascadeSplits[0].z);\n shadowMapIndex = 1.0;\n }\n else if(weights.z > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[2];\n nextCascadeMatrix = Shadow.shadowMap_cascadeMatrices[3];\n csmBlend = weights.w > 0.0;\n diffRatio = (depth - Shadow.shadowMap_cascadeSplits[0].w) / (Shadow.shadowMap_cascadeSplits[1].z - Shadow.shadowMap_cascadeSplits[0].w);\n shadowMapIndex = 2.0;\n }\n else if(weights.w > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[3];\n shadowMapIndex = 3.0;\n }\n var shadowPosition = cascadeMatrix * positionEC;\n \n // Get visibility\n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n shadowParameters.shadowMapIndex = shadowMapIndex;\n visibility = shadowVisibility(shadowParameters);\n\n if(csmBlend){\n var nextVisibility = 0.0;\n var nextShadowPosition = nextCascadeMatrix * positionEC;\n shadowParameters.texCoords = nextShadowPosition.xy;\n shadowParameters.depth = nextShadowPosition.z;\n shadowParameters.shadowMapIndex = shadowMapIndex + 1.0;\n nextVisibility = shadowVisibility(shadowParameters);\n visibility = mix(visibility, nextVisibility, diffRatio);\n // Draw cascade blend colors for debugging\n //gl_FragColor *= vec4<f32>(diffRatio, 0.0, 0.0, 1.0);\n }\n \n // Fade out shadows that are far away\n var shadowMapMaximumDistance = Shadow.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;\n var fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);\n visibility = mix(visibility, 1.0, fade);\n \n visibility = clamp(visibility, 0.0, 1.0);\n\n //// Draw cascade colors for debugging\n //gl_FragColor *= czm_cascadeColor(weights);\n #endif // HAS_CASCADES\n \n #ifdef NO_CASCADES\n var nDotL = clamp(dot(normalEC, Shadow.shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(&positionEC, normalEC, nDotL);\n var shadowPosition = Shadow.shadowMap_matrix * positionEC;\n \n // Stop early if the fragment is not in the shadow bounds\n // if (any(lessThan(shadowPosition.xyz, vec3<f32>(0.0))) || any(greaterThan(shadowPosition.xyz, vec3<f32>(1.0))))\n // {\n // return visibility;\n // }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n visibility = shadowVisibility(shadowParameters);\n #endif // NO_CASCADES\n\n return visibility;\n}\n",shadowVisibility="\n#ifdef USE_PCSS\nconst PoissonSamplers32 = array<vec3<f32>, 64>(\n vec3(0.06407013, 0.05409927, 0.),\n vec3(0.7366577, 0.5789394, 0.),\n vec3(-0.6270542, -0.5320278, 0.),\n vec3(-0.4096107, 0.8411095, 0.),\n vec3(0.6849564, -0.4990818, 0.),\n vec3(-0.874181, -0.04579735, 0.),\n vec3(0.9989998, 0.0009880066, 0.),\n vec3(-0.004920578, -0.9151649, 0.),\n vec3(0.1805763, 0.9747483, 0.),\n vec3(-0.2138451, 0.2635818, 0.),\n vec3(0.109845, 0.3884785, 0.),\n vec3(0.06876755, -0.3581074, 0.),\n vec3(0.374073, -0.7661266, 0.),\n vec3(0.3079132, -0.1216763, 0.),\n vec3(-0.3794335, -0.8271583, 0.),\n vec3(-0.203878, -0.07715034, 0.),\n vec3(0.5912697, 0.1469799, 0.),\n vec3(-0.88069, 0.3031784, 0.),\n vec3(0.5040108, 0.8283722, 0.),\n vec3(-0.5844124, 0.5494877, 0.),\n vec3(0.6017799, -0.1726654, 0.),\n vec3(-0.5554981, 0.1559997, 0.),\n vec3(-0.3016369, -0.3900928, 0.),\n vec3(-0.5550632, -0.1723762, 0.),\n vec3(0.925029, 0.2995041, 0.),\n vec3(-0.2473137, 0.5538505, 0.),\n vec3(0.9183037, -0.2862392, 0.),\n vec3(0.2469421, 0.6718712, 0.),\n vec3(0.3916397, -0.4328209, 0.),\n vec3(-0.03576927, -0.6220032, 0.),\n vec3(-0.04661255, 0.7995201, 0.),\n vec3(0.4402924, 0.3640312, 0.),\n\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.)\n);\n\nconst PoissonSamplers64 =array<vec3<f32>, 64>(\n vec3(-0.613392, 0.617481, 0.),\n vec3(0.170019, -0.040254, 0.),\n vec3(-0.299417, 0.791925, 0.),\n vec3(0.645680, 0.493210, 0.),\n vec3(-0.651784, 0.717887, 0.),\n vec3(0.421003, 0.027070, 0.),\n vec3(-0.817194, -0.271096, 0.),\n vec3(-0.705374, -0.668203, 0.),\n vec3(0.977050, -0.108615, 0.),\n vec3(0.063326, 0.142369, 0.),\n vec3(0.203528, 0.214331, 0.),\n vec3(-0.667531, 0.326090, 0.),\n vec3(-0.098422, -0.295755, 0.),\n vec3(-0.885922, 0.215369, 0.),\n vec3(0.566637, 0.605213, 0.),\n vec3(0.039766, -0.396100, 0.),\n vec3(0.751946, 0.453352, 0.),\n vec3(0.078707, -0.715323, 0.),\n vec3(-0.075838, -0.529344, 0.),\n vec3(0.724479, -0.580798, 0.),\n vec3(0.222999, -0.215125, 0.),\n vec3(-0.467574, -0.405438, 0.),\n vec3(-0.248268, -0.814753, 0.),\n vec3(0.354411, -0.887570, 0.),\n vec3(0.175817, 0.382366, 0.),\n vec3(0.487472, -0.063082, 0.),\n vec3(-0.084078, 0.898312, 0.),\n vec3(0.488876, -0.783441, 0.),\n vec3(0.470016, 0.217933, 0.),\n vec3(-0.696890, -0.549791, 0.),\n vec3(-0.149693, 0.605762, 0.),\n vec3(0.034211, 0.979980, 0.),\n vec3(0.503098, -0.308878, 0.),\n vec3(-0.016205, -0.872921, 0.),\n vec3(0.385784, -0.393902, 0.),\n vec3(-0.146886, -0.859249, 0.),\n vec3(0.643361, 0.164098, 0.),\n vec3(0.634388, -0.049471, 0.),\n vec3(-0.688894, 0.007843, 0.),\n vec3(0.464034, -0.188818, 0.),\n vec3(-0.440840, 0.137486, 0.),\n vec3(0.364483, 0.511704, 0.),\n vec3(0.034028, 0.325968, 0.),\n vec3(0.099094, -0.308023, 0.),\n vec3(0.693960, -0.366253, 0.),\n vec3(0.678884, -0.204688, 0.),\n vec3(0.001801, 0.780328, 0.),\n vec3(0.145177, -0.898984, 0.),\n vec3(0.062655, -0.611866, 0.),\n vec3(0.315226, -0.604297, 0.),\n vec3(-0.780145, 0.486251, 0.),\n vec3(-0.371868, 0.882138, 0.),\n vec3(0.200476, 0.494430, 0.),\n vec3(-0.494552, -0.711051, 0.),\n vec3(0.612476, 0.705252, 0.),\n vec3(-0.578845, -0.768792, 0.),\n vec3(-0.772454, -0.090976, 0.),\n vec3(0.504440, 0.372295, 0.),\n vec3(0.155736, 0.065157, 0.),\n vec3(0.391522, 0.849605, 0.),\n vec3(-0.620106, -0.328104, 0.),\n vec3(0.789239, -0.419965, 0.),\n vec3(-0.545396, 0.538133, 0.),\n vec3(-0.178564, -0.596057, 0.)\n);\n\nfn getRand(seed : vec2<f32>)->f32 {\n return fract(sin(dot(seed.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n#endif // USE_PCSS\n\n#ifdef USE_CUBE_MAP_SHADOW\nfn cubeShadowDepthCompare(uv : vec3<f32>, depth : f32) -> f32\n{\n var depthValue = textureSample(shadowMap_textureCube, shadowMap_textureCubeSampler, uv);\n return step(depth, depthValue);\n}\n#else\nfn shadowDepthCompare(uv : vec2<f32>, depth : f32) -> f32\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n var depthValue = textureSample(shadowMap_texture, shadowMap_textureSampler, uv).r;\n#else\n var depthValue = czm_unpackDepth(textureSample(shadowMap_texture, shadowMap_textureSampler, uv));\n#endif // USE_SHADOW_DEPTH_TEXTURE\n return step(depth, depthValue);\n}\n#endif // USE_CUBE_MAP_SHADOW\n\nfn sampleShadowMap(uv : vec2<f32>) -> f32\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n var depthValue = textureSample(shadowMap_texture, shadowMap_textureSampler, uv).r;\n#else\n var depthValue = czm_unpackDepth(textureSample(shadowMap_texture, shadowMap_textureSampler, uv));\n#endif\n return depthValue;\n}\n\nfn private_shadowVisibility(inVisibility : f32, nDotL : f32, normalShadingSmooth : f32, darkness : f32) -> f32\n{\n var visibility = inVisibility;\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n var strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n var strength = step(0.0, nDotL);\n#endif // USE_NORMAL_SHADING_SMOOTH\n visibility *= strength;\n#endif // USE_NORMAL_SHADING\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\nfn shadowVisibility(shadowParameters : czm_shadowParameters) -> f32\n{\n var depthBias = shadowParameters.depthBias;\n var depth = shadowParameters.depth;\n var nDotL = shadowParameters.nDotL;\n var normalShadingSmooth = shadowParameters.normalShadingSmooth;\n var darkness = shadowParameters.darkness;\n var uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n var visibility = cubeShadowDepthCompare(uvw, depth);\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\n\n#ifdef USE_PCSS\n\n fn computeShadowWithPCSS(shadowParameters : czm_shadowParameters, searchTapCount : u32, pcfTapCount : u32, poissonSamplers : array<vec3<f32>, 64>)-> f32\n {\n var depthMetric = shadowParameters.depth;\n\n if (depthMetric > 1.0 || depthMetric < 0.0) {\n return 1.0;\n }\n\n var depthBias = shadowParameters.depthBias;\n depthBias *= 2.0;\n var clipPos = vec3(shadowParameters.texCoords.xy, shadowParameters.depth - depthBias);\n var uvDepth = clipPos;\n\n var shadowMapSize = 1.0 / shadowParameters.texelStepSize.x;\n var shadowMapSizeInverse = shadowParameters.texelStepSize.x;\n var contactHardeningLightSizeUVRatio = Shadow.shadowMap_penumbraRatio;\n var shadowMapIndex = shadowParameters.shadowMapIndex;\n // hack : 让不同cascade的阴影看起来没有明显分隔\n var scale = pow(2.0, shadowMapIndex);\n contactHardeningLightSizeUVRatio /= scale;\n\n var lightSizeUV = shadowMapSize * contactHardeningLightSizeUVRatio;\n var darkness = shadowParameters.darkness;\n\n var blockerDepth = 0.0;\n var sumBlockerDepth = 0.0;\n var numBlocker = 0.0;\n\n var i : u32;\n for (i = 0; i < searchTapCount; i++) {\n blockerDepth = czm_unpackDepth(textureSampleLevel(shadowMap_texture, shadowMap_textureSampler, uvDepth.xy + (lightSizeUV * shadowMapSizeInverse * PoissonSamplers32[i].xy), 0.0));\n if (blockerDepth < uvDepth.z) {\n sumBlockerDepth += blockerDepth;\n numBlocker += 1.0;\n }\n }\n\n if (numBlocker < 1.0) {\n return 1.0;\n }\n else\n {\n var avgBlockerDepth = sumBlockerDepth / numBlocker;\n\n // Offset preventing aliasing on contact.\n var AAOffset = shadowMapSizeInverse * 10.;\n // Do not dividing by z despite being physically incorrect looks better due to the limited kernel size.\n // var penumbraRatio = (depthMetric - avgBlockerDepth) / avgBlockerDepth;\n var penumbraRatio = ((depthMetric - avgBlockerDepth) + AAOffset);\n var filterRadius = penumbraRatio * lightSizeUV * shadowMapSizeInverse;\n\n var random = getRand(shadowParameters.texCoords.xy);\n var rotationAngle = random * 3.1415926;\n var rotationVector = vec2(cos(rotationAngle), sin(rotationAngle));\n\n var shadow = 0.0;\n var i : u32;\n for (i = 0; i < pcfTapCount; i++) {\n var offset = poissonSamplers[i];\n // Rotated offset.\n offset = vec3(offset.x * rotationVector.x - offset.y * rotationVector.y, offset.y * rotationVector.x + offset.x * rotationVector.y, 0.0);\n var realUV = uvDepth + offset * filterRadius;\n realUV.z = (realUV.z - 0.5) * 2.0;\n shadow += textureSampleCompareLevel(u_shadowDepth, u_shadowDepthSampler, realUV.xy, realUV.z);\n }\n shadow /= f32(pcfTapCount);\n\n // Blocker distance falloff\n shadow = mix(shadow, 1.0, depthMetric - avgBlockerDepth);\n\n // Apply darkness\n shadow = mix(darkness, 1.0, shadow);\n\n return shadow;\n }\n }\n\n fn computeShadowWithPCSS16(shadowParameters : czm_shadowParameters)->f32\n {\n return computeShadowWithPCSS(shadowParameters, 16, 16, PoissonSamplers32);\n }\n\n fn computeShadowWithPCSS32(shadowParameters : czm_shadowParameters)->f32\n {\n return computeShadowWithPCSS(shadowParameters, 16, 32, PoissonSamplers32);\n }\n\n fn computeShadowWithPCSS64(shadowParameters : czm_shadowParameters)->f32\n {\n return computeShadowWithPCSS(shadowParameters, 32, 64, PoissonSamplers64);\n }\n#else\n fn computeShadowWithPoissonSampling(shadowParameters : czm_shadowParameters) -> f32\n {\n var shadowPixelDepth = shadowParameters.depth;\n var depthBias = shadowParameters.depthBias;\n shadowPixelDepth -= depthBias;\n var darkness = shadowParameters.darkness;\n var uv = shadowParameters.texCoords;\n var texelStepSize = shadowParameters.texelStepSize;\n\n var visibility = 1.0;\n var poissonDisk : array<vec2<f32>, 4>;\n poissonDisk[0] = vec2<f32>(-0.94201624, -0.39906216);\n poissonDisk[1] = vec2<f32>(0.94558609, -0.76890725);\n poissonDisk[2] = vec2<f32>(-0.094184101, -0.92938870);\n poissonDisk[3] = vec2<f32>(0.34495938, 0.29387760);\n\n // Poisson Sampling\n if (sampleShadowMap(uv + poissonDisk[0] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n if (sampleShadowMap(uv + poissonDisk[1] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n if (sampleShadowMap(uv + poissonDisk[2] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n if (sampleShadowMap(uv + poissonDisk[3] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n return visibility;\n }\n#endif\n\nfn shadowVisibility(shadowParameters : czm_shadowParameters) -> f32\n{\n#ifdef USE_SOFT_SHADOWS\n #ifdef USE_PCSS\n #ifdef LOW_QUALITY_SHADOW\n var visibility = computeShadowWithPCSS16(shadowParameters);\n #elif defined(MEDIUM_QUALITY_SHADOW)\n var visibility = computeShadowWithPCSS32(shadowParameters);\n #else\n var visibility = computeShadowWithPCSS64(shadowParameters);\n #endif\n #else\n var visibility = computeShadowWithPoissonSampling(shadowParameters);\n #endif\n#else\n var depth = shadowParameters.depth;\n var depthBias = shadowParameters.depthBias;\n depth -= depthBias;\n var visibility = shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n var nDotL = shadowParameters.nDotL;\n var normalShadingSmooth = shadowParameters.normalShadingSmooth;\n var darkness = shadowParameters.darkness;\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif // USE_CUBE_MAP_SHADOW\n",cubeUV_reflection="\n\n\tvar uSpecularEnvironmentMaps : texture_2d<f32>;\n\tvar uSpecularEnvironmentMapsSampler : sampler;\n\n\tconst CUBEUV_MAX_MIP = 8.0;\n const CUBEUV_TEXEL_WIDTH = 0.0013020833333333333;\n const CUBEUV_TEXEL_HEIGHT = 0.0009765625;\n const cubeUV_minMipLevel = 4.0;\n\tconst cubeUV_minTileSize = 16.0;\n\n\t// These shader functions convert between the UV coordinates of a single face of\n\t// a cubemap, the 0-5 integer index of a cube face, and the direction vector for\n\t// sampling a textureCube (not generally normalized ).\n\n\tfn getFace( direction : vec3<f32> ) ->f32\n\t{\n\t\tvar absDirection = abs( direction );\n\t\tvar face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\n\t// RH coordinate system; PMREM face-indexing convention\n\tfn getUV( direction : vec3<f32>, face : f32) -> vec2<f32>{\n\t\tvar uv : vec2<f32>;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2<f32>( direction.z, direction.y ) / abs( direction.x ); // pos x\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2<f32>( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2<f32>( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2<f32>( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2<f32>( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\t\t} else {\n\t\t\tuv = vec2<f32>( direction.x, direction.y ) / abs( direction.z ); // neg z\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\n\t// fn bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) ->vec3<f32>\n\t// {\n\t// \tfloat face = getFace( direction );\n\t// \tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t// \tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t// \tfloat faceSize = exp2( mipInt );\n\t// \tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t// \tif ( face > 2.0 ) {\n\t// \t\tuv.y += faceSize;\n\t// \t\tface -= 3.0;\n\t// \t}\n\t// \tuv.x += face * faceSize;\n\t// \tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t// \tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t// \tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t// \tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t// \treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t// }\n\n\t// These defines must match with PMREMGenerator\n\n\tconst cubeUV_r0 = 1.0;\n\tconst cubeUV_v0 = 0.339;\n\tconst cubeUV_m0 = -2.0;\n\tconst cubeUV_r1 = 0.8;\n\tconst cubeUV_v1 = 0.276;\n\tconst cubeUV_m1 = -1.0;\n\tconst cubeUV_r4 = 0.4;\n\tconst cubeUV_v4 = 0.046;\n\tconst cubeUV_m4 = 2.0;\n\tconst cubeUV_r5 = 0.305;\n\tconst cubeUV_v5 = 0.016;\n\tconst cubeUV_m5 = 3.0;\n\tconst cubeUV_r6 = 0.21;\n\tconst cubeUV_v6 = 0.0038;\n\tconst cubeUV_m6 = 4.0;\n\n\tfn roughnessToMip(roughness : f32) ->f32\n\t{\n\t\tvar mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25\n\t\t}\n\t\treturn mip;\n\t}\n\n\t// vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\n\t// \tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\n\t// \tfloat mipF = fract( mip );\n\n\t// \tfloat mipInt = floor( mip );\n\n\t// \tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\n\t// \tif ( mipF == 0.0 ) {\n\n\t// \t\treturn vec4( color0, 1.0 );\n\n\t// \t} else {\n\n\t// \t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\n\t// \t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\n\t// \t}\n\n\t// }\n",LightUBODecl="\n#define MAX_POINT_LIGHT_COUNT 16;\n#define MAX_SPOT_LIGHT_COUNT 16;\n#define MAX_DIRECTION_LIGHT_COUNT 4;\nstruct LightUBO \n{ \n uPointLightPositionEC : array<vec3<f32>, 16>,\n uPointLightColor : array<vec3<f32>, 16>,\n uPointLightDistanceAndDecay : array<vec4<f32>, 16>,\n uSpotLightColorAndExponent : array<vec4<f32>, 16>,\n uSpotLightPositionEC : array<vec3<f32>, 16>,\n uSpotLightDirectionEC : array<vec3<f32>, 16>,\n uSpotLightDistanceDecayCosPenumbra : array<vec4<f32>, 16>,\n uDirectionalLightDirectionEC : array<vec3<f32>, 4>,\n uDirectionalLightDirection : array<vec3<f32>, 4>,\n uDirectionalLightColor : array<vec3<f32>, 4>,\n uAmbientLightColor : vec4<f32>, \n uSunLightColor : vec4<f32>,\n uSunDirectionEC : vec3<f32>,\n uSkyColor : vec3<f32>,\n uGroundColor : vec3<f32>,\n uSunLightON : f32,\n uPointLightCount : i32,\n uSpotLightCount : i32,\n uDirLightCount : i32\n};\nvar<uniform> Light : LightUBO;\n",MaterialUboDecl="\nstruct MaterialUBO {\n uTexMatrix : mat4x4<f32>,\n uDiffuseColor : vec4<f32>,\n uAmbientColor : vec4<f32>,\n uSpecularColor : vec4<f32>,\n uTexUVOffset : vec4<f32>,\n uTextureDim : vec4<f32>,\n uTextureWidths : vec2<f32>,\n batchTextureStep_baseTex : vec4<f32>,\n batchTextureDimensions_baseTex : vec2<f32>,\n batchTextureStep_bakeTex : vec4<f32>,\n batchTextureDimensions_bakeTex : vec2<f32>,\n uBaseColorFactor : vec4<f32>,\n uEmissiveFactor : vec4<f32>,\n uEmissiveUVOffsetAndTiling : vec4<f32>,\n uMetallicRoughnessIntensityScale : vec3<f32>,\n uPBRTexWH : vec2<f32>,\n uNormalTextureScale : f32,\n uAlphaMode : f32,\n uAlphaCutoff : f32,\n uPbrParTextureWidth : f32\n};\n\nvar<uniform> Material : MaterialUBO;",MeshUboDecl="\nstruct MeshUBO {\n uModelMatrix : mat4x4<f32>, \n uGeoMatrix : mat4x4<f32>, \n batchTextureStep : vec4<f32>, \n batchTextureDimensions : vec2<f32>,\n decode_texCoord0_min : vec2<f32>,\n decode_texCoord1_min : vec2<f32>,\n decode_texCoord0_vNormConstant : vec3<f32>,\n decode_texCoord1_vNormConstant : vec3<f32>,\n decode_position_min : vec4<f32>,\n decode_position_normConstant : f32,\n normal_rangeConstant : f32,\n uInverseGeoMatrix : mat4x4<f32>, \n uSkeletonMatrix : mat4x4<f32>,\n uSkeletonCount : f32,\n uImgTextureBound : vec2<f32>,\n uImgTextureAlpha : f32,\n fMultiTemporalFactor : f32,\n uSouthWest : vec3<f32>,\n uNorthDir : vec3<f32>,\n uEastDir : vec3<f32>,\n textureRepeat : vec2<f32>\n};\n\nvar<uniform> Mesh : MeshUBO;",LayerUboDecl="\nstruct LayerUBO { \n uSelColor : vec4<f32>, \n uTranslationAndBottom : vec4<f32>, \n uFillForeColor : vec4<f32>, \n uPolygonOffset : vec4<f32>, \n uPointSize : f32,\n uMinMaxTransparent : vec2<f32>,\n uTransparentFilter : f32,\n uHypLineColor : vec4<f32>,\n uNoValueColor : vec4<f32>,\n uHypRect : vec4<f32>,\n uHypHasAnalysisRegion : f32,\n uMixColorType : f32,\n uHypOpacity : f32,\n uHypContourInterval : f32,\n uHypContourFillMode : f32,\n uHypFloor : f32,\n uHypCeil : f32,\n uDataFloor : f32,\n uDataCeil : f32,\n uHypMaxVisibleValue : f32,\n uHypMinVisibleValue : f32,\n uHypsometricVisible : f32,\n uRect : vec4<f32>,\n uCameraHeight : f32,\n uExcavationRect : vec4<f32>,\n uServerExcavationRect : vec4<f32>,\n uExcavationMode : f32,\n uServerExcavationMode : f32,\n uSwipeRegion : vec4<f32>,\n uBrightness : f32,\n uContrast : f32,\n uHue : f32,\n uSaturation : f32,\n uOneOverGamma : f32,\n uClipPlanes : array<vec4<f32>, 6>,\n uClipLineColor : vec4<f32>,\n uClipMode : f32,\n uMaxCategory : f32,\n uMinCategory : f32,\n uCategoryWidht : f32,\n uCategoryHeight : f32,\n uLineColor : vec4<f32>,\n uLineWidth : f32,\n uFillStyle : f32,\n uTransparentBackColor : vec4<f32>,\n uTransparentBackColorTolerance : f32,\n uVisibleDistanceMax : f32,\n uHorizontalColor : vec4<f32>,\n uHorizontalLine : f32,\n uDistanceFalloffFactor : f32,\n uStrokesTextureScale : vec2<f32>,\n uStrokesLog2Resolution : f32,\n uMinMaxTerrainHeightAndPickInfo : vec4<f32>,\n uOverlayRect : vec4<f32>,\n uEmissionTexAtlasTilingAndOffset : array<vec4<f32>, 10>,\n uEmissionTexAtlasRects : array<vec4<f32>, 10>,\n uEmissionColor : vec4<f32>,\n uLayerBounds : vec4<f32>,\n uLayerCornerLength : f32,\n uMaxCategoryOrHypCeil : f32,\n uMinCategoryOrHypFloor : f32,\n uEmissionTexAtlasCount : f32,\n uSnowCoverageFactor : f32,\n uAnimationSpeed : f32,\n uRippleScale : f32,\n uWindIntensity : f32,\n uRain : f32,\n uCameraDepth : f32,\n uWetnessFactor : f32,\n uSelectColorType: f32\n};\n\nvar<uniform> Layer : LayerUBO;",k$Y="\nstruct SceneUBO { \n uView : mat4x4<f32>, \n uProjection : mat4x4<f32>, \n uViewProjection : mat4x4<f32>, \n uInverseView : mat4x4<f32>, \n uInverseProjection : mat4x4<f32>, \n uInverseViewProjection : mat4x4<f32>, \n uViewportTransformation : mat4x4<f32>,\n uViewRotation : mat3x3<f32>, \n uInverseViewRotation : mat3x3<f32>, \n uTemeToPseudoFixed : mat3x3<f32>, \n uViewport : vec4<f32>, \n uFrustumPlanes : vec4<f32>, \n uRelativeOrigin : vec3<f32>,\n uCurrentFrustum : vec2<f32>, \n uFarDepthFromNearPlusOne : f32, \n uLog2FarDepthFromNearPlusOne : f32, \n uOneOverLog2FarDepthFromNearPlusOne : f32, \n uFrameNumber : f32, \n uPixelRatio : f32, \n uResolutionScale : f32, \n uGamma : f32,\n uToneMappingExposure : f32,\n uEnvMapIntensity : f32,\n uSpecularEnvironmentMapSize : vec2<f32>,\n uSpecularEnvironmentMapsMaximumLOD : f32,\n uSphericalHarmonicCoefficients : array<vec3<f32>, 9>\n};\nvar<uniform> Scene : SceneUBO;",ShadowUboDecl="\nstruct ShadowUBO { \n shadowMap_matix : mat4x4<f32>,\n shadowMap_texelSizeDepthBiasAndNormalShadingSmooth : vec4<f32>,\n shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness : vec4<f32>,\n shadowMap_cascadeMatrices : array<mat4x4<f32>, 4>,\n shadowMap_cascadeSplits : array<vec4<f32>, 2>,\n shadowMap_lightPositionEC : vec4<f32>,\n shadowMap_lightDirectionEC : vec3<f32>,\n shadowMap_penumbraRatio : f32\n};\nvar<uniform> Shadow : ShadowUBO;\n",blinnPhong="\nconst shininess2 = 30.0;\nconst specular = vec3<f32>(0.066666);\n\nfn getRoughness(oriTexCoord : vec2<f32>) -> f32{\n return 1.0;\n}\n\nfn blinnPhong(inBaseColorWithAlpha : vec4<f32>, texCoord : vec2<f32>, oriTexCoord : vec2<f32>, posEC : vec3<f32>, posMC : vec4<f32>, vertexNormalEC : vec3<f32>)->vec4<f32>\n{\n var faceDirection : f32;\n if(gl_FrontFacing){\n faceDirection = 1.0;\n } \n else {\n faceDirection = -1.0;\n }\n\n var normalEC = normalize(vertexNormalEC);\n #ifndef HAS_NORMAL\n normalEC = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(posMC.xyz));\n #endif\n normalEC = normalEC * faceDirection;\n\n var totalDiffuseLight = vec3<f32>(0.0);\n var totalSpecularLight = vec3<f32>(0.0);\n var sunLightDiffuseWeight = max( dot( normalEC, Light.uSunDirectionEC ), 0.0 );\n totalDiffuseLight = Light.uSunLightColor.rgb * sunLightDiffuseWeight * Light.uSunLightON;\n var positionToEyeECDir = -normalize(posEC);\n\n var i : i32;\n #ifdef HAS_DIR_LIGHTS\n for (i = 0; i < Light.uDirLightCount; i ++ )\n {\n var dirVectorEC = normalize((Scene.uView * vec4<f32>(Light.uDirectionalLightDirection[i], 0.0)).xyz);\n var dotProduct = dot( normalEC, dirVectorEC );\n var dirDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += Light.uDirectionalLightColor[ i ] * dirDiffuseWeight;\n }\n #endif\n\n #ifdef HAS_POINT_LIGHTS\n for (i = 0; i < Light.uPointLightCount; i ++ )\n {\n var lVector = Light.uPointLightPositionEC[i] - posEC;\n var lengthToLight = length( lVector );\n var cutoffDis = Light.uPointLightDistanceAndDecay[i].x;\n if(lengthToLight > cutoffDis)\n {\n continue;\n }\n var attenuation = punctualLightIntensityToIrradianceFactor( lengthToLight, cutoffDis, Light.uPointLightDistanceAndDecay[i].y);\n lVector = normalize( lVector );\n var dotProduct = dot( normalEC, lVector );\n var pointLightDiffuse = max( dotProduct, 0.0 );\n totalDiffuseLight += Light.uPointLightColor[i] * pointLightDiffuse * attenuation;\n var pointHalfVector = normalize( lVector + positionToEyeECDir );\n var pointDotNormalHalf = max( dot( normalEC, pointHalfVector ), 0.0 );\n var pointSpecularWeight = max( pow( pointDotNormalHalf, shininess2 ), 0.0 );\n var specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n var schlick = specular + vec3<f32>(1.0 - specular) * pow(max(1.0 - dot(lVector, pointHalfVector), 0.0), 5.0);\n totalSpecularLight += schlick * Light.uPointLightColor[ i ] * pointSpecularWeight * pointLightDiffuse * attenuation * specularNormalization;\n }\n #endif\n\n #ifdef HAS_SPOT_LIGHTS\n var positionWC = (Mesh.uModelMatrix * posMC).xyz;\n for (i = 0; i < Light.uSpotLightCount; i ++ )\n {\n var lVector = Light.uSpotLightPositionEC[i] - posEC;\n var attenuation = punctualLightIntensityToIrradianceFactor( length( lVector ), Light.uSpotLightDistanceDecayCosPenumbra[i].x, Light.uSpotLightDistanceDecayCosPenumbra[i].y);\n lVector = normalize( lVector );\n var spotEffect = dot( lVector, Light.uSpotLightDirectionEC[ i ] );\n if ( spotEffect > Light.uSpotLightDistanceDecayCosPenumbra[i].z ) {\n spotEffect = max( pow( max( spotEffect, 0.0 ), Light.uSpotLightColorAndExponent[ i ].a ), 0.0 );\n var dotProduct = dot( normalEC, lVector );\n var spotDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += Light.uSpotLightColorAndExponent[ i ].rgb * spotDiffuseWeight * attenuation * spotEffect;\n var spotHalfVector = normalize( lVector + positionToEyeECDir );\n var spotDotNormalHalf = max( dot( normalEC, spotHalfVector ), 0.0 );\n var spotSpecularWeight = max( pow( spotDotNormalHalf, shininess2 ), 0.0 );\n var specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n var schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * Light.uSpotLightColorAndExponent[ i ].rgb * spotSpecularWeight * spotDiffuseWeight * attenuation * specularNormalization * spotEffect;\n }\n }\n #endif\n\n var diffuseColor = Material.uDiffuseColor.rgb * inBaseColorWithAlpha.rgb;\n\n var material : PhysicalMaterial;\n material.diffuseColor = diffuseColor;\n material.roughness = 1.0;\n var metalness = 0.0;\n var f0 = vec3<f32>(0.04);\n material.specularColor = mix(f0, inBaseColorWithAlpha.rgb, metalness);;\n material.specularF90 = 1.0;\n \n var geometry : GeometricContext;\n geometry.position = posEC;\n geometry.normal = normalEC;\n geometry.viewDir = positionToEyeECDir;\n var reflectedLight = ReflectedLight(vec3<f32>(0.0), vec3<f32>(0.0), vec3<f32>(0.0), vec3<f32>(0.0));\n reflectedLight.directDiffuse += totalDiffuseLight * diffuseColor;\n reflectedLight.directSpecular += totalSpecularLight * Material.uSpecularColor.rgb;\n \n getEnvironmentColor(geometry, material, &reflectedLight);\n\n var shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), normalEC, -posEC.z);\n#endif\n\n var color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n return vec4(LINEARtoSRGB(color.rgb), inBaseColorWithAlpha.a);\n}\n",shaderModelBase="\nstruct IncidentLight\n{\n direction : vec3<f32>,\n color : vec3<f32>,\n visible : bool\n};\n\nstruct GeometricContext {\n position : vec3<f32>,\n normal : vec3<f32>,\n viewDir : vec3<f32>\n};\n\nstruct PhysicalMaterial {\n diffuseColor : vec3<f32>,\n roughness : f32,\n specularColor : vec3<f32>,\n specularF90 : f32\n};\n\nstruct ReflectedLight {\n directDiffuse : vec3<f32>,\n directSpecular : vec3<f32>,\n indirectDiffuse : vec3<f32>,\n indirectSpecular : vec3<f32>\n};\n\n#define saturate(a) clamp( a, 0.0, 1.0 )\n\n#include <getEnvironmentColor>\n\n//参考UE4.24实现计算精确光源的衰减\nfn punctualLightIntensityToIrradianceFactor(lightDistance : f32, cutoffDistance : f32, decayExponent : f32) ->f32\n{\n if ( decayExponent > 0.0 ) {\n return pow( saturate( 1.0 - lightDistance / cutoffDistance ), decayExponent );\n }\n return 1.0;\n}\n\nfn sRGBToLinear(srgbIn : vec4<f32>) -> vec4<f32> {\n var linearOut = pow(vec3<f32>(srgbIn.x, srgbIn.y, srgbIn.z), vec3<f32>(2.2f, 2.2f, 2.2f));\n return vec4<f32>(linearOut.x, linearOut.y, linearOut.z, srgbIn.w);\n}\n\nfn sRGBToLinear_vf3(srgbIn : vec3<f32>) -> vec3<f32> {\n return pow(srgbIn, vec3<f32>(2.2f, 2.2f, 2.2f));\n}\n\nfn LINEARtoSRGB(linearIn : vec3<f32>) -> vec3<f32>{\n #ifndef HDR\n return pow(linearIn, vec3<f32>(1.0/2.2));\n #else\n return linearIn;\n #endif\n}\n\n",getEnvironmentColor="\n\nvar uBrdfLut : texture_2d<f32>;\nvar uBrdfLutSampler : sampler;\n\nvar uEnvironmentMap : texture_cube<f32>;\nvar uEnvironmentMapSampler : sampler;\n\n//#include <cubeUV_reflection>\n#include <hemisphereLightDecl>\n\nfn DFGApprox( normal : vec3<f32>, viewDir : vec3<f32>, roughness : f32) ->vec2<f32> {\n var dotNV = saturate( dot( normal, viewDir ) );\n const c0 = vec4<f32>( - 1, - 0.0275, - 0.572, 0.022 );\n const c1 = vec4<f32>( 1, 0.0425, 1.04, - 0.04 );\n var r = roughness * c0 + c1;\n var a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n var fab = vec2<f32>( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\n\nfn computeMultiscattering(normal : vec3<f32>, viewDir : vec3<f32>, specularColor : vec3<f32>, specularF90 : f32, roughness : f32, \n singleScatter : ptr<function, vec3<f32>>, multiScatter : ptr<function, vec3<f32>>) {\n var fab = DFGApprox( normal, viewDir, roughness );\n var Fr = specularColor;\n var FssEss = Fr * fab.x + specularF90 * fab.y;\n var Ess = fab.x + fab.y;\n var Ems = 1.0 - Ess;\n var Favg = Fr + ( 1.0 - Fr ) * 0.047619;\n var Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n var lastSingle = (*(singleScatter)) + FssEss;\n (*singleScatter) = lastSingle;\n var lastMulti = (*(multiScatter)) + Fms * Ems;\n (*multiScatter) = lastMulti;\n}\n\nfn indirectSpecular_Physical(radiance : vec3<f32>, irradiance : vec3<f32>, geometry : GeometricContext, material : PhysicalMaterial, reflectedLight : ptr<function, ReflectedLight>) {\n var singleScattering = vec3<f32>(0.0);\n var multiScattering = vec3<f32>(0.0);\n var cosineWeightedIrradiance = irradiance;\n computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, &singleScattering, &multiScattering);\n var totalScattering = singleScattering + multiScattering;\n var diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n (*(reflectedLight)).indirectSpecular += radiance * singleScattering;\n (*(reflectedLight)).indirectSpecular += multiScattering * cosineWeightedIrradiance;\n (*(reflectedLight)).indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n\nfn getEnvironmentColor(geometry : GeometricContext, material : PhysicalMaterial, reflectedLight : ptr<function, ReflectedLight> )\n{\n var roughness = material.roughness;\n var posEC = geometry.position;\n var n = geometry.normal;\n var v = geometry.viewDir;\n\n var irradiance = vec3<f32>(0.0);\n var radiance = vec3<f32>(0.0);\n \n#ifdef HAS_HEMISPHERE_LIGHTS\n // TODO\n // HemisphereLight hemiLight;\n // hemiLight.skyColor = uSkyColor[0];\n // hemiLight.groundColor = uGroundColor[0];\n // hemiLight.direction = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\n // irradiance += getHemisphereLightIrradiance( hemiLight, geometry );\n#endif\n\n#ifdef BRDF\n#ifdef IBL\n\n#ifdef KtxEnvMap\n var modelView = Scene.uView * Mesh.uModelMatrix;\n let modelViewRow0 : vec4<f32> = modelView[0u];\n let modelViewRow1 : vec4<f32> = modelView[1u]; \n let modelViewRow2 : vec4<f32> = modelView[2u]; \n var fixedToENU = mat3x3<f32>(\n vec3<f32>(modelViewRow0.x, modelViewRow1.x, modelViewRow2.x), \n vec3<f32>(modelViewRow0.y, modelViewRow1.y, modelViewRow2.y), \n vec3<f32>(modelViewRow0.z, modelViewRow1.z, modelViewRow2.z)\n );\n const yUpToZUp = mat3x3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n var cubeDir = normalize( yUpToZUp * fixedToENU * reflect(-v, n) );\n var worldNormal = normalize( yUpToZUp * fixedToENU * n );\n irradiance = czm_sphericalHarmonics(worldNormal, Scene.uSphericalHarmonicCoefficients);\n radiance = czm_sampleOctahedralProjection(Scene.uSpecularEnvironmentMapSize, cubeDir, \n roughness * Scene.uSpecularEnvironmentMapsMaximumLOD, Scene.uSpecularEnvironmentMapsMaximumLOD);\n #else\n // irradiance+= getIBLIrradiance( geometry.normal );\n // radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n#endif // KtxEnvMap\n \n#else // IBL\n var positionWC = vec3<f32>((Scene.uInverseView * vec4<f32>(posEC, 1.0f)).xyz) + Scene.uRelativeOrigin;\n var r = normalize(Scene.uInverseViewRotation * normalize(reflect(v, n)));\n var vertexRadius = length(positionWC);\n var horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n var reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(Scene.uTemeToPseudoFixed * r);\n r.x = -r.x;\n var inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n var sceneSkyBox = textureSample(uEnvironmentMap, uEnvironmentMapSampler, r).rgb * inverseRoughness;\n var atmosphereHeight = 0.05;\n var blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n var blendRegionOffset = roughness * -1.0;\n var farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n var aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n var farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n var smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n var belowHorizonColor = mix(vec3<f32>(0.1, 0.15, 0.25), vec3<f32>(0.4, 0.7, 0.9), smoothstepHeight);\n var nadirColor = belowHorizonColor * 0.5;\n var aboveHorizonColor = mix(vec3<f32>(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n var blueSkyColor = mix(vec3<f32>(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n var zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n var blueSkyDiffuseColor = vec3<f32>(0.7, 0.85, 0.9);\n var diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n var diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n var diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n var notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n var specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n var LdotZenith = clamp(dot(normalize(Scene.uInverseViewRotation * Light.uSunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n var S = acos(LdotZenith);\n var NdotZenith = clamp(dot(normalize(Scene.uInverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n var sunNdotL = clamp(dot(n, Light.uSunDirectionEC), 0.001, 1.0);\n var gamma = acos(sunNdotL);\n var numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n var denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n var luminance = 0.2 * (numerator / denominator);\n irradiance = diffuseIrradiance * luminance;\n radiance = specularIrradiance * luminance;\n#endif // IBL\n\n#else\n irradiance = Light.uAmbientLightColor.rgb * 0.6;\n#endif // BRDF\n\n indirectSpecular_Physical(radiance, irradiance, geometry, material, reflectedLight);\n}\n\n",getMetersPerPixel="\n//计算像素大小\nfn getMetersPerPixel(positionEC : vec4<f32>, pixelRatio : f32) -> f32\n{\n var width = Scene.uViewport.z;\n var height = Scene.uViewport.w;\n var pixelWidth:f32;\n var pixelHeight:f32;\n\n var top = Scene.uFrustumPlanes.x;\n var bottom = Scene.uFrustumPlanes.y;\n var left = Scene.uFrustumPlanes.z;\n var right = Scene.uFrustumPlanes.w;\n\n // if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n // {\n // var frustumWidth = right - left;\n // var frustumHeight = top - bottom;\n // pixelWidth = frustumWidth / width;\n // pixelHeight = frustumHeight / height;\n // }\n // else\n // {\n var distanceToPixel = -positionEC.z;\n var inverseNear = 1.0 / Scene.uCurrentFrustum.x;\n var tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n //}\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}",clip="\n#ifdef CLIP\n\nconst clip_lineWidth = 3.0;\n\nfn GetClipDistance(pos : vec3<f32>, planeNormal : vec3<f32>, disToOrigin : f32) -> f32\n{\n\treturn dot(planeNormal, pos) + disToOrigin;\n}\n\nfn ClipBehindAllPlane(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n var distance = 0.0;\n var result = -1.0;\n #ifdef CLIPPLANE\n distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[0].xyz, Layer.uClipPlanes[0].w);\n if (distance < 0.0)\n {\n return 1.0;\n }\n else if (distance < fBorderWidth)\n {\n result = 0.0;\n }\n #else\n var i : u32;\n for(i = 0; i < 6; i++)\n {\n distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[i].xyz, Layer.uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return 1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n #endif\n return result;\n}\n\nfn ClipBehindAnyPlane(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n var result = 1.0;\n var i : u32;\n for(i = 0; i < 6; i++)\n {\n var distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[i].xyz, Layer.uClipPlanes[i].w);\n if((distance + fBorderWidth) < 0.0)\n {\n return -1.0;\n }\n else if(distance < 0.0)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nfn ClipAnythingButLine(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n var result = -1.0;\n var i : u32;\n for(i = 0; i < 6; i++)\n {\n var distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[i].xyz, Layer.uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return -1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nfn clip(clip_vertex : vec4<f32>, fIsFiltByID : f32) -> f32\n{\n if(fIsFiltByID < 0.1)\n {\n return 1.0;\n }\n if(Layer.uClipMode < 0.5)\n {\n return 1.0;\n }\n var fBorderWidth = 1.0;\n var clipResult = 1.0;\n if(Layer.uClipLineColor.a < 0.01)\n {\n fBorderWidth = 0.0;\n }\n if(Layer.uClipMode < 1.5)\n {\n clipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n }\n else if(Layer.uClipMode < 2.5)\n {\n clipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n }\n else if(Layer.uClipMode < 3.5)\n {\n clipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n }\n return clipResult;\n}\n#endif\n",calcTexCoordDecl="\n#ifdef TexCoord\n varying vTexCoord : vec4<f32>;\n varying vTexCoordZ : vec2<f32>;\n#endif\n\n#ifndef TextureBatch\n#ifdef MULTI_TEX\n varying vTexMatrix2 : vec4<f32>;\n#endif\n#endif\n\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef TextureBatch\n varying vTexTran : vec4<f32>;\n varying vTexScale : vec4<f32>;\n varying vTexSize : vec4<f32>;\n varying vMaxMipLevel : vec2<f32>;\n#else\n varying vTexMatrix : vec4<f32>;\n#endif\n\n#include <calculateMipLevel>\n\n #ifdef TextureBatch\n fn getBatchUV(uv : vec2<f32>, translate : vec2<f32>, scale : vec2<f32>, dim : vec2<f32>, mipLevel : f32) -> vec2<f32>\n {\n var temp : f32;\n var texTranslate = vec2(translate.x, translate.y);\t\n if(mipLevel > 0.0)\n {\n texTranslate.x = translate.x + scale.x;\n temp = pow(2.0, mipLevel - 1.0);\n texTranslate.y = translate.y + scale.y * (temp - 1.0) / temp;\n }\n var texScale = 1.0 / pow(2.0, mipLevel);\n var outUV = fract(uv);\n var offsetX = pow(2.0, mipLevel) / dim.x;\n var offsetY = pow(2.0, mipLevel) / dim.y;\n outUV.x = clamp(outUV.x, 0.0 + offsetX, 1.0 - offsetX);\n outUV.y = clamp(outUV.y, 0.0 + offsetY, 1.0 - offsetY);\n outUV.x = outUV.x * texScale * scale.x + texTranslate.x;\n outUV.y = outUV.y * texScale * scale.y + texTranslate.y;\n return outUV;\n }\n #else\n fn getUV(uv : vec2<f32>, translate : vec2<f32>, uvOffset : vec4<f32>, scale : f32, width : f32, mipLevel : f32, texCoordZ : f32) -> vec2<f32> {\n var texCoord : vec2<f32>;\n var offset : f32;\n if ((texCoordZ < -9000.0f)) {\n texCoord = vec2<f32>(uv.x, uv.y);\n } else {\n texCoord = fract(uv);\n offset = (pow(2.0f, mipLevel) / width);\n texCoord = clamp(texCoord, vec2<f32>(offset, offset), vec2<f32>(1.0f - offset, 1.0f - offset));\n texCoord.x = ((texCoord.x + translate.x) * scale);\n texCoord.y = ((texCoord.y + translate.y) * scale);\n }\n texCoord = ((texCoord * vec2<f32>(uvOffset.z, uvOffset.w)) + vec2<f32>(uvOffset.x, uvOffset.y));\n return texCoord;\n }\n #endif\n // end TextureBatch\n\n#endif\n// end COMPUTE_TEXCOORD\n",getEmissiveTextureAtlasColor="\n#ifdef EMISSION_TEXTURE_ATLAS\nvar uEmissionTexAtlas : texture_2d<f32>;\nvar uEmissionTexAtlasSampler : sampler;\nvarying vLayerTexCoord : vec2<f32>;\nvarying vModIndexAndTexIndex : vec2<f32>;\nfn getEmissiveTextureAtlasColor(w : f32) -> vec3<f32>\n{\n var texColor = vec3<f32>(0.0);\n var emissionTexCoord : vec2<f32>;\n var nEmissionTexTexIdx = i32(floor(vModIndexAndTexIndex.y + 0.5));\n var atlasTexCoord : vec2<f32>;\n for(var i : i32 = 0; i < i32(Layer.uEmissionTexAtlasCount); i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = length(vLayerTexCoord) * Layer.uLayerCornerLength / Layer.uEmissionTexAtlasTilingAndOffset[i].x - floor(length(vLayerTexCoord) * Layer.uLayerCornerLength / Layer.uEmissionTexAtlasTilingAndOffset[i].x);\n emissionTexCoord.y = (w - Layer.uMinCategoryOrHypFloor) / Layer.uEmissionTexAtlasTilingAndOffset[i].y - floor((w - Layer.uMinCategoryOrHypFloor) / Layer.uEmissionTexAtlasTilingAndOffset[i].y);\n emissionTexCoord.x += Layer.uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + Layer.uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.x = fract(emissionTexCoord.x);\n emissionTexCoord.y = fract(emissionTexCoord.y);\n atlasTexCoord = mix(Layer.uEmissionTexAtlasRects[i].xy, Layer.uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = textureSample(uEmissionTexAtlas, uEmissionTexAtlasSampler, atlasTexCoord).rgb;\n var normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n var isNotTopFace = 1.0 - step(0.95, normalMC.z);\n var dayTime = 1.0 - czm_RGBToHSL(Light.uAmbientLightColor.rgb).z;\n var emissionTexColor = Layer.uEmissionColor.rgb * texColor * dayTime * isNotTopFace;\n return emissionTexColor;\n}\n#endif\n",computeWValue="\nfn computeWValue(vertexPos : ptr<function, vec4<f32>>) -> f32{\n var realWValue : f32 = (*vertexPos).w;\n#ifdef HypColorByZValue\n realWValue = (*vertexPos).z;\n#endif\n#ifdef TEXTURE_COORD_ONE_IS_W\n realWValue = aTexCoord0.x;\n#endif\n#ifdef USE_VertexWeight\n realWValue = aVertexWeight;\n #ifdef MultiTemporalWeight\n realWValue = mix(aVertexWeight, aVertexWeight_1, fMultiTemporalFactor);\n #ifdef ChangeZValue\n (*vertexPos).z += realWValue;\n #endif\n #endif\n#endif\n#ifdef COMPUTE_W_VALUE\n wValue = realWValue + Layer.uTranslationAndBottom.w;\n#endif\n return realWValue;\n}\n",setAlphaByWValue="\n#ifdef W_VISIBLE\n var uCategorieTexture : texture_2d<f32>;\n var uCategorieTextureSampler : sampler;\n \n fn setAlphaByWValue(w : f32, color : ptr<function, vec4<f32>>)\n {\n var category_u = abs(w - Layer.uMinCategory);\n var category_y = ceil(category_u / Layer.uCategoryWidht) / Layer.uCategoryHeight - 0.5 / Layer.uCategoryHeight;\n var category_x = (category_u - Layer.uCategoryWidht * floor(category_u / Layer.uCategoryWidht)) / Layer.uCategoryWidht + 0.5 / Layer.uCategoryWidht;\n var categoryTexCoord = vec2<f32>(category_x , category_y);\n var category = textureSampleLevel(uCategorieTexture, uCategorieTextureSampler, categoryTexCoord, 0.0f).a;\n (*color).a *= 1.0 - category;\n }\n#endif\n",adjustColor="\n#ifdef ADJUST_COLOR\nfn adjustColor(inputColor : vec3<f32>) ->vec3<f32>\n{\n var outputColor : vec3<f32> = inputColor;\n outputColor = mix(vec3(0.0), outputColor.rgb, Layer.uBrightness);\n outputColor = mix(vec3(0.5), outputColor.rgb, Layer.uContrast);\n outputColor = czm_hue(outputColor.rgb, Layer.uHue);\n outputColor = clamp(outputColor.rgb, vec3<f32>(0.0), vec3<f32>(1.0));\n outputColor = czm_saturation(outputColor.rgb, Layer.uSaturation);\n outputColor = pow(outputColor.rgb, vec3(Layer.uOneOverGamma));\n return outputColor;\n}\n#endif\n",calculatePolyTexCoord="\nfn calculatePolyTexCoord(vertexPos: vec4<f32>, rectPos : vec4<f32>, ptInRect : ptr<function, f32>) -> vec2<f32>\n{\n var realVertexPos = vertexPos;\n var vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n var texCoord = vec2(realVertexPos.x - rectPos.x, realVertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n (*ptInRect) = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\n",getVertexByFlatten="\n#ifdef FALTTEN\n var uFlattenTexture : texture_2d<f32>;\n var uFlattenTextureSampler : sampler;\n\n fn getVertexByFlatten(posInLayerCoord : vec4<f32>, layerBottom : f32) -> vec4<f32>\n {\n var vecPos = Mesh.uGeoMatrix * vec4(posInLayerCoord.xyz, 1.0);\n var vecRatio = vec2(Layer.uRect.z - Layer.uRect.x, Layer.uRect.w - Layer.uRect.y);\n var vecTexCoord = vec2(vecPos.x - Layer.uRect.x, vecPos.y - Layer.uRect.y);\n vecTexCoord.x = vecTexCoord.x / vecRatio.x;\n vecTexCoord.y = vecTexCoord.y / vecRatio.y;\n if(vecTexCoord.x > 1.0 || vecTexCoord.x < 0.0 || vecTexCoord.y > 1.0 || vecTexCoord.y < 0.0)\n {\n return posInLayerCoord;\n }\n var value = textureSampleLevel(uFlattenTexture, uFlattenTextureSampler, vecTexCoord.xy, 0.0);\n #ifdef UseFloatTexture\n var fHeight = value.r;\n #else\n var fHeight = czm_unpackValue(value);\n #endif\n if(vecPos.z > fHeight && value.a > 0.5)\n {\n var fDepthOffset = clamp((Layer.uCameraHeight - fHeight - layerBottom) * 0.0001 * (vecPos.z + layerBottom - fHeight), 0.001, 3.0);\n vecPos.z = fHeight + fDepthOffset;\n vecPos.w = vecPos.z;\n }\n return Mesh.uInverseGeoMatrix * vec4(vecPos.xyz, 1.0);\n }\n#endif\n",HypSometric="\n#ifdef HYPSOMETRIC\n#include <getVolumeValue>\n\nvar uHypsometricTexture : texture_2d<f32>;\nvar uHypsometricTextureSampler : sampler;\nvar uHypsometricRenderTexture : texture_2d<f32>;\nvar uHypsometricRenderTextureSampler : sampler;\n\nvarying vecHypTexCoord : vec2<f32>;\n#ifdef Volume\nvarying vecRotioCoord : vec3<f32>;\n#endif\n\nfn computeMixCon(fValue : f32) -> f32\n{\n var distanceToContour : f32;\n if(abs(Layer.uHypMaxVisibleValue - Layer.uHypMinVisibleValue) > 0.1)\n {\n if(fValue < 0.5)\n {\n var t = fValue - 0.0002;\n var m = t - floor(t / Layer.uHypContourInterval) * Layer.uHypContourInterval;\n distanceToContour = m;\n }\n else\n {\n var t = floor(fValue / Layer.uHypContourInterval);\n distanceToContour = abs(fValue - (t * Layer.uHypContourInterval) - 0.1);\n }\n }\n else\n {\n distanceToContour = abs(fValue - Layer.uHypMaxVisibleValue);\n }\n var dxc = abs(dpdx(fValue));\n var dyc = abs(dpdy(fValue));\n var dF = max(dxc, dyc);\n if(distanceToContour < dF){\n return 1.0;\n }\n else{\n return 0.0;\n }\n}\n\nfn computeContourMapColor(fValue : f32) -> vec4<f32>\n{\n var threshold = abs(Layer.uHypCeil - Layer.uHypFloor);\n var contourRate = (fValue - Layer.uHypFloor) / threshold;\n var finalCoord = clamp(contourRate, 0.0, 1.0);\n var count = floor(finalCoord * 16.0);\n var y = (count*2.0 + 1.0)/32.0;\n var x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n var contourCoord = vec2(x, y);\n return textureSampleLevel(uHypsometricTexture, uHypsometricTextureSampler, contourCoord, 0.0).rgba;\n}\n\nfn branchFreeTernary(comparison : bool, a : f32, b : f32) ->f32\n{\n var useA = f32(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\nfn getContourMapColor(oriColor : vec4<f32>, inValue : f32) -> vec4<f32>\n{\n var fValue = inValue;\n var contourMapColor = vec4(0.0);\n var finalOpacity = Layer.uHypOpacity;\n var output = vec4<f32>(0.0);\n#ifdef Volume\nvar aRatioT = vecRotioCoord;\n if((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n {\n if(S3MVolume.uVolumeType > 0.5)\n {\n var volumeColor = getVolumeValue(aRatioT);\n if(Layer.uMixColorType > 0.5)\n {\n volumeColor = volumeColor * oriColor;\n }\n output = volumeColor;\n }\n var noValue : f32;\n var texTest = getVolumeValueWithNoValue(aRatioT, &noValue);\n if(noValue > 0.5)\n {\n fValue = Layer.uDataFloor + texTest * (Layer.uDataCeil - Layer.uDataFloor);\n }\n else\n {\n fValue = Layer.uHypMaxVisibleValue + abs(Layer.uHypMaxVisibleValue * 0.1);\n }\n }\n else\n {\n fValue = Layer.uHypMaxVisibleValue + abs(Layer.uHypMaxVisibleValue * 0.1);\n }\n#endif\n var extendHeight = branchFreeTernary(Layer.uHypContourFillMode > 2.9, 0.0, branchFreeTernary(Layer.uHypContourFillMode > 1.9, 5.0, 0.0));\n var mixCon = computeMixCon(fValue);\n if(length(output) > 0.0 )\n {\n return output;\n }\n if(fValue > Layer.uHypMaxVisibleValue + extendHeight || fValue < Layer.uHypMinVisibleValue - extendHeight)\n {\n return Layer.uNoValueColor * oriColor;\n }\n if(Layer.uHypContourFillMode > 2.9)\n {\n var mix_con = mixCon;\n contourMapColor = mix(computeContourMapColor(fValue), Layer.uHypLineColor, mix_con);\n }\n else if(Layer.uHypContourFillMode > 1.9)\n {\n finalOpacity = mixCon;\n contourMapColor = Layer.uHypLineColor;\n }\n else if(Layer.uHypContourFillMode > 0.9)\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n var finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n finalColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n#endif\n return finalColor;\n}\n\n#ifdef Volume2\nfn getContourValue(volColor : vec4<f32>) -> f32\n{\n var noValue = volColor.a;\n var texTest = clamp(czm_unpackVolume(volColor.zyx), 0.0, 1.0);\n\n var fValue;\n if(noValue > 0.5)\n {\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = Layer.uHypMaxVisibleValue + abs(Layer.uHypMaxVisibleValue * 0.1);\n }\n \n return fValue;\n}\n\nfn getHypsometricColor(oriColor : vec4<f32>, volColor : vec4<f32>) -> vec4<f32>\n{\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var hypColor = textureSample(uHypsometricRenderTexture, uHypsometricRenderTextureSampler, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n \n if(uFilterMode > 0.5) {\n var finalColor = volColor * oriColor;\n\n if(Layer.uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n \n var fValue = getContourValue(volColor);\n return getContourMapColor(oriColor, fValue);\n}\n\n#else\n\nfn getHypsometricColor(oriColor : vec4<f32>, wValue : f32)-> vec4<f32>\n{\n var fValue = wValue;\n var output : vec4<f32> = getContourMapColor(oriColor, fValue);\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var hypColor = textureSample(uHypsometricRenderTexture, uHypsometricRenderTextureSampler, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return output;\n}\n\nfn getHypsometricColorByGeoBounds(oriColor : vec4<f32>, wValue : f32, hypRect : vec4<f32>, vTexCoord : vec2<f32>, geoBounds : vec4<f32>) -> vec4<f32>\n{\n var output : vec4<f32> = getContourMapColor(oriColor, wValue);\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n var hypColor = textureSample(uHypsometricRenderTexture, uHypsometricRenderTextureSampler, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return output;\n}\n#endif\n\n#endif\n",getVolumeValue="\n#ifdef Volume\nvar uVolumeTexture : texture_2d<f32>;\nvar uVolumeTextureSampler : sampler;\n\n#ifdef TIME_ORDER\nvar uNextVolumeTexture : texture_2d<f32>;\nvar uNextVolumeTextureSampler : sampler;\nuniform uTimeRatio : f32;\n#endif\n\nfn unpackVolume(packedDepth : vec3<f32>) -> f32\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\nfn computeVolumeTextureCoord(texCoord : vec3<f32>, fLevel : f32) -> vec2<f32>\n{\n var yOffset = floor((fLevel+0.25/ S3MVolume.uVolSideBlockCount) / S3MVolume.uVolSideBlockCount);\n var xOffset = fLevel - yOffset * S3MVolume.uVolSideBlockCount;\n var texCoordV = (texCoord.y * S3MVolume.uVolHeight + yOffset * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n var texCoordU = (texCoord.x * S3MVolume.uVolWidth + xOffset * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfn computeVolumeValue(topVolumeValue : vec4<f32>, bottomVolumeValue : vec4<f32>, inRatio : f32, noValue : ptr<function, f32>) -> f32\n{\n var ratio = inRatio;\n var fValue1 = clamp(unpackVolume(topVolumeValue.xyz),0.0,1.0);\n var fValue2 = clamp(unpackVolume(bottomVolumeValue.xyz),0.0,1.0);\n if(S3MVolume.uVolFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n (*noValue) = mix(topVolumeValue.a, bottomVolumeValue.a, ratio);\n if(topVolumeValue.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(bottomVolumeValue.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfn getVolumeValueWithNoValue(texCoord : vec3<f32>, noValue : ptr<function, f32>) -> f32\n{\n var fLevel = (S3MVolume.uVolDepth - 1.0) * texCoord.z;\n var bottomLevel= floor(fLevel);\n var topLevel = bottomLevel + 1.0;\n var ratio = topLevel - fLevel;\n var topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n var bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n\n var topVolumeValue = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, topTexCoord, 0.0);\n var bottomVolumeValue = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, bottomTexCoord, 0.0);\n var fResult = computeVolumeValue(topVolumeValue, bottomVolumeValue, ratio, noValue);\n#ifdef TIME_ORDER\n var topNextVolumeValue = textureSampleLevel(uNextVolumeTexture, uNextVolumeTextureSampler, topTexCoord, 0.0);\n var bottomNextVolumeValue = textureSampleLevel(uNextVolumeTexture, uNextVolumeTextureSampler, bottomTexCoord, 0.0);\n var fNextResult = computeVolumeValue(topNextVolumeValue, bottomNextVolumeValue, ratio, noValue);\n fResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\n return fResult;\n}\n\nfn getVolumeValue(texCoord : vec3<f32>) -> vec4<f32>\n{\n\tvar fLevel = (S3MVolume.uVolDepth - 1.0) * texCoord.z;\n\tvar bottomLevel= floor(fLevel);\n\tvar topLevel = bottomLevel + 1.0;\n\tvar ratio = topLevel - fLevel;\n\tvar yOffset1 = floor((topLevel+0.25/ S3MVolume.uVolSideBlockCount) / S3MVolume.uVolSideBlockCount);\n\tvar xOffset1 = topLevel - yOffset1 * S3MVolume.uVolSideBlockCount;\n\tvar texCoordV1 = (texCoord.y * S3MVolume.uVolHeight + yOffset1 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar texCoordU1 = (texCoord.x * S3MVolume.uVolWidth + xOffset1 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar volumeColor1 = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, vec2(texCoordU1,texCoordV1), 0.0);\n\tvar yOffset2 = floor((bottomLevel+0.25 / S3MVolume.uVolSideBlockCount) / S3MVolume.uVolSideBlockCount);\n\tvar xOffset2 = bottomLevel - yOffset2 * S3MVolume.uVolSideBlockCount;\n\tvar texCoordV2 = (texCoord.y * S3MVolume.uVolHeight + yOffset2 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar texCoordU2 = (texCoord.x * S3MVolume.uVolWidth + xOffset2 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar volumeColor2 = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, vec2(texCoordU2, texCoordV2), 0.0);\n\n\tif(S3MVolume.uVolFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvar volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif\n",splitClip="\n#ifdef APPLY_SWIPE\nfn rollerShutter(coord : vec2<f32>, region : vec4<f32>)\n{\n var f = step(region.xw, coord);\n var s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n#endif\n",executeExcavation="\n#ifdef EXCAVATION\nvar uExcavationTexture : texture_2d<f32>;\nvar uExcavationTextureSampler : sampler;\nvarying vExcavationVertexPos : vec4<f32>;\nfn executeExcavation() -> bool\n{\n var hasExcavation = 1.0;\n var vecExcavationTexCoord = calculatePolyTexCoord(vExcavationVertexPos, Layer.uExcavationRect, &hasExcavation);\n var excavationInside = (Layer.uExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n \n if(excavationInside)\n {\n return textureSampleLevel(uExcavationTexture, uExcavationTextureSampler, vecExcavationTexCoord.xy, 0.0).r > 0.5;\n }\n \n return textureSampleLevel(uExcavationTexture, uExcavationTextureSampler, vecExcavationTexCoord.xy, 0.0).r < 0.5;\n}\n#endif\n",S3MVolumeUboDecl="\nstruct S3MVolumeUBO {\n uVolSideBlockCount : f32,\n uVolBlockLength : f32,\n uVolTexLength : f32,\n uVolWidth : f32,\n uVolHeight : f32,\n uVolDepth : f32,\n uVolFilterMode : f32,\n uVolumeType : f32\n};\nvar<uniform> S3MVolume : S3MVolumeUBO;\n",sketchMode="\nvar uNormalDepthTexture : texture_2d<f32>;\nvar uNormalDepthTextureSampler : sampler;\nfn edgeDetection(lineWidth : f32) -> f32\n{\n var center : vec2<f32> = gl_FragCoord.xy / uniforms.czm_globeDepthTextureDim.xy;\n var off : vec2<f32> = lineWidth / uniforms.czm_globeDepthTextureDim.xy;\n var tex_nw : vec4<f32> = vec4<f32>(center.x+off.x, center.y+off.y, 1.0f, 1.0f);\n var val_nw : vec4<f32> = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_nw.xy);\n val_nw.x = ((val_nw.xyz * 2.0f) - 1.0f).x;\n val_nw.y = ((val_nw.xyz * 2.0f) - 1.0f).y;\n val_nw.z = ((val_nw.xyz * 2.0f) - 1.0f).z;\n var tex_ne = vec4<f32>(center.x-off.x, center.y+off.y, 1.0f, 1.0f);\n var val_ne : vec4<f32> = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_ne.xy);\n val_ne.x = ((val_ne.xyz * 2.0f) - 1.0f).x;\n val_ne.y = ((val_ne.xyz * 2.0f) - 1.0f).y;\n val_ne.z = ((val_ne.xyz * 2.0f) - 1.0f).z;\n var tex_sw = vec4<f32>(center.x+off.x, center.y-off.y, 1.0, 1.0);\n var val_sw : vec4<f32> = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_sw.xy);\n val_sw.x = ((val_sw.xyz * 2.0 ) - 1.0).x;\n val_sw.y = ((val_sw.xyz * 2.0 ) - 1.0).y;\n val_sw.z = ((val_sw.xyz * 2.0 ) - 1.0).z;\n var tex_se = vec4<f32>(center.x-off.x, center.y-off.y, 1.0f, 1.0f);\n var val_se : vec4<f32> = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_se.xy);\n val_se.x = ((val_se.xyz * 2.0) - 1.0).x;\n val_se.y = ((val_se.xyz * 2.0) - 1.0).y;\n val_se.z = ((val_se.xyz * 2.0) - 1.0).z;\n var discontinuity = 0.0f;\n var dot0 = dot(val_nw.xyz, val_se.xyz);\n var dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nfn sketchMode(inputColor : vec4<f32>, lineColor : vec4<f32>, lineWidth : f32) -> vec4<f32>\n{\n var outputColor = inputColor;\n var discontinuity : f32 = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0f, 1.0f);\n if(Layer.uFillStyle == 1.0f)\n {\n outputColor = lineColor;\n outputColor.a = (1.0f - sign(discontinuity - 0.5f)) * 0.5f;\n outputColor.a *= lineColor.a;\n }\n else\n {\n var mixLineColor : vec3<f32> = mix(inputColor.rgb, vec3<f32>(lineColor.rgb), lineColor.a);\n var outColor = mix(mixLineColor, inputColor.rgb, discontinuity);\n outputColor.r = outColor.r;\n outputColor.g = outColor.g;\n outputColor.b = outColor.b;\n }\n return outputColor;\n}\n";const ShaderChunk={preClipFS:preClipFS,writeFragDepth:writeFragDepth,renderNormal:renderNormal,renderNormalAndDepth:renderNormalAndDepth,renderPrePass:renderPrePass,calculateMipLevel:calculateMipLevel,getTextureColorDecl:getTextureColorDecl,rainDecl:rainDecl,snowDecl:snowDecl,directionLightDecl:directionLightDecl,hemisphereLightDecl:hemisphereLightDecl,pointLightDecl:pointLightDecl,spotLightDecl:spotLightDecl,lightSourceImpl:lightSourceImpl,brdf:brdf,S3MVertexFactory:S3MVertexFactory,getUVMatrixDecl:getUVMatrixDecl,S3MOperationFSDecl:S3MOperationFSDecl,shadowReceive:shadowReceive,shadowVisibility:shadowVisibility,cubeUV_reflection:cubeUV_reflection,LightUBODecl:LightUBODecl,MaterialUboDecl:MaterialUboDecl,MeshUboDecl:MeshUboDecl,LayerUboDecl:LayerUboDecl,SceneUboDecl:k$Y,ShadowUboDecl:ShadowUboDecl,blinnPhong:blinnPhong,shaderModelBase:shaderModelBase,getEnvironmentColor:getEnvironmentColor,getMetersPerPixel:getMetersPerPixel,clip:clip,calcTexCoordDecl:calcTexCoordDecl,getEmissiveTextureAtlasColor:getEmissiveTextureAtlasColor,computeWValue:computeWValue,setAlphaByWValue:setAlphaByWValue,adjustColor:adjustColor,calculatePolyTexCoord:calculatePolyTexCoord,getVertexByFlatten:getVertexByFlatten,HypSometric:HypSometric,getVolumeValue:getVolumeValue,splitClip:splitClip,executeExcavation:executeExcavation,S3MVolumeUboDecl:S3MVolumeUboDecl,sketchMode:sketchMode};var _0x13322b=(_0x2de151=!0,function(e,t){var i=_0x2de151?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2de151=!1,i}),_0x2c76d7=_0x13322b(void 0,(function(){return _0x2c76d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c76d7).search("(((.+)+)+)+$")})),_0x2de151;function _0x49c0df(){this.children=[]}_0x2c76d7(),_0x49c0df.prototype.isValid=function(e){return!0},_0x49c0df.prototype.process=function(e,t){var i="";if(this.line){var n=this.line,r=t.processor;if(r){if(r.lineProcessor&&(n=r.lineProcessor(n,t.isFragment,t.processingContext)),r.attributeProcessor&&this.line.startsWith("attribute"))n=r.attributeProcessor(this.line,e,t.processingContext);else if(r.varyingProcessor&&this.line.startsWith("varying"))n=r.varyingProcessor(this.line,t.isFragment,e,t.processingContext);else if(r.uniformProcessor&&r.uniformRegexp&&r.uniformRegexp.test(this.line))!t.lookForClosingBracketForUniformBuffer&&(n=r.uniformProcessor(this.line,t.isFragment,e,t.processingContext));else if(r.uniformBufferProcessor&&r.uniformBufferRegexp&&r.uniformBufferRegexp.test(this.line))!t.lookForClosingBracketForUniformBuffer&&(n=r.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0);else if(r.textureProcessor&&r.textureRegexp&&r.textureRegexp.test(this.line))n=r.textureProcessor(this.line,t.isFragment,e,t.processingContext);else if((r.uniformProcessor||r.uniformBufferProcessor)&&this.line.startsWith("uniform")&&!t.lookForClosingBracketForUniformBuffer){/uniform\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/.test(this.line)?r.uniformProcessor&&(n=r.uniformProcessor(this.line,t.isFragment,e,t.processingContext)):r.uniformBufferProcessor&&(n=r.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0)}t.lookForClosingBracketForUniformBuffer&&-1!==this.line.indexOf("}")&&(t.lookForClosingBracketForUniformBuffer=!1,r.endOfUniformBufferProcessor&&(n=r.endOfUniformBufferProcessor(this.line,t.isFragment,t.processingContext)))}i+=n+"\r\n"}return this.children.forEach((function(n){i+=n.process(e,t)})),this.additionalDefineKey&&(e[this.additionalDefineKey]=this.additionalDefineValue||"true"),i};var _0x3ded8d=(_0x236fdd=!0,function(e,t){var i=_0x236fdd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x236fdd=!1,i}),_0x4534e0=_0x3ded8d(void 0,(function(){return _0x4534e0.toString().search("(((.+)+)+)+$").toString().constructor(_0x4534e0).search("(((.+)+)+)+$")})),_0x236fdd;function _0xc6c5af(){}_0x4534e0(),Object.defineProperty(_0xc6c5af.prototype,"currentLine",{get:function(){return this._lines[this.lineIndex]},enumerable:!1,configurable:!0}),Object.defineProperty(_0xc6c5af.prototype,"canRead",{get:function(){return this.lineIndex<this._lines.length-1},enumerable:!1,configurable:!0}),Object.defineProperty(_0xc6c5af.prototype,"lines",{set:function(e){this._lines=[];for(var t=0,i=e;t<i.length;t++){var n=i[t];if("#"!==n[0])if(n.trim().startsWith("//"))this._lines.push(n);else for(var r=n.split(";"),o=0;o<r.length;o++){var a=r[o];(a=a.trim())&&this._lines.push(a+(o!==r.length-1?";":""))}else this._lines.push(n)}},enumerable:!1,configurable:!0});var _0x102a06=(_0xada296=!0,function(e,t){var i=_0xada296?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xada296=!1,i}),_0x343a7b=_0x102a06(void 0,(function(){return _0x343a7b.toString().search("(((.+)+)+)+$").toString().constructor(_0x343a7b).search("(((.+)+)+)+$")})),_0xada296;function _0x333a0f(){return null!==_0x49c0df&&_0x49c0df.apply(this,arguments)||this}_0x343a7b(),_0x49c0df&&(_0x333a0f.__proto__=_0x49c0df),_0x333a0f.prototype=Object.create(_0x49c0df&&_0x49c0df.prototype),_0x333a0f.prototype.constructor=_0x49c0df,_0x333a0f.prototype.process=function(e,t){for(var i=0;i<this.children.length;i++){var n=this.children[i];if(n.isValid(e))return n.process(e,t)}return""};var _0x5281de=(_0x26ae20=!0,function(e,t){var i=_0x26ae20?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x26ae20=!1,i}),_0x28403e=_0x5281de(void 0,(function(){return _0x28403e.toString().search("(((.+)+)+)+$").toString().constructor(_0x28403e).search("(((.+)+)+)+$")})),_0x26ae20;function _0x46a337(){return null!==_0x49c0df&&_0x49c0df.apply(this,arguments)||this}_0x28403e(),_0x49c0df&&(_0x46a337.__proto__=_0x49c0df),_0x46a337.prototype=Object.create(_0x49c0df&&_0x49c0df.prototype),_0x46a337.prototype.constructor=_0x49c0df,_0x46a337.prototype.isValid=function(e){return this.testExpression.isTrue(e)};var _0x12eda8=(_0x556bc6=!0,function(e,t){var i=_0x556bc6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x556bc6=!1,i}),_0xc0ae60=_0x12eda8(void 0,(function(){return _0xc0ae60.toString().search("(((.+)+)+)+$").toString().constructor(_0xc0ae60).search("(((.+)+)+)+$")})),_0x556bc6;function _0xe37980(){}_0xc0ae60(),_0xe37980.prototype.isTrue=function(e){return!0},_0xe37980.postfixToInfix=function(e){for(var t=[],i=0,n=e;i<n.length;i++){var r=n[i];if(void 0===_0xe37980._OperatorPriority[r])t.push(r);else{var o=t[t.length-1],a=t[t.length-2];t.length-=2,t.push("(".concat(a).concat(r).concat(o,")"))}}return t[t.length-1]},_0xe37980.infixToPostfix=function(e){for(var t=[],i=-1,n=function(){""!==(l=l.trim())&&(t.push(l),l="")},r=function(e){i<_0xe37980._Stack.length-1&&(_0xe37980._Stack[++i]=e)},o=function(){return _0xe37980._Stack[i]},a=function(){return-1===i?"!!INVALID EXPRESSION!!":_0xe37980._Stack[i--]},s=0,l="";s<e.length;){var u=e.charAt(s),c=s<e.length-1?e.substr(s,2):"";if("("===u)l="",r(u);else if(")"===u){for(n();-1!==i&&"("!==o();)t.push(a());a()}else if(_0xe37980._OperatorPriority[c]>1){for(n();-1!==i&&_0xe37980._OperatorPriority[o()]>=_0xe37980._OperatorPriority[c];)t.push(a());r(c),s++}else l+=u;s++}for(n();-1!==i;)"("===o()?a():t.push(a());return t},_0xe37980._OperatorPriority={")":0,"(":1,"||":2,"&&":3},_0xe37980._Stack=["","","","","","","","","","","","","","","","","","","",""];var _0x121ab5=(_0x250a14=!0,function(e,t){var i=_0x250a14?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x250a14=!1,i}),_0x3eaf0b=_0x121ab5(void 0,(function(){return _0x3eaf0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3eaf0b).search("(((.+)+)+)+$")})),_0x250a14;function _0x5c6fd7(e,t){void 0===t&&(t=!1);var i=_0xe37980.call(this)||this;return i.define=e,i.not=t,i}_0x3eaf0b(),_0xe37980&&(_0x5c6fd7.__proto__=_0xe37980),_0x5c6fd7.prototype=Object.create(_0xe37980&&_0xe37980.prototype),_0x5c6fd7.prototype.constructor=_0xe37980,_0x5c6fd7.prototype.isTrue=function(e){var t=void 0!==e[this.define];return this.not&&(t=!t),t};var _0x15cb0d=(_0x1dcc9b=!0,function(e,t){var i=_0x1dcc9b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1dcc9b=!1,i}),_0x1c5186=_0x15cb0d(void 0,(function(){return _0x1c5186.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c5186).search("(((.+)+)+)+$")})),_0x1dcc9b;function _0x35cf83(){return null!==_0xe37980&&_0xe37980.apply(this,arguments)||this}_0x1c5186(),_0xe37980&&(_0x35cf83.__proto__=_0xe37980),_0x35cf83.prototype=Object.create(_0xe37980&&_0xe37980.prototype),_0x35cf83.prototype.constructor=_0xe37980,_0x35cf83.prototype.isTrue=function(e){return this.leftOperand.isTrue(e)||this.rightOperand.isTrue(e)};var _0x4bef0e=(_0x425337=!0,function(e,t){var i=_0x425337?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x425337=!1,i}),_0x517661=_0x4bef0e(void 0,(function(){return _0x517661.toString().search("(((.+)+)+)+$").toString().constructor(_0x517661).search("(((.+)+)+)+$")})),_0x425337;function _0x29f42b(){return null!==_0xe37980&&_0xe37980.apply(this,arguments)||this}_0x517661(),_0xe37980&&(_0x29f42b.__proto__=_0xe37980),_0x29f42b.prototype=Object.create(_0xe37980&&_0xe37980.prototype),_0x29f42b.prototype.constructor=_0xe37980,_0x29f42b.prototype.isTrue=function(e){return this.leftOperand.isTrue(e)&&this.rightOperand.isTrue(e)};var _0x96297d=(_0x123a8e=!0,function(e,t){var i=_0x123a8e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x123a8e=!1,i}),_0x36782c=_0x96297d(void 0,(function(){return _0x36782c.toString().search("(((.+)+)+)+$").toString().constructor(_0x36782c).search("(((.+)+)+)+$")})),_0x123a8e;function _0x3051d6(e,t,i){var n=_0xe37980.call(this)||this;return n.define=e,n.operand=t,n.testValue=i,n}_0x36782c(),_0xe37980&&(_0x3051d6.__proto__=_0xe37980),_0x3051d6.prototype=Object.create(_0xe37980&&_0xe37980.prototype),_0x3051d6.prototype.constructor=_0xe37980,_0x3051d6.prototype.isTrue=function(e){var t=e[this.define];void 0===t&&(t=this.define);var i=!1,n=parseInt(t),r=parseInt(this.testValue);switch(this.operand){case">":i=n>r;break;case"<":i=n<r;break;case"<=":i=n<=r;break;case">=":i=n>=r;break;case"==":i=n===r}return i};var _0x339f31=(_0x149488=!0,function(e,t){var i=_0x149488?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x149488=!1,i}),_0x44114c=_0x339f31(void 0,(function(){return _0x44114c.toString().search("(((.+)+)+)+$").toString().constructor(_0x44114c).search("(((.+)+)+)+$")})),_0x149488;_0x44114c();var _0x22c403=/defined\s*?\((.+?)\)/g,_0x3a531d=/defined\s*?\[(.+?)\]/g,_0x23a037=/#include\s?<(.+)>(\((.*)\))*(\[(.*)\])*/g;function _0x5539b8(){}function O$M(e){return(e=e.replace(/\/\/.*/g,"")).replace(/\/\*\*[\s\S]*?\*\//gm,(function(e){for(var t=e.match(/\n/gm).length,i="",n=0;n<t;++n)i+="\n";return i}))}function k$X(e,t,i,n,r){for(var o,a=0;a<r.length;++a)r[a].name===i&&(o=r[a]);if(!e$2b(o)){n=O$M(n);var s=t.defines;o={name:i,glslSource:n=_0x5539b8.removeUnuseCode(n,s,e._sysShaderDefines),dependsOn:[],requiredBy:[],evaluated:!1},r.push(o)}return o}function z$W(e,t,i,n){if(!i.evaluated){var r=t.useWGSL?s$U._czmBuiltinsAndUniformsWGSL:s$U._czmBuiltinsAndUniforms;i.evaluated=!0;var o=i.glslSource.match(/\bczm_[a-zA-Z0-9_]*/g);e$2b(o)&&null!==o&&(o=o.filter((function(e,t){return o.indexOf(e)===t})),o.forEach((function(o){if(o!==i.name&&r.hasOwnProperty(o)){var a=k$X(e,t,o,r[o],n);i.dependsOn.push(a),a.requiredBy.push(i),z$W(e,t,a,n)}})))}}function F$12(e){for(var t=[],i=[];e.length>0;){var n=e.pop();i.push(n),0===n.requiredBy.length&&t.push(n)}for(;t.length>0;){var r=t.shift();e.push(r);for(var o=0;o<r.dependsOn.length;++o){var a=r.dependsOn[o],s=a.requiredBy.indexOf(r);a.requiredBy.splice(s,1),0===a.requiredBy.length&&t.push(a)}}for(var l=[],u=0;u<i.length;++u)0!==i[u].requiredBy.length&&l.push(i[u]);if(0!==l.length){for(var c="A circular dependency was found in the following built-in functions/structs/constants: \n",h=0;h<l.length;++h)c=c+l[h].name+"\n";throw new t$16(c)}}function A$1a(e,t,i){var n=[],r=k$X(i,e,"main",t,n);z$W(i,e,r,n),F$12(n);for(var o="",a=n.length-1;a>=0;--a)o=o+n[a].glslSource+"\n";return o.replace(r.glslSource,"")}function W$$(e,t,i){var n,r,o="",a=e.sources;if(e$2b(a))for(n=0,r=a.length;n<r;++n)o+="\n"+a[n];o=O$M(o=U$11(!0,o));var s=e.defines;o=_0x5539b8.removeUnuseCode(o,s,i._sysShaderDefines);var l="";e.includeBuiltIns&&(l+=A$1a(e,o,i));return l+="\n",l+=o}function U$11(e,t){return t.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,(function(t,i){var n=e?ShaderChunk[i]:mo$1[i];if(void 0===n)throw new Error("Can not resolve #include <"+i+">");return U$11(e,n)}))}function I$1h(e,t,i){var n,r,o,a="",s=e.sources;if(e$2b(s))for(n=0,r=s.length;n<r;++n)a+="\n"+s[n];a=(a=O$M(a=U$11(!1,a))).replace(/#version\s+(.*?)\n/gm,(function(e,t){if(e$2b(o)&&o!==t)throw new t$16("inconsistent versions found: "+o+" and "+t);return o=t,"\n"}));var l=[];a=(a=a.replace(/#extension.*\n/gm,(function(e){return l.push(e),"\n"}))).replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");var u=e.pickColorQualifier;e$2b(u)&&(a=s$U.createPickFragmentShaderSource(a,u));var c="";e$2b(o)&&(c="#version "+o+"\n");var h=l.length;for(n=0;n<h;n++)c+=l[n];t&&(c+="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\n");var d=e.defines;if(e$2b(d))for(n=0,r=d.length;n<r;++n){var f=d[n];0!==f.length&&(c+="#define "+f+"\n")}if(i.webgl2?(c+="#define OUTPUT_DECLARATION\n\n",c+="#define WEBGL2\n\n",c+="#define texture2DGradEXT textureGrad\n\n",c+="#define texture2DLodEXT textureLod\n\n",c+="#define UBO_PARAM \n\n",c+="#define UBO_DECL_BEGIN(bufferName) uniform bufferName {\n",c+="#define UBO_DECL_END }; \n"):i.webgpu?(c+="#define texture2DGradEXT textureGrad\n\n",c+="#define texture2DLodEXT textureLod\n\n",c+="#define WEBGPU\n\n"):(c+="#define UBO_PARAM uniform \n\n",c+="#define UBO_DECL_BEGIN(bufferName) \n",c+="#define UBO_DECL_END \n"),a=_0x5539b8.removeUnuseCode(a,d,i._sysShaderDefines),i.textureFloatLinear&&(c+="#define OES_texture_float_linear\n\n"),e.includeBuiltIns){var p=A$1a(e,a,i);for(l.length=0,p=p.replace(/#extension.*\n/gm,(function(e){return l.push(e),"\n"})),h=l.length,n=0;n<h;n++)c=l[n]+c;c+=p}return c+="\n",c+=a,i.webgl2&&(c=S$U(c,t)),c}function s$U(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).pickColorQualifier;if(e$2b(t)&&"uniform"!==t&&"varying"!==t)throw new t$16("options.pickColorQualifier must be 'uniform' or 'varying'.");this.defines=e$2b(e.defines)?e.defines.slice(0):[],this.sources=e$2b(e.sources)?e.sources.slice(0):[],this.pickColorQualifier=t,this.includeBuiltIns=u$_(e.includeBuiltIns,!0),this.name=e$2b(e.name)?e.name:void 0,this.useWGSL=u$_(e.useWGSL,!1)}for(var p$$ in _0x5539b8.Initialize=function(e){e.processor&&e.processor.initializeShaders&&e.processor.initializeShaders(e.processingContext)},_0x5539b8.Process=function(e,t,i,n){var r,o=this;(null===(r=t.processor)||void 0===r?void 0:r.preProcessShaderCode)&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),this._ProcessIncludes(e,t,(function(e){t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e));var r=o._ProcessShaderConversion(e,t,n);i(r)}))},_0x5539b8.PreProcess=function(e,t,i,n){var r,o=this;(null===(r=t.processor)||void 0===r?void 0:r.preProcessShaderCode)&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),this._ProcessIncludes(e,t,(function(e){t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e));var r=o._ApplyPreProcessing(e,t,n);i(r)}))},_0x5539b8.Finalize=function(e,t,i){return i.processor&&i.processor.finalizeShaders?i.processor.finalizeShaders(e,t,i.processingContext):{vertexCode:e,fragmentCode:t}},_0x5539b8._ProcessPrecision=function(e,t){var i;if(null===(i=t.processor)||void 0===i?void 0:i.noPrecision)return e;var n=t.shouldUseHighPrecisionShader;return-1===e.indexOf("precision highp float")?e=n?"precision highp float;\n"+e:"precision mediump float;\n"+e:!n&&(e=e.replace("precision highp float","precision mediump float")),e},_0x5539b8._ExtractOperation=function(e){var t=/defined\((.+)\)/.exec(e);if(t&&t.length)return new _0x5c6fd7(t[1].trim(),"!"===e[0]);for(var i="",n=0,r=0,o=["==",">=","<=","<",">"];r<o.length&&(i=o[r],!((n=e.indexOf(i))>-1));r++);return-1===n?new _0x5c6fd7(e):new _0x3051d6(e.substring(0,n).trim(),i,e.substring(n+i.length).trim())},_0x5539b8._BuildSubExpression=function(e){e=e.replace(_0x22c403,"defined[$1]");for(var t=[],i=0,n=_0xe37980.infixToPostfix(e);i<n.length;i++){var r=n[i];if("||"!==r&&"&&"!==r)t.push(r);else if(t.length>=2){var o=t[t.length-1],a=t[t.length-2];t.length-=2;var s="&&"==r?new _0x29f42b:new _0x35cf83;"string"==typeof o&&(o=o.replace(_0x3a531d,"defined($1)")),"string"==typeof a&&(a=a.replace(_0x3a531d,"defined($1)")),s.leftOperand="string"==typeof a?this._ExtractOperation(a):a,s.rightOperand="string"==typeof o?this._ExtractOperation(o):o,t.push(s)}}var l=t[t.length-1];return"string"==typeof l&&(l=l.replace(_0x3a531d,"defined($1)")),"string"==typeof l?this._ExtractOperation(l):l},_0x5539b8._BuildExpression=function(e,t){var i=new _0x46a337,n=e.substring(0,t),r=e.substring(t);return r=r.substring(0,(r.indexOf("//")+1||r.length+1)-1).trim(),i.testExpression="#ifdef"===n?new _0x5c6fd7(r):"#ifndef"===n?new _0x5c6fd7(r,!0):this._BuildSubExpression(r),i},_0x5539b8._MoveCursorWithinIf=function(e,t,i){for(var n=e.currentLine;this._MoveCursor(e,i);){var r=(n=e.currentLine).substring(0,5).toLowerCase();if("#else"===r){var o=new _0x49c0df;return t.children.push(o),void this._MoveCursor(e,o)}if("#elif"===r){var a=this._BuildExpression(n,5);t.children.push(a),i=a}}},_0x5539b8._MoveCursor=function(e,t){for(;e.canRead;){e.lineIndex++;var i=e.currentLine,n=/(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/.exec(i);if(n&&n.length){switch(n[0]){case"#ifdef":var r=new _0x333a0f;t.children.push(r);var o=this._BuildExpression(i,6);r.children.push(o),this._MoveCursorWithinIf(e,r,o);break;case"#else":case"#elif":return!0;case"#endif":return!1;case"#ifndef":r=new _0x333a0f;t.children.push(r);o=this._BuildExpression(i,7);r.children.push(o),this._MoveCursorWithinIf(e,r,o);break;case"#if":r=new _0x333a0f,o=this._BuildExpression(i,3);t.children.push(r),r.children.push(o),this._MoveCursorWithinIf(e,r,o)}}else{var a=new _0x49c0df;if(a.line=i,t.children.push(a),"#"===i[0]&&"d"===i[1]){var s=i.replace(";","").split(" ");a.additionalDefineKey=s[1],3===s.length&&(a.additionalDefineValue=s[2])}}}return!1},_0x5539b8._EvaluatePreProcessors=function(e,t,i){var n=new _0x49c0df,r=new _0xc6c5af;return r.lineIndex=-1,r.lines=e.split("\n"),this._MoveCursor(r,n),n.process(t,i)},_0x5539b8.removeUnuseCode=function(e,t,i){for(var n={},r=0,o=t.concat(i);r<o.length;r++){var a=o[r].replace("#define","").replace(";","").trim().split(" ");n[a[0]]=a.length>1?a[1]:""}var s=new _0x49c0df,l=new _0xc6c5af;return l.lineIndex=-1,l.lines=e.split("\n"),this._MoveCursor(l,s),s.process(n,{processor:{}})},_0x5539b8._PreparePreProcessors=function(e,t){for(var i,n={},r=0,o=e.defines;r<o.length;r++){var a=o[r].replace("#define","").replace(";","").trim().split(" ");n[a[0]]=a.length>1?a[1]:""}return(null===(i=e.processor)||void 0===i?void 0:i.shaderLanguage)===_0x4cf79a.GLSL&&(n.GL_ES="true"),n.__VERSION__=e.version,n[e.platformName]="true",t._getGlobalDefines(n),n},_0x5539b8._ProcessShaderConversion=function(e,t,i){var n=this._ProcessPrecision(e,t);if(!t.processor)return n;if(t.processor.shaderLanguage===_0x4cf79a.GLSL&&-1!==n.indexOf("#version 3"))return n.replace("#version 300 es","");var r=t.defines,o=this._PreparePreProcessors(t,i);return t.processor.preProcessor&&(n=t.processor.preProcessor(n,r,t.isFragment,t.processingContext)),n=this._EvaluatePreProcessors(n,o,t),t.processor.postProcessor&&(n=t.processor.postProcessor(n,r,t.isFragment,t.processingContext,i)),i._features.needShaderCodeInlining&&(n=i.inlineShaderCode(n)),n},_0x5539b8._ApplyPreProcessing=function(e,t,i){var n,r,o=e,a=t.defines,s=this._PreparePreProcessors(t,i);return(null===(n=t.processor)||void 0===n?void 0:n.preProcessor)&&(o=t.processor.preProcessor(o,a,t.isFragment,t.processingContext)),o=this._EvaluatePreProcessors(o,s,t),(null===(r=t.processor)||void 0===r?void 0:r.postProcessor)&&(o=t.processor.postProcessor(o,a,t.isFragment,t.processingContext,i)),i._features.needShaderCodeInlining&&(o=i.inlineShaderCode(o)),o},_0x5539b8._ProcessIncludes=function(e,t,i){for(var n=this,r=_0x23a037.exec(e),o=new String(e),a=!1,s=function(){var s=r[1];if(-1!==s.indexOf("__decl__")&&(s=s.replace(/__decl__/,""),t.supportsUniformBuffers&&(s=(s=s.replace(/Vertex/,"Ubo")).replace(/Fragment/,"Ubo")),s+="Declaration"),!t.includesShadersStore[s]){var l=t.shadersRepository+"ShadersInclude/"+s+".fx";return _0x5539b8._FileToolsLoadFile(l,(function(e){t.includesShadersStore[s]=e,n._ProcessIncludes(o,t,i)})),{value:void 0}}var u=t.includesShadersStore[s];if(r[2])for(var c=r[3].split(","),h=0;h<c.length;h+=2){var d=new RegExp(c[h],"g"),f=c[h+1];u=u.replace(d,f)}if(r[4]){var p=r[5];if(-1!==p.indexOf("..")){var _=p.split(".."),m=parseInt(_[0]),g=parseInt(_[1]),x=u.slice(0);u="",isNaN(g)&&(g=t.indexParameters[_[1]]);for(var v=m;v<g;v++)!t.supportsUniformBuffers&&(x=x.replace(/light\{X\}.(\w*)/g,(function(e,t){return t+"{X}"}))),u+=x.replace(/\{X\}/g,v.toString())+"\n"}else!t.supportsUniformBuffers&&(u=u.replace(/light\{X\}.(\w*)/g,(function(e,t){return t+"{X}"}))),u=u.replace(/\{X\}/g,p)}o=o.replace(r[0],u),a=a||u.indexOf("#include<")>=0||u.indexOf("#include <")>=0,r=_0x23a037.exec(e)};null!=r;){var l=s();if("object"==typeof l)return l.value}a?this._ProcessIncludes(o.toString(),t,i):i(o)},_0x5539b8._FileToolsLoadFile=function(e,t,i,n,r,o){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_9__._WarnImport)("FileTools")},s$U.prototype.clone=function(){return new s$U({sources:this.sources,defines:this.defines,name:this.name,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns,useWGSL:this.useWGSL})},s$U.replaceMain=function(e,t,i){return(i=u$_(i,!1))?s$U._replaceMainWGSL(e,t):s$U._replaceMainGLSL(e,t)},s$U._replaceMainGLSL=function(e,t){return t="void "+t+"()",e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)},s$U._replaceMainWGSL=function(e,t){return t="fn "+t+"()",e.replace(/(@vertex|@fragment)\s+fn\s+main\s*\(input\s+\:\s+(VertexInputs|FragmentInputs)\s*\)\s*->\s*(FragmentInputs|FragmentOutputs)/g,t)},s$U.prototype.getCacheKey=function(e){const t=this.defines.slice().sort().join(","),i=this.pickColorQualifier||"";this.includeBuiltIns;return`${t}:${i}:${this.sources.join("\n")}`},s$U.prototype._getKeyForShaderProgramName=function(){const e=this.defines.slice().sort().join(","),t=this.pickColorQualifier||"";return`${this.name}:${e}:${t}`},s$U.prototype.createCombinedVertexShader=function(e){return e.webgpu&&this.useWGSL?W$$(this,!1,e):I$1h(this,!1,e)},s$U.prototype.createCombinedFragmentShader=function(e){return e.webgpu&&this.useWGSL?W$$(this,!0,e):I$1h(this,!0,e)},s$U._czmBuiltinsAndUniforms={},G$1d)G$1d.hasOwnProperty(p$$)&&(s$U._czmBuiltinsAndUniforms[p$$]=G$1d[p$$]);for(var v$Q in l$19)if(l$19.hasOwnProperty(v$Q)){var _$W=l$19[v$Q];"function"==typeof _$W.getDeclaration&&(s$U._czmBuiltinsAndUniforms[v$Q]=_$W.getDeclaration(v$Q))}for(var p$$ in s$U._czmBuiltinsAndUniformsWGSL={},E$19)E$19.hasOwnProperty(p$$)&&(s$U._czmBuiltinsAndUniformsWGSL[p$$]=E$19[p$$]);for(var v$Q in l$19)if(l$19.hasOwnProperty(v$Q)){var _$W=l$19[v$Q];"function"==typeof _$W.getDeclaration&&(s$U._czmBuiltinsAndUniformsWGSL[v$Q]=_$W.getWgslDeclaration(v$Q))}s$U.createPickVertexShaderSource=function(e){return s$U.replaceMain(e,"czm_old_main")+"\nattribute vec4 pickColor; \nvarying vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n czm_pickColor = pickColor; \n}"},s$U.createPickFragmentShaderSource=function(e,t){return s$U.replaceMain(e,"czm_old_main")+"\n"+(t+" vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = czm_pickColor; \n}")},s$U.findVarying=function(e,t){for(var i=e.sources,n=t.length,r=0;r<n;++r)for(var o=t[r],a=i.length,s=0;s<a;++s)if(-1!==i[s].indexOf(o))return o};var V$V=["v_normalEC","v_normal","aNormal"];s$U.findNormalVarying=function(e){return s$U.findVarying(e,V$V)};var M$15=["v_positionEC"];s$U.findPositionVarying=function(e){return s$U.findVarying(e,M$15)};var Q$_=/UBO_DECL_BEGIN\s*\(\s*(\w+)\s*\)/g,T$10=/UBO_DECL_END/g,R$Y=/UBO_PARAM/g;s$U.replaceUniformBufferMarco=function(e){var t=e.match(Q$_);if(null==t)return e;for(var i=0;i<t.length;i++){var n=t[i],r=/UBO_DECL_BEGIN\s*\(\s*(\w+)\s*\)/g.exec(n)[1];e=e.replace(n,"uniform "+r+" {")}return e=(e=e.replace(T$10,"};")).replace(R$Y,"")};var I$1g=0;function m$Z(e){var t=P$11(e.vertexShaderText,e.fragmentShaderText);this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=u$_(e.attributeLocations,[]),this._transformFeedbackVaryings=e.transformFeedbackVaryings,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._samplerUniforms=void 0,this._valueUniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=t.duplicateUniformNames,this._cachedShader=void 0,this.maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=t.fragmentShaderText,this._name=e.name,this._isS3MTiles=-1!=this._name.indexOf("S3MTiles"),this.id=I$1g++,this._context=e.context,this._useWGSL=u$_(e.useWGSL,!1)}function O$L(e,t){for(var i=e.concat(t.defines),n={},r=0,o=i.length;r<o;r++)if(!e$2b(n[i[r]])&&""!=i[r]){n[i[r]]=1}var a="";for(var s in n){var l="";s.indexOf("#define")&&(l="#define "),a+=l+s+"\n"}return a}function b$1c(e){var t=[],i=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(e$2b(i))for(var n=i.length,r=0;r<n;r++){var o=i[r].trim(),a=o.slice(o.lastIndexOf(" ")+1);t.push(a)}return t}function P$11(e,t){var i={};if(!e$1T.highpFloatSupported||!e$1T.highpIntSupported){var n,r,o,a,s=b$1c(e),l=b$1c(t),u=s.length,c=l.length;for(n=0;n<u;n++)for(r=0;r<c;r++)if(s[n]===l[r]){a="czm_mediump_"+(o=s[n]);var h=new RegExp(o+"\\b","g");t=t.replace(h,a),i[a]=o}}return{fragmentShaderText:t,duplicateUniformNames:i}}function E$17(e,t){var i={},n=[],r=[],o=t.getPipelineContext();if(e$2b(o._leftOverUniformsByName)){var a=o._leftOverUniformsByName;for(var s in a){var l=a[s],u=o.uniformBuffer._uniformArraySizes[s];d=e$2b(u)?j$17(t,s,l,u.arraySize):V$X(t,s,l),i[s]=d,n.push(d)}if(!e){var c=o.shaderProcessingContext.availableTextures;for(var h in c){var d,f=c[h];d=f.isTextureArray?j$17(t,h,"texture2D",f.textures.length):V$X(t,h,"texture2D"),i[h]=d,r.push(d)}}return{uniformsByName:i,valueUniforms:n,samplerUniforms:r}}}function G$1b(e,t){var i=[],n=[];for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=r,s=e._duplicateUniformNames[a];e$2b(s)&&(o.name=s,a=s);var l=l$19[a];e$2b(l)?i.push({uniform:o,automaticUniform:l}):n.push(o)}return{automaticUniforms:i,manualUniforms:n}}function B$Y(e){if(!e._uniformsByName){e._createEffect();var t=E$17(e._isS3MTiles,e._effect),i=G$1b(e,t.uniformsByName);e._uniformsByName=t.uniformsByName,e._valueUniforms=t.valueUniforms,e._samplerUniforms=t.samplerUniforms,e._automaticUniforms=i.automaticUniforms,e._manualUniforms=i.manualUniforms}}function V$U(e,t,i){if(t._bufferIDRecorder.isDirty(e,i))return!0;if(t._vertexArrayID!=t._lastUseVertexArrayID)return t._lastUseVertexArrayID=t._vertexArrayID,!0;var n,r=t._uniformBuffers.length;for(n=0;n<r;++n){if(t._uniformBuffers[n]._isTextureDirty)return!0}return!1}function r$13(e){e.context.webgpu?this._inner=new m$Z(e):this._inner=new g$18(e)}Object.defineProperties(m$Z.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){if(!e$2b(this._vertexAttributes)&&(this._vertexAttributes={},this._effect)){var e=this._effect.getPipelineContext().shaderProcessingContext.availableAttributes;for(const t in e)this._vertexAttributes[t]={name:t,index:e[t]}}return this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return console.log("ShaderProgramGPU.numberOfVertexAttributes.get"),this._numberOfVertexAttributes}},allUniforms:{get:function(){return B$Y(this),this._uniformsByName}},cachedShader:{get:function(){return this._cachedShader},set:function(e){this._cachedShader=e}},name:{get:function(){return this._name}}}),m$Z.prototype._createEffect=function(){if(!this._effect){var e=this._context.engine,t=this._attributeLocations,i=[];if(e$2b(t))for(var n in t)t.hasOwnProperty(n)&&i.push(n);this._useWGSL||(this._vertexShaderText=s$U.replaceUniformBufferMarco(this._vertexShaderText),this._fragmentShaderText=s$U.replaceUniformBufferMarco(this._fragmentShaderText));var r=O$L(this._vertexShaderSource.defines,this._fragmentShaderSource),o=[_0x27131a.SCENE,_0x27131a.LAYER,_0x27131a.WaterLayer,_0x27131a.LIGHT,_0x27131a.MATERIAL,_0x27131a.MESH,_0x27131a.SHADOW,"TileUBO",_0x27131a.Polyline,_0x27131a.S3MVolume];this._effect=e.createEffect(this._name,{attributes:i,uniformsNames:[],uniformBuffersNames:o,samplers:[],defines:r,vertexCode:this._vertexShaderText,fragmentCode:this._fragmentShaderText,shaderLanguage:this._useWGSL?_0x4cf79a.WGSL:_0x4cf79a.GLSL},e),this._drawWrapper=new _0x3422be(e),this._drawWrapper.setEffect(this._effect)}},m$Z.prototype._isReady=function(){return!!this._effect&&this._effect.isReady()},m$Z.prototype._bind=function(){B$Y(this)},m$Z.prototype._setUniforms=function(e,t,i,n){var r,o;if(e$2b(e)){var a=this._manualUniforms;for(r=a.length,o=0;o<r;++o){var s=a[o];s.value=e[s.name]()}}var l=this._automaticUniforms;for(r=l.length,o=0;o<r;++o){var u=l[o];u.uniform.value=u.automaticUniform.getValue(t)}this._context.engine.enableEffect(this._drawWrapper),e$2b(n._bufferIDRecorder)||(n._bufferIDRecorder=new f$Z),this._setUniformsValue();var c=V$U(this._samplerUniforms,n,this._drawWrapper);if(!e$2b(n.bindGroups)||c||n.fastBundleDirty){for(r=n._uniformBuffers.length,o=0;o<r;++o){n._uniformBuffers[o].setToEffect(this._effect)}n._bufferIDRecorder.setBufferIDToContext(this._samplerUniforms),n.removeAllFastBundleAndBindGroups()}},m$Z.prototype._setUniformsValue=function(){var e,t=this._valueUniforms,i=t.length;for(e=0;e<i;++e)t[e].set()},m$Z.prototype.isDestroyed=function(){return!1},m$Z.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)},m$Z.prototype.finalDestroy=function(){return e$2b(this._effect)&&this._effect.dispose(),i$10(this)},r$13.fromCache=function(e){return e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.shaderCache.getShaderProgram(e)},r$13.replaceCache=function(e){return e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.shaderCache.replaceShaderProgram(e)},Object.defineProperties(r$13.prototype,{vertexShaderSource:{get:function(){return this._inner.vertexShaderSource}},fragmentShaderSource:{get:function(){return this._inner.fragmentShaderSource}},vertexAttributes:{get:function(){return this._inner.vertexAttributes}},numberOfVertexAttributes:{get:function(){return this._inner.numberOfVertexAttributes}},allUniforms:{get:function(){return this._inner.allUniforms}},_cachedShader:{get:function(){return this._inner.cachedShader},set:function(e){this._inner.cachedShader=e}},name:{get:function(){return this._inner.name}},program:{get:function(){return this._inner.program}},maximumTextureUnitIndex:{get:function(){return this._inner.maximumTextureUnitIndex}},id:{get:function(){return this._inner.id}},_attributeLocations:{get:function(){return this._inner._attributeLocations}}}),r$13.prototype._bind=function(){this._inner._bind()},r$13.prototype._setUniforms=function(e,t,i,n){this._inner._setUniforms(e,t,i,n)},r$13.prototype._isReady=function(){return this._inner._isReady()},r$13.prototype.isDestroyed=function(){return!1},r$13.prototype.destroy=function(){this._inner.destroy()},r$13.prototype.finalDestroy=function(){return this._inner.finalDestroy(),i$10(this)};var A$19={STREAM_DRAW:de$x.STREAM_DRAW,STATIC_DRAW:de$x.STATIC_DRAW,DYNAMIC_DRAW:de$x.DYNAMIC_DRAW,validate:function(e){return e===A$19.STREAM_DRAW||e===A$19.STATIC_DRAW||e===A$19.DYNAMIC_DRAW}};function h$11(e){if(e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),!e$2b(e.typedArray)&&!e$2b(e.sizeInBytes))throw new t$16("Either options.sizeInBytes or options.typedArray is required.");if(e$2b(e.typedArray)&&e$2b(e.sizeInBytes))throw new t$16("Cannot pass in both options.sizeInBytes and options.typedArray.");if(e$2b(e.typedArray)&&(o$1q.typeOf.object("options.typedArray",e.typedArray),o$1q.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!A$19.validate(e.usage))throw new t$16("usage is invalid.");var t=e.context._gl,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=e$2b(n);a&&(r=n.byteLength),o$1q.typeOf.number.greaterThan("sizeInBytes",r,0);var s=t.createBuffer();t.bindBuffer(i,s),t.bufferData(i,a?n:r,o),t.bindBuffer(i,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this._buffer=s,this.context=e.context,e.context.memorySize+=r}Object.defineProperties(h$11.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),h$11.prototype._getBuffer=function(){return this._buffer},h$11.prototype.copyFromArrayView=function(e,t){t=u$_(t,0),o$1q.defined("arrayView",e),o$1q.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);var i=this._gl,n=this._bufferTarget;i.bindBuffer(n,this._buffer),i.bufferSubData(n,t,e),i.bindBuffer(n,null)},h$11.prototype.copyFromBuffer=function(e,t,i,n){if(!this._webgl2)throw new t$16("A WebGL 2 context is required.");if(!e$2b(e))throw new t$16("readBuffer must be defined.");if(!e$2b(n)||n<=0)throw new t$16("sizeInBytes must be defined and be greater than zero.");if(!e$2b(t)||t<0||t+n>e._sizeInBytes)throw new t$16("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!e$2b(i)||i<0||i+n>this._sizeInBytes)throw new t$16("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(i>=t&&i<t+n||t>i&&t<i+n))throw new t$16("When readBuffer is equal to this, the ranges [readOffset + sizeInBytes) and [writeOffset, writeOffset + sizeInBytes) must not overlap.");if(this._bufferTarget===de$x.ELEMENT_ARRAY_BUFFER&&e._bufferTarget!==de$x.ELEMENT_ARRAY_BUFFER||this._bufferTarget!==de$x.ELEMENT_ARRAY_BUFFER&&e._bufferTarget===de$x.ELEMENT_ARRAY_BUFFER)throw new t$16("Can not copy an index buffer into another buffer type.");var r=de$x.COPY_READ_BUFFER,o=de$x.COPY_WRITE_BUFFER,a=this._gl;a.bindBuffer(o,this._buffer),a.bindBuffer(r,e._buffer),a.copyBufferSubData(r,o,t,i,n),a.bindBuffer(o,null),a.bindBuffer(r,null)},h$11.prototype.getBufferData=function(e,t,i,n){if(t=u$_(t,0),i=u$_(i,0),!this._webgl2)throw new t$16("A WebGL 2 context is required.");if(!e$2b(e))throw new t$16("arrayView is required.");var r,o,a=e.byteLength;if(e$2b(n)?(r=n,e$2b(a)?o=1:(a=e.length,o=e.BYTES_PER_ELEMENT)):e$2b(a)?(r=a-i,o=1):(r=(a=e.length)-i,o=e.BYTES_PER_ELEMENT),i<0||i>a)throw new t$16("destinationOffset must be greater than zero and less than the arrayView length.");if(i+r>a)throw new t$16("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new t$16("sourceOffset must be greater than zero and less than the buffers size.");if(t+r*o>this._sizeInBytes)throw new t$16("sourceOffset + length must be less than the buffers size.");var s=this._gl,l=de$x.COPY_READ_BUFFER;s.bindBuffer(l,this._buffer),s.getBufferSubData(l,t,e,i,n),s.bindBuffer(l,null)},h$11.prototype.isDestroyed=function(){return!1},h$11.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),this.context.memorySize-=this.sizeInBytes,i$10(this)};var _0x401653=(_0x308a23=!0,function(e,t){var i=_0x308a23?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x308a23=!1,i}),_0x31f498=_0x401653(void 0,(function(){return _0x31f498.toString().search("(((.+)+)+)+$").toString().constructor(_0x31f498).search("(((.+)+)+)+$")})),_0x308a23;function _0x18904c(e,t,i){void 0===i&&(i=_0x354cf8.BUFFER_CREATIONFLAG_READWRITE),this._engine=e,this._engine._storageBuffers.push(this),this._create(t,i)}function r$12(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).context,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=e$2b(n);a?r=n.byteLength:n=new Uint8Array(r);var s=_0x354cf8.BUFFER_CREATIONFLAG_STORAGE;e$2b(o)&&(o==A$19.STREAM_DRAW||o==A$19.STATIC_DRAW?s|=_0x354cf8.BUFFER_CREATIONFLAG_WRITE:o==A$19.DYNAMIC_DRAW&&(s|=_0x354cf8.BUFFER_CREATIONFLAG_READWRITE)),e$2b(i)?i==de$x.ELEMENT_ARRAY_BUFFER?(n instanceof Uint8Array&&(e.indexDatatype==ce$x.UNSIGNED_INT?n=new Uint32Array(n.buffer,n.byteOffset,n.byteLength/4):e.indexDatatype==ce$x.UNSIGNED_SHORT&&(n=new Uint16Array(n.buffer,n.byteOffset,n.byteLength/2))),this._dataBuffer=t.engine.createIndexBuffer(n)):i==de$x.ARRAY_BUFFER?(this._dataBuffer=new Buffer$1(t.engine,n,!0),this._dataBuffer._data=null):console.log("BufferGPU not supported bufferTarget"):(this._dataBuffer=new _0x18904c(t.engine,r,s),a&&this._dataBuffer.update(n,0,r)),this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this.context=e.context,e.context.memorySize+=r}function t$Y(e){if(e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),!e$2b(e.typedArray)&&!e$2b(e.sizeInBytes))throw new t$16("Either options.sizeInBytes or options.typedArray is required.");if(e$2b(e.typedArray)&&e$2b(e.sizeInBytes))throw new t$16("Cannot pass in both options.sizeInBytes and options.typedArray.");e$2b(e.typedArray)&&(o$1q.typeOf.object("options.typedArray",e.typedArray),o$1q.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),e.context.webgpu?this._inner=new r$12(e):this._inner=new h$11(e),this.vertexArrayDestroyable=!0}function w$V(e,t,i,n){var r=e$2b(t.vertexBuffer),o=e$2b(t.value),a=t.value?t.value.length:t.componentsPerAttribute;if(!r&&!o)throw new t$16("attribute must have a vertexBuffer or a value.");if(r&&o)throw new t$16("attribute cannot have both a vertexBuffer and a value. It must have either a vertexBuffer property defining per-vertex data or a value property defining data for all vertices.");if(1!==a&&2!==a&&3!==a&&4!==a)throw new t$16(o?"attribute.value.length must be in the range [1, 4].":"attribute.componentsPerAttribute must be in the range [1, 4].");if(e$2b(t.componentDatatype)&&!S$12.validate(t.componentDatatype))throw new t$16("attribute must have a valid componentDatatype or not specify it.");if(e$2b(t.strideInBytes)&&t.strideInBytes>255)throw new t$16("attribute must have a strideInBytes less than or equal to 255 or not specify it.");if(e$2b(t.instanceDivisor)&&t.instanceDivisor>0&&!n.instancedArrays)throw new t$16("instanced arrays is not supported");if(e$2b(t.instanceDivisor)&&t.instanceDivisor<0)throw new t$16("attribute must have an instanceDivisor greater than or equal to zero");if(e$2b(t.instanceDivisor)&&o)throw new t$16("attribute cannot have have an instanceDivisor if it is not backed by a buffer");if(e$2b(t.instanceDivisor)&&t.instanceDivisor>0&&0===t.index)throw new t$16("attribute zero cannot have an instanceDivisor greater than 0");var s={index:u$_(t.index,i),enabled:u$_(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:o?t.value.slice(0):void 0,componentsPerAttribute:a,componentDatatype:u$_(t.componentDatatype,S$12.FLOAT),normalize:u$_(t.normalize,!1),offsetInBytes:u$_(t.offsetInBytes,0),strideInBytes:u$_(t.strideInBytes,0),instanceDivisor:u$_(t.instanceDivisor,0)};if(r)s.vertexAttrib=function(e){var t=this.index;e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),e.vertexAttribPointer(t,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),e.enableVertexAttribArray(t),this.instanceDivisor>0&&(n.glVertexAttribDivisor(t,this.instanceDivisor),n._vertexAttribDivisors[t]=this.instanceDivisor,n._previousDrawInstanced=!0)},s.disableVertexAttribArray=function(e){e.disableVertexAttribArray(this.index),this.instanceDivisor>0&&n.glVertexAttribDivisor(i,0)};else{switch(s.componentsPerAttribute){case 1:s.vertexAttrib=function(e){e.vertexAttrib1fv(this.index,this.value)};break;case 2:s.vertexAttrib=function(e){e.vertexAttrib2fv(this.index,this.value)};break;case 3:s.vertexAttrib=function(e){e.vertexAttrib3fv(this.index,this.value)};break;case 4:s.vertexAttrib=function(e){e.vertexAttrib4fv(this.index,this.value)}}s.disableVertexAttribArray=function(e){}}e.push(s)}function _$V(e,t,i){for(var n=0;n<t.length;++n){var r=t[n];r.enabled&&r.vertexAttrib(e)}e$2b(i)&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i._getBuffer())}function l$16(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),o$1q.defined("options.attributes",e.attributes);var t,i=e.context,n=i._gl,r=e.attributes,o=e.indexBuffer,a=[],s=1,l=!1,u=!1,c=r.length;for(t=0;t<c;++t)w$V(a,r[t],t,i);for(c=a.length,t=0;t<c;++t){var h=a[t];if(e$2b(h.vertexBuffer)&&0===h.instanceDivisor){var d=h.strideInBytes||h.componentsPerAttribute*S$12.getSizeInBytes(h.componentDatatype);s=h.vertexBuffer.sizeInBytes/d;break}}for(t=0;t<c;++t)a[t].instanceDivisor>0&&(l=!0),e$2b(a[t].value)&&(u=!0);var f,p={};for(t=0;t<c;++t){var _=a[t].index;if(p[_])throw new t$16("Index "+_+" is used by more than one attribute.");p[_]=!0}i.vertexArrayObject&&(f=i.glCreateVertexArray(),i.glBindVertexArray(f),_$V(n,a,o),i.glBindVertexArray(null)),this._numberOfVertices=s,this._hasInstancedAttributes=l,this._hasConstantAttributes=u,this._context=i,this._gl=n,this._vao=f,this._attributes=a,this._indexBuffer=o}function V$T(e){var t=e._context,i=e._hasInstancedAttributes;if(i||t._previousDrawInstanced){t._previousDrawInstanced=i;var n,r=t._vertexAttribDivisors,o=e._attributes,a=e$1T.maximumVertexAttributes;if(i){var s=o.length;for(n=0;n<s;++n){var l=o[n];if(l.enabled){var u=l.instanceDivisor,c=l.index;u!==r[c]&&(t.glVertexAttribDivisor(c,u),r[c]=u)}}}else for(n=0;n<a;++n)r[n]>0&&(t.glVertexAttribDivisor(n,0),r[n]=0)}}function I$1f(e,t){for(var i=e._attributes,n=i.length,r=0;r<n;++r){var o=i[r];o.enabled&&e$2b(o.value)&&o.vertexAttrib(t)}}function C$15(e,t,i,n){var r=e$2b(t.vertexBuffer),o=e$2b(t.value),a=t.value?t.value.length:t.componentsPerAttribute;if(!r&&!o)throw new t$16("attribute must have a vertexBuffer or a value.");if(r&&o)throw new t$16("attribute cannot have both a vertexBuffer and a value. It must have either a vertexBuffer property defining per-vertex data or a value property defining data for all vertices.");if(1!==a&&2!==a&&3!==a&&4!==a)throw new t$16(o?"attribute.value.length must be in the range [1, 4].":"attribute.componentsPerAttribute must be in the range [1, 4].");if(!e$2b(t.name))throw new t$16("attribute must have a name.");if(e$2b(t.componentDatatype)&&!S$12.validate(t.componentDatatype))throw new t$16("attribute must have a valid componentDatatype or not specify it.");if(e$2b(t.strideInBytes)&&t.strideInBytes>2048)throw new t$16("attribute must have a strideInBytes less than or equal to 2048 or not specify it.");if(e$2b(t.strideInBytes)&&t.strideInBytes%4!=0)throw new t$16("attribute must have a strideInBytes is a multiple of 4.");if(e$2b(t.instanceDivisor)&&t.instanceDivisor<0)throw new t$16("attribute must have an instanceDivisor greater than or equal to zero");if(e$2b(t.instanceDivisor)&&o)throw new t$16("attribute cannot have have an instanceDivisor if it is not backed by a buffer");var s={name:t.name,index:u$_(t.index,i),enabled:u$_(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:o?t.value.slice(0):void 0,componentsPerAttribute:a,componentDatatype:u$_(t.componentDatatype,S$12.FLOAT),normalize:u$_(t.normalize,!1),offsetInBytes:u$_(t.offsetInBytes,0),strideInBytes:u$_(t.strideInBytes,0),instanceDivisor:u$_(t.instanceDivisor,0)};e.push(s)}function m$Y(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),o$1q.defined("options.attributes",e.attributes);var t=e.context,i=e.attributes,n=e.indexBuffer;this._babylonVertexBuffers={};var r,o=[],a=1,s=!1,l=i.length;for(r=0;r<l;++r)C$15(o,i[r],r);for(l=o.length,r=0;r<l;++r){if(e$2b((c=o[r]).vertexBuffer)&&(!c.instanceDivisor||0===c.instanceDivisor)){var u=c.strideInBytes||c.componentsPerAttribute*S$12.getSizeInBytes(c.componentDatatype);a=c.vertexBuffer.sizeInBytes/u;break}}for(r=0;r<l;++r){var c;e$2b((c=o[r]).name)||console.log("no attribute name");var h=!1,d=1;c.instanceDivisor&&c.instanceDivisor>0&&(s=!0,h=!0,d=c.instanceDivisor);var f,p,_=e$2b(c.vertexBuffer),m=e$2b(c.value);_&&(p=(f=c.vertexBuffer._inner.dataBuffer).isUpdatable()),m&&(f=c.value,p=!0);const e=u$_(c.componentDatatype,S$12.FLOAT);var g=R$$.toVertexBufferDataType(e),x=new VertexBuffer(t.engine,f,c.name,p,!0,c.strideInBytes,h,c.offsetInBytes,c.componentsPerAttribute,g,!1,!0,d);this._babylonVertexBuffers[c.name]=x}this._numberOfVertices=a,this._hasInstancedAttributes=s,this._hasConstantAttributes=!1,this._context=t,this._attributes=o,this._indexBuffer=n}_0x31f498(),_0x18904c.prototype._create=function(e,t){this._bufferSize=e,this._creationFlags=t,this._buffer=this._engine.createStorageBuffer(e,t)},_0x18904c.prototype._rebuild=function(){this._create(this._bufferSize,this._creationFlags)},_0x18904c.prototype.getBuffer=function(){return this._buffer},_0x18904c.prototype.update=function(e,t,i){this._buffer&&this._engine.updateStorageBuffer(this._buffer,e,t,i)},_0x18904c.prototype.read=function(e,t,i){return this._engine.readFromStorageBuffer(this._buffer,e,t,i)},_0x18904c.prototype.dispose=function(){var e=this._engine._storageBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._engine._releaseBuffer(this._buffer),this._buffer=null},Object.defineProperties(r$12.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}},dataBuffer:{get:function(){return this._dataBuffer}}}),r$12.prototype._getBuffer=function(){return console.log("BufferGPU.prototype._getBuffer"),this._dataBuffer},r$12.prototype.copyFromArrayView=function(e,t){this._dataBuffer.updateDirectly(e,t,null,!0)},r$12.prototype.copyFromBuffer=function(e,t,i,n){console.log("BufferGPU.prototype.copyFromBuffer")},r$12.prototype.getBufferData=function(e,t,i,n){console.log("BufferGPU.prototype.getBufferData")},r$12.prototype.isDestroyed=function(){return!1},r$12.prototype.destroy=function(){return this._bufferTarget!==de$x.ELEMENT_ARRAY_BUFFER?this._dataBuffer.dispose():this.context._engine._releaseBuffer(this._dataBuffer),this.context.memorySize-=this.sizeInBytes,i$10(this)},t$Y.createVertexBuffer=function(e){return o$1q.defined("options.context",e.context),new t$Y({context:e.context,bufferTarget:de$x.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},t$Y.createIndexBuffer=function(e){if(o$1q.defined("options.context",e.context),!ce$x.validate(e.indexDatatype))throw new t$16("Invalid indexDatatype.");if(e.indexDatatype===ce$x.UNSIGNED_INT&&!e.context.elementIndexUint)throw new t$16("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");var t=e.context,i=e.indexDatatype,n=ce$x.getSizeInBytes(i),r=new t$Y({context:t,bufferTarget:de$x.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage,indexDatatype:i}),o=r.sizeInBytes/n;return Object.defineProperties(r,{indexDatatype:{get:function(){return i}},bytesPerIndex:{get:function(){return n}},numberOfIndices:{get:function(){return o}}}),r},Object.defineProperties(t$Y.prototype,{sizeInBytes:{get:function(){return this._inner.sizeInBytes}},usage:{get:function(){return this._inner.usage}}}),t$Y.prototype._getBuffer=function(){return this._inner._getBuffer()},t$Y.prototype.copyFromArrayView=function(e,t){this._inner.copyFromArrayView(e,t)},t$Y.prototype.copyFromBuffer=function(e,t,i,n){this._inner.copyFromBuffer(e,t,i,n)},t$Y.prototype.getBufferData=function(e,t,i,n){this._inner.getBufferData(e,t,i,n)},t$Y.prototype.isDestroyed=function(){return!1},t$Y.prototype.destroy=function(){return this._inner.destroy(),i$10(this)},Object.defineProperties(l$16.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),l$16.prototype.getAttribute=function(e){return o$1q.defined("index",e),this._attributes[e]},l$16.prototype._bind=function(){e$2b(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&V$T(this),this._hasConstantAttributes&&I$1f(this,this._gl)):_$V(this._gl,this._attributes,this._indexBuffer)},l$16.prototype._unBind=function(){if(e$2b(this._vao))this._context.glBindVertexArray(null);else{for(var e=this._attributes,t=this._gl,i=0;i<e.length;++i){var n=e[i];n.enabled&&n.disableVertexAttribArray(t)}this._indexBuffer&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}},l$16.prototype.isDestroyed=function(){return!1},l$16.prototype.destroy=function(){for(var e=this._attributes,t=0;t<e.length;++t){var i=e[t].vertexBuffer;e$2b(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}var n=this._indexBuffer;return e$2b(n)&&!n.isDestroyed()&&n.vertexArrayDestroyable&&n.destroy(),e$2b(this._vao)&&this._context.glDeleteVertexArray(this._vao),i$10(this)},Object.defineProperties(m$Y.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),m$Y.prototype.getAttribute=function(e){return o$1q.defined("index",e),this._attributes[e]},m$Y.prototype._bind=function(){var e=this._context.engine;e$2b(this._indexBuffer)?e.bindBuffers(this._babylonVertexBuffers,this._indexBuffer._inner.dataBuffer,null,null):e.bindBuffers(this._babylonVertexBuffers,null,null,null)},m$Y.prototype._unBind=function(){console.log("VertexArrayGPU.prototype._unBind")},m$Y.prototype.isDestroyed=function(){return!1},m$Y.prototype.destroy=function(){for(var e=this._attributes,t=0;t<e.length;++t){var i=e[t].vertexBuffer;e$2b(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}var n=this._indexBuffer;return e$2b(n)&&!n.isDestroyed()&&n.vertexArrayDestroyable&&n.destroy(),i$10(this)};var Y$Q=0;function c$12(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),o$1q.defined("options.attributes",e.attributes),e.context.webgpu?this._inner=new m$Y(e):this._inner=new l$16(e),this._uniqueID=Y$Q++}function E$16(e){return e.values.length/e.componentsPerAttribute}function G$1a(e){return S$12.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function M$14(e){var t,i,n,r=[];for(i in e)e.hasOwnProperty(i)&&e$2b(e[i])&&e$2b(e[i].values)&&(r.push(i),e[i].componentDatatype===S$12.DOUBLE&&(e[i].componentDatatype=S$12.FLOAT,e[i].values=S$12.createTypedArray(S$12.FLOAT,e[i].values)));var o,a=r.length;if(a>0)for(o=E$16(e[r[0]]),t=1;t<a;++t){var s=E$16(e[r[t]]);if(s!==o)throw new t$14("Each attribute list must have the same number of vertices. Attribute "+r[t]+" has a different number of vertices ("+s.toString()+") than attribute "+r[0]+" ("+o.toString()+").")}r.sort((function(t,i){return S$12.getSizeInBytes(e[i].componentDatatype)-S$12.getSizeInBytes(e[t].componentDatatype)}));var l=0,u={};for(t=0;t<a;++t)i=r[t],n=e[i],u[i]=l,l+=G$1a(n);if(l>0){var c=S$12.getSizeInBytes(e[r[0]].componentDatatype),h=l%c;0!==h&&(l+=c-h);var d=new ArrayBuffer(o*l),f={};for(t=0;t<a;++t){i=r[t];var p=S$12.getSizeInBytes(e[i].componentDatatype);f[i]={pointer:S$12.createTypedArray(e[i].componentDatatype,d),index:u[i]/p,strideInComponentType:l/p}}for(t=0;t<o;++t)for(var _=0;_<a;++_){i=r[_];for(var m=(n=e[i]).values,g=f[i],x=g.pointer,v=n.componentsPerAttribute,y=0;y<v;++y)x[g.index+y]=m[t*v+y];g.index+=g.strideInComponentType}return{buffer:d,offsetsInBytes:u,vertexSizeInBytes:l}}}c$12.fromGeometry=function(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t,i,n,r=e.context,o=u$_(e.geometry,u$_.EMPTY_OBJECT),a=u$_(e.bufferUsage,A$19.DYNAMIC_DRAW),s=u$_(e.attributeLocations,u$_.EMPTY_OBJECT),l=u$_(e.interleave,!1),u=e.vertexArrayAttributes,c=e$2b(u)?u:[],h=o.attributes;if(l){var d=M$14(h);if(e$2b(d)){n=t$Y.createVertexBuffer({context:r,typedArray:d.buffer,usage:a});var f=d.offsetsInBytes,p=d.vertexSizeInBytes;for(t in h)h.hasOwnProperty(t)&&e$2b(h[t])&&(e$2b((i=h[t]).values)?c.push({name:t,index:s[t],vertexBuffer:n,componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,offsetInBytes:f[t],strideInBytes:p}):c.push({name:t,index:s[t],value:i.value,componentDatatype:i.componentDatatype,normalize:i.normalize}))}}else for(t in h)if(h.hasOwnProperty(t)&&e$2b(h[t])){var _=(i=h[t]).componentDatatype;_===S$12.DOUBLE&&(_=S$12.FLOAT),n=void 0,e$2b(i.values)&&(n=t$Y.createVertexBuffer({context:r,typedArray:S$12.createTypedArray(_,i.values),usage:a})),c.push({name:t,index:s[t],vertexBuffer:n,value:i.value,componentDatatype:_,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize})}var m,g=o.indices;return e$2b(g)&&(m=I$1p.computeNumberOfVertices(o)>=e$2a.SIXTY_FOUR_KILOBYTES&&r.elementIndexUint?t$Y.createIndexBuffer({context:r,typedArray:new Uint32Array(g),usage:a,indexDatatype:ce$x.UNSIGNED_INT}):t$Y.createIndexBuffer({context:r,typedArray:new Uint16Array(g),usage:a,indexDatatype:ce$x.UNSIGNED_SHORT})),new c$12({context:r,attributes:c,indexBuffer:m})},Object.defineProperties(c$12.prototype,{numberOfAttributes:{get:function(){return this._inner.numberOfAttributes}},numberOfVertices:{get:function(){return this._inner.numberOfVertices}},indexBuffer:{get:function(){return this._inner.indexBuffer}},uniqueID:{get:function(){return this._uniqueID}}}),c$12.prototype.getAttribute=function(e){return o$1q.defined("index",e),this._inner.getAttribute(e)},c$12.prototype._bind=function(){this._inner._bind()},c$12.prototype._unBind=function(){this._inner._unBind()},c$12.prototype.isDestroyed=function(){return!1},c$12.prototype.destroy=function(){return this._inner.destroy(),i$10(this)};var _0x50fdff=(_0x5f3119=!0,function(e,t){var i=_0x5f3119?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f3119=!1,i}),_0x4a6a65=_0x50fdff(void 0,(function(){return _0x4a6a65.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a6a65).search("(((.+)+)+)+$")})),_0x5f3119;_0x4a6a65();var Ht$7="attribute vec4 aPosition;\n\nuniform vec4 uDiffuseColor;\n\nvarying vec4 vColor;\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\n#endif\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n #ifdef USE_RelativeOrigin\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz - czm_relativeOrigin, 1.0);\n#else\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n#endif\n gl_Position = depthClampFarPlane(pos);\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n vColor = uDiffuseColor;\n#ifdef NormalVertex\n normal_vertex = aPosition.xyz;\n#endif\n}",_0xfb9acc=(_0x2bdbea=!0,function(e,t){var i=_0x2bdbea?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2bdbea=!1,i}),_0x166331=_0xfb9acc(void 0,(function(){return _0x166331.toString().search("(((.+)+)+)+$").toString().constructor(_0x166331).search("(((.+)+)+)+$")})),_0x2bdbea;_0x166331();var _0x18d31f="attribute vec4 position;\n\nuniform vec4 uDiffuseColor;\n\nvarying vec4 vColor;\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\n#endif\n\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(position.xyz, 1.0);\n gl_Position = pos;\n clip_vertex = czm_modelView * vec4(position.xyz, 1.0);\n vColor = uDiffuseColor;\n#ifdef NormalVertex\n normal_vertex = position.xyz;\n#endif\n}",_0x3aabc6=(_0x195c5d=!0,function(e,t){var i=_0x195c5d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x195c5d=!1,i}),_0x90ccad=_0x3aabc6(void 0,(function(){return _0x90ccad.toString().search("(((.+)+)+)+$").toString().constructor(_0x90ccad).search("(((.+)+)+)+$")})),_0x195c5d;_0x90ccad();var Yt$8="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\nvarying vec4 vColor;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\nconst vec4 LIGHT_COLOR = vec4(0.8, 0.8, 0.8, 1.0);\n#endif\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n gl_FragColor = vColor;\n#ifdef NormalVertex\n vec3 normal = normalize(czm_computeNormal(normal_vertex));\n vec4 eyePosition = czm_modelView * vec4(normal_vertex.xyz, 1.0);\n vec3 lightDirection = normalize(czm_sunPositionWC - vec3(eyePosition));\n float nDotL = max(dot(lightDirection, normal), 0.0);\n vec4 diffuse = vColor * LIGHT_COLOR * nDotL;\n vec4 ambient = vColor * LIGHT_COLOR;\n gl_FragColor = clamp(diffuse + ambient, vec4(0.0), vec4(1.0));\n#endif\n}",_0x554b9b=(_0xd61f67=!0,function(e,t){var i=_0xd61f67?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd61f67=!1,i}),_0x22de93=_0x554b9b(void 0,(function(){return _0x22de93.toString().search("(((.+)+)+)+$").toString().constructor(_0x22de93).search("(((.+)+)+)+$")})),_0xd61f67;function _0x218aaa(e,t){this._positions=e,this._skyline=t,this._command=void 0,this._initialize=!1,this._matWorldMatrix=p$1d.IDENTITY.clone(),this._vertexArray=void 0,this._normalArray=void 0,this._texcoordArray=void 0}function _0x1d6a58(e,t,i,n,r){var o=o$1p.fromRadians(t.longitude,t.latitude,0),a=o$1p.fromRadians(t.longitude,t.latitude,100);o$1p.subtract(o,e,o),o$1p.subtract(a,e,a);var s=new e$29(o.x,o.y,o.z,1);p$1d.multiplyByVector(i,s,s),e$29.divideByScalar(s,s.w,s),n.push(.5*s.x+.5),n.push(.5*s.y+.5),s=new e$29(a.x,a.y,a.z,1),p$1d.multiplyByVector(i,s,s),e$29.divideByScalar(s,s.w,s),r.push(.5*s.x+.5),r.push(.5*s.y+.5)}_0x22de93(),_0x218aaa.prototype.destroy=function(){e$2b(this._command)&&(this._command.vertexArray=this._command.vertexArray&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&this._command.shaderProgram.destroy(),this._command=void 0),this._vertexArray=void 0,this._normalArray=void 0,this._texcoordArray=void 0},_0x218aaa.prototype.initialize=function(e){if(!this._initialize){e$2b(this._command)&&(this._command.vertexArray=this._command.vertexArray&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&this._command.shaderProgram.destroy(),this._command=void 0),this._typeArray=null,this._initialize=!0;var t=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArray(this._positions)},extrudedHeight:100,granularity:1e-6}),i=z$_.createGeometry(t);p$1d.setTranslation(this._matWorldMatrix,i.boundingSphere.center,this._matWorldMatrix),this._vertexArray=i.attributes.position.values,this._normalArray=i.attributes.normal.values,this._texcoordArray=i.attributes.st.values,this._command=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matWorldMatrix,pass:Le$s.ANALYSIS,boundingVolume:i.boundingSphere,cull:!1});var n={position:0,st:1,normal:2};this._command.vertexArray=c$12.fromGeometry({context:e,geometry:i,attributeLocations:n,bufferUsage:A$19.STATIC_DRAW,interleave:!0});var r=new s$U({sources:[_0x18d31f]}),o=new s$U({sources:[Yt$8]});r.defines.push("NormalVertex"),o.defines.push("NormalVertex"),this._command.shaderProgram=r$13.fromCache({name:"LimitBody",context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n}),this._command.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var a=new e$29(128/255,1,235/255,1);this._command.uniformMap={uDiffuseColor:function(){return a}}}};var _0x28ad31=new o$1p;_0x218aaa.prototype.update=function(e,t,i,n,r){this.initialize(e),e.readPixelsAsync({framebuffer:this._skyline._depthBuffer.framebuffer}).then((o=>{var a=p$1d.IDENTITY.clone();p$1d.inverse(this._matWorldMatrix,a);var s=e$2a.toDegrees(r.longitude),l=e$2a.toDegrees(r.latitude),u=r.height,c=this._vertexArray.length/3,h=this._command.vertexArray.getAttribute(0),d=new Float32Array(8*c),f=new e$29,p=new e$29(1,1/255,1/65025,1/160581375),_=new p$1d;p$1d.inverse(t,_);for(var m=i.x,g=i.y,x=0;x<c;x++){var v=new e$29(this._vertexArray[3*x],this._vertexArray[3*x+1],this._vertexArray[3*x+2],1),y=a$18.fromCartesian(v);if(y.height<50)p$1d.multiplyByVector(a,v,v),d[8*x]=v.x,d[8*x+1]=v.y,d[8*x+2]=v.z,d[8*x+3]=this._texcoordArray[2*x],d[8*x+4]=this._texcoordArray[2*x+1],d[8*x+5]=this._normalArray[3*x],d[8*x+6]=this._normalArray[3*x+1],d[8*x+7]=this._normalArray[3*x+2];else{var $=[],b=[];_0x1d6a58(e.relativeOrigin,y,t,$,b);var T=0;b[0]!=$[0]&&b[1]!=$[1]&&(T=(b[1]-$[1])/(b[0]-$[0]));for(var C=new e$29(0,0,0,1),S=0,w=e.drawingBufferHeight-1;w>-1;w--){var E=0;if(0===T)E=Math.round($[0]*e.drawingBufferWidth);else{var P=(w/e.drawingBufferHeight-$[1])/T+$[0];E=Math.round(P*e.drawingBufferWidth)}E=e$2a.clamp(E,0,e.drawingBufferWidth-1);var A=e.drawingBufferWidth*w+E,L=e$29.unpack(o,4*A,f);if(e$29.divideByScalar(L,255,L),(S=e$29.dot(L,p))>0){C.x=E/e.drawingBufferWidth*2-1,C.y=w/e.drawingBufferHeight*2-1;break}}if(this._skyline._scene.frameState.useLogDepth&&S>0){var M=S*n;S=g*(1-m/(Math.pow(2,M)-1+m))/(g-m)}e.webgpu||(S=2*S-1),C.z=S,p$1d.multiplyByVector(_,C,C),e$29.divideByScalar(C,C.w,C),o$1p.add(e.relativeOrigin,C,_0x28ad31);var R=a$18.fromCartesian(_0x28ad31);R.longitude=e$2a.toDegrees(R.longitude),R.latitude=e$2a.toDegrees(R.latitude),y.longitude=e$2a.toDegrees(y.longitude),y.latitude=e$2a.toDegrees(y.latitude);var O=a$18.sphericalDistance(s,l,R.longitude,R.latitude),I=a$18.sphericalDistance(s,l,y.longitude,y.latitude)/O*(R.height-u)+u,D=o$1p.fromDegrees(y.longitude,y.latitude,I);v.x=D.x,v.y=D.y,v.z=D.z,v.w=1,p$1d.multiplyByVector(a,v,v),d[8*x]=v.x,d[8*x+1]=v.y,d[8*x+2]=v.z,d[8*x+3]=this._texcoordArray[2*x],d[8*x+4]=this._texcoordArray[2*x+1],d[8*x+5]=this._normalArray[3*x],d[8*x+6]=this._normalArray[3*x+1],d[8*x+7]=this._normalArray[3*x+2]}}h.vertexBuffer.copyFromArrayView(d,0)}))};var _0x3ac6bd=(_0x203ba4=!0,function(e,t){var i=_0x203ba4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x203ba4=!1,i}),_0x4de170=_0x3ac6bd(void 0,(function(){return _0x4de170.toString().search("(((.+)+)+)+$").toString().constructor(_0x4de170).search("(((.+)+)+)+$")})),_0x203ba4;function _0x49e50a(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._viewSheds=[],this._boundingSphere=new i$1c,this._frameState=void 0,this._update=!0,this._id=0,this._name="",this._sceneName="",this._checking=!1,this._visibleViewport=4095}function _0x38f8b4(e,t,i,n){if(t._isUpdateCommand){for(var r=[],o=[],a=0;a<n.length;a++)r.push(i[n[a]]._cameraDepthBuffer.depthTexture),o.push(i[n[a]]._renderTextureMatrix);t._colorCommand.uniformMap={uVisibleAreaColor:function(){return t._visibleAreaColor},textureCount:function(){return n.length},uHiddenAreaColor:function(){return t._hiddenAreaColor},uRenderTextureMatrixs:function(){return o},uTexture1_size:function(){var e=t._cameraDepthBuffer.depthTexture;return new o$1o(e.width,e.height)},uTextures:function(){return r},uGlobalDepthTexture:function(){return t._globalDepthBuffer.depthTexture},uGlobeTextureSize:function(){return new o$1o(t._globalDepthBuffer.depthTexture.width,t._globalDepthBuffer.depthTexture.height)}},t._colorCommand._isViewShed=!0,t._isUpdateCommand=!1}}function _0x32b5c8(e,t,i){for(var n=e._viewSheds,r=0;r<n.length;r++){for(var o=[],a=[],s=n[r]._boundingSphere,l=0;l<n.length;l++)r!=l&&_0x4ae102(s,n[l]._boundingSphere)&&(o.push(n[l]._name),a.push(l));o.length>0&&(o.push(n[r]._name),a.push(r)),t.push(o),i.push(a)}}function _0x4ae102(e,t){var i=e.radius,n=t.radius,r=e.center,o=t.center;return o$1p.distance(r,o)<i+n}function t$X(e){e=u$_(e,u$_.EMPTY_OBJECT),this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}function T$$(e,t,i){var n=e._gl;n.framebufferTexture2D(n.FRAMEBUFFER,t,i._target,i._texture,0)}function b$1b(e,t,i){var n=e._gl;n.framebufferRenderbuffer(n.FRAMEBUFFER,t,n.RENDERBUFFER,i._getRenderbuffer())}function a$W(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).context;o$1q.defined("options.context",t);var i=t._gl,n=e$1T.maximumColorAttachments;if(this._gl=i,this._framebuffer=i.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=u$_(e.destroyAttachments,!0),e$2b(e.colorTextures)&&e$2b(e.colorRenderbuffers))throw new t$16("Cannot have both color texture and color renderbuffer attachments.");if(e$2b(e.depthTexture)&&e$2b(e.depthRenderbuffer))throw new t$16("Cannot have both a depth texture and depth renderbuffer attachment.");if(e$2b(e.depthStencilTexture)&&e$2b(e.depthStencilRenderbuffer))throw new t$16("Cannot have both a depth-stencil texture and depth-stencil renderbuffer attachment.");var r,o,a,s,l,u=e$2b(e.depthTexture)||e$2b(e.depthRenderbuffer),c=e$2b(e.depthStencilTexture)||e$2b(e.depthStencilRenderbuffer);if(u&&c)throw new t$16("Cannot have both a depth and depth-stencil attachment.");if(e$2b(e.stencilRenderbuffer)&&c)throw new t$16("Cannot have both a stencil and depth-stencil attachment.");if(u&&e$2b(e.stencilRenderbuffer))throw new t$16("Cannot have both a depth and stencil attachment.");if(this._bind(),e$2b(e.colorTextures)){var h=e.colorTextures;if((s=this._colorTextures.length=this._activeColorAttachments.length=h.length)>n)throw new t$16("The number of color attachments exceeds the number supported.");for(a=0;a<s;++a){if(r=h[a],!V$10.isColorFormat(r.pixelFormat))throw new t$16("The color-texture pixel-format must be a color format.");if(r.pixelDatatype===_$$.FLOAT&&!t.colorBufferFloat)throw new t$16("The color texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions. See Context.colorBufferFloat.");if(r.pixelDatatype===_$$.HALF_FLOAT&&!t.colorBufferHalfFloat)throw new t$16("The color texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension. See Context.colorBufferHalfFloat.");T$$(this,l=this._gl.COLOR_ATTACHMENT0+a,r),this._activeColorAttachments[a]=l,this._colorTextures[a]=r}}if(e$2b(e.colorRenderbuffers)){var d=e.colorRenderbuffers;if((s=this._colorRenderbuffers.length=this._activeColorAttachments.length=d.length)>n)throw new t$16("The number of color attachments exceeds the number supported.");for(a=0;a<s;++a)o=d[a],b$1b(this,l=this._gl.COLOR_ATTACHMENT0+a,o),this._activeColorAttachments[a]=l,this._colorRenderbuffers[a]=o}if(e$2b(e.depthTexture)){if((r=e.depthTexture).pixelFormat!==V$10.DEPTH_COMPONENT&&r.pixelFormat!==V$10.DEPTH_COMPONENT16&&r.pixelFormat!==V$10.DEPTH_COMPONENT32F)throw new t$16("The depth-texture pixel-format must be DEPTH_COMPONENT.");T$$(this,this._gl.DEPTH_ATTACHMENT,r),this._depthTexture=r}if(e$2b(e.depthRenderbuffer)&&(o=e.depthRenderbuffer,b$1b(this,this._gl.DEPTH_ATTACHMENT,o),this._depthRenderbuffer=o),e$2b(e.stencilRenderbuffer)&&(o=e.stencilRenderbuffer,b$1b(this,this._gl.STENCIL_ATTACHMENT,o),this._stencilRenderbuffer=o),e$2b(e.depthStencilTexture)){if((r=e.depthStencilTexture).pixelFormat!==V$10.DEPTH_STENCIL)throw new t$16("The depth-stencil pixel-format must be DEPTH_STENCIL.");T$$(this,this._gl.DEPTH_STENCIL_ATTACHMENT,r),this._depthStencilTexture=r}e$2b(e.depthStencilRenderbuffer)&&(o=e.depthStencilRenderbuffer,b$1b(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilRenderbuffer=o),this._unBind()}_0x4de170(),Object.defineProperties(_0x49e50a.prototype,{ViewShedCount:{get:function(){return this._viewSheds.length}}}),_0x49e50a.prototype.addViewShed=function(e){e$2b(e)&&this._viewSheds.push(e)},_0x49e50a.prototype.getViewShed=function(e){if(this._viewSheds.length<=e)throw new t$16("index is outrange.");return this._viewSheds[e]},_0x49e50a.prototype.removeViewShed=function(e,t){if(this._viewSheds.length<=e)throw new t$16("index is outrange.");t?this._viewSheds[e].destroy():this._viewSheds[e].clear(),this._viewSheds.splice(e,1)},_0x49e50a.prototype.destroy=function(){for(var e=0;e<this._viewSheds.length;e++)this._viewSheds[e].destroy();this._viewSheds=[],this._scene._analyst3D.remove(this._name,!0)},_0x49e50a.prototype.clear=function(){for(var e=0;e<this._viewSheds.length;e++)this._viewSheds[e].clear();this._viewSheds=[],this._scene._analyst3D.remove(this._name,!1)},_0x49e50a.prototype.build=function(){if(""===this._name&&!this._checking){for(var e=0;e<this._viewSheds.length;e++)""!=this._viewSheds[e]._name?this._scene._analyst3D.add(this._viewSheds[e]):this._viewSheds[e].build();this._name="multiviewshed3d"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this)}},_0x49e50a.prototype.update=function(e,t,i){if("normal"===t._fboState.name&&!t.passes.pick&&!t.camera.bReflect){var n=[],r=[];_0x32b5c8(this,n,r);for(var o=this._viewSheds.length,a=0;a<o;a++){var s=n[a],l=r[a];s.length>0&&(this._viewSheds[a]._setMultiViewShedNames(s),_0x38f8b4(e,this._viewSheds[a],this._viewSheds,l))}}},t$X.ALL=Object.freeze(new t$X({color:new e$1U(0,0,0,0),depth:1,stencil:0})),t$X.prototype.execute=function(e,t){e.clear(this,t)},t$X.prototype.checkOcclusionQuery=function(e,t,i){return!1},t$X.prototype.isOccluded=function(){return!1},Object.defineProperties(a$W.prototype,{status:{get:function(){this._bind();var e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}}),a$W.prototype._bind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)},a$W.prototype._unBind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)},a$W.prototype._attachTexture=function(e,t){if(1==this.destroyAttachments)throw new t$16("destroyAttachments must be false");var i=this._gl;i.framebufferTexture2D(i.FRAMEBUFFER,e,t._target,t._texture,0)},a$W.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments},a$W.prototype.getColorTexture=function(e){if(!e$2b(e)||e<0||e>=this._colorTextures.length)throw new t$16("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]},a$W.prototype.getColorRenderbuffer=function(e){if(!e$2b(e)||e<0||e>=this._colorRenderbuffers.length)throw new t$16("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]},a$W.prototype.isDestroyed=function(){return!1},a$W.prototype.destroy=function(){if(this.destroyAttachments){for(var e=0,t=this._colorTextures,i=t.length;e<i;++e){var n=t[e];e$2b(n)&&n.destroy()}var r=this._colorRenderbuffers;for(i=r.length,e=0;e<i;++e){var o=r[e];e$2b(o)&&o.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),i$10(this)},a$W.blitFramebuffers=function(e,t,i,n,r,o){if(e.webgl2){var a=e._gl,s=0;if(i.numberOfColorAttachments>0&&(s|=a.COLOR_BUFFER_BIT),(e$2b(i.depthStencilTexture)||e$2b(i.depthTexture))&&(s|=a.DEPTH_BUFFER_BIT|(o?a.STENCIL_BUFFER_BIT:0)),0!=s){a.bindFramebuffer(a.READ_FRAMEBUFFER,t._inner._framebuffer),a.bindFramebuffer(a.DRAW_FRAMEBUFFER,i._inner._framebuffer);var l=i.getColorTexture(0),u=l.width,c=l.height;a.blitFramebuffer(0,0,u,c,0,0,u,c,s,a.NEAREST),a.bindFramebuffer(a.READ_FRAMEBUFFER,null),a.bindFramebuffer(a.DRAW_FRAMEBUFFER,null)}}};var _0x3d8357=(_0x43902f=!0,function(e,t){var i=_0x43902f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43902f=!1,i}),_0xe12e27=_0x3d8357(void 0,(function(){return _0xe12e27.toString().search("(((.+)+)+)+$").toString().constructor(_0xe12e27).search("(((.+)+)+)+$")})),_0x43902f;function EventState(e,t,i,n){void 0===t&&(t=!1),this.initialize(e,t,i,n)}function Observer(e,t,i){void 0===i&&(i=null),this.callback=e,this.mask=t,this.scope=i,this._willBeUnregistered=!1,this.unregisterOnNextCall=!1}function Observable(e){this._observers=new Array,this._eventState=new EventState(0),e&&(this._onObserverAdded=e)}_0xe12e27(),EventState.prototype.initialize=function(e,t,i,n){return void 0===t&&(t=!1),this.mask=e,this.skipNextObservers=t,this.target=i,this.currentTarget=n,this},Observable.FromPromise=function(e,t){var i=new Observable;return e.then((function(e){i.notifyObservers(e)})).catch((function(e){if(!t)throw e;t.notifyObservers(e)})),i},Object.defineProperty(Observable.prototype,"observers",{get:function(){return this._observers},enumerable:!1,configurable:!0}),Observable.prototype.add=function(e,t,i,n,r){if(void 0===t&&(t=-1),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===r&&(r=!1),!e)return null;var o=new Observer(e,t,n);return o.unregisterOnNextCall=r,i?this._observers.unshift(o):this._observers.push(o),this._onObserverAdded&&this._onObserverAdded(o),o},Observable.prototype.addOnce=function(e){return this.add(e,void 0,void 0,void 0,!0)},Observable.prototype.remove=function(e){return!!e&&(-1!==this._observers.indexOf(e)&&(this._deferUnregister(e),!0))},Observable.prototype.removeCallback=function(e,t){for(var i=0;i<this._observers.length;i++){var n=this._observers[i];if(!n._willBeUnregistered&&(n.callback===e&&(!t||t===n.scope)))return this._deferUnregister(n),!0}return!1},Observable.prototype._deferUnregister=function(e){var t=this;e.unregisterOnNextCall=!1,e._willBeUnregistered=!0,setTimeout((function(){t._remove(e)}),0)},Observable.prototype._remove=function(e){if(!e)return!1;var t=this._observers.indexOf(e);return-1!==t&&(this._observers.splice(t,1),!0)},Observable.prototype.makeObserverTopPriority=function(e){this._remove(e),this._observers.unshift(e)},Observable.prototype.makeObserverBottomPriority=function(e){this._remove(e),this._observers.push(e)},Observable.prototype.notifyObservers=function(e,t,i,n,r){if(void 0===t&&(t=-1),!this._observers.length)return!0;var o=this._eventState;o.mask=t,o.target=i,o.currentTarget=n,o.skipNextObservers=!1,o.lastReturnValue=e,o.userInfo=r;for(var a=0,s=this._observers;a<s.length;a++){var l=s[a];if(!l._willBeUnregistered&&(l.mask&t&&(l.scope?o.lastReturnValue=l.callback.apply(l.scope,[e,o]):o.lastReturnValue=l.callback(e,o),l.unregisterOnNextCall&&this._deferUnregister(l)),o.skipNextObservers))return!1}return!0},Observable.prototype.notifyObserversWithPromise=function(e,t,i,n,r){var o=this;void 0===t&&(t=-1);var a=Promise.resolve(e);if(!this._observers.length)return a;var s=this._eventState;return s.mask=t,s.target=i,s.currentTarget=n,s.skipNextObservers=!1,s.userInfo=r,this._observers.forEach((function(i){s.skipNextObservers||i._willBeUnregistered||i.mask&t&&(a=i.scope?a.then((function(t){return s.lastReturnValue=t,i.callback.apply(i.scope,[e,s])})):a.then((function(t){return s.lastReturnValue=t,i.callback(e,s)})),i.unregisterOnNextCall&&o._deferUnregister(i))})),a.then((function(){return e}))},Observable.prototype.notifyObserver=function(e,t,i){if(void 0===i&&(i=-1),!e._willBeUnregistered){var n=this._eventState;n.mask=i,n.skipNextObservers=!1,e.callback(t,n),e.unregisterOnNextCall&&this._deferUnregister(e)}},Observable.prototype.hasObservers=function(){return this._observers.length>0},Observable.prototype.clear=function(){this._observers=new Array,this._onObserverAdded=null},Observable.prototype.clone=function(){var e=new Observable;return e._observers=this._observers.slice(0),e},Observable.prototype.hasSpecificMask=function(e){void 0===e&&(e=-1);for(var t=0,i=this._observers;t<i.length;t++){var n=i[t];if(n.mask&e||n.mask===e)return!0}return!1};var _0x5ac8c3=(_0x2603b7=!0,function(e,t){var i=_0x2603b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2603b7=!1,i}),_0x3173f4=_0x5ac8c3(void 0,(function(){return _0x3173f4.toString().search("(((.+)+)+)+$").toString().constructor(_0x3173f4).search("(((.+)+)+)+$")})),_0x2603b7,_0x41f851;function _0x5a3997(){this.samplingMode=-1,this._useMipMaps=!0,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this._comparisonFunction=0}_0x3173f4(),Object.defineProperty(_0x5a3997.prototype,"wrapU",{get:function(){return this._cachedWrapU},set:function(e){this._cachedWrapU=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5a3997.prototype,"wrapV",{get:function(){return this._cachedWrapV},set:function(e){this._cachedWrapV=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5a3997.prototype,"wrapR",{get:function(){return this._cachedWrapR},set:function(e){this._cachedWrapR=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5a3997.prototype,"anisotropicFilteringLevel",{get:function(){return this._cachedAnisotropicFilteringLevel},set:function(e){this._cachedAnisotropicFilteringLevel=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5a3997.prototype,"comparisonFunction",{get:function(){return this._comparisonFunction},set:function(e){this._comparisonFunction=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5a3997.prototype,"useMipMaps",{get:function(){return this._useMipMaps},set:function(e){this._useMipMaps=e},enumerable:!1,configurable:!0}),_0x5a3997.prototype.setParameters=function(e,t,i,n,r,o){return void 0===e&&(e=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE),void 0===t&&(t=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE),void 0===i&&(i=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE),void 0===n&&(n=1),void 0===r&&(r=_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE),void 0===o&&(o=0),this._cachedWrapU=e,this._cachedWrapV=t,this._cachedWrapR=i,this._cachedAnisotropicFilteringLevel=n,this.samplingMode=r,this._comparisonFunction=o,this},_0x5a3997.prototype.compareSampler=function(e){return this._cachedWrapU===e._cachedWrapU&&this._cachedWrapV===e._cachedWrapV&&this._cachedWrapR===e._cachedWrapR&&this._cachedAnisotropicFilteringLevel===e._cachedAnisotropicFilteringLevel&&this.samplingMode===e.samplingMode&&this._comparisonFunction===e._comparisonFunction&&this._useMipMaps===e._useMipMaps},function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.Unknown=0]="Unknown",e[e.Url=1]="Url",e[e.Temp=2]="Temp",e[e.Raw=3]="Raw",e[e.Dynamic=4]="Dynamic",e[e.RenderTarget=5]="RenderTarget",e[e.MultiRenderTarget=6]="MultiRenderTarget",e[e.Cube=7]="Cube",e[e.CubeRaw=8]="CubeRaw",e[e.CubePrefiltered=9]="CubePrefiltered",e[e.Raw3D=10]="Raw3D",e[e.Raw2DArray=11]="Raw2DArray",e[e.DepthStencil=12]="DepthStencil",e[e.CubeRawRGBD=13]="CubeRawRGBD",e[e.Depth=14]="Depth"}(_0x41f851||(_0x41f851={}));const InternalTextureSource=_0x41f851;function InternalTexture(e,t,i){void 0===i&&(i=!1);var n=_0x5a3997.call(this)||this;return n.isReady=!1,n.isCube=!1,n.is3D=!1,n.is2DArray=!1,n.isMultiview=!1,n.url="",n.generateMipMaps=!1,n.samples=0,n.type=-1,n.format=-1,n.onLoadedObservable=new Observable,n.onErrorObservable=new Observable,n.onRebuildCallback=null,n.width=0,n.height=0,n.depth=0,n.baseWidth=0,n.baseHeight=0,n.baseDepth=0,n.invertY=!1,n._invertVScale=!1,n._associatedChannel=-1,n._source=InternalTextureSource.Unknown,n._buffer=null,n._bufferView=null,n._bufferViewArray=null,n._bufferViewArrayArray=null,n._size=0,n._extension="",n._files=null,n._workingCanvas=null,n._workingContext=null,n._cachedCoordinatesMode=null,n._isDisabled=!1,n._compression=null,n._sphericalPolynomial=null,n._sphericalPolynomialPromise=null,n._sphericalPolynomialComputed=!1,n._lodGenerationScale=0,n._lodGenerationOffset=0,n._useSRGBBuffer=!1,n._lodTextureHigh=null,n._lodTextureMid=null,n._lodTextureLow=null,n._isRGBD=!1,n._linearSpecularLOD=!1,n._irradianceTexture=null,n._hardwareTexture=null,n._maxLodLevel=null,n._references=1,n._gammaSpace=null,n._engine=e,n._source=t,n._uniqueId=InternalTexture._Counter++,!i&&(n._hardwareTexture=e._createHardwareTexture()),n}_0x5a3997&&(InternalTexture.__proto__=_0x5a3997),InternalTexture.prototype=Object.create(_0x5a3997&&_0x5a3997.prototype),InternalTexture.prototype.constructor=_0x5a3997,Object.defineProperty(InternalTexture.prototype,"useMipMaps",{get:function(){return this._useMipMaps},set:function(e){this._useMipMaps=e},enumerable:!1,configurable:!0}),Object.defineProperty(InternalTexture.prototype,"uniqueId",{get:function(){return this._uniqueId},enumerable:!1,configurable:!0}),InternalTexture.prototype.getEngine=function(){return this._engine},Object.defineProperty(InternalTexture.prototype,"source",{get:function(){return this._source},enumerable:!1,configurable:!0}),InternalTexture.prototype.incrementReferences=function(){this._references++},InternalTexture.prototype.updateSize=function(e,t,i){void 0===i&&(i=1),this._engine.updateTextureDimensions(this,e,t,i),this.width=e,this.height=t,this.depth=i,this.baseWidth=e,this.baseHeight=t,this.baseDepth=i,this._size=e*t*i},InternalTexture.prototype._rebuild=function(){var e,t=this;if(this.isReady=!1,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this.onRebuildCallback){var i=this.onRebuildCallback(this),n=function(e){e._swapAndDie(t,!1),t.isReady=i.isReady};i.isAsync?i.proxy.then(n):n(i.proxy)}else{var r;switch(this.source){case InternalTextureSource.Temp:break;case InternalTextureSource.Url:return void(r=this._engine.createTexture(null!==(e=this._originalUrl)&&void 0!==e?e:this.url,!this.generateMipMaps,this.invertY,null,this.samplingMode,(function(){r._swapAndDie(t,!1),t.isReady=!0}),null,this._buffer,void 0,this.format,this._extension,void 0,void 0,void 0,this._useSRGBBuffer));case InternalTextureSource.Raw:(r=this._engine.createRawTexture(this._bufferView,this.baseWidth,this.baseHeight,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type,void 0,this._useSRGBBuffer))._swapAndDie(this,!1),this.isReady=!0;break;case InternalTextureSource.Raw3D:(r=this._engine.createRawTexture3D(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type))._swapAndDie(this,!1),this.isReady=!0;break;case InternalTextureSource.Raw2DArray:(r=this._engine.createRawTexture2DArray(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type))._swapAndDie(this,!1),this.isReady=!0;break;case InternalTextureSource.Dynamic:(r=this._engine.createDynamicTexture(this.baseWidth,this.baseHeight,this.generateMipMaps,this.samplingMode))._swapAndDie(this,!1),this._engine.updateDynamicTexture(this,this._engine.getRenderingCanvas(),this.invertY,void 0,void 0,!0);break;case InternalTextureSource.Cube:return void(r=this._engine.createCubeTexture(this.url,null,this._files,!this.generateMipMaps,(function(){r._swapAndDie(t,!1),t.isReady=!0}),null,this.format,this._extension,!1,0,0,null,void 0,this._useSRGBBuffer));case InternalTextureSource.CubeRaw:(r=this._engine.createRawCubeTexture(this._bufferViewArray,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this,!1),this.isReady=!0;break;case InternalTextureSource.CubeRawRGBD:return;case InternalTextureSource.CubePrefiltered:return void((r=this._engine.createPrefilteredCubeTexture(this.url,null,this._lodGenerationScale,this._lodGenerationOffset,(function(e){e&&e._swapAndDie(t,!1),t.isReady=!0}),null,this.format,this._extension))._sphericalPolynomial=this._sphericalPolynomial)}}},InternalTexture.prototype._swapAndDie=function(e,t){var i;void 0===t&&(t=!0),null===(i=this._hardwareTexture)||void 0===i||i.setUsage(e._source,this.generateMipMaps,this.isCube,this.width,this.height),e._hardwareTexture=this._hardwareTexture,t&&(e._isRGBD=this._isRGBD),this._lodTextureHigh&&(e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureHigh=this._lodTextureHigh),this._lodTextureMid&&(e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureMid=this._lodTextureMid),this._lodTextureLow&&(e._lodTextureLow&&e._lodTextureLow.dispose(),e._lodTextureLow=this._lodTextureLow),this._irradianceTexture&&(e._irradianceTexture&&e._irradianceTexture.dispose(),e._irradianceTexture=this._irradianceTexture);var n=this._engine.getLoadedTexturesCache(),r=n.indexOf(this);-1!==r&&n.splice(r,1),-1===(r=n.indexOf(e))&&n.push(e)},InternalTexture.prototype.dispose=function(){this._references--,this.onLoadedObservable.clear(),this.onErrorObservable.clear(),0===this._references&&(this._engine._releaseTexture(this),this._hardwareTexture=null)},InternalTexture._Counter=0;var _0x1982dc=(_0x5a1070=!0,function(e,t){var i=_0x5a1070?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a1070=!1,i}),_0x5f9296=_0x1982dc(void 0,(function(){return _0x5f9296.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f9296).search("(((.+)+)+)+$")})),_0x5a1070;function _0x34d578(e,t,i,n){this._textures=null,this._attachments=null,this._generateStencilBuffer=!1,this._generateDepthBuffer=!1,this._depthStencilTextureWithStencil=!1,this._isMulti=e,this._isCube=t,this._size=i,this._engine=n,this._depthStencilTexture=null}_0x5f9296(),Object.defineProperty(_0x34d578.prototype,"depthStencilTexture",{get:function(){return this._depthStencilTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"depthStencilTextureWithStencil",{get:function(){return this._depthStencilTextureWithStencil},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"isCube",{get:function(){return this._isCube},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"isMulti",{get:function(){return this._isMulti},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"is2DArray",{get:function(){return this.layers>0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"size",{get:function(){return this.width},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"width",{get:function(){return this._size.width||this._size},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"height",{get:function(){return this._size.height||this._size},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"layers",{get:function(){return this._size.layers||0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"texture",{get:function(){var e,t;return null!==(t=null===(e=this._textures)||void 0===e?void 0:e[0])&&void 0!==t?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"textures",{get:function(){return this._textures},enumerable:!1,configurable:!0}),Object.defineProperty(_0x34d578.prototype,"samples",{get:function(){var e,t;return null!==(t=null===(e=this.texture)||void 0===e?void 0:e.samples)&&void 0!==t?t:1},enumerable:!1,configurable:!0}),_0x34d578.prototype.setSamples=function(e,t,i){return void 0===t&&(t=!0),void 0===i&&(i=!1),this.samples!==e||i?this._isMulti?this._engine.updateMultipleRenderTargetTextureSampleCount(this,e,t):this._engine.updateRenderTargetTextureSampleCount(this,e):e},_0x34d578.prototype.setTextures=function(e){Array.isArray(e)?this._textures=e:this._textures=e?[e]:null},_0x34d578.prototype.setTexture=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=!0),!this._textures&&(this._textures=[]),this._textures[t]&&i&&this._textures[t].dispose(),this._textures[t]=e},_0x34d578.prototype.createDepthStencilTexture=function(e,t,i,n,r){var o;return void 0===e&&(e=0),void 0===t&&(t=!0),void 0===i&&(i=!1),void 0===n&&(n=1),void 0===r&&(r=_0x354cf8.TEXTUREFORMAT_DEPTH32_FLOAT),null===(o=this._depthStencilTexture)||void 0===o||o.dispose(),this._depthStencilTextureWithStencil=i,this._depthStencilTexture=this._engine.createDepthStencilTexture(this._size,{bilinearFiltering:t,comparisonFunction:e,generateStencil:i,isCube:this._isCube,samples:n,depthTextureFormat:r},this),this._depthStencilTexture},_0x34d578.prototype._shareDepth=function(e){this._depthStencilTexture&&(e._depthStencilTexture&&e._depthStencilTexture.dispose(),e._depthStencilTexture=this._depthStencilTexture,this._depthStencilTexture.incrementReferences())},_0x34d578.prototype._swapAndDie=function(e){this.texture&&this.texture._swapAndDie(e),this._textures=null,this.dispose(!0)},_0x34d578.prototype._cloneRenderTargetWrapper=function(){var e,t,i,n,r,o,a=null;if(this._isMulti){var s=this.textures;if(s&&s.length>0){var l=!1,u=s.length,c=s[s.length-1]._source;(c===InternalTextureSource.Depth||c===InternalTextureSource.DepthStencil)&&(l=!0,u--);for(var h=[],d=[],f=0;f<u;++f){var p=s[f];h.push(p.samplingMode),d.push(p.type)}var _={samplingModes:h,generateMipMaps:s[0].generateMipMaps,generateDepthBuffer:this._generateDepthBuffer,generateStencilBuffer:this._generateStencilBuffer,generateDepthTexture:l,types:d,textureCount:u},m={width:this.width,height:this.height};a=this._engine.createMultipleRenderTarget(m,_)}}else{var g={};if(g.generateDepthBuffer=this._generateDepthBuffer,g.generateMipMaps=null!==(t=null===(e=this.texture)||void 0===e?void 0:e.generateMipMaps)&&void 0!==t&&t,g.generateStencilBuffer=this._generateStencilBuffer,g.samplingMode=null===(i=this.texture)||void 0===i?void 0:i.samplingMode,g.type=null===(n=this.texture)||void 0===n?void 0:n.type,g.format=null===(r=this.texture)||void 0===r?void 0:r.format,this.isCube)a=this._engine.createRenderTargetCubeTexture(this.width,g);else{m={width:this.width,height:this.height,layers:this.is2DArray?null===(o=this.texture)||void 0===o?void 0:o.depth:void 0};a=this._engine.createRenderTargetTexture(m,g)}a.texture.isReady=!0}return a},_0x34d578.prototype._swapRenderTargetWrapper=function(e){if(this._textures&&e._textures)for(var t=0;t<this._textures.length;++t)this._textures[t]._swapAndDie(e._textures[t],!1),e._textures[t].isReady=!0;this._depthStencilTexture&&e._depthStencilTexture&&(this._depthStencilTexture._swapAndDie(e._depthStencilTexture),e._depthStencilTexture.isReady=!0),this._textures=null,this._depthStencilTexture=null},_0x34d578.prototype._rebuild=function(){var e=this._cloneRenderTargetWrapper();if(e){if(this._depthStencilTexture){var t=this._depthStencilTexture.samplingMode,i=t===_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE||t===_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE||t===_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST;e.createDepthStencilTexture(this._depthStencilTexture._comparisonFunction,i,this._depthStencilTextureWithStencil,this._depthStencilTexture.samples)}this.samples>1&&e.setSamples(this.samples),e._swapRenderTargetWrapper(this),e.dispose()}},_0x34d578.prototype.releaseTextures=function(){var e,t;if(this._textures)for(var i=0;null!==(t=i<(null===(e=this._textures)||void 0===e?void 0:e.length))&&void 0!==t&&t;++i)this._textures[i].dispose();this._textures=null},_0x34d578.prototype.dispose=function(e){var t;void 0===e&&(e=!1),!e&&(null===(t=this._depthStencilTexture)||void 0===t||t.dispose(),this._depthStencilTexture=null,this.releaseTextures()),this._engine._releaseRenderTargetWrapper(this)};var v$P=1;function r$11(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).context;o$1q.defined("options.context",t),this.id=v$P++,this._context=t,this._colorTextures=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthStencilTexture=void 0,this.destroyAttachments=u$_(e.destroyAttachments,!0);var i,n,r,o=e.colorTextures,a=!1,s=1,l=1;if(e$2b(e.colorTextures)?(a=o.length>1,s=o[0].width,l=o[0].height):e$2b(e.depthTexture)?(s=e.depthTexture.width,l=e.depthTexture.height):e$2b(e.depthStencilTexture)&&(s=e.depthStencilTexture.width,l=e.depthStencilTexture.height),this._textureSize={width:s,height:l},this._renderTargetWrapper=new _0x34d578(a,!1,this._textureSize,t.engine),e$2b(e.colorTextures)){var u=e.colorTextures;r=this._colorTextures.length=this._activeColorAttachments.length=u.length;var c=[],h=[];for(n=0;n<r;++n){if(i=u[n],!V$10.isColorFormat(i.pixelFormat))throw new t$16("The color-texture pixel-format must be a color format.");if(i.pixelDatatype===_$$.FLOAT&&!t.colorBufferFloat)throw new t$16("The color texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions. See Context.colorBufferFloat.");if(i.pixelDatatype===_$$.HALF_FLOAT&&!t.colorBufferHalfFloat)throw new t$16("The color texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension. See Context.colorBufferHalfFloat.");this._renderTargetWrapper.setTexture(i._inner.internalTexture,n,!1),this._colorTextures[n]=i,c.push(n+1),h.push(n+1)}this._renderTargetWrapper._attachments=c,this._renderTargetWrapper._defaultAttachments=h}e$2b(e.depthTexture)&&(this._renderTargetWrapper._depthStencilTextureWithStencil=!1,this._renderTargetWrapper._depthStencilTexture=e.depthTexture._inner.internalTexture,this._depthTexture=e.depthTexture),e$2b(e.depthStencilTexture)&&(this._renderTargetWrapper._depthStencilTextureWithStencil=!0,this._renderTargetWrapper._depthStencilTexture=e.depthStencilTexture._inner.internalTexture,this._depthStencilTexture=e.depthStencilTexture)}function t$W(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).context;o$1q.defined("options.context",t),e.context.webgpu?this._inner=new r$11(e):this._inner=new a$W(e)}function n$Z(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}function e$1Q(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}Object.defineProperties(r$11.prototype,{status:{get:function(){return de$x.FRAMEBUFFER_COMPLETE}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}},textureSize:{get:function(){return this._textureSize}}}),r$11.prototype._bind=function(){e$2b(this._renderTargetWrapper)&&this._context._engine.bindFramebuffer(this._renderTargetWrapper)},r$11.prototype._unBind=function(){e$2b(this._renderTargetWrapper)&&this._context._engine.unBindFramebuffer(this._renderTargetWrapper)},r$11.prototype._attachTexture=function(e,t){console.log("FramebufferGPU.prototype._attachTexture")},r$11.prototype._getActiveColorAttachments=function(){console.log("FramebufferGPU.prototype._getActiveColorAttachments")},r$11.prototype.getColorTexture=function(e){if(!e$2b(e)||e<0||e>=this._colorTextures.length)throw new t$16("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]},r$11.prototype.getColorRenderbuffer=function(e){if(!e$2b(e)||e<0||e>=this._colorRenderbuffers.length)throw new t$16("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]},r$11.prototype.isDestroyed=function(){return!1},r$11.prototype.destroy=function(){if(this._renderTargetWrapper.dispose(!0),this.destroyAttachments){for(var e=this._colorTextures,t=e.length,i=0;i<t;++i){var n=e[i];e$2b(n)&&n.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy()}return i$10(this)},Object.defineProperties(t$W.prototype,{status:{get:function(){return this._inner.status}},numberOfColorAttachments:{get:function(){return this._inner.numberOfColorAttachments}},depthTexture:{get:function(){return this._inner.depthTexture}},depthRenderbuffer:{get:function(){return this._inner.depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._inner.stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._inner.depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._inner.depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}},textureSize:{get:function(){return this._inner.textureSize}}}),t$W.prototype._bind=function(){this._inner._bind()},t$W.prototype._unBind=function(){this._inner._unBind()},t$W.prototype._attachTexture=function(e,t){this._inner._attachTexture(e,t)},t$W.prototype._getActiveColorAttachments=function(){return this._inner._getActiveColorAttachments()},t$W.prototype.getColorTexture=function(e){return this._inner.getColorTexture(e)},t$W.prototype.getColorRenderbuffer=function(e){return this._inner.getColorRenderbuffer(e)},t$W.prototype.isDestroyed=function(){return!1},t$W.prototype.destroy=function(){return this._inner.destroy(),i$10(this)},t$W.blitFramebuffers=function(e,t,i,n,r,o){e.webgpu||a$W.blitFramebuffers(e,t,i,n,r,o)};var T$_={DONT_CARE:de$x.DONT_CARE,FASTEST:de$x.FASTEST,NICEST:de$x.NICEST,validate:function(e){return e===T$_.DONT_CARE||e===T$_.FASTEST||e===T$_.NICEST}},I$1e=Object.freeze(T$_);function e$1P(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.wrapS,q$19.CLAMP_TO_EDGE),i=u$_(e.wrapT,q$19.CLAMP_TO_EDGE),n=u$_(e.minificationFilter,tt$h.LINEAR),r=u$_(e.magnificationFilter,rt$i.LINEAR),o=e$2b(e.maximumAnisotropy)?e.maximumAnisotropy:1;if(!q$19.validate(t))throw new t$16("Invalid sampler.wrapS.");if(!q$19.validate(i))throw new t$16("Invalid sampler.wrapT.");if(!tt$h.validate(n))throw new t$16("Invalid sampler.minificationFilter.");if(!rt$i.validate(r))throw new t$16("Invalid sampler.magnificationFilter.");o$1q.typeOf.number.greaterThanOrEquals("maximumAnisotropy",o,1),this._wrapS=t,this._wrapT=i,this._minificationFilter=n,this._magnificationFilter=r,this._maximumAnisotropy=o,this._comparisonFunction=e.comparisonFunction}function w$U(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=e.width,n=e.height,r=e.source;e$2b(r)&&(e$2b(i)||(i=u$_(r.videoWidth,r.width)),e$2b(n)||(n=u$_(r.videoHeight,r.height)));var o=u$_(e.pixelFormat,V$10.RGBA),a=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE),s=V$10.toInternalFormat(o,a,t),l=V$10.isCompressedFormat(s);if(!e$2b(i)||!e$2b(n))throw new t$16("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(o$1q.typeOf.number.greaterThan("width",i,0),i>e$1T.maximumTextureSize)throw new t$16("Width must be less than or equal to the maximum texture size ("+e$1T.maximumTextureSize+"). Check maximumTextureSize.");if(o$1q.typeOf.number.greaterThan("height",n,0),n>e$1T.maximumTextureSize)throw new t$16("Height must be less than or equal to the maximum texture size ("+e$1T.maximumTextureSize+"). Check maximumTextureSize.");if(!V$10.validate(o))throw new t$16("Invalid options.pixelFormat.");if(!l&&!_$$.validate(a))throw new t$16("Invalid options.pixelDatatype.");if(o===V$10.DEPTH_COMPONENT&&a!==_$$.UNSIGNED_SHORT&&a!==_$$.UNSIGNED_INT&&a!==_$$.FLOAT)throw new t$16("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(o===V$10.DEPTH_STENCIL&&a!==_$$.UNSIGNED_INT_24_8)throw new t$16("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(a===_$$.FLOAT&&!t.floatingPointTexture)throw new t$16("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(a===_$$.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$16("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(V$10.isDepthFormat(o)){if(e$2b(r))throw new t$16("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, source cannot be provided.");if(!t.depthTexture)throw new t$16("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.")}if(l){if(!e$2b(r)||!e$2b(r.arrayBufferView))throw new t$16("When options.pixelFormat is compressed, options.source.arrayBufferView must be defined.");if(V$10.isDXTFormat(s)&&!t.s3tc)throw new t$16("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(V$10.isPVRTCFormat(s)&&!t.pvrtc)throw new t$16("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(V$10.isETC1Format(s)&&!t.etc1)throw new t$16("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.");if(V$10.compressedTextureSizeInBytes(s,i,n)!==r.arrayBufferView.byteLength)throw new t$16("The byte length of the array buffer is invalid for the compressed texture with the given width and height.")}var u=e.preMultiplyAlpha||o===V$10.RGB||o===V$10.LUMINANCE,c=u$_(e.flipY,!0);const h=u$_(e.skipColorSpaceConversion,!1);var d=!0,f=t._gl,p=f.TEXTURE_2D,_=f.createTexture();f.activeTexture(f.TEXTURE0),f.bindTexture(p,_);var m,g=4;if(e$2b(r)&&e$2b(r.arrayBufferView)&&!l&&(g=V$10.alignmentInBytes(o,a,i)),f.pixelStorei(f.UNPACK_ALIGNMENT,g),h?f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.NONE):f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.BROWSER_DEFAULT_WEBGL),e$2b(r))if(e$2b(r.arrayBufferView)){f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!1);var x,v,y,$=r.arrayBufferView;if(l){if(f.compressedTexImage2D(p,0,s,i,n,0,$),e$2b(r.mipLevels))for(v=i,y=n,x=0;x<r.mipLevels.length;++x)(v=0|Math.floor(v/2))<1&&(v=1),(y=0|Math.floor(y/2))<1&&(y=1),f.compressedTexImage2D(p,x+1,s,v,y,0,r.mipLevels[x])}else if(c&&($=V$10.flipY($,o,a,i,n)),f.texImage2D(p,0,s,i,n,0,o,_$$.toWebGLConstant(a,t),$),e$2b(r.mipLevels))for(v=i,y=n,x=0;x<r.mipLevels.length;++x)(v=0|Math.floor(v/2))<1&&(v=1),(y=0|Math.floor(y/2))<1&&(y=1),f.texImage2D(p,x+1,s,v,y,0,o,_$$.toWebGLConstant(a,t),r.mipLevels[x])}else e$2b(r.framebuffer)?(f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!1),r.framebuffer!==t.defaultFramebuffer&&r.framebuffer._bind(),f.copyTexImage2D(p,0,s,r.xOffset,r.yOffset,i,n,0),r.framebuffer!==t.defaultFramebuffer&&r.framebuffer._unBind()):(f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,c),f.texImage2D(p,0,s,o,_$$.toWebGLConstant(a,t),r));else f.texImage2D(p,0,s,i,n,0,o,_$$.toWebGLConstant(a,t),null),d=!1;f.bindTexture(p,null),m=l?V$10.compressedTextureSizeInBytes(o,i,n):V$10.textureSizeInBytes(o,a,i,n),this._id=e$1Q(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=p,this._texture=_,this._internalFormat=s,this._pixelFormat=o,this._pixelDatatype=a,this._width=i,this._height=n,this._dimensions=new o$1o(i,n),this._size=[i,n],this._hasMipmap=!1,this._sizeInBytes=m,this._preMultiplyAlpha=u,this._flipY=c,this._initialized=d,this._sampler=void 0,this.ignoreWEBGL2=!1,this.sampler=e$2b(e.sampler)?e.sampler:new e$1P,t.memorySize+=m}Object.defineProperties(e$1P.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}},comparisonFunction:{get:function(){return this._comparisonFunction}}}),e$1P.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy},w$U.fromFramebuffer=function(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=t._gl,n=u$_(e.pixelFormat,V$10.RGB),r=u$_(e.framebufferXOffset,0),o=u$_(e.framebufferYOffset,0),a=u$_(e.width,i.drawingBufferWidth),s=u$_(e.height,i.drawingBufferHeight),l=e.framebuffer;if(!V$10.validate(n))throw new t$16("Invalid pixelFormat.");if(V$10.isDepthFormat(n)||V$10.isCompressedFormat(n))throw new t$16("pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.");if(o$1q.defined("options.context",e.context),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",r,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",o,0),r+a>i.drawingBufferWidth)throw new t$16("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(o+s>i.drawingBufferHeight)throw new t$16("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new w$U({context:t,width:a,height:s,pixelFormat:n,source:{framebuffer:e$2b(l)?l:t.defaultFramebuffer,xOffset:r,yOffset:o,width:a,height:s}})},Object.defineProperties(w$U.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=e.comparisonFunction,r=t===tt$h.NEAREST_MIPMAP_NEAREST||t===tt$h.NEAREST_MIPMAP_LINEAR||t===tt$h.LINEAR_MIPMAP_NEAREST||t===tt$h.LINEAR_MIPMAP_LINEAR,o=this._context,a=this._pixelDatatype;const s=this._pixelFormat;(a===_$$.FLOAT&&!o.textureFloatLinear||a===_$$.HALF_FLOAT&&!o.textureHalfFloatLinear)&&(t=r?tt$h.NEAREST_MIPMAP_NEAREST:tt$h.NEAREST,i=rt$i.NEAREST),o.webgl2&&V$10.isDepthFormat(s)&&(t=tt$h.NEAREST,i=rt$i.NEAREST);var l=o._gl,u=this._textureTarget;l.activeTexture(l.TEXTURE0),l.bindTexture(u,this._texture),l.texParameteri(u,l.TEXTURE_MIN_FILTER,t),l.texParameteri(u,l.TEXTURE_MAG_FILTER,i),l.texParameteri(u,l.TEXTURE_WRAP_S,e.wrapS),l.texParameteri(u,l.TEXTURE_WRAP_T,e.wrapT),e$2b(this._textureFilterAnisotropic)&&l.texParameteri(u,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),o.webgl2&&n&&(n===de$x.LEQUAL?(l.texParameteri(u,l.TEXTURE_COMPARE_FUNC,de$x.LEQUAL),l.texParameteri(u,l.TEXTURE_COMPARE_MODE,l.NONE)):(l.texParameteri(u,l.TEXTURE_COMPARE_FUNC,n),l.texParameteri(u,l.TEXTURE_COMPARE_MODE,l.COMPARE_REF_TO_TEXTURE))),l.bindTexture(u,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},size:{get:function(){return this._size}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),w$U.prototype.copyFrom=function(e,t,i){if(t=u$_(t,0),i=u$_(i,0),o$1q.defined("source",e),V$10.isDepthFormat(this._pixelFormat))throw new t$16("Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");var n=V$10.isCompressedFormat(this._pixelFormat);o$1q.typeOf.number.greaterThanOrEquals("xOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",i,0),o$1q.typeOf.number.lessThanOrEquals("xOffset + source.width",t+e.width,this._width),o$1q.typeOf.number.lessThanOrEquals("yOffset + source.height",i+e.height,this._height);const r=this._context;var o=r._gl,a=this._textureTarget;o.activeTexture(o.TEXTURE0),o.bindTexture(a,this._texture);var s=e.width,l=e.height,u=e.arrayBufferView,c=this._width,h=this._height,d=this._pixelFormat,f=this._pixelDatatype;const p=this._internalFormat;var _=this._preMultiplyAlpha,m=this._flipY,g=4;e$2b(u)&&(g=V$10.alignmentInBytes(d,f,s)),o.pixelStorei(o.UNPACK_ALIGNMENT,g),o.pixelStorei(o.UNPACK_COLORSPACE_CONVERSION_WEBGL,o.BROWSER_DEFAULT_WEBGL);var x=!1;if(!this._initialized){if(0===t&&0===i&&s===c&&l===h)e$2b(u)?(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),m&&(u=V$10.flipY(u,d,f,c,h)),o.texImage2D(a,0,p,c,h,0,d,_$$.toWebGLConstant(f,r),u)):(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,_),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,m),o.texImage2D(a,0,p,d,_$$.toWebGLConstant(f,r),e)),x=!0;else{o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1);var v=V$10.createTypedArray(d,f,c,h);o.texImage2D(a,0,p,c,h,0,d,_$$.toWebGLConstant(f,r),v)}this._initialized=!0}x||(e$2b(u)?(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),m&&(u=V$10.flipY(u,d,f,s,l)),n?o.compressedTexSubImage2D(a,0,t,i,s,l,d,u):o.texSubImage2D(a,0,t,i,s,l,d,_$$.toWebGLConstant(f,r),u)):(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,_),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,m),n?o.compressedTexSubImage2D(a,0,t,i,s,l,d,u):o.texSubImage2D(a,0,t,i,d,_$$.toWebGLConstant(f,r),e))),o.bindTexture(a,null)},w$U.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){if(e=u$_(e,0),t=u$_(t,0),i=u$_(i,0),n=u$_(n,0),r=u$_(r,this._width),o=u$_(o,this._height),V$10.isDepthFormat(this._pixelFormat))throw new t$16("Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(this._pixelDatatype===_$$.FLOAT)throw new t$16("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===_$$.HALF_FLOAT)throw new t$16("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");if(V$10.isCompressedFormat(this._pixelFormat))throw new t$16("Cannot call copyFrom with a compressed texture pixel format.");o$1q.typeOf.number.greaterThanOrEquals("xOffset",e,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",i,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",n,0),o$1q.typeOf.number.lessThanOrEquals("xOffset + width",e+r,this._width),o$1q.typeOf.number.lessThanOrEquals("yOffset + height",t+o,this._height);var a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.copyTexSubImage2D(s,0,e,t,i,n,r,o),a.bindTexture(s,null),this._initialized=!0},w$U.prototype.copyFromTexture=function(e,t,i,n,r,o,a){var s=this._context,l=new t$W({context:s,colorTextures:[e],destroyAttachments:!1});if(l!==s._currentFramebuffer&&(s._currentFramebuffer=l,e$2b(l))){l._bind();var u=l._getActiveColorAttachments();s.drawBuffers&&s.glDrawBuffers(u)}this.copyFromFramebuffer(t,i,n,r,o,a),l.destroy()},w$U.prototype.generateMipmap=function(e){if(e=u$_(e,I$1e.DONT_CARE),V$10.isDepthFormat(this._pixelFormat))throw new t$16("Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(V$10.isCompressedFormat(this._pixelFormat))throw new t$16("Cannot call generateMipmap with a compressed pixel format.");if(!this._context.webgl2){if(this._width>1&&!e$2a.isPowerOfTwo(this._width))throw new t$16("width must be a power of two to call generateMipmap() in a WebGL1 context.");if(this._height>1&&!e$2a.isPowerOfTwo(this._height))throw new t$16("height must be a power of two to call generateMipmap() in a WebGL1 context.")}if(!I$1e.validate(e))throw new t$16("hint is invalid.");this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},w$U.prototype.isDestroyed=function(){return!1},w$U.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,i$10(this)};var _0x2cc114=(_0x178f30=!0,function(e,t){var i=_0x178f30?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x178f30=!1,i}),_0x54c3c1=_0x2cc114(void 0,(function(){return _0x54c3c1.toString().search("(((.+)+)+)+$").toString().constructor(_0x54c3c1).search("(((.+)+)+)+$")})),_0x178f30;function _0x1248df(e,t){this.width=e,this.height=t}_0x54c3c1(),_0x1248df.prototype.toString=function(){return"{W: ".concat(this.width,", H: ").concat(this.height,"}")},_0x1248df.prototype.getClassName=function(){return"Size"},_0x1248df.prototype.getHashCode=function(){var e=0|this.width;return e=397*e^(0|this.height)},_0x1248df.prototype.copyFrom=function(e){this.width=e.width,this.height=e.height},_0x1248df.prototype.copyFromFloats=function(e,t){return this.width=e,this.height=t,this},_0x1248df.prototype.set=function(e,t){return this.copyFromFloats(e,t)},_0x1248df.prototype.multiplyByFloats=function(e,t){return new _0x1248df(this.width*e,this.height*t)},_0x1248df.prototype.clone=function(){return new _0x1248df(this.width,this.height)},_0x1248df.prototype.equals=function(e){return!!e&&(this.width===e.width&&this.height===e.height)},Object.defineProperty(_0x1248df.prototype,"surface",{get:function(){return this.width*this.height},enumerable:!1,configurable:!0}),_0x1248df.Zero=function(){return new _0x1248df(0,0)},_0x1248df.prototype.add=function(e){return new _0x1248df(this.width+e.width,this.height+e.height)},_0x1248df.prototype.subtract=function(e){return new _0x1248df(this.width-e.width,this.height-e.height)},_0x1248df.Lerp=function(e,t,i){return new _0x1248df(e.width+(t.width-e.width)*i,e.height+(t.height-e.height)*i)};var _0x183b5d=(_0x2322ed=!0,function(e,t){var i=_0x2322ed?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2322ed=!1,i}),_0x5e2cac=_0x183b5d(void 0,(function(){return _0x5e2cac.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e2cac).search("(((.+)+)+)+$")})),_0x2322ed,_0x3e0d86,_0x3e7b3e,_0x48aaad,_0x5e0e10,_0x133363,_0x250b7f,_0xfcf739,_0x48c9ac,_0xa750f9,_0x46c7b2,_0x248a31,_0x462d88,_0x51c11d,_0x27e667,_0x45afcf,_0x56c8b3,_0x269346,_0x9a49e3,_0x32cc8d,_0x1c9ed9,_0x5879f1,_0x59ab0b,_0x3e494f,_0x569ef2,_0x3ca748,_0x418ade,_0x388de9,_0x3ff851,_0x1b5402,_0x12ccae,_0x5ba1ae,_0x4bc589,_0x23530a,_0x5d188c,_0x374d2a,_0x6aa9b0,_0x24d4cd,_0x4d6bed,_0x390a5e,_0x4f9d7d,_0x369f5f,_0x2ac57c,_0x17f290,_0x18f243,_0x15b35d,_0x3392bb,_0x21a1ec,_0x4dc01d,_0x2f806b,_0x490002,_0x5cec5b,_0x120965,_0xa46af2,_0x23e041,_0x35ac26,_0x1c11b4,_0x33df1a,_0x3f00b2,_0x43d996,_0x43c474,_0x5d1abb,_0x549744,_0x323d93,_0x52c237,_0x3c17d0,_0x5d6cb4,_0x50802f,_0x11c503,_0x1756b5,_0x543ca3,_0x55fb85,_0x20079d,_0x4f095e,_0x3f5da4,_0x25ee8e;function _0x5cc035(e){this._wrapU=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE,this._wrapV=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE,this.wrapR=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE,this.anisotropicFilteringLevel=4,this.delayLoadState=_0x354cf8.DELAYLOADSTATE_NONE,this._texture=null,this._engine=null,this._cachedSize=_0x1248df.Zero(),this._cachedBaseSize=_0x1248df.Zero(),this._initialSamplingMode=_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE,this._texture=e,this._texture&&(this._engine=this._texture.getEngine())}_0x5e2cac(),Object.defineProperty(_0x5cc035.prototype,"wrapU",{get:function(){return this._wrapU},set:function(e){this._wrapU=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5cc035.prototype,"wrapV",{get:function(){return this._wrapV},set:function(e){this._wrapV=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5cc035.prototype,"coordinatesMode",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5cc035.prototype,"isCube",{get:function(){return!!this._texture&&this._texture.isCube},set:function(e){this._texture&&(this._texture.isCube=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5cc035.prototype,"is3D",{get:function(){return!!this._texture&&this._texture.is3D},set:function(e){this._texture&&(this._texture.is3D=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5cc035.prototype,"is2DArray",{get:function(){return!!this._texture&&this._texture.is2DArray},set:function(e){this._texture&&(this._texture.is2DArray=e)},enumerable:!1,configurable:!0}),_0x5cc035.prototype.getClassName=function(){return"ThinTexture"},_0x5cc035.prototype.isReady=function(){return this.delayLoadState===_0x354cf8.DELAYLOADSTATE_NOTLOADED?(this.delayLoad(),!1):!!this._texture&&this._texture.isReady},_0x5cc035.prototype.delayLoad=function(){},_0x5cc035.prototype.getInternalTexture=function(){return this._texture},_0x5cc035.prototype.getSize=function(){if(this._texture){if(this._texture.width)return this._cachedSize.width=this._texture.width,this._cachedSize.height=this._texture.height,this._cachedSize;if(this._texture._size)return this._cachedSize.width=this._texture._size,this._cachedSize.height=this._texture._size,this._cachedSize}return this._cachedSize},_0x5cc035.prototype.getBaseSize=function(){return this.isReady()&&this._texture?this._texture._size?(this._cachedBaseSize.width=this._texture._size,this._cachedBaseSize.height=this._texture._size,this._cachedBaseSize):(this._cachedBaseSize.width=this._texture.baseWidth,this._cachedBaseSize.height=this._texture.baseHeight,this._cachedBaseSize):(this._cachedBaseSize.width=0,this._cachedBaseSize.height=0,this._cachedBaseSize)},Object.defineProperty(_0x5cc035.prototype,"samplingMode",{get:function(){return this._texture?this._texture.samplingMode:this._initialSamplingMode},enumerable:!1,configurable:!0}),_0x5cc035.prototype.updateSamplingMode=function(e){this._texture&&this._engine&&this._engine.updateTextureSamplingMode(e,this._texture)},_0x5cc035.prototype.releaseInternalTexture=function(){this._texture&&(this._texture.dispose(),this._texture=null)},_0x5cc035.prototype.dispose=function(){this._texture&&(this.releaseInternalTexture(),this._engine=null)},_0x3e7b3e=_0x3e0d86||(_0x3e0d86={}),_0x3e7b3e.SRGB="srgb",_0x5e0e10=_0x48aaad||(_0x48aaad={}),_0x5e0e10.LowPower="low-power",_0x5e0e10.HighPerformance="high-performance",_0x250b7f=_0x133363||(_0x133363={}),_0x250b7f.DepthClipControl="depth-clip-control",_0x250b7f.Depth24UnormStencil8="depth24unorm-stencil8",_0x250b7f.Depth32FloatStencil8="depth32float-stencil8",_0x250b7f.TextureCompressionBC="texture-compression-bc",_0x250b7f.TextureCompressionETC2="texture-compression-etc2",_0x250b7f.TextureCompressionASTC="texture-compression-astc",_0x250b7f.TimestampQuery="timestamp-query",_0x250b7f.IndirectFirstInstance="indirect-first-instance",_0x250b7f.ShaderF16="shader-f16",_0x250b7f.BGRA8UnormStorage="bgra8unorm-storage",_0x48c9ac=_0xfcf739||(_0xfcf739={}),_0x48c9ac[_0x48c9ac.MapRead=1]="MapRead",_0x48c9ac[_0x48c9ac.MapWrite=2]="MapWrite",_0x48c9ac[_0x48c9ac.CopySrc=4]="CopySrc",_0x48c9ac[_0x48c9ac.CopyDst=8]="CopyDst",_0x48c9ac[_0x48c9ac.Index=16]="Index",_0x48c9ac[_0x48c9ac.Vertex=32]="Vertex",_0x48c9ac[_0x48c9ac.Uniform=64]="Uniform",_0x48c9ac[_0x48c9ac.Storage=128]="Storage",_0x48c9ac[_0x48c9ac.Indirect=256]="Indirect",_0x48c9ac[_0x48c9ac.QueryResolve=512]="QueryResolve",_0x46c7b2=_0xa750f9||(_0xa750f9={}),_0x46c7b2[_0x46c7b2.Read=1]="Read",_0x46c7b2[_0x46c7b2.Write=2]="Write",_0x462d88=_0x248a31||(_0x248a31={}),_0x462d88.E1d="1d",_0x462d88.E2d="2d",_0x462d88.E3d="3d",_0x27e667=_0x51c11d||(_0x51c11d={}),_0x27e667[_0x27e667.CopySrc=1]="CopySrc",_0x27e667[_0x27e667.CopyDst=2]="CopyDst",_0x27e667[_0x27e667.TextureBinding=4]="TextureBinding",_0x27e667[_0x27e667.StorageBinding=8]="StorageBinding",_0x27e667[_0x27e667.RenderAttachment=16]="RenderAttachment",_0x56c8b3=_0x45afcf||(_0x45afcf={}),_0x56c8b3.E1d="1d",_0x56c8b3.E2d="2d",_0x56c8b3.E2dArray="2d-array",_0x56c8b3.Cube="cube",_0x56c8b3.CubeArray="cube-array",_0x56c8b3.E3d="3d",function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e.All="all",e.StencilOnly="stencil-only",e.DepthOnly="depth-only"}(_0x269346||(_0x269346={})),_0x32cc8d=_0x9a49e3||(_0x9a49e3={}),_0x32cc8d.R8Unorm="r8unorm",_0x32cc8d.R8Snorm="r8snorm",_0x32cc8d.R8Uint="r8uint",_0x32cc8d.R8Sint="r8sint",_0x32cc8d.R16Uint="r16uint",_0x32cc8d.R16Sint="r16sint",_0x32cc8d.R16Float="r16float",_0x32cc8d.RG8Unorm="rg8unorm",_0x32cc8d.RG8Snorm="rg8snorm",_0x32cc8d.RG8Uint="rg8uint",_0x32cc8d.RG8Sint="rg8sint",_0x32cc8d.R32Uint="r32uint",_0x32cc8d.R32Sint="r32sint",_0x32cc8d.R32Float="r32float",_0x32cc8d.RG16Uint="rg16uint",_0x32cc8d.RG16Sint="rg16sint",_0x32cc8d.RG16Float="rg16float",_0x32cc8d.RGBA8Unorm="rgba8unorm",_0x32cc8d.RGBA8UnormSRGB="rgba8unorm-srgb",_0x32cc8d.RGBA8Snorm="rgba8snorm",_0x32cc8d.RGBA8Uint="rgba8uint",_0x32cc8d.RGBA8Sint="rgba8sint",_0x32cc8d.BGRA8Unorm="bgra8unorm",_0x32cc8d.BGRA8UnormSRGB="bgra8unorm-srgb",_0x32cc8d.RGB9E5UFloat="rgb9e5ufloat",_0x32cc8d.RGB10A2Unorm="rgb10a2unorm",_0x32cc8d.RG11B10UFloat="rg11b10ufloat",_0x32cc8d.RG32Uint="rg32uint",_0x32cc8d.RG32Sint="rg32sint",_0x32cc8d.RG32Float="rg32float",_0x32cc8d.RGBA16Uint="rgba16uint",_0x32cc8d.RGBA16Sint="rgba16sint",_0x32cc8d.RGBA16Float="rgba16float",_0x32cc8d.RGBA32Uint="rgba32uint",_0x32cc8d.RGBA32Sint="rgba32sint",_0x32cc8d.RGBA32Float="rgba32float",_0x32cc8d.Stencil8="stencil8",_0x32cc8d.Depth16Unorm="depth16unorm",_0x32cc8d.Depth24Plus="depth24plus",_0x32cc8d.Depth24PlusStencil8="depth24plus-stencil8",_0x32cc8d.Depth32Float="depth32float",_0x32cc8d.BC1RGBAUnorm="bc1-rgba-unorm",_0x32cc8d.BC1RGBAUnormSRGB="bc1-rgba-unorm-srgb",_0x32cc8d.BC2RGBAUnorm="bc2-rgba-unorm",_0x32cc8d.BC2RGBAUnormSRGB="bc2-rgba-unorm-srgb",_0x32cc8d.BC3RGBAUnorm="bc3-rgba-unorm",_0x32cc8d.BC3RGBAUnormSRGB="bc3-rgba-unorm-srgb",_0x32cc8d.BC4RUnorm="bc4-r-unorm",_0x32cc8d.BC4RSnorm="bc4-r-snorm",_0x32cc8d.BC5RGUnorm="bc5-rg-unorm",_0x32cc8d.BC5RGSnorm="bc5-rg-snorm",_0x32cc8d.BC6HRGBUFloat="bc6h-rgb-ufloat",_0x32cc8d.BC6HRGBFloat="bc6h-rgb-float",_0x32cc8d.BC7RGBAUnorm="bc7-rgba-unorm",_0x32cc8d.BC7RGBAUnormSRGB="bc7-rgba-unorm-srgb",_0x32cc8d.ETC2RGB8Unorm="etc2-rgb8unorm",_0x32cc8d.ETC2RGB8UnormSRGB="etc2-rgb8unorm-srgb",_0x32cc8d.ETC2RGB8A1Unorm="etc2-rgb8a1unorm",_0x32cc8d.ETC2RGB8A1UnormSRGB="etc2-rgb8a1unorm-srgb",_0x32cc8d.ETC2RGBA8Unorm="etc2-rgba8unorm",_0x32cc8d.ETC2RGBA8UnormSRGB="etc2-rgba8unorm-srgb",_0x32cc8d.EACR11Unorm="eac-r11unorm",_0x32cc8d.EACR11Snorm="eac-r11snorm",_0x32cc8d.EACRG11Unorm="eac-rg11unorm",_0x32cc8d.EACRG11Snorm="eac-rg11snorm",_0x32cc8d.ASTC4x4Unorm="astc-4x4-unorm",_0x32cc8d.ASTC4x4UnormSRGB="astc-4x4-unorm-srgb",_0x32cc8d.ASTC5x4Unorm="astc-5x4-unorm",_0x32cc8d.ASTC5x4UnormSRGB="astc-5x4-unorm-srgb",_0x32cc8d.ASTC5x5Unorm="astc-5x5-unorm",_0x32cc8d.ASTC5x5UnormSRGB="astc-5x5-unorm-srgb",_0x32cc8d.ASTC6x5Unorm="astc-6x5-unorm",_0x32cc8d.ASTC6x5UnormSRGB="astc-6x5-unorm-srgb",_0x32cc8d.ASTC6x6Unorm="astc-6x6-unorm",_0x32cc8d.ASTC6x6UnormSRGB="astc-6x6-unorm-srgb",_0x32cc8d.ASTC8x5Unorm="astc-8x5-unorm",_0x32cc8d.ASTC8x5UnormSRGB="astc-8x5-unorm-srgb",_0x32cc8d.ASTC8x6Unorm="astc-8x6-unorm",_0x32cc8d.ASTC8x6UnormSRGB="astc-8x6-unorm-srgb",_0x32cc8d.ASTC8x8Unorm="astc-8x8-unorm",_0x32cc8d.ASTC8x8UnormSRGB="astc-8x8-unorm-srgb",_0x32cc8d.ASTC10x5Unorm="astc-10x5-unorm",_0x32cc8d.ASTC10x5UnormSRGB="astc-10x5-unorm-srgb",_0x32cc8d.ASTC10x6Unorm="astc-10x6-unorm",_0x32cc8d.ASTC10x6UnormSRGB="astc-10x6-unorm-srgb",_0x32cc8d.ASTC10x8Unorm="astc-10x8-unorm",_0x32cc8d.ASTC10x8UnormSRGB="astc-10x8-unorm-srgb",_0x32cc8d.ASTC10x10Unorm="astc-10x10-unorm",_0x32cc8d.ASTC10x10UnormSRGB="astc-10x10-unorm-srgb",_0x32cc8d.ASTC12x10Unorm="astc-12x10-unorm",_0x32cc8d.ASTC12x10UnormSRGB="astc-12x10-unorm-srgb",_0x32cc8d.ASTC12x12Unorm="astc-12x12-unorm",_0x32cc8d.ASTC12x12UnormSRGB="astc-12x12-unorm-srgb",_0x32cc8d.Depth24UnormStencil8="depth24unorm-stencil8",_0x32cc8d.Depth32FloatStencil8="depth32float-stencil8",_0x5879f1=_0x1c9ed9||(_0x1c9ed9={}),_0x5879f1.ClampToEdge="clamp-to-edge",_0x5879f1.Repeat="repeat",_0x5879f1.MirrorRepeat="mirror-repeat",_0x3e494f=_0x59ab0b||(_0x59ab0b={}),_0x3e494f.Nearest="nearest",_0x3e494f.Linear="linear",_0x3ca748=_0x569ef2||(_0x569ef2={}),_0x3ca748.Never="never",_0x3ca748.Less="less",_0x3ca748.Equal="equal",_0x3ca748.LessEqual="less-equal",_0x3ca748.Greater="greater",_0x3ca748.NotEqual="not-equal",_0x3ca748.GreaterEqual="greater-equal",_0x3ca748.Always="always",_0x388de9=_0x418ade||(_0x418ade={}),_0x388de9[_0x388de9.Vertex=1]="Vertex",_0x388de9[_0x388de9.Fragment=2]="Fragment",_0x388de9[_0x388de9.Compute=4]="Compute",_0x1b5402=_0x3ff851||(_0x3ff851={}),_0x1b5402.Uniform="uniform",_0x1b5402.Storage="storage",_0x1b5402.ReadOnlyStorage="read-only-storage",_0x5ba1ae=_0x12ccae||(_0x12ccae={}),_0x5ba1ae.Filtering="filtering",_0x5ba1ae.NonFiltering="non-filtering",_0x5ba1ae.Comparison="comparison",_0x23530a=_0x4bc589||(_0x4bc589={}),_0x23530a.Float="float",_0x23530a.UnfilterableFloat="unfilterable-float",_0x23530a.Depth="depth",_0x23530a.Sint="sint",_0x23530a.Uint="uint",_0x374d2a=_0x5d188c||(_0x5d188c={}),_0x374d2a.WriteOnly="write-only",_0x24d4cd=_0x6aa9b0||(_0x6aa9b0={}),_0x24d4cd.Error="error",_0x24d4cd.Warning="warning",_0x24d4cd.Info="info",_0x390a5e=_0x4d6bed||(_0x4d6bed={}),_0x390a5e.Auto="auto",_0x369f5f=_0x4f9d7d||(_0x4f9d7d={}),_0x369f5f.PointList="point-list",_0x369f5f.LineList="line-list",_0x369f5f.LineStrip="line-strip",_0x369f5f.TriangleList="triangle-list",_0x369f5f.TriangleStrip="triangle-strip",_0x17f290=_0x2ac57c||(_0x2ac57c={}),_0x17f290.CCW="ccw",_0x17f290.CW="cw",_0x15b35d=_0x18f243||(_0x18f243={}),_0x15b35d.None="none",_0x15b35d.Front="front",_0x15b35d.Back="back",_0x21a1ec=_0x3392bb||(_0x3392bb={}),_0x21a1ec[_0x21a1ec.Red=1]="Red",_0x21a1ec[_0x21a1ec.Green=2]="Green",_0x21a1ec[_0x21a1ec.Blue=4]="Blue",_0x21a1ec[_0x21a1ec.Alpha=8]="Alpha",_0x21a1ec[_0x21a1ec.All=15]="All",_0x2f806b=_0x4dc01d||(_0x4dc01d={}),_0x2f806b.Zero="zero",_0x2f806b.One="one",_0x2f806b.Src="src",_0x2f806b.OneMinusSrc="one-minus-src",_0x2f806b.SrcAlpha="src-alpha",_0x2f806b.OneMinusSrcAlpha="one-minus-src-alpha",_0x2f806b.Dst="dst",_0x2f806b.OneMinusDst="one-minus-dst",_0x2f806b.DstAlpha="dst-alpha",_0x2f806b.OneMinusDstAlpha="one-minus-dst-alpha",_0x2f806b.SrcAlphaSaturated="src-alpha-saturated",_0x2f806b.Constant="constant",_0x2f806b.OneMinusConstant="one-minus-constant",_0x5cec5b=_0x490002||(_0x490002={}),_0x5cec5b.Add="add",_0x5cec5b.Subtract="subtract",_0x5cec5b.ReverseSubtract="reverse-subtract",_0x5cec5b.Min="min",_0x5cec5b.Max="max",_0xa46af2=_0x120965||(_0x120965={}),_0xa46af2.Keep="keep",_0xa46af2.Zero="zero",_0xa46af2.Replace="replace",_0xa46af2.Invert="invert",_0xa46af2.IncrementClamp="increment-clamp",_0xa46af2.DecrementClamp="decrement-clamp",_0xa46af2.IncrementWrap="increment-wrap",_0xa46af2.DecrementWrap="decrement-wrap",_0x35ac26=_0x23e041||(_0x23e041={}),_0x35ac26.Uint16="uint16",_0x35ac26.Uint32="uint32",_0x33df1a=_0x1c11b4||(_0x1c11b4={}),_0x33df1a.Uint8x2="uint8x2",_0x33df1a.Uint8x4="uint8x4",_0x33df1a.Sint8x2="sint8x2",_0x33df1a.Sint8x4="sint8x4",_0x33df1a.Unorm8x2="unorm8x2",_0x33df1a.Unorm8x4="unorm8x4",_0x33df1a.Snorm8x2="snorm8x2",_0x33df1a.Snorm8x4="snorm8x4",_0x33df1a.Uint16x2="uint16x2",_0x33df1a.Uint16x4="uint16x4",_0x33df1a.Sint16x2="sint16x2",_0x33df1a.Sint16x4="sint16x4",_0x33df1a.Unorm16x2="unorm16x2",_0x33df1a.Unorm16x4="unorm16x4",_0x33df1a.Snorm16x2="snorm16x2",_0x33df1a.Snorm16x4="snorm16x4",_0x33df1a.Float16x2="float16x2",_0x33df1a.Float16x4="float16x4",_0x33df1a.Float32="float32",_0x33df1a.Float32x2="float32x2",_0x33df1a.Float32x3="float32x3",_0x33df1a.Float32x4="float32x4",_0x33df1a.Uint32="uint32",_0x33df1a.Uint32x2="uint32x2",_0x33df1a.Uint32x3="uint32x3",_0x33df1a.Uint32x4="uint32x4",_0x33df1a.Sint32="sint32",_0x33df1a.Sint32x2="sint32x2",_0x33df1a.Sint32x3="sint32x3",_0x33df1a.Sint32x4="sint32x4",_0x43d996=_0x3f00b2||(_0x3f00b2={}),_0x43d996.Vertex="vertex",_0x43d996.Instance="instance",_0x5d1abb=_0x43c474||(_0x43c474={}),_0x5d1abb.Beginning="beginning",_0x5d1abb.End="end",_0x323d93=_0x549744||(_0x549744={}),_0x323d93.Beginning="beginning",_0x323d93.End="end",_0x3c17d0=_0x52c237||(_0x52c237={}),_0x3c17d0.Load="load",_0x3c17d0.Clear="clear",_0x50802f=_0x5d6cb4||(_0x5d6cb4={}),_0x50802f.Store="store",_0x50802f.Discard="discard",_0x1756b5=_0x11c503||(_0x11c503={}),_0x1756b5.Occlusion="occlusion",_0x1756b5.Timestamp="timestamp",_0x55fb85=_0x543ca3||(_0x543ca3={}),_0x55fb85.Opaque="opaque",_0x55fb85.Premultiplied="premultiplied",_0x4f095e=_0x20079d||(_0x20079d={}),_0x4f095e.Destroyed="destroyed",_0x25ee8e=_0x3f5da4||(_0x3f5da4={}),_0x25ee8e.OutOfMemory="out-of-memory",_0x25ee8e.Validation="validation";var _0x572d87={PredefinedColorSpace:_0x3e0d86,PowerPreference:_0x48aaad,FeatureName:_0x133363,BufferUsage:_0xfcf739,MapMode:_0xa750f9,TextureDimension:_0x248a31,TextureUsage:_0x51c11d,TextureViewDimension:_0x45afcf,TextureAspect:_0x269346,TextureFormat:_0x9a49e3,AddressMode:_0x1c9ed9,FilterMode:_0x59ab0b,CompareFunction:_0x569ef2,ShaderStage:_0x418ade,BufferBindingType:_0x3ff851,SamplerBindingType:_0x12ccae,TextureSampleType:_0x4bc589,StorageTextureAccess:_0x5d188c,CompilationMessageType:_0x6aa9b0,AutoLayoutMode:_0x4d6bed,PrimitiveTopology:_0x4f9d7d,FrontFace:_0x2ac57c,CullMode:_0x18f243,ColorWriteFlags:_0x3392bb,BlendFactor:_0x4dc01d,BlendOperation:_0x490002,StencilOperation:_0x120965,IndexFormat:_0x23e041,VertexFormat:_0x1c11b4,InputStepMode:_0x3f00b2,ComputePassTimestampLocation:_0x43c474,RenderPassTimestampLocation:_0x549744,LoadOp:_0x52c237,StoreOp:_0x5d6cb4,QueryType:_0x11c503,CanvasCompositingAlphaMode:_0x543ca3,DeviceLostReason:_0x20079d,ErrorFilter:_0x3f5da4},_0x2d0ee8=(_0x528035=!0,function(e,t){var i=_0x528035?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x528035=!1,i}),_0x39bef5=_0x2d0ee8(void 0,(function(){return _0x39bef5.toString().search("(((.+)+)+)+$").toString().constructor(_0x39bef5).search("(((.+)+)+)+$")})),_0x528035;function _0x121f46(){}_0x39bef5(),_0x121f46.WithinEpsilon=function(e,t,i){return void 0===i&&(i=1401298e-51),Math.abs(e-t)<=i},_0x121f46.ToHex=function(e){var t=e.toString(16);return e<=15?("0"+t).toUpperCase():t.toUpperCase()},_0x121f46.Sign=function(e){return 0===(e=+e)||isNaN(e)?e:e>0?1:-1},_0x121f46.Clamp=function(e,t,i){return void 0===t&&(t=0),void 0===i&&(i=1),Math.min(i,Math.max(t,e))},_0x121f46.Log2=function(e){return Math.log(e)*Math.LOG2E},_0x121f46.ILog2=function(e){if(Math.log2)return Math.floor(Math.log2(e));if(e<0)return NaN;if(0===e)return-1/0;var t=0;if(e<1){for(;e<1;)t++,e*=2;t=-t}else if(e>1)for(;e>1;)t++,e=Math.floor(e/2);return t},_0x121f46.Repeat=function(e,t){return e-Math.floor(e/t)*t},_0x121f46.Normalize=function(e,t,i){return(e-t)/(i-t)},_0x121f46.Denormalize=function(e,t,i){return e*(i-t)+t},_0x121f46.DeltaAngle=function(e,t){var i=_0x121f46.Repeat(t-e,360);return i>180&&(i-=360),i},_0x121f46.PingPong=function(e,t){var i=_0x121f46.Repeat(e,2*t);return t-Math.abs(i-t)},_0x121f46.SmoothStep=function(e,t,i){var n=_0x121f46.Clamp(i);return t*(n=-2*n*n*n+3*n*n)+e*(1-n)},_0x121f46.MoveTowards=function(e,t,i){return Math.abs(t-e)<=i?t:e+_0x121f46.Sign(t-e)*i},_0x121f46.MoveTowardsAngle=function(e,t,i){var n=_0x121f46.DeltaAngle(e,t),r=0;return-i<n&&n<i?r=t:(t=e+n,r=_0x121f46.MoveTowards(e,t,i)),r},_0x121f46.Lerp=function(e,t,i){return e+(t-e)*i},_0x121f46.LerpAngle=function(e,t,i){var n=_0x121f46.Repeat(t-e,360);return n>180&&(n-=360),e+n*_0x121f46.Clamp(i)},_0x121f46.InverseLerp=function(e,t,i){return e!=t?_0x121f46.Clamp((i-e)/(t-e)):0},_0x121f46.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o;return e*(2*a-3*o+1)+i*(-2*a+3*o)+t*(a-2*o+r)+n*(a-o)},_0x121f46.Hermite1stDerivative=function(e,t,i,n,r){var o=r*r;return 6*(o-r)*e+(3*o-4*r+1)*t+6*(-o+r)*i+(3*o-2*r)*n},_0x121f46.RandomRange=function(e,t){return e===t?e:Math.random()*(t-e)+e},_0x121f46.RangeToPercent=function(e,t,i){return(e-t)/(i-t)},_0x121f46.PercentToRange=function(e,t,i){return(i-t)*e+t},_0x121f46.NormalizeRadians=function(e){return e-=_0x121f46.TwoPi*Math.floor((e+Math.PI)/_0x121f46.TwoPi)},_0x121f46.HCF=function(e,t){var i=e%t;return 0===i?t:_0x121f46.HCF(t,i)},_0x121f46.TwoPi=2*Math.PI;var _0x2437bf=(_0x19e662=!0,function(e,t){var i=_0x19e662?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19e662=!1,i}),_0x5d9327=_0x2437bf(void 0,(function(){return _0x5d9327.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d9327).search("(((.+)+)+)+$")})),_0x19e662;function _0x1635a9(e){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=_0x1635a9._Counter++;return this._buffer=e,this}_0x5d9327(),Object.defineProperty(_0x1635a9.prototype,"underlyingResource",{get:function(){return this._buffer},enumerable:!1,configurable:!0}),_0x1635a9._Counter=0;var _0x4e84c2=(_0x4fc32f=!0,function(e,t){var i=_0x4fc32f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fc32f=!1,i}),_0x5733b8=_0x4e84c2(void 0,(function(){return _0x5733b8.toString().search("(((.+)+)+)+$").toString().constructor(_0x5733b8).search("(((.+)+)+)+$")})),_0x4fc32f;function RandomGUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}_0x5733b8();var _0x1e96f7=(_0x25c2de=!0,function(e,t){var i=_0x25c2de?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x25c2de=!1,i}),_0x3459c2=_0x1e96f7(void 0,(function(){return _0x3459c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x3459c2).search("(((.+)+)+)+$")})),_0x25c2de;function _0x4741cb(e){var t=_0x5cc035.call(this,null)||this;return t.metadata=null,t.reservedDataStore=null,t._hasAlpha=!1,t._getAlphaFromRGB=!1,t.level=1,t._coordinatesIndex=0,t._coordinatesMode=_0x354cf8.TEXTURE_EXPLICIT_MODE,t.wrapR=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE,t.anisotropicFilteringLevel=_0x4741cb.DEFAULT_ANISOTROPIC_FILTERING_LEVEL,t._isCube=!1,t._gammaSpace=!0,t.invertZ=!1,t.lodLevelInAlpha=!1,t.isRenderTarget=!1,t._prefiltered=!1,t._forceSerialize=!1,t.animations=new Array,t.onDisposeObservable=new Observable,t._onDisposeObserver=null,t._scene=null,t._uid=null,t._parentContainer=null,t._loadingError=!1,e?_0x4741cb._IsScene(e)?t._scene=e:t._engine=e:t._scene=EngineStore.LastCreatedScene,t._scene&&(t.uniqueId=t._scene.getUniqueId(),t._scene.addTexture(t),t._engine=t._scene.getEngine()),t._uid=null,t}_0x3459c2(),_0x5cc035&&(_0x4741cb.__proto__=_0x5cc035),_0x4741cb.prototype=Object.create(_0x5cc035&&_0x5cc035.prototype),_0x4741cb.prototype.constructor=_0x5cc035,Object.defineProperty(_0x4741cb.prototype,"hasAlpha",{get:function(){return this._hasAlpha},set:function(e){var t=this;this._hasAlpha!==e&&(this._hasAlpha=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"getAlphaFromRGB",{get:function(){return this._getAlphaFromRGB},set:function(e){var t=this;this._getAlphaFromRGB!==e&&(this._getAlphaFromRGB=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"coordinatesIndex",{get:function(){return this._coordinatesIndex},set:function(e){var t=this;this._coordinatesIndex!==e&&(this._coordinatesIndex=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"coordinatesMode",{get:function(){return this._coordinatesMode},set:function(e){var t=this;this._coordinatesMode!==e&&(this._coordinatesMode=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"wrapU",{get:function(){return this._wrapU},set:function(e){this._wrapU=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"wrapV",{get:function(){return this._wrapV},set:function(e){this._wrapV=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"isCube",{get:function(){return this._texture?this._texture.isCube:this._isCube},set:function(e){this._texture?this._texture.isCube=e:this._isCube=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"is3D",{get:function(){return!!this._texture&&this._texture.is3D},set:function(e){this._texture&&(this._texture.is3D=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"is2DArray",{get:function(){return!!this._texture&&this._texture.is2DArray},set:function(e){this._texture&&(this._texture.is2DArray=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"gammaSpace",{get:function(){return this._texture?(null===this._texture._gammaSpace&&(this._texture._gammaSpace=this._gammaSpace),this._texture._gammaSpace&&!this._texture._useSRGBBuffer):this._gammaSpace},set:function(e){if(this._texture){if(this._texture._gammaSpace===e)return;this._texture._gammaSpace=e}else{if(this._gammaSpace===e)return;this._gammaSpace=e}this._markAllSubMeshesAsTexturesDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"isRGBD",{get:function(){return null!=this._texture&&this._texture._isRGBD},set:function(e){this._texture&&(this._texture._isRGBD=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"noMipmap",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"lodGenerationOffset",{get:function(){return this._texture?this._texture._lodGenerationOffset:0},set:function(e){this._texture&&(this._texture._lodGenerationOffset=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"lodGenerationScale",{get:function(){return this._texture?this._texture._lodGenerationScale:0},set:function(e){this._texture&&(this._texture._lodGenerationScale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"linearSpecularLOD",{get:function(){return!!this._texture&&this._texture._linearSpecularLOD},set:function(e){this._texture&&(this._texture._linearSpecularLOD=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"irradianceTexture",{get:function(){return this._texture?this._texture._irradianceTexture:null},set:function(e){this._texture&&(this._texture._irradianceTexture=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"uid",{get:function(){return!this._uid&&(this._uid=RandomGUID()),this._uid},enumerable:!1,configurable:!0}),_0x4741cb.prototype.toString=function(){return this.name},_0x4741cb.prototype.getClassName=function(){return"BaseTexture"},Object.defineProperty(_0x4741cb.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"isBlocking",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"loadingError",{get:function(){return this._loadingError},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"errorObject",{get:function(){return this._errorObject},enumerable:!1,configurable:!0}),_0x4741cb.prototype.getScene=function(){return this._scene},_0x4741cb.prototype._getEngine=function(){return this._engine},_0x4741cb.prototype.checkTransformsAreIdentical=function(e){return null!==e},_0x4741cb.prototype.getTextureMatrix=function(){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityReadOnly},_0x4741cb.prototype.getReflectionTextureMatrix=function(){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityReadOnly},_0x4741cb.prototype.isReadyOrNotBlocking=function(){return!this.isBlocking||this.isReady()||this.loadingError},_0x4741cb.prototype.scale=function(e){},Object.defineProperty(_0x4741cb.prototype,"canRescale",{get:function(){return!1},enumerable:!1,configurable:!0}),_0x4741cb.prototype._getFromCache=function(e,t,i,n,r){var o=this._getEngine();if(!o)return null;for(var a=o._getUseSRGBBuffer(!!r,t),s=o.getLoadedTexturesCache(),l=0;l<s.length;l++){var u=s[l];if((void 0===r||a===u._useSRGBBuffer)&&!(void 0!==n&&n!==u.invertY||u.url!==e||u.generateMipMaps!==!t||i&&i!==u.samplingMode))return u.incrementReferences(),u}return null},_0x4741cb.prototype._rebuild=function(){},_0x4741cb.prototype.clone=function(){return null},Object.defineProperty(_0x4741cb.prototype,"textureType",{get:function(){return this._texture&&void 0!==this._texture.type?this._texture.type:_0x354cf8.TEXTURETYPE_UNSIGNED_INT},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"textureFormat",{get:function(){return this._texture&&void 0!==this._texture.format?this._texture.format:_0x354cf8.TEXTUREFORMAT_RGBA},enumerable:!1,configurable:!0}),_0x4741cb.prototype._markAllSubMeshesAsTexturesDirty=function(){var e=this.getScene();e&&e.markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag)},_0x4741cb.prototype.readPixels=function(e,t,i,n,r,o,a,s,l){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=null),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=0),void 0===a&&(a=0),void 0===s&&(s=Number.MAX_VALUE),void 0===l&&(l=Number.MAX_VALUE),!this._texture)return null;var u=this._getEngine();if(!u)return null;var c=this.getSize(),h=c.width,d=c.height;0!==t&&(h/=Math.pow(2,t),d/=Math.pow(2,t),h=Math.round(h),d=Math.round(d)),s=Math.min(h,s),l=Math.min(d,l);try{return this._texture.isCube?u._readTexturePixels(this._texture,s,l,e,t,i,n,r,o,a):u._readTexturePixels(this._texture,s,l,-1,t,i,n,r,o,a)}catch(e){return null}},_0x4741cb.prototype._readPixelsSync=function(e,t,i,n,r){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=null),void 0===n&&(n=!0),void 0===r&&(r=!1),!this._texture)return null;var o=this.getSize(),a=o.width,s=o.height,l=this._getEngine();if(!l)return null;0!=t&&(a/=Math.pow(2,t),s/=Math.pow(2,t),a=Math.round(a),s=Math.round(s));try{return this._texture.isCube?l._readTexturePixelsSync(this._texture,a,s,e,t,i,n,r):l._readTexturePixelsSync(this._texture,a,s,-1,t,i,n,r)}catch(e){return null}},Object.defineProperty(_0x4741cb.prototype,"_lodTextureHigh",{get:function(){return this._texture?this._texture._lodTextureHigh:null},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"_lodTextureMid",{get:function(){return this._texture?this._texture._lodTextureMid:null},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4741cb.prototype,"_lodTextureLow",{get:function(){return this._texture?this._texture._lodTextureLow:null},enumerable:!1,configurable:!0}),_0x4741cb.prototype.dispose=function(){if(this._scene){this._scene.stopAnimation&&this._scene.stopAnimation(this),this._scene._removePendingData(this);var e=this._scene.textures.indexOf(this);if(e>=0&&this._scene.textures.splice(e,1),this._scene.onTextureRemovedObservable.notifyObservers(this),this._scene=null,this._parentContainer){var t=this._parentContainer.textures.indexOf(this);t>-1&&this._parentContainer.textures.splice(t,1),this._parentContainer=null}}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.metadata=null,_super.prototype.dispose.call(this)},_0x4741cb.prototype.serialize=function(){if(!this.name)return null;var e=_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Serialize(this);return _Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.AppendSerializedAnimations(this,e),e},_0x4741cb.WhenAllReady=function(e,t){var i=e.length;if(0!==i)for(var n=0;n<e.length;n++){var r=e[n];if(r.isReady())0==--i&&t();else{var o=r.onLoadObservable;o?o.addOnce((function(){0==--i&&t()})):0==--i&&t()}}else t()},_0x4741cb._IsScene=function(e){return"Scene"===e.getClassName()},_0x4741cb.DEFAULT_ANISOTROPIC_FILTERING_LEVEL=4;var _0x36dd60=(_0x17b228=!0,function(e,t){var i=_0x17b228?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17b228=!1,i}),_0x1887f5=_0x36dd60(void 0,(function(){return _0x1887f5.toString().search("(((.+)+)+)+$").toString().constructor(_0x1887f5).search("(((.+)+)+)+$")})),_0x17b228;function _0x54f9c4(e,t,i,n,r,o,a,s,l,u,c,h,d,f){void 0===r&&(r=_0x54f9c4.TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=!1);var p,_,m,g,x,v,y,$,b,T=this;(T=_0x4741cb.call(this,t)||this).url=null,T.uOffset=0,T.vOffset=0,T.uScale=1,T.vScale=1,T.uAng=0,T.vAng=0,T.wAng=0,T.uRotationCenter=.5,T.vRotationCenter=.5,T.wRotationCenter=.5,T.homogeneousRotationInUVTransform=!1,T.inspectableCustomProperties=null,T._noMipmap=!1,T._invertY=!1,T._rowGenerationMatrix=null,T._cachedTextureMatrix=null,T._projectionModeMatrix=null,T._t0=null,T._t1=null,T._t2=null,T._cachedUOffset=-1,T._cachedVOffset=-1,T._cachedUScale=0,T._cachedVScale=0,T._cachedUAng=-1,T._cachedVAng=-1,T._cachedWAng=-1,T._cachedProjectionMatrixId=-1,T._cachedURotationCenter=-1,T._cachedVRotationCenter=-1,T._cachedWRotationCenter=-1,T._cachedHomogeneousRotationInUVTransform=!1,T._cachedCoordinatesMode=-1,T._buffer=null,T._deleteBuffer=!1,T._format=null,T._delayedOnLoad=null,T._delayedOnError=null,T.onLoadObservable=new Observable,T._isBlocking=!0,T.name=e||"",T.url=e;var C,S=!1,w=null;"object"==typeof i&&null!==i?(C=null!==(p=i.noMipmap)&&void 0!==p&&p,n=null!==(_=i.invertY)&&void 0!==_&&_,r=null!==(m=i.samplingMode)&&void 0!==m?m:_0x54f9c4.TRILINEAR_SAMPLINGMODE,o=null!==(g=i.onLoad)&&void 0!==g?g:null,a=null!==(x=i.onError)&&void 0!==x?x:null,s=null!==(v=i.buffer)&&void 0!==v?v:null,l=null!==(y=i.deleteBuffer)&&void 0!==y&&y,u=i.format,c=i.mimeType,h=i.loaderOptions,d=i.creationFlags,S=null!==($=i.useSRGBBuffer)&&void 0!==$&&$,w=null!==(b=i.internalTexture)&&void 0!==b?b:null):C=!!i,T._noMipmap=C,T._invertY=void 0!==n&&n,T._initialSamplingMode=r,T._buffer=s,T._deleteBuffer=l,T._mimeType=c,T._loaderOptions=h,T._creationFlags=d,T._useSRGBBuffer=S,T._forcedExtension=f,u&&(T._format=u);var E=T.getScene(),P=T._getEngine();if(!P)return T;P.onBeforeTextureInitObservable.notifyObservers(T);var A=function(){T._texture&&(T._texture._invertVScale&&(T.vScale*=-1,T.vOffset+=1),null!==T._texture._cachedWrapU&&(T.wrapU=T._texture._cachedWrapU,T._texture._cachedWrapU=null),null!==T._texture._cachedWrapV&&(T.wrapV=T._texture._cachedWrapV,T._texture._cachedWrapV=null),null!==T._texture._cachedWrapR&&(T.wrapR=T._texture._cachedWrapR,T._texture._cachedWrapR=null)),T.onLoadObservable.hasObservers()&&T.onLoadObservable.notifyObservers(T),o&&o(),!T.isBlocking&&E&&E.resetCachedMaterial()},L=function(e,t){T._loadingError=!0,T._errorObject={message:e,exception:t},a&&a(e,t),_0x54f9c4.OnTextureLoadErrorObservable.notifyObservers(T)};if(!T.url)return T._delayedOnLoad=A,T._delayedOnError=L,T;if(T._texture=null!=w?w:T._getFromCache(T.url,C,r,T._invertY,S),T._texture)if(T._texture.isReady)_Misc_timingTools__WEBPACK_IMPORTED_MODULE_8__.TimingTools.SetImmediate((function(){return A()}));else{var M=T._texture.onLoadedObservable.add(A);T._texture.onErrorObservable.add((function(e){var t;L(e.message,e.exception),null===(t=T._texture)||void 0===t||t.onLoadedObservable.remove(M)}))}else if(E&&E.useDelayedTextureLoading)T.delayLoadState=_0x354cf8.DELAYLOADSTATE_NOTLOADED,T._delayedOnLoad=A,T._delayedOnError=L;else{try{T._texture=P.createTexture(T.url,C,T._invertY,E,r,A,L,T._buffer,void 0,T._format,T._forcedExtension,c,h,d,S)}catch(e){throw L("error loading",e),e}l&&(T._buffer=null)}return T}_0x1887f5(),_0x4741cb&&(_0x54f9c4.__proto__=_0x4741cb),_0x54f9c4.prototype=Object.create(_0x4741cb&&_0x4741cb.prototype),_0x54f9c4.prototype.constructor=_0x4741cb,Object.defineProperty(_0x54f9c4.prototype,"noMipmap",{get:function(){return this._noMipmap},enumerable:!1,configurable:!0}),Object.defineProperty(_0x54f9c4.prototype,"mimeType",{get:function(){return this._mimeType},enumerable:!1,configurable:!0}),Object.defineProperty(_0x54f9c4.prototype,"isBlocking",{get:function(){return this._isBlocking},set:function(e){this._isBlocking=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x54f9c4.prototype,"invertY",{get:function(){return this._invertY},enumerable:!1,configurable:!0}),_0x54f9c4.prototype.updateURL=function(e,t,i,n){void 0===t&&(t=null),this.url&&(this.releaseInternalTexture(),this.getScene().markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag)),(!this.name||this.name.startsWith("data:"))&&(this.name=e),this.url=e,this._buffer=t,this._forcedExtension=n,this.delayLoadState=_0x354cf8.DELAYLOADSTATE_NOTLOADED,i&&(this._delayedOnLoad=i),this.delayLoad()},_0x54f9c4.prototype.delayLoad=function(){if(this.delayLoadState===_0x354cf8.DELAYLOADSTATE_NOTLOADED){var e=this.getScene();e&&(this.delayLoadState=_0x354cf8.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap,this.samplingMode,this._invertY,this._useSRGBBuffer),this._texture?this._delayedOnLoad&&(this._texture.isReady?_Misc_timingTools__WEBPACK_IMPORTED_MODULE_8__.TimingTools.SetImmediate(this._delayedOnLoad):this._texture.onLoadedObservable.add(this._delayedOnLoad)):(this._texture=e.getEngine().createTexture(this.url,this._noMipmap,this._invertY,e,this.samplingMode,this._delayedOnLoad,this._delayedOnError,this._buffer,null,this._format,this._forcedExtension,this._mimeType,this._loaderOptions,this._creationFlags,this._useSRGBBuffer),this._deleteBuffer&&(this._buffer=null)),this._delayedOnLoad=null,this._delayedOnError=null)}},_0x54f9c4.prototype._prepareRowForTextureGeneration=function(e,t,i,n){e*=this._cachedUScale,t*=this._cachedVScale,e-=this.uRotationCenter*this._cachedUScale,t-=this.vRotationCenter*this._cachedVScale,i-=this.wRotationCenter,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.TransformCoordinatesFromFloatsToRef(e,t,i,this._rowGenerationMatrix,n),n.x+=this.uRotationCenter*this._cachedUScale+this._cachedUOffset,n.y+=this.vRotationCenter*this._cachedVScale+this._cachedVOffset,n.z+=this.wRotationCenter},_0x54f9c4.prototype.checkTransformsAreIdentical=function(e){return null!==e&&this.uOffset===e.uOffset&&this.vOffset===e.vOffset&&this.uScale===e.uScale&&this.vScale===e.vScale&&this.uAng===e.uAng&&this.vAng===e.vAng&&this.wAng===e.wAng},_0x54f9c4.prototype.getTextureMatrix=function(e){var t=this;if(void 0===e&&(e=1),this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale*e===this._cachedUScale&&this.vScale===this._cachedVScale&&this.uAng===this._cachedUAng&&this.vAng===this._cachedVAng&&this.wAng===this._cachedWAng&&this.uRotationCenter===this._cachedURotationCenter&&this.vRotationCenter===this._cachedVRotationCenter&&this.wRotationCenter===this._cachedWRotationCenter&&this.homogeneousRotationInUVTransform===this._cachedHomogeneousRotationInUVTransform)return this._cachedTextureMatrix;this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale*e,this._cachedVScale=this.vScale,this._cachedUAng=this.uAng,this._cachedVAng=this.vAng,this._cachedWAng=this.wAng,this._cachedURotationCenter=this.uRotationCenter,this._cachedVRotationCenter=this.vRotationCenter,this._cachedWRotationCenter=this.wRotationCenter,this._cachedHomogeneousRotationInUVTransform=this.homogeneousRotationInUVTransform,(!this._cachedTextureMatrix||!this._rowGenerationMatrix)&&(this._cachedTextureMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Zero(),this._rowGenerationMatrix=new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix,this._t0=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero(),this._t1=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero(),this._t2=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero()),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.RotationYawPitchRollToRef(this.vAng,this.uAng,this.wAng,this._rowGenerationMatrix),this.homogeneousRotationInUVTransform?(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.TranslationToRef(-this._cachedURotationCenter,-this._cachedVRotationCenter,-this._cachedWRotationCenter,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[0]),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.TranslationToRef(this._cachedURotationCenter,this._cachedVRotationCenter,this._cachedWRotationCenter,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[1]),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.ScalingToRef(this._cachedUScale,this._cachedVScale,0,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[2]),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.TranslationToRef(this._cachedUOffset,this._cachedVOffset,0,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[3]),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[0].multiplyToRef(this._rowGenerationMatrix,this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[1],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[2],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[3],this._cachedTextureMatrix),this._cachedTextureMatrix.setRowFromFloats(2,this._cachedTextureMatrix.m[12],this._cachedTextureMatrix.m[13],this._cachedTextureMatrix.m[14],1)):(this._prepareRowForTextureGeneration(0,0,0,this._t0),this._prepareRowForTextureGeneration(1,0,0,this._t1),this._prepareRowForTextureGeneration(0,1,0,this._t2),this._t1.subtractInPlace(this._t0),this._t2.subtractInPlace(this._t0),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.FromValuesToRef(this._t1.x,this._t1.y,this._t1.z,0,this._t2.x,this._t2.y,this._t2.z,0,this._t0.x,this._t0.y,this._t0.z,0,0,0,0,1,this._cachedTextureMatrix));var i=this.getScene();return i?(i.markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})),this._cachedTextureMatrix):this._cachedTextureMatrix},_0x54f9c4.prototype.getReflectionTextureMatrix=function(){var e=this,t=this.getScene();if(!t)return this._cachedTextureMatrix;if(this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale===this._cachedUScale&&this.vScale===this._cachedVScale&&this.coordinatesMode===this._cachedCoordinatesMode){if(this.coordinatesMode!==_0x54f9c4.PROJECTION_MODE)return this._cachedTextureMatrix;if(this._cachedProjectionMatrixId===t.getProjectionMatrix().updateFlag)return this._cachedTextureMatrix}!this._cachedTextureMatrix&&(this._cachedTextureMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Zero()),!this._projectionModeMatrix&&(this._projectionModeMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Zero());var i=this._cachedCoordinatesMode!==this.coordinatesMode;switch(this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale,this._cachedVScale=this.vScale,this._cachedCoordinatesMode=this.coordinatesMode,this.coordinatesMode){case _0x54f9c4.PLANAR_MODE:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityToRef(this._cachedTextureMatrix),this._cachedTextureMatrix[0]=this.uScale,this._cachedTextureMatrix[5]=this.vScale,this._cachedTextureMatrix[12]=this.uOffset,this._cachedTextureMatrix[13]=this.vOffset;break;case _0x54f9c4.PROJECTION_MODE:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.FromValuesToRef(.5,0,0,0,0,-.5,0,0,0,0,0,0,.5,.5,1,1,this._projectionModeMatrix);var n=t.getProjectionMatrix();this._cachedProjectionMatrixId=n.updateFlag,n.multiplyToRef(this._projectionModeMatrix,this._cachedTextureMatrix);break;default:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityToRef(this._cachedTextureMatrix)}return i&&t.markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag,(function(t){return-1!==t.getActiveTextures().indexOf(e)})),this._cachedTextureMatrix},_0x54f9c4.prototype.clone=function(){var e=this,t={noMipmap:this._noMipmap,invertY:this._invertY,samplingMode:this.samplingMode,onLoad:void 0,onError:void 0,buffer:this._texture?this._texture._buffer:void 0,deleteBuffer:this._deleteBuffer,format:this.textureFormat,mimeType:this.mimeType,loaderOptions:this._loaderOptions,creationFlags:this._creationFlags,useSRGBBuffer:this._useSRGBBuffer};return _Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Clone((function(){return new _0x54f9c4(e._texture?e._texture.url:null,e.getScene(),t)}),this)},_0x54f9c4.prototype.serialize=function(){var e=this.name;!_0x54f9c4.SerializeBuffers&&this.name.startsWith("data:")&&(this.name=""),this.name.startsWith("data:")&&this.url===this.name&&(this.url="");var t=_super.prototype.serialize.call(this);return t?((_0x54f9c4.SerializeBuffers||_0x54f9c4.ForceSerializeBuffers)&&("string"==typeof this._buffer&&"data:"===this._buffer.substr(0,5)?(t.base64String=this._buffer,t.name=t.name.replace("data:","")):this.url&&this.url.startsWith("data:")&&this._buffer instanceof Uint8Array?t.base64String="data:image/png;base64,"+(0,_Misc_stringTools__WEBPACK_IMPORTED_MODULE_11__.EncodeArrayBufferToBase64)(this._buffer):(_0x54f9c4.ForceSerializeBuffers||this.url&&this.url.startsWith("blob:")||this._forceSerialize)&&(t.base64String=!this._engine||this._engine._features.supportSyncTextureRead?(0,_Misc_copyTools__WEBPACK_IMPORTED_MODULE_12__.GenerateBase64StringFromTexture)(this):(0,_Misc_copyTools__WEBPACK_IMPORTED_MODULE_12__.GenerateBase64StringFromTextureAsync)(this))),t.invertY=this._invertY,t.samplingMode=this.samplingMode,t._creationFlags=this._creationFlags,t._useSRGBBuffer=this._useSRGBBuffer,this.name=e,t):null},_0x54f9c4.prototype.getClassName=function(){return"Texture"},_0x54f9c4.prototype.dispose=function(){_super.prototype.dispose.call(this),this.onLoadObservable.clear(),this._delayedOnLoad=null,this._delayedOnError=null},_0x54f9c4.Parse=function(e,t,i){if(e.customType){var n=_Misc_instantiationTools__WEBPACK_IMPORTED_MODULE_9__.InstantiationTools.Instantiate(e.customType).Parse(e,t,i);return e.samplingMode&&n.updateSamplingMode&&n._samplingMode&&n._samplingMode!==e.samplingMode&&n.updateSamplingMode(e.samplingMode),n}if(e.isCube&&!e.isRenderTarget)return _0x54f9c4._CubeTextureParser(e,t,i);if(!e.name&&!e.isRenderTarget)return null;var r=function(){if(o&&o._texture&&(o._texture._cachedWrapU=null,o._texture._cachedWrapV=null,o._texture._cachedWrapR=null),e.samplingMode){var t=e.samplingMode;o&&o.samplingMode!==t&&o.updateSamplingMode(t)}if(o&&e.animations)for(var i=0;i<e.animations.length;i++){var n=e.animations[i],r=(0,_Misc_typeStore__WEBPACK_IMPORTED_MODULE_6__.GetClass)("BABYLON.Animation");r&&o.animations.push(r.Parse(n))}},o=_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Parse((function(){var n,o,a,s,l=!0;if(e.noMipmap&&(l=!1),e.mirrorPlane){var u=_0x54f9c4._CreateMirror(e.name,e.renderTargetSize,t,l);return u._waitingRenderList=e.renderList,u.mirrorPlane=_Maths_math_plane__WEBPACK_IMPORTED_MODULE_10__.Plane.FromArray(e.mirrorPlane),r(),u}if(e.isRenderTarget){var c=null;if(e.isCube){if(t.reflectionProbes)for(var h=0;h<t.reflectionProbes.length;h++){var d=t.reflectionProbes[h];if(d.name===e.name)return d.cubeTexture}}else(c=_0x54f9c4._CreateRenderTargetTexture(e.name,e.renderTargetSize,t,l,null!==(n=e._creationFlags)&&void 0!==n?n:0))._waitingRenderList=e.renderList;return r(),c}if(e.base64String)s=_0x54f9c4.CreateFromBase64String(e.base64String,e.name,t,!l,e.invertY,e.samplingMode,r,null!==(o=e._creationFlags)&&void 0!==o?o:0,null!==(a=e._useSRGBBuffer)&&void 0!==a&&a);else{var f=void 0;f=e.name&&e.name.indexOf("://")>0?e.name:i+e.name,e.url&&(e.url.startsWith("data:")||_0x54f9c4.UseSerializedUrlIfAny)&&(f=e.url),s=new _0x54f9c4(f,t,!l,e.invertY,e.samplingMode,r)}return s}),e,t);return o},_0x54f9c4.CreateFromBase64String=function(e,t,i,n,r,o,a,s,l,u){return void 0===o&&(o=_0x54f9c4.TRILINEAR_SAMPLINGMODE),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=_0x354cf8.TEXTUREFORMAT_RGBA),new _0x54f9c4("data:"+t,i,n,r,o,a,s,e,!1,l,void 0,void 0,u)},_0x54f9c4.LoadFromDataString=function(e,t,i,n,r,o,a,s,l,u,c){return void 0===n&&(n=!1),void 0===o&&(o=!0),void 0===a&&(a=_0x54f9c4.TRILINEAR_SAMPLINGMODE),void 0===s&&(s=null),void 0===l&&(l=null),void 0===u&&(u=_0x354cf8.TEXTUREFORMAT_RGBA),"data:"!==e.substr(0,5)&&(e="data:"+e),new _0x54f9c4(e,i,r,o,a,s,l,t,n,u,void 0,void 0,c)},_0x54f9c4.SerializeBuffers=!0,_0x54f9c4.ForceSerializeBuffers=!1,_0x54f9c4.OnTextureLoadErrorObservable=new Observable,_0x54f9c4._CubeTextureParser=function(e,t,i){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_7__._WarnImport)("CubeTexture")},_0x54f9c4._CreateMirror=function(e,t,i,n){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_7__._WarnImport)("MirrorTexture")},_0x54f9c4._CreateRenderTargetTexture=function(e,t,i,n,r){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_7__._WarnImport)("RenderTargetTexture")},_0x54f9c4.NEAREST_SAMPLINGMODE=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,_0x54f9c4.NEAREST_NEAREST_MIPLINEAR=_0x354cf8.TEXTURE_NEAREST_NEAREST_MIPLINEAR,_0x54f9c4.BILINEAR_SAMPLINGMODE=_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE,_0x54f9c4.LINEAR_LINEAR_MIPNEAREST=_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST,_0x54f9c4.TRILINEAR_SAMPLINGMODE=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE,_0x54f9c4.LINEAR_LINEAR_MIPLINEAR=_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR,_0x54f9c4.NEAREST_NEAREST_MIPNEAREST=_0x354cf8.TEXTURE_NEAREST_NEAREST_MIPNEAREST,_0x54f9c4.NEAREST_LINEAR_MIPNEAREST=_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPNEAREST,_0x54f9c4.NEAREST_LINEAR_MIPLINEAR=_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPLINEAR,_0x54f9c4.NEAREST_LINEAR=_0x354cf8.TEXTURE_NEAREST_LINEAR,_0x54f9c4.NEAREST_NEAREST=_0x354cf8.TEXTURE_NEAREST_NEAREST,_0x54f9c4.LINEAR_NEAREST_MIPNEAREST=_0x354cf8.TEXTURE_LINEAR_NEAREST_MIPNEAREST,_0x54f9c4.LINEAR_NEAREST_MIPLINEAR=_0x354cf8.TEXTURE_LINEAR_NEAREST_MIPLINEAR,_0x54f9c4.LINEAR_LINEAR=_0x354cf8.TEXTURE_LINEAR_LINEAR,_0x54f9c4.LINEAR_NEAREST=_0x354cf8.TEXTURE_LINEAR_NEAREST,_0x54f9c4.EXPLICIT_MODE=_0x354cf8.TEXTURE_EXPLICIT_MODE,_0x54f9c4.SPHERICAL_MODE=_0x354cf8.TEXTURE_SPHERICAL_MODE,_0x54f9c4.PLANAR_MODE=_0x354cf8.TEXTURE_PLANAR_MODE,_0x54f9c4.CUBIC_MODE=_0x354cf8.TEXTURE_CUBIC_MODE,_0x54f9c4.PROJECTION_MODE=_0x354cf8.TEXTURE_PROJECTION_MODE,_0x54f9c4.SKYBOX_MODE=_0x354cf8.TEXTURE_SKYBOX_MODE,_0x54f9c4.INVCUBIC_MODE=_0x354cf8.TEXTURE_INVCUBIC_MODE,_0x54f9c4.EQUIRECTANGULAR_MODE=_0x354cf8.TEXTURE_EQUIRECTANGULAR_MODE,_0x54f9c4.FIXED_EQUIRECTANGULAR_MODE=_0x354cf8.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,_0x54f9c4.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=_0x354cf8.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,_0x54f9c4.CLAMP_ADDRESSMODE=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,_0x54f9c4.WRAP_ADDRESSMODE=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE,_0x54f9c4.MIRROR_ADDRESSMODE=_0x354cf8.TEXTURE_MIRROR_ADDRESSMODE;var _0xbcee0d=(_0x33507a=!0,function(e,t){var i=_0x33507a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33507a=!1,i}),_0xab7ab4=_0xbcee0d(void 0,(function(){return _0xab7ab4.toString().search("(((.+)+)+)+$").toString().constructor(_0xab7ab4).search("(((.+)+)+)+$")})),_0x33507a;function _0x56a0bf(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){void 0===r&&(r=!0),void 0===o&&(o=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),void 0===s&&(s=_0x54f9c4.TRILINEAR_SAMPLINGMODE),void 0===l&&(l=!0),void 0===u&&(u=!1),void 0===c&&(c=!1),void 0===h&&(h=_0x354cf8.TEXTUREFORMAT_RGBA),void 0===d&&(d=!1),void 0===_&&(_=!1),void 0===m&&(m=!1);var g,x=this;if((x=_0x54f9c4.call(this,null,i,!n,void 0,s,void 0,void 0,void 0,void 0,h)||this).renderParticles=!0,x.renderSprites=!1,x.ignoreCameraViewport=!1,x.onBeforeBindObservable=new Observable,x.onAfterUnbindObservable=new Observable,x.onBeforeRenderObservable=new Observable,x.onAfterRenderObservable=new Observable,x.onClearObservable=new Observable,x.onResizeObservable=new Observable,x._cleared=!1,x.skipInitialClear=!1,x._currentRefreshId=-1,x._refreshRate=1,x._samples=1,x._canRescale=!0,x._renderTarget=null,x.boundingBoxPosition=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero(),!(i=x.getScene()))return x;var v=x.getScene().getEngine();return x._coordinatesMode=_0x54f9c4.PROJECTION_MODE,x.renderList=new Array,x.name=e,x.isRenderTarget=!0,x._initialSizeParameter=t,x._renderPassIds=[],x._isCubeData=a,x._processSizeParameter(t),x.renderPassId=x._renderPassIds[0],x._resizeObserver=v.onResizeObservable.add((function(){})),x._generateMipMaps=!!n,x._doNotChangeAspectRatio=r,x._renderingManager=new _Rendering_renderingManager__WEBPACK_IMPORTED_MODULE_6__.RenderingManager(i),x._renderingManager._useSceneAutoClearSetup=!0,c||(x._renderTargetOptions={generateMipMaps:n,type:o,format:null!==(g=x._format)&&void 0!==g?g:void 0,samplingMode:x.samplingMode,generateDepthBuffer:l,generateStencilBuffer:u,samples:f,creationFlags:p,noColorTarget:_,useSRGBBuffer:m},x.samplingMode===_0x54f9c4.NEAREST_SAMPLINGMODE&&(x.wrapU=_0x54f9c4.CLAMP_ADDRESSMODE,x.wrapV=_0x54f9c4.CLAMP_ADDRESSMODE),!d&&(a?(x._renderTarget=i.getEngine().createRenderTargetCubeTexture(x.getRenderSize(),x._renderTargetOptions),x.coordinatesMode=_0x54f9c4.INVCUBIC_MODE,x._textureMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Identity()):x._renderTarget=i.getEngine().createRenderTargetTexture(x._size,x._renderTargetOptions),x._texture=x._renderTarget.texture,void 0!==f&&(x.samples=f))),x}_0xab7ab4(),_0x54f9c4&&(_0x56a0bf.__proto__=_0x54f9c4),_0x56a0bf.prototype=Object.create(_0x54f9c4&&_0x54f9c4.prototype),_0x56a0bf.prototype.constructor=_0x54f9c4,Object.defineProperty(_0x56a0bf.prototype,"renderList",{get:function(){return this._renderList},set:function(e){this._renderList=e,this._renderList&&this._hookArray(this._renderList)},enumerable:!1,configurable:!0}),_0x56a0bf.prototype._hookArray=function(e){var t=this,i=e.push;e.push=function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=0===e.length,s=i.apply(e,r);return a&&(null===(n=t.getScene())||void 0===n||n.meshes.forEach((function(e){e._markSubMeshesAsLightDirty()}))),s};var n=e.splice;e.splice=function(i,r){var o,a=n.apply(e,[i,r]);return 0===e.length&&(null===(o=t.getScene())||void 0===o||o.meshes.forEach((function(e){e._markSubMeshesAsLightDirty()}))),a}},Object.defineProperty(_0x56a0bf.prototype,"postProcesses",{get:function(){return this._postProcesses},enumerable:!1,configurable:!0}),Object.defineProperty(_0x56a0bf.prototype,"_prePassEnabled",{get:function(){return!!this._prePassRenderTarget&&this._prePassRenderTarget.enabled},enumerable:!1,configurable:!0}),Object.defineProperty(_0x56a0bf.prototype,"onAfterUnbind",{set:function(e){this._onAfterUnbindObserver&&this.onAfterUnbindObservable.remove(this._onAfterUnbindObserver),this._onAfterUnbindObserver=this.onAfterUnbindObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x56a0bf.prototype,"onBeforeRender",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x56a0bf.prototype,"onAfterRender",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x56a0bf.prototype,"onClear",{set:function(e){this._onClearObserver&&this.onClearObservable.remove(this._onClearObserver),this._onClearObserver=this.onClearObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x56a0bf.prototype,"renderPassIds",{get:function(){return this._renderPassIds},enumerable:!1,configurable:!0}),Object.defineProperty(_0x56a0bf.prototype,"currentRefreshId",{get:function(){return this._currentRefreshId},enumerable:!1,configurable:!0}),_0x56a0bf.prototype.setMaterialForRendering=function(e,t){var i;i=Array.isArray(e)?e:[e];for(var n=0;n<i.length;++n)for(var r=0;r<this._renderPassIds.length;++r)i[n].setMaterialForRenderPass(this._renderPassIds[r],void 0!==t?Array.isArray(t)?t[r]:t:void 0)},Object.defineProperty(_0x56a0bf.prototype,"renderTargetOptions",{get:function(){return this._renderTargetOptions},enumerable:!1,configurable:!0}),Object.defineProperty(_0x56a0bf.prototype,"renderTarget",{get:function(){return this._renderTarget},enumerable:!1,configurable:!0}),_0x56a0bf.prototype._onRatioRescale=function(){this._sizeRatio&&this.resize(this._initialSizeParameter)},Object.defineProperty(_0x56a0bf.prototype,"boundingBoxSize",{get:function(){return this._boundingBoxSize},set:function(e){if(!this._boundingBoxSize||!this._boundingBoxSize.equals(e)){this._boundingBoxSize=e;var t=this.getScene();t&&t.markAllMaterialsAsDirty(_0x354cf8.MATERIAL_TextureDirtyFlag)}},enumerable:!1,configurable:!0}),Object.defineProperty(_0x56a0bf.prototype,"depthStencilTexture",{get:function(){var e,t;return null!==(t=null===(e=this._renderTarget)||void 0===e?void 0:e._depthStencilTexture)&&void 0!==t?t:null},enumerable:!1,configurable:!0}),_0x56a0bf.prototype.createDepthStencilTexture=function(e,t,i,n,r){var o;void 0===e&&(e=0),void 0===t&&(t=!0),void 0===i&&(i=!1),void 0===n&&(n=1),void 0===r&&(r=_0x354cf8.TEXTUREFORMAT_DEPTH32_FLOAT),null===(o=this._renderTarget)||void 0===o||o.createDepthStencilTexture(e,t,i,n,r)},_0x56a0bf.prototype._releaseRenderPassId=function(){if(this._scene)for(var e=this._scene.getEngine(),t=0;t<this._renderPassIds.length;++t)e.releaseRenderPassId(this._renderPassIds[t]);this._renderPassIds=[]},_0x56a0bf.prototype._createRenderPassId=function(){this._releaseRenderPassId();for(var e=this._scene.getEngine(),t=this._isCubeData?6:this.getRenderLayers()||1,i=0;i<t;++i)this._renderPassIds[i]=e.createRenderPassId("RenderTargetTexture - ".concat(this.name,"#").concat(i))},_0x56a0bf.prototype._processSizeParameter=function(e){if(e.ratio){this._sizeRatio=e.ratio;var t=this._getEngine();this._size={width:this._bestReflectionRenderTargetDimension(t.getRenderWidth(),this._sizeRatio),height:this._bestReflectionRenderTargetDimension(t.getRenderHeight(),this._sizeRatio)}}else this._size=e;this._createRenderPassId()},Object.defineProperty(_0x56a0bf.prototype,"samples",{get:function(){var e,t;return null!==(t=null===(e=this._renderTarget)||void 0===e?void 0:e.samples)&&void 0!==t?t:this._samples},set:function(e){this._renderTarget&&(this._samples=this._renderTarget.setSamples(e))},enumerable:!1,configurable:!0}),_0x56a0bf.prototype.resetRefreshCounter=function(){this._currentRefreshId=-1},Object.defineProperty(_0x56a0bf.prototype,"refreshRate",{get:function(){return this._refreshRate},set:function(e){this._refreshRate=e,this.resetRefreshCounter()},enumerable:!1,configurable:!0}),_0x56a0bf.prototype.addPostProcess=function(e){if(!this._postProcessManager){var t=this.getScene();if(!t)return;this._postProcessManager=new _PostProcesses_postProcessManager__WEBPACK_IMPORTED_MODULE_5__.PostProcessManager(t),this._postProcesses=new Array}this._postProcesses.push(e),this._postProcesses[0].autoClear=!1},_0x56a0bf.prototype.clearPostProcesses=function(e){if(void 0===e&&(e=!1),this._postProcesses){if(e)for(var t=0,i=this._postProcesses;t<i.length;t++){i[t].dispose()}this._postProcesses=[]}},_0x56a0bf.prototype.removePostProcess=function(e){if(this._postProcesses){var t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses.splice(t,1),this._postProcesses.length>0&&(this._postProcesses[0].autoClear=!1))}},_0x56a0bf.prototype._shouldRender=function(){return-1===this._currentRefreshId||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1)},_0x56a0bf.prototype.getRenderSize=function(){return this.getRenderWidth()},_0x56a0bf.prototype.getRenderWidth=function(){return this._size.width?this._size.width:this._size},_0x56a0bf.prototype.getRenderHeight=function(){return this._size.width?this._size.height:this._size},_0x56a0bf.prototype.getRenderLayers=function(){var e=this._size.layers;return e||0},_0x56a0bf.prototype.disableRescaling=function(){this._canRescale=!1},Object.defineProperty(_0x56a0bf.prototype,"canRescale",{get:function(){return this._canRescale},enumerable:!1,configurable:!0}),_0x56a0bf.prototype.scale=function(e){var t=Math.max(1,this.getRenderSize()*e);this.resize(t)},_0x56a0bf.prototype.getReflectionTextureMatrix=function(){return this.isCube?this._textureMatrix:_super.prototype.getReflectionTextureMatrix.call(this)},_0x56a0bf.prototype.resize=function(e){var t,i=this.isCube;null===(t=this._renderTarget)||void 0===t||t.dispose(),this._renderTarget=null;var n=this.getScene();n&&(this._processSizeParameter(e),this._renderTarget=i?n.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions):n.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this._texture=this._renderTarget.texture,void 0!==this._renderTargetOptions.samples&&(this.samples=this._renderTargetOptions.samples),this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this))},_0x56a0bf.prototype.render=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),this._render(e,t)},_0x56a0bf.prototype.isReadyForRendering=function(){return this._render(!1,!1,!0)},_0x56a0bf.prototype._render=function(e,t,i){var n;void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===i&&(i=!1);var r=this.getScene();if(!r)return i;var o=r.getEngine();if(void 0!==this.useCameraPostProcesses&&(e=this.useCameraPostProcesses),this._waitingRenderList){this.renderList=[];for(var a=0;a<this._waitingRenderList.length;a++){var s=this._waitingRenderList[a];(c=r.getMeshById(s))&&this.renderList.push(c)}this._waitingRenderList=void 0}if(this.renderListPredicate){this.renderList?this.renderList.length=0:this.renderList=[];var l=this.getScene();if(!l)return i;var u=l.meshes;for(a=0;a<u.length;a++){var c=u[a];this.renderListPredicate(c)&&this.renderList.push(c)}}var h=o.currentRenderPassId;this.onBeforeBindObservable.notifyObservers(this);var d=null!==(n=this.activeCamera)&&void 0!==n?n:r.activeCamera;d&&(d!==r.activeCamera&&r.setTransformMatrix(d.getViewMatrix(),d.getProjectionMatrix(!0)),o.setViewport(d.viewport,this.getRenderWidth(),this.getRenderHeight())),this._defaultRenderListPrepared=!1;var f=i;if(i){!r.getViewMatrix()&&r.updateTransformMatrix();var p=this.is2DArray?this.getRenderLayers():this.isCube?6:1;for(v=0;v<p&&f;v++){var _=null,m=this.renderList?this.renderList:r.getActiveMeshes().data,g=this.renderList?this.renderList.length:r.getActiveMeshes().length;o.currentRenderPassId=this._renderPassIds[v],this.onBeforeRenderObservable.notifyObservers(v),this.getCustomRenderList&&(_=this.getCustomRenderList(v,m,g)),!_&&(_=m),!this._doNotChangeAspectRatio&&r.updateTransformMatrix(!0);for(var x=0;x<_.length&&f;++x){if((c=_[x]).isEnabled()&&!c.isBlocked&&c.isVisible&&c.subMeshes)if(this.customIsReadyFunction){if(!this.customIsReadyFunction(c,this.refreshRate)){f=!1;break}}else if(!c.isReady(!0)){f=!1;break}}this.onAfterRenderObservable.notifyObservers(v)}}else if(this.is2DArray)for(var v=0;v<this.getRenderLayers();v++)this._renderToTarget(0,e,t,v,d),r.incrementRenderId(),r.resetCachedMaterial();else if(this.isCube)for(var y=0;y<6;y++)this._renderToTarget(y,e,t,void 0,d),r.incrementRenderId(),r.resetCachedMaterial();else this._renderToTarget(0,e,t,void 0,d);return this.onAfterUnbindObservable.notifyObservers(this),o.currentRenderPassId=h,r.activeCamera&&((r.getEngine().scenes.length>1||this.activeCamera&&this.activeCamera!==r.activeCamera)&&r.setTransformMatrix(r.activeCamera.getViewMatrix(),r.activeCamera.getProjectionMatrix(!0)),o.setViewport(r.activeCamera.viewport)),r.resetCachedMaterial(),f},_0x56a0bf.prototype._bestReflectionRenderTargetDimension=function(e,t){var i=e*t,n=_Engines_engine__WEBPACK_IMPORTED_MODULE_10__.Engine.NearestPOT(i+16384/(128+i));return Math.min(_Engines_engine__WEBPACK_IMPORTED_MODULE_10__.Engine.FloorPOT(e),n)},_0x56a0bf.prototype._prepareRenderingManager=function(e,t,i,n){var r=this.getScene();if(r){this._renderingManager.reset();for(var o=r.getRenderId(),a=0;a<t;a++){var s=e[a];if(s&&!s.isBlocked){if(this.customIsReadyFunction){if(!this.customIsReadyFunction(s,this.refreshRate)){this.resetRefreshCounter();continue}}else if(!s.isReady(0===this.refreshRate)){this.resetRefreshCounter();continue}if(!s._internalAbstractMeshDataInfo._currentLODIsUpToDate&&r.activeCamera&&(s._internalAbstractMeshDataInfo._currentLOD=r.customLODSelector?r.customLODSelector(s,this.activeCamera||r.activeCamera):s.getLOD(this.activeCamera||r.activeCamera),s._internalAbstractMeshDataInfo._currentLODIsUpToDate=!0),!s._internalAbstractMeshDataInfo._currentLOD)continue;var l=s._internalAbstractMeshDataInfo._currentLOD;l._preActivateForIntermediateRendering(o);var u=void 0;if(u=!(!n||!i)&&0==(s.layerMask&i.layerMask),s.isEnabled()&&s.isVisible&&s.subMeshes&&!u&&(l!==s&&l._activate(o,!0),s._activate(o,!0)&&s.subMeshes.length)){s.isAnInstance?s._internalAbstractMeshDataInfo._actAsRegularMesh&&(l=s):l._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!1,l._internalAbstractMeshDataInfo._isActiveIntermediate=!0;for(var c=0;c<l.subMeshes.length;c++){var h=l.subMeshes[c];this._renderingManager.dispatch(h,l)}}}}for(var d=0;d<r.particleSystems.length;d++){var f=r.particleSystems[d],p=f.emitter;f.isStarted()&&p&&p.position&&p.isEnabled()&&(e.indexOf(p)>=0&&this._renderingManager.dispatchParticles(f))}}},_0x56a0bf.prototype._bindFrameBuffer=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0);var i=this.getScene();if(i){var n=i.getEngine();this._renderTarget&&n.bindFramebuffer(this._renderTarget,this.isCube?e:void 0,void 0,void 0,this.ignoreCameraViewport,0,t)}},_0x56a0bf.prototype._unbindFrameBuffer=function(e,t){var i=this;this._renderTarget&&e.unBindFramebuffer(this._renderTarget,this.isCube,(function(){i.onAfterRenderObservable.notifyObservers(t)}))},_0x56a0bf.prototype._prepareFrame=function(e,t,i,n){this._postProcessManager?!this._prePassEnabled&&this._postProcessManager._prepareFrame(this._texture,this._postProcesses):(!n||!e.postProcessManager._prepareFrame(this._texture))&&this._bindFrameBuffer(t,i)},_0x56a0bf.prototype._renderToTarget=function(e,t,i,n,r){var o,a,s,l,u,c;void 0===n&&(n=0),void 0===r&&(r=null);var h=this.getScene();if(h){var d=h.getEngine();if(null===(o=d._debugPushGroup)||void 0===o||o.call(d,"render to face #".concat(e," layer #").concat(n),1),this._prepareFrame(h,e,n,t),this.is2DArray?(d.currentRenderPassId=this._renderPassIds[n],this.onBeforeRenderObservable.notifyObservers(n)):(d.currentRenderPassId=this._renderPassIds[e],this.onBeforeRenderObservable.notifyObservers(e)),d.snapshotRendering&&d.snapshotRenderingMode===_0x354cf8.SNAPSHOTRENDERING_FAST)this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(d):!this.skipInitialClear&&d.clear(this.clearColor||h.clearColor,!0,!0,!0);else{var f=null,p=this.renderList?this.renderList:h.getActiveMeshes().data,_=this.renderList?this.renderList.length:h.getActiveMeshes().length;this.getCustomRenderList&&(f=this.getCustomRenderList(this.is2DArray?n:e,p,_)),f?this._prepareRenderingManager(f,f.length,r,!1):(!this._defaultRenderListPrepared&&(this._prepareRenderingManager(p,_,r,!this.renderList),this._defaultRenderListPrepared=!0),f=p);for(var m=0,g=h._beforeRenderTargetClearStage;m<g.length;m++){g[m].action(this,e,n)}this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(d):!this.skipInitialClear&&d.clear(this.clearColor||h.clearColor,!0,!0,!0),!this._doNotChangeAspectRatio&&h.updateTransformMatrix(!0);for(var x=0,v=h._beforeRenderTargetDrawStage;x<v.length;x++){v[x].action(this,e,n)}this._renderingManager.render(this.customRenderFunction,f,this.renderParticles,this.renderSprites);for(var y=0,$=h._afterRenderTargetDrawStage;y<$.length;y++){$[y].action(this,e,n)}var b=null!==(s=null===(a=this._texture)||void 0===a?void 0:a.generateMipMaps)&&void 0!==s&&s;this._texture&&(this._texture.generateMipMaps=!1),this._postProcessManager?this._postProcessManager._finalizeFrame(!1,null!==(l=this._renderTarget)&&void 0!==l?l:void 0,e,this._postProcesses,this.ignoreCameraViewport):t&&h.postProcessManager._finalizeFrame(!1,null!==(u=this._renderTarget)&&void 0!==u?u:void 0,e),this._texture&&(this._texture.generateMipMaps=b),!this._doNotChangeAspectRatio&&h.updateTransformMatrix(!0),i&&_0x4d7f4f.DumpFramebuffer(this.getRenderWidth(),this.getRenderHeight(),d)}this._unbindFrameBuffer(d,e),this._texture&&this.isCube&&5===e&&d.generateMipMapsForCubemap(this._texture),null===(c=d._debugPopGroup)||void 0===c||c.call(d,1)}},_0x56a0bf.prototype.setRenderingOrder=function(e,t,i,n){void 0===t&&(t=null),void 0===i&&(i=null),void 0===n&&(n=null),this._renderingManager.setRenderingOrder(e,t,i,n)},_0x56a0bf.prototype.setRenderingAutoClearDepthStencil=function(e,t){this._renderingManager.setRenderingAutoClearDepthStencil(e,t),this._renderingManager._useSceneAutoClearSetup=!1},_0x56a0bf.prototype.clone=function(){var e=this.getSize(),t=new _0x56a0bf(this.name,e,this.getScene(),this._renderTargetOptions.generateMipMaps,this._doNotChangeAspectRatio,this._renderTargetOptions.type,this.isCube,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer,this._renderTargetOptions.generateStencilBuffer,void 0,this._renderTargetOptions.format,void 0,this._renderTargetOptions.samples);return t.hasAlpha=this.hasAlpha,t.level=this.level,t.coordinatesMode=this.coordinatesMode,this.renderList&&(t.renderList=this.renderList.slice(0)),t},_0x56a0bf.prototype.serialize=function(){if(!this.name)return null;var e=_super.prototype.serialize.call(this);if(e.renderTargetSize=this.getRenderSize(),e.renderList=[],this.renderList)for(var t=0;t<this.renderList.length;t++)e.renderList.push(this.renderList[t].id);return e},_0x56a0bf.prototype.disposeFramebufferObjects=function(){var e;null===(e=this._renderTarget)||void 0===e||e.dispose(!0)},_0x56a0bf.prototype.releaseInternalTexture=function(){var e;null===(e=this._renderTarget)||void 0===e||e.releaseTextures(),this._texture=null},_0x56a0bf.prototype.dispose=function(){var e;this.onResizeObservable.clear(),this.onClearObservable.clear(),this.onAfterRenderObservable.clear(),this.onAfterUnbindObservable.clear(),this.onBeforeBindObservable.clear(),this.onBeforeRenderObservable.clear(),this._postProcessManager&&(this._postProcessManager.dispose(),this._postProcessManager=null),this._prePassRenderTarget&&this._prePassRenderTarget.dispose(),this._releaseRenderPassId(),this.clearPostProcesses(!0),this._resizeObserver&&(this.getScene().getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null),this.renderList=null;var t=this.getScene();if(t){var i=t.customRenderTargets.indexOf(this);i>=0&&t.customRenderTargets.splice(i,1);for(var n=0,r=t.cameras;n<r.length;n++){var o=r[n];(i=o.customRenderTargets.indexOf(this))>=0&&o.customRenderTargets.splice(i,1)}null===(e=this._renderTarget)||void 0===e||e.dispose(),this._renderTarget=null,this._texture=null,_super.prototype.dispose.call(this)}},_0x56a0bf.prototype._rebuild=function(){this.refreshRate===_0x56a0bf.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=_0x56a0bf.REFRESHRATE_RENDER_ONCE),this._postProcessManager&&this._postProcessManager._rebuild()},_0x56a0bf.prototype.freeRenderingGroups=function(){this._renderingManager&&this._renderingManager.freeRenderingGroups()},_0x56a0bf.prototype.getViewCount=function(){return 1},_0x56a0bf.REFRESHRATE_RENDER_ONCE=0,_0x56a0bf.REFRESHRATE_RENDER_ONEVERYFRAME=1,_0x56a0bf.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2,_0x54f9c4._CreateRenderTargetTexture=function(e,t,i,n,r){return new _0x56a0bf(e,t,i,n)};var _0x46f48a=(_0x2d566a=!0,function(e,t){var i=_0x2d566a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d566a=!1,i}),_0x38b7f0=_0x46f48a(void 0,(function(){return _0x38b7f0.toString().search("(((.+)+)+)+$").toString().constructor(_0x38b7f0).search("(((.+)+)+)+$")})),_0x2d566a,_0x4d2140,_0x677e6f;function _0x269372(e,t,i,n){void 0===n&&(n=!0);var r=e.getScene(),o=r.getEngine(),a=new _0x56a0bf("resized"+e.name,{width:t,height:i},r,!e.noMipmap,!0,e._texture.type,!1,e.samplingMode,!1);a.wrapU=e.wrapU,a.wrapV=e.wrapV,a.uOffset=e.uOffset,a.vOffset=e.vOffset,a.uScale=e.uScale,a.vScale=e.vScale,a.uAng=e.uAng,a.vAng=e.vAng,a.wAng=e.wAng,a.coordinatesIndex=e.coordinatesIndex,a.level=e.level,a.anisotropicFilteringLevel=e.anisotropicFilteringLevel,a._texture.isReady=!1,e.wrapU=_0x54f9c4.CLAMP_ADDRESSMODE,e.wrapV=_0x54f9c4.CLAMP_ADDRESSMODE;var s=new _PostProcesses_passPostProcess__WEBPACK_IMPORTED_MODULE_2__.PassPostProcess("pass",1,null,n?_0x54f9c4.BILINEAR_SAMPLINGMODE:_0x54f9c4.NEAREST_SAMPLINGMODE,o,!1,_0x354cf8.TEXTURETYPE_UNSIGNED_INT);return s.externalTextureSamplerBinding=!0,s.getEffect().executeWhenCompiled((function(){s.onApply=function(t){t.setTexture("textureSampler",e)};var t=a.renderTarget;t&&(r.postProcessManager.directRender([s],t),o.unBindFramebuffer(t),a.disposeFramebufferObjects(),s.dispose(),a.getInternalTexture().isReady=!0)})),a}function _0x4b8601(e,t,i,n,r,o){var a=t.getEngine();return t.isReady=!1,r=null!=r?r:t.samplingMode,n=null!=n?n:t.type,o=null!=o?o:t.format,-1===n&&(n=_0x354cf8.TEXTURETYPE_UNSIGNED_BYTE),new Promise((function(s){var l=new _PostProcesses_postProcess__WEBPACK_IMPORTED_MODULE_4__.PostProcess("postprocess",e,null,null,1,null,r,a,!1,void 0,n,void 0,null,!1,o);l.externalTextureSamplerBinding=!0;var u=a.createRenderTargetTexture({width:t.width,height:t.height},{generateDepthBuffer:!1,generateMipMaps:!1,generateStencilBuffer:!1,samplingMode:r,type:n,format:o});l.getEffect().executeWhenCompiled((function(){l.onApply=function(e){e._bindTexture("textureSampler",t),e.setFloat2("scale",1,1)},i.postProcessManager.directRender([l],u,!0),a.restoreDefaultFramebuffer(),a._releaseTexture(t),l&&l.dispose(),u._swapAndDie(t),t.type=n,t.format=_0x354cf8.TEXTUREFORMAT_RGBA,t.isReady=!0,s(t)}))}))}function _0x4f80c1(e){!_0x4d2140&&(_0x4d2140=new Float32Array(1),_0x677e6f=new Int32Array(_0x4d2140.buffer)),_0x4d2140[0]=e;var t=_0x677e6f[0],i=t>>16&32768,n=t>>12&2047,r=t>>23&255;return r<103?i:r>142?(i|=31744,i|=(255==r?0:1)&&8388607&t):r<113?i|=((n|=2048)>>114-r)+(n>>113-r&1):(i|=r-112<<10|n>>1,i+=1&n)}function _0x477872(e){var t=(32768&e)>>15,i=(31744&e)>>10,n=1023&e;return 0===i?(t?-1:1)*Math.pow(2,-14)*(n/Math.pow(2,10)):31==i?n?NaN:1/0*(t?-1:1):(t?-1:1)*Math.pow(2,i-15)*(1+n/Math.pow(2,10))}_0x38b7f0();var _0x3956bb={CreateResizedCopy:_0x269372,ApplyPostProcess:_0x4b8601,ToHalfFloat:_0x4f80c1,FromHalfFloat:_0x477872},_0x158594=(_0x8c041=!0,function(e,t){var i=_0x8c041?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8c041=!1,i}),_0x91d1e5=_0x158594(void 0,(function(){return _0x91d1e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x91d1e5).search("(((.+)+)+)+$")})),_0x8c041;function _0x3e00(e){void 0===e&&(e=!0),this._isDepthTestDirty=!1,this._isDepthMaskDirty=!1,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1,e&&this.reset()}_0x91d1e5(),Object.defineProperty(_0x3e00.prototype,"isDirty",{get:function(){return this._isDepthFuncDirty||this._isDepthTestDirty||this._isDepthMaskDirty||this._isCullFaceDirty||this._isCullDirty||this._isZOffsetDirty||this._isFrontFaceDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"zOffset",{get:function(){return this._zOffset},set:function(e){this._zOffset!==e&&(this._zOffset=e,this._isZOffsetDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"zOffsetUnits",{get:function(){return this._zOffsetUnits},set:function(e){this._zOffsetUnits!==e&&(this._zOffsetUnits=e,this._isZOffsetDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"cullFace",{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,this._isCullFaceDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"cull",{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this._isCullDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"depthFunc",{get:function(){return this._depthFunc},set:function(e){this._depthFunc!==e&&(this._depthFunc=e,this._isDepthFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"depthMask",{get:function(){return this._depthMask},set:function(e){this._depthMask!==e&&(this._depthMask=e,this._isDepthMaskDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"depthTest",{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._isDepthTestDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3e00.prototype,"frontFace",{get:function(){return this._frontFace},set:function(e){this._frontFace!==e&&(this._frontFace=e,this._isFrontFaceDirty=!0)},enumerable:!1,configurable:!0}),_0x3e00.prototype.reset=function(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._zOffsetUnits=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!0,this._isFrontFaceDirty=!1},_0x3e00.prototype.apply=function(e){this.isDirty&&(this._isCullDirty&&(this.cull?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this._isCullDirty=!1),this._isCullFaceDirty&&(e.cullFace(this.cullFace),this._isCullFaceDirty=!1),this._isDepthMaskDirty&&(e.depthMask(this.depthMask),this._isDepthMaskDirty=!1),this._isDepthTestDirty&&(this.depthTest?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this._isDepthTestDirty=!1),this._isDepthFuncDirty&&(e.depthFunc(this.depthFunc),this._isDepthFuncDirty=!1),this._isZOffsetDirty&&(this.zOffset||this.zOffsetUnits?(e.enable(e.POLYGON_OFFSET_FILL),e.polygonOffset(this.zOffset,this.zOffsetUnits)):e.disable(e.POLYGON_OFFSET_FILL),this._isZOffsetDirty=!1),this._isFrontFaceDirty&&(e.frontFace(this.frontFace),this._isFrontFaceDirty=!1))};var _0x33d770=(_0xea0721=!0,function(e,t){var i=_0xea0721?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xea0721=!1,i}),_0x4a338d=_0x33d770(void 0,(function(){return _0x4a338d.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a338d).search("(((.+)+)+)+$")})),_0xea0721;function _0x18bf87(){this._blendFunctionParameters=new Array(4),this._blendEquationParameters=new Array(2),this._blendConstants=new Array(4),this._isBlendConstantsDirty=!1,this._alphaBlend=!1,this._isAlphaBlendDirty=!1,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this.reset()}_0x4a338d(),Object.defineProperty(_0x18bf87.prototype,"isDirty",{get:function(){return this._isAlphaBlendDirty||this._isBlendFunctionParametersDirty||this._isBlendEquationParametersDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_0x18bf87.prototype,"alphaBlend",{get:function(){return this._alphaBlend},set:function(e){this._alphaBlend!==e&&(this._alphaBlend=e,this._isAlphaBlendDirty=!0)},enumerable:!1,configurable:!0}),_0x18bf87.prototype.setAlphaBlendConstants=function(e,t,i,n){this._blendConstants[0]===e&&this._blendConstants[1]===t&&this._blendConstants[2]===i&&this._blendConstants[3]===n||(this._blendConstants[0]=e,this._blendConstants[1]=t,this._blendConstants[2]=i,this._blendConstants[3]=n,this._isBlendConstantsDirty=!0)},_0x18bf87.prototype.setAlphaBlendFunctionParameters=function(e,t,i,n){this._blendFunctionParameters[0]===e&&this._blendFunctionParameters[1]===t&&this._blendFunctionParameters[2]===i&&this._blendFunctionParameters[3]===n||(this._blendFunctionParameters[0]=e,this._blendFunctionParameters[1]=t,this._blendFunctionParameters[2]=i,this._blendFunctionParameters[3]=n,this._isBlendFunctionParametersDirty=!0)},_0x18bf87.prototype.setAlphaEquationParameters=function(e,t){this._blendEquationParameters[0]===e&&this._blendEquationParameters[1]===t||(this._blendEquationParameters[0]=e,this._blendEquationParameters[1]=t,this._isBlendEquationParametersDirty=!0)},_0x18bf87.prototype.reset=function(){this._alphaBlend=!1,this._blendFunctionParameters[0]=null,this._blendFunctionParameters[1]=null,this._blendFunctionParameters[2]=null,this._blendFunctionParameters[3]=null,this._blendEquationParameters[0]=null,this._blendEquationParameters[1]=null,this._blendConstants[0]=null,this._blendConstants[1]=null,this._blendConstants[2]=null,this._blendConstants[3]=null,this._isAlphaBlendDirty=!0,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1},_0x18bf87.prototype.apply=function(e){this.isDirty&&(this._isAlphaBlendDirty&&(this._alphaBlend?e.enable(e.BLEND):e.disable(e.BLEND),this._isAlphaBlendDirty=!1),this._isBlendFunctionParametersDirty&&(e.blendFuncSeparate(this._blendFunctionParameters[0],this._blendFunctionParameters[1],this._blendFunctionParameters[2],this._blendFunctionParameters[3]),this._isBlendFunctionParametersDirty=!1),this._isBlendEquationParametersDirty&&(e.blendEquationSeparate(this._blendEquationParameters[0],this._blendEquationParameters[1]),this._isBlendEquationParametersDirty=!1),this._isBlendConstantsDirty&&(e.blendColor(this._blendConstants[0],this._blendConstants[1],this._blendConstants[2],this._blendConstants[3]),this._isBlendConstantsDirty=!1))};var _0x3e24e6=(_0x3edf35=!0,function(e,t){var i=_0x3edf35?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3edf35=!1,i}),_0x1c8924=_0x3e24e6(void 0,(function(){return _0x1c8924.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c8924).search("(((.+)+)+)+$")})),_0x3edf35;function IsWindowObjectExist(){return"undefined"!=typeof window}function IsDocumentAvailable(){return"undefined"!=typeof document}function GetDOMTextContent(e){for(var t="",i=e.firstChild;i;)3===i.nodeType&&(t+=i.textContent),i=i.nextSibling;return t}_0x1c8924();var _0xa37f10=(_0x484633=!0,function(e,t){var i=_0x484633?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x484633=!1,i}),_0x1ec180=_0xa37f10(void 0,(function(){return _0x1ec180.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ec180).search("(((.+)+)+)+$")})),_0x484633;function _0x2659bc(e){void 0===e&&(e=!0),this._isStencilTestDirty=!1,this._isStencilMaskDirty=!1,this._isStencilFuncDirty=!1,this._isStencilOpDirty=!1,this.useStencilGlobalOnly=!1,e&&this.reset()}_0x1ec180(),Object.defineProperty(_0x2659bc.prototype,"isDirty",{get:function(){return this._isStencilTestDirty||this._isStencilMaskDirty||this._isStencilFuncDirty||this._isStencilOpDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"func",{get:function(){return this._func},set:function(e){this._func!==e&&(this._func=e,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"funcRef",{get:function(){return this._funcRef},set:function(e){this._funcRef!==e&&(this._funcRef=e,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"funcMask",{get:function(){return this._funcMask},set:function(e){this._funcMask!==e&&(this._funcMask=e,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"opStencilFail",{get:function(){return this._opStencilFail},set:function(e){this._opStencilFail!==e&&(this._opStencilFail=e,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"opDepthFail",{get:function(){return this._opDepthFail},set:function(e){this._opDepthFail!==e&&(this._opDepthFail=e,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"opStencilDepthPass",{get:function(){return this._opStencilDepthPass},set:function(e){this._opStencilDepthPass!==e&&(this._opStencilDepthPass=e,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask!==e&&(this._mask=e,this._isStencilMaskDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2659bc.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,this._isStencilTestDirty=!0)},enumerable:!1,configurable:!0}),_0x2659bc.prototype.reset=function(){var e;this.stencilMaterial=void 0,null===(e=this.stencilGlobal)||void 0===e||e.reset(),this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0},_0x2659bc.prototype.apply=function(e){var t;if(e){var i=!this.useStencilGlobalOnly&&!!(null===(t=this.stencilMaterial)||void 0===t?void 0:t.enabled);this.enabled=i?this.stencilMaterial.enabled:this.stencilGlobal.enabled,this.func=i?this.stencilMaterial.func:this.stencilGlobal.func,this.funcRef=i?this.stencilMaterial.funcRef:this.stencilGlobal.funcRef,this.funcMask=i?this.stencilMaterial.funcMask:this.stencilGlobal.funcMask,this.opStencilFail=i?this.stencilMaterial.opStencilFail:this.stencilGlobal.opStencilFail,this.opDepthFail=i?this.stencilMaterial.opDepthFail:this.stencilGlobal.opDepthFail,this.opStencilDepthPass=i?this.stencilMaterial.opStencilDepthPass:this.stencilGlobal.opStencilDepthPass,this.mask=i?this.stencilMaterial.mask:this.stencilGlobal.mask,this.isDirty&&(this._isStencilTestDirty&&(this.enabled?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this._isStencilTestDirty=!1),this._isStencilMaskDirty&&(e.stencilMask(this.mask),this._isStencilMaskDirty=!1),this._isStencilFuncDirty&&(e.stencilFunc(this.func,this.funcRef,this.funcMask),this._isStencilFuncDirty=!1),this._isStencilOpDirty&&(e.stencilOp(this.opStencilFail,this.opDepthFail,this.opStencilDepthPass),this._isStencilOpDirty=!1))}};var _0x4e6693=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));return i(),function(){}}();function _0xb82ccc(e,t,i,n){var r=this;this._name="WebGL",this.forcePOTTextures=!1,this.isFullscreen=!1,this.cullBackFaces=null,this.renderEvenInBackground=!0,this.preventCacheWipeBetweenFrames=!1,this.validateShaderPrograms=!1,this._useReverseDepthBuffer=!1,this.isNDCHalfZRange=!1,this.hasOriginBottomLeft=!0,this.disableUniformBuffers=!1,this.onDisposeObservable=new Observable,this._frameId=0,this._uniformBuffers=new Array,this._storageBuffers=new Array,this._webGLVersion=1,this._windowIsBackground=!1,this._highPrecisionShadersAllowed=!0,this._badOS=!1,this._badDesktopOS=!1,this._renderingQueueLaunched=!1,this._activeRenderLoops=new Array,this.onContextLostObservable=new Observable,this.onContextRestoredObservable=new Observable,this._contextWasLost=!1,this._doNotHandleContextLost=!1,this.disableVertexArrayObjects=!1,this._colorWrite=!0,this._colorWriteChanged=!0,this._depthCullingState=new _0x3e00,this._stencilStateComposer=new _0x2659bc,this._stencilState=new _0x4bbfae,this._alphaState=new _0x18bf87,this._alphaMode=_0x354cf8.ALPHA_ADD,this._alphaEquation=_0x354cf8.ALPHA_DISABLE,this._internalTexturesCache=new Array,this._renderTargetWrapperCache=new Array,this._activeChannel=0,this._currentTextureChannel=-1,this._boundTexturesCache={},this._compiledEffects={},this._vertexAttribArraysEnabled=[],this._uintIndicesCurrentlySet=!1,this._currentBoundBuffer=new Array,this._currentFramebuffer=null,this._dummyFramebuffer=null,this._currentBufferPointers=new Array,this._currentInstanceLocations=new Array,this._currentInstanceBuffers=new Array,this._vaoRecordInProgress=!1,this._mustWipeVertexAttributes=!1,this._nextFreeTextureSlots=new Array,this._maxSimultaneousTextures=0,this._maxMSAASamplesOverride=null,this._activeRequests=new Array,this._adaptToDeviceRatio=!1,this._transformTextureUrl=null,this.hostInformation={isMobile:!1},this.premultipliedAlpha=!0,this.onBeforeTextureInitObservable=new Observable,this._isWebGPU=!1,this._snapshotRenderingMode=_0x354cf8.SNAPSHOTRENDERING_STANDARD,this._viewportCached={x:0,y:0,z:0,w:0},this._unpackFlipYCached=null,this.enableUnpackFlipYCached=!0,this._boundUniforms={};var o=null;if(i=i||{},this._creationOptions=i,this._adaptToDeviceRatio=null!=n&&n,this._stencilStateComposer.stencilGlobal=this._stencilState,_0x17f3d8.SetMatrixPrecision(!!i.useHighPrecisionMatrix),e){if(n=n||i.adaptToDeviceRatio||!1,e.getContext){if(o=e,this._renderingCanvas=o,void 0!==t&&(i.antialias=t),void 0===i.deterministicLockstep&&(i.deterministicLockstep=!1),void 0===i.lockstepMaxSteps&&(i.lockstepMaxSteps=4),void 0===i.timeStep&&(i.timeStep=1/60),void 0===i.preserveDrawingBuffer&&(i.preserveDrawingBuffer=!1),void 0===i.audioEngine&&(i.audioEngine=!0),void 0!==i.audioEngineOptions&&void 0!==i.audioEngineOptions.audioContext&&(this._audioContext=i.audioEngineOptions.audioContext),void 0!==i.audioEngineOptions&&void 0!==i.audioEngineOptions.audioDestination&&(this._audioDestination=i.audioEngineOptions.audioDestination),void 0===i.stencil&&(i.stencil=!0),!1===i.premultipliedAlpha&&(this.premultipliedAlpha=!1),void 0===i.xrCompatible&&(i.xrCompatible=!0),this._doNotHandleContextLost=!!i.doNotHandleContextLost,navigator&&navigator.userAgent){this._checkForMobile=function(){var e=navigator.userAgent;r.hostInformation.isMobile=-1!==e.indexOf("Mobile")||-1!==e.indexOf("Mac")&&IsDocumentAvailable()&&"ontouchend"in document},this._checkForMobile(),IsWindowObjectExist()&&window.addEventListener("resize",this._checkForMobile);for(var a=navigator.userAgent,s=0,l=_0xb82ccc.ExceptionList;s<l.length;s++){var u=l[s],c=u.key,h=u.targets;if(new RegExp(c).test(a)){if(u.capture&&u.captureConstraint){var d=u.capture,f=u.captureConstraint,p=new RegExp(d).exec(a);if(p&&p.length>0)if(parseInt(p[p.length-1])>=f)continue}for(var _=0,m=h;_<m.length;_++){switch(m[_]){case"uniformBuffer":this.disableUniformBuffers=!0;break;case"vao":this.disableVertexArrayObjects=!0;break;case"antialias":i.antialias=!1;break;case"maxMSAASamples":this._maxMSAASamplesOverride=1}}}}}if(!this._doNotHandleContextLost&&(this._onContextLost=function(e){e.preventDefault(),r._contextWasLost=!0,_0x41154e.Warn("WebGL context lost."),r.onContextLostObservable.notifyObservers(r)},this._onContextRestored=function(){r._restoreEngineAfterContextLost(r._initGLContext.bind(r))},o.addEventListener("webglcontextlost",this._onContextLost,!1),o.addEventListener("webglcontextrestored",this._onContextRestored,!1),i.powerPreference="high-performance"),this._badDesktopOS=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),this._badDesktopOS&&(i.xrCompatible=!1),!i.disableWebGL2Support)try{this._gl=o.getContext("webgl2",i)||o.getContext("experimental-webgl2",i),this._gl&&(this._webGLVersion=2,this._shaderPlatformName="WEBGL2",!this._gl.deleteQuery&&(this._webGLVersion=1,this._shaderPlatformName="WEBGL1"))}catch(e){}if(!this._gl){if(!o)throw new Error("The provided canvas is null or undefined.");try{this._gl=o.getContext("webgl",i)||o.getContext("experimental-webgl",i)}catch(e){throw new Error("WebGL not supported")}}if(!this._gl)throw new Error("WebGL not supported")}else{this._gl=e,this._renderingCanvas=this._gl.canvas,this._gl.renderbufferStorageMultisample?(this._webGLVersion=2,this._shaderPlatformName="WEBGL2"):this._shaderPlatformName="WEBGL1";var g=this._gl.getContextAttributes();g&&(i.stencil=g.stencil)}this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),void 0!==i.useHighPrecisionFloats&&(this._highPrecisionShadersAllowed=i.useHighPrecisionFloats);var x=IsWindowObjectExist()&&window.devicePixelRatio||1,v=i.limitDeviceRatio||x;this._hardwareScalingLevel=n?1/Math.min(v,x):1,this.resize(),this._isStencilEnable=!!i.stencil,this._initGLContext(),this._initFeatures();for(var y=0;y<this._caps.maxVertexAttribs;y++)this._currentBufferPointers[y]=new _0x4e6693;this._shaderProcessor=this.webGLVersion>1?new _WebGL_webGL2ShaderProcessors__WEBPACK_IMPORTED_MODULE_13__.WebGL2ShaderProcessor:new _WebGL_webGLShaderProcessors__WEBPACK_IMPORTED_MODULE_12__.WebGLShaderProcessor,this._badOS=/iPad/i.test(navigator.userAgent)||/iPhone/i.test(navigator.userAgent);var $="Babylon.js v".concat(_0xb82ccc.Version);console.log($+" - ".concat(this.description)),this._renderingCanvas&&this._renderingCanvas.setAttribute&&this._renderingCanvas.setAttribute("data-engine",$)}}Object.defineProperty(_0xb82ccc,"NpmPackage",{get:function(){return"babylonjs@5.9.0"},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc,"Version",{get:function(){return"5.9.0"},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"description",{get:function(){var e=this.name+this.webGLVersion;return this._caps.parallelShaderCompile&&(e+=" - Parallel shader compilation"),e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"version",{get:function(){return this._webGLVersion},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc,"ShadersRepository",{get:function(){return _Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ShadersRepository},set:function(e){_Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ShadersRepository=e},enumerable:!1,configurable:!0}),_0xb82ccc.prototype._getShaderProcessor=function(e){return this._shaderProcessor},Object.defineProperty(_0xb82ccc.prototype,"useReverseDepthBuffer",{get:function(){return this._useReverseDepthBuffer},set:function(e){e!==this._useReverseDepthBuffer&&(this._useReverseDepthBuffer=e,this._depthCullingState.depthFunc=e?_0x354cf8.GEQUAL:_0x354cf8.LEQUAL)},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"frameId",{get:function(){return this._frameId},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"supportsUniformBuffers",{get:function(){return this.webGLVersion>1&&!this.disableUniformBuffers},enumerable:!1,configurable:!0}),_0xb82ccc.prototype.getCreationOptions=function(){return this._creationOptions},Object.defineProperty(_0xb82ccc.prototype,"_shouldUseHighPrecisionShader",{get:function(){return!(!this._caps.highPrecisionShaderSupported||!this._highPrecisionShadersAllowed)},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"needPOTTextures",{get:function(){return this._webGLVersion<2||this.forcePOTTextures},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"activeRenderLoops",{get:function(){return this._activeRenderLoops},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"doNotHandleContextLost",{get:function(){return this._doNotHandleContextLost},set:function(e){this._doNotHandleContextLost=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"_supportsHardwareTextureRescaling",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"framebufferDimensionsObject",{set:function(e){this._framebufferDimensionsObject=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"currentViewport",{get:function(){return this._cachedViewport},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"emptyTexture",{get:function(){return!this._emptyTexture&&(this._emptyTexture=this.createRawTexture(new Uint8Array(4),1,1,_0x354cf8.TEXTUREFORMAT_RGBA,!1,!1,_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"emptyTexture3D",{get:function(){return!this._emptyTexture3D&&(this._emptyTexture3D=this.createRawTexture3D(new Uint8Array(4),1,1,1,_0x354cf8.TEXTUREFORMAT_RGBA,!1,!1,_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture3D},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"emptyTexture2DArray",{get:function(){return!this._emptyTexture2DArray&&(this._emptyTexture2DArray=this.createRawTexture2DArray(new Uint8Array(4),1,1,1,_0x354cf8.TEXTUREFORMAT_RGBA,!1,!1,_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture2DArray},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"emptyCubeTexture",{get:function(){if(!this._emptyCubeTexture){var e=new Uint8Array(4),t=[e,e,e,e,e,e];this._emptyCubeTexture=this.createRawCubeTexture(t,1,_0x354cf8.TEXTUREFORMAT_RGBA,_0x354cf8.TEXTURETYPE_UNSIGNED_INT,!1,!1,_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE)}return this._emptyCubeTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"isWebGPU",{get:function(){return this._isWebGPU},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"shaderPlatformName",{get:function(){return this._shaderPlatformName},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"snapshotRendering",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"snapshotRenderingMode",{get:function(){return this._snapshotRenderingMode},set:function(e){this._snapshotRenderingMode=e},enumerable:!1,configurable:!0}),_0xb82ccc.prototype.snapshotRenderingReset=function(){this.snapshotRendering=!1},_0xb82ccc._CreateCanvas=function(e,t){if("undefined"==typeof document)return new OffscreenCanvas(e,t);var i=document.createElement("canvas");return i.width=e,i.height=t,i},_0xb82ccc.prototype.createCanvas=function(e,t){return _0xb82ccc._CreateCanvas(e,t)},_0xb82ccc.prototype.createCanvasImage=function(){return document.createElement("img")},_0xb82ccc.prototype._restoreEngineAfterContextLost=function(e){var t=this;setTimeout((function(){return(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(t,void 0,void 0,(function(){var t,i,n,r,o;return(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this,(function(a){switch(a.label){case 0:return this._dummyFramebuffer=null,t=this._depthCullingState.depthTest,i=this._depthCullingState.depthFunc,n=this._depthCullingState.depthMask,r=this._stencilState.stencilTest,[4,e()];case 1:return a.sent(),this._rebuildEffects(),null===(o=this._rebuildComputeEffects)||void 0===o||o.call(this),this._rebuildInternalTextures(),this._rebuildRenderTargetWrappers(),this._rebuildBuffers(),this.wipeCaches(!0),this._depthCullingState.depthTest=t,this._depthCullingState.depthFunc=i,this._depthCullingState.depthMask=n,this._stencilState.stencilTest=r,_0x41154e.Warn(this.name+" context successfully restored."),this.onContextRestoredObservable.notifyObservers(this),this._contextWasLost=!1,[2]}}))}))}),0)},_0xb82ccc.prototype._sharedInit=function(e,t,i){this._renderingCanvas=e},_0xb82ccc.prototype._getShaderProcessingContext=function(e){return null},_0xb82ccc.prototype._rebuildInternalTextures=function(){for(var e=0,t=this._internalTexturesCache.slice();e<t.length;e++){t[e]._rebuild()}},_0xb82ccc.prototype._rebuildRenderTargetWrappers=function(){for(var e=0,t=this._renderTargetWrapperCache.slice();e<t.length;e++){t[e]._rebuild()}},_0xb82ccc.prototype._rebuildEffects=function(){for(var e in this._compiledEffects){var t=this._compiledEffects[e];t._pipelineContext=null,t._wasPreviouslyReady=!1,t._prepareEffect()}_Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ResetCache()},_0xb82ccc.prototype.areAllEffectsReady=function(){for(var e in this._compiledEffects){if(!this._compiledEffects[e].isReady())return!1}return!0},_0xb82ccc.prototype._rebuildBuffers=function(){for(var e=0,t=this._uniformBuffers;e<t.length;e++){t[e]._rebuild()}for(var i=0,n=this._storageBuffers;i<n.length;i++){n[i]._rebuild()}},_0xb82ccc.prototype._initGLContext=function(){this._caps={maxTexturesImageUnits:this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),maxCombinedTexturesImageUnits:this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),maxVertexTextureImageUnits:this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxTextureSize:this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),maxSamples:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile")||void 0,standardDerivatives:this._webGLVersion>1||null!==this._gl.getExtension("OES_standard_derivatives"),maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),s3tc_srgb:this._gl.getExtension("WEBGL_compressed_texture_s3tc_srgb")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc_srgb"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||null!==this._gl.getExtension("OES_element_index_uint"),fragmentDepthSupported:this._webGLVersion>1||null!==this._gl.getExtension("EXT_frag_depth"),highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),supportOcclusionQuery:this._webGLVersion>1,canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float")),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1,canUseGLInstanceID:this._webGLVersion>1,canUseGLVertexID:this._webGLVersion>1,supportComputeShaders:!1,supportSRGBBuffers:!1,supportTransformFeedbacks:this._webGLVersion>1,textureMaxLevel:this._webGLVersion>1,texture2DArrayMaxLayerCount:this._webGLVersion>1?256:128},this._glVersion=this._gl.getParameter(this._gl.VERSION);var e=this._gl.getExtension("WEBGL_debug_renderer_info");if(null!=e&&(this._glRenderer=this._gl.getParameter(e.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(e.UNMASKED_VENDOR_WEBGL)),!this._glVendor&&(this._glVendor=this._gl.getParameter(this._gl.VENDOR)||"Unknown vendor"),!this._glRenderer&&(this._glRenderer=this._gl.getParameter(this._gl.RENDERER)||"Unknown renderer"),36193!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=36193),34842!==this._gl.RGBA16F&&(this._gl.RGBA16F=34842),34836!==this._gl.RGBA32F&&(this._gl.RGBA32F=34836),35056!==this._gl.DEPTH24_STENCIL8&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(1===this._webGLVersion&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!(!this._caps.textureFloat||!this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!(!this._caps.textureFloat||!this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._caps.astc&&(this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR),this._caps.bptc&&(this._gl.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=this._caps.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT),this._caps.s3tc_srgb&&(this._gl.COMPRESSED_SRGB_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT),this._caps.etc2&&(this._gl.COMPRESSED_SRGB8_ETC2=this._caps.etc2.COMPRESSED_SRGB8_ETC2,this._gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=this._caps.etc2.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC),this._webGLVersion>1&&5131!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=null!==this._maxMSAASamplesOverride?this._maxMSAASamplesOverride:this._gl.getParameter(this._gl.MAX_SAMPLES);else{var t=this._gl.getExtension("WEBGL_draw_buffers");if(null!==t){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=t.drawBuffersWEBGL.bind(t),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(var i=0;i<16;i++)this._gl["COLOR_ATTACHMENT"+i+"_WEBGL"]=t["COLOR_ATTACHMENT"+i+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{var n=this._gl.getExtension("WEBGL_depth_texture");null!=n&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=n.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{var r=this._gl.getExtension("OES_vertex_array_object");null!=r&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=r.createVertexArrayOES.bind(r),this._gl.bindVertexArray=r.bindVertexArrayOES.bind(r),this._gl.deleteVertexArray=r.deleteVertexArrayOES.bind(r))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{var o=this._gl.getExtension("ANGLE_instanced_arrays");null!=o?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=o.drawArraysInstancedANGLE.bind(o),this._gl.drawElementsInstanced=o.drawElementsInstancedANGLE.bind(o),this._gl.vertexAttribDivisor=o.vertexAttribDivisorANGLE.bind(o)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){var a=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),s=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);a&&s&&(this._caps.highPrecisionShaderSupported=0!==a.precision&&0!==s.precision)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{var l=this._gl.getExtension("EXT_blend_minmax");null!=l&&(this._caps.blendMinMax=!0,this._gl.MAX=l.MAX_EXT,this._gl.MIN=l.MIN_EXT)}if(!this._caps.supportSRGBBuffers){if(this._webGLVersion>1)this._caps.supportSRGBBuffers=!0;else{var u=this._gl.getExtension("EXT_sRGB");null!=u&&(this._caps.supportSRGBBuffers=!0,this._gl.SRGB=u.SRGB_EXT,this._gl.SRGB8=u.SRGB_ALPHA_EXT,this._gl.SRGB8_ALPHA8=u.SRGB_ALPHA_EXT)}this._caps.supportSRGBBuffers=this._caps.supportSRGBBuffers&&!(!this._creationOptions||!this._creationOptions.forceSRGBBufferSupportState)}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(var c=0;c<this._maxSimultaneousTextures;c++)this._nextFreeTextureSlots.push(c)},_0xb82ccc.prototype._initFeatures=function(){this._features={forceBitmapOverHTMLImageElement:!1,supportRenderAndCopyToLodForFloatTextures:1!==this._webGLVersion,supportDepthStencilTexture:1!==this._webGLVersion,supportShadowSamplers:1!==this._webGLVersion,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:1!==this._webGLVersion,trackUbosInFrame:!1,checkUbosContentBeforeUpload:!1,supportCSM:1!==this._webGLVersion,basisNeedsPOT:1===this._webGLVersion,support3DTextures:1!==this._webGLVersion,needTypeSuffixInShaderConstants:1!==this._webGLVersion,supportMSAA:1!==this._webGLVersion,supportSSAO2:1!==this._webGLVersion,supportExtendedTextureFormats:1!==this._webGLVersion,supportSwitchCaseInShader:1!==this._webGLVersion,supportSyncTextureRead:!0,needsInvertingBitmap:!0,useUBOBindingCache:!0,needShaderCodeInlining:!1,needToAlwaysBindUniformBuffers:!1,supportRenderPasses:!1,_collectUbosUpdatedInFrame:!1}},Object.defineProperty(_0xb82ccc.prototype,"webGLVersion",{get:function(){return this._webGLVersion},enumerable:!1,configurable:!0}),_0xb82ccc.prototype.getClassName=function(){return"ThinEngine"},Object.defineProperty(_0xb82ccc.prototype,"isStencilEnable",{get:function(){return this._isStencilEnable},enumerable:!1,configurable:!0}),_0xb82ccc.prototype._prepareWorkingCanvas=function(){if(!this._workingCanvas){this._workingCanvas=this.createCanvas(1,1);var e=this._workingCanvas.getContext("2d");e&&(this._workingContext=e)}},_0xb82ccc.prototype.resetTextureCache=function(){for(var e in this._boundTexturesCache)Object.prototype.hasOwnProperty.call(this._boundTexturesCache,e)&&(this._boundTexturesCache[e]=null);this._currentTextureChannel=-1},_0xb82ccc.prototype.getInfo=function(){return this.getGlInfo()},_0xb82ccc.prototype.getGlInfo=function(){return{vendor:this._glVendor,renderer:this._glRenderer,version:this._glVersion}},_0xb82ccc.prototype.setHardwareScalingLevel=function(e){this._hardwareScalingLevel=e,this.resize()},_0xb82ccc.prototype.getHardwareScalingLevel=function(){return this._hardwareScalingLevel},_0xb82ccc.prototype.getLoadedTexturesCache=function(){return this._internalTexturesCache},_0xb82ccc.prototype.getCaps=function(){return this._caps},_0xb82ccc.prototype.stopRenderLoop=function(e){if(e){var t=this._activeRenderLoops.indexOf(e);t>=0&&this._activeRenderLoops.splice(t,1)}else this._activeRenderLoops=[]},_0xb82ccc.prototype._renderLoop=function(){if(!this._contextWasLost){var e=!0;if(!this.renderEvenInBackground&&this._windowIsBackground&&(e=!1),e){this.beginFrame();for(var t=0;t<this._activeRenderLoops.length;t++){(0,this._activeRenderLoops[t])()}this.endFrame()}}this._activeRenderLoops.length>0?this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},_0xb82ccc.prototype.getRenderingCanvas=function(){return this._renderingCanvas},_0xb82ccc.prototype.getAudioContext=function(){return this._audioContext},_0xb82ccc.prototype.getAudioDestination=function(){return this._audioDestination},_0xb82ccc.prototype.getHostWindow=function(){return IsWindowObjectExist()?this._renderingCanvas&&this._renderingCanvas.ownerDocument&&this._renderingCanvas.ownerDocument.defaultView?this._renderingCanvas.ownerDocument.defaultView:window:null},_0xb82ccc.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth},_0xb82ccc.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight},_0xb82ccc.prototype._queueNewFrame=function(e,t){return _0xb82ccc.QueueNewFrame(e,t)},_0xb82ccc.prototype.runRenderLoop=function(e){-1===this._activeRenderLoops.indexOf(e)&&(this._activeRenderLoops.push(e),!this._renderingQueueLaunched&&(this._renderingQueueLaunched=!0,this._boundRenderFunction=this._renderLoop.bind(this),this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow())))},_0xb82ccc.prototype.clear=function(e,t,i,n){void 0===n&&(n=!1);var r=this.stencilStateComposer.useStencilGlobalOnly;this.stencilStateComposer.useStencilGlobalOnly=!0,this.applyStates(),this.stencilStateComposer.useStencilGlobalOnly=r;var o=0;t&&e&&(this._gl.clearColor(e.r,e.g,e.b,void 0!==e.a?e.a:1),o|=this._gl.COLOR_BUFFER_BIT),i&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GEQUAL,this._gl.clearDepth(0)):this._gl.clearDepth(1),o|=this._gl.DEPTH_BUFFER_BIT),n&&(this._gl.clearStencil(0),o|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(o)},_0xb82ccc.prototype._viewport=function(e,t,i,n){(e!==this._viewportCached.x||t!==this._viewportCached.y||i!==this._viewportCached.z||n!==this._viewportCached.w)&&(this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=i,this._viewportCached.w=n,this._gl.viewport(e,t,i,n))},_0xb82ccc.prototype.setViewport=function(e,t,i){var n=t||this.getRenderWidth(),r=i||this.getRenderHeight(),o=e.x||0,a=e.y||0;this._cachedViewport=e,this._viewport(o*n,a*r,n*e.width,r*e.height)},_0xb82ccc.prototype.beginFrame=function(){},_0xb82ccc.prototype.endFrame=function(){this._badOS&&this.flushFramebuffer(),this._frameId++},_0xb82ccc.prototype.resize=function(e){var t,i;if(void 0===e&&(e=!1),this._adaptToDeviceRatio){var n=IsWindowObjectExist()&&window.devicePixelRatio||1,r=this._creationOptions.limitDeviceRatio||n;this._hardwareScalingLevel=this._adaptToDeviceRatio?1/Math.min(r,n):1}IsWindowObjectExist()?(t=this._renderingCanvas?this._renderingCanvas.clientWidth||this._renderingCanvas.width:window.innerWidth,i=this._renderingCanvas?this._renderingCanvas.clientHeight||this._renderingCanvas.height:window.innerHeight):(t=this._renderingCanvas?this._renderingCanvas.width:100,i=this._renderingCanvas?this._renderingCanvas.height:100),this.setSize(t/this._hardwareScalingLevel,i/this._hardwareScalingLevel,e)},_0xb82ccc.prototype.setSize=function(e,t,i){return void 0===i&&(i=!1),!!this._renderingCanvas&&(e|=0,t|=0,!(!i&&this._renderingCanvas.width===e&&this._renderingCanvas.height===t)&&(this._renderingCanvas.width=e,this._renderingCanvas.height=t,!0))},_0xb82ccc.prototype.bindFramebuffer=function(e,t,i,n,r,o,a){var s,l,u,c,h;void 0===t&&(t=0),void 0===o&&(o=0),void 0===a&&(a=0);var d=e;this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._bindUnboundFramebuffer(d._MSAAFramebuffer?d._MSAAFramebuffer:d._framebuffer);var f=this._gl;e.is2DArray?f.framebufferTextureLayer(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,null===(s=e.texture._hardwareTexture)||void 0===s?void 0:s.underlyingResource,o,a):e.isCube&&f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_CUBE_MAP_POSITIVE_X+t,null===(l=e.texture._hardwareTexture)||void 0===l?void 0:l.underlyingResource,o);var p=e._depthStencilTexture;if(p){var _=e._depthStencilTextureWithStencil?f.DEPTH_STENCIL_ATTACHMENT:f.DEPTH_ATTACHMENT;e.is2DArray?f.framebufferTextureLayer(f.FRAMEBUFFER,_,null===(u=p._hardwareTexture)||void 0===u?void 0:u.underlyingResource,o,a):e.isCube?f.framebufferTexture2D(f.FRAMEBUFFER,_,f.TEXTURE_CUBE_MAP_POSITIVE_X+t,null===(c=p._hardwareTexture)||void 0===c?void 0:c.underlyingResource,o):f.framebufferTexture2D(f.FRAMEBUFFER,_,f.TEXTURE_2D,null===(h=p._hardwareTexture)||void 0===h?void 0:h.underlyingResource,o)}this._cachedViewport&&!r?this.setViewport(this._cachedViewport,i,n):(!i&&(i=e.width,o&&(i/=Math.pow(2,o))),!n&&(n=e.height,o&&(n/=Math.pow(2,o))),this._viewport(0,0,i,n)),this.wipeCaches()},_0xb82ccc.prototype.setState=function(e,t,i,n,r,o,a){var s,l;void 0===t&&(t=0),void 0===n&&(n=!1),void 0===a&&(a=0),(this._depthCullingState.cull!==e||i)&&(this._depthCullingState.cull=e);var u=null===(l=null!==(s=this.cullBackFaces)&&void 0!==s?s:r)||void 0===l||l?this._gl.BACK:this._gl.FRONT;(this._depthCullingState.cullFace!==u||i)&&(this._depthCullingState.cullFace=u),this.setZOffset(t),this.setZOffsetUnits(a);var c=n?this._gl.CW:this._gl.CCW;(this._depthCullingState.frontFace!==c||i)&&(this._depthCullingState.frontFace=c),this._stencilStateComposer.stencilMaterial=o},_0xb82ccc.prototype.setZOffset=function(e){this._depthCullingState.zOffset=this.useReverseDepthBuffer?-e:e},_0xb82ccc.prototype.getZOffset=function(){var e=this._depthCullingState.zOffset;return this.useReverseDepthBuffer?-e:e},_0xb82ccc.prototype.setZOffsetUnits=function(e){this._depthCullingState.zOffsetUnits=this.useReverseDepthBuffer?-e:e},_0xb82ccc.prototype.getZOffsetUnits=function(){var e=this._depthCullingState.zOffsetUnits;return this.useReverseDepthBuffer?-e:e},_0xb82ccc.prototype._bindUnboundFramebuffer=function(e){this._currentFramebuffer!==e&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,e),this._currentFramebuffer=e)},_0xb82ccc.prototype._currentFrameBufferIsDefaultFrameBuffer=function(){return null===this._currentFramebuffer},_0xb82ccc.prototype.generateMipmaps=function(e){this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)},_0xb82ccc.prototype.unBindFramebuffer=function(e,t,i){var n;void 0===t&&(t=!1);var r=e;this._currentRenderTarget=null;var o=this._gl;if(r._MSAAFramebuffer){if(e.isMulti)return void this.unBindMultiColorAttachmentFramebuffer(e,t,i);o.bindFramebuffer(o.READ_FRAMEBUFFER,r._MSAAFramebuffer),o.bindFramebuffer(o.DRAW_FRAMEBUFFER,r._framebuffer),o.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,o.COLOR_BUFFER_BIT,o.NEAREST)}(null===(n=e.texture)||void 0===n?void 0:n.generateMipMaps)&&!t&&!e.isCube&&this.generateMipmaps(e.texture),i&&(r._MSAAFramebuffer&&this._bindUnboundFramebuffer(r._framebuffer),i()),this._bindUnboundFramebuffer(null)},_0xb82ccc.prototype.flushFramebuffer=function(){this._gl.flush()},_0xb82ccc.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},_0xb82ccc.prototype._resetVertexBufferBinding=function(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null},_0xb82ccc.prototype.createVertexBuffer=function(e){return this._createVertexBuffer(e,this._gl.STATIC_DRAW)},_0xb82ccc.prototype._createVertexBuffer=function(e,t){var i=this._gl.createBuffer();if(!i)throw new Error("Unable to create vertex buffer");var n=new _Meshes_WebGL_webGLDataBuffer__WEBPACK_IMPORTED_MODULE_14__.WebGLDataBuffer(i);return this.bindArrayBuffer(n),e instanceof Array?this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),t):this._gl.bufferData(this._gl.ARRAY_BUFFER,e,t),this._resetVertexBufferBinding(),n.references=1,n},_0xb82ccc.prototype.createDynamicVertexBuffer=function(e){return this._createVertexBuffer(e,this._gl.DYNAMIC_DRAW)},_0xb82ccc.prototype._resetIndexBufferBinding=function(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null},_0xb82ccc.prototype.createIndexBuffer=function(e,t){var i=this._gl.createBuffer(),n=new _Meshes_WebGL_webGLDataBuffer__WEBPACK_IMPORTED_MODULE_14__.WebGLDataBuffer(i);if(!i)throw new Error("Unable to create index buffer");this.bindIndexBuffer(n);var r=this._normalizeIndexData(e);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,r,t?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),n.references=1,n.is32Bits=4===r.BYTES_PER_ELEMENT,n},_0xb82ccc.prototype._normalizeIndexData=function(e){if(2===e.BYTES_PER_ELEMENT)return e;if(this._caps.uintIndices){if(e instanceof Uint32Array)return e;for(var t=0;t<e.length;t++)if(e[t]>=65535)return new Uint32Array(e);return new Uint16Array(e)}return new Uint16Array(e)},_0xb82ccc.prototype.bindArrayBuffer=function(e){!this._vaoRecordInProgress&&this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ARRAY_BUFFER)},_0xb82ccc.prototype.bindUniformBlock=function(e,t,i){var n=e.program,r=this._gl.getUniformBlockIndex(n,t);this._gl.uniformBlockBinding(n,r,i)},_0xb82ccc.prototype.bindIndexBuffer=function(e){!this._vaoRecordInProgress&&this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ELEMENT_ARRAY_BUFFER)},_0xb82ccc.prototype._bindBuffer=function(e,t){(this._vaoRecordInProgress||this._currentBoundBuffer[t]!==e)&&(this._gl.bindBuffer(t,e?e.underlyingResource:null),this._currentBoundBuffer[t]=e)},_0xb82ccc.prototype.updateArrayBuffer=function(e){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,e)},_0xb82ccc.prototype._vertexAttribPointer=function(e,t,i,n,r,o,a){var s=this._currentBufferPointers[t];if(s){var l=!1;s.active?(s.buffer!==e&&(s.buffer=e,l=!0),s.size!==i&&(s.size=i,l=!0),s.type!==n&&(s.type=n,l=!0),s.normalized!==r&&(s.normalized=r,l=!0),s.stride!==o&&(s.stride=o,l=!0),s.offset!==a&&(s.offset=a,l=!0)):(l=!0,s.active=!0,s.index=t,s.size=i,s.type=n,s.normalized=r,s.stride=o,s.offset=a,s.buffer=e),(l||this._vaoRecordInProgress)&&(this.bindArrayBuffer(e),this._gl.vertexAttribPointer(t,i,n,r,o,a))}},_0xb82ccc.prototype._bindIndexBufferWithCache=function(e){null!=e&&this._cachedIndexBuffer!==e&&(this._cachedIndexBuffer=e,this.bindIndexBuffer(e),this._uintIndicesCurrentlySet=e.is32Bits)},_0xb82ccc.prototype._bindVertexBuffersAttributes=function(e,t,i){var n=t.getAttributesNames();!this._vaoRecordInProgress&&this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var r=0;r<n.length;r++){var o=t.getAttributeLocation(r);if(o>=0){var a=n[r],s=null;if(i&&(s=i[a]),!s&&(s=e[a]),!s)continue;this._gl.enableVertexAttribArray(o),!this._vaoRecordInProgress&&(this._vertexAttribArraysEnabled[o]=!0);var l=s.getBuffer();l&&(this._vertexAttribPointer(l,o,s.getSize(),s.type,s.normalized,s.byteStride,s.byteOffset),s.getIsInstanced()&&(this._gl.vertexAttribDivisor(o,s.getInstanceDivisor()),!this._vaoRecordInProgress&&(this._currentInstanceLocations.push(o),this._currentInstanceBuffers.push(l))))}}},_0xb82ccc.prototype.recordVertexArrayObject=function(e,t,i,n){var r=this._gl.createVertexArray();return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(r),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(e,i,n),this.bindIndexBuffer(t),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),r},_0xb82ccc.prototype.bindVertexArrayObject=function(e,t){this._cachedVertexArrayObject!==e&&(this._cachedVertexArrayObject=e,this._gl.bindVertexArray(e),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=null!=t&&t.is32Bits,this._mustWipeVertexAttributes=!0)},_0xb82ccc.prototype.bindBuffersDirectly=function(e,t,i,n,r){if(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==r){this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=r;var o=r.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var a=0,s=0;s<o;s++)if(s<i.length){var l=r.getAttributeLocation(s);l>=0&&(this._gl.enableVertexAttribArray(l),this._vertexAttribArraysEnabled[l]=!0,this._vertexAttribPointer(e,l,i[s],this._gl.FLOAT,!1,n,a)),a+=4*i[s]}}this._bindIndexBufferWithCache(t)},_0xb82ccc.prototype._unbindVertexArrayObject=function(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))},_0xb82ccc.prototype.bindBuffers=function(e,t,i,n){(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==i)&&(this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=i,this._bindVertexBuffersAttributes(e,i,n)),this._bindIndexBufferWithCache(t)},_0xb82ccc.prototype.unbindInstanceAttributes=function(){for(var e,t=0,i=this._currentInstanceLocations.length;t<i;t++){var n=this._currentInstanceBuffers[t];e!=n&&n.references&&(e=n,this.bindArrayBuffer(n));var r=this._currentInstanceLocations[t];this._gl.vertexAttribDivisor(r,0)}this._currentInstanceBuffers.length=0,this._currentInstanceLocations.length=0},_0xb82ccc.prototype.releaseVertexArrayObject=function(e){this._gl.deleteVertexArray(e)},_0xb82ccc.prototype._releaseBuffer=function(e){return e.references--,0===e.references&&(this._deleteBuffer(e),!0)},_0xb82ccc.prototype._deleteBuffer=function(e){this._gl.deleteBuffer(e.underlyingResource)},_0xb82ccc.prototype.updateAndBindInstancesBuffer=function(e,t,i){if(this.bindArrayBuffer(e),t&&this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t),void 0!==i[0].index)this.bindInstancesBuffer(e,i,!0);else for(var n=0;n<4;n++){var r=i[n];!this._vertexAttribArraysEnabled[r]&&(this._gl.enableVertexAttribArray(r),this._vertexAttribArraysEnabled[r]=!0),this._vertexAttribPointer(e,r,4,this._gl.FLOAT,!1,64,16*n),this._gl.vertexAttribDivisor(r,1),this._currentInstanceLocations.push(r),this._currentInstanceBuffers.push(e)}},_0xb82ccc.prototype.bindInstancesBuffer=function(e,t,i){void 0===i&&(i=!0),this.bindArrayBuffer(e);var n=0;if(i)for(var r=0;r<t.length;r++){n+=4*(o=t[r]).attributeSize}for(r=0;r<t.length;r++){var o;void 0===(o=t[r]).index&&(o.index=this._currentEffect.getAttributeLocationByName(o.attributeName)),o.index<0||(!this._vertexAttribArraysEnabled[o.index]&&(this._gl.enableVertexAttribArray(o.index),this._vertexAttribArraysEnabled[o.index]=!0),this._vertexAttribPointer(e,o.index,o.attributeSize,o.attributeType||this._gl.FLOAT,o.normalized||!1,n,o.offset),this._gl.vertexAttribDivisor(o.index,void 0===o.divisor?1:o.divisor),this._currentInstanceLocations.push(o.index),this._currentInstanceBuffers.push(e))}},_0xb82ccc.prototype.disableInstanceAttributeByName=function(e){if(this._currentEffect){var t=this._currentEffect.getAttributeLocationByName(e);this.disableInstanceAttribute(t)}},_0xb82ccc.prototype.disableInstanceAttribute=function(e){for(var t,i=!1;-1!==(t=this._currentInstanceLocations.indexOf(e));)this._currentInstanceLocations.splice(t,1),this._currentInstanceBuffers.splice(t,1),i=!0,t=this._currentInstanceLocations.indexOf(e);i&&(this._gl.vertexAttribDivisor(e,0),this.disableAttributeByIndex(e))},_0xb82ccc.prototype.disableAttributeByIndex=function(e){this._gl.disableVertexAttribArray(e),this._vertexAttribArraysEnabled[e]=!1,this._currentBufferPointers[e].active=!1},_0xb82ccc.prototype.draw=function(e,t,i,n){this.drawElementsType(e?_0x354cf8.MATERIAL_TriangleFillMode:_0x354cf8.MATERIAL_WireFrameFillMode,t,i,n)},_0xb82ccc.prototype.drawPointClouds=function(e,t,i){this.drawArraysType(_0x354cf8.MATERIAL_PointFillMode,e,t,i)},_0xb82ccc.prototype.drawUnIndexed=function(e,t,i,n){this.drawArraysType(e?_0x354cf8.MATERIAL_TriangleFillMode:_0x354cf8.MATERIAL_WireFrameFillMode,t,i,n)},_0xb82ccc.prototype.drawElementsType=function(e,t,i,n){this.applyStates(),this._reportDrawCall();var r=this._drawMode(e),o=this._uintIndicesCurrentlySet?this._gl.UNSIGNED_INT:this._gl.UNSIGNED_SHORT,a=this._uintIndicesCurrentlySet?4:2;n?this._gl.drawElementsInstanced(r,i,o,t*a,n):this._gl.drawElements(r,i,o,t*a)},_0xb82ccc.prototype.drawArraysType=function(e,t,i,n){this.applyStates(),this._reportDrawCall();var r=this._drawMode(e);n?this._gl.drawArraysInstanced(r,t,i,n):this._gl.drawArrays(r,t,i)},_0xb82ccc.prototype._drawMode=function(e){switch(e){case _0x354cf8.MATERIAL_TriangleFillMode:return this._gl.TRIANGLES;case _0x354cf8.MATERIAL_PointFillMode:return this._gl.POINTS;case _0x354cf8.MATERIAL_WireFrameFillMode:return this._gl.LINES;case _0x354cf8.MATERIAL_PointListDrawMode:return this._gl.POINTS;case _0x354cf8.MATERIAL_LineListDrawMode:return this._gl.LINES;case _0x354cf8.MATERIAL_LineLoopDrawMode:return this._gl.LINE_LOOP;case _0x354cf8.MATERIAL_LineStripDrawMode:return this._gl.LINE_STRIP;case _0x354cf8.MATERIAL_TriangleStripDrawMode:return this._gl.TRIANGLE_STRIP;case _0x354cf8.MATERIAL_TriangleFanDrawMode:return this._gl.TRIANGLE_FAN;default:return this._gl.TRIANGLES}},_0xb82ccc.prototype._reportDrawCall=function(){},_0xb82ccc.prototype._releaseEffect=function(e){if(this._compiledEffects[e._key]){delete this._compiledEffects[e._key];var t=e.getPipelineContext();t&&this._deletePipelineContext(t)}},_0xb82ccc.prototype._deletePipelineContext=function(e){var t=e;t&&t.program&&(t.program.__SPECTOR_rebuildProgram=null,this._gl.deleteProgram(t.program))},_0xb82ccc.prototype._getGlobalDefines=function(e){if(e)return this.isNDCHalfZRange?e.IS_NDC_HALF_ZRANGE="":delete e.IS_NDC_HALF_ZRANGE,void(this.useReverseDepthBuffer?e.USE_REVERSE_DEPTHBUFFER="":delete e.USE_REVERSE_DEPTHBUFFER);var t="";return this.isNDCHalfZRange&&(t+="#define IS_NDC_HALF_ZRANGE"),this.useReverseDepthBuffer&&(t&&(t+="\n"),t+="#define USE_REVERSE_DEPTHBUFFER"),t},_0xb82ccc.prototype.createEffect=function(e,t,i,n,r,o,a,s,l,u){var c;void 0===u&&(u=_Materials_shaderLanguage__WEBPACK_IMPORTED_MODULE_20__.ShaderLanguage.GLSL);var h=e.vertexElement||e.vertex||e.vertexToken||e.vertexSource||e,d=e.fragmentElement||e.fragment||e.fragmentToken||e.fragmentSource||e,f=this._getGlobalDefines(),p=null!==(c=null!=r?r:t.defines)&&void 0!==c?c:"";f&&(p+=f);var _=h+"+"+d+"@"+p;if(this._compiledEffects[_]){var m=this._compiledEffects[_];return a&&m.isReady()&&a(m),m}var g=new _Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect(e,t,i,n,this,r,o,a,s,l,_,u);return this._compiledEffects[_]=g,g},_0xb82ccc._ConcatenateShader=function(e,t,i){return void 0===i&&(i=""),i+(t?t+"\n":"")+e},_0xb82ccc.prototype._compileShader=function(e,t,i,n){return this._compileRawShader(_0xb82ccc._ConcatenateShader(e,i,n),t)},_0xb82ccc.prototype._compileRawShader=function(e,t){var i=this._gl,n=i.createShader("vertex"===t?i.VERTEX_SHADER:i.FRAGMENT_SHADER);if(!n){for(var r=i.NO_ERROR,o=i.NO_ERROR;(o=i.getError())!==i.NO_ERROR;)r=o;throw new Error("Something went wrong while creating a gl ".concat(t," shader object. gl error=").concat(r,", gl isContextLost=").concat(i.isContextLost(),", _contextWasLost=").concat(this._contextWasLost))}return i.shaderSource(n,e),i.compileShader(n),n},_0xb82ccc.prototype._getShaderSource=function(e){return this._gl.getShaderSource(e)},_0xb82ccc.prototype.createRawShaderProgram=function(e,t,i,n,r){void 0===r&&(r=null),n=n||this._gl;var o=this._compileRawShader(t,"vertex"),a=this._compileRawShader(i,"fragment");return this._createShaderProgram(e,o,a,n,r)},_0xb82ccc.prototype.createShaderProgram=function(e,t,i,n,r,o){void 0===o&&(o=null),r=r||this._gl;var a=this._webGLVersion>1?"#version 300 es\n#define WEBGL2 \n":"",s=this._compileShader(t,"vertex",n,a),l=this._compileShader(i,"fragment",n,a);return this._createShaderProgram(e,s,l,r,o)},_0xb82ccc.prototype.inlineShaderCode=function(e){return e},_0xb82ccc.prototype.createPipelineContext=function(e){var t=new _WebGL_webGLPipelineContext__WEBPACK_IMPORTED_MODULE_15__.WebGLPipelineContext;return t.engine=this,this._caps.parallelShaderCompile&&(t.isParallelCompiled=!0),t},_0xb82ccc.prototype.createMaterialContext=function(){},_0xb82ccc.prototype.createDrawContext=function(){},_0xb82ccc.prototype._createShaderProgram=function(e,t,i,n,r){var o=n.createProgram();if(e.program=o,!o)throw new Error("Unable to create program");return n.attachShader(o,t),n.attachShader(o,i),n.linkProgram(o),e.context=n,e.vertexShader=t,e.fragmentShader=i,!e.isParallelCompiled&&this._finalizePipelineContext(e),o},_0xb82ccc.prototype._finalizePipelineContext=function(e){var t=e.context,i=e.vertexShader,n=e.fragmentShader,r=e.program;if(!t.getProgramParameter(r,t.LINK_STATUS)){var o,a;if(!this._gl.getShaderParameter(i,this._gl.COMPILE_STATUS))if(o=this._gl.getShaderInfoLog(i))throw e.vertexCompilationError=o,new Error("VERTEX SHADER "+o);if(!this._gl.getShaderParameter(n,this._gl.COMPILE_STATUS))if(o=this._gl.getShaderInfoLog(n))throw e.fragmentCompilationError=o,new Error("FRAGMENT SHADER "+o);if(a=t.getProgramInfoLog(r))throw e.programLinkError=a,new Error(a)}if(this.validateShaderPrograms&&(t.validateProgram(r),!t.getProgramParameter(r,t.VALIDATE_STATUS)&&(a=t.getProgramInfoLog(r))))throw e.programValidationError=a,new Error(a);t.deleteShader(i),t.deleteShader(n),e.vertexShader=void 0,e.fragmentShader=void 0,e.onCompiled&&(e.onCompiled(),e.onCompiled=void 0)},_0xb82ccc.prototype._preparePipelineContext=function(e,t,i,n,r,o,a,s,l,u){var c=e;c.program=n?this.createRawShaderProgram(c,t,i,void 0,l):this.createShaderProgram(c,t,i,s,void 0,l),c.program.__SPECTOR_rebuildProgram=a},_0xb82ccc.prototype._isRenderingStateCompiled=function(e){var t=e;return!!this._gl.getProgramParameter(t.program,this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)&&(this._finalizePipelineContext(t),!0)},_0xb82ccc.prototype._executeWhenRenderingStateIsCompiled=function(e,t){var i=e;if(i.isParallelCompiled){var n=i.onCompiled;i.onCompiled=n?function(){n(),t()}:t}else t()},_0xb82ccc.prototype.getUniforms=function(e,t){for(var i=new Array,n=e,r=0;r<t.length;r++)i.push(this._gl.getUniformLocation(n.program,t[r]));return i},_0xb82ccc.prototype.getAttributes=function(e,t){for(var i=[],n=e,r=0;r<t.length;r++)try{i.push(this._gl.getAttribLocation(n.program,t[r]))}catch(e){i.push(-1)}return i},_0xb82ccc.prototype.enableEffect=function(e){(e=null!==e&&_Materials_drawWrapper__WEBPACK_IMPORTED_MODULE_18__.DrawWrapper.IsWrapper(e)?e.effect:e)&&e!==this._currentEffect&&(this._stencilStateComposer.stencilMaterial=void 0,e=e,this.bindSamplers(e),this._currentEffect=e,e.onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e))},_0xb82ccc.prototype.setInt=function(e,t){return!!e&&(this._gl.uniform1i(e,t),!0)},_0xb82ccc.prototype.setInt2=function(e,t,i){return!!e&&(this._gl.uniform2i(e,t,i),!0)},_0xb82ccc.prototype.setInt3=function(e,t,i,n){return!!e&&(this._gl.uniform3i(e,t,i,n),!0)},_0xb82ccc.prototype.setInt4=function(e,t,i,n,r){return!!e&&(this._gl.uniform4i(e,t,i,n,r),!0)},_0xb82ccc.prototype.setIntArray=function(e,t){return!!e&&(this._gl.uniform1iv(e,t),!0)},_0xb82ccc.prototype.setIntArray2=function(e,t){return!(!e||t.length%2!=0)&&(this._gl.uniform2iv(e,t),!0)},_0xb82ccc.prototype.setIntArray3=function(e,t){return!(!e||t.length%3!=0)&&(this._gl.uniform3iv(e,t),!0)},_0xb82ccc.prototype.setIntArray4=function(e,t){return!(!e||t.length%4!=0)&&(this._gl.uniform4iv(e,t),!0)},_0xb82ccc.prototype.setArray=function(e,t){return!!e&&(!(t.length<1)&&(this._gl.uniform1fv(e,t),!0))},_0xb82ccc.prototype.setArray2=function(e,t){return!(!e||t.length%2!=0)&&(this._gl.uniform2fv(e,t),!0)},_0xb82ccc.prototype.setArray3=function(e,t){return!(!e||t.length%3!=0)&&(this._gl.uniform3fv(e,t),!0)},_0xb82ccc.prototype.setArray4=function(e,t){return!(!e||t.length%4!=0)&&(this._gl.uniform4fv(e,t),!0)},_0xb82ccc.prototype.setMatrices=function(e,t){return!!e&&(this._gl.uniformMatrix4fv(e,!1,t),!0)},_0xb82ccc.prototype.setMatrix3x3=function(e,t){return!!e&&(this._gl.uniformMatrix3fv(e,!1,t),!0)},_0xb82ccc.prototype.setMatrix2x2=function(e,t){return!!e&&(this._gl.uniformMatrix2fv(e,!1,t),!0)},_0xb82ccc.prototype.setFloat=function(e,t){return!!e&&(this._gl.uniform1f(e,t),!0)},_0xb82ccc.prototype.setFloat2=function(e,t,i){return!!e&&(this._gl.uniform2f(e,t,i),!0)},_0xb82ccc.prototype.setFloat3=function(e,t,i,n){return!!e&&(this._gl.uniform3f(e,t,i,n),!0)},_0xb82ccc.prototype.setFloat4=function(e,t,i,n,r){return!!e&&(this._gl.uniform4f(e,t,i,n,r),!0)},_0xb82ccc.prototype.applyStates=function(){if(this._depthCullingState.apply(this._gl),this._stencilStateComposer.apply(this._gl),this._alphaState.apply(this._gl),this._colorWriteChanged){this._colorWriteChanged=!1;var e=this._colorWrite;this._gl.colorMask(e,e,e,e)}},_0xb82ccc.prototype.setColorWrite=function(e){e!==this._colorWrite&&(this._colorWriteChanged=!0,this._colorWrite=e)},_0xb82ccc.prototype.getColorWrite=function(){return this._colorWrite},Object.defineProperty(_0xb82ccc.prototype,"depthCullingState",{get:function(){return this._depthCullingState},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"alphaState",{get:function(){return this._alphaState},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"stencilState",{get:function(){return this._stencilState},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc.prototype,"stencilStateComposer",{get:function(){return this._stencilStateComposer},enumerable:!1,configurable:!0}),_0xb82ccc.prototype.clearInternalTexturesCache=function(){this._internalTexturesCache=[]},_0xb82ccc.prototype.wipeCaches=function(e){this.preventCacheWipeBetweenFrames&&!e||(this._currentEffect=null,this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0,this._unbindVertexArrayObject(),e&&(this._currentProgram=null,this.resetTextureCache(),this._stencilStateComposer.reset(),this._depthCullingState.reset(),this._depthCullingState.depthFunc=this._gl.LEQUAL,this._alphaState.reset(),this._alphaMode=_0x354cf8.ALPHA_ADD,this._alphaEquation=_0x354cf8.ALPHA_DISABLE,this._colorWrite=!0,this._colorWriteChanged=!0,this._unpackFlipYCached=null,this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),this._mustWipeVertexAttributes=!0,this.unbindAllAttributes()),this._resetVertexBufferBinding(),this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null,this.bindIndexBuffer(null))},_0xb82ccc.prototype._getSamplingParameters=function(e,t){var i=this._gl,n=i.NEAREST,r=i.NEAREST;switch(e){case _0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST:n=i.LINEAR,r=t?i.LINEAR_MIPMAP_NEAREST:i.LINEAR;break;case _0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR:n=i.LINEAR,r=t?i.LINEAR_MIPMAP_LINEAR:i.LINEAR;break;case _0x354cf8.TEXTURE_NEAREST_NEAREST_MIPLINEAR:n=i.NEAREST,r=t?i.NEAREST_MIPMAP_LINEAR:i.NEAREST;break;case _0x354cf8.TEXTURE_NEAREST_NEAREST_MIPNEAREST:n=i.NEAREST,r=t?i.NEAREST_MIPMAP_NEAREST:i.NEAREST;break;case _0x354cf8.TEXTURE_NEAREST_LINEAR_MIPNEAREST:n=i.NEAREST,r=t?i.LINEAR_MIPMAP_NEAREST:i.LINEAR;break;case _0x354cf8.TEXTURE_NEAREST_LINEAR_MIPLINEAR:n=i.NEAREST,r=t?i.LINEAR_MIPMAP_LINEAR:i.LINEAR;break;case _0x354cf8.TEXTURE_NEAREST_LINEAR:n=i.NEAREST,r=i.LINEAR;break;case _0x354cf8.TEXTURE_NEAREST_NEAREST:n=i.NEAREST,r=i.NEAREST;break;case _0x354cf8.TEXTURE_LINEAR_NEAREST_MIPNEAREST:n=i.LINEAR,r=t?i.NEAREST_MIPMAP_NEAREST:i.NEAREST;break;case _0x354cf8.TEXTURE_LINEAR_NEAREST_MIPLINEAR:n=i.LINEAR,r=t?i.NEAREST_MIPMAP_LINEAR:i.NEAREST;break;case _0x354cf8.TEXTURE_LINEAR_LINEAR:n=i.LINEAR,r=i.LINEAR;break;case _0x354cf8.TEXTURE_LINEAR_NEAREST:n=i.LINEAR,r=i.NEAREST}return{min:r,mag:n}},_0xb82ccc.prototype._createTexture=function(){var e=this._gl.createTexture();if(!e)throw new Error("Unable to create texture");return e},_0xb82ccc.prototype._createHardwareTexture=function(){return new _WebGL_webGLHardwareTexture__WEBPACK_IMPORTED_MODULE_17__.WebGLHardwareTexture(this._createTexture(),this._gl)},_0xb82ccc.prototype._createInternalTexture=function(e,t,i,n){void 0===n&&(n=InternalTextureSource.Unknown);var r={};void 0!==t&&"object"==typeof t?(r.generateMipMaps=t.generateMipMaps,r.type=void 0===t.type?_0x354cf8.TEXTURETYPE_UNSIGNED_INT:t.type,r.samplingMode=void 0===t.samplingMode?_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,r.format=void 0===t.format?_0x354cf8.TEXTUREFORMAT_RGBA:t.format,r.useSRGBBuffer=void 0!==t.useSRGBBuffer&&t.useSRGBBuffer):(r.generateMipMaps=t,r.type=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,r.samplingMode=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE,r.format=_0x354cf8.TEXTUREFORMAT_RGBA,r.useSRGBBuffer=!1),r.useSRGBBuffer=r.useSRGBBuffer&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU),r.type!==_0x354cf8.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?r.type===_0x354cf8.TEXTURETYPE_HALF_FLOAT&&!this._caps.textureHalfFloatLinearFiltering&&(r.samplingMode=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE):r.samplingMode=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,r.type===_0x354cf8.TEXTURETYPE_FLOAT&&!this._caps.textureFloat&&(r.type=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,_0x41154e.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));var o=this._gl,a=new InternalTexture(this,n);a._useSRGBBuffer=!!r.useSRGBBuffer;var s=e.width||e,l=e.height||e,u=e.layers||0,c=this._getSamplingParameters(r.samplingMode,!!r.generateMipMaps),h=0!==u?o.TEXTURE_2D_ARRAY:o.TEXTURE_2D,d=this._getRGBABufferInternalSizedFormat(r.type,r.format,r.useSRGBBuffer),f=this._getInternalFormat(r.format),p=this._getWebGLTextureType(r.type);return this._bindTextureDirectly(h,a),0!==u?(a.is2DArray=!0,o.texImage3D(h,0,d,s,l,u,0,f,p,null)):o.texImage2D(h,0,d,s,l,0,f,p,null),o.texParameteri(h,o.TEXTURE_MAG_FILTER,c.mag),o.texParameteri(h,o.TEXTURE_MIN_FILTER,c.min),o.texParameteri(h,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(h,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),r.generateMipMaps&&this._gl.generateMipmap(h),this._bindTextureDirectly(h,null),a.baseWidth=s,a.baseHeight=l,a.width=s,a.height=l,a.depth=u,a.isReady=!0,a.samples=1,a.generateMipMaps=!!r.generateMipMaps,a.samplingMode=r.samplingMode,a.type=r.type,a.format=r.format,this._internalTexturesCache.push(a),a},_0xb82ccc.prototype._getUseSRGBBuffer=function(e,t){return e&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU||t)},_0xb82ccc.prototype._createTextureBase=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=this;void 0===r&&(r=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===u&&(u=null),void 0===c&&(c=null),void 0===h&&(h=null),void 0===d&&(d=null);var g="data:"===(e=e||"").substr(0,5),x="blob:"===e.substr(0,5),v=g&&-1!==e.indexOf(";base64,"),y=c||new InternalTexture(this,InternalTextureSource.Url),$=e;this._transformTextureUrl&&!v&&!c&&!u&&(e=this._transformTextureUrl(e)),$!==e&&(y._originalUrl=$);var b=e.lastIndexOf("."),T=d||(b>-1?e.substring(b).toLowerCase():""),C=null;T.indexOf("?")>-1&&(T=T.split("?")[0]);for(var S=0,w=_0xb82ccc._TextureLoaders;S<w.length;S++){var E=w[S];if(E.canLoad(T,f)){C=E;break}}n&&n._addPendingData(y),y.url=e,y.generateMipMaps=!t,y.samplingMode=r,y.invertY=i,y._useSRGBBuffer=this._getUseSRGBBuffer(!!_,t),!this._doNotHandleContextLost&&(y._buffer=u);var P=null;o&&!c&&(P=y.onLoadedObservable.add(o)),!c&&this._internalTexturesCache.push(y);var A=function(i,c){n&&n._removePendingData(y),e===$?(P&&y.onLoadedObservable.remove(P),_engineStore__WEBPACK_IMPORTED_MODULE_1__.EngineStore.UseFallbackTexture&&m._createTextureBase(_engineStore__WEBPACK_IMPORTED_MODULE_1__.EngineStore.FallbackTexture,t,y.invertY,n,r,null,a,s,l,u,y),i=(i||"Unknown error")+(_engineStore__WEBPACK_IMPORTED_MODULE_1__.EngineStore.UseFallbackTexture?" - Fallback texture was used":""),y.onErrorObservable.notifyObservers({message:i,exception:c}),a&&a(i,c)):(_0x41154e.Warn("Failed to load ".concat(e,", falling back to ").concat($)),m._createTextureBase($,t,y.invertY,n,r,o,a,s,l,u,y,h,d,f,p,_))};if(C){var L=function(e){C.loadData(e,y,(function(e,t,i,o,a,l){l?A("TextureLoader failed to load data"):s(y,T,n,{width:e,height:t},y.invertY,!i,o,(function(){return a(),!1}),r)}),p)};u?u instanceof ArrayBuffer?L(new Uint8Array(u)):ArrayBuffer.isView(u)?L(u):a&&a("Unable to load: only ArrayBuffer or ArrayBufferView is supported",null):this._loadFile(e,(function(e){return L(new Uint8Array(e))}),void 0,n?n.offlineProvider:void 0,!0,(function(e,t){A("Unable to load "+(e&&e.responseURL,t))}))}else{var M=function(e){x&&!m._doNotHandleContextLost&&(y._buffer=e),s(y,T,n,e,y.invertY,t,!1,l,r)};!g||v?u&&("string"==typeof u.decoding||u.close)&&M(u):"string"==typeof u||u instanceof ArrayBuffer||ArrayBuffer.isView(u)||u instanceof Blob||u&&M(u)}return y},_0xb82ccc.prototype.createTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){var _=this;return void 0===r&&(r=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),this._createTextureBase(e,t,i,n,r,o,a,this._prepareWebGLTexture.bind(this),(function(e,t,i,r,o,a){var s=_._gl,l=i.width===e&&i.height===t,c=u?_._getInternalFormat(u,o._useSRGBBuffer):".jpg"!==r||o._useSRGBBuffer?o._useSRGBBuffer?s.SRGB8_ALPHA8:s.RGBA:s.RGB,h=u?_._getInternalFormat(u):".jpg"!==r||o._useSRGBBuffer?s.RGBA:s.RGB;if(o._useSRGBBuffer&&1===_.webGLVersion&&(h=c),l)return s.texImage2D(s.TEXTURE_2D,0,c,h,s.UNSIGNED_BYTE,i),!1;var d=_._caps.maxTextureSize;if(i.width>d||i.height>d||!_._supportsHardwareTextureRescaling)return _._prepareWorkingCanvas(),!(!_._workingCanvas||!_._workingContext)&&(_._workingCanvas.width=e,_._workingCanvas.height=t,_._workingContext.drawImage(i,0,0,i.width,i.height,0,0,e,t),s.texImage2D(s.TEXTURE_2D,0,c,h,s.UNSIGNED_BYTE,_._workingCanvas),o.width=e,o.height=t,!1);var f=new InternalTexture(_,InternalTextureSource.Temp);return _._bindTextureDirectly(s.TEXTURE_2D,f,!0),s.texImage2D(s.TEXTURE_2D,0,c,h,s.UNSIGNED_BYTE,i),_._rescaleTexture(f,o,n,c,(function(){_._releaseTexture(f),_._bindTextureDirectly(s.TEXTURE_2D,o,!0),a()})),!0}),s,l,u,c,h,d,p)},_0xb82ccc._FileToolsLoadImage=function(e,t,i,n,r,o){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("FileTools")},_0xb82ccc.prototype._rescaleTexture=function(e,t,i,n,r){},_0xb82ccc.prototype.createRawTexture=function(e,t,i,n,r,o,a,s,l,u,c){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0xb82ccc.prototype.createRawCubeTexture=function(e,t,i,n,r,o,a,s){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0xb82ccc.prototype.createRawTexture3D=function(e,t,i,n,r,o,a,s,l,u){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0xb82ccc.prototype.createRawTexture2DArray=function(e,t,i,n,r,o,a,s,l,u){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0xb82ccc.prototype._unpackFlipY=function(e){this._unpackFlipYCached!==e&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,e?1:0),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=e))},_0xb82ccc.prototype._getUnpackAlignement=function(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)},_0xb82ccc.prototype._getTextureTarget=function(e){return e.isCube?this._gl.TEXTURE_CUBE_MAP:e.is3D?this._gl.TEXTURE_3D:e.is2DArray||e.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D},_0xb82ccc.prototype.updateTextureSamplingMode=function(e,t,i){void 0===i&&(i=!1);var n=this._getTextureTarget(t),r=this._getSamplingParameters(e,t.generateMipMaps||i);this._setTextureParameterInteger(n,this._gl.TEXTURE_MAG_FILTER,r.mag,t),this._setTextureParameterInteger(n,this._gl.TEXTURE_MIN_FILTER,r.min),i&&(t.generateMipMaps=!0,this._gl.generateMipmap(n)),this._bindTextureDirectly(n,null),t.samplingMode=e},_0xb82ccc.prototype.updateTextureDimensions=function(e,t,i,n){},_0xb82ccc.prototype.updateTextureWrappingMode=function(e,t,i,n){void 0===i&&(i=null),void 0===n&&(n=null);var r=this._getTextureTarget(e);null!==t&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t),e),e._cachedWrapU=t),null!==i&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(i),e),e._cachedWrapV=i),(e.is2DArray||e.is3D)&&null!==n&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(n),e),e._cachedWrapR=n),this._bindTextureDirectly(r,null)},_0xb82ccc.prototype._setupDepthStencilTexture=function(e,t,i,n,r,o){void 0===o&&(o=1);var a=t.width||t,s=t.height||t,l=t.layers||0;e.baseWidth=a,e.baseHeight=s,e.width=a,e.height=s,e.is2DArray=l>0,e.depth=l,e.isReady=!0,e.samples=o,e.generateMipMaps=!1,e.samplingMode=n?_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE:_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,e.type=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,e._comparisonFunction=r;var u=this._gl,c=this._getTextureTarget(e),h=this._getSamplingParameters(e.samplingMode,!1);u.texParameteri(c,u.TEXTURE_MAG_FILTER,h.mag),u.texParameteri(c,u.TEXTURE_MIN_FILTER,h.min),u.texParameteri(c,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(c,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),0===r?(u.texParameteri(c,u.TEXTURE_COMPARE_FUNC,_0x354cf8.LEQUAL),u.texParameteri(c,u.TEXTURE_COMPARE_MODE,u.NONE)):(u.texParameteri(c,u.TEXTURE_COMPARE_FUNC,r),u.texParameteri(c,u.TEXTURE_COMPARE_MODE,u.COMPARE_REF_TO_TEXTURE))},_0xb82ccc.prototype._uploadCompressedDataToTextureDirectly=function(e,t,i,n,r,o,a){void 0===o&&(o=0),void 0===a&&(a=0);var s=this._gl,l=s.TEXTURE_2D;if(e.isCube&&(l=s.TEXTURE_CUBE_MAP_POSITIVE_X+o),e._useSRGBBuffer)switch(t){case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2:case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL:this._caps.etc2?t=s.COMPRESSED_SRGB8_ETC2:e._useSRGBBuffer=!1;break;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC:this._caps.etc2?t=s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:e._useSRGBBuffer=!1;break;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM:t=s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;break;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4:t=s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;break;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1:this._caps.s3tc_srgb?t=s.COMPRESSED_SRGB_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1:this._caps.s3tc_srgb?t=s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5:this._caps.s3tc_srgb?t=s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:e._useSRGBBuffer=!1;break;default:e._useSRGBBuffer=!1}this._gl.compressedTexImage2D(l,a,t,i,n,0,r)},_0xb82ccc.prototype._uploadDataToTextureDirectly=function(e,t,i,n,r,o){void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=!1);var a=this._gl,s=this._getWebGLTextureType(e.type),l=this._getInternalFormat(e.format),u=void 0===r?this._getRGBABufferInternalSizedFormat(e.type,e.format,e._useSRGBBuffer):this._getInternalFormat(r,e._useSRGBBuffer);this._unpackFlipY(e.invertY);var c=a.TEXTURE_2D;e.isCube&&(c=a.TEXTURE_CUBE_MAP_POSITIVE_X+i);var h=Math.round(Math.log(e.width)*Math.LOG2E),d=Math.round(Math.log(e.height)*Math.LOG2E),f=o?e.width:Math.pow(2,Math.max(h-n,0)),p=o?e.height:Math.pow(2,Math.max(d-n,0));a.texImage2D(c,n,u,f,p,0,l,s,t)},_0xb82ccc.prototype.updateTextureData=function(e,t,i,n,r,o,a,s,l){void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=!1);var u=this._gl,c=this._getWebGLTextureType(e.type),h=this._getInternalFormat(e.format);this._unpackFlipY(e.invertY);var d=u.TEXTURE_2D;e.isCube&&(d=u.TEXTURE_CUBE_MAP_POSITIVE_X+a),this._bindTextureDirectly(d,e,!0),u.texSubImage2D(d,s,i,n,r,o,h,c,t),l&&this._gl.generateMipmap(d),this._bindTextureDirectly(d,null)},_0xb82ccc.prototype._uploadArrayBufferViewToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=this._gl,o=e.isCube?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D;this._bindTextureDirectly(o,e,!0),this._uploadDataToTextureDirectly(e,t,i,n),this._bindTextureDirectly(o,null,!0)},_0xb82ccc.prototype._prepareWebGLTextureContinuation=function(e,t,i,n,r){var o=this._gl;if(o){var a=this._getSamplingParameters(r,!i);o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,a.mag),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,a.min),!i&&!n&&o.generateMipmap(o.TEXTURE_2D),this._bindTextureDirectly(o.TEXTURE_2D,null),t&&t._removePendingData(e),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}},_0xb82ccc.prototype._prepareWebGLTexture=function(e,t,i,n,r,o,a,s,l){var u=this;void 0===l&&(l=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE);var c=this.getCaps().maxTextureSize,h=Math.min(c,this.needPOTTextures?_0xb82ccc.GetExponentOfTwo(n.width,c):n.width),d=Math.min(c,this.needPOTTextures?_0xb82ccc.GetExponentOfTwo(n.height,c):n.height),f=this._gl;f&&(e._hardwareTexture?(this._bindTextureDirectly(f.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===r||!!r),e.baseWidth=n.width,e.baseHeight=n.height,e.width=h,e.height=d,e.isReady=!0,s(h,d,n,t,e,(function(){u._prepareWebGLTextureContinuation(e,i,o,a,l)}))||this._prepareWebGLTextureContinuation(e,i,o,a,l)):i&&i._removePendingData(e))},_0xb82ccc.prototype._setupFramebufferDepthAttachments=function(e,t,i,n,r){void 0===r&&(r=1);var o=this._gl;if(e&&t)return this._createRenderBuffer(i,n,r,o.DEPTH_STENCIL,o.DEPTH24_STENCIL8,o.DEPTH_STENCIL_ATTACHMENT);if(t){var a=o.DEPTH_COMPONENT16;return this._webGLVersion>1&&(a=o.DEPTH_COMPONENT32F),this._createRenderBuffer(i,n,r,a,a,o.DEPTH_ATTACHMENT)}return e?this._createRenderBuffer(i,n,r,o.STENCIL_INDEX8,o.STENCIL_INDEX8,o.STENCIL_ATTACHMENT):null},_0xb82ccc.prototype._createRenderBuffer=function(e,t,i,n,r,o,a){void 0===a&&(a=!0);var s=this._gl,l=s.createRenderbuffer();return s.bindRenderbuffer(s.RENDERBUFFER,l),i>1&&s.renderbufferStorageMultisample?s.renderbufferStorageMultisample(s.RENDERBUFFER,i,r,e,t):s.renderbufferStorage(s.RENDERBUFFER,n,e,t),s.framebufferRenderbuffer(s.FRAMEBUFFER,o,s.RENDERBUFFER,l),a&&s.bindRenderbuffer(s.RENDERBUFFER,null),l},_0xb82ccc.prototype._releaseTexture=function(e){var t;this._deleteTexture(null===(t=e._hardwareTexture)||void 0===t?void 0:t.underlyingResource),this.unbindAllTextures();var i=this._internalTexturesCache.indexOf(e);-1!==i&&this._internalTexturesCache.splice(i,1),e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureLow&&e._lodTextureLow.dispose(),e._irradianceTexture&&e._irradianceTexture.dispose()},_0xb82ccc.prototype._releaseRenderTargetWrapper=function(e){var t=this._renderTargetWrapperCache.indexOf(e);-1!==t&&this._renderTargetWrapperCache.splice(t,1)},_0xb82ccc.prototype._deleteTexture=function(e){e&&this._gl.deleteTexture(e)},_0xb82ccc.prototype._setProgram=function(e){this._currentProgram!==e&&(this._gl.useProgram(e),this._currentProgram=e)},_0xb82ccc.prototype.bindSamplers=function(e){var t=e.getPipelineContext();this._setProgram(t.program);for(var i=e.getSamplers(),n=0;n<i.length;n++){var r=e.getUniform(i[n]);r&&(this._boundUniforms[n]=r)}this._currentEffect=null},_0xb82ccc.prototype._activateCurrentTexture=function(){this._currentTextureChannel!==this._activeChannel&&(this._gl.activeTexture(this._gl.TEXTURE0+this._activeChannel),this._currentTextureChannel=this._activeChannel)},_0xb82ccc.prototype._bindTextureDirectly=function(e,t,i,n){var r,o;void 0===i&&(i=!1),void 0===n&&(n=!1);var a=!1,s=t&&t._associatedChannel>-1;if(i&&s&&(this._activeChannel=t._associatedChannel),this._boundTexturesCache[this._activeChannel]!==t||n){if(this._activateCurrentTexture(),t&&t.isMultiview)throw console.error(e,t),"_bindTextureDirectly called with a multiview texture!";this._gl.bindTexture(e,null!==(o=null===(r=null==t?void 0:t._hardwareTexture)||void 0===r?void 0:r.underlyingResource)&&void 0!==o?o:null),this._boundTexturesCache[this._activeChannel]=t,t&&(t._associatedChannel=this._activeChannel)}else i&&(a=!0,this._activateCurrentTexture());return s&&!i&&this._bindSamplerUniformToChannel(t._associatedChannel,this._activeChannel),a},_0xb82ccc.prototype._bindTexture=function(e,t,i){if(void 0!==e){t&&(t._associatedChannel=e),this._activeChannel=e;var n=t?this._getTextureTarget(t):this._gl.TEXTURE_2D;this._bindTextureDirectly(n,t)}},_0xb82ccc.prototype.unbindAllTextures=function(){for(var e=0;e<this._maxSimultaneousTextures;e++)this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))},_0xb82ccc.prototype.setTexture=function(e,t,i,n){void 0!==e&&(t&&(this._boundUniforms[e]=t),this._setTexture(e,i))},_0xb82ccc.prototype._bindSamplerUniformToChannel=function(e,t){var i=this._boundUniforms[e];i&&i._currentState!==t&&(this._gl.uniform1i(i,t),i._currentState=t)},_0xb82ccc.prototype._getTextureWrapMode=function(e){switch(e){case _0x354cf8.TEXTURE_WRAP_ADDRESSMODE:return this._gl.REPEAT;case _0x354cf8.TEXTURE_CLAMP_ADDRESSMODE:return this._gl.CLAMP_TO_EDGE;case _0x354cf8.TEXTURE_MIRROR_ADDRESSMODE:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT},_0xb82ccc.prototype._setTexture=function(e,t,i,n,r){if(void 0===i&&(i=!1),void 0===n&&(n=!1),!t)return null!=this._boundTexturesCache[e]&&(this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(t.video)this._activeChannel=e,t.update();else if(t.delayLoadState===_0x354cf8.DELAYLOADSTATE_NOTLOADED)return t.delayLoad(),!1;var o;o=n?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!i&&o&&(o._associatedChannel=e);var a=!0;this._boundTexturesCache[e]===o&&(!i&&this._bindSamplerUniformToChannel(o._associatedChannel,e),a=!1),this._activeChannel=e;var s=this._getTextureTarget(o);if(a&&this._bindTextureDirectly(s,o,i),o&&!o.isMultiview){if(o.isCube&&o._cachedCoordinatesMode!==t.coordinatesMode){o._cachedCoordinatesMode=t.coordinatesMode;var l=t.coordinatesMode!==_0x354cf8.TEXTURE_CUBIC_MODE&&t.coordinatesMode!==_0x354cf8.TEXTURE_SKYBOX_MODE?_0x354cf8.TEXTURE_WRAP_ADDRESSMODE:_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE;t.wrapU=l,t.wrapV=l}o._cachedWrapU!==t.wrapU&&(o._cachedWrapU=t.wrapU,this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t.wrapU),o)),o._cachedWrapV!==t.wrapV&&(o._cachedWrapV=t.wrapV,this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(t.wrapV),o)),o.is3D&&o._cachedWrapR!==t.wrapR&&(o._cachedWrapR=t.wrapR,this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(t.wrapR),o)),this._setAnisotropicLevel(s,o,t.anisotropicFilteringLevel)}return!0},_0xb82ccc.prototype.setTextureArray=function(e,t,i,n){if(void 0!==e&&t){(!this._textureUnits||this._textureUnits.length!==i.length)&&(this._textureUnits=new Int32Array(i.length));for(var r=0;r<i.length;r++){var o=i[r].getInternalTexture();o?(this._textureUnits[r]=e+r,o._associatedChannel=e+r):this._textureUnits[r]=-1}this._gl.uniform1iv(t,this._textureUnits);for(var a=0;a<i.length;a++)this._setTexture(this._textureUnits[a],i[a],!0)}},_0xb82ccc.prototype._setAnisotropicLevel=function(e,t,i){var n=this._caps.textureAnisotropicFilterExtension;t.samplingMode!==_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST&&t.samplingMode!==_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR&&t.samplingMode!==_0x354cf8.TEXTURE_LINEAR_LINEAR&&(i=1),n&&t._cachedAnisotropicFilteringLevel!==i&&(this._setTextureParameterFloat(e,n.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(i,this._caps.maxAnisotropy),t),t._cachedAnisotropicFilteringLevel=i)},_0xb82ccc.prototype._setTextureParameterFloat=function(e,t,i,n){this._bindTextureDirectly(e,n,!0,!0),this._gl.texParameterf(e,t,i)},_0xb82ccc.prototype._setTextureParameterInteger=function(e,t,i,n){n&&this._bindTextureDirectly(e,n,!0,!0),this._gl.texParameteri(e,t,i)},_0xb82ccc.prototype.unbindAllAttributes=function(){if(this._mustWipeVertexAttributes){this._mustWipeVertexAttributes=!1;for(var e=0;e<this._caps.maxVertexAttribs;e++)this.disableAttributeByIndex(e)}else{e=0;for(var t=this._vertexAttribArraysEnabled.length;e<t;e++)e>=this._caps.maxVertexAttribs||!this._vertexAttribArraysEnabled[e]||this.disableAttributeByIndex(e)}},_0xb82ccc.prototype.releaseEffects=function(){for(var e in this._compiledEffects){var t=this._compiledEffects[e].getPipelineContext();this._deletePipelineContext(t)}this._compiledEffects={}},_0xb82ccc.prototype.dispose=function(){var e;this.stopRenderLoop(),this.onBeforeTextureInitObservable&&this.onBeforeTextureInitObservable.clear(),this._emptyTexture&&(this._releaseTexture(this._emptyTexture),this._emptyTexture=null),this._emptyCubeTexture&&(this._releaseTexture(this._emptyCubeTexture),this._emptyCubeTexture=null),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.releaseEffects(),null===(e=this.releaseComputeEffects)||void 0===e||e.call(this),this.unbindAllAttributes(),this._boundUniforms=[],IsWindowObjectExist()&&this._renderingCanvas&&(!this._doNotHandleContextLost&&(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored)),window.removeEventListener("resize",this._checkForMobile)),this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers=[],this._renderingCanvas=null,this._currentProgram=null,this._boundRenderFunction=null,_Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ResetCache();for(var t=0,i=this._activeRequests;t<i.length;t++){i[t].abort()}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear()},_0xb82ccc.prototype.attachContextLostEvent=function(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextlost",e,!1)},_0xb82ccc.prototype.attachContextRestoredEvent=function(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextrestored",e,!1)},_0xb82ccc.prototype.getError=function(){return this._gl.getError()},_0xb82ccc.prototype._canRenderToFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(_0x354cf8.TEXTURETYPE_FLOAT)},_0xb82ccc.prototype._canRenderToHalfFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(_0x354cf8.TEXTURETYPE_HALF_FLOAT)},_0xb82ccc.prototype._canRenderToFramebuffer=function(e){for(var t=this._gl;t.getError()!==t.NO_ERROR;);var i=!0,n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(e),1,1,0,t.RGBA,this._getWebGLTextureType(e),null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);var r=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,r),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0);var o=t.checkFramebufferStatus(t.FRAMEBUFFER);if((i=(i=i&&o===t.FRAMEBUFFER_COMPLETE)&&t.getError()===t.NO_ERROR)&&(t.clear(t.COLOR_BUFFER_BIT),i=i&&t.getError()===t.NO_ERROR),i){t.bindFramebuffer(t.FRAMEBUFFER,null);var a=t.RGBA,s=t.UNSIGNED_BYTE,l=new Uint8Array(4);t.readPixels(0,0,1,1,a,s,l),i=i&&t.getError()===t.NO_ERROR}for(t.deleteTexture(n),t.deleteFramebuffer(r),t.bindFramebuffer(t.FRAMEBUFFER,null);!i&&t.getError()!==t.NO_ERROR;);return i},_0xb82ccc.prototype._getWebGLTextureType=function(e){if(1===this._webGLVersion){switch(e){case _0x354cf8.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case _0x354cf8.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT_OES;case _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(e){case _0x354cf8.TEXTURETYPE_BYTE:return this._gl.BYTE;case _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case _0x354cf8.TEXTURETYPE_SHORT:return this._gl.SHORT;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT:return this._gl.UNSIGNED_SHORT;case _0x354cf8.TEXTURETYPE_INT:return this._gl.INT;case _0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER:return this._gl.UNSIGNED_INT;case _0x354cf8.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case _0x354cf8.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_24_8:return this._gl.UNSIGNED_INT_24_8;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case _0x354cf8.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE},_0xb82ccc.prototype._getInternalFormat=function(e,t){void 0===t&&(t=!1);var i=t?this._gl.SRGB8_ALPHA8:this._gl.RGBA;switch(e){case _0x354cf8.TEXTUREFORMAT_ALPHA:i=this._gl.ALPHA;break;case _0x354cf8.TEXTUREFORMAT_LUMINANCE:i=this._gl.LUMINANCE;break;case _0x354cf8.TEXTUREFORMAT_LUMINANCE_ALPHA:i=this._gl.LUMINANCE_ALPHA;break;case _0x354cf8.TEXTUREFORMAT_RED:i=this._gl.RED;break;case _0x354cf8.TEXTUREFORMAT_RG:i=this._gl.RG;break;case _0x354cf8.TEXTUREFORMAT_RGB:i=t?this._gl.SRGB:this._gl.RGB;break;case _0x354cf8.TEXTUREFORMAT_RGBA:i=t?this._gl.SRGB8_ALPHA8:this._gl.RGBA}if(this._webGLVersion>1)switch(e){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:i=this._gl.RED_INTEGER;break;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:i=this._gl.RG_INTEGER;break;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:i=this._gl.RGB_INTEGER;break;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:i=this._gl.RGBA_INTEGER}return i},_0xb82ccc.prototype._getRGBABufferInternalSizedFormat=function(e,t,i){if(void 0===i&&(i=!1),1===this._webGLVersion){if(void 0!==t)switch(t){case _0x354cf8.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case _0x354cf8.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case _0x354cf8.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;case _0x354cf8.TEXTUREFORMAT_RGB:return i?this._gl.SRGB:this._gl.RGB}return this._gl.RGBA}switch(e){case _0x354cf8.TEXTURETYPE_BYTE:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return this._gl.R8_SNORM;case _0x354cf8.TEXTUREFORMAT_RG:return this._gl.RG8_SNORM;case _0x354cf8.TEXTUREFORMAT_RGB:return this._gl.RGB8_SNORM;case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8I;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8I;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8I;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return this._gl.R8;case _0x354cf8.TEXTUREFORMAT_RG:return this._gl.RG8;case _0x354cf8.TEXTUREFORMAT_RGB:return i?this._gl.SRGB8:this._gl.RGB8;case _0x354cf8.TEXTUREFORMAT_RGBA:return i?this._gl.SRGB8_ALPHA8:this._gl.RGBA8;case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8UI;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8UI;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8UI;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8UI;case _0x354cf8.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case _0x354cf8.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case _0x354cf8.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case _0x354cf8.TEXTURETYPE_SHORT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16I;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16I;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16I;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16I}case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16UI;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16UI;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16UI;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16UI}case _0x354cf8.TEXTURETYPE_INT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32I;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32I;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32I;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32I}case _0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32UI;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32UI;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32UI;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32UI}case _0x354cf8.TEXTURETYPE_FLOAT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return this._gl.R32F;case _0x354cf8.TEXTUREFORMAT_RG:return this._gl.RG32F;case _0x354cf8.TEXTUREFORMAT_RGB:return this._gl.RGB32F;case _0x354cf8.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA32F}case _0x354cf8.TEXTURETYPE_HALF_FLOAT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return this._gl.R16F;case _0x354cf8.TEXTUREFORMAT_RG:return this._gl.RG16F;case _0x354cf8.TEXTUREFORMAT_RGB:return this._gl.RGB16F;case _0x354cf8.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA16F}case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.RGB565;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.R11F_G11F_B10F;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.RGB9_E5;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.RGBA4;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.RGB5_A1;case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(t){case _0x354cf8.TEXTUREFORMAT_RGBA:return this._gl.RGB10_A2;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGB10_A2UI;default:return this._gl.RGB10_A2}}return i?this._gl.SRGB8_ALPHA8:this._gl.RGBA8},_0xb82ccc.prototype._getRGBAMultiSampleBufferFormat=function(e){return e===_0x354cf8.TEXTURETYPE_FLOAT?this._gl.RGBA32F:e===_0x354cf8.TEXTURETYPE_HALF_FLOAT?this._gl.RGBA16F:this._gl.RGBA8},_0xb82ccc.prototype._loadFile=function(e,t,i,n,r,o){var a=this,s=_0xb82ccc._FileToolsLoadFile(e,t,i,n,r,o);return this._activeRequests.push(s),s.onCompleteObservable.add((function(e){a._activeRequests.splice(a._activeRequests.indexOf(e),1)})),s},_0xb82ccc._FileToolsLoadFile=function(e,t,i,n,r,o){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("FileTools")},_0xb82ccc.prototype.readPixels=function(e,t,i,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!0);var a=r?4:3,s=r?this._gl.RGBA:this._gl.RGB,l=new Uint8Array(n*i*a);return o&&this.flushFramebuffer(),this._gl.readPixels(e,t,i,n,s,this._gl.UNSIGNED_BYTE,l),Promise.resolve(l)},Object.defineProperty(_0xb82ccc,"IsSupportedAsync",{get:function(){return Promise.resolve(this.isSupported())},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb82ccc,"IsSupported",{get:function(){return this.isSupported()},enumerable:!1,configurable:!0}),_0xb82ccc.isSupported=function(){if(null!==this._HasMajorPerformanceCaveat)return!this._HasMajorPerformanceCaveat;if(null===this._IsSupported)try{var e=this._CreateCanvas(1,1),t=e.getContext("webgl")||e.getContext("experimental-webgl");this._IsSupported=null!=t&&!!window.WebGLRenderingContext}catch(e){this._IsSupported=!1}return this._IsSupported},Object.defineProperty(_0xb82ccc,"HasMajorPerformanceCaveat",{get:function(){if(null===this._HasMajorPerformanceCaveat)try{var e=this._CreateCanvas(1,1),t=e.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||e.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!t}catch(e){this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat},enumerable:!1,configurable:!0}),_0xb82ccc.CeilingPOT=function(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},_0xb82ccc.FloorPOT=function(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)},_0xb82ccc.NearestPOT=function(e){var t=_0xb82ccc.CeilingPOT(e),i=_0xb82ccc.FloorPOT(e);return t-e>e-i?i:t},_0xb82ccc.GetExponentOfTwo=function(e,t,i){var n;switch(void 0===i&&(i=_0x354cf8.SCALEMODE_NEAREST),i){case _0x354cf8.SCALEMODE_FLOOR:n=_0xb82ccc.FloorPOT(e);break;case _0x354cf8.SCALEMODE_NEAREST:n=_0xb82ccc.NearestPOT(e);break;case _0x354cf8.SCALEMODE_CEILING:default:n=_0xb82ccc.CeilingPOT(e)}return Math.min(n,t)},_0xb82ccc.QueueNewFrame=function(e,t){return IsWindowObjectExist()?(!t&&(t=window),t.requestPostAnimationFrame?t.requestPostAnimationFrame(e):t.requestAnimationFrame?t.requestAnimationFrame(e):t.msRequestAnimationFrame?t.msRequestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.mozRequestAnimationFrame?t.mozRequestAnimationFrame(e):t.oRequestAnimationFrame?t.oRequestAnimationFrame(e):window.setTimeout(e,16)):"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(e):setTimeout(e,16)},_0xb82ccc.prototype.getHostDocument=function(){return this._renderingCanvas&&this._renderingCanvas.ownerDocument?this._renderingCanvas.ownerDocument:IsDocumentAvailable()?document:null},_0xb82ccc.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:".*AppleWebKit.*(15.4).*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]},{key:".*(15.4).*AppleWebKit.*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]}],_0xb82ccc._TextureLoaders=[],_0xb82ccc.CollisionsEpsilon=.001,_0xb82ccc._IsSupported=null,_0xb82ccc._HasMajorPerformanceCaveat=null,_0xb82ccc.prototype._createHardwareRenderTargetWrapper=function(e,t,i){var n=new _WebGL_webGLRenderTargetWrapper__WEBPACK_IMPORTED_MODULE_4__.WebGLRenderTargetWrapper(e,t,i,this,this._gl);return this._renderTargetWrapperCache.push(n),n},_0xb82ccc.prototype.createDepthStencilTexture=function(e,t,i){if(t.isCube){var n=e.width||e;return this._createDepthStencilCubeTexture(n,t,i)}return this._createDepthStencilTexture(e,t,i)};var _0x13e28c=(_0x1a766e=!0,function(e,t){var i=_0x1a766e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a766e=!1,i}),_0x3bd7e8=_0x13e28c(void 0,(function(){return _0x3bd7e8.toString().search("(((.+)+)+)+$").toString().constructor(_0x3bd7e8).search("(((.+)+)+)+$")})),_0x1a766e;function allocateAndCopyTypedBuffer(e,t,i,n){switch(void 0===i&&(i=!1),e){case _0x354cf8.TEXTURETYPE_BYTE:var r=(ArrayBuffer,new Int8Array(t));return n&&r.set(new Int8Array(n)),r;case _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE:var o=(ArrayBuffer,new Uint8Array(t));return n&&o.set(new Uint8Array(n)),o;case _0x354cf8.TEXTURETYPE_SHORT:var a=t instanceof ArrayBuffer?new Int16Array(t):new Int16Array(i?t/2:t);return n&&a.set(new Int16Array(n)),a;case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT:case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:case _0x354cf8.TEXTURETYPE_HALF_FLOAT:var s=t instanceof ArrayBuffer?new Uint16Array(t):new Uint16Array(i?t/2:t);return n&&s.set(new Uint16Array(n)),s;case _0x354cf8.TEXTURETYPE_INT:var l=t instanceof ArrayBuffer?new Int32Array(t):new Int32Array(i?t/4:t);return n&&l.set(new Int32Array(n)),l;case _0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER:case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_24_8:case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:case _0x354cf8.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:var u=t instanceof ArrayBuffer?new Uint32Array(t):new Uint32Array(i?t/4:t);return n&&u.set(new Uint32Array(n)),u;case _0x354cf8.TEXTURETYPE_FLOAT:var c=t instanceof ArrayBuffer?new Float32Array(t):new Float32Array(i?t/4:t);return n&&c.set(new Float32Array(n)),c}var h=(ArrayBuffer,new Uint8Array(t));return n&&h.set(new Uint8Array(n)),h}_0x3bd7e8(),_0xb82ccc.prototype._readTexturePixelsSync=function(e,t,i,n,r,o,a,s,l,u){var c,h;void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===l&&(l=0),void 0===u&&(u=0);var d=this._gl;if(!d)throw new Error("Engine does not have gl rendering context.");if(!this._dummyFramebuffer){var f=d.createFramebuffer();if(!f)throw new Error("Unable to create dummy framebuffer");this._dummyFramebuffer=f}d.bindFramebuffer(d.FRAMEBUFFER,this._dummyFramebuffer),n>-1?d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+n,null===(c=e._hardwareTexture)||void 0===c?void 0:c.underlyingResource,r):d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,null===(h=e._hardwareTexture)||void 0===h?void 0:h.underlyingResource,r);var p=void 0!==e.type?this._getWebGLTextureType(e.type):d.UNSIGNED_BYTE;if(s)!o&&(o=allocateAndCopyTypedBuffer(e.type,4*t*i));else if(p===d.UNSIGNED_BYTE)!o&&(o=new Uint8Array(4*t*i)),p=d.UNSIGNED_BYTE;else!o&&(o=new Float32Array(4*t*i)),p=d.FLOAT;return a&&this.flushFramebuffer(),d.readPixels(l,u,t,i,d.RGBA,p,o),d.bindFramebuffer(d.FRAMEBUFFER,this._currentFramebuffer),o},_0xb82ccc.prototype._readTexturePixels=function(e,t,i,n,r,o,a,s,l,u){return void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===l&&(l=0),void 0===u&&(u=0),Promise.resolve(this._readTexturePixelsSync(e,t,i,n,r,o,a,s,l,u))};var _0x109c01=(_0x31e160=!0,function(e,t){var i=_0x31e160?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31e160=!1,i}),_0x35e8c6=_0x109c01(void 0,(function(){return _0x35e8c6.toString().search("(((.+)+)+)+$").toString().constructor(_0x35e8c6).search("(((.+)+)+)+$")})),_0x31e160;function _0x94ba70(e){this._deferredReleaseBuffers=[],this._device=e}_0x35e8c6(),_0x94ba70._IsGPUBuffer=function(e){return void 0===e.underlyingResource},_0x94ba70.prototype.createRawBuffer=function(e,t,i){void 0===i&&(i=!1);var n={mappedAtCreation:i,size:void 0!==e.byteLength?e.byteLength+3&-4:e+3&-4,usage:t};return this._device.createBuffer(n)},_0x94ba70.prototype.createBuffer=function(e,t){var i=void 0!==e.byteLength,n=new _0x1635a9(this.createRawBuffer(e,t));return n.references=1,n.capacity=i?e.byteLength:e,i&&this.setSubData(n,0,e),n},_0x94ba70.prototype.setRawData=function(e,t,i,n,r){this._device.queue.writeBuffer(e,t,i.buffer,n,r)},_0x94ba70.prototype.setSubData=function(e,t,i,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var o=e.underlyingResource;r=r||i.byteLength,r=Math.min(r,e.capacity-t);var a=i.byteOffset+n,s=a+r,l=r+3&-4;if(l!==r){var u=new Uint8Array(i.buffer.slice(a,s));(i=new Uint8Array(l)).set(u),n=0,a=0,s=l,r=l}for(var c=15728640,h=0;s-(a+h)>c;)this._device.queue.writeBuffer(o,t+h,i.buffer,a+h,c),h+=c;this._device.queue.writeBuffer(o,t+h,i.buffer,a+h,r-h)},_0x94ba70.prototype.createBufferByMap=function(e,t){var i=void 0!==e.byteLength,n=new _0x1635a9(o=this.createRawBuffer(e,t,!0));if(n.references=1,n.capacity=i?e.byteLength:e,i){var r=e,o=n.underlyingResource,a=r.byteLength;a=Math.min(a,n.capacity-0);var s=r.byteOffset,l=s+a,u=a+3&-4;if(u!==a){var c=new Uint8Array(r.buffer.slice(s,l));(r=new Uint8Array(u)).set(c),s=0,l=u,a=u}var h=o.getMappedRange();new(0,r.constructor)(h).set(r),o.unmap()}return n},_0x94ba70.prototype._getHalfFloatAsFloatRGBAArrayBuffer=function(e,t,i){!i&&(i=new Float32Array(e));for(var n=new Uint16Array(t);e--;)i[e]=_0x3956bb(n[e]);return i},_0x94ba70.prototype.readDataFromBuffer=function(e,t,i,n,r,o,a,s,l,u,c){var h=this;void 0===a&&(a=_0x354cf8.TEXTURETYPE_UNSIGNED_BYTE),void 0===s&&(s=0),void 0===l&&(l=null),void 0===u&&(u=!0),void 0===c&&(c=!1);var d=a===_0x354cf8.TEXTURETYPE_FLOAT?2:a===_0x354cf8.TEXTURETYPE_HALF_FLOAT?1:0;return new Promise((function(i,f){e.mapAsync(_0x572d87.MapMode.Read,s,t).then((function(){var f=e.getMappedRange(s,t),p=l;if(c)p=null===p?allocateAndCopyTypedBuffer(a,t,!0,f):allocateAndCopyTypedBuffer(a,p.buffer,void 0,f);else if(null===p)switch(d){case 0:(p=new Uint8Array(t)).set(new Uint8Array(f));break;case 1:p=h._getHalfFloatAsFloatRGBAArrayBuffer(t/2,f);break;case 2:(p=new Float32Array(t/4)).set(new Float32Array(f))}else switch(d){case 0:(p=new Uint8Array(p.buffer)).set(new Uint8Array(f));break;case 1:p=h._getHalfFloatAsFloatRGBAArrayBuffer(t/2,f,l);break;case 2:(p=new Float32Array(p.buffer)).set(new Float32Array(f))}if(r!==o){1===d&&!c&&(r*=2,o*=2);for(var _=new Uint8Array(p.buffer),m=r,g=0,x=1;x<n;++x){g=x*o;for(var v=0;v<r;++v)_[m++]=_[g++]}p=0===d||c?new Uint8Array(_.buffer,0,m):new Float32Array(_.buffer,0,m/4)}e.unmap(),u&&h.releaseBuffer(e),i(p)}),(function(e){return f(e)}))}))},_0x94ba70.prototype.releaseBuffer=function(e){return _0x94ba70._IsGPUBuffer(e)?(this._deferredReleaseBuffers.push(e),!0):(e.references--,0===e.references&&(this._deferredReleaseBuffers.push(e.underlyingResource),!0))},_0x94ba70.prototype.destroyDeferredBuffers=function(){for(var e=0;e<this._deferredReleaseBuffers.length;++e)this._deferredReleaseBuffers[e].destroy();this._deferredReleaseBuffers.length=0};var _0x41730f=(_0x14cafc=!0,function(e,t){var i=_0x14cafc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x14cafc=!1,i}),_0x273d21=_0x41730f(void 0,(function(){return _0x273d21.toString().search("(((.+)+)+)+$").toString().constructor(_0x273d21).search("(((.+)+)+)+$")})),_0x14cafc;function _0x253af9(e){void 0===e&&(e=null),this.format=_0x572d87.TextureFormat.RGBA8Unorm,this.textureUsages=0,this.textureAdditionalUsages=0,this._webgpuTexture=e,this._webgpuMSAATexture=null,this.view=null,this.viewForWriting=null,this.msaaView=null}_0x273d21(),Object.defineProperty(_0x253af9.prototype,"underlyingResource",{get:function(){return this._webgpuTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0x253af9.prototype,"msaaTexture",{get:function(){return this._webgpuMSAATexture},set:function(e){this._webgpuMSAATexture=e},enumerable:!1,configurable:!0}),_0x253af9.prototype.set=function(e){this._webgpuTexture=e},_0x253af9.prototype.setUsage=function(e,t,i,n,r){t=e!==_Materials_Textures_internalTexture__WEBPACK_IMPORTED_MODULE_0__.InternalTextureSource.RenderTarget&&t,this.createView({format:this.format,dimension:i?_0x572d87.TextureViewDimension.Cube:_0x572d87.TextureViewDimension.E2d,mipLevelCount:t?_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__.Scalar.ILog2(Math.max(n,r))+1:1,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:i?6:1,aspect:_0x572d87.TextureAspect.All})},_0x253af9.prototype.createView=function(e,t){if(void 0===t&&(t=!1),this.view=this._webgpuTexture.createView(e),t&&e){var i=e.mipLevelCount;e.mipLevelCount=1,this.viewForWriting=this._webgpuTexture.createView(e),e.mipLevelCount=i}},_0x253af9.prototype.createMSAAView=function(e){this.msaaView=this._webgpuMSAATexture.createView(e)},_0x253af9.prototype.reset=function(){this._webgpuTexture=null,this._webgpuMSAATexture=null,this.view=null,this.viewForWriting=null,this.msaaView=null},_0x253af9.prototype.release=function(){var e,t,i;null===(e=this._webgpuTexture)||void 0===e||e.destroy(),null===(t=this._webgpuMSAATexture)||void 0===t||t.destroy(),null===(i=this._copyInvertYTempTexture)||void 0===i||i.destroy(),this.reset()};var _0x47a6c7=(_0x56347a=!0,function(e,t){var i=_0x56347a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56347a=!1,i}),_0x32dc4f=_0x47a6c7(void 0,(function(){return _0x32dc4f.toString().search("(((.+)+)+)+$").toString().constructor(_0x32dc4f).search("(((.+)+)+)+$")})),_0x56347a;function _0x2a478f(){}_0x32dc4f(),Object.defineProperty(_0x2a478f.prototype,"UniqueId",{get:function(){var e=this._UniqueIdCounter;return this._UniqueIdCounter++,e},enumerable:!1,configurable:!0}),_0x2a478f._UniqueIdCounter=0,_0x2a478f.add=function(){};var _0x3d7fb0=(_0x20e26f=!0,function(e,t){var i=_0x20e26f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x20e26f=!1,i}),_0x49b41e=_0x3d7fb0(void 0,(function(){return _0x49b41e.toString().search("(((.+)+)+)+$").toString().constructor(_0x49b41e).search("(((.+)+)+)+$")})),_0x20e26f;function _0x54737b(){}_0x49b41e(),_0x54737b.GetShadersRepository=function(e){return void 0===e&&(e=_0x4cf79a.GLSL),e===_0x4cf79a.GLSL?_0x54737b.ShadersRepository:_0x54737b.ShadersRepositoryWGSL},_0x54737b.GetShadersStore=function(e){return void 0===e&&(e=_0x4cf79a.GLSL),e===_0x4cf79a.GLSL?_0x54737b.ShadersStore:_0x54737b.ShadersStoreWGSL},_0x54737b.GetIncludesShadersStore=function(e){return void 0===e&&(e=_0x4cf79a.GLSL),e===_0x4cf79a.GLSL?_0x54737b.IncludesShadersStore:_0x54737b.IncludesShadersStoreWGSL},_0x54737b.ShadersRepository="Source/Shaders/",_0x54737b.ShadersStore={},_0x54737b.IncludesShadersStore={},_0x54737b.ShadersRepositoryWGSL="Source/ShadersWGSL/",_0x54737b.ShadersStoreWGSL={},_0x54737b.IncludesShadersStoreWGSL={};var _0x48bd40=(_0x1d4fe2=!0,function(e,t){var i=_0x1d4fe2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d4fe2=!1,i}),_0x33c89e=_0x48bd40(void 0,(function(){return _0x33c89e.toString().search("(((.+)+)+)+$").toString().constructor(_0x33c89e).search("(((.+)+)+)+$")})),_0x1d4fe2;function _0x1f3490(e,t,i,n){var r,o,a=this;void 0===n&&(n=""),this.name=null,this.defines="",this.onCompiled=null,this.onError=null,this.uniqueId=0,this.onCompileObservable=new Observable,this.onErrorObservable=new Observable,this.onBindObservable=new Observable,this._wasPreviouslyReady=!1,this._isReady=!1,this._compilationError="",this._key="",this._computeSourceCodeOverride="",this._pipelineContext=null,this._computeSourceCode="",this._rawComputeSourceCode="",this._shaderLanguage=_0x4cf79a.WGSL,this.name=e,this._key=n,this._engine=i,this.uniqueId=_0x1f3490._uniqueIdSeed++,this.defines=null!==(r=t.defines)&&void 0!==r?r:"",this.onError=t.onError,this.onCompiled=t.onCompiled,this._entryPoint=null!==(o=t.entryPoint)&&void 0!==o?o:"main",this._shaderStore=_0x54737b.GetShadersStore(this._shaderLanguage),this._shaderRepository=_0x54737b.GetShadersRepository(this._shaderLanguage),this._includeShaderStore=_0x54737b.GetIncludesShadersStore(this._shaderLanguage);var s,l=IsWindowObjectExist()?this._engine.getHostDocument():null;e.computeSource?s="source:"+e.computeSource:e.computeElement?!(s=l?l.getElementById(e.computeElement):null)&&(s=e.computeElement):s=e.compute||e;var u={defines:this.defines.split("\n"),indexParameters:void 0,isFragment:!1,shouldUseHighPrecisionShader:!1,processor:null,supportsUniformBuffers:this._engine.supportsUniformBuffers,shadersRepository:this._shaderRepository,includesShadersStore:this._includeShaderStore,version:(100*this._engine.version).toString(),platformName:this._engine.shaderPlatformName,processingContext:null,isNDCHalfZRange:this._engine.isNDCHalfZRange,useReverseDepthBuffer:this._engine.useReverseDepthBuffer};this._loadShader(s,"Compute","",(i=>{_0x5539b8.Initialize(u),_0x5539b8.PreProcess(i,u,(function(n){a._rawComputeSourceCode=i,t.processFinalCode&&(n=t.processFinalCode(n));var r=_0x5539b8.Finalize(n,"",u);a._useFinalCode(r.vertexCode,e)}),a._engine)}))}_0x33c89e(),_0x1f3490.prototype._useFinalCode=function(e,t){if(t){var i=t.computeElement||t.compute||t.spectorName||t;this._computeSourceCode="//#define SHADER_NAME compute:"+i+"\n"+e}else this._computeSourceCode=e;this._prepareEffect()},Object.defineProperty(_0x1f3490.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),_0x1f3490.prototype.isReady=function(){try{return this._isReadyInternal()}catch(e){return!1}},_0x1f3490.prototype._isReadyInternal=function(){return!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady},_0x1f3490.prototype.getEngine=function(){return this._engine},_0x1f3490.prototype.getPipelineContext=function(){return this._pipelineContext},_0x1f3490.prototype.getCompilationError=function(){return this._compilationError},_0x1f3490.prototype.executeWhenCompiled=function(e){var t=this;this.isReady()?e(this):(this.onCompileObservable.add((function(t){e(t)})),(!this._pipelineContext||this._pipelineContext.isAsync)&&setTimeout((function(){t._checkIsReady(null)}),16))},_0x1f3490.prototype._checkIsReady=function(e){var t=this;try{if(this._isReadyInternal())return}catch(t){return void this._processCompilationErrors(t,e)}setTimeout((function(){t._checkIsReady(e)}),16)},_0x1f3490.prototype._loadShader=function(e,t,i,n){var r;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return void n(Object(_Misc_domManagement__WEBPACK_IMPORTED_MODULE_2__.GetDOMTextContent)(e));"source:"!==e.substr(0,7)?"base64:"!==e.substr(0,7)?this._shaderStore[e+t+"Shader"]?n(this._shaderStore[e+t+"Shader"]):i&&this._shaderStore[e+i+"Shader"]?n(this._shaderStore[e+i+"Shader"]):(r="."===e[0]||"/"===e[0]||e.indexOf("http")>-1?e:this._shaderRepository+e,this._engine._loadFile(r+"."+t.toLowerCase()+".fx",n)):n(window.atob(e.substr(7))):n(e.substr(7))},Object.defineProperty(_0x1f3490.prototype,"computeSourceCode",{get:function(){var e,t;return this._computeSourceCodeOverride?this._computeSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getComputeShaderCode())&&void 0!==t?t:this._computeSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x1f3490.prototype,"rawComputeSourceCode",{get:function(){return this._rawComputeSourceCode},enumerable:!1,configurable:!0}),_0x1f3490.prototype._prepareEffect=function(){var e=this,t=this.defines,i=this._pipelineContext;this._isReady=!1;try{var n=this._engine;this._pipelineContext=n.createComputePipelineContext(),this._pipelineContext._name=this._key,n._prepareComputePipelineContext(this._pipelineContext,this._computeSourceCodeOverride?this._computeSourceCodeOverride:this._computeSourceCode,this._rawComputeSourceCode,this._computeSourceCodeOverride?null:t,this._entryPoint),n._executeWhenComputeStateIsCompiled(this._pipelineContext,(function(){e._compilationError="",e._isReady=!0,e.onCompiled&&e.onCompiled(e),e.onCompileObservable.notifyObservers(e),e.onCompileObservable.clear(),i&&e.getEngine()._deleteComputePipelineContext(i)})),this._pipelineContext.isAsync&&this._checkIsReady(i)}catch(e){this._processCompilationErrors(e,i)}},_0x1f3490.prototype._getShaderCodeAndErrorLine=function(e,t){var i=null;if(t&&e){var n=t.match(/COMPUTE SHADER ERROR: 0:(\d+?):/);if(n&&2===n.length){var r=parseInt(n[1]),o=e.split("\n",-1);o.length>=r&&(i="Offending line ["+r+"] in compute code: "+o[r-1])}}return[e,i]},_0x1f3490.prototype._processCompilationErrors=function(e,t){var i,n;if(void 0===t&&(t=null),this._compilationError=e.message,_0x41154e.Error("Unable to compile compute effect:"),_0x41154e.Error("Defines:\r\n"+this.defines),_0x1f3490.LogShaderCodeOnCompilationError){var r=null,o=null;(null===(n=this._pipelineContext)||void 0===n?void 0:n._getComputeShaderCode())&&(o=(i=this._getShaderCodeAndErrorLine(this._pipelineContext._getComputeShaderCode(),this._compilationError))[0],r=i[1],o&&(_0x41154e.Error("Compute code:"),_0x41154e.Error(o))),r&&_0x41154e.Error(r)}_0x41154e.Error("Error: "+this._compilationError),t&&(this._pipelineContext=t,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this))},_0x1f3490.prototype.dispose=function(){this._pipelineContext&&this._pipelineContext.dispose(),this._engine._releaseComputeEffect(this)},_0x1f3490.RegisterShader=function(e,t){_0x54737b.GetShadersStore(_0x4cf79a.WGSL)[e+"ComputeShader"]=t},_0x1f3490._uniqueIdSeed=0,_0x1f3490.LogShaderCodeOnCompilationError=!0;var _0x59a7c3=(_0x4fbda9=!0,function(e,t){var i=_0x4fbda9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fbda9=!1,i}),_0x5a0f39=_0x59a7c3(void 0,(function(){return _0x5a0f39.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a0f39).search("(((.+)+)+)+$")})),_0x4fbda9;function _0x4d4805(){}_0x5a0f39(),Object.defineProperty(_0x4d4805,"LastCreatedEngine",{get:function(){return 0===this.Instances.length?null:this.Instances[this.Instances.length-1]},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d4805,"LastCreatedScene",{get:function(){return this._LastCreatedScene},enumerable:!1,configurable:!0}),_0x4d4805.Instances=new Array,_0x4d4805._LastCreatedScene=null,_0x4d4805.UseFallbackTexture=!0,_0x4d4805.FallbackTexture="";var _0x31453b=(_0x5e1d13=!0,function(e,t){var i=_0x5e1d13?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e1d13=!1,i}),_0x3817ed=_0x31453b(void 0,(function(){return _0x3817ed.toString().search("(((.+)+)+)+$").toString().constructor(_0x3817ed).search("(((.+)+)+)+$")})),_0x5e1d13;function _0x3f6032(){}function _0x3933e0(){return"undefined"!=typeof window}_0x3817ed(),Object.defineProperty(_0x3f6032,"Now",{get:function(){return _0x3933e0()&&window.performance&&window.performance.now?window.performance.now():Date.now()},enumerable:!1,configurable:!0});var _0x4bc357=(_0x13eb95=!0,function(e,t){var i=_0x13eb95?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13eb95=!1,i}),_0x1fd9fa=_0x4bc357(void 0,(function(){return _0x1fd9fa.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fd9fa).search("(((.+)+)+)+$")})),_0x13eb95;function PerformanceMonitor(e){void 0===e&&(e=30),this._enabled=!0,this._rollingFrameTime=new RollingAverage(e)}function RollingAverage(e){this._samples=new Array(e),this.reset()}_0x1fd9fa(),PerformanceMonitor.prototype.sampleFrame=function(e){if(void 0===e&&(e=_0x3f6032.Now),this._enabled){if(null!=this._lastFrameTimeMs){var t=e-this._lastFrameTimeMs;this._rollingFrameTime.add(t)}this._lastFrameTimeMs=e}},Object.defineProperty(PerformanceMonitor.prototype,"averageFrameTime",{get:function(){return this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"averageFrameTimeVariance",{get:function(){return this._rollingFrameTime.variance},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"instantaneousFrameTime",{get:function(){return this._rollingFrameTime.history(0)},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"averageFPS",{get:function(){return 1e3/this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"instantaneousFPS",{get:function(){var e=this._rollingFrameTime.history(0);return 0===e?0:1e3/e},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"isSaturated",{get:function(){return this._rollingFrameTime.isSaturated()},enumerable:!1,configurable:!0}),PerformanceMonitor.prototype.enable=function(){this._enabled=!0},PerformanceMonitor.prototype.disable=function(){this._enabled=!1,this._lastFrameTimeMs=null},Object.defineProperty(PerformanceMonitor.prototype,"isEnabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),PerformanceMonitor.prototype.reset=function(){this._lastFrameTimeMs=null,this._rollingFrameTime.reset()},RollingAverage.prototype.add=function(e){var t;if(this.isSaturated()){var i=this._samples[this._pos];t=i-this.average,this.average-=t/(this._sampleCount-1),this._m2-=t*(i-this.average)}else this._sampleCount++;t=e-this.average,this.average+=t/this._sampleCount,this._m2+=t*(e-this.average),this.variance=this._m2/(this._sampleCount-1),this._samples[this._pos]=e,this._pos++,this._pos%=this._samples.length},RollingAverage.prototype.history=function(e){if(e>=this._sampleCount||e>=this._samples.length)return 0;var t=this._wrapPosition(this._pos-1);return this._samples[this._wrapPosition(t-e)]},RollingAverage.prototype.isSaturated=function(){return this._sampleCount>=this._samples.length},RollingAverage.prototype.reset=function(){this.average=0,this.variance=0,this._sampleCount=0,this._pos=0,this._m2=0},RollingAverage.prototype._wrapPosition=function(e){var t=this._samples.length;return(e%t+t)%t};var _0xc3d4f7=(_0x1a4077=!0,function(e,t){var i=_0x1a4077?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a4077=!1,i}),_0x1f417b=_0xc3d4f7(void 0,(function(){return _0x1f417b.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f417b).search("(((.+)+)+)+$")})),_0x1a4077;function _0x4d817b(){this._startMonitoringTime=0,this._min=0,this._max=0,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}_0x1f417b(),Object.defineProperty(_0x4d817b.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d817b.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d817b.prototype,"average",{get:function(){return this._average},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d817b.prototype,"lastSecAverage",{get:function(){return this._lastSecAverage},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d817b.prototype,"current",{get:function(){return this._current},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d817b.prototype,"total",{get:function(){return this._totalAccumulated},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4d817b.prototype,"count",{get:function(){return this._totalValueCount},enumerable:!1,configurable:!0}),_0x4d817b.prototype.fetchNewFrame=function(){this._totalValueCount++,this._current=0,this._lastSecValueCount++},_0x4d817b.prototype.addCount=function(e,t){_0x4d817b.Enabled&&(this._current+=e,t&&this._fetchResult())},_0x4d817b.prototype.beginMonitoring=function(){_0x4d817b.Enabled&&(this._startMonitoringTime=_0x3f6032.Now)},_0x4d817b.prototype.endMonitoring=function(e){if(void 0===e&&(e=!0),_0x4d817b.Enabled){e&&this.fetchNewFrame();var t=_0x3f6032.Now;this._current=t-this._startMonitoringTime,e&&this._fetchResult()}},_0x4d817b.prototype._fetchResult=function(){this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current),this._average=this._totalAccumulated/this._totalValueCount;var e=_0x3f6032.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)},_0x4d817b.Enabled=!0;var _0x5b509a=(_0x5d0ff1=!0,function(e,t){var i=_0x5d0ff1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d0ff1=!1,i}),_0x2967a1=_0x5b509a(void 0,(function(){return _0x2967a1.toString().search("(((.+)+)+)+$").toString().constructor(_0x2967a1).search("(((.+)+)+)+$")})),_0x5d0ff1;function _0x402caf(e,t,i,n){void 0===n&&(n=!1);var r=_0xb82ccc.call(this,e,t,i,n)||this;if(r.enableOfflineSupport=!1,r.disableManifestCheck=!1,r.scenes=new Array,r._virtualScenes=new Array,r.onNewSceneAddedObservable=new Observable,r.postProcesses=new Array,r.isPointerLock=!1,r.onResizeObservable=new Observable,r.onCanvasBlurObservable=new Observable,r.onCanvasFocusObservable=new Observable,r.onCanvasPointerOutObservable=new Observable,r.onBeginFrameObservable=new Observable,r.customAnimationFrameRequester=null,r.onEndFrameObservable=new Observable,r.onBeforeShaderCompilationObservable=new Observable,r.onAfterShaderCompilationObservable=new Observable,r._deterministicLockstep=!1,r._lockstepMaxSteps=4,r._timeStep=1/60,r._fps=60,r._deltaTime=0,r._drawCalls=new _0x4d817b,r.canvasTabIndex=1,r.disablePerformanceMonitorInBackground=!1,r._performanceMonitor=new PerformanceMonitor,r._compatibilityMode=!0,r.currentRenderPassId=_0x354cf8.RENDERPASS_MAIN,r._renderPassNames=["main"],_0x402caf.Instances.push(r),!e)return r;if(r._features.supportRenderPasses=!0,i=r._creationOptions,e.getContext){var o=e;if(r._sharedInit(o,!!i.doNotHandleTouchAction,i.audioEngine),(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var a=document;r._onFullscreenChange=function(){void 0!==a.fullscreen?r.isFullscreen=a.fullscreen:void 0!==a.mozFullScreen?r.isFullscreen=a.mozFullScreen:void 0!==a.webkitIsFullScreen?r.isFullscreen=a.webkitIsFullScreen:void 0!==a.msIsFullScreen&&(r.isFullscreen=a.msIsFullScreen),r.isFullscreen&&r._pointerLockRequested&&o&&_0x402caf._RequestPointerlock(o)},document.addEventListener("fullscreenchange",r._onFullscreenChange,!1),document.addEventListener("mozfullscreenchange",r._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",r._onFullscreenChange,!1),document.addEventListener("msfullscreenchange",r._onFullscreenChange,!1),r._onPointerLockChange=function(){r.isPointerLock=a.mozPointerLockElement===o||a.webkitPointerLockElement===o||a.msPointerLockElement===o||a.pointerLockElement===o},document.addEventListener("pointerlockchange",r._onPointerLockChange,!1),document.addEventListener("mspointerlockchange",r._onPointerLockChange,!1),document.addEventListener("mozpointerlockchange",r._onPointerLockChange,!1),document.addEventListener("webkitpointerlockchange",r._onPointerLockChange,!1),!_0x402caf.audioEngine&&i.audioEngine&&_0x402caf.AudioEngineFactory&&(_0x402caf.audioEngine=_0x402caf.AudioEngineFactory(r.getRenderingCanvas(),r.getAudioContext(),r.getAudioDestination()))}r._connectVREvents(),r.enableOfflineSupport=void 0!==_0x402caf.OfflineProviderFactory,r._deterministicLockstep=!!i.deterministicLockstep,r._lockstepMaxSteps=i.lockstepMaxSteps||0,r._timeStep=i.timeStep||1/60}return r._prepareVRComponent(),i.autoEnableWebVR&&r.initWebVR(),r}_0x2967a1(),_0xb82ccc&&(_0x402caf.__proto__=_0xb82ccc),_0x402caf.prototype=Object.create(_0xb82ccc&&_0xb82ccc.prototype),_0x402caf.prototype.constructor=_0xb82ccc,Object.defineProperty(_0x402caf,"NpmPackage",{get:function(){return _thinEngine__WEBPACK_IMPORTED_MODULE_6__.ThinEngine.NpmPackage},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf,"Version",{get:function(){return _0xb82ccc.Version},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf,"Instances",{get:function(){return _0x4d4805.Instances},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf,"LastCreatedEngine",{get:function(){return _0x4d4805.LastCreatedEngine},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf,"LastCreatedScene",{get:function(){return _0x4d4805.LastCreatedScene},enumerable:!1,configurable:!0}),_0x402caf.prototype._createImageBitmapFromSource=function(e,t){var i=this;return new Promise((function(n,r){var o=new Image;o.onload=function(){o.decode().then((function(){i.createImageBitmap(o,t).then((function(e){n(e)}))}))},o.onerror=function(){r("Error loading image ".concat(o.src))},o.src=e}))},_0x402caf.prototype.createImageBitmap=function(e,t){return createImageBitmap(e,t)},_0x402caf.prototype.resizeImageBitmap=function(e,t,i){var n=this.createCanvas(t,i).getContext("2d");if(!n)throw new Error("Unable to get 2d context for resizeImageBitmap");return n.drawImage(e,0,0),n.getImageData(0,0,t,i).data},_0x402caf.MarkAllMaterialsAsDirty=function(e,t){for(var i=0;i<_0x402caf.Instances.length;i++)for(var n=_0x402caf.Instances[i],r=0;r<n.scenes.length;r++)n.scenes[r].markAllMaterialsAsDirty(e,t)},_0x402caf.DefaultLoadingScreenFactory=function(e){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_5__._WarnImport)("LoadingScreen")},Object.defineProperty(_0x402caf.prototype,"_supportsHardwareTextureRescaling",{get:function(){return!!_0x402caf._RescalePostProcessFactory},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf.prototype,"performanceMonitor",{get:function(){return this._performanceMonitor},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf.prototype,"compatibilityMode",{get:function(){return this._compatibilityMode},set:function(e){this._compatibilityMode=!0},enumerable:!1,configurable:!0}),_0x402caf.prototype.getInputElement=function(){return this._renderingCanvas},_0x402caf.prototype._sharedInit=function(e,t,i){var n=this;if(_0xb82ccc.prototype._sharedInit.call(this,e,t,i),this._onCanvasFocus=function(){n.onCanvasFocusObservable.notifyObservers(n)},this._onCanvasBlur=function(){n.onCanvasBlurObservable.notifyObservers(n)},e.addEventListener("focus",this._onCanvasFocus),e.addEventListener("blur",this._onCanvasBlur),this._onBlur=function(){n.disablePerformanceMonitorInBackground&&n._performanceMonitor.disable(),n._windowIsBackground=!0},this._onFocus=function(){n.disablePerformanceMonitorInBackground&&n._performanceMonitor.enable(),n._windowIsBackground=!1},this._onCanvasPointerOut=function(t){document.elementFromPoint(t.clientX,t.clientY)!==e&&n.onCanvasPointerOutObservable.notifyObservers(t)},(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var r=this.getHostWindow();r&&(r.addEventListener("blur",this._onBlur),r.addEventListener("focus",this._onFocus))}e.addEventListener("pointerout",this._onCanvasPointerOut),!t&&this._disableTouchAction(),!_0x402caf.audioEngine&&i&&_0x402caf.AudioEngineFactory&&(_0x402caf.audioEngine=_0x402caf.AudioEngineFactory(this.getRenderingCanvas(),this.getAudioContext(),this.getAudioDestination()))},_0x402caf.prototype.getAspectRatio=function(e,t){void 0===t&&(t=!1);var i=e.viewport;return this.getRenderWidth(t)*i.width/(this.getRenderHeight(t)*i.height)},_0x402caf.prototype.getScreenAspectRatio=function(){return this.getRenderWidth(!0)/this.getRenderHeight(!0)},_0x402caf.prototype.getRenderingCanvasClientRect=function(){return this._renderingCanvas?this._renderingCanvas.getBoundingClientRect():null},_0x402caf.prototype.getInputElementClientRect=function(){return this._renderingCanvas?this.getInputElement().getBoundingClientRect():null},_0x402caf.prototype.isDeterministicLockStep=function(){return this._deterministicLockstep},_0x402caf.prototype.getLockstepMaxSteps=function(){return this._lockstepMaxSteps},_0x402caf.prototype.getTimeStep=function(){return 1e3*this._timeStep},_0x402caf.prototype.generateMipMapsForCubemap=function(e,t){if(void 0===t&&(t=!0),e.generateMipMaps){var i=this._gl;this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,e,!0),i.generateMipmap(i.TEXTURE_CUBE_MAP),t&&this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,null)}},_0x402caf.prototype.getDepthBuffer=function(){return this._depthCullingState.depthTest},_0x402caf.prototype.setDepthBuffer=function(e){this._depthCullingState.depthTest=e},_0x402caf.prototype.getDepthWrite=function(){return this._depthCullingState.depthMask},_0x402caf.prototype.setDepthWrite=function(e){this._depthCullingState.depthMask=e},_0x402caf.prototype.getStencilBuffer=function(){return this._stencilState.stencilTest},_0x402caf.prototype.setStencilBuffer=function(e){this._stencilState.stencilTest=e},_0x402caf.prototype.getStencilMask=function(){return this._stencilState.stencilMask},_0x402caf.prototype.setStencilMask=function(e){this._stencilState.stencilMask=e},_0x402caf.prototype.getStencilFunction=function(e){return e===_0x354cf8.FRONT?this._stencilState.frontStencilFunc:this._stencilState.backStencilFunc},_0x402caf.prototype.getStencilFunctionReference=function(){return this._stencilState.stencilFuncRef},_0x402caf.prototype.getStencilFunctionMask=function(){return this._stencilState.stencilFuncMask},_0x402caf.prototype.setStencilFunction=function(e,t){e===_0x354cf8.FRONT?this._stencilState.frontStencilFunc=t:this._stencilState.backStencilFunc=t},_0x402caf.prototype.setStencilFunctionReference=function(e){this._stencilState.stencilFuncRef=e},_0x402caf.prototype.setStencilFunctionMask=function(e){this._stencilState.stencilFuncMask=e},_0x402caf.prototype.getStencilOperationFail=function(e){return e===_0x354cf8.FRONT?this._stencilState.frontStencilOpStencilFail:this._stencilState.backStencilOpStencilFail},_0x402caf.prototype.getStencilOperationDepthFail=function(e){return e===_0x354cf8.FRONT?this._stencilState.frontStencilOpDepthFail:this._stencilState.backStencilOpDepthFail},_0x402caf.prototype.getStencilOperationPass=function(e){return e===_0x354cf8.FRONT?this._stencilState.frontStencilOpStencilDepthPass:this._stencilState.backStencilOpStencilDepthPass},_0x402caf.prototype.setStencilOperationFail=function(e,t){e===_0x354cf8.FRONT?this._stencilState.frontStencilOpStencilFail=t:this._stencilState.backStencilOpStencilFail=t},_0x402caf.prototype.setStencilOperationDepthFail=function(e,t){e===_0x354cf8.FRONT?this._stencilState.frontStencilOpDepthFail=t:this._stencilState.backStencilOpDepthFail=t},_0x402caf.prototype.setStencilOperationPass=function(e,t){e===_0x354cf8.FRONT?this._stencilState.frontStencilOpStencilDepthPass=t:this._stencilState.backStencilOpStencilDepthPass=t},_0x402caf.prototype.setDitheringState=function(e){e?this._gl.enable(this._gl.DITHER):this._gl.disable(this._gl.DITHER)},_0x402caf.prototype.setRasterizerState=function(e){e?this._gl.disable(this._gl.RASTERIZER_DISCARD):this._gl.enable(this._gl.RASTERIZER_DISCARD)},_0x402caf.prototype.getDepthFunction=function(){return this._depthCullingState.depthFunc},_0x402caf.prototype.setDepthFunction=function(e){this._depthCullingState.depthFunc=e},_0x402caf.prototype.setDepthFunctionToGreater=function(){this.setDepthFunction(_0x354cf8.GREATER)},_0x402caf.prototype.setDepthFunctionToGreaterOrEqual=function(){this.setDepthFunction(_0x354cf8.GEQUAL)},_0x402caf.prototype.setDepthFunctionToLess=function(){this.setDepthFunction(_0x354cf8.LESS)},_0x402caf.prototype.setDepthFunctionToLessOrEqual=function(){this.setDepthFunction(_0x354cf8.LEQUAL)},_0x402caf.prototype.setDirectViewport=function(e,t,i,n){var r=this._cachedViewport;return this._cachedViewport=null,this._viewport(e,t,i,n),r},_0x402caf.prototype.scissorClear=function(e,t,i,n,r){this.enableScissor(e,t,i,n),this.clear(r,!0,!0,!0),this.disableScissor()},_0x402caf.prototype.enableScissor=function(e,t,i,n){var r=this._gl;r.enable(r.SCISSOR_TEST),r.scissor(e,t,i,n)},_0x402caf.prototype.disableScissor=function(){var e=this._gl;e.disable(e.SCISSOR_TEST)},_0x402caf.prototype._reportDrawCall=function(e){void 0===e&&(e=1),this._drawCalls.addCount(e,!1)},_0x402caf.prototype.initWebVR=function(){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_5__._WarnImport)("WebVRCamera")},_0x402caf.prototype._prepareVRComponent=function(){},_0x402caf.prototype._connectVREvents=function(e,t){},_0x402caf.prototype._submitVRFrame=function(){},_0x402caf.prototype.disableVR=function(){},_0x402caf.prototype.isVRPresenting=function(){return!1},_0x402caf.prototype._requestVRFrame=function(){},_0x402caf.prototype._loadFileAsync=function(e,t,i){var n=this;return new Promise((function(r,o){n._loadFile(e,(function(e){r(e)}),void 0,t,i,(function(e,t){o(t)}))}))},_0x402caf.prototype.getVertexShaderSource=function(e){var t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[0]):null},_0x402caf.prototype.getFragmentShaderSource=function(e){var t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[1]):null},_0x402caf.prototype.setDepthStencilTexture=function(e,t,i,n){void 0!==e&&(t&&(this._boundUniforms[e]=t),i&&i.depthStencilTexture?this._setTexture(e,i,!1,!0,n):this._setTexture(e,null,void 0,void 0,n))},_0x402caf.prototype.setTextureFromPostProcess=function(e,t,i){var n,r=null;t&&(t._textures.data[t._currentRenderTextureInd]?r=t._textures.data[t._currentRenderTextureInd]:t._forcedOutputTexture&&(r=t._forcedOutputTexture)),this._bindTexture(e,null!==(n=null==r?void 0:r.texture)&&void 0!==n?n:null,i)},_0x402caf.prototype.setTextureFromPostProcessOutput=function(e,t,i){var n,r;this._bindTexture(e,null!==(r=null===(n=null==t?void 0:t._outputTexture)||void 0===n?void 0:n.texture)&&void 0!==r?r:null,i)},_0x402caf.prototype._rebuildBuffers=function(){for(var e=0,t=this.scenes;e<t.length;e++){(r=t[e]).resetCachedMaterial(),r._rebuildGeometries(),r._rebuildTextures()}for(var i=0,n=this._virtualScenes;i<n.length;i++){var r;(r=n[i]).resetCachedMaterial(),r._rebuildGeometries(),r._rebuildTextures()}_0xb82ccc.prototype._rebuildBuffers.call(this)},_0x402caf.prototype._renderFrame=function(){for(var e=0;e<this._activeRenderLoops.length;e++){(0,this._activeRenderLoops[e])()}},_0x402caf.prototype._renderLoop=function(){if(!this._contextWasLost){var e=!0;!this.renderEvenInBackground&&this._windowIsBackground&&(e=!1),e&&(this.beginFrame(),!this._renderViews()&&this._renderFrame(),this.endFrame())}this._activeRenderLoops.length>0?this.customAnimationFrameRequester?(this.customAnimationFrameRequester.requestID=this._queueNewFrame(this.customAnimationFrameRequester.renderFunction||this._boundRenderFunction,this.customAnimationFrameRequester),this._frameHandler=this.customAnimationFrameRequester.requestID):this.isVRPresenting()?this._requestVRFrame():this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},_0x402caf.prototype._renderViews=function(){return!1},_0x402caf.prototype.switchFullscreen=function(e){this.isFullscreen?this.exitFullscreen():this.enterFullscreen(e)},_0x402caf.prototype.enterFullscreen=function(e){!this.isFullscreen&&(this._pointerLockRequested=e,this._renderingCanvas&&_0x402caf._RequestFullscreen(this._renderingCanvas))},_0x402caf.prototype.exitFullscreen=function(){this.isFullscreen&&_0x402caf._ExitFullscreen()},_0x402caf.prototype.enterPointerlock=function(){this._renderingCanvas&&_0x402caf._RequestPointerlock(this._renderingCanvas)},_0x402caf.prototype.exitPointerlock=function(){_0x402caf._ExitPointerlock()},_0x402caf.prototype.beginFrame=function(){this._measureFps(),this.onBeginFrameObservable.notifyObservers(this),_0xb82ccc.prototype.beginFrame.call(this)},_0x402caf.prototype.endFrame=function(){_0xb82ccc.prototype.endFrame.call(this),this._submitVRFrame(),this.onEndFrameObservable.notifyObservers(this)},_0x402caf.prototype.resize=function(e){void 0===e&&(e=!1),this.isVRPresenting()||_0xb82ccc.prototype.resize.call(this,e)},_0x402caf.prototype.setSize=function(e,t,i){if(void 0===i&&(i=!1),!this._renderingCanvas)return!1;if(!_0xb82ccc.prototype.setSize.call(this,e,t,i))return!1;if(this.scenes){for(var n=0;n<this.scenes.length;n++)for(var r=this.scenes[n],o=0;o<r.cameras.length;o++){r.cameras[o]._currentRenderId=0}this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this)}return!0},_0x402caf.prototype._deletePipelineContext=function(e){var t=e;t&&t.program&&t.transformFeedback&&(this.deleteTransformFeedback(t.transformFeedback),t.transformFeedback=null),_0xb82ccc.prototype._deletePipelineContext.call(this,e)},_0x402caf.prototype.createShaderProgram=function(e,t,i,n,r,o){void 0===o&&(o=null),r=r||this._gl,this.onBeforeShaderCompilationObservable.notifyObservers(this);var a=_0xb82ccc.prototype.createShaderProgram.call(this,e,t,i,n,r,o);return this.onAfterShaderCompilationObservable.notifyObservers(this),a},_0x402caf.prototype._createShaderProgram=function(e,t,i,n,r){void 0===r&&(r=null);var o=n.createProgram();if(e.program=o,!o)throw new Error("Unable to create program");if(n.attachShader(o,t),n.attachShader(o,i),this.webGLVersion>1&&r){var a=this.createTransformFeedback();this.bindTransformFeedback(a),this.setTranformFeedbackVaryings(o,r),e.transformFeedback=a}return n.linkProgram(o),this.webGLVersion>1&&r&&this.bindTransformFeedback(null),e.context=n,e.vertexShader=t,e.fragmentShader=i,!e.isParallelCompiled&&this._finalizePipelineContext(e),o},_0x402caf.prototype._releaseTexture=function(e){_0xb82ccc.prototype._releaseTexture.call(this,e)},_0x402caf.prototype._releaseRenderTargetWrapper=function(e){_0xb82ccc.prototype._releaseRenderTargetWrapper.call(this,e),this.scenes.forEach((function(t){t.postProcesses.forEach((function(t){t._outputTexture===e&&(t._outputTexture=null)})),t.cameras.forEach((function(t){t._postProcesses.forEach((function(t){t&&t._outputTexture===e&&(t._outputTexture=null)}))}))}))},_0x402caf.prototype.getRenderPassNames=function(){return this._renderPassNames},_0x402caf.prototype.getCurrentRenderPassName=function(){return this._renderPassNames[this.currentRenderPassId]},_0x402caf.prototype.createRenderPassId=function(e){var t=++_0x402caf._RenderPassIdCounter;return this._renderPassNames[t]=null!=e?e:"NONAME",t},_0x402caf.prototype.releaseRenderPassId=function(e){this._renderPassNames[e]=void 0;for(var t=0;t<this.scenes.length;++t)for(var i=this.scenes[t],n=0;n<i.meshes.length;++n){var r=i.meshes[n];if(r.subMeshes)for(var o=0;o<r.subMeshes.length;++o){r.subMeshes[o]._removeDrawWrapper(e)}}},_0x402caf.prototype._rescaleTexture=function(e,t,i,n,r){var o=this;this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE);var a=this.createRenderTargetTexture({width:t.width,height:t.height},{generateMipMaps:!1,type:_0x354cf8.TEXTURETYPE_UNSIGNED_INT,samplingMode:_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE,generateDepthBuffer:!1,generateStencilBuffer:!1});!this._rescalePostProcess&&_0x402caf._RescalePostProcessFactory&&(this._rescalePostProcess=_0x402caf._RescalePostProcessFactory(this)),this._rescalePostProcess.externalTextureSamplerBinding=!0,this._rescalePostProcess.getEffect().executeWhenCompiled((function(){o._rescalePostProcess.onApply=function(t){t._bindTexture("textureSampler",e)};var s=i;!s&&(s=o.scenes[o.scenes.length-1]),s.postProcessManager.directRender([o._rescalePostProcess],a,!0),o._bindTextureDirectly(o._gl.TEXTURE_2D,t,!0),o._gl.copyTexImage2D(o._gl.TEXTURE_2D,0,n,0,0,t.width,t.height,0),o.unBindFramebuffer(a),a.dispose(),r&&r()}))},_0x402caf.prototype.getFps=function(){return this._fps},_0x402caf.prototype.getDeltaTime=function(){return this._deltaTime},_0x402caf.prototype._measureFps=function(){this._performanceMonitor.sampleFrame(),this._fps=this._performanceMonitor.averageFPS,this._deltaTime=this._performanceMonitor.instantaneousFrameTime||0},_0x402caf.prototype.wrapWebGLTexture=function(e){var t=new _WebGL_webGLHardwareTexture__WEBPACK_IMPORTED_MODULE_12__.WebGLHardwareTexture(e,this._gl),i=new _Materials_Textures_internalTexture__WEBPACK_IMPORTED_MODULE_2__.InternalTexture(this,_Materials_Textures_internalTexture__WEBPACK_IMPORTED_MODULE_2__.InternalTextureSource.Unknown,!0);return i._hardwareTexture=t,i.isReady=!0,i},_0x402caf.prototype._uploadImageToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=this._gl,o=this._getWebGLTextureType(e.type),a=this._getInternalFormat(e.format),s=this._getRGBABufferInternalSizedFormat(e.type,a),l=e.isCube?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D;this._bindTextureDirectly(l,e,!0),this._unpackFlipY(e.invertY);var u=r.TEXTURE_2D;e.isCube&&(u=r.TEXTURE_CUBE_MAP_POSITIVE_X+i),r.texImage2D(u,n,s,a,o,t),this._bindTextureDirectly(l,null,!0)},_0x402caf.prototype.updateTextureComparisonFunction=function(e,t){if(1!==this.webGLVersion){var i=this._gl;e.isCube?(this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,e,!0),0===t?(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_FUNC,_0x354cf8.LEQUAL),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_MODE,i.NONE)):(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_FUNC,t),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):(this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),0===t?(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_FUNC,_0x354cf8.LEQUAL),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_MODE,i.NONE)):(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_FUNC,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),e._comparisonFunction=t}else _0x41154e.Error("WebGL 1 does not support texture comparison.")},_0x402caf.prototype.createInstancesBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error("Unable to create instance buffer");var i=new _Meshes_WebGL_webGLDataBuffer__WEBPACK_IMPORTED_MODULE_10__.WebGLDataBuffer(t);return i.capacity=e,this.bindArrayBuffer(i),this._gl.bufferData(this._gl.ARRAY_BUFFER,e,this._gl.DYNAMIC_DRAW),i.references=1,i},_0x402caf.prototype.deleteInstancesBuffer=function(e){this._gl.deleteBuffer(e)},_0x402caf.prototype._clientWaitAsync=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=10);var n=this._gl;return new Promise((function(r,o){var a=function(){var s=n.clientWaitSync(e,t,0);s!=n.WAIT_FAILED?s!=n.TIMEOUT_EXPIRED?r():setTimeout(a,i):o()};a()}))},_0x402caf.prototype._readPixelsAsync=function(e,t,i,n,r,o,a){if(this._webGLVersion<2)throw new Error("_readPixelsAsync only work on WebGL2+");var s=this._gl,l=s.createBuffer();s.bindBuffer(s.PIXEL_PACK_BUFFER,l),s.bufferData(s.PIXEL_PACK_BUFFER,a.byteLength,s.STREAM_READ),s.readPixels(e,t,i,n,r,o,0),s.bindBuffer(s.PIXEL_PACK_BUFFER,null);var u=s.fenceSync(s.SYNC_GPU_COMMANDS_COMPLETE,0);return u?(s.flush(),this._clientWaitAsync(u,0,10).then((function(){return s.deleteSync(u),s.bindBuffer(s.PIXEL_PACK_BUFFER,l),s.getBufferSubData(s.PIXEL_PACK_BUFFER,0,a),s.bindBuffer(s.PIXEL_PACK_BUFFER,null),s.deleteBuffer(l),a}))):null},_0x402caf.prototype.dispose=function(){for(this.hideLoadingUI(),this.onNewSceneAddedObservable.clear();this.postProcesses.length;)this.postProcesses[0].dispose();for(this._rescalePostProcess&&this._rescalePostProcess.dispose();this.scenes.length;)this.scenes[0].dispose();for(;this._virtualScenes.length;)this._virtualScenes[0].dispose();1===_0x402caf.Instances.length&&_0x402caf.audioEngine&&(_0x402caf.audioEngine.dispose(),_0x402caf.audioEngine=null),this.disableVR(),(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()&&(window.removeEventListener("blur",this._onBlur),window.removeEventListener("focus",this._onFocus),this._renderingCanvas&&(this._renderingCanvas.removeEventListener("focus",this._onCanvasFocus),this._renderingCanvas.removeEventListener("blur",this._onCanvasBlur),this._renderingCanvas.removeEventListener("pointerout",this._onCanvasPointerOut)),(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsDocumentAvailable)()&&(document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.removeEventListener("mozfullscreenchange",this._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullscreenChange),document.removeEventListener("msfullscreenchange",this._onFullscreenChange),document.removeEventListener("pointerlockchange",this._onPointerLockChange),document.removeEventListener("mspointerlockchange",this._onPointerLockChange),document.removeEventListener("mozpointerlockchange",this._onPointerLockChange),document.removeEventListener("webkitpointerlockchange",this._onPointerLockChange))),_0xb82ccc.prototype.dispose.call(this);var e=_0x402caf.Instances.indexOf(this);e>=0&&_0x402caf.Instances.splice(e,1),this.onResizeObservable.clear(),this.onCanvasBlurObservable.clear(),this.onCanvasFocusObservable.clear(),this.onCanvasPointerOutObservable.clear(),this.onBeginFrameObservable.clear(),this.onEndFrameObservable.clear()},_0x402caf.prototype._disableTouchAction=function(){this._renderingCanvas&&this._renderingCanvas.setAttribute&&(this._renderingCanvas.setAttribute("touch-action","none"),this._renderingCanvas.style.touchAction="none",this._renderingCanvas.style.msTouchAction="none")},_0x402caf.prototype.displayLoadingUI=function(){if((0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var e=this.loadingScreen;e&&e.displayLoadingUI()}},_0x402caf.prototype.hideLoadingUI=function(){if((0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var e=this._loadingScreen;e&&e.hideLoadingUI()}},Object.defineProperty(_0x402caf.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=_0x402caf.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(e){this._loadingScreen=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf.prototype,"loadingUIText",{set:function(e){this.loadingScreen.loadingUIText=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x402caf.prototype,"loadingUIBackgroundColor",{set:function(e){this.loadingScreen.loadingUIBackgroundColor=e},enumerable:!1,configurable:!0}),_0x402caf.prototype.createVideoElement=function(e){return document.createElement("video")},_0x402caf._RequestPointerlock=function(e){e.requestPointerLock=e.requestPointerLock||e.msRequestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock&&(e.requestPointerLock(),e.focus())},_0x402caf._ExitPointerlock=function(){var e=document;document.exitPointerLock=document.exitPointerLock||e.msExitPointerLock||e.mozExitPointerLock||e.webkitExitPointerLock,document.exitPointerLock&&document.exitPointerLock()},_0x402caf._RequestFullscreen=function(e){var t=e.requestFullscreen||e.msRequestFullscreen||e.webkitRequestFullscreen||e.mozRequestFullScreen;t&&t.call(e)},_0x402caf._ExitFullscreen=function(){var e=document;document.exitFullscreen?document.exitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.msCancelFullScreen&&e.msCancelFullScreen()},_0x402caf.prototype.getFontOffset=function(e){var t=document.createElement("span");t.innerHTML="Hg",t.setAttribute("style","font: ".concat(e," !important"));var i=document.createElement("div");i.style.display="inline-block",i.style.width="1px",i.style.height="0px",i.style.verticalAlign="bottom";var n=document.createElement("div");n.style.whiteSpace="nowrap",n.appendChild(t),n.appendChild(i),document.body.appendChild(n);var r=0,o=0;try{o=i.getBoundingClientRect().top-t.getBoundingClientRect().top,i.style.verticalAlign="baseline",r=i.getBoundingClientRect().top-t.getBoundingClientRect().top}finally{document.body.removeChild(n)}return{ascent:r,height:o,descent:o-r}},_0x402caf.ALPHA_DISABLE=_0x354cf8.ALPHA_DISABLE,_0x402caf.ALPHA_ADD=_0x354cf8.ALPHA_ADD,_0x402caf.ALPHA_COMBINE=_0x354cf8.ALPHA_COMBINE,_0x402caf.ALPHA_SUBTRACT=_0x354cf8.ALPHA_SUBTRACT,_0x402caf.ALPHA_MULTIPLY=_0x354cf8.ALPHA_MULTIPLY,_0x402caf.ALPHA_MAXIMIZED=_0x354cf8.ALPHA_MAXIMIZED,_0x402caf.ALPHA_ONEONE=_0x354cf8.ALPHA_ONEONE,_0x402caf.ALPHA_PREMULTIPLIED=_0x354cf8.ALPHA_PREMULTIPLIED,_0x402caf.ALPHA_PREMULTIPLIED_PORTERDUFF=_0x354cf8.ALPHA_PREMULTIPLIED_PORTERDUFF,_0x402caf.ALPHA_INTERPOLATE=_0x354cf8.ALPHA_INTERPOLATE,_0x402caf.ALPHA_SCREENMODE=_0x354cf8.ALPHA_SCREENMODE,_0x402caf.DELAYLOADSTATE_NONE=_0x354cf8.DELAYLOADSTATE_NONE,_0x402caf.DELAYLOADSTATE_LOADED=_0x354cf8.DELAYLOADSTATE_LOADED,_0x402caf.DELAYLOADSTATE_LOADING=_0x354cf8.DELAYLOADSTATE_LOADING,_0x402caf.DELAYLOADSTATE_NOTLOADED=_0x354cf8.DELAYLOADSTATE_NOTLOADED,_0x402caf.NEVER=_0x354cf8.NEVER,_0x402caf.ALWAYS=_0x354cf8.ALWAYS,_0x402caf.LESS=_0x354cf8.LESS,_0x402caf.EQUAL=_0x354cf8.EQUAL,_0x402caf.LEQUAL=_0x354cf8.LEQUAL,_0x402caf.GREATER=_0x354cf8.GREATER,_0x402caf.GEQUAL=_0x354cf8.GEQUAL,_0x402caf.NOTEQUAL=_0x354cf8.NOTEQUAL,_0x402caf.KEEP=_0x354cf8.KEEP,_0x402caf.REPLACE=_0x354cf8.REPLACE,_0x402caf.INCR=_0x354cf8.INCR,_0x402caf.DECR=_0x354cf8.DECR,_0x402caf.INVERT=_0x354cf8.INVERT,_0x402caf.INCR_WRAP=_0x354cf8.INCR_WRAP,_0x402caf.DECR_WRAP=_0x354cf8.DECR_WRAP,_0x402caf.TEXTURE_CLAMP_ADDRESSMODE=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,_0x402caf.TEXTURE_WRAP_ADDRESSMODE=_0x354cf8.TEXTURE_WRAP_ADDRESSMODE,_0x402caf.TEXTURE_MIRROR_ADDRESSMODE=_0x354cf8.TEXTURE_MIRROR_ADDRESSMODE,_0x402caf.TEXTUREFORMAT_ALPHA=_0x354cf8.TEXTUREFORMAT_ALPHA,_0x402caf.TEXTUREFORMAT_LUMINANCE=_0x354cf8.TEXTUREFORMAT_LUMINANCE,_0x402caf.TEXTUREFORMAT_LUMINANCE_ALPHA=_0x354cf8.TEXTUREFORMAT_LUMINANCE_ALPHA,_0x402caf.TEXTUREFORMAT_RGB=_0x354cf8.TEXTUREFORMAT_RGB,_0x402caf.TEXTUREFORMAT_RGBA=_0x354cf8.TEXTUREFORMAT_RGBA,_0x402caf.TEXTUREFORMAT_RED=_0x354cf8.TEXTUREFORMAT_RED,_0x402caf.TEXTUREFORMAT_R=_0x354cf8.TEXTUREFORMAT_R,_0x402caf.TEXTUREFORMAT_RG=_0x354cf8.TEXTUREFORMAT_RG,_0x402caf.TEXTUREFORMAT_RED_INTEGER=_0x354cf8.TEXTUREFORMAT_RED_INTEGER,_0x402caf.TEXTUREFORMAT_R_INTEGER=_0x354cf8.TEXTUREFORMAT_R_INTEGER,_0x402caf.TEXTUREFORMAT_RG_INTEGER=_0x354cf8.TEXTUREFORMAT_RG_INTEGER,_0x402caf.TEXTUREFORMAT_RGB_INTEGER=_0x354cf8.TEXTUREFORMAT_RGB_INTEGER,_0x402caf.TEXTUREFORMAT_RGBA_INTEGER=_0x354cf8.TEXTUREFORMAT_RGBA_INTEGER,_0x402caf.TEXTURETYPE_UNSIGNED_BYTE=_0x354cf8.TEXTURETYPE_UNSIGNED_BYTE,_0x402caf.TEXTURETYPE_UNSIGNED_INT=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,_0x402caf.TEXTURETYPE_FLOAT=_0x354cf8.TEXTURETYPE_FLOAT,_0x402caf.TEXTURETYPE_HALF_FLOAT=_0x354cf8.TEXTURETYPE_HALF_FLOAT,_0x402caf.TEXTURETYPE_BYTE=_0x354cf8.TEXTURETYPE_BYTE,_0x402caf.TEXTURETYPE_SHORT=_0x354cf8.TEXTURETYPE_SHORT,_0x402caf.TEXTURETYPE_UNSIGNED_SHORT=_0x354cf8.TEXTURETYPE_UNSIGNED_SHORT,_0x402caf.TEXTURETYPE_INT=_0x354cf8.TEXTURETYPE_INT,_0x402caf.TEXTURETYPE_UNSIGNED_INTEGER=_0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER,_0x402caf.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=_0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4,_0x402caf.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=_0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1,_0x402caf.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=_0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,_0x402caf.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=_0x354cf8.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV,_0x402caf.TEXTURETYPE_UNSIGNED_INT_24_8=_0x354cf8.TEXTURETYPE_UNSIGNED_INT_24_8,_0x402caf.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=_0x354cf8.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV,_0x402caf.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=_0x354cf8.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV,_0x402caf.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=_0x354cf8.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV,_0x402caf.TEXTURE_NEAREST_SAMPLINGMODE=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,_0x402caf.TEXTURE_BILINEAR_SAMPLINGMODE=_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE,_0x402caf.TEXTURE_TRILINEAR_SAMPLINGMODE=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE,_0x402caf.TEXTURE_NEAREST_NEAREST_MIPLINEAR=_0x354cf8.TEXTURE_NEAREST_NEAREST_MIPLINEAR,_0x402caf.TEXTURE_LINEAR_LINEAR_MIPNEAREST=_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST,_0x402caf.TEXTURE_LINEAR_LINEAR_MIPLINEAR=_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR,_0x402caf.TEXTURE_NEAREST_NEAREST_MIPNEAREST=_0x354cf8.TEXTURE_NEAREST_NEAREST_MIPNEAREST,_0x402caf.TEXTURE_NEAREST_LINEAR_MIPNEAREST=_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPNEAREST,_0x402caf.TEXTURE_NEAREST_LINEAR_MIPLINEAR=_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPLINEAR,_0x402caf.TEXTURE_NEAREST_LINEAR=_0x354cf8.TEXTURE_NEAREST_LINEAR,_0x402caf.TEXTURE_NEAREST_NEAREST=_0x354cf8.TEXTURE_NEAREST_NEAREST,_0x402caf.TEXTURE_LINEAR_NEAREST_MIPNEAREST=_0x354cf8.TEXTURE_LINEAR_NEAREST_MIPNEAREST,_0x402caf.TEXTURE_LINEAR_NEAREST_MIPLINEAR=_0x354cf8.TEXTURE_LINEAR_NEAREST_MIPLINEAR,_0x402caf.TEXTURE_LINEAR_LINEAR=_0x354cf8.TEXTURE_LINEAR_LINEAR,_0x402caf.TEXTURE_LINEAR_NEAREST=_0x354cf8.TEXTURE_LINEAR_NEAREST,_0x402caf.TEXTURE_EXPLICIT_MODE=_0x354cf8.TEXTURE_EXPLICIT_MODE,_0x402caf.TEXTURE_SPHERICAL_MODE=_0x354cf8.TEXTURE_SPHERICAL_MODE,_0x402caf.TEXTURE_PLANAR_MODE=_0x354cf8.TEXTURE_PLANAR_MODE,_0x402caf.TEXTURE_CUBIC_MODE=_0x354cf8.TEXTURE_CUBIC_MODE,_0x402caf.TEXTURE_PROJECTION_MODE=_0x354cf8.TEXTURE_PROJECTION_MODE,_0x402caf.TEXTURE_SKYBOX_MODE=_0x354cf8.TEXTURE_SKYBOX_MODE,_0x402caf.TEXTURE_INVCUBIC_MODE=_0x354cf8.TEXTURE_INVCUBIC_MODE,_0x402caf.TEXTURE_EQUIRECTANGULAR_MODE=_0x354cf8.TEXTURE_EQUIRECTANGULAR_MODE,_0x402caf.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=_0x354cf8.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,_0x402caf.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=_0x354cf8.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,_0x402caf.SCALEMODE_FLOOR=_0x354cf8.SCALEMODE_FLOOR,_0x402caf.SCALEMODE_NEAREST=_0x354cf8.SCALEMODE_NEAREST,_0x402caf.SCALEMODE_CEILING=_0x354cf8.SCALEMODE_CEILING,_0x402caf._RescalePostProcessFactory=null,_0x402caf._RenderPassIdCounter=0;var _0x1adf43=(_0x2601bb=!0,function(e,t){var i=_0x2601bb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2601bb=!1,i}),_0x5ae197=_0x1adf43(void 0,(function(){return _0x5ae197.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ae197).search("(((.+)+)+)+$")})),_0x2601bb;function _0x3a7b63(e,t,i,n,r,o,a,s,l,u,c,h){void 0===n&&(n=null),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null),void 0===c&&(c=""),void 0===h&&(h=_0x4cf79a.GLSL);var d,f,p,_=this;this.name=null,this.defines="",this.onCompiled=null,this.onError=null,this.onBind=null,this.uniqueId=0,this.onCompileObservable=new Observable,this.onErrorObservable=new Observable,this._onBindObservable=null,this._wasPreviouslyReady=!1,this._isDisposed=!1,this._bonesComputationForcedToCPU=!1,this._uniformBuffersNames={},this._multiTarget=!1,this._samplers={},this._isReady=!1,this._compilationError="",this._allFallbacksProcessed=!1,this._uniforms={},this._key="",this._fallbacks=null,this._vertexSourceCodeOverride="",this._fragmentSourceCodeOverride="",this._transformFeedbackVaryings=null,this._pipelineContext=null,this._vertexSourceCode="",this._fragmentSourceCode="",this._rawVertexSourceCode="",this._rawFragmentSourceCode="",this._compiledVertexWGSL="",this._compiledFragmentWGSL="",this.name=e,this._key=c;var m=void 0,g=null;if(t.attributes){var x=t;if(this._engine=i,this._attributesNames=x.attributes,this._uniformsNames=x.uniformsNames.concat(x.samplers),this._samplerList=x.samplers.slice(),this.defines=x.defines,this.onError=x.onError,this.onCompiled=x.onCompiled,this._fallbacks=x.fallbacks,this._indexParameters=x.indexParameters,this._transformFeedbackVaryings=x.transformFeedbackVaryings||null,this._multiTarget=!!x.multiTarget,this._shaderLanguage=null!==(d=x.shaderLanguage)&&void 0!==d?d:_0x4cf79a.GLSL,x.uniformBuffersNames){this._uniformBuffersNamesList=x.uniformBuffersNames.slice();for(var v=0;v<x.uniformBuffersNames.length;v++)this._uniformBuffersNames[x.uniformBuffersNames[v]]=v}g=null!==(f=x.processFinalCode)&&void 0!==f?f:null,m=null!==(p=x.processCodeAfterIncludes)&&void 0!==p?p:void 0}else this._engine=r,this.defines=null==o?"":o,this._uniformsNames=i.concat(n),this._samplerList=n?n.slice():[],this._attributesNames=t,this._uniformBuffersNamesList=[],this._shaderLanguage=h,this.onError=l,this.onCompiled=s,this._indexParameters=u,this._fallbacks=a;this._attributeLocationByName={},this.uniqueId=_0x3a7b63._UniqueIdSeed++;var y,$,b=IsWindowObjectExist()?this._engine.getHostDocument():null;e.vertexSource?y="source:"+e.vertexSource:e.vertexElement?!(y=b?b.getElementById(e.vertexElement):null)&&(y=e.vertexElement):y=e.vertex||e,e.fragmentSource?$="source:"+e.fragmentSource:e.fragmentElement?!($=b?b.getElementById(e.fragmentElement):null)&&($=e.fragmentElement):$=e.fragment||e,this._processingContext=this._engine._getShaderProcessingContext(this._shaderLanguage);var T={defines:this.defines.split("\n"),indexParameters:this._indexParameters,isFragment:!1,shouldUseHighPrecisionShader:this._engine._shouldUseHighPrecisionShader,processor:this._engine._getShaderProcessor(this._shaderLanguage),supportsUniformBuffers:this._engine.supportsUniformBuffers,shadersRepository:_0x54737b.GetShadersRepository(this._shaderLanguage),includesShadersStore:_0x54737b.GetIncludesShadersStore(this._shaderLanguage),version:(100*this._engine.version).toString(),platformName:this._engine.shaderPlatformName,processingContext:this._processingContext,isNDCHalfZRange:this._engine.isNDCHalfZRange,useReverseDepthBuffer:this._engine.useReverseDepthBuffer,processCodeAfterIncludes:m};this._engine._getCompiledShaderFromIndexDB(this._shaderLanguage,c,((i,n,r)=>{i&&(_._compiledVertexWGSL=n,_._compiledFragmentWGSL=r),this._loadShaderAsNormal(e,y,$,g,t,T)}))}_0x5ae197(),_0x3a7b63.prototype._loadShaderAsNormal=function(e,t,i,n,r,o){var a=this,s=[void 0,void 0],l=function(){if(s[0]&&s[1]){o.isFragment=!0;var t=s[0],i=s[1];_0x5539b8.Process(i,o,(function(i){n&&(i=n("fragment",i));var r=_0x5539b8.Finalize(t,i,o);a._useFinalCode(r.vertexCode,r.fragmentCode,e)}),a._engine)}};r.vertexCode?(_0x5539b8.Initialize(o),_0x5539b8.Process(r.vertexCode,o,(function(e){a._rawVertexSourceCode=r.vertexCode,n&&(e=n("vertex",e)),s[0]=e,l()}),a._engine)):this._loadShader(t,"Vertex","",(function(e){_0x5539b8.Initialize(o),_0x5539b8.Process(e,o,(function(t){a._rawVertexSourceCode=e,n&&(t=n("vertex",t)),s[0]=t,l()}),a._engine)})),r.fragmentCode?(a._rawFragmentSourceCode=r.fragmentCode,s[1]=r.fragmentCode,l()):this._loadShader(i,"Fragment","Pixel",(function(e){a._rawFragmentSourceCode=e,s[1]=e,l()}))},Object.defineProperty(_0x3a7b63,"ShadersRepository",{get:function(){return _0x54737b.ShadersRepository},set:function(e){_0x54737b.ShadersRepository=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3a7b63.prototype,"onBindObservable",{get:function(){return!this._onBindObservable&&(this._onBindObservable=new _Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable),this._onBindObservable},enumerable:!1,configurable:!0}),_0x3a7b63.prototype._useFinalCode=function(e,t,i){if(i){var n=i.vertexElement||i.vertex||i.spectorName||i,r=i.fragmentElement||i.fragment||i.spectorName||i;this._vertexSourceCode=(this._shaderLanguage===_0x4cf79a.WGSL?"//":"")+"#define SHADER_NAME vertex:"+n+"\n"+e,this._fragmentSourceCode=(this._shaderLanguage===_0x4cf79a.WGSL?"//":"")+"#define SHADER_NAME fragment:"+r+"\n"+t}else this._vertexSourceCode=e,this._fragmentSourceCode=t;this._prepareEffect()},Object.defineProperty(_0x3a7b63.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),_0x3a7b63.prototype.isReady=function(){try{return this._isReadyInternal()}catch(e){return!1}},_0x3a7b63.prototype._isReadyInternal=function(){return!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady},_0x3a7b63.prototype.getEngine=function(){return this._engine},_0x3a7b63.prototype.getPipelineContext=function(){return this._pipelineContext},_0x3a7b63.prototype.getAttributesNames=function(){return this._attributesNames},_0x3a7b63.prototype.getAttributeLocation=function(e){return this._attributes[e]},_0x3a7b63.prototype.getAttributeLocationByName=function(e){return this._attributeLocationByName[e]},_0x3a7b63.prototype.getAttributesCount=function(){return this._attributes.length},_0x3a7b63.prototype.getUniformIndex=function(e){return this._uniformsNames.indexOf(e)},_0x3a7b63.prototype.getUniform=function(e){return this._uniforms[e]},_0x3a7b63.prototype.getSamplers=function(){return this._samplerList},_0x3a7b63.prototype.getUniformNames=function(){return this._uniformsNames},_0x3a7b63.prototype.getUniformBuffersNames=function(){return this._uniformBuffersNamesList},_0x3a7b63.prototype.getIndexParameters=function(){return this._indexParameters},_0x3a7b63.prototype.getCompilationError=function(){return this._compilationError},_0x3a7b63.prototype.allFallbacksProcessed=function(){return this._allFallbacksProcessed},_0x3a7b63.prototype.executeWhenCompiled=function(e){var t=this;this.isReady()?e(this):(this.onCompileObservable.add((function(t){e(t)})),(!this._pipelineContext||this._pipelineContext.isAsync)&&setTimeout((function(){t._checkIsReady(null)}),16))},_0x3a7b63.prototype._checkIsReady=function(e){var t=this;try{if(this._isReadyInternal())return}catch(t){return void this._processCompilationErrors(t,e)}this._isDisposed||setTimeout((function(){t._checkIsReady(e)}),16)},_0x3a7b63.prototype._loadShader=function(e,t,i,n){if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return void n(GetDOMTextContent(e));if("source:"!==e.substr(0,7))if("base64:"!==e.substr(0,7)){var r,o=_0x54737b.GetShadersStore(this._shaderLanguage);if(o[e+t+"Shader"])n(o[e+t+"Shader"]);else if(i&&o[e+i+"Shader"])n(o[e+i+"Shader"]);else r="."===e[0]||"/"===e[0]||e.indexOf("http")>-1?e:_0x54737b.GetShadersRepository(this._shaderLanguage)+e,this._engine._loadFile(r+"."+t.toLowerCase()+".fx",n)}else{n(window.atob(e.substr(7)))}else n(e.substr(7))},Object.defineProperty(_0x3a7b63.prototype,"vertexSourceCode",{get:function(){var e,t;return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._vertexSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getVertexShaderCode())&&void 0!==t?t:this._vertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3a7b63.prototype,"fragmentSourceCode",{get:function(){var e,t;return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._fragmentSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getFragmentShaderCode())&&void 0!==t?t:this._fragmentSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3a7b63.prototype,"rawVertexSourceCode",{get:function(){return this._rawVertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3a7b63.prototype,"rawFragmentSourceCode",{get:function(){return this._rawFragmentSourceCode},enumerable:!1,configurable:!0}),_0x3a7b63.prototype._rebuildProgram=function(e,t,i,n){var r=this;this._isReady=!1,this._vertexSourceCodeOverride=e,this._fragmentSourceCodeOverride=t,this.onError=function(e,t){n&&n(t)},this.onCompiled=function(){var e=r.getEngine().scenes;if(e)for(var t=0;t<e.length;t++)e[t].markAllMaterialsAsDirty(_0x354cf8.MATERIAL_AllDirtyFlag);r._pipelineContext._handlesSpectorRebuildCallback(i)},this._fallbacks=null,this._prepareEffect()},_0x3a7b63.prototype._prepareEffect=function(){var e=this,t=this._attributesNames,i=this.defines,n=this._pipelineContext;this._isReady=!1;try{var r=this._engine;this._pipelineContext=r.createPipelineContext(this._processingContext),this._pipelineContext._name=this._key;var o=this._rebuildProgram.bind(this);this._compiledVertexWGSL&&this._compiledFragmentWGSL?r._preparePipelineContext(this._pipelineContext,this._compiledVertexWGSL,this._compiledFragmentWGSL,!0,this._rawVertexSourceCode,this._rawFragmentSourceCode,o,null,this._transformFeedbackVaryings,this._key,_0x4cf79a.WGSL):this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?r._preparePipelineContext(this._pipelineContext,this._vertexSourceCodeOverride,this._fragmentSourceCodeOverride,!0,this._rawVertexSourceCode,this._rawFragmentSourceCode,o,null,this._transformFeedbackVaryings,this._key):r._preparePipelineContext(this._pipelineContext,this._vertexSourceCode,this._fragmentSourceCode,!1,this._rawVertexSourceCode,this._rawFragmentSourceCode,o,i,this._transformFeedbackVaryings,this._key),r._executeWhenRenderingStateIsCompiled(this._pipelineContext,(function(){if(e._attributes=[],e._pipelineContext._fillEffectInformation(e,e._uniformBuffersNames,e._uniformsNames,e._uniforms,e._samplerList,e._samplers,t,e._attributes),t)for(var i=0;i<t.length;i++){var o=t[i];e._attributeLocationByName[o]=e._attributes[i]}r.bindSamplers(e),e._compilationError="",e._isReady=!0,e.onCompiled&&e.onCompiled(e),e.onCompileObservable.notifyObservers(e),e.onCompileObservable.clear(),e._fallbacks&&e._fallbacks.unBindMesh(),n&&e.getEngine()._deletePipelineContext(n)})),this._pipelineContext.isAsync&&this._checkIsReady(n)}catch(e){this._processCompilationErrors(e,n)}},_0x3a7b63.prototype._getShaderCodeAndErrorLine=function(e,t,i){var n=i?/FRAGMENT SHADER ERROR: 0:(\d+?):/:/VERTEX SHADER ERROR: 0:(\d+?):/,r=null;if(t&&e){var o=t.match(n);if(o&&2===o.length){var a=parseInt(o[1]),s=e.split("\n",-1);s.length>=a&&(r="Offending line [".concat(a,"] in ").concat(i?"fragment":"vertex"," code: ").concat(s[a-1]))}}return[e,r]},_0x3a7b63.prototype._processCompilationErrors=function(e,t){var i,n,r,o,a;void 0===t&&(t=null),this._compilationError=e.message;var s=this._attributesNames,l=this._fallbacks;if(_0x41154e.Error("Unable to compile compute effect:"),_0x41154e.Error("Uniforms: "+this._uniformsNames.map((function(e){return" "+e}))),_0x41154e.Error("Attributes: "+s.map((function(e){return" "+e}))),_0x41154e.Error("Defines:\r\n"+this.defines),_0x3a7b63.LogShaderCodeOnCompilationError){var u=null,c=null,h=null;(null===(r=this._pipelineContext)||void 0===r?void 0:r._getVertexShaderCode())&&(h=(i=this._getShaderCodeAndErrorLine(this._pipelineContext._getVertexShaderCode(),this._compilationError,!1))[0],u=i[1],h&&(_0x41154e.Error("Vertex code:"),_0x41154e.Error(h))),(null===(o=this._pipelineContext)||void 0===o?void 0:o._getFragmentShaderCode())&&(h=(n=this._getShaderCodeAndErrorLine(null===(a=this._pipelineContext)||void 0===a?void 0:a._getFragmentShaderCode(),this._compilationError,!0))[0],c=n[1],h&&(_0x41154e.Error("Fragment code:"),_0x41154e.Error(h))),u&&_0x41154e.Error(u),c&&_0x41154e.Error(c)}_0x41154e.Error("Error: "+this._compilationError),t&&(this._pipelineContext=t,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this)),l?(this._pipelineContext=null,l.hasMoreFallbacks?(this._allFallbacksProcessed=!1,_0x41154e.Error("Trying next fallback."),this.defines=l.reduce(this.defines,this),this._prepareEffect()):(this._allFallbacksProcessed=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this),this.onErrorObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh())):this._allFallbacksProcessed=!0},Object.defineProperty(_0x3a7b63.prototype,"isSupported",{get:function(){return""===this._compilationError},enumerable:!1,configurable:!0}),_0x3a7b63.prototype._bindTexture=function(e,t){this._engine._bindTexture(this._samplers[e],t,e)},_0x3a7b63.prototype.setTexture=function(e,t){this._engine.setTexture(this._samplers[e],this._uniforms[e],t,e)},_0x3a7b63.prototype.setDepthStencilTexture=function(e,t){this._engine.setDepthStencilTexture(this._samplers[e],this._uniforms[e],t,e)},_0x3a7b63.prototype.setTextureArray=function(e,t){var i=e+"Ex";if(-1===this._samplerList.indexOf(i+"0")){for(var n=this._samplerList.indexOf(e),r=1;r<t.length;r++){var o=i+(r-1).toString();this._samplerList.splice(n+r,0,o)}for(var a=0,s=0,l=this._samplerList;s<l.length;s++){var u=l[s];this._samplers[u]=a,a+=1}}this._engine.setTextureArray(this._samplers[e],this._uniforms[e],t,e)},_0x3a7b63.prototype.setTextureFromPostProcess=function(e,t){this._engine.setTextureFromPostProcess(this._samplers[e],t,e)},_0x3a7b63.prototype.setTextureFromPostProcessOutput=function(e,t){this._engine.setTextureFromPostProcessOutput(this._samplers[e],t,e)},_0x3a7b63.prototype.bindUniformBuffer=function(e,t){var i=this._uniformBuffersNames[t];void 0===i||_0x3a7b63._BaseCache[i]===e&&this._engine._features.useUBOBindingCache||(_0x3a7b63._BaseCache[i]=e,this._engine.bindUniformBufferBase(e,i,t))},_0x3a7b63.prototype.bindUniformBlock=function(e,t){this._engine.bindUniformBlock(this._pipelineContext,e,t)},_0x3a7b63.prototype.setInt=function(e,t){return this._pipelineContext.setInt(e,t),this},_0x3a7b63.prototype.setInt2=function(e,t,i){return this._pipelineContext.setInt2(e,t,i),this},_0x3a7b63.prototype.setInt3=function(e,t,i,n){return this._pipelineContext.setInt3(e,t,i,n),this},_0x3a7b63.prototype.setInt4=function(e,t,i,n,r){return this._pipelineContext.setInt4(e,t,i,n,r),this},_0x3a7b63.prototype.setIntArray=function(e,t){return this._pipelineContext.setIntArray(e,t),this},_0x3a7b63.prototype.setIntArray2=function(e,t){return this._pipelineContext.setIntArray2(e,t),this},_0x3a7b63.prototype.setIntArray3=function(e,t){return this._pipelineContext.setIntArray3(e,t),this},_0x3a7b63.prototype.setIntArray4=function(e,t){return this._pipelineContext.setIntArray4(e,t),this},_0x3a7b63.prototype.setFloatArray=function(e,t){return this._pipelineContext.setArray(e,t),this},_0x3a7b63.prototype.setFloatArray2=function(e,t){return this._pipelineContext.setArray2(e,t),this},_0x3a7b63.prototype.setFloatArray3=function(e,t){return this._pipelineContext.setArray3(e,t),this},_0x3a7b63.prototype.setFloatArray4=function(e,t){return this._pipelineContext.setArray4(e,t),this},_0x3a7b63.prototype.setArray=function(e,t){return this._pipelineContext.setArray(e,t),this},_0x3a7b63.prototype.setArray2=function(e,t){return this._pipelineContext.setArray2(e,t),this},_0x3a7b63.prototype.setArray3=function(e,t){return this._pipelineContext.setArray3(e,t),this},_0x3a7b63.prototype.setArray4=function(e,t){return this._pipelineContext.setArray4(e,t),this},_0x3a7b63.prototype.setMatrices=function(e,t){return this._pipelineContext.setMatrices(e,t),this},_0x3a7b63.prototype.setMatrix=function(e,t){return this._pipelineContext.setMatrix(e,t),this},_0x3a7b63.prototype.setMatrix3x3=function(e,t){return this._pipelineContext.setMatrix3x3(e,t),this},_0x3a7b63.prototype.setMatrix2x2=function(e,t){return this._pipelineContext.setMatrix2x2(e,t),this},_0x3a7b63.prototype.setFloat=function(e,t){return this._pipelineContext.setFloat(e,t),this},_0x3a7b63.prototype.setBool=function(e,t){return this._pipelineContext.setInt(e,t?1:0),this},_0x3a7b63.prototype.setVector2=function(e,t){return this._pipelineContext.setVector2(e,t),this},_0x3a7b63.prototype.setFloat2=function(e,t,i){return this._pipelineContext.setFloat2(e,t,i),this},_0x3a7b63.prototype.setVector3=function(e,t){return this._pipelineContext.setVector3(e,t),this},_0x3a7b63.prototype.setFloat3=function(e,t,i,n){return this._pipelineContext.setFloat3(e,t,i,n),this},_0x3a7b63.prototype.setVector4=function(e,t){return this._pipelineContext.setVector4(e,t),this},_0x3a7b63.prototype.setFloat4=function(e,t,i,n,r){return this._pipelineContext.setFloat4(e,t,i,n,r),this},_0x3a7b63.prototype.setColor3=function(e,t){return this._pipelineContext.setColor3(e,t),this},_0x3a7b63.prototype.setColor4=function(e,t,i){return this._pipelineContext.setColor4(e,t,i),this},_0x3a7b63.prototype.setDirectColor4=function(e,t){return this._pipelineContext.setDirectColor4(e,t),this},_0x3a7b63.prototype.dispose=function(){this._pipelineContext&&this._pipelineContext.dispose(),this._engine._releaseEffect(this),this._isDisposed=!0},_0x3a7b63.RegisterShader=function(e,t,i,n){void 0===n&&(n=_0x4cf79a.GLSL),t&&(_0x54737b.GetShadersStore(n)["".concat(e,"PixelShader")]=t),i&&(_0x54737b.GetShadersStore(n)["".concat(e,"VertexShader")]=i)},_0x3a7b63.ResetCache=function(){_0x3a7b63._BaseCache={}},_0x3a7b63.LogShaderCodeOnCompilationError=!0,_0x3a7b63._UniqueIdSeed=0,_0x3a7b63._BaseCache={},_0x3a7b63.ShadersStore=_0x54737b.ShadersStore,_0x3a7b63.IncludesShadersStore=_0x54737b.IncludesShadersStore;var _0x1ef79a=(_0x2247cd=!0,function(e,t){var i=_0x2247cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2247cd=!1,i}),_0x425ef1=_0x1ef79a(void 0,(function(){return _0x425ef1.toString().search("(((.+)+)+)+$").toString().constructor(_0x425ef1).search("(((.+)+)+)+$")})),_0x2247cd;function _0x39a749(){}_0x425ef1(),_0x39a749.prototype._addUniformToLeftOverUBO=function(e,t,i){var n,r;e=(n=this._getArraySize(e,t,i))[0],t=n[1],r=n[2];for(var o=0;o<this._webgpuProcessingContext.leftOverUniforms.length;o++)if(this._webgpuProcessingContext.leftOverUniforms[o].name===e)return;this._webgpuProcessingContext.leftOverUniforms.push({name:e,type:t,length:r})},_0x39a749.prototype._buildLeftOverUBO=function(){if(!this._webgpuProcessingContext.leftOverUniforms.length)return"";var e=_0x39a749.LeftOvertUBOName,t=this._webgpuProcessingContext.availableBuffers[e];return!t&&(t={binding:this._webgpuProcessingContext.getNextFreeUBOBinding()},this._webgpuProcessingContext.availableBuffers[e]=t,this._addBufferBindingDescription(e,t,_0x572d87.BufferBindingType.Uniform,!0),this._addBufferBindingDescription(e,t,_0x572d87.BufferBindingType.Uniform,!1)),this._generateLeftOverUBOCode(e,t)},_0x39a749.prototype._collectBindingNames=function(){for(var e=0;e<this._webgpuProcessingContext.bindGroupLayoutEntries.length;e++){var t=this._webgpuProcessingContext.bindGroupLayoutEntries[e];if(void 0!==t)for(var i=0;i<t.length;i++){var n=this._webgpuProcessingContext.bindGroupLayoutEntries[e][i],r=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[e][n.binding].name,o=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[e][n.binding].nameInArrayOfTexture;n&&(n.texture||n.externalTexture||n.storageTexture?this._webgpuProcessingContext.textureNames.push(o):n.sampler?this._webgpuProcessingContext.samplerNames.push(r):n.buffer&&this._webgpuProcessingContext.bufferNames.push(r))}else this._webgpuProcessingContext.bindGroupLayoutEntries[e]=[]}},_0x39a749.prototype._preCreateBindGroupEntries=function(){for(var e=this._webgpuProcessingContext.bindGroupEntries,t=0;t<this._webgpuProcessingContext.bindGroupLayoutEntries.length;t++){for(var i=this._webgpuProcessingContext.bindGroupLayoutEntries[t],n=[],r=0;r<i.length;r++){var o=this._webgpuProcessingContext.bindGroupLayoutEntries[t][r];o.sampler||o.texture||o.storageTexture||o.externalTexture?n.push({binding:o.binding,resource:void 0}):o.buffer&&n.push({binding:o.binding,resource:{buffer:void 0,offset:0,size:0}})}e[t]=n}},_0x39a749.prototype._addTextureBindingDescription=function(e,t,i,n,r,o){var a=t.textures[i],s=a.groupIndex,l=a.bindingIndex;if(!this._webgpuProcessingContext.bindGroupLayoutEntries[s]&&(this._webgpuProcessingContext.bindGroupLayoutEntries[s]=[],this._webgpuProcessingContext.bindGroupLayoutEntryInfo[s]=[]),!this._webgpuProcessingContext.bindGroupLayoutEntryInfo[s][l]){var u=void 0;u=null===n?this._webgpuProcessingContext.bindGroupLayoutEntries[s].push({binding:l,visibility:0,externalTexture:{}}):r?this._webgpuProcessingContext.bindGroupLayoutEntries[s].push({binding:l,visibility:0,storageTexture:{access:_0x572d87.StorageTextureAccess.WriteOnly,format:r,viewDimension:n}}):this._webgpuProcessingContext.bindGroupLayoutEntries[s].push({binding:l,visibility:0,texture:{sampleType:t.sampleType,viewDimension:n,multisampled:t.isMultisampled}});var c=t.isTextureArray?e+i:e;this._webgpuProcessingContext.bindGroupLayoutEntryInfo[s][l]={name:e,index:u-1,nameInArrayOfTexture:c}}l=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[s][l].index,this._webgpuProcessingContext.bindGroupLayoutEntries[s][l].visibility|=o?_0x572d87.ShaderStage.Vertex:_0x572d87.ShaderStage.Fragment},_0x39a749.prototype._addSamplerBindingDescription=function(e,t,i){var n=t.binding,r=n.groupIndex,o=n.bindingIndex;if(!this._webgpuProcessingContext.bindGroupLayoutEntries[r]&&(this._webgpuProcessingContext.bindGroupLayoutEntries[r]=[],this._webgpuProcessingContext.bindGroupLayoutEntryInfo[r]=[]),!this._webgpuProcessingContext.bindGroupLayoutEntryInfo[r][o]){var a=this._webgpuProcessingContext.bindGroupLayoutEntries[r].push({binding:o,visibility:0,sampler:{type:t.type}});this._webgpuProcessingContext.bindGroupLayoutEntryInfo[r][o]={name:e,index:a-1}}o=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[r][o].index,this._webgpuProcessingContext.bindGroupLayoutEntries[r][o].visibility|=i?_0x572d87.ShaderStage.Vertex:_0x572d87.ShaderStage.Fragment},_0x39a749.prototype._addBufferBindingDescription=function(e,t,i,n){var r=t.binding,o=r.groupIndex,a=r.bindingIndex;if(!this._webgpuProcessingContext.bindGroupLayoutEntries[o]&&(this._webgpuProcessingContext.bindGroupLayoutEntries[o]=[],this._webgpuProcessingContext.bindGroupLayoutEntryInfo[o]=[]),!this._webgpuProcessingContext.bindGroupLayoutEntryInfo[o][a]){var s=this._webgpuProcessingContext.bindGroupLayoutEntries[o].push({binding:a,visibility:0,buffer:{type:i}});this._webgpuProcessingContext.bindGroupLayoutEntryInfo[o][a]={name:e,index:s-1}}a=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[o][a].index,this._webgpuProcessingContext.bindGroupLayoutEntries[o][a].visibility|=n?_0x572d87.ShaderStage.Vertex:_0x572d87.ShaderStage.Fragment},_0x39a749.prototype._injectStartingAndEndingCode=function(e,t,i,n){if(i){var r=e.indexOf(t);if(r>=0){for(;r++<e.length&&"{"!=e.charAt(r););if(r<e.length){for(;r++<e.length&&"\n"!=e.charAt(r););if(r<e.length){var o=e.substring(0,r+1),a=e.substring(r+1);e=o+i+a}}}}if(n){var s=e.lastIndexOf("}");e=e.substring(0,s),e+=n+"\n}"}return e},_0x39a749.AutoSamplerSuffix="Sampler",_0x39a749.LeftOvertUBOName="LeftOver",_0x39a749.InternalsUBOName="Internals",_0x39a749.UniformSizes={bool:1,int:1,float:1,vec2:2,ivec2:2,vec3:3,ivec3:3,vec4:4,ivec4:4,mat2:4,mat3:12,mat4:16,i32:1,u32:1,f32:1,mat2x2:4,mat3x3:12,mat4x4:16},_0x39a749._SamplerFunctionByWebGLSamplerType={sampler2D:"sampler2D",sampler2DArray:"sampler2DArray",sampler2DShadow:"sampler2DShadow",sampler2DArrayShadow:"sampler2DArrayShadow",samplerCube:"samplerCube",sampler3D:"sampler3D"},_0x39a749._TextureTypeByWebGLSamplerType={sampler2D:"texture2D",sampler2DArray:"texture2DArray",sampler2DShadow:"texture2D",sampler2DArrayShadow:"texture2DArray",samplerCube:"textureCube",samplerCubeArray:"textureCubeArray",sampler3D:"texture3D"},_0x39a749._GpuTextureViewDimensionByWebGPUTextureType={textureCube:_0x572d87.TextureViewDimension.Cube,textureCubeArray:_0x572d87.TextureViewDimension.CubeArray,texture2D:_0x572d87.TextureViewDimension.E2d,texture2DArray:_0x572d87.TextureViewDimension.E2dArray,texture3D:_0x572d87.TextureViewDimension.E3d},_0x39a749._SamplerTypeByWebGLSamplerType={sampler2DShadow:"samplerShadow",sampler2DArrayShadow:"samplerShadow"},_0x39a749._IsComparisonSamplerByWebGPUSamplerType={samplerShadow:!0,samplerArrayShadow:!0,sampler:!1};var _0x276ece=(_0x5c6f7d=!0,function(e,t){var i=_0x5c6f7d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c6f7d=!1,i}),_0x45c3e1=_0x276ece(void 0,(function(){return _0x45c3e1.toString().search("(((.+)+)+)+$").toString().constructor(_0x45c3e1).search("(((.+)+)+)+$")})),_0x5c6f7d;function _0x5ccdc7(e,t){this._name="unnamed",this.shaderProcessingContext=e,this._leftOverUniformsByName={},this.engine=t}_0x45c3e1(),Object.defineProperty(_0x5ccdc7.prototype,"isAsync",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5ccdc7.prototype,"isReady",{get:function(){return!!this.stages},enumerable:!1,configurable:!0}),_0x5ccdc7.prototype._handlesSpectorRebuildCallback=function(){},_0x5ccdc7.prototype._fillEffectInformation=function(e,t,i,n,r,o,a,s){var l=this.engine;e._fragmentSourceCode="",e._vertexSourceCode="";var u,c=this.shaderProcessingContext.availableTextures;for(u=0;u<r.length;u++){var h=r[u],d=c[r[u]];null==d||null==d?(r.splice(u,1),u--):o[h]=u}for(var f=0,p=l.getAttributes(this,a);f<p.length;f++){var _=p[f];s.push(_)}this.buildUniformLayout();var m=[],g=[];for(u=0;u<a.length;u++){var x=s[u];x>=0&&(m.push(a[u]),g.push(x))}this.shaderProcessingContext.attributeNamesFromEffect=m,this.shaderProcessingContext.attributeLocationsFromEffect=g},_0x5ccdc7.prototype.buildUniformLayout=function(){if(this.shaderProcessingContext.leftOverUniforms.length){this.uniformBuffer=new _0x2e52cb(this.engine,void 0,void 0,"leftOver-"+this._name);for(var e=0,t=this.shaderProcessingContext.leftOverUniforms;e<t.length;e++){var i=t[e],n=i.type.replace(/^(.*?)(<.*>)?$/,"$1"),r=_0x39a749.UniformSizes[n];this.uniformBuffer.addUniform(i.name,r,i.length),this._leftOverUniformsByName[i.name]=i.type}this.uniformBuffer.create()}},_0x5ccdc7.prototype.dispose=function(){this.uniformBuffer&&this.uniformBuffer.dispose()},_0x5ccdc7.prototype.setInt=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt(e,t)},_0x5ccdc7.prototype.setInt2=function(e,t,i){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt2(e,t,i)},_0x5ccdc7.prototype.setInt3=function(e,t,i,n){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt3(e,t,i,n)},_0x5ccdc7.prototype.setInt4=function(e,t,i,n,r){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt4(e,t,i,n,r)},_0x5ccdc7.prototype.setIntArray=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateIntArray(e,t)},_0x5ccdc7.prototype.setIntArray2=function(e,t){this.setIntArray(e,t)},_0x5ccdc7.prototype.setIntArray3=function(e,t){this.setIntArray(e,t)},_0x5ccdc7.prototype.setIntArray4=function(e,t){this.setIntArray(e,t)},_0x5ccdc7.prototype.setArray=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateArray(e,t)},_0x5ccdc7.prototype.setArray2=function(e,t){this.setArray(e,t)},_0x5ccdc7.prototype.setArray3=function(e,t){this.setArray(e,t)},_0x5ccdc7.prototype.setArray4=function(e,t){this.setArray(e,t)},_0x5ccdc7.prototype.setMatrices=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrices(e,t)},_0x5ccdc7.prototype.setMatrix=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix(e,t)},_0x5ccdc7.prototype.setMatrix3x3=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix3x3(e,t)},_0x5ccdc7.prototype.setMatrix2x2=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix2x2(e,t)},_0x5ccdc7.prototype.setFloat=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat(e,t)},_0x5ccdc7.prototype.setVector2=function(e,t){this.setFloat2(e,t.x,t.y)},_0x5ccdc7.prototype.setFloat2=function(e,t,i){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat2(e,t,i)},_0x5ccdc7.prototype.setVector3=function(e,t){this.setFloat3(e,t.x,t.y,t.z)},_0x5ccdc7.prototype.setFloat3=function(e,t,i,n){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat3(e,t,i,n)},_0x5ccdc7.prototype.setVector4=function(e,t){this.setFloat4(e,t.x,t.y,t.z,t.w)},_0x5ccdc7.prototype.setFloat4=function(e,t,i,n,r){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat4(e,t,i,n,r)},_0x5ccdc7.prototype.setColor3=function(e,t){this.setFloat3(e,t.r,t.g,t.b)},_0x5ccdc7.prototype.setColor4=function(e,t,i){this.setFloat4(e,t.r,t.g,t.b,i)},_0x5ccdc7.prototype.setDirectColor4=function(e,t){this.setFloat4(e,t.r,t.g,t.b,t.a)},_0x5ccdc7.prototype._getVertexShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.vertex},_0x5ccdc7.prototype._getFragmentShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.fragment};var _0x1c3891=(_0x23b919=!0,function(e,t){var i=_0x23b919?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23b919=!1,i}),_0x31b7bd=_0x1c3891(void 0,(function(){return _0x31b7bd.toString().search("(((.+)+)+)+$").toString().constructor(_0x31b7bd).search("(((.+)+)+)+$")})),_0x23b919;_0x31b7bd();var _0x341fd9=4,_0x391697=65536,_0x33c3e4={mat2:2,mat3:3,mat4:4,mat2x2:2,mat3x3:3,mat4x4:4};function _0x41080c(e){this.shaderLanguage=e,this._attributeNextLocation=0,this._varyingNextLocation=0,this.freeGroupIndex=0,this.freeBindingIndex=0,this.availableVaryings={},this.availableAttributes={},this.availableBuffers={},this.availableTextures={},this.availableSamplers={},this.orderedAttributes=[],this.bindGroupLayoutEntries=[],this.bindGroupLayoutEntryInfo=[],this.bindGroupEntries=[],this.bufferNames=[],this.textureNames=[],this.samplerNames=[],this.leftOverUniforms=[],this._findStartingGroupBinding()}Object.defineProperty(_0x41080c,"KnownUBOs",{get:function(){return _0x41080c._SimplifiedKnownBindings?_0x41080c._SimplifiedKnownUBOs:_0x41080c._KnownUBOs},enumerable:!1,configurable:!0}),_0x41080c.prototype._findStartingGroupBinding=function(){var e=_0x41080c.KnownUBOs,t=[];for(var i in e){var n=e[i].binding;-1!==n.groupIndex&&(void 0===t[n.groupIndex]?t[n.groupIndex]=n.bindingIndex:t[n.groupIndex]=Math.max(t[n.groupIndex],n.bindingIndex))}this.freeGroupIndex=t.length-1,0===this.freeGroupIndex?(this.freeGroupIndex++,this.freeBindingIndex=0):this.freeBindingIndex=t[t.length-1]+1},_0x41080c.prototype.getAttributeNextLocation=function(e,t){var i;void 0===t&&(t=0);var n=this._attributeNextLocation;return this._attributeNextLocation+=(null!==(i=_0x33c3e4[e])&&void 0!==i?i:1)*(t||1),n},_0x41080c.prototype.getVaryingNextLocation=function(e,t){var i;void 0===t&&(t=0);var n=this._varyingNextLocation;return this._varyingNextLocation+=(null!==(i=_0x33c3e4[e])&&void 0!==i?i:1)*(t||1),n},_0x41080c.prototype.getNextFreeUBOBinding=function(){return this._getNextFreeBinding(1)},_0x41080c.prototype._getNextFreeBinding=function(e){if(this.freeBindingIndex>_0x391697-e&&(this.freeGroupIndex++,this.freeBindingIndex=0),this.freeGroupIndex===_0x341fd9)throw"Too many textures or UBOs have been declared and it is not supported in WebGPU.";var t={groupIndex:this.freeGroupIndex,bindingIndex:this.freeBindingIndex};return this.freeBindingIndex+=e,t},_0x41080c._SimplifiedKnownBindings=!0,_0x41080c._SimplifiedKnownUBOs={Scene:{binding:{groupIndex:0,bindingIndex:0}},Light0:{binding:{groupIndex:-1,bindingIndex:-1}},Light1:{binding:{groupIndex:-1,bindingIndex:-1}},Light2:{binding:{groupIndex:-1,bindingIndex:-1}},Light3:{binding:{groupIndex:-1,bindingIndex:-1}},Light4:{binding:{groupIndex:-1,bindingIndex:-1}},Light5:{binding:{groupIndex:-1,bindingIndex:-1}},Light6:{binding:{groupIndex:-1,bindingIndex:-1}},Light7:{binding:{groupIndex:-1,bindingIndex:-1}},Light8:{binding:{groupIndex:-1,bindingIndex:-1}},Light9:{binding:{groupIndex:-1,bindingIndex:-1}},Light10:{binding:{groupIndex:-1,bindingIndex:-1}},Light11:{binding:{groupIndex:-1,bindingIndex:-1}},Light12:{binding:{groupIndex:-1,bindingIndex:-1}},Light13:{binding:{groupIndex:-1,bindingIndex:-1}},Light14:{binding:{groupIndex:-1,bindingIndex:-1}},Light15:{binding:{groupIndex:-1,bindingIndex:-1}},Light16:{binding:{groupIndex:-1,bindingIndex:-1}},Light17:{binding:{groupIndex:-1,bindingIndex:-1}},Light18:{binding:{groupIndex:-1,bindingIndex:-1}},Light19:{binding:{groupIndex:-1,bindingIndex:-1}},Light20:{binding:{groupIndex:-1,bindingIndex:-1}},Light21:{binding:{groupIndex:-1,bindingIndex:-1}},Light22:{binding:{groupIndex:-1,bindingIndex:-1}},Light23:{binding:{groupIndex:-1,bindingIndex:-1}},Light24:{binding:{groupIndex:-1,bindingIndex:-1}},Light25:{binding:{groupIndex:-1,bindingIndex:-1}},Light26:{binding:{groupIndex:-1,bindingIndex:-1}},Light27:{binding:{groupIndex:-1,bindingIndex:-1}},Light28:{binding:{groupIndex:-1,bindingIndex:-1}},Light29:{binding:{groupIndex:-1,bindingIndex:-1}},Light30:{binding:{groupIndex:-1,bindingIndex:-1}},Light31:{binding:{groupIndex:-1,bindingIndex:-1}},Material:{binding:{groupIndex:-1,bindingIndex:-1}},Mesh:{binding:{groupIndex:-1,bindingIndex:-1}},Internals:{binding:{groupIndex:-1,bindingIndex:-1}}},_0x41080c._KnownUBOs={Scene:{binding:{groupIndex:0,bindingIndex:0}},Light0:{binding:{groupIndex:1,bindingIndex:0}},Light1:{binding:{groupIndex:1,bindingIndex:1}},Light2:{binding:{groupIndex:1,bindingIndex:2}},Light3:{binding:{groupIndex:1,bindingIndex:3}},Light4:{binding:{groupIndex:1,bindingIndex:4}},Light5:{binding:{groupIndex:1,bindingIndex:5}},Light6:{binding:{groupIndex:1,bindingIndex:6}},Light7:{binding:{groupIndex:1,bindingIndex:7}},Light8:{binding:{groupIndex:1,bindingIndex:8}},Light9:{binding:{groupIndex:1,bindingIndex:9}},Light10:{binding:{groupIndex:1,bindingIndex:10}},Light11:{binding:{groupIndex:1,bindingIndex:11}},Light12:{binding:{groupIndex:1,bindingIndex:12}},Light13:{binding:{groupIndex:1,bindingIndex:13}},Light14:{binding:{groupIndex:1,bindingIndex:14}},Light15:{binding:{groupIndex:1,bindingIndex:15}},Light16:{binding:{groupIndex:1,bindingIndex:16}},Light17:{binding:{groupIndex:1,bindingIndex:17}},Light18:{binding:{groupIndex:1,bindingIndex:18}},Light19:{binding:{groupIndex:1,bindingIndex:19}},Light20:{binding:{groupIndex:1,bindingIndex:20}},Light21:{binding:{groupIndex:1,bindingIndex:21}},Light22:{binding:{groupIndex:1,bindingIndex:22}},Light23:{binding:{groupIndex:1,bindingIndex:23}},Light24:{binding:{groupIndex:1,bindingIndex:24}},Light25:{binding:{groupIndex:1,bindingIndex:25}},Light26:{binding:{groupIndex:1,bindingIndex:26}},Light27:{binding:{groupIndex:1,bindingIndex:27}},Light28:{binding:{groupIndex:1,bindingIndex:28}},Light29:{binding:{groupIndex:1,bindingIndex:29}},Light30:{binding:{groupIndex:1,bindingIndex:30}},Light31:{binding:{groupIndex:1,bindingIndex:31}},Material:{binding:{groupIndex:2,bindingIndex:0}},Mesh:{binding:{groupIndex:2,bindingIndex:1}},Internals:{binding:{groupIndex:2,bindingIndex:2}}};var _0xe85e33=(_0x45c3ec=!0,function(e,t){var i=_0x45c3ec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45c3ec=!1,i}),_0x36bad7=_0xe85e33(void 0,(function(){return _0x36bad7.toString().search("(((.+)+)+)+$").toString().constructor(_0x36bad7).search("(((.+)+)+)+$")})),_0x45c3ec;function _0x3d24e9(){var e=_0x39a749.call(this,arguments)||this;return e._missingVaryings=[],e._textureArrayProcessing=[],e.shaderLanguage=_0x4cf79a.GLSL,e}function _0x16a3cd(e,t){for(var i=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),n=t.length,r=0;r<n;++r){var o=t[r];if(i.test(o))return!0}return!1}_0x36bad7(),_0x3d24e9.prototype=Object.create(_0x39a749.prototype),_0x3d24e9.prototype.constructor=_0x39a749,_0x3d24e9.prototype._getArraySize=function(e,t,i){var n=0,r=e.indexOf("["),o=e.indexOf("]");if(r>0&&o>0){var a=e.substring(r+1,o);n=+a,isNaN(n)&&(n=+i[a.trim()]),e=e.substr(0,r)}return[e,t,n]},_0x3d24e9.prototype.initializeShaders=function(e){this._webgpuProcessingContext=e,this._missingVaryings.length=0,this._textureArrayProcessing.length=0},_0x3d24e9.prototype.preProcessShaderCode=function(e,t){var i="uniform ".concat(_0x39a749.InternalsUBOName," {\nfloat yFactor__;\nfloat textureOutputHeight__;\n};\n");return t?i+"##INJECTCODE##\n"+e:i+e},_0x3d24e9.prototype.varyingProcessor=function(e,t,i){this._preProcessors=i;var n=/\s*varying\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!=n){var r,o=n[1],a=n[2];t?(r=this._webgpuProcessingContext.availableVaryings[a],this._missingVaryings[r]="",void 0===r&&_0x41154e.Warn('Invalid fragment shader: The varying named "'.concat(a,'" is not declared in the vertex shader! This declaration will be ignored.'))):(r=this._webgpuProcessingContext.getVaryingNextLocation(o,this._getArraySize(a,o,i)[2]),this._webgpuProcessingContext.availableVaryings[a]=r,this._missingVaryings[r]="layout(location = ".concat(r,") in ").concat(o," ").concat(a,";")),e=e.replace(n[0],void 0===r?"":"layout(location = ".concat(r,") ").concat(t?"in":"out"," ").concat(o," ").concat(a,";"))}return e},_0x3d24e9.prototype.attributeProcessor=function(e,t){this._preProcessors=t;var i=/\s*attribute\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!=i){var n=i[1],r=i[2],o=this._webgpuProcessingContext.getAttributeNextLocation(n,this._getArraySize(r,n,t)[2]);this._webgpuProcessingContext.availableAttributes[r]=o,this._webgpuProcessingContext.orderedAttributes[o]=r,e=e.replace(i[0],"layout(location = ".concat(o,") in ").concat(n," ").concat(r,";"))}return e},_0x3d24e9.prototype.uniformProcessor=function(e,t,i){var n,r;this._preProcessors=i;var o=/\s*uniform\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!=o){var a=o[1],s=o[2];if(0===a.indexOf("sampler")||1===a.indexOf("sampler")){var l=0;s=(n=this._getArraySize(s,a,i))[0],a=n[1],l=n[2];var u=this._webgpuProcessingContext.availableTextures[s];if(!u){u={autoBindSampler:!0,isTextureArray:l>0,isStorageTexture:!1,textures:[],sampleType:_0x572d87.TextureSampleType.Float};for(var c=0;c<(l||1);++c)u.textures.push(this._webgpuProcessingContext.getNextFreeUBOBinding())}var h=null!==(r=_0x39a749._SamplerTypeByWebGLSamplerType[a])&&void 0!==r?r:"sampler",d=!!_0x39a749._IsComparisonSamplerByWebGPUSamplerType[h];s.indexOf("depth")>=0&&(d=!0);var f=d?_0x572d87.SamplerBindingType.Comparison:_0x572d87.SamplerBindingType.Filtering,p=s+_0x39a749.AutoSamplerSuffix,_=this._webgpuProcessingContext.availableSamplers[p];!_&&(_={binding:this._webgpuProcessingContext.getNextFreeUBOBinding(),type:f});var m="u"===a.charAt(0)?"u":"i"===a.charAt(0)?"i":"";m&&(a=a.substr(1));var g=d?_0x572d87.TextureSampleType.Depth:"u"===m?_0x572d87.TextureSampleType.Uint:"i"===m?_0x572d87.TextureSampleType.Sint:_0x572d87.TextureSampleType.Float;u.sampleType=g;var x=l>0,v=_.binding.groupIndex,y=_.binding.bindingIndex,$=_0x39a749._SamplerFunctionByWebGLSamplerType[a],b=_0x39a749._TextureTypeByWebGLSamplerType[a],T=_0x39a749._GpuTextureViewDimensionByWebGPUTextureType[b];if(x){var C=[];C.push("layout(set = ".concat(v,", binding = ").concat(y,") uniform ").concat(m).concat(h," ").concat(p,";")),e="\r\n";for(c=0;c<l;++c){var S=u.textures[c].groupIndex,w=u.textures[c].bindingIndex;C.push("layout(set = ".concat(S,", binding = ").concat(w,") uniform ").concat(b," ").concat(s,"Texture").concat(c,";")),e+="".concat(c>0?"\r\n":"","#define ").concat(s).concat(c," ").concat(m).concat($,"(").concat(s,"Texture").concat(c,", ").concat(p,")")}e=C.join("\r\n")+e,this._textureArrayProcessing.push(s)}else l=1,e="layout(set = ".concat(v,", binding = ").concat(y,") uniform ").concat(m).concat(h," ").concat(p,";\n layout(set = ").concat(u.textures[0].groupIndex,", binding = ").concat(u.textures[0].bindingIndex,") uniform ").concat(b," ").concat(s,"Texture;\n #define ").concat(s," ").concat(m).concat($,"(").concat(s,"Texture, ").concat(p,")");this._webgpuProcessingContext.availableTextures[s]=u,this._webgpuProcessingContext.availableSamplers[p]=_,this._addSamplerBindingDescription(p,_,!t);for(c=0;c<l;++c)this._addTextureBindingDescription(s,u,c,T,null,!t)}else this._addUniformToLeftOverUBO(s,a,i),e=""}return e},_0x3d24e9.prototype.uniformBufferProcessor=function(e,t){var i=/uniform\s+(\w+)/gm.exec(e);if(null!=i){var n=i[1],r=this._webgpuProcessingContext.availableBuffers[n];if(!r){var o=_0x41080c.KnownUBOs[n];r={binding:o&&-1!==o.binding.groupIndex?o.binding:this._webgpuProcessingContext.getNextFreeUBOBinding()},this._webgpuProcessingContext.availableBuffers[n]=r}this._addBufferBindingDescription(n,r,_0x572d87.BufferBindingType.Uniform,!t),e=e.replace("uniform","layout(set = ".concat(r.binding.groupIndex,", binding = ").concat(r.binding.bindingIndex,") uniform"))}return e},_0x3d24e9.prototype.postProcessor=function(e,t,i,n,r){var o=e.search(/#extension.+GL_EXT_draw_buffers.+require/);o=-1!==e.search(/glFragData/);if(e=(e=e.replace(/#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g,"")).replace(/texture2D\s*\(/g,"texture("),i){var a,s,l=/##INJECTCODE##/,u=e.split("\n"),c=-1;for(a=0;a<u.length;++a)if(s=u[a],l.test(s)){c=a+1;break}if(c>-1&&_0x16a3cd("gl_FragColor",u)){var h=o?"":"layout(location = 0) out vec4 glFragColor;";u.splice(c,0,h),e=u.join("\n")}var d=e.indexOf("gl_FragCoord")>=0,f=d?"vec4 glFragCoord__;\n":"";e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/texture2DLodEXT\s*\(/g,"textureLod(")).replace(/textureCubeLodEXT\s*\(/g,"textureLod(")).replace(/textureCube\s*\(/g,"texture(")).replace(/gl_FragDepthEXT/g,"gl_FragDepth")).replace(/gl_FragColor/g,"glFragColor")).replace(/gl_FragData/g,"glFragData")).replace(/gl_FragCoord/g,"glFragCoord__")).replace(/dFdy/g,"(-yFactor__)*dFdy")).replace("##INJECTCODE##",f),d&&(e=this._injectStartingAndEndingCode(e,"void main","\n glFragCoord__ = gl_FragCoord;\n if (yFactor__ == 1.) {\n glFragCoord__.y = textureOutputHeight__ - glFragCoord__.y;\n }\n "))}else{if(e=(e=e.replace(/gl_InstanceID/g,"gl_InstanceIndex")).replace(/gl_VertexID/g,"gl_VertexIndex"),-1!==t.indexOf("#define MULTIVIEW"))return"#extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in;\n"+e}if(!i&&-1==e.indexOf("gl_Position.y *= yFactor__")){var p=e.lastIndexOf("}");e=e.substring(0,p),e+="gl_Position.y *= yFactor__;\n",!r.isNDCHalfZRange&&(e+="gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0;\n"),e+="}"}return e},_0x3d24e9.prototype._applyTextureArrayProcessing=function(e,t){for(var i=new RegExp(t+"\\s*\\[(.+)?\\]","gm"),n=i.exec(e);null!=n;){var r=n[1],o=+r;this._preProcessors&&isNaN(o)&&(o=+this._preProcessors[r.trim()]),e=e.replace(n[0],t+o),n=i.exec(e)}return e},_0x3d24e9.prototype._generateLeftOverUBOCode=function(e,t){for(var i="layout(set = ".concat(t.binding.groupIndex,", binding = ").concat(t.binding.bindingIndex,") uniform ").concat(e," {\n "),n=0,r=this._webgpuProcessingContext.leftOverUniforms;n<r.length;n++){var o=r[n];o.length>0?i+=" ".concat(o.type," ").concat(o.name,"[").concat(o.length,"];\n"):i+=" ".concat(o.type," ").concat(o.name,";\n")}return i+="};\n\n"},_0x3d24e9.prototype.finalizeShaders=function(e,t){for(var i=0;i<this._textureArrayProcessing.length;++i){var n=this._textureArrayProcessing[i];e=this._applyTextureArrayProcessing(e,n),t=this._applyTextureArrayProcessing(t,n)}for(i=0;i<this._missingVaryings.length;++i){var r=this._missingVaryings[i];r&&r.length>0&&(t=r+"\n"+t)}var o=this._buildLeftOverUBO();return e=o+e,t=o+t,this._collectBindingNames(),this._preCreateBindGroupEntries(),this._preProcessors=null,{vertexCode:e,fragmentCode:t}};var _0x514109=(_0x5e7b4d=!0,function(e,t){var i=_0x5e7b4d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e7b4d=!1,i}),_0x305c52=_0x514109(void 0,(function(){return _0x305c52.toString().search("(((.+)+)+)+$").toString().constructor(_0x305c52).search("(((.+)+)+)+$")})),_0x5e7b4d;function ExtractBetweenMarkers(e,t,i,n){for(var r=n,o=0,a="";r<i.length;){var s=i.charAt(r);if(a)s===a?'"'===a||"'"===a?"\\"!==i.charAt(r-1)&&(a=""):a="":"*/"===a&&"*"===s&&r+1<i.length&&("/"===i.charAt(r+1)&&(a=""),""===a&&r++);else switch(s){case e:o++;break;case t:o--;break;case'"':case"'":case"`":a=s;break;case"/":if(r+1<i.length){var l=i.charAt(r+1);"/"===l?a="\n":"*"===l&&(a="*/")}}if(r++,0===o)break}return 0===o?r-1:-1}function SkipWhitespaces(e,t){for(;t<e.length;){var i=e[t];if(" "!==i&&"\n"!==i&&"\r"!==i&&"\t"!==i&&"\n"!==i&&" "!==i)break;t++}return t}function IsIdentifierChar(e){var t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||95==t}function RemoveComments(e){for(var t=0,i="",n=!1,r=[];t<e.length;){var o=e.charAt(t);if(i)o===i?'"'===i||"'"===i?("\\"!==e.charAt(t-1)&&(i=""),r.push(o)):(i="",n=!1):"*/"===i&&"*"===o&&t+1<e.length?("/"===e.charAt(t+1)&&(i=""),""===i&&(n=!1,t++)):!n&&r.push(o);else{switch(o){case'"':case"'":case"`":i=o;break;case"/":if(t+1<e.length){var a=e.charAt(t+1);"/"===a?(i="\n",n=!0):"*"===a&&(i="*/",n=!0)}}!n&&r.push(o)}t++}return r.join("")}function FindBackward(e,t,i){for(;t>=0&&e.charAt(t)!==i;)t--;return t}function EscapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}_0x305c52();var _0xd5f34f=(_0x8e00cc=!0,function(e,t){var i=_0x8e00cc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8e00cc=!1,i}),_0x3d45fe=_0xd5f34f(void 0,(function(){return _0x3d45fe.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d45fe).search("(((.+)+)+)+$")})),_0x8e00cc;_0x3d45fe();var _0x251f45="gl_VertexID",_0x373238="gl_InstanceID",_0x111d55="gl_Position",_0x52db28="gl_FragCoord",_0x2dc9d3="gl_FrontFacing",_0x4172bb="gl_FragDepth",_0x47225f="gl_FragColor",_0x14adc6="gl_FragData",_0x35b34d=["gl_FragData0","gl_FragData1","gl_FragData2","gl_FragData3","gl_FragData4","gl_FragData5","gl_FragData6","gl_FragData7"],_0x3f7335="uniforms",_0x67a6d7="internals",_0x179a16={texture_1d:_0x572d87.TextureViewDimension.E1d,texture_2d:_0x572d87.TextureViewDimension.E2d,texture_2d_array:_0x572d87.TextureViewDimension.E2dArray,texture_3d:_0x572d87.TextureViewDimension.E3d,texture_cube:_0x572d87.TextureViewDimension.Cube,texture_cube_array:_0x572d87.TextureViewDimension.CubeArray,texture_multisampled_2d:_0x572d87.TextureViewDimension.E2d,texture_depth_2d:_0x572d87.TextureViewDimension.E2d,texture_depth_2d_array:_0x572d87.TextureViewDimension.E2dArray,texture_depth_cube:_0x572d87.TextureViewDimension.Cube,texture_depth_cube_array:_0x572d87.TextureViewDimension.CubeArray,texture_depth_multisampled_2d:_0x572d87.TextureViewDimension.E2d,texture_storage_1d:_0x572d87.TextureViewDimension.E1d,texture_storage_2d:_0x572d87.TextureViewDimension.E2d,texture_storage_2d_array:_0x572d87.TextureViewDimension.E2dArray,texture_storage_3d:_0x572d87.TextureViewDimension.E3d,texture_external:null};function _0xbbdbb1(){var e=_0x39a749.call(this,arguments)||this;return e.shaderLanguage=_0x4cf79a.WGSL,e.uniformRegexp=/uniform\s+(\w+)\s*:\s*(.+)\s*;/,e.textureRegexp=/var\s+(\w+)\s*:\s*((array<\s*)?(texture_\w+)\s*(<\s*(.+)\s*>)?\s*(,\s*\w+\s*>\s*)?);/,e.noPrecision=!0,e}_0xbbdbb1.prototype=Object.create(_0x39a749.prototype),_0xbbdbb1.prototype.constructor=_0x39a749,_0xbbdbb1.prototype._getArraySize=function(e,t,i){var n=0,r=t.lastIndexOf(">");if(t.indexOf("array")>=0&&r>0){for(var o=r;o>0&&" "!==t.charAt(o)&&","!==t.charAt(o);)o--;var a=t.substring(o+1,r);for(n=+a,isNaN(n)&&(n=+i[a.trim()]);o>0&&(" "===t.charAt(o)||","===t.charAt(o));)o--;t=t.substring(t.indexOf("<")+1,o+1)}return[e,t,n]},_0xbbdbb1.prototype.initializeShaders=function(e){this._webgpuProcessingContext=e,this._attributesWGSL=[],this._attributesDeclWGSL=[],this._attributeNamesWGSL=[],this._varyingsWGSL=[],this._varyingsDeclWGSL=[],this._varyingNamesWGSL=[],this._stridedUniformArrays=[]},_0xbbdbb1.prototype.preProcessShaderCode=function(e){return"struct ".concat(_0x39a749.InternalsUBOName," {\nyFactor__: f32,\ntextureOutputHeight__: f32,\n};\nvar<uniform> ").concat(_0x67a6d7," : ").concat(_0x39a749.InternalsUBOName,";\n")+RemoveComments(e)},_0xbbdbb1.prototype.varyingProcessor=function(e,t,i){var n=/\s*varying\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s*:\s*(.+)\s*;/gm.exec(e);if(null!==n){var r,o=n[2],a=n[1];t?void 0===(r=this._webgpuProcessingContext.availableVaryings[a])&&_0x41154e.Warn('Invalid fragment shader: The varying named "'.concat(a,'" is not declared in the vertex shader! This declaration will be ignored.')):(r=this._webgpuProcessingContext.getVaryingNextLocation(o,this._getArraySize(a,o,i)[2]),this._webgpuProcessingContext.availableVaryings[a]=r,this._varyingsWGSL.push("@location(".concat(r,") ").concat(a," : ").concat(o,",")),this._varyingsDeclWGSL.push("var<private> ".concat(a," : ").concat(o,";")),this._varyingNamesWGSL.push(a)),e=""}return e},_0xbbdbb1.prototype.attributeProcessor=function(e,t){var i=/\s*attribute\s+(\S+)\s*:\s*(.+)\s*;/gm.exec(e);if(null!==i){var n=i[2],r=i[1],o=this._webgpuProcessingContext.getAttributeNextLocation(n,this._getArraySize(r,n,t)[2]);this._webgpuProcessingContext.availableAttributes[r]=o,this._webgpuProcessingContext.orderedAttributes[o]=r,this._attributesWGSL.push("@location(".concat(o,") ").concat(r," : ").concat(n,",")),this._attributesDeclWGSL.push("var<private> ".concat(r," : ").concat(n,";")),this._attributeNamesWGSL.push(r),e=""}return e},_0xbbdbb1.prototype.uniformProcessor=function(e,t,i){var n=this.uniformRegexp.exec(e);if(null!==n){var r=n[2],o=n[1];this._addUniformToLeftOverUBO(o,r,i),e=""}return e},_0xbbdbb1.prototype.textureProcessor=function(e,t,i){var n=this.textureRegexp.exec(e);if(null!==n){var r=n[1],o=n[2],a=!!n[3],s=n[4],l=s.indexOf("storage")>0,u=n[6],c=l?u.substring(0,u.indexOf(",")).trim():null,h=a?this._getArraySize(r,o,i)[2]:0,d=this._webgpuProcessingContext.availableTextures[r];if(d)h=d.textures.length;else{d={isTextureArray:h>0,isStorageTexture:l,textures:[],sampleType:_0x572d87.TextureSampleType.Float,isMultisampled:!1},h=h||1;for(var f=0;f<h;++f)d.textures.push(this._webgpuProcessingContext.getNextFreeUBOBinding())}this._webgpuProcessingContext.availableTextures[r]=d;var p=s.indexOf("depth")>0,_=_0x179a16[s],m=p?_0x572d87.TextureSampleType.Depth:"u32"===u?_0x572d87.TextureSampleType.Uint:"i32"===u?_0x572d87.TextureSampleType.Sint:_0x572d87.TextureSampleType.Float;d.sampleType=m;var g=!!p&&s.indexOf("multisampled")>0;if(d.isMultisampled=g,void 0===_)throw"Can't get the texture dimension corresponding to the texture function \"".concat(s,'"!');if(a){var x=[];for(f=0;f<h;++f){var v=d.textures[f].groupIndex,y=d.textures[f].bindingIndex;x.push("@group(".concat(v,") @binding(").concat(y,") ").concat("var ",r).concat(f," : ").concat(s,"<f32>;"))}e=x.join("\r\n")}else{h=1;var $=d.textures[0],b=$.groupIndex,T=$.bindingIndex;e="@group(".concat(b,") @binding(").concat(T,") ").concat(e)}for(f=0;f<h;++f)this._addTextureBindingDescription(r,d,f,_,c,!t)}return e},_0xbbdbb1.prototype.postProcessor=function(e){return e},_0xbbdbb1.prototype.finalizeShaders=function(e,t){var i=t.indexOf("gl_FragCoord")>=0?"\n if (internals.yFactor__ == 1.) {\n gl_FragCoord.y = internals.textureOutputHeight__ - gl_FragCoord.y;\n }\n ":"";e=this._processSamplers(e,!0),t=this._processSamplers(t,!1),e=this._processCustomBuffers(e,!0),t=this._processCustomBuffers(t,!1);var n=this._buildLeftOverUBO();t=n+t,e=(e=n+e).replace(/#define /g,"//#define "),e=this._processStridedUniformArrays(e);var r=this._varyingsDeclWGSL.join("\n")+"\n",o="var<private> ".concat(_0x251f45," : u32;\nvar<private> ").concat(_0x373238," : u32;\nvar<private> ").concat(_0x111d55," : vec4<f32>;\n"),a=this._attributesDeclWGSL.join("\n")+"\n",s="struct VertexInputs {\n @builtin(vertex_index) vertexIndex : u32,\n @builtin(instance_index) instanceIndex : u32,\n";this._attributesWGSL.length>0&&(s+=this._attributesWGSL.join("\n")),s+="\n};\n";var l="struct FragmentInputs {\n @builtin(position) position : vec4<f32>,\n";this._varyingsWGSL.length>0&&(l+=this._varyingsWGSL.join("\n")),e=o+s+a+(l+="\n};\n")+r+e;for(var u=" var output : FragmentInputs;\n ".concat(_0x251f45," = input.vertexIndex;\n ").concat(_0x373238," = input.instanceIndex;\n"),c=0;c<this._attributeNamesWGSL.length;++c){var h=this._attributeNamesWGSL[c];u+=" ".concat(h," = input.").concat(h,";\n")}var d=" output.position = ".concat(_0x111d55,";\n output.position.y = output.position.y * internals.yFactor__;\n");for(c=0;c<this._varyingNamesWGSL.length;++c){var f=this._varyingNamesWGSL[c];d+=" output.".concat(f," = ").concat(f,";\n")}d+=" return output;",e=this._injectStartingAndEndingCode(e,"fn main",u,d),t=t.replace(/#define /g,"//#define "),t=(t=this._processStridedUniformArrays(t)).replace(/dpdy/g,"(-internals.yFactor__)*dpdy");var p="var<private> ".concat(_0x52db28," : vec4<f32>;\nvar<private> ").concat(_0x2dc9d3," : bool;\nvar<private> ").concat(_0x47225f," : vec4<f32>;\nvar<private> ").concat(_0x4172bb," : f32;\n");p+="var<private> ".concat(_0x35b34d[0]," : vec4<f32>;\nvar<private> ").concat(_0x35b34d[1]," : vec4<f32>;\nvar<private> ").concat(_0x35b34d[2]," : vec4<f32>;\nvar<private> ").concat(_0x35b34d[3]," : vec4<f32>;\nvar<private> ").concat(_0x35b34d[4]," : vec4<f32>;\nvar<private> ").concat(_0x35b34d[5]," : vec4<f32>;\nvar<private> ").concat(_0x35b34d[6]," : vec4<f32>;\nvar<private> ").concat(_0x35b34d[7]," : vec4<f32>;\n");var _="struct FragmentInputs {\n @builtin(position) position : vec4<f32>,\n @builtin(front_facing) frontFacing : bool,\n";this._varyingsWGSL.length>0&&(_+=this._varyingsWGSL.join("\n")),_+="\n};\n";for(var m,g=!1,x=0,v=-1;x>=0;)if((x=t.indexOf(_0x14adc6,x))>=0){var y=x+_0x14adc6.length,$=t.substring(y,y+1);$=parseInt($),v=Math.max($,v),g=!0,x+=_0x14adc6.length}if(g){m="struct FragmentOutputs {\n";for(var b=0;b<v+1;b++)m+=" @location ("+b+") "+_0x35b34d[b]+" : vec4<f32>,\n"}else m="struct FragmentOutputs {\n @location(0) color : vec4<f32>,\n";for(var T=!1,C=0;!(T||(C=t.indexOf(_0x4172bb,C))<0);){var S=C;for(T=!0;C>1&&"\n"!==t.charAt(C);){if("/"===t.charAt(C)&&"/"===t.charAt(C-1)){T=!1;break}C--}C=S+_0x4172bb.length}T&&(m+=" @builtin(frag_depth) fragDepth: f32,\n"),t=p+_+r+(m+="};\n")+t;var w=" var output : FragmentOutputs;\n ".concat(_0x52db28," = input.position;\n ").concat(_0x2dc9d3," = input.frontFacing;\n")+i;for(c=0;c<this._varyingNamesWGSL.length;++c){var E=this._varyingNamesWGSL[c];w+=" ".concat(E," = input.").concat(E,";\n")}var P="";if(g)for(b=0;b<v+1;b++)P+=" output."+_0x35b34d[b]+" = "+_0x35b34d[b]+";\n";else P=" output.color = ".concat(_0x47225f,";\n");return T&&(P+=" output.fragDepth = ".concat(_0x4172bb,";\n")),P+=" return output;",t=this._injectStartingAndEndingCode(t,"fn main",w,P),this._collectBindingNames(),this._preCreateBindGroupEntries(),{vertexCode:e,fragmentCode:t}},_0xbbdbb1.prototype._generateLeftOverUBOCode=function(e,t){for(var i="",n="struct ".concat(e," {\n"),r=0,o=this._webgpuProcessingContext.leftOverUniforms;r<o.length;r++){var a=o[r],s=a.type.replace(/^(.*?)(<.*>)?$/,"$1"),l=_0x39a749.UniformSizes[s];if(a.length>0)if(l<=2){var u="".concat(e,"_").concat(this._stridedUniformArrays.length,"_strided_arr");i+="struct ".concat(u," {\n @size(16)\n el: ").concat(s,",\n }"),this._stridedUniformArrays.push(a.name),n+=" @align(16) ".concat(a.name," : array<").concat(u,", ").concat(a.length,">,\n")}else n+=" ".concat(a.name," : array<").concat(a.type,", ").concat(a.length,">,\n");else n+=" ".concat(a.name," : ").concat(a.type,",\n")}return n+="};\n",n="".concat(i,"\n").concat(n),n+="@group(".concat(t.binding.groupIndex,") @binding(").concat(t.binding.bindingIndex,") var<uniform> ").concat(_0x3f7335," : ").concat(e,";\n")},_0xbbdbb1.prototype._processSamplers=function(e,t){for(var i=/var\s+(\w+Sampler)\s*:\s*(sampler|sampler_comparison)\s*;/gm;;){var n=i.exec(e);if(null===n)break;var r=n[1],o=n[2],a=r.indexOf(_0x39a749.AutoSamplerSuffix)===r.length-_0x39a749.AutoSamplerSuffix.length?r.substring(0,r.indexOf(_0x39a749.AutoSamplerSuffix)):null,s="sampler_comparison"===o?_0x572d87.SamplerBindingType.Comparison:_0x572d87.SamplerBindingType.Filtering;if(a){var l=this._webgpuProcessingContext.availableTextures[a];l&&(l.autoBindSampler=!0)}var u=this._webgpuProcessingContext.availableSamplers[r];!u&&(u={binding:this._webgpuProcessingContext.getNextFreeUBOBinding(),type:s},this._webgpuProcessingContext.availableSamplers[r]=u),this._addSamplerBindingDescription(r,u,t);var c=e.substring(0,n.index),h="@group(".concat(u.binding.groupIndex,") @binding(").concat(u.binding.bindingIndex,") "),d=e.substring(n.index);e=c+h+d,i.lastIndex+=h.length}return e},_0xbbdbb1.prototype._processCustomBuffers=function(e,t){for(var i=/var<\s*(uniform|storage)\s*(,\s*(read|read_write)\s*)?>\s+(\S+)\s*:\s*(\S+)\s*;/gm;;){var n=i.exec(e);if(null===n)break;var r=n[1],o=n[3],a=n[4],s=n[5],l=this._webgpuProcessingContext.availableBuffers[a];if(!l){var u="uniform"===r?_0x41080c.KnownUBOs[s]:null,c=void 0;u?(a=s,-1===(c=u.binding).groupIndex&&(c=this._webgpuProcessingContext.getNextFreeUBOBinding())):c=this._webgpuProcessingContext.getNextFreeUBOBinding(),l={binding:c},this._webgpuProcessingContext.availableBuffers[a]=l}this._addBufferBindingDescription(a,this._webgpuProcessingContext.availableBuffers[a],"read_write"===o?_0x572d87.BufferBindingType.Storage:"storage"===r?_0x572d87.BufferBindingType.ReadOnlyStorage:_0x572d87.BufferBindingType.Uniform,t);var h=l.binding.groupIndex,d=l.binding.bindingIndex,f=e.substring(0,n.index),p="@group(".concat(h,") @binding(").concat(d,") "),_=e.substring(n.index);e=f+p+_,i.lastIndex+=p.length}return e},_0xbbdbb1.prototype._processStridedUniformArrays=function(e){for(var t=0,i=this._stridedUniformArrays;t<i.length;t++){var n=i[t];e=e.replace(new RegExp("".concat(n,"\\s*\\[(.*)\\]"),"g"),"".concat(n,"[$1].el"))}return e};var _0x25fc04=(_0x1cdcd1=!0,function(e,t){var i=_0x1cdcd1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1cdcd1=!1,i}),_0x2e1524=_0x25fc04(void 0,(function(){return _0x2e1524.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e1524).search("(((.+)+)+)+$")})),_0x1cdcd1;function _0x5c4f17(){this.colorAttachmentGPUTextures=[],this.reset()}_0x2e1524(),_0x5c4f17.prototype.reset=function(e){void 0===e&&(e=!1),this.renderPass=null,e&&(this.renderPassDescriptor=null,this.colorAttachmentViewDescriptor=null,this.depthAttachmentViewDescriptor=null,this.colorAttachmentGPUTextures=[],this.depthTextureFormat=void 0)};var _0x1c4dc2=(_0xd8b3ab=!0,function(e,t){var i=_0xd8b3ab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd8b3ab=!1,i}),_0x3854c7=_0x1c4dc2(void 0,(function(){return _0x3854c7.toString().search("(((.+)+)+)+$").toString().constructor(_0x3854c7).search("(((.+)+)+)+$")})),_0xd8b3ab;_0x3854c7();var _0x3ae23a=[0,0,3,7,0,2,6,2,4,1,5,3,1],_0x46bb06=[0,64,32,96,16,80,48,112,8],_0x33a194=[0,128,128,0,0,0,0,128,0,0,0,0,128],_0x46da76;function _0x408e52(e){this._samplers={},this._device=e,this.disabled=!1}_0x408e52.GetSamplerHashCode=function(e){var t,i,n,r=e._cachedAnisotropicFilteringLevel&&e._cachedAnisotropicFilteringLevel>1?4:1;return _0x3ae23a[e.samplingMode]+_0x46bb06[(e._comparisonFunction||514)-512+1]+_0x33a194[e.samplingMode]+((null!==(t=e._cachedWrapU)&&void 0!==t?t:1)<<8)+((null!==(i=e._cachedWrapV)&&void 0!==i?i:1)<<10)+((null!==(n=e._cachedWrapR)&&void 0!==n?n:1)<<12)+((e.useMipMaps?1:0)<<14)+(r<<15)},_0x408e52._GetSamplerFilterDescriptor=function(e,t){var i,n,r,o,a,s=e.useMipMaps;switch(e.samplingMode){case _0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST:i=_0x572d87.FilterMode.Linear,n=_0x572d87.FilterMode.Linear,r=_0x572d87.FilterMode.Nearest,!s&&(o=a=0);break;case _0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR:case _0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE:i=_0x572d87.FilterMode.Linear,n=_0x572d87.FilterMode.Linear,s?r=_0x572d87.FilterMode.Linear:(r=_0x572d87.FilterMode.Nearest,o=a=0);break;case _0x354cf8.TEXTURE_NEAREST_NEAREST_MIPLINEAR:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Nearest,s?r=_0x572d87.FilterMode.Linear:(r=_0x572d87.FilterMode.Nearest,o=a=0);break;case _0x354cf8.TEXTURE_NEAREST_NEAREST_MIPNEAREST:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Nearest,r=_0x572d87.FilterMode.Nearest,!s&&(o=a=0);break;case _0x354cf8.TEXTURE_NEAREST_LINEAR_MIPNEAREST:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Linear,r=_0x572d87.FilterMode.Nearest,!s&&(o=a=0);break;case _0x354cf8.TEXTURE_NEAREST_LINEAR_MIPLINEAR:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Linear,s?r=_0x572d87.FilterMode.Linear:(r=_0x572d87.FilterMode.Nearest,o=a=0);break;case _0x354cf8.TEXTURE_NEAREST_LINEAR:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Linear,r=_0x572d87.FilterMode.Nearest,o=a=0;break;case _0x354cf8.TEXTURE_NEAREST_NEAREST:case _0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Nearest,r=_0x572d87.FilterMode.Nearest,o=a=0;break;case _0x354cf8.TEXTURE_LINEAR_NEAREST_MIPNEAREST:i=_0x572d87.FilterMode.Linear,n=_0x572d87.FilterMode.Nearest,r=_0x572d87.FilterMode.Nearest,!s&&(o=a=0);break;case _0x354cf8.TEXTURE_LINEAR_NEAREST_MIPLINEAR:i=_0x572d87.FilterMode.Linear,n=_0x572d87.FilterMode.Nearest,s?r=_0x572d87.FilterMode.Linear:(r=_0x572d87.FilterMode.Nearest,o=a=0);break;case _0x354cf8.TEXTURE_LINEAR_LINEAR:case _0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE:i=_0x572d87.FilterMode.Linear,n=_0x572d87.FilterMode.Linear,r=_0x572d87.FilterMode.Nearest,o=a=0;break;case _0x354cf8.TEXTURE_LINEAR_NEAREST:i=_0x572d87.FilterMode.Linear,n=_0x572d87.FilterMode.Nearest,r=_0x572d87.FilterMode.Nearest,o=a=0;break;default:i=_0x572d87.FilterMode.Nearest,n=_0x572d87.FilterMode.Nearest,r=_0x572d87.FilterMode.Nearest,o=a=0}return t>1&&(0!==o||0!==a)?{magFilter:_0x572d87.FilterMode.Linear,minFilter:_0x572d87.FilterMode.Linear,mipmapFilter:_0x572d87.FilterMode.Linear,anisotropyEnabled:!0}:{magFilter:i,minFilter:n,mipmapFilter:r,lodMinClamp:o,lodMaxClamp:a}},_0x408e52._GetWrappingMode=function(e){switch(e){case _0x354cf8.TEXTURE_WRAP_ADDRESSMODE:return _0x572d87.AddressMode.Repeat;case _0x354cf8.TEXTURE_CLAMP_ADDRESSMODE:return _0x572d87.AddressMode.ClampToEdge;case _0x354cf8.TEXTURE_MIRROR_ADDRESSMODE:return _0x572d87.AddressMode.MirrorRepeat}return _0x572d87.AddressMode.Repeat},_0x408e52._GetSamplerWrappingDescriptor=function(e){return{addressModeU:this._GetWrappingMode(e._cachedWrapU),addressModeV:this._GetWrappingMode(e._cachedWrapV),addressModeW:this._GetWrappingMode(e._cachedWrapR)}},_0x408e52._GetSamplerDescriptor=function(e){var t=e.useMipMaps&&e._cachedAnisotropicFilteringLevel&&e._cachedAnisotropicFilteringLevel>1?4:1,i=this._GetSamplerFilterDescriptor(e,t),n=p$19(i,this._GetSamplerWrappingDescriptor(e));return n=p$19(n,{compare:e._comparisonFunction?_0x408e52.GetCompareFunction(e._comparisonFunction):void 0,maxAnisotropy:i.anisotropyEnabled?t:1})},_0x408e52.GetCompareFunction=function(e){switch(e){case _0x354cf8.ALWAYS:return _0x572d87.CompareFunction.Always;case _0x354cf8.EQUAL:return _0x572d87.CompareFunction.Equal;case _0x354cf8.GREATER:return _0x572d87.CompareFunction.Greater;case _0x354cf8.GEQUAL:return _0x572d87.CompareFunction.GreaterEqual;case _0x354cf8.LESS:return _0x572d87.CompareFunction.Less;case _0x354cf8.LEQUAL:return _0x572d87.CompareFunction.LessEqual;case _0x354cf8.NEVER:return _0x572d87.CompareFunction.Never;case _0x354cf8.NOTEQUAL:return _0x572d87.CompareFunction.NotEqual;default:return _0x572d87.CompareFunction.Less}},_0x408e52.prototype.getSampler=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=0),this.disabled)return this._device.createSampler(_0x408e52._GetSamplerDescriptor(e));t?i=0:0===i&&(i=_0x408e52.GetSamplerHashCode(e));var n=t?void 0:this._samplers[i];return!n&&(n=this._device.createSampler(_0x408e52._GetSamplerDescriptor(e)),!t&&(this._samplers[i]=n)),n},function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.StencilReadMask=0]="StencilReadMask",e[e.StencilWriteMask=1]="StencilWriteMask",e[e.DepthBias=2]="DepthBias",e[e.DepthBiasSlopeScale=3]="DepthBiasSlopeScale",e[e.DepthStencilState=4]="DepthStencilState",e[e.MRTAttachments1=5]="MRTAttachments1",e[e.MRTAttachments2=6]="MRTAttachments2",e[e.RasterizationState=7]="RasterizationState",e[e.ColorStates=8]="ColorStates",e[e.ShaderStage=9]="ShaderStage",e[e.TextureStage=10]="TextureStage",e[e.VertexState=11]="VertexState",e[e.NumStates=12]="NumStates"}(_0x46da76||(_0x46da76={}));var _0x2de812={0:1,1:2,768:3,769:4,770:5,771:6,772:7,773:8,774:9,775:10,776:11,32769:12,32770:13,32771:12,32772:13},_0x4bda0e={0:0,7680:1,7681:2,7682:3,7683:4,5386:5,34055:6,34056:7};function _0x2541a9(e,t,i){this.mrtTextureCount=0,this._device=e,this._useTextureStage=i,this._states=new Array(30),this._statesLength=0,this._stateDirtyLowestIndex=0,this._emptyVertexBuffer=t,this._mrtFormats=[],this._parameter={token:void 0,pipeline:null},this.disabled=!1,this.vertexBuffers=[],this._kMaxVertexBufferStride=e.limits.maxVertexBufferArrayStride||2048,this.reset()}_0x2541a9.prototype.reset=function(){this._isDirty=!0,this.vertexBuffers.length=0,this.setAlphaToCoverage(!1),this.resetDepthCullingState(),this.setClampDepth(!1),this.setDepthBias(0),this._webgpuColorFormat=[_0x572d87.TextureFormat.BGRA8Unorm],this.setColorFormat(_0x572d87.TextureFormat.BGRA8Unorm),this.setMRT([]),this.setAlphaBlendEnabled(!1),this.setAlphaBlendFactors([null,null,null,null],[null,null]),this.setWriteMask(15),this.setDepthStencilFormat(_0x572d87.TextureFormat.Depth24PlusStencil8),this.setStencilEnabled(!1),this.resetStencilState(),this.setBuffers(null,null,null),this._setTextureState(0)},Object.defineProperty(_0x2541a9.prototype,"colorFormats",{get:function(){return this._mrtAttachments1>0?this._mrtFormats:this._webgpuColorFormat},enumerable:!1,configurable:!0}),_0x2541a9.prototype.getRenderPipeline=function(e,t,i,n){if(void 0===n&&(n=0),i>1&&(i=4),this.disabled){var r=_0x2541a9._GetTopology(e);return this._setVertexState(t),this._parameter.pipeline=this._createRenderPipeline(t,r,i),_0x2541a9.NumCacheMiss++,_0x2541a9._NumPipelineCreationCurrentFrame++,this._parameter.pipeline}if(this._setShaderStage(t.uniqueId),this._setRasterizationState(e,i),this._setColorStates(),this._setDepthStencilState(),this._setVertexState(t),this._setTextureState(n),this.lastStateDirtyLowestIndex=this._stateDirtyLowestIndex,!this._isDirty&&this._parameter.pipeline)return this._stateDirtyLowestIndex=this._statesLength,_0x2541a9.NumCacheHitWithoutHash++,this._parameter.pipeline;if(this._getRenderPipeline(this._parameter),this._isDirty=!1,this._stateDirtyLowestIndex=this._statesLength,this._parameter.pipeline)return _0x2541a9.NumCacheHitWithHash++,this._parameter.pipeline;var o=_0x2541a9._GetTopology(e);return this._parameter.pipeline=this._createRenderPipeline(t,o,i),this._setRenderPipeline(this._parameter),_0x2541a9.NumCacheMiss++,_0x2541a9._NumPipelineCreationCurrentFrame++,this._parameter.pipeline},_0x2541a9.prototype.endFrame=function(){_0x2541a9.NumPipelineCreationLastFrame=_0x2541a9._NumPipelineCreationCurrentFrame,_0x2541a9._NumPipelineCreationCurrentFrame=0},_0x2541a9.prototype.setAlphaToCoverage=function(e){this._alphaToCoverageEnabled=e},_0x2541a9.prototype.setFrontFace=function(e){this._frontFace=e},_0x2541a9.prototype.setCullEnabled=function(e){this._cullEnabled=e},_0x2541a9.prototype.setCullFace=function(e){this._cullFace=e},_0x2541a9.prototype.setClampDepth=function(e){this._clampDepth=e},_0x2541a9.prototype.resetDepthCullingState=function(){this.setDepthCullingState(!1,2,1,0,0,!0,!0,_0x354cf8.ALWAYS)},_0x2541a9.prototype.setDepthCullingState=function(e,t,i,n,r,o,a,s){this._depthWriteEnabled=a,this._depthTestEnabled=o,this._depthCompare=(null!=s?s:_0x354cf8.ALWAYS)-512,this._cullFace=i,this._cullEnabled=e,this._frontFace=t,this.setDepthBiasSlopeScale(n),this.setDepthBias(r)},_0x2541a9.prototype.setDepthBias=function(e){this._depthBias!==e&&(this._depthBias=e,this._states[_0x46da76.DepthBias]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.DepthBias))},_0x2541a9.prototype.setDepthBiasSlopeScale=function(e){this._depthBiasSlopeScale!==e&&(this._depthBiasSlopeScale=e,this._states[_0x46da76.DepthBiasSlopeScale]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.DepthBiasSlopeScale))},_0x2541a9.prototype.setColorFormat=function(e){this._webgpuColorFormat[0]=e,this._colorFormat=renderableTextureFormatToIndex[null!=e?e:""]},_0x2541a9.prototype.setMRTAttachments=function(e){this.mrtAttachments=e;for(var t=0,i=0;i<e.length;++i)0!==e[i]&&(t+=1<<i);this._mrtEnabledMask!==t&&(this._mrtEnabledMask=t,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.MRTAttachments1))},_0x2541a9.prototype.setMRT=function(e,t){var i,n;if((t=null!=t?t:e.length)>10)throw"Can't handle more than 10 attachments for a MRT in cache render pipeline!";this.mrtTextureArray=e,this.mrtTextureCount=t,this._mrtEnabledMask=65535;for(var r=[0,0],o=0,a=0,s=0,l=0;l<t;++l){var u=e[l],c=null==u?void 0:u._hardwareTexture;this._mrtFormats[s]=null!==(i=null==c?void 0:c.format)&&void 0!==i?i:this._webgpuColorFormat[0],r[o]+=renderableTextureFormatToIndex[null!==(n=this._mrtFormats[s])&&void 0!==n?n:""]<<a,s++,(a+=6)>=32&&(a=0,o++)}this._mrtFormats.length=s,(this._mrtAttachments1!==r[0]||this._mrtAttachments2!==r[1])&&(this._mrtAttachments1=r[0],this._mrtAttachments2=r[1],this._states[_0x46da76.MRTAttachments1]=r[0],this._states[_0x46da76.MRTAttachments2]=r[1],this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.MRTAttachments1))},_0x2541a9.prototype.setAlphaBlendEnabled=function(e){this._alphaBlendEnabled=e},_0x2541a9.prototype.setAlphaBlendFactors=function(e,t){this._alphaBlendFuncParams=e,this._alphaBlendEqParams=t},_0x2541a9.prototype.setWriteMask=function(e){this._writeMask=e},_0x2541a9.prototype.setDepthStencilFormat=function(e){this._webgpuDepthStencilFormat=e,this._depthStencilFormat=void 0===e?0:renderableTextureFormatToIndex[e]},_0x2541a9.prototype.setDepthTestEnabled=function(e){this._depthTestEnabled=e},_0x2541a9.prototype.setDepthWriteEnabled=function(e){this._depthWriteEnabled=e},_0x2541a9.prototype.setDepthCompare=function(e){this._depthCompare=(null!=e?e:_0x354cf8.ALWAYS)-512},_0x2541a9.prototype.setStencilEnabled=function(e){this._stencilEnabled=e},_0x2541a9.prototype.setStencilCompare=function(e,t){e===_0x354cf8.FRONT?this._stencilFrontCompare=(null!=t?t:_0x354cf8.ALWAYS)-512:this._stencilBackCompare=(null!=t?t:_0x354cf8.ALWAYS)-512},_0x2541a9.prototype.setStencilDepthFailOp=function(e,t){e===_0x354cf8.FRONT?this._stencilFrontDepthFailOp=null===t?1:_0x4bda0e[t]:this._stencilBackDepthFailOp=null===t?1:_0x4bda0e[t]},_0x2541a9.prototype.setStencilPassOp=function(e,t){e===_0x354cf8.FRONT?this._stencilFrontPassOp=null===t?2:_0x4bda0e[t]:this._stencilBackPassOp=null===t?2:_0x4bda0e[t]},_0x2541a9.prototype.setStencilFailOp=function(e,t){e===_0x354cf8.FRONT?this._stencilFrontFailOp=null===t?1:_0x4bda0e[t]:this._stencilBackFailOp=null===t?1:_0x4bda0e[t]},_0x2541a9.prototype.setStencilReadMask=function(e){this._stencilReadMask!==e&&(this._stencilReadMask=e,this._states[_0x46da76.StencilReadMask]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.StencilReadMask))},_0x2541a9.prototype.setStencilWriteMask=function(e){this._stencilWriteMask!==e&&(this._stencilWriteMask=e,this._states[_0x46da76.StencilWriteMask]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.StencilWriteMask))},_0x2541a9.prototype.resetStencilState=function(){this.setStencilState(_0x354cf8.FRONT,!1,_0x354cf8.ALWAYS,_0x354cf8.KEEP,_0x354cf8.REPLACE,_0x354cf8.KEEP,255,255),this.setStencilState(_0x354cf8.BACK,!1,_0x354cf8.ALWAYS,_0x354cf8.KEEP,_0x354cf8.REPLACE,_0x354cf8.KEEP,255,255)},_0x2541a9.prototype.setStencilState=function(e,t,i,n,r,o,a,s){this._stencilEnabled=t,e===_0x354cf8.FRONT?(this._stencilFrontCompare=(null!=i?i:_0x354cf8.ALWAYS)-512,this._stencilFrontDepthFailOp=null===n?1:_0x4bda0e[n],this._stencilFrontPassOp=null===r?2:_0x4bda0e[r],this._stencilFrontFailOp=null===o?1:_0x4bda0e[o]):(this._stencilBackCompare=(null!=i?i:_0x354cf8.ALWAYS)-512,this._stencilBackDepthFailOp=null===n?1:_0x4bda0e[n],this._stencilBackPassOp=null===r?2:_0x4bda0e[r],this._stencilBackFailOp=null===o?1:_0x4bda0e[o]),this.setStencilReadMask(a),this.setStencilWriteMask(s)},_0x2541a9.prototype.setBuffers=function(e,t,i){this._vertexBuffers=e,this._overrideVertexBuffers=i,this._indexBuffer=t},_0x2541a9._GetTopology=function(e){switch(e){case _0x354cf8.MATERIAL_TriangleFillMode:return _0x572d87.PrimitiveTopology.TriangleList;case _0x354cf8.MATERIAL_PointFillMode:return _0x572d87.PrimitiveTopology.PointList;case _0x354cf8.MATERIAL_WireFrameFillMode:return _0x572d87.PrimitiveTopology.LineList;case _0x354cf8.MATERIAL_PointListDrawMode:return _0x572d87.PrimitiveTopology.PointList;case _0x354cf8.MATERIAL_LineListDrawMode:return _0x572d87.PrimitiveTopology.LineList;case _0x354cf8.MATERIAL_LineLoopDrawMode:throw"LineLoop is an unsupported fillmode in WebGPU";case _0x354cf8.MATERIAL_LineStripDrawMode:return _0x572d87.PrimitiveTopology.LineStrip;case _0x354cf8.MATERIAL_TriangleStripDrawMode:return _0x572d87.PrimitiveTopology.TriangleStrip;case _0x354cf8.MATERIAL_TriangleFanDrawMode:throw"TriangleFan is an unsupported fillmode in WebGPU";default:return _0x572d87.PrimitiveTopology.TriangleList}},_0x2541a9._GetAphaBlendOperation=function(e){switch(e){case _0x354cf8.GL_ALPHA_EQUATION_ADD:return _0x572d87.BlendOperation.Add;case _0x354cf8.GL_ALPHA_EQUATION_SUBTRACT:return _0x572d87.BlendOperation.Subtract;case _0x354cf8.GL_ALPHA_EQUATION_REVERSE_SUBTRACT:return _0x572d87.BlendOperation.ReverseSubtract;case _0x354cf8.GL_ALPHA_EQUATION_MIN:return _0x572d87.BlendOperation.Min;case _0x354cf8.GL_ALPHA_EQUATION_MAX:return _0x572d87.BlendOperation.Max;default:return _0x572d87.BlendOperation.Add}},_0x2541a9._GetAphaBlendFactor=function(e){switch(e){case 0:return _0x572d87.BlendFactor.Zero;case 1:return _0x572d87.BlendFactor.One;case _0x354cf8.GL_ALPHA_FUNCTION_SRC:return _0x572d87.BlendFactor.Src;case _0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR:return _0x572d87.BlendFactor.OneMinusSrc;case _0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA:return _0x572d87.BlendFactor.SrcAlpha;case _0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA:return _0x572d87.BlendFactor.OneMinusSrcAlpha;case _0x354cf8.GL_ALPHA_FUNCTION_DST_ALPHA:return _0x572d87.BlendFactor.DstAlpha;case _0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA:return _0x572d87.BlendFactor.OneMinusDstAlpha;case _0x354cf8.GL_ALPHA_FUNCTION_DST_COLOR:return _0x572d87.BlendFactor.Dst;case _0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR:return _0x572d87.BlendFactor.OneMinusDst;case _0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED:return _0x572d87.BlendFactor.SrcAlphaSaturated;case _0x354cf8.GL_ALPHA_FUNCTION_CONSTANT_COLOR:return _0x572d87.BlendFactor.Constant;case _0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR:return _0x572d87.BlendFactor.OneMinusConstant;case _0x354cf8.GL_ALPHA_FUNCTION_CONSTANT_ALPHA:return _0x572d87.BlendFactor.Constant;case _0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA:return _0x572d87.BlendFactor.OneMinusConstant;default:return _0x572d87.BlendFactor.One}},_0x2541a9._GetCompareFunction=function(e){switch(e){case 0:return _0x572d87.CompareFunction.Never;case 1:return _0x572d87.CompareFunction.Less;case 2:return _0x572d87.CompareFunction.Equal;case 3:return _0x572d87.CompareFunction.LessEqual;case 4:return _0x572d87.CompareFunction.Greater;case 5:return _0x572d87.CompareFunction.NotEqual;case 6:return _0x572d87.CompareFunction.GreaterEqual;case 7:return _0x572d87.CompareFunction.Always}return _0x572d87.CompareFunction.Never},_0x2541a9._GetStencilOpFunction=function(e){switch(e){case 0:return _0x572d87.StencilOperation.Zero;case 1:return _0x572d87.StencilOperation.Keep;case 2:return _0x572d87.StencilOperation.Replace;case 3:return _0x572d87.StencilOperation.IncrementClamp;case 4:return _0x572d87.StencilOperation.DecrementClamp;case 5:return _0x572d87.StencilOperation.Invert;case 6:return _0x572d87.StencilOperation.IncrementWrap;case 7:return _0x572d87.StencilOperation.DecrementWrap}return _0x572d87.StencilOperation.Keep},_0x2541a9._GetVertexInputDescriptorFormat=function(e){var t=e.type,i=e.normalized,n=e.getSize();switch(t){case VertexBuffer.BYTE:switch(n){case 1:case 2:return i?_0x572d87.VertexFormat.Snorm8x2:_0x572d87.VertexFormat.Sint8x2;case 3:case 4:return i?_0x572d87.VertexFormat.Snorm8x4:_0x572d87.VertexFormat.Sint8x4}break;case VertexBuffer.UNSIGNED_BYTE:switch(n){case 1:case 2:return i?_0x572d87.VertexFormat.Unorm8x2:_0x572d87.VertexFormat.Uint8x2;case 3:case 4:return i?_0x572d87.VertexFormat.Unorm8x4:_0x572d87.VertexFormat.Uint8x4}break;case VertexBuffer.SHORT:switch(n){case 1:case 2:return i?_0x572d87.VertexFormat.Snorm16x2:_0x572d87.VertexFormat.Sint16x2;case 3:case 4:return i?_0x572d87.VertexFormat.Snorm16x4:_0x572d87.VertexFormat.Sint16x4}break;case VertexBuffer.UNSIGNED_SHORT:switch(n){case 1:case 2:return i?_0x572d87.VertexFormat.Unorm16x2:_0x572d87.VertexFormat.Uint16x2;case 3:case 4:return i?_0x572d87.VertexFormat.Unorm16x4:_0x572d87.VertexFormat.Uint16x4}break;case VertexBuffer.INT:switch(n){case 1:return _0x572d87.VertexFormat.Sint32;case 2:return _0x572d87.VertexFormat.Sint32x2;case 3:return _0x572d87.VertexFormat.Sint32x3;case 4:return _0x572d87.VertexFormat.Sint32x4}break;case VertexBuffer.UNSIGNED_INT:switch(n){case 1:return _0x572d87.VertexFormat.Uint32;case 2:return _0x572d87.VertexFormat.Uint32x2;case 3:return _0x572d87.VertexFormat.Uint32x3;case 4:return _0x572d87.VertexFormat.Uint32x4}break;case VertexBuffer.FLOAT:switch(n){case 1:return _0x572d87.VertexFormat.Float32;case 2:return _0x572d87.VertexFormat.Float32x2;case 3:return _0x572d87.VertexFormat.Float32x3;case 4:return _0x572d87.VertexFormat.Float32x4}}throw new Error("Invalid Format '".concat(e.getKind(),"' - type=").concat(t,", normalized=").concat(i,", size=").concat(n))},_0x2541a9.prototype._getAphaBlendState=function(){return this._alphaBlendEnabled?{srcFactor:_0x2541a9._GetAphaBlendFactor(this._alphaBlendFuncParams[2]),dstFactor:_0x2541a9._GetAphaBlendFactor(this._alphaBlendFuncParams[3]),operation:_0x2541a9._GetAphaBlendOperation(this._alphaBlendEqParams[1])}:null},_0x2541a9.prototype._getColorBlendState=function(){return this._alphaBlendEnabled?{srcFactor:_0x2541a9._GetAphaBlendFactor(this._alphaBlendFuncParams[0]),dstFactor:_0x2541a9._GetAphaBlendFactor(this._alphaBlendFuncParams[1]),operation:_0x2541a9._GetAphaBlendOperation(this._alphaBlendEqParams[0])}:null},_0x2541a9.prototype._setShaderStage=function(e){this._shaderId!==e&&(this._shaderId=e,this._states[_0x46da76.ShaderStage]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.ShaderStage))},_0x2541a9.prototype._setRasterizationState=function(e,t){var i=this._frontFace-1+((this._cullEnabled?this._cullFace:0)<<1)+((this._clampDepth?1:0)<<3)+((this._alphaToCoverageEnabled?1:0)<<4)+(e<<5)+(t<<8);this._rasterizationState!==i&&(this._rasterizationState=i,this._states[_0x46da76.RasterizationState]=this._rasterizationState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.RasterizationState))},_0x2541a9.prototype._setColorStates=function(){var e=((this._writeMask?1:0)<<22)+(this._colorFormat<<23)+((this._depthWriteEnabled?1:0)<<29);this._alphaBlendEnabled&&(e+=((null===this._alphaBlendFuncParams[0]?2:_0x2de812[this._alphaBlendFuncParams[0]])<<0)+((null===this._alphaBlendFuncParams[1]?2:_0x2de812[this._alphaBlendFuncParams[1]])<<4)+((null===this._alphaBlendFuncParams[2]?2:_0x2de812[this._alphaBlendFuncParams[2]])<<8)+((null===this._alphaBlendFuncParams[3]?2:_0x2de812[this._alphaBlendFuncParams[3]])<<12)+((null===this._alphaBlendEqParams[0]?1:this._alphaBlendEqParams[0]-32773)<<16)+((null===this._alphaBlendEqParams[1]?1:this._alphaBlendEqParams[1]-32773)<<19)),e!==this._colorStates&&(this._colorStates=e,this._states[_0x46da76.ColorStates]=this._colorStates,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.ColorStates))},_0x2541a9.prototype._setDepthStencilState=function(){var e=this._stencilEnabled?this._stencilFrontCompare+(this._stencilFrontDepthFailOp<<3)+(this._stencilFrontPassOp<<6)+(this._stencilFrontFailOp<<9)+(this._stencilBackCompare<<12)+(this._stencilBackDepthFailOp<<15)+(this._stencilBackPassOp<<18)+(this._stencilBackFailOp<<21):2449408,t=this._depthStencilFormat+((this._depthTestEnabled?this._depthCompare:7)<<6)+(e<<10);this._depthStencilState!==t&&(this._depthStencilState=t,this._states[_0x46da76.DepthStencilState]=this._depthStencilState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.DepthStencilState))},_0x2541a9.prototype._setVertexState=function(e){for(var t,i,n,r=this._statesLength,o=_0x46da76.VertexState,a=e._pipelineContext,s=a.shaderProcessingContext.attributeNamesFromEffect,l=a.shaderProcessingContext.attributeLocationsFromEffect,u=0,c=0;c<s.length;c++){var h=l[c],d=null!==(t=this._overrideVertexBuffers&&this._overrideVertexBuffers[s[c]])&&void 0!==t?t:this._vertexBuffers[s[c]];!d&&(d=this._emptyVertexBuffer);var f=null===(i=d.getBuffer())||void 0===i?void 0:i.underlyingResource;if(void 0===d._validOffsetRange){var p=d.byteOffset,_=d.getSize(!0),m=d.byteStride;d._validOffsetRange=p<=this._kMaxVertexBufferStride-_&&(0===m||p+_<=m)}(!n||n!==f||!d._validOffsetRange)&&(this.vertexBuffers[u++]=d,n=d._validOffsetRange?f:null);var g=d.hashCode+(h<<7);this._isDirty=this._isDirty||this._states[o]!==g,this._states[o++]=g}this.vertexBuffers.length=u,this._statesLength=o,this._isDirty=this._isDirty||o!==r,this._isDirty&&(this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.VertexState))},_0x2541a9.prototype._setTextureState=function(e){this._textureState!==e&&(this._textureState=e,this._states[_0x46da76.TextureStage]=this._textureState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x46da76.TextureStage))},_0x2541a9.prototype._createPipelineLayout=function(e){if(this._useTextureStage)return this._createPipelineLayoutWithTextureStage(e);for(var t=[],i=e.shaderProcessingContext.bindGroupLayoutEntries,n=0;n<i.length;n++){var r=i[n];t[n]=this._device.createBindGroupLayout({entries:r})}return e.bindGroupLayouts=t,this._device.createPipelineLayout({bindGroupLayouts:t})},_0x2541a9.prototype._createPipelineLayoutWithTextureStage=function(e){for(var t,i=e.shaderProcessingContext,n=i.bindGroupLayoutEntries,r=1,o=0;o<n.length;o++)for(var a=n[o],s=0;s<a.length;s++){var l=n[o][s];if(l.texture){var u=i.bindGroupLayoutEntryInfo[o][l.binding].name,c=i.availableTextures[u],h=c.autoBindSampler?i.availableSamplers[u+_0x39a749.AutoSamplerSuffix]:null,d=c.sampleType,f=null!==(t=null==h?void 0:h.type)&&void 0!==t?t:_0x572d87.SamplerBindingType.Filtering;if(this._textureState&r&&d!==_0x572d87.TextureSampleType.Depth&&(c.autoBindSampler&&(f=_0x572d87.SamplerBindingType.NonFiltering),d=_0x572d87.TextureSampleType.UnfilterableFloat),l.texture.sampleType=d,h){var p=i.bindGroupLayoutEntryInfo[h.binding.groupIndex][h.binding.bindingIndex].index;n[h.binding.groupIndex][p].sampler.type=f}r<<=1}}var _=[];for(o=0;o<n.length;++o)_[o]=this._device.createBindGroupLayout({entries:n[o]});return e.bindGroupLayouts=_,this._device.createPipelineLayout({bindGroupLayouts:_})},_0x2541a9.prototype._getVertexInputDescriptor=function(e){for(var t,i,n,r,o=[],a=e._pipelineContext,s=a.shaderProcessingContext.attributeNamesFromEffect,l=a.shaderProcessingContext.attributeLocationsFromEffect,u=0;u<s.length;u++){var c=l[u],h=null!==(t=this._overrideVertexBuffers&&this._overrideVertexBuffers[s[u]])&&void 0!==t?t:this._vertexBuffers[s[u]];!h&&(h=this._emptyVertexBuffer);var d=null===(i=h.getBuffer())||void 0===i?void 0:i.underlyingResource,f=h.byteOffset,p=!h._validOffsetRange;if(!n||!r||n!==d||p){var _={arrayStride:h.byteStride,stepMode:h.getIsInstanced()?_0x572d87.InputStepMode.Instance:_0x572d87.InputStepMode.Vertex,attributes:[]};o.push(_),r=_.attributes,p&&(f=0,d=null)}r.push({shaderLocation:c,offset:f,format:_0x2541a9._GetVertexInputDescriptorFormat(h)}),n=d}return o},_0x2541a9.prototype._createRenderPipeline=function(e,t,i){var n=e._pipelineContext,r=this._getVertexInputDescriptor(e),o=this._createPipelineLayout(n),a=[],s=this._getAphaBlendState(),l=this._getColorBlendState();if(this._mrtAttachments1>0)for(var u=0;u<this._mrtFormats.length;++u){var c=this._mrtFormats[u];if(c){var h={format:c,writeMask:0!=(this._mrtEnabledMask&1<<u)?this._writeMask:0};s&&l&&(h.blend={alpha:s,color:l}),a.push(h)}else a.push(null)}else if(this._webgpuColorFormat[0]){h={format:this._webgpuColorFormat[0],writeMask:this._writeMask};s&&l&&(h.blend={alpha:s,color:l}),a.push(h)}else a.push(null);var d={compare:_0x2541a9._GetCompareFunction(this._stencilEnabled?this._stencilFrontCompare:7),depthFailOp:_0x2541a9._GetStencilOpFunction(this._stencilEnabled?this._stencilFrontDepthFailOp:1),failOp:_0x2541a9._GetStencilOpFunction(this._stencilEnabled?this._stencilFrontFailOp:1),passOp:_0x2541a9._GetStencilOpFunction(this._stencilEnabled?this._stencilFrontPassOp:1)},f={compare:_0x2541a9._GetCompareFunction(this._stencilEnabled?this._stencilBackCompare:7),depthFailOp:_0x2541a9._GetStencilOpFunction(this._stencilEnabled?this._stencilBackDepthFailOp:1),failOp:_0x2541a9._GetStencilOpFunction(this._stencilEnabled?this._stencilBackFailOp:1),passOp:_0x2541a9._GetStencilOpFunction(this._stencilEnabled?this._stencilBackPassOp:1)},p=void 0;(t===_0x572d87.PrimitiveTopology.LineStrip||t===_0x572d87.PrimitiveTopology.TriangleStrip)&&(p=!this._indexBuffer||this._indexBuffer.is32Bits?_0x572d87.IndexFormat.Uint32:_0x572d87.IndexFormat.Uint16);var _=!!this._webgpuDepthStencilFormat&&WebGPUTextureHelper.HasStencilAspect(this._webgpuDepthStencilFormat);return this._device.createRenderPipeline({layout:o,vertex:{module:n.stages.vertexStage.module,entryPoint:n.stages.vertexStage.entryPoint,buffers:r},primitive:{topology:t,stripIndexFormat:p,frontFace:1===this._frontFace?_0x572d87.FrontFace.CCW:_0x572d87.FrontFace.CW,cullMode:this._cullEnabled?2===this._cullFace?_0x572d87.CullMode.Front:_0x572d87.CullMode.Back:_0x572d87.CullMode.None},fragment:n.stages.fragmentStage?{module:n.stages.fragmentStage.module,entryPoint:n.stages.fragmentStage.entryPoint,targets:a}:void 0,multisample:{count:i},depthStencil:void 0===this._webgpuDepthStencilFormat?void 0:{depthWriteEnabled:this._depthWriteEnabled,depthCompare:this._depthTestEnabled?_0x2541a9._GetCompareFunction(this._depthCompare):_0x572d87.CompareFunction.Always,format:this._webgpuDepthStencilFormat,stencilFront:this._stencilEnabled&&_?d:void 0,stencilBack:this._stencilEnabled&&_?f:void 0,stencilReadMask:this._stencilEnabled&&_?this._stencilReadMask:void 0,stencilWriteMask:this._stencilEnabled&&_?this._stencilWriteMask:void 0,depthBias:this._depthBias,depthBiasClamp:this._depthBiasClamp,depthBiasSlopeScale:this._depthBiasSlopeScale}})},_0x2541a9.NumCacheHitWithoutHash=0,_0x2541a9.NumCacheHitWithHash=0,_0x2541a9.NumCacheMiss=0,_0x2541a9.NumPipelineCreationLastFrame=0,_0x2541a9._NumPipelineCreationCurrentFrame=0;var _0x581e24=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));function n(){this.values={}}return i(),n.prototype.count=function(){var e=0,t=this.pipeline?1:0;for(var i in this.values){var n=this.values[i].count();e+=n[0],t+=n[1],e++}return[e,t]},n}();function _0x13d308(e,t,i){var n=_0x2541a9.call(this,e,t,i)||this;return n._nodeStack=[],n._nodeStack[0]=_0x13d308._Cache,n}_0x13d308.prototype=Object.create(_0x2541a9.prototype),_0x13d308.prototype.constructor=_0x2541a9,_0x13d308.GetNodeCounts=function(){var e=_0x13d308._Cache.count();return{nodeCount:e[0],pipelineCount:e[1]}},_0x13d308._GetPipelines=function(e,t,i,n){if(e.pipeline){var r=i.slice();r.length=n,t.push(r)}for(var o in e.values){var a=e.values[o];i[n]=parseInt(o),_0x13d308._GetPipelines(a,t,i,n+1)}},_0x13d308.GetPipelines=function(){var e=[];return _0x13d308._GetPipelines(_0x13d308._Cache,e,[],0),e},_0x13d308.prototype._getRenderPipeline=function(e){for(var t=this._nodeStack[this._stateDirtyLowestIndex],i=this._stateDirtyLowestIndex;i<this._statesLength;++i){var n=t.values[this._states[i]];!n&&(n=new _0x581e24,t.values[this._states[i]]=n),t=n,this._nodeStack[i+1]=t}e.token=t,e.pipeline=t.pipeline},_0x13d308.prototype._setRenderPipeline=function(e){e.token.pipeline=e.pipeline},_0x13d308._Cache=new _0x581e24;var _0x26bddc=(_0x1c07db=!0,function(e,t){var i=_0x1c07db?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c07db=!1,i}),_0x3fb31d=_0x26bddc(void 0,(function(){return _0x3fb31d.toString().search("(((.+)+)+)+$").toString().constructor(_0x3fb31d).search("(((.+)+)+)+$")})),_0x1c07db;function _0x26fc33(e){var t=_0x2659bc.call(this,!1)||this;return t._cache=e,t.reset(),t}_0x3fb31d(),_0x26fc33.prototype=Object.create(_0x2659bc.prototype),_0x26fc33.prototype.constructor=_0x2659bc,Object.defineProperty(_0x26fc33.prototype,"frontFunc",{get:function(){return this._frontFunc},set:function(e){this._frontFunc!==e&&(this._frontFunc=e,this._cache.setStencilCompare(_0x354cf8.FRONT,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x26fc33.prototype,"backFunc",{get:function(){return this._backFunc},set:function(e){this._backFunc!==e&&(this._backFunc=e,this._cache.setStencilCompare(_0x354cf8.BACK,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x26fc33.prototype,"funcMask",{get:function(){return this._funcMask},set:function(e){this._funcMask!==e&&(this._funcMask=e,this._cache.setStencilReadMask(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x26fc33.prototype,"frontOpStencilFail",{get:function(){return this._frontOpStencilFail},set:function(e){this._frontOpStencilFail!==e&&(this._frontOpStencilFail=e,this._cache.setStencilFailOp(_0x354cf8.FRONT,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x26fc33.prototype,"backOpStencilFail",{get:function(){return this._backOpStencilFail},set:function(e){this._backOpStencilFail!==e&&(this._backOpStencilFail=e,this._cache.setStencilFailOp(_0x354cf8.BACK,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x26fc33.prototype,"frontOpDepthFail",{get:function(){return this._frontOpDepthFail},set:function(e){this._frontOpDepthFail!==e&&(this._frontOpDepthFail=e,this._cache.setStencilDepthFailOp(_0x354cf8.FRONT,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x26fc33.prototype,"backOpDepthFail",{get:function(){return this._backOpDepthFail},set:function(e){this._backOpDepthFail!==e&&(this._backOpDepthFail=e,this._cache.setStencilDepthFailOp(_0x354cf8.BACK,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x26fc33.prototype,"frontOpStencilDepthPass",{get:function(){return this._frontOpStencilDepthPass},set:function(e){this._frontOpStencilDepthPass!==e&&(this._frontOpStencilDepthPass=e,this._cache.setStencilPassOp(_0x354cf8.FRONT,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x26fc33.prototype,"backOpStencilDepthPass",{get:function(){return this._backOpStencilDepthPass},set:function(e){this._backOpStencilDepthPass!==e&&(this._backOpStencilDepthPass=e,this._cache.setStencilPassOp(_0x354cf8.BACK,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x26fc33.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask!==e&&(this._mask=e,this._cache.setStencilWriteMask(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x26fc33.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,this._cache.setStencilEnabled(e))},enumerable:!1,configurable:!0}),_0x26fc33.prototype.reset=function(){var e;this.stencilMaterial=void 0,null===(e=this.stencilGlobal)||void 0===e||e.reset(),this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0,this._cache.resetStencilState()},_0x26fc33.prototype.apply=function(){var e,t=null===(e=this.stencilMaterial)||void 0===e?void 0:e.enabled;this.enabled=t?this.stencilMaterial.enabled:this.stencilGlobal.enabled,this.enabled&&(this.frontFunc=t?this.stencilMaterial.frontFunc:this.stencilGlobal.frontFunc,this.backFunc=t?this.stencilMaterial.backFunc:this.stencilGlobal.backFunc,this.funcRef=t?this.stencilMaterial.funcRef:this.stencilGlobal.funcRef,this.funcMask=t?this.stencilMaterial.funcMask:this.stencilGlobal.funcMask,this.frontOpStencilFail=t?this.stencilMaterial.frontOpStencilFail:this.stencilGlobal.frontOpStencilFail,this.backOpStencilFail=t?this.stencilMaterial.backOpStencilFail:this.stencilGlobal.backOpStencilFail,this.frontOpDepthFail=t?this.stencilMaterial.frontOpDepthFail:this.stencilGlobal.frontOpDepthFail,this.backOpDepthFail=t?this.stencilMaterial.backOpDepthFail:this.stencilGlobal.backOpDepthFail,this.frontOpStencilDepthPass=t?this.stencilMaterial.frontOpStencilDepthPass:this.stencilGlobal.frontOpStencilDepthPass,this.backOpStencilDepthPass=t?this.stencilMaterial.backOpStencilDepthPass:this.stencilGlobal.backOpStencilDepthPass,this.mask=t?this.stencilMaterial.mask:this.stencilGlobal.mask)};var _0x2a47ce=(_0x16a1ff=!0,function(e,t){var i=_0x16a1ff?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16a1ff=!1,i}),_0x126897=_0x2a47ce(void 0,(function(){return _0x126897.toString().search("(((.+)+)+)+$").toString().constructor(_0x126897).search("(((.+)+)+)+$")})),_0x16a1ff;function _0x4b0a2f(e){var t=_0x3e00.call(this,!1)||this;return t._cache=e,t.reset(),t}_0x126897(),_0x4b0a2f.prototype=Object.create(_0x3e00.prototype),_0x4b0a2f.prototype.constructor=_0x3e00,Object.defineProperty(_0x4b0a2f.prototype,"zOffset",{get:function(){return this._zOffset},set:function(e){this._zOffset!==e&&(this._zOffset=e,this._isZOffsetDirty=!0,this._cache.setDepthBiasSlopeScale(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4b0a2f.prototype,"zOffsetUnits",{get:function(){return this._zOffsetUnits},set:function(e){this._zOffsetUnits!==e&&(this._zOffsetUnits=e,this._isZOffsetDirty=!0,this._cache.setDepthBias(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4b0a2f.prototype,"cullFace",{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,this._isCullFaceDirty=!0,this._cache.setCullFace(null!=e?e:1))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4b0a2f.prototype,"cull",{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this._isCullDirty=!0,this._cache.setCullEnabled(!!e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4b0a2f.prototype,"depthFunc",{get:function(){return this._depthFunc},set:function(e){this._depthFunc!==e&&(this._depthFunc=e,this._isDepthFuncDirty=!0,this._cache.setDepthCompare(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4b0a2f.prototype,"depthMask",{get:function(){return this._depthMask},set:function(e){this._depthMask!==e&&(this._depthMask=e,this._isDepthMaskDirty=!0,this._cache.setDepthWriteEnabled(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4b0a2f.prototype,"depthTest",{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._isDepthTestDirty=!0,this._cache.setDepthTestEnabled(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4b0a2f.prototype,"frontFace",{get:function(){return this._frontFace},set:function(e){this._frontFace!==e&&(this._frontFace=e,this._isFrontFaceDirty=!0,this._cache.setFrontFace(null!=e?e:2))},enumerable:!1,configurable:!0}),_0x4b0a2f.prototype.reset=function(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._zOffsetUnits=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!0,this._isFrontFaceDirty=!1,this._cache.resetDepthCullingState()},_0x4b0a2f.prototype.apply=function(){};var _0x5a87ae=(_0x413d0d=!0,function(e,t){var i=_0x413d0d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x413d0d=!1,i}),_0x5ee81a=_0x5a87ae(void 0,(function(){return _0x5ee81a.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ee81a).search("(((.+)+)+)+$")})),_0x413d0d;function _0x5e1b10(e){this.useMipMaps=!1,this.type=_0x354cf8.TEXTURETYPE_UNDEFINED,this._video=e,this.uniqueId=InternalTexture._Counter++}_0x5ee81a(),_0x5e1b10.IsExternalTexture=function(e){return void 0!==e.underlyingResource},_0x5e1b10.prototype.getClassName=function(){return"ExternalTexture"},Object.defineProperty(_0x5e1b10.prototype,"underlyingResource",{get:function(){return this._video},enumerable:!1,configurable:!0}),_0x5e1b10.prototype.isReady=function(){return this._video.readyState>=this._video.HAVE_CURRENT_DATA},_0x5e1b10.prototype.dispose=function(){};var _0xca604e=(_0x7e7e64=!0,function(e,t){var i=_0x7e7e64?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x7e7e64=!1,i}),_0x440a0f=_0xca604e(void 0,(function(){return _0x440a0f.toString().search("(((.+)+)+)+$").toString().constructor(_0x440a0f).search("(((.+)+)+)+$")})),_0x7e7e64;function _0x25966f(){this.uniqueId=_0x25966f._Counter++,this.updateId=0,this.reset()}_0x440a0f(),Object.defineProperty(_0x25966f.prototype,"forceBindGroupCreation",{get:function(){return this._numExternalTextures>0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x25966f.prototype,"hasFloatTextures",{get:function(){return this._numFloatTextures>0},enumerable:!1,configurable:!0}),_0x25966f.prototype.reset=function(){this.samplers={},this.textures={},this.isDirty=!0,this._numFloatTextures=0,this._numExternalTextures=0},_0x25966f.prototype.setSampler=function(e,t){var i=this.samplers[e],n=-1;i?n=i.hashCode:this.samplers[e]=i={sampler:t,hashCode:0},i.sampler=t,i.hashCode=t?_0x408e52.GetSamplerHashCode(t):0;var r=n!==i.hashCode;r&&this.updateId++,this.isDirty||(this.isDirty=r)},_0x25966f.prototype.setTexture=function(e,t){var i,n,r,o=this.textures[e],a=-1;o?a=null!==(n=null===(i=o.texture)||void 0===i?void 0:i.uniqueId)&&void 0!==n?n:-1:this.textures[e]=o={texture:t,isFloatTexture:!1,isExternalTexture:!1},o.isExternalTexture&&this._numExternalTextures--,o.isFloatTexture&&this._numFloatTextures--,t?(o.isFloatTexture=t.type===_0x354cf8.TEXTURETYPE_FLOAT,o.isExternalTexture=_0x5e1b10.IsExternalTexture(t),o.isFloatTexture&&this._numFloatTextures++,o.isExternalTexture&&this._numExternalTextures++):(o.isFloatTexture=!1,o.isExternalTexture=!1),o.texture=t;var s=a!==(null!==(r=null==t?void 0:t.uniqueId)&&void 0!==r?r:-1);s&&this.updateId++,this.isDirty||(this.isDirty=s)},_0x25966f._Counter=0;var _0x5578ac=(_0x1e457a=!0,function(e,t){var i=_0x1e457a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e457a=!1,i}),_0x189010=_0x5578ac(void 0,(function(){return _0x189010.toString().search("(((.+)+)+)+$").toString().constructor(_0x189010).search("(((.+)+)+)+$")})),_0x1e457a;function _0x1a5e01(e){this._bufferManager=e,this.uniqueId=_0x1a5e01._Counter++,this._useInstancing=!1,this._currentInstanceCount=0,this.reset()}_0x189010(),_0x1a5e01.prototype.isDirty=function(e){return this._isDirty||this._materialContextUpdateId!==e},_0x1a5e01.prototype.resetIsDirty=function(e){this._isDirty=!1,this._materialContextUpdateId=e},Object.defineProperty(_0x1a5e01.prototype,"useInstancing",{get:function(){return this._useInstancing},set:function(e){this._useInstancing!==e&&(e?(this.indirectDrawBuffer=this._bufferManager.createRawBuffer(40,_0x572d87.BufferUsage.CopyDst|_0x572d87.BufferUsage.Indirect),this._indirectDrawData=new Uint32Array(5),this._indirectDrawData[3]=0,this._indirectDrawData[4]=0):(this.indirectDrawBuffer&&this._bufferManager.releaseBuffer(this.indirectDrawBuffer),this.indirectDrawBuffer=void 0,this._indirectDrawData=void 0),this._useInstancing=e,this._currentInstanceCount=-1)},enumerable:!1,configurable:!0}),_0x1a5e01.prototype.reset=function(){this.buffers={},this._isDirty=!0,this._materialContextUpdateId=0,this.fastBundle=void 0,this.bindGroups=void 0},_0x1a5e01.prototype.setBuffer=function(e,t){var i;this._isDirty||(this._isDirty=(null==t?void 0:t.uniqueId)!==(null===(i=this.buffers[e])||void 0===i?void 0:i.uniqueId)),this.buffers[e]=t},_0x1a5e01.prototype.setIndirectData=function(e,t,i){t!==this._currentInstanceCount&&this.indirectDrawBuffer&&this._indirectDrawData&&(this._currentInstanceCount=t,this._indirectDrawData[0]=e,this._indirectDrawData[1]=t,this._indirectDrawData[2]=i,this._bufferManager.setRawData(this.indirectDrawBuffer,0,this._indirectDrawData,0,20))},_0x1a5e01.prototype.dispose=function(){this.indirectDrawBuffer&&(this._bufferManager.releaseBuffer(this.indirectDrawBuffer),this.indirectDrawBuffer=void 0,this._indirectDrawData=void 0),this.fastBundle=void 0,this.bindGroups=void 0,this.buffers=void 0},_0x1a5e01._Counter=0;var _0x5b7607=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));return i(),function(){this.values={}}}();function _0x4f09ec(e,t,i){this.disabled=!1,this._device=e,this._cacheSampler=t,this._engine=i}Object.defineProperty(_0x4f09ec,"Statistics",{get:function(){return{totalCreated:_0x4f09ec.NumBindGroupsCreatedTotal,lastFrameCreated:_0x4f09ec.NumBindGroupsCreatedLastFrame,lookupLastFrame:_0x4f09ec.NumBindGroupsLookupLastFrame,noLookupLastFrame:_0x4f09ec.NumBindGroupsNoLookupLastFrame}},enumerable:!1,configurable:!0}),_0x4f09ec.prototype.endFrame=function(){_0x4f09ec.NumBindGroupsCreatedLastFrame=_0x4f09ec._NumBindGroupsCreatedCurrentFrame,_0x4f09ec.NumBindGroupsLookupLastFrame=_0x4f09ec._NumBindGroupsLookupCurrentFrame,_0x4f09ec.NumBindGroupsNoLookupLastFrame=_0x4f09ec._NumBindGroupsNoLookupCurrentFrame,_0x4f09ec._NumBindGroupsCreatedCurrentFrame=0,_0x4f09ec._NumBindGroupsLookupCurrentFrame=0,_0x4f09ec._NumBindGroupsNoLookupCurrentFrame=0},_0x4f09ec.prototype.getBindGroups=function(e,t,i,n){var r,o,a,s=void 0;if(!n&&!t.isDirty(i.updateId)&&!i.isDirty)return _0x4f09ec._NumBindGroupsNoLookupCurrentFrame++,t.bindGroups;if(t.resetIsDirty(i.updateId),i.isDirty=!1,s)return t.bindGroups=s,_0x4f09ec._NumBindGroupsLookupCurrentFrame++,s;s=[],t.bindGroups=s,_0x4f09ec.NumBindGroupsCreatedTotal++,_0x4f09ec._NumBindGroupsCreatedCurrentFrame++;for(var l=e.bindGroupLayouts,u=0;u<e.shaderProcessingContext.bindGroupLayoutEntries.length;u++){for(var c=e.shaderProcessingContext.bindGroupLayoutEntries[u],h=e.shaderProcessingContext.bindGroupEntries[u],d=0;d<c.length;d++){var f,p=e.shaderProcessingContext.bindGroupLayoutEntries[u][d],_=e.shaderProcessingContext.bindGroupLayoutEntryInfo[u][p.binding],m=null!==(r=_.nameInArrayOfTexture)&&void 0!==r?r:_.name;if(p.sampler)if(f=i.samplers[m]){var g=f.sampler;if(!g){this._engine.dbgSanityChecks&&_0x41154e.Error("Trying to bind a null sampler! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}h[d].resource=this._cacheSampler.getSampler(g,!1,f.hashCode)}else _0x41154e.Error('Sampler "'.concat(m,'" could not be bound. entry=').concat(JSON.stringify(p),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"<no dump>":t}))),50);else if(p.texture||p.storageTexture)if(f=i.textures[m]){if(this._engine.dbgSanityChecks&&null===f.texture){_0x41154e.Error("Trying to bind a null texture! entry=".concat(JSON.stringify(p),", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}var x=f.texture._hardwareTexture;if(this._engine.dbgSanityChecks&&(!x||p.texture&&!x.view||p.storageTexture&&!x.viewForWriting)){_0x41154e.Error("Trying to bind a null gpu texture or view! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", isReady=").concat(null===(o=f.texture)||void 0===o?void 0:o.isReady,", materialContext.uniqueId=").concat(i.uniqueId),50);continue}h[d].resource=p.storageTexture?x.viewForWriting:p.texture.multisampled?x.msaaView:x.view}else _0x41154e.Error('Texture "'.concat(m,'" could not be bound. entry=').concat(JSON.stringify(p),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"<no dump>":t}))),50);else if(p.externalTexture)if(f=i.textures[m]){if(this._engine.dbgSanityChecks&&null===f.texture){_0x41154e.Error("Trying to bind a null external texture! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}var v=f.texture.underlyingResource;if(this._engine.dbgSanityChecks&&!v){_0x41154e.Error("Trying to bind a null gpu external texture! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", isReady=").concat(null===(a=f.texture)||void 0===a?void 0:a.isReady,", materialContext.uniqueId=").concat(i.uniqueId),50);continue}h[d].resource=this._device.importExternalTexture({source:v})}else _0x41154e.Error('Texture "'.concat(m,'" could not be bound. entry=').concat(JSON.stringify(p),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"<no dump>":t}))),50);else if(p.buffer){var y=t.buffers[m];if(y){var $=y.underlyingResource;h[d].resource.buffer=$,h[d].resource.size=y.capacity}else _0x41154e.Error("Can't find buffer \"".concat(m,'". entry=').concat(JSON.stringify(p),", buffers=").concat(JSON.stringify(t.buffers),", drawContext.uniqueId=").concat(t.uniqueId),50)}}var b=l[u];s[u]=this._device.createBindGroup({layout:b,entries:h})}return n&&(n.bindGroups=s),s},_0x4f09ec.NumBindGroupsCreatedTotal=0,_0x4f09ec.NumBindGroupsCreatedLastFrame=0,_0x4f09ec.NumBindGroupsLookupLastFrame=0,_0x4f09ec.NumBindGroupsNoLookupLastFrame=0,_0x4f09ec._Cache=new _0x5b7607,_0x4f09ec._NumBindGroupsCreatedCurrentFrame=0,_0x4f09ec._NumBindGroupsLookupCurrentFrame=0,_0x4f09ec._NumBindGroupsNoLookupCurrentFrame=0;var _0x24e979=(_0x4a8039=!0,function(e,t){var i=_0x4a8039?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a8039=!1,i}),_0x59b731=_0x24e979(void 0,(function(){return _0x59b731.toString().search("(((.+)+)+)+$").toString().constructor(_0x59b731).search("(((.+)+)+)+$")})),_0x4a8039;_0x59b731();var _0x1fe924="clearQuadVertexShader",_0x4d1b56="uniform float depthValue;\nconst vec2 pos[4]={\nvec2(-1.0,1.0),\n vec2(1.0,1.0),\nvec2(-1.0,-1.0),\n vec2(1.0,-1.0)\n};\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n #define CUSTOM_VERTEX_MAIN_BEGIN\n gl_Position=vec4(pos[gl_VertexID],depthValue,1.0);\n #define CUSTOM_VERTEX_MAIN_END\n}\n";_0x54737b.ShadersStore[_0x1fe924]=_0x4d1b56;var _0x321d41=(_0x5dd9bd=!0,function(e,t){var i=_0x5dd9bd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5dd9bd=!1,i}),_0x5e0f39=_0x321d41(void 0,(function(){return _0x5e0f39.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e0f39).search("(((.+)+)+)+$")})),_0x5dd9bd;_0x5e0f39();var _0xfdec53="clearQuadPixelShader",_0x4b1f9d="uniform vec4 color;\nvoid main() {\n\tgl_FragColor=color;\n}\n";_0x54737b.ShadersStore[_0xfdec53]=_0x4b1f9d;var _0x2c3453=(_0xc26403=!0,function(e,t){var i=_0xc26403?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc26403=!1,i}),_0x3d7ea9=_0x2c3453(void 0,(function(){return _0x3d7ea9.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d7ea9).search("(((.+)+)+)+$")})),_0xc26403;function _0x56b5da(e,t,i){this._bindGroups={},this._bundleCache={},this._keyTemp=[],this._device=e,this._engine=t,this._cacheRenderPipeline=new _0x13d308(this._device,i,!t._caps.textureFloatLinearFiltering),this._cacheRenderPipeline.setDepthTestEnabled(!1),this._cacheRenderPipeline.setStencilReadMask(255),this._effect=t.createEffect("clearQuad",[],["color","depthValue"])}_0x3d7ea9(),_0x56b5da.prototype.setDepthStencilFormat=function(e){this._depthTextureFormat=e,this._cacheRenderPipeline.setDepthStencilFormat(e)},_0x56b5da.prototype.setColorFormat=function(e){this._cacheRenderPipeline.setColorFormat(e)},_0x56b5da.prototype.setMRTAttachments=function(e,t,i){this._cacheRenderPipeline.setMRT(t,i),this._cacheRenderPipeline.setMRTAttachments(e)},_0x56b5da.prototype.clear=function(e,t,i,n,r){var o,a;void 0===r&&(r=1);var s,l,u=null,c=!!this._engine._currentRenderTarget;if(e)s=e;else{var h=0;this._keyTemp.length=0;for(var d=0;d<this._cacheRenderPipeline.colorFormats.length;++d)this._keyTemp[h++]=renderableTextureFormatToIndex[null!==(o=this._cacheRenderPipeline.colorFormats[d])&&void 0!==o?o:""];var f=renderableTextureFormatToIndex[null!==(a=this._depthTextureFormat)&&void 0!==a?a:0];if(this._keyTemp[h]=(t?t.r+256*t.g+256*t.b*256+256*t.a*256*256:0)+(i?Math.pow(2,32):0)+(n?Math.pow(2,33):0)+(this._engine.useReverseDepthBuffer?Math.pow(2,34):0)+(c?Math.pow(2,35):0)+(r>1?Math.pow(2,36):0)+f*Math.pow(2,37),l=this._keyTemp.join("_"),u=this._bundleCache[l])return u;s=this._device.createRenderBundleEncoder({colorFormats:this._cacheRenderPipeline.colorFormats,depthStencilFormat:this._depthTextureFormat,sampleCount:r})}this._cacheRenderPipeline.setDepthWriteEnabled(!!i),this._cacheRenderPipeline.setStencilEnabled(!!n&&!!this._depthTextureFormat&&WebGPUTextureHelper.HasStencilAspect(this._depthTextureFormat)),this._cacheRenderPipeline.setStencilWriteMask(n?255:0),this._cacheRenderPipeline.setStencilCompare(_0x354cf8.FRONT,n?_0x354cf8.ALWAYS:_0x354cf8.NEVER),this._cacheRenderPipeline.setStencilCompare(_0x354cf8.BACK,n?_0x354cf8.ALWAYS:_0x354cf8.NEVER),this._cacheRenderPipeline.setStencilPassOp(_0x354cf8.FRONT,n?_0x354cf8.REPLACE:_0x354cf8.KEEP),this._cacheRenderPipeline.setStencilPassOp(_0x354cf8.BACK,n?_0x354cf8.REPLACE:_0x354cf8.KEEP),this._cacheRenderPipeline.setWriteMask(t?15:0);var p=this._cacheRenderPipeline.getRenderPipeline(_0x354cf8.MATERIAL_TriangleStripDrawMode,this._effect,r),_=this._effect._pipelineContext;t&&this._effect.setDirectColor4("color",t),this._effect.setFloat("depthValue",this._engine.useReverseDepthBuffer?this._engine._clearReverseDepthValue:this._engine._clearDepthValue),_.uniformBuffer.update();var m=c?this._engine._ubInvertY:this._engine._ubDontInvertY,g=_.uniformBuffer.getBuffer(),x=g.uniqueId+"-"+m.uniqueId,v=this._bindGroups[x];if(!v){var y=_.bindGroupLayouts;(v=this._bindGroups[x]=[]).push(this._device.createBindGroup({layout:y[0],entries:[]})),!_0x41080c._SimplifiedKnownBindings&&v.push(this._device.createBindGroup({layout:y[1],entries:[]})),v.push(this._device.createBindGroup({layout:y[_0x41080c._SimplifiedKnownBindings?1:2],entries:[{binding:0,resource:{buffer:m.underlyingResource,size:m.capacity}},{binding:1,resource:{buffer:g.underlyingResource,size:g.capacity}}]}))}s.setPipeline(p);for(d=0;d<v.length;++d)s.setBindGroup(d,v[d]);return s.draw(4,1,0,0),!e&&(u=s.finish(),this._bundleCache[l]=u),u};var _0x16646b=(_0x310d2d=!0,function(e,t){var i=_0x310d2d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x310d2d=!1,i}),_0x46c88a=_0x16646b(void 0,(function(){return _0x46c88a.toString().search("(((.+)+)+)+$").toString().constructor(_0x46c88a).search("(((.+)+)+)+$")})),_0x310d2d;function WebGPURenderItemViewport(e,t,i,n){this.x=Math.floor(e),this.y=Math.floor(t),this.w=Math.floor(i),this.h=Math.floor(n)}function WebGPURenderItemScissor(e,t,i,n){this.x=e,this.y=t,this.w=i,this.h=n}function WebGPURenderItemStencilRef(e){this.ref=e}function WebGPURenderItemBlendColor(e){this.color=e}function WebGPURenderItemBeginOcclusionQuery(e){this.query=e}function WebGPURenderItemEndOcclusionQuery(){}function WebGPURenderItemBundles(){this.bundles=[]}function WebGPUBundleList(e){this.numDrawCalls=0,this._device=e,this._list=new Array(10),this._listLength=0}_0x46c88a(),WebGPURenderItemViewport.prototype.run=function(e){e.setViewport(this.x,this.y,this.w,this.h,0,1)},WebGPURenderItemViewport.prototype.clone=function(){return new WebGPURenderItemViewport(this.x,this.y,this.w,this.h)},WebGPURenderItemScissor.prototype.run=function(e){e.setScissorRect(this.x,this.y,this.w,this.h)},WebGPURenderItemScissor.prototype.clone=function(){return new WebGPURenderItemScissor(this.x,this.y,this.w,this.h)},WebGPURenderItemStencilRef.prototype.run=function(e){e.setStencilReference(this.ref)},WebGPURenderItemStencilRef.prototype.clone=function(){return new WebGPURenderItemStencilRef(this.ref)},WebGPURenderItemBlendColor.prototype.run=function(e){e.setBlendConstant(this.color)},WebGPURenderItemBlendColor.prototype.clone=function(){return new WebGPURenderItemBlendColor(this.color)},WebGPURenderItemBeginOcclusionQuery.prototype.run=function(e){e.beginOcclusionQuery(this.query)},WebGPURenderItemBeginOcclusionQuery.prototype.clone=function(){return new WebGPURenderItemBeginOcclusionQuery(this.query)},WebGPURenderItemEndOcclusionQuery.prototype.run=function(e){e.endOcclusionQuery()},WebGPURenderItemEndOcclusionQuery.prototype.clone=function(){return new WebGPURenderItemEndOcclusionQuery},WebGPURenderItemBundles.prototype.run=function(e){e.executeBundles(this.bundles)},WebGPURenderItemBundles.prototype.clone=function(){var e=new WebGPURenderItemBundles;return e.bundles=this.bundles,e},WebGPUBundleList.prototype.addBundle=function(e){if(!this._currentItemIsBundle){var t=new WebGPURenderItemBundles;this._list[this._listLength++]=t,this._currentBundleList=t.bundles,this._currentItemIsBundle=!0}e&&this._currentBundleList.push(e)},WebGPUBundleList.prototype._finishBundle=function(){this._currentItemIsBundle&&this._bundleEncoder&&(this._currentBundleList.push(this._bundleEncoder.finish()),this._bundleEncoder=void 0,this._currentItemIsBundle=!1)},WebGPUBundleList.prototype.addItem=function(e){this._finishBundle(),this._list[this._listLength++]=e,this._currentItemIsBundle=!1},WebGPUBundleList.prototype.getBundleEncoder=function(e,t,i){return!this._currentItemIsBundle&&(this.addBundle(),this._bundleEncoder=this._device.createRenderBundleEncoder({colorFormats:e,depthStencilFormat:t,sampleCount:i})),this._bundleEncoder},WebGPUBundleList.prototype.close=function(){this._finishBundle()},WebGPUBundleList.prototype.run=function(e){this.close();for(var t=0;t<this._listLength;++t)this._list[t].run(e)},WebGPUBundleList.prototype.reset=function(){this._listLength=0,this._currentItemIsBundle=!1,this.numDrawCalls=0},WebGPUBundleList.prototype.clone=function(){this.close();var e=new WebGPUBundleList(this._device);e._list=new Array(this._listLength),e._listLength=this._listLength,e.numDrawCalls=this.numDrawCalls;for(var t=0;t<this._listLength;++t)e._list[t]=this._list[t].clone();return e};var _0x5d43c6=(_0xcb20dc=!0,function(e,t){var i=_0xcb20dc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xcb20dc=!1,i}),_0x3a7291=_0x5d43c6(void 0,(function(){return _0x3a7291.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a7291).search("(((.+)+)+)+$")})),_0xcb20dc;function _0x5bafda(e,t){this._enabled=!1,this._measureDurationState=0,this._device=e,this._bufferManager=t}_0x3a7291(),Object.defineProperty(_0x5bafda.prototype,"gpuFrameTimeCounter",{get:function(){return this._gpuFrameTimeCounter},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bafda.prototype,"enable",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,this._measureDurationState=0,e?this._measureDuration=new WebGPUDurationMeasure(this._device,this._bufferManager):this._measureDuration.dispose())},enumerable:!1,configurable:!0}),_0x5bafda.prototype.startFrame=function(e){this._enabled&&0===this._measureDurationState&&(this._measureDuration.start(e),this._measureDurationState=1)},_0x5bafda.prototype.endFrame=function(e){var t=this;1===this._measureDurationState&&(this._measureDurationState=2,this._measureDuration.stop(e).then((function(e){null!==e&&e>=0&&(t._gpuFrameTimeCounter.fetchNewFrame(),t._gpuFrameTimeCounter.addCount(e,!0)),t._measureDurationState=0})))};const _0x17b2df=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1106f4=_0x17b2df(void 0,(function(){return _0x1106f4.toString().search("(((.+)+)+)+$").toString().constructor(_0x1106f4).search("(((.+)+)+)+$")}));function _0x4257dd(e,t,i,n,r){void 0===r&&(r=!0),this._dstBuffers=[],this._device=i,this._bufferManager=n,this._count=e,this._canUseMultipleBuffers=r,this._querySet=i.createQuerySet({type:t,count:e}),this._queryBuffer=n.createRawBuffer(8*e,_0x572d87.BufferUsage.QueryResolve|_0x572d87.BufferUsage.CopySrc),!r&&this._dstBuffers.push(this._bufferManager.createRawBuffer(8*this._count,_0x572d87.BufferUsage.MapRead|_0x572d87.BufferUsage.CopyDst))}_0x1106f4(),Object.defineProperty(_0x4257dd.prototype,"querySet",{get:function(){return this._querySet},enumerable:!1,configurable:!0}),_0x4257dd.prototype._getBuffer=function(e,t){if(!this._canUseMultipleBuffers&&0===this._dstBuffers.length)return null;var i,n=this._device.createCommandEncoder();return 0===this._dstBuffers.length?i=this._bufferManager.createRawBuffer(8*this._count,_0x572d87.BufferUsage.MapRead|_0x572d87.BufferUsage.CopyDst):(i=this._dstBuffers[this._dstBuffers.length-1],this._dstBuffers.length--),n.resolveQuerySet(this._querySet,e,t,this._queryBuffer,0),n.copyBufferToBuffer(this._queryBuffer,0,i,0,8*t),this._device.queue.submit([n.finish()]),i},_0x4257dd.prototype.readValues=function(e,t,i){return void 0===e&&(e=0),void 0===t&&(t=1),new Promise(((n,r)=>{var o;return null===(o=this._getBuffer(e,t))?r(null):o.mapAsync(_0x572d87.MapMode.Read).then((()=>{const e=new BigUint64Array(o.getMappedRange()).slice();o.unmap(),this._dstBuffers[this._dstBuffers.length]=o,n({data:e,frameId:i})}))}))},_0x4257dd.prototype.readValue=function(e){return void 0===e&&(e=0),new Promise(((t,i)=>{const n=this._getBuffer(e,1);return null===n?t(null):n.mapAsync(_0x572d87.MapMode.Read).then((()=>{const e=new BigUint64Array(n.getMappedRange()),i=Number(e[0]);return n.unmap(),this._dstBuffers[this._dstBuffers.length]=n,t(i)}))}))},_0x4257dd.prototype.readTwoValuesAndSubtract=async function(e){return void 0===e&&(e=0),new Promise(((t,i)=>{const n=this._getBuffer(e,2);return null===n?t(null):n.mapAsync(_0x572d87.MapMode.Read).then((()=>{const e=new BigUint64Array(n.getMappedRange()),i=Number(e[1]-e[0]);return n.unmap(),this._dstBuffers[this._dstBuffers.length]=n,t(i)}))}))},_0x4257dd.prototype.dispose=function(){this._querySet.destroy(),this._bufferManager.releaseBuffer(this._queryBuffer);for(var e=0;e<this._dstBuffers.length;++e)this._bufferManager.releaseBuffer(this._dstBuffers[e])};var _0x49d7a7=(_0x13cfb4=!0,function(e,t){var i=_0x13cfb4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13cfb4=!1,i}),_0x46d13d=_0x49d7a7(void 0,(function(){return _0x46d13d.toString().search("(((.+)+)+)+$").toString().constructor(_0x46d13d).search("(((.+)+)+)+$")})),_0x13cfb4;_0x46d13d();var _0x153d01=0;function _0x2acf8c(e,t,i,n,r){void 0===n&&(n=4096),void 0===r&&(r=100),this._availableIndices=[],this._engine=e,this._device=t,this._bufferManager=i,this._frameLastBuffer=-1,this._lastBufferFrameID=-1,this._currentTotalIndices=0,this._countIncrement=r,this._allocateNewIndices(n)}Object.defineProperty(_0x2acf8c.prototype,"querySet",{get:function(){return this._querySet.querySet},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2acf8c.prototype,"hasQueries",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2acf8c.prototype,"canBeginQuery",{get:function(){switch(this._engine._getCurrentRenderPassIndex()){case 0:return void 0!==this._engine._mainRenderPassWrapper.renderPassDescriptor.occlusionQuerySet;case 1:return void 0!==this._engine._rttRenderPassWrapper.renderPassDescriptor.occlusionQuerySet}return!1},enumerable:!1,configurable:!0}),_0x2acf8c.prototype.createQuery=function(){0===this._availableIndices.length&&this._allocateNewIndices();var e=this._availableIndices[_0x153d01];return _0x153d01--,e},_0x2acf8c.prototype.deleteQuery=function(e){_0x153d01++,this._availableIndices[_0x153d01]=e},_0x2acf8c.prototype.isQueryResultAvailable=function(e){return this._retrieveQueryBuffer(),!!this._lastBuffer&&e<this._lastBuffer.length},_0x2acf8c.prototype.getQueryResult=function(e){var t,i;return Number(null!==(i=null===(t=this._lastBuffer)||void 0===t?void 0:t[e])&&void 0!==i?i:-1)},_0x2acf8c.prototype.getQueryResultFrameID=function(){return this._lastBufferFrameID},_0x2acf8c.prototype._retrieveQueryBuffer=function(){var e=this;this._lastBuffer&&this._frameLastBuffer===this._engine.frameId||this._frameLastBuffer!==this._engine.frameId&&(this._frameLastBuffer=this._engine.frameId,this._querySet.readValues(0,this._currentTotalIndices,this._engine.frameId).then((function(t){e._lastBuffer=t.data,e._lastBufferFrameID=t.frameId})).catch((t=>{e._lastBuffer=null})))},_0x2acf8c.prototype._allocateNewIndices=function(e){e=null!=e?e:this._countIncrement,this._delayQuerySetDispose();for(var t=0;t<e;++t)this._availableIndices.push(this._currentTotalIndices+t);_0x153d01=this._availableIndices.length-1,this._currentTotalIndices+=e,this._querySet=new _0x4257dd(this._currentTotalIndices,_0x572d87.QueryType.Occlusion,this._device,this._bufferManager,!1)},_0x2acf8c.prototype._delayQuerySetDispose=function(){var e=this._querySet;e&&setTimeout((function(){return e.dispose}),1e3)},_0x2acf8c.prototype.dispose=function(){var e;null===(e=this._querySet)||void 0===e||e.dispose(),this._availableIndices=[]};var _0x5b909c=(_0x4f2139=!0,function(e,t){var i=_0x4f2139?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f2139=!1,i}),_0x36306a=_0x5b909c(void 0,(function(){return _0x36306a.toString().search("(((.+)+)+)+$").toString().constructor(_0x36306a).search("(((.+)+)+)+$")})),_0x4f2139;function _0x2387ba(e,t){void 0===t&&(t=20),this.debug=!1,this._sourceCode=e,this._numMaxIterations=t,this._functionDescr=[],this.inlineToken="#define inline"}_0x36306a(),Object.defineProperty(_0x2387ba.prototype,"code",{get:function(){return this._sourceCode},enumerable:!1,configurable:!0}),_0x2387ba.prototype.processCode=function(){this.debug&&console.log("Start inlining process (code size=".concat(this._sourceCode.length,")...")),this._collectFunctions(),this._processInlining(this._numMaxIterations),this.debug&&console.log("End of inlining process.")},_0x2387ba.prototype._collectFunctions=function(){for(var e=0;e<this._sourceCode.length;){var t=this._sourceCode.indexOf(this.inlineToken,e);if(t<0)break;var i=this._sourceCode.indexOf("(",t+this.inlineToken.length);if(i<0)this.debug&&console.warn("Could not find the opening parenthesis after the token. startIndex=".concat(e)),e=t+this.inlineToken.length;else{var n=_0x2387ba._RegexpFindFunctionNameAndType.exec(this._sourceCode.substring(t+this.inlineToken.length,i));if(n){var r=[n[3],n[4]],o=r[0],a=r[1],s=ExtractBetweenMarkers("(",")",this._sourceCode,i);if(s<0)this.debug&&console.warn("Could not extract the parameters the function '".concat(a,"' (type=").concat(o,"). funcParamsStartIndex=").concat(i)),e=t+this.inlineToken.length;else{var l=this._sourceCode.substring(i+1,s),u=SkipWhitespaces(this._sourceCode,s+1);if(u!==this._sourceCode.length){var c=ExtractBetweenMarkers("{","}",this._sourceCode,u);if(c<0)this.debug&&console.warn("Could not extract the body of the function '".concat(a,"' (type=").concat(o,"). funcBodyStartIndex=").concat(u)),e=t+this.inlineToken.length;else{for(var h=this._sourceCode.substring(u,c+1),d=RemoveComments(l).split(","),f=[],p=0;p<d.length;++p){var _=d[p].trim(),m=_.lastIndexOf(" ");m>=0&&f.push(_.substring(m+1))}"void"!==o&&f.push("return"),this._functionDescr.push({name:a,type:o,parameters:f,body:h,callIndex:0}),e=c+1;var g=t>0?this._sourceCode.substring(0,t):"",x=c+1<this._sourceCode.length-1?this._sourceCode.substring(c+1):"";this._sourceCode=g+x,e-=c+1-t}}else this.debug&&console.warn("Could not extract the body of the function '".concat(a,"' (type=").concat(o,"). funcParamsEndIndex=").concat(s)),e=t+this.inlineToken.length}}else this.debug&&console.warn("Could not extract the name/type of the function from: ".concat(this._sourceCode.substring(t+this.inlineToken.length,i))),e=t+this.inlineToken.length}}this.debug&&console.log("Collect functions: ".concat(this._functionDescr.length," functions found. functionDescr="),this._functionDescr)},_0x2387ba.prototype._processInlining=function(e){for(void 0===e&&(e=20);e-- >=0&&this._replaceFunctionCallsByCode(););return this.debug&&console.log("numMaxIterations is ".concat(e," after inlining process")),e>=0},_0x2387ba.prototype._replaceFunctionCallsByCode=function(){for(var e=!1,t=0,i=this._functionDescr;t<i.length;t++)for(var n=i[t],r=n.name,o=n.type,a=n.parameters,s=n.body,l=0;l<this._sourceCode.length;){var u=this._sourceCode.indexOf(r,l);if(u<0)break;if(0===u||IsIdentifierChar(this._sourceCode.charAt(u-1)))l=u+r.length;else{var c=SkipWhitespaces(this._sourceCode,u+r.length);if(c!==this._sourceCode.length&&"("===this._sourceCode.charAt(c)){var h=ExtractBetweenMarkers("(",")",this._sourceCode,c);if(h<0)this.debug&&console.warn("Could not extract the parameters of the function call. Function '".concat(r,"' (type=").concat(o,"). callParamsStartIndex=").concat(c)),l=u+r.length;else{var d=this._sourceCode.substring(c+1,h),f=function(e){for(var t=[],i=0,n=0;i<e.length;){if("("===e.charAt(i)){var r=ExtractBetweenMarkers("(",")",e,i);if(r<0)return null;i=r}else","===e.charAt(i)&&(t.push(e.substring(n,i)),n=i+1);i++}return n<i&&t.push(e.substring(n,i)),t}(RemoveComments(d));if(null!==f){for(var p=[],_=0;_<f.length;++_){var m=f[_].trim();p.push(m)}var g="void"!==o?r+"_"+n.callIndex++:null;if(g&&p.push(g+" ="),p.length===a.length){l=h+1;var x=this._replaceNames(s,a,p),v=u>0?this._sourceCode.substring(0,u):"",y=h+1<this._sourceCode.length-1?this._sourceCode.substring(h+1):"";if(g){var $=FindBackward(this._sourceCode,u-1,"\n");v=this._sourceCode.substring(0,$+1);var b=this._sourceCode.substring($+1,u);this._sourceCode=v+o+" "+g+";\n"+x+"\n"+b+g+y,this.debug&&console.log("Replace function call by code. Function '".concat(r,"' (type=").concat(o,"). injectDeclarationIndex=").concat($,", call parameters=").concat(p))}else this._sourceCode=v+x+y,l+=x.length-(h+1-u),this.debug&&console.log("Replace function call by code. Function '".concat(r,"' (type=").concat(o,"). functionCallIndex=").concat(u,", call parameters=").concat(p));e=!0}else this.debug&&console.warn("Invalid function call: not the same number of parameters for the call than the number expected by the function. Function '".concat(r,"' (type=").concat(o,"). function parameters=").concat(a,", call parameters=").concat(p)),l=u+r.length}else this.debug&&console.warn("Invalid function call: can't extract the parameters of the function call. Function '".concat(r,"' (type=").concat(o,"). callParamsStartIndex=").concat(c,", callParams=")+d),l=u+r.length}}else l=u+r.length}}return e},_0x2387ba.prototype._replaceNames=function(e,t,i){for(var n=function(n){var r=new RegExp(EscapeRegExp(t[n]),"g"),o=t[n].length,a=i[n];e=e.replace(r,(function(i){for(var r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];var l=r[0];return IsIdentifierChar(e.charAt(l-1))||IsIdentifierChar(e.charAt(l+o))?t[n]:a}))},r=0;r<t.length;++r)n(r);return e},_0x2387ba._RegexpFindFunctionNameAndType=/((\s+?)(\w+)\s+(\w+)\s*?)$/;var _0x4af926=(_0x4eca60=!0,function(e,t){var i=_0x4eca60?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4eca60=!1,i}),_0x19f64c=_0x4af926(void 0,(function(){return _0x19f64c.toString().search("(((.+)+)+)+$").toString().constructor(_0x19f64c).search("(((.+)+)+)+$")})),_0x4eca60;function _0x48a429(){this._twgsl=null}_0x19f64c(),_0x48a429.prototype.initTwgsl=function(e){var t=n$15((e=_0x48a429._TWgslDefaultOptions).jsPath),i=n$15(e.wasmPath),n=this;return _0x4d7f4f.LoadScriptAsync(t).then((function(){return self.twgsl(i)})).then((function(e){n._twgsl=e,Promise.resolve()}))},_0x48a429.prototype.convertSpirV2WGSL=function(e){var t=this._twgsl.convertSpirV2WGSL(e);return _0x48a429.ShowWGSLShaderCode&&(console.log(t),console.log("***********************************************")),t},_0x48a429._TWgslDefaultOptions={jsPath:"ThirdParty/twgsl.js",wasmPath:"ThirdParty/twgsl.wasm"},_0x48a429.ShowWGSLShaderCode=!1;var _0x246b18=(_0x2e819d=!0,function(e,t){var i=_0x2e819d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e819d=!1,i}),_0x460b8f=_0x246b18(void 0,(function(){return _0x460b8f.toString().search("(((.+)+)+)+$").toString().constructor(_0x460b8f).search("(((.+)+)+)+$")})),_0x2e819d;function _0x484097(e,t,i,n){this._record=!1,this._play=!1,this._mainPassBundleList=[],this._enabled=!1,this._engine=e,this._mode=t,this._bundleList=i,this._bundleListRenderTarget=n}_0x460b8f(),Object.defineProperty(_0x484097.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._mainPassBundleList.length=0,this._record=this._enabled=e,this._play=!1,e&&(this._modeSaved=this._mode,this._mode=Constants.SNAPSHOTRENDERING_STANDARD)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x484097.prototype,"play",{get:function(){return this._play},enumerable:!1,configurable:!0}),Object.defineProperty(_0x484097.prototype,"record",{get:function(){return this._record},enumerable:!1,configurable:!0}),Object.defineProperty(_0x484097.prototype,"mode",{get:function(){return this._mode},set:function(e){this._record?this._modeSaved=e:this._mode=e},enumerable:!1,configurable:!0}),_0x484097.prototype.endMainRenderPass=function(){this._record&&this._mainPassBundleList.push(this._bundleList.clone())},_0x484097.prototype.endRenderTargetPass=function(e,t){var i,n,r,o;if(this._play)null===(n=null===(i=t._bundleLists)||void 0===i?void 0:i[t._currentLayer])||void 0===n||n.run(e),this._mode===Constants.SNAPSHOTRENDERING_FAST&&this._engine._reportDrawCall(null===(o=null===(r=t._bundleLists)||void 0===r?void 0:r[t._currentLayer])||void 0===o?void 0:o.numDrawCalls);else{if(!this._record)return!1;!t._bundleLists&&(t._bundleLists=[]),t._bundleLists[t._currentLayer]=this._bundleListRenderTarget.clone(),t._bundleLists[t._currentLayer].run(e),this._bundleListRenderTarget.reset()}return!0},_0x484097.prototype.endFrame=function(e){if(this._record&&(this._mainPassBundleList.push(this._bundleList.clone()),this._record=!1,this._play=!0,this._mode=this._modeSaved),null!==e&&this._play)for(var t=0;t<this._mainPassBundleList.length;++t)this._mainPassBundleList[t].run(e),this._mode===Constants.SNAPSHOTRENDERING_FAST&&this._engine._reportDrawCall(this._mainPassBundleList[t].numDrawCalls)},_0x484097.prototype.reset=function(){this.enabled=!1,this.enabled=!0};var d$1g={NONE:0,STORING:1,STORED:2,FAILED:3};function l$15(e){if(!e$2b(e.name))throw new t$16("options.name is required.");var t=o$1l.defer();this.dbname=e.name;var i=indexedDB.open(this.dbname),n=this;return i.onsuccess=function(e){n.db=e.target.result,n.version=n.db.version,e$2b(n.cachestatus)||(n.cachestatus={}),t.resolve(n)},i.onupgradeneeded=function(e){n.db=e.target.result,n.version=n.db.version,t.resolve(n)},i.onerror=function(e){n.db=null,t.reject("create database fail, error code : "+e.target.errorcode)},this.layer=e.layer||null,this.storageType=e.storageType||"arrayBuffer",this.creatingTable=!1,this.cachestatus={},t.promise}l$15.prototype.checkObjectStoreExit=function(e){return!!e$2b(this.db)&&this.db.objectStoreNames.contains(e)},l$15.prototype.createObjectStore=function(e){var t=o$1l.defer();if(this.creatingTable)t.reject(!1);else{if(this.db.objectStoreNames.contains(e))return t.reject(!1),t.promise;this.creatingTable=!0;var i=this,n=parseInt(i.db.version);i.db.close();var r=indexedDB.open(i.dbname,n+1);r.onupgradeneeded=function(r){var o=r.target.result;i.db=o;var a=o.createObjectStore(e,{keyPath:"id"});e$2b(a)?(a.createIndex("value","value",{unique:!1}),e$2b(i.cachestatus)||(i.cachestatus={}),i.cachestatus[e]={},indexedDB.open(i.dbname,n+2).onsuccess=function(e){var n=e.target.result;i.db=n,i.creatingTable=!1,t.resolve(!0)}):(i.creatingTable=!1,t.reject(!1))},r.onsuccess=function(e){i.creatingTable=!1,e.target.result.close(),t.resolve(!0)},r.onerror=function(e){i.creatingTable=!1,t.reject(!1)}}return t.promise},l$15.prototype.putElementInDB=function(e,t,i,n){var r=o$1l.defer();if(!e$2b(this.db))return r.reject(!1),r.promise;var o,a=this;if(e$2b(a.cachestatus[e])&&!e$2b(n)&&e$2b(a.cachestatus[e][t])&&(a.cachestatus[e][t]===d$1g.STORING||a.cachestatus[e][t]===d$1g.STORED))return r.resolve(!1),r.promise;if(this.db.objectStoreNames.contains(e)){var s;e$2b(a.cachestatus[e])||(a.cachestatus[e]={});try{s=this.db.transaction([e],"readwrite")}catch{return r.reject(null),r.promise}if(o=s.objectStore(e),e$2b(n))if(n instanceof Array){for(var l=0,u=n.length;l<u;l++)a.cachestatus[e][n[l].key]!==d$1g.STORED&&(o.add({id:n[l].key,value:n[l].value}),a.cachestatus[e][n[l].key]=d$1g.STORED);r.resolve(!0)}else{for(var t in n)isNaN(1*t)||o.add({id:t,value:n[t]});r.resolve(!0)}else{if(!e$2b(t)||!e$2b(i))return;if(t instanceof Array&&i instanceof Array){for(l=0,u=t.length;l<u;l++)a.cachestatus[e][t[l]]!==d$1g.STORED&&(o.add({id:t[l],value:i[l]}),a.cachestatus[e][t[l]]=d$1g.STORED);s.oncomplete=function(e){r.resolve(!0)},s.onerror=function(e){r.reject(!1)}}else{var c=o.add({id:t,value:i});a.cachestatus[e][t]=d$1g.STORING,c.onsuccess=function(i){a.cachestatus[e][t]=d$1g.STORED,r.resolve(!0)},c.onerror=function(i){a.cachestatus[e][t]=d$1g.FAILED,r.reject(!1)}}}}else this.createObjectStore(e).then((function(s){var l=a.db.transaction([e],"readwrite");if(o=l.objectStore(e),e$2b(n)){for(var u=0,c=n.length;u<c;u++)o.add({id:n[u].key,value:n[u].value});r.resolve(!0)}else{var h=o.add({id:t,value:i});h.onsuccess=function(e){r.resolve(!0)},h.onerror=function(e){r.reject(!1)}}}),(function(e){r.reject(!1)}));return r.promise},l$15.prototype.getRangeFromDB=function(e,t){var i,n,r=o$1l.defer();if(!e$2b(this.db)||!this.db.objectStoreNames.contains(e))return null;try{i=this.db.transaction([e])}catch{return r.reject(null),r.promise}try{n=i.objectStore(e)}catch{r.reject(null)}var o=n.openCursor(IDBKeyRange.bound(t[0],t[1])),a=[];return o.onsuccess=function(e){var t=e.target.result;e$2b(t)?(a.push(t.value),t.continue()):r.resolve(a)},o.onerror=function(e){r.reject(null)},r.promise},l$15.prototype.getElementFromDB=function(e,t){var i,n,r=o$1l.defer();if(!e$2b(this.db))return null;if(!this.db.objectStoreNames.contains(e))return r.reject(null),r.promise;try{i=this.db.transaction([e])}catch{return r.reject(null),r.promise}try{n=i.objectStore(e)}catch{r.reject(null)}var o=n.get(t);return o.onsuccess=function(e){e$2b(e.target.result)?r.resolve(e.target.result.value):r.reject(null)},o.onerror=function(e){r.reject(null)},r.promise},l$15.prototype.getAllElementFromDB=function(e){var t,i,n=o$1l.defer();if(!e$2b(this.db)||!this.db.objectStoreNames.contains(e))return null;if(null!=this.transaction)t=this.transaction;else try{t=this.db.transaction([e])}catch{return n.reject(null),n.promise}try{i=t.objectStore(e)}catch{n.reject(null)}var r=i.getAll();return r.onsuccess=function(e){e$2b(e.target.result)?n.resolve(e.target.result):n.reject(null)},r.onerror=function(e){n.reject(null)},n.promise},l$15.prototype.updateElementInDB=function(e,t,i,n){var r=o$1l.defer();if(!e$2b(this.db)||!this.db.objectStoreNames.contains(e))return r.resolve(!1),r.promise;var o,a=this.db.transaction([e],"readwrite");try{o=a.objectStore(e)}catch{r.resolve(!1)}var s=o.get(t);return s.onsuccess=function(e){var a=e.target.result;e$2b(a)||(a={id:t}),a.value=!0===n?Object.assign(a.value,i):i;var s=o.put(a);s.onsuccess=function(e){r.resolve(!0)},s.onerror=function(e){r.resolve(!1)}},s.onerror=function(e){r.resolve(!1)},r.promise},l$15.prototype.removeElementFromDB=function(e,t){var i=o$1l.defer();if(!e$2b(this.db)||!this.db.objectStoreNames.contains(e))return i.resolve(!1),i.promise;var n,r=this.db.transaction([e],"readwrite");try{n=r.objectStore(e)}catch{i.resolve(!1)}var o=n.delete(t);return o.onerror=function(e){i.resolve(!1)},o.onsuccess=function(e){i.resolve(!0)},i.promise},l$15.prototype.clear=function(e){var t=o$1l.defer();if(!e$2b(this.db)||!this.db.objectStoreNames.contains(e))return t.resolve(!1),t.promise;var i,n=this.db.transaction([e],"readwrite");try{i=n.objectStore(e)}catch{t.resolve(!1)}var r=i.clear();return r.onerror=function(e){t.resolve(!1)},r.onsuccess=function(e){t.resolve(!0)},t.promise};var _0x2a85f7=(_0x5a5e17=!0,function(e,t){var i=_0x5a5e17?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a5e17=!1,i}),_0x473438=_0x2a85f7(void 0,(function(){return _0x473438.toString().search("(((.+)+)+)+$").toString().constructor(_0x473438).search("(((.+)+)+)+$")})),_0x5a5e17,_0x380ca0;function _0x58fcf(e,t){void 0===t&&(t={});var i,n,r,o,a=_0x402caf.call(this,null);if((a=this)._uploadEncoderDescriptor={label:"upload"},a._renderEncoderDescriptor={label:"render"},a._renderTargetEncoderDescriptor={label:"renderTarget"},a._clearDepthValue=1,a._clearReverseDepthValue=0,a._clearStencilValue=0,a._defaultSampleCount=4,a._glslang=null,a._tintWASM=null,a._compiledComputeEffects={},a._counters={numEnableEffects:0,numEnableDrawWrapper:0,numBundleCreationNonCompatMode:0,numBundleReuseNonCompatMode:0},a.countersLastFrame={numEnableEffects:0,numEnableDrawWrapper:0,numBundleCreationNonCompatMode:0,numBundleReuseNonCompatMode:0},a.numMaxUncapturedErrors=20,a._commandBuffers=[null,null,null],a._currentRenderPass=null,a._mainRenderPassWrapper=new _0x5c4f17,a._rttRenderPassWrapper=new _0x5c4f17,a._pendingDebugCommands=[],a._onAfterUnbindFrameBufferObservable=new Observable,a._currentOverrideVertexBuffers=null,a._currentIndexBuffer=null,a._colorWriteLocal=!0,a._forceEnableEffect=!1,a.dbgShowShaderCode=!1,a.dbgSanityChecks=!0,a.dbgVerboseLogsForFirstFrames=!1,a.dbgVerboseLogsNumFrames=10,a.dbgLogIfNotDrawWrapper=!0,a.dbgShowEmptyEnableEffectCalls=!0,a._viewportsCurrent=[{x:0,y:0,w:0,h:0},{x:0,y:0,w:0,h:0}],a._scissorsCurrent=[{x:0,y:0,w:0,h:0},{x:0,y:0,w:0,h:0}],a._scissorCached={x:0,y:0,z:0,w:0},a._stencilRefsCurrent=[-1,-1],a._blendColorsCurrent=[[null,null,null,null],[null,null,null,null]],a._name="WebGPU",a.isNDCHalfZRange=!0,a.hasOriginBottomLeft=!1,t.deviceDescriptor=t.deviceDescriptor||{},t.swapChainFormat=t.swapChainFormat||_0x572d87.TextureFormat.BGRA8Unorm,t.antialiasing=void 0===t.antialiasing||t.antialiasing,t.stencil=null===(i=t.stencil)||void 0===i||i,t.enableGPUDebugMarkers=null!==(n=t.enableGPUDebugMarkers)&&void 0!==n&&n,!navigator.gpu)return console.log("WebGPU is not supported by your browser."),a;a._isWebGPU=!0,a._shaderPlatformName="WEBGPU",void 0===t.deterministicLockstep&&(t.deterministicLockstep=!1),void 0===t.lockstepMaxSteps&&(t.lockstepMaxSteps=4),void 0===t.audioEngine&&(t.audioEngine=!0),a._deterministicLockstep=t.deterministicLockstep,a._lockstepMaxSteps=t.lockstepMaxSteps,a._timeStep=t.timeStep||1/60,a._doNotHandleContextLost=!!t.doNotHandleContextLost,a._canvas=e,a._options=t,a.premultipliedAlpha=null===(r=t.premultipliedAlpha)||void 0===r||r;var s=window.devicePixelRatio||1,l=t.limitDeviceRatio||s,u=null!==(o=t.adaptToDeviceRatio)&&void 0!==o&&o;a._hardwareScalingLevel=u?1/Math.min(l,s):1,a._mainPassSampleCount=t.antialiasing?a._defaultSampleCount:1,a._isStencilEnable=t.stencil,a._shaderProcessor=new _0x3d24e9,a._shaderProcessorWGSL=new _0xbbdbb1;var c=a;return a.saveCompiledShaderInIndexDB=!0,new l$15({name:_0x58fcf.COMPILED_WGSL_STORE_NAME}).then((function(e){e.checkObjectStoreExit(_0x58fcf.COMPILED_WGSL_TABLE_NAME)?c._indexedDBScheduler=e:e.createObjectStore(_0x58fcf.COMPILED_WGSL_TABLE_NAME).then((function(){c._indexedDBScheduler=e}))})),a}_0x473438(),_0x402caf&&(_0x58fcf.__proto__=_0x402caf),_0x58fcf.prototype=Object.create(_0x402caf&&_0x402caf.prototype),_0x58fcf.prototype.constructor=_0x402caf,Object.defineProperties(_0x58fcf.prototype,{snapshotRenderingMode:{get:function(){return this._snapshotRendering.mode},set:function(e){this._snapshotRendering.mode=e}},snapshotRendering:{get:function(){return this._snapshotRendering.enabled},set:function(e){this._snapshotRendering.enabled=e}},disableCacheSamplers:{get:function(){return!!this._cacheSampler&&this._cacheSampler.disabled},set:function(e){this._cacheSampler&&(this._cacheSampler.disabled=e)}},disableCacheRenderPipelines:{get:function(){return!!this._cacheRenderPipeline&&this._cacheRenderPipeline.disabled},set:function(e){this._cacheRenderPipeline&&(this._cacheRenderPipeline.disabled=e)}},disableCacheBindGroups:{get:function(){return!!this._cacheBindGroups&&this._cacheBindGroups.disabled},set:function(e){this._cacheBindGroups&&(this._cacheBindGroups.disabled=e)}},IsSupportedAsync:{get:function(){return navigator.gpu?navigator.gpu.requestAdapter().then((function(e){return!!e}),(function(){return!1})).catch((function(){return!1})):Promise.resolve(!1)}},IsSupported:{get:function(){return console.log("You must call IsSupportedAsync for WebGPU!"),!1}},supportsUniformBuffers:{get:function(){return!0}},supportedExtensions:{get:function(){return this._adapterSupportedExtensions}},enabledExtensions:{get:function(){return this._deviceEnabledExtensions}},description:{get:function(){return this.name+this.version}},version:{get:function(){return 1}},compatibilityMode:{get:function(){return this._compatibilityMode},set:function(e){this._compatibilityMode=e}},currentSampleCount:{get:function(){return this._currentRenderTarget?this._currentRenderTarget.samples:this._mainPassSampleCount}},caps:{get:function(){return this._caps}}}),_0x58fcf.prototype.snapshotRenderingReset=function(){this._snapshotRendering.reset()},_0x58fcf.prototype.getInfo=function(){return{vendor:"unknown vendor",renderer:"unknown renderer",version:"unknown version"}},_0x58fcf.CreateAsync=function(e,t){void 0===t&&(t={});var i=new _0x58fcf(e,t);return new Promise((function(e){i.initAsync(t.glslangOptions,t.twgslOptions).then((function(){return e(i)}))}))},_0x58fcf.prototype.initAsync=function(e,t){var i,n=this;return this._initGlslang(null!=e?e:null===(i=this._options)||void 0===i?void 0:i.glslangOptions).then((function(e){var i;return n._glslang=e,n._tintWASM=_0x58fcf.UseTWGSL?new _0x48a429:null,n._tintWASM?n._tintWASM.initTwgsl(null!=t?t:null===(i=n._options)||void 0===i?void 0:i.twgslOptions).then((function(){return navigator.gpu.requestAdapter(n._options)}),(function(e){throw console.log("Can not initialize twgsl!"),Error("WebGPU initializations stopped.")})):navigator.gpu.requestAdapter(n._options)}),(function(e){throw console.log("Can not initialize glslang!"),Error("WebGPU initializations stopped.")})).then((function(e){if(e){n._adapter=e,n._adapterSupportedExtensions=[],n._adapter.features.forEach((function(e){return n._adapterSupportedExtensions.push(e)}));var t=n._options.deviceDescriptor;if(null==t?void 0:t.requiredFeatures){for(var i=[],r=0,o=t.requiredFeatures;r<o.length;r++){var a=o[r];-1!==n._adapterSupportedExtensions.indexOf(a)&&i.push(a)}t.requiredFeatures=i}return n._adapter.requestDevice(n._options.deviceDescriptor)}throw"Could not retrieve a WebGPU adapter (adapter is null)."})).then((function(e){var t,i;n._device=e,n._deviceEnabledExtensions=[],null===(t=n._device.features)||void 0===t||t.forEach((function(e){return n._deviceEnabledExtensions.push(e)}));var r=-1;n._device.addEventListener("uncapturederror",(function(e){++r<n.numMaxUncapturedErrors?_0x41154e.Warn("WebGPU uncaptured error (".concat(r+1,"): ").concat(e.error," - ").concat(e.error.message)):r++===n.numMaxUncapturedErrors&&_0x41154e.Warn("WebGPU uncaptured error: too many warnings (".concat(n.numMaxUncapturedErrors,"), no more warnings will be reported to the console for this engine."))})),!n._doNotHandleContextLost&&(null===(i=n._device.lost)||void 0===i||i.then((function(e){n._contextWasLost=!0,_0x41154e.Warn("WebGPU context lost. "+e),n.onContextLostObservable.notifyObservers(n),n._restoreEngineAfterContextLost(n.initAsync.bind(n))})))}),(function(e){console.log("Could not retrieve a WebGPU device.")})).then((function(){n._bufferManager=new _0x94ba70(n._device),n._textureHelper=new WebGPUTextureHelper(n._device,n._glslang,n._tintWASM,n._bufferManager,n),n._cacheSampler=new _0x408e52(n._device),n._cacheBindGroups=new _0x4f09ec(n._device,n._cacheSampler,n),n._timestampQuery=new _0x5bafda(n._device,n._bufferManager),n._occlusionQuery=n._device.createQuerySet?new _0x2acf8c(n,n._device,n._bufferManager):void 0,n._bundleList=new WebGPUBundleList(n._device),n._bundleListRenderTarget=new WebGPUBundleList(n._device),n._snapshotRendering=new _0x484097(n,n._snapshotRenderingMode,n._bundleList,n._bundleListRenderTarget),n._ubInvertY=n._bufferManager.createBuffer(new Float32Array([-1,0]),_0x572d87.BufferUsage.Uniform|_0x572d87.BufferUsage.CopyDst),n._ubDontInvertY=n._bufferManager.createBuffer(new Float32Array([1,0]),_0x572d87.BufferUsage.Uniform|_0x572d87.BufferUsage.CopyDst),n.dbgVerboseLogsForFirstFrames&&void 0===n._count&&(n._count=0,console.log("%c frame #"+n._count+" - begin","background: #ffff00")),n._uploadEncoder=n._device.createCommandEncoder(n._uploadEncoderDescriptor),n._renderEncoder=n._device.createCommandEncoder(n._renderEncoderDescriptor),n._renderTargetEncoder=n._device.createCommandEncoder(n._renderTargetEncoderDescriptor),n._emptyVertexBuffer=new VertexBuffer(n,[0],"",!1,!1,1,!1,0,1),n._initializeLimits(),n._cacheRenderPipeline=new _0x13d308(n._device,n._emptyVertexBuffer,!n._caps.textureFloatLinearFiltering),n._depthCullingState=new _0x4b0a2f(n._cacheRenderPipeline),n._stencilStateComposer=new _0x26fc33(n._cacheRenderPipeline),n._stencilStateComposer.stencilGlobal=n._stencilState,n._depthCullingState.depthTest=!0,n._depthCullingState.depthFunc=_0x354cf8.LEQUAL,n._depthCullingState.depthMask=!0,n._textureHelper.setCommandEncoder(n._uploadEncoder),n._clearQuad=new _0x56b5da(n._device,n,n._emptyVertexBuffer),n._defaultDrawContext=n.createDrawContext(),n._currentDrawContext=n._defaultDrawContext,n._defaultMaterialContext=n.createMaterialContext(),n._currentMaterialContext=n._defaultMaterialContext,n._initializeContextAndSwapChain(),n._initializeMainAttachments(!0)})).catch((function(e){console.log("Can not create WebGPU Device and/or context."),console.trace&&console.trace()}))},_0x58fcf.prototype._initGlslang=function(e){if(e=e||{},(e=p$19(_0x58fcf._GLSLslangDefaultOptions,e)).glslang)return Promise.resolve(e.glslang);if(self.glslang)return self.glslang(e.wasmPath);if(e.jsPath&&e.wasmPath){var t=n$15(e.jsPath),i=n$15(e.wasmPath);return"undefined"!=typeof window?_0x4d7f4f.LoadScriptAsync(t).then((function(){return self.glslang(i)})):(importScripts(t),self.glslang(i))}return Promise.reject("gslang is not available.")},_0x58fcf.prototype._initializeLimits=function(){var e=this._adapter;this._caps={maxTexturesImageUnits:e.maxSampledTexturesPerShaderStage,maxVertexTextureImageUnits:e.maxSampledTexturesPerShaderStage,maxCombinedTexturesImageUnits:32,maxTextureSize:e.maxTextureDimension2D,maxCubemapTextureSize:e.maxTextureDimension3D,maxRenderTextureSize:e.maxTextureDimension2D,maxVertexAttribs:e.maxVertexAttributes,maxVaryingVectors:15,maxFragmentUniformVectors:1024,maxVertexUniformVectors:1024,standardDerivatives:!0,astc:this._deviceEnabledExtensions.indexOf(_0x572d87.FeatureName.TextureCompressionASTC)>=0||void 0,s3tc:this._deviceEnabledExtensions.indexOf(_0x572d87.FeatureName.TextureCompressionBC)>=0||void 0,pvrtc:null,etc1:null,etc2:this._deviceEnabledExtensions.indexOf(_0x572d87.FeatureName.TextureCompressionETC2)>=0||void 0,bptc:this._deviceEnabledExtensions.indexOf(_0x572d87.FeatureName.TextureCompressionBC)>=0||void 0,maxAnisotropy:4,uintIndices:!0,fragmentDepthSupported:!0,highPrecisionShaderSupported:!0,colorBufferFloat:!0,textureFloat:!0,textureFloatLinearFiltering:!1,textureFloatRender:!0,textureHalfFloat:!0,textureHalfFloatLinearFiltering:!0,textureHalfFloatRender:!0,textureLOD:!0,drawBuffersExtension:!0,depthTextureExtension:!0,vertexArrayObject:!1,instancedArrays:!0,timerQuery:"undefined"!=typeof BigUint64Array&&-1!==this.enabledExtensions.indexOf(_0x572d87.FeatureName.TimestampQuery)||void 0,supportOcclusionQuery:"undefined"!=typeof BigUint64Array,canUseTimestampForTimerQuery:!0,multiview:!1,oculusMultiview:!1,parallelShaderCompile:void 0,blendMinMax:!0,maxMSAASamples:4,canUseGLInstanceID:!0,canUseGLVertexID:!0,supportComputeShaders:!0,supportSRGBBuffers:!0,supportTransformFeedbacks:!1,textureMaxLevel:!0,texture2DArrayMaxLayerCount:e.maxTextureArrayLayers,minUniformBufferOffsetAlignment:e.minUniformBufferOffsetAlignment,maxUniformBufferBindingSize:e.maxUniformBufferBindingSize},this._caps.parallelShaderCompile=null,this._features={forceBitmapOverHTMLImageElement:!0,supportRenderAndCopyToLodForFloatTextures:!0,supportDepthStencilTexture:!0,supportShadowSamplers:!0,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:!0,trackUbosInFrame:!0,checkUbosContentBeforeUpload:!0,supportCSM:!0,basisNeedsPOT:!1,support3DTextures:!0,needTypeSuffixInShaderConstants:!0,supportMSAA:!0,supportSSAO2:!0,supportExtendedTextureFormats:!0,supportSwitchCaseInShader:!0,supportSyncTextureRead:!1,needsInvertingBitmap:!1,useUBOBindingCache:!1,needShaderCodeInlining:!0,needToAlwaysBindUniformBuffers:!0,supportRenderPasses:!0,_collectUbosUpdatedInFrame:!1}},_0x58fcf.prototype._initializeContextAndSwapChain=function(){this._context=this._canvas.getContext("webgpu"),this._configureContext(),this._colorFormat=this._options.swapChainFormat,this._mainRenderPassWrapper.colorAttachmentGPUTextures=[new _0x253af9],this._mainRenderPassWrapper.colorAttachmentGPUTextures[0].format=this._colorFormat},_0x58fcf.prototype._initializeMainAttachments=function(e){var t;void 0===e&&(e=!1),this._mainTextureExtends={width:this.getRenderWidth(e),height:this.getRenderHeight(e),depthOrArrayLayers:1};var i,n=new Float32Array([this.getRenderHeight()]);if(this._bufferManager.setSubData(this._ubInvertY,4,n),this._bufferManager.setSubData(this._ubDontInvertY,4,n),this._options.antialiasing){var r={size:this._mainTextureExtends,mipLevelCount:1,sampleCount:this._mainPassSampleCount,dimension:_0x572d87.TextureDimension.E2d,format:this._options.swapChainFormat,usage:_0x572d87.TextureUsage.RenderAttachment};null===(t=this._mainTexture)||void 0===t||t.destroy(),this._mainTexture=this._device.createTexture(r),i=[{view:this._mainTexture.createView(),clearValue:new e$1U(0,0,0,1),loadOp:_0x572d87.LoadOp.Clear,storeOp:_0x572d87.StoreOp.Store}]}else i=[{view:void 0,clearValue:new e$1U(0,0,0,1),loadOp:_0x572d87.LoadOp.Clear,storeOp:_0x572d87.StoreOp.Store}];this._mainRenderPassWrapper.depthTextureFormat=this.isStencilEnable?_0x572d87.TextureFormat.Depth24PlusStencil8:_0x572d87.TextureFormat.Depth32Float,this._setDepthTextureFormat(this._mainRenderPassWrapper);var o={size:this._mainTextureExtends,mipLevelCount:1,sampleCount:this._mainPassSampleCount,dimension:_0x572d87.TextureDimension.E2d,format:this._mainRenderPassWrapper.depthTextureFormat,usage:_0x572d87.TextureUsage.RenderAttachment};this._depthTexture&&this._depthTexture.destroy(),this._depthTexture=this._device.createTexture(o);var a={view:this._depthTexture.createView(),depthClearValue:this._clearDepthValue,depthLoadOp:_0x572d87.LoadOp.Clear,depthStoreOp:_0x572d87.StoreOp.Store,stencilClearValue:this._clearStencilValue,stencilLoadOp:this.isStencilEnable?_0x572d87.LoadOp.Clear:void 0,stencilStoreOp:this.isStencilEnable?_0x572d87.StoreOp.Store:void 0};this._mainRenderPassWrapper.renderPassDescriptor={colorAttachments:i,depthStencilAttachment:a},null!==this._mainRenderPassWrapper.renderPass&&this._endMainRenderPass()},_0x58fcf.prototype._configureContext=function(){this._context.configure({device:this._device,format:this._options.swapChainFormat,usage:_0x572d87.TextureUsage.RenderAttachment|_0x572d87.TextureUsage.CopySrc,alphaMode:this.premultipliedAlpha?_0x572d87.CanvasCompositingAlphaMode.Premultiplied:_0x572d87.CanvasCompositingAlphaMode.Opaque})},_0x58fcf.prototype.setSize=function(e,t,i){return void 0===i&&(i=!1),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - setSize called -",e,t)),this._initializeMainAttachments(i),this.snapshotRendering&&this.snapshotRenderingReset(),!0},_0x58fcf.prototype._getShaderProcessor=function(e){return e===_0x4cf79a.WGSL?this._shaderProcessorWGSL:this._shaderProcessor},_0x58fcf.prototype._getShaderProcessingContext=function(e){return new _0x41080c(e)},_0x58fcf.prototype.applyStates=function(){this._stencilStateComposer.apply(),this._cacheRenderPipeline.setAlphaBlendEnabled(this._alphaState.alphaBlend)},_0x58fcf.prototype.wipeCaches=function(e){this.preventCacheWipeBetweenFrames&&!e||(this._forceEnableEffect=!0,this._currentIndexBuffer=null,this._currentOverrideVertexBuffers=null,this._cacheRenderPipeline.setBuffers(null,null,null),e&&(this._stencilStateComposer.reset(),this._depthCullingState.reset(),this._depthCullingState.depthFunc=_0x354cf8.LEQUAL,this._alphaState.reset(),this._alphaMode=_0x354cf8.ALPHA_ADD,this._alphaEquation=_0x354cf8.ALPHA_DISABLE,this._cacheRenderPipeline.setAlphaBlendFactors(this._alphaState._blendFunctionParameters,this._alphaState._blendEquationParameters),this._cacheRenderPipeline.setAlphaBlendEnabled(!1),this.setColorWrite(!0)),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null)},_0x58fcf.prototype.setColorWrite=function(e){this._colorWriteLocal=e,this._cacheRenderPipeline.setWriteMask(e?15:0)},_0x58fcf.prototype.getColorWrite=function(){return this._colorWriteLocal},_0x58fcf.prototype._resetCurrentViewport=function(e){this._viewportsCurrent[e].x=0,this._viewportsCurrent[e].y=0,this._viewportsCurrent[e].w=0,this._viewportsCurrent[e].h=0,1===e&&(this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0)},_0x58fcf.prototype._mustUpdateViewport=function(e){var t=e===this._mainRenderPassWrapper.renderPass?0:1,i=this._viewportCached.x,n=this._viewportCached.y,r=this._viewportCached.z,o=this._viewportCached.w,a=this._viewportsCurrent[t].x!==i||this._viewportsCurrent[t].y!==n||this._viewportsCurrent[t].w!==r||this._viewportsCurrent[t].h!==o;return a&&(this._viewportsCurrent[t].x=this._viewportCached.x,this._viewportsCurrent[t].y=this._viewportCached.y,this._viewportsCurrent[t].w=this._viewportCached.z,this._viewportsCurrent[t].h=this._viewportCached.w),a},_0x58fcf.prototype._applyViewport=function(e){var t=Math.floor(this._viewportCached.y),i=Math.floor(this._viewportCached.w);!this._currentRenderTarget&&(t=this.getRenderHeight()-t-i),e.setViewport(Math.floor(this._viewportCached.x),t,Math.floor(this._viewportCached.z),i,0,1),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - viewport applied - (",this._viewportCached.x,this._viewportCached.y,this._viewportCached.z,this._viewportCached.w,") current pass is main pass="+(e===this._mainRenderPassWrapper.renderPass)))},_0x58fcf.prototype._viewport=function(e,t,i,n){this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=i,this._viewportCached.w=n},_0x58fcf.prototype._resetCurrentScissor=function(e){this._scissorsCurrent[e].x=0,this._scissorsCurrent[e].y=0,this._scissorsCurrent[e].w=0,this._scissorsCurrent[e].h=0},_0x58fcf.prototype._mustUpdateScissor=function(e){var t=e===this._mainRenderPassWrapper.renderPass?0:1,i=this._scissorCached.x,n=this._scissorCached.y,r=this._scissorCached.z,o=this._scissorCached.w,a=this._scissorsCurrent[t].x!==i||this._scissorsCurrent[t].y!==n||this._scissorsCurrent[t].w!==r||this._scissorsCurrent[t].h!==o;return a&&(this._scissorsCurrent[t].x=this._scissorCached.x,this._scissorsCurrent[t].y=this._scissorCached.y,this._scissorsCurrent[t].w=this._scissorCached.z,this._scissorsCurrent[t].h=this._scissorCached.w),a},_0x58fcf.prototype._applyScissor=function(e){e.setScissorRect(this._scissorCached.x,this._currentRenderTarget?this._scissorCached.y:this.getRenderHeight()-this._scissorCached.w-this._scissorCached.y,this._scissorCached.z,this._scissorCached.w),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - scissor applied - (",this._scissorCached.x,this._scissorCached.y,this._scissorCached.z,this._scissorCached.w,") current pass is main pass="+(e===this._mainRenderPassWrapper.renderPass)))},_0x58fcf.prototype._scissorIsActive=function(){return 0!==this._scissorCached.x||0!==this._scissorCached.y||0!==this._scissorCached.z||0!==this._scissorCached.w},_0x58fcf.prototype.enableScissor=function(e,t,i,n){this._scissorCached.x=e,this._scissorCached.y=t,this._scissorCached.z=i,this._scissorCached.w=n},_0x58fcf.prototype.disableScissor=function(){this._scissorCached.x=0,this._scissorCached.y=0,this._scissorCached.z=0,this._scissorCached.w=0,this._resetCurrentScissor(0),this._resetCurrentScissor(1)},_0x58fcf.prototype._resetCurrentStencilRef=function(e){this._stencilRefsCurrent[e]=-1},_0x58fcf.prototype._mustUpdateStencilRef=function(e){var t=e===this._mainRenderPassWrapper.renderPass?0:1,i=this._stencilStateComposer.funcRef!==this._stencilRefsCurrent[t];return i&&(this._stencilRefsCurrent[t]=this._stencilStateComposer.funcRef),i},_0x58fcf.prototype._applyStencilRef=function(e){var t;e.setStencilReference(null!==(t=this._stencilStateComposer.funcRef)&&void 0!==t?t:0)},_0x58fcf.prototype._resetCurrentColorBlend=function(e){this._blendColorsCurrent[e][0]=this._blendColorsCurrent[e][1]=this._blendColorsCurrent[e][2]=this._blendColorsCurrent[e][3]=null},_0x58fcf.prototype._mustUpdateBlendColor=function(e){var t=e===this._mainRenderPassWrapper.renderPass?0:1,i=this._alphaState._blendConstants,n=i[0]!==this._blendColorsCurrent[t][0]||i[1]!==this._blendColorsCurrent[t][1]||i[2]!==this._blendColorsCurrent[t][2]||i[3]!==this._blendColorsCurrent[t][3];return n&&(this._blendColorsCurrent[t][0]=i[0],this._blendColorsCurrent[t][1]=i[1],this._blendColorsCurrent[t][2]=i[2],this._blendColorsCurrent[t][3]=i[3]),n},_0x58fcf.prototype._applyBlendColor=function(e){e.setBlendConstant(this._alphaState._blendConstants)},_0x58fcf.prototype.clear=function(e,t,i,n){void 0===n&&(n=!1),e&&void 0===e.a&&(e.a=1);var r=this._scissorIsActive();this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - clear called - backBuffer=",t," depth=",i," stencil=",n," scissor is active=",r)),this._currentRenderTarget?r?(!this._rttRenderPassWrapper.renderPass&&this._startRenderTargetRenderPass(this._currentRenderTarget,!1,t?e:null,i,n),this.compatibilityMode?this._applyScissor(this._currentRenderPass):this._bundleListRenderTarget.addItem(new WebGPURenderItemScissor(this._scissorCached.x,this._scissorCached.y,this._scissorCached.z,this._scissorCached.w)),this._clearFullQuad(t?e:null,i,n)):(this._currentRenderPass&&this._endRenderTargetRenderPass(),this._startRenderTargetRenderPass(this._currentRenderTarget,!0,t?e:null,i,n)):((!this._mainRenderPassWrapper.renderPass||!r)&&this._startMainRenderPass(!r,t?e:null,i,n),r&&(this.compatibilityMode?this._applyScissor(this._currentRenderPass):this._bundleList.addItem(new WebGPURenderItemScissor(this._scissorCached.x,this._scissorCached.y,this._scissorCached.z,this._scissorCached.w)),this._clearFullQuad(t?e:null,i,n)))},_0x58fcf.prototype._clearFullQuad=function(e,t,i){var n,r,o,a=this.compatibilityMode?this._getCurrentRenderPass():null,s=0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget;this._clearQuad.setColorFormat(this._colorFormat),this._clearQuad.setDepthStencilFormat(this._depthTextureFormat),this._clearQuad.setMRTAttachments(null!==(n=this._cacheRenderPipeline.mrtAttachments)&&void 0!==n?n:[],null!==(r=this._cacheRenderPipeline.mrtTextureArray)&&void 0!==r?r:[],this._cacheRenderPipeline.mrtTextureCount),this.compatibilityMode?a.setStencilReference(this._clearStencilValue):s.addItem(new WebGPURenderItemStencilRef(this._clearStencilValue));var l=this._clearQuad.clear(a,e,t,i,this.currentSampleCount);this.compatibilityMode?this._applyStencilRef(a):(s.addBundle(l),s.addItem(new WebGPURenderItemStencilRef(null!==(o=this._stencilStateComposer.funcRef)&&void 0!==o?o:0)),this._reportDrawCall())},_0x58fcf.prototype.createVertexBuffer=function(e){var t;return t=e instanceof Array?new Float32Array(e):e instanceof ArrayBuffer?new Uint8Array(e):e,this._bufferManager.createBufferByMap(t,_0x572d87.BufferUsage.Vertex|_0x572d87.BufferUsage.CopyDst)},_0x58fcf.prototype.createDynamicVertexBuffer=function(e){return this.createVertexBuffer(e)},_0x58fcf.prototype.createIndexBuffer=function(e){var t,i=!0;e instanceof Uint32Array||e instanceof Int32Array?t=e:e instanceof Uint16Array?(t=e,i=!1):e.length>65535?t=new Uint32Array(e):(t=new Uint16Array(e),i=!1);var n=this._bufferManager.createBufferByMap(t,_0x572d87.BufferUsage.Index|_0x572d87.BufferUsage.CopyDst);return n.is32Bits=i,n},_0x58fcf.prototype._createBuffer=function(e,t){var i;i=e instanceof Array?new Float32Array(e):e instanceof ArrayBuffer?new Uint8Array(e):e;var n=0;return t&_0x354cf8.BUFFER_CREATIONFLAG_READ&&(n|=_0x572d87.BufferUsage.CopySrc),t&_0x354cf8.BUFFER_CREATIONFLAG_WRITE&&(n|=_0x572d87.BufferUsage.CopyDst),t&_0x354cf8.BUFFER_CREATIONFLAG_UNIFORM&&(n|=_0x572d87.BufferUsage.Uniform),t&_0x354cf8.BUFFER_CREATIONFLAG_VERTEX&&(n|=_0x572d87.BufferUsage.Vertex),t&_0x354cf8.BUFFER_CREATIONFLAG_INDEX&&(n|=_0x572d87.BufferUsage.Index),t&_0x354cf8.BUFFER_CREATIONFLAG_STORAGE&&(n|=_0x572d87.BufferUsage.Storage),this._bufferManager.createBuffer(i,n)},_0x58fcf.prototype.bindBuffersDirectly=function(){throw"Not implemented on WebGPU"},_0x58fcf.prototype.updateAndBindInstancesBuffer=function(){throw"Not implemented on WebGPU"},_0x58fcf.prototype.bindBuffers=function(e,t,i,n){this._currentIndexBuffer=t,this._currentOverrideVertexBuffers=null!=n?n:null,this._cacheRenderPipeline.setBuffers(e,t,this._currentOverrideVertexBuffers)},_0x58fcf.prototype._releaseBuffer=function(e){return this._bufferManager.releaseBuffer(e)},_0x58fcf.prototype.createEffect=function(e,t,i,n,r,o,a,s,l,u){var c;void 0===u&&(u=_0x4cf79a.GLSL);var h=e.vertexElement||e.vertex||e.vertexToken||e.vertexSource||e,d=e.fragmentElement||e.fragment||e.fragmentToken||e.fragmentSource||e,f=this._getGlobalDefines(),p=null!==(c=null!=r?r:t.defines)&&void 0!==c?c:"";f&&(p+="\n"+f);var _=h+"+"+d+"@"+p;if(this._compiledEffects[_]){var m=this._compiledEffects[_];return a&&m.isReady()&&a(m),m}var g=new _0x3a7b63(e,t,i,n,this,r,o,a,s,l,_,u);return this._compiledEffects[_]=g,g},_0x58fcf.prototype._compileRawShaderToSpirV=function(e,t){return this._glslang.compileGLSL(e,t)},_0x58fcf.prototype._compileShaderToSpirV=function(e,t,i,n){return this._compileRawShaderToSpirV(n+(i?i+"\n":"")+e,t)},_0x58fcf.prototype._getWGSLShader=function(e,t,i){return(i=i?"//"+i.split("\n").join("\n//")+"\n":"")+e},_0x58fcf.prototype._getCompiledShaderFromIndexDB=function(e,t,i){this.saveCompiledShaderInIndexDB&&e==_0x4cf79a.GLSL&&this._indexedDBScheduler?this._indexedDBScheduler.getElementFromDB(_0x58fcf.COMPILED_WGSL_TABLE_NAME,t).then((e=>{if(null!=e){var t=e[e.length-1],n=e.slice(0,t),r=e.slice(t,e.length-1);i(!0,n,r)}else console.log("shader text from indexDB is null."),i(!1,null,null)}),(e=>{i(!1,null,null)})):i(!1,null,null)},_0x58fcf.prototype._saveCompiledShaderToIndexDB=function(e,t,i){if(this._indexedDBScheduler&&this.saveCompiledShaderInIndexDB){var n=t.length+i.length,r=new Uint32Array(n+1);r.set(t,0),r.set(i,t.length),r[n]=t.length,this._indexedDBScheduler.putElementInDB(_0x58fcf.COMPILED_WGSL_TABLE_NAME,e,r)}},_0x58fcf.prototype._createPipelineStageDescriptor=function(e,t,i,n){return this._tintWASM&&n===_0x4cf79a.GLSL&&(t=this._tintWASM.convertSpirV2WGSL(t),i=this._tintWASM.convertSpirV2WGSL(i),t=t.replace(/type\s/g,"alias "),i=i.replace(/type\s/g,"alias ")),{vertexStage:{module:this._device.createShaderModule({code:t}),entryPoint:"main"},fragmentStage:{module:this._device.createShaderModule({code:i}),entryPoint:"main"}}},_0x58fcf.prototype._compileRawPipelineStageDescriptor=function(e,t,i,n){var r=n===_0x4cf79a.GLSL?this._compileRawShaderToSpirV(t,"vertex"):t,o=n===_0x4cf79a.GLSL?this._compileRawShaderToSpirV(i,"fragment"):i;return this._createPipelineStageDescriptor(e,r,o,n)},_0x58fcf.prototype._compilePipelineStageDescriptor=function(e,t,i,n,r){this.onBeforeShaderCompilationObservable.notifyObservers(this);var o="#version 450\n",a=r===_0x4cf79a.GLSL?this._compileShaderToSpirV(t,"vertex",n,o):this._getWGSLShader(t,"vertex",n),s=r===_0x4cf79a.GLSL?this._compileShaderToSpirV(i,"fragment",n,o):this._getWGSLShader(i,"fragment",n),l=this._createPipelineStageDescriptor(e,a,s,r);return this.onAfterShaderCompilationObservable.notifyObservers(this),l},_0x58fcf.prototype.createRawShaderProgram=function(){throw"Not available on WebGPU"},_0x58fcf.prototype.createShaderProgram=function(){throw"Not available on WebGPU"},_0x58fcf.prototype.inlineShaderCode=function(e){var t=new _0x2387ba(e);return t.debug=!1,t.processCode(),t.code},_0x58fcf.prototype.createPipelineContext=function(e){return new _0x5ccdc7(e,this)},_0x58fcf.prototype.createMaterialContext=function(){return new _0x25966f},_0x58fcf.prototype.createDrawContext=function(){return new _0x1a5e01(this._bufferManager)},_0x58fcf.prototype._preparePipelineContext=function(e,t,i,n,r,o,a,s,l,u,c){var h=e,d=c||h.shaderProcessingContext.shaderLanguage;this.dbgShowShaderCode&&(console.log(s),console.log(t),console.log(i)),h.sources={fragment:i,vertex:t,rawVertex:r,rawFragment:o};var f=e._name;h.stages=n?this._compileRawPipelineStageDescriptor(f,t,i,d):this._compilePipelineStageDescriptor(f,t,i,s,d)},_0x58fcf.prototype.getAttributes=function(e,t){for(var i=new Array(t.length),n=e,r=0;r<t.length;r++){var o=t[r],a=n.shaderProcessingContext.availableAttributes[o];void 0!==a&&(i[r]=a)}return i},_0x58fcf.prototype.enableEffect=function(e){if(e){var t=!0;if(_0x3422be.IsWrapper(e)){if(!e.effect||e.effect===this._currentEffect&&e.materialContext===this._currentMaterialContext&&e.drawContext===this._currentDrawContext&&!this._forceEnableEffect){if(!e.effect&&this.dbgShowEmptyEnableEffectCalls)throw console.error("drawWrapper=",e),"Invalid call to enableEffect: the effect property is empty!";return}if(t=e.effect!==this._currentEffect,this._currentEffect=e.effect,this._currentMaterialContext=e.materialContext,this._currentDrawContext=e.drawContext,this._counters.numEnableDrawWrapper++,!this._currentMaterialContext)throw console.error("drawWrapper=",e),"Invalid call to enableEffect: the materialContext property is empty!"}else t=e!==this._currentEffect,this._currentEffect=e,this._currentMaterialContext=this._defaultMaterialContext,this._currentDrawContext=this._defaultDrawContext,this._counters.numEnableEffects++,this.dbgLogIfNotDrawWrapper&&_0x41154e.Warn("enableEffect has been called with an Effect and not a Wrapper! effect.uniqueId=".concat(e.uniqueId,", effect.name=").concat(e.name,", effect.name.vertex=").concat(e.name.vertex,", effect.name.fragment=").concat(e.name.fragment),10);this._stencilStateComposer.stencilMaterial=void 0,this._forceEnableEffect=!t&&!this._forceEnableEffect&&this._forceEnableEffect,t&&(this._currentEffect.onBind&&this._currentEffect.onBind(this._currentEffect),this._currentEffect._onBindObservable&&this._currentEffect._onBindObservable.notifyObservers(this._currentEffect))}},_0x58fcf.prototype._releaseEffect=function(e){this._compiledEffects[e._key]&&(delete this._compiledEffects[e._key],this._deletePipelineContext(e.getPipelineContext()))},_0x58fcf.prototype.releaseEffects=function(){for(var e in this._compiledEffects){var t=this._compiledEffects[e].getPipelineContext();this._deletePipelineContext(t)}this._compiledEffects={}},_0x58fcf.prototype._deletePipelineContext=function(e){e&&e.dispose()},Object.defineProperty(_0x58fcf.prototype,"needPOTTextures",{get:function(){return!1},enumerable:!1,configurable:!0}),_0x58fcf.prototype._createHardwareTexture=function(){return new _0x253af9},_0x58fcf.prototype._releaseTexture=function(e){var t=this._internalTexturesCache.indexOf(e);-1!==t&&this._internalTexturesCache.splice(t,1),this._textureHelper.releaseTexture(e)},_0x58fcf.prototype._getRGBABufferInternalSizedFormat=function(){return _0x354cf8.TEXTUREFORMAT_RGBA},_0x58fcf.prototype.updateTextureComparisonFunction=function(e,t){e._comparisonFunction=t},_0x58fcf.prototype._createInternalTexture=function(e,t,i,n){var r,o,a;void 0===i&&(i=!0),void 0===n&&(n=InternalTextureSource.Unknown);var s={};void 0!==t&&"object"==typeof t?(s.generateMipMaps=t.generateMipMaps,s.type=void 0===t.type?_0x354cf8.TEXTURETYPE_UNSIGNED_INT:t.type,s.samplingMode=void 0===t.samplingMode?_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,s.format=void 0===t.format?_0x354cf8.TEXTUREFORMAT_RGBA:t.format,s.samples=null!==(r=t.samples)&&void 0!==r?r:1,s.creationFlags=null!==(o=t.creationFlags)&&void 0!==o?o:0,s.useSRGBBuffer=null!==(a=t.useSRGBBuffer)&&void 0!==a&&a):(s.generateMipMaps=t,s.type=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,s.samplingMode=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE,s.format=_0x354cf8.TEXTUREFORMAT_RGBA,s.samples=1,s.creationFlags=0,s.useSRGBBuffer=!1),s.type!==_0x354cf8.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?s.type===_0x354cf8.TEXTURETYPE_HALF_FLOAT&&!this._caps.textureHalfFloatLinearFiltering&&(s.samplingMode=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE):s.samplingMode=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,s.type===_0x354cf8.TEXTURETYPE_FLOAT&&!this._caps.textureFloat&&(s.type=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,_0x41154e.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));var l=new InternalTexture(this,n),u=e.width||e,c=e.height||e,h=e.layers||0;return l.baseWidth=u,l.baseHeight=c,l.width=u,l.height=c,l.depth=h,l.isReady=!0,l.samples=s.samples,l.generateMipMaps=!!s.generateMipMaps,l.samplingMode=s.samplingMode,l.type=s.type,l.format=s.format,l.is2DArray=h>0,l._cachedWrapU=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,l._cachedWrapV=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,l._useSRGBBuffer=s.useSRGBBuffer,this._internalTexturesCache.push(l),!i&&this._textureHelper.createGPUTextureForInternalTexture(l,u,c,h||1,s.creationFlags),l},_0x58fcf.prototype.createTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){var _=this;return void 0===r&&(r=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),this._createTextureBase(e,t,i,n,r,o,a,(function(e,t,i,n,r,o,a,s){var l,c=n;if(e.baseWidth=c.width,e.baseHeight=c.height,e.width=c.width,e.height=c.height,e.format=null!=u?u:-1,s(e.width,e.height,c,t,e,(function(){})),null===(l=e._hardwareTexture)||void 0===l?void 0:l.underlyingResource)!o&&!a&&_._generateMipmaps(e,_._uploadEncoder);else{var h=_._textureHelper.createGPUTextureForInternalTexture(e,c.width,c.height,void 0,f);WebGPUTextureHelper.IsImageBitmap(c)&&(_._textureHelper.updateTexture(c,e,c.width,c.height,e.depth,h.format,0,0,r,!1,0,0),!o&&!a&&_._generateMipmaps(e,_._uploadEncoder))}i&&i._removePendingData(e),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}),(function(){return!1}),s,l,u,c,h,d,p)},_0x58fcf.prototype.wrapWebGPUTexture=function(e){var t=new _0x253af9(e),i=new InternalTexture(this,InternalTextureSource.Unknown,!0);return i._hardwareTexture=t,i.isReady=!0,i},_0x58fcf.prototype.wrapWebGLTexture=function(){throw new Error("wrapWebGLTexture is not supported, use wrapWebGPUTexture instead.")},_0x58fcf.prototype.generateMipMapsForCubemap=function(e){var t;e.generateMipMaps&&(!(null===(t=e._hardwareTexture)||void 0===t?void 0:t.underlyingResource)&&this._textureHelper.createGPUTextureForInternalTexture(e),this._generateMipmaps(e,e.source===InternalTextureSource.RenderTarget||e.source===InternalTextureSource.MultiRenderTarget?this._renderTargetEncoder:void 0))},_0x58fcf.prototype.updateTextureSamplingMode=function(e,t,i){void 0===i&&(i=!1),i&&(t.generateMipMaps=!0,this._generateMipmaps(t)),t.samplingMode=e},_0x58fcf.prototype.updateTextureWrappingMode=function(e,t,i,n){void 0===i&&(i=null),void 0===n&&(n=null),null!==t&&(e._cachedWrapU=t),null!==i&&(e._cachedWrapV=i),(e.is2DArray||e.is3D)&&null!==n&&(e._cachedWrapR=n)},_0x58fcf.prototype.updateTextureDimensions=function(e,t,i,n){if(void 0===n&&(n=1),e._hardwareTexture&&(e.width!==t||e.height!==i||e.depth!==n)){var r=e._hardwareTexture.textureAdditionalUsages;e._hardwareTexture.release(),this._textureHelper.createGPUTextureForInternalTexture(e,t,i,n,r)}},_0x58fcf.prototype._setInternalTexture=function(e,t,i){if(i=null!=i?i:e,this._currentEffect){var n=this._currentEffect._pipelineContext.shaderProcessingContext.availableTextures[i];if(this._currentMaterialContext.setTexture(e,t),n&&n.autoBindSampler){var r=i+_0x39a749.AutoSamplerSuffix;this._currentMaterialContext.setSampler(r,t)}}},_0x58fcf.prototype.setTexture=function(e,t,i,n){this._setTexture(e,i,!1,!1,n,n)},_0x58fcf.prototype.setTextureArray=function(e,t,i,n){for(var r=0;r<i.length;r++)this._setTexture(-1,i[r],!0,!1,n+r.toString(),n)},_0x58fcf.prototype._setTexture=function(e,t,i,n,r,o){if(void 0===n&&(n=!1),void 0===r&&(r=""),o=null!=o?o:r,this._currentEffect){if(!t)return this._currentMaterialContext.setTexture(r,null),!1;if(t.video)t.update();else if(t.delayLoadState===_0x354cf8.DELAYLOADSTATE_NOTLOADED)return t.delayLoad(),!1;var a=null;if((a=n?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture)&&!a.isMultiview){if(a.isCube&&a._cachedCoordinatesMode!==t.coordinatesMode){a._cachedCoordinatesMode=t.coordinatesMode;var s=t.coordinatesMode!==_0x354cf8.TEXTURE_CUBIC_MODE&&t.coordinatesMode!==_0x354cf8.TEXTURE_SKYBOX_MODE?_0x354cf8.TEXTURE_WRAP_ADDRESSMODE:_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE;t.wrapU=s,t.wrapV=s}a._cachedWrapU=t.wrapU,a._cachedWrapV=t.wrapV,a.is3D&&(a._cachedWrapR=t.wrapR),this._setAnisotropicLevel(0,a,t.anisotropicFilteringLevel)}this._setInternalTexture(r,a,o)}else this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - _setTexture called with a null _currentEffect! texture=",t));return!0},_0x58fcf.prototype._setAnisotropicLevel=function(e,t,i){t._cachedAnisotropicFilteringLevel!==i&&(t._cachedAnisotropicFilteringLevel=Math.min(i,this._caps.maxAnisotropy))},_0x58fcf.prototype._bindTexture=function(e,t,i){void 0!==e&&this._setInternalTexture(i,t)},_0x58fcf.prototype.generateMipmaps=function(e){this._generateMipmaps(e,this._renderTargetEncoder)},_0x58fcf.prototype._generateMipmaps=function(e,t){var i=e._hardwareTexture;if(i){t=null!=t?t:this._currentRenderTarget&&!this._currentRenderPass?this._renderTargetEncoder:this._currentRenderPass?this._uploadEncoder:this._renderEncoder;var n=e._hardwareTexture.format,r=WebGPUTextureHelper.ComputeNumMipmapLevels(e.width,e.height);this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - generate mipmaps called - width=",e.width,"height=",e.height,"isCube=",e.isCube)),e.isCube?this._textureHelper.generateCubeMipmaps(i,n,r,t):this._textureHelper.generateMipmaps(i,n,r,0,t)}},_0x58fcf.prototype.updateTextureData=function(e,t,i,n,r,o,a,s,l){var u;void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=!1);var c=e._hardwareTexture;!(null===(u=e._hardwareTexture)||void 0===u?void 0:u.underlyingResource)&&(c=this._textureHelper.createGPUTextureForInternalTexture(e));var h=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(h,e,r,o,e.depth,c.format,a,s,e.invertY,!1,i,n),l&&this._generateMipmaps(e,this._renderTargetEncoder)},_0x58fcf.prototype._uploadCompressedDataToTextureDirectly=function(e,t,i,n,r,o,a){var s;void 0===o&&(o=0),void 0===a&&(a=0);var l=e._hardwareTexture;!(null===(s=e._hardwareTexture)||void 0===s?void 0:s.underlyingResource)&&(e.format=t,l=this._textureHelper.createGPUTextureForInternalTexture(e,i,n));var u=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);this._textureHelper.updateTexture(u,e,i,n,e.depth,l.format,o,a,!1,!1,0,0)},_0x58fcf.prototype._uploadDataToTextureDirectly=function(e,t,i,n,r,o){var a;void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=!1);var s=Math.round(Math.log(e.width)*Math.LOG2E),l=Math.round(Math.log(e.height)*Math.LOG2E),u=o?e.width:Math.pow(2,Math.max(s-n,0)),c=o?e.height:Math.pow(2,Math.max(l-n,0)),h=e._hardwareTexture;!(null===(a=e._hardwareTexture)||void 0===a?void 0:a.underlyingResource)&&(h=this._textureHelper.createGPUTextureForInternalTexture(e,u,c));var d=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(d,e,u,c,e.depth,h.format,i,n,e.invertY,!1,0,0)},_0x58fcf.prototype._uploadArrayBufferViewToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this._uploadDataToTextureDirectly(e,t,i,n)},_0x58fcf.prototype._uploadImageToTexture=function(e,t,i,n){var r;void 0===i&&(i=0),void 0===n&&(n=0);var o=e._hardwareTexture;!(null===(r=e._hardwareTexture)||void 0===r?void 0:r.underlyingResource)&&(o=this._textureHelper.createGPUTextureForInternalTexture(e));var a=t,s=Math.ceil(e.width/(1<<n)),l=Math.ceil(e.height/(1<<n));this._textureHelper.updateTexture(a,e,s,l,e.depth,o.format,i,n,e.invertY,!1,0,0)},_0x58fcf.prototype.readPixels=function(e,t,i,n,r,o){void 0===o&&(o=!0);var a=(this._rttRenderPassWrapper.renderPass?this._rttRenderPassWrapper:this._mainRenderPassWrapper).colorAttachmentGPUTextures[0];if(!a)return Promise.resolve(new Uint8Array(0));var s=a.underlyingResource,l=a.format;return s?(o&&this.flushFramebuffer(),this._textureHelper.readPixels(s,e,t,i,n,l)):Promise.resolve(new Uint8Array(0))},_0x58fcf.prototype.beginFrame=function(){_0x402caf.prototype.beginFrame.call(this)},_0x58fcf.prototype.endFrame=function(){if(this._snapshotRendering.endFrame(this._mainRenderPassWrapper.renderPass),this._endMainRenderPass(),this._timestampQuery.endFrame(this._renderEncoder),this.flushFramebuffer(!1),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - counters")),this._textureHelper.destroyDeferredTextures(),this._bufferManager.destroyDeferredBuffers(),this._features._collectUbosUpdatedInFrame){if(this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),!this._count||this._count<this.dbgVerboseLogsNumFrames)){var e=[];for(var t in _0x2e52cb._UpdatedUbosInFrame)e.push(t+":"+_0x2e52cb._UpdatedUbosInFrame[t]);console.log("frame #"+this._count+" - updated ubos -",e.join(", "))}_0x2e52cb._UpdatedUbosInFrame={}}this.countersLastFrame.numEnableEffects=this._counters.numEnableEffects,this.countersLastFrame.numEnableDrawWrapper=this._counters.numEnableDrawWrapper,this.countersLastFrame.numBundleCreationNonCompatMode=this._counters.numBundleCreationNonCompatMode,this.countersLastFrame.numBundleReuseNonCompatMode=this._counters.numBundleReuseNonCompatMode,this._counters.numEnableEffects=0,this._counters.numEnableDrawWrapper=0,this._counters.numBundleCreationNonCompatMode=0,this._counters.numBundleReuseNonCompatMode=0,this._cacheRenderPipeline.endFrame(),this._cacheBindGroups.endFrame(),this._pendingDebugCommands.length=0,_0x402caf.prototype.endFrame.call(this),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),this._count<this.dbgVerboseLogsNumFrames&&console.log("%c frame #"+this._count+" - end","background: #ffff00"),this._count<this.dbgVerboseLogsNumFrames&&(this._count++,this._count!==this.dbgVerboseLogsNumFrames&&console.log("%c frame #"+this._count+" - begin","background: #ffff00")))},_0x58fcf.prototype.flushFramebuffer=function(e){void 0===e&&(e=!0);var t=!this._currentRenderPass,i=0;this._currentRenderPass&&this._currentRenderTarget&&(i|=1,this._endRenderTargetRenderPass()),this._mainRenderPassWrapper.renderPass&&(i|=2,this._endMainRenderPass()),this._commandBuffers[0]=this._uploadEncoder.finish(),this._commandBuffers[1]=this._renderTargetEncoder.finish(),this._commandBuffers[2]=this._renderEncoder.finish(),this._device.queue.submit(this._commandBuffers),this._uploadEncoder=this._device.createCommandEncoder(this._uploadEncoderDescriptor),this._renderEncoder=this._device.createCommandEncoder(this._renderEncoderDescriptor),this._renderTargetEncoder=this._device.createCommandEncoder(this._renderTargetEncoderDescriptor),this._timestampQuery.startFrame(this._uploadEncoder),this._textureHelper.setCommandEncoder(this._uploadEncoder),this._bundleList.reset(),this._bundleListRenderTarget.reset(),e&&(2&i&&this._startMainRenderPass(!1),1&i&&this._startRenderTargetRenderPass(this._currentRenderTarget,!1,null,!1,!1),t&&this._currentRenderTarget&&(this._currentRenderPass=null))},_0x58fcf.prototype._currentFrameBufferIsDefaultFrameBuffer=function(){return null===this._currentRenderTarget},_0x58fcf.prototype._startRenderTargetRenderPass=function(e,t,i,n,r){var o,a,s,l=e,u=l._depthStencilTexture,c=null==u?void 0:u._hardwareTexture,h=null==c?void 0:c.underlyingResource,d=null==c?void 0:c.msaaTexture,f=null==h?void 0:h.createView(this._rttRenderPassWrapper.depthAttachmentViewDescriptor),p=null==d?void 0:d.createView(this._rttRenderPassWrapper.depthAttachmentViewDescriptor),_=!!c&&WebGPUTextureHelper.HasStencilAspect(c.format),m=[];this.useReverseDepthBuffer&&this.setDepthFunctionToGreaterOrEqual();var g=t&&i,x=t&&n,v=t&&r;if(l._attachments&&l.isMulti){(!this._mrtAttachments||0===this._mrtAttachments.length)&&(this._mrtAttachments=l._defaultAttachments);for(var y=0;y<this._mrtAttachments.length;++y){var $=this._mrtAttachments[y],b=l.textures[y],T=null==b?void 0:b._hardwareTexture,C=null==T?void 0:T.underlyingResource;if(T&&C){var S=p$19(this._rttRenderPassWrapper.colorAttachmentViewDescriptor,{format:T.format}),w=T.msaaTexture,E=C.createView(S),P=null==w?void 0:w.createView(S);m.push({view:P||E,resolveTarget:w?E:void 0,clearValue:0!==$&&g?i:void 0,loadOp:0!==$&&g?_0x572d87.LoadOp.Clear:_0x572d87.LoadOp.Load,storeOp:_0x572d87.StoreOp.Store})}}this._cacheRenderPipeline.setMRT(l.textures,this._mrtAttachments.length),this._cacheRenderPipeline.setMRTAttachments(this._mrtAttachments)}else{if(M=l.texture){var A=M._hardwareTexture,L=A.underlyingResource;w=A.msaaTexture,E=L.createView(this._rttRenderPassWrapper.colorAttachmentViewDescriptor),P=null==w?void 0:w.createView(this._rttRenderPassWrapper.colorAttachmentViewDescriptor);m.push({view:P||E,resolveTarget:w?E:void 0,clearValue:g?i:void 0,loadOp:g?_0x572d87.LoadOp.Clear:_0x572d87.LoadOp.Load,storeOp:_0x572d87.StoreOp.Store})}else m.push(null)}if(null===(o=this._debugPushGroup)||void 0===o||o.call(this,"render target pass",1),this._rttRenderPassWrapper.renderPassDescriptor={colorAttachments:m,depthStencilAttachment:u&&h?{view:p||f,depthClearValue:x?this.useReverseDepthBuffer?this._clearReverseDepthValue:this._clearDepthValue:void 0,depthLoadOp:x?_0x572d87.LoadOp.Clear:_0x572d87.LoadOp.Load,depthStoreOp:_0x572d87.StoreOp.Store,stencilClearValue:l._depthStencilTextureWithStencil&&v?this._clearStencilValue:void 0,stencilLoadOp:_?l._depthStencilTextureWithStencil&&v?_0x572d87.LoadOp.Clear:_0x572d87.LoadOp.Load:void 0,stencilStoreOp:_?_0x572d87.StoreOp.Store:void 0}:void 0,occlusionQuerySet:(null===(a=this._occlusionQuery)||void 0===a?void 0:a.hasQueries)?this._occlusionQuery.querySet:void 0},this._rttRenderPassWrapper.renderPass=this._renderTargetEncoder.beginRenderPass(this._rttRenderPassWrapper.renderPassDescriptor),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),!this._count||this._count<this.dbgVerboseLogsNumFrames)){var M=l.texture;console.log("frame #"+this._count+" - render target begin pass - internalTexture.uniqueId=",M.uniqueId,"width=",M.width,"height=",M.height,this._rttRenderPassWrapper.renderPassDescriptor)}this._currentRenderPass=this._rttRenderPassWrapper.renderPass,null===(s=this._debugFlushPendingCommands)||void 0===s||s.call(this),(!c||!WebGPUTextureHelper.HasStencilAspect(c.format))&&(this._stencilStateComposer.enabled=!1)},_0x58fcf.prototype._endRenderTargetRenderPass=function(){var e,t,i,n;if(this._currentRenderPass){var r=null===(e=this._currentRenderTarget.texture)||void 0===e?void 0:e._hardwareTexture;r&&!this._snapshotRendering.endRenderTargetPass(this._currentRenderPass,r)&&!this.compatibilityMode&&(this._bundleListRenderTarget.run(this._currentRenderPass),this._bundleListRenderTarget.reset()),this._currentRenderPass.end(),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - render target end pass - internalTexture.uniqueId=",null===(i=null===(t=this._currentRenderTarget)||void 0===t?void 0:t.texture)||void 0===i?void 0:i.uniqueId)),null===(n=this._debugPopGroup)||void 0===n||n.call(this,1),this._resetCurrentViewport(1),this._resetCurrentScissor(1),this._resetCurrentStencilRef(1),this._resetCurrentColorBlend(1),this._currentRenderPass=null,this._rttRenderPassWrapper.reset()}},_0x58fcf.prototype._getCurrentRenderPass=function(){return this._currentRenderTarget&&!this._currentRenderPass?this._startRenderTargetRenderPass(this._currentRenderTarget,!1,null,!1,!1):!this._currentRenderPass&&this._startMainRenderPass(!1),this._currentRenderPass},_0x58fcf.prototype._getCurrentRenderPassIndex=function(){return null===this._currentRenderPass?-1:this._currentRenderPass===this._mainRenderPassWrapper.renderPass?0:1},_0x58fcf.prototype._startMainRenderPass=function(e,t,i,n){var r,o,a;this._mainRenderPassWrapper.renderPass&&this._endMainRenderPass(),this.useReverseDepthBuffer&&this.setDepthFunctionToGreaterOrEqual();var s=e&&t,l=e&&i,u=e&&n;this._mainRenderPassWrapper.renderPassDescriptor.colorAttachments[0].clearValue=s?t:void 0,this._mainRenderPassWrapper.renderPassDescriptor.colorAttachments[0].loadOp=s?_0x572d87.LoadOp.Clear:_0x572d87.LoadOp.Load,this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.depthClearValue=l?this.useReverseDepthBuffer?this._clearReverseDepthValue:this._clearDepthValue:void 0,this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.depthLoadOp=l?_0x572d87.LoadOp.Clear:_0x572d87.LoadOp.Load,this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.stencilClearValue=u?this._clearStencilValue:void 0,this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.stencilLoadOp=this.isStencilEnable?u?_0x572d87.LoadOp.Clear:_0x572d87.LoadOp.Load:void 0,this._mainRenderPassWrapper.renderPassDescriptor.occlusionQuerySet=(null===(r=this._occlusionQuery)||void 0===r?void 0:r.hasQueries)?this._occlusionQuery.querySet:void 0,this._swapChainTexture=this._context.getCurrentTexture(),this._mainRenderPassWrapper.colorAttachmentGPUTextures[0].set(this._swapChainTexture),this._options.antialiasing?this._mainRenderPassWrapper.renderPassDescriptor.colorAttachments[0].resolveTarget=this._swapChainTexture.createView():this._mainRenderPassWrapper.renderPassDescriptor.colorAttachments[0].view=this._swapChainTexture.createView(),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - main begin pass - texture width="+this._mainTextureExtends.width," height="+this._mainTextureExtends.height,this._mainRenderPassWrapper.renderPassDescriptor)),null===(o=this._debugPushGroup)||void 0===o||o.call(this,"main pass",0),this._currentRenderPass=this._renderEncoder.beginRenderPass(this._mainRenderPassWrapper.renderPassDescriptor),this._mainRenderPassWrapper.renderPass=this._currentRenderPass,null===(a=this._debugFlushPendingCommands)||void 0===a||a.call(this),this._resetCurrentViewport(0),this._resetCurrentScissor(0),this._resetCurrentStencilRef(0),this._resetCurrentColorBlend(0),!this._isStencilEnable&&(this._stencilStateComposer.enabled=!1)},_0x58fcf.prototype._endMainRenderPass=function(){var e;null!==this._mainRenderPassWrapper.renderPass&&(this._snapshotRendering.endMainRenderPass(),!this.compatibilityMode&&!this._snapshotRendering.play&&(this._bundleList.run(this._mainRenderPassWrapper.renderPass),this._bundleList.reset()),this._mainRenderPassWrapper.renderPass.end(),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - main end pass")),null===(e=this._debugPopGroup)||void 0===e||e.call(this,0),this._resetCurrentViewport(0),this._resetCurrentScissor(0),this._resetCurrentStencilRef(0),this._resetCurrentColorBlend(0),this._mainRenderPassWrapper.renderPass===this._currentRenderPass&&(this._currentRenderPass=null),this._mainRenderPassWrapper.reset(!1))},_0x58fcf.prototype.bindFramebuffer=function(e,t,i,n,r,o,a){var s,l;void 0===t&&(t=0),void 0===o&&(o=0),void 0===a&&(a=0);var u=null===(s=e.texture)||void 0===s?void 0:s._hardwareTexture;this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,u&&(u._currentLayer=e.isCube?6*a+t:a),this._rttRenderPassWrapper.colorAttachmentGPUTextures[0]=u,this._rttRenderPassWrapper.depthTextureFormat=this._currentRenderTarget._depthStencilTexture?WebGPUTextureHelper.GetWebGPUTextureFormat(-1,this._currentRenderTarget._depthStencilTexture.format):void 0,this._setDepthTextureFormat(this._rttRenderPassWrapper),this._setColorFormat(this._rttRenderPassWrapper),this._rttRenderPassWrapper.colorAttachmentViewDescriptor={format:this._colorFormat,dimension:_0x572d87.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:e.isCube?6*a+t:a,baseMipLevel:o,arrayLayerCount:1,aspect:_0x572d87.TextureAspect.All},this._rttRenderPassWrapper.depthAttachmentViewDescriptor={format:this._depthTextureFormat,dimension:_0x572d87.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:e.isCube?6*a+t:a,baseMipLevel:0,arrayLayerCount:1,aspect:_0x572d87.TextureAspect.All},this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - bindFramebuffer called - internalTexture.uniqueId=",null===(l=e.texture)||void 0===l?void 0:l.uniqueId,"face=",t,"lodLevel=",o,"layer=",a,this._rttRenderPassWrapper.colorAttachmentViewDescriptor,this._rttRenderPassWrapper.depthAttachmentViewDescriptor)),this._currentRenderPass=null,this.snapshotRendering&&this.snapshotRenderingMode===_0x354cf8.SNAPSHOTRENDERING_FAST&&this._getCurrentRenderPass(),this._cachedViewport&&!r?this.setViewport(this._cachedViewport,i,n):(!i&&(i=e.width,o&&(i/=Math.pow(2,o))),!n&&(n=e.height,o&&(n/=Math.pow(2,o))),this._viewport(0,0,i,n)),this.wipeCaches()},_0x58fcf.prototype.unBindFramebuffer=function(e,t,i){var n,r;void 0===t&&(t=!1);var o=this._currentRenderTarget;this._currentRenderTarget=null,i&&i(),this._currentRenderTarget=o,this._currentRenderPass&&this._currentRenderPass!==this._mainRenderPassWrapper.renderPass&&this._endRenderTargetRenderPass(),(null===(n=e.texture)||void 0===n?void 0:n.generateMipMaps)&&!t&&!e.isCube&&this._generateMipmaps(e.texture),this._currentRenderTarget=null,this._onAfterUnbindFrameBufferObservable.notifyObservers(this),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - unBindFramebuffer called - internalTexture.uniqueId=",null===(r=e.texture)||void 0===r?void 0:r.uniqueId)),this._mrtAttachments=[],this._cacheRenderPipeline.setMRT([]),this._cacheRenderPipeline.setMRTAttachments(this._mrtAttachments),this._currentRenderPass=this._mainRenderPassWrapper.renderPass,this._setDepthTextureFormat(this._mainRenderPassWrapper),this._setColorFormat(this._mainRenderPassWrapper)},_0x58fcf.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):(this._currentRenderPass=this._mainRenderPassWrapper.renderPass,this._setDepthTextureFormat(this._mainRenderPassWrapper),this._setColorFormat(this._mainRenderPassWrapper)),this._currentRenderPass&&this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},_0x58fcf.prototype._setColorFormat=function(e){var t,i,n=null!==(i=null===(t=e.colorAttachmentGPUTextures[0])||void 0===t?void 0:t.format)&&void 0!==i?i:null;this._cacheRenderPipeline.setColorFormat(n),this._colorFormat!==n&&(this._colorFormat=n)},_0x58fcf.prototype._setDepthTextureFormat=function(e){this._cacheRenderPipeline.setDepthStencilFormat(e.depthTextureFormat),this._depthTextureFormat!==e.depthTextureFormat&&(this._depthTextureFormat=e.depthTextureFormat)},_0x58fcf.prototype.setDitheringState=function(){},_0x58fcf.prototype.setRasterizerState=function(){},_0x58fcf.prototype.setState=function(e,t,i,n,r,o,a){var s,l;void 0===t&&(t=0),void 0===n&&(n=!1),void 0===a&&(a=0),(this._depthCullingState.cull!==e||i)&&(this._depthCullingState.cull=e);var u=null===(l=null!==(s=this.cullBackFaces)&&void 0!==s?s:r)||void 0===l||l?1:2;(this._depthCullingState.cullFace!==u||i)&&(this._depthCullingState.cullFace=u),this.setZOffset(t),this.setZOffsetUnits(a);var c=n?this._currentRenderTarget?1:2:this._currentRenderTarget?2:1;(this._depthCullingState.frontFace!==c||i)&&(this._depthCullingState.frontFace=c),this._stencilStateComposer.stencilMaterial=o},_0x58fcf.prototype._applyRenderPassChanges=function(e,t){var i,n=this._mustUpdateViewport(e),r=this._mustUpdateScissor(e),o=!!this._stencilStateComposer.enabled&&this._mustUpdateStencilRef(e),a=!!this._alphaState.alphaBlend&&this._mustUpdateBlendColor(e);t?(n&&t.addItem(new WebGPURenderItemViewport(this._viewportCached.x,this._viewportCached.y,this._viewportCached.z,this._viewportCached.w)),r&&t.addItem(new WebGPURenderItemScissor(this._scissorCached.x,this._scissorCached.y,this._scissorCached.z,this._scissorCached.w)),o&&t.addItem(new WebGPURenderItemStencilRef(null!==(i=this._stencilStateComposer.funcRef)&&void 0!==i?i:0)),a&&t.addItem(new WebGPURenderItemBlendColor(this._alphaState._blendConstants.slice()))):(n&&this._applyViewport(e),r&&this._applyScissor(e),o&&this._applyStencilRef(e),a&&this._applyBlendColor(e))},_0x58fcf.prototype._draw=function(e,t,i,n,r,o){var a,s=this._getCurrentRenderPass(),l=0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget;this.applyStates();var u=this._currentEffect._pipelineContext;if(this.bindUniformBufferBase(this._currentRenderTarget?this._ubInvertY:this._ubDontInvertY,0,_0x39a749.InternalsUBOName),u.uniformBuffer&&(u.uniformBuffer.update(),this.bindUniformBufferBase(u.uniformBuffer.getBuffer(),0,_0x39a749.LeftOvertUBOName)),this._snapshotRendering.play)this._reportDrawCall();else{var c;c=o?o.getActiveBundle():this._currentDrawContext.fastBundle,!this.compatibilityMode&&(this._currentDrawContext.isDirty(this._currentMaterialContext.updateId)||this._currentMaterialContext.isDirty||this._currentMaterialContext.forceBindGroupCreation)&&(this._currentDrawContext.fastBundle=void 0);var h=s;if(!this.compatibilityMode&&c||this._snapshotRendering.record){if(this._applyRenderPassChanges(s,l),!this._snapshotRendering.record)return this._counters.numBundleReuseNonCompatMode++,this._currentDrawContext.indirectDrawBuffer&&this._currentDrawContext.setIndirectData(n,r||1,i),l.addBundle(c),void this._reportDrawCall();h=l.getBundleEncoder(this._cacheRenderPipeline.colorFormats,this._depthTextureFormat,this.currentSampleCount),l.numDrawCalls++}var d=0;if(!this._caps.textureFloatLinearFiltering&&this._currentMaterialContext.hasFloatTextures)for(var f=1,p=0;p<u.shaderProcessingContext.textureNames.length;++p){var _=u.shaderProcessingContext.textureNames[p],m=null===(a=this._currentMaterialContext.textures[_])||void 0===a?void 0:a.texture;(null==m?void 0:m.type)===_0x354cf8.TEXTURETYPE_FLOAT&&(d|=f),f<<=1}var g,x=this._cacheRenderPipeline.getRenderPipeline(t,this._currentEffect,this.currentSampleCount,d);g=o.bindGroups?o.bindGroups:this._cacheBindGroups.getBindGroups(u,this._currentDrawContext,this._currentMaterialContext,o),!this._snapshotRendering.record&&(this._applyRenderPassChanges(s,this.compatibilityMode?null:l),!this.compatibilityMode&&(this._counters.numBundleCreationNonCompatMode++,h=this._device.createRenderBundleEncoder({colorFormats:this._cacheRenderPipeline.colorFormats,depthStencilFormat:this._depthTextureFormat,sampleCount:this.currentSampleCount}))),h.setPipeline(x),this._currentIndexBuffer&&h.setIndexBuffer(this._currentIndexBuffer.underlyingResource,this._currentIndexBuffer.is32Bits?_0x572d87.IndexFormat.Uint32:_0x572d87.IndexFormat.Uint16,0);for(var v=this._cacheRenderPipeline.vertexBuffers,y=0;y<v.length;y++){var $=v[y],b=$.getBuffer();b&&h.setVertexBuffer(y,b.underlyingResource,$._validOffsetRange?0:$.byteOffset)}for(p=0;p<g.length;p++)h.setBindGroup(p,g[p]);var T=!this.compatibilityMode&&!this._snapshotRendering.record;T&&this._currentDrawContext.indirectDrawBuffer?(this._currentDrawContext.setIndirectData(n,r||1,i),0===e?h.drawIndexedIndirect(this._currentDrawContext.indirectDrawBuffer,0):h.drawIndirect(this._currentDrawContext.indirectDrawBuffer,0)):0===e?h.drawIndexed(n,r||1,i,0,0):h.draw(n,r||1,i,0),T&&(this._currentDrawContext.fastBundle=h.finish(),l.addBundle(this._currentDrawContext.fastBundle),o.setFastBundle(this._currentDrawContext.fastBundle)),this._reportDrawCall()}},_0x58fcf.prototype.drawElementsType=function(e,t,i,n,r){void 0===n&&(n=1),this._draw(0,e,t,i,n,r)},_0x58fcf.prototype.drawArraysType=function(e,t,i,n,r){void 0===n&&(n=1),this._currentIndexBuffer=null,this._draw(1,e,t,i,n,r)},_0x58fcf.prototype.dispose=function(){var e,t,i;null===(e=this._mainTexture)||void 0===e||e.destroy(),null===(t=this._mainTextureLastCopy)||void 0===t||t.destroy(),null===(i=this._depthTexture)||void 0===i||i.destroy(),_0x402caf.prototype.dispose.call(this)},_0x58fcf.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._canvas.width},_0x58fcf.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._canvas.height},_0x58fcf.prototype.getRenderingCanvas=function(){return this._canvas},_0x58fcf.prototype.getError=function(){return 0},_0x58fcf.prototype.bindSamplers=function(){},_0x58fcf.prototype._bindTextureDirectly=function(){return!1},_0x58fcf.prototype.areAllEffectsReady=function(){return!0},_0x58fcf.prototype._executeWhenRenderingStateIsCompiled=function(e,t){t()},_0x58fcf.prototype._isRenderingStateCompiled=function(){return!0},_0x58fcf.prototype._getUnpackAlignement=function(){return 1},_0x58fcf.prototype._unpackFlipY=function(){},_0x58fcf.prototype._bindUnboundFramebuffer=function(){throw"_bindUnboundFramebuffer is not implementedin WebGPU! You probably want to use restoreDefaultFramebuffer or unBindFramebuffer instead"},_0x58fcf.prototype._getSamplingParameters=function(){throw"_getSamplingParameters is not available in WebGPU"},_0x58fcf.prototype.getUniforms=function(){return[]},_0x58fcf.prototype.setIntArray=function(){return!1},_0x58fcf.prototype.setIntArray2=function(){return!1},_0x58fcf.prototype.setIntArray3=function(){return!1},_0x58fcf.prototype.setIntArray4=function(){return!1},_0x58fcf.prototype.setArray=function(){return!1},_0x58fcf.prototype.setArray2=function(){return!1},_0x58fcf.prototype.setArray3=function(){return!1},_0x58fcf.prototype.setArray4=function(){return!1},_0x58fcf.prototype.setMatrices=function(){return!1},_0x58fcf.prototype.setMatrix3x3=function(){return!1},_0x58fcf.prototype.setMatrix2x2=function(){return!1},_0x58fcf.prototype.setFloat=function(){return!1},_0x58fcf.prototype.setFloat2=function(){return!1},_0x58fcf.prototype.setFloat3=function(){return!1},_0x58fcf.prototype.setFloat4=function(){return!1},_0x58fcf._GLSLslangDefaultOptions={jsPath:"ThirdParty/glslang.js",wasmPath:"ThirdParty/glslang.wasm"},_0x58fcf.UseTWGSL=!0,_0x58fcf.COMPILED_WGSL_STORE_NAME="wgslStore",_0x58fcf.COMPILED_WGSL_TABLE_NAME="wgsl",function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.Texture=0]="Texture",e[e.StorageTexture=1]="StorageTexture",e[e.UniformBuffer=2]="UniformBuffer",e[e.StorageBuffer=3]="StorageBuffer",e[e.TextureWithoutSampler=4]="TextureWithoutSampler",e[e.Sampler=5]="Sampler"}(_0x380ca0||(_0x380ca0={}));const ComputeBindingType$1=_0x380ca0;_0xb82ccc.prototype.createComputeEffect=function(e,t){throw new Error("createComputeEffect: This engine does not support compute shaders!")},_0xb82ccc.prototype.createComputePipelineContext=function(){throw new Error("createComputePipelineContext: This engine does not support compute shaders!")},_0xb82ccc.prototype.createComputeContext=function(){},_0xb82ccc.prototype.computeDispatch=function(e,t,i,n,r,o,a){throw new Error("computeDispatch: This engine does not support compute shaders!")},_0xb82ccc.prototype.areAllComputeEffectsReady=function(){return!0},_0xb82ccc.prototype.releaseComputeEffects=function(){},_0xb82ccc.prototype._prepareComputePipelineContext=function(e,t,i,n,r){},_0xb82ccc.prototype._rebuildComputeEffects=function(){},_0xb82ccc.prototype._executeWhenComputeStateIsCompiled=function(e,t){t()},_0xb82ccc.prototype._releaseComputeEffect=function(e){},_0xb82ccc.prototype._deleteComputePipelineContext=function(e){};var _0x1a501e=(_0x21f66c=!0,function(e,t){var i=_0x21f66c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x21f66c=!1,i}),_0x1fcfed=_0x1a501e(void 0,(function(){return _0x1fcfed.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fcfed).search("(((.+)+)+)+$")})),_0x21f66c;function _0x505819(e,t){this._device=e,this._cacheSampler=t,this.uniqueId=_0x505819._Counter++,this._bindGroupEntries=[],this.clear()}_0x1fcfed(),_0x505819.prototype.getBindGroups=function(e,t,i){if(!i)throw new Error("WebGPUComputeContext.getBindGroups: bindingsMapping is required until browsers support reflection for wgsl shaders!");if(0===this._bindGroups.length){var n=this._bindGroupEntries.length>0;for(var r in e){var o=e[r],a=i[r],s=a.group,l=a.binding,u=o.type,c=o.object,h=o.indexInGroupEntries;switch(!(x=this._bindGroupEntries[s])&&(x=this._bindGroupEntries[s]=[]),u){case ComputeBindingType$1.Sampler:var d=c;void 0!==h&&n?x[h].resource=this._cacheSampler.getSampler(d):(o.indexInGroupEntries=x.length,x.push({binding:l,resource:this._cacheSampler.getSampler(d)}));break;case ComputeBindingType$1.Texture:case ComputeBindingType$1.TextureWithoutSampler:var f=(p=c)._texture._hardwareTexture;void 0!==h&&n?(u===ComputeBindingType$1.Texture&&(x[h++].resource=this._cacheSampler.getSampler(p._texture)),x[h].resource=f.view):(o.indexInGroupEntries=x.length,u===ComputeBindingType$1.Texture&&x.push({binding:l-1,resource:this._cacheSampler.getSampler(p._texture)}),x.push({binding:l,resource:f.view}));break;case ComputeBindingType$1.StorageTexture:var p;0==((f=(p=c)._texture._hardwareTexture).textureAdditionalUsages&_0x572d87.TextureUsage.StorageBinding)&&_0x41154e.Error("computeDispatch: The texture (name=".concat(p.name,", uniqueId=").concat(p.uniqueId,") is not a storage texture!"),50),void 0!==h&&n?x[h].resource=f.viewForWriting:(o.indexInGroupEntries=x.length,x.push({binding:l,resource:f.viewForWriting}));break;case ComputeBindingType$1.UniformBuffer:case ComputeBindingType$1.StorageBuffer:var _=(ComputeBindingType$1.UniformBuffer,c).getBuffer(),m=_.underlyingResource;void 0!==h&&n?(x[h].resource.buffer=m,x[h].resource.size=_.capacity):(o.indexInGroupEntries=x.length,x.push({binding:l,resource:{buffer:m,offset:0,size:_.capacity}}))}}for(var g=0;g<this._bindGroupEntries.length;++g){var x;(x=this._bindGroupEntries[g])?this._bindGroups[g]=this._device.createBindGroup({layout:t.getBindGroupLayout(g),entries:x}):this._bindGroups[g]=void 0}this._bindGroups.length=this._bindGroupEntries.length}return this._bindGroups},_0x505819.prototype.clear=function(){this._bindGroups=[]},_0x505819._Counter=0;var _0x575b38=(_0x1b5040=!0,function(e,t){var i=_0x1b5040?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b5040=!1,i}),_0x4e5c59=_0x575b38(void 0,(function(){return _0x4e5c59.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e5c59).search("(((.+)+)+)+$")})),_0x1b5040;function _0x49d68a(e){this._name="unnamed",this.engine=e,this.computePipeline=null}_0x4e5c59(),Object.defineProperty(_0x49d68a.prototype,"isAsync",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x49d68a.prototype,"isReady",{get:function(){return!!this.stage},enumerable:!1,configurable:!0}),_0x49d68a.prototype._getComputeShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.compute},_0x49d68a.prototype.dispose=function(){};var _0x4af547=(_0x10ecd5=!0,function(e,t){var i=_0x10ecd5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x10ecd5=!1,i}),_0x4d3886=_0x4af547(void 0,(function(){return _0x4d3886.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d3886).search("(((.+)+)+)+$")})),_0x10ecd5;_0x4d3886();const ComputeBindingType={Texture:0,StorageTexture:1,UniformBuffer:2,StorageBuffer:3,TextureWithoutSampler:4,Sampler:5};_0x58fcf.prototype.createComputeContext=function(){return new _0x505819(this._device,this._cacheSampler)},_0x58fcf.prototype.createComputeEffect=function(e,t){var i=(e.computeElement||e.compute||e.computeToken||e.computeSource||e)+"@"+t.defines;if(this._compiledComputeEffects[i]){var n=this._compiledComputeEffects[i];return t.onCompiled&&n.isReady()&&t.onCompiled(n),n}var r=new _0x1f3490(e,t,this,i);return this._compiledComputeEffects[i]=r,r},_0x58fcf.prototype.createComputePipelineContext=function(){return new _0x49d68a(this)},_0x58fcf.prototype.areAllComputeEffectsReady=function(){for(var e in this._compiledComputeEffects){if(!this._compiledComputeEffects[e].isReady())return!1}return!0},_0x58fcf.prototype.computeDispatch=function(e,t,i,n,r,o,a){var s=this;if(this._currentRenderTarget)this._onAfterUnbindFrameBufferObservable.addOnce((function(){s.computeDispatch(e,t,i,n,r,o,a)}));else{var l=e._pipelineContext,u=t;!l.computePipeline&&(l.computePipeline=this._device.createComputePipeline({layout:_0x572d87.AutoLayoutMode.Auto,compute:l.stage}));var c=this._renderTargetEncoder.beginComputePass();c.setPipeline(l.computePipeline);for(var h=u.getBindGroups(i,l.computePipeline,a),d=0;d<h.length;++d){var f=h[d];f&&c.setBindGroup(d,f)}c.dispatchWorkgroups(n,r,o),c.end()}},_0x58fcf.prototype.releaseComputeEffects=function(){for(var e in this._compiledComputeEffects){var t=this._compiledComputeEffects[e].getPipelineContext();this._deleteComputePipelineContext(t)}this._compiledComputeEffects={}},_0x58fcf.prototype._prepareComputePipelineContext=function(e,t,i,n,r){var o=e;this.dbgShowShaderCode&&(console.log(n),console.log(t)),o.sources={compute:t,rawCompute:i},o.stage=this._createComputePipelineStageDescriptor(t,n,r)},_0x58fcf.prototype._releaseComputeEffect=function(e){this._compiledComputeEffects[e._key]&&(delete this._compiledComputeEffects[e._key],this._deleteComputePipelineContext(e.getPipelineContext()))},_0x58fcf.prototype._rebuildComputeEffects=function(){for(var e in this._compiledComputeEffects){var t=this._compiledComputeEffects[e];t._pipelineContext=null,t._wasPreviouslyReady=!1,t._prepareEffect()}},_0x58fcf.prototype._deleteComputePipelineContext=function(e){e&&e.dispose()},_0x58fcf.prototype._createComputePipelineStageDescriptor=function(e,t,i){return t=t?"//"+t.split("\n").join("\n//")+"\n":"",{module:this._device.createShaderModule({code:t+e}),entryPoint:i}};var _0x3de85f=(_0x2342f3=!0,function(e,t){var i=_0x2342f3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2342f3=!1,i}),_0x463adf=_0x3de85f(void 0,(function(){return _0x463adf.toString().search("(((.+)+)+)+$").toString().constructor(_0x463adf).search("(((.+)+)+)+$")})),_0x2342f3;function _0x14f326(e,t,i,n){void 0===n&&(n={}),this._bindings={},this._samplers={},this._contextIsDirty=!1,this.onCompiled=null,this.onError=null,this.name=e,this._engine=t,this.uniqueId=_0x2a478f.UniqueId,this._engine.getCaps().supportComputeShaders?n.bindingsMapping?(this._context=t.createComputeContext(),this._shaderPath=i,this._options=n||{bindingsMapping:{},defines:[]}):console.log("You must provide the binding mappings as browsers don't support reflection for wgsl shaders yet!"):console.log("This engine does not support compute shaders!")}_0x463adf(),Object.defineProperty(_0x14f326.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(_0x14f326.prototype,"shaderPath",{get:function(){return this._shaderPath},enumerable:!1,configurable:!0}),_0x14f326.prototype.getClassName=function(){return"ComputeShader"},_0x14f326.prototype.setTexture=function(e,t,i){void 0===i&&(i=!0);var n=this._bindings[e];this._bindings[e]={type:i?ComputeBindingType.Texture:ComputeBindingType.TextureWithoutSampler,object:t,indexInGroupEntries:null==n?void 0:n.indexInGroupEntries},this._contextIsDirty||(this._contextIsDirty=!n||n.object!==t||n.type!==this._bindings[e].type)},_0x14f326.prototype.setStorageTexture=function(e,t){var i=this._bindings[e];this._contextIsDirty||(this._contextIsDirty=!i||i.object!==t),this._bindings[e]={type:ComputeBindingType.StorageTexture,object:t,indexInGroupEntries:null==i?void 0:i.indexInGroupEntries}},_0x14f326.prototype.setUniformBuffer=function(e,t){var i=this._bindings[e];this._contextIsDirty||(this._contextIsDirty=!i||i.object!==t),this._bindings[e]={type:ComputeBindingType.UniformBuffer,object:t,indexInGroupEntries:null==i?void 0:i.indexInGroupEntries}},_0x14f326.prototype.setStorageBuffer=function(e,t){var i=this._bindings[e];this._contextIsDirty||(this._contextIsDirty=!i||i.object!==t),this._bindings[e]={type:ComputeBindingType.StorageBuffer,object:t,indexInGroupEntries:null==i?void 0:i.indexInGroupEntries}},_0x14f326.prototype.setTextureSampler=function(e,t){var i=this._bindings[e];this._contextIsDirty||(this._contextIsDirty=!i||!t.compareSampler(i.object)),this._bindings[e]={type:ComputeBindingType.Sampler,object:t,indexInGroupEntries:null==i?void 0:i.indexInGroupEntries}},_0x14f326.prototype.isReady=function(){var e=this._effect;for(var t in this._bindings){var i=this._bindings[t],n=i.type,r=i.object;switch(n){case ComputeBindingType.Texture:case ComputeBindingType.TextureWithoutSampler:case ComputeBindingType.StorageTexture:if(!r.isReady)return!1}}var o=[],a=this._shaderPath;if(this._options.defines)for(var s=0;s<this._options.defines.length;s++)o.push(this._options.defines[s]);var l=o.join("\n");return this._cachedDefines!==l&&(this._cachedDefines=l,e=this._engine.createComputeEffect(a,{defines:l,entryPoint:this._options.entryPoint,onCompiled:this.onCompiled,onError:this.onError}),this._effect=e),!!e.isReady()},_0x14f326.prototype.dispatch=function(e,t,i){var n;if(!this.isReady())return!1;for(var r in this._bindings){var o=this._bindings[r];if(!this._options.bindingsMapping[r])throw new Error("ComputeShader ('"+this.name+"'): No binding mapping has been provided for the property '"+r+"'");if(o.type===ComputeBindingType.Texture){var a=this._samplers[r],s=o.object;(!a||!s._texture||!a.compareSampler(s._texture))&&(this._samplers[r]=(new _0x5a3997).setParameters(s.wrapU,s.wrapV,s.wrapR,s.anisotropicFilteringLevel,s._texture.samplingMode,null===(n=s._texture)||void 0===n?void 0:n._comparisonFunction),this._contextIsDirty=!0)}}return this._contextIsDirty&&(this._contextIsDirty=!1,this._context.clear()),this._engine.computeDispatch(this._effect,this._context,this._bindings,e,t,i,this._options.bindingsMapping),!0},_0x14f326.prototype.dispatchWhenReady=function(e,t,i,n){var r=this;return void 0===n&&(n=10),new Promise((function(o){var a=function(){r.dispatch(e,t,i)?o():setTimeout(a,n)};a()}))};var _0x2a56c6="\nstruct Rgba {\n R : f32,\n G : f32,\n B : f32,\n A : f32,\n};\n\n\nstruct ColorBuffer {\n colors : array<Rgba>,\n};\n\nstruct Params {\n texelSize : vec2<f32>, \n};\n\nfn nearAverage(a : Rgba, b : Rgba, c : Rgba, d : Rgba) -> Rgba\n{\n let sumR = dot(vec4<f32>(a.R, b.R, c.R, d.R), vec4<f32>(1.0));\n let sumG = dot(vec4<f32>(a.G, b.G, c.G, d.G), vec4<f32>(1.0));\n let sumB = dot(vec4<f32>(a.B, b.B, c.B, d.B), vec4<f32>(1.0));\n let sumA = dot(vec4<f32>(a.A, b.A, c.A, d.A), vec4<f32>(1.0));\n\n return Rgba(sumR/4.0, sumG/4.0, sumB/4.0, sumA/4.0);\n}\n\nfn maxDepthValue(a : Rgba, b : Rgba, c : Rgba, d : Rgba) -> Rgba\n{\n var resColor : vec4<f32> = max(max(vec4<f32>(a.R, a.G, a.B, a.A), vec4<f32>(b.R, b.G, b.B, b.A)), max(vec4<f32>(c.R, c.G, c.B, c.A), vec4<f32>(d.R, d.G, d.B, d.A)));\n return Rgba(resColor.x, resColor.y, resColor.z, resColor.w);\n}\n\n@group(0) @binding(0) var<uniform> params : Params;\n@group(0) @binding(1) var<storage, read> buffer_in : ColorBuffer;\n@group(0) @binding(2) var<storage, read_write> buffer_out : ColorBuffer;\n@group(0) @binding(3) var mipMapsTexture : texture_storage_2d<rgba8unorm, write>;\n\n// pass1 颜色求均值写入mip\n@compute @workgroup_size(8, 8, 1)\nfn main(@builtin(global_invocation_id) global_id : vec3<u32>) \n{\n if(all(global_id.xy < vec2<u32>(textureDimensions(mipMapsTexture)))){\n let width = u32(params.texelSize.x);\n let dst_offSet = global_id.x + global_id.y * width;\n let src_offSet = global_id.x*2u + global_id.y*2u * width*2u;\n\n let texel1 : Rgba = buffer_in.colors[src_offSet + 0u];\n let texel2 : Rgba = buffer_in.colors[src_offSet + 1u];\n let texel3 : Rgba = buffer_in.colors[src_offSet + 0u + width*2u];\n let texel4 : Rgba = buffer_in.colors[src_offSet + 1u + width*2u];\n\n var resColor : Rgba = Rgba(1,1,1,1);\n #if _isHizDepthTex\n resColor = maxDepthValue(texel1, texel2, texel3, texel4);\n #else\n resColor = nearAverage(texel1, texel2, texel3, texel4);\n #endif\n buffer_out.colors[dst_offSet] = resColor;\n\n textureStore(mipMapsTexture, vec2<i32>(global_id.xy), vec4<f32>(resColor.R, resColor.G, resColor.B, resColor.A));\n }\n}\n",_0x414ed="\nstruct Rgba {\n R : f32,\n G : f32,\n B : f32,\n A : f32,\n};\n\nstruct ColorBuffer {\n colors : array<Rgba>,\n};\n\nstruct Params {\n srcDimension : u32,\n texelSize : vec2<f32>, \n};\n\n\nfn linear2Gamma(linearRGB : vec3<f32>) -> vec3<f32>\n{\n if(linearRGB.x < 0.0031308 && linearRGB.y < 0.0031308\n && linearRGB.z < 0.0031308){\n return 12.92 * linearRGB;\n }else{\n return 1.13005 * sqrt(abs(linearRGB - vec3<f32>(0.00228,0.00228,0.00228))) - 0.13448 * linearRGB \n + vec3<f32>(0.005719,0.005719,0.005719); \n }\n}\n\nfn packColor(srcColor : vec4<f32>) -> vec4<f32>\n{\n#ifdef CONVERT_TO_SRGB\n return float4(linear2Gamma(srcColor.xyz), srcColor.w);\n#else\n return srcColor;\n#endif\n}\n\n@group(0) @binding(0) var<uniform> params : Params;\n@group(0) @binding(1) var<storage, read_write> buffer_out : ColorBuffer;\n@group(0) @binding(2) var oriDepthTexture : texture_depth_2d;\n@group(0) @binding(2) var oriTexture : texture_2d<f32>;\n@group(0) @binding(3) var mip0Texture : texture_storage_2d<rgba8unorm, write>;\n\n// pass0 原始Mip纹理采样\n@compute @workgroup_size(8, 8, 1)\nfn main(@builtin(global_invocation_id) global_id : vec3<u32>) \n{\n var texelSize = params.texelSize;\n\n // 若要对非2n纹理采样使用此分情况额外处理\n var srcDimension : u32 = params.srcDimension;\n var pix : vec4<f32> = vec4<f32>(0, 0, 0, 1);\n\n #if _useDepthTexture\n let depth : f32 = textureLoad(oriDepthTexture, vec2<i32>(global_id.xy), 0);\n pix = vec4<f32>(depth, 0., 0., 1.);\n #else\n pix= packColor(textureLoad(oriTexture, vec2<i32>(global_id.xy), 0));\n #endif\n \n let offSet = global_id.x + global_id.y * u32(texelSize.x);\n let rgba : Rgba = Rgba(pix.x, pix.y, pix.z, pix.w);\n buffer_out.colors[offSet] = rgba;\n textureStore(mip0Texture, vec2<i32>(global_id.xy), pix);\n}\n",_0x2b3e17="\n const vec2 pos[4] = vec2[4](vec2(-1.0f, 1.0f), vec2(1.0f, 1.0f), vec2(-1.0f, -1.0f), vec2(1.0f, -1.0f));\n const vec2 tex[4] = vec2[4](vec2(0.0f, 0.0f), vec2(1.0f, 0.0f), vec2(0.0f, 1.0f), vec2(1.0f, 1.0f));\n\n layout(location = 0) out vec2 vTex;\n\n void main() {\n vTex = tex[gl_VertexIndex];\n gl_Position = vec4(pos[gl_VertexIndex], 0.0, 1.0);\n }\n ",_0x4e2580="\n layout(set = 0, binding = 0) uniform sampler imgSampler;\n layout(set = 0, binding = 1) uniform texture2D img;\n\n layout(location = 0) in vec2 vTex;\n layout(location = 0) out vec4 outColor;\n\n void main() {\n outColor = texture(sampler2D(img, imgSampler), vTex);\n }\n ",_0x30a3b0="\n #extension GL_EXT_samplerless_texture_functions : enable\n\n const vec2 pos[4] = vec2[4](vec2(-1.0f, 1.0f), vec2(1.0f, 1.0f), vec2(-1.0f, -1.0f), vec2(1.0f, -1.0f));\n const vec2 tex[4] = vec2[4](vec2(0.0f, 0.0f), vec2(1.0f, 0.0f), vec2(0.0f, 1.0f), vec2(1.0f, 1.0f));\n\n layout(set = 0, binding = 0) uniform texture2D img;\n\n #ifdef INVERTY\n layout(location = 0) out flat ivec2 vTextureSize;\n #endif\n\n void main() {\n #ifdef INVERTY\n vTextureSize = textureSize(img, 0);\n #endif\n gl_Position = vec4(pos[gl_VertexIndex], 0.0, 1.0);\n }\n ",_0x253350="\n #extension GL_EXT_samplerless_texture_functions : enable\n\n layout(set = 0, binding = 0) uniform texture2D img;\n\n #ifdef INVERTY\n layout(location = 0) in flat ivec2 vTextureSize;\n #endif\n layout(location = 0) out vec4 outColor;\n\n void main() {\n #ifdef INVERTY\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.x, vTextureSize.y - gl_FragCoord.y), 0);\n #else\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.xy), 0);\n #endif\n #ifdef PREMULTIPLYALPHA\n color.rgb *= color.a;\n #endif\n outColor = color;\n }\n ",_0x326ba2=_0x30a3b0,_0x2dc2c6="\n #extension GL_EXT_samplerless_texture_functions : enable\n\n layout(set = 0, binding = 0) uniform texture2D img;\n layout(set = 0, binding = 1) uniform Params {\n float ofstX;\n float ofstY;\n float width;\n float height;\n };\n\n #ifdef INVERTY\n layout(location = 0) in flat ivec2 vTextureSize;\n #endif\n layout(location = 0) out vec4 outColor;\n\n void main() {\n if (gl_FragCoord.x < ofstX || gl_FragCoord.x >= ofstX + width) {\n discard;\n }\n if (gl_FragCoord.y < ofstY || gl_FragCoord.y >= ofstY + height) {\n discard;\n }\n #ifdef INVERTY\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.x, ofstY + height - (gl_FragCoord.y - ofstY)), 0);\n #else\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.xy), 0);\n #endif\n #ifdef PREMULTIPLYALPHA\n color.rgb *= color.a;\n #endif\n outColor = color;\n }\n ",_0x488beb="\n const vec2 pos[4] = vec2[4](vec2(-1.0f, 1.0f), vec2(1.0f, 1.0f), vec2(-1.0f, -1.0f), vec2(1.0f, -1.0f));\n\n void main() {\n gl_Position = vec4(pos[gl_VertexIndex], 0.0, 1.0);\n }\n ",_0x12d653="\n layout(set = 0, binding = 0) uniform Uniforms {\n uniform vec4 color;\n };\n\n layout(location = 0) out vec4 outColor;\n\n void main() {\n outColor = color;\n }\n ",_0x5347dd="\n struct VertexOutput {\n @builtin(position) Position : vec4<f32>,\n @location(0) fragUV : vec2<f32>\n }\n \n @vertex\n fn main(\n @builtin(vertex_index) VertexIndex : u32\n ) -> VertexOutput {\n var pos = array<vec2<f32>, 4>(\n vec2(-1.0, 1.0),\n vec2( 1.0, 1.0),\n vec2(-1.0, -1.0),\n vec2( 1.0, -1.0)\n );\n var tex = array<vec2<f32>, 4>(\n vec2(0.0, 0.0),\n vec2(1.0, 0.0),\n vec2(0.0, 1.0),\n vec2(1.0, 1.0)\n );\n\n var output: VertexOutput;\n\n output.Position = vec4<f32>(pos[VertexIndex], 0.0, 1.0);\n output.fragUV = tex[VertexIndex];\n\n return output;\n }\n ",_0x3013d7="\n @group(0) @binding(0) var videoTexture: texture_external;\n\n @fragment\n fn main(\n @location(0) fragUV: vec2<f32>\n ) -> @location(0) vec4<f32> {\n let uv : vec2<i32> = vec2<i32>(i32(fragUV.x), i32(fragUV.y));\n return textureLoad(videoTexture, uv);\n }\n",_0x2d3db9="\n @group(0) @binding(0) var videoTexture: texture_external;\n\n @fragment\n fn main(\n @location(0) fragUV: vec2<f32>\n ) -> @location(0) vec4<f32> {\n let uv : vec2<i32> = vec2<i32>(i32(fragUV.x), i32(1 - fragUV.y));\n return textureLoad(videoTexture, uv);\n }\n ",_0x90e6c0,_0x3c651a,_0x53947e;!function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.MipMap=0]="MipMap",e[e.InvertYPremultiplyAlpha=1]="InvertYPremultiplyAlpha",e[e.Clear=2]="Clear",e[e.InvertYPremultiplyAlphaWithOfst=3]="InvertYPremultiplyAlphaWithOfst"}(_0x90e6c0||(_0x90e6c0={})),_0x53947e=_0x3c651a||(_0x3c651a={}),_0x53947e[_0x53947e.DontInvertY=0]="DontInvertY",_0x53947e[_0x53947e.InvertY=1]="InvertY";var _0x5bca02=[{vertex:_0x2b3e17,fragment:_0x4e2580},{vertex:_0x30a3b0,fragment:_0x253350},{vertex:_0x488beb,fragment:_0x12d653},{vertex:_0x326ba2,fragment:_0x2dc2c6}];const renderableTextureFormatToIndex={"":0,r8unorm:1,r8uint:2,r8sint:3,r16uint:4,r16sint:5,r16float:6,rg8unorm:7,rg8uint:8,rg8sint:9,r32uint:10,r32sint:11,r32float:12,rg16uint:13,rg16sint:14,rg16float:15,rgba8unorm:16,"rgba8unorm-srgb":17,rgba8uint:18,rgba8sint:19,bgra8unorm:20,"bgra8unorm-srgb":21,rgb10a2unorm:22,rg32uint:23,rg32sint:24,rg32float:25,rgba16uint:26,rgba16sint:27,rgba16float:28,rgba32uint:29,rgba32sint:30,rgba32float:31,stencil8:32,depth16unorm:33,depth24plus:34,"depth24plus-stencil8":35,depth32float:36,"depth24unorm-stencil8":37,"depth32float-stencil8":38};function WebGPUTextureHelper(e,t,i,n,r){this._pipelines={},this._compiledShaders=[],this._deferredReleaseTextures=[],this._videoPipelines={},this._videoCompiledShaders=[],this._userEngine=r,this._device=e,this._glslang=t,this._tintWASM=i,this._bufferManager=n,this._mipmapSampler=e.createSampler({minFilter:_0x572d87.FilterMode.Linear}),this._videoSampler=e.createSampler({minFilter:_0x572d87.FilterMode.Linear}),this._ubCopyWithOfst=this._bufferManager.createBuffer(16,_0x572d87.BufferUsage.Uniform|_0x572d87.BufferUsage.CopyDst).underlyingResource,this._getPipeline(_0x572d87.TextureFormat.RGBA8Unorm)}WebGPUTextureHelper.ComputeNumMipmapLevels=function(e,t){return _0x121f46.ILog2(Math.max(e,t))+1},WebGPUTextureHelper.prototype._getPipeline=function(e,t,i){void 0===t&&(t=_0x90e6c0.MipMap);var n=t===_0x90e6c0.MipMap?1:t===_0x90e6c0.InvertYPremultiplyAlpha?((i.invertY?1:0)<<1)+((i.premultiplyAlpha?1:0)<<2):t===_0x90e6c0.Clear?8:t===_0x90e6c0.InvertYPremultiplyAlphaWithOfst?((i.invertY?1:0)<<4)+((i.premultiplyAlpha?1:0)<<5):0;!this._pipelines[e]&&(this._pipelines[e]=[]);var r=this._pipelines[e][n];if(!r){var o="#version 450\r\n";(t===_0x90e6c0.InvertYPremultiplyAlpha||t===_0x90e6c0.InvertYPremultiplyAlphaWithOfst)&&(i.invertY&&(o+="#define INVERTY\r\n"),i.premultiplyAlpha&&(o+="#define PREMULTIPLYALPHA\r\n"));var a=this._compiledShaders[n];if(!a){var s=this._glslang.compileGLSL(o+_0x5bca02[t].vertex,"vertex"),l=this._glslang.compileGLSL(o+_0x5bca02[t].fragment,"fragment");this._tintWASM&&(s=this._tintWASM.convertSpirV2WGSL(s),l=this._tintWASM.convertSpirV2WGSL(l));var u=this._device.createShaderModule({code:s}),c=this._device.createShaderModule({code:l});a=this._compiledShaders[n]=[u,c]}var h=this._device.createRenderPipeline({layout:_0x572d87.AutoLayoutMode.Auto,vertex:{module:a[0],entryPoint:"main"},fragment:{module:a[1],entryPoint:"main",targets:[{format:e}]},primitive:{topology:_0x572d87.PrimitiveTopology.TriangleStrip,stripIndexFormat:_0x572d87.IndexFormat.Uint16}});r=this._pipelines[e][n]=[h,h.getBindGroupLayout(0)]}return r},WebGPUTextureHelper.prototype._getVideoPipeline=function(e,t){void 0===t&&(t=_0x3c651a.DontInvertY);var i=t===_0x3c651a.InvertY?1:0;!this._videoPipelines[e]&&(this._videoPipelines[e]=[]);var n=this._videoPipelines[e][i];if(!n){var r=this._videoCompiledShaders[i];if(!r){var o=this._device.createShaderModule({code:_0x5347dd}),a=this._device.createShaderModule({code:0===i?_0x3013d7:_0x2d3db9});r=this._videoCompiledShaders[i]=[o,a]}var s=this._device.createRenderPipeline({label:"CopyVideoToTexture_".concat(e,"_").concat(0===i?"DontInvertY":"InvertY"),layout:_0x572d87.AutoLayoutMode.Auto,vertex:{module:r[0],entryPoint:"main"},fragment:{module:r[1],entryPoint:"main",targets:[{format:e}]},primitive:{topology:_0x572d87.PrimitiveTopology.TriangleStrip,stripIndexFormat:_0x572d87.IndexFormat.Uint16}});n=this._videoPipelines[e][i]=[s,s.getBindGroupLayout(0)]}return n},WebGPUTextureHelper._GetTextureTypeFromFormat=function(e){switch(e){case _0x572d87.TextureFormat.R8Unorm:case _0x572d87.TextureFormat.R8Snorm:case _0x572d87.TextureFormat.R8Uint:case _0x572d87.TextureFormat.R8Sint:case _0x572d87.TextureFormat.RG8Unorm:case _0x572d87.TextureFormat.RG8Snorm:case _0x572d87.TextureFormat.RG8Uint:case _0x572d87.TextureFormat.RG8Sint:case _0x572d87.TextureFormat.RGBA8Unorm:case _0x572d87.TextureFormat.RGBA8UnormSRGB:case _0x572d87.TextureFormat.RGBA8Snorm:case _0x572d87.TextureFormat.RGBA8Uint:case _0x572d87.TextureFormat.RGBA8Sint:case _0x572d87.TextureFormat.BGRA8Unorm:case _0x572d87.TextureFormat.BGRA8UnormSRGB:case _0x572d87.TextureFormat.RGB10A2Unorm:case _0x572d87.TextureFormat.RGB9E5UFloat:case _0x572d87.TextureFormat.RG11B10UFloat:case _0x572d87.TextureFormat.Depth24UnormStencil8:case _0x572d87.TextureFormat.Depth32FloatStencil8:case _0x572d87.TextureFormat.BC7RGBAUnorm:case _0x572d87.TextureFormat.BC7RGBAUnormSRGB:case _0x572d87.TextureFormat.BC6HRGBUFloat:case _0x572d87.TextureFormat.BC6HRGBFloat:case _0x572d87.TextureFormat.BC5RGUnorm:case _0x572d87.TextureFormat.BC5RGSnorm:case _0x572d87.TextureFormat.BC3RGBAUnorm:case _0x572d87.TextureFormat.BC3RGBAUnormSRGB:case _0x572d87.TextureFormat.BC2RGBAUnorm:case _0x572d87.TextureFormat.BC2RGBAUnormSRGB:case _0x572d87.TextureFormat.BC4RUnorm:case _0x572d87.TextureFormat.BC4RSnorm:case _0x572d87.TextureFormat.BC1RGBAUnorm:case _0x572d87.TextureFormat.BC1RGBAUnormSRGB:case _0x572d87.TextureFormat.ETC2RGB8Unorm:case _0x572d87.TextureFormat.ETC2RGB8UnormSRGB:case _0x572d87.TextureFormat.ETC2RGB8A1Unorm:case _0x572d87.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x572d87.TextureFormat.ETC2RGBA8Unorm:case _0x572d87.TextureFormat.ETC2RGBA8UnormSRGB:case _0x572d87.TextureFormat.EACR11Unorm:case _0x572d87.TextureFormat.EACR11Snorm:case _0x572d87.TextureFormat.EACRG11Unorm:case _0x572d87.TextureFormat.EACRG11Snorm:case _0x572d87.TextureFormat.ASTC4x4Unorm:case _0x572d87.TextureFormat.ASTC4x4UnormSRGB:case _0x572d87.TextureFormat.ASTC5x4Unorm:case _0x572d87.TextureFormat.ASTC5x4UnormSRGB:case _0x572d87.TextureFormat.ASTC5x5Unorm:case _0x572d87.TextureFormat.ASTC5x5UnormSRGB:case _0x572d87.TextureFormat.ASTC6x5Unorm:case _0x572d87.TextureFormat.ASTC6x5UnormSRGB:case _0x572d87.TextureFormat.ASTC6x6Unorm:case _0x572d87.TextureFormat.ASTC6x6UnormSRGB:case _0x572d87.TextureFormat.ASTC8x5Unorm:case _0x572d87.TextureFormat.ASTC8x5UnormSRGB:case _0x572d87.TextureFormat.ASTC8x6Unorm:case _0x572d87.TextureFormat.ASTC8x6UnormSRGB:case _0x572d87.TextureFormat.ASTC8x8Unorm:case _0x572d87.TextureFormat.ASTC8x8UnormSRGB:case _0x572d87.TextureFormat.ASTC10x5Unorm:case _0x572d87.TextureFormat.ASTC10x5UnormSRGB:case _0x572d87.TextureFormat.ASTC10x6Unorm:case _0x572d87.TextureFormat.ASTC10x6UnormSRGB:case _0x572d87.TextureFormat.ASTC10x8Unorm:case _0x572d87.TextureFormat.ASTC10x8UnormSRGB:case _0x572d87.TextureFormat.ASTC10x10Unorm:case _0x572d87.TextureFormat.ASTC10x10UnormSRGB:case _0x572d87.TextureFormat.ASTC12x10Unorm:case _0x572d87.TextureFormat.ASTC12x10UnormSRGB:case _0x572d87.TextureFormat.ASTC12x12Unorm:case _0x572d87.TextureFormat.ASTC12x12UnormSRGB:return _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE;case _0x572d87.TextureFormat.R16Uint:case _0x572d87.TextureFormat.R16Sint:case _0x572d87.TextureFormat.RG16Uint:case _0x572d87.TextureFormat.RG16Sint:case _0x572d87.TextureFormat.RGBA16Uint:case _0x572d87.TextureFormat.RGBA16Sint:case _0x572d87.TextureFormat.Depth16Unorm:return _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT;case _0x572d87.TextureFormat.R16Float:case _0x572d87.TextureFormat.RG16Float:case _0x572d87.TextureFormat.RGBA16Float:return _0x354cf8.TEXTURETYPE_HALF_FLOAT;case _0x572d87.TextureFormat.R32Uint:case _0x572d87.TextureFormat.R32Sint:case _0x572d87.TextureFormat.RG32Uint:case _0x572d87.TextureFormat.RG32Sint:case _0x572d87.TextureFormat.RGBA32Uint:case _0x572d87.TextureFormat.RGBA32Sint:return _0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER;case _0x572d87.TextureFormat.R32Float:case _0x572d87.TextureFormat.RG32Float:case _0x572d87.TextureFormat.RGBA32Float:case _0x572d87.TextureFormat.Depth32Float:return _0x354cf8.TEXTURETYPE_FLOAT;case _0x572d87.TextureFormat.Stencil8:throw"No fixed size for Stencil8 format!";case _0x572d87.TextureFormat.Depth24Plus:throw"No fixed size for Depth24Plus format!";case _0x572d87.TextureFormat.Depth24PlusStencil8:throw"No fixed size for Depth24PlusStencil8 format!"}return _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE},WebGPUTextureHelper._GetBlockInformationFromFormat=function(e){switch(e){case _0x572d87.TextureFormat.R8Unorm:case _0x572d87.TextureFormat.R8Snorm:case _0x572d87.TextureFormat.R8Uint:case _0x572d87.TextureFormat.R8Sint:return{width:1,height:1,length:1};case _0x572d87.TextureFormat.R16Uint:case _0x572d87.TextureFormat.R16Sint:case _0x572d87.TextureFormat.R16Float:case _0x572d87.TextureFormat.RG8Unorm:case _0x572d87.TextureFormat.RG8Snorm:case _0x572d87.TextureFormat.RG8Uint:case _0x572d87.TextureFormat.RG8Sint:return{width:1,height:1,length:2};case _0x572d87.TextureFormat.R32Uint:case _0x572d87.TextureFormat.R32Sint:case _0x572d87.TextureFormat.R32Float:case _0x572d87.TextureFormat.RG16Uint:case _0x572d87.TextureFormat.RG16Sint:case _0x572d87.TextureFormat.RG16Float:case _0x572d87.TextureFormat.RGBA8Unorm:case _0x572d87.TextureFormat.RGBA8UnormSRGB:case _0x572d87.TextureFormat.RGBA8Snorm:case _0x572d87.TextureFormat.RGBA8Uint:case _0x572d87.TextureFormat.RGBA8Sint:case _0x572d87.TextureFormat.BGRA8Unorm:case _0x572d87.TextureFormat.BGRA8UnormSRGB:case _0x572d87.TextureFormat.RGB9E5UFloat:case _0x572d87.TextureFormat.RGB10A2Unorm:case _0x572d87.TextureFormat.RG11B10UFloat:return{width:1,height:1,length:4};case _0x572d87.TextureFormat.RG32Uint:case _0x572d87.TextureFormat.RG32Sint:case _0x572d87.TextureFormat.RG32Float:case _0x572d87.TextureFormat.RGBA16Uint:case _0x572d87.TextureFormat.RGBA16Sint:case _0x572d87.TextureFormat.RGBA16Float:return{width:1,height:1,length:8};case _0x572d87.TextureFormat.RGBA32Uint:case _0x572d87.TextureFormat.RGBA32Sint:case _0x572d87.TextureFormat.RGBA32Float:return{width:1,height:1,length:16};case _0x572d87.TextureFormat.Stencil8:throw"No fixed size for Stencil8 format!";case _0x572d87.TextureFormat.Depth16Unorm:return{width:1,height:1,length:2};case _0x572d87.TextureFormat.Depth24Plus:throw"No fixed size for Depth24Plus format!";case _0x572d87.TextureFormat.Depth24PlusStencil8:throw"No fixed size for Depth24PlusStencil8 format!";case _0x572d87.TextureFormat.Depth32Float:case _0x572d87.TextureFormat.Depth24UnormStencil8:return{width:1,height:1,length:4};case _0x572d87.TextureFormat.Depth32FloatStencil8:return{width:1,height:1,length:5};case _0x572d87.TextureFormat.BC7RGBAUnorm:case _0x572d87.TextureFormat.BC7RGBAUnormSRGB:case _0x572d87.TextureFormat.BC6HRGBUFloat:case _0x572d87.TextureFormat.BC6HRGBFloat:case _0x572d87.TextureFormat.BC5RGUnorm:case _0x572d87.TextureFormat.BC5RGSnorm:case _0x572d87.TextureFormat.BC3RGBAUnorm:case _0x572d87.TextureFormat.BC3RGBAUnormSRGB:case _0x572d87.TextureFormat.BC2RGBAUnorm:case _0x572d87.TextureFormat.BC2RGBAUnormSRGB:return{width:4,height:4,length:16};case _0x572d87.TextureFormat.BC4RUnorm:case _0x572d87.TextureFormat.BC4RSnorm:case _0x572d87.TextureFormat.BC1RGBAUnorm:case _0x572d87.TextureFormat.BC1RGBAUnormSRGB:case _0x572d87.TextureFormat.ETC2RGB8Unorm:case _0x572d87.TextureFormat.ETC2RGB8UnormSRGB:case _0x572d87.TextureFormat.ETC2RGB8A1Unorm:case _0x572d87.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x572d87.TextureFormat.EACR11Unorm:case _0x572d87.TextureFormat.EACR11Snorm:return{width:4,height:4,length:8};case _0x572d87.TextureFormat.ETC2RGBA8Unorm:case _0x572d87.TextureFormat.ETC2RGBA8UnormSRGB:case _0x572d87.TextureFormat.EACRG11Unorm:case _0x572d87.TextureFormat.EACRG11Snorm:case _0x572d87.TextureFormat.ASTC4x4Unorm:case _0x572d87.TextureFormat.ASTC4x4UnormSRGB:return{width:4,height:4,length:16};case _0x572d87.TextureFormat.ASTC5x4Unorm:case _0x572d87.TextureFormat.ASTC5x4UnormSRGB:return{width:5,height:4,length:16};case _0x572d87.TextureFormat.ASTC5x5Unorm:case _0x572d87.TextureFormat.ASTC5x5UnormSRGB:return{width:5,height:5,length:16};case _0x572d87.TextureFormat.ASTC6x5Unorm:case _0x572d87.TextureFormat.ASTC6x5UnormSRGB:return{width:6,height:5,length:16};case _0x572d87.TextureFormat.ASTC6x6Unorm:case _0x572d87.TextureFormat.ASTC6x6UnormSRGB:return{width:6,height:6,length:16};case _0x572d87.TextureFormat.ASTC8x5Unorm:case _0x572d87.TextureFormat.ASTC8x5UnormSRGB:return{width:8,height:5,length:16};case _0x572d87.TextureFormat.ASTC8x6Unorm:case _0x572d87.TextureFormat.ASTC8x6UnormSRGB:return{width:8,height:6,length:16};case _0x572d87.TextureFormat.ASTC8x8Unorm:case _0x572d87.TextureFormat.ASTC8x8UnormSRGB:return{width:8,height:8,length:16};case _0x572d87.TextureFormat.ASTC10x5Unorm:case _0x572d87.TextureFormat.ASTC10x5UnormSRGB:return{width:10,height:5,length:16};case _0x572d87.TextureFormat.ASTC10x6Unorm:case _0x572d87.TextureFormat.ASTC10x6UnormSRGB:return{width:10,height:6,length:16};case _0x572d87.TextureFormat.ASTC10x8Unorm:case _0x572d87.TextureFormat.ASTC10x8UnormSRGB:return{width:10,height:8,length:16};case _0x572d87.TextureFormat.ASTC10x10Unorm:case _0x572d87.TextureFormat.ASTC10x10UnormSRGB:return{width:10,height:10,length:16};case _0x572d87.TextureFormat.ASTC12x10Unorm:case _0x572d87.TextureFormat.ASTC12x10UnormSRGB:return{width:12,height:10,length:16};case _0x572d87.TextureFormat.ASTC12x12Unorm:case _0x572d87.TextureFormat.ASTC12x12UnormSRGB:return{width:12,height:12,length:16}}return{width:1,height:1,length:4}},WebGPUTextureHelper._IsHardwareTexture=function(e){return!!e.release},WebGPUTextureHelper._IsInternalTexture=function(e){return!!e.dispose},WebGPUTextureHelper.IsImageBitmap=function(e){return void 0!==e.close},WebGPUTextureHelper.IsImageBitmapArray=function(e){return Array.isArray(e)&&void 0!==e[0].close},WebGPUTextureHelper.prototype.setCommandEncoder=function(e){this._commandEncoderForCreation=e},WebGPUTextureHelper.IsCompressedFormat=function(e){switch(e){case _0x572d87.TextureFormat.BC7RGBAUnormSRGB:case _0x572d87.TextureFormat.BC7RGBAUnorm:case _0x572d87.TextureFormat.BC6HRGBFloat:case _0x572d87.TextureFormat.BC6HRGBUFloat:case _0x572d87.TextureFormat.BC5RGSnorm:case _0x572d87.TextureFormat.BC5RGUnorm:case _0x572d87.TextureFormat.BC4RSnorm:case _0x572d87.TextureFormat.BC4RUnorm:case _0x572d87.TextureFormat.BC3RGBAUnormSRGB:case _0x572d87.TextureFormat.BC3RGBAUnorm:case _0x572d87.TextureFormat.BC2RGBAUnormSRGB:case _0x572d87.TextureFormat.BC2RGBAUnorm:case _0x572d87.TextureFormat.BC1RGBAUnormSRGB:case _0x572d87.TextureFormat.BC1RGBAUnorm:case _0x572d87.TextureFormat.ETC2RGB8Unorm:case _0x572d87.TextureFormat.ETC2RGB8UnormSRGB:case _0x572d87.TextureFormat.ETC2RGB8A1Unorm:case _0x572d87.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x572d87.TextureFormat.ETC2RGBA8Unorm:case _0x572d87.TextureFormat.ETC2RGBA8UnormSRGB:case _0x572d87.TextureFormat.EACR11Unorm:case _0x572d87.TextureFormat.EACR11Snorm:case _0x572d87.TextureFormat.EACRG11Unorm:case _0x572d87.TextureFormat.EACRG11Snorm:case _0x572d87.TextureFormat.ASTC4x4Unorm:case _0x572d87.TextureFormat.ASTC4x4UnormSRGB:case _0x572d87.TextureFormat.ASTC5x4Unorm:case _0x572d87.TextureFormat.ASTC5x4UnormSRGB:case _0x572d87.TextureFormat.ASTC5x5Unorm:case _0x572d87.TextureFormat.ASTC5x5UnormSRGB:case _0x572d87.TextureFormat.ASTC6x5Unorm:case _0x572d87.TextureFormat.ASTC6x5UnormSRGB:case _0x572d87.TextureFormat.ASTC6x6Unorm:case _0x572d87.TextureFormat.ASTC6x6UnormSRGB:case _0x572d87.TextureFormat.ASTC8x5Unorm:case _0x572d87.TextureFormat.ASTC8x5UnormSRGB:case _0x572d87.TextureFormat.ASTC8x6Unorm:case _0x572d87.TextureFormat.ASTC8x6UnormSRGB:case _0x572d87.TextureFormat.ASTC8x8Unorm:case _0x572d87.TextureFormat.ASTC8x8UnormSRGB:case _0x572d87.TextureFormat.ASTC10x5Unorm:case _0x572d87.TextureFormat.ASTC10x5UnormSRGB:case _0x572d87.TextureFormat.ASTC10x6Unorm:case _0x572d87.TextureFormat.ASTC10x6UnormSRGB:case _0x572d87.TextureFormat.ASTC10x8Unorm:case _0x572d87.TextureFormat.ASTC10x8UnormSRGB:case _0x572d87.TextureFormat.ASTC10x10Unorm:case _0x572d87.TextureFormat.ASTC10x10UnormSRGB:case _0x572d87.TextureFormat.ASTC12x10Unorm:case _0x572d87.TextureFormat.ASTC12x10UnormSRGB:case _0x572d87.TextureFormat.ASTC12x12Unorm:case _0x572d87.TextureFormat.ASTC12x12UnormSRGB:return!0}return!1},WebGPUTextureHelper.GetWebGPUTextureFormat=function(e,t,i){switch(void 0===i&&(i=!1),t){case _0x354cf8.TEXTUREFORMAT_DEPTH16:return _0x572d87.TextureFormat.Depth16Unorm;case _0x354cf8.TEXTUREFORMAT_DEPTH24:return _0x572d87.TextureFormat.Depth24Plus;case _0x354cf8.TEXTUREFORMAT_DEPTH24_STENCIL8:return _0x572d87.TextureFormat.Depth24PlusStencil8;case _0x354cf8.TEXTUREFORMAT_DEPTH32_FLOAT:return _0x572d87.TextureFormat.Depth32Float;case _0x354cf8.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8:return _0x572d87.TextureFormat.Depth24UnormStencil8;case _0x354cf8.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8:return _0x572d87.TextureFormat.Depth32FloatStencil8;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM:return i?_0x572d87.TextureFormat.BC7RGBAUnormSRGB:_0x572d87.TextureFormat.BC7RGBAUnorm;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT:return _0x572d87.TextureFormat.BC6HRGBUFloat;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT:return _0x572d87.TextureFormat.BC6HRGBFloat;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5:return i?_0x572d87.TextureFormat.BC3RGBAUnormSRGB:_0x572d87.TextureFormat.BC3RGBAUnorm;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3:return i?_0x572d87.TextureFormat.BC2RGBAUnormSRGB:_0x572d87.TextureFormat.BC2RGBAUnorm;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1:case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1:return i?_0x572d87.TextureFormat.BC1RGBAUnormSRGB:_0x572d87.TextureFormat.BC1RGBAUnorm;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4:return i?_0x572d87.TextureFormat.ASTC4x4UnormSRGB:_0x572d87.TextureFormat.ASTC4x4Unorm;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL:case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2:return i?_0x572d87.TextureFormat.ETC2RGB8UnormSRGB:_0x572d87.TextureFormat.ETC2RGB8Unorm;case _0x354cf8.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC:return i?_0x572d87.TextureFormat.ETC2RGBA8UnormSRGB:_0x572d87.TextureFormat.ETC2RGBA8Unorm}switch(e){case _0x354cf8.TEXTURETYPE_BYTE:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return _0x572d87.TextureFormat.R8Snorm;case _0x354cf8.TEXTUREFORMAT_RG:return _0x572d87.TextureFormat.RG8Snorm;case _0x354cf8.TEXTUREFORMAT_RGB:throw"RGB format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return _0x572d87.TextureFormat.R8Sint;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return _0x572d87.TextureFormat.RG8Sint;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:throw"RGB_INTEGER format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:return _0x572d87.TextureFormat.RGBA8Sint;default:return _0x572d87.TextureFormat.RGBA8Snorm}case _0x354cf8.TEXTURETYPE_UNSIGNED_BYTE:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return _0x572d87.TextureFormat.R8Unorm;case _0x354cf8.TEXTUREFORMAT_RG:return _0x572d87.TextureFormat.RG8Unorm;case _0x354cf8.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA:return i?_0x572d87.TextureFormat.RGBA8UnormSRGB:_0x572d87.TextureFormat.RGBA8Unorm;case _0x354cf8.TEXTUREFORMAT_BGRA:return i?_0x572d87.TextureFormat.BGRA8UnormSRGB:_0x572d87.TextureFormat.BGRA8Unorm;case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return _0x572d87.TextureFormat.R8Uint;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return _0x572d87.TextureFormat.RG8Uint;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:throw"RGB_INTEGER format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:return _0x572d87.TextureFormat.RGBA8Uint;case _0x354cf8.TEXTUREFORMAT_ALPHA:throw"TEXTUREFORMAT_ALPHA format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_LUMINANCE:throw"TEXTUREFORMAT_LUMINANCE format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_LUMINANCE_ALPHA:throw"TEXTUREFORMAT_LUMINANCE_ALPHA format not supported in WebGPU";default:return _0x572d87.TextureFormat.RGBA8Unorm}case _0x354cf8.TEXTURETYPE_SHORT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return _0x572d87.TextureFormat.R16Sint;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return _0x572d87.TextureFormat.RG16Sint;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x572d87.TextureFormat.RGBA16Sint}case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return _0x572d87.TextureFormat.R16Uint;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return _0x572d87.TextureFormat.RG16Uint;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x572d87.TextureFormat.RGBA16Uint}case _0x354cf8.TEXTURETYPE_INT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return _0x572d87.TextureFormat.R32Sint;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return _0x572d87.TextureFormat.RG32Sint;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x572d87.TextureFormat.RGBA32Sint}case _0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER:switch(t){case _0x354cf8.TEXTUREFORMAT_RED_INTEGER:return _0x572d87.TextureFormat.R32Uint;case _0x354cf8.TEXTUREFORMAT_RG_INTEGER:return _0x572d87.TextureFormat.RG32Uint;case _0x354cf8.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x572d87.TextureFormat.RGBA32Uint}case _0x354cf8.TEXTURETYPE_FLOAT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return _0x572d87.TextureFormat.R32Float;case _0x354cf8.TEXTUREFORMAT_RG:return _0x572d87.TextureFormat.RG32Float;case _0x354cf8.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA:default:return _0x572d87.TextureFormat.RGBA32Float}case _0x354cf8.TEXTURETYPE_HALF_FLOAT:switch(t){case _0x354cf8.TEXTUREFORMAT_RED:return _0x572d87.TextureFormat.R16Float;case _0x354cf8.TEXTUREFORMAT_RG:return _0x572d87.TextureFormat.RG16Float;case _0x354cf8.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case _0x354cf8.TEXTUREFORMAT_RGBA:default:return _0x572d87.TextureFormat.RGBA16Float}case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:throw"TEXTURETYPE_UNSIGNED_SHORT_5_6_5 format not supported in WebGPU";case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:throw"TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV format not supported in WebGPU";case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:throw"TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV format not supported in WebGPU";case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:throw"TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 format not supported in WebGPU";case _0x354cf8.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:throw"TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 format not supported in WebGPU";case _0x354cf8.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(t){case _0x354cf8.TEXTUREFORMAT_RGBA:return _0x572d87.TextureFormat.RGB10A2Unorm;case _0x354cf8.TEXTUREFORMAT_RGBA_INTEGER:throw"TEXTUREFORMAT_RGBA_INTEGER format not supported in WebGPU when type is TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV";default:return _0x572d87.TextureFormat.RGB10A2Unorm}}return i?_0x572d87.TextureFormat.RGBA8UnormSRGB:_0x572d87.TextureFormat.RGBA8Unorm},WebGPUTextureHelper.GetNumChannelsFromWebGPUTextureFormat=function(e){switch(e){case _0x572d87.TextureFormat.R8Unorm:case _0x572d87.TextureFormat.R8Snorm:case _0x572d87.TextureFormat.R8Uint:case _0x572d87.TextureFormat.R8Sint:case _0x572d87.TextureFormat.BC4RUnorm:case _0x572d87.TextureFormat.BC4RSnorm:case _0x572d87.TextureFormat.R16Uint:case _0x572d87.TextureFormat.R16Sint:case _0x572d87.TextureFormat.Depth16Unorm:case _0x572d87.TextureFormat.R16Float:case _0x572d87.TextureFormat.R32Uint:case _0x572d87.TextureFormat.R32Sint:case _0x572d87.TextureFormat.R32Float:case _0x572d87.TextureFormat.Depth32Float:case _0x572d87.TextureFormat.Stencil8:case _0x572d87.TextureFormat.Depth24Plus:case _0x572d87.TextureFormat.EACR11Unorm:case _0x572d87.TextureFormat.EACR11Snorm:return 1;case _0x572d87.TextureFormat.RG8Unorm:case _0x572d87.TextureFormat.RG8Snorm:case _0x572d87.TextureFormat.RG8Uint:case _0x572d87.TextureFormat.RG8Sint:case _0x572d87.TextureFormat.Depth24UnormStencil8:case _0x572d87.TextureFormat.Depth32FloatStencil8:case _0x572d87.TextureFormat.BC5RGUnorm:case _0x572d87.TextureFormat.BC5RGSnorm:case _0x572d87.TextureFormat.RG16Uint:case _0x572d87.TextureFormat.RG16Sint:case _0x572d87.TextureFormat.RG16Float:case _0x572d87.TextureFormat.RG32Uint:case _0x572d87.TextureFormat.RG32Sint:case _0x572d87.TextureFormat.RG32Float:case _0x572d87.TextureFormat.Depth24PlusStencil8:case _0x572d87.TextureFormat.EACRG11Unorm:case _0x572d87.TextureFormat.EACRG11Snorm:return 2;case _0x572d87.TextureFormat.RGB9E5UFloat:case _0x572d87.TextureFormat.RG11B10UFloat:case _0x572d87.TextureFormat.BC6HRGBUFloat:case _0x572d87.TextureFormat.BC6HRGBFloat:case _0x572d87.TextureFormat.ETC2RGB8Unorm:case _0x572d87.TextureFormat.ETC2RGB8UnormSRGB:return 3;case _0x572d87.TextureFormat.RGBA8Unorm:case _0x572d87.TextureFormat.RGBA8UnormSRGB:case _0x572d87.TextureFormat.RGBA8Snorm:case _0x572d87.TextureFormat.RGBA8Uint:case _0x572d87.TextureFormat.RGBA8Sint:case _0x572d87.TextureFormat.BGRA8Unorm:case _0x572d87.TextureFormat.BGRA8UnormSRGB:case _0x572d87.TextureFormat.RGB10A2Unorm:case _0x572d87.TextureFormat.BC7RGBAUnorm:case _0x572d87.TextureFormat.BC7RGBAUnormSRGB:case _0x572d87.TextureFormat.BC3RGBAUnorm:case _0x572d87.TextureFormat.BC3RGBAUnormSRGB:case _0x572d87.TextureFormat.BC2RGBAUnorm:case _0x572d87.TextureFormat.BC2RGBAUnormSRGB:case _0x572d87.TextureFormat.BC1RGBAUnorm:case _0x572d87.TextureFormat.BC1RGBAUnormSRGB:case _0x572d87.TextureFormat.RGBA16Uint:case _0x572d87.TextureFormat.RGBA16Sint:case _0x572d87.TextureFormat.RGBA16Float:case _0x572d87.TextureFormat.RGBA32Uint:case _0x572d87.TextureFormat.RGBA32Sint:case _0x572d87.TextureFormat.RGBA32Float:case _0x572d87.TextureFormat.ETC2RGB8A1Unorm:case _0x572d87.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x572d87.TextureFormat.ETC2RGBA8Unorm:case _0x572d87.TextureFormat.ETC2RGBA8UnormSRGB:case _0x572d87.TextureFormat.ASTC4x4Unorm:case _0x572d87.TextureFormat.ASTC4x4UnormSRGB:case _0x572d87.TextureFormat.ASTC5x4Unorm:case _0x572d87.TextureFormat.ASTC5x4UnormSRGB:case _0x572d87.TextureFormat.ASTC5x5Unorm:case _0x572d87.TextureFormat.ASTC5x5UnormSRGB:case _0x572d87.TextureFormat.ASTC6x5Unorm:case _0x572d87.TextureFormat.ASTC6x5UnormSRGB:case _0x572d87.TextureFormat.ASTC6x6Unorm:case _0x572d87.TextureFormat.ASTC6x6UnormSRGB:case _0x572d87.TextureFormat.ASTC8x5Unorm:case _0x572d87.TextureFormat.ASTC8x5UnormSRGB:case _0x572d87.TextureFormat.ASTC8x6Unorm:case _0x572d87.TextureFormat.ASTC8x6UnormSRGB:case _0x572d87.TextureFormat.ASTC8x8Unorm:case _0x572d87.TextureFormat.ASTC8x8UnormSRGB:case _0x572d87.TextureFormat.ASTC10x5Unorm:case _0x572d87.TextureFormat.ASTC10x5UnormSRGB:case _0x572d87.TextureFormat.ASTC10x6Unorm:case _0x572d87.TextureFormat.ASTC10x6UnormSRGB:case _0x572d87.TextureFormat.ASTC10x8Unorm:case _0x572d87.TextureFormat.ASTC10x8UnormSRGB:case _0x572d87.TextureFormat.ASTC10x10Unorm:case _0x572d87.TextureFormat.ASTC10x10UnormSRGB:case _0x572d87.TextureFormat.ASTC12x10Unorm:case _0x572d87.TextureFormat.ASTC12x10UnormSRGB:case _0x572d87.TextureFormat.ASTC12x12Unorm:case _0x572d87.TextureFormat.ASTC12x12UnormSRGB:return 4}throw"Unknown format ".concat(e,"!")},WebGPUTextureHelper.HasStencilAspect=function(e){switch(e){case _0x572d87.TextureFormat.Stencil8:case _0x572d87.TextureFormat.Depth24UnormStencil8:case _0x572d87.TextureFormat.Depth32FloatStencil8:case _0x572d87.TextureFormat.Depth24PlusStencil8:return!0}return!1},WebGPUTextureHelper.HasDepthAndStencilAspects=function(e){switch(e){case _0x572d87.TextureFormat.Depth24UnormStencil8:case _0x572d87.TextureFormat.Depth32FloatStencil8:case _0x572d87.TextureFormat.Depth24PlusStencil8:return!0}return!1},WebGPUTextureHelper.prototype.copyVideoToTexture=function(e,t,i,n,r){var o,a,s,l;void 0===n&&(n=!1);var u=void 0===r,c=this._getVideoPipeline(i,n?_0x3c651a.InvertY:_0x3c651a.DontInvertY),h=c[0],d=c[1];u&&(r=this._device.createCommandEncoder({})),null===(a=(o=r).pushDebugGroup)||void 0===a||a.call(o,"copy video to texture - invertY=".concat(n));var f={colorAttachments:[{view:t._hardwareTexture.underlyingResource.createView({format:i,dimension:_0x572d87.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:1,aspect:_0x572d87.TextureAspect.All}),loadOp:_0x572d87.LoadOp.Load,storeOp:_0x572d87.StoreOp.Store}]},p=r.beginRenderPass(f),_={layout:d,entries:[{binding:0,resource:this._device.importExternalTexture({source:e.underlyingResource})}]},m=this._device.createBindGroup(_);p.setPipeline(h),p.setBindGroup(0,m),p.draw(4,1,0,0),p.end(),null===(l=(s=r).popDebugGroup)||void 0===l||l.call(s),u&&(this._device.queue.submit([r.finish()]),r=null)},WebGPUTextureHelper.prototype.invertYPreMultiplyAlpha=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){var _,m,g,x,v,y;void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=1),void 0===u&&(u=0),void 0===c&&(c=0),void 0===h&&(h=0),void 0===d&&(d=0);var $,b=0!==h,T=void 0===f,C=this._getPipeline(n,b?_0x90e6c0.InvertYPremultiplyAlphaWithOfst:_0x90e6c0.InvertYPremultiplyAlpha,{invertY:r,premultiplyAlpha:o}),S=C[0],w=C[1];if(a=Math.max(a,0),T&&(f=this._device.createCommandEncoder({})),null===(m=(_=f).pushDebugGroup)||void 0===m||m.call(_,"internal process texture - invertY=".concat(r," premultiplyAlpha=").concat(o)),WebGPUTextureHelper._IsHardwareTexture(e)?($=e.underlyingResource,(!r||o||1!==l||0!==a)&&(e=void 0)):($=e,e=void 0),$){b&&this._bufferManager.setRawData(this._ubCopyWithOfst,0,new Float32Array([u,c,h,d]),0,16);var E=e,P=null!==(g=null==E?void 0:E._copyInvertYTempTexture)&&void 0!==g?g:this.createTexture({width:t,height:i,layers:1},!1,!1,!1,!1,!1,n,1,f,_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.RenderAttachment|_0x572d87.TextureUsage.TextureBinding),A=null!==(x=null==E?void 0:E._copyInvertYRenderPassDescr)&&void 0!==x?x:{colorAttachments:[{view:P.createView({format:n,dimension:_0x572d87.TextureViewDimension.E2d,baseMipLevel:0,mipLevelCount:1,arrayLayerCount:1,baseArrayLayer:0}),loadOp:_0x572d87.LoadOp.Load,storeOp:_0x572d87.StoreOp.Store}]},L=f.beginRenderPass(A),M=b?null==E?void 0:E._copyInvertYBindGroupWithOfst:null==E?void 0:E._copyInvertYBindGroup;if(!M){var R={layout:w,entries:[{binding:0,resource:$.createView({format:n,dimension:_0x572d87.TextureViewDimension.E2d,baseMipLevel:s,mipLevelCount:1,arrayLayerCount:l,baseArrayLayer:a})}]};b&&R.entries.push({binding:1,resource:{buffer:this._ubCopyWithOfst}}),M=this._device.createBindGroup(R)}L.setPipeline(S),L.setBindGroup(0,M),L.draw(4,1,0,0),L.end(),f.copyTextureToTexture({texture:P},{texture:$,mipLevel:s,origin:{x:0,y:0,z:a}},{width:t,height:i,depthOrArrayLayers:1}),E?(E._copyInvertYTempTexture=P,E._copyInvertYRenderPassDescr=A,b?E._copyInvertYBindGroupWithOfst=M:E._copyInvertYBindGroup=M):this._deferredReleaseTextures.push([P,null]),null===(y=(v=f).popDebugGroup)||void 0===y||y.call(v),T&&(this._device.queue.submit([f.finish()]),f=null)}},WebGPUTextureHelper.prototype.copyWithInvertY=function(e,t,i,n){var r,o,a,s,l=void 0===n,u=this._getPipeline(t,_0x90e6c0.InvertYPremultiplyAlpha,{invertY:!0,premultiplyAlpha:!1}),c=u[0],h=u[1];l&&(n=this._device.createCommandEncoder({})),null===(o=(r=n).pushDebugGroup)||void 0===o||o.call(r,"internal copy texture with invertY");var d=n.beginRenderPass(i),f=this._device.createBindGroup({layout:h,entries:[{binding:0,resource:e}]});d.setPipeline(c),d.setBindGroup(0,f),d.draw(4,1,0,0),d.end(),null===(s=(a=n).popDebugGroup)||void 0===s||s.call(a),l&&(this._device.queue.submit([n.finish()]),n=null)},WebGPUTextureHelper.prototype.createTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=_0x572d87.TextureFormat.RGBA8Unorm),void 0===s&&(s=1),void 0===u&&(u=-1),void 0===c&&(c=0),void 0===h&&(h=1),s>1&&(s=4);var d=e.layers||1,f={width:e.width,height:e.height,depthOrArrayLayers:d},p=WebGPUTextureHelper.IsCompressedFormat(a),_=t?WebGPUTextureHelper.ComputeNumMipmapLevels(e.width,e.height):1;h>1&&(_=h);var m=u>=0?u:_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.CopyDst|_0x572d87.TextureUsage.TextureBinding;c|=t&&!p?_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.RenderAttachment:0,!p&&!o&&(c|=_0x572d87.TextureUsage.RenderAttachment|_0x572d87.TextureUsage.CopyDst);var g=this._device.createTexture({size:f,dimension:o?_0x572d87.TextureDimension.E3d:_0x572d87.TextureDimension.E2d,format:a,usage:m|c,sampleCount:s,mipLevelCount:_});return WebGPUTextureHelper.IsImageBitmap(e)&&(this.updateTexture(e,g,e.width,e.height,d,a,0,0,n,r,0,0),t&&i&&this.generateMipmaps(g,a,_,0,l)),g},WebGPUTextureHelper.prototype.createCubeTexture=function(e,t,i,n,r,o,a,s,l,u){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o=_0x572d87.TextureFormat.RGBA8Unorm),void 0===a&&(a=1),void 0===l&&(l=-1),void 0===u&&(u=0),a>1&&(a=4);var c=WebGPUTextureHelper.IsImageBitmapArray(e)?e[0].width:e.width,h=WebGPUTextureHelper.IsImageBitmapArray(e)?e[0].height:e.height,d=WebGPUTextureHelper.IsCompressedFormat(o),f=t?WebGPUTextureHelper.ComputeNumMipmapLevels(c,h):1,p=l>=0?l:_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.CopyDst|_0x572d87.TextureUsage.TextureBinding;u|=t&&!d?_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.RenderAttachment:0,!d&&(u|=_0x572d87.TextureUsage.RenderAttachment|_0x572d87.TextureUsage.CopyDst);var _=this._device.createTexture({size:{width:c,height:h,depthOrArrayLayers:6},dimension:_0x572d87.TextureDimension.E2d,format:o,usage:p|u,sampleCount:a,mipLevelCount:f});return WebGPUTextureHelper.IsImageBitmapArray(e)&&(this.updateCubeTextures(e,_,c,h,o,n,r,0,0),t&&i&&this.generateCubeMipmaps(_,o,f,s)),_},WebGPUTextureHelper.prototype.generateCubeMipmaps=function(e,t,i,n){var r,o,a,s,l=void 0===n;l&&(n=this._device.createCommandEncoder({})),null===(o=(r=n).pushDebugGroup)||void 0===o||o.call(r,"create cube mipmaps - ".concat(i," levels"));for(var u=0;u<6;++u)this.generateMipmaps(e,t,i,u,n);null===(s=(a=n).popDebugGroup)||void 0===s||s.call(a),l&&(this._device.queue.submit([n.finish()]),n=null)},WebGPUTextureHelper.prototype.generateMipmaps=function(e,t,i,n,r){var o,a,s,l,u,c,h,d;void 0===n&&(n=0);var f,p=void 0===r,_=this._getPipeline(t),m=_[0],g=_[1];if(n=Math.max(n,0),p&&(r=this._device.createCommandEncoder({})),null===(a=(o=r).pushDebugGroup)||void 0===a||a.call(o,"create mipmaps for face #".concat(n," - ").concat(i," levels")),WebGPUTextureHelper._IsHardwareTexture(e)?(f=e.underlyingResource,e._mipmapGenRenderPassDescr=e._mipmapGenRenderPassDescr||[],e._mipmapGenBindGroup=e._mipmapGenBindGroup||[]):(f=e,e=void 0),f){for(var x=e,v=1;v<i;++v){var y=null!==(l=null===(s=null==x?void 0:x._mipmapGenRenderPassDescr[n])||void 0===s?void 0:s[v-1])&&void 0!==l?l:{colorAttachments:[{view:f.createView({format:t,dimension:_0x572d87.TextureViewDimension.E2d,baseMipLevel:v,mipLevelCount:1,arrayLayerCount:1,baseArrayLayer:n}),loadOp:_0x572d87.LoadOp.Load,storeOp:_0x572d87.StoreOp.Store}]};x&&(x._mipmapGenRenderPassDescr[n]=x._mipmapGenRenderPassDescr[n]||[],x._mipmapGenRenderPassDescr[n][v-1]=y);var $=r.beginRenderPass(y),b=null!==(c=null===(u=null==x?void 0:x._mipmapGenBindGroup[n])||void 0===u?void 0:u[v-1])&&void 0!==c?c:this._device.createBindGroup({layout:g,entries:[{binding:0,resource:this._mipmapSampler},{binding:1,resource:f.createView({format:t,dimension:_0x572d87.TextureViewDimension.E2d,baseMipLevel:v-1,mipLevelCount:1,arrayLayerCount:1,baseArrayLayer:n})}]});x&&(x._mipmapGenBindGroup[n]=x._mipmapGenBindGroup[n]||[],x._mipmapGenBindGroup[n][v-1]=b),$.setPipeline(m),$.setBindGroup(0,b),$.draw(4,1,0,0),$.end()}null===(d=(h=r).popDebugGroup)||void 0===d||d.call(h),p&&(this._device.queue.submit([r.finish()]),r=null)}},WebGPUTextureHelper.prototype.generateMipmapsByCS=async function(e,t,i,n,r){var o=t._texture._hardwareTexture.underlyingResource,a=this._userEngine;const s=e,l=new _0x2e52cb(a);l.addUniform("srcDimension",1),l.addUniform("texelSize",2);var u=new _0x2e52cb(a);u.addUniform("texelSize",2);var c=s._texture.width,h=s._texture.height,d=new _0x18904c(a,c*h*4*4),f=new _0x18904c(a,c*h*4*4),p=new _0x14f326("texSamplerCS",a,{computeSource:_0x414ed},{bindingsMapping:i?{params:{group:0,binding:0},buffer_out:{group:0,binding:1},oriDepthTexture:{group:0,binding:2},mip0Texture:{group:0,binding:3}}:{params:{group:0,binding:0},buffer_out:{group:0,binding:1},oriTexture:{group:0,binding:2},mip0Texture:{group:0,binding:3}},defines:[i?"_useDepthTexture":""]}),_=new _0x14f326("generateMipCS",a,{computeSource:_0x2a56c6},{bindingsMapping:{params:{group:0,binding:0},buffer_in:{group:0,binding:1},buffer_out:{group:0,binding:2},mipMapsTexture:{group:0,binding:3}},defines:[n?"_isHizDepthTex":""]}),m=p;for(let e=0;e<r;e++){let n=c>>e,p=h>>e;if(e>0&&(m=_),0==e){let e=(1&p)<<1|1&n;l.updateInt("srcDimension",e),l.updateFloat2("texelSize",n,p),l.update(),m.setUniformBuffer("params",l),i?m.setTexture("oriDepthTexture",s,!1):m.setTexture("oriTexture",s,!1),m.setStorageTexture("mip0Texture",t)}else{u.updateFloat2("texelSize",n,p),u.update(),m.setUniformBuffer("params",u);let i=o.createView({format:"rgba8unorm",dimension:_0x572d87.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:e});t._texture._hardwareTexture.viewForWriting=i,m.setStorageTexture("mipMapsTexture",t)}1&e?(m.setStorageBuffer("buffer_in",d),m.setStorageBuffer("buffer_out",f)):(e>0&&m.setStorageBuffer("buffer_in",f),m.setStorageBuffer("buffer_out",d)),await m.dispatchWhenReady(Math.ceil(n/8),Math.ceil(p/8),1),e!=r-1&&a._currentRenderTarget&&a.unBindFramebuffer(a._currentRenderTarget)}d.dispose(),f.dispose(),u.dispose(),l.dispose()},WebGPUTextureHelper.prototype.createGPUTextureForInternalTexture=function(e,t,i,n,r){!e._hardwareTexture&&(e._hardwareTexture=new _0x253af9),void 0===t&&(t=e.width),void 0===i&&(i=e.height),void 0===n&&(n=e.depth);var o=e._hardwareTexture,a=0!=((null!=r?r:0)&_0x354cf8.TEXTURE_CREATIONFLAG_STORAGE);o.format=WebGPUTextureHelper.GetWebGPUTextureFormat(e.type,e.format,e._useSRGBBuffer),o.textureUsages=e._source===InternalTextureSource.RenderTarget||e.source===InternalTextureSource.MultiRenderTarget?_0x572d87.TextureUsage.TextureBinding|_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.RenderAttachment:e._source===InternalTextureSource.DepthStencil?_0x572d87.TextureUsage.TextureBinding|_0x572d87.TextureUsage.RenderAttachment:-1,o.textureAdditionalUsages=a?_0x572d87.TextureUsage.StorageBinding:0;var s,l=e.generateMipMaps,u=n||1;if(s=null!==e._maxLodLevel?e._maxLodLevel:e.mipmapCount>1?e.mipmapCount:l?WebGPUTextureHelper.ComputeNumMipmapLevels(t,i):1,e.isCube){var c=this.createCubeTexture({width:t,height:i},e.generateMipMaps,e.generateMipMaps,e.invertY,!1,o.format,1,this._commandEncoderForCreation,o.textureUsages,o.textureAdditionalUsages);o.set(c),o.createView({format:o.format,dimension:_0x572d87.TextureViewDimension.Cube,mipLevelCount:s,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:6,aspect:WebGPUTextureHelper.HasDepthAndStencilAspects(o.format)?_0x572d87.TextureAspect.DepthOnly:_0x572d87.TextureAspect.All},a)}else{c=this.createTexture({width:t,height:i,layers:u},e.generateMipMaps,e.generateMipMaps,e.invertY,!1,e.is3D,o.format,1,this._commandEncoderForCreation,o.textureUsages,o.textureAdditionalUsages,s);o.set(c);var h=o.format;"depth24plus-stencil8"==h&&(h="depth24plus"),o.createView({format:h,dimension:e.is2DArray?_0x572d87.TextureViewDimension.E2dArray:e.is3D?_0x572d87.TextureDimension.E3d:_0x572d87.TextureViewDimension.E2d,mipLevelCount:s,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:e.is3D?1:u,aspect:WebGPUTextureHelper.HasDepthAndStencilAspects(o.format)?_0x572d87.TextureAspect.DepthOnly:_0x572d87.TextureAspect.All},a)}return e.width=e.baseWidth=t,e.height=e.baseHeight=i,e.depth=e.baseDepth=n,this.createMSAATexture(e,e.samples),o},WebGPUTextureHelper.prototype.createMSAATexture=function(e,t){var i=e._hardwareTexture;if((null==i?void 0:i.msaaTexture)&&(this.releaseTexture(i.msaaTexture),i.msaaTexture=null),i&&!((null!=t?t:1)<=1)){var n=e.width,r=e.height,o=e.depth||1;if(e.isCube){var a=this.createCubeTexture({width:n,height:r},!1,!1,e.invertY,!1,i.format,t,this._commandEncoderForCreation,i.textureUsages,i.textureAdditionalUsages);i.msaaTexture=a}else{a=this.createTexture({width:n,height:r,layers:o},!1,!1,e.invertY,!1,e.is3D,i.format,t,this._commandEncoderForCreation,i.textureUsages,i.textureAdditionalUsages);i.msaaTexture=a}var s=i.format;"depth24plus-stencil8"==s&&(s="depth24plus"),i.createMSAAView({format:s,dimension:e.is2DArray?_0x572d87.TextureViewDimension.E2dArray:e.is3D?_0x572d87.TextureDimension.E3d:_0x572d87.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:e.is3D?1:o,aspect:WebGPUTextureHelper.HasDepthAndStencilAspects(i.format)?_0x572d87.TextureAspect.DepthOnly:_0x572d87.TextureAspect.All})}},WebGPUTextureHelper.prototype.updateCubeTextures=function(e,t,i,n,r,o,a,s,l){void 0===o&&(o=!1),void 0===a&&(a=!1),void 0===s&&(s=0),void 0===l&&(l=0);for(var u=[0,3,1,4,2,5],c=0;c<u.length;++c){var h=e[u[c]];this.updateTexture(h,t,i,n,1,r,c,0,o,a,s,l)}},WebGPUTextureHelper.prototype.updateTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d){void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=!1),void 0===u&&(u=!1),void 0===c&&(c=0),void 0===h&&(h=0);var f=WebGPUTextureHelper._IsInternalTexture(t)?t._hardwareTexture.underlyingResource:t,p=WebGPUTextureHelper._GetBlockInformationFromFormat(o),_=WebGPUTextureHelper._IsInternalTexture(t)?t._hardwareTexture:t,m={texture:f,origin:{x:c,y:h,z:Math.max(a,0)},mipLevel:s,premultipliedAlpha:u},g={width:Math.ceil(i/p.width)*p.width,height:Math.ceil(n/p.height)*p.height,depthOrArrayLayers:r||1};if(void 0!==e.byteLength){e=e;var x=Math.ceil(i/p.width)*p.length,v=256*Math.ceil(x/256)===x;if(o==_0x572d87.TextureFormat.RGBA16Float&&(v=!1),v){var y=this._device.createCommandEncoder({}),$=this._bufferManager.createRawBuffer(e.byteLength,_0x572d87.BufferUsage.MapWrite|_0x572d87.BufferUsage.CopySrc,!0),b=$.getMappedRange();new Uint8Array(b).set(e),$.unmap(),y.copyBufferToTexture({buffer:$,offset:0,bytesPerRow:x,rowsPerImage:n},m,g),this._device.queue.submit([y.finish()]),this._bufferManager.releaseBuffer($)}else this._device.queue.writeTexture(m,e,{offset:0,bytesPerRow:x,rowsPerImage:n},g);if(l||u){if(!WebGPUTextureHelper._IsInternalTexture(t))throw"updateTexture: Can't process the texture data because a GPUTexture was provided instead of an InternalTexture!";var T=0===c&&0===h&&i===t.width&&n===t.height;this.invertYPreMultiplyAlpha(_,t.width,t.height,o,l,u,a,s,r||1,c,h,T?0:i,T?0:n,void 0,d)}}else if(e=e,l)if(m.premultipliedAlpha=!1,WebGPUTextureHelper._IsInternalTexture(t)&&0===c&&0===h&&i===t.width&&n===t.height)this._device.queue.copyExternalImageToTexture({source:e},m,g),this.invertYPreMultiplyAlpha(_,i,n,o,l,u,a,s,r||1,0,0,0,0,void 0,d);else{y=this._device.createCommandEncoder({});var C=this.createTexture({width:i,height:n,layers:1},!1,!1,!1,!1,!1,o,1,y,_0x572d87.TextureUsage.CopySrc|_0x572d87.TextureUsage.TextureBinding);this._deferredReleaseTextures.push([C,null]),g.depthOrArrayLayers=1,this._device.queue.copyExternalImageToTexture({source:e},{texture:C},g),g.depthOrArrayLayers=r||1;this.invertYPreMultiplyAlpha(C,i,n,o,l,u,0,s,r||1,0,0,0,0,y,d),y.copyTextureToTexture({texture:C},m,g),this._device.queue.submit([y.finish()])}else this._device.queue.copyExternalImageToTexture({source:e},m,g)},WebGPUTextureHelper.prototype.readPixels=function(e,t,i,n,r,o,a,s,l,u){void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=null),void 0===u&&(u=!1);var c=WebGPUTextureHelper._GetBlockInformationFromFormat(o),h=Math.ceil(n/c.width)*c.length,d=256*Math.ceil(h/256),f=d*r,p=this._bufferManager.createRawBuffer(f,_0x572d87.BufferUsage.MapRead|_0x572d87.BufferUsage.CopyDst),_=this._device.createCommandEncoder({});return _.copyTextureToBuffer({texture:e,mipLevel:s,origin:{x:t,y:i,z:Math.max(a,0)}},{buffer:p,offset:0,bytesPerRow:d},{width:n,height:r,depthOrArrayLayers:1}),this._device.queue.submit([_.finish()]),this._bufferManager.readDataFromBuffer(p,f,n,r,h,d,WebGPUTextureHelper._GetTextureTypeFromFormat(o),0,l,!0,u)},WebGPUTextureHelper.prototype.releaseTexture=function(e){if(WebGPUTextureHelper._IsInternalTexture(e)){var t=e._hardwareTexture,i=e._irradianceTexture;this._deferredReleaseTextures.push([t,i])}else this._deferredReleaseTextures.push([e,null])},WebGPUTextureHelper.prototype.destroyDeferredTextures=function(){for(var e=0;e<this._deferredReleaseTextures.length;++e){var t=this._deferredReleaseTextures[e],i=t[0],n=t[1];i&&(WebGPUTextureHelper._IsHardwareTexture(i)?i.release():i.destroy()),null==n||n.dispose()}this._deferredReleaseTextures.length=0};var z$V=0;function u$S(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=e.width,n=e.height,r=e.source;e$2b(r)&&(e$2b(i)||(i=u$_(r.videoWidth,r.width)),e$2b(n)||(n=u$_(r.videoHeight,r.height)));var o=u$_(e.pixelFormat,V$10.RGBA),a=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE),s=o,l=V$10.isCompressedFormat(s);this._needGenerateMipmap=u$_(e.generateMipmap,!1);var u=u$_(e.flipY,!0),c=e.context.engine,h=R$$.toPixelFormat(o),d=R$$.toPixelType(a);this._sampler=e$2b(e.sampler)?e.sampler:new e$1P,this._samples=u$_(e.samples,1);var f,p=R$$.toAddressMode(this._sampler.wrapS),_=R$$.toAddressMode(this._sampler.wrapT),m=R$$.toSamplerMode(a,this._sampler),g=null;if(e$2b(r))if(e$2b(r.arrayBufferView)){var x=r.arrayBufferView;!l&&u&&(x=V$10.flipY(x,o,a,i,n)),g=c.createRawTexture(x,i,n,h,this._needGenerateMipmap,!1,m,null,d,0,!1,1,this._samples),this._texture=new _0x5cc035(g),g.wrapU=p,g.wrapV=_}else if(e$2b(r.framebuffer))console.log("defined(source.framebuffer)");else if(H$$(r))u=!1,g=c.createTexture("",!this._needGenerateMipmap,u,null,m,null,null,r,null,s,"",null,null,null,null),this._texture=new _0x5cc035(g),g.wrapU=p,g.wrapV=_;else{var v=this;createImageBitmap(r).then((function(e){g=c.createTexture("",!v._needGenerateMipmap,u,null,m,null,null,e,null,s,"",null,null,null,null),v._texture=new _0x5cc035(g),g.wrapU=p,g.wrapV=_})).catch((e=>{console.log("createImageBitmap")}))}else{if(o==V$10.DEPTH_COMPONENT||o==V$10.DEPTH_COMPONENT16||o==V$10.DEPTH_COMPONENT32F||o==V$10.DEPTH_STENCIL){var y={width:i,height:n},$={generateStencil:o==V$10.DEPTH_STENCIL,bilinearFiltering:!0,isCube:!1,depthTextureFormat:h,samples:this._samples,comparisonFunction:this._sampler._comparisonFunction};g=c.createDepthStencilTexture(y,$),c._textureHelper.createGPUTextureForInternalTexture(g),this._texture=new _0x5cc035(g)}else g=c.createRawTexture(x,i,n,h,this._needGenerateMipmap,u,m,!1,d,0,!1,0,this._samples),this._texture=new _0x5cc035(g);g.wrapU=p,g.wrapV=_}f=l?V$10.compressedTextureSizeInBytes(o,i,n):V$10.textureSizeInBytes(o,a,i,n),this._id=z$V++,this._context=t,this._pixelFormat=o,this._pixelDatatype=a,this._width=i,this._height=n,this._dimensions=new o$1o(i,n),this._size=[i,n],this._mipmapTexture,this._sizeInBytes=f,this._flipY=u,t.memorySize+=f}function H$$(e){return void 0!==e.close}function t$V(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.webgpu?this._inner=new u$S(e):this._inner=new w$U(e)}u$S.fromFramebuffer=function(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context},Object.defineProperties(u$S.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},size:{get:function(){return this._size}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}},thinTexture:{get:function(){return this._texture}},internalTexture:{get:function(){return this._texture._texture}},GPUTexture:{get:function(){return this._texture._texture._hardwareTexture.underlyingResource}}}),u$S.prototype.copyFrom=function(e,t,i){var n=e.width,r=e.height,o=e.arrayBufferView;if(e$2b(o))this._context.engine.updateTextureData(this.internalTexture,o,t,i,n,r);else{var a=this.internalTexture,s=a._hardwareTexture;e instanceof HTMLVideoElement?this._context.engine.updateVideoTexture(a,e,!1):this._context.engine._textureHelper.updateTexture(e,a,n,r,a.depth,s.format,0,0,!0,!1,t,i)}},u$S.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){console.log("TextureGPU.prototype.copyFromFramebuffer")},u$S.prototype.copyFromTexture=function(e,t,i,n,r,o,a){var s=this._context.engine._device,l=this.GPUTexture,u=e._inner.GPUTexture,c=s.createCommandEncoder({});c.copyTextureToTexture({texture:u,origin:{x:n,y:r,z:0}},{texture:l,origin:{x:t,y:i,z:0}},{width:u.width,height:u.height,depthOrArrayLayers:1}),s.queue.submit([c.finish()])},u$S.prototype.generateMipmap=function(e){if(this._needGenerateMipmap&&e$2b(this._texture)){var t=WebGPUTextureHelper.ComputeNumMipmapLevels(this._width,this._height),i=this.GPUTexture;this._context.engine._textureHelper.generateMipmaps(i,i.format,t,0)}else this._needGenerateMipmap=!0},u$S.prototype.generateMipmapTextureByCS=function(){if(e$2b(this.thinTexture)){if(this._context.engine._currentRenderTarget){var e=this;return void this._context.engine._onAfterUnbindFrameBufferObservable.addOnce((function(){e._afterCreate(!1)}))}this._afterCreate(!1)}},u$S.prototype.generateHizDepthTextureByCS=function(){if(e$2b(this.thinTexture)){if(this._context.engine._currentRenderTarget){var e=this;return void this._context.engine._onAfterUnbindFrameBufferObservable.addOnce((function(){e._afterCreate(!0)}))}this._afterCreate(!0)}},u$S.prototype._afterCreate=function(e){var t=WebGPUTextureHelper.ComputeNumMipmapLevels(this._width,this._height),i=this.pixelFormat==V$10.DEPTH_COMPONENT||this.pixelFormat==V$10.DEPTH_STENCIL;let n=this._context.engine.createRawTexture(null,this._width,this._height,_0x354cf8.TEXTUREFORMAT_RGBA,!0,this.internalTexture.invertY,this.internalTexture.samplingMode,!1,0,_0x354cf8.TEXTURE_CREATIONFLAG_STORAGE,!1,t,this.internalTexture.samples);this._mipmapTexture=new _0x5cc035(n),this._context.engine._textureHelper.generateMipmapsByCS(this._texture,this._mipmapTexture,i,e,t)},u$S.prototype.isDestroyed=function(){return!1},u$S.prototype.destroy=function(){return this._context.memorySize-=this._sizeInBytes,this._texture.dispose(),i$10(this)},t$V.create=function(e){return new t$V(e)},t$V.fromFramebuffer=function(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=t._gl,n=u$_(e.pixelFormat,V$10.RGB),r=u$_(e.framebufferXOffset,0),o=u$_(e.framebufferYOffset,0),a=u$_(e.width,i.drawingBufferWidth),s=u$_(e.height,i.drawingBufferHeight),l=e.framebuffer;if(!V$10.validate(n))throw new t$16("Invalid pixelFormat.");if(V$10.isDepthFormat(n)||V$10.isCompressedFormat(n))throw new t$16("pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.");if(o$1q.defined("options.context",e.context),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",r,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",o,0),r+a>i.drawingBufferWidth)throw new t$16("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(o+s>i.drawingBufferHeight)throw new t$16("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new t$V({context:t,width:a,height:s,pixelFormat:n,source:{framebuffer:e$2b(l)?l:t.defaultFramebuffer,xOffset:r,yOffset:o,width:a,height:s}})},Object.defineProperties(t$V.prototype,{id:{set:function(e){this._inner.id=e},get:function(){return this._inner.id}},sampler:{get:function(){return this._inner.sampler},set:function(e){this._inner.sampler=e}},pixelFormat:{get:function(){return this._inner.pixelFormat}},pixelDatatype:{get:function(){return this._inner.pixelDatatype}},dimensions:{get:function(){return this._inner.dimensions}},size:{get:function(){return this._inner.size}},preMultiplyAlpha:{get:function(){return this._inner.preMultiplyAlpha}},flipY:{get:function(){return this._inner.flipY}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},_target:{get:function(){return this._inner._target}},_texture:{get:function(){return this._inner._texture}}}),t$V.prototype.copyFrom=function(e,t,i){this._inner.copyFrom(e,t,i)},t$V.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){this._inner.copyFromFramebuffer(e,t,i,n,r,o)},t$V.prototype.copyFromTexture=function(e,t,i,n,r,o,a){this._inner.copyFromTexture(e,t,i,n,r,o,a)},t$V.prototype.generateMipmap=function(e){this._inner.generateMipmap(e)},t$V.prototype.isDestroyed=function(){return!1},t$V.prototype.destroy=function(){return this._inner.destroy(),i$10(this)};var E$15={NORMAL:0,REFLECT:1,DEPTH:2,NORMAL_AND_DEPTH:3,POSTEFFECT_FILTER:4,RASTER:5,CLAMP:6,PICKRECT:7,SQRESULT:8},Qe$c=Object.freeze(E$15),E$14={RGBA4:de$x.RGBA4,RGBA8:de$x.RGBA8,RGBA16F:de$x.RGBA16F,RGBA32F:de$x.RGBA32F,RGB5_A1:de$x.RGB5_A1,RGB565:de$x.RGB565,DEPTH_COMPONENT16:de$x.DEPTH_COMPONENT16,STENCIL_INDEX8:de$x.STENCIL_INDEX8,DEPTH_STENCIL:de$x.DEPTH_STENCIL,DEPTH24_STENCIL8:de$x.DEPTH24_STENCIL8,validate:function(e){return e===E$14.RGBA4||e===E$14.RGBA8||e===E$14.RGBA16F||e===E$14.RGBA32F||e===E$14.RGB5_A1||e===E$14.RGB565||e===E$14.DEPTH_COMPONENT16||e===E$14.STENCIL_INDEX8||e===E$14.DEPTH_STENCIL||e===E$14.DEPTH24_STENCIL8},getColorFormat:function(e){return e===de$x.FLOAT?E$14.RGBA32F:e===de$x.HALF_FLOAT_OES?E$14.RGBA16F:E$14.RGBA8}},M$13=Object.freeze(E$14);function o$19(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=t._gl,n=e$1T.maximumRenderbufferSize,r=u$_(e.format,M$13.RGBA4),o=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE),a=e$2b(e.width)?e.width:i.drawingBufferWidth,s=e$2b(e.height)?e.height:i.drawingBufferHeight,l=!1,u=u$_(e.samples,0);u>0&&t.webgl2&&(l=!0);var c=G$19(t,r,o);if(!M$13.validate(r))throw new t$16("Invalid format.");if(o$1q.typeOf.number.greaterThan("width",a,0),a>n)throw new t$16("Width must be less than or equal to the maximum renderbuffer size ("+n+"). Check maximumRenderbufferSize.");if(o$1q.typeOf.number.greaterThan("height",s,0),s>n)throw new t$16("Height must be less than or equal to the maximum renderbuffer size ("+n+"). Check maximumRenderbufferSize.");this._gl=i,this._format=r,this._width=a,this._height=s,this._renderbuffer=this._gl.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,this._renderbuffer),l?i.renderbufferStorageMultisample(i.RENDERBUFFER,u,c,a,s):i.renderbufferStorage(i.RENDERBUFFER,c,a,s),i.bindRenderbuffer(i.RENDERBUFFER,null)}function G$19(e,t,i){if(!e.webgl2)return t;var n=t;return t===de$x.RED&&(i===de$x.FLOAT&&(n=de$x.R32F),i===de$x.HALF_FLOAT&&(n=de$x.R16F),i===de$x.UNSIGNED_BYTE&&(n=de$x.R8)),t===de$x.RGB&&(i===de$x.FLOAT&&(n=de$x.RGB32F),i===de$x.HALF_FLOAT&&(n=de$x.RGB16F),i===de$x.UNSIGNED_BYTE&&(n=de$x.RGB8)),t===de$x.RGBA&&(i===de$x.FLOAT&&(n=de$x.RGBA32F),i===de$x.HALF_FLOAT&&(n=de$x.RGBA16F),i===de$x.UNSIGNED_BYTE&&(n=de$x.RGBA8)),n===de$x.R16F||n===de$x.R32F||n===de$x.RGBA16F||n===de$x.RGBA32F?e.colorBufferFloat:(n===de$x.RGB16F||n===de$x.RGB32F)&&console.warn("WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),n===de$x.DEPTH_STENCIL?n=de$x.DEPTH24_STENCIL8:n===de$x.DEPTH_COMPONENT&&(i===de$x.UNSIGNED_SHORT?n=de$x.DEPTH_COMPONENT16:i===de$x.UNSIGNED_INT&&(n=de$x.DEPTH_COMPONENT24)),n}function r$10(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=e$1T.maximumRenderbufferSize,n=u$_(e.format,M$13.RGBA4);u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE);var r=e$2b(e.width)?e.width:t.drawingBufferWidth,o=e$2b(e.height)?e.height:t.drawingBufferHeight;if(u$_(e.samples,0)>0&&t.webgl2,!M$13.validate(n))throw new t$16("Invalid format.");if(o$1q.typeOf.number.greaterThan("width",r,0),r>i)throw new t$16("Width must be less than or equal to the maximum renderbuffer size ("+i+"). Check maximumRenderbufferSize.");if(o$1q.typeOf.number.greaterThan("height",o,0),o>i)throw new t$16("Height must be less than or equal to the maximum renderbuffer size ("+i+"). Check maximumRenderbufferSize.");this._format=n,this._width=r,this._height=o}function r$$(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.webgpu?this._inner=new r$10(e):this._inner=new o$19(e)}Object.defineProperties(o$19.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),o$19.prototype._getRenderbuffer=function(){return this._renderbuffer},o$19.prototype.isDestroyed=function(){return!1},o$19.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),i$10(this)},Object.defineProperties(r$10.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),r$10.prototype._getRenderbuffer=function(){return null},r$10.prototype.isDestroyed=function(){return!1},r$10.prototype.destroy=function(){return i$10(this)},Object.defineProperties(r$$.prototype,{format:{get:function(){return this._inner.format}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}}}),r$$.prototype._getRenderbuffer=function(){return this._inner._getRenderbuffer()},r$$.prototype.isDestroyed=function(){return!1},r$$.prototype.destroy=function(){return this._inner.destroy(),i$10(this)};var v$O="uniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = czm_packDepth(texture2D(u_depthTexture, v_textureCoordinates).r);\n}\n",C$14="varying v_textureCoordinates : vec2<f32>;\nvar u_depthTexture : texture_depth_2d;\nvar u_depthTextureSampler : sampler;\nfn packDepth(depth : f32) -> vec4<f32> {\n var enc : vec4<f32> = (vec4<f32>(1.0, 255.0, 65025.0, 16581375.0) * depth);\n enc = fract(enc);\n enc = (enc - (vec4<f32>(enc.y, enc.z, enc.w, enc.w) * vec4<f32>(0.003921569, 0.003921569, 0.003921569, 0.0)));\n return enc;\n}\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n gl_FragColor = packDepth(textureSample(u_depthTexture, u_depthTextureSampler, v_textureCoordinates));\n}\n";function s$T(e){this._depthTexture=void 0,this._framebuffer=void 0,this._copyDepthCommand=void 0,this._viewport=new f$18,this._rs=void 0,this._passState=new n$Z(e),this._passState.viewport=this._viewport,this._context=e,this._isUpdate=!1,this._beginFunc=void 0,this._endFunc=void 0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!1,isUnderGlobeVisible:!1},this._depthTextureToCopy=void 0,this._manualDepth=!0;var t=new n$Z(e);t.blendingEnabled=!1,t.viewport=new f$18,this._passState=t}function S$S(e,t,i,n,r){(!e$2b(e._framebuffer)||e.width!==n||e.height!==r)&&(e.width=n,e.height=r,e._depthTexture=e._depthTexture&&e._depthTexture.destroy(),e._depthTexture=new t$V({context:t,width:n,height:r,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._framebuffer=new t$W({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1}),t.depthTexture||(e._depthTextureCopyFrom=e._depthTextureCopyFrom&&e._depthTextureCopyFrom.destroy(),e._depthTextureCopyFrom=new t$V({context:t,width:n,height:r,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),e._framebufferCopyFrom=e._framebufferCopyFrom&&e._framebufferCopyFrom.destroy(),e._framebufferCopyFrom=new t$W({context:t,colorTextures:[e._depthTextureCopyFrom],depthStencilRenderbuffer:new r$$({context:t,width:n,height:r,format:M$13.DEPTH_STENCIL}),destroyAttachments:!1})))}function P$10(e,t,i,n){if(e._viewport.width=i,e._viewport.height=n,(!e$2b(e._rs)||!f$18.equals(e._viewport,e._rs.viewport))&&(e._rs=d$1m.fromCache({viewport:e._viewport})),t.depthTexture)e$2b(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(t.webgpu?C$14:v$O,{shaderProgramName:"depthFramebufferCopyDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e._depthTextureToCopy}},owner:e}));else{e._copyDepthCommand=t.createViewportQuadCommand("uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",{renderState:d$1m.fromCache(),uniformMap:{u_texture:function(){return e._depthTextureToCopy}},owner:e})}e$2b(e._clearCommand)||(e._clearCommand=new t$X({color:new e$1U(0,0,0,0),stencil:0,owner:e})),e._copyDepthCommand.renderState=e._rs,e._clearCommand.framebuffer=e._framebuffer,e._copyDepthCommand.framebuffer=e._framebuffer}Object.defineProperties(s$T.prototype,{framebuffer:{get:function(){return this._framebuffer}},depthTexture:{get:function(){return this._depthTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isManualDepth:{get:function(){return this._manualDepth},set:function(e){this._manualDepth!==e&&(this._manualDepth=e,this._isUpdate=!0)}},useType:{get:function(){return 1},set:function(e){}},frameBufferType:{get:function(){return Qe$c.DEPTH}}}),s$T.prototype.begin=function(e){var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._passState.viewport.width=i,this._passState.viewport.height=n,S$S(this,t,e,i,n),P$10(this,t,i,n),this._beginFunc&&this._beginFunc(e),t.depthTexture||(e.passes.depth=!0,e.passes.pick=!0,this._passState.framebuffer=this._framebufferCopyFrom),this._passState},s$T.prototype.end=function(e){e.context.depthTexture||(e.passes.depth=!1,e.passes.pick=!1),this._endFunc&&this._endFunc(e)},s$T.prototype.update=function(e,t,i){this._depthTextureToCopy=e.depthTexture?i.depthStencilTexture:this._depthTextureCopyFrom,e$2b(this._clearCommand)&&this._clearCommand.execute(e,t),e$2b(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t)},s$T.prototype.destroy=function(){return this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._depthTextureCopyFrom=this._depthTextureCopyFrom&&this._depthTextureCopyFrom.destroy(),this._framebufferCopyFrom=this._framebufferCopyFrom&&this._framebufferCopyFrom.destroy(),e$2b(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),this._depthTextureToCopy=void 0,i$10(this)},s$T.prototype.isDestroyed=function(){return!1};var e$1O={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3,getMorphTime:function(e){return e===e$1O.SCENE3D?1:e===e$1O.MORPHING?void 0:0}},C$13=Object.freeze(e$1O);function p$_(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.url",e.url);var t=e.url,i=e.responseType,n=u$_(e.method,"GET"),r=e.data,o=e.headers,a=e.overrideMimeType;t=u$_(t,e.url);var s=e$2b(e.request)?e.request:new r$1b;return s.url=t,s.requestFunction=function(e){var l=o$1l.defer(),u=p$_.load(u$_(e,t),i,n,r,o,l,a);return e$2b(u)&&e$2b(u.abort)&&(s.cancelFunction=function(){u.abort()}),l.promise},r$1a.request(s)}var j$15=/^data:(.*?)(;base64)?,(.*)$/;function h$10(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function b$1a(e,t){for(var i=h$10(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return n}function C$12(e,t){t=u$_(t,"");var i=e[1],n=!!e[2],r=e[3];switch(t){case"":case"text":return h$10(n,r);case"arraybuffer":return b$1a(n,r);case"blob":var o=b$1a(n,r);return new Blob([o],{type:i});case"document":return(new DOMParser).parseFromString(h$10(n,r),i);case"json":return JSON.parse(h$10(n,r));default:throw new t$16("Unhandled responseType: "+t)}}function u$R(e,t,i){return p$_({url:e,headers:t,request:i})}p$_.load=function(e,t,i,n,r,o,a){var s=j$15.exec(e);if(null===s){var l=new XMLHttpRequest;if(u$X.contains(e)&&(l.withCredentials=!0),e$2b(a)&&e$2b(l.overrideMimeType)&&l.overrideMimeType(a),l.open(i,e,!0),e$2b(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);e$2b(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,i=l.responseType;if(!e$2b(e)||e$2b(t)&&i!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===i||"document"===i)&&e$2b(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==i&&"text"!==i||!e$2b(l.responseText)?o.reject(new t$14("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new s$_(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new s$_)},l.send(n),l}o.resolve(C$12(s,t))},p$_.defaultLoad=p$_.load;var i$X={Accept:"application/json,*/*;q=0.01"};function u$Q(e,t,i){if(!e$2b(e))throw new t$16("url is required.");e$2b(t)?e$2b(t.Accept)||((t=l$1g(t)).Accept=i$X.Accept):t=i$X;var n=u$R(e,t,i);if(e$2b(n))return n.then((function(e){return JSON.parse(e)}))}var ISERVER_BASIC=!1;function LicenseChecker(){this.urlMap=Object.create(null)}LicenseChecker.functionMap=Object.freeze({ViewShed3D:"可视域分析",SpatialQuery3D:"空间查询",ShadowQueryPoints:"阴影分析",Sightline:"通视分析",Skyline:"天际线分析",ViewDome:"开敞度分析",DirectionalLight:"平行光源",ParticleSystem:"粒子系统",Profile:"剖面分析",SpotLight:"聚光源",PointLight:"点光源",Scene_bloomEffect:"泛光",Scene_hdrEnabled:"HDR开关",Scene_scanEffect:"扫描线",Scene_addLightSource:"添加光源",S3MTilesLayer_hypsometricSetting:"分层设色",DynamicLayer3D:"动态图层",Globe_SlopeSetting:"地形坡度坡向",Globe_setPBRMaterial:"地形PBR材质",CloudBox:"云层",SkyBox:"天空盒",S3MTilesLayer_setPBRMaterial:"PBR材质",ProjectionImage:"视频投放"}),LicenseChecker.prototype.getLicense=function(e){var t,i=o$1l.defer();if(!e$2b(e)||0===e.length)return i.resolve(null),i.promise;if(t=-1!==(e=new URL(e)).href.indexOf("/iserver")?e.href.substring(0,e.href.indexOf("/iserver")+8):e.origin,e$2b(this.urlMap[t]))return i.resolve(this.urlMap[t]),i.promise;var n=this;return u$Q(t+"/manager/license.json").then((function(t){n.urlMap[e]=t,i.resolve(t)})).otherwise((function(){i.reject(null)})),i.promise},LicenseChecker.prototype.check=function(e){e$2b(e)&&(!0!==e.iServerBasic&&!0!==e.iServerBasicSpace||(e$2b(e.productType)?"iServerBasic"===e.productType&&(ISERVER_BASIC=!0):ISERVER_BASIC=!0))},LicenseChecker.prototype.isBasciServer=function(){return ISERVER_BASIC},LicenseChecker.prototype.verify=function(e){if(ISERVER_BASIC)throw e="iServerBasic版本,"+LicenseChecker.functionMap[e]+"不可用",console.warn(e),new t$16(e)},LicenseChecker.LICENSECHECKER=new LicenseChecker;var _0x539d2f=(_0x2bbcef=!0,function(e,t){var i=_0x2bbcef?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2bbcef=!1,i}),_0x362660=_0x539d2f(void 0,(function(){return _0x362660.toString().search("(((.+)+)+)+$").toString().constructor(_0x362660).search("(((.+)+)+)+$")})),_0x2bbcef;function _0x15862b(e){if(!e$2b(e))throw new t$16("scene are required.");if(!e.context.depthTexture)throw new t$16("the depth buffer is not supported.");this._scene=e,this._depthBuffer=void 0,this._depthDownBuffer=void 0,this._depthDownReverBuffer=void 0,this._depthLeftBuffer=void 0,this._depthLeftReverBuffer=void 0,this._depthTopBuffer=void 0,this._depthValue=void 0,this._dataBuffer=void 0,this._frameState=void 0,this._textureWidth=1024,this._textureHeight=1024,this._startPoint3D=[0,0,0],this._endPoint3D=[0,0,0],this._extendHeight=0,this._bManualChangeExtendHeight=!1,this._v3ProfileDir=new o$1p(0,0,0),this._v3MiddlePosition=new o$1p(0,0,0),this._v3ProfileNormal=new o$1p(0,0,0),this._viewMatrix=new p$1d,this._projMatrix=new p$1d,this._update=!0,this._visibleViewport=4095,this._id=0,this._name="",this._downName="",this._downReverName="",this._leftName="",this._leftReverName="",this._topName="",this._func=void 0,this._isGetPositions=!1,this._positions=[]}function _0x3e8607(e,t,i){var n=i.camera._projection,r=.5*(e.startPoint[2]+e.endPoint[2]),o=new o$1p;if(o.x=.5*(e.endPoint[0]-e.startPoint[0])+e.startPoint[0],o.y=.5*(e.endPoint[1]-e.startPoint[1])+e.startPoint[1],o.z=r,e._scene.mode===C$13.SCENE3D){var a=o$1p.fromDegreesArrayHeights([e.startPoint[0],e.startPoint[1],r])[0],s=o$1p.fromDegreesArrayHeights([e.endPoint[0],e.endPoint[1],r])[0];o$1p.subtract(s,a,e._v3ProfileDir),e._v3MiddlePosition=o$1p.fromDegreesArrayHeights([o.x,o.y,r])[0];var l=new o$1p;e._v3MiddlePosition.clone(l),o$1p.normalize(l,l)}else{a=n.project(a$18.fromDegrees(e.startPoint[0],e.startPoint[1],e.startPoint[2]),new o$1p),s=n.project(a$18.fromDegrees(e.endPoint[0],e.endPoint[1],e.startPoint[2]),new o$1p);o$1p.subtract(s,a,e._v3ProfileDir);var u=a$18.fromDegrees(o.x,o.y,r);e._v3MiddlePosition=n.project(u,new o$1p),e._oriPos=n.project(a$18.fromDegrees(o.x,o.y,-6378137),new o$1p);l=new o$1p;o$1p.subtract(e._v3MiddlePosition,e._oriPos,l),o$1p.normalize(l,l)}var c=new o$1p;e._v3ProfileDir.clone(c),o$1p.normalize(c,c),o$1p.cross(c,l,e._v3ProfileNormal),o$1p.normalize(e._v3ProfileNormal,e._v3ProfileNormal)}function _0x360f2b(e,t,i){e._textureWidth=t.drawingBufferWidth,e._textureHeight=t.drawingBufferHeight,e._textureWidth=e._textureWidth<=1?1:e._textureWidth,e._textureHeight=e._textureHeight<=1?1:e._textureHeight;var n=e._textureWidth*e._textureHeight;e._depthValue=new Float32Array(n),e._dataBuffer=new Uint8Array(4*n);for(var r=0;r<n;r++)e._depthValue[r]=1,e._dataBuffer[4*r]=0,e._dataBuffer[4*r+1]=0,e._dataBuffer[4*r+2]=0,e._dataBuffer[4*r+3]=255}function _0x3fd0dd(e,t){var i=t.depthData,n=t.viewProjection,r=t.invViewProjection;p$1d.multiply(e._projMatrix,e._viewMatrix,n);for(var o=new e$29,a=new e$29(1,1/255,1/65025,1/160581375),s=t.currentFrustum.x,l=t.currentFrustum.y,u=0;u<e._textureHeight;u++)for(var c=0;c<e._textureWidth;c++){var h=u*e._textureWidth+c,d=e$29.unpack(i,4*h,o);e$29.divideByScalar(d,255,d);var f=e$29.dot(d,a);if(!(f<=0)){if(e._scene.frameState.useLogDepth){var p=f*t.log2FarDepthFromNearPlusOne;f=l*(1-s/(Math.pow(2,p)-1+s))/(l-s)}o.x=c/e._textureWidth*2-1,o.y=u/e._textureHeight*2-1,t.useWebGPU?o.z=f:o.z=2*f-1,o.w=1,p$1d.multiplyByVector(r,o,o),e$29.divideByScalar(o,o.w,o);var _=new o$1p(o.x,o.y,o.z);p$1d.multiplyByVector(n,o,o),e$29.divideByScalar(o,o.w,o),o.x=.5*o.x+.5,o.y=.5*o.y+.5;var m=Math.round(o.x*e._textureWidth),g=Math.round(o.y*e._textureHeight);if(m>=0&&m<e._textureWidth&&g>=0&&g<e._textureHeight){var x=o.z;if(x<=1&&x>=-1){var v=m+(e._textureHeight-g)*e._textureWidth;e._dataBuffer[4*v]=0,e._dataBuffer[4*v+1]=255,e._dataBuffer[4*v+2]=255,e._dataBuffer[4*v+3]=255;var y=e._depthValue[v];e._depthValue[v]=x<y?x:y,e._isGetPositions&&e._positions.push(_)}}}}}function _0x5aa7e4(e){for(var t=1;t<e._textureHeight-1;t++)for(var i=1;i<e._textureWidth-1;i++){var n=t*e._textureWidth+i,r=e._dataBuffer[4*n+1],o=e._dataBuffer[4*(n-e._textureWidth)+1],a=e._dataBuffer[4*(n+e._textureWidth)+1],s=e._dataBuffer[4*(n-e._textureWidth-1)+1],l=e._dataBuffer[4*(n+e._textureWidth+1)+1],u=e._dataBuffer[4*(n-e._textureWidth+1)+1],c=e._dataBuffer[4*(n+e._textureWidth-1)+1],h=e._dataBuffer[4*(n-1)+1],d=e._dataBuffer[4*(n+1)+1];if(0==r&&(255==o&&255==a||255==s&&255==l||255==u&&255==c||255==h&&255==d)){e._dataBuffer[4*n]=0,e._dataBuffer[4*n+1]=255,e._dataBuffer[4*n+2]=255,e._dataBuffer[4*n+3]=255;for(var f=-1;f<=1;f++)for(var p=-1;p<=1;p++)n+f*e._textureWidth+p>0&&(e._dataBuffer[4*(n+f*e._textureWidth+p)]=0,e._dataBuffer[4*(n+f*e._textureWidth+p)+1]=255,e._dataBuffer[4*(n+f*e._textureWidth+p)+2]=255,e._dataBuffer[4*(n+f*e._textureWidth+p)+3]=255)}}for(t=1;t<e._textureHeight-1;t++)for(i=1;i<e._textureWidth-1;i++){n=t*e._textureWidth+i,r=e._dataBuffer[4*n+1],o=e._dataBuffer[4*(n-e._textureWidth)+1],a=e._dataBuffer[4*(n+e._textureWidth)+1],s=e._dataBuffer[4*(n-e._textureWidth-1)+1],l=e._dataBuffer[4*(n+e._textureWidth+1)+1],u=e._dataBuffer[4*(n-e._textureWidth+1)+1],c=e._dataBuffer[4*(n+e._textureWidth-1)+1],h=e._dataBuffer[4*(n-1)+1],d=e._dataBuffer[4*(n+1)+1];if(r<255){var _=(u+l+s+c)/9+(o+h+d+a)/9+r/9;_=Math.round(_),e._dataBuffer[4*n]=0,e._dataBuffer[4*n+1]=_,e._dataBuffer[4*n+2]=_,e._dataBuffer[4*n+3]=255}}}function _0x1cdd7a(e,t,i,n){var r=e._scene,o=45*e$2a.RADIANS_PER_DEGREE,a=.5*o$1p.magnitude(e._v3ProfileDir),s=e._extendHeight,l=new o$1p;e._v3ProfileNormal.clone(l),o$1p.multiplyByScalar(l,a,l);var u=new o$1p;if(t.downOblique&&!t.leftOblique)o$1p.UNIT_Z.clone(u),t.secondDrawing?o$1p.subtract(e._v3MiddlePosition,l,u):o$1p.add(e._v3MiddlePosition,l,u),_0x33d940(e,u,u),o$1p.multiplyByScalar(u,a*Math.tan(o),u),o$1p.add(l,u,u),t.secondDrawing&&o$1p.negate(u,u);else if(t.leftOblique&&!t.downOblique)e._v3ProfileDir.clone(u),o$1p.normalize(u,u),o$1p.multiplyByScalar(u,a*Math.tan(o),u),o$1p.add(l,u,u),t.secondDrawing||o$1p.negate(u,u);else if(t.leftOblique||t.downOblique){var c=new o$1p;_0x33d940(e,e._v3MiddlePosition,c),o$1p.multiplyByScalar(c,.5*s,u)}else l.clone(u);var h=new o$1p;o$1p.add(e._v3MiddlePosition,u,h);var d=new o$1p;o$1p.subtract(e._v3MiddlePosition,h,d);var f=o$1p.magnitude(d),p=f-t.cameraWidth,_=f+t.cameraWidth;o$1p.normalize(d,d);var m=d.clone(),g=new o$1p;e._v3ProfileDir.clone(g),o$1p.negate(g,g);var x=new o$1p;o$1p.cross(m,g,x),x=o$1p.normalize(x,x),t.downOblique&&t.leftOblique&&(p=.5,_=s),p=p<.5?.5:p;var v=n.camera,y=v.frustum.near,$=v.frustum.far,b=v.frustum.fov,T=new o$1p,C=v.heading,S=v.pitch,w=v.frustum.aspectRatio,E=[],P=r.globe.showSkirts,A=r.globe.backFaceCulling;o$1p.clone(v.position,T),t.depthBuffer.isUpdate=!0,t.depthBuffer._beginFunc=function(){if((e._textureWidth!=i.drawingBufferWidth||e._textureHeight!=i.drawingBufferHeight)&&_0x360f2b(e,i),y=v.frustum.near,$=v.frustum.far,b=v.frustum.fov,C=v.heading,S=v.pitch,w=v.frustum.aspectRatio,o$1p.clone(v.position,T),v.frustum.near=p,v.frustum.far=_,v.frustum.fov=90*e$2a.RADIANS_PER_DEGREE,v.frustum.aspectRatio=e._textureWidth/e._textureHeight,v.setView({destination:h,orientation:{direction:m,up:x},convert:!1}),!t.downOblique&&!t.leftOblique){var n=i.relativeOrigin,o=new o$1p;o$1p.subtract(v.positionWC,n,o);var a=new p$1d;p$1d.clone(v.inverseViewMatrix,a),p$1d.setTranslation(a,o,a),p$1d.inverse(a,e._viewMatrix),p$1d.clone(v.frustum.projectionMatrix,e._projMatrix)}for(var s=0;s<r.layers._layerQueue.length;s++){var l=r.layers._layerQueue[s];E[s]=l.clipLineColor,l.clipLineColor=new e$1U(1,1,1,1),l.setCustomClipBox(t.clipOptions)}r.globe.showSkirts=!1,r.globe.backFaceCulling=!1,r.globe.setCustomClipBox(t.clipOptions)},t.depthBuffer._endFunc=function(){if(t.downOblique||t.leftOblique){var n=i.uniformState,o=p$1d.clone(n.inverseViewProjection),a=p$1d.clone(n.viewProjection),s=o$1o.clone(n.currentFrustum),l=n.log2FarDepthFromNearPlusOne;i.readPixelsAsync({framebuffer:t.depthBuffer.framebuffer}).then((n=>{var r={invViewProjection:o,viewProjection:a,currentFrustum:s,log2FarDepthFromNearPlusOne:l,depthData:n,useWebGPU:i.webgpu};_0x3fd0dd(e,r),t.leftOblique&&t.downOblique&&(_0x5aa7e4(e),!e._isGetPositions&&e._func(e._dataBuffer),e._isGetPositions&&e._getPositionsFunc(e._positions))}))}v.setView({destination:T,orientation:{heading:C,pitch:S,roll:v.roll},convert:!1}),v.frustum.near=y,v.frustum.far=$,v.frustum.fov=b,v.frustum.aspectRatio=w,t.depthBuffer.isUpdate=!1;for(var u=0;u<r.layers._layerQueue.length;u++){var c=r.layers._layerQueue[u];c.clipLineColor=E[u],c.clearCustomClipBox()}r.globe.clearCustomClipBox(),r.globe.showSkirts=P,r.globe.backFaceCulling=A}}function _0x33d940(e,t,i){return e._scene.mode===C$13.SCENE3D?o$1p.normalize(t,i):(o$1p.subtract(t,e._oriPos,i),o$1p.normalize(i,i)),i}function _0x3d3ee2(e){var t=e.x;e.x=e.z,e.z=e.y,e.y=t}function _0x4deca3(e,t,i){_0x3e8607(e,t,i),_0x360f2b(e,t);var n=o$1p.magnitude(e._v3ProfileDir);e._bManualChangeExtendHeight||(e._extendHeight=n);var r=e._extendHeight,o=Math.sqrt(2),a=n/e._textureWidth*o;a<.1&&(a=.1);var s=new o$1p;s.x=.5*(e.startPoint[0]+e.endPoint[0]),s.y=.5*(e.startPoint[1]+e.endPoint[1]),s.z=.5*(e.startPoint[2]+e.endPoint[2]);var l=[],u=[],c=new o$1p,h=e._v3ProfileNormal.clone(),d=o$1p.negate(h,new o$1p);u.push(d),o$1p.multiplyByScalar(e._v3ProfileNormal,a,c),o$1p.add(e._v3MiddlePosition,c,c),o$1p.subtract(c,t._relativeOrigin,c),l.push(c);var f=e._v3ProfileNormal.clone();f=o$1p.negate(f,f),d=o$1p.negate(f,new o$1p),u.push(d);var p=new o$1p;o$1p.multiplyByScalar(f,a,p),o$1p.add(e._v3MiddlePosition,p,p),o$1p.subtract(p,t._relativeOrigin,p),l.push(p),e._scene.mode!==C$13.SCENE3D&&(_0x3d3ee2(h),_0x3d3ee2(f),_0x3d3ee2(c),_0x3d3ee2(p));var _={planePos:l,planeNormal:u,clipMode:"clip_behind_any_plane"};_0x1cdd7a(e,{downOblique:!1,leftOblique:!1,secondDrawing:!1,cameraWidth:10*a,depthBuffer:e._depthBuffer,clipOptions:_},t,i);var m=(a+.5*r)/o;_0x1cdd7a(e,{downOblique:!0,leftOblique:!1,secondDrawing:!1,cameraWidth:m,depthBuffer:e._depthDownBuffer,clipOptions:_},t,i),_0x1cdd7a(e,{downOblique:!0,leftOblique:!1,secondDrawing:!0,cameraWidth:m,depthBuffer:e._depthDownReverBuffer,clipOptions:_},t,i),_0x1cdd7a(e,{downOblique:!1,leftOblique:!0,secondDrawing:!1,cameraWidth:m=(a+.5*n)/o,depthBuffer:e._depthLeftBuffer,clipOptions:_},t,i),_0x1cdd7a(e,{downOblique:!1,leftOblique:!0,secondDrawing:!0,cameraWidth:m,depthBuffer:e._depthLeftReverBuffer,clipOptions:_},t,i),_0x1cdd7a(e,{downOblique:!0,leftOblique:!0,secondDrawing:!1,cameraWidth:a,depthBuffer:e._depthTopBuffer,clipOptions:_},t,i)}function e$1N(){this._array=[],this._hash={}}function f$X(){this._bounds=new e$29,this._command=void 0,this._geometry=void 0,this.heightBuffer=void 0,this.colorBuffer=void 0}_0x362660(),Object.defineProperties(_0x15862b.prototype,{startPoint:{get:function(){return this._startPoint3D},set:function(e){this._startPoint3D=e,this._update=!0}},endPoint:{get:function(){return this._endPoint3D},set:function(e){this._endPoint3D=e,this._update=!0}},extendHeight:{get:function(){return this._extendHeight},set:function(e){this._extendHeight=e,this._bManualChangeExtendHeight=!0,this._update=!0}}}),_0x15862b.prototype.getPositions=function(e){this._positions=[],this._isGetPositions=!0,this._getPositionsFunc=function(t){e(t),this._isGetPositions=!1},this._update=!0},_0x15862b.prototype.update=function(e,t,i){LicenseChecker.LICENSECHECKER.verify("Profile"),!t._fboState.enabled&&this._update&&(this._frameState=t,e$2b(this._depthBuffer)||(this._depthBuffer=new s$T(e),this._depthBuffer.environmentVisible.isObjectVisible=!0,this._depthBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthBuffer.environmentVisible.isGlobalVisible=!0,this._depthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._name]=this._depthBuffer),e$2b(this._depthDownBuffer)||(this._depthDownBuffer=new s$T(e),this._depthDownBuffer.environmentVisible.isObjectVisible=!0,this._depthDownBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthDownBuffer.environmentVisible.isGlobalVisible=!0,this._depthDownBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._downName]=this._depthDownBuffer),e$2b(this._depthDownReverBuffer)||(this._depthDownReverBuffer=new s$T(e),this._depthDownReverBuffer.environmentVisible.isObjectVisible=!0,this._depthDownReverBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthDownReverBuffer.environmentVisible.isGlobalVisible=!0,this._depthDownReverBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._downReverName]=this._depthDownReverBuffer),e$2b(this._depthLeftBuffer)||(this._depthLeftBuffer=new s$T(e),this._depthLeftBuffer.environmentVisible.isObjectVisible=!0,this._depthLeftBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthLeftBuffer.environmentVisible.isGlobalVisible=!0,this._depthLeftBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._leftName]=this._depthLeftBuffer),e$2b(this._depthLeftReverBuffer)||(this._depthLeftReverBuffer=new s$T(e,this._scene.farToNearRatio),this._depthLeftReverBuffer.environmentVisible.isObjectVisible=!0,this._depthLeftReverBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthLeftReverBuffer.environmentVisible.isGlobalVisible=!0,this._depthLeftReverBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._leftReverName]=this._depthLeftReverBuffer),e$2b(this._depthTopBuffer)||(this._depthTopBuffer=new s$T(e),this._depthTopBuffer.environmentVisible.isObjectVisible=!0,this._depthTopBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthTopBuffer.environmentVisible.isGlobalVisible=!0,this._depthTopBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._topName]=this._depthTopBuffer),this._update=!1,_0x4deca3(this,e,t))},_0x15862b.prototype.getBuffer=function(e){this._func=e},_0x15862b.prototype.build=function(){""===this._name&&(this._name="profile"+this._scene._analyst3D._layerIndex,this._downName=this._name+"_down",this._downReverName=this._name+"_downRever",this._leftName=this._name+"_left",this._leftReverName=this._name+"_leftRever",this._topName=this._name+"_top",this._scene._analyst3D.add(this))},_0x15862b.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,e$2b(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport),e$2b(this._depthDownBuffer)&&(this._depthDownBuffer._visibleViewport=this._visibleViewport),e$2b(this._depthDownReverBuffer)&&(this._depthDownReverBuffer._visibleViewport=this._visibleViewport),e$2b(this._depthLeftBuffer)&&(this._depthLeftBuffer._visibleViewport=this._visibleViewport),e$2b(this._depthLeftReverBuffer)&&(this._depthLeftReverBuffer._visibleViewport=this._visibleViewport),e$2b(this._depthTopBuffer)&&(this._depthTopBuffer._visibleViewport=this._visibleViewport)},_0x15862b.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},_0x15862b.prototype.destroy=function(){return e$2b(this._frameState)&&(e$2b(this._depthBuffer)&&delete this._frameState._framebufferList[this._name],e$2b(this._depthDownBuffer)&&delete this._frameState._framebufferList[this._downName],e$2b(this._depthDownReverBuffer)&&delete this._frameState._framebufferList[this._downReverName],e$2b(this._depthLeftBuffer)&&delete this._frameState._framebufferList[this._leftName],e$2b(this._depthLeftReverBuffer)&&delete this._frameState._framebufferList[this._leftReverName],e$2b(this._depthTopBuffer)&&delete this._frameState._framebufferList[this._topName],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),this._depthDownBuffer=this._depthDownBuffer&&this._depthDownBuffer.destroy(),this._depthDownReverBuffer=this._depthDownReverBuffer&&this._depthDownReverBuffer.destroy(),this._depthLeftBuffer=this._depthLeftBuffer&&this._depthLeftBuffer.destroy(),this._depthLeftReverBuffer=this._depthLeftReverBuffer&&this._depthLeftReverBuffer.destroy(),this._depthTopBuffer=this._depthTopBuffer&&this._depthTopBuffer.destroy(),this._depthValue=null,this._dataBuffer=null,this._func=void 0,this._scene._analyst3D.remove(this._name,!0),i$10(this)},Object.defineProperties(e$1N.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}}),e$1N.prototype.contains=function(e){if("string"!=typeof e&&"number"!=typeof e)throw new t$16("key is required to be a string or number.");return e$2b(this._hash[e])},e$1N.prototype.set=function(e,t){if("string"!=typeof e&&"number"!=typeof e)throw new t$16("key is required to be a string or number.");t!==this._hash[e]&&(this.remove(e),this._hash[e]=t,this._array.push(t))},e$1N.prototype.get=function(e){if("string"!=typeof e&&"number"!=typeof e)throw new t$16("key is required to be a string or number.");return this._hash[e]},e$1N.prototype.remove=function(e){if(e$2b(e)&&"string"!=typeof e&&"number"!=typeof e)throw new t$16("key is required to be a string or number.");var t=this._hash[e],i=e$2b(t);if(i){var n=this._array;n.splice(n.indexOf(t),1),delete this._hash[e]}return i},e$1N.prototype.removeAll=function(){var e=this._array;e.length>0&&(this._hash={},e.length=0)},e$1N.clone=function(e,t){if(e$2b(e)){for(var i in e$2b(t)?t.removeAll():t=new e$1N,e._hash)e._hash.hasOwnProperty(i)&&t.set(i,e._hash[i]);return t}},f$X.prototype.destroy=function(){delete this._bounds,this._bounds=null,e$2b(this._command)&&(this._command.vertexArray=this._command.vertexArray&&!this._command.vertexArray.isDestroyed()&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&!this._command.shaderProgram.isDestroyed()&&this._command.shaderProgram.destroy(),this._command=null);var e=this.colorBuffer;e$2b(e)&&e.destroy(),this.colorBuffer=void 0;var t=this.heightBuffer;e$2b(t)&&t.destroy(),this.heightBuffer=void 0,this._geometry=null},f$X.updateGeometry=function(e,t,i,n){if(e$2b(e))for(var r=new n$1b,o=r.ellipsoid,a=new a$18,s=e.attributes.position,l=new o$1p,u=s.values,c=0;c<u.length;c+=3)l.x=u[c],l.y=u[c+1],l.z=u[c+2],n&&(o.cartesianToCartographic(l,a),r.project(a,l),l=o$1p.fromElements(l.z,l.x,l.y)),p$1d.multiplyByPoint(i,l,l),u[c]=l.x,u[c+1]=l.y,u[c+2]=l.z},f$X.updateGeoBounds=function(e){for(var t=e.attributes.position.values,i=new e$29(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),n=0;n<t.length;n+=3){var r=t[n],o=t[n+1];i.x=Math.min(r,i.x),i.y=Math.min(o,i.y),i.z=Math.max(r,i.z),i.w=Math.max(o,i.w)}return i};var A$18={ADD:de$x.FUNC_ADD,SUBTRACT:de$x.FUNC_SUBTRACT,REVERSE_SUBTRACT:de$x.FUNC_REVERSE_SUBTRACT,MIN:de$x.MIN,MAX:de$x.MAX},b$19=Object.freeze(A$18),_$U={ZERO:de$x.ZERO,ONE:de$x.ONE,SOURCE_COLOR:de$x.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:de$x.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:de$x.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:de$x.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:de$x.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:de$x.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:de$x.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:de$x.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:de$x.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:de$x.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:de$x.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:de$x.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:de$x.SRC_ALPHA_SATURATE},l$14=Object.freeze(_$U),t$U={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.SOURCE_ALPHA,functionSourceAlpha:l$14.ONE,functionDestinationRgb:l$14.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:l$14.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.ONE,functionSourceAlpha:l$14.ONE,functionDestinationRgb:l$14.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:l$14.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.SOURCE_ALPHA,functionSourceAlpha:l$14.ONE,functionDestinationRgb:l$14.ONE,functionDestinationAlpha:l$14.ONE})},Ee$r=Object.freeze(t$U),R$X={ZERO:de$x.ZERO,KEEP:de$x.KEEP,REPLACE:de$x.REPLACE,INCREMENT:de$x.INCR,DECREMENT:de$x.DECR,INVERT:de$x.INVERT,INCREMENT_WRAP:de$x.INCR_WRAP,DECREMENT_WRAP:de$x.DECR_WRAP},n$Y=Object.freeze(R$X),A$17={NEVER:de$x.NEVER,LESS:de$x.LESS,EQUAL:de$x.EQUAL,LESS_OR_EQUAL:de$x.LEQUAL,GREATER:de$x.GREATER,NOT_EQUAL:de$x.NOTEQUAL,GREATER_OR_EQUAL:de$x.GEQUAL,ALWAYS:de$x.ALWAYS},m$X=Object.freeze(A$17);function t$T(e,t,i){return o$1q.defined("url",e),t=u$_(t,!0),(i=e$2b(i)?i:new r$1b).url=e,i.requestFunction=function(){var i;i=!(e$23(e)||!t)&&i$18(e);var n=o$1l.defer();return t$T.createImage(e,i,n),n.promise},r$1a.request(i)}t$T.createImage=function(e,t,i){var n=new Image;n.onload=function(){i.resolve(n)},n.onerror=function(e){i.reject(e)},t&&(u$X.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e},t$T.defaultCreateImage=t$T.createImage;var _0x33d759=(_0x4f9cea=!0,function(e,t){var i=_0x4f9cea?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f9cea=!1,i}),_0x4c0c2e=_0x33d759(void 0,(function(){return _0x4c0c2e.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c0c2e).search("(((.+)+)+)+$")})),_0x4f9cea;_0x4c0c2e();var _0x2f8522="attribute vec4 aPosition;\n\nvarying vec4 vClip_pos;\nvoid main()\n{\n\tvClip_pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n\tgl_Position = czm_depthClampFarPlane(vClip_pos);\n}",_0x12b648=(_0x30bf2e=!0,function(e,t){var i=_0x30bf2e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30bf2e=!1,i}),_0x13044e=_0x12b648(void 0,(function(){return _0x13044e.toString().search("(((.+)+)+)+$").toString().constructor(_0x13044e).search("(((.+)+)+)+$")})),_0x30bf2e;_0x13044e();var _0x48873e="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform mat4 uRenderTextureMatrix;\nuniform vec2 uTexture1_size;\nuniform sampler2D uTexture1;\nuniform sampler2D uDiffuseTexture;\nuniform float uFeatheringScale;\nuniform vec3 uV3AffineX;\nuniform vec3 uV3AffineY;\n#ifdef CLIPPOLYGON\nuniform sampler2D uPolygonTexture;\nuniform mat4 uPolygonTextureMatrix;\nuniform float uPolygonMode;\n#endif\n\nvarying vec4 vClip_pos;\n\nconst float oldFeatureingRadius = 0.707;\nvec4 feathering(vec4 oldColor, vec2 texCoord){\n float disToCenter = length(texCoord - vec2(0.5));\n float roundRadius = oldFeatureingRadius * (1.0 - uFeatheringScale);\n float disToRoundBounds = disToCenter - roundRadius;\n float featheringAlpha = min(1.0, 1.0 - disToRoundBounds / (oldFeatureingRadius - roundRadius));\n return vec4(oldColor.rgb, featheringAlpha);\n}\nfloat getDepth(in vec4 depth)\n{\n\tfloat z_window = czm_unpackDepth(depth);\n#ifdef WEBGPU\n\treturn z_window;\n#else\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n#endif\n}\n\nfloat getDepthFromShadowMap(in vec2 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(uTexture1, t00));\n\tfloat z10 = getDepth(texture2D(uTexture1, t01));\n\tfloat z01 = getDepth(texture2D(uTexture1, t10));\n\tfloat z11 = getDepth(texture2D(uTexture1, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n#ifdef CLIPPOLYGON\nbool isClipValid(vec2 texcoord)\n{\n bool clipInside = (uPolygonMode < 0.5);\n if(clipInside)\n {\n return texture2D(uPolygonTexture, texcoord).r > 0.5;\n }\n else\n {\n return texture2D(uPolygonTexture, texcoord).r < 0.5;\n }\n}\n#endif\n\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n\tfloat sceneDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, depthTexCoord.xy));\n\tsceneDepth = czm_reverseLogDepth(sceneDepth);\n#ifndef WEBGPU\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n#endif\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\tvec4 viewPos = czm_inverseProjection * pos;\n\tvec4 renderTextureCoord = uRenderTextureMatrix * viewPos;\n\tvec4 ndcInDepthScene = renderTextureCoord / renderTextureCoord.w;\n\tvec2 texCoord = ndcInDepthScene.xy * 0.5 + 0.5;\n\tif(texCoord.x < 0.0 || texCoord.x > 1.0 || texCoord.y < 0.0 || texCoord.y > 1.0)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIPPOLYGON\n vec4 polygonTextureCoord = uPolygonTextureMatrix * viewPos;\n\tvec4 texCoordPolygon = polygonTextureCoord / polygonTextureCoord.w;\n\ttexCoordPolygon.xyz = texCoordPolygon.xyz * 0.5 + 0.5;\n\tif(texCoordPolygon.x < 0.0 || texCoordPolygon.x > 1.0 || texCoordPolygon.y < 0.0 || texCoordPolygon.y > 1.0)\n\t{\n\t\tdiscard;\n }\n\tif(!isClipValid(texCoordPolygon.xy))\n {\n discard;\n }\n#endif\n\tfloat depth = getDepthFromShadowMap(texCoord);\n\tif(depth + 0.00002 < ndcInDepthScene.z)\n\t{\n\t\tdiscard;\n\t}\n\tvec2 finalTexCoord = texCoord.xy;\n texCoord.x = uV3AffineX.x * finalTexCoord.x + uV3AffineX.y * finalTexCoord.y + uV3AffineX.z;\n texCoord.y = uV3AffineY.x * finalTexCoord.x + uV3AffineY.y * finalTexCoord.y + uV3AffineY.z;\n if(texCoord.x > 1.0 || texCoord.y > 1.0 || texCoord.x < 0.0 || texCoord.y < 0.0)\n {\n discard;\n }\n\tgl_FragColor = texture2D(uDiffuseTexture, texCoord.xy);\n\tgl_FragColor = feathering(gl_FragColor, texCoord.xy);\n\tgl_FragColor.rgb = czm_adjustColor(gl_FragColor.rgb);\n}",_0x41e774=(_0xc20cdf=!0,function(e,t){var i=_0xc20cdf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc20cdf=!1,i}),_0x5a9886=_0x41e774(void 0,(function(){return _0x5a9886.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a9886).search("(((.+)+)+)+$")})),_0xc20cdf;_0x5a9886();var _0x1ee318={CLIP_INSIDE:0,CLIP_OUTSIDE:1},_0x25a093=Object.freeze(_0x1ee318);function d$1f(e,t,i){return p$_({url:e,responseType:"document",headers:t,overrideMimeType:"text/xml",request:i})}var s$S=function(){this.xmldom=null};s$S.prototype.read=function(e){var t,i=e.indexOf("<");return i>0&&(e=e.substring(i)),DOMParser?(this.xmldom||(this.xmldom=new DOMParser),(t=this.xmldom).parseFromString(e,"text/xml")):(this.xmldom||(this.xmldom=new ActiveXObject("Microsoft.XMLDOM")),(t=this.xmldom).loadXML(e),t)},s$S.getElementsByTagNameNS=function(e,t,i){var n=[];if(e.getElementsByTagNameNS)n=e.getElementsByTagNameNS(t,i);else for(var r,o,a=e.getElementsByTagName("*"),s=0,l=a.length;s<l;++s)o=(r=a[s]).prefix?r.prefix+":"+i:i,("*"===i||o===r.nodeName)&&("*"===t||t===r.namespaceURI)&&n.push(r);return n},s$S.getAttributeNodeNS=function(e,t,i){var n=null;if(e.getAttributeNodeNS)n=e.getAttributeNodeNS(t,i);else for(var r,o=e.attributes,a=0,s=o.length;a<s;++a)if((r=o[a]).namespaceURI===t&&(r.prefix?r.prefix+":"+i:i)===r.nodeName){n=r;break}return n},s$S.getChildValue=function(e,t){var i=t||"";if(e)for(var n=e.firstChild;n;n=n.nextSibling)switch(n.nodeType){case 3:case 4:i+=n.nodeValue}return i},s$S.queryNumericAttribute=function(e,t){if(e$2b(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}},s$S.queryStringAttribute=function(e,t){if(e$2b(e)){var i=e.getAttribute(t);return null!==i?i:void 0}},s$S.queryBooleanAttribute=function(e,t){if(e$2b(e)){var i=e.getAttribute(t);if("false"===(i=i.toLowerCase()))return!1;if("true"===i)return!0}},s$S.queryFirstNode=function(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(i){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}},s$S.queryNodes=function(e,t,i){if(e$2b(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];i?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}},s$S.queryChildNodes=function(e,t,i){if(!e$2b(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];i?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n},s$S.queryNumericValue=function(e,t,i){var n=s$S.queryFirstNode(e,t,i);if(e$2b(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}},s$S.queryStringValue=function(e,t,i){var n=s$S.queryFirstNode(e,t,i);if(e$2b(n))return n.textContent.trim()},s$S.queryBooleanValue=function(e,t,i){var n=s$S.queryFirstNode(e,t,i);if(e$2b(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}};var _0x4de944=(_0x38e4ba=!0,function(e,t){var i=_0x38e4ba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38e4ba=!1,i}),_0x2bb360=_0x4de944(void 0,(function(){return _0x2bb360.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bb360).search("(((.+)+)+)+$")})),_0x38e4ba;_0x2bb360();var _0x198d29={ProjectToScene:0,ProjectToPlane:1},_0x23afcf=Object.freeze(_0x198d29);function i$W(e){this.planes=u$_(e,[])}var T$Z=[new o$1p,new o$1p,new o$1p];o$1p.clone(o$1p.UNIT_X,T$Z[0]),o$1p.clone(o$1p.UNIT_Y,T$Z[1]),o$1p.clone(o$1p.UNIT_Z,T$Z[2]);var I$1d=new o$1p,y$V=new o$1p,l$13=new o$1m(new o$1p(1,0,0),0);function l$12(e){e=u$_(e,u$_.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=u$_(e.near,1),this._near=this.near,this.far=u$_(e.far,5e8),this._far=this.far,this._cullingVolume=new i$W,this._orthographicMatrix=new p$1d}function q$14(e){if(!(e$2b(e.right)&&e$2b(e.left)&&e$2b(e.top)&&e$2b(e.bottom)&&e$2b(e.near)&&e$2b(e.far)))throw new t$16("right, left, top, bottom, near, or far parameters are not set.");if(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far){if(e.left>e.right)throw new t$16("right must be greater than left.");if(e.bottom>e.top)throw new t$16("top must be greater than bottom.");if(e.near>e.far)throw new t$16("near must be greater than zero and less than far.");e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=p$1d.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}i$W.fromBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("boundingSphere is required.");e$2b(t)||(t=new i$W);var i=T$Z.length,n=t.planes;n.length=2*i;for(var r=e.center,o=e.radius,a=0,s=0;s<i;++s){var l=T$Z[s],u=n[a],c=n[a+1];e$2b(u)||(u=n[a]=new e$29),e$2b(c)||(c=n[a+1]=new e$29),o$1p.multiplyByScalar(l,-o,I$1d),o$1p.add(r,I$1d,I$1d),u.x=l.x,u.y=l.y,u.z=l.z,u.w=-o$1p.dot(l,I$1d),o$1p.multiplyByScalar(l,o,I$1d),o$1p.add(r,I$1d,I$1d),c.x=-l.x,c.y=-l.y,c.z=-l.z,c.w=-o$1p.dot(o$1p.negate(l,y$V),I$1d),a+=2}return t},i$W.prototype.computeVisibility=function(e){if(!e$2b(e))throw new t$16("boundingVolume is required.");for(var t=this.planes,i=!1,n=0,r=t.length;n<r;++n){var o=e.intersectPlane(o$1m.fromCartesian4(t[n],l$13));if(o===Ae$u.OUTSIDE)return Ae$u.OUTSIDE;o===Ae$u.INTERSECTING&&(i=!0)}return i?Ae$u.INTERSECTING:Ae$u.INSIDE},i$W.prototype.computeVisibilityWithPlaneMask=function(e,t){if(!e$2b(e))throw new t$16("boundingVolume is required.");if(!e$2b(t))throw new t$16("parentPlaneMask is required.");if(t===i$W.MASK_OUTSIDE||t===i$W.MASK_INSIDE)return t;for(var i=i$W.MASK_INSIDE,n=this.planes,r=0,o=n.length;r<o;++r){var a=r<31?1<<r:0;if(!(r<31&&0==(t&a))){var s=e.intersectPlane(o$1m.fromCartesian4(n[r],l$13));if(s===Ae$u.OUTSIDE)return i$W.MASK_OUTSIDE;s===Ae$u.INTERSECTING&&(i|=a)}}return i},i$W.MASK_OUTSIDE=4294967295,i$W.MASK_INSIDE=0,i$W.MASK_INDETERMINATE=2147483647,Object.defineProperties(l$12.prototype,{projectionMatrix:{get:function(){return q$14(this),this._orthographicMatrix}}});var B$X=new o$1p,M$12=new o$1p,P$$=new o$1p,s$R=new o$1p;function a$V(e){e=u$_(e,u$_.EMPTY_OBJECT),this._offCenterFrustum=new l$12,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=u$_(e.near,1),this._near=this.near,this.far=u$_(e.far,5e8),this._far=this.far}function o$18(e){if(!(e$2b(e.width)&&e$2b(e.aspectRatio)&&e$2b(e.near)&&e$2b(e.far)))throw new t$16("width, aspectRatio, near, or far parameters are not set.");var t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){if(e.aspectRatio<0)throw new t$16("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new t$16("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;var i=1/e.aspectRatio;t.right=.5*e.width,t.left=-t.right,t.top=i*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}l$12.prototype.computeCullingVolume=function(e,t,i){if(!e$2b(e))throw new t$16("position is required.");if(!e$2b(t))throw new t$16("direction is required.");if(!e$2b(i))throw new t$16("up is required.");var n=this._cullingVolume.planes,r=this.top,o=this.bottom,a=this.right,s=this.left,l=this.near,u=this.far,c=o$1p.cross(t,i,B$X);o$1p.normalize(c,c);var h=M$12;o$1p.multiplyByScalar(t,l,h),o$1p.add(e,h,h);var d=P$$;o$1p.multiplyByScalar(c,s,d),o$1p.add(h,d,d);var f=n[0];return e$2b(f)||(f=n[0]=new e$29),f.x=c.x,f.y=c.y,f.z=c.z,f.w=-o$1p.dot(c,d),o$1p.multiplyByScalar(c,a,d),o$1p.add(h,d,d),e$2b(f=n[1])||(f=n[1]=new e$29),f.x=-c.x,f.y=-c.y,f.z=-c.z,f.w=-o$1p.dot(o$1p.negate(c,s$R),d),o$1p.multiplyByScalar(i,o,d),o$1p.add(h,d,d),e$2b(f=n[2])||(f=n[2]=new e$29),f.x=i.x,f.y=i.y,f.z=i.z,f.w=-o$1p.dot(i,d),o$1p.multiplyByScalar(i,r,d),o$1p.add(h,d,d),e$2b(f=n[3])||(f=n[3]=new e$29),f.x=-i.x,f.y=-i.y,f.z=-i.z,f.w=-o$1p.dot(o$1p.negate(i,s$R),d),e$2b(f=n[4])||(f=n[4]=new e$29),f.x=t.x,f.y=t.y,f.z=t.z,f.w=-o$1p.dot(t,h),o$1p.multiplyByScalar(t,u,d),o$1p.add(e,d,d),e$2b(f=n[5])||(f=n[5]=new e$29),f.x=-t.x,f.y=-t.y,f.z=-t.z,f.w=-o$1p.dot(o$1p.negate(t,s$R),d),this._cullingVolume},l$12.prototype.getPixelDimensions=function(e,t,i,n,r){if(q$14(this),!e$2b(e)||!e$2b(t))throw new t$16("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new t$16("drawingBufferWidth must be greater than zero.");if(t<=0)throw new t$16("drawingBufferHeight must be greater than zero.");if(!e$2b(i))throw new t$16("distance is required.");if(!e$2b(n))throw new t$16("pixelRatio is required.");if(n<=0)throw new t$16("pixelRatio must be greater than zero.");if(!e$2b(r))throw new t$16("A result object is required.");var o=n*(this.right-this.left)/e,a=n*(this.top-this.bottom)/t;return r.x=o,r.y=a,r},l$12.prototype.clone=function(e){return e$2b(e)||(e=new l$12),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},l$12.prototype.equals=function(e){return e$2b(e)&&e instanceof l$12&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},l$12.prototype.equalsEpsilon=function(e,t,i){return e===this||e$2b(e)&&e instanceof l$12&&e$2a.equalsEpsilon(this.right,e.right,t,i)&&e$2a.equalsEpsilon(this.left,e.left,t,i)&&e$2a.equalsEpsilon(this.top,e.top,t,i)&&e$2a.equalsEpsilon(this.bottom,e.bottom,t,i)&&e$2a.equalsEpsilon(this.near,e.near,t,i)&&e$2a.equalsEpsilon(this.far,e.far,t,i)},a$V.packedLength=4,a$V.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.width,t[i++]=e.aspectRatio,t[i++]=e.near,t[i]=e.far,t},a$V.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new a$V),i.width=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t],i},Object.defineProperties(a$V.prototype,{projectionMatrix:{get:function(){return o$18(this),this._offCenterFrustum.projectionMatrix}}}),a$V.prototype.computeCullingVolume=function(e,t,i){return o$18(this),this._offCenterFrustum.computeCullingVolume(e,t,i)},a$V.prototype.getPixelDimensions=function(e,t,i,n,r){return o$18(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n,r)},a$V.prototype.clone=function(e){return e$2b(e)||(e=new a$V),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},a$V.prototype.equals=function(e){return!!(e$2b(e)&&e instanceof a$V)&&(o$18(this),o$18(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},a$V.prototype.equalsEpsilon=function(e,t,i){return!!(e$2b(e)&&e instanceof a$V)&&(o$18(this),o$18(e),e$2a.equalsEpsilon(this.width,e.width,t,i)&&e$2a.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))};var s$Q={},Z$_=new e$29(0,0,0,1),v$N=new e$29,J$W=new f$18,M$11=new o$1o,j$14=new o$1o;s$Q.wgs84ToWindowCoordinates=function(e,t,i){return s$Q.wgs84WithEyeOffsetToWindowCoordinates(e,t,o$1p.ZERO,i)};var F$11=new e$29,L$15=new o$1p;function P$_(e,t,i,n){var r=i._scene.context.curFusionViewMatrix||i.viewMatrix,o=p$1d.multiplyByVector(r,e$29.fromElements(e.x,e.y,e.z,1,F$11),F$11),a=o$1p.multiplyComponents(t,o$1p.normalize(o,L$15),L$15);return o.x+=t.x+a.x,o.y+=t.y+a.y,o.z+=a.z,p$1d.multiplyByVector(i.frustum.projectionMatrix,o,n)}var K$T=new a$18(Math.PI,e$2a.PI_OVER_TWO),Q$Z=new o$1p,X$Z=new o$1p;s$Q.wgs84WithEyeOffsetToWindowCoordinates=function(e,t,i,n){if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(t))throw new t$16("position is required.");var r=e.frameState,o=s$Q.computeActualWgs84Position(r,t,Z$_);if(e$2b(o)){var a=e.canvas,s=J$W;s.x=0,s.y=0,s.width=a.clientWidth,s.height=a.clientHeight;var l=e.camera,u=!1;if(r.mode===C$13.SCENE2D){var c=e.mapProjection,h=K$T,d=c.project(h,Q$Z),f=o$1p.clone(l.position,X$Z),p=l.frustum.clone(),_=p$1d.computeViewportTransformation(s,0,1,new p$1d),m=l.frustum.projectionMatrix,g=l.positionWC.y,x=o$1p.fromElements(e$2a.sign(g)*d.x-g,0,-l.positionWC.x),v=m$17.pointToGLWindowCoordinates(m,_,x);if(0===g||v.x<=0||v.x>=a.clientWidth)u=!0;else{if(v.x>.5*a.clientWidth){s.width=v.x,l.frustum.right=d.x-g,v$N=P$_(o,i,l,v$N),s$Q.clipToGLWindowCoordinates(s,v$N,M$11),s.x+=v.x,l.position.x=-l.position.x;var y=l.frustum.right;l.frustum.right=-l.frustum.left,l.frustum.left=-y,v$N=P$_(o,i,l,v$N),s$Q.clipToGLWindowCoordinates(s,v$N,j$14)}else{s.x+=v.x,s.width-=v.x,l.frustum.left=-d.x-g,v$N=P$_(o,i,l,v$N),s$Q.clipToGLWindowCoordinates(s,v$N,M$11),s.x=s.x-s.width,l.position.x=-l.position.x;var $=l.frustum.left;l.frustum.left=-l.frustum.right,l.frustum.right=-$,v$N=P$_(o,i,l,v$N),s$Q.clipToGLWindowCoordinates(s,v$N,j$14)}o$1p.clone(f,l.position),l.frustum=p.clone(),((n=o$1o.clone(M$11,n)).x<0||n.x>a.clientWidth)&&(n.x=j$14.x)}}if(r.mode!==C$13.SCENE2D||u){if((v$N=P$_(o,i,l,v$N)).z<0&&!(l.frustum instanceof a$V)&&!(l.frustum instanceof l$12))return;n=s$Q.clipToGLWindowCoordinates(s,v$N,n)}return n.y=a.clientHeight-n.y,n}},s$Q.wgs84ToDrawingBufferCoordinates=function(e,t,i){if(e$2b(i=s$Q.wgs84ToWindowCoordinates(e,t,i)))return s$Q.transformWindowToDrawingBuffer(e,i,i)};var h$$=new o$1p,Y$P=new a$18;s$Q.computeActualWgs84Position=function(e,t,i){var n=e.mode;if(n===C$13.SCENE3D)return o$1p.clone(t,i);var r=e.mapProjection,o=r.ellipsoid.cartesianToCartographic(t,Y$P);if(e$2b(o)){if(r.project(o,h$$),n===C$13.COLUMBUS_VIEW)return o$1p.fromElements(h$$.z,h$$.x,h$$.y,i);if(n===C$13.SCENE2D)return o$1p.fromElements(0,h$$.x,h$$.y,i);var a=e.morphTime;return o$1p.fromElements(e$2a.lerp(h$$.z,t.x,a),e$2a.lerp(h$$.x,t.y,a),e$2a.lerp(h$$.y,t.z,a),i)}};var O$K=new o$1p,N$V=new o$1p,_$T=new p$1d;s$Q.clipToGLWindowCoordinates=function(e,t,i){return o$1p.divideByScalar(t,t.w,O$K),p$1d.computeViewportTransformation(e,0,1,_$T),p$1d.multiplyByPoint(_$T,O$K,N$V),o$1o.fromCartesian3(N$V,i)},s$Q.transformWindowToDrawingBuffer=function(e,t,i){var n=e.canvas,r=e.drawingBufferWidth/n.clientWidth,o=e.drawingBufferHeight/n.clientHeight;return o$1o.fromElements(t.x*r,t.y*o,i)};var $$$=new e$29,G$18=new e$29;s$Q.drawingBufferToWgs84Coordinates=function(e,t,i,n){var r=e.context,o=r.uniformState,a=o.currentFrustum,s=a.x,l=a.y;if(e.frameState.useLogDepth){var u=i*o.log2FarDepthFromNearPlusOne;i=l*(1-s/(Math.pow(2,u)-1+s))/(l-s)}var c=e._view.passState.viewport,h=e$29.clone(e$29.UNIT_W,$$$);h.x=(t.x-c.x)/c.width*2-1,h.y=(t.y-c.y)/c.height*2-1,r.webgpu?h.z=i:h.z=2*i-1,h.w=1;var d,f=e.camera.frustum;if(e$2b(f.fovy)){var p=1/(d=p$1d.multiplyByVector(o.inverseViewProjection,h,G$18)).w;o$1p.multiplyByScalar(d,p,d)}else e$2b(f._offCenterFrustum)&&(f=f._offCenterFrustum),(d=G$18).x=.5*(h.x*(f.right-f.left)+f.left+f.right),d.y=.5*(h.y*(f.top-f.bottom)+f.bottom+f.top),d.z=.5*(h.z*(s-l)-s-l),d.w=1,d=p$1d.multiplyByVector(o.inverseView,d,d);return d.x+=r.relativeOrigin.x,d.y+=r.relativeOrigin.y,d.z+=r.relativeOrigin.z,o$1p.fromCartesian4(d,n)},s$Q.convert2DToCartesian=function(e,t){if(t){var i=t.x,n=t.y;i>20037508.342789244&&(i-=20037508.342789244*Math.floor(i/20037508.342789244)),n>10018754.171394622&&(n-=20037508.342789244*Math.floor((n+10018754.171394622)/20037508.342789244)),t.x=i,t.y=n}var r=e.mapProjection,o=r.ellipsoid,a=new o$1p,s=new a$18,l=r.unproject(t,s);return o.cartographicToCartesian(l,a),a};var _0x10762d=(_0x4394fc=!0,function(e,t){var i=_0x4394fc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4394fc=!1,i}),_0x1a8e32=_0x10762d(void 0,(function(){return _0x1a8e32.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a8e32).search("(((.+)+)+)+$")})),_0x4394fc;function _0x3065eb(e){if(!e$2b(e))throw new t$16("scene are required.");if(!e.context.depthTexture)throw new t$16("the depth buffer is not supported.");this._scene=e,this._cameraDepthBuffer=void 0,this._clearStencilCommand=new t$X({stencil:0}),this._clearStencilCommand.pass=Le$s.ANALYSIS,this._lineCommand=void 0,this._stencilCommand=void 0,this._colorCommand=void 0,this._boundingSphere=new i$1c,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._roll=0,this._horizontalFov=90,this._verticalFov=60,this._distance=200,this._hintLineColor=new e$29(1,1,1,1),this._hintLineVisible=!0,this._texture=void 0,this._segmentCount=20,this._invertViewMatrix=new p$1d,this._viewProjMatrix=new p$1d,this._renderTextureMatrix=new p$1d,this._update=!0,this._id=0,this._name="",this._cameraName="",this._visibleViewport=4095,this._video=void 0,this._hasExcavation=!1,this._polygonTexture=void 0,this._polygonRegions=new e$1N,this._polygonTextureMatrix=new p$1d,this._polygonViewProjMatrix=new p$1d,this._polygonUpdate=!1,this._polygonMode=_0x25a093.CLIP_OUTSIDE,this._brightness=1,this._contrast=1,this._hue=0,this._saturation=1,this._gamma=1,this._featheringScale=0,this._v3AffineX=new o$1p(1,0,0),this._v3AffineY=new o$1p(0,1,0),this._visible=!0,this._boundingSphereFromXML=void 0,this._visibleDistanceMax=500,this._mode=_0x23afcf.ProjectToScene,this._planeRegions=void 0,this._projectEvent=new o$1h,this._projectPlaneOffset=1,this._guid=e$1Q(),this._fusionAlpha=1,this._minDepth=.9999}function _0x476352(e){e$2b(e._stencilCommand)&&(e._stencilCommand.vertexArray=e._stencilCommand.vertexArray&&e._stencilCommand.vertexArray.destroy(),e._stencilCommand.shaderProgram=e._stencilCommand.shaderProgram&&e._stencilCommand.shaderProgram.destroy(),e._stencilCommand=void 0),e$2b(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),e$2b(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0),e$2b(e._planeCommand)&&(e._planeCommand.vertexArray=e._planeCommand.vertexArray&&e._planeCommand.vertexArray.destroy(),e._planeCommand.shaderProgram=e._planeCommand.shaderProgram&&e._planeCommand.shaderProgram.destroy(),e._planeCommand=void 0)}function _0x157bd9(e,t,i){var n=e._horizontalFov*e$2a.RADIANS_PER_DEGREE,r=e._verticalFov*e$2a.RADIANS_PER_DEGREE,o=Math.tan(.5*n)/Math.tan(.5*r);e._distance;var a=Math.max(e._distance,10),s=e._direction*e$2a.RADIANS_PER_DEGREE,l=e._pitch*e$2a.RADIANS_PER_DEGREE,u=e._roll*e$2a.RADIANS_PER_DEGREE,c=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0],h=i.camera,d=h.frustum.aspectRatio,f=h.frustum.fov,p=h.frustum.near,_=h.frustum.far,m=new o$1p,g=h.heading,x=h.pitch,v=h.roll;o$1p.clone(h.position,m),e._cameraDepthBuffer.isUpdate=!0;var y=i.useLogDepth;e._cameraDepthBuffer._beginFunc=function(){i.useLogDepth=!1,d=h.frustum.aspectRatio,f=h.frustum.fov,p=h.frustum.near,_=h.frustum.far,g=h.heading,x=h.pitch,v=h.roll,o$1p.clone(h.position,m),h.frustum.aspectRatio=o,h.frustum.fov=o>=1?n:r,h.frustum.near=1,h.frustum.far=a,y&&(h.frustum.near=.1,h.frustum.far=1e8),h.setView({destination:c,orientation:{heading:s,pitch:l,roll:u}}),p$1d.multiply(h.frustum.projectionMatrix,h.viewMatrix,e._viewProjMatrix),p$1d.clone(h.inverseViewMatrix,e._invertViewMatrix),o$1p.clone(o$1p.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,i$1c.transform(e._boundingSphere,e._invertViewMatrix,e._boundingSphere)},e._cameraDepthBuffer._endFunc=function(){h.setView({destination:m,orientation:{heading:g,pitch:x,roll:v},convert:!1}),h.frustum.aspectRatio=d,h.frustum.fov=f,h.frustum.near=p,h.frustum.far=_,i.useLogDepth=y,e._cameraDepthBuffer.isUpdate=!1}}_0x1a8e32(),Object.defineProperties(_0x3065eb.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},roll:{get:function(){return this._roll},set:function(e){this._roll=e,this._update=!0}},horizontalFov:{get:function(){return this._horizontalFov},set:function(e){this._horizontalFov=e,this._update=!0}},verticalFov:{get:function(){return this._verticalFov},set:function(e){this._verticalFov=e,this._update=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$16("the distance is greater than 0.0");this._distance=e,this._update=!0}},featheringScale:{get:function(){return this._featheringScale},set:function(e){if(e<0||e>1)throw new t$16("the distance is greater than 0.0 an less than 1.0");this._featheringScale=e}},hintLineColor:{get:function(){var e=new e$1U;return e.red=this._hintLineColor.x,e.green=this._hintLineColor.y,e.blue=this._hintLineColor.z,e.alpha=this._hintLineColor.w,e},set:function(e){this._hintLineColor.x=e.red,this._hintLineColor.y=e.green,this._hintLineColor.z=e.blue,this._hintLineColor.w=e.alpha}},hintLineVisible:{get:function(){return this._hintLineVisible},set:function(e){this._hintLineVisible=e}},brightness:{get:function(){return this._brightness},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.brightness",e,0),this._brightness=e}},contrast:{get:function(){return this._contrast},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.contrast",e,0),this._contrast=e}},hue:{get:function(){return this._hue},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.hue",e,0),this._hue=e}},saturation:{get:function(){return this._saturation},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.saturation",e,0),this._saturation=e}},gamma:{get:function(){return this._gamma},set:function(e){o$1q.typeOf.number.greaterThan("ProjectionImage.gamma",e,0),this._gamma=e}},visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("ProjectionImage.visible",e),this._visible=e}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){o$1q.typeOf.number("ProjectionImage.visibleDistance",e),this._visibleDistanceMax=e}},mode:{get:function(){return this._mode},set:function(e){this._mode=e}},projectEvent:{get:function(){return this._projectEvent}},fusionAlpha:{get:function(){return this._fusionAlpha},set:function(e){this._fusionAlpha=e}}});var _0x478721=new e$29,_0x3e2ac7=new e$29(1,1/255,1/65025,1/16581375);function _0x3afe00(e,t,i,n,r,o){var a=t.context.readPixels({x:i,y:n,width:1,height:1,framebuffer:e._cameraDepthBuffer._framebuffer}),s=e$29.unpack(a,0,_0x478721);e$29.divideByScalar(s,255,s);var l=e$29.dot(s,_0x3e2ac7);0!==l?e._minDepth=Math.min(e._minDepth,l):l=e._minDepth;var u=new e$29(r,o,2*l-1,1),c=new e$29,h=p$1d.inverse(e._viewProjMatrix,new p$1d),d=p$1d.multiplyByVector(h,u,c),f=1/d.w;return o$1p.multiplyByScalar(d,f,d)}function _0x1f4b4f(e,t){var i=e._scene,n=i.screenSpaceCameraController;n.enableFusion||(n.enableFusion=!0),e$2b(t.curFusionViewMatrix)||(t.curFusionViewMatrix=p$1d.clone(t.uniformState.view,new p$1d));var r=_0x3afe00(e,i,0,0,-1,-1),o=_0x3afe00(e,i,i.drawingBufferWidth-1,0,1,-1),a=_0x3afe00(e,i,i.drawingBufferWidth-1,i.drawingBufferHeight-1,1,1),s=_0x3afe00(e,i,0,i.drawingBufferHeight-1,-1,1);if(s$Q.wgs84ToDrawingBufferCoordinates(i,r,r),s$Q.wgs84ToDrawingBufferCoordinates(i,o,o),s$Q.wgs84ToDrawingBufferCoordinates(i,a,a),s$Q.wgs84ToDrawingBufferCoordinates(i,s,s),e$2b(r)&&e$2b(o)&&e$2b(a)&&e$2b(s)){e$2b(n.panOffset)&&(r.x+=n.panOffset.x,o.x+=n.panOffset.x,a.x+=n.panOffset.x,s.x+=n.panOffset.x,r.y+=n.panOffset.y,o.y+=n.panOffset.y,a.y+=n.panOffset.y,s.y+=n.panOffset.y),n.zoomDirty=!1,n.panDirty=!1;for(var l=[r.x,r.y,o.x,o.y,a.x,a.y,s.x,s.y],u=i.drawingBufferWidth,c=i.drawingBufferHeight,h=0,d=l.length;h<d;h++){var f=l[h];f=2*(f=h%2==0?f/u:1-f/c)-1,l[h]=f}var p=new I$1p({attributes:{position:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:l}),textureCoordinates:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:W$18.TRIANGLES}),_=new i$_({vertexArray:c$12.fromGeometry({context:t,geometry:p,attributeLocations:{position:0,textureCoordinates:1},bufferUsage:A$19.STATIC_DRAW,interleave:!0}),primitiveType:W$18.TRIANGLES,renderState:d$1m.fromCache({blending:Ee$r.ALPHA_BLEND}),shaderProgram:r$13.fromCache({name:"ProjectionImagePlane",context:t,vertexShaderSource:"\n attribute vec4 position;\n attribute vec2 textureCoordinates;\n varying vec2 v_textureCoordinates;\n void main() \n {\n gl_Position = position;\n v_textureCoordinates = textureCoordinates;\n }\n ",fragmentShaderSource:"\n uniform sampler2D u_Texture;\n uniform float uFusionAlpha;\n varying vec2 v_textureCoordinates;\n void main()\n {\n gl_FragColor = texture2D(u_Texture, v_textureCoordinates);\n gl_FragColor.a = uFusionAlpha;\n }\n ",attributeLocations:{position:0,textureCoordinates:1}}),uniformMap:{u_Texture:function(){return e._texture},uFusionAlpha:function(){return e._fusionAlpha}},owner:e});_.pass=Le$s.OVERLAY_AGAINST_DEPTH,e._planeCommand=_}}function _0x2e71f2(e,t,i){for(var n=(e._segmentCount+1)*(e._segmentCount+1)+1,r=S$12.createTypedArray(S$12.FLOAT,3*n),o=3,a=e._horizontalFov*e$2a.RADIANS_PER_DEGREE,s=e._verticalFov*e$2a.RADIANS_PER_DEGREE,l=Math.tan(.5*a),u=Math.tan(.5*s),c=(e._distance,e._distance*u),h=Math.PI-.5*a,d=0,f=0,p=a/e._segmentCount,_=0;_<e._segmentCount+1;_++){d=h+_*p;for(var m=c/(e._distance/Math.cos(d)),g=Math.atan(m),x=-g,v=2*g/e._segmentCount,y=0;y<e._segmentCount+1;y++)f=x+y*v,r[o++]=e._distance*Math.cos(f)*Math.sin(d),r[o++]=e._distance*Math.sin(f),r[o++]=e._distance*Math.cos(f)*Math.cos(d)}var $=2*(4+5*e._segmentCount+2*e._segmentCount*3),b=e._segmentCount*e._segmentCount*3*2+3*e._segmentCount*4,T=S$12.createTypedArray(S$12.UNSIGNED_SHORT,$),C=S$12.createTypedArray(S$12.UNSIGNED_SHORT,b),S=0;for(_=0;_<e._segmentCount;_++)for(y=0;y<e._segmentCount;y++)C[S++]=1+_+y*(e._segmentCount+1),C[S++]=1+_+1+y*(e._segmentCount+1),C[S++]=1+_+(y+1)*(e._segmentCount+1),C[S++]=1+_+1+y*(e._segmentCount+1),C[S++]=1+_+1+(y+1)*(e._segmentCount+1),C[S++]=1+_+(y+1)*(e._segmentCount+1);for(_=0;_<e._segmentCount;_++)C[S++]=_+1+1,C[S++]=_+1,C[S++]=0,C[S++]=0,C[S++]=_+e._segmentCount*(e._segmentCount+1)+1,C[S++]=_+1+e._segmentCount*(e._segmentCount+1)+1;for(_=0;_<e._segmentCount;_++)C[S++]=0,C[S++]=_*(e._segmentCount+1)+1,C[S++]=(_+1)*(e._segmentCount+1)+1,C[S++]=e._segmentCount+(_+1)*(e._segmentCount+1)+1,C[S++]=e._segmentCount+_*(e._segmentCount+1)+1,C[S++]=0;S=0,T[S++]=0,T[S++]=1,T[S++]=0,T[S++]=e._segmentCount+1,T[S++]=0,T[S++]=e._segmentCount*(e._segmentCount+1)+1,T[S++]=0,T[S++]=(e._segmentCount+1)*(e._segmentCount+1);for(_=0;_<5;_++)for(y=0;y<e._segmentCount;y++)T[S++]=1+y+5*(e._segmentCount+1)*_,T[S++]=1+(y+1)+5*(e._segmentCount+1)*_;for(_=0;_<5;_++)for(y=0;y<e._segmentCount;y++)T[S++]=1+(e._segmentCount+1)*y+5*_,T[S++]=1+(e._segmentCount+1)*(y+1)+5*_;var w=t$Y.createVertexBuffer({context:t,typedArray:r,usage:A$19.STATIC_DRAW}),E=[],P={aPosition:0};e._attributeLocations=P,E.push({name:"aPosition",index:P.aPosition,vertexBuffer:w,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var A=t$Y.createIndexBuffer({context:t,typedArray:T,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),L=t$Y.createIndexBuffer({context:t,typedArray:C,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});e._lineCommand=new i$_({primitiveType:W$18.LINES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!0}),e._lineCommand.vertexArray=new c$12({context:t,attributes:E,indexBuffer:A}),e._lineCommand.shaderProgram=r$13.fromCache({name:"ProjectionImageLine",context:t,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:P}),e._lineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var M=[];for(_=0;_<6;_++)M[_]=new e$29(0,0,0,0);e._lineCommand.uniformMap={uDiffuseColor:function(){return e._hintLineColor},clip_mode:function(){return 0},clip_planes:function(){return M},clip_line_color:function(){return e$29.UNIT_W}},e._stencilCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ProjectionImage,owner:e,cull:!0}),e._stencilCommand.vertexArray=new c$12({context:t,attributes:E,indexBuffer:L}),e._stencilCommand.shaderProgram=r$13.fromCache({name:"ProjectionImageStencil",context:t,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:P});var R=e._mode===_0x23afcf.ProjectToPlane?{enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.DECREMENT_WRAP,zPass:n$Y.KEEP},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.DECREMENT_WRAP,zPass:n$Y.KEEP},reference:0,mask:1}:{enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.INCREMENT_WRAP},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:0,mask:65535};e._stencilCommand.renderState=d$1m.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:R,stencilMask:1}),e._stencilCommand.uniformMap={uDiffuseColor:function(){return e$29.UNIT_W},clip_mode:function(){return 0},clip_planes:function(){return M},clip_line_color:function(){return e$29.UNIT_W}},e._colorCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ProjectionImage,owner:e,cull:!0}),e._colorCommand.vertexArray=new c$12({context:t,attributes:E,indexBuffer:L});var O=new s$U({name:"ViewShedAnalysisVp",sources:[_0x2f8522]});e._colorCommand.shaderProgram=r$13.fromCache({name:"ProjectionImageColor",context:t,vertexShaderSource:O,fragmentShaderSource:_0x48873e,attributeLocations:P}),R=e._mode===_0x23afcf.ProjectToPlane?{enabled:!0,frontFunction:m$X.EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},backFunction:m$X.EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:3,mask:3}:{enabled:!0,frontFunction:m$X.NOT_EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},backFunction:m$X.NOT_EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:0,mask:65535},e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:R,blending:Ee$r.ALPHA_BLEND}),e._colorCommand.uniformMap={uRenderTextureMatrix:function(){return e._renderTextureMatrix},uPolygonTextureMatrix:function(){return e._polygonTextureMatrix},uTexture1_size:function(){var t=e._cameraDepthBuffer.depthTexture;return new o$1o(t.width,t.height)},uTexture1:function(){return e._cameraDepthBuffer.depthTexture},uDiffuseTexture:function(){return e._texture},uPolygonTexture:function(){return e._polygonTexture},uPolygonMode:function(){return e._polygonMode},uBrightness:function(){return e._brightness},uContrast:function(){return e._contrast},uHue:function(){return e._hue},uSaturation:function(){return e._saturation},uOneOverGamma:function(){return 1/e._gamma},uFeatheringScale:function(){return e._featheringScale},uV3AffineX:function(){return e._v3AffineX},uV3AffineY:function(){return e._v3AffineY}}}function _0xaba1a4(e,t,i){return o$1p.distance(e.positionWC,t.center)>i||e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC).computeVisibility(t)===Ae$u.OUTSIDE}function _0x26954a(e){var t=s$S.queryStringValue(e,"VideoName"),i=s$S.queryFirstNode(e,"Fov"),n=s$S.queryNumericValue(i,"Horizontal"),r=s$S.queryNumericValue(i,"Vertical"),o=s$S.queryNumericValue(e,"Distance"),a=s$S.queryNumericValue(e,"Heading"),s=s$S.queryNumericValue(e,"Pitch"),l=s$S.queryNumericValue(e,"Roll"),u=s$S.queryFirstNode(e,"ViewPosition"),c=[0,0,0];c[0]=s$S.queryNumericValue(u,"X"),c[1]=s$S.queryNumericValue(u,"Y"),c[2]=s$S.queryNumericValue(u,"Z");var h=s$S.queryFirstNode(e,"Matrix"),d=s$S.queryStringValue(h,"U"),f=s$S.queryStringValue(h,"V");s$S.queryStringValue(h,"W");var p=d.split(","),_=new o$1p(parseFloat(p[0]),parseFloat(p[1]),parseFloat(p[2])),m=f.split(","),g=new o$1p(parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])),x=s$S.queryFirstNode(e,"Bounds"),v=void 0;if(x){var y=e$2a.toRadians(s$S.queryNumericValue(x,"Left")),$=e$2a.toRadians(s$S.queryNumericValue(x,"Top")),b=e$2a.toRadians(s$S.queryNumericValue(x,"Right")),T=new h$18(y,e$2a.toRadians(s$S.queryNumericValue(x,"Bottom")),b,$),C=o*Math.cos(e$2a.toRadians(s));C=s<0?-C:C;var S=c[2]+C;v=i$1c.fromRectangle3D(T,void 0,S)}return{videoName:t,viewPosition:c,heading:a,pitch:s,roll:l,horizontalFov:n,verticalFov:r,matrixU:_,matrixV:g,distance:o,boundingSphere:v}}function _0x5828c1(e,t){var i=document.getElementById("projection-image");e$2b(i)||((i=document.createElement("div")).setAttribute("id","projection-image"),document.body.appendChild(i));var n=document.createElement("video");return n.style="visibility:hidden;position:absolute;top:0px;left:0px;",n.setAttribute("width","320"),n.setAttribute("height","240"),n.setAttribute("autoplay","autoplay"),n.setAttribute("loop","loop"),n.setAttribute("crossorigin","crossorigin"),n.setAttribute("src",e),n.setAttribute("id","projection-image-"+t),i.appendChild(n),n}function _0x21843f(e,t){for(var i=o$1p.fromDegreesArrayHeights(t),n=new z$_({polygonHierarchy:{positions:i},vertexFormat:{bitangent:!1,color:!1,normal:!1,position:!0,st:!1,tangent:!1},perPositionHeight:!0}),r=z$_.createGeometry(n),o=[],a=1;a<i.length-1;a++)o.push(0),o.push(a),o.push(a+1);r.indices=o;var s=new p$1d;p$1d.inverse(e._invertViewMatrix,s),f$X.updateGeometry(r,t,s);var l=new f$X;return l._geometry=r,l}function _0x440625(e,t,i){if(e._polygonUpdate&&0!==e._polygonRegions.values.length){e._polygonUpdate=!1;var n=new t$X({color:new e$1U(0,0,0,0),depth:1});n.framebuffer=new t$W({context:t,colorTextures:[e._polygonTexture],destroyAttachments:!1}),n.renderState=d$1m.fromCache(),n.execute(t);for(var r=0;r<e._polygonRegions.values.length;r++){var o=e._polygonRegions.values[r];_0x18d892(e,t,o,e._polygonTexture),o._command.execute(t)}n.framebuffer.destroy()}}function _0x18d892(e,t,i,n){if(e$2b(i)&&!e$2b(i._command)){var r=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix});i._command=r;var o={position:0};r.vertexArray=c$12.fromGeometry({context:t,geometry:i._geometry,attributeLocations:o,bufferUsage:A$19.STATIC_DRAW,interleave:!0});var a=new s$U({sources:["attribute vec4 position;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n}\n"]}),s=new s$U({sources:["void main()\n{\n gl_FragColor = vec4(1.0);\n}\n"]});r.shaderProgram=r$13.fromCache({name:"ProjectionImageRasterRegion",context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:o}),r.framebuffer=new t$W({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=d$1m.fromCache({cull:{enabled:!1}})}}function _0x14e50b(e,t){if(e$2b(e._colorCommand)){var i=e._scene._context,n=e._colorCommand.shaderProgram.name,r=e._colorCommand.shaderProgram.fragmentShaderSource,o=e._colorCommand.shaderProgram.vertexShaderSource,a=r.defines.indexOf("CLIPPOLYGON");t?a<0&&r.defines.push("CLIPPOLYGON"):a>=0&&r.defines.splice(a,1),e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=r$13.fromCache({name:n,context:i,vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:e._attributeLocations})}}function p$Z(){if(!e$2b(i$V._canTransferArrayBuffer)){var e=new Worker(w$T("Workers/transferTypedArrayTest.js"));e.postMessage=u$_(e.webkitPostMessage,e.postMessage);var t=new Int8Array([99]);try{e.postMessage({array:t},[t.buffer])}catch{return i$V._canTransferArrayBuffer=!1,i$V._canTransferArrayBuffer}var i=o$1l.defer();e.onmessage=function(t){var n=t.data.array,r=e$2b(n)&&99===n[0];i.resolve(r),e.terminate(),i$V._canTransferArrayBuffer=r},i$V._canTransferArrayBuffer=i.promise}return i$V._canTransferArrayBuffer}_0x3065eb.prototype.update=function(e,t,i){if(!t._fboState.enabled&&this._visible){var n=t.camera;if(!n.bReflect&&(!e$2b(this._boundingSphereFromXML)||!_0xaba1a4(n,this._boundingSphereFromXML,this._visibleDistanceMax))&&(0===this._boundingSphere.radius||this._update||!_0xaba1a4(n,this._boundingSphere,this._visibleDistanceMax))&&(p$1d.multiply(this._viewProjMatrix,n.inverseViewMatrix,this._renderTextureMatrix),p$1d.multiply(this._polygonViewProjMatrix,n.inverseViewMatrix,this._polygonTextureMatrix),e$2b(this._video)&&this._video.readyState>=2&&(e$2b(this._texture)&&this._texture!==e.defaultTexture?this._texture.copyFrom(this._video):this._texture=new t$V({context:e,source:this._video})),e$2b(this._texture))){var r=this._scene;if(this._update&&(this._frameState=t,e$2b(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new s$T(e),this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),this._update=!1,_0x476352(this),_0x157bd9(this,e,t),_0x2e71f2(this,e)),this._polygonUpdate&&_0x440625(this,e),e$2b(this._cameraDepthBuffer.depthTexture)){if(!e$2b(this._planeCommand)&&this._mode===_0x23afcf.ProjectToPlane&&(_0x1f4b4f(this,e),e$2b(this._fusionLayers)&&this._fusionLayers.length>0))for(var o=0,a=this._fusionLayers.length;o<a;o++){var s=this._fusionLayers[o];s.enableFusion=!0,s.panOffset=r.screenSpaceCameraController.panOffset}if(e$2b(this._planeCommand)&&this._mode===_0x23afcf.ProjectToPlane)return(r.screenSpaceCameraController.panDirty||r.screenSpaceCameraController.zoomDirty)&&(this._planeCommand.vertexArray=this._planeCommand.vertexArray&&this._planeCommand.vertexArray.destroy(),this._planeCommand.shaderProgram=this._planeCommand.shaderProgram&&this._planeCommand.shaderProgram.destroy(),_0x1f4b4f(this,e)),void i.push(this._planeCommand);e$2b(this._clearStencilCommand)&&i.push(this._clearStencilCommand),e$2b(this._stencilCommand)&&i.push(this._stencilCommand),e$2b(this._colorCommand)&&i.push(this._colorCommand),e$2b(this._lineCommand)&&this._hintLineVisible&&i.push(this._lineCommand)}}}},_0x3065eb.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~3");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,e$2b(this._cameraDepthBuffer)&&(this._cameraDepthBuffer._visibleViewport=this._visibleViewport)},_0x3065eb.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~3");return 1<<e&this._visibleViewport},_0x3065eb.prototype.setImage=function(e){if(LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.url)&&!e$2b(e.video)&&!e$2b(e.image))throw new t$16("options.url or options.video or options.image are required.");if(e$2b(e.url)){var t=e.url,i=this;o$1l(t$T(t),(function(e){i._texture!==i._scene._context.defaultTexture&&(i._texture=i._texture&&i._texture.destroy()),i._texture=new t$V({context:i._scene._context,source:e})}))}else e$2b(e.image)?e$2b(this._texture)?this._texture.copyFrom(e.image):this._texture=new t$V({context:this._scene._context,source:e.image}):this._video=e.video},_0x3065eb.prototype.setDistDirByPoint=function(e){if(LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),e[0]===this._viewPosition[0]&&e[1]===this._viewPosition[1]&&e[2]===this._viewPosition[2])throw new t$16("the position is [longitude, latitude ,height] and is not equals viewPosition");var t,i,n=(l=this._scene._frameState.camera)._projection;if(this._scene.mode===C$13.SCENE3D)t=o$1p.fromDegreesArrayHeights(e)[0],i=o$1p.fromDegreesArrayHeights(this._viewPosition)[0];else{var r=a$18.fromDegrees(e[0],e[1],e[2]);t=n.project(r,new o$1p);var o=a$18.fromDegrees(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]);i=n.project(o,new o$1p)}var a=new o$1p;o$1p.subtract(t,i,a);var s=o$1p.magnitude(a);o$1p.normalize(a,a),this.distance=s;var l,u=(l=this._scene._frameState.camera).heading,c=l.pitch,h=l.roll,d=new o$1p;o$1p.clone(l.position,d);var f=a.clone(),p=i.clone();p=o$1p.normalize(p,p),Math.abs(o$1p.dot(p,f))>=1&&(p=Math.abs(o$1p.dot(f,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,p):o$1p.clone(o$1p.UNIT_Z,p));var _=new o$1p;o$1p.cross(p,f,_),_=o$1p.normalize(_,_),o$1p.cross(f,_,p),p=o$1p.normalize(p,p),l.setView({destination:i,orientation:{direction:f,up:p},convert:!1}),this.direction=l.heading*e$2a.DEGREES_PER_RADIAN,this.pitch=l.pitch*e$2a.DEGREES_PER_RADIAN,l.setView({destination:d,orientation:{heading:u,pitch:c,roll:h},convert:!1})},_0x3065eb.prototype.pixelToWorldCoordinates=function(e,t){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");var i=this._scene.context,n=this._texture.width,r=this._texture.height,o=e/n*i.drawingBufferWidth,a=i.drawingBufferHeight-t/r*i.drawingBufferHeight;i.drawingBufferHeight;var s=i.readPixels({x:o,y:a,width:1,height:1,framebuffer:this._cameraDepthBuffer.framebuffer}),l=e$29.unpack(s,0,_0x478721);e$29.divideByScalar(l,255,l);var u=e$29.dot(l,_0x3e2ac7),c=p$1d.inverse(this._viewProjMatrix,new p$1d),h=new e$29,d=this._scene._view.passState.viewport;h.x=(o-d.x)/d.width*2-1,h.y=(a-d.y)/d.height*2-1,i.webgpu?h.z=u:h.z=2*u-1,h.w=1;var f=p$1d.multiplyByVector(c,h,new e$29);n=1/f.w;return o$1p.multiplyByScalar(f,n,f),o$1p.fromCartesian4(f,new o$1p)},_0x3065eb.prototype.pixelToWorldCoordinates=function(e,t){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");var i=this._scene.context,n=this._texture.width,r=this._texture.height,o=e/n*i.drawingBufferWidth,a=i.drawingBufferHeight-t/r*i.drawingBufferHeight,s=this;return i.readPixelsAsync({x:o,y:a,width:1,height:1,framebuffer:s._cameraDepthBuffer.framebuffer}).then((e=>{var t=e$29.unpack(e,0,_0x478721);e$29.divideByScalar(t,255,t);var n=e$29.dot(t,_0x3e2ac7),r=p$1d.inverse(s._viewProjMatrix,new p$1d),l=new e$29,u=s._scene._view.passState.viewport;l.x=(o-u.x)/u.width*2-1,l.y=(a-u.y)/u.height*2-1,i.webgpu?l.z=n:l.z=2*n-1,l.w=1;var c=p$1d.multiplyByVector(r,l,new e$29),h=1/c.w;o$1p.multiplyByScalar(c,h,c),Promise.resolve(o$1p.fromCartesian4(c,new o$1p))}))},_0x3065eb.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),""===this._name&&(this._name="projectionimage"+this._scene._analyst3D._layerIndex,this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},_0x3065eb.prototype.setInfo=function(e){if(LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),!e$2b(e))throw new t$16("No url provided.");var t=this;return d$1f(e).then((function(e){var i=_0x26954a(e.firstChild);t.direction=i.heading,t.pitch=u$_(i.pitch,t.pitch),t._roll=u$_(i.roll,t._roll),t.horizontalFov=i.horizontalFov,t.verticalFov=i.verticalFov,o$1p.clone(i.matrixU,t._v3AffineX),o$1p.clone(i.matrixV,t._v3AffineY),t.distance=i.distance,t.viewPosition=i.viewPosition,t._boundingSphereFromXML=i.boundingSphere})).otherwise((function(e){console.error(e)}))},_0x3065eb.fromInfo=function(e,t,i){if(!e$2b(e))throw new t$16("No scene provided.");if(!e$2b(t))throw new t$16("No url provided.");return d$1f(t).then((function(n){for(var r={},o=n.firstChild,a=0,s=o.children.length;a<s;a++){var l=_0x26954a(o.children[a]),u=l.videoName;u=e$2b(i)?n$18(i)+l.videoName:t.slice(0,t.lastIndexOf("/")+1)+l.videoName;var c=new _0x3065eb(e),h=_0x5828c1(u,c._guid);c.viewPosition=l.viewPosition,c.direction=l.heading,c.pitch=l.pitch,c.horizontalFov=l.horizontalFov,c.verticalFov=l.verticalFov,o$1p.clone(l.matrixU,c._v3AffineX),o$1p.clone(l.matrixV,c._v3AffineY),c.distance=l.distance,c.setImage({video:h}),c._boundingSphereFromXML=l.boundingSphere,h.addEventListener("loadeddata",function(e){e.build()}.bind(h,c)),r[l.videoName]=c}return r})).otherwise((function(e){console.error(e)}))},_0x3065eb.prototype.destroy=function(){var e=document.getElementById("projection-image-"+this._guid);if(e){var t=e.parentNode;t.removeChild(e),0===t.children.length&&t.parentNode.removeChild(t)}e$2b(this._frameState)&&(e$2b(this._cameraDepthBuffer)&&delete this._frameState._framebufferList[this._cameraName],this._frameState=void 0),this._cameraDepthBuffer=this._cameraDepthBuffer&&this._cameraDepthBuffer.destroy(),_0x476352(this),this._clearStencilCommand=void 0,this._texture!==this._scene._context.defaultTexture&&(this._texture=this._texture&&this._texture.destroy());for(var i=0;i<this._polygonRegions.values.length;i++)this._polygonRegions.values[i].destroy(),this._polygonRegions.values[i]=null;if(e$2b(this._polygonTexture)&&(this._polygonTexture.destroy(),this._polygonTexture=null),this._scene._analyst3D.remove(this._name,!0),this._scene.context.curFusionViewMatrix=void 0,this._scene.screenSpaceCameraController.enableFusion=!1,e$2b(this._fusionLayers)){i=0;for(var n=this._fusionLayers.length;i<n;i++){var r=this._fusionLayers[i];r.enableFusion&&(r.enableFusion=!1)}}return this._fusionLayers=void 0,i$10(this)},_0x3065eb.prototype.setClipMode=function(e){this._polygonMode=e},_0x3065eb.prototype.addClipRegion=function(e){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");var t=e.name,i=e.position;if(!e$2b(t)||!e$2b(i))return!1;if(e$2b(this._polygonRegions.get(t)))return!1;var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;e$2b(this._polygonTexture)||(this._polygonTexture=new t$V({context:this._scene._context,width:n,height:r,pixelFormat:V$10.RGBA}));var o=_0x21843f(this,i);this._polygonRegions.set(t,o),this._polygonUpdate=!0;var a=this._frameState.camera;return p$1d.multiply(a.frustum.projectionMatrix,a.viewMatrix,this._polygonViewProjMatrix),_0x14e50b(this,!0),!0},_0x3065eb.prototype.removeClipRegion=function(e){return LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),!!this._polygonRegions.remove(e)&&(this._polygonUpdate=!0,0===this._polygonRegions.values.length&&_0x14e50b(this,!1),!0)},_0x3065eb.prototype.removeAllClipRegion=function(){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");for(var e=0;e<this._polygonRegions.values.length;e++)this._polygonRegions.values[e].destroy(),this._polygonRegions.values[e]=null;this._polygonRegions.removeAll(),this._polygonUpdate=!0,_0x14e50b(this,!1)},_0x3065eb.prototype.setFusionLayers=function(e){LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),Array.isArray(e)||(e=[e]),this._fusionLayers=e};var c$11=new o$1h,k$W;function v$M(e,t){"indexedDBWorker"===e._workerName?--e._activeIndexedDBTasks:"websocketTaskProcessor"!=e._workerName&&--e._activeTasks;var i=t.id;if(e$2b(i)){var n=e._deferreds,r=n[i];if(e$2b(t.error)){var o=t.error;"RuntimeError"===o.name?(o=new t$14(t.error.message)).stack=t.error.stack:"DeveloperError"===o.name&&((o=new t$16(t.error.message)).stack=t.error.stack),c$11.raiseEvent(o),r.reject(o)}else c$11.raiseEvent(),r.resolve(t.result);delete n[i]}}function w$T(e){var t=n$15(e);if(i$18(t)){var i,n='importScripts("'+t+'");';try{i=new Blob([n],{type:"application/javascript"})}catch{var r=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);r.append(n),i=r.getBlob("application/javascript")}t=(window.URL||window.webkitURL).createObjectURL(i)}return t}function x$15(){return e$2b(k$W)||(k$W=w$T("Workers/cesiumWorkerBootstrapper.js")),k$W}function h$_(e){var t=new Worker(x$15());t.postMessage=u$_(t.webkitPostMessage,t.postMessage);var i={loaderConfig:{paths:{Workers:n$15("Workers")},baseUrl:n$15.getCesiumBaseUrl().url},workerModule:i$V._workerModulePrefix+e._workerName};return t.postMessage(i),t.onmessage=function(t){v$M(e,t.data)},t}function P$Z(e,t){var i={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};return s$Y.supportsWebAssembly()?(i.modulePath=n$15(t.modulePath),i.wasmBinaryFile=n$15(t.wasmBinaryFile),t$11.fetchArrayBuffer({url:i.wasmBinaryFile}).then((function(e){return i.wasmBinary=e,i}))):(i.modulePath=n$15(t.fallbackModulePath),o$1l.resolve(i))}function i$V(e,t){this._workerName=e,this._maximumActiveTasks=u$_(t,5),this._activeTasks=0,this._deferreds={},this._activeIndexedDBTasks=0,this._nextID=0}var D$Y=[];i$V.prototype.scheduleTask=function(e,t){if(e$2b(this._worker)||(this._worker=h$_(this)),"indexedDBWorker"===this._workerName){if(this._activeIndexedDBTasks>=this._maximumActiveTasks)return;++this._activeIndexedDBTasks}else{if(this._activeTasks>=this._maximumActiveTasks)return;"websocketTaskProcessor"!=this._workerName&&++this._activeTasks}var i=this;return o$1l(p$Z(),(function(n){e$2b(t)?n||(t.length=0):t=D$Y;var r=i._nextID++,o=o$1l.defer();return i._deferreds[r]=o,i._worker.postMessage({id:r,parameters:e,canTransferArrayBuffer:n},t),o.promise}))},i$V.prototype.initWebAssemblyModule=function(e){e$2b(this._worker)||(this._worker=h$_(this));var t=o$1l.defer(),i=this,n=this._worker;return P$Z(this,e).then((function(e){return o$1l(p$Z(),(function(r){var o,a=e.wasmBinary;e$2b(a)&&r&&(o=[a]),n.onmessage=function(e){n.onmessage=function(e){v$M(i,e.data)},t.resolve(e.data)},n.postMessage({webAssemblyConfig:e},o)}))})),t},i$V.prototype.isDestroyed=function(){return!1},i$V.prototype.destroy=function(){return e$2b(this._worker)&&this._worker.terminate(),i$10(this)},i$V.taskCompletedEvent=c$11,i$V._defaultWorkerModulePrefix="Workers/",i$V._workerModulePrefix=i$V._defaultWorkerModulePrefix,i$V._canTransferArrayBuffer=void 0;var _0x4f2eef=(_0x34cc5b=!0,function(e,t){var i=_0x34cc5b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x34cc5b=!1,i}),_0x500ec9=_0x4f2eef(void 0,(function(){return _0x500ec9.toString().search("(((.+)+)+)+$").toString().constructor(_0x500ec9).search("(((.+)+)+)+$")})),_0x34cc5b;_0x500ec9();var _0x26c9cf="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nattribute vec2 offset;\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying vec2 vOffset;\n\nfloat computerOnePixelLength(vec4 viewPos)\n{\n vec4 winPos = czm_projection * viewPos;\n float dwidth = czm_metersPerPixel(viewPos);\n winPos.x = winPos.x - 2.0 * dwidth;\n vec4 newViewPos = czm_inverseProjection * winPos;\n return length(viewPos - newViewPos);\n}\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n float radius = 10.0;\n vec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n viewPos.xy = viewPos.xy + offset * computerOnePixelLength(viewPos) * radius;\n gl_Position = czm_projection * viewPos;\n vTexCoord = aTexCoord0.xy;\n vOffset = offset;\n //clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n}",_0x323fd7=(_0x239c3b=!0,function(e,t){var i=_0x239c3b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x239c3b=!1,i}),_0x44c61b=_0x323fd7(void 0,(function(){return _0x44c61b.toString().search("(((.+)+)+)+$").toString().constructor(_0x44c61b).search("(((.+)+)+)+$")})),_0x239c3b;_0x44c61b();var _0x4e4501="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uTexture0;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying vec2 vOffset;\n\nfloat fade(in float low, in float high, in float value)\n{\n\tfloat mid = (low + high) * 0.5;\n\tfloat range = (high - low) * 0.5;\n\tfloat x = 1.0 - clamp(abs(mid - value) / range, 0.0, 1.0);\n\treturn x;\n}\n\nvec3 getColor(in float intensity)\n{\n\tvec3 blue = vec3(0.0, 0.0, 1.0);\n\tvec3 cyan = vec3(0.0, 1.0, 1.0);\n\tvec3 green = vec3(0.0, 1.0, 0.0);\n\tvec3 yellow = vec3(1.0, 1.0, 0.0);\n\tvec3 red = vec3(1.0, 0.0, 0.0);\n\tvec3 color = fade(-0.25, 0.25, intensity) * blue + fade(0.0, 0.5, intensity) * cyan + fade(0.25, 0.75, intensity) * green + \n\t\t\t\tfade(0.5, 1.0, intensity) * yellow + smoothstep(0.75, 1.0, intensity) * red;\n\treturn color;\n}\n#ifdef COLOR_TABLE\nuniform sampler2D uHypsometricTexture;\nvec4 getContourMapColor(in float intensity){\n float count = floor(intensity * 16.0);\n float y = (count * 2.0 + 1.0) / 32.0;\n float x = fract(intensity * 16.0);\n return texture2D(uHypsometricTexture, vec2(x, y));\n}\n#endif\n\nvoid main()\n{\n\tvec2 texcoord = vTexCoord.xy * 0.5 + 0.5;\n\tfloat fIntensity = czm_unpackDepth(texture2D(uTexture0, texcoord.xy));\n float dist = 1.0 - length(vOffset);\n\tif(dist < 0.5)\n\t{\n\t\tdiscard;\n\t}\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef COLOR_TABLE\n\tgl_FragColor = getContourMapColor(fIntensity);\n#else\n\tgl_FragColor = vec4(getColor(fIntensity), 1.0);\n#endif\n}",_0x1f2427=(_0x5b70bd=!0,function(e,t){var i=_0x5b70bd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b70bd=!1,i}),_0x5592b7=_0x1f2427(void 0,(function(){return _0x5592b7.toString().search("(((.+)+)+)+$").toString().constructor(_0x5592b7).search("(((.+)+)+)+$")})),_0x5b70bd;_0x5592b7();var _0x2328b4="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nattribute vec2 offset;\n\nvarying vec4 vPositionEC;\nvarying vec2 vTexcoord;\n\nfloat computerOnePixelLength(vec4 viewPos)\n{\n vec4 winPos = czm_projection * viewPos;\n float dwidth = czm_metersPerPixel(viewPos);\n winPos.x = winPos.x - 2.0 * dwidth;\n vec4 newViewPos = czm_inverseProjection * winPos;\n return length(viewPos - newViewPos);\n}\n\nvoid main()\n{\n\tvTexcoord = aTexCoord0.xy * 0.5 + 0.5;\n\t//vTexcoord.y = 1.0 - vTexcoord.y;\n\tvPositionEC = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec2 pixelLength = 1.0 / czm_viewport.zw;\n\tgl_Position = vec4(aTexCoord0.xy + pixelLength * offset * 4.0, 0.5, 1.0);\n}",_0x2c47d8=(_0x5c0ac6=!0,function(e,t){var i=_0x5c0ac6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c0ac6=!1,i}),_0x24540e=_0x2c47d8(void 0,(function(){return _0x24540e.toString().search("(((.+)+)+)+$").toString().constructor(_0x24540e).search("(((.+)+)+)+$")})),_0x5c0ac6;_0x24540e();var _0x485098="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform float uSpacing;\nuniform sampler2D shadowMap_texture;\nuniform sampler2D uAssisTexture;\n\nvarying vec4 vPositionEC;\nvarying vec2 vTexcoord;\n\n#define inline\nfloat sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture2D(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\n\n\n#define inline\nfloat shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, sampleShadowMap(shadowMap, uv));\n}\n\nvoid main()\n{\n\tgl_FragColor = texture2D(uAssisTexture, vTexcoord);\n\tvec4 positionEC = vPositionEC;\n\tfloat depth = -positionEC.z;\n\tvec4 weights = czm_cascadeWeights(depth);\n\tvec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;\n\tfloat visibility = shadowDepthCompare(shadowMap_texture, shadowPosition.xy, shadowPosition.z);\n\tif(visibility < 0.001)\n\t{\n\t\treturn;\n\t}\n\tif(depth > shadowMap_cascadeSplits[1].w)\n\t{\n\t\treturn;\n\t}\n\tfloat oldIntensity = czm_unpackDepth(gl_FragColor);\n\tfloat intensity = oldIntensity + uSpacing;\n\tintensity = clamp(intensity, 0.0, 0.9999);\n\tgl_FragColor = czm_packDepth(intensity);\n}",B$W=new o$1p;function o$17(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).minimum,i=e.maximum;if(o$1q.typeOf.object("min",t),o$1q.typeOf.object("max",i),e$2b(e.offsetAttribute)&&e.offsetAttribute===_0x58701d.TOP)throw new t$16("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=o$1p.clone(t),this._max=o$1p.clone(i),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}o$17.fromDimensions=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).dimensions;o$1q.typeOf.object("dimensions",t),o$1q.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=o$1p.multiplyByScalar(t,.5,new o$1p);return new o$17({minimum:o$1p.negate(i,new o$1p),maximum:i,offsetAttribute:e.offsetAttribute})},o$17.fromAxisAlignedBoundingBox=function(e){return o$1q.typeOf.object("boundindBox",e),new o$17({minimum:e.minimum,maximum:e.maximum})},o$17.packedLength=2*o$1p.packedLength+1,o$17.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),o$1p.pack(e._min,t,i),o$1p.pack(e._max,t,i+o$1p.packedLength),t[i+2*o$1p.packedLength]=u$_(e._offsetAttribute,-1),t};var y$U=new o$1p,A$16=new o$1p,v$L={minimum:y$U,maximum:A$16,offsetAttribute:void 0};function o$16(e,t,i,n){e=u$_(e,1),t=u$_(t,1),i=u$_(i,1),n=u$_(n,1),this.value=new Uint8Array([e$1U.floatToByte(e),e$1U.floatToByte(t),e$1U.floatToByte(i),e$1U.floatToByte(n)])}function l$11(e){e=u$_(e,u$_.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=u$_(e.near,1),this._near=this.near,this.far=u$_(e.far,5e8),this._far=this.far,this._cullingVolume=new i$W,this._perspectiveMatrix=new p$1d,this._infinitePerspective=new p$1d}function z$U(e){if(!(e$2b(e.right)&&e$2b(e.left)&&e$2b(e.top)&&e$2b(e.bottom)&&e$2b(e.near)&&e$2b(e.far)))throw new t$16("right, left, top, bottom, near, or far parameters are not set.");var t=e.top,i=e.bottom,n=e.right,r=e.left,o=e.near,a=e.far;if(t!==e._top||i!==e._bottom||r!==e._left||n!==e._right||o!==e._near||a!==e._far){if(e.near<=0||e.near>e.far)throw new t$16("near must be greater than zero and less than far.");e._left=r,e._right=n,e._top=t,e._bottom=i,e._near=o,e._far=a,e._perspectiveMatrix=p$1d.computePerspectiveOffCenter(r,n,i,t,o,a,e._perspectiveMatrix),e._infinitePerspective=p$1d.computeInfinitePerspectiveOffCenter(r,n,i,t,o,e._infinitePerspective)}}o$17.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=o$1p.unpack(e,t,y$U),r=o$1p.unpack(e,t+o$1p.packedLength,A$16),o=e[t+2*o$1p.packedLength];return e$2b(i)?(i._min=o$1p.clone(n,i._min),i._max=o$1p.clone(r,i._max),i._offsetAttribute=-1===o?void 0:o,i):(v$L.offsetAttribute=-1===o?void 0:o,new o$17(v$L))},o$17.createGeometry=function(e){var t=e._min,i=e._max;if(!o$1p.equals(t,i)){var n=new a$_,r=new Uint16Array(24),o=new Float64Array(24);o[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=i.x,o[4]=t.y,o[5]=t.z,o[6]=i.x,o[7]=i.y,o[8]=t.z,o[9]=t.x,o[10]=i.y,o[11]=t.z,o[12]=t.x,o[13]=t.y,o[14]=i.z,o[15]=i.x,o[16]=t.y,o[17]=i.z,o[18]=i.x,o[19]=i.y,o[20]=i.z,o[21]=t.x,o[22]=i.y,o[23]=i.z,n.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:o}),r[0]=4,r[1]=5,r[2]=5,r[3]=6,r[4]=6,r[5]=7,r[6]=7,r[7]=4,r[8]=0,r[9]=1,r[10]=1,r[11]=2,r[12]=2,r[13]=3,r[14]=3,r[15]=0,r[16]=0,r[17]=4,r[18]=1,r[19]=5,r[20]=2,r[21]=6,r[22]=3,r[23]=7;var a=o$1p.subtract(i,t,B$W),s=.5*o$1p.magnitude(a);if(e$2b(e._offsetAttribute)){var l=o.length,u=new Uint8Array(l/3);d$1s(u,e._offsetAttribute===_0x58701d.NONE?0:1),n.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return new I$1p({attributes:n,indices:r,primitiveType:W$18.LINES,boundingSphere:new i$1c(o$1p.ZERO,s),offsetAttribute:e._offsetAttribute})}},Object.defineProperties(o$16.prototype,{componentDatatype:{get:function(){return S$12.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}}),o$16.fromColor=function(e){if(!e$2b(e))throw new t$16("color is required.");return new o$16(e.red,e.green,e.blue,e.alpha)},o$16.toValue=function(e,t){if(!e$2b(e))throw new t$16("color is required.");return e$2b(t)?e.toBytes(t):new Uint8Array(e.toBytes())},o$16.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]},Object.defineProperties(l$11.prototype,{projectionMatrix:{get:function(){return z$U(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return z$U(this),this._infinitePerspective}}});var B$V=new o$1p,O$J=new o$1p,S$R=new o$1p,V$S=new o$1p;function o$15(e){e=u$_(e,u$_.EMPTY_OBJECT),this._offCenterFrustum=new l$11,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=u$_(e.near,1),this._near=this.near,this.far=u$_(e.far,5e8),this._far=this.far,this.xOffset=u$_(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=u$_(e.yOffset,0),this._yOffset=this.yOffset,this.reflect=!1}function f$W(e){if(!(e$2b(e.fov)&&e$2b(e.aspectRatio)&&e$2b(e.near)&&e$2b(e.far)))throw new t$16("fov, aspectRatio, near, or far parameters are not set.");var t=e._offCenterFrustum;if(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset){if(e.fov<0||e.fov>=Math.PI)throw new t$16("fov must be in the range [0, PI).");if(e.aspectRatio<0)throw new t$16("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new t$16("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset}}l$11.prototype.resetProjectionMatrix=function(){if(!(e$2b(this.right)&&e$2b(this.left)&&e$2b(this.top)&&e$2b(this.bottom)&&e$2b(this.near)&&e$2b(this.far)))throw new t$16("right, left, top, bottom, near, or far parameters are not set.");var e=this.top,t=this.bottom,i=this.right,n=this.left,r=this.near,o=this.far;if(this.near<=0||this.near>this.far)throw new t$16("near must be greater than zero and less than far.");this._left=n,this._right=i,this._top=e,this._bottom=t,this._near=r,this._far=o,this._perspectiveMatrix=p$1d.computePerspectiveOffCenter(n,i,t,e,r,o,this._perspectiveMatrix),this._infinitePerspective=p$1d.computeInfinitePerspectiveOffCenter(n,i,t,e,r,this._infinitePerspective)},l$11.prototype.computeCullingVolume=function(e,t,i,n){if(!e$2b(e))throw new t$16("position is required.");if(!e$2b(t))throw new t$16("direction is required.");if(!e$2b(i))throw new t$16("up is required.");var r=this._cullingVolume.planes,o=u$_(n,0);o=Math.min(o,.5),o=Math.max(o,0);var a=this.top+this.top*o,s=this.bottom-this.top*o,l=this.right+this.right*o,u=this.left-this.right*o,c=this.near,h=this.far,d=o$1p.cross(t,i,B$V),f=O$J;o$1p.multiplyByScalar(t,c,f),o$1p.add(e,f,f);var p=S$R;o$1p.multiplyByScalar(t,h,p),o$1p.add(e,p,p);var _=V$S;o$1p.multiplyByScalar(d,u,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.normalize(_,_),o$1p.cross(_,i,_),o$1p.normalize(_,_);var m=r[0];return e$2b(m)||(m=r[0]=new e$29),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),o$1p.multiplyByScalar(d,l,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.cross(i,_,_),o$1p.normalize(_,_),e$2b(m=r[1])||(m=r[1]=new e$29),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),o$1p.multiplyByScalar(i,s,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.cross(d,_,_),o$1p.normalize(_,_),e$2b(m=r[2])||(m=r[2]=new e$29),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),o$1p.multiplyByScalar(i,a,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.cross(_,d,_),o$1p.normalize(_,_),e$2b(m=r[3])||(m=r[3]=new e$29),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),e$2b(m=r[4])||(m=r[4]=new e$29),m.x=t.x,m.y=t.y,m.z=t.z,m.w=-o$1p.dot(t,f),o$1p.negate(t,_),e$2b(m=r[5])||(m=r[5]=new e$29),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,p),this._cullingVolume},l$11.prototype.getPixelDimensions=function(e,t,i,n,r){if(z$U(this),!e$2b(e)||!e$2b(t))throw new t$16("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new t$16("drawingBufferWidth must be greater than zero.");if(t<=0)throw new t$16("drawingBufferHeight must be greater than zero.");if(!e$2b(i))throw new t$16("distance is required.");if(!e$2b(n))throw new t$16("pixelRatio is required");if(n<=0)throw new t$16("pixelRatio must be greater than zero.");if(!e$2b(r))throw new t$16("A result object is required.");var o=1/this.near,a=this.top*o,s=2*n*i*a/t,l=2*n*i*(a=this.right*o)/e;return r.x=l,r.y=s,r},l$11.prototype.clone=function(e){return e$2b(e)||(e=new l$11),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},l$11.prototype.equals=function(e){return e$2b(e)&&e instanceof l$11&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},l$11.prototype.equalsEpsilon=function(e,t,i){return e===this||e$2b(e)&&e instanceof l$11&&e$2a.equalsEpsilon(this.right,e.right,t,i)&&e$2a.equalsEpsilon(this.left,e.left,t,i)&&e$2a.equalsEpsilon(this.top,e.top,t,i)&&e$2a.equalsEpsilon(this.bottom,e.bottom,t,i)&&e$2a.equalsEpsilon(this.near,e.near,t,i)&&e$2a.equalsEpsilon(this.far,e.far,t,i)},o$15.isNDCHalfZRange=!1,o$15.packedLength=6,o$15.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e.fov,t[i++]=e.aspectRatio,t[i++]=e.near,t[i++]=e.far,t[i++]=e.xOffset,t[i]=e.yOffset,t},o$15.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$_(t,0),e$2b(i)||(i=new o$15),i.fov=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t++],i.xOffset=e[t++],i.yOffset=e[t],i},Object.defineProperties(o$15.prototype,{projectionMatrix:{get:function(){return f$W(this),this.reflect&&x$14(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return f$W(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return f$W(this),this._fovy}},sseDenominator:{get:function(){return f$W(this),this._sseDenominator}}}),o$15.prototype.resetProjectionMatrix=function(){return this._offCenterFrustum.resetProjectionMatrix()},o$15.prototype.computeCullingVolume=function(e,t,i,n){return f$W(this),this._offCenterFrustum.computeCullingVolume(e,t,i,n)},o$15.prototype.getPixelDimensions=function(e,t,i,n,r){return f$W(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n,r)},o$15.prototype.clone=function(e){return e$2b(e)||(e=new o$15),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e.reflect=this.reflect,e.clipPlane=this.clipPlane,e.currentViewMatrix=this.currentViewMatrix,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},o$15.prototype.equals=function(e){return!!(e$2b(e)&&e instanceof o$15)&&(f$W(this),f$W(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},o$15.prototype.equalsEpsilon=function(e,t,i){return!!(e$2b(e)&&e instanceof o$15)&&(f$W(this),f$W(e),e$2a.equalsEpsilon(this.fov,e.fov,t,i)&&e$2a.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))};var r$_=new o$1m(o$1p.UNIT_Z,1),h$Z=new e$29,c$10=new e$29,s$P=new e$29;function x$14(e){if(e$2b(e.clipPlane)&&e$2b(e.currentViewMatrix)){var t=e.currentViewMatrix,i=e._offCenterFrustum.projectionMatrix;p$1d.multiplyByPlane(t,e.clipPlane,r$_),h$Z.x=(e$2a.sign(r$_.normal.x)+i[8])/i[0],h$Z.y=(e$2a.sign(r$_.normal.y)+i[9])/i[5],h$Z.z=-1,h$Z.w=(1+i[10])/i[14],c$10.x=r$_.normal.x,c$10.y=r$_.normal.y,c$10.z=r$_.normal.z,c$10.w=r$_.distance,e$29.multiplyByScalar(c$10,2/e$29.dot(c$10,h$Z),s$P),i[2]=s$P.x,i[6]=s$P.y,i[10]=s$P.z+1,i[14]=s$P.w,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,i,i)}}var mi$5=new o$1p(1,1,1),B$U=Math.cos,S$Q=Math.sin;function x$13(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.radii,mi$5),i=u$_(e.innerRadii,t),n=u$_(e.minimumClock,0),r=u$_(e.maximumClock,e$2a.TWO_PI),o=u$_(e.minimumCone,0),a=u$_(e.maximumCone,e$2a.PI),s=Math.round(u$_(e.stackPartitions,10)),l=Math.round(u$_(e.slicePartitions,8)),u=Math.round(u$_(e.subdivisions,128));if(s<1)throw new t$16("options.stackPartitions cannot be less than 1");if(l<0)throw new t$16("options.slicePartitions cannot be less than 0");if(u<0)throw new t$16("options.subdivisions must be greater than or equal to zero.");if(e$2b(e.offsetAttribute)&&e.offsetAttribute===_0x58701d.TOP)throw new t$16("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=o$1p.clone(t),this._innerRadii=o$1p.clone(i),this._minimumClock=n,this._maximumClock=r,this._minimumCone=o,this._maximumCone=a,this._stackPartitions=s,this._slicePartitions=l,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}x$13.packedLength=2*o$1p.packedLength+8,x$13.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),o$1p.pack(e._radii,t,i),i+=o$1p.packedLength,o$1p.pack(e._innerRadii,t,i),i+=o$1p.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i++]=e._subdivisions,t[i]=u$_(e._offsetAttribute,-1),t};var K$S=new o$1p,Q$Y=new o$1p,b$18={radii:K$S,innerRadii:Q$Y,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};function a$U(e){var t=u$_(e.radius,1),i={radii:new o$1p(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new x$13(i),this._workerName="createSphereOutlineGeometry"}x$13.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n=o$1p.unpack(e,t,K$S);t+=o$1p.packedLength;var r=o$1p.unpack(e,t,Q$Y);t+=o$1p.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return e$2b(i)?(i._radii=o$1p.clone(n,i._radii),i._innerRadii=o$1p.clone(r,i._innerRadii),i._minimumClock=o,i._maximumClock=a,i._minimumCone=s,i._maximumCone=l,i._stackPartitions=u,i._slicePartitions=c,i._subdivisions=h,i._offsetAttribute=-1===d?void 0:d,i):(b$18.minimumClock=o,b$18.maximumClock=a,b$18.minimumCone=s,b$18.maximumCone=l,b$18.stackPartitions=u,b$18.slicePartitions=c,b$18.subdivisions=h,b$18.offsetAttribute=-1===d?void 0:d,new x$13(b$18))},x$13.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._subdivisions,l=t$13.fromCartesian3(t),u=e._slicePartitions+1,c=e._stackPartitions+1;(u=Math.round(u*Math.abs(r-n)/e$2a.TWO_PI))<2&&(u=2),(c=Math.round(c*Math.abs(a-o)/e$2a.PI))<2&&(c=2);var h=0,d=1,f=i.x!==t.x||i.y!==t.y||i.z!==t.z,p=!1,_=!1;f&&(d=2,o>0&&(p=!0,h+=u),a<Math.PI&&(_=!0,h+=u));var m,g,x,v,y=s*d*(c+u),$=new Float64Array(3*y),b=2*(y+h-(u+c)*d),T=ce$x.createTypedArray(y,b),C=0,S=new Array(c),w=new Array(c);for(m=0;m<c;m++)v=o+m*(a-o)/(c-1),S[m]=S$Q(v),w[m]=B$U(v);var E=new Array(s),P=new Array(s);for(m=0;m<s;m++)x=n+m*(r-n)/(s-1),E[m]=S$Q(x),P[m]=B$U(x);for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(S.length=s,w.length=s,m=0;m<s;m++)v=o+m*(a-o)/(s-1),S[m]=S$Q(v),w[m]=B$U(v);for(E.length=u,P.length=u,m=0;m<u;m++)x=n+m*(r-n)/(u-1),E[m]=S$Q(x),P[m]=B$U(x);for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(C=0,m=0;m<c*d;m++){var A=m*s;for(g=0;g<s-1;g++)T[C++]=A+g,T[C++]=A+g+1}var L=c*s*d;for(m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f)for(L=c*s*d+u*s,m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f){var M=c*s*d,R=M+s*u;if(p)for(m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m;if(_)for(M+=s*u-u,R+=s*u-u,m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m}var O=new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:$})});if(e$2b(e._offsetAttribute)){var I=$.length,D=new Uint8Array(I/3);d$1s(D,e._offsetAttribute===_0x58701d.NONE?0:1),O.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:D})}return new I$1p({attributes:O,indices:T,primitiveType:W$18.LINES,boundingSphere:i$1c.fromEllipsoid(l),offsetAttribute:e._offsetAttribute})}}},a$U.packedLength=x$13.packedLength,a$U.pack=function(e,t,i){return o$1q.typeOf.object("value",e),x$13.pack(e._ellipsoidGeometry,t,i)};var l$10=new x$13,s$O={radius:void 0,radii:new o$1p,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};function c$$(e,t,i,n,r,o,a,s,l,u,c){this._context=e,this._texture=t,this._textureTarget=i,this._targetFace=n,this._pixelDatatype=a,this._internalFormat=r,this._pixelFormat=o,this._size=s,this._preMultiplyAlpha=l,this._flipY=u,this._initialized=c}function X$Y(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t,i,n=e.context,r=e.source;if(e$2b(r)){var o=[r.positiveX,r.negativeX,r.positiveY,r.negativeY,r.positiveZ,r.negativeZ];if(!(o[0]&&o[1]&&o[2]&&o[3]&&o[4]&&o[5]))throw new t$16("options.source requires positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ faces.");t=o[0].width,i=o[0].height;for(var a=1;a<6;++a)if(Number(o[a].width)!==t||Number(o[a].height)!==i)throw new t$16("Each face in options.source must have the same width and height.")}else t=e.width,i=e.height;var s=t,l=u$_(e.pixelFormat,V$10.RGBA),u=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE),c=V$10.toInternalFormat(l,u,n);if(!e$2b(t)||!e$2b(i))throw new t$16("options requires a source field to create an initialized cube map or width and height fields to create a blank cube map.");if(t!==i)throw new t$16("Width must equal height.");if(s<=0)throw new t$16("Width and height must be greater than zero.");if(s>e$1T.maximumCubeMapSize)throw new t$16("Width and height must be less than or equal to the maximum cube map size ("+e$1T.maximumCubeMapSize+"). Check maximumCubeMapSize.");if(!V$10.validate(l))throw new t$16("Invalid options.pixelFormat.");if(V$10.isDepthFormat(l))throw new t$16("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!_$$.validate(u))throw new t$16("Invalid options.pixelDatatype.");if(u===_$$.FLOAT&&!n.floatingPointTexture)throw new t$16("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(u===_$$.HALF_FLOAT&&!n.halfFloatingPointTexture)throw new t$16("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");var h=6*V$10.textureSizeInBytes(l,u,s,s),d=e.preMultiplyAlpha||l===V$10.RGB||l===V$10.LUMINANCE,f=u$_(e.flipY,!0);const p=u$_(e.skipColorSpaceConversion,!1);var _=n._gl,m=_.TEXTURE_CUBE_MAP,g=_.createTexture();function x(e,i,r,o,a){var h=i.arrayBufferView;e$2b(h)||(h=i.bufferView);let d=4;e$2b(h)&&(d=V$10.alignmentInBytes(l,u,t)),_.pixelStorei(_.UNPACK_ALIGNMENT,d),a?_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,_.NONE):_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,_.BROWSER_DEFAULT_WEBGL),e$2b(h)?(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,!1),o&&(h=V$10.flipY(h,l,u,s,s)),_.texImage2D(e,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),h)):(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,o),_.texImage2D(e,0,c,l,_$$.toWebGLConstant(u,n),i))}_.activeTexture(_.TEXTURE0),_.bindTexture(m,g),e$2b(r)?(x(_.TEXTURE_CUBE_MAP_POSITIVE_X,r.positiveX,d,f,p),x(_.TEXTURE_CUBE_MAP_NEGATIVE_X,r.negativeX,d,f,p),x(_.TEXTURE_CUBE_MAP_POSITIVE_Y,r.positiveY,d,f,p),x(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,r.negativeY,d,f,p),x(_.TEXTURE_CUBE_MAP_POSITIVE_Z,r.positiveZ,d,f,p),x(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,r.negativeZ,d,f,p)):(_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_X,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_X,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Y,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Z,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,c,s,s,0,l,_$$.toWebGLConstant(u,n),null)),_.bindTexture(m,null),this._context=n,this._textureFilterAnisotropic=n._textureFilterAnisotropic,this._textureTarget=m,this._texture=g,this._pixelFormat=l,this._pixelDatatype=u,this._size=s,this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0;var v=e$2b(r);this._positiveX=new c$$(n,g,m,_.TEXTURE_CUBE_MAP_POSITIVE_X,c,l,u,s,d,f,v),this._negativeX=new c$$(n,g,m,_.TEXTURE_CUBE_MAP_NEGATIVE_X,c,l,u,s,d,f,v),this._positiveY=new c$$(n,g,m,_.TEXTURE_CUBE_MAP_POSITIVE_Y,c,l,u,s,d,f,v),this._negativeY=new c$$(n,g,m,_.TEXTURE_CUBE_MAP_NEGATIVE_Y,c,l,u,s,d,f,v),this._positiveZ=new c$$(n,g,m,_.TEXTURE_CUBE_MAP_POSITIVE_Z,c,l,u,s,d,f,v),this._negativeZ=new c$$(n,g,m,_.TEXTURE_CUBE_MAP_NEGATIVE_Z,c,l,u,s,d,f,v),this.sampler=e$2b(e.sampler)?e.sampler:new e$1P}function y$T(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t,i,n=e.context,r=e.source;if(e$2b(r)){var o=[r.positiveX,r.negativeX,r.positiveY,r.negativeY,r.positiveZ,r.negativeZ];if(!(o[0]&&o[1]&&o[2]&&o[3]&&o[4]&&o[5]))throw new t$16("options.source requires positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ faces.");t=o[0].width,i=o[0].height;for(var a=1;a<6;++a)if(Number(o[a].width)!==t||Number(o[a].height)!==i)throw new t$16("Each face in options.source must have the same width and height.")}else t=e.width,i=e.height;var s=t,l=u$_(e.pixelFormat,V$10.RGBA),u=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE);if(!e$2b(t)||!e$2b(i))throw new t$16("options requires a source field to create an initialized cube map or width and height fields to create a blank cube map.");if(t!==i)throw new t$16("Width must equal height.");if(s<=0)throw new t$16("Width and height must be greater than zero.");if(s>e$1T.maximumCubeMapSize)throw new t$16("Width and height must be less than or equal to the maximum cube map size ("+e$1T.maximumCubeMapSize+"). Check maximumCubeMapSize.");if(!V$10.validate(l))throw new t$16("Invalid options.pixelFormat.");if(V$10.isDepthFormat(l))throw new t$16("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!_$$.validate(u))throw new t$16("Invalid options.pixelDatatype.");if(u===_$$.FLOAT&&!n.floatingPointTexture)throw new t$16("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(u===_$$.HALF_FLOAT&&!n.halfFloatingPointTexture)throw new t$16("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");var c=6*V$10.textureSizeInBytes(l,u,s,s),h=e.preMultiplyAlpha||l===V$10.RGB||l===V$10.LUMINANCE,d=u$_(e.flipY,!0);this._context=n,this._textureFilterAnisotropic=n._textureFilterAnisotropic,this._size=s,this._hasMipmap=!1,this._sizeInBytes=c,this._preMultiplyAlpha=h,this._flipY=d,this._sampler=e$2b(e.sampler)?e.sampler:new e$1P,this._pixelFormat=l,this._pixelDatatype=u,r&&r.positiveX&&r.positiveX.internalFormat&&(this._pixelFormat=r.positiveX.internalFormat),r&&r.positiveX&&r.positiveX.pixelDatatype&&(this._pixelDatatype=r.positiveX.pixelDatatype);var f=R$$.toPixelFormat(this._pixelFormat),p=R$$.toPixelType(this._pixelDatatype);R$$.toSamplerMode(this._pixelDatatype,this._sampler);var _=R$$.toAddressMode(this._sampler.wrapS),m=R$$.toAddressMode(this._sampler.wrapT);if(e$2b(r)){var g=e.context.engine,x=new InternalTexture(g,InternalTextureSource.Cube);if(x.wrapU=_,x.wrapV=m,this._texture=new _0x5cc035(x),x.isCube=!0,x.generateMipMaps=!1,x._useSRGBBuffer=!1,x.format=f,x.type=p,r.positiveX.bufferView||r.positiveX.arrayBufferView){var v=[];v.push(x$12(r.positiveX,d,l,u,s)),v.push(x$12(r.positiveY,d,l,u,s)),v.push(x$12(r.positiveZ,d,l,u,s)),v.push(x$12(r.negativeX,d,l,u,s)),v.push(x$12(r.negativeY,d,l,u,s)),v.push(x$12(r.negativeZ,d,l,u,s));var y=g._textureHelper.createGPUTextureForInternalTexture(x,t,i);g._textureHelper.updateCubeTextures(v,y.underlyingResource,t,i,y.format,!1,!1,0,0)}else{var $=[];$.push(createImageBitmap(r.positiveX)),$.push(createImageBitmap(r.positiveY)),$.push(createImageBitmap(r.positiveZ)),$.push(createImageBitmap(r.negativeX)),$.push(createImageBitmap(r.negativeY)),$.push(createImageBitmap(r.negativeZ)),Promise.all($).then((e=>{var n=g._textureHelper.createGPUTextureForInternalTexture(x,t,i);g._textureHelper.updateCubeTextures(e,n.underlyingResource,t,i,n.format,d,!1,0,0)})).catch((e=>{console.log("CubeMapGPU createImageBitmap failed")}))}}}function x$12(e,t,i,n,r){var o;return e.bufferView?o=e.bufferView:e.arrayBufferView&&(o=e.arrayBufferView),t&&(o=V$10.flipY(o,i,n,r,r)),o}function e$1M(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.webgpu?this._inner=new y$T(e):this._inner=new X$Y(e)}a$U.unpack=function(e,t,i){var n=x$13.unpack(e,t,l$10);return s$O.stackPartitions=n._stackPartitions,s$O.slicePartitions=n._slicePartitions,s$O.subdivisions=n._subdivisions,e$2b(i)?(o$1p.clone(n._radii,s$O.radii),i._ellipsoidGeometry=new x$13(s$O),i):(s$O.radius=n._radii.x,new a$U(s$O))},a$U.createGeometry=function(e){return x$13.createGeometry(e._ellipsoidGeometry)},Object.defineProperties(c$$.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}}),c$$.prototype.copyFrom=function(e,t,i){if(t=u$_(t,0),i=u$_(i,0),o$1q.defined("source",e),o$1q.typeOf.number.greaterThanOrEquals("xOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",i,0),t+e.width>this._size)throw new t$16("xOffset + source.width must be less than or equal to width.");if(i+e.height>this._size)throw new t$16("yOffset + source.height must be less than or equal to height.");var n=this._gl,r=this._textureTarget,o=this._targetFace;n.activeTexture(n.TEXTURE0),n.bindTexture(r,this._texture);var a=e.width,s=e.height,l=e.arrayBufferView,u=this._size,c=this._pixelFormat,h=this._pixelDatatype,d=this._internalFormat;const f=this._preMultiplyAlpha,p=this._flipY;let _=4;e$2b(l)&&(_=V$10.alignmentInBytes(c,h,a)),n.pixelStorei(n.UNPACK_ALIGNMENT,_),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.BROWSER_DEFAULT_WEBGL);let m=!1;if(!this._initialized){if(0===t&&0===i&&a===u&&s===u)e$2b(l)?(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),p&&(l=V$10.flipY(l,c,h,u,u)),n.texImage2D(o,0,d,u,u,0,c,_$$.toWebGLConstant(h,this._context),l)):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,p),n.texImage2D(o,0,d,c,_$$.toWebGLConstant(h,this._context),e)),m=!0;else{n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const e=V$10.createTypedArray(c,h,u,u);n.texImage2D(o,0,d,u,u,0,c,_$$.toWebGLConstant(h,this._context),e)}this._initialized=!0}m||(e$2b(l)?(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),p&&(l=V$10.flipY(l,c,h,a,s)),n.texSubImage2D(o,0,t,i,a,s,c,_$$.toWebGLConstant(h,this._context),l)):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,p),n.texSubImage2D(o,0,t,i,c,_$$.toWebGLConstant(h,this._context),e))),n.bindTexture(r,null)},c$$.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){if(e=u$_(e,0),t=u$_(t,0),i=u$_(i,0),n=u$_(n,0),r=u$_(r,this._size),o=u$_(o,this._size),o$1q.typeOf.number.greaterThanOrEquals("xOffset",e,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",i,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",n,0),e+r>this._size)throw new t$16("xOffset + source.width must be less than or equal to width.");if(t+o>this._size)throw new t$16("yOffset + source.height must be less than or equal to height.");if(this._pixelDatatype===_$$.FLOAT)throw new t$16("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===_$$.HALF_FLOAT)throw new t$16("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");const a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.copyTexSubImage2D(this._targetFace,0,e,t,i,n,r,o),a.bindTexture(s,null),this._initialized=!0},Object.defineProperties(X$Y.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$h.NEAREST_MIPMAP_NEAREST||t===tt$h.NEAREST_MIPMAP_LINEAR||t===tt$h.LINEAR_MIPMAP_NEAREST||t===tt$h.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;(o===_$$.FLOAT&&!r.textureFloatLinear||o===_$$.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$h.NEAREST_MIPMAP_NEAREST:tt$h.NEAREST,i=rt$i.NEAREST);var a=r._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.texParameteri(s,a.TEXTURE_MIN_FILTER,t),a.texParameteri(s,a.TEXTURE_MAG_FILTER,i),a.texParameteri(s,a.TEXTURE_WRAP_S,e.wrapS),a.texParameteri(s,a.TEXTURE_WRAP_T,e.wrapT),e$2b(this._textureFilterAnisotropic)&&a.texParameteri(s,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),a.bindTexture(s,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),X$Y.prototype.generateMipmap=function(e){if(e=u$_(e,I$1e.DONT_CARE),this._size>1&&!e$2a.isPowerOfTwo(this._size))throw new t$16("width and height must be a power of two to call generateMipmap().");if(!I$1e.validate(e))throw new t$16("hint is invalid.");this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},X$Y.prototype.isDestroyed=function(){return!1},X$Y.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=i$10(this._positiveX),this._negativeX=i$10(this._negativeX),this._positiveY=i$10(this._positiveY),this._negativeY=i$10(this._negativeY),this._positiveZ=i$10(this._positiveZ),this._negativeZ=i$10(this._negativeZ),i$10(this)},Object.defineProperties(y$T.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),y$T.prototype.generateMipmap=function(e){console.log("CubeMapGPU.prototype.generateMipmap"),this._hasMipmap=!0},y$T.prototype.isDestroyed=function(){return!1},y$T.prototype.destroy=function(){return this._texture.dispose(),i$10(this)},Object.defineProperties(e$1M.prototype,{positiveX:{get:function(){return this._inner.positiveX}},negativeX:{get:function(){return this._inner.negativeX}},positiveY:{get:function(){return this._inner.positiveY}},negativeY:{get:function(){return this._inner.negativeY}},positiveZ:{get:function(){return this._inner.positiveZ}},negativeZ:{get:function(){return this._inner.negativeZ}},sampler:{get:function(){return this._inner.sampler},set:function(e){this._inner.sampler=e}},pixelFormat:{get:function(){return this._inner.pixelFormat}},pixelDatatype:{get:function(){return this._inner.pixelDatatype}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},preMultiplyAlpha:{get:function(){return this._inner.preMultiplyAlpha}},flipY:{get:function(){return this._inner.flipY}},_target:{get:function(){return this._inner._target}},_texture:{get:function(){return this._inner._texture}}}),e$1M.prototype.generateMipmap=function(e){if(e=u$_(e,I$1e.DONT_CARE),this._size>1&&!e$2a.isPowerOfTwo(this._size))throw new t$16("width and height must be a power of two to call generateMipmap().");if(!I$1e.validate(e))throw new t$16("hint is invalid.");this._inner.generateMipmap(e)},e$1M.prototype.isDestroyed=function(){return!1},e$1M.prototype.destroy=function(){return this._inner.destroy(),i$10(this)},void 0===Date.now&&(Date.now=function(){return(new Date).valueOf()});var f$V=f$V||function(){var e=[];return{REVISION:"13",getAll:function(){return e},removeAll:function(){e=[]},add:function(t){e.push(t)},remove:function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)},update:function(t){if(0===e.length)return!1;var i=0;for(t=void 0!==t?t:typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now();i<e.length;)e[i].update(t)?i++:e.splice(i,1);return!0}}}();f$V.Tween=function(e){var t=e,i={},n={},r={},o=1e3,a=0,s=!1,l=!1,u=0,c=null,h=f$V.Easing.Linear.None,d=f$V.Interpolation.Linear,f=[],p=null,_=!1,m=null,g=null,x=null,v=0,y=0;for(var $ in e)i[$]=parseFloat(e[$],10);this.to=function(e,t){return void 0!==t&&(o=t),n=e,this},this.start=function(e){for(var o in f$V.add(this),l=!0,_=!1,c=void 0!==e?e:typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now(),c+=u,n){if(n[o]instanceof Array){if(0===n[o].length)continue;n[o]=[t[o]].concat(n[o])}i[o]=t[o],i[o]instanceof Array||(i[o]*=1),r[o]=i[o]||0}return this},this.stop=function(){return l?(f$V.remove(this),l=!1,null!==x&&x.call(t),this.stopChainedTweens(),this):this},this.pause=function(){return l?(l=!1,v=typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now(),this):this},this.endPause=function(){return l||(l=!0,v=(typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now())-v,y+=v),this},this.stopChainedTweens=function(){for(var e=0,t=f.length;e<t;e++)f[e].stop()},this.delay=function(e){return u=e,this},this.repeat=function(e){return a=e,this},this.yoyo=function(e){return s=e,this},this.easing=function(e){return h=e,this},this.interpolation=function(e){return d=e,this},this.chain=function(){return f=arguments,this},this.onStart=function(e){return p=e,this},this.onUpdate=function(e){return m=e,this},this.onComplete=function(e){return g=e,this},this.onStop=function(e){return x=e,this},this.update=function(e){var x;if(e<c||!l)return!0;!1===_&&(null!==p&&p.call(t),_=!0);var v=(e-c-y)/o,$=h(v=v>1?1:v);for(x in n){var b=i[x]||0,T=n[x];T instanceof Array?t[x]=d(T,$):("string"==typeof T&&(T=b+parseFloat(T,10)),"number"==typeof T&&(t[x]=b+(T-b)*$))}if(null!==m&&m.call(t,$),1==v){if(y=0,a>0){for(x in isFinite(a)&&a--,r){if("string"==typeof n[x]&&(r[x]=r[x]+parseFloat(n[x],10)),s){var C=r[x];r[x]=n[x],n[x]=C}i[x]=r[x]}return c=e+u,!0}null!==g&&g.call(t);for(var S=0,w=f.length;S<w;S++)f[S].start(e);return!1}return!0}},f$V.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},Out:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},InOut:function(e){var t,i=.1,n=.4;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=n*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-f$V.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*f$V.Easing.Bounce.In(2*e):.5*f$V.Easing.Bounce.Out(2*e-1)+.5}}},f$V.Interpolation={Linear:function(e,t){var i=e.length-1,n=i*t,r=Math.floor(n),o=f$V.Interpolation.Utils.Linear;return t<0?o(e[0],e[1],n):t>1?o(e[i],e[i-1],i-n):o(e[r],e[r+1>i?i:r+1],n-r)},Bezier:function(e,t){var i,n=0,r=e.length-1,o=Math.pow,a=f$V.Interpolation.Utils.Bernstein;for(i=0;i<=r;i++)n+=o(1-t,r-i)*o(t,i)*e[i]*a(r,i);return n},CatmullRom:function(e,t){var i=e.length-1,n=i*t,r=Math.floor(n),o=f$V.Interpolation.Utils.CatmullRom;return e[0]===e[i]?(t<0&&(r=Math.floor(n=i*(1+t))),o(e[(r-1+i)%i],e[r],e[(r+1)%i],e[(r+2)%i],n-r)):t<0?e[0]-(o(e[0],e[0],e[1],e[1],-n)-e[0]):t>1?e[i]-(o(e[i],e[i],e[i-1],e[i-1],n-i)-e[i]):o(e[r?r-1:0],e[r],e[i<r+1?i:r+1],e[i<r+2?i:r+2],n-r)},Utils:{Linear:function(e,t,i){return(t-e)*i+e},Bernstein:function(e,t){var i=f$V.Interpolation.Utils.Factorial;return i(e)/i(t)/i(e-t)},Factorial:function(){var e=[1];return function(t){var i,n=1;if(e[t])return e[t];for(i=t;i>1;i--)n*=i;return e[t]=n}}(),CatmullRom:function(e,t,i,n,r){var o=.5*(i-e),a=.5*(n-t),s=r*r;return(2*t-2*i+o+a)*(r*s)+(-3*t+3*i-2*o-a)*s+o*r+t}}};var I$1c={LINEAR_NONE:f$V.Easing.Linear.None,QUADRACTIC_IN:f$V.Easing.Quadratic.In,QUADRACTIC_OUT:f$V.Easing.Quadratic.Out,QUADRACTIC_IN_OUT:f$V.Easing.Quadratic.InOut,CUBIC_IN:f$V.Easing.Cubic.In,CUBIC_OUT:f$V.Easing.Cubic.Out,CUBIC_IN_OUT:f$V.Easing.Cubic.InOut,QUARTIC_IN:f$V.Easing.Quartic.In,QUARTIC_OUT:f$V.Easing.Quartic.Out,QUARTIC_IN_OUT:f$V.Easing.Quartic.InOut,QUINTIC_IN:f$V.Easing.Quintic.In,QUINTIC_OUT:f$V.Easing.Quintic.Out,QUINTIC_IN_OUT:f$V.Easing.Quintic.InOut,SINUSOIDAL_IN:f$V.Easing.Sinusoidal.In,SINUSOIDAL_OUT:f$V.Easing.Sinusoidal.Out,SINUSOIDAL_IN_OUT:f$V.Easing.Sinusoidal.InOut,EXPONENTIAL_IN:f$V.Easing.Exponential.In,EXPONENTIAL_OUT:f$V.Easing.Exponential.Out,EXPONENTIAL_IN_OUT:f$V.Easing.Exponential.InOut,CIRCULAR_IN:f$V.Easing.Circular.In,CIRCULAR_OUT:f$V.Easing.Circular.Out,CIRCULAR_IN_OUT:f$V.Easing.Circular.InOut,ELASTIC_IN:f$V.Easing.Elastic.In,ELASTIC_OUT:f$V.Easing.Elastic.Out,ELASTIC_IN_OUT:f$V.Easing.Elastic.InOut,BACK_IN:f$V.Easing.Back.In,BACK_OUT:f$V.Easing.Back.Out,BACK_IN_OUT:f$V.Easing.Back.InOut,BOUNCE_IN:f$V.Easing.Bounce.In,BOUNCE_OUT:f$V.Easing.Bounce.Out,BOUNCE_IN_OUT:f$V.Easing.Bounce.InOut},m$W=Object.freeze(I$1c);function a$T(e,t,i){this.heading=u$_(e,0),this.pitch=u$_(t,0),this.range=u$_(i,0)}a$T.clone=function(e,t){if(e$2b(e))return e$2b(t)||(t=new a$T),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var e$1L={NONE:0,CATMULL_ROM:1},j$13=Object.freeze(e$1L),mr$4={};function Nr$4(e,t,i){var n,r,o;if(e instanceof o$15){var a=Math.tan(.5*e.fovy);return n=e.near,r=e.near*a,o=e.aspectRatio*r,Math.max(t*n/o,i*n/r)}return e instanceof l$11?(n=e.near,r=e.top,o=e.right,Math.max(t*n/o,i*n/r)):Math.max(t,i)}var yr$4=new o$1p,pr$4=new o$1p;function Sr$4(e,t,i,n){if(e$2b(n)&&i(.5)>n){var r=i(0),o=i(1),a=i(.5),s=a-r,l=a-o;return function(n){var a=i(n);if(n<=.5){var u=(a-r)/s;return e$2a.lerp(e,-e$2a.PI_OVER_TWO,u)}var c=(a-o)/l;return e$2a.lerp(-e$2a.PI_OVER_TWO,t,1-c)}}return function(i){return e$2a.lerp(e,t,i)}}function er$9(e,t,i,n,r){var o=r,a=Math.max(i,n);if(!e$2b(o)){var s=e.position,l=t,u=e.up,c=e.right,h=e.frustum,d=o$1p.subtract(s,l,yr$4),f=o$1p.magnitude(o$1p.multiplyByScalar(u,o$1p.dot(d,u),pr$4)),p=o$1p.magnitude(o$1p.multiplyByScalar(c,o$1p.dot(d,c),pr$4));o=Math.min(.2*Nr$4(h,f,p),1e9)}if(a<o){var _=1e6,m=-Math.pow((o-i)*_,1/8),g=Math.pow((o-n)*_,1/8);return function(e){var t=e*(g-m)+m;return-Math.pow(t,8)/_+o}}return function(e){return e$2a.lerp(i,n,e)}}function x$11(e,t){return e$2a.equalsEpsilon(e,e$2a.TWO_PI,e$2a.EPSILON11)&&(e=0),t>e+Math.PI?e+=e$2a.TWO_PI:t<e-Math.PI&&(e-=e$2a.TWO_PI),e}var dr$5=new o$1p;function Lr$4(e,t,i,n,r,o,a){var s=e.camera,l=o$1p.clone(s.position,dr$5),u=s.pitch,c=x$11(s.heading,n),h=x$11(s.roll,o),d=er$9(s,i,l.z,i.z,a);return function(e){var a=e.time/t;s.setView({orientation:{heading:e$2a.lerp(c,n,a),pitch:e$2a.lerp(u,r,a),roll:e$2a.lerp(h,o,a)}}),o$1o.lerp(l,i,a,s.position),s.position.z=d(a)}}function Wr$1(e,t){e.longitude<t.longitude?e.longitude+=e$2a.TWO_PI:t.longitude+=e$2a.TWO_PI}function zr$5(e,t){var i=e.longitude-t.longitude;i<-e$2a.PI?e.longitude+=e$2a.TWO_PI:i>e$2a.PI&&(t.longitude+=e$2a.TWO_PI)}var br$2=new a$18,Vr$2=new a$18;function jr$3(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x){var v=e.camera,y=e.mapProjection.ellipsoid,$=a$18.clone(v.positionCartographic,br$2),b=v.pitch,T=x$11(v.heading,n),C=x$11(v.roll,o),S=y.cartesianToCartographic(i,Vr$2);$.longitude=e$2a.zeroToTwoPi($.longitude),S.longitude=e$2a.zeroToTwoPi(S.longitude);var w=!1;if(e$2b(s)){var E=e$2a.zeroToTwoPi(s),P=Math.min($.longitude,S.longitude),A=Math.max($.longitude,S.longitude),L=E>=P&&E<=A;if(e$2b(l)){var M=Math.abs($.longitude-S.longitude),R=e$2a.TWO_PI-M;(L?M:R)<(L?R:M)*l&&!L&&(w=!0)}else L||(w=!0)}w?Wr$1($,S):zr$5($,S);var O=er$9(v,i,$.height,S.height,a),I=Sr$4(b,r,O,u);return function(){var i=$.longitude,r=S.longitude,a=$.latitude,s=S.latitude;return function(l){var u,y,$=l.time/t,b=d?v.positionCartographic.height:O($);if(m!==j$13.NONE&&e$2b(x)){if((u=g._times[x]+l.time)>g._times[g._times.length-1])return;var S=g.evaluate(u),w=a$18.fromCartesian(S);y=o$1p.fromRadians(w.longitude,w.latitude,b)}else y=o$1p.fromRadians(e$2a.lerp(i,r,$),e$2a.lerp(a,s,$),b);if(f){var E=a$18.fromCartesian(y),P=e.globe.getHeight(E);if(!e$2b(P))return;(b<P||b-P>0&&b-P<p)&&(E.height=P+p,y=a$18.toCartesian(E))}var A=c?v.heading:e$2a.lerp(T,n,$),L=h?v.pitch:I($),M=e$2a.lerp(C,o,$);if(_&&(A=c?v.heading:n,M=o),m!==j$13.NONE&&e$2b(x)){var R=u+.001;if(R>g._times[g._times.length-1])v.setView({destination:y,orientation:{heading:A,pitch:L,roll:M}});else{var D=g.evaluate(R),B=a$18.fromCartesian(D);D=o$1p.fromRadians(B.longitude,B.latitude,b);var N=new o$1p(D.x-y.x,D.y-y.y,D.z-y.z);o$1p.normalize(N,N);var F=m$17.buildUp(y,N);v.setView({destination:y,orientation:{direction:N,up:F}})}}else v.setView({destination:y,orientation:{heading:A,pitch:L,roll:M}})}}()}function Rr$3(e,t,i,n,r,o,a){var s=e.camera,l=o$1p.clone(s.position,dr$5),u=x$11(s.heading,n),c=s.frustum.right-s.frustum.left,h=er$9(s,i,c,i.z,a);return function(e){var r=e.time/t;s.setView({orientation:{heading:e$2a.lerp(u,n,r)}}),o$1o.lerp(l,i,r,s.position);var o=h(r),a=s.frustum,c=a.top/a.right,d=.5*(o-(a.right-a.left));a.right+=d,a.left-=d,a.top=c*a.right,a.bottom=-a.top}}var hr$3=new a$18,Ur$4=new o$1p;function tr$8(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function gr$5(e,t){return function(){"function"==typeof t&&t(),e.enableInputs=!0}}mr$4.createTween=function(e,t){var i=(t=u$_(t,u$_.EMPTY_OBJECT)).destination;if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(i))throw new t$16("destination is required.");var n=e.mode;if(n===C$13.MORPHING)return tr$8();var r=u$_(t.convert,!0),o=e.mapProjection,a=o.ellipsoid,s=t.maximumHeight,l=t.flyOverLongitude,u=t.flyOverLongitudeWeight,c=t.pitchAdjustHeight,h=t.easingFunction,d=t.flyClampToGround,f=t.flyRelativeHeight,p=t.interpolationMode,_=t.catmullRomSpline,m=t.preStopIndex;r&&n!==C$13.SCENE3D&&(a.cartesianToCartographic(i,hr$3),i=o.project(hr$3,Ur$4));var g=e.camera,x=t.endTransform;e$2b(x)&&g._setTransform(x);var v=t.duration;e$2b(v)||(v=Math.ceil(o$1p.distance(g.position,i)/1e6)+2,v=Math.min(v,3));var y=u$_(t.heading,0),$=u$_(t.pitch,-e$2a.PI_OVER_TWO),b=u$_(t.roll,0),T=u$_(t.headingFree,!1),C=u$_(t.pitchFree,!1),S=u$_(t.altitudeFree,!1),w=u$_(t.directTurning,!1),E=e.screenSpaceCameraController;E.enableInputs=t.headingFree||t.pitchFree||t.altitudeFree;var P=gr$5(E,t.complete),A=gr$5(E,t.cancel),L=g.frustum,M=e.mode===C$13.SCENE2D;if(M=(M=(M=(M=M&&o$1o.equalsEpsilon(g.position,i,e$2a.EPSILON6))&&e$2a.equalsEpsilon(Math.max(L.right-L.left,L.top-L.bottom),i.z,e$2a.EPSILON6))||e.mode!==C$13.SCENE2D&&o$1p.equalsEpsilon(i,g.position,e$2a.EPSILON10))&&e$2a.equalsEpsilon(e$2a.negativePiToPi(y),e$2a.negativePiToPi(g.heading),e$2a.EPSILON10)&&e$2a.equalsEpsilon(e$2a.negativePiToPi($),e$2a.negativePiToPi(g.pitch),e$2a.EPSILON10)&&e$2a.equalsEpsilon(e$2a.negativePiToPi(b),e$2a.negativePiToPi(g.roll),e$2a.EPSILON10))return tr$8(P,A);var R=new Array(4);if(R[C$13.SCENE2D]=Rr$3,R[C$13.SCENE3D]=jr$3,R[C$13.COLUMBUS_VIEW]=Lr$4,v<=0){return tr$8((function(){R[n](e,1,i,y,$,b,s,l,u,c)({time:1}),"function"==typeof P&&P()}),A)}var O=R[n](e,v,i,y,$,b,s,l,u,c,T,C,S,d,f,w,p,_,m);if(!e$2b(h)){var I=g.positionCartographic.height;h=I>(n===C$13.SCENE3D?a.cartesianToCartographic(i).height:i.z)&&I>11500?m$W.CUBIC_OUT:m$W.QUINTIC_IN_OUT}return{duration:v,easingFunction:h,startObject:{time:0},stopObject:{time:v},update:O,complete:P,cancel:A}};var e$1K={ROTATE:0,INFINITE_SCROLL:1},Rr$2=Object.freeze(e$1K);function v$K(e){if(!e$2b(e))throw new t$16("scene is required.");this._scene=e,this._transform=p$1d.clone(p$1d.IDENTITY),this._invTransform=p$1d.clone(p$1d.IDENTITY),this._actualTransform=p$1d.clone(p$1d.IDENTITY),this._actualInvTransform=p$1d.clone(p$1d.IDENTITY),this._transformChanged=!1,this.position=new o$1p,this._position=new o$1p,this._positionWC=new o$1p,this._positionCartographic=new a$18,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.direction=new o$1p,this._direction=new o$1p,this._directionWC=new o$1p,this.up=new o$1p,this._up=new o$1p,this._upWC=new o$1p,this.right=new o$1p,this._right=new o$1p,this._rightWC=new o$1p,this.frustum=new o$15,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=e$2a.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new o$1h,this._moveEnd=new o$1h,this._changed=new o$1h,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this.percentageChanged=.5,this._refinePercentageChanged=.001,this._viewMatrix=new p$1d,this._invViewMatrix=new p$1d,zt$6(this),this._mode=C$13.SCENE3D,this._modeChanged=!0;var t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new a$18(Math.PI,e$2a.PI_OVER_TWO)),this._max2Dfrustum=void 0,this._suspendTerrainAdjustment=!1,Xt$4(this,v$K.DEFAULT_VIEW_RECTANGLE,this.position,!0);var i=o$1p.magnitude(this.position);i+=i*v$K.DEFAULT_VIEW_FACTOR,o$1p.normalize(this.position,this.position),o$1p.multiplyByScalar(this.position,i,this.position),this.bReflect=!1,this._bReflect=!1,this._reflectMatrix=new p$1d,this._reflectPosition=new o$1p,this._reflectUp=new o$1p,this._reflectDirection=new o$1p,this._reflectRight=new o$1p,this._isFlyCircle=!1,this._flyCircleCenter=new o$1p,this._flyCircleLoop=!1,this._isResetFlyCircleParm=!1,this._speedRatio=1,this._flyClampToGround=!1,this._flyRelativeHeight=10,this._sensitivePosition=void 0,this._sensitivePositionRatio=0,this._sensitiveRegionRatio=0,this._endLevel=22,this._stateChanged=!0,this._preciseSensitivePosition=!1,this._enableIndoorColliDetection=!1,this.zoomLevel=1}function zt$6(e){p$1d.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),p$1d.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),p$1d.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function ui$6(e){if(e$2b(e._oldPositionWC)){e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;var t=o$1p.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=o$1p.magnitude(t),e._oldPositionWC=o$1p.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=Et$a()):e.timeSinceMoved=Math.max(Et$a()-e._lastMovedTimestamp,0)/1e3}else e._oldPositionWC=o$1p.clone(e.positionWC,e._oldPositionWC)}v$K.TRANSFORM_2D=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),v$K.TRANSFORM_2D_INVERSE=p$1d.inverseTransformation(v$K.TRANSFORM_2D,new p$1d),v$K.DEFAULT_VIEW_RECTANGLE=h$18.fromDegrees(70,0,140,60),v$K.DEFAULT_VIEW_FACTOR=.5,v$K.DEFAULT_OFFSET=new a$T(0,-e$2a.PI_OVER_FOUR,0),v$K.prototype.canPreloadFlight=function(){return e$2b(this._currentFlight)&&this._mode!==C$13.SCENE2D},v$K.prototype._updateCameraChanged=function(){var e=this;if(ui$6(e),this._stateChanged=!1,0!==e._changed.numberOfListeners){var t=e.percentageChanged,i=e._refinePercentageChanged;if(e._mode===C$13.SCENE2D){if(!e$2b(e._changedFrustum))return e._changedPosition=o$1p.clone(e.position,e._changedPosition),void(e._changedFrustum=e.frustum.clone());var n,r=e.position,o=e._changedPosition,a=e.frustum,s=e._changedFrustum,l=r.x+a.left,u=r.x+a.right,c=o.x+s.left,h=o.x+s.right,d=r.y+a.bottom,f=r.y+a.top,p=o.y+s.bottom,_=o.y+s.top,m=Math.max(l,c),g=Math.min(u,h),x=Math.max(d,p),v=Math.min(f,_);if(m>=g||x>=f)n=1;else{var y=s;l<c&&u>h&&d<p&&f>_&&(y=a),n=1-(g-m)*(v-x)/((y.right-y.left)*(y.top-y.bottom))}return void(n>t&&(e._changed.raiseEvent(n),e._changedPosition=o$1p.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum)))}if(!e$2b(e._changedDirection))return e._changedPosition=o$1p.clone(e.positionWC,e._changedPosition),void(e._changedDirection=o$1p.clone(e.directionWC,e._changedDirection));var $,b=e$2a.acosClamped(o$1p.dot(e.directionWC,e._changedDirection));$=e$2b(e.frustum.fovy)?b/(.5*e.frustum.fovy):b;var T=o$1p.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;($>t||T>t)&&(e._changed.raiseEvent(Math.max($,T)),e._changedPosition=o$1p.clone(e.positionWC,e._changedPosition),e._changedDirection=o$1p.clone(e.directionWC,e._changedDirection)),($>i||T>i)&&(e._changed.raiseEvent(Math.max($,T)),this._stateChanged=!0,e._changedPosition=o$1p.clone(e.positionWC,e._changedPosition),e._changedDirection=o$1p.clone(e.directionWC,e._changedDirection))}};var ci$7=new p$1d,fi$6=new a$18;function di$6(e){m$17.basisTo2D(e._projection,e._transform,e._actualTransform)}v$K.prototype._adjustHeightForTerrain=function(){var e=this._scene,t=e.screenSpaceCameraController,i=t.enableCollisionDetection,n=t.minimumCollisionTerrainHeight,r=t.minimumZoomDistance;if(!this._suspendTerrainAdjustment&&i){var o=this._mode,a=e.globe;if(e$2b(a)&&o!==C$13.SCENE2D&&o!==C$13.MORPHING){var s,l,u=a.ellipsoid,c=e.mapProjection;p$1d.equals(this.transform,p$1d.IDENTITY)||(s=p$1d.clone(this.transform,ci$7),l=o$1p.magnitude(this.position),this._setTransform(p$1d.IDENTITY));var h=fi$6;o===C$13.SCENE3D?u.cartesianToCartographic(this.position,h):c.unproject(this.position,h);var d=!1;if(h.height<n){var f=a.getHeight(h);e$2b(f)&&(f+=r,h.height<f&&(h.height=f,o===C$13.SCENE3D?u.cartographicToCartesian(h,this.position):c.project(h,this.position),d=!0))}e$2b(s)&&(this._setTransform(s),d&&(o$1p.normalize(this.position,this.position),o$1p.negate(this.position,this.direction),o$1p.multiplyByScalar(this.position,Math.max(l,r),this.position),o$1p.normalize(this.direction,this.direction),o$1p.cross(this.direction,this.up,this.right),o$1p.cross(this.right,this.direction,this.up)))}}};var li$6=new a$18,vi$5=new o$1p,ut$b=new o$1p,pi$7=new e$29,gi$7=new e$29,_i$7=new e$29,mi$4=new e$29,Ci$6=new e$29;function yi$5(e){var t=e._projection,i=t.ellipsoid,n=p$1d.getColumn(e._transform,3,pi$7),r=i.cartesianToCartographic(n,li$6),o=t.project(r,vi$5),a=gi$7;a.x=o.z,a.y=o.x,a.z=o.y,a.w=1;var s=e$29.clone(e$29.UNIT_X,Ci$6),l=e$29.add(p$1d.getColumn(e._transform,0,ut$b),n,ut$b);i.cartesianToCartographic(l,r),t.project(r,o);var u=_i$7;u.x=o.z,u.y=o.x,u.z=o.y,u.w=0,o$1p.subtract(u,a,u),u.x=0;var c=mi$4;if(o$1p.magnitudeSquared(u)>e$2a.EPSILON10)o$1p.cross(s,u,c);else{var h=e$29.add(p$1d.getColumn(e._transform,1,ut$b),n,ut$b);i.cartesianToCartographic(h,r),t.project(r,o),c.x=o.z,c.y=o.x,c.z=o.y,c.w=0,o$1p.subtract(c,a,c),c.x=0,o$1p.magnitudeSquared(c)<e$2a.EPSILON10&&(e$29.clone(e$29.UNIT_Y,u),e$29.clone(e$29.UNIT_Z,c))}o$1p.cross(c,s,u),o$1p.normalize(u,u),o$1p.cross(s,u,c),o$1p.normalize(c,c),p$1d.setColumn(e._actualTransform,0,u,e._actualTransform),p$1d.setColumn(e._actualTransform,1,c,e._actualTransform),p$1d.setColumn(e._actualTransform,2,s,e._actualTransform),p$1d.setColumn(e._actualTransform,3,a,e._actualTransform)}var Tt$c=new o$1p;function D$X(e){var t=e._mode,i=!1,n=0;t===C$13.SCENE2D&&(i=(n=e.frustum.right-e.frustum.left)!==e._positionCartographic.height);var r=e._position,o=!o$1p.equals(r,e.position)||i;o&&(r=o$1p.clone(e.position,e._position));var a=e._direction,s=!o$1p.equals(a,e.direction);s&&(o$1p.normalize(e.direction,e.direction),a=o$1p.clone(e.direction,e._direction));var l=e._up,u=!o$1p.equals(l,e.up);u&&(o$1p.normalize(e.up,e.up),l=o$1p.clone(e.up,e._up));var c=e._right,h=!o$1p.equals(c,e.right);h&&(o$1p.normalize(e.right,e.right),c=o$1p.clone(e.right,e._right));var d=!1;e.bReflect!=e._bReflect&&(e._bReflect=e.bReflect,d=!0);var f=e._transformChanged||e._modeChanged;e._transformChanged=!1,f&&(p$1d.inverseTransformation(e._transform,e._invTransform),e._mode===C$13.COLUMBUS_VIEW||e._mode===C$13.SCENE2D?p$1d.equals(p$1d.IDENTITY,e._transform)?p$1d.clone(v$K.TRANSFORM_2D,e._actualTransform):e._mode===C$13.COLUMBUS_VIEW?di$6(e):yi$5(e):p$1d.clone(e._transform,e._actualTransform),p$1d.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);var p=e._actualTransform;if(o||f)if(e._positionWC=p$1d.multiplyByPoint(p,r,e._positionWC),t===C$13.SCENE3D||t===C$13.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{var _=Tt$c;_.x=e._positionWC.y,_.y=e._positionWC.z,_.z=e._positionWC.x,t===C$13.SCENE2D&&(_.z=n),e._projection.unproject(_,e._positionCartographic)}if(s||u||h){var m=o$1p.dot(a,o$1p.cross(l,c,Tt$c));if(Math.abs(1-m)>e$2a.EPSILON2){var g=1/o$1p.magnitudeSquared(l),x=o$1p.dot(l,a)*g,v=o$1p.multiplyByScalar(a,x,Tt$c);l=o$1p.normalize(o$1p.subtract(l,v,e._up),e._up),o$1p.clone(l,e.up),c=o$1p.cross(a,l,e._right),o$1p.clone(c,e.right)}}(s||f)&&(e._directionWC=p$1d.multiplyByPointAsVector(p,a,e._directionWC),o$1p.normalize(e._directionWC,e._directionWC)),(u||f)&&(e._upWC=p$1d.multiplyByPointAsVector(p,l,e._upWC),o$1p.normalize(e._upWC,e._upWC)),(h||f)&&(e._rightWC=p$1d.multiplyByPointAsVector(p,c,e._rightWC),o$1p.normalize(e._rightWC,e._rightWC)),(o||s||u||h||f||d)&&zt$6(e)}function Bt$a(e,t){var i;return i=e$2a.equalsEpsilon(Math.abs(e.z),1,e$2a.EPSILON3)?Math.atan2(t.y,t.x)-e$2a.PI_OVER_TWO:Math.atan2(e.y,e.x)-e$2a.PI_OVER_TWO,e$2a.TWO_PI-e$2a.zeroToTwoPi(i)}function bt$9(e){return e$2a.PI_OVER_TWO-e$2a.acosClamped(e.z)}function Lt$7(e,t,i){var n=0;return e$2a.equalsEpsilon(Math.abs(e.z),1,e$2a.EPSILON3)||(n=Math.atan2(-i.z,t.z),n=e$2a.zeroToTwoPi(n+e$2a.TWO_PI)),n}var ct$a=new p$1d,ft$9=new p$1d;Object.defineProperties(v$K.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return D$X(this),this._invTransform}},viewMatrix:{get:function(){return D$X(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return D$X(this),this._invViewMatrix}},positionCartographic:{get:function(){return D$X(this),this._positionCartographic}},positionWC:{get:function(){return D$X(this),this._positionWC}},directionWC:{get:function(){return D$X(this),this._directionWC}},upWC:{get:function(){return D$X(this),this._upWC}},rightWC:{get:function(){return D$X(this),this._rightWC}},heading:{get:function(){if(this._mode!==C$13.MORPHING){var e=this._projection.ellipsoid,t=p$1d.clone(this._transform,ct$a),i=m$17.eastNorthUpToFixedFrame(this.positionWC,e,ft$9);this._setTransform(i);var n=Bt$a(this.direction,this.up);return this._setTransform(t),n}}},pitch:{get:function(){if(this._mode!==C$13.MORPHING){var e=this._projection.ellipsoid,t=p$1d.clone(this._transform,ct$a),i=m$17.eastNorthUpToFixedFrame(this.positionWC,e,ft$9);this._setTransform(i);var n=bt$9(this.direction);return this._setTransform(t),n}}},roll:{get:function(){if(this._mode!==C$13.MORPHING){var e=this._projection.ellipsoid,t=p$1d.clone(this._transform,ct$a),i=m$17.eastNorthUpToFixedFrame(this.positionWC,e,ft$9);this._setTransform(i);var n=Lt$7(this.direction,this.up,this.right);return this._setTransform(t),n}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}},flyCircleLoop:{set:function(e){this._flyCircleLoop!==e&&(this._isResetFlyCircleParm=!0),this._flyCircleLoop=e},get:function(){return this._flyCircleLoop}},speedRatio:{get:function(){return this._speedRatio},set:function(e){this._speedRatio=e}},flyClampToGround:{set:function(e){this._flyClampToGround=e},get:function(){return this._flyClampToGround}},flyRelativeHeight:{set:function(e){this._flyRelativeHeight=e},get:function(){return this._flyRelativeHeight}},sensitivePositionRatio:{set:function(e){this._sensitivePositionRatio=e$2a.clamp(e,0,1)},get:function(){return this._sensitivePositionRatio}},preciseSensitivePosition:{set:function(e){e$2b(e)&&"boolean"==typeof e&&(this._preciseSensitivePosition=e)},get:function(){return this._preciseSensitivePosition}},sensitiveRegionRatio:{set:function(e){this._sensitiveRegionRatio=e},get:function(){return this._sensitiveRegionRatio}}}),v$K.prototype._computeSensitivePosition=function(){if(this._scene.mode===C$13.SCENE3D){var e=this._scene.canvas,t=this._scene.frameState;dt$b.x=e.clientWidth/2,dt$b.y=e.clientHeight/2;var i=void 0;if(e$2b(this._scene.globe)&&this._preciseSensitivePosition&&(e$2b(i=this._scene.pickPositionWorldCoordinates(dt$b,wi$5,!0))&&(this._sensitivePosition=i)),!e$2b(i)){var n=this.getPickRay(dt$b),r=t$13.WGS84,o=r.maximumRadius;e$2b(t.averageTerrainHeight)&&0!=t.averageTerrainHeight&&(r=new t$13(o+t.averageTerrainHeight,o+t.averageTerrainHeight,o+t.averageTerrainHeight));var a=g$1h.rayEllipsoid(n,r);if(e$2b(a)){Et$9.x=e.clientWidth/2,Et$9.y=0;var s=this.getPickRay(Et$9);if(e$2b(g$1h.rayEllipsoid(s,r)))this._sensitivePosition=f$17.getPoint(n,a.start);else{var l,u=o$1p.magnitude(this.position);l=u<o?e$2a.PI_OVER_TWO:Math.asin(o/u);var c=new f$17(this.position,new o$1p(-this.position.x,-this.position.y,-this.position.z)),h=new o$1p(c.origin.x+c.direction.x,c.origin.y+c.direction.y,c.origin.z+c.direction.z),d=new o$1p(n.origin.x+n.direction.x,n.origin.y+n.direction.y,n.origin.z+n.direction.z),f=o$1p.distance(h,d),p=2*Math.asin(.5*f),_=(.5*this.frustum.fov-(l-p))/this.frustum.fov,m=e.clientHeight*(1+_)*.5;if(!Number.isNaN(m)){var g=new o$1o(.5*e.clientWidth,m),x=this.getPickRay(g),v=g$1h.rayEllipsoid(x,r);e$2b(v)?this._sensitivePosition=f$17.getPoint(x,v.start):this._sensitivePosition=void 0}}}else this._sensitivePosition=void 0}var y=t._quadtree;if(e$2b(y)){m=t.context.drawingBufferHeight;var $=this.frustum.sseDenominator;if(this._positionCartographic.height,e$2b(this._sensitivePosition)){var b=o$1p.distance(this.positionWC,this._sensitivePosition),T=y._tileProvider.getLevelMaximumGeometricError(0);this.zoomLevel=e$2a.log2(T*m/(2*y.maximumScreenSpaceError*b*$))}}}};var Et$9=new o$1o,dt$b=new o$1o,wi$5=new o$1p;v$K.prototype.update=function(e){if(!e$2b(e))throw new t$16("mode is required.");if(e===C$13.SCENE2D&&!(this.frustum instanceof l$12))throw new t$16("An OrthographicOffCenterFrustum is required in 2D.");if(!(e!==C$13.SCENE3D&&e!==C$13.COLUMBUS_VIEW||this.frustum instanceof o$15||this.frustum instanceof a$V))throw new t$16("A PerspectiveFrustum or OrthographicFrustum is required in 3D and Columbus view");var t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==C$13.MORPHING,t=this._mode===C$13.SCENE2D),t){var i=this._max2Dfrustum=this.frustum.clone();if(!(i instanceof l$12))throw new t$16("The camera frustum is expected to be orthographic for 2D camera control.");var n=i.top/i.right;i.right=2*this._maxCoord.x,i.left=-i.right,i.top=n*i.right,i.bottom=-i.top}this._mode===C$13.SCENE2D&&jt$5(this,this.position);var r=this._scene.globe,o=!e$2b(r)||r._surface.tileProvider.ready&&0===r._surface._tileLoadQueueHigh.length&&0===r._surface._tileLoadQueueMedium.length&&0===r._surface._tileLoadQueueLow.length&&0===r._surface._debug.tilesWaitingForChildren;this._suspendTerrainAdjustment&&(this._suspendTerrainAdjustment=!o),o&&this._adjustHeightForTerrain(),this._isFlyCircle&&this._flyCircle(this._flyCircleCenter)};var Ti$5=new o$1p,Ei$5=new o$1p,Pi$6=new o$1p;v$K.prototype._setTransform=function(e){var t=o$1p.clone(this.positionWC,Ti$5),i=o$1p.clone(this.upWC,Ei$5),n=o$1p.clone(this.directionWC,Pi$6);p$1d.clone(e,this._transform),this._transformChanged=!0,D$X(this);var r=this._actualInvTransform;p$1d.multiplyByPoint(r,t,this.position),p$1d.multiplyByPointAsVector(r,n,this.direction),p$1d.multiplyByPointAsVector(r,i,this.up),o$1p.cross(this.direction,this.up,this.right),D$X(this)};var Ri$4=new o$1o,Si$5=new f$17,Ii$4=new o$1p,Mi$5=new o$1p;v$K.prototype._adjustOrthographicFrustum=function(e){if(this.frustum instanceof a$V&&(e||!(this._positionCartographic.height<15e4))){if(!p$1d.equals(p$1d.IDENTITY,this.transform))return void(this.frustum.width=o$1p.magnitude(this.position));var t,i,n=this._scene,r=n.globe;if(e$2b(r)){var o=Ri$4;o.x=n.drawingBufferWidth/2,o.y=n.drawingBufferHeight/2;var a=this.getPickRay(o,Si$5);if(t=r.pickWorldCoordinates(a,n,Ii$4),n.pickPositionSupported&&(i=n.pickPositionWorldCoordinates(o,Mi$5)),e$2b(t)&&e$2b(i)){var s=e$2b(i)?o$1p.distance(i,this.positionWC):Number.POSITIVE_INFINITY,l=e$2b(t)?o$1p.distance(t,this.positionWC):Number.POSITIVE_INFINITY;this.frustum.width=Math.min(s,l)}else e$2b(i)?this.frustum.width=o$1p.distance(i,this.positionWC):e$2b(t)&&(this.frustum.width=o$1p.distance(t,this.positionWC))}if(!e$2b(r)||!e$2b(t)&&!e$2b(i)){var u=Math.max(this.positionCartographic.height,0);this.frustum.width=u}}};var lt$6=new o$1p,Pt$7=new p$1d,Wi$4=new p$1d,Rt$7=new n$13,St$7=new p$1e,Ht$6=new a$18;function Di$6(e,t,i){var n=p$1d.clone(e.transform,Pt$7),r=m$17.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,Wi$4);e._setTransform(r),o$1p.clone(o$1p.ZERO,e.position),i.heading=i.heading-e$2a.PI_OVER_TWO;var o=n$13.fromHeadingPitchRoll(i,Rt$7),a=p$1e.fromQuaternion(o,St$7);p$1e.getColumn(a,0,e.direction),p$1e.getColumn(a,2,e.up),o$1p.cross(e.direction,e.up,e.right),e._setTransform(n),e._adjustOrthographicFrustum(!0)}function xi$5(e,t,i,n){var r=p$1d.clone(e.transform,Pt$7);if(e._setTransform(p$1d.IDENTITY),!o$1p.equals(t,e.positionWC)){if(n){var o=e._projection,a=o.ellipsoid.cartesianToCartographic(t,Ht$6);t=o.project(a,lt$6)}o$1p.clone(t,e.position)}i.heading=i.heading-e$2a.PI_OVER_TWO;var s=n$13.fromHeadingPitchRoll(i,Rt$7),l=p$1e.fromQuaternion(s,St$7);p$1e.getColumn(l,0,e.direction),p$1e.getColumn(l,2,e.up),o$1p.cross(e.direction,e.up,e.right),e._setTransform(r),e._adjustOrthographicFrustum(!0)}function Oi$5(e,t,i,n){var r=p$1d.clone(e.transform,Pt$7);if(e._setTransform(p$1d.IDENTITY),!o$1p.equals(t,e.positionWC)){if(n){var o=e._projection,a=o.ellipsoid.cartesianToCartographic(t,Ht$6);t=o.project(a,lt$6)}o$1o.clone(t,e.position);var s=.5*-t.z,l=-s,u=e.frustum;if(l>s){var c=u.top/u.right;u.right=l,u.left=s,u.top=u.right*c,u.bottom=-u.top}}if(e._scene.mapMode2D===Rr$2.ROTATE){i.heading=i.heading-e$2a.PI_OVER_TWO,i.pitch=-e$2a.PI_OVER_TWO,i.roll=0;var h=n$13.fromHeadingPitchRoll(i,Rt$7),d=p$1e.fromQuaternion(h,St$7);p$1e.getColumn(d,2,e.up),o$1p.cross(e.direction,e.up,e.right)}e._setTransform(r)}var Ni$5=new o$1p,Ai$4=new o$1p,Fi$3=new o$1p;function Ut$6(e,t,i,n){var r=o$1p.clone(i.direction,Ni$5),o=o$1p.clone(i.up,Ai$4);if(e._scene.mode===C$13.SCENE3D){var a=e._projection.ellipsoid,s=m$17.eastNorthUpToFixedFrame(t,a,ct$a),l=p$1d.inverseTransformation(s,ft$9);p$1d.multiplyByPointAsVector(l,r,r),p$1d.multiplyByPointAsVector(l,o,o)}var u=o$1p.cross(r,o,Fi$3);return n.heading=Bt$a(r,o),n.pitch=bt$9(r),n.roll=Lt$7(r,o,u),n}var It$a={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},tt$g=new i$15;v$K.prototype.setView=function(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.orientation,u$_.EMPTY_OBJECT),i=this._mode;if(i!==C$13.MORPHING){e$2b(e.endTransform)&&this._setTransform(e.endTransform);var n=u$_(e.convert,!0),r=u$_(e.destination,o$1p.clone(this.positionWC,lt$6));e$2b(r)&&e$2b(r.west)&&(r=this.getRectangleCameraCoordinates(r,lt$6),n=!1),e$2b(t.direction)&&(t=Ut$6(this,r,t,It$a.orientation)),tt$g.heading=u$_(t.heading,0),tt$g.pitch=u$_(t.pitch,-e$2a.PI_OVER_TWO),tt$g.roll=u$_(t.roll,0),this._suspendTerrainAdjustment=!0,i===C$13.SCENE3D?Di$6(this,r,tt$g):i===C$13.SCENE2D?Oi$5(this,r,tt$g,n):xi$5(this,r,tt$g,n)}};var Vi$5=new o$1p;function jt$5(e,t){var i,n,r=e._scene.mapMode2D===Rr$2.ROTATE,o=e._maxCoord.x,a=e._maxCoord.y;r?i=-(n=o):(n=t.x-2*o,i=t.x+2*o),t.x>o&&(t.x=n),t.x<-o&&(t.x=i),t.y>a&&(t.y=a),t.y<-a&&(t.y=-a)}v$K.prototype.flyHome=function(e){var t=this._mode;if(t===C$13.MORPHING&&this._scene.completeMorph(),t===C$13.SCENE2D)this.flyTo({destination:v$K.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:p$1d.IDENTITY});else if(t===C$13.SCENE3D){var i=this.getRectangleCameraCoordinates(v$K.DEFAULT_VIEW_RECTANGLE),n=o$1p.magnitude(i);n+=n*v$K.DEFAULT_VIEW_FACTOR,o$1p.normalize(i,i),o$1p.multiplyByScalar(i,n,i),this.flyTo({destination:i,duration:e,endTransform:p$1d.IDENTITY})}else if(t===C$13.COLUMBUS_VIEW){var r=this._projection.ellipsoid.maximumRadius,o=new o$1p(0,-1,1);o=o$1p.multiplyByScalar(o$1p.normalize(o,o),5*r,o),this.flyTo({destination:o,duration:e,orientation:{heading:0,pitch:-Math.acos(o$1p.normalize(o,Vi$5).z),roll:0},endTransform:p$1d.IDENTITY,convert:!1})}},v$K.prototype.worldToCameraCoordinates=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required.");return e$2b(t)||(t=new e$29),D$X(this),p$1d.multiplyByVector(this._actualInvTransform,e,t)},v$K.prototype.worldToCameraCoordinatesPoint=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required.");return e$2b(t)||(t=new o$1p),D$X(this),p$1d.multiplyByPoint(this._actualInvTransform,e,t)},v$K.prototype.worldToCameraCoordinatesVector=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required.");return e$2b(t)||(t=new o$1p),D$X(this),p$1d.multiplyByPointAsVector(this._actualInvTransform,e,t)},v$K.prototype.cameraToWorldCoordinates=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required.");return e$2b(t)||(t=new e$29),D$X(this),p$1d.multiplyByVector(this._actualTransform,e,t)},v$K.prototype.cameraToWorldCoordinatesPoint=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required.");return e$2b(t)||(t=new o$1p),D$X(this),p$1d.multiplyByPoint(this._actualTransform,e,t)},v$K.prototype.cameraToWorldCoordinatesVector=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required.");return e$2b(t)||(t=new o$1p),D$X(this),p$1d.multiplyByPointAsVector(this._actualTransform,e,t)};var vt$b=new o$1p;v$K.prototype.move=function(e,t){if(!e$2b(e))throw new t$16("direction is required.");var i=this._scene;if(this._enableIndoorColliDetection){o$1p.multiplyByScalar(e,Math.sign(t),vt$b);var n=i.collideDetection(vt$b);if(e$2b(n))if(o$1p.distance(this.position,n)<1)return}var r=this.position;o$1p.multiplyByScalar(e,t,vt$b),o$1p.add(r,vt$b,r),this._mode===C$13.SCENE2D&&jt$5(this,r),this._adjustOrthographicFrustum(!0)},v$K.prototype.moveForward=function(e){e=u$_(e,this.defaultMoveAmount),this._mode===C$13.SCENE2D?pt$a(this,e):this.move(this.direction,e)},v$K.prototype.moveBackward=function(e){e=u$_(e,this.defaultMoveAmount),this._mode===C$13.SCENE2D?pt$a(this,-e):this.move(this.direction,-e)},v$K.prototype.moveUp=function(e){e=u$_(e,this.defaultMoveAmount),this.move(this.up,e)},v$K.prototype.moveDown=function(e){e=u$_(e,this.defaultMoveAmount),this.move(this.up,-e)},v$K.prototype.moveRight=function(e){e=u$_(e,this.defaultMoveAmount),this.move(this.right,e)},v$K.prototype.moveLeft=function(e){e=u$_(e,this.defaultMoveAmount),this.move(this.right,-e)},v$K.prototype.lookLeft=function(e){e=u$_(e,this.defaultLookAmount),this._mode!==C$13.SCENE2D&&this.look(this.up,-e)},v$K.prototype.lookRight=function(e){e=u$_(e,this.defaultLookAmount),this._mode!==C$13.SCENE2D&&this.look(this.up,e)},v$K.prototype.lookUp=function(e){e=u$_(e,this.defaultLookAmount),this._mode!==C$13.SCENE2D&&this.look(this.right,-e)},v$K.prototype.lookDown=function(e){e=u$_(e,this.defaultLookAmount),this._mode!==C$13.SCENE2D&&this.look(this.right,e)};var zi$5=new n$13,Bi$3=new p$1e;v$K.prototype.look=function(e,t){if(!e$2b(e))throw new t$16("axis is required.");var i=u$_(t,this.defaultLookAmount),n=n$13.fromAxisAngle(e,-i,zi$5),r=p$1e.fromQuaternion(n,Bi$3),o=this.direction,a=this.up,s=this.right;p$1e.multiplyByVector(r,o,o),p$1e.multiplyByVector(r,a,a),p$1e.multiplyByVector(r,s,s)},v$K.prototype.twistLeft=function(e){e=u$_(e,this.defaultLookAmount),this.look(this.direction,e)},v$K.prototype.twistRight=function(e){e=u$_(e,this.defaultLookAmount),this.look(this.direction,-e)};var bi$5=new n$13,Li$3=new p$1e;v$K.prototype.rotate=function(e,t){if(!e$2b(e))throw new t$16("axis is required.");var i=u$_(t,this.defaultRotateAmount),n=n$13.fromAxisAngle(e,-i,bi$5),r=p$1e.fromQuaternion(n,Li$3);p$1e.multiplyByVector(r,this.position,this.position),p$1e.multiplyByVector(r,this.direction,this.direction),p$1e.multiplyByVector(r,this.up,this.up),o$1p.cross(this.direction,this.up,this.right),o$1p.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)},v$K.prototype.rotateDown=function(e){Zt$6(this,e=u$_(e,this.defaultRotateAmount))},v$K.prototype.rotateUp=function(e){Zt$6(this,-(e=u$_(e,this.defaultRotateAmount)))};var Hi$4=new o$1p,Ui$4=new o$1p,ji$4=new o$1p,kt$6=new o$1p;function Zt$6(e,t){var i=e.position,n=o$1p.normalize(i,Hi$4);if(e$2b(e.constrainedAxis)){var r=o$1p.equalsEpsilon(n,e.constrainedAxis,e$2a.EPSILON2),o=o$1p.equalsEpsilon(n,o$1p.negate(e.constrainedAxis,kt$6),e$2a.EPSILON2);if(r||o)(r&&t<0||o&&t>0)&&e.rotate(e.right,t);else{var a=o$1p.normalize(e.constrainedAxis,Ui$4),s=o$1p.dot(n,a),l=e$2a.acosClamped(s);t>0&&t>l&&(t=l-e$2a.EPSILON4),s=o$1p.dot(n,o$1p.negate(a,kt$6)),l=e$2a.acosClamped(s),t<0&&-t>l&&(t=-l+e$2a.EPSILON4);var u=o$1p.cross(a,n,ji$4),c=o$1p.dot(u,e.right);if(c<0&&t>0)return;u=c<0?o$1p.negate(u,u):u,e.rotate(u,t)}}else e.rotate(e.right,t)}function Yt$7(e,t){e$2b(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function pt$a(e,t){var i,n=e.frustum;if(!(n instanceof l$12&&e$2b(n.left)&&e$2b(n.right)&&e$2b(n.bottom)&&e$2b(n.top)))throw new t$16("The camera frustum is expected to be orthographic for 2D camera control.");if(t*=.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){var r=n.top-t,o=n.bottom+t,a=e._maxCoord.y;e._scene.mapMode2D===Rr$2.ROTATE&&(a*=e.maximumZoomFactor),o>a&&(o=a,r=-a),r<=o&&(r=1,o=-1),i=n.right/n.top,n.top=r,n.bottom=o,n.right=n.top*i,n.left=-n.right}else{var s=n.right-t,l=n.left+t,u=e._maxCoord.x;e._scene.mapMode2D===Rr$2.ROTATE&&(u*=e.maximumZoomFactor),s>u&&(s=u,l=-u),s<=l&&(s=1,l=-1),i=n.top/n.right,n.right=s,n.left=l,n.top=n.right*i,n.bottom=-n.top}}function Gt$6(e,t){e.move(e.direction,t)}v$K.prototype.rotateRight=function(e){Yt$7(this,-(e=u$_(e,this.defaultRotateAmount)))},v$K.prototype.rotateLeft=function(e){Yt$7(this,e=u$_(e,this.defaultRotateAmount))},v$K.prototype.zoomIn=function(e){e=u$_(e,this.defaultZoomAmount),this._mode===C$13.SCENE2D?pt$a(this,e):Gt$6(this,e)},v$K.prototype.zoomOut=function(e){e=u$_(e,this.defaultZoomAmount),this._mode===C$13.SCENE2D?pt$a(this,-e):Gt$6(this,-e)},v$K.prototype.getMagnitude=function(){return this._mode===C$13.SCENE3D?o$1p.magnitude(this.position):this._mode===C$13.COLUMBUS_VIEW?Math.abs(this.position.z):this._mode===C$13.SCENE2D?Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom):void 0};var ki$5=new p$1d;v$K.prototype.lookAt=function(e,t){if(!e$2b(e))throw new t$16("target is required");if(!e$2b(t))throw new t$16("offset is required");if(this._mode===C$13.MORPHING)throw new t$16("lookAt is not supported while morphing.");var i=m$17.eastNorthUpToFixedFrame(e,t$13.WGS84,ki$5);this.lookAtTransform(i,t)};var Zi$4=new o$1p,Yi$3=new n$13,Gi$3=new n$13,Qi$3=new p$1e;function Qt$6(e,t,i){t=e$2a.clamp(t,-e$2a.PI_OVER_TWO,e$2a.PI_OVER_TWO),e=e$2a.zeroToTwoPi(e)-e$2a.PI_OVER_TWO;var n=n$13.fromAxisAngle(o$1p.UNIT_Y,-t,Yi$3),r=n$13.fromAxisAngle(o$1p.UNIT_Z,-e,Gi$3),o=n$13.multiply(r,n,r),a=p$1e.fromQuaternion(o,Qi$3),s=o$1p.clone(o$1p.UNIT_X,Zi$4);return p$1e.multiplyByVector(a,s,s),o$1p.negate(s,s),o$1p.multiplyByScalar(s,i,s),s}v$K.prototype.lookAtTransform=function(e,t){if(!e$2b(e))throw new t$16("transform is required");if(this._mode===C$13.MORPHING)throw new t$16("lookAtTransform is not supported while morphing.");if(this._setTransform(e),e$2b(t)){var i;if(i=e$2b(t.heading)?Qt$6(t.heading,t.pitch,t.range):t,this._mode===C$13.SCENE2D){o$1o.clone(o$1o.ZERO,this.position),o$1p.negate(i,this.up),this.up.z=0,o$1p.magnitudeSquared(this.up)<e$2a.EPSILON10&&o$1p.clone(o$1p.UNIT_Y,this.up),o$1p.normalize(this.up,this.up),this._setTransform(p$1d.IDENTITY),o$1p.negate(o$1p.UNIT_Z,this.direction),o$1p.cross(this.direction,this.up,this.right),o$1p.normalize(this.right,this.right);var n=this.frustum,r=n.top/n.right;return n.right=.5*o$1p.magnitude(i),n.left=-n.right,n.top=r*n.right,n.bottom=-n.top,void this._setTransform(e)}o$1p.clone(i,this.position),o$1p.negate(this.position,this.direction),o$1p.normalize(this.direction,this.direction),o$1p.cross(this.direction,o$1p.UNIT_Z,this.right),o$1p.magnitudeSquared(this.right)<e$2a.EPSILON10&&o$1p.clone(o$1p.UNIT_X,this.right),o$1p.normalize(this.right,this.right),o$1p.cross(this.right,this.direction,this.up),o$1p.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)}};var rt$h=new a$18,qi$3=new a$18,Xi$2=new o$1p,Ji$3=new o$1p,Ki$3=new o$1p,$i$3=new o$1p,te$C=new o$1p,ie$G=new o$1p,ee$z=new o$1p,Mt$6=new o$1p,re$H={direction:new o$1p,right:new o$1p,up:new o$1p},qt$8;function N$U(e,t,i,n){return Math.abs(o$1p.dot(t,i))/n-o$1p.dot(e,i)}function Xt$4(e,t,i,n){var r=e._projection.ellipsoid,o=n?e:re$H,a=t.north,s=t.south,l=t.east,u=t.west;u>l&&(l+=e$2a.TWO_PI);var c,h=.5*(u+l);if(s<-e$2a.PI_OVER_TWO+e$2a.RADIANS_PER_DEGREE&&a>e$2a.PI_OVER_TWO-e$2a.RADIANS_PER_DEGREE)c=0;else{var d=rt$h;d.longitude=h,d.latitude=a,d.height=0;var f=qi$3;f.longitude=h,f.latitude=s,f.height=0;var p=qt$8;(!e$2b(p)||p.ellipsoid!==r)&&(qt$8=p=new E$1s(void 0,void 0,r)),p.setEndPoints(d,f),c=p.interpolateUsingFraction(.5,rt$h).latitude}var _=rt$h;_.longitude=h,_.latitude=c,_.height=0;var m=r.cartographicToCartesian(_,ee$z),g=rt$h;g.longitude=l,g.latitude=a;var x=r.cartographicToCartesian(g,Xi$2);g.longitude=u;var v=r.cartographicToCartesian(g,Ki$3);g.longitude=h;var y=r.cartographicToCartesian(g,te$C);g.latitude=s;var $=r.cartographicToCartesian(g,ie$G);g.longitude=l;var b=r.cartographicToCartesian(g,$i$3);g.longitude=u;var T=r.cartographicToCartesian(g,Ji$3);o$1p.subtract(v,m,v),o$1p.subtract(b,m,b),o$1p.subtract(x,m,x),o$1p.subtract(T,m,T),o$1p.subtract(y,m,y),o$1p.subtract($,m,$);var C=r.geodeticSurfaceNormal(m,o.direction);o$1p.negate(C,C);var S=o$1p.cross(C,o$1p.UNIT_Z,o.right);o$1p.normalize(S,S);var w,E=o$1p.cross(S,C,o.up);if(e.frustum instanceof a$V){var P,A,L=Math.max(o$1p.distance(x,v),o$1p.distance(b,T)),M=Math.max(o$1p.distance(x,b),o$1p.distance(v,T)),R=e.frustum._offCenterFrustum.right/e.frustum._offCenterFrustum.top,O=M*R;L>O?A=(P=L)/R:(A=M,P=O),w=Math.max(P,A)}else{var I=Math.tan(.5*e.frustum.fovy),D=e.frustum.aspectRatio*I;if(w=Math.max(N$U(C,E,v,I),N$U(C,E,b,I),N$U(C,E,x,I),N$U(C,E,T,I),N$U(C,E,y,I),N$U(C,E,$,I),N$U(C,S,v,D),N$U(C,S,b,D),N$U(C,S,x,D),N$U(C,S,T,D),N$U(C,S,y,D),N$U(C,S,$,D)),s<0&&a>0){var B=rt$h;B.longitude=u,B.latitude=0,B.height=0;var N=r.cartographicToCartesian(B,Mt$6);o$1p.subtract(N,m,N),w=Math.max(w,N$U(C,E,N,I),N$U(C,S,N,D)),B.longitude=l,N=r.cartographicToCartesian(B,Mt$6),o$1p.subtract(N,m,N),w=Math.max(w,N$U(C,E,N,I),N$U(C,S,N,D))}}return o$1p.add(m,o$1p.multiplyByScalar(C,-w,Mt$6),i)}var ne$J=new a$18,oe$w=new o$1p,se$z=new o$1p;function ae$z(e,t,i){var n=e._projection;t.west>t.east&&(t=h$18.MAX_VALUE);var r=e._actualTransform,o=e._actualInvTransform,a=ne$J;a.longitude=t.east,a.latitude=t.north;var s=n.project(a,oe$w);p$1d.multiplyByPoint(r,s,s),p$1d.multiplyByPoint(o,s,s),a.longitude=t.west,a.latitude=t.south;var l=n.project(a,se$z);if(p$1d.multiplyByPoint(r,l,l),p$1d.multiplyByPoint(o,l,l),i.x=.5*(s.x-l.x)+l.x,i.y=.5*(s.y-l.y)+l.y,e$2b(e.frustum.fovy)){var u=Math.tan(.5*e.frustum.fovy),c=e.frustum.aspectRatio*u;i.z=.5*Math.max((s.x-l.x)/c,(s.y-l.y)/u)}else{var h=s.x-l.x,d=s.y-l.y;i.z=Math.max(h,d)}return i}var he$u=new a$18,ue$E=new o$1p,ce$w=new o$1p;function fe$t(e,t,i){var n=e._projection;t.west>t.east&&(t=h$18.MAX_VALUE);var r=he$u;r.longitude=t.east,r.latitude=t.north;var o=n.project(r,ue$E);r.longitude=t.west,r.latitude=t.south;var a,s,l=n.project(r,ce$w),u=.5*Math.abs(o.x-l.x),c=.5*Math.abs(o.y-l.y),h=e.frustum.right/e.frustum.top,d=c*h;return u>d?s=(a=u)/h:(s=c,a=d),c=Math.max(2*a,2*s),i.x=.5*(o.x-l.x)+l.x,i.y=.5*(o.y-l.y)+l.y,(r=n.unproject(i,r)).height=c,i=n.project(r,i)}v$K.prototype.getRectangleCameraCoordinates=function(e,t){if(!e$2b(e))throw new t$16("rectangle is required");var i=this._mode;return e$2b(t)||(t=new o$1p),i===C$13.SCENE3D?Xt$4(this,e,t):i===C$13.COLUMBUS_VIEW?ae$z(this,e,t):i===C$13.SCENE2D?fe$t(this,e,t):void 0};var de$w=new f$17;function le$z(e,t,i,n){i=u$_(i,t$13.WGS84);var r=e.getPickRay(t,de$w),o=g$1h.rayEllipsoid(r,i);if(o){var a=o.start>0?o.start:o.stop;return f$17.getPoint(r,a,n)}}var ve$s=new f$17;function pe$y(e,t,i,n){var r=e.getPickRay(t,ve$s).origin;r.z=0;var o=i.unproject(r);if(!(o.latitude<-e$2a.PI_OVER_TWO||o.latitude>e$2a.PI_OVER_TWO))return i.ellipsoid.cartographicToCartesian(o,n)}var ge$s=new f$17;function _e$v(e,t,i,n){var r=e.getPickRay(t,ge$s),o=-r.origin.x/r.direction.x;f$17.getPoint(r,o,n);var a=i.unproject(new o$1p(n.y,n.z,0));if(!(a.latitude<-e$2a.PI_OVER_TWO||a.latitude>e$2a.PI_OVER_TWO||a.longitude<-Math.PI||a.longitude>Math.PI))return i.ellipsoid.cartographicToCartesian(a,n)}v$K.prototype.pickEllipsoid=function(e,t,i){if(!e$2b(e))throw new t$16("windowPosition is required.");var n=this._scene.canvas;if(0!==n.clientWidth&&0!==n.clientHeight){if(e$2b(i)||(i=new o$1p),t=u$_(t,t$13.WGS84),this._mode===C$13.SCENE3D)i=le$z(this,e,t,i);else if(this._mode===C$13.SCENE2D)i=pe$y(this,e,this._projection,i);else{if(this._mode!==C$13.COLUMBUS_VIEW)return;i=_e$v(this,e,this._projection,i)}return i}};var me$x=new o$1p,Ce$l=new o$1p,ye$o=new o$1p;function we$m(e,t,i){var n=e._scene.canvas,r=n.clientWidth,o=n.clientHeight,a=Math.tan(.5*e.frustum.fovy),s=e.frustum.aspectRatio*a,l=e.frustum.near,u=2/r*t.x-1,c=2/o*(o-t.y)-1,h=e.positionWC;o$1p.clone(h,i.origin);var d=o$1p.multiplyByScalar(e.directionWC,l,me$x);o$1p.add(h,d,d);var f=o$1p.multiplyByScalar(e.rightWC,u*l*s,Ce$l),p=o$1p.multiplyByScalar(e.upWC,c*l*a,ye$o),_=o$1p.add(d,f,i.direction);return o$1p.add(_,p,_),o$1p.subtract(_,h,_),o$1p.normalize(_,_),i}var gt$8=new o$1p;function Te$r(e,t,i){var n=e._scene.canvas,r=n.clientWidth,o=n.clientHeight,a=e.frustum;e$2b(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2/r*t.x-1;s*=.5*(a.right-a.left);var l=2/o*(o-t.y)-1;l*=.5*(a.top-a.bottom);var u=i.origin;return o$1p.clone(e.position,u),o$1p.multiplyByScalar(e.right,s,gt$8),o$1p.add(gt$8,u,u),o$1p.multiplyByScalar(e.up,l,gt$8),o$1p.add(gt$8,u,u),o$1p.clone(e.directionWC,i.direction),e._mode===C$13.COLUMBUS_VIEW&&o$1p.fromElements(i.origin.z,i.origin.x,i.origin.y,i.origin),i}v$K.prototype.getPickRay=function(e,t){if(!e$2b(e))throw new t$16("windowPosition is required.");e$2b(t)||(t=new f$17);var i=this.frustum;return e$2b(i.aspectRatio)&&e$2b(i.fov)&&e$2b(i.near)?we$m(this,e,t):Te$r(this,e,t)};var Ee$q=new o$1p,Pe$m=new o$1p;v$K.prototype.distanceToBoundingSphere=function(e){if(!e$2b(e))throw new t$16("boundingSphere is required.");var t=o$1p.subtract(this.positionWC,e.center,Ee$q),i=o$1p.multiplyByScalar(this.directionWC,o$1p.dot(t,this.directionWC),Pe$m);return Math.max(0,o$1p.magnitude(i)-e.radius)};var Re$m=new o$1o;function Se$g(e,t,i,n,r,o){var a=o$1p.clone(t);return i.y>n?a.y-=i.y-n:i.y<-n&&(a.y+=-n-i.y),i.z>r?a.z-=i.z-r:i.z<-r&&(a.z+=-r-i.z),{easingFunction:m$W.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:o,update:function(i){var n=o$1p.lerp(t,a,i.time,new o$1p);e.worldToCameraCoordinatesPoint(n,e.position)}}}v$K.prototype.getPixelSize=function(e,t,i){if(!e$2b(e))throw new t$16("boundingSphere is required.");if(!e$2b(t))throw new t$16("drawingBufferWidth is required.");if(!e$2b(i))throw new t$16("drawingBufferHeight is required.");var n=this.distanceToBoundingSphere(e),r=this.frustum.getPixelDimensions(t,i,n,this._scene.pixelRatio,Re$m);return Math.max(r.x,r.y)};var Ie$n=new o$1p,Jt$6=new o$1p,Me$n=new o$1p,We$m=new o$1p;function De$q(e,t){var i=e.position,n=e.direction,r=e.worldToCameraCoordinatesVector(o$1p.UNIT_X,Ie$n),o=-o$1p.dot(r,i)/o$1p.dot(r,n),a=o$1p.add(i,o$1p.multiplyByScalar(n,o,Jt$6),Jt$6);e.cameraToWorldCoordinatesPoint(a,a),i=e.cameraToWorldCoordinatesPoint(e.position,Me$n);var s=Math.tan(.5*e.frustum.fovy),l=e.frustum.aspectRatio*s,u=o$1p.magnitude(o$1p.subtract(i,a,We$m)),c=l*u,h=s*u,d=e._maxCoord.x,f=e._maxCoord.y,p=Math.max(c-d,d),_=Math.max(h-f,f);if(i.z<-p||i.z>p||i.y<-_||i.y>_){var m=a.y<-p||a.y>p,g=a.z<-_||a.z>_;if(m||g)return Se$g(e,i,a,p,_,t)}}v$K.prototype.createCorrectPositionTween=function(e){if(!e$2b(e))throw new t$16("duration is required.");if(this._mode===C$13.COLUMBUS_VIEW)return De$q(this,e)};var xe$r=new o$1p,M$10={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};function Oe$o(e,t){var i=e.frustum,n=Math.tan(.5*i.fovy),r=i.aspectRatio*n;return Math.max(t/r,t/n)}function Ne$i(e,t){var i=e.frustum;e$2b(i._offCenterFrustum)&&(i=i._offCenterFrustum);var n,r,o=i.right/i.top,a=t*o;return t>a?r=(n=t)/o:(r=t,n=a),1.5*Math.max(n,r)}v$K.prototype.cancelFlight=function(){e$2b(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)},v$K.prototype.flyTo=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).destination;if(!e$2b(t))throw new t$16("destination is required.");if(this._mode!==C$13.MORPHING){this.cancelFlight();var i=u$_(e.orientation,u$_.EMPTY_OBJECT);if(e$2b(i.direction)&&(i=Ut$6(this,t,i,It$a.orientation)),e$2b(e.duration)&&e.duration<=0){var n=It$a;return n.destination=e.destination,n.orientation.heading=i.heading,n.orientation.pitch=i.pitch,n.orientation.roll=i.roll,n.convert=e.convert,n.endTransform=e.endTransform,this.setView(n),void("function"==typeof e.complete&&e.complete())}var r=e$2b(t.west);r&&(t=this.getRectangleCameraCoordinates(t,xe$r));var o,a=this;M$10.destination=t,M$10.heading=i.heading,M$10.pitch=i.pitch,M$10.roll=i.roll,M$10.duration=e.duration,M$10.complete=function(){o===a._currentFlight&&(a._currentFlight=void 0),e$2b(e.complete)&&e.complete()},M$10.cancel=e.cancel,M$10.endTransform=e.endTransform,M$10.convert=!r&&e.convert,M$10.maximumHeight=e.maximumHeight,M$10.pitchAdjustHeight=e.pitchAdjustHeight,M$10.flyOverLongitude=e.flyOverLongitude,M$10.flyOverLongitudeWeight=e.flyOverLongitudeWeight,M$10.easingFunction=e.easingFunction,M$10.headingFree=u$_(e.headingFree,!1),M$10.pitchFree=u$_(e.pitchFree,!1),M$10.altitudeFree=u$_(e.altitudeFree,!1),M$10.directTurning=u$_(e.directTurning,!1),M$10.interpolationMode=u$_(e.interpolationMode,j$13.NONE),M$10.catmullRomSpline=e.catmullRomSpline,M$10.preStopIndex=e.preStopIndex,M$10.flyClampToGround=this._flyClampToGround,M$10.flyRelativeHeight=this._flyRelativeHeight;var s=this._scene,l=mr$4.createTween(s,M$10);if(0===l.duration)return void("function"==typeof l.complete&&l.complete());o=s.tweens.add(l),this._currentFlight=o;var u=this._scene.preloadFlightCamera;this._mode!==C$13.SCENE2D&&(e$2b(u)||(u=v$K.clone(this)),u.setView({destination:t,orientation:i}),this._scene.preloadFlightCullingVolume=u.frustum.computeCullingVolume(u.positionWC,u.directionWC,u.upWC))}};var Ae$s=100;function Kt$7(e,t,i){e$2b(i)||(i=a$T.clone(v$K.DEFAULT_OFFSET));var n=e._scene.screenSpaceCameraController.minimumZoomDistance,r=e._scene.screenSpaceCameraController.maximumZoomDistance,o=i.range;if(!e$2b(o)||0===o){var a=t.radius;0===a?i.range=Ae$s:e.frustum instanceof a$V||e._mode===C$13.SCENE2D?i.range=Ne$i(e,a):i.range=Oe$o(e,a),i.range=e$2a.clamp(i.range,n,r)}return i}v$K.prototype.viewBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("boundingSphere is required.");if(this._mode===C$13.MORPHING)throw new t$16("viewBoundingSphere is not supported while morphing.");t=Kt$7(this,e,t),this.lookAt(e.center,t)};var Fe$l=new p$1d,Ve$k=new o$1p,ze$f=new o$1p,Be$m=new o$1p,be$t=new o$1p,Le$r=new e$29,He$b=new n$13,Ue$i=new p$1e;v$K.prototype.flyToBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("boundingSphere is required.");t=u$_(t,u$_.EMPTY_OBJECT);var i=this._mode===C$13.SCENE2D||this._mode===C$13.COLUMBUS_VIEW;this._setTransform(p$1d.IDENTITY);var n,r=Kt$7(this,e,t.offset);n=i?o$1p.multiplyByScalar(o$1p.UNIT_Z,r.range,Ve$k):Qt$6(r.heading,r.pitch,r.range);var o,a,s=m$17.eastNorthUpToFixedFrame(e.center,t$13.WGS84,Fe$l);if(p$1d.multiplyByPoint(s,n,n),!i){if(o=o$1p.subtract(e.center,n,ze$f),o$1p.normalize(o,o),a=p$1d.multiplyByPointAsVector(s,o$1p.UNIT_Z,Be$m),1-Math.abs(o$1p.dot(o,a))<e$2a.EPSILON6){var l=n$13.fromAxisAngle(o,r.heading,He$b),u=p$1e.fromQuaternion(l,Ue$i);o$1p.fromCartesian4(p$1d.getColumn(s,1,Le$r),a),p$1e.multiplyByVector(u,a,a)}var c=o$1p.cross(o,a,be$t);o$1p.cross(c,o,a),o$1p.normalize(a,a)}this.flyTo({destination:n,orientation:{direction:o,up:a},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var $t$6=new o$1p,ti$6=new o$1p,Wt$9=new o$1p,ii$7=new o$1p,nt$c=[new o$1p,new o$1p,new o$1p,new o$1p];function je$h(e,t){var i,n,r=t.radii,o=e.positionWC,a=o$1p.multiplyComponents(t.oneOverRadii,o,$t$6),s=o$1p.magnitude(a),l=o$1p.normalize(a,ti$6);o$1p.equalsEpsilon(l,o$1p.UNIT_Z,e$2a.EPSILON10)?(i=new o$1p(0,1,0),n=new o$1p(0,0,1)):(i=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,l,Wt$9),Wt$9),n=o$1p.normalize(o$1p.cross(l,i,ii$7),ii$7));var u=Math.sqrt(o$1p.magnitudeSquared(a)-1),c=o$1p.multiplyByScalar(l,1/s,$t$6),h=u/s,d=o$1p.multiplyByScalar(i,h,ti$6),f=o$1p.multiplyByScalar(n,h,Wt$9),p=o$1p.add(c,f,nt$c[0]);o$1p.subtract(p,d,p),o$1p.multiplyComponents(r,p,p);var _=o$1p.subtract(c,f,nt$c[1]);o$1p.subtract(_,d,_),o$1p.multiplyComponents(r,_,_);var m=o$1p.subtract(c,f,nt$c[2]);o$1p.add(m,d,m),o$1p.multiplyComponents(r,m,m);var g=o$1p.add(c,f,nt$c[3]);return o$1p.add(g,d,g),o$1p.multiplyComponents(r,g,g),nt$c}var Dt$a=new o$1o,ke$e=new o$1p,q$13=[new a$18,new a$18,new a$18,new a$18];function _t$9(e,t,i,n,r,o){Dt$a.x=e,Dt$a.y=t;var a=n.pickEllipsoid(Dt$a,r,ke$e);return e$2b(a)?(q$13[i]=r.cartesianToCartographic(a,q$13[i]),1):(q$13[i]=r.cartesianToCartographic(o[i],q$13[i]),0)}function Ze$8(e,t){var i=e.distance,n=e.normal;t[0]=-2*n.x*n.x+1,t[1]=-2*n.y*n.x,t[2]=-2*n.z*n.x,t[3]=0,t[4]=-2*n.x*n.y,t[5]=-2*n.y*n.y+1,t[6]=-2*n.z*n.y,t[7]=0,t[8]=-2*n.x*n.z,t[9]=-2*n.y*n.z,t[10]=-2*n.z*n.z+1,t[11]=0,t[12]=-2*n.x*i,t[13]=-2*n.y*i,t[14]=-2*n.z*i,t[15]=1}v$K.prototype.computeViewRectangle=function(e,t){e=u$_(e,t$13.WGS84);var i=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),n=new i$1c(o$1p.ZERO,e.maximumRadius);if(i.computeVisibility(n)!==Ae$u.OUTSIDE){var r=this._scene.canvas,o=r.clientWidth,a=r.clientHeight,s=0,l=je$h(this,e);if(s+=_t$9(0,0,0,this,e,l),s+=_t$9(0,a,1,this,e,l),s+=_t$9(o,a,2,this,e,l),(s+=_t$9(o,0,3,this,e,l))<2)return h$18.MAX_VALUE;t=h$18.fromCartographicArray(q$13,t);for(var u=0,c=q$13[3].longitude,h=0;h<4;++h){var d=q$13[h].longitude,f=Math.abs(d-c);f>e$2a.PI?u+=e$2a.TWO_PI-f:u+=f,c=d}return e$2a.equalsEpsilon(Math.abs(u),e$2a.TWO_PI,e$2a.EPSILON9)&&(t.west=-e$2a.PI,t.east=e$2a.PI,q$13[0].latitude>=0?t.north=e$2a.PI_OVER_TWO:t.south=-e$2a.PI_OVER_TWO),t}},v$K.prototype.switchToPerspectiveFrustum=function(){if(!(this._mode===C$13.SCENE2D||this.frustum instanceof o$15)){var e=this._scene;this.frustum=new o$15,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=e$2a.toRadians(60)}},v$K.prototype.switchToOrthographicFrustum=function(){if(!(this._mode===C$13.SCENE2D||this.frustum instanceof a$V)){var e=this._scene;this.frustum=new a$V,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.width=o$1p.magnitude(this.position),e$2b(this.frustum.projectionMatrix)&&this._adjustOrthographicFrustum(!0)}},v$K.clone=function(e,t){return e$2b(t)||(t=new v$K(e._scene)),o$1p.clone(e.position,t.position),o$1p.clone(e.direction,t.direction),o$1p.clone(e.up,t.up),o$1p.clone(e.right,t.right),p$1d.clone(e._transform,t.transform),t._mode=e._mode,t._transformChanged=!0,t.frustum=e.frustum.clone(),t},v$K.prototype.enableReflection=function(e){this.bReflect=!0,Ze$8(e,this._reflectMatrix),D$X(this),this.frustum.reflect=!0,this.frustum.clipPlane=e,this.frustum.currentViewMatrix=this._viewMatrix},v$K.prototype.disableReflection=function(){this.bReflect=!1,this.frustum.reflect=!1,this.frustum instanceof o$15&&this.frustum.resetProjectionMatrix(),D$X(this)};var Ye$g=new p$1d,Ge$h=new p$1d,J$V=0,mt$7=!1;v$K.prototype.flyCircle=function(e){J$V=0,mt$7=!1,this._isFlyCircle=!1,this._flyCircle(e)},v$K.prototype._flyCircle=function(e){if(this._flyCircleLoop||!mt$7){(!this._isFlyCircle||this._isResetFlyCircleParm)&&(Et$a(),J$V=0,mt$7=!1,this._flyCircleCenter=o$1p.clone(e),this._isFlyCircle=!0,this._isResetFlyCircleParm=!1);var t=this.constrainedAxis,i=p$1d.clone(this.transform,Ge$h),n=m$17.eastNorthUpToFixedFrame(e,t$13.WGS84,Ye$g);this._setTransform(n),this.constrainedAxis=o$1p.UNIT_Z,Et$a();var r=.01;r*=this._speedRatio;var o=2*Math.PI-Math.abs(J$V);J$V<0&&(o*=-1),!this._flyCircleLoop&&Math.abs(J$V)>=2*Math.PI&&(r=o,mt$7=!0),J$V+=r,this.rotateRight(-r),this.constrainedAxis=t,this._setTransform(i)}else J$V=0},v$K.prototype.stopFlyCircle=function(){this._isFlyCircle=!1};var t$S={FRONT:de$x.FRONT,BACK:de$x.BACK,FRONT_AND_BACK:de$x.FRONT_AND_BACK},G$17=Object.freeze(t$S),j$12=0,I$1b=1;function z$T(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.frustum",e.frustum),o$1q.typeOf.object("options.origin",e.origin),o$1q.typeOf.object("options.orientation",e.orientation);var t,i,n=e.frustum,r=e.orientation,o=e.origin,a=u$_(e.vertexFormat,n$11.DEFAULT),s=u$_(e._drawNearPlane,!0);n instanceof o$15?(t=j$12,i=o$15.packedLength):n instanceof a$V&&(t=I$1b,i=a$V.packedLength),this._frustumType=t,this._frustum=n.clone(),this._origin=o$1p.clone(o),this._orientation=n$13.clone(r),this._drawNearPlane=s,this._vertexFormat=a,this._workerName="createFrustumGeometry",this.packedLength=2+i+o$1p.packedLength+n$13.packedLength+n$11.packedLength}z$T.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0);var n=e._frustumType,r=e._frustum;return t[i++]=n,n===j$12?(o$15.pack(r,t,i),i+=o$15.packedLength):(a$V.pack(r,t,i),i+=a$V.packedLength),o$1p.pack(e._origin,t,i),i+=o$1p.packedLength,n$13.pack(e._orientation,t,i),i+=n$13.packedLength,n$11.pack(e._vertexFormat,t,i),t[i+=n$11.packedLength]=e._drawNearPlane?1:0,t};var ee$y=new o$15,re$G=new a$V,ae$y=new n$13,te$B=new o$1p,oe$v=new n$11;function R$W(e,t,i,n,r,o,a,s){for(var l=e/3*2,u=0;u<4;++u)e$2b(t)&&(t[e]=o.x,t[e+1]=o.y,t[e+2]=o.z),e$2b(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e$2b(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),e+=3;r[l]=0,r[l+1]=0,r[l+2]=1,r[l+3]=0,r[l+4]=1,r[l+5]=1,r[l+6]=0,r[l+7]=1}z$T.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n,r=e[t++];r===j$12?(n=o$15.unpack(e,t,ee$y),t+=o$15.packedLength):(n=a$V.unpack(e,t,re$G),t+=a$V.packedLength);var o=o$1p.unpack(e,t,te$B);t+=o$1p.packedLength;var a=n$13.unpack(e,t,ae$y);t+=n$13.packedLength;var s=n$11.unpack(e,t,oe$v),l=1===e[t+=n$11.packedLength];if(!e$2b(i))return new z$T({frustum:n,origin:o,orientation:a,vertexFormat:s,_drawNearPlane:l});var u=r===i._frustumType?i._frustum:void 0;return i._frustum=n.clone(u),i._frustumType=r,i._origin=o$1p.clone(o,i._origin),i._orientation=n$13.clone(a,i._orientation),i._vertexFormat=n$11.clone(s,i._vertexFormat),i._drawNearPlane=l,i};var ie$F=new p$1e,ve$r=new p$1d,q$12=new p$1d,K$R=new o$1p,W$_=new o$1p,Z$Z=new o$1p,pe$x=new o$1p,ce$v=new o$1p,me$w=new o$1p,C$11=new Array(3),Y$O=new Array(4);Y$O[0]=new e$29(-1,-1,1,1),Y$O[1]=new e$29(1,-1,1,1),Y$O[2]=new e$29(1,1,1,1),Y$O[3]=new e$29(-1,1,1,1);for(var $$_=new Array(4),J$U=0;J$U<4;++J$U)$$_[J$U]=new e$29;z$T._computeNearFarPlanes=function(e,t,i,n,r,o,a,s){var l=p$1e.fromQuaternion(t,ie$F),u=u$_(o,K$R),c=u$_(a,W$_),h=u$_(s,Z$Z);u=p$1e.getColumn(l,0,u),c=p$1e.getColumn(l,1,c),h=p$1e.getColumn(l,2,h),o$1p.normalize(u,u),o$1p.normalize(c,c),o$1p.normalize(h,h),o$1p.negate(u,u);var d,f,p=p$1d.computeView(e,h,c,u,ve$r);if(i===j$12){var _=n.projectionMatrix,m=p$1d.multiply(_,p,q$12);f=p$1d.inverse(m,q$12)}else d=p$1d.inverseTransformation(p,q$12);e$2b(f)?(C$11[0]=n.near,C$11[1]=n.far):(C$11[0]=0,C$11[1]=n.near,C$11[2]=n.far);for(var g=0;g<2;++g)for(var x=0;x<4;++x){var v=e$29.clone(Y$O[x],$$_[x]);if(e$2b(f)){var y=1/(v=p$1d.multiplyByVector(f,v,v)).w;o$1p.multiplyByScalar(v,y,v),o$1p.subtract(v,e,v),o$1p.normalize(v,v);var $=o$1p.dot(h,v);o$1p.multiplyByScalar(v,C$11[g]/$,v),o$1p.add(v,e,v)}else{e$2b(n._offCenterFrustum)&&(n=n._offCenterFrustum);var b=C$11[g],T=C$11[g+1];v.x=.5*(v.x*(n.right-n.left)+n.left+n.right),v.y=.5*(v.y*(n.top-n.bottom)+n.bottom+n.top),v.z=.5*(v.z*(b-T)-b-T),v.w=1,p$1d.multiplyByVector(d,v,v)}r[12*g+3*x]=v.x,r[12*g+3*x+1]=v.y,r[12*g+3*x+2]=v.z}},z$T.createGeometry=function(e){var t=e._frustumType,i=e._frustum,n=e._origin,r=e._orientation,o=e._drawNearPlane,a=e._vertexFormat,s=o?6:5,l=new Float64Array(72);z$T._computeNearFarPlanes(n,r,t,i,l);var u=24;l[u]=l[12],l[u+1]=l[13],l[u+2]=l[14],l[u+3]=l[0],l[u+4]=l[1],l[u+5]=l[2],l[u+6]=l[9],l[u+7]=l[10],l[u+8]=l[11],l[u+9]=l[21],l[u+10]=l[22],l[u+11]=l[23],l[u+=12]=l[15],l[u+1]=l[16],l[u+2]=l[17],l[u+3]=l[3],l[u+4]=l[4],l[u+5]=l[5],l[u+6]=l[0],l[u+7]=l[1],l[u+8]=l[2],l[u+9]=l[12],l[u+10]=l[13],l[u+11]=l[14],l[u+=12]=l[3],l[u+1]=l[4],l[u+2]=l[5],l[u+3]=l[15],l[u+4]=l[16],l[u+5]=l[17],l[u+6]=l[18],l[u+7]=l[19],l[u+8]=l[20],l[u+9]=l[6],l[u+10]=l[7],l[u+11]=l[8],l[u+=12]=l[6],l[u+1]=l[7],l[u+2]=l[8],l[u+3]=l[18],l[u+4]=l[19],l[u+5]=l[20],l[u+6]=l[21],l[u+7]=l[22],l[u+8]=l[23],l[u+9]=l[9],l[u+10]=l[10],l[u+11]=l[11],o||(l=l.subarray(12));var c=new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:l})});if(e$2b(a.normal)||e$2b(a.tangent)||e$2b(a.bitangent)||e$2b(a.st)){var h=e$2b(a.normal)?new Float32Array(12*s):void 0,d=e$2b(a.tangent)?new Float32Array(12*s):void 0,f=e$2b(a.bitangent)?new Float32Array(12*s):void 0,p=e$2b(a.st)?new Float32Array(8*s):void 0,_=K$R,m=W$_,g=Z$Z,x=o$1p.negate(_,pe$x),v=o$1p.negate(m,ce$v),y=o$1p.negate(g,me$w);u=0,o&&(R$W(u,h,d,f,p,y,_,m),u+=12),R$W(u,h,d,f,p,g,x,m),R$W(u+=12,h,d,f,p,x,y,m),R$W(u+=12,h,d,f,p,v,y,x),R$W(u+=12,h,d,f,p,_,g,m),R$W(u+=12,h,d,f,p,m,g,x),e$2b(h)&&(c.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:h})),e$2b(d)&&(c.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:d})),e$2b(f)&&(c.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:f})),e$2b(p)&&(c.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:p}))}for(var $=new Uint16Array(6*s),b=0;b<s;++b){var T=6*b,C=4*b;$[T]=C,$[T+1]=C+1,$[T+2]=C+2,$[T+3]=C,$[T+4]=C+2,$[T+5]=C+3}return new I$1p({attributes:c,indices:$,primitiveType:W$18.TRIANGLES,boundingSphere:i$1c.fromVertices(l)})};var d$1e=0,A$15=1;function s$N(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.frustum",e.frustum),o$1q.typeOf.object("options.origin",e.origin),o$1q.typeOf.object("options.orientation",e.orientation);var t,i,n=e.frustum,r=e.orientation,o=e.origin,a=u$_(e._drawNearPlane,!0);n instanceof o$15?(t=d$1e,i=o$15.packedLength):n instanceof a$V&&(t=A$15,i=a$V.packedLength),this._frustumType=t,this._frustum=n.clone(),this._origin=o$1p.clone(o),this._orientation=n$13.clone(r),this._drawNearPlane=a,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+i+o$1p.packedLength+n$13.packedLength}s$N.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0);var n=e._frustumType,r=e._frustum;return t[i++]=n,n===d$1e?(o$15.pack(r,t,i),i+=o$15.packedLength):(a$V.pack(r,t,i),i+=a$V.packedLength),o$1p.pack(e._origin,t,i),i+=o$1p.packedLength,n$13.pack(e._orientation,t,i),t[i+=n$13.packedLength]=e._drawNearPlane?1:0,t};var j$11=new o$15,C$10=new a$V,E$13=new n$13,G$16=new o$1p;s$N.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n,r=e[t++];r===d$1e?(n=o$15.unpack(e,t,j$11),t+=o$15.packedLength):(n=a$V.unpack(e,t,C$10),t+=a$V.packedLength);var o=o$1p.unpack(e,t,G$16);t+=o$1p.packedLength;var a=n$13.unpack(e,t,E$13),s=1===e[t+=n$13.packedLength];if(!e$2b(i))return new s$N({frustum:n,origin:o,orientation:a,_drawNearPlane:s});var l=r===i._frustumType?i._frustum:void 0;return i._frustum=n.clone(l),i._frustumType=r,i._origin=o$1p.clone(o,i._origin),i._orientation=n$13.clone(a,i._orientation),i._drawNearPlane=s,i},s$N.createGeometry=function(e){var t=e._frustumType,i=e._frustum,n=e._origin,r=e._orientation,o=e._drawNearPlane,a=new Float64Array(24);z$T._computeNearFarPlanes(n,r,t,i,a);for(var s,l,u=new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:a})}),c=o?2:1,h=new Uint16Array(8*(c+1)),d=o?0:1;d<2;++d)l=4*d,h[s=o?8*d:0]=l,h[s+1]=l+1,h[s+2]=l+1,h[s+3]=l+2,h[s+4]=l+2,h[s+5]=l+3,h[s+6]=l+3,h[s+7]=l;for(d=0;d<2;++d)l=4*d,h[s=8*(c+d)]=l,h[s+1]=l+4,h[s+2]=l+1,h[s+3]=l+5,h[s+4]=l+2,h[s+5]=l+6,h[s+6]=l+3,h[s+7]=l+7;return new I$1p({attributes:u,indices:h,primitiveType:W$18.LINES,boundingSphere:i$1c.fromVertices(a)})};var d$1d="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nvec4 color = czm_gammaCorrect(v_color);\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}\n",h$Y="attribute vec3 position;\nattribute vec3 normal;\nattribute float batchId;\nattribute vec4 color;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = vec4(position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\nv_normalEC = czm_normal * normal;\nv_color = color;\ngl_Position = czm_modelViewProjection * p;\n}\n",F$10="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec4 color;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_color = color;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",d$1c="varying vec4 v_color;\nvoid main()\n{\ngl_FragColor = czm_gammaCorrect(v_color);\n}\n",i$U="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 color;\nattribute float batchId;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_color = color;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";function a$S(e){e=u$_(e,u$_.EMPTY_OBJECT),this.material=e.material,this.translucent=u$_(e.translucent,!0),this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=u$_(e.closed,!1)}function t$R(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.translucent,!0),i=u$_(e.closed,!1),n=u$_(e.flat,!1),r=u$_(e.materialSupport,t$R.MaterialSupport.BASIC),o=u$_(r.name,"PerInstanceColorAppearance no name"),a=r.vertexShaderSource,s=r.fragmentShaderSource,l=r.vertexFormat;n&&(a=i$U,s=d$1c,l=t$R.FLAT_VERTEX_FORMAT,o="PerInstanceFlatColorAppearance"),this.material=void 0,this.translucent=t,this._vertexShaderSource=u$_(e.vertexShaderSource,a),this._fragmentShaderSource=u$_(e.fragmentShaderSource,s),this._renderState=a$S.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._vertexFormat=l,this._flat=n,this._faceForward=u$_(e.faceForward,!i),this.name=o}function u$P(e,t){if(!e$2b(e))throw new t$16("array is required.");if(!e$2b(t)||t<1)throw new t$16("numberOfArrays must be greater than 0.");for(var i=[],n=e.length,r=0;r<n;){var o=Math.ceil((n-r)/t--);i.push(e.slice(r,r+o)),r+=o}return i}function e$1J(e,t){this.positions=e$2b(e)?e:[],this.holes=e$2b(t)?t:[]}function e$1I(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new o$1h,this.setValue(e)}function u$O(e,t,i,n,r){return{configurable:n,get:function(){return this[t]},set:function(n){var o=this[t],a=this[i];e$2b(a)&&(a(),this[i]=void 0),void 0!==n&&(!e$2b(n)||!e$2b(n.getValue))&&e$2b(r)&&(n=r(n)),o!==n&&(this[t]=n,this._definitionChanged.raiseEvent(this,e,n,o)),e$2b(n)&&e$2b(n.definitionChanged)&&(this[i]=n.definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this,e,n,n)}),this))}}}function p$Y(e){return new e$1I(e)}function C$$(e,t,i){return u$O(e,"_"+e.toString(),"_"+e.toString()+"Subscription",u$_(t,!1),u$_(i,p$Y))}function r$Z(){t$16.throwInstantiationError()}function t$Q(e){this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(a$S.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}}}),a$S.prototype.getFragmentShaderSource=function(){var e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),e$2b(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join("\n")},a$S.prototype.isTranslucent=function(){return e$2b(this.material)&&this.material.isTranslucent()||!e$2b(this.material)&&this.translucent},a$S.prototype.getRenderState=function(){var e=this.isTranslucent(),t=l$1g(this.renderState,!1);return e?(t.depthMask=!1,t.blending=Ee$r.ALPHA_BLEND):t.depthMask=!0,t},a$S.getDefaultRenderState=function(e,t,i){var n={depthTest:{enabled:!0}};return e&&(n.depthMask=!1,n.blending=Ee$r.ALPHA_BLEND),t&&(n.cull={enabled:!0,face:G$17.BACK}),e$2b(i)&&(n=p$19(i,n,!0)),n},Object.defineProperties(t$R.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),t$R.VERTEX_FORMAT=n$11.POSITION_AND_NORMAL,t$R.FLAT_VERTEX_FORMAT=n$11.POSITION_ONLY,t$R.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,t$R.prototype.isTranslucent=a$S.prototype.isTranslucent,t$R.prototype.getRenderState=a$S.prototype.getRenderState,t$R.MaterialSupport={BASIC:Object.freeze({vertexFormat:n$11.POSITION_AND_NORMAL,vertexShaderSource:F$10,fragmentShaderSource:d$1d,name:"PerInstanceColorAppearance"}),FLAT:Object.freeze({vertexFormat:n$11.POSITION_ONLY,vertexShaderSource:i$U,fragmentShaderSource:d$1c,name:"PerInstanceFlatColorAppearance"}),FLOAT_POSITION:Object.freeze({vertexFormat:n$11.POSITION_AND_NORMAL,vertexShaderSource:h$Y,fragmentShaderSource:d$1d,name:"PerInstanceColorAppearance"})},Object.defineProperties(e$1I.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}}),e$1I.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value},e$1I.prototype.setValue=function(e){var t=this._value;if(t!==e){var i=e$2b(e),n=i&&"function"==typeof e.clone,r=i&&"function"==typeof e.equals;(!r||!e.equals(t))&&(this._hasClone=n,this._hasEquals=r,this._value=n?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}},e$1I.prototype.equals=function(e){return this===e||e instanceof e$1I&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))},e$1I.prototype.valueOf=function(){return this._value},e$1I.prototype.toString=function(){return String(this._value)},Object.defineProperties(r$Z.prototype,{isConstant:{get:t$16.throwInstantiationError},definitionChanged:{get:t$16.throwInstantiationError}}),r$Z.prototype.getValue=t$16.throwInstantiationError,r$Z.prototype.equals=t$16.throwInstantiationError,r$Z.equals=function(e,t){return e===t||e$2b(e)&&e.equals(t)},r$Z.arrayEquals=function(e,t){if(e===t)return!0;if(!e$2b(e)||!e$2b(t)||e.length!==t.length)return!1;for(var i=e.length,n=0;n<i;n++)if(!r$Z.equals(e[n],t[n]))return!1;return!0},r$Z.isConstant=function(e){return!e$2b(e)||e.isConstant},r$Z.getValueOrUndefined=function(e,t,i){return e$2b(e)?e.getValue(t,i):void 0},r$Z.getValueOrDefault=function(e,t,i,n){return e$2b(e)?u$_(e.getValue(t,n),i):i},r$Z.getValueOrClonedDefault=function(e,t,i,n){var r;return e$2b(e)&&(r=e.getValue(t,n)),e$2b(r)||(r=i.clone(r)),r},Object.defineProperties(t$Q.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color")}),t$Q.prototype.getType=function(e){return"Color"},t$Q.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,e$1U.WHITE,t.color),t},t$Q.prototype.equals=function(e){return this===e||e instanceof t$Q&&r$Z.equals(this._color,e._color)};var f$U=new o$1o(1,1),d$1b=!1,l$$=e$1U.WHITE;function a$R(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this._unique=!1,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent,this._unique=e.unique}function a$Q(e){if(e instanceof e$1U)return new t$Q(e);if("string"==typeof e||e instanceof t$11||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof t$V){var t=new a$R;return t.image=e,t}throw new t$16("Unable to infer material type: "+e)}function c$_(e,t){return C$$(e,t,a$Q)}function r$Y(e,t){e=u$_(e,0),this._near=e,t=u$_(t,Number.MAX_VALUE),this._far=t}Object.defineProperties(a$R.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._image)&&r$Z.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:C$$("image"),repeat:C$$("repeat"),color:C$$("color"),transparent:C$$("transparent")}),a$R.prototype.getType=function(e){return"Image"},a$R.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.image=r$Z.getValueOrUndefined(this._image,e),t.repeat=r$Z.getValueOrClonedDefault(this._repeat,e,f$U,t.repeat),t.color=r$Z.getValueOrClonedDefault(this._color,e,l$$,t.color),r$Z.getValueOrDefault(this._transparent,e,d$1b)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t},a$R.prototype.equals=function(e){return this===e||e instanceof a$R&&r$Z.equals(this._image,e._image)&&r$Z.equals(this._repeat,e._repeat)&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._transparent,e._transparent)&&!this._unique&&!e._unique},Object.defineProperties(r$Y.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}}),r$Y.packedLength=2,r$Y.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),t[i++]=e.near,t[i]=e.far,t},r$Y.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");return t=u$_(t,0),e$2b(i)||(i=new r$Y),i.near=e[t++],i.far=e[t],i},r$Y.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.near===t.near&&e.far===t.far},r$Y.clone=function(e,t){if(e$2b(e))return e$2b(t)||(t=new r$Y),t.near=e.near,t.far=e.far,t},r$Y.prototype.clone=function(e){return r$Y.clone(this,e)},r$Y.prototype.equals=function(e){return r$Y.equals(this,e)};var Z$Y="void clipLineSegmentToNearPlane(\nvec3 p0,\nvec3 p1,\nout vec4 positionWC,\nout bool clipped,\nout bool culledByNearPlane,\nout vec4 clippedPositionEC)\n{\nculledByNearPlane = false;\nclipped = false;\nvec3 p0ToP1 = p1 - p0;\nfloat magnitude = length(p0ToP1);\nvec3 direction = normalize(p0ToP1);\nfloat endPoint0Distance = czm_currentFrustum.x + p0.z;\nfloat denominator = -direction.z;\nif (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n{\nculledByNearPlane = true;\n}\nelse if (endPoint0Distance > 0.0)\n{\nfloat t = endPoint0Distance / denominator;\nif (t < 0.0 || t > magnitude)\n{\nculledByNearPlane = true;\n}\nelse\n{\np0 = p0 + t * direction;\np0.z = min(p0.z, -czm_currentFrustum.x);\nclipped = true;\n}\n}\nclippedPositionEC = vec4(p0, 1.0);\npositionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n}\nvec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n{\n#ifdef POLYLINE_DASH\nvec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\nvec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\nvec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\nvec2 lineDir;\nif (usePrevious) {\nlineDir = normalize(positionWindow.xy - previousWindow.xy);\n}\nelse {\nlineDir = normalize(nextWindow.xy - positionWindow.xy);\n}\nangle = atan(lineDir.x, lineDir.y) - 1.570796327;\nangle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n#endif\nvec4 clippedPrevWC, clippedPrevEC;\nbool prevSegmentClipped, prevSegmentCulled;\nclipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\nvec4 clippedNextWC, clippedNextEC;\nbool nextSegmentClipped, nextSegmentCulled;\nclipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\nbool segmentClipped, segmentCulled;\nvec4 clippedPositionWC, clippedPositionEC;\nclipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\nif (segmentCulled)\n{\nreturn vec4(0.0, 0.0, 0.0, 1.0);\n}\nvec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\nvec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\nif (prevSegmentCulled)\n{\ndirectionToPrevWC = -directionToNextWC;\n}\nelse if (nextSegmentCulled)\n{\ndirectionToNextWC = -directionToPrevWC;\n}\nvec2 thisSegmentForwardWC, otherSegmentForwardWC;\nif (usePrevious)\n{\nthisSegmentForwardWC = -directionToPrevWC;\notherSegmentForwardWC = directionToNextWC;\n}\nelse\n{\nthisSegmentForwardWC = directionToNextWC;\notherSegmentForwardWC = -directionToPrevWC;\n}\nvec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\nvec2 leftWC = thisSegmentLeftWC;\nfloat expandWidth = width * 0.5;\nif (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n{\nvec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\nvec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\nfloat leftSumLength = length(leftSumWC);\nleftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\nvec2 u = -thisSegmentForwardWC;\nvec2 v = leftWC;\nfloat sinAngle = abs(u.x * v.y - u.y * v.x);\nexpandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n}\nvec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;\nreturn vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;\n}\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\nvec4 positionEC = czm_modelViewRelativeToEye * position;\nvec4 prevEC = czm_modelViewRelativeToEye * previous;\nvec4 nextEC = czm_modelViewRelativeToEye * next;\nreturn getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);\n}\n",h$X="#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvarying vec2 v_st;\nvarying float v_alpha;\nvarying float v_clipW;\n#ifdef TRAIL\n#ifdef WEBGPU\nuniform float spotIntensity_4;\n#else\nuniform float spotIntensity;\n#endif\nvarying float v_Percent;\nvarying float v_SpotPercent;\n#endif\nvoid main()\n{\nczm_materialInput materialInput;\nvec2 st = v_st;\nst.t = czm_readNonPerspective(st.t, 1.0 / v_clipW);\nmaterialInput.s = st.s;\nmaterialInput.st = st;\nmaterialInput.str = vec3(st, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#ifdef VECTOR_TILE\ngl_FragColor *= u_highlightColor;\n#endif\n#ifdef ENABLE_DYNAMIC\nfloat alpha = v_alpha;\nif(bAsy_4 != 1.0){\nalpha = 0.0;\n}\ngl_FragColor.a = pow(max(0.0, sin(3.14159 * (alpha + (1.0 - 2.0*v_time_3)))), 3.5);\n#endif\n#ifdef TRAIL\nif(v_Percent > 1.0 || v_Percent < 0.0)\n{\ndiscard;\n}\nfloat fade = v_Percent;\nif(v_Percent > (1.0 - v_SpotPercent))\n{\ngl_FragColor.rgb *= spotIntensity_4;\n}\ngl_FragColor.a *= fade;\n#endif\n}\n",tr$7="attribute vec3 positionHigh;\nattribute vec3 positionLow;\nattribute vec3 prevPositionHigh;\nattribute vec3 prevPositionLow;\nattribute vec3 nextPositionHigh;\nattribute vec3 nextPositionLow;\nattribute vec4 texCoordExpandAndBatchIndex;\nvarying vec2 v_st;\nvarying float v_width;\nvarying vec4 v_pickColor;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying vec4 vColor;\nvarying float fSelected;\nvarying float v_clipW;\nvoid main()\n{\nfloat texCoord = texCoordExpandAndBatchIndex.x;\nfloat expandDir = texCoordExpandAndBatchIndex.y;\nbool usePrev = texCoordExpandAndBatchIndex.z < 0.0;\nfloat batchTableIndex = texCoordExpandAndBatchIndex.w;\nvec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);\nfloat width = widthAndShow.x + 0.5;\nfloat show = widthAndShow.y;\nif (width < 1.0)\n{\nshow = 0.0;\n}\nvec4 pickColor = batchTable_getPickColor(batchTableIndex);\nvec4 p, prev, next;\n#ifdef SCENE_3D\np = czm_translateRelativeToEye(positionHigh.xyz, positionLow.xyz);\nprev = czm_translateRelativeToEye(prevPositionHigh.xyz, prevPositionLow.xyz);\nnext = czm_translateRelativeToEye(nextPositionHigh.xyz, nextPositionLow.xyz);\n#else\np = czm_translateRelativeToEye(positionHigh.zxy, positionLow.zxy);\nprev = czm_translateRelativeToEye(prevPositionHigh.zxy, prevPositionLow.zxy);\nnext = czm_translateRelativeToEye(nextPositionHigh.zxy, nextPositionLow.zxy);\n#endif\n#ifdef DISTANCE_DISPLAY_CONDITION\nvec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);\nvec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);\nvec3 centerLow = centerLowAndRadius.xyz;\nfloat radius = centerLowAndRadius.w;\nvec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nvec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);\nlengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);\n}\nfloat nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;\nfloat farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;\nif (lengthSq < nearSq || lengthSq > farSq)\n{\nshow = 0.0;\n}\n#endif\nfloat polylineAngle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\ngl_Position = czm_viewportOrthographic * positionWC * show;\nv_st.s = texCoord;\nv_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);\nv_width = width;\nv_pickColor = pickColor;\nv_polylineAngle = polylineAngle;\nv_clipW = gl_Position.w;\n}\n";function h$W(e,t,i){if(!e$2b(e))throw new t$16("context is required");if(!e$2b(t))throw new t$16("attributes is required");if(!e$2b(i))throw new t$16("numberOfInstances is required");if(this._attributes=t,this._numberOfInstances=i,0!==t.length){var n=U$10(t),r=e.floatingPointTexture,o=n===_$$.FLOAT&&!r,a=G$15(t,o),s=X$X(a,t,o),l=Math.floor(e$1T.maximumTextureSize/s),u=Math.min(i,l),c=s*u,h=Math.ceil(i/u),d=1/c,f=.5*d,p=1/h,_=.5*p;this._textureDimensions=new o$1o(c,h),this._textureStep=new e$29(d,f,p,_),this._pixelDatatype=o?_$$.UNSIGNED_BYTE:n,this._packFloats=o,this._offsets=a,this._stride=s,this._texture=void 0;var m=4*c*h;this._batchValues=n!==_$$.FLOAT||o?new Uint8Array(m):new Float32Array(m),this._batchValuesDirty=!1,this._suffix="",this.useForMaterial=!1}}function U$10(e){for(var t=!1,i=e.length,n=0;n<i;++n)if(e[n].componentDatatype!==S$12.UNSIGNED_BYTE){t=!0;break}return t?_$$.FLOAT:_$$.UNSIGNED_BYTE}function g$14(e,t){var i=e[t].componentsPerAttribute;return 2===i?o$1o:3===i?o$1p:4===i?e$29:Number}function G$15(e,t){for(var i=new Array(e.length),n=0,r=e.length,o=0;o<r;++o){var a=e[o].componentDatatype;i[o]=n,a!==S$12.UNSIGNED_BYTE&&t?n+=4:++n}return i}function X$X(e,t,i){var n=e.length,r=e[n-1];return t[n-1].componentDatatype!==S$12.UNSIGNED_BYTE&&i?r+4:r+1}Object.defineProperties(h$W.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}},suffix:{get:function(){return this._suffix},set:function(e){this._suffix=e}}});var _$S=new e$29;function P$Y(e,t,i){var n=e$29.unpack(e,t,_$S),r=e$29.unpackFloat(n);n=e$29.unpack(e,t+4,_$S);var o=e$29.unpackFloat(n);n=e$29.unpack(e,t+8,_$S);var a=e$29.unpackFloat(n);n=e$29.unpack(e,t+12,_$S);var s=e$29.unpackFloat(n);return e$29.fromElements(r,o,a,s,i)}function L$14(e,t,i){var n=e$29.packFloat(e.x,_$S);e$29.pack(n,t,i),n=e$29.packFloat(e.y,n),e$29.pack(n,t,i+4),n=e$29.packFloat(e.z,n),e$29.pack(n,t,i+8),n=e$29.packFloat(e.w,n),e$29.pack(n,t,i+12)}var w$S=new e$29;h$W.prototype.getBatchedAttribute=function(e,t,i){if(e<0||e>=this._numberOfInstances)throw new t$16("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new t$16("attributeIndex is out of range");var n,r=this._attributes,o=this._offsets[t],a=4*this._stride*e+4*o;n=this._packFloats&&r[t].componentDatatype!==_$$.UNSIGNED_BYTE?P$Y(this._batchValues,a,w$S):e$29.unpack(this._batchValues,a,w$S);var s=g$14(r,t);return e$2b(s.fromCartesian4)?s.fromCartesian4(n,i):e$2b(s.clone)?s.clone(n,i):n.x};var R$V=[void 0,void 0,new o$1o,new o$1p,new e$29],q$11=new e$29;function W$Z(e,t){var i=e._textureDimensions;e._texture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:e._pixelDatatype,width:i.x,height:i.y,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),flipY:!1})}function j$10(e){var t=e._textureDimensions;e._texture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function H$_(e){var t=e.useUBO,i=e._stride;return 1===e._textureDimensions.y?(t?"":"uniform vec4 batchTextureStep{suffix}; \n")+"vec2 computeSt{suffix}(float batchId) \n{ \n float stepX = batchTextureStep{suffix}.x; \n float centerX = batchTextureStep{suffix}.y; \n float numberOfAttributes = float("+i+"); \n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5); \n} \n":(t?"":"uniform vec4 batchTextureStep{suffix}; \nuniform vec2 batchTextureDimensions{suffix}; \n")+"vec2 computeSt{suffix}(float batchId) \n{ \n float stepX = batchTextureStep{suffix}.x; \n float centerX = batchTextureStep{suffix}.y; \n float stepY = batchTextureStep{suffix}.z; \n float centerY = batchTextureStep{suffix}.w; \n float numberOfAttributes = float("+i+"); \n float xId = mod(batchId * numberOfAttributes, batchTextureDimensions{suffix}.x); \n float yId = floor(batchId * numberOfAttributes / batchTextureDimensions{suffix}.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function J$T(e){var t=e._stride;return 1===e._textureDimensions.y?""+"fn computeSt{suffix}(batchId : f32) -> vec2<f32> \n{ \n var stepX = Mesh.batchTextureStep{suffix}.x; \n var centerX = Mesh.batchTextureStep{suffix}.y; \n var numberOfAttributes = f32("+t+"); \n return vec2<f32>(centerX + (batchId * numberOfAttributes * stepX), 0.5f); \n} \n":""+"fn computeSt{suffix}(batchId : f32) -> vec2<f32> \n{ \n var stepX = Mesh.batchTextureStep{suffix}.x; \n var centerX = Mesh.batchTextureStep{suffix}.y; \n var stepY = Mesh.batchTextureStep{suffix}.z; \n var centerY = Mesh.batchTextureStep{suffix}.w; \n var numberOfAttributes = f32("+t+"); \n var d = floor((batchId * numberOfAttributes) / Mesh.batchTextureDimensions{suffix}.x); \n var xId = batchId * numberOfAttributes - d * Mesh.batchTextureDimensions{suffix}.x; \n var yId = floor(batchId * numberOfAttributes / Mesh.batchTextureDimensions{suffix}.x); \n return vec2<f32>(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function K$Q(e){return 1===e?"float":"vec"+e}function Q$X(e){return 1===e?"f32":"vec"+e+"<f32>"}function F$$(e){return 1===e?".x":2===e?".xy":3===e?".xyz":""}function Z$X(e,t){var i=e._attributes[t],n=i.componentsPerAttribute,r=i.functionName,o=K$Q(n),a=F$$(n),s=o+" "+r+"(float batchId) \n{ \n vec2 st = computeSt{suffix}(batchId); \n st.x += batchTextureStep{suffix}.x * float("+e._offsets[t]+"); \n";return e._packFloats&&i.componentDatatype!==_$$.UNSIGNED_BYTE?s+="vec4 textureValue; \ntextureValue.x = czm_unpackFloat(texture2D(batchTexture{suffix}, st)); \ntextureValue.y = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x, 0.0))); \ntextureValue.z = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x * 2.0, 0.0))); \ntextureValue.w = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x * 3.0, 0.0))); \n":s+=" vec4 textureValue = texture2D(batchTexture{suffix}, st); \n",s+=" "+o+" value = textureValue"+a+"; \n",e._pixelDatatype!==_$$.UNSIGNED_BYTE||i.componentDatatype!==S$12.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===_$$.FLOAT&&i.componentDatatype===S$12.UNSIGNED_BYTE&&i.normalize&&(s+="value /= 255.0; \n"):s+="value *= 255.0; \n",s+=" return value; \n} \n"}function $$Z(e,t){var i=e._attributes[t],n=i.componentsPerAttribute,r=i.functionName,o=Q$X(n),a=F$$(n),s="fn "+r+"(batchId : f32) ->"+o+"{ \n var st = computeSt{suffix}(batchId); \n st.x += Mesh.batchTextureStep{suffix}.x * f32("+e._offsets[t]+"); \n";return e._packFloats&&i.componentDatatype!==_$$.UNSIGNED_BYTE?s+="var textureValue : vec4<f32>; \ntextureValue.x = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st, 0.0f)); \ntextureValue.y = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st + vec2<f32>(Material.batchTextureStep{suffix}.x, 0.0f), 0.0f)); \ntextureValue.z = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st + vec2<f32>(Material.batchTextureStep{suffix}.x * 2.0f, 0.0f), 0.0f)); \ntextureValue.w = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st + vec2<f32>(Material.batchTextureStep{suffix}.x * 3.0f, 0.0f), 0.0f)); \n":s+=" var textureValue = textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st, 0.0f); \n",s+=" var value = textureValue"+a+"; \n",e._pixelDatatype!==_$$.UNSIGNED_BYTE||i.componentDatatype!==S$12.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===_$$.FLOAT&&i.componentDatatype===S$12.UNSIGNED_BYTE&&i.normalize&&(s+=" value /= 255.0f; \n"):s+=" value *= 255.0f; \n",s+=" return value; \n} \n"}function e$1H(e,t,i,n,r){this._format=e,this._width=t,this._height=i,this._buffer=n,this._datatype=r}h$W.prototype.setBatchedAttribute=function(e,t,i){if(e<0||e>=this._numberOfInstances)throw new t$16("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new t$16("attributeIndex is out of range");if(!e$2b(i))throw new t$16("value is required.");var n=this._attributes,r=R$V[n[t].componentsPerAttribute],o=this.getBatchedAttribute(e,t,r),a=g$14(this._attributes,t);if(!(e$2b(a.equals)?a.equals(o,i):o===i)){var s=q$11;s.x=e$2b(i.x)?i.x:i,s.y=e$2b(i.y)?i.y:0,s.z=e$2b(i.z)?i.z:0,s.w=e$2b(i.w)?i.w:0;var l=this._offsets[t],u=4*this._stride*e+4*l;this._packFloats&&n[t].componentDatatype!==_$$.UNSIGNED_BYTE?L$14(s,this._batchValues,u):e$29.pack(s,this._batchValues,u),this._batchValuesDirty=!0}},h$W.prototype.update=function(e){e$2b(this._texture)&&!this._batchValuesDirty||0===this._attributes.length||(this._batchValuesDirty=!1,e$2b(this._texture)||W$Z(this,e.context),j$10(this))},h$W.prototype.getUniformMapCallback=function(){var e=this;return function(t){if(0===e._attributes.length)return t;var i={};return i["batchTexture"+e._suffix]=function(){return e._texture},e.useUBO||(i["batchTextureDimensions"+e._suffix]=function(){return e._textureDimensions},i["batchTextureStep"+e._suffix]=function(){return e._textureStep}),p$19(t,i)}},h$W.prototype.getVertexShaderCallback=function(e){return(e=u$_(e,!1))?this._getWgslVertexShaderCallback():this._getGlslVertexShaderCallback()},h$W.prototype._getGlslVertexShaderCallback=function(){var e=this._attributes;if(0===e.length)return function(e){return e};var t="uniform highp sampler2D batchTexture{suffix}; \n";s$Y.isPCBroswer()&&(t="uniform sampler2D batchTexture{suffix}; \n"),t+=H$_(this)+"\n";for(var i=e.length,n=0;n<i;++n)t+=Z$X(this,n);return t=t.replace(/\{suffix\}/g,this._suffix),function(e){var i=e.indexOf("void main"),n=e.substring(0,i),r=e.substring(i);return n+"\n"+t+"\n"+r}},h$W.prototype._getWgslVertexShaderCallback=function(){var e=this._attributes;if(0===e.length)return function(e){return e};var t="var batchTexture{suffix} : texture_2d<f32>; \nvar batchTexture{suffix}Sampler : sampler; \n";t+=J$T(this)+"\n";for(var i=e.length,n=0;n<i;++n)t+=$$Z(this,n);return t=t.replace(/\{suffix\}/g,this._suffix),this.useForMaterial&&(t=t.replace(/\Mesh./g,"Material.")),function(e){var i=e.indexOf("@vertex"),n=e.substring(0,i),r=e.substring(i);return n+"\n"+t+"\n"+r}},h$W.prototype.hasMultiRow=function(){return this._textureDimensions.y>1},h$W.prototype.isDestroyed=function(){return!1},h$W.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),i$10(this)},Object.defineProperties(e$1H.prototype,{internalFormat:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},pixelDatatype:{get:function(){return this._datatype}}}),e$1H.clone=function(e){if(e$2b(e))return new e$1H(e._format,e._width,e._height,e._buffer,e._datatype)},e$1H.prototype.clone=function(){return e$1H.clone(this)};var t$P,p$X=!1,I$1a=new i$V("transcodeCRNToDXTprevious",Number.POSITIVE_INFINITY);function a$P(e,t,i){if(i){if(!e$2b(e))throw new t$16("resourceOrUrlOrBuffer is required.");if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))n=o$1l.resolve(e);else n=t$11.createIfNeeded(e).fetchArrayBuffer();return e$2b(n)?n.then((function(e){if(e$2b(e)){var t=[];return e instanceof ArrayBuffer?t.push(e):(0===e.byteOffset&&e.byteLength===e.buffer.byteLength||(e=e.slice(0,e.length)),t.push(e.buffer)),I$1a.scheduleTask(e,t)}})).then((function(e){return e$1H.clone(e)})):void 0}if(e$2b(t$P)||(t$P=new i$V("transcodeCRNToDXT",Number.POSITIVE_INFINITY)).initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){p$X=!0})),p$X){if(!e$2b(e))throw new t$16("resourceOrUrlOrBuffer is required.");var n;return e$2b(n=e instanceof ArrayBuffer||ArrayBuffer.isView(e)?o$1l.resolve(e):t$11.createIfNeeded(e).fetchArrayBuffer())?n.then((function(e){if(e$2b(e)){var i=[];e instanceof ArrayBuffer?i.push(e):(0===e.byteOffset&&e.byteLength===e.buffer.byteLength||(e=e.slice(0,e.length)),i.push(e.buffer));var n=u$_(t,!1);return t$P.scheduleTask({data:e,bMipMap:n},i)}})).then((function(e){return e$1H.clone(e)})):void 0}}function k$V(e){var t;(o$1q.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?t=o$1l.resolve(e):t=t$11.createIfNeeded(e).fetchArrayBuffer();if(e$2b(t))return t.then((function(e){if(e$2b(e))return P$X(e)}))}var c$Z=[171,75,84,88,32,49,49,187,13,10,26,10],L$13=67305985,F$_=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"],n$X=4;function P$X(e){var t,i,n,r=new Uint8Array(e),o=!0;for(t=0;t<c$Z.length;++t)if(c$Z[t]!==r[t]){o=!1;break}if(!o)throw new t$14("Invalid KTX file.");e$2b(e.buffer)?(i=new DataView(e.buffer),n=e.byteOffset):(i=new DataView(e),n=0),n+=12;var a=i.getUint32(n,!0);if(n+=n$X,a!==L$13)throw new t$14("File is the wrong endianness.");var s=i.getUint32(n,!0);n+=n$X;var l=i.getUint32(n,!0);n+=n$X;var u=i.getUint32(n,!0);n+=n$X;var c=i.getUint32(n,!0);n+=n$X;var h=i.getUint32(n,!0);n+=n$X;var d=i.getUint32(n,!0);n+=n$X;var f=i.getUint32(n,!0);n+=n$X;var p=i.getUint32(n,!0);n+=n$X;var _=i.getUint32(n,!0);n+=n$X;var m=i.getUint32(n,!0);n+=n$X;var g=i.getUint32(n,!0);n+=n$X;var x=i.getUint32(n,!0);n+=n$X,n+=x;var v,y=i.getUint32(n,!0);if(n+=n$X,v=e$2b(e.buffer)?new Uint8Array(e.buffer,n,y):new Uint8Array(e,n,y),c===de$x.RGB8?c=V$10.RGB:c===de$x.RGBA8&&(c=V$10.RGBA),!V$10.validate(c))throw new t$14("glInternalFormat is not a valid format.");if(V$10.isCompressedFormat(c)){if(0!==s)throw new t$14("glType must be zero when the texture is compressed.");if(1!==l)throw new t$14("The type size for compressed textures must be 1.");if(0!==u)throw new t$14("glFormat must be zero when the texture is compressed.")}else{if(s!==de$x.UNSIGNED_BYTE)throw new t$14("Only unsigned byte buffers are supported.");if(h!==u)throw new t$14("The base internal format must be the same as the format for uncompressed textures.")}if(0!==p)throw new t$14("3D textures are unsupported.");if(0!==_)throw new t$14("Texture arrays are unsupported.");var $=v.byteOffset,b=new Array(g);for(t=0;t<g;++t){for(var T=b[t]={},C=0;C<m;++C){var S=d>>t,w=f>>t,E=V$10.isCompressedFormat(c)?V$10.compressedTextureSizeInBytes(c,S,w):V$10.textureSizeInBytes(c,s,S,w),P=new Uint8Array(v.buffer,$,E);T[F$_[C]]=new e$1H(c,S,w,P),$+=E}$+=3-($+3)%4+4}var A=b;if(1===m)for(t=0;t<g;++t)A[t]=A[t][F$_[0]];return 1===g&&(A=A[0]),A}var Z$W="uniform sampler2D image;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 rampColor = texture2D(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",j$$="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nvec2 centerPixel = fract(repeat * st);\nfloat centerBump = texture2D(image, centerPixel).channel;\nfloat imageWidth = float(imageDimensions.x);\nvec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));\nfloat rightBump = texture2D(image, rightPixel).channel;\nfloat imageHeight = float(imageDimensions.y);\nvec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));\nfloat topBump = texture2D(image, leftPixel).channel;\nvec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));\nvec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\nmaterial.normal = normalEC;\nmaterial.diffuse = vec3(0.01);\nreturn material;\n}\n",J$S="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0);\nfloat scaledWidth = fract(repeat.s * st.s);\nscaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\nfloat scaledHeight = fract(repeat.t * st.t);\nscaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\nfloat value = min(scaledWidth, scaledHeight);\nvec4 currentColor = mix(lightColor, darkColor, b);\nvec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",$$Y="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5));\nvec4 color = mix(lightColor, darkColor, b);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",q$10="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nuniform float spacing;\nuniform float width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat distanceToContour = mod(materialInput.height, spacing);\n#ifdef GL_OES_standard_derivatives\nfloat dxc = abs(dFdx(materialInput.height));\nfloat dyc = abs(dFdy(materialInput.height));\nfloat dF = max(dxc, dyc) * czm_pixelRatio * width;\nfloat alpha = (distanceToContour < dF) ? 1.0 : 0.0;\n#else\nfloat alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;\n#endif\nvec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha));\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",U$$="uniform sampler2D image;\nuniform float minimumHeight;\nuniform float maximumHeight;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);\nvec4 rampColor = texture2D(image, vec2(scaledHeight, 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",K$P="uniform vec4 fadeInColor;\nuniform vec4 fadeOutColor;\nuniform float maximumDistance;\nuniform bool repeat;\nuniform vec2 fadeDirection;\nuniform vec2 time;\nfloat getTime(float t, float coord)\n{\nfloat scalar = 1.0 / maximumDistance;\nfloat q = distance(t, coord) * scalar;\nif (repeat)\n{\nfloat r = distance(t, coord + 1.0) * scalar;\nfloat s = distance(t, coord - 1.0) * scalar;\nq = min(min(r, s), q);\n}\nreturn clamp(q, 0.0, 1.0);\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat s = getTime(time.x, st.s) * fadeDirection.s;\nfloat t = getTime(time.y, st.t) * fadeDirection.t;\nfloat u = length(vec2(s, t));\nvec4 color = mix(fadeInColor, fadeOutColor, u);\ncolor = czm_gammaCorrect(color);\nmaterial.emission = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",Q$W="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nuniform float cellAlpha;\nuniform vec2 lineCount;\nuniform vec2 lineThickness;\nuniform vec2 lineOffset;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat scaledWidth = fract(lineCount.s * st.s - lineOffset.s);\nscaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\nfloat scaledHeight = fract(lineCount.t * st.t - lineOffset.t);\nscaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\nfloat value;\n#ifdef GL_OES_standard_derivatives\nconst float fuzz = 1.2;\nvec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;\nvec2 dx = abs(dFdx(st));\nvec2 dy = abs(dFdy(st));\nvec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\nvalue = min(\nsmoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\nsmoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n#else\nconst float fuzz = 0.05;\nvec2 range = 0.5 - (lineThickness * 0.05);\nvalue = min(\n1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),\n1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));\n#endif\nfloat dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));\nfloat sRim = smoothstep(0.8, 1.0, dRim);\nvalue *= (1.0 - sRim);\nvec4 halfColor;\nhalfColor.rgb = color.rgb * 0.5;\nhalfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));\nhalfColor = czm_gammaCorrect(halfColor);\nmaterial.diffuse = halfColor.rgb;\nmaterial.emission = halfColor.rgb;\nmaterial.alpha = halfColor.a;\nreturn material;\n}\n",V$R="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 textureValue = texture2D(image, fract(repeat * materialInput.st));\nvec3 normalTangentSpace = textureValue.channels;\nnormalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;\nnormalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);\nnormalTangentSpace = normalize(normalTangentSpace);\nvec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\nmaterial.normal = normalEC;\nreturn material;\n}\n",ee$x="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\nfloat slope = (p0.y - p1.y) / (p0.x - p1.x);\nreturn slope * (x - p0.x) + p0.y;\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\n#ifdef GL_OES_standard_derivatives\nfloat base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;\n#else\nfloat base = 0.975;\n#endif\nvec2 center = vec2(1.0, 0.5);\nfloat ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\nfloat ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\nfloat halfWidth = 0.15;\nfloat s = step(0.5 - halfWidth, st.t);\ns *= 1.0 - step(0.5 + halfWidth, st.t);\ns *= 1.0 - step(base, st.s);\nfloat t = step(base, materialInput.st.s);\nt *= 1.0 - step(ptOnUpperLine, st.t);\nt *= step(ptOnLowerLine, st.t);\nfloat dist;\nif (st.s < base)\n{\nfloat d1 = abs(st.t - (0.5 - halfWidth));\nfloat d2 = abs(st.t - (0.5 + halfWidth));\ndist = min(d1, d2);\n}\nelse\n{\nfloat d1 = czm_infinity;\nif (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n{\nd1 = abs(st.s - base);\n}\nfloat d2 = abs(st.t - ptOnUpperLine);\nfloat d3 = abs(st.t - ptOnLowerLine);\ndist = min(min(d1, d2), d3);\n}\nvec4 outsideColor = vec4(0.0);\nvec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));\nvec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);\noutColor = czm_gammaCorrect(outColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",te$A="uniform vec4 color;\nuniform vec4 gapColor;\nuniform float dashLength;\nuniform float dashPattern;\nvarying float v_polylineAngle;\nconst float maskLength = 16.0;\nmat2 rotate(float rad) {\nfloat c = cos(rad);\nfloat s = sin(rad);\nreturn mat2(\nc, s,\n-s, c\n);\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\nfloat dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));\nfloat maskIndex = floor(dashPosition * maskLength);\nfloat maskTest = floor(dashPattern / pow(2.0, maskIndex));\nvec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\nif (fragColor.a < 0.005) {\ndiscard;\n}\nfragColor = czm_gammaCorrect(fragColor);\nmaterial.emission = fragColor.rgb;\nmaterial.alpha = fragColor.a;\nreturn material;\n}\n",re$F="uniform vec4 color;\nuniform float glowPower;\nuniform float taperPower;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\nif (taperPower <= 0.99999) {\nglow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));\n}\nglow = clamp(0.0, 2.0, glow);\nvec4 fragColor;\nfragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);\nfragColor.a = clamp(0.0, 1.0, glow) * color.a;\nfragColor = czm_gammaCorrect(fragColor);\nmaterial.emission = fragColor.rgb;\nmaterial.alpha = fragColor.a;\nreturn material;\n}\n",R$U="uniform vec4 color;\nuniform vec4 outlineColor;\nuniform float outlineWidth;\nvarying float v_width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;\nfloat b = step(0.5 - halfInteriorWidth, st.t);\nb *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\nfloat d1 = abs(st.t - (0.5 - halfInteriorWidth));\nfloat d2 = abs(st.t - (0.5 + halfInteriorWidth));\nfloat dist = min(d1, d2);\nvec4 currentColor = mix(outlineColor, color, b);\nvec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);\noutColor = czm_gammaCorrect(outColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",ae$x="uniform vec4 color;\nuniform vec4 rimColor;\nuniform float width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));\nfloat s = smoothstep(1.0 - width, 1.0, d);\nvec4 outColor = czm_gammaCorrect(color);\nvec4 outRimColor = czm_gammaCorrect(rimColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.emission = outRimColor.rgb * s;\nmaterial.alpha = mix(outColor.a, outRimColor.a, s);\nreturn material;\n}\n",ie$E="uniform sampler2D image;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 rampColor = texture2D(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",ne$I="uniform vec4 evenColor;\nuniform vec4 oddColor;\nuniform float offset;\nuniform float repeat;\nuniform bool horizontal;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));\nfloat value = fract((coord - offset) * (repeat * 0.5));\nfloat dist = min(value, min(abs(value - 0.5), 1.0 - value));\nvec4 currentColor = mix(evenColor, oddColor, step(0.5, value));\nvec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",le$y="uniform sampler2D specularMap;\nuniform sampler2D normalMap;\nuniform vec4 baseWaterColor;\nuniform vec4 blendColor;\nuniform float frequency;\nuniform float animationSpeed;\nuniform float amplitude;\nuniform float specularIntensity;\nuniform float fadeFactor;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat time = czm_frameNumber * animationSpeed;\nfloat fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);\nfloat specularMapValue = texture2D(specularMap, materialInput.st).r;\nvec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);\nvec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));\nnormalTangentSpace.xy /= fade;\nnormalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);\nnormalTangentSpace = normalize(normalTangentSpace);\nfloat tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);\nmaterial.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;\nmaterial.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);\nmaterial.diffuse += (0.1 * tsPerturbationRatio);\nmaterial.diffuse = material.diffuse;\nmaterial.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);\nmaterial.specular = specularIntensity;\nmaterial.shininess = 10.0;\nreturn material;\n}\n",fe$s="uniform vec4 color;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = 1.0;\nreturn material;\n}\n",ue$D=0;function r$X(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._minificationFilter=u$_(e.minificationFilter,tt$h.LINEAR),this._magnificationFilter=u$_(e.magnificationFilter,rt$i.LINEAR),this._strict=void 0,this._template=void 0,this._count=void 0,this._texturePaths={},this._loadedImages=[],this._loadedCubeMaps=[],this._textures={},this._updateFunctions=[],this._defaultTexture=void 0,this._wrapS=q$19.CLAMP_TO_EDGE,this._wrapT=q$19.CLAMP_TO_EDGE,pe$w(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1}}),e$2b(r$X._uniformList[this.type])||(r$X._uniformList[this.type]=Object.keys(this._uniforms)),this._id=ue$D++}function pe$w(e,t){e=u$_(e,u$_.EMPTY_OBJECT),t._strict=u$_(e.strict,!1),t._count=u$_(e.count,0),t._template=l$1g(u$_(e.fabric,u$_.EMPTY_OBJECT)),t._template.uniforms=l$1g(u$_(t._template.uniforms,u$_.EMPTY_OBJECT)),t._template.materials=l$1g(u$_(t._template.materials,u$_.EMPTY_OBJECT)),t.type=e$2b(t._template.type)?t._template.type:e$1Q(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[];var i,n=r$X._materialCache.getMaterial(t.type);if(e$2b(n)){var r=l$1g(n.fabric,!0);t._template=p$19(t._template,r,!0),i=n.translucent}de$v(t),e$2b(n)||r$X._materialCache.addMaterial(t.type,t),_e$u(t),we$l(t),xe$q(t);var o=0===t._translucentFunctions.length||void 0;if(i=u$_(i,o),e$2b(i=u$_(e.translucent,i)))if("function"==typeof i){t._translucentFunctions.push((function(){return i(t)}))}else t._translucentFunctions.push(i)}function E$12(e,t,i,n){if(e$2b(e))for(var r in e)if(e.hasOwnProperty(r)){var o=-1!==t.indexOf(r);(n&&!o||!n&&o)&&i(r,t)}}function L$12(e,t){for(var i="fabric: property name '"+e+"' is not valid. It should be ",n=0;n<t.length;n++){var r="'"+t[n]+"'";i+=n===t.length-1?"or "+r+".":r+", "}throw new t$16(i)}function ce$u(e,t){throw new t$16("fabric: uniforms and materials cannot share the same property '"+e+"'")}r$X._uniformList={},r$X.fromType=function(e,t){if(!e$2b(r$X._materialCache.getMaterial(e)))throw new t$16("material with type '"+e+"' does not exist.");var i=new r$X({fabric:{type:e}});if(e$2b(t))for(var n in t)t.hasOwnProperty(n)&&(i.uniforms[n]=t[n]);return i},r$X.prototype.isTranslucent=function(){if(e$2b(this.translucent))return"function"==typeof this.translucent?this.translucent():this.translucent;for(var e=!0,t=this._translucentFunctions,i=t.length,n=0;n<i;++n){var r=t[n];if(!(e="function"==typeof r?e&&r():e&&r))break}return e},r$X.prototype.update=function(e){var t,i,n=this._loadedImages,r=n.length;for(t=0;t<r;++t){var o=n[t];i=o.id;var a,s=o.image,l=new e$1P({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter,wrapS:this._wrapS,wrapT:this._wrapT});a=e$2b(s.internalFormat)?new t$V({context:e,pixelFormat:s.internalFormat,width:s.width,height:s.height,source:{arrayBufferView:s.bufferView},sampler:l}):new t$V({context:e,source:s,sampler:l}),this._textures[i]=a;var u=i+"Dimensions";if(this.uniforms.hasOwnProperty(u)){var c=this.uniforms[u];c.x=a._width,c.y=a._height}}n.length=0;var h=this._loadedCubeMaps;for(r=h.length,t=0;t<r;++t){var d=h[t];i=d.id;var f=d.images,p=new e$1M({context:e,source:{positiveX:f[0],negativeX:f[1],positiveY:f[2],negativeY:f[3],positiveZ:f[4],negativeZ:f[5]},sampler:new e$1P({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter})});this._textures[i]=p}h.length=0;var _=this._updateFunctions;for(r=_.length,t=0;t<r;++t)_[t](this,e);var m=this.materials;for(var g in m)m.hasOwnProperty(g)&&m[g].update(e)},r$X.prototype.isDestroyed=function(){return!1},r$X.prototype.destroy=function(){var e=this._textures;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];i!==this._defaultTexture&&i.destroy()}var n=this.materials;for(var r in n)n.hasOwnProperty(r)&&n[r].destroy();return i$10(this)};var me$v=["type","materials","uniforms","components","source"],he$t=["diffuse","specular","shininess","normal","emission","alpha"];function de$v(e){var t=e._template,i=t.uniforms,n=t.materials,r=t.components;if(e$2b(r)&&e$2b(t.source))throw new t$16("fabric: cannot have source and components in the same template.");E$12(t,me$v,L$12,!0),E$12(r,he$t,L$12,!0);var o=[];for(var a in n)n.hasOwnProperty(a)&&o.push(a);E$12(i,o,ce$u,!1)}function ye$n(e,t){var i=t._template.materials;for(var n in i)if(i.hasOwnProperty(n)&&e.indexOf(n)>-1)return!0;return!1}function _e$u(e){var t=e._template.components,i=e._template.source;if(e$2b(i))e.shaderSource+=i+"\n";else{if(e.shaderSource+="czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n",e.shaderSource+="czm_material material = czm_getDefaultMaterial(materialInput);\n",e$2b(t)){var n=Object.keys(e._template.materials).length>0;for(var r in t)if(t.hasOwnProperty(r))if("diffuse"===r||"emission"===r){var o=n&&ye$n(t[r],e)?t[r]:"czm_gammaCorrect("+t[r]+")";e.shaderSource+="material."+r+" = "+o+"; \n"}else e.shaderSource+="alpha"===r?"material.alpha = "+t.alpha+"; \n":"material."+r+" = "+t[r]+";\n"}e.shaderSource+="return material;\n}\n"}}var k$U={mat2:f$13,mat3:p$1e,mat4:p$1d},ve$q=/\.ktx$/i,Te$q=/\.crn$/i;function ge$r(e){var t;return function(i,n){var r=i.uniforms,o=r[e],a=t!==o;t=o;var s,l,u=i._textures[e];if(o instanceof HTMLVideoElement)if(o.readyState>=2){if(a&&e$2b(u)&&(u!==n.defaultTexture&&u.destroy(),u=void 0),!e$2b(u)||u===n.defaultTexture)return u=new t$V({context:n,source:o,sampler:new e$1P({minificationFilter:i._minificationFilter,magnificationFilter:i._magnificationFilter})}),void(i._textures[e]=u);u.copyFrom(o)}else e$2b(u)||(i._textures[e]=n.defaultTexture);else{if(o instanceof t$V&&o!==u){i._texturePaths[e]=void 0;var c=i._textures[e];return c!==i._defaultTexture&&c.destroy(),i._textures[e]=o,s=e+"Dimensions",void(r.hasOwnProperty(s)&&(l=r[s],l.x=o._width,l.y=o._height))}if(e$2b(u)||(i._texturePaths[e]=void 0,e$2b(i._defaultTexture)||(i._defaultTexture=n.defaultTexture),u=i._textures[e]=i._defaultTexture,s=e+"Dimensions",r.hasOwnProperty(s)&&((l=r[s]).x=u._width,l.y=u._height)),o!==r$X.DefaultImageId){var h=o instanceof t$11;if(!e$2b(i._texturePaths[e])||h&&o.url!==i._texturePaths[e].url||!h&&o!==i._texturePaths[e]){if("string"==typeof o||h){var d=h?o:t$11.createIfNeeded(o);o$1l(ve$q.test(d.url)?k$V(d):Te$q.test(d.url)?a$P(d):d.fetchImage(),(function(t){i._loadedImages.push({id:e,image:t})}))}else(o instanceof HTMLCanvasElement||o instanceof HTMLImageElement)&&i._loadedImages.push({id:e,image:o});i._texturePaths[e]=o}}}}}function Me$m(e){return function(t,i){var n=t.uniforms[e];if(n instanceof e$1M){var r=t._textures[e];return r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,void(t._textures[e]=n)}if(e$2b(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=i.defaultCubeMap),n!==r$X.DefaultCubeMapId){var o=n.positiveX+n.negativeX+n.positiveY+n.negativeY+n.positiveZ+n.negativeZ;if(o!==t._texturePaths[e]){var a=[t$11.createIfNeeded(n.positiveX).fetchImage(),t$11.createIfNeeded(n.negativeX).fetchImage(),t$11.createIfNeeded(n.positiveY).fetchImage(),t$11.createIfNeeded(n.negativeY).fetchImage(),t$11.createIfNeeded(n.positiveZ).fetchImage(),t$11.createIfNeeded(n.negativeZ).fetchImage()];o$1l.all(a).then((function(i){t._loadedCubeMaps.push({id:e,images:i})})),t._texturePaths[e]=o}}}}function we$l(e){var t=e._template.uniforms;for(var i in t)t.hasOwnProperty(i)&&N$T(e,i)}function N$T(e,t){var i=e._strict,n=e._template.uniforms,r=n[t],o=Ce$k(r);if(!e$2b(o))throw new t$16("fabric: uniform '"+t+"' has invalid type.");if("channels"===o){if(0===C$_(e,t,r,!1)&&i)throw new t$16("strict: shader source does not use channels '"+t+"'.")}else{if("sampler2D"===o){var a=t+"Dimensions";be$s(e,a)>0&&(n[a]={type:"ivec3",x:1,y:1},N$T(e,a))}if(!new RegExp("uniform\\s+"+o+"\\s+"+t+"\\s*;").test(e.shaderSource)){var s="uniform "+o+" "+t+";";e.shaderSource=s+e.shaderSource}var l=t+"_"+e._count++;if(1===C$_(e,t,l)&&i)throw new t$16("strict: shader source does not use uniform '"+t+"'.");if(e.uniforms[t]=r,"sampler2D"===o)e._uniforms[l]=function(){var i=e._textures[t];return i&&i._texture?i:e._defaultTexture},e._updateFunctions.push(ge$r(t));else if("samplerCube"===o)e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(Me$m(t));else if(-1!==o.indexOf("mat")){var u=new k$U[o];e._uniforms[l]=function(){return k$U[o].fromColumnMajorArray(e.uniforms[t],u)}}else e._uniforms[l]=function(){return e.uniforms[t]}}}function Ce$k(e){var t=e.type;if(!e$2b(t)){var i=typeof e;if("number"===i)t="float";else if("boolean"===i)t="bool";else if("string"===i||e instanceof t$V||e instanceof t$11||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)t=/^([rgba]){1,4}$/i.test(e)?"channels":e===r$X.DefaultCubeMapId?"samplerCube":"sampler2D";else if("object"===i)if(Array.isArray(e))(4===e.length||9===e.length||16===e.length)&&(t="mat"+Math.sqrt(e.length));else{var n=0;for(var r in e)e.hasOwnProperty(r)&&(n+=1);n>=2&&n<=4?t="vec"+n:6===n&&(t="samplerCube")}}return t}function xe$q(e){var t=e._strict,i=e._template.materials;for(var n in i)if(i.hasOwnProperty(n)){var r=new r$X({strict:t,fabric:i[n],count:e._count});e._count=r._count,e._uniforms=p$19(e._uniforms,r._uniforms,!0),e.materials[n]=r,e._translucentFunctions=e._translucentFunctions.concat(r._translucentFunctions);var o="czm_getMaterial",a=o+"_"+e._count++;if(C$_(r,o,a),e.shaderSource=r.shaderSource+e.shaderSource,0===C$_(e,n,a+"(materialInput)")&&t)throw new t$16("strict: shader source does not use material '"+n+"'.")}}function C$_(e,t,i,n){n=u$_(n,!0);var r=0,o=new RegExp("([\\w"+(n?".":"")+"])?"+t+"([\\w])?","g");return e.shaderSource=e.shaderSource.replace(o,(function(e,t,n){return t||n?e:(r+=1,i)})),r}function be$s(e,t,i){return C$_(e,t,t,i)}r$X._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}},r$X.DefaultImageId="czm_defaultImage",r$X.DefaultCubeMapId="czm_defaultCubeMap",r$X.ColorType="Color",r$X._materialCache.addMaterial(r$X.ColorType,{fabric:{type:r$X.ColorType,uniforms:{color:new e$1U(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),r$X.ImageType="Image",r$X._materialCache.addMaterial(r$X.ImageType,{fabric:{type:r$X.ImageType,uniforms:{image:r$X.DefaultImageId,repeat:new o$1o(1,1),color:new e$1U(1,1,1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture2D(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),r$X.DiffuseMapType="DiffuseMap",r$X._materialCache.addMaterial(r$X.DiffuseMapType,{fabric:{type:r$X.DiffuseMapType,uniforms:{image:r$X.DefaultImageId,channels:"rgb",repeat:new o$1o(1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),r$X.AlphaMapType="AlphaMap",r$X._materialCache.addMaterial(r$X.AlphaMapType,{fabric:{type:r$X.AlphaMapType,uniforms:{image:r$X.DefaultImageId,channel:"a",repeat:new o$1o(1,1)},components:{alpha:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!0}),r$X.SpecularMapType="SpecularMap",r$X._materialCache.addMaterial(r$X.SpecularMapType,{fabric:{type:r$X.SpecularMapType,uniforms:{image:r$X.DefaultImageId,channel:"r",repeat:new o$1o(1,1)},components:{specular:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!1}),r$X.EmissionMapType="EmissionMap",r$X._materialCache.addMaterial(r$X.EmissionMapType,{fabric:{type:r$X.EmissionMapType,uniforms:{image:r$X.DefaultImageId,channels:"rgb",repeat:new o$1o(1,1)},components:{emission:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),r$X.BumpMapType="BumpMap",r$X._materialCache.addMaterial(r$X.BumpMapType,{fabric:{type:r$X.BumpMapType,uniforms:{image:r$X.DefaultImageId,channel:"r",strength:.8,repeat:new o$1o(1,1)},source:j$$},translucent:!1}),r$X.NormalMapType="NormalMap",r$X._materialCache.addMaterial(r$X.NormalMapType,{fabric:{type:r$X.NormalMapType,uniforms:{image:r$X.DefaultImageId,channels:"rgb",strength:.8,repeat:new o$1o(1,1)},source:V$R},translucent:!1}),r$X.GridType="Grid",r$X._materialCache.addMaterial(r$X.GridType,{fabric:{type:r$X.GridType,uniforms:{color:new e$1U(0,1,0,1),cellAlpha:.1,lineCount:new o$1o(8,8),lineThickness:new o$1o(1,1),lineOffset:new o$1o(0,0)},source:Q$W},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}}),r$X.StripeType="Stripe",r$X._materialCache.addMaterial(r$X.StripeType,{fabric:{type:r$X.StripeType,uniforms:{horizontal:!0,evenColor:new e$1U(1,1,1,.5),oddColor:new e$1U(0,0,1,.5),offset:0,repeat:5},source:ne$I},translucent:function(e){var t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}}),r$X.CheckerboardType="Checkerboard",r$X._materialCache.addMaterial(r$X.CheckerboardType,{fabric:{type:r$X.CheckerboardType,uniforms:{lightColor:new e$1U(1,1,1,.5),darkColor:new e$1U(0,0,0,.5),repeat:new o$1o(5,5)},source:J$S},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),r$X.DotType="Dot",r$X._materialCache.addMaterial(r$X.DotType,{fabric:{type:r$X.DotType,uniforms:{lightColor:new e$1U(1,1,0,.75),darkColor:new e$1U(0,1,1,.75),repeat:new o$1o(5,5)},source:$$Y},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),r$X.WaterType="Water",r$X._materialCache.addMaterial(r$X.WaterType,{fabric:{type:r$X.WaterType,uniforms:{baseWaterColor:new e$1U(.2,.3,.6,1),blendColor:new e$1U(0,1,.699,1),specularMap:r$X.DefaultImageId,normalMap:r$X.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:le$y},translucent:function(e){var t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}}),r$X.RimLightingType="RimLighting",r$X._materialCache.addMaterial(r$X.RimLightingType,{fabric:{type:r$X.RimLightingType,uniforms:{color:new e$1U(1,0,0,.7),rimColor:new e$1U(1,1,1,.4),width:.3},source:ae$x},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}}),r$X.FadeType="Fade",r$X._materialCache.addMaterial(r$X.FadeType,{fabric:{type:r$X.FadeType,uniforms:{fadeInColor:new e$1U(1,0,0,1),fadeOutColor:new e$1U(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new o$1o(.5,.5)},source:K$P},translucent:function(e){var t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}}),r$X.PolylineArrowType="PolylineArrow",r$X._materialCache.addMaterial(r$X.PolylineArrowType,{fabric:{type:r$X.PolylineArrowType,uniforms:{color:new e$1U(1,1,1,1)},source:ee$x},translucent:!0}),r$X.PolylineDashType="PolylineDash",r$X._materialCache.addMaterial(r$X.PolylineDashType,{fabric:{type:r$X.PolylineDashType,uniforms:{color:new e$1U(1,0,1,1),gapColor:new e$1U(0,0,0,0),dashLength:16,dashPattern:255},source:te$A},translucent:!0}),r$X.PolylineGlowType="PolylineGlow",r$X._materialCache.addMaterial(r$X.PolylineGlowType,{fabric:{type:r$X.PolylineGlowType,uniforms:{color:new e$1U(0,.5,1,1),glowPower:.25,taperPower:1},source:re$F},translucent:!0}),r$X.PolylineOutlineType="PolylineOutline",r$X._materialCache.addMaterial(r$X.PolylineOutlineType,{fabric:{type:r$X.PolylineOutlineType,uniforms:{color:new e$1U(1,1,1,1),outlineColor:new e$1U(1,0,0,1),outlineWidth:1},source:R$U},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}}),r$X.ElevationContourType="ElevationContour",r$X._materialCache.addMaterial(r$X.ElevationContourType,{fabric:{type:r$X.ElevationContourType,uniforms:{spacing:100,color:new e$1U(1,0,0,1),width:1},source:q$10},translucent:!1}),r$X.ElevationRampType="ElevationRamp",r$X._materialCache.addMaterial(r$X.ElevationRampType,{fabric:{type:r$X.ElevationRampType,uniforms:{image:r$X.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:U$$},translucent:!1}),r$X.SlopeRampMaterialType="SlopeRamp",r$X._materialCache.addMaterial(r$X.SlopeRampMaterialType,{fabric:{type:r$X.SlopeRampMaterialType,uniforms:{image:r$X.DefaultImageId},source:ie$E},translucent:!1}),r$X.AspectRampMaterialType="AspectRamp",r$X._materialCache.addMaterial(r$X.AspectRampMaterialType,{fabric:{type:r$X.AspectRampMaterialType,uniforms:{image:r$X.DefaultImageId},source:Z$W},translucent:!1}),r$X.EmissionColorType="EmissionColor",r$X._materialCache.addMaterial(r$X.EmissionColorType,{fabric:{type:r$X.EmissionColorType,uniforms:{color:new e$1U(1,1,1,1)},source:fe$s},translucent:function(e){return e.uniforms.color.alpha<1}}),r$X.PolylineDynamicType="PolylineDynamic",r$X._materialCache.addMaterial(r$X.PolylineDynamicType,{fabric:{type:r$X.PolylineDynamicType,uniforms:{color:new e$1U(1,1,1,1),outlineColor:new e$1U(1,0,0,1),outlineWidth:0,v_time:1,bAsy:1},source:R$U},translucent:function(e){return!0}}),r$X.PolylineTrailType="PolylineTrail",r$X._materialCache.addMaterial(r$X.PolylineTrailType,{fabric:{type:r$X.PolylineTrailType,uniforms:{color:new e$1U(1,0,0,.5),trailTime:0,spotSize:1,trailLength:.03,spotIntensity:5,constantSpeed:0,period:1e3,startTime:0},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return!0}});var m$V={numberOfPoints:function(e,t,i){var n=o$1p.distance(e,t);return Math.ceil(n/i)},numberOfPointsRhumbLine:function(e,t,i){var n=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.ceil(Math.sqrt(n/(i*i)))}},F$Z=new a$18;m$V.extractHeights=function(e,t){for(var i=e.length,n=new Array(i),r=0;r<i;r++){var o=e[r];n[r]=t.cartesianToCartographic(o,F$Z).height}return n};var j$_=new p$1d,J$R=new o$1p,M$$=new o$1p,K$O=new o$1m(o$1p.UNIT_X,0),X$W=new o$1p,Q$V=new o$1m(o$1p.UNIT_X,0),$$X=new o$1p,rr$8=new o$1p,G$14=[];function Z$V(e,t,i){var n,r=G$14;if(r.length=e,t===i){for(n=0;n<e;n++)r[n]=t;return r}var o=(i-t)/e;for(n=0;n<e;n++){var a=t+n*o;r[n]=a}return r}function ar$6(e,t){var i=G$14;i.length=e;for(var n=0;n<e;n++)i[n]+=t*Math.sin(Math.PI*n/e);return i}var I$19=new a$18,N$S=new a$18,T$Y=new o$1p,B$T=new o$1p,V$Q=new o$1p,H$Z=new E$1s,E$11=new P$16;function er$8(e,t,i,n,r,o,a,s,l){var u=n.scaleToGeodeticSurface(e,B$T),c=n.scaleToGeodeticSurface(t,V$Q),h=m$V.numberOfPoints(e,t,i),d=n.cartesianToCartographic(u,I$19),f=n.cartesianToCartographic(c,N$S),p=Z$V(h,r,o);l>0&&(p=ar$6(h,l)),H$Z.setEndPoints(d,f);var _=H$Z.surfaceDistance/h,m=s;d.height=r;var g=n.cartographicToCartesian(d,T$Y);o$1p.pack(g,a,m),m+=3;for(var x=1;x<h;x++){var v=H$Z.interpolateUsingSurfaceDistance(x*_,N$S);v.height=p[x],g=n.cartographicToCartesian(v,T$Y),o$1p.pack(g,a,m),m+=3}return m}function tr$6(e,t,i,n,r,o,a,s){var l=n.scaleToGeodeticSurface(e,B$T),u=n.scaleToGeodeticSurface(t,V$Q),c=n.cartesianToCartographic(l,I$19),h=n.cartesianToCartographic(u,N$S),d=m$V.numberOfPointsRhumbLine(c,h,i),f=Z$V(d,r,o);E$11.ellipsoid.equals(n)||(E$11=new P$16(void 0,void 0,n)),E$11.setEndPoints(c,h);var p=E$11.surfaceDistance/d,_=s;c.height=r;var m=n.cartographicToCartesian(c,T$Y);o$1p.pack(m,a,_),_+=3;for(var g=1;g<d;g++){var x=E$11.interpolateUsingSurfaceDistance(g*p,N$S);x.height=f[g],m=n.cartographicToCartesian(x,T$Y),o$1p.pack(m,a,_),_+=3}return _}m$V.wrapLongitude=function(e,t){var i=[],n=[];if(e$2b(e)&&e.length>0){t=u$_(t,p$1d.IDENTITY);var r=p$1d.inverseTransformation(t,j$_),o=p$1d.multiplyByPoint(r,o$1p.ZERO,J$R),a=o$1p.normalize(p$1d.multiplyByPointAsVector(r,o$1p.UNIT_Y,M$$),M$$),s=o$1m.fromPointNormal(o,a,K$O),l=o$1p.normalize(p$1d.multiplyByPointAsVector(r,o$1p.UNIT_X,X$W),X$W),u=o$1m.fromPointNormal(o,l,Q$V),c=1;i.push(o$1p.clone(e[0]));for(var h=i[0],d=e.length,f=1;f<d;++f){var p=e[f];if(o$1m.getPointDistance(u,h)<0||o$1m.getPointDistance(u,p)<0){var _=g$1h.lineSegmentPlane(h,p,s,$$X);if(e$2b(_)){var m=o$1p.multiplyByScalar(a,5e-9,rr$8);o$1m.getPointDistance(s,h)<0&&o$1p.negate(m,m),i.push(o$1p.add(_,m,new o$1p)),n.push(c+1),o$1p.negate(m,m),i.push(o$1p.add(_,m,new o$1p)),c=1}}i.push(o$1p.clone(e[f])),c++,h=p}n.push(c)}return{positions:i,lengths:n}},m$V.generateArc=function(e){e$2b(e)||(e={});var t=e.positions;if(!e$2b(t))throw new t$16("options.positions is required.");var i=t.length,n=u$_(e.ellipsoid,t$13.WGS84),r=u$_(e.height,0),o=Array.isArray(r);if(i<1)return[];if(1===i){var a=n.scaleToGeodeticSurface(t[0],B$T);if(0!==(r=o?r[0]:r)){var s=n.geodeticSurfaceNormal(a,T$Y);o$1p.multiplyByScalar(s,r,s),o$1p.add(a,s,a)}return[a.x,a.y,a.z]}var l=e.minDistance;if(!e$2b(l)){var u=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE);l=e$2a.chordLength(u,n.maximumRadius)}var c,h=0;for(c=0;c<i-1;c++)h+=m$V.numberOfPoints(t[c],t[c+1],l);var d=e.hMax,f=3*(h+1),p=new Array(f),_=0;for(c=0;c<i-1;c++){_=er$8(t[c],t[c+1],l,n,o?r[c]:r,o?r[c+1]:r,p,_,d)}G$14.length=0;var m=t[i-1],g=n.cartesianToCartographic(m,I$19);g.height=o?r[i-1]:r;var x=n.cartographicToCartesian(g,T$Y);return o$1p.pack(x,p,f-3),p};var Y$N=new a$18,nr$8=new a$18;function o$14(e,t){e=u$_(e,u$_.EMPTY_OBJECT),this._show=u$_(e.show,!0),this._width=u$_(e.width,1),this._loop=u$_(e.loop,!1),this._distanceDisplayCondition=e.distanceDisplayCondition,this._material=e.material,e$2b(this._material)||(this._material=r$X.fromType(r$X.ColorType,{color:new e$1U(1,1,1,1)}));var i,n=e.positions;e$2b(n)||(n=[]),this._positions=n,this._actualPositions=D$11(n,o$1p.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(o$1p.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id,e$2b(t)&&(i=p$1d.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=m$V.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(P$W),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=i$1c.fromPoints(this._actualPositions),this._boundingVolumeWC=i$1c.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new i$1c}m$V.generateRhumbArc=function(e){e$2b(e)||(e={});var t=e.positions;if(!e$2b(t))throw new t$16("options.positions is required.");var i=t.length,n=u$_(e.ellipsoid,t$13.WGS84),r=u$_(e.height,0),o=Array.isArray(r);if(i<1)return[];if(1===i){var a=n.scaleToGeodeticSurface(t[0],B$T);if(0!==(r=o?r[0]:r)){var s=n.geodeticSurfaceNormal(a,T$Y);o$1p.multiplyByScalar(s,r,s),o$1p.add(a,s,a)}return[a.x,a.y,a.z]}var l,u,c=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),h=0,d=n.cartesianToCartographic(t[0],Y$N);for(l=0;l<i-1;l++)u=n.cartesianToCartographic(t[l+1],nr$8),h+=m$V.numberOfPointsRhumbLine(d,u,c),d=a$18.clone(u,Y$N);var f=3*(h+1),p=new Array(f),_=0;for(l=0;l<i-1;l++){_=tr$6(t[l],t[l+1],c,n,o?r[l]:r,o?r[l+1]:r,p,_)}G$14.length=0;var m=t[i-1],g=n.cartesianToCartographic(m,I$19);g.height=o?r[i-1]:r;var x=n.cartographicToCartesian(g,T$Y);return o$1p.pack(x,p,f-3),p},m$V.generateCartesianArc=function(e){for(var t=m$V.generateArc(e),i=t.length/3,n=new Array(i),r=0;r<i;r++)n[r]=o$1p.unpack(t,3*r);return n},m$V.generateCartesianRhumbArc=function(e){for(var t=m$V.generateRhumbArc(e),i=t.length/3,n=new Array(i),r=0;r<i;r++)n[r]=o$1p.unpack(t,3*r);return n};var I$18=o$14.POSITION_INDEX=0,D$W=o$14.SHOW_INDEX=1,w$R=o$14.WIDTH_INDEX=2,E$10=o$14.MATERIAL_INDEX=3,d$1a=o$14.POSITION_SIZE_INDEX=4,N$R=o$14.DISTANCE_DISPLAY_CONDITION=5,P$W=o$14.NUMBER_OF_PROPERTIES=6;function n$W(e,t){++e._propertiesChanged[t];var i=e._polylineCollection;e$2b(i)&&(i._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(o$14.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2b(e))throw new t$16("value is required.");e!==this._show&&(this._show=e,n$W(this,D$W))}},positions:{get:function(){return this._positions},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=D$11(e,o$1p.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(o$1p.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&n$W(this,d$1a),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=i$1c.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=i$1c.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),n$W(this,I$18),this.update()}},material:{get:function(){return this._material},set:function(e){if(!e$2b(e))throw new t$16("material is required.");this._material!==e&&(this._material=e,n$W(this,E$10))}},width:{get:function(){return this._width},set:function(e){if(!e$2b(e))throw new t$16("value is required.");e!==this._width&&(this._width=e,n$W(this,w$R))}},loop:{get:function(){return this._loop},set:function(e){if(!e$2b(e))throw new t$16("value is required.");if(e!==this._loop){var t=this._actualPositions;e?t.length>2&&!o$1p.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(o$1p.clone(t[0]))):t.length>2&&o$1p.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,n$W(this,d$1a)}}},id:{get:function(){return this._id},set:function(e){this._id=e,e$2b(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");r$Y.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=r$Y.clone(e,this._distanceDisplayCondition),n$W(this,N$R))}}}),o$14.prototype.update=function(){var e=p$1d.IDENTITY;e$2b(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);var t=this._segments.positions.length,i=this._segments.lengths,n=this._propertiesChanged[I$18]>0||this._propertiesChanged[d$1a]>0;if((!p$1d.equals(e,this._modelMatrix)||n)&&(this._segments=m$V.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=i$1c.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=p$1d.clone(e,this._modelMatrix),this._segments.positions.length!==t)n$W(this,d$1a);else for(var r=i.length,o=0;o<r;++o)if(i[o]!==this._segments.lengths[o]){n$W(this,d$1a);break}},o$14.prototype.getPickId=function(e){if(!e$2b(this._pickId))if(this._polylineCollection._polygonEntityId){var t=e.getAllPickObjects();for(let i in t)t[i].id&&t[i].id.id&&t[i].id.id===this._polylineCollection._polygonEntityId&&(this._pickId=e.getPickIdByKey(i))}else this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id});return this._pickId},o$14.prototype._clean=function(){this._dirty=!1;for(var e=this._propertiesChanged,t=0;t<P$W-1;++t)e[t]=0},o$14.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var e$1G={OCCLUDED:0,OCCLUDED_TRANSLUCENT:1,NON_OCCLUDED:2},X$V=Object.freeze(e$1G),ir$6=o$14.SHOW_INDEX,nr$7=o$14.WIDTH_INDEX,Te$p=o$14.POSITION_INDEX,fr$3=o$14.MATERIAL_INDEX,Pe$l=o$14.POSITION_SIZE_INDEX,lr$7=o$14.DISTANCE_DISPLAY_CONDITION,De$p=o$14.NUMBER_OF_PROPERTIES,ae$w={texCoordExpandAndBatchIndex:0,positionHigh:1,positionLow:2,prevPositionHigh:3,prevPositionLow:4,nextPositionHigh:5,nextPositionLow:6};function k$T(e){e=u$_(e,u$_.EMPTY_OBJECT),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this._opaqueRS=e.opaqueRS,this._translucentRS=e.translucentRS,this._colorCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(De$p),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:A$19.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=e$1U.clone(e$1U.WHITE);var t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}},this._lineDisplayType=e.lineDisplayType,this._canAlwaysPick=!1,this._polygonEntityId=u$_(e.polygonEntityId,void 0)}function or$6(e,t){e$2b(e._batchTable)&&e._batchTable.destroy();var i=[{functionName:"batchTable_getWidthAndShow",componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:S$12.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:S$12.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:S$12.FLOAT,componentsPerAttribute:2}];e._batchTable=new h$W(t,i,e._polylines.length)}Object.defineProperties(k$T.prototype,{length:{get:function(){return ye$m(this),this._polylines.length}},lineDisplayType:{get:function(){return this._lineDisplayType},set:function(e){if(o$1q.typeOf.number.greaterThanOrEquals("PolylineCollection.lineDisplayType",e,0),o$1q.typeOf.number.lessThanOrEquals("PolylineCollection.lineDisplayType",e,2),this._lineDisplayType!==e){this._lineDisplayType=e;for(var t,i=this._polylines.length,n=0;n<i;n++){t=void 0;var r=this._polylines[n];if(e$2b(r)){for(var o=n+1;o<i;o++){var a=this._polylines[o];if(e$2b(a)&&a.id&&a.id===r._index+"-alpha"){t=a;break}}if(e$2b(t)||this._lineDisplayType!==X$V.OCCLUDED_TRANSLUCENT)e$2b(t)&&this._lineDisplayType!==X$V.OCCLUDED_TRANSLUCENT&&this.remove(t);else{var s={show:r.show,positions:r.positions,width:r.width,loop:r.loop,distanceDisplayCondition:r._distanceDisplayCondition},l=r$X.fromType(r$X.ColorType,{color:e$1U.clone(r.material.uniforms.color,new e$1U).withAlpha(.2)});l.uniforms.color.alpha=.2,s.material=l;var u=new o$14(s,this);u.material=l,u._index=this._polylines.length,u.id=r._index+"-alpha",this._polylines.push(u),this._createVertexArray=!0,this._createBatchTable=!0}}}this._lineDisplayType===X$V.OCCLUDED_TRANSLUCENT?(this._opaqueRS=d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}),this._translucentRS=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}})):this._lineDisplayType===X$V.NON_OCCLUDED?this._opaqueRS=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}}):this._lineDisplayType===X$V.OCCLUDED&&(this._opaqueRS=d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}))}}}}),k$T.prototype.add=function(e){var t=new o$14(e,this);if(t._index=this._polylines.length,this._polylines.push(t),this._lineDisplayType===X$V.OCCLUDED_TRANSLUCENT){this._opaqueRS=d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}),this._translucentRS=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}});var i=r$X.fromType(r$X.ColorType,{color:e$1U.clone(e.material.uniforms.color,new e$1U).withAlpha(.2)});i.uniforms.color.alpha=.2;var n=new o$14(e,this);n.material=i,n._index=this._polylines.length,n.id=t._index+"-alpha",this._polylines.push(n)}else this._lineDisplayType===X$V.NON_OCCLUDED?this._opaqueRS=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}}):this._lineDisplayType===X$V.OCCLUDED&&(this._opaqueRS=d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}));return this._createVertexArray=!0,this._createBatchTable=!0,t},k$T.prototype.remove=function(e){if(this.contains(e)){this._polylines[e._index]=void 0;var t=this._polylinesToUpdate.indexOf(e);if(-1!==t&&this._polylinesToUpdate.splice(t,1),this._polylinesRemoved=!0,this._createVertexArray=!0,this._createBatchTable=!0,e$2b(e._bucket)){var i=e._bucket;i.shaderProgram=i.shaderProgram&&i.shaderProgram.destroy()}e._destroy();for(var n,r=0,o=this._polylines.length;r<o;r++){var a=this._polylines[r];a&&a.id&&a.id===e._index+"-alpha"&&(n=a)}if(e$2b(n)){this._polylines[n._index]=void 0;var s=this._polylinesToUpdate.indexOf(e);-1!==s&&this._polylinesToUpdate.splice(s,1),n._destroy()}return!0}return!1},k$T.prototype.removeAll=function(){Ee$p(this),Ie$m(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0},k$T.prototype.contains=function(e){return e$2b(e)&&e._polylineCollection===this},k$T.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return ye$m(this),this._polylines[e]};var be$r=new i$11,xe$p=new e$29,Be$l=new o$1o;k$T.prototype.update=function(e){if(ye$m(this),0!==this._polylines.length){gr$4(this,e);var t,i=e.context,n=e.mapProjection,r=this._propertiesChanged;if(this._createBatchTable){if(0===e$1T.maximumVertexTextureImageUnits)throw new t$14("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");or$6(this,i),this._createBatchTable=!1}if(this._createVertexArray||_r$4(this))Le$q(this,i,n);else if(this._polylinesUpdated){var o=this._polylinesToUpdate;if(this._mode!==C$13.SCENE3D)for(var a=o.length,s=0;s<a;++s)(t=o[s]).update();if(r[Pe$l]||r[fr$3])Le$q(this,i,n);else for(var l=o.length,u=this._polylineBuckets,c=0;c<l;++c){r=(t=o[c])._propertiesChanged;var h=t._bucket,d=0;for(var f in u)if(u.hasOwnProperty(f)){if(u[f]===h){r[Te$p]&&h.writeUpdate(d,t,this._positionBuffer,n);break}d+=u[f].lengthOfPositions}if((r[ir$6]||r[nr$7])&&this._batchTable.setBatchedAttribute(t._index,0,new o$1o(t._width,t._show)),this._batchTable.attributes.length>2){if(r[Te$p]||r[Pe$l]){var p=e.mode===C$13.SCENE2D?t._boundingVolume2D:t._boundingVolumeWC,_=i$11.fromCartesian(p.center,be$r),m=e$29.fromElements(_.low.x,_.low.y,_.low.z,p.radius,xe$p);this._batchTable.setBatchedAttribute(t._index,2,_.high),this._batchTable.setBatchedAttribute(t._index,3,m)}if(r[lr$7]){var g=Be$l;g.x=0,g.y=Number.MAX_VALUE;var x=t.distanceDisplayCondition;e$2b(x)&&(g.x=x.near,g.y=x.far),this._batchTable.setBatchedAttribute(t._index,4,g)}}t._clean()}o.length=0,this._polylinesUpdated=!1}r=this._propertiesChanged;for(var v=0;v<De$p;++v)r[v]=0;var y=p$1d.IDENTITY;e.mode===C$13.SCENE3D&&(y=this.modelMatrix);var $=e.passes,b=0!==e.morphTime;if(e$2b(this._opaqueRS)||(this._opaqueRS=d$1m.fromCache({depthMask:b,depthTest:{enabled:b}})),e$2b(this._translucentRS)||(this._translucentRS=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!b,depthTest:{enabled:b}})),this._batchTable.update(e),e._fboState.frameBufferType!=Qe$c.CLAMP&&($.render||$.pick))vr$4(this,e,this._colorCommands,y)}};var _e$t=new i$1c,Oe$n=new i$1c;function vr$4(e,t,i,n){for(var r=t.context,o=t.commandList,a=i.length,s=0,l=!0,u=e._vertexArrays,c=e.debugShowBoundingVolume,h=e._batchTable.getUniformMapCallback(),d=u.length,f=0;f<d;++f)for(var p=u[f],_=p.buckets,m=_.length,g=0;g<m;++g){for(var x,v,y,$,b=_[g],T=b.offset,C=b.bucket.shaderProgram,S=b.bucket.polylines,w=S.length,E=0,P=0;P<w;++P){var A,L=S[P],M=dr$4(L._material);if(M!==x){if(e$2b(x)&&E>0){var R=v.isTranslucent();s>=a?(y=new i$_({owner:e}),i.push(y)):y=i[s],++s,$=p$19(h(v._uniforms),e._uniformMap),y.boundingVolume=i$1c.clone(_e$t,y.boundingVolume),y.modelMatrix=n,y.shaderProgram=C,y.vertexArray=p.va,y.renderState=R?e._translucentRS:e._opaqueRS,y.pass=v.isTranslucent()?Le$s.TRANSLUCENT:Le$s.OPAQUE,y.debugShowBoundingVolume=c,y.pickId="v_pickColor",y.uniformMap=$,y.count=E,y.offset=T,T+=E,E=0,l=!0,t.passes.pick&&e._canAlwaysPick&&(y.pass=Le$s.OVERLAY_AGAINST_DEPTH),o.push(y)}(v=L._material).update(r),x=M}for(var O=L._locatorBuckets,I=O.length,D=0;D<I;++D){var B=O[D];B.locator===b&&(E+=B.count)}t.mode===C$13.SCENE3D?A=L._boundingVolumeWC:t.mode===C$13.COLUMBUS_VIEW?A=L._boundingVolume2D:t.mode===C$13.SCENE2D?e$2b(L._boundingVolume2D)&&((A=i$1c.clone(L._boundingVolume2D,Oe$n)).center.x=0):e$2b(L._boundingVolumeWC)&&e$2b(L._boundingVolume2D)&&(A=i$1c.union(L._boundingVolumeWC,L._boundingVolume2D,Oe$n)),l?(l=!1,i$1c.clone(A,_e$t)):i$1c.union(A,_e$t,_e$t)}e$2b(x)&&E>0&&(s>=a?(y=new i$_({owner:e}),i.push(y)):y=i[s],++s,$=p$19(h(v._uniforms),e._uniformMap),y.boundingVolume=i$1c.clone(_e$t,y.boundingVolume),y.modelMatrix=n,y.shaderProgram=C,y.vertexArray=p.va,y.renderState=v.isTranslucent()?e._translucentRS:e._opaqueRS,y.pass=v.isTranslucent()?Le$s.TRANSLUCENT:Le$s.OPAQUE,y.debugShowBoundingVolume=c,y.pickId="v_pickColor",y.uniformMap=$,y.count=E,y.offset=T,t.passes.pick&&e._canAlwaysPick&&(y.pass=Le$s.OVERLAY_AGAINST_DEPTH),l=!0,o.push(y)),x=void 0}i.length=s}function _r$4(e){var t=!1,i=e._propertiesChanged,n=e._positionBufferUsage;return i[Te$p]?(n.bufferUsage!==A$19.STREAM_DRAW&&(t=!0,n.bufferUsage=A$19.STREAM_DRAW),n.frameCount=100):n.bufferUsage!==A$19.STATIC_DRAW&&(0===n.frameCount?(t=!0,n.bufferUsage=A$19.STATIC_DRAW):n.frameCount--),t}k$T.prototype.isDestroyed=function(){return!1},k$T.prototype.destroy=function(){return Ue$h(this),Ee$p(this),Ie$m(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$10(this)};var Re$l=[0,0,0];function Le$q(e,t,i){e._createVertexArray=!1,Ee$p(e),Ue$h(e),mr$3(e);var n,r,o=[[]],a=o[0],s=e._batchTable,l=e._useHighlightColor,u=[0],c=0,h=[[]],d=0,f=e._polylineBuckets;for(n in f)f.hasOwnProperty(n)&&((r=f[n]).updateShader(t,s,l),d+=r.lengthOfPositions);if(d>0){var p,_=e._mode,m=new Float32Array(6*d*3),g=new Float32Array(4*d),x=0,v=0,y=0;for(n in f)if(f.hasOwnProperty(n)){(r=f[n]).write(m,g,x,v,y,s,t,i),_===C$13.MORPHING&&(e$2b(p)||(p=new Float32Array(6*d*3)),r.writeForMorph(p,x));var $=r.lengthOfPositions;x+=6*$*3,v+=4*$,y+=4*$,c=r.updateIndices(o,u,h,c)}var b,T=e._positionBufferUsage.bufferUsage,C=A$19.STATIC_DRAW;e._positionBuffer=t$Y.createVertexBuffer({context:t,typedArray:m,usage:T}),e$2b(p)&&(b=t$Y.createVertexBuffer({context:t,typedArray:p,usage:T})),e._texCoordExpandAndBatchIndexBuffer=t$Y.createVertexBuffer({context:t,typedArray:g,usage:C});for(var S=3*Float32Array.BYTES_PER_ELEMENT,w=4*Float32Array.BYTES_PER_ELEMENT,E=0,P=o.length,A=0;A<P;++A)if((a=o[A]).length>0){var L=new Uint16Array(a),M=t$Y.createIndexBuffer({context:t,typedArray:L,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});E+=u[A];var R,O,I,D,B=6*(A*(S*e$2a.SIXTY_FOUR_KILOBYTES)-E*S),N=S+B,F=S+N,U=S+F,G=S+U,z=S+G,V=A*(w*e$2a.SIXTY_FOUR_KILOBYTES)-E*w,k=[{name:"positionHigh",index:ae$w.positionHigh,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:B,strideInBytes:6*S},{name:"positionLow",index:ae$w.positionLow,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:N,strideInBytes:6*S},{name:"prevPositionHigh",index:ae$w.prevPositionHigh,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:F,strideInBytes:6*S},{name:"prevPositionLow",index:ae$w.prevPositionLow,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:U,strideInBytes:6*S},{name:"nextPositionHigh",index:ae$w.nextPositionHigh,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:G,strideInBytes:6*S},{name:"nextPositionLow",index:ae$w.nextPositionLow,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:z,strideInBytes:6*S},{name:"texCoordExpandAndBatchIndex",index:ae$w.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:V}];_===C$13.SCENE3D?(R=e._positionBuffer,O="vertexBuffer",I=Re$l,D="value"):_===C$13.SCENE2D||_===C$13.COLUMBUS_VIEW?(R=Re$l,O="value",I=e._positionBuffer,D="vertexBuffer"):(R=b,O="vertexBuffer",I=e._positionBuffer,D="vertexBuffer"),_===C$13.SCENE3D?(k[0][O]=R,k[1][O]=R,k[2][O]=R,k[3][O]=R,k[4][O]=R,k[5][O]=R):(_===C$13.SCENE2D||_===C$13.COLUMBUS_VIEW)&&(k[0][D]=I,k[1][D]=I,k[2][D]=I,k[3][D]=I,k[4][D]=I,k[5][D]=I);var W=new c$12({context:t,attributes:k,indexBuffer:M});e._vertexArrays.push({va:W,buckets:h[A]})}}}function ur$5(e,t){return t instanceof t$V?t.id:t}var me$u=[];function dr$4(e){var t=r$X._uniformList[e.type],i=t.length;me$u.length=2*i;for(var n=0,r=0;r<i;++r){var o=t[r];me$u[n]=o,me$u[n+1]=e._uniforms[o](),n+=2}return e.type+":"+JSON.stringify(me$u,ur$5)}function mr$3(e){for(var t=e._mode,i=e._modelMatrix,n=e._polylineBuckets={},r=e._polylines,o=r.length,a=0;a<o;++a){var s=r[a];if(s._actualPositions.length>1){s.update();var l=s.material,u=n[l.type];e$2b(u)||(u=n[l.type]=new Z$U(l,t,i)),u.addPolyline(s)}}}function gr$4(e,t){var i=t.mode;(e._mode!==i||!p$1d.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=i,e._modelMatrix=p$1d.clone(e.modelMatrix),e._createVertexArray=!0)}function ye$m(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;for(var t=[],i=e._polylines.length,n=0,r=0;n<i;++n){var o=e._polylines[n];e$2b(o)&&(o._index=r++,t.push(o))}e._polylines=t}}function Ee$p(e){for(var t=e._polylines,i=t.length,n=0;n<i;++n)if(e$2b(t[n])){var r=t[n]._bucket;e$2b(r)&&(r.shaderProgram=r.shaderProgram&&r.shaderProgram.destroy())}}function Ue$h(e){for(var t=e._vertexArrays.length,i=0;i<t;++i)e._vertexArrays[i].va.destroy();e._vertexArrays.length=0;var n=e._colorCommands;t=n.length;for(var r=0;r<t;++r){n[r].derivedCommands={}}}function Ie$m(e){for(var t=e._polylines,i=t.length,n=0;n<i;++n)e$2b(t[n])&&t[n]._destroy()}function Se$f(e,t,i){this.count=e,this.offset=t,this.bucket=i}function Z$U(e,t,i){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=i}function Ve$j(e){return o$1p.dot(o$1p.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(o$1m.ORIGIN_ZX_PLANE)===Ae$u.INTERSECTING}k$T.prototype._updatePolyline=function(e,t){if("string"!=typeof e.id||"alpha"!==e.id.slice(-5)){if(this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),this._lineDisplayType===X$V.OCCLUDED_TRANSLUCENT)for(var i=0;i<this._polylines.length;i++){var n=this._polylines[i];n.id&&n.id===e._index+"-alpha"&&(n._dirty||this._polylinesToUpdate.push(n),n.positions=e.positions,++this._propertiesChanged[t])}++this._propertiesChanged[t]}},Z$U.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this},Z$U.prototype.updateShader=function(e,t,i){if(!e$2b(this.shaderProgram)){var n=["DISTANCE_DISPLAY_CONDITION"];i&&n.push("VECTOR_TILE"),-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&n.push("POLYLINE_DASH"),"PolylineDynamic"===this.material.type&&n.push("ENABLE_DYNAMIC"),s$Y.isInternetExplorer()||n.push("CLIP_POLYLINE"),this.mode===C$13.SCENE3D&&n.push("SCENE_3D");var r=new s$U({name:"PolylineFS",defines:n,sources:["varying vec4 v_pickColor;\n",this.material.shaderSource,h$X]}),o=t.getVertexShaderCallback()(tr$7),a=new s$U({name:"PolylineVS",defines:n,sources:[Z$Y,o]});this.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:a,fragmentShaderSource:r,attributeLocations:ae$w})}},Z$U.prototype.getPolylinePositionsLength=function(e){var t;if(this.mode===C$13.SCENE3D||!Ve$j(e))return 4*(t=e._actualPositions.length)-4;var i=0,n=e._segments.lengths;t=n.length;for(var r=0;r<t;++r)i+=4*n[r]-4;return i};var D$V=new o$1p,W$Y=new o$1p,Y$M=new o$1p,ge$q=new o$1p,pr$3=new e$29,cr$3=new o$1o;Z$U.prototype.write=function(e,t,i,n,r,o,a,s){for(var l=this.mode,u=s.ellipsoid.maximumRadius*e$2a.PI,c=this.polylines,h=c.length,d=0;d<h;++d){var f,p=c[d],_=p.width,m=p.show&&_>0,g=p._index,x=this.getSegments(p,s),v=x.positions,y=x.lengths,$=v.length,b=p.getPickId(a);f=e$2b(b)?b.color:e$1U.BLACK;for(var T,C=0,S=0,w=0;w<$;++w){0===w?p._loop?T=v[$-2]:(T=ge$q,o$1p.subtract(v[0],v[1],T),o$1p.add(v[0],T,T)):T=v[w-1],o$1p.clone(T,W$Y),o$1p.clone(v[w],D$V),w===$-1?p._loop?T=v[1]:(T=ge$q,o$1p.subtract(v[$-1],v[$-2],T),o$1p.add(v[$-1],T,T)):T=v[w+1],o$1p.clone(T,Y$M);var E=y[C];w===S+E&&(S+=E,++C);var P=w-S==0,A=w===S+y[C]-1;l===C$13.SCENE2D&&(W$Y.z=0,D$V.z=0,Y$M.z=0),(l===C$13.SCENE2D||l===C$13.MORPHING)&&(P||A)&&u-Math.abs(D$V.x)<1&&((D$V.x<0&&W$Y.x>0||D$V.x>0&&W$Y.x<0)&&o$1p.clone(D$V,W$Y),(D$V.x<0&&Y$M.x>0||D$V.x>0&&Y$M.x<0)&&o$1p.clone(D$V,Y$M));for(var L=A?2:4,M=P?2:0;M<L;++M){i$11.writeElements(D$V,e,i),i$11.writeElements(W$Y,e,i+6),i$11.writeElements(Y$M,e,i+12);var R=M-2<0?-1:1;t[r]=w/($-1),t[r+1]=M%2*2-1,t[r+2]=R,t[r+3]=g,i+=18,r+=4}}var O=pr$3;O.x=e$1U.floatToByte(f.red),O.y=e$1U.floatToByte(f.green),O.z=e$1U.floatToByte(f.blue),O.w=e$1U.floatToByte(f.alpha);var I=cr$3;I.x=_,I.y=m?1:0;var D=l===C$13.SCENE2D?p._boundingVolume2D:p._boundingVolumeWC,B=i$11.fromCartesian(D.center,be$r),N=B.high,F=e$29.fromElements(B.low.x,B.low.y,B.low.z,D.radius,xe$p),U=Be$l;U.x=0,U.y=Number.MAX_VALUE;var G=p.distanceDisplayCondition;e$2b(G)&&(U.x=G.near,U.y=G.far),o.setBatchedAttribute(g,0,I),o.setBatchedAttribute(g,1,O),o.attributes.length>2&&(o.setBatchedAttribute(g,2,N),o.setBatchedAttribute(g,3,F),o.setBatchedAttribute(g,4,U))}};var Tr$5=new o$1p,yr$3=new o$1p,Er$4=new o$1p,Me$l=new o$1p;Z$U.prototype.writeForMorph=function(e,t){for(var i=this.modelMatrix,n=this.polylines,r=n.length,o=0;o<r;++o)for(var a=n[o],s=a._segments.positions,l=a._segments.lengths,u=s.length,c=0,h=0,d=0;d<u;++d){var f;0===d?a._loop?f=s[u-2]:(f=Me$l,o$1p.subtract(s[0],s[1],f),o$1p.add(s[0],f,f)):f=s[d-1],f=p$1d.multiplyByPoint(i,f,yr$3);var p,_=p$1d.multiplyByPoint(i,s[d],Tr$5);d===u-1?a._loop?p=s[1]:(p=Me$l,o$1p.subtract(s[u-1],s[u-2],p),o$1p.add(s[u-1],p,p)):p=s[d+1],p=p$1d.multiplyByPoint(i,p,Er$4);var m=l[c];d===h+m&&(h+=m,++c);for(var g=d-h==0,x=d===h+l[c]-1?2:4,v=g?2:0;v<x;++v)i$11.writeElements(_,e,t),i$11.writeElements(f,e,t+6),i$11.writeElements(p,e,t+12),t+=18}};var Sr$3=new Array(1);Z$U.prototype.updateIndices=function(e,t,i,n){var r=i.length-1,o=new Se$f(0,n,this);i[r].push(o);var a=0,s=e[e.length-1],l=0;s.length>0&&(l=s[s.length-1]+1);for(var u=this.polylines,c=u.length,h=0;h<c;++h){var d,f=u[h];if(f._locatorBuckets=[],this.mode===C$13.SCENE3D){d=Sr$3;var p=f._actualPositions.length;if(!(p>0))continue;d[0]=p}else d=f._segments.lengths;var _=d.length;if(_>0){for(var m=0,g=0;g<_;++g)for(var x=d[g]-1,v=0;v<x;++v)l+4>e$2a.SIXTY_FOUR_KILOBYTES&&(f._locatorBuckets.push({locator:o,count:m}),m=0,t.push(4),s=[],e.push(s),l=0,o.count=a,a=0,n=0,o=new Se$f(0,0,this),i[++r]=[o]),s.push(l,l+2,l+1),s.push(l+1,l+2,l+3),m+=6,a+=6,n+=6,l+=4;f._locatorBuckets.push({locator:o,count:m}),l+4>e$2a.SIXTY_FOUR_KILOBYTES&&(t.push(0),s=[],e.push(s),l=0,o.count=a,n=0,a=0,o=new Se$f(0,0,this),i[++r]=[o])}f._clean()}return o.count=a,n},Z$U.prototype.getPolylineStartIndex=function(e){for(var t=this.polylines,i=0,n=t.length,r=0;r<n;++r){var o=t[r];if(o===e)break;i+=o._actualLength}return i};var le$x={positions:void 0,lengths:void 0},We$l=new Array(1),Nr$3=new o$1p,Ar$3=new a$18,Ye$f;function e$1F(e){e=u$_(e,!0),this.value=e$1F.toValue(e)}function g$13(e){e=u$_(e,{}),this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._rectangle=u$_(e.rectangle,h$18.MAX_VALUE),this._projection=new n$1b(this._ellipsoid),this._numberOfLevelZeroTilesX=u$_(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=u$_(e.numberOfLevelZeroTilesY,1),this._customDPI=e.customDPI,this._scaleDenominators=e.scaleDenominators,this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._beginLevel=u$_(e.beginLevel,0),this._orgin=u$_(e.orgin,void 0)}Z$U.prototype.getSegments=function(e,t){var i=e._actualPositions;if(this.mode===C$13.SCENE3D)return We$l[0]=i.length,le$x.positions=i,le$x.lengths=We$l,le$x;Ve$j(e)&&(i=e._segments.positions);for(var n,r=t.ellipsoid,o=[],a=this.modelMatrix,s=i.length,l=Nr$3,u=0;u<s;++u)n=i[u],l=p$1d.multiplyByPoint(a,n,l),o.push(t.project(r.cartesianToCartographic(l,Ar$3)));if(o.length>0){e._boundingVolume2D=i$1c.fromPoints(o,e._boundingVolume2D);var c=e._boundingVolume2D.center;e._boundingVolume2D.center=new o$1p(c.z,c.x,c.y)}return le$x.positions=o,le$x.lengths=e._segments.lengths,le$x},Z$U.prototype.writeUpdate=function(e,t,i,n){var r=this.mode,o=n.ellipsoid.maximumRadius*e$2a.PI,a=t._actualLength;if(a){e+=this.getPolylineStartIndex(t);var s=Ye$f,l=6*a*3;!e$2b(s)||s.length<l?s=Ye$f=new Float32Array(l):s.length>l&&(s=new Float32Array(s.buffer,0,l));var u,c=this.getSegments(t,n),h=c.positions,d=c.lengths,f=0,p=0,_=0;a=h.length;for(var m=0;m<a;++m){0===m?t._loop?u=h[a-2]:(u=ge$q,o$1p.subtract(h[0],h[1],u),o$1p.add(h[0],u,u)):u=h[m-1],o$1p.clone(u,W$Y),o$1p.clone(h[m],D$V),m===a-1?t._loop?u=h[1]:(u=ge$q,o$1p.subtract(h[a-1],h[a-2],u),o$1p.add(h[a-1],u,u)):u=h[m+1],o$1p.clone(u,Y$M);var g=d[p];m===_+g&&(_+=g,++p);var x=m-_==0,v=m===_+d[p]-1;r===C$13.SCENE2D&&(W$Y.z=0,D$V.z=0,Y$M.z=0),(r===C$13.SCENE2D||r===C$13.MORPHING)&&(x||v)&&o-Math.abs(D$V.x)<1&&((D$V.x<0&&W$Y.x>0||D$V.x>0&&W$Y.x<0)&&o$1p.clone(D$V,W$Y),(D$V.x<0&&Y$M.x>0||D$V.x>0&&Y$M.x<0)&&o$1p.clone(D$V,Y$M));for(var y=v?2:4,$=x?2:0;$<y;++$)i$11.writeElements(D$V,s,f),i$11.writeElements(W$Y,s,f+6),i$11.writeElements(Y$M,s,f+12),f+=18}i.copyFromArrayView(s,18*Float32Array.BYTES_PER_ELEMENT*e)}},Object.defineProperties(e$1F.prototype,{componentDatatype:{get:function(){return S$12.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}}),e$1F.toValue=function(e,t){if(!e$2b(e))throw new t$16("show is required.");return e$2b(t)?(t[0]=e,t):new Uint8Array([e])},Object.defineProperties(g$13.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}},beginLevel:{get:function(){return this._beginLevel}},orgin:{get:function(){return this._orgin}}}),g$13.prototype.getNumberOfXTilesAtLevel=function(e){if(e$2b(this._customDPI)&&e$2b(this._scaleDenominators)){var t=this.calculateResolution(e),i=this._tileWidth*t.x;return Math.ceil(this._rectangle.width/i)}return this._numberOfLevelZeroTilesX<<e-this._beginLevel},g$13.prototype.getNumberOfYTilesAtLevel=function(e){if(e$2b(this._customDPI)&&e$2b(this._scaleDenominators)){var t=this.calculateResolution(e),i=this._tileHeight*t.y;return Math.ceil(this._rectangle.height/i)}return this._numberOfLevelZeroTilesY<<e-this._beginLevel},g$13.prototype.rectangleToNativeRectangle=function(e,t){o$1q.defined("rectangle",e);var i=e$2a.toDegrees(e.west),n=e$2a.toDegrees(e.south),r=e$2a.toDegrees(e.east),o=e$2a.toDegrees(e.north);return e$2b(t)?(t.west=i,t.south=n,t.east=r,t.north=o,t):new h$18(i,n,r,o)},g$13.prototype.tileXYToNativeRectangle=function(e,t,i,n){var r=this.tileXYToRectangle(e,t,i,n);return r.west=e$2a.toDegrees(r.west),r.south=e$2a.toDegrees(r.south),r.east=e$2a.toDegrees(r.east),r.north=e$2a.toDegrees(r.north),r},g$13.prototype.tileXYToRectangle=function(e,t,i,n){var r=this._rectangle,o=e$2b(this._orgin)?this._orgin.longitude:r.west,a=e$2b(this._orgin)?this._orgin.latitude:r.north;if(e$2b(this._customDPI)&&e$2b(this._scaleDenominators)){var s=this.calculateResolution(i),l=o+e*this._tileWidth*s.x,u=o+(e+1)*this._tileWidth*s.x,c=a-t*this._tileHeight*s.y,h=a-(t+1)*this._tileHeight*s.y;return e$2b(n)?(n.west=l,n.south=h,n.east=u,n.north=c,n):new h$18(l,h,u,c)}var d=this.getNumberOfXTilesAtLevel(i),f=this.getNumberOfYTilesAtLevel(i),p=r.width/d,_=(l=e*p+r.west,u=(e+1)*p+r.west,r.height/f);c=r.north-t*_,h=r.north-(t+1)*_;return e$2b(n)||(n=new h$18(l,h,u,c)),n.west=l,n.south=h,n.east=u,n.north=c,n},g$13.prototype.positionToTileXY=function(e,t,i){var n=this._rectangle;if(h$18.contains(n,e)){var r=this.getNumberOfXTilesAtLevel(t),o=this.getNumberOfYTilesAtLevel(t),a=e$2b(this._orgin)?this._orgin.longitude:n.west,s=e$2b(this._orgin)?this._orgin.latitude:n.north,l=n.width/r,u=n.height/o;if(e$2b(this._customDPI)&&e$2b(this._scaleDenominators)){var c=this.calculateResolution(t);l=this._tileWidth*c.x,u=this._tileHeight*c.y}var h=e.longitude;n.east<n.west&&(h+=e$2a.TWO_PI),e$2b(this._orgin)&&(r+=this._orgin.longitude!=n.west?Math.ceil((e.longitude-this._orgin.longitude)/l):0,o+=this._orgin.latitude!=n.north?Math.ceil((this._orgin.latitude-e.latitude)/u):0);var d=(h-a)/l|0;d>=r&&(d=r-1);var f=(s-e.latitude)/u|0;return f>=o&&(f=o-1),e$2b(i)?(i.x=d,i.y=f,i):new o$1o(d,f)}},g$13.prototype.calculateResolution=function(e){var t=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.x,i=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.y,n=t$13.WGS84.maximumRadius;return new o$1o(t/n,i/n)};var _$R=new o$1p,M$_=new o$1p,C$Z=new a$18,d$19=new o$1p,X$U=new o$1p,S$P=new i$1c,z$S=new g$13,c$Y=[new a$18,new a$18,new a$18,new a$18],g$12=new o$1o,e$1E={};function L$11(e){a$18.fromRadians(e.east,e.north,0,c$Y[0]),a$18.fromRadians(e.west,e.north,0,c$Y[1]),a$18.fromRadians(e.east,e.south,0,c$Y[2]),a$18.fromRadians(e.west,e.south,0,c$Y[3]);var t,i=0,n=0,r=0,o=0,a=e$1E._terrainHeightsMaxLevel;for(t=0;t<=a;++t){for(var s=!1,l=0;l<4;++l){var u=c$Y[l];if(z$S.positionToTileXY(u,t,g$12),0===l)r=g$12.x,o=g$12.y;else if(r!==g$12.x||o!==g$12.y){s=!0;break}}if(s)break;i=r,n=o}if(0!==t)return{x:i,y:n,level:t>a?a:t-1}}function t$O(e){this._ellipsoid=u$_(e,t$13.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}e$1E.initialize=function(){var e=e$1E._initPromise;return e$2b(e)||(e=t$11.fetchJson(n$15("Assets/approximateTerrainHeights.json")).then((function(e){e$1E._terrainHeights=e})),e$1E._initPromise=e),e},e$1E.getMinimumMaximumHeights=function(e,t){if(o$1q.defined("rectangle",e),!e$2b(e$1E._terrainHeights))throw new t$16("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=u$_(t,t$13.WGS84);var i=L$11(e),n=e$1E._defaultMinTerrainHeight,r=e$1E._defaultMaxTerrainHeight;if(e$2b(i)){var o=i.level+"-"+i.x+"-"+i.y,a=e$1E._terrainHeights[o];e$2b(a)&&(n=a[0],r=a[1]),t.cartographicToCartesian(h$18.northeast(e,C$Z),_$R),t.cartographicToCartesian(h$18.southwest(e,C$Z),M$_),o$1p.midpoint(M$_,_$R,d$19);var s=t.scaleToGeodeticSurface(d$19,X$U);if(e$2b(s)){var l=o$1p.distance(d$19,s);n=Math.min(n,-l)}else n=e$1E._defaultMinTerrainHeight}return{minimumTerrainHeight:n=Math.max(e$1E._defaultMinTerrainHeight,n),maximumTerrainHeight:r}},e$1E.getBoundingSphere=function(e,t){if(o$1q.defined("rectangle",e),!e$2b(e$1E._terrainHeights))throw new t$16("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=u$_(t,t$13.WGS84);var i=L$11(e),n=e$1E._defaultMaxTerrainHeight;if(e$2b(i)){var r=i.level+"-"+i.x+"-"+i.y,o=e$1E._terrainHeights[r];e$2b(o)&&(n=o[1])}var a=i$1c.fromRectangle3D(e,t,0);return i$1c.fromRectangle3D(e,t,n,S$P),i$1c.union(a,S$P,a)},e$1E._terrainHeightsMaxLevel=6,e$1E._defaultMaxTerrainHeight=9e3,e$1E._defaultMinTerrainHeight=-1e5,e$1E._terrainHeights=void 0,e$1E._initPromise=void 0,Object.defineProperties(e$1E,{initialized:{get:function(){return e$2b(e$1E._terrainHeights)}}}),Object.defineProperties(t$O.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),t$O.mercatorAngleToGeodeticLatitude=function(e){return e$2a.PI_OVER_TWO-2*Math.atan(Math.exp(-e))},t$O.geodeticLatitudeToMercatorAngle=function(e){e>t$O.MaximumLatitude?e=t$O.MaximumLatitude:e<-t$O.MaximumLatitude&&(e=-t$O.MaximumLatitude);var t=Math.sin(e);return.5*Math.log((1+t)/(1-t))},t$O.MaximumLatitude=t$O.mercatorAngleToGeodeticLatitude(Math.PI),t$O.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=t$O.geodeticLatitudeToMercatorAngle(e.latitude)*i,o=e.height;return e$2b(t)?(t.x=n,t.y=r,t.z=o,t):new o$1p(n,r,o)},t$O.prototype.unproject=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=t$O.mercatorAngleToGeodeticLatitude(e.y*i),o=e.z;return e$2b(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new a$18(n,r,o)};var Za$4=[n$1b,t$O],Hr$1=Za$4.length,ur$4=Math.cos(e$2a.toRadians(30)),Sr$2=Math.cos(e$2a.toRadians(150)),wr$3=0,gr$3=1e3;function aa$4(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions;if(!e$2b(t)||t.length<2)throw new t$16("At least two positions are required.");if(e$2b(e.arcType)&&e.arcType!==m$1f.GEODESIC&&e.arcType!==m$1f.RHUMB)throw new t$16("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=u$_(e.width,1),this._positions=t,this.granularity=u$_(e.granularity,9999),this.loop=u$_(e.loop,!1),this.arcType=u$_(e.arcType,m$1f.GEODESIC),this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(aa$4.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+t$13.packedLength+1+1}}}),aa$4.setProjectionAndEllipsoid=function(e,t){for(var i=0,n=0;n<Hr$1;n++)if(t instanceof Za$4[n]){i=n;break}e._projectionIndex=i,e._ellipsoid=t.ellipsoid};var Gr$3=new o$1p,Er$3=new o$1p,dr$3=new o$1p;function Ba$4(e,t,i,n,r){var o=P$V(n,e,0,Gr$3),a=P$V(n,e,i,Er$3),s=P$V(n,t,0,dr$3),l=X$T(a,o,Er$3),u=X$T(s,o,dr$3);return o$1p.cross(u,l,r),o$1p.normalize(r,r)}var jr$2=new a$18,an$3=new o$1p,rn$5=new o$1p,nn$4=new o$1p;function Ya$4(e,t,i,n,r,o,a,s,l,u,c){if(0!==r){var h;o===m$1f.GEODESIC?h=new E$1s(e,t,a):o===m$1f.RHUMB&&(h=new P$16(e,t,a));var d=h.surfaceDistance;if(!(d<r))for(var f=Ba$4(e,t,n,a,nn$4),p=Math.ceil(d/r),_=d/p,m=_,g=p-1,x=s.length,v=0;v<g;v++){var y=h.interpolateUsingSurfaceDistance(m,jr$2),$=P$V(a,y,i,an$3),b=P$V(a,y,n,rn$5);o$1p.pack(f,s,x),o$1p.pack($,l,x),o$1p.pack(b,u,x),c.push(y.latitude),c.push(y.longitude),x+=3,m+=_}}}var Da$4=new a$18;function P$V(e,t,i,n){return a$18.clone(t,Da$4),Da$4.height=i,a$18.toCartesian(Da$4,e,n)}function X$T(e,t,i){return o$1p.subtract(e,t,i),o$1p.normalize(i,i),i}aa$4.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t);var n=u$_(i,0),r=e._positions,o=r.length;t[n++]=o;for(var a=0;a<o;++a){var s=r[a];o$1p.pack(s,t,n),n+=3}return t[n++]=e.granularity,t[n++]=e.loop?1:0,t[n++]=e.arcType,t$13.pack(e._ellipsoid,t,n),n+=t$13.packedLength,t[n++]=e._projectionIndex,t[n++]=e._scene3DOnly?1:0,t},aa$4.unpack=function(e,t,i){o$1q.defined("array",e);for(var n=u$_(t,0),r=e[n++],o=new Array(r),a=0;a<r;a++)o[a]=o$1p.unpack(e,n),n+=3;var s=e[n++],l=1===e[n++],u=e[n++],c=t$13.unpack(e,n);n+=t$13.packedLength;var h=e[n++],d=1===e[n++];if(!e$2b(i)){var f=new aa$4({positions:o,granularity:s,loop:l,arcType:u,ellipsoid:c});return f._projectionIndex=h,f._scene3DOnly=d,f}return i._positions=o,i.granularity=s,i.loop=l,i.arcType=u,i._ellipsoid=c,i._projectionIndex=h,i._scene3DOnly=d,i};var en$5=new o$1p,cn$3=new o$1p,tn$5=new o$1p,on$2=new o$1p,vn$3=new o$1m(o$1p.UNIT_X,0),mr$2=new o$1p,pn$3=0;function Ja$4(e,t,i,n,r){var o=X$T(i,t,mr$2),a=X$T(e,t,en$5),s=X$T(n,t,cn$3),l=o$1p.cross(o,a,on$2);l=o$1p.normalize(l,l);var u=o$1m.fromPointNormal(t,l,vn$3),c=o$1m.getPointDistance(u,n);if(e$2a.equalsEpsilon(c,0,e$2a.EPSILON7))return o$1p.clone(l,r),r;r=o$1p.add(s,a,r),r=o$1p.normalize(r,r);var h=o$1p.cross(o,r,tn$5);return o$1p.normalize(h,h),o$1p.cross(h,o,r),o$1p.normalize(r,r),o$1p.dot(s,h)<pn$3&&(r=o$1p.negate(r,r)),r}var Aa$3=o$1m.fromPointNormal(o$1p.ZERO,o$1p.UNIT_Y),sn$3=new o$1p,ln$3=new o$1p,fn$3=new o$1p,hn$3=new o$1p,un$3=new o$1p,Na$2=new o$1p,Pa$3=new a$18,Or$2=new a$18,Cr$3=new a$18;aa$4.createGeometry=function(e){var t,i,n=!e._scene3DOnly,r=e.loop,o=e._ellipsoid,a=e.granularity,s=e.arcType,l=new Za$4[e._projectionIndex](o),u=wr$3,c=gr$3,h=e._positions,d=h.length;2===d&&(r=!1);var f,p,_,m,g,x,v,y=new P$16(void 0,void 0,o),$=[h[0]];for(i=0;i<d-1;i++)f=h[i],p=h[i+1],e$2b(g=g$1h.lineSegmentPlane(f,p,Aa$3,Na$2))&&!o$1p.equalsEpsilon(g,f,e$2a.EPSILON7)&&!o$1p.equalsEpsilon(g,p,e$2a.EPSILON7)&&(e.arcType===m$1f.GEODESIC?$.push(o$1p.clone(g)):e.arcType===m$1f.RHUMB&&(v=o.cartesianToCartographic(g,Pa$3).longitude,_=o.cartesianToCartographic(f,Pa$3),m=o.cartesianToCartographic(p,Or$2),y.setEndPoints(_,m),x=y.findIntersectionWithLongitude(v,Cr$3),e$2b(g=o.cartographicToCartesian(x,Na$2))&&!o$1p.equalsEpsilon(g,f,e$2a.EPSILON7)&&!o$1p.equalsEpsilon(g,p,e$2a.EPSILON7)&&$.push(o$1p.clone(g)))),$.push(p);r&&(f=h[d-1],p=h[0],e$2b(g=g$1h.lineSegmentPlane(f,p,Aa$3,Na$2))&&!o$1p.equalsEpsilon(g,f,e$2a.EPSILON7)&&!o$1p.equalsEpsilon(g,p,e$2a.EPSILON7)&&(e.arcType===m$1f.GEODESIC?$.push(o$1p.clone(g)):e.arcType===m$1f.RHUMB&&(v=o.cartesianToCartographic(g,Pa$3).longitude,_=o.cartesianToCartographic(f,Pa$3),m=o.cartesianToCartographic(p,Or$2),y.setEndPoints(_,m),x=y.findIntersectionWithLongitude(v,Cr$3),e$2b(g=o.cartographicToCartesian(x,Na$2))&&!o$1p.equalsEpsilon(g,f,e$2a.EPSILON7)&&!o$1p.equalsEpsilon(g,p,e$2a.EPSILON7)&&$.push(o$1p.clone(g)))));var b=$.length,T=new Array(b);for(i=0;i<b;i++){var C=a$18.fromCartesian($[i],o);C.height=0,T[i]=C}if(!((b=(T=D$11(T,a$18.equalsEpsilon)).length)<2)){var S=[],w=[],E=[],P=[],A=sn$3,L=ln$3,M=fn$3,R=hn$3,O=un$3,I=T[0],D=T[1];for(A=P$V(o,T[b-1],u,A),R=P$V(o,D,u,R),L=P$V(o,I,u,L),M=P$V(o,I,c,M),O=r?Ja$4(A,L,M,R,O):Ba$4(I,D,c,o,O),o$1p.pack(O,w,0),o$1p.pack(L,E,0),o$1p.pack(M,P,0),S.push(I.latitude),S.push(I.longitude),Ya$4(I,D,u,c,a,s,o,w,E,P,S),i=1;i<b-1;++i){A=o$1p.clone(L,A),L=o$1p.clone(R,L);var B=T[i];P$V(o,B,c,M),P$V(o,T[i+1],u,R),Ja$4(A,L,M,R,O),t=w.length,o$1p.pack(O,w,t),o$1p.pack(L,E,t),o$1p.pack(M,P,t),S.push(B.latitude),S.push(B.longitude),Ya$4(T[i],T[i+1],u,c,a,s,o,w,E,P,S)}var N=T[b-1],F=T[b-2];if(L=P$V(o,N,u,L),M=P$V(o,N,c,M),r){var U=T[0];O=Ja$4(A=P$V(o,F,u,A),L,M,R=P$V(o,U,u,R),O)}else O=Ba$4(F,N,c,o,O);if(t=w.length,o$1p.pack(O,w,t),o$1p.pack(L,E,t),o$1p.pack(M,P,t),S.push(N.latitude),S.push(N.longitude),r){for(Ya$4(N,I,u,c,a,s,o,w,E,P,S),t=w.length,i=0;i<3;++i)w[t+i]=w[i],E[t+i]=E[i],P[t+i]=P[i];S.push(I.latitude),S.push(I.longitude)}return Wn(r,l,E,P,w,S,n)}};var Sn$2=new o$1p,wn$2=new p$1e,gn$3=new n$13;function Ir$5(e,t,i,n){var r=X$T(i,t,Sn$2),o=o$1p.dot(r,e);if(o>ur$4||o<Sr$2){var a=X$T(n,i,mr$2),s=o<Sr$2?e$2a.PI_OVER_TWO:-e$2a.PI_OVER_TWO,l=n$13.fromAxisAngle(a,s,gn$3),u=p$1e.fromQuaternion(l,wn$2);return p$1e.multiplyByVector(u,e,e),!0}return!1}var Tr$4=new a$18,En$3=new o$1p,_r$3=new o$1p;function ma$3(e,t,i,n,r){var o=a$18.toCartesian(t,e._ellipsoid,En$3),a=o$1p.add(o,i,_r$3),s=!1,l=e._ellipsoid,u=l.cartesianToCartographic(a,Tr$4);Math.abs(t.longitude-u.longitude)>e$2a.PI_OVER_TWO&&(s=!0,a=o$1p.subtract(o,i,_r$3),u=l.cartesianToCartographic(a,Tr$4)),u.height=0;var c=e.project(u,r);return(r=o$1p.subtract(c,n,r)).z=0,r=o$1p.normalize(r,r),s&&o$1p.negate(r,r),r}var dn$2=new o$1p,Lr$3=new o$1p;function kr$3(e,t,i,n,r,o){var a=o$1p.subtract(t,e,dn$2);o$1p.normalize(a,a);var s=i-wr$3,l=o$1p.multiplyByScalar(a,s,Lr$3);o$1p.add(e,l,r);var u=n-gr$3;l=o$1p.multiplyByScalar(a,u,Lr$3),o$1p.add(t,l,o)}var mn$3=new o$1p;function Ra$3(e,t){var i=o$1m.getPointDistance(Aa$3,e),n=o$1m.getPointDistance(Aa$3,t),r=mn$3;e$2a.equalsEpsilon(i,0,e$2a.EPSILON2)?(r=X$T(t,e,r),o$1p.multiplyByScalar(r,e$2a.EPSILON2,r),o$1p.add(e,r,e)):e$2a.equalsEpsilon(n,0,e$2a.EPSILON2)&&(r=X$T(e,t,r),o$1p.multiplyByScalar(r,e$2a.EPSILON2,r),o$1p.add(t,r,t))}function On$2(e,t){var i=Math.abs(e.longitude),n=Math.abs(t.longitude);if(e$2a.equalsEpsilon(i,e$2a.PI,e$2a.EPSILON11)){var r=e$2a.sign(t.longitude);return e.longitude=r*(i-e$2a.EPSILON11),1}if(e$2a.equalsEpsilon(n,e$2a.PI,e$2a.EPSILON11)){var o=e$2a.sign(e.longitude);return t.longitude=o*(n-e$2a.EPSILON11),2}return 0}var Ar$2=new a$18,Nr$2=new a$18,Pr$2=new o$1p,Ka$4=new o$1p,Rr$1=new o$1p,Fr$2=new o$1p,Cn=new o$1p,br$1=new o$1p,In=[Ar$2,Nr$2],Tn$3=new h$18,_n$3=new o$1p,Ln$2=new o$1p,kn$1=new o$1p,An$1=new o$1p,Nn$1=new o$1p,Pn$1=new o$1p,Qa$4=new o$1p,$a$4=new o$1p,Rn$2=new o$1p,Fn$1=new o$1p,bn$1=new o$1p,Mr$4=new o$1p,Mn$1=new o$1p,zn=new o$1p,xn$1=new i$11,qn=new i$11,zr$4=new o$1p,yn$1=new o$1p,xr$4=new o$1p,Vn=[new i$1c,new i$1c],qr$1=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],yr$2=qr$1.length;function Wn(e,t,i,n,r,o,a){var s,l,u,c,h,d,f=t._ellipsoid,p=i.length/3-1,_=8*p,m=4*_,g=36*p,x=_>65535?new Uint32Array(g):new Uint16Array(g),v=new Float64Array(3*_),y=new Float32Array(m),$=new Float32Array(m),b=new Float32Array(m),T=new Float32Array(m),C=new Float32Array(m);a&&(u=new Float32Array(m),c=new Float32Array(m),h=new Float32Array(m),d=new Float32Array(2*_));var S=o.length/2,w=0,E=Ar$2;E.height=0;var P=Nr$2;P.height=0;var A=Pr$2,L=Ka$4;if(a)for(l=0,s=1;s<S;s++)E.latitude=o[l],E.longitude=o[l+1],P.latitude=o[l+2],P.longitude=o[l+3],A=t.project(E,A),L=t.project(P,L),w+=o$1p.distance(A,L),l+=2;var M=n.length/3;L=o$1p.unpack(n,0,L);var R,O=0;for(l=3,s=1;s<M;s++)A=o$1p.clone(L,A),L=o$1p.unpack(n,l,L),O+=o$1p.distance(A,L),l+=3;l=3;var I=0,D=0,B=0,N=0,F=!1,U=o$1p.unpack(i,0,Fr$2),G=o$1p.unpack(n,0,Ka$4),z=o$1p.unpack(r,0,br$1);e&&(Ir$5(z,o$1p.unpack(i,i.length-6,Rr$1),U,G)&&(z=o$1p.negate(z,z)));var V=0,k=0,W=0;for(s=0;s<p;s++){var H,q,j,Y,X=o$1p.clone(U,Rr$1),K=o$1p.clone(G,Pr$2),Q=o$1p.clone(z,Cn);if(F&&(Q=o$1p.negate(Q,Q)),U=o$1p.unpack(i,l,Fr$2),G=o$1p.unpack(n,l,Ka$4),F=Ir$5(z=o$1p.unpack(r,l,br$1),X,U,G),E.latitude=o[I],E.longitude=o[I+1],P.latitude=o[I+2],P.longitude=o[I+3],a){var Z=On$2(E,P);H=t.project(E,Nn$1);var J=X$T(q=t.project(P,Pn$1),H,zr$4);J.y=Math.abs(J.y),j=Qa$4,Y=$a$4,0===Z||o$1p.dot(J,o$1p.UNIT_Y)>ur$4?(j=ma$3(t,E,Q,H,Qa$4),Y=ma$3(t,P,z,q,$a$4)):1===Z?(Y=ma$3(t,P,z,q,$a$4),j.x=0,j.y=e$2a.sign(E.longitude-Math.abs(P.longitude)),j.z=0):(j=ma$3(t,E,Q,H,Qa$4),Y.x=0,Y.y=e$2a.sign(E.longitude-P.longitude),Y.z=0)}var ee=o$1p.distance(K,G),te=i$11.fromCartesian(X,xn$1),ie=o$1p.subtract(U,X,Rn$2),ne=o$1p.normalize(ie,Mr$4),re=o$1p.subtract(K,X,Fn$1);re=o$1p.normalize(re,re);var oe=o$1p.cross(ne,re,Mr$4);oe=o$1p.normalize(oe,oe);var ae=o$1p.cross(re,Q,Mn$1);ae=o$1p.normalize(ae,ae);var se=o$1p.subtract(G,U,bn$1);se=o$1p.normalize(se,se);var le=o$1p.cross(z,se,zn);le=o$1p.normalize(le,le);var ue,ce,he,de=ee/O,fe=V/O,pe=0,_e=0,me=0;if(a){pe=o$1p.distance(H,q),ue=i$11.fromCartesian(H,qn),ce=o$1p.subtract(q,H,zr$4);var ge=(he=o$1p.normalize(ce,yn$1)).x;he.x=he.y,he.y=-ge,_e=pe/w,me=k/w}for(R=0;R<8;R++){var xe=N+4*R,ve=D+2*R,ye=xe+3,$e=R<4?1:-1,be=2===R||3===R||6===R||7===R?1:-1;o$1p.pack(te.high,y,xe),y[ye]=ie.x,o$1p.pack(te.low,$,xe),$[ye]=ie.y,o$1p.pack(ae,b,xe),b[ye]=ie.z,o$1p.pack(le,T,xe),T[ye]=de*$e,o$1p.pack(oe,C,xe);var Te=fe*be;0===Te&&be<0&&(Te=Number.POSITIVE_INFINITY),C[ye]=Te,a&&(u[xe]=ue.high.x,u[xe+1]=ue.high.y,u[xe+2]=ue.low.x,u[xe+3]=ue.low.y,h[xe]=-j.y,h[xe+1]=j.x,h[xe+2]=Y.y,h[xe+3]=-Y.x,c[xe]=ce.x,c[xe+1]=ce.y,c[xe+2]=he.x,c[xe+3]=he.y,d[ve]=_e*$e,0===(Te=me*be)&&be<0&&(Te=Number.POSITIVE_INFINITY),d[ve+1]=Te)}var Ce=kn$1,Se=An$1,we=_n$3,Ee=Ln$2,Pe=h$18.fromCartographicArray(In,Tn$3),Ae=e$1E.getMinimumMaximumHeights(Pe,f),Le=Ae.minimumTerrainHeight,Me=Ae.maximumTerrainHeight;W+=Le,W+=Me,kr$3(X,K,Le,Me,Ce,we),kr$3(U,G,Le,Me,Se,Ee);var Re=o$1p.multiplyByScalar(oe,e$2a.EPSILON5,xr$4);o$1p.add(Ce,Re,Ce),o$1p.add(Se,Re,Se),o$1p.add(we,Re,we),o$1p.add(Ee,Re,Ee),Ra$3(Ce,Se),Ra$3(we,Ee),o$1p.pack(Ce,v,B),o$1p.pack(Se,v,B+3),o$1p.pack(Ee,v,B+6),o$1p.pack(we,v,B+9),Re=o$1p.multiplyByScalar(oe,-2*e$2a.EPSILON5,xr$4),o$1p.add(Ce,Re,Ce),o$1p.add(Se,Re,Se),o$1p.add(we,Re,we),o$1p.add(Ee,Re,Ee),Ra$3(Ce,Se),Ra$3(we,Ee),o$1p.pack(Ce,v,B+12),o$1p.pack(Se,v,B+15),o$1p.pack(Ee,v,B+18),o$1p.pack(we,v,B+21),I+=2,l+=3,D+=16,B+=24,N+=32,V+=ee,k+=pe}l=0;var Oe=0;for(s=0;s<p;s++){for(R=0;R<yr$2;R++)x[l+R]=qr$1[R]+Oe;Oe+=8,l+=yr$2}var Ie=Vn;i$1c.fromVertices(i,o$1p.ZERO,3,Ie[0]),i$1c.fromVertices(n,o$1p.ZERO,3,Ie[1]);var De=i$1c.fromBoundingSpheres(Ie);De.radius+=W/(2*p);var Be={position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,normalize:!1,values:v}),startHiAndForwardOffsetX:ra$4(y),startLoAndForwardOffsetY:ra$4($),startNormalAndForwardOffsetZ:ra$4(b),endNormalAndTextureCoordinateNormalizationX:ra$4(T),rightNormalAndTextureCoordinateNormalizationY:ra$4(C)};return a&&(Be.startHiLo2D=ra$4(u),Be.offsetAndRight2D=ra$4(c),Be.startEndNormals2D=ra$4(h),Be.texcoordNormalization2D=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,normalize:!1,values:d})),new I$1p({attributes:Be,indices:x,boundingSphere:De})}function ra$4(e){return new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}function o$13(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).componentDatatype))throw new t$16("options.componentDatatype is required.");if(!e$2b(e.componentsPerAttribute))throw new t$16("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new t$16("options.componentsPerAttribute must be between 1 and 4.");if(!e$2b(e.value))throw new t$16("options.value is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=u$_(e.normalize,!1),this.value=e.value}aa$4._projectNormal=ma$3;var Q$U="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\nvoid main(void)\n{\nfloat logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_globeDepthTextureDim.xy)));\nvec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\nif (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\ngl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\nreturn;\n#else // DEBUG_SHOW_VOLUME\ndiscard;\n#endif // DEBUG_SHOW_VOLUME\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\nfloat widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\nfloat distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\nfloat distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\nif (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\ngl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\nreturn;\n#else // DEBUG_SHOW_VOLUME\ndiscard;\n#endif // DEBUG_SHOW_VOLUME\n}\nvec3 alignedPlaneNormal;\nalignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\nalignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\ndistanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\nalignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\nalignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\ndistanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n#ifdef PER_INSTANCE_COLOR\ngl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\nfloat s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\ns = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\nfloat t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\nczm_materialInput materialInput;\nmaterialInput.s = s;\nmaterialInput.st = vec2(s, t);\nmaterialInput.str = vec3(s, t, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\nczm_writeDepthClampedToFarPlane();\n}\n",W$X="varying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\nfloat rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {\nreturn (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);\n}\nvoid main(void)\n{\nvec4 eyeCoordinate = gl_FragCoord;\neyeCoordinate /= eyeCoordinate.w;\n#ifdef PER_INSTANCE_COLOR\ngl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\nfloat distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);\nfloat distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);\ndistanceFromStart = max(0.0, distanceFromStart);\ndistanceFromEnd = max(0.0, distanceFromEnd);\nfloat s = distanceFromStart / (distanceFromStart + distanceFromEnd);\ns = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;\nczm_materialInput materialInput;\nmaterialInput.s = s;\nmaterialInput.st = vec2(s, v_texcoordT);\nmaterialInput.str = vec3(s, v_texcoordT, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n}\n",Y$L="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\nattribute float batchId;\nvarying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\nvoid main()\n{\nv_batchId = batchId;\nvec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));\nvec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);\nvec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\nvec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\nvec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\nvec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\nvec4 startPlane2D;\nvec4 startPlane3D;\nstartPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\nstartPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\nstartPlane2D.w = -dot(startPlane2D.xyz, posEc2D);\nstartPlane3D.w = -dot(startPlane3D.xyz, posEc3D);\nvec4 rightPlane2D;\nvec4 rightPlane3D;\nrightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\nrightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\nrightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);\nrightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);\nposRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);\nposRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);\nposRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\nposEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\nposEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\nvec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\nvec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));\nvec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));\nvec4 endPlane2D;\nvec4 endPlane3D;\nendPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\nendPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\nendPlane2D.w = -dot(endPlane2D.xyz, posEc2D);\nendPlane3D.w = -dot(endPlane3D.xyz, posEc3D);\nv_forwardDirectionEC = normalize(endEC - startEC);\nvec2 cleanTexcoordNormalization2D;\ncleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);\ncleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));\nvec2 cleanTexcoordNormalization3D;\ncleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\ncleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;\ncleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));\nv_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#else // PER_INSTANCE_COLOR\nv_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);\nv_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);\n#endif // PER_INSTANCE_COLOR\n#ifdef WIDTH_VARYING\nfloat width = czm_batchTable_width(batchId);\nfloat halfWidth = width * 0.5;\nv_width = width;\nv_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#else\nfloat halfWidth = 0.5 * czm_batchTable_width(batchId);\nv_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#endif\nvec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow);\nfloat absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));\nfloat absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));\nvec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);\nvec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection));\nvec3 normalEC = normalize(cross(planeDirection, upOrDown));\nvec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));\ngeodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);\ngeodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\npositionEc3D.xyz += geodeticSurfaceNormal;\nnormalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\npositionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC;\nvec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);\nabsStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));\nabsEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));\nplaneDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);\nupOrDown = normalize(cross(rightPlane2D.xyz, planeDirection));\nnormalEC = normalize(cross(planeDirection, upOrDown));\ngeodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));\ngeodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);\ngeodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\npositionEc2D.xyz += geodeticSurfaceNormal;\nnormalEC *= sign(texcoordNormalization2D.x);\n#ifndef PER_INSTANCE_COLOR\nv_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);\n#endif\npositionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC;\ngl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);\n#ifdef ANGLE_VARYING\nvec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));\napproxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\nv_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n",q$$="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\n#ifndef COLUMBUS_VIEW_2D\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\n#else\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\n#endif\nattribute float batchId;\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\nvoid main()\n{\n#ifdef COLUMBUS_VIEW_2D\nvec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;\nvec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);\nvec3 ecEnd = forwardDirectionEC + ecStart;\nforwardDirectionEC = normalize(forwardDirectionEC);\nv_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\nv_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\nvec4 startPlaneEC;\nstartPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\nstartPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\nvec4 endPlaneEC;\nendPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\nendPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\nv_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);\nv_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;\n#else // COLUMBUS_VIEW_2D\nvec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\nvec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\nvec3 ecEnd = ecStart + offset;\nvec3 forwardDirectionEC = normalize(offset);\nvec4 startPlaneEC;\nstartPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\nstartPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\nvec4 endPlaneEC;\nendPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\nendPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\nv_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\nv_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\nv_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\nv_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n#endif // COLUMBUS_VIEW_2D\nv_endEcAndStartEcX.xyz = ecEnd;\nv_endEcAndStartEcX.w = ecStart.x;\nv_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#endif // PER_INSTANCE_COLOR\nvec4 positionRelativeToEye = czm_computePosition();\nvec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye;\nfloat absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\nfloat absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\nvec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\nvec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection));\nvec3 normalEC = normalize(cross(planeDirection, upOrDown));\nupOrDown = cross(forwardDirectionEC, normalEC);\nupOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;\nupOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\nupOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;\npositionEC.xyz += upOrDown;\nv_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\nfloat width = czm_batchTable_width(batchId);\n#ifdef WIDTH_VARYING\nv_width = width;\n#endif\nv_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\nv_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\nv_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\nv_endPlaneNormalEcAndBatchId.w = batchId;\nwidth = width * max(0.0, czm_metersPerPixel(positionEC));\nwidth = width / dot(normalEC, v_rightPlaneEC.xyz);\n#ifdef COLUMBUS_VIEW_2D\nnormalEC *= sign(texcoordNormalization2D.x);\n#else\nnormalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n#endif\npositionEC.xyz += width * normalEC;\ngl_Position = czm_depthClampFarPlane(czm_projection * positionEC);\n#ifdef ANGLE_VARYING\nvec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));\napproxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\nv_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n",e$1D={TERRAIN:0,CESIUM_3D_TILE:1,S3M_TILE:2,BOTH:3,NUMBER_OF_CLASSIFICATION_TYPES:4},_0x3b5200=Object.freeze(e$1D),l$_="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec4 color;\nattribute float batchId;\nvarying vec4 v_color;\nvoid main()\n{\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = czm_computePosition();\nvec4 prev = czm_computePrevPosition();\nvec4 next = czm_computeNextPosition();\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\nv_color = color;\n}\n",o$12=Z$Y+"\n"+l$_,p$W=d$1c;function e$1C(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.translucent,!0),i=e$1C.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=u$_(e.vertexShaderSource,o$12),this._fragmentShaderSource=u$_(e.fragmentShaderSource,p$W),this._renderState=a$S.getDefaultRenderState(t,false,e.renderState),this._closed=false,this._vertexFormat=i,this.name="PolylineColorAppearance"}s$Y.isInternetExplorer()||(o$12="#define CLIP_POLYLINE \n"+o$12),Object.defineProperties(e$1C.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),e$1C.VERTEX_FORMAT=n$11.POSITION_ONLY,e$1C.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,e$1C.prototype.isTranslucent=a$S.prototype.isTranslucent,e$1C.prototype.getRenderState=a$S.prototype.getRenderState;var d$18="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec2 st;\nattribute float batchId;\n#ifdef TRAIL\nuniform float trailTime_1;\nuniform float spotSize_2;\nuniform float constantSpeed_5;\nuniform float trailLength_3;\nuniform float period_6;\nuniform float startTime_7;\nattribute vec3 dist;\nvarying float v_Percent;\nvarying float v_SpotPercent;\n#endif\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying float v_clipW;\nvoid main()\n{\nfloat u = abs(expandAndWidth.x);\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = czm_computePosition();\nvec4 prev = czm_computePrevPosition();\nvec4 next = czm_computeNextPosition();\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\nv_width = width;\nv_st.s = st.s;\nv_st.t = czm_writeNonPerspective(st.t, gl_Position.w);\nv_polylineAngle = angle;\nv_alpha = u;\nv_clipW = gl_Position.w;\n#ifdef TRAIL\nfloat t = 0.0;\nif(abs(constantSpeed_5) > czm_epsilon7)\n{\nt = mod((constantSpeed_5 * trailTime_1 + dist.z) / dist.y, 1.0 + trailLength_3) - trailLength_3;\n}\nelse\n{\nt = mod((trailTime_1 - startTime_7) / period_6, 1.0 + trailLength_3) - trailLength_3;\n}\nfloat trailLen = dist.y * trailLength_3;\nv_Percent = (dist.x - t * dist.y) / trailLen;\nv_SpotPercent = spotSize_2 / dist.y;\n#endif\n}\n",i$T=Z$Y+"\n"+d$18,p$V=h$X;function r$W(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.translucent,!0),i=r$W.VERTEX_FORMAT;this.material=e$2b(e.material)?e.material:r$X.fromType(r$X.ColorType),this.translucent=t,this._vertexShaderSource=u$_(e.vertexShaderSource,i$T),this._fragmentShaderSource=u$_(e.fragmentShaderSource,p$V),this._renderState=a$S.getDefaultRenderState(t,false,e.renderState),this._closed=false,this._vertexFormat=i,this._name="PolylineMaterialAppearance"}s$Y.isInternetExplorer()||(i$T="#define CLIP_POLYLINE \n"+i$T),Object.defineProperties(r$W.prototype,{vertexShaderSource:{get:function(){var e=this._vertexShaderSource;return-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&(e="#define POLYLINE_DASH\n"+e),"PolylineDynamic"==this.material.type&&(e="#define ENABLE_DYNAMIC\n"+e),"PolylineTrail"==this.material.type&&(e="#define TRAIL\n"+e),e}},fragmentShaderSource:{get:function(){var e=this._fragmentShaderSource;return"PolylineDynamic"==this.material.type&&(e="#define ENABLE_DYNAMIC\n"+e),"PolylineTrail"==this.material.type&&(e="#define TRAIL\n"+e),e}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},name:{get:function(){return this._name+"_"+this.material._id}}}),r$W.VERTEX_FORMAT=n$11.POSITION_AND_ST,r$W.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,r$W.prototype.isTranslucent=a$S.prototype.isTranslucent,r$W.prototype.getRenderState=a$S.prototype.getRenderState;var t$N={CESIUM_3D_TILE_MASK:128,S3M_TILE:2,MODEL:6,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15,setCesium3DTileBit:function(){return{enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.REPLACE},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.REPLACE},reference:t$N.CESIUM_3D_TILE_MASK,mask:t$N.CESIUM_3D_TILE_MASK}}},u$N=Object.freeze(t$N);function g$11(e){e=u$_(e,u$_.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;var t=e.appearance;e$2b(t)||(t=new r$W),this.appearance=t,this.show=u$_(e.show,!0),this.classificationType=u$_(e.classificationType,_0x3b5200.BOTH),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this._debugShowShadowVolume=u$_(e.debugShowShadowVolume,!1),this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:u$_(e.interleave,!0),releaseGeometryInstances:u$_(e.releaseGeometryInstances,!0),allowPicking:u$_(e.allowPicking,!0),asynchronous:u$_(e.asynchronous,!0),compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=G$13(0),this._renderState3DTiles=G$13(1),this._renderStateS3M=G$13(2),this._renderStateMorph=d$1m.fromCache({cull:{enabled:!0,face:G$17.FRONT},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND,depthMask:!1}),this._polygonEntityId=u$_(e.polygonEntityId,void 0)}function Z$T(e,t,i){var n=t.context,r=e._primitive,o=r._attributeLocations,a=r._batchTable.getVertexShaderCallback()(q$$);a=y$S._appendShowToShader(r,a),a=y$S._appendDistanceDisplayConditionToShader(r,a),a=y$S._modifyShaderPosition(e,a,t.scene3DOnly);var s=r._batchTable.getVertexShaderCallback()(Y$L);s=y$S._appendShowToShader(r,s),s=y$S._appendDistanceDisplayConditionToShader(r,s),s=y$S._modifyShaderPosition(e,s,t.scene3DOnly);var l=r._batchTable.getVertexShaderCallback()(Q$U),u=["GLOBE_MINIMUM_ALTITUDE "+t.mapProjection.ellipsoid.minimumRadius.toFixed(1)],c="",h="";e$2b(i.material)?(-1!==(h=e$2b(i.material)?i.material.shaderSource:"").search(/varying\s+float\s+v_polylineAngle;/g)&&u.push("ANGLE_VARYING"),-1!==h.search(/varying\s+float\s+v_width;/g)&&u.push("WIDTH_VARYING")):c="PER_INSTANCE_COLOR",u.push(c);var d=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",c]:[c],f=new s$U({defines:u,sources:[a],name:"PolylineShadowVolumeVS"}),p=new s$U({defines:d,sources:[h,l],name:"PolylineShadowVolumeFS"});e._sp=r$13.replaceCache({context:n,shaderProgram:r._sp,vertexShaderSource:f,fragmentShaderSource:p,attributeLocations:o});var _=n.shaderCache.getDerivedShaderProgram(e._sp,"2dColor");if(!e$2b(_)){var m=new s$U({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[a]});_=n.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:n,shaderProgram:e._sp2D,vertexShaderSource:m,fragmentShaderSource:p,attributeLocations:o})}e._sp2D=_;var g=n.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor");if(!e$2b(g)){var x=new s$U({defines:u.concat(["MAX_TERRAIN_HEIGHT "+e$1E._defaultMaxTerrainHeight.toFixed(1)]),sources:[s]}),v=new s$U({defines:d,sources:[h,l=r._batchTable.getVertexShaderCallback()(W$X)]});g=n.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:n,shaderProgram:e._spMorph,vertexShaderSource:x,fragmentShaderSource:v,attributeLocations:o})}e._spMorph=g}function G$13(e){return d$1m.fromCache({cull:{enabled:!0},blending:Ee$r.ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e>0,frontFunction:m$X.EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.KEEP},backFunction:m$X.EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.KEEP},reference:2===e?u$N.S3M_TILE:u$N.CESIUM_3D_TILE_MASK,mask:u$N.CLASSIFICATION_MASK}})}function $$W(e,t,i,n,r,o){var a=e._primitive,s=a._va.length;r.length=s,o.length=s;for(var l=t instanceof e$1C?{}:i._uniforms,u=a._batchTable.getUniformMapCallback()(l),c=0;c<s;c++){var h=a._va[c],d=r[c];e$2b(d)||(d=r[c]=new i$_({owner:e,primitiveType:a._primitiveType})),d.vertexArray=h,d.renderState=e._renderState,d.shaderProgram=e._sp,d.uniformMap=u,d.pass=Le$s.TERRAIN_CLASSIFICATION,d.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";var f=i$_.shallowClone(d,d.derivedCommands.tileset);f.renderState=e._renderState3DTiles,f.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=f;var p=i$_.shallowClone(d,d.derivedCommands.S3M);p.renderState=e._renderStateS3M,p.pass=Le$s.ClampObject,d.derivedCommands.S3M=p;var _=i$_.shallowClone(d,d.derivedCommands.color2D);_.shaderProgram=e._sp2D,d.derivedCommands.color2D=_;var m=i$_.shallowClone(f,f.derivedCommands.color2D);m.shaderProgram=e._sp2D,f.derivedCommands.color2D=m;var g=i$_.shallowClone(p,p.derivedCommands.color2D);g.shaderProgram=e._sp2D,p.derivedCommands.color2D=g;var x=i$_.shallowClone(d,d.derivedCommands.colorMorph);x.renderState=e._renderStateMorph,x.shaderProgram=e._spMorph,x.pickId="czm_batchTable_pickColor(v_batchId)",d.derivedCommands.colorMorph=x}}function L$10(e,t,i,n,r,o,a){i.mode===C$13.MORPHING?t=t.derivedCommands.colorMorph:i.mode!==C$13.SCENE3D&&(t=t.derivedCommands.color2D),t&&(t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t))}function ee$w(e,t,i,n,r,o,a){var s,l=e._primitive;y$S._updateBoundingVolumes(l,t,r),t.mode===C$13.SCENE3D?s=l._boundingSphereWC:t.mode===C$13.COLUMBUS_VIEW?s=l._boundingSphereCV:t.mode===C$13.SCENE2D&&e$2b(l._boundingSphere2D)?s=l._boundingSphere2D:e$2b(l._boundingSphereMorph)&&(s=l._boundingSphereMorph);var u=t.mode===C$13.MORPHING,c=e.classificationType,h=c===_0x3b5200.TERRAIN,d=c===_0x3b5200.S3M_TILE,f=c===_0x3b5200.CESIUM_3D_TILE&&!u;c===_0x3b5200.BOTH&&(h=!0,d=!0,f=!0);var p=t.passes;if(p.render||p.pick&&l.allowPicking)for(var _=i.length,m=0;m<_;++m){var g=s[m];h&&L$10(e,i[m],t,r,o,g,a),f&&L$10(e,i[m].derivedCommands.tileset,t,r,o,g,a),d&&L$10(e,i[m].derivedCommands.S3M,t,r,o,g,a)}}function n$V(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new o$1h,this.setCallback(e,t)}function L$$(e){return Array.isArray(e)&&(e=new e$1J(e)),new e$1I(e)}function l$Z(e){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=e$1U.BLACK,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this._definitionChanged=new o$1h,this._fromDataSource=!1,this.groundBottomAltitude=void 0,this.groundExtrudedHeight=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function E$$(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}Object.defineProperties(g$11.prototype,{interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}}),g$11.initializeTerrainHeights=function(){return e$1E.initialize()},g$11.prototype.update=function(e){if(e$2b(this._primitive)||e$2b(this.geometryInstances)){if(!e$1E.initialized){if(!this.asynchronous)throw new t$16("For synchronous GroundPolylinePrimitives, you must call GroundPolylinePrimitives.initializeTerrainHeights() and wait for the returned promise to resolve.");return void g$11.initializeTerrainHeights()}var t,i=this,n=this._primitiveOptions;if(!e$2b(this._primitive)){var r,o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],a=o.length,s=new Array(a);for(t=0;t<a;++t)if(!e$2b(r=o[t].attributes)||!e$2b(r.color)){this._hasPerInstanceColors=!1;break}for(t=0;t<a;++t){var l=o[t];r={};var u=l.attributes;for(var c in u)u.hasOwnProperty(c)&&(r[c]=u[c]);e$2b(r.width)||(r.width=new o$13({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,value:[l.geometry.width]})),l.geometry._scene3DOnly=e.scene3DOnly,aa$4.setProjectionAndEllipsoid(l.geometry,e.mapProjection),s[t]=new d$1o({geometry:l.geometry,attributes:r,id:l.id,pickPrimitive:i})}n.geometryInstances=s,n.appearance=this.appearance,n._createShaderProgramFunction=function(e,t,n){Z$T(i,t,n)},n._createCommandsFunction=function(e,t,n,r,o,a,s){$$W(i,t,n,r,a,s)},n._updateAndQueueCommandsFunction=function(e,t,n,r,o,a,s,l){ee$w(i,t,n,r,o,a,s)},this._primitive=new y$S(n),this._primitive.readyPromise.then((function(e){i._ready=!0,i.releaseGeometryInstances&&(i.geometryInstances=void 0);var t=e._error;e$2b(t)?i._readyPromise.reject(t):i._readyPromise.resolve(i)}))}if(this.appearance instanceof e$1C&&!this._hasPerInstanceColors)throw new t$16("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},g$11.prototype.getGeometryInstanceAttributes=function(e){if(!e$2b(this._primitive))throw new t$16("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},g$11.isSupported=function(e){return e.frameState.context.depthTexture},g$11.prototype.isDestroyed=function(){return!1},g$11.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,i$10(this)},Object.defineProperties(n$V.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}}),n$V.prototype.getValue=function(e,t){return this._callback(e,t)},n$V.prototype.setCallback=function(e,t){if(!e$2b(e))throw new t$16("callback is required.");if(!e$2b(t))throw new t$16("isConstant is required.");var i=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,i&&this._definitionChanged.raiseEvent(this)},n$V.prototype.equals=function(e){return this===e||e instanceof n$V&&this._callback===e._callback&&this._isConstant===e._isConstant},Object.defineProperties(l$Z.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),material:c$_("material"),hierarchy:C$$("hierarchy",void 0,L$$),height:C$$("height"),heightReference:C$$("heightReference"),extrudedHeight:C$$("extrudedHeight"),extrudedHeightReference:C$$("extrudedHeightReference"),granularity:C$$("granularity"),stRotation:C$$("stRotation"),fill:C$$("fill"),outline:C$$("outline"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth"),perPositionHeight:C$$("perPositionHeight"),closeTop:C$$("closeTop"),closeBottom:C$$("closeBottom"),shadows:C$$("shadows"),distanceDisplayCondition:C$$("distanceDisplayCondition"),classificationType:C$$("classificationType"),arcType:C$$("arcType"),zIndex:C$$("zIndex"),groundBottomAltitude:C$$("groundBottomAltitude"),groundExtrudedHeight:C$$("groundExtrudedHeight")}),l$Z.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.material=this.material,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.granularity=this.granularity,e.stRotation=this.stRotation,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.arcType=this.arcType,e.zIndex=this.zIndex,e):new l$Z(this)},l$Z.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.material=u$_(this.material,e.material),this.hierarchy=u$_(this.hierarchy,e.hierarchy),this.height=u$_(this.height,e.height),this.heightReference=u$_(this.heightReference,e.heightReference),this.extrudedHeight=u$_(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=u$_(this.extrudedHeightReference,e.extrudedHeightReference),this.granularity=u$_(this.granularity,e.granularity),this.stRotation=u$_(this.stRotation,e.stRotation),this.fill=u$_(this.fill,e.fill),this.outline=u$_(this.outline,e.outline),this.outlineColor=u$_(e.outlineColor,this.outlineColor),this.outlineWidth=u$_(this.outlineWidth,e.outlineWidth),this.perPositionHeight=u$_(this.perPositionHeight,e.perPositionHeight),this.closeTop=u$_(this.closeTop,e.closeTop),this.closeBottom=u$_(this.closeBottom,e.closeBottom),this.shadows=u$_(this.shadows,e.shadows),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$_(this.classificationType,e.classificationType),this.arcType=u$_(this.arcType,e.arcType),this.zIndex=u$_(this.zIndex,e.zIndex),this.groundBottomAltitude=u$_(this.groundBottomAltitude,e.groundBottomAltitude),this.groundExtrudedHeight=u$_(this.groundExtrudedHeight,e.groundExtrudedHeight)},l$Z.processWideOutline=function(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n._polygon;if(r instanceof l$Z){if(n.show&&e$2b(r._outline)&&r._outline._value&&r._outlineWidth>1&&!e$2b(r.outlines)){var o,a={width:r._outlineWidth._value,material:void 0,positions:[],loop:!0,distanceDisplayCondition:new r$Y(0,5e4)};if(r.definitionChanged.addEventListener((function(e,t,i,n){e$2b(r.outlines)&&r.outlines.removeAll(),r.outlines=void 0})),r.outlines=e.primitives.add(new k$T({polygonEntityId:n.id})),o=e$2b(r._hierarchy._value)?Array.isArray(r._hierarchy._value)?r._hierarchy._value:r._hierarchy._value.positions:r._hierarchy instanceof n$V?r._hierarchy.getValue(e.frameState.time).positions:r._hierarchy.polygon._positions._value,!r.perPositionHeight||r._height>0)for(var s=0;s<o.length;s++){(h=a$18.fromCartesian(o[s])).height=e$2b(r._height)?r._height._value:0,o[s]=a$18.toCartesian(h)}if(Math.abs(r._extrudedHeight)>0){var l=[];for(s=0;s<o.length;s++){(h=a$18.fromCartesian(o[s])).height=r._extrudedHeight._value;var u=a$18.toCartesian(h);l.push(u),r.outlines.add(p$19({positions:[o[s],u],loop:!1,material:r$X.fromType(r$X.ColorType,{color:r._outlineColor._value})},a))}r.outlines.add(p$19({positions:l,material:r$X.fromType(r$X.ColorType,{color:r._outlineColor._value})},a))}if(r.outlines.add(p$19({positions:o,material:r$X.fromType(r$X.ColorType,{color:r._outlineColor._value})},a)),e$2b(r._hierarchy._value&&r._hierarchy._value.holes))for(var c=0;c<r._hierarchy._value.holes.length;c++){if(o=r._hierarchy._value.holes[c].positions,!r.perPositionHeight||r._height>0)for(s=0;s<o.length;s++){(h=a$18.fromCartesian(o[s])).height=e$2b(r._height)?r._height._value:0,o[s]=a$18.toCartesian(h)}if(Math.abs(r._extrudedHeight)>0){for(l=[],s=0;s<o.length;s++){var h;(h=a$18.fromCartesian(o[s])).height=r._extrudedHeight._value;u=a$18.toCartesian(h);l.push(u),r.outlines.add(p$19({positions:[o[s],u],loop:!1,material:r$X.fromType(r$X.ColorType,{color:r._outlineColor._value})},a))}r.outlines.add(p$19({positions:l,material:r$X.fromType(r$X.ColorType,{color:r._outlineColor._value})},a))}r.outlines.add(p$19({positions:o,material:r$X.fromType(r$X.ColorType,{color:r._outlineColor._value})},a))}}if(e$2b(r.outlines))for(let e=0;e<r.outlines._polylines.length;e++)r.outlines._polylines[e].show=n.show,e$2b(n.geometry)&&(e$2b(n.geometry.outlineWidth)&&!isNaN(n.geometry.outlineWidth)&&(r.outlines._polylines[e].width=n.geometry.outlineWidth),e$2b(n.geometry.outlineColor)&&n.geometry.outlineColor instanceof e$1U&&(r.outlines._polylines[e].material.uniforms.color=n.geometry.outlineColor))}}},l$Z.processClampWideOutline=function(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n._polygon;if(!(r instanceof l$Z))return;var o=e.frameState.time;if(n.show&&e$2b(r._outline)&&r._outline.getValue(o)&&e$2b(r._outlineWidth)&&r._outlineWidth.getValue(o)>1&&!e$2b(r.clampOutlines)){var a;e$2b(r.outlineColor)||(r.outlineColor=e$1U.BLACK),r.definitionChanged.addEventListener((function(t,i,n,o){e$2b(r.clampOutlines)&&e.primitives.remove(r.clampOutlines),r.clampOutlines=void 0})),a=e$2b(r._hierarchy._value)?Array.isArray(r._hierarchy._value)?r._hierarchy._value:r._hierarchy._value.positions:r._hierarchy.polygon._positions._value;var s=new E$$;s.positions=a,o$1p.equals(a[0],a[a.length-1])||(s.loop=!0),s.width=r._outlineWidth.getValue(o)||1;var l={show:new e$1F(!0),color:o$16.fromColor(r._outlineColor.getValue(o)),width:new o$13({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,value:[s.width]})},u=new d$1o({id:n,geometry:new aa$4(s),attributes:l});r.clampOutlines=new g$11({show:!0,asynchronous:!0,geometryInstances:u,classificationType:r._classificationType?r._classificationType._value:_0x3b5200.BOTH,appearance:new e$1C,polygonEntityId:n.id}),e.primitives.add(r.clampOutlines)}e$2b(r.clampOutlines)&&(r.clampOutlines.show=!r.show||r.show.getValue(o))}};var _0x3ad629=(_0x354ce2=!0,function(e,t){var i=_0x354ce2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x354ce2=!1,i}),_0x391f0a=_0x3ad629(void 0,(function(){return _0x391f0a.toString().search("(((.+)+)+)+$").toString().constructor(_0x391f0a).search("(((.+)+)+)+$")})),_0x354ce2;function _0x165ffe(){}function _0x3b88b2(e){--e;for(var t=1;32>t;t<<=1)e|=e>>t;return e+1}_0x391f0a(),_0x165ffe.computeNeighbors=function(e,t){for(var i=e.length/3,n=new Uint32Array(t+1),r=new Uint32Array(t+1),o=function(e,t){e<t?n[e+1]++:r[t+1]++},a=0;a<i;a++){var s=e[3*a],l=e[3*a+1],u=e[3*a+2];o(s,l),o(l,u),o(u,s)}for(a=l=s=0;a<t;a++)u=n[a+1],o=r[a+1],n[a+1]=s,r[a+1]=l,s+=u,l+=o;var c=new Uint32Array(6*i),h=n[t];for(o=function(e,t,i){if(e<t){var o=n[e+1]++;c[2*o]=t,c[2*o+1]=i}else o=r[t+1]++,c[2*h+2*o]=e,c[2*h+2*o+1]=i},a=0;a<i;a++)s=e[3*a],l=e[3*a+1],u=e[3*a+2],o(s,l,a),o(l,u,a),o(u,s,a);for(s=function(e,t){var i=2*e;for(e=t-e,t=1;t<e;t++){for(var n=c[i+2*t],r=c[i+2*t+1],o=t-1;0<=o&&c[i+2*o]>n;o--)c[i+2*o+2]=c[i+2*o],c[i+2*o+3]=c[i+2*o+1];c[i+2*o+2]=n,c[i+2*o+3]=r}},a=0;a<t;a++)s(n[a],n[a+1]),s(h+r[a],h+r[a+1]);var d=new Int32Array(3*i),f=function(t,i){return t===e[3*i]?0:t===e[3*i+1]?1:t===e[3*i+2]?2:-1};for(i=function(e,t){e=f(e,t),d[3*t+e]=-1},s=function(e,t,i,n){e=f(e,t),d[3*t+e]=n,i=f(i,n),d[3*n+i]=t},a=0;a<t;a++){l=n[a],u=n[a+1],o=r[a];for(var p=r[a+1];l<u&&o<p;){var _=c[2*l],m=c[2*h+2*o];_===m?(s(a,c[2*l+1],m,c[2*h+2*o+1]),l++,o++):_<m?(i(a,c[2*l+1]),l++):(i(m,c[2*h+2*o+1]),o++)}for(;l<u;)i(a,c[2*l+1]),l++;for(;o<p;)i(m=c[2*h+2*o],c[2*h+2*o+1]),o++}return d};var _0xd3af1f=null;function _0x461802(){}function _0x55b6fd(e){return Math.acos(1<e?1:-1>e?-1:e)}function _0x19a1b8(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),e*Math.PI/180}_0x165ffe.deduplicate=function(e,t,i,n,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=e.byteLength/(4*t)),e=new Uint32Array(e,n,r*t),n=new Uint32Array(r);var o=Math.floor(1.1*r)+1;(null==_0xd3af1f||_0xd3af1f.length<2*o)&&(_0xd3af1f=new Uint32Array(_0x3b88b2(2*o)));for(var a=0;a<2*o;a++)_0xd3af1f[a]=0;var s=0,l=0!==i?Math.ceil(7.84*1.96/(i*i)*i*(1-i)):r;for(a=0;a<r;a++){if(a===l){if((c=1-s/a)+1.96*Math.sqrt(c*(1-c)/a)<i)return null;l*=2}for(var u,c=a*t,h=u=0;h<t;h++)u=(u=e[c+h]+u|0)+(u<<11)+(u>>>2)|0;h=(u>>>=0)%o;for(var d=s;0!==_0xd3af1f[2*h+1];){if(_0xd3af1f[2*h]===u){var f=_0xd3af1f[2*h+1]-1,p=f*t;e:{for(var _=0;_<t;_++)if(e[c+_]!==e[p+_]){p=!1;break e}p=!0}if(p){d=n[f];break}}++h>=o&&(h-=o)}d===s&&(_0xd3af1f[2*h]=u,_0xd3af1f[2*h+1]=a+1,s++),n[a]=d}if(0!==i&&1-s/r<i)return null;for(i=new Uint32Array(t*s),a=s=0;a<r;a++)if(n[a]===s){for(o=e,l=a*t,c=i,u=s*t,h=t,d=0;d<h;d++)c[u+d]=o[l+d];s++}return{buffer:i.buffer,indices:n,uniqueCount:s}};var _0x34d2a1=4,_0x3901c9=35,_0x1af65a=_0x19a1b8(_0x34d2a1),_0x4ccc89=_0x19a1b8(_0x3901c9),_0xe4b898=Math.cos(_0x4ccc89),_0x335471=Math.cos(_0x1af65a);function _0x8ddb1(e,t,i){var n=i.x-t.x,r=i.y-t.y;return(i=n*n+r*r+(t=i.z-t.z)*t)?(i=1/Math.sqrt(i),e.x=n*i,e.y=r*i,e.z=t*i,e):(e.x=0,e.y=0,e.z=0,e)}var _0x752e20={position0:new o$1p,position1:new o$1p,faceNormal0:new o$1p,faceNormal1:new o$1p,cosAngle:0},_0x8fb99a=new o$1p,_0x61abe9=new o$1p;function _0x420cc3(e,t){var i=_0x55b6fd(e.cosAngle);return _0x8ddb1(_0x61abe9,e.position1,e.position0),o$1p.cross(e.faceNormal0,e.faceNormal1,_0x8fb99a),i*(0<o$1p.dot(_0x8fb99a,_0x61abe9)?-1:1)>t}function _0x44eb8d(e){var t=e.faces.length/3,i=e.faces,n=e.neighbors,r=0,o=0;for(o=0;o<t;o++){var a=n[3*o+0],s=n[3*o+1],l=n[3*o+2],u=i[3*o+0],c=i[3*o+1],h=i[3*o+2];r+=-1===a||u<c?1:0,r+=-1===s||c<h?1:0,r+=-1===l||h<u?1:0}var d=new Int32Array(4*r),f=0;for(o=0;o<t;o++){a=n[3*o+0],s=n[3*o+1],l=n[3*o+2],u=i[3*o+0],c=i[3*o+1],h=i[3*o+2];(-1===a||u<c)&&(d[f++]=u,d[f++]=c,d[f++]=o,d[f++]=a),(-1===s||c<h)&&(d[f++]=c,d[f++]=h,d[f++]=o,d[f++]=s),(-1===l||h<u)&&(d[f++]=h,d[f++]=u,d[f++]=o,d[f++]=l)}return d}var _0x5f1f6a=new o$1p,_0x592460=new o$1p,_0x113a75=new o$1p;function _0x16d5fa(e){var t=e.x*e.x+e.y*e.y+e.z*e.z;t>0&&(t=1/Math.sqrt(t),e.x*=t,e.y*=t,e.z*=t)}function _0x2f66bb(e){for(var t=e.faces.length/3,i=e.vertices,n=e.dim,r=e.faces,o=new Float32Array(3*t),a=0;a<t;a++){var s=r[3*a+0],l=r[3*a+1],u=r[3*a+2];_0x5f1f6a.x=i[n*s],_0x5f1f6a.y=i[n*s+1],_0x5f1f6a.z=i[n*s+2],_0x592460.x=i[n*l],_0x592460.y=i[n*l+1],_0x592460.z=i[n*l+2],_0x113a75.x=i[n*u],_0x113a75.y=i[n*u+1],_0x113a75.z=i[n*u+2],o$1p.subtract(_0x592460,_0x5f1f6a,_0x592460),o$1p.subtract(_0x113a75,_0x5f1f6a,_0x113a75),o$1p.cross(_0x592460,_0x113a75,_0x5f1f6a),_0x16d5fa(_0x5f1f6a),o[3*a+0]=_0x5f1f6a.x,o[3*a+1]=_0x5f1f6a.y,o[3*a+2]=_0x5f1f6a.z}return o}function _0x557fba(e,t){0===t&&(t=e,e=0);for(var i=Array(t-e),n=e;n<t;n++)i[n-e]=n;return i}_0x461802.extractEdges=function(e){var t=e.vertices,i=e.dim,n=_0x752e20,r=n.position0,o=n.position1,a=n.faceNormal0,s=n.faceNormal1,l=_0x2f66bb(e),u=_0x44eb8d(e),c=u.length/4,h=new Float32Array(9*c),d=0,f=new Float32Array(12*c),p=0,_=0,m=0,g=_0x557fba(0,c),x=new Float32Array(c);x.forEach((function(e,n,a){var s=u[4*n+0],l=u[4*n+1];r.x=t[s*i],r.y=t[s*i+1],r.z=t[s*i+2],o.x=t[l*i],o.y=t[l*i+1],o.z=t[l*i+2],a[n]=o$1p.distance(r,o)})),g.sort((function(e,t){return x[t]-x[e]}));for(var v=[],y=[],$=0;$<c;$++){var b=g[$],T=x[b],C=u[4*b+0],S=u[4*b+1],w=u[4*b+2],E=u[4*b+3],P=-1===E;if(r.x=t[C*i],r.y=t[C*i+1],r.z=t[C*i+2],o.x=t[S*i],o.y=t[S*i+1],o.z=t[S*i+2],P)a.x=l[3*w],a.y=l[3*w+1],a.z=l[3*w+2],s.x=a.x,s.y=a.y,s.z=a.z,n.cosAngle=o$1p.dot(a,s);else if(a.x=l[3*w],a.y=l[3*w+1],a.z=l[3*w+2],s.x=l[3*E],s.y=l[3*E+1],s.z=l[3*E+2],n.cosAngle=o$1p.dot(a,s),n.cosAngle>_0x335471)continue;_+=T,m++,P||n.cosAngle<_0xe4b898?(h[d++]=n.position0.x,h[d++]=n.position0.y,h[d++]=n.position0.z,h[d++]=n.position1.x,h[d++]=n.position1.y,h[d++]=n.position1.z,h[d++]=n.faceNormal0.x,h[d++]=n.faceNormal0.y,h[d++]=n.faceNormal0.z,v.push(T)):_0x420cc3(n,_0x1af65a)&&(f[p++]=n.position0.x,f[p++]=n.position0.y,f[p++]=n.position0.z,f[p++]=n.position1.x,f[p++]=n.position1.y,f[p++]=n.position1.z,f[p++]=n.faceNormal0.x,f[p++]=n.faceNormal0.y,f[p++]=n.faceNormal0.z,f[p++]=n.faceNormal1.x,f[p++]=n.faceNormal1.y,f[p++]=n.faceNormal1.z,y.push(T))}h=h.slice(0,d),f=f.slice(0,p);var A=_/m,L=v.length,M=y.length;return{regular:{instancesData:h,instanceCount:L,edgeLength:L*A},silhouette:{instancesData:f,instanceCount:M,edgeLength:M*A},averageEdgeLength:A}};var _0x2a99a0=(_0x3ac990=!0,function(e,t){var i=_0x3ac990?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ac990=!1,i}),_0x5683cd=_0x2a99a0(void 0,(function(){return _0x5683cd.toString().search("(((.+)+)+)+$").toString().constructor(_0x5683cd).search("(((.+)+)+)+$")})),_0x3ac990;_0x5683cd();var _0x3b8190={SVC_Vertex:1,SVC_Normal:2,SVC_VertexColor:4,SVC_SecondColor:8,SVC_TexutreCoord:16,SVC_TexutreCoordIsW:32},_0x35ed09=Object.freeze(_0x3b8190),_0x3e19be=(_0x1d454f=!0,function(e,t){var i=_0x1d454f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d454f=!1,i}),_0x476dcb=_0x3e19be(void 0,(function(){return _0x476dcb.toString().search("(((.+)+)+)+$").toString().constructor(_0x476dcb).search("(((.+)+)+)+$")})),_0x1d454f;function _0x30c9ea(e){}function _0x9ebde(e){if(e$2b(e.cachedSidenessVertexBuffer))return e.cachedSidenessVertexBuffer;var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,e.cachedSidenessVertexBuffer=t$Y.createVertexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW}),e.cachedSidenessVertexBuffer.vertexArrayDestroyable=!1,e.cachedSidenessVertexBuffer}function _0x2e38e3(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}function _0x114bcb(e,t){for(var i,n,r,o=t.componentsPerAttribute,a=e.vertCompressConstant,s=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),l=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),u=new Float32Array(3*e.verticesCount),c=0;c<e.verticesCount;c++)i=l[o*c]*a+s.x,n=l[o*c+1]*a+s.y,r=l[o*c+2]*a+s.z,u[3*c]=i,u[3*c+1]=n,u[3*c+2]=r;return u}_0x476dcb(),_0x30c9ea.RegularInstanceStride=12,_0x30c9ea.SilhouetteInstanceStride=15,_0x30c9ea.createEdgeData=function(e,t,i){if(0==t.length)return null;var n,r=t[0];n=0===r.indexType?new Uint16Array(r.indicesTypedArray.buffer,r.indicesTypedArray.byteOffset,r.indicesTypedArray.byteLength/2):new Uint32Array(r.indicesTypedArray.buffer,r.indicesTypedArray.byteOffset,r.indicesTypedArray.byteLength/4);var o=_0x30c9ea.extractEdgeInformation(e,!1,n),a=_0x461802.extractEdges(o);return e$2b(i)&&(e$2b(a.regular.instancesData)&&i.push(a.regular.instancesData.buffer),e$2b(a.silhouette.instancesData)&&i.push(a.silhouette.instancesData.buffer)),a},_0x30c9ea.createIndexBuffer=function(e){return e$2b(e.cachedSidenessIndexBuffer)||(e.cachedSidenessIndexBuffer=t$Y.createIndexBuffer({context:e,typedArray:_0x2e38e3(),usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),e.cachedSidenessIndexBuffer.vertexArrayDestroyable=!1),e.cachedSidenessIndexBuffer},_0x30c9ea.createRegularEdgeAttributes=function(e,t,i){if(e$2b(t.instancesData)&&0!=t.instancesData.length){var n={},r=[];t.attributeLocations=n,t.attributes=r;var o=t$Y.createVertexBuffer({context:e,typedArray:t.instancesData,usage:A$19.STATIC_DRAW});t.instancesData=null;var a=S$12.getSizeInBytes(S$12.FLOAT),s=_0x9ebde(e),l=0;n.aSideness=l++,r.push({name:"aSideness",index:n.aSideness,vertexBuffer:s,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:2*S$12.getSizeInBytes(S$12.FLOAT),normalize:!1});var u=i||_0x30c9ea.RegularInstanceStride,c=0;n.aPosition0=l++,r.push({name:"aPosition0",index:n.aPosition0,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=3,n.aPosition1=l++,r.push({name:"aPosition1",index:n.aPosition1,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=3,n.aNormal=l++,r.push({name:"aNormal",index:n.aNormal,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!0,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=3,n.batchId=l++,r.push({name:"batchId",index:n.batchId,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$12.FLOAT,normalize:!0,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=1,n.aVariantStroke=l++,r.push({name:"aVariantStroke",index:n.aVariantStroke,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$12.FLOAT,normalize:!0,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=1,n.aVariantExtension=l++,r.push({name:"aVariantExtension",index:n.aVariantExtension,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$12.FLOAT,normalize:!0,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=1}},_0x30c9ea.createSilhouetteEdgeAttributes=function(e,t){if(e$2b(t.instancesData)&&0!=t.instancesData.length){var i={},n=[];t.attributeLocations=i,t.attributes=n;var r=t$Y.createVertexBuffer({context:e,typedArray:t.instancesData,usage:A$19.STATIC_DRAW});t.instancesData=null;var o=S$12.getSizeInBytes(S$12.FLOAT),a=0;i.aSideness=a++,n.push({name:"aSideness",index:i.aSideness,vertexBuffer:_0x9ebde(e),componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:2*o,normalize:!1});var s=_0x30c9ea.SilhouetteInstanceStride,l=0;i.aPosition0=a++,n.push({name:"aPosition0",index:i.aPosition0,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.aPosition1=a++,n.push({name:"aPosition1",index:i.aPosition1,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.aNormalA=a++,n.push({name:"aNormalA",index:i.aNormalA,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.aNormalB=a++,n.push({name:"aNormalB",index:i.aNormalB,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.batchId=a++,n.push({name:"batchId",index:i.batchId,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:S$12.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=1,i.aVariantStroke=a++,n.push({name:"aVariantStroke",index:i.aVariantStroke,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:S$12.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=1,i.aVariantExtension=a++,n.push({name:"aVariantExtension",index:i.aVariantExtension,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:S$12.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=1}},_0x30c9ea.extractEdgeInformation=function(e,t,i){var n,r=e.attrLocation.aPosition,o=e.vertexAttributes[r],a=e$2b(e.nCompressOptions)&&(e.nCompressOptions&_0x35ed09.SVC_Vertex)===_0x35ed09.SVC_Vertex,s=o.componentsPerAttribute;a?(s=3,n=_0x114bcb(e,o)):n=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);var l=n.length/s;if(t&&i)return{faces:i,neighbors:_0x165ffe.computeNeighbors(i,l),vertices:n,dim:s};var u,c=o.typedArray.buffer;u=a?n.buffer:c.slice(o.typedArray.byteOffset,o.typedArray.byteOffset+o.typedArray.byteLength);var h=_0x165ffe.deduplicate(u,s),d=_0x30c9ea.selectIndexData(h.indices,i);return{faces:d,neighbors:_0x165ffe.computeNeighbors(d,h.uniqueCount),vertices:new Float32Array(h.buffer),dim:s}},_0x30c9ea.selectIndexData=function(e,t){if(t){t=t.slice();for(var i=0;i<t.length;i++)t[i]=e[t[i]];return t}return e};var _0x423893=new o$1p,_0x136fe5=new o$1p,_0x1bd8a7=new o$1p,_0x267ffc=new o$1p,_0x430fcf=new o$1p,_0x3ca210=new o$1p,_0x579bdc=new o$1p,_0x2f448b=new o$1p;function _0x34875b(e,t){function i(e,t,i){var n=48217*e%2147483647,r=t+n/2147483647*(i-=t);return{seed:n,result:Math.round(r)}}var n=function(e,t){var i=new Float32Array(6),n=new Uint32Array(i.buffer),r=new Uint32Array(1);i[0]=e.x,i[1]=e.y,i[2]=e.z,i[3]=t.x,i[4]=t.y,i[5]=t.z,r[0]=5381;for(var o=0;o<n.length;o++)r[0]=31*r[0]+n[o];return r[0]}(e,t);e$2b(n)||(n=2147483647*Math.random());var r=i(n,0,255);n=r.seed,r.result,n=(r=i(n,0,5)).seed;var o,a=r.result;n=(r={seed:o=48217*n%2147483647,result:o/2147483646}).seed;var s=r.result;return s=-(1-Math.min(s/.7,1))+Math.max(0,s-.7)/(1-.7),{variantStroke:a,variantExtension:s=255*(Math.abs(s)**1.2*(0>s?-1:1)*.5+.5)}}_0x30c9ea.createEdgeDataByIndices=function(e,t){var i,n,r=e.attrLocation.aPosition,o=e.vertexAttributes[r],a=e$2b(e.nCompressOptions)&&(e.nCompressOptions&_0x35ed09.SVC_Vertex)===_0x35ed09.SVC_Vertex,s=o.componentsPerAttribute;a?(s=3,i=_0x114bcb(e,o)):i=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var l=[],u=[],c=(n=0===t.indexType?new Uint16Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/2):new Uint32Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/4)).length,h=0,d=0,f=4*Math.floor(c/4);d<f;d+=4){var p=n[d],_=n[d+1],m=n[d+2],g=n[d+3];if(_0x423893.x=i[s*p],_0x423893.y=i[s*p+1],_0x423893.z=i[s*p+2],_0x136fe5.x=i[s*_],_0x136fe5.y=i[s*_+1],_0x136fe5.z=i[s*_+2],_0x1bd8a7.x=i[s*m],_0x1bd8a7.y=i[s*m+1],_0x1bd8a7.z=i[s*m+2],_0x267ffc.x=i[s*g],_0x267ffc.y=i[s*g+1],_0x267ffc.z=i[s*g+2],!(o$1p.equals(_0x136fe5,_0x1bd8a7)||o$1p.equals(_0x136fe5,_0x267ffc)||o$1p.equals(_0x136fe5,_0x423893)||o$1p.equals(_0x1bd8a7,_0x423893)||o$1p.equals(_0x267ffc,_0x423893))){if(m===g){if(o$1p.subtract(_0x136fe5,_0x423893,_0x430fcf),o$1p.subtract(_0x1bd8a7,_0x423893,_0x3ca210),o$1p.cross(_0x430fcf,_0x3ca210,_0x430fcf),o$1p.equals(_0x430fcf,o$1p.ZERO))continue;o$1p.normalize(_0x430fcf,_0x430fcf),l.push(_0x423893.x),l.push(_0x423893.y),l.push(_0x423893.z),l.push(_0x136fe5.x),l.push(_0x136fe5.y),l.push(_0x136fe5.z),l.push(_0x430fcf.x),l.push(_0x430fcf.y),l.push(_0x430fcf.z),l.push(p);var x=(y=_0x34875b(_0x423893,_0x136fe5)).variantStroke,v=y.variantExtension;l.push(x),l.push(v)}else{if(o$1p.subtract(_0x136fe5,_0x423893,_0x430fcf),o$1p.subtract(_0x1bd8a7,_0x423893,_0x3ca210),o$1p.cross(_0x430fcf,_0x3ca210,_0x430fcf),o$1p.equals(_0x430fcf,o$1p.ZERO)||(o$1p.normalize(_0x430fcf,_0x430fcf),o$1p.subtract(_0x136fe5,_0x423893,_0x579bdc),o$1p.subtract(_0x267ffc,_0x423893,_0x2f448b),o$1p.cross(_0x2f448b,_0x579bdc,_0x579bdc),o$1p.equals(_0x579bdc,o$1p.ZERO)))continue;o$1p.normalize(_0x579bdc,_0x579bdc),u.push(_0x423893.x),u.push(_0x423893.y),u.push(_0x423893.z),u.push(_0x136fe5.x),u.push(_0x136fe5.y),u.push(_0x136fe5.z),u.push(_0x430fcf.x),u.push(_0x430fcf.y),u.push(_0x430fcf.z),u.push(_0x579bdc.x),u.push(_0x579bdc.y),u.push(_0x579bdc.z),u.push(p);var y;x=(y=_0x34875b(_0x423893,_0x136fe5)).variantStroke,v=y.variantExtension;u.push(x),u.push(v)}h+=o$1p.distance(_0x423893,_0x136fe5)}}var $=h/(c/4),b=l.length/_0x30c9ea.RegularInstanceStride,T=u.length/_0x30c9ea.SilhouetteInstanceStride;return{regular:{instancesData:new Float32Array(l),instanceCount:b,edgeLength:b*$},silhouette:{instancesData:new Float32Array(u),instanceCount:T,edgeLength:T},averageEdgeLength:$}};var A$14={NEVER:de$x.NEVER,LESS:de$x.LESS,EQUAL:de$x.EQUAL,LESS_OR_EQUAL:de$x.LEQUAL,GREATER:de$x.GREATER,NOT_EQUAL:de$x.NOTEQUAL,GREATER_OR_EQUAL:de$x.GEQUAL,ALWAYS:de$x.ALWAYS},re$E=Object.freeze(A$14),_0x5c6ed8=(_0x191d89=!0,function(e,t){var i=_0x191d89?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x191d89=!1,i}),_0x1603b5=_0x5c6ed8(void 0,(function(){return _0x1603b5.toString().search("(((.+)+)+)+$").toString().constructor(_0x1603b5).search("(((.+)+)+)+$")})),_0x191d89;function _0x187e60(){}_0x1603b5(),_0x187e60.createClampGroundColorRenderState=function(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$X.NOT_EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.ZERO},backFunction:m$X.NOT_EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.ZERO},reference:0,mask:65535},blending:Ee$r.ALPHA_BLEND}},_0x187e60.createClampGroundAndObjectLineRenderState=function(){return{cull:{enabled:!0},depthMask:!1}},_0x187e60.createClampGroundStencilRenderState=function(){return{depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0,func:re$E.GREATER},stencilTest:{enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.INCREMENT_WRAP},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:0,mask:65535}}},_0x187e60.createClampObjectColorRenderState=function(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$X.EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},backFunction:m$X.EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:3,mask:3},blending:Ee$r.ALPHA_BLEND}},_0x187e60.createClampObjectStencilRenderState=function(){return{cull:{enabled:!1},depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:{enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.DECREMENT_WRAP,zPass:n$Y.KEEP},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.DECREMENT_WRAP,zPass:n$Y.KEEP},reference:0,mask:1},stencilMask:1}},_0x187e60.createClampPickStencilRenderState=function(e){var t=e?this.createClampGroundStencilRenderState():this.createClampObjectStencilRenderState();return t.blending={enabled:!1},t.polygonOffset={enabled:!0,factor:1,units:1},t},_0x187e60.createClampPickColorRenderState=function(e){var t=e?this.createClampGroundColorRenderState():this.createClampObjectColorRenderState();return t.blending={enabled:!1},t.depthTest={enabled:!0},t.polygonOffset={enabled:!0,factor:1,units:1},t},_0x187e60.createReceiveClampObjectStencilTest=function(e){return{enabled:e,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.REPLACE},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.REPLACE},reference:2,mask:2}},_0x187e60.createNormalColorRenderState=function(e){return{cull:{enabled:e!==W$13.NONE},depthTest:{enabled:!0,func:re$E.LESS_OR_EQUAL},blending:Ee$r.ALPHA_BLEND,frontFace:e!==W$13.NONE?e:W$13.COUNTER_CLOCKWISE}};var _0x176803=(_0x3d698c=!0,function(e,t){var i=_0x3d698c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3d698c=!1,i}),_0x5b5a88=_0x176803(void 0,(function(){return _0x5b5a88.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b5a88).search("(((.+)+)+)+$")})),_0x3d698c;_0x5b5a88();var _e$s="precision highp float;\n\nvarying float vRadius;\nvarying vec3 vPosition;\nvarying vec3 vViewPosition;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\nvarying float vVariantExtension;\nvarying float fSelected;\nuniform vec4 uLineColor;\n\n// At which coverage threshold we discard a fragment completely\n#define COVERAGE_TEST_THRESHOLD 0.01\nconst float nearRange = 1000.0;\nconst float farRange = 20000.0;\n\n// Solid\nfloat calculateLineOffsetSolid()\n{\n return 0.0;\n}\nfloat calculateLinePressureSolid()\n{\n return 1.0;\n}\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSolid();\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSolid();\n}\nvec2 lineWithCapsDistance(float radius, vec2 position, float lineLength)\n{\n float lineOffset = calculateLineOffset();\n float positionX = position.x - lineOffset;\n if (radius < 1.0)\n {\n float coverageX = clamp(min(radius, positionX + 0.5) - max(-radius, positionX - 0.5), 0.0, 1.0);\n float coverageY = clamp(min(lineLength, position.y + 0.5) - max(0.0, position.y - 0.5), 0.0, 1.0);\n float coverage = min(coverageX, coverageY);\n return vec2(0.5 - coverage, 0.0);\n }\n else\n {\n // Between -radius -> 0 for start cap, 0 for line, 0 -> radius\n float positionOnCap = position.y - clamp(position.y, 0.0, lineLength);\n vec2 lineToPosition = vec2(positionX, positionOnCap);\n return vec2(length(lineToPosition) - radius, positionOnCap / radius);\n }\n}\n\nvoid main()\n{\n vec3 realPosition = czm_readNonPerspective(vPosition, gl_FragCoord.w);\n float radius = vRadius * calculateLinePressure();\n vec2 distance = lineWithCapsDistance(radius, realPosition.xy, vLineLengthPixels);\n float coverage = clamp(0.5 - distance.x, 0.0, 1.0);\n float coverageLimit = radius <= 0.5 ? COVERAGE_TEST_THRESHOLD : 0.75;\n \n if (coverage < coverageLimit || uLineColor.a < 0.1)\n {\n discard;\n }\n float alpha = uLineColor.a * coverage;\n gl_FragColor = vec4(uLineColor.rgb, alpha);\n float attenuation = 1.0 - smoothstep(nearRange, farRange, vDistanceFromEye);\n gl_FragColor.a *= attenuation;\n czm_writeLogDepth();\n}",_0x95adad=(_0x582eea=!0,function(e,t){var i=_0x582eea?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x582eea=!1,i}),_0x346d31=_0x95adad(void 0,(function(){return _0x346d31.toString().search("(((.+)+)+)+$").toString().constructor(_0x346d31).search("(((.+)+)+)+$")})),_0x582eea;_0x346d31();var ge$p="precision highp float;\nconst float uPixelRatio = 1.0;\n// Inputs\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\n\n#ifdef SILHOUETTE\nattribute vec3 aNormalA;\nattribute vec3 aNormalB;\n#else /* SILHOUETTE */\nattribute vec3 aNormal;\n#endif /* SILHOUETTE */\n\nattribute vec2 aSideness;\n//attribute vec2 aPackedAttributes;\n\nstruct UnpackedAttributes\n{\n vec2 sideness;\n vec2 sidenessNorm;\n float lineWidthPixels;\n float extensionLengthPixels;\n};\n\n// Output required to compute color\n// Output required to compute distance to line/caps\nvarying vec3 vPosition; \nvarying vec3 vViewPosition;\nvarying float vRadius;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\n\nuniform float uLineWidth;\nuniform vec4 uLineColor;\nuniform vec3 uTranslation;\nconst vec2 uDepthBias = vec2(0.5, -4e-4);\n\n// Utility function to check for NaN values\nbool isNaN(float val)\n{\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n // important: some nVidias failed to cope with version below.\n // Probably wrong optimization.\n /*return ( val <= 0.0 || 0.0 <= val ) ? false : true;*/\n}\n\nvec2 calculateProjectedBiasXY(vec4 projPos, vec3 worldNormal)\n{\n float offsetXY = uDepthBias.x;\n float offsetZ = uDepthBias.y;\n vec4 projNormal = czm_projection * czm_view * vec4(worldNormal, 0.0);\n return offsetXY * projPos.w * 2.0 / czm_viewport.zw * normalize(projNormal.xyz).xy;\n}\n\n// A z-offset, using a depth based heuristic.\nfloat calculateProjectedBiasZ(vec4 projPos)\n{\n float fProjZ = projPos.z / projPos.w;\n if(fProjZ < 0.1)\n {\n return 0.0;\n }\n float offsetZ = uDepthBias.y;\n return sqrt(projPos.z) * offsetZ;\n}\n\nvec4 adjustProjectedPosition(vec4 projPos, vec3 worldNormal, float lineWidth)\n{\n vec2 offsetXY = calculateProjectedBiasXY(projPos, worldNormal);\n // we currently have to do this check because some geometries come with 0 length edge normals.\n if (!isNaN(offsetXY.x) && !isNaN(offsetXY.y))\n {\n projPos.xy += offsetXY;\n }\n#ifdef LOG_DEPTH\n vDistanceFromEye = projPos.w;\n#else\n projPos.z += calculateProjectedBiasZ(projPos);\n#endif\n return projPos;\n}\n\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{}\n// Solid\nfloat calculateLineAmplitudeSolid()\n{\n return 0.0;\n}\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSolid();\n}\n\n\nuniform float uDistanceFalloffFactor;\nfloat distanceBasedPerspectiveFactor(float distance)\n{\n return clamp(sqrt(uDistanceFalloffFactor / distance), 0.0, 1.0);\n}\n\n#define COMPONENT_COLOR_FIELD_OFFSET 0.0\n#define COMPONENT_OTHER_FIELDS_OFFSET 1.0\n#define COMPONENT_FIELD_COUNT 2.0\n#define LINE_WIDTH_FRACTION_FACTOR 8.0\n#define EXTENSION_LENGTH_OFFSET 128.0\n#define COMPONENT_TEX_WIDTH 4096.0\n\nstruct ComponentData\n{\n float lineWidth;\n float extensionLength;\n float type;\n};\n\n\nComponentData readComponentData()\n{\n return ComponentData(uLineWidth, 0.0, 0.0);\n}\n\nvec3 modelToWorldNormal(vec3 normal)\n{\n return (czm_model * vec4(normal, 0.0)).xyz;\n}\n\nvec3 silhouetteWorldNormal(vec3 normalA, vec3 normalB)\n{\n return modelToWorldNormal(normalize(normalA + normalB));\n}\n\n// Fall-off extension length for shorter strokes, starting from strokes that are 256 size,\n// fall-off exponentially\nfloat calculateExtensionLength(float extensionLength, float lineLength)\n{\n return extensionLength / (log2(max(1.0, 256.0 / lineLength)) * 0.2 + 1.0);\n}\n\n#ifdef SILHOUETTE\n// #uniforms: czm_view, czm_model\nbool isSilhouetteEdge(vec4 viewPos, vec3 normalA, vec3 normalB)\n{\n// transform the two face normals\n vec3 viewNormalA = (czm_modelView * vec4(normalA, 0.0)).xyz;\n vec3 viewNormalB = (czm_modelView * vec4(normalB, 0.0)).xyz;\n// compute the direction from the edge to the camera\n vec3 viewDir = -viewPos.xyz;\n// check which of the two faces are visible\n// display the edge if exactly one of the two is visible\n float faceAVisible = dot(viewDir, viewNormalA);\n// positive if visible\n float faceBVisible = dot(viewDir, viewNormalB);\n// positive if visible\n// 1 if exactly one face visible, 0 otherwise\n return faceAVisible * faceBVisible < 0.0;\n}\n#endif /* SILHOUETTE */\n\nvoid clipLineSegmentToNearPlane(vec3 p0,vec3 p1,out bool clipped,out bool culledByNearPlane,out vec4 clippedPositionEC)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = czm_currentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -czm_currentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n}\nvec4 calculateGeometricOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vec2 sideness = unpackedAttributes.sideness;\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n vec4 clippedViewPosV0; bool clippedV0,culledV0; clipLineSegmentToNearPlane(viewPosV0.xyz, viewPosV1.xyz, clippedV0, culledV0, clippedViewPosV0); vec4 clippedViewPosV1; bool clippedV1, culledV1; clipLineSegmentToNearPlane(viewPosV1.xyz, viewPosV0.xyz, clippedV1, culledV1, clippedViewPosV1); vec4 viewPos = mix(clippedViewPosV0, clippedViewPosV1, sidenessNorm.y);\n vViewPosition = viewPos.xyz / viewPos.w;\n vec4 projPosV0 = czm_projection * clippedViewPosV0;\n vec4 projPosV1 = czm_projection * clippedViewPosV1;\n vec4 projPos = czm_projection * viewPos;\n vec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\n vec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\n vec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\n float lineLengthPixels = length(screenSpaceLinePixels);\n float dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\n vec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\n vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\n float falloffFactor = distanceBasedPerspectiveFactor(-viewPos.z) * uPixelRatio;\n float lineWidthPixels = unpackedAttributes.lineWidthPixels * falloffFactor;\n float extensionLengthPixels = calculateExtensionLength(unpackedAttributes.extensionLengthPixels, lineLengthPixels) * falloffFactor;\n float lineAmplitudePixels = calculateLineAmplitude(unpackedAttributes) * uPixelRatio;\n vSizeFalloffFactor = falloffFactor;\n float lineWidthAndAmplitudePixels = lineWidthPixels + lineAmplitudePixels + lineAmplitudePixels;\n float extendedLineLengthPixels = lineLengthPixels + extensionLengthPixels + extensionLengthPixels;\n#ifdef ANTIALIASING\n const float aaPaddingPixels = 1.0;\n // Line size with padding\n float halfAAPaddedLineWidthAndAmplitudePixels = lineWidthAndAmplitudePixels * 0.5 + aaPaddingPixels;\n float aaPaddedRoundedCapSizePixels = lineWidthPixels * 0.5 + aaPaddingPixels;\n // Line length with padding\n float aaPaddedLineLengthPixels = extendedLineLengthPixels + aaPaddingPixels + aaPaddingPixels;\n float halfAAPaddedLineLengthPixels = aaPaddedLineLengthPixels * 0.5;\n#else /* ANTIALIASING */\n // Even if there is no AA, we still want to do proper <1px rendering,\n // so we effectively clamp the pixel sizes to minimum of 1px and compute\n // coverage in the fragment shader \n float halfAAPaddedLineWidthAndAmplitudePixels = max(lineWidthAndAmplitudePixels, 1.0) * 0.5;\n float aaPaddedRoundedCapSizePixels = max(lineWidthPixels, 1.0) * 0.5;\n float halfAAPaddedLineLengthPixels = max(extendedLineLengthPixels, 1.0) * 0.5;\n#endif /* ANTIALIASING */\n // Half line width in NDC including padding for anti aliasing\n vec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\n vec2 halfAAPaddedLineWidthAndAmplitudeNDC = halfAAPaddedLineWidthAndAmplitudePixels * uPixelToNDC;\n vec2 aaPaddedRoundedCapSizeNDC = aaPaddedRoundedCapSizePixels * uPixelToNDC;\n vec2 extensionLengthNDC = extensionLengthPixels * uPixelToNDC;\n // Compute screen space position of vertex, offsetting for line size and end caps\n vec2 ndcOffset = (screenSpaceDirection * sideness.y * (aaPaddedRoundedCapSizeNDC + extensionLengthNDC) + perpendicularScreenSpaceDirection * halfAAPaddedLineWidthAndAmplitudeNDC);\n projPos.xy += ndcOffset * projPos.w;\n projPos.z += (dzPerPixel * (aaPaddedRoundedCapSizePixels + extensionLengthPixels)) * sideness.y * projPos.w;\n projPos = adjustProjectedPosition(projPos, worldNormal, 1.0 + max((lineWidthAndAmplitudePixels - 1.0) * 0.5, 0.0));\n // Line length with end caps\n float aaPaddedLineWithCapsLengthPixels = extendedLineLengthPixels + aaPaddedRoundedCapSizePixels + aaPaddedRoundedCapSizePixels;\n float pixelPositionAlongLine = aaPaddedLineWithCapsLengthPixels * sidenessNorm.y - aaPaddedRoundedCapSizePixels;\n // Position in pixels with origin at first vertex of line segment\n // The line width radius in pixels\n vRadius = lineWidthPixels * 0.5;\n vLineLengthPixels = extendedLineLengthPixels;\n vPosition = czm_writeNonPerspective(vec3(halfAAPaddedLineWidthAndAmplitudePixels * sideness.x, pixelPositionAlongLine, pixelPositionAlongLine / extendedLineLengthPixels), projPos.w);\n#ifdef SILHOUETTE\n gl_Position = isSilhouetteEdge(viewPosV0, aNormalA, aNormalB) ? projPos : vec4(10.0, 10.0, 10.0, 1.0);\n#else /* SILHOUETTE */\n gl_Position = projPos;\n#endif /* SILHOUETTE */\n\n return projPos;\n}\n\n\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float extensionLengthPixels = component.extensionLength;\n float lineWidth = component.lineWidth;\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels);\n}\nvarying float fSelected;\nvoid main()\n{\n fSelected = 0.0;\n ComponentData component = readComponentData();\n UnpackedAttributes unpackedAttributes = unpackAttributes(component);\n vec4 vertexPos0 = vec4(aPosition0, 1.0);\n vec4 vertexPos1 = vec4(aPosition1, 1.0);\n vec3 translate = uTranslation;\n vec4 worldPosV0 = czm_model * vertexPos0;\n vec4 worldPosV1 = czm_model * vertexPos1;\n vec4 viewPosV0 = czm_modelView * vertexPos0;\n vec4 viewPosV1 = czm_modelView * vertexPos1;\n#ifdef SILHOUETTE\n vec3 worldNormal = silhouetteWorldNormal(aNormalA, aNormalB);\n#else /* SILHOUETTE */\n vec3 worldNormal = modelToWorldNormal(aNormal);\n#endif /* SILHOUETTE */\n // General geometric computation for all types of edges\n vec4 projPos = calculateGeometricOutputs(viewPosV0, viewPosV1, worldPosV0, worldPosV1, worldNormal, unpackedAttributes);\n calculateStyleOutputs(unpackedAttributes);\n}";function e$1B(e,t,i){e=u$_(e,0),t=u$_(t,0),i=u$_(i,0),this.value=new Float32Array([e,t,i])}function Q$T(e,t,i){var n,r=!i,o=e.length;if(!r&&o>1){var a=e[0].modelMatrix;for(n=1;n<o;++n)if(!p$1d.equals(a,e[n].modelMatrix)){r=!0;break}}if(r)for(n=0;n<o;++n)e$2b(e[n].geometry)&&k$13.transformToWorldCoordinates(e[n]);else p$1d.multiplyTransformation(t,e[0].modelMatrix,t)}function V$P(e,t){var i=e.attributes,n=i.position,r=n.values.length/n.componentsPerAttribute;i.batchId=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:1,values:new Float32Array(r)});for(var o=i.batchId.values,a=0;a<r;++a)o[a]=t}function X$S(e){for(var t=e.length,i=0;i<t;++i){var n=e[i];e$2b(n.geometry)?V$P(n.geometry,i):e$2b(n.westHemisphereGeometry)&&e$2b(n.eastHemisphereGeometry)&&(V$P(n.westHemisphereGeometry,i),V$P(n.eastHemisphereGeometry,i))}}function Y$K(e){var t,i,n,r=e.instances,o=e.projection,a=e.elementIndexUintSupported,s=e.scene3DOnly,l=e.vertexCacheOptimize,u=e.compressVertices,c=e.modelMatrix,h=r.length;for(t=0;t<h;++t)if(e$2b(r[t].geometry)){n=r[t].geometry.primitiveType;break}for(t=1;t<h;++t)if(e$2b(r[t].geometry)&&r[t].geometry.primitiveType!==n)throw new t$16("All instance geometries must have the same primitiveType.");if(Q$T(r,c,s),!s)for(t=0;t<h;++t)e$2b(r[t].geometry)&&k$13.splitLongitude(r[t]);if(X$S(r),l)for(t=0;t<h;++t){var d=r[t];e$2b(d.geometry)?(k$13.reorderForPostVertexCache(d.geometry),k$13.reorderForPreVertexCache(d.geometry)):e$2b(d.westHemisphereGeometry)&&e$2b(d.eastHemisphereGeometry)&&(k$13.reorderForPostVertexCache(d.westHemisphereGeometry),k$13.reorderForPreVertexCache(d.westHemisphereGeometry),k$13.reorderForPostVertexCache(d.eastHemisphereGeometry),k$13.reorderForPreVertexCache(d.eastHemisphereGeometry))}var f=k$13.combineInstances(r);for(h=f.length,t=0;t<h;++t){var p,_=(i=f[t]).attributes;if(s)for(p in _)_.hasOwnProperty(p)&&_[p].componentDatatype===S$12.DOUBLE&&k$13.encodeAttribute(i,p,p+"3DHigh",p+"3DLow");else for(p in _)if(_.hasOwnProperty(p)&&_[p].componentDatatype===S$12.DOUBLE){var m=p+"3D",g=p+"2D";k$13.projectTo2D(i,p,m,g,o),e$2b(i.boundingSphere)&&"position"===p&&(i.boundingSphereCV=i$1c.fromVertices(i.attributes.position2D.values)),k$13.encodeAttribute(i,m,m+"High",m+"Low"),k$13.encodeAttribute(i,g,g+"High",g+"Low")}u&&k$13.compressVertices(i)}if(!a){var x=[];for(h=f.length,t=0;t<h;++t)i=f[t],x=x.concat(k$13.fitToUnsignedShortIndices(i));f=x}return f}function I$17(e,t,i,n){var r,o,a,s=n.length-1;if(s>=0){var l=n[s];r=l.offset+l.count,o=i[a=l.index].indices.length}else r=0,o=i[a=0].indices.length;for(var u=e.length,c=0;c<u;++c){var h=e[c][t];if(e$2b(h)){var d=h.indices.length;r+d>o&&(r=0,o=i[++a].indices.length),n.push({index:a,offset:r,count:d}),r+=d}}}function Z$S(e,t){var i=[];return I$17(e,"geometry",t,i),I$17(e,"westHemisphereGeometry",t,i),I$17(e,"eastHemisphereGeometry",t,i),i}Object.defineProperties(e$1B.prototype,{componentDatatype:{get:function(){return S$12.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),e$1B.fromCartesian3=function(e){return o$1q.defined("offset",e),new e$1B(e.x,e.y,e.z)},e$1B.toValue=function(e,t){return o$1q.defined("offset",e),e$2b(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};var k$S={};function _$Q(e,t){var i=e.attributes;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];e$2b(r)&&e$2b(r.values)&&t.push(r.values.buffer)}e$2b(e.indices)&&t.push(e.indices.buffer)}function $$V(e,t){for(var i=e.length,n=0;n<i;++n)_$Q(e[n],t)}function q$_(e){for(var t=1,i=e.length,n=0;n<i;n++){var r=e[n];if(++t,e$2b(r)){var o=r.attributes;for(var a in t+=7+2*i$1c.packedLength+(e$2b(r.indices)?r.indices.length:0),o)if(o.hasOwnProperty(a)&&e$2b(o[a])){t+=6+o[a].values.length}}}return t}function ee$v(e,t){var i=e.length,n=new Float64Array(1+19*i),r=0;n[r++]=i;for(var o=0;o<i;o++){var a=e[o];if(p$1d.pack(a.modelMatrix,n,r),r+=p$1d.packedLength,e$2b(a.attributes)&&e$2b(a.attributes.offset)){var s=a.attributes.offset.value;n[r]=s[0],n[r+1]=s[1],n[r+2]=s[2]}r+=3}return t.push(n.buffer),n}function re$D(e){for(var t=e,i=new Array(t[0]),n=0,r=1;r<t.length;){var o,a=p$1d.unpack(t,r);e$2b(t[r+=p$1d.packedLength])&&(o={offset:new e$1B(t[r],t[r+1],t[r+2])}),r+=3,i[n++]={modelMatrix:a,attributes:o}}return i}function M$Z(e){var t=e.length,i=1+(i$1c.packedLength+1)*t,n=new Float32Array(i),r=0;n[r++]=t;for(var o=0;o<t;++o){e$2b(e[o])?(n[r++]=1,i$1c.pack(e[o],n,r)):n[r++]=0,r+=i$1c.packedLength}return n}function T$X(e){for(var t=new Array(e[0]),i=0,n=1;n<e.length;)1===e[n++]&&(t[i]=i$1c.unpack(e,n)),++i,n+=i$1c.packedLength;return t}k$S.combineGeometry=function(e){var t,i,n,r,o=e.instances,a=o.length,s=!1;a>0&&((t=Y$K(e)).length>0&&(i=k$13.createAttributeLocations(t[0]),e.createPickOffsets&&(n=Z$S(o,t))),e$2b(o[0].attributes)&&e$2b(o[0].attributes.offset)&&(r=new Array(a),s=!0));for(var l=new Array(a),u=new Array(a),c=0;c<a;++c){var h=o[c],d=h.geometry;e$2b(d)&&(l[c]=d.boundingSphere,u[c]=d.boundingSphereCV,s&&(r[c]=h.geometry.offsetAttribute));var f=h.eastHemisphereGeometry,p=h.westHemisphereGeometry;e$2b(f)&&e$2b(p)&&(e$2b(f.boundingSphere)&&e$2b(p.boundingSphere)&&(l[c]=i$1c.union(f.boundingSphere,p.boundingSphere)),e$2b(f.boundingSphereCV)&&e$2b(p.boundingSphereCV)&&(u[c]=i$1c.union(f.boundingSphereCV,p.boundingSphereCV)))}return{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:i,pickOffsets:n,offsetInstanceExtend:r,boundingSpheres:l,boundingSpheresCV:u}},k$S.packCreateGeometryResults=function(e,t){var i=new Float64Array(q$_(e)),n=[],r={},o=e.length,a=0;i[a++]=o;for(var s=0;s<o;s++){var l=e[s],u=e$2b(l);if(i[a++]=u?1:0,u){i[a++]=l.primitiveType,i[a++]=l.geometryType,i[a++]=u$_(l.offsetAttribute,-1);var c=e$2b(l.boundingSphere)?1:0;i[a++]=c,c&&i$1c.pack(l.boundingSphere,i,a),a+=i$1c.packedLength;var h=e$2b(l.boundingSphereCV)?1:0;i[a++]=h,h&&i$1c.pack(l.boundingSphereCV,i,a),a+=i$1c.packedLength;var d=l.attributes,f=[];for(var p in d)d.hasOwnProperty(p)&&e$2b(d[p])&&(f.push(p),e$2b(r[p])||(r[p]=n.length,n.push(p)));i[a++]=f.length;for(var _=0;_<f.length;_++){var m=f[_],g=d[m];i[a++]=r[m],i[a++]=g.componentDatatype,i[a++]=g.componentsPerAttribute,i[a++]=g.normalize?1:0,i[a++]=g.isInstanceAttribute?1:0,i[a++]=g.values.length,i.set(g.values,a),a+=g.values.length}var x=e$2b(l.indices)?l.indices.length:0;i[a++]=x,x>0&&(i.set(l.indices,a),a+=x)}}return t.push(i.buffer),{stringTable:n,packedData:i}},k$S.unpackCreateGeometryResults=function(e){for(var t,i=e.stringTable,n=e.packedData,r=new Array(n[0]),o=0,a=1;a<n.length;){if(1===n[a++]){var s,l,u=n[a++],c=n[a++],h=n[a++];-1===h&&(h=void 0),1===n[a++]&&(s=i$1c.unpack(n,a)),a+=i$1c.packedLength,1===n[a++]&&(l=i$1c.unpack(n,a)),a+=i$1c.packedLength;var d,f,p,_,m=new a$_,g=n[a++];for(t=0;t<g;t++){var x=i[n[a++]],v=n[a++];p=n[a++];var y=0!==n[a++],$=0!==n[a++];d=n[a++],f=S$12.createTypedArray(v,d);for(var b=0;b<d;b++)f[b]=n[a++];m[x]=new o$1c({componentDatatype:v,componentsPerAttribute:p,normalize:y,values:f}),$&&(m[x].isInstanceAttribute=!0)}if((d=n[a++])>0){var T=f.length/p;for(_=ce$x.createTypedArray(T,d),t=0;t<d;t++)_[t]=n[a++]}r[o++]=new I$1p({primitiveType:u,geometryType:c,boundingSphere:s,boundingSphereCV:l,indices:_,attributes:m,offsetAttribute:h})}else r[o++]=void 0}return r},k$S.packCombineGeometryParameters=function(e,t){for(var i=e.createGeometryResults,n=i.length,r=0;r<n;r++)t.push(i[r].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:ee$v(e.instances,t),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof n$1b,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}},k$S.unpackCombineGeometryParameters=function(e){for(var t=re$D(e.packedInstances),i=e.createGeometryResults,n=i.length,r=0,o=0;o<n;o++)for(var a=k$S.unpackCreateGeometryResults(i[o]),s=a.length,l=0;l<s;l++){var u=a[l];t[r].geometry=u,++r}var c=t$13.clone(e.ellipsoid);return{instances:t,ellipsoid:c,projection:e.isGeographic?new n$1b(c):new t$O(c),elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:p$1d.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}},k$S.packCombineGeometryResults=function(e,t){e$2b(e.geometries)&&$$V(e.geometries,t);var i=M$Z(e.boundingSpheres),n=M$Z(e.boundingSpheresCV);return t.push(i.buffer,n.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:i,boundingSpheresCV:n}},k$S.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:T$X(e.boundingSpheres),boundingSpheresCV:T$X(e.boundingSpheresCV)}};var e$1A={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6},_0x142e29=Object.freeze(e$1A),E$_={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3,NUMBER_OF_SHADOW_MODES:4,castShadows:function(e){return e===E$_.ENABLED||e===E$_.CAST_ONLY},receiveShadows:function(e){return e===E$_.ENABLED||e===E$_.RECEIVE_ONLY},fromCastReceive:function(e,t){return e&&t?E$_.ENABLED:e?E$_.CAST_ONLY:t?E$_.RECEIVE_ONLY:E$_.DISABLED}},W$W=Object.freeze(E$_);function y$S(e){if(e=u$_(e,u$_.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.swipeEnabled=!1,this._swipeEnabled=!1,this._swipeRegion=new e$29(0,0,1,1),this.depthFailAppearance=e.depthFailAppearance,this._depthFailAppearance=void 0,this._depthFailMaterial=void 0,this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=new p$1d,this.updateBoundingSphere=u$_(e.updateBoundingSphere,!0),this.show=u$_(e.show,!0),this._vertexCacheOptimize=u$_(e.vertexCacheOptimize,!1),this._interleave=u$_(e.interleave,!1),this._releaseGeometryInstances=u$_(e.releaseGeometryInstances,!0),this._allowPicking=u$_(e.allowPicking,!0),this._asynchronous=u$_(e.asynchronous,!0),this._compressVertices=u$_(e.compressVertices,!0),this.cull=u$_(e.cull,!0),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.rtcCenter=e.rtcCenter,e$2b(this.rtcCenter)&&(!e$2b(this.geometryInstances)||Array.isArray(this.geometryInstances)&&1!==this.geometryInstances.length))throw new t$16("Relative-to-center rendering only supports one geometry instance.");this.shadows=u$_(e.shadows,W$W.DISABLED),this._translucent=void 0,this._state=_0x142e29.READY,this._geometries=[],this._error=void 0,this._numberOfInstances=0,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeCache=[],this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._depthFailAppearance=void 0,this._spDepthFail=void 0,this._frontFaceDepthFailRS=void 0,this._backFaceDepthFailRS=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._readOnlyInstanceAttributes=e._readOnlyInstanceAttributes,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._batchTable=void 0,this._batchTableAttributeIndices=void 0,this._offsetInstanceExtend=void 0,this._batchTableOffsetAttribute2DIndex=void 0,this._batchTableOffsetsUpdated=!1,this._instanceBoundingSpheres=void 0,this._instanceBoundingSpheresCV=void 0,this._tempBoundingSpheres=void 0,this._recomputeBoundingSpheres=!1,this._batchTableBoundingSpheresUpdated=!1,this._batchTableBoundingSphereAttributeIndices=void 0,this._twoPasses=e.twoPasses,this._polygonOffset={enabled:!1,value:new o$1o(0,0)},this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0,this._edgeDistanceFalloffFactor=0}function tt$f(e){var t,i=e.length,n=[],r=e[0].attributes;for(t in r)if(r.hasOwnProperty(t)&&e$2b(r[t])){for(var o=r[t],a=!0,s=1;s<i;++s){var l=e[s].attributes[t];if(!e$2b(l)||o.componentDatatype!==l.componentDatatype||o.componentsPerAttribute!==l.componentsPerAttribute||o.normalize!==l.normalize){a=!1;break}}a&&n.push(t)}return n}Object.defineProperties(y$S.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}});var nt$b=new o$1o,rt$g=new o$1p,ye$l=new e$29;function ve$p(e){var t=e.length;return 1===t?e[0]:2===t?o$1o.unpack(e,0,nt$b):3===t?o$1p.unpack(e,0,rt$g):4===t?e$29.unpack(e,0,ye$l):void 0}function at$d(e,t){var i=e.geometryInstances,n=Array.isArray(i)?i:[i],r=n.length;if(0!==r){var o,a,s,l,u=tt$f(n),c=u.length,h=[],d={},f={},p=n[0].attributes;for(a=0;a<c;++a)l=p[s=u[a]],d[s]=a,h.push({functionName:"czm_batchTable_"+s,componentDatatype:l.componentDatatype,componentsPerAttribute:l.componentsPerAttribute,normalize:l.normalize});-1!==u.indexOf("distanceDisplayCondition")&&(h.push({functionName:"czm_batchTable_boundingSphereCenter3DHigh",componentDatatype:S$12.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:S$12.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:S$12.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:S$12.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:S$12.FLOAT,componentsPerAttribute:1}),f.center3DHigh=h.length-5,f.center3DLow=h.length-4,f.center2DHigh=h.length-3,f.center2DLow=h.length-2,f.radius=h.length-1),-1!==u.indexOf("offset")&&(h.push({functionName:"czm_batchTable_offset2D",componentDatatype:S$12.FLOAT,componentsPerAttribute:3}),o=h.length-1),h.push({functionName:"czm_batchTable_pickColor",componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});var _=h.length,m=new h$W(t,h,r);for(a=0;a<r;++a){var g=n[a];p=g.attributes;for(var x=0;x<c;++x){var v=ve$p((l=p[s=u[x]]).value),y=d[s];m.setBatchedAttribute(a,y,v)}var $={primitive:u$_(g.pickPrimitive,e)};e$2b(g.id)&&($.id=g.id);var b=void 0;if($.primitive._polygonEntityId){var T=t.getAllPickObjects();for(let e in T)T[e].id&&T[e].id.id&&T[e].id.id===$.primitive._polygonEntityId&&(b=t.getPickIdByKey(e))}else b=t.createPickId($);e$2b(b)&&e._pickIds.push(b);var C=e$2b(b)?b.color:e$1U.BLACK,S=ye$l;S.x=e$1U.floatToByte(C.red),S.y=e$1U.floatToByte(C.green),S.z=e$1U.floatToByte(C.blue),S.w=e$1U.floatToByte(C.alpha),m.setBatchedAttribute(a,_-1,S)}e._batchTable=m,e._batchTableAttributeIndices=d,e._batchTableBoundingSphereAttributeIndices=f,e._batchTableOffsetAttribute2DIndex=o}}function st$7(e){var t;return t=Array.isArray(e.values)?e.values.slice(0):new e.values.constructor(e.values),new o$1c({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function ot$a(e){var t,i=e.attributes,n=new a$_;for(var r in i)i.hasOwnProperty(r)&&e$2b(i[r])&&(n[r]=st$7(i[r]));if(e$2b(e.indices)){var o=e.indices;t=Array.isArray(o)?o.slice(0):new o.constructor(o)}return new I$1p({attributes:n,indices:t,primitiveType:e.primitiveType,boundingSphere:i$1c.clone(e.boundingSphere)})}function it$a(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:p$1d.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}var ct$9=/attribute\s+vec(?:3|4)\s+(.*)3DHigh;/g;function Ie$l(e){return s$U.replaceMain(e,"czm_non_pick_main")+"\nvarying vec4 v_pickColor; \nvoid main() \n{ \n czm_non_pick_main(); \n v_pickColor = czm_batchTable_pickColor(batchId); \n}"}function Ae$r(e){return"varying vec4 v_pickColor;\n"+e}function Te$o(e,t){if(!e.compressVertices)return t;var i=-1!==t.search(/attribute\s+vec3\s+normal;/g),n=-1!==t.search(/attribute\s+vec2\s+st;/g);if(!i&&!n)return t;var r=-1!==t.search(/attribute\s+vec3\s+tangent;/g),o=-1!==t.search(/attribute\s+vec3\s+bitangent;/g),a=n&&i?2:1,s="compressedAttributes",l="attribute "+((a+=r||o?1:0)>1?"vec"+a:"float")+" "+s+";",u="",c="";n&&(u+="vec2 st;\n",c+=" st = czm_decompressTextureCoordinates("+(a>1?s+".x":s)+");\n");i&&r&&o?(u+="vec3 normal;\nvec3 tangent;\nvec3 bitangent;\n",c+=" czm_octDecode("+s+"."+(n?"yz":"xy")+", normal, tangent, bitangent);\n"):(i&&(u+="vec3 normal;\n",c+=" normal = czm_octDecode("+s+(a>1?"."+(n?"y":"x"):"")+");\n"),r&&(u+="vec3 tangent;\n",c+=" tangent = czm_octDecode("+s+"."+(n&&i?"z":"y")+");\n"),o&&(u+="vec3 bitangent;\n",c+=" bitangent = czm_octDecode("+s+"."+(n&&i?"z":"y")+");\n"));var h=t;return h=(h=(h=(h=h.replace(/attribute\s+vec3\s+normal;/g,"")).replace(/attribute\s+vec2\s+st;/g,"")).replace(/attribute\s+vec3\s+tangent;/g,"")).replace(/attribute\s+vec3\s+bitangent;/g,""),[l,u,h=s$U.replaceMain(h,"czm_non_compressed_main"),"void main() \n{ \n"+c+" czm_non_compressed_main(); \n}"].join("\n")}function ut$a(e){var t=s$U.replaceMain(e,"czm_non_depth_clamp_main");return t+="varying float v_WindowZ;\nvoid main() {\n czm_non_depth_clamp_main();\n vec4 position = gl_Position;\n v_WindowZ = (0.5 * (position.z / position.w) + 0.5) * position.w;\n position.z = min(position.z, position.w);\n gl_Position = position;\n}\n"}function dt$a(e){var t=s$U.replaceMain(e,"czm_non_depth_clamp_main");return t="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n"+(t+="varying float v_WindowZ;\nvoid main() {\n czm_non_depth_clamp_main();\n#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\n gl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n")}function De$o(e,t){var i=e.vertexAttributes;for(var n in i)i.hasOwnProperty(n)&&(e$2b(t[n])||delete e.vertexAttributes[n])}function ht$9(e,t){return function(){return e[t]}}y$S._modifyShaderPosition=function(e,t,i){for(var n,r="",o="",a="";null!==(n=ct$9.exec(t));){var s=n[1],l="vec4 czm_compute"+s[0].toUpperCase()+s.substr(1)+"()";"vec4 czm_computePosition()"!==l&&(r+=l+";\n"),e$2b(e.rtcCenter)?(r+="uniform mat4 u_modifiedModelView;\n",o+="attribute vec4 position;\n",a+=l+"\n{\n return u_modifiedModelView * position;\n}\n\n",t=(t=(t=(t=t.replace(/attribute\s+vec(?:3|4)\s+position3DHigh;/g,"")).replace(/attribute\s+vec(?:3|4)\s+position3DLow;/g,"")).replace(/czm_modelViewRelativeToEye\s+\*\s+/g,"")).replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):i?a+=l+"\n{\n return czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow);\n}\n\n":(o+="attribute vec3 "+s+"2DHigh;\nattribute vec3 "+s+"2DLow;\n",a+=l+"\n{\n vec4 p;\n if (czm_morphTime == 1.0)\n {\n p = czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n p = czm_translateRelativeToEye("+s+"2DHigh.zxy, "+s+"2DLow.zxy);\n }\n else\n {\n p = czm_columbusViewMorph(\n czm_translateRelativeToEye("+s+"2DHigh.zxy, "+s+"2DLow.zxy),\n czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow),\n czm_morphTime);\n }\n return p;\n}\n\n")}return[r,o,t,a].join("\n")},y$S._appendShowToShader=function(e,t){if(!e$2b(e._batchTableAttributeIndices.show))return t;return s$U.replaceMain(t,"czm_non_show_main")+"\nvoid main() \n{ \n czm_non_show_main(); \n gl_Position *= czm_batchTable_show(batchId); \n}"},y$S._updateColorAttribute=function(e,t,i){if(!e$2b(e._batchTableAttributeIndices.color)&&!e$2b(e._batchTableAttributeIndices.depthFailColor)||-1===t.search(/attribute\s+vec4\s+color;/g))return t;if(i&&!e$2b(e._batchTableAttributeIndices.depthFailColor))throw new t$16("A depthFailColor per-instance attribute is required when using a depth fail appearance that uses a color attribute.");var n=t;return n=n.replace(/attribute\s+vec4\s+color;/g,""),n=i?n.replace(/(\b)color(\b)/g,"$1czm_batchTable_depthFailColor(batchId)$2"):n.replace(/(\b)color(\b)/g,"$1czm_batchTable_color(batchId)$2")},y$S._updatePickColorAttribute=function(e){var t=e.replace(/attribute\s+vec4\s+pickColor;/g,"");return t=t.replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2")},y$S._appendOffsetToShader=function(e,t){if(!e$2b(e._batchTableAttributeIndices.offset))return t;var i=t.replace(/attribute\s+float\s+batchId;/g,"attribute float batchId;\nattribute float applyOffset;");return" if (czm_sceneMode == czm_sceneMode3D)\n"," {\n"," $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);"," }\n"," else\n"," {\n"," $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);"," }\n",i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,"vec4 $1 = czm_computePosition();\n if (czm_sceneMode == czm_sceneMode3D)\n {\n $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0); }\n else\n {\n $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0); }\n")},y$S._appendDistanceDisplayConditionToShader=function(e,t,i){if(!e$2b(e._batchTableAttributeIndices.distanceDisplayCondition))return t;var n=s$U.replaceMain(t,"czm_non_distanceDisplayCondition_main"),r="void main() \n{ \n czm_non_distanceDisplayCondition_main(); \n vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);\n vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);\n vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);\n float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);\n";return e.updateBoundingSphere?r+=i?" vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n":" vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);\n vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);\n vec4 centerRTE;\n if (czm_morphTime == 1.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);\n }\n else\n {\n centerRTE = czm_columbusViewMorph(\n czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),\n czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),\n czm_morphTime);\n }\n":r+=" vec4 centerRTE = czm_view * vec4(boundingSphereCenter3DHigh + boundingSphereCenter3DLow, 1.0);\n",n+"\n"+(r+=" float radiusSq = boundingSphereRadius * boundingSphereRadius; \n float distanceSq; \n if (czm_sceneMode == czm_sceneMode2D) \n { \n distanceSq = czm_eyeHeight2D.y - radiusSq; \n } \n else \n { \n distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq; \n } \n distanceSq = max(distanceSq, 0.0); \n float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x; \n float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y; \n float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; \n gl_Position *= show; \n}")};var ce$t=Math.max(s$Y.hardwareConcurrency-1,1),Q$S,lt$5=new i$V("combineGeometry",Number.POSITIVE_INFINITY);function ft$8(e,t){var i,n,r,o,a=e._instanceIds;if(e._state===_0x142e29.READY){i=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];var s,l=e._numberOfInstances=i.length,u=[],c=[];for(r=0;r<l;++r){if(n=i[r].geometry,a.push(i[r].id),!e$2b(n._workerName))throw new t$16("_workerName must be defined for asynchronous geometry.");c.push({moduleName:n._workerName,geometry:n})}if(!e$2b(Q$S))for(Q$S=new Array(ce$t),r=0;r<ce$t;r++)Q$S[r]=new i$V("createGeometry",Number.POSITIVE_INFINITY);for(c=u$P(c,ce$t),r=0;r<c.length;r++){var h,d=0,f=c[r],p=f.length;for(o=0;o<p;++o)e$2b((n=(s=f[o]).geometry).constructor.pack)&&(s.offset=d,d+=u$_(n.constructor.packedLength,n.packedLength));if(d>0){var _=new Float64Array(d);for(h=[_.buffer],o=0;o<p;++o)e$2b((n=(s=f[o]).geometry).constructor.pack)&&(n.constructor.pack(n,_,s.offset),s.geometry=_)}u.push(Q$S[r].scheduleTask({subTasks:c[r]},h))}e._state=_0x142e29.CREATING,o$1l.all(u,(function(t){e._createGeometryResults=t,e._state=_0x142e29.CREATED})).otherwise((function(i){j$Z(e,t,_0x142e29.FAILED,i)}))}else if(e._state===_0x142e29.CREATED){var m=[];i=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];var g=t.scene3DOnly,x=t.mapProjection,v=lt$5.scheduleTask(k$S.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:i,ellipsoid:x.ellipsoid,projection:x,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:g,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},m),m);e._createGeometryResults=void 0,e._state=_0x142e29.COMBINING,o$1l(v,(function(i){var n=k$S.unpackCombineGeometryResults(i);e._geometries=n.geometries,e._attributeLocations=n.attributeLocations,e.modelMatrix=p$1d.clone(n.modelMatrix,e.modelMatrix),e._pickOffsets=n.pickOffsets,e._offsetInstanceExtend=n.offsetInstanceExtend,e._instanceBoundingSpheres=n.boundingSpheres,e._instanceBoundingSpheresCV=n.boundingSpheresCV,e$2b(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=_0x142e29.COMBINED):j$Z(e,t,_0x142e29.FAILED,void 0)})).otherwise((function(i){j$Z(e,t,_0x142e29.FAILED,i)}))}}function pt$9(e,t){var i,n,r=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],o=e._numberOfInstances=r.length,a=new Array(o),s=e._instanceIds,l=0;for(n=0;n<o;n++){var u,c=(i=r[n]).geometry;u=e$2b(c.attributes)&&e$2b(c.primitiveType)?ot$a(c):c.constructor.createGeometry(c),a[l++]=it$a(i,u),s.push(i.id)}a.length=l;var h=t.scene3DOnly,d=t.mapProjection,f=k$S.combineGeometry({instances:a,ellipsoid:d.ellipsoid,projection:d,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:h,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets});e._geometries=f.geometries,e._attributeLocations=f.attributeLocations,e.modelMatrix=p$1d.clone(f.modelMatrix,e.modelMatrix),e._pickOffsets=f.pickOffsets,e._offsetInstanceExtend=f.offsetInstanceExtend,e._instanceBoundingSpheres=f.boundingSpheres,e._instanceBoundingSpheresCV=f.boundingSpheresCV,e$2b(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=_0x142e29.COMBINED):j$Z(e,t,_0x142e29.FAILED,void 0)}function _t$8(e,t){var i=e._batchTableAttributeIndices.offset;if(e._recomputeBoundingSpheres&&e$2b(i)){var n,r=e._offsetInstanceExtend,o=e._instanceBoundingSpheres,a=o.length,s=e._tempBoundingSpheres;if(!e$2b(s)){for(s=new Array(a),n=0;n<a;n++)s[n]=new i$1c;e._tempBoundingSpheres=s}for(n=0;n<a;++n){var l=s[n],u=e._batchTable.getBatchedAttribute(n,i,new o$1p);ze$e(l=o[n].clone(l),u,r[n])}var c=[],h=[],d=[];for(n=0;n<a;++n){var f=s[n];f.center.x-f.radius>0||i$1c.intersectPlane(f,o$1m.ORIGIN_ZX_PLANE)!==Ae$u.INTERSECTING?c.push(f):(h.push(f),d.push(f))}var p=c[0],_=d[0],m=h[0];for(n=1;n<c.length;n++)p=i$1c.union(p,c[n]);for(n=1;n<d.length;n++)_=i$1c.union(_,d[n]);for(n=1;n<h.length;n++)m=i$1c.union(m,h[n]);var g=[];for(e$2b(p)&&g.push(p),e$2b(_)&&g.push(_),e$2b(m)&&g.push(m),n=0;n<g.length;n++){var x=g[n].clone(e._boundingSpheres[n]);e._boundingSpheres[n]=x,e._boundingSphereCV[n]=i$1c.projectTo2D(x,t.mapProjection,e._boundingSphereCV[n])}y$S._updateBoundingVolumes(e,t,e.modelMatrix,!0),e._recomputeBoundingSpheres=!1}else e._recomputeBoundingSpheres=!1}var we$k=new i$11,Se$e=new a$18,Ce$j=new o$1p,xe$o=new i$1c;function gt$7(e,t){if(e$2b(e._batchTableAttributeIndices.distanceDisplayCondition)&&!e._batchTableBoundingSpheresUpdated){for(var i=e._batchTableBoundingSphereAttributeIndices,n=i.center3DHigh,r=i.center3DLow,o=i.center2DHigh,a=i.center2DLow,s=i.radius,l=t.mapProjection,u=l.ellipsoid,c=e._batchTable,h=e._instanceBoundingSpheres,d=h.length,f=0;f<d;++f){var p=h[f];if(e$2b(p)){var _=e.modelMatrix;e$2b(_)&&e.updateBoundingSphere&&(p=i$1c.transform(p,_,xe$o));var m=p.center,g=p.radius,x=i$11.fromCartesian(m,we$k);if(c.setBatchedAttribute(f,n,x.high),c.setBatchedAttribute(f,r,x.low),!t.scene3DOnly){var v=u.cartesianToCartographic(m,Se$e),y=l.project(v,Ce$j);x=i$11.fromCartesian(y,we$k),c.setBatchedAttribute(f,o,x.high),c.setBatchedAttribute(f,a,x.low)}c.setBatchedAttribute(f,s,g)}}e._batchTableBoundingSpheresUpdated=!0}}var ue$C=new o$1p,bt$8=new o$1p;function Fe$k(e,t){if(e$2b(e._batchTableAttributeIndices.offset)&&!e._batchTableOffsetsUpdated&&!t.scene3DOnly){for(var i=e._batchTableOffsetAttribute2DIndex,n=t.mapProjection,r=n.ellipsoid,o=e._batchTable,a=e._instanceBoundingSpheres,s=a.length,l=0;l<s;++l){var u=a[l];if(e$2b(u)){var c=o.getBatchedAttribute(l,e._batchTableAttributeIndices.offset);if(o$1p.equals(c,o$1p.ZERO)){o.setBatchedAttribute(l,i,o$1p.ZERO);continue}var h=e.modelMatrix;e$2b(h)&&(u=i$1c.transform(u,h,xe$o));var d=u.center;d=r.scaleToGeodeticSurface(d,bt$8);var f=r.cartesianToCartographic(d,Se$e),p=n.project(f,Ce$j),_=o$1p.add(c,d,ue$C);f=r.cartesianToCartographic(_,f);var m=n.project(f,ue$C),g=o$1p.subtract(m,p,ue$C),x=g.x;g.x=g.z,g.z=g.y,g.y=x,o.setBatchedAttribute(l,i,g)}}e._batchTableOffsetsUpdated=!0}}function mt$6(e,t){for(var i=e._attributeLocations,n=e._geometries,r=t.scene3DOnly,o=t.context,a=[],s=n.length,l=0;l<s;++l){var u=n[l];if(Pe$k(e)){var c=U$_(o,u.attributes.batchId),h=yt$8(o),d=U$_(o,u.attributes.position2DHigh),f=U$_(o,u.attributes.position2DLow),p=U$_(o,u.attributes.position3DHigh),_=U$_(o,u.attributes.position3DLow),m=[];(i={}).sideness=0,m.push({index:i.sideness,vertexBuffer:h,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),i.position02DHigh=1,m.push({index:i.position02DHigh,vertexBuffer:d,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position12DHigh=2,m.push({index:i.position12DHigh,vertexBuffer:d,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position02DLow=3,m.push({index:i.position02DLow,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position12DLow=4,m.push({index:i.position12DLow,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position03DHigh=5,m.push({index:i.position03DHigh,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position13DHigh=6,m.push({index:i.position13DHigh,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position03DLow=7,m.push({index:i.position03DLow,vertexBuffer:_,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position13DLow=8,m.push({index:i.position13DLow,vertexBuffer:_,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.batchId=9,m.push({index:i.batchId,vertexBuffer:c,componentsPerAttribute:1,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:4,instanceDivisor:1}),i.batchId1=10,m.push({index:i.batchId1,vertexBuffer:c,componentsPerAttribute:1,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:4,strideInBytes:4,instanceDivisor:1});var g=new c$12({context:o,attributes:m,indexBuffer:It$9(o)});g._instanceCount=u.attributes.position3DHigh.values.length/u.attributes.position3DHigh.componentsPerAttribute-1,e._attributeLocations=i,a.push(g)}else{var x=Object.keys(u.attributes).length,v=!!(o.webgpu&&x>8)||e._interleave;a.push(c$12.fromGeometry({context:o,geometry:u,attributeLocations:i,bufferUsage:A$19.STATIC_DRAW,interleave:v}))}if(e$2b(e._createBoundingVolumeFunction))e._createBoundingVolumeFunction(t,u);else if(e._boundingSpheres.push(i$1c.clone(u.boundingSphere)),e._boundingSphereWC.push(new i$1c),!r&&e$2b(u.boundingSphereCV)){var y=u.boundingSphereCV.center,$=y.x,b=y.y,T=y.z;y.x=T,y.y=$,y.z=b,e._boundingSphereCV.push(i$1c.clone(u.boundingSphereCV)),e._boundingSphere2D.push(new i$1c),e._boundingSphereMorph.push(new i$1c)}}e._va=a,e._primitiveType=n[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,j$Z(e,t,_0x142e29.COMPLETE,void 0)}function Pe$k(e){return e$2b(e._attributeLocations.sideness)}var de$u=null;function yt$8(e){var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,(de$u=t$Y.createVertexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW})).vertexArrayDestroyable=!1,de$u}function U$_(e,t){return t$Y.createVertexBuffer({context:e,typedArray:t.values,usage:A$19.STATIC_DRAW})}function vt$a(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}var W$V=null;function It$9(e){return e$2b(W$V)||((W$V=t$Y.createIndexBuffer({context:e,typedArray:vt$a(),usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})).vertexArrayDestroyable=!1),W$V}function At$8(e,t,i,n,r){var o,a=i.getRenderState();e$2b(r)&&r?a.stencilTest=_0x187e60.createReceiveClampObjectStencilTest(!0):a.stencilTest={enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.ZERO},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.ZERO},reference:0,mask:65535},n?((o=l$1g(a,!1)).cull={enabled:!0,face:G$17.BACK},e._frontFaceRS=d$1m.fromCache(o),o.cull.face=G$17.FRONT,e._backFaceRS=d$1m.fromCache(o)):(e._frontFaceRS=d$1m.fromCache(a),e._backFaceRS=e._frontFaceRS),o=l$1g(a,!1),e$2b(e._depthFailAppearance)&&(o.depthTest.enabled=!1),e$2b(e._depthFailAppearance)&&((o=l$1g(a=e._depthFailAppearance.getRenderState(),!1)).depthTest.func=re$E.GREATER,n?(o.cull={enabled:!0,face:G$17.BACK},e._frontFaceDepthFailRS=d$1m.fromCache(o),o.cull.face=G$17.FRONT,e._backFaceDepthFailRS=d$1m.fromCache(o)):(e._frontFaceDepthFailRS=d$1m.fromCache(o),e._backFaceDepthFailRS=e._frontFaceRS))}function Tt$b(e,t,i){var n=t.context,r=e._attributeLocations,o=Pe$k(e),a=e._batchTable.getVertexShaderCallback()(i.vertexShaderSource);a=y$S._appendOffsetToShader(e,a),a=y$S._appendShowToShader(e,a),a=Ie$l(a=y$S._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=Te$o(e,a=y$S._updateColorAttribute(e,a,!1)),a=y$S._modifyShaderPosition(e,a,t.scene3DOnly);var s=i.getFragmentShaderSource();s=Ae$r(s),a=new s$U({sources:[a],name:i.name}),o&&a.defines.push("APPLY_SIDENESS");var l=[];e._polygonOffset.enabled&&l.push("POLYGON_OFFSET"),s=new s$U({sources:[s],defines:l,name:i.name}),e._swipeEnabled&&s.defines.push("APPLY_SWIPE"),e._sp=r$13.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:r}),De$o(e._sp,r),e$2b(e._depthFailAppearance)&&(a=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),a=y$S._appendShowToShader(e,a),a=Ie$l(a=y$S._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=Te$o(e,a=y$S._updateColorAttribute(e,a,!0)),a=ut$a(a=y$S._modifyShaderPosition(e,a,t.scene3DOnly)),s=dt$a(s=Ae$r(s=e._depthFailAppearance.getFragmentShaderSource())),e._spDepthFail=r$13.replaceCache({name:"depthFail_"+e._depthFailAppearance.name,context:n,shaderProgram:e._spDepthFail,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:r}),De$o(e._spDepthFail,r))}var q$Z=new p$1d;new o$1p;var Be$k=new o$1p;function Ee$o(e,t,i,n){var r=e$2b(i)?i._uniforms:void 0,o={},a=t.uniforms;if(e$2b(a))for(var s in a)if(a.hasOwnProperty(s)){if(e$2b(r)&&e$2b(r[s]))throw new t$16("Appearance and material have a uniform with the same name: "+s);o[s]=ht$9(a,s)}var l=p$19(o,r);return(l=e._batchTable.getUniformMapCallback()(l)).u_polygonOffset=function(){return e._polygonOffset.value},l.uLineWidth=function(){return u$_(e._outlineWidth,1)},l.uSwipeRegion=function(){var t=e._swipeRegion,i=new e$29;return e$29.fromElements(t.x,t.y,t.x+t.z,t.y+t.w,i),i.x=i.x*n.context.drawingBufferWidth,i.y=(1-i.y)*n.context.drawingBufferHeight,i.z=i.z*n.context.drawingBufferWidth,i.w=(1-i.w)*n.context.drawingBufferHeight,i},e$2b(e.rtcCenter)&&(l.u_modifiedModelView=function(){var t=n.context.uniformState.view;return p$1d.multiply(t,e._modelMatrix,q$Z),p$1d.multiplyByPoint(q$Z,e.rtcCenter,Be$k),p$1d.setTranslation(q$Z,Be$k,q$Z),q$Z}),l}function Dt$9(e,t,i,n,r,o,a,s){var l,u=Ee$o(e,t,i,s);e$2b(e._depthFailAppearance)&&(l=Ee$o(e,e._depthFailAppearance,e._depthFailAppearance.material,s));var c=n?Le$s.TRANSLUCENT:Le$s.OPAQUE,h=r?2:1;h*=e$2b(e._depthFailAppearance)?2:1,o.length=e._va.length*h;for(var d=o.length,f=0,p=0;p<d;++p){var _;r&&(e$2b(_=o[p])||(_=o[p]=new i$_({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._backFaceRS,_.shaderProgram=e._sp,_.uniformMap=u,_.pass=c,++p),e$2b(_=o[p])||(_=o[p]=new i$_({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._frontFaceRS,_.shaderProgram=e._sp,_.uniformMap=u,_.pass=c,_.instanceCount=u$_(_.vertexArray._instanceCount,0),e$2b(e._depthFailAppearance)&&(r&&(e$2b(_=o[++p])||(_=o[p]=new i$_({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._backFaceDepthFailRS,_.shaderProgram=e._spDepthFail,_.uniformMap=l,_.pass=c),e$2b(_=o[++p])||(_=o[p]=new i$_({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._frontFaceDepthFailRS,_.shaderProgram=e._spDepthFail,_.uniformMap=l,_.pass=c),++f}}function wt$8(e,t,i,n,r,o,a,s){if(t.mode!==C$13.SCENE3D&&!p$1d.equals(r,p$1d.IDENTITY))throw new t$16("Primitive.modelMatrix is only supported in 3D mode.");var l;y$S._updateBoundingVolumes(e,t,r),t.mode===C$13.SCENE3D?l=e.updateBoundingSphere?e._boundingSphereWC:e._boundingSpheres:t.mode===C$13.COLUMBUS_VIEW?l=e._boundingSphereCV:t.mode===C$13.SCENE2D&&e$2b(e._boundingSphere2D)?l=e._boundingSphere2D:e$2b(e._boundingSphereMorph)&&(l=e._boundingSphereMorph);var u=!0;t._fboState.frameBufferType===Qe$c.NORMAL_AND_DEPTH&&(u=!1);var c=t.commandList,h=t.passes;if(u&&(h.render||h.pick)){var d=e.allowPicking,f=W$W.castShadows(e.shadows),p=W$W.receiveShadows(e.shadows),_=i.length,m=s?2:1;m*=e$2b(e._depthFailAppearance)?2:1;for(var g=0;g<_;++g){var x=Math.floor(g/m),v=i[g];v.modelMatrix=r,v.boundingVolume=l[x],v.cull=o,v.debugShowBoundingVolume=a,v.castShadows=f,v.receiveShadows=p,v.pickId=d?"v_pickColor":void 0,c.push(v)}}}function Oe$m(e,t,i,n,r,o){if(!e$2b(i.attributes)||0==i.attributes.length||!e$2b(i.instanceCount)||0==i.instanceCount)return null;var a,s=t.position.getValue(0);a=e$2b(t.orientation)?t.orientation.getValue(0):{heading:0,pitch:0,roll:0};var l=m$17.headingPitchRollToFixedFrame(o$1p.fromDegrees(s.x,s.y,s.z),new i$15(a.heading,a.pitch,a.roll),t$13.WGS84,m$17.eastNorthUpToFixedFrame);p$1d.multiplyByPoint(l,t.boundingSphere.center,t.boundingSphere.center);var u,c,h=Le$s.OPAQUE+1,d=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:l,boundingVolume:t.boundingSphere,pass:h,owner:o,cull:!0});if(d.vertexArray=new c$12({context:e,attributes:i.attributes,indexBuffer:n}),d.instanceCount=i.instanceCount,r){var f="RegularEdge_"+t.id,p="RegularEdge_"+t.id;u=new s$U({name:f,sources:[ge$p]}),c=new s$U({name:p,sources:[_e$s]})}else{f="SilhouetteEdge_"+t.id,p="SilhouetteEdge_"+t.id;u=new s$U({name:f,sources:[ge$p]}),c=new s$U({name:p,sources:[_e$s]}),u.defines.push("SILHOUETTE"),c.defines.push("SILHOUETTE")}u.defines.push("ANTIALIASING"),c.defines.push("ANTIALIASING"),c.defines.push("POLYGON_OFFSET"),u.defines.push("BatchTable");u.defines.push("MODE 0"),c.defines.push("MODE 0"),d.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:i.attributeLocations}),d.renderState=d$1m.fromCache({depthTest:{enabled:!0,func:re$E.LESS_OR_EQUAL},cull:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var _={uLineColor:function(){return u$_(t.geometry.outlineColor,e$1U.BLACK)},uLineWidth:function(){return t.geometry.outlineWidth},uDistanceFalloffFactor:function(){return o._edgeDistanceFalloffFactor},u_polygonOffset:function(){return new o$1o(-5,-5)}};return d.uniformMap=_,d.edgeTotalLength=i.edgeLength,d.edgeCount=i.instanceCount,d.wireframeType=3,d}y$S._updateBoundingVolumes=function(e,t,i,n){if(e.updateBoundingSphere){var r,o,a;if(n||!p$1d.equals(i,e._modelMatrix))for(p$1d.clone(i,e._modelMatrix),o=e._boundingSpheres.length,r=0;r<o;++r)e$2b(a=e._boundingSpheres[r])&&(e._boundingSphereWC[r]=i$1c.transform(a,i,e._boundingSphereWC[r]),t.scene3DOnly||(e._boundingSphere2D[r]=i$1c.clone(e._boundingSphereCV[r],e._boundingSphere2D[r]),e._boundingSphere2D[r].center.x=0,e._boundingSphereMorph[r]=i$1c.union(e._boundingSphereWC[r],e._boundingSphereCV[r])));var s=e.appearance.pixelSize;if(e$2b(s))for(o=e._boundingSpheres.length,r=0;r<o;++r){a=e._boundingSpheres[r];var l=e._boundingSphereWC[r],u=t.camera.getPixelSize(a,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*s;l.radius=a.radius+u}}},y$S.prototype.update=function(e){if(!e._fboState||!0!==e._fboState.enabled||6!==e._fboState.frameBufferType){if(e.multiViewportIndex>-1&&this._instanceIds.length>0&&e$2b(this._instanceIds[0])&&e$2b(this._instanceIds[0].entityCollection)&&e$2b(this._instanceIds[0].entityCollection.owner)){var t=this._instanceIds[0].entityCollection.owner;if(typeof t.getVisibleInViewport<"u")if(!t.getVisibleInViewport(e.multiViewportIndex))return}if(!(!e$2b(this.geometryInstances)&&0===this._va.length||e$2b(this.geometryInstances)&&Array.isArray(this.geometryInstances)&&0===this.geometryInstances.length||!e$2b(this.appearance)||e.mode!==C$13.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)){if(e$2b(this._error))throw this._error;if(e$2b(this.rtcCenter)&&!e.scene3DOnly)throw new t$16("RTC rendering is only available for 3D only scenes.");if(this._state!==_0x142e29.FAILED){var i=e.context;if(e$2b(this._batchTable)||at$d(this,i),this._state!==_0x142e29.COMPLETE&&this._state!==_0x142e29.COMBINED&&(this.asynchronous?ft$8(this,e):pt$9(this,e)),this._state===_0x142e29.COMBINED&&(gt$7(this,e),Fe$k(this,e),mt$6(this,e)),this._batchTable.attributes.length>0){if(0===e$1T.maximumVertexTextureImageUnits)throw new t$14("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}if(this.show&&this._state===_0x142e29.COMPLETE){this._batchTableOffsetsUpdated||Fe$k(this,e),this._recomputeBoundingSpheres&&_t$8(this,e);var n=this.appearance,r=n.material,o=!1,a=!1;this._appearance!==n?(this._appearance=n,this._material=r,o=!0,a=!0):this._material!==r?(this._material=r,a=!0):this._swipeEnabled!==this.swipeEnabled&&(this._swipeEnabled=this.swipeEnabled,a=!0);var s=this.depthFailAppearance,l=e$2b(s)?s.material:void 0;this._depthFailAppearance!==s?(this._depthFailAppearance=s,this._depthFailMaterial=l,o=!0,a=!0):this._depthFailMaterial!==l&&(this._depthFailMaterial=l,a=!0);var u=this._appearance.isTranslucent();this._translucent!==u&&(this._translucent=u,o=!0),e$2b(this._material)&&this._material.update(i);var c=e$2b(this._twoPasses)?this._twoPasses:n.closed&&u,h=!1;if(e$2b(this._instanceIds[0])&&e$2b(this._instanceIds[0].receiveObjectClamp)&&this._instanceIds[0].receiveObjectClamp&&(h=!0),o)u$_(this._createRenderStatesFunction,At$8)(this,i,n,c,h);if(a)u$_(this._createShaderProgramFunction,Tt$b)(this,e,n);if(o||a)u$_(this._createCommandsFunction,Dt$9)(this,n,r,u,c,this._colorCommands,this._pickCommands,e);if(e$2b(this._instanceIds[0])){!e$2b(this._instanceIds[0].polygon)||e$2b(this._instanceIds[0].polygon._perPositionHeight)&&(!e$2b(this._instanceIds[0].polygon._perPositionHeight)||this._instanceIds[0].polygon._perPositionHeight._value)||e$2b(this._instanceIds[0].polygon._height)?l$Z.processWideOutline(e.camera._scene,this._instanceIds):l$Z.processClampWideOutline(e.camera._scene,this._instanceIds);for(var d=0,f=this._instanceIds.length;d<f;d++){var p=this._instanceIds[d];if(p.show&&e$2b(p.geometry)&&p.geometry.outline.getValue(1))if(e$2b(p.regularcommand))e.commandList.push(p.regularcommand),this._addRenderedEdge(p.regularcommand.edgeTotalLength,p.regularcommand.edgeCount),null!=p.silhouettecommand&&(e.commandList.push(p.silhouettecommand),this._addRenderedEdge(p.silhouettecommand.edgeTotalLength,p.silhouettecommand.edgeCount));else{i=e.context;var _=p.edgedata;if(e$2b(_)){_0x30c9ea.createRegularEdgeAttributes(i,_.regular,9),_0x30c9ea.createSilhouetteEdgeAttributes(i,_.silhouette);var m=_0x30c9ea.createIndexBuffer(i);p.regularcommand=Oe$m(i,p,_.regular,m,!0,this),p.silhouettecommand=Oe$m(i,p,_.silhouette,m,!1,this),null!=p.regularcommand&&(e.commandList.push(p.regularcommand),this._addRenderedEdge(p.regularcommand.edgeTotalLength,p.regularcommand.edgeCount)),null!=p.silhouettecommand&&(e.commandList.push(p.silhouettecommand),this._addRenderedEdge(p.silhouettecommand.edgeTotalLength,p.silhouettecommand.edgeCount)),delete p.edgedata}}}}u$_(this._updateAndQueueCommandsFunction,wt$8)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,c),this._updateEdgeDistanceFalloffFactor()}}}}},y$S.prototype._addRenderedEdge=function(e,t){this._edgeCurrentTotalLength+=e,this._edgeCurrentCount+=t},y$S.prototype._updateEdgeDistanceFalloffFactor=function(){0!=this._edgeCurrentCount?(this._edgeDistanceFalloffFactor=this._edgeCurrentTotalLength/this._edgeCurrentCount*40,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0):this._edgeCurrentTotalLength=0};var St$6=new i$1c,Ct$7=new i$1c;function ze$e(e,t,i){if(i===_0x58701d.TOP){var n=i$1c.clone(e,St$6),r=i$1c.clone(e,Ct$7);r.center=o$1p.add(r.center,t,r.center),e=i$1c.union(n,r,e)}else i===_0x58701d.ALL&&(e.center=o$1p.add(e.center,t,e.center));return e}function xt$8(e,t,i){return function(){var n=e.getBatchedAttribute(t,i),r=e.attributes[i],o=r.componentsPerAttribute,a=S$12.createTypedArray(r.componentDatatype,o);return e$2b(n.constructor.pack)?n.constructor.pack(n,a,0):a[0]=n,a}}function Ft$7(e,t,i,n,r){return function(o){if(!e$2b(o)||!e$2b(o.length)||o.length<1||o.length>4)throw new t$16("value must be and array with length between 1 and 4.");var a=ve$p(o);e.setBatchedAttribute(t,i,a),"offset"===r&&(n._recomputeBoundingSpheres=!0,n._batchTableOffsetsUpdated=!1)}}var Pt$6=new o$1p;function Bt$9(e,t,i){t.boundingSphere={get:function(){var n=e._instanceBoundingSpheres[i];if(e$2b(n)&&e.updateBoundingSphere){n=n.clone();var r=e.modelMatrix,o=t.offset;e$2b(o)&&ze$e(n,o$1p.fromArray(o.get(),0,Pt$6),e._offsetInstanceExtend[i]),e$2b(r)&&(n=i$1c.transform(n,r))}return n}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[i]}}}function Et$8(e,t,i){t.pickId={get:function(){return e._pickIds[i]}}}function j$Z(e,t,i,n){e._error=n,e._state=i,t.afterRender.push((function(){e._ready=e._state===_0x142e29.COMPLETE||e._state===_0x142e29.FAILED,e$2b(n)?e._readyPromise.reject(n):e._readyPromise.resolve(e)}))}function p$U(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).camera))throw new t$16("options.camera is required.");this._camera=e.camera,this._color=u$_(e.color,e$1U.CYAN),this._updateOnChange=u$_(e.updateOnChange,!0),this.show=u$_(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}y$S.prototype.getGeometryInstanceAttributes=function(e){if(!e$2b(e))throw new t$16("id is required");if(!e$2b(this._batchTable))throw new t$16("must call update before calling getGeometryInstanceAttributes");for(var t=-1,i=this._lastPerInstanceAttributeIndex,n=this._instanceIds,r=n.length,o=0;o<r;++o){var a=(i+o)%r;if(e===n[a]){t=a;break}}if(-1!==t){var s=this._perInstanceAttributeCache[t];if(e$2b(s))return s;var l=this._batchTable,u=this._batchTableAttributeIndices;s={};var c={};for(var h in u)if(u.hasOwnProperty(h)){var d=u[h];c[h]={get:xt$8(l,t,d)};var f=!0,p=this._readOnlyInstanceAttributes;if(f&&e$2b(p)){r=p.length;for(var _=0;_<r;++_)if(h===p[_]){f=!1;break}}f&&(c[h].set=Ft$7(l,t,d,this,h))}return Bt$9(this,c,t),Et$8(this,c,t),Object.defineProperties(s,c),this._lastPerInstanceAttributeIndex=t,this._perInstanceAttributeCache[t]=s,s}},y$S.prototype.isDestroyed=function(){return!1},y$S.prototype.destroy=function(){var e,t;this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy();var i=this._va;for(e=i.length,t=0;t<e;++t)i[t].destroy();this._va=void 0;var n=this._pickIds;for(e=n.length,t=0;t<e;++t)n[t].destroy();return this._pickIds=void 0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._instanceIds=void 0,this._perInstanceAttributeCache=void 0,this._attributeLocations=void 0,i$10(this)},y$S.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._polygonOffset.enabled=!0,o$1o.fromElements(e,t,this._polygonOffset.value)):(this._polygonOffset.enabled=!1,o$1o.fromElements(0,0,this._polygonOffset.value))};var k$R=new o$1p,T$W=new p$1e,Y$J=new n$13,j$Y=new o$15,q$Y=new l$11,B$S=new a$V,J$Q=new l$12,Q$R=new e$1U,V$O=[1,1e5];function g$10(){}function T$V(e,t,i,n,r,o){var a="";return t&&(n||(a+="varying vec3 v_positionEC; \n"),a+="uniform vec4 shadowMap_lightPositionEC; \n"),i&&"vSecondColor"!==o.pickId?a+="void main() \n{ \n":a+="void main() \n{ \n czm_shadow_cast_main(); \n if (gl_FragColor.a == 0.0) \n { \n discard; \n } \n",t?a+=" float distance = length("+r+"); \n if (distance >= shadowMap_lightPositionEC.w) \n { \n discard; \n } \n distance /= shadowMap_lightPositionEC.w; // radius \n gl_FragColor = czm_packDepth(distance); \n":(e&&e$2b(o.pickId)&&"vSecondColor"===o.pickId&&(a+=" if(vColor.a < 0.1)\n {\n discard;\n }\n"),a+=" gl_FragColor = czm_packDepth(gl_FragCoord.z); \n"),a+="} \n"}function H$Y(e,t,i,n,r){var o="";return t&&(n||(o+="varying v_positionEC : vec3<f32>; \n"),o+="uniform shadowMap_lightPositionEC : vec4<f32>; \n"),o+=i?"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n":"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n czm_shadow_cast_main(); \n if (gl_FragColor.a == 0.0) \n { \n discard; \n } \n",t?o+=" var distance = length("+r+"); \n if (distance >= shadowMap_lightPositionEC.w) \n { \n discard; \n } \n distance /= shadowMap_lightPositionEC.w; // radius \n gl_FragColor = czm_packDepth(distance); \n":(o+=" var d = gl_FragCoord.z; \n",o+=" d = (d + 1.0) * 0.5; \n",o+=" gl_FragColor = czm_packDepth(d); \n"),o+="} \n"}function R$T(e,t,i,n){return"vec4 getPositionEC() \n{ \n"+(i?" return vec4("+n+", 1.0); \n":t?" return vec4(v_logPositionEC, 1.0); \n":" return czm_windowToEyeCoordinates(gl_FragCoord); \n")+"} \n"}function V$N(e,t,i){return"vec3 getNormalEC() \n{ \n"+(e?" return normalize("+t+"); \n":i?" return normalize(czm_normal*czm_computeNormal(vPositionMC.xyz)); \n":" return vec3(1.0); \n")+"} \n"}function b$17(e,t,i,n){return"fn getPositionEC() -> vec4<f32> \n{ \n"+(i?" return vec4<f32>("+n+", 1.0); \n":t?" return vec4<f32>(v_logPositionEC, 1.0); \n":" return czm_windowToEyeCoordinates(gl_FragCoord); \n")+"} \n"}function x$10(e,t,i){return"fn getNormalEC() -> vec3<f32> \n{ \n"+(e?" return normalize("+t+"); \n":i?" return normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(vPositionMC.xyz)); \n":" return vec3<f32>(1.0); \n")+"} \n"}function M$Y(){return"void main()\n {\n vec4 positionEC = getPositionEC();\n vec3 normalEC = getNormalEC();\n float depth = -positionEC.z;\n czm_shadow_receive_main();\n float visibility = getShadowVisibility(positionEC, normalEC, depth);\n gl_FragColor.rgb *= visibility;\n }"}function U$Z(){return"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n var positionEC = getPositionEC(); \n var normalEC = getNormalEC(); \n var depth = -positionEC.z; \n var visibility = getShadowVisibility(positionEC, normalEC, depth); \n czm_shadow_receive_main(); \n var fragColor = vec3<f32>(gl_FragColor.rgb) * visibility; \n gl_FragColor = vec4<f32>(fragColor, gl_FragColor.a); \n} \n"}function e$1z(e,t,i,n,r,o){this._valueCache={},this._engine=e,this._noUBO=!e.context.webgl2,this._dynamic=i,this._name=n??"no-name",this._data=t||[],this._uniformLocations={},this._uniformSizes={},this._uniformArraySizes={},this._uniformLocationPointer=0,this._needSync=!1,this._trackUbosInFrame=!1,this._noUBO?(this.updateMatrix3x3=this._updateMatrix3x3ForEffect,this.updateMatrix2x2=this._updateMatrix2x2ForEffect,this.updateFloat=this._updateFloatForEffect,this.updateFloat2=this._updateFloat2ForEffect,this.updateFloat3=this._updateFloat3ForEffect,this.updateFloat4=this._updateFloat4ForEffect,this.updateFloatArray=this._updateFloatArrayForEffect,this.updateArray=this._updateArrayForEffect,this.updateIntArray=this._updateIntArrayForEffect,this.updateMatrix=this._updateMatrixForEffect,this.updateMatrices=this._updateMatricesForEffect,this.updateVector3=this._updateVector3ForEffect,this.updateVector4=this._updateVector4ForEffect,this.updateColor3=this._updateColor3ForEffect,this.updateColor4=this._updateColor4ForEffect,this.updateDirectColor4=this._updateDirectColor4ForEffect,this.updateInt=this._updateIntForEffect,this.updateInt2=this._updateInt2ForEffect,this.updateInt3=this._updateInt3ForEffect,this.updateInt4=this._updateInt4ForEffect):(this._engine._uniformBuffers.push(this),this.updateMatrix3x3=this._updateMatrix3x3ForUniform,this.updateMatrix2x2=this._updateMatrix2x2ForUniform,this.updateFloat=this._updateFloatForUniform,this.updateFloat2=this._updateFloat2ForUniform,this.updateFloat3=this._updateFloat3ForUniform,this.updateFloat4=this._updateFloat4ForUniform,this.updateFloatArray=this._updateFloatArrayForUniform,this.updateArray=this._updateArrayForUniform,this.updateIntArray=this._updateIntArrayForUniform,this.updateMatrix=this._updateMatrixForUniform,this.updateMatrices=this._updateMatricesForUniform,this.updateVector3=this._updateVector3ForUniform,this.updateVector4=this._updateVector4ForUniform,this.updateColor3=this._updateColor3ForUniform,this.updateColor4=this._updateColor4ForUniform,this.updateDirectColor4=this._updateDirectColor4ForUniform,this.updateInt=this._updateIntForUniform,this.updateInt2=this._updateInt2ForUniform,this.updateInt3=this._updateInt3ForUniform,this.updateInt4=this._updateInt4ForUniform)}p$U.prototype.update=function(e){if(this.show){var t,i,n=this._planesPrimitives,r=this._outlinePrimitives;if(this._updateOnChange){for(i=n.length,t=0;t<i;++t)r[t]=r[t]&&r[t].destroy(),n[t]=n[t]&&n[t].destroy();n.length=0,r.length=0}if(0===n.length){var o,a=this._camera,s=a.frustum;o=s instanceof o$15?j$Y:s instanceof l$11?q$Y:s instanceof a$V?B$S:J$Q,o=s.clone(o);var l=e.frustumSplits,u=l.length-1;u<=0&&((l=V$O)[0]=this._camera.frustum.near,l[1]=this._camera.frustum.far,u=1);var c=a.positionWC,h=a.directionWC,d=a.upWC,f=a.rightWC;f=o$1p.negate(f,k$R);var p=T$W;p$1e.setColumn(p,0,f,p),p$1e.setColumn(p,1,d,p),p$1e.setColumn(p,2,h,p);var _=n$13.fromRotationMatrix(p,Y$J);for(n.length=r.length=u,t=0;t<u;++t)o.near=l[t],o.far=l[t+1],n[t]=new y$S({geometryInstances:new d$1o({geometry:new z$T({origin:c,orientation:_,frustum:o,_drawNearPlane:0===t}),attributes:{color:o$16.fromColor(e$1U.fromAlpha(this._color,.1,Q$R))},id:this.id,pickPrimitive:this}),appearance:new t$R({translucent:!0,flat:!0}),asynchronous:!1}),r[t]=new y$S({geometryInstances:new d$1o({geometry:new s$N({origin:c,orientation:_,frustum:o,_drawNearPlane:0===t}),attributes:{color:o$16.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new t$R({translucent:!1,flat:!0}),asynchronous:!1})}for(i=n.length,t=0;t<i;++t)r[t].update(e),n[t].update(e)}},p$U.prototype.isDestroyed=function(){return!1},p$U.prototype.destroy=function(){for(var e=this._planesPrimitives.length,t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return i$10(this)},g$10.getShadowCastShaderKeyword=function(e,t,i,n){return"castShadow "+(e|t<<1|i<<2|n<<3)},g$10.createShadowCastVertexShader=function(e,t,i){var n=u$_(e.useWGSL,!1),r=e.defines.slice(0),o=e.sources.slice(0);r.push("SHADOW_MAP"),i&&r.push("GENERATE_POSITION");var a=e$2b(s$U.findPositionVarying(e));if(t&&!a){for(var s=o.length,l=0;l<s;++l)o[l]=s$U.replaceMain(o[l],"czm_shadow_cast_main",n);o.push("varying vec3 v_positionEC; \nvoid main() \n{ \n czm_shadow_cast_main(); \n v_positionEC = (czm_inverseProjection * gl_Position).xyz; \n}")}return new s$U({name:e.name+"_shadowCast",defines:r,sources:o,useWGSL:e.useWGSL})},g$10.createShadowCastFragmentShader=function(e,t,i,n,r,o){var a=u$_(e.useWGSL,!1),s=e.defines.slice(0),l=e.sources.slice(0),u=s$U.findPositionVarying(e),c=e$2b(u);c||(u="v_positionEC");for(var h=l.length,d=0;d<h;++d)l[d]=s$U.replaceMain(l[d],"czm_shadow_cast_main",a);var f="";return f=a?H$Y(i,t,n,c,u):T$V(i,t,n,c,u,r),l.push(f),new s$U({name:e.name+"_shadowCast",defines:s,sources:l,useWGSL:e.useWGSL})},g$10.getShadowReceiveShaderKeyword=function(e,t,i,n){return"receiveShadow "+(e._usesDepthTexture|e._polygonOffsetSupported<<1|e._isPointLight<<2|e._isSpotLight<<3|(e._numberOfCascades>1)<<4|e.softShadows<<5|t<<6|i<<7|n<<8)},g$10.createShadowReceiveVertexShader=function(e,t,i){var n=e.defines.slice(0),r=e.sources.slice(0);return n.push("SHADOW_MAP"),t&&(i?n.push("GENERATE_POSITION_AND_NORMAL"):n.push("GENERATE_POSITION")),new s$U({name:e.name+"_shadowReceive",defines:n,sources:r,useWGSL:e.useWGSL})},g$10.createShadowReceiveFragmentShader=function(e,t,i,n,r,o){for(var a=u$_(e.useWGSL,!1),s=s$U.findNormalVarying(e),l=!n&&e$2b(s)||n&&r,u=s$U.findPositionVarying(e),c=e$2b(u),h=t._usesDepthTexture,d=(t._polygonOffsetSupported,t._isPointLight),f=t._isSpotLight,p=t._numberOfCascades>1,_=(t.debugCascadeColors,t.softShadows),m=t._pcss,g=t._quality,x=d?t._pointBias:n?t._terrainBias:t._primitiveBias,v=e.defines.slice(0),y=e.sources.slice(0),$=!1,b=y.length,T=0;T<b;++T)if(y[T].indexOf("<shadowReceive>")>-1){$=!0;break}if(!$)for(T=0;T<b;++T)y[T]=s$U.replaceMain(y[T],"czm_shadow_receive_main",a);if(v.push("SHADOW_MAP"),d?v.push("USE_CUBE_MAP_SHADOW"):h&&v.push("USE_SHADOW_DEPTH_TEXTURE"),_&&!d&&(v.push("USE_SOFT_SHADOWS"),m&&(v.push("USE_PCSS"),0==g?v.push("LOW_QUALITY_SHADOW"):1==g?v.push("MEDIUM_QUALITY_SHADOW"):v.push("HIGH_QUALITY_SHADOW"))),f&&v.push("SPOT_LIGHT_SHADOW"),p?v.push("HAS_CASCADES"):v.push("NO_CASCADES"),n&&v.push("IS_TERRAIN"),p&&i&&n&&(l?v.push("ENABLE_VERTEX_LIGHTING"):v.push("ENABLE_DAYNIGHT_SHADING")),i&&x.normalShading&&(l||o)&&(v.push("USE_NORMAL_SHADING"),x.normalShadingSmooth>0&&v.push("USE_NORMAL_SHADING_SMOOTH")),(x.normalOffset&&l||o)&&v.push("APPLY_NORMAL_OFFSET"),!$){var C="",S=e.defines.indexOf("LOG_DEPTH")>-1,w=a?x$10:V$N,E=a?U$Z:M$Y;C+=(S?a?"varying v_logPositionEC : vec3<f32>; \n":"varying vec3 v_logPositionEC; \n":"\n")+(a?b$17:R$T)(e,S,c,u)+w(l,s,o)+"#include <ShadowUboDecl> \n#include <shadowReceive> \n"+E(),y.push(C)}return new s$U({name:e.name+"shadowReceive",defines:v,sources:y,useWGSL:e.useWGSL})},Object.defineProperty(e$1z.prototype,"useUbo",{get:function(){return!this._noUBO},enumerable:!1,configurable:!0}),Object.defineProperty(e$1z.prototype,"isSync",{get:function(){return!this._needSync},enumerable:!1,configurable:!0}),e$1z.prototype.isDynamic=function(){return void 0!==this._dynamic},e$1z.prototype.getData=function(){return this._bufferData},e$1z.prototype.getBuffer=function(){return this._buffer},e$1z.prototype._fillAlignment=function(e){var t;if(t=e<=2?e:4,this._uniformLocationPointer%t!=0){var i=this._uniformLocationPointer;this._uniformLocationPointer+=t-this._uniformLocationPointer%t;for(var n=this._uniformLocationPointer-i,r=0;r<n;r++)this._data.push(0)}},e$1z.prototype.addUniform=function(e,t,i){if(void 0===i&&(i=0),!this._noUBO&&void 0===this._uniformLocations[e]){var n;if(i>0){if(t instanceof Array)throw"addUniform should not be use with Array in UBO: "+e;if(this._fillAlignment(4),this._uniformArraySizes[e]={strideSize:t,arraySize:i},16==t)t*=i;else t=t*i+(4-t)*i;n=[];for(var r=0;r<t;r++)n.push(0)}else{if(t instanceof Array)t=(n=t).length;else{t=t,n=[];for(r=0;r<t;r++)n.push(0)}this._fillAlignment(t)}this._uniformSizes[e]=t,this._uniformLocations[e]=this._uniformLocationPointer,this._uniformLocationPointer+=t;for(r=0;r<t;r++)this._data.push(n[r]);this._needSync=!0}},e$1z.prototype.addMatrix=function(e,t){this.addUniform(e,Array.prototype.slice.call(t.toArray()))},e$1z.prototype.addFloat2=function(e,t,i){var n=[t,i];this.addUniform(e,n)},e$1z.prototype.addFloat3=function(e,t,i,n){var r=[t,i,n];this.addUniform(e,r)},e$1z.prototype.addColor3=function(e,t){var i=[t.r,t.g,t.b];this.addUniform(e,i)},e$1z.prototype.addColor4=function(e,t,i){var n=[t.r,t.g,t.b,i];this.addUniform(e,n)},e$1z.prototype.addVector3=function(e,t){var i=[t.x,t.y,t.z];this.addUniform(e,i)},e$1z.prototype.addMatrix3x3=function(e){this.addUniform(e,12)},e$1z.prototype.addMatrix2x2=function(e){this.addUniform(e,8)},e$1z.prototype.create=function(){this._noUBO||this._buffer||(this._fillAlignment(4),this._bufferData=new Float32Array(this._data),this._rebuild(),this._needSync=!0)},e$1z.prototype._rebuild=function(){this._noUBO||!this._bufferData||(this._buffer=this._engine.createUniformBuffer(this._bufferData))},Object.defineProperty(e$1z.prototype,"_numBuffers",{get:function(){return this._buffers.length},enumerable:!1,configurable:!0}),Object.defineProperty(e$1z.prototype,"_indexBuffer",{get:function(){return this._bufferIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e$1z.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),e$1z.prototype._buffersEqual=function(e,t){for(var i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0},e$1z.prototype._copyBuffer=function(e,t){for(var i=0;i<e.length;++i)t[i]=e[i]},e$1z.prototype.update=function(){if(!this._noUBO){if(this.bindUniformBuffer(),!this._buffer)return void this.create();if(!this._needSync)return void(this._createBufferOnWrite=!1);if(this._buffers&&this._buffers.length>1&&this._buffers[this._bufferIndex][1]){if(this._buffersEqual(this._bufferData,this._buffers[this._bufferIndex][1]))return this._needSync=!1,void(this._createBufferOnWrite=!1);this._copyBuffer(this._bufferData,this._buffers[this._bufferIndex][1])}this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._needSync=!1,this._createBufferOnWrite=!1}},e$1z.prototype._createNewBuffer=function(){this._bufferIndex+1<this._buffers.length?(this._bufferIndex++,this._buffer=this._buffers[this._bufferIndex][0],this._createBufferOnWrite=!1,this._needSync=!0):this._rebuild()},e$1z.prototype._checkNewFrame=function(){},e$1z.prototype.updateUniform=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0===n){if(this._buffer)return void _0x41154e.Error("Cannot add an uniform after UBO has been created.");this.addUniform(e,i),n=this._uniformLocations[e]}this._buffer||this.create();for(var r=!1,o=0;o<i;o++)(16===i||this._bufferData[n+o]!==_0x4d7f4f.FloatRound(t[o]))&&(r=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[n+o]=t[o]);this._needSync=this._needSync||r},e$1z.prototype.updateUniformArray=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0!==n){this._buffer||this.create();for(var r=this._uniformArraySizes[e],o=!1,a=0,s=0,l=0;l<i;l++)if(this._bufferData[n+4*s+a]!==_0x4d7f4f.FloatRound(t[l])&&(o=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[n+4*s+a]=t[l]),++a===r.strideSize){for(;a<4;a++)this._bufferData[n+4*s+a]=0;a=0,s++}this._needSync=this._needSync||o}else _0x41154e.Error("Cannot add an uniform Array dynamically. Please, add it using addUniform.")},e$1z.prototype._cacheMatrix=function(e,t){this._checkNewFrame();var i=this._valueCache[e],n=t.updateFlag;return(void 0===i||i!==n)&&(this._valueCache[e]=n,!0)},e$1z.prototype._updateMatrix3x3ForUniform=function(e,t){for(var i=0;i<3;i++)e$1z._TempBuffer[4*i]=t[3*i],e$1z._TempBuffer[4*i+1]=t[3*i+1],e$1z._TempBuffer[4*i+2]=t[3*i+2],e$1z._TempBuffer[4*i+3]=0;this.updateUniform(e,e$1z._TempBuffer,12)},e$1z.prototype._updateMatrix3x3ForEffect=function(e,t){this._currentEffect.setMatrix3x3(e,t)},e$1z.prototype._updateMatrix2x2ForEffect=function(e,t){this._currentEffect.setMatrix2x2(e,t)},e$1z.prototype._updateMatrix2x2ForUniform=function(e,t){for(var i=0;i<2;i++)e$1z._TempBuffer[4*i]=t[2*i],e$1z._TempBuffer[4*i+1]=t[2*i+1],e$1z._TempBuffer[4*i+2]=0,e$1z._TempBuffer[4*i+3]=0;this.updateUniform(e,e$1z._TempBuffer,8)},e$1z.prototype._updateFloatForEffect=function(e,t){this._currentEffect.setFloat(e,t)},e$1z.prototype._updateFloatForUniform=function(e,t){e$1z._TempBuffer[0]=t,this.updateUniform(e,e$1z._TempBuffer,1)},e$1z.prototype._updateFloat2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setFloat2(e+n,t,i)},e$1z.prototype._updateFloat2ForUniform=function(e,t,i){e$1z._TempBuffer[0]=t,e$1z._TempBuffer[1]=i,this.updateUniform(e,e$1z._TempBuffer,2)},e$1z.prototype._updateFloat3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setFloat3(e+r,t,i,n)},e$1z.prototype._updateFloat3ForUniform=function(e,t,i,n){e$1z._TempBuffer[0]=t,e$1z._TempBuffer[1]=i,e$1z._TempBuffer[2]=n,this.updateUniform(e,e$1z._TempBuffer,3)},e$1z.prototype._updateFloat4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setFloat4(e+o,t,i,n,r)},e$1z.prototype._updateFloat4ForUniform=function(e,t,i,n,r){e$1z._TempBuffer[0]=t,e$1z._TempBuffer[1]=i,e$1z._TempBuffer[2]=n,e$1z._TempBuffer[3]=r,this.updateUniform(e,e$1z._TempBuffer,4)},e$1z.prototype._updateFloatArrayForEffect=function(e,t){this._currentEffect.setFloatArray(e,t)},e$1z.prototype._updateFloatArrayForUniform=function(e,t){this.updateUniformArray(e,t,t.length)},e$1z.prototype._updateArrayForEffect=function(e,t){this._currentEffect.setArray(e,t)},e$1z.prototype._updateArrayForUniform=function(e,t){this.updateUniformArray(e,t,t.length)},e$1z.prototype._updateIntArrayForEffect=function(e,t){this._currentEffect.setIntArray(e,t)},e$1z.prototype._updateIntArrayForUniform=function(e,t){e$1z._TempBufferInt32View.set(t),this.updateUniformArray(e,e$1z._TempBuffer,t.length)},e$1z.prototype._updateMatrixForEffect=function(e,t){this._currentEffect.setMatrix(e,t)},e$1z.prototype._updateMatrixForUniform=function(e,t){this._cacheMatrix(e,t)&&this.updateUniform(e,t.toArray(),16)},e$1z.prototype._updateMatricesForEffect=function(e,t){this._currentEffect.setMatrices(e,t)},e$1z.prototype._updateMatricesForUniform=function(e,t){this.updateUniform(e,t,t.length)},e$1z.prototype._updateVector3ForEffect=function(e,t){this._currentEffect.setVector3(e,t)},e$1z.prototype._updateVector3ForUniform=function(e,t){e$1z._TempBuffer[0]=t.x,e$1z._TempBuffer[1]=t.y,e$1z._TempBuffer[2]=t.z,this.updateUniform(e,e$1z._TempBuffer,3)},e$1z.prototype._updateVector4ForEffect=function(e,t){this._currentEffect.setVector4(e,t)},e$1z.prototype._updateVector4ForUniform=function(e,t){e$1z._TempBuffer[0]=t.x,e$1z._TempBuffer[1]=t.y,e$1z._TempBuffer[2]=t.z,e$1z._TempBuffer[3]=t.w,this.updateUniform(e,e$1z._TempBuffer,4)},e$1z.prototype._updateColor3ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setColor3(e+i,t)},e$1z.prototype._updateColor3ForUniform=function(e,t){e$1z._TempBuffer[0]=t.r,e$1z._TempBuffer[1]=t.g,e$1z._TempBuffer[2]=t.b,this.updateUniform(e,e$1z._TempBuffer,3)},e$1z.prototype._updateColor4ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setColor4(e+n,t,i)},e$1z.prototype._updateDirectColor4ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setDirectColor4(e+i,t)},e$1z.prototype._updateColor4ForUniform=function(e,t,i){e$1z._TempBuffer[0]=t.red,e$1z._TempBuffer[1]=t.green,e$1z._TempBuffer[2]=t.blue,e$1z._TempBuffer[3]=i,this.updateUniform(e,e$1z._TempBuffer,4)},e$1z.prototype._updateDirectColor4ForUniform=function(e,t){e$1z._TempBuffer[0]=t.red,e$1z._TempBuffer[1]=t.green,e$1z._TempBuffer[2]=t.blue,e$1z._TempBuffer[3]=t.alpha,this.updateUniform(e,e$1z._TempBuffer,4)},e$1z.prototype._updateIntForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setInt(e+i,t)},e$1z.prototype._updateIntForUniform=function(e,t){e$1z._TempBufferInt32View[0]=t,this.updateUniform(e,e$1z._TempBuffer,1)},e$1z.prototype._updateInt2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setInt2(e+n,t,i)},e$1z.prototype._updateInt2ForUniform=function(e,t,i){e$1z._TempBufferInt32View[0]=t,e$1z._TempBufferInt32View[1]=i,this.updateUniform(e,e$1z._TempBuffer,2)},e$1z.prototype._updateInt3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setInt3(e+r,t,i,n)},e$1z.prototype._updateInt3ForUniform=function(e,t,i,n){e$1z._TempBufferInt32View[0]=t,e$1z._TempBufferInt32View[1]=i,e$1z._TempBufferInt32View[2]=n,this.updateUniform(e,e$1z._TempBuffer,3)},e$1z.prototype._updateInt4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setInt4(e+o,t,i,n,r)},e$1z.prototype._updateInt4ForUniform=function(e,t,i,n,r){e$1z._TempBufferInt32View[0]=t,e$1z._TempBufferInt32View[1]=i,e$1z._TempBufferInt32View[2]=n,e$1z._TempBufferInt32View[3]=r,this.updateUniform(e,e$1z._TempBuffer,4)},e$1z.prototype.setTexture=function(e,t){this._currentEffect.setTexture(e,t)},e$1z.prototype.updateUniformDirectly=function(e,t){this.updateUniform(e,t,t.length),this.update()},e$1z.prototype.bindToEffect=function(e,t){this._currentEffect=e,this._currentEffectName=t},e$1z.prototype.bindUniformBuffer=function(){!this._noUBO&&this._buffer&&this._currentEffect&&this._currentEffect.bindUniformBuffer(this._buffer,this._currentEffectName)},e$1z.prototype.unbindEffect=function(){this._currentEffect=void 0,this._currentEffectName=void 0},e$1z.prototype.setDataBuffer=function(e){if(!this._buffers)return this._buffer===e;for(var t=0;t<this._buffers.length;++t){if(this._buffers[t][0]===e)return this._bufferIndex=t,this._buffer=e,this._createBufferOnWrite=!1,this._currentEffect=void 0,!0}return!1},e$1z.prototype.dispose=function(){if(!this._noUBO){var e=this._engine._uniformBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)}},e$1z._UpdatedUbosInFrame={},e$1z._MAX_UNIFORM_SIZE=256,e$1z._TempBuffer=new Float32Array(e$1z._MAX_UNIFORM_SIZE),e$1z._TempBufferInt32View=new Uint32Array(e$1z._TempBuffer.buffer);var _0x4e86da=(_0x4455f2=!0,function(e,t){var i=_0x4455f2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4455f2=!1,i}),_0x4e288d=_0x4e86da(void 0,(function(){return _0x4e288d.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e288d).search("(((.+)+)+)+$")})),_0x4455f2;_0x4e288d();const _0x3735e4="shadowMap_texture",_0xbf1295="shadowMap_textureCube",_0x32f525="u_shadowDepth";function _0x1498b5(e,t){var i=_0x3e2f69.call(this)||this;i._name=_0x27131a.SHADOW,i._shadowMap=e,i._shadowMapTexture=void 0,i._shadowMapTextureCube=void 0,i._shadowMapDepthTexture=void 0,this._initUniformMap(t)}_0x3e2f69&&(_0x1498b5.__proto__=_0x3e2f69),_0x1498b5.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x1498b5.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x1498b5.prototype,{}),_0x1498b5.prototype._initUBOStruct=function(){this._ubo.addUniform("shadowMap_matrix",16),this._ubo.addUniform("shadowMap_texelSizeDepthBiasAndNormalShadingSmooth",4),this._ubo.addUniform("shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness",4),this._ubo.addUniform("shadowMap_cascadeMatrices",4,16),this._ubo.addUniform("shadowMap_cascadeSplits",4,2),this._ubo.addUniform("shadowMap_lightPositionEC",4),this._ubo.addUniform("shadowMap_lightDirectionEC",3),this._ubo.addUniform("shadowMap_penumbraRatio",1)},_0x1498b5.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())};var _0x12a9ae=new Float32Array(16),_0x3cdc0c=new Matrix;_0x1498b5.prototype.update=function(e){!e.webgpu&&!e.webgl2||(e$2b(this._ubo)||this._initUBO(e),this._updateUniforms(),this._updateTextures(),this._isValueDirty=!1)},_0x1498b5.prototype._updateTextures=function(){var e=this._shadowMap;e._isPointLight?this._shadowMapTextureCube=e._shadowMapTexture:this._shadowMapTexture=e._shadowMapTexture,this._shadowMapDepthTexture=e._shadowMapDepthTexture},_0x1498b5.prototype._updateUniforms=function(){var e=this._shadowMap;p$1d.toArray(e._shadowMapMatrix,_0x12a9ae),Matrix.FromArrayToRef(_0x12a9ae,0,_0x3cdc0c),this._ubo.updateMatrix("shadowMap_matrix",_0x3cdc0c);var t=[];e$29.pack(e._cascadeSplits[0],t,0),e$29.pack(e._cascadeSplits[1],t,4),this._ubo.updateFloatArray("shadowMap_cascadeSplits",t),t=[],p$1d.pack(e._cascadeMatrices[0],t,0),p$1d.pack(e._cascadeMatrices[1],t,16),p$1d.pack(e._cascadeMatrices[2],t,32),p$1d.pack(e._cascadeMatrices[3],t,48),this._ubo.updateFloatArray("shadowMap_cascadeMatrices",t),this._ubo.updateFloat3("shadowMap_lightDirectionEC",e._lightDirectionEC.x,e._lightDirectionEC.y,e._lightDirectionEC.z),this._ubo.updateFloat4("shadowMap_lightPositionEC",e._lightPositionEC.x,e._lightPositionEC.y,e._lightPositionEC.z,e._lightPositionEC.w);var i=e._primitiveBias,n=1/e._textureSize.x,r=1/e._textureSize.y;this._ubo.updateFloat4("shadowMap_texelSizeDepthBiasAndNormalShadingSmooth",n,r,i.depthBias,i.normalShadingSmooth),this._ubo.updateFloat4("shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness",i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness),this._ubo.updateFloat("shadowMap_penumbraRatio",e._pcssPenumbraRatio),this._ubo.update()},_0x1498b5.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),this._setTextureToEffect(e,this._shadowMapTexture,_0x3735e4),this._setTextureToEffect(e,this._shadowMapTextureCube,_0xbf1295),this._setTextureToEffect(e,this._shadowMapDepthTexture,_0x32f525)},_0x1498b5.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}};var _0x19e8b0=new e$29,_0x33ad7a=new e$29,_0xff6662=new o$1o;function C$Y(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).context;if(!e$2b(t))throw new t$16("context is required.");if(!e$2b(e.lightCamera))throw new t$16("lightCamera is required.");if(e$2b(e.numberOfCascades)&&1!==e.numberOfCascades&&4!==e.numberOfCascades)throw new t$16("Only one or four cascades are supported.");this._enabled=u$_(e.enabled,!0),this._softShadows=u$_(e.softShadows,!0),this._pcss=u$_(e.pcss,!0),this._quality=u$_(e.shadowQuality,0),this._normalOffset=u$_(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=u$_(e.fromLightSource,!0),this.darkness=u$_(e.darkness,.5),this._darkness=this.darkness,this.maximumDistance=u$_(e.maximumDistance,1e3),this.minimumDistance=void 0,this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;var i,n=!0;(s$Y.isInternetExplorer()||s$Y.isEdge()||(s$Y.isChrome()||s$Y.isFirefox())&&s$Y.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n,this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new p$1d,this._shadowMapTexture=void 0,this._lightDirectionEC=new o$1p,this._lightPositionEC=new e$29,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new $$U,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new i$1c,this._isPointLight=u$_(e.isPointLight,!1),this._pointLightRadius=u$_(e.pointLightRadius,100),this._cascadesEnabled=!this._isPointLight&&u$_(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?u$_(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[5,50,500,Number.MAX_VALUE],this._textureSize=new o$1o,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new l$12:e$2b(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new e$29,new e$29],this._cascadeMatrices=[new p$1d,new p$1d,new p$1d,new p$1d],this._cascadeDistances=new e$29,this._cascadeUVRange=[new e$29,new e$29,new e$29,new e$29],i=this._isPointLight?6:this._cascadesEnabled?this._numberOfCascades:1,this._passes=new Array(i);for(var r=0;r<i;++r)this._passes[r]=new et$d(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._webgpu=t.webgpu,this._usesDepthTexture=t.depthTexture&&!this._webgpu,this._isPointLight&&(this._usesDepthTexture=!1),t.webgl2,this._pcss?(this._lambda=.5,this.darkness=.2,this._darkness=this.darkness):this._lambda=.9,this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,ne$H(this),this._clearCommand=new t$X({depth:1,color:new e$1U}),this._clearPassState=new n$Z(t),this._size=u$_(e.size,2048),this.size=this._size,this._pcssPenumbraRatio=.1,this._ubo=new _0x1498b5(this,t)}function et$d(e){this.camera=new $$U,this.passState=new n$Z(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0,this.uvRange=new e$29}function ie$D(e,t){return d$1m.fromCache({cull:{enabled:!0,face:G$17.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function ne$H(e){var t=!e._usesDepthTexture||e._pcss;e._primitiveRenderState=ie$D(t,e._primitiveBias),e._terrainRenderState=ie$D(t,e._terrainBias),e._pointRenderState=ie$D(t,e._pointBias)}function ae$v(e){for(var t=e._passes.length,i=0;i<t;++i){var n=e._passes[i],r=n.framebuffer;e$2b(r)&&!r.isDestroyed()&&r.destroy(),n.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function X$R(e,t){return new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:e?tt$h.LINEAR:tt$h.NEAREST,magnificationFilter:e?rt$i.LINEAR:rt$i.NEAREST,comparisonFunction:t?de$x.LESS:void 0})}function tt$e(e,t){for(var i=new t$V({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$10.DEPTH_COMPONENT,pixelDatatype:_$$.UNSIGNED_SHORT}),n=new t$V({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:X$R(!0)}),r=new t$W({context:t,depthTexture:i,colorTextures:[n],destroyAttachments:!1}),o=e._passes.length,a=0;a<o;++a){var s=e._passes[a];s.framebuffer=r,s.passState.framebuffer=r}e._shadowMapTexture=n,e._depthAttachment=i,e._colorAttachment=n}function rt$f(e,t){for(var i=new t$V({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8,sampler:X$R()}),n=new t$W({context:t,depthStencilTexture:i,destroyAttachments:!1}),r=e._passes.length,o=0;o<r;++o){var a=e._passes[o];a.framebuffer=n,a.passState.framebuffer=n}e._shadowMapTexture=i,e._depthAttachment=i}function it$9(e,t){for(var i=new t$V({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:X$R(!1)}),n=new t$V({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:t.webgpu?V$10.DEPTH_COMPONENT32F:V$10.DEPTH_COMPONENT,pixelDatatype:_$$.FLOAT,sampler:X$R(!0,!0)}),r=new t$W({context:t,colorTextures:[i],depthTexture:n,destroyAttachments:!1}),o=e._passes.length,a=0;a<o;++a){var s=e._passes[a];s.framebuffer=r,s.passState.framebuffer=r}e._shadowMapDepthTexture=n,e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function nt$a(e,t){for(var i=new t$V({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$10.DEPTH_COMPONENT16,pixelDatatype:_$$.UNSIGNED_SHORT}),n=new e$1M({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:X$R(!0)}),r=[n.negativeX,n.negativeY,n.negativeZ,n.positiveX,n.positiveY,n.positiveZ],o=0;o<6;++o){var a=new t$W({context:t,depthTexture:i,colorTextures:[r[o]],destroyAttachments:!1}),s=e._passes[o];s.framebuffer=a,s.passState.framebuffer=a}e._shadowMapTexture=n,e._depthAttachment=depthRenderbuffer,e._colorAttachment=n}function we$j(e,t){e._isPointLight?nt$a(e,t):e._pcss?it$9(e,t):e._usesDepthTexture?rt$f(e,t):tt$e(e,t)}function at$c(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==de$x.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,ne$H(e),ae$v(e),we$j(e,t))}function st$6(e,t){(!e$2b(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(ae$v(e),we$j(e,t),at$c(e,t),Ee$n(e,t))}function Ee$n(e,t,i){i=u$_(i,0),(e._isPointLight||0===i)&&(e._clearCommand.framebuffer=e._passes[i].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function ut$9(e,t){e._size=t;var i=e._passes,n=i.length,r=e._textureSize;if(e._isPointLight){t=e$1T.maximumCubeMapSize>=t?t:e$1T.maximumCubeMapSize,r.x=t,r.y=t;var o=new f$18(0,0,t,t);i[0].passState.viewport=o,i[1].passState.viewport=o,i[2].passState.viewport=o,i[3].passState.viewport=o,i[4].passState.viewport=o,i[5].passState.viewport=o}else 1===n?(t=e$1T.maximumTextureSize>=t?t:e$1T.maximumTextureSize,r.x=t,r.y=t,i[0].passState.viewport=new f$18(0,0,t,t)):4===n&&(t=e$1T.maximumTextureSize>=2*t?t:e$1T.maximumTextureSize/2,r.x=2*t,r.y=2*t,i[0].passState.viewport=new f$18(0,0,t,t),i[1].passState.viewport=new f$18(t,0,t,t),i[2].passState.viewport=new f$18(0,t,t,t),i[3].passState.viewport=new f$18(t,t,t,t));e._clearPassState.viewport=new f$18(0,0,r.x,r.y);for(var a=0;a<n;++a){var s=i[a],l=s.passState.viewport,u=l.x/r.x,c=l.y/r.y,h=l.width/r.x,d=l.height/r.y;s.textureOffsets=new p$1d(h,0,0,u,0,d,0,c,0,0,1,0,0,0,0,1),s.uvRange.x=u,s.uvRange.y=u+.5,s.uvRange.z=c,s.uvRange.w=c+.5}}_0x1498b5.prototype._initUniformMap=function(e){var t=this._shadowMap,i={};if(!e.webgl2&&!e.webgpu){var n=t._isPointLight?t._pointBias:t._primitiveBias;i.shadowMap_matrix=function(){return t._shadowMapMatrix},i.shadowMap_cascadeSplits=function(){return t._cascadeSplits},i.shadowMap_cascadeMatrices=function(){return t._cascadeMatrices},i.shadowMap_cascadeUVRange=function(){return t._cascadeUVRange},i.shadowMap_lightDirectionEC=function(){return t._lightDirectionEC},i.shadowMap_lightPositionEC=function(){return t._lightPositionEC},i.shadowMap_cascadeDistances=function(){return t._cascadeDistances},i.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth=function(){var e=_0xff6662;return e.x=1/t._textureSize.x,e.y=1/t._textureSize.y,e$29.fromElements(e.x,e.y,n.depthBias,n.normalShadingSmooth,_0x19e8b0)},i.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness=function(){return e$29.fromElements(n.normalOffsetScale,t._distance,t.maximumDistance,t._darkness,_0x33ad7a)},i.shadowMap_penumbraRatio=function(){return t._pcssPenumbraRatio}}i.shadowMap_texture=function(){return t._shadowMapTexture},i.shadowMap_textureCube=function(){return t._shadowMapTexture},i.u_shadowDepth=function(){return t._shadowMapDepthTexture},this._uniformMap=i},_0x1498b5.prototype.isDestroyed=function(){return!1},_0x1498b5.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)},C$Y.MAXIMUM_DISTANCE=2e4,C$Y.NEAR_PLANE=1,C$Y.UPDATE_CASCADE_TOLERANCE_DISTANCE=1,C$Y.prototype.debugCreateRenderStates=function(){ne$H(this)},Object.defineProperties(C$Y.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){ut$9(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}},penumbraRatio:{get:function(){return this._pcssPenumbraRatio},set:function(e){this._pcssPenumbraRatio=e}}});var ot$9=new f$18;function mt$5(e,t){var i;i=e._isPointLight?"uniform samplerCube shadowMap_textureCube; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n vec2 uv = v_textureCoordinates; \n vec3 dir; \n \n if (uv.y < 0.5) \n { \n if (uv.x < 0.333) \n { \n dir.x = -1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = -1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else \n { \n dir.z = -1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 1.0; \n } \n } \n else \n { \n if (uv.x < 0.333) \n { \n dir.x = 1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = 1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else \n { \n dir.z = 1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 3.0; \n } \n } \n \n float shadow = czm_unpackDepth(textureCube(shadowMap_textureCube, dir)); \n gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n":"uniform sampler2D shadowMap_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n"+(e._usesDepthTexture?" float shadow = texture2D(shadowMap_texture, v_textureCoordinates).r; \n":" float shadow = czm_unpackDepth(texture2D(shadowMap_texture, v_textureCoordinates)); \n")+" gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n";var n=t.createViewportQuadCommand(i,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return n.pass=Le$s.OVERLAY,n}function ft$7(e,t){var i=t.context,n=t.context.drawingBufferWidth,r=t.context.drawingBufferHeight,o=.3*Math.min(n,r),a=ot$9;a.x=n-o,a.y=0,a.width=o,a.height=o;var s=e._debugShadowViewCommand;e$2b(s)||(s=mt$5(e,i),e._debugShadowViewCommand=s),(!e$2b(s.renderState)||!f$18.equals(s.renderState.viewport,a))&&(s.renderState=d$1m.fromCache({viewport:f$18.clone(a)})),t.commandList.push(e._debugShadowViewCommand)}var A$13=new Array(8);A$13[0]=new e$29(-1,-1,-1,1),A$13[1]=new e$29(1,-1,-1,1),A$13[2]=new e$29(1,1,-1,1),A$13[3]=new e$29(-1,1,-1,1),A$13[4]=new e$29(-1,-1,1,1),A$13[5]=new e$29(1,-1,1,1),A$13[6]=new e$29(1,1,1,1),A$13[7]=new e$29(-1,1,1,1);for(var N$Q=new p$1d,se$y=new Array(8),ue$B=0;ue$B<8;++ue$B)se$y[ue$B]=new e$29;function ct$8(e,t){return new y$S({geometryInstances:[new d$1o({geometry:new o$17({minimum:new o$1p(-.5,-.5,-.5),maximum:new o$1p(.5,.5,.5)}),attributes:{color:o$16.fromColor(t)}}),new d$1o({geometry:new a$U({radius:.5}),attributes:{color:o$16.fromColor(t)}})],appearance:new t$R({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var ht$8=[e$1U.RED,e$1U.GREEN,e$1U.BLUE,e$1U.MAGENTA],_t$7=new o$1p;function lt$4(e,t){ft$7(e,t);var i=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(i&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new p$U({camera:e._sceneCamera,color:e$1U.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){i&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new p$U({camera:e._shadowMapCamera,color:e$1U.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t);for(var n=0;n<e._numberOfCascades;++n)i&&(e._debugCascadeFrustums[n]=e._debugCascadeFrustums[n]&&e._debugCascadeFrustums[n].destroy(),e._debugCascadeFrustums[n]=new p$U({camera:e._passes[n].camera,color:ht$8[n],updateOnChange:!1})),e._debugCascadeFrustums[n].update(t)}}else if(e._isPointLight){if(!e$2b(e._debugLightFrustum)||e._needsUpdate){var r=e._shadowMapCamera.positionWC,o=n$13.IDENTITY,a=2*e._pointLightRadius,s=o$1p.fromElements(a,a,a,_t$7),l=p$1d.fromTranslationQuaternionRotationScale(r,o,s,N$Q);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=ct$8(l,e$1U.YELLOW)}e._debugLightFrustum.update(t)}else(!e$2b(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new p$U({camera:e._shadowMapCamera,color:e$1U.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function $$U(){this.viewMatrix=new p$1d,this.inverseViewMatrix=new p$1d,this.frustum=void 0,this.positionCartographic=new a$18,this.positionWC=new o$1p,this.directionWC=o$1p.clone(o$1p.UNIT_Z),this.upWC=o$1p.clone(o$1p.UNIT_Y),this.rightWC=o$1p.clone(o$1p.UNIT_X),this.viewProjectionMatrix=new p$1d}$$U.prototype.clone=function(e){p$1d.clone(e.viewMatrix,this.viewMatrix),p$1d.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),a$18.clone(e.positionCartographic,this.positionCartographic),o$1p.clone(e.positionWC,this.positionWC),o$1p.clone(e.directionWC,this.directionWC),o$1p.clone(e.upWC,this.upWC),o$1p.clone(e.rightWC,this.rightWC)};var dt$9=new p$1d(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);$$U.prototype.getViewProjection=function(){var e=this.viewMatrix,t=this.frustum.projectionMatrix;return p$1d.multiply(t,e,this.viewProjectionMatrix),p$1d.multiply(dt$9,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var vt$9=new Array(5),gt$6=new Array(4),Ct$6=new Array(4),pt$8=new o$15,xt$7=new Array(4),Oe$l=new o$1p,Fe$j=new o$1p;function St$5(e,t){var i,n=e._shadowMapCamera,r=e._sceneCamera,o=r.frustum.near,a=r.frustum.far,s=e._numberOfCascades,l=a-o,u=a/o,c=e._lambda,h=!1;t.shadowState.closestObjectSize<200&&(h=!0,c=.95);var d=xt$7,f=vt$9;for(f[0]=o,f[s]=a,i=0;i<s;++i){var p=(i+1)/s,_=o*Math.pow(u,p),m=o+l*p,g=e$2a.lerp(m,_,c);f[i+1]=g,d[i]=g-f[i]}if(h){for(i=0;i<s;++i)d[i]=Math.min(d[i],e._maximumCascadeDistances[i]);var x=f[0];for(i=0;i<s-1;++i)x+=d[i],f[i+1]=x}var v=gt$6,y=Ct$6;for(i=0;i<s;++i)v[i]=f[i],y[i]=f[i+1],0==i?y[i]+=C$Y.UPDATE_CASCADE_TOLERANCE_DISTANCE:(v[i]-=C$Y.UPDATE_CASCADE_TOLERANCE_DISTANCE,y[i]+=2*C$Y.UPDATE_CASCADE_TOLERANCE_DISTANCE);e$29.unpack(v,0,e._cascadeSplits[0]),e$29.unpack(y,0,e._cascadeSplits[1]),e$29.unpack(d,0,e._cascadeDistances);var $=n.frustum,b=$.left,T=$.right,C=$.bottom,S=$.top,w=$.near,E=$.far,P=n.positionWC,A=n.directionWC,L=n.upWC,M=r.frustum.clone(pt$8),R=n.getViewProjection();for(i=0;i<s;++i){M.near=v[i],M.far=y[i];for(var O=p$1d.multiply(M.projectionMatrix,r.viewMatrix,N$Q),I=p$1d.inverse(O,N$Q),D=p$1d.multiply(R,I,N$Q),B=o$1p.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Oe$l),N=o$1p.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,Fe$j),F=0;F<8;++F){var U=e$29.clone(A$13[F],se$y[F]);p$1d.multiplyByVector(D,U,U),o$1p.divideByScalar(U,U.w,U),o$1p.minimumByComponent(U,B,B),o$1p.maximumByComponent(U,N,N)}B.x=Math.max(B.x,0),B.y=Math.max(B.y,0),B.z=0,N.x=Math.min(N.x,1),N.y=Math.min(N.y,1),N.z=Math.min(N.z,1);var G=e._passes[i],z=G.camera;z.clone(n);var V=z.frustum;V.left=b+B.x*(T-b),V.right=b+N.x*(T-b),V.bottom=C+B.y*(S-C),V.top=C+N.y*(S-C),V.near=w+B.z*(E-w),V.far=w+N.z*(E-w),G.cullingVolume=z.frustum.computeCullingVolume(P,A,L)}}function bt$7(e){var t,i=e._sceneCamera,n=e._numberOfCascades;for(t=0;t<n;++t){var r=e._passes[t],o=r.camera,a=e._cascadeMatrices[t];p$1d.multiply(o.getViewProjection(),i.inverseViewMatrix,a),p$1d.multiply(r.textureOffsets,a,a),e$29.clone(r.uvRange,e._cascadeUVRange[t])}}var yt$7=new p$1d,wt$7=new o$1p,Et$7=new o$1p,Te$n=new o$1p;function Ot$7(e,t){var i=e._shadowMapCamera,n=e._sceneCamera,r=p$1d.multiply(n.frustum.projectionMatrix,n.viewMatrix,N$Q),o=p$1d.inverse(r,N$Q),a=i.directionWC,s=n.directionWC,l=o$1p.cross(a,s,wt$7);s=o$1p.cross(l,a,Et$7),o$1p.normalize(s,s),o$1p.normalize(l,l);for(var u=o$1p.fromElements(0,0,0,Te$n),c=p$1d.computeView(u,a,s,l,yt$7),h=p$1d.multiply(c,o,N$Q),d=o$1p.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Oe$l),f=o$1p.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,Fe$j),p=0;p<8;++p){var _=e$29.clone(A$13[p],se$y[p]);p$1d.multiplyByVector(h,_,_),o$1p.divideByScalar(_,_.w,_),o$1p.minimumByComponent(_,d,d),o$1p.maximumByComponent(_,f,f)}f.z+=1e3,d.z-=10;var m=Te$n;m.x=-.5*(d.x+f.x),m.y=-.5*(d.y+f.y),m.z=-f.z;var g=p$1d.fromTranslation(m,N$Q);c=p$1d.multiply(g,c,c);var x=.5*(f.x-d.x),v=.5*(f.y-d.y),y=f.z-d.z,$=i.frustum;$.left=-x,$.right=x,$.bottom=-v,$.top=v,$.near=e._webgpu?.01:-y,$.far=y,p$1d.clone(c,i.viewMatrix),p$1d.inverse(c,i.inverseViewMatrix),p$1d.getTranslation(i.inverseViewMatrix,i.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(i.positionWC,i.positionCartographic),o$1p.clone(a,i.directionWC),o$1p.clone(s,i.upWC),o$1p.clone(l,i.rightWC)}var Ft$6=[new o$1p(-1,0,0),new o$1p(0,-1,0),new o$1p(0,0,-1),new o$1p(1,0,0),new o$1p(0,1,0),new o$1p(0,0,1)],Tt$a=[new o$1p(0,-1,0),new o$1p(0,0,-1),new o$1p(0,-1,0),new o$1p(0,-1,0),new o$1p(0,0,1),new o$1p(0,-1,0)],At$7=[new o$1p(0,0,1),new o$1p(1,0,0),new o$1p(-1,0,0),new o$1p(0,0,-1),new o$1p(1,0,0),new o$1p(1,0,0)];function Pt$5(e,t){var i=new o$15;i.fov=e$2a.PI_OVER_TWO,i.near=1,i.far=e._pointLightRadius,i.aspectRatio=1;for(var n=0;n<6;++n){var r=e._passes[n].camera;r.positionWC=e._shadowMapCamera.positionWC,r.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(r.positionWC,r.positionCartographic),r.directionWC=Ft$6[n],r.upWC=Tt$a[n],r.rightWC=At$7[n],p$1d.computeView(r.positionWC,r.directionWC,r.upWC,r.rightWC,r.viewMatrix),p$1d.inverse(r.viewMatrix,r.inverseViewMatrix),r.frustum=i}}var Dt$8=new o$1p,Lt$6=new o$1p,Ae$q=new i$1c,Pe$j=Ae$q.center;function Vt$8(e,t){var i=e._sceneCamera,n=e._shadowMapCamera,r=Ae$q;if(e._cascadesEnabled){if(i.frustum.near>=e.maximumDistance)return e._outOfView=!0,void(e._needsUpdate=!1);var o=t.mapProjection.ellipsoid.geodeticSurfaceNormal(i.positionWC,Dt$8),a=o$1p.negate(n.directionWC,Lt$6),s=o$1p.dot(o,a),l=e$2a.clamp(s/.1,0,1);if(e._darkness=e$2a.lerp(1,e.darkness,l),s<0)return e._outOfView=!0,void(e._needsUpdate=!1);e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)r.center=n.positionWC,r.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(r)===Ae$u.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),i$1c.clone(r,e._boundingSphere);else{var u=n.frustum.far/2,c=o$1p.add(n.positionWC,o$1p.multiplyByScalar(n.directionWC,u,Pe$j),Pe$j);r.center=c,r.radius=u,e._outOfView=t.cullingVolume.computeVisibility(r)===Ae$u.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),i$1c.clone(r,e._boundingSphere)}}function Nt$7(e,t){var i=t.camera,n=e._lightCamera,r=e._sceneCamera,o=e._shadowMapCamera;e._cascadesEnabled?o$1p.clone(n.directionWC,o.directionWC):e._isPointLight?o$1p.clone(n.positionWC,o.positionWC):o.clone(n);var a,s,l=e._lightDirectionEC;p$1d.multiplyByPointAsVector(i.viewMatrix,o.directionWC,l),o$1p.normalize(l,l),o$1p.negate(l,l),p$1d.multiplyByPoint(i.viewMatrix,o.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius,e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),s=Math.min(t.shadowState.farPlane,e.maximumDistance+1),s=Math.max(s,a+1)):(a=i.frustum.near,s=e.maximumDistance),e._sceneCamera=v$K.clone(i,r),i.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=s,e._distance=s-a,Vt$8(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}function Rt$6(e,t,i,n,r,o){var a,s,l;if(e$2b(o)&&(a=o.shaderProgram,s=o.renderState,l=o.uniformMap),(o=i$_.shallowClone(i,o)).castShadows=!0,o.receiveShadows=!1,!e$2b(a)||r!==i.shaderProgram.id||t){var u=i.shaderProgram,c=i.pass===Le$s.GLOBE,h=i.pass!==Le$s.TRANSLUCENT,d=e._isPointLight,f=e._usesDepthTexture,p=i.selectCastShadows,_=g$10.getShadowCastShaderKeyword(d,c,f,h);if(!e$2b(a=n.shaderCache.getDerivedShaderProgram(u,_))){var m=u.vertexShaderSource,g=u.fragmentShaderSource,x=g$10.createShadowCastVertexShader(m,d,c),v=g$10.createShadowCastFragmentShader(g,d,f,h,o,p);a=n.shaderCache.createDerivedShaderProgram(u,_,{vertexShaderSource:x,fragmentShaderSource:v,attributeLocations:u._attributeLocations})}s=e._primitiveRenderState,d?s=e._pointRenderState:c&&(s=e._terrainRenderState),i.renderState.cull.enabled||((s=l$1g(s,!1)).cull=l$1g(s.cull,!1),s.cull.enabled=!1,s=d$1m.fromCache(s)),l=i.uniformMap}return o.shaderProgram=a,o.renderState=s,o.uniformMap=l,o}C$Y.prototype.update=function(e){if(Nt$7(this,e),this._needsUpdate)if(st$6(this,e.context),this._isPointLight&&Pt$5(this,e),this._cascadesEnabled&&(Ot$7(this,e),this._numberOfCascades>1&&St$5(this,e),this._numberOfCascades>1&&bt$7(this)),this._isPointLight)this._shadowMapCullingVolume=i$W.fromBoundingSphere(this._boundingSphere);else{var t=this._shadowMapCamera,i=t.positionWC,n=t.directionWC,r=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(i,n,r),1===this._passes.length&&this._passes[0].camera.clone(t)}if(1===this._passes.length){var o=this._sceneCamera.inverseViewMatrix;p$1d.multiply(this._shadowMapCamera.getViewProjection(),o,this._shadowMapMatrix)}this.debugShow&<$4(this,e),this._ubo.update(e.context)},C$Y.prototype.updatePass=function(e,t){Ee$n(this,e,t)},C$Y.createReceiveDerivedCommand=function(e,t,i,n,r){e$2b(r)||(r={});var o=e.length>0,a=t.shaderProgram,s=a.vertexShaderSource,l=a.fragmentShaderSource,u=t.pass===Le$s.GLOBE,c=t.pass===Le$s.S3MTiles,h=!1;if(u&&(h=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&o){var d,f;e$2b(r.receiveCommand)&&(d=r.receiveCommand.shaderProgram,f=r.receiveCommand.uniformMap);var p=!1;e$2b(r.receiveCommand)||(p=!0),r.receiveCommand=i$_.shallowClone(t,r.receiveCommand),r.castShadows=!1,r.receiveShadows=!0,p&&r.receiveCommand.addUniformBuffer(e[0]._ubo);var _=r.receiveShaderCastShadows!==t.castShadows,m=r.receiveShaderProgramId!==t.shaderProgram.id;if(!e$2b(d)||m||i||_){var g=g$10.getShadowReceiveShaderKeyword(e[0],t.castShadows,u,h);if(!e$2b(d=n.shaderCache.getDerivedShaderProgram(a,g))){var x=g$10.createShadowReceiveVertexShader(s,u,h),v=g$10.createShadowReceiveFragmentShader(l,e[0],t.castShadows,u,h,c);d=n.shaderCache.createDerivedShaderProgram(a,g,{vertexShaderSource:x,fragmentShaderSource:v,attributeLocations:a._attributeLocations})}f=e[0]._ubo._uniformMap?p$19(t.uniformMap,e[0]._ubo._uniformMap,!1):t.uniformMap}r.receiveCommand.shaderProgram=d,r.receiveCommand._uniformMap=f,r.receiveShaderProgramId=t.shaderProgram.id,r.receiveShaderCastShadows=t.castShadows}return r},C$Y.createCastDerivedCommand=function(e,t,i,n,r){if(e$2b(r)||(r={}),t.castShadows){var o=r.castCommands;e$2b(o)||(o=r.castCommands=[]);var a=r.castShaderProgramId,s=e.length;o.length=s;for(var l=0;l<s;++l)o[l]=Rt$6(e[l],i,t,n,a,o[l]);r.castShaderProgramId=t.shaderProgram.id}return r},C$Y.prototype.isDestroyed=function(){return!1},C$Y.prototype.destroy=function(){ae$v(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(var e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return i$10(this)};var _0x277dff=(_0x2917f5=!0,function(e,t){var i=_0x2917f5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2917f5=!1,i}),_0x42ebf6=_0x277dff(void 0,(function(){return _0x42ebf6.toString().search("(((.+)+)+)+$").toString().constructor(_0x42ebf6).search("(((.+)+)+)+$")})),_0x2917f5;_0x42ebf6();var _0x3eecee=new i$V("computeShadowRatio");function _0x38ed3e(e){if(!e$2b(e))throw new t$16("scene are required.");if(!e.context.depthTexture)throw new t$16("the depth buffer is not supported.");this._scene=e,this._depthBuffer=void 0,this._globalDepthBuffer=void 0,this._frameState=void 0,this._qureyRegion=[],this._bottom=0,this._extend=0,this._arrPointCommand=[],this._arrRasterPointCommand=[],this._boundingSphere=new i$1c,this._bounds=[],this._worldMatrix=p$1d.IDENTITY.clone(),this._spacing=10,this._arrRasterTexture=[],this._arrAssisTexture=[],this._startTime=a$15.now(),this._endTime=a$15.now(),this._currentTime=0,this._timeInterval=1,this._timeUpdate=!1,this._update=!1,this._id=0,this._name="",this._sceneName="",this._checking=!1,this._visibleViewport=4095,this._points=[],this._queryPointsEvent=new o$1h,this._enuPoints=[],this._shadowMapParams={oriMaxDis:100,oriSize:128,analysisSize:Math.min(8192,e$1T.maximumTextureSize)},this.shadowMap=new C$Y({context:this._scene.context,lightCamera:this._scene._sunCamera,enabled:!0,maximumDistance:this._shadowMapParams.oriMaxDis,size:this._shadowMapParams.oriSize,pcss:!1,softShadows:!1}),this._shadowMapMaxDistance=this._shadowMapParams.oriMaxDis,this._isPointsVisible=!0,this._colorTable=void 0,this._hypsometricTexture=void 0,this._voxelData={},this._volDirty=!1}function _0x25bd36(e,t){var i=!1,n=t.split(" ");if(n.length>1){var r=n[0],o=n[1];for(var a in e.defines)if(-1!==e.defines[a].indexOf(r))return void(e.defines[a]=r+" "+o);e.defines.push(t)}else{for(var a in e.defines)if(e.defines[a]===t){i=!0;break}i||e.defines.push(t)}}function _0x2b1109(e,t,i){if(e$2b(t)){var n=t.shaderProgram.fragmentShaderSource,r=t.shaderProgram.vertexShaderSource;_0x25bd36(n,i);var o=t.shaderProgram._attributeLocations;t.shaderProgram.destroy(),t.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:o})}}function _0x223f51(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function _0x444b2f(e,t,i){if(e$2b(t)){var n=t.shaderProgram.vertexShaderSource,r=t.shaderProgram.fragmentShaderSource;_0x223f51(r,i);var o=t.shaderProgram._attributeLocations;t.shaderProgram.destroy(),t.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:o})}}function _0x22fda8(e){for(var t=0;t<e._arrPointCommand.length;t++)e$2b(e._arrPointCommand[t])&&(e._arrPointCommand[t].vertexArray=e._arrPointCommand[t].vertexArray&&e._arrPointCommand[t].vertexArray.destroy(),e._arrPointCommand[t].shaderProgram=e._arrPointCommand[t].shaderProgram&&e._arrPointCommand[t].shaderProgram.destroy(),e._arrPointCommand[t]=void 0);e._arrPointCommand.length=0;for(t=0;t<e._arrRasterPointCommand.length;t++)e$2b(e._arrRasterPointCommand[t])&&(e._arrRasterPointCommand[t].vertexArray=e._arrRasterPointCommand[t].vertexArray&&e._arrRasterPointCommand[t].vertexArray.destroy(),e._arrRasterPointCommand[t].shaderProgram=e._arrRasterPointCommand[t].shaderProgram&&e._arrRasterPointCommand[t].shaderProgram.destroy(),e._arrRasterPointCommand[t]=void 0);e._arrRasterPointCommand.length=0}function _0x51fd3e(e){for(var t=0;t<e._arrRasterTexture.length;t++)e$2b(e._arrRasterTexture[t])&&(e._arrRasterTexture[t].destroy(),e._arrRasterTexture[t]=null);e._arrRasterTexture.length=0;for(t=0;t<e._arrAssisTexture.length;t++)e$2b(e._arrAssisTexture[t])&&(e._arrAssisTexture[t].destroy(),e._arrAssisTexture[t]=null);e._arrAssisTexture.length=0}function _0x54a0d4(e,t){var i=t.length/2,n=0,r=0,o=0;for(n=0,r=i-1;n<i;r=n++){var a=t[2*n],s=t[2*n+1],l=t[2*r],u=t[2*r+1],c=Math.min(a,l),h=Math.max(a,l),d=Math.min(s,u),f=Math.max(s,u);if(u!=s){if(d>e.y==f<e.y){var p=(l-a)*(e.y-s)/(u-s)+a;if(e.x<p)o=!o;else if(e.x==p)return!0}}else if(e.y==s&&e.x>=c&&e.x<=h)return!0}return o}function _0x9c0a49(e,t,i){var n=e._bounds[0],r=e._bounds[1],o=e._bounds[2],a=e._bounds[3],s=0,l=0,u=o$1p.fromDegrees(n,r,t),c=new i$15(0,0,0),h=new p$1d,d=new p$1d,f=new o$1p,p=new o$1p,_=new o$1p;m$17.headingPitchRollToFixedFrame(u,c,t$13.WGS84,m$17.eastNorthUpToFixedFrame,h),p$1d.inverse(h,d);var m=o$1p.fromDegrees(o,r,e._bottom);p$1d.multiplyByPoint(d,m,p);var g=o$1p.fromDegrees(n,a,e._bottom);p$1d.multiplyByPoint(d,g,_);for(var x=o$1p.distance(new o$1p(0,0,0),p),v=o$1p.distance(new o$1p(0,0,0),_),y=(Math.floor(v/e._spacing),0);y<x;y+=e._spacing){l=0;for(var $=0;$<v;$+=e._spacing){p$1d.multiplyByPoint(h,new o$1p(e._spacing*s,e._spacing*l,0),f);var b=a$18.fromCartesian(f),T=e._getVolValue(b,i);e._voxelData.values.push(T),l++}s++}e._voxelData.width=s,e._voxelData.height=l,e._voxelData.bounds={leftBottom:{x:n,y:r},rightTop:{x:o,y:a}}}function _0x230640(e){if(0===e._qureyRegion.length/2||0===e._bounds.length)return[];if(e._enuPoints.length>0)return e._enuPoints;var t=e._bounds[0],i=e._bounds[1],n=e._bounds[2],r=e._bounds[3],o=0,a=0,s=0,l=o$1p.fromDegrees(t,i,e._bottom),u=new i$15(0,0,0),c=new p$1d,h=new p$1d,d=new o$1p,f=new o$1p,p=new o$1p;m$17.headingPitchRollToFixedFrame(l,u,t$13.WGS84,m$17.eastNorthUpToFixedFrame,c),p$1d.inverse(c,h);var _=o$1p.fromDegrees(n,i,e._bottom);p$1d.multiplyByPoint(h,_,f);var m=o$1p.fromDegrees(t,r,e._bottom);p$1d.multiplyByPoint(h,m,p);for(var g=o$1p.distance(new o$1p(0,0,0),f),x=o$1p.distance(new o$1p(0,0,0),p),v=0;v<g;v+=e._spacing){a++,s=0;for(var y=0;y<x;y+=e._spacing){s++,p$1d.multiplyByPoint(c,new o$1p(e._spacing*a,e._spacing*s,0),d);var $=a$18.fromCartesian(d),b=e$2a.toDegrees($.longitude),T=e$2a.toDegrees($.latitude);!_0x54a0d4({x:b,y:T},e._qureyRegion)||(e._enuPoints[o++]=b,e._enuPoints[o++]=T)}}return e._enuPoints}function _0x42f13c(e){var t=e._qureyRegion.length/2;if(0===t)return[];if(t<3)return new i$1c;for(var i=Number.MAX_VALUE,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=-Number.MAX_VALUE,a=0;a<t;a++)i=Math.min(e._qureyRegion[2*a],i),n=Math.min(e._qureyRegion[2*a+1],n),r=Math.max(e._qureyRegion[2*a],r),o=Math.max(e._qureyRegion[2*a+1],o);e._bounds.length=0,e._bounds.push(i),e._bounds.push(n),e._bounds.push(r),e._bounds.push(o);var s=o$1p.fromDegrees(.5*(r+i),.5*(o+n),e._bottom+.5*e._extend);o$1p.clone(s,e._boundingSphere.center),p$1d.setTranslation(e._worldMatrix,s,e._worldMatrix);var l=o$1p.fromDegrees(i,n,e._bottom),u=o$1p.fromDegrees(r,o,e._bottom+e._extend);return o$1p.subtract(u,l,s),e._boundingSphere.radius=.5*o$1p.magnitude(s),e._boundingSphere}function _0x422589(e,t,i,n){var r=i.length/2,o=S$12.createTypedArray(S$12.FLOAT,3*r),a=S$12.createTypedArray(S$12.FLOAT,2*r),s=null;ce$x.UNSIGNED_SHORT,r<65535?s=S$12.createTypedArray(S$12.UNSIGNED_SHORT,r):(s=S$12.createTypedArray(S$12.UNSIGNED_INT,r),ce$x.UNSIGNED_INT);var l=e._bounds[2]-e._bounds[0],u=e._bounds[3]-e._bounds[1],c=e._bounds[0]-.025*l,h=e._bounds[1]-.025*u;l+=.05*l,u+=.05*u;var d=new e$29(0,0,0,1),f=new p$1d;p$1d.inverse(e._worldMatrix,f);for(var p=0;p<r;p++){var _=o$1p.fromDegrees(i[2*p],i[2*p+1],n);e._points.push(_),d.x=_.x,d.y=_.y,d.z=_.z,p$1d.multiplyByVector(f,d,d),o[3*p]=d.x,o[3*p+1]=d.y,o[3*p+2]=d.z,a[2*p]=(i[2*p]-c)/l*2-1,a[2*p+1]=(i[2*p+1]-h)/u*2-1,s[p]=p}var m=t$Y.createVertexBuffer({context:t,typedArray:o,usage:A$19.STATIC_DRAW}),g=t$Y.createVertexBuffer({context:t,typedArray:a,usage:A$19.STATIC_DRAW}),x=[],v={offset:0,aPosition:1,aTexCoord0:2},y=t.createBillboardOffsetVertexBuffer();x.push({name:"offset",index:v.offset,vertexBuffer:y,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var $=S$12.getSizeInBytes(S$12.FLOAT);x.push({name:"aPosition",index:v.aPosition,vertexBuffer:m,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*$,normalize:!1,instanceDivisor:1}),x.push({name:"aTexCoord0",index:v.aTexCoord0,vertexBuffer:g,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:2*$,normalize:!1,instanceDivisor:1});var b=t.createBillboardPointIndexBuffer(),T=new t$V({context:t,width:1024,height:1024,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),flipY:!1});e._arrRasterTexture.push(T);var C=new t$V({context:t,width:1024,height:1024,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),flipY:!1});e._arrAssisTexture.push(C);var S=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$s.OPAQUE,owner:e,cull:!0,instanceCount:r});e._arrPointCommand.push(S),S.vertexArray=new c$12({context:t,attributes:x,indexBuffer:b});var w=new s$U({name:"ShadowAnalysisVp",sources:[_0x26c9cf]});w.defines.push("RENDER_POINT");var E=new s$U({name:"ShadowAnalysisFp",sources:[_0x4e4501]});e$2b(e._colorTable)&&E.defines.push("COLOR_TABLE"),S.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:w,fragmentShaderSource:E,attributeLocations:v}),S.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),S.uniformMap={uPointSize:function(){return 10},uTexture0:function(){return T},uHypsometricTexture:function(){return e._hypsometricTexture}};var P=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$s.OPAQUE,owner:e,cull:!1,instanceCount:r});e._arrRasterPointCommand.push(P),P.vertexArray=new c$12({context:t,attributes:x,indexBuffer:b}),(w=new s$U({name:"ShadowQueryVp",sources:[_0x2328b4]})).defines.push("RENDER_POINT");var A=new s$U({name:"ShadowQueryFp",sources:[_0x485098]});(M=e.shadowMap)._usesDepthTexture&&A.defines.push("USE_SHADOW_DEPTH_TEXTURE"),P.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:w,fragmentShaderSource:A,attributeLocations:v}),P.renderState=d$1m.fromCache({viewport:new f$18(0,0,1024,1024),cull:{enabled:!1},depthTest:{enabled:!1}});var L=1/e._currentTime,M=e.shadowMap;P.uniformMap={uPointSize:function(){return 4},uSpacing:function(){return L},shadowMap_texture:function(){return M._shadowMapTexture},shadowMap_textureCube:function(){return M._shadowMapTexture},shadowMap_matrix:function(){return M._shadowMapMatrix},shadowMap_cascadeSplits:function(){return M._cascadeSplits},shadowMap_cascadeMatrices:function(){return M._cascadeMatrices},shadowMap_lightDirectionEC:function(){return M._lightDirectionEC},shadowMap_lightPositionEC:function(){return M._lightPositionEC},shadowMap_cascadeDistances:function(){return M._cascadeDistances},uAssisTexture:function(){return C}},P.framebuffer=new t$W({context:t,colorTextures:[T],destroyAttachments:!1})}function _0x11247b(e,t,i){e._globalDepthBuffer.isUpdate=!0,i.camera,e._globalDepthBuffer._beginFunc=function(e){},e._globalDepthBuffer._endFunc=function(t){e._globalDepthBuffer.isUpdate=!1,e._depthBuffer.isUpdate=!0}}function _0x5e95dc(e,t,i){var n=i.time.clone(),r=0,o=i.useLogDepth;e._depthBuffer._beginFunc=function(){i.useLogDepth=!1,e.shadowMap.enabled=!0,n=i.time.clone(),i.time=a$15.addMinutes(e._startTime,r,new a$15),r+=e._timeInterval,i.passes.pick=!1},e._depthBuffer._endFunc=function(){i.useLogDepth=o;for(var r=[],a=0;a<e._arrRasterPointCommand.length;a++){e._arrRasterPointCommand[a].execute(t);var s=t.readPixelsAsync({x:0,y:0,width:1024,height:1024,framebuffer:e._arrRasterPointCommand[a].framebuffer});r.push(s),e._arrAssisTexture[a].copyFromTexture(e._arrRasterPointCommand[a].framebuffer.getColorTexture(0))}i.time=n,--e._currentTime<1&&(e._depthBuffer.isUpdate=!1,e._timeUpdate=!1,e.shadowMap.maximumDistance=e._shadowMapParams.oriMaxDis,e.shadowMap.minimumDistance=void 0,e.shadowMap.size=e._shadowMapParams.oriSize,Promise.all(r).then((t=>{if(e._points.length>0){var i={},n=_0x230640(e);i.points=e._points,i.enuPoints=n,i.bounds=e._bounds,i.extend=e._extend,i.spacing=e._spacing,i.bottom=e._bottom,i.pixelsArray=t;var r=_0x3eecee.scheduleTask(i,[]);if(!e$2b(r))return[];r.then((function(t){var i=t.resultData;i.length>0&&e._queryPointsEvent.raiseEvent(i)})).otherwise((function(e){}))}else e._queryPointsEvent.raiseEvent({resultData:[]})})))}}Object.defineProperties(_0x38ed3e.prototype,{startTime:{get:function(){return this._startTime},set:function(e){this._startTime=e.clone(),this._update=!0}},endTime:{get:function(){return this._endTime},set:function(e){this._endTime=e.clone(),this._update=!0}},timeInterval:{get:function(){return this._timeInterval},set:function(e){this._timeInterval=e,this._update=!0}},spacing:{get:function(){return this._spacing},set:function(e){this._spacing=e,this._update=!0}},queryPointsEvent:{get:function(){return this._queryPointsEvent}},isPointsVisible:{get:function(){return this._isPointsVisible},set:function(e){this._isPointsVisible=e}},colorTable:{get:function(){return this._colorTable},set:function(e){if(e$2b(e)){e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:this._scene.context,width:1024,height:64,pixelFormat:V$10.RGBA,flipY:!1})),this._colorTable=e,this._colorTable.generateBuffer(),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._colorTable._imageBuffer});for(i=0,n=(t=this._arrPointCommand).length;i<n;i++)_0x2b1109(this._scene.context,t[i],"COLOR_TABLE")}else for(var t,i=0,n=(t=this._arrPointCommand).length;i<n;i++)_0x444b2f(this._scene.context,t[i],"COLOR_TABLE")}},voxelData:{get:function(){return this._volDirty=!0,this._getVoxelData(),this._voxelData}}}),_0x38ed3e.prototype._getVolValue=function(e,t){var i=e.longitude,n=e.latitude,r=e.height;i=e$2a.toDegrees(i),n=e$2a.toDegrees(n);var o=this._bounds[2]-this._bounds[0],a=(r=this._bounds[3]-this._bounds[1],this._bounds[0]-.025*o),s=this._bounds[1]-.025*r;o+=.05*o,r+=.05*r;var l=parseInt((i-a)/o*1024),u=parseInt((n-s)/r*1024);l=l<1?1:l,u=u<1?1:u;for(var c=0,h=new e$29(1,1/255,1/65025,1/160581375),d=-1;d<2;d++)for(var f=-1;f<2;f++){var p=this._scene.context.readPixels({x:l+d,y:u+f,width:1,height:1,framebuffer:this._arrRasterPointCommand[t].framebuffer}),_=e$29.unpack(p,0);e$29.divideByScalar(_,255,_),c=Math.max(c,e$29.dot(_,h))}return 1-(c=c>.999?1:c)},_0x38ed3e.prototype.update=function(e,t,i){if(!t._fboState.enabled&&!t.camera.bReflect){if(this._update){if(!this.shadowMap.enabled)throw new t$16("ShadowQueryPoints must be shadow.");if(this._scene.mode!==C$13.SCENE3D)throw new t$16("Shadow anaylsis is not supported for non-3D scenes.");if(this._frameState=t,e$2b(this._depthBuffer)||(this._depthBuffer=new s$T(e),this._depthBuffer.environmentVisible.isSunVisible=!0,this._depthBuffer.environmentVisible.isGlobalVisible=!0,this._depthBuffer.environmentVisible.isObjectVisible=!0,this._depthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._sceneName]=this._depthBuffer),!e$2b(this._globalDepthBuffer)){this._globalDepthBuffer=new s$T(e),this._globalDepthBuffer.environmentVisible.isObjectVisible=!0,this._globalDepthBuffer.environmentVisible.isGlobalVisible=!0,this._globalDepthBuffer._visibleViewport=this._visibleViewport;var n=this._name+"_global";t._framebufferList[n]=this._globalDepthBuffer}this._update=!1,this._timeUpdate=!0,this._currentTime=1;var r=new a$15,o=0;for(this.shadowMap.maximumDistance=this._shadowMapMaxDistance;a$15.addMinutes(this._startTime,o,r),o+=this._timeInterval,!a$15.lessThan(this._endTime,r);)this._currentTime++;_0x22fda8(this),_0x51fd3e(this);var a=_0x230640(this);if(this._points.length=0,a.length>0){for(var s=0;s<=this._extend;s+=this._spacing)_0x422589(this,e,a,this._bottom+s);_0x11247b(this,e,t),_0x5e95dc(this,e,t)}}if(!this._timeUpdate&&this._isPointsVisible){for(var l=0;l<this._arrPointCommand.length;l++)i.push(this._arrPointCommand[l]);this._getVoxelData()}}},_0x38ed3e.prototype._getVoxelData=function(){if(this._arrPointCommand.length>0&&this._volDirty){this._volDirty=!1,this._voxelData={values:[]};for(var e=0,t=0;t<=this._extend;t+=this._spacing)_0x9c0a49(this,t,e),e++;this._voxelData.values=new Float32Array(this._voxelData.values),this._voxelData.depth=Math.ceil(this._extend/this._spacing)+1,this._voxelData.minValue=0,this._voxelData.maxValue=1,this._voxelData.minHeight=this._bottom,this._voxelData.maxHeight=this._bottom+this._extend}},_0x38ed3e.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=1<<e,e$2b(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport)},_0x38ed3e.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},_0x38ed3e.prototype.getShadowRadio=function(e){if(!e$2b(e)||this._timeUpdate)return-1;var t=e.longitude,i=e.latitude,n=e.height;if(!e$2b(t)||!e$2b(i)||!e$2b(n)||(t=e$2a.toDegrees(t),i=e$2a.toDegrees(i),t<this._bounds[0]||t>this._bounds[2]||i<this._bounds[1]||i>this._bounds[3]))return-1;for(var r=!1,o=0,a=.1*this._spacing,s=0;s<=this._extend;s+=this._spacing){if(Math.abs(this._bottom+s-n)<a){r=!0;break}o++}if(!r)return-1;var l=_0x230640(this);if(l.length<0)return-1;r=!1;for(var u=0;u<l.length;u+=2){var c=o$1p.fromDegrees(t,i,n),h=o$1p.fromDegrees(l[u+0],l[u+1],n);if(o$1p.distance(c,h)<a){r=!0;break}}if(!r||o>=this._arrRasterPointCommand.length)return-1;var d=this._bounds[2]-this._bounds[0],f=(n=this._bounds[3]-this._bounds[1],this._bounds[0]-.025*d),p=this._bounds[1]-.025*n;d+=.05*d,n+=.05*n;var _=parseInt((t-f)/d*1024),m=parseInt((i-p)/n*1024);_=_<1?1:_,m=m<1?1:m;var g=0,x=new e$29(1,1/255,1/65025,1/160581375),v=this._arrRasterPointCommand[o].framebuffer;for(u=-1;u<2;u++)for(var y=-1;y<2;y++){var $=this._scene.context.readPixels({x:_+u,y:m+y,width:1,height:1,framebuffer:v}),b=e$29.unpack($,0);e$29.divideByScalar(b,255,b),g=Math.max(g,e$29.dot(b,x))}return g=g>.999?1:g},_0x38ed3e.prototype.getShadowRadioAsync=function(e){if(!e$2b(e)||this._timeUpdate)return Promise.resolve(-1);var t=e.longitude,i=e.latitude,n=e.height;if(!e$2b(t)||!e$2b(i)||!e$2b(n)||(t=e$2a.toDegrees(t),i=e$2a.toDegrees(i),t<this._bounds[0]||t>this._bounds[2]||i<this._bounds[1]||i>this._bounds[3]))return Promise.resolve(-1);for(var r=!1,o=0,a=.1*this._spacing,s=0;s<=this._extend;s+=this._spacing){if(Math.abs(this._bottom+s-n)<a){r=!0;break}o++}if(!r||o>=this._arrRasterPointCommand.length)return Promise.resolve(-1);var l=_0x230640(this);if(l.length<0)return Promise.resolve(-1);r=!1;for(var u=0;u<l.length;u+=2){var c=o$1p.fromDegrees(t,i,n),h=o$1p.fromDegrees(l[u+0],l[u+1],n);if(o$1p.distance(c,h)<a){r=!0;break}}if(!r)return Promise.resolve(-1);var d=this._bounds[2]-this._bounds[0],f=(n=this._bounds[3]-this._bounds[1],this._bounds[0]-.025*d),p=this._bounds[1]-.025*n;d+=.05*d,n+=.05*n;var _=parseInt((t-f)/d*1024),m=parseInt((i-p)/n*1024);_=_<1?1:_,m=m<1?1:m;var g=new e$29(1,1/255,1/65025,1/160581375),x=[],v=this._arrRasterPointCommand[o].framebuffer;for(u=-1;u<2;u++)for(var y=-1;y<2;y++){var $=this._scene.context.readPixelsAsync({x:_+u,y:m+y,width:1,height:1,framebuffer:v});x.push($)}return Promise.all(x).then((e=>{for(var t=0,i=0;i<e.length;i++){var n=e[i],r=e$29.unpack(n,0);e$29.divideByScalar(r,255,r),t=Math.max(t,e$29.dot(r,g))}return t=t>.999?1:t,Promise.resolve(t)}))},_0x38ed3e.prototype.qureyRegion=function(e){if(!e$2b(e)||!e$2b(e.position))throw new t$16("the options is required");this._qureyRegion=e.position,this._bottom=u$_(e.bottom,this._bottom),this._extend=u$_(e.extend,this._extend),this._update=!0,this._enuPoints=[];var t=_0x42f13c(this),i=o$1p.distance(t.center,this._scene.camera.position);i+=this._boundingSphere.radius,this.shadowMap.maximumDistance=i,this.shadowMap.size=this._shadowMapParams.analysisSize,this._shadowMapMaxDistance=i},_0x38ed3e.prototype.clear=function(){_0x22fda8(this),this._scene._analyst3D.remove(this._name,!1)},_0x38ed3e.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("ShadowQueryPoints"),""!==this._name||this._checking?e$2b(this._scene._analyst3D.find(this._name))||this._scene._analyst3D.add(this):(this._name="ShadowQueryPoints"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._scene._analyst3D.add(this),this._scene._analysisShadowMap=this.shadowMap)},_0x38ed3e.prototype.destroy=function(){return e$2b(this._frameState)&&(e$2b(this._depthBuffer)&&delete this._frameState._framebufferList[this._sceneName],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),_0x22fda8(this),_0x51fd3e(this),e$2b(this._hypsometricTexture)&&(this._hypsometricTexture=this._hypsometricTexture.destroy()),this._scene._analyst3D.remove(this._name,!0),e$2b(this.shadowMap)&&(this.shadowMap.destroy(),this.shadowMap=void 0,this._scene._analysisShadowMap=void 0),i$10(this)};var _0x23b4cb="attribute vec2 aSideness;\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\nuniform float uLineWidth;\nuniform mat4 uRenderTextureMatrix;\nvarying vec4 renderTextureCoord;\nvec4 resolvePosition(vec4 viewPosV0, vec4 viewPosV1, vec2 sidenessNorm) {\nvec2 sideness = sidenessNorm * 2.0 - 1.0;\nvec4 viewPos = mix(viewPosV0, viewPosV1, sidenessNorm.y);\nvec4 projPosV0 = czm_projection * viewPosV0;\nvec4 projPosV1 = czm_projection * viewPosV1;\nvec4 projPos = czm_projection * viewPos;\nvec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\nvec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\nvec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\nfloat lineLengthPixels = length(screenSpaceLinePixels);\nfloat dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\nvec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\nvec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\nvec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\nfloat halfLineWidth = max(uLineWidth, 1.0) * 0.5;\nvec2 halfLineWidthNDC = halfLineWidth * uPixelToNDC;\nvec2 ndcOffset = screenSpaceDirection * halfLineWidthNDC + perpendicularScreenSpaceDirection * halfLineWidthNDC;\nprojPos.xy += ndcOffset * projPos.w;\nprojPos.z += (dzPerPixel * halfLineWidth) * sideness.y * projPos.w;\nreturn projPos;\n}\nvoid main() {\nvec4 viewPosV0 = czm_modelView * vec4(aPosition0, 1.0);\nvec4 viewPosV1 = czm_modelView * vec4(aPosition1, 1.0);\ngl_Position = resolvePosition(viewPosV0, viewPosV1, aSideness);\nvec4 viewPos = czm_inverseProjection * gl_Position;\nrenderTextureCoord = uRenderTextureMatrix * viewPos;\n}\n",_0x2e25fb="uniform sampler2D uTexture0;\nuniform vec4 uVisibleColor;\nuniform vec4 uHiddenColor;\nvarying vec4 renderTextureCoord;\nvoid main() {\nvec4 resultColor = uVisibleColor;\nvec4 texCoord = renderTextureCoord / renderTextureCoord.w;\nfloat depth = texCoord.z * 0.5 + 0.5;\ntexCoord.xy = texCoord.xy * 0.5 + 0.5;\nfloat z_window = czm_unpackDepth(texture2D(uTexture0, texCoord.xy));\n#ifdef WEBGPU\nz_window = z_window * 0.5 + 0.5;\n#endif\nif(z_window < depth && z_window > 0.0 && z_window < 1.0)\n{\nresultColor = uHiddenColor;\n}\ngl_FragColor = resultColor;\n}\n",_0x58ade4=(_0x5b8710=!0,function(e,t){var i=_0x5b8710?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b8710=!1,i}),_0x2dce7d=_0x58ade4(void 0,(function(){return _0x2dce7d.toString().search("(((.+)+)+)+$").toString().constructor(_0x2dce7d).search("(((.+)+)+)+$")})),_0x5b8710;_0x2dce7d();var _0x26c186="\nattribute vec3 aPosition0;\nuniform float uLineWidth;\nuniform mat4 uRenderTextureMatrix;\n\nvarying vec4 renderTextureCoord;\n\nvoid main() {\n vec4 viewPos = czm_modelView * vec4(aPosition0, 1.0);\n gl_Position = czm_projection * viewPos;\n renderTextureCoord = uRenderTextureMatrix * viewPos;\n}",_0x43ce69=(_0x5b4dc2=!0,function(e,t){var i=_0x5b4dc2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b4dc2=!1,i}),_0x2a31cf=_0x43ce69(void 0,(function(){return _0x2a31cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a31cf).search("(((.+)+)+)+$")})),_0x5b4dc2;function _0x23be36(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._depthBuffer=void 0,this._command=void 0,this._frameState=void 0,this._viewPosition=[0,0,0],this._cameraDir=new o$1p,this._viewProjMatrix=new p$1d,this._viewProjMatrixs=new e$1N,this._renderTextureMatrix=new p$1d,this._renderTextureMatrixs=new e$1N,this._visibleColor=new e$29(0,1,0,1),this._hiddenColor=new e$29(1,0,0,1),this._targetPoints=new e$1N,this._sightlineCameras=new e$1N,this._update=!0,this._updateAll=!0,this._id=0,this._name="",this._visibleViewport=4095,this._barrierPointArray=new e$1N,this._depthBuffers=new e$1N,this._commands=new e$1N,this._lineWidth=1}function _0xd52957(e,t,i){var n,r=i.camera,o=r._projection;if(e._scene.mode===C$13.SCENE3D)n=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var a=a$18.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);n=o.project(a,new o$1p)}var s=new o$1p(0,0,0);e._targetPoints._hash;var l,u=0,c=e._currentTargetPoint;if(e._scene.mode===C$13.SCENE3D)l=o$1p.fromDegreesArrayHeights(c,e._scene._globe.ellipsoid)[0];else{var h=a$18.fromDegrees(c[0],c[1],c[2]);l=o.project(h,new o$1p)}var d=new o$1p;o$1p.subtract(l,n,d),o$1p.normalize(d,d),o$1p.add(s,d,s),u=Math.max(u,o$1p.distance(l,n)),o$1p.normalize(s,s),o$1p.clone(s,e._cameraDir);var f=new o$1p,p=new o$1p,_=new o$1p,m=r.frustum.fov;o$1p.clone(r.position,f),o$1p.clone(r.direction,p),o$1p.clone(r.up,_);var g=2*e$2a.PI/3,x=r.frustum.near,v=r.frustum.far,y=i.useLogDepth,$=e._currentTargetName,b=e._depthBuffers.get($);e$2b(b)||((b=new s$T(t)).environmentVisible.isObjectVisible=!0,b.environmentVisible.isGlobalVisible=!0,b._visibleViewport=e._visibleViewport,i._framebufferList[$]=b,e._depthBuffers.set($,b)),b.isUpdate=!0,b._beginFunc=function(){i.useLogDepth=!1,o$1p.clone(r.position,f),o$1p.clone(r.direction,p),o$1p.clone(r.up,_),m=r.frustum.fov,r.frustum.fov=g;var t=s,o=new o$1p;o=o$1p.clone(n,o),o=o$1p.normalize(o,o),Math.abs(o$1p.dot(o,t))>=1&&(o=Math.abs(o$1p.dot(t,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,o):o$1p.clone(o$1p.UNIT_Z,o));var a=new o$1p;o$1p.cross(o,t,a),a=o$1p.normalize(a,a),o$1p.cross(t,a,o),o=o$1p.normalize(o,o);var l={destination:n,orientation:{direction:t,up:o},convert:!1};r.setView(l),e._sightlineCameras.set($,l),r.frustum.near=1,r.frustum.far=Math.ceil(Math.max(u,10));var c=new p$1d;p$1d.multiply(r.frustum.projectionMatrix,r.viewMatrix,c),e._viewProjMatrixs.set($,c),e._renderTextureMatrixs.set($,new p$1d)},b._endFunc=function(){if(i.useLogDepth=y,r.frustum.fov=m,r.setView({destination:f,orientation:{direction:p,up:_},convert:!1}),r.frustum.near=x,r.frustum.far=v,b.isUpdate=!1,!e._update)if(t.webgpu)_0x73245b(e,$).then((t=>{e._barrierPointArray.set($,t)}));else{var n=_0xebdb1b(e,$);e._barrierPointArray.set($,n)}}}_0x2a31cf(),Object.defineProperties(_0x23be36.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._updateAll=!0,this._update=!0}},visibleColor:{get:function(){var e=new e$1U;return e.red=this._visibleColor.x,e.green=this._visibleColor.y,e.blue=this._visibleColor.z,e.alpha=this._visibleColor.w,e},set:function(e){this._visibleColor.x=e.red,this._visibleColor.y=e.green,this._visibleColor.z=e.blue,this._visibleColor.w=e.alpha}},hiddenColor:{get:function(){var e=new e$1U;return e.red=this._hiddenColor.x,e.green=this._hiddenColor.y,e.blue=this._hiddenColor.z,e.alpha=this._hiddenColor.w,e},set:function(e){this._hiddenColor.x=e.red,this._hiddenColor.y=e.green,this._hiddenColor.z=e.blue,this._hiddenColor.w=e.alpha}},lineWidth:{get:function(){return this._lineWidth},set:function(e){o$1q.typeOf.number.greaterThan("Sightline.lineWidth",e,0),this._lineWidth=e}}}),_0x23be36.prototype.addTargetPoint=function(e){LicenseChecker.LICENSECHECKER.verify("Sightline");var t=e.name,i=e.position;return!(!e$2b(t)||!e$2b(i))&&(this._targetPoints.set(t,i),this._currentTargetName=t,this._currentTargetPoint=i,this._update=!0,this._barrierPointArray.set(t,{}),!0)},_0x23be36.prototype.removeTargetPoint=function(e){LicenseChecker.LICENSECHECKER.verify("Sightline"),this._barrierPointArray.remove(e);var t=this._targetPoints.remove(e);if(this._sightlineCameras.remove(e),!t)return!1;this._viewProjMatrixs.remove(e),this._renderTextureMatrixs.remove(e);var i=this._depthBuffers.get(e);e$2b(i)&&(i.destroy(),this._depthBuffers.remove(e),delete this._frameState._framebufferList[e]);var n=this._commands.get(e);if(e$2b(n)){for(var r=0;r<n.length;r++){var o=n[r];o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy(),o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy();var a=this._frameState.commandList.indexOf(o);-1!==a&&this._frameState.commandList.splice(a,1)}this._commands.remove(e)}return this._update=!0,!0},_0x23be36.prototype.removeAllTargetPoint=function(){for(var e in LicenseChecker.LICENSECHECKER.verify("Sightline"),this._barrierPointArray.removeAll(),this._targetPoints.removeAll(),this._sightlineCameras.removeAll(),this._depthBuffers._hash)this._depthBuffers._hash.hasOwnProperty(e)&&(this._depthBuffers._hash[e].destroy(),delete this._frameState._framebufferList[e],delete this._frameState._framebufferList[e]);this._depthBuffers.removeAll();for(var t=0,i=this._commands.length;t<i;t++)for(var n=this._commands.values[t],r=0;r<n.length;r++){var o=n[r];o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy(),o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy()}this._commands.removeAll(),this._viewProjMatrixs.removeAll(),this._renderTextureMatrixs.removeAll(),this._update=!0};var _0x154d6e=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),_0x1b90ee=null;function _0x4ac258(e){if(e$2b(_0x1b90ee))return _0x1b90ee;var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,(_0x1b90ee=t$Y.createVertexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW})).vertexArrayDestroyable=!1,_0x1b90ee}function _0x3d3afb(e,t){var i=S$12.createTypedArray(S$12.FLOAT,6);return i[0]=0,i[1]=0,i[2]=0,i[3]=t.x,i[4]=t.y,i[5]=t.z,t$Y.createVertexBuffer({context:e,typedArray:i,usage:A$19.STATIC_DRAW})}function _0x2d9b0c(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}var _0x21a54f=null;function _0x2b0ddd(e){return e$2b(_0x21a54f)||((_0x21a54f=t$Y.createIndexBuffer({context:e,typedArray:_0x2d9b0c(),usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})).vertexArrayDestroyable=!1),_0x21a54f}var _0x3e0569=new e$29,_0xa9685d=new e$29;function _0x3f28d8(e,t,i){var n,r=i.camera._projection;if(e._scene.mode===C$13.SCENE3D)n=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var o=a$18.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);n=r.project(o,new o$1p)}var a,s=e._currentTargetPoint;if(e._scene.mode===C$13.SCENE3D)a=o$1p.fromDegreesArrayHeights(s,e._scene._globe.ellipsoid)[0];else{var l=a$18.fromDegrees(s[0],s[1],s[2]);a=r.project(l,new o$1p)}var u=new o$1p;o$1p.subtract(a,n,u);var c=[],h={},d=W$18.TRIANGLES,f=!0;if(t.webgpu){f=!1,d=W$18.LINES;var p=_0x3d3afb(t,u);h.aPosition0=0,c.push({name:"aPosition0",index:h.aPosition0,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}else{d=W$18.TRIANGLES;var _=_0x4ac258(t);p=_0x3d3afb(t,u);h.aSideness=0,c.push({name:"aSideness",index:h.aSideness,vertexBuffer:_,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),h.aPosition0=1,c.push({name:"aPosition0",index:h.aPosition0,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),h.aPosition1=2,c.push({name:"aPosition1",index:h.aPosition1,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1})}var m=_0x2b0ddd(t),g=new i$_({primitiveType:d,pass:Le$s.OPAQUE,owner:e,cull:!1}),x=new p$1d;p$1d.clone(p$1d.IDENTITY,x),p$1d.setTranslation(x,n,x),e._scene.mode!==C$13.SCENE3D&&p$1d.multiply(_0x154d6e,x,x),g.modelMatrix=x,g.vertexArray=new c$12({context:t,attributes:c,indexBuffer:m}),g.shaderProgram=r$13.fromCache({name:f?"SightWideLine":"SightLine",context:t,vertexShaderSource:f?_0x23b4cb:_0x26c186,fragmentShaderSource:_0x2e25fb,attributeLocations:h}),g.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var v=e._currentTargetName,y={uRenderTextureMatrix:function(){return e._renderTextureMatrixs.get(v)},uTexture0:function(){return e._depthBuffers.get(v).depthTexture},uVisibleColor:function(){return e._visibleColor},uHiddenColor:function(){return e._hiddenColor},uLineWidth:function(){return e._lineWidth}};g.uniformMap=y;var $=i$_.shallowClone(g);$.pass=Le$s.ANALYSIS,$.renderState=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),$.uniformMap.uHiddenColor=function(){return e$29.clone(e._hiddenColor,_0x3e0569),_0x3e0569.w=.2,_0x3e0569},$.uniformMap.uVisibleColor=function(){return e$29.clone(e._visibleColor,_0xa9685d),_0xa9685d.w=.2,_0xa9685d},e._commands.set(v,[$,g])}function _0xebdb1b(e,t){var i=e._targetPoints.get(t);if(e$2b(i)){var n={isViewer:!0},r=o$1p.fromDegreesArrayHeights(i,e._scene._globe.ellipsoid)[0],o=new e$29(r.x,r.y,r.z,1),a=e._viewProjMatrixs.get(t);if(p$1d.multiplyByVector(a,o,o),e$29.divideByScalar(o,o.w,o),o.x>1||o.x<-1||o.y>1||o.y<-1)return n;var s=e._scene.context,l=s.drawingBufferWidth,u=s.drawingBufferHeight,c=(.5*o.x+.5)*l-.5,h=(.5*o.y+.5)*u-.5;if(c<0||h<0)return n;for(var d=Math.floor(c),f=c-d,p=Math.floor(h),_=h-p,m=e._depthBuffers.get(t),g=s.readPixels({framebuffer:m.framebuffer,x:d,y:p,width:2,height:2}),x=new e$29,v=(new o$1p,new e$29(1/255,1/65025,1/160581375,1/4228250625)),y=[],$=(e._scene,s.uniformState.currentFrustum),b=($.x,$.y,0);b<4;b++){var T=e$29.unpack(g,4*b,x),C=e$29.dot(T,v);if(!(C<1&&C>0))return n;y[b]=2*C-1}var S=(1-_)*((1-f)*y[0]+f*y[1])+_*((1-f)*y[2]+f*y[3]);if(o.z-S>1e-6){var w=new p$1d;p$1d.inverse(a,w),o.z=S,p$1d.multiplyByVector(w,o,o),e$29.divideByScalar(o,o.w,o);var E=a$18.fromCartesian(o,e._scene._globe.ellipsoid);n.position=E,n.isViewer=!1,n.st=new o$1o(d,p)}return n}}function _0xd82276(e,t){LicenseChecker.LICENSECHECKER.verify("Sightline");var i=e._targetPoints.get(t);if(!e$2b(i))return Promise.resolve(null);var n={isViewer:!0},r=o$1p.fromDegreesArrayHeights(i,e._scene._globe.ellipsoid)[0],o=new e$29(r.x,r.y,r.z,1),a=e._viewProjMatrixs.get(t);if(p$1d.multiplyByVector(a,o,o),e$29.divideByScalar(o,o.w,o),o.x>1||o.x<-1||o.y>1||o.y<-1)return Promise.resolve(n);var s=e._scene.context,l=s.drawingBufferWidth,u=s.drawingBufferHeight,c=(.5*o.x+.5)*l-.5,h=(.5*o.y+.5)*u-.5;if(c<0||h<0)return Promise.resolve(n);var d=Math.floor(c),f=c-d,p=Math.floor(h),_=h-p,m=s.uniformState,g=o$1o.clone(m.currentFrustum),x=e._depthBuffers.get(t);return s.readPixelsAsync({framebuffer:x.framebuffer,x:d,y:p,width:2,height:2}).then((t=>{for(var i=new e$29,r=(new o$1p,new e$29(1/255,1/65025,1/160581375,1/4228250625)),l=[],u=(e._scene,g.x,g.y,0);u<4;u++){var c=e$29.unpack(t,4*u,i),h=e$29.dot(c,r);if(!(h<1&&h>0))return Promise.resolve(n);s.webgpu?l[u]=h:l[u]=2*h-1}var m=(1-f)*l[0]+f*l[1],x=(1-f)*l[2]+f*l[3],v=(1-_)*m+_*x;if(o.z-v>1e-6){var y=new p$1d;p$1d.inverse(a,y),o.z=v,p$1d.multiplyByVector(y,o,o),e$29.divideByScalar(o,o.w,o);var $=a$18.fromCartesian(o,e._scene._globe.ellipsoid);n.position=$,n.isViewer=!1,n.st=new o$1o(d,p)}return Promise.resolve(n)}))}function _0x49404d(e,t){var i=_0xebdb1b(e,t);if(e$2b(i)&&e$2b(i.position)&&e$2b(i.st))return i.st}function _0x73245b(e,t){return _0xd82276(e,t).then((e=>e$2b(e)&&e$2b(e.position)&&e$2b(e.st)?Promise.resolve(e.st):Promise.resolve(null)))}_0x23be36.prototype.update=function(e,t,i){if(!t._fboState.enabled){var n=t.camera;for(var r in this._viewProjMatrixs._hash)p$1d.multiply(this._viewProjMatrixs.get(r),n.inverseViewMatrix,this._renderTextureMatrixs.get(r));if(this._update){if(this._update=!1,this._frameState=t,this._targetPoints.values.length<1)return;if(this._updateAll)for(var o in this._updateAll=!1,this._targetPoints._hash){var a=this._targetPoints.get(o);this._currentTargetPoint=a,this._currentTargetName=o,_0xd52957(this,e,t),_0x3f28d8(this,e,t)}else _0xd52957(this,e,t),_0x3f28d8(this,e,t)}if(!t.passes.pick){var s=this._commands.length;for(o=0;o<s;o++)if(e$2b(this._depthBuffers.values[o].framebuffer)){var l=this._commands.values[o];i.push(l[0]),i.push(l[1])}}}},_0x23be36.prototype.setVisibleInViewport=function(e){if(LicenseChecker.LICENSECHECKER.verify("Sightline"),e>8)throw new t$16("the index is 0~8");this._visibleViewport=1<<e,e$2b(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport)},_0x23be36.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},_0x23be36.prototype.getBarrierPoint=function(e,t){var i=this._barrierPointArray.get(e);return e$2b(t)&&t.bind(null,i)(),i},_0x23be36.prototype.getObjectIds=function(){LicenseChecker.LICENSECHECKER.verify("Sightline");for(var e={},t=Object.keys(this._targetPoints._hash),i=0,n=t.length;i<n;i++){var r=t[i];this._scene.renderIds(this._sightlineCameras.get(r));var o=this._scene._defaultView.pickFramebuffer,a=this._scene._context,s=_0x49404d(this,r);if(e$2b(s)){var l=a.readPixels({x:s.x,y:s.y,width:1,height:1,framebuffer:o._fb}),u=e$1U.byteToRgba(l[0],l[1],l[2],l[3]),c=a.getObjectByPickId(u);if(e$2b(c)){var h=c.primitive.id;u=c.id;e$2b(e[h])||(e[h]=[]),-1===e[h].indexOf(u)&&e[h].push(u)}}}return e},_0x23be36.prototype.getObjectIdsAsync=function(){LicenseChecker.LICENSECHECKER.verify("Sightline");for(var e={},t=Object.keys(this._targetPoints._hash),i=[],n=0,r=t.length;n<r;n++){var o=t[n];this._scene.renderIds(this._sightlineCameras.get(o));var a=this._scene._defaultView.pickFramebuffer,s=this._scene._context,l=_0x73245b(this,o);i.push(l)}return Promise.all(i).then((t=>{for(var i=[],n=0;n<t.length;n++){var r=t[n];if(e$2b(r)){var o=s.readPixelsAsync({x:r.x,y:r.y,width:1,height:1,framebuffer:a._fb});i.push(o)}}return Promise.all(i).then((t=>{for(var i=0;i<t.length;i++){var n=t[i],r=e$1U.byteToRgba(n[0],n[1],n[2],n[3]),o=s.getObjectByPickId(r);if(e$2b(o)){var a=o.primitive.id;r=o.id;e$2b(e[a])||(e[a]=[]),-1===e[a].indexOf(r)&&e[a].push(r)}}return Promise.resolve(e)}))}))},_0x23be36.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("Sightline"),""===this._name&&!this._checking&&(this._name="sightline"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},_0x23be36.prototype.destroy=function(){return this.removeAllTargetPoint(),this._scene._analyst3D.remove(this._name,!0),i$10(this)};var _0x4a3a29=(_0x586468=!0,function(e,t){var i=_0x586468?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x586468=!1,i}),_0x2efb20=_0x4a3a29(void 0,(function(){return _0x2efb20.toString().search("(((.+)+)+)+$").toString().constructor(_0x2efb20).search("(((.+)+)+)+$")})),_0x586468;_0x2efb20();var _0x150dfa="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\n\nvoid main()\n{\n gl_Position = czm_modelViewProjection * aPosition;\n}",_0x23879d=(_0x28ab83=!0,function(e,t){var i=_0x28ab83?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28ab83=!1,i}),_0x32929b=_0x23879d(void 0,(function(){return _0x32929b.toString().search("(((.+)+)+)+$").toString().constructor(_0x32929b).search("(((.+)+)+)+$")})),_0x28ab83;_0x32929b();var _0x2821fb="uniform vec4 uSkylineColor;\n\nvoid main()\n{\n gl_FragColor = uSkylineColor;\n}",E$Z={UNKNOWN:"UNKNOWN",GEOPOINT3D:"POINT3D",GEOLINE3D:"LINE3D",GEOREGION3D:"REGION3D",GEOMODEL3D:"GEOMODEL3D",GEOSPHERE:"GEOSPHERE",GEOBOX:"GEOBOX",GEOBILLBOARD:"GEOBILLBOARD",GEOELLIPSOID:"GEOELLIPSOID",GEOCYLINDER:"GEOCYLINDER",GEOCONE:"GEOCONE",GEOCIRCLE3D:"CIRCLE3D"},P$U=Object.freeze(E$Z);function s$M(e,t,i){this.x=parseFloat(e)||0,this.y=parseFloat(t)||0,this.z=parseFloat(i)||0}s$M.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z};var e$1y={CENTER:0,APEX:1},O$I=Object.freeze(e$1y);function o$11(e){this.init(e)}function T$U(e,t,i,n,r){var o=t$Y.createVertexBuffer({context:r,typedArray:S$12.createTypedArray(i.componentDatatype,i.values),usage:A$19.STATIC_DRAW});e.push({name:t,index:n,vertexBuffer:o,componentsPerAttribute:i.componentsPerAttribute,componentDatatype:i.componentDatatype,offsetInBytes:0,strideInBytes:0,normalize:!1})}function t$M(){this.pntArray=[]}function p$T(e){e=e||[],this.init(e)}Object.defineProperties(o$11.prototype,{geoRotationX:{get:function(){return this.rotationX},set:function(e){"number"==typeof e&&(this.rotationX=e,this._isMatrixDirty=!0)}},geoRotationY:{get:function(){return this.rotationY},set:function(e){"number"==typeof e&&(this.rotationY=e,this._isMatrixDirty=!0)}},geoRotationZ:{get:function(){return this.rotationZ},set:function(e){"number"==typeof e&&(this.rotationZ=e,this._isMatrixDirty=!0)}},geoScaleX:{get:function(){return this.scaleX},set:function(e){"number"==typeof e&&(this.scaleX=e,this._isMatrixDirty=!0)}},geoScaleY:{get:function(){return this.scaleY},set:function(e){"number"==typeof e&&(this.scaleY=e,this._isMatrixDirty=!0)}},geoScaleZ:{get:function(){return this.scaleZ},set:function(e){"number"==typeof e&&(this.scaleZ=e,this._isMatrixDirty=!0)}},geoId:{get:function(){return this.id},set:function(e){"number"==typeof e&&(this.id=e,this._isMatrixDirty=!0)}},geoType:{get:function(){return this.type},set:function(e){"number"==typeof e&&(this.type=e)}},geoPosition:{get:function(){return this.position},set:function(e){e instanceof s$M&&!s$M.equals(e,this.position)&&(this.position=e,this._isMatrixDirty=!0,this._isGeometryDirty=!0)}},modelMatrix:{get:function(){return this._isMatrixDirty&&this._computeMatrix(),this._modelMatrix}},isGeometryDirty:{get:function(){return this._isGeometryDirty},set:function(e){this._isGeometryDirty=e}},isLatLon:{get:function(){return this._isLatLon},set:function(e){this._isLatLon=e}}}),o$11.prototype.init=function(e){e=e||{},this.rotationX=u$_(e.rotationX,0),this.rotationY=u$_(e.rotationY,0),this.rotationZ=u$_(e.rotationZ,0),this.scaleX=u$_(e.scaleX,1),this.scaleY=u$_(e.scaleY,1),this.scaleZ=u$_(e.scaleZ,1),this.position=u$_(e.position,new s$M(0,0,0)),this.id=u$_(e.id,0),this.type=u$_(e.type,P$U.UNKNOWN),this.point3Ds=[],this.parts=[],this._geometry=void 0,this._modelMatrix=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._isMatrixDirty=!0,this._isGeometryDirty=!0,this._isLatLon=!0},o$11.prototype.getBounds=function(){return null},o$11.prototype._getGeometry=function(){return(!e$2b(this._geometry)||this._isGeometryDirty)&&this._createGeometry(),this._geometry},o$11.prototype._computeMatrix=function(){if(this._isLatLon){var e=o$1p.fromDegrees(this.position.x,this.position.y,this.position.z),t=e$2a.toRadians(this.rotationX),i=e$2a.toRadians(this.rotationY),n=new i$15(e$2a.toRadians(this.rotationZ),t,i),r=new o$1p(this.scaleX,this.scaleY,this.scaleZ),o=new n$13,a=new p$1d,s=n$13.fromHeadingPitchRoll(n,o),l=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,s,r,a);if(this._modelMatrix=m$17.eastNorthUpToFixedFrame(e,t$13.WGS84,this._modelMatrix),"GEOCONE"===this.type&&this._rotateOrigin===O$I.APEX){var u,c,h;if(l=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,s,new o$1p(1,1,1),a),!e$2b(this._vertex))return void(this._isMatrixDirty=!1);var d=new p$1d;p$1d.inverse(this._modelMatrix,d);var f=p$1d.clone(this._modelMatrix),p=new p$1d;p$1d.fromScale(r,p);var _=p$1d.multiplyByPoint(d,this._vertex,new o$1p);_=p$1d.multiplyByPoint(p,_,new o$1p),_=p$1d.multiplyByPoint(f,_,new o$1p);var m=o$1p.subtract(_,e,new o$1p);u=p$1d.fromTranslation(m),p$1d.multiply(u,this._modelMatrix,this._modelMatrix),p$1d.multiply(l,this._modelMatrix,this._modelMatrix),p$1d.multiplyByScale(this._modelMatrix,r,this._modelMatrix),h=p$1d.multiplyByPoint(u,_,new o$1p),h=p$1d.multiplyByPoint(l,h,new o$1p);var g=o$1p.subtract(_,h,new o$1p);c=p$1d.fromTranslation(g),p$1d.multiply(c,this._modelMatrix,this._modelMatrix)}else p$1d.multiply(this._modelMatrix,l,this._modelMatrix)}else{e=new o$1p(this.position.x,this.position.y,this.position.z);p$1d.fromTranslation(e,this._modelMatrix,this._modelMatrix)}this._isMatrixDirty=!1},o$11.prototype._createGeometry=function(){},o$11.prototype._getVertexBuffer=function(e){let t=this._getGeometry();return(!e$2b(this._vertexBuffer)||this._vertexBuffer.isDestroyed())&&(this._vertexBuffer=t$Y.createVertexBuffer({context:e,typedArray:S$12.createTypedArray(S$12.FLOAT,t.attributes.position.values),usage:A$19.STATIC_DRAW})),this._vertexBuffer},o$11.prototype.getVertexArray=function(e){let t=this._getGeometry(),i=[];i.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var n=t.attributes.normal;e$2b(n)&&T$U(i,"normal",n,1,e);var r=t.attributes.st;return e$2b(r)&&T$U(i,"st",r,2,e),new c$12({context:e,attributes:i,indexBuffer:t$Y.createIndexBuffer({context:e,typedArray:t.indices,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})})},o$11.prototype.getOutlineVertexArray=function(e){},t$M.prototype.add=function(e){e instanceof s$M&&this.pntArray.push(e)},t$M.prototype.removeAll=function(){this.pntArray=[]},p$T.prototype=new o$11,p$T.prototype.constructor=p$T,p$T.prototype.parent=o$11.prototype,Object.defineProperties(p$T.prototype,{partCount:{get:function(){return this.parts.length}}}),p$T.prototype.init=function(e){this.parts=[],this.polyline={positions:[],width:10},this.points=[];for(var t=0,i=e.length;t<i;t++){var n=e[t].pntArray.length;if(this.parts.push(n),n>0)for(var r=0;r<n;r++){var o=e[t].pntArray[r];this.points.push(o),this.polyline.positions.push(o)}}this.type=P$U.GEOLINE3D},p$T.prototype.addPart=function(e){if(!(!e instanceof t$M)){for(var t=0,i=e.pntArray.length;t<i;t++)this.points.push(e.pntArray[t]),this.polyline.positions.push(e.pntArray[t]);this.parts.push(e.pntArray.length)}},p$T.prototype.getPart=function(e){if("number"!=typeof e||e>=this.partCount)return null;for(var t=new t$M,i=0,n=0;n<e;n++)i+=this.parts[n];for(n=i;n<this.parts[e];n++)t.add(new s$M(this.points[n].x,this.points[n].y,this.points[n].z));return t};var _0x460827=(_0x16dd24=!0,function(e,t){var i=_0x16dd24?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16dd24=!1,i}),_0x3e66a2=_0x460827(void 0,(function(){return _0x3e66a2.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e66a2).search("(((.+)+)+)+$")})),_0x16dd24;function _0x1e0d7c(e){if(!e$2b(e))throw new t$16("scene are required.");if(!e.context.depthTexture)throw new t$16("the depth buffer is not supported.");if(e$1T.maximumVertexTextureImageUnits<1)throw new t$16("the max of vertexTextureImageUnits less 1, function is not supported.");this._displayMode={LINE:0,FACE:1},this._scene=e,this._depthBuffer=void 0,this._command=void 0,this._lineCommand=void 0,this._viewerCommand=void 0,this._viewerLineCommand=void 0,this._boundingSphere=new i$1c,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._displayStyle=this._displayMode.LINE,this._invertViewMatrix=new p$1d,this._invertViewProjectionMatrix=new p$1d,this._color=new e$29(1,0,0,1),this._radius=-1,this._ignoreGlobe=!1,this._limitBodys=new e$1N,this._update=!1,this._visibleViewport=4095,this._id=0,this._name="",this._points=[],this._lineWidth=1,this._lineStripCollection=e.primitives.add(new k$T)}function _0x48af61(e){e$2b(e._command)&&(e._command.vertexArray=e._command.vertexArray&&e._command.vertexArray.destroy(),e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e$2b(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0),e$2b(e._faceCommand)&&(e._faceCommand.vertexArray=e._faceCommand.vertexArray&&e._faceCommand.vertexArray.destroy(),e._faceCommand.shaderProgram=e._faceCommand.shaderProgram&&e._faceCommand.shaderProgram.destroy(),e._faceCommand=void 0)}function _0x27ff32(e){e$2b(e._viewerCommand)&&(e._viewerCommand.vertexArray=e._viewerCommand.vertexArray&&e._viewerCommand.vertexArray.destroy(),e._viewerCommand.shaderProgram=e._viewerCommand.shaderProgram&&e._viewerCommand.shaderProgram.destroy(),e._viewerCommand=void 0),e$2b(e._viewerLineCommand)&&(e._viewerLineCommand.vertexArray=e._viewerLineCommand.vertexArray&&e._viewerLineCommand.vertexArray.destroy(),e._viewerLineCommand.shaderProgram=e._viewerLineCommand.shaderProgram&&e._viewerLineCommand.shaderProgram.destroy(),e._viewerLineCommand=void 0)}function _0x594e59(e,t,i){var n=e._viewPosition[2],r=5e-4*n;r=r<1?1:r;var o=Math.abs(n)+6378137,a=Math.sqrt((o-6378137)*(o+6378137));n<0&&a<5e4?a=5e4:n<100&&n>0&&(a*=50);var s,l=e._direction*e$2a.RADIANS_PER_DEGREE,u=e._pitch*e$2a.RADIANS_PER_DEGREE,c=i.camera,h=c._projection;if(e._scene.mode===C$13.SCENE3D)s=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var d=a$18.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);s=h.project(d,new o$1p)}var f=c.frustum.near,p=c.frustum.far,_=new o$1p,m=c.heading,g=c.pitch;o$1p.clone(c.position,_),e._depthBuffer.isUpdate=!0,e._depthBuffer._beginFunc=function(){f=c.frustum.near,p=c.frustum.far,m=c.heading,g=c.pitch,o$1p.clone(c.position,_),c.frustum.near=r,c.frustum.far=a;var t={destination:s,orientation:{heading:l,pitch:u},convert:!1};if(c.setView(t),e.skylineCamera=t,p$1d.clone(c.inverseViewMatrix,e._invertViewMatrix),p$1d.multiply(c.frustum.projectionMatrix,c.viewMatrix,e._invertViewProjectionMatrix),p$1d.inverse(e._invertViewProjectionMatrix,e._invertViewProjectionMatrix),e._scene.mode===C$13.SCENE3D)o$1p.clone(s,e._boundingSphere.center);else{var i=m$17.convertToColumbusCartesian(o$1p.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]));o$1p.clone(i,e._boundingSphere.center)}e._boundingSphere.radius=a},e._depthBuffer._endFunc=function(){if(e$2b(e._lineCommand)){e._lineCommand.modelMatrix=e._invertViewMatrix,e._points.length=0;var i=t.uniformState,n=p$1d.clone(i.inverseProjection),r=p$1d.clone(i.viewProjection),o=o$1o.clone(i.currentFrustum),a=i.log2FarDepthFromNearPlusOne,s=a$18.clone(c.positionCartographic);t.readPixelsAsync({framebuffer:e._depthBuffer.framebuffer}).then((i=>{var l=e._lineCommand.vertexArray.getAttribute(0),u=4*(t.drawingBufferWidth+1),c=S$12.createTypedArray(l.componentDatatype,u);c[0]=0,c[1]=0,c[2]=0,c[3]=1,4*u!==l.vertexBuffer.sizeInBytes&&(_0x48af61(e),_0x4ae862(e,t),l=e._lineCommand.vertexArray.getAttribute(0));for(var h=new e$29,d=new e$29(1,1/255,1/65025,1/160581375),f=o.x,p=o.y,_=0;_<t.drawingBufferWidth;_++){for(var m=0,g=t.drawingBufferHeight-1;g>-1;g--){var x=4*(t.drawingBufferWidth*g+_),v=e$29.unpack(i,x,h);if(e$29.divideByScalar(v,255,v),(m=e$29.dot(v,d))>0)break;m=0}if(e._scene.frameState.useLogDepth&&m>0){var y=m*a;m=p*(1-f/(Math.pow(2,y)-1+f))/(p-f)}h.x=_/t.drawingBufferWidth*2-1,h.y=g/t.drawingBufferHeight*2-1,t.webgpu?h.z=m:h.z=2*m-1,h.w=1,p$1d.multiplyByVector(n,h,h);var $=new o$1p(h.x,h.y,h.z);o$1p.divideByScalar($,h.w,$);var b=o$1p.magnitude($);e._radius>0&&b>e._radius&&(o$1p.normalize($,$),$.x*=e._radius,$.y*=e._radius,$.z*=e._radius),h.x=$.x,h.y=$.y,h.z=$.z,h.w=1;var T=o$1p.fromCartesian4(p$1d.multiplyByVector(e._invertViewMatrix,h,new e$29));e._scene.mode===C$13.COLUMBUS_VIEW&&(T=m$17.convertTo3DCartesian(T)),e._points.push(T),c[4*(_+1)]=h.x,c[4*(_+1)+1]=h.y,c[4*(_+1)+2]=h.z,c[4*(_+1)+3]=h.w}l.vertexBuffer.copyFromArrayView(c,0);for(var C=0;C<e._limitBodys.values.length;C++)e._limitBodys.values[C].update(t,r,o,a,s);e._lineStripCollection.removeAll(),e._lineWidth>=2&&e._lineStripCollection.add({width:e._lineWidth,positions:e._points,material:r$X.fromType(r$X.ColorType,{color:e$1U.fromCartesian4(e._color)})})}))}e$2b(e._faceCommand)&&(e._faceCommand.modelMatrix=e._invertViewMatrix),c.setView({destination:_,orientation:{heading:m,pitch:g,roll:c.roll},convert:!1}),c.frustum.near=f,c.frustum.far=p,e._depthBuffer.isUpdate=!1}}function _0x2ff981(e,t,i){var n=i.camera.frustum,r=10,o=2*Math.atan(n.aspectRatio*Math.tan(.5*n.fovy)),a=r*Math.tan(.5*o),s=r*Math.tan(.5*n.fovy),l=S$12.createTypedArray(S$12.UNSIGNED_SHORT,12),u=S$12.createTypedArray(S$12.UNSIGNED_SHORT,16);l[0]=0,l[1]=2,l[2]=1,l[3]=0,l[4]=4,l[5]=2,l[6]=0,l[7]=3,l[8]=4,l[9]=0,l[10]=1,l[11]=3,u[0]=0,u[1]=1,u[2]=0,u[3]=2,u[4]=0,u[5]=3,u[6]=0,u[7]=4,u[8]=1,u[9]=2,u[10]=1,u[11]=3,u[12]=2,u[13]=4,u[14]=3,u[15]=4;var c=S$12.createTypedArray(S$12.FLOAT,15);c[0]=c[1]=c[2]=0,c[3]=-a,c[4]=-s,c[5]=-10,c[6]=-a,c[7]=s,c[8]=-10,c[9]=a,c[10]=-s,c[11]=-10,c[12]=a,c[13]=s,c[14]=-10;var h=t$Y.createVertexBuffer({context:t,typedArray:c,usage:A$19.STATIC_DRAW}),d=[],f={aPosition:0};d.push({name:"aPosition",index:f.aPosition,vertexBuffer:h,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var p=t$Y.createIndexBuffer({context:t,typedArray:l,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),_=t$Y.createIndexBuffer({context:t,typedArray:u,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});e._viewerLineCommand=new i$_({primitiveType:W$18.LINES,modelMatrix:e._invertViewMatrix,pass:Le$s.ANALYSIS,owner:e,cull:!1}),e._viewerLineCommand.vertexArray=new c$12({context:t,attributes:d,indexBuffer:_}),e._viewerLineCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:f}),e._viewerLineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});for(var m=[],g=0;g<6;g++)m[g]=new e$29(0,0,0,0);var x=new e$29(128/255,1,235/255,1);e._viewerLineCommand.uniformMap={uDiffuseColor:function(){return x},clip_mode:function(){return 0},clip_planes:function(){return m},clip_line_color:function(){return e$29.UNIT_W}},e._viewerCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,pass:Le$s.ANALYSIS,owner:e,cull:!1}),e._viewerCommand.vertexArray=new c$12({context:t,attributes:d,indexBuffer:p}),e._viewerCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:f}),e._viewerCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var v=new e$29(68/255,222/255,158/255,1);e._viewerCommand.uniformMap={uDiffuseColor:function(){return v},clip_mode:function(){return 0},clip_planes:function(){return m},clip_line_color:function(){return e$29.UNIT_W}}}function _0x4ae862(e,t,i){var n=t.drawingBufferWidth+1,r=S$12.createTypedArray(S$12.FLOAT,4*n),o=S$12.createTypedArray(S$12.FLOAT,2*n),a=S$12.createTypedArray(S$12.UNSIGNED_SHORT,n-1),s=S$12.createTypedArray(S$12.UNSIGNED_SHORT,n);o[0]=-1;for(var l=1;l<n;l++)o[2*l]=l/(n-1),o[2*l+1]=0;for(l=0;l<n-1;l++)a[l]=l+1,s[l]=l;s[n-1]=n-1;var u=t$Y.createVertexBuffer({context:t,typedArray:r,usage:A$19.STATIC_DRAW}),c=[],h={aPosition:0};c.push({name:"aPosition",index:h.aPosition,vertexBuffer:u,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),h.aTexCoord0=1;var d=t$Y.createVertexBuffer({context:t,typedArray:o,usage:A$19.STATIC_DRAW});c.push({name:"aTexCoord0",index:h.aTexCoord0,vertexBuffer:d,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var f=t$Y.createIndexBuffer({context:t,typedArray:a,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),p=t$Y.createIndexBuffer({context:t,typedArray:s,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),_={uSkylineColor:function(){return e._color}};e._lineCommand=new i$_({primitiveType:W$18.LINE_STRIP,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!1}),e._lineCommand.vertexArray=new c$12({context:t,attributes:c,indexBuffer:f}),e._lineCommand.shaderProgram=r$13.fromCache({name:"Skyline",context:t,vertexShaderSource:_0x150dfa,fragmentShaderSource:_0x2821fb,attributeLocations:h}),e._lineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}}),e._lineCommand.uniformMap=_,e._faceCommand=new i$_({primitiveType:W$18.TRIANGLE_FAN,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!1}),e._faceCommand.vertexArray=new c$12({context:t,attributes:c,indexBuffer:p}),e._faceCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:_0x150dfa,fragmentShaderSource:_0x2821fb,attributeLocations:h}),e._faceCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}}),e._faceCommand.uniformMap=_}_0x3e66a2(),Object.defineProperties(_0x1e0d7c.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},color:{get:function(){var e=new e$1U;return e.red=this._color.x,e.green=this._color.y,e.blue=this._color.z,e.alpha=this._color.w,e},set:function(e){this._color.x=e.red,this._color.y=e.green,this._color.z=e.blue,this._color.w=e.alpha,this._lineWidth>=2&&(this._update=!0)}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},displayMode:{get:function(){return this._displayMode}},displayStyle:{get:function(){return this._displayStyle},set:function(e){this._displayStyle=e}},radius:{get:function(){return this._radius},set:function(e){this._radius=e,this._update=!0}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e,this._update=!0}},ignoreGlobe:{get:function(){return this._ignoreGlobe},set:function(e){this._ignoreGlobe=e,e$2b(this._depthBuffer)&&(this._depthBuffer.environmentVisible.isGlobalVisible=!this._ignoreGlobe,this._update=!0)}}}),_0x1e0d7c.prototype.update=function(e,t,i){if(!t._fboState.enabled){this._update&&(e$2b(this._depthBuffer)||(this._depthBuffer=new s$T(e),this._depthBuffer.environmentVisible.isGlobalVisible=!this._ignoreGlobe,this._depthBuffer.environmentVisible.isObjectVisible=!0,t._framebufferList[this._name]=this._depthBuffer,this._frameState=t),this._update=!1,_0x48af61(this),_0x27ff32(this),_0x594e59(this,e,t),_0x2ff981(this,e,t),_0x4ae862(this,e));for(var n=0;n<this._limitBodys.values.length;n++){var r=this._limitBodys.values[n];e$2b(r)&&e$2b(r._command)&&i.push(r._command)}e$2b(this._viewerCommand),e$2b(this._viewerLineCommand),this._depthBuffer.isUpdate||(this._displayStyle===this._displayMode.LINE?e$2b(this._lineCommand)&&this._lineWidth<2&&i.push(this._lineCommand):e$2b(this._faceCommand)&&i.push(this._faceCommand))}},_0x1e0d7c.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=1<<e,e$2b(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport)},_0x1e0d7c.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},_0x1e0d7c.prototype.getSkyline2D=function(){if(!this._update){for(var e=this._scene.context,t=e.readPixels({framebuffer:this._depthBuffer.framebuffer}),i=(e.drawingBufferWidth,[]),n=[],r=[],o=[],a=new e$29,s=new e$29(1,1/255,1/65025,1/160581375),l=0;l<e.drawingBufferWidth;l++)for(var u=e.drawingBufferHeight-1;u>-1;u--){var c=4*(e.drawingBufferWidth*u+l),h=e$29.unpack(t,c,a);if(e$29.divideByScalar(h,255,h),e$29.dot(h,s)>0){i.push(l/e.drawingBufferWidth),n.push(u/e.drawingBufferHeight),r.push(l),o.push(u);break}}return{x:i,y:n,drawingBufferXArr:r,drawingBufferYArr:o}}},_0x1e0d7c.prototype.getSkyline2DAsync=function(){if(this._update)return Promise.resolve(void 0);var e=this._scene.context;return e.readPixelsAsync({framebuffer:this._depthBuffer.framebuffer}).then((t=>{e.drawingBufferWidth;for(var i=[],n=[],r=[],o=[],a=new e$29,s=new e$29(1,1/255,1/65025,1/160581375),l=0;l<e.drawingBufferWidth;l++)for(var u=e.drawingBufferHeight-1;u>-1;u--){var c=4*(e.drawingBufferWidth*u+l),h=e$29.unpack(t,c,a);if(e$29.divideByScalar(h,255,h),e$29.dot(h,s)>0){i.push(l/e.drawingBufferWidth),n.push(u/e.drawingBufferHeight),r.push(l),o.push(u);break}}var d={x:i,y:n,drawingBufferXArr:r,drawingBufferYArr:o};return Promise.resolve(d)}))},_0x1e0d7c.prototype.getSkyline3D=function(){if(!this._update&&0!==this._points.length){for(var e,t=[],i=[],n=[],r=0,o=this._points.length;r<o;r++)e=a$18.fromCartesian(this._points[r]),t.push(e.longitude*e$2a.DEGREES_PER_RADIAN),i.push(e.latitude*e$2a.DEGREES_PER_RADIAN),n.push(e.height);return{x:t,y:i,z:n}}},_0x1e0d7c.prototype.addLimitbody=function(e){var t=e.name,i=e.position;if(!e$2b(t)||!e$2b(i))return!1;var n=this._limitBodys.get(t);if(e$2b(n))return!1;n=new _0x218aaa(i,this),this._limitBodys.set(t,n),e$2b(this._depthBuffer)&&(this._depthBuffer.isUpdate=!0)},_0x1e0d7c.prototype.removeLimitbody=function(e){return!!this._limitBodys.remove(e)},_0x1e0d7c.prototype.removeAllLimitBody=function(){for(var e=0;e<this._limitBodys.values.length;e++)this._limitBodys.values[e].destroy(),this._limitBodys.values[e]=null;this._limitBodys.removeAll()},_0x1e0d7c.prototype.clear=function(){this.removeAllLimitBody(),this._update=!1,this._lineStripCollection.removeAll(),this._points=[],_0x48af61(this),_0x27ff32(this)},_0x1e0d7c.prototype.getObjectIds=function(){this._scene.renderIds(this.skylineCamera);var e=this._scene._defaultView.pickFramebuffer;if(e$2b(e)){var t=this._scene._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=t.readPixels({x:0,y:0,width:i,height:n,framebuffer:e._fb}),o=this.getSkyline2D();if(e$2b(o)){for(var a,s,l=o.drawingBufferXArr,u=o.drawingBufferYArr,c=l.length,h={};c--;){a=l[c],s=u[c];var d=e$29.fromArray(r,4*i*s+4*a),f=e$1U.byteToRgba(d.x,d.y,d.z,d.w),p=t.getObjectByPickId(f);if(e$2b(p)){var _=p.primitive.id;f=p.id;e$2b(h[_])||(h[_]=[]),-1===h[_].indexOf(f)&&h[_].push(f)}}return h}}},_0x1e0d7c.prototype.getObjectIdsAsync=function(){this._scene.renderIds(this.skylineCamera);var e=this._scene._defaultView.pickFramebuffer;if(!e$2b(e))return Promise.resolve(void 0);var t=this._scene._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return t.readPixelsAsync({x:0,y:0,width:i,height:n,framebuffer:e._fb}).then((e=>this.getSkyline2DAsync().then((n=>{if(!e$2b(n))return Promise.resolve(void 0);for(var r,o,a=n.drawingBufferXArr,s=n.drawingBufferYArr,l=a.length,u={};l--;){r=a[l],o=s[l];var c=e$29.fromArray(e,4*i*o+4*r),h=e$1U.byteToRgba(c.x,c.y,c.z,c.w),d=t.getObjectByPickId(h);if(e$2b(d)){var f=d.primitive.id;h=d.id;e$2b(u[f])||(u[f]=[]),-1===u[f].indexOf(h)&&u[f].push(h)}}return Promise.resolve(u)}))))},_0x1e0d7c.prototype.getSkylineSectorParameter=function(){var e=this.getSkyline3D();if(e$2b(e)){for(var t,i,n,r=e.x,o=e.y,a=e.z,s=new t$M,l=0,u=r.length;l<u;l++)t=r[l],i=o[l],n=a[l],s.add(new s$M(t,i,n));return{geoLine3D:new p$T([s]),viewPos:new s$M(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2])}}},_0x1e0d7c.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("Skyline"),""===this._name&&(this._name="skyline"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},_0x1e0d7c.prototype.destroy=function(){return e$2b(this._frameState)&&(e$2b(this._depthBuffer)&&delete this._frameState._framebufferList[this._name],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),_0x48af61(this),_0x27ff32(this),this.removeAllLimitBody(),this._scene._analyst3D.remove(this._name,!0),i$10(this)};var _0x3245ee=(_0x4b5a92=!0,function(e,t){var i=_0x4b5a92?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4b5a92=!1,i}),_0x235668=_0x3245ee(void 0,(function(){return _0x235668.toString().search("(((.+)+)+)+$").toString().constructor(_0x235668).search("(((.+)+)+)+$")})),_0x4b5a92;_0x235668();var _0x594de8="\n#ifdef SQRESULT\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \nvarying vec4 vSecondColor; \nvarying vec4 vColor;\nvarying vec4 vSQ_clip_pos; \n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef SQRESULT\nbool isPointInObject(vec4 ndc)\n{\n vec2 depthTexCoord = ndc.xy * 0.5 + 0.5;\n bool bIn = false;\n vec4 color = texture2D(uFrontColorTexture, depthTexCoord);\n float pixelZWindow = 0.0;\n#ifdef WEBGPU\n pixelZWindow = ndc.z;\n#else\n pixelZWindow = ndc.z * 0.5 + 0.5;\n#endif\n if(color.r > 0.99 && color.g < 0.01 && color.b < 0.01)\n {\n float z_window_near = czm_unpackDepth(texture2D(uFrontDepthTexture, depthTexCoord.xy));\n z_window_near = czm_reverseLogDepth(z_window_near);\n float z_window_far = czm_unpackDepth(texture2D(uBackDepthTexture, depthTexCoord.xy));\n z_window_far = czm_reverseLogDepth(z_window_far);\n if(pixelZWindow - z_window_near > -0.0000001 && z_window_far - pixelZWindow > -0.0000001)\n {\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\n#endif\nvoid main() \n{\n#ifdef SQRESULT\n vec4 ndc = vSQ_clip_pos / vSQ_clip_pos.w; \n if(!isPointInObject(ndc)) \n { \n discard; \n } \n if(vColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = vSecondColor; \n#endif\n#ifdef DEPTH\n #ifdef LOG_DEPTH\n czm_writeLogDepth();\n gl_FragColor = czm_packDepth(gl_FragDepthEXT);\n #else\n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n #endif\n#endif\n#ifdef COLOR\n gl_FragColor = vec4(1.0,0.0,0.0,1.0);\n#endif\n}";function s$L(e){var t=new n$Z(e);t.blendingEnabled=!0,t.viewport=new f$18,this._context=e,this._pixelDatatype=_$$.UNSIGNED_BYTE,this._fb=new t$W({context:e,colorTextures:[new t$V({context:e,width:1,height:1})],depthStencilTexture:new t$V({context:e,width:1,height:1,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})}),this._passState=t,this.mrtSupport=e.drawBuffers&&e.colorBufferFloat&&e.depthTexture,this.mrt=!1,this._mrt=!1,this._width=1,this._height=1,this._clearCommand=new t$X({color:new e$1U(0,0,0,0),stencil:0,depth:1}),this._clearCommand.framebuffer=this._fb,this._generateMipmap=!1}function t$L(e){this._renderTexture=new s$L(e),this._renderTexture._passState.blendingEnabled=!1,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0},this._type=Qe$c.SQRESULT,this._beginFunc=void 0,this._endFunc=void 0}s$L.prototype.update=function(e){var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=de$x.FRAMEBUFFER_COMPLETE;if(!e$2b(this._fb)||this._width!==i||this._height!==n||this.mrt!==this._mrt){this._width=i,this._height=n,this._fb=this._fb&&this._fb.destroy();var o=[new t$V({context:t,width:i,height:n,pixelDatatype:this._pixelDatatype,sampler:new e$1P({minificationFilter:this._generateMipmap?tt$h.LINEAR_MIPMAP_LINEAR:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})];this.mrt!==this._mrt&&this.mrt&&this.mrtSupport&&o.push(new t$V({context:t,width:i,height:n,pixelDatatype:this._pixelDatatype,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}));var a=new t$V({context:t,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8});this._fb=new t$W({context:t,colorTextures:o,depthStencilTexture:a}),this._clearCommand.framebuffer=this._fb,this._passState.framebuffer=this._fb,this._mrt=this.mrt,this._fb.status!==r&&(this._fb=this._fb&&this._fb.destroy())}this._clearCommand.execute(t,this._passState)},s$L.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),i$10(this)},Object.defineProperties(t$L.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return this._type},set:function(e){this._type=e}}}),t$L.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._beginFunc&&this._beginFunc(e),this._renderTexture._passState},t$L.prototype.end=function(e){this._endFunc&&this._endFunc(e)},t$L.prototype.update=function(e,t){},t$L.prototype.isDestroyed=function(){return!1},t$L.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)};var e$1x={Disjoint:0,Intersects:1,Contains:2},j$X=Object.freeze(e$1x),e$1w={Fill:0,WireFrame:1,Fill_And_WireFrame:2},fr$2=Object.freeze(e$1w),_0x4d9b4d=(_0x57fba7=!0,function(e,t){var i=_0x57fba7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57fba7=!1,i}),_0x1d8b89=_0x4d9b4d(void 0,(function(){return _0x1d8b89.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d8b89).search("(((.+)+)+)+$")})),_0x57fba7;_0x1d8b89();var _0x49106d="attribute vec4 aPosition;\nattribute vec4 aNormal;\nuniform vec4 uDiffuseColor;\nvarying vec4 vColor;\nvarying vec3 normalEC;\nvarying vec3 positionEC;\nvoid main()\n{\n normalEC = czm_normal * aNormal.xyz;\n positionEC = (czm_modelView * aPosition).xyz;\n vColor = uDiffuseColor;\n #ifdef USE_RelativeOrigin\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz - czm_relativeOrigin, 1.0);\n #else\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n #endif\n}",_0x5cd7d7=(_0x58b187=!0,function(e,t){var i=_0x58b187?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x58b187=!1,i}),_0xcf03ed=_0x5cd7d7(void 0,(function(){return _0xcf03ed.toString().search("(((.+)+)+)+$").toString().constructor(_0xcf03ed).search("(((.+)+)+)+$")})),_0x58b187;_0xcf03ed();var _0x1b19d0="varying vec4 vColor;\nvarying vec3 normalEC;\nvarying vec3 positionEC;\nvoid main()\n{\n vec3 positionToEyeEC = -positionEC;\n vec4 color = czm_gammaCorrect(vColor);\n czm_materialInput materialInput;\n materialInput.normalEC = normalize(normalEC);\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = vColor.rgb;\n material.alpha = vColor.a;\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}",_0x47c3db=(_0x11295a=!0,function(e,t){var i=_0x11295a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x11295a=!1,i}),_0xbb8a02=_0x47c3db(void 0,(function(){return _0xbb8a02.toString().search("(((.+)+)+)+$").toString().constructor(_0xbb8a02).search("(((.+)+)+)+$")})),_0x11295a;_0xbb8a02();var _0x3e7b8e="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TEXTURE\nattribute vec4 aTexCoord0;\n#endif\n#ifdef VertexColor\n #ifdef WEBGPU\n attribute uvec4 aColor;\n #else\n attribute vec4 aColor;\n #endif\n#endif\nattribute vec3 aPosHigh;\nattribute vec3 aPosLow;\nattribute vec4 aQuaternion;\nattribute vec4 aScaleAndRadius;\nattribute vec4 aColor2;\nattribute vec4 aPickColor;\nattribute vec3 aOffset;\n#ifdef LocalTransform\nattribute vec4 aLocalTranslation;\nattribute vec4 aLocalQuaternion;\n#endif\n#include <SceneUboDecl>\nuniform vec4 uFillColor;\nuniform mat4 uGeoMat;\nuniform float uRangeMode;\nuniform vec2 uVisibleDistance;\nuniform float uFilterPixel;\nuniform float uMixColorType;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec4 vPositionWC;\nvarying vec3 vNormalEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying mat4 vModelMatrix;\n#ifdef Volume\n attribute vec3 aRatio;\n varying vec3 vecRotioCoord;\n varying vec2 vecHypTexCoord;\n#endif\n\nmat4 transfromFromQuaternion(vec4 q, vec4 translation)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, translation.x, translation.y, translation.z, 1.0);\n}\nfloat filterTest(vec3 rte, float radius)\n{\n if(uRangeMode > 0.0)\n {\n float distance = length(rte);\n float theta = czm_piOverFour * 0.5;\n float screenPix = max(czm_globeDepthTextureDim.x, czm_globeDepthTextureDim.y) * 0.5;\n float lamat = screenPix / tan(theta);\n return lamat * radius / distance > uFilterPixel ? 1.0 : 0.0;\n }\n return length(rte) < uVisibleDistance.x && length(rte) > uVisibleDistance.y ? 1.0 : 0.0;\n}\nvec4 translateRelativeToEye(vec3 high,vec3 low) {\n vec3 highDifference = high - czm_encodedOriginCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedOriginCameraPositionMCLow;\n return vec4(highDifference + lowDifference, 1.0);\n}\nvoid main()\n{\n vec4 vertexPos = vec4(aPosition.xyz, 1.0) - vec4(aOffset.xyz,0.0);\n vec4 positionMC = uGeoMat*vertexPos;\n vec4 rte = translateRelativeToEye(aPosHigh,aPosLow);\n#ifdef TEXTURE\n vTexCoord = aTexCoord0.xy;\n#endif\n float show = filterTest(rte.xyz, aScaleAndRadius.w);\n mat4 rotationMat = transfromFromQuaternion(aQuaternion, vec4(0.0));\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMat[0].xyz,0.0);\n worldMatrix[1] = vec4(rotationMat[1].xyz,0.0);\n worldMatrix[2] = vec4(rotationMat[2].xyz,0.0);\n worldMatrix[3] = vec4(rte.x,rte.y,rte.z,1.0);\n mat4 scaleMatrix;\n vec3 scale = aScaleAndRadius.xyz;\n scaleMatrix[0] = vec4(scale.x,0,0,0.0);\n scaleMatrix[1] = vec4(0,scale.y,0,0.0);\n scaleMatrix[2] = vec4(0,0,scale.z,0.0);\n scaleMatrix[3] = vec4(0,0,0,1.0);\n mat4 modelMatrix = worldMatrix;\n#ifdef LocalTransform\n mat4 localTransformMat = transfromFromQuaternion(aLocalQuaternion, aLocalTranslation);\n modelMatrix *= localTransformMat;\n#endif\n modelMatrix *= scaleMatrix;\n mat3 rotationMatrix = mat3(modelMatrix);\n positionMC = modelMatrix * vec4(positionMC.xyz, 1.0);\n positionMC.w = 1.0;\n gl_Position = show * czm_modelViewProjectionRelativeToEye * positionMC;\n vPositionMC.xyz = positionMC.xyz;\n vPositionWC = modelMatrix * positionMC;\n vPositionMC.w = 0.0;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = aColor / 255.0;\n #endif\n#endif\n if(abs(uMixColorType) < 0.1)\n {\n vColor = vertexColor * aColor2;\n }\n else\n {\n vColor = aColor2;\n }\n vPickColor = aPickColor / 255.0;\n vModelMatrix = modelMatrix * uGeoMat;\n vPositionEC = (czm_modelViewRelativeToEye * vec4(vPositionMC.xyz, 1.0)).xyz;\n#ifdef HAS_NORMAL\n if(length(aNormal) > 0.8)\n {\n mat4 modelView = uView * vModelMatrix;\n mat4 invModelView = czm_inverseMatrix(modelView);\n mat3 invModelViewRotation = mat3(invModelView);\n mat3 normalMatrix = czm_transpose(invModelViewRotation);\n vNormalEC = normalize(normalMatrix * aNormal);\n vPositionMC.w = 1.0;\n }\n#endif\n#ifdef Volume\nvecRotioCoord = aRatio;\n#endif\n#ifdef ClampObject\n gl_Position = czm_depthClampFarPlane(czm_modelViewProjectionRelativeToEye*positionMC);\n vColor = vColor * uFillColor;\n#endif\n}\n";function o$10(e,t,i){return p$_({url:e,responseType:"arraybuffer",headers:t,request:i})}var g$$=273;function P$T(e,t,i){switch(e){case de$x.COMPRESSED_RGB_S3TC_DXT1_EXT:case de$x.COMPRESSED_RGB_ETC1_WEBGL:return(t+3>>2)*(i+3>>2)*8;case de$x.COMPRESSED_RGBA_S3TC_DXT5_EXT:return(t+3>>2)*(i+3>>2)*16;case de$x.COMPRESSED_RGB_PVRTC_4BPPV1_IMG:case de$x.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case de$x.COMPRESSED_RGB_PVRTC_2BPPV1_IMG:case de$x.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case g$$:return t*i*2;case V$10.RGBA:return t*i*4;case V$10.LUMINANCE_ALPHA:return t*i*2;default:return 0}}var o$$=function(e,t,i,n,r,o,a,s,l,u,c,h){this._context=t,this._gl=t._gl,this._width=i,this._height=n,this._imageBuffer=o,this._oriCompressType=h,this._texture=null,this._internalFormat=r,this._isCompressed=V$10.isCompressedFormat(r),this._wrapS=u$_(s,q$19.CLAMP_TO_EDGE),this._wrapT=u$_(l,q$19.CLAMP_TO_EDGE),this._pixelDataType=u$_(u,_$$.UNSIGNED_BYTE),this._pixelDataType===_$$.FLOAT&&(this._wrapS=q$19.CLAMP_TO_EDGE,this._wrapT=q$19.CLAMP_TO_EDGE),this.ready=!1,this.is3D=a,this.id=e,this._target=this._gl.TEXTURE_2D,this._size=o.length,this._mipmapEnabled=u$_(c,!0),1==this.is3D?this.init3DTexture():(this._target=this._gl.TEXTURE_2D,this._initTexture2D()),V$10.isCompressedFormat(this._internalFormat)?this._sizeInBytes=V$10.compressedTextureSizeInBytes(this._internalFormat,this._width,this._height):this._sizeInBytes=this._width*this._height*4,this._context.memorySize+=this._sizeInBytes};function M$X(e,t,i,n){var r=1;if(!e$2a.isPowerOfTwo(i)||!e$2a.isPowerOfTwo(n))return 1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=V$10.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l==o?r:1}function d$17(e,t,i){var n=e.length,r=Math.ceil(Math.sqrt(n)),o=document.createElement("canvas");o.width=t*r,o.height=i*r;var a=o.getContext("2d");a.fillStyle="#00f",a.fillRect(0,0,o.width,o.height);for(var s=0;s<n;s++){var l=e[s%n],u=s%r,c=Math.floor(s/r);a.drawImage(l,u*t,c*i)}return a.getImageData(0,0,t*r,i*r)}function g$_(e,t,i){switch(e){case de$x.COMPRESSED_RGB_S3TC_DXT1_EXT:case de$x.COMPRESSED_RGB_ETC1_WEBGL:return(t+3>>2)*(i+3>>2)*8;case de$x.COMPRESSED_RGBA_S3TC_DXT5_EXT:return(t+3>>2)*(i+3>>2)*16;case de$x.COMPRESSED_RGB_PVRTC_4BPPV1_IMG:case de$x.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case de$x.COMPRESSED_RGB_PVRTC_2BPPV1_IMG:case de$x.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case V$10.RGB:return t*i*3;case V$10.RGBA:return t*i*4;case V$10.LUMINANCE_ALPHA:return t*i*2;default:return 0}}Object.defineProperties(o$$.prototype,{width:{get:function(){return this._width}},height:{get:function(){return this._height}},size:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._sizeInBytes}},pixelDataType:{get:function(){return this._pixelDataType}}}),o$$.prototype._initTexture2D=function(){var e=this._gl;this._texture=e.createTexture(),this._uploadImageData(!1),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$$.prototype.generateMipmap=function(){var e=I$1e.NICEST;if(this._width>1&&!e$2a.isPowerOfTwo(this._width))throw new DeveloperError("width must be a power of two to call generateMipmap().");if(this._height>1&&!e$2a.isPowerOfTwo(this._height))throw new DeveloperError("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},o$$.prototype.updateTexture=function(e,t,i){this.ready=!1,this._width=i.width,this._height=i.height,this._internalFormat=i.internalFormat,this._pixelDataType=i.pixelDataType,this._wrapS=i.wrapS,this._wrapT=i.wrapT,this._mipmapEnabled=u$_(i.mipmapEnabled,!0);var n=this._gl;this.id=e,this._size=t.length,this._target=n.TEXTURE_2D,this._imageBuffer=t,this._uploadImageData(!0),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$$.prototype._uploadImageData=function(e){var t=this._internalFormat,i=this._width,n=this._height,r=this._imageBuffer,o=this._gl;o.bindTexture(o.TEXTURE_2D,this._texture),t===V$10.LUMINANCE_ALPHA||0===this._oriCompressType?o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1):(t==V$10.RGB||t==V$10.RGBA||t===g$$)&&o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!0);var a,s=M$X(r,t,i,n);this._context.webgl2&&!e&&t!==de$x.LUMINANCE_ALPHA&&(a=t===g$$?o.RGB565:V$10.toInternalFormat(t,this._pixelDataType,this._context),o.texStorage2D(o.TEXTURE_2D,s,a,i,n));var l=s>1&&this._mipmapEnabled,u=0,c=0;do{var h,d=P$T(t,i,n);h=t==V$10.RGBA&&this._pixelDataType===_$$.FLOAT?new Float32Array(r.buffer,r.byteOffset+u,d):new Uint8Array(r.buffer,r.byteOffset+u,d),this._isCompressed?this._context.webgl2?o.compressedTexSubImage2D(o.TEXTURE_2D,c++,0,0,i,n,t,h):o.compressedTexImage2D(o.TEXTURE_2D,c++,t,i,n,0,h):this._context.webgl2?t===g$$?(o.texSubImage2D(o.TEXTURE_2D,0,0,0,i,n,o.RGB,o.UNSIGNED_SHORT_5_6_5,r),d/=2):t===V$10.LUMINANCE_ALPHA?o.texImage2D(o.TEXTURE_2D,0,t,i,n,0,t,o.UNSIGNED_BYTE,h):o.texSubImage2D(o.TEXTURE_2D,c++,0,0,i,n,t,this._pixelDataType,h):t===g$$?(o.texImage2D(o.TEXTURE_2D,0,o.RGB,i,n,0,o.RGB,o.UNSIGNED_SHORT_5_6_5,r),d/=2):o.texImage2D(o.TEXTURE_2D,c++,t,i,n,0,t,this._pixelDataType,h),i=Math.max(i>>1,1),n=Math.max(n>>1,1),u+=d}while(u<r.length&&l);c>1?(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),e$2a.isPowerOfTwo(this._width)&&e$2a.isPowerOfTwo(this._height)?o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR_MIPMAP_LINEAR):o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR)):e$2a.isPowerOfTwo(this._width)&&e$2a.isPowerOfTwo(this._height)&&t==V$10.RGBA?(this.generateMipmap(),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR_MIPMAP_LINEAR)):(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR)),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,this._wrapS),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,this._wrapT),o.bindTexture(o.TEXTURE_2D,null)},o$$.prototype.init3DTexture=function(){for(var e=this._imageBuffer,t=this._gl,i=d$17(e,this._width,this._height),n=i.width*i.height*4,r=new Uint8Array(n),o=0;o<n;o++)r[o]=i.data[o];t=this._gl;this._texture=t.createTexture(),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,this._texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),e.length,t.texImage2D(t.TEXTURE_2D,0,t.RGBA,i.width,i.height,0,t.RGBA,t.UNSIGNED_BYTE,r),t.bindTexture(t.TEXTURE_2D,null),this.ready=!0},o$$.prototype.destroy=function(){this._gl.deleteTexture(this._texture),this._texture=null,this.ready=!1,this.id=0,this._context.memorySize-=this._sizeInBytes},o$$.prototype.enable=function(){this.ready&&(this._gl.activeTexture(this._gl.TEXTURE0),this._gl.bindTexture(this._target,this._texture))},o$$.prototype.disable=function(){this.ready&&this._gl.bindTexture(this._target,null)};var o$_=function(e,t,i,n,r,o,a,s,l,u,c,h){this._context=t,this._width=i,this._height=n,this._imageBuffer=o,this._oriCompressType=h,this._texture=null,this._internalFormat=r,this._isCompressed=V$10.isCompressedFormat(r),this._wrapS=u$_(s,q$19.CLAMP_TO_EDGE),this._wrapT=u$_(l,q$19.CLAMP_TO_EDGE),this._pixelDataType=u$_(u,_$$.UNSIGNED_BYTE),this._pixelDataType===_$$.FLOAT&&(this._wrapS=q$19.CLAMP_TO_EDGE,this._wrapT=q$19.CLAMP_TO_EDGE),this.ready=!1,this.is3D=a,this.id=e,this._size=o.length,this._mipmapEnabled=u$_(c,!0),1==this.is3D||this._initTexture2D(),V$10.isCompressedFormat(this._internalFormat)?this._sizeInBytes=V$10.compressedTextureSizeInBytes(this._internalFormat,this._width,this._height):this._sizeInBytes=this._width*this._height*4,this._context.memorySize+=this._sizeInBytes};function G$12(e,t,i,n){var r=1;if(!e$2a.isPowerOfTwo(i)||!e$2a.isPowerOfTwo(n))return!1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=V$10.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l==o?r:1}Object.defineProperties(o$_.prototype,{width:{get:function(){return this._width}},height:{get:function(){return this._height}},size:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._sizeInBytes}},pixelDataType:{get:function(){return this._pixelDataType}},thinTexture:{get:function(){return this._texture}},internalTexture:{get:function(){return this._texture._texture}}}),o$_.prototype._initTexture2D=function(){this._uploadImageData(),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$_.prototype.generateMipmap=function(){console.log("DDSTextureGPU.prototype.generateMipmap")},o$_.prototype.updateTexture=function(e,t,i){this.ready=!1,this._width=i.width,this._height=i.height,this._internalFormat=i.internalFormat,this._pixelDataType=i.pixelDataType,this._wrapS=i.wrapS,this._wrapT=i.wrapT,this._mipmapEnabled=u$_(i.mipmapEnabled,!0),this.id=e,this._size=t.length,this._imageBuffer=t,this._uploadImageData(),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$_.prototype._uploadImageData=function(){var e=this._context.engine,t=this._internalFormat,i=this._width,n=this._height,r=this._imageBuffer,o=G$12(r,t,i,n),a=o>1&&this._mipmapEnabled;t!==V$10.LUMINANCE_ALPHA&&0!==this._oriCompressType&&(t==V$10.RGB||V$10.RGBA);var s=R$$.toPixelFormat(t),l=R$$.toPixelType(this._pixelDataType),u=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE;if((this._pixelDataType==_$$.FLOAT||this._pixelDataType==_$$.HALF_FLOAT)&&(u=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE),!e$2b(this._texture)){var c=e.createRawTexture(null,i,n,s,!1,!1,u,null,l,0,!1,o);this._texture=new _0x5cc035(c)}var h=0,d=0;do{var f,p=g$_(t,i,n);f=t==V$10.RGBA&&this._pixelDataType===_$$.FLOAT?new Float32Array(r.buffer,r.byteOffset+h,p):new Uint8Array(r.buffer,r.byteOffset+h,p),e.updateSubRawTexture(this._texture._texture,f,s,!1,null,l,!1,i,n,0,0,d++),i=Math.max(i>>1,1),n=Math.max(n>>1,1),h+=p}while(h<r.length&&a)},o$_.prototype.destroy=function(){this._texture.dispose(),this.ready=!1,this.id=0,this._context.memorySize-=this._sizeInBytes},o$_.prototype.enable=function(){console.log("DDSTextureGPU.prototype.enable")},o$_.prototype.disable=function(){console.log("DDSTextureGPU.prototype.disable")};var _0x5cce80=(_0x3e4d55=!0,function(e,t){var i=_0x3e4d55?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3e4d55=!1,i}),_0x54d3b5=_0x5cce80(void 0,(function(){return _0x54d3b5.toString().search("(((.+)+)+)+$").toString().constructor(_0x54d3b5).search("(((.+)+)+)+$")})),_0x3e4d55;_0x54d3b5();var _0x2dc616=function(e,t,i,n,r,o,a,s,l,u,c,h){t.webgpu?this._inner=new o$_(e,t,i,n,r,o,a,s,l,u,c,h):this._inner=new o$$(e,t,i,n,r,o,a,s,l,u,c,h)};Object.defineProperties(_0x2dc616.prototype,{width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},size:{get:function(){return this._inner.size}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},pixelDataType:{get:function(){return this._inner.pixelDataType}},ready:{get:function(){return this._inner.ready}},is3D:{get:function(){return this._inner.is3D}},id:{get:function(){return this._inner.id}},context:{get:function(){return this._inner._context}},_target:{get:function(){return this._inner._target}},_texture:{get:function(){return this._inner._texture}}}),_0x2dc616.prototype.generateMipmap=function(){this._inner.generateMipmap()},_0x2dc616.prototype.updateTexture=function(e,t,i){this._inner.updateTexture(e,t,i)},_0x2dc616.prototype.init3DTexture=function(){this._inner.init3DTexture()},_0x2dc616.prototype.destroy=function(){this._inner.destroy()},_0x2dc616.prototype.enable=function(){this._inner.enable()},_0x2dc616.prototype.disable=function(){this._inner.disable()};var _0x3b4ea7=(_0x369fd2=!0,function(e,t){var i=_0x369fd2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x369fd2=!1,i}),_0x4c1891=_0x3b4ea7(void 0,(function(){return _0x4c1891.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c1891).search("(((.+)+)+)+$")})),_0x369fd2;_0x4c1891();var _0x440410={encNONE:0,enrS3TCDXTN:14,enrPVRTPF_PVRTC2:19,enrPVRTPF_PVRTC:20,enrPVRTPF_PVRTC_4bpp:21,enrPVRTPF_ETC1:22},_0x2072ef=Object.freeze(_0x440410),_0x4efa5c=(_0x2c9436=!0,function(e,t){var i=_0x2c9436?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c9436=!1,i}),_0x121ad1=_0x4efa5c(void 0,(function(){return _0x121ad1.toString().search("(((.+)+)+)+$").toString().constructor(_0x121ad1).search("(((.+)+)+)+$")})),_0x2c9436;_0x121ad1();var _0x10010e={LUMINANCE_8:1,LUMINANCE_16:2,ALPHA:3,ALPHA_4_LUMINANCE_4:4,LUMINANCE_ALPHA:5,RGB_565:6,BGR565:7,RGB:10,BGR:11,ARGB:12,ABGR:13,BGRA:14,WEBP:25,RGBA:28,DXT1:17,DXT2:18,DXT3:19,DXT4:20,DXT5:21,CRN_DXT5:26,STANDARD_CRN:27,KTX2:31},_0x3dfacd=Object.freeze(_0x10010e),e$1v={DisplayMode:{NONE:0,FACE:1,LINE:2,FACE_AND_LINE:3},AnalysisRegionMode:{ARM_NONE:0,ARM_ALL:1,ARM_REGION:2},FilterMode:{LINEAR:0,NEAREST:1}},k$Q=Object.freeze(e$1v),_0x4a46a1=(_0x54bf39=!0,function(e,t){var i=_0x54bf39?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x54bf39=!1,i}),_0x4a6033=_0x4a46a1(void 0,(function(){return _0x4a6033.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a6033).search("(((.+)+)+)+$")})),_0x54bf39;_0x4a6033();var _0x4be70b={MIX:0,REPLACE:1,SILHOUETTE:2,ALWAYS_SHOW_SILHOUETTE:3,SILHOUETTE_EDGE:4,WIREFRAME:5},Zr$2=Object.freeze(_0x4be70b);function i$S(){this._dictTable=new e$1N,this._imageBuffer=new Uint8Array(262144),this._sortKey=[]}function d$16(e,t){return e-t}function u$M(){this._maxVisibleValue=17976931348623157e292,this._minVisibleValue=-17976931348623157e292,this._floor=0,this._ceiling=0,this._opacity=1,this._updateColorDictTable=!1,this._coverageArea=[],this._linesInterval=100,this._updatePolygon=!0,this._lineColor=new e$1U(0,1,1,1),this._displayMode=k$Q.DisplayMode.FACE,this._dictColorTable=void 0,this._emissionTextureUrl="",this._emissionTextureChanged=!1,this._emissionTexCoordSpeed=new o$1p(0,0),this._emissionTexCoordScale=new o$1p(50,50),this._emissionTextureArray=[],this._loadedEmissionTexture=0,this._noValueColor=new e$1U(1,1,1,1),this._textureFilterMode=k$Q.FilterMode.LINEAR,this._visibleDistanceMax=Number.MAX_VALUE,this._visibleDistanceMin=0,this._minVisibleAltitude=0,this._maxVisibleAltitude=Number.MAX_VALUE}i$S.prototype.destroy=function(){this._dictTable.removeAll(),this._imageBuffer=null,this._sortKey=null},i$S.prototype.getItem=function(e){if(e>this._dictTable.values.length-1)return null;var t=[];for(var i in this._dictTable._hash)t.push(parseFloat(i));t.sort(d$16);var n=t[e];return e$2b(n)?{altitude:n,color:this._dictTable.get(n)}:null},i$S.prototype.count=function(){return this._dictTable.values.length},i$S.prototype.insert=function(e,t){if(!e$2b(this._dictTable.get(e))){var i=e$1U.clone(t,i);this._dictTable.set(e,i)}},i$S.prototype.remove=function(e){return this._dictTable.remove(e)},i$S.prototype.clear=function(){this._dictTable.values.length=0},i$S.clone=function(e,t){if(e$2b(e)){e$2b(t)||(t=new i$S),e$1N.clone(e._dictTable,t._dictTable);for(var i=0;i<e._imageBuffer.length;i++)t._imageBuffer[i]=e._imageBuffer[i];return t}},i$S.prototype.generateBuffer=function(){var e=[],t=0;for(var i in this._dictTable._hash)if(e$2b(i)){var n=this._dictTable.get(i);e[t++]={value:parseFloat(i),color:n}}if(!(e.length<2)){for(t=0;t<e.length-1;t++)for(var r=e[t],o=t+1;o<e.length;o++){var a=e[o];if(r.value>a.value){var s=l$1g(e[t],!0);e[t]=l$1g(e[o],!0),e[o]=s,r=e[t]}}var l=e[0].value,u=e[e.length-1].value-l,c=document.createElement("canvas");c.width=16384,c.height=1;var h=c.getContext("2d");h.beginPath();var d=h.createLinearGradient(0,0,16384,0);for(t=0;t<e.length;t++)d.addColorStop((e[t].value-l)/u,e[t].color.toCssColorString());h.fillStyle=d,h.rect(0,0,c.width,c.height),h.fill();var f=h.getImageData(0,0,c.width,1).data;for(o=0;o<16;o++)for(t=0;t<4096;t++)this._imageBuffer[t+1024*o*4*4]=f[t+1024*o*4],this._imageBuffer[t+1024*o*4*4+4096]=f[t+1024*o*4],this._imageBuffer[t+1024*o*4*4+8192]=f[t+1024*o*4],this._imageBuffer[t+1024*o*4*4+12288]=f[t+1024*o*4];for(var i in this._dictTable._hash)this._sortKey.push(parseFloat(i));return this._sortKey.sort(d$16),c}},i$S.prototype.getColor=function(e){for(var t=0;t<this._sortKey.length;t++)if(this._sortKey[t]>=e||Math.abs(this._sortKey[t]-e)<e$2a.EPSILON6)return this._dictTable.get(this._sortKey[t])},u$M.prototype.destroy=function(){this._coverageArea.length=0,e$2b(this._dictColorTable)&&this._dictColorTable.destroy()},Object.defineProperties(u$M.prototype,{MinVisibleValue:{get:function(){return this._minVisibleValue},set:function(e){this._minVisibleValue=e}},MaxVisibleValue:{get:function(){return this._maxVisibleValue},set:function(e){this._maxVisibleValue=e}},ColorTableMaxKey:{get:function(){return this._ceiling},set:function(e){this._ceiling=e}},ColorTableMinKey:{get:function(){return this._floor},set:function(e){this._floor=e}},ColorTable:{get:function(){return this._dictColorTable},set:function(e){if(e$2b(e)){this._dictColorTable=i$S.clone(e,this._dictColorTable),this._updateColorDictTable=!0;var t=this._dictColorTable.count();if(!(t<1)){new e$1U;var i=0,n=0,r=this._dictColorTable.getItem(0);e$2b(r)&&e$2b(r.altitude)&&(i=parseFloat(r.altitude)),e$2b(r=this._dictColorTable.getItem(t-1))&&e$2b(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n)}}else e$2b(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null)}},Opacity:{get:function(){return this._opacity},set:function(e){this._opacity=e}},CoverageArea:{get:function(){return this._coverageArea},set:function(e){if(this._updatePolygon=!0,this._coverageArea.length=0,e$2b(e))for(var t=0;t<e.length;t++)this._coverageArea[t]=e[t]}},DisplayMode:{get:function(){return this._displayMode},set:function(e){this._displayMode=e}},LineColor:{get:function(){return this._lineColor},set:function(e){e$1U.clone(e,this._lineColor)}},LineInterval:{get:function(){return this._linesInterval},set:function(e){this._linesInterval=e}},UpdateColorDictTable:{get:function(){return this._updateColorDictTable},set:function(e){this._updateColorDictTable=e}},UpdatePolygonRegion:{get:function(){return this._updatePolygon},set:function(e){this._updatePolygon=e}},emissionTextureUrl:{get:function(){return this._emissionTextureUrl},set:function(e){this._emissionTextureUrl=e,this._emissionTextureArray=[];var t={url:e,USpeed:this._emissionTexCoordSpeed.x,VSpeed:this._emissionTexCoordSpeed.y,UTiling:this._emissionTexCoordScale.x,VTiling:this._emissionTexCoordScale.y};this._emissionTextureArray.push(t),this._emissionTextureChanged=!0,this._loadedEmissionTexture=0}},emissionTexCoordUSpeed:{get:function(){return this._emissionTexCoordSpeed.x},set:function(e){e$2b(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].USpeed=e),this._emissionTexCoordSpeed.x=e}},emissionTexCoordVSpeed:{get:function(){return this._emissionTexCoordSpeed.y},set:function(e){e$2b(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].VSpeed=e),this._emissionTexCoordSpeed.y=e}},emissionTexCoordScale:{get:function(){return this._emissionTexCoordScale},set:function(e){e$2b(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].UTiling=e.x,this._emissionTextureArray[0].VTiling=e.y),this._emissionTexCoordScale=e}},emissionTextureArray:{get:function(){return this._emissionTextureArray},set:function(e){this._emissionTextureArray=e,this._emissionTextureChanged=!0,this._loadedEmissionTexture=0}},noValueColor:{get:function(){return this._noValueColor},set:function(e){!e$2b(e)||(this._noValueColor=e$1U.clone(e,this._noValueColor))}},filterMode:{get:function(){return this._textureFilterMode},set:function(e){this._textureFilterMode=e}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}},visibleDistanceMin:{get:function(){return this._visibleDistanceMin},set:function(e){this._visibleDistanceMin=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){this._maxVisibleAltitude=e}}}),u$M.clone=function(e,t){if(e$2b(e)){e$2b(t)||(t=new u$M),t._maxVisibleValue=e._maxVisibleValue,t._minVisibleValue=e._minVisibleValue,t._floor=e._floor,t._ceiling=e._ceiling,t._opacity=e._opacity,t._updateColorDictTable=e._updateColorDictTable,t._linesInterval=e._linesInterval,t._updatePolygon=e._updatePolygon,t._displayMode=e._displayMode,t._lineColor=e$1U.clone(e._lineColor,t._lineColor),t._dictColorTable=i$S.clone(e._dictColorTable,t._dictColorTable),t._emissionTexCoordSpeed=o$1p.clone(e._emissionTexCoordSpeed,t._emissionTexCoordSpeed),t._emissionTexCoordScale=o$1p.clone(e._emissionTexCoordScale,t._emissionTexCoordScale),t._emissionTextureUrl=e._emissionTextureUrl,t._emissionTextureArray=e._emissionTextureArray,t._loadedEmissionTexture=e._loadedEmissionTexture,t._noValueColor=e$1U.clone(e._noValueColor,t._noValueColor),t._coverageArea.length=0;for(var i=0;i<e._coverageArea.length;i++)t._coverageArea[i]=e._coverageArea[i];return t._textureFilterMode=e._textureFilterMode,t._visibleDistanceMax=e._visibleDistanceMax,t._visibleDistanceMin=e._visibleDistanceMin,t._maxVisibleAltitude=e._maxVisibleAltitude,t._minVisibleAltitude=e._minVisibleAltitude,t}};var r$V=[];u$M.prototype._getEmissionAtlasTextureRects=function(){var e=this._emissionTextureAtlas;if(!e$2b(e))return r$V;var t,i=this._emissionTextureArray.length;if(r$V.length!=i)for(r$V=[],t=0;t<i;t++)r$V.push(new e$29);for(t=0;t<i;t++){var n=this._emissionTextureArray[t],r=e.textureCoordinates[n.textureAtlasID];e$2b(r)&&(r$V[t].x=r.x,r$V[t].y=r.y,r$V[t].z=r.x+r.width,r$V[t].w=r.y+r.height)}return r$V};var l$Y=[];u$M.prototype._getEmissionTexAtlasTilingAndOffset=function(){if(!e$2b(this._emissionTextureArray))return l$Y;var e,t=this._emissionTextureArray.length;if(l$Y.length!=t)for(l$Y=[],e=0;e<t;e++)l$Y.push(new e$29);var i=performance.now()/1e3;for(e=0;e<t;e++){var n=this._emissionTextureArray[e];l$Y[e].x=n.UTiling,l$Y[e].y=n.VTiling,l$Y[e].z=n.USpeed*i,l$Y[e].w=n.VSpeed*i}return l$Y};var _0x44204e=(_0x1f3e06=!0,function(e,t){var i=_0x1f3e06?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f3e06=!1,i}),_0x4836bc=_0x44204e(void 0,(function(){return _0x4836bc.toString().search("(((.+)+)+)+$").toString().constructor(_0x4836bc).search("(((.+)+)+)+$")})),_0x1f3e06;_0x4836bc();var _0x3a1ce5="attribute vec4 position;\n\nuniform vec4 uRect;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.0, 1.0);\n}",e$1u={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2},k$P=Object.freeze(e$1u),e$1t={None:0,FixedZ:1,FixedXYZ:2},yr$1=Object.freeze(e$1t),e$1s=function(){this._fillForeColor=new e$1U,this._fillStyle=fr$2.Fill,this._lineColor=new e$1U,this._lineWidth=1,this._bottomAltitude=0,this._pointSize=1,this._pointColor=new e$1U,this._altitudeMode=k$P.NONE,this._emissionColor=new e$1U(1,1,1,1),this._owner=void 0,this._dirty=!1,this._image=void 0,this._imageReady=!0,this._calloutColor=e$1U.RED,this._calloutWidth=1,this._billboardMode=yr$1.SCREEN_ALIGNED};Object.defineProperties(e$1s.prototype,{fillForeColor:{get:function(){return this._fillForeColor},set:function(e){o$1q.typeOf.object("fillForeColor value",e),e$1U.clone(e,this._fillForeColor)}},bottomAltitude:{get:function(){return this._bottomAltitude},set:function(e){o$1q.typeOf.number("bottomAltitude value",e),this._bottomAltitude!==e&&(this._bottomAltitude=e,this._dirty=!0)}},altitudeMode:{get:function(){return this._altitudeMode},set:function(e){o$1q.typeOf.number("altitudeMode value",e),this._altitudeMode=e}},fillStyle:{get:function(){return this._fillStyle},set:function(e){o$1q.typeOf.number("fillStyle value",e),this._fillStyle=e}},lineColor:{get:function(){return this._lineColor},set:function(e){o$1q.typeOf.object("line color",e),e$1U.clone(e,this._lineColor)}},lineWidth:{get:function(){return this._lineWidth},set:function(e){o$1q.typeOf.number("line width",e),this._lineWidth=e}},pointSize:{get:function(){return this._pointSize},set:function(e){o$1q.typeOf.number("point size",e),this._pointSize=e}},pointColor:{get:function(){return this._pointColor},set:function(e){o$1q.typeOf.object("point color",e),e$1U.clone(e,this._pointColor)}},emissionColor:{get:function(){return this._emissionColor},set:function(e){o$1q.typeOf.object("emission color",e),e$1U.clone(e,this._emissionColor)}},image:{get:function(){return this._image},set:function(e){this._imageReady=!1,this._image=e,"string"==typeof e?this._loadImage():this._imageReady=!0}},imageReady:{get:function(){return this._imageReady}},calloutColor:{get:function(){return this._calloutColor},set:function(e){this._calloutColor!==e&&(this._calloutColor=e)}},calloutWidth:{get:function(){return this._calloutWidth},set:function(e){this._calloutWidth!==e&&(this._calloutWidth=e)}},billboardMode:{get:function(){return this._billboardMode},set:function(e){this._billboardMode!==e&&(this._billboardMode=e)}}}),e$1s.prototype._loadImage=function(){var e=this._image;e=t$11.createIfNeeded(e).fetchImage();var t=this;o$1l(e,(function(e){t._image=e,t._imageReady=!0}))};var _0x2b25f5=(_0x172adc=!0,function(e,t){var i=_0x172adc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x172adc=!1,i}),_0x469f28=_0x2b25f5(void 0,(function(){return _0x469f28.toString().search("(((.+)+)+)+$").toString().constructor(_0x469f28).search("(((.+)+)+)+$")})),_0x172adc;_0x469f28();var _0x568483="attribute vec4 position;\n\nuniform vec4 uRect;\n\nvarying float fHeight;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.5, 1.0);\n fHeight = vPos.z;\n}",_0x2c1b15=(_0x3ab118=!0,function(e,t){var i=_0x3ab118?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ab118=!1,i}),_0x5747fd=_0x2c1b15(void 0,(function(){return _0x5747fd.toString().search("(((.+)+)+)+$").toString().constructor(_0x5747fd).search("(((.+)+)+)+$")})),_0x3ab118;_0x5747fd();var _0x3af34f="\n#ifdef Mode_Height\nvarying float fHeight;\n#endif\n#ifdef OVERLAY\n varying vec2 vTexCoord;\n uniform sampler2D uTexture;\n#endif\n\nvoid main()\n{\n gl_FragColor = vec4(1.0);\n#ifdef Mode_Height\n #ifdef UseFloatTexture\n gl_FragColor = vec4(fHeight, 0.0, 0.0, 1.0);\n #else\n gl_FragColor = czm_packValue(fHeight);\n #endif\n#endif\n#ifdef OVERLAY\n gl_FragColor = texture2D(uTexture,vTexCoord);\n#endif\n}";function e$1r(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}Object.defineProperties(e$1r.prototype,{style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}}}),e$1r.prototype.makeDirty=function(){this._styleDirty=!0},e$1r.prototype.applyStyle=function(e,t){if(e.ready&&(!e$2b(this._style)||this._style.ready)){var i=this._styleDirty;t.isRender&&(this._styleDirty=!1),i&&++this._lastStyleTime;for(var n=this._lastStyleTime,r=e._statistics,o=i?e._selectedTiles:e._selectedTilesToStyle,a=o.length,s=0;s<a;++s){var l=o[s];if(l.lastStyleTime!==n){var u=l.content;l.lastStyleTime=n,u.applyStyle(this._style),r.numberOfFeaturesStyled+=u.featuresLength,++r.numberOfTilesStyled}}}};var I$16="#extension GL_EXT_frag_depth : enable\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthGBuffer;\nuniform vec2 u_distanceAndEdlStrength;\nvarying vec2 v_textureCoordinates;\nvec2 neighborContribution(float log2Depth, vec2 offset)\n{\nfloat dist = u_distanceAndEdlStrength.x;\nvec2 texCoordOrig = v_textureCoordinates + offset * dist;\nvec2 texCoord0 = v_textureCoordinates + offset * floor(dist);\nvec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);\nfloat depthOrLogDepth0 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord0));\nfloat depthOrLogDepth1 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord1));\nif (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {\nreturn vec2(0.0);\n}\nfloat depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);\nreturn vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\nvoid main()\n{\nfloat depthOrLogDepth = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, v_textureCoordinates));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat log2Depth = log2(-eyeCoordinate.z);\nif (depthOrLogDepth == 0.0)\n{\ndiscard;\n}\nvec4 color = texture2D(u_pointCloud_colorGBuffer, v_textureCoordinates);\nvec2 texelSize = 1.0 / czm_viewport.zw;\nvec2 responseAndCount = vec2(0.0);\nresponseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));\nresponseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));\nresponseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));\nresponseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));\nfloat response = responseAndCount.x / responseAndCount.y;\nfloat strength = u_distanceAndEdlStrength.y;\nfloat shade = exp(-response * 300.0 * strength);\ncolor.rgb *= shade;\ngl_FragColor = vec4(color);\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + (czm_projection * vec4(eyeCoordinate.xyz, 1.0)).w);\n#else\ngl_FragDepthEXT = czm_eyeToWindowCoordinates(vec4(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n";function m$U(){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthGBuffer=void 0,this._depthTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}function s$K(){return new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}function T$T(e){var t=e._framebuffer;!e$2b(t)||(e._colorGBuffer.destroy(),e._depthGBuffer.destroy(),e._depthTexture.destroy(),t.destroy(),e._framebuffer=void 0,e._colorGBuffer=void 0,e._depthGBuffer=void 0,e._depthTexture=void 0,e._drawCommand=void 0,e._clearCommand=void 0)}function R$S(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:s$K()}),o=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:s$K()}),a=new t$V({context:t,width:i,height:n,pixelFormat:V$10.DEPTH_COMPONENT,pixelDatatype:_$$.UNSIGNED_INT,sampler:s$K()});e._framebuffer=new t$W({context:t,colorTextures:[r,o],depthTexture:a,destroyAttachments:!1}),e._colorGBuffer=r,e._depthGBuffer=o,e._depthTexture=a}var c$X=new o$1o;function U$Y(e,t){var i=I$16,n={u_pointCloud_colorGBuffer:function(){return e._colorGBuffer},u_pointCloud_depthGBuffer:function(){return e._depthGBuffer},u_distanceAndEdlStrength:function(){return c$X.x=e._radius,c$X.y=e._strength,c$X}},r=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:u$N.setCesium3DTileBit(),stencilMask:u$N.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:Le$s.CESIUM_3D_TILE,owner:e}),e._clearCommand=new t$X({framebuffer:e._framebuffer,color:new e$1U(0,0,0,0),depth:1,renderState:d$1m.fromCache(),pass:Le$s.CESIUM_3D_TILE,owner:e})}function z$R(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=e._colorGBuffer,o=!1,a=e$2b(r)&&(r.width!==i||r.height!==n);return(!e$2b(r)||a)&&(T$T(e),R$S(e,t),U$Y(e,t),o=!0),o}function E$Y(e){return e.drawBuffers&&e.fragmentDepth}function H$X(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"EC");if(!e$2b(i)){var n=t._attributeLocations,r=t.fragmentShaderSource.clone();r.sources=r.sources.map((function(e){return e=(e=s$U.replaceMain(e,"czm_point_cloud_post_process_main")).replace(/gl_FragColor/g,"gl_FragData[0]")})),r.sources.unshift("#extension GL_EXT_draw_buffers : enable \n"),r.sources.push("void main() \n{ \n czm_point_cloud_post_process_main(); \n#ifdef LOG_DEPTH\n czm_writeLogDepth();\n gl_FragData[1] = czm_packDepth(gl_FragDepthEXT); \n#else\n gl_FragData[1] = czm_packDepth(gl_FragCoord.z);\n#endif\n}"),i=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function o$Z(e){var t=u$_(e,{});this.attenuation=u$_(t.attenuation,!1),this.geometricErrorScale=u$_(t.geometricErrorScale,1),this.maximumAttenuation=t.maximumAttenuation,this.baseResolution=t.baseResolution,this.eyeDomeLighting=u$_(t.eyeDomeLighting,!0),this.eyeDomeLightingStrength=u$_(t.eyeDomeLightingStrength,1),this.eyeDomeLightingRadius=u$_(t.eyeDomeLightingRadius,1),this.backFaceCulling=u$_(t.backFaceCulling,!1),this.normalShading=u$_(t.normalShading,!0)}m$U.isSupported=E$Y,m$U.prototype.update=function(e,t,i){if(E$Y(e.context)){this._strength=i.eyeDomeLightingStrength,this._radius=i.eyeDomeLightingRadius*e.pixelRatio;var n,r=z$R(this,e.context),o=e.commandList,a=o.length;for(n=t;n<a;++n){var s=o[n];if(s.primitiveType===W$18.POINTS&&s.pass!==Le$s.TRANSLUCENT){var l=s.derivedCommands.pointCloudProcessor;(!e$2b(l)||s.dirty||r||l.framebuffer!==this._framebuffer)&&(l=i$_.shallowClone(s),s.derivedCommands.pointCloudProcessor=l,l.framebuffer=this._framebuffer,l.shaderProgram=H$X(e.context,s.shaderProgram),l.castShadows=!1,l.receiveShadows=!1),o[n]=l}}var u=this._clearCommand,c=this._drawCommand;o.push(c),o.push(u)}},m$U.prototype.isDestroyed=function(){return!1},m$U.prototype.destroy=function(){return T$T(this),i$10(this)},o$Z.isSupported=function(e){return m$U.isSupported(e.context)};var e$1q={Triangle:0,Quad:1,Sketch:2,EffectOutline:3},_0x15916e=Object.freeze(e$1q),_0x57843d=(_0x31557d=!0,function(e,t){var i=_0x31557d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31557d=!1,i}),_0x134974=_0x57843d(void 0,(function(){return _0x134974.toString().search("(((.+)+)+)+$").toString().constructor(_0x134974).search("(((.+)+)+)+$")})),_0x31557d;_0x134974();var _0x57e95f={OSGBFile:0,OSGBCacheFile:1,ClampGroundPolygon:2,ClampObjectPolygon:3,ClampGroundLine:4,ClampObjectLine:5,IconPoint:6,Text:7,PointCloudFile:8,ExtendRegion3D:9,ExtendClampPolygonCache:10,PolylineEffect:11,RegionEffect:12,ClampGroundAndObjectLineCache:13,ClampGroundRealtimeRasterCache:14},d$15=Object.freeze(_0x57e95f),e$1p={ISERVER_TOKEN:"token",IPORTAL_KEY:"key"},E$X=Object.freeze(e$1p);function n$U(e,t,i){if(!e$2b(e))throw new t$16("first is required");if(!e$2b(t))throw new t$16("second is required");if(i=u$_(i,!0),e instanceof h$16||(e=new h$16(e)),t instanceof h$16||(t=new h$16(t)),"data"===e.scheme)return e.toString();if("data"===t.scheme)return t.toString();e$2b(t.authority)&&!e$2b(t.scheme)&&(typeof document<"u"&&e$2b(document.location)&&e$2b(document.location.href)?t.scheme=new h$16(document.location.href).scheme:t.scheme=e.scheme);var n=e;t.isAbsolute()&&(n=t);var r="";e$2b(n.scheme)&&(r+=n.scheme+":"),e$2b(n.authority)&&(r+="//"+n.authority,""!==n.path&&"/"!==n.path&&(r=r.replace(/\/?$/,"/"),n.path=n.path.replace(/^\/?/g,""),""===n.authority&&(r+="/"))),r+=n===e?i?e.path.replace(/\/?$/,"/")+t.path.replace(/^\/?/g,""):e.path+t.path:t.path;var o=e$2b(e.query),a=e$2b(t.query);o&&a?r+="?"+e.query+"&"+t.query:o&&!a?r+="?"+e.query:!o&&a&&(r+="?"+t.query);var s=e$2b(t.fragment);return e$2b(e.fragment)&&!s?r+="#"+e.fragment:s&&(r+="#"+t.fragment),r}function a$O(e,t){this._keymap={},this.addCredential(e,t)}Object.defineProperties(a$O.prototype,{value:{get:function(){return this._value},set:function(e){this._value=e}},name:{get:function(){return this._name},set:function(e){this._name=e}}}),a$O.addToken=function(e){var t,i=e.substring(0,e.indexOf("/realspace")+10);if(e$2b(a$O.CREDENTIAL._keymap[i]))switch(a$O.CREDENTIAL._keymap[i].type){case E$X.ISERVER_TOKEN:t="?"+m$1b({token:a$O.CREDENTIAL._keymap[i].value});break;case E$X.IPORTAL_KEY:t="?"+m$1b({key:a$O.CREDENTIAL._keymap[i].value});break;default:t=""}else switch(a$O.CREDENTIAL.name){case E$X.ISERVER_TOKEN:t="?"+m$1b({token:a$O.CREDENTIAL.value});break;case E$X.IPORTAL_KEY:t="?"+m$1b({key:a$O.CREDENTIAL.value});break;default:t="?"+a$O.CREDENTIAL.name+"="+a$O.CREDENTIAL.value}return n$U(e,t,!1)},a$O.addTokenWithKey=function(e,t){var i;if(e$2b(a$O.CREDENTIAL._keymap[e])){if(a$O.CREDENTIAL._keymap[e].type instanceof Array){var n,r=a$O.CREDENTIAL._keymap[e].type,o=a$O.CREDENTIAL._keymap[e].value;(s={})[r[0]]=o[0],n=n$U(t,"?"+m$1b(s),!1);for(var a=1;a<r.length;a++){(s={})[r[a]]=o[a],n=n+"&"+m$1b(s)}return n}switch(a$O.CREDENTIAL._keymap[e].type){case E$X.ISERVER_TOKEN:i="?"+m$1b({token:a$O.CREDENTIAL._keymap[e].value});break;case E$X.IPORTAL_KEY:i="?"+m$1b({key:a$O.CREDENTIAL._keymap[e].value});break;default:var s;(s={})[a$O.CREDENTIAL._keymap[e].type]=a$O.CREDENTIAL._keymap[e].value,i="?"+m$1b(s)}}else switch(a$O.CREDENTIAL.name){case E$X.ISERVER_TOKEN:i="?"+m$1b({token:a$O.CREDENTIAL.value});break;case E$X.IPORTAL_KEY:i="?"+m$1b({key:a$O.CREDENTIAL.value});break;default:i="?"+a$O.CREDENTIAL.name+"="+a$O.CREDENTIAL.value}return n$U(t,i,!1)},a$O.prototype.addCredential=function(e,t){if(e instanceof Array){for(var i=0,n=e.length;i<n;i++)if(this._keymap[e[i].rooturl]={type:e[i].type||E$X.ISERVER_TOKEN,value:e[i].value},-1!==e[i].rooturl.indexOf("/realspace")){var r=e[i].rooturl.substring(0,e[i].rooturl.lastIndexOf("/realspace")+10);this._keymap[r]={type:e[i].type||E$X.ISERVER_TOKEN,value:e[i].value}}}else{if(this._value=u$_(e,""),null==e)throw new t$16("Credential.value is necessory.");this._name=u$_(t,E$X.ISERVER_TOKEN),this._keymap.default={type:this._name,value:this._value}}},a$O.CREDENTIAL=null;var _0x3a6b2a=(_0x3168e6=!0,function(e,t){var i=_0x3168e6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3168e6=!1,i}),_0x538df1=_0x3a6b2a(void 0,(function(){return _0x538df1.toString().search("(((.+)+)+)+$").toString().constructor(_0x538df1).search("(((.+)+)+)+$")})),_0x3168e6;_0x538df1();var _0x9d4a1e={UNLOAD:0,LOADING:1,LOADED:2,VOLLOADED:3,PARSING:4,PARSED:5,TRANSFORMING:6,TRANSFORMED:7,LOST:8,LOADVOL:9,FAILED:10,VOLFAILED:11},N$P=Object.freeze(_0x9d4a1e),E$W={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7,RENDERING:8,RENDERED:9},wt$6=Object.freeze(E$W);function o$Y(e,t,i,n){this.near=u$_(e,0),this.nearValue=u$_(t,0),this.far=u$_(i,1),this.farValue=u$_(n,0)}o$Y.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new o$Y(e.near,e.nearValue,e.far,e.farValue)},o$Y.packedLength=4,o$Y.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),t[i++]=e.near,t[i++]=e.nearValue,t[i++]=e.far,t[i]=e.farValue,t},o$Y.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");return t=u$_(t,0),e$2b(i)||(i=new o$Y),i.near=e[t++],i.nearValue=e[t++],i.far=e[t++],i.farValue=e[t],i},o$Y.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue},o$Y.prototype.clone=function(e){return o$Y.clone(this,e)},o$Y.prototype.equals=function(e){return o$Y.equals(this,e)};var X$Q="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n#ifdef EXTRUDED_GEOMETRY\nattribute vec3 extrudeDirection;\nuniform float u_globeMinimumAltitude;\n#endif // EXTRUDED_GEOMETRY\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif // PER_INSTANCE_COLOR\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n#if defined(TEXTURE_COORDINATES) && !defined(SPHERICAL) && defined(UINT8_PACKING)\nvec4 clampAndMagnitude(vec4 sd)\n{\nvec4 d = sd;\nd.x = czm_branchFreeTernary(sd.x < 128.0, d.x, (255.0 - sd.x));\nd.x = floor(0.5 + d.x);\nd.y = floor(0.5 + d.y);\nd.z = floor(0.5 + d.z);\nd.w = floor(0.5 + d.w);\nreturn d;\n}\nfloat unpackLowLessThan100k(vec4 sd)\n{\nvec4 d = clampAndMagnitude(sd);\nreturn (1000.0 * d.x + 10.0 * d.y + 0.1 * d.z + 0.001 * d.w) * czm_branchFreeTernary(sd.x < 128.0, 1.0, -1.0);\n}\nvec3 southwest_LOW(vec4 x, vec4 y, vec4 z)\n{\nvec3 value;\nvalue.x = unpackLowLessThan100k(x);\nvalue.y = unpackLowLessThan100k(y);\nvalue.z = unpackLowLessThan100k(z);\nreturn value;\n}\nfloat unpackHighMagLessThan100Million(vec4 sd)\n{\nvec4 d = clampAndMagnitude(sd);\nreturn (1000000.0 * d.x + 10000.0 * d.y + 100.0 * d.z + d.w) * czm_branchFreeTernary(sd.x < 128.0, 1.0, -1.0);\n}\nvec3 southwest_HIGH(vec4 x, vec4 y, vec4 z)\n{\nvec3 value;\nvalue.x = unpackHighMagLessThan100Million(x);\nvalue.y = unpackHighMagLessThan100Million(y);\nvalue.z = unpackHighMagLessThan100Million(z);\nreturn value;\n}\n#ifdef COLUMBUS_VIEW_2D\nvec4 unpackPlanes2D_HIGH(vec4 x, vec4 y, vec4 z, vec4 w)\n{\nvec4 value;\nvalue.x = unpackHighMagLessThan100Million(x);\nvalue.y = unpackHighMagLessThan100Million(y);\nvalue.z = unpackHighMagLessThan100Million(z);\nvalue.w = unpackHighMagLessThan100Million(w);\nreturn value;\n}\nvec4 unpackPlanes2D_LOW(vec4 x, vec4 y, vec4 z, vec4 w)\n{\nvec4 value;\nvalue.x = unpackLowLessThan100k(x);\nvalue.y = unpackLowLessThan100k(y);\nvalue.z = unpackLowLessThan100k(z);\nvalue.w = unpackLowLessThan100k(w);\nreturn value;\n}\n#else\nfloat unpackLowLessThan1000k(vec4 sd)\n{\nvec4 d = clampAndMagnitude(sd);\nreturn (10000.0 * d.x + 100.0 * d.y + d.z + 0.01 * d.w) * czm_branchFreeTernary(sd.x < 128.0, 1.0, -1.0);\n}\nvec3 unpackExtent(vec4 x, vec4 y, vec4 z)\n{\nvec3 value;\nvalue.x = unpackLowLessThan1000k(x);\nvalue.y = unpackLowLessThan1000k(y);\nvalue.z = unpackLowLessThan1000k(z);\nreturn value;\n}\n#endif\n#endif\nvoid main()\n{\nvec4 position = czm_computePosition();\n#ifdef EXTRUDED_GEOMETRY\nfloat delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));\ndelta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;\nposition = position + vec4(extrudeDirection * delta, 0.0);\n#endif\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nv_sphericalExtents = czm_batchTable_sphericalExtents(batchId);\nv_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);\n#else // SPHERICAL\n#ifdef COLUMBUS_VIEW_2D\n#ifdef UINT8_PACKING\nvec4 planes2D_high = unpackPlanes2D_HIGH(czm_batchTable_planes2D_HIGH_x(batchId),\nczm_batchTable_planes2D_HIGH_y(batchId),\nczm_batchTable_planes2D_HIGH_z(batchId),\nczm_batchTable_planes2D_HIGH_w(batchId));\nvec4 planes2D_low = unpackPlanes2D_LOW(czm_batchTable_planes2D_LOW_x(batchId),\nczm_batchTable_planes2D_LOW_y(batchId),\nczm_batchTable_planes2D_LOW_z(batchId),\nczm_batchTable_planes2D_LOW_w(batchId));\n#else // UINT8_PACKING\nvec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);\nvec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);\n#endif // UINT8_PACKING\nvec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));\nbool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;\nplanes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);\nplanes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);\nidlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;\nidlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));\nplanes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);\nplanes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;\nvec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;\nvec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;\n#else // COLUMBUS_VIEW_2D\n#ifdef UINT8_PACKING\nvec3 low = southwest_LOW(czm_batchTable_southWest_LOW_x(batchId), czm_batchTable_southWest_LOW_y(batchId), czm_batchTable_southWest_LOW_z(batchId));\nvec3 high = southwest_HIGH(czm_batchTable_southWest_HIGH_x(batchId), czm_batchTable_southWest_HIGH_y(batchId), czm_batchTable_southWest_HIGH_z(batchId));\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(high, low)).xyz;\nvec3 northWestCorner = czm_normal * unpackExtent(\nczm_batchTable_northward_x(batchId),\nczm_batchTable_northward_y(batchId),\nczm_batchTable_northward_z(batchId)) + southWestCorner;\nvec3 southEastCorner = czm_normal * unpackExtent(\nczm_batchTable_eastward_x(batchId),\nczm_batchTable_eastward_y(batchId),\nczm_batchTable_eastward_z(batchId)) + southWestCorner;\n#else // UINT8_PACKING\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;\nvec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;\nvec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;\n#endif // UINT8_PACKING\n#endif // COLUMBUS_VIEW_2D\nvec3 eastWard = southEastCorner - southWestCorner;\nfloat eastExtent = length(eastWard);\neastWard /= eastExtent;\nvec3 northWard = northWestCorner - southWestCorner;\nfloat northExtent = length(northWard);\nnorthWard /= northExtent;\nv_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\nv_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\nv_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n#endif // SPHERICAL\nvec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);\nvec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);\nv_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);\nv_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);\nv_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;\n#endif // TEXTURE_COORDINATES\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#endif\ngl_Position = czm_depthClampFarPlane(czm_modelViewProjectionRelativeToEye * position);\n}\n",Q$Q="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvoid main(void)\n{\n#ifdef VECTOR_TILE\ngl_FragColor = czm_gammaCorrect(u_highlightColor);\n#else\ngl_FragColor = vec4(1.0);\n#endif\nczm_writeDepthClampedToFarPlane();\n}\n",V$M="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n#ifdef NORMAL_EC\nvec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth)\n{\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);\nreturn eyeCoordinate.xyz / eyeCoordinate.w;\n}\nvec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset)\n{\nvec2 glFragCoordXY = gl_FragCoord.xy;\nfloat upOrRightLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));\nfloat downOrLeftLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));\nbvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);\nfloat useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);\nfloat useDownOrLeft = float(useUpOrRight == 0.0);\nvec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);\nvec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);\nreturn (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;\n}\n#endif // NORMAL_EC\nvoid main(void)\n{\n#ifdef REQUIRES_EC\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_globeDepthTextureDim.xy));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n#endif\n#ifdef REQUIRES_WC\nvec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\nvec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n#endif\n#ifdef TEXTURE_COORDINATES\nvec2 uv;\n#ifdef SPHERICAL\nworldCoordinate += czm_relativeOrigin;\nvec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);\nsphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;\nsphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);\nuv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;\nuv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;\n#else // SPHERICAL\nuv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\nuv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n#endif // SPHERICAL\n#endif // TEXTURE_COORDINATES\n#ifdef PICK\n#ifdef CULL_FRAGMENTS\nif (0.0 <= uv.x && uv.x <= 1.0 && 0.0 <= uv.y && uv.y <= 1.0)\n{\ngl_FragColor.a = 1.0;\nczm_writeDepthClampedToFarPlane();\n}\n#else // CULL_FRAGMENTS\ngl_FragColor.a = 1.0;\n#endif // CULL_FRAGMENTS\n#else // PICK\n#ifdef CULL_FRAGMENTS\nif (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y)\n{\ndiscard;\n}\n#endif\n#ifdef NORMAL_EC\nvec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));\nvec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));\nvec3 normalEC = normalize(cross(leftRight, downUp));\n#endif\n#ifdef PER_INSTANCE_COLOR\nvec4 color = czm_gammaCorrect(v_color);\n#ifdef FLAT\ngl_FragColor = color;\n#else // FLAT\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = -eyeCoordinate.xyz;\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\ngl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n#else // PER_INSTANCE_COLOR\nczm_materialInput materialInput;\n#ifdef USES_NORMAL_EC\nmaterialInput.normalEC = normalEC;\n#endif\n#ifdef USES_POSITION_TO_EYE_EC\nmaterialInput.positionToEyeEC = -eyeCoordinate.xyz;\n#endif\n#ifdef USES_TANGENT_TO_EYE\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);\n#endif\n#ifdef USES_ST\nmaterialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;\nmaterialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;\n#endif\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else // FLAT\ngl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n#endif // PER_INSTANCE_COLOR\nczm_writeDepthClampedToFarPlane();\n#endif // PICK\n}\n";function y$R(e,t,i,n){o$1q.typeOf.bool("extentsCulling",e),o$1q.typeOf.bool("planarExtents",t),o$1q.typeOf.object("appearance",i),o$1q.typeOf.bool("useFloatBatchTable",n),this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""},this._useFloatBatchTable=n;var r=new Y$I;r.requiresTextureCoordinates=e,r.requiresEC=!i.flat;var o=new Y$I;if(o.requiresTextureCoordinates=e,i instanceof t$R)r.requiresNormalEC=!i.flat;else{var a=i.material.shaderSource+"\n"+i.fragmentShaderSource;r.normalEC=-1!==a.indexOf("materialInput.normalEC")||-1!==a.indexOf("czm_getDefaultMaterial"),r.positionToEyeEC=-1!==a.indexOf("materialInput.positionToEyeEC"),r.tangentToEyeMatrix=-1!==a.indexOf("materialInput.tangentToEyeMatrix"),r.st=-1!==a.indexOf("materialInput.st")}this._colorShaderDependencies=r,this._pickShaderDependencies=o,this._appearance=i,this._extentsCulling=e,this._planarExtents=t}y$R.prototype.createFragmentShader=function(e){o$1q.typeOf.bool("columbusView2D",e);var t=this._appearance,i=this._colorShaderDependencies,n=[];!e&&!this._planarExtents&&n.push("SPHERICAL"),i.requiresEC&&n.push("REQUIRES_EC"),i.requiresWC&&n.push("REQUIRES_WC"),i.requiresTextureCoordinates&&n.push("TEXTURE_COORDINATES"),this._extentsCulling&&n.push("CULL_FRAGMENTS"),i.requiresNormalEC&&n.push("NORMAL_EC"),t instanceof t$R&&n.push("PER_INSTANCE_COLOR"),i.normalEC&&n.push("USES_NORMAL_EC"),i.positionToEyeEC&&n.push("USES_POSITION_TO_EYE_EC"),i.tangentToEyeMatrix&&n.push("USES_TANGENT_TO_EYE"),i.st&&n.push("USES_ST"),t.flat&&n.push("FLAT");var r="";return t instanceof t$R||(r=t.material.shaderSource),new s$U({name:"ShadowVolumeAppearanceFS",defines:n,sources:[r,V$M]})},y$R.prototype.createPickFragmentShader=function(e){o$1q.typeOf.bool("columbusView2D",e);var t=this._pickShaderDependencies,i=["PICK"];return!e&&!this._planarExtents&&i.push("SPHERICAL"),t.requiresEC&&i.push("REQUIRES_EC"),t.requiresWC&&i.push("REQUIRES_WC"),t.requiresTextureCoordinates&&i.push("TEXTURE_COORDINATES"),this._extentsCulling&&i.push("CULL_FRAGMENTS"),new s$U({defines:i,sources:[V$M],pickColorQualifier:"varying"})},y$R.prototype.createVertexShader=function(e,t,i,n){return o$1q.defined("defines",e),o$1q.typeOf.string("vertexShaderSource",t),o$1q.typeOf.bool("columbusView2D",i),o$1q.defined("mapProjection",n),K$N(this._colorShaderDependencies,this._planarExtents,i,e,t,this._appearance,n,this._useFloatBatchTable,this._projectionExtentDefines)},y$R.prototype.createPickVertexShader=function(e,t,i,n){return o$1q.defined("defines",e),o$1q.typeOf.string("vertexShaderSource",t),o$1q.typeOf.bool("columbusView2D",i),o$1q.defined("mapProjection",n),K$N(this._pickShaderDependencies,this._planarExtents,i,e,t,void 0,n,this._useFloatBatchTable,this._projectionExtentDefines)};var B$R=new o$1p,j$W=new a$18,Q$P={high:0,low:0};function K$N(e,t,i,n,r,o,a,s,l){var u=n.slice();if(""===l.eastMostYhighDefine){var c=j$W;c.longitude=e$2a.PI,c.latitude=0,c.height=0;var h=a.project(c,B$R),d=i$11.encode(h.x,Q$P);l.eastMostYhighDefine="EAST_MOST_X_HIGH "+d.high.toFixed((d.high+"").length+1),l.eastMostYlowDefine="EAST_MOST_X_LOW "+d.low.toFixed((d.low+"").length+1);var f=j$W;f.longitude=-e$2a.PI,f.latitude=0,f.height=0;var p=a.project(f,B$R);d=i$11.encode(p.x,Q$P),l.westMostYhighDefine="WEST_MOST_X_HIGH "+d.high.toFixed((d.high+"").length+1),l.westMostYlowDefine="WEST_MOST_X_LOW "+d.low.toFixed((d.low+"").length+1)}return i&&(u.push(l.eastMostYhighDefine),u.push(l.eastMostYlowDefine),u.push(l.westMostYhighDefine),u.push(l.westMostYlowDefine)),e$2b(o)&&o instanceof t$R&&u.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(u.push("TEXTURE_COORDINATES"),t||i||u.push("SPHERICAL"),i&&u.push("COLUMBUS_VIEW_2D")),s||u.push("UINT8_PACKING"),new s$U({name:"shadowVolume_Vp",defines:u,sources:[r]})}function Y$I(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}function J$P(e,t,i){return Math.abs((t.y-e.y)*i.x-(t.x-e.x)*i.y+t.x*e.y-t.y*e.x)/o$1o.distance(t,e)}Object.defineProperties(Y$I.prototype,{requiresEC:{get:function(){return this._requiresEC},set:function(e){this._requiresEC=e||this._requiresEC}},requiresWC:{get:function(){return this._requiresWC},set:function(e){this._requiresWC=e||this._requiresWC,this.requiresEC=this._requiresWC}},requiresNormalEC:{get:function(){return this._requiresNormalEC},set:function(e){this._requiresNormalEC=e||this._requiresNormalEC,this.requiresEC=this._requiresNormalEC}},requiresTextureCoordinates:{get:function(){return this._requiresTextureCoordinates},set:function(e){this._requiresTextureCoordinates=e||this._requiresTextureCoordinates,this.requiresWC=this._requiresTextureCoordinates}},normalEC:{set:function(e){this.requiresNormalEC=e,this._usesNormalEC=e},get:function(){return this._usesNormalEC}},tangentToEyeMatrix:{set:function(e){this.requiresWC=e,this.requiresNormalEC=e,this._usesTangentToEyeMat=e},get:function(){return this._usesTangentToEyeMat}},positionToEyeEC:{set:function(e){this.requiresEC=e,this._usesPositionToEyeEC=e},get:function(){return this._usesPositionToEyeEC}},st:{set:function(e){this.requiresTextureCoordinates=e,this._usesSt=e},get:function(){return this._usesSt}}});var se$x=[new o$1o,new o$1o,new o$1o,new o$1o];function Z$R(e,t){var i=se$x,n=o$1o.unpack(t,0,i[0]),r=o$1o.unpack(t,2,i[1]),o=o$1o.unpack(t,4,i[2]);e.uMaxVmax=new o$13({componentDatatype:S$12.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r.x,r.y,o.x,o.y]});var a=1/J$P(n,r,o),s=1/J$P(n,o,r);e.uvMinAndExtents=new o$13({componentDatatype:S$12.FLOAT,componentsPerAttribute:4,normalize:!1,value:[n.x,n.y,a,s]})}function g$Z(e,t,i){var n=Math.abs(e),r=Math.floor(n/1e3);n-=1e3*r;var o=Math.floor(n/10);n-=10*o;var a=Math.floor(10*n);n-=.1*a;var s=Math.floor(1e3*n);e<0&&(r=255-r),i[t]=new o$13({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!1,value:[r,o,a,s]})}function L$_(e,t,i){var n=Math.abs(e),r=Math.floor(n/1e6);n-=1e6*r;var o=Math.floor(n/1e4);n-=1e4*o;var a=Math.floor(n/100);n-=100*a;var s=Math.floor(n);e<0&&(r=255-r),i[t]=new o$13({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!1,value:[r,o,a,s]})}function N$O(e,t,i){var n=Math.abs(e),r=Math.floor(n/1e4);n-=1e4*r;var o=Math.floor(n/100);n-=100*o;var a=Math.floor(n);n-=a;var s=Math.floor(n/.001);e<0&&(r=255-r),i[t]=new o$13({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!1,value:[r,o,a,s]})}var $$T=new a$18,b$16=new o$1p,ie$C=new o$1p,he$s=new o$1p,O$H={high:0,low:0};function U$X(e,t,i,n){var r=$$T;r.height=0,r.longitude=e.west,r.latitude=e.south;var o=t.project(r,b$16);r.latitude=e.north;var a=t.project(r,ie$C);r.longitude=e.east,r.latitude=e.south;var s,l=t.project(r,he$s);if(!n)return L$_((s=i$11.encode(o.x,O$H)).high,"planes2D_HIGH_x",i),g$Z(s.low,"planes2D_LOW_x",i),L$_((s=i$11.encode(o.y,O$H)).high,"planes2D_HIGH_y",i),g$Z(s.low,"planes2D_LOW_y",i),L$_((s=i$11.encode(a.y,O$H)).high,"planes2D_HIGH_z",i),g$Z(s.low,"planes2D_LOW_z",i),L$_((s=i$11.encode(l.x,O$H)).high,"planes2D_HIGH_w",i),void g$Z(s.low,"planes2D_LOW_w",i);var u=[0,0,0,0],c=[0,0,0,0];s=i$11.encode(o.x,O$H),u[0]=s.high,c[0]=s.low,s=i$11.encode(o.y,O$H),u[1]=s.high,c[1]=s.low,s=i$11.encode(a.y,O$H),u[2]=s.high,c[2]=s.low,s=i$11.encode(l.x,O$H),u[3]=s.high,c[3]=s.low,i.planes2D_HIGH=new o$13({componentDatatype:S$12.FLOAT,componentsPerAttribute:4,normalize:!1,value:u}),i.planes2D_LOW=new o$13({componentDatatype:S$12.FLOAT,componentsPerAttribute:4,normalize:!1,value:c})}var ue$A=new p$1d,le$w=new p$1d,ee$u=new o$1p,_e$r=new a$18,pe$v=[new a$18,new a$18,new a$18,new a$18,new a$18,new a$18,new a$18,new a$18];function fe$r(e,t,i,n,r,o){var a=h$18.center(e,_e$r);a.height=i;var s=a$18.toCartesian(a,t,ee$u),l=m$17.eastNorthUpToFixedFrame(s,t,ue$A),u=p$1d.inverse(l,le$w),c=e.west,h=e.east,d=e.north,f=e.south,p=pe$v;p[0].latitude=f,p[0].longitude=c,p[1].latitude=d,p[1].longitude=c,p[2].latitude=d,p[2].longitude=h,p[3].latitude=f,p[3].longitude=h;var _=.5*(c+h),m=.5*(d+f);p[4].latitude=f,p[4].longitude=_,p[5].latitude=d,p[5].longitude=_,p[6].latitude=m,p[6].longitude=c,p[7].latitude=m,p[7].longitude=h;for(var g=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY,v=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,$=0;$<8;$++){p[$].height=i;var b=a$18.toCartesian(p[$],t,ee$u);p$1d.multiplyByPoint(u,b,b),b.z=0,g=Math.min(g,b.x),x=Math.max(x,b.x),v=Math.min(v,b.y),y=Math.max(y,b.y)}var T=n;T.x=g,T.y=v,T.z=0,p$1d.multiplyByPoint(l,T,T);var C=r;C.x=x,C.y=v,C.z=0,p$1d.multiplyByPoint(l,C,C),o$1p.subtract(C,T,r);var S=o;S.x=g,S.y=y,S.z=0,p$1d.multiplyByPoint(l,S,S),o$1p.subtract(S,T,o)}var ce$s=new o$1p,de$t=new o$1p,Ee$m=new i$11;y$R.getPlanarTextureCoordinateAttributes=function(e,t,i,n,r,o){o$1q.typeOf.object("boundingRectangle",e),o$1q.defined("textureCoordinateRotationPoints",t),o$1q.typeOf.object("ellipsoid",i),o$1q.typeOf.object("projection",n),o$1q.typeOf.bool("useFloatBatchTable",r);var a=b$16,s=ce$s,l=de$t;fe$r(e,i,u$_(o,0),a,s,l);var u={};Z$R(u,t);var c=i$11.fromCartesian(a,Ee$m);if(!r){var h=c.high;L$_(h.x,"southWest_HIGH_x",u),L$_(h.y,"southWest_HIGH_y",u),L$_(h.z,"southWest_HIGH_z",u);var d=c.low;return g$Z(d.x,"southWest_LOW_x",u),g$Z(d.y,"southWest_LOW_y",u),g$Z(d.z,"southWest_LOW_z",u),N$O(s.x,"eastward_x",u),N$O(s.y,"eastward_y",u),N$O(s.z,"eastward_z",u),N$O(l.x,"northward_x",u),N$O(l.y,"northward_y",u),N$O(l.z,"northward_z",u),U$X(e,n,u,!1),u}return u.southWest_HIGH=new o$13({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,normalize:!1,value:o$1p.pack(c.high,[0,0,0])}),u.southWest_LOW=new o$13({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,normalize:!1,value:o$1p.pack(c.low,[0,0,0])}),u.eastward=new o$13({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,normalize:!1,value:o$1p.pack(s,[0,0,0])}),u.northward=new o$13({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,normalize:!1,value:o$1p.pack(l,[0,0,0])}),U$X(e,n,u,!0),u};var me$t=new o$1p;function te$z(e,t,i,n){var r=$$T;r.latitude=e,r.longitude=t,r.height=0;var o=a$18.toCartesian(r,i,me$t),a=Math.sqrt(o.x*o.x+o.y*o.y),s=e$2a.fastApproximateAtan2(a,o.z),l=e$2a.fastApproximateAtan2(o.x,o.y);return n.x=s,n.y=l,n}var re$C=new o$1o;function ve$o(e){return Math.max(e.width,e.height)>y$R.MAX_WIDTH_FOR_PLANAR_EXTENTS}function x$$(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).geometryInstances;if(this.geometryInstances=t,this.show=u$_(e.show,!0),this.classificationType=u$_(e.classificationType,_0x3b5200.BOTH),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=u$_(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=u$_(e._extruded,!1),this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._readyPromise=o$1l.defer(),this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:u$_(e.vertexCacheOptimize,!1),interleave:u$_(e.interleave,!1),releaseGeometryInstances:u$_(e.releaseGeometryInstances,!0),allowPicking:u$_(e.allowPicking,!0),asynchronous:u$_(e.asynchronous,!0),compressVertices:u$_(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0},e.geometryInstances&&e.geometryInstances.length){var i=e.geometryInstances[0].id;e$2b(i)&&i._clampToS3M&&(this.classificationType=_0x3b5200.S3M_TILE)}}function M$W(e,t){var i=t?m$X.EQUAL:m$X.ALWAYS,n=u$N.CESIUM_3D_TILE_MASK;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:i,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.DECREMENT_WRAP,zPass:n$Y.KEEP},backFunction:i,backOperation:{fail:n$Y.KEEP,zFail:n$Y.INCREMENT_WRAP,zPass:n$Y.KEEP},reference:n,mask:n},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:re$E.LESS_OR_EQUAL},depthMask:!1}}function te$y(){return{cull:{enabled:!1},depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:{enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.DECREMENT_WRAP,zPass:n$Y.KEEP},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.DECREMENT_WRAP,zPass:n$Y.KEEP},reference:0,mask:1},stencilMask:1}}function U$W(e,t){var i=t?m$X.EQUAL:m$X.NOT_EQUAL,n=t?u$N.S3M_TILE+1:0;return{stencilTest:{enabled:e,frontFunction:i,frontOperation:{fail:n$Y.ZERO,zFail:n$Y.ZERO,zPass:n$Y.ZERO},backFunction:i,backOperation:{fail:n$Y.ZERO,zFail:n$Y.ZERO,zPass:n$Y.ZERO},reference:n,mask:u$N.CLASSIFICATION_MASK},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Ee$r.ALPHA_BLEND}}function ae$u(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$X.EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},backFunction:m$X.EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:3,mask:3},blending:Ee$r.ALPHA_BLEND}}y$R.getSphericalExtentGeometryInstanceAttributes=function(e,t,i,n,r){o$1q.typeOf.object("boundingRectangle",e),o$1q.defined("textureCoordinateRotationPoints",t),o$1q.typeOf.object("ellipsoid",i),o$1q.typeOf.object("projection",n),o$1q.typeOf.bool("useFloatBatchTable",r);var o=te$z(e.south,e.west,i,re$C),a=o.x,s=o.y,l=te$z(e.north,e.east,i,re$C),u=l.x,c=l.y,h=0;s>c&&(h=e$2a.PI-s,s=-e$2a.PI,c+=h),a-=e$2a.EPSILON5,s-=e$2a.EPSILON5,u+=e$2a.EPSILON5;var d=1/((c+=e$2a.EPSILON5)-s),f=1/(u-a),p={sphericalExtents:new o$13({componentDatatype:S$12.FLOAT,componentsPerAttribute:4,normalize:!1,value:[a,s,f,d]}),longitudeRotation:new o$13({componentDatatype:S$12.FLOAT,componentsPerAttribute:1,normalize:!1,value:[h]})};return Z$R(p,t),U$X(e,n,p,r),p},y$R.hasAttributesForTextureCoordinatePlanes=function(e){var t=e$2b(e.southWest_HIGH)&&e$2b(e.southWest_LOW)&&e$2b(e.northward)&&e$2b(e.eastward)&&e$2b(e.planes2D_HIGH)&&e$2b(e.planes2D_LOW)&&e$2b(e.uMaxVmax)&&e$2b(e.uvMinAndExtents),i=e$2b(e.southWest_HIGH_x)&&e$2b(e.southWest_LOW_x)&&e$2b(e.southWest_HIGH_y)&&e$2b(e.southWest_LOW_y)&&e$2b(e.southWest_HIGH_z)&&e$2b(e.southWest_LOW_z)&&e$2b(e.northward_x)&&e$2b(e.eastward_x)&&e$2b(e.northward_y)&&e$2b(e.eastward_y)&&e$2b(e.northward_z)&&e$2b(e.eastward_z)&&e$2b(e.planes2D_HIGH_x)&&e$2b(e.planes2D_LOW_x)&&e$2b(e.planes2D_HIGH_y)&&e$2b(e.planes2D_LOW_y)&&e$2b(e.planes2D_HIGH_z)&&e$2b(e.planes2D_LOW_z)&&e$2b(e.planes2D_HIGH_w)&&e$2b(e.planes2D_LOW_w)&&e$2b(e.uMaxVmax)&&e$2b(e.uvMinAndExtents);return t||i},y$R.hasAttributesForSphericalExtents=function(e){var t=e$2b(e.sphericalExtents)&&e$2b(e.longitudeRotation)&&e$2b(e.planes2D_HIGH)&&e$2b(e.planes2D_LOW)&&e$2b(e.uMaxVmax)&&e$2b(e.uvMinAndExtents),i=e$2b(e.sphericalExtents)&&e$2b(e.longitudeRotation)&&e$2b(e.planes2D_HIGH_x)&&e$2b(e.planes2D_LOW_x)&&e$2b(e.planes2D_HIGH_y)&&e$2b(e.planes2D_LOW_y)&&e$2b(e.planes2D_HIGH_z)&&e$2b(e.planes2D_LOW_z)&&e$2b(e.planes2D_HIGH_w)&&e$2b(e.planes2D_LOW_w)&&e$2b(e.uMaxVmax)&&e$2b(e.uvMinAndExtents);return t||i},y$R.shouldUseSphericalCoordinates=function(e){return o$1q.typeOf.object("rectangle",e),ve$o(e)},y$R.MAX_WIDTH_FOR_PLANAR_EXTENTS=e$2a.toRadians(1),Object.defineProperties(x$$.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}}),x$$.isSupported=function(e){return e.context.stencilBuffer};var ne$G={stencilTest:{enabled:!0,frontFunction:m$X.NOT_EQUAL,frontOperation:{fail:n$Y.ZERO,zFail:n$Y.ZERO,zPass:n$Y.ZERO},backFunction:m$X.NOT_EQUAL,backOperation:{fail:n$Y.ZERO,zFail:n$Y.ZERO,zPass:n$Y.ZERO},reference:0,mask:u$N.CLASSIFICATION_MASK},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function se$w(e,t,i,n){if(!e$2b(e._rsColorPass)){var r=!e.debugShowShadowVolume;e._rsStencilDepthPass=d$1m.fromCache(M$W(r,!1)),e._rsStencilDepthPass3DTiles=d$1m.fromCache(M$W(r,!0)),e._rsStencilDepthPassS3M=d$1m.fromCache(te$y()),e._rsColorPass=d$1m.fromCache(U$W(r,!1)),e._rsColorPassS3M=d$1m.fromCache(ae$u()),e._rsPickPass=d$1m.fromCache(ne$G)}}function oe$u(e,t){if(!e.compressVertices)return t;if(-1!==t.search(/attribute\s+vec3\s+extrudeDirection;/g)){var i="compressedAttributes",n="attribute vec2 "+i+";",r="vec3 extrudeDirection;\n",o=t;return o=o.replace(/attribute\s+vec3\s+extrudeDirection;/g,""),[n,r,o=s$U.replaceMain(o,"czm_non_compressed_main"),"void main() \n{ \n extrudeDirection = czm_octDecode(compressedAttributes, 65535.0);\n czm_non_compressed_main(); \n}"].join("\n")}}function ie$B(e,t){var i=t.context,n=e._primitive,r=X$Q;r=e._primitive._batchTable.getVertexShaderCallback()(r),r=y$S._appendDistanceDisplayConditionToShader(n,r),r=y$S._modifyShaderPosition(e,r,t.scene3DOnly),r=y$S._updateColorAttribute(n,r);var o=e._hasPlanarExtentsAttributes,a=o||e._hasSphericalExtentsAttribute;e._extruded&&(r=oe$u(n,r));var s=e._extruded?"EXTRUDED_GEOMETRY":"",l=new s$U({defines:[s],sources:[r]}),u=new s$U({sources:[Q$Q]});e._primitive._swipeEnabled&&u.defines.push("APPLY_SWIPE");var c=e._primitive._attributeLocations,h=new y$R(a,o,e.appearance,i.floatTextureSixPlaces);if(e._spStencil=r$13.replaceCache({context:i,shaderProgram:e._spStencil,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c}),e._primitive.allowPicking){var d=s$U.createPickVertexShaderSource(r);d=y$S._appendShowToShader(n,d),d=y$S._updatePickColorAttribute(d);var f=h.createPickFragmentShader(!1),p=h.createPickVertexShader([s],d,!1,t.mapProjection);if(e._spPick=r$13.replaceCache({name:"ClassificationPrimitive_spPick",context:i,shaderProgram:e._spPick,vertexShaderSource:p,fragmentShaderSource:f,attributeLocations:c}),a){var _=i.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!e$2b(_)){var m=h.createPickFragmentShader(!0),g=h.createPickVertexShader([s],d,!0,t.mapProjection);_=i.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:g,fragmentShaderSource:m,attributeLocations:c})}e._spPick2D=_}}else e._spPick=r$13.fromCache({name:"ClassificationPrimitive_spPick",context:i,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});l=new s$U({defines:[s],sources:[r=y$S._appendShowToShader(n,r)]}),e._sp=r$13.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});var x=h.createFragmentShader(!1),v=h.createVertexShader([s],r,!1,t.mapProjection);if(e._spColor=r$13.replaceCache({context:i,shaderProgram:e._spColor,vertexShaderSource:v,fragmentShaderSource:x,attributeLocations:c}),a){var y=i.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!e$2b(y)){var $=h.createFragmentShader(!0),b=h.createVertexShader([s],r,!0,t.mapProjection);y=i.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:b,fragmentShaderSource:$,attributeLocations:c})}e._spColor2D=y}}function de$s(e,t,i){var n=e._primitive,r=2*n._va.length;t.length=r;var o,a,s,l=0,u=n._batchTable.getUniformMapCallback()(e._uniformMap);u.uSwipeRegion=function(){var t=e._primitive._swipeRegion,n=new e$29;return e$29.fromElements(t.x,t.y,t.x+t.z,t.y+t.w,n),n.x=n.x*i.context.drawingBufferWidth,n.y=(1-n.y)*i.context.drawingBufferHeight,n.z=n.z*i.context.drawingBufferWidth,n.w=(1-n.w)*i.context.drawingBufferHeight,n};var c=e._needs2DShader;for(o=0;o<r;o+=2){var h=n._va[l++];e$2b(a=t[o])||(a=t[o]=new i$_({owner:e,primitiveType:n._primitiveType})),a.vertexArray=h,a.renderState=e._rsStencilDepthPass,a.shaderProgram=e._sp,a.uniformMap=u,a.pass=Le$s.TERRAIN_CLASSIFICATION,(s=i$_.shallowClone(a,a.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,s.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,a.derivedCommands.tileset=s,(s=i$_.shallowClone(a,a.derivedCommands.s3mtiles)).renderState=e._rsStencilDepthPassS3M,s.pass=Le$s.ClampObject,a.derivedCommands.s3mtiles=s,e$2b(a=t[o+1])||(a=t[o+1]=new i$_({owner:e,primitiveType:n._primitiveType})),a.vertexArray=h,a.renderState=e._rsColorPass,a.shaderProgram=e._spColor,a.pass=Le$s.TERRAIN_CLASSIFICATION;var d=e.appearance.material;if(e$2b(d)&&(u=p$19(u,d._uniforms)),a.uniformMap=u,(s=i$_.shallowClone(a,a.derivedCommands.tileset)).pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,a.derivedCommands.tileset=s,(s=i$_.shallowClone(a,a.derivedCommands.s3mtiles)).pass=Le$s.ClampObject,s.renderState=e._rsColorPassS3M,a.derivedCommands.s3mtiles=s,c){var f=i$_.shallowClone(a,a.derivedCommands.appearance2D);f.shaderProgram=e._spColor2D,a.derivedCommands.appearance2D=f,(f=i$_.shallowClone(s,s.derivedCommands.appearance2D)).shaderProgram=e._spColor2D,s.derivedCommands.appearance2D=f}}var p=e._commandsIgnoreShow,_=e._spStencil,m=0;r=p.length=r/2;for(var g=0;g<r;++g){var x=p[g]=i$_.shallowClone(t[m],p[g]);x.shaderProgram=_,x.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,m+=2}}function ue$z(e,t){var i,n,r=e._usePickOffsets,o=Le$s.TERRAIN_CLASSIFICATION,a=Le$s.CESIUM_3D_TILE_CLASSIFICATION,s=Le$s.ClampObject,l=e._primitive,u=2*l._va.length,c=0;r&&(u=2*(i=l._pickOffsets).length),t.length=u;var h,d,f,p=0,_=l._batchTable.getUniformMapCallback()(e._uniformMap),m=e._needs2DShader;for(h=0;h<u;h+=2){var g,x=l._va[p++];if(r&&(n=i[c++],x=l._va[n.index]),e$2b(d=t[h])||(d=t[h]=new i$_({owner:e,primitiveType:l._primitiveType,pickOnly:!0})),d.vertexArray=x,d.renderState=e._rsStencilDepthPass,d.shaderProgram=e._sp,d.uniformMap=_,d.pass=o,r&&(d.offset=n.offset,d.count=n.count),(f=i$_.shallowClone(d,d.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,f.pass=a,d.derivedCommands.tileset=f,(f=i$_.shallowClone(d,d.derivedCommands.s3mtiles)).renderState=e._rsStencilDepthPassS3M,f.pass=s,d.derivedCommands.s3mtiles=f,e$2b(d=t[h+1])||(d=t[h+1]=new i$_({owner:e,primitiveType:l._primitiveType,pickOnly:!0})),d.vertexArray=x,d.renderState=e._rsPickPass,d.shaderProgram=e._spPick,d.uniformMap=_,d.pass=o,r&&(d.offset=n.offset,d.count=n.count),(f=i$_.shallowClone(d,d.derivedCommands.tileset)).pass=a,d.derivedCommands.tileset=f,m)(g=i$_.shallowClone(d,d.derivedCommands.pick2D)).shaderProgram=e._spPick2D,d.derivedCommands.pick2D=g,(g=i$_.shallowClone(f,f.derivedCommands.pick2D)).shaderProgram=e._spPick2D,f.derivedCommands.pick2D=g;if((f=i$_.shallowClone(d,d.derivedCommands.s3mtiles)).pass=s,d.derivedCommands.s3mtiles=f,m)(g=i$_.shallowClone(d,d.derivedCommands.pick2D)).shaderProgram=e._spPick2D,d.derivedCommands.pick2D=g,(g=i$_.shallowClone(f,f.derivedCommands.pick2D)).shaderProgram=e._spPick2D,f.derivedCommands.pick2D=g}}function pe$u(e,t,i,n,r,o,a,s){de$s(e,o,s),ue$z(e,a)}function Z$Q(e,t){return Math.floor(e%t/3)}function K$M(e,t,i,n,r,o){e.modelMatrix=i,e.boundingVolume=r,e.cull=n,e.debugShowBoundingVolume=o,t.commandList.push(e)}function j$V(e,t,i,n,r){e.modelMatrix=i,e.boundingVolume=r,e.cull=n,t.commandList.push(e)}function he$r(e,t,i,n,r,o,a,s){var l,u=e._primitive;y$S._updateBoundingVolumes(u,t,r),t.mode===C$13.SCENE3D?l=u._boundingSphereWC:t.mode===C$13.COLUMBUS_VIEW?l=u._boundingSphereCV:t.mode===C$13.SCENE2D&&e$2b(u._boundingSphere2D)?l=u._boundingSphere2D:e$2b(u._boundingSphereMorph)&&(l=u._boundingSphereMorph);var c,h,d=e.classificationType,f=d!==_0x3b5200.CESIUM_3D_TILE,p=d!==_0x3b5200.TERRAIN,_=t.passes;if(_.render){var m=i.length;for(c=0;c<m;++c)h=l[Z$Q(c,m)],f&&K$M(i[c],t,r,o,h,a),p&&K$M(i[c].derivedCommands.tileset,t,r,o,h,a);if(t.invertClassification){var g=e._commandsIgnoreShow,x=g.length;for(c=0;c<x;++c)h=l[Math.floor(c/2)],K$M(g[c],t,r,o,h,a)}}if(_.pick){var v=n.length,y=u._pickOffsets;for(c=0;c<v;++c){h=l[y[Z$Q(c,v)].index],f&&j$V(n[c],t,r,o,h),p&&j$V(n[c].derivedCommands.tileset,t,r,o,h)}}}x$$.prototype.update=function(e){if(e$2b(this._primitive)||e$2b(this.geometryInstances)){var t=this.appearance;e$2b(t)&&e$2b(t.material)&&t.material.update(e.context);var i=this,n=this._primitiveOptions;if(!e$2b(this._primitive)){var r,o,a,s,l=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],u=l.length,c=!1,h=!0,d=!1,f=!1;for(u>0&&(a=l[0].attributes,d=y$R.hasAttributesForSphericalExtents(a),f=y$R.hasAttributesForTextureCoordinatePlanes(a),s=a.color),r=0;r<u;r++){var p=(o=l[r]).attributes.color;if(e$2b(p))c=!0;else if(c)throw new t$16("All GeometryInstances must have color attributes to use per-instance color.");h=h&&e$2b(p)&&o$16.equals(s,p)}if(!h&&!d&&!f)throw new t$16("All GeometryInstances must have the same color attribute except via GroundPrimitives");if(c&&!e$2b(t)&&(t=new t$R({flat:!0}),this.appearance=t),!c&&t instanceof t$R)throw new t$16("PerInstanceColorAppearance requires color GeometryInstanceAttributes on all GeometryInstances");if(e$2b(t.material)&&!d&&!f)throw new t$16("Materials on ClassificationPrimitives are not supported except via GroundPrimitives");this._usePickOffsets=!d&&!f,this._hasSphericalExtentsAttribute=d,this._hasPlanarExtentsAttributes=f,this._hasPerColorAttribute=c;var _=new Array(u);for(r=0;r<u;++r)o=l[r],_[r]=new d$1o({geometry:o.geometry,attributes:o.attributes,modelMatrix:o.modelMatrix,id:o.id,pickPrimitive:u$_(this._pickPrimitive,i)});n.appearance=t,n.geometryInstances=_,e$2b(this._createBoundingVolumeFunction)&&(n._createBoundingVolumeFunction=function(e,t){i._createBoundingVolumeFunction(e,t)}),n._createRenderStatesFunction=function(e,t,n,r){se$w(i)},n._createShaderProgramFunction=function(e,t,n){ie$B(i,t)},n._createCommandsFunction=function(e,t,n,r,o,a,s,l){pe$u(i,void 0,void 0,!0,!1,a,s,l)},e$2b(this._updateAndQueueCommandsFunction)?n._updateAndQueueCommandsFunction=function(e,t,n,r,o,a,s,l){i._updateAndQueueCommandsFunction(e,t,n,r,o,a,s,l)}:n._updateAndQueueCommandsFunction=function(e,t,n,r,o,a,s,l){he$r(i,t,n,r,o,a,s)},this._primitive=new y$S(n),this._primitive.readyPromise.then((function(e){i._ready=!0,i.releaseGeometryInstances&&(i.geometryInstances=void 0);var t=e._error;e$2b(t)?i._readyPromise.reject(t):i._readyPromise.resolve(i)}))}if(this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=d$1m.fromCache(M$W(!1,!1)),this._rsStencilDepthPass3DTiles=d$1m.fromCache(M$W(!1,!0)),this._rsColorPass=d$1m.fromCache(U$W(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=d$1m.fromCache(M$W(!0,!1)),this._rsStencilDepthPass3DTiles=d$1m.fromCache(M$W(!0,!0)),this._rsColorPass=d$1m.fromCache(U$W(!0))),this._primitive.appearance!==t){if(!this._hasSphericalExtentsAttribute&&!this._hasPlanarExtentsAttributes&&e$2b(t.material))throw new t$16("Materials on ClassificationPrimitives are not supported except via GroundPrimitive");if(!this._hasPerColorAttribute&&t instanceof t$R)throw new t$16("PerInstanceColorAppearance requires color GeometryInstanceAttribute");this._primitive.appearance=t}this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},x$$.prototype.getGeometryInstanceAttributes=function(e){if(!e$2b(this._primitive))throw new t$16("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},x$$.prototype.isDestroyed=function(){return!1},x$$.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,i$10(this)};var te$x={u_globeMinimumAltitude:function(){return 55e3}};function d$14(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).appearance,i=e.geometryInstances;if(!e$2b(t)&&e$2b(i))for(var n=Array.isArray(i)?i:[i],r=n.length,o=0;o<r;o++){var a=n[o].attributes;if(e$2b(a)&&e$2b(a.color)){t=new t$R({flat:!0});break}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=u$_(e.show,!0),this.classificationType=u$_(e.classificationType,_0x3b5200.BOTH),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=u$_(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._readyPromise=o$1l.defer(),this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=e$1E._defaultMaxTerrainHeight,this._minTerrainHeight=e$1E._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:u$_(e.vertexCacheOptimize,!1),interleave:u$_(e.interleave,!1),releaseGeometryInstances:u$_(e.releaseGeometryInstances,!0),allowPicking:u$_(e.allowPicking,!0),asynchronous:u$_(e.asynchronous,!0),compressVertices:u$_(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:te$x,classificationType:this.classificationType}}function z$Q(e){return function(t,i){var n=i.maximumRadius,r=n/Math.cos(.5*t)-n;return e._maxHeight+r}}function L$Z(e){return function(t,i){return e._minHeight}}Object.defineProperties(d$14.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),d$14.isSupported=x$$.isSupported;var se$v=new o$1p,ae$t=new o$1p,ne$F=new o$1p,oe$t=new a$18,ue$y=new h$18;function G$11(e,t){var i=e.mapProjection.ellipsoid;if(!e$2b(t.attributes)||!e$2b(t.attributes.position3DHigh))return e$2b(t.rectangle)?t.rectangle:void 0;for(var n=t.attributes.position3DHigh.values,r=t.attributes.position3DLow.values,o=n.length,a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=0;c<o;c+=3){var h=o$1p.unpack(n,c,se$v),d=o$1p.unpack(r,c,ae$t),f=o$1p.add(h,d,ne$F),p=i.cartesianToCartographic(f,oe$t),_=p.latitude,m=p.longitude;a=Math.min(a,_),s=Math.min(s,m),l=Math.max(l,_),u=Math.max(u,m)}var g=ue$y;return g.north=l,g.south=a,g.east=u,g.west=s,g}function he$q(e,t,i){var n=e$1E.getMinimumMaximumHeights(t,i);e._minTerrainHeight=n.minimumTerrainHeight,e._maxTerrainHeight=n.maximumTerrainHeight}function pe$t(e,t,i){var n=t.mapProjection.ellipsoid,r=G$11(t,i);if(e.geometryInstances){var o=Number.MIN_VALUE,a=Number.MAX_VALUE,s=!1;for(let t=0;t<e.geometryInstances.length>0;t++){var l=e.geometryInstances[t].geometry._groundBottomAltitude,u=e.geometryInstances[t].geometry._groundExtrudedHeight;if(e$2b(l)&&e$2b(u)&&(0!==l||0!==u)){var c=l+u;o=Math.max(o,c),a=Math.min(a,l),s=!0}}e._maxHeight=s?o:e._maxHeight,e._minHeight=s?a:e._minHeight}var h=(Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances])[0].geometry._granularity,d=y$Z.fromRectangle(r,L$Z(e)(h,n),z$Q(e)(h,n),n);if(e._boundingVolumes.push(d),!t.scene3DOnly){var f=t.mapProjection,p=i$1c.fromRectangleWithHeights2D(r,f,e._maxHeight,e._minHeight);o$1p.fromElements(p.center.z,p.center.x,p.center.y,p.center),e._boundingVolumes2D.push(p)}}function j$U(e,t){return Math.floor(e%t/3)}function O$G(e,t,i,n,r,o,a){var s=e._primitive;i.mode!==C$13.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&t.derivedCommands&&t.derivedCommands.appearance2D&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t)}function R$R(e,t,i,n,r,o){var a=e._primitive;i.mode!==C$13.SCENE3D&&t.shaderProgram===a._spPick&&a._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,i.commandList.push(t)}function me$s(e,t,i,n,r,o,a,s){var l;l=t.mode===C$13.SCENE3D?e._boundingVolumes:e._boundingVolumes2D;var u,c,h=e.classificationType,d=h!==_0x3b5200.CESIUM_3D_TILE&&h!==_0x3b5200.S3M_TILE,f=h!==_0x3b5200.TERRAIN&&h!==_0x3b5200.S3M_TILE,p=h!==_0x3b5200.TERRAIN&&h!==_0x3b5200.CESIUM_3D_TILE,_=t.passes,m=e._primitive;if(_.render){var g=i.length;for(u=0;u<g;++u)c=l[j$U(u,g)],d&&O$G(e,i[u],t,r,o,c,a),f&&O$G(e,i[u].derivedCommands.tileset,t,r,o,c,a),p&&O$G(e,i[u].derivedCommands.s3mtiles,t,r,o,c,a);if(t.invertClassification){var x=m._commandsIgnoreShow,v=x.length;for(u=0;u<v;++u)c=l[Math.floor(u/2)],O$G(e,x[u],t,r,o,c,a)}}if(_.pick){var y,$=n.length;for(e._useFragmentCulling||(y=m._primitive._pickOffsets),u=0;u<$;++u){if(c=l[j$U(u,$)],!e._useFragmentCulling)c=l[y[j$U(u,$)].index];d&&R$R(e,n[u],t,r,o,c),f&&R$R(e,n[u].derivedCommands.tileset,t,r,o,c),p&&O$G(e,n[u].derivedCommands.s3mtiles,t,r,o,c,a)}}}function n$T(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function n$S(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}d$14.initializeTerrainHeights=function(){return e$1E.initialize()},d$14.prototype.update=function(e){if(e$2b(this._primitive)||e$2b(this.geometryInstances)){if(!e$1E.initialized){if(!this.asynchronous)throw new t$16("For synchronous GroundPrimitives, you must call GroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");return void d$14.initializeTerrainHeights()}var t=this,i=this._classificationPrimitiveOptions;if(!e$2b(this._primitive)){var n,r,o,a,s,l=e.mapProjection.ellipsoid,u=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=u.length,h=new Array(c);for(a=0;a<c;++a){var d=G$11(e,r=(n=u[a]).geometry);e$2b(s)?e$2b(d)&&h$18.union(s,d,s):s=h$18.clone(d);var f=n.id;if(e$2b(f)&&e$2b(d)){var p=e$1E.getBoundingSphere(d,l);this._boundingSpheresKeys.push(f),this._boundingSpheres.push(p)}if(!e$2b(o=r.constructor)||!e$2b(o.createShadowVolume))throw new t$16("Not all of the geometry instances have GroundPrimitive support.")}he$q(this,s,l);var _=e.terrainExaggeration;this._minHeight=this._minTerrainHeight*_,this._maxHeight=this._maxTerrainHeight*_;var m=d$14._supportsMaterials(e.context);if(this._useFragmentCulling=m,m){var g,x=!0;for(a=0;a<c;++a)if(s=G$11(e,r=(n=u[a]).geometry),y$R.shouldUseSphericalCoordinates(s)){x=!1;break}for(a=0;a<c;++a){o=(r=(n=u[a]).geometry).constructor;var v=G$11(e,r),y=r.textureCoordinateRotationPoints,$=e.context.floatTextureSixPlaces;g=x?y$R.getPlanarTextureCoordinateAttributes(v,y,l,e.mapProjection,$,this._maxHeight):y$R.getSphericalExtentGeometryInstanceAttributes(v,y,l,e.mapProjection,$);var b=n.attributes;for(var T in b)b.hasOwnProperty(T)&&(g[T]=b[T]);n.created?h[a]=new d$1o({geometry:n._groundGeometry,attributes:g,id:n.id}):(h[a]=new d$1o({geometry:o.createShadowVolume(r,L$Z(this),z$Q(this)),attributes:g,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0)}}else for(a=0;a<c;++a)o=(r=(n=u[a]).geometry).constructor,n.created?h[a]=new d$1o({geometry:r,attributes:n.attributes,id:n.id}):(h[a]=new d$1o({geometry:o.createShadowVolume(r,L$Z(this),z$Q(this)),attributes:n.attributes,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0);i.geometryInstances=h,i.appearance=this.appearance,i._createBoundingVolumeFunction=function(e,i){pe$t(t,e,i)},i._updateAndQueueCommandsFunction=function(e,i,n,r,o,a,s,l){me$s(t,i,n,r,o,a,s)},this._primitive=new x$$(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0);var i=e._error;e$2b(i)?t._readyPromise.reject(i):t._readyPromise.resolve(t)}))}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},d$14.prototype.getBoundingSphere=function(e){var t=this._boundingSpheresKeys.indexOf(e);if(-1!==t)return this._boundingSpheres[t]},d$14.prototype.getGeometryInstanceAttributes=function(e){if(!e$2b(this._primitive))throw new t$16("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},d$14.prototype.isDestroyed=function(){return!1},d$14.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$10(this)},d$14._supportsMaterials=function(e){return e.depthTexture},d$14.supportsMaterials=function(e){return o$1q.typeOf.object("scene",e),d$14._supportsMaterials(e.frameState.context)},Object.defineProperties(n$T.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),image:C$$("image"),scale:C$$("scale"),pixelOffset:C$$("pixelOffset"),eyeOffset:C$$("eyeOffset"),horizontalOrigin:C$$("horizontalOrigin"),verticalOrigin:C$$("verticalOrigin"),heightReference:C$$("heightReference"),color:C$$("color"),rotation:C$$("rotation"),alignedAxis:C$$("alignedAxis"),sizeInMeters:C$$("sizeInMeters"),width:C$$("width"),height:C$$("height"),scaleByDistance:C$$("scaleByDistance"),translucencyByDistance:C$$("translucencyByDistance"),pixelOffsetScaleByDistance:C$$("pixelOffsetScaleByDistance"),imageSubRegion:C$$("imageSubRegion"),distanceDisplayCondition:C$$("distanceDisplayCondition"),disableDepthTestDistance:C$$("disableDepthTestDistance")}),n$T.prototype.clone=function(e){return e$2b(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e):new n$T(this)},n$T.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this._show,e.show),this.image=u$_(this._image,e.image),this.scale=u$_(this._scale,e.scale),this.pixelOffset=u$_(this._pixelOffset,e.pixelOffset),this.eyeOffset=u$_(this._eyeOffset,e.eyeOffset),this.horizontalOrigin=u$_(this._horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=u$_(this._verticalOrigin,e.verticalOrigin),this.heightReference=u$_(this._heightReference,e.heightReference),this.color=u$_(this._color,e.color),this.rotation=u$_(this._rotation,e.rotation),this.alignedAxis=u$_(this._alignedAxis,e.alignedAxis),this.sizeInMeters=u$_(this._sizeInMeters,e.sizeInMeters),this.width=u$_(this._width,e.width),this.height=u$_(this._height,e.height),this.scaleByDistance=u$_(this._scaleByDistance,e.scaleByDistance),this.translucencyByDistance=u$_(this._translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=u$_(this._pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.imageSubRegion=u$_(this._imageSubRegion,e.imageSubRegion),this.distanceDisplayCondition=u$_(this._distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=u$_(this._disableDepthTestDistance,e.disableDepthTestDistance)},Object.defineProperties(n$S.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),dimensions:C$$("dimensions"),heightReference:C$$("heightReference"),fill:C$$("fill"),material:c$_("material"),outline:C$$("outline"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth"),shadows:C$$("shadows"),distanceDisplayCondition:C$$("distanceDisplayCondition")}),n$S.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.dimensions=this.dimensions,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new n$S(this)},n$S.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.dimensions=u$_(this.dimensions,e.dimensions),this.heightReference=u$_(this.heightReference,e.heightReference),this.fill=u$_(this.fill,e.fill),this.material=u$_(this.material,e.material),this.outline=u$_(this.outline,e.outline),this.outlineColor=u$_(this.outlineColor,e.outlineColor),this.outlineWidth=u$_(this.outlineWidth,e.outlineWidth),this.shadows=u$_(this.shadows,e.shadows),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition)};var e$1o={FIXED:0,INERTIAL:1},Re$k=Object.freeze(e$1o);function t$K(){t$16.throwInstantiationError()}Object.defineProperties(t$K.prototype,{isConstant:{get:t$16.throwInstantiationError},definitionChanged:{get:t$16.throwInstantiationError},referenceFrame:{get:t$16.throwInstantiationError}}),t$K.prototype.getValue=t$16.throwInstantiationError,t$K.prototype.getValueInReferenceFrame=t$16.throwInstantiationError,t$K.prototype.equals=t$16.throwInstantiationError;var p$S=new p$1e;function r$U(e,t){this._definitionChanged=new o$1h,this._value=o$1p.clone(e),this._referenceFrame=u$_(t,Re$k.FIXED)}function n$R(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function o$X(e){return e}function c$W(e,t){return C$$(e,t,o$X)}function n$Q(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function n$P(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function e$1n(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._innerRadii=void 0,this._innerRadiiSubscription=void 0,this._minimumClock=void 0,this._minimumClockSubscription=void 0,this._maximumClock=void 0,this._maximumClockSubscription=void 0,this._minimumCone=void 0,this._minimumConeSubscription=void 0,this._maximumCone=void 0,this._maximumConeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function n$O(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._showBackground=void 0,this._showBackgroundSubscription=void 0,this._backgroundColor=void 0,this._backgroundColorSubscription=void 0,this._backgroundPadding=void 0,this._backgroundPaddingSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}t$K.convertToReferenceFrame=function(e,t,i,n,r){if(!e$2b(t))return t;if(e$2b(r)||(r=new o$1p),i===n)return o$1p.clone(t,r);var o=m$17.computeIcrfToFixedMatrix(e,p$S);return e$2b(o)||(o=m$17.computeTemeToPseudoFixedMatrix(e,p$S)),i===Re$k.INERTIAL?p$1e.multiplyByVector(o,t,r):i===Re$k.FIXED?p$1e.multiplyByVector(p$1e.transpose(o,p$S),t,r):void 0},Object.defineProperties(r$U.prototype,{isConstant:{get:function(){return!e$2b(this._value)||this._referenceFrame===Re$k.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),r$U.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$k.FIXED,t)},r$U.prototype.setValue=function(e,t){var i=!1;o$1p.equals(this._value,e)||(i=!0,this._value=o$1p.clone(e)),e$2b(t)&&this._referenceFrame!==t&&(i=!0,this._referenceFrame=t),i&&this._definitionChanged.raiseEvent(this)},r$U.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2b(e))throw new t$16("time is required.");if(!e$2b(t))throw new t$16("referenceFrame is required.");return t$K.convertToReferenceFrame(e,this._value,this._referenceFrame,t,i)},r$U.prototype.equals=function(e){return this===e||e instanceof r$U&&o$1p.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame},Object.defineProperties(n$R.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),positions:C$$("positions"),width:C$$("width"),height:C$$("height"),heightReference:C$$("heightReference"),extrudedHeight:C$$("extrudedHeight"),extrudedHeightReference:C$$("extrudedHeightReference"),cornerType:C$$("cornerType"),granularity:C$$("granularity"),fill:C$$("fill"),material:c$_("material"),outline:C$$("outline"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth"),shadows:C$$("shadows"),distanceDisplayCondition:C$$("distanceDisplayCondition"),classificationType:C$$("classificationType"),zIndex:C$$("zIndex")}),n$R.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new n$R(this)},n$R.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.positions=u$_(this.positions,e.positions),this.width=u$_(this.width,e.width),this.height=u$_(this.height,e.height),this.heightReference=u$_(this.heightReference,e.heightReference),this.extrudedHeight=u$_(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=u$_(this.extrudedHeightReference,e.extrudedHeightReference),this.cornerType=u$_(this.cornerType,e.cornerType),this.granularity=u$_(this.granularity,e.granularity),this.fill=u$_(this.fill,e.fill),this.material=u$_(this.material,e.material),this.outline=u$_(this.outline,e.outline),this.outlineColor=u$_(this.outlineColor,e.outlineColor),this.outlineWidth=u$_(this.outlineWidth,e.outlineWidth),this.shadows=u$_(this.shadows,e.shadows),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$_(this.classificationType,e.classificationType),this.zIndex=u$_(this.zIndex,e.zIndex)},Object.defineProperties(n$Q.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),length:C$$("length"),topRadius:C$$("topRadius"),bottomRadius:C$$("bottomRadius"),heightReference:C$$("heightReference"),fill:C$$("fill"),material:c$_("material"),outline:C$$("outline"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth"),numberOfVerticalLines:C$$("numberOfVerticalLines"),slices:C$$("slices"),shadows:C$$("shadows"),distanceDisplayCondition:C$$("distanceDisplayCondition")}),n$Q.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.length=this.length,e.topRadius=this.topRadius,e.bottomRadius=this.bottomRadius,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new n$Q(this)},n$Q.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.length=u$_(this.length,e.length),this.topRadius=u$_(this.topRadius,e.topRadius),this.bottomRadius=u$_(this.bottomRadius,e.bottomRadius),this.heightReference=u$_(this.heightReference,e.heightReference),this.fill=u$_(this.fill,e.fill),this.material=u$_(this.material,e.material),this.outline=u$_(this.outline,e.outline),this.outlineColor=u$_(this.outlineColor,e.outlineColor),this.outlineWidth=u$_(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=u$_(this.numberOfVerticalLines,e.numberOfVerticalLines),this.slices=u$_(this.slices,e.slices),this.shadows=u$_(this.shadows,e.shadows),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(n$P.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),semiMajorAxis:C$$("semiMajorAxis"),semiMinorAxis:C$$("semiMinorAxis"),height:C$$("height"),heightReference:C$$("heightReference"),extrudedHeight:C$$("extrudedHeight"),extrudedHeightReference:C$$("extrudedHeightReference"),rotation:C$$("rotation"),stRotation:C$$("stRotation"),granularity:C$$("granularity"),fill:C$$("fill"),material:c$_("material"),outline:C$$("outline"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth"),numberOfVerticalLines:C$$("numberOfVerticalLines"),shadows:C$$("shadows"),distanceDisplayCondition:C$$("distanceDisplayCondition"),classificationType:C$$("classificationType"),zIndex:C$$("zIndex")}),n$P.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new n$P(this)},n$P.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.semiMajorAxis=u$_(this.semiMajorAxis,e.semiMajorAxis),this.semiMinorAxis=u$_(this.semiMinorAxis,e.semiMinorAxis),this.height=u$_(this.height,e.height),this.heightReference=u$_(this.heightReference,e.heightReference),this.extrudedHeight=u$_(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=u$_(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=u$_(this.rotation,e.rotation),this.stRotation=u$_(this.stRotation,e.stRotation),this.granularity=u$_(this.granularity,e.granularity),this.fill=u$_(this.fill,e.fill),this.material=u$_(this.material,e.material),this.outline=u$_(this.outline,e.outline),this.outlineColor=u$_(this.outlineColor,e.outlineColor),this.outlineWidth=u$_(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=u$_(this.numberOfVerticalLines,e.numberOfVerticalLines),this.shadows=u$_(this.shadows,e.shadows),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$_(this.classificationType,e.classificationType),this.zIndex=u$_(this.zIndex,e.zIndex)},Object.defineProperties(e$1n.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),radii:C$$("radii"),innerRadii:C$$("innerRadii"),minimumClock:C$$("minimumClock"),maximumClock:C$$("maximumClock"),minimumCone:C$$("minimumCone"),maximumCone:C$$("maximumCone"),heightReference:C$$("heightReference"),fill:C$$("fill"),material:c$_("material"),outline:C$$("outline"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth"),stackPartitions:C$$("stackPartitions"),slicePartitions:C$$("slicePartitions"),subdivisions:C$$("subdivisions"),shadows:C$$("shadows"),distanceDisplayCondition:C$$("distanceDisplayCondition")}),e$1n.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new e$1n(this)},e$1n.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.radii=u$_(this.radii,e.radii),this.innerRadii=u$_(this.innerRadii,e.innerRadii),this.minimumClock=u$_(this.minimumClock,e.minimumClock),this.maximumClock=u$_(this.maximumClock,e.maximumClock),this.minimumCone=u$_(this.minimumCone,e.minimumCone),this.maximumCone=u$_(this.maximumCone,e.maximumCone),this.heightReference=u$_(this.heightReference,e.heightReference),this.fill=u$_(this.fill,e.fill),this.material=u$_(this.material,e.material),this.outline=u$_(this.outline,e.outline),this.outlineColor=u$_(this.outlineColor,e.outlineColor),this.outlineWidth=u$_(this.outlineWidth,e.outlineWidth),this.stackPartitions=u$_(this.stackPartitions,e.stackPartitions),this.slicePartitions=u$_(this.slicePartitions,e.slicePartitions),this.subdivisions=u$_(this.subdivisions,e.subdivisions),this.shadows=u$_(this.shadows,e.shadows),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(n$O.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),text:C$$("text"),font:C$$("font"),style:C$$("style"),scale:C$$("scale"),showBackground:C$$("showBackground"),backgroundColor:C$$("backgroundColor"),backgroundPadding:C$$("backgroundPadding"),pixelOffset:C$$("pixelOffset"),eyeOffset:C$$("eyeOffset"),horizontalOrigin:C$$("horizontalOrigin"),verticalOrigin:C$$("verticalOrigin"),heightReference:C$$("heightReference"),fillColor:C$$("fillColor"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth"),translucencyByDistance:C$$("translucencyByDistance"),pixelOffsetScaleByDistance:C$$("pixelOffsetScaleByDistance"),scaleByDistance:C$$("scaleByDistance"),distanceDisplayCondition:C$$("distanceDisplayCondition"),disableDepthTestDistance:C$$("disableDepthTestDistance")}),n$O.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.text=this.text,e.font=this.font,e.style=this.style,e.scale=this.scale,e.showBackground=this.showBackground,e.backgroundColor=this.backgroundColor,e.backgroundPadding=this.backgroundPadding,e.pixelOffset=this.pixelOffset,e.eyeOffset=this.eyeOffset,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.heightReference=this.heightReference,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e.scaleByDistance=this.scaleByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new n$O(this)},n$O.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.text=u$_(this.text,e.text),this.font=u$_(this.font,e.font),this.style=u$_(this.style,e.style),this.scale=u$_(this.scale,e.scale),this.showBackground=u$_(this.showBackground,e.showBackground),this.backgroundColor=u$_(this.backgroundColor,e.backgroundColor),this.backgroundPadding=u$_(this.backgroundPadding,e.backgroundPadding),this.pixelOffset=u$_(this.pixelOffset,e.pixelOffset),this.eyeOffset=u$_(this.eyeOffset,e.eyeOffset),this.horizontalOrigin=u$_(this.horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=u$_(this.verticalOrigin,e.verticalOrigin),this.heightReference=u$_(this.heightReference,e.heightReference),this.fillColor=u$_(this.fillColor,e.fillColor),this.outlineColor=u$_(this.outlineColor,e.outlineColor),this.outlineWidth=u$_(this.outlineWidth,e.outlineWidth),this.translucencyByDistance=u$_(this.translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=u$_(this.pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.scaleByDistance=u$_(this.scaleByDistance,e.scaleByDistance),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=u$_(this.disableDepthTestDistance,e.disableDepthTestDistance)};var e$1m=new e$1X,a$N=function(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=e.translation,this.rotation=e.rotation,this.scale=e.scale};Object.defineProperties(a$N.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._translation)&&r$Z.isConstant(this._rotation)&&r$Z.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:C$$("translation"),rotation:C$$("rotation"),scale:C$$("scale")}),a$N.prototype.getValue=function(e,t){return e$2b(t)||(t=new e$1X),t.translation=r$Z.getValueOrClonedDefault(this._translation,e,e$1m.translation,t.translation),t.rotation=r$Z.getValueOrClonedDefault(this._rotation,e,e$1m.rotation,t.rotation),t.scale=r$Z.getValueOrClonedDefault(this._scale,e,e$1m.scale,t.scale),t},a$N.prototype.equals=function(e){return this===e||e instanceof a$N&&r$Z.equals(this._translation,e._translation)&&r$Z.equals(this._rotation,e._rotation)&&r$Z.equals(this._scale,e._scale)};var f$T=function(e,t){this._propertyNames=[],this._definitionChanged=new o$1h,e$2b(e)&&this.merge(e,t)};function g$Y(e){return new e$1I(e)}function _$P(e,t){var i=e._propertyNames,n=t._propertyNames,r=i.length;if(r!==n.length)return!1;for(var o=0;o<r;++o){var a=i[o];if(-1===n.indexOf(a)||!r$Z.equals(e[a],t[a]))return!1}return!0}function a$M(e){return new a$N(e)}function c$V(e){return new f$T(e,a$M)}function t$J(e){this._show=void 0,this._showSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._runAnimations=void 0,this._clampAnimations=void 0,this._runAnimationsSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._silhouetteColor=void 0,this._silhouetteColorSubscription=void 0,this._silhouetteSize=void 0,this._silhouetteSizeSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._colorBlendMode=void 0,this._colorBlendModeSubscription=void 0,this._colorBlendAmount=void 0,this._colorBlendAmountSubscription=void 0,this._clippingPlanes=void 0,this._clippingPlanesSubscription=void 0,this._imageBasedLightingFactor=void 0,this._imageBasedLightingFactorSubscription=void 0,this._lightColor=void 0,this._lightColorSubscription=void 0,this._definitionChanged=new o$1h,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function i$R(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._maximumScreenSpaceError=void 0,this._maximumScreenSpaceErrorSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function n$N(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function e$1l(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function n$M(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function a$L(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function e$1k(e){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._enuCenter=void 0,this._shapeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubsription=void 0,this._definitionChanged=new o$1h,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function n$L(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distancedisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}function e$1j(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._enuCenter=void 0,this.merge(u$_(e,u$_.EMPTY_OBJECT))}Object.defineProperties(f$T.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){for(var e=this._propertyNames,t=0,i=e.length;t<i;t++)if(!r$Z.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),f$T.prototype.hasProperty=function(e){return-1!==this._propertyNames.indexOf(e)},f$T.prototype.addProperty=function(e,t,i){var n=this._propertyNames;if(!e$2b(e))throw new t$16("propertyName is required.");if(-1!==n.indexOf(e))throw new t$16(e+" is already a registered property.");n.push(e),Object.defineProperty(this,e,C$$(e,!0,u$_(i,g$Y))),e$2b(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)},f$T.prototype.removeProperty=function(e){var t=this._propertyNames.indexOf(e);if(!e$2b(e))throw new t$16("propertyName is required.");if(-1===t)throw new t$16(e+" is not a registered property.");this._propertyNames.splice(t,1),delete this[e],this._definitionChanged.raiseEvent(this)},f$T.prototype.getValue=function(e,t){if(!e$2b(e))throw new t$16("time is required.");e$2b(t)||(t={});for(var i=this._propertyNames,n=0,r=i.length;n<r;n++){var o=i[n];t[o]=r$Z.getValueOrUndefined(this[o],e,t[o])}return t},f$T.prototype.merge=function(e,t){if(!e$2b(e))throw new t$16("source is required.");for(var i=this._propertyNames,n=e$2b(e._propertyNames)?e._propertyNames:Object.keys(e),r=0,o=n.length;r<o;r++){var a=n[r],s=this[a],l=e[a];void 0===s&&-1===i.indexOf(a)&&this.addProperty(a,void 0,t),void 0!==l&&(void 0!==s?e$2b(s)&&e$2b(s.merge)&&s.merge(l):e$2b(l)&&e$2b(l.merge)&&e$2b(l.clone)?this[a]=l.clone():this[a]=l)}},f$T.prototype.equals=function(e){return this===e||e instanceof f$T&&_$P(this,e)},Object.defineProperties(t$J.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),scale:C$$("scale"),minimumPixelSize:C$$("minimumPixelSize"),maximumScale:C$$("maximumScale"),incrementallyLoadTextures:C$$("incrementallyLoadTextures"),shadows:C$$("shadows"),uri:C$$("uri"),runAnimations:C$$("runAnimations"),clampAnimations:C$$("clampAnimations"),nodeTransformations:C$$("nodeTransformations",void 0,c$V),heightReference:C$$("heightReference"),distanceDisplayCondition:C$$("distanceDisplayCondition"),silhouetteColor:C$$("silhouetteColor"),silhouetteSize:C$$("silhouetteSize"),color:C$$("color"),colorBlendMode:C$$("colorBlendMode"),colorBlendAmount:C$$("colorBlendAmount"),clippingPlanes:C$$("clippingPlanes"),imageBasedLightingFactor:C$$("imageBasedLightingFactor"),lightColor:C$$("lightColor")}),t$J.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.scale=this.scale,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.shadows=this.shadows,e.uri=this.uri,e.runAnimations=this.runAnimations,e.clampAnimations=this.clampAnimations,e.nodeTransformations=this.nodeTransformations,e.heightReference=this._heightReference,e.distanceDisplayCondition=this.distanceDisplayCondition,e.silhouetteColor=this.silhouetteColor,e.silhouetteSize=this.silhouetteSize,e.color=this.color,e.colorBlendMode=this.colorBlendMode,e.colorBlendAmount=this.colorBlendAmount,e.clippingPlanes=this.clippingPlanes,e.imageBasedLightingFactor=this.imageBasedLightingFactor,e.lightColor=this.lightColor,e):new t$J(this)},t$J.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.scale=u$_(this.scale,e.scale),this.minimumPixelSize=u$_(this.minimumPixelSize,e.minimumPixelSize),this.maximumScale=u$_(this.maximumScale,e.maximumScale),this.incrementallyLoadTextures=u$_(this.incrementallyLoadTextures,e.incrementallyLoadTextures),this.shadows=u$_(this.shadows,e.shadows),this.uri=u$_(this.uri,e.uri),this.runAnimations=u$_(this.runAnimations,e.runAnimations),this.clampAnimations=u$_(this.clampAnimations,e.clampAnimations),this.heightReference=u$_(this.heightReference,e.heightReference),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition),this.silhouetteColor=u$_(this.silhouetteColor,e.silhouetteColor),this.silhouetteSize=u$_(this.silhouetteSize,e.silhouetteSize),this.color=u$_(this.color,e.color),this.colorBlendMode=u$_(this.colorBlendMode,e.colorBlendMode),this.colorBlendAmount=u$_(this.colorBlendAmount,e.colorBlendAmount),this.clippingPlanes=u$_(this.clippingPlanes,e.clippingPlanes),this.imageBasedLightingFactor=u$_(this.imageBasedLightingFactor,e.imageBasedLightingFactor),this.lightColor=u$_(this.lightColor,e.lightColor);var t=e.nodeTransformations;if(e$2b(t)){var i=this.nodeTransformations;e$2b(i)?i.merge(t):this.nodeTransformations=new f$T(t,a$M)}},Object.defineProperties(i$R.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),uri:C$$("uri"),maximumScreenSpaceError:C$$("maximumScreenSpaceError")}),i$R.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new i$R(this)},i$R.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.uri=u$_(this.uri,e.uri),this.maximumScreenSpaceError=u$_(this.maximumScreenSpaceError,e.maximumScreenSpaceError)},Object.defineProperties(n$N.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),leadTime:C$$("leadTime"),trailTime:C$$("trailTime"),width:C$$("width"),resolution:C$$("resolution"),material:c$_("material"),distanceDisplayCondition:C$$("distanceDisplayCondition")}),n$N.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e.width=this.width,e.resolution=this.resolution,e.material=this.material,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new n$N(this)},n$N.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.leadTime=u$_(this.leadTime,e.leadTime),this.trailTime=u$_(this.trailTime,e.trailTime),this.width=u$_(this.width,e.width),this.resolution=u$_(this.resolution,e.resolution),this.material=u$_(this.material,e.material),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(e$1l.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),plane:C$$("plane"),dimensions:C$$("dimensions"),fill:C$$("fill"),material:c$_("material"),outline:C$$("outline"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth"),shadows:C$$("shadows"),distanceDisplayCondition:C$$("distanceDisplayCondition")}),e$1l.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new e$1l(this)},e$1l.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.plane=u$_(this.plane,e.plane),this.dimensions=u$_(this.dimensions,e.dimensions),this.fill=u$_(this.fill,e.fill),this.material=u$_(this.material,e.material),this.outline=u$_(this.outline,e.outline),this.outlineColor=u$_(this.outlineColor,e.outlineColor),this.outlineWidth=u$_(this.outlineWidth,e.outlineWidth),this.shadows=u$_(this.shadows,e.shadows),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(n$M.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),pixelSize:C$$("pixelSize"),heightReference:C$$("heightReference"),color:C$$("color"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth"),scaleByDistance:C$$("scaleByDistance"),translucencyByDistance:C$$("translucencyByDistance"),distanceDisplayCondition:C$$("distanceDisplayCondition"),disableDepthTestDistance:C$$("disableDepthTestDistance")}),n$M.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.pixelSize=this.pixelSize,e.heightReference=this.heightReference,e.color=this.color,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new n$M(this)},n$M.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.pixelSize=u$_(this.pixelSize,e.pixelSize),this.heightReference=u$_(this.heightReference,e.heightReference),this.color=u$_(this.color,e.color),this.outlineColor=u$_(this.outlineColor,e.outlineColor),this.outlineWidth=u$_(this.outlineWidth,e.outlineWidth),this.scaleByDistance=u$_(this.scaleByDistance,e.scaleByDistance),this.translucencyByDistance=u$_(this._translucencyByDistance,e.translucencyByDistance),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=u$_(this.disableDepthTestDistance,e.disableDepthTestDistance)},Object.defineProperties(a$L.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),positions:C$$("positions"),width:C$$("width"),hMax:C$$("hMax"),granularity:C$$("granularity"),material:c$_("material"),depthFailMaterial:c$_("depthFailMaterial"),arcType:C$$("arcType"),clampToGround:C$$("clampToGround"),shadows:C$$("shadows"),distanceDisplayCondition:C$$("distanceDisplayCondition"),classificationType:C$$("classificationType"),zIndex:C$$("zIndex")}),a$L.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.hMax=this.hMax,e.granularity=this.granularity,e.material=this.material,e.depthFailMaterial=this.depthFailMaterial,e.arcType=this.arcType,e.clampToGround=this.clampToGround,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new a$L(this)},a$L.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.positions=u$_(this.positions,e.positions),this.width=u$_(this.width,e.width),this.granularity=u$_(this.granularity,e.granularity),this.material=u$_(this.material,e.material),this.depthFailMaterial=u$_(this.depthFailMaterial,e.depthFailMaterial),this.arcType=u$_(this.arcType,e.arcType),this.clampToGround=u$_(this.clampToGround,e.clampToGround),this.shadows=u$_(this.shadows,e.shadows),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$_(this.classificationType,e.classificationType),this.zIndex=u$_(this.zIndex,e.zIndex),this.hMax=u$_(this.hMax,e.hMax)},Object.defineProperties(e$1k.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),material:c$_("material"),positions:C$$("positions"),shape:C$$("shape"),granularity:C$$("granularity"),fill:C$$("fill"),outline:C$$("outline"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth"),cornerType:C$$("cornerType"),shadows:C$$("shadows"),distanceDisplayCondition:C$$("distanceDisplayCondition"),enuCenter:C$$("enuCenter")}),e$1k.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.material=this.material,e.positions=this.positions,e.shape=this.shape,e.granularity=this.granularity,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.cornerType=this.cornerType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.enuCenter=this.enuCenter,e):new e$1k(this)},e$1k.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.material=u$_(this.material,e.material),this.positions=u$_(this.positions,e.positions),this.shape=u$_(this.shape,e.shape),this.granularity=u$_(this.granularity,e.granularity),this.fill=u$_(this.fill,e.fill),this.outline=u$_(this.outline,e.outline),this.outlineColor=u$_(this.outlineColor,e.outlineColor),this.outlineWidth=u$_(this.outlineWidth,e.outlineWidth),this.cornerType=u$_(this.cornerType,e.cornerType),this.shadows=u$_(this.shadows,e.shadows),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition),this.enuCenter=u$_(this.enuCenter,e.enuCenter)},Object.defineProperties(n$L.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),coordinates:C$$("coordinates"),height:C$$("height"),heightReference:C$$("heightReference"),extrudedHeight:C$$("extrudedHeight"),extrudedHeightReference:C$$("extrudedHeightReference"),rotation:C$$("rotation"),stRotation:C$$("stRotation"),granularity:C$$("granularity"),fill:C$$("fill"),material:c$_("material"),outline:C$$("outline"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth"),shadows:C$$("shadows"),distanceDisplayCondition:C$$("distanceDisplayCondition"),classificationType:C$$("classificationType"),zIndex:C$$("zIndex")}),n$L.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.coordinates=this.coordinates,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new n$L(this)},n$L.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.coordinates=u$_(this.coordinates,e.coordinates),this.height=u$_(this.height,e.height),this.heightReference=u$_(this.heightReference,e.heightReference),this.extrudedHeight=u$_(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=u$_(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=u$_(this.rotation,e.rotation),this.stRotation=u$_(this.stRotation,e.stRotation),this.granularity=u$_(this.granularity,e.granularity),this.fill=u$_(this.fill,e.fill),this.material=u$_(this.material,e.material),this.outline=u$_(this.outline,e.outline),this.outlineColor=u$_(this.outlineColor,e.outlineColor),this.outlineWidth=u$_(this.outlineWidth,e.outlineWidth),this.shadows=u$_(this.shadows,e.shadows),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$_(this.classificationType,e.classificationType),this.zIndex=u$_(this.zIndex,e.zIndex)},Object.defineProperties(e$1j.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$$("show"),positions:C$$("positions"),minimumHeights:C$$("minimumHeights"),maximumHeights:C$$("maximumHeights"),granularity:C$$("granularity"),fill:C$$("fill"),material:c$_("material"),outline:C$$("outline"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth"),shadows:C$$("shadows"),distanceDisplayCondition:C$$("distanceDisplayCondition"),enuCenter:C$$("enuCenter")}),e$1j.prototype.clone=function(e){return e$2b(e)?(e.show=this.show,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.enuCenter=this.enuCenter,e):new e$1j(this)},e$1j.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.show=u$_(this.show,e.show),this.positions=u$_(this.positions,e.positions),this.minimumHeights=u$_(this.minimumHeights,e.minimumHeights),this.maximumHeights=u$_(this.maximumHeights,e.maximumHeights),this.granularity=u$_(this.granularity,e.granularity),this.fill=u$_(this.fill,e.fill),this.material=u$_(this.material,e.material),this.outline=u$_(this.outline,e.outline),this.outlineColor=u$_(this.outlineColor,e.outlineColor),this.outlineWidth=u$_(this.outlineWidth,e.outlineWidth),this.shadows=u$_(this.shadows,e.shadows),this.distanceDisplayCondition=u$_(this.distanceDisplayCondition,e.distanceDisplayCondition),this.enuCenter=u$_(this.enuCenter,e.enuCenter)};var $$S=new a$18;function ii$6(e){return new r$U(e)}function ei$5(e){return C$$(e,void 0,ii$6)}function o$W(e,t){return C$$(e,void 0,(function(e){return e instanceof t?e:new t(e)}))}function h$V(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).id;e$2b(t)||(t=e$1Q()),this._availability=void 0,this._id=t,this._definitionChanged=new o$1h,this._name=e.name,this._show=u$_(e.show,!0),this._depthTestEnabled=u$_(e.depthTestEnabled,!0),this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall"],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._orientation=void 0,this._scale=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this._polygonOffset={enabled:!1,value:new o$1o(0,0)},this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function v$J(e,t,i){for(var n=t.length,r=0;r<n;r++){var o=t[r],a=i;o._show!==a&&(o.show=a,v$J(o,o._children,i))}e._definitionChanged.raiseEvent(e,"isShowing",i,!i)}Object.defineProperties(h$V.prototype,{availability:c$W("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:c$W("name"),show:{get:function(){return this._show},set:function(e){if(!e$2b(e))throw new t$16("value is required.");if(e!==this._show){var t=this.isShowing;this._show=e;var i=this.isShowing;t!==i&&v$J(this,this._children,i),this._definitionChanged.raiseEvent(this,"show",e,!e)}}},isShowing:{get:function(){return this._show&&(!e$2b(this.entityCollection)||this.entityCollection.show)&&(!e$2b(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){var t=this._parent;if(t!==e){var i=this.isShowing;if(e$2b(t)){var n=t._children.indexOf(this);t._children.splice(n,1)}this._parent=e,e$2b(e)&&e._children.push(this);var r=this.isShowing;i!==r&&v$J(this,this._children,r),this._definitionChanged.raiseEvent(this,"parent",e,t)}}},children:{get:function(){return this._children},set:function(e){this._children=e}},propertyNames:{get:function(){return this._propertyNames}},billboard:o$W("billboard",n$T),box:o$W("box",n$S),corridor:o$W("corridor",n$R),cylinder:o$W("cylinder",n$Q),description:C$$("description"),ellipse:o$W("ellipse",n$P),ellipsoid:o$W("ellipsoid",e$1n),label:o$W("label",n$O),model:o$W("model",t$J),orientation:C$$("orientation"),scale:C$$("scale"),path:o$W("path",n$N),plane:o$W("plane",e$1l),point:o$W("point",n$M),polygon:o$W("polygon",l$Z),polyline:o$W("polyline",a$L),polylineVolume:o$W("polylineVolume",e$1k),properties:o$W("properties",f$T),position:ei$5("position"),rectangle:o$W("rectangle",n$L),viewFrom:C$$("viewFrom"),wall:o$W("wall",e$1j)}),h$V.prototype.isAvailable=function(e){if(!e$2b(e))throw new t$16("time is required.");var t=this._availability;return!e$2b(t)||t.contains(e)},h$V.prototype.addProperty=function(e){var t=this._propertyNames;if(!e$2b(e))throw new t$16("propertyName is required.");if(-1!==t.indexOf(e))throw new t$16(e+" is already a registered property.");if(e in this)throw new t$16(e+" is a reserved property name.");t.push(e),Object.defineProperty(this,e,c$W(e,!0))},h$V.prototype.removeProperty=function(e){var t=this._propertyNames.indexOf(e);if(!e$2b(e))throw new t$16("propertyName is required.");if(-1===t)throw new t$16(e+" is not a registered property.");this._propertyNames.splice(t,1),delete this[e]},h$V.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.name=u$_(this.name,e.name),this.availability=u$_(e.availability,this.availability);for(var t=this._propertyNames,i=e$2b(e._propertyNames)?e._propertyNames:Object.keys(e),n=i.length,r=0;r<n;r++){var o=i[r];if("parent"!==o){var a=this[o],s=e[o];!e$2b(a)&&-1===t.indexOf(o)&&this.addProperty(o),e$2b(s)&&(e$2b(a)?e$2b(a.merge)&&a.merge(s):e$2b(s.merge)&&e$2b(s.clone)?this[o]=s.clone():this[o]=s)}}};var P$S=new p$1e,G$10=new o$1p,x$_=new n$13;h$V.prototype.computeModelMatrix=function(e,t){o$1q.typeOf.object("time",e);var i=r$Z.getValueOrUndefined(this._position,e,G$10);if(e$2b(i)){var n=r$Z.getValueOrUndefined(this._orientation,e,x$_);return t=e$2b(n)?p$1d.fromRotationTranslation(p$1e.fromQuaternion(n,P$S),i,t):m$17.eastNorthUpToFixedFrame(i,void 0,t)}},h$V.prototype.computeModelMatrixForHeightReference=function(e,t,i,n,r){o$1q.typeOf.object("time",e);var o=r$Z.getValueOrDefault(t,e,k$P.NONE),a=r$Z.getValueOrUndefined(this._position,e,G$10);if(o===k$P.NONE||!e$2b(a)||o$1p.equalsEpsilon(a,o$1p.ZERO,e$2a.EPSILON8))return this.computeModelMatrix(e,r);var s=n.cartesianToCartographic(a,$$S);o===k$P.CLAMP_TO_GROUND?s.height=i:s.height+=i,a=n.cartographicToCartesian(s,a);var l=r$Z.getValueOrUndefined(this._orientation,e,x$_);return r=e$2b(l)?p$1d.fromRotationTranslation(p$1e.fromQuaternion(l,P$S),a,r):m$17.eastNorthUpToFixedFrame(a,void 0,r)},h$V.supportsMaterialsforEntitiesOnTerrain=function(e){return d$14.supportsMaterials(e)},h$V.supportsPolylinesOnTerrain=function(e){return g$11.isSupported(e)},h$V.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._polygonOffset.enabled=!0,o$1o.fromElements(e,t,this._polygonOffset.value)):(this._polygonOffset.enabled=!1,o$1o.fromElements(0,0,this._polygonOffset.value))};var e$1i={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2},R$Q=Object.freeze(e$1i),e$1h={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},S$O=Object.freeze(e$1h),e$1g={CENTER:0,LEFT:1,RIGHT:-1},j$T=Object.freeze(e$1g);function o$V(e,t,i,n,r){if(this.imageryLayer=e,this.x=t,this.y=i,this.level=n,this.request=void 0,0!==n){var o=t/2|0,a=i/2|0,s=n-1;this.parent=e.getImageryFromCache(o,a,s)}(this.state=wt$6.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,this.isMvtTexture=!1,this.cancelCount=0,!e$2b(r)&&e.imageryProvider.ready)&&(r=e.imageryProvider.tilingScheme.tileXYToRectangle(t,i,n));this.rectangle=r,this.discard=!1}function A$12(e,t,i,n){var r=t.getGeometry().getFlatCoordinates(),o=r[0],a=r[1],s=i[0]*o+i[2]*a+i[4],l=i[1]*o+i[3]*a+i[5],u=s/e._canvasWidth,c=l/e._canvasWidth,h=n.west+n.width*u,d=n.south+n.height*(1-c);return o$1p.fromRadians(h,d,100)}o$V.createPlaceholder=function(e){var t=new o$V(e,0,0,0);return t.addReference(),t.state=wt$6.PLACEHOLDER,t},o$V.prototype.addReference=function(){++this.referenceCount},o$V.prototype.releaseReference=function(){if(--this.referenceCount,0===this.referenceCount){if(this.imageryLayer.removeImageryFromCache(this),e$2b(this.parent)&&this.parent.releaseReference(),e$2b(this.image)&&e$2b(this.image.destroy)&&this.image.destroy(),this.release(),e$2b(this.texture)&&this.texture.destroy(),e$2b(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),e$2b(this.labelParent)){this.imageryLayer.kmlLayer.entities.remove(this.labelParent);for(var e=0,t=this.labelParent._children.length;e<t;e++)this.imageryLayer.kmlLayer.entities.remove(this.labelParent._children[e]);this.labelParent=void 0}if(e$2b(this.billboardParent)){this.imageryLayer.kmlLayer.entities.remove(this.billboardParent);for(e=0,t=this.billboardParent._children.length;e<t;e++)this.imageryLayer.kmlLayer.entities.remove(this.billboardParent._children[e]);this.billboardParent=void 0}return i$10(this),0}return this.referenceCount},new o$1o,new o$1p;var T$S=new o$Y;function m$T(e,t,i,n,r){this.bottomLeft=u$_(e,o$1o.ZERO),this.topRight=u$_(t,o$1o.ZERO),this.childNode1=i,this.childNode2=n,this.imageIndex=r}o$V.prototype.createLabel=function(e,t){for(var i=this.rectangle,n=this.transform,r=(t.length,0),o=t.length;r<o;r++){var a=t[r],s=a.feature,l=a.style,u=l.getText(),c=l.textSize,h=u.getText();if(""!==h){var d,f,p,_,m=u.getFont(m),g=c+"px "+m,x=u.getFill(),v=u.getStroke();e$2b(x)&&(d=x.getColor(),(d=e$1U.unpack(d)).alpha=1),e$2b(v)&&(f=v.getColor(),f=e$1U.unpack(f),p=v.getWidth(),_=R$Q.FILL_AND_OUTLINE);var y=this.labelParent;e$2b(y)||(this.labelParent=y=new h$V,this.labelParent.show=!1,e.kmlLayer.entities.add(y)),T$S.near=15e3,T$S.nearValue=2,T$S.far=1e7,T$S.farValue=0,e.kmlLayer.entities.add({parent:y,position:A$12(e.imageryProvider,s,n,i),label:{text:h,font:g,verticalOrigin:S$O.TOP,horizontalOrigin:j$T.LEFT,fillColor:d,outlineColor:f,outlineWidth:p,style:_,pixelOffset:new o$1o(0,2*-c),heightReference:k$P.CLAMP_TO_GROUND,scaleByDistance:T$S}})}}},o$V.prototype.createBillboard=function(e,t){for(var i=this.rectangle,n=this.transform,r=(t.length,0),o=t.length;r<o;r++){var a,s=t[r],l=s.feature,u=s.style.layout;if(e$2b(u)&&e$2b(u["icon-image"])){var c=u["icon-image"],h=u$_(u["icon-size"],1);if(e$2b(e._imageCanvas[c]))a=e._imageCanvas[c];else{var d=e.imageryProvider._subSpriteImage[c];if(!e$2b(d))continue;(a=document.createElement("canvas")).width=d.width,a.height=d.height,a.getContext("2d").putImageData(d,0,0),e._imageCanvas[c]=a}var f=this.billboardParent;e$2b(f)||(this.billboardParent=f=new h$V,e.kmlLayer.entities.add(f)),e.kmlLayer.entities.add({parent:f,position:A$12(e.imageryProvider,l,n,i),billboard:{image:a,scale:h,heightReference:k$P.CLAMP_TO_GROUND,pixelOffset:new o$1o(0,-a.height),scaleByDistance:new o$Y(1500,1.5,8e6,0)}})}}},o$V.prototype.processStateMachine=function(e,t,i){this.state===wt$6.UNLOADED&&!i&&!this.imageryLayer._pausing&&(this.state=wt$6.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===wt$6.TRANSITIONING&&e$2b(this.request)&&e$2b(this.beginRequestTime)&&performance.now()-this.beginRequestTime>r$1a.TIMEOUT&&this.request.cancel(),this.state===wt$6.RECEIVED&&(this.state=wt$6.TRANSITIONING,this.image,this.imageryLayer._createTexture(e.context,this,e));var n=this.state===wt$6.READY&&t&&!this.texture;(this.state===wt$6.TEXTURE_LOADED||n)&&(this.state=wt$6.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))},o$V.prototype.isDestroyed=function(){return!1},o$V.prototype.showLabelAndIcon=function(e){},o$V.prototype.setVisible=function(e){},o$V.prototype.release=function(){};var G$$=new o$1o(16,16);function v$I(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.borderWidthInPixels,1),i=u$_(e.initialSize,G$$);if(!e$2b(e.context))throw new t$16("context is required.");if(t<0)throw new t$16("borderWidthInPixels must be greater than or equal to zero.");if(i.x<1||i.y<1)throw new t$16("initialSize must be greater than zero.");this._context=e.context,this._pixelFormat=u$_(e.pixelFormat,V$10.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=e$1Q(),this._idHash={},this._initialSize=i,this._root=void 0}function Z$P(e,t){e._context;var i=e.numberOfImages,n=e._borderWidthInPixels;if(i>0){for(var r=e._texture.width,o=e._texture.height,a=2*(r+t.width+n),s=2*(o+t.height+n),l=r/a,u=o/s,c=new m$T(new o$1o(r+n,n),new o$1o(a,o)),h=new m$T(new o$1o,new o$1o(a,o),e._root,c),d=new m$T(new o$1o(n,o+n),new o$1o(a,s)),f=new m$T(new o$1o,new o$1o(a,s),h,d),p=0;p<e._textureCoordinates.length;p++){var _=e._textureCoordinates[p];e$2b(_)&&(_.x*=l,_.y*=u,_.width*=l,_.height*=u)}var m=new t$V({context:e._context,width:a,height:s,pixelFormat:e._pixelFormat});m.copyFromTexture(e._texture,0,0,0,0,a,s),e._texture=e._texture&&e._texture.destroy(),e._texture=m,e._root=f}else{var g=2*(t.width+2*n),x=2*(t.height+2*n);g<e._initialSize.x&&(g=e._initialSize.x),x<e._initialSize.y&&(x=e._initialSize.y),e._texture=e._texture&&e._texture.destroy(),e._texture=new t$V({context:e._context,width:g,height:x,pixelFormat:e._pixelFormat}),e._root=new m$T(new o$1o(n,n),new o$1o(g,x))}}function I$15(e,t,i){if(e$2b(t)){if(!e$2b(t.childNode1)&&!e$2b(t.childNode2)){if(e$2b(t.imageIndex))return;var n=t.topRight.x-t.bottomLeft.x,r=t.topRight.y-t.bottomLeft.y,o=n-i.width,a=r-i.height;if(o<0||a<0)return;if(0===o&&0===a)return t;if(o>a){t.childNode1=new m$T(new o$1o(t.bottomLeft.x,t.bottomLeft.y),new o$1o(t.bottomLeft.x+i.width,t.topRight.y));var s=t.bottomLeft.x+i.width+e._borderWidthInPixels;s<t.topRight.x&&(t.childNode2=new m$T(new o$1o(s,t.bottomLeft.y),new o$1o(t.topRight.x,t.topRight.y)))}else{t.childNode1=new m$T(new o$1o(t.bottomLeft.x,t.bottomLeft.y),new o$1o(t.topRight.x,t.bottomLeft.y+i.height));var l=t.bottomLeft.y+i.height+e._borderWidthInPixels;l<t.topRight.y&&(t.childNode2=new m$T(new o$1o(t.bottomLeft.x,l),new o$1o(t.topRight.x,t.topRight.y)))}return I$15(e,t.childNode1,i)}return I$15(e,t.childNode1,i)||I$15(e,t.childNode2,i)}}function C$X(e,t,i){var n=I$15(e,e._root,t);if(e$2b(n)){n.imageIndex=i;var r=e._texture.width,o=e._texture.height,a=n.topRight.x-n.bottomLeft.x,s=n.topRight.y-n.bottomLeft.y,l=n.bottomLeft.x/r,u=n.bottomLeft.y/o,c=a/r,h=s/o;e._textureCoordinates[i]=new f$18(l,u,c,h),e._texture.copyFrom(t,n.bottomLeft.x,n.bottomLeft.y)}else Z$P(e,t),C$X(e,t,i);e._guid=e$1Q()}Object.defineProperties(v$I.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},textureCoordinates:{get:function(){return this._textureCoordinates}},texture:{get:function(){return e$2b(this._texture)||(this._texture=new t$V({context:this._context,width:this._initialSize.x,height:this._initialSize.y,pixelFormat:this._pixelFormat})),this._texture}},numberOfImages:{get:function(){return this._textureCoordinates.length}},guid:{get:function(){return this._guid}}}),v$I.prototype.addImage=function(e,t){if(!e$2b(e))throw new t$16("id is required.");if(!e$2b(t))throw new t$16("image is required.");var i=this._idHash[e];if(e$2b(i))return i;if("function"==typeof t){if(!e$2b(t=t(e)))throw new t$16("image is required.")}else if("string"==typeof t||t instanceof t$11){t=t$11.createIfNeeded(t).fetchImage({preferImageBitmap:!!this._context.webgpu})}var n=this;return i=o$1l(t,(function(e){if(n.isDestroyed())return-1;var t=n.numberOfImages;return C$X(n,e,t),t})),this._idHash[e]=i,i},v$I.prototype.addSubRegion=function(e,t){if(!e$2b(e))throw new t$16("id is required.");if(!e$2b(t))throw new t$16("subRegion is required.");var i=this._idHash[e];if(!e$2b(i))throw new t$14('image with id "'+e+'" not found in the atlas.');var n=this;return o$1l(i,(function(e){if(-1===e)return-1;var i=n._texture.width,r=n._texture.height,o=n.numberOfImages,a=n._textureCoordinates[e],s=a.x+t.x/i,l=a.y+t.y/r,u=t.width/i,c=t.height/r;return n._textureCoordinates.push(new f$18(s,l,u,c)),n._guid=e$1Q(),o}))},v$I.prototype.addTextureCoordBounds=function(e){this._textureCoordinates.push(e)},v$I.prototype.isDestroyed=function(){return!1},v$I.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),i$10(this)};var _0x91cfdb=(_0xd3776e=!0,function(e,t){var i=_0xd3776e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd3776e=!1,i}),_0xa995b=_0x91cfdb(void 0,(function(){return _0xa995b.toString().search("(((.+)+)+)+$").toString().constructor(_0xa995b).search("(((.+)+)+)+$")})),_0xd3776e;_0xa995b();var _0x3818be=1,_0x3a607b=function(e,t){var i=t.pixelRatio,n=t.version,r=t.stretchX,o=t.stretchY,a=t.content;this.paddedRect=e,this.pixelRatio=i,this.stretchX=r,this.stretchY=o,this.content=a,this.version=n},_0x4309fc={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};_0x4309fc.tl.get=function(){return[this.paddedRect.x+_0x3818be,this.paddedRect.y+_0x3818be]},_0x4309fc.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-_0x3818be,this.paddedRect.y+this.paddedRect.h-_0x3818be]},_0x4309fc.tlbr.get=function(){return this.tl.concat(this.br)},_0x4309fc.displaySize.get=function(){return[(this.paddedRect.w-2*_0x3818be)/this.pixelRatio,(this.paddedRect.h-2*_0x3818be)/this.pixelRatio]},Object.defineProperties(_0x3a607b.prototype,_0x4309fc);var _0x2cd806=(_0x367db3=!0,function(e,t){var i=_0x367db3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x367db3=!1,i}),_0x5e692a=_0x2cd806(void 0,(function(){return _0x5e692a.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e692a).search("(((.+)+)+)+$")})),_0x367db3;_0x5e692a();var _0x86a665=function(e,t){_0x229c14(this,e,4,t)};function _0x229c14(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function _0x5d4357(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=_0x229c14({},{width:n,height:r},i);_0x20df73(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function _0x20df73(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)return console.log("out of range source coordinates for image copy"),t;if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)return console.log("out of range destination coordinates for image copy"),t;for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}function W$U(e){for(var t=0,i=0,n=0,r=e;n<r.length;n+=1){var o=r[n];t+=o.w*o.h,i=Math.max(i,o.w)}e.sort((function(e,t){return t.h-e.h}));for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}],s=0,l=0,u=0,c=e;u<c.length;u+=1)for(var h=c[u],d=a.length-1;d>=0;d--){var f=a[d];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var p=a.pop();d<a.length&&(a[d]=p)}else h.h===f.h?(f.x+=h.w,f.w-=h.w):h.w===f.w?(f.y+=h.h,f.h-=h.h):(a.push({x:f.x+h.w,y:f.y,w:f.w-h.w,h:h.h}),f.y+=h.h,f.h-=h.h);break}}return{w:s,h:l,fill:t/(s*l)||0}}_0x86a665.prototype.resize=function(e){_0x5d4357(this,e,4)},_0x86a665.prototype.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},_0x86a665.prototype.clone=function(){return new _0x86a665({width:this.width,height:this.height},new Uint8Array(this.data))},_0x86a665.copy=function(e,t,i,n,r){_0x20df73(e,t,i,n,r,4)};var _0x23ffe0=(_0xfbb055=!0,function(e,t){var i=_0xfbb055?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xfbb055=!1,i}),_0x4d7e6c=_0x23ffe0(void 0,(function(){return _0x4d7e6c.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d7e6c).search("(((.+)+)+)+$")})),_0xfbb055;_0x4d7e6c();var _0x1bc573=1,_0x7f7567=function(e,t){var i={},n={};this.haveRenderCallbacks=[];var r=[];this.addImages(e,i,r),this.addImages(t,n,r);var o=W$U(r),a=o.w,s=o.h,l=new _0x86a665({width:a||1,height:s||1});for(var u in e){var c=e[u],h=i[u].paddedRect;_0x86a665.copy(c.data,l,{x:0,y:0},{x:h.x+_0x1bc573,y:h.y+_0x1bc573},c.data)}for(var d in t){var f=t[d],p=n[d].paddedRect,_=p.x+_0x1bc573,m=p.y+_0x1bc573,g=f.data.width,x=f.data.height;_0x86a665.copy(f.data,l,{x:0,y:0},{x:_,y:m},f.data),_0x86a665.copy(f.data,l,{x:0,y:x-1},{x:_,y:m-1},{width:g,height:1}),_0x86a665.copy(f.data,l,{x:0,y:0},{x:_,y:m+x},{width:g,height:1}),_0x86a665.copy(f.data,l,{x:g-1,y:0},{x:_-1,y:m},{width:1,height:x}),_0x86a665.copy(f.data,l,{x:0,y:0},{x:_+g,y:m},{width:1,height:x})}this.image=l,this.iconPositions=i,this.patternPositions=n};_0x7f7567.prototype.addImages=function(e,t,i){for(var n in e){var r=e[n],o={x:0,y:0,w:r.data.width+2*_0x1bc573,h:r.data.height+2*_0x1bc573};i.push(o),t[n]=new _0x3a607b(o,r),r.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},_0x7f7567.prototype.patchUpdatedImages=function(e,t){for(var i in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[i],e.getImage(i),t),this.patchUpdatedImage(this.patternPositions[i],e.getImage(i),t)},_0x7f7567.prototype.patchUpdatedImage=function(e,t,i){if(e&&t&&e.version!==t.version){e.version=t.version;var n=e.tl,r=n[0],o=n[1];i.update(t.data,void 0,{x:r,y:o})}};var _0x5a929f=(_0x53dff0=!0,function(e,t){var i=_0x53dff0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53dff0=!1,i}),_0x5eaf14=_0x5a929f(void 0,(function(){return _0x5eaf14.toString().search("(((.+)+)+)+$").toString().constructor(_0x5eaf14).search("(((.+)+)+)+$")})),_0x53dff0;_0x5eaf14();var _0x40aaf7={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function _0x1d3b1b(e){return(e=Math.round(e))<0?0:e>255?255:e}function _0x5a0734(e){return e<0?0:e>1?1:e}function _0x24e54e(e){return"%"===e[e.length-1]?_0x1d3b1b(parseFloat(e)/100*255):_0x1d3b1b(parseInt(e))}function _0x50f432(e){return"%"===e[e.length-1]?_0x5a0734(parseFloat(e)/100):_0x5a0734(parseFloat(e))}function _0x5ba3e9(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function _0x16a51b(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in _0x40aaf7)return _0x40aaf7[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===i.length){var o=i.substr(0,n),a=i.substr(n+1,r-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=_0x50f432(a.pop());case"rgb":return 3!==a.length?null:[_0x24e54e(a[0]),_0x24e54e(a[1]),_0x24e54e(a[2]),s];case"hsla":if(4!==a.length)return null;s=_0x50f432(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=_0x50f432(a[1]),c=_0x50f432(a[2]),h=c<=.5?c*(u+1):c+u-c*u,d=2*c-h;return[_0x1d3b1b(255*_0x5ba3e9(d,h,l+1/3)),_0x1d3b1b(255*_0x5ba3e9(d,h,l)),_0x1d3b1b(255*_0x5ba3e9(d,h,l-1/3)),s];default:return null}}return null}const _0x50ffb1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xeab9b8=_0x50ffb1(void 0,(function(){return _0xeab9b8.toString().search("(((.+)+)+)+$").toString().constructor(_0xeab9b8).search("(((.+)+)+)+$")}));_0xeab9b8();class _0x128d69{constructor(e,t,i,n=1){this.r=e,this.g=t,this.b=i,this.a=n}static parse(e){if(!e)return;if(e instanceof _0x128d69)return e;if("string"!=typeof e)return;const t=_0x16a51b(e);return t?new _0x128d69(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,i,n]=this.toArray();return"rgba("+Math.round(e)+","+Math.round(t)+","+Math.round(i)+","+n+")"}toArray(){const{r:e,g:t,b:i,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*i/n,n]}}_0x128d69.black=new _0x128d69(0,0,0,1),_0x128d69.white=new _0x128d69(1,1,1,1),_0x128d69.transparent=new _0x128d69(0,0,0,0),_0x128d69.red=new _0x128d69(1,0,0,1);var _0x41823f={kind:"null"},_0x293305={kind:"number"},_0x26738c={kind:"string"},_0x3e476a={kind:"boolean"},_0xb02f33={kind:"color"},_0xd44bf0={kind:"object"},_0x3cf6ba={kind:"value"},_0x104a43={kind:"formatted"},_0x49bb9f={kind:"resolvedImage"};function _0x442c66(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));return r(),{kind:"array",itemType:e,N:t}}function _0x134948(e){if("array"===e.kind){var t=_0x134948(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var _0x5a1ca4=[_0x41823f,_0x293305,_0x26738c,_0x3e476a,_0xb02f33,_0x104a43,_0xd44bf0,_0x442c66(_0x3cf6ba),_0x49bb9f];function _0x3dc850(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!_0x3dc850(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var i=0,n=_0x5a1ca4;i<n.length;i+=1){if(!_0x3dc850(n[i],t))return null}}return"Expected "+_0x134948(e)+" but found "+_0x134948(t)+" instead."}var _0x55b891=(_0x37c1d0=!0,function(e,t){var i=_0x37c1d0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37c1d0=!1,i}),_0x5a9dd8=_0x55b891(void 0,(function(){return _0x5a9dd8.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a9dd8).search("(((.+)+)+)+$")})),_0x37c1d0;_0x5a9dd8();var _0x1bd8bd=function(e,t,i){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};_0x1bd8bd.prototype.compare=function(e,t){return this.collator.compare(e,t)},_0x1bd8bd.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var _0x55dc4a=(_0x4d490a=!0,function(e,t){var i=_0x4d490a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d490a=!1,i}),_0xf2b738=_0x55dc4a(void 0,(function(){return _0xf2b738.toString().search("(((.+)+)+)+$").toString().constructor(_0xf2b738).search("(((.+)+)+)+$")})),_0x4d490a;_0xf2b738();var _0x5c9bfa=function(e,t,i,n,r){this.text=e,this.image=t,this.scale=i,this.fontStack=n,this.textColor=r},_0x4b7edb=(_0x5d6b22=!0,function(e,t){var i=_0x5d6b22?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d6b22=!1,i}),_0xe0431f=_0x4b7edb(void 0,(function(){return _0xe0431f.toString().search("(((.+)+)+)+$").toString().constructor(_0xe0431f).search("(((.+)+)+)+$")})),_0x5d6b22;_0xe0431f();var _0x2683dd=function(e){this.sections=e};_0x2683dd.fromString=function(e){return new _0x2683dd([new _0x5c9bfa(e,null,null,null,null)])},_0x2683dd.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},_0x2683dd.factory=function(e){return e instanceof _0x2683dd?e:_0x2683dd.fromString(e)},_0x2683dd.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},_0x2683dd.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];if(n.image)e.push(["image",n.image.name]);else{e.push(n.text);var r={};n.fontStack&&(r["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(r["font-scale"]=n.scale),n.textColor&&(r["text-color"]=["rgba"].concat(n.textColor.toArray())),e.push(r)}}return e};var _0x3a468e=(_0x5ca3c5=!0,function(e,t){var i=_0x5ca3c5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ca3c5=!1,i}),_0x3d6abf=_0x3a468e(void 0,(function(){return _0x3d6abf.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d6abf).search("(((.+)+)+)+$")})),_0x5ca3c5;_0x3d6abf();var _0x313b86=function(e){this.name=e.name,this.available=e.available};_0x313b86.prototype.toString=function(){return this.name},_0x313b86.fromString=function(e){return new _0x313b86({name:e,available:!1})},_0x313b86.prototype.serialize=function(){return["image",this.name]};var _0x1cb574=(_0x422731=!0,function(e,t){var i=_0x422731?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x422731=!1,i}),_0x9c1981=_0x1cb574(void 0,(function(){return _0x9c1981.toString().search("(((.+)+)+)+$").toString().constructor(_0x9c1981).search("(((.+)+)+)+$")})),_0x422731;_0x9c1981();var _0x29722c={kind:"null"},_0xf70462={kind:"number"},_0x231ca0={kind:"string"},_0x3ce714={kind:"boolean"},_0x353126={kind:"color"},_0x1c524d={kind:"object"},_0x59802d={kind:"value"},_0x598a2d={kind:"collator"},_0x151667={kind:"formatted"},_0x5d2b47={kind:"resolvedImage"};function _0x4b6bfd(e,t){return{kind:"array",itemType:e,N:t}}function _0x4150fb(){}_0x4150fb.validateRGBA=function(e,t,i,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,i,n]:[e,t,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."},_0x4150fb.isValue=function(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof _0x128d69)return!0;if(e instanceof _0x1bd8bd)return!0;if(e instanceof _0x2683dd)return!0;if(e instanceof _0x313b86)return!0;if(Array.isArray(e)){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(!_0x4150fb.isValue(n))return!1}return!0}if("object"==typeof e){for(var r in e)if(!_0x4150fb.isValue(e[r]))return!1;return!0}return!1},_0x4150fb.typeOf=function(e){if(null===e)return _0x29722c;if("string"==typeof e)return _0x231ca0;if("boolean"==typeof e)return _0x3ce714;if("number"==typeof e)return _0xf70462;if(e instanceof _0x128d69)return _0x353126;if(e instanceof _0x1bd8bd)return _0x598a2d;if(e instanceof _0x2683dd)return _0x151667;if(e instanceof _0x313b86)return _0x5d2b47;if(Array.isArray(e)){for(var t,i=e.length,n=0,r=e;n<r.length;n+=1){var o=r[n],a=_0x4150fb.typeOf(o);if(t){if(t===a)continue;t=_0x59802d;break}t=a}return _0x4b6bfd(t||_0x59802d,i)}return _0x1c524d},_0x4150fb.toString$1=function(e){var t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof _0x128d69||e instanceof _0x2683dd||e instanceof _0x313b86?e.toString():JSON.stringify(e)};var _0x550ef6=(_0x2c9839=!0,function(e,t){var i=_0x2c9839?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c9839=!1,i}),_0x216e12=_0x550ef6(void 0,(function(){return _0x216e12.toString().search("(((.+)+)+)+$").toString().constructor(_0x216e12).search("(((.+)+)+)+$")})),_0x2c9839;_0x216e12();var _0x4a919c={kind:"number"},_0x6f17d7={kind:"string"},_0x694299={kind:"boolean"},_0x468930={kind:"object"},_0x488a70={kind:"value"};function _0x197241(e,t){return{kind:"array",itemType:e,N:t}}var _0x1f6395={string:_0x6f17d7,number:_0x4a919c,boolean:_0x694299,object:_0x468930},_0x58f6bf=function(e,t){this.type=e,this.args=t};_0x58f6bf.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i,n=1,r=e[0];if("array"===r){var o,a;if(e.length>2){var s=e[1];if("string"!=typeof s||!(s in _0x1f6395)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=_0x1f6395[s],n++}else o=_0x488a70;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}i=_0x197241(o,a)}else i=_0x1f6395[r];for(var l=[];n<e.length;n++){var u=t.parse(e[n],n,_0x488a70);if(!u)return null;l.push(u)}return new _0x58f6bf(i,l)},_0x58f6bf.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var i=this.args[t].evaluate(e);if(!_0x3dc850(this.type,_0x4150fb.typeOf(i)))return i;if(t===this.args.length-1)throw new RuntimeError("Expected value to be of type "+toString(this.type)+", but found "+toString(_0x4150fb.typeOf(i))+" instead.")}return null},_0x58f6bf.prototype.eachChild=function(e){this.args.forEach(e)},_0x58f6bf.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},_0x58f6bf.prototype.serialize=function(){var e=this.type,t=[e.kind];if("array"===e.kind){var i=e.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){t.push(i.kind);var n=e.N;("number"==typeof n||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var _0x5b0fee=(_0x4bf18e=!0,function(e,t){var i=_0x4bf18e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4bf18e=!1,i}),_0x45f075=_0x5b0fee(void 0,(function(){return _0x45f075.toString().search("(((.+)+)+)+$").toString().constructor(_0x45f075).search("(((.+)+)+)+$")})),_0x4bf18e;_0x45f075();var _0x7978d6={kind:"number"},_0x483433={kind:"value"};function _0x163f9a(e,t){return{kind:"array",itemType:e,N:t}}var _0x27c3dc=function(e,t,i){this.type=e,this.index=t,this.input=i};_0x27c3dc.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,_0x7978d6),n=t.parse(e[2],2,_0x163f9a(t.expectedType||_0x483433));if(!i||!n)return null;var r=n.type;return new _0x27c3dc(r.itemType,i,n)},_0x27c3dc.prototype.evaluate=function(e){var t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new RuntimeError("Array index out of bounds: "+t+" < 0.");if(t>=i.length)throw new RuntimeError("Array index out of bounds: "+t+" > "+(i.length-1)+".");if(t!==Math.floor(t))throw new RuntimeError("Array index must be an integer, but found "+t+" instead.");return i[t]},_0x27c3dc.prototype.eachChild=function(e){e(this.index),e(this.input)},_0x27c3dc.prototype.possibleOutputs=function(){return[void 0]},_0x27c3dc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var _0x422043=(_0x464e15=!0,function(e,t){var i=_0x464e15?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x464e15=!1,i}),_0x5cba47=_0x422043(void 0,(function(){return _0x5cba47.toString().search("(((.+)+)+)+$").toString().constructor(_0x5cba47).search("(((.+)+)+)+$")})),_0x464e15;_0x5cba47();var _0x2994d7={kind:"boolean"},_0x546e21=function(e,t,i){this.type=e,this.branches=t,this.otherwise=i};_0x546e21.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var i;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(var n=[],r=1;r<e.length-1;r+=2){var o=t.parse(e[r],r,_0x2994d7);if(!o)return null;var a=t.parse(e[r+1],r+1,i);if(!a)return null;n.push([o,a]),i=i||a.type}var s=t.parse(e[e.length-1],e.length-1,i);return s?new _0x546e21(i,n,s):null},_0x546e21.prototype.evaluate=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];if(r.evaluate(e))return o.evaluate(e)}return this.otherwise.evaluate(e)},_0x546e21.prototype.eachChild=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e(r),e(o)}e(this.otherwise)},_0x546e21.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.branches.map((function(e){return e[0],e[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},_0x546e21.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x151606=(_0x535f13=!0,function(e,t){var i=_0x535f13?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x535f13=!1,i}),_0x13b3f4=_0x151606(void 0,(function(){return _0x13b3f4.toString().search("(((.+)+)+)+$").toString().constructor(_0x13b3f4).search("(((.+)+)+)+$")})),_0x535f13;_0x13b3f4();var _0x4a25b7={kind:"value"},_0x3af8aa=function(e,t){this.type=e,this.args=t};_0x3af8aa.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var i=null,n=t.expectedType;n&&"value"!==n.kind&&(i=n);for(var r=[],o=0,a=e.slice(1);o<a.length;o+=1){var s=a[o],l=t.parse(s,1+r.length,i,void 0,{typeAnnotation:"omit"});if(!l)return null;i=i||l.type,r.push(l)}var u=n&&r.some((function(e){return _0x3dc850(n,e.type)}));return new _0x3af8aa(u?_0x4a25b7:i,r)},_0x3af8aa.prototype.evaluate=function(e){for(var t,i=null,n=0,r=0,o=this.args;r<o.length;r+=1){if(n++,(i=o[r].evaluate(e))&&i instanceof _0x313b86&&!i.available&&(!t&&(t=i.name),i=null,n===this.args.length&&(i=t)),null!==i)break}return i},_0x3af8aa.prototype.eachChild=function(e){this.args.forEach(e)},_0x3af8aa.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},_0x3af8aa.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x1a99ce=(_0x231ffd=!0,function(e,t){var i=_0x231ffd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x231ffd=!1,i}),_0x1a604e=_0x1a99ce(void 0,(function(){return _0x1a604e.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a604e).search("(((.+)+)+)+$")})),_0x231ffd;_0x1a604e();var _0x23d5cb={kind:"number"},_0x220e68={kind:"string"},_0x119b7d={kind:"boolean"},_0x429833={kind:"color"},_0xcf406a={kind:"value"},_0x40aa51={"to-boolean":_0x119b7d,"to-color":_0x429833,"to-number":_0x23d5cb,"to-string":_0x220e68},_0x3aa4b5=function(e,t){this.type=e,this.args=t};_0x3aa4b5.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[0];if(("to-boolean"===i||"to-string"===i)&&2!==e.length)return t.error("Expected one argument.");for(var n=_0x40aa51[i],r=[],o=1;o<e.length;o++){var a=t.parse(e[o],o,_0xcf406a);if(!a)return null;r.push(a)}return new _0x3aa4b5(n,r)},_0x3aa4b5.prototype.evaluate=function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){for(var t,i,n=0,r=this.args;n<r.length;n+=1){if(i=null,(t=r[n].evaluate(e))instanceof _0x128d69)return t;if("string"==typeof t){var o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&!(i=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":validateRGBA(t[0],t[1],t[2],t[3])))return new _0x128d69(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new RuntimeError(i||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null===(a=l[s].evaluate(e)))return 0;var u=Number(a);if(!isNaN(u))return u}throw new RuntimeError("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?Formatted.fromString(_0x4150fb.toString$1(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?_0x313b86.fromString(_0x4150fb.toString$1(this.args[0].evaluate(e))):_0x4150fb.toString$1(this.args[0].evaluate(e))},_0x3aa4b5.prototype.eachChild=function(e){this.args.forEach(e)},_0x3aa4b5.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},_0x3aa4b5.prototype.serialize=function(){if("formatted"===this.type.kind)return new FormatExpression([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ImageExpression(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x439480=(_0x322898=!0,function(e,t){var i=_0x322898?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x322898=!1,i}),_0x59bdb3=_0x439480(void 0,(function(){return _0x59bdb3.toString().search("(((.+)+)+)+$").toString().constructor(_0x59bdb3).search("(((.+)+)+)+$")})),_0x322898;_0x59bdb3();var _0x3fcdc4={kind:"string"},_0xd0110={kind:"boolean"},_0x5a869b={kind:"collator"},_0x2aa3c9=function(e,t,i){this.type=_0x5a869b,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=t};_0x2aa3c9.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var i=e[1];if("object"!=typeof i||Array.isArray(i))return t.error("Collator options argument must be an object.");var n=t.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,_0xd0110);if(!n)return null;var r=t.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,_0xd0110);if(!r)return null;var o=null;return i.locale&&!(o=t.parse(i.locale,1,_0x3fcdc4))?null:new _0x2aa3c9(n,r,o)},_0x2aa3c9.prototype.evaluate=function(e){return new _0x1bd8bd(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},_0x2aa3c9.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},_0x2aa3c9.prototype.possibleOutputs=function(){return[void 0]},_0x2aa3c9.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var _0x31c81e={kind:"boolean"},_0x28652f={kind:"value"},_0x1ce745={kind:"collator"};function _0x46ea1b(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function _0x18de7d(e,t,i){return t===i}function _0x129694(e,t,i){return t!==i}function _0x3439af(e,t,i){return t<i}function _0x486d19(e,t,i){return t>i}function _0xf5bb5b(e,t,i){return t<=i}function _0x1c8867(e,t,i){return t>=i}function _0x1142e0(e,t,i,n){return 0===n.compare(t,i)}function _0x28b2ea(e,t,i,n){return!_0x1142e0(e,t,i,n)}function _0x15eade(e,t,i,n){return n.compare(t,i)<0}function _0x5aa41d(e,t,i,n){return n.compare(t,i)>0}function _0x460363(e,t,i,n){return n.compare(t,i)<=0}function _0x5d8fda(e,t,i,n){return n.compare(t,i)>=0}function _0x280644(e,t,i){var n,r=(n=!0,function(e,t){var i=n?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}),o="=="!==e&&"!="!==e;return function(){var n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function a(e,t,i){this.type=_0x31c81e,this.lhs=e,this.rhs=t,this.collator=i,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return n(),a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var i=e[0],n=t.parse(e[1],1,_0x28652f);if(!n)return null;if(!_0x46ea1b(i,n.type))return t.concat(1).error('"'+i+"\" comparisons are not supported for type '"+toString(n.type)+"'.");var r=t.parse(e[2],2,_0x28652f);if(!r)return null;if(!_0x46ea1b(i,r.type))return t.concat(2).error('"'+i+"\" comparisons are not supported for type '"+toString(r.type)+"'.");if(n.type.kind!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot compare types '"+toString(n.type)+"' and '"+toString(r.type)+"'.");o&&("value"===n.type.kind&&"value"!==r.type.kind?n=new _0x58f6bf(r.type,[n]):"value"!==n.type.kind&&"value"===r.type.kind&&(r=new _0x58f6bf(n.type,[r])));var s=null;if(4===e.length){if("string"!==n.type.kind&&"string"!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,_0x1ce745)))return null}return new a(n,r,s)},a.prototype.evaluate=function(n){var r=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(o&&this.hasUntypedArgument){var s=_0x4150fb.typeOf(r),l=_0x4150fb.typeOf(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new RuntimeError('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!o&&this.hasUntypedArgument){var u=_0x4150fb.typeOf(r),c=_0x4150fb.typeOf(a);if("string"!==u.kind||"string"!==c.kind)return t(n,r,a)}return this.collator?i(n,r,a,this.collator.evaluate(n)):t(n,r,a)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.possibleOutputs=function(){return[!0,!1]},a.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},a}()}var _0x208527={};_0x208527.Equals=_0x280644("==",_0x18de7d,_0x1142e0),_0x208527.NotEquals=_0x280644("!=",_0x129694,_0x28b2ea),_0x208527.LessThan=_0x280644("<",_0x3439af,_0x15eade),_0x208527.GreaterThan=_0x280644(">",_0x486d19,_0x5aa41d),_0x208527.LessThanOrEqual=_0x280644("<=",_0xf5bb5b,_0x460363),_0x208527.GreaterThanOrEqual=_0x280644(">=",_0x1c8867,_0x5d8fda);var _0x52c45f=(_0x1bff25=!0,function(e,t){var i=_0x1bff25?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1bff25=!1,i}),_0x583f0b=_0x52c45f(void 0,(function(){return _0x583f0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x583f0b).search("(((.+)+)+)+$")})),_0x1bff25;_0x583f0b();var _0x1a17c5={kind:"number"},_0x14f571={kind:"string"},_0x5049fb={kind:"color"},_0x3284d2={kind:"value"},_0x19c007={kind:"formatted"},_0x27ba1f={kind:"resolvedImage"};function _0x424ccc(e,t){return{kind:"array",itemType:e,N:t}}var _0x252262=function(e){this.type=_0x19c007,this.sections=e};_0x252262.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[1];if(!Array.isArray(i)&&"object"==typeof i)return t.error("First argument must be an image or text section.");for(var n=[],r=!1,o=1;o<=e.length-1;++o){var a=e[o];if(r&&"object"==typeof a&&!Array.isArray(a)){r=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,_0x1a17c5)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,_0x424ccc(_0x14f571))))return null;var u=null;if(a["text-color"]&&!(u=t.parse(a["text-color"],1,_0x5049fb)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var h=t.parse(e[o],1,_0x3284d2);if(!h)return null;var d=h.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new _0x252262(n)},_0x252262.prototype.evaluate=function(e){return new _0x2683dd(this.sections.map((function(t){var i=t.content.evaluate(e);return _0x4150fb.typeOf(i)===_0x27ba1f?new _0x5c9bfa("",i,null,null,null):new _0x5c9bfa(_0x4150fb.toString$1(i),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},_0x252262.prototype.eachChild=function(e){for(var t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e(n.content),n.scale&&e(n.scale),n.font&&e(n.font),n.textColor&&e(n.textColor)}},_0x252262.prototype.possibleOutputs=function(){return[void 0]},_0x252262.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e.push(n.content.serialize());var r={};n.scale&&(r["font-scale"]=n.scale.serialize()),n.font&&(r["text-font"]=n.font.serialize()),n.textColor&&(r["text-color"]=n.textColor.serialize()),e.push(r)}return e};var _0x475c80=(_0x4bf61e=!0,function(e,t){var i=_0x4bf61e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4bf61e=!1,i}),_0x3c0e01=_0x475c80(void 0,(function(){return _0x3c0e01.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c0e01).search("(((.+)+)+)+$")})),_0x4bf61e;_0x3c0e01();var _0x368da3={kind:"string"},_0x192dfa={kind:"resolvedImage"},_0x306686=function(e){this.type=_0x192dfa,this.input=e};_0x306686.parse=function(e,t){if(2!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,_0x368da3);return i?new _0x306686(i):t.error("No image name provided.")},_0x306686.prototype.evaluate=function(e){var t=this.input.evaluate(e),i=!1;return e.availableImages&&e.availableImages.indexOf(t)>-1&&(i=!0),new _0x313b86({name:t,available:i})},_0x306686.prototype.eachChild=function(e){e(this.input)},_0x306686.prototype.possibleOutputs=function(){return[void 0]},_0x306686.prototype.serialize=function(){return["image",this.input.serialize()]};var _0x5a85a5=(_0x4ab1eb=!0,function(e,t){var i=_0x4ab1eb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4ab1eb=!1,i}),_0x17d2e5=_0x5a85a5(void 0,(function(){return _0x17d2e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x17d2e5).search("(((.+)+)+)+$")})),_0x4ab1eb;_0x17d2e5();var _0x29d6fe=function(e,t,i,n,r){this.type=e,this.operator=t,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=r;o<a.length;o+=1){var s=a[o],l=s[0],u=s[1];this.labels.push(l),this.outputs.push(u)}},_0x47dd67={kind:"number"},_0x40417d={kind:"color"};function _0x545277(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}_0x29d6fe.interpolationFactor=function(e,t,i,n){var r=0;if("exponential"===e.name)r=_0x545277(t,e.base,i,n);else if("linear"===e.name)r=_0x545277(t,1,i,n);else if("cubic-bezier"===e.name){var o=e.controlPoints;r=new unitbezier(o[0],o[1],o[2],o[3]).solve(_0x545277(t,1,i,n))}return r},_0x29d6fe.parse=function(e,t){var i=e[0],n=e[1],r=e[2],o=e.slice(3);if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var a=n[1];if("number"!=typeof a)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:a}}else{if("cubic-bezier"!==n[0])return t.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some((function(e){return"number"!=typeof e||e<0||e>1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(r=t.parse(r,2,_0x47dd67)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=_0x40417d:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c<o.length;c+=2){var h=o[c],d=o[c+1],f=c+3,p=c+4;if("number"!=typeof h)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var _=t.parse(d,p,u);if(!_)return null;u=u||_.type,l.push([h,_])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new _0x29d6fe(u,i,n,r,l):t.error("Type "+toString(u)+" is not interpolatable.")},_0x29d6fe.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;if(n>=t[r-1])return i[r-1].evaluate(e);var o=findStopLessThanOrEqualTo(t,n),a=t[o],s=t[o+1],l=_0x29d6fe.interpolationFactor(this.interpolation,n,a,s),u=i[o].evaluate(e),c=i[o+1].evaluate(e);return"interpolate"===this.operator?interpolate[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?hcl.reverse(hcl.interpolate(hcl.forward(u),hcl.forward(c),l)):lab.reverse(lab.interpolate(lab.forward(u),lab.forward(c),l))},_0x29d6fe.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1){e(i[t])}},_0x29d6fe.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},_0x29d6fe.prototype.serialize=function(){var e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],i=0;i<this.labels.length;i++)t.push(this.labels[i],this.outputs[i].serialize());return t};var _0x4bd9d9=(_0x2138f0=!0,function(e,t){var i=_0x2138f0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2138f0=!1,i}),_0x3a84f7=_0x4bd9d9(void 0,(function(){return _0x3a84f7.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a84f7).search("(((.+)+)+)+$")})),_0x2138f0;_0x3a84f7();var _0x56ca2c={kind:"boolean"},_0x1010ef={kind:"value"};function _0x3bcc32(e){return"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind}function _0xe9e232(e){return"boolean"==typeof e||"string"==typeof e||"number"==typeof e}function _0x2a2438(e){return Array.isArray(e)||"string"==typeof e}var _0xed36fe=function(e,t){this.type=_0x56ca2c,this.needle=e,this.haystack=t};_0xed36fe.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,_0x1010ef),n=t.parse(e[2],2,_0x1010ef);return i&&n?_0x3bcc32(i.type)?new _0xed36fe(i,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+toString(i.type)+" instead"):null},_0xed36fe.prototype.evaluate=function(e){var t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!t||!i)return!1;if(!_0xe9e232(t))throw new RuntimeError("Expected first argument to be of type boolean, string or number, but found "+toString(typeOf(t))+" instead.");if(!_0x2a2438(i))throw new RuntimeError("Expected second argument to be of type array or string, but found "+toString(typeOf(i))+" instead.");return i.indexOf(t)>=0},_0xed36fe.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},_0xed36fe.prototype.possibleOutputs=function(){return[!0,!1]},_0xed36fe.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var _0x35a661=(_0x2fb5cd=!0,function(e,t){var i=_0x2fb5cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2fb5cd=!1,i}),_0x5717e8=_0x35a661(void 0,(function(){return _0x5717e8.toString().search("(((.+)+)+)+$").toString().constructor(_0x5717e8).search("(((.+)+)+)+$")})),_0x2fb5cd;_0x5717e8();var _0x23621d=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};_0x23621d.prototype.evaluate=function(e){return this.result.evaluate(e)},_0x23621d.prototype.eachChild=function(e){for(var t=0,i=this.bindings;t<i.length;t+=1){e(i[t][1])}e(this.result)},_0x23621d.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var i=[],n=1;n<e.length-1;n+=2){var r=e[n];if("string"!=typeof r)return t.error("Expected string, but found "+typeof r+" instead.",n);if(/[^a-zA-Z0-9_]/.test(r))return t.error("Variable names must contain only alphanumeric characters or '_'.",n);var o=t.parse(e[n+1],n+1);if(!o)return null;i.push([r,o])}var a=t.parse(e[e.length-1],e.length-1,t.expectedType,i);return a?new _0x23621d(i,a):null},_0x23621d.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},_0x23621d.prototype.serialize=function(){for(var e=["let"],t=0,i=this.bindings;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e.push(r,o.serialize())}return e.push(this.result.serialize()),e};var _0x3d28f3=(_0x1ef4b4=!0,function(e,t){var i=_0x1ef4b4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ef4b4=!1,i}),_0x2b9367=_0x3d28f3(void 0,(function(){return _0x2b9367.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b9367).search("(((.+)+)+)+$")})),_0x1ef4b4;_0x2b9367();var _0x16b180={kind:"number"},_0x4eb776=function(e){this.type=_0x16b180,this.input=e};_0x4eb776.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?t.error("Expected argument of type string or array, but found "+toString(i.type)+" instead."):new _0x4eb776(i):null},_0x4eb776.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new RuntimeError("Expected value to be of type string or array, but found "+toString(typeOf(t))+" instead.")},_0x4eb776.prototype.eachChild=function(e){e(this.input)},_0x4eb776.prototype.possibleOutputs=function(){return[void 0]},_0x4eb776.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x5bde2b=(_0x53878b=!0,function(e,t){var i=_0x53878b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53878b=!1,i}),_0x127582=_0x5bde2b(void 0,(function(){return _0x127582.toString().search("(((.+)+)+)+$").toString().constructor(_0x127582).search("(((.+)+)+)+$")})),_0x53878b;_0x127582();var _0x119c28=function(e,t){this.type=e,this.value=t};_0x119c28.parse=function(e,t){if(2!==e.length)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!_0x4150fb.isValue(e[1]))return t.error("invalid value");var i=e[1],n=_0x4150fb.typeOf(i),r=t.expectedType;return"array"===n.kind&&0===n.N&&r&&"array"===r.kind&&("number"!=typeof r.N||0===r.N)&&(n=r),new _0x119c28(n,i)},_0x119c28.prototype.evaluate=function(){return this.value},_0x119c28.prototype.eachChild=function(){},_0x119c28.prototype.possibleOutputs=function(){return[this.value]},_0x119c28.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Color?["rgba"].concat(this.value.toArray()):this.value instanceof _0x2683dd?this.value.serialize():this.value};var _0x11af61=(_0x81432a=!0,function(e,t){var i=_0x81432a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x81432a=!1,i}),_0xe0547e=_0x11af61(void 0,(function(){return _0xe0547e.toString().search("(((.+)+)+)+$").toString().constructor(_0xe0547e).search("(((.+)+)+)+$")})),_0x81432a;_0xe0547e();var _0x3bc402={kind:"value"},_0x4bc22e=function(e,t,i,n,r,o){this.inputType=e,this.type=t,this.input=i,this.cases=n,this.outputs=r,this.otherwise=o};_0x4bc22e.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var i,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var r={},o=[],a=2;a<e.length-1;a+=2){var s=e[a],l=e[a+1];!Array.isArray(s)&&(s=[s]);var u=t.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,h=s;c<h.length;c+=1){var d=h[c];if("number"!=typeof d&&"string"!=typeof d)return u.error("Branch labels must be numbers or strings.");if("number"==typeof d&&Math.abs(d)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,_0x4150fb.typeOf(d)))return null}else i=_0x4150fb.typeOf(d);if(void 0!==r[String(d)])return u.error("Branch labels must be unique.");r[String(d)]=o.length}var f=t.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var p=t.parse(e[1],1,_0x3bc402);if(!p)return null;var _=t.parse(e[e.length-1],e.length-1,n);return _?"value"!==p.type.kind&&t.concat(1).checkSubtype(i,p.type)?null:new _0x4bc22e(i,n,p,r,o,_):null},_0x4bc22e.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(_0x4150fb.typeOf(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},_0x4bc22e.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},_0x4bc22e.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},_0x4bc22e.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],i=[],n={},r=0,o=Object.keys(this.cases).sort();r<o.length;r+=1){var a=o[r];void 0===(h=n[this.cases[a]])?(n[this.cases[a]]=i.length,i.push([this.cases[a],[a]])):i[h][1].push(a)}for(var s=function(t){return"number"===e.inputType.kind?Number(t):t},l=0,u=i;l<u.length;l+=1){var c=u[l],h=c[0],d=c[1];1===d.length?t.push(s(d[0])):t.push(d.map(s)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var _0x37f1d3=(_0xb98d94=!0,function(e,t){var i=_0xb98d94?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb98d94=!1,i}),_0x2332b6=_0x37f1d3(void 0,(function(){return _0x2332b6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2332b6).search("(((.+)+)+)+$")})),_0xb98d94;_0x2332b6();var _0x4090eb={kind:"number"},_0x58c771={kind:"string"},_0x4dc893=function(e,t,i,n,r){this.type=_0x58c771,this.number=e,this.locale=t,this.currency=i,this.minFractionDigits=n,this.maxFractionDigits=r};_0x4dc893.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,_0x4090eb);if(!i)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var r=null;if(n.locale&&!(r=t.parse(n.locale,1,_0x58c771)))return null;var o=null;if(n.currency&&!(o=t.parse(n.currency,1,_0x58c771)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=t.parse(n["min-fraction-digits"],1,_0x4090eb)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,_0x4090eb))?null:new _0x4dc893(i,r,o,a,s)},_0x4dc893.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},_0x4dc893.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},_0x4dc893.prototype.possibleOutputs=function(){return[void 0]},_0x4dc893.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var _0x516c86=(_0x48d35b=!0,function(e,t){var i=_0x48d35b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x48d35b=!1,i}),_0x3e5a92=_0x516c86(void 0,(function(){return _0x3e5a92.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e5a92).search("(((.+)+)+)+$")})),_0x48d35b;function _0xb00b14(e,t){for(var i,n,r=e.length-1,o=0,a=r,s=0;o<=a;)if(i=e[s=Math.floor((o+a)/2)],n=e[s+1],i<=t){if(s===r||t<n)return s;o=s+1}else{if(!(i>t))throw new RuntimeError("Input is not a number.");a=s-1}return 0}_0x3e5a92();var _0x54a33f=(_0x2ec8d8=!0,function(e,t){var i=_0x2ec8d8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ec8d8=!1,i}),_0x2cd366=_0x54a33f(void 0,(function(){return _0x2cd366.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cd366).search("(((.+)+)+)+$")})),_0x2ec8d8;_0x2cd366();var _0x1c599a={kind:"number"},_0x7d0e5f=function(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,r=i;n<r.length;n+=1){var o=r[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};_0x7d0e5f.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var i=t.parse(e[1],1,_0x1c599a);if(!i)return null;var n=[],r=null;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var o=1;o<e.length;o+=2){var a=1===o?-1/0:e[o],s=e[o+1],l=o,u=o+1;if("number"!=typeof a)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,r);if(!c)return null;r=r||c.type,n.push([a,c])}return new _0x7d0e5f(r,i,n)},_0x7d0e5f.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;return n>=t[r-1]?i[r-1].evaluate(e):i[_0xb00b14(t,n)].evaluate(e)},_0x7d0e5f.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1){e(i[t])}},_0x7d0e5f.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},_0x7d0e5f.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var _0x3552c9=(_0x463bba=!0,function(e,t){var i=_0x463bba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x463bba=!1,i}),_0x9cc3c9=_0x3552c9(void 0,(function(){return _0x9cc3c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x9cc3c9).search("(((.+)+)+)+$")})),_0x463bba;_0x9cc3c9();var _0x3920b3=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};_0x3920b3.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var i=e[1];return t.scope.has(i)?new _0x3920b3(i,t.scope.get(i)):t.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},_0x3920b3.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},_0x3920b3.prototype.eachChild=function(){},_0x3920b3.prototype.possibleOutputs=function(){return[void 0]},_0x3920b3.prototype.serialize=function(){return["var",this.name]};var _0x5f2024=(_0x2e826f=!0,function(e,t){var i=_0x2e826f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e826f=!1,i}),_0x5a58b3=_0x5f2024(void 0,(function(){return _0x5a58b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a58b3).search("(((.+)+)+)+$")})),_0x2e826f;_0x5a58b3();var _0x97a7f7={"==":_0x208527.Equals,"!=":_0x208527.NotEquals,">":_0x208527.GreaterThan,"<":_0x208527.LessThan,">=":_0x208527.GreaterThanOrEqual,"<=":_0x208527.LessThanOrEqual,array:_0x58f6bf,at:_0x27c3dc,boolean:_0x58f6bf,case:_0x546e21,coalesce:_0x3af8aa,collator:_0x2aa3c9,format:_0x252262,image:_0x306686,in:_0xed36fe,interpolate:_0x29d6fe,"interpolate-hcl":_0x29d6fe,"interpolate-lab":_0x29d6fe,length:_0x4eb776,let:_0x23621d,literal:_0x119c28,match:_0x4bc22e,number:_0x58f6bf,"number-format":_0x4dc893,object:_0x58f6bf,step:_0x7d0e5f,string:_0x58f6bf,"to-boolean":_0x3aa4b5,"to-color":_0x3aa4b5,"to-number":_0x3aa4b5,"to-string":_0x3aa4b5,var:_0x3920b3},_0x4f0320=(_0x24caf8=!0,function(e,t){var i=_0x24caf8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24caf8=!1,i}),_0x42e083=_0x4f0320(void 0,(function(){return _0x42e083.toString().search("(((.+)+)+)+$").toString().constructor(_0x42e083).search("(((.+)+)+)+$")})),_0x24caf8;function _0x416c3b(){}_0x42e083();var _0x449555={};for(var _0x250257 in _0x416c3b.register=function(e,t,i){void 0===i&&(i={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),_0x449555[e]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}},_0x416c3b.register("Object",Object),_0x416c3b.register("Color",_0x128d69),_0x416c3b.register("Error",Error),_0x416c3b.register("ResolvedImage",_0x313b86),_0x416c3b.register("ImageAtlas",_0x7f7567),_0x416c3b.register("ImagePosition",_0x3a607b),_0x416c3b.register("RGBAImage",_0x86a665),_0x416c3b.register("Formatted",_0x2683dd),_0x416c3b.register("FormattedSection",_0x5c9bfa),_0x97a7f7)_0x97a7f7[_0x250257]._classRegistryKey||_0x416c3b.register("Expression_"+_0x250257,_0x97a7f7[_0x250257]);function _0x8bc25a(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}_0x416c3b.serialize=function(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(_0x8bc25a(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var i=e;return t&&t.push(i.buffer),i}if(e instanceof ImageData)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var n=[],r=0,o=e;r<o.length;r+=1){var a=o[r];n.push(_0x416c3b.serialize(a,t))}return n}if("object"==typeof e){var s=e.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var u=s.serialize?s.serialize(e,t):{};if(!s.serialize){for(var c in e)if(e.hasOwnProperty(c)&&!(_0x449555[l].omit.indexOf(c)>=0)){var h=e[c];"function"!=typeof h&&(u[c]=_0x449555[l].shallow.indexOf(c)>=0?h:_0x416c3b.serialize(h,t))}e instanceof Error&&(u.message=e.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof e)},_0x416c3b.deserialize=function(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||_0x8bc25a(e)||ArrayBuffer.isView(e)||e instanceof ImageData)return e;if(Array.isArray(e))return e.map(_0x416c3b.deserialize);if("object"==typeof e){var t=e.$name||"Object",i=_0x449555[t].klass;if(!i)throw new Error("can't deserialize unregistered class "+t);if(i.deserialize)return i.deserialize(e);for(var n=Object.create(i.prototype),r=0,o=Object.keys(e);r<o.length;r+=1){var a=o[r];if("$name"!==a){var s=e[a];n[a]=_0x449555[t].shallow.indexOf(a)>=0?s:_0x416c3b.deserialize(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)};var _0x1e0f0e=(_0x1c5d83=!0,function(e,t){var i=_0x1c5d83?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c5d83=!1,i}),_0x392d52=_0x1e0f0e(void 0,(function(){return _0x392d52.toString().search("(((.+)+)+)+$").toString().constructor(_0x392d52).search("(((.+)+)+)+$")})),_0x1c5d83;_0x392d52();var ae$s=8192,_0x4d2f8e=(_0x106377=!0,function(e,t){var i=_0x106377?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x106377=!1,i}),_0x3c80f9=_0x4d2f8e(void 0,(function(){return _0x3c80f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c80f9).search("(((.+)+)+)+$")})),_0x106377;function number(e,t,i){return e*(1-i)+t*i}_0x3c80f9();const _0x35e9c1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2ed9ed=_0x35e9c1(void 0,(function(){return _0x2ed9ed.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ed9ed).search("(((.+)+)+)+$")}));function _0xc968bb(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!_0xc968bb(e[i],t[i]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!_0xc968bb(e[i],t[i]))return!1;return!0}return e===t}function bezier(e,t,i,n){const r=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),o=r(this,(function(){return o.toString().search("(((.+)+)+)+$").toString().constructor(o).search("(((.+)+)+)+$")}));o()}function clamp(e,t,i){return Math.min(i,Math.max(t,e))}function wrap(e,t,i){const n=i-t,r=((e-t)%n+n)%n+t;return r===t?i:r}function asyncAll(e,t,i){if(!e.length)return i(null,[]);let n=e.length;const r=new Array(e.length);let o=null;e.forEach(((e,a)=>{t(e,((e,t)=>{e&&(o=e),r[a]=t,0==--n&&i(o,r)}))}))}function extend$1(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}_0x2ed9ed(),bezier();let _0x4b1b3d=1;function uniqueId(){return _0x4b1b3d++}function endsWith(e,t){return-1!==e.indexOf(t,e.length-t.length)}function mapObject(e,t,i){const n={};for(const r in e)n[r]=t.call(i||this,e[r],r,e);return n}function filterObject(e,t,i){const n={};for(const r in e)t.call(i||this,e[r],r,e)&&(n[r]=e[r]);return n}function clone(e){return Array.isArray(e)?e.map(clone):"object"==typeof e&&e?mapObject(e,clone):e}function arraysIntersect(e,t){for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>=0)return!0;return!1}const _0x421c95={};function warnOnce(e){_0x421c95[e]||("undefined"!=typeof console&&console.warn(e),_0x421c95[e]=!0)}function isCounterClockwise(e,t,i){return(i.y-e.y)*(t.x-e.x)>(t.y-e.y)*(i.x-e.x)}function isWorker(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function parseCacheControl(e){const t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,i,n,r)=>{const o=n||r;return t[i]=!o||o.toLowerCase(),""})),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}var _0xf80bf5=(_0x37ca71=!0,function(e,t){var i=_0x37ca71?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37ca71=!1,i}),_0x35363f=_0xf80bf5(void 0,(function(){return _0x35363f.toString().search("(((.+)+)+)+$").toString().constructor(_0x35363f).search("(((.+)+)+)+$")})),_0x37ca71;_0x35363f();var _0x45732c=function(){this.first=!0};_0x45732c.prototype.update=function(e,t){var i=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<i&&(this.lastIntegerZoom=i,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=i,!0))},_0x416c3b.register("ZoomHistory",_0x45732c);var _0x46366b=(_0x49d18c=!0,function(e,t){var i=_0x49d18c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49d18c=!1,i}),_0x26847f=_0x46366b(void 0,(function(){return _0x26847f.toString().search("(((.+)+)+)+$").toString().constructor(_0x26847f).search("(((.+)+)+)+$")})),_0x49d18c;_0x26847f();var _0x4f93ac=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new _0x45732c,this.transition={})};_0x4f93ac.prototype.isSupportedScript=function(e){return!1},_0x4f93ac.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},_0x4f93ac.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),i=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*t}},_0x416c3b.register("EvaluationParameters",_0x4f93ac);const _0x312abe=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x416ce9=_0x312abe(void 0,(function(){return _0x416ce9.toString().search("(((.+)+)+)+$").toString().constructor(_0x416ce9).search("(((.+)+)+)+$")}));_0x416ce9();const _0x5120e9=128;function _0x3f30ab(e,t){const{expression:i}=t;if("constant"===i.kind){return{kind:"constant",layoutSize:i.evaluate(new _0x4f93ac(e+1))}}if("source"===i.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:n}=i;let r=0;for(;r<t.length&&t[r]<=e;)r++;r=Math.max(0,r-1);let o=r;for(;o<t.length&&t[o]<e+1;)o++;o=Math.min(t.length-1,o);const a=t[r],s=t[o];if("composite"===i.kind)return{kind:"composite",minZoom:a,maxZoom:s,interpolationType:n};return{kind:"camera",minZoom:a,maxZoom:s,minSize:i.evaluate(new _0x4f93ac(a)),maxSize:i.evaluate(new _0x4f93ac(s)),interpolationType:n}}}function _0x49494c(e,{uSize:t,uSizeT:i},{lowerSize:n,upperSize:r}){return"source"===e.kind?n/_0x5120e9:"composite"===e.kind?number(n/_0x5120e9,r/_0x5120e9,i):t}function _0x31524b(e,t){let i=0,n=0;if("constant"===e.kind)n=e.layoutSize;else if("source"!==e.kind){const{interpolationType:r,minZoom:o,maxZoom:a}=e,s=r?clamp(_0x29d6fe.interpolationFactor(r,t,o,a),0,1):0;"camera"===e.kind?n=number(e.minSize,e.maxSize,s):i=s}return{uSizeT:i,uSize:n}}var _0x34c89b=(_0x4776b3=!0,function(e,t){var i=_0x4776b3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4776b3=!1,i}),_0xbacd6a=_0x34c89b(void 0,(function(){return _0xbacd6a.toString().search("(((.+)+)+)+$").toString().constructor(_0xbacd6a).search("(((.+)+)+)+$")})),_0x4776b3;function _0xa9b408(){this.text={},this.icon={}}function _0x24125a(e){this._provider=e,this._billboardsByLayers={},this._symbolInstancesInfoByLayers={}}_0xbacd6a(),_0xa9b408.prototype.init=function(e,t,i,n){for(var r={},o=0;o<t.length;o++){r[t[o].index]=t[o]}for(o=0;o<e.length;o++){var a=e.get(o),s=a.rightJustifiedTextSymbolIndex;const t=r[a.featureIndex];var l;l=n?a.key+" "+i:t.icon.name+" "+t.id+" "+i,s>=0&&(this.text[s]={key:l,feature:t}),(s=a.centerJustifiedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.leftJustifiedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.verticalPlacedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.placedIconSymbolIndex)>=0&&(this.icon[s]={key:l,feature:t}),(s=a.verticalPlacedIconSymbolIndex)>=0&&(this.icon[s]={key:l,feature:t})}};var _0x58176a=new o$1p,_0x12eeb2=new e$1U,_0x1852b6=new e$1U,_0x50001e=new o$1o,_0x85587a=new o$1o,_0xf7ae7f=new o$1o,_0x1b780a=new o$1o,_0x1b30ee=new o$1o,_0x1e3b84=new o$1o,_0x69a33c=new o$1o,_0x1b7d91=new o$1o,_0x482b98=new o$1o,_0x2dd58c=new o$1o;function _0x408a0f(e,t,i,n){var r=Math.floor(.5*n.x);return t||i?t&&!i?r/128:e.uSize:mix(r,n.y,e?e.uSizeT:0)/128}function _0x577e2c(e,t,i,n){const r=e.layoutVertexArray.bytesPerElement/2,o=t+4*i+n;return{tileX:e.layoutVertexArray.int16[o*r],tileY:e.layoutVertexArray.int16[o*r+1],offsetX:e.layoutVertexArray.int16[o*r+2]/32,offsetY:e.layoutVertexArray.int16[o*r+3]/32,texCoordX:e.layoutVertexArray.uint16[o*r+4],texCoordY:e.layoutVertexArray.uint16[o*r+5],sizeX:e.layoutVertexArray.uint16[o*r+6],sizeY:e.layoutVertexArray.uint16[o*r+7],pixeloffsetX:e.layoutVertexArray.int16[o*r+8],pixeloffsetY:e.layoutVertexArray.int16[o*r+9]}}function _0x355f87(e){var t=j$T.LEFT,i=S$O.CENTER;return"center"===e?(t=j$T.CENTER,i=S$O.CENTER):"left"===e?(t=j$T.LEFT,i=S$O.CENTER):"right"===e?(t=j$T.RIGHT,i=S$O.CENTER):"top"===e||"bottom"===e?(t=j$T.CENTER,i=S$O.TOP):"top-left"==e?(t=j$T.LEFT,i=S$O.TOP):"top-right"==e?(t=j$T.RIGHT,i=S$O.TOP):"bottom-left"==e?(t=j$T.LEFT,i=S$O.BOTTOM):"bottom-right"==e&&(t=j$T.RIGHT,i=S$O.BOTTOM),{horizontalOrigin:t,verticalOrigin:i}}function _0xd48061(e,t,i){var n=i.rectangle;return{longtitude:e*n.width/ae$s+n.west,lattitude:t*n.height/ae$s+n.south}}_0x24125a.prototype.drawLayerSymbols=function(e,t,i){var n=e.getBucket(t);if(!n)return;var r,o,a=i?n.text:n.icon;if(!a||!a.segments.get().length)return;r=this._billboardsByLayers[t.bucketName]?this._billboardsByLayers[t.bucketName]:this._billboardsByLayers[t.bucketName]={},this._symbolInstancesInfoByLayers[t.bucketName]?o=this._symbolInstancesInfoByLayers[t.bucketName]:(o=this._symbolInstancesInfoByLayers[t.bucketName]=new _0xa9b408).init(n.symbolInstances,n.features,e.level,i),i?(this._textCollection=this._textCollection||this._provider._billboardCollectionPool.getOne(),this._textCollection.destroyTextureAtlas=!1,this._textCollection._sdf=!0,this._textCollection.textureAtlas=e.cesiumGlyphAtlas):(this._iconCollection=this._iconCollection||this._provider._billboardCollectionPool.getOne(),this._iconCollection.destroyTextureAtlas=!1,this._iconCollection._sdf=!1,this._iconCollection.textureAtlas=e.cesiumImageAtlas);var s=t.paint,l=t.layout,u=s.get("text-color").value.value;u=e$2b(u)?u:s.get("text-color").value.evaluate(),_0x12eeb2.red=u.r,_0x12eeb2.green=u.g,_0x12eeb2.blue=u.b;var c=s.get("text-halo-color").value.value,h=s.get("text-halo-width").value.value;s.get("text-halo-blur").value.value,s.get("text-show-background").value.value;var d=i?s.get("text-translate"):s.get("icon-translate");_0x1852b6.red=c.r,_0x1852b6.green=c.g,_0x1852b6.blue=c.b,_0x1852b6.alpha=c.a,_0x355f87(l.get("text-anchor").value.value);(i||n.sdfIcons)&&t.paint.get(i?"text-halo-width":"icon-halo-width").constantOr(1);var f,p,_=i?n.textSizeData:n.iconSizeData,m=_0x31524b(_,e.level),g=_.kind,x="constant"===g||"source"===g,v="constant"===g||"camera"===g,y=void 0;i?(f=this._textCollection,p=e.cesiumGlyphAtlas,y=e.glyphAtlasTexture.size,n.iconsInText&&(e.imageAtlasTexture.size,e.imageAtlasTexture)):(f=this._iconCollection,p=e.cesiumImageAtlas,y=e.imageAtlasTexture.size);for(var $=a.placedSymbolArray.length,b=0;b<$;b++){var T,C=a.placedSymbolArray.get(b),S=i?o.text[b]:o.icon[b],w=S.feature,E=S.key,P=w.id;!r[E]&&(r[E]=[]),T=r[E];for(var A=C.numGlyphs,L=C.vertexStartIndex,M=0;M<A;M++){var R,O,I=_0x577e2c(a,L,M,0);_0xf7ae7f.x=I.texCoordX/y[0],_0xf7ae7f.y=I.texCoordY/y[1],_0x69a33c.x=I.offsetX,_0x69a33c.y=I.offsetY,_0x2dd58c.x=I.sizeX,_0x2dd58c.y=I.sizeY,R=_0xd48061(I.tileX,I.tileY,e),O=o$1p.fromRadians(R.longtitude,R.lattitude,0);I=_0x577e2c(a,L,M,1);_0x1b780a.x=I.texCoordX/y[0],_0x1b780a.y=I.texCoordY/y[1],_0x1b7d91.x=I.offsetX,_0x1b7d91.y=I.offsetY;I=_0x577e2c(a,L,M,2);_0x50001e.x=I.texCoordX/y[0],_0x50001e.y=I.texCoordY/y[1],_0x1b30ee.x=I.offsetX,_0x1b30ee.y=I.offsetY;I=_0x577e2c(a,L,M,3);_0x85587a.x=I.texCoordX/y[0],_0x85587a.y=I.texCoordY/y[1],_0x1e3b84.x=I.offsetX,_0x1e3b84.y=I.offsetY;var D=_0x1b780a.y-_0x85587a.y,B=_0x85587a.x-_0x50001e.x;p.addTextureCoordBounds(new f$18(_0x50001e.x,_0x50001e.y,B,D));var N,F=_0x408a0f(m,x,v,_0x2dd58c),U=i?F/24:F,G=_0x1e3b84.x-_0x1b30ee.x,z=_0x1b30ee.y-_0x69a33c.y;e$2b(w)&&e$2b(w.properties)&&e$2b(w.properties.TEXT_COLOR)&&(N=new e$1U.fromCssColorString(w.properties.TEXT_COLOR)),G*=U,z*=U,_0x482b98.x=_0x1b30ee.x*U+.5*G+d[0],_0x482b98.y=_0x1b30ee.y*U-.5*z+d[1];var V=f.add({id:P,scale:1,position:O,heightReference:k$P.NONE,eyeOffset:_0x58176a,width:G,height:z,pixelOffset:_0x482b98,verticalOrigin:S$O.CENTER,horizontalOrigin:j$T.CENTER,isMVT:!0,color:i?e$2b(N)?N:e$1U.clone(_0x12eeb2):null,outlineColor:_0x1852b6,outlineWidth:h,mvtLayerID:this._layerID,mapName:this._provider._owner._name,mvtProperties:w.properties,show:!0});V._imageIndex=p.numberOfImages-1,V._billboardsBySymbol=T,T.push(V)}}},_0x24125a.prototype._setNeedReRender=function(e){if(e){for(var t in this._billboardsByLayers){var i=this._billboardsByLayers[t];for(var n in i)for(var r=i[n],o=0;o<r.length;o++){var a=r[o];a._billboardCollection.remove(a)}}this._billboardsByLayers={}}},_0x24125a.prototype.release=function(){this._iconCollection&&!this._iconCollection.isDestroyed()&&(this._iconCollection.removeAll(),this._provider._billboardCollectionPool.pushBack(this._iconCollection)),this._textCollection&&!this._textCollection.isDestroyed()&&(this._textCollection.removeAll(),this._provider._billboardCollectionPool.pushBack(this._textCollection))};var _0x36f2f3=(_0x254b35=!0,function(e,t){var i=_0x254b35?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x254b35=!1,i}),_0x1848d7=_0x36f2f3(void 0,(function(){return _0x1848d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x1848d7).search("(((.+)+)+)+$")})),_0x254b35;_0x1848d7();var _0x4b644e=window.HTMLImageElement,_0xcd6766=window.HTMLCanvasElement,_0x4de524=window.HTMLVideoElement,_0x159934=window.ImageData,_0x6d753e=function(e,t,i,n,r){this.context=e,this.cesiumContext=t,this.format=n,this.update(i,r)};_0x6d753e.prototype.update=function(e,t,i){var n=e.width,r=e.height;this.useMipmap=Boolean(t&&t.useMipmap),!(this.size&&this.size[0]===n&&this.size[1]===r||i)&&(this.size=[n,r],this.cesiumTexture&&this.cesiumTexture.destroy());var o=e;if(o=e instanceof _0x4b644e||e instanceof _0xcd6766||e instanceof _0x4de524||e instanceof _0x159934?e:e.data,this.cesiumTexture){var a=i||{x:0,y:0},s=a.x,l=a.y;this.cesiumTexture.copyFrom({width:n,height:r,arrayBufferView:e},s,l)}else this.cesiumTexture=new t$V({context:this.cesiumContext,source:{arrayBufferView:o},width:n,height:r,pixelFormat:this.format,flipY:!1});this.useMipmap&&this.isSizePowerOfTwo()&&this.cesiumTexture.generateMipmap()},_0x6d753e.prototype.bind=function(e,t,i){i===tt$h.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(i=tt$h.LINEAR),(e!==this.filter||i!==this.minFilter||t!==this.wrap)&&(this.filter=e,this.minFilter=i,this.wrap=t,this.sampler&&this.sampler.destroy(),this.sampler=new e$1P({wrapS:t,wrapT:t,minificationFilter:i,magnificationFilter:e}),this.cesiumTexture.sampler=this.sampler)},_0x6d753e.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},_0x6d753e.prototype.destroy=function(){this.cesiumTexture&&(this.cesiumTexture.destroy(),this.cesiumTexture=null)};const _0x5cc2c2=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x43a27a=_0x5cc2c2(void 0,(function(){return _0x43a27a.toString().search("(((.+)+)+)+$").toString().constructor(_0x43a27a).search("(((.+)+)+)+$")}));_0x43a27a();var _0x53c4d7=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8};const _0x243fc6=128,_0x520763=5;var _0x3e60cf=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};_0x3e60cf.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},_0x3e60cf.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},_0x3e60cf.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},_0x3e60cf.prototype.clear=function(){this.length=0},_0x3e60cf.prototype.resize=function(e){this.reserve(e),this.length=e},_0x3e60cf.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*_0x520763),_0x243fc6),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&(0==t.length&&console.log("oldUint8Array.length == 0"),this.uint8.set(t))}},_0x3e60cf.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var _0x1dc9f1=(_0x31ea48=!0,function(e,t){var i=_0x31ea48?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31ea48=!1,i}),_0x55169f=_0x1dc9f1(void 0,(function(){return _0x55169f.toString().search("(((.+)+)+)+$").toString().constructor(_0x55169f).search("(((.+)+)+)+$")})),_0x31ea48;function _0x46bdc2(e,t){this.x=e,this.y=t}_0x55169f(),_0x46bdc2.prototype={clone:function(){return new _0x46bdc2(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,i=e.y-this.y;return t*t+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,i=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=i,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),i=Math.sin(e),n=t*this.x-i*this.y,r=i*this.x+t*this.y;return this.x=n,this.y=r,this},_rotateAround:function(e,t){var i=Math.cos(e),n=Math.sin(e),r=t.x+i*(this.x-t.x)-n*(this.y-t.y),o=t.y+n*(this.x-t.x)+i*(this.y-t.y);return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},_0x46bdc2.convert=function(e){return e instanceof _0x46bdc2?e:Array.isArray(e)?new _0x46bdc2(e[0],e[1]):e};var _0x18a187=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=i,e},t}(_0x3e60cf);_0x18a187.prototype.bytesPerElement=4,_0x416c3b.register("StructArrayLayout2i4",_0x18a187);var _0x5d7160=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=i,this.int16[o+2]=n,this.int16[o+3]=r,e},t}(_0x3e60cf);_0x5d7160.prototype.bytesPerElement=8,_0x416c3b.register("StructArrayLayout4i8",_0x5d7160);var _0x2a157e=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(_0x3e60cf);_0x2a157e.prototype.bytesPerElement=12,_0x416c3b.register("StructArrayLayout2i4i12",_0x2a157e);var _0x51528d=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},r.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},r.prototype.emplace=function(e,t,i,n,r,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.uint8[l+4]=n,this.uint8[l+5]=r,this.uint8[l+6]=o,this.uint8[l+7]=a,e},r}(_0x3e60cf);_0x51528d.prototype.bytesPerElement=8,_0x416c3b.register("StructArrayLayout2i4ub8",_0x51528d);var _0x2db6d8=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=i,this.uint16[u+2]=n,this.uint16[u+3]=r,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,e},t}(_0x3e60cf);_0x2db6d8.prototype.bytesPerElement=16,_0x416c3b.register("StructArrayLayout8ui16",_0x2db6d8);var _0x15604f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.int16[f+0]=t,this.int16[f+1]=i,this.int16[f+2]=n,this.int16[f+3]=r,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=d,e},t}(_0x3e60cf);_0x15604f.prototype.bytesPerElement=24,_0x416c3b.register("StructArrayLayout4i4ui4i24",_0x15604f);var _0xe50b96=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.float32[r+0]=t,this.float32[r+1]=i,this.float32[r+2]=n,e},t}(_0x3e60cf);_0xe50b96.prototype.bytesPerElement=12,_0x416c3b.register("StructArrayLayout3f12",_0xe50b96);var _0x3704ae=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint32[i+0]=t,e},t}(_0x3e60cf);_0x3704ae.prototype.bytesPerElement=4,_0x416c3b.register("StructArrayLayout1ul4",_0x3704ae);var _0x47f6d0=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c){var h=this.length;return this.resize(h+1),this.emplace(h,e,t,i,n,r,o,a,s,l,u,c)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=12*e,f=6*e;return this.int16[d+0]=t,this.int16[d+1]=i,this.int16[d+2]=n,this.int16[d+3]=r,this.int16[d+4]=o,this.int16[d+5]=a,this.uint32[f+3]=s,this.uint16[d+8]=l,this.uint16[d+9]=u,this.int16[d+10]=c,this.int16[d+11]=h,e},t}(_0x3e60cf);_0x47f6d0.prototype.bytesPerElement=24,_0x416c3b.register("StructArrayLayout6i1ul2ui2i24",_0x47f6d0);var _0xc3bbd1=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(_0x3e60cf);_0xc3bbd1.prototype.bytesPerElement=12,_0x416c3b.register("StructArrayLayout2i2i2i12",_0xc3bbd1);var _0x544f54=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=i,this.float32[a+1]=n,this.float32[a+2]=r,e},t}(_0x3e60cf);_0x544f54.prototype.bytesPerElement=12,_0x416c3b.register("StructArrayLayout2ub2f12",_0x544f54);var _0x562995=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var g=this.length;return this.resize(g+1),this.emplace(g,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g){var x=24*e,v=12*e,y=48*e;return this.int16[x+0]=t,this.int16[x+1]=i,this.uint16[x+2]=n,this.uint16[x+3]=r,this.uint32[v+2]=o,this.uint32[v+3]=a,this.uint32[v+4]=s,this.uint16[x+10]=l,this.uint16[x+11]=u,this.uint16[x+12]=c,this.float32[v+7]=h,this.float32[v+8]=d,this.uint8[y+36]=f,this.uint8[y+37]=p,this.uint8[y+38]=_,this.uint32[v+10]=m,this.int16[x+22]=g,e},t}(_0x3e60cf);_0x562995.prototype.bytesPerElement=48,_0x416c3b.register("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",_0x562995);var _0x26d71c=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S){var w=this.length;return this.resize(w+1),this.emplace(w,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S,w){var E=30*e,P=15*e;return this.int16[E+0]=t,this.int16[E+1]=i,this.int16[E+2]=n,this.int16[E+3]=r,this.int16[E+4]=o,this.int16[E+5]=a,this.int16[E+6]=s,this.int16[E+7]=l,this.uint16[E+8]=u,this.uint16[E+9]=c,this.uint16[E+10]=h,this.uint16[E+11]=d,this.uint16[E+12]=f,this.uint16[E+13]=p,this.uint16[E+14]=_,this.uint16[E+15]=m,this.uint16[E+16]=g,this.uint16[E+17]=x,this.uint16[E+18]=v,this.uint16[E+19]=y,this.uint16[E+20]=$,this.uint16[E+21]=b,this.uint32[P+11]=T,this.float32[P+12]=C,this.float32[P+13]=S,this.float32[P+14]=w,e},t}(_0x3e60cf);_0x26d71c.prototype.bytesPerElement=60,_0x416c3b.register("StructArrayLayout8i14ui1ul3f60",_0x26d71c);var _0x4d30a7=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.float32[i+0]=t,e},t}(_0x3e60cf);_0x4d30a7.prototype.bytesPerElement=4,_0x416c3b.register("StructArrayLayout1f4",_0x4d30a7);var _0x4d44ce=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.int16[r+0]=t,this.int16[r+1]=i,this.int16[r+2]=n,e},t}(_0x3e60cf);_0x4d44ce.prototype.bytesPerElement=6,_0x416c3b.register("StructArrayLayout3i6",_0x4d44ce);var _0x294c2d=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=2*e,o=4*e;return this.uint32[r+0]=t,this.uint16[o+2]=i,this.uint16[o+3]=n,e},t}(_0x3e60cf);_0x294c2d.prototype.bytesPerElement=8,_0x416c3b.register("StructArrayLayout1ul2ui8",_0x294c2d);var _0xbd6def=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.uint16[r+0]=t,this.uint16[r+1]=i,this.uint16[r+2]=n,e},t}(_0x3e60cf);_0xbd6def.prototype.bytesPerElement=6,_0x416c3b.register("StructArrayLayout3ui6",_0xbd6def);var _0x229baa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=i,e},t}(_0x3e60cf);_0x229baa.prototype.bytesPerElement=4,_0x416c3b.register("StructArrayLayout2ui4",_0x229baa);var _0x53e7bb=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint16[i+0]=t,e},t}(_0x3e60cf);_0x53e7bb.prototype.bytesPerElement=2,_0x416c3b.register("StructArrayLayout1ui2",_0x53e7bb);var _0x3e5f67=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=i,e},t}(_0x3e60cf);_0x3e5f67.prototype.bytesPerElement=8,_0x416c3b.register("StructArrayLayout2f8",_0x3e5f67);var _0x2f4994=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=i,this.float32[o+2]=n,this.float32[o+3]=r,e},t}(_0x3e60cf);_0x2f4994.prototype.bytesPerElement=16,_0x416c3b.register("StructArrayLayout4f16",_0x2f4994);var _0x18f84b=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.float32[s+0]=t,this.float32[s+1]=i,this.float32[s+2]=n,this.float32[s+3]=r,this.float32[s+4]=o,this.float32[s+5]=a,e},t}(_0x3e60cf);_0x18f84b.prototype.bytesPerElement=24,_0x416c3b.register("StructArrayLayout6f24",_0x18f84b);var _0x44766f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.float32[u+0]=t,this.float32[u+1]=i,this.float32[u+2]=n,this.float32[u+3]=r,this.float32[u+4]=o,this.float32[u+5]=a,this.float32[u+6]=s,this.float32[u+7]=l,e},t}(_0x3e60cf);_0x44766f.prototype.bytesPerElement=32,_0x416c3b.register("StructArrayLayout8f32",_0x44766f);var _0xaf2975=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.float32[f+0]=t,this.float32[f+1]=i,this.float32[f+2]=n,this.float32[f+3]=r,this.float32[f+4]=o,this.float32[f+5]=a,this.float32[f+6]=s,this.float32[f+7]=l,this.float32[f+8]=u,this.float32[f+9]=c,this.float32[f+10]=h,this.float32[f+11]=d,e},t}(_0x3e60cf);_0xaf2975.prototype.bytesPerElement=48,_0x416c3b.register("StructArrayLayout12f48",_0xaf2975);var _0x6a3f93=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return i.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.x1.get=function(){return this._structArray.int16[this._pos2+2]},i.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},i.y1.get=function(){return this._structArray.int16[this._pos2+3]},i.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},i.x2.get=function(){return this._structArray.int16[this._pos2+4]},i.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},i.y2.get=function(){return this._structArray.int16[this._pos2+5]},i.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.radius.get=function(){return this._structArray.int16[this._pos2+10]},i.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},i.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},i.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},i.anchorPoint.get=function(){return new pointGeometry(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,i),t}(_0x53c4d7);_0x6a3f93.prototype.size=24;var _0xd62265=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x6a3f93(this,e)},t}(_0x47f6d0);_0x416c3b.register("CollisionBoxArray",_0xd62265);var _0x20bde8=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},i.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},i.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},i.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},i.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},i.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},i.segment.get=function(){return this._structArray.uint16[this._pos2+10]},i.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},i.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},i.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},i.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},i.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},i.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},i.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},i.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},i.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},i.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},i.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},i.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},i.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},i.associatedIconIndex.set=function(e){this._structArray.int16[this._pos2+22]=e},Object.defineProperties(t.prototype,i),t}(_0x53c4d7);_0x20bde8.prototype.size=48;var _0x3db8c3=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x20bde8(this,e)},t}(_0x562995);_0x416c3b.register("PlacedSymbolArray",_0x3db8c3);var _0x230f21=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},i.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},i.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},i.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},i.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},i.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},i.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},i.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},i.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},i.placedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+6]=e},i.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},i.verticalPlacedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+7]=e},i.key.get=function(){return this._structArray.uint16[this._pos2+8]},i.key.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},i.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},i.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},i.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},i.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},i.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},i.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+14]=e},i.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},i.verticalIconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+15]=e},i.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},i.verticalIconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+16]=e},i.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},i.featureIndex.set=function(e){this._structArray.uint16[this._pos2+17]=e},i.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},i.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+18]=e},i.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},i.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+19]=e},i.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},i.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+20]=e},i.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},i.numVerticalIconVertices.set=function(e){this._structArray.uint16[this._pos2+21]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+11]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+11]=e},i.textBoxScale.get=function(){return this._structArray.float32[this._pos4+12]},i.textBoxScale.set=function(e){this._structArray.float32[this._pos4+12]=e},i.textOffset0.get=function(){return this._structArray.float32[this._pos4+13]},i.textOffset0.set=function(e){this._structArray.float32[this._pos4+13]=e},i.textOffset1.get=function(){return this._structArray.float32[this._pos4+14]},i.textOffset1.set=function(e){this._structArray.float32[this._pos4+14]=e},Object.defineProperties(t.prototype,i),t}(_0x53c4d7);_0x230f21.prototype.size=60;var _0x1ec10f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x230f21(this,e)},t}(_0x26d71c);_0x416c3b.register("SymbolInstanceArray",_0x1ec10f);var _0x6ecc27=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={offsetX:{configurable:!0}};return i.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},i.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,i),t}(_0x53c4d7);_0x6ecc27.prototype.size=4;var _0x3b99b6=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new _0x6ecc27(this,e)},t}(_0x4d30a7);_0x416c3b.register("GlyphOffsetArray",_0x3b99b6);var _0x3ccecd=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return i.x.get=function(){return this._structArray.int16[this._pos2+0]},i.x.set=function(e){this._structArray.int16[this._pos2+0]=e},i.y.get=function(){return this._structArray.int16[this._pos2+1]},i.y.set=function(e){this._structArray.int16[this._pos2+1]=e},i.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},i.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,i),t}(_0x53c4d7);_0x3ccecd.prototype.size=6;var _0x2cb00b=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new _0x3ccecd(this,e)},t}(_0x4d44ce);_0x416c3b.register("SymbolLineVertexArray",_0x2cb00b);var _0x2db5ba=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,i),t}(_0x53c4d7);_0x2db5ba.prototype.size=8;var _0x55dc22=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x2db5ba(this,e)},t}(_0x294c2d);function _0x2035d5(e,t,i){return Math.min(i,Math.max(t,e))}function _0x4098ed(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),{min:-1*Math.pow(2,e-1),max:Math.pow(2,e-1)-1}}_0x416c3b.register("FeatureIndexArray",_0x55dc22);var _0x35d78d=_0x4098ed(15);function _0x1724dc(e){for(var t=ae$s/e.extent,i=e.loadGeometry(),n=0;n<i.length;n++)for(var r=i[n],o=0;o<r.length;o++){var a=r[o];a.x=Math.round(a.x*t),a.y=ae$s-Math.round(a.y*t),(a.x<_0x35d78d.min||a.x>_0x35d78d.max||a.y<_0x35d78d.min||a.y>_0x35d78d.max)&&(a.x=_0x2035d5(a.x,_0x35d78d.min,_0x35d78d.max),a.y=_0x2035d5(a.y,_0x35d78d.min,_0x35d78d.max))}return i}var _0x568ebb=(_0x945ae7=!0,function(e,t){var i=_0x945ae7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x945ae7=!1,i}),_0x587f4b=_0x568ebb(void 0,(function(){return _0x587f4b.toString().search("(((.+)+)+)+$").toString().constructor(_0x587f4b).search("(((.+)+)+)+$")})),_0x945ae7;function _0x4c9375(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t<e.length;t++){var i=e[t];this._stringToNumber[i]=t,this._numberToString[t]=i}}_0x587f4b(),_0x4c9375.prototype.encode=function(e){return this._stringToNumber[e]},_0x4c9375.prototype.decode=function(e){return this._numberToString[e]};var _0x1f8272=(_0x1fa0d5=!0,function(e,t){var i=_0x1fa0d5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fa0d5=!1,i}),_0xde1f89=_0x1f8272(void 0,(function(){return _0xde1f89.toString().search("(((.+)+)+)+$").toString().constructor(_0xde1f89).search("(((.+)+)+)+$")})),_0x1fa0d5;function _0x4c8e20(e,t,i,n,r){this.properties={},this.extent=i,this.type=0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=r,e.readFields(_0x1ee50f,this,t)}function _0x1ee50f(e,t,i){1==e?t.id=i.readVarint():2==e?_0x4e43d9(i,t):3==e?t.type=i.readVarint():4==e&&(t._geometry=i.pos)}function _0x4e43d9(e,t){for(var i=e.readVarint()+e.pos;e.pos<i;){var n=t._keys[e.readVarint()],r=t._values[e.readVarint()];t.properties[n]=r}}function _0x2a63ef(e){var t=e.length;if(t<=1)return[e];for(var i,n,r=[],o=0;o<t;o++){var a=_0x25dbf6(e[o]);0!==a&&(void 0===n&&(n=a<0),n===a<0?(i&&r.push(i),i=[e[o]]):i.push(e[o]))}return i&&r.push(i),r}function _0x25dbf6(e){for(var t,i,n=0,r=0,o=e.length,a=o-1;r<o;a=r++)t=e[r],n+=((i=e[a]).x-t.x)*(t.y+i.y);return n}_0xde1f89(),_0x4c8e20.types=["Unknown","Point","LineString","Polygon"],_0x4c8e20.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,i=e.readVarint()+e.pos,n=1,r=0,o=0,a=0,s=[];e.pos<i;){if(r<=0){var l=e.readVarint();n=7&l,r=l>>3}r--,1===n||2===n?(o+=e.readSVarint(),a+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new _0x46bdc2(o,a))):7===n?t&&t.push(t[0].clone()):console.log("VectorTileFeature loadGeometry unknown command "+n)}return t&&s.push(t),s},_0x4c8e20.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,n=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos<t;){if(n<=0){var c=e.readVarint();i=7&c,n=c>>3}if(n--,1===i||2===i)(r+=e.readSVarint())<a&&(a=r),r>s&&(s=r),(o+=e.readSVarint())<l&&(l=o),o>u&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},_0x4c8e20.prototype.toGeoJSON=function(e,t,i){var n,r,o=this.extent*Math.pow(2,i),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=_0x4c8e20.types[this.type];function c(e){for(var t=0;t<e.length;t++){var i=e[t],n=180-360*(i.y+s)/o;e[t]=[360*(i.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(n=0;n<l.length;n++)h[n]=l[n][0];c(l=h);break;case 2:for(n=0;n<l.length;n++)c(l[n]);break;case 3:for(l=_0x2a63ef(l),n=0;n<l.length;n++)for(r=0;r<l[n].length;r++)c(l[n][r])}1===l.length?l=l[0]:u="Multi"+u;var d={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(d.id=this.id),d};var _0x1b9d35=(_0x4deb60=!0,function(e,t){var i=_0x4deb60?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4deb60=!1,i}),_0x1ef494=_0x1b9d35(void 0,(function(){return _0x1ef494.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ef494).search("(((.+)+)+)+$")})),_0x4deb60;function _0x16ddd8(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(_0x87342,this,t),this.length=this._features.length}function _0x87342(e,t,i){15===e?t.version=i.readVarint():1===e?t.name=i.readString():5===e?t.extent=i.readVarint():2===e?t._features.push(i.pos):3===e?t._keys.push(i.readString()):4===e&&t._values.push(_0x275d15(i))}function _0x275d15(e){for(var t=null,i=e.readVarint()+e.pos;e.pos<i;){var n=e.readVarint()>>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}_0x1ef494(),_0x16ddd8.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new _0x4c8e20(this._pbf,t,this.extent,this._keys,this._values)};var _0x588fac=(_0x459cee=!0,function(e,t){var i=_0x459cee?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x459cee=!1,i}),_0x290506=_0x588fac(void 0,(function(){return _0x290506.toString().search("(((.+)+)+)+$").toString().constructor(_0x290506).search("(((.+)+)+)+$")})),_0x459cee;function _0x3868aa(e,t){this.layers=e.readFields(_0x34cca4,{},t)}function _0x34cca4(e,t,i){if(3===e){var n=new _0x16ddd8(i,i.readVarint()+i.pos);n.length&&(t[n.name]=n)}}_0x290506();var _0x518a79=(_0x169797=!0,function(e,t){var i=_0x169797?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x169797=!1,i}),_0xc43b50=_0x518a79(void 0,(function(){return _0xc43b50.toString().search("(((.+)+)+)+$").toString().constructor(_0xc43b50).search("(((.+)+)+)+$")})),_0x169797;_0xc43b50();var _0xe380d6=3;function _0xad3464(e,t,i){var n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var r=new Int32Array(this.arrayBuffer);e=r[0],t=r[1],i=r[2],this.d=t+2*i;for(var o=0;o<this.d*this.d;o++){var a=r[_0xe380d6+o],s=r[_0xe380d6+o+1];n.push(a===s?null:r.subarray(a,s))}var l=r[_0xe380d6+n.length],u=r[_0xe380d6+n.length+1];this.keys=r.subarray(l,u),this.bboxes=r.subarray(u),this.insert=this._insertReadonly}else{this.d=t+2*i;for(var c=0;c<this.d*this.d;c++)n.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=i,this.scale=t/e,this.uid=0;var h=i/t*e;this.min=-h,this.max=e+h}_0xad3464.prototype.insert=function(e,t,i,n,r){this._forEachCell(t,i,n,r,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)},_0xad3464.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},_0xad3464.prototype._insertCell=function(e,t,i,n,r,o){this.cells[r].push(o)},_0xad3464.prototype.query=function(e,t,i,n,r){var o=this.min,a=this.max;if(e<=o&&t<=o&&a<=i&&a<=n&&!r)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(e,t,i,n,this._queryCell,s,{},r),s},_0xad3464.prototype._queryCell=function(e,t,i,n,r,o,a,s){var l=this.cells[r];if(null!==l)for(var u=this.keys,c=this.bboxes,h=0;h<l.length;h++){var d=l[h];if(void 0===a[d]){var f=4*d;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):e<=c[f+2]&&t<=c[f+3]&&i>=c[f+0]&&n>=c[f+1])?(a[d]=!0,o.push(u[d])):a[d]=!1}}},_0xad3464.prototype._forEachCell=function(e,t,i,n,r,o,a,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(i),h=this._convertToCellCoord(n),d=l;d<=c;d++)for(var f=u;f<=h;f++){var p=this.d*f+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(f),this._convertFromCellCoord(d+1),this._convertFromCellCoord(f+1)))&&r.call(this,e,t,i,n,p,o,a,s))return}},_0xad3464.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},_0xad3464.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},_0xad3464.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=_0xe380d6+this.cells.length+1+1,i=0,n=0;n<this.cells.length;n++)i+=this.cells[n].length;var r=new Int32Array(t+i+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;for(var o=t,a=0;a<e.length;a++){var s=e[a];r[_0xe380d6+a]=o,r.set(s,o),o+=s.length}return r[_0xe380d6+e.length]=o,r.set(this.keys,o),o+=this.keys.length,r[_0xe380d6+e.length+1]=o,r.set(this.bboxes,o),o+=this.bboxes.length,r.buffer},_0x416c3b.register("GridIndex",_0xad3464,{omit:["layers","patternFeatures"]});var _0x5019b9=(_0x2c61d3=!0,function(e,t){var i=_0x2c61d3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c61d3=!1,i}),_0x520aaa=_0x5019b9(void 0,(function(){return _0x520aaa.toString().search("(((.+)+)+)+$").toString().constructor(_0x520aaa).search("(((.+)+)+)+$")})),_0x2c61d3;_0x520aaa();var _0x223358=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var i=0,n=t;i<n.length;i+=1){var r=n[i],o=r[0],a=r[1];this.bindings[o]=a}};_0x223358.prototype.concat=function(e){return new _0x223358(this,e)},_0x223358.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},_0x223358.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var _0x2bedb9=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,i),this.message=i,this.key=t}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r}(Error),_0x2eabbc=(_0x2b34a7=!0,function(e,t){var i=_0x2b34a7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b34a7=!1,i}),_0x3f9480=_0x2eabbc(void 0,(function(){return _0x3f9480.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f9480).search("(((.+)+)+)+$")})),_0x2b34a7;_0x3f9480();var _0x141e02=["Unknown","Point","LineString","Polygon"],_0x59bf71=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null};_0x59bf71.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},_0x59bf71.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?_0x141e02[this.feature.type]:this.feature.type:null},_0x59bf71.prototype.properties=function(){return this.feature&&this.feature.properties||{}},_0x59bf71.prototype.parseColor=function(e){var t=this._parseColorCache[e];return!t&&(t=this._parseColorCache[e]=_0x128d69.parse(e)),t},_0x416c3b.register("EvaluationContext",_0x59bf71);var _0x41d394=(_0x4cf147=!0,function(e,t){var i=_0x4cf147?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4cf147=!1,i}),_0x912a36=_0x41d394(void 0,(function(){return _0x912a36.toString().search("(((.+)+)+)+$").toString().constructor(_0x912a36).search("(((.+)+)+)+$")})),_0x4cf147;function _0x4ccda4(){}_0x912a36(),_0x4ccda4.isFeatureConstant=function(e){if(e instanceof _0x4b0289.CompoundExpression){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}var t=!0;return e.eachChild((function(e){t&&!_0x4ccda4.isFeatureConstant(e)&&(t=!1)})),t},_0x4ccda4.isStateConstant=function(e){if(e instanceof _0x4b0289.CompoundExpression&&"feature-state"===e.name)return!1;var t=!0;return e.eachChild((function(e){t&&!_0x4ccda4.isStateConstant(e)&&(t=!1)})),t},_0x4ccda4.isGlobalPropertyConstant=function(e,t){if(e instanceof _0x4b0289.CompoundExpression&&t.indexOf(e.name)>=0)return!1;var i=!0;return e.eachChild((function(e){i&&!_0x4ccda4.isGlobalPropertyConstant(e,t)&&(i=!1)})),i};var _0x246140=(_0x2211e4=!0,function(e,t){var i=_0x2211e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2211e4=!1,i}),_0x5ded94=_0x246140(void 0,(function(){return _0x5ded94.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ded94).search("(((.+)+)+)+$")})),_0x2211e4;_0x5ded94();var _0x4b0289=function(e,t,i,n,r){void 0===t&&(t=[]),void 0===n&&(n=new _0x223358),void 0===r&&(r=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=r,this.expectedType=i};function _0x3181b4(e,t){const i=t[e];return void 0===i?null:i}_0x4b0289.prototype.parse=function(e,t,i,n,r){return void 0===r&&(r={}),t?this.concat(t,i,n)._parse(e,r):this._parse(e,r)},_0x4b0289.prototype._parse=function(e,t){function i(e,t,i){return"assert"===i?new _0x58f6bf(t,[e]):"coerce"===i?new _0x3aa4b5(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var o=r.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=i(o,a,t.typeAnnotation||"coerce");else o=i(o,a,t.typeAnnotation||"assert")}if(!(o instanceof _0x119c28)&&"resolvedImage"!==o.type.kind&&_0x4ccda4()){var l=new _0x59bf71;try{o=new _0x119c28(o.type,o.evaluate(l))}catch(e){return this.error(e.message),null}}return o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},_0x4b0289.prototype.concat=function(e,t,i){var n="number"==typeof e?this.path.concat(e):this.path,r=i?this.scope.concat(i):this.scope;return new _0x4b0289(this.registry,n,t||null,r,this.errors)},_0x4b0289.prototype.error=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new _0x2bedb9(n,e))},_0x4b0289.prototype.checkSubtype=function(e,t){var i=_0x3dc850(e,t);return i&&this.error(i),i};var _0x29fe3c=function(e,t,i,n){this.name=e,this.type=t,this._evaluate=i,this.args=n};function _0x48833d(e){return Array.isArray(e)?"("+e.map(toString).join(", ")+")":"("+toString(e.type)+"...)"}_0x29fe3c.prototype.evaluate=function(e,t){return this._evaluate(e,this.args,t)},_0x29fe3c.prototype.eachChild=function(e){this.args.forEach(e)},_0x29fe3c.prototype.possibleOutputs=function(){return[void 0]},_0x29fe3c.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},_0x29fe3c.parse=function(e,t){var i,n=e[0],r=_0x29fe3c.definitions[n];if(!r)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=a.filter((function(t){var i=t[0];return!Array.isArray(i)||i.length===e.length-1})),l=null,u=0,c=s;u<c.length;u+=1){var h=c[u],d=h[0],f=h[1];l=new _0x4b0289(t.registry,t.path,null,t.scope);for(var p=[],_=!1,m=1;m<e.length;m++){var g=e[m],x=Array.isArray(d)?d[m-1]:d.type,v=l.parse(g,1+p.length,x);if(!v){_=!0;break}p.push(v)}if(!_)if(Array.isArray(d)&&d.length!==p.length)l.error("Expected "+d.length+" arguments, but found "+p.length+" instead.");else{for(var y=0;y<p.length;y++){var $=Array.isArray(d)?d[y]:d.type,b=p[y];l.concat(y+1).checkSubtype($,b.type)}if(0===l.errors.length)return new _0x29fe3c(n,o,f,p)}}if(1===s.length)(i=t.errors).push.apply(i,l.errors);else{for(var T=(s.length?s:a).map((function(e){return _0x48833d(e[0])})).join(" | "),C=[],S=1;S<e.length;S++){var w=t.parse(e[S],1+C.length);if(!w)return null;C.push(toString(w.type))}t.error("Expected arguments of type "+T+", but found ("+C.join(", ")+") instead.")}return null},_0x29fe3c.register=function(e,t){for(var i in _0x29fe3c.definitions=t,t)e[i]=_0x29fe3c},_0x416c3b.register("CompoundExpression",_0x29fe3c);var _0x5ecc26={kind:"number"},_0x23e119={kind:"string"},_0x477c8f={kind:"boolean"},_0xfddddf={kind:"color"},_0x5d071b={kind:"object"},_0x38ecf0={kind:"value"},_0x300445={kind:"error"},_0x15358a={kind:"collator"};function _0x277afe(e,t){return{kind:"array",itemType:e,N:t}}function _0x490363(e){return{type:e}}function _0x5183ea(e,t){var i=t[0],n=t[1],r=t[2],o=t[3];i=i.evaluate(e),n=n.evaluate(e),r=r.evaluate(e);var a=o?o.evaluate(e):1,s=Values.validateRGBA(i,n,r,a);if(s)throw new RuntimeError(s);return new Color(i/255*a,n/255*a,r/255*a,a)}_0x29fe3c.register(_0x97a7f7,{error:[_0x300445,[_0x23e119],function(e,t){var i=t[0];throw new RuntimeError(i.evaluate(e))}],typeof:[_0x23e119,[_0x38ecf0],function(e,t){var i=t[0];return toString(Values.typeOf(i.evaluate(e)))}],"to-rgba":[_0x277afe(_0x5ecc26,4),[_0xfddddf],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[_0xfddddf,[_0x5ecc26,_0x5ecc26,_0x5ecc26],_0x5183ea],rgba:[_0xfddddf,[_0x5ecc26,_0x5ecc26,_0x5ecc26,_0x5ecc26],_0x5183ea],has:{type:_0x477c8f,overloads:[[[_0x23e119],function(e,t){var i=t[0];return has(i.evaluate(e),e.properties())}],[[_0x23e119,_0x5d071b],function(e,t){var i=t[0],n=t[1];return has(i.evaluate(e),n.evaluate(e))}]]},get:{type:_0x38ecf0,overloads:[[[_0x23e119],function(e,t){return _0x3181b4(t[0].evaluate(e),e.properties())}],[[_0x23e119,_0x5d071b],function(e,t){var i=t[0],n=t[1];return _0x3181b4(i.evaluate(e),n.evaluate(e))}]]},"feature-state":[_0x38ecf0,[_0x23e119],function(e,t){return _0x3181b4(t[0].evaluate(e),e.featureState||{})}],properties:[_0x5d071b,[],function(e){return e.properties()}],"geometry-type":[_0x23e119,[],function(e){return e.geometryType()}],id:[_0x38ecf0,[],function(e){return e.id()}],zoom:[_0x5ecc26,[],function(e){return e.globals.zoom}],"heatmap-density":[_0x5ecc26,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[_0x5ecc26,[],function(e){return e.globals.lineProgress||0}],accumulated:[_0x38ecf0,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[_0x5ecc26,_0x490363(_0x5ecc26),function(e,t){for(var i=0,n=0,r=t;n<r.length;n+=1){i+=r[n].evaluate(e)}return i}],"*":[_0x5ecc26,_0x490363(_0x5ecc26),function(e,t){for(var i=1,n=0,r=t;n<r.length;n+=1){i*=r[n].evaluate(e)}return i}],"-":{type:_0x5ecc26,overloads:[[[_0x5ecc26,_0x5ecc26],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)-n.evaluate(e)}],[[_0x5ecc26],function(e,t){return-t[0].evaluate(e)}]]},"/":[_0x5ecc26,[_0x5ecc26,_0x5ecc26],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)/n.evaluate(e)}],"%":[_0x5ecc26,[_0x5ecc26,_0x5ecc26],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)%n.evaluate(e)}],ln2:[_0x5ecc26,[],function(){return Math.LN2}],pi:[_0x5ecc26,[],function(){return Math.PI}],e:[_0x5ecc26,[],function(){return Math.E}],"^":[_0x5ecc26,[_0x5ecc26,_0x5ecc26],function(e,t){var i=t[0],n=t[1];return Math.pow(i.evaluate(e),n.evaluate(e))}],sqrt:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.sqrt(i.evaluate(e))}],log10:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN10}],ln:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.log(i.evaluate(e))}],log2:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN2}],sin:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.sin(i.evaluate(e))}],cos:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.cos(i.evaluate(e))}],tan:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.tan(i.evaluate(e))}],asin:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.asin(i.evaluate(e))}],acos:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.acos(i.evaluate(e))}],atan:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.atan(i.evaluate(e))}],min:[_0x5ecc26,_0x490363(_0x5ecc26),function(e,t){return Math.min.apply(Math,t.map((function(t){return t.evaluate(e)})))}],max:[_0x5ecc26,_0x490363(_0x5ecc26),function(e,t){return Math.max.apply(Math,t.map((function(t){return t.evaluate(e)})))}],abs:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.abs(i.evaluate(e))}],round:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0].evaluate(e);return i<0?-Math.round(-i):Math.round(i)}],floor:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.floor(i.evaluate(e))}],ceil:[_0x5ecc26,[_0x5ecc26],function(e,t){var i=t[0];return Math.ceil(i.evaluate(e))}],"filter-==":[_0x477c8f,[_0x23e119,_0x38ecf0],function(e,t,i){var n=t[0],r=t[1];if(i){var o,a,s=n.value,l=r.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":o=c+d;break;case"-":o=c-d}return o===(a=r.value)}if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(o="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);a="left"==g?d.substring(0,x):d.substring(d.length-x)}else a=r.value;return o===a}return e.properties()[n.value]===e.properties()[r.value]}return e.properties()[n.value]===r.value}],"filter-id-==":[_0x477c8f,[_0x38ecf0],function(e,t){var i=t[0];return e.id()===i.value}],"filter-like":[_0x477c8f,[_0x23e119,_0x23e119],function(e,t){var i=t[0].value,n=t[1].value,r=e.properties();return i in r&&(/^%.*[^%]$/.test(n)?(n=n.replace("%",""),r[i].endsWith(n)):/^(?!%).+%$/.test(n)?(n=n.replace("%",""),r[i].startsWith(n)):(n=n.replace(/%/g,""),r[i].indexOf(n)>-1))}],"filter-type-==":[_0x477c8f,[_0x23e119],function(e,t){var i=t[0];return e.geometryType()===i.value}],"filter-<":[_0x477c8f,[_0x23e119,_0x38ecf0],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<r}],"filter-id-<":[_0x477c8f,[_0x38ecf0],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<r}],"filter->":[_0x477c8f,[_0x23e119,_0x38ecf0],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>r}],"filter-id->":[_0x477c8f,[_0x38ecf0],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[_0x477c8f,[_0x23e119,_0x38ecf0],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<=r}],"filter-id-<=":[_0x477c8f,[_0x38ecf0],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[_0x477c8f,[_0x23e119,_0x38ecf0],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>=r}],"filter-id->=":[_0x477c8f,[_0x38ecf0],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[_0x477c8f,[_0x38ecf0],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[_0x477c8f,[],function(e){return null!==e.id()}],"filter-type-in":[_0x477c8f,[_0x277afe(_0x23e119)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[_0x477c8f,[_0x277afe(_0x38ecf0)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[_0x477c8f,[_0x23e119,_0x277afe(_0x38ecf0)],function(e,t){var i=t[0];return t[1].value.indexOf(e.properties()[i.value])>=0}],"filter-in-large":[_0x477c8f,[_0x23e119,_0x277afe(_0x38ecf0)],function(e,t){var i=t[0],n=t[1];return binarySearch(e.properties()[i.value],n.value,0,n.value.length-1)}],all:{type:_0x477c8f,overloads:[[[_0x477c8f,_0x477c8f],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)&&n.evaluate(e)}],[_0x490363(_0x477c8f),function(e,t){for(var i=0,n=t;i<n.length;i+=1){if(!n[i].evaluate(e))return!1}return!0}]]},crossFields:{type:_0x477c8f,overloads:[[[_0x477c8f,_0x477c8f],function(e,t){var i=t[0],n=t[1];return i.evaluate(e,!0)&&n.evaluate(e,!0)}],[_0x490363(_0x477c8f),function(e,t){for(var i=0,n=t;i<n.length;i+=1){if(!n[i].evaluate(e,!0))return!1}return!0}]]},any:{type:_0x477c8f,overloads:[[[_0x477c8f,_0x477c8f],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)||n.evaluate(e)}],[_0x490363(_0x477c8f),function(e,t){for(var i=0,n=t;i<n.length;i+=1){if(n[i].evaluate(e))return!0}return!1}]]},"!":[_0x477c8f,[_0x477c8f],function(e,t,i){return!t[0].evaluate(e,i)}],"is-supported-script":[_0x477c8f,[_0x23e119],function(e,t){var i=t[0],n=e.globals&&e.globals.isSupportedScript;return!n||n(i.evaluate(e))}],upcase:[_0x23e119,[_0x23e119],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[_0x23e119,[_0x23e119],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[_0x23e119,_0x490363(_0x38ecf0),function(e,t){return t.map((function(t){return Values.toString$1(t.evaluate(e))})).join("")}],"resolved-locale":[_0x23e119,[_0x15358a],function(e,t){return t[0].evaluate(e).resolvedLocale()}]}),_0x4b0289.CompoundExpression=_0x29fe3c;var _0x1286af=(_0x45c52d=!0,function(e,t){var i=_0x45c52d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45c52d=!1,i}),_0x484a41=_0x1286af(void 0,(function(){return _0x484a41.toString().search("(((.+)+)+)+$").toString().constructor(_0x484a41).search("(((.+)+)+)+$")})),_0x45c52d;_0x484a41();var _0x55e221=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new _0x59bf71,this._defaultValue=t?_0x3b33ac(t):null,this._enumValues=t&&"enum"===t.type?t.values:null};function _0x1ec021(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function _0x3b33ac(e){return"color"===e.type&&_0x1ec021(e.default)?new _0x128d69(0,0,0,0):"color"===e.type?_0x128d69.parse(e.default)||null:void 0===e.default?null:e.default}_0x55e221.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r,this.expression.evaluate(this._evaluator)},_0x55e221.prototype.evaluate=function(e,t,i,n,r){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=i||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new RuntimeError("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(e){return!this._warningHistory[e.message]&&(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}},_0x416c3b.register("StyleExpression",_0x55e221);var _0x6a04ce=(_0x2b75e6=!0,function(e,t){var i=_0x2b75e6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b75e6=!1,i}),_0xda7fce=_0x6a04ce(void 0,(function(){return _0xda7fce.toString().search("(((.+)+)+)+$").toString().constructor(_0xda7fce).search("(((.+)+)+)+$")})),_0x2b75e6;function supportsPropertyExpression(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function supportsZoomExpression(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function supportsInterpolation(e){return!!e.expression&&e.expression.interpolated}_0xda7fce();var _0x32ff43=(_0x1aba34=!0,function(e,t){var i=_0x1aba34?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1aba34=!1,i}),_0x5266b2=_0x32ff43(void 0,(function(){return _0x5266b2.toString().search("(((.+)+)+)+$").toString().constructor(_0x5266b2).search("(((.+)+)+)+$")})),_0x1aba34;function _0x21a01e(){}function _0x32cbd7(e){return{result:"success",value:e}}function _0x6e2e44(e){return{result:"error",value:e}}_0x5266b2(),_0x21a01e.isExpression=function(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in _0x97a7f7};var _0x29d51a={kind:"number"},_0x1c862c={kind:"string"},_0x3d932e={kind:"boolean"},_0x54d892={kind:"color"},_0x47fbaa={kind:"value"},_0x2bf5b9={kind:"formatted"},_0xa5fc9={kind:"resolvedImage"};function _0x3a8302(e,t){return{kind:"array",itemType:e,N:t}}function _0xb3c8fc(e){var t=null;if(e instanceof _0x23621d)t=_0xb3c8fc(e.result);else if(e instanceof _0x3af8aa){for(var i of e.args)if(t=_0xb3c8fc(i))break}else(e instanceof _0x7d0e5f||e instanceof _0x29d6fe)&&e.input instanceof _0x4b0289.CompoundExpression&&"zoom"===e.input.name&&(t=e);return t instanceof _0x2bedb9||e.eachChild((e=>{var i=_0xb3c8fc(e);i instanceof _0x2bedb9?t=i:!t&&i?t=new _0x2bedb9("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new _0x2bedb9("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function _0x2d1d1b(e){var t={color:_0x54d892,string:_0x1c862c,number:_0x29d51a,enum:_0x1c862c,boolean:_0x3d932e,formatted:_0x2bf5b9,resolvedImage:_0xa5fc9};return"array"===e.type?_0x3a8302(t[e.value]||_0x47fbaa,e.length):t[e.type]}function _0x1f668a(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function _0xff847(e){return e}function _0x3130a(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}function _0x1853e4(e,t,i){var n=void 0!==e.base?e.base:1;if("number"!==_0x58c25e(i))return _0x4dbdec(e.default,t.default);var r=e.stops.length;if(1===r)return e.stops[0][1];if(i<=e.stops[0][0])return e.stops[0][1];if(i>=e.stops[r-1][0])return e.stops[r-1][1];var o=_0xb00b14(e.stops.map((e=>e[0])),i),a=_0xeeb445(i,n,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],u=interpolate[t.type]||_0xff847;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=colorSpaces[e.colorSpace];u=(e,t)=>c.reverse(c.interpolate(c.forward(e),c.forward(t),a))}return"function"==typeof s.evaluate?{evaluate(...e){var t=s.evaluate.apply(void 0,e),i=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==i)return u(t,i,a)}}:u(s,l,a)}function _0x32a790(e,t,i){return"color"===t.type?i=_0x128d69.parse(i):"formatted"===t.type?i=Formatted.fromString(i.toString()):"resolvedImage"===t.type?i=ResolvedImage.fromString(i.toString()):_0x58c25e(i)!==t.type&&("enum"!==t.type||!t.values[i])&&(i=void 0),_0x4dbdec(i,e.default,t.default)}function _0xcd8fc6(e,t){var i=new _0x4b0289(_0x97a7f7,[],t?_0x2d1d1b(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?_0x32cbd7(new _0x55e221(n,t)):_0x6e2e44(i.errors)}function _0x15402f(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!_0x4ccda4.isStateConstant(t.expression)}function _0x15f8c5(e,t,i,n){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent="camera"!==e&&!_0x4ccda4.isStateConstant(t.expression),this.interpolationType=n}function _0xbfb981(e,t){if("error"===(e=_0xcd8fc6(e,t)).result)return e;var i=e.value.expression,n=_0x4ccda4.isFeatureConstant(i);if(!n&&!supportsPropertyExpression(t))return _0x6e2e44([new _0x2bedb9("","data expressions not supported")]);var r=_0x4ccda4.isGlobalPropertyConstant(i,["zoom"]);if(!r&&!supportsZoomExpression(t))return _0x6e2e44([new _0x2bedb9("","zoom expressions not supported")]);var o=_0xb3c8fc(i);if(!o&&!r)return _0x6e2e44([new _0x2bedb9("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof _0x2bedb9)return _0x6e2e44([o]);if(o instanceof _0x29d6fe&&!supportsInterpolation(t))return _0x6e2e44([new _0x2bedb9("",'"interpolate" expressions cannot be used with this property')]);if(!o)return _0x32cbd7(new _0x15402f(n?"constant":"source",e.value));var a=o instanceof _0x29d6fe?o.interpolation:void 0;return _0x32cbd7(new _0x15f8c5(n?"camera":"composite",e.value,o.labels,a))}function _0x3795ee(e,t){var i,n,r,o="color"===t.type,a=e.stops&&"object"==typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,u=e.type||(supportsInterpolation(t)?"exponential":"interval");if(o&&((e=_0x3130a({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],_0x128d69.parse(e[1])]}))),e.default?e.default=_0x128d69.parse(e.default):e.default=_0x128d69.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!colorSpaces[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)i=_0x1853e4;else if("interval"===u)i=evaluateIntervalFunction;else if("categorical"===u){i=evaluateCategoricalFunction,n=Object.create(null);for(var c=0,h=e.stops;c<h.length;c+=1){var d=h[c];n[d[0]]=d[1]}r=typeof e.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');i=_0x32a790}if(a){for(var f={},p=[],_=0;_<e.stops.length;_++){var m=e.stops[_],g=m[0].zoom;void 0===f[g]&&(f[g]={zoom:g,type:e.type,property:e.property,default:e.default,stops:[]},p.push(g)),f[g].stops.push([m[0].value,m[1]])}for(var x=[],v=0,y=p;v<y.length;v+=1){var $=y[v];x.push([f[$].zoom,_0x3795ee(f[$],t)])}var b={name:"linear"};return{kind:"composite",interpolationType:b,interpolationFactor:_0x29d6fe.interpolationFactor.bind(void 0,b),zoomStops:x.map((function(e){return e[0]})),evaluate:function(i,n){var r=i.zoom;return _0x1853e4({stops:x,base:e.base},t,r).evaluate(r,n)}}}if(l){var T="exponential"===u?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:T,interpolationFactor:_0x29d6fe.interpolationFactor.bind(void 0,T),zoomStops:e.stops.map((function(e){return e[0]})),evaluate:function(o){var a=o.zoom;return i(e,t,a,n,r)}}}return{kind:"source",evaluate:function(o,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?_0x4dbdec(e.default,t.default):i(e,t,s,n,r)}}}function _0x4dbdec(e,t,i){return void 0!==e?e:void 0!==t?t:void 0!==i?i:void 0}function _0xeeb445(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}_0x21a01e.createExpression=function(e,t){var i=new _0x4b0289(_0x97a7f7,[],t?_0x2d1d1b(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?_0x32cbd7(new _0x55e221(n,t)):_0x6e2e44(i.errors)},_0x15402f.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},_0x15402f.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},_0x416c3b.register("ZoomConstantExpression",_0x15402f),_0x15f8c5.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},_0x15f8c5.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},_0x15f8c5.prototype.interpolationFactor=function(e,t,i){return this.interpolationType?_0x29d6fe.interpolationFactor(this.interpolationType,e,t,i):0},_0x416c3b.register("ZoomDependentExpression",_0x15f8c5);var _0x483a91=function(e,t){this._parameters=e,this._specification=t,_0x3130a(this,_0x3795ee(this._parameters,this._specification))};function _0x58c25e(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}_0x483a91.deserialize=function(e){return new _0x483a91(e._parameters,e._specification)},_0x483a91.serialize=function(e){return{_parameters:e._parameters,_specification:e._specification}},_0x416c3b.register("StylePropertyFunction",_0x483a91),_0x21a01e.normalizePropertyExpression=function(e,t){if(_0x1f668a(e))return new _0x483a91(e,t);if(_0x21a01e.isExpression(e)){var i=_0xbfb981(e,t);if("error"===i.result)throw new Error(i.value.map((function(e){return e.key+": "+e.message})).join(", "));return i.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=_0x128d69.parse(e)),{kind:"constant",evaluate:function(){return n}}};var _0x25bf7f=(_0x119736=!0,function(e,t){var i=_0x119736?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x119736=!1,i}),_0x4c9b79=_0x25bf7f(void 0,(function(){return _0x4c9b79.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c9b79).search("(((.+)+)+)+$")})),_0x119736;function _0x570fee(){}_0x4c9b79(),_0x570fee.isExpressionFilter=function(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&Array.isArray(e[2]);case"!in":case"!has":case"none":case"crossFields":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":case"like":case"!like":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,i=e.slice(1);t<i.length;t+=1){var n=i[t];if(!_0x570fee.isExpressionFilter(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}};var _0x536422={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function _0x473edc(e,t){return e<t?-1:e>t?1:0}function _0x63dd4a(e){if(!e)return!0;var t=e[0];return e.length<=1?"any"!==t:"=="===t?_0x369755(e[1],e[2],"=="):"!="===t?_0x28bf68(_0x369755(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?_0x369755(e[1],e[2],t):"any"===t?_0x54f86d(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(_0x63dd4a)):"crossFields"===t?["crossFields"].concat(e.slice(1).map(_0x63dd4a)):"none"===t?["all"].concat(e.slice(1).map(_0x63dd4a).map(_0x28bf68)):"in"===t?_0x21adc5(e[1],e.slice(2)):"!in"===t?_0x28bf68(_0x21adc5(e[1],e.slice(2))):"has"===t?_0x3e4fc1(e[1]):"!has"===t?_0x28bf68(_0x3e4fc1(e[1])):"like"===t?_0x369755(e[1],e[2],"like"):"!like"!==t||_0x28bf68(_0x369755(e[1],e[2],"like"))}function _0x369755(e,t,i){switch(e){case"$type":return["filter-type-"+i,t];case"$id":return["filter-id-"+i,t];default:return["filter-"+i,e,t]}}function _0x54f86d(e){return["any"].concat(e.map(_0x63dd4a))}function _0x21adc5(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(_0x473edc)]]:["filter-in-small",e,["literal",t]]}}function _0x3e4fc1(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function _0x28bf68(e){return["!",e]}_0x570fee.createFilter=function(e){if(null==e)return function(){return!0};!_0x570fee.isExpressionFilter(e)&&(e=_0x63dd4a(e));var t=_0x21a01e.createExpression(e,_0x536422);if("error"===t.result)throw new Error(t.value.map((function(e){return e.key+": "+e.message})).join(", "));return function(e,i){return t.value.evaluate(e,i)}};var D$U=function(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},y$Q=function(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_},g$X={read:D$U,write:y$Q};function h$U(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}h$U.Varint=0,h$U.Fixed64=1,h$U.Bytes=2,h$U.Fixed32=5;var B$Q=4294967296,M$V=1/B$Q;function C$W(e,t,i){var n,r,o=i.buf;if(n=(112&(r=o[i.pos++]))>>4,r<128||(n|=(127&(r=o[i.pos++]))<<3,r<128)||(n|=(127&(r=o[i.pos++]))<<10,r<128)||(n|=(127&(r=o[i.pos++]))<<17,r<128)||(n|=(127&(r=o[i.pos++]))<<24,r<128)||(n|=(1&(r=o[i.pos++]))<<31,r<128))return c$U(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function F$Y(e){return e.type===h$U.Bytes?e.readVarint()+e.pos:e.pos+1}function c$U(e,t,i){return i?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function T$R(e,t){var i,n;if(e>=0?(i=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(i=~(-e%4294967296))?i=i+1|0:(i=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),E$V(i,n,t),N$N(n,t)}function E$V(e,t,i){i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}function N$N(e,t){var i=(7&e)<<4;t.buf[t.pos++]|=i|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function k$O(e,t,i){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=e;r--)i.buf[r+n]=i.buf[r]}function I$14(e,t){for(var i=0;i<e.length;i++)t.writeVarint(e[i])}function U$V(e,t){for(var i=0;i<e.length;i++)t.writeSVarint(e[i])}function A$11(e,t){for(var i=0;i<e.length;i++)t.writeFloat(e[i])}function R$P(e,t){for(var i=0;i<e.length;i++)t.writeDouble(e[i])}function H$W(e,t){for(var i=0;i<e.length;i++)t.writeBoolean(e[i])}function _$O(e,t){for(var i=0;i<e.length;i++)t.writeFixed32(e[i])}function m$S(e,t){for(var i=0;i<e.length;i++)t.writeSFixed32(e[i])}function G$_(e,t){for(var i=0;i<e.length;i++)t.writeFixed64(e[i])}function j$S(e,t){for(var i=0;i<e.length;i++)t.writeSFixed64(e[i])}function V$L(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function p$R(e,t,i){e[i]=t,e[i+1]=t>>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function S$N(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function z$P(e,t,i){for(var n="",r=t;r<i;){var o,a,s,l=e[r],u=null,c=l>239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[r+1]))&&((u=(31&l)<<6|63&o)<=127&&(u=null)):3===c?(o=e[r+1],a=e[r+2],128==(192&o)&&128==(192&a)&&(((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null))):4===c&&(o=e[r+1],a=e[r+2],s=e[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null))),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=c}return n}function J$O(e,t,i){for(var n,r,o=0;o<t.length;o++){if((n=t.charCodeAt(o))>55295&&n<57344){if(!r){n>56319||o+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):r=n;continue}if(n<56320){e[i++]=239,e[i++]=191,e[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(e[i++]=239,e[i++]=191,e[i++]=189,r=null);n<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:(n<65536?e[i++]=n>>12|224:(e[i++]=n>>18|240,e[i++]=n>>12&63|128),e[i++]=n>>6&63|128),e[i++]=63&n|128)}return i}h$U.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=7&n,e(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=V$L(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=S$N(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=V$L(this.buf,this.pos)+V$L(this.buf,this.pos+4)*B$Q;return this.pos+=8,e},readSFixed64:function(){var e=V$L(this.buf,this.pos)+S$N(this.buf,this.pos+4)*B$Q;return this.pos+=8,e},readFloat:function(){var e=g$X.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=g$X.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,n=this.buf;return t=127&(i=n[this.pos++]),i<128||(t|=(127&(i=n[this.pos++]))<<7,i<128)||(t|=(127&(i=n[this.pos++]))<<14,i<128)||(t|=(127&(i=n[this.pos++]))<<21,i<128)?t:C$W(t|=(15&(i=n[this.pos]))<<28,e,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=z$P(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var i=F$Y(this);for(e=e||[];this.pos<i;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===h$U.Varint)for(;this.buf[this.pos++]>127;);else if(t===h$U.Bytes)this.pos=this.readVarint()+this.pos;else if(t===h$U.Fixed32)this.pos+=4;else{if(t!==h$U.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var i=new Uint8Array(t);i.set(this.buf),this.buf=i,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),p$R(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),p$R(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),p$R(this.buf,-1&e,this.pos),p$R(this.buf,Math.floor(e*M$V),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),p$R(this.buf,-1&e,this.pos),p$R(this.buf,Math.floor(e*M$V),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?T$R(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=J$O(this.buf,e,this.pos);var i=this.pos-t;i>=128&&k$O(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),g$X.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),g$X.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i<t;i++)this.buf[this.pos++]=e[i]},writeRawMessage:function(e,t){this.pos++;var i=this.pos;e(t,this);var n=this.pos-i;n>=128&&k$O(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,i){this.writeTag(e,h$U.Bytes),this.writeRawMessage(t,i)},writePackedVarint:function(e,t){this.writeMessage(e,I$14,t)},writePackedSVarint:function(e,t){this.writeMessage(e,U$V,t)},writePackedBoolean:function(e,t){this.writeMessage(e,H$W,t)},writePackedFloat:function(e,t){this.writeMessage(e,A$11,t)},writePackedDouble:function(e,t){this.writeMessage(e,R$P,t)},writePackedFixed32:function(e,t){this.writeMessage(e,_$O,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,m$S,t)},writePackedFixed64:function(e,t){this.writeMessage(e,G$_,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,j$S,t)},writeBytesField:function(e,t){this.writeTag(e,h$U.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,h$U.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,h$U.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,h$U.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,h$U.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,h$U.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,h$U.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,h$U.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,h$U.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,h$U.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var _0x37a2f7=(_0x455947=!0,function(e,t){var i=_0x455947?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x455947=!1,i}),_0x21d882=_0x37a2f7(void 0,(function(){return _0x21d882.toString().search("(((.+)+)+)+$").toString().constructor(_0x21d882).search("(((.+)+)+)+$")})),_0x455947;_0x21d882();var _0x4c869e=function(e,t,i){this.x=e.x,this.y=e.y,this.z=e.z,this.grid=t||new _0xad3464(ae$s,16,0),this.featureIndexArray=i||new _0x55dc22};function _0x4f46e(e){for(var t=1/0,i=1/0,n=-1/0,r=-1/0,o=0,a=e;o<a.length;o+=1){var s=a[o];t=Math.min(t,s.x),i=Math.min(i,s.y),n=Math.max(n,s.x),r=Math.max(r,s.y)}return{minX:t,minY:i,maxX:n,maxY:r}}function _0x55c4eb(e,t){return t-e}function _0x5b03bd(e,t,i){if(e$2b(i)&&i.realtime&&e$2b(i.zoom)){var n=i.zoom-e,r=ae$s/(t*Math.pow(2,n));return r*=t/512}return ae$s/t}_0x4c869e.prototype.insert=function(e,t,i,n,r,o,a){var s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(i,n,r);var l=this.grid;a=a||0;for(var u=0;u<t.length;u++){for(var c=t[u],h=[1/0,1/0,-1/0,-1/0],d=0;d<c.length;d++){var f=c[d];h[0]=Math.min(h[0],f.x),h[1]=Math.min(h[1],f.y),h[2]=Math.max(h[2],f.x),h[3]=Math.max(h[3],f.y)}h[0]<ae$s&&h[1]<ae$s&&h[2]>=0&&h[3]>=0&&l.insert(s,h[0]-a,h[1]-a,h[2]+a,h[3]+a)}},_0x4c869e.prototype.loadVTLayers=function(){return!this.vtLayers&&(this.vtLayers=new _0x3868aa(new h$U(this.rawTileData)).layers,this.sourceLayerCoder=new _0x4c9375(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},_0x4c869e.prototype.query=function(e,t,i){var n=this;this.loadVTLayers();var r=e.params||{},o=_0x5b03bd(this.z,e.tileSize,r),a=_0x570fee.createFilter(r.filter),s=e.queryGeometry,l=5,u=_0x4f46e(s),c=[];e$2b(r.selectTolerance)&&(l+=o*r.selectTolerance),(c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l)).sort(_0x55c4eb);for(var h,d={},f=function(i){var l=c[i];if(l!==h){h=l;var u=n.featureIndexArray.get(l),f=null;n.loadMatchingFeature(d,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,a,r.layers,t,(function(t,i){!f&&(f=_0x1724dc(t));return i.queryIntersectsFeature(s,t,{},f,n.z,e.transform,o,e.pixelPosMatrix,e.adjustScale)}))}},p=0;p<c.length;p++)f(p);return d},_0x4c869e.prototype.loadMatchingFeature=function(e,t,i,n,r,o,a,s){if(e$2b(t)&&e$2b(i)&&e$2b(n)){var l=this.bucketLayerIDs[t];if(!o||arraysIntersect(o,l)){var u=this.sourceLayerCoder.decode(i),c=this.vtLayers[u].feature(n);if(r(new _0x4f93ac(this.z),c))for(var h=0;h<l.length;h++){var d=l[h];if(!(o&&o.indexOf(d)<0)){var f=a[d];if(f){var p=!s||s(c,f);if(p){c.layer=f.serialize();var _=e[d];void 0===_&&(_=e[d]=[]),_.push({featureIndex:n,feature:c,intersectionZ:p})}}}}}}},_0x4c869e.prototype.lookupSymbolFeatures=function(e,t,i,n,r,o){var a={};this.loadVTLayers();for(var s=createFilter(n),l=0,u=e;l<u.length;l+=1){var c=u[l];this.loadMatchingFeature(a,t,i,c,s,r,o)}return a},_0x4c869e.prototype.hasLayer=function(e){for(var t=0,i=this.bucketLayerIDs;t<i.length;t+=1)for(var n=0,r=i[t];n<r.length;n+=1){if(e===r[n])return!0}return!1},_0x416c3b.register("FeatureIndex",_0x4c869e,{omit:["rawTileData","sourceLayerCoder","vtLayers"]});var _0x482215=(_0x44cff1=!0,function(e,t){var i=_0x44cff1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x44cff1=!1,i}),_0x1fd2f6=_0x482215(void 0,(function(){return _0x1fd2f6.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fd2f6).search("(((.+)+)+)+$")})),_0x44cff1;_0x1fd2f6();var _0x23dd45={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};function _0x55f30f(e,t){void 0===t&&(t=1);var i=0,n=0;return{members:e.map((function(e){var r=_0x2860a1(e.type),o=i=_0x2f818c(i,Math.max(t,r)),a=e.components||1;return n=Math.max(n,r),i+=r*a,{name:e.name,type:e.type,components:a,offset:o}})),size:_0x2f818c(i,Math.max(n,t)),alignment:t}}function _0x2860a1(e){return _0x23dd45[e].BYTES_PER_ELEMENT}function _0x2f818c(e,t){return Math.ceil(e/t)*t}var _0x24b92a=(_0x4fcd55=!0,function(e,t){var i=_0x4fcd55?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fcd55=!1,i}),_0x455449=_0x24b92a(void 0,(function(){return _0x455449.toString().search("(((.+)+)+)+$").toString().constructor(_0x455449).search("(((.+)+)+)+$")})),_0x4fcd55;_0x455449();var _0x4b6d5a=function(e){void 0===e&&(e=[]),this.segments=e};_0x4b6d5a.prototype.prepareSegment=function(e,t,i,n){var r=this.segments[this.segments.length-1];return(!r||r.vertexLength+e>_0x4b6d5a.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==n)&&(r={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},void 0!==n&&(r.sortKey=n),this.segments.push(r)),r},_0x4b6d5a.prototype.get=function(){return this.segments},_0x4b6d5a.prototype.destroy=function(){for(var e=0,t=this.segments;e<t.length;e+=1){var i=t[e];for(var n in i.cesiumVaos)i.cesiumVaos[n].destroy()}},_0x4b6d5a.simpleSegment=function(e,t,i,n){return new _0x4b6d5a([{vertexOffset:e,primitiveOffset:t,vertexLength:i,primitiveLength:n,vaos:{},cesiumVaos:{},drawCommands:{},sortKey:0}])},_0x4b6d5a.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,_0x416c3b.register("SegmentVector",_0x4b6d5a);var _0x5d8f70=(_0x39ba19=!0,function(e,t){var i=_0x39ba19?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39ba19=!1,i}),_0x2ec1c5=_0x5d8f70(void 0,(function(){return _0x2ec1c5.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ec1c5).search("(((.+)+)+)+$")})),_0x39ba19;_0x2ec1c5();var _0x320c7c=function(e,t,i){this.property=e,this.value=t,this.parameters=i};_0x320c7c.prototype.isConstant=function(){return"constant"===this.value.kind},_0x320c7c.prototype.constantOr=function(e){return"constant"===this.value.kind?this.value.value:e},_0x320c7c.prototype.evaluate=function(e,t,i){return this.property.evaluate(this.value,this.parameters,e,t,i)};var _0x5ec44f={},_0x578af6=function(e,t){this.gl=e.gl,this.location=t};_0x5ec44f.Uniform1i=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},t}(_0x578af6),_0x5ec44f.Uniform1f=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(_0x578af6),_0x5ec44f.Uniform2f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(_0x578af6),_0x5ec44f.Uniform3f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(_0x578af6),_0x5ec44f.Uniform4f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},t}(_0x578af6),_0x5ec44f.UniformColor=function(e){function t(t,i){e.call(this,t,i),this.current=_0x128d69.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(_0x578af6);var _0x3363a6=new Float32Array(16);_0x5ec44f.UniformMatrix4f=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,t,i),this.current=_0x3363a6}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.set=function(e){this.gl.uniformMatrix4fv(this.location,!1,e)},r}(_0x578af6);var _0x2276e=(_0x245f52=!0,function(e,t){var i=_0x245f52?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x245f52=!1,i}),_0x5839c4=_0x2276e(void 0,(function(){return _0x5839c4.toString().search("(((.+)+)+)+$").toString().constructor(_0x5839c4).search("(((.+)+)+)+$")})),_0x245f52;function _0x3cb0f8(){}_0x5839c4(),_0x3cb0f8.toVertexBuffer=function(e,t,i,n){var r=t$Y.createVertexBuffer({context:e,typedArray:t.arrayBuffer,usage:n?A$19.DYNAMIC_DRAW:A$19.STATIC_DRAW});return r.vertexArrayDestroyable=!1,r.bytesPerElement=t.bytesPerElement,r.length=t.length,r.attributes=i,r.itemSize=t.bytesPerElement,r.dynamicDraw=n,!n&&delete t.arrayBuffer,r},_0x3cb0f8.toIndexBuffer=function(e,t,i){if(0!==t.length){var n=t$Y.createIndexBuffer({context:e,typedArray:t.arrayBuffer,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});return n.vertexArrayDestroyable=!1,n.dynamicDraw=i,!n.dynamicDraw&&delete t.arrayBuffer,n}},_0x3cb0f8.toRenderState=function(e,t,i){var n=Ee$r.DISABLED;e.blendFunction[0]==de$x.ONE&&e.blendFunction[1]==de$x.ONE_MINUS_SRC_ALPHA&&(n=Ee$r.ALPHA_BLEND);var r={frontFace:i.frontFace,cull:{enabled:i.enable,face:i.mode},depthRange:{near:t.range[0],far:t.range[1]},depthTest:{enabled:t.func!==de$x.ALWAYS,func:t.func},depthMask:t.mask,colorMask:{red:e.mask[0],green:e.mask[1],blue:e.mask[2],alpha:e.mask[3]},blending:n};return d$1m.fromCache(r)},_0x3cb0f8.toComponentDatatype=function(e){switch(e){case"Int8":return S$12.BYTE;case"Uint8":return S$12.UNSIGNED_BYTE;case"Int16":return S$12.SHORT;case"Uint16":return S$12.UNSIGNED_SHORT;case"Int32":return S$12.INT;case"Uint32":return S$12.UNSIGNED_INT;default:return S$12.FLOAT}},_0x3cb0f8.mbxAttributeToCesiumVertexArrtribute=function(e,t,i,n){var r=this.toComponentDatatype(e.type);S$12.getSizeInBytes(r);var o=t.bytesPerElement,a=e.offset+o*(n||0);return{name:e.name,index:i,vertexBuffer:t,componentsPerAttribute:e.components,componentDatatype:r,offsetInBytes:a,strideInBytes:o,normalize:!1}};var _0x477f90=(_0x38c77e=!0,function(e,t){var i=_0x38c77e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38c77e=!1,i}),_0x518124=_0x477f90(void 0,(function(){return _0x518124.toString().search("(((.+)+)+)+$").toString().constructor(_0x518124).search("(((.+)+)+)+$")})),_0x38c77e;_0x518124();var _0x5ace2f=function(){this.ids=[],this.positions=[],this.indexed=!1};function _0xf387b9(e,t,i,n){if(!(i>=n)){for(var r=e[i+n>>1],o=i-1,a=n+1;;){do{o++}while(e[o]<r);do{a--}while(e[a]>r);if(o>=a)break;_0x2d9376(e,o,a),_0x2d9376(t,3*o,3*a),_0x2d9376(t,3*o+1,3*a+1),_0x2d9376(t,3*o+2,3*a+2)}_0xf387b9(e,t,i,a),_0xf387b9(e,t,a+1,n)}}function _0x2d9376(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}_0x5ace2f.prototype.add=function(e,t,i,n){this.ids.push(e),this.positions.push(t,i,n)},_0x5ace2f.prototype.getPositions=function(e){for(var t=0,i=this.ids.length-1;t<i;){var n=t+i>>1;this.ids[n]>=e?i=n:t=n+1}for(var r=[];this.ids[t]===e;){var o=this.positions[3*t],a=this.positions[3*t+1],s=this.positions[3*t+2];r.push({index:o,start:a,end:s}),t++}return r},_0x5ace2f.serialize=function(e,t){var i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return _0xf387b9(i,n,0,i.length-1),t&&t.push(i.buffer,n.buffer),{ids:i,positions:n}},_0x5ace2f.deserialize=function(e){var t=new _0x5ace2f;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},_0x416c3b.register("FeaturePositionMap",_0x5ace2f);var _0x1489e4=(_0x35f4cf=!0,function(e,t){var i=_0x35f4cf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x35f4cf=!1,i}),_0x1729fd=_0x1489e4(void 0,(function(){return _0x1729fd.toString().search("(((.+)+)+)+$").toString().constructor(_0x1729fd).search("(((.+)+)+)+$")})),_0x35f4cf;function _0x5aaf90(e,t,i){return Math.min(i,Math.max(t,e))}function _0x5acd43(e,t){return 256*(e=_0x5aaf90(Math.floor(e),0,255))+(t=_0x5aaf90(Math.floor(t),0,255))}function _0x249c0e(e){return[_0x5acd43(255*e.r,255*e.g),_0x5acd43(255*e.b,255*e.a)]}_0x1729fd();var _0x49d100=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0};_0x49d100.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},_0x49d100.prototype.setConstantPatternPositions=function(){},_0x49d100.prototype.populatePaintArray=function(){},_0x49d100.prototype.updatePaintArray=function(){},_0x49d100.prototype.upload=function(){},_0x49d100.prototype.destroy=function(){},_0x49d100.prototype.setUniforms=function(e,t,i,n){t.set(n.constantOr(this.value))},_0x49d100.prototype.getBinding=function(e,t){return"color"===this.type?new _0x5ec44f.UniformColor(e,t):new _0x5ec44f.Uniform1f(e,t)},_0x49d100.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){var e=n.get(i).constantOr(r.value);return"color"===r.type&&(e.red=e.r,e.green=e.g,e.blue=e.b,e.alpha=e.a),e}},_0x49d100.serialize=function(e){var t=e.value,i=e.names,n=e.type;return{value:_0x416c3b.serialize(t),names:i,type:n}},_0x49d100.deserialize=function(e){var t=e.value,i=e.names,n=e.type;return new _0x49d100(_0x416c3b.deserialize(t),i,n)};var _0xa17f28=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};_0xa17f28.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},_0xa17f28.prototype.populatePaintArray=function(){},_0xa17f28.prototype.updatePaintArray=function(){},_0xa17f28.prototype.upload=function(){},_0xa17f28.prototype.destroy=function(){},_0xa17f28.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},_0xa17f28.prototype.setUniforms=function(e,t,i,n,r){var o=this.patternPositions;"u_pattern_to"===r&&o.patternTo&&t.set(e$29(o.patternTo[0],o.patternTo[1],o.patternTo[2],o.patternTo[3])),"u_pattern_from"===r&&o.patternFrom&&t.set(e$29(o.patternFrom[0],o.patternFrom[1],o.patternFrom[2],o.patternFrom[3]))},_0xa17f28.prototype.getBinding=function(e,t){return new _0x5ec44f.Uniform4f(e,t)},_0xa17f28.prototype.setUniformMap=function(e,t,i,n){var r=this.patternPositions;e[t]=function(){return"u_pattern_to"===t&&r.patternTo?new e$29(r.patternTo[0],r.patternTo[1],r.patternTo[2],r.patternTo[3]):"u_pattern_from"===t&&r.patternFrom?new e$29(r.patternFrom[0],r.patternFrom[1],r.patternFrom[2],r.patternFrom[3]):void console.log("CrossFadedConstantBinder is not support")}};var _0x4cd7c8=function(e,t,i,n){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?2:1,offset:0}})),this.paintVertexArray=new n};_0x4cd7c8.prototype.defines=function(){return[]},_0x4cd7c8.prototype.setConstantPatternPositions=function(){},_0x4cd7c8.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new _0x4f93ac(0),t,{},[],n);if("color"===this.type)for(var s=_0x249c0e(a),l=o;l<e;l++)r.emplaceBack(s[0],s[1]);else{for(var u=o;u<e;u++)r.emplaceBack(a);this.maxValue=Math.max(this.maxValue,a)}},_0x4cd7c8.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:0},i,n);if("color"===this.type)for(var a=_0x249c0e(o),s=e;s<t;s++)r.emplace(s,a[0],a[1]);else{for(var l=e;l<t;l++)r.emplace(l,o);this.maxValue=Math.max(this.maxValue,o)}},_0x4cd7c8.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},_0x4cd7c8.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},_0x4cd7c8.prototype.setUniforms=function(e,t){t.set(0)},_0x4cd7c8.prototype.getBinding=function(e,t){return new _0x5ec44f.Uniform1f(e,t)},_0x4cd7c8.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};var _0x1affe0=function(e,t,i,n,r,o){this.expression=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.type=i,this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?4:2,offset:0}})),this.paintVertexArray=new a};_0x1affe0.prototype.defines=function(){return[]},_0x1affe0.prototype.setConstantPatternPositions=function(){},_0x1affe0.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new _0x4f93ac(this.zoom),t,{},[],n),s=this.expression.evaluate(new _0x4f93ac(this.zoom+1),t,{},[],n);if("color"===this.type)for(var l=_0x249c0e(a),u=_0x249c0e(s),c=o;c<e;c++)r.emplaceBack(l[0],l[1],u[0],u[1]);else{for(var h=o;h<e;h++)r.emplaceBack(a,s);this.maxValue=Math.max(this.maxValue,a,s)}},_0x1affe0.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},i,n),a=this.expression.evaluate({zoom:this.zoom+1},i,n);if("color"===this.type)for(var s=_0x249c0e(o),l=_0x249c0e(a),u=e;u<t;u++)r.emplace(u,s[0],s[1],l[0],l[1]);else{for(var c=e;c<t;c++)r.emplace(c,o,a);this.maxValue=Math.max(this.maxValue,o,a)}},_0x1affe0.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},_0x1affe0.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},_0x1affe0.prototype.interpolationFactor=function(e){return this.useIntegerZoom&&(e=Math.floor(e)),_0x5aaf90(this.expression.interpolationFactor(e,this.zoom,this.zoom+1),0,1)},_0x1affe0.prototype.setUniforms=function(e,t,i){t.set(this.interpolationFactor(i.zoom))},_0x1affe0.prototype.getBinding=function(e,t){return new _0x5ec44f.Uniform1f(e,t)},_0x1affe0.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){return r.interpolationFactor(0)}};var _0x38b629=function(e,t,i,n,r,o,a){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0,this.layerId=a,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:4,offset:0}})),this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o};_0x38b629.prototype.defines=function(){return[]},_0x38b629.prototype.setConstantPatternPositions=function(){},_0x38b629.prototype.populatePaintArray=function(e,t,i){var n=this.zoomInPaintVertexArray,r=this.zoomOutPaintVertexArray,o=this.layerId,a=n.length;if(n.reserve(e),r.reserve(e),i&&t.patterns&&t.patterns[o]){var s=t.patterns[o],l=s.min,u=s.mid,c=s.max,h=i[l],d=i[u],f=i[c];if(!h||!d||!f)return;for(var p=a;p<e;p++)n.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1]),r.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},_0x38b629.prototype.updatePaintArray=function(e,t,i,n,r){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(r&&i.patterns&&i.patterns[s]){var l=i.patterns[s],u=l.min,c=l.mid,h=l.max,d=r[u],f=r[c],p=r[h];if(!d||!f||!p)return;for(var _=e;_<t;_++)o.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],d.tl[0],d.tl[1],d.br[0],d.br[1]),a.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],p.tl[0],p.tl[1],p.br[0],p.br[1])}},_0x38b629.prototype.upload=function(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.zoomInPaintVertexArray,this.paintVertexAttributes),this.zoomOutPaintVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.zoomOutPaintVertexArray,this.paintVertexAttributes))},_0x38b629.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},_0x38b629.prototype.setUniforms=function(e,t){t.set(0)},_0x38b629.prototype.getBinding=function(e,t){return new Uniform1f(e,t)},_0x38b629.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};class _0x5489a3{constructor(){this.binders={},this.cacheKey="",this._buffers=[]}static createDynamic(e,t,i){const n=new _0x5489a3,r=[];for(const o in e.paint._values){if(!i(o))continue;const a=e.paint.get(o);if(!(a instanceof _0x320c7c&&supportsPropertyExpression(a.property.specification)))continue;const s=_0x581d75(o,e.type),l=a.property.specification.type,u=a.property.useIntegerZoom;if("cross-faded"===a.property.specification["property-type"]||"cross-faded-data-driven"===a.property.specification["property-type"])if("constant"===a.value.kind)n.binders[o]=new _0xa17f28(a.value.value,s,l),r.push("/u_"+o);else{const i=_0x24ec30(o,l,"source");n.binders[o]=new _0x38b629(a.value,s,l,u,t,i,e.id),r.push("/a_"+o)}else if("constant"===a.value.kind)n.binders[o]=new _0x49d100(a.value.value,s,l),r.push("/u_"+o);else if("source"===a.value.kind){const e=_0x24ec30(o,l,"source");n.binders[o]=new _0x4cd7c8(a.value,s,l,e),r.push("/a_"+o)}else{const e=_0x24ec30(o,l,"composite");n.binders[o]=new _0x1affe0(a.value,s,l,u,t,e),r.push("/z_"+o)}}return n.cacheKey=r.sort().join(""),n}populatePaintArrays(e,t,i,n,r){for(const i in this.binders){this.binders[i].populatePaintArray(e,t,n,r)}}setConstantPatternPositions(e,t){for(const i in this.binders){this.binders[i].setConstantPatternPositions(e,t)}}updatePaintArrays(e,t,i,n,r){let o=!1;for(const a in e){const s=t.getPositions(+a);for(const t of s){const s=i.feature(t.index);for(const i in this.binders){const l=this.binders[i];if(!(l instanceof _0x49d100||l instanceof _0xa17f28)&&!0===l.expression.isStateDependent){const u=n.paint.get(i);l.expression=u.value,l.updatePaintArray(t.start,t.end,s,e[a],r),o=!0}}}}return o}defines(){var e=[];for(var t in this.binders)e.push.apply(e,this.binders[t].defines());return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){const i=[];for(const n in this.binders){const r=this.binders[n];for(const o of r.uniformNames)if(t[o]){const a=r.getBinding(e,t[o]);i.push({name:o,property:n,binding:a})}}return i}setUniforms(e,t,i,n){for(const{name:r,property:o,binding:a}of t)this.binders[o].setUniforms(e,a,n,i.get(o),r)}updatePatternPaintBuffers(e){const t=[];for(const i in this.binders){const n=this.binders[i];if(n instanceof _0x38b629){const i=2===e.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;i&&t.push(i)}else(n instanceof _0x4cd7c8||n instanceof _0x1affe0)&&n.paintVertexBuffer&&t.push(n.paintVertexBuffer)}this._buffers=t}upload(e){for(const t in this.binders)this.binders[t].upload(e);const t=[];for(const e in this.binders){const i=this.binders[e];(i instanceof _0x4cd7c8||i instanceof _0x1affe0)&&i.paintVertexBuffer&&t.push(i.paintVertexBuffer)}this._buffers=t}getAttributeLocation(){for(var e=0,t={},i=0;i<this.layoutAttributes.length;i++){t[this.layoutAttributes[i].name]=i,e++}for(var n=this.getPaintVertexBuffers(),r=0;n&&r<n.length;r++)for(var o=n[r],a=0;a<o.attributes.length;a++){t[o.attributes[a].name]=e++}return t}getUniformMaps(e,t,i){for(var n in this.binders)for(var r=this.binders[n],o=0,a=r.uniformNames;o<a.length;o+=1){var s=a[o];e[s]&&r.setUniformMap(i,s,n,t)}for(var l in e)!i[l]&&l.indexOf("_t")>-1&&(i[l]=function(){return 0});return i}destroy(){for(const e in this.binders)this.binders[e].destroy()}}class ProgramConfigurationSet{constructor(e,t,i,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=_0x5489a3.createDynamic(r,i,n),this.programConfigurations[r.id].layoutAttributes=e;this.needsUpload=!1,this._featureMap=new _0x5ace2f,this._bufferOffset=0}populatePaintArrays(e,t,i,n,r){for(const o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(e,t,i,n,r);void 0!==t.id&&this._featureMap.add(+t.id,i,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,i,n){for(const r of i)this.needsUpload=this.programConfigurations[r.id].updatePaintArrays(e,this._featureMap,t,r,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function _0x581d75(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"text-show-background":["show-background"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function _0x1bef5d(e){return{"line-pattern":{source:_0x44766f,composite:_0x44766f},"fill-pattern":{source:_0x44766f,composite:_0x44766f},"fill-extrusion-pattern":{source:_0x44766f,composite:_0x44766f}}[e]}function _0x24ec30(e,t,i){var n={color:{source:_0x3e5f67,composite:_0x2f4994},number:{source:_0x4d30a7,composite:_0x3e5f67}},r=_0x1bef5d(e);return r&&r[i]||n[t][i]}_0x416c3b.register("ConstantBinder",_0x49d100),_0x416c3b.register("CrossFadedConstantBinder",_0xa17f28),_0x416c3b.register("SourceExpressionBinder",_0x4cd7c8),_0x416c3b.register("CrossFadedCompositeBinder",_0x38b629),_0x416c3b.register("CompositeExpressionBinder",_0x1affe0),_0x416c3b.register("ProgramConfiguration",_0x5489a3,{omit:["_buffers"]}),_0x416c3b.register("ProgramConfigurationSet",ProgramConfigurationSet);var _0x35f096=(_0x1cbecd=!0,function(e,t){var i=_0x1cbecd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1cbecd=!1,i}),_0x1e52e9=_0x35f096(void 0,(function(){return _0x1e52e9.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e52e9).search("(((.+)+)+)+$")})),_0x1cbecd;_0x1e52e9();var _0x13d567=_0x55f30f([{name:"a_pos",components:2,type:"Int16"}],4),_0x12a7d3=_0x13d567.members,_0x3394b0=_0x55f30f([{name:"a_pos",components:2,type:"Float32"}],4),_0x2f0319=_0x3394b0.members;function _0x31cda6(e,t,i,n,r){e.emplaceBack(2*t+(n+1)/2,2*i+(r+1)/2)}var _0x20263c=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this._sourceLayerIds={};var t=this;this.layerIds=this.layers.map((function(e,i){return t._sourceLayerIds[e.sourceLayer]=i,e.sourceLayer})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new _0x18a187,this.indexArray=new _0xbd6def,this.segments=new _0x4b6d5a,this.programConfigurations=new ProgramConfigurationSet(members,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x20263c.prototype.populate=function(e,t){var i=this.layers[0],n=[],r=null;"circle"===i.type&&(r=i.layout.get("circle-sort-key"));for(var o=0,a=e;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.index,c=s.sourceLayerIndex,h=s.sourceLayerId,d=this._sourceLayerIds[h],f=this.layers[d];if(f){var p=ae$s/512,_=f.paint.get("circle-radius").value.value*p;if(this.layers[0]._featureFilter(new _0x4f93ac(0),l)){var m=_0x1724dc(l),g=r?r.evaluate(l,{}):void 0,x={id:l.id,properties:l.properties,type:l.type,sourceLayerIndex:c,index:u,geometry:m,patterns:{},sortKey:g,circleRadius:_};n.push(x)}}}r&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var v=0,y=n;v<y.length;v+=1){var $=y[v],b=$,T=b.geometry,C=b.index,S=b.sourceLayerIndex,w=e[C].feature;this.addFeature($,T,C),t.featureIndex.insert(w,T,C,S,this.index,void 0,b.circleRadius)}},_0x20263c.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},_0x20263c.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_0x20263c.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_0x20263c.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=e.webgpu?_0x2f0319:_0x12a7d3;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0x3cb0f8.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},_0x20263c.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},_0x20263c.prototype.clear=function(){e$2b(this.layoutVertexArray)&&(this.layoutVertexArray=null),e$2b(this.indexArray)&&(this.indexArray=null)},_0x20263c.prototype.addFeature=function(e,t,i){for(var n=0,r=t;n<r.length;n+=1)for(var o=0,a=r[n];o<a.length;o+=1){var s=a[o],l=s.x,u=s.y;if(!(l<0||l>=ae$s||u<0||u>=ae$s)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),h=c.vertexLength;_0x31cda6(this.layoutVertexArray,l,u,-1,-1),_0x31cda6(this.layoutVertexArray,l,u,1,-1),_0x31cda6(this.layoutVertexArray,l,u,1,1),_0x31cda6(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,{})},_0x416c3b.register("CircleBucket",_0x20263c,{omit:["layers"]});var _0x275dab=(_0x19e1eb=!0,function(e,t){var i=_0x19e1eb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19e1eb=!1,i}),_0x28059b=_0x275dab(void 0,(function(){return _0x28059b.toString().search("(((.+)+)+)+$").toString().constructor(_0x28059b).search("(((.+)+)+)+$")})),_0x19e1eb;_0x28059b();var _0x3f772a=function(e){this.specification=e};_0x3f772a.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},_0x3f772a.prototype.interpolate=function(e,t,i){var n=interpolate[this.specification.type];return n?n(e,t,i):e},_0x416c3b.register("DataConstantProperty",_0x3f772a);var _0x3bec47=(_0x33a44f=!0,function(e,t){var i=_0x33a44f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33a44f=!1,i}),_0x497d93=_0x3bec47(void 0,(function(){return _0x497d93.toString().search("(((.+)+)+)+$").toString().constructor(_0x497d93).search("(((.+)+)+)+$")})),_0x33a44f;_0x497d93();var _0x5678d2=function(e,t){this.specification=e,this.overrides=t};_0x5678d2.prototype.possiblyEvaluate=function(e,t,i){return"constant"===e.expression.kind||"camera"===e.expression.kind?new _0x320c7c(this,{kind:"constant",value:e.expression.evaluate(t,null,{},i)},t):new _0x320c7c(this,e.expression,t)},_0x5678d2.prototype.interpolate=function(e,t,i){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new _0x320c7c(this,{kind:"constant",value:void 0},e.parameters);var n=interpolate[this.specification.type];return n?new _0x320c7c(this,{kind:"constant",value:n(e.value.value,t.value.value,i)},e.parameters):e},_0x5678d2.prototype.evaluate=function(e,t,i,n,r){return"constant"===e.kind?e.value:e.evaluate(t,i,n,r)},_0x416c3b.register("DataDrivenProperty",_0x5678d2);var _0x340bc0=(_0x183e58=!0,function(e,t){var i=_0x183e58?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x183e58=!1,i}),_0x312dcc=_0x340bc0(void 0,(function(){return _0x312dcc.toString().search("(((.+)+)+)+$").toString().constructor(_0x312dcc).search("(((.+)+)+)+$")})),_0x183e58;_0x312dcc();var _0xcc3791=function(e,t){this.property=e,this.value=t,this.expression=_0x21a01e.normalizePropertyExpression(void 0===t?e.specification.default:t,e.specification)};_0xcc3791.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},_0xcc3791.prototype.possiblyEvaluate=function(e,t){return this.property.possiblyEvaluate(this,e,t)};var _0x54aa1b=(_0x2f0b4a=!0,function(e,t){var i=_0x2f0b4a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f0b4a=!1,i}),_0x24fe87=_0x54aa1b(void 0,(function(){return _0x24fe87.toString().search("(((.+)+)+)+$").toString().constructor(_0x24fe87).search("(((.+)+)+)+$")})),_0x2f0b4a;function _0x4155da(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,i=t*e;return 4*(e<.5?i:3*(e-t)+i-.75)}_0x24fe87();var _0x4ef771=function(e,t,i,n,r){this.property=e,this.value=t,this.begin=r+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=i)};_0x4ef771.prototype.possiblyEvaluate=function(e,t){var i=e.now||0,n=this.value.possiblyEvaluate(e,t),r=this.prior;if(r){if(i>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(i<this.begin)return r.possiblyEvaluate(e,t);var o=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(r.possiblyEvaluate(e,t),n,_0x4155da(o))}return n};var _0x2d26a9=(_0x138591=!0,function(e,t){var i=_0x138591?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x138591=!1,i}),_0x2403ce=_0x2d26a9(void 0,(function(){return _0x2403ce.toString().search("(((.+)+)+)+$").toString().constructor(_0x2403ce).search("(((.+)+)+)+$")})),_0x138591;_0x2403ce();var _0x14dd77=function(e){this.property=e,this.value=new _0xcc3791(e,void 0)};_0x14dd77.prototype.transitioned=function(e,t){return new _0x4ef771(this.property,this.value,t,extend$1({},e.transition,this.transition),e.now)},_0x14dd77.prototype.untransitioned=function(){return new _0x4ef771(this.property,this.value,null,{},0)};var _0x12bf48=(_0xd8807d=!0,function(e,t){var i=_0xd8807d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd8807d=!1,i}),_0x996d9d=_0x12bf48(void 0,(function(){return _0x996d9d.toString().search("(((.+)+)+)+$").toString().constructor(_0x996d9d).search("(((.+)+)+)+$")})),_0xd8807d;_0x996d9d();var _0x3699c0=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var i=e[t];i.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new _0xcc3791(i,void 0),r=this.defaultTransitionablePropertyValues[t]=new _0x14dd77(i);this.defaultTransitioningPropertyValues[t]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}},_0x5c7d1e=(_0x380f4f=!0,function(e,t){var i=_0x380f4f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x380f4f=!1,i}),_0x1016ce=_0x5c7d1e(void 0,(function(){return _0x1016ce.toString().search("(((.+)+)+)+$").toString().constructor(_0x1016ce).search("(((.+)+)+)+$")})),_0x380f4f;function _0x4191d9(){}_0x1016ce(),_0x4191d9.getMaximumPaintValue=function(e,t,i){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:i.programConfigurations.get(t.id).binders[e].maxValue},_0x4191d9.translateDistance=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},_0x4191d9.translate=function(e,t,i,n,r){if(!t||!t[0]&&!t[1])return e;var o=_0x46bdc2.convert(t)._mult(r);"viewport"===i&&o._rotate(-n);for(var a=[],s=0;s<e.length;s++){var l=e[s];a.push(l.sub(o))}return a};var _0x167729=(_0x35d168=!0,function(e,t){var i=_0x35d168?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x35d168=!1,i}),_0x480828=_0x167729(void 0,(function(){return _0x480828.toString().search("(((.+)+)+)+$").toString().constructor(_0x480828).search("(((.+)+)+)+$")})),_0x35d168;_0x480828();var _0x321cde=function(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)};_0x321cde.prototype.get=function(e){return this._values[e]};var _0x2cb8db=(_0x6633d=!0,function(e,t){var i=_0x6633d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6633d=!1,i}),_0x3788bc=_0x2cb8db(void 0,(function(){return _0x3788bc.toString().search("(((.+)+)+)+$").toString().constructor(_0x3788bc).search("(((.+)+)+)+$")})),_0x6633d;_0x3788bc();var _0x433e68=function(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)};_0x433e68.prototype.getValue=function(e){return clone(this._values[e].value)},_0x433e68.prototype.setValue=function(e,t){this._values[e]=new _0xcc3791(this._values[e].property,null===t?void 0:clone(t))},_0x433e68.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r)}return e},_0x433e68.prototype.possiblyEvaluate=function(e,t){for(var i=new _0x321cde(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i};var _0x3e093f=(_0x59cc95=!0,function(e,t){var i=_0x59cc95?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59cc95=!1,i}),_0x45980c=_0x3e093f(void 0,(function(){return _0x45980c.toString().search("(((.+)+)+)+$").toString().constructor(_0x45980c).search("(((.+)+)+)+$")})),_0x59cc95;_0x45980c();var _0x2284e2=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};_0x2284e2.prototype.possiblyEvaluate=function(e,t){for(var i=new _0x321cde(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i},_0x2284e2.prototype.hasTransition=function(){for(var e=0,t=Object.keys(this._values);e<t.length;e+=1){var i=t[e];if(this._values[i].prior)return!0}return!1};var _0x144e8f=(_0x4c49ea=!0,function(e,t){var i=_0x4c49ea?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c49ea=!1,i}),_0x5df92c=_0x144e8f(void 0,(function(){return _0x5df92c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5df92c).search("(((.+)+)+)+$")})),_0x4c49ea;_0x5df92c();var _0x3ce824=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};_0x3ce824.prototype.getValue=function(e){return clone(this._values[e].value.value)},_0x3ce824.prototype.setValue=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new _0x14dd77(this._values[e].property)),this._values[e].value=new _0xcc3791(this._values[e].property,null===t?void 0:clone(t))},_0x3ce824.prototype.getTransition=function(e){return clone(this._values[e].transition)},_0x3ce824.prototype.setTransition=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new _0x14dd77(this._values[e].property)),this._values[e].transition=clone(t)||void 0},_0x3ce824.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r);var o=this.getTransition(n);void 0!==o&&(e[n+"-transition"]=o)}return e},_0x3ce824.prototype.transitioned=function(e,t){for(var i=new _0x2284e2(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].transitioned(e,t._values[o])}return i},_0x3ce824.prototype.untransitioned=function(){for(var e=new _0x2284e2(this._properties),t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t];e._values[n]=this._values[n].untransitioned()}return e};var _0x2ee073=(_0x386893=!0,function(e,t){var i=_0x386893?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x386893=!1,i}),_0x47caf1=_0x2ee073(void 0,(function(){return _0x47caf1.toString().search("(((.+)+)+)+$").toString().constructor(_0x47caf1).search("(((.+)+)+)+$")})),_0x386893;_0x47caf1();var _0x16ab8f="-transition";function _0x353e3f(e,t){if(this.id=e.id,this.type=e.type,"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new _0x433e68(t.layout)),t.paint)){for(var i in this._transitionablePaint=new _0x3ce824(t.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var n in e.layout)this.setLayoutProperty(n,e.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}_0x353e3f.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},_0x353e3f.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},_0x353e3f.prototype.setLayoutProperty=function(e,t,i){if(null!=t)this.id;if("visibility"===e)return this.visibility=t,void(this.config&&this.config.layout&&(this.config.layout.visibility=t));this._unevaluatedLayout.setValue(e,t)},_0x353e3f.prototype.getPaintProperty=function(e){return endsWith(e,_0x16ab8f)?this._transitionablePaint.getTransition(e.slice(0,-_0x16ab8f.length)):this._transitionablePaint.getValue(e)},_0x353e3f.prototype.setPaintProperty=function(e,t,i){if(null!=t)this.id;if(endsWith(e,_0x16ab8f))return this._transitionablePaint.setTransition(e.slice(0,-_0x16ab8f.length),t||void 0),!1;var n=this._transitionablePaint._values[e],r="cross-faded-data-driven"===n.property.specification["property-type"],o=n.value.isDataDriven(),a=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var s=this._transitionablePaint._values[e].value;return s.isDataDriven()||o||r||this._handleOverridablePaintPropertyUpdate(e,a,s)},_0x353e3f.prototype._handleSpecialPaintPropertyUpdate=function(e){},_0x353e3f.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!1},_0x353e3f.prototype.isHidden=function(e){return!!(this.minzoom&&e<this.minzoom)||(!!(this.maxzoom&&e>=this.maxzoom)||"none"===this.visibility)},_0x353e3f.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},_0x353e3f.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},_0x353e3f.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,t)},_0x353e3f.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),filterObject(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},_0x353e3f.prototype._validate=function(e,t,i,n,r){return!0},_0x353e3f.prototype.is3D=function(){return!1},_0x353e3f.prototype.isTileClipped=function(){return!1},_0x353e3f.prototype.hasOffscreenPass=function(){return!1},_0x353e3f.prototype.resize=function(){},_0x353e3f.prototype.isStateDependent=function(){return!0};var _0xc6fab4=(_0x5f48bb=!0,function(e,t){var i=_0x5f48bb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f48bb=!1,i}),_0x15765e=_0xc6fab4(void 0,(function(){return _0x15765e.toString().search("(((.+)+)+)+$").toString().constructor(_0x15765e).search("(((.+)+)+)+$")})),_0x5f48bb;_0x15765e();var _0x14a25d=8,_0x93a0b3={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},_0x317060={"*":{type:"source"}},_0x16928f=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],_0xf34f4a={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},_0x14e1b4={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},_0x33440e={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},_0x381e71={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},_0x338614={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},_0x971caa={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},_0x41112f={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},_0xc182c4=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],_0x31cf15={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x210d5b={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x498ab3={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x13bc03={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x1ea6ee={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x4612f9={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x14988d={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x5ef310={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x36f24c={type:"array",value:"*"},_0x2b2721={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},_0x44eabe={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},_0x145b2d={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},_0x4318f9={type:"array",value:"*",minimum:1},_0x196d70={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},_0x38e980={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},_0x20fb42=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],_0x1131ff={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},_0x4b6cd3={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},_0xca1690={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},_0xb09ff2={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x398e4a={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-show-background":{type:"boolean",default:!1,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},_0x46de1c={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0xfcb894={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x1c1a44={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x3d2226={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},_0x5f2c0a={$version:_0x14a25d,$root:_0x93a0b3,sources:_0x317060,source:_0x16928f,source_vector:_0xf34f4a,source_raster:_0x14e1b4,source_raster_dem:_0x33440e,source_geojson:_0x381e71,source_video:_0x338614,source_image:_0x971caa,layer:_0x41112f,layout:_0xc182c4,layout_background:_0x31cf15,layout_fill:_0x210d5b,layout_circle:_0x498ab3,layout_heatmap:_0x13bc03,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:_0x1ea6ee,layout_symbol:_0x4612f9,layout_raster:_0x14988d,layout_hillshade:_0x5ef310,filter:_0x36f24c,filter_operator:_0x2b2721,geometry_type:_0x44eabe,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:_0x145b2d,expression:_0x4318f9,expression_name:_0x196d70,light:_0x38e980,paint:_0x20fb42,paint_fill:_0x1131ff,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:_0x4b6cd3,paint_circle:_0xca1690,paint_heatmap:_0xb09ff2,paint_symbol:_0x398e4a,paint_raster:_0x46de1c,paint_hillshade:_0xfcb894,paint_background:_0x1c1a44,transition:_0x3d2226,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},_0x45d668=(_0x1b066d=!0,function(e,t){var i=_0x1b066d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b066d=!1,i}),_0xc3611c=_0x45d668(void 0,(function(){return _0xc3611c.toString().search("(((.+)+)+)+$").toString().constructor(_0xc3611c).search("(((.+)+)+)+$")})),_0x1b066d;function _0x31b87d(){}function _0x49f03d(e,t,i){if(e.length>1){if(_0x40643c(e,t))return!0;for(var n=0;n<t.length;n++)if(_0x39a559(t[n],e,i))return!0}for(var r=0;r<e.length;r++)if(_0x39a559(e[r],t,i))return!0;return!1}function _0x40643c(e,t){if(0===e.length||0===t.length)return!1;for(var i=0;i<e.length-1;i++)for(var n=e[i],r=e[i+1],o=0;o<t.length-1;o++){if(_0x4a280e(n,r,t[o],t[o+1]))return!0}return!1}function _0x4a280e(e,t,i,n){return isCounterClockwise(e,i,n)!==isCounterClockwise(t,i,n)&&isCounterClockwise(e,t,i)!==isCounterClockwise(e,t,n)}function _0x39a559(e,t,i){var n=i*i;if(1===t.length)return e.distSqr(t[0])<n;for(var r=1;r<t.length;r++){var o=t[r-1],a=t[r];if(_0x31b87d.distToSegmentSquared(e,o,a)<n)return!0}return!1}function _0x1e3c49(e,t){for(var i,n,r,o=!1,a=0;a<e.length;a++)for(var s=0,l=(i=e[a]).length-1;s<i.length;l=s++)n=i[s],r=i[l],n.y>t.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(o=!o);return o}function _0x346bc4(e,t){for(var i=!1,n=0,r=e.length-1;n<e.length;r=n++){var o=e[n],a=e[r];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}_0xc3611c(),_0x31b87d.polygonIntersectsPolygon=function(e,t){for(var i=0;i<e.length;i++)if(_0x346bc4(t,e[i]))return!0;for(var n=0;n<t.length;n++)if(_0x346bc4(e,t[n]))return!0;return!!_0x40643c(e,t)},_0x31b87d.polygonIntersectsBufferedPoint=function(e,t,i){return!!_0x346bc4(e,t)||!!_0x39a559(t,e,i)},_0x31b87d.polygonIntersectsMultiPolygon=function(e,t){if(1===e.length)return _0x1e3c49(t,e[0]);for(var i=0;i<t.length;i++)for(var n=t[i],r=0;r<n.length;r++)if(_0x346bc4(e,n[r]))return!0;for(var o=0;o<e.length;o++)if(_0x1e3c49(t,e[o]))return!0;for(var a=0;a<t.length;a++)if(_0x40643c(e,t[a]))return!0;return!1},_0x31b87d.polygonIntersectsBufferedMultiLine=function(e,t,i){for(var n=0;n<t.length;n++){var r=t[n];if(e.length>=3)for(var o=0;o<r.length;o++)if(_0x346bc4(e,r[o]))return!0;if(_0x49f03d(e,r,i))return!0}return!1},_0x31b87d.distToSegmentSquared=function(e,t,i){var n=t.distSqr(i);if(0===n)return e.distSqr(t);var r=((e.x-t.x)*(i.x-t.x)+(e.y-t.y)*(i.y-t.y))/n;return r<0?e.distSqr(t):r>1?e.distSqr(i):e.distSqr(i.sub(t)._mult(r)._add(t))};var _0xc684e3=new _0x3699c0({"circle-sort-key":new _0x5678d2(_0x5f2c0a.layout_circle["circle-sort-key"])}),_0x564b56=new _0x3699c0({"circle-radius":new _0x5678d2(_0x5f2c0a.paint_circle["circle-radius"]),"circle-color":new _0x5678d2(_0x5f2c0a.paint_circle["circle-color"]),"circle-blur":new _0x5678d2(_0x5f2c0a.paint_circle["circle-blur"]),"circle-opacity":new _0x5678d2(_0x5f2c0a.paint_circle["circle-opacity"]),"circle-translate":new _0x3f772a(_0x5f2c0a.paint_circle["circle-translate"]),"circle-translate-anchor":new _0x3f772a(_0x5f2c0a.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new _0x3f772a(_0x5f2c0a.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new _0x3f772a(_0x5f2c0a.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new _0x5678d2(_0x5f2c0a.paint_circle["circle-stroke-width"]),"circle-stroke-color":new _0x5678d2(_0x5f2c0a.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new _0x5678d2(_0x5f2c0a.paint_circle["circle-stroke-opacity"])}),_0x5182ec={paint:_0x564b56,layout:_0xc684e3},_0x252c8a=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x5182ec)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.createBucket=function(e){return new _0x20263c(e)},r.prototype.queryRadius=function(e){var t=e;return _0x4191d9.getMaximumPaintValue("circle-radius",this,t)+_0x4191d9.getMaximumPaintValue("circle-stroke-width",this,t)+_0x4191d9.translateDistance(this.paint.get("circle-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a,s,l){s=_0x4840f3();for(var u=_0x4191d9.translate(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),0,a),c=this.paint.get("circle-radius")?.evaluate(t,i),h=this.paint.get("circle-stroke-width")?.evaluate(t,i),d=c+h,f="map"===this.paint.get("circle-pitch-alignment"),p=f?u:_0x5d2297(u,s),_=f?d*a:d,m=0,g=n;m<g.length;m+=1)for(var x=0,v=g[m];x<v.length;x+=1){var y=v[x],$=f?y:_0x255f95(y,s),b=_;if(_0x3bd994([],[y.x,y.y,0,1],s),"viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")||"map"===this.paint.get("circle-pitch-scale")&&this.paint.get("circle-pitch-alignment"),l=e$2b(l)?l:10,_0x31b87d.polygonIntersectsBufferedPoint(p,$,b*l))return!0}return!1},r}(_0x353e3f);function _0x255f95(e,t){var i=_0x3bd994([],[e.x,e.y,0,1],t);return new _0x46bdc2(i[0],i[1])}function _0x5d2297(e,t){return e.map((function(e){return _0x255f95(e,t)}))}function _0x4840f3(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function _0x3bd994(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,e[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,e[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,e[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,e}const _0x24d465=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4f52f9=_0x24d465(void 0,(function(){return _0x4f52f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f52f9).search("(((.+)+)+)+$")}));function _0x414e6d(e,t){this._transformRequestFn=e,this._customAccessToken=t}function _0x5c3cdd(e){return 0===e.indexOf("mapbox:")}_0x4f52f9(),_0x414e6d.prototype._createSkuToken=function(){const e=createSkuToken();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},_0x414e6d.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},_0x414e6d.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},_0x414e6d.prototype.normalizeStyleURL=function(e,t){if(!_0x5c3cdd(e))return e;const i=_0x4371bb(e);return i.path="/styles/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||t)},_0x414e6d.prototype.normalizeGlyphsURL=function(e,t){if(!_0x5c3cdd(e))return e;const i=_0x4371bb(e);return i.path="/fonts/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||t)},_0x414e6d.prototype.normalizeSourceURL=function(e,t){if(!_0x5c3cdd(e))return e;const i=_0x4371bb(e);return i.path="/v4/"+i.authority+".json",i.params.push("secure"),this._makeAPIURL(i,this._customAccessToken||t)},_0x414e6d.prototype.normalizeSpriteURL=function(e,t,i,n){const r=_0x4371bb(e);return _0x5c3cdd(e)?(r.path="/styles/v1"+r.path+"/sprite"+t+i,this._makeAPIURL(r,this._customAccessToken||n)):(r.path+=""+t+i,_0xfd6057(r))},_0x414e6d.prototype.normalizeTileURL=function(e,t,i){if(this._isSkuTokenExpired()&&this._createSkuToken(),!t||!_0x5c3cdd(t))return e;const n=_0x4371bb(e),r=browser.devicePixelRatio>=2||512===i?"@2x":"",o=webpSupported.supported?".webp":"$1";return n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+r+o),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path,config.REQUIRE_ACCESS_TOKEN&&(config.ACCESS_TOKEN||this._customAccessToken)&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,this._customAccessToken)},_0x414e6d.prototype.canonicalizeTileURL=function(e){const t=_0x4371bb(e);if(!t.path.match(/(^\/v4\/)/)||!t.path.match(/\.[\w]+$/))return e;let i="mapbox://tiles/";i+=t.path.replace("/v4/","");const n=t.params.filter((e=>!e.match(/^access_token=/)));return n.length&&(i+="?"+n.join("&")),i},_0x414e6d.prototype.canonicalizeTileset=function(e,t){if(!_0x5c3cdd(t))return e.tiles||[];const i=[];for(const t of e.tiles){const e=this.canonicalizeTileURL(t);i.push(e)}return i},_0x414e6d.prototype._makeAPIURL=function(e,t){const i=_0x4371bb(config.API_URL);if(e.protocol=i.protocol,e.authority=i.authority,"/"!==i.path&&(e.path=""+i.path+e.path),!config.REQUIRE_ACCESS_TOKEN)return _0xfd6057(e);if(!(t=t||config.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. ");if("s"===t[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ");return e.params=e.params.filter((e=>-1===e.indexOf("access_token"))),e.params.push("access_token="+t),_0xfd6057(e)};const _0x4395bd=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function _0x2a0fa3(e){return _0x4395bd.test(e)}function _0x6ec2a5(e){return e.indexOf("sku=")>0&&_0x2a0fa3(e)}const _0x5da7e2=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function _0x4371bb(e){const t=e.match(_0x5da7e2);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function _0xfd6057(e){const t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}const _0x5c6a7c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1ca61f=_0x5c6a7c(void 0,(function(){return _0x1ca61f.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ca61f).search("(((.+)+)+)+$")}));_0x1ca61f();const _0x2e1002="mapbox-tiles",_0x43826e=42e4;let _0x40ba08;function _0x19b03e(e,t){if(void 0===_0x40ba08)try{new Response(new ReadableStream),_0x40ba08=!0}catch(e){_0x40ba08=!1}_0x40ba08?t(e.body):e.blob().then(t)}function cachePut(e,t,i){if(!window.caches)return;const n={status:t.status,statusText:t.statusText,headers:new window.Headers};t.headers.forEach(((e,t)=>n.headers.set(t,e)));const r=parseCacheControl(t.headers.get("Cache-Control")||"");if(r["no-store"])return;r["max-age"]&&n.headers.set("Expires",new Date(i+1e3*r["max-age"]).toUTCString());new Date(n.headers.get("Expires")).getTime()-i<_0x43826e||_0x19b03e(t,(t=>{const i=new window.Response(t,n);window.caches.open(_0x2e1002).then((t=>t.put(_0xd811c4(e.url),i)))}))}function _0xd811c4(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function cacheGet(e,t){if(!window.caches)return t(null);const i=_0xd811c4(e.url);window.caches.open(_0x2e1002).catch(t).then((e=>{e.match(i).catch(t).then((n=>{const r=_0x1350a9(n);e.delete(i),r&&e.put(i,n.clone()),t(null,n,r)}))}))}function _0x1350a9(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")),i=parseCacheControl(e.headers.get("Cache-Control")||"");return t>Date.now()&&!i["no-cache"]}const _0x5af467=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x94b617=_0x5af467(void 0,(function(){return _0x94b617.toString().search("(((.+)+)+)+$").toString().constructor(_0x94b617).search("(((.+)+)+)+$")}));_0x94b617();const _0x179804={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(_0x179804);class _0x2747e6 extends Error{constructor(e,t,i){401===t&&_0x2a0fa3(i)&&(e+=": you may have provided an invalid Mapbox access token."),super(e),this.status=t,this.url=i,this.name=this.constructor.name,this.message=e}toString(){return this.name+": "+this.message+" ("+this.status+"): "+this.url}}const getReferrer=isWorker()?()=>self.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href,_0x43fcb4=e=>/^file:/.test(e)||/^file:/.test(getReferrer())&&!/^\w+:/.test(e);function _0x38552b(e,t){const i=isWorker()?self:window,n=new i.AbortController,r=new i.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:getReferrer(),signal:n.signal});let o=!1,a=!1;const s=_0x6ec2a5(r.url);"json"===e.type&&r.headers.set("Accept","application/json");const l=(n,o,l)=>{if(a)return;if(n&&"SecurityError"!==n.message&&warnOnce(n),o&&l)return u(o);const c=Date.now();i.fetch(r).then((i=>{if(i.ok){const e=s?i.clone():null;return u(i,e,c)}return t(new _0x2747e6(i.statusText,i.status,e.url))})).catch((e=>{20!==e.code&&t(new Error(e.message))}))},u=(i,n,s)=>{("arrayBuffer"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text()).then((e=>{a||(n&&s&&cachePut(r,n,s),o=!0,t(null,e,i.headers.get("Cache-Control"),i.headers.get("Expires")))})).catch((e=>t(new Error(e.message))))};return s?cacheGet(r,l):l(null,null),{cancel:()=>{a=!0,o||n.abort()}}}function _0x5e2201(e,t){const i=new((isWorker()?self:window).XMLHttpRequest);i.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(i.responseType="arraybuffer");for(const t in e.headers)i.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=()=>{t(new Error(i.statusText))},i.onload=()=>{if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){let n=i.response;if("json"===e.type)try{n=JSON.parse(i.response)}catch(e){return t(e)}t(null,n,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else t(new _0x2747e6(i.statusText,i.status,e.url))},i.send(e.body),{cancel:()=>i.abort()}}const makeRequest=function(e,t){const i=isWorker()?self:window;if(!_0x43fcb4(e.url)){if(i.fetch&&i.Request&&i.AbortController&&i.Request.prototype.hasOwnProperty("signal"))return _0x38552b(e,t);if(isWorker()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}return _0x5e2201(e,t)},getJSON=function(e,t){return makeRequest(extend$1(e,{type:"json"}),t)},getArrayBuffer=function(e,t){return makeRequest(extend$1(e,{type:"arrayBuffer"}),t)},_0x3c85d7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let _0x4da4f,_0x48a444;const resetImageRequestQueue=()=>{_0x4da4f=[],_0x48a444=0};resetImageRequestQueue();const _0x31f447=16,getImage=function(e,t){if(_0x48a444>=_0x31f447){const i={requestParameters:e,callback:t,cancelled:!1,cancel(){this.cancelled=!0}};return _0x4da4f.push(i),i}_0x48a444++;let i=!1;const n=()=>{if(!i)for(i=!0,_0x48a444--;_0x4da4f.length&&_0x48a444<_0x31f447;){const e=_0x4da4f.shift(),{requestParameters:t,callback:i,cancelled:n}=e;!n&&(e.cancel=getImage(t,i).cancel)}},r=getArrayBuffer(e,((e,i,r,o)=>{if(n(),e)t(e);else if(i){const e=new window.Image,n=window.URL||window.webkitURL;e.onload=()=>{t(null,e),n.revokeObjectURL(e.src)},e.onerror=()=>t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const a=new window.Blob([new Uint8Array(i)],{type:"image/png"});e.cacheControl=r,e.expires=o,e.src=i.byteLength?n.createObjectURL(a):_0x3c85d7}}));return{cancel:()=>{r.cancel(),n()}}},_0x1f28e7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3f73f1=_0x1f28e7(void 0,(function(){return _0x3f73f1.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f73f1).search("(((.+)+)+)+$")}));_0x3f73f1();const symbolLayoutAttributes=_0x55f30f([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),dynamicLayoutAttributes=_0x55f30f([{name:"a_projected_pos",components:3,type:"Float32"}],4);_0x55f30f([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),_0x55f30f([{name:"a_fade_opacity",components:1,type:"Float32"}],4);const collisionVertexAttributes=_0x55f30f([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);_0x55f30f([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]);const collisionBoxLayout=_0x55f30f([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),collisionCircleLayout=_0x55f30f([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);_0x55f30f([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),_0x55f30f([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"}]),_0x55f30f([{type:"Float32",name:"offsetX"}]),_0x55f30f([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var _0x2dd86a=(_0x4384ca=!0,function(e,t){var i=_0x4384ca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4384ca=!1,i}),_0x59b558=_0x2dd86a(void 0,(function(){return _0x59b558.toString().search("(((.+)+)+)+$").toString().constructor(_0x59b558).search("(((.+)+)+)+$")})),_0x4384ca;_0x59b558();var _0x92a370={"Latin-1 Supplement":function(e){return e>=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};const _0x2523f1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x15817a=_0x2523f1(void 0,(function(){return _0x15817a.toString().search("(((.+)+)+)+$").toString().constructor(_0x15817a).search("(((.+)+)+)+$")}));function allowsVerticalWritingMode(e){for(const t of e)if(charHasUprightVerticalOrientation(t.charCodeAt(0)))return!0;return!1}function charHasUprightVerticalOrientation(e){return 746===e||747===e||!(e<4352)&&(!!_0x92a370["Bopomofo Extended"](e)||(!!_0x92a370.Bopomofo(e)||(!(!_0x92a370["CJK Compatibility Forms"](e)||e>=65097&&e<=65103)||(!!_0x92a370["CJK Compatibility Ideographs"](e)||(!!_0x92a370["CJK Compatibility"](e)||(!!_0x92a370["CJK Radicals Supplement"](e)||(!!_0x92a370["CJK Strokes"](e)||(!(!_0x92a370["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||(!!_0x92a370["CJK Unified Ideographs Extension A"](e)||(!!_0x92a370["CJK Unified Ideographs"](e)||(!!_0x92a370["Enclosed CJK Letters and Months"](e)||(!!_0x92a370["Hangul Compatibility Jamo"](e)||(!!_0x92a370["Hangul Jamo Extended-A"](e)||(!!_0x92a370["Hangul Jamo Extended-B"](e)||(!!_0x92a370["Hangul Jamo"](e)||(!!_0x92a370["Hangul Syllables"](e)||(!!_0x92a370.Hiragana(e)||(!!_0x92a370["Ideographic Description Characters"](e)||(!!_0x92a370.Kanbun(e)||(!!_0x92a370["Kangxi Radicals"](e)||(!!_0x92a370["Katakana Phonetic Extensions"](e)||(!(!_0x92a370.Katakana(e)||12540===e)||(!(!_0x92a370["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||(!(!_0x92a370["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||(!!_0x92a370["Unified Canadian Aboriginal Syllabics"](e)||(!!_0x92a370["Unified Canadian Aboriginal Syllabics Extended"](e)||(!!_0x92a370["Vertical Forms"](e)||(!!_0x92a370["Yijing Hexagram Symbols"](e)||(!!_0x92a370["Yi Syllables"](e)||!!_0x92a370["Yi Radicals"](e))))))))))))))))))))))))))))))}function charInRTLScript(e){return e>=1424&&e<=2303||_0x92a370["Arabic Presentation Forms-A"](e)||_0x92a370["Arabic Presentation Forms-B"](e)}function stringContainsRTLText(e){for(const t of e)if(charInRTLScript(t.charCodeAt(0)))return!0;return!1}_0x15817a();const _0x3b9538=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2aaf82=_0x3b9538(void 0,(function(){return _0x2aaf82.toString().search("(((.+)+)+)+$").toString().constructor(_0x2aaf82).search("(((.+)+)+)+$")}));_0x2aaf82();const verticalizedCharacterMap={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var _0x374cbf=(_0x31cd03=!0,function(e,t){var i=_0x31cd03?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31cd03=!1,i}),_0x55eca9=_0x374cbf(void 0,(function(){return _0x55eca9.toString().search("(((.+)+)+)+$").toString().constructor(_0x55eca9).search("(((.+)+)+)+$")})),_0x31cd03;_0x55eca9();var _0x484b1f=(_0x17544a=!0,function(e,t){var i=_0x17544a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17544a=!1,i}),_0x544229=_0x484b1f(void 0,(function(){return _0x544229.toString().search("(((.+)+)+)+$").toString().constructor(_0x544229).search("(((.+)+)+)+$")})),_0x17544a;function _0x33fa69(e){var t={},i={},n=[],r=0;function o(t){n.push(e[t]),r++}function a(e,t,r){var o=i[e];return delete i[e],i[t]=o,n[o].geometry[0].pop(),n[o].geometry[0]=n[o].geometry[0].concat(r[0]),o}function s(e,i,r){var o=t[i];return delete t[i],t[e]=o,n[o].geometry[0].shift(),n[o].geometry[0]=r[0].concat(n[o].geometry[0]),o}function l(e,t,i){var n=i?t[0][t[0].length-1]:t[0][0];return e+":"+n.x+":"+n.y}for(var u=0;u<e.length;u++){var c=e[u],h=c.geometry,d=c.text?c.text.toString():null;if(d){var f=l(d,h),p=l(d,h,!0);if(f in i&&p in t&&i[f]!==t[p]){var _=s(f,p,h),m=a(f,p,n[_].geometry);delete t[f],delete i[p],i[l(d,n[m].geometry,!0)]=m,n[_].geometry=null}else f in i?a(f,p,h):p in t?s(f,p,h):(o(u),t[f]=r-1,i[p]=r-1)}else o(u)}return n.filter((function(e){return e.geometry}))}_0x544229();var _0x20efad=function(e,t){void 0===t&&(t={}),extend$1(this,t),this.type=e};!function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){void 0===i&&(i={}),e.call(this,"error",extend$1({error:t},i))}n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r}(_0x20efad);const _0x178b0e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2ae9a5=_0x178b0e(void 0,(function(){return _0x2ae9a5.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ae9a5).search("(((.+)+)+)+$")}));let _0x1ddc64,_0x43cd3a;_0x2ae9a5();const _0x1ec00b={getImageData(e,t){const i=window.document.createElement("canvas"),n=i.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return i.width=e.width,i.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:e=>(_0x1ddc64||(_0x1ddc64=window.document.createElement("a")),_0x1ddc64.href=e,_0x1ddc64.href),hardwareConcurrency:window.navigator.hardwareConcurrency||4,get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(null==_0x43cd3a&&(_0x43cd3a=window.matchMedia("(prefers-reduced-motion: reduce)")),_0x43cd3a.matches)}},_0x2efb5c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xd8df4a=_0x2efb5c(void 0,(function(){return _0xd8df4a.toString().search("(((.+)+)+)+$").toString().constructor(_0xd8df4a).search("(((.+)+)+)+$")}));_0xd8df4a();var _0x5033e4=(_0x2aad13=!0,function(e,t){var i=_0x2aad13?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2aad13=!1,i}),_0x5f18da=_0x5033e4(void 0,(function(){return _0x5f18da.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f18da).search("(((.+)+)+)+$")})),_0x2aad13;_0x5f18da();var _0x1133e7=(_0x164874=!0,function(e,t){var i=_0x164874?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x164874=!1,i}),_0x416482=_0x1133e7(void 0,(function(){return _0x416482.toString().search("(((.+)+)+)+$").toString().constructor(_0x416482).search("(((.+)+)+)+$")})),_0x164874;_0x416482();var _0x3122f8=function(e,t){_0x328301(this,e,1,t)};function _0x328301(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function _0xeefbad(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=_0x328301({},{width:n,height:r},i);_0x217e88(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function _0x217e88(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}_0x3122f8.prototype.resize=function(e){_0xeefbad(this,e,1)},_0x3122f8.prototype.clone=function(){return new _0x3122f8({width:this.width,height:this.height},new Uint8Array(this.data))},_0x3122f8.copy=function(e,t,i,n,r){_0x217e88(e,t,i,n,r,1)},_0x416c3b.register("AlphaImage",_0x3122f8);const _0x210b67=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x456b1e=_0x210b67(void 0,(function(){return _0x456b1e.toString().search("(((.+)+)+)+$").toString().constructor(_0x456b1e).search("(((.+)+)+)+$")}));_0x456b1e();const _0xf15724=3;function _0x574c05(e,t,i){1===e&&i.readMessage(_0x43e045,t)}function _0x43e045(e,t,i){if(3===e){const{id:e,bitmap:n,width:r,height:o,left:a,top:s,advance:l}=i.readMessage(_0x1ad56f,{});t.push({id:e,bitmap:new _0x3122f8({width:r+2*_0xf15724,height:o+2*_0xf15724},n),metrics:{width:r,height:o,left:a,top:s,advance:l}})}}function _0x1ad56f(e,t,i){1===e?t.id=i.readVarint():2===e?t.bitmap=i.readBytes():3===e?t.width=i.readVarint():4===e?t.height=i.readVarint():5===e?t.left=i.readSVarint():6===e?t.top=i.readSVarint():7===e&&(t.advance=i.readVarint())}function _0x584b7b(e){return new h$U(e).readFields(_0x574c05,[])}const _0x3fe8ec=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1800bf=_0x3fe8ec(void 0,(function(){return _0x1800bf.toString().search("(((.+)+)+)+$").toString().constructor(_0x1800bf).search("(((.+)+)+)+$")}));_0x1800bf();const _0x38221e={horizontal:1,vertical:2,horizontalOnly:3};var _0x822759=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n,r){e.call(this,t,i),this.angle=n,void 0!==r&&(this.segment=r)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.clone=function(){return new r(this.x,this.y,this.angle,this.segment)},r}(_0x46bdc2);_0x416c3b.register("Anchor",_0x822759);var _0x527c79=(_0x3bc8bf=!0,function(e,t){var i=_0x3bc8bf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3bc8bf=!1,i}),_0x280868=_0x527c79(void 0,(function(){return _0x280868.toString().search("(((.+)+)+)+$").toString().constructor(_0x280868).search("(((.+)+)+)+$")})),_0x3bc8bf;_0x280868();var _0x51c2b4=(_0x247c06=!0,function(e,t){var i=_0x247c06?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x247c06=!1,i}),_0xce7ad9=_0x51c2b4(void 0,(function(){return _0xce7ad9.toString().search("(((.+)+)+)+$").toString().constructor(_0xce7ad9).search("(((.+)+)+)+$")})),_0x247c06;_0xce7ad9();var _0x2030bf=(_0x4b3a50=!0,function(e,t){var i=_0x4b3a50?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4b3a50=!1,i}),_0x57a0b2=_0x2030bf(void 0,(function(){return _0x57a0b2.toString().search("(((.+)+)+)+$").toString().constructor(_0x57a0b2).search("(((.+)+)+)+$")})),_0x4b3a50;_0x57a0b2();var _0x5c0521=(_0x1f9ec8=!0,function(e,t){var i=_0x1f9ec8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f9ec8=!1,i}),_0x44801d=_0x5c0521(void 0,(function(){return _0x44801d.toString().search("(((.+)+)+)+$").toString().constructor(_0x44801d).search("(((.+)+)+)+$")})),_0x1f9ec8;_0x44801d();var _0x135cd7=(_0x63612b=!0,function(e,t){var i=_0x63612b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x63612b=!1,i}),_0x196446=_0x135cd7(void 0,(function(){return _0x196446.toString().search("(((.+)+)+)+$").toString().constructor(_0x196446).search("(((.+)+)+)+$")})),_0x63612b;_0x196446();var _0x49aed6=(_0x1d25f7=!0,function(e,t){var i=_0x1d25f7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d25f7=!1,i}),_0x1e820d=_0x49aed6(void 0,(function(){return _0x1e820d.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e820d).search("(((.+)+)+)+$")})),_0x1d25f7;function s$J(e,t,i,n,r){x$Z(e,t,i||0,n||e.length-1,r||C$V)}function x$Z(e,t,i,n,r){for(;n>i;){if(n-i>600){var o=n-i+1,a=t-i+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);x$Z(e,t,Math.max(i,Math.floor(t-a*l/o+u)),Math.min(n,Math.floor(t+(o-a)*l/o+u)),r)}var c=e[t],h=i,d=n;for(e$1f(e,i,t),r(e[n],c)>0&&e$1f(e,i,n);h<d;){for(e$1f(e,h,d),h++,d--;r(e[h],c)<0;)h++;for(;r(e[d],c)>0;)d--}0===r(e[i],c)?e$1f(e,i,d):e$1f(e,++d,n),d<=t&&(i=d+1),t<=d&&(n=d-1)}}function e$1f(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function C$V(e,t){return e<t?-1:e>t?1:0}_0x1e820d();var _0x8b9044=(_0x1f8e56=!0,function(e,t){var i=_0x1f8e56?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f8e56=!1,i}),_0x5b8917=_0x8b9044(void 0,(function(){return _0x5b8917.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b8917).search("(((.+)+)+)+$")})),_0x1f8e56;function _0x1a1728(e){for(var t=0,i=0,n=e.length,r=n-1,o=void 0,a=void 0;i<n;r=i++)o=e[i],t+=((a=e[r]).x-o.x)*(o.y+a.y);return t}function _0x2f8296(e,t){var i=e.length;if(i<=1)return[e];for(var n,r,o=[],a=0;a<i;a++){var s=_0x1a1728(e[a]);0!==s&&(e[a].area=Math.abs(s),void 0===r&&(r=s<0),r===s<0?(n&&o.push(n),n=[e[a]]):n.push(e[a]))}if(n&&o.push(n),t>1)for(var l=0;l<o.length;l++)o[l].length<=t||(s$J(o[l],t,1,o[l].length-1,_0xb9e90c),o[l]=o[l].slice(0,t));return o}function _0xb9e90c(e,t){return t.area-e.area}_0x5b8917();var _0x38fa76=(_0x234b03=!0,function(e,t){var i=_0x234b03?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x234b03=!1,i}),_0x34182f=_0x38fa76(void 0,(function(){return _0x34182f.toString().search("(((.+)+)+)+$").toString().constructor(_0x34182f).search("(((.+)+)+)+$")})),_0x234b03;_0x34182f();const _0x52dab7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x451b6e=_0x52dab7(void 0,(function(){return _0x451b6e.toString().search("(((.+)+)+)+$").toString().constructor(_0x451b6e).search("(((.+)+)+)+$")}));_0x451b6e();const _0x38968b=255,_0x50e8f2=_0x38968b*_0x5120e9;var _0x1a1b65=(_0x489b24=!0,function(e,t){var i=_0x489b24?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x489b24=!1,i}),_0x4e3d9d=_0x1a1b65(void 0,(function(){return _0x4e3d9d.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e3d9d).search("(((.+)+)+)+$")})),_0x489b24;function _0x16ae5e(e,t,i){var n=t.layout.get("text-transform").evaluate(i,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),e}function _0x342adb(e,t,i){return e.sections.forEach((function(e){e.text=_0x16ae5e(e.text,t,i)})),e}_0x4e3d9d();var _0x3653d8=(_0x152d7f=!0,function(e,t){var i=_0x152d7f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x152d7f=!1,i}),_0x3e28c4=_0x3653d8(void 0,(function(){return _0x3e28c4.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e28c4).search("(((.+)+)+)+$")})),_0x152d7f;function _0x46abed(e,t){return t.replace(/{([^{}]+)}/g,((t,i)=>i in e?String(e[i]):""))}_0x3e28c4();var _0x469210={kind:"color"},_0x2bf078={kind:"formatted"},_0x5008aa=new _0x3699c0({"symbol-placement":new _0x3f772a(_0x5f2c0a.layout_symbol["symbol-placement"]),"symbol-spacing":new _0x3f772a(_0x5f2c0a.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new _0x3f772a(_0x5f2c0a.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new _0x5678d2(_0x5f2c0a.layout_symbol["symbol-sort-key"]),"symbol-z-order":new _0x3f772a(_0x5f2c0a.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-ignore-placement"]),"icon-optional":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-optional"]),"icon-rotation-alignment":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-rotation-alignment"]),"icon-size":new _0x5678d2(_0x5f2c0a.layout_symbol["icon-size"]),"icon-text-fit":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-text-fit-padding"]),"icon-image":new _0x5678d2(_0x5f2c0a.layout_symbol["icon-image"]),"icon-rotate":new _0x5678d2(_0x5f2c0a.layout_symbol["icon-rotate"]),"icon-padding":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-padding"]),"icon-keep-upright":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-keep-upright"]),"icon-offset":new _0x5678d2(_0x5f2c0a.layout_symbol["icon-offset"]),"icon-anchor":new _0x5678d2(_0x5f2c0a.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new _0x3f772a(_0x5f2c0a.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new _0x3f772a(_0x5f2c0a.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new _0x3f772a(_0x5f2c0a.layout_symbol["text-rotation-alignment"]),"text-field":new _0x5678d2(_0x5f2c0a.layout_symbol["text-field"]),"text-font":new _0x5678d2(_0x5f2c0a.layout_symbol["text-font"]),"text-size":new _0x5678d2(_0x5f2c0a.layout_symbol["text-size"]),"text-max-width":new _0x5678d2(_0x5f2c0a.layout_symbol["text-max-width"]),"text-line-height":new _0x3f772a(_0x5f2c0a.layout_symbol["text-line-height"]),"text-letter-spacing":new _0x5678d2(_0x5f2c0a.layout_symbol["text-letter-spacing"]),"text-justify":new _0x5678d2(_0x5f2c0a.layout_symbol["text-justify"]),"text-radial-offset":new _0x5678d2(_0x5f2c0a.layout_symbol["text-radial-offset"]),"text-variable-anchor":new _0x3f772a(_0x5f2c0a.layout_symbol["text-variable-anchor"]),"text-anchor":new _0x5678d2(_0x5f2c0a.layout_symbol["text-anchor"]),"text-max-angle":new _0x3f772a(_0x5f2c0a.layout_symbol["text-max-angle"]),"text-writing-mode":new _0x3f772a(_0x5f2c0a.layout_symbol["text-writing-mode"]),"text-rotate":new _0x5678d2(_0x5f2c0a.layout_symbol["text-rotate"]),"text-padding":new _0x3f772a(_0x5f2c0a.layout_symbol["text-padding"]),"text-keep-upright":new _0x3f772a(_0x5f2c0a.layout_symbol["text-keep-upright"]),"text-transform":new _0x5678d2(_0x5f2c0a.layout_symbol["text-transform"]),"text-offset":new _0x5678d2(_0x5f2c0a.layout_symbol["text-offset"]),"text-allow-overlap":new _0x3f772a(_0x5f2c0a.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new _0x3f772a(_0x5f2c0a.layout_symbol["text-ignore-placement"]),"text-optional":new _0x3f772a(_0x5f2c0a.layout_symbol["text-optional"])}),_0x2c781b=new _0x3699c0({"icon-opacity":new _0x5678d2(_0x5f2c0a.paint_symbol["icon-opacity"]),"icon-color":new _0x5678d2(_0x5f2c0a.paint_symbol["icon-color"]),"icon-halo-color":new _0x5678d2(_0x5f2c0a.paint_symbol["icon-halo-color"]),"icon-halo-width":new _0x5678d2(_0x5f2c0a.paint_symbol["icon-halo-width"]),"icon-halo-blur":new _0x5678d2(_0x5f2c0a.paint_symbol["icon-halo-blur"]),"icon-translate":new _0x3f772a(_0x5f2c0a.paint_symbol["icon-translate"]),"icon-translate-anchor":new _0x3f772a(_0x5f2c0a.paint_symbol["icon-translate-anchor"]),"text-opacity":new _0x5678d2(_0x5f2c0a.paint_symbol["text-opacity"]),"text-color":new _0x5678d2(_0x5f2c0a.paint_symbol["text-color"],{runtimeType:_0x469210,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new _0x5678d2(_0x5f2c0a.paint_symbol["text-halo-color"]),"text-halo-width":new _0x5678d2(_0x5f2c0a.paint_symbol["text-halo-width"]),"text-halo-blur":new _0x5678d2(_0x5f2c0a.paint_symbol["text-halo-blur"]),"text-show-background":new _0x5678d2(_0x5f2c0a.paint_symbol["text-show-background"]),"text-translate":new _0x3f772a(_0x5f2c0a.paint_symbol["text-translate"]),"text-translate-anchor":new _0x3f772a(_0x5f2c0a.paint_symbol["text-translate-anchor"])}),_0x2fddb8={paint:_0x2c781b,layout:_0x5008aa},_0x55bb54=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x2fddb8)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){if(e.prototype.recalculate.call(this,t,i),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var r=[],o=0,a=n;o<a.length;o+=1){var s=a[o];r.indexOf(s)<0&&r.push(s)}this.layout._values["text-writing-mode"]=r}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},r.prototype.getValueAndResolveTokens=function(e,t,i){var n=this.layout.get(e).evaluate(t,{},i),r=this._unevaluatedLayout._values[e];return r.isDataDriven()||_0x21a01e.isExpression(r.value)||!n?n:_0x46abed(t.properties,n)},r.prototype.createBucket=function(e){return new _0x52096d(e)},r.prototype.queryRadius=function(){return 0},r.prototype.queryIntersectsFeature=function(){return!1},r.prototype._setPaintOverrides=function(){for(var e=0,t=_0x2fddb8.paint.overridableProperties;e<t.length;e+=1){var i=t[e];if(r.hasPaintOverride(this.layout,i)){var n=this.paint.get(i);new FormatSectionOverride(n);"constant"===n.value.kind||n.value.kind,this.paint._values[i]=new PossiblyEvaluatedPropertyValue(n.property,null,n.parameters)}}},r.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!(!this.layout||t.isDataDriven()||i.isDataDriven())&&r.hasPaintOverride(this.layout,e)},r.hasPaintOverride=function(e,t){var i=e.get("text-field"),n=_0x2fddb8.paint.properties[t],r=!1,o=function(e){for(var t=0,i=e;t<i.length;t+=1){var o=i[t];if(n.overrides&&n.overrides.hasOverride(o))return void(r=!0)}};if("constant"===i.value.kind&&i.value.value instanceof _0x2683dd)o(i.value.value.sections);else if("source"===i.value.kind){var a=function(e){if(!r)if(e instanceof _0x119c28&&_0x4150fb.typeOf(e.value)===_0x2bf078){var t=e.value;o(t.sections)}else e instanceof _0x252262?o(e.sections):e.eachChild(a)},s=i.value;s._styleExpression&&a(s._styleExpression.expression)}return r},r.hasPaintOverrides=function(e){for(var t=0,i=_0x2fddb8.paint.overridableProperties;t<i.length;t+=1){var n=i[t];if(r.hasPaintOverride(e,n))return!0}return!1},r}(_0x353e3f),_0x1013ae=(_0x18b895=!0,function(e,t){var i=_0x18b895?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x18b895=!1,i}),_0x3d9e14=_0x1013ae(void 0,(function(){return _0x3d9e14.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d9e14).search("(((.+)+)+)+$")})),_0x18b895;_0x3d9e14();var _0x120f9a=["Unknown","Point","LineString","Polygon"],_0x321e86=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function _0x4a1444(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=s?Math.min(_0x50e8f2,Math.round(s[0])):0,p=s?Math.min(_0x50e8f2,Math.round(s[1])):0;e.emplaceBack(t,i,Math.round(32*n),Math.round(32*r),o,a,(f<<1)+(l?1:0),p,16*u,16*c,256*h,256*d)}function _0x4cf153(e,t,i){e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i)}function _0x2ab5fc(e){for(var t=0,i=e.sections;t<i.length;t+=1){if(stringContainsRTLText(i[t].text))return!0}return!1}var _0x1057d7=function(e){this.layoutVertexArray=new _0x15604f,this.indexArray=new _0xbd6def,this.programConfigurations=e,this.segments=new _0x4b6d5a,this.dynamicLayoutVertexArray=new _0xe50b96,this.opacityVertexArray=new _0x3704ae,this.placedSymbolArray=new _0x3db8c3};_0x1057d7.prototype.upload=function(e,t,i,n){i&&(this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.layoutVertexArray,symbolLayoutAttributes.members)),this.indexArray.length>0&&(this.indexBuffer=_0x3cb0f8.toIndexBuffer(e,this.indexArray,t)),this.dynamicLayoutVertexArray.length>0&&(this.dynamicLayoutVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.dynamicLayoutVertexArray,dynamicLayoutAttributes.members,!0)),this.opacityVertexArray.length>0&&(this.opacityVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.opacityVertexArray,_0x321e86,!0),this.opacityVertexBuffer.itemSize=1)),(i||n)&&this.programConfigurations.upload(e)},_0x1057d7.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.dynamicLayoutVertexBuffer&&(this.dynamicLayoutVertexBuffer.destroy(),this.dynamicLayoutVertexBuffer=null),this.opacityVertexBuffer&&(this.opacityVertexBuffer.destroy(),this.opacityVertexBuffer=null),this.programConfigurations.destroy(),this.segments.destroy()},_0x1057d7.prototype.clear=function(){},_0x416c3b.register("SymbolBuffers",_0x1057d7);var _0x365954=function(e,t,i){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new i,this.segments=new _0x4b6d5a,this.collisionVertexArray=new _0x544f54};_0x365954.prototype.upload=function(e){this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.layoutVertexArray,this.layoutAttributes)),this.indexArray.length>0&&(this.indexBuffer=_0x3cb0f8.toIndexBuffer(e,this.indexArray)),this.collisionVertexArray.length>0&&(this.collisionVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.collisionVertexArray,collisionVertexAttributes.members,!0))},_0x365954.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.collisionVertexBuffer&&(this.collisionVertexBuffer.destroy(),this.collisionVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.segments.destroy()},_0x416c3b.register("CollisionBuffers",_0x365954);var _0x3dd3b7=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasPaintOverrides=!1,this.hasRTLText=!1;var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=_0x3f30ab(this.zoom,t["text-size"]),this.iconSizeData=_0x3f30ab(this.zoom,t["icon-size"]);var i=this.layers[0].layout,n=i.get("symbol-sort-key"),r=i.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==r&&void 0!==n.constantOr(1);var o="viewport-y"===r||"auto"===r&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map((function(e){return _0x38221e[e]}))),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id})),this.sourceID=e.sourceID,this.overscaling=1};_0x3dd3b7.prototype.createArrays=function(){const e=this.layers[0].layout;this.hasPaintOverrides=_0x55bb54.hasPaintOverrides(e);var t=symbolLayoutAttributes.members;this.text=new _0x1057d7(new ProgramConfigurationSet(t,this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new _0x1057d7(new ProgramConfigurationSet(t,this.layers,this.zoom,(e=>/^icon/.test(e)))),this.textCollisionBox=new _0x365954(_0xc3bbd1,collisionBoxLayout.members,_0x229baa),this.iconCollisionBox=new _0x365954(_0xc3bbd1,collisionBoxLayout.members,_0x229baa),this.textCollisionCircle=new _0x365954(_0xc3bbd1,collisionCircleLayout.members,_0xbd6def),this.iconCollisionCircle=new _0x365954(_0xc3bbd1,collisionCircleLayout.members,_0xbd6def),this.glyphOffsetArray=new _0x3b99b6,this.lineVertexArray=new _0x2cb00b,this.symbolInstances=new _0x1ec10f},_0x3dd3b7.prototype.calculateGlyphDependencies=function(e,t,i,n,r){for(let o=0;o<e.length;o++)if(t[e.charCodeAt(o)]=!0,(i||n)&&r){const i=verticalizedCharacterMap[e.charAt(o)];i&&(t[i.charCodeAt(0)]=!0)}},_0x3dd3b7.prototype.populate=function(e,t){var i=this.layers[0],n=i.layout,r=n.get("text-font"),o=n.get("text-field"),a=n.get("icon-image"),s=("constant"!==o.value.kind||o.value.value instanceof _0x2683dd&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&("constant"!==r.value.kind||r.value.value.length>0),l=("constant"!==a.value.kind||!!a.value.value)&&Object.keys(a.parameters).length>0,u=n.get("symbol-sort-key");if(this.features=[],s||l){for(var c=t.iconDependencies,h=t.glyphDependencies,d=t.availableImages,f=new _0x4f93ac(this.zoom),p=0,_=e;p<_.length;p+=1){var m=_[p],g=m.feature,x=m.index,v=m.sourceLayerIndex;if(i._featureFilter(f,g)){var y=void 0;if(s){var $=i.getValueAndResolveTokens("text-field",g,d),b=_0x2683dd.factory($);_0x2ab5fc(b)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===getRTLTextPluginStatus()||this.hasRTLText&&plugin.isParsed())&&(y=_0x342adb(b,i,g))}var T=void 0;if(l){var C=i.getValueAndResolveTokens("icon-image",g,d);T=C instanceof _0x313b86?C:_0x313b86.fromString(C)}if(y||T){var S=this.sortFeaturesByKey?u.evaluate(g,{}):void 0,w={text:y,icon:T,index:x,sourceLayerIndex:v,geometry:_0x1724dc(g),properties:g.properties,type:_0x120f9a[g.type],sortKey:S};if(void 0!==g.id&&(w.id=g.id),this.features.push(w),T&&(c[T.name]=!0),y){var E=r.evaluate(g,{}).join(","),P="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(_0x38221e.vertical)>=0;for(var A=0,L=y.sections;A<L.length;A+=1){var M=L[A];if(M.image)c[M.image.name]=!0;else{var R=allowsVerticalWritingMode(y.toString()),O=M.fontStack||E,I=h[O]=h[O]||{};this.calculateGlyphDependencies(M.text,I,P,this.allowVerticalPlacement,R)}}}}}}"line"===n.get("symbol-placement")&&(this.features=_0x33fa69(this.features)),this.sortFeaturesByKey&&this.features.sort((function(e,t){return e.sortKey-t.sortKey}))}},_0x3dd3b7.prototype.update=function(e,t,i){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,i),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,i))},_0x3dd3b7.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},_0x3dd3b7.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},_0x3dd3b7.prototype.upload=function(e){this.text&&(!this.uploaded&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e),this.textCollisionCircle.upload(e),this.iconCollisionCircle.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0)},_0x3dd3b7.prototype.destroy=function(){this.text&&(this.text.destroy(),this.icon.destroy(),this.textCollisionBox.destroy(),this.iconCollisionBox.destroy(),this.textCollisionCircle.destroy(),this.iconCollisionCircle.destroy())},_0x3dd3b7.prototype.clear=function(){},_0x3dd3b7.prototype.addToLineVertexArray=function(e,t){var i=this.lineVertexArray.length;if(void 0!==e.segment){for(var n=e.dist(t[e.segment+1]),r=e.dist(t[e.segment]),o={},a=e.segment+1;a<t.length;a++)o[a]={x:t[a].x,y:t[a].y,tileUnitDistanceFromAnchor:n},a<t.length-1&&(n+=t[a+1].dist(t[a]));for(var s=e.segment||0;s>=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:r},s>0&&(r+=t[s-1].dist(t[s]));for(var l=0;l<t.length;l++){var u=o[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:i,lineLength:this.lineVertexArray.length-i}},_0x3dd3b7.prototype.addSymbols=function(e,t,i,n,r,o,a,s,l,u,c){var h=this,d=e.indexArray,f=e.layoutVertexArray,p=e.dynamicLayoutVertexArray,_=e.segments.prepareSegment(4*t.length,e.layoutVertexArray,e.indexArray,o.sortKey),m=this.glyphOffsetArray.length,g=_.vertexLength,x=this.allowVerticalPlacement&&a===_0x38221e.vertical?Math.PI/2:0,v=function(e){var t=e.tl,n=e.tr,r=e.bl,o=e.br,a=e.tex,l=e.pixelOffsetTL,u=e.pixelOffsetBR,c=e.minFontScaleX,m=e.minFontScaleY,g=_.vertexLength,v=e.glyphOffset[1];_0x4a1444(f,s.x,s.y,t.x,v+t.y,a.x,a.y+a.h,i,e.isSDF,l.x,l.y,c,m),_0x4a1444(f,s.x,s.y,n.x,v+n.y,a.x+a.w,a.y+a.h,i,e.isSDF,u.x,l.y,c,m),_0x4a1444(f,s.x,s.y,r.x,v+r.y,a.x,a.y,i,e.isSDF,l.x,u.y,c,m),_0x4a1444(f,s.x,s.y,o.x,v+o.y,a.x+a.w,a.y,i,e.isSDF,u.x,u.y,c,m),_0x4cf153(p,s,x),d.emplaceBack(g,g+1,g+2),d.emplaceBack(g+1,g+2,g+3),_.vertexLength+=4,_.primitiveLength+=2,h.glyphOffsetArray.emplaceBack(e.glyphOffset[0])};if(o.text&&o.text.sections){var y=o.text.sections;if(this.hasPaintOverrides){for(var $,b=function(t,i){void 0!==$&&($!==t||i)&&e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},y[$]),$=t},T=0,C=t;T<C.length;T+=1){var S=C[T];b(S.sectionIndex,!1),v(S)}b($,!0)}else{for(var w=0,E=t;w<E.length;w+=1){v(E[w])}e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},y[0])}}else{for(var P=0,A=t;P<A.length;P+=1){v(A[P])}e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{})}e.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,g,l,u,s.segment,i?i[0]:0,i?i[1]:0,n[0],n[1],a,0,!1,0,c)},_0x3dd3b7.prototype._addCollisionDebugVertex=function(e,t,i,n,r,o){return t.emplaceBack(0,0),e.emplaceBack(i.x,i.y,n,r,Math.round(o.x),Math.round(o.y))},_0x3dd3b7.prototype.addCollisionDebugVertices=function(e,t,i,n,r,o,a,s){var l=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),u=l.vertexLength,c=r.layoutVertexArray,h=r.collisionVertexArray,d=a.anchorX,f=a.anchorY;if(this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,n)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,n)),l.vertexLength+=4,s){var p=r.indexArray;p.emplaceBack(u,u+1,u+2),p.emplaceBack(u,u+2,u+3),l.primitiveLength+=2}else{var _=r.indexArray;_.emplaceBack(u,u+1),_.emplaceBack(u+1,u+2),_.emplaceBack(u+2,u+3),_.emplaceBack(u+3,u),l.primitiveLength+=4}},_0x3dd3b7.prototype.addDebugCollisionBoxes=function(e,t,i,n){for(var r=e;r<t;r++){var o=this.collisionBoxArray.get(r),a=o.x1,s=o.y1,l=o.x2,u=o.y2,c=o.radius>0;this.addCollisionDebugVertices(a,s,l,u,c?n?this.textCollisionCircle:this.iconCollisionCircle:n?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,i,c)}},_0x3dd3b7.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e<this.symbolInstances.length;e++){var t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}},_0x3dd3b7.prototype._deserializeCollisionBoxesForSymbol=function(e,t,i,n,r,o,a,s,l){for(var u={},c=t;c<i;c++){var h=e.get(c);if(0===h.radius){u.textBox={x1:h.x1,y1:h.y1,x2:h.x2,y2:h.y2,anchorPointX:h.anchorPointX,anchorPointY:h.anchorPointY},u.textFeatureIndex=h.featureIndex;break}!u.textCircles&&(u.textCircles=[],u.textFeatureIndex=h.featureIndex);u.textCircles.push(h.anchorPointX,h.anchorPointY,h.radius,h.signedDistanceFromAnchor,1)}for(var d=n;d<r;d++){var f=e.get(d);if(0===f.radius){u.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalTextFeatureIndex=f.featureIndex;break}}for(var p=o;p<a;p++){var _=e.get(p);if(0===_.radius){u.iconBox={x1:_.x1,y1:_.y1,x2:_.x2,y2:_.y2,anchorPointX:_.anchorPointX,anchorPointY:_.anchorPointY},u.iconFeatureIndex=_.featureIndex;break}}for(var m=s;m<l;m++){var g=e.get(m);if(0===g.radius){u.verticalIconBox={x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,anchorPointX:g.anchorPointX,anchorPointY:g.anchorPointY},u.verticalIconFeatureIndex=g.featureIndex;break}}return u},_0x3dd3b7.prototype.deserializeCollisionBoxes=function(e){this.collisionArrays=[];for(var t=0;t<this.symbolInstances.length;t++){var i=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,i.textBoxStartIndex,i.textBoxEndIndex,i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i.iconBoxStartIndex,i.iconBoxEndIndex,i.verticalIconBoxStartIndex,i.verticalIconBoxEndIndex))}},_0x3dd3b7.prototype.hasTextData=function(){return this.text.segments.get().length>0},_0x3dd3b7.prototype.hasIconData=function(){return this.icon.segments.get().length>0},_0x3dd3b7.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},_0x3dd3b7.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},_0x3dd3b7.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},_0x3dd3b7.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},_0x3dd3b7.prototype.addIndicesForPlacedSymbol=function(e,t){for(var i=e.placedSymbolArray.get(t),n=i.vertexStartIndex+4*i.numGlyphs,r=i.vertexStartIndex;r<n;r+=4)e.indexArray.emplaceBack(r,r+1,r+2),e.indexArray.emplaceBack(r+1,r+2,r+3)},_0x3dd3b7.prototype.getSortedSymbolIndexes=function(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var t=Math.sin(e),i=Math.cos(e),n=[],r=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);n.push(0|Math.round(t*s.anchorX+i*s.anchorY)),r.push(s.featureIndex)}return o.sort((function(e,t){return n[e]-n[t]||r[t]-r[e]})),o},_0x3dd3b7.prototype.sortFeatures=function(e){var t=this;if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var i=0,n=this.symbolInstanceIndexes;i<n.length;i+=1){var r=n[i],o=this.symbolInstances.get(r);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(e,i,n){e>=0&&n.indexOf(e)===i&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},_0x416c3b.register("SymbolBucket",_0x3dd3b7,{omit:["layers","collisionBoxArray","compareText"]}),_0x3dd3b7.MAX_GLYPHS=65535,_0x3dd3b7.addDynamicAttributes=_0x4cf153;var _0x52096d=_0x3dd3b7,_0x357aca=!1,_0x4276c1=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n,r,o){this.isMVT=!0,this.mvtProvider=t.imageryProvider,this.tileSize=this.mvtProvider._canvasWidth,this._painter=this.mvtProvider._painter,this._MVTStyle=this.mvtProvider._MVTStyle,this.dispatcher=this._MVTStyle.dispatcher,this._MVTLabel=new _0x24125a(this.mvtProvider),this.highLighting=!1,this._visible=!1,this.working=!1,this.repaintWorking=!1,this.layersToUpdate=[],this.removedIds=[],this.imageryNeedToRender={},e.call(this,t,i,n,r,o),this._isToReRender=!1,this.frameState=null,this.realtime=this.mvtProvider.realtime,this.zoomLevel=-1,this.lastCameraZoomLevel=-1,this._passState=new n$Z,this._passState.viewport=new f$18,this.hasRawData=!1,this.uid=uniqueId()}function o(e){var t=e.mvtProvider._maxImageCacheLevel-e.level,i=0,n=!1,r=e.imageryLayer._detailLevelOffset;if(t<r&&(n=!0,i=r-t),!e.hasRawData||n){var o=function(e,t){var i=e.parent,n=1,r=e.hasRawData;t>0&&(r=!1);var o=null;for(;!r&&e$2b(i);)n>=t&&((r=i.hasRawData)&&(o=i)),i=i.parent,n++;return o}(e,i);return!e$2b(o)&&e.hasRawData?e:o}return e}function a(e){return{param:{featureIndex:e.featureIndex,tileID:{x:e.requestX,y:e.requestY,z:e.requestZ},indexData:e.indexData,pickId:e.pickId,webgpu:_0x357aca,type:"vector",source:e.mvtProvider.name,uid:e.uid,request:e.mvtProvider._requestManager.transformRequest(e.requestUrl,_0x179804.Tile)},transferableObjects:[]}}function s(e,t,i){e.setBuckets(t.buckets),e.imageAtlas=t.imageAtlas,e.featureIndex=t.featureIndex,e.featureIndex.rawTileData=t.rawTileData,e.glyphAtlasImage=t.glyphAtlasImage,i?e.repaintWorking=!1:e.working=!1}function l(e,t){var i=m(e.rectangle,t.rectangle),n=e.level,r=1;if(t.realtime){var o=t.frameState.camera;e$2b(o.zoomLevel)&&o.zoomLevel!=1/0&&(n=o.zoomLevel,t.zoomLevel=n)}else r=Math.pow(2,t.level-e.level);e.targetTileSize=e.tileSize*r,u(e,t,i,n),t.state!=wt$6.READY&&(t.state=wt$6.RENDERED),c(t)}function u(e,t,i,n){var r=e._painter;for(var o in e.buckets){var a=e.buckets[o];if(a instanceof _0x52096d)if(!("point"!==e._MVTStyle._layers[o].layout.get("symbol-placement")))continue;a.upload(r.cesiumContext)}e$2b(e.imageAtlas)&&!e$2b(e.imageAtlasTexture)&&(e.imageAtlasTexture=new _0x6d753e(r.context,r.cesiumContext,e.imageAtlas.image,V$10.RGBA),e.cesiumImageAtlas=new v$I({pixelFormat:V$10.RGBA,context:r.cesiumContext}),e.cesiumImageAtlas._texture=e.imageAtlasTexture.cesiumTexture),e.glyphAtlasImage&&(e.glyphAtlasTexture=new _0x6d753e(r.context,r.cesiumContext,e.glyphAtlasImage,r.cesiumContext.webgpu?V$10.RED:V$10.ALPHA),e.glyphAtlasImage=null,e.cesiumGlyphAtlas=new v$I({pixelFormat:V$10.ALPHA,context:r.cesiumContext}),e.cesiumGlyphAtlas._texture=e.glyphAtlasTexture.cesiumTexture),e.viewProjection=i;var s=e$2b(e.context)?e.context:t.context,l=t.level,u=t.texture||t.textureWebMercator;t._passState.context=s,t._passState.viewport.x=0,t._passState.viewport.y=0,t._passState.viewport.width=u.width,t._passState.viewport.height=u.height;var c=u.width+"_"+u.height;!e$2b(e.mvtProvider._renderTextureList[c])&&(e.mvtProvider._renderTextureList[c]=new t$V({context:s,width:u.width,height:u.height,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8}));var h=e.mvtProvider._renderTextureList[c];!t._framebuffer&&(t._framebuffer=new t$W({context:s,colorTextures:[u],depthStencilTexture:h})),t._passState.framebuffer=t._framebuffer;try{r.renderOneTile(e._MVTStyle,e,{targetTileLevel:l,finestRenderLevel:e.mvtProvider.maximumLevel,zoom:n,lineAntialiasing:e.mvtProvider.lineAntialiasing?1:0,passState:t._passState})}catch(e){console.log(e)}s.webgpu&&s.engine.flushFramebuffer()}function c(e){e.highLighting=!1,e.imageryLayer._finalizeReprojectTexture(e.context,e.texture||e.textureWebMercator)}n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.processStateMachine=function(e,t,i){this.frameState=e,this.context=e.context,_0x357aca=e.context.webgpu,this.state===wt$6.UNLOADED&&!i&&!this.imageryLayer._pausing&&(this.state=wt$6.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===wt$6.RECEIVED&&(this.state=wt$6.TRANSITIONING,this.indexData=this.image.indexData,this.image,this.imageryLayer._createTexture(e.context,this,e)),this.state===wt$6.TEXTURE_LOADED&&function(e){var t=o(e);if(!e$2b(t))return e.highLighting=!1,void console.log("MVTImagery has no rawData.");var i=g(e.x,e.y,e.level);if(t.imageryNeedToRender[i]=e,e$2b(t.buckets)&&!t.repaintWorking&&!t._isToReRender)return void l(t,e);if(!t.working){if(t.repaintWorking||t._isToReRender)return;var n=a(t);function r(e,i){delete t.request,e?(console.log("loadTile tile error in worker"),t.state=wt$6.FAILED):s(t,i,!1)}t.working=!0,!t.actor&&(t.actor=t.dispatcher.getActor()),t.request=t.actor.send("loadTile",n.param,r.bind(this))}}(this);var n=this.state===wt$6.READY&&t&&!this.texture;(this.state===wt$6.RENDERED||n)&&(this.state=wt$6.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))},r.prototype.addRepaintTask=function(e,t,i){var n={};this.layersToUpdate.map((function(e){n[e.id]=!0}));var r=this;e.map((function(e){!e$2b(n[e.id])&&r.layersToUpdate.push(e)})),this.removedIds=t,this.highLighting=i},r.prototype.clearRepaintTask=function(){this.layersToUpdate=[],this.removedIds=[]},r.prototype.update=function(){this.repaint()},r.prototype.setBuckets=function(e){var t=this.buckets;if(e$2b(t))for(var i in e){if(e$2b(t[i]))t[i].destroy(),t[i]=e[i];else t[i]=e[i]}else this.buckets=e},r.prototype.repaint=function(){this.state===wt$6.READY&&(this._isToReRender&&function(e){var t=o(e);if(!e$2b(t))return;var i=g(e.x,e.y,e.level);if(e._isToReRender&&!e.working&&(l(t,e),e._setNeedReRender(!1),e$2b(t.imageryNeedToRender[i])&&delete t.imageryNeedToRender[i],0==Object.getOwnPropertyNames(t.imageryNeedToRender).length&&e$2b(t.buckets)))for(var n in t.buckets){t.buckets[n].clear()}}(this),(this.layersToUpdate.length>0||this.removedIds.length>0)&&function(e){var t=o(e);if(!e$2b(t))return e.clearRepaintTask(),void(e.highLighting=!1);var i=g(e.x,e.y,e.level),n=e.layersToUpdate;if(t.imageryNeedToRender[i]=e,t.repaintWorking){if(!t.IsPickIdSameWithCurrentPickID())return;e.clearRepaintTask()}else{if(t.working)return;n.length>0&&n[0].id.indexOf("_highlight")>-1?t.pickId=n[0].id+n[0].filter[2]:t.pickId=void 0;var r=a(t);e.clearRepaintTask(),t.repaintWorking=!0,!t.actor&&(t.actor=t.dispatcher.getActor());var l=t.featureIndex.rawTileData;function u(i,n){if(delete t.request,i)console.log("reloadTile tile error in worker");else{if(s(t,n,!0),e.featureIndex.rawTileData=l,!t.IsPickIdSameWithCurrentPickID())return;if(!t.isDestroyed())for(var r in t.imageryNeedToRender)!t.imageryNeedToRender[r].isDestroyed()&&t.imageryNeedToRender[r]._setNeedReRender(!0)}}t.request=t.actor.send("reloadTile",r.param,u.bind(this))}}(this))},r.prototype._setNeedReRender=function(e){this._isToReRender=e,this._MVTLabel._setNeedReRender(e)},r.prototype.realtimeRender=function(){if(this.state===wt$6.READY&&this.realtime&&function(e){var t=e.frameState.camera;if(!e$2b(t.zoomLevel)||t.zoomLevel==1/0)return!1;var i=!1;e.lastCameraZoomLevel!=t.zoomLevel&&(i=!0),e.lastCameraZoomLevel=t.zoomLevel;var n=Math.abs(e.zoomLevel-t.zoomLevel);return!(n<.2&&i)&&0!=n}(this)){var e=o(this);e$2b(e)&&e$2b(e.buckets)&&!this.working&&function(e,t){var i=t.frameState.camera,n=void 0;if(!e$2b(i.zoomLevel))return;n=i.zoomLevel;var r=m(e.rectangle,t.rectangle);e.mvtProvider._context,e.targetTileSize=e.tileSize,u(e,t,r,n),c(t),t.zoomLevel=n}(e,this)}},r.prototype.IsPickIdSameWithCurrentPickID=function(){return!e$2b(this.mvtProvider._currentPickID)||!e$2b(this.pickId)||this.mvtProvider._currentPickID===this.pickId},r.prototype.setVisible=function(e){this._visible=e},r.prototype.getBucket=function(e){return e$2b(e.bucketName)?this.buckets[e.bucketName]:this.buckets[e.id]};var h=new p$1d,d=new p$1d,f=new o$1p(0,0,-1),p=new o$1p(0,1,0),_=new o$1p;function m(e,t){var i=t.width/e.width;t.height,e.height;var n=ae$s*i,r=.5*-n,o=.5*n,a=.5*-n,s=.5*n;h=p$1d.computeOrthographicOffCenter(r,o,a,s,-1,400,h);var l=new o$1p(.5*((t.west-e.west)/e.width*ae$s+(t.east-e.west)/e.width*ae$s),.5*((t.north-e.south)/e.height*ae$s+(t.south-e.south)/e.height*ae$s),200);d=p$1d.computeView(l,f,p,_,d);var u=new p$1d;return p$1d.multiply(h,d,u),u}function g(e,t,i){return JSON.stringify([e,t,i])}return _=o$1p.cross(f,p,_),r.prototype.queryRenderedFeatures=function(e,t,i){if(!e$2b(this.featureIndex)||!e$2b(this.featureIndex.rawTileData))return null;var n=this.featureIndex.query({queryGeometry:t,tileSize:this.tileSize,params:i},e,null),r=!1;for(var o in n)if(e[o]instanceof _0x252c8a&&n[o].length>1){r=!0;break}return r&&(n=this.featureIndex.query({queryGeometry:t,tileSize:this.tileSize,params:i,adjustScale:.1},e,null)),n},r.prototype.querySourceFeatures=function(e,t){if(e$2b(this.featureIndex)&&e$2b(this.featureIndex.rawTileData)){var i=this.featureIndex.loadVTLayers(),n=e?e.sourceLayer:"";""!==n&&(n=n.replace(/(.*)(#\d.*)/,"$1"),e.sourceLayer=n);var r=i[n];if(r)for(var o=_0x570fee.createFilter(e&&e.filter),a=0;a<r.length;a++){var s=r.feature(a);o(new _0x4f93ac(0),s)&&t.push(s)}}},r.prototype.isTileIDLessThan=function(e){return this.level<e.level||!(this.level>e.level)&&(this.x<e.x||!(this.x>e.x)&&this.y<e.y)},r.prototype.release=function(){if(this.request&&(this.request.cancel(),delete this.request),this.actor&&(this.actor.send("abortTile",{type:"vector",source:this.mvtProvider.name,uid:this.uid},void 0),this.actor.send("removeTile",{type:"vector",source:this.mvtProvider.name,uid:this.uid},void 0)),e$2b(this.buckets)){for(var e in this.buckets){this.buckets[e].destroy()}this.buckets=null}e$2b(this.imageAtlasTexture)&&(this.imageAtlasTexture.destroy(),this.imageAtlasTexture=null),e$2b(this.glyphAtlasTexture)&&(this.glyphAtlasTexture.destroy(),this.glyphAtlasTexture=null),this._MVTLabel.release()},r}(o$V),_0x25603d=(_0x258583=!0,function(e,t){var i=_0x258583?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x258583=!1,i}),_0x369f15=_0x25603d(void 0,(function(){return _0x369f15.toString().search("(((.+)+)+)+$").toString().constructor(_0x369f15).search("(((.+)+)+)+$")})),_0x258583;function _0x46a73d(){}_0x369f15();var _0x354e64=20;function _0x49025c(e,t){return e.priority-t.priority}s$Y.supportsWebAssembly();var _0x3c752a=new o$1g({comparator:_0x49025c});function _0x9c19d6(e){e$2b(e.priorityFunction)&&(e.priority=e.priorityFunction())}_0x3c752a.maximumLength=_0x354e64,_0x3c752a.reserve(_0x354e64);var _0x413ba7={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5};function _0x3bd815(e){return e.state===_0x413ba7.UNISSUED&&(e.state=_0x413ba7.ISSUED,e.deferred=o$1l.defer()),e.deferred.promise}function _0x47ff94(e){var t=_0x46a73d.taskProcessorMap[e.processorName];if(!_0x46a73d.taskProcessorReady)return!1;"S3MBTilesParser"===e.processorName&&t._activeTasks>=2&&_0x46a73d.secTaskProcessorReady&&_0x46a73d.useMultiWebWorker&&(t=_0x46a73d.taskProcessorMap.S3MBTilesParserSec);var i=t.scheduleTask(e.data);return!!e$2b(i)&&(e.state=_0x413ba7.ACTIVE,i.then((function(t){e.state!==_0x413ba7.CANCELLED&&(e.state=_0x413ba7.RECEIVED,e.deferred.resolve(t))})).otherwise((function(t){e.state!==_0x413ba7.CANCELLED&&(e.state=_0x413ba7.FAILED,e.deferred.reject(t))})),!0)}_0x46a73d.cancelTask=function(e){e.state=_0x413ba7.CANCELLED,e$2b(e.deferred)&&e.deferred.reject()},_0x46a73d.startTask=function(e){_0x9c19d6(e);var t=_0x3c752a.insert(e);if(e$2b(t)){if(t===e)return;_0x46a73d.cancelTask(t)}return _0x3bd815(e)},_0x46a73d.processTasks=function(){for(var e=_0x3c752a.internalArray,t=_0x3c752a.length,i=0;i<t;++i)_0x9c19d6(e[i]);_0x3c752a.resort();for(var n;_0x3c752a.length>0;)if((n=_0x3c752a.pop()).state!==_0x413ba7.CANCELLED&&!_0x47ff94(n))return void _0x3c752a.insert(n)},_0x46a73d.initWebAssembly=function(){if(_0x46a73d.init=!0,0==s$Y.supportsWebAssembly())return _0x46a73d.taskProcessorReady=!0,void(_0x46a73d.CRNTaskProcessorReady=!0);_0x46a73d.S3MBTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper_new.js",wasmBinaryFile:"ThirdParty/draco_decoder_new.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(e){_0x46a73d.taskProcessorReady=e})),_0x46a73d.S3MBTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(e){_0x46a73d.taskProcessorReady=e})),_0x46a73d.S3MBTaskProcessorSec.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper_new.js",wasmBinaryFile:"ThirdParty/draco_decoder_new.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(e){_0x46a73d.secTaskProcessorReady=e})),_0x46a73d.S3MBTaskProcessorSec.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(e){_0x46a73d.secTaskProcessorReady=e})),_0x46a73d.CRNProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){_0x46a73d.CRNTaskProcessorReady=!0})),_0x46a73d.unzipDataTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){_0x46a73d.CRNTaskProcessorReady=!0}))},_0x46a73d.S3MTaskProcessor=new i$V("S3MTilesParser"),_0x46a73d.S3MBTaskProcessor=new i$V("S3MBTilesParser"),_0x46a73d.S3MBTaskProcessorSec=new i$V("S3MBTilesParser"),_0x46a73d.indexTaskProcessor=new i$V("indexedDBWorker"),_0x46a73d.CRNProcessor=new i$V("transcodeCRNToDXT",Number.POSITIVE_INFINITY),_0x46a73d.unzipDataTaskProcessor=new i$V("UnZipData"),_0x46a73d.taskProcessorReady=!1,_0x46a73d.CRNTaskProcessorReady=!1,_0x46a73d.init=!1,_0x46a73d.taskProcessorMap={UnZipData:_0x46a73d.unzipDataTaskProcessor,S3MBTilesParser:_0x46a73d.S3MBTaskProcessor,S3MBTilesParserSec:_0x46a73d.S3MBTaskProcessorSec},_0x46a73d.useMultiWebWorker=!1;var _0x5e84cf=(_0xc19b19=!0,function(e,t){var i=_0xc19b19?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc19b19=!1,i}),_0x7996c0=_0x5e84cf(void 0,(function(){return _0x7996c0.toString().search("(((.+)+)+)+$").toString().constructor(_0x7996c0).search("(((.+)+)+)+$")})),_0xc19b19;function _0x206cda(){this._fileName=void 0,this._relativePath=void 0,this._orientedBoundingBox=void 0,this._boundingSphere=new i$1c,this._childrenPageLod=[],this._pagelodMap={},this._isLeafTile=!1,this._isRootTile=!1,this._hasLeafChild=!1,this._isEmptyTree=!0,this._s3mLoadState=N$P.UNLOAD,this._attrLoadState=N$P.UNLOAD,this._leafAttrLoadState=N$P.UNLOAD,this._attrAppend=[],this._isParsed=!1,this._configLoadState=N$P.UNLOAD,this._avgPix=0,this._disFromCamera=0,this._nLODLev=0,this._ready=!1,this._configReady=!1,this._isVisible=!0,this._owner=void 0,this.s3mBuffer=null,this.volBuffer=null,this.volImage=null,this._visibilityPlaneMask=0,this._texturesByteLength=0,this._replacementNode=null,this._volObj=null,this._volTexture=null,this._volTextures={},this.skeletonState=void 0,this.skeletonPackages=void 0,this.instancePackage=void 0,this._reloadVol=!1,this._oriBoundingSphere=null,this._isAncestorBlock=!1,this._isChildBlock=!1,this._blockKey=void 0,this._priority=1e3,this._rootBatchIdMap={},this._ancestorMap={},this._shouldSelect=!1,this._stackLength=0,this._needRefine=!0,this._selected=!1,this._readyAncestor=void 0,this._parent=void 0,this._depth=1,this._needRequest=!0,this._parentPagelod=void 0,this._leafChildren=[],this._centerZDepth=0,this._foveatedFactor=0,this._priority=0,this._hasConfig=!1,this._needLoad=!1,this._skipLevel=0,this._subdomainIndex=0,this._prepareLoad=!1,this._tmpMaterialArr=[],this.hasTranslate=!1,this.isFlatten=!1}function _0x550c6e(e,t,i){return Math.max(e$2a.normalize(e,t,i)-e$2a.EPSILON7,0)}function _0x4cd18e(e,t,i){var n=e*Math.pow(10,t);return parseInt(n)*Math.pow(10,i)}_0x7996c0(),Object.defineProperties(_0x206cda.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox||this._boundingSphere}}}),_0x206cda.prototype.updatePriority=function(e){var t=e._minimumPriority,i=e._maximumPriority,n=4,r=_0x4cd18e(_0x550c6e(this._foveatedFactor,t.foveatedFactor,i.foveatedFactor),4,n);n=0;var o=_0x4cd18e(1-_0x550c6e(this._avgPix,t.pixel,i.pixel),4,n);n=8;var a=_0x4cd18e(_0x550c6e(this._disFromCamera,t.distance,i.distance),4,n);this._priority=r+o+a},_0x206cda.prototype.memoryUsage=function(){for(var e=this._texturesByteLength,t=0;t<this._childrenPageLod.length;t++)for(var i=0;i<this._childrenPageLod[t]._renderEntityList.length;i++)e+=this._childrenPageLod[t]._renderEntityList[i]._geometryByteLength,e$2b(this._childrenPageLod[t]._entity)&&this._childrenPageLod[t]._entity._isChildBlock&&(e+=this._childrenPageLod[t]._entity.memoryUsage());return e},_0x206cda.prototype.memoryUsageEx=function(e){e.texSize+=this._texturesByteLength;for(var t=0;t<this._childrenPageLod.length;t++)for(var i=0;i<this._childrenPageLod[t]._renderEntityList.length;i++)e.geoSize+=this._childrenPageLod[t]._renderEntityList[i]._geometryByteLength,e$2b(this._childrenPageLod[t]._entity)&&this._childrenPageLod[t]._entity._isChildBlock&&this._childrenPageLod[t]._entity.memoryUsageEx(e);return e.geoSize+e.texSize},Object.defineProperties(_0x206cda.prototype,{attrLoadState:{get:function(){return this._attrLoadState},set:function(e){this._attrLoadState=e}},leafAttrLoadState:{get:function(){return this._leafAttrLoadState},set:function(e){this._leafAttrLoadState=e}}}),_0x206cda.prototype.setEmptyTreeFlag=function(e){for(var t=[this];t.length;){var i=t.pop();i._isEmptyTree=e;for(var n=0,r=i._childrenPageLod.length;n<r;n++){var o=i._childrenPageLod[n];e$2b(o._entity)&&o._entity._isEmptyTree&&t.push(o._entity)}}},_0x206cda.prototype.traverse=function(e){for(var t=0,i=this._childrenPageLod.length;t<i;t++){var n=this._childrenPageLod[t];e(n),n._entity&&(n._entity._s3mLoadState===N$P.LOADING||n._entity._s3mLoadState===N$P.LOADVOL?n._entity._s3mLoadState=N$P.LOST:n._entity.traverse(e))}},_0x206cda.prototype.transformResource=function(e,t,i){var n=e.context,r=!0;let o=!1;for(var a=0,s=this._childrenPageLod.length;a<s;a++){for(var l=!0,u=0,c=(d=this._childrenPageLod[a])._renderEntityList.length;u<c;u++){var h=d._renderEntityList[u];if(n.memorySize>i)return o=!0,o;if(!h.renderable){r=!1,l=!1;try{h.transformResource(e,t)}catch(e){console.log(e)}}}d._ready=l}for(a=0,s=this._leafChildren.length;a<s;a++){var d;for(l=!0,u=0,c=(d=this._leafChildren[a])._renderEntityList.length;u<c;u++){h=d._renderEntityList[u];if(n.memorySize>i)return o=!0,o;if(!h.renderable){r=!1,l=!1;try{h.transformResource(e,t)}catch(e){console.log(e)}}}d._ready=l}return r&&(this._ready=!0,this._s3mLoadState=N$P.TRANSFORMED),o},_0x206cda.prototype.freeResource=function(e){for(var t=0,i=this._childrenPageLod.length;t<i;t++){this._childrenPageLod[t].freeResource(e)}for(t=0,i=this._leafChildren.length;t<i;t++){this._leafChildren[t].freeResource(e)}this._leafChildren.length=0,this._ready=!1,this._s3mLoadState=N$P.UNLOAD,this._replacementNode=void 0},_0x206cda.prototype.isDestroyed=function(){return!1},_0x206cda.prototype.destroy=function(e,t){for(var i=0,n=this._childrenPageLod.length;i<n;i++)this._childrenPageLod[i]=this._childrenPageLod[i]&&!this._childrenPageLod[i].isDestroyed()&&this._childrenPageLod[i].destroy(e,t);for(var r in this._childrenPageLod.length=0,this._ready=!1,this._s3mLoadState=N$P.UNLOAD,this._avgPix=0,this._disFromCamera=0,this.s3mBuffer=null,this.volBuffer=null,this.volImage=null,this._replacementNode=null,this.skeletonState=void 0,this.skeletonPackage=void 0,this.instancePackage=void 0,e$2b(this._volObj)&&Se$d.DestroyTexture(this._volObj.id),this._volObj=null,e$2b(this._volTexture)&&this._volTexture.destroy(),this._volTexture=null,this._volTextures)if(this._volTextures.hasOwnProperty(r)){var o=this._volTextures[r];e$2b(o)&&o.destroy()}this._volTextures={},this.request=void 0,e$2b(this.task)&&_0x46a73d.cancelTask(this.task),this.task=void 0;for(i=0,n=this._tmpMaterialArr.length;i<n;i++){var a=this._tmpMaterialArr[i];a.isDestroyed()||a.destroy()}},_0x206cda.prototype.isImageryLoaded=function(e){if(!e$2b(e._imageryLayer))return!0;for(var t=!0,i=this._childrenPageLod.length,n=0;n<i;n++)for(var r=this._childrenPageLod[n]._renderEntityList,o=r.length,a=0;a<o;a++){var s=r[a]._imagerys;if(e$2b(s))for(var l=s.length,u=0;u<l;u++)s[u]instanceof _0x4276c1?s[u].state===wt$6.RENDERED||s[u].state===wt$6.READY||s[u].state===wt$6.FAILED||(t=!1):s[u].state<wt$6.TEXTURE_LOADED&&(t=!1)}return t},_0x206cda.prototype.extendRadius=function(e){e*=1.5,e$2b(this._oriBoundingSphere)||(this._oriBoundingSphere=this._boundingSphere.clone()),this._boundingSphere.radius=this._oriBoundingSphere.radius+e;for(var t=0,i=this._childrenPageLod.length;t<i;t++){var n=this._childrenPageLod[t];n._boundingSphere.radius=this._oriBoundingSphere.radius+e;for(var r=0;r<n._renderEntityList.length;r++){var o=n._renderEntityList[r];o._boundingVolume.radius=this._oriBoundingSphere.radius+e,e$2b(o._colorCommand)&&(o._colorCommand._boundingVolume.radius=this._oriBoundingSphere.radius+e)}}},_0x206cda.prototype.loadImagery=function(e,t){if(e$2b(e._imageryLayer)){for(var i=0,n=this._childrenPageLod.length,r=0;r<n;r++)for(var o=this._childrenPageLod[r]._renderEntityList,a=o.length,s=0;s<a;s++)if(!o[s]._imageRasterFinish){var l=o[s]._imagerys;if(e$2b(l))for(var u=l.length,c=0;c<u;c++)l[c].state<wt$6.TEXTURE_LOADED&&(l[c].processStateMachine(t,!1),i+=1)}return i}};var _0x1ebb99=(_0x20e734=!0,function(e,t){var i=_0x20e734?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x20e734=!1,i}),_0x340562=_0x1ebb99(void 0,(function(){return _0x340562.toString().search("(((.+)+)+)+$").toString().constructor(_0x340562).search("(((.+)+)+)+$")})),_0x20e734;_0x340562();var _0x516e2e={DISTANCE_FROM_EYE_POINT:0,PIXEL_SIZE_ON_SCREEN:1,GEOMETRY_ERROR:2},_0x2056d1=Object.freeze(_0x516e2e),_0x4f4ec0=(_0x39b56f=!0,function(e,t){var i=_0x39b56f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39b56f=!1,i}),_0x565899=_0x4f4ec0(void 0,(function(){return _0x565899.toString().search("(((.+)+)+)+$").toString().constructor(_0x565899).search("(((.+)+)+)+$")})),_0x39b56f;_0x565899();var _0x36a2c7={Root_Priority:0,Child_Priority:1,UsePagedLodInfo:2,Child_Priority_NonLinear:3},_0x10659f=Object.freeze(_0x36a2c7),_0x4373b1=(_0x4317b9=!0,function(e,t){var i=_0x4317b9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4317b9=!1,i}),_0x3eccba=_0x4373b1(void 0,(function(){return _0x3eccba.toString().search("(((.+)+)+)+$").toString().constructor(_0x3eccba).search("(((.+)+)+)+$")})),_0x4317b9;function _0x46a5cb(){this._orientedBoundingBox=void 0,this._boundingSphere=void 0,this._rangeList=0,this._rangeDataList=void 0,this._isLeafNode=!1,this._isLessLodDis=!0,this._entity=null,this._renderEntityList=[],this._ready=!1,this._pix=0,this._rangeMode=_0x2056d1.DISTANCE_FROM_EYE_POINT,this._processFileType=0,this._renderEntityVisible=[],this._fileType=d$15.OSGBFile,this._shouldSelect=!1,this._selectionDepth=0,this._stackLength=0,this._finalResolution=!0,this._isVisible=!0,this._centerZDepth=0,this._needRefine=!0}function _0x1237de(e,t,i,n){var r=t.uniformState.resolutionScale,o=i._boundingSphere,a=o.radius,s=o.center,l=t.drawingBufferHeight,u=e$2b(i._orientedBoundingBox)?Math.sqrt(i._orientedBoundingBox.distanceSquaredTo(e.positionWC)):Math.max(o$1p.distance(e.positionWC,s)-a,1e-5),c=i._rangeList*l/(u*e.frustum.sseDenominator);if(c/=r,e$2b(n)&&(n===_0x10659f.Child_Priority_NonLinear||n===_0x10659f.UsePagedLodInfo)){var h=i._fileType===d$15.OSGBFile?800:300,d=Math.max(a,h);if(e$2b(i._orientedBoundingBox)&&(s=i._orientedBoundingBox.center),(u=o$1p.distance(e.positionWC,s))>d){var f=2*d/u;f<1&&(c*=f)}}return c}function _0xce6562(e,t,i,n,r){var o=0,a=t.uniformState.resolutionScale,s=i._boundingSphere,l=s.radius,u=s.center,c=o$1p.distance(e.positionWC,u);if(c=Math.max(1e-5,c),e._mode===C$13.SCENE2D&&(c=e.positionCartographic.height),o=t.drawingBufferHeight/(2*Math.tan(.5*e$2a.PI_OVER_FOUR))*l/c,o/=a,e$2b(n)&&(n==_0x10659f.Child_Priority_NonLinear||n===_0x10659f.UsePagedLodInfo)){var h=Math.max(s.radius,r);c>h&&(o*=h/c)}return Math.ceil(o)}_0x3eccba(),_0x46a5cb.prototype.calcPixFromCam=function(e,t,i,n,r){if(this._boundingSphere){var o=e.positionWC,a=o$1p.clone(this._boundingSphere.center),s=o$1p.distance(a,o);e._mode==C$13.SCENE2D&&(s=e.positionCartographic.height),this._disFromCamera=s-this._boundingSphere.radius;var l=0;if(i/=ti$3.getQuality(),this._rangeMode==_0x2056d1.DISTANCE_FROM_EYE_POINT)l=s-this._boundingSphere.radius,this._isLessLodDis=l>this._rangeList*i,l=-l;else if(this._rangeMode===_0x2056d1.GEOMETRY_ERROR)l=_0x1237de(e,t,this,r),this._isLessLodDis=l<=16*i;else l=2*_0xce6562(e,t,this,r,this._fileType===d$15.OSGBFile?800:300),this._isLessLodDis=l<=this._rangeList*i;this._pix=l,this._entity&&(this._entity._avgPix=l,this._entity._disFromCamera=this._disFromCamera,this._entity._isRootTile||(this._entity._disFromCamera*=n))}},_0x46a5cb.prototype.calcImageryScaleLevel=function(e,t,i,n,r){if(this._boundingSphere){var o=e.positionWC,a=o$1p.clone(this._boundingSphere.center),s=o$1p.distance(a,o);e._mode==C$13.SCENE2D&&(s=e.positionCartographic.height),this._disFromCamera=s-this._boundingSphere.radius;var l=0;return i/=ti$3.getQuality(),r==_0x2056d1.DISTANCE_FROM_EYE_POINT?(l=s-this._boundingSphere.radius,this._isLessLodDis=l>this._rangeList*i,l=-l,this._pix=l,Math.sqrt(this._rangeList*i/l)):r===_0x2056d1.GEOMETRY_ERROR?(this._rangeList=16*this._boundingSphere.radius/256,l=_0x1237de(e,t,this,n),this._isLessLodDis=l<=16*i,this._pix=l,Math.sqrt(l/(16*i))):(l=2*_0xce6562(e,t,this,n,this._fileType===d$15.OSGBFile?800:300),this._isLessLodDis=l<=this._rangeList*i,this._pix=l,Math.sqrt(l/(this._rangeList*i)))}},_0x46a5cb.prototype.freeResource=function(e){for(var t=0,i=this._renderEntityList.length;t<i;t++){this._renderEntityList[t].destroy(!0)}this._renderEntityList.length=0,this._ready=!1},_0x46a5cb.prototype.isDestroyed=function(){return!1},_0x46a5cb.prototype.destroy=function(e,t){for(var i=0,n=this._renderEntityList.length;i<n;i++)e$2b(e)&&this._renderEntityList[i].refreshRaster(e),this._renderEntityList[i]=this._renderEntityList[i]&&!this._renderEntityList[i].isDestroyed()&&this._renderEntityList[i].destroy();return this._renderEntityList.length=0,e$2b(this._entity)&&(t||this._entity._isChildBlock)&&this._entity.destroy(e,t),this._entity=void 0,i$10(this)};var _0x51a0a5=(_0x5b5180=!0,function(e,t){var i=_0x5b5180?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b5180=!1,i}),_0x9cb834=_0x51a0a5(void 0,(function(){return _0x9cb834.toString().search("(((.+)+)+)+$").toString().constructor(_0x9cb834).search("(((.+)+)+)+$")})),_0x5b5180;_0x9cb834();var _0x4eaac2=function(){this.context=void 0,this.model=void 0,this.index=void 0};_0x4eaac2.prototype.set=function(e,t,i){this.context=e,this.model=t,this.index=i},_0x4eaac2.prototype.execute=function(){var e=this.context,t=this.model._layer,i=this.index,n=this.model._vertexPackage,r=n.vertexAttributes[i];if(!e$2b(r))throw new t$16("attribute is not exit");if(-1!==n.instanceIndex&&!e$2b(this.model._instanceBuffer)){if(!e$2b(n.instanceBuffer))throw new t$16("instance buffer is null");this.model._instanceBuffer=t$Y.createVertexBuffer({context:e,typedArray:n.instanceBuffer,usage:A$19.STATIC_DRAW}),this.model._geometryByteLength+=this.model._instanceBuffer.sizeInBytes,ti$3._memGeometryAdded(this.model._instanceBuffer.sizeInBytes)}1!==r.instanceDivisor||e$2b(r.typedArray)?e$2b(r.vertexBuffer)||(e$2b(r.vertexBuffer)||(r.vertexBuffer=t$Y.createVertexBuffer({context:e,typedArray:r.typedArray,usage:A$19.STATIC_DRAW})),t._totalMemoryUsageInBytes+=r.vertexBuffer.sizeInBytes,this.model._geometryByteLength+=r.vertexBuffer.sizeInBytes,ti$3._memGeometryAdded(r.vertexBuffer.sizeInBytes),r.typedArray=null,delete r.typedArray):r.vertexBuffer=this.model._instanceBuffer};var _0x5a2d8e=(_0x13cfdf=!0,function(e,t){var i=_0x13cfdf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13cfdf=!1,i}),_0x540e86=_0x5a2d8e(void 0,(function(){return _0x540e86.toString().search("(((.+)+)+)+$").toString().constructor(_0x540e86).search("(((.+)+)+)+$")})),_0x13cfdf;_0x540e86();var _0x5cff5c=function(){this.model=void 0,this.context=void 0,this.index=0};_0x5cff5c.prototype.set=function(e,t,i,n){this.model=t,this.context=e,this.index=i,this.verticesCount=n},_0x5cff5c.prototype.execute=function(){var e=this.context,t=this.model._layer,i=this.model._arrIndexPackage[this.index];if(!e$2b(i))throw new t$16("index package is null");if(!e$2b(i.indexBuffer)){if(!e$2b(i.indicesTypedArray))throw new t$16("index buffer is null");var n=ce$x.UNSIGNED_SHORT;(1===i.indexType||this.verticesCount>=e$2a.SIXTY_FOUR_KILOBYTES)&&this.context.elementIndexUint&&(n=ce$x.UNSIGNED_INT),e$2b(i.indexBuffer)||(i.indexBuffer=t$Y.createIndexBuffer({context:e,typedArray:i.indicesTypedArray,usage:A$19.STATIC_DRAW,indexDatatype:n}),t._totalMemoryUsageInBytes+=i.indexBuffer.sizeInBytes,this.model._geometryByteLength+=i.indexBuffer.sizeInBytes,ti$3._memGeometryAdded(i.indexBuffer.sizeInBytes)),i.indicesTypedArray=null,delete i.indicesTypedArray}};var _0x297623=(_0x1e2dbe=!0,function(e,t){var i=_0x1e2dbe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e2dbe=!1,i}),_0x2bfc94=_0x297623(void 0,(function(){return _0x2bfc94.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bfc94).search("(((.+)+)+)+$")})),_0x1e2dbe;function _0x4dad4e(){this.textures={},this.textureRefCounts={},this._context=void 0}_0x2bfc94(),_0x4dad4e.createTexture=function(e){var t=e.imageUrl,i=u$_(e.wrapS,q$19.REPEAT),n=u$_(e.wrapT,q$19.REPEAT),r=u$_(e.minificationFilter,tt$h.LINEAR),o=u$_(e.magnificationFilter,rt$i.LINEAR),a=u$_(e.pixelFormat,V$10.RGBA),s=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE);if(e$2b(t)){var l=t;_0x16a2d8.textureRefCounts[l]?_0x16a2d8.textureRefCounts[l]++:(_0x16a2d8.textureRefCounts[l]=1,o$1l(t$T(t),(function(e){var t=new e$1P({wrapS:i,wrapT:n,minificationFilter:r,magnificationFilter:o}),u=new t$V({context:_0x16a2d8._context,source:e,pixelFormat:a,pixelDatatype:s,sampler:t});u.generateMipmap(),_0x16a2d8.textures[l]=u})))}},_0x4dad4e.getTexture=function(e){if(e$2b(e))return _0x16a2d8.textures[e]},_0x4dad4e.removeTexture=function(e){e$2b(e)&&(e$2b(_0x16a2d8.textureRefCounts[e])&&(_0x16a2d8.textureRefCounts[e]--,0===_0x16a2d8.textureRefCounts[e])&&(_0x16a2d8.textures[e].destroy(),delete _0x16a2d8.textures[e],delete _0x16a2d8.textureRefCounts[e]))},_0x4dad4e.update=function(e){_0x16a2d8._context=e};var _0x16a2d8=new _0x4dad4e,_0x4739b3=(_0x5a6604=!0,function(e,t){var i=_0x5a6604?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a6604=!1,i}),_0x4e8c6a=_0x4739b3(void 0,(function(){return _0x4e8c6a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e8c6a).search("(((.+)+)+)+$")})),_0x5a6604;_0x4e8c6a();var _0x339833={NONE:0,SELECTION:1,ALL:2},_0x381f49=Object.freeze(_0x339833),_0x2a7c12=(_0x2de6d1=!0,function(e,t){var i=_0x2de6d1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2de6d1=!1,i}),_0x57d347=_0x2a7c12(void 0,(function(){return _0x57d347.toString().search("(((.+)+)+)+$").toString().constructor(_0x57d347).search("(((.+)+)+)+$")})),_0x2de6d1;function _0x23730d(){}_0x57d347();var _0x4c4468=[];_0x23730d.createUniformMapsForCompressAttributes=function(e,t){var i=e._vertexPackage,n=i.nCompressOptions;(n&_0x35ed09.SVC_Vertex)==_0x35ed09.SVC_Vertex&&(t.decode_position_min=function(){return i.minVerticesValue},t.decode_position_normConstant=function(){return i.vertCompressConstant}),(n&_0x35ed09.SVC_Normal)==_0x35ed09.SVC_Normal&&(t.normal_rangeConstant=function(){return i.normalRangeConstant}),(n&_0x35ed09.SVC_TexutreCoord)==_0x35ed09.SVC_TexutreCoord&&(i.texCoordCompressConstant.length>0&&(t.decode_texCoord0_min=function(){return i.minTexCoordValue[0]},t.decode_texCoord0_normConstant=function(){return i.texCoordCompressConstant[0]},t.decode_texCoord0_vNormConstant=function(){return i.texCoordCompressConstant[0]}),i.texCoordCompressConstant.length>1&&(t.decode_texCoord1_min=function(){return i.minTexCoordValue[1]},t.decode_texCoord1_normConstant=function(){return i.texCoordCompressConstant[1]},t.decode_texCoord1_vNormConstant=function(){return i.texCoordCompressConstant[1]}),i.texCoordCompressConstant.length>2&&(t.decode_texCoord2_min=function(){return i.minTexCoordValue[2]},t.decode_texCoord2_normConstant=function(){return i.texCoordCompressConstant[2]}),i.texCoordCompressConstant.length>3&&(t.decode_texCoord3_min=function(){return i.minTexCoordValue[3]},t.decode_texCoord3_normConstant=function(){return i.texCoordCompressConstant[3]}),i.texCoordCompressConstant.length>4&&(t.decode_texCoord4_min=function(){return i.minTexCoordValue[4]},t.decode_texCoord4_normConstant=function(){return i.texCoordCompressConstant[4]}),i.texCoordCompressConstant.length>5&&(t.decode_texCoord5_min=function(){return i.minTexCoordValue[5]},t.decode_texCoord5_normConstant=function(){return i.texCoordCompressConstant[5]}),i.texCoordCompressConstant.length>6&&(t.decode_texCoord6_min=function(){return i.minTexCoordValue[6]},t.decode_texCoord6_normConstant=function(){return i.texCoordCompressConstant[6]}),i.texCoordCompressConstant.length>7&&(t.decode_texCoord7_min=function(){return i.minTexCoordValue[7]},t.decode_texCoord7_normConstant=function(){return i.texCoordCompressConstant[7]}))};let _0x3893f8=0,_0x2e2fe9=0;_0x23730d.createWaterUniform=function(e,t,i){if(e$2b(e.waterEffectSet)&&e.multiTemporalUseWater){var n=e._frameState._framebufferList.water;i.uReflectMap=function(){return n.renderTexture._fb.getColorTexture(0)},i.uUseRefectMap=function(){return n&&n.isUpdate?1:0},i.uNoiseMap=function(){return n._waterNormalMap},i.uTimeVal=function(){return _0x2e2fe9!=e._frameState.frameNumber&&(_0x3893f8+=1/60,_0x2e2fe9=e._frameState.frameNumber),_0x3893f8},i.uBumpSpeed=function(){return e._waterParamter.bumpSpeed},i.uWaterColour=function(){return e._waterParamter.waterColour},i.uWaterBrightness=function(){return e._waterParamter.waterBrightness},i.uSunColor=function(){return e._frameState.lightSource.sunLightColor}}};var _0x399c28=new o$1o,_0x2219d3=new o$1o;const _0x5b86f8=new e$29;_0x23730d.createCommonLayerUniform=function(e,t){if(t.uSelColor=function(){return e.selectedColor},t.uTranslationAndBottom=function(){return _0x5b86f8.x=e.selectedTranslate.x,_0x5b86f8.y=e.selectedTranslate.y,_0x5b86f8.z=e.selectedTranslate.z,_0x5b86f8.w=e.style3D.bottomAltitude,e.selectedTranslate},t.uFillForeColor=function(){return e.style3D.fillForeColor},t.uPolygonOffset=function(){var t=e._rsColor.polygonOffset;return e$2b(t)?(_0x2219d3.x=t.factor,_0x2219d3.y=t.units):(_0x2219d3.x=0,_0x2219d3.y=0),_0x2219d3},t.u_polygonOffset=function(){var t=0,i=0,n=e._rsColor.polygonOffset;return e$2b(n)?(t=n.factor,i=n.units):(t=0,i=0),{x:t,y:i}},t.uPointSize=function(){return e.style3D.pointSize},t.uMinMaxTransparent=function(){return _0x399c28.x=e.minTransparentAlpha,_0x399c28.y=e.maxTransparentAlpha,_0x399c28},t.uTransparentFilter=function(){return e.selectionFiltrateByTransparency},e.hasHyp){t.uHypHasAnalysisRegion=function(){return e._bUseHypRegion},t.uMixColorType=function(){return e$2b(e._mixColorType)?e._mixColorType:0},t.uDataFloor=function(){return e._fMinValue===e._fMaxValue?0:e._fMinValue},t.uDataCeil=function(){return e._fMinValue===e._fMaxValue?1:e._fMaxValue},t.uEmissionTexAtlas=function(){return e$2b(e._hypsometricSetting._emissionTextureAtlas)?e._hypsometricSetting._emissionTextureAtlas.texture:e._context.defaultTexture},t.uEmissionTexAtlasRects=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting._getEmissionAtlasTextureRects():_0x4c4468},t.uEmissionTexAtlasTilingAndOffset=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting._getEmissionTexAtlasTilingAndOffset():_0x4c4468},t.uHypsometricTexture=function(){return e._hypsometricTexture},t.uHypsometricRenderTexture=function(){return e._hypsometricRenderTexture},t.uHypOpacity=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.Opacity:1},t.uHypContourInterval=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.LineInterval:100};var i=new e$29;t.uHypLineColor=function(){return e$2b(e._hypsometricSetting)?(i.x=e._hypsometricSetting.LineColor.red,i.y=e._hypsometricSetting.LineColor.green,i.z=e._hypsometricSetting.LineColor.blue,i.w=e._hypsometricSetting.LineColor.alpha,i):e$29.ZERO},t.uHypContourFillMode=function(){var t=1;if(e$2b(e._hypsometricSetting))switch(e._hypsometricSetting.DisplayMode){case k$Q.DisplayMode.NONE:t=0;break;case k$Q.DisplayMode.FACE:t=1;break;case k$Q.DisplayMode.LINE:t=2;break;case k$Q.DisplayMode.FACE_AND_LINE:t=3}return t},t.uHypFloor=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMinKey:0},t.uHypCeil=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMaxKey:0},t.uHypMaxVisibleValue=function(){return(e$2b(e._hypsometricSetting)?e._hypsometricSetting.MaxVisibleValue:0)+e$2a.EPSILON5},t.uHypMinVisibleValue=function(){return(e$2b(e._hypsometricSetting)?e._hypsometricSetting.MinVisibleValue:0)-e$2a.EPSILON5},t.uHypRect=function(){return e._hypsometricBound},t.uNoValueColor=function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.noValueColor:e$1U.WHITE},t.uHypsometricVisible=function(){return ro._isLeaf&&ro._isHypsometricVisible||e._hypsometricSetting._visibleDistanceMax===Number.MAX_VALUE&&0===e._hypsometricSetting._visibleDistanceMin&&e._hypsometricSetting._maxVisibleAltitude===Number.MAX_VALUE&&0===e._hypsometricSetting._minVisibleAltitude?1:0}}if(e._hasOverlay&&(t.uOverlayRect=function(){return e._overlayBounds},t.uOverlayTexture=function(){return e._overlayTexture}),e.hasWVisible&&(t.uMaxCategory=function(){return e._hypMaxCategory},t.uMinCategory=function(){return e._hypMinCategory},t.uCategoryWidht=function(){return e._categorieTexture&&e._categorieTexture.width||256},t.uCategoryHeight=function(){return e._categorieTexture&&e._categorieTexture.height||1},t.uCategorieTexture=function(){return e._categorieTexture}),e.hasSketch&&(t.uLineColor=function(){return e.style3D.lineColor},t.uLineWidth=function(){return e.style3D.lineWidth},t.uFillStyle=function(){return e.style3D.fillStyle},t.uNormalDepthTexture=function(){return e._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0)}),e.hasAdjustColor&&(t.uBrightness=function(){return e._brightness},t.uContrast=function(){return e._contrast},t.uHue=function(){return e._hue},t.uSaturation=function(){return e._saturation},t.uOneOverGamma=function(){return 1/e._gamma}),e.hasTransparentBackColor&&(t.uTransparentBackColor=function(){return e._transparentBackColor},t.uTransparentBackColorTolerance=function(){return e._transparentBackColorTolerance}),e.hasExcavation&&(t.uExcavationTexture=function(){return e._excavationTexture},t.uExcavationMode=function(){return e._excavationMode},t.uExcavationRect=function(){return e._excavationBounds},t.uServerExcavationMode=function(){return e._serverExcavationMode},t.uServerExcavationRect=function(){return e._serverExcavationBounds},t.uServerExcavationTexture=function(){return e._excavationTexture}),e.hasClip&&(t.clip_mode=function(){return e._clipMode},t.clip_planes=function(){return e._clipPlane},t.clip_line_color=function(){return e._clipLineColor}),e.hasSplit){t.uSplitDirection=function(){return e.splitDirection},t.uSplitPosition=function(){return e.splitPosition};var n=new e$29;t.uSwipeRegion=function(){return n.x=e._swipeRegion.x*e._frameState.context.drawingBufferWidth,n.y=(1-e._swipeRegion.y)*e._frameState.context.drawingBufferHeight,n.z=e._swipeRegion.z*e._frameState.context.drawingBufferWidth,n.w=(1-e._swipeRegion.w)*e._frameState.context.drawingBufferHeight,n}}if(e.hasPolylineEffect&&isPolylineEffect&&(t.uEffectLineWidth=function(){return e$2b(e._effect)?e._effect._lineWidth:e.style3D.lineWidth},t.uColor=function(){return e$2b(e._effect)?e._effect._color:e.style3D.lineColor},t.uType=function(){return e$2b(e._effect)?e._effect._type:0},t.uOutlineColor=function(){return e$2b(e._effect)?e._effect._outlineColor:e.style3D.lineColor},t.uOutlineWidth=function(){return e$2b(e._effect)?e._effect._outlineWidth:0},t.uGapColor=function(){return e$2b(e._effect)?e._effect._gapColor:e.style3D.lineColor},t.uDashLength=function(){return e$2b(e._effect)?e._effect._dashLength:0},t.uDashPattern=function(){if(e$2b(e._effect)){if(e._effect._isMove){e._effect._frame>159&&(e._effect._frame=0);var t=Math.floor(e._effect._frame/10),i=e._effect._dashPattern<<t,n=e._effect._dashPattern>>16-t;return e._effect._frame++,i+n}return e._effect._dashPattern}return 0},t.uGlowPower=function(){return e$2b(e._effect)?e._effect._glowPower:0},t.uIsArrow=function(){return!!e$2b(e._effect)&&e._effect._isArrow}),e.hasRegionEffect&&isRegionEffect&&(t.uRotationAngle=function(){return e._effect._rotationAngle},t.uType=function(){return e._effect._type},t.uForeColor=function(){return e._effect._foreColor},t.uBackColor=function(){return e._effect._backColor},t.uLineWidthX=function(){return e._effect._lineWidthX},t.uLineWidthY=function(){return e._effect._lineWidthY},t.uRepeatX=function(){return e._effect._repeatX},t.uRepeatY=function(){return e._effect._repeatY},t.uOffsetX=function(){return e._effect._offsetX},t.uOffsetY=function(){return e._effect._offsetY}),e.hasFusion){var r={x:0,y:0};t.uPanOffset=function(){return e$2b(e._context.curFusionViewMatrix)?(e$2b(e.panOffset)&&(r.x=e.panOffset.x/e._context.drawingBufferWidth,r.y=e.panOffset.y/e._context.drawingBufferHeight),r):(r.x=0,r.y=0,r)},t.uModelView=function(){return e$2b(e._context.curFusionViewMatrix)?p$1d.multiply(e._context.curFusionViewMatrix,ro._matModel,_0xe3202d):p$1d.multiply(e._context.uniformState.view3D,ro._matModel,_0xe3202d)}}e.hasHorizontalLine&&(t.uHorizontalLine=function(){return e$2b(e._fHorizontalLine)?e._fHorizontalLine:0},t.uHorizontalColor=function(){return e$2b(e$2b(e._HorizontalColor))?e._HorizontalColor:new e$29(1,1,0,0)}),e.hasFlood&&(t.uFloodFlagTexture=function(){if(e$2b(e._floodFlagTexture))return e._floodFlagTexture},t.uFloodRect=function(){if(e$2b(e._floodRect))return e._floodRect},t.uFloodMatrixInvert=function(){var t=new p$1d;return p$1d.multiply(e._matFloodInvertMatrix,ro._matModel,t),t})},_0x23730d.createMaterialUniform=function(e,t,i,n){const r=t._flag,o=1&r,a=r>>1&1,s=r>>2&1;if(n.uDiffuseColor=function(){return i._diffuseColor},n.uAmbientColor=function(){return i._ambientColor},a){n.uTexture=function(){var n;return e$2b(t._symbolTextureUrl)?e$2b(n=_0x4dad4e.getTexture(t._symbolTextureUrl))?n:e._context.defaultTexture:e$2b(i._textures[0])?(n=i._textures[0]).isTexBlock?n.renderable&&n.ready?n:e$2b(i._ancestorTexture)?i._ancestorTexture:n:n:e._context.defaultTexture},n.uTexMatrix=function(){return i._texMatrix},n.uTexture0Width=function(){return e$2b(i._textures[0])?i._textures[0]._width:1},n.uTexture1Width=function(){return e$2b(i._textures[1])?i._textures[1]._width:1};var l=new e$29;n.uTexUVOffset=function(){l.x=0,l.y=0,l.z=1,l.w=1;var t=i._baseColorTextureMotion;if(e$2b(t)){var n=t.OffsetPeriod,r=t.OffsetSpeedU,o=t.OffsetSpeedV,a=t.TilingPeriod,s=t.TilingSpeedU,u=t.TilingSpeedV,c=performance.now()/1e3;if(n>0){var h=c%n;l.x=h*r,l.y=h*o}if(a>0){var d=c%a;l.z=1+d*s,l.w=1+d*u}}else if(0!==e._textureUVSpeed.x||0!==e._textureUVSpeed.y){var f=performance.now()/1e3;l.x=e._textureUVSpeed.x*f,l.y=e._textureUVSpeed.y*f}return l}}if(s&&(n.uSecTexture=function(){var t=i._textures[1];return t.isTexBlock?t.renderable&&t.ready?t:e$2b(i._ancestorTextureBake)?i._ancestorTextureBake:e._context.defaultTexture:t}),o){n.uBaseColorTextureIndex=function(){return i._baseColorTextureIndex>-1?i._baseColorTextureIndex:e._PBRMaterialParams.pbrMetallicRoughness.baseColorTextureIndex},n.uBaseColorFactor=function(){return i._baseColor||e._PBRMaterialParams.pbrMetallicRoughness.baseColor},n.uMetallicFactor=function(){return i._metallicFactor||e._PBRMaterialParams.pbrMetallicRoughness.metallicFactor},n.uRoughnessFactor=function(){return u$_(i._roughnessFactor,e._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor)},n.uEmissiveFactor=function(){return i._emissiveFactor||e._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},n.uEmissionTexture=function(){if(e$2b(i.emissiveTexture))return i.emissiveTexture;var t=i._emissiveTextureIndex;return t>-1&&e$2b(i._textures[t])?i._textures[t]:e._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},n.uMetallicRoughnessTexture=function(){return e$2b(i._metallicRoughnessTextureIndex)&&i._metallicRoughnessTextureIndex>-1?e$2b(i.metallicRoughnessTexture)?i.metallicRoughnessTexture:i._textures[i._metallicRoughnessTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},n.uNormalTexture=function(){return e$2b(i._normalTextureIndex)&&i._normalTextureIndex>-1?i.normalTexture?i.normalTexture:i._textures[i._normalTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.normalTexture},n.uNormalTextureScale=function(){return e$2b(i._normalTextureScale)?i._normalTextureScale:e._PBRMaterialParams.pbrMetallicRoughness.normalTextureScale},n.uOcclusionTexture=function(){return e$2b(i._occlusionTextureIndex)&&i._occlusionTextureIndex>-1?i.occlusionTexture?i.occlusionTexture:e$2b(i._textures[i._occlusionTextureIndex])?i._textures[i._occlusionTextureIndex]:e._context.defaultTexture:e._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},n.uIndexOfRefraction=function(){return e$2b(i._indexOfRefraction)&&i._indexOfRefraction>0?i._indexOfRefraction:e._PBRMaterialParams.pbrMetallicRoughness.indexOfRefraction},n.uTransmissionFactor=function(){return e$2b(i._transmissionFactor)&&i._transmissionFactor>0?i._transmissionFactor:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.volume)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.volume.transmissionFactor)?e._PBRMaterialParams.pbrMetallicRoughness.volume.transmissionFactor:1},n.uThickness=function(){return e$2b(i._volume)?i._volume._thickness:e._PBRMaterialParams.pbrMetallicRoughness.volume.thickness},n.uSnowCoverageFactor=function(){return e$2b(i.snowEffect)&&i.snowEffect._snow_coverage>0?i.snowEffect._snow_coverage:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.snowEffect)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage)&&e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage>0?e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage:.5},n.uSnowMaskTexture=function(){return e$2b(i.snowEffect)&&e$2b(i.snowEffect._snowMaskTexture)?i.snowEffect._snowMaskTexture:e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture},n.uSnowNormalTexture=function(){return e$2b(i.snowEffect)&&e$2b(i.snowEffect._snowNormalTexture)?i.snowEffect._snowNormalTexture:e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture},n.uIntensityScale=function(){return e$2b(i._intensityScale)&&i.rainEffect._intensityScale>0?i._intensityScale:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&e._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0?e._PBRMaterialParams.pbrMetallicRoughness.intensityScale:1},n.uAnimationSpeed=function(){return e$2b(i.rainEffect)&&e$2b(i.rainEffect._animationSpeed)?i.rainEffect._animationSpeed:e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.animationSpeed},n.uRippleTexture=function(){return e$2b(i.rainEffect)&&e$2b(i.rainEffect._rippleTexture)?i.rainEffect._rippleTexture:e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture},n.uWetnessFactor=function(){return e$2b(i.rainEffect)&&i.rainEffect._wetnessFactor>0?i.rainEffect._wetnessFactor:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor:0},n.uRippleScale=function(){return e$2b(i.rainEffect)&&i.rainEffect._ripple_scale>0?i.rainEffect._ripple_scale:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale:5},n.uWindIntensity=function(){return e$2b(i.rainEffect)&&i.rainEffect._wind_intensity>0?i.rainEffect._wind_intensity:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity:0},n.uRain=function(){return e$2b(i.rainEffect)&&i.rainEffect._rain>0?i.rainEffect._rain:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain:200},n.uCameraDepth=function(){return e$2b(i.rainEffect)&&i.rainEffect._cameraDepth>0?i.rainEffect._cameraDepth:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2b(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth:.8},n.uTintColor=function(){return e$2b(i._volume)?i._volume._tintColor:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.volume)?e._PBRMaterialParams.pbrMetallicRoughness.volume.tintColor:e$1U.WHITE},n.uDiffusionDistance=function(){return e$2b(i._volume)?i._volume._diffusionDistance:e$2b(e._PBRMaterialParams.pbrMetallicRoughness.volume)?e._PBRMaterialParams.pbrMetallicRoughness.volume.diffusionDistance:e$1U.WHITE},n.uClearcoatFactor=function(){return e$2b(i._clearcoat)?i._clearcoat._clearcoatFactor:e._PBRMaterialParams.pbrMetallicRoughness.clearcoat.clearcoatFactor},n.uClearcoatRoughnessFactor=function(){return e$2b(i._clearcoat)?i._clearcoat._clearcoatRoughnessFactor:e._PBRMaterialParams.pbrMetallicRoughness.clearcoat.clearcoatRoughnessFactor},n.uAnisotropy=function(){return e$2b(i._anisotropy)?i._anisotropy:e._PBRMaterialParams.pbrMetallicRoughness.anisotropy},n.uBaseTexture=function(){return e$2b(i._baseColorTextureIndex)&&i._baseColorTextureIndex>-1?i.baseColorTexture:e._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture};var u=i._emissiveTextureMotion||e._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion,c=new e$29;if(n.uEmissiveUVOffsetAndTiling=function(){var e=performance.now()/1e3,t=u.OffsetPeriod,i=u.OffsetSpeedU,n=u.OffsetSpeedV,r=u.TilingPeriod,o=u.TilingSpeedU,a=u.TilingSpeedV;if(u&&t>0){var s=e%t;c.x=s*i,c.y=s*n}else c.x=0,c.y=0;if(u&&r>0){var l=e%u._tilingPeriod;c.z=1+l*o,c.w=1+l*a}else c.z=1,c.w=1;return c},i._usePBRTextureBatch){var h=new o$1o;n.uPBRTexture=function(){return i.pbrParamTexture},n.uPBRTexWH=function(){var e=i.pbrParamTexture;return h.x=e._width,h.y=e._height,h}}n.uAlphaCutoff=function(){return i._alphaCutoff}}return n},_0x23730d.createMeshUniform=function(e,t){e$2b(e._batchTable);return t.uModelMatrix=function(){return e._relativeModelMatrix},t.uGeoMatrix=function(){return e._geoMatrix},t};var _0xe3202d=new p$1d;_0x23730d.create=function(e,t,i,n){var r=t._fileType;r===d$15.PolylineEffect||r===d$15.ClampGroundRealtimeRasterCache&&e$2b(i._attributeLocations.aTexCoord1),d$15.RegionEffect,r===d$15.ClampGroundRealtimeRasterCache&&e$2b(i._attributeLocations.aTexCoord1),d$15.PointCloudFile;var o=i._material;if(n.uTexture=function(){var e;return e$2b(i._symbolTextureUrl)?e$2b(e=_0x4dad4e.getTexture(i._symbolTextureUrl))?e:t._context.defaultTexture:e$2b(o._textures[0])?(e=o._textures[0]).isTexBlock?e.renderable&&e.ready?e:e$2b(o._ancestorTexture)?o._ancestorTexture:e:e:t._context.defaultTexture},n.uSecTexture=function(){var e=o._textures[1];return e.isTexBlock?e.renderable&&e.ready?e:e$2b(o._ancestorTextureBake)?o._ancestorTextureBake:t._context.defaultTexture:e},t._bUseHypColorTable&&(n.uHypsometricTexture=function(){return t._hypsometricTexture},n.uHypsometricRenderTexture=function(){return t._hypsometricRenderTexture}),t._flattening&&(n.uFlattenTexture=function(){return e.multiViewportIndex>-1?1<<e.multiViewportIndex&t._flattenVisibleViewport?t._flattenTexture:t._context.defaultTexture:t._flattenTexture}),t._hasExcavation&&(n.uExcavationTexture=function(){return t._excavationTexture}),t._hasServerExcavation&&(n.uServerExcavationTexture=function(){return t._excavationTexture}),e$2b(t._categorieTexture)&&(n.uCategorieTexture=function(){return t._categorieTexture}),(o._usePBR||t._usePBR)&&(n.uBaseTexture=function(){return e$2b(o._baseColorTextureIndex)&&o._baseColorTextureIndex>-1?o.baseColorTexture:t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture},n.uNormalTexture=function(){return e$2b(o._normalTextureIndex)&&o._normalTextureIndex>-1?o.normalTexture?o.normalTexture:o._textures[o._normalTextureIndex]:t._PBRMaterialParams.pbrMetallicRoughness.normalTexture},n.uEmissionTexture=function(){if(e$2b(o.emissiveTexture))return o.emissiveTexture;var e=o._emissiveTextureIndex;return e>-1&&e$2b(o._textures[e])?o._textures[e]:t._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},n.uMetallicRoughnessTexture=function(){return e$2b(o._metallicRoughnessTextureIndex)&&o._metallicRoughnessTextureIndex>-1?e$2b(o.metallicRoughnessTexture)?o.metallicRoughnessTexture:o._textures[o._metallicRoughnessTextureIndex]:t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},n.uOcclusionTexture=function(){return e$2b(o._occlusionTextureIndex)&&o._occlusionTextureIndex>-1?o.occlusionTexture?o.occlusionTexture:e$2b(o._textures[o._occlusionTextureIndex])?o._textures[o._occlusionTextureIndex]:t._context.defaultTexture:t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},o._usePBRTextureBatch&&(n.uPBRTexture=function(){return o.pbrParamTexture})),(e$2b(i._volTexture)||e$2b(i._volObj))&&(n.uVolumeTexture=function(){return"png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt?i._volTexture:i._volObj.volTexture}),e$2b(t._imageryLayer)&&e$2b(i._attributeLocations.img)&&(n.uImgTexture=function(){return e$2b(i._rasterImageTexture)?i._rasterImageTexture:t._context.defaultTransparentTexture}),e$2b(t.waterEffectSet)||t.multiTemporalUseWater){var a=t._frameState._framebufferList.water;n.uReflectMap=function(){return a.renderTexture._fb.getColorTexture(0)},n.uNoiseMap=function(){return a._waterNormalMap}}t._hasOverlay&&(n.uOverlayTexture=function(){return t._overlayTexture}),t._hasEmissiveTexAtlas&&(n.uEmissionTexAtlas=function(){return e$2b(t._hypsometricSetting._emissionTextureAtlas)?t._hypsometricSetting._emissionTextureAtlas.texture:t._context.defaultTexture}),t._hasSnowEffect&&(n.uSnowMaskTexture=function(){return t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture},n.uSnowNormalTexture=function(){return t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture}),t._hasRainEffect&&(n.uRippleTexture=function(){return t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture}),e$2b(i._batchTable)&&(n=i._batchTable.getUniformMapCallback()(n)),e$2b(o._batchTable)&&(o._batchTable.update(e),n=o._batchTable.getUniformMapCallback()(n)),e$2b(o._batchTableBake)&&(o._batchTableBake.update(e),n=o._batchTableBake.getUniformMapCallback()(n)),e$2b(i._dayTextures)&&i._dayTextures.length>0&&(n.uMapTexture=function(){if(e$2b(o._textures[0])){var e=o._textures[0],i=o._mapTextures[e.id];return e$2b(i)?i:e}return t._context.defaultTexture},n.uImgTexture=function(){return e$2b(i._rasterImageTexture)?i._rasterImageTexture:t._context.defaultTransparentTexture},n.uImgTextureAlpha=function(){return e$2b(t._imageryLayer)?t._imageryLayer instanceof Array?t._imageryLayer[t._imageryLayer.length-1].alpha:t._imageryLayer.show&&i._showImagerysImmediate?t._imageryLayer.alpha:0:1},n.uImgTextureBound=function(){return i._imageryTextureBound},n.u_dayTextures=function(){return i._dayTextures},n.u_dayTextureUseWebMercatorT=function(){return i._dayTextureUseWebMercatorT},n.u_dayTextureTexCoordsRectangle=function(){return i._dayTextureTexCoordsRectangle},n.u_dayTextureTranslationAndScale=function(){return i._dayTextureTranslationAndScale},n.u_transparentBackColor=function(){return i._transparentBackColor},n.u_imageryClipEnable=function(){return i._imageryClipEnable},n.u_dayTextureFlipY=function(){return i._dayTextureFlipY},n.u_dayTextureAlpha=function(){return i._dayTextureAlpha},n.u_dayTextureSize=function(){return i._dayTextureTranslationAndScale}),i._uniformMap=n};var _0x585a6f=(_0x8d93fe=!0,function(e,t){var i=_0x8d93fe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8d93fe=!1,i}),_0x916048=_0x585a6f(void 0,(function(){return _0x916048.toString().search("(((.+)+)+)+$").toString().constructor(_0x916048).search("(((.+)+)+)+$")})),_0x8d93fe;_0x916048();var _0x527139="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MeshUboDecl>\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\n#ifdef DepthEXT\nvarying float vWindowZ;\n#endif\n#include <clip>\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n #ifdef DepthEXT\n\t gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n #endif\n#endif\n#ifdef WEBGL2\n #ifdef DepthEXT\n\t gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n #endif\n#endif\n\tif(vColor.a < uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIP\n gl_FragColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n gl_FragColor = vSecondColor;\n}\n",_0x233fd6=(_0x2d3e83=!0,function(e,t){var i=_0x2d3e83?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d3e83=!1,i}),_0x1e9c25=_0x233fd6(void 0,(function(){return _0x1e9c25.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e9c25).search("(((.+)+)+)+$")})),_0x2d3e83;_0x1e9c25();var _0x25cbb0="\n#include <LayerUboDecl>\nvarying vec4 vSecondColor; \nvarying vec4 vColor;\nvoid main() \n{\n\tif(vColor.a < uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n gl_FragColor = vSecondColor; \n}",_0x537099=(_0x5eca15=!0,function(e,t){var i=_0x5eca15?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5eca15=!1,i}),_0x598ed1=_0x537099(void 0,(function(){return _0x598ed1.toString().search("(((.+)+)+)+$").toString().constructor(_0x598ed1).search("(((.+)+)+)+$")})),_0x5eca15;_0x598ed1();var _0xaee82b="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\nvarying vSecondColor : vec4<f32>; \nvarying vColor : vec4<f32>;\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n\tif(vColor.a < Layer.uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n gl_FragColor = vSecondColor; \n}",_0x602940=(_0x1afd89=!0,function(e,t){var i=_0x1afd89?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1afd89=!1,i}),_0x531cad=_0x602940(void 0,(function(){return _0x531cad.toString().search("(((.+)+)+)+$").toString().constructor(_0x531cad).search("(((.+)+)+)+$")})),_0x1afd89;_0x531cad();var _0x5a4442="\nprecision highp float;\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MeshUboDecl>\n#include <vertexLogDepthDecl>\n// Inputs\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\nattribute float batchId;\n// attribute float aVariantOffset;\nattribute float aVariantStroke;\nattribute float aVariantExtension;\n\n#ifdef SILHOUETTE\nattribute vec3 aNormalA;\nattribute vec3 aNormalB;\n#else /* SILHOUETTE */\nattribute vec3 aNormal;\n#endif /* SILHOUETTE */\n\nattribute vec2 aSideness;\n//attribute vec2 aPackedAttributes;\n\nstruct UnpackedAttributes\n{\n vec2 sideness;\n vec2 sidenessNorm;\n float lineWidthPixels;\n float extensionLengthPixels;\n#if (MODE == 2)\n float edgeType;\n#endif\n};\n\n// Output required to compute color\nvarying vec4 vColor;\n// Output required to compute distance to line/caps\nvarying vec3 vPosition; \nvarying vec3 vViewPosition;\nvarying float vRadius;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\n\nvarying vec2 vStrokeUV;\n\nconst vec2 uDepthBias = vec2(0.5, -4e-4);\n\n// Utility function to check for NaN values\nbool isNaN(float val)\n{\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n // important: some nVidias failed to cope with version below.\n // Probably wrong optimization.\n /*return ( val <= 0.0 || 0.0 <= val ) ? false : true;*/\n}\n\nvec2 calculateProjectedBiasXY(vec4 projPos, vec3 worldNormal)\n{\n float offsetXY = uDepthBias.x;\n float offsetZ = uDepthBias.y;\n vec4 projNormal = czm_projection * czm_view * vec4(worldNormal, 0.0);\n return offsetXY * projPos.w * 2.0 / czm_viewport.zw * normalize(projNormal.xyz).xy;\n}\n\n// A z-offset, using a depth based heuristic.\nfloat calculateProjectedBiasZ(vec4 projPos)\n{\n float fProjZ = projPos.z / projPos.w;\n if(fProjZ < 0.1)\n {\n return 0.0;\n }\n float offsetZ = uDepthBias.y;\n return sqrt(projPos.z) * offsetZ;\n}\n\nvec4 adjustProjectedPosition(vec4 projPos, vec3 worldNormal, float lineWidth)\n{\n vec2 offsetXY = calculateProjectedBiasXY(projPos, worldNormal);\n // we currently have to do this check because some geometries come with 0 length edge normals.\n if (!isNaN(offsetXY.x) && !isNaN(offsetXY.y))\n {\n projPos.xy += offsetXY;\n }\n#ifdef LOG_DEPTH\n vDistanceFromEye = projPos.w;\n#else\n projPos.z += calculateProjectedBiasZ(projPos);\n#endif\n return projPos;\n}\n\n#if (MODE == 0)\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{}\n#elif (MODE == 1)\nfloat strokeVariants = 6.0;\nvoid calculateStyleOutputsSketch(float lineLength, UnpackedAttributes unpackedAttributes) {\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n float lineIndex = clamp(ceil(log2(lineLength)), 0.0, uStrokesLog2Resolution);\n vStrokeUV = vec2(exp2(lineIndex) * sidenessNorm.y, lineIndex * strokeVariants + aVariantStroke + 0.5) * uStrokesTextureScale;\n}\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{\n calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);\n}\n#elif (MODE == 2)\nvarying float vType;\nvoid calculateStyleOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec4 projPos, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vType = unpackedAttributes.edgeType;\n if (unpackedAttributes.edgeType <= 0.0)\n {\n calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);\n }\n}\n#endif\n\n\n// Solid\n#if (MODE == 2 || MODE == 0)\nfloat calculateLineAmplitudeSolid()\n{\n return 0.0;\n}\n#endif\n#if (MODE == 0)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSolid();\n}\n#endif\n// Sketch\n#if (MODE == 2 || MODE == 1)\nfloat calculateLineAmplitudeSketch()\n{\n float strokesAmplitude = 6.0;\n return strokesAmplitude;\n}\n#endif\n#if (MODE == 1)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSketch();\n}\n#endif\n// Uber\n#if (MODE == 2)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n float edgeType = unpackedAttributes.edgeType;\n if (edgeType <= 0.0)\n {\n return calculateLineAmplitudeSketch();\n }\n else\n {\n return calculateLineAmplitudeSolid();\n }\n}\n#endif\n\n\nfloat distanceBasedPerspectiveFactor(float distance)\n{\n return clamp(sqrt(uDistanceFalloffFactor / distance), 0.0, 1.0);\n}\n\n#define COMPONENT_COLOR_FIELD_OFFSET 0.0\n#define COMPONENT_OTHER_FIELDS_OFFSET 1.0\n#define COMPONENT_FIELD_COUNT 2.0\n#define LINE_WIDTH_FRACTION_FACTOR 8.0\n#define EXTENSION_LENGTH_OFFSET 128.0\n#define COMPONENT_TEX_WIDTH 4096.0\n\nstruct ComponentData\n{\n float lineWidth;\n float extensionLength;\n float edgeType;\n};\n\n\nComponentData readComponentData()\n{\n return ComponentData(uLineWidth, 0.0, 0.0);\n}\n\nvec3 modelToWorldNormal(vec3 normal)\n{\n return (czm_model * vec4(normal, 0.0)).xyz;\n}\n\nvec3 silhouetteWorldNormal(vec3 normalA, vec3 normalB)\n{\n return modelToWorldNormal(normalize(normalA + normalB));\n}\n\n// Fall-off extension length for shorter strokes, starting from strokes that are 256 size,\n// fall-off exponentially\nfloat calculateExtensionLength(float extensionLength, float lineLength)\n{\n return extensionLength / (log2(max(1.0, 256.0 / lineLength)) * 0.2 + 1.0);\n}\n\n#ifdef SILHOUETTE\n// #uniforms: czm_view, czm_model\nbool isSilhouetteEdge(vec4 viewPos, vec3 normalA, vec3 normalB)\n{\n// transform the two face normals\n vec3 viewNormalA = (czm_modelView * vec4(normalA, 0.0)).xyz;\n vec3 viewNormalB = (czm_modelView * vec4(normalB, 0.0)).xyz;\n// compute the direction from the edge to the camera\n vec3 viewDir = -viewPos.xyz;\n// check which of the two faces are visible\n// display the edge if exactly one of the two is visible\n float faceAVisible = dot(viewDir, viewNormalA);\n// positive if visible\n float faceBVisible = dot(viewDir, viewNormalB);\n// positive if visible\n// 1 if exactly one face visible, 0 otherwise\n return faceAVisible * faceBVisible < 0.0;\n}\n#endif /* SILHOUETTE */\n\nvoid clipLineSegmentToNearPlane(vec3 p0,vec3 p1,out bool clipped,out bool culledByNearPlane,out vec4 clippedPositionEC)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = czm_currentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -czm_currentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n}\n\nvec4 calculateGeometricOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vec2 sideness = unpackedAttributes.sideness;\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n vec4 clippedViewPosV0; bool clippedV0,culledV0; clipLineSegmentToNearPlane(viewPosV0.xyz, viewPosV1.xyz, clippedV0, culledV0, clippedViewPosV0); vec4 clippedViewPosV1; bool clippedV1, culledV1; clipLineSegmentToNearPlane(viewPosV1.xyz, viewPosV0.xyz, clippedV1, culledV1, clippedViewPosV1); vec4 viewPos = mix(clippedViewPosV0, clippedViewPosV1, sidenessNorm.y);\n vViewPosition = viewPos.xyz / viewPos.w;\n vec4 projPosV0 = czm_projection * clippedViewPosV0;\n vec4 projPosV1 = czm_projection * clippedViewPosV1;\n vec4 projPos = czm_projection * viewPos;\n vec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\n vec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\n vec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\n float lineLengthPixels = length(screenSpaceLinePixels);\n float dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\n vec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\n vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\n float falloffFactor = distanceBasedPerspectiveFactor(-viewPos.z) * uPixelRatio;\n float lineWidthPixels = unpackedAttributes.lineWidthPixels * falloffFactor;\n float extensionLengthPixels = calculateExtensionLength(unpackedAttributes.extensionLengthPixels, lineLengthPixels) * falloffFactor;\n float lineAmplitudePixels = calculateLineAmplitude(unpackedAttributes) * uPixelRatio;\n vSizeFalloffFactor = falloffFactor;\n float lineWidthAndAmplitudePixels = lineWidthPixels + lineAmplitudePixels + lineAmplitudePixels;\n float extendedLineLengthPixels = lineLengthPixels + extensionLengthPixels + extensionLengthPixels;\n#ifdef ANTIALIASING\n const float aaPaddingPixels = 1.0;\n // Line size with padding\n float halfAAPaddedLineWidthAndAmplitudePixels = lineWidthAndAmplitudePixels * 0.5 + aaPaddingPixels;\n float aaPaddedRoundedCapSizePixels = lineWidthPixels * 0.5 + aaPaddingPixels;\n // Line length with padding\n float aaPaddedLineLengthPixels = extendedLineLengthPixels + aaPaddingPixels + aaPaddingPixels;\n float halfAAPaddedLineLengthPixels = aaPaddedLineLengthPixels * 0.5;\n#else /* ANTIALIASING */\n // Even if there is no AA, we still want to do proper <1px rendering,\n // so we effectively clamp the pixel sizes to minimum of 1px and compute\n // coverage in the fragment shader \n float halfAAPaddedLineWidthAndAmplitudePixels = max(lineWidthAndAmplitudePixels, 1.0) * 0.5;\n float aaPaddedRoundedCapSizePixels = max(lineWidthPixels, 1.0) * 0.5;\n float halfAAPaddedLineLengthPixels = max(extendedLineLengthPixels, 1.0) * 0.5;\n#endif /* ANTIALIASING */\n // Half line width in NDC including padding for anti aliasing\n vec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\n vec2 halfAAPaddedLineWidthAndAmplitudeNDC = halfAAPaddedLineWidthAndAmplitudePixels * uPixelToNDC;\n vec2 aaPaddedRoundedCapSizeNDC = aaPaddedRoundedCapSizePixels * uPixelToNDC;\n vec2 extensionLengthNDC = extensionLengthPixels * uPixelToNDC;\n // Compute screen space position of vertex, offsetting for line size and end caps\n vec2 ndcOffset = (screenSpaceDirection * sideness.y * (aaPaddedRoundedCapSizeNDC + extensionLengthNDC) + perpendicularScreenSpaceDirection * halfAAPaddedLineWidthAndAmplitudeNDC);\n projPos.xy += ndcOffset * projPos.w;\n projPos.z += (dzPerPixel * (aaPaddedRoundedCapSizePixels + extensionLengthPixels)) * sideness.y * projPos.w;\n projPos = adjustProjectedPosition(projPos, worldNormal, 1.0 + max((lineWidthAndAmplitudePixels - 1.0) * 0.5, 0.0));\n // Line length with end caps\n float aaPaddedLineWithCapsLengthPixels = extendedLineLengthPixels + aaPaddedRoundedCapSizePixels + aaPaddedRoundedCapSizePixels;\n float pixelPositionAlongLine = aaPaddedLineWithCapsLengthPixels * sidenessNorm.y - aaPaddedRoundedCapSizePixels;\n // Position in pixels with origin at first vertex of line segment\n // The line width radius in pixels\n vRadius = lineWidthPixels * 0.5;\n vLineLengthPixels = extendedLineLengthPixels;\n vPosition = czm_writeNonPerspective(vec3(halfAAPaddedLineWidthAndAmplitudePixels * sideness.x, pixelPositionAlongLine, pixelPositionAlongLine / extendedLineLengthPixels), projPos.w);\n#ifdef SILHOUETTE\n gl_Position = isSilhouetteEdge(viewPosV0, aNormalA, aNormalB) ? projPos : vec4(10.0, 10.0, 10.0, 1.0);\n#else /* SILHOUETTE */\n gl_Position = projPos;\n#endif /* SILHOUETTE */\n\n#if (MODE == 2)\n if (unpackedAttributes.edgeType <= 0.0 && lineLengthPixels <= 3.0)\n {\n gl_Position = vec4(10.0, 10.0, 10.0, 1.0);\n }\n#elif (MODE == 1)\n if (lineLengthPixels <= 3.0)\n {\n gl_Position = vec4(10.0, 10.0, 10.0, 1.0); \n }\n#endif\n return projPos;\n}\n\n\n#if (MODE == 2)\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float fType = component.edgeType;\n float extensionLengthPixels = component.extensionLength;\n float lineWidth = component.lineWidth;\n if (fType <= 0.0)\n {\n extensionLengthPixels *= aVariantExtension * 2.0 - 1.0;\n }\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels, fType);\n}\n#else /* (MODE == 2) */\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float extensionLengthPixels = component.extensionLength;\n#if (MODE == 1)\n // extensionLengthPixels = 0.05 * aVariantExtension * 2.0 - 1.0;\n extensionLengthPixels = 5.0;\n#endif\n float lineWidth = component.lineWidth;\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels);\n}\n#endif /* (MODE == 2) */\n\nvarying vec2 fSelected;\n#ifdef BatchTable\nuniform sampler2D batchTexture; \nvec2 computeSt(float batchId)\n{\n float stepX = batchTextureStep.x;\n float centerX = batchTextureStep.y;\n float numberOfAttributes = float(5);\n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);\n}\nvec4 czm_batchTable_operation(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(1);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n return value;\n}\nvec3 czm_batchTable_translate(float batchId) \n{\n vec2 st = computeSt(batchId); \n st.x += batchTextureStep.x * float(3); \n vec4 textureValue = texture2D(batchTexture, st); \n vec3 value = textureValue.xyz; \n return value; \n} \n#endif\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\nvoid s3mBatchOperation(vec4 operationType, inout vec4 vertexColor, inout vec4 vertexPos_0, inout vec4 vertexPos_1, vec3 translation, inout float fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n fSelected = 1.0;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected = 1.0;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos_0.xyz += translation;\n vertexPos_1.xyz += translation;\n }\n}\nvoid main()\n{\n fSelected = vec2(0.0);\n ComponentData component = readComponentData();\n UnpackedAttributes unpackedAttributes = unpackAttributes(component);\n vec4 vertexPos0 = vec4(aPosition0, 1.0);\n vec4 vertexPos1 = vec4(aPosition1, 1.0);\n vec3 translate = uTranslationAndBottom.xyz;\n#ifdef BatchTable\n #ifdef Translation\n translate = czm_batchTable_translate(batchId);\n #endif\n vColor = uLineColor;\n vec4 operationType = czm_batchTable_operation(batchId);\n s3mBatchOperation(operationType, vColor, vertexPos0, vertexPos1, translate, fSelected.x);\n#endif\n vec4 worldPosV0 = czm_model * vertexPos0;\n vec4 worldPosV1 = czm_model * vertexPos1;\n vec4 viewPosV0 = czm_modelView * vertexPos0;\n vec4 viewPosV1 = czm_modelView * vertexPos1;\n#ifdef SILHOUETTE\n vec3 worldNormal = silhouetteWorldNormal(aNormalA, aNormalB);\n#else /* SILHOUETTE */\n vec3 worldNormal = modelToWorldNormal(aNormal);\n#endif /* SILHOUETTE */\n // General geometric computation for all types of edges\n vec4 projPos = calculateGeometricOutputs(viewPosV0, viewPosV1, worldPosV0, worldPosV1, worldNormal, unpackedAttributes);\n calculateStyleOutputs(unpackedAttributes);\n#ifdef EXCAVATION\n vec3 vertexPos = mix(aPosition0.xyz, aPosition1.xyz, aSideness.y);\n vExcavationVertexPos = uGeoMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n vertexLogDepth();\n}\n",_0x2fe6d8=(_0x4c3a37=!0,function(e,t){var i=_0x4c3a37?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c3a37=!1,i}),_0x236e88=_0x2fe6d8(void 0,(function(){return _0x236e88.toString().search("(((.+)+)+)+$").toString().constructor(_0x236e88).search("(((.+)+)+)+$")})),_0x4c3a37;_0x236e88();var _0x171550="\nprecision highp float;\n\n#include <SceneUboDecl>\n#include <LayerUboDecl>\nvarying vec4 vColor;\nvarying float vRadius;\nvarying vec3 vPosition;\nvarying vec3 vViewPosition;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\nvarying vec2 vStrokeUV;\nuniform sampler2D uStrokesTexture;\nvarying vec2 fSelected;\n#include <calculatePolyTexCoord>\n#include <executeExcavation>\n#include <splitClip>\n#include <clip>\n#include <writeLogDepthDecl>\n\n// At which coverage threshold we discard a fragment completely\n#define COVERAGE_TEST_THRESHOLD 0.01\nconst float nearRange = 1000.0;\nconst float farRange = 20000.0;\n\n// Sketch\n#if (MODE == 1)\nconst vec4 RGBA_2_FLOAT_FACTORS = vec4(\n 255.0 / (256.0),\n 255.0 / (256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\n return dot(rgba, RGBA_2_FLOAT_FACTORS);\n}\nfloat calculateLineOffsetSketch()\n{\n float strokesNormalizationScale = 16.0;\n float offsetNorm = rgba2float(texture2D(uStrokesTexture, vStrokeUV));\n return (offsetNorm - 0.5) * strokesNormalizationScale;\n}\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSketch();\n}\nfloat calculateLinePressureSketch() {\n return rgba2float(texture2D(uStrokesTexture, vStrokeUV + vec2(0.0, 0.5)));\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSketch();\n}\n#endif\n\n// Solid\n#if (MODE == 2 || MODE == 0)\nfloat calculateLineOffsetSolid()\n{\n return 0.0;\n}\nfloat calculateLinePressureSolid()\n{\n return 1.0;\n}\n#endif\n\n#if (MODE == 0)\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSolid();\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSolid();\n}\n#endif\n\n// Uber\n#if (MODE == 2)\nvarying float vType;\nfloat calculateLineOffset()\n{\n if (vType <= 0.0)\n {\n return calculateLineOffsetSketch();\n }\n else\n {\n return calculateLineOffsetSolid();\n }\n}\n\nfloat calculateLinePressure()\n{\n if (vType <= 0.0)\n {\n return calculateLinePressureSketch();\n }\n else\n {\n return calculateLinePressureSolid();\n }\n}\n#endif\n\nvec2 lineWithCapsDistance(float radius, vec2 position, float lineLength)\n{\n float lineOffset = calculateLineOffset();\n float positionX = position.x - lineOffset;\n if (radius < 1.0)\n {\n float coverageX = clamp(min(radius, positionX + 0.5) - max(-radius, positionX - 0.5), 0.0, 1.0);\n float coverageY = clamp(min(lineLength, position.y + 0.5) - max(0.0, position.y - 0.5), 0.0, 1.0);\n float coverage = min(coverageX, coverageY);\n return vec2(0.5 - coverage, 0.0);\n }\n else\n {\n // Between -radius -> 0 for start cap, 0 for line, 0 -> radius\n float positionOnCap = position.y - clamp(position.y, 0.0, lineLength);\n vec2 lineToPosition = vec2(positionX, positionOnCap);\n return vec2(length(lineToPosition) - radius, positionOnCap / radius);\n }\n}\n\nvoid main()\n{\n#ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(executeExcavation())\n {\n discard;\n }\n#endif\n vec3 realPosition = czm_readNonPerspective(vPosition, 1.0 / vDistanceFromEye);\n float radius = vRadius * calculateLinePressure();\n vec2 distance = lineWithCapsDistance(radius, realPosition.xy, vLineLengthPixels);\n float coverage = clamp(0.5 - distance.x, 0.0, 1.0);\n#ifdef ANTIALIASING\n const float coverageLimit = COVERAGE_TEST_THRESHOLD;\n#else\n /* ANTIALIASING */\n // Use subpixel coverage computation when lines get subpixel widths\n // so we still render them appropriately. Otherwise discard anything\n // that is not fully within the line\n float coverageLimit = radius <= 0.5 ? COVERAGE_TEST_THRESHOLD : 0.75;\n#endif /* ANTIALIASING */\n if (coverage < coverageLimit || vColor.a < 0.1)\n {\n discard;\n }\n#ifdef WIREFRAME_SELECT_TYPE\n if(fSelected.x < 0.1)\n {\n discard;\n }\n#endif\n float alpha = vColor.a * coverage;\n gl_FragColor = vec4(vColor.rgb, alpha);\n#ifdef CLIP\n gl_FragColor *= clip(vec4(vViewPosition, 1.0), 1.0);\n#endif\n float attenuation = 1.0 - smoothstep(nearRange, farRange, vDistanceFromEye);\n gl_FragColor.a *= attenuation;\n#ifdef LOG_DEPTH\n writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",tmp$1={};tmp$1=function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,(function(e){var i=t[a][1][e];return r(i||e)}),c,c.exports,e,t,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])}}return e},i.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,i,n,r){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+n),r);else for(var o=0;o<n;o++)e[r+o]=t[i+o]},flattenChunks:function(e){var t,i,n,r,o,a;for(n=0,t=0,i=e.length;t<i;t++)n+=e[t].length;for(a=new Uint8Array(n),r=0,t=0,i=e.length;t<i;t++)o=e[t],a.set(o,r),r+=o.length;return a}},o={arraySet:function(e,t,i,n,r){for(var o=0;o<n;o++)e[r+o]=t[i+o]},flattenChunks:function(e){return[].concat.apply([],e)}};i.setTyped=function(e){e?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,r)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,o))},i.setTyped(n)},{}],2:[function(e,t,i){var n=e("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var i="",a=0;a<t;a++)i+=String.fromCharCode(e[a]);return i}a[254]=a[254]=1,i.string2buf=function(e){var t,i,r,o,a,s=e.length,l=0;for(o=0;o<s;o++)55296==(64512&(i=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(r-56320),o++),l+=i<128?1:i<2048?2:i<65536?3:4;for(t=new n.Buf8(l),a=0,o=0;a<l;o++)55296==(64512&(i=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(r-56320),o++),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t},i.buf2binstring=function(e){return l(e,e.length)},i.binstring2buf=function(e){for(var t=new n.Buf8(e.length),i=0,r=t.length;i<r;i++)t[i]=e.charCodeAt(i);return t},i.buf2string=function(e,t){var i,n,r,o,s=t||e.length,u=new Array(2*s);for(n=0,i=0;i<s;)if((r=e[i++])<128)u[n++]=r;else if((o=a[r])>4)u[n++]=65533,i+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&i<s;)r=r<<6|63&e[i++],o--;o>1?u[n++]=65533:r<65536?u[n++]=r:(r-=65536,u[n++]=55296|r>>10&1023,u[n++]=56320|1023&r)}return l(u,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+a[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){function n(e,t,i,n){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==i;){i-=a=i>2e3?2e3:i;do{o=o+(r=r+t[n++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}t.exports=n},{}],4:[function(e,t,i){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,i){function n(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}var r=n();function o(e,t,i,n){var o=r,a=n+i;e^=-1;for(var s=n;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}t.exports=o},{}],6:[function(e,t,i){function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=n},{}],7:[function(e,t,i){var n=30,r=12;t.exports=function(e,t){var i,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S,w,E,P;i=e.state,o=e.next_in,E=e.input,a=o+(e.avail_in-5),s=e.next_out,P=e.output,l=s-(t-e.avail_out),u=s+(e.avail_out-257),c=i.dmax,h=i.wsize,d=i.whave,f=i.wnext,p=i.window,_=i.hold,m=i.bits,g=i.lencode,x=i.distcode,v=(1<<i.lenbits)-1,y=(1<<i.distbits)-1;e:do{m<15&&(_+=E[o++]<<m,m+=8,_+=E[o++]<<m,m+=8),$=g[_&v];t:for(;;){if(_>>>=b=$>>>24,m-=b,0==(b=$>>>16&255))P[s++]=65535&$;else{if(!(16&b)){if(0==(64&b)){$=g[(65535&$)+(_&(1<<b)-1)];continue t}if(32&b){i.mode=r;break e}e.msg="invalid literal/length code",i.mode=n;break e}T=65535&$,(b&=15)&&(m<b&&(_+=E[o++]<<m,m+=8),T+=_&(1<<b)-1,_>>>=b,m-=b),m<15&&(_+=E[o++]<<m,m+=8,_+=E[o++]<<m,m+=8),$=x[_&y];i:for(;;){if(_>>>=b=$>>>24,m-=b,!(16&(b=$>>>16&255))){if(0==(64&b)){$=x[(65535&$)+(_&(1<<b)-1)];continue i}e.msg="invalid distance code",i.mode=n;break e}if(C=65535&$,m<(b&=15)&&(_+=E[o++]<<m,(m+=8)<b&&(_+=E[o++]<<m,m+=8)),(C+=_&(1<<b)-1)>c){e.msg="invalid distance too far back",i.mode=n;break e}if(_>>>=b,m-=b,C>(b=s-l)){if((b=C-b)>d&&i.sane){e.msg="invalid distance too far back",i.mode=n;break e}if(S=0,w=p,0===f){if(S+=h-b,b<T){T-=b;do{P[s++]=p[S++]}while(--b);S=s-C,w=P}}else if(f<b){if(S+=h+f-b,(b-=f)<T){T-=b;do{P[s++]=p[S++]}while(--b);if(S=0,f<T){T-=b=f;do{P[s++]=p[S++]}while(--b);S=s-C,w=P}}}else if(S+=f-b,b<T){T-=b;do{P[s++]=p[S++]}while(--b);S=s-C,w=P}for(;T>2;)P[s++]=w[S++],P[s++]=w[S++],P[s++]=w[S++],T-=3;T&&(P[s++]=w[S++],T>1&&(P[s++]=w[S++]))}else{S=s-C;do{P[s++]=P[S++],P[s++]=P[S++],P[s++]=P[S++],T-=3}while(T>2);T&&(P[s++]=P[S++],T>1&&(P[s++]=P[S++]))}break}}break}}while(o<a&&s<u);o-=T=m>>3,_&=(1<<(m-=T<<3))-1,e.next_in=o,e.next_out=s,e.avail_in=o<a?a-o+5:5-(o-a),e.avail_out=s<u?u-s+257:257-(s-u),i.hold=_,i.bits=m}},{}],8:[function(e,t,i){var n=e("../utils/common"),r=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees"),l=0,u=1,c=2,h=4,d=5,f=6,p=0,_=1,m=2,g=-2,x=-3,v=-4,y=-5,$=8,b=1,T=2,C=3,S=4,w=5,E=6,P=7,A=8,L=9,M=10,R=11,O=12,I=13,D=14,B=15,N=16,F=17,U=18,G=19,z=20,V=21,k=22,W=23,H=24,q=25,j=26,Y=27,X=28,K=29,Q=30,Z=31,J=852,ee=592,te=15;function ie(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ne(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function re(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=b,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(J),t.distcode=t.distdyn=new n.Buf32(ee),t.sane=1,t.back=-1,p):g}function oe(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,re(e)):g}function ae(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?g:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,oe(e))):g}function se(e,t){var i,n;return e?(n=new ne,e.state=n,n.window=null,(i=ae(e,t))!==p&&(e.state=null),i):g}function le(e){return se(e,te)}var ue,ce,he=!0;function de(e){if(he){var t;for(ue=new n.Buf32(512),ce=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(u,e.lens,0,288,ue,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(c,e.lens,0,32,ce,0,e.work,{bits:5}),he=!1}e.lencode=ue,e.lenbits=9,e.distcode=ce,e.distbits=5}function fe(e,t,i,r){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),r>=a.wsize?(n.arraySet(a.window,t,i-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),n.arraySet(a.window,t,i-r,o,a.wnext),(r-=o)?(n.arraySet(a.window,t,i-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}function pe(e,t){var i,J,ee,te,ne,re,oe,ae,se,le,ue,ce,he,pe,_e,me,ge,xe,ve,ye,$e,be,Te,Ce,Se=0,we=new n.Buf8(4),Ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return g;(i=e.state).mode===O&&(i.mode=I),ne=e.next_out,ee=e.output,oe=e.avail_out,te=e.next_in,J=e.input,re=e.avail_in,ae=i.hold,se=i.bits,le=re,ue=oe,be=p;e:for(;;)switch(i.mode){case b:if(0===i.wrap){i.mode=I;break}for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(2&i.wrap&&35615===ae){i.check=0,we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0),ae=0,se=0,i.mode=T;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",i.mode=Q;break}if((15&ae)!==$){e.msg="unknown compression method",i.mode=Q;break}if(se-=4,$e=8+(15&(ae>>>=4)),0===i.wbits)i.wbits=$e;else if($e>i.wbits){e.msg="invalid window size",i.mode=Q;break}i.dmax=1<<$e,e.adler=i.check=1,i.mode=512&ae?M:O,ae=0,se=0;break;case T:for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(i.flags=ae,(255&i.flags)!==$){e.msg="unknown compression method",i.mode=Q;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=Q;break}i.head&&(i.head.text=ae>>8&1),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0)),ae=0,se=0,i.mode=C;case C:for(;se<32;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.head&&(i.head.time=ae),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,we[2]=ae>>>16&255,we[3]=ae>>>24&255,i.check=o(i.check,we,4,0)),ae=0,se=0,i.mode=S;case S:for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.head&&(i.head.xflags=255&ae,i.head.os=ae>>8),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0)),ae=0,se=0,i.mode=w;case w:if(1024&i.flags){for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.length=ae,i.head&&(i.head.extra_len=ae),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0)),ae=0,se=0}else i.head&&(i.head.extra=null);i.mode=E;case E:if(1024&i.flags&&((ce=i.length)>re&&(ce=re),ce&&(i.head&&($e=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,J,te,ce,$e)),512&i.flags&&(i.check=o(i.check,J,ce,te)),re-=ce,te+=ce,i.length-=ce),i.length))break e;i.length=0,i.mode=P;case P:if(2048&i.flags){if(0===re)break e;ce=0;do{$e=J[te+ce++],i.head&&$e&&i.length<65536&&(i.head.name+=String.fromCharCode($e))}while($e&&ce<re);if(512&i.flags&&(i.check=o(i.check,J,ce,te)),re-=ce,te+=ce,$e)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=A;case A:if(4096&i.flags){if(0===re)break e;ce=0;do{$e=J[te+ce++],i.head&&$e&&i.length<65536&&(i.head.comment+=String.fromCharCode($e))}while($e&&ce<re);if(512&i.flags&&(i.check=o(i.check,J,ce,te)),re-=ce,te+=ce,$e)break e}else i.head&&(i.head.comment=null);i.mode=L;case L:if(512&i.flags){for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(ae!==(65535&i.check)){e.msg="header crc mismatch",i.mode=Q;break}ae=0,se=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=O;break;case M:for(;se<32;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}e.adler=i.check=ie(ae),ae=0,se=0,i.mode=R;case R:if(0===i.havedict)return e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,m;e.adler=i.check=1,i.mode=O;case O:if(t===d||t===f)break e;case I:if(i.last){ae>>>=7&se,se-=7&se,i.mode=Y;break}for(;se<3;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}switch(i.last=1&ae,se-=1,3&(ae>>>=1)){case 0:i.mode=D;break;case 1:if(de(i),i.mode=z,t===f){ae>>>=2,se-=2;break e}break;case 2:i.mode=F;break;case 3:e.msg="invalid block type",i.mode=Q}ae>>>=2,se-=2;break;case D:for(ae>>>=7&se,se-=7&se;se<32;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if((65535&ae)!=(ae>>>16^65535)){e.msg="invalid stored block lengths",i.mode=Q;break}if(i.length=65535&ae,ae=0,se=0,i.mode=B,t===f)break e;case B:i.mode=N;case N:if(ce=i.length){if(ce>re&&(ce=re),ce>oe&&(ce=oe),0===ce)break e;n.arraySet(ee,J,te,ce,ne),re-=ce,te+=ce,oe-=ce,ne+=ce,i.length-=ce;break}i.mode=O;break;case F:for(;se<14;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(i.nlen=257+(31&ae),ae>>>=5,se-=5,i.ndist=1+(31&ae),ae>>>=5,se-=5,i.ncode=4+(15&ae),ae>>>=4,se-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=Q;break}i.have=0,i.mode=U;case U:for(;i.have<i.ncode;){for(;se<3;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.lens[Ee[i.have++]]=7&ae,ae>>>=3,se-=3}for(;i.have<19;)i.lens[Ee[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,Te={bits:i.lenbits},be=s(l,i.lens,0,19,i.lencode,0,i.work,Te),i.lenbits=Te.bits,be){e.msg="invalid code lengths set",i.mode=Q;break}i.have=0,i.mode=G;case G:for(;i.have<i.nlen+i.ndist;){for(;me=(Se=i.lencode[ae&(1<<i.lenbits)-1])>>>16&255,ge=65535&Se,!((_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(ge<16)ae>>>=_e,se-=_e,i.lens[i.have++]=ge;else{if(16===ge){for(Ce=_e+2;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(ae>>>=_e,se-=_e,0===i.have){e.msg="invalid bit length repeat",i.mode=Q;break}$e=i.lens[i.have-1],ce=3+(3&ae),ae>>>=2,se-=2}else if(17===ge){for(Ce=_e+3;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}se-=_e,$e=0,ce=3+(7&(ae>>>=_e)),ae>>>=3,se-=3}else{for(Ce=_e+7;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}se-=_e,$e=0,ce=11+(127&(ae>>>=_e)),ae>>>=7,se-=7}if(i.have+ce>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=Q;break}for(;ce--;)i.lens[i.have++]=$e}}if(i.mode===Q)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=Q;break}if(i.lenbits=9,Te={bits:i.lenbits},be=s(u,i.lens,0,i.nlen,i.lencode,0,i.work,Te),i.lenbits=Te.bits,be){e.msg="invalid literal/lengths set",i.mode=Q;break}if(i.distbits=6,i.distcode=i.distdyn,Te={bits:i.distbits},be=s(c,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,Te),i.distbits=Te.bits,be){e.msg="invalid distances set",i.mode=Q;break}if(i.mode=z,t===f)break e;case z:i.mode=V;case V:if(re>=6&&oe>=258){e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,a(e,ue),ne=e.next_out,ee=e.output,oe=e.avail_out,te=e.next_in,J=e.input,re=e.avail_in,ae=i.hold,se=i.bits,i.mode===O&&(i.back=-1);break}for(i.back=0;me=(Se=i.lencode[ae&(1<<i.lenbits)-1])>>>16&255,ge=65535&Se,!((_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(me&&0==(240&me)){for(xe=_e,ve=me,ye=ge;me=(Se=i.lencode[ye+((ae&(1<<xe+ve)-1)>>xe)])>>>16&255,ge=65535&Se,!(xe+(_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}ae>>>=xe,se-=xe,i.back+=xe}if(ae>>>=_e,se-=_e,i.back+=_e,i.length=ge,0===me){i.mode=j;break}if(32&me){i.back=-1,i.mode=O;break}if(64&me){e.msg="invalid literal/length code",i.mode=Q;break}i.extra=15&me,i.mode=k;case k:if(i.extra){for(Ce=i.extra;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.length+=ae&(1<<i.extra)-1,ae>>>=i.extra,se-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=W;case W:for(;me=(Se=i.distcode[ae&(1<<i.distbits)-1])>>>16&255,ge=65535&Se,!((_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(0==(240&me)){for(xe=_e,ve=me,ye=ge;me=(Se=i.distcode[ye+((ae&(1<<xe+ve)-1)>>xe)])>>>16&255,ge=65535&Se,!(xe+(_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}ae>>>=xe,se-=xe,i.back+=xe}if(ae>>>=_e,se-=_e,i.back+=_e,64&me){e.msg="invalid distance code",i.mode=Q;break}i.offset=ge,i.extra=15&me,i.mode=H;case H:if(i.extra){for(Ce=i.extra;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.offset+=ae&(1<<i.extra)-1,ae>>>=i.extra,se-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=Q;break}i.mode=q;case q:if(0===oe)break e;if(ce=ue-oe,i.offset>ce){if((ce=i.offset-ce)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=Q;break}ce>i.wnext?(ce-=i.wnext,he=i.wsize-ce):he=i.wnext-ce,ce>i.length&&(ce=i.length),pe=i.window}else pe=ee,he=ne-i.offset,ce=i.length;ce>oe&&(ce=oe),oe-=ce,i.length-=ce;do{ee[ne++]=pe[he++]}while(--ce);0===i.length&&(i.mode=V);break;case j:if(0===oe)break e;ee[ne++]=i.length,oe--,i.mode=V;break;case Y:if(i.wrap){for(;se<32;){if(0===re)break e;re--,ae|=J[te++]<<se,se+=8}if(ue-=oe,e.total_out+=ue,i.total+=ue,ue&&(e.adler=i.check=i.flags?o(i.check,ee,ue,ne-ue):r(i.check,ee,ue,ne-ue)),ue=oe,(i.flags?ae:ie(ae))!==i.check){e.msg="incorrect data check",i.mode=Q;break}ae=0,se=0}i.mode=X;case X:if(i.wrap&&i.flags){for(;se<32;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(ae!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=Q;break}ae=0,se=0}i.mode=K;case K:be=_;break e;case Q:be=x;break e;case Z:return v;default:return g}return e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,(i.wsize||ue!==e.avail_out&&i.mode<Q&&(i.mode<Y||t!==h))&&fe(e,e.output,e.next_out,ue-e.avail_out),le-=e.avail_in,ue-=e.avail_out,e.total_in+=le,e.total_out+=ue,i.total+=ue,i.wrap&&ue&&(e.adler=i.check=i.flags?o(i.check,ee,ue,e.next_out-ue):r(i.check,ee,ue,e.next_out-ue)),e.data_type=i.bits+(i.last?64:0)+(i.mode===O?128:0)+(i.mode===z||i.mode===B?256:0),(0===le&&0===ue||t===h)&&be===p&&(be=y),be}function _e(e){if(!e||!e.state)return g;var t=e.state;return t.window&&(t.window=null),e.state=null,p}function me(e,t){var i;return e&&e.state?0==(2&(i=e.state).wrap)?g:(i.head=t,t.done=!1,p):g}function ge(e,t){var i,n=t.length;return e&&e.state?0!==(i=e.state).wrap&&i.mode!==R?g:i.mode===R&&r(1,t,n,0)!==i.check?x:fe(e,t,n,n)?(i.mode=Z,v):(i.havedict=1,p):g}i.inflateReset=oe,i.inflateReset2=ae,i.inflateResetKeep=re,i.inflateInit=le,i.inflateInit2=se,i.inflate=pe,i.inflateEnd=_e,i.inflateGetHeader=me,i.inflateSetDictionary=ge,i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,i){var n=e("../utils/common"),r=15,o=852,a=592,s=0,l=1,u=2,c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],d=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],f=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,i,p,_,m,g,x){var v,y,$,b,T,C,S,w,E,P=x.bits,A=0,L=0,M=0,R=0,O=0,I=0,D=0,B=0,N=0,F=0,U=null,G=0,z=new n.Buf16(r+1),V=new n.Buf16(r+1),k=null,W=0;for(A=0;A<=r;A++)z[A]=0;for(L=0;L<p;L++)z[t[i+L]]++;for(O=P,R=r;R>=1&&0===z[R];R--);if(O>R&&(O=R),0===R)return _[m++]=20971520,_[m++]=20971520,x.bits=1,0;for(M=1;M<R&&0===z[M];M++);for(O<M&&(O=M),B=1,A=1;A<=r;A++)if(B<<=1,(B-=z[A])<0)return-1;if(B>0&&(e===s||1!==R))return-1;for(V[1]=0,A=1;A<r;A++)V[A+1]=V[A]+z[A];for(L=0;L<p;L++)0!==t[i+L]&&(g[V[t[i+L]]++]=L);if(e===s?(U=k=g,C=19):e===l?(U=c,G-=257,k=h,W-=257,C=256):(U=d,k=f,C=-1),F=0,L=0,A=M,T=m,I=O,D=0,$=-1,b=(N=1<<O)-1,e===l&&N>o||e===u&&N>a)return 1;for(;;){S=A-D,g[L]<C?(w=0,E=g[L]):g[L]>C?(w=k[W+g[L]],E=U[G+g[L]]):(w=96,E=0),v=1<<A-D,M=y=1<<I;do{_[T+(F>>D)+(y-=v)]=S<<24|w<<16|E|0}while(0!==y);for(v=1<<A-1;F&v;)v>>=1;if(0!==v?(F&=v-1,F+=v):F=0,L++,0==--z[A]){if(A===R)break;A=t[i+g[L]]}if(A>O&&(F&b)!==$){for(0===D&&(D=O),T+=M,B=1<<(I=A-D);I+D<R&&!((B-=z[I+D])<=0);)I++,B<<=1;if(N+=1<<I,e===l&&N>o||e===u&&N>a)return 1;_[$=F&b]=O<<24|I<<16|T-m|0}}return 0!==F&&(_[T+F]=A-D<<24|64<<16|0),x.bits=O,0}},{"../utils/common":1}],10:[function(e,t,i){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,i){function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=n},{}],"/lib/inflate.js":[function(e,t,i){var n=e("./zlib/inflate"),r=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),l=e("./zlib/zstream"),u=e("./zlib/gzheader"),c=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,t.windowBits);if(i!==a.Z_OK)throw new Error(s[i]);this.header=new u,n.inflateGetHeader(this.strm,this.header)}function d(e,t){var i=new h(t);if(i.push(e,!0),i.err)throw i.msg||s[i.err];return i.result}function f(e,t){return(t=t||{}).raw=!0,d(e,t)}h.prototype.push=function(e,t){var i,s,l,u,h,d,f=this.strm,p=this.options.chunkSize,_=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=o.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(p),f.next_out=0,f.avail_out=p),(i=n.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&_&&(d="string"==typeof _?o.string2buf(_):"[object ArrayBuffer]"===c.call(_)?new Uint8Array(_):_,i=n.inflateSetDictionary(this.strm,d)),i===a.Z_BUF_ERROR&&!0===m&&(i=a.Z_OK,m=!1),i!==a.Z_STREAM_END&&i!==a.Z_OK)return this.onEnd(i),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&i!==a.Z_STREAM_END&&(0!==f.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(f.output,f.next_out),u=f.next_out-l,h=o.buf2string(f.output,l),f.next_out=u,f.avail_out=p-u,u&&r.arraySet(f.output,f.output,l,u,0),this.onData(h)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&i!==a.Z_STREAM_END);return i===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=h,i.inflate=d,i.inflateRaw=f,i.ungzip=d},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js");var nt$9=tmp$1,n$K;function w$Q(e){var t=e.uint8Array,i=e.format,n=e.request,r=u$_(e.flipY,!1);o$1q.typeOf.object("uint8Array",t),o$1q.typeOf.string("format",i);var o,a=new Blob([t],{type:i});return t$11.supportsImageBitmapOptions().then((function(e){return e?o$1l(t$11.createImageBitmapFromBlob(a,{flipY:r,premultiplyAlpha:!1})):new t$11({url:o=window.URL.createObjectURL(a),request:n}).fetchImage({flipY:r})})).then((function(e){return e$2b(o)&&window.URL.revokeObjectURL(o),e})).otherwise((function(e){return e$2b(o)&&window.URL.revokeObjectURL(o),o$1l.reject(e)}))}function h$T(e,t,i){if(!e$2b(t))throw new t$16("resourceOrUrlOrBuffer is required.");var n;t instanceof ArrayBuffer||ArrayBuffer.isView(t)?n=o$1l.resolve(t):n=t$11.createIfNeeded(t).fetchArrayBuffer();if(e$2b(n))return n.then((function(t){if(e$2b(t)){var n=[];t instanceof ArrayBuffer?n.push(t):(0===t.byteOffset&&t.byteLength===t.buffer.byteLength||(t=t.slice(0,t.length)),n.push(t.buffer));var r=u$_(i,!1);return e.scheduleTask({data:t,bMipMap:r},n)}})).then((function(e){return e$1H.clone(e)}))}function o$U(){}function P$R(){var e=o$U._transcodeTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/basis_transcoder.js",wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then((function(){return o$U._transcodeTaskProcessor}));o$U._readyPromise=e}function f$S(e,t){var i;(o$1q.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?i=o$1l.resolve(e):i=t$11.createIfNeeded(e).fetchArrayBuffer();return i.then((function(e){return o$U.transcode(e,n$K,t)}))}o$U._transcodeTaskProcessor=new i$V("transcodeKTX2",Number.POSITIVE_INFINITY),o$U._readyPromise=void 0,o$U.transcode=function(e,t,i){return o$1q.defined("supportedTargetFormats",t),e$2b(o$U._readyPromise)||P$R(),o$U._readyPromise.then((function(n){var r;if(e instanceof ArrayBuffer){var o=new Uint8Array(e);return r={supportedTargetFormats:t,ktx2Buffer:o,testId:i},n.scheduleTask(r,[e])}return r={supportedTargetFormats:t,ktx2Buffer:e},n.scheduleTask(r)})).then((function(e){var t,i=e.length,n=Object.keys(e[0]),r=n.length;for(t=0;t<i;t++)for(var o=e[t],a=0;a<r;a++){var s=o[n[a]];o[n[a]]=new e$1H(s.internalFormat,s.width,s.height,s.levelBuffer,s.datatype)}if(1===r){for(t=0;t<i;++t)e[t]=e[t][n[0]];1===i&&(e=e[0])}return e})).otherwise((function(e){throw e}))},f$S.setKTX2SupportedFormats=function(e,t,i,n,r,o){n$K={s3tc:e,pvrtc:t,astc:i,etc:n,etc1:r,bc7:o}};var _0x1b760f=(_0xc25b04=!0,function(e,t){var i=_0xc25b04?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc25b04=!1,i}),_0x38b996=_0x1b760f(void 0,(function(){return _0x38b996.toString().search("(((.+)+)+)+$").toString().constructor(_0x38b996).search("(((.+)+)+)+$")})),_0xc25b04;function _0x21d1b1(e){this._ambientColor=new e$1U(1,1,1,1),this._diffuseColor=new e$1U(1,1,1,1),this._specularColor=new e$1U(0,0,0,0),this._shininess=50,this._bTransparentSorting=!1,this._textures=[],this._texMatrix=p$1d.clone(p$1d.IDENTITY),this._usePBR=!1,this._isInvalidOblique=!1,this._usePBRTextureBatch=!1,this._alphaMode=void 0,this._isKTK2=!1,this._RGBTOBGR=!1,e$2b(e)&&(e$2b(e.ambient)&&(this._ambientColor=e$29.clone(e.ambient)),e$2b(e.diffuse)&&(this._diffuseColor=e$29.clone(e.diffuse)),e$2b(e.specular)&&(this._specularColor=e$29.clone(e.specular)),this._shininess=e.shininess||50,this._bTransparentSorting=e.bTransparentSorting||!1,this._textures=e.textures||[]),this._mapTextures={},this.isAssociateMaterial=!1}_0x38b996(),Object.defineProperties(_0x21d1b1.prototype,{hasTexture:{get:function(){return this._textures.length>0||(e$2b(this.baseColorTexture)||e$2b(this.normalTexture)||e$2b(this.emissiveTexture)||e$2b(this.metallicRoughnessTexture)||e$2b(this.occlusionTexture))}}}),_0x21d1b1.prototype.clone=function(e){for(var t in e$2b(e)||(e=new _0x21d1b1({})),e._ambientColor=e$1U.clone(this._ambientColor),e._diffuseColor=e$1U.clone(this._diffuseColor),e._specularColor=e$1U.clone(this._specularColor),e._bTransparentSorting=this._bTransparentSorting,e._shininess=this._shininess,e._texMatrix=p$1d.clone(this._texMatrix),e._usePBR=this._usePBR,e._alphaMode=this._alphaMode,e._isInvalidOblique=this._isInvalidOblique,e._isKTK2=this._isKTK2,e._RGBTOBGR=this._RGBTOBGR,e.isAssociateMaterial=this.isAssociateMaterial,this._usePBR&&(e._alphaCutoff=this._alphaCutoff,e._baseColor=e$1U.clone(this._baseColor),e._baseColorTextureIndex=this._baseColorTextureIndex,e._baseColorTextureCoordIndex=this._baseColorTextureCoordIndex,e._doubleSided=this._doubleSided,e._emissiveFactor=e$1U.clone(this._emissiveFactor),e._emissiveTextureIndex=this._emissiveTextureIndex,e._emissiveTextureCoordIndex=this._emissiveTextureCoordIndex,e._roughnessFactor=this._roughnessFactor,e._metallicFactor=this._metallicFactor,e._metallicRoughnessTextureIndex=this._metallicRoughnessTextureIndex,e._metallicRoughnessTextureCoordIndex=this._metallicRoughnessTextureCoordIndex,e._normalTextureIndex=this._normalTextureIndex,e._normalTextureCoordIndex=this._normalTextureCoordIndex,e._normalTextureScale=this._normalTextureScale,e._occlusionTextureIndex=this._occlusionTextureIndex,e._occlusionTextureCoordIndex=this._occlusionTextureCoordIndex,e._occlusionTextureStrength=this._occlusionTextureStrength,e._baseColorTextureMotion=new _0x4fbea6,e._baseColorTextureMotion.clone(this._baseColorTextureMotion),e._emissiveTextureMotion=new _0x4fbea6,e._emissiveTextureMotion.clone(this._emissiveTextureMotion),e._usePBRTextureBatch=this._usePBRTextureBatch,e.baseColorTexture=this.baseColorTexture,e.normalTexture=this.normalTexture,e.emissiveTexture=this.emissiveTexture,e.metallicRoughnessTexture=this.metallicRoughnessTexture,e.occlusionTexture=this.occlusionTexture,e.pbrParamTexture=this.pbrParamTexture),this._textures){!e$2b(i=this._textures[t])||(this._isKTK2?i._inner._context._textureCache.getTexture(i.keyword):Se$d.AddRef(i.id),e._textures[t]=this._textures[t])}for(var t in this._mapTextures){var i;!e$2b(i=this._mapTextures[t])||(Se$d.AddRef(i.id),e._mapTextures[t]=this._mapTextures[t])}},_0x21d1b1.prototype.requestSharedTexture=function(e,t,i,n,r,o,a,s){var l=Se$d._shareTextureCache[e];e$2b(l)||(l=o$10(e,o),Se$d._shareTextureCache[e]=l);var u=this;return o$1l(l,(function(i){var o;if(i instanceof ArrayBuffer){var l,c=new Uint32Array(i,0,6),h=c[0],d=c[1],f=c[2],p=c[3],_=c[4],m=c[5],g=new Uint8Array(i,24,m);if(m===_)l=g;else{var x=nt$9.inflate(g).buffer;l=new Uint8Array(x,0,_)}(o=Se$d.CreateTexture(t,n,d,f,p,h,l,!1,a,s)).isShared=!0,o.sharedKey=e}else o=i;var v=u._baseColorTextureIndex===r,y=u._emissiveTextureIndex===r,$=u._normalTextureIndex===r,b=u._metallicRoughnessTextureIndex===r,T=u._occlusionTextureIndex===r;v?u.baseColorTexture=o:y?u.emissiveTexture=o:$?u.normalTexture=o:b?u.metallicRoughnessTexture=o:T&&(u.occlusionTexture=o),0==r&&u._textures.length>0?u._textures.splice(0,0,o):u._textures.push(o),Se$d._shareTextureCache[e]=o})),l},_0x21d1b1.prototype.createWebp=function(e,t,i,n,r,o,a,s,l,u,c){var h=Se$d.textureManager.textures[e];if(c=u$_(c,!0),e$2b(h))return this._textures.push(h),Se$d.textureManager.refCounts[e]++,h;for(var d=r.length,f=r.byteOffset,p=new DataView(r.buffer),_=0,m=[];_<d;){var g=p.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT,_+=Uint32Array.BYTES_PER_ELEMENT;var x=r.subarray(_,_+g);f+=g,_+=g;var v=w$Q({uint8Array:x,format:"image/webp"});m.push(v)}var y=this;return o$1l.all(m,(function(t){var r=t[0];if(e$2b(r)){var o=!0;(!e$2a.isPowerOfTwo(r.width)||!e$2a.isPowerOfTwo(r.height))&&(s=q$19.CLAMP_TO_EDGE,l=q$19.CLAMP_TO_EDGE,o=!1),o=o&&c;var a=new t$V({context:i,source:r,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({wrapS:s,wrapT:l,minificationFilter:0!==t.length&&o?tt$h.LINEAR_MIPMAP_LINEAR:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})});a.id=e,Se$d.textureManager.textures[e]=a,Se$d.textureManager.refCounts[e]=1,0===n&&y._textures.length>0?y._textures.splice(0,0,a):y._textures.push(a)}var u=i._gl;if(t.length>1&&c){u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,a._texture);for(var h=1,d=t.length;h<d;h++){var f=t[h];u.texImage2D(u.TEXTURE_2D,h,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,f)}u.bindTexture(u.TEXTURE_2D,null)}})).otherwise((function(e){console.error(e)}))},_0x21d1b1.prototype.createJPGPNG=function(e,t,i,n,r,o,a){var s=Se$d.textureManager.textures[e];if(e$2b(s))return this._textures.push(s),Se$d.textureManager.refCounts[e]++,s;var l=[],u="image/jpeg";"png"===a&&(u="image/png");var c=w$Q({uint8Array:n,format:u});l.push(c);var h=this,d=o$1l.defer();return o$1l.all(l,(function(n){var a=n[0];if(e$2b(a)){(!e$2a.isPowerOfTwo(a.width)||!e$2a.isPowerOfTwo(a.height))&&(r=q$19.CLAMP_TO_EDGE,o=q$19.CLAMP_TO_EDGE);var s=new t$V({context:t,source:a,pixelFormat:V$10.RGBA,flipY:!0,sampler:new e$1P({wrapS:r,wrapT:o,minificationFilter:(n.length,tt$h.LINEAR),magnificationFilter:rt$i.LINEAR})});s.id=e,Se$d.textureManager.textures[e]=s,Se$d.textureManager.refCounts[e]=1,ti$3._memTextureAdded(s._sizeInBytes),0===i&&h._textures.length>0?h._textures.splice(0,0,s):h._textures.push(s),d.resolve(s)}})).otherwise((function(e){console.error(e)})),d.promise},_0x21d1b1.prototype.createPBRParamter=function(e){if(e$2b(e.pbrMetallicRoughness)){var t=e.pbrMetallicRoughness;this._usePBR=!0,this._alphaCutoff=u$_(t.alphaCutoff,e.alphaCutoff),this._alphaMode=u$_(t.alphaMode,e.alphaMode),this._baseColor=new e$1U(t.baseColor.x,t.baseColor.y,t.baseColor.z,t.baseColor.w),this._baseColorTextureIndex=t.baseColorTextureIndex,this._baseColorTextureCoordIndex=t.baseColorTextureCoordIndex,this._doubleSided=t.doubleSided,this._emissiveFactor=new e$1U(t.emissiveFactor.x,t.emissiveFactor.y,t.emissiveFactor.z,1),this._emissiveTextureIndex=t.emissiveTextureIndex,this._emissiveTextureCoordIndex=t.emissiveTextureCoordIndex,this._roughnessFactor=t.roughnessFactor,this._metallicFactor=t.metallicFactor,this._metallicRoughnessTextureIndex=t.metallicRoughnessTextureIndex,this._metallicRoughnessTextureCoordIndex=t.metallicRoughnessTextureCoordIndex,this._normalTextureIndex=t.normalTextureIndex,this._normalTextureCoordIndex=t.normalTextureCoordIndex,this._normalTextureScale=t.normalTextureScale,this._occlusionTextureIndex=t.occlusionTextureIndex,this._occlusionTextureCoordIndex=t.occlusionTextureCoordIndex,this._occlusionTextureStrength=t.occlusionTextureStrength,this._baseColorTextureMotion=new _0x4fbea6(t.baseColorTextureMotion),this._emissiveTextureMotion=new _0x4fbea6(t.emissiveTextureMotion),this.baseColorTexture=t.baseColorTexture,this.normalTexture=t.normalTexture,this.emissiveTexture=t.emissiveTexture,this.metallicRoughnessTexture=t.metallicRoughnessTexture,this.occlusionTexture=t.occlusionTexture}},_0x21d1b1.prototype.createCRN=function(e,t,i,n,r,o,a,s,l,u){var c;if(l=u$_(l,!0),s?c=a$P(r.imageBuffer,!0,!0):_0x46a73d.CRNTaskProcessorReady&&(c=h$T(_0x46a73d.CRNProcessor,r.imageBuffer,!0)),e$2b(c)){var h=this;return c.then((function(t){if(!h.isDestroyed()){u=u$_(u,{});var s=Se$d.CreateTexture(e,i,r.width,r.height,r.nFormat,_0x2072ef.enrS3TCDXTN,t.bufferView,!1,o,a,l);u.isEmissiveTex?h.emissiveTexture=s:u.isNormalTexture?h.normalTexture=s:u.isMetallicRoughnessTexture?h.metallicRoughnessTexture=s:u.isBaseColorTexture?h.baseColorTexture=s:0===n&&h._textures.length>0?h._textures.splice(0,0,s):h._textures.push(s)}})),c}},_0x21d1b1.prototype.createKTX2=function(e,t,i,n,r,o,a,s){this._isKTK2=!0;var l=i._textureCache.getTexture(e);if(s=u$_(s,!0),e$2b(l))return this._textures.push(l),l;var u=f$S(r.imageBuffer,r.id);if(e$2b(u)){var c=this;return u.then((function(t){var n=i._textureCache.getTexture(e);if(e$2b(n))c._textures.push(n);else{var r,l=0;Array.isArray(t)&&(l=t.length,r=t.slice(1,t.length).map((function(e){return e.bufferView})),t=t[0]);var u=!0;(!e$2a.isPowerOfTwo(t.width)||!e$2a.isPowerOfTwo(t.height))&&(o=q$19.CLAMP_TO_EDGE,a=q$19.CLAMP_TO_EDGE,u=!1),s||(l=0,r=void 0,u=!1);var h=new e$1P({wrapS:o,wrapT:a,minificationFilter:0!==l&&u?tt$h.LINEAR_MIPMAP_LINEAR:tt$h.LINEAR,magnificationFilter:tt$h.LINEAR});(n=e$2b(t.internalFormat)?new t$V({context:i,pixelFormat:t.internalFormat,width:t.width,height:t.height,source:{arrayBufferView:t.bufferView,mipLevels:r},sampler:h}):new t$V({context:i,source:t,sampler:h})).keyword=e,c._textures.push(n),i._textureCache.addTexture(e,n)}})).otherwise((function(e){console.log(e)})),u}},_0x21d1b1.prototype.createCommonParamter=function(e){var t=u$_(e.ambient,e$1U.WHITE);this._ambientColor=new e$1U(t.r,t.g,t.b,t.a);var i=u$_(e.diffuse,e$1U.WHITE);this._diffuseColor=new e$1U(i.r,i.g,i.b,i.a);var n=u$_(e.specular,e$1U.WHITE);this._specularColor=new e$1U(n.r,n.g,n.b,n.a),this._shininess=u$_(e.shininess,10),this._bTransparentSorting=u$_(e.transparentsorting,!1)};var _0x5c0770=new e$29;function _0x4fbea6(e){if(!e$2b(e))return this.OffsetPeriod=0,this.OffsetSpeedU=0,this.OffsetSpeedV=0,this.TilingPeriod=0,this.TilingSpeedU=0,void(this.TilingSpeedV=0);this.OffsetPeriod=e.offsetPeriod,this.OffsetSpeedU=e.offsetSpeedU,this.OffsetSpeedV=e.offsetSpeedV,this.TilingPeriod=e.tilingPeriod,this.TilingSpeedU=e.tilingSpeedU,this.TilingSpeedV=e.tilingSpeedV}_0x21d1b1.prototype.createPBRUniformMap=function(){var e={};if(!this._usePBR)return e;var t=this;e.u_metallicFactor=function(){return t._metallicFactor},e.u_roughnessFactor=function(){return t._roughnessFactor},e.u_emissiveFactor=function(){return t._emissiveFactor},e.u_baseColorFactor=function(){return t._baseColor},e.u_alphaCutoff=function(){return t._alphaCutoff},e.u_baseColorTexture=function(){return t._textures[t._baseColorTextureIndex]},e.u_metallicRoughnessTexture=function(){return t._textures[t._metallicRoughnessTextureIndex]},e.u_normalTexture=function(){return t._textures[t._normalTextureIndex]},e.u_occlusionTexture=function(){return t._textures[t._occlusionTextureIndex]},e.u_emissiveTexture=function(){return t._textures[t._emissiveTextureIndex]};var i=t._emissiveTextureMotion;e.u_emissiveUVOffsetAndTiling=function(){var e=performance.now()/1e3;if(i._offsetPeriod>0){var t=e%i._offsetPeriod;_0x5c0770.x=t*i._offsetSpeedU,_0x5c0770.y=t*i._offsetSpeedV}else _0x5c0770.x=0,_0x5c0770.y=0;if(i._tilingPeriod>0){var n=e%i._tilingPeriod;_0x5c0770.z=1+n*i._tilingSpeedU,_0x5c0770.w=1+n*i._tilingSpeedV}else _0x5c0770.z=1,_0x5c0770.w=1;return _0x5c0770};var n=t._baseColorTextureMotion;return e.u_baseColorUVOffsetAndTiling=function(){var e=performance.now()/1e3;if(n._offsetPeriod>0){var t=e%n._offsetPeriod;_0x5c0770.x=t*n._offsetSpeedU,_0x5c0770.y=t*n._offsetSpeedV}else _0x5c0770.x=0,_0x5c0770.y=0;if(n._tilingPeriod>0){var i=e%n._tilingPeriod;_0x5c0770.z=1+i*n._tilingSpeedU,_0x5c0770.w=1+i*n._tilingSpeedV}else _0x5c0770.z=1,_0x5c0770.w=1;return _0x5c0770},e},_0x21d1b1.prototype.appendPBRMacroToShader=function(e,t){!this._usePBR||(e.defines.push("USE_PBR"),t.defines.push("USE_PBR"),this._baseColorTextureIndex>=0&&t.defines.push("HAS_BASECOLOR_TEXTURE"),this._normalTextureIndex>=0&&t.defines.push("HAS_NORMAL_TEXTURE"),this._metallicRoughnessTextureIndex>=0&&t.defines.push("HAS_METALLICROUGHNESS_TEXTURE"),this._occlusionTextureIndex>=0&&t.defines.push("HAS_OCCLUSION_TEXTURE"),this._emissiveTextureIndex>=0&&t.defines.push("HAS_EMISSIVE_TEXTURE"),this._doubleSided&&t.defines.push("DOUBLE_SIDED"))},_0x21d1b1.Default=new _0x21d1b1,_0x21d1b1.prototype.isDestroyed=function(){return!1},_0x21d1b1.prototype.destroy=function(){for(var e in this._ambientColor=null,this._diffuseColor=null,this._specularColor=null,this._textures){e$2b(t=this._textures[e])&&(this._isKTK2?t.destroy():Se$d.DestroyTexture(t.id))}for(var e in this._mapTextures){var t;e$2b(t=this._mapTextures[e])&&Se$d.DestroyTexture(t.id)}return i$10(this)},_0x4fbea6.prototype.clone=function(e){this.OffsetPeriod=e.OffsetPeriod,this.OffsetSpeedU=e.OffsetSpeedU,this.OffsetSpeedV=e.OffsetSpeedV,this.TilingPeriod=e.TilingPeriod,this.TilingSpeedU=e.TilingSpeedU,this.TilingSpeedV=e.TilingSpeedV};var _0x4f9230=(_0x3bc009=!0,function(e,t){var i=_0x3bc009?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3bc009=!1,i}),_0x4a5ff6=_0x4f9230(void 0,(function(){return _0x4a5ff6.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a5ff6).search("(((.+)+)+)+$")})),_0x3bc009;_0x4a5ff6();var _0x4cd7d7={EXCAVATION:"EXCAVATION",FALTTEN:"FALTTEN",OVERLAY:"OVERLAY",HYPSOMETRIC:"HYPSOMETRIC",ADJUST_COLOR:"ADJUST_COLOR",TRANSPARENT_BACK_COLOR:"TRANSPARENT_BACK_COLOR",HORIZONTAL_LINE:"HORIZONTAL_LINE",COMPUTE_W_VALUE:"COMPUTE_W_VALUE",COMPUTE_TEXCOORD:"COMPUTE_TEXCOORD",HAS_LIGHT:"HAS_LIGHT",HAS_NORMAL:"HAS_NORMAL",REPLACE_SELECT_TYPE:"REPLACE_SELECT_TYPE",SILHOUETTE_SELECT_TYPE:"SILHOUETTE_SELECT_TYPE",MULTI_TEX:"MULTI_TEX",APPLY_SPLIT:"APPLY_SPLIT",APPLY_SWIPE:"APPLY_SWIPE",TEXCOORD:"TexCoord",TEXCOORD2:"TexCoord2",COMPRESS_VERTEX:"COMPRESS_VERTEX",COMPRESS_NORMAL:"COMPRESS_NORMAL",COMPRESS_COLOR:"COMPRESS_COLOR",COMPRESS_TEXCOORD:"COMPRESS_TEXCOORD",SKETCH_MODE:"SKETCH_MODE",NORMAL_AND_DEPTH:"NORMAL_AND_DEPTH",POST_EFFECT:"POST_EFFECT",CLIP_FILT_BY_ID:"CLIP_FILT_BY_ID",CLIP:"CLIP",CLIPPLANE:"CLIPPLANE",PBR:"PBR",PT_CLOUD:"PT_CLOUD",DIR_LIGHTS:"DIR_LIGHTS ",POINT_LIGHTS:"POINT_LIGHTS ",SPOT_LIGHTS:"SPOT_LIGHTS ",HEMISPHERE_LIGHTS:"HEMISPHERE_LIGHTS ",W_VISIBLE:"W_VISIBLE",EMISSION_TEXTURE_ATLAS:"EMISSION_TEXTURE_ATLAS",EMISSION_TEXTURE_COUNT:"EMISSION_TEXTURE_COUNT ",TEXTURE_MOVE:"TEXTURE_MOVE",VOLUME:"Volume",VOLUME2:"Volume2",TEXTURE_COORD_ONE_IS_W:"TEXTURE_COORD_ONE_IS_W",TRIANGLE_FILTRATE:"TRIANGLE_FILTRATE",UseInstanceSkeletonMatrix:"UseInstanceSkeletonMatrix",RGBTOBGR:"RGBTOBGR",HAS_SKELETONSELECTED:"HAS_SKELETONSELECTED",SKELETONSELECT_ENABLE:"SKELETONSELECT_ENABLE",REPLACE_COLOR_TYPE:"REPLACE_COLOR_TYPE",INVALID_OBLIQUE:"INVALID_OBLIQUE",IGNORE_NORMAL:"IGNORE_NORMAL",TextureBatch:"TextureBatch",Translation:"Translation",VOL_AND_HYP:"VOL_AND_HYP",VERTEX_CAPTURE:"VERTEX_CAPTURE",SEC_TEX_EMISSION:"SEC_TEX_EMISSION",BRDF:"BRDF",PBR_THEME:"PBR_THEME",IBL:"IBL",POINT:"POINT",HAS_BASE_TEXTURE:"HAS_BASE_TEXTURE",HAS_NORMAL_TEXTURE:"HAS_NORMAL_TEXTURE",HAS_OCCLUSION_TEXTURE:"HAS_OCCLUSION_TEXTURE",HAS_EMISSIVE_TEXTURE:"HAS_EMISSIVE_TEXTURE",USE_BatchPBR:"USE_BatchPBR",HAS_DIR_LIGHTS:"HAS_DIR_LIGHTS",HAS_POINT_LIGHTS:"HAS_POINT_LIGHTS",HAS_SPOT_LIGHTS:"HAS_SPOT_LIGHTS",HAS_HEMISPHERE_LIGHTS:"HAS_HEMISPHERE_LIGHTS",NO_TEXCOORD:"NO_TEXCOORD",FLOOD_ANALYSIS:"FLOOD_ANALYSIS",HAS_RAIN:"HAS_RAIN",HAS_WETNESS:"HAS_WETNESS",HAS_SNOW:"HAS_SNOW",HAS_MetallicRoughness_TEXTURE:"HAS_MetallicRoughness_TEXTURE",FusionMode:"FusionMode",VISIBLEDISTANCEMAX:"VISIBLEDISTANCEMAX",MASK:"MASK",LineVector:"LineVector",KtxEnvMap:"KtxEnvMap",WIREFRAME_SELECT_TYPE:"WIREFRAME_SELECT_TYPE",Has_Texture:"Has_Texture",UseFloatTexture:"UseFloatTexture",HypColorByZValue:"HypColorByZValue"},Y$H=Object.freeze(_0x4cd7d7),e$1e={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3},i$Q=Object.freeze(e$1e),_0x459cf2=(_0x22ea2b=!0,function(e,t){var i=_0x22ea2b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x22ea2b=!1,i}),_0x123bea=_0x459cf2(void 0,(function(){return _0x123bea.toString().search("(((.+)+)+)+$").toString().constructor(_0x123bea).search("(((.+)+)+)+$")})),_0x22ea2b;_0x123bea();var _0xda3acb={S3M:49,S3M4:1},_0x41168d=Object.freeze(_0xda3acb),_0x5bb0ac=(_0x5d3176=!0,function(e,t){var i=_0x5d3176?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d3176=!1,i}),_0x3508cb=_0x5bb0ac(void 0,(function(){return _0x3508cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x3508cb).search("(((.+)+)+)+$")})),_0x5d3176;_0x3508cb();var _0x130901={RESET:0,SetColor:1,SELECTED:2,HIDE:4,OFFSET:8,CLIP:16,BLOOM:32,ALL:255},_0x4580ad=Object.freeze(_0x130901),_0x57d5fa=(_0x19118e=!0,function(e,t){var i=_0x19118e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19118e=!1,i}),_0x25de9e=_0x57d5fa(void 0,(function(){return _0x25de9e.toString().search("(((.+)+)+)+$").toString().constructor(_0x25de9e).search("(((.+)+)+)+$")})),_0x19118e;_0x25de9e();var _0x18a3ed={MIX:0,REPLACE:1},_0x203e3b=Object.freeze(_0x18a3ed),_0x2e0f29=(_0x2e1146=!0,function(e,t){var i=_0x2e1146?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e1146=!1,i}),_0x5edc52=_0x2e0f29(void 0,(function(){return _0x5edc52.toString().search("(((.+)+)+)+$").toString().constructor(_0x5edc52).search("(((.+)+)+)+$")})),_0x2e1146;_0x5edc52();var _0x36c72a={DIRECTIONAL:0,POINT:1,SPOT:2,HEMISPHERE:3},_0x1d9df9=Object.freeze(_0x36c72a),_0x5e42fd=(_0x356081=!0,function(e,t){var i=_0x356081?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x356081=!1,i}),_0x4559f9=_0x5e42fd(void 0,(function(){return _0x4559f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4559f9).search("(((.+)+)+)+$")})),_0x356081;_0x4559f9();var _0x2ecd22={POINT:0,VOXEL:1},_0x16e744=Object.freeze(_0x2ecd22),_0x52c0c7=(_0x106b23=!0,function(e,t){var i=_0x106b23?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x106b23=!1,i}),_0x358d29=_0x52c0c7(void 0,(function(){return _0x358d29.toString().search("(((.+)+)+)+$").toString().constructor(_0x358d29).search("(((.+)+)+)+$")})),_0x106b23;_0x358d29();var _0x2fc230={NONE:0,TITANIUM_SCUFFED:1,METAL_PLATE:2,EMISSION:4,ROUGHNESS:8},je$g=Object.freeze(_0x2fc230),_0x38da57=(_0x5a2583=!0,function(e,t){var i=_0x5a2583?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a2583=!1,i}),_0x5a0a8c=_0x38da57(void 0,(function(){return _0x5a0a8c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a0a8c).search("(((.+)+)+)+$")})),_0x5a2583;_0x5a0a8c();var _0x2a7fd2="\n#include <SceneUboDecl>\n\nvar uFrontColorTexture : texture_2d<f32>;\nvar uFrontColorTextureSampler : sampler;\nvar uFrontDepthTexture : texture_2d<f32>;\nvar uFrontDepthTextureSampler : sampler;\nvar uBackDepthTexture : texture_2d<f32>;\nvar uBackDepthTextureSampler : sampler;\n\nuniform uSQMode : f32;\n\nvarying vSecondColor : vec4<f32>; \nvarying vColor : vec4<f32>;\nvarying vSQ_clip_pos : vec4<f32>;\n\nfn reverseLogDepth(logZ : f32) -> f32\n{\n#ifdef LOG_DEPTH\n var near = Scene.uCurrentFrustum.x;\n var far = Scene.uCurrentFrustum.y;\n var log2Depth = logZ * Scene.uLog2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#else\n return logZ;\n#endif\n}\n\nfn unpackDepth(packedDepth : vec4<f32>) -> f32\n{\n return dot(packedDepth, vec4<f32>(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n}\n\nfn isPointInObject(ndc : vec4<f32>) -> bool\n{\n var depthTexCoord = ndc.xy * 0.5 + 0.5;\n var bIn = false;\n var color = textureSample(uFrontColorTexture, uFrontColorTextureSampler, depthTexCoord.xy);\n var pixelZWindow = ndc.z;\n if(color.r > 0.99 && color.g < 0.01 && color.b < 0.01)\n {\n var z_window_near = unpackDepth(textureSampleLevel(uFrontDepthTexture, uFrontDepthTextureSampler, depthTexCoord.xy, 0.0));\n z_window_near = reverseLogDepth(z_window_near);\n var z_window_far = unpackDepth(textureSampleLevel(uBackDepthTexture, uBackDepthTextureSampler, depthTexCoord.xy, 0.0));\n z_window_far = reverseLogDepth(z_window_far);\n if(pixelZWindow - z_window_near > -0.0000001 && z_window_far - pixelZWindow > -0.0000001)\n {\n bIn = true;\n }\n }\n if(uniforms.uSQMode < 0.5){\n return !bIn;\n }\n else{\n return bIn;\n }\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var ndc = vSQ_clip_pos / vSQ_clip_pos.w; \n if(!isPointInObject(ndc)) \n { \n discard; \n } \n if(vColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = vSecondColor; \n}",_0x2a6cb7=(_0x77ceda=!0,function(e,t){var i=_0x77ceda?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x77ceda=!1,i}),_0x59f65d=_0x2a6cb7(void 0,(function(){return _0x59f65d.toString().search("(((.+)+)+)+$").toString().constructor(_0x59f65d).search("(((.+)+)+)+$")})),_0x77ceda;function _0x104945(e,t){this._content=e,this._id=t,this._batchId=t,this._color=new e$1U(1,1,1,1),this._imageUrl="",this._vertexOffset=[],this._instanceIds=void 0,this._pbrMaterialIndex=void 0}_0x59f65d(),Object.defineProperties(_0x104945.prototype,{show:{get:function(){return!0},set:function(e){}},color:{get:function(){return e$2b(this._color)||(this._color=new e$1U),this._color},set:function(e){this._color=e}},pbrMaterialIndex:{get:function(){return e$2b(this._pbrMaterialIndex)||(this._pbrMaterialIndex=0),this._pbrMaterialIndex},set:function(e){this._pbrMaterialIndex=e}},imageUrl:{get:function(){return this._imageUrl},set:function(e){this._imageUrl=e}},id:{get:function(){return this._id},set:function(e){this._id=e}},batchId:{get:function(){return this._batchId},set:function(e){this._batchId=e}},instanceIds:{get:function(){return this._instanceIds},set:function(e){this._instanceIds=e}}}),_0x104945.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},_0x104945.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},_0x104945.prototype.getProperty=function(e){return this[e]},_0x104945.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},_0x104945.prototype.addVertexOffset=function(e,t){this._vertexOffset.push({vertexCount:e,vertexOffset:t})},_0x104945.prototype.getVertexOffset=function(){return this._vertexOffset},_0x104945.prototype.getRenderBatchKey=function(){var e=this._color.toCssColorString();return this._imageUrl+"_"+e};var _0x36af16=(_0x481689=!0,function(e,t){var i=_0x481689?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x481689=!1,i}),_0x1b0c71=_0x36af16(void 0,(function(){return _0x1b0c71.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b0c71).search("(((.+)+)+)+$")})),_0x481689;_0x1b0c71();var _0x10b3f1=function(){this.model=void 0,this.context=void 0,this.texture=void 0,this.subTextureInfo=void 0};_0x10b3f1.prototype.set=function(e,t,i,n,r){this.model=t,this.context=e,this.texture=i,this.subTextureInfo=n,this.textureLod=r},_0x10b3f1.prototype.execute=function(){var e=this.subTextureInfo;if(!this.texture.ready){if(!this.textureLod)return this.texture.arrayBufferView=e.arrayBufferView,void this.texture.init();this.texture.init()}this.texture.copyFrom({xOffset:e.xOffset,yOffset:e.yOffset,width:e.width,height:e.height,arrayBufferView:e.arrayBufferView})};var _0x4292cf=(_0x292819=!0,function(e,t){var i=_0x292819?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x292819=!1,i}),_0x1d8b09=_0x4292cf(void 0,(function(){return _0x1d8b09.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d8b09).search("(((.+)+)+)+$")})),_0x292819;_0x1d8b09();var _0x50ea4a="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nattribute vec4 aPosition; \n#ifdef USE_VertexWeight \n attribute float aVertexWeight; \n #ifdef MultiTemporalWeight \n attribute float aVertexWeight_1; \n #endif \n#endif \n#ifdef HAS_NORMAL \n attribute vec3 aNormal; \n#endif \n#ifdef TexCoord \n attribute vec4 aTexCoord0; \n#endif \n#ifdef VertexColor \nattribute vec4 aColor; \n#endif \nvarying float v_pixelDistance; \nvarying vec4 vPosition; \n#ifdef COMPRESS_TEXCOORD \n#ifdef TexCoord \n attribute vec4 aTexCoordZ0; \n#endif \n#endif \n#ifdef COMPUTE_W_VALUE \n varying float wValue; \n#endif \n#ifdef HYPSOMETRIC \n uniform sampler2D uHypsometricTexture; \n#endif \n varying vec4 vColor; \n varying vec4 vPositionMC; \n#include <computeWValue>\n#ifdef HYPSOMETRIC \nvec4 computeContourMapColor(float fValue) \n{ \n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0); \n float contourRate = (fValue - uHypFloor) / threshold; \n float finalCoord = clamp(contourRate, 0.0, 1.0); \n float count = floor(finalCoord * 16.0); \n float y = (count*2.0 + 1.0)/32.0; \n float x = fract(finalCoord*16.0); \n if(y > 1.0) \n { \n x = 1.0; \n } \n vec2 contourCoord = vec2(x, y); \n return texture2D(uHypsometricTexture, contourCoord).rgba; \n} \nvec4 getHypsometricColor(vec4 oriColor, float fValue) \n{ \n vec4 contourMapColor = vec4(0.0); \n float finalOpacity = uHypOpacity; \n if(fValue > uHypMaxVisibleValue || fValue < uHypMinVisibleValue) \n { \n return uNoValueColor * oriColor; \n } \n contourMapColor = computeContourMapColor(fValue); \n finalOpacity *= sign(uHypContourFillMode); \n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity); \n return mixColor; \n} \n#endif \n \nvec3 realNormal; \nvoid main() \n{ \n#ifdef COMPRESS_VERTEX \n vec4 vertexPos = vec4(1.0); \n vertexPos = decode_position_min + aPosition * decode_position_normConstant; \n#else \n vec4 vertexPos = aPosition; \n#endif \n#ifdef HAS_NORMAL \n realNormal = aNormal; \n #ifdef COMPRESS_NORMAL \n realNormal = czm_octDecode(aNormal.xy, normal_rangeConstant).zxy; \n #endif \n#endif \n float oriVertexW = computeWValue(vertexPos); \n vertexPos.w = 1.0; \nvec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n #ifdef COMPRESS_COLOR \n #ifdef MeshOPT_Compress \n vertexColor = aColor; \n #else \n vertexColor = aColor / 255.0; \n #endif \n #else \n vertexColor = aColor; \n #endif \n#endif \n vColor = vertexColor*uFillForeColor; \n vPositionMC.xyz = vertexPos.xyz; \n vPositionMC.w = 0.0; \n gl_Position = uViewProjection * uModelMatrix * vertexPos; \n#ifdef HYPSOMETRIC \n vColor = getHypsometricColor(vColor, wValue); \n#endif \n v_pixelDistance = 2.0 / uPointSize;\n gl_PointSize = uPointSize; \n vPosition = uView * uModelMatrix * vertexPos; \n}",_0x30769e=(_0x567353=!0,function(e,t){var i=_0x567353?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x567353=!1,i}),_0x45d9f3=_0x30769e(void 0,(function(){return _0x45d9f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x45d9f3).search("(((.+)+)+)+$")})),_0x567353;_0x45d9f3();var _0x18fcae="#ifdef GL_OES_standard_derivatives \n#extension GL_OES_standard_derivatives : enable \n#endif \n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#ifdef COMPUTE_W_VALUE \n varying float wValue; \n#endif \nvarying vec4 vColor; \nvarying vec4 vPositionMC; \nvarying vec4 vPosition; \nvarying float v_pixelDistance; \n#include <preClipFS>\n#include <adjustColor>\n#include <clip>\nvoid main() \n{ \n preClip();\n vec4 finalColor = vColor; \n#ifdef ADJUST_COLOR \n finalColor.rgb = adjustColor(finalColor.rgb);\n#endif \n float distanceToCenter = length(gl_PointCoord - vec2(0.5)); \n float maxDistance = max(0.0, 0.5 - v_pixelDistance); \n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter); \n finalColor.a *= wholeAlpha; \n\tif(finalColor.a < 0.1) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef CLIP \n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n#ifdef PREPASS\n gl_FragData[0] = vPosition;\n gl_FragData[1] = vec4(0.0, 0.0, 0.0, 1.0);\n gl_FragData[2] = vec4(0.0, 0.0, 0.0, 1.0);\n#else\n gl_FragColor = czm_gammaCorrect(finalColor); \n#endif\n \n}",_0x108904=(_0x1c59d9=!0,function(e,t){var i=_0x1c59d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c59d9=!1,i}),_0x34ba9d=_0x108904(void 0,(function(){return _0x34ba9d.toString().search("(((.+)+)+)+$").toString().constructor(_0x34ba9d).search("(((.+)+)+)+$")})),_0x1c59d9;_0x34ba9d();var _0x390e70="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <getMetersPerPixel>\n\n#ifdef COMPRESS_VERTEX\n attribute aPosition : vec4<u32>;\n#else\n attribute aPosition : vec4<f32>;\n#endif\n#ifdef HAS_NORMAL\n #ifdef COMPRESS_NORMAL\n attribute aNormal : vec2<i32>;\n #else\n attribute aNormal : vec3<f32>;\n #endif\n#endif\n#ifdef TexCoord\n attribute aTexCoord0 : vec4<f32>;\n#endif\n#ifdef VertexColor\n attribute aColor : vec4<u32>;\n#endif\n#ifdef USE_VertexWeight\n attribute aVertexWeight : f32;\n#endif\nattribute offset : vec2<f32>;\nvarying v_pixelDistance : f32;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vPosition : vec4<f32>;\nvarying vOffset : vec2<f32>;\n// #ifdef COMPUTE_W_VALUE\n// uniform float uHypHasColorByHeight;\n// varying float wValue;\n// #endif\n// #ifdef HYPSOMETRIC\n// uniform sampler2D uHypsometricTexture;\n// uniform float uHypOpacity;\n// uniform float uHypContourFillMode;\n// uniform float uHypFloor;\n// uniform float uHypCeil;\n// uniform float uHypMaxVisibleValue;\n// uniform float uHypMinVisibleValue;\n// uniform vec4 uNoValueColor;\n// #endif\n// #ifdef EXCAVATION\n// varying vec4 vExcavationVertexPos;\n// #endif\n// #ifdef W_VISIBLE\n// uniform sampler2D uCategorieTexture;\n// uniform float uMaxCategory;\n// uniform float uMinCategory;\n// uniform float uCategoryWidht;\n// #endif\n#ifdef COMPUTE_W_VALUE \n varying wValue : f32; \n#endif \n#ifdef HYPSOMETRIC \n var uHypsometricTexture : texture_2d<f32>;\n var uHypsometricTextureSampler : sampler;\n#endif\n#include <computeWValue> \n#ifdef HYPSOMETRIC \nfn computeContourMapColor(fValue : f32) -> vec4<f32> \n{ \n var threshold = clamp(abs(Layer.uHypCeil - Layer.uHypFloor), 0.000001, 20000.0); \n var contourRate = (fValue - Layer.uHypFloor) / threshold; \n var finalCoord = clamp(contourRate, 0.0, 1.0); \n var count = floor(finalCoord * 16.0); \n var y = (count*2.0 + 1.0)/32.0; \n var x = fract(finalCoord*16.0); \n if(y > 1.0) \n { \n x = 1.0; \n } \n var contourCoord = vec2(x, y); \n return textureSampleLevel(uHypsometricTexture, uHypsometricTextureSampler, contourCoord, 0.0f).rgba; \n} \nfn getHypsometricColor(oriColor : vec4<f32>, fValue : f32) -> vec4<f32> \n{ \n var contourMapColor = vec4<f32>(0.0); \n var finalOpacity = Layer.uHypOpacity; \n if(fValue > Layer.uHypMaxVisibleValue || fValue < Layer.uHypMinVisibleValue) \n { \n return Layer.uNoValueColor * oriColor; \n } \n contourMapColor = computeContourMapColor(fValue); \n finalOpacity *= sign(Layer.uHypContourFillMode); \n var mixColor : vec4<f32> = mix(vec4<f32>(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity); \n return mixColor; \n} \n#endif \n\n//计算偏移\nfn addScreenSpaceOffset(positionEC : vec4<f32>, offset : vec2<f32>) -> vec4<f32>\n{\n var result = positionEC;\n var width=vec2<f32>(Layer.uPointSize);\n var halfsize:vec2<f32>=width*0.5;\n halfsize*=offset*2.0;\n halfsize*=getMetersPerPixel(positionEC,Scene.uPixelRatio);\n result.x=positionEC.x+halfsize.x;\n result.y=positionEC.y+halfsize.y;\n return result;\n}\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs {\n#ifdef COMPRESS_VERTEX\n var iAPosition = vec4<f32>(aPosition);\n var vertexPos : vec4<f32>;\n vertexPos = Mesh.decode_position_min + vec4<f32>(iAPosition.xyz, 1.0f) * Mesh.decode_position_normConstant;\n#else\n var vertexPos = aPosition;\n#endif\n vOffset = offset;\n var realNormal : vec3<f32>;\n#ifdef HAS_NORMAL\n realNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n var fANormal = vec2<f32>(aNormal.xy);\n realNormal = czm_octDecode(fANormal.xy, Mesh.normal_rangeConstant).zxy;\n #endif\n#endif\n var oriVertexW = computeWValue(&vertexPos);\n vertexPos.w = 1.0;\n// #ifdef EXCAVATION\n// vExcavationVertexPos = uGeoMatrix * vertexPos;\n// #endif\n var vertexColor = vec4<f32>(1.0);\n#ifdef VertexColor\n var fColor = vec4<f32>(aColor);\n vertexColor = vec4<f32>(fColor.r / 255.0f, fColor.g / 255.0f, fColor.b / 255.0f, fColor.a / 255.0f);\n#endif\n vColor = vertexColor * Layer.uFillForeColor;\n // vPositionMC.xyz = vertexPos.xyz;\n // vPositionMC.w = 0.0;\n //point\n var positionEC= Scene.uView * Mesh.uModelMatrix *vertexPos;\n positionEC=addScreenSpaceOffset(positionEC,offset);\n vPositionMC = vec4<f32>(positionEC.xyz, 1.0f);//positionMC不能一致,否者计算法向量返回为0,导致颜色为黑色\n var originPos=Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n gl_Position=Scene.uProjection * positionEC;\n //gl_Position = Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n#ifdef HYPSOMETRIC \n vColor = getHypsometricColor(vColor, wValue); \n#endif \n// #ifdef W_VISIBLE\n// vec2 categoryTexCoord = vec2(abs(oriVertexW - uMinCategory) / uCategoryWidht + 0.5 /uCategoryWidht , 0.5);\n// float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n// vColor.a *= 1.0 - category;\n// #endif\n v_pixelDistance = 2.0 / Layer.uPointSize;\n vPosition = Scene.uView * Mesh.uModelMatrix * vertexPos;\n\n czm_vertexLogDepth();\n}",_0x5c3279=(_0x19da29=!0,function(e,t){var i=_0x19da29?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19da29=!1,i}),_0x9031f3=_0x5c3279(void 0,(function(){return _0x9031f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x9031f3).search("(((.+)+)+)+$")})),_0x19da29;_0x9031f3();var _0x4e9507="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\n#ifdef COMPUTE_W_VALUE \n varying wValue : f32; \n#endif \nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vPosition : vec4<f32>;\nvarying vOffset : vec2<f32>;\nvarying v_pixelDistance : f32;\n// #ifdef APPLY_SWIPE\n// uniform vec4 uSwipeRegion;\n// #endif\n\nfn sRGBToLinear(srgbIn : vec4<f32>) -> vec4<f32> {\n var linearOut = pow(vec3<f32>(srgbIn.x, srgbIn.y, srgbIn.z), vec3<f32>(2.200000048f, 2.200000048f, 2.200000048f));\n return vec4<f32>(linearOut.x, linearOut.y, linearOut.z, srgbIn.w);\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n// #ifdef APPLY_SPLIT\n// czm_splitClip();\n// #endif\n// #ifdef APPLY_SWIPE \n// czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n// #endif\n// #ifdef EXCAVATION\n// if(czm_executeExcavation())\n// {\n// discard;\n// }\n// #endif\n\t// if(vColor.a < 0.1)\n\t// {\n\t// \tdiscard;\n\t// }\n gl_FragColor = vColor;\n#ifdef ADJUST_COLOR\n\t//gl_FragColor.rgb = czm_adjustColor(gl_FragColor.rgb);\n#endif\n var distanceToCenter = length(vOffset);\n var maxDistance = max(0.0, 0.5 - v_pixelDistance);\n var wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n gl_FragColor.a *= wholeAlpha;\n\tif(gl_FragColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n// #ifdef CLIP\n// gl_FragColor *= czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n// #endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n\n#ifdef PREPASS\n // 相机坐标系坐标\n gl_FragData0 = vec4<f32>(0.0, 0.0, 0.0, 1.0);\n // 相机坐标系法线\n gl_FragData1 = vec4<f32>(0.0, 0.0, 1.0, 1.0);\n // 反射率\n gl_FragData2 = vec4<f32>(0.0, 0.0, 0.0, 1.0);\n#else\n //gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}",_0x801551=(_0x173346=!0,function(e,t){var i=_0x173346?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x173346=!1,i}),_0x2ad5c3=_0x801551(void 0,(function(){return _0x2ad5c3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ad5c3).search("(((.+)+)+)+$")})),_0x173346;_0x2ad5c3();var _0x19a31f="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <S3MVertexFactory>\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec2 fSelected;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvarying vec4 vIsFiltByID;\nvarying vec3 v_positionEC;\nvarying vec3 vNormalEC;\nvarying vec4 vPosition;\n\n#ifdef NORMAL_AND_DEPTH\n varying vec4 oriVertex;\n varying vec3 perVertexNormals;\n varying float depthInCamera;\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n varying float fSelectedForSilh;\n#endif\n \n#ifdef PBR_THEME\n varying float vPBRIndex;\n#endif\n\n#ifdef POINT\n varying float v_pixelDistance;\n#endif\n\n#ifdef COMPUTE_W_VALUE\n uniform float uHypHasColorByHeight;\n varying float wValue;\n#endif\n\n#include <calculatePolyTexCoord>\n#include <computeWValue>\n#include <getVertexByFlatten>\n#include <getFusionModePosition>\n#include <getUVMatrixDecl>\n#include <setAlphaByWValue>\n#include <getPBRParamFromTexture>\n#include <s3mComputeVaryings>\n#include <getNormalMatrix>\n#include <vertexLogDepthDecl>\n\nvoid main()\n{\n VertexFactoryIntermediates intermediates = getVertexFactoryIntermediates();\n vec4 vertexPos = intermediates.position;\n vec3 realNormal = intermediates.normal;\n vTexCoord.xy = intermediates.uv0.xy;\n vTexCoord.zw = intermediates.uv1.xy;\n vec4 vertexColor = intermediates.vertexColor;\n\n#ifdef FALTTEN\n vertexPos = getVertexByFlatten(vertexPos, uTranslationAndBottom.w);\n#endif\n\n vec4 localPos = uGeoMatrix * vertexPos;\n vec4 oriLocalPos = localPos;\n float oriVertexW = computeWValue(localPos);\n #ifdef MultiTemporalWeight\n vertexPos.z += localPos.z - oriLocalPos.z;\n #endif\n vertexPos.w = 1.0;\n\n#ifdef REPLACE_COLOR_TYPE\n vertexColor = uFillForeColor;\n#else\n vertexColor *= uFillForeColor;\n#endif\n vIsFiltByID = vec4(0.0);\n#ifdef BatchTable\n float batchTableID = intermediates.batchTableID;\n vSecondColor = czm_batchTable_pickColor(batchTableID);\n vec4 operationType = czm_batchTable_operation(batchTableID);\n vec4 objsColor = czm_batchTable_color(batchTableID);\n vec3 translate = uTranslationAndBottom.xyz;\n #ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(batchTableID).x + 0.1;\n #endif\n #ifdef Translation\n translate = czm_batchTable_translate(batchTableID);\n #endif\n #ifdef SILHOUETTE_SELECT_TYPE\n fSelectedForSilh = 0.0;\n czm_s3mBatchOperation(operationType, objsColor, vertexColor, vertexPos, vIsFiltByID, translate, fSelectedForSilh);\n #endif\n #ifndef SILHOUETTE_SELECT_TYPE\n fSelected = vec2(0.0);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor, vertexPos, vIsFiltByID, translate, fSelected);\n #endif\n#endif // BatchTable\n vColor = vertexColor;\n vPositionMC.xyz = vertexPos.xyz;\n vPositionMC.w = 0.0;\n vPosition = uViewProjection * uModelMatrix * vertexPos;\n#ifdef FusionMode\n gl_Position = getFusionModePosition(vertexPos);\n#else\n gl_Position = vPosition;\n#endif\n#ifdef COMPUTE_TEXCOORD\n #ifdef TextureBatch\n vec4 xywh = czm_batchTable_xywh_BaseTex(getTextureBatchId0(aTextureBatchId));\n vec4 xywh2 = vec4(0.0);\n #ifdef MULTI_TEX\n xywh2 = czm_batchTable_xywh_BakeTex(getTextureBatchId1(aTextureBatchId));\n #endif\n getUVMatrixForBatch(xywh, xywh2);\n #else\n getUVMatrix(intermediates.uv0, intermediates.uv1);\n #endif\n#endif // COMPUTE_TEXCOORD \n vec4 ec = (uView * uModelMatrix * vertexPos);\n v_positionEC = (ec / ec.w).xyz;\n vNormalEC = vec3(0.0);\n#ifdef HAS_LIGHT\n #ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n vPositionMC.w = 1.0;\n mat3 normalMatrix = getNormalMatrix(uView, uModelMatrix);\n #ifdef Instance\n vNormalEC = normalMatrix * intermediates.normalInstance;\n #else\n vNormalEC = normalMatrix * realNormal;\n #endif\n }\n #endif\n#endif\n#ifdef NORMAL_AND_DEPTH\n oriVertex = vertexPos;\n vec4 position = uView * vertexPos;\n depthInCamera = (position.z - czm_depthRange.near) / (czm_depthRange.far - czm_depthRange.near);\n perVertexNormals = vec3(0.0,0.0,0.0);\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n perVertexNormals = normalize(mat3(uView * uModelMatrix) * realNormal);\n }\n#endif\n#endif\n#ifdef W_VISIBLE\n setAlphaByWValue(oriVertexW, vColor);\n#endif\n\n#ifdef VERTEX_CAPTURE\n vSecondColor = uView * uModelMatrix * vertexPos;\n gl_PointSize = 12.0;\n#endif\n\n#ifdef POINT\n #ifndef WEBGPU\n gl_PointSize = uPointSize;\n #endif\n v_pixelDistance = 2.0 / uPointSize;\n#endif\n\n#ifdef USE_BatchPBR\n getPBRParamFromTexture(intermediates.pbrTextureUV.xy);\n#endif\n\n s3mComputeVaryings(vertexPos);\n \n vertexLogDepth();\n}",_0x3675e4=(_0x1e595b=!0,function(e,t){var i=_0x1e595b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e595b=!1,i}),_0x5edb9d=_0x3675e4(void 0,(function(){return _0x5edb9d.toString().search("(((.+)+)+)+$").toString().constructor(_0x5edb9d).search("(((.+)+)+)+$")})),_0x1e595b;_0x5edb9d();var _0x2b6657="#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n#endif\n#ifdef PREPASS\n#extension GL_EXT_draw_buffers : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <S3MVolumeUboDecl>\n#include <LightUboDecl>\n\nvarying vec4 vIsFiltByID;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvarying vec3 v_positionEC;\nvarying vec4 vSecondColor;\nvarying vec3 vNormalEC;\n \n#ifdef COMPUTE_W_VALUE\n varying float wValue;\n#endif\n\n#if defined(REPLACE_SELECT_TYPE) || defined(REPLACE_COLOR_TYPE)\n varying vec2 fSelected;\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n varying float fSelectedForSilh;\n#endif\n\n#ifdef SKETCH_MODE\n uniform vec4 uLineColor;\n uniform float uLineWidth;\n#endif\n\n#ifdef Height_Map\nvec4 renderHeightMap()\n{\n return czm_packValue(wValue);\n}\n#endif\n\n#include <SRGBtoLINEAR>\n#include <renderNormal>\n#include <renderNormalAndDepth>\n#include <renderPrePass>\n#include <preClipFS>\n#include <calcTexCoordDecl>\n#include <getTextureColorDecl>\n\n#ifdef SHADOW_MAP\n #include <ShadowUboDecl>\n #include <shadowReceive>\n#endif\n\n#ifdef HAS_LIGHT\n #include <shaderModelBase>\n #ifdef BRDF\n #include <brdf>\n #else\n #include <blinnPhong>\n #endif\n#endif\n\n#include <S3MOperationFSDecl>\n#include <HypSometric>\n#include <getEmissiveTextureAtlasColor>\n#include <adjustColor>\n#include <clip>\n#include <sketchMode>\n#include <writeLogDepthDecl>\n\nvec4 shaderModel(vec4 baseColor, vec4 realTexCoord, vec2 oriTexCoord)\n{\n#ifndef HAS_LIGHT\n return vec4(LINEARtoSRGB(baseColor.rgb), baseColor.a);\n#else\n #ifdef BRDF\n return brdf(baseColor, realTexCoord.xy, oriTexCoord, v_positionEC, vPositionMC.xyz, vNormalEC, uModelMatrix);\n #else\n return blinnPhong(baseColor, realTexCoord.xy, oriTexCoord, v_positionEC, vPositionMC.xyz, vNormalEC, uModelMatrix);\n #endif\n#endif\n \n}\n\nvec4 renderColor()\n{\n preClip();\n vec4 realTexCoord = vec4(0.0);\n vec2 oriTexCoord = vec2(0.0);\n vec4 baseColor = vColor;\n vec4 baseTexColor = vec4(1.0);\n vec4 finalColor;\n#ifdef Has_Texture\n baseTexColor = getTextureColorForS3M(realTexCoord);\n#endif\n\n baseColor *= baseTexColor * uDiffuseColor;\n vec2 texCoord = vec2(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n\n finalColor = shaderModel(baseColor, realTexCoord, texCoord); \n\n#ifdef ADJUST_COLOR\n finalColor.rgb = adjustColor(finalColor.rgb);\n#endif\n\n#ifdef REPLACE_COLOR_TYPE\n if(fSelected.y > 0.9)\n {\n finalColor = vColor;\n }\n#endif\n\n#ifdef REPLACE_SELECT_TYPE\n if(fSelected.x > 0.9)\n {\n finalColor = vColor;\n }\n#endif\n\n#ifdef HYPSOMETRIC\n\tif(uHypsometricVisible>0.5)\n\t{\n #ifdef Volume2\n vec4 volColor = texture2D(uVolumeTexture, vec2(vTexCoord.x, 1.0 - vTexCoord.y));\n finalColor = getHypsometricColor(finalColor, volColor);\n #else\n finalColor = getHypsometricColor(finalColor, wValue);\n #endif\n }\n#endif\n\n#ifdef VISIBLEDISTANCEMAX\n getAlphaByDistance(v_positionEC, finalColor);\n#endif\n\n#ifdef OVERLAY\n getOverlayColor(finalColor);\n#endif\n\n#ifdef HORIZONTAL_LINE\n finalColor = getHorizontalColor(finalColor, wValue);\n#endif\n\n#ifdef IMAGERY\n getImageryColor(finalColor);\n#endif\n\n#ifdef FLOOD_ANALYSIS\n getFloodWaterColor(finalColor);\n#endif\n\n#ifdef TRANSPARENT_BACK_COLOR\n transparentColorClip(finalColor);\n#endif\n\n#ifdef SKETCH_MODE\n finalColor = sketchMode(finalColor, uLineColor, uLineWidth);\n#endif // SKETCH_MODE\n\n#ifdef CLIP\n #ifdef CLIP_FILT_BY_ID\n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n #else\n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n #endif\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n if(uSelectColorType == 2.)\n {\n if(fSelectedForSilh > 0.9)\n {\n finalColor = sketchMode(finalColor, uSelColor, 3.0);\n }\n }\n else\n {\n finalColor = sketchMode(finalColor, uSelColor, 3.0);\n }\n#endif // SILHOUETTE_SELECT_TYPE\n\n#ifdef Only_LineColor\n finalColor = uLineColor;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n #ifdef TexCoord\n finalColor.rgb += getEmissiveTextureAtlasColor(wValue, vTexCoord.xy);\n #else\n finalColor.rgb += getEmissiveTextureAtlasColor(wValue);\n #endif\n#else\n finalColor.rgb *= uEmissionColor.rgb;\n#endif\n\n if(finalColor.a == 0.0)\n {\n discard;\n }\n return finalColor;\n}\nvoid main()\n{\n#ifdef Height_Map \n gl_FragColor = renderHeightMap();\n return;\n#endif\n#ifdef NORMAL\n gl_FragColor = renderNormal(vPositionMC.xyz);\n return;\n#endif\n#ifdef NORMAL_AND_DEPTH\n gl_FragColor = renderNormalAndDepth(vPositionMC.xyz);\n return;\n#endif\n\n#ifdef PREPASS\n vec2 texCoord = vec2(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n float roughness = getRoughness(texCoord);\n renderPrePass(roughness);\n#else\n gl_FragColor = renderColor();\n#endif\n#ifdef LOG_DEPTH\n writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}",_0x2e8fa3=(_0x445630=!0,function(e,t){var i=_0x445630?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x445630=!1,i}),_0x3321e5=_0x2e8fa3(void 0,(function(){return _0x3321e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3321e5).search("(((.+)+)+)+$")})),_0x445630;_0x3321e5();var _0x46f3da="\n\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\n#ifdef USE_VertexWeight\n attribute aVertexWeight : f32;\n#endif\n\n#include <S3MVertexFactory>\n\nvarying vSecondColor : vec4<f32>;\nvarying vTexCoord : vec4<f32>;\nvarying fSelected : f32;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vIsFiltByID : vec4<f32>;\nvarying v_positionEC : vec3<f32>;\nvarying vNormalEC : vec3<f32>;\n#ifdef COMPUTE_W_VALUE\n varying wValue : f32;\n#endif\n#ifdef W_VISIBLE\n #include <setAlphaByWValue>\n#endif\n#ifdef NORMAL_AND_DEPTH\n varying oriVertex : vec4<f32>;\n varying perVertexNormals : vec3<f32>;\n#endif\n#ifdef SILHOUETTE_SELECT_TYPE\n varying fSelectedForSilh : f32;\n#endif\n#include <calculatePolyTexCoord>\n#include <getUVMatrixDecl>\n#include <computeWValue>\n#include <getVertexByFlatten>\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs {\n var intermediates = GetVertexFactoryIntermediates();\n var vertexPos = intermediates.position;\n var realNormal = intermediates.normal;\n vTexCoord = vec4<f32>(intermediates.uv0.x, intermediates.uv0.y, intermediates.uv1.x, intermediates.uv1.y);\n\n var vertexColor = intermediates.vertexColor;\n\n#ifdef FALTTEN\n vertexPos = getVertexByFlatten(vertexPos, Layer.uTranslationAndBottom.w);\n#endif\n\n var localPos = Mesh.uGeoMatrix * vertexPos;\n var oriLocalPos = localPos;\n var oriVertexW = computeWValue(&localPos);\n\n vertexPos.w = 1.0f;\n\n var oldVertexColor = vertexColor;\n vertexColor = oldVertexColor * Layer.uFillForeColor;\n vIsFiltByID = vec4<f32>(0.0f);\n\n#ifdef BatchTable\n var batchTableID = intermediates.batchTableID;\n vSecondColor = czm_batchTable_pickColor(batchTableID);\n var operationType = czm_batchTable_operation(batchTableID);\n var objsColor = czm_batchTable_color(batchTableID);\n var translate = Layer.uTranslationAndBottom.xyz;\n #ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(batchTableID).x + 0.1f;\n #endif\n #ifdef Translation\n translate = czm_batchTable_translate(batchTableID);\n #endif\n var outIsFiltByID = vIsFiltByID;\n var outSelected = fSelected;\n #ifdef SILHOUETTE_SELECT_TYPE\n var outFSelectedForSilh = fSelectedForSilh;\n fSelectedForSilh = 0.0;\n czm_s3mBatchOperationForSilhouette(operationType, objsColor, &vertexColor, &vertexPos, &outIsFiltByID, translate, &outFSelectedForSilh);\n fSelectedForSilh = outFSelectedForSilh;\n #endif\n #ifndef SILHOUETTE_SELECT_TYPE\n fSelected = 0.0f;\n czm_s3mBatchOperation(operationType, objsColor, Layer.uSelColor, translate, &vertexColor, &vertexPos, &outIsFiltByID, &outSelected);\n vIsFiltByID = outIsFiltByID;\n fSelected = outSelected;\n #endif\n#endif // BatchTable\n#ifdef NORMAL_AND_DEPTH\n oriVertex = vertexPos;\n var position : vec4<f32> = Scene.uView * vertexPos;\n perVertexNormals = vec3<f32>(0.0,0.0,0.0);\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n var modelViewMat4 = Scene.uView * Mesh.uModelMatrix;\n var modelViewMat3 = mat3x3<f32>(modelViewMat4[0][0], modelViewMat4[1][0], modelViewMat4[2][0], modelViewMat4[0][1], modelViewMat4[1][1], modelViewMat4[2][1], modelViewMat4[0][2], modelViewMat4[1][2], modelViewMat4[2][2]);\n perVertexNormals = normalize(modelViewMat3 * realNormal);\n }\n#endif\n#endif\n#ifdef W_VISIBLE\n setAlphaByWValue(oriVertexW, &vertexColor);\n#endif\n\n vColor = vertexColor;\n vPositionMC = vec4<f32>(vertexPos.xyz, 1.0f);\n\n gl_Position = Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n#ifdef COMPUTE_TEXCOORD\n #ifdef TextureBatch\n var xywh = czm_batchTable_xywh_BaseTex(getTextureBatchId0(aTextureBatchId));\n var xywh2 = vec4(0.0);\n #ifdef MULTI_TEX\n xywh2 = czm_batchTable_xywh_BakeTex(getTextureBatchId1(aTextureBatchId));\n #endif\n getUVMatrixForBatch(xywh, xywh2);\n #else\n getUVMatrix(intermediates.uv0, intermediates.uv1);\n #endif\n#endif // COMPUTE_TEXCOORD\n var ec = (Scene.uView * Mesh.uModelMatrix * vertexPos);\n v_positionEC = (ec / ec.w).xyz;\n vNormalEC = vec3(0.0);\n#ifdef HAS_LIGHT\n #ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n vPositionMC.w = 1.0;\n var normalMatrix = czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix);\n #ifdef Instance\n vNormalEC = normalMatrix * intermediates.normalInstance;\n #else\n vNormalEC = normalMatrix * realNormal;\n #endif\n }\n #endif\n#endif\n\n#ifdef USE_BatchPBR\n czm_getPBRParamFromTexture(intermediates.pbrTextureUV);\n#endif\n\n czm_s3mComputeVaryings(vertexPos);\n \n czm_vertexLogDepth();\n}",_0x29f0c2=(_0x20a3b2=!0,function(e,t){var i=_0x20a3b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x20a3b2=!1,i}),_0x5ddcf6=_0x29f0c2(void 0,(function(){return _0x5ddcf6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ddcf6).search("(((.+)+)+)+$")})),_0x20a3b2;_0x5ddcf6();var _0x2288cf="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <LightUBODecl>\n\nvarying vSecondColor : vec4<f32>;\nvarying vTexCoord : vec4<f32>;\nvarying fSelected : f32;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vIsFiltByID : vec4<f32>;\nvarying v_positionEC : vec3<f32>;\nvarying vNormalEC : vec3<f32>;\nvarying vOffset : vec2<f32>;\n#include <preClipFS>\n\n#ifdef HAS_LIGHT\n #include <shaderModelBase>\n #ifdef BRDF\n #include <brdf>\n #else\n #include <blinnPhong>\n #endif\n#endif\n\nfn shaderModel(baseColor : vec4<f32>, realTexCoord : vec4<f32>) -> vec4<f32>\n{\n#ifndef HAS_LIGHT\n return baseColor;\n#else\n #ifdef BRDF\n return brdf(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #else\n return blinnPhong(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #endif\n#endif\n}\n\n#include <getTextureColorDecl>\n\nfn renderColor() -> vec4<f32> {\n \n var realTexCoord = vec4<f32>(0.0);\n var baseColor = vColor;\n var baseTexColor = vec4<f32>(1.0);\n var finalColor = vec4<f32>(1.0);\n#ifdef COMPUTE_TEXCOORD\n var firstColor = vec4<f32>(1.0);\n var secColor = vec4<f32>(1.0);\n baseTexColor = getTextureColorForS3M(&(realTexCoord), &(firstColor), &(secColor));\n#endif\n baseColor *= baseTexColor;\n baseColor *= Material.uDiffuseColor;\n finalColor = shaderModel(baseColor, realTexCoord);\n\n preClip();\n\n#ifdef CLIP\n #ifdef CLIP_FILT_BY_ID\n finalColor *= czm_clip(Scene.uView * Mesh.uModelMatrix * vec4<f32>(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n #else\n finalColor *= czm_clip(Scene.uView * Mesh.uModelMatrix * vec4<f32>(vPositionMC.xyz, 1.0), 1.0);\n #endif // CLIP_FILT_BY_ID\n#endif // CLIP\n\n if(vColor.a == 0.0)\n {\n discard;\n }\n\n var disFromCenter = length(vOffset);\n if(disFromCenter > 0.5){\n discard;\n }\n return finalColor;\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n#ifdef PREPASS\n var texCoord = vec2<f32>(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n var reflectivity = 0.0;\n // 相机坐标系坐标\n gl_FragData0 = vec4<f32>(v_positionEC, 1.0);\n // 相机坐标系法线\n gl_FragData1 = vec4<f32>(0.0, 0.0, 1.0, 1.0);\n // 反射率\n gl_FragData2 = vec4<f32>(reflectivity, reflectivity, reflectivity, 1.0);\n#else\n gl_FragColor = renderColor();\n#endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}",_0x23e749=(_0xacb428=!0,function(e,t){var i=_0xacb428?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xacb428=!1,i}),_0x4fa6d3=_0x23e749(void 0,(function(){return _0x4fa6d3.toString().search("(((.+)+)+)+$").toString().constructor(_0x4fa6d3).search("(((.+)+)+)+$")})),_0xacb428;_0x4fa6d3();var _0x519466="\n\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\n#ifdef USE_VertexWeight\n attribute aVertexWeight : f32;\n#endif\n\n#include <S3MVertexFactory>\n\nattribute offset:vec2<f32>;\nvarying vSecondColor : vec4<f32>;\nvarying vTexCoord : vec4<f32>;\nvarying fSelected : f32;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vIsFiltByID : vec4<f32>;\nvarying v_positionEC : vec3<f32>;\nvarying vNormalEC : vec3<f32>;\nvarying vOffset : vec2<f32>;\n\n#include <getUVMatrixDecl>\n#include <getMetersPerPixel>\n\n//计算偏移\nfn addScreenSpaceOffset(positionWC : vec4<f32>, offset : vec2<f32>) -> vec4<f32>\n{\n var result = positionWC;\n var width=vec2<f32>(Layer.uPointSize);\n var halfsize:vec2<f32>=width*0.5;\n halfsize*=offset*2.0;\n halfsize*=getMetersPerPixel(positionWC,Scene.uPixelRatio);\n result.x=positionWC.x+halfsize.x;\n result.y=positionWC.y+halfsize.y;\n return result;\n}\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs {\n var intermediates = GetVertexFactoryIntermediates();\n var vertexPos = intermediates.position;\n var realNormal = intermediates.normal;\n vTexCoord = vec4<f32>(intermediates.uv0.x, intermediates.uv0.y, intermediates.uv1.x, intermediates.uv1.y);\n vOffset = offset;\n \n var vertexColor = intermediates.vertexColor;\n vertexPos.w = 1.0f;\n\n var oldVertexColor = vertexColor;\n vertexColor = oldVertexColor * Layer.uFillForeColor;\n vIsFiltByID = vec4<f32>(0.0f);\n\n#ifdef BatchTable\n var batchTableID = intermediates.batchTableID;\n vSecondColor = czm_batchTable_pickColor(batchTableID);\n var operationType = czm_batchTable_operation(batchTableID);\n var objsColor = czm_batchTable_color(batchTableID);\n var translate = Layer.uTranslationAndBottom.xyz;\n #ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(batchTableID).x + 0.1f;\n #endif\n #ifdef Translation\n translate = czm_batchTable_translate(batchTableID);\n #endif\n fSelected = 0.0f;\n var outIsFiltByID = vIsFiltByID;\n var outSelected = fSelected;\n czm_s3mBatchOperation(operationType, objsColor, Layer.uSelColor, translate, &vertexColor, &vertexPos, &outIsFiltByID, &outSelected);\n vIsFiltByID = outIsFiltByID;\n fSelected = outSelected;\n#endif // BatchTable\n\n //vColor = vertexColor;\n vColor = vertexColor;\n fSelected = 0.0f;\n //point\n var positionEC= Scene.uView * Mesh.uModelMatrix *vertexPos;\n positionEC=addScreenSpaceOffset(positionEC,offset);\n vPositionMC = vec4<f32>(positionEC.xyz, 1.0f);//positionMC不能一致,否者计算法向量返回为0,导致颜色为黑色\n var originPos=Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n gl_Position=Scene.uProjection * positionEC;\n#ifdef COMPUTE_TEXCOORD\n getUVMatrix(intermediates.uv0, intermediates.uv1);\n#endif // COMPUTE_TEXCOORD\n var ec = (Scene.uView * Mesh.uModelMatrix * vertexPos);\n v_positionEC = (ec / ec.w).xyz;\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n vNormalEC = czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * realNormal;\n }\n#endif\n\n#ifdef USE_BatchPBR\n czm_getPBRParamFromTexture(intermediates.pbrTextureUV);\n#endif\n\n czm_s3mComputeVaryings(vertexPos);\n \n czm_vertexLogDepth();\n}",_0x3618ae=(_0x5ea7ca=!0,function(e,t){var i=_0x5ea7ca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ea7ca=!1,i}),_0x192abf=_0x3618ae(void 0,(function(){return _0x192abf.toString().search("(((.+)+)+)+$").toString().constructor(_0x192abf).search("(((.+)+)+)+$")})),_0x5ea7ca;_0x192abf();var _0x1084eb="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <LightUBODecl>\n#ifdef Volume\n#include <S3MVolumeUboDecl>\n#endif\n\nvarying vSecondColor : vec4<f32>;\nvarying vTexCoord : vec4<f32>;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vIsFiltByID : vec4<f32>;\nvarying v_positionEC : vec3<f32>;\nvarying vNormalEC : vec3<f32>;\n#ifdef COMPUTE_W_VALUE\n varying wValue : f32;\n#endif\n\n#if defined(REPLACE_SELECT_TYPE) || defined(REPLACE_COLOR_TYPE)\n varying fSelected : f32;\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n varying fSelectedForSilh : f32;\n #include <sketchMode>\n#endif\n\n#include <S3MOperationFSDecl>\n#include <HypSometric>\n#include <preClipFS>\n#include <clip>\n#include <renderNormal>\n#include <renderNormalAndDepth>\n\n#ifdef SHADOW_MAP\n #include <ShadowUboDecl>\n #include <shadowReceive>\n#endif\n\n#ifdef HAS_LIGHT\n #include <shaderModelBase>\n #ifdef BRDF\n #include <brdf>\n #else\n #include <blinnPhong>\n #endif\n#else\nfn sRGBToLinear(srgbIn : vec4<f32>) -> vec4<f32> {\n var linearOut = pow(vec3<f32>(srgbIn.x, srgbIn.y, srgbIn.z), vec3<f32>(2.200000048f, 2.200000048f, 2.200000048f));\n return vec4<f32>(linearOut.x, linearOut.y, linearOut.z, srgbIn.w);\n}\n\nfn LINEARtoSRGB(linearIn : vec3<f32>) -> vec3<f32>\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\n\n#endif\n\nfn shaderModel(baseColor : vec4<f32>, realTexCoord : vec4<f32>) -> vec4<f32>\n{\n#ifndef HAS_LIGHT\n return vec4(LINEARtoSRGB(baseColor.rgb), baseColor.a);\n#else\n #ifdef BRDF\n return brdf(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #else\n return blinnPhong(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #endif\n#endif\n}\n\n#include <calcTexCoordDecl>\n#include <getTextureColorDecl>\n#include <getEmissiveTextureAtlasColor>\n#include <adjustColor>\n\nfn renderColor() -> vec4<f32> {\n \n var realTexCoord = vec4<f32>(0.0);\n var baseColor = vColor;\n var baseTexColor = vec4<f32>(1.0);\n var finalColor = vec4<f32>(1.0);\n#ifdef Has_Texture\n var firstColor = vec4<f32>(1.0);\n var secColor = vec4<f32>(1.0);\n baseTexColor = getTextureColorForS3M(&(realTexCoord), &(firstColor), &(secColor));\n #if !defined(INVALID_OBLIQUE) && !defined(NO_TEXCOORD)\n #ifndef TextureBatch\n if(vTexMatrix.z < 0.0){\n baseTexColor = vec4<f32>(1.0);\n }\n #endif\n #endif\n#endif\n baseColor *= baseTexColor;\n baseColor *= Material.uDiffuseColor;\n finalColor = shaderModel(baseColor, realTexCoord);\n\n preClip();\n#ifdef ADJUST_COLOR\n finalColor.r = adjustColor(finalColor.rgb).r;\n finalColor.g = adjustColor(finalColor.rgb).g;\n finalColor.b = adjustColor(finalColor.rgb).b;\n#endif\n\n\n#ifdef CLIP\n #ifdef CLIP_FILT_BY_ID\n var clipResult = clip(Scene.uView * Mesh.uModelMatrix * vec4<f32>(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n #else\n var clipResult = clip(Scene.uView * Mesh.uModelMatrix * vec4<f32>(vPositionMC.xyz, 1.0), 1.0);\n #endif // CLIP_FILT_BY_ID\n if(clipResult < -0.5){\n discard;\n }\n#endif // CLIP\n\n#ifdef SILHOUETTE_SELECT_TYPE\n var sketchModeColor = sketchMode(finalColor, Layer.uSelColor, 3.0);\n if(Layer.uSelectColorType == 2.0)\n {\n if(fSelectedForSilh > 0.9)\n {\n finalColor = sketchModeColor;\n }\n }\n else\n {\n finalColor = sketchModeColor;\n }\n#endif // SILHOUETTE_SELECT_TYPE\n\n#ifdef EMISSION_TEXTURE_ATLAS\n finalColor.r += getEmissiveTextureAtlasColor(wValue).r;\n finalColor.g += getEmissiveTextureAtlasColor(wValue).g;\n finalColor.b += getEmissiveTextureAtlasColor(wValue).b;\n#else\n finalColor.r *= Layer.uEmissionColor.r;\n finalColor.g *= Layer.uEmissionColor.g;\n finalColor.b *= Layer.uEmissionColor.b;\n#endif\n\n#ifdef HYPSOMETRIC\n\tif(Layer.uHypsometricVisible > 0.5)\n\t{\n #ifdef Volume2\n var volColor = textureSample(uVolumeTexture, uVolumeTextureSampler, vec2(vTexCoord.x, 1.0 - vTexCoord.y));\n finalColor = getHypsometricColor(finalColor, volColor);\n #else\n finalColor = getHypsometricColor(finalColor, wValue);\n #endif\n }\n#endif\n\n#ifdef OVERLAY\n getOverlayColor(&finalColor);\n#endif\n\n#ifdef IMAGERY\n getImageryColor(&finalColor);\n#endif\n\n if(finalColor.a == 0.0)\n {\n discard;\n }\n\n return finalColor;\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n\n#ifdef PREPASS\n var texCoord = vec2<f32>(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n var roughness = getRoughness(texCoord);\n var reflectivity = 1.0 - roughness;\n var normalEC = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(vPositionMC.xyz));\n // 相机坐标系坐标\n gl_FragData0 = vec4<f32>(v_positionEC, 1.0);\n // 相机坐标系法线\n gl_FragData1 = vec4<f32>(normalEC, 1.0);\n // 反射率\n gl_FragData2 = vec4<f32>(reflectivity, reflectivity, reflectivity, 1.0);\n#else\n gl_FragColor = renderColor();\n#endif\n#ifdef NORMAL\n gl_FragColor = renderNormal(vPositionMC.xyz);\n#endif\n#ifdef NORMAL_AND_DEPTH\n gl_FragColor = renderNormalAndDepth(vPositionMC.xyz);\n#endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}",_0x11b8b4=(_0x57b6fe=!0,function(e,t){var i=_0x57b6fe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57b6fe=!1,i}),_0x4296ea=_0x11b8b4(void 0,(function(){return _0x4296ea.toString().search("(((.+)+)+)+$").toString().constructor(_0x4296ea).search("(((.+)+)+)+$")})),_0x57b6fe;_0x4296ea();var _0x370b02="\n#include <SceneUboDecl> \n#include <LayerUboDecl> \n#include <MeshUboDecl>\nattribute vec4 aPosition; \n#ifdef TexCoord \n varying vec4 vTexCoord; \n#endif \n\n#ifdef VertexColor\n\t#ifdef WEBGPU\n\t attribute uvec4 aColor;\n\t#else\n\t attribute vec4 aColor;\n\t#endif\n#endif\n\n#ifdef BatchTable \nattribute float batchId; \n#endif \nvarying vec4 vSecondColor; \n#ifdef REPLACE_SELECT_TYPE \nvarying float fSelected; \n#endif \n#ifdef COMPRESS_VERTEX \n uniform vec4 decode_position_min; \n uniform float decode_position_normConstant; \n#endif \nvarying vec4 vColor; \nvoid main() \n{ \n#ifdef COMPRESS_VERTEX \n vec4 vertexPos = vec4(1.0); \n vertexPos = decode_position_min + aPosition * decode_position_normConstant; \n#else \n vec4 vertexPos = aPosition; \n#endif \n#ifdef TexCoord \n vTexCoord.xy = vertexPos.xy * textureRepeat; \n#endif \n vertexPos.w = 1.0; \n vec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n vertexColor = aColor; \n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif\n#endif \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n vec4 operationType = czm_batchTable_operation(batchId); \n vec4 objsColor = czm_batchTable_color(batchId); \n#ifdef REPLACE_SELECT_TYPE \n fSelected = 0.0; \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor, fSelected); \n#else \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor); \n#endif \n#endif \n vColor = vertexColor*uFillForeColor; \n gl_Position = uViewProjection * uModelMatrix * vertexPos;\n}",_0x4204fb=(_0x4b806c=!0,function(e,t){var i=_0x4b806c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4b806c=!1,i}),_0x6cf653=_0x4204fb(void 0,(function(){return _0x6cf653.toString().search("(((.+)+)+)+$").toString().constructor(_0x6cf653).search("(((.+)+)+)+$")})),_0x4b806c;_0x6cf653();var _0x21bee4="\n#include <LayerUboDecl>\n#ifdef TexCoord \n uniform sampler2D uTexture; \n varying vec4 vTexCoord; \n#endif \n varying vec4 vColor; \n varying vec4 vSecondColor; \n#ifdef REPLACE_SELECT_TYPE \n varying float fSelected; \n#endif \nvoid main() \n{ \n\tif(vColor.a == 0.0) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef TexCoord \n vec4 texColor = texture2D(uTexture, vTexCoord.xy); \n gl_FragColor = texColor * vColor; \n#else \n gl_FragColor = vColor;\n#endif \n#ifdef REPLACE_SELECT_TYPE \n if(fSelected > 0.9) \n { \n gl_FragColor = vColor; \n } \n#endif \n\tif(gl_FragColor.a == 0.0) \n\t{ \n\t\tdiscard; \n\t}\n}",_0x2b1b26=(_0xf62779=!0,function(e,t){var i=_0xf62779?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf62779=!1,i}),_0x1058ec=_0x2b1b26(void 0,(function(){return _0x1058ec.toString().search("(((.+)+)+)+$").toString().constructor(_0x1058ec).search("(((.+)+)+)+$")})),_0xf62779;_0x1058ec();var _0x21a0db="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\nattribute vec3 aPosition;\n#ifdef HAS_NORMAL \nattribute vec3 aNormal;\n#endif \nattribute vec4 aTexCoord0;\n\n#ifdef TexCoord2 \nattribute vec4 aTexCoord1;\n#endif \n \n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n#ifdef BatchTable \nattribute float batchId; \n#endif \n \nvarying vec4 vColor; \nvarying vec4 vSecondColor; \nvarying vec4 vTexCoord; \nvarying vec4 clip_vertex; \n \nfloat computerOnePixelLength() \n{ \n\tvec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0); \n\tviewPos.xyz *= 0.9; \n\tvec4 winPos = uProjection * viewPos; \n\tfloat dwidth = czm_metersPerPixel(viewPos); \n\t#ifdef EYE_DISTANCE_SCALING \n\t dwidth = 1.0; \n\t#endif \n\twinPos.x = winPos.x - 2.0 * dwidth; \n\tvec4 newViewPos = uInverseProjection * winPos; \n\treturn length(viewPos - newViewPos); \n} \n \nvec4 computePos(vec3 v3Normal) \n{ \n vec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0); \n\tviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength(); \n\tviewPos.xyz = viewPos.xyz * 0.9; \n\tclip_vertex = viewPos; \n\tvec4 pos = czm_projection * viewPos; \n\treturn pos; \n} \n \nvoid main() \n{ \n vTexCoord.xy = aTexCoord0.xy; \n vec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif \n#endif \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n vec4 operationType = czm_batchTable_operation(batchId); \n vec4 objsColor = czm_batchTable_color(batchId); \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor); \n#endif \n vColor = vertexColor * uDiffuseColor; \n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz); \n#else \n\n#ifdef TexCoord2 \n vTexCoord.zw = aTexCoord1.xy;\n#endif \n \n #ifdef HAS_NORMAL \n \tgl_Position = computePos(aNormal);\n #else\n gl_Position = computePos(aTexCoord1.xyz);\n #endif\n#endif \n}",_0x2cfc74=(_0x1fd55e=!0,function(e,t){var i=_0x1fd55e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fd55e=!1,i}),_0x30a719=_0x2cfc74(void 0,(function(){return _0x30a719.toString().search("(((.+)+)+)+$").toString().constructor(_0x30a719).search("(((.+)+)+)+$")})),_0x1fd55e;_0x30a719();var _0x5b6bf2="attribute vec3 aPosition;\n\n#ifndef ICON\nattribute vec3 aNormal;\n#endif\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\nattribute vec4 uv0;\n\n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\nuniform vec4 uSelColor;\nuniform vec4 uDiffuseColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nmat3 RotateZ(in float angle)\n{\n float sina = sin(angle);\n float cosa = cos(angle);\n mat3 rotMatrix = mat3(cosa, sina, 0, -sina, cosa, 0, 0, 0, 1);\n return rotMatrix;\n}\n\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n vec4 origViewPos = czm_view * vec4(0.0, 0.0, 0.0, 1.0);\n vec4 cameraViewPos = vec4(0.0, 0.0, 0.0, 1.0);\n vec4 fixedAxis = vec4(1.0);\n vec3 xAxis = vec3(1.0);\n vec3 yAxis = vec3(1.0);\n vec3 zAxis = vec3(1.0);\n vec4 cameraViewVector = vec4(1.0);\n if (czm_sceneMode != czm_sceneMode3D)\n {\n fixedAxis = czm_view * vec4(1.0, 0.0, 0.0, 1.0);\n fixedAxis = fixedAxis - origViewPos;\n zAxis = normalize(fixedAxis.xyz);\n cameraViewVector = viewPos - cameraViewPos;\n yAxis = normalize(cameraViewVector.xyz);\n xAxis = normalize(cross(yAxis, zAxis));\n yAxis = cross(zAxis, xAxis);\n }\n else\n {\n fixedAxis = viewPos - origViewPos;\n yAxis = normalize(fixedAxis.xyz);\n cameraViewVector = cameraViewPos - viewPos;\n zAxis = normalize(cameraViewVector.xyz);\n xAxis = normalize(cross(yAxis, zAxis));\n zAxis = cross(xAxis, yAxis);\n }\n mat3 matrix = mat3(xAxis, yAxis, zAxis) * RotateZ(aTexCoord0.z);\n vec3 offset = czm_sceneMode != czm_sceneMode3D ? v3Normal.xzy : v3Normal;\n offset = matrix * offset;\n\tviewPos.xyz = viewPos.xyz + offset;\n\tclip_vertex = viewPos;\n\tvec4 pos = czm_projection * viewPos;\n\treturn pos;\n}\n\nvoid main()\n{\n vTexCoord.xy = aTexCoord0.xy;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor * uDiffuseColor;\n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz);\n#else\n vTexCoord.zw = aTexCoord1.xy;\n gl_Position = computePos(aNormal);\n#endif\n}",_0x1cd0e7=(_0x4dbf71=!0,function(e,t){var i=_0x4dbf71?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4dbf71=!1,i}),_0x2fb033=_0x1cd0e7(void 0,(function(){return _0x2fb033.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fb033).search("(((.+)+)+)+$")})),_0x4dbf71;_0x2fb033();var _0x539845="\nattribute vec3 aPosition;\n#ifndef ICON\nattribute vec3 aNormal;\n#endif\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0);\n\tvec4 winPos = uProjection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = uInverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\n\nmat3 rotateZ(in float angle)\n{\n float sina = sin(angle);\n float cosa = cos(angle);\n mat3 rotMatrix = mat3(cosa, sina, 0.0, -sina, cosa, 0.0, 0.0, 0.0, 1.0);\n return rotMatrix;\n}\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0);\n vec4 origViewPos = uView * vec4(0.0, 0.0, 0.0, 1.0);\n vec4 fixedAxis = viewPos - origViewPos;\n vec3 zAxis = normalize(fixedAxis.xyz);\n vec4 upView = vec4(0.0, 1.0, 0.0, 1.0);\n upView = uView * upView;\n vec3 upViewVector = normalize(upView.xyz - origViewPos.xyz);\n vec3 xAxis = normalize(cross(upViewVector, zAxis));\n vec3 yAxis = cross(zAxis, xAxis);\n yAxis = normalize(yAxis);\n mat3 matrix = mat3(xAxis,yAxis,zAxis);\n vec3 offset = matrix * rotateZ(-czm_piOverFour * 3.0 + aTexCoord0.z) * v3Normal;\n\tviewPos.xyz = viewPos.xyz + offset * computerOnePixelLength();\n\tclip_vertex = viewPos;\n\tvec4 pos = uProjection * viewPos;\n\treturn pos;\n}\n\nvoid main()\n{\n vTexCoord.xy = aTexCoord0.xy;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor * uDiffuseColor;\n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz);\n#else\n vTexCoord.zw = aTexCoord1.xy;\n gl_Position = computePos(aNormal);\n#endif\n}\n",_0x1792ba=(_0x2cc6cd=!0,function(e,t){var i=_0x2cc6cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2cc6cd=!1,i}),_0x541f31=_0x1792ba(void 0,(function(){return _0x541f31.toString().search("(((.+)+)+)+$").toString().constructor(_0x541f31).search("(((.+)+)+)+$")})),_0x2cc6cd;_0x541f31();var _0x223db1="\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\nuniform sampler2D uTexture; \nuniform sampler2D uSecTexture; \n \nvarying vec4 vColor; \nvarying vec4 vTexCoord; \nvarying vec4 clip_vertex; \nvarying vec4 vSecondColor; \n#include <preClipFS>\n#include <clip>\n\nvoid main() \n{ \n preClip(); \n\tvec4 texColor = vec4(vColor.rgb, min(texture2D(uTexture, vTexCoord.xy).a, vColor.a)); \n\tvec4 haloTexColor = vec4(uAmbientColor.rgb, min(texture2D(uSecTexture, vTexCoord.zw).a, uAmbientColor.a)); \n\tif(texColor.a + haloTexColor.a < 0.2) \n\t{ \n\t\tdiscard; \n\t} \n\tvec3 v3Color = mix(haloTexColor.rgb, texColor.rgb, texColor.a + 0.2); \n\tgl_FragColor = vec4(v3Color.rgb, min(1.0, texColor.a + haloTexColor.a)); \n\tif(gl_FragColor.a < 0.1) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef CLIP \n\tgl_FragColor *= clip(clip_vertex, 1.0); \n#endif \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n}",_0x3e9fc0=(_0x16125f=!0,function(e,t){var i=_0x16125f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16125f=!1,i}),_0x461804=_0x3e9fc0(void 0,(function(){return _0x461804.toString().search("(((.+)+)+)+$").toString().constructor(_0x461804).search("(((.+)+)+)+$")})),_0x16125f;_0x461804();var _0x4da3bc="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nuniform sampler2D uTexture; \nvarying vec4 vColor; \nvarying vec4 vTexCoord; \nvarying vec4 clip_vertex; \nvarying vec4 vSecondColor; \n#include <preClipFS>\n#include <clip>\n \nvoid main() \n{ \n\tpreClip();\n\tvec4 texColor = texture2D(uTexture, vTexCoord.xy); \n#ifdef RGBTOBGR \n texColor = vec4(texColor.b, texColor.g, texColor.r, texColor.a); \n#endif \n\tgl_FragColor = vColor * texColor; \n\tif(gl_FragColor.a < 0.1) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef CLIP\n gl_FragColor *= clip(uView * uModelMatrix * vec4(clip_vertex.xyz, 1.0), 1.0); \n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n}",_0x16c46b=(_0x1d39f3=!0,function(e,t){var i=_0x1d39f3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d39f3=!1,i}),_0x16361d=_0x16c46b(void 0,(function(){return _0x16361d.toString().search("(((.+)+)+)+$").toString().constructor(_0x16361d).search("(((.+)+)+)+$")})),_0x1d39f3;_0x16361d();var _0x4c08bd="attribute vec4 aPosition;\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\n\nattribute vec4 aTexCoord2;\n\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nuniform float uLineWidth;\nuniform float uIsPicking;\nuniform vec4 uPickPosition;\nuniform mat4 uMatrixInvert;\nuniform vec4 uDiffuseColor;\nuniform vec4 uSelColor;\n#ifdef SELECTED\nvarying float fSelected;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nconst float SCREEN_VALUE = 1.0 / (2.0 * 1236.077);\n\nfloat ComputerLineWidth()\n{\n\tvec4 worldPos = czm_model * aPosition;\n\treturn uLineWidth * length(czm_viewerPositionWC - worldPos.xyz) * SCREEN_VALUE;\n}\n\nvoid main()\n{\n float shadowVolumeWidth = ComputerLineWidth();\n vec4 vertexPos = aPosition;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n if(uIsPicking > 0.0)\n {\n\t\tshadowVolumeWidth = shadowVolumeWidth * 3.0;\n\t\tvertexPos.xyz = vertexPos.xyz + aTexCoord2.xyz * shadowVolumeWidth + normalize(aTexCoord1.xyz) * uPickPosition.z;\n }\n else\n {\n\t\tvertexPos.xyz = vertexPos.xyz + aTexCoord2.xyz * shadowVolumeWidth + aTexCoord1.xyz;\n }\n vec4 v_Position = czm_modelViewProjection * vertexPos;\n vColor = vertexColor * uDiffuseColor;\n#ifdef SELECTED\n vColor = uSelColor;\n fSelected = aTexCoord0.x;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}",_0x204ec8=(_0x441e35=!0,function(e,t){var i=_0x441e35?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x441e35=!1,i}),_0x2423fb=_0x204ec8(void 0,(function(){return _0x2423fb.toString().search("(((.+)+)+)+$").toString().constructor(_0x2423fb).search("(((.+)+)+)+$")})),_0x441e35;_0x2423fb();var _0x3b4223="\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n\n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n\n#ifdef BatchTable\nattribute float batchId;\n#endif\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\nvarying vec2 v_inversePlaneExtents;\nvarying float fSelected;\n\nvoid ComputeBounds()\n{\n vec3 southWestCorner = (czm_modelView * vec4(uSouthWest, 1.0)).xyz;\n vec3 northWestCorner = czm_normal * uNorthDir + southWestCorner;\n vec3 southEastCorner = czm_normal * uEastDir + southWestCorner;\n vec3 eastWard = southEastCorner - southWestCorner;\n float eastExtent = length(eastWard);\n eastWard /= eastExtent;\n vec3 northWard = northWestCorner - southWestCorner;\n float northExtent = length(northWard);\n northWard /= northExtent;\n v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\n v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\n v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n}\nvoid main()\n{\n#ifdef HAS_TEXTURE\n ComputeBounds();\n#endif\n vec4 realPosition = aPosition;\n#ifdef COMPRESS_VERTEX\n realPosition = decode_position_min + aPosition * decode_position_normConstant;\n#endif\n vec3 vertexPos = realPosition.xyz;\n vec3 zDir = aTexCoord1.xyz;\n bool hasBaseHeight = false;\n if(length(realPosition) > 0.1){\n hasBaseHeight = true;\n }\n float topOrBottom = dot(zDir, vec3(0.0, 0.0, 1.0)) > 0.0 ? 1.0 : -1.0;\n vec3 upDir = zDir * topOrBottom;\n float fExtendHeight = 0.0;\n float minTerrainHeight = uMinMaxTerrainHeightAndPickInfo.x;\n float maxTerrainHeight = uMinMaxTerrainHeightAndPickInfo.y;\n float isPicking = uMinMaxTerrainHeightAndPickInfo.z;\n float pickPositionHeight = uMinMaxTerrainHeightAndPickInfo.w;\n if(isPicking > 0.0){\n // 顶点保存了高度,在拾取时在原始的顶点高度附近进行上下拉伸\n if(hasBaseHeight){\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, -50.0, 100.0);\n }\n else{\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, pickPositionHeight - 2.0, pickPositionHeight + 10.0);\n }\n }\n else{\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, minTerrainHeight, maxTerrainHeight);\n }\n vertexPos.xyz = realPosition.xyz + upDir * fExtendHeight;\n vec4 v_Position = uViewProjection * uModelMatrix * vec4(vertexPos, 1.0);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor \n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif \n#endif \nfSelected = 0.0;\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, vec4(1.0), vertexColor, fSelected);\n#endif\n#ifdef SELECTED\n vColor = uSelColor;\n#else\n vColor = vertexColor * uDiffuseColor * uFillForeColor;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}\n",_0xbb353=(_0xd86763=!0,function(e,t){var i=_0xd86763?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd86763=!1,i}),_0x4e154b=_0xbb353(void 0,(function(){return _0x4e154b.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e154b).search("(((.+)+)+)+$")})),_0xd86763;_0x4e154b();var _0x3410ec="attribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nuniform float uIsPicking;\nuniform mat4 uMatrixInvert;\nuniform vec4 uPickPosition;\nuniform vec4 uDiffuseColor;\nuniform vec4 uSelColor;\n#ifdef SELECTED\nvarying float fSelected;\n#endif\n\nvoid main()\n{\n vec3 vertexPos = aPosition;\n vertexPos.xyz = vertexPos.xyz + aTexCoord1.xyz;\n vec4 v_Position = czm_modelViewProjection * vec4(vertexPos, 1.0);\n if(uIsPicking > 0.0)\n {\n#ifdef EXTEND_OBJECT\n\t\tvec4 modelBottomPos = uMatrixInvert * czm_model * vec4(aPosition, 1.0);\n\t\tvec4 modelTopPos = uMatrixInvert * czm_model * vec4(vertexPos, 1.0);\n\t\tif(uPickPosition.z < modelBottomPos.z || uPickPosition.z > modelTopPos.z)\n\t\t{\n\t\t\tvColor.a = 0.0;\n\t\t}\n#else\n\t\tvertexPos.xyz = aPosition.xyz + normalize(aTexCoord1.xyz) * (uPickPosition.z + 10.0);\n\t\tvec4 v_Position = czm_modelViewProjection * vec4(vertexPos, 1.0);\n#endif\n }\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n#ifdef SELECTED\n vColor = uSelColor;\n fSelected = aTexCoord0.x;\n#else\n vColor = vertexColor * uDiffuseColor;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}",_0x19dcb4=(_0x5d8085=!0,function(e,t){var i=_0x5d8085?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d8085=!1,i}),_0x127c1a=_0x19dcb4(void 0,(function(){return _0x127c1a.toString().search("(((.+)+)+)+$").toString().constructor(_0x127c1a).search("(((.+)+)+)+$")})),_0x5d8085;_0x127c1a();var _0x5e3105="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec4 vColor;\nvarying float vWindowZ;\nvarying float fSelected;\nvarying vec4 vSecondColor;\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#ifdef HAS_TEXTURE\nuniform sampler2D uTexture;\nuniform vec2 uLevelScale;\nuniform vec2 uRepeatTimes;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\nvarying vec2 v_inversePlaneExtents;\n#endif\n\n#ifdef HAS_TEXTURE\nvec4 getTextureColor()\n{\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n vec2 uv;\n uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\n uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n vec2 st;\n st.x = czm_lineDistance(vec2(0.0), vec2(0.0, 1.0), uv);\n st.y = czm_lineDistance(vec2(0.0), vec2(1.0, 0.0), uv);\n st.xy *= uLevelScale * uRepeatTimes;\n vec4 texColor = texture2D(uTexture, st);\n if(texColor.a < 0.01) {\n texColor.a = 1.0;\n }\n return texColor;\n}\n#endif\n#include <preClipFS>\nvoid main()\n{\npreClip();\n#ifdef SELECTED\n if(fSelected < 0.5)\n {\n discard;\n }\n#endif\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec4 texColor = vec4(1.0);\n#ifdef HAS_TEXTURE\n texColor = getTextureColor();\n#endif\n gl_FragColor = vColor * texColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}\n",_0x5f3bb5=(_0x4facc3=!0,function(e,t){var i=_0x4facc3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4facc3=!1,i}),_0x3a68d7=_0x5f3bb5(void 0,(function(){return _0x3a68d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a68d7).search("(((.+)+)+)+$")})),_0x4facc3;_0x3a68d7();var _0x3b10bb="\n#include <SceneUboDecl> \n#include <MeshUboDecl> \nattribute vec4 aPosition; \nattribute vec3 aNormal; \nattribute vec4 aTexCoord0; \n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable \nattribute float batchId;\nuniform sampler2D batchTexture; \nvec2 computeSt(float batchId)\n{\n float stepX = batchTextureStep.x;\n float centerX = batchTextureStep.y;\n float numberOfAttributes = float(5);\n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);\n}\nvec4 czm_batchTable_pickColor(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(2);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n value /= 255.0;\n return value;\n}\nvec4 czm_batchTable_operation(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(1);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n return value;\n}\n#endif \n \nvarying vec4 vMirrorCoord; \nvarying vec4 vSecondColor; \nvarying vec4 vPostionEC; \nvarying vec4 vPositionMC; \nvarying vec4 vColor;\nvarying vec2 fSelected;\n#ifdef EXCAVATION \n varying vec4 vExcavationVertexPos; \n#endif \nvoid s3mBatchOperation(vec4 operationType, inout vec4 vertexColor)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n}\n\nvoid main() \n{ \n#ifdef EXCAVATION \n vExcavationVertexPos = uGeoMatrix * vec4(aPosition.xyz, 1.0); \n#endif \n\tvec4 oPos = czm_modelViewProjection * aPosition;\n\t\n\tvPositionMC = uGeoMatrix * aPosition; \n\tmat4 textureMatrix = mat4(0.5, 0.0, 0.0, 0.0, \n\t\t\t0.0, 0.5, 0.0, 0.0, \n\t\t\t0.0, 0.0, 0.5, 0.0, \n\t\t\t0.5, 0.5, 0.5, 1.0); \n\tvMirrorCoord = textureMatrix * oPos;\n\tgl_Position = oPos; \n\tvPostionEC = czm_modelView * aPosition; \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n#endif\nvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n s3mBatchOperation(operationType, vertexColor);\n#endif\n vColor = vertexColor;\n}",_0x1b9d13=(_0x5e0b0e=!0,function(e,t){var i=_0x5e0b0e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e0b0e=!1,i}),_0x1d4e5c=_0x1b9d13(void 0,(function(){return _0x1d4e5c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d4e5c).search("(((.+)+)+)+$")})),_0x5e0b0e;_0x1d4e5c();var _0xace9b2="\n#extension GL_EXT_draw_buffers : enable\n#if defined(PREPASS) && defined(WEBGPU)\nlayout(location = 0) out vec4 glFragData[3];\n#endif\n#include <LayerUboDecl>\n#include <WaterLayerUboDecl>\n#include <SceneUboDecl> \n#include <MeshUboDecl> \n#include <clip>\nuniform sampler2D uReflectMap;\nuniform sampler2D uNoiseMap;\nvarying vec4 vMirrorCoord;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\nvarying vec4 vPostionEC;\nvarying vec4 vColor;\n\nvec4 getNoise( vec2 uv ) {\n vec2 uv0 = ( uv / 103.0 ) + vec2(uTimeVal / 17.0, uTimeVal / 29.0) * uBumpSpeed;\n vec2 uv1 = uv / 107.0 - vec2( uTimeVal / -19.0, uTimeVal / 31.0 ) * uBumpSpeed;\n vec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( uTimeVal / 101.0, uTimeVal / 97.0 ) * uBumpSpeed;\n vec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( uTimeVal / 109.0, uTimeVal / -113.0 ) * uBumpSpeed;\n vec4 noise = texture2D( uNoiseMap, uv0 ) +\n texture2D( uNoiseMap, uv1 ) +\n texture2D( uNoiseMap, uv2 ) +\n texture2D( uNoiseMap, uv3 );\n return noise * 0.5 - 1.0;\n}\n \nvoid sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) \n{\n vec3 sunDirection = czm_lightDirectionEC; \n vec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) ); \n float direction = max( 0.0, dot( eyeDirection, reflection ) ); \n specularColor += pow( direction, shiny ) * uSunColor.rgb * spec; \n diffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * uSunColor.rgb * diffuse; \n} \n\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\n\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ),\n vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ),\n vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n const float toneMappingExposure = 1.0;\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return clamp( color, 0.0, 1.0);\n}\n\n#include <preClipFS>\nvoid main()\n{\n preClip();\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n vec3 worldToEye = -vPostionEC.xyz; \n float distance = length(worldToEye);\n vec4 noise = getNoise(vPositionMC.xy); \n noise.xy *= uNoiseScale;\n vec3 surfaceNormalEC = czm_normal * normalize( noise.xyz * vec3( 1.5, 1.5, 1.0 ) );\n vec3 diffuseLight = vec3(0.0); \n vec3 specularLight = vec3(0.0); \n vec3 eyeDirection = normalize( worldToEye.xyz ); \n sunLight( surfaceNormalEC, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );\n vec2 distortion = surfaceNormalEC.xy * ( 0.001 + 1.0 / distance ) * 3.7;\n vec2 mirrorCoord = vMirrorCoord.xy / vMirrorCoord.w;\n vec3 reflectionSample = vec3( textureLod( uReflectMap, mirrorCoord + distortion, uReflectMapLod));\n float theta = max( dot( eyeDirection, surfaceNormalEC ), 0.0 ); \n float rf0 = 0.3; \n vec3 waterColor = uWaterColor.rgb * uWaterBrightness;\n float reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 ); \n vec3 scatter = max( 0.0, dot( surfaceNormalEC, eyeDirection ) ) * waterColor;\n reflectionSample *= uUseRefectMap;\n vec3 albedo = mix((uSunColor.rgb * diffuseLight * 0.3 + scatter), (vec3(0.1) + reflectionSample * 0.9 + reflectionSample * specularLight), reflectance); \n vec4 finalColor = vec4(albedo, 1.0); \n finalColor.a = uWaterColor.a;\n #ifndef HDR\n finalColor.rgb = ACESFilmicToneMapping(finalColor.rgb);\n #endif\n if(finalColor.a < 0.1)\n {\n discard;\n }\n\n#ifdef CLIP\n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n\n#ifdef PREPASS\n vec3 normalEC = normalize(czm_normal * czm_computeNormal(vPositionMC.xyz));\n normalEC += noise.xyz * 0.05;\n gl_FragData[0] = vec4(vPostionEC.xyz, 1.0);\n // 相机坐标系法线\n gl_FragData[1] = vec4(normalEC, 1.0);\n // 反射率\n gl_FragData[2] = vec4(1.0);\n#else\n gl_FragColor = finalColor;\n#endif\n\n}",_0x5739be=(_0x1ad96d=!0,function(e,t){var i=_0x1ad96d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ad96d=!1,i}),_0x417b10=_0x5739be(void 0,(function(){return _0x417b10.toString().search("(((.+)+)+)+$").toString().constructor(_0x417b10).search("(((.+)+)+)+$")})),_0x1ad96d;_0x417b10();var _0x35073f="\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vSecondColor;\nvarying vec2 oUV;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nuniform mat4 uTexMatrix;\nvoid main()\n{\n float fExtendHeight = aTexCoord1.x;\n\tvec3 Postion = aPosition.xyz + (aNormal.xyz * fExtendHeight).xyz;\n\tfloat u = aTexCoord0.x;\n\tfloat v = aTexCoord0.y;\n if ( aTexCoord1.y > 0.2 && aTexCoord1.y < 0.8)\n {\n if (uTexMatrix[0].x > 0.0)\n {\n float fRealSize = uTexMatrix[1].y;\n v = fExtendHeight / fRealSize;\n }\n else\n {\n float fRepeatNum = uTexMatrix[1].y;\n v = fRepeatNum;\n }\n }\n oUV = vec2(u, v);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor;\n\tgl_Position = czm_modelViewProjection * vec4(Postion, 1.0);\n\tvPositionMC = vec4(Postion, 0.0);\n}",_0x3999c7=(_0xe3a89=!0,function(e,t){var i=_0xe3a89?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe3a89=!1,i}),_0x2b2ec6=_0x3999c7(void 0,(function(){return _0x2b2ec6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b2ec6).search("(((.+)+)+)+$")})),_0xe3a89;_0x2b2ec6();var _0x728fb1="\n#ifdef HAS_TEXTURE\nuniform sampler2D uTexture;\n#endif\nvarying vec2 oUV;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvoid main()\n{\n\tvec4 mixColor = vec4(1.0);\n#ifdef HAS_TEXTURE\n mixColor = mixColor * texture2D( uTexture, oUV );\n#endif\n gl_FragColor = mixColor * vColor;\n#ifdef HAS_LIGHT\n\tgl_FragColor *= czm_computeLightColorInFP(vPositionMC.xyz, vPositionMC.w, vec3(0.0));\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x10255e=(_0x3570f0=!0,function(e,t){var i=_0x3570f0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3570f0=!1,i}),_0x55494d=_0x10255e(void 0,(function(){return _0x55494d.toString().search("(((.+)+)+)+$").toString().constructor(_0x55494d).search("(((.+)+)+)+$")})),_0x3570f0;_0x55494d();var _0xb28fe0="\n#include <SceneUboDecl>\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aColor;\nvarying vec2 vTexCoord;\nvarying vec4 selectionColor;\nvarying vec3 oriVertex;\nvarying vec3 vPositionToEyeEC;\nvoid main()\n{\n vTexCoord = aTexCoord0.xy;\n oriVertex = aPosition.xyz;\n\tvec4 vVertex = vec4(aPosition.xyz, 1.0);\n\tgl_Position = uViewProjection * uModelMatrix * vVertex;\n\tselectionColor = vec4(aColor.rgb, 1.0);\n\tvec4 positionEC = uView * uModelMatrix * vVertex;\n vPositionToEyeEC = -normalize(positionEC.xyz);\n}\n",_0x1db8cd=(_0x192865=!0,function(e,t){var i=_0x192865?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x192865=!1,i}),_0x5bc48e=_0x1db8cd(void 0,(function(){return _0x5bc48e.toString().search("(((.+)+)+)+$").toString().constructor(_0x5bc48e).search("(((.+)+)+)+$")})),_0x192865;_0x5bc48e();var _0x362543="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <RegionEffectUboDecl>\nvarying vec3 oriVertex;\nvarying vec2 vTexCoord;\nvarying vec4 selectionColor;\nvarying vec3 vPositionToEyeEC;\nconst float horizontal = 0.0;\nconst float PI = 3.1415926535897932384626;\nvec2 rotateTexCoord(vec2 oriTexCoord)\n{\n\tfloat rotationRadian = uRotationAngle * PI;\n\tvec2 n = vec2(cos(rotationRadian),-sin(rotationRadian));\n\tvec2 t = vec2(sin(rotationRadian),cos(rotationRadian));\n\tmat2 rotateZMatrix = mat2(n,t);\n\treturn rotateZMatrix * oriTexCoord;\n}\nvec4 getGridMaterial(vec2 texCoord)\n{\n\tvec2 lineCount = vec2(uRepeatX, uRepeatY);\n\tvec2 lineOffset = vec2(uOffsetX, uOffsetY);\n\tvec2 lineThickness = vec2(uLineWidthX, uLineWidthY);\n\n float scaledWidth = fract(lineCount.s * texCoord.s - lineOffset.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n\n float scaledHeight = fract(lineCount.t * texCoord.t - lineOffset.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n\n float value;\n\n const float fuzz = 1.2;\n vec2 thickness = (lineThickness * 1.0) - 1.0;\n\n vec2 dx = abs(dFdx(texCoord));\n vec2 dy = abs(dFdy(texCoord));\n vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\n\n\tif(uRepeatX < 0.5)\n\t{\n\t\tvalue = smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight);\n\t}\n\telse if(uRepeatY < 0.5)\n\t{\n\t\tvalue = smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth);\n\t}\n\telse\n\t{\n\t\tvalue = min(\n\t\t\tsmoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\n\t\t\tsmoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n\t}\n\n\tif(value < 0.5)\n\t{\n\t\treturn uForeColor;\n\t}\n\treturn uBackColor;\n}\nvec4 getStripMaterial(vec2 texCoord)\n{\n\tfloat repeat = uRepeatX;\n\tfloat offset = uOffsetX;\n\n float coord = mix(texCoord.s, texCoord.t, horizontal);\n float value = fract((coord - offset) * (repeat * 0.5));\n\n vec4 currentColor = mix(uForeColor, uBackColor, step(0.5, value)); \n\n return currentColor;\n}\nvec4 getDotMaterial(vec2 texCoord)\n{\n\tfloat dotRepeat = uRepeatX;\n\n float b = smoothstep(0.3, 0.32, length(fract(dotRepeat * texCoord.st) - 0.5));\n vec4 color = mix(uForeColor, uBackColor, b);\n return color;\n}\nvec4 getCheckBoardMaterial(vec2 texCoord)\n{\n\tvec2 checkBoardRepeat = vec2(uRepeatX, uRepeatY); \n\n float b = mod(floor(checkBoardRepeat.s * texCoord.s) + floor(checkBoardRepeat.t * texCoord.t), 2.0);\n vec4 currentColor = mix(uForeColor, uBackColor, b);\n return currentColor;\n}\n\nvoid main()\n{\n vec3 newNormal = vec3( czm_normal * czm_computeNormal( oriVertex ) );\n newNormal = normalize( newNormal );\n\tvec4 mixColor = czm_directionLight(newNormal,vPositionToEyeEC,oriVertex);\n\n\tvec2 rotateCoord = rotateTexCoord(vTexCoord);\n\n vec4 color = uForeColor;\n \n if(uType > 3.5)\n {\n \tcolor = getGridMaterial(rotateCoord);\n }\n else if(uType > 2.5)\n {\n \tcolor = getCheckBoardMaterial(rotateCoord);\n }\n else if(uType > 1.5)\n {\n \tcolor = getDotMaterial(rotateCoord);\n }\n else if(uType > 0.5)\n {\n \tcolor = getStripMaterial(rotateCoord);\n }\n \n gl_FragColor = color * mixColor * selectionColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}\n",_0x2285c8=(_0x1b42c7=!0,function(e,t){var i=_0x1b42c7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b42c7=!1,i}),_0x3ae718=_0x2285c8(void 0,(function(){return _0x3ae718.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ae718).search("(((.+)+)+)+$")})),_0x1b42c7;_0x3ae718();var _0x1e7638="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <PolylineEffectUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\n#ifdef TexCoord2\n attribute vec4 aTexCoord1;\n#endif\n#ifdef VertexColor\n #ifdef WEBGPU\n attribute uvec4 aColor;\n #else\n attribute vec4 aColor;\n #endif\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying vec4 vPositionMC;\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\nvoid clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane,\n out vec4 clippedPositionEC)\n {\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = uCurrentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -uCurrentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n }\n vec4 getPolylineWindowCoordinates(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n {\n #ifdef POLYLINE_DASH\n vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\n vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\n vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\n vec2 lineDir;\n if (usePrevious) {\n lineDir = normalize(positionWindow.xy - previousWindow.xy);\n }\n else {\n lineDir = normalize(nextWindow.xy - positionWindow.xy);\n }\n angle = atan(lineDir.x, lineDir.y) - 1.570796327;\n angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n #endif\n vec4 clippedPrevWC, clippedPrevEC;\n bool prevSegmentClipped, prevSegmentCulled;\n clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\n vec4 clippedNextWC, clippedNextEC;\n bool nextSegmentClipped, nextSegmentCulled;\n clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\n bool segmentClipped, segmentCulled;\n vec4 clippedPositionWC, clippedPositionEC;\n clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\n if (segmentCulled)\n {\n return vec4(0.0, 0.0, 0.0, 1.0);\n }\n vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\n vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\n if (prevSegmentCulled)\n {\n directionToPrevWC = -directionToNextWC;\n }\n else if (nextSegmentCulled)\n {\n directionToNextWC = -directionToPrevWC;\n }\n vec2 thisSegmentForwardWC, otherSegmentForwardWC;\n if (usePrevious)\n {\n thisSegmentForwardWC = -directionToPrevWC;\n otherSegmentForwardWC = directionToNextWC;\n }\n else\n {\n thisSegmentForwardWC = directionToNextWC;\n otherSegmentForwardWC = -directionToPrevWC;\n }\n vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\n vec2 leftWC = thisSegmentLeftWC;\n float expandWidth = width * 0.5;\n if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n {\n vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\n vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\n float leftSumLength = length(leftSumWC);\n leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\n vec2 u = -thisSegmentForwardWC;\n vec2 v = leftWC;\n float sinAngle = abs(u.x * v.y - u.y * v.x);\n expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n }\n vec2 offset = leftWC * expandDirection * expandWidth * uPixelRatio;\n return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (uProjection * clippedPositionEC).w;\n }\nvoid main()\n{ \n vec4 texCoord2 = vec4(0.0);\n #ifdef TexCoord2\n texCoord2 = aTexCoord1;\n #endif\n\tvec2 expandAndWidth = texCoord2.zw;\n\texpandAndWidth.y = expandAndWidth.y * uEffectLineWidth;\n\tfloat u = abs(expandAndWidth.x);\n\tfloat expandDir = sign(expandAndWidth.x);\n#ifdef ENABLE_DYNAMIC\n\tfloat w = 0.2 + 0.3*(1.0 - pow(2.0*abs(u - 0.5), 2.0));\n\tfloat width = abs(expandAndWidth.y*w) + 0.5;\n#else\n\tfloat width = abs(expandAndWidth.y) + 0.5;\n#endif\n\tbool usePrev = expandAndWidth.y < 0.0;\n\tvPositionMC.xyz = aPosition.xyz;\n vPositionMC.w = 0.0;\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vec4(aPosition.xyz, 1.0);\n#endif\n mat4 modelView = uView * uModelMatrix;\n\tvec4 p = modelView * aPosition;\n\tvec4 prev = modelView * vec4(aNormal, 1.0);\n\tvec4 next = modelView * aTexCoord0;\n\tv_st.s = texCoord2.x;\n\tv_width = width;\n\tv_alpha = u;\n\tfloat polylineAngle;\n\tvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\n\tv_polylineAngle = polylineAngle;\n\tgl_Position = czm_viewportOrthographic * positionWC;\n\tv_st.t = czm_writeNonPerspective(clamp(texCoord2.y, 0.0, 1.0), gl_Position.w);\n\tvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n\tvColor = vertexColor;\n}\n",_0x34b739=(_0x4f196f=!0,function(e,t){var i=_0x4f196f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f196f=!1,i}),_0x41eabd=_0x34b739(void 0,(function(){return _0x41eabd.toString().search("(((.+)+)+)+$").toString().constructor(_0x41eabd).search("(((.+)+)+)+$")})),_0x4f196f;_0x41eabd();var _0x54ee86="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <PolylineEffectUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nvarying vec4 vColor;\nvarying vec2 v_st;\nvarying float v_width;\nvarying float v_polylineAngle;\nvarying vec4 vSecondColor;\nconst float maskLength = 16.0;\nvarying vec4 vPositionMC;\n\nmat2 rotate(float rad)\n{\n\tfloat c = cos(rad);\n\tfloat s = sin(rad);\n\treturn mat2(\n\t\tc, s,\n\t\t-s, c\n\t);\n}\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\n\tfloat slope = (p0.y - p1.y) / (p0.x - p1.x);\n\treturn slope * (x - p0.x) + p0.y;\n}\n\n#include <preClipFS>\n#include <clip>\nvoid main()\n{\n vec2 st = v_st;\n st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);\n preClip();\n#ifdef GL_OES_standard_derivatives\n\tfloat base = 1.0 - abs(fwidth(st.s)) * 10.0;\n#else\n\tfloat base = 0.99;\n#endif\n\tvec2 center = vec2(1.0, 0.5);\n\tfloat ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\n\tfloat ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\n\tfloat halfWidth = 0.15;\n\tfloat s = step(0.5 - halfWidth, st.t);\n\ts *= 1.0 - step(0.5 + halfWidth, st.t);\n\ts *= 1.0 - step(base, st.s);\n\tfloat t = step(base, st.s);\n\tt *= 1.0 - step(ptOnUpperLine, st.t);\n\tt *= step(ptOnLowerLine, st.t);\n\tfloat dist;\n\n\tvec4 outsideColor = vec4(0.0);\n\tvec4 currentColor;\n\tif (uIsArrow < 0.5 || st.s < base)\n\t{\n\t\tif(uType > 2.5)\n\t\t{\n\t\t\tfloat glow = uGlowPower / abs(st.t - 0.3) - (uGlowPower / 0.5);\n\t\t\tvec3 emission = max(vec3(glow - 1.0 + uColor.rgb), uColor.rgb);\n\t\t\tfloat alpha = clamp(0.0, 1.0, glow) * uColor.a;\n\t\t\tvec4 fragColor = vec4(emission, alpha);\n\t\t\tif(uIsArrow > 0.5)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, fragColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, fragColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = fragColor;\n\t\t\t}\n\t\t}\n\t\telse if(uType > 1.5)\n\t\t{\n\t\t float halfInteriorWidth = 0.5 * (v_width - uOutlineWidth) / v_width;\n\t\t\tfloat b = step(0.5 - halfInteriorWidth, st.t);\n\t\t\tb *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\n\t\t\tfloat d1 = abs(st.t - (0.5 - halfInteriorWidth));\n\t\t\tfloat d2 = abs(st.t - (0.5 + halfInteriorWidth));\n\t\t\tfloat dist = min(d1, d2);\n\t\t\tcurrentColor = mix(uOutlineColor, uColor, b);\n\t\t\tgl_FragColor = czm_antialias(uOutlineColor, uColor, currentColor, dist, 0.1);\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse if(uType == 1.0)\n\t\t{\n\t\t\tvec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n\t\t\tfloat dashPosition = fract(pos.x / uDashLength);\n\t\t\tfloat maskIndex = floor(dashPosition * maskLength);\n\t\t\tfloat maskTest = floor(uDashPattern / pow(2.0, maskIndex));\n\t\t\tvec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? uGapColor : uColor;\n\t\t\tif (fragColor.a < 0.005)\n\t\t\t{\n\t\t\t\tdiscard;\n\t\t\t}\n\t\t\tif(uIsArrow > 0.5)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, fragColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, fragColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = fragColor;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(uIsArrow > 0.5)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, uColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, uColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = uColor;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tfloat d1 = czm_infinity;\n\t\tif (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n\t\t{\n\t\t\td1 = abs(st.s - base);\n\t\t}\n\t\tfloat d2 = abs(st.t - ptOnUpperLine);\n\t\tfloat d3 = abs(st.t - ptOnLowerLine);\n\t\tdist = min(min(d1, d2), d3);\n\t\tcurrentColor = mix(outsideColor, uColor, clamp(s + t, 0.0, 1.0));\n\t\tgl_FragColor = czm_antialias(outsideColor, uColor, currentColor, dist, 0.1);\n\t}\n#ifndef REPLACE_COLOR_TYPE\n gl_FragColor = gl_FragColor * vColor;\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n if(gl_FragColor.a < 0.1){discard;}\n#ifdef LOG_DEPTH\n if(uPolygonOffset.x != 0.0 || uPolygonOffset.y != 0.0){\n float logZ = 1.0 / gl_FragCoord.w + 1.0;\n float DZ = max(dFdx(logZ), dFdy(logZ));\n logZ += DZ * uPolygonOffset.x + 0.0000001 * uPolygonOffset.y;\n czm_writeLogDepth(logZ);\n }\n else{\n czm_writeLogDepth();\n }\n#endif\n#ifdef CLIP\n gl_FragColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n}\n",_0x4ebf9a=(_0x3685e7=!0,function(e,t){var i=_0x3685e7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3685e7=!1,i}),_0x52a5a9=_0x4ebf9a(void 0,(function(){return _0x52a5a9.toString().search("(((.+)+)+)+$").toString().constructor(_0x52a5a9).search("(((.+)+)+)+$")})),_0x3685e7;_0x52a5a9();var _0x45c27e="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <PolylineEffectUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\n\t#ifdef WEBGPU\n\tattribute uvec4 aColor;\n\t#else\n\tattribute vec4 aColor;\n\t#endif\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying float fWindowZ;\nvarying vec4 vPositionMC;\n\nvec4 eyeToWindowCoordinates(vec4 positionEC)\n{\n vec4 q = uProjection * positionEC; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n\nvoid clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p1ToP0 = p1 - p0;\n float magnitude = length(p1ToP0);\n vec3 direction = normalize(p1ToP0);\n float endPoint0Distance = -(uCurrentFrustum.x + p0.z);\n float denominator = -direction.z;\n if (endPoint0Distance < 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance < 0.0 && abs(denominator) > czm_epsilon7)\n {\n float t = (uCurrentFrustum.x + p0.z) / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n clipped = true;\n }\n }\n positionWC = eyeToWindowCoordinates(vec4(p0, 1.0));\n}\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\n\tvec4 endPointWC, p0, p1;\n\tbool culledByNearPlane, clipped;\n\tvec4 positionEC = position;\n\tvec4 prevEC = previous;\n\tvec4 nextEC = next;\n\tvec4 positionWindow = eyeToWindowCoordinates(positionEC);\n\tvec4 previousWindow = eyeToWindowCoordinates(prevEC);\n\tvec4 nextWindow = eyeToWindowCoordinates(nextEC);\n\n\tvec2 lineDir;\n\tif (usePrevious)\n\t{\n\t\tlineDir = normalize(positionWindow.xy - previousWindow.xy);\n\t}\n\telse\n\t{\n\t\tlineDir = normalize(nextWindow.xy - positionWindow.xy);\n\t}\n\tangle = atan(lineDir.x, lineDir.y) - 1.570796327;\n\tangle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n\n\tclipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, p0, clipped, culledByNearPlane);\n\tclipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, p1, clipped, culledByNearPlane);\n\tclipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, endPointWC, clipped, culledByNearPlane);\n\tif (culledByNearPlane)\n\t{\n\t\treturn vec4(0.0, 0.0, 0.0, 1.0);\n\t}\n\tvec2 prevWC = normalize(p0.xy - endPointWC.xy);\n\tvec2 nextWC = normalize(p1.xy - endPointWC.xy);\n\tfloat expandWidth = width * 0.5;\n\tvec2 direction;\n\tif (czm_equalsEpsilon(previous.xyz - position.xyz, vec3(0.0), czm_epsilon7) || czm_equalsEpsilon(prevWC, -nextWC, czm_epsilon7))\n\t{\n\t\tdirection = vec2(-nextWC.y, nextWC.x);\n\t}\n\telse if (czm_equalsEpsilon(next.xyz - position.xyz, vec3(0.0), czm_epsilon7) || clipped)\n\t{\n\t\tdirection = vec2(prevWC.y, -prevWC.x);\n\t}\n\telse\n\t{\n\t\tvec2 normal = vec2(-nextWC.y, nextWC.x);\n\t\tdirection = normalize((nextWC + prevWC) * 0.5);\n\t\tif (dot(direction, normal) < 0.0)\n\t\t{\n\t\t\tdirection = -direction;\n\t\t}\n\t\tfloat sinAngle = abs(direction.x * nextWC.y - direction.y * nextWC.x);\n\t\texpandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n\t}\n\tvec2 offset = direction * expandDirection * expandWidth * czm_resolutionScale;\n\treturn vec4(endPointWC.xy + offset, -endPointWC.z, 1.0);\n}\nvoid main()\n{\n\tvec2 expandAndWidth = aTexCoord1.zw;\n\texpandAndWidth.y = expandAndWidth.y * uEffectLineWidth;\n\tfloat u = abs(expandAndWidth.x);\n\tfloat expandDir = sign(expandAndWidth.x);\n#ifdef ENABLE_DYNAMIC\n\tfloat w = 0.2 + 0.3*(1.0 - pow(2.0*abs(u - 0.5), 2.0));\n\tfloat width = abs(expandAndWidth.y*w) + 0.5;\n#else\n\tfloat width = abs(expandAndWidth.y) + 0.5;\n#endif\n\tbool usePrev = expandAndWidth.y < 0.0;\n\tvPositionMC.xyz = aPosition.xyz;\n vPositionMC.w = 0.0;\n mat4 modelView = uView * uModelMatrix;\n\tvec4 p = modelView * aPosition;\n\tvec4 prev = modelView * vec4(aNormal, 1.0);\n\tvec4 next = modelView * aTexCoord0;\n\tv_st = aTexCoord1.xy;\n\tv_width = width;\n\tv_alpha = u;\n\tvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, v_polylineAngle);\n\tvec4 pos = uProjection * p;\n\tfWindowZ = (0.5 * (pos.z / pos.w) + 0.5);\n\tgl_Position = czm_viewportOrthographic * positionWC;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n\t#ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n float right_2 = operationType.x * 0.5;\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fWindowZ = -1.0;\n }\n#endif\n\tvColor = vertexColor;\n}\n",_0x1a2e03=(_0x35cffe=!0,function(e,t){var i=_0x35cffe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x35cffe=!1,i}),_0xd04321=_0x1a2e03(void 0,(function(){return _0xd04321.toString().search("(((.+)+)+)+$").toString().constructor(_0xd04321).search("(((.+)+)+)+$")})),_0x35cffe;_0xd04321();var _0x4632a6="\nattribute vec4 aPosition;\n#include <LayerUboDecl>\n#include <MeshUboDecl>\n#ifdef VertexColor\n attribute vec4 aColor;\n#endif\n#ifdef BatchTable\n attribute float batchId;\n#endif\n attribute vec4 aTexCoord0;\n attribute vec4 aTexCoord1;\n attribute vec4 aTexCoord2;\n attribute vec4 aTexCoord3;\n attribute vec4 aTexCoord4;\n attribute vec4 aTexCoord5;\n varying vec4 v_startPlaneNormalEcAndHalfWidth;\n varying vec4 v_endPlaneNormalEcAndBatchId;\n varying vec4 v_rightPlaneEC;\n varying vec4 v_endEcAndStartEcX;\n varying vec4 v_texcoordNormalizationAndStartEcYZ;\n varying vec4 v_vertexColor;\n varying vec4 vSecondColor;\n#ifdef COMPRESS_VERTEX\n uniform vec4 decode_position_min;\n uniform float decode_position_normConstant;\n#endif\n#ifdef COMPRESS_TEXCOORD\n uniform float decode_texCoord0_normConstant;\n uniform float decode_texCoord1_normConstant;\n uniform float decode_texCoord2_normConstant;\n uniform float decode_texCoord3_normConstant;\n uniform float decode_texCoord4_normConstant;\n uniform float decode_texCoord5_normConstant;\n uniform vec4 decode_texCoord0_min;\n uniform vec4 decode_texCoord1_min;\n uniform vec4 decode_texCoord2_min;\n uniform vec4 decode_texCoord3_min;\n uniform vec4 decode_texCoord4_min;\n uniform vec4 decode_texCoord5_min;\n#endif\n void main()\n {\n vec3 position3DHigh = aPosition.xyz;\n vec4 uncompress = vec4(1.0);\n#ifdef COMPRESS_VERTEX\n uncompress = decode_position_min + aPosition * decode_position_normConstant;\n position3DHigh = uncompress.xyz;\n#endif\n vec3 position3DLow = aTexCoord5.xyz;\n#ifdef COMPRESS_TEXCOORD\n uncompress = decode_texCoord5_min + aTexCoord5 * decode_texCoord5_normConstant;\n position3DLow = uncompress.xyz;\n#endif\n vec4 startHiAndForwardOffsetX = aTexCoord0;\n vec4 startLoAndForwardOffsetY = aTexCoord1;\n vec4 startNormalAndForwardOffsetZ = aTexCoord2;\n vec4 endNormalAndTextureCoordinateNormalizationX = aTexCoord3;\n vec4 rightNormalAndTextureCoordinateNormalizationY = aTexCoord4;\n#ifdef COMPRESS_TEXCOORD\n uncompress = decode_texCoord0_min + aTexCoord0 * decode_texCoord0_normConstant;\n startHiAndForwardOffsetX = uncompress;\n uncompress = decode_texCoord1_min + aTexCoord1 * decode_texCoord1_normConstant;\n startLoAndForwardOffsetY = uncompress;\n uncompress = decode_texCoord2_min + aTexCoord2 * decode_texCoord2_normConstant;\n startNormalAndForwardOffsetZ = uncompress;\n uncompress = decode_texCoord3_min + aTexCoord3 * decode_texCoord3_normConstant;\n endNormalAndTextureCoordinateNormalizationX = uncompress;\n uncompress = decode_texCoord4_min + aTexCoord4 * decode_texCoord4_normConstant;\n rightNormalAndTextureCoordinateNormalizationY = uncompress;\n#endif\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\n vec3 forwardOffset = vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\n vec3 offset = czm_normal * forwardOffset;\n vec3 ecEnd = ecStart + offset;\n vec3 forwardDirectionEC = normalize(offset);\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n v_endEcAndStartEcX.xyz = ecEnd;\n v_endEcAndStartEcX.w = ecStart.x;\n v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n vec4 positionRelativeToEye = czm_translateRelativeToEye(position3DHigh, position3DLow);\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye;\n float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\n vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection));\n vec3 normalEC = normalize(cross(planeDirection, upOrDown));\n upOrDown = cross(forwardDirectionEC, normalEC);\n upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\n positionEC.xyz += upOrDown;\n v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\n float width = uLineWidth;\n v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\n v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\n v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\n v_endPlaneNormalEcAndBatchId.w = 0.0;\n width = width * max(0.0, czm_metersPerPixel(positionEC));\n width = width / dot(normalEC, v_rightPlaneEC.xyz);\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n positionEC.xyz += width * normalEC;\n gl_Position = czm_depthClampFarPlane(czm_projection * positionEC);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n v_vertexColor = vertexColor * uLineColor;\n }\n ",_0x47efb1=(_0x334241=!0,function(e,t){var i=_0x334241?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x334241=!1,i}),_0x41705d=_0x47efb1(void 0,(function(){return _0x41705d.toString().search("(((.+)+)+)+$").toString().constructor(_0x41705d).search("(((.+)+)+)+$")})),_0x334241;_0x41705d();var _0x5b2edf="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#include <LayerUboDecl>\n varying vec4 v_startPlaneNormalEcAndHalfWidth;\n varying vec4 v_endPlaneNormalEcAndBatchId;\n varying vec4 v_rightPlaneEC; // Technically can compute distance for this here\n varying vec4 v_endEcAndStartEcX;\n varying vec4 v_texcoordNormalizationAndStartEcYZ;\n varying vec4 v_vertexColor;\n varying vec4 vSecondColor;\n void main(void)\n {\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n discard;\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0)\n {\n discard;\n }\n gl_FragColor = v_vertexColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n// vec3 alignedPlaneNormal;\n// // start aligned plane\n// alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\n// alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n// distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\n// // end aligned plane\n// alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\n// alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n// distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n// // Clamp - distance to aligned planes may be negative due to mitering,\n// // so fragment texture coordinate might be out-of-bounds.\n// float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\n// s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\n// float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\n// czm_writeDepthClampedToFarPlane();\n }\n ",_0x5d291d=(_0xbeaa75=!0,function(e,t){var i=_0xbeaa75?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xbeaa75=!1,i}),_0x5e87b3=_0x5d291d(void 0,(function(){return _0x5e87b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e87b3).search("(((.+)+)+)+$")})),_0xbeaa75;_0x5e87b3();var _0x53d054={SIZE_PER_INSTANCE:20,SIZE_PER_DM_INSTANCE:35,S3MB_BIM_INSTANCE:17,S3MB_BIM_INSTANCE_2:16,S3MB_PIPE_INSTANCE:29},_0x721735=Object.freeze(_0x53d054),_0x4af086=(_0x2e1f63=!0,function(e,t){var i=_0x2e1f63?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e1f63=!1,i}),_0x4d73db=_0x4af086(void 0,(function(){return _0x4d73db.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d73db).search("(((.+)+)+)+$")})),_0x2e1f63;_0x4d73db();var _0x37991b={NONE:0,LEFT:1,RIGHT:2,TOP:-1,BOTTOM:-2},_0x405774=Object.freeze(_0x37991b),_0x18a05a=(_0x3eb72d=!0,function(e,t){var i=_0x3eb72d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3eb72d=!1,i}),_0x6d8ff7=_0x18a05a(void 0,(function(){return _0x6d8ff7.toString().search("(((.+)+)+)+$").toString().constructor(_0x6d8ff7).search("(((.+)+)+)+$")})),_0x3eb72d;_0x6d8ff7();var _0x142755={DatasetField:0,EdgeLengthMin:1},_0x7aa085=Object.freeze(_0x142755),_0x21fb91=(_0x3738ed=!0,function(e,t){var i=_0x3738ed?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3738ed=!1,i}),_0x531a67=_0x21fb91(void 0,(function(){return _0x531a67.toString().search("(((.+)+)+)+$").toString().constructor(_0x531a67).search("(((.+)+)+)+$")})),_0x3738ed;_0x531a67();var _0x1e5d33={OPAQUE:"opaque",BLEND:"blend",MASK:"mask"},_0x5f0e97=Object.freeze(_0x1e5d33),_0x1d8672=(_0x3c6931=!0,function(e,t){var i=_0x3c6931?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3c6931=!1,i}),_0x37d4d1=_0x1d8672(void 0,(function(){return _0x37d4d1.toString().search("(((.+)+)+)+$").toString().constructor(_0x37d4d1).search("(((.+)+)+)+$")})),_0x3c6931;function _0x280589(e){var t=_0x3e2f69.call(this)||this;t._layer=e,t._name=_0x27131a.Polyline,this._initUniformMap()}function s$I(e){this._lightList={},this._lightList[_0x1d9df9.DIRECTIONAL]=new e$1N,this._lightList[_0x1d9df9.POINT]=new e$1N,this._lightList[_0x1d9df9.SPOT]=new e$1N,this._lightList[_0x1d9df9.HEMISPHERE]=new e$1N,this._visibleLightList={},this._visibleLightList[_0x1d9df9.POINT]=new e$1N,this._visibleLightList[_0x1d9df9.SPOT]=new e$1N,this._visiblePointLightCount=0,this._visibleSpotLightCount=0,this._visibleDirectionalLightCount=0,this._visibleHemisphereLightCount=0,this._ambientLightColor=new e$1U(0,0,0,1),this._sunLightColor=new e$1U(.8,.8,.8,1),this._sunLightON=1,this._changedLightList=new e$1N,this._pointLightDistanceDecay=[],this._spotLightDistanceDecayCosPenumbra=[],this._context=e,this._visibleDistanceMax=1e4,this._visibleCountAllowed=100,this._enableAmbientLightColor=!1,this._enableSunLightColor=!1}_0x37d4d1(),_0x3e2f69&&(_0x280589.__proto__=_0x3e2f69),_0x280589.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x280589.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x280589.prototype,{}),_0x280589.prototype._initUBOStruct=function(){const e=this._ubo;e.addUniform("uColor",4),e.addUniform("uOutlineColor",4),e.addUniform("uGapColor",4),e.addUniform("uEffectLineWidth",1),e.addUniform("uType",1),e.addUniform("uOutlineWidth",1),e.addUniform("uDashLength",1),e.addUniform("uDashPattern",1),e.addUniform("uGlowPower",1),e.addUniform("uIsArrow",1)},_0x280589.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),this._initUBOStruct(),this._ubo.create()},_0x280589.prototype.update=function(e){if(!e.webgpu&&!e.webgl2)return;e$2b(this._ubo)||this._initUBO(e);const t=this._layer,i=this._ubo,n=t._effect;let r=n._dashPattern;if(n._isMove){n._frame>159&&(n._frame=0);var o=Math.floor(n._frame/10),a=n._dashPattern<<o,s=n._dashPattern>>16-o;n._frame++,r=a+s}i.updateDirectColor4("uColor",n._color),i.updateDirectColor4("uOutlineColor",n._outlineColor),i.updateDirectColor4("uGapColor",n._gapColor),i.updateFloat("uEffectLineWidth",n._lineWidth),i.updateFloat("uType",n._type),i.updateFloat("uOutlineWidth",n._outlineWidth),i.updateFloat("uDashLength",n._dashLength),i.updateFloat("uDashPattern",r),i.updateFloat("uGlowPower",n._glowPower),i.updateFloat("uIsArrow",n._isArrow?1:0),i.update()},_0x280589.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(t.webgl2||t.webgpu)return;var i={};const n=e._effect;i.uColor=function(){return n._color},i.uOutlineColor=function(){return n._outlineColor},i.uGapColor=function(){return n._gapColor},i.uEffectLineWidth=function(){return n._lineWidth},i.uType=function(){return n._type},i.uOutlineWidth=function(){return n._outlineWidth},i.uDashLength=function(){return n._dashLength},i.uDashPattern=function(){let e=n._dashPattern;if(n._isMove){n._frame>159&&(n._frame=0);var t=Math.floor(n._frame/10),i=n._dashPattern<<t,r=n._dashPattern>>16-t;n._frame++,e=i+r}return e},i.uGlowPower=function(){return n._glowPower},i.uIsArrow=function(){return n._isArrow?1:0},this._uniformMap=i},_0x280589.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x280589.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x280589.prototype.isDestroyed=function(){return!1},_0x280589.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)},s$I.MaxPointLightCount=16,s$I.MaxSpotLightCount=16,s$I.MaxDirectionLightCount=4,Object.defineProperties(s$I.prototype,{pointLight:{get:function(){return this._lightList[_0x1d9df9.POINT]}},spotLight:{get:function(){return this._lightList[_0x1d9df9.SPOT]}},directionalLight:{get:function(){return this._lightList[_0x1d9df9.DIRECTIONAL]}},hemisphereLight:{get:function(){return this._lightList[_0x1d9df9.HEMISPHERE]}},ambientLightColor:{get:function(){return this._ambientLightColor},set:function(e){o$1q.defined("Light source ambientLightColor",e),e$1U.clone(e,this._ambientLightColor),this._enableAmbientLightColor=!0}},sunLightColor:{get:function(){return this._sunLightColor},set:function(e){o$1q.defined("Light source sunLightColor",e),e$1U.clone(e,this._sunLightColor),this._enableSunLightColor=!0}},sunLightON:{get:function(){return this._sunLightON},set:function(e){o$1q.typeOf.bool("Light source sun light on",e),this._sunLightON=e?1:0}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}}}),s$I.prototype.addLightSource=function(e){var t=this._lightList[e.lightType];return t.set(e.id,e),t.length},s$I.prototype.removeLightSource=function(e){var t=this._lightList[e.lightType];return t.get(e.id)?(t.remove(e.id),t.length):-1},s$I.prototype.updateVisiblities=function(e){var t,i=this._lightList[_0x1d9df9.POINT].values;for(t=0;t<i.length;t++)i[t].computeVisiblityInCullingVolume(e);for(i=this._lightList[_0x1d9df9.SPOT].values,t=0;t<i.length;t++)i[t].computeVisiblityInCullingVolume(e)},s$I.prototype.hasChange=function(){return this._changedLightList.values.length>0},s$I.prototype.resetChange=function(){this._changedLightList.removeAll()},s$I.prototype.combineUniformValue=function(){this._pointLightDistanceDecay=[],this._spotLightDistanceDecayCosPenumbra=[];var e,t=this._visibleLightList[_0x1d9df9.POINT].values,i=t.length;for(e=0;e<i;e++){var n=new o$1o;n.x=t[e].cutoffDistance,n.y=t[e].decay,this._pointLightDistanceDecay.push(n)}var r=this._visibleLightList[_0x1d9df9.SPOT].values;for(i=r.length,e=0;e<i;e++){var o=new e$29;o.x=r[e].distance,o.y=r[e].decay,o.z=r[e].angleCos,o.w=r[e].penumbraCos,this._spotLightDistanceDecayCosPenumbra.push(o)}},s$I.prototype.createUniformMap=function(){var e={},t=this;return e.uAmbientLightColor=function(){return t.ambientLightColor},e.uSunLightColor=function(){return t.sunLightColor},e.uSunLightON=function(){return t.sunLightON},e.uDirectionalLightDirectionEC=function(){for(var e=[],i=t.directionalLight.values,n=i.length,r=0;r<n;r++)e.push(i[r].directionEC);return e},e.uDirectionalLightColor=function(){for(var e=[],i=t.directionalLight.values,n=i.length,r=0;r<n;r++)e.push(i[r].lightColor);return e},e.uPointLightPositionEC=function(){for(var e=[],i=t._visibleLightList[_0x1d9df9.POINT].values,n=i.length,r=0;r<n;r++)e.push(i[r].positionEC);return e},e.uPointLightColor=function(){for(var e=[],i=t._visibleLightList[_0x1d9df9.POINT].values,n=i.length,r=0;r<n;r++)e.push(i[r].lightColor);return e},e.uDirectionalLightDirection=function(){for(var e=[],i=t.directionalLight.values,n=0;n<i.length;n++)e.push(i[n].direction);return e},e.uPointLightDistanceAndDecay=function(){return t._pointLightDistanceDecay},e.uSpotLightColor=function(){for(var e=[],i=t._visibleLightList[_0x1d9df9.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].lightColor);return e},e.uSpotLightPositionEC=function(){for(var e=[],i=t._visibleLightList[_0x1d9df9.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].positionEC);return e},e.uSpotLightPosition=function(){for(var e=[],i=t._visibleLightList[_0x1d9df9.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].position);return e},e.uSpotLightDirection=function(){for(var e=[],i=t._visibleLightList[_0x1d9df9.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].direction);return e},e.uSpotLightDirectionEC=function(){for(var e=[],i=t._visibleLightList[_0x1d9df9.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].directionEC);return e},e.uSpotLightDistanceDecayCosPenumbra=function(){return t._spotLightDistanceDecayCosPenumbra},e.uSpotLightExponent=function(){for(var e=[],i=t._visibleLightList[_0x1d9df9.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].exponent);return e},e.uSkyColor=function(){for(var e=[],i=t._lightList[_0x1d9df9.HEMISPHERE].values,n=i.length,r=0;r<n;r++)e.push(i[r].skyColor);return e},e.uGroundColor=function(){for(var e=[],i=t._lightList[_0x1d9df9.HEMISPHERE].values,n=i.length,r=0;r<n;r++)e.push(i[r].groundColor);return e},e};var _0x4348c7=(_0x55e8b0=!0,function(e,t){var i=_0x55e8b0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55e8b0=!1,i}),_0x4e984b=_0x4348c7(void 0,(function(){return _0x4e984b.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e984b).search("(((.+)+)+)+$")})),_0x55e8b0;_0x4e984b();var _0x26a0a0="\n#extension GL_EXT_draw_buffers : enable\n#include <LayerUboDecl>\n#include <WaterLayerUboDecl>\n#include <MeshUboDecl>\nuniform sampler2D uReflectMap;\nuniform sampler2D uNoiseMap;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\nvarying vec3 v_positionEC;\nvarying vec4 vPosition;\n\n\n\nvec4 getNoise( vec2 uv ) {\n vec2 uv0 = ( uv / 103.0 ) + vec2(uTimeVal / 17.0, uTimeVal / 29.0) * uBumpSpeed;\n vec2 uv1 = uv / 107.0 - vec2( uTimeVal / -19.0, uTimeVal / 31.0 ) * uBumpSpeed;\n vec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( uTimeVal / 101.0, uTimeVal / 97.0 ) * uBumpSpeed;\n vec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( uTimeVal / 109.0, uTimeVal / -113.0 ) * uBumpSpeed;\n vec4 noise = texture2D( uNoiseMap, uv0 ) +\n texture2D( uNoiseMap, uv1 ) +\n texture2D( uNoiseMap, uv2 ) +\n texture2D( uNoiseMap, uv3 );\n return noise * 0.5 - 1.0;\n}\n \nvoid sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) \n{\n vec3 sunDirection = czm_lightDirectionEC; \n vec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) ); \n float direction = max( 0.0, dot( eyeDirection, reflection ) ); \n specularColor += pow( direction, shiny ) * uSunColor.rgb * spec; \n diffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * uSunColor.rgb * diffuse; \n} \n\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\n\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ),\n vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ),\n vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n const float toneMappingExposure = 1.0;\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return clamp( color, 0.0, 1.0);\n}\n\n#ifdef COMPUTE_W_VALUE\n varying float wValue;\n#endif\n\nvoid main()\n{\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n vec4 v_PositionMC = vPositionMC; \n v_PositionMC.w = 1.0;\n v_PositionMC = uGeoMatrix * v_PositionMC;\n mat4 scalemat = mat4(0.5, 0.0, 0.0, 0.0, \n 0.0, 0.5, 0.0, 0.0, \n 0.0, 0.0, 0.5, 0.0, \n 0.5, 0.5, 0.5, 1.0); \n vec4 proj = scalemat * vPosition; \n vec3 vMirrorCoord = proj.xyw; \n vec3 worldToEye = -v_positionEC.xyz; \n float distance = length(worldToEye);\n vec4 noise = getNoise(v_PositionMC.xy); \n noise.xy *= uNoiseScale;\n vec3 surfaceNormalEC = czm_normal * normalize( noise.xyz * vec3( 1.5, 1.5, 1.0 ) );\n vec3 diffuseLight = vec3(0.0); \n vec3 specularLight = vec3(0.0); \n vec3 eyeDirection = normalize( worldToEye.xyz ); \n sunLight( surfaceNormalEC, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );\n\n vec2 distortion = surfaceNormalEC.xy * ( 0.001 + 1.0 / distance ) * 3.7;\n vec2 mirrorCoord = vMirrorCoord.xy / vMirrorCoord.z;\n vec3 reflectionSample = vec3( textureLod( uReflectMap, mirrorCoord + distortion, uReflectMapLod));\n float theta = max( dot( eyeDirection, surfaceNormalEC ), 0.0 ); \n float rf0 = 0.3; \n vec3 waterColor = uWaterColor.rgb * uWaterBrightness;\n float reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 ); \n vec3 scatter = max( 0.0, dot( surfaceNormalEC, eyeDirection ) ) * waterColor;\n reflectionSample *= uUseRefectMap;\n vec3 albedo = mix((uSunColor.rgb * diffuseLight * 0.3 + scatter), (vec3(0.1) + reflectionSample * 0.9 + reflectionSample * specularLight), reflectance); \n vec4 finalColor = vec4(albedo, 1.0); \n finalColor.a = uWaterColor.a;\n #ifndef HDR\n finalColor.rgb = ACESFilmicToneMapping(finalColor.rgb);\n #endif\n if(finalColor.a < 0.1)\n {\n discard;\n }\n\n#ifdef HYPSOMETRIC\n if(wValue > uMaxVisibleValue || wValue < uMinVisibleValue)\n {\n finalColor.a = 0.0;\n }\n#endif\n gl_FragColor = finalColor;\n}",_0x2ab64e=(_0x256898=!0,function(e,t){var i=_0x256898?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x256898=!1,i}),_0x4365dc=_0x2ab64e(void 0,(function(){return _0x4365dc.toString().search("(((.+)+)+)+$").toString().constructor(_0x4365dc).search("(((.+)+)+)+$")})),_0x256898;function _0x256445(e){}function _0x43629f(e){return e.verticesCount<=8||16==e.verticesCount}function _0x1b70b4(e){return 1!==e._brightness||1!==e._contrast||0!==e._hue||1!==e._saturation||1!==e._gamma}_0x4365dc(),_0x256445.createShaderProgram=function(e,t,i){var n=t.layer,r=n._context;r.webgl2;var o=!1,a=n._style3D,s="S3MTilesVectex_",l="S3MTilesFragment_",u=new s$U({name:s,sources:[r.webgpu?_0x46f3da:_0x19a31f],useWGSL:r.webgpu}),c=new s$U({name:l,sources:[r.webgpu?_0x1084eb:_0x2b6657],useWGSL:r.webgpu});switch(t.fileType){case d$15.PointCloudFile:l="S3MPointCloudFp_",u=new s$U({name:s="S3MPointCloudVp_",sources:[(o=r.webgpu)?_0x390e70:_0x50ea4a],useWGSL:o}),(c=new s$U({name:l,sources:[o?_0x4e9507:_0x18fcae],useWGSL:o})).defines.push(Y$H.PT_CLOUD),u.defines.push(Y$H.PT_CLOUD);var h=t.volTexture||t.volObj;if((n._bUseHypColorTable||h&&n._bUseHypColorTable)&&(u.defines.push(Y$H.COMPUTE_W_VALUE),u.defines.push(Y$H.HYPSOMETRIC),u.defines.push(Y$H.VOL_AND_HYP),c.defines.push(Y$H.HYPSOMETRIC),c.defines.push(Y$H.COMPUTE_W_VALUE),c.defines.push(Y$H.VOL_AND_HYP)),e$2b((_=t.vertexPackage).nCompressOptions))((m=_.nCompressOptions)&_0x35ed09.SVC_Vertex)==_0x35ed09.SVC_Vertex&&u.defines.push(Y$H.COMPRESS_VERTEX),(m&_0x35ed09.SVC_Normal)==_0x35ed09.SVC_Normal&&u.defines.push(Y$H.COMPRESS_NORMAL),((m&_0x35ed09.SVC_VertexColor)==_0x35ed09.SVC_VertexColor||"MESHOPT"===n._vertexCompressionType)&&u.defines.push(Y$H.COMPRESS_COLOR),(m&_0x35ed09.SVC_TexutreCoord)==_0x35ed09.SVC_TexutreCoord&&u.defines.push(Y$H.COMPRESS_TEXCOORD);e$2b(_.textureCoordIsW)&&t.hasTexCoord&&u.defines.push(Y$H.TEXTURE_COORD_ONE_IS_W),n._clipping&&c.defines.push("CLIP"),n._section&&c.defines.push("CLIPPLANE");break;case d$15.OSGBFile:case d$15.OSGBCacheFile:u=new s$U({name:s,sources:[(o=r.webgpu)?_0x46f3da:_0x19a31f],useWGSL:o});var d=t.materialPass._textures.length;if(t.materialPass._isInvalidOblique)(c=new s$U({name:l="S3MTilesFragment_",sources:[o?_0x1084eb:_0x2b6657],useWGSL:o})).defines.push(Y$H.INVALID_OBLIQUE);else if(t.hasTexCoord){if(d>0){if(c=new s$U({name:l="S3MTilesFragment_",sources:[o?_0x1084eb:_0x2b6657],useWGSL:o}),e$2b(t.materialPass._batchTable)){var f=t.materialPass._batchTable.getVertexShaderCallback(o)(o?_0x46f3da:_0x19a31f);(u=new s$U({name:s,sources:[f],useWGSL:o})).defines.push(Y$H.TextureBatch),c.defines.push(Y$H.TextureBatch)}c.defines.push(Y$H.Has_Texture),d>1&&t.hasTexCoord2&&(e$2b(t.materialPass._batchTableBake)&&(u=new s$U({name:s,sources:[f=t.materialPass._batchTableBake.getVertexShaderCallback(o)(f)],useWGSL:o})).defines.push(Y$H.TextureBatch),u.defines.push(Y$H.MULTI_TEX),c.defines.push(Y$H.MULTI_TEX),2===n.textureEmissionUnit&&c.defines.push(Y$H.SEC_TEX_EMISSION))}t.materialPass.hasTexture&&(u.defines.push(Y$H.COMPUTE_TEXCOORD),c.defines.push(Y$H.COMPUTE_TEXCOORD)),o&&1===t.primitiveType&&(l="S3MTilesPointFragmentWGSL",u=new s$U({name:s="S3MTilesPointVectexWGSL",sources:[_0x519466],useWGSL:o}),c=new s$U({name:s,sources:[_0x2288cf],useWGSL:o}))}!t.hasTexCoord&&d>0&&(c.defines.push(Y$H.Has_Texture),c.defines.push(Y$H.NO_TEXCOORD)),t.materialPass._usePBRTextureBatch&&(u.defines.push(Y$H.USE_BatchPBR),c.defines.push(Y$H.USE_BatchPBR)),n.shadowType===_0x381f49.NONE&&(u.defines.push("NormalVertex"),c.defines.push("NormalVertex")),!r.webgpu&&e$1T.maximumVertexTextureImageUnits>0&&u.defines.push("VertexTextureSupport"),n._isS3MB?((t.instanceMode===_0x721735.S3MB_BIM_INSTANCE||t.instanceMode===_0x721735.S3MB_BIM_INSTANCE_2)&&(u.defines.push("InstanceRenderBIM"),u.defines.push("InstanceS3MB")),t.instanceMode===_0x721735.S3MB_PIPE_INSTANCE&&(u.defines.push("InstanceRenderPipeline"),c.defines.push("InstanceRenderPipeline"),u.defines.push("InstanceS3MB"),_0x43629f(i._vertexPackage)&&(u.defines.push("IS_SQUARE_PIPE"),c.defines.push("IS_SQUARE_PIPE"))),(t.instanceMode===_0x721735.S3MB_BIM_INSTANCE||t.instanceMode===_0x721735.S3MB_BIM_INSTANCE_2||t.instanceMode===_0x721735.S3MB_PIPE_INSTANCE)&&(u.defines.push("Instance"),c.defines.push("Instance"))):(t.instanceMode===_0x721735.SIZE_PER_INSTANCE&&u.defines.push("InstanceRenderBIM"),t.instanceMode===_0x721735.SIZE_PER_DM_INSTANCE&&(u.defines.push("InstanceRenderPipeline"),_0x43629f(i._vertexPackage)&&(u.defines.push("IS_SQUARE_PIPE"),c.defines.push("IS_SQUARE_PIPE"))),(t.instanceMode===_0x721735.SIZE_PER_DM_INSTANCE||t.instanceMode===_0x721735.SIZE_PER_INSTANCE)&&(u.defines.push("Instance"),c.defines.push("Instance"))),n._clipping&&c.defines.push("CLIP"),n._section&&c.defines.push("CLIPPLANE"),t.volObj?(u.defines.push(Y$H.VOLUME),c.defines.push(Y$H.VOLUME)):t.volTexture&&(u.defines.push(Y$H.VOLUME2),c.defines.push(Y$H.VOLUME2)),e$2b(t.materialPass._mapTextures)&&Object.getOwnPropertyNames(t.materialPass._mapTextures).length>0&&c.defines.push("Map"),_0x1b70b4(n)&&c.defines.push(Y$H.ADJUST_COLOR),n._hasLight&&4===t.primitiveType&&(u.defines.push(Y$H.HAS_LIGHT),c.defines.push(Y$H.HAS_LIGHT)),t.hasNormal&&!t.ignoreNormal&&(u.defines.push(Y$H.HAS_NORMAL),c.defines.push(Y$H.HAS_NORMAL)),t.ignoreNormal&&c.defines.push(Y$H.IGNORE_NORMAL),n._selectColorType===Zr$2.REPLACE?(u.defines.push(Y$H.REPLACE_SELECT_TYPE),c.defines.push(Y$H.REPLACE_SELECT_TYPE)):n.isSilhouette()&&(u.defines.push(Y$H.SILHOUETTE_SELECT_TYPE),c.defines.push(Y$H.SILHOUETTE_SELECT_TYPE)),(n._operationType&_0x4580ad.CLIP)===_0x4580ad.CLIP&&c.defines.push(Y$H.CLIP_FILT_BY_ID),n._PBRMaterialType!==je$g.NONE&&(u.defines.push(Y$H.PBR),c.defines.push(Y$H.PBR)),n._flattening&&(u.defines.push(Y$H.FALTTEN),r.floatingPointTexture&&u.defines.push(Y$H.UseFloatTexture)),n._hasOverlay&&(u.defines.push(Y$H.OVERLAY),c.defines.push(Y$H.OVERLAY));h=t.volTexture||t.volObj;if((!n._bVolume&&n._bUseHypColorTable||h&&n._bUseHypColorTable)&&(u.defines.push(Y$H.COMPUTE_W_VALUE),c.defines.push(Y$H.COMPUTE_W_VALUE),u.defines.push(Y$H.HYPSOMETRIC),c.defines.push(Y$H.HYPSOMETRIC),u.defines.push(Y$H.VOL_AND_HYP),c.defines.push(Y$H.VOL_AND_HYP)),n._hasEmissiveTexAtlas&&(u.defines.push(Y$H.COMPUTE_W_VALUE),c.defines.push(Y$H.COMPUTE_W_VALUE),u.defines.push(Y$H.EMISSION_TEXTURE_ATLAS),c.defines.push(Y$H.EMISSION_TEXTURE_ATLAS)),e$2b(n._categorieTexture)&&u.defines.push(Y$H.W_VISIBLE),e$2b(n._vertexWeightMode)&&n._vertexWeightMode===_0x7aa085.EdgeLengthMin&&n._triangleFiltratePixel>0&&u.defines.push(Y$H.TRIANGLE_FILTRATE),e$2b((_=t.vertexPackage).nCompressOptions))((m=_.nCompressOptions)&_0x35ed09.SVC_Vertex)==_0x35ed09.SVC_Vertex&&u.defines.push(Y$H.COMPRESS_VERTEX),(m&_0x35ed09.SVC_Normal)==_0x35ed09.SVC_Normal&&u.defines.push(Y$H.COMPRESS_NORMAL),((m&_0x35ed09.SVC_VertexColor)==_0x35ed09.SVC_VertexColor||"MESHOPT"===n._vertexCompressionType)&&u.defines.push(Y$H.COMPRESS_COLOR),(m&_0x35ed09.SVC_TexutreCoord)==_0x35ed09.SVC_TexutreCoord&&(u.defines.push(Y$H.COMPRESS_TEXCOORD),"MESHOPT"===n._vertexCompressionType&&u.defines.push("UINT_TEXCOORD0"));n._lastSelectSkeletonId>-1&&u.defines.push("HAS_SKELETONSELECTED"),(e$2b(n._imageryLayer)||n._needCoverImageryLayer)&&e$2b(i._imagerys)&&i._imagerys.length>0&&e$2b(t.attributeLocations.img)&&(u.defines.push("IMAGERY"),c.defines.push("IMAGERY")),n.partlyTransparent&&e$2b(t.materialPass._bTransparentSorting)&&c.defines.push("PARTLY_TRANSPARENT"),n._scene.pickPointEnabled&&(u.defines.push(Y$H.VERTEX_CAPTURE),c.defines.push(Y$H.VERTEX_CAPTURE));var p=e$2b(n.themeStyle)&&e$2b(n.themeStyle.pbrMaterialIndex);(t.materialPass._usePBR||n._usePBR||p)&&(c.defines.push(Y$H.BRDF),t.context.textureFloatLinear&&c.defines.push("OES_texture_float_linear"),p&&(u.defines.push(Y$H.PBR_THEME),c.defines.push(Y$H.PBR_THEME),c.defines.push("NUM_PBR_MATERIALS "+e.pbrMaterialsArr.length)),(t.materialPass._baseColorTextureIndex>-1&&e$2b(t.materialPass.baseColorTexture)||e$2b(n._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture))&&t.hasTexCoord&&c.defines.push(Y$H.HAS_BASE_TEXTURE),(t.materialPass._metallicRoughnessTextureIndex>-1&&e$2b(t.materialPass.metallicRoughnessTexture)||e$2b(n._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture))&&t.hasTexCoord&&c.defines.push(Y$H.HAS_MetallicRoughness_TEXTURE),(t.materialPass._normalTextureIndex>-1&&e$2b(t.materialPass.normalTexture)||e$2b(n._PBRMaterialParams.pbrMetallicRoughness.normalTexture))&&t.hasTexCoord&&c.defines.push(Y$H.HAS_NORMAL_TEXTURE),(t.materialPass._emissiveTextureIndex>-1&&e$2b(t.materialPass.emissiveTexture)||e$2b(n._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture))&&c.defines.push(Y$H.HAS_EMISSIVE_TEXTURE),(t.materialPass._occlusionTextureIndex>-1||e$2b(n._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)&&n._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture instanceof t$V)&&t.hasTexCoord&&c.defines.push(Y$H.HAS_OCCLUSION_TEXTURE),n._hasSnowEffect&&c.defines.push(Y$H.HAS_SNOW),e$2b(n._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&n._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture&&n._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof t$V&&c.defines.push(Y$H.HAS_RAIN),e$2b(t.materialPass._alphaMode)&&t.materialPass._alphaMode===_0x5f0e97.MASK&&c.defines.push(Y$H.MASK),(e$2b(e.specularEnvironmentMaps)||e$2b(e.hdrEnvMap))&&(c.defines.push(Y$H.IBL),e$2b(e.specularEnvironmentMaps)&&c.defines.push(Y$H.KtxEnvMap)),i._isPBR=!0),n._PBRMaterialParams.pbrMetallicRoughness.emissionTextureIndex>0&&c.defines.push(Y$H.SEC_TEX_EMISSION),n.visibleDistanceMax<6378137&&n.translucencyByDistance&&c.defines.push(Y$H.VISIBLEDISTANCEMAX),e$2b(t.unFinalResolution)&&t.unFinalResolution&&(u.defines.push("FINAL_RESOLUTION_CLIP"),c.defines.push("FINAL_RESOLUTION_CLIP"));break;case d$15.ClampGroundPolygon:case d$15.ClampObjectPolygon:var _,m;if(e$2b((_=t.vertexPackage).clampRegionEdge))l="S3MTilesShadowVolumeFP_",u=new s$U({name:s="S3MTilesLineShadowVectex_",sources:[_0x4632a6]}),c=new s$U({name:l,sources:[_0x5b2edf]});else{var g=t.materialPass._textures.length>0||t.hasSymbolTexture;l="S3MTilesShadowVolumeFP_",u=new s$U({name:s="S3MTilesRegionShadowVectex_",sources:[_0x3b4223]}),c=new s$U({name:l,sources:[_0x5e3105]}),g&&(u.defines.push("HAS_TEXTURE"),c.defines.push("HAS_TEXTURE"))}if(e$2b(_.nCompressOptions))((m=_.nCompressOptions)&_0x35ed09.SVC_Vertex)==_0x35ed09.SVC_Vertex&&u.defines.push(Y$H.COMPRESS_VERTEX),(m&_0x35ed09.SVC_Normal)==_0x35ed09.SVC_Normal&&u.defines.push(Y$H.COMPRESS_NORMAL),(m&_0x35ed09.SVC_TexutreCoord)==_0x35ed09.SVC_TexutreCoord&&u.defines.push(Y$H.COMPRESS_TEXCOORD);break;case d$15.ExtendClampPolygonCache:l="S3MTilesShadowVolumeFP_",u=new s$U({name:s="S3MTilesExtendPolygonShadowVP_",sources:[_0x3410ec]}),c=new s$U({name:l,sources:[_0x5e3105]});break;case d$15.ClampGroundLine:l="S3MTilesClampGroundLineFP_",u=new s$U({name:s="S3MTilesClampGroundLineVectex_",sources:[_0x4c08bd]}),c=new s$U({name:l,sources:[_0x5e3105]});break;case d$15.ClampGroundAndObjectLineCache:l="S3MTilesShadowVolumeFP_",u=new s$U({name:s="S3MTilesLineShadowVectex_",sources:[_0x4632a6]}),c=new s$U({name:l,sources:[_0x5b2edf]});break;case d$15.ClampObjectLine:l="S3MTilesShadowVolumeFP_",u=new s$U({name:s="S3MTilesLineShadowVectex_",sources:[_0x4c08bd]}),c=new s$U({name:l,sources:[_0x5e3105]});break;case d$15.IconPoint:a.billboardMode===yr$1.FixedZ?u=new s$U({name:s="BillboardAxialVp_",sources:[_0x5b6bf2]}):a.billboardMode===yr$1.FixedXYZ?u=new s$U({name:s="BillboardPixelSizeWithAngleVp_",sources:[_0x539845]}):u=new s$U({name:s="S3MTilesBillboardPixelSizeVp_",sources:[_0x21a0db]}),c=new s$U({name:l="S3MTilesCommonOntTextureFP_",sources:[_0x4da3bc]}),u.defines.push("ICON"),e$2b(a.fixedPixelSize)&&!a.fixedPixelSize&&u.defines.push("EYE_DISTANCE_SCALING"),n._clipping&&c.defines.push("CLIP"),n._section&&c.defines.push("CLIPPLANE"),t.hasNormal&&!t.ignoreNormal&&(u.defines.push(Y$H.HAS_NORMAL),c.defines.push(Y$H.HAS_NORMAL));break;case d$15.Text:s="S3MTilesBillboardPixelSizeVp_",u=a.billboardMode===yr$1.FixedXYZ?new s$U({name:s,sources:[_0x539845]}):new s$U({name:s,sources:[_0x21a0db]}),t.materialPass._textures.length>1?c=new s$U({name:l="S3MTilesFontWithHaloFp_",sources:[_0x223db1]}):t.materialPass._textures.length>0?c=new s$U({name:l="S3MTilesCommonOntTextureFP_",sources:[_0x4da3bc]}):c=new s$U({name:l="S3MTilesCommonOneTextureFP_",sources:[_0x4da3bc]}),n._clipping&&c.defines.push("CLIP"),t.layer._section&&c.defines.push("CLIPPLANE"),t.hasNormal&&!t.ignoreNormal&&(u.defines.push(Y$H.HAS_NORMAL),c.defines.push(Y$H.HAS_NORMAL)),t.hasTexCoord2&&c.defines.push(Y$H.TEXCOORD2);break;case d$15.ExtendRegion3D:l="DynamicExtendRegionFp_",u=new s$U({name:s="DynamicExtendRegionVp_",sources:[_0x35073f]}),c=new s$U({name:l,sources:[_0x728fb1]}),t.materialPass._textures.length>0&&c.defines.push("HAS_TEXTURE"),n._hasLight&&(u.defines.push(Y$H.HAS_LIGHT),c.defines.push(Y$H.HAS_LIGHT));break;case d$15.RegionEffect:l="RegionMaterialFp_",u=new s$U({name:s="RegionMaterialVp_",sources:[_0xb28fe0]}),c=new s$U({name:l,sources:[_0x362543]}),n._clipping&&c.defines.push("CLIP"),n._hasExcavation&&(u.defines.push(Y$H.EXCAVATION),c.defines.push(Y$H.EXCAVATION)),n._hasServerExcavation&&(u.defines.push("SERVEREXCAVATION"),c.defines.push("SERVEREXCAVATION"));break;case d$15.PolylineEffect:l="PolylineFp_",u=new s$U({name:s="PolylineVp_",sources:[_0x1e7638]}),c=new s$U({name:l,sources:[_0x54ee86]}),n._clipping&&c.defines.push("CLIP"),n._hasExcavation&&(u.defines.push(Y$H.EXCAVATION),c.defines.push(Y$H.EXCAVATION)),n._hasServerExcavation&&(u.defines.push("SERVEREXCAVATION"),c.defines.push("SERVEREXCAVATION"));break;case d$15.ClampGroundRealtimeRasterCache:c=new s$U({name:l="S3MTilesFragmentRaster_",sources:[_0x21bee4]}),u=new s$U({name:s="S3MTilesVectexRaster_",sources:[_0x370b02]}),n._selectColorType===Zr$2.REPLACE&&(u.defines.push(Y$H.REPLACE_SELECT_TYPE),c.defines.push(Y$H.REPLACE_SELECT_TYPE)),(t.hasSymbolTexture||t.materialPass._textures.length>0)&&(u.defines.push(Y$H.TEXCOORD),c.defines.push(Y$H.TEXCOORD))}(t.fileType===d$15.ClampGroundRealtimeRasterCache&&t.hasTexCoord2&&(e$2b(n._polylineEffectUbo)||(n._polylineEffectUbo=new _0x280589(n)),l="PolylineFp_",u=new s$U({name:s="PolylineVp_",sources:[_0x45c27e]}),c=new s$U({name:l,sources:[_0x54ee86]})),t.hasTexCoord&&(u.defines.push(Y$H.TEXCOORD),c.defines.push(Y$H.TEXCOORD)),t.hasTexCoord2&&(u.defines.push(Y$H.TEXCOORD2),c.defines.push(Y$H.TEXCOORD2)),n.horizontalline&&(u.defines.push(Y$H.COMPUTE_W_VALUE),c.defines.push(Y$H.COMPUTE_W_VALUE),c.defines.push(Y$H.HORIZONTAL_LINE)),n._transparentBackColorTolerance>0&&c.defines.push(Y$H.TRANSPARENT_BACK_COLOR),(n.swipeEnabled||n.splitDirection!==_0x405774.NONE)&&c.defines.push(Y$H.APPLY_SWIPE),"MESHOPT"===n._vertexCompressionType?u.defines.push("MeshOPT_Compress"):"DRACO"===n._vertexCompressionType&&u.defines.push("DRACO_Compress"),e$2b(t.vertexPackage.customVertexAttribute)&&e$2b(t.vertexPackage.customVertexAttribute.TextureCoordMatrix)&&u.defines.push("USE_TextureCoordMatrix"),e$2b(t.vertexPackage.customVertexAttribute)&&e$2b(t.vertexPackage.customVertexAttribute.VertexWeight)&&u.defines.push("USE_VertexWeight"),i._bMultiTemporalWeight&&(u.defines.push("MultiTemporalWeight"),c.defines.push("MultiTemporalWeight"),n.temporalSetting.changeZValue&&u.defines.push("ChangeZValue")),e$2b(e.lightSource))&&(c.defines.push("MAX_POINT_LIGHT_COUNT "+s$I.MaxPointLightCount),c.defines.push("MAX_SPOT_LIGHT_COUNT "+s$I.MaxSpotLightCount),c.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$I.MaxDirectionLightCount),e.lightSource.directionalLight.length>0&&c.defines.push(Y$H.HAS_DIR_LIGHTS),e.lightSource._visibleLightList[_0x1d9df9.POINT].length>0&&c.defines.push(Y$H.HAS_POINT_LIGHTS),e.lightSource._visibleLightList[_0x1d9df9.SPOT].length>0&&c.defines.push(Y$H.HAS_SPOT_LIGHTS),e.lightSource.hemisphereLight.length>0&&c.defines.push(Y$H.HAS_HEMISPHERE_LIGHTS));if(n._hasExcavation&&(u.defines.push(Y$H.EXCAVATION),c.defines.push(Y$H.EXCAVATION)),n._hasServerExcavation&&(u.defines.push("SERVEREXCAVATION"),c.defines.push("SERVEREXCAVATION")),t.hasInstanceSkeletonMatrix&&u.defines.push(Y$H.UseInstanceSkeletonMatrix),n.mixColorType===_0x203e3b.REPLACE&&(u.defines.push(Y$H.REPLACE_COLOR_TYPE),c.defines.push(Y$H.REPLACE_COLOR_TYPE)),t.hasVertexColor&&u.defines.push("VertexColor"),t.isInstanceModel&&u.defines.push("InstanceModel"),t.hasTranslation&&u.defines.push(Y$H.Translation),1===t.primitiveType&&(u.defines.push(Y$H.POINT),c.defines.push(Y$H.POINT)),2===t.primitiveType&&c.defines.push(Y$H.LineVector),t.materialPass._RGBTOBGR&&c.defines.push(Y$H.RGBTOBGR),n.enableFusion&&u.defines.push(Y$H.FusionMode),e$2b(i._batchTable)&&(u.defines.push("BatchTable"),i._batchTable.hasMultiRow()&&u.defines.push("BatchTableMultiRow")),e$2b(n._floodFlagTexture)&&(u.defines.push(Y$H.FLOOD_ANALYSIS),c.defines.push(Y$H.FLOOD_ANALYSIS)),e$2b(i._batchTable)){for(var x=[f=i._batchTable.getVertexShaderCallback(o)(u.sources[0])],v=1;v<u.sources.length;v++)x.push(u.sources[v]);u=new s$U({name:s,defines:u.defines,sources:x,useWGSL:o})}return e$2b(n._effect)&&1===n._effect._type&&u.defines.push("POLYLINE_DASH"),e$2b(n._associateMaterialUrl)&&i._material.isAssociateMaterial&&c.defines.push("BaseColorReplace"),o&&(u.defines.push("WEBGPU"),c.defines.push("WEBGPU")),3===t.nVertexDim&&u.defines.push(Y$H.HypColorByZValue),i._specularEnvironmentMaps=e.specularEnvironmentMaps,i._hdrEnvMap=e.hdrEnvMap,i._createImageryShader(n,c),r$13.fromCache({context:t.context,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:t.attributeLocations,useWGSL:o})},_0x256445.createWaterShaderProgram=function(e,t,i,n){var r=new s$U({name:"FresnelVp",sources:[_0x3b10bb]}),o=new s$U({name:"FresnelFp",sources:[_0xace9b2]});return t._clipping&&o.defines.push("CLIP"),t._section&&o.defines.push("CLIPPLANE"),e$2b(n._batchTable)&&(r.defines.push("BatchTable"),n._batchTable.hasMultiRow()&&r.defines.push("BatchTableMultiRow")),e$2b(t._rsColor.polygonOffset)&&t._rsColor.polygonOffset.enabled&&o.defines.push("POLYGON_OFFSET"),t._hasExcavation&&(r.defines.push(Y$H.EXCAVATION),o.defines.push(Y$H.EXCAVATION)),t._hasServerExcavation&&(r.defines.push("SERVEREXCAVATION"),o.defines.push("SERVEREXCAVATION")),(t.swipeEnabled||t.splitDirection!==_0x405774.NONE)&&o.defines.push(Y$H.APPLY_SWIPE),e$2b(t._effect)&&1===t._effect._type&&r.defines.push("POLYLINE_DASH"),r$13.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:i})},_0x256445.createMultiTemporalWaterShaderProgram=function(e,t,i,n,r){var o=new s$U({name:"S3MTilesVectex",sources:[e.webgpu?_0x46f3da:_0x19a31f]}),a=new s$U({name:"MultiTemporalFresnelFp",sources:[_0x26a0a0]});return e$2b(n._batchTable)&&(o.defines.push("BatchTable"),n._batchTable.hasMultiRow()&&o.defines.push("BatchTableMultiRow")),e$2b(r.vertexPackage.customVertexAttribute)&&e$2b(r.vertexPackage.customVertexAttribute.VertexWeight)&&o.defines.push("USE_VertexWeight"),n._bMultiTemporalWeight&&(o.defines.push("MultiTemporalWeight"),a.defines.push("MultiTemporalWeight"),t.temporalSetting.changeZValue&&o.defines.push("ChangeZValue")),t.multiTemporalUseWater&&(o.defines.push(Y$H.COMPUTE_W_VALUE),a.defines.push(Y$H.COMPUTE_W_VALUE),o.defines.push(Y$H.HYPSOMETRIC),a.defines.push(Y$H.HYPSOMETRIC),o.defines.push(Y$H.VOL_AND_HYP),a.defines.push(Y$H.VOL_AND_HYP)),r$13.fromCache({context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:i})};var _0x4034cd=(_0x1c0a66=!0,function(e,t){var i=_0x1c0a66?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c0a66=!1,i}),_0x17cfcb=_0x4034cd(void 0,(function(){return _0x17cfcb.toString().search("(((.+)+)+)+$").toString().constructor(_0x17cfcb).search("(((.+)+)+)+$")})),_0x1c0a66;_0x17cfcb();var _0x3fd475=function(){this.model=void 0,this.frameState=void 0,this.layer=void 0};function o$T(){this._fProgress=0,this._nLocation=-1,this._changeZValue=!0}_0x3fd475.prototype.set=function(e,t,i){this.frameState=e,this.layer=t,this.model=i},_0x3fd475.prototype.execute=function(){var e,t=this.frameState,i=t.context,n=this.model,r=this.layer,o=n._vertexPackage,a=o.attrLocation,s=r._fileType,l=n._arrIndexPackage&&n._arrIndexPackage[0];e$2b(n._material)?e=n._material:(e$2b(l)&&"string"==typeof l.materialCode&&(l.materialCode=l.materialCode.replace(/\0/,"")),e=e$2b(l)&&e$2b(l.materialCode)?n._mapPass[l.materialCode]:_0x21d1b1.Default);var u={};u.primitiveType=s===d$15.PointCloudFile?W$18.POINTS:e$2b(l)?l.primitiveType:W$18.TRIANGLES,u.context=i,u.fileType=s,u.layer=r,u.instanceMode=o.instanceMode,u.volObj=n._volObj,u.volTexture=n._volTexture,u.materialPass=e,u.attributeLocations=a,u.nVertexDim=n._vertexDim,u.vertexPackage=o,u.hasNormal=e$2b(a.aNormal)&&!r._ignoreNormal,u.hasTexCoord=e$2b(a.aTexCoord0),u.hasTexCoord2=e$2b(a.aTexCoord1),u.hasSymbolTexture=e$2b(n._symbolTextureUrl),u.hasInstanceSkeletonMatrix=e$2b(n._instanceSkeletonMatrix),u.hasVertexColor=e$2b(a.aColor),u.isInstanceModel=n._isInstanceModel,u.hasTranslation=n._idsTranslateMap.length>0,e$2b(r.waterEffectSet)?n._sp=_0x256445.createWaterShaderProgram(i,r,a,n):r.multiTemporalUseWater?n._sp=_0x256445.createMultiTemporalWaterShaderProgram(i,r,a,n,u):(n._sp=_0x256445.createShaderProgram(t,u,n),r.LoadingPriority===_0x10659f.UsePagedLodInfo&&(u.unFinalResolution=!0,n._spUnFinalResolution=_0x256445.createShaderProgram(t,u,n)))},Object.defineProperties(o$T.prototype,{progress:{get:function(){return this._fProgress},set:function(e){this._fProgress=e}},location:{get:function(){return this._nLocation},set:function(e){this._nLocation=e}},changeZValue:{get:function(){return this._changeZValue},set:function(e){this._changeZValue=e}}}),o$T.clone=function(e,t){if(e$2b(e))return e$2b(t)||(t=new o$T),t._fTemporalPercentage=e._fTemporalPercentage,t._nTemporalPos=e._nTemporalPos,t};var _0x28ce6a=(_0x280771=!0,function(e,t){var i=_0x280771?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x280771=!1,i}),_0x22b946=_0x28ce6a(void 0,(function(){return _0x22b946.toString().search("(((.+)+)+)+$").toString().constructor(_0x22b946).search("(((.+)+)+)+$")})),_0x280771;_0x22b946();const _0x155d61="uTexture",_0x5ff3ad="uSecTexture",_0x435ce0="batchTexture",_0x39bd19="uPBRTexture",_0x82d072="uBaseTexture",_0x23e955="uNormalTexture",_0x4916f0="uMetallicRoughnessTexture",_0x30159e="uEmissionTexture",_0x170378="uOcclusionTexture",_0xf04787="uSnowMaskTexture",_0x1f478b="uSnowNormalTexture",_0x51dca9="uRippleTexture",_0x1ad3b1="batchTexture_baseTex",_0x383288="batchTexture_bakeTex",_0x2dced9="u_dayTextures",_0x40daa0=5;function _0xfa6ee5(e,t,i){var n=_0x3e2f69.call(this)||this;n._ro=e,n._materialPass=t,n._layer=i,n._name=_0x27131a.MATERIAL,n._context=i._context,n._uniformState=n._context.uniformState,n._textures={},n._dayTextures=[],n._textureDirtyFrameCount=-1,this._initUniformMap()}_0x3e2f69&&(_0xfa6ee5.__proto__=_0x3e2f69),_0xfa6ee5.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0xfa6ee5.prototype.constructor=_0x3e2f69,Object.defineProperties(_0xfa6ee5.prototype,{}),_0xfa6ee5.prototype._initUBOStruct=function(){this._ubo.addUniform("uTexMatrix",16),this._ubo.addUniform("uDiffuseColor",4),this._ubo.addUniform("uAmbientColor",4),this._ubo.addUniform("uSpecularColor",4),this._ubo.addUniform("uTexUVOffset",4),this._ubo.addUniform("uTextureDim",4),this._ubo.addUniform("uTextureWidths",2),this._ubo.addUniform("batchTextureStep_baseTex",4),this._ubo.addUniform("batchTextureDimensions_baseTex",2),this._ubo.addUniform("batchTextureStep_bakeTex",4),this._ubo.addUniform("batchTextureDimensions_bakeTex",2),this._ubo.addUniform("uBaseColorFactor",4),this._ubo.addUniform("uEmissiveFactor",4),this._ubo.addUniform("uEmissiveUVOffsetAndTiling",4),this._ubo.addUniform("uMetallicRoughnessIntensityScale",3),this._ubo.addUniform("uPBRTexWH",2),this._ubo.addUniform("uNormalTextureScale",1),this._ubo.addUniform("uAlphaMode",1),this._ubo.addUniform("uAlphaCutoff",1),this._ubo.addUniform("uPbrParTextureWidth",1)},_0xfa6ee5.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())};var _0x5e7812=new e$29;_0xfa6ee5.prototype._updateTexUVOffset=function(){_0x5e7812.x=0,_0x5e7812.y=0,_0x5e7812.z=1,_0x5e7812.w=1;var e=this._materialPass,t=this._layer,i=e._baseColorTextureMotion;if(e$2b(i)){var n=i.OffsetPeriod,r=i.OffsetSpeedU,o=i.OffsetSpeedV,a=i.TilingPeriod,s=i.TilingSpeedU,l=i.TilingSpeedV,u=performance.now()/1e3;if(n>0){var c=u%n;_0x5e7812.x=c*r,_0x5e7812.y=c*o}if(a>0){var h=u%a;_0x5e7812.z=1+h*s,_0x5e7812.w=1+h*l}}else if(e$2b(t._textureUVSpeed)&&(0!==t._textureUVSpeed.x||0!==t._textureUVSpeed.y)){var d=performance.now()/1e3;_0x5e7812.x=t._textureUVSpeed.x*d,_0x5e7812.y=t._textureUVSpeed.y*d}this._ubo.updateFloat4("uTexUVOffset",_0x5e7812.x,_0x5e7812.y,_0x5e7812.z,_0x5e7812.w)},_0xfa6ee5.prototype._updateEmissiveUVOffsetAndTiling=function(){const e=this._materialPass,t=this._layer._PBRMaterialParams.pbrMetallicRoughness;_0x5e7812.x=0,_0x5e7812.y=0,_0x5e7812.z=1,_0x5e7812.w=1;const i=u$_(e._emissiveTextureMotion,t.emissiveTextureMotion);if(e$2b(i)){var n=performance.now()/1e3,r=i.OffsetPeriod,o=i.OffsetSpeedU,a=i.OffsetSpeedV,s=i.TilingPeriod,l=i.TilingSpeedU,u=i.TilingSpeedV;if(i&&r>0){var c=n%r;_0x5e7812.x=c*o,_0x5e7812.y=c*a}if(i&&s>0){var h=n%s;_0x5e7812.z=1+h*l,_0x5e7812.w=1+h*u}}this._ubo.updateFloat4("uEmissiveUVOffsetAndTiling",_0x5e7812.x,_0x5e7812.y,_0x5e7812.z,_0x5e7812.w)},_0xfa6ee5.prototype._updateTextureBatchTable=function(){const e=this._ubo,t=this._materialPass,i=t._batchTable;if(!e$2b(i))return;this._setTextureByType(_0x1ad3b1,i._texture);const n=i._textureStep;e.updateFloat4("batchTextureStep_baseTex",n.x,n.y,n.z,n.w);const r=i._textureDimensions;e.updateFloat2("batchTextureDimensions_baseTex",r.x,r.y);const o=t._batchTableBake;if(!e$2b(o))return;this._setTextureByType(_0x383288,o._texture);const a=o._textureStep;e.updateFloat4("batchTextureStep_bakeTex",a.x,a.y,a.z,a.w);const s=o._textureDimensions;e.updateFloat2("batchTextureDimensions_bakeTex",s.x,s.y)};var _0x411a6c=new o$1p;_0xfa6ee5.prototype._updateMetallicRoughnessIntensityScale=function(){var e=this._materialPass,t=this._layer;_0x411a6c.x=u$_(e._metallicFactor,t._PBRMaterialParams.pbrMetallicRoughness.metallicFactor),_0x411a6c.y=u$_(e._roughnessFactor,t._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor),_0x411a6c.z=1,e$2b(e._intensityScale)&&e._intensityScale>0?_0x411a6c.z=e._intensityScale:e$2b(t._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&t._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0&&(_0x411a6c.z=t._PBRMaterialParams.pbrMetallicRoughness.intensityScale),this._ubo.updateFloat3("uMetallicRoughnessIntensityScale",_0x411a6c.x,_0x411a6c.y,_0x411a6c.z)};var _0x53d3fc=new o$1o;_0xfa6ee5.prototype._updateTextureWidths=function(){var e=this._materialPass;e$2b(e.baseColorTexture)?this._ubo.updateFloat2("uTextureWidths",e.baseColorTexture.width,e.baseColorTexture.height):(e$2b(e._textures[0])?_0x53d3fc.x=e._textures[0].width:_0x53d3fc.x=1,e$2b(e._textures[1])?_0x53d3fc.y=e._textures[1].width:_0x53d3fc.y=1,this._ubo.updateFloat2("uTextureWidths",_0x53d3fc.x,_0x53d3fc.y))};var _0x553766=new e$29;_0xfa6ee5.prototype._updateBatchTextureWidths=function(){const e=this._materialPass;if(!e$2b(e._batchTable))return;let t=e._textures[0];t=t.renderable?t:e$2b(e._ancestorTexture)?e._ancestorTexture:t,_0x553766.x=t._width,_0x553766.y=t._height;let i=e._textures[1];e$2b(i)&&(i=i.renderable?i:e$2b(e._ancestorTextureBake)?e._ancestorTextureBake:i,_0x553766.z=i._width,_0x553766.w=i._height),this._ubo.updateFloat4("uTextureDim",_0x553766.x,_0x553766.y,_0x553766.z,_0x553766.w)},_0xfa6ee5.prototype._updatePbrParTextureValue=function(){var e=this._materialPass,t=e.pbrParamTexture;this._ubo.updateFloat2("uPBRTexWH",t.width,t.height);let i=1;e$2b(e.baseColorTexture)?i=e.baseColorTexture.width:e$2b(e.normalTexture)?i=e.normalTexture.width:e$2b(e.metallicRoughnessTexture)?i=e.metallicRoughnessTexture.width:e$2b(e.emissiveTexture)&&(i=e.emissiveTexture.width),this._ubo.updateFloat("uPbrParTextureWidth",i)},_0xfa6ee5.prototype._getFirstTexture=function(){var e;e$2b(this._ro._symbolTextureUrl)?e$2b(e=_0x4dad4e.getTexture(this._ro._symbolTextureUrl))?this._setTextureByType(_0x155d61,e):this._setTextureByType(_0x155d61,this._layer._context.defaultTexture):e$2b(this._materialPass._textures[0])?((e=this._materialPass._textures[0]).isTexBlock&&(e=e.renderable&&e.ready?e:e$2b(this._materialPass._ancestorTexture)?this._materialPass._ancestorTexture:e),this._setTextureByType(_0x155d61,e)):this._setTextureByType(_0x155d61,this._layer._context.defaultTexture)},_0xfa6ee5.prototype._getSecTexture=function(){if(!(this._materialPass._textures.length<2)){var e=this._materialPass._textures[1];e.isTexBlock&&(e=e.renderable&&e.ready?e:e$2b(this._materialPass._ancestorTextureBake)?this._materialPass._ancestorTextureBake:this._layer._context.defaultTexture),this._setTextureByType(_0x5ff3ad,e)}},_0xfa6ee5.prototype._getBaseColorTexture=function(){e$2b(this._materialPass._baseColorTextureIndex)&&this._materialPass._baseColorTextureIndex>-1?this._setTextureByType(_0x82d072,this._materialPass.baseColorTexture):this._setTextureByType(_0x82d072,this._layer._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture)},_0xfa6ee5.prototype._getNormalTexture=function(){if(e$2b(this._materialPass._normalTextureIndex)&&this._materialPass._normalTextureIndex>-1)return this._materialPass.normalTexture?void this._setTextureByType(_0x23e955,this._materialPass.normalTexture):void this._setTextureByType(_0x23e955,this._materialPass._textures[this._materialPass._normalTextureIndex]);this._setTextureByType(_0x23e955,this._layer._PBRMaterialParams.pbrMetallicRoughness.normalTexture)},_0xfa6ee5.prototype._getEmissiveTexture=function(){if(e$2b(this._materialPass.emissiveTexture))this._setTextureByType(_0x30159e,this._materialPass.emissiveTexture);else{var e=this._materialPass._emissiveTextureIndex;e>-1&&e$2b(this._materialPass._textures[e])?this._setTextureByType(_0x30159e,this._materialPass._textures[e]):this._setTextureByType(_0x30159e,this._layer._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture)}},_0xfa6ee5.prototype._getMetalicRoughnessTexture=function(){if(e$2b(this._materialPass._metallicRoughnessTextureIndex)&&this._materialPass._metallicRoughnessTextureIndex>-1)return e$2b(this._materialPass.metallicRoughnessTexture)?void this._setTextureByType(_0x4916f0,this._materialPass.metallicRoughnessTexture):void this._setTextureByType(_0x4916f0,this._materialPass._textures[this._materialPass._metallicRoughnessTextureIndex]);e$2b(this._layer._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture)&&this._layer._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture instanceof t$V?this._setTextureByType(_0x4916f0,this._layer._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture):this._setTextureByType(_0x4916f0,this._context.defaultTexture)},_0xfa6ee5.prototype._getOcclusionTexture=function(){if(e$2b(this._materialPass._occlusionTextureIndex)&&this._materialPass._occlusionTextureIndex>-1)return this._materialPass.occlusionTexture?void this._setTextureByType(_0x170378,this._materialPass.occlusionTexture):e$2b(this._materialPass._textures[this._materialPass._occlusionTextureIndex])?void this._setTextureByType(_0x170378,this._materialPass._textures[this._materialPass._occlusionTextureIndex]):void this._setTextureByType(_0x170378,this._layer._context.defaultTexture);this._setTextureByType(_0x170378,this._layer._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)},_0xfa6ee5.prototype._getSnowMaskTexture=function(){this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect&&this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture instanceof t$V?this._setTextureByType(_0xf04787,this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture):this._setTextureByType(_0xf04787,this._context.defaultTexture)},_0xfa6ee5.prototype._getSnowNormalTexture=function(){this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect&&this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture instanceof t$V?this._setTextureByType(_0x1f478b,this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture):this._setTextureByType(_0x1f478b,this._context.defaultTexture)},_0xfa6ee5.prototype._getRippleTexture=function(){this._layer._PBRMaterialParams.pbrMetallicRoughness.rainEffect&&this._layer._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof t$V?this._setTextureByType(_0x51dca9,this._layer._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture):this._setTextureByType(_0x51dca9,this._context.defaultTexture)},_0xfa6ee5.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0xfa6ee5.prototype._isBatchTextureRenderable=function(){const e=this._materialPass;if(!e$2b(e._batchTable))return!1;let t=e._textures[0];if(!e$2b(t))return!1;let i=t.renderable,n=e._textures[1];return e$2b(n)&&(i=i&&n.renderable),!i},_0xfa6ee5.prototype.update=function(e){if(!e.webgpu&&!e.webgl2||!this._isValueDirty)return;var t=this._ro;this._isTextureDirty=!1,e$2b(this._ubo)||this._initUBO(e);var i=this._materialPass,n=this._layer;_0x3e2f69.writeMatrix4ToUBO("uTexMatrix",this._ubo,i._texMatrix),_0x3e2f69.writeColorToUBO("uDiffuseColor",this._ubo,i._diffuseColor),_0x3e2f69.writeColorToUBO("uAmbientColor",this._ubo,i._ambientColor),_0x3e2f69.writeColorToUBO("uSpecularColor",this._ubo,i._specularColor);var r=i._baseColor||n._PBRMaterialParams.pbrMetallicRoughness.baseColor;e$2b(r.x)?_0x3e2f69.writeCartesian4ToUBO("uBaseColorFactor",this._ubo,r):e$2b(r.red)&&_0x3e2f69.writeColorToUBO("uBaseColorFactor",this._ubo,r);var o=i._emissiveFactor||n._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor;e$2b(o.x)?this._ubo.updateFloat4("uEmissiveFactor",o.x,o.y,o.z,o.w):e$2b(o.red)&&this._ubo.updateFloat4("uEmissiveFactor",o.red,o.green,o.blue,o.alpha),e$2b(i.pbrParamTexture)&&this._updatePbrParTextureValue(),this._ubo.updateFloat("uNormalTextureScale",1);var a=1;switch(i._alphaMode){case"opaque":a=1;break;case"mask":a=2;break;case"blend":a=3}this._ubo.updateFloat("uAlphaMode",a),this._ubo.updateFloat("uAlphaCutoff",u$_(i._alphaCutoff,0)),this._updateMetallicRoughnessIntensityScale(),this._updateTexUVOffset(),this._updateBatchTextureWidths(),this._updateTextureWidths(),this._updateEmissiveUVOffsetAndTiling(),this._updateTextureBatchTable(),this._ubo.update(),this._getFirstTexture(),this._getSecTexture(),e$2b(this._ro._batchTable)&&this._setTextureByType(_0x435ce0,this._ro._batchTable._texture),this._setTextureByType(_0x39bd19,this._materialPass.pbrParamTexture),this._getBaseColorTexture(),this._getNormalTexture(),this._getMetalicRoughnessTexture(),this._getEmissiveTexture(),this._getOcclusionTexture(),this._getSnowMaskTexture(),this._getSnowNormalTexture(),this._getRippleTexture();const s=u$_(i._emissiveTextureMotion,n._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion);var l=e$2b(n._textureUVSpeed)&&(0!==n._textureUVSpeed.x||0!==n._textureUVSpeed.y);l=l||e$2b(s)&&(s.OffsetPeriod>0||s.TilingPeriod>0||e$2b(this._materialPass._baseColorTextureMotion)),this._isValueDirty=l||this._isBatchTextureRenderable(),e$2b(t._dayTextures)&&t._dayTextures.length>0&&(this._dayTextures!==t._dayTextures&&(this._isTextureDirty=!0),this._dayTextures=t._dayTextures)},_0xfa6ee5.prototype._setTextureByType=function(e,t){var i=this._textures[e]!==t;i&&t.isTexBlock&&(this._textureDirtyFrameCount=0),this._textures[e]=t,this._isTextureDirty=this._isTextureDirty||i},_0xfa6ee5.prototype._getTextureByType=function(e){return this._textures[e]},_0xfa6ee5.prototype.setToEffect=function(e){(e.bindUniformBuffer(this._ubo.getBuffer(),this._name),e$2b(this._ro._batchTable))&&(this._textures[_0x435ce0]!==this._ro._batchTable._texture&&(this._textures[_0x435ce0]=this._ro._batchTable._texture));e$2b(this._ro._dayTextures)&&this._ro._dayTextures.length>0&&_0x3e2f69.setTextureArrayToEffect(e,this._dayTextures,_0x2dced9);for(const t in this._textures)this._setTextureToEffect(e,this._textures[t],t);this._textureDirtyFrameCount>=0?this._textureDirtyFrameCount>_0x40daa0?(this._isTextureDirty=!1,this._textureDirtyFrameCount=-1):this._textureDirtyFrameCount++:this._isTextureDirty=!1};var _0x1e3f3a=new e$29,_0x3b53d0=new o$1o;_0xfa6ee5.prototype._initUniformMap=function(){var e=this._context;if(!e.webgl2&&!e.webgpu){var t=this._materialPass,i=this._layer,n={uTexMatrix:function(){return t._texMatrix},uDiffuseColor:function(){return t._diffuseColor},uSpecularColor:function(){return t._specularColor},uAmbientColor:function(){return t._ambientColor},uTexUVOffset:function(){_0x5e7812.x=0,_0x5e7812.y=0,_0x5e7812.z=1,_0x5e7812.w=1;var e=t._baseColorTextureMotion;if(e$2b(e)){var n=e.OffsetPeriod,r=e.OffsetSpeedU,o=e.OffsetSpeedV,a=e.TilingPeriod,s=e.TilingSpeedU,l=e.TilingSpeedV,u=performance.now()/1e3;if(n>0){var c=u%n;_0x5e7812.x=c*r,_0x5e7812.y=c*o}if(a>0){var h=u%a;_0x5e7812.z=1+h*s,_0x5e7812.w=1+h*l}}else if(0!==i._textureUVSpeed.x||0!==i._textureUVSpeed.y){var d=performance.now()/1e3;_0x5e7812.x=i._textureUVSpeed.x*d,_0x5e7812.y=i._textureUVSpeed.y*d}return _0x5e7812},uTextureDim:function(){var e=t._textures[0].renderable?t._textures[0]:e$2b(t._ancestorTexture)?t._ancestorTexture:t._textures[0];if(_0x1e3f3a.x=e._width,_0x1e3f3a.y=e._height,e$2b(t._textures[1])){var i=t._textures[1].renderable?t._textures[1]:e$2b(t._ancestorTextureBake)?t._ancestorTextureBake:t._textures[1];_0x1e3f3a.z=i._width,_0x1e3f3a.w=i._height}return _0x1e3f3a},uTextureWidths:function(){return e$2b(t.baseColorTexture)?(_0x3b53d0.x=t.baseColorTexture.width,_0x3b53d0.y=t.baseColorTexture.height):(e$2b(t._textures[0])?_0x3b53d0.x=t._textures[0].width:_0x3b53d0.x=1,e$2b(t._textures[1])?_0x3b53d0.y=t._textures[1].width:_0x3b53d0.y=1),_0x3b53d0},batchTextureStep_baseTex:function(){return t._batchTable._textureStep},batchTextureDimensions_baseTex:function(){return t._batchTable._textureDimensions},batchTextureStep_bakeTex:function(){return t._batchTableBake._textureStep},batchTextureDimensions_bakeTex:function(){return t._batchTableBake._textureDimensions},uBaseColorFactor:function(){return t._baseColor||i._PBRMaterialParams.pbrMetallicRoughness.baseColor},uEmissiveFactor:function(){return t._emissiveFactor||i._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},uEmissiveUVOffsetAndTiling:function(){var e=t._emissiveTextureMotion||i._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion,n=performance.now()/1e3,r=e.OffsetPeriod,o=e.OffsetSpeedU,a=e.OffsetSpeedV,s=e.TilingPeriod,l=e.TilingSpeedU,u=e.TilingSpeedV;if(e&&r>0){var c=n%r;_0x1e3f3a.x=c*o,_0x1e3f3a.y=c*a}else _0x1e3f3a.x=0,_0x1e3f3a.y=0;if(e&&s>0){var h=n%e._tilingPeriod;_0x1e3f3a.z=1+h*l,_0x1e3f3a.w=1+h*u}else _0x1e3f3a.z=1,_0x1e3f3a.w=1;return _0x1e3f3a},uMetallicRoughnessIntensityScale:function(){return _0x411a6c.x=u$_(t._metallicFactor,i._PBRMaterialParams.pbrMetallicRoughness.metallicFactor),_0x411a6c.y=u$_(t._roughnessFactor,i._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor),_0x411a6c.z=1,e$2b(t._intensityScale)&&t._intensityScale>0?_0x411a6c.z=t._intensityScale:e$2b(i._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&i._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0&&(_0x411a6c.z=i._PBRMaterialParams.pbrMetallicRoughness.intensityScale),_0x411a6c},uPBRTexWH:function(){var e=t.pbrParamTexture;return _0x3b53d0.x=e.width,_0x3b53d0.y=e.height,_0x3b53d0},uNormalTextureScale:function(){return 1},uAlphaMode:function(){var e=1;switch(t._alphaMode){case"opaque":e=1;break;case"mask":e=2;break;case"blend":e=3}return e},uAlphaCutoff:function(){return u$_(t._alphaCutoff,0)},uPbrParTextureWidth:function(){let e=1;return e$2b(t.baseColorTexture)?e=t.baseColorTexture.width:e$2b(t.normalTexture)?e=t.normalTexture.width:e$2b(t.metallicRoughnessTexture)?e=t.metallicRoughnessTexture.width:e$2b(t.emissiveTexture)&&(e=t.emissiveTexture.width),e}};this._uniformMap=n}},_0xfa6ee5.prototype.isDestroyed=function(){return!1},_0xfa6ee5.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};var _0x1e682c=(_0x24353d=!0,function(e,t){var i=_0x24353d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24353d=!1,i}),_0x2ae4c6=_0x1e682c(void 0,(function(){return _0x2ae4c6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ae4c6).search("(((.+)+)+)+$")})),_0x24353d;function _0x4db383(e){var t=_0x3e2f69.call(this)||this;t._ro=e,t._name=_0x27131a.MESH,this._initUniformMap()}_0x2ae4c6(),_0x3e2f69&&(_0x4db383.__proto__=_0x3e2f69),_0x4db383.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x4db383.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x4db383.prototype,{}),_0x4db383.prototype._initUBOStruct=function(){this._ubo.addUniform("uModelMatrix",16),this._ubo.addUniform("uGeoMatrix",16),this._ubo.addUniform("batchTextureStep",4),this._ubo.addUniform("batchTextureDimensions",2),this._ubo.addUniform("decode_texCoord0_min",2),this._ubo.addUniform("decode_texCoord1_min",2),this._ubo.addUniform("decode_texCoord0_vNormConstant",3),this._ubo.addUniform("decode_texCoord1_vNormConstant",3),this._ubo.addUniform("decode_position_min",4),this._ubo.addUniform("decode_position_normConstant",1),this._ubo.addUniform("normal_rangeConstant",1),this._ubo.addUniform("uInverseGeoMatrix",16),this._ubo.addUniform("uSkeletonMatrix",16),this._ubo.addUniform("uSkeletonCount",1),this._ubo.addUniform("uImgTextureBound",2),this._ubo.addUniform("uImgTextureAlpha",1),this._ubo.addUniform("fMultiTemporalFactor",1),this._ubo.addUniform("uSouthWest",3),this._ubo.addUniform("uNorthDir",3),this._ubo.addUniform("uEastDir",3),this._ubo.addUniform("textureRepeat",2)},_0x4db383.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,_0x27131a.MESH,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,_0x27131a.MESH,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x4db383.prototype._updateImageryValue=function(){const e=this._ubo,t=this._ro,i=t._layer,n=t._imageryTextureBound;let r=1;const o=i._imageryLayer;Array.isArray(o)&&(r=o[o.length-1].alpha),o.show||(r=0),r=o.alpha,e.updateFloat2("uImgTextureBound",n.x,n.y),e.updateFloat("uImgTextureAlpha",r)};var _0xe64cd6=new Float32Array(16),_0xd50e1e=new Matrix;_0x4db383.prototype.update=function(e){if(!e.webgpu&&!e.webgl2||(e$2b(this._ubo)||this._initUBO(e),!this._isValueDirty))return;var t=this._ro;const i=t._layer;var n=t._vertexPackage;const r=i._fileType===d$15.ClampGroundRealtimeRasterCache&&!e$2b(t._attributeLocations.aTexCoord1);if(e$2b(t._relativeModelMatrix)&&(p$1d.toArray(t._relativeModelMatrix,_0xe64cd6),Matrix.FromArrayToRef(_0xe64cd6,0,_0xd50e1e),this._ubo.updateMatrix("uModelMatrix",_0xd50e1e)),e$2b(t._geoMatrix)&&(p$1d.toArray(t._geoMatrix,_0xe64cd6),Matrix.FromArrayToRef(_0xe64cd6,0,_0xd50e1e),this._ubo.updateMatrix("uGeoMatrix",_0xd50e1e)),e$2b(n)){var o=n.minTexCoordValue;o&&o.length>0&&(this._ubo.updateFloat2("decode_texCoord0_min",n.minTexCoordValue[0].x,n.minTexCoordValue[0].y),this._ubo.updateFloat2("decode_texCoord1_min",n.minTexCoordValue[1].x,n.minTexCoordValue[1].y));var a=n.texCoordCompressConstant;if(a&&a.length>0){var s=n.texCoordCompressConstant[0],l=n.texCoordCompressConstant[1];this._ubo.updateFloat3("decode_texCoord0_vNormConstant",s.x,s.y,s.z),this._ubo.updateFloat3("decode_texCoord1_vNormConstant",l.x,l.y,l.z)}var u=n.minVerticesValue,c=n.vertCompressConstant,h=n.normalRangeConstant;e$2b(n.minVerticesValue)&&this._ubo.updateFloat4("decode_position_min",u.x,u.y,u.z,u.w),e$2b(n.vertCompressConstant)&&this._ubo.updateFloat("decode_position_normConstant",c),e$2b(n.normalRangeConstant)&&this._ubo.updateFloat("normal_rangeConstant",h)}if(e$2b(t._batchTable)){var d=t._batchTable._textureStep;this._ubo.updateFloat4("batchTextureStep",d.x,d.y,d.z,d.w);var f=t._batchTable._textureDimensions;this._ubo.updateFloat2("batchTextureDimensions",f.x,f.y)}i._flattening&&(p$1d.toArray(t._inverseGeoMatrix,_0xe64cd6),Matrix.FromArrayToRef(_0xe64cd6,0,_0xd50e1e),this._ubo.updateMatrix("uInverseGeoMatrix",_0xd50e1e)),e$2b(t._instanceSkeletonMatrix)&&(p$1d.toArray(t._instanceSkeletonMatrix,_0xe64cd6),Matrix.FromArrayToRef(_0xe64cd6,0,_0xd50e1e),this._ubo.updateMatrix("uSkeletonMatrix",_0xd50e1e)),t._isInstanceModel&&this._ubo.updateFloat("uSkeletonCount",t.skeletonCount),e$2b(i._imageryLayer)&&e$2b(t._attributeLocations.img)&&this._updateImageryValue(),t._bMultiTemporalWeight&&this._ubo.updateFloat("fMultiTemporalFactor",t._fMultiTemporalFactor),t._isClamp&&i._fileType===d$15.ClampGroundPolygon&&(this._ubo.updateVector3("uSouthWest",t._southWestCorner),this._ubo.updateVector3("uNorthDir",t._northVector),this._ubo.updateVector3("uEastDir",t._eastVector)),r&&this._ubo.updateFloat2("textureRepeat",t._symbolTextureRepeat.x,t._symbolTextureRepeat.y),this._ubo.update(),this._isValueDirty=t._bMultiTemporalWeight},_0x4db383.prototype._initUniformMap=function(){var e=this._ro;const t=e._layer;var i=t._context;if(!i.webgl2&&!i.webgpu){var n={},r=e._vertexPackage,o=r.nCompressOptions;n.uModelMatrix=function(){return e._relativeModelMatrix},n.uGeoMatrix=function(){return e._geoMatrix},(o&_0x35ed09.SVC_Vertex)===_0x35ed09.SVC_Vertex&&(n.decode_position_min=function(){return r.minVerticesValue},n.decode_position_normConstant=function(){return r.vertCompressConstant}),(o&_0x35ed09.SVC_Normal)===_0x35ed09.SVC_Normal&&(n.normal_rangeConstant=function(){return r.normalRangeConstant}),(o&_0x35ed09.SVC_TexutreCoord)===_0x35ed09.SVC_TexutreCoord&&(r.texCoordCompressConstant.length>0&&(n.decode_texCoord0_min=function(){return r.minTexCoordValue[0]},n.decode_texCoord0_normConstant=function(){return r.texCoordCompressConstant[0]},n.decode_texCoord0_vNormConstant=function(){return r.texCoordCompressConstant[0]}),r.texCoordCompressConstant.length>1&&(n.decode_texCoord1_min=function(){return r.minTexCoordValue[1]},n.decode_texCoord1_normConstant=function(){return r.texCoordCompressConstant[1]},n.decode_texCoord1_vNormConstant=function(){return r.texCoordCompressConstant[1]})),n.batchTextureStep=function(){return e._batchTable._textureStep},n.batchTextureDimensions=function(){return e._batchTable._textureDimensions},n.uInverseGeoMatrix=function(){return e._inverseGeoMatrix},n.uSkeletonMatrix=function(){return e._instanceSkeletonMatrix},n.uSkeletonCount=function(){return e.skeletonCount},n.fMultiTemporalFactor=function(){return e._fMultiTemporalFactor},n.uSouthWest=function(){return e._southWestCorner},n.uNorthDir=function(){return e._northVector},n.uEastDir=function(){return e._eastVector},n.textureRepeat=function(){return e._symbolTextureRepeat},n.uImgTextureBound=function(){return e._imageryTextureBound},n.uImgTextureAlpha=function(){return e$2b(t._imageryLayer)?t._imageryLayer instanceof Array?t._imageryLayer[t._imageryLayer.length-1].alpha:t._imageryLayer.show&&e._showImagerysImmediate?t._imageryLayer.alpha:0:1},this._uniformMap=n}},_0x4db383.prototype.isDestroyed=function(){return!1},_0x4db383.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};const _0x52e158=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xd8c283=_0x52e158(void 0,(function(){return _0xd8c283.toString().search("(((.+)+)+)+$").toString().constructor(_0xd8c283).search("(((.+)+)+)+$")}));_0xd8c283();const _0x100aad="uVolumeTexture";function _0x236967(e){var t=_0x3e2f69.call(this)||this;t._ro=e,t._name=_0x27131a.S3MVolume,t._textures={},this._initUniformMap()}_0x3e2f69&&(_0x236967.__proto__=_0x3e2f69),_0x236967.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x236967.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x236967.prototype,{}),_0x236967.prototype._updateVolumeValue=function(){const e=this._ubo,t=this._ro,i=t._layer,n=t._volObj;e$2b(n)&&(e.updateFloat("uVolSideBlockCount",n.nSideBlockCount),e.updateFloat("uVolBlockLength",n.nBlockLength),e.updateFloat("uVolTexLength",n.nLength),e.updateFloat("uVolWidth",n.nWidth),e.updateFloat("uVolHeight",n.nHeight),e.updateFloat("uVolDepth",n.nDepth));let r=0;const o=i._hypsometricSetting;e$2b(o)&&o.filterMode===k$Q.FilterMode.NEAREST&&(r=1);const a=n.nFormat;let s=0;e$2b(a)&&(3200===a?s=0:e$2b(o)?o.filterMode===k$Q.FilterMode.LINEAR&&(s=0):s=1),e.updateFloat("uVolFilterMode",r),e.updateFloat("uVolumeType",s)},_0x236967.prototype._initUBOStruct=function(){this._ubo.addUniform("uVolSideBlockCount",1),this._ubo.addUniform("uVolBlockLength",1),this._ubo.addUniform("uVolTexLength",1),this._ubo.addUniform("uVolWidth",1),this._ubo.addUniform("uVolHeight",1),this._ubo.addUniform("uVolDepth",1),this._ubo.addUniform("uVolFilterMode",1),this._ubo.addUniform("uVolumeType",1)},_0x236967.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x236967.prototype.update=function(e){if(!e.webgpu&&!e.webgl2||(e$2b(this._ubo)||this._initUBO(e),!this._isValueDirty))return;var t=this._ro;const i=t._layer;var n;(e$2b(t._volObj)||e$2b(t._volTexture))&&this._updateVolumeValue(),this._ubo.update(),this._isValueDirty=!1,n="png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt?t._volTexture:t._volObj.volTexture,this._isLayerTextureChanged(_0x100aad,n)},_0x236967.prototype._isLayerTextureChanged=function(e,t){this._isTextureDirty=this._textures[e]!==t,this._textures[e]=t},_0x236967.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name);for(const t in this._textures)this._setTextureToEffect(e,this._textures[t],t)},_0x236967.prototype._initUniformMap=function(){var e=this._ro;const t=e._layer;var i=t._context;if(i.webgl2||i.webgpu)return;const n=e._volObj;var r={uVolSideBlockCount:function(){return n.nSideBlockCount},uVolBlockLength:function(){return n.nBlockLength},uVolTexLength:function(){return n.nLength},uVolWidth:function(){return n.nWidth},uVolHeight:function(){return n.nHeight},uVolDepth:function(){return n.nDepth},uVolFilterMode:function(){let e=0;const i=t._hypsometricSetting;return e$2b(i)&&i.filterMode===k$Q.FilterMode.NEAREST&&(e=1),e},uVolumeType:function(){const e=n.nFormat;let t=0;return e$2b(e)&&(3200===e?t=0:e$2b(hypSetting)?hypSetting.filterMode===k$Q.FilterMode.LINEAR&&(t=0):t=1),t}};this._uniformMap=r},_0x236967.prototype.isDestroyed=function(){return!1},_0x236967.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};var _0x288269=(_0x283ae9=!0,function(e,t){var i=_0x283ae9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x283ae9=!1,i}),_0x4d0a47=_0x288269(void 0,(function(){return _0x4d0a47.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d0a47).search("(((.+)+)+)+$")})),_0x283ae9;function _0x15f4db(e,t){this._id=e,this._worldPosLeftBottom=void 0,this._worldPosLBRelativeOrigin=void 0,this._windowCoordRect=new h$18,this._weight=1e3,this._heigtRangeMax=-1,this._distanceRangeSquare=Number.POSITIVE_INFINITY,this._pixelWidth=-1,this._pixelHeight=-1,this._layer=t,this._visible=void 0}_0x4d0a47(),Object.defineProperties(_0x15f4db.prototype,{windowCoordRect:{get:function(){return this._windowCoordRect}},heigtRangeMax:{get:function(){return this._heigtRangeMax},set:function(e){this._heigtRangeMax=e}},weight:{get:function(){return this._weight},set:function(e){this._weight=e}},pixelWidth:{get:function(){return this._pixelWidth},set:function(e){this._pixelWidth=e}},pixelHeight:{get:function(){return this._pixelHeight},set:function(e){this._pixelHeight=e}},worldPosLeftBottom:{get:function(){return this._worldPosLeftBottom},set:function(e){this._worldPosLeftBottom=e}},worldPosLBRelativeOrigin:{get:function(){return this._worldPosLBRelativeOrigin},set:function(e){this._worldPosLBRelativeOrigin=e}},layerName:{get:function(){return this._layer.name}},layer:{get:function(){return this._layer}},id:{get:function(){return this._id}},visible:{get:function(){return this._visible},set:function(e){(!e$2b(this._visible)||e!==this._visible)&&_0x15f4db.addToChangeQueue(this,e),this._visible=e}}});var _0x11108e=new o$1o;_0x15f4db.prototype.calcWindowCoordRect=function(e,t){m$17.pointToWindowCoordinates(e,t,this._worldPosLBRelativeOrigin,_0x11108e),this._windowCoordRect.west=_0x11108e.x,this._windowCoordRect.east=_0x11108e.x+this._pixelWidth,this._windowCoordRect.south=_0x11108e.y,this._windowCoordRect.north=_0x11108e.y-this._pixelHeight},_0x15f4db.prototype.isInViewport=function(e){return this._windowCoordRect.west+200>=e.x&&this._windowCoordRect.east-this._pixelWidth<=e.x+e.width&&this._windowCoordRect.north+200>=e.y&&this._windowCoordRect.south-this._pixelHeight<=e.y+e.height},_0x15f4db.prototype.isInHeightRange=function(e){return!this._layer._hasHeightRangeAttributeName||e<this._heigtRangeMax},_0x15f4db.prototype.isInVisibleRange=function(e){return!this._layer._hasHeightRangeAttributeName||o$1p.distanceSquared(e,this._worldPosLeftBottom)<this._distanceRangeSquare};var _0x58780c=new h$18,_0x37ed2f=new h$18;function _0x207ac9(e,t){e.east+=t,e.west-=t,e.south+=t,e.north-=t}_0x15f4db.isIntersectionTest=function(e,t,i){h$18.clone(e,_0x58780c),h$18.clone(t,_0x37ed2f),_0x207ac9(_0x58780c,i),_0x207ac9(_0x37ed2f,i);var n=Math.max(_0x58780c.west,_0x37ed2f.west),r=Math.min(_0x58780c.south,_0x37ed2f.south),o=Math.min(_0x58780c.east,_0x37ed2f.east);return!(r<=Math.max(_0x58780c.north,_0x37ed2f.north)||n>=o)};var _0x16aefb=[],_0x39376e=[];function _0x27ca93(e,t){for(var i=0,n=e._layerQueue.length;i<n;i++){var r=e._layerQueue[i];if(r.id===t)return r}}function _0x31df81(e,t){for(var i in t){var n=e.find(i),r=n?n.iconRelatedTextLayerID:void 0;if(r){var o=i,a=_0x27ca93(e,r);if(a){var s=t[a.name];s&&s.length>0&&(t[o]=s)}}}}_0x15f4db.meetVisible=function(e,t,i){_0x16aefb.length=0,_0x39376e.length=0;e.sort((function(e,t){return e.weight-t.weight}));for(var n=[],r=0,o=e.length;r<o;r++){(p=e[r]).layerName;var a=p.layer;if(!a.iconRelatedTextLayerID||!i){var s=p.id;if(a._hasObjsVisibleMap&&!0===a._objsVisibleMap[s]){n.push(p),p.visible=!0;continue}if(a._hasObjsVisibleMap&&!1===a._objsVisibleMap[s]){p.visible=!1;continue}for(var l=p.windowCoordRect,u=!1,c=0,h=_0x16aefb.length;c<h;c++){var d=_0x16aefb[c],f=d.windowCoordRect;if(!(p.id===d.id&&p.layer.id===d.layer.id)&&_0x15f4db.isIntersectionTest(l,f,t)){u=!0;break}}u?p.visible=!1:(_0x16aefb.push(p),p.visible=!0)}}if(n.length>0)for(o=0;o<n.length;o++){(p=n[o]).layerName,l=p.windowCoordRect,u=!1;for(var p,_=0;_<_0x39376e.length;_++){f=_0x39376e[_];if(_0x15f4db.isIntersectionTest(l,f,t)){s=p.id;p.visible=!1,u=!0;break}}u||_0x39376e.push(l)}},_0x15f4db._visibleChangedQueue={},_0x15f4db._invisibleChangedQueue={},_0x15f4db.addToChangeQueue=function(e,t){var i,n=e.layerName;(i=t?_0x15f4db._visibleChangedQueue:_0x15f4db._invisibleChangedQueue)[n]||(i[n]=[]),i[n].push(e.id)},_0x15f4db.addPotentialVisibiltyChangedLayer=function(e){_0x15f4db._visibleChangedQueue[e]||(_0x15f4db._visibleChangedQueue[e]=[]),_0x15f4db._invisibleChangedQueue[e]||(_0x15f4db._invisibleChangedQueue[e]=[])},_0x15f4db.setVisibiltyChangedToLayer=function(e,t){for(var i in t&&(_0x31df81(e,_0x15f4db._visibleChangedQueue),_0x31df81(e,_0x15f4db._invisibleChangedQueue)),_0x15f4db._visibleChangedQueue){var n=e.find(i);(r=_0x15f4db._visibleChangedQueue[i]).length>0&&n.setOnlyObjsVisible(r,!0,!1)}for(var i in _0x15f4db._invisibleChangedQueue){var r;n=e.find(i);(r=_0x15f4db._invisibleChangedQueue[i]).length>0&&n.setOnlyObjsVisible(r,!1,!1)}},_0x15f4db.resetVisibleChangedQueue=function(){_0x15f4db._visibleChangedQueue={},_0x15f4db._invisibleChangedQueue={}},_0x15f4db.prototype.isDestroyed=function(){return!1},_0x15f4db.prototype.destroy=function(){return i$10(this)};var _0x5451f7=(_0x587331=!0,function(e,t){var i=_0x587331?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x587331=!1,i}),_0x2f8906=_0x5451f7(void 0,(function(){return _0x2f8906.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f8906).search("(((.+)+)+)+$")})),_0x587331;function _0x30a010(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;if(!(e.arrIndexPackage&&e.vertexPackage&&e.mapPass&&e$2b(e.context)))throw new t$16("gl texture indexes vertexes is required to create RenderEntityPagelod");if(this._layer=e.layer,this._entity=e.entity,this._context=e.context,this._arrIndexPackage=t,this._vertexPackage=i,this._attributeLocations=this._vertexPackage.attrLocation,this._vertexDim=4,e$2b(i)&&e$2b(i.vertexAttributes)&&i.vertexAttributes.length>0&&(this._vertexDim=i.vertexAttributes[0].componentsPerAttribute),this._edgeGeometry=e.edgeGeometry,this._pickInfo=u$_(e.pickInfo,{}),this._ids=Object.keys(this._pickInfo),this._vertexBufferToCreate=new r$16,this._vertexWeightBuffers=[],this._bMultiTemporalWeight=!1,this._fMultiTemporalFactor=0,this._fMultiTemporalPercentage=0,this._nFirstMultiTemporalPos=-1,this._nSecondMultiTemporalPos=-1,this._nSpecificTemporalPos=-1,this._layer._temporalCount>0&&(this._bMultiTemporalWeight=!0),this._bMultiTemporalWeight){for(var r=[],o=Object.keys(i.attrLocation),a=o.length,s=0;s<a;++s){var l=o[s];r.push(i.attrLocation[l])}r.sort((function(e,t){return e-t})),this._nFirstMultiTemporalPos=i.attrLocation.aVertexWeight,this._nSecondMultiTemporalPos=i.attrLocation.aVertexWeight_1;var u=[],c=r.length;for(s=0;s<this._vertexPackage.vertexAttributes.length;s++){if(s===i.attrLocation.aVertexWeight||s===i.attrLocation.aVertexWeight_1||s>r[c-1]){var h=new Uint8Array(this._vertexPackage.vertexAttributes[s].typedArray,0,this._vertexPackage.vertexAttributes[s].byteLength);if(this._vertexWeightBuffers.push(h),s>r[c-1])continue}u.push(this._vertexPackage.vertexAttributes[s]),this._vertexBufferToCreate.enqueue(s)}this._vertexPackage.vertexAttributes=u}else{this.isBillboardPoint(e.fileType)&&this.convertToInstanceBillboardPoint();for(s=0;s<this._vertexPackage.vertexAttributes.length;s++)this._vertexBufferToCreate.enqueue(s)}for(this._indexBufferToCreate=new r$16,s=0;s<this._arrIndexPackage.length;s++)13!==this._arrIndexPackage[s].primitiveType&&this._arrIndexPackage[s].indicesCount>0&&this._indexBufferToCreate.enqueue(s);this._subTexturesToUpload=new r$16,this._shaderProgramToCreate=new r$16,this._shaderProgramToCreate.enqueue(0),this._version=e.version||_0x41168d.S3M,this._isS3MBlock=u$_(e.isS3MBlock,!1),this._initialize=!1,this._matModel=e.matModel,this._iblReferenceFrameMatrix=p$1e.clone(p$1e.IDENTITY),this._tranlateMatrix=p$1d.clone(p$1d.IDENTITY),this._mapPass=n;var d=this._arrIndexPackage[0];if(this._material=e$2b(d)&&e$2b(d.materialCode)?n[d.materialCode]:_0x21d1b1.Default,this._colorCommand=void 0,this._pickCommand=void 0,this._wireFrameCommands={},this._stencilCommand=void 0,this._clampColorCommand=void 0,this._clipStencilCommand=void 0,this._pickRectCommand=void 0,this._spatialQueryCommand=void 0,this._waterIndex=-1,this._waterTime=0,this._boundingVolume=e.boundingVolume,this._instanceCount=i.instanceCount,this._instanceMode=i.instanceMode,this._isS3MB=u$_(e.isS3MB,!1),this._volObj=e.volObj,this._volTexture=e.volTexture,this._geoMatrix=u$_(e.geoMatrix,p$1d.IDENTITY),this._inverseGeoMatrix=p$1d.inverse(this._geoMatrix,new p$1d),this._instanceSkeletonMatrix=e.instanceSkeletonMatrix,this._wireFrameIndexBuffers=void 0,this._bufferPrepared=!1,this._fileType=e.fileType,e.fileType===d$15.ExtendRegion3D&&e$2b(i.attrLocation.aTexCoord1)){var f=i.vertexAttributes[i.attrLocation.aTexCoord1].typedArray,p=f.slice(f.buffer,f.byteOffset,f.byteLength);this._texCoord1=new Float32Array(p.buffer,0,p.byteLength/4)}this._selectionInforMap=void 0,this._geometryByteLength=0,this._intersectWithClipPlane=!1,this._boundingRectangle=e.boundingRectangle,this._symbolTextureUrl=e.symbolTextureUrl,this._symbolColor=e.symbolColor,this._symbolTextureRepeat=e.symbolTextureRepeat,e$2b(this._symbolTextureRepeat)||(this._symbolTextureRepeat=new o$1o(600,600)),this._clampRegionEdge=u$_(i.clampRegionEdge,!1),e$2b(e.level)&&(this._level=e.level,this._row=e.row,this._col=e.col),this._rasterized=!1,this._groupName=e.groupName,this._ptIndexGroup=e.ptIndexGroup,this._geoName=e.geoName,this.oriPassGroup=Le$s.S3MTiles,this._labelPosArray=[],this._labelTextArray=[],this._pickIDArray=[],this._labelsCreated={},this._labelIndexs={},this._labelPromiseArr=[],this._labelReady=!1,this._batchTable=void 0,this._updateBatchTable=!0,this._idsOperationMap=new e$1N,this._idsColorMap=new e$1N,this._idsTranslateMap=new e$1N,this._idsPBRIndexMap=new e$1N,this._hasBloomOperation=!1,this._isInstanceModel=this._layer.skeletonSelectEnable&&"InstanceModel"===this._layer._dataType&&i.skeletonCount>0,this.skeletonCount=i.skeletonCount,this._imagerys=[],this._imageryLevels=[],this._showImagerysImmediate=!0,this._imageryTextureBound=new o$1o,this._isLeaf=!1,this._isHypsometricVisible=!0,this._themeDirty=!1,this._passIncrement=0,this._clipCommand=void 0,this._disFromCamera=0,this.materialPass=void 0,this.useWValue=!1,this.useLineColor=!1,this._polygons=void 0,this._polygonId=void 0,this._polygonCommands=[],this._imageRasterFinish=!1,this._isSelected=!1,this._isPBR=!1,this._specularEnvironmentMaps=void 0,this._clipBounds=[],this._scaleImagerys=[],this._visibleScaleImageryIndex=void 0,this._plusRoArray=[],this._modelMatrixDirty=!1,this._relativeOrigin=new o$1p,this._relativeModelMatrix=new p$1d,p$1d.clone(this._matModel,this._relativeModelMatrix),this._meshUBO=new _0x4db383(this),this._materialUBO=new _0xfa6ee5(this,this._material,this._layer),(e$2b(this._volObj)||e$2b(this._volTexture))&&(this._volumeUBO=new _0x236967(this))}_0x2f8906(),Object.defineProperties(_0x30a010.prototype,{renderable:{get:function(){if(!this._isS3MBlock||!e$2b(this._mapPass))return this._bufferPrepared;for(var e in this._mapPass)if(this._mapPass.hasOwnProperty(e)){var t=this._mapPass[e],i=t._textures[0];return e$2b(i)?this._bufferPrepared&&(i.renderable&&i.ready||e$2b(t._ancestorTexture)):this._bufferPrepared}return this._bufferPrepared}}}),_0x30a010.prototype.initialize=function(){if(!this._initialize){if(this.createSelectionMap(),this.createBoundingBoxForInstance(),this._fileType===d$15.Text||this._fileType===d$15.IconPoint?this.createBillboardsBounds(this._layer):this._fileType===d$15.ClampGroundPolygon&&this.createClampGroundBounds(),e$2b(this._symbolTextureUrl)&&_0x4dad4e.createTexture({imageUrl:this._symbolTextureUrl}),this.prepareLabels(),!e$2b(this._batchTable)&&Object.keys(this._pickInfo).length>0){var e=this._layer,t=e._context;_0xdd563a(t,this),_0x14de42(t,this,e)}this._initialize=!0}},_0x30a010.prototype.createSelectionMap=function(){var e=this._pickInfo;if(e$2b(e)&&_0x41168d.S3M4===this._version)for(var t in this._selectionInforMap=new e$1N,e)!e.hasOwnProperty(t)||-1===this._vertexPackage.instanceIndex&&"0"===t||this._selectionInforMap.set(t,e[t])},_0x30a010.prototype.createBoundingBoxForInstance=function(){var e=this._vertexPackage;if(e$2b(e)&&-1!==e.instanceIndex&&e$2b(e.instanceBounds)){var t=e.instanceBounds,i=new o$1p(t[0],t[1],t[2]),n=new o$1p(t[3],t[4],t[5]),r=o$1p.lerp(i,n,.5,new o$1p),o=o$1p.distance(r,i),a=new o$1p;p$1d.multiplyByPoint(this._matModel,r,a),this._boundingVolume.center=a,this._boundingVolume.radius=o>this._boundingVolume.radius?o:this._boundingVolume.radius,e.instanceBounds=void 0}},_0x30a010.prototype.createClampGroundBounds=function(){var e=this._boundingRectangle.x,t=this._boundingRectangle.y,i=this._boundingRectangle.x+this._boundingRectangle.width,n=this._boundingRectangle.y+this._boundingRectangle.height,r=new o$1p(i,t,0),o=new o$1p(e,n,0);this._southWestCorner=new o$1p(e,t,0),this._eastVector=new o$1p,this._northVector=new o$1p,o$1p.subtract(r,this._southWestCorner,this._eastVector),o$1p.subtract(o,this._southWestCorner,this._northVector)},_0x30a010.prototype.createBillboardsBounds=function(e){this._arrtextOverlapInfo=[];var t=this._matModel,i=this._selectionInforMap.values,n=this._vertexPackage.vertexAttributes[0].typedArray;if(e$2b(n)&&e$2b(n.buffer)){var r,o,a=new Float32Array(n.buffer,n.byteOffset,n.byteLength/4);this._fileType===d$15.Text?(r=this._vertexPackage.vertexAttributes[1].typedArray,o=new Float32Array(r.buffer,r.byteOffset,r.byteLength/4)):(r=this._vertexPackage.vertexAttributes[3].typedArray,o=new Float32Array(r.buffer,r.byteOffset,r.byteLength/4));for(var s=Number.MAX_VALUE,l=Number.MIN_VALUE,u=Number.MAX_VALUE,c=Number.MIN_VALUE,h=new o$1p,d=[],f=0;f<this._vertexPackage.verticesCount;f++)o$1p.fromArray(o,3*f,h),d.push(o$1p.clone(h));for(var p,_,m,g=e$2b(e._overlapWeightAttributeName),x=e$2b(e._heightRangeAttributeName),v=a$18.toCartesian(h$18.southwest(e.layerBounds)),y=a$18.toCartesian(h$18.northeast(e.layerBounds)),$=o$1p.distance(v,y),b=$*$,T=0,C=i.length;T<C;T++){var S=new _0x15f4db(this._ids[T],e);_=(p=i[T]).vertexColorOffset,m=u$_(p.vertexCount,p.vertexColorCount);for(var w=_;w<_+m;w++){var E=d[w];s=Math.min(E.x,s),l=Math.max(E.x,l),u=Math.min(E.y,u),c=Math.max(E.y,c)}S.pixelWidth=l-s,S.pixelHeight=c-u;var P=new o$1p(a[3*_],a[3*_+1],a[3*_+2]);p$1d.multiplyByPoint(t,P,P),S.worldPosLeftBottom=P;var A=new o$1p;if(o$1p.subtract(P,this._context.relativeOrigin,A),S.worldPosLBRelativeOrigin=A,g||x){var L=this._ids[T],M=e.getAttributesById(L);e$2b(M)&&e$2b(M.then)&&this._getLabelWeightOrHeight(S,M,e._overlapWeightAttributeName,e._heightRangeAttributeName)}S._distanceRangeSquare=b,this._arrtextOverlapInfo.push(S)}}else console.log("createBillboardsBounds")},_0x30a010.prototype._getLabelWeightOrHeight=function(e,t,i,n){t.then((t=>{if(i&&(e.weight=u$_(t[i],1e3),e.heigtRangeMax=-1),n){var r=parseInt(t[n].split(",")[0]);e.heigtRangeMax=u$_(r,-1)}}))};var _0x43a827=new p$1d;_0x30a010.prototype.updateBillboardsBounds=function(e,t,i){if(!e.isOverlapDisplayed){var n,r={},o=!0;if(0!=e._scene._multiViewportMode){var a=e._scene._multiViewportInfo[i.multiViewportIndex];0==a.x&&0==a.y?(o=!0,r.x=this._context.drawingBufferWidth*a.x,r.y=this._context.drawingBufferHeight*a.y,r.width=this._context.drawingBufferWidth*a.width,r.height=this._context.drawingBufferHeight*a.height,p$1d.computeViewportTransformation(r,0,1,_0x43a827),n=_0x43a827):o=!1}else o=!0,r=t.viewport,n=t.viewportTransformation;for(var s=this._arrtextOverlapInfo,l=i.camera._positionCartographic.height,u=i.camera.positionWC,c=t.viewProjection,h=0,d=s.length;h<d;h++){var f=s[h];f.isInHeightRange(l)?f.isInVisibleRange(u)&&(!o||(f.calcWindowCoordRect(c,n),f.isInViewport(r)))?e._scene.layers._allTextOverlap.push(f):f.visible=!1:f.visible=!1}}};var _0x2ff633=new e$29;function _0x55bd22(e){var t,i,n,r=e._idsColorMap,o=[];if(r.length>0)for(t=0,i=r.length;t<i;t++)(n=r.values[t]).dirty&&(n.dirty=!1,o=n.color.toBytes(),_0x2ff633.x=o[0],_0x2ff633.y=o[1],_0x2ff633.z=o[2],_0x2ff633.w=o[3],e$2b(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,0,_0x2ff633):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,0,_0x2ff633)})));var a=e._idsTranslateMap;if(a.length>0)for(var s in a._hash)(n=a._hash[s]).dirty&&(n.dirty=!1,e$2b(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,3,n.translate):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,3,n.translate)})),o$1p.equals(n.translate,o$1p.ZERO)&&a.remove(s));var l=e._idsPBRIndexMap;if(l.length>0)for(t=0,i=l.length;t<i;t++)(n=l.values[t]).dirty&&(n.dirty=!1,e$2b(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,4,n.pbrMaterialIndex):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,4,n.pbrMaterialIndex)})));var u=e._idsOperationMap;if(u.length>0)for(t=0,i=u.length;t<i;t++)if((n=u.values[t]).dirty)if(n.dirty=!1,e._isInstanceModel){if(n.skeletonId>-1){var c=n.instanceIds[0]*e.skeletonCount+n.skeletonId;e._batchTable.setBatchedAttribute(c,1,n.operationValue)}}else e._instanceCount>0?Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,1,n.operationValue)})):e$2b(n.batchId)&&e._batchTable.setBatchedAttribute(n.batchId,1,n.operationValue)}function _0xdd563a(e,t){var i=[];i.push({functionName:"czm_batchTable_color",componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"czm_batchTable_operation",componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4},{functionName:"czm_batchTable_pickColor",componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"czm_batchTable_translate",componentDatatype:S$12.FLOAT,componentsPerAttribute:3,normalize:!0},{functionName:"czm_batchTable_pbrMaterialIndex",componentDatatype:S$12.FLOAT,componentsPerAttribute:3,normalize:!0});var n=t._pickInfo,r=Object.keys(n),o=new h$W(e,i,t._isInstanceModel?t._instanceCount*t.skeletonCount:t._instanceCount>0?t._instanceCount:r.length);o.useUBO=!0,t._batchTable=o}function _0x14de42(e,t,i){var n=t._batchTable,r=t._selectionInforMap,o=t._selectionInforMap._hash;for(var a in o)if(o.hasOwnProperty(a)){var s=r.get(a);if(t._isInstanceModel){var l=s.instanceIds[0],u=Object.keys(s.skeletonIds).length;for(var c in s.skeletonIds)if(s.skeletonIds.hasOwnProperty(c)){var h=l*u+Number(c),d=(f=e.createPickId({primitive:i,id:a,skeletonId:Number(c)})).color;_0x2ff633.x=e$1U.floatToByte(d.red),_0x2ff633.y=e$1U.floatToByte(d.green),_0x2ff633.z=e$1U.floatToByte(d.blue),_0x2ff633.w=e$1U.floatToByte(d.alpha),n.setBatchedAttribute(h,2,_0x2ff633)}}else{var f;e$2b(f=i._pickObjs[a])||(f=e.createPickId({primitive:i,id:a}),i._pickObjs[a]=f);d=f.color;if(_0x2ff633.x=e$1U.floatToByte(d.red),_0x2ff633.y=e$1U.floatToByte(d.green),_0x2ff633.z=e$1U.floatToByte(d.blue),_0x2ff633.w=e$1U.floatToByte(d.alpha),t._instanceCount>0){s.instanceIds.map((function(e){n.setBatchedAttribute(e,2,_0x2ff633)}))}else{var p=s.batchId;n.setBatchedAttribute(p,2,_0x2ff633)}}}}function _0x324591(e,t){for(var i=e.position.values,n=e.position.componentsPerAttribute,r=i.length/n,o=new Float32Array(3*r),a=0;a<r;a++){var s=new o$1p(i[a*n],i[a*n+1],i[a*n+2]),l=a$18.fromCartesian(s),u=e$2a.toDegrees(l.longitude),c=e$2a.toDegrees(l.latitude),h=l.height,d=(u-t.left)/t.width,f=(c-t.bottom)/t.length,p=(h-t.minHeight)/t.height;o[3*a]=d,o[3*a+1]=f,o[3*a+2]=p}e.aRatio=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:o})}_0x30a010.prototype.updateBatchTable=function(e,t,i){_0x55bd22(this),this._batchTable.update(e),this._updateBatchTable=!1},_0x30a010.prototype.transformResource=function(e,t){this.initialize(),this.createResources(e,t),this._bufferPrepared&&e$2b(this._sp)&&(this.createAllCommands(e,t),this.createNormalAndDepthCommand(t),this.createPostEffectCommand(t),this.createClampColorCommand(t),this.createTransparentCommand(t),(t._fileType===d$15.ClampGroundPolygon||t._fileType===d$15.ClampObjectPolygon||t._fileType===d$15.ClampGroundLine||t._fileType===d$15.ExtendClampPolygonCache)&&this.cloneSelectCommand(t))},_0x30a010.prototype.createLazyCommand=function(e,t){if(this._bufferPrepared&&(this.createPickRectCommand(t),t.LoadingPriority===_0x10659f.UsePagedLodInfo&&t._hasMixedContent&&e.context.stencilBuffer)){var i=this._colorCommand;if(!e$2b(i))return;var n=i.derivedCommands;e$2b(n)||(n=i.derivedCommands={}),this.ownerPagelod._finalResolution||(e$2b(n.zback)||(n.zback=_0x345ef0(e.context,i)),t._backfaceCommands.push(n.zback)),(!e$2b(n.stencil)||this.ownerPagelod._selectionDepth!==_0x5ebbfe(n.stencil))&&(n.stencil=_0x30daca(i,this.ownerPagelod._selectionDepth))}};var _0x6e923=new o$1p(0,0,0);_0x30a010.prototype.setPolygonOffset=function(e){for(var t=this,i=function(){return e$2b(t._layer._polygonsTranslate[t._polygonId])?t._layer._polygonsTranslate[t._polygonId]:_0x6e923},n=function(){return _0x6e923},r=0;r<this._polygonCommands.length;r++){var o=this._polygonCommands[r];o.uniformMap.uTranslate=i,o.uniformMap.uTranslate=r==e?i:n}},_0x30a010.prototype.updatePolygons=function(e,t,i){if(e$2b(this._polygons)){this._polygonCommands=[];for(var n=this,r=0;r<this._polygons.length;r++)!function(){var t=z$_.createGeometry(n._polygons[r]);e$2b(n._volObj)&&_0x324591(t.attributes,n._volObj.volBounds);for(var o=new e$29,a=new e$29,s=p$1d.inverse(n._matModel,new p$1d),l=t.attributes.position.values.length/t.attributes.position.componentsPerAttribute,u=0;u<l;u++)o.x=t.attributes.position.values[3*u],o.y=t.attributes.position.values[3*u+1],o.z=t.attributes.position.values[3*u+2],o.w=1,p$1d.multiplyByVector(s,o,a),t.attributes.position.values[3*u]=a.x,t.attributes.position.values[3*u+1]=a.y,t.attributes.position.values[3*u+2]=a.z;var c=new i$_({primitiveType:t.primitiveType,modelMatrix:n._matModel,boundingVolume:t.boundingSphere,pass:Le$s.S3MTiles,cull:!0}),h=n._polygonId+"_"+r,d=e.createPickId({primitive:n,id:h}).color;c.pickId="vSecondColor";c.uniformMap=l$1g(n._uniformMap),e$2b(c.uniformMap)&&(c.uniformMap.uSecondColor=function(){return d},c.uniformMap.uTranslate=function(){return _0x6e923}),c.vertexArray=c$12.fromGeometry({context:e,geometry:t,attributeLocations:{aPosition:0,aTexCoord0:1,aNormal:2,aRatio:3},bufferUsage:A$19.STATIC_DRAW,interleave:!0});var f=["attribute vec4 aPosition;","attribute vec3 aRatio;","uniform vec4 uSecondColor;","uniform vec3 uTranslate;","varying vec4 vSecondColor;","varying vec3 vecRotioCoord;","varying vec2 vecHypTexCoord;","varying vec4 vPositionMC;","void main()","{"," vPositionMC.xyz = aPosition.xyz;"," vPositionMC.w = 0.0;"," vSecondColor = uSecondColor;"," vecRotioCoord = aRatio;"," vec4 pos = aPosition;"," pos.xyz += uTranslate;"," gl_Position = czm_modelViewProjection * pos;","}"].join("\n"),p=["#extension GL_EXT_shader_texture_lod : enable","#extension GL_OES_standard_derivatives : enable","varying vec4 vSecondColor;","varying vec4 vPositionMC;","vec4 LinearTosRGB( in vec4 value )","{"," return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );","}","void main()","{"," gl_FragColor = czm_getHypsometricColor(vec4(1.0,1.0,1.0,1.0), 0.0);"," gl_FragColor *= czm_computeLightColorInFP(vPositionMC.xyz, vPositionMC.w, vec3(0.0,0.0,0.0));"," gl_FragColor = LinearTosRGB(gl_FragColor);","}"].join("\n"),_=new s$U({sources:[f]}),m=new s$U({sources:[p]});_.defines.push("Volume"),m.defines.push("Volume"),_.defines.push("HYPSOMETRIC"),m.defines.push("HYPSOMETRIC"),m.defines.push(Y$H.DIR_LIGHTS+0),m.defines.push(Y$H.POINT_LIGHTS+0),m.defines.push(Y$H.SPOT_LIGHTS+0),m.defines.push(Y$H.HEMISPHERE_LIGHTS+0),c.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:_,fragmentShaderSource:m,attributeLocations:{aPosition:0,aTexCoord0:1,aNormal:2,aRatio:3}}),c.renderState=i._rsColor,n._polygonCommands.push(c)}();this._polygons=void 0}if(this._polygonCommands.length>0){var o={};o[this._polygonId]=4,this.updateObjsOperation(o)}for(r=0;r<this._polygonCommands.length;r++)t.push(this._polygonCommands[r])},_0x30a010.prototype.updateVertexWeight=function(){if(this._bMultiTemporalWeight&&e$2b(this._layer._temporalSetting)){var e=this._layer._temporalSetting;if(!(this._fMultiTemporalPercentage===e.progress&&e.location<0)){var t=this._vertexWeightBuffers,i=t.length,n=this._colorCommand;if(this._nSpecificTemporalPos!==e.location){var r=t[e$2a.clamp(0,e.location,i-1)],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight)).strideInBytes+c.offsetInBytes;return c.vertexBuffer.copyFromArrayView(r,o),this._fMultiTemporalFactor=0,void(this._nSpecificTemporalPos=e.location)}if(this._nSpecificTemporalPos>-1)return;this._fMultiTemporalPercentage=e.progress;var a=this._fMultiTemporalPercentage,s=a*i,l=Math.floor(s);a=s-(l=e$2a.clamp(0,l,i-1)),this._fMultiTemporalFactor=e$2a.clamp(0,a,1);var u=Math.ceil(s);if(u=e$2a.clamp(0,u,i-1),this._nFirstMultiTemporalPos!==l){r=t[l],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight)).strideInBytes+c.offsetInBytes;c.vertexBuffer.copyFromArrayView(r,o),this._nFirstMultiTemporalPos=l}if(this._nSecondMultiTemporalPos!==u){var c;r=t[u],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight_1)).strideInBytes+c.offsetInBytes;c.vertexBuffer.copyFromArrayView(r,o),this._nSecondMultiTemporalPos=u}}}};var _0x214b10=new o$1p;function _0x426300(e,t){if(!e$2b(t._matModel))return p$1d.IDENTITY;var i,n;if(t._layer._fileType!==d$15.ClampGroundRealtimeRasterCache&&(p$1d.clone(t._matModel,t._relativeModelMatrix),p$1d.getTranslation(t._matModel,_0x214b10),o$1p.subtract(_0x214b10,e.relativeOrigin,_0x214b10),p$1d.setTranslation(t._relativeModelMatrix,_0x214b10,t._relativeModelMatrix)),t._arrtextOverlapInfo&&t._arrtextOverlapInfo.length>0)for(n=t._arrtextOverlapInfo.length,i=0;i<n;i++){var r=t._arrtextOverlapInfo[i];o$1p.subtract(r.worldPosLeftBottom,e.relativeOrigin,r.worldPosLBRelativeOrigin)}}function _0x53ea3e(e,t,i){!e$2b(i._colorCommand)||(_0x15b102.set(e,t,i),_0x15b102.execute())}function _0x12c526(e,t,i,n){let r=0;const o=n._material;return r=(o._usePBR||i._usePBR)|(o._textures.length>0)<<1|(o._textures.length>1)<<2|i._flattening<<3|i._hasExcavation<<4|e$2b(i._categorieTexture)<<5|(e$2b(i._imageryLayer)&&e$2b(n._attributeLocations.img))<<6|i._hasOverlay<<7|i._hasEmissiveTexAtlas<<8|i._hasSnowEffect<<9|i._hasRainEffect<<10|i._bUseHypColorTable<<11,r}function _0x2f4a70(e){if(!e$2b(e._colorCommand))return;const t=e._colorCommand;t.shaderProgram=e._sp,t.uniformMap=e._uniformMap,e._uniformMap=t.uniformMap,e._stencilCommand&&(e._stencilCommand.uniformMap=t.uniformMap)}var _0x38a539=new p$1d;_0x30a010.prototype.update=function(e,t,i,n){const r=_0x12c526(e,t,n,this);if(this._flag!==r&&(this._flag=r,this._uniformMap={},_0x23730d.create(t,n,this,this._uniformMap),e$2b(this._regularEdgeCommand)&&(this._regularEdgeCommand.uniformMap=p$19(this._regularEdgeCommand.uniformMap,this._uniformMap)),e$2b(this._silhouetteEdgeCommand)&&(this._silhouetteEdgeCommand.uniformMap=p$19(this._silhouetteEdgeCommand.uniformMap,this._uniformMap)),this._meshUBO._isValueDirty=!0),e$2b(this._volumeUBO)&&this._volumeUBO.update(e),this._bufferPrepared&&this.createPickRectCommand(n),n._fileType===d$15.ClampGroundRealtimeRasterCache&&_0x4dad4e.getTexture(this._symbolTextureUrl)!=this._materialUBO._getTextureByType("uTexture")&&(this._materialUBO._isValueDirty=!0,this.refreshRaster(t)),this._materialUBO.update(e),this._meshUBO.update(e),e$2b(this._colorCommand)&&e$2b(this._vertexPackage)&&e$2b(this._vertexPackage.vertexAttributes)&&(delete this._vertexPackage.vertexAttributes,this._arrIndexPackage=null),this._arrIndexPackage=null,this._isPBR&&(this._specularEnvironmentMaps!==t.specularEnvironmentMaps||this._hdrEnvMap!==t.hdrEnvMap)&&_0x53ea3e(t,n,this),_0x2f4a70(this),n._fileType===d$15.PointCloudFile&&e$2b(n._pointCloudLayerVisible))if(e$2b(this._ptIndexGroup)){for(var o in this._ptIndexGroup)if(this._ptIndexGroup.hasOwnProperty(o)&&n._pointCloudLayerVisible[n._pointCloudLayerNames[o]]){this.pushCommands(t,i,n);break}}else e$2b(this._groupName)&&n._pointCloudLayerVisible[this._groupName]&&this.pushCommands(t,i,n);else this.pushCommands(t,i,n);n._fileType===d$15.PointCloudFile&&e$2b(this._colorCommand)&&(n._pointCloudShading.renderMode==_0x16e744.VOXEL?this._colorCommand.renderState=d$1m.fromCache({depthTest:{enabled:!1}}):(n._pointCloudShading.eyeDomeLighting||n._pointCloudShading.performance)&&(this._colorCommand.renderState=d$1m.fromCache({depthTest:{enabled:!0}}))),(n._fileType===d$15.Text||n._fileType===d$15.IconPoint)&&this.updateBillboardsBounds(n,e.uniformState,t),this._themeDirty&&_0x280201(n,this),this._layer._showLabel&&this.updateLabels(t),this._updateBatchTable&&Object.keys(this._pickInfo).length>0&&e$2b(this._batchTable)&&this.updateBatchTable(t,t.context,n),this.updatePolygons(e,i,n),e$2b(t.specularEnvironmentMaps)&&(_0x38a539=p$1d.multiply(n._context.uniformState.view3D,this._matModel,_0x38a539),this._iblReferenceFrameMatrix=p$1d.getMatrix3(_0x38a539,this._iblReferenceFrameMatrix),this._iblReferenceFrameMatrix=p$1e.getRotation(this._iblReferenceFrameMatrix,this._iblReferenceFrameMatrix),this._iblReferenceFrameMatrix=p$1e.transpose(this._iblReferenceFrameMatrix,this._iblReferenceFrameMatrix)),this.updateVertexWeight(),(!o$1p.equals(this._relativeOrigin,n._context.relativeOrigin)||this._modelMatrixDirty)&&(this._modelMatrixDirty=!1,_0x426300(n._context,this),e$2b(this._meshUBO)&&(this._meshUBO.valueDirty=!0,this._meshUBO.update(n._context)),o$1p.clone(n._context.relativeOrigin,this._relativeOrigin))};var _0x15b102=new _0x3fd475;function _0x4019b3(e,t,i){for(var n=i._shaderProgramToCreate;n.length&&(n.peek(),_0x15b102.set(e,t,i),e.jobScheduler.execute(_0x15b102,i$Q.PROGRAM));)n.dequeue()}function _0x442f63(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!e$2b(i)){var n=t.fragmentShaderSource.clone();n.defines=e$2b(n.defines)?n.defines.slice(0):[],n.defines.push("POLYGON_OFFSET"),n.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),i=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:t._attributeLocations})}return i}function _0x345ef0(e,t){var i=i$_.shallowClone(t),n=l$1g(i.renderState,!0);n.cull.enabled=!0,n.cull.face=G$17.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5},n.stencilTest=u$N.setCesium3DTileBit(),n.stencilMask=u$N.CESIUM_3D_TILE_MASK,i.renderState=d$1m.fromCache(n),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=l$1g(t.uniformMap);var r=new o$1o(5,5);return i.uniformMap.u_polygonOffset=function(){return r},i.shaderProgram=_0x442f63(e,t.shaderProgram),i}function _0x5ebbfe(e){return(e.renderState.stencilTest.reference&u$N.SKIP_LOD_MASK)>>>u$N.SKIP_LOD_BIT_SHIFT}function _0x30daca(e,t){var i=i$_.shallowClone(e),n=l$1g(i.renderState,!0);return n.cull.enabled=!0,n.stencilTest.enabled=!0,n.stencilTest.mask=u$N.SKIP_LOD_MASK,n.stencilTest.reference=u$N.CESIUM_3D_TILE_MASK|t<<u$N.SKIP_LOD_BIT_SHIFT|2,n.stencilTest.frontFunction=m$X.GREATER_OR_EQUAL,n.stencilTest.frontOperation.zPass=n$Y.REPLACE,n.stencilTest.backFunction=m$X.GREATER_OR_EQUAL,n.stencilTest.backOperation.zPass=n$Y.REPLACE,n.stencilMask=u$N.CESIUM_3D_TILE_MASK|u$N.SKIP_LOD_MASK|2,i.renderState=d$1m.fromCache(n),i}function _0x68df19(e,t){return{uMaxClip:function(){return e},uMinClip:function(){return t}}}function _0x31a52c(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1N;for(var a in e$1N.clone(n,o),r._hash)if(r._hash.hasOwnProperty(a)){var s=r.get(a),l=u$_(o.get(a),new e$1U),u=e$1U.multiply(l,s,new e$1U);o.set(a,u)}for(var a in i._hash)if(i._hash.hasOwnProperty(a)){var c=i._hash[a],h=(l=u$_(o.get(a),new e$1U),e$1U.multiply(c,l,new e$1U));o.set(a,h)}o.length>0&&t.updateObjsColor(o,e.selectColorType,!0)}function _0x850766(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1N,a=e$1N.clone(r);for(var s in n._hash)if(n._hash.hasOwnProperty(s)){var l=n._hash[s];e$1U.equals(e$1U.WHITE,l)?a.set(s,l):o.set(s,l)}for(var s in i._hash)if(i._hash.hasOwnProperty(s)){l=i._hash[s];e$1U.equals(e$1U.WHITE,l)?a.set(s,l):o.set(s,l)}for(var s in o._hash)if(o._hash.hasOwnProperty(s)&&r.contains(s)){var u=o.get(s),c=(l=r.get(s),e$1U.multiply(u,l,new e$1U));o.set(s,c),a.remove(s)}a.length>0&&t.updateObjsColor(a,Zr$2.MIX,!0),o.length>0&&t.updateObjsColor(o,Zr$2.REPLACE,!0)}function _0x55c4a8(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1N;for(var a in e$1N.clone(n,o),r._hash)if(r._hash.hasOwnProperty(a)){var s=r.get(a),l=u$_(o.get(a),new e$1U),u=e$1U.multiply(l,s,new e$1U);o.set(a,u)}o.length>0&&t.updateObjsColor(o,Zr$2.MIX,!0),i.length>0&&t.updateObjsColor(i,e.selectColorType,!0)}function _0x5299d9(e,t){var i=t._pickInfo,n=[];for(var r in i)if(i.hasOwnProperty(r)&&"0"!==r){var o=new _0x104945(t,r);Object.assign(o,e._layerScheduler._attributes[r]),o.id=r,o.batchId=i[r].batchId,o.instanceIds=i[r].instanceIds,n.push(o)}return n}_0x30a010.prototype.createResources=function(e,t){if(this._bufferPrepared||_0x3ddcbe(this,e,t,t._context),e$2b(this._sp)||_0x4019b3(e,t,this),_0x2e0d4d(this,e,t),t._fileType===d$15.ClampGroundRealtimeRasterCache)return this._bufferPrepared},_0x30a010.prototype.pushClampCommands=function(e,t,i){var n=this._colorCommand;e$2b(this._clampSelected)&&this._clampSelected?(i._fileType===d$15.ClampGroundPolygon||i._fileType===d$15.ClampGroundLine?(n.pass=Le$s.GLOBE+1,this._stencilCommand.pass=Le$s.GLOBE+1,e$2b(this._selectedStencilCommand)&&e$2b(this._selectedColorCommand)&&(this._selectedStencilCommand.pass=Le$s.GLOBE+1,this._selectedColorCommand.pass=Le$s.GLOBE+1)):i._fileType===d$15.ClampObjectPolygon&&(n.pass=Le$s.ClampObject,this._stencilCommand.pass=Le$s.ClampObject,e$2b(this._selectedStencilCommand)&&e$2b(this._selectedColorCommand)&&(this._selectedStencilCommand.pass=Le$s.ClampObject,this._selectedColorCommand.pass=Le$s.ClampObject)),t.push(this._stencilCommand),t.push(n),e$2b(this._selectedStencilCommand)&&e$2b(this._selectedColorCommand)&&(t.push(this._selectedStencilCommand),t.push(this._selectedColorCommand))):(i._fileType===d$15.ClampGroundPolygon||i._fileType===d$15.ClampGroundLine?(n.pass=Le$s.GLOBE+1,this._stencilCommand.pass=Le$s.GLOBE+1):i._fileType===d$15.ClampObjectPolygon&&(n.pass=Le$s.ClampObject,this._stencilCommand.pass=Le$s.ClampObject),t.push(this._stencilCommand),t.push(n))},_0x30a010.prototype.isTransparent=function(e){return e._style3D.fillForeColor.alpha<e.maxTransparentAlpha&&e._pointCloudShading.renderMode!==_0x16e744.VOXEL&&e.orderIndependentTranslucency},_0x30a010.prototype.pushCommandsForNormalAndDepthFrameBuffer=function(e,t){!e$2b(this._normalAndDepthCommand)||(e.isSilhouette()?e$2b(this._hasSilhouette)&&this._hasSilhouette&&t.push(this._normalAndDepthCommand):t.push(this._normalAndDepthCommand))},_0x30a010.prototype.pushCommandsForPostEffectFrameBuffer=function(e,t){!e.bloomEnable||!e$2b(this._postEffectCommand)||(e.bloomEnable&&e$2b(this._postEffectCommand)||this._hasBloomOperation)&&t.push(this._postEffectCommand)},_0x30a010.prototype.pushCommandsForClampFrameBuffer=function(e,t){!this._intersectWithClipPlane||!e$2b(this._clampColorCommand)||(t.push(this._clipStencilCommand),t.push(this._clampColorCommand))},_0x30a010.prototype.pushCommandsForFrameBuffer=function(e,t,i,n){t==Qe$c.NORMAL_AND_DEPTH?this.pushCommandsForNormalAndDepthFrameBuffer(e,i):t==Qe$c.POSTEFFECT_FILTER?this.pushCommandsForPostEffectFrameBuffer(e,i):t==Qe$c.CLAMP?this.pushCommandsForClampFrameBuffer(e,i):t==Qe$c.PICKRECT?this.pushCommandsForPickRectBuffer(e,i):t==Qe$c.SQRESULT?this.pushCommandsForSpatialQueryBuffer(e,i):t==Qe$c.RASTER&&this.pushCommandsForRasterHeightMap(n,e,i)},_0x30a010.prototype.isNeedRasterized=function(e){for(var t in e){if(!e$2b(this._layerImagerys[t])||this._layerImagerys[t].length!=e[t].length)return!0;for(var i=0;i<e[t].length;i++)if(this._layerImagerys[t][i].level!=e[t][i].level||this._layerImagerys[t][i].x!=e[t][i].x||this._layerImagerys[t][i].y!=e[t][i].y)return!0}return!1},_0x30a010.prototype.pushCommands=function(e,t,i){if(e$2b(this._colorCommand)){if(e$2b(i._imageryLayer)&&e$2b(this._cartographic)&&e$2b(this._imagerys)&&!this._imageRasterFinish&&this.updateImageryTexture(i,e),e$2b(this._dayTextureAlpha)&&e$2b(this._imagerys))for(var n=0;n<this._imagerys.length;n++){var r=this._imagerys[n].imageryLayer;this._dayTextureAlpha[n]=r.alpha}if(e.passes.pick&&e$2b(this._stencilCommand))return t.push(this._stencilCommand),void(this._pickCommand&&t.push(this._pickCommand));if(i._spatialClipEnable)return e$2b(this._clipCommand)||this.createSpatialClipCommand(e,i),void t.push(this._clipCommand);if(!e.passes.depth||i._fileType!==d$15.IconPoint&&i._fileType!==d$15.Text){var o=e._fboState.frameBufferType;if(e$2b(o)&&(o===Qe$c.NORMAL_AND_DEPTH||o===Qe$c.POSTEFFECT_FILTER||o===Qe$c.CLAMP||o===Qe$c.PICKRECT||o===Qe$c.SQRESULT||o===Qe$c.RASTER&&(4&e.useType)>0))return void this.pushCommandsForFrameBuffer(i,o,t,e);if(i._style3D.fillStyle!==fr$2.WireFrame||i._fileType===d$15.ClampGroundPolygon){i.LoadingPriority,_0x10659f.UsePagedLodInfo;var a=this._colorCommand,s=Le$s.S3MTiles,l=this._mapPass,u=!1;if(a.renderState=i._rsColor,e$2b(this.materialPass)&&this.materialPass._alphaMode===_0x5f0e97.BLEND&&!e$2b(i.waterEffectSet))u=!0;else if(i._isTransparencyOptimization){for(var c in l)if(l[c]._bTransparentSorting){u=!0;break}}else for(var c in l)if(l[c]._bTransparentSorting){s+=1;break}if(this._isSelected&&i.selectedColor.alpha<1&&(u=!0),!(e.passes.pick&&i._scene.pickPointEnabled)&&(this.isTransparent(i)||u)&&(i.partlyTransparent?t.push(this._transparentCommand):s=i.orderIndependentTranslucency?Le$s.TRANSLUCENT:s),i._fileType===d$15.IconPoint||i._fileType===d$15.Text?s=Le$s.Label_Billboard:i._pointCloudShading.renderMode==_0x16e744.VOXEL&&(s=Le$s.Voxel_Billboard),e$2b(this._stencilCommand))this.pushClampCommands(e,t,i);else if(this.oriPassGroup!==Le$s.OVERLAY&&(a.pass=i.receiveObjectClamp?s:Le$s.NonClampObject,a.pass+=this._passIncrement),i._fileType===d$15.ClampGroundRealtimeRasterCache)e$2b(this._level)&&(a._globeIndex={level:this._level,row:this._row,col:this._col}),e$2b(a)&&this._updateBatchTable&&Object.keys(this._pickInfo).length>0&&this.updateBatchTable(e,e.context,i),a&&e.commandListRealtimeRaster.push(a);else if(this._clipBounds.length>0)for(n=0;n<this._clipBounds.length;n++){var h=this._clipBounds[n].max,d=this._clipBounds[n].min,f=i$_.shallowClone(a);if(void 0!==h&&void 0!==d){var p=_0x68df19(h,d);f._uniformMap=p$19(p,a._uniformMap),f.shaderProgram=this._spUnFinalResolution,t.push(f)}}else if(this._plusRoArray.length>0){var _=this._plusRoArray.length-1,m=this._plusRoArray[_];for(n=0;n<m.length;n++)t.push(m[n].command)}else a&&t.push(a)}i._style3D.fillStyle!==fr$2.Fill?i.wireFrameMode===_0x15916e.EffectOutline||i.wireFrameMode===_0x15916e.Sketch?(e$2b(this._regularEdgeCommand)&&(t.push(this._regularEdgeCommand),i._addRenderedEdge(this._regularEdgeCommand.edgeTotalLength,this._regularEdgeCommand.edgeCount)),e$2b(this._silhouetteEdgeCommand)&&(t.push(this._silhouetteEdgeCommand),i._addRenderedEdge(this._silhouetteEdgeCommand.edgeTotalLength,this._silhouetteEdgeCommand.edgeCount))):i.wireFrameMode===_0x15916e.Quad?e$2b(this._wireFrameCommands.quad)&&t.push(this._wireFrameCommands.quad):i.wireFrameMode===_0x15916e.Triangle&&e$2b(this._wireFrameCommands.triangle)&&t.push(this._wireFrameCommands.triangle):e$2b(this._regularEdgeCommand)&&this._isSelected&&i._selectColorType===Zr$2.WIREFRAME&&(t.push(this._regularEdgeCommand),i._addRenderedEdge(this._regularEdgeCommand.edgeTotalLength,this._regularEdgeCommand.edgeCount)),this._rasterized||i._fileType===d$15.ClampGroundRealtimeRasterCache&&this.refreshRaster(e),this._rasterized=!0}}};var _0xd09dec=new e$1U;function _0x280201(e,t){var i=e.themeStyle;if(e$2b(i)){if(!e$2b(i.color)&&e$2b(i.pbrMaterialIndex)){e$2b(t._featureArray)||(t._featureArray=_0x5299d9(e,t));for(var n=t._featureArray,r=0;r<n.length;r++){var o=n[r];Object.assign(o,e._layerScheduler._attributes[o.id]);var a=i.pbrMaterialIndex.evaluate(o);e$2b(a)||(a=-1),t._idsPBRIndexMap.set(o.id,{batchId:o.batchId,instanceIds:o.instanceIds,pbrMaterialIndex:a,dirty:!0})}t._updateBatchTable=!0,t._themeDirty=!1}e$2b(t._featureArray)||(t._featureArray=_0x5299d9(e,t));for(n=t._featureArray,r=0;r<n.length;r++){o=n[r];Object.assign(o,e._layerScheduler._attributes[o.id]);var s=void 0;e$2b(i.color)&&(s=i.color.evaluateColor(o,_0xd09dec));var l=void 0;e$2b(i.show)&&(l=i.show.evaluate(o));var u=t._idsOperationMap.get(o.id);if(e$2b(u)||(u={batchId:o.batchId,instanceIds:o.instanceIds,skeletonId:-1,operationValue:new e$29,dirty:!0},t._idsOperationMap.set(o.id,u)),e$2b(s)&&(t._idsColorMap.set(o.id,{batchId:o.batchId,instanceIds:o.instanceIds,color:e$1U.clone(s),dirty:!0}),u.operationValue.x=1&u.operationValue.x|_0x4580ad.SetColor,u.dirty=!0),e$2b(l)){if(l){var c=_0x4580ad.ALL^_0x4580ad.HIDE;u.operationValue.x&=c}else u.operationValue.x=1&u.operationValue.x|_0x4580ad.HIDE;u.dirty=!0}}t._updateBatchTable=!0,t._themeDirty=!1}}function _0x3ddcbe(e,t,i,n){_0x16a0c9(e,t,n),_0x24bad6(e,t,i,n),0===e._vertexBufferToCreate.length&&0===e._indexBufferToCreate.length&&(e._bufferPrepared=!0,e._instanceBuffer=void 0)}_0x30a010.prototype.initLayerSetting=function(e){if(this._isClamp=_0x182d60(e,this),e$2b(e.waterEffectSet)||e.multiTemporalUseWater){let i=e.multiTemporalUseWater?e._waterParamter.averageHeight:e.waterEffectSet[0].averageHeight;var t={boundingVolume:this._boundingVolume,distance:e.height+e.style3D.bottomAltitude+i};this._waterIndex=e.addWaterPlane(t)}e.allObjsHide&&this.updateAllObjsVisible(e,!e.allObjsHide),Object.keys(e._objsOperationList).length>0&&this.updateObjsOperation(e._objsOperationList),e.themeStyle&&_0x280201(e,this),Object.keys(e._objsColorList).length>0&&this.updateObjsColor(e._objsColorList),Object.keys(e._objsOffsetList).length>0&&this.updateObjsTranslate(e._objsOffsetList)},_0x30a010.prototype.initLayerSettingBak=function(e){if(this._isClamp=_0x182d60(e,this),e$2b(e.waterEffectSet)){var t={boundingVolume:this._boundingVolume,distance:e.height+e.style3D.bottomAltitude+e.waterEffectSet[0].averageHeight};this._waterIndex=e.addWaterPlane(t)}if(e.allObjsHide&&this.updateAllObjsVisible(!e.allObjsHide),e.selectColorType===Zr$2.REPLACE?_0x850766(e,this):e.selectColorType===Zr$2.MIX?_0x31a52c(e,this):(this.updateObjsColor(e._selections,e.selectColorType,!0),_0x55c4a8(e,this)),e._objsVisibleList.length>0&&this.updateObjsVisible(e._objsVisibleList,e._objsVisibleList.values[0]),e$2b(e._objsHeightList)&&e._objsHeightList.length>0&&this.updateExtendHeight(e._objsHeightList),Object.keys(e._objsOperationList).length>0){var i=Math.max(Math.abs(e.selectedTranslate.x),Math.abs(e.selectedTranslate.y),Math.abs(e.selectedTranslate.z));this.updateObjsOperation(e._objsOperationList,i)}},_0x30a010.prototype.createAllCommands=function(e,t){e$2b(this._colorCommand)||(e$2b(t.waterEffectSet)||t.multiTemporalUseWater?this.createWater(t):this.createCommand(e,t),this.initLayerSetting(t))};var _0x2c54b7=new _0x4eaac2,_0x5c4149=new _0x5cff5c;function _0x16a0c9(e,t,i){for(var n=e._vertexBufferToCreate;n.length;){var r=n.peek();if(_0x2c54b7.set(i,e,r),!t.jobScheduler.execute(_0x2c54b7,i$Q.BUFFER))break;n.dequeue()}}function _0x24bad6(e,t,i,n){!e$2b(e._wireFrameIndexBuffers)&&i.wireFrameMode===_0x15916e.Triangle&&i.style3D.fillStyle!==fr$2.Fill&&(e._wireFrameIndexBuffers=e.createWireframeIndexBuffer(n));for(var r=e._vertexPackage.verticesCount,o=e._indexBufferToCreate;o.length;){var a=o.peek();if(_0x5c4149.set(n,e,a,r),!t.jobScheduler.execute(_0x5c4149,i$Q.BUFFER))break;o.dequeue()}}var _0x53fa35=new _0x10b3f1;function _0x2e0d4d(e,t,i){if(i._isS3MBlock){for(var n in e._mapPass)if(e._mapPass.hasOwnProperty(n)){(l=e._mapPass[n]).initTexture(),l.initBakeTexture(),l.requestSubTextures(t,t.context,i,e._subTexturesToUpload),l.requestBakeSubTextures(t,t.context,i,e._subTexturesToUpload)}for(var r=e._subTexturesToUpload;r.length;){var o=r.peek(),a=o.texture,s=o.subTextureInfo;if(_0x53fa35.set(t.context,e,a,s,i._textureLod),!t.jobScheduler.execute(_0x53fa35,i$Q.TEXTURE))break;r.dequeue()}if(0===r.length)for(var n in e._mapPass)if(e._mapPass.hasOwnProperty(n)){var l;(l=e._mapPass[n]).enableTextureRenderable(),l.enableBakeTextureRenderable()}}}function _0xa12f4d(e){var t=e._fileType;return e.shadowType!=_0x381f49.NONE&&(t===d$15.OSGBFile||t===d$15.OSGBCacheFile||t===d$15.PointCloudFile)}function _0x182d60(e,t){var i=e._fileType,n=i==d$15.ClampGroundPolygon||i==d$15.ClampObjectPolygon||i==d$15.ExtendClampPolygonCache||i==d$15.ClampGroundLine||i==d$15.ClampObjectLine;return t._clampRegionEdge&&(n=!1),n}_0x30a010.prototype.createWater=function(e){var t=this._arrIndexPackage[0];if(e$2b(t)){var i=e._context,n=this._vertexPackage,r=n.vertexAttributes;this._instanceCount=n.instanceCount,this._instanceMode=n.instanceMode,this._attributeLocations=n.attrLocation;var o=Le$s.S3MTiles;_0xcd424e(n);var a=this._mapPass[t.materialCode],s=W$18.TRIANGLES;switch(t.primitiveType){case 1:s=W$18.POINTS;break;case 2:s=W$18.LINES;break;case 4:s=W$18.TRIANGLES}var l=new i$_({primitiveType:s,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:o,count:t.indicesCount,cull:!0});l.addUniformBuffer(e._context.uniformState._sceneUBO),l.addUniformBuffer(e._layerUBO),l.addUniformBuffer(e._waterLayerUbo),l.addUniformBuffer(this._meshUBO),l.addUniformBuffer(this._materialUBO),l.pickId="vSecondColor",l.vertexArray=new c$12({context:i,attributes:r,indexBuffer:t.indexBuffer}),this.materialPass=a,l.shaderProgram=this._sp,l.renderState=e._rsColor,l.castShadows=!1,l.receiveShadows=!1,l.selectCastShadows=!1,this._uniformMap={},_0x23730d.create(e._frameState,e,this,this._uniformMap),l.uniformMap=this._uniformMap,this._colorCommand=l}},_0x30a010.prototype.createWireframeIndexBuffer=function(e){var t,i,n;if(e$2b(t=this._arrIndexPackage[0])&&e$2b(t.indicesTypedArray)){i={indices:0===t.indexType?new Uint16Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesCount):new Uint32Array(t.indicesTypedArray),primitiveType:W$18.TRIANGLES},k$13.toWireframe(i),n=i.indices;var r=ce$x.UNSIGNED_SHORT;return this._vertexPackage.verticesCount>e$2a.SIXTY_FOUR_KILOBYTES?(r=ce$x.UNSIGNED_INT,n=new Uint32Array(n)):n=new Uint16Array(n),t$Y.createIndexBuffer({context:e,typedArray:n,usage:A$19.STATIC_DRAW,indexDatatype:r})}},_0x30a010.prototype.createStencilCommandForClampLayer=function(e,t){var i=void 0;(i=i$_.shallowClone(e)).renderState=t,this._stencilCommand=i},_0x30a010.prototype.createClampColorCommand=function(e){e._context;var t=this._colorCommand;if(e$2b(t)&&e.isRenderClipSection()&&!e$2b(this._clampColorCommand)){this._intersectWithClipPlane=this.isIntersectWithClipPlane(e);var i=i$_.shallowClone(t);i.renderState=e._rsClampColor,this._clampColorCommand=i;var n=i$_.shallowClone(t);n.renderState=e._rsStencil,this._clipStencilCommand=n}};var _0x2e5c83=new h$18;function _0xcd424e(e){for(var t in e.attrLocation){var i=e.attrLocation[t];e.vertexAttributes[i].name=t}}_0x30a010.prototype.refreshRasterTile=function(e,t){var i=e._rectangle;e$2b(h$18.intersection(t,i,_0x2e5c83))&&(e._rasterized=!1),e$2b(e._southwestChild)&&this.refreshRasterTile(e._southwestChild,t),e$2b(e._southeastChild)&&this.refreshRasterTile(e._southeastChild,t),e$2b(e._northwestChild)&&this.refreshRasterTile(e._northwestChild,t),e$2b(e._northeastChild)&&this.refreshRasterTile(e._northeastChild,t)},_0x30a010.prototype.refreshRasterTile2=function(e,t,i,n){var r=!1;if(e._level>=t){var o=Math.pow(2,e._level-t),a=Math.floor(e.y/o),s=Math.floor(e.x/o);a===i&&s===n&&(r=!0)}else{o=Math.pow(2,t-e._level),a=Math.floor(i/o),s=Math.floor(n/o);a===e.y&&s===e.x&&(r=!0)}r&&(e._rasterized=!1,e$2b(e._southwestChild)&&this.refreshRasterTile2(e._southwestChild,t,i,n),e$2b(e._southeastChild)&&this.refreshRasterTile2(e._southeastChild,t,i,n),e$2b(e._northwestChild)&&this.refreshRasterTile2(e._northwestChild,t,i,n),e$2b(e._northeastChild)&&this.refreshRasterTile2(e._northeastChild,t,i,n))},_0x30a010.prototype.refreshRaster=function(e,t){if(this._layer._fileType===d$15.ClampGroundRealtimeRasterCache)if(e$2b(this._level)&&!e$2b(t))this.refreshRasterTile2(e._quadtree._levelZeroTiles[0],this._level,this._row,this._col),this.refreshRasterTile2(e._quadtree._levelZeroTiles[1],this._level,this._row,this._col);else if(e$2b(e._quadtree._levelZeroTiles)){var i=new h$18(this._boundingVolume.center.x-this._boundingVolume.radius,this._boundingVolume.center.y-this._boundingVolume.radius,this._boundingVolume.center.x+this._boundingVolume.radius,this._boundingVolume.center.y+this._boundingVolume.radius);i.west=e$2a.toRadians(i.west),i.north=e$2a.toRadians(i.north),i.east=e$2a.toRadians(i.east),i.south=e$2a.toRadians(i.south),this.refreshRasterTile(e._quadtree._levelZeroTiles[0],i),this.refreshRasterTile(e._quadtree._levelZeroTiles[1],i)}},_0x30a010.prototype.createSpatialClipCommand=function(e,t){if(!e$2b(this._clipCommand)){var i=this._colorCommand,n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push("SQCLIP"),r.defines.push("SQCLIP"),e.useLogDepth&&r.defines.push("LOG_DEPTH");var o=i$_.shallowClone(i);o.uniformMap.uFrontDepthTexture=function(){return t._sqTextures[0]},o.uniformMap.uBackDepthTexture=function(){return t._sqTextures[1]},o.uniformMap.uFrontColorTexture=function(){return t._sqTextures[2]},o.uniformMap.uSQMode=function(){return t._sqMode},o.shaderProgram=r$13.fromCache({context:t._context,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),this._clipCommand=o}},_0x30a010.prototype.createCommand=function(e,t){if(e$2b(this._sp)){var i=t._context;if(!i.webgpu||!this._clampRegionEdge){var n=this._vertexPackage;if(e$2b(n.vertexAttributes)){e$2b(this._vertexArray)||_0xcd424e(n);var r=n.vertexAttributes;this._instanceCount=n.instanceCount,this._instanceMode=n.instanceMode,this._attributeLocations=n.attrLocation;var o=Le$s.S3MTiles,a=this._clampRegionEdge?t._rsClampLineColor:t._rsColor,s=t._fileType,l=this._arrIndexPackage[0];t._hasWireframe||this._arrIndexPackage.length>1&&(t._hasWireframe=!0);var u,c=_0x21d1b1.Default,h=n.verticesCount,d=W$18.POINTS;if(e$2b(l))switch(!0===(c=u$_(this._mapPass[l.materialCode],_0x21d1b1.Default))._bTransparentSorting&&(o=Le$s.S3MTiles+1),u=l.indexBuffer,l.primitiveType){case 1:d=W$18.POINTS;break;case 2:d=W$18.LINES;break;case 4:d=W$18.TRIANGLES}else if(e$2b(this._ptIndexGroup)){var f,p,_,m,g,x=0;for(g in this._ptIndexGroup)this._ptIndexGroup.hasOwnProperty(g)&&(p=t._pointCloudLayerNames[g],t._pointCloudLayerVisible[p]&&(_=this._ptIndexGroup[g].start,x+=(m=this._ptIndexGroup[g].end)-_+1));if(x>0){var v=ce$x.createTypedArray(n.verticesCount,x),y=0;for(g in this._ptIndexGroup)if(this._ptIndexGroup.hasOwnProperty(g)&&(p=t._pointCloudLayerNames[g],t._pointCloudLayerVisible[p]))for(_=this._ptIndexGroup[g].start,m=this._ptIndexGroup[g].end,f=_;f<=m;)v[y++]=f++;var $=n.verticesCount>=e$2a.SIXTY_FOUR_KILOBYTES&&i.elementIndexUint?ce$x.UNSIGNED_INT:ce$x.UNSIGNED_SHORT;u=t$Y.createIndexBuffer({context:i,typedArray:v,usage:A$19.STATIC_DRAW,indexDatatype:$}),this.isBillboardPoint()&&(u=this._context.createBillboardPointIndexBuffer())}else h=1}this.isBillboardPoint()&&(d=W$18.TRIANGLES),this.materialPass=c,this.useWValue=4===r[0].componentsPerAttribute,e$2b(this._attributeLocations.aVertexWeight)&&(this.useWValue=1),(1===d||s===d$15.ClampGroundRealtimeRasterCache&&e$2b(this._attributeLocations.aTexCoord1))&&(this.useLineColor=!0),this.oriPassGroup=o;var b=new i$_({primitiveType:d,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:o,count:e$2b(u)?void 0:h,cull:!0,occlude:!1});this._entity&&this._entity.isFlatten&&(b.cull=!1),b.opaquePass=Le$s.S3MTiles,t._fileType===d$15.ClampGroundRealtimeRasterCache&&(b.layerId=t.id),b.pickId="vSecondColor",s===d$15.PointCloudFile&&(b.pickId="vPosition"),b.instanceCount=this._instanceCount,this.isBillboardPoint()&&(b.instanceCount=this._vertexPackage.verticesCount),b.vertexArray=new c$12({context:i,attributes:r,indexBuffer:u}),b.shaderProgram=this._sp,_0x182d60(t,this)&&((t._fileType===d$15.ClampGroundPolygon||t._fileType===d$15.ClampObjectPolygon||t._fileType===d$15.ClampGroundLine||t._fileType===d$15.ExtendClampPolygonCache)&&(b.pickId=void 0),this._isClamp=!0),b.renderState=a,b.uniformMap=this._uniformMap,s===d$15.ClampGroundRealtimeRasterCache&&(b.useRelativeOrigin=!1),b.addUniformBuffer(t._context.uniformState._sceneUBO),b.addUniformBuffer(t._context.uniformState._lightUBO),b.addUniformBuffer(t._layerUBO),b.addUniformBuffer(this._meshUBO),b.addUniformBuffer(this._materialUBO),e$2b(t._polylineEffectUbo)?b.addUniformBuffer(t._polylineEffectUbo):e$2b(t._regionEffectUbo)&&b.addUniformBuffer(t._regionEffectUbo),e$2b(this._volumeUBO)&&b.addUniformBuffer(this._volumeUBO),_0x182d60(t,this)&&this.createStencilCommandForClampLayer(b,t._rsStencil);var T=_0xa12f4d(t);b.castShadows=T,b.receiveShadows=T,b.selectCastShadows=!0,b.owner=this,(s==d$15.IconPoint||s===d$15.Text)&&(b.cull=!1),this._colorCommand=b,this.createWireFrameCommand(t,r)}}}},_0x30a010.prototype.createOneEdgeCommand=function(e,t,i,n,r){if(!e$2b(i.attributes)||0==i.attributes.length||!e$2b(i.instanceCount)||0==i.instanceCount)return null;var o,a,s=Le$s.OPAQUE+1,l=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:s,owner:this,cull:!0});if(l.vertexArray=new c$12({context:e,attributes:i.attributes,indexBuffer:n}),l.instanceCount=i.instanceCount,r){var u="RegularEdge_"+t.id,c="RegularEdge_"+t.id;o=new s$U({name:u,sources:[_0x5a4442]}),a=new s$U({name:c,sources:[_0x171550]})}else{u="SilhouetteEdge_"+t.id,c="SilhouetteEdge_"+t.id;o=new s$U({name:u,sources:[_0x5a4442]}),a=new s$U({name:c,sources:[_0x171550]}),o.defines.push("SILHOUETTE"),a.defines.push("SILHOUETTE")}o.defines.push("ANTIALIASING"),a.defines.push("ANTIALIASING"),a.defines.push("POLYGON_OFFSET"),t._hasExcavation&&(o.defines.push(Y$H.EXCAVATION),a.defines.push(Y$H.EXCAVATION)),t._hasServerExcavation&&(o.defines.push("SERVEREXCAVATION"),a.defines.push("SERVEREXCAVATION")),t.swipeEnabled&&a.defines.push(Y$H.APPLY_SWIPE),t._clipping&&a.defines.push("CLIP"),t._section&&a.defines.push("CLIPPLANE"),this._batchTable&&(o.defines.push("BatchTable"),-1===o.defines.indexOf("BatchTableMultiRow")&&o.defines.push("BatchTableMultiRow")),t._selectColorType===Zr$2.WIREFRAME&&t._style3D.fillStyle===fr$2.Fill&&a.defines.push(Y$H.WIREFRAME_SELECT_TYPE);var h=0;t.wireFrameMode===_0x15916e.Sketch&&(h=1),o.defines.push("MODE "+h),a.defines.push("MODE "+h),l.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:i.attributeLocations}),l.renderState=d$1m.fromCache({depthTest:{enabled:!0,func:re$E.LESS_OR_EQUAL},cull:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var d={uStrokesTexture:function(){return e$2b(t._edgeStrokesTexture)||t._initEdgeTexture(),t._edgeStrokesTexture}};return l.uniformMap=p$19(d,this._colorCommand.uniformMap),l.edgeTotalLength=i.edgeLength,l.edgeCount=i.instanceCount,l.wireframeType=t.wireFrameMode,l.addUniformBuffer(t._context.uniformState._sceneUBO),l.addUniformBuffer(t._layerUBO),l.addUniformBuffer(this._meshUBO),l},_0x30a010.prototype.createEdgeCommands=function(e){if(e$2b(this._edgeGeometry)){var t=e._context,i=this._edgeGeometry;_0x30c9ea.createRegularEdgeAttributes(t,i.regular),_0x30c9ea.createSilhouetteEdgeAttributes(t,i.silhouette);var n=_0x30c9ea.createIndexBuffer(t);this._regularEdgeCommand=this.createOneEdgeCommand(t,e,i.regular,n,!0),this._silhouetteEdgeCommand=this.createOneEdgeCommand(t,e,i.silhouette,n,!1),(e$2b(this._regularEdgeCommand)||e$2b(this._silhouetteEdgeCommand))&&e.wireFrameMode===_0x15916e.Quad&&(e.wireFrameMode=_0x15916e.EffectOutline)}},_0x30a010.prototype.createTrangleWireFrameCommand=function(e,t){if(e$2b(this._arrIndexPackage[0])&&e$2b(this._colorCommand)){var i=e._context;this._arrIndexPackage[0].indicesCount;var n=i$_.shallowClone(this._colorCommand);n.primitiveType=W$18.LINES,n.vertexArray=new c$12({context:i,attributes:t,indexBuffer:this._wireFrameIndexBuffers}),this._wireFrameCommands.triangle=n}},_0x30a010.prototype.createQuadWireFrameCommand=function(e,t,i){var n=e._context,r=2===i.primitiveType?W$18.LINES:W$18.LINE_STRIP,o=i$_.shallowClone(this._colorCommand);o.pass=Le$s.LOG_DEPTH_OVERLAY,o.count=void 0,o.primitiveType=r,o.vertexArray=new c$12({context:n,attributes:t,indexBuffer:i.indexBuffer});var a=this._colorCommand.shaderProgram.vertexShaderSource.clone(),s=this._colorCommand.shaderProgram.fragmentShaderSource.clone(),l=a.defines.indexOf(Y$H.SKETCH_MODE);l>0&&a.defines.splice(l,1),(l=a.defines.indexOf(Y$H.COMPUTE_W_VALUE))>0&&a.defines.splice(l,1),(l=a.defines.indexOf(Y$H.EMISSION_TEXTURE_ATLAS))>0&&a.defines.splice(l,1),(l=s.defines.indexOf(Y$H.SKETCH_MODE))>0&&s.defines.splice(l,1),(l=s.defines.indexOf(Y$H.COMPUTE_W_VALUE))>0&&s.defines.splice(l,1),(l=s.defines.indexOf(Y$H.EMISSION_TEXTURE_ATLAS))>0&&s.defines.splice(l,1),a.defines.push("QUAD_OUTLINE"),s.defines.push("QUAD_OUTLINE"),s.defines.push("Only_LineColor"),o.shaderProgram=r$13.fromCache({context:n,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations}),o.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),this._wireFrameCommands.quad=o},_0x30a010.prototype.createWireFrameCommand=function(e,t){if(!this._isClamp&&e._fileType!==d$15.ClampGroundPolygon){if(this._arrIndexPackage.length>1)if(13==this._arrIndexPackage[1].primitiveType)this.createEdgeCommands(e);else if(2==this._arrIndexPackage[1].primitiveType){var i=this._arrIndexPackage[1];this.createQuadWireFrameCommand(e,t,i)}e.wireFrameMode===_0x15916e.Triangle&&e.style3D.fillStyle!==fr$2.Fill&&this.createTrangleWireFrameCommand(e,t)}},_0x30a010.prototype.updateTheme=function(e){_0x280201(e,this)},_0x30a010.prototype.updateObjsColor=function(e){if(this._initialize&&e$2b(this._selectionInforMap)&&_0x41168d.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&e$2b(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)){var n=e[i];if(e$2b(n)){var r=t[i];this._updateBatchTable=!0;var o=r.batchId,a=r.instanceIds;this._idsColorMap.set(i,{batchId:o,instanceIds:a,color:n,dirty:!0});var s=this._idsOperationMap.get(i);e$2b(s)||(s={batchId:o,instanceIds:a,operationValue:new e$29,dirty:!0}),s.dirty=!0,s.operationValue.x=n===e$1U.TRANSPARENT?254&s.operationValue.x:1|s.operationValue.x,this._passIncrement=n.alpha<1?1:0,this._idsOperationMap.set(i,s)}}}},_0x30a010.prototype._radiusToExpand=function(e){if(!this._selectionInforMap||!this._initialize||!e$2b(this._colorCommand))return 0;var t=this._selectionInforMap._hash,i=0;for(var n in t)!t.hasOwnProperty(n)||!e[n]||(i=Math.max(o$1p.magnitude(e[n]),i),this._oriBoundingSphere||(this._oriBoundingSphere=this._boundingVolume.clone()),this._colorCommand.boundingVolume.radius=this._oriBoundingSphere.radius+i,this._boundingVolume.radius=this._oriBoundingSphere.radius+i);return i},_0x30a010.prototype.updateObjsTranslate=function(e){if(this._initialize&&e$2b(this._selectionInforMap)&&_0x41168d.S3M!==this._version){var t=this._selectionInforMap.length,i=this._colorCommand;if(!(t<1)&&e$2b(i)){var n=this._selectionInforMap._hash,r=this._idsTranslateMap.length,o=!1;for(var a in n)if(n.hasOwnProperty(a)){var s=e[a];if(s){var l=n[a];this._updateBatchTable=!0;var u=l.batchId,c=l.instanceIds;this._idsTranslateMap.set(a,{batchId:u,instanceIds:c,translate:s,dirty:!0});var h=this._idsOperationMap.get(a);e$2b(h)||(h={batchId:u,instanceIds:c,operationValue:new o$1p,dirty:!0}),h.dirty=!0,o$1p.equals(s,o$1p.ZERO)?(h.operationValue.x=h.operationValue.x&(_0x4580ad.ALL^_0x4580ad.OFFSET),this._idsOperationMap.set(a,h)):(h.operationValue.x=h.operationValue.x|_0x4580ad.OFFSET,o=!0)}}e$2b(this._entity)&&(this._entity.hasTranslate=o),i.cull=!o;var d=this._idsTranslateMap.length;(d>0&&0===r||r>0&&0===d)&&d>0&&0===r&&this.appendProgramDefine({layer:this._layer},!0,!1,Y$H.Translation,!0,!1)}}},_0x30a010.prototype.updateAllObjsVisible=function(e,t){if(this._initialize&&e$2b(this._selectionInforMap)&&_0x41168d.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&e$2b(this._colorCommand))){var i=this._selectionInforMap._hash;for(var n in i)if(i.hasOwnProperty(n)&&!e._objsVisibleList.contains(n)){var r=i[n];this._updateBatchTable=!0;var o=r.batchId,a=r.instanceIds,s=this._idsOperationMap.get(n);e$2b(s)||(s={batchId:o,instanceIds:a,operationValue:new e$29,dirty:!0}),s.dirty=!0,s.operationValue.x=t?s.operationValue.x&(_0x4580ad.ALL^_0x4580ad.HIDE):s.operationValue.x|_0x4580ad.HIDE,this._idsOperationMap.set(n,s),s.operationValue.x===_0x4580ad.RESET?delete e._objsOperationList[n]:(e._objsOperationList[n]=s.operationValue.x,e._objsHideList.set(n,!0))}}},_0x30a010.prototype.removeAllExtendHeight=function(){this._initialize&&e$2b(this._texCoord1)&&e$2b(this._colorCommand)&&this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1).vertexBuffer.copyFromArrayView(this._texCoord1)},_0x30a010.prototype.removeExtendHeight=function(e){if(this._initialize&&e$2b(this._texCoord1)&&(!(this._selectionInforMap.length<1)&&e$2b(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)&&-1!=e.indexOf(parseInt(i))){var n,r,o,a,s=t[i];n=this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1),r=(a=s.vertexColorOffset*n.componentsPerAttribute)*S$12.getSizeInBytes(n.componentDatatype),o=s.vertexColorCount*n.componentsPerAttribute;var l=this._texCoord1.slice(a,o);n.vertexBuffer.copyFromArrayView(l,r)}}},_0x30a010.prototype.updateExtendHeight=function(e){if(this._initialize&&e$2b(this._texCoord1)&&(!(this._selectionInforMap.length<1)&&e$2b(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)&&e.contains(i)){var n,r,o,a,s=t[i],l=e.get(i);n=this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1),r=(a=s.vertexColorOffset*n.componentsPerAttribute)*S$12.getSizeInBytes(n.componentDatatype),o=s.vertexColorCount*n.componentsPerAttribute;for(var u=S$12.createTypedArray(n.componentDatatype,o),c=0;c<s.vertexColorCount;c++)this._texCoord1[2*c+1+a]>.3&&this._texCoord1[2*c+1+a]<.8?(u[2*c]=l,u[2*c+1]=.5):this._texCoord1[2*c+1+a]>.8?(u[2*c]=l,u[2*c+1]=1):(u[2*c]=this._texCoord1[2*c+a],u[2*c+1]=0);n.vertexBuffer.copyFromArrayView(u,r)}}},_0x30a010.prototype.updateObjsOperation=function(e,t){if(this._initialize&&e$2b(this._selectionInforMap)&&_0x41168d.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&e$2b(this._colorCommand))){var i=this._selectionInforMap._hash,n=!1,r=_0x182d60(this._layer,this),o=!1,a=this._layer.isSilhouette(),s=!1,l=!1;for(var u in i)if(i.hasOwnProperty(u)){var c=e[u];if(e$2b(c)){var h=i[u];this._updateBatchTable=!0;var d=this._layer._lastSelectSkeletonId,f=d>-1?u+"_"+d:u,p=h.batchId,_=h.instanceIds,m=this._idsOperationMap.get(f);e$2b(m)||(m={batchId:p,instanceIds:_,skeletonId:d,operationValue:new e$29,dirty:!0}),m.dirty=!0,m.operationValue.x=1&m.operationValue.x|c,this._idsOperationMap.set(f,m),(m.operationValue.x&_0x4580ad.BLOOM)>0&&(n=!0),r&&(m.operationValue.x&_0x4580ad.SELECTED)>0&&(o=!0),a&&(m.operationValue.x&_0x4580ad.SELECTED)>0&&(s=!0),(m.operationValue.x&_0x4580ad.SELECTED)>0&&(l=!0)}}this._hasBloomOperation=n,this._clampSelected=o,this._hasSilhouette=s,this._isSelected=l}};var _0xf460f=new o$1m(new o$1p(1,0,0),0);function _0x1c82a0(e,t){return o$1p.distance(e.center,t.center)<=e.radius+t.radius}function _0x4bcc34(e,t){var i=!1,n=t.split(" "),r=!1;if(n.length>1){var o=n[0],a=n[1];for(var s in e.defines)if(-1!==e.defines[s].indexOf(o))return e.defines[s]=o+" "+a,!0;r=!0,e.defines.push(t)}else{for(var l=0,u=e.defines.length;l<u;l++)if(e.defines[l]===t){i=!0;break}i||(r=!0,e.defines.push(t))}return r}function _0x1ad78b(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function _0x55e46c(e,t){e$2b(t)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),t.renderState=void 0,t.uniformMap=void 0,t.removeAllUniformBuffer())}function _0x6d1e60(e,t,i,n){if(!e$2b(i._labelPromiseArr[n])){var r=e._s3MTilesLabelStyle._textField;e.getAttributesById(t).then((function(e){if(i._labelPromiseArr[n]=void 0,e.hasOwnProperty(r)){var o=e[r];i._labelTextArray[n]=o,i._labelsCreated[t]=!0}}))}}_0x30a010.prototype.isIntersectWithClipPlane=function(e){return!!e.isRenderClipSection()&&this._boundingVolume.intersectPlane(o$1m.fromCartesian4(e._oriClipPlane[0],_0xf460f))===Ae$u.INTERSECTING},_0x30a010.prototype.setCustomClipBox=function(e,t){var i={layer:e};t?(this.appendProgramDefine(i,!1,!0,Y$H.CLIP),e._section&&this.appendProgramDefine(i,!1,!0,Y$H.CLIPPLANE)):(this.removeProgramDefine(i,!1,!0,Y$H.CLIP),e._section&&this.removeProgramDefine(i,!1,!0,Y$H.CLIPPLANE)),e$2b(this._clampColorCommand)&&(!this._clampColorCommand.shaderProgram.isDestroyed()&&this._clampColorCommand.shaderProgram.destroy(),this._clampColorCommand=void 0),e$2b(this._clipStencilCommand)&&(!this._clipStencilCommand.shaderProgram.isDestroyed()&&this._clipStencilCommand.shaderProgram.destroy(),this._clipStencilCommand=void 0)},_0x30a010.prototype.updateShadow=function(e){var t=_0xa12f4d(this),i=this._colorCommand;!e$2b(i)||(i.castShadows=t,i.receiveShadows=t,i.selectCastShadows=!e$2b(e.waterEffectSet))},_0x30a010.prototype.cloneSelectCommand=function(e){var t=e._context,i=new s$U({name:"S3MTilesSelection",sources:[_0x527139]});e._clipping&&i.defines.push("CLIP"),i.defines.push("DepthEXT");var n=this._colorCommand;if(e$2b(n)){var r=n.shaderProgram.vertexShaderSource.clone(),o=void 0;if((o=i$_.shallowClone(n,o)).shaderProgram=r$13.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:i,attributeLocations:this._attributeLocations}),this._pickCommand=o,this._pickCommand.pass=Le$s.ClampObject,e$2b(this._stencilCommand)){var a=this._stencilCommand.shaderProgram.vertexShaderSource.clone(),s=this._stencilCommand.shaderProgram.fragmentShaderSource.clone();a.defines.push("SELECTED"),s.defines.push("SELECTED"),this._selectedStencilCommand=i$_.shallowClone(this._stencilCommand),this._selectedStencilCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations}),this._selectedColorCommand=i$_.shallowClone(this._colorCommand),this._selectedColorCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations})}}},_0x30a010.prototype.createNormalAndDepthCommand=function(e){var t=e._context,i=this._colorCommand;if(e.isSilhouette()&&e$2b(i)&&!e$2b(this._normalAndDepthCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push(Y$H.NORMAL_AND_DEPTH),r.defines.push(Y$H.NORMAL_AND_DEPTH),e.isSilhouette()&&(n.defines.push(Y$H.SILHOUETTE_SELECT_TYPE),r.defines.push(Y$H.SILHOUETTE_SELECT_TYPE));var o=void 0;(o=i$_.shallowClone(i,o)).shaderProgram=r$13.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.uniformMap.uNormalDepthTexture=function(){return e._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0)},this._normalAndDepthCommand=o}},_0x30a010.prototype.createTransparentCommand=function(e){var t=e._context,i=this._colorCommand;if(e.partlyTransparent&&e$2b(i)&&!e$2b(this._transparentCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();r.defines.push("TRANSPARENT_PASS");var o=void 0;(o=i$_.shallowClone(i,o)).shaderProgram=r$13.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.pass=Le$s.TRANSLUCENT,this._transparentCommand=o}},_0x30a010.prototype.createPostEffectCommand=function(e){var t=e._context,i=this._colorCommand;if(e.bloomEnable&&e$2b(i)&&!e$2b(this._postEffectCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push(Y$H.POST_EFFECT),r.defines.push(Y$H.POST_EFFECT);var o=void 0;(o=i$_.shallowClone(i,o)).shaderProgram=r$13.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.pass=Le$s.S3MTiles,this._postEffectCommand=o}},_0x30a010.prototype.enableAjustTransparentBackColor=function(e){this.appendProgramDefine(e,!1,!0,Y$H.TRANSPARENT_BACK_COLOR)},_0x30a010.prototype.disableAjustTransparentBackColor=function(e){this.removeProgramDefine(e,!1,!0,Y$H.TRANSPARENT_BACK_COLOR)},_0x30a010.prototype.enableAdjustColor=function(e){this.appendProgramDefine(e,!1,!0,Y$H.ADJUST_COLOR)},_0x30a010.prototype.enableVertexCapture=function(e){this.appendProgramDefine(e,!0,!0,Y$H.VERTEX_CAPTURE)},_0x30a010.prototype.disableVertexCapture=function(e){this.removeProgramDefine(e,!0,!0,Y$H.VERTEX_CAPTURE)},_0x30a010.prototype.enableExcavation=function(e){this.appendProgramDefine(e,!0,!0,Y$H.EXCAVATION)},_0x30a010.prototype.disableExcavation=function(e){this.removeProgramDefine(e,!0,!0,Y$H.EXCAVATION)},_0x30a010.prototype.enableServerExcavation=function(e){this.appendProgramDefine(e,!0,!0,"SERVEREXCAVATION")},_0x30a010.prototype.disableServerExcavation=function(e){this.removeProgramDefine(e,!0,!0,"SERVEREXCAVATION")},_0x30a010.prototype.enableFlatten=function(e){e$2b(e.entity)&&e$2b(e.entity._boundingSphere)&&e$2b(e.boundingSphere)&&(_0x1c82a0(e.entity._boundingSphere,e.boundingSphere)&&(e.entity.isFlatten=!0,e$2b(this._colorCommand)&&(this._colorCommand.cull=!1)));this.appendProgramDefine(e,!0,!1,Y$H.FALTTEN),this.appendProgramDefine(e,!0,!1,Y$H.UseFloatTexture)},_0x30a010.prototype.enableOverlay=function(e){this.appendProgramDefine(e,!0,!0,Y$H.OVERLAY)},_0x30a010.prototype.disableOverlay=function(e){this.removeProgramDefine(e,!1,!0,Y$H.OVERLAY)},_0x30a010.prototype.disableFlatten=function(e){e$2b(e.entity)&&(e.entity.isFlatten=!1),e$2b(this._colorCommand)&&(this._colorCommand.cull=!0),this.removeProgramDefine(e,!0,!1,Y$H.FALTTEN),this.removeProgramDefine(e,!0,!1,Y$H.UseFloatTexture)},_0x30a010.prototype.enableHypsometric=function(e){this.appendProgramDefine(e,!0,!0,Y$H.COMPUTE_W_VALUE),this.appendProgramDefine(e,!0,!0,Y$H.HYPSOMETRIC)},_0x30a010.prototype.disableHypsometric=function(e){this.removeProgramDefine(e,!0,!0,Y$H.COMPUTE_W_VALUE),this.removeProgramDefine(e,!0,!0,Y$H.EMISSION_TEXTURE_ATLAS),this.removeProgramDefine(e,!0,!0,Y$H.HYPSOMETRIC)},_0x30a010.prototype.hasLightChange=function(e){e.enable?this.appendProgramDefine(e,!0,!0,Y$H.HAS_LIGHT):this.removeProgramDefine(e,!0,!0,Y$H.HAS_LIGHT)},_0x30a010.prototype.skeletonSelectedChange=function(e){e.enable?this.appendProgramDefine(e,!0,!0,Y$H.HAS_SKELETONSELECTED):this.removeProgramDefine(e,!0,!0,Y$H.HAS_SKELETONSELECTED)},_0x30a010.prototype.skeletonSelectEnable=function(e){e.enable?this.appendProgramDefine(e,!0,!0,Y$H.SKELETONSELECT_ENABLE):this.removeProgramDefine(e,!0,!0,Y$H.SKELETONSELECT_ENABLE)},_0x30a010.prototype.selectColorTypeChange=function(e){e.selectColorType==Zr$2.REPLACE?(this.appendProgramDefine(e,!0,!0,Y$H.REPLACE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,Y$H.SILHOUETTE_SELECT_TYPE)):e.selectColorType==Zr$2.SILHOUETTE||e.selectColorType==Zr$2.ALWAYS_SHOW_SILHOUETTE?(this.appendProgramDefine(e,!0,!0,Y$H.SILHOUETTE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,Y$H.REPLACE_SELECT_TYPE)):(this.removeProgramDefine(e,!0,!0,Y$H.REPLACE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,Y$H.SILHOUETTE_SELECT_TYPE))},_0x30a010.prototype.mixColorTypeChange=function(e){e.mixColorType===_0x203e3b.REPLACE?this.appendProgramDefine(e,!0,!0,Y$H.REPLACE_COLOR_TYPE):this.removeProgramDefine(e,!0,!0,Y$H.REPLACE_COLOR_TYPE)},_0x30a010.prototype.splitDirectionChange=function(e){e.enableSplit?this.appendProgramDefine(e,!1,!0,Y$H.APPLY_SPLIT):this.removeProgramDefine(e,!1,!0,Y$H.APPLY_SPLIT)},_0x30a010.prototype.swipeStateChange=function(e){e.enableSwipe?this.appendProgramDefine(e,!1,!0,Y$H.APPLY_SWIPE):this.removeProgramDefine(e,!1,!0,Y$H.APPLY_SWIPE)},_0x30a010.prototype.edgeWireFrameModeChange=function(e){this.appendProgramDefineForCommand(this._regularEdgeCommand,e,!0,!0,"MODE "+e.edgeMode,!1),this.appendProgramDefineForCommand(this._silhouetteEdgeCommand,e,!0,!0,"MODE "+e.edgeMode,!1)},_0x30a010.prototype.PBRMaterialTypeChange=function(e){e.PBRType===je$g.NONE?this.removeProgramDefine(e,!0,!0,Y$H.PBR):this.appendProgramDefine(e,!0,!0,Y$H.PBR)},_0x30a010.prototype.emissionTextureChange=function(e){e.enable?(this.appendProgramDefine(e,!0,!0,Y$H.COMPUTE_W_VALUE),this.appendProgramDefine(e,!0,!0,Y$H.EMISSION_TEXTURE_ATLAS)):this.removeProgramDefine(e,!0,!0,Y$H.EMISSION_TEXTURE_ATLAS)},_0x30a010.prototype.enableTextureMove=function(e){e.enable?this.appendProgramDefine(e,!0,!0,Y$H.TEXTURE_MOVE):this.removeProgramDefine(e,!0,!0,Y$H.TEXTURE_MOVE)},_0x30a010.prototype.enableTriangleFiltrate=function(e){e.enable?this.appendProgramDefine(e,!0,!1,Y$H.TRIANGLE_FILTRATE):this.removeProgramDefine(e,!0,!1,Y$H.TRIANGLE_FILTRATE)},_0x30a010.prototype.enableClipFilt=function(e){e.enable?this.appendProgramDefine(e,!1,!0,Y$H.CLIP_FILT_BY_ID):this.removeProgramDefine(e,!1,!0,Y$H.CLIP_FILT_BY_ID)},_0x30a010.prototype.enableFlood=function(e){this.appendProgramDefine(e,!0,!0,Y$H.FLOOD_ANALYSIS)},_0x30a010.prototype.disableFlood=function(e){this.removeProgramDefine(e,!0,!0,Y$H.FLOOD_ANALYSIS)},_0x30a010.prototype.emissionTextureUnitChange=function(e){e.enable?this.appendProgramDefine(e,!0,!1,Y$H.SEC_TEX_EMISSION):this.removeProgramDefine(e,!0,!1,Y$H.SEC_TEX_EMISSION)},_0x30a010.prototype.pbrParameterChange=function(e){if(e.enable){this._materialUBO.valueDirty=!0,this._materialUBO.update(e.layer._context);var t=e.layer,i=(t._pbrParameter&je$g.ROUGHNESS)>0||t._PBRMaterialParams.loadingTexture,n=e$2b(t.themeStyle)&&e$2b(t.themeStyle.pbrMaterialIndex),r=[];if(i||n){r.push(Y$H.BRDF);var o=e$2b(this._attributeLocations.aTexCoord0);n&&(r.push(Y$H.PBR_THEME),r.push("NUM_PBR_MATERIALS "+t._frameState.pbrMaterialsArr.length)),e$2b(t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture instanceof t$V&&o&&r.push(Y$H.HAS_BASE_TEXTURE),o&&e$2b(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2b(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor)&&e$2b(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof t$V&&r.push(Y$H.HAS_RAIN),o&&e$2b(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect)&&e$2b(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture instanceof t$V&&e$2b(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture instanceof t$V&&r.push(Y$H.HAS_SNOW),(e$2b(this.materialPass)&&this.materialPass._metallicRoughnessTextureIndex>-1||e$2b(t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture instanceof t$V)&&o&&r.push(Y$H.HAS_MetallicRoughness_TEXTURE),(e$2b(this.materialPass)&&this.materialPass._normalTextureIndex>-1||e$2b(t._PBRMaterialParams.pbrMetallicRoughness.normalTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.normalTexture instanceof t$V)&&o&&r.push(Y$H.HAS_NORMAL_TEXTURE),(e$2b(this.materialPass)&&this.materialPass._occlusionTextureIndex>-1||e$2b(t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture instanceof t$V)&&o&&r.push(Y$H.HAS_OCCLUSION_TEXTURE),e$2b(this.materialPass)&&this.materialPass._emissiveTextureIndex>-1&&r.push(Y$H.HAS_EMISSIVE_TEXTURE),e$2b(t._frameState.specularEnvironmentMaps)&&r.push(Y$H.IBL),this.appendProgramDefinesForCommand(this._colorCommand,e,!1,!0,r,!0,!0)}else r=[Y$H.BRDF,"NUM_PBR_MATERIALS "+t._frameState.pbrMaterialsArr.length,Y$H.HAS_BASE_TEXTURE,Y$H.HAS_NORMAL_TEXTURE,Y$H.HAS_EMISSIVE_TEXTURE,Y$H.IBL,Y$H.HAS_MetallicRoughness_TEXTURE,Y$H.HAS_SNOW,Y$H.HAS_RAIN],this.removeProgramDefinesForCommand(this._colorCommand,e,!1,!0,r)}},_0x30a010.prototype.enableFusionChange=function(e){e.enable?this.appendProgramDefine(e,!0,!1,Y$H.FusionMode):this.removeProgramDefine(e,!0,!1,Y$H.FusionMode)},_0x30a010.prototype.appendProgramDefine=function(e,t,i,n,r,o){r=u$_(r,!0),o=u$_(o,!0),this.appendProgramDefineForCommand(this._colorCommand,e,t,i,n,r,o),this.appendProgramDefineForCommand(this._regularEdgeCommand,e,t,i,n,!1,o),this.appendProgramDefineForCommand(this._silhouetteEdgeCommand,e,t,i,n,!1,o),this.appendProgramDefineForCommand(this._wireFrameCommands.quad,e,!1,!0,n,!1,o),this.appendProgramDefineForCommand(this._wireFrameCommands.triangle,e,!1,!0,n,!1,o)},_0x30a010.prototype.appendProgramDefineForCommand=function(e,t,i,n,r,o,a){if(o=u$_(o,!0),a=u$_(a,!0),e$2b(e)){l=t.layer._context,u=e.shaderProgram.fragmentShaderSource.clone(),c=e.shaderProgram.vertexShaderSource.clone();e$2b(u.name)||(u.name="fpCustomName"+t.layer.id),e$2b(c.name)||(c.name="vpCustomName"+t.layer.id),i&&_0x4bcc34(c,r),n&&_0x4bcc34(u,r);h=e.shaderProgram._attributeLocations;a&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());var s=r$13.fromCache({context:l,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h});o&&(this._sp=s),e.shaderProgram=s,e$2b(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x442f63(l,e.shaderProgram))}else if(o&&e$2b(this._sp)){var l=t.layer._context,u=this._sp.fragmentShaderSource.clone(),c=this._sp.vertexShaderSource.clone();e$2b(u.name)||(u.name="fpCustomName"+t.layer.id),e$2b(c.name)||(c.name="vpCustomName"+t.layer.id),i&&_0x4bcc34(c,r),n&&_0x4bcc34(u,r);var h=this._attributeLocations;this._sp.destroy(),this._sp=r$13.fromCache({context:l,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h})}},_0x30a010.prototype.appendProgramDefinesForCommand=function(e,t,i,n,r,o,a){o=u$_(o,!0),a=u$_(a,!0);var s=t.layer._context;if(e$2b(e)){u=e.shaderProgram.fragmentShaderSource.clone(),c=e.shaderProgram.vertexShaderSource.clone();e$2b(u.name)||(u.name="fpCustomName"+t.layer.id),e$2b(c.name)||(c.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x4bcc34(c,e),n&&_0x4bcc34(u,e)}));h=e.shaderProgram._attributeLocations;a&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());var l=r$13.fromCache({context:s,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h});o&&(this._sp=l),e.shaderProgram=l,e$2b(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x442f63(s,e.shaderProgram))}else if(o&&e$2b(this._sp)){var u=this._sp.fragmentShaderSource.clone(),c=this._sp.vertexShaderSource.clone();e$2b(u.name)||(u.name="fpCustomName"+t.layer.id),e$2b(c.name)||(c.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x4bcc34(c,e),n&&_0x4bcc34(u,e)}));var h=this._attributeLocations;this._sp.destroy(),this._sp=r$13.fromCache({context:s,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h})}},_0x30a010.prototype.removeProgramDefine=function(e,t,i,n){this.removeProgramDefineForCommand(this._colorCommand,e,t,i,n),e$2b(this._regularEdgeCommand)&&this.removeProgramDefineForCommand(this._regularEdgeCommand,e,t,i,n,!1),e$2b(this._silhouetteEdgeCommand)&&this.removeProgramDefineForCommand(this._silhouetteEdgeCommand,e,t,i,n,!1),e$2b(this._wireFrameCommands.quad)&&this.removeProgramDefineForCommand(this._wireFrameCommands.quad,e,!1,!0,n,!1),e$2b(this._wireFrameCommands.triangle)&&this.removeProgramDefineForCommand(this._wireFrameCommands.triangle,e,!1,!0,n,!1)},_0x30a010.prototype.removeProgramDefineForCommand=function(e,t,i,n,r,o){if(o=u$_(o,!0),e$2b(e)){s=t.layer._context,l=e.shaderProgram.fragmentShaderSource.clone(),u=e.shaderProgram.vertexShaderSource.clone();e$2b(l.name)||(l.name="fpCustomName"+t.layer.id),e$2b(u.name)||(u.name="vpCustomName"+t.layer.id),i&&_0x1ad78b(u,r),n&&_0x1ad78b(l,r);c=e.shaderProgram._attributeLocations;e.shaderProgram.destroy();var a=r$13.fromCache({context:s,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c});e.shaderProgram=a,o&&(this._sp=a),e$2b(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x442f63(s,e.shaderProgram))}else if(o&&e$2b(this._sp)){var s=t.layer._context,l=this._sp.fragmentShaderSource.clone(),u=this._sp.vertexShaderSource.clone();e$2b(l.name)||(l.name="fpCustomName"+t.layer.id),e$2b(u.name)||(u.name="vpCustomName"+t.layer.id),i&&_0x1ad78b(u,r),n&&_0x1ad78b(l,r);var c=this._attributeLocations;this._sp.destroy(),this._sp=r$13.fromCache({context:s,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c})}},_0x30a010.prototype.removeProgramDefinesForCommand=function(e,t,i,n,r,o){var a=t.layer._context;if(o=u$_(o,!0),e$2b(e)){l=e.shaderProgram.fragmentShaderSource.clone(),u=e.shaderProgram.vertexShaderSource.clone();e$2b(l.name)||(l.name="fpCustomName"+t.layer.id),e$2b(u.name)||(u.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x1ad78b(u,e),n&&_0x1ad78b(l,e)}));c=e.shaderProgram._attributeLocations;e.shaderProgram.destroy();var s=r$13.fromCache({context:a,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c});e.shaderProgram=s,o&&(this._sp=s),e$2b(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x442f63(a,e.shaderProgram))}else if(o&&e$2b(this._sp)){var l=this._sp.fragmentShaderSource.clone(),u=this._sp.vertexShaderSource.clone();e$2b(l.name)||(l.name="fpCustomName"+t.layer.id),e$2b(u.name)||(u.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x1ad78b(u,e),n&&_0x1ad78b(l,e)}));var c=this._attributeLocations;this._sp.destroy(),this._sp=r$13.fromCache({context:a,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c})}},_0x30a010.prototype.lightSourceChanged=function(e){if(e$2b(this._colorCommand)){var t=e.changedList,i=this._layer._scene._lightSource;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n],o=r.type,a=r.count;switch(o){case _0x1d9df9.DIRECTIONAL:i.directionalLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_DIR_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_DIR_LIGHTS);break;case _0x1d9df9.POINT:i.pointLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_POINT_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_POINT_LIGHTS);break;case _0x1d9df9.SPOT:i.spotLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_SPOT_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_SPOT_LIGHTS);break;case _0x1d9df9.HEMISPHERE:i.hemisphereLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_HEMISPHERE_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,Y$H.HAS_HEMISPHERE_LIGHTS)}}}},_0x30a010.prototype.enableCategoryVisible=function(e){this.appendProgramDefine(e,!0,!1,Y$H.W_VISIBLE)},_0x30a010.prototype.isDestroyed=function(){return!1},_0x30a010.prototype.destroyScaleImagerys=function(){if(e$2b(this._scaleImagerys)){for(var e=0;e<this._scaleImagerys.length;e++){var t=this._scaleImagerys[e];if(e$2b(t))for(var i=0;i<t.length;i++)t[i].releaseReference()}this._scaleImagerys.length=0}},_0x30a010.prototype.destroy=function(){var e=e$2b(this._layer.instanceSkeletonManager)&&"InstanceModel"===this._layer._dataType;if(e$2b(this._vertexPackage)&&e$2b(this._vertexPackage.vertexAttributes)&&!e)for(var t=this._vertexPackage.vertexAttributes,i=0,n=t.length;i<n;i++){var r=t[i];e$2b(r.vertexBuffer)&&!r.vertexBuffer.isDestroyed()&&r.vertexBuffer.vertexArrayDestroyable&&!r.vertexBuffer.isDestroyed()&&r.vertexBuffer.destroy()}if(e$2b(this._arrIndexPackage)&&!e)for(i=0,n=this._arrIndexPackage.length;i<n;i++){var o=this._arrIndexPackage[i];e$2b(o.indexBuffer)&&!o.indexBuffer.isDestroyed()&&o.indexBuffer.destroy()}e$2b(this._wireFrameIndexBuffers)&&this._wireFrameIndexBuffers.destroy();var a=this._context,s=this._layer;if(s._isS3MBlock)for(var l in this._mapPass)this._mapPass.hasOwnProperty(l)&&s.materialManager.free(s,l);else for(var l in this._mapPass)if(this._mapPass.hasOwnProperty(l)){var u=this._mapPass[l];!u.isDestroyed()&&u.destroy()}if(this._mapPass=void 0,this._sp=void 0,this._instanceMode>0){if(e$2b(this._colorCommand)){var c=this._colorCommand;c.vertexArray=c.vertexArray&&!c.vertexArray.isDestroyed()&&c.vertexArray.destroy(),c.shaderProgram=c.shaderProgram&&!c.shaderProgram.isDestroyed()&&c.shaderProgram.destroy(),c.renderState=void 0,c.uniformMap=void 0,this._colorCommand=void 0}}else _0x55e46c(a,this._colorCommand),this._colorCommand=void 0,this._wireFrameCommands.triangle&&_0x55e46c(a,this._wireFrameCommands.triangle),this._wireFrameCommands.quad&&_0x55e46c(this._wireFrameCommands.quad),this._wireFrameCommands={},_0x55e46c(a,this._pickCommand),this._pickCommand=void 0,this._stencilCommand=void 0,_0x55e46c(a,this._selectedStencilCommand),this._selectedStencilCommand=void 0,_0x55e46c(a,this._selectedColorCommand),this._selectedColorCommand=void 0,_0x55e46c(a,this._normalAndDepthCommand),this._normalAndDepthCommand=void 0,_0x55e46c(a,this._postEffectCommand),this._postEffectCommand=void 0,_0x55e46c(a,this._pickRectCommand),this._pickRectCommand=void 0,_0x55e46c(a,this._clipCommand),this._clipCommand=void 0,_0x55e46c(a,this._regularEdgeCommand),this._regularEdgeCommand=void 0,_0x55e46c(a,this._silhouetteEdgeCommand),this._silhouetteEdgeCommand=void 0;if(this._clampColorCommand=void 0,this._clipStencilCommand=void 0,e$2b(this._selectionInforMap)&&this._selectionInforMap.removeAll(),this._vertexPackage=void 0,this._vertexColor=void 0,this._texCoord1=void 0,this._vertexColorInstance=void 0,this._arrIndexPackage=void 0,e$2b(this._volObj)&&(this._volObj=void 0),e$2b(this._volTexture)&&(this._volTexture=void 0),e$2b(this._symbolTextureUrl)&&_0x4dad4e.removeTexture(this._symbolTextureUrl),this._waterIndex,this.s3mbuffer&&(this.s3mbuffer=null),e$2b(this._batchTable)&&(this._batchTable=this._batchTable.destroy()),e$2b(this._imagerys)){for(var h=this._imagerys,d=(i=0,h.length);i<d;++i)h[i].releaseReference();this._imagerys.length=0}if(this.destroyScaleImagerys(),e$2b(this._plusRoArray)){for(i=0;i<this._plusRoArray.length;i++){var f=this._plusRoArray[i];if(e$2b(f))for(n=0;n<f.length;n++)f[n].shaderProgram.destroy(),f[n].uniformMap=void 0}this._plusRoArray.length=0}return this._vertexWeightBuffers.length=0,e$2b(this._meshUBO)&&(this._meshUBO.destroy(),this._meshUBO=null),e$2b(this._materialUBO)&&(this._materialUBO.destroy(),this._materialUBO=null),this._layer._totalMemoryUsageInBytes-=this._geometryByteLength,i$10(this)},_0x30a010.prototype.createPickRectCommand=function(e){if(e$2b(this._colorCommand)&&!e$2b(this._pickRectCommand)&&"FresnelVp"!==this._colorCommand.shaderProgram.vertexShaderSource.name&&"FresnelFp"!==this._colorCommand.shaderProgram.fragmentShaderSource.name){var t=this._colorCommand.shaderProgram._useWGSL;if(e._selectUpdate){var i=e._context,n=new s$U({name:"S3MTilesRectSelection",sources:[t?_0xaee82b:_0x25cbb0],useWGSL:t}),r=this._colorCommand;if(!e$2b(r))return;var o=r.shaderProgram.vertexShaderSource.clone(),a=void 0;(a=i$_.shallowClone(r,a)).shaderProgram=r$13.fromCache({context:i,vertexShaderSource:o,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._pickRectCommand=a}}},_0x30a010.prototype.prepareLabels=function(){if(!this._labelReady){var e=this._pickInfo,t=this._vertexPackage;if(e$2b(e)&&Object.keys(e).length===t.verticesCount&&"InstanceModel"!==this._layer._dataType){for(var i in e)!e.hasOwnProperty(i)||"0"===i||(this._pickIDArray.push(i),this._labelsCreated[i]=!1);this._layer._labelCollection;var n,r,o=new o$1p,a=t.vertexAttributes[0],s=a.componentsPerAttribute,l=e$2b(t.nCompressOptions)&&(t.nCompressOptions&_0x35ed09.SVC_Vertex)===_0x35ed09.SVC_Vertex,u=1;if(e$2b(a.typedArray)){l?(u=t.vertCompressConstant,n=new o$1p(t.minVerticesValue.x,t.minVerticesValue.y,t.minVerticesValue.z),r=new Uint16Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/2)):r=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var c=this._matModel,h=0;h<t.verticesCount;h++)o$1p.fromArray(r,s*h,o),l&&(o=o$1p.multiplyByScalar(o,u,o),o=o$1p.add(o,n,o)),p$1d.multiplyByPoint(c,o,o),this._labelPosArray.push(o$1p.clone(o));this._labelTextArray=new Array(this._labelPosArray.length),this._labelReady=!0}}}},_0x30a010.prototype.isNoExistAllLabels=function(){var e=this._layer._labelCollection;if(0===e._labels.length)return!0;for(var t=!0,i=0;i<this._labelPosArray.length;i++){var n=this._pickIDArray[i];if(e._labelsID.hasOwnProperty(n)){t=!1;break}}return t};var _0x4751ff=new o$1o;_0x30a010.prototype.updateLabels=function(e){if(e.camera,this.isNoExistAllLabels()&&e$2b(this._labelIndexs)&&Object.keys(this._labelIndexs).length>0&&(this._labelIndexs={}),e$2b(this._layer._layerScheduler._indexedDBScheduler)&&0!==this._pickIDArray.length&&0!==this._labelPosArray.length&&!(this._labelPosArray.length<=Object.keys(this._labelIndexs).length)){var t=this._layer,i=t._labelCollection,n=[],r=t._iconCollection,o=[],a=k$P.RELATIVE_TO_GROUND;if(t.showIcon){if(!e$2b(t.style3D)||!t.style3D.imageReady)return;a=t.style3D.altitudeMode,t._showLabel&&(_0x4751ff.y=-t.style3D.image.height/2,a=t._s3MTilesLabelStyle.heightReference)}t._s3MTilesLabelStyle._textField;for(var s=0;s<this._labelPosArray.length;s++){var l=this._pickIDArray[s];if(l=Number(l),this._labelsCreated[l]){var u=this._labelPosArray[s],c=this._labelTextArray[s];if(i.containsLabel(l))this._labelIndexs.hasOwnProperty(l)||(this._labelIndexs[l]=!0);else{var h=r.add({position:u,id:l,image:t.style3D.image,billboardStyle:t.style3D,heightReference:a,show:!0});o.push(h._index);var d=i.add({position:u,id:l,text:c,s3MTilesLabelStyle:t._s3MTilesLabelStyle,pixelOffset:_0x4751ff,show:!1});n.push(d._index)}}else _0x6d1e60(t,l,this,s)}for(var f=0,p=n.length;f<p;f++)this._labelIndexs[l]=!0}},_0x30a010.prototype.pushCommandsForPickRectBuffer=function(e,t){"FresnelVp"===this._colorCommand.shaderProgram.vertexShaderSource.name||"FresnelFp"===this._colorCommand.shaderProgram.fragmentShaderSource.name||!e$2b(this._pickRectCommand)||t.push(this._pickRectCommand)},_0x30a010.prototype.pushCommandsForSpatialQueryBuffer=function(e,t,i){if(e._spatialQueryEnable&&"FresnelVp"!==this._colorCommand.shaderProgram.vertexShaderSource.name&&"FresnelFp"!==this._colorCommand.shaderProgram.fragmentShaderSource.name){if(!e$2b(this._spatialQueryCommand)){var n=this._colorCommand,r=n.shaderProgram.vertexShaderSource.clone();r.defines.push("SQRESULT");var o=new s$U({name:"SpatialQueryFp",sources:[r.useWGSL?_0x2a7fd2:_0x594de8],useWGSL:r.useWGSL});o.defines.push("SQRESULT");var a=i$_.shallowClone(n);a.uniformMap.uTransparentFilter=function(){return e.selectionFiltrateByTransparency},a.uniformMap.uFrontDepthTexture=function(){return e._sqTextures[0]},a.uniformMap.uBackDepthTexture=function(){return e._sqTextures[1]},a.uniformMap.uFrontColorTexture=function(){return e._sqTextures[2]},a.uniformMap.uSQMode=function(){return e._sqMode};var s=new p$1d,l=this._matModel;a.uniformMap.uSQViewProj=function(){var t=new p$1d;return p$1d.multiply(e._sqViewMatirx,l,t),p$1d.multiply(e._sqPrjMatirx,t,s),s},a.shaderProgram=r$13.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),this._spatialQueryCommand=a,a.owner="sqResultTexture"}t.push(this._spatialQueryCommand)}},_0x30a010.prototype.pushCommandsForRasterHeightMap=function(e,t,i){if(e$2b(this._colorCommand)){if(!e$2b(this._rasterHeightCommand)){var n=i$_.shallowClone(this._colorCommand,new i$_),r=this._colorCommand.shaderProgram.vertexShaderSource.clone(),o=this._colorCommand.shaderProgram.fragmentShaderSource.clone();r.defines.push("Height_Map"),o.defines.push("Height_Map"),r.defines.push("COMPUTE_W_VALUE"),o.defines.push("COMPUTE_W_VALUE"),n.shaderProgram=r$13.fromCache({context:e.context,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),this._rasterHeightCommand=n}i.push(this._rasterHeightCommand)}},_0x30a010.prototype.setImagerys=function(e,t){if(this._cartographic=t,this._imagerys=e,e$2b(e))if(e$2b(this._sp)){for(var i=this._sp.fragmentShaderSource,n=-1,r=0;r<i.defines.length;r++)if(i.defines[r].includes("TEXTURE_UNITS")){n=r;break}n<0&&this._imagerys.length>0||e$2b(this._dayTextures)&&e.length>this._dayTextures.length||!e$2b(this._dayTextures)?this._refreshImageryShader():this._computeImageryParameter(this._layer)}else this._computeImageryParameter(this._layer)},_0x30a010.prototype.hasScaleImagerys=function(e){return e$2b(this._scaleImagerys[e-1])},_0x30a010.prototype.setScaleImagerys=function(e,t){!e$2b(e)||t<1||(this._scaleImagerys[t-1]=e)},_0x30a010.prototype.resetScaleImagerys=function(e,t){if(this._imageRasterFinish&&e$2b(this._sp)&&!this._context.webgpu){if(this._scaleImagerys.length>e){for(var i=e;i<this._scaleImagerys.length;i++){if(e$2b(a=this._scaleImagerys[i]))for(var n=0;n<a.length;n++)a[n].releaseReference()}this._scaleImagerys.length=e}if(this._plusRoArray.length>e){for(i=e;i<this._plusRoArray.length;i++){if(e$2b(W=this._plusRoArray[i]))for(n=0;n<W.length;n++)W[n].uniformMap=void 0,W[n].shaderProgram.destroy()}this._plusRoArray.length=e}var r=void 0;for(i=0;i<this._scaleImagerys.length;i++){if(e$2b(a=this._scaleImagerys[i])){var o=!0;for(n=0;n<a.length;n++)a[n].processStateMachine(t,!1),a[n]instanceof _0x4276c1?a[n].state===wt$6.RENDERED||a[n].state===wt$6.READY||a[n].state===wt$6.FAILED||(o=!1):a[n].state<wt$6.TEXTURE_LOADED&&(o=!1);o&&(r=i)}}if(r!=this._visibleScaleImageryIndex){var a=void 0;if(e$2b(r)&&(a=this._scaleImagerys[r]),e$2b(r)&&e$2b(a)&&a.length>0){if(this._visibleScaleImageryIndex=r,!e$2b(this._plusRoArray[r])){var s=this._layer,l=this._sp.fragmentShaderSource.clone();for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("GRIDTEXTURE_UNITS")){l.defines.splice(i,1);break}for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("TEXTURE_UNITS")){l.defines.splice(i,1);break}for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("APPLY_ALPHA")){l.defines.splice(i,1);break}for(i=0;i<l.sources.length;i++)if(l.sources[i].includes("czm_sampleAndBlend")){l.sources.splice(i,1);break}var u=this._sp.vertexShaderSource.clone(),c=!1;for(i=0;i<u.defines.length;i++)if(u.defines[i].includes("IMAGERY")){c=!0;break}c||u.defines.push("IMAGERY");for(var h=0,d=a.length,f=0;d>0;){var p,_=d;p=0===(d-=_=Math.min(_,e$1T._maximumTextureImageUnits-2))?l:l.clone(),h>0&&p.defines.push("MULTIBATCH");var m=[],g=[],x=[],v=[],y=[],$=[],b=[],T=[],C=!1;e$2b(_0x382438)||(_0x382438=new h$18),_0x382438.west=this._cartographic.min.longitude,_0x382438.east=this._cartographic.max.longitude,_0x382438.north=this._cartographic.max.latitude,_0x382438.south=this._cartographic.min.latitude,this._imageryTextureBound.x=this._cartographic.max.longitude-this._cartographic.min.longitude,this._imageryTextureBound.y=this._cartographic.max.latitude-this._cartographic.min.latitude;for(i=0;i<_;i++){var S=a[f+i],w=S.imageryLayer,E=w._imageryProvider.tilingScheme.projection instanceof t$O&&_0x382438.north<t$O.MaximumLatitude&&_0x382438.south>-t$O.MaximumLatitude;g.push(E);var P=E?S.textureWebMercator:S.texture;e$2b(P)||(P=s._context.defaultTransparentTexture),m.push(P);var A=u$_(w._imageryProvider.flipY,!1);b.push(A);var L=this._calculateTextureTranslationAndScale(_0x382438,S.rectangle,E,w._imageryProvider._tilingScheme),M=this._calculateTextureTexCoordsRectangle(_0x382438,S.rectangle,E,w._imageryProvider._tilingScheme);x.push(M),v.push(L);var R=new e$29;R.x=w.transparentBackColor.red,R.y=w.transparentBackColor.green,R.z=w.transparentBackColor.blue,R.w=w.transparentBackColorTolerance,y.push(R),$.push(w.enableImageryClip),T.push(w.alpha),C=C||w.alpha<.999}f+=_;var O="",I="";(D=!1)&&(I="APPLY_IMAGERY_CUTOUT");var D,B=[],N={mixIndex:!0,mixDirection:0},F="#ifdef IMAGERY\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\nvec4 color = initialColor;\n";F+="vec2 realTextureCoord;\nvec4 currentTextureColor;\n",(D=!1)&&(F+="vec4 cutoutAndColorResult;\nbool texelUnclipped;\n");for(i=0;i<_;++i){F+="realTextureCoord = computeTextureCoord(\n",F+="u_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTranslationAndScale["+i+"],\nu_dayTextureSize["+i+"],\nu_dayTextureFlipY["+i+"]);\ncurrentTextureColor = texture2D(u_dayTextures["+i+"], realTextureCoord);\n\n";var U=_0x229e5c(B,i);if(e$2b(U)){var G=i+1;G==_&&(G=i),F+="color = mvtTextureSampleAndBlend(\ncolor,\nu_dayTextures["+i+"],\nu_dayTextures["+G+"],\nu_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTexCoordsRectangle["+i+"],\nu_dayTextureTranslationAndScale["+i+"],\n"+converColorToVec4(U)+",\n"+(this._applyAlpha?"u_dayTextureAlpha["+i+"]":"1.0")+",\n0.0,\nvec4(0.0,0.0,0.0,0.0)\n);\n",i++}else F+=D?"cutoutAndColorResult = u_dayTextureCutoutRectangles["+i+"];\ntexelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\ncutoutAndColorResult = czm_sampleAndBlend(\n":i===N.mixIndex&&N.mixDirection>0?"color = sampleAndBlendParent(\n":"color = czm_sampleAndBlend(\n",F+="currentTextureColor,\ncolor,\nu_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTexCoordsRectangle["+i+"],\nu_transparentBackColor["+i+"],\nu_imageryClipEnable["+i+"],\n"+(this._applyAlpha?"u_dayTextureAlpha["+i+"]":"1.0")+",\n0.0,\n0.0,\n0.0,\n0.0,\n0.0,\nvec2(0.0,0.0),\nvec4(0.0,0.0,0.0,0.0)\n);\n",D&&(F+="color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(i=0;i<0;++i)F+="color = gridTextureSampleAndBlend(\ncolor,\nu_gridTextures["+i+"],\nu_gridTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_gridTextureTexCoordsRectangle["+i+"],\nu_gridTextureTranslationAndScale["+i+"]);\n";F+="return color;\n}\n#endif",p.sources.push(F);for(c=!1,i=0;i<p.defines.length;i++)if(p.defines[i].includes("IMAGERY")){c=!0;break}c||p.defines.push("IMAGERY"),this._applyAlpha&&p.defines.push("APPLY_ALPHA"),p.defines.push("TEXTURE_UNITS "+_),""!=O&&p.defines.push(O),""!=I&&p.defines.push(I),p.defines.push("GRIDTEXTURE_UNITS 0");var z=this._sp._attributeLocations,V=r$13.fromCache({context:s._context,vertexShaderSource:u,fragmentShaderSource:p,attributeLocations:z}),k=this;(function(e){var t=l$1g(k._colorCommand._uniformMap),i=k._plusRoArray;t.u_dayTextures=function(){return i[r][e].dayTextures},t.u_dayTextureUseWebMercatorT=function(){return i[r][e].dayTextureUseWebMercatorT},t.u_dayTextureTexCoordsRectangle=function(){return i[r][e].dayTextureTexCoordsRectangle},t.u_dayTextureTranslationAndScale=function(){return i[r][e].dayTextureTranslationAndScale},t.u_transparentBackColor=function(){return i[r][e].transparentBackColor},t.u_imageryClipEnable=function(){return i[r][e].imageryClipEnable},t.u_dayTextureFlipY=function(){return i[r][e].dayTextureFlipY},t.u_dayTextureAlpha=function(){return i[r][e].dayTextureAlpha};var n=i$_.shallowClone(k._colorCommand);n.shaderProgram=V,n._uniformMap=t;var o={command:n,shaderProgram:V,uniformMap:t,dayTextures:m,dayTextureUseWebMercatorT:g,dayTextureTexCoordsRectangle:x,dayTextureTranslationAndScale:v,transparentBackColor:R,imageryClipEnable:$,dayTextureFlipY:b,dayTextureAlpha:T};e$2b(k._plusRoArray[r])||(k._plusRoArray[r]=[]),k._plusRoArray[r].push(o)})(h),h+=1}}}else{this._visibleScaleImageryIndex=void 0;for(i=0;i<this._plusRoArray.length;i++){var W;if(e$2b(W=this._plusRoArray[i]))for(n=0;n<W.length;n++)W[n].shaderProgram.destroy(),W[n].uniformMap=void 0}this._plusRoArray=[];l=this._sp.fragmentShaderSource;var H=-1;for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("TEXTURE_UNITS")){H=i;break}H<0&&this._imagerys.length>0||e$2b(this._dayTextures)&&this._imagerys.length>this._dayTextures.length||!e$2b(this._dayTextures)?this._refreshImageryShader():this._computeImageryParameter(this._layer)}}}};var _0x32c826=new o$1p,_0x548e53=new o$1p,_0x421c4d=new o$1p;_0x30a010.prototype.setRealtimeRasterCamera=function(e,t){var i=f$18.clone(t.context.uniformState._viewport);this._imageryTextureBound.x=e.max.longitude-e.min.longitude,this._imageryTextureBound.y=e.max.latitude-e.min.latitude;var n=e$2a.toDegrees(e.min.longitude),r=e$2a.toDegrees(e.max.longitude),o=e$2a.toDegrees(e.max.latitude),a=e$2a.toDegrees(e.min.latitude),s=r-n,l=o-a,u=t.camera,c=u.frustum.clipPlane;1===t._fboState.frameBufferType&&u.disableReflection(),o$1p.clone(u.position,_0x32c826),o$1p.clone(u.direction,_0x548e53),o$1p.clone(u.up,_0x421c4d);var h=u._scene._mode;u._mode=C$13.SCENE3D,u._scene._mode=C$13.SCENE3D,u.setView({destination:new o$1p(.5*(n+r),.5*(o+a),50),orientation:{direction:new o$1p(0,0,-1),up:new o$1p(0,1,0)},convert:!1}),u._mode=h,u._scene._mode=h;var d=new a$V({width:s,aspectRatio:s/l,near:1,far:100});return t.context.uniformState.update(t),t.context.uniformState.updateFrustum(d),{position:_0x32c826,direction:_0x548e53,upDirection:_0x421c4d,viewport:i,waterPlane:c}},_0x30a010.prototype.resetCamera=function(e,t){var i=t.camera;1===t._fboState.frameBufferType&&e.waterPlane&&i.enableReflection(e.waterPlane),i.setView({destination:e.position,orientation:{direction:e.direction,up:e.upDirection},convert:!1}),t.context.uniformState.update(t),t.context.uniformState.updateFrustum(i.frustum),t.context.uniformState.viewport=e.viewport},_0x30a010.prototype.isImageryLoaded=function(e){for(var t=!0,i=this._imagerys.length,n=0;n<i;n++)this._imagerys[n]instanceof _0x4276c1?this._imagerys[n].state===wt$6.RENDERED||this._imagerys[n].state===wt$6.READY||this._imagerys[n].state===wt$6.FAILED||(t=!1):this._imagerys[n].state<wt$6.TEXTURE_LOADED&&(t=!1);return t},_0x30a010.prototype.updateImageryTexture=function(e,t){if(this.isImageryLoaded(t)){for(var i=[],n=0;n<this._imagerys.length;n++)e$2b(this._imagerys[n].texture)&&i.push(this._imagerys[n]);i.length>0&&(this._imageRasterFinish=!0,this._computeImageryParameter(e))}else{this._imageryLevels.length!=this._imagerys.length&&(this._imageryLevels.length=this._imagerys.length);i=[];var r=[];for(n=0;n<this._imagerys.length;n++){for(var o=this._imagerys[n],a=o.rectangle;o.state!=wt$6.READY&&e$2b(o.parent)&&o.imageryLayer._imageryProvider.minimumLevel<o.level;)o=o.parent;e$2b(o.texture)&&o.state==wt$6.READY&&(i.push(o),r.push(a))}var s=!1;if(i.length==this._imagerys.length)for(n=0;n<i.length;n++)i[n].level!=this._imageryLevels[n]&&(s=!0,this._imageryLevels[n]=i[n].level);s&&i.length>0&&this._computeImageryParameter(e,i,r)}},_0x30a010.prototype.convertToInstanceBillboardPoint=function(){const e=this._vertexPackage,t=e.vertexAttributes;for(var i=0;i<t.length;i++)t[i].instanceDivisor=1;e.attrLocation.offset=e.vertexAttributes.length,e.vertexAttributes.push({name:"offset",index:e.vertexAttributes.length,componentDatatype:S$12.FLOAT,componentsPerAttribute:2,vertexBuffer:this._context.createBillboardOffsetVertexBuffer(),normalize:!1,offsetInBytes:0,strideInBytes:8});const n=new Uint16Array([0,1,2,0,2,3]),r=this._arrIndexPackage;for(i=0;i<r.length;i++)r[i].indicesTypedArray=n},_0x30a010.prototype.isBillboardPoint=function(e){const t=e|this._fileType,i=this._arrIndexPackage[0];return this._context.webgpu&&(i&&1===i.primitiveType||t==d$15.PointCloudFile)};var _0x41b816=new h$18,_0x4f6570=new h$18;_0x30a010.prototype._calculateTextureTranslationAndScale=function(e,t,i,n){var r=t,o=e;i&&(r=n.rectangleToNativeRectangle(r,_0x41b816),o=n.rectangleToNativeRectangle(o,_0x4f6570));var a=o.width,s=o.height,l=a/r.width,u=s/r.height;return new e$29(l*(o.west-r.west)/a,u*(o.south-r.south)/s,l,u)},_0x30a010.prototype._calculateTextureTexCoordsRectangle=function(e,t,i,n){var r=t,o=e;i&&(r=n.rectangleToNativeRectangle(r,_0x41b816),o=n.rectangleToNativeRectangle(o,_0x4f6570));var a=o.width,s=o.height;return new e$29((r.west-o.west)/a,(r.south-o.south)/s,(r.east-o.west)/a,(r.north-o.south)/s)};var _0x382438=void 0,_0x102f61=new e$29;function _0x229e5c(e,t){if(!e$2b(e)||0==e.length)return null;for(var i=e.length,n=0;n<i;n++)if(e[n].textureIndex===t)return e[n].selectColor;return null}_0x30a010.prototype._computeImageryParameter=function(e,t,i){var n=t;e$2b(n)||(n=this._imagerys);var r=0;e$2b(this._dayTextures)&&this._dayTextures.length>0&&(r=this._dayTextures.length-n.length),this._dayTextures=[],this._dayTextureUseWebMercatorT=[],this._dayTextureTexCoordsRectangle=[],this._dayTextureTranslationAndScale=[],this._transparentBackColor=[],this._imageryClipEnable=[],this._dayTextureFlipY=[],this._dayTextureAlpha=[],this._applyAlpha=!1,e$2b(_0x382438)||(_0x382438=new h$18),_0x382438.west=this._cartographic.min.longitude,_0x382438.east=this._cartographic.max.longitude,_0x382438.north=this._cartographic.max.latitude,_0x382438.south=this._cartographic.min.latitude,this._imageryTextureBound.x=this._cartographic.max.longitude-this._cartographic.min.longitude,this._imageryTextureBound.y=this._cartographic.max.latitude-this._cartographic.min.latitude;for(var o=0;o<n.length;o++){var a=n[o].imageryLayer,s=a._imageryProvider.tilingScheme.projection instanceof t$O&&_0x382438.north<t$O.MaximumLatitude&&_0x382438.south>-t$O.MaximumLatitude;this._dayTextureUseWebMercatorT.push(s);var l=s?n[o].textureWebMercator:n[o].texture;e$2b(l)||(l=e._context.defaultTransparentTexture),this._dayTextures.push(l);var u=u$_(a._imageryProvider.flipY,!1);this._dayTextureFlipY.push(u);var c,h=this._calculateTextureTranslationAndScale(_0x382438,n[o].rectangle,s,a._imageryProvider._tilingScheme);c=e$2b(i)?this._calculateTextureTexCoordsRectangle(_0x382438,i[o],s,a._imageryProvider._tilingScheme):this._calculateTextureTexCoordsRectangle(_0x382438,n[o].rectangle,s,a._imageryProvider._tilingScheme),this._dayTextureTexCoordsRectangle.push(c),this._dayTextureTranslationAndScale.push(h);var d=new e$29;d.x=a.transparentBackColor.red,d.y=a.transparentBackColor.green,d.z=a.transparentBackColor.blue,d.w=a.transparentBackColorTolerance,this._transparentBackColor.push(d),this._imageryClipEnable.push(a.enableImageryClip),this._dayTextureAlpha.push(a.alpha),this._applyAlpha=this._applyAlpha||a.alpha<.999}if(r>0)for(o=0;o<r;o++)this._dayTextures.push(e._context.defaultTransparentTexture),this._dayTextureUseWebMercatorT.push(!1),this._dayTextureTexCoordsRectangle.push(_0x102f61),this._dayTextureTranslationAndScale.push(_0x102f61),this._transparentBackColor.push(_0x102f61),this._imageryClipEnable.push(!1),this._dayTextureFlipY.push(!1),this._dayTextureAlpha.push(1)},_0x30a010.prototype._createImageryShader=function(e,t){if(e$2b(this._imagerys)&&this._imagerys.length>0){this._computeImageryParameter(e);var i="",n="";(o=!1)&&(n="APPLY_IMAGERY_CUTOUT");var r=this._imagerys.length;r=Math.min(r,e$1T._maximumTextureImageUnits-2);var o,a=[],s={mixIndex:!0,mixDirection:0},l="#ifdef IMAGERY\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\n vec4 color = initialColor;\n";l+=" vec2 realTextureCoord;\n vec4 currentTextureColor;\n",(o=!1)&&(l+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(var u=0;u<r;++u){if(l+="realTextureCoord = computeTextureCoord(\n",l+="u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTranslationAndScale["+u+"],\nu_dayTextureSize["+u+"],\nu_dayTextureFlipY["+u+"]);\ncurrentTextureColor = texture2D(u_dayTextures["+u+"], realTextureCoord);\n\n",e$2b(h=_0x229e5c(a,u)))(d=u+1)==r&&(d=u),l+=" color = mvtTextureSampleAndBlend(\n color,\n u_dayTextures["+u+"],\n u_dayTextures["+d+"],\n u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+u+"],\n u_dayTextureTranslationAndScale["+u+"],\n "+converColorToVec4(h)+",\n "+(this._applyAlpha?"u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n vec4(0.0,0.0,0.0,0.0)\n );\n",u++;else l+=o?" cutoutAndColorResult = u_dayTextureCutoutRectangles["+u+"];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = czm_sampleAndBlend(\n":u===s.mixIndex&&s.mixDirection>0?" color = sampleAndBlendParent(\n":" color = czm_sampleAndBlend(\n",l+=" currentTextureColor,\n color,\n u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+u+"],\n u_transparentBackColor["+u+"],\n u_imageryClipEnable["+u+"],\n "+(this._applyAlpha?"u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n vec2(0.0,0.0),\n vec4(0.0,0.0,0.0,0.0)\n );\n",o&&(l+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(u=0;u<0;++u)l+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+u+"],\n u_gridTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_gridTextureTexCoordsRectangle["+u+"],\n u_gridTextureTranslationAndScale["+u+"]);\n";if(l+=" return color;\n}\n#endif",this._context.webgpu){var c=" #ifdef IMAGERY\n fn computeDayColor(initialColor : vec4<f32>, textureCoordinates : vec3<f32>) -> vec4<f32>\n {\n var color : vec4<f32> = initialColor;\n";c+=" var realTextureCoord : vec2<f32>;\n var currentTextureColor : vec4<f32>;\n",o&&(c+=" var cutoutAndColorResult : vec4<f32>;\n var texelUnclipped : bool;\n");for(u=0;u<r;++u){var h,d;if(c+=" realTextureCoord = computeTextureCoord(\n",c+=" select(textureCoordinates.xy, textureCoordinates.xz, vec2<bool>(bool(uniforms.u_dayTextureUseWebMercatorT["+u+"]))),\n uniforms.u_dayTextureTranslationAndScale["+u+"],\n uniforms.u_dayTextureSize["+u+"],\n bool(uniforms.u_dayTextureFlipY["+u+"]));\n currentTextureColor = textureSample(u_dayTextures"+u+", u_dayTexturesSampler, realTextureCoord);\n \n",e$2b(h=_0x229e5c(a,u)))(d=u+1)==r&&(d=u),c+=" color = mvtTextureSampleAndBlend(\n color,\n u_dayTextures["+u+"],\n u_dayTextures["+d+"],\n u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+u+"],\n u_dayTextureTranslationAndScale["+u+"],\n "+converColorToVec4(h)+",\n "+(this._applyAlpha?"u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n vec4(0.0,0.0,0.0,0.0)\n );\n",u++;else c+=o?" cutoutAndColorResult = uniforms.u_dayTextureCutoutRectangles["+u+"];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = czm_sampleAndBlend(\n":u===s.mixIndex&&s.mixDirection>0?" color = sampleAndBlendParent(\n":" color = czm_sampleAndBlend(\n",c+=" currentTextureColor,\n color,\n select(textureCoordinates.xy, textureCoordinates.xz, vec2<bool>(bool(uniforms.u_dayTextureUseWebMercatorT["+u+"]))),\n uniforms.u_dayTextureTexCoordsRectangle["+u+"],\n uniforms.u_transparentBackColor["+u+"],\n bool(uniforms.u_imageryClipEnable["+u+"]),\n "+(this._applyAlpha?"uniforms.u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n vec2(0.0,0.0),\n vec4(0.0,0.0,0.0,0.0)\n );\n",o&&(c+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(u=0;u<0;++u)c+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+u+"],\n select(textureCoordinates.xy, textureCoordinates.xz, u_dayTextureUseWebMercatorT["+u+"]),\n u_gridTextureTexCoordsRectangle["+u+"],\n u_gridTextureTranslationAndScale["+u+"]);\n";c+=" return color;\n }\n #endif ",t.sources.unshift(c)}else t.sources.push(l);var f=!1;for(u=0;u<t.defines.length;u++)if(t.defines[u].includes("IMAGERY")){f=!0;break}f||t.defines.push("IMAGERY"),this._applyAlpha&&t.defines.push("APPLY_ALPHA"),t.defines.push("TEXTURE_UNITS "+r),""!=i&&t.defines.push(i),""!=n&&t.defines.push(n),t.defines.push("GRIDTEXTURE_UNITS 0")}},_0x30a010.prototype._refreshImageryShader=function(){for(var e=this._layer,t=this._sp.fragmentShaderSource.clone(),i=this._sp.vertexShaderSource.clone(),n=0;n<t.defines.length;n++)if(t.defines[n].includes("GRIDTEXTURE_UNITS")){t.defines.splice(n,1);break}for(n=0;n<t.defines.length;n++)if(t.defines[n].includes("TEXTURE_UNITS")){t.defines.splice(n,1);break}for(n=0;n<t.defines.length;n++)if(t.defines[n].includes("APPLY_ALPHA")){t.defines.splice(n,1);break}for(n=0;n<t.sources.length;n++)if(t.sources[n].includes("czm_sampleAndBlend")){t.sources.splice(n,1);break}this._createImageryShader(e,t);var r=!1;for(n=0;n<i.defines.length;n++)if(i.defines[n].includes("IMAGERY")){r=!0;break}r||i.defines.push("IMAGERY");var o=this._sp._attributeLocations;this._sp=this._sp&&this._sp.destroy();var a=r$13.fromCache({context:e._context,vertexShaderSource:i,fragmentShaderSource:t,attributeLocations:o});this._sp=a,e$2b(this._colorCommand)&&(this._colorCommand.shaderProgram=a)};var _0x3cfccb=(_0x44fa55=!0,function(e,t){var i=_0x44fa55?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x44fa55=!1,i}),_0x4fdb69=_0x3cfccb(void 0,(function(){return _0x4fdb69.toString().search("(((.+)+)+)+$").toString().constructor(_0x4fdb69).search("(((.+)+)+)+$")})),_0x44fa55;function _0x58bcd6(){}function _0x411977(e){var t=new i$1c,i=e.instanceBounds;if(!e$2b(i))return t;var n=new o$1p(i[0],i[1],i[2]),r=new o$1p(i[3],i[4],i[5]),o=o$1p.lerp(n,r,.5,new o$1p),a=o$1p.distance(o,n);return t.center=o,t.radius=a,t}function _0xcdfc90(e){var t,i,n=new i$1c,r=new o$1p,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=e$2b(e.nCompressOptions)&&(e.nCompressOptions&_0x35ed09.SVC_Vertex)===_0x35ed09.SVC_Vertex,l=1;s?(l=e.vertCompressConstant,t=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),i=new Uint16Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/2)):i=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var u=[],c=0;c<e.verticesCount;c++)o$1p.fromArray(i,a*c,r),s&&(r=o$1p.multiplyByScalar(r,l,r),r=o$1p.add(r,t,r)),u.push(o$1p.clone(r));return i$1c.fromPoints(u,n),u.length=0,n}function _0x3dd1f0(e){var t,i,n=new i$1c,r=new o$1p,o=e$2b(e.nCompressOptions)&&(e.nCompressOptions&_0x35ed09.SVC_Vertex)===_0x35ed09.SVC_Vertex,a=e.vertexAttributes[0],s=a.componentsPerAttribute,l=1;o?(l=e.vertCompressConstant,i=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),t=new Uint16Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/2)):t=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var u=[],c=0;c<e.verticesCount;c++)o$1p.fromArray(t,s*c,r),o&&(r=o$1p.multiplyByScalar(r,l,r),r=o$1p.add(r,i,r)),u.push(o$1p.clone(r));return i$1c.fromPoints(u,n),u.length=0,n}function _0x2ce8f9(e){var t,i,n=e$2b(e.nCompressOptions)&&(e.nCompressOptions&_0x35ed09.SVC_Vertex)===_0x35ed09.SVC_Vertex,r=new f$18,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=1;n?(s=e.vertCompressConstant,i=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),t=new Uint16Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/2)):t=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var l=[],u=0;u<e.verticesCount;u++){var c=t[a*u],h=t[a*u+1];n&&(c=s*c+i.x,h=s*h+i.y),l.push(new o$1o(c,h))}return f$18.fromPoints(l,r),l.length=0,r}function _0x521890(e){var t,i,n=e$2b(e.nCompressOptions)&&(e.nCompressOptions&_0x35ed09.SVC_Vertex)===_0x35ed09.SVC_Vertex,r=new i$1c,o=new o$1p,a=new o$1p,s=e.vertexAttributes[0],l=s.componentsPerAttribute,u=e.attrLocation.aPosition,c=e.vertexAttributes[u],h=e.attrLocation.aTexCoord5,d=e.vertexAttributes[h],f=d.componentsPerAttribute;n?(l=3,f=3,t=_0x11c789(e,c),i=_0xf325f9(e,d,5)):(t=new Float32Array(s.typedArray.buffer,s.typedArray.byteOffset,s.typedArray.byteLength/4),i=new Float32Array(d.typedArray.buffer,d.typedArray.byteOffset,d.typedArray.byteLength/4));for(var p=[],_=0;_<e.verticesCount;_++)o$1p.fromArray(t,l*_,o),o$1p.fromArray(i,f*_,a),o$1p.add(o,a,o),p.push(o$1p.clone(o));return i$1c.fromPoints(p,r),p.length=0,r}function _0x3373c4(e){var t=W$18.TRIANGLES;switch(e){case 1:t=W$18.POINTS;break;case 2:t=W$18.LINES;break;case 3:t=W$18.LINE_STRIP;break;case 4:t=W$18.TRIANGLES}return t}function _0x570551(e,t,i,n){var r,o={};o.indicesCount=6*(e-t),o.indexType=n>65535?1:0,o.primitiveType=W$18.TRIANGLES,r=0===o.indexType?new Uint16Array(o.indicesCount):new Uint32Array(o.indicesCount);for(var a=0,s=0;s<t;s++){for(var l=0;l<i[s]-1;l++)r[6*(a-s+l)]=4*(a-s+l),r[6*(a-s+l)+1]=4*(a-s+l)+2,r[6*(a-s+l)+2]=4*(a-s+l)+1,r[6*(a-s+l)+3]=4*(a-s+l)+1,r[6*(a-s+l)+4]=4*(a-s+l)+2,r[6*(a-s+l)+5]=4*(a-s+l)+3;a+=i[s]}return o.indicesTypedArray=r,o}function _0x11c789(e,t){for(var i,n,r,o=t.componentsPerAttribute,a=e.vertCompressConstant,s=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),l=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),u=new Float32Array(3*e.verticesCount),c=0;c<e.verticesCount;c++)i=l[o*c]*a+s.x,n=l[o*c+1]*a+s.y,r=l[o*c+2]*a+s.z,u[3*c]=i,u[3*c+1]=n,u[3*c+2]=r;return u}function _0xf325f9(e,t,i){for(var n,r,o,a=t.componentsPerAttribute,s=e.texCoordCompressConstant[i],l=new e$29(e.minTexCoordValue[i].x,e.minTexCoordValue[i].y,e.minTexCoordValue[i].z,e.minTexCoordValue[i].w),u=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),c=new Float32Array(3*e.verticesCount),h=0;h<e.verticesCount;h++)n=u[a*h]*s+l.x,r=u[a*h+1]*s+l.y,o=u[a*h+2]*s+l.z,c[3*h]=n,c[3*h+1]=r,c[3*h+2]=o;return c}function _0x303916(e){for(var t=[],i=e.length,n=0;n<i;n++){var r=_0x3373c4(e[n].primitiveType);(r===W$18.LINES||r===W$18.LINE_STRIP)&&t.push(e[n])}return t}function _0xeac62e(e){for(var t=0,i=e.length,n=0;n<i;n++){var r=e[n],o=_0x3373c4(r.primitiveType);o==W$18.LINES?t+=r.indicesCount/2:o==W$18.LINE_STRIP&&t++}return t}function _0x47246a(e){for(var t=0,i=e.length,n=0;n<i;n++){t+=e[n].indicesCount}return t}function _0x3fd992(e,t,i){for(var n,r=[],o=i.length,a=0;a<o;a++){var s,l=i[a];s=0===l.indexType?new Uint16Array(l.indicesTypedArray.buffer,l.indicesTypedArray.byteOffset,l.indicesTypedArray.byteLength/2):new Uint32Array(l.indicesTypedArray.buffer,l.indicesTypedArray.byteOffset,l.indicesTypedArray.byteLength/4);var u=_0x3373c4(l.primitiveType);if(u==W$18.LINES)for(n=0;n<l.indicesCount;n+=2){var c=[],h=new o$1p;h.x=e[s[n]*t],h.y=e[s[n]*t+1],h.z=e[s[n]*t+2],c.push(h);var d=new o$1p;d.x=e[s[n+1]*t],d.y=e[s[n+1]*t+1],d.z=e[s[n+1]*t+2],c.push(d),r.push(c)}else if(u==W$18.LINE_STRIP){c=[];for(n=0;n<l.indicesCount;n++){var f=new o$1p;f.x=e[s[n]*t],f.y=e[s[n]*t+1],f.z=e[s[n]*t+2],c.push(f)}r.push(c)}}return r}_0x4fdb69(),_0x58bcd6.calcBoundingSphereInWorker=function(e,t){return t.instanceIndex>-1?_0x411977(t):e$2b(t.clampRegionEdge)?_0x521890(t):e>=d$15.ClampGroundPolygon&&e<=d$15.ClampObjectLine?_0x3dd1f0(t):e==d$15.ClampGroundAndObjectLineCache?_0x521890(t):_0xcdfc90(t)},_0x58bcd6.calcBoundingSphere=function(e,t,i){var n,r=e._fileType;return n=t.instanceIndex>-1?_0x411977(t):e$2b(t.clampRegionEdge)?_0x521890(t):r>=d$15.ClampGroundPolygon&&r<=d$15.ClampObjectLine?_0x3dd1f0(t):r==d$15.ClampGroundAndObjectLineCache?_0x521890(t):_0xcdfc90(t),i$1c.transform(n,i,n),n},_0x58bcd6.calcBoundingRectangle=function(e,t){var i;return e._fileType===d$15.ClampGroundPolygon&&(i=_0x2ce8f9(t)),i},_0x58bcd6.createEdge=function(e,t){if(!(t.length<1)){var i=_0x303916(t);if(0!=i.length){var n,r=_0xeac62e(i),o=e.attrLocation.aPosition,a=e.vertexAttributes[o],s=e$2b(e.nCompressOptions)&&(e.nCompressOptions&_0x35ed09.SVC_Vertex)===_0x35ed09.SVC_Vertex,l=a.componentsPerAttribute;s?(l=3,n=_0x11c789(e,a)):n=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var u=_0x47246a(i),c=_0x3fd992(n,l,i),h=4*u-4*r,d=new Float32Array(3*h),f=new Float32Array(3*h),p=new Float32Array(3*h),_=new Int8Array(2*h),m=0,g=0;g<r;g++){for(var x=c[g].length,v=0;v<x;v++){var y=4*m-4*g,$=3*y+12*v,b=c[g][v];0!=v&&(d[$-6]=b.x,d[$-5]=b.y,d[$-4]=b.z,d[$-3]=b.x,d[$-2]=b.y,d[$-1]=b.z),v!=x-1&&(d[$]=b.x,d[$+1]=b.y,d[$+2]=b.z,d[$+3]=b.x,d[$+4]=b.y,d[$+5]=b.z);var T=b;v+1<x&&(T=c[g][v+1]),0!=v&&(p[$-6]=T.x,p[$-5]=T.y,p[$-4]=T.z,p[$-3]=T.x,p[$-2]=T.y,p[$-1]=T.z),v!=x-1&&(p[$]=T.x,p[$+1]=T.y,p[$+2]=T.z,p[$+3]=T.x,p[$+4]=T.y,p[$+5]=T.z);var C=b;v>=1&&(C=c[g][v-1]),0!=v&&(f[$-6]=C.x,f[$-5]=C.y,f[$-4]=C.z,f[$-3]=C.x,f[$-2]=C.y,f[$-1]=C.z),v!=x-1&&(f[$]=C.x,f[$+1]=C.y,f[$+2]=C.z,f[$+3]=C.x,f[$+4]=C.y,f[$+5]=C.z),$=2*y+8*v,0!=v&&(_[$-4]=-1,_[$-3]=-1,_[$-2]=1,_[$-1]=-1),v!=x-1&&(_[$]=-1,_[$+1]=1,_[$+2]=1,_[$+3]=1)}m+=c[g].length}var S={vertexAttributes:[],attrLocation:{}},w=S.vertexAttributes,E=S.attrLocation;S.instanceCount=0,S.instanceMode=0,E.aPosition=0,w.push({index:E.aPosition,typedArray:d,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),E.aNormal=1,w.push({index:E.aNormal,typedArray:f,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),E.aTexCoord0=2,w.push({index:E.aTexCoord0,typedArray:p,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),E.aTexCoord1=3,w.push({index:E.aTexCoord1,typedArray:_,componentsPerAttribute:2,componentDatatype:S$12.BYTE,offsetInBytes:0,strideInBytes:2*Int8Array.BYTES_PER_ELEMENT,normalize:!1});for(var P=[],A=0;A<c.length;A++)P.push(c[A].length);return{vertexPackage:S,indexPackage:_0x570551(u,r,P,h)}}}};var _0x1af615=(_0x501c87=!0,function(e,t){var i=_0x501c87?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x501c87=!1,i}),_0x371eb0=_0x1af615(void 0,(function(){return _0x371eb0.toString().search("(((.+)+)+)+$").toString().constructor(_0x371eb0).search("(((.+)+)+)+$")})),_0x501c87;function _0x14f094(){}_0x371eb0(),Object.defineProperties(_0x14f094.prototype,{});var _0x3f2653=new e$1U,_0x23de0d=e$1U.WHITE,_0x20d043=void 0,_0x81009=600;function _0x2f80a7(e,t){var i=[];for(var n in e)if(e.hasOwnProperty(n)&&"0"!==n){var r=new _0x104945(this,n);Object.assign(r,t._layerScheduler._attributes[n]);var o=e[n];Array.isArray(o)||(o=[o]);for(var a=0,s=o.length;a<s;a++)r.addVertexOffset(o[a].vertexColorCount,o[a].vertexColorOffset);i.push(r)}return i}function _0x533dfe(e,t){for(var i=t.length,n=!1,r=0;r<i&&!n;r++)for(var o=t[r],a=o.span,s=0;s<a.length;s++){var l=a[s],u=l.vertexOffset,c=l.vertexOffset+l.vertexCount;if(e>=u&&e<c){o.indexValue.push(e),n=!0;break}}}function _0x2ae548(e,t){if(1!=t.length){var i=0,n=e.indicesCount,r=0===e.indexType?Uint16Array:Uint32Array,o=new r(e.indicesTypedArray.buffer,e.indicesTypedArray.byteOffset,n);for(i=0;i<n;i++){_0x533dfe(o[i],t)}for(i=0;i<t.length;i++){var a,s=t[i],l=s.indexValue.length;a=new r(l);for(var u=0;u<l;u++)a[u]=s.indexValue[u];s.indexPackage={indexType:e.indexType,indicesCount:l,indicesTypedArray:a,materialCode:e.materialCode,primitiveType:e.primitiveType}}}else t[0].indexPackage=e}function _0x2a0561(e){for(var t=e._array,i=0;i<t.length;i++){var n=t[i],r=n.batchFeatures;if(e$2b(r)&&!(r.length<1))for(var o=0;o<r.length;o++){var a=r[o];n.span=n.span.concat(a.getVertexOffset())}}}_0x14f094.createRenderEntityPageLOD=function(e,t){var i=t.themeStyle,n=e.pickInfo,r=e.arrIndexPackage;if(this._fileType===d$15.Text&&this.createBillboardsBounds(),!e$2b(i)||!e$2b(n))return[new _0x30a010(e)];if(e$2b(i.image)){for(var o=_0x2f80a7(n,t),a=new e$1N,s=0;s<o.length;s++){var l=o[s],u=e$2b(i.color)?i.color.evaluateColor(l,_0x3f2653):_0x23de0d,c=e$2b(i.image)?i.image.evaluate(l):_0x20d043,h=e$2b(i.imageRepeatX)?i.imageRepeatX.evaluate(l):_0x81009,d=e$2b(i.imageRepeatY)?i.imageRepeatY.evaluate(l):_0x81009;e$2b(h)||(h=_0x81009),e$2b(d)||(d=_0x81009);var f=new o$1o(h,d);l.color=u,l.imageUrl=c;var p=l.getRenderBatchKey();if(!a.contains(p)){var _=new e$1U;_=e$1U.clone(u),a.set(p,{color:_,imageUrl:c,imageRepeat:f,batchFeatures:[],span:[],indexValue:[]})}a.get(p).batchFeatures.push(l)}var m=a._array;_0x2a0561(a),_0x2ae548(r[0],m);for(var g=[],x=0;x<m.length;x++){e.symbolTextureUrl=m[x].imageUrl,e.symbolColor=m[x].color,e.arrIndexPackage=[m[x].indexPackage],e.symbolTextureRepeat=m[x].imageRepeat;var v=new _0x30a010(e);g.push(v)}return g}};var c$T={};function d$13(e,t,i){e$2b(t)||(t=e.width),e$2b(i)||(i=e.height);var n=c$T[t];e$2b(n)||(n={},c$T[t]=n);var r=n[i];if(!e$2b(r)){var o=document.createElement("canvas");o.width=t,o.height=i,(r=o.getContext("2d")).globalCompositeOperation="copy",n[i]=r}return r.drawImage(e,0,0,t,i),r.getImageData(0,0,t,i).data}if(typeof WebAssembly<"u"){let e=function(e){return n$J.locateFile?n$J.locateFile(e,v$H):v$H+e},t=function(e,t){e||R("Assertion failed: "+t)},i=function(e){var i=n$J["_"+e];return t(i,"Cannot call unknown function "+e+", make sure it is exported"),i},n=function(e,t,n,r,o){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=en$4(i),l(e,t,i)}return t},array:function(e){var t=en$4(e.length);return u(e,t),t}};var c=i(e),h=[],d=0;if(r)for(var f=0;f<r.length;f++){var p=s[n[f]];p?(0===d&&(d=Kn()),h[f]=p(r[f])):h[f]=r[f]}var _=c.apply(null,h);return _=function(e){return"string"===t?a(e):"boolean"===t?Boolean(e):e}(_),0!==d&&Fn(d),_},r=function(e,t,r,o){var a=(r=r||[]).every((function(e){return"number"===e}));return"string"!==t&&a&&!o?i(e):function(){return n(e,t,r,arguments)}},o=function(e,t,i){for(var n=t+i,r=t;e[r]&&!(r>=n);)++r;if(r-t>16&&e.subarray&&O$F)return O$F.decode(e.subarray(t,r));for(var o="";t<r;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var l=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|l:(7&a)<<18|s<<12|l<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var u=a-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},a=function(e,t){return e?o(X$P,e,t):""},s=function(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+3>=o)break;t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r},l=function(e,t,i){return s(e,X$P,t,i)},u=function(e,t){W$T.set(e,t)},c=function(e,t){return e%t>0&&(e+=t-e%t),e},h=function(){n$J.HEAP8=W$T=new Int8Array(c$S),n$J.HEAP16=new Int16Array(c$S),n$J.HEAP32=x$Y=new Int32Array(c$S),n$J.HEAPU8=X$P=new Uint8Array(c$S),n$J.HEAPU16=new Uint16Array(c$S),n$J.HEAPU32=new Uint32Array(c$S),n$J.HEAPF32=new Float32Array(c$S),n$J.HEAPF64=new Float64Array(c$S)},d=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?n$J.dynCall_v(i):n$J.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},f=function(){if(n$J.preRun)for("function"==typeof n$J.preRun&&(n$J.preRun=[n$J.preRun]);n$J.preRun.length;)g(n$J.preRun.shift());d(N$M)},p=function(){nn$3||(nn$3=!0,d(Qn))},_=function(){d(Zn)},m=function(){if(n$J.postRun)for("function"==typeof n$J.postRun&&(n$J.postRun=[n$J.postRun]);n$J.postRun.length;)x(n$J.postRun.shift());d(M$U)},g=function(e){N$M.unshift(e)},x=function(e){M$U.unshift(e)},v=function(e){b$15++,n$J.monitorRunDependencies&&n$J.monitorRunDependencies(b$15)},y=function(e){if(b$15--,n$J.monitorRunDependencies&&n$J.monitorRunDependencies(b$15),0==b$15&&(null!==J$N&&(clearInterval(J$N),J$N=null),R$O)){var t=R$O;R$O=null,t()}},$=function(e){return String.prototype.startsWith?e.startsWith(rn$4):0===e.indexOf(rn$4)},b=function(){try{if(n$J.wasmBinary)return new Uint8Array(n$J.wasmBinary);if(n$J.readBinary)return n$J.readBinary(m$R);throw"both async and sync fetching of the wasm failed"}catch(e){R(e)}},T=function(){return n$J.wasmBinary||!_$N&&!h$S||"function"!=typeof fetch?new Promise((function(e,t){e(b())})):fetch(m$R,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+m$R+"'";return e.arrayBuffer()})).catch((function(){return b()}))},C=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Bn$1};function i(e,t){var i=e.exports;n$J.asm=i,y()}function n(e){i(e.instance)}function r(e){return T().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(v(),n$J.instantiateWasm)try{return n$J.instantiateWasm(t,i)}catch{return!1}return function(){if(n$J.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||$(m$R)||"function"!=typeof fetch)return r(n);fetch(m$R,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(n,(function(e){r(n)}))}))}(),{}},S=function(){return W$T.length},w=function(e){return n$J.___errno_location&&(x$Y[n$J.___errno_location()>>2]=e),e},E=function(e){R("OOM")},P=function(e){e=c(e,65536);var t=c$S.byteLength;try{return-1!==P$Q.grow((e-t)/65536)&&(c$S=P$Q.buffer,!0)}catch{return!1}},A=function(e){var t=S(),i=65536,n=2147418112;if(e>n)return!1;for(var r=Math.max(t,16777216);r<e;)r=r<=536870912?c(2*r,i):Math.min(c((3*r+2147483648)/4,i),n);return!!P(r)&&(h(),!0)},L=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},M=function(e){function t(){n$J.calledRun||(n$J.calledRun=!0,!d$12&&(p(),_(),n$J.onRuntimeInitialized&&n$J.onRuntimeInitialized(),m()))}e=e||n$J.arguments,b$15>0||(f(),b$15>0)||n$J.calledRun||(n$J.setStatus?(n$J.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n$J.setStatus("")}),1),t()}),1)):t())},R=function(e){n$J.onAbort&&n$J.onAbort(e),e=void 0!==e?'"'+e+'"':"",d$12=!0};var n$J=typeof n$J<"u"?n$J:{},A$10={},l$X;for(l$X in n$J)n$J.hasOwnProperty(l$X)&&(A$10[l$X]=n$J[l$X]);n$J.arguments=[],n$J.thisProgram="./this.program",n$J.quit=function(e,t){throw t},n$J.preRun=[],n$J.postRun=[];var _$N=!1,h$S=!1,L$Y=!1,D$T=!1,V$K=!1;_$N="object"==typeof window,h$S="function"==typeof importScripts,D$T="object"==typeof process&&"function"==typeof require,L$Y=D$T&&!_$N&&!h$S,V$K=!_$N&&!L$Y&&!h$S;var v$H="",H$V,U$U;if(L$Y)v$H=__dirname+"/",n$J.read=function(e,t){var i;return H$V||(H$V=require("fs")),U$U||(U$U=require("path")),e=U$U.normalize(e),i=H$V.readFileSync(e),t?i:i.toString()},n$J.readBinary=function(e){var i=n$J.read(e,!0);return i.buffer||(i=new Uint8Array(i)),t(i.buffer),i},process.argv.length>1&&(n$J.thisProgram=process.argv[1].replace(/\\/g,"/")),n$J.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=n$J),process.on("uncaughtException",(function(e){if(!(e instanceof L))throw e})),process.on("unhandledRejection",R),n$J.quit=function(e){process.exit(e)},n$J.inspect=function(){return"[Emscripten Module object]"};else V$K?(typeof read<"u"&&(n$J.read=function(e){return read(e)}),n$J.readBinary=function(e){var i;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(i=read(e,"binary"),t("object"==typeof i),i)},typeof scriptArgs<"u"?n$J.arguments=scriptArgs:typeof arguments<"u"&&(n$J.arguments=arguments),"function"==typeof quit&&(n$J.quit=function(e){quit(e)})):(_$N||h$S)&&(h$S?v$H=self.location.href:document.currentScript&&(v$H=document.currentScript.src),v$H=0!==v$H.indexOf("blob:")?v$H.substr(0,v$H.lastIndexOf("/")+1):"",n$J.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h$S&&(n$J.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),n$J.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},n$J.setWindowTitle=function(e){document.title=e});var Sn$1=n$J.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),Gn=n$J.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||Sn$1);for(l$X in A$10)A$10.hasOwnProperty(l$X)&&(n$J[l$X]=A$10[l$X]);A$10=void 0;var Bn$1={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var P$Q,d$12=!1,O$F=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Ln$1=65536,c$S,W$T,X$P,x$Y,Jn=5246e3,E$U=3088,I$13=5242880,S$M=n$J.TOTAL_MEMORY||16777216;S$M<I$13&&Gn("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+S$M+"! (TOTAL_STACK="+I$13+")"),n$J.buffer?c$S=n$J.buffer:"object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(P$Q=new WebAssembly.Memory({initial:S$M/Ln$1}),c$S=P$Q.buffer):c$S=new ArrayBuffer(S$M),h(),x$Y[E$U>>2]=Jn;var N$M=[],Qn=[],Zn=[],M$U=[],nn$3=!1,b$15=0,J$N=null,R$O=null;n$J.preloadedImages={},n$J.preloadedAudios={};var rn$4="data:application/octet-stream;base64,",m$R,$n=typeof window>"u"?self:window;m$R=$n.location.href.endsWith(".openrealspace")?"../../static/Build/SuperMap3D/ThirdParty/Module.wasm":"ThirdParty/Module.wasm",$(m$R)||(m$R=e(m$R)),n$J.asm=function(e,t,i){return t.memory=P$Q,t.table=new WebAssembly.Table({initial:23,maximum:23,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0,C(t)};var Yn={},kn={b:R,c:w,f:S,e:A,d:E,a:E$U},tn$4=n$J.asm(Yn,kn,c$S);n$J.asm=tn$4,n$J.___errno_location=function(){return n$J.asm.g.apply(null,arguments)},n$J._floatToTextureColor=function(){return n$J.asm.h.apply(null,arguments)},n$J._free=function(){return n$J.asm.i.apply(null,arguments)},n$J._free_result=function(){return n$J.asm.j.apply(null,arguments)},n$J._malloc=function(){return n$J.asm.k.apply(null,arguments)};var en$4=n$J.stackAlloc=function(){return n$J.asm.n.apply(null,arguments)},Fn=n$J.stackRestore=function(){return n$J.asm.o.apply(null,arguments)},Kn=n$J.stackSave=function(){return n$J.asm.p.apply(null,arguments)};if(n$J.dynCall_v=function(){return n$J.asm.l.apply(null,arguments)},n$J.dynCall_vi=function(){return n$J.asm.m.apply(null,arguments)},n$J.asm=tn$4,n$J.cwrap=r,L.prototype=new Error,L.prototype.constructor=L,R$O=function e(){n$J.calledRun||M(),n$J.calledRun||(R$O=e)},n$J.run=M,n$J.abort=R,n$J.preInit)for("function"==typeof n$J.preInit&&(n$J.preInit=[n$J.preInit]);n$J.preInit.length>0;)n$J.preInit.pop()();n$J.noExitRuntime=!0,M()}else var n$J=null;var _0x1c5342=n$J;function I$12(){t$16.throwInstantiationError()}Object.defineProperties(I$12.prototype,{errorEvent:{get:t$16.throwInstantiationError},credit:{get:t$16.throwInstantiationError},tilingScheme:{get:t$16.throwInstantiationError},ready:{get:t$16.throwInstantiationError},readyPromise:{get:t$16.throwInstantiationError},hasWaterMask:{get:t$16.throwInstantiationError},hasVertexNormals:{get:t$16.throwInstantiationError},availability:{get:t$16.throwInstantiationError}});var A$$=[];I$12.getRegularGridIndices=function(e,t){if(e*t>=e$2a.FOUR_GIGABYTES)throw new t$16("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=A$$[e];e$2b(i)||(A$$[e]=i=[]);var n=i[t];return e$2b(n)||b$14(e,t,n=e*t<e$2a.SIXTY_FOUR_KILOBYTES?i[t]=new Uint16Array((e-1)*(t-1)*6+3*(e+t-2)):i[t]=new Uint32Array((e-1)*(t-1)*6+3*(e+t-2)),0),n},I$12.getRegularGridIndicesForReproject=function(e,t){if(e*t>=e$2a.FOUR_GIGABYTES)throw new t$16("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=A$$[e];e$2b(i)||(A$$[e]=i=[]);var n=i[t];return e$2b(n)||b$14(e,t,n=e*t<e$2a.SIXTY_FOUR_KILOBYTES?i[t]=new Uint16Array((e-1)*(t-1)*6):i[t]=new Uint32Array((e-1)*(t-1)*6),0),n};var U$T=[];I$12.getRegularGridIndicesAndEdgeIndices=function(e,t){if(e*t>=e$2a.FOUR_GIGABYTES)throw new t$16("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=U$T[e];e$2b(i)||(U$T[e]=i=[]);var n=i[t];if(!e$2b(n)){var r=I$12.getRegularGridIndices(e,t),o=O$E(e,t),a=o.westIndicesSouthToNorth,s=o.southIndicesEastToWest,l=o.eastIndicesNorthToSouth,u=o.northIndicesWestToEast;n=i[t]={indices:r,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:l,northIndicesWestToEast:u}}return n};var N$L=[];function O$E(e,t){var i,n=new Array(t),r=new Array(e),o=new Array(t),a=new Array(e);for(i=0;i<e;++i)a[i]=i,r[i]=e*t-1-i;for(i=0;i<t;++i)o[i]=(i+1)*e-1,n[i]=(t-i-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:r,eastIndicesNorthToSouth:o,northIndicesWestToEast:a}}function b$14(e,t,i,n){for(var r=0,o=0;o<t-1;++o){for(var a=0;a<e-1;++a){var s=r,l=s+e,u=l+1,c=s+1;i[n++]=s,i[n++]=l,i[n++]=c,i[n++]=c,i[n++]=l,i[n++]=u,++r}++r}var h=(t-1)/2,d=(e-1)/2;r=0;for(a=0;a<d;a++)i[n++]=r,i[n++]=r+1,i[n++]=r+2,r+=2;r=e*(t-1);for(a=0;a<d;a++)i[n++]=r+1,i[n++]=r,i[n++]=r+2,r+=2;r=0;for(a=0;a<h;a++)i[n++]=r+e,i[n++]=r,i[n++]=r+2*e,r+=2*e;r=e-1;for(a=0;a<h;a++)i[n++]=r,i[n++]=r+e,i[n++]=r+2*e,r+=2*e}function S$L(e,t,i,n,r){for(var o=e$2b(r),a=e[0],s=e.length,l=1;l<s;++l){var u=e[l];!o||r[a+"_"+u]?(i[n++]=a,i[n++]=u,i[n++]=t,i[n++]=t,i[n++]=u,i[n++]=t+1,a=u,++t):(a=u,++t)}return n}function f$R(e){var t,i=e.name,n=e.message;t=e$2b(i)&&e$2b(n)?i+": "+n:e.toString();var r=e.stack;return e$2b(r)&&(t+="\n"+r),t}function l$W(e,t,i,n,r,o,a){this.provider=e,this.message=t,this.x=i,this.y=n,this.level=r,this.timesRetried=u$_(o,0),this.retry=!1,this.error=a}function t$I(e){e=u$_(e,u$_.EMPTY_OBJECT),this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.persists=u$_(e.persists,!1),this.pass=Le$s.COMPUTE,this.renderState=e.renderState,this.clear=u$_(e.clear,!0),this.owner=e.owner,this.name=u$_(e.name,""),e.name||console.log("ComputeCommand need a name.")}I$12.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){if(e*t>=e$2a.FOUR_GIGABYTES)throw new t$16("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=N$L[e];e$2b(i)||(N$L[e]=i=[]);var n=i[t];if(!e$2b(n)){var r=e*t,o=(e-1)*(t-1)*6,a=2*e+2*t,s=r+a,l=3*(e+t-2),u=o+6*Math.max(0,a-4)+l,c=O$E(e,t),h=c.westIndicesSouthToNorth,d=c.southIndicesEastToWest,f=c.eastIndicesNorthToSouth,p=c.northIndicesWestToEast,_=ce$x.createTypedArray(s,u);b$14(e,t,_,0),I$12.addSkirtIndices(h,d,f,p,r,_,o+l),n=i[t]={indices:_,westIndicesSouthToNorth:h,southIndicesEastToWest:d,eastIndicesNorthToSouth:f,northIndicesWestToEast:p,indexCountWithoutSkirts:o}}return n},I$12.addSkirtIndices=function(e,t,i,n,r,o,a,s){var l=r;a=S$L(e,l,o,a,s),a=S$L(t,l+=e.length,o,a,s),a=S$L(i,l+=t.length,o,a,s),S$L(n,l+=i.length,o,a,s)},I$12.heightmapTerrainQuality=.25,I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,i){return 2*e.maximumRadius*Math.PI*I$12.heightmapTerrainQuality/(t*i)},I$12.prototype.requestTileGeometry=t$16.throwInstantiationError,I$12.prototype.getLevelMaximumGeometricError=t$16.throwInstantiationError,I$12.prototype.getTileDataAvailable=t$16.throwInstantiationError,I$12.prototype.loadTileDataAvailability=t$16.throwInstantiationError,l$W.handleError=function(e,t,i,n,r,o,a,s,l){var u=e;return e$2b(e)?(u.provider=t,u.message=n,u.x=r,u.y=o,u.level=a,u.retry=!1,u.error=l,++u.timesRetried):u=new l$W(t,n,r,o,a,0,l),i.numberOfListeners>0?i.raiseEvent(u):console.log('An error occurred in "'+t.constructor.name+'": '+f$R(n)),u.retry&&e$2b(s)&&s(),u},l$W.handleSuccess=function(e){e$2b(e)&&(e.timesRetried=-1)},t$I.prototype.execute=function(e){e.execute(this)};var Ve$i="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",je$f="attribute vec4 position;\nattribute float webMercatorT;\nuniform vec2 u_textureDimensions;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nv_textureCoordinates = vec2(position.x, webMercatorT);\ngl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));\n}\n",e$1d={LEFT:-1,BOTTOM:-1,NONE:0,RIGHT:1,TOP:1},Xe$b=Object.freeze(e$1d);function o$S(e,t,i,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i,this.flipY=n,this.imageryLayer=void 0,this.morphingAlpha=void 0}function c$R(e){if(e=u$_(e,{}),this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._numberOfLevelZeroTilesX=u$_(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=u$_(e.numberOfLevelZeroTilesY,1),this._projection=u$_(e.projection,new t$O(this._ellipsoid)),e$2b(e.rectangleSouthwestInMeters)&&e$2b(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{var t=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new o$1o(-t,-t),this._rectangleNortheastInMeters=new o$1o(t,t)}var i=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new h$18(i.longitude,i.latitude,n.longitude,n.latitude),this._customDPI=e.customDPI,this._scaleDenominators=e.scaleDenominators,this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._orgin=u$_(e.orgin,void 0)}o$S.prototype.freeResources=function(){e$2b(this.readyImagery)&&this.readyImagery.releaseReference(),e$2b(this.loadingImagery)&&this.loadingImagery.releaseReference()},o$S.prototype.processStateMachine=function(e,t,i){var n=this.loadingImagery,r=n.imageryLayer;if(n.processStateMachine(t,!this.useWebMercatorT,i),n.state===wt$6.READY)return e$2b(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this),this.morphingBeginTime=performance.now(),!0;for(var o,a=n.parent;e$2b(a)&&(a.state!==wt$6.READY||!this.useWebMercatorT&&!e$2b(a.texture));)a.state!==wt$6.FAILED&&a.state!==wt$6.INVALID&&(o=o||a),a=a.parent;return this.readyImagery!==a&&(e$2b(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=a,e$2b(a)&&(a.addReference(),this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this))),(n.state===wt$6.FAILED||n.state===wt$6.INVALID)&&(e$2b(o)?(o.processStateMachine(t,!this.useWebMercatorT,i),!1):(n.imageryLayer&&!1===n.imageryLayer.enableUpsample&&(this.discard=!0),!0))},Object.defineProperties(c$R.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}},orgin:{get:function(){return this._orgin}}}),c$R.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},c$R.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},c$R.prototype.rectangleToNativeRectangle=function(e,t){var i=this._projection,n=i.project(h$18.southwest(e)),r=i.project(h$18.northeast(e));return e$2b(t)?(t.west=n.x,t.south=n.y,t.east=r.x,t.north=r.y,t):new h$18(n.x,n.y,r.x,r.y)},c$R.prototype.tileXYToNativeRectangle=function(e,t,i,n){var r=e$2b(this._orgin)?this._orgin.x:this._rectangleSouthwestInMeters.x,o=e$2b(this._orgin)?this._orgin.y:this._rectangleNortheastInMeters.y;if(e$2b(this._customDPI)&&e$2b(this._scaleDenominators)){var a=this.calculateResolution(i),s=r+e*this._tileWidth*a.x,l=r+(e+1)*this._tileWidth*a.x,u=o-t*this._tileHeight*a.y,c=o-(t+1)*this._tileHeight*a.y;return e$2b(n)?(n.west=s,n.south=c,n.east=l,n.north=u,n):new h$18(s,c,l,u)}var h=this.getNumberOfXTilesAtLevel(i),d=this.getNumberOfYTilesAtLevel(i),f=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/h,p=(s=this._rectangleSouthwestInMeters.x+e*f,l=this._rectangleSouthwestInMeters.x+(e+1)*f,(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/d);u=this._rectangleNortheastInMeters.y-t*p,c=this._rectangleNortheastInMeters.y-(t+1)*p;return e$2b(n)?(n.west=s,n.south=c,n.east=l,n.north=u,n):new h$18(s,c,l,u)},c$R.prototype.tileXYToRectangle=function(e,t,i,n){var r=this.tileXYToNativeRectangle(e,t,i,n),o=this._projection,a=o.unproject(new o$1o(r.west,r.south)),s=o.unproject(new o$1o(r.east,r.north));return r.west=a.longitude,r.south=a.latitude,r.east=s.longitude,r.north=s.latitude,r},c$R.prototype.positionToTileXY=function(e,t,i){var n=this._rectangle;if(h$18.contains(n,e)){var r=this.getNumberOfXTilesAtLevel(t),o=this.getNumberOfYTilesAtLevel(t),a=e$2b(this._orgin)?this._orgin.x:this._rectangleSouthwestInMeters.x,s=e$2b(this._orgin)?this._orgin.y:this._rectangleNortheastInMeters.y,l=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/r,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/o;if(e$2b(this._customDPI)&&e$2b(this._scaleDenominators)){var c=this.calculateResolution(t);l=this._tileWidth*c.x,u=this._tileHeight*c.y}var h=this._projection.project(e),d=h.x-a,f=s-h.y;e$2b(this._orgin)&&(r+=this._orgin.x!=this._rectangleSouthwestInMeters.x?Math.ceil((h.x-this._orgin.x)/l):0,o+=this._orgin.y!=this._rectangleSouthwestInMeters.y?Math.ceil((this._orgin.y-h.y)/u):0);var p=d/l|0;p>=r&&(p=r-1);var _=f/u|0;return _>=o&&(_=o-1),e$2b(i)?(i.x=p,i.y=_,i):new o$1o(p,_)}},c$R.prototype.calculateResolution=function(e){return new o$1o(.0254*this._scaleDenominators[e]/this._customDPI.x,.0254*this._scaleDenominators[e]/this._customDPI.y)};var _0x4bd0de=(_0x4f7455=!0,function(e,t){var i=_0x4f7455?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f7455=!1,i}),_0xec6068=_0x4bd0de(void 0,(function(){return _0xec6068.toString().search("(((.+)+)+)+$").toString().constructor(_0xec6068).search("(((.+)+)+)+$")})),_0x4f7455;_0xec6068();var _0x2293fb$1=1029,_0x240c69=2305,_0x262381=function(e,t,i){this.enable=e,this.mode=t,this.frontFace=i};_0x262381.disabled=new _0x262381(!1,_0x2293fb$1,_0x240c69),_0x262381.backCCW=new _0x262381(!0,_0x2293fb$1,_0x240c69);var _0x520722=(_0x18bbe3=!0,function(e,t){var i=_0x18bbe3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x18bbe3=!1,i}),_0x48c086=_0x520722(void 0,(function(){return _0x48c086.toString().search("(((.+)+)+)+$").toString().constructor(_0x48c086).search("(((.+)+)+)+$")})),_0x18bbe3;_0x48c086();var _0x4ae57f=519,_0x37eb97=function(e,t,i){this.func=e,this.mask=t,this.range=i};_0x37eb97.ReadOnly=!1,_0x37eb97.ReadWrite=!0,_0x37eb97.disabled=new _0x37eb97(_0x4ae57f,_0x37eb97.ReadOnly,[0,1]);var _0x42cf1d=(_0x1009a7=!0,function(e,t){var i=_0x1009a7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1009a7=!1,i}),_0xea05f3=_0x42cf1d(void 0,(function(){return _0xea05f3.toString().search("(((.+)+)+)+$").toString().constructor(_0xea05f3).search("(((.+)+)+)+$")})),_0x1009a7;_0xea05f3();var _0x177e0f=519,_0x34f1c8=7680,_0x411737=function(e,t,i,n,r,o){this.test=e,this.ref=t,this.mask=i,this.fail=n,this.depthFail=r,this.pass=o};_0x411737.disabled=new _0x411737({func:_0x177e0f,mask:0},0,0,_0x34f1c8,_0x34f1c8,_0x34f1c8);var _0x51fdc5=(_0x102ee4=!0,function(e,t){var i=_0x102ee4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x102ee4=!1,i}),_0x418042=_0x51fdc5(void 0,(function(){return _0x418042.toString().search("(((.+)+)+)+$").toString().constructor(_0x418042).search("(((.+)+)+)+$")})),_0x102ee4;function _0x320daa(e,t,i){if(e.realtime&&e$2b(i)&&e$2b(i.zoom)){var n=i.zoom;e$2b(i.drawFillPattern)&&(n=Math.floor(n+.5));var r=i.zoom-e.level,o=t*(ae$s/(e.targetTileSize*Math.pow(2,r)));o*=e.targetTileSize/512;var a=i.zoom-i.finestRenderLevel;return a>0&&(o*=Math.pow(2,a)),o}return t*(ae$s/e.targetTileSize)}_0x418042();var _0x4514a1=(_0x1c91ee=!0,function(e,t){var i=_0x1c91ee?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c91ee=!1,i}),_0x15a166=_0x4514a1(void 0,(function(){return _0x15a166.toString().search("(((.+)+)+)+$").toString().constructor(_0x15a166).search("(((.+)+)+)+$")})),_0x1c91ee;_0x15a166();var _0x1d95cd={circleUniforms:function(e,t){return{u_camera_to_center_distance:new _0x5ec44f.Uniform1f(e,t.u_camera_to_center_distance),u_scale_with_map:new _0x5ec44f.Uniform1i(e,t.u_scale_with_map),u_pitch_with_map:new _0x5ec44f.Uniform1i(e,t.u_pitch_with_map),u_extrude_scale:new _0x5ec44f.Uniform2f(e,t.u_extrude_scale),u_device_pixel_ratio:new _0x5ec44f.Uniform1f(e,t.u_device_pixel_ratio),u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix)}},circleUniformValues:function(e,t,i){var n,r;if(e.transform,"map"===i.paint.get("circle-pitch-alignment")){var o=_0x320daa(t,1);n=!0,r=[o,o]}else n=!1,r=_0x42c6bf(t);return{u_camera_to_center_distance:1,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:_0x56884f(t),u_pitch_with_map:+n,u_device_pixel_ratio:1,u_extrude_scale:r}},circleUniformMap:function(e,t,i){var n,r;if("map"===i.paint.get("circle-pitch-alignment")){var o=_0x320daa(t,1);n=!0,r=[o,o]}else n=!1,r=_0x42c6bf(t);var a={u_camera_to_center_distance:function(){return 1},u_scale_with_map:function(){return+("map"===i.paint.get("circle-pitch-scale"))},u_matrix:function(){return _0x56884f(t)},u_pitch_with_map:function(){return+n},u_device_pixel_ratio:function(){return 1},u_extrude_scale:function(){return r}};return a}},_0xca121a=new Float32Array(16);function _0x56884f(e){var t=e.viewProjection;return p$1d.toArray(t,_0xca121a)}function _0x42c6bf(e){return[2/e.tileSize,-2/e.tileSize]}var _0x4c4adc=(_0x14d72d=!0,function(e,t){var i=_0x14d72d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x14d72d=!1,i}),_0x1f7c5c=_0x4c4adc(void 0,(function(){return _0x1f7c5c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f7c5c).search("(((.+)+)+)+$")})),_0x14d72d;function _0x5521d4(e,t,i,n){if("translucent"===e.renderPass){var r=i.paint.get("circle-opacity"),o=i.paint.get("circle-stroke-width"),a=i.paint.get("circle-stroke-opacity"),s=void 0!==i.layout.get("circle-sort-key").constantOr(1);if(0!==r.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1)){e.context.gl;var l=e.depthModeForSublayer(0,_0x37eb97.ReadOnly),u=e.colorModeForRenderPass(),c=[],h=t.getBucket(i);if(h){var d=h.programConfigurations.get(i.id),f=e.useProgram("circle",d),p=f.program,_=h.layoutVertexBuffer,m=h.indexBuffer,g=_0x1d95cd.circleUniformValues(e,t,i),x=_0x1d95cd.circleUniformMap(e,t,i),v=f.cesiumProgram,y=d.binders;for(var $ in y){x=y[$].getUniformMap(x,i.paint.get($))}var b={programConfiguration:d,program:p,layoutVertexBuffer:_,indexBuffer:m,uniformValues:g};if(s)for(var T=0,C=h.segments.get();T<C.length;T+=1){var S=C[T];c.push({segments:new _0x4b6d5a([S]),sortKey:S.sortKey,state:b})}else c.push({segments:h.segments,sortKey:0,state:b});s&&c.sort((function(e,t){return e.sortKey-t.sortKey}));for(var w=0,E=c;w<E.length;w+=1){var P=E[w],A=P.state;A.programConfiguration,A.program,A.layoutVertexBuffer,A.indexBuffer,A.uniformValues;var L=0;for(C=P.segments.get();L<C.length;L+=1){var M=((S=C[L]).drawCommands||(S.drawCommands={}))[i.id];if(!M){M=new i$_({cull:!1,primitiveType:W$18.TRIANGLES,count:3*S.primitiveLength,offset:3*S.primitiveOffset}),S.drawCommands[i.id]=M;for(var R=S.cesiumVaos||(S.cesiumVaos={}),O=[],I=0;I<h.layoutCesiumVertexBuffer.attributes.length;I++){var D=h.layoutCesiumVertexBuffer.attributes[I],B=_0x3cb0f8.toComponentDatatype(D.type),N=S$12.getSizeInBytes(B),F=h.layoutCesiumVertexBuffer.bytesPerElement,U=D.offset+N*(S.vertexOffset||0),G={name:D.name,index:I,vertexBuffer:h.layoutCesiumVertexBuffer,componentsPerAttribute:D.components,componentDatatype:B,offsetInBytes:U,strideInBytes:F,normalize:!1};O.push(G)}var z=R[i.id]||(R[i.id]=new c$12({context:e.cesiumContext,attributes:O,indexBuffer:h.cesiumIndexBuffer}));M.vertexArray=z}x.u_depthRange=function(){return l.range[0]},M.uniformMap=x,M.renderState=_0x3cb0f8.toRenderState(u,l,_0x262381.disabled),M.shaderProgram=v,M.execute(e.cesiumContext,n.passState)}}}}}}_0x1f7c5c();var _0x450411=(_0x2c87d3=!0,function(e,t){var i=_0x2c87d3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c87d3=!1,i}),_0x418314=_0x450411(void 0,(function(){return _0x418314.toString().search("(((.+)+)+)+$").toString().constructor(_0x418314).search("(((.+)+)+)+$")})),_0x2c87d3;_0x418314();var _0x3889a8={lineUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_ratio:new _0x5ec44f.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x5ec44f.Uniform1f(e,t.u_device_pixel_ratio),u_units_to_pixels:new _0x5ec44f.Uniform2f(e,t.u_units_to_pixels),u_antialiasing:new _0x5ec44f.Uniform1f(e,t.u_antialiasing)}},lineGradientUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_ratio:new _0x5ec44f.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x5ec44f.Uniform1f(e,t.u_device_pixel_ratio),u_units_to_pixels:new _0x5ec44f.Uniform2f(e,t.u_units_to_pixels),u_image:new _0x5ec44f.Uniform1i(e,t.u_image)}},linePatternUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_texsize:new _0x5ec44f.Uniform2f(e,t.u_texsize),u_ratio:new _0x5ec44f.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x5ec44f.Uniform1f(e,t.u_device_pixel_ratio),u_image:new _0x5ec44f.Uniform1i(e,t.u_image),u_units_to_pixels:new _0x5ec44f.Uniform2f(e,t.u_units_to_pixels),u_scale:new _0x5ec44f.Uniform4f(e,t.u_scale),u_fade:new _0x5ec44f.Uniform1f(e,t.u_fade)}},lineSDFUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_ratio:new _0x5ec44f.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x5ec44f.Uniform1f(e,t.u_device_pixel_ratio),u_units_to_pixels:new _0x5ec44f.Uniform2f(e,t.u_units_to_pixels),u_patternscale_a:new _0x5ec44f.Uniform2f(e,t.u_patternscale_a),u_patternscale_b:new _0x5ec44f.Uniform2f(e,t.u_patternscale_b),u_sdfgamma:new _0x5ec44f.Uniform1f(e,t.u_sdfgamma),u_image:new _0x5ec44f.Uniform1i(e,t.u_image),u_tex_y_a:new _0x5ec44f.Uniform1f(e,t.u_tex_y_a),u_tex_y_b:new _0x5ec44f.Uniform1f(e,t.u_tex_y_b),u_mix:new _0x5ec44f.Uniform1f(e,t.u_mix)}},lineUniformValues:function(e,t,i,n){e.transform;var r=_0x2638db(t),o=_0x320daa(t,1,n);return{u_matrix:_0x1fff56(e,t),u_ratio:1/o,u_device_pixel_ratio:1,u_units_to_pixels:[1/r[0],1/r[1]],u_antialiasing:n.lineAntialiasing}},lineGradientUniformValues:function(e,t,i,n){return extend$1(_0x3889a8.lineUniformValues(e,t,i,n),{u_image:0})},linePatternUniformValues:function(e,t,i,n,r){e.transform;var o=_0x56dc13(t,r);return{u_matrix:_0x1fff56(e,t),u_texsize:t.imageAtlasTexture.size,u_ratio:1/_0x320daa(t,1,r),u_device_pixel_ratio:1,u_image:0,u_scale:[ref_properties.browser.devicePixelRatio,o,n.fromScale,n.toScale],u_fade:n.t,u_units_to_pixels:_0x2638db(t)}},lineSDFUniformValues:function(e,t,i,n,r,o){e.transform;var a=e.lineAtlas,s=_0x56dc13(t,o),l="round"===i.layout.get("line-cap"),u=a.getDash(n.from,l),c=a.getDash(n.to,l),h=u.width*r.fromScale,d=c.width*r.toScale;return extend$1(_0x3889a8.lineUniformValues(e,t,i,o),{u_patternscale_a:[s/h,-u.height/2],u_patternscale_b:[s/d,-c.height/2],u_sdfgamma:a.width/(256*Math.min(h,d))/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:c.y,u_mix:r.t})}},_0x34e009=new o$1o;_0x3889a8.lineUniformMap=function(e,t,i,n){e.transform;var r=_0x2638db(t),o=_0x320daa(t,1,n),a={u_matrix:function(){return _0x1fff56(e,t)},u_ratio:function(){return 1/o},u_device_pixel_ratio:function(){return 1},u_units_to_pixels:function(){return _0x34e009.x=1/r[0],_0x34e009.y=1/r[1],_0x34e009},u_antialiasing:function(){return e.lineAntialiasing?1:0}};return a},_0x3889a8.lineGradientUniformMap=function(e,t,i,n){var r=_0x3889a8.lineUniformMap(e,t,i,n);return r.u_image=function(){return n.image},r};var _0x4009b0=new e$29;_0x3889a8.linePatternUniformMap=function(e,t,i,n,r){e.transform;var o=_0x56dc13(t,r),a={u_matrix:function(){return _0x1fff56(e,t)},u_texsize:function(){return t.imageAtlasTexture.size},u_ratio:function(){return 1/_0x320daa(t,1,r)},u_device_pixel_ratio:function(){return 1},u_image:function(){return r.image},u_scale:function(){return _0x4009b0.x=ref_properties.browser.devicePixelRatio,_0x4009b0.y=o,_0x4009b0.z=n.fromScale,_0x4009b0.w=n.toScale,_0x4009b0},u_fade:function(){return n.t},u_units_to_pixels:function(){return _0x2638db(t)}};return a};var _0x522aa6=new o$1o,_0x5ee202=new o$1o;function _0x56dc13(e,t){return 1/_0x320daa(e,1,t)}function _0x2638db(e){return[2/e.tileSize,-2/e.tileSize]}_0x3889a8.lineSDFUniformMap=function(e,t,i,n,r,o){var a=_0x3889a8.lineUniformMap(e,t,i,o);e.transform;var s=e.lineAtlas,l=_0x56dc13(t,o),u="round"===i.layout.get("line-cap"),c=s.getDash(n.from,u),h=s.getDash(n.to,u),d=c.width*r.fromScale,f=h.width*r.toScale;return a.u_patternscale_a=function(){return _0x522aa6.x=l/d,_0x522aa6.y=-c.height/2,_0x522aa6},a.u_patternscale_b=function(){return _0x5ee202.x=l/f,_0x5ee202.y=-h.height/2,_0x5ee202},a.u_sdfgamma=function(){return s.width/(256*Math.min(d,f))/2},a.u_image=function(){return o.image},a.u_tex_y_a=function(){return c.y},a.u_tex_y_b=function(){return h.y},a.u_mix=function(){return r.t},a};var _0x439da7=new Float32Array(16);function _0x1fff56(e,t,i){var n=t.viewProjection;return p$1d.toArray(n,_0x439da7)}var _0x440e42=(_0x4882e5=!0,function(e,t){var i=_0x4882e5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4882e5=!1,i}),_0x1e0d3a=_0x440e42(void 0,(function(){return _0x1e0d3a.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e0d3a).search("(((.+)+)+)+$")})),_0x4882e5;function _0x14f79a(e,t,i,n){if("translucent"===e.renderPass&&e$2b(i)&&e$2b(i.paint)){var r=i.paint.get("line-opacity"),o=i.paint.get("line-width");if(0!==r.constantOr(1)&&0!==o.constantOr(1)){var a=e.depthModeForSublayer(0,_0x37eb97.ReadOnly),s=e.colorModeForRenderPass(),l=i.paint.get("line-dasharray"),u=i.paint.get("line-pattern"),c=u&&u.constantOr(1),h=i.paint.get("line-gradient"),d=i.getCrossfadeParameters(),f=l?"lineSDF":c?"linePattern":h?"lineGradient":"line",p=e.context,_=e.cesiumContext;if(h){var m=i.gradientTexture;if(!i.gradient)return;!m&&(m=i.gradientTexture=new _0x6d753e(p,_,i.gradient,de$x.RGBA)),m.bind(de$x.LINEAR,de$x.CLAMP_TO_EDGE)}var g=t.getBucket(i);if(g){var x=g.programConfigurations.get(i.id),v=e.useProgram(f,x).cesiumProgram,y=u.constantOr(null);if(y&&t.imageAtlas){var $=t.imageAtlas,b=$.patternPositions[y.to.toString()],T=$.patternPositions[y.from.toString()];b&&T&&x.setConstantPatternPositions(b,T)}var C=o.value.value,S=C;S*=e._globalLineWidthScale,i.paint._values["line-width"].value.value=S,l?n.image=e.lineAtlas.getTexture(_):c&&(t.imageAtlasTexture.bind(de$x.LINEAR,de$x.CLAMP_TO_EDGE),n.image=t.imageAtlasTexture.cesiumTexture,x.updatePatternPaintBuffers(d));var w=l?_0x3889a8.lineSDFUniformMap(e,t,i,l,d,n):c?_0x3889a8.linePatternUniformMap(e,t,i,d,n):h?_0x3889a8.lineGradientUniformMap(e,t,i,n):_0x3889a8.lineUniformMap(e,t,i,n),E=v.allUniforms;w=x.getUniformMaps(E,i.paint,w);for(var P=x.getAttributeLocation(),A=0,L=g.segments.get();A<L.length;A+=1){var M=L[A],R=(M.drawCommands||(M.drawCommands={}))[i.id];if(!R){R=new i$_({cull:!1,primitiveType:W$18.TRIANGLES,count:3*M.primitiveLength,offset:3*M.primitiveOffset}),M.drawCommands[i.id]=R;for(var O=M.cesiumVaos||(M.cesiumVaos={}),I=[],D=0;D<g.layoutCesiumVertexBuffer.attributes.length;D++){var B=g.layoutCesiumVertexBuffer.attributes[D],N=_0x3cb0f8.mbxAttributeToCesiumVertexArrtribute(B,g.layoutCesiumVertexBuffer,P[B.name],M.vertexOffset);I.push(N)}var F=x.getPaintVertexBuffers();if(e$2b(F))for(var U=0;U<F.length;U++)for(var G=F[U],z=0;z<G.attributes.length;z++){var V=G.attributes[z];N=_0x3cb0f8.mbxAttributeToCesiumVertexArrtribute(V,G,P[V.name],M.vertexOffset);I.push(N)}var k=O[i.id]||(O[i.id]=new c$12({context:_,attributes:I,indexBuffer:g.cesiumIndexBuffer}));R.vertexArray=k}w.u_depthRange=function(){return 1-a.range[0]},R.uniformMap=w,R.renderState=_0x3cb0f8.toRenderState(s,a,_0x262381.disabled),R.shaderProgram=v,R.execute(_,n.passState)}i.paint._values["line-width"].value.value=C}}}}_0x1e0d3a();var _0x45b793=(_0x474eba=!0,function(e,t){var i=_0x474eba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x474eba=!1,i}),_0x103f64=_0x45b793(void 0,(function(){return _0x103f64.toString().search("(((.+)+)+)+$").toString().constructor(_0x103f64).search("(((.+)+)+)+$")})),_0x474eba;function _0x4f17e1(e,t,i,n){n.drawFillPattern=!0;var r=1/_0x320daa(i,1,n);i.realtime&&(r*=2);var o=i.targetTileSize*i.x,a=i.targetTileSize*i.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[1,r,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[o>>16,a>>16],u_pixel_coord_lower:[65535&o,65535&a]}}_0x103f64();var _0x3cc8e8=new e$29,_0x1ed825=new o$1o,_0xfb6e1f=new o$1o,_0x304efe=new o$1o;function _0x2898c9(e,t,i,n){n.drawFillPattern=!0;var r=1/_0x320daa(i,1,n);i.realtime&&(r*=2);var o=i.targetTileSize*i.x,a=i.targetTileSize*i.y;return e.u_image=function(){return n.image},e.u_texsize=function(){return _0x304efe.x=i.imageAtlasTexture.size[0],_0x304efe.y=i.imageAtlasTexture.size[1],_0x304efe},e.u_scale=function(){return _0x3cc8e8.x=1,_0x3cc8e8.y=r,_0x3cc8e8.z=t.fromScale,_0x3cc8e8.w=t.toScale,_0x3cc8e8},e.u_fade=function(){return t.t},e.u_pixel_coord_lower=function(){return _0x1ed825.x=65535&o,_0x1ed825.y=65535&a,_0x1ed825},e.u_pixel_coord_upper=function(){return _0xfb6e1f.x=o>>16,_0xfb6e1f.y=a>>16,_0xfb6e1f},e}var _0x25c2d5={fillUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix)}},fillPatternUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_image:new _0x5ec44f.Uniform1i(e,t.u_image),u_texsize:new _0x5ec44f.Uniform2f(e,t.u_texsize),u_pixel_coord_upper:new _0x5ec44f.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x5ec44f.Uniform2f(e,t.u_pixel_coord_lower),u_scale:new _0x5ec44f.Uniform4f(e,t.u_scale),u_fade:new _0x5ec44f.Uniform1f(e,t.u_fade)}},fillOutlineUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_world:new _0x5ec44f.Uniform2f(e,t.u_world)}},fillOutlinePatternUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_world:new _0x5ec44f.Uniform2f(e,t.u_world),u_image:new _0x5ec44f.Uniform1i(e,t.u_image),u_texsize:new _0x5ec44f.Uniform2f(e,t.u_texsize),u_pixel_coord_upper:new _0x5ec44f.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x5ec44f.Uniform2f(e,t.u_pixel_coord_lower),u_scale:new _0x5ec44f.Uniform4f(e,t.u_scale),u_fade:new _0x5ec44f.Uniform1f(e,t.u_fade)}},fillUniformValues:function(e){return{u_matrix:e}},fillPatternUniformValues:function(e,t,i,n,r){return extend$1(_0x25c2d5.fillUniformValues(e),_0x4f17e1(i,t,n,r))},fillOutlineUniformValues:function(e,t){return{u_matrix:e,u_world:t}},fillOutlinePatternUniformValues:function(e,t,i,n,r,o){return extend$1(_0x25c2d5.fillPatternUniformValues(e,t,i,n,o),{u_world:r})},fillUniformMap:function(e){var t={u_matrix:function(){return e}};return t},fillPatternUniformMap:function(e,t,i,n,r){var o=_0x25c2d5.fillUniformMap(e);return o=_0x2898c9(o,i,n,r)}},_0x557624=new o$1o;_0x25c2d5.fillOutlineUniformMap=function(e,t){var i={u_matrix:function(){return e},u_world:function(){return _0x557624.x=t[0],_0x557624.y=t[1],_0x557624}};return i},_0x25c2d5.fillOutlinePatternUniformMap=function(e,t,i,n,r,o){var a={};return(a=_0x25c2d5.fillPatternUniformMap(e,t,i,n,o)).u_world=function(){return _0x557624.x=r[0],_0x557624.y=r[1],_0x557624},a};var _0x4ff997=(_0x114502=!0,function(e,t){var i=_0x114502?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x114502=!1,i}),_0x3df0db=_0x4ff997(void 0,(function(){return _0x3df0db.toString().search("(((.+)+)+)+$").toString().constructor(_0x3df0db).search("(((.+)+)+)+$")})),_0x114502;_0x3df0db();var _0x5898e0=new Float32Array(16),_0x211ef8={};function _0x416937(e,t,i,n,r,o,a){var s,l,u,c,h=i.paint.get("fill-pattern"),d=h&&h.constantOr(1),f=i.getCrossfadeParameters(),p={};o?(l=d&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=W$18.LINES):(l=d?"fillPattern":"fill",s=W$18.TRIANGLES);var _=t.getBucket(i);if(_){var m=_.programConfigurations.get(i.id);d&&(t.imageAtlasTexture.bind(de$x.LINEAR,de$x.CLAMP_TO_EDGE),a.image=t.imageAtlasTexture.cesiumTexture,m.updatePatternPaintBuffers(f));var g=h.constantOr(null);if(g&&t.imageAtlas){var x=t.imageAtlas,v=x.patternPositions[g.to.toString()],y=x.patternPositions[g.from.toString()];v&&y&&m.setConstantPatternPositions(v,y)}var $=e.useProgram(l,m).cesiumProgram,b=t.viewProjection,T=p$1d.toArray(b,_0x5898e0);if(o){c=_.cesiumIndexBuffer2,u=_.segments2;var C=[t.tileSize,t.tileSize];p="fillOutlinePattern"===l&&d?_0x25c2d5.fillOutlinePatternUniformMap(T,e,f,t,C,a):_0x25c2d5.fillOutlineUniformMap(T,C)}else c=_.cesiumIndexBuffer,u=_.segments,p=d?_0x25c2d5.fillPatternUniformMap(T,e,f,t,a):_0x25c2d5.fillUniformMap(T);var S=$.allUniforms;p=m.getUniformMaps(S,i.paint,p);for(var w=m.getPaintVertexBuffers(),E=m.getAttributeLocation(),P=0,A=u.get();P<A.length;P+=1){var L=A[P],M=(L.drawCommands||(L.drawCommands={}))[i.id];if(!M){var R=_0x211ef8[s];M=new i$_({cull:!1,primitiveType:s,count:L.primitiveLength*R,offset:L.primitiveOffset*R}),L.drawCommands[i.id]=M;for(var O=L.cesiumVaos||(L.cesiumVaos={}),I=[],D=0;D<_.layoutCesiumVertexBuffer.attributes.length;D++){var B=_.layoutCesiumVertexBuffer.attributes[D],N=_0x3cb0f8.mbxAttributeToCesiumVertexArrtribute(B,_.layoutCesiumVertexBuffer,E[B.name],L.vertexOffset);I.push(N)}I.length;for(var F=0;F<w.length;F++)for(var U=w[F],G=0;G<U.attributes.length;G++){B=U.attributes[G],N=_0x3cb0f8.mbxAttributeToCesiumVertexArrtribute(B,U,E[B.name],L.vertexOffset);I.push(N)}var z=O[i.id]||(O[i.id]=new c$12({context:e.cesiumContext,attributes:I,indexBuffer:c}));M.vertexArray=z}p.u_depthRange=function(){return 1-n.range[0]},M.uniformMap=p,M.renderState=_0x3cb0f8.toRenderState(r,n,_0x262381.disabled),M.shaderProgram=$,M.execute(e.cesiumContext,a.passState)}}}function _0x3433dc(e,t,i,n){var r=i.paint.get("fill-color"),o=i.paint.get("fill-opacity"),a=o.value.value;if(o.value.value=0!==o.value.value?.5*o.value.value+.5:0,0!==o.constantOr(1)){var s=e.colorModeForRenderPass(),l=i.paint.get("fill-pattern").constantOr(1)||1!==r.constantOr(_0x128d69.transparent).a||1!==o.constantOr(0)?"translucent":"opaque";if(e.renderPass===l){var u=e.depthModeForSublayer(1,"opaque"===e.renderPass?_0x37eb97.ReadWrite:_0x37eb97.ReadOnly);_0x416937(e,t,i,u,s,!1,n)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){var c=e.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,_0x37eb97.ReadOnly);_0x416937(e,t,i,c,s,!0,n)}o.value.value=a}}_0x211ef8[W$18.LINES]=2,_0x211ef8[W$18.TRIANGLES]=3,_0x211ef8[W$18.LINE_STRIP]=1;var _0x1e3cc7=(_0x487623=!0,function(e,t){var i=_0x487623?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x487623=!1,i}),_0x1b77ec=_0x1e3cc7(void 0,(function(){return _0x1b77ec.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b77ec).search("(((.+)+)+)+$")})),_0x487623;function _0x3f85ef(){}_0x1b77ec();var _0xc01e75=1e-6,_0x231ae3="undefined"!=typeof Float32Array?Float32Array:Array,_0x4b99e7=Math.random;function _0x1e003a(e){_0x231ae3=e}var _0x3cdc8e=Math.PI/180;function _0x2c4bf9(e){return e*_0x3cdc8e}function _0x2c83e8(e,t){return Math.abs(e-t)<=_0xc01e75*Math.max(1,Math.abs(e),Math.abs(t))}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var _0x427c26=Object.freeze({EPSILON:_0xc01e75,get ARRAY_TYPE(){return _0x231ae3},RANDOM:_0x4b99e7,setMatrixArrayType:_0x1e003a,toRadian:_0x2c4bf9,equals:_0x2c83e8});function _0x5b7ade(){var e=new _0x231ae3(4);return _0x231ae3!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function _0x4347bb(e){var t=new _0x231ae3(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function _0x598e84(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function _0x2abc4e(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e}function _0x414d80(e,t,i,n){var r=new _0x231ae3(4);return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function _0x15c5ba(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e}function _0x2b88ba(e,t){if(e===t){var i=t[1];e[1]=t[2],e[2]=i}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e}function _0x3b3138(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*o-r*n;return a?(a=1/a,e[0]=o*a,e[1]=-n*a,e[2]=-r*a,e[3]=i*a,e):null}function _0x100033(e,t){var i=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=i,e}function _0x5b27f6(e){return e[0]*e[3]-e[2]*e[1]}function _0x794f3f(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*s+o*l,e[1]=r*s+a*l,e[2]=n*u+o*c,e[3]=r*u+a*c,e}function _0x417f1e(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+o*s,e[1]=r*l+a*s,e[2]=n*-s+o*l,e[3]=r*-s+a*l,e}function _0x33688c(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1];return e[0]=n*s,e[1]=r*s,e[2]=o*l,e[3]=a*l,e}function _0x2c3db8(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=-i,e[3]=n,e}function _0x1d6397(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e}function _0x53f5a1(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function _0x28f45c(e){return Math.hypot(e[0],e[1],e[2],e[3])}function _0x91e739(e,t,i,n){return e[2]=n[2]/n[0],i[0]=n[0],i[1]=n[1],i[3]=n[3]-e[2]*i[1],[e,t,i]}function _0x4f299c(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e}function _0x83081e(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e}function _0x5b3a3e(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function _0x3b41e9(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t[2],u=t[3];return Math.abs(i-a)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-s)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-l)<=_0xc01e75*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-u)<=_0xc01e75*Math.max(1,Math.abs(o),Math.abs(u))}function _0x286a5f(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e}function _0x302030(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e}var _0x53adb2=_0x794f3f,_0x2923c1=_0x83081e,_0x2f8264=Object.freeze({create:_0x5b7ade,clone:_0x4347bb,copy:_0x598e84,identity:_0x2abc4e,fromValues:_0x414d80,set:_0x15c5ba,transpose:_0x2b88ba,invert:_0x3b3138,adjoint:_0x100033,determinant:_0x5b27f6,multiply:_0x794f3f,rotate:_0x417f1e,scale:_0x33688c,fromRotation:_0x2c3db8,fromScaling:_0x1d6397,str:_0x53f5a1,frob:_0x28f45c,LDU:_0x91e739,add:_0x4f299c,subtract:_0x83081e,exactEquals:_0x5b3a3e,equals:_0x3b41e9,multiplyScalar:_0x286a5f,multiplyScalarAndAdd:_0x302030,mul:_0x53adb2,sub:_0x2923c1});function _0x3d7ebc(){var e=new _0x231ae3(6);return _0x231ae3!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function _0x392582(e){var t=new _0x231ae3(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function _0x1ccb39(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function _0x597c85(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function _0x5756dc(e,t,i,n,r,o){var a=new _0x231ae3(6);return a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=r,a[5]=o,a}function _0x3da2db(e,t,i,n,r,o,a){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e}function _0x4d8860(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=i*o-n*r;return l?(l=1/l,e[0]=o*l,e[1]=-n*l,e[2]=-r*l,e[3]=i*l,e[4]=(r*s-o*a)*l,e[5]=(n*a-i*s)*l,e):null}function _0x38597e(e){return e[0]*e[3]-e[1]*e[2]}function _0x2fdf60(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=i[0],c=i[1],h=i[2],d=i[3],f=i[4],p=i[5];return e[0]=n*u+o*c,e[1]=r*u+a*c,e[2]=n*h+o*d,e[3]=r*h+a*d,e[4]=n*f+o*p+s,e[5]=r*f+a*p+l,e}function _0x25fe46(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=Math.sin(i),c=Math.cos(i);return e[0]=n*c+o*u,e[1]=r*c+a*u,e[2]=n*-u+o*c,e[3]=r*-u+a*c,e[4]=s,e[5]=l,e}function _0x568dc6(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=i[0],c=i[1];return e[0]=n*u,e[1]=r*u,e[2]=o*c,e[3]=a*c,e[4]=s,e[5]=l,e}function _0x1e0bff(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=i[0],c=i[1];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=n*u+o*c+s,e[5]=r*u+a*c+l,e}function _0x149ff8(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=-i,e[3]=n,e[4]=0,e[5]=0,e}function _0x52b4b9(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function _0x11ff91(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function _0x43effe(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function _0x1891eb(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],1)}function _0x3d7aa2(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e}function _0x5d84dc(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e}function _0x3228b8(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e}function _0x3f1d45(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e}function _0x103562(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function _0x1b1fd4(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],u=t[1],c=t[2],h=t[3],d=t[4],f=t[5];return Math.abs(i-l)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(n-u)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(r-c)<=_0xc01e75*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(o-h)<=_0xc01e75*Math.max(1,Math.abs(o),Math.abs(h))&&Math.abs(a-d)<=_0xc01e75*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(s-f)<=_0xc01e75*Math.max(1,Math.abs(s),Math.abs(f))}var _0x1bc3a6=_0x2fdf60,_0x3fa5cf=_0x5d84dc,_0x23de5e=Object.freeze({create:_0x3d7ebc,clone:_0x392582,copy:_0x1ccb39,identity:_0x597c85,fromValues:_0x5756dc,set:_0x3da2db,invert:_0x4d8860,determinant:_0x38597e,multiply:_0x2fdf60,rotate:_0x25fe46,scale:_0x568dc6,translate:_0x1e0bff,fromRotation:_0x149ff8,fromScaling:_0x52b4b9,fromTranslation:_0x11ff91,str:_0x43effe,frob:_0x1891eb,add:_0x3d7aa2,subtract:_0x5d84dc,multiplyScalar:_0x3228b8,multiplyScalarAndAdd:_0x3f1d45,exactEquals:_0x103562,equals:_0x1b1fd4,mul:_0x1bc3a6,sub:_0x3fa5cf});function _0x3c9785(){var e=new _0x231ae3(9);return _0x231ae3!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function _0x3d24b2(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function _0x234166(e){var t=new _0x231ae3(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function _0x3bf775(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function _0x1363a3(e,t,i,n,r,o,a,s,l){var u=new _0x231ae3(9);return u[0]=e,u[1]=t,u[2]=i,u[3]=n,u[4]=r,u[5]=o,u[6]=a,u[7]=s,u[8]=l,u}function _0x479537(e,t,i,n,r,o,a,s,l,u){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e[8]=u,e}function _0x558517(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _0x4aeeef(e,t){if(e===t){var i=t[1],n=t[2],r=t[5];e[1]=t[3],e[2]=t[6],e[3]=i,e[5]=t[7],e[6]=n,e[7]=r}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function _0x269ef7(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=c*a-s*u,d=-c*o+s*l,f=u*o-a*l,p=i*h+n*d+r*f;return p?(p=1/p,e[0]=h*p,e[1]=(-c*n+r*u)*p,e[2]=(s*n-r*a)*p,e[3]=d*p,e[4]=(c*i-r*l)*p,e[5]=(-s*i+r*o)*p,e[6]=f*p,e[7]=(-u*i+n*l)*p,e[8]=(a*i-n*o)*p,e):null}function _0x23c4a6(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8];return e[0]=a*c-s*u,e[1]=r*u-n*c,e[2]=n*s-r*a,e[3]=s*l-o*c,e[4]=i*c-r*l,e[5]=r*o-i*s,e[6]=o*u-a*l,e[7]=n*l-i*u,e[8]=i*a-n*o,e}function _0x17172a(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8];return t*(u*o-a*l)+i*(-u*r+a*s)+n*(l*r-o*s)}function _0xdc676(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=i[0],f=i[1],p=i[2],_=i[3],m=i[4],g=i[5],x=i[6],v=i[7],y=i[8];return e[0]=d*n+f*a+p*u,e[1]=d*r+f*s+p*c,e[2]=d*o+f*l+p*h,e[3]=_*n+m*a+g*u,e[4]=_*r+m*s+g*c,e[5]=_*o+m*l+g*h,e[6]=x*n+v*a+y*u,e[7]=x*r+v*s+y*c,e[8]=x*o+v*l+y*h,e}function _0x2c36de(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=i[0],f=i[1];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=d*n+f*a+u,e[7]=d*r+f*s+c,e[8]=d*o+f*l+h,e}function _0x27cc93(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=Math.sin(i),f=Math.cos(i);return e[0]=f*n+d*a,e[1]=f*r+d*s,e[2]=f*o+d*l,e[3]=f*a-d*n,e[4]=f*s-d*r,e[5]=f*l-d*o,e[6]=u,e[7]=c,e[8]=h,e}function _0x1b9018(e,t,i){var n=i[0],r=i[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function _0x551019(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function _0x110f47(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=0,e[3]=-i,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _0x24a05e(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _0x42a911(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function _0x4aa108(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i+i,s=n+n,l=r+r,u=i*a,c=n*a,h=n*s,d=r*a,f=r*s,p=r*l,_=o*a,m=o*s,g=o*l;return e[0]=1-h-p,e[3]=c-g,e[6]=d+m,e[1]=c+g,e[4]=1-u-p,e[7]=f-_,e[2]=d-m,e[5]=f+_,e[8]=1-u-h,e}function _0x53a57f(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15],x=i*s-n*a,v=i*l-r*a,y=i*u-o*a,$=n*l-r*s,b=n*u-o*s,T=r*u-o*l,C=c*_-h*p,S=c*m-d*p,w=c*g-f*p,E=h*m-d*_,P=h*g-f*_,A=d*g-f*m,L=x*A-v*P+y*E+$*w-b*S+T*C;return L?(L=1/L,e[0]=(s*A-l*P+u*E)*L,e[1]=(l*w-a*A-u*S)*L,e[2]=(a*P-s*w+u*C)*L,e[3]=(r*P-n*A-o*E)*L,e[4]=(i*A-r*w+o*S)*L,e[5]=(n*w-i*P-o*C)*L,e[6]=(_*T-m*b+g*$)*L,e[7]=(m*y-p*T-g*v)*L,e[8]=(p*b-_*y+g*x)*L,e):null}function _0x446280(e,t,i){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/i,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function _0x2b863e(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function _0x41b8e(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function _0x5c8e82(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e[8]=t[8]+i[8],e}function _0x1d13c7(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e[6]=t[6]-i[6],e[7]=t[7]-i[7],e[8]=t[8]-i[8],e}function _0x1b1e22(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*i,e}function _0x1fa845(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e[6]=t[6]+i[6]*n,e[7]=t[7]+i[7]*n,e[8]=t[8]+i[8]*n,e}function _0xfb6ca6(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]}function _0x3386be(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=t[0],d=t[1],f=t[2],p=t[3],_=t[4],m=t[5],g=t[6],x=t[7],v=t[8];return Math.abs(i-h)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(n-d)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(r-f)<=_0xc01e75*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-p)<=_0xc01e75*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-_)<=_0xc01e75*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(s-m)<=_0xc01e75*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(l-g)<=_0xc01e75*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(u-x)<=_0xc01e75*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(c-v)<=_0xc01e75*Math.max(1,Math.abs(c),Math.abs(v))}var _0x123b79=_0xdc676,_0xcef3f5=_0x1d13c7,_0x3f27af=Object.freeze({create:_0x3c9785,fromMat4:_0x3d24b2,clone:_0x234166,copy:_0x3bf775,fromValues:_0x1363a3,set:_0x479537,identity:_0x558517,transpose:_0x4aeeef,invert:_0x269ef7,adjoint:_0x23c4a6,determinant:_0x17172a,multiply:_0xdc676,translate:_0x2c36de,rotate:_0x27cc93,scale:_0x1b9018,fromTranslation:_0x551019,fromRotation:_0x110f47,fromScaling:_0x24a05e,fromMat2d:_0x42a911,fromQuat:_0x4aa108,normalFromMat4:_0x53a57f,projection:_0x446280,str:_0x2b863e,frob:_0x41b8e,add:_0x5c8e82,subtract:_0x1d13c7,multiplyScalar:_0x1b1e22,multiplyScalarAndAdd:_0x1fa845,exactEquals:_0xfb6ca6,equals:_0x3386be,mul:_0x123b79,sub:_0xcef3f5});function _0x4da59c(){var e=new _0x231ae3(16);return _0x231ae3!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function _0x332a4e(e){var t=new _0x231ae3(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function _0x5e11ca(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function _0x3bd695(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=new _0x231ae3(16);return m[0]=e,m[1]=t,m[2]=i,m[3]=n,m[4]=r,m[5]=o,m[6]=a,m[7]=s,m[8]=l,m[9]=u,m[10]=c,m[11]=h,m[12]=d,m[13]=f,m[14]=p,m[15]=_,m}function _0x1b6182(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e[8]=u,e[9]=c,e[10]=h,e[11]=d,e[12]=f,e[13]=p,e[14]=_,e[15]=m,e}function _0x2ceaeb(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x2fb1ff(e,t){if(e===t){var i=t[1],n=t[2],r=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=i,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=o,e[11]=t[14],e[12]=r,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function _0x159c68(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15],x=i*s-n*a,v=i*l-r*a,y=i*u-o*a,$=n*l-r*s,b=n*u-o*s,T=r*u-o*l,C=c*_-h*p,S=c*m-d*p,w=c*g-f*p,E=h*m-d*_,P=h*g-f*_,A=d*g-f*m,L=x*A-v*P+y*E+$*w-b*S+T*C;return L?(L=1/L,e[0]=(s*A-l*P+u*E)*L,e[1]=(r*P-n*A-o*E)*L,e[2]=(_*T-m*b+g*$)*L,e[3]=(d*b-h*T-f*$)*L,e[4]=(l*w-a*A-u*S)*L,e[5]=(i*A-r*w+o*S)*L,e[6]=(m*y-p*T-g*v)*L,e[7]=(c*T-d*y+f*v)*L,e[8]=(a*P-s*w+u*C)*L,e[9]=(n*w-i*P-o*C)*L,e[10]=(p*b-_*y+g*x)*L,e[11]=(h*y-c*b-f*x)*L,e[12]=(s*S-a*E-l*C)*L,e[13]=(i*E-n*S+r*C)*L,e[14]=(_*v-p*$-m*x)*L,e[15]=(c*$-h*v+d*x)*L,e):null}function _0x2ca8b1(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15];return e[0]=s*(d*g-f*m)-h*(l*g-u*m)+_*(l*f-u*d),e[1]=-(n*(d*g-f*m)-h*(r*g-o*m)+_*(r*f-o*d)),e[2]=n*(l*g-u*m)-s*(r*g-o*m)+_*(r*u-o*l),e[3]=-(n*(l*f-u*d)-s*(r*f-o*d)+h*(r*u-o*l)),e[4]=-(a*(d*g-f*m)-c*(l*g-u*m)+p*(l*f-u*d)),e[5]=i*(d*g-f*m)-c*(r*g-o*m)+p*(r*f-o*d),e[6]=-(i*(l*g-u*m)-a*(r*g-o*m)+p*(r*u-o*l)),e[7]=i*(l*f-u*d)-a*(r*f-o*d)+c*(r*u-o*l),e[8]=a*(h*g-f*_)-c*(s*g-u*_)+p*(s*f-u*h),e[9]=-(i*(h*g-f*_)-c*(n*g-o*_)+p*(n*f-o*h)),e[10]=i*(s*g-u*_)-a*(n*g-o*_)+p*(n*u-o*s),e[11]=-(i*(s*f-u*h)-a*(n*f-o*h)+c*(n*u-o*s)),e[12]=-(a*(h*m-d*_)-c*(s*m-l*_)+p*(s*d-l*h)),e[13]=i*(h*m-d*_)-c*(n*m-r*_)+p*(n*d-r*h),e[14]=-(i*(s*m-l*_)-a*(n*m-r*_)+p*(n*l-r*s)),e[15]=i*(s*d-l*h)-a*(n*d-r*h)+c*(n*l-r*s),e}function _0x216639(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],f=e[12],p=e[13],_=e[14],m=e[15];return(t*a-i*o)*(h*m-d*_)-(t*s-n*o)*(c*m-d*p)+(t*l-r*o)*(c*_-h*p)+(i*s-n*a)*(u*m-d*f)-(i*l-r*a)*(u*_-h*f)+(n*l-r*s)*(u*p-c*f)}function _0x540a14(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=t[9],f=t[10],p=t[11],_=t[12],m=t[13],g=t[14],x=t[15],v=i[0],y=i[1],$=i[2],b=i[3];return e[0]=v*n+y*s+$*h+b*_,e[1]=v*r+y*l+$*d+b*m,e[2]=v*o+y*u+$*f+b*g,e[3]=v*a+y*c+$*p+b*x,v=i[4],y=i[5],$=i[6],b=i[7],e[4]=v*n+y*s+$*h+b*_,e[5]=v*r+y*l+$*d+b*m,e[6]=v*o+y*u+$*f+b*g,e[7]=v*a+y*c+$*p+b*x,v=i[8],y=i[9],$=i[10],b=i[11],e[8]=v*n+y*s+$*h+b*_,e[9]=v*r+y*l+$*d+b*m,e[10]=v*o+y*u+$*f+b*g,e[11]=v*a+y*c+$*p+b*x,v=i[12],y=i[13],$=i[14],b=i[15],e[12]=v*n+y*s+$*h+b*_,e[13]=v*r+y*l+$*d+b*m,e[14]=v*o+y*u+$*f+b*g,e[15]=v*a+y*c+$*p+b*x,e}function _0x5d0268(e,t,i){var n,r,o,a,s,l,u,c,h,d,f,p,_=i[0],m=i[1],g=i[2];return t===e?(e[12]=t[0]*_+t[4]*m+t[8]*g+t[12],e[13]=t[1]*_+t[5]*m+t[9]*g+t[13],e[14]=t[2]*_+t[6]*m+t[10]*g+t[14],e[15]=t[3]*_+t[7]*m+t[11]*g+t[15]):(n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=n*_+s*m+h*g+t[12],e[13]=r*_+l*m+d*g+t[13],e[14]=o*_+u*m+f*g+t[14],e[15]=a*_+c*m+p*g+t[15]),e}function _0x31b0bd(e,t,i){var n=i[0],r=i[1],o=i[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function _0x4fb60b(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S,w,E,P=n[0],A=n[1],L=n[2],M=Math.hypot(P,A,L);return M<_0xc01e75?null:(P*=M=1/M,A*=M,L*=M,r=Math.sin(i),a=1-(o=Math.cos(i)),s=t[0],l=t[1],u=t[2],c=t[3],h=t[4],d=t[5],f=t[6],p=t[7],_=t[8],m=t[9],g=t[10],x=t[11],v=P*P*a+o,y=A*P*a+L*r,$=L*P*a-A*r,b=P*A*a-L*r,T=A*A*a+o,C=L*A*a+P*r,S=P*L*a+A*r,w=A*L*a-P*r,E=L*L*a+o,e[0]=s*v+h*y+_*$,e[1]=l*v+d*y+m*$,e[2]=u*v+f*y+g*$,e[3]=c*v+p*y+x*$,e[4]=s*b+h*T+_*C,e[5]=l*b+d*T+m*C,e[6]=u*b+f*T+g*C,e[7]=c*b+p*T+x*C,e[8]=s*S+h*w+_*E,e[9]=l*S+d*w+m*E,e[10]=u*S+f*w+g*E,e[11]=c*S+p*w+x*E,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function _0x47d9ba(e,t,i){var n=Math.sin(i),r=Math.cos(i),o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*r+u*n,e[5]=a*r+c*n,e[6]=s*r+h*n,e[7]=l*r+d*n,e[8]=u*r-o*n,e[9]=c*r-a*n,e[10]=h*r-s*n,e[11]=d*r-l*n,e}function _0x463ddd(e,t,i){var n=Math.sin(i),r=Math.cos(i),o=t[0],a=t[1],s=t[2],l=t[3],u=t[8],c=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*r-u*n,e[1]=a*r-c*n,e[2]=s*r-h*n,e[3]=l*r-d*n,e[8]=o*n+u*r,e[9]=a*n+c*r,e[10]=s*n+h*r,e[11]=l*n+d*r,e}function _0x582c56(e,t,i){var n=Math.sin(i),r=Math.cos(i),o=t[0],a=t[1],s=t[2],l=t[3],u=t[4],c=t[5],h=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*r+u*n,e[1]=a*r+c*n,e[2]=s*r+h*n,e[3]=l*r+d*n,e[4]=u*r-o*n,e[5]=c*r-a*n,e[6]=h*r-s*n,e[7]=d*r-l*n,e}function _0x4408fe(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function _0x487d11(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x28da76(e,t,i){var n,r,o,a=i[0],s=i[1],l=i[2],u=Math.hypot(a,s,l);return u<_0xc01e75?null:(a*=u=1/u,s*=u,l*=u,n=Math.sin(t),o=1-(r=Math.cos(t)),e[0]=a*a*o+r,e[1]=s*a*o+l*n,e[2]=l*a*o-s*n,e[3]=0,e[4]=a*s*o-l*n,e[5]=s*s*o+r,e[6]=l*s*o+a*n,e[7]=0,e[8]=a*l*o+s*n,e[9]=s*l*o-a*n,e[10]=l*l*o+r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function _0x5142a4(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=i,e[7]=0,e[8]=0,e[9]=-i,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x315d9a(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-i,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=i,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x5e87f3(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=0,e[3]=0,e[4]=-i,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0xa0dbb0(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=n+n,l=r+r,u=o+o,c=n*s,h=n*l,d=n*u,f=r*l,p=r*u,_=o*u,m=a*s,g=a*l,x=a*u;return e[0]=1-(f+_),e[1]=h+x,e[2]=d-g,e[3]=0,e[4]=h-x,e[5]=1-(c+_),e[6]=p+m,e[7]=0,e[8]=d+g,e[9]=p-m,e[10]=1-(c+f),e[11]=0,e[12]=i[0],e[13]=i[1],e[14]=i[2],e[15]=1,e}function _0x302a4a(e,t){var i=new _0x231ae3(3),n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=n*n+r*r+o*o+a*a;return h>0?(i[0]=2*(s*a+c*n+l*o-u*r)/h,i[1]=2*(l*a+c*r+u*n-s*o)/h,i[2]=2*(u*a+c*o+s*r-l*n)/h):(i[0]=2*(s*a+c*n+l*o-u*r),i[1]=2*(l*a+c*r+u*n-s*o),i[2]=2*(u*a+c*o+s*r-l*n)),_0xa0dbb0(e,t,i),e}function _0x87163b(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function _0x51d585(e,t){var i=t[0],n=t[1],r=t[2],o=t[4],a=t[5],s=t[6],l=t[8],u=t[9],c=t[10];return e[0]=Math.hypot(i,n,r),e[1]=Math.hypot(o,a,s),e[2]=Math.hypot(l,u,c),e}function _0x2a7876(e,t){var i=new _0x231ae3(3);_0x51d585(i,t);var n=1/i[0],r=1/i[1],o=1/i[2],a=t[0]*n,s=t[1]*r,l=t[2]*o,u=t[4]*n,c=t[5]*r,h=t[6]*o,d=t[8]*n,f=t[9]*r,p=t[10]*o,_=a+c+p,m=0;return _>0?(m=2*Math.sqrt(_+1),e[3]=.25*m,e[0]=(h-f)/m,e[1]=(d-l)/m,e[2]=(s-u)/m):a>c&&a>p?(m=2*Math.sqrt(1+a-c-p),e[3]=(h-f)/m,e[0]=.25*m,e[1]=(s+u)/m,e[2]=(d+l)/m):c>p?(m=2*Math.sqrt(1+c-a-p),e[3]=(d-l)/m,e[0]=(s+u)/m,e[1]=.25*m,e[2]=(h+f)/m):(m=2*Math.sqrt(1+p-a-c),e[3]=(s-u)/m,e[0]=(d+l)/m,e[1]=(h+f)/m,e[2]=.25*m),e}function _0x448f6d(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=t[3],l=r+r,u=o+o,c=a+a,h=r*l,d=r*u,f=r*c,p=o*u,_=o*c,m=a*c,g=s*l,x=s*u,v=s*c,y=n[0],$=n[1],b=n[2];return e[0]=(1-(p+m))*y,e[1]=(d+v)*y,e[2]=(f-x)*y,e[3]=0,e[4]=(d-v)*$,e[5]=(1-(h+m))*$,e[6]=(_+g)*$,e[7]=0,e[8]=(f+x)*b,e[9]=(_-g)*b,e[10]=(1-(h+p))*b,e[11]=0,e[12]=i[0],e[13]=i[1],e[14]=i[2],e[15]=1,e}function _0x45b3d6(e,t,i,n,r){var o=t[0],a=t[1],s=t[2],l=t[3],u=o+o,c=a+a,h=s+s,d=o*u,f=o*c,p=o*h,_=a*c,m=a*h,g=s*h,x=l*u,v=l*c,y=l*h,$=n[0],b=n[1],T=n[2],C=r[0],S=r[1],w=r[2],E=(1-(_+g))*$,P=(f+y)*$,A=(p-v)*$,L=(f-y)*b,M=(1-(d+g))*b,R=(m+x)*b,O=(p+v)*T,I=(m-x)*T,D=(1-(d+_))*T;return e[0]=E,e[1]=P,e[2]=A,e[3]=0,e[4]=L,e[5]=M,e[6]=R,e[7]=0,e[8]=O,e[9]=I,e[10]=D,e[11]=0,e[12]=i[0]+C-(E*C+L*S+O*w),e[13]=i[1]+S-(P*C+M*S+I*w),e[14]=i[2]+w-(A*C+R*S+D*w),e[15]=1,e}function _0x2bdeaa(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i+i,s=n+n,l=r+r,u=i*a,c=n*a,h=n*s,d=r*a,f=r*s,p=r*l,_=o*a,m=o*s,g=o*l;return e[0]=1-h-p,e[1]=c+g,e[2]=d-m,e[3]=0,e[4]=c-g,e[5]=1-u-p,e[6]=f+_,e[7]=0,e[8]=d+m,e[9]=f-_,e[10]=1-u-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x4bac52(e,t,i,n,r,o,a){var s=1/(i-t),l=1/(r-n),u=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(i+t)*s,e[9]=(r+n)*l,e[10]=(a+o)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*u,e[15]=0,e}function _0x515a4c(e,t,i,n,r){var o,a=1/Math.tan(t/2);return e[0]=a/i,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=r&&r!==1/0?(o=1/(n-r),e[10]=(r+n)*o,e[14]=2*r*n*o):(e[10]=-1,e[14]=-2*n),e}function _0x34ee10(e,t,i,n){var r=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(r+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(r-o)*u*.5,e[10]=n/(i-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*i/(i-n),e[15]=0,e}function _0x32dc5e(e,t,i,n,r,o,a){var s=1/(t-i),l=1/(n-r),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+i)*s,e[13]=(r+n)*l,e[14]=(a+o)*u,e[15]=1,e}function _0x5a5640(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p=t[0],_=t[1],m=t[2],g=n[0],x=n[1],v=n[2],y=i[0],$=i[1],b=i[2];return Math.abs(p-y)<_0xc01e75&&Math.abs(_-$)<_0xc01e75&&Math.abs(m-b)<_0xc01e75?_0x2ceaeb(e):(c=p-y,h=_-$,d=m-b,r=x*(d*=f=1/Math.hypot(c,h,d))-v*(h*=f),o=v*(c*=f)-g*d,a=g*h-x*c,(f=Math.hypot(r,o,a))?(r*=f=1/f,o*=f,a*=f):(r=0,o=0,a=0),s=h*a-d*o,l=d*r-c*a,u=c*o-h*r,(f=Math.hypot(s,l,u))?(s*=f=1/f,l*=f,u*=f):(s=0,l=0,u=0),e[0]=r,e[1]=s,e[2]=c,e[3]=0,e[4]=o,e[5]=l,e[6]=h,e[7]=0,e[8]=a,e[9]=u,e[10]=d,e[11]=0,e[12]=-(r*p+o*_+a*m),e[13]=-(s*p+l*_+u*m),e[14]=-(c*p+h*_+d*m),e[15]=1,e)}function _0x4d394c(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=n[0],l=n[1],u=n[2],c=r-i[0],h=o-i[1],d=a-i[2],f=c*c+h*h+d*d;f>0&&(c*=f=1/Math.sqrt(f),h*=f,d*=f);var p=l*d-u*h,_=u*c-s*d,m=s*h-l*c;return(f=p*p+_*_+m*m)>0&&(p*=f=1/Math.sqrt(f),_*=f,m*=f),e[0]=p,e[1]=_,e[2]=m,e[3]=0,e[4]=h*m-d*_,e[5]=d*p-c*m,e[6]=c*_-h*p,e[7]=0,e[8]=c,e[9]=h,e[10]=d,e[11]=0,e[12]=r,e[13]=o,e[14]=a,e[15]=1,e}function _0x5a0ac9(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function _0x340ab8(e){return Math.hypot(e[0],e[1],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function _0x284997(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e[8]=t[8]+i[8],e[9]=t[9]+i[9],e[10]=t[10]+i[10],e[11]=t[11]+i[11],e[12]=t[12]+i[12],e[13]=t[13]+i[13],e[14]=t[14]+i[14],e[15]=t[15]+i[15],e}function _0x16b534(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e[6]=t[6]-i[6],e[7]=t[7]-i[7],e[8]=t[8]-i[8],e[9]=t[9]-i[9],e[10]=t[10]-i[10],e[11]=t[11]-i[11],e[12]=t[12]-i[12],e[13]=t[13]-i[13],e[14]=t[14]-i[14],e[15]=t[15]-i[15],e}function _0x4b0b06(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12]*i,e[13]=t[13]*i,e[14]=t[14]*i,e[15]=t[15]*i,e}function _0xe00363(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e[6]=t[6]+i[6]*n,e[7]=t[7]+i[7]*n,e[8]=t[8]+i[8]*n,e[9]=t[9]+i[9]*n,e[10]=t[10]+i[10]*n,e[11]=t[11]+i[11]*n,e[12]=t[12]+i[12]*n,e[13]=t[13]+i[13]*n,e[14]=t[14]+i[14]*n,e[15]=t[15]+i[15]*n,e}function _0x1d7596(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function _0x1ade5e(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],p=e[12],_=e[13],m=e[14],g=e[15],x=t[0],v=t[1],y=t[2],$=t[3],b=t[4],T=t[5],C=t[6],S=t[7],w=t[8],E=t[9],P=t[10],A=t[11],L=t[12],M=t[13],R=t[14],O=t[15];return Math.abs(i-x)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(n-v)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(r-y)<=_0xc01e75*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(o-$)<=_0xc01e75*Math.max(1,Math.abs(o),Math.abs($))&&Math.abs(a-b)<=_0xc01e75*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(s-T)<=_0xc01e75*Math.max(1,Math.abs(s),Math.abs(T))&&Math.abs(l-C)<=_0xc01e75*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(u-S)<=_0xc01e75*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-w)<=_0xc01e75*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(h-E)<=_0xc01e75*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-P)<=_0xc01e75*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(f-A)<=_0xc01e75*Math.max(1,Math.abs(f),Math.abs(A))&&Math.abs(p-L)<=_0xc01e75*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(_-M)<=_0xc01e75*Math.max(1,Math.abs(_),Math.abs(M))&&Math.abs(m-R)<=_0xc01e75*Math.max(1,Math.abs(m),Math.abs(R))&&Math.abs(g-O)<=_0xc01e75*Math.max(1,Math.abs(g),Math.abs(O))}var _0x33b24d=_0x540a14,_0x486fa7=_0x16b534,_0x592e28=Object.freeze({create:_0x4da59c,clone:_0x332a4e,copy:_0x5e11ca,fromValues:_0x3bd695,set:_0x1b6182,identity:_0x2ceaeb,transpose:_0x2fb1ff,invert:_0x159c68,adjoint:_0x2ca8b1,determinant:_0x216639,multiply:_0x540a14,translate:_0x5d0268,scale:_0x31b0bd,rotate:_0x4fb60b,rotateX:_0x47d9ba,rotateY:_0x463ddd,rotateZ:_0x582c56,fromTranslation:_0x4408fe,fromScaling:_0x487d11,fromRotation:_0x28da76,fromXRotation:_0x5142a4,fromYRotation:_0x315d9a,fromZRotation:_0x5e87f3,fromRotationTranslation:_0xa0dbb0,fromQuat2:_0x302a4a,getTranslation:_0x87163b,getScaling:_0x51d585,getRotation:_0x2a7876,fromRotationTranslationScale:_0x448f6d,fromRotationTranslationScaleOrigin:_0x45b3d6,fromQuat:_0x2bdeaa,frustum:_0x4bac52,perspective:_0x515a4c,perspectiveFromFieldOfView:_0x34ee10,ortho:_0x32dc5e,lookAt:_0x5a5640,targetTo:_0x4d394c,str:_0x5a0ac9,frob:_0x340ab8,add:_0x284997,subtract:_0x16b534,multiplyScalar:_0x4b0b06,multiplyScalarAndAdd:_0xe00363,exactEquals:_0x1d7596,equals:_0x1ade5e,mul:_0x33b24d,sub:_0x486fa7});function _0x39d517(){var e=new _0x231ae3(3);return _0x231ae3!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function _0x590f48(e){var t=new _0x231ae3(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function _0x5e4419(e){var t=e[0],i=e[1],n=e[2];return Math.hypot(t,i,n)}function _0x49b8be(e,t,i){var n=new _0x231ae3(3);return n[0]=e,n[1]=t,n[2]=i,n}function _0x46ccc8(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function _0x2e712d(e,t,i,n){return e[0]=t,e[1]=i,e[2]=n,e}function _0x4005ca(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e}function _0x441e32(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e}function _0x291ad7(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e}function _0x388d73(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e}function _0x34fbd1(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function _0x161c47(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function _0x42bbdd(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e}function _0x1a8421(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e}function _0x4f19b6(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function _0x4877a0(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function _0x3b47c0(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e}function _0x232196(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return Math.hypot(i,n,r)}function _0x842d28(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return i*i+n*n+r*r}function _0x3c9e0b(e){var t=e[0],i=e[1],n=e[2];return t*t+i*i+n*n}function _0x17a9a3(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function _0x396f1a(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function _0x28db52(e,t){var i=t[0],n=t[1],r=t[2],o=i*i+n*n+r*r;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function _0x214b68(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function _0x42e946(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[0],s=i[1],l=i[2];return e[0]=r*l-o*s,e[1]=o*a-n*l,e[2]=n*s-r*a,e}function _0x323c4e(e,t,i,n){var r=t[0],o=t[1],a=t[2];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e[2]=a+n*(i[2]-a),e}function _0x4f1835(e,t,i,n,r,o){var a=o*o,s=a*(2*o-3)+1,l=a*(o-2)+o,u=a*(o-1),c=a*(3-2*o);return e[0]=t[0]*s+i[0]*l+n[0]*u+r[0]*c,e[1]=t[1]*s+i[1]*l+n[1]*u+r[1]*c,e[2]=t[2]*s+i[2]*l+n[2]*u+r[2]*c,e}function _0x32a4ff(e,t,i,n,r,o){var a=1-o,s=a*a,l=o*o,u=s*a,c=3*o*s,h=3*l*a,d=l*o;return e[0]=t[0]*u+i[0]*c+n[0]*h+r[0]*d,e[1]=t[1]*u+i[1]*c+n[1]*h+r[1]*d,e[2]=t[2]*u+i[2]*c+n[2]*h+r[2]*d,e}function _0x399383(e,t){t=t||1;var i=2*_0x4b99e7()*Math.PI,n=2*_0x4b99e7()-1,r=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(i)*r,e[1]=Math.sin(i)*r,e[2]=n*t,e}function _0x20855d(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,e[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,e[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,e[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,e}function _0x21ed6e(e,t,i){var n=t[0],r=t[1],o=t[2];return e[0]=n*i[0]+r*i[3]+o*i[6],e[1]=n*i[1]+r*i[4]+o*i[7],e[2]=n*i[2]+r*i[5]+o*i[8],e}function _0x656610(e,t,i){var n=i[0],r=i[1],o=i[2],a=i[3],s=t[0],l=t[1],u=t[2],c=r*u-o*l,h=o*s-n*u,d=n*l-r*s,f=r*d-o*h,p=o*c-n*d,_=n*h-r*c,m=2*a;return c*=m,h*=m,d*=m,f*=2,p*=2,_*=2,e[0]=s+c+f,e[1]=l+h+p,e[2]=u+d+_,e}function _0x7c45d9(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[0],o[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),o[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x5a1b85(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),o[1]=r[1],o[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x46dfd3(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),o[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),o[2]=r[2],e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x1881ac(e,t){var i=_0x49b8be(e[0],e[1],e[2]),n=_0x49b8be(t[0],t[1],t[2]);_0x28db52(i,i),_0x28db52(n,n);var r=_0x214b68(i,n);return r>1?0:r<-1?Math.PI:Math.acos(r)}function _0x3c943f(e){return e[0]=0,e[1]=0,e[2]=0,e}function _0x5f1128(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function _0x11dc45(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function _0x4256a9(e,t){var i=e[0],n=e[1],r=e[2],o=t[0],a=t[1],s=t[2];return Math.abs(i-o)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-a)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=_0xc01e75*Math.max(1,Math.abs(r),Math.abs(s))}var _0x179024=_0x441e32,_0x2fb97c=_0x291ad7,_0x28d740=_0x388d73,_0x4da22e=_0x232196,_0x57b33c=_0x842d28,_0x46a2ba=_0x5e4419,_0x44615c=_0x3c9e0b,_0x4a04fb=(_0x7ef683=_0x39d517(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=3),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a<s;a+=t)_0x7ef683[0]=e[a],_0x7ef683[1]=e[a+1],_0x7ef683[2]=e[a+2],r(_0x7ef683,_0x7ef683,o),e[a]=_0x7ef683[0],e[a+1]=_0x7ef683[1],e[a+2]=_0x7ef683[2];return e}),_0x5385c6=Object.freeze({create:_0x39d517,clone:_0x590f48,length:_0x5e4419,fromValues:_0x49b8be,copy:_0x46ccc8,set:_0x2e712d,add:_0x4005ca,subtract:_0x441e32,multiply:_0x291ad7,divide:_0x388d73,ceil:_0x34fbd1,floor:_0x161c47,min:_0x42bbdd,max:_0x1a8421,round:_0x4f19b6,scale:_0x4877a0,scaleAndAdd:_0x3b47c0,distance:_0x232196,squaredDistance:_0x842d28,squaredLength:_0x3c9e0b,negate:_0x17a9a3,inverse:_0x396f1a,normalize:_0x28db52,dot:_0x214b68,cross:_0x42e946,lerp:_0x323c4e,hermite:_0x4f1835,bezier:_0x32a4ff,random:_0x399383,transformMat4:_0x20855d,transformMat3:_0x21ed6e,transformQuat:_0x656610,rotateX:_0x7c45d9,rotateY:_0x5a1b85,rotateZ:_0x46dfd3,angle:_0x1881ac,zero:_0x3c943f,str:_0x5f1128,exactEquals:_0x11dc45,equals:_0x4256a9,sub:_0x179024,mul:_0x2fb97c,div:_0x28d740,dist:_0x4da22e,sqrDist:_0x57b33c,len:_0x46a2ba,sqrLen:_0x44615c,forEach:_0x4a04fb}),_0x7ef683;function _0x3d5a5b(){var e=new _0x231ae3(4);return _0x231ae3!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function _0x42999f(e){var t=new _0x231ae3(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function _0x4eeea1(e,t,i,n){var r=new _0x231ae3(4);return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function _0x15e2f5(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function _0x45f7a2(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e}function _0x2946a7(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e}function _0xcc6ccf(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e}function _0x337023(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e[3]=t[3]*i[3],e}function _0x5497bb(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e[3]=t[3]/i[3],e}function _0x25400c(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e}function _0x8ff060(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e}function _0x47c197(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e[3]=Math.min(t[3],i[3]),e}function _0x4235ff(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e[3]=Math.max(t[3],i[3]),e}function _0x4a80a5(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function _0x37039b(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e}function _0x2ef313(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e}function _0x44f4c4(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2],o=t[3]-e[3];return Math.hypot(i,n,r,o)}function _0x3a7c24(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2],o=t[3]-e[3];return i*i+n*n+r*r+o*o}function _0x355918(e){var t=e[0],i=e[1],n=e[2],r=e[3];return Math.hypot(t,i,n,r)}function _0x2d8fcd(e){var t=e[0],i=e[1],n=e[2],r=e[3];return t*t+i*i+n*n+r*r}function _0x4fcb7e(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}function _0x19d945(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}function _0x5381ae(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*i+n*n+r*r+o*o;return a>0&&(a=1/Math.sqrt(a)),e[0]=i*a,e[1]=n*a,e[2]=r*a,e[3]=o*a,e}function _0x2d53e7(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function _0x42ab80(e,t,i,n){var r=i[0]*n[1]-i[1]*n[0],o=i[0]*n[2]-i[2]*n[0],a=i[0]*n[3]-i[3]*n[0],s=i[1]*n[2]-i[2]*n[1],l=i[1]*n[3]-i[3]*n[1],u=i[2]*n[3]-i[3]*n[2],c=t[0],h=t[1],d=t[2],f=t[3];return e[0]=h*u-d*l+f*s,e[1]=-c*u+d*a-f*o,e[2]=c*l-h*a+f*r,e[3]=-c*s+h*o-d*r,e}function _0x456bb0(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=t[3];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e[2]=a+n*(i[2]-a),e[3]=s+n*(i[3]-s),e}function _0x284041(e,t){var i,n,r,o,a,s;t=t||1;do{a=(i=2*_0x4b99e7()-1)*i+(n=2*_0x4b99e7()-1)*n}while(a>=1);do{s=(r=2*_0x4b99e7()-1)*r+(o=2*_0x4b99e7()-1)*o}while(s>=1);var l=Math.sqrt((1-a)/s);return e[0]=t*i,e[1]=t*n,e[2]=t*r*l,e[3]=t*o*l,e}function _0x4b7997(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3];return e[0]=i[0]*n+i[4]*r+i[8]*o+i[12]*a,e[1]=i[1]*n+i[5]*r+i[9]*o+i[13]*a,e[2]=i[2]*n+i[6]*r+i[10]*o+i[14]*a,e[3]=i[3]*n+i[7]*r+i[11]*o+i[15]*a,e}function _0x44b8a6(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[0],s=i[1],l=i[2],u=i[3],c=u*n+s*o-l*r,h=u*r+l*n-a*o,d=u*o+a*r-s*n,f=-a*n-s*r-l*o;return e[0]=c*u+f*-a+h*-l-d*-s,e[1]=h*u+f*-s+d*-a-c*-l,e[2]=d*u+f*-l+c*-s-h*-a,e[3]=t[3],e}function _0x5a7692(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function _0x2363f5(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function _0x506f0e(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function _0x176d77(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t[2],u=t[3];return Math.abs(i-a)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-s)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-l)<=_0xc01e75*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-u)<=_0xc01e75*Math.max(1,Math.abs(o),Math.abs(u))}var _0x443b34=_0xcc6ccf,_0x4be58e=_0x337023,_0x4b58aa=_0x5497bb,_0x2ee395=_0x44f4c4,_0x36bf44=_0x3a7c24,_0xa3c345=_0x355918,_0x2716ff=_0x2d8fcd,_0x47f13a=(_0x3e6bcf=_0x3d5a5b(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=4),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a<s;a+=t)_0x3e6bcf[0]=e[a],_0x3e6bcf[1]=e[a+1],_0x3e6bcf[2]=e[a+2],_0x3e6bcf[3]=e[a+3],r(_0x3e6bcf,_0x3e6bcf,o),e[a]=_0x3e6bcf[0],e[a+1]=_0x3e6bcf[1],e[a+2]=_0x3e6bcf[2],e[a+3]=_0x3e6bcf[3];return e}),_0x493cd7=Object.freeze({create:_0x3d5a5b,clone:_0x42999f,fromValues:_0x4eeea1,copy:_0x15e2f5,set:_0x45f7a2,add:_0x2946a7,subtract:_0xcc6ccf,multiply:_0x337023,divide:_0x5497bb,ceil:_0x25400c,floor:_0x8ff060,min:_0x47c197,max:_0x4235ff,round:_0x4a80a5,scale:_0x37039b,scaleAndAdd:_0x2ef313,distance:_0x44f4c4,squaredDistance:_0x3a7c24,length:_0x355918,squaredLength:_0x2d8fcd,negate:_0x4fcb7e,inverse:_0x19d945,normalize:_0x5381ae,dot:_0x2d53e7,cross:_0x42ab80,lerp:_0x456bb0,random:_0x284041,transformMat4:_0x4b7997,transformQuat:_0x44b8a6,zero:_0x5a7692,str:_0x2363f5,exactEquals:_0x506f0e,equals:_0x176d77,sub:_0x443b34,mul:_0x4be58e,div:_0x4b58aa,dist:_0x2ee395,sqrDist:_0x36bf44,len:_0xa3c345,sqrLen:_0x2716ff,forEach:_0x47f13a}),_0x3e6bcf;function _0x1aac4e(){var e=new _0x231ae3(4);return _0x231ae3!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function _0x1f6702(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function _0x379e00(e,t,i){i*=.5;var n=Math.sin(i);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(i),e}function _0x5175c0(e,t){var i=2*Math.acos(t[3]),n=Math.sin(i/2);return n>_0xc01e75?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),i}function _0x3df545(e,t){var i=_0x5dabf3(e,t);return Math.acos(2*i*i-1)}function _0x21b5ba(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*c+a*s+r*u-o*l,e[1]=r*c+a*l+o*s-n*u,e[2]=o*c+a*u+n*l-r*s,e[3]=a*c-n*s-r*l-o*u,e}function _0xb47592(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+a*s,e[1]=r*l+o*s,e[2]=o*l-r*s,e[3]=a*l-n*s,e}function _0x243781(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l-o*s,e[1]=r*l+a*s,e[2]=o*l+n*s,e[3]=a*l-r*s,e}function _0x3f16d1(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+r*s,e[1]=r*l-n*s,e[2]=o*l+a*s,e[3]=a*l-o*s,e}function _0x1a9dd5(e,t){var i=t[0],n=t[1],r=t[2];return e[0]=i,e[1]=n,e[2]=r,e[3]=Math.sqrt(Math.abs(1-i*i-n*n-r*r)),e}function _0x2935ba(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=Math.sqrt(i*i+n*n+r*r),s=Math.exp(o),l=a>0?s*Math.sin(a)/a:0;return e[0]=i*l,e[1]=n*l,e[2]=r*l,e[3]=s*Math.cos(a),e}function _0x4d94f8(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=Math.sqrt(i*i+n*n+r*r),s=a>0?Math.atan2(a,o)/a:0;return e[0]=i*s,e[1]=n*s,e[2]=r*s,e[3]=.5*Math.log(i*i+n*n+r*r+o*o),e}function _0x4dbcf0(e,t,i){return _0x4d94f8(e,t),_0x564690(e,e,i),_0x2935ba(e,e),e}function _0x266c71(e,t,i,n){var r,o,a,s,l,u=t[0],c=t[1],h=t[2],d=t[3],f=i[0],p=i[1],_=i[2],m=i[3];return(o=u*f+c*p+h*_+d*m)<0&&(o=-o,f=-f,p=-p,_=-_,m=-m),1-o>_0xc01e75?(r=Math.acos(o),a=Math.sin(r),s=Math.sin((1-n)*r)/a,l=Math.sin(n*r)/a):(s=1-n,l=n),e[0]=s*u+l*f,e[1]=s*c+l*p,e[2]=s*h+l*_,e[3]=s*d+l*m,e}function _0x21cce1(e){var t=_0x4b99e7(),i=_0x4b99e7(),n=_0x4b99e7(),r=Math.sqrt(1-t),o=Math.sqrt(t);return e[0]=r*Math.sin(2*Math.PI*i),e[1]=r*Math.cos(2*Math.PI*i),e[2]=o*Math.sin(2*Math.PI*n),e[3]=o*Math.cos(2*Math.PI*n),e}function _0x3b9887(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*i+n*n+r*r+o*o,s=a?1/a:0;return e[0]=-i*s,e[1]=-n*s,e[2]=-r*s,e[3]=o*s,e}function _0x36a101(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function _0x1adc6b(e,t){var i,n=t[0]+t[4]+t[8];if(n>0)i=Math.sqrt(n+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{var r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*a+a]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+a]-t[3*a+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[a]=(t[3*a+r]+t[3*r+a])*i}return e}function _0x44ac59(e,t,i,n){var r=.5*Math.PI/180;t*=r,i*=r,n*=r;var o=Math.sin(t),a=Math.cos(t),s=Math.sin(i),l=Math.cos(i),u=Math.sin(n),c=Math.cos(n);return e[0]=o*l*c-a*s*u,e[1]=a*s*c+o*l*u,e[2]=a*l*u-o*s*c,e[3]=a*l*c+o*s*u,e}function _0x47e77c(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var _0x4581ef=_0x42999f,_0x415651=_0x4eeea1,_0x4f9cee=_0x15e2f5,_0x49f4d2=_0x45f7a2,_0xf10fb0=_0x2946a7,_0x35a4d6=_0x21b5ba,_0x564690=_0x37039b,_0x5dabf3=_0x2d53e7,_0x24ed8b=_0x456bb0,_0x51fc74=_0x355918,_0x51f3fe=_0x51fc74,_0x3d25e0=_0x2d8fcd,_0x4494e9=_0x3d25e0,_0x2cf661=_0x5381ae,_0x12a023=_0x506f0e,_0x18337e=_0x176d77,_0x46e84e=(_0x44cfc1=_0x39d517(),_0x4a0189=_0x49b8be(1,0,0),_0x18689b=_0x49b8be(0,1,0),function(e,t,i){var n=_0x214b68(t,i);return n<-.999999?(_0x42e946(_0x44cfc1,_0x4a0189,t),_0x46a2ba(_0x44cfc1)<1e-6&&_0x42e946(_0x44cfc1,_0x18689b,t),_0x28db52(_0x44cfc1,_0x44cfc1),_0x379e00(e,_0x44cfc1,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(_0x42e946(_0x44cfc1,t,i),e[0]=_0x44cfc1[0],e[1]=_0x44cfc1[1],e[2]=_0x44cfc1[2],e[3]=1+n,_0x2cf661(e,e))}),_0x58e3e4=(_0x4268f2=_0x1aac4e(),_0x56500c=_0x1aac4e(),function(e,t,i,n,r,o){return _0x266c71(_0x4268f2,t,r,o),_0x266c71(_0x56500c,i,n,o),_0x266c71(e,_0x4268f2,_0x56500c,2*o*(1-o)),e}),_0x2d0d9b=(_0x490402=_0x3c9785(),function(e,t,i,n){return _0x490402[0]=i[0],_0x490402[3]=i[1],_0x490402[6]=i[2],_0x490402[1]=n[0],_0x490402[4]=n[1],_0x490402[7]=n[2],_0x490402[2]=-t[0],_0x490402[5]=-t[1],_0x490402[8]=-t[2],_0x2cf661(e,_0x1adc6b(e,_0x490402))}),_0x1e55e0=Object.freeze({create:_0x1aac4e,identity:_0x1f6702,setAxisAngle:_0x379e00,getAxisAngle:_0x5175c0,getAngle:_0x3df545,multiply:_0x21b5ba,rotateX:_0xb47592,rotateY:_0x243781,rotateZ:_0x3f16d1,calculateW:_0x1a9dd5,exp:_0x2935ba,ln:_0x4d94f8,pow:_0x4dbcf0,slerp:_0x266c71,random:_0x21cce1,invert:_0x3b9887,conjugate:_0x36a101,fromMat3:_0x1adc6b,fromEuler:_0x44ac59,str:_0x47e77c,clone:_0x4581ef,fromValues:_0x415651,copy:_0x4f9cee,set:_0x49f4d2,add:_0xf10fb0,mul:_0x35a4d6,scale:_0x564690,dot:_0x5dabf3,lerp:_0x24ed8b,length:_0x51fc74,len:_0x51f3fe,squaredLength:_0x3d25e0,sqrLen:_0x4494e9,normalize:_0x2cf661,exactEquals:_0x12a023,equals:_0x18337e,rotationTo:_0x46e84e,sqlerp:_0x58e3e4,setAxes:_0x2d0d9b}),_0x490402,_0x4268f2,_0x56500c,_0x44cfc1,_0x4a0189,_0x18689b;function _0x47dbf3(){var e=new _0x231ae3(8);return _0x231ae3!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0),e[3]=1,e}function _0x4cfd86(e){var t=new _0x231ae3(8);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function _0x2fccb4(e,t,i,n,r,o,a,s){var l=new _0x231ae3(8);return l[0]=e,l[1]=t,l[2]=i,l[3]=n,l[4]=r,l[5]=o,l[6]=a,l[7]=s,l}function _0x2984ed(e,t,i,n,r,o,a){var s=new _0x231ae3(8);s[0]=e,s[1]=t,s[2]=i,s[3]=n;var l=.5*r,u=.5*o,c=.5*a;return s[4]=l*n+u*i-c*t,s[5]=u*n+c*e-l*i,s[6]=c*n+l*t-u*e,s[7]=-l*e-u*t-c*i,s}function _0xbaf5f4(e,t,i){var n=.5*i[0],r=.5*i[1],o=.5*i[2],a=t[0],s=t[1],l=t[2],u=t[3];return e[0]=a,e[1]=s,e[2]=l,e[3]=u,e[4]=n*u+r*l-o*s,e[5]=r*u+o*a-n*l,e[6]=o*u+n*s-r*a,e[7]=-n*a-r*s-o*l,e}function _0xb9c811(e,t){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=.5*t[0],e[5]=.5*t[1],e[6]=.5*t[2],e[7]=0,e}function _0x3207da(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function _0x45533e(e,t){var i=_0x1aac4e();_0x2a7876(i,t);var n=new _0x231ae3(3);return _0x87163b(n,t),_0xbaf5f4(e,i,n),e}function _0x2661aa(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e}function _0x3cc4e8(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function _0x5998b5(e,t,i,n,r,o,a,s,l){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e}var _0x414822=_0x4f9cee;function _0x477b0d(e,t){return e[0]=t[4],e[1]=t[5],e[2]=t[6],e[3]=t[7],e}var _0x29b847=_0x4f9cee;function _0x2ce5d1(e,t){return e[4]=t[0],e[5]=t[1],e[6]=t[2],e[7]=t[3],e}function _0x30014f(e,t){var i=t[4],n=t[5],r=t[6],o=t[7],a=-t[0],s=-t[1],l=-t[2],u=t[3];return e[0]=2*(i*u+o*a+n*l-r*s),e[1]=2*(n*u+o*s+r*a-i*l),e[2]=2*(r*u+o*l+i*s-n*a),e}function _0x503c8f(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=.5*i[0],l=.5*i[1],u=.5*i[2],c=t[4],h=t[5],d=t[6],f=t[7];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=a*s+r*u-o*l+c,e[5]=a*l+o*s-n*u+h,e[6]=a*u+n*l-r*s+d,e[7]=-n*s-r*l-o*u+f,e}function _0x52910b(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0xb47592(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x22c6bd(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x243781(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x8a9558(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x3f16d1(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x27b98c(e,t,i){var n=i[0],r=i[1],o=i[2],a=i[3],s=t[0],l=t[1],u=t[2],c=t[3];return e[0]=s*a+c*n+l*o-u*r,e[1]=l*a+c*r+u*n-s*o,e[2]=u*a+c*o+s*r-l*n,e[3]=c*a-s*n-l*r-u*o,s=t[4],l=t[5],u=t[6],c=t[7],e[4]=s*a+c*n+l*o-u*r,e[5]=l*a+c*r+u*n-s*o,e[6]=u*a+c*o+s*r-l*n,e[7]=c*a-s*n-l*r-u*o,e}function _0x1cbd47(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*c+a*s+r*u-o*l,e[1]=r*c+a*l+o*s-n*u,e[2]=o*c+a*u+n*l-r*s,e[3]=a*c-n*s-r*l-o*u,s=i[4],l=i[5],u=i[6],c=i[7],e[4]=n*c+a*s+r*u-o*l,e[5]=r*c+a*l+o*s-n*u,e[6]=o*c+a*u+n*l-r*s,e[7]=a*c-n*s-r*l-o*u,e}function _0x15954a(e,t,i,n){if(Math.abs(n)<_0xc01e75)return _0x2661aa(e,t);var r=Math.hypot(i[0],i[1],i[2]);n*=.5;var o=Math.sin(n),a=o*i[0]/r,s=o*i[1]/r,l=o*i[2]/r,u=Math.cos(n),c=t[0],h=t[1],d=t[2],f=t[3];e[0]=c*u+f*a+h*l-d*s,e[1]=h*u+f*s+d*a-c*l,e[2]=d*u+f*l+c*s-h*a,e[3]=f*u-c*a-h*s-d*l;var p=t[4],_=t[5],m=t[6],g=t[7];return e[4]=p*u+g*a+_*l-m*s,e[5]=_*u+g*s+m*a-p*l,e[6]=m*u+g*l+p*s-_*a,e[7]=g*u-p*a-_*s-m*l,e}function _0x400ec5(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e}function _0x31251d(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[4],l=i[5],u=i[6],c=i[7],h=t[4],d=t[5],f=t[6],p=t[7],_=i[0],m=i[1],g=i[2],x=i[3];return e[0]=n*x+a*_+r*g-o*m,e[1]=r*x+a*m+o*_-n*g,e[2]=o*x+a*g+n*m-r*_,e[3]=a*x-n*_-r*m-o*g,e[4]=n*c+a*s+r*u-o*l+h*x+p*_+d*g-f*m,e[5]=r*c+a*l+o*s-n*u+d*x+p*m+f*_-h*g,e[6]=o*c+a*u+n*l-r*s+f*x+p*g+h*m-d*_,e[7]=a*c-n*s-r*l-o*u+p*x-h*_-d*m-f*g,e}var _0x21c8b9=_0x31251d;function _0x4ed1e8(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e}var _0x525c49=_0x5dabf3;function _0x37be4f(e,t,i,n){var r=1-n;return _0x525c49(t,i)<0&&(n=-n),e[0]=t[0]*r+i[0]*n,e[1]=t[1]*r+i[1]*n,e[2]=t[2]*r+i[2]*n,e[3]=t[3]*r+i[3]*n,e[4]=t[4]*r+i[4]*n,e[5]=t[5]*r+i[5]*n,e[6]=t[6]*r+i[6]*n,e[7]=t[7]*r+i[7]*n,e}function _0x34488a(e,t){var i=_0x24391b(t);return e[0]=-t[0]/i,e[1]=-t[1]/i,e[2]=-t[2]/i,e[3]=t[3]/i,e[4]=-t[4]/i,e[5]=-t[5]/i,e[6]=-t[6]/i,e[7]=t[7]/i,e}function _0x39cd01(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=t[7],e}var _0x40f711=_0x51fc74,_0xf76045=_0x40f711,_0x24391b=_0x3d25e0,_0x29c6ff=_0x24391b;function _0x3b5ac5(e,t){var i=_0x24391b(t);if(i>0){i=Math.sqrt(i);var n=t[0]/i,r=t[1]/i,o=t[2]/i,a=t[3]/i,s=t[4],l=t[5],u=t[6],c=t[7],h=n*s+r*l+o*u+a*c;e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=(s-n*h)/i,e[5]=(l-r*h)/i,e[6]=(u-o*h)/i,e[7]=(c-a*h)/i}return e}function _0x49d4f7(e){return"quat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+")"}function _0x503fdf(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]}function _0x517c6f(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=t[0],h=t[1],d=t[2],f=t[3],p=t[4],_=t[5],m=t[6],g=t[7];return Math.abs(i-c)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(n-h)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-d)<=_0xc01e75*Math.max(1,Math.abs(r),Math.abs(d))&&Math.abs(o-f)<=_0xc01e75*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(a-p)<=_0xc01e75*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(s-_)<=_0xc01e75*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(l-m)<=_0xc01e75*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(u-g)<=_0xc01e75*Math.max(1,Math.abs(u),Math.abs(g))}var _0x2d4367=Object.freeze({create:_0x47dbf3,clone:_0x4cfd86,fromValues:_0x2fccb4,fromRotationTranslationValues:_0x2984ed,fromRotationTranslation:_0xbaf5f4,fromTranslation:_0xb9c811,fromRotation:_0x3207da,fromMat4:_0x45533e,copy:_0x2661aa,identity:_0x3cc4e8,set:_0x5998b5,getReal:_0x414822,getDual:_0x477b0d,setReal:_0x29b847,setDual:_0x2ce5d1,getTranslation:_0x30014f,translate:_0x503c8f,rotateX:_0x52910b,rotateY:_0x22c6bd,rotateZ:_0x8a9558,rotateByQuatAppend:_0x27b98c,rotateByQuatPrepend:_0x1cbd47,rotateAroundAxis:_0x15954a,add:_0x400ec5,multiply:_0x31251d,mul:_0x21c8b9,scale:_0x4ed1e8,dot:_0x525c49,lerp:_0x37be4f,invert:_0x34488a,conjugate:_0x39cd01,length:_0x40f711,len:_0xf76045,squaredLength:_0x24391b,sqrLen:_0x29c6ff,normalize:_0x3b5ac5,str:_0x49d4f7,exactEquals:_0x503fdf,equals:_0x517c6f});function _0x3c677b(){var e=new _0x231ae3(2);return _0x231ae3!=Float32Array&&(e[0]=0,e[1]=0),e}function _0x103ffb(e){var t=new _0x231ae3(2);return t[0]=e[0],t[1]=e[1],t}function _0x57d0fc(e,t){var i=new _0x231ae3(2);return i[0]=e,i[1]=t,i}function _0x2cbcaf(e,t){return e[0]=t[0],e[1]=t[1],e}function _0xaa7ac4(e,t,i){return e[0]=t,e[1]=i,e}function _0x23052f(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e}function _0x1539d9(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e}function _0x374eda(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e}function _0x243af4(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e}function _0x39f00c(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function _0x3aca14(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function _0x587a65(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e}function _0xf96676(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e}function _0x758761(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function _0x41b222(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e}function _0x36a772(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e}function _0x92eb88(e,t){var i=t[0]-e[0],n=t[1]-e[1];return Math.hypot(i,n)}function _0x2f7460(e,t){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function _0x14b164(e){var t=e[0],i=e[1];return Math.hypot(t,i)}function _0x5a19ca(e){var t=e[0],i=e[1];return t*t+i*i}function _0x47a669(e,t){return e[0]=-t[0],e[1]=-t[1],e}function _0xcc4405(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function _0x391fd9(e,t){var i=t[0],n=t[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r)),e[0]=t[0]*r,e[1]=t[1]*r,e}function _0xb99314(e,t){return e[0]*t[0]+e[1]*t[1]}function _0x28a5e8(e,t,i){var n=t[0]*i[1]-t[1]*i[0];return e[0]=e[1]=0,e[2]=n,e}function _0x3458b7(e,t,i,n){var r=t[0],o=t[1];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e}function _0x20998b(e,t){t=t||1;var i=2*_0x4b99e7()*Math.PI;return e[0]=Math.cos(i)*t,e[1]=Math.sin(i)*t,e}function _0x5e7a35(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[2]*r,e[1]=i[1]*n+i[3]*r,e}function _0x4e6f5f(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[2]*r+i[4],e[1]=i[1]*n+i[3]*r+i[5],e}function _0x500d97(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[3]*r+i[6],e[1]=i[1]*n+i[4]*r+i[7],e}function _0x5cfa72(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[4]*r+i[12],e[1]=i[1]*n+i[5]*r+i[13],e}function _0x5c4fcf(e,t,i,n){var r=t[0]-i[0],o=t[1]-i[1],a=Math.sin(n),s=Math.cos(n);return e[0]=r*s-o*a+i[0],e[1]=r*a+o*s+i[1],e}function _0x3d3763(e,t){var i=e[0],n=e[1],r=t[0],o=t[1],a=i*i+n*n;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var l=(i*r+n*o)*a*s;return l>1?0:l<-1?Math.PI:Math.acos(l)}function _0x354f0f(e){return e[0]=0,e[1]=0,e}function _0x12425a(e){return"vec2("+e[0]+", "+e[1]+")"}function _0x244307(e,t){return e[0]===t[0]&&e[1]===t[1]}function _0x215e50(e,t){var i=e[0],n=e[1],r=t[0],o=t[1];return Math.abs(i-r)<=_0xc01e75*Math.max(1,Math.abs(i),Math.abs(r))&&Math.abs(n-o)<=_0xc01e75*Math.max(1,Math.abs(n),Math.abs(o))}var _0x477058=_0x14b164,_0x1135f4=_0x1539d9,_0xaa8548=_0x374eda,_0x558244=_0x243af4,_0x1d12ff=_0x92eb88,_0x3e0d72=_0x2f7460,_0x1b1a4b=_0x5a19ca,_0x293cda=(_0x2f261e=_0x3c677b(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=2),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a<s;a+=t)_0x2f261e[0]=e[a],_0x2f261e[1]=e[a+1],r(_0x2f261e,_0x2f261e,o),e[a]=_0x2f261e[0],e[a+1]=_0x2f261e[1];return e}),_0x5ae15c=Object.freeze({create:_0x3c677b,clone:_0x103ffb,fromValues:_0x57d0fc,copy:_0x2cbcaf,set:_0xaa7ac4,add:_0x23052f,subtract:_0x1539d9,multiply:_0x374eda,divide:_0x243af4,ceil:_0x39f00c,floor:_0x3aca14,min:_0x587a65,max:_0xf96676,round:_0x758761,scale:_0x41b222,scaleAndAdd:_0x36a772,distance:_0x92eb88,squaredDistance:_0x2f7460,length:_0x14b164,squaredLength:_0x5a19ca,negate:_0x47a669,inverse:_0xcc4405,normalize:_0x391fd9,dot:_0xb99314,cross:_0x28a5e8,lerp:_0x3458b7,random:_0x20998b,transformMat2:_0x5e7a35,transformMat2d:_0x4e6f5f,transformMat3:_0x500d97,transformMat4:_0x5cfa72,rotate:_0x5c4fcf,angle:_0x3d3763,zero:_0x354f0f,str:_0x12425a,exactEquals:_0x244307,equals:_0x215e50,len:_0x477058,sub:_0x1135f4,mul:_0xaa8548,div:_0x558244,dist:_0x1d12ff,sqrDist:_0x3e0d72,sqrLen:_0x1b1a4b,forEach:_0x293cda}),_0x2f261e;_0x3f85ef.glMatrix=_0x427c26,_0x3f85ef.mat2=_0x2f8264,_0x3f85ef.mat2d=_0x23de5e,_0x3f85ef.mat3=_0x3f27af,_0x3f85ef.mat4=_0x592e28,_0x3f85ef.quat=_0x1e55e0,_0x3f85ef.quat2=_0x2d4367,_0x3f85ef.vec2=_0x5ae15c,_0x3f85ef.vec3=_0x5385c6,_0x3f85ef.vec4=_0x493cd7;const _0x12eb17=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xd49c10=_0x12eb17(void 0,(function(){return _0xd49c10.toString().search("(((.+)+)+)+$").toString().constructor(_0xd49c10).search("(((.+)+)+)+$")}));function _0x39afd0(e,t,i,n,r){const o=_0x3f85ef.mat4.create();return t?(_0x3f85ef.mat4.scale(o,o,[1/r,1/r,1]),!i&&_0x3f85ef.mat4.rotateZ(o,o,n.angle)):_0x3f85ef.mat4.multiply(o,n.labelPlaneMatrix,e),o}function _0x4c903e(e,t,i,n,r){if(t){const t=_0x3f85ef.mat4.clone(e);return _0x3f85ef.mat4.scale(t,t,[r,r,1]),!i&&_0x3f85ef.mat4.rotateZ(t,t,-n.angle),t}return n.glCoordMatrix}function _0x45c927(e,t){const i=[e.x,e.y,0,1];_0x273fee(i,i,t);const n=i[3];return{point:new _0x46bdc2(i[0]/n,i[1]/n),signedDistanceFromCamera:n}}function _0x1f7a92(e,t){const i=e[0]/e[3],n=e[1]/e[3];return i>=-t[0]&&i<=t[0]&&n>=-t[1]&&n<=t[1]}function _0x49b612(e,t,i,n,r,o,a,s){const l=n?e.textSizeData:e.iconSizeData,u=_0x31524b(l,i.transform.zoom),c=[256/i.width*2+1,256/i.height*2+1],h=n?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();const d=e.lineVertexArray,f=n?e.text.placedSymbolArray:e.icon.placedSymbolArray,p=i.transform.width/i.transform.height;let _=!1;for(let n=0;n<f.length;n++){const a=f.get(n);if(a.hidden||a.writingMode===_0x38221e.vertical&&!_){_0x2f9503(a.numGlyphs,h);continue}_=!1;const m=[a.anchorX,a.anchorY,0,1];if(_0x3f85ef.vec4.transformMat4(m,m,t),!_0x1f7a92(m,c)){_0x2f9503(a.numGlyphs,h);continue}m[3];i.transform.cameraToCenterDistance;const g=1.5*_0x49494c(l,u,a),x=new _0x46bdc2(a.anchorX,a.anchorY),v=_0x45c927(x,r).point,y={},$=_0x3f6d91(a,g,!1,s,t,r,o,e.glyphOffsetArray,d,h,v,x,y,p);_=$.useVertical,($.notEnoughRoom||_||$.needsFlipping&&_0x3f6d91(a,g,!0,s,t,r,o,e.glyphOffsetArray,d,h,v,x,y,p).notEnoughRoom)&&_0x2f9503(a.numGlyphs,h)}n?e.text.dynamicLayoutVertexBuffer.copyFromArrayView(h.arrayBuffer):e.icon.dynamicLayoutVertexBuffer.copyFromArrayView(h.arrayBuffer)}function _0x3f75b6(e,t,i,n,r,o,a,s,l,u,c,h){const d=s.glyphStartIndex+s.numGlyphs,f=s.lineStartIndex,p=s.lineStartIndex+s.lineLength,_=t.getoffsetX(s.glyphStartIndex),m=t.getoffsetX(d-1),g=_0x4fc09e(e*_,i,n,r,o,a,s.segment,f,p,l,u,c,h);if(!g)return null;const x=_0x4fc09e(e*m,i,n,r,o,a,s.segment,f,p,l,u,c,h);return x?{first:g,last:x}:null}function _0x39483b(e,t,i,n){if(e===_0x38221e.horizontal){if(Math.abs(i.y-t.y)>Math.abs(i.x-t.x)*n)return{useVertical:!0}}return(e===_0x38221e.vertical?t.y<i.y:t.x>i.x)?{needsFlipping:!0}:null}function _0x3f6d91(e,t,i,n,r,o,a,s,l,u,c,h,d,f){const p=t/24,_=e.lineOffsetX*p,m=e.lineOffsetY*p;let g;if(e.numGlyphs>1){const t=e.glyphStartIndex+e.numGlyphs,r=e.lineStartIndex,u=e.lineStartIndex+e.lineLength,x=_0x3f75b6(p,s,_,m,i,c,h,e,l,o,d,!1);if(!x)return{notEnoughRoom:!0};const v=_0x45c927(x.first.point,a).point,y=_0x45c927(x.last.point,a).point;n&&!i&&_0x39483b(e.writingMode,v,y,f),g=[x.first];for(let n=e.glyphStartIndex+1;n<t-1;n++)g.push(_0x4fc09e(p*s.getoffsetX(n),_,m,i,c,h,e.segment,r,u,l,o,d,!1));g.push(x.last)}else{if(n&&!i){const t=_0x45c927(h,r).point,i=e.lineStartIndex+e.segment+1,n=new _0x46bdc2(l.getx(i),l.gety(i)),o=_0x45c927(n,r),a=o.signedDistanceFromCamera>0?o.point:_0x154b2f(h,n,t,1,r),s=_0x39483b(e.writingMode,t,a,f);if(s)return s}const t=_0x4fc09e(p*s.getoffsetX(e.glyphStartIndex),_,m,i,c,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,l,o,d,!1);if(!t)return{notEnoughRoom:!0};g=[t]}for(const e of g){_0x4cf153(u,_0x45c927(e.point,a).point,e.angle)}return{}}function _0x154b2f(e,t,i,n,r){const o=_0x45c927(e.add(e.sub(t)._unit()),r).point,a=i.sub(o);return i.add(a._mult(n/a.mag()))}function _0x4fc09e(e,t,i,n,r,o,a,s,l,u,c,h,d){const f=n?e-t:e+t;let p=f>0?1:-1,_=0;n&&(p*=-1,_=Math.PI),p<0&&(_+=Math.PI);let m=p>0?s+a:s+a+1;const g=m;let x=r,v=r,y=0,$=0;const b=Math.abs(f);for(;y+$<=b;){if(m+=p,m<s||m>=l)return null;if(v=x,x=h[m],void 0===x){const e=new _0x46bdc2(u.getx(m),u.gety(m)),t=_0x45c927(e,c);if(t.signedDistanceFromCamera>0)x=h[m]=t.point;else{const t=m-p;x=_0x154b2f(0===y?o:new _0x46bdc2(u.getx(t),u.gety(t)),e,v,b-y+1,c)}}y+=$,$=v.dist(x)}const T=(b-y)/$,C=x.sub(v),S=C.mult(T)._add(v);S._add(C._unit()._perp()._mult(i*p));return{point:S,angle:_+Math.atan2(x.y-v.y,x.x-v.x),tileDistance:d?{prevTileDistance:m-p===g?0:u.gettileUnitDistanceFromAnchor(m-p),lastSegmentViewportDistance:b-y}:null}}_0xd49c10();const _0x209fcf=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function _0x2f9503(e,t){for(let i=0;i<e;i++){const e=t.length;t.resize(e+4),t.float32.set(_0x209fcf,3*e)}}function _0x273fee(e,t,i){const n=t[0],r=t[1];return e[0]=i[0]*n+i[4]*r+i[12],e[1]=i[1]*n+i[5]*r+i[13],e[3]=i[3]*n+i[7]*r+i[15],e}var _0x49d979=(_0x508f71=!0,function(e,t){var i=_0x508f71?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x508f71=!1,i}),_0x3ea2c7=_0x49d979(void 0,(function(){return _0x3ea2c7.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ea2c7).search("(((.+)+)+)+$")})),_0x508f71;_0x3ea2c7();var _0x56c911={symbolIconUniforms:function(e,t){return{u_is_size_zoom_constant:new _0x5ec44f.Uniform1i(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new _0x5ec44f.Uniform1i(e,t.u_is_size_feature_constant),u_size_t:new _0x5ec44f.Uniform1f(e,t.u_size_t),u_size:new _0x5ec44f.Uniform1f(e,t.u_size),u_camera_to_center_distance:new _0x5ec44f.Uniform1f(e,t.u_camera_to_center_distance),u_pitch:new _0x5ec44f.Uniform1f(e,t.u_pitch),u_rotate_symbol:new _0x5ec44f.Uniform1i(e,t.u_rotate_symbol),u_aspect_ratio:new _0x5ec44f.Uniform1f(e,t.u_aspect_ratio),u_fade_change:new _0x5ec44f.Uniform1f(e,t.u_fade_change),u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_label_plane_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_label_plane_matrix),u_coord_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_coord_matrix),u_is_text:new _0x5ec44f.Uniform1f(e,t.u_is_text),u_pitch_with_map:new _0x5ec44f.Uniform1i(e,t.u_pitch_with_map),u_texsize:new _0x5ec44f.Uniform2f(e,t.u_texsize),u_texture:new _0x5ec44f.Uniform1i(e,t.u_texture)}},symbolSDFUniforms:function(e,t){return{u_is_size_zoom_constant:new _0x5ec44f.Uniform1i(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new _0x5ec44f.Uniform1i(e,t.u_is_size_feature_constant),u_size_t:new _0x5ec44f.Uniform1f(e,t.u_size_t),u_size:new _0x5ec44f.Uniform1f(e,t.u_size),u_camera_to_center_distance:new _0x5ec44f.Uniform1f(e,t.u_camera_to_center_distance),u_pitch:new _0x5ec44f.Uniform1f(e,t.u_pitch),u_rotate_symbol:new _0x5ec44f.Uniform1i(e,t.u_rotate_symbol),u_aspect_ratio:new _0x5ec44f.Uniform1f(e,t.u_aspect_ratio),u_fade_change:new _0x5ec44f.Uniform1f(e,t.u_fade_change),u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_label_plane_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_label_plane_matrix),u_coord_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_coord_matrix),u_is_text:new _0x5ec44f.Uniform1f(e,t.u_is_text),u_pitch_with_map:new _0x5ec44f.Uniform1i(e,t.u_pitch_with_map),u_texsize:new _0x5ec44f.Uniform2f(e,t.u_texsize),u_texture:new _0x5ec44f.Uniform1i(e,t.u_texture),u_gamma_scale:new _0x5ec44f.Uniform1f(e,t.u_gamma_scale),u_device_pixel_ratio:new _0x5ec44f.Uniform1f(e,t.u_device_pixel_ratio),u_is_halo:new _0x5ec44f.Uniform1f(e,t.u_is_halo)}},symbolTextAndIconUniforms:function(e,t){return{u_is_size_zoom_constant:new _0x5ec44f.Uniform1i(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new _0x5ec44f.Uniform1i(e,t.u_is_size_feature_constant),u_size_t:new _0x5ec44f.Uniform1f(e,t.u_size_t),u_size:new _0x5ec44f.Uniform1f(e,t.u_size),u_camera_to_center_distance:new _0x5ec44f.Uniform1f(e,t.u_camera_to_center_distance),u_pitch:new _0x5ec44f.Uniform1f(e,t.u_pitch),u_rotate_symbol:new _0x5ec44f.Uniform1i(e,t.u_rotate_symbol),u_aspect_ratio:new _0x5ec44f.Uniform1f(e,t.u_aspect_ratio),u_fade_change:new _0x5ec44f.Uniform1f(e,t.u_fade_change),u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_label_plane_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_label_plane_matrix),u_coord_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_coord_matrix),u_is_text:new _0x5ec44f.Uniform1f(e,t.u_is_text),u_pitch_with_map:new _0x5ec44f.Uniform1i(e,t.u_pitch_with_map),u_texsize:new _0x5ec44f.Uniform2f(e,t.u_texsize),u_texsize_icon:new _0x5ec44f.Uniform2f(e,t.u_texsize_icon),u_texture:new _0x5ec44f.Uniform1i(e,t.u_texture),u_texture_icon:new _0x5ec44f.Uniform1i(e,t.u_texture_icon),u_gamma_scale:new _0x5ec44f.Uniform1f(e,t.u_gamma_scale),u_device_pixel_ratio:new _0x5ec44f.Uniform1f(e,t.u_device_pixel_ratio),u_is_halo:new _0x5ec44f.Uniform1f(e,t.u_is_halo)}},symbolIconUniformValues:function(e,t,i,n,r,o,a,s,l,u){var c=r.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:c.width/c.height,u_fade_change:r.options.fadeDuration?r.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:u,u_texture:0}},symbolSDFUniformValues:function(e,t,i,n,r,o,a,s,l,u,c){var h=r.transform;return extend$1(_0x56c911.symbolIconUniformValues(e,t,i,n,r,o,a,s,l,u),{u_gamma_scale:n?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:1,u_is_halo:+c})},symbolTextAndIconUniformValues:function(e,t,i,n,r,o,a,s,l,u){return extend$1(_0x56c911.symbolSDFUniformValues(e,t,i,n,r,o,a,s,!0,l,!0),{u_texsize_icon:u,u_texture_icon:1})}},_0x42cdbf=new o$1o;_0x56c911.symbolIconUniformMap=function(e,t,i,n,r,o,a,s,l,u){var c={},h=r.transform;return c.u_is_size_zoom_constant=function(){return+("constant"===e||"source"===e)},c.u_is_size_feature_constant=function(){return+("constant"===e||"camera"===e)},c.u_size_t=function(){return t?t.uSizeT:0},c.u_size=function(){return t?t.uSize:0},c.u_camera_to_center_distance=function(){return h.cameraToCenterDistance},c.u_pitch=function(){return h.pitch/360*2*Math.PI},c.u_rotate_symbol=function(){return+i},c.u_aspect_ratio=function(){return h.width/h.height},c.u_fade_change=function(){return r.options.fadeDuration?r.symbolFadeChange:1},c.u_matrix=function(){return o},c.u_label_plane_matrix=function(){return a},c.u_coord_matrix=function(){return s},c.u_is_text=function(){return+l},c.u_pitch_with_map=function(){return+n},c.u_texsize=function(){return _0x42cdbf.x=u[0],_0x42cdbf.y=u[1],_0x42cdbf},c.u_texture=function(){return 0},c},_0x56c911.symbolSDFUniformMap=function(e,t,i,n,r,o,a,s,l,u,c){var h=_0x56c911.symbolIconUniformMap(e,t,i,n,r,o,a,s,l,u),d=r.transform;return h.u_gamma_scale=function(){return n?Math.cos(d._pitch)*d.cameraToCenterDistance:1},h.u_device_pixel_ratio=function(){return 1},h.u_is_halo=function(){return+c},h},_0x56c911.symbolTextAndIconUniformMap=function(e,t,i,n,r,o,a,s,l,u){var c=_0x56c911.symbolIconUniformMap(e,t,i,n,r,o,a,s,!0,l,!0);return c.u_texsize_icon=function(){return u},c.u_texture_icon=function(){return 1},c};var _0xd1c65d=_0x23d8a5(new Float32Array(16)),_0x2255bb=new Float32Array(16);function _0x50b8ab(e,t,i,n){if("translucent"===e.renderPass){var r=_0x411737.disabled,o=e.colorModeForRenderPass();i.layout.get("text-variable-anchor"),0!==i.paint.get("icon-opacity").constantOr(1)&&_0x4d6968(e,t,i,!1,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),i.layout.get("icon-rotation-alignment"),i.layout.get("icon-pitch-alignment"),i.layout.get("icon-keep-upright"),r,o,n),0!==i.paint.get("text-opacity").constantOr(1)&&_0x4d6968(e,t,i,!0,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.layout.get("text-keep-upright"),r,o,n)}}function _0x434fce(e,t,i){return i.iconsInText&&t?"symbolTextAndIcon":e?"symbolSDF":"symbolIcon"}function _0x4d6968(e,t,i,n,r,o,a,s,l,u,c,h){var d="map"===a,f="map"===s,p=d&&"point"!==i.layout.get("symbol-placement");if(p){var _,m=d&&!f&&!p,g=void 0!==i.layout.get("symbol-sort-key").constantOr(1),x=e.depthModeForSublayer(0,_0x37eb97.ReadOnly),v=i.layout.get("text-variable-anchor"),y=[],$=t.getBucket(i);if($){var b=n?$.text:$.icon;if(b&&b.segments.get().length){for(var T=b.programConfigurations.get(i.id),C=T.getAttributeLocation(),S=Object.keys(C).length,w=0;w<b.dynamicLayoutVertexBuffer.attributes.length;w++){C[b.dynamicLayoutVertexBuffer.attributes[w].name]=S++}var E=n||$.sdfIcons,P=n?$.textSizeData:$.iconSizeData,A=e.useProgram(_0x434fce(E,n,$),T,C).cesiumProgram;_=_0x31524b(P,t.level);var L=void 0,M=[0,0],R=void 0,O=void 0,I=null,D=void 0;if(n){if(R=t.glyphAtlasTexture,O=de$x.LINEAR,L=t.glyphAtlasTexture.size,$.iconsInText){M=t.imageAtlasTexture.size,I=t.imageAtlasTexture;var B="composite"===P.kind||"camera"===P.kind;D=e.options.rotating||e.options.zooming||B?de$x.LINEAR:de$x.NEAREST}}else{var N=1!==i.layout.get("icon-size").constantOr(0)||$.iconsNeedLinear;R=t.imageAtlasTexture,O=E||e.options.rotating||e.options.zooming||N?de$x.LINEAR:de$x.NEAREST,L=t.imageAtlasTexture.size}var F=_0x320daa(t,1,t.level),U=p$1d.toArray(t.viewProjection,_0x2255bb);_0x39afd0(U,f,d,e.transform,F);var G=_0x4c903e(U,f,d,e.transform,F),z=v&&$.hasTextData();if("none"!==i.layout.get("icon-text-fit")&&z&&$.hasIconData(),p)_0x49b612($,U,e,n,_0x39afd0(_0xd1c65d,f,d,e.transform,F),_0x4c903e(_0xd1c65d,f,d,e.transform,F),f,l);var V=p$1d.toArray(U,_0x2255bb),k=_0xd1c65d,W=e.translatePosMatrix(G,t,r,o,!0),H=E&&0!==i.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(1);_.uSize=512*_.uSize/t.targetTileSize,_.uSizeT=512*_.uSizeT/t.targetTileSize;var q={},j={program:A,buffers:b,uniformMap:q=E?$.iconsInText?_0x56c911.symbolTextAndIconUniformMap(P.kind,_,m,f,e,V,k,W,L,M):_0x56c911.symbolSDFUniformMap(P.kind,_,m,f,e,V,k,W,n,L,!0):_0x56c911.symbolIconUniformMap(P.kind,_,m,f,e,V,k,W,n,L),atlasTexture:R,atlasTextureIcon:I,atlasInterpolation:O,atlasInterpolationIcon:D,isSDF:E,hasHalo:H};if(g){w=0;for(var Y=b.segments.get();w<Y.length;w+=1){var X=Y[w];y.push({segments:new _0x4b6d5a([X]),sortKey:X.sortKey,state:j})}}else y.push({segments:b.segments,sortKey:0,state:j});g&&y.sort((function(e,t){return e.sortKey-t.sortKey}));for(var K=0,Q=y;K<Q.length;K+=1){var Z=Q[K],J=Z.state;if(J.atlasTexture.bind(J.atlasInterpolation,de$x.CLAMP_TO_EDGE),q.u_texture=function(){return J.atlasTexture.cesiumTexture},J.atlasTextureIcon&&(J.atlasTextureIcon.bind(J.atlasInterpolationIcon,de$x.CLAMP_TO_EDGE),q.u_texture_icon=function(){return J.atlasInterpolationIcon.cesiumTexture}),J.isSDF){q=J.uniformMap;J.hasHalo&&(q.u_is_halo=function(){return 1},_0x1035eb(J.buffers,Z.segments,i,e,J.program,x,u,c,q,h.passState,C)),q.u_is_halo=function(){return 0}}_0x1035eb(J.buffers,Z.segments,i,e,J.program,x,u,c,J.uniformMap,h.passState,C)}}}}else t._MVTLabel.drawLayerSymbols(t,i,n)}function _0x1035eb(e,t,i,n,r,o,a,s,l,u,c){var h=e.programConfigurations.get(i.id),d=r.allUniforms;l=h.getUniformMaps(d,i.paint,l);for(var f=h.getPaintVertexBuffers(),p=0,_=t.get();p<_.length;p+=1){var m=_[p],g=(m.drawCommands||(m.drawCommands={}))[i.id];if(!g){g=new i$_({cull:!1,primitiveType:de$x.TRIANGLES,count:3*m.primitiveLength,offset:3*m.primitiveOffset}),m.drawCommands[i.id]=g;for(var x=m.cesiumVaos||(m.cesiumVaos={}),v=[],y=0;y<e.layoutVertexBuffer.attributes.length;y++){var $=e.layoutVertexBuffer.attributes[y],b=_0x3cb0f8.mbxAttributeToCesiumVertexArrtribute($,e.layoutVertexBuffer,c[$.name],m.vertexOffset);v.push(b)}for(y=0;y<e.dynamicLayoutVertexBuffer.attributes.length;y++){$=e.dynamicLayoutVertexBuffer.attributes[y],b=_0x3cb0f8.mbxAttributeToCesiumVertexArrtribute($,e.dynamicLayoutVertexBuffer,c[$.name],m.vertexOffset);v.push(b)}for(var T=0;T<f.length;T++)for(var C=f[T],S=0;S<C.attributes.length;S++){$=C.attributes[S],b=_0x3cb0f8.mbxAttributeToCesiumVertexArrtribute($,C,c[$.name],m.vertexOffset);v.push(b)}var w=x[i.id]||(x[i.id]=new c$12({context:n.cesiumContext,attributes:v,indexBuffer:e.indexBuffer}));g.vertexArray=w}l.u_depthRange=function(){return 1-o.range[0]},g.uniformMap=l,g.renderState=_0x3cb0f8.toRenderState(s,o,_0x262381.disabled),g.shaderProgram=r,g.execute(n.cesiumContext,u)}}function _0x23d8a5(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}var _0x428fb5=(_0x3b331d=!0,function(e,t){var i=_0x3b331d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b331d=!1,i}),_0x384fcf=_0x428fb5(void 0,(function(){return _0x384fcf.toString().search("(((.+)+)+)+$").toString().constructor(_0x384fcf).search("(((.+)+)+)+$")})),_0x3b331d;_0x384fcf();var _0x3daa3c=(_0x1c04ff=!0,function(e,t){var i=_0x1c04ff?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c04ff=!1,i}),_0x29aae9=_0x3daa3c(void 0,(function(){return _0x29aae9.toString().search("(((.+)+)+)+$").toString().constructor(_0x29aae9).search("(((.+)+)+)+$")})),_0x1c04ff;_0x29aae9();var _0x5c23af="\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n",_0x1c0357=(_0x43455b=!0,function(e,t){var i=_0x43455b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43455b=!1,i}),_0x2ecdb3=_0x1c0357(void 0,(function(){return _0x2ecdb3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ecdb3).search("(((.+)+)+)+$")})),_0x43455b;_0x2ecdb3();var _0x5b28a7="\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main() {\n gl_FragColor = u_color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x2533dd=(_0xf4bced=!0,function(e,t){var i=_0xf4bced?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf4bced=!1,i}),_0x495dbe=_0x2533dd(void 0,(function(){return _0x495dbe.toString().search("(((.+)+)+)+$").toString().constructor(_0x495dbe).search("(((.+)+)+)+$")})),_0xf4bced;_0x495dbe();var _0x4ca4fe="\nuniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n",_0x1b02d7=(_0x13d773=!0,function(e,t){var i=_0x13d773?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13d773=!1,i}),_0x1d1012=_0x1b02d7(void 0,(function(){return _0x1d1012.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d1012).search("(((.+)+)+)+$")})),_0x13d773;_0x1d1012();var _0x465329="\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x645b51=(_0x5138ef=!0,function(e,t){var i=_0x5138ef?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5138ef=!1,i}),_0x235cb6=_0x645b51(void 0,(function(){return _0x235cb6.toString().search("(((.+)+)+)+$").toString().constructor(_0x235cb6).search("(((.+)+)+)+$")})),_0x5138ef;_0x235cb6();var _0x4cb2b8="\nattribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\nattribute vec2 a_shift;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = clamp(\n 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n 0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\n 4.0);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n gl_Position.xy += (a_extrude + a_shift) * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n}\n",_0x1bd058=(_0x2cac8c=!0,function(e,t){var i=_0x2cac8c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2cac8c=!1,i}),_0x82f739=_0x1bd058(void 0,(function(){return _0x82f739.toString().search("(((.+)+)+)+$").toString().constructor(_0x82f739).search("(((.+)+)+)+$")})),_0x2cac8c;_0x82f739();var _0x52924d="\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n\n float alpha = 0.5;\n\n // Red = collision, hide label\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n // Blue = no collision, label is showing\n if (v_placed > 0.5) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n gl_FragColor *= .1;\n }\n}\n",_0x5689e4=(_0x2737dd=!0,function(e,t){var i=_0x2737dd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2737dd=!1,i}),_0x3425db=_0x5689e4(void 0,(function(){return _0x3425db.toString().search("(((.+)+)+)+$").toString().constructor(_0x3425db).search("(((.+)+)+)+$")})),_0x2737dd;_0x3425db();var _0x282b30="\nattribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\n\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = clamp(\n 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n 0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\n 4.0);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n\n highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\n gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\n\n v_extrude = a_extrude * padding_factor;\n v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\n}\n",_0x3ebcf9=(_0x4d81d6=!0,function(e,t){var i=_0x4d81d6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d81d6=!1,i}),_0x1ea252=_0x3ebcf9(void 0,(function(){return _0x1ea252.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ea252).search("(((.+)+)+)+$")})),_0x4d81d6;_0x1ea252();var _0xb89c9="\nuniform float u_overscale_factor;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n float alpha = 0.5;\n\n // Red = collision, hide label\n vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n // Blue = no collision, label is showing\n if (v_placed > 0.5) {\n color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n color *= .2;\n }\n\n float extrude_scale_length = length(v_extrude_scale);\n float extrude_length = length(v_extrude) * extrude_scale_length;\n float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor;\n float radius = v_radius * extrude_scale_length;\n\n float distance_to_edge = abs(extrude_length - radius);\n float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\n\n gl_FragColor = opacity_t * color;\n}\n",_0x3b759f=(_0x176b19=!0,function(e,t){var i=_0x176b19?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x176b19=!1,i}),_0xe8b08a=_0x3b759f(void 0,(function(){return _0xe8b08a.toString().search("(((.+)+)+)+$").toString().constructor(_0xe8b08a).search("(((.+)+)+)+$")})),_0x176b19;_0xe8b08a();var _0x260fdc="uniform mat4 u_matrix;\n uniform bool u_scale_with_map;\n uniform bool u_pitch_with_map;\n uniform vec2 u_extrude_scale;\n uniform lowp float u_device_pixel_ratio;\n uniform highp float u_camera_to_center_distance;\n\n attribute vec2 a_pos;\n\n varying vec3 v_data;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\n void main(void) {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec2 circle_center = floor(a_pos * 0.5);\n if (u_pitch_with_map) {\n vec2 corner_position = circle_center;\n if (u_scale_with_map) {\n corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\n } else {\n // Pitching the circle with the map effectively scales it with the map\n // To counteract the effect for pitch-scale: viewport, we rescale the\n // whole circle based on the pitch scaling effect at its central point\n vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\n corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\n }\n\n gl_Position = u_matrix * vec4(corner_position, 0, 1);\n } else {\n gl_Position = u_matrix * vec4(circle_center, 0, 1);\n\n if (u_scale_with_map) {\n gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\n } else {\n gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\n }\n }\n\n // This is a minimum blur distance that serves as a faux-antialiasing for\n // the circle. since blur is a ratio of the circle's size and the intent is\n // to keep the blur at roughly 1px, the two are inversely related.\n lowp float antialiasblur = 1.0 / u_device_pixel_ratio / (radius + stroke_width);\n\n v_data = vec3(extrude.x, extrude.y, antialiasblur);\n }\n",_0xbf689d=(_0x33222e=!0,function(e,t){var i=_0x33222e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33222e=!1,i}),_0x3abd8b=_0xbf689d(void 0,(function(){return _0x3abd8b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3abd8b).search("(((.+)+)+)+$")})),_0x33222e;_0x3abd8b();var _0x4f2541="varying vec3 v_data;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n vec2 extrude = v_data.xy;\n float extrude_length = length(extrude);\n\n lowp float antialiasblur = v_data.z;\n float antialiased_blur = -max(blur, antialiasblur);\n\n float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\n\n float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\n antialiased_blur,\n 0.0,\n extrude_length - radius / (radius + stroke_width)\n );\n\n gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x2c711a=(_0x2bdd8a=!0,function(e,t){var i=_0x2bdd8a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2bdd8a=!1,i}),_0x117d50=_0x2c711a(void 0,(function(){return _0x117d50.toString().search("(((.+)+)+)+$").toString().constructor(_0x117d50).search("(((.+)+)+)+$")})),_0x2bdd8a;_0x117d50();var _0x8a1548="\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n",_0xf4f273=(_0xc80358=!0,function(e,t){var i=_0xc80358?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc80358=!1,i}),_0x2661fa=_0xf4f273(void 0,(function(){return _0x2661fa.toString().search("(((.+)+)+)+$").toString().constructor(_0x2661fa).search("(((.+)+)+)+$")})),_0xc80358;_0x2661fa();var _0x3387df="\nvoid main() {\n gl_FragColor = vec4(1.0);\n}\n",_0x58bebe=(_0x46e956=!0,function(e,t){var i=_0x46e956?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x46e956=!1,i}),_0x2f0665=_0x58bebe(void 0,(function(){return _0x2f0665.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f0665).search("(((.+)+)+)+$")})),_0x46e956;_0x2f0665();var _0x48b2de="\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n",_0x3e53ed=(_0x163a0e=!0,function(e,t){var i=_0x163a0e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x163a0e=!1,i}),_0x2204a9=_0x3e53ed(void 0,(function(){return _0x2204a9.toString().search("(((.+)+)+)+$").toString().constructor(_0x2204a9).search("(((.+)+)+)+$")})),_0x163a0e;_0x2204a9();var _0xe79352="\nuniform highp vec4 u_color;\n\nvoid main() {\n gl_FragColor = u_color;\n}\n",_0x3bec1a=(_0x4e1335=!0,function(e,t){var i=_0x4e1335?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e1335=!1,i}),_0x2f1d56=_0x3bec1a(void 0,(function(){return _0x2f1d56.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f1d56).search("(((.+)+)+)+$")})),_0x4e1335;_0x2f1d56();var _0x153d99="\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n uniform mat4 u_matrix;\n uniform float u_depthRange;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\n gl_Position = u_matrix * vec4(float(a_pos.x), float(a_pos.y), u_depthRange, 1);\n }\n",_0x9495f1=(_0x47412b=!0,function(e,t){var i=_0x47412b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47412b=!1,i}),_0x2fb3d7=_0x9495f1(void 0,(function(){return _0x2fb3d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fb3d7).search("(((.+)+)+)+$")})),_0x47412b;_0x2fb3d7();var _0x16b39d="#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n gl_FragColor = color * opacity;\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x37b605=(_0xab1766=!0,function(e,t){var i=_0xab1766?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xab1766=!1,i}),_0x29dde3=_0x37b605(void 0,(function(){return _0x29dde3.toString().search("(((.+)+)+)+$").toString().constructor(_0x29dde3).search("(((.+)+)+)+$")})),_0xab1766;_0x29dde3();var _0x3202d4="\nuniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\nuniform float u_vertical_gradient;\nuniform lowp float u_opacity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n #pragma mapbox: initialize highp float base\n #pragma mapbox: initialize highp float height\n #pragma mapbox: initialize highp vec4 color\n\n vec3 normal = a_normal_ed.xyz;\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(normal.x, 2.0);\n\n gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\n\n // Relative luminance (how dark/bright is the surface color?)\n float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\n\n v_color = vec4(0.0, 0.0, 0.0, 1.0);\n\n // Add slight ambient lighting so no extrusions are totally black\n vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\n color += ambientlight;\n\n // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\n float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);\n\n // Adjust directional so that\n // the range of values for highlight/shading is narrower\n // with lower light intensity\n // and with lighter/brighter surface colors\n directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\n\n // Add gradient along z axis of side surfaces\n if (normal.y != 0.0) {\n // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient,\n // and otherwise calculates the gradient based on base + height\n directional *= (\n (1.0 - u_vertical_gradient) +\n (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0)));\n }\n\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n // with lower bounds adjusted to hue of light\n // so that shading is tinted with the complementary (opposite) color to the light color\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n v_color *= u_opacity;\n}\n",_0x17a08b=(_0x34ecfb=!0,function(e,t){var i=_0x34ecfb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x34ecfb=!1,i}),_0x3f12e0=_0x17a08b(void 0,(function(){return _0x3f12e0.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f12e0).search("(((.+)+)+)+$")})),_0x34ecfb;_0x3f12e0();var _0x2bfabc="\nvarying vec4 v_color;\n\nvoid main() {\n gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x37cc9f=(_0x2a5407=!0,function(e,t){var i=_0x2a5407?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a5407=!1,i}),_0x3df7ec=_0x37cc9f(void 0,(function(){return _0x3df7ec.toString().search("(((.+)+)+)+$").toString().constructor(_0x3df7ec).search("(((.+)+)+)+$")})),_0x2a5407;_0x3df7ec();var _0x14fc83="\nuniform mat4 u_matrix;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_height_factor;\nuniform vec4 u_scale;\nuniform float u_vertical_gradient;\nuniform lowp float u_opacity;\n\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec3 normal = a_normal_ed.xyz;\n float edgedistance = a_normal_ed.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(normal.x, 2.0);\n float z = t > 0.0 ? height : base;\n\n gl_Position = u_matrix * vec4(a_pos, z, 1);\n\n vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0\n ? a_pos // extrusion top\n : vec2(edgedistance, z * u_height_factor); // extrusion side\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, pos);\n\n v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\n float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);\n directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\n\n if (normal.y != 0.0) {\n // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient,\n // and otherwise calculates the gradient based on base + height\n directional *= (\n (1.0 - u_vertical_gradient) +\n (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0)));\n }\n\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n v_lighting *= u_opacity;\n}\n",_0x5eba72=(_0xf8e58b=!0,function(e,t){var i=_0xf8e58b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf8e58b=!1,i}),_0xcbc21b=_0x5eba72(void 0,(function(){return _0xcbc21b.toString().search("(((.+)+)+)+$").toString().constructor(_0xcbc21b).search("(((.+)+)+)+$")})),_0xf8e58b;_0xcbc21b();var _0x4857ca="\nuniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n vec4 mixedColor = mix(color1, color2, u_fade);\n\n gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x3954cf=(_0x2f0c38=!0,function(e,t){var i=_0x2f0c38?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f0c38=!1,i}),_0x2e6401=_0x3954cf(void 0,(function(){return _0x2e6401.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e6401).search("(((.+)+)+)+$")})),_0x2f0c38;_0x2e6401();var _0x351028="\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n uniform mat4 u_matrix;\n uniform vec2 u_world;\n uniform float u_depthRange;\n varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n void main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n gl_Position = u_matrix * vec4(vec2(a_pos), u_depthRange, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n }\n",_0x1883da=(_0x444b89=!0,function(e,t){var i=_0x444b89?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x444b89=!1,i}),_0x19d0c6=_0x1883da(void 0,(function(){return _0x19d0c6.toString().search("(((.+)+)+)+$").toString().constructor(_0x19d0c6).search("(((.+)+)+)+$")})),_0x444b89;_0x19d0c6();var _0x40e4c2="varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n void main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x1f2d44=(_0x5b386d=!0,function(e,t){var i=_0x5b386d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b386d=!1,i}),_0x246a76=_0x1f2d44(void 0,(function(){return _0x246a76.toString().search("(((.+)+)+)+$").toString().constructor(_0x246a76).search("(((.+)+)+)+$")})),_0x5b386d;_0x246a76();var _0x1fab96="uniform mat4 u_matrix;\n uniform vec2 u_pixel_coord_upper;\n uniform vec2 u_pixel_coord_lower;\n uniform vec4 u_scale;\n uniform float u_depthRange;\n\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = vec2(pattern_from.xy);\n vec2 pattern_br_a = vec2(pattern_from.zw);\n vec2 pattern_tl_b = vec2(pattern_to.xy);\n vec2 pattern_br_b = vec2(pattern_to.zw);\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n gl_Position = u_matrix * vec4(vec2(a_pos), u_depthRange, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileZoomRatio, vec2(a_pos));\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileZoomRatio, vec2(a_pos));\n }\n",_0x1af657=(_0x215269=!0,function(e,t){var i=_0x215269?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x215269=!1,i}),_0x3f2068=_0x1af657(void 0,(function(){return _0x3f2068.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f2068).search("(((.+)+)+)+$")})),_0x215269;_0x3f2068();var _0x39b2b5="uniform vec2 u_texsize;\n uniform float u_fade;\n\n uniform sampler2D u_image;\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_fade) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x37d585=(_0x26a645=!0,function(e,t){var i=_0x26a645?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x26a645=!1,i}),_0x177f56=_0x37d585(void 0,(function(){return _0x177f56.toString().search("(((.+)+)+)+$").toString().constructor(_0x177f56).search("(((.+)+)+)+$")})),_0x26a645;_0x177f56();var _0x19dc35="uniform mat4 u_matrix;\n uniform vec2 u_world;\n uniform vec2 u_pixel_coord_upper;\n uniform vec2 u_pixel_coord_lower;\n uniform vec4 u_scale;\n uniform float u_depthRange;\n\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n varying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n gl_Position = u_matrix * vec4(vec2(a_pos), u_depthRange, 1);\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, vec2(a_pos));\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, vec2(a_pos));\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n }\n",_0x163b29=(_0x340733=!0,function(e,t){var i=_0x340733?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x340733=!1,i}),_0x129fb9=_0x163b29(void 0,(function(){return _0x129fb9.toString().search("(((.+)+)+)+$").toString().constructor(_0x129fb9).search("(((.+)+)+)+$")})),_0x340733;_0x129fb9();var _0x433735="uniform vec2 u_texsize;\n uniform sampler2D u_image;\n uniform float u_fade;\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n varying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = mix(color1, color2, u_fade) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x1ee5b2=(_0x57cb23=!0,function(e,t){var i=_0x57cb23?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57cb23=!1,i}),_0x5c3636=_0x1ee5b2(void 0,(function(){return _0x5c3636.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c3636).search("(((.+)+)+)+$")})),_0x57cb23;_0x5c3636();var _0xcf3cd3="\nuniform mat4 u_matrix;\nuniform float u_extrude_scale;\nuniform float u_opacity;\nuniform float u_intensity;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_extrude;\n\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\n\n// Effective \"0\" in the kernel density texture to adjust the kernel size to;\n// this empirically chosen number minimizes artifacts on overlapping kernels\n// for typical heatmap cases (assuming clustered source)\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main(void) {\n #pragma mapbox: initialize highp float weight\n #pragma mapbox: initialize mediump float radius\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // This 'extrude' comes in ranging from [-1, -1], to [1, 1]. We'll use\n // it to produce the vertices of a square mesh framing the point feature\n // we're adding to the kernel density texture. We'll also pass it as\n // a varying, so that the fragment shader can determine the distance of\n // each fragment from the point feature.\n // Before we do so, we need to scale it up sufficiently so that the\n // kernel falls effectively to zero at the edge of the mesh.\n // That is, we want to know S such that\n // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\n // Which solves to:\n // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\n float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\n\n // Pass the varying in units of radius\n v_extrude = S * unscaled_extrude;\n\n // Scale by radius and the zoom-based scale factor to produce actual\n // mesh position\n vec2 extrude = v_extrude * radius * u_extrude_scale;\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\n\n gl_Position = u_matrix * pos;\n}\n",_0x2b6508=(_0x49288c=!0,function(e,t){var i=_0x49288c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49288c=!1,i}),_0x13c42b=_0x2b6508(void 0,(function(){return _0x13c42b.toString().search("(((.+)+)+)+$").toString().constructor(_0x13c42b).search("(((.+)+)+)+$")})),_0x49288c;_0x13c42b();var _0x1e5303="\nuniform highp float u_intensity;\n\nvarying vec2 v_extrude;\n\n#pragma mapbox: define highp float weight\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main() {\n #pragma mapbox: initialize highp float weight\n\n // Kernel density estimation with a Gaussian kernel of size 5x5\n float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\n float val = weight * u_intensity * GAUSS_COEF * exp(d);\n\n gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x507138=(_0x6e5521=!0,function(e,t){var i=_0x6e5521?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6e5521=!1,i}),_0x2e7e55=_0x507138(void 0,(function(){return _0x2e7e55.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e7e55).search("(((.+)+)+)+$")})),_0x6e5521;_0x2e7e55();var _0xf08a05="\nuniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n v_pos.x = a_pos.x;\n v_pos.y = 1.0 - a_pos.y;\n}\n",_0x2f40a1=(_0x26a45e=!0,function(e,t){var i=_0x26a45e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x26a45e=!1,i}),_0x42a73d=_0x2f40a1(void 0,(function(){return _0x42a73d.toString().search("(((.+)+)+)+$").toString().constructor(_0x42a73d).search("(((.+)+)+)+$")})),_0x26a45e;_0x42a73d();var _0x498afd="\nuniform sampler2D u_image;\nuniform sampler2D u_color_ramp;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n float t = texture2D(u_image, v_pos).r;\n vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\n gl_FragColor = color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(0.0);\n#endif\n}\n",_0x540bf9=(_0x204e29=!0,function(e,t){var i=_0x204e29?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x204e29=!1,i}),_0x57e9e3=_0x540bf9(void 0,(function(){return _0x57e9e3.toString().search("(((.+)+)+)+$").toString().constructor(_0x57e9e3).search("(((.+)+)+)+$")})),_0x204e29;_0x57e9e3();var _0xa4a09c="\nuniform mat4 u_matrix;\nuniform vec2 u_dimension;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n highp vec2 epsilon = 1.0 / u_dimension;\n float scale = (u_dimension.x - 2.0) / u_dimension.x;\n v_pos = (a_texture_pos / 8192.0) * scale + epsilon;\n}\n",_0x5eecc0=(_0x1d6f10=!0,function(e,t){var i=_0x1d6f10?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d6f10=!1,i}),_0x584dfd=_0x5eecc0(void 0,(function(){return _0x584dfd.toString().search("(((.+)+)+)+$").toString().constructor(_0x584dfd).search("(((.+)+)+)+$")})),_0x1d6f10;_0x584dfd();var _0x48ac85="\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D u_image;\nvarying vec2 v_pos;\nuniform vec2 u_dimension;\nuniform float u_zoom;\nuniform float u_maxzoom;\nuniform vec4 u_unpack;\n\nfloat getElevation(vec2 coord, float bias) {\n // Convert encoded elevation value to meters\n vec4 data = texture2D(u_image, coord) * 255.0;\n data.a = -1.0;\n return dot(data, u_unpack) / 4.0;\n}\n\nvoid main() {\n vec2 epsilon = 1.0 / u_dimension;\n\n // queried pixels:\n // +-----------+\n // | | | |\n // | a | b | c |\n // | | | |\n // +-----------+\n // | | | |\n // | d | e | f |\n // | | | |\n // +-----------+\n // | | | |\n // | g | h | i |\n // | | | |\n // +-----------+\n\n float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\n float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\n float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\n float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\n float e = getElevation(v_pos, 0.0);\n float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\n float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\n float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\n float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\n\n // here we divide the x and y slopes by 8 * pixel size\n // where pixel size (aka meters/pixel) is:\n // circumference of the world / (pixels per tile * number of tiles)\n // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\n // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\n // we want to vertically exaggerate the hillshading though, because otherwise\n // it is barely noticeable at low zooms. to do this, we multiply this by some\n // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value\n // Here we use a=0.3 which works out to the expression below. see \n // nickidlugash's awesome breakdown for more info\n float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;\n\n vec2 deriv = vec2(\n (c + f + f + i) - (a + d + d + g),\n (g + h + h + i) - (a + b + b + c)\n ) / pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom);\n\n gl_FragColor = clamp(vec4(\n deriv.x / 2.0 + 0.5,\n deriv.y / 2.0 + 0.5,\n 1.0,\n 1.0), 0.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x51159d=(_0x4eda2d=!0,function(e,t){var i=_0x4eda2d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4eda2d=!1,i}),_0x1c6505=_0x51159d(void 0,(function(){return _0x1c6505.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c6505).search("(((.+)+)+)+$")})),_0x4eda2d;_0x1c6505();var _0x5a8449="\nuniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = a_texture_pos / 8192.0;\n}\n",_0x32e0a6=(_0x29b5b7=!0,function(e,t){var i=_0x29b5b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29b5b7=!1,i}),_0x46b67d=_0x32e0a6(void 0,(function(){return _0x46b67d.toString().search("(((.+)+)+)+$").toString().constructor(_0x46b67d).search("(((.+)+)+)+$")})),_0x29b5b7;_0x46b67d();var _0x2151e9="\nuniform sampler2D u_image;\nvarying vec2 v_pos;\n\nuniform vec2 u_latrange;\nuniform vec2 u_light;\nuniform vec4 u_shadow;\nuniform vec4 u_highlight;\nuniform vec4 u_accent;\n\n#define PI 3.141592653589793\n\nvoid main() {\n vec4 pixel = texture2D(u_image, v_pos);\n\n vec2 deriv = ((pixel.rg * 2.0) - 1.0);\n\n // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\n // to account for mercator projection distortion. see #4807 for details\n float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\n // We also multiply the slope by an arbitrary z-factor of 1.25\n float slope = atan(1.25 * length(deriv) / scaleFactor);\n float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0);\n\n float intensity = u_light.x;\n // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\n // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\n // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\n float azimuth = u_light.y + PI;\n\n // We scale the slope exponentially based on intensity, using a calculation similar to\n // the exponential interpolation function in the style spec:\n // so that higher intensity values create more opaque hillshading.\n float base = 1.875 - intensity * 1.75;\n float maxValue = 0.5 * PI;\n float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\n\n // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\n // so that the accent color's rate of change eases in while the shade color's eases out.\n float accent = cos(scaledSlope);\n // We multiply both the accent and shade color by a clamped intensity value\n // so that intensities >= 0.5 do not additionally affect the color values\n // while intensity values < 0.5 make the overall color more transparent.\n vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\n float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\n vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\n gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x37c6dc=(_0xb7bd57=!0,function(e,t){var i=_0xb7bd57?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb7bd57=!1,i}),_0x5a9016=_0x37c6dc(void 0,(function(){return _0x5a9016.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a9016).search("(((.+)+)+)+$")})),_0xb7bd57;_0x5a9016();var _0x5784f9="// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also special normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n #define scale 0.015873016\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\n uniform mat4 u_matrix;\n uniform mediump float u_ratio;\n uniform vec2 u_units_to_pixels;\n uniform lowp float u_device_pixel_ratio;\n uniform float u_depthRange;\n\n varying vec2 v_normal;\n varying vec2 v_width2;\n varying float v_gamma_scale;\n varying highp float v_linesofar;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n\n v_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * 2.0;\n\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, u_depthRange, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n }\n",_0xe4c93a=(_0x1c080c=!0,function(e,t){var i=_0x1c080c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c080c=!1,i}),_0x408de8=_0xe4c93a(void 0,(function(){return _0x408de8.toString().search("(((.+)+)+)+$").toString().constructor(_0x408de8).search("(((.+)+)+)+$")})),_0x1c080c;_0x408de8();var _0x4d7b5c="uniform lowp float u_device_pixel_ratio;\n\n varying vec2 v_width2;\n varying vec2 v_normal;\n varying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x201202=(_0xcd2c97=!0,function(e,t){var i=_0xcd2c97?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xcd2c97=!1,i}),_0xee20bb=_0x201202(void 0,(function(){return _0xee20bb.toString().search("(((.+)+)+)+$").toString().constructor(_0xee20bb).search("(((.+)+)+)+$")})),_0xcd2c97;_0xee20bb();var _0x12a338="// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also special normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n #define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n #define LINE_DISTANCE_SCALE 2.0\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\n uniform mat4 u_matrix;\n uniform mediump float u_ratio;\n uniform lowp float u_device_pixel_ratio;\n uniform vec2 u_patternscale_a;\n uniform float u_tex_y_a;\n uniform vec2 u_patternscale_b;\n uniform float u_tex_y_b;\n uniform vec2 u_units_to_pixels;\n uniform float u_depthRange;\n\n varying vec2 v_normal;\n varying vec2 v_width2;\n varying vec2 v_tex_a;\n varying vec2 v_tex_b;\n varying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n float a_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * LINE_DISTANCE_SCALE;\n\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist =outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, u_depthRange, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n #ifndef WEBGPU\n v_tex_a.y = 1.0 - v_tex_a.y;\n v_tex_b.y = 1.0 - v_tex_b.y;\n#endif\n\n v_width2 = vec2(outset, inset);\n }\n",_0x2da98e=(_0x9d8870=!0,function(e,t){var i=_0x9d8870?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x9d8870=!1,i}),_0x84c30f=_0x2da98e(void 0,(function(){return _0x84c30f.toString().search("(((.+)+)+)+$").toString().constructor(_0x84c30f).search("(((.+)+)+)+$")})),_0x9d8870;_0x84c30f();var _0x5bd5a5="uniform lowp float u_device_pixel_ratio;\n uniform sampler2D u_image;\n uniform float u_sdfgamma;\n uniform float u_mix;\n uniform lowp float u_antialiasing;\n\n varying vec2 v_normal;\n varying vec2 v_width2;\n varying vec2 v_tex_a;\n varying vec2 v_tex_b;\n varying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n if(alpha > 0.1){\n alpha = max(1.0 - u_antialiasing, alpha);\n }\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x483167=(_0x2a6abc=!0,function(e,t){var i=_0x2a6abc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a6abc=!1,i}),_0x1087d0=_0x483167(void 0,(function(){return _0x1087d0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1087d0).search("(((.+)+)+)+$")})),_0x2a6abc;_0x1087d0();var _0x5548c9="\n// the attribute conveying progress along a line is scaled to [0, 2^15)\n#define MAX_LINE_DISTANCE 32767.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec2 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform lowp float u_device_pixel_ratio;\nuniform vec2 u_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\n\n vec2 pos = floor(a_pos_normal * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = a_pos_normal - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n}\n",_0x485c35=(_0x4b5fcf=!0,function(e,t){var i=_0x4b5fcf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4b5fcf=!1,i}),_0x15c498=_0x485c35(void 0,(function(){return _0x15c498.toString().search("(((.+)+)+)+$").toString().constructor(_0x15c498).search("(((.+)+)+)+$")})),_0x4b5fcf;_0x15c498();var _0x1b123c="\nuniform lowp float u_device_pixel_ratio;\nuniform sampler2D u_image;\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n // For gradient lines, v_lineprogress is the ratio along the entire line,\n // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\n vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x9ed86a=(_0xb359bb=!0,function(e,t){var i=_0xb359bb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb359bb=!1,i}),_0x55a5b4=_0x9ed86a(void 0,(function(){return _0x55a5b4.toString().search("(((.+)+)+)+$").toString().constructor(_0x55a5b4).search("(((.+)+)+)+$")})),_0xb359bb;_0x55a5b4();var _0x202e1c="\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_units_to_pixels;\nuniform mediump float u_ratio;\nuniform lowp float u_device_pixel_ratio;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n float a_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * LINE_DISTANCE_SCALE;\n // float tileRatio = u_scale.y;\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_linesofar = a_linesofar;\n v_width2 = vec2(outset, inset);\n}\n",_0x219fcd=(_0x4e7493=!0,function(e,t){var i=_0x4e7493?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e7493=!1,i}),_0x11ba31=_0x219fcd(void 0,(function(){return _0x11ba31.toString().search("(((.+)+)+)+$").toString().constructor(_0x11ba31).search("(((.+)+)+)+$")})),_0x4e7493;_0x11ba31();var _0x4577cf="\nuniform lowp float u_device_pixel_ratio;\nuniform vec2 u_texsize;\nuniform float u_fade;\nuniform mediump vec4 u_scale;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n vec2 pattern_size_a = vec2(display_size_a.x * fromScale / tileZoomRatio, display_size_a.y);\n vec2 pattern_size_b = vec2(display_size_b.x * toScale / tileZoomRatio, display_size_b.y);\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / pattern_size_b.x, 1.0);\n\n // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\n // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\n // to ensure we don't sample outside the designated symbol on the sprite sheet.\n // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\n // the texture coordinate\n float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_a.y + 2.0) / 2.0) / pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_b.y + 2.0) / 2.0) / pattern_size_b.y);\n vec2 pos_a = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, vec2(x_a, y_a));\n vec2 pos_b = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0xc651f9=(_0x4dc776=!0,function(e,t){var i=_0x4dc776?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4dc776=!1,i}),_0x55b92e=_0xc651f9(void 0,(function(){return _0x55b92e.toString().search("(((.+)+)+)+$").toString().constructor(_0x55b92e).search("(((.+)+)+)+$")})),_0x4dc776;_0x55b92e();var _0x29fa18="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\nattribute ivec4 a_pixeloffset;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec4 a_pixeloffset;\n#endif\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform float u_fade_change;\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\nuniform float u_depthRange;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n vec2 a_pxoffset = vec2(a_pixeloffset.xy);\n vec2 a_minFontScale = vec2(a_pixeloffset.zw) / 256.0;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // See comments in symbol_sdf.vertex\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // See comments in symbol_sdf.vertex\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * max(a_minFontScale, fontScale) + a_pxoffset / 16.0), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n\n v_tex = a_tex / u_texsize;\n // vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n // float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n // v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n v_fade_opacity = 1.0;\n}\n",_0x27a463=(_0x50c886=!0,function(e,t){var i=_0x50c886?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x50c886=!1,i}),_0x3c1885=_0x27a463(void 0,(function(){return _0x3c1885.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c1885).search("(((.+)+)+)+$")})),_0x50c886;_0x3c1885();var _0x24bb2b="\nuniform sampler2D u_texture;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n //lowp float alpha = opacity * v_fade_opacity;\n gl_FragColor = texture2D(u_texture, vec2(v_tex.x, 1.0 - v_tex.y)) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0xcef50e=(_0x393f45=!0,function(e,t){var i=_0x393f45?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x393f45=!1,i}),_0x13c48a=_0xcef50e(void 0,(function(){return _0x13c48a.toString().search("(((.+)+)+)+$").toString().constructor(_0x13c48a).search("(((.+)+)+)+$")})),_0x393f45;_0x13c48a();var _0x5278ba="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\nattribute ivec4 a_pixeloffset;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec4 a_pixeloffset;\n#endif\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\nuniform vec2 u_texsize;\nuniform float u_depthRange;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n vec2 a_pxoffset = vec2(a_pixeloffset.xy);\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n //vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale + a_pxoffset), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n float gamma_scale = gl_Position.w;\n\n //vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n //float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n //float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0 = a_tex / u_texsize;\n v_data1 = vec3(gamma_scale, size, 1.0);\n}\n",_0x397461=(_0x5778b1=!0,function(e,t){var i=_0x5778b1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5778b1=!1,i}),_0x3e7899=_0x397461(void 0,(function(){return _0x3e7899.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e7899).search("(((.+)+)+)+$")})),_0x5778b1;_0x3e7899();var _0x26ba5a="\n#define SDF_PX 8.0\n\nuniform bool u_is_halo;\nuniform sampler2D u_texture;\nuniform highp float u_gamma_scale;\nuniform lowp float u_device_pixel_ratio;\nuniform bool u_is_text;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n float EDGE_GAMMA = 0.105 / u_device_pixel_ratio;\n\n vec2 tex = v_data0.xy;\n float gamma_scale = v_data1.x;\n float size = v_data1.y;\n float fade_opacity = v_data1[2];\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n lowp vec4 color = fill_color;\n highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n lowp float buff = (256.0 - 64.0) / 256.0;\n if (u_is_halo) {\n color = halo_color;\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n buff = (6.0 - halo_width / fontScale) / SDF_PX;\n }\n\n#ifdef WEBGPU\n float dist = texture2D(u_texture, tex).r;\n#else\n float dist = texture2D(u_texture, tex).a;\n#endif\n highp float gamma_scaled = gamma * gamma_scale;\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n //gl_FragColor = color * (alpha * opacity * fade_opacity);\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0xb769cc=(_0x49e0a3=!0,function(e,t){var i=_0x49e0a3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49e0a3=!1,i}),_0x7f81d9=_0xb769cc(void 0,(function(){return _0x7f81d9.toString().search("(((.+)+)+)+$").toString().constructor(_0x7f81d9).search("(((.+)+)+)+$")})),_0x49e0a3;_0x7f81d9();var _0x1c6e1c="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\n#endif\n\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\nuniform vec2 u_texsize;\nuniform vec2 u_texsize_icon;\nuniform float u_depthRange;\n\nvarying vec4 v_data0;\nvarying vec4 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n float is_sdf = a_size[0] - 2.0 * a_size_min;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = size / 24.0;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n float gamma_scale = gl_Position.w;\n\n // vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n // float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n // float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0.xy = a_tex / u_texsize;\n v_data0.zw = a_tex / u_texsize_icon;\n //v_data1 = vec4(gamma_scale, size, interpolated_fade_opacity, is_sdf);\n v_data1 = vec4(gamma_scale, size, 1.0, is_sdf); \n}\n",_0x1f9f58=(_0x18ea62=!0,function(e,t){var i=_0x18ea62?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x18ea62=!1,i}),_0x34ab48=_0x1f9f58(void 0,(function(){return _0x34ab48.toString().search("(((.+)+)+)+$").toString().constructor(_0x34ab48).search("(((.+)+)+)+$")})),_0x18ea62;_0x34ab48();var _0x40df9f="\n#define SDF_PX 8.0\n\n#define SDF 1.0\n#define ICON 0.0\n\nuniform bool u_is_halo;\nuniform sampler2D u_texture;\nuniform sampler2D u_texture_icon;\nuniform highp float u_gamma_scale;\nuniform lowp float u_device_pixel_ratio;\n\nvarying vec4 v_data0;\nvarying vec4 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n// float fade_opacity = v_data1[2];\n\n// if (v_data1.w == ICON) {\n// vec2 tex_icon = v_data0.zw;\n// lowp float alpha = opacity * fade_opacity;\n// gl_FragColor = texture2D(u_texture_icon, tex_icon) * alpha;\n\n// #ifdef OVERDRAW_INSPECTOR\n// gl_FragColor = vec4(1.0);\n// #endif\n// return;\n// }\n\n// vec2 tex = v_data0.xy;\n\n// float EDGE_GAMMA = 0.105 / u_device_pixel_ratio;\n\n// float gamma_scale = v_data1.x;\n// float size = v_data1.y;\n\n// float fontScale = size / 24.0;\n\n// lowp vec4 color = fill_color;\n// highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n// lowp float buff = (256.0 - 64.0) / 256.0;\n// if (u_is_halo) {\n// color = halo_color;\n// gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n// buff = (6.0 - halo_width / fontScale) / SDF_PX;\n// }\n\n// lowp float dist = texture2D(u_texture, tex).a;\n// highp float gamma_scaled = gamma * gamma_scale;\n// highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n// gl_FragColor = color * (alpha * opacity * fade_opacity);\n\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x4a896b=(_0x2f40be=!0,function(e,t){var i=_0x2f40be?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f40be=!1,i}),_0xfdd9ca=_0x4a896b(void 0,(function(){return _0xfdd9ca.toString().search("(((.+)+)+)+$").toString().constructor(_0xfdd9ca).search("(((.+)+)+)+$")})),_0x2f40be;_0xfdd9ca();var _0x47cb55="\n#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n int packedIntValue = int(packedValue);\n int v0 = packedIntValue / 256;\n return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec2 unpack_opacity(const float packedOpacity) {\n int intOpacity = int(packedOpacity) / 2;\n return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\n}\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n// floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n return vec4(\n unpack_float(encodedColor[0]) / 255.0,\n unpack_float(encodedColor[1]) / 255.0\n );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_color(const vec4 packedColors, const float t) {\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n",_0x2881dc=(_0x37d7f4=!0,function(e,t){var i=_0x37d7f4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37d7f4=!1,i}),_0x28f969=_0x2881dc(void 0,(function(){return _0x28f969.toString().search("(((.+)+)+)+$").toString().constructor(_0x28f969).search("(((.+)+)+)+$")})),_0x37d7f4;_0x28f969();var _0x4d2dee="\n#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n",_0x1b9864=(_0x2b7945=!0,function(e,t){var i=_0x2b7945?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b7945=!1,i}),_0x5e8618=_0x1b9864(void 0,(function(){return _0x5e8618.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e8618).search("(((.+)+)+)+$")})),_0x2b7945;_0x5e8618();var _0xb2defe="\nuniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n // We are using Int16 for texture position coordinates to give us enough precision for\n // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n // as an arbitrarily high number to preserve adequate precision when rendering.\n // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n // so math for modifying either is consistent.\n v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n",_0x4cd65e=(_0x3c98d4=!0,function(e,t){var i=_0x3c98d4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3c98d4=!1,i}),_0x63e012=_0x4cd65e(void 0,(function(){return _0x63e012.toString().search("(((.+)+)+)+$").toString().constructor(_0x63e012).search("(((.+)+)+)+$")})),_0x3c98d4;_0x63e012();var _0x30c092="\nuniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n if (color0.a > 0.0) {\n color0.rgb = color0.rgb / color0.a;\n }\n if (color1.a > 0.0) {\n color1.rgb = color1.rgb / color1.a;\n }\n vec4 color = mix(color0, color1, u_fade_t);\n color.a *= u_opacity;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x2f6900=(_0x143a7e=!0,function(e,t){var i=_0x143a7e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x143a7e=!1,i}),_0x2c7979=_0x2f6900(void 0,(function(){return _0x2c7979.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c7979).search("(((.+)+)+)+$")})),_0x143a7e;_0x2c7979(),_0x55f30f([{name:"a_pos",type:"Int16",components:2}]);var _0x3913df=_0x53e3c7(_0x4d2dee,_0x47cb55),_0xf2ff25=_0x53e3c7(_0x5b28a7,_0x5c23af),_0x343377=_0x53e3c7(_0x465329,_0x4ca4fe),_0x507213=_0x53e3c7(_0x4f2541,_0x260fdc),_0x298a31=_0x53e3c7(_0x3387df,_0x8a1548),_0x45a9dc=_0x53e3c7(_0x1e5303,_0xcf3cd3),_0x215ea5=_0x53e3c7(_0x498afd,_0xf08a05),_0x2e244a=_0x53e3c7(_0x52924d,_0x4cb2b8),_0x220457=_0x53e3c7(_0xb89c9,_0x282b30),_0x3df2b2=_0x53e3c7(_0xe79352,_0x48b2de),_0x2a9b4e=_0x53e3c7(_0x16b39d,_0x153d99),_0x44b33a=_0x53e3c7(_0x40e4c2,_0x351028),_0x3c5341=_0x53e3c7(_0x433735,_0x19dc35),_0x4f56c5=_0x53e3c7(_0x39b2b5,_0x1fab96),_0x53ed86=_0x53e3c7(_0x2bfabc,_0x3202d4),_0x227506=_0x53e3c7(_0x4857ca,_0x14fc83),_0x18370c=_0x53e3c7(_0x48ac85,_0xa4a09c),_0x3dc877=_0x53e3c7(_0x2151e9,_0x5a8449),_0x2bf6dd=_0x53e3c7(_0x4d7b5c,_0x5784f9),_0x485f7f=_0x53e3c7(_0x1b123c,_0x5548c9),_0x508450=_0x53e3c7(_0x4577cf,_0x202e1c),_0x153475=_0x53e3c7(_0x5bd5a5,_0x12a338),_0x4e520b=_0x53e3c7(_0x30c092,_0xb2defe),_0x575f26=_0x53e3c7(_0x24bb2b,_0x29fa18),_0x2e8267=_0x53e3c7(_0x26ba5a,_0x5278ba),_0xe87a72=_0x53e3c7(_0x40df9f,_0x1c6e1c);function _0x53e3c7(e,t){var i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:e=e.replace(i,(function(e,t,i,r,o){return n[o]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+i+" "+r+" "+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n"})),vertexSource:t=t.replace(i,(function(e,t,i,r,o){var a="float"===r?"vec2":"vec4",s=o.match(/color/)?"color":a;return n[o]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\nvarying "+i+" "+r+" "+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = a_"+o+";\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n"}))}}var _0x15007c=Object.freeze({__proto__:null,prelude:_0x3913df,background:_0xf2ff25,backgroundPattern:_0x343377,circle:_0x507213,clippingMask:_0x298a31,heatmap:_0x45a9dc,heatmapTexture:_0x215ea5,collisionBox:_0x2e244a,collisionCircle:_0x220457,debug:_0x3df2b2,fill:_0x2a9b4e,fillOutline:_0x44b33a,fillOutlinePattern:_0x3c5341,fillPattern:_0x4f56c5,fillExtrusion:_0x53ed86,fillExtrusionPattern:_0x227506,hillshadePrepare:_0x18370c,hillshade:_0x3dc877,line:_0x2bf6dd,lineGradient:_0x485f7f,linePattern:_0x508450,lineSDF:_0x153475,raster:_0x4e520b,symbolIcon:_0x575f26,symbolSDF:_0x2e8267,symbolTextAndIcon:_0xe87a72}),_0x588f34=(_0x21311a=!0,function(e,t){var i=_0x21311a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x21311a=!1,i}),_0x11d5fe=_0x588f34(void 0,(function(){return _0x11d5fe.toString().search("(((.+)+)+)+$").toString().constructor(_0x11d5fe).search("(((.+)+)+)+$")})),_0x21311a;_0x11d5fe();var _0x2cab4a=(_0x1098af=!0,function(e,t){var i=_0x1098af?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1098af=!1,i}),_0x19f5b0=_0x2cab4a(void 0,(function(){return _0x19f5b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x19f5b0).search("(((.+)+)+)+$")})),_0x1098af;_0x19f5b0();var _0x30411e={clippingMaskUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix)}},clippingMaskUniformValues:function(e){return{u_matrix:e}}},_0x19cc4a=(_0x1d02e3=!0,function(e,t){var i=_0x1d02e3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d02e3=!1,i}),_0x22a137=_0x19cc4a(void 0,(function(){return _0x22a137.toString().search("(((.+)+)+)+$").toString().constructor(_0x22a137).search("(((.+)+)+)+$")})),_0x1d02e3;_0x22a137();var _0x31af54={backgroundUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_opacity:new _0x5ec44f.Uniform1f(e,t.u_opacity),u_color:new _0x5ec44f.UniformColor(e,t.u_color)}},backgroundPatternUniforms:function(e,t){return{u_matrix:new _0x5ec44f.UniformMatrix4f(e,t.u_matrix),u_opacity:new _0x5ec44f.Uniform1f(e,t.u_opacity),u_image:new _0x5ec44f.Uniform1i(e,t.u_image),u_pattern_tl_a:new _0x5ec44f.Uniform2f(e,t.u_pattern_tl_a),u_pattern_br_a:new _0x5ec44f.Uniform2f(e,t.u_pattern_br_a),u_pattern_tl_b:new _0x5ec44f.Uniform2f(e,t.u_pattern_tl_b),u_pattern_br_b:new _0x5ec44f.Uniform2f(e,t.u_pattern_br_b),u_texsize:new _0x5ec44f.Uniform2f(e,t.u_texsize),u_mix:new _0x5ec44f.Uniform1f(e,t.u_mix),u_pattern_size_a:new _0x5ec44f.Uniform2f(e,t.u_pattern_size_a),u_pattern_size_b:new _0x5ec44f.Uniform2f(e,t.u_pattern_size_b),u_scale_a:new _0x5ec44f.Uniform1f(e,t.u_scale_a),u_scale_b:new _0x5ec44f.Uniform1f(e,t.u_scale_b),u_pixel_coord_upper:new _0x5ec44f.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x5ec44f.Uniform2f(e,t.u_pixel_coord_lower),u_tile_units_to_pixels:new _0x5ec44f.Uniform1f(e,t.u_tile_units_to_pixels)}},backgroundUniformValues:function(e,t,i){return{u_matrix:e,u_opacity:t,u_color:i}},backgroundPatternUniformValues:function(e,t,i,n,r,o){return extend$1(bgPatternUniformValues(n,o,i,r),{u_matrix:e,u_opacity:t})}},_0x252f58=(_0xfa75aa=!0,function(e,t){var i=_0xfa75aa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xfa75aa=!1,i}),_0x3b124f=_0x252f58(void 0,(function(){return _0x3b124f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b124f).search("(((.+)+)+)+$")})),_0xfa75aa;_0x3b124f(),_0x25c2d5.fillUniforms,_0x25c2d5.fillPatternUniforms,_0x25c2d5.fillOutlineUniforms,_0x25c2d5.fillOutlinePatternUniforms,_0x1d95cd.circleUniforms,_0x30411e.clippingMaskUniforms,_0x3889a8.lineUniforms,_0x3889a8.lineGradientUniforms,_0x3889a8.linePatternUniforms,_0x3889a8.lineSDFUniforms,_0x56c911.symbolIconUniforms,_0x56c911.symbolSDFUniforms,_0x56c911.symbolTextAndIconUniforms,_0x31af54.backgroundUniforms,_0x31af54.backgroundPatternUniforms;var _0x9fb4f2=(_0x5445b6=!0,function(e,t){var i=_0x5445b6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5445b6=!1,i}),_0x15ba01=_0x9fb4f2(void 0,(function(){return _0x15ba01.toString().search("(((.+)+)+)+$").toString().constructor(_0x15ba01).search("(((.+)+)+)+$")})),_0x5445b6;_0x15ba01();var _0x22b72e=0,_0x474204=1,_0x34e25f=771,_0x5062cb=function(e,t,i){this.blendFunction=e,this.blendColor=t,this.mask=i};_0x5062cb.Replace=[_0x474204,_0x22b72e],_0x5062cb.disabled=new _0x5062cb(_0x5062cb.Replace,_0x128d69.transparent,[!1,!1,!1,!1]),_0x5062cb.unblended=new _0x5062cb(_0x5062cb.Replace,_0x128d69.transparent,[!0,!0,!0,!0]),_0x5062cb.alphaBlended=new _0x5062cb([_0x474204,_0x34e25f],_0x128d69.transparent,[!0,!0,!0,!0]);var _0x3cb967=(_0x27e471=!0,function(e,t){var i=_0x27e471?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27e471=!1,i}),_0xda512c=_0x3cb967(void 0,(function(){return _0xda512c.toString().search("(((.+)+)+)+$").toString().constructor(_0xda512c).search("(((.+)+)+)+$")})),_0x27e471;_0xda512c();var _0x1fc842=function(e,t,i){this.context=e;var n=e.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(i),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),!this.dynamicDraw&&delete t.arrayBuffer};_0x1fc842.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},_0x1fc842.prototype.updateData=function(e){var t=this.context.gl;this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)},_0x1fc842.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var _0x3737b3=(_0x10b458=!0,function(e,t){var i=_0x10b458?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x10b458=!1,i}),_0x2d50c1=_0x3737b3(void 0,(function(){return _0x2d50c1.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d50c1).search("(((.+)+)+)+$")})),_0x10b458;_0x2d50c1();var _0x591b5c={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},_0x30d5ba=function(e,t,i,n){this.length=t.length,this.attributes=i,this.itemSize=t.bytesPerElement,this.dynamicDraw=n,this.context=e;var r=e.gl;this.buffer=r.createBuffer(),e.bindVertexBuffer.set(this.buffer),r.bufferData(r.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),!this.dynamicDraw&&delete t.arrayBuffer};_0x30d5ba.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},_0x30d5ba.prototype.updateData=function(e){var t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)},_0x30d5ba.prototype.enableAttributes=function(e,t){for(var i=0;i<this.attributes.length;i++){var n=this.attributes[i],r=t.attributes[n.name];void 0!==r&&e.enableVertexAttribArray(r)}},_0x30d5ba.prototype.setVertexAttribPointers=function(e,t,i){for(var n=0;n<this.attributes.length;n++){var r=this.attributes[n],o=t.attributes[r.name];void 0!==o&&e.vertexAttribPointer(o,r.components,e[_0x591b5c[r.type]],!1,this.itemSize,r.offset+this.itemSize*(i||0))}},_0x30d5ba.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var _0x2e64a9=function(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};_0x2e64a9.prototype.get=function(){return this.current},_0x2e64a9.prototype.set=function(e){},_0x2e64a9.prototype.getDefault=function(){return this.default},_0x2e64a9.prototype.setDefault=function(){this.set(this.default)};var _0x39809e={};_0x39809e.ClearColor=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return _0x128d69.transparent},t.prototype.set=function(e){this.current,this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1},t}(_0x2e64a9),_0x39809e.ClearDepth=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 1},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.ClearStencil=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.ColorMask=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[!0,!0,!0,!0]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.DepthMask=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.StencilMask=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 255},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.StencilFunc=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return{func:de$x.ALWAYS,ref:0,mask:255}},t.prototype.set=function(e){var t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.StencilOp=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl,[de$x.KEEP,de$x.KEEP,de$x.KEEP]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.StencilTest=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$x.STENCIL_TEST):t.disable(de$x.STENCIL_TEST),this.current=e,this.dirty=!1}},t}(_0x2e64a9),_0x39809e.DepthRange=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[0,1]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.DepthTest=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$x.DEPTH_TEST):t.disable(de$x.DEPTH_TEST),this.current=e,this.dirty=!1}},t}(_0x2e64a9),_0x39809e.DepthFunc=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return de$x.LESS},r.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)},r}(_0x2e64a9),_0x39809e.Blend=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$x.BLEND):t.disable(de$x.BLEND),this.current=e,this.dirty=!1}},t}(_0x2e64a9),_0x39809e.BlendFunc=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[de$x.ONE,de$x.ZERO]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.BlendColor=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return _0x128d69.transparent},t.prototype.set=function(e){var t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.BlendEquation=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$x.FUNC_ADD},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.CullFace=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$x.CULL_FACE):t.disable(de$x.CULL_FACE),this.current=e,this.dirty=!1}},t}(_0x2e64a9),_0x39809e.CullFaceSide=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$x.BACK},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.FrontFace=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$x.CCW},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.Program=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.ActiveTextureUnit=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$x.TEXTURE0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.Viewport=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[0,0,1,1]},t.prototype.set=function(e){this.current,this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1},t}(_0x2e64a9),_0x39809e.BindFramebuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}},t}(_0x2e64a9),_0x39809e.BindRenderbuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t}(_0x2e64a9),_0x39809e.BindTexture=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}},t}(_0x2e64a9),_0x39809e.BindVertexBuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},t}(_0x2e64a9),_0x39809e.BindElementBuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1},t}(_0x2e64a9),_0x39809e.BindVertexArrayOES=function(e){function t(t){e.call(this,t),this.vao=t.extVertexArrayObject}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){this.vao&&(e!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(e),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.BindVertexArray=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.bindVertexArray(e),this.current=e,this.dirty=!1)},t}(_0x2e64a9),_0x39809e.PixelStoreUnpack=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 4},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}},t}(_0x2e64a9),_0x39809e.PixelStoreUnpackPremultiplyAlpha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}},t}(_0x2e64a9),_0x39809e.PixelStoreUnpackFlipY=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}},t}(_0x2e64a9),_0x39809e.FramebufferAttachment=function(e){function t(t,i){e.call(this,t),this.context=t,this.parent=i}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t}(_0x2e64a9),_0x39809e.ColorAttachment=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setDirty=function(){this.dirty=!0},t.prototype.set=function(e){if(e!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}},t}(_0x39809e.FramebufferAttachment),_0x39809e.DepthAttachment=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){if(e!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t}(_0x39809e.FramebufferAttachment);var _0x73bcc6=(_0x954848=!0,function(e,t){var i=_0x954848?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x954848=!1,i}),_0x58a17d=_0x73bcc6(void 0,(function(){return _0x58a17d.toString().search("(((.+)+)+)+$").toString().constructor(_0x58a17d).search("(((.+)+)+)+$")})),_0x954848;_0x58a17d();var _0x4fc2da=function(e){var t=e._gl;this.webgl2=e.webgl2,this.gl=t,this.clearColor=new _0x39809e.ClearColor(this),this.clearDepth=new _0x39809e.ClearDepth(this),this.clearStencil=new _0x39809e.ClearStencil(this),this.colorMask=new _0x39809e.ColorMask(this),this.depthMask=new _0x39809e.DepthMask(this),this.stencilMask=new _0x39809e.StencilMask(this),this.stencilFunc=new _0x39809e.StencilFunc(this),this.stencilOp=new _0x39809e.StencilOp(this),this.stencilTest=new _0x39809e.StencilTest(this),this.depthRange=new _0x39809e.DepthRange(this),this.depthTest=new _0x39809e.DepthTest(this),this.depthFunc=new _0x39809e.DepthFunc(this),this.blend=new _0x39809e.Blend(this),this.blendFunc=new _0x39809e.BlendFunc(this),this.blendColor=new _0x39809e.BlendColor(this),this.blendEquation=new _0x39809e.BlendEquation(this),this.cullFace=new _0x39809e.CullFace(this),this.cullFaceSide=new _0x39809e.CullFaceSide(this),this.frontFace=new _0x39809e.FrontFace(this),this.program=new _0x39809e.Program(this),this.activeTexture=new _0x39809e.ActiveTextureUnit(this),this.viewport=new _0x39809e.Viewport(this),this.bindFramebuffer=new _0x39809e.BindFramebuffer(this),this.bindRenderbuffer=new _0x39809e.BindRenderbuffer(this),this.bindTexture=new _0x39809e.BindTexture(this),this.bindVertexBuffer=new _0x39809e.BindVertexBuffer(this),this.bindElementBuffer=new _0x39809e.BindElementBuffer(this),this.webgl2?this.bindVertexArray=new _0x39809e.BindVertexArray(this):this.bindVertexArray=this.extVertexArrayObject&&new _0x39809e.BindVertexArrayOES(this),this.pixelStoreUnpack=new _0x39809e.PixelStoreUnpack(this),this.pixelStoreUnpackPremultiplyAlpha=new _0x39809e.PixelStoreUnpackPremultiplyAlpha(this),this.pixelStoreUnpackFlipY=new _0x39809e.PixelStoreUnpackFlipY(this),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTimerQuery=!1};function _0x51d172(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!_0x51d172(e[i],t[i]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!_0x51d172(e[n],t[n]))return!1;return!0}return e===t}_0x4fc2da.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},_0x4fc2da.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray&&(this.bindVertexArray.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},_0x4fc2da.prototype.createIndexBuffer=function(e,t){return new _0x1fc842(this,e,t)},_0x4fc2da.prototype.createVertexBuffer=function(e,t,i){return new _0x30d5ba(this,e,t,i)},_0x4fc2da.prototype.createRenderbuffer=function(e,t,i){var n=this.gl,r=n.createRenderbuffer();return this.bindRenderbuffer.set(r),n.renderbufferStorage(n.RENDERBUFFER,e,t,i),this.bindRenderbuffer.set(null),r},_0x4fc2da.prototype.createFramebuffer=function(e,t){return new Framebuffer(this,e,t)},_0x4fc2da.prototype.clear=function(e){var t=e.color,i=e.depth,n=this.gl,r=0;t&&(r|=n.COLOR_BUFFER_BIT,this.clearColor.set(t),this.colorMask.set([!0,!0,!0,!0])),void 0!==i&&(r|=n.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(i),this.depthMask.set(!0)),n.clear(r)},_0x4fc2da.prototype.setCullFace=function(e){!1===e.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))},_0x4fc2da.prototype.setDepthMode=function(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)},_0x4fc2da.prototype.setStencilMode=function(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)},_0x4fc2da.prototype.setColorMode=function(e){_0x51d172(e.blendFunction,_0x5062cb.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},_0x4fc2da.prototype.unbindVAO=function(){this.bindVertexArray&&this.bindVertexArray.set(null)};var _0x45a52e=(_0x4dcbd9=!0,function(e,t){var i=_0x4dcbd9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4dcbd9=!1,i}),_0x4dfd6a=_0x45a52e(void 0,(function(){return _0x4dfd6a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4dfd6a).search("(((.+)+)+)+$")})),_0x4dcbd9;_0x4dfd6a();var _0x296642={circle:_0x5521d4,line:_0x14f79a,fill:_0x3433dc,symbol:_0x50b8ab},_0x1e2754=_0x55f30f([{name:"a_pos",type:"Int16",components:2}]),_0x391a82=function(e,t,i){this.cesiumContext=e,this.context=new _0x4fc2da(e),this.width=i,this.height=i,this.transform=t,this.transform.resize(this.width,this.height),this._globalLineWidthScale=1,this.setup(),this.numSublayers=1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new _0x5489a3,this.clearCommand=new t$X({color:new e$1U(0,0,0,0),depth:1})};function _0x13a936(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function _0x42732f(e,t,i,n,r,o,a){var s=1/(t-i),l=1/(n-r),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+i)*s,e[13]=(r+n)*l,e[14]=(a+o)*u,e[15]=1,e}function _0x4634e5(e,t,i){var n=i[0],r=i[1],o=i[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}_0x391a82.prototype.resize=function(e,t){var i=this.context.gl;if(this.width=e,this.height=t,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,r=this.style._order;n<r.length;n+=1){var o=r[n];this.style._layers[o].resize()}this.depthRbo&&(i.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},_0x391a82.prototype.setup=function(){this.context;var e=new _0x18a187;e.emplaceBack(0,0),e.emplaceBack(ae$s,0),e.emplaceBack(0,ae$s),e.emplaceBack(ae$s,ae$s),this.tileExtentBuffer=_0x3cb0f8.toVertexBuffer(this.cesiumContext,e,_0x1e2754.members),this.tileExtentSegments=_0x4b6d5a.simpleSegment(0,0,4,2);var t=new _0x18a187;t.emplaceBack(0,0),t.emplaceBack(ae$s,0),t.emplaceBack(0,ae$s),t.emplaceBack(ae$s,ae$s),this.debugBuffer=_0x3cb0f8.toVertexBuffer(this.cesiumContext,t,_0x1e2754.members),this.debugSegments=_0x4b6d5a.simpleSegment(0,0,4,5);var i=new _0x18a187;i.emplaceBack(0,0),i.emplaceBack(1,0),i.emplaceBack(0,1),i.emplaceBack(1,1),this.viewportBuffer=_0x3cb0f8.toVertexBuffer(this.cesiumContext,i,_0x1e2754.members),this.viewportSegments=_0x4b6d5a.simpleSegment(0,0,4,2);var n=new _0x53e7bb;n.emplaceBack(0),n.emplaceBack(1),n.emplaceBack(3),n.emplaceBack(2),n.emplaceBack(0),this.tileBorderIndexBuffer=_0x3cb0f8.toIndexBuffer(this.cesiumContext,n);var r=new _0xbd6def;r.emplaceBack(0,1,2),r.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=_0x3cb0f8.toIndexBuffer(this.cesiumContext,r),this.context.gl,this.stencilClearMode=new _0x411737({func:de$x.ALWAYS,mask:0},0,255,de$x.ZERO,de$x.ZERO,de$x.ZERO)},_0x391a82.prototype.clearStencil=function(){var e=this.context,t=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var i=_0x13a936();_0x42732f(i,0,this.width,this.height,0,0,1),_0x4634e5(i,i,[this.width,this.height,0]),this.useProgram("clippingMask").draw(e,t.TRIANGLES,_0x37eb97.disabled,this.stencilClearMode,_0x5062cb.disabled,_0x262381.disabled,_0x30411e.clippingMaskUniformValues(i),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},_0x391a82.prototype._renderTileClippingMasks=function(e,t){if(this.currentStencilSource!==e.source&&e.isTileClipped()&&t&&t.length){this.currentStencilSource=e.source;var i=this.context,n=i.gl;this.nextStencilID+t.length>256&&this.clearStencil(),i.setColorMode(_0x5062cb.disabled),i.setDepthMode(_0x37eb97.disabled);var r=this.useProgram("clippingMask").program;this._tileClippingMaskIDs={};for(var o=0,a=t;o<a.length;o+=1){var s=a[o],l=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;r.draw(i,n.TRIANGLES,_0x37eb97.disabled,new _0x411737({func:n.ALWAYS,mask:0},l,255,n.KEEP,n.KEEP,n.REPLACE),_0x5062cb.disabled,_0x262381.disabled,_0x30411e.clippingMaskUniformValues(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},_0x391a82.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new _0x411737({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},_0x391a82.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new _0x411737({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},_0x391a82.prototype.colorModeForRenderPass=function(){var e=this.context.gl;if(this._showOverdrawInspector){var t=1/8;return new _0x5062cb([e.CONSTANT_COLOR,e.ONE],new _0x128d69(t,t,t,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?_0x5062cb.unblended:_0x5062cb.alphaBlended},_0x391a82.prototype.depthModeForSublayer=function(e,t,i){if(!this.opaquePassEnabledForLayer())return _0x37eb97.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new _0x37eb97(i||de$x.LEQUAL,t,[n,n])},_0x391a82.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},_0x391a82.prototype.renderOneTile=function(e,t,i){this.style=e,this.options=i,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager;var n=this.style._order;for(this.clearCommand.execute(this.cesiumContext,i.passState),this._showOverdrawInspector=!1,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.opaquePassCutoff=1/0,this.renderPass="opaque",this.currentLayer=n.length-1;this.currentLayer>=0;this.currentLayer--){var r=this.style._layers[n[this.currentLayer]];this.renderLayerForOneTile(this,t,r,i)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<n.length;this.currentLayer++){var o=this.style._layers[n[this.currentLayer]];this.renderLayerForOneTile(this,t,o,i)}},_0x391a82.prototype.render=function(e,t){this.style=e,this.options=t,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(ref_properties.browser.now()),this.imageManager.beginFrame();var i=this.style._order,n=this.style.sourceCaches;for(var r in n){var o=n[r];o.used&&o.prepare(this.context)}var a={},s={},l={};for(var u in n){var c=n[u];a[u]=c.getVisibleCoordinates(),s[u]=a[u].slice().reverse(),l[u]=c.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var h=0;h<i.length;h++){var d=i[h];if(this.style._layers[d].is3D()){this.opaquePassCutoff=h;break}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:t.showOverdrawInspector?_0x128d69.black:_0x128d69.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=t.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){var f=this.style._layers[i[this.currentLayer]],p=n[f.source],_=a[f.source];this._renderTileClippingMasks(f,_),this.renderLayer(this,p,f,_)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<i.length;this.currentLayer++){var m=this.style._layers[i[this.currentLayer]],g=n[m.source],x=("symbol"===m.type?l:s)[m.source];this._renderTileClippingMasks(m,a[m.source]),this.renderLayer(this,g,m,x)}this.context.setDefault()},_0x391a82.prototype.setupOffscreenDepthRenderbuffer=function(){var e=this.context;!this.depthRbo&&(this.depthRbo=e.createRenderbuffer(e.gl.DEPTH_COMPONENT16,this.width,this.height))},_0x391a82.prototype.renderLayerForOneTile=function(e,t,i,n){null!=i&&(i.isHidden(t.requestZ)||(this.id=i.id,_0x296642[i.type](e,t,i,n)))},_0x391a82.prototype.renderLayer=function(e,t,i,n){i.isHidden(this.transform.zoom)||("background"===i.type||"custom"===i.type||n.length)&&(this.id=i.id,_0x296642[i.type](e,t,i,n,this.style.placement.variableOffsets))},_0x391a82.prototype.translatePosMatrix=function(e,t,i,n,r){if(!i[0]&&!i[1])return e;var o=r?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(o){var a=Math.sin(o),s=Math.cos(o);i=[i[0]*s-i[1]*a,i[0]*a+i[1]*s]}var l=[r?i[0]:pixelsToTileUnits(t,i[0],this.transform.zoom),r?i[1]:pixelsToTileUnits(t,i[1],this.transform.zoom),0],u=new Float32Array(16);return _0x3f85ef.mat4.translate(u,e,l),u},_0x391a82.prototype.isPatternMissing=function(e){if(!e)return!1;var t=this.imageManager.getPattern(e.from.toString()),i=this.imageManager.getPattern(e.to.toString());return!t||!i},_0x391a82.prototype.useProgram=function(e,t,i){void 0===t&&(t=this.emptyProgramConfiguration),this.cache=this.cache||{};var n=""+e+(t.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");if(!this.cache[n]){var r=_0x15007c[e];this.cache[n]={};var o=t.defines(),a=_0x15007c.prelude.vertexSource.concat(r.vertexSource),s=_0x15007c.prelude.fragmentSource.concat(r.fragmentSource),l=new s$U({name:e+"_vp",defines:o,sources:[a]}),u=new s$U({name:e+"_fp",defines:o,sources:[s]}),c=i||t.getAttributeLocation(),h=r$13.fromCache({name:n,context:this.cesiumContext,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});this.cache[n].cesiumProgram=h}return this.cache[n]},_0x391a82.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},_0x391a82.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)};var _0x3241b=(_0x11001d=!0,function(e,t){var i=_0x11001d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x11001d=!1,i}),_0x2c612e=_0x3241b(void 0,(function(){return _0x2c612e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c612e).search("(((.+)+)+)+$")})),_0x11001d;function _0x1751f1(e,t,i,n,r){for(var o=r.patternDependencies,a=0,s=t;a<s.length;a+=1){var l=s[a],u=l.paint.get(e+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:n-1},i,{},r.availableImages),h=u.evaluate({zoom:n},i,{},r.availableImages),d=u.evaluate({zoom:n+1},i,{},r.availableImages);c=c&&c.name?c.name:c,h=h&&h.name?h.name:h,d=d&&d.name?d.name:d,o[c]=!0,o[h]=!0,o[d]=!0,i.patterns[l.id]={min:c,mid:h,max:d}}}return i}_0x2c612e();var _0x2af788=(_0x2fbdd1=!0,function(e,t){var i=_0x2fbdd1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2fbdd1=!1,i}),_0x88edbb=_0x2af788(void 0,(function(){return _0x88edbb.toString().search("(((.+)+)+)+$").toString().constructor(_0x88edbb).search("(((.+)+)+)+$")})),_0x2fbdd1;function _0x10bcf8(e,t,i){for(var n=i.patternDependencies,r=!1,o=0,a=t;o<a.length;o+=1){var s=a[o].paint.get(e+"-pattern");!s.isConstant()&&(r=!0);var l=s.constantOr(null);l&&(r=!0,n[l.to]=!0,n[l.from]=!0)}return r}if(_0x88edbb(),typeof WebAssembly<"u"){let e=function(e){return t$H.locateFile?t$H.locateFile(e,O$D):O$D+e},t=function(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1)},i=function(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return _$M[e>>0];case"i16":return A$_[e>>1];case"i32":case"i64":return w$P[e>>2];case"float":return _e$q[e>>2];case"double":return pe$s[e>>3];default:de("invalid type for getValue: "+t)}return null},n=function(e,t){e||de("Assertion failed: "+t)},r=function(e){var t=t$H["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=z$O(i),c(e,t,i)}return t},array:function(e){var t=z$O(e.length);return h(e,t),t}};var u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p<o.length;p++){var _=s[i[p]];_?(0===f&&(f=de$r()),d[p]=_(o[p])):d[p]=o[p]}var m=u.apply(null,d);return m=function(e){return"string"===t?l(e):"boolean"===t?Boolean(e):e}(m),0!==f&&Je$8(f),m},a=function(e,t,i,n){return function(){return o(e,t,i,arguments)}},s=function(e,i,n){for(var r=i+n,o=i;e[o]&&!(o>=r);)++o;if(o-i>16&&e.subarray&&ke$d)return ke$d.decode(e.subarray(i,o));for(var a="";i<o;){var s=e[i++];if(128&s){var l=63&e[i++];if(192!=(224&s)){var u=63&e[i++];if(224==(240&s)?s=(15&s)<<12|l<<6|u:(240!=(248&s)&&t("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),s=(7&s)<<18|l<<12|u<<6|63&e[i++]),s<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(b$13,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343)l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s);if(l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,b$13,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),_$M.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return t$H.extraStackTrace&&(e+="\n"+t$H.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){t$H.HEAP8=_$M=new Int8Array(E$T),t$H.HEAP16=A$_=new Int16Array(E$T),t$H.HEAP32=w$P=new Int32Array(E$T),t$H.HEAPU8=b$13=new Uint8Array(E$T),t$H.HEAPU16=new Uint16Array(E$T),t$H.HEAPU32=D$S=new Uint32Array(E$T),t$H.HEAPF32=_e$q=new Float32Array(E$T),t$H.HEAPF64=pe$s=new Float64Array(E$T)},g=function(){n(0==(3&N$K)),D$S[(N$K>>2)-1]=34821223,D$S[(N$K>>2)-2]=2310721022},x=function(){(34821223!=D$S[(N$K>>2)-1]||2310721022!=D$S[(N$K>>2)-2])&&de("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+D$S[(N$K>>2)-2].toString(16)+" "+D$S[(N$K>>2)-1].toString(16)),1668509029!==w$P[0]&&de("Runtime error: The application has corrupted its heap memory area (address zero)!")},v=function(e){de("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(N$K-de$r()+e)+" bytes available!")},y=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?t$H.dynCall_v(i):t$H.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},$=function(){if(t$H.preRun)for("function"==typeof t$H.preRun&&(t$H.preRun=[t$H.preRun]);t$H.preRun.length;)S(t$H.preRun.shift());y(je$e)},b=function(){x(),!u$L&&(u$L=!0,y(Ge$g))},T=function(){x(),y(We$k)},C=function(){if(x(),t$H.postRun)for("function"==typeof t$H.postRun&&(t$H.postRun=[t$H.postRun]);t$H.postRun.length;)w(t$H.postRun.shift());y(qe$d)},S=function(e){je$e.unshift(e)},w=function(e){qe$d.unshift(e)},E=function(e){C$U++,t$H.monitorRunDependencies&&t$H.monitorRunDependencies(C$U),e&&(n(!P$P[e]),P$P[e]=1,null===k$N&&typeof setInterval<"u"&&(k$N=setInterval((function(){if(ne$E)return clearInterval(k$N),void(k$N=null)}),1e4)))},P=function(e){if(C$U--,t$H.monitorRunDependencies&&t$H.monitorRunDependencies(C$U),e&&(n(P$P[e]),delete P$P[e]),0==C$U&&(null!==k$N&&(clearInterval(k$N),k$N=null),$$R)){var t=$$R;$$R=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(Ve$h):0===e.indexOf(Ve$h)},L=function(){try{if(t$H.wasmBinary)return new Uint8Array(t$H.wasmBinary);if(t$H.readBinary)return t$H.readBinary(S$K);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}},M=function(){return t$H.wasmBinary||!V$J&&!I$11||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(S$K,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+S$K+"'";return e.arrayBuffer()})).catch((function(){return L()}))},R=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Yt$6};function i(e,t){var i=e.exports;t$H.asm=i,P("wasm-instantiate")}E("wasm-instantiate");var r=t$H;function o(e){n(t$H===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(t$H.instantiateWasm)try{return t$H.instantiateWasm(t,i)}catch{return!1}return function(){if(t$H.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(S$K)||"function"!=typeof fetch)return a(o);fetch(S$K,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},O=function(e){return ie$A(e)},I=function(e){e&&B$P[e].refcount++},D=function(e){if(!e||B$P[e])return e;for(var t in B$P)for(var i=+t,n=B$P[i].adjusted,r=n.length,o=0;o<r;o++)if(n[o]===e)return i;return e},B=function(e){var t=B$P[e];return t&&!t.caught&&(t.caught=!0,K$L.uncaught_exception--),t&&(t.rethrown=!1),rn$3.push(e),I(D(e)),e},N=function(e,t,i){throw B$P[e]={ptr:e,adjusted:[e],type:t,destructor:i,refcount:0,caught:!1,rethrown:!1},"uncaught_exception"in K$L?K$L.uncaught_exception++:K$L.uncaught_exception=1,e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."},F=function(){return!!K$L.uncaught_exception},U=function(){},G=function(){},z=function(e,t){d$11.varargs=t;try{d$11.getStreamFromFD(),d$11.get(),d$11.get(),d$11.get(),d$11.get();return de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$P>"u"||!(e instanceof y$P.ErrnoError))&&de(e),-e.errno}},V=function(){var e=t$H._fflush;e&&e(0);var t=d$11.buffers;t[1].length&&d$11.printChar(1,10),t[2].length&&d$11.printChar(2,10)},k=function(e,t){d$11.varargs=t;try{for(var i=d$11.get(),n=d$11.get(),r=d$11.get(),o=0,a=0;a<r;a++){for(var s=w$P[n+8*a>>2],l=w$P[n+(8*a+4)>>2],u=0;u<l;u++)d$11.printChar(i,b$13[s+u]);o+=l}return o}catch(e){return(typeof y$P>"u"||!(e instanceof y$P.ErrnoError))&&de(e),-e.errno}},W=function(e,t){d$11.varargs=t;try{return 0}catch(e){return(typeof y$P>"u"||!(e instanceof y$P.ErrnoError))&&de(e),-e.errno}},H=function(e,t){d$11.varargs=t;try{d$11.getStreamFromFD();return de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$P>"u"||!(e instanceof y$P.ErrnoError))&&de(e),-e.errno}},q=function(){},j=function(){t$H.abort()},Y=function(){return _$M.length},X=function(e,t,i){b$13.set(b$13.subarray(t,t+i),e)},K=function(e){if(!t$H.___errno_location)return e;w$P[t$H.___errno_location()>>2]=e},Q=function(e){de("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+_$M.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},Z=function(e){e=_(e,65536);var t=E$T.byteLength;try{return-1!==Y$G.grow((e-t)/65536)&&(E$T=Y$G.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},J=function(e){var i=Y();n(e>i);var r=65536,o=2147418112;if(e>o)return!1;for(var a=Math.max(i,16777216);a<e;)(a=a<=536870912?_(2*a,r):Math.min(_((3*a+2147483648)/4,r),o))===i&&t("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+_$M.length);return!!Z(a)&&(m(),!0)},ee=function(e){T$Q("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$Q("Build with ASSERTIONS=2 for more info."),de(e)},te=function(e){T$Q("Invalid function pointer called with signature 'iidiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$Q("Build with ASSERTIONS=2 for more info."),de(e)},ie=function(e){T$Q("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$Q("Build with ASSERTIONS=2 for more info."),de(e)},ne=function(e){T$Q("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$Q("Build with ASSERTIONS=2 for more info."),de(e)},re=function(e){T$Q("Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$Q("Build with ASSERTIONS=2 for more info."),de(e)},oe=function(e){T$Q("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$Q("Build with ASSERTIONS=2 for more info."),de(e)},ae=function(e){T$Q("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$Q("Build with ASSERTIONS=2 for more info."),de(e)},se=function(e){T$Q("Invalid function pointer called with signature 'viiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$Q("Build with ASSERTIONS=2 for more info."),de(e)},le=function(e){T$Q("Invalid function pointer called with signature 'viiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$Q("Build with ASSERTIONS=2 for more info."),de(e)},ue=function(e){T$Q("Invalid function pointer called with signature 'viiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$Q("Build with ASSERTIONS=2 for more info."),de(e)},ce=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},he=function(e){function t(){t$H.calledRun||(t$H.calledRun=!0,!ne$E&&(b(),T(),t$H.onRuntimeInitialized&&t$H.onRuntimeInitialized(),n(!t$H._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),C()))}e=e||t$H.arguments,C$U>0||(g(),$(),C$U>0)||t$H.calledRun||(t$H.setStatus?(t$H.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t$H.setStatus("")}),1),t()}),1)):t(),x())},de=function(e){t$H.onAbort&&t$H.onAbort(e),ne$E=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw Ye$e&&Ye$e.forEach((function(i){t=i(t,e)})),t};var t$H=typeof t$H<"u"?t$H:{},q$X={},U$S;for(U$S in t$H)t$H.hasOwnProperty(U$S)&&(q$X[U$S]=t$H[U$S]);t$H.arguments=[],t$H.thisProgram="./this.program",t$H.quit=function(e,t){throw t},t$H.preRun=[],t$H.postRun=[];var V$J=!1,I$11=!1,fe$q=!1,Ae$p=!1,Ne$h=!1;if(V$J="object"==typeof window,I$11="function"==typeof importScripts,Ae$p="object"==typeof process&&"function"==typeof require,fe$q=Ae$p&&!V$J&&!I$11,Ne$h=!V$J&&!fe$q&&!I$11,t$H.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var O$D="",ce$r,le$v;if(fe$q)O$D=__dirname+"/",t$H.read=function(e,t){var i;return ce$r||(ce$r=require("fs")),le$v||(le$v=require("path")),e=le$v.normalize(e),i=ce$r.readFileSync(e),t?i:i.toString()},t$H.readBinary=function(e){var t=t$H.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(t$H.thisProgram=process.argv[1].replace(/\\/g,"/")),t$H.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=t$H),process.on("uncaughtException",(function(e){if(!(e instanceof ce))throw e})),process.on("unhandledRejection",de),t$H.quit=function(e){process.exit(e)},t$H.inspect=function(){return"[Emscripten Module object]"};else if(Ne$h)typeof read<"u"&&(t$H.read=function(e){return read(e)}),t$H.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?t$H.arguments=scriptArgs:typeof arguments<"u"&&(t$H.arguments=arguments),"function"==typeof quit&&(t$H.quit=function(e){quit(e)});else{if(!V$J&&!I$11)throw new Error("environment detection error");I$11?O$D=self.location.href:document.currentScript&&(O$D=document.currentScript.src),O$D=0!==O$D.indexOf("blob:")?O$D.substr(0,O$D.lastIndexOf("/")+1):"",t$H.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},I$11&&(t$H.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),t$H.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},t$H.setWindowTitle=function(e){document.title=e}}var J$M=t$H.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),T$Q=t$H.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||J$M);for(U$S in q$X)q$X.hasOwnProperty(U$S)&&(t$H[U$S]=q$X[U$S]);q$X=void 0,n(typeof t$H.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$H.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$H.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$H.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),de$r=Je$8=z$O=function(){de("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Yt$6={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var Ie$k=0,Zt$5=function(e){Ie$k=e},$t$5=function(){return Ie$k};"object"!=typeof WebAssembly&&de("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Y$G,ne$E=!1,ke$d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Qe$b=65536,E$T,_$M,b$13,A$_,w$P,D$S,_e$q,pe$s,Pe$i=5872,N$K=5248752,Be$j=5248752,Z$O=5840;n(Pe$i%16==0,"stack must start aligned"),n(Be$j%16==0,"heap must start aligned");var Te$m=5242880;t$H.TOTAL_STACK&&n(Te$m===t$H.TOTAL_STACK,"the stack size can no longer be determined at runtime");var X$O=t$H.TOTAL_MEMORY||16777216;if(X$O<Te$m&&T$Q("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+X$O+"! (TOTAL_STACK="+Te$m+")"),n(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),t$H.buffer?(E$T=t$H.buffer,n(E$T.byteLength===X$O,"provided buffer should be "+X$O+" bytes, but it is "+E$T.byteLength)):("object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(n(X$O%Qe$b==0),Y$G=new WebAssembly.Memory({initial:X$O/Qe$b}),E$T=Y$G.buffer):E$T=new ArrayBuffer(X$O),n(E$T.byteLength===X$O)),m(),w$P[Z$O>>2]=Be$j,w$P[0]=1668509029,A$_[1]=25459,115!==b$13[2]||99!==b$13[3])throw"Runtime error: expected the system to be little-endian!";var je$e=[],Ge$g=[],We$k=[],qe$d=[],u$L=!1,h$R=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var C$U=0,k$N=null,$$R=null,P$P={};t$H.preloadedImages={},t$H.preloadedAudios={};var y$P={error:function(){de("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){y$P.error()},createDataFile:function(){y$P.error()},createPreloadedFile:function(){y$P.error()},createLazyFile:function(){y$P.error()},open:function(){y$P.error()},mkdev:function(){y$P.error()},registerDevice:function(){y$P.error()},analyzePath:function(){y$P.error()},loadFilesFromDB:function(){y$P.error()},ErrnoError:function(){y$P.error()}};t$H.FS_createDataFile=y$P.createDataFile,t$H.FS_createPreloadedFile=y$P.createPreloadedFile;var Ve$h="data:application/octet-stream;base64,",S$K,nn$2=typeof window>"u"?self:window;S$K=nn$2.location.href.endsWith(".openrealspace")?"../../static/Build/SuperMap3D/ThirdParty/earcut.wasm":"ThirdParty/earcut.wasm",A(S$K)||(S$K=e(S$K)),t$H.asm=function(e,t,i){t.memory=Y$G,t.table=new WebAssembly.Table({initial:260,maximum:260,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=R(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var F$X=5856;n(F$X%8==0);var B$P={},rn$3=[],d$11={buffers:[null,[],[]],printChar:function(e,t){var i=d$11.buffers[e];n(i),0===t||10===t?((1===e?J$M:T$Q)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return d$11.varargs+=4,w$P[d$11.varargs-4>>2]},getStr:function(){return l(d$11.get())},get64:function(){var e=d$11.get(),t=d$11.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===d$11.get())}},sn$2={},fn$2={abort:de,setTempRet0:Zt$5,getTempRet0:$t$5,abortStackOverflow:v,nullFunc_ii:ee,nullFunc_iidiiii:te,nullFunc_iiii:ie,nullFunc_jiji:ne,nullFunc_v:re,nullFunc_vi:oe,nullFunc_vii:ae,nullFunc_viiii:se,nullFunc_viiiii:le,nullFunc_viiiiii:ue,___cxa_allocate_exception:O,___cxa_begin_catch:B,___cxa_throw:N,___cxa_uncaught_exception:F,___exception_addRef:I,___exception_deAdjust:D,___gxx_personality_v0:U,___lock:G,___setErrNo:K,___syscall140:z,___syscall146:k,___syscall54:W,___syscall6:H,___unlock:q,_abort:j,_emscripten_get_heap_size:Y,_emscripten_memcpy_big:X,_emscripten_resize_heap:J,abortOnCannotGrowMemory:Q,emscripten_realloc_buffer:Z,flush_NO_FILESYSTEM:V,tempDoublePtr:F$X,DYNAMICTOP_PTR:Z$O},p$Q=t$H.asm(sn$2,fn$2,E$T),cn$2=p$Q.__ZSt18uncaught_exceptionv;p$Q.__ZSt18uncaught_exceptionv=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),cn$2.apply(null,arguments)};var ln$2=p$Q.___cxa_can_catch;p$Q.___cxa_can_catch=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ln$2.apply(null,arguments)};var un$2=p$Q.___cxa_is_pointer_type;p$Q.___cxa_is_pointer_type=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),un$2.apply(null,arguments)};var hn$2=p$Q.___errno_location;p$Q.___errno_location=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),hn$2.apply(null,arguments)};var _n$2=p$Q._earcut;p$Q._earcut=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),_n$2.apply(null,arguments)};var pn$2=p$Q._fflush;p$Q._fflush=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),pn$2.apply(null,arguments)};var Tn$2=p$Q._free;p$Q._free=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Tn$2.apply(null,arguments)};var dn$1=p$Q._llvm_maxnum_f64;p$Q._llvm_maxnum_f64=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),dn$1.apply(null,arguments)};var gn$2=p$Q._llvm_minnum_f64;p$Q._llvm_minnum_f64=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),gn$2.apply(null,arguments)};var vn$2=p$Q._malloc;p$Q._malloc=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),vn$2.apply(null,arguments)};var mn$2=p$Q._sbrk;p$Q._sbrk=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),mn$2.apply(null,arguments)};var yn=p$Q.establishStackSpace;p$Q.establishStackSpace=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),yn.apply(null,arguments)};var wn$1=p$Q.stackAlloc;p$Q.stackAlloc=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wn$1.apply(null,arguments)};var En$2=p$Q.stackRestore;p$Q.stackRestore=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),En$2.apply(null,arguments)};var Rn$1=p$Q.stackSave;p$Q.stackSave=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Rn$1.apply(null,arguments)},t$H.asm=p$Q;var K$L=t$H.__ZSt18uncaught_exceptionv=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.__ZSt18uncaught_exceptionv.apply(null,arguments)};t$H.___cxa_can_catch=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.___cxa_can_catch.apply(null,arguments)},t$H.___cxa_is_pointer_type=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.___cxa_is_pointer_type.apply(null,arguments)},t$H.___errno_location=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.___errno_location.apply(null,arguments)},t$H._earcut=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._earcut.apply(null,arguments)},t$H._emscripten_replace_memory=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._emscripten_replace_memory.apply(null,arguments)},t$H._fflush=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._fflush.apply(null,arguments)},t$H._free=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._free.apply(null,arguments)},t$H._llvm_maxnum_f64=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._llvm_maxnum_f64.apply(null,arguments)},t$H._llvm_minnum_f64=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._llvm_minnum_f64.apply(null,arguments)};var ie$A=t$H._malloc=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._malloc.apply(null,arguments)};t$H._memcpy=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._memcpy.apply(null,arguments)},t$H._memset=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._memset.apply(null,arguments)},t$H._sbrk=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm._sbrk.apply(null,arguments)},t$H.establishStackSpace=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.establishStackSpace.apply(null,arguments)};var z$O=t$H.stackAlloc=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.stackAlloc.apply(null,arguments)},Je$8=t$H.stackRestore=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.stackRestore.apply(null,arguments)},de$r=t$H.stackSave=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.stackSave.apply(null,arguments)};t$H.dynCall_ii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_ii.apply(null,arguments)},t$H.dynCall_iidiiii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_iidiiii.apply(null,arguments)},t$H.dynCall_iiii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_iiii.apply(null,arguments)},t$H.dynCall_jiji=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_jiji.apply(null,arguments)},t$H.dynCall_v=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_v.apply(null,arguments)},t$H.dynCall_vi=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_vi.apply(null,arguments)},t$H.dynCall_vii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_vii.apply(null,arguments)},t$H.dynCall_viiii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_viiii.apply(null,arguments)},t$H.dynCall_viiiii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_viiiii.apply(null,arguments)},t$H.dynCall_viiiiii=function(){return n(u$L,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$R,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$H.asm.dynCall_viiiiii.apply(null,arguments)},t$H.asm=p$Q,t$H.intArrayFromString||(t$H.intArrayFromString=function(){de("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.intArrayToString||(t$H.intArrayToString=function(){de("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.ccall=o,t$H.cwrap=a,t$H.setValue||(t$H.setValue=function(){de("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getValue=i,t$H.allocate||(t$H.allocate=function(){de("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getMemory||(t$H.getMemory=function(){de("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.AsciiToString||(t$H.AsciiToString=function(){de("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stringToAscii||(t$H.stringToAscii=function(){de("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.UTF8ArrayToString||(t$H.UTF8ArrayToString=function(){de("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.UTF8ToString||(t$H.UTF8ToString=function(){de("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stringToUTF8Array||(t$H.stringToUTF8Array=function(){de("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stringToUTF8||(t$H.stringToUTF8=function(){de("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.lengthBytesUTF8||(t$H.lengthBytesUTF8=function(){de("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.UTF16ToString||(t$H.UTF16ToString=function(){de("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stringToUTF16||(t$H.stringToUTF16=function(){de("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.lengthBytesUTF16||(t$H.lengthBytesUTF16=function(){de("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.UTF32ToString||(t$H.UTF32ToString=function(){de("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stringToUTF32||(t$H.stringToUTF32=function(){de("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.lengthBytesUTF32||(t$H.lengthBytesUTF32=function(){de("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.allocateUTF8||(t$H.allocateUTF8=function(){de("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stackTrace||(t$H.stackTrace=function(){de("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addOnPreRun||(t$H.addOnPreRun=function(){de("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addOnInit||(t$H.addOnInit=function(){de("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addOnPreMain||(t$H.addOnPreMain=function(){de("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addOnExit||(t$H.addOnExit=function(){de("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addOnPostRun||(t$H.addOnPostRun=function(){de("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.writeStringToMemory||(t$H.writeStringToMemory=function(){de("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.writeArrayToMemory||(t$H.writeArrayToMemory=function(){de("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.writeAsciiToMemory||(t$H.writeAsciiToMemory=function(){de("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addRunDependency||(t$H.addRunDependency=function(){de("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.removeRunDependency||(t$H.removeRunDependency=function(){de("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.ENV||(t$H.ENV=function(){de("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.FS||(t$H.FS=function(){de("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.FS_createFolder||(t$H.FS_createFolder=function(){de("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_createPath||(t$H.FS_createPath=function(){de("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_createDataFile||(t$H.FS_createDataFile=function(){de("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_createPreloadedFile||(t$H.FS_createPreloadedFile=function(){de("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_createLazyFile||(t$H.FS_createLazyFile=function(){de("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_createLink||(t$H.FS_createLink=function(){de("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_createDevice||(t$H.FS_createDevice=function(){de("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.FS_unlink||(t$H.FS_unlink=function(){de("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$H.GL||(t$H.GL=function(){de("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.dynamicAlloc||(t$H.dynamicAlloc=function(){de("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.warnOnce||(t$H.warnOnce=function(){de("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.loadDynamicLibrary||(t$H.loadDynamicLibrary=function(){de("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.loadWebAssemblyModule||(t$H.loadWebAssemblyModule=function(){de("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getLEB||(t$H.getLEB=function(){de("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getFunctionTables||(t$H.getFunctionTables=function(){de("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.alignFunctionTables||(t$H.alignFunctionTables=function(){de("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.registerFunctions||(t$H.registerFunctions=function(){de("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.addFunction||(t$H.addFunction=function(){de("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.removeFunction||(t$H.removeFunction=function(){de("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getFuncWrapper||(t$H.getFuncWrapper=function(){de("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.prettyPrint||(t$H.prettyPrint=function(){de("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.makeBigInt||(t$H.makeBigInt=function(){de("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.dynCall||(t$H.dynCall=function(){de("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getCompilerSetting||(t$H.getCompilerSetting=function(){de("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stackSave||(t$H.stackSave=function(){de("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stackRestore||(t$H.stackRestore=function(){de("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.stackAlloc||(t$H.stackAlloc=function(){de("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.establishStackSpace||(t$H.establishStackSpace=function(){de("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.print||(t$H.print=function(){de("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.printErr||(t$H.printErr=function(){de("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.getTempRet0||(t$H.getTempRet0=function(){de("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.setTempRet0||(t$H.setTempRet0=function(){de("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.Pointer_stringify||(t$H.Pointer_stringify=function(){de("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$H.ALLOC_NORMAL||Object.defineProperty(t$H,"ALLOC_NORMAL",{get:function(){de("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$H.ALLOC_STACK||Object.defineProperty(t$H,"ALLOC_STACK",{get:function(){de("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$H.ALLOC_DYNAMIC||Object.defineProperty(t$H,"ALLOC_DYNAMIC",{get:function(){de("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$H.ALLOC_NONE||Object.defineProperty(t$H,"ALLOC_NONE",{get:function(){de("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),ce.prototype=new Error,ce.prototype.constructor=ce,$$R=function e(){t$H.calledRun||he(),t$H.calledRun||($$R=e)},t$H.run=he;var Ye$e=[];if(t$H.abort=de,t$H.preInit)for("function"==typeof t$H.preInit&&(t$H.preInit=[t$H.preInit]);t$H.preInit.length>0;)t$H.preInit.pop()();t$H.noExitRuntime=!0,he()}else var t$H=null;var _0x66a0ff=t$H,_0x3099dc=(_0x3bbcd3=!0,function(e,t){var i=_0x3bbcd3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3bbcd3=!1,i}),_0x1982d7=_0x3099dc(void 0,(function(){return _0x1982d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x1982d7).search("(((.+)+)+)+$")})),_0x3bbcd3;_0x1982d7();var _0x56af28=!1;if(e$2b(_0x66a0ff)){_0x66a0ff.onRuntimeInitialized=function(){_0x56af28=!0};var _0x543095=_0x66a0ff.cwrap("earcut","number",["number","number","number","number","number","number"])}var _0x3372cf=_0x55f30f([{name:"a_pos",components:2,type:"Int16"}],4),_0x816495=_0x3372cf.members,_0x157159=500,_0x281e2a=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _0x18a187,this.indexArray=new _0xbd6def,this.indexArray2=new _0x229baa,this.programConfigurations=new ProgramConfigurationSet(_0x816495,e.layers,e.zoom),this.segments=new _0x4b6d5a,this.segments2=new _0x4b6d5a,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x281e2a.prototype.populate=function(e,t){this.hasPattern=_0x10bcf8("fill",this.layers,t);for(var i=[],n=0,r=e;n<r.length;n+=1){var o=r[n],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(this.layers[0]._featureFilter(new _0x4f93ac(0),a)){var u=_0x1724dc(a),c={id:a.id,properties:a.properties,type:a.type,sourceLayerIndex:l,index:s,geometry:u,patterns:{},sortKey:undefined};i.push(c)}}for(var h=0,d=i;h<d.length;h+=1){var f=d[h],p=f,_=p.geometry,m=p.index,g=p.sourceLayerIndex;if(this.hasPattern){var x=_0x1751f1("fill",this.layers,f,this.zoom,t);this.patternFeatures.push(x)}else this.addFeature(f,_,m,{},t.indexData);var v=e[m].feature;t.featureIndex.insert(v,_,m,g,this.index)}},_0x281e2a.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},_0x281e2a.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},_0x281e2a.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_0x281e2a.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_0x281e2a.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=_0x816495;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0x3cb0f8.toIndexBuffer(e,this.indexArray),this.cesiumIndexBuffer2=_0x3cb0f8.toIndexBuffer(e,this.indexArray2))}this.programConfigurations.upload(e),this.uploaded=!0},_0x281e2a.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer?.destroy(),this.cesiumIndexBuffer2?.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},_0x281e2a.prototype.clear=function(){e$2b(this.layoutVertexArray)&&(this.layoutVertexArray=null),e$2b(this.indexArray)&&(this.indexArray=null),e$2b(this.indexArray2)&&(this.indexArray2=null)},_0x281e2a.prototype.addFeature=function(e,t,i,n,r){for(var o=0,a=_0x2f8296(t,_0x157159);o<a.length;o+=1){for(var s=a[o],l=0,u=0,c=s;u<c.length;u+=1){l+=c[u].length}for(var h,d=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),f=d.vertexLength,p=[],_=[],m=0,g=s;m<g.length;m+=1){var x=g[m];if(0!==x.length){x!==s[0]&&_.push(p.length/2);var v=this.segments2.prepareSegment(x.length,this.layoutVertexArray,this.indexArray2),y=v.vertexLength;this.layoutVertexArray.emplaceBack(x[0].x,x[0].y),this.indexArray2.emplaceBack(y+x.length-1,y),p.push(x[0].x),p.push(x[0].y);for(var $=1;$<x.length;$++)this.layoutVertexArray.emplaceBack(x[$].x,x[$].y),this.indexArray2.emplaceBack(y+$-1,y+$),p.push(x[$].x),p.push(x[$].y);v.vertexLength+=x.length,v.primitiveLength+=x.length}}if(e$2b(r)&&e$2b(r[e.id]))h=r[e.id];else if(!0===_0x56af28){var b=new Int32Array(p),T=b.length,C=_0x66a0ff._malloc(Int32Array.BYTES_PER_ELEMENT*T);_0x66a0ff.HEAP32.set(b,C/Int32Array.BYTES_PER_ELEMENT);var S=new Int32Array(_),w=S.length,E=_0x66a0ff._malloc(Int32Array.BYTES_PER_ELEMENT*w);_0x66a0ff.HEAP32.set(S,E/Int32Array.BYTES_PER_ELEMENT);var P=new Int32Array(10*T),A=_0x66a0ff._malloc(Int32Array.BYTES_PER_ELEMENT*T*10);_0x66a0ff.HEAP32.set(P,A/Int32Array.BYTES_PER_ELEMENT);var L=_0x543095(C,T,E,w,2,A),M=new Int32Array(_0x66a0ff.HEAP32.buffer,A,L);h=new Int32Array(M),_0x66a0ff._free(C),_0x66a0ff._free(E),_0x66a0ff._free(A)}else h=z$$(p,_);for(var R=0;R<h.length;R+=3)this.indexArray.emplaceBack(f+h[R],f+h[R+1],f+h[R+2]);d.vertexLength+=l,d.primitiveLength+=h.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,n)},_0x416c3b.register("FillBucket",_0x281e2a,{omit:["layers","patternFeatures"]});var _0x19d2e0=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.possiblyEvaluate=function(e,t,i){if(void 0===e.value)return new _0x320c7c(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i),r="resolvedImage"===e.property.specification.type&&"string"!=typeof n?n.name:n,o=this._calculate(r,r,r,t);return new _0x320c7c(this,{kind:"constant",value:o},t)}if("camera"===e.expression.kind){var a=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new _0x320c7c(this,{kind:"constant",value:a},t)}return new _0x320c7c(this,e.expression,t)},r.prototype.evaluate=function(e,t,i,n,r){if("source"===e.kind){var o=e.evaluate(t,i,n,r);return this._calculate(o,o,o,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},i,n),e.evaluate({zoom:Math.floor(t.zoom)},i,n),e.evaluate({zoom:Math.floor(t.zoom)+1},i,n),t):e.value},r.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},r.prototype.interpolate=function(e){return e},r}(_0x5678d2);_0x416c3b.register("DataDrivenProperty",_0x5678d2);var _0x3b2c10=new _0x3699c0({"fill-sort-key":new _0x5678d2(_0x5f2c0a.layout_fill["fill-sort-key"])}),_0x1831c6=new _0x3699c0({"fill-antialias":new _0x3f772a(_0x5f2c0a.paint_fill["fill-antialias"]),"fill-opacity":new _0x5678d2(_0x5f2c0a.paint_fill["fill-opacity"]),"fill-color":new _0x5678d2(_0x5f2c0a.paint_fill["fill-color"]),"fill-outline-color":new _0x5678d2(_0x5f2c0a.paint_fill["fill-outline-color"]),"fill-translate":new _0x3f772a(_0x5f2c0a.paint_fill["fill-translate"]),"fill-translate-anchor":new _0x3f772a(_0x5f2c0a.paint_fill["fill-translate-anchor"]),"fill-pattern":new _0x19d2e0(_0x5f2c0a.paint_fill["fill-pattern"])}),_0x5df795={paint:_0x1831c6,layout:_0x3b2c10},_0x2e833c=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x5df795)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},r.prototype.createBucket=function(e){return new _0x281e2a(e)},r.prototype.queryRadius=function(){return _0x4191d9.translateDistance(this.paint.get("fill-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){var s=_0x4191d9.translate(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),0,a);return _0x31b87d.polygonIntersectsMultiPolygon(s,n)},r.prototype.isTileClipped=function(){return!0},r}(_0x353e3f),_0x17cfac=(_0x5935d1=!0,function(e,t){var i=_0x5935d1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5935d1=!1,i}),_0xe12c98=_0x17cfac(void 0,(function(){return _0xe12c98.toString().search("(((.+)+)+)+$").toString().constructor(_0xe12c98).search("(((.+)+)+)+$")})),_0x5935d1;_0xe12c98();var _0x305bc1=["Unknown","Point","LineString","Polygon"],_0x7f2c5e=_0x55f30f([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),_0xab4ef=_0x7f2c5e.members,_0x2148e6=63,_0x1f9d45=Math.cos(Math.PI/180*37.5),_0x245306=15,_0x53a8d8=20,_0x39146c=15,_0x25dd1c=.5,_0x1c5ece=Math.pow(2,_0x39146c-1)/_0x25dd1c,_0x2d7c83=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _0x51528d,this.indexArray=new _0xbd6def,this.programConfigurations=new ProgramConfigurationSet(_0xab4ef,e.layers,e.zoom),this.segments=new _0x4b6d5a,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x2d7c83.prototype.populate=function(e,t){this.hasPattern=!1;for(var i=this.layers[0].layout.get("line-sort-key"),n=[],r=0,o=e;r<o.length;r+=1){var a=o[r],s=a.feature,l=a.index,u=a.sourceLayerIndex;if(this.layers[0]._featureFilter(new _0x4f93ac(0),s)){var c=_0x1724dc(s),h=i?i.evaluate(s,{}):void 0,d={id:s.id,properties:s.properties,type:s.type,sourceLayerIndex:u,index:l,geometry:c,patterns:{},sortKey:h};n.push(d)}}i&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var f=0,p=n;f<p.length;f+=1){var _=p[f],m=_,g=m.geometry,x=m.index,v=m.sourceLayerIndex;if(this.hasPattern){var y=_0x1751f1("line",this.layers,_,this.zoom,t);this.patternFeatures.push(y)}else this.addFeature(_,g,x,{});var $=e[x].feature;t.featureIndex.insert($,g,x,v,this.index)}},_0x2d7c83.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},_0x2d7c83.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},_0x2d7c83.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_0x2d7c83.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_0x2d7c83.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=_0xab4ef;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=_0x3cb0f8.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0x3cb0f8.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},_0x2d7c83.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy()),this.programConfigurations.destroy(),this.segments.destroy())},_0x2d7c83.prototype.clear=function(){e$2b(this.layoutVertexArray)&&(this.layoutVertexArray=null),e$2b(this.indexArray)&&(this.indexArray=null)},_0x2d7c83.prototype.addFeature=function(e,t,i,n){for(var r=this.layers[0].layout,o=r.get("line-join").evaluate(e,{}),a=r.get("line-cap"),s=r.get("line-miter-limit"),l=r.get("line-round-limit"),u=0,c=t;u<c.length;u+=1){var h=c[u];this.addLine(h,e,o,a,s,l,i,n)}},_0x2d7c83.prototype.addLine=function(e,t,i,n,r,o,a,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+t.properties.mapbox_clip_start,this.clipEnd=+t.properties.mapbox_clip_end;for(var l=0;l<e.length-1;l++)this.totalDistance+=e[l].dist(e[l+1])}for(var u="Polygon"===_0x305bc1[t.type],c=e.length;c>=2&&e[c-1].equals(e[c-2]);)c--;for(var h=0;h<c-1&&e[h].equals(e[h+1]);)h++;if(!(c<(u?3:2))){"bevel"===i&&(r=1.05);var d,f=this.overscaling<=16?_0x245306*ae$s/(512*this.overscaling):0,p=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray),_=void 0,m=void 0,g=void 0,x=void 0;this.e1=this.e2=-1,u&&(d=e[c-2],x=e[h].sub(d)._unit()._perp());for(var v=h;v<c;v++)if(!(m=u&&v===c-1?e[h+1]:e[v+1])||!e[v].equals(m)){x&&(g=x),d&&(_=d),d=e[v],x=m?m.sub(d)._unit()._perp():g;var y=(g=g||x).add(x);(0!==y.x||0!==y.y)&&y._unit();var $=g.x*x.x+g.y*x.y,b=y.x*x.x+y.y*x.y,T=0!==b?1/b:1/0,C=2*Math.sqrt(2-2*b),S=b<_0x1f9d45&&_&&m,w=g.x*x.y-g.y*x.x>0;if(S&&v>h){var E=d.dist(_);if(E>2*f){var P=d.sub(d.sub(_)._mult(f/E)._round());this.updateDistance(_,P),this.addCurrentVertex(P,g,0,0,p),_=P}}var A=_&&m,L=A?i:u?"butt":n;if(A&&"round"===L&&(T<o?L="miter":T<=2&&(L="fakeround")),"miter"===L&&T>r&&(L="bevel"),"bevel"===L&&(T>2&&(L="flipbevel"),T<r&&(L="miter")),_&&this.updateDistance(_,d),"miter"===L)y._mult(T),this.addCurrentVertex(d,y,0,0,p);else if("flipbevel"===L){if(T>100)y=x.mult(-1);else{var M=T*g.add(x).mag()/g.sub(x).mag();y._perp()._mult(M*(w?-1:1))}this.addCurrentVertex(d,y,0,0,p),this.addCurrentVertex(d,y.mult(-1),0,0,p)}else if("bevel"===L||"fakeround"===L){var R=-Math.sqrt(T*T-1),O=w?R:0,I=w?0:R;if(_&&this.addCurrentVertex(d,g,O,I,p),"fakeround"===L)for(var D=Math.round(180*C/Math.PI/_0x53a8d8),B=1;B<D;B++){var N=B/D;if(.5!==N){var F=N-.5;N+=N*F*(N-1)*((1.0904+$*($*(3.55645-1.43519*$)-3.2452))*F*F+(.848013+$*(.215638*$-1.06021)))}var U=x.sub(g)._mult(N)._add(g)._unit()._mult(w?-1:1);this.addHalfVertex(d,U.x,U.y,!1,w,0,p)}m&&this.addCurrentVertex(d,x,-O,-I,p)}else if("butt"===L)this.addCurrentVertex(d,y,0,0,p);else if("square"===L){var G=_?1:-1;this.addCurrentVertex(d,y,G,G,p)}else"round"===L&&(_&&(this.addCurrentVertex(d,g,0,0,p),this.addCurrentVertex(d,g,1,1,p,!0)),m&&(this.addCurrentVertex(d,x,-1,-1,p,!0),this.addCurrentVertex(d,x,0,0,p)));if(S&&v<c-1){var z=d.dist(m);if(z>2*f){var V=d.add(m.sub(d)._mult(f/z)._round());this.updateDistance(d,V),this.addCurrentVertex(V,x,0,0,p),d=V}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,a,s)}},_0x2d7c83.prototype.addCurrentVertex=function(e,t,i,n,r,o){void 0===o&&(o=!1);var a=t.x+t.y*i,s=t.y-t.x*i,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,a,s,o,!1,i,r),this.addHalfVertex(e,l,u,o,!0,-n,r),this.distance>_0x1c5ece/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,i,n,r,o))},_0x2d7c83.prototype.addHalfVertex=function(e,t,i,n,r,o,a){var s=e.x,l=e.y,u=this.scaledDistance*_0x25dd1c;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(r?1:0),Math.round(_0x2148e6*t)+128,Math.round(_0x2148e6*i)+128,1+(0===o?0:o<0?-1:1)|(63&u)<<2,u>>6);var c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),a.primitiveLength++),r?this.e2=c:this.e1=c},_0x2d7c83.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(_0x1c5ece-1):this.distance},_0x416c3b.register("LineBucket",_0x2d7c83,{omit:["layers","patternFeatures"]});var _0x570bef=(_0x477cdb=!0,function(e,t){var i=_0x477cdb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x477cdb=!1,i}),_0x24e160=_0x570bef(void 0,(function(){return _0x24e160.toString().search("(((.+)+)+)+$").toString().constructor(_0x24e160).search("(((.+)+)+)+$")})),_0x477cdb;_0x24e160();var _0x308415=function(e){this.specification=e};_0x308415.prototype.possiblyEvaluate=function(e,t,i){if(void 0!==e.value){if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new _0x4f93ac(Math.floor(t.zoom-1),t)),e.expression.evaluate(new _0x4f93ac(Math.floor(t.zoom),t)),e.expression.evaluate(new _0x4f93ac(Math.floor(t.zoom+1),t)),t)}},_0x308415.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},_0x308415.prototype.interpolate=function(e){return e},_0x416c3b.register("CrossFadedProperty",_0x308415);var _0x14695a=(_0x48d6fa=!0,function(e,t){var i=_0x48d6fa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x48d6fa=!1,i}),_0x1b42d7=_0x14695a(void 0,(function(){return _0x1b42d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b42d7).search("(((.+)+)+)+$")})),_0x48d6fa;_0x1b42d7();var _0x23e451=function(e){this.specification=e};_0x23e451.prototype.possiblyEvaluate=function(e,t,i){return!!e.expression.evaluate(t,null,{},i)},_0x23e451.prototype.interpolate=function(){return!1},_0x416c3b.register("ColorRampProperty",_0x23e451);var _0x48ca74=new _0x3699c0({"line-cap":new _0x3f772a(_0x5f2c0a.layout_line["line-cap"]),"line-join":new _0x5678d2(_0x5f2c0a.layout_line["line-join"]),"line-miter-limit":new _0x3f772a(_0x5f2c0a.layout_line["line-miter-limit"]),"line-round-limit":new _0x3f772a(_0x5f2c0a.layout_line["line-round-limit"]),"line-sort-key":new _0x5678d2(_0x5f2c0a.layout_line["line-sort-key"])}),_0x3b2b70=new _0x3699c0({"line-opacity":new _0x5678d2(_0x5f2c0a.paint_line["line-opacity"]),"line-color":new _0x5678d2(_0x5f2c0a.paint_line["line-color"]),"line-translate":new _0x3f772a(_0x5f2c0a.paint_line["line-translate"]),"line-translate-anchor":new _0x3f772a(_0x5f2c0a.paint_line["line-translate-anchor"]),"line-width":new _0x5678d2(_0x5f2c0a.paint_line["line-width"]),"line-gap-width":new _0x5678d2(_0x5f2c0a.paint_line["line-gap-width"]),"line-offset":new _0x5678d2(_0x5f2c0a.paint_line["line-offset"]),"line-blur":new _0x5678d2(_0x5f2c0a.paint_line["line-blur"]),"line-dasharray":new _0x308415(_0x5f2c0a.paint_line["line-dasharray"]),"line-pattern":new _0x19d2e0(_0x5f2c0a.paint_line["line-pattern"]),"line-gradient":new _0x23e451(_0x5f2c0a.paint_line["line-gradient"])}),_0x31537b={paint:_0x3b2b70,layout:_0x48ca74},_0x57508f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,i){return i=new _0x4f93ac(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),e.prototype.possiblyEvaluate.call(this,t,i)},t.prototype.evaluate=function(t,i,n,r){return i=extend({},i,{zoom:Math.floor(i.zoom)}),e.prototype.evaluate.call(this,t,i,n,r)},t}(_0x5678d2),_0x321825=new _0x57508f(_0x31537b.paint.properties["line-width"].specification);_0x321825.useIntegerZoom=!0;var _0x5e23b5=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x31537b)}function o(e,t){return t>0?t+2*e:e}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},r.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=renderColorRamp(e,"lineProgress"),this.gradientTexture=null},r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i),this.paint._values["line-floorwidth"]=_0x321825.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},r.prototype.createBucket=function(e){return new _0x2d7c83(e)},r.prototype.queryRadius=function(e){var t=e,i=o(_0x4191d9.getMaximumPaintValue("line-width",this,t),_0x4191d9.getMaximumPaintValue("line-gap-width",this,t)),n=_0x4191d9.getMaximumPaintValue("line-offset",this,t);return i/2+Math.abs(n)+_0x4191d9.translateDistance(this.paint.get("line-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,a,s){var l=_0x4191d9.translate(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),0,s),u=o(this.paint.get("line-width")?.evaluate(t,i),this.paint.get("line-gap-width")?.evaluate(t,i)),c=s/2*(u=Math.max(u,5)),h=this.paint.get("line-offset")?.evaluate(t,i);return h&&(n=function(e,t){for(var i=[],n=new _0x46bdc2(0,0),r=0;r<e.length;r++){for(var o=e[r],a=[],s=0;s<o.length;s++){var l=o[s-1],u=o[s],c=o[s+1],h=0===s?n:u.sub(l)._unit()._perp(),d=s===o.length-1?n:c.sub(u)._unit()._perp(),f=h._add(d)._unit(),p=f.x*d.x+f.y*d.y;f._mult(1/p),a.push(f._mult(t)._add(u))}i.push(a)}return i}(n,h*s)),_0x31b87d.polygonIntersectsBufferedMultiLine(l,n,c)},r.prototype.isTileClipped=function(){return!0},r}(_0x353e3f),_0x155dc3=(_0x493a85=!0,function(e,t){var i=_0x493a85?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x493a85=!1,i}),_0x111c0b=_0x155dc3(void 0,(function(){return _0x111c0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x111c0b).search("(((.+)+)+)+$")})),_0x493a85;_0x111c0b();var _0x43b2f4={circle:_0x252c8a,fill:_0x2e833c,line:_0x5e23b5,symbol:_0x55bb54};function _0x5c454c(e){return _0x43b2f4[e.type]?new _0x43b2f4[e.type](e):null}const _0x310356=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3a035a=_0x310356(void 0,(function(){return _0x3a035a.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a035a).search("(((.+)+)+)+$")}));function _0x5bef2f(e,t,i){let n,r,o;const a=_0x1ec00b.devicePixelRatio>1?"@2x":"";let s=getJSON(t.transformRequest(t.normalizeSpriteURL(e,a,".json"),_0x179804.SpriteJSON),((e,t)=>{s=null,!o&&(o=e,n=t,u())})),l=getImage(t.transformRequest(t.normalizeSpriteURL(e,a,".png"),_0x179804.SpriteImage),((e,t)=>{l=null,!o&&(o=e,r=t,u())}));function u(){if(o)i(o);else if(n&&r){const e=_0x1ec00b.getImageData(r,0),t={};for(const i in n){const{width:r,height:o,x:a,y:s,sdf:l,pixelRatio:u,stretchX:c,stretchY:h,content:d}=n[i],f=new _0x86a665({width:r,height:o});_0x86a665.copy(e,f,{x:a,y:s},{x:0,y:0},{width:r,height:o}),t[i]={data:f,pixelRatio:u,sdf:l,stretchX:c,stretchY:h,content:d}}i(null,t)}}return{cancel(){s&&(s.cancel(),s=null),l&&(l.cancel(),l=null)}}}_0x3a035a();var _0xc26bfa=(_0x315abc=!0,function(e,t){var i=_0x315abc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x315abc=!1,i}),_0xcf94b7=_0xc26bfa(void 0,(function(){return _0xcf94b7.toString().search("(((.+)+)+)+$").toString().constructor(_0xcf94b7).search("(((.+)+)+)+$")})),_0x315abc;_0xcf94b7();var _0x2b5199=1;function _0x38c377(){this.images={},this.imageCount=0,this.imageList=[],this.imagesCanvas={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new _0x86a665({width:1,height:1}),this.dirty=!0}_0x38c377.prototype.isLoaded=function(){return this.loaded},_0x38c377.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,i=this.requestors;t<i.length;t+=1){var n=i[t],r=n.ids,o=n.callback;this._notify(r,o)}this.requestors=[]}},_0x38c377.prototype.getImage=function(e){return this.images[e]},_0x38c377.prototype.addImage=function(e,t){this._validate(e,t)&&(this.images[e]=t,this.imageCount++)},_0x38c377.prototype.getImageCanvas=function(e){if(!e$2b(this.images[e]))return null;if(!e$2b(this.imagesCanvas[e])){var t=document.createElement("canvas"),i=this.images[e].data;t.width=i.width,t.height=i.height;for(var n=t.getContext("2d"),r=n.createImageData(i.width,i.height),o=i.width*i.height,a=0;a<o;a++)r.data[4*a]=i.data[4*a],r.data[4*a+1]=i.data[4*a+1],r.data[4*a+2]=i.data[4*a+2],r.data[4*a+3]=i.data[4*a+3];n.putImageData(r,0,0),this.imagesCanvas[e]=t}return this.imagesCanvas[e]},_0x38c377.prototype._validate=function(e,t){var i=!0;return!this._validateStretch(t.stretchX,t.data&&t.data.width)&&(i=!1),!this._validateStretch(t.stretchY,t.data&&t.data.height)&&(i=!1),!this._validateContent(t.content,t)&&(i=!1),i},_0x38c377.prototype._validateStretch=function(e,t){if(!e)return!0;for(var i=0,n=0,r=e;n<r.length;n+=1){var o=r[n];if(o[0]<i||o[1]<o[0]||t<o[1])return!1;i=o[1]}return!0},_0x38c377.prototype._validateContent=function(e,t){return!e||4===e.length&&(!(e[0]<0||t.data.width<e[0])&&(!(e[1]<0||t.data.height<e[1])&&(!(e[2]<0||t.data.width<e[2])&&(!(e[3]<0||t.data.height<e[3])&&(!(e[2]<e[0])&&!(e[3]<e[1]))))))},_0x38c377.prototype.updateImage=function(e,t){var i=this.images[e];t.version=i.version+1,this.images[e]=t,this.updatedImages[e]=!0},_0x38c377.prototype.removeImage=function(e){var t=this.images[e];delete this.images[e],delete this.patterns[e],this.imageCount--,this.imageCount<0&&(this.imageCount=0),t.userImage&&t.userImage.onRemove&&t.userImage.onRemove()},_0x38c377.prototype.listImages=function(){return this.imageList.length!=this.imageCount&&(this.imageList=Object.keys(this.images)),this.imageList},_0x38c377.prototype.getImages=function(e,t){var i=!0;if(!this.isLoaded())for(var n=0,r=e;n<r.length;n+=1){var o=r[n];!this.images[o]&&(i=!1)}this.isLoaded()||i?this._notify(e,t):this.requestors.push({ids:e,callback:t})},_0x38c377.prototype._notify=function(e,t){for(var i={},n=0,r=e;n<r.length;n+=1){var o=r[n];!this.images[o]&&console.log("styleimagemissing",{id:o});var a=this.images[o];a?i[o]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf,version:a.version,stretchX:a.stretchX,stretchY:a.stretchY,content:a.content,hasRenderCallback:Boolean(a.userImage&&a.userImage.render)}:console.warn('Image "'+o+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}t(null,i)},_0x38c377.prototype.getAllImages=function(e){var t={};for(var i in this.images){var n=this.images[i],r=n.data.clone();e.push(r.data.buffer),t[i]={data:r,pixelRatio:n.pixelRatio,hasRenderCallback:Boolean(n.userImage&&n.userImage.render)}}return t},_0x38c377.prototype.getPixelSize=function(){var e=this.atlasImage;return{width:e.width,height:e.height}},_0x38c377.prototype.getPattern=function(e){var t=this.patterns[e],i=this.getImage(e);if(!i)return null;if(t&&t.position.version===i.version)return t.position;if(t)t.position.version=i.version;else{var n={w:i.data.width+2*_0x2b5199,h:i.data.height+2*_0x2b5199,x:0,y:0},r=new _0x3a607b(n,i);this.patterns[e]={bin:n,position:r}}return this._updatePatternAtlas(),this.patterns[e].position},_0x38c377.prototype.bind=function(e){e.gl,this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):(console.log("ImageManager.prototype.bind"),this.atlasTexture=new _0x6d753e(e,this.atlasImage,de$x.RGBA)),this.atlasTexture.bind(de$x.LINEAR,de$x.CLAMP_TO_EDGE)},_0x38c377.prototype._updatePatternAtlas=function(){var e=[];for(var t in this.patterns)e.push(this.patterns[t].bin);var i=W$U(e),n=i.w,r=i.h,o=this.atlasImage;for(var a in o.resize({width:n||1,height:r||1}),this.patterns){var s=this.patterns[a].bin,l=s.x+_0x2b5199,u=s.y+_0x2b5199,c=this.images[a].data,h=c.width,d=c.height;_0x86a665.copy(c,o,{x:0,y:0},{x:l,y:u},{width:h,height:d}),_0x86a665.copy(c,o,{x:0,y:d-1},{x:l,y:u-1},{width:h,height:1}),_0x86a665.copy(c,o,{x:0,y:0},{x:l,y:u+d},{width:h,height:1}),_0x86a665.copy(c,o,{x:h-1,y:0},{x:l-1,y:u},{width:1,height:d}),_0x86a665.copy(c,o,{x:0,y:0},{x:l+h,y:u},{width:1,height:d})}this.dirty=!0},_0x38c377.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},_0x38c377.prototype.dispatchRenderCallbacks=function(e){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(!this.callbackDispatchedThisFrame[n]){this.callbackDispatchedThisFrame[n]=!0;var r=this.images[n];renderStyleImage(r)&&this.updateImage(n,r)}}};const _0x183fe0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x973025=_0x183fe0(void 0,(function(){return _0x973025.toString().search("(((.+)+)+)+$").toString().constructor(_0x973025).search("(((.+)+)+)+$")}));function _0x2c9a5a(e,t,i,n,r){const o=256*t,a=o+255,s=n.transformRequest(n.normalizeGlyphsURL(i).replace("{fontstack}",e).replace("{range}",o+"-"+a),_0x179804.Glyphs);getArrayBuffer(s,((e,t)=>{if(e)r(e);else if(t){const e={};for(const i of _0x584b7b(t))e[i.id]=i;r(null,e)}}))}_0x973025();var _0x377518=(_0x383edc=!0,function(e,t){var i=_0x383edc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x383edc=!1,i}),_0x199080=_0x377518(void 0,(function(){return _0x199080.toString().search("(((.+)+)+)+$").toString().constructor(_0x199080).search("(((.+)+)+)+$")})),_0x383edc;_0x199080();var _0x4880b8=1e20;function _0x599c8a(e,t,i,n,r,o){this.fontSize=e||24,this.buffer=void 0===t?3:t,this.cutoff=n||.25,this.fontFamily=r||"sans-serif",this.fontWeight=o||"normal",this.radius=i||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function _0x41c0ed(e,t,i,n,r,o,a){for(var s=0;s<t;s++){for(var l=0;l<i;l++)n[l]=e[l*t+s];for(_0x25fd50(n,r,o,a,i),l=0;l<i;l++)e[l*t+s]=r[l]}for(l=0;l<i;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(_0x25fd50(n,r,o,a,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(r[s])}}function _0x25fd50(e,t,i,n,r){i[0]=0,n[0]=-_0x4880b8,n[1]=+_0x4880b8;for(var o=1,a=0;o<r;o++){for(var s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);s<=n[a];)a--,s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);i[++a]=o,n[a]=s,n[a+1]=+_0x4880b8}for(o=0,a=0;o<r;o++){for(;n[a+1]<o;)a++;t[o]=(o-i[a])*(o-i[a])+e[i[a]]}}_0x599c8a.prototype.draw=function(e){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(e,this.buffer,this.middle);for(var t=this.ctx.getImageData(0,0,this.size,this.size),i=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var r=t.data[4*n+3]/255;this.gridOuter[n]=1===r?0:0===r?_0x4880b8:Math.pow(Math.max(0,.5-r),2),this.gridInner[n]=1===r?_0x4880b8:0===r?0:Math.pow(Math.max(0,r-.5),2)}for(_0x41c0ed(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),_0x41c0ed(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var o=this.gridOuter[n]-this.gridInner[n];i[n]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return i};const _0x5e1dd8=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5ce966=_0x5e1dd8(void 0,(function(){return _0x5ce966.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ce966).search("(((.+)+)+)+$")}));function _0x5d88ab(e,t){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={}}_0x5ce966(),_0x5d88ab.prototype.setURL=function(e){this.url=e},_0x5d88ab.prototype.getGlyphs=function(e,t){const i=[];for(const t in e)for(const n of e[t])i.push({stack:t,id:n});asyncAll(i,(({stack:e,id:t},i)=>{let n=this.entries[e];!n&&(n=this.entries[e]={glyphs:{},requests:{}});let r=n.glyphs[t];if(void 0!==r)return void i(null,{stack:e,id:t,glyph:r});if(r=this._tinySDF(n,e,t),r)return n.glyphs[t]=r,void i(null,{stack:e,id:t,glyph:r});const o=Math.floor(t/256);if(256*o>65535)return void i(new Error("glyphs > 65535 not supported"));let a=n.requests[o];!a&&(a=n.requests[o]=[],_0x5d88ab.loadGlyphRange(e,o,this.url,this.requestManager,((e,t)=>{if(t)for(const e in t)!this._doesCharSupportLocalGlyph(+e)&&(n.glyphs[+e]=t[+e]);for(const i of a)i(e,t);delete n.requests[o]}))),a.push(((n,r)=>{n?i(n):r&&i(null,{stack:e,id:t,glyph:r[t]||null})}))}),((e,i)=>{if(e)t(e);else if(i){const e={};for(const{stack:t,id:n,glyph:r}of i)(e[t]||(e[t]={}))[n]=r&&{id:r.id,bitmap:r.bitmap.clone(),metrics:r.metrics};t(null,e)}}))},_0x5d88ab.prototype._doesCharSupportLocalGlyph=function(e){return!!this.localIdeographFontFamily&&(_0x92a370["CJK Unified Ideographs"](e)||_0x92a370["Hangul Syllables"](e)||_0x92a370.Hiragana(e)||_0x92a370.Katakana(e))},_0x5d88ab.prototype._tinySDF=function(e,t,i){const n=this.localIdeographFontFamily;if(!n)return;if(!this._doesCharSupportLocalGlyph(i))return;let r=e.tinySDF;if(!r){let i="400";/bold/i.test(t)?i="900":/medium/i.test(t)?i="500":/light/i.test(t)&&(i="200"),r=e.tinySDF=new _0x5d88ab.TinySDF(24,3,8,.25,n,i)}return{id:i,bitmap:new _0x3122f8({width:30,height:30},r.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}},_0x5d88ab.loadGlyphRange=_0x2c9a5a,_0x5d88ab.TinySDF=_0x599c8a;var _0x41150a=(_0x3dda9b=!0,function(e,t){var i=_0x3dda9b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3dda9b=!1,i}),_0x53d908=_0x41150a(void 0,(function(){return _0x53d908.toString().search("(((.+)+)+)+$").toString().constructor(_0x53d908).search("(((.+)+)+)+$")})),_0x3dda9b;_0x53d908();var _0x183e32=function(e,t){this.width=e,this.height=t,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};_0x183e32.prototype.getDash=function(e,t){var i=e.join(",")+String(t);return!this.positions[i]&&(this.positions[i]=this.addDash(e,t)),this.positions[i]},_0x183e32.prototype.addDash=function(e,t){var i=t?7:0,n=2*i+1;if(this.nextRow+n>this.height)return null;for(var r=0,o=0;o<e.length;o++)r+=e[o];for(var a=this.width/r,s=a/2,l=e.length%2==1,u=-i;u<=i;u++)for(var c=this.nextRow+i+u,h=this.width*c,d=l?-e[e.length-1]:0,f=e[0],p=1,_=0;_<this.width;_++){for(;f<_/a;)d=f,f+=e[p],l&&p===e.length-1&&(f+=e[0]),p++;var m=Math.abs(_-d*a),g=Math.abs(_-f*a),x=Math.min(m,g),v=p%2==1,y=void 0;if(t){var $=i?u/i*(s+1):0;if(v){var b=s-Math.abs($);y=Math.sqrt(x*x+b*b)}else y=s-Math.sqrt(x*x+$*$)}else y=(v?1:-1)*x;this.data[3+4*(h+_)]=Math.max(0,Math.min(255,y+128))}var T={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:r};return this.nextRow+=n,this.dirty=!0,T},_0x183e32.prototype.bind=function(e){var t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.RGBA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,this.data))},_0x183e32.prototype.getTexture=function(e){return this.cesiumTexture?this.dirty&&(this.dirty=!1,this.cesiumTexture.copyFrom({width:this.width,height:this.height,arrayBufferView:this.data})):this.cesiumTexture=new t$V({context:e,source:{arrayBufferView:this.data},width:this.width,height:this.height,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT})}),this.cesiumTexture};var _0x39edc5=(_0x17d935=!0,function(e,t){var i=_0x17d935?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17d935=!1,i}),_0x2611eb=_0x39edc5(void 0,(function(){return _0x2611eb.toString().search("(((.+)+)+)+$").toString().constructor(_0x2611eb).search("(((.+)+)+)+$")})),_0x17d935;_0x2611eb();const _0xcd4819=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function _0x3fe091(e){var t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var i="[",n=0,r=e;n<r.length;n+=1){i+=_0x3fe091(r[n])+","}return i+"]"}for(var o=Object.keys(e).sort(),a="{",s=0;s<o.length;s++)a+=JSON.stringify(o[s])+":"+_0x3fe091(e[o[s]])+",";return a+"}"}function _0x74a609(e){for(var t="",i=0,n=_0xcd4819;i<n.length;i+=1){t+="/"+_0x3fe091(e[n[i]])}return t}function _0x508964(e,t){for(var i={},n=0;n<e.length;n++){var r=t&&t[e[n].id]||_0x74a609(e[n]);t&&(t[e[n].id]=r);var o=i[r];!o&&(o=i[r]=[]),o.push(e[n])}var a=[];for(var s in i)a.push(i[s]);return a}var _0x260ef9=(_0x35f3a1=!0,function(e,t){var i=_0x35f3a1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x35f3a1=!1,i}),_0x94580b=_0x260ef9(void 0,(function(){return _0x94580b.toString().search("(((.+)+)+)+$").toString().constructor(_0x94580b).search("(((.+)+)+)+$")})),_0x35f3a1;_0x94580b();var _0x223d33=function(e){this.keyCache={},e&&this.replace(e)};function _0x44a910(e){var t=[];for(var i in e)t.push(e[i]);return t}_0x223d33.prototype.replace=function(e){this._layerConfigs={},this._layers={},this.update(e,[])},_0x223d33.prototype.update=function(e,t){for(var i=this,n=0,r=e;n<r.length;n+=1){var o=r[n];this._layerConfigs[o.id]=o;var a=_0x5c454c(o);null!=a&&(this._layers[o.id]=a,a._featureFilter=_0x570fee.createFilter(a.filter),this.keyCache[o.id]&&delete this.keyCache[o.id])}for(var s=0,l=t;s<l.length;s+=1){var u=l[s];delete this.keyCache[u],delete this._layerConfigs[u],delete this._layers[u]}this.familiesBySource={};for(var c=0,h=_0x508964(_0x44a910(this._layerConfigs),this.keyCache);c<h.length;c+=1){var d=h[c].map((function(e){return i._layers[e.id]})),f=d[0];if(null!=f&&"none"!==f.visibility){var p=f.source||"",_=this.familiesBySource[p];!_&&(_=this.familiesBySource[p]={});var m=f.sourceLayer,g=_[m];!g&&(g=_[m]=[]),g.push(d)}}};var _0x5e4b78=(_0x30315b=!0,function(e,t){var i=_0x30315b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30315b=!1,i}),_0x5e9308=_0x5e4b78(void 0,(function(){return _0x5e9308.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e9308).search("(((.+)+)+)+$")})),_0x30315b;function _0x404954(e){this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}_0x5e9308(),_0x404954.prototype.trigger=function(){!this._triggered&&(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))};const _0x1db781=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x52396f=_0x1db781(void 0,(function(){return _0x52396f.toString().search("(((.+)+)+)+$").toString().constructor(_0x52396f).search("(((.+)+)+)+$")}));function _0x58ac76(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function _0x100bea(e,t,i){this.target=e,this.parent=t,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},_0x58ac76(["receive","process"],this),this.invoker=new _0x404954(this.process),this.target.addEventListener("message",this.receive,!1)}_0x52396f(),_0x100bea.prototype.send=function(e,t,i,n){const r=++_0x100bea.taskId;i&&(this.callbacks[r]=i);const o=[];return this.target.postMessage({id:r,type:e,hasCallback:!!i,targetMapId:n,sourceMapId:this.mapId,data:_0x416c3b.serialize(t,o)},o),{cancel:()=>{i&&delete this.callbacks[r],this.target.postMessage({id:r,type:"<cancel>",targetMapId:n,sourceMapId:this.mapId})}}},_0x100bea.prototype.receive=function(e){const t=e.data,i=t.id;if(i&&(!t.targetMapId||this.mapId===t.targetMapId))if("<cancel>"===t.type){delete this.tasks[i];const e=this.cancelCallbacks[i];delete this.cancelCallbacks[i],e&&e()}else this.tasks[i]=t,this.taskQueue.push(i),this.invoker.trigger()},_0x100bea.prototype.process=function(){if(!this.taskQueue.length)return;const e=this.taskQueue.shift(),t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t)if("<response>"===t.type){const i=this.callbacks[e];delete this.callbacks[e],i&&(t.error?i(_0x416c3b.deserialize(t.error)):i(null,_0x416c3b.deserialize(t.data)))}else{let i=!1;const n=t.hasCallback?(t,n)=>{i=!0,delete this.cancelCallbacks[e];const r=[];this.target.postMessage({id:e,type:"<response>",sourceMapId:this.mapId,error:t?_0x416c3b.serialize(t):null,data:_0x416c3b.serialize(n,r)},r)}:e=>{i=!0};let r=null;const o=_0x416c3b.deserialize(t.data);if(this.parent[t.type])r=this.parent[t.type](t.sourceMapId,o,n);else if(this.parent.getWorkerSource){const e=t.type.split(".");r=this.parent.getWorkerSource(t.sourceMapId,e[0],o.source)[e[1]](o,n)}else n(new Error("Could not find function "+t.type));!i&&r&&r.cancel&&(this.cancelCallbacks[e]=r.cancel)}},_0x100bea.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},_0x100bea.taskId=0;const _0x1a282c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x507df8=_0x1a282c(void 0,(function(){return _0x507df8.toString().search("(((.+)+)+)+$").toString().constructor(_0x507df8).search("(((.+)+)+)+$")}));function _0x254b91(e,t){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=uniqueId();const i=this.workerPool.acquire(this.id);for(let e=0;e<i.length;e++){const n=i[e],r=new _0x254b91.Actor(n,t,this.id);r.name="Worker "+e,this.actors.push(r)}}_0x507df8(),_0x254b91.prototype.broadcast=function(e,t,i){i=i||function(){},asyncAll(this.actors,((i,n)=>{i.send(e,t,n)}),i)},_0x254b91.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},_0x254b91.prototype.remove=function(){this.actors.forEach((e=>{e.remove()})),this.actors=[],this.workerPool.release(this.id)},_0x254b91.Actor=_0x100bea;const _0x273769=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x29f023=_0x273769(void 0,(function(){return _0x29f023.toString().search("(((.+)+)+)+$").toString().constructor(_0x29f023).search("(((.+)+)+)+$")}));function _0x51ad98(){this.active={}}_0x29f023(),_0x51ad98.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length<_0x51ad98.workerCount;)this.workers.push(new window.Worker(window.mvtWorkerUrl));return this.active[e]=!0,this.workers.slice()},_0x51ad98.prototype.release=function(e){delete this.active[e],0===Object.keys(this.active).length&&(this.workers.forEach((e=>{e.terminate()})),this.workers=[])};const _0x49eef3=Math.floor(s$Y.hardwareConcurrency/2);_0x51ad98.workerCount=Math.max(Math.min(_0x49eef3,6),1);const _0x58b6b5=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x7bec5d=_0x58b6b5(void 0,(function(){return _0x7bec5d.toString().search("(((.+)+)+)+$").toString().constructor(_0x7bec5d).search("(((.+)+)+)+$")}));let _0x4f143b;function _0x2f8351(){return!_0x4f143b&&(_0x4f143b=new _0x51ad98),_0x4f143b}function n$I(e,t){if(e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).billboardStyle)){var i=e.billboardStyle;e.image=u$_(i.image,void 0)}if(e$2b(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$16("disableDepthTestDistance must be greater than or equal to 0.0.");var n=e.translucencyByDistance,r=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,a=e.distanceDisplayCondition;if(e$2b(n)){if(n.far<=n.near)throw new t$16("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=o$Y.clone(n)}if(e$2b(r)){if(r.far<=r.near)throw new t$16("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");r=o$Y.clone(r)}if(e$2b(o)){if(o.far<=o.near)throw new t$16("scaleByDistance.far must be greater than scaleByDistance.near.");o=o$Y.clone(o)}if(e$2b(a)){if(a.far<=a.near)throw new t$16("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");a=r$Y.clone(a)}this._show=u$_(e.show,!0),this._position=o$1p.clone(u$_(e.position,o$1p.ZERO)),this._actualPosition=o$1p.clone(this._position),this._volTexCoord=o$1p.clone(u$_(e.volTexCoord,o$1p.ZERO)),this._pixelOffset=o$1o.clone(u$_(e.pixelOffset,o$1o.ZERO)),this._translate=new o$1o(0,0),this._eyeOffset=o$1p.clone(u$_(e.eyeOffset,o$1p.ZERO)),this._heightReference=u$_(e.heightReference,k$P.NONE),this._verticalOrigin=u$_(e.verticalOrigin,S$O.CENTER),this._horizontalOrigin=u$_(e.horizontalOrigin,j$T.CENTER),this._scale=u$_(e.scale,1),this._color=e$1U.clone(u$_(e.color,e$1U.WHITE)),this._rotation=u$_(e.rotation,0),this._alignedAxis=o$1p.clone(u$_(e.alignedAxis,o$1p.ZERO)),this._width=e.width,this._height=e.height,this._scaleByDistance=o,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=r,this._sizeInMeters=u$_(e.sizeInMeters,!1),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=u$_(e.collection,t),this._pickId=void 0,this._pickPrimitive=u$_(e._pickPrimitive,this),this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageIndex=-1,this._imageIndexPromise=void 0,this._imageId=void 0,this._image=u$_(e.image,void 0),this._imageSubRegion=void 0,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0,this._mvtLayerID=e.mvtLayerID,this._mapName=e.mapName,this._mvtProperties=e.mvtProperties,this._associativeMvtLabel=void 0;var s=e.image,l=e.imageId;e$2b(s)&&(e$2b(l)||(l="string"==typeof s?s:e$2b(s.src)?s.src:e$1Q()),this._imageId=l,this._image=s),e$2b(e.imageSubRegion)&&(this._imageId=l,this._imageSubRegion=e.imageSubRegion),e$2b(this._billboardCollection._textureAtlas)&&this._loadImage(),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=C$13.SCENE3D,this._clusterShow=!0,this._outlineColor=e$1U.clone(u$_(e.outlineColor,e$1U.BLACK)),this._outlineWidth=u$_(e.outlineWidth,0),this._updateClamping(),this._screenSpacePosition=new o$1o,this._opacityState={opacity:0,placed:!1}}_0x7bec5d();var L$X=n$I.SHOW_INDEX=0,T$P=n$I.POSITION_INDEX=1,F$W=n$I.PIXEL_OFFSET_INDEX=2,Z$N=n$I.EYE_OFFSET_INDEX=3,U$R=n$I.HORIZONTAL_ORIGIN_INDEX=4,j$R=n$I.VERTICAL_ORIGIN_INDEX=5,J$L=n$I.SCALE_INDEX=6,w$O=n$I.IMAGE_INDEX_INDEX=7,z$N=n$I.COLOR_INDEX=8,K$K=n$I.ROTATION_INDEX=9,Q$O=n$I.ALIGNED_AXIS_INDEX=10,$$Q=n$I.SCALE_BY_DISTANCE_INDEX=11,ii$5=n$I.TRANSLUCENCY_BY_DISTANCE_INDEX=12,ei$4=n$I.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,ti$5=n$I.DISTANCE_DISPLAY_CONDITION=14,ni$5=n$I.DISABLE_DEPTH_DISTANCE=15;n$I.TEXTURE_COORDINATE_BOUNDS=16;var si$5=n$I.VOL_TEXCOORD_INDEX=17,W$S=n$I.SDF_INDEX=18,ai$6=n$I.OPACITY_STATE_INDEX=19;function o$R(e,t){var i=e._billboardCollection;e$2b(i)&&(i._updateBillboard(e,t),e._dirty=!0)}n$I.NUMBER_OF_PROPERTIES=20,Object.defineProperties(n$I.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._show!==e&&(this._show=e,o$R(this,L$X))}},position:{get:function(){return this._position},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._position;o$1p.equals(t,e)||(o$1p.clone(e,t),o$1p.clone(e,this._actualPosition),this._updateClamping(),o$R(this,T$P))}},heightReference:{get:function(){return this._heightReference},set:function(e){if(!e$2b(e))throw new t$16("value is required.");e!==this._heightReference&&(this._heightReference=e,this._updateClamping(),o$R(this,T$P))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._pixelOffset;o$1o.equals(t,e)||(o$1o.clone(e,t),o$R(this,F$W))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._scaleByDistance;o$Y.equals(t,e)||(this._scaleByDistance=o$Y.clone(e,t),o$R(this,$$Q))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._translucencyByDistance;o$Y.equals(t,e)||(this._translucencyByDistance=o$Y.clone(e,t),o$R(this,ii$5))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._pixelOffsetScaleByDistance;o$Y.equals(t,e)||(this._pixelOffsetScaleByDistance=o$Y.clone(e,t),o$R(this,ei$4))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._eyeOffset;o$1p.equals(t,e)||(o$1p.clone(e,t),o$R(this,Z$N))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._horizontalOrigin!==e&&(this._horizontalOrigin=e,o$R(this,U$R))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._verticalOrigin!==e&&(this._verticalOrigin=e,o$R(this,j$R))}},scale:{get:function(){return this._scale},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._scale!==e&&(this._scale=e,o$R(this,J$L))}},color:{get:function(){return this._color},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._color;e$1U.equals(t,e)||(e$1U.clone(e,t),o$R(this,z$N))}},rotation:{get:function(){return this._rotation},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._rotation!==e&&(this._rotation=e,o$R(this,K$K))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._alignedAxis;o$1p.equals(t,e)||(o$1p.clone(e,t),o$R(this,Q$O))}},width:{get:function(){return u$_(this._width,this._imageWidth)},set:function(e){this._width!==e&&(this._width=e,o$R(this,w$O))}},height:{get:function(){return u$_(this._height,this._imageHeight)},set:function(e){this._height!==e&&(this._height=e,o$R(this,w$O))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,o$R(this,z$N))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!r$Y.equals(e,this._distanceDisplayCondition)){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");this._distanceDisplayCondition=r$Y.clone(e,this._distanceDisplayCondition),o$R(this,ti$5)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(e$2b(e)&&e<0)throw new t$16("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,o$R(this,ni$5)}}},volTextureCoord:{get:function(){return this._volTexCoord},set:function(e){this._volTexCoord!==e&&(this._volTexCoord=e,o$R(this,si$5))}},id:{get:function(){return this._id},set:function(e){this._id=e,e$2b(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,e$2b(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageId},set:function(e){e$2b(e)?"string"==typeof e?this.setImage(e,e):e instanceof t$11?this.setImage(e.url,e):e$2b(e.src)?this.setImage(e.src,e):this.setImage(e$1Q(),e):(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=void 0,this._image=void 0,this._imageIndexPromise=void 0,o$R(this,w$O))}},ready:{get:function(){return-1!==this._imageIndex}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=o$1p.clone(e,this._actualClampedPosition),o$R(this,T$P)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,o$R(this,L$X))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._outlineColor;e$1U.equals(t,e)||(e$1U.clone(e,t),o$R(this,W$S))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,o$R(this,W$S))}},opacityState:{get:function(){return this._opacityState},set:function(e){(this._opacityState.opacity!==e.opacity||this._opacityState.placed!==e.placed)&&(this._opacityState={opacity:e.opacity,placed:e.placed},o$R(this,ai$6))}}}),n$I.prototype.getPickId=function(e){return e$2b(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId},n$I.prototype._updateClamping=function(){n$I._updateClamping(this._billboardCollection,this)};var C$T=new a$18,b$12=new o$1p;n$I._updateClamping=function(e,t){var i=e._scene;if(e$2b(i)&&e$2b(i.globe)){var n=i.globe,r=n.ellipsoid,o=n._surface,a=i.frameState.mode,s=a!==t._mode;if(t._mode=a,(t._heightReference===k$P.NONE||s)&&e$2b(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference!==k$P.NONE&&e$2b(t._position)){var l=r.cartesianToCartographic(t._position);if(e$2b(l)){e$2b(t._removeCallbackFunc)&&t._removeCallbackFunc();e=u$_(t._labelCollection,t._billboardCollection);t._removeCallbackFunc=o.updateHeight(l,c,e$2b(e)&&e._isMVT?void 0:i),a$18.clone(l,C$T);var u=n.getHeight(l);e$2b(u)&&(C$T.height=u),r.cartographicToCartesian(C$T,b$12),a!==C$13.SCENE3D&&(b$12=m$17.convertToColumbusCartesian(b$12)),c(b$12)}else t._actualClampedPosition=void 0}}else if(t._heightReference!==k$P.NONE)throw new t$16("Height reference is not supported without a scene and globe.");function c(e){if(t._heightReference===k$P.RELATIVE_TO_GROUND)if(t._mode===C$13.SCENE3D){var i=r.cartesianToCartographic(e,C$T);i.height+=l.height,r.cartographicToCartesian(i,e)}else e.x+=l.height;t._clampedPosition=o$1p.clone(e,t._clampedPosition)}},n$I.prototype._loadImage=function(){var e,t=this._billboardCollection._textureAtlas,i=this._imageId,n=this._image,r=this._imageSubRegion;if(e$2b(n)&&(e=t.addImage(i,n)),e$2b(r)&&(e=t.addSubRegion(i,r)),this._imageIndexPromise=e,e$2b(e)){var o=this;e.then((function(e){if(o._imageId===i&&o._image===n&&f$18.equals(o._imageSubRegion,r)){var a=t.textureCoordinates[e];o._imageWidth=t.texture.width*a.width,o._imageHeight=t.texture.height*a.height,o._imageIndex=e,o._ready=!0,o._image=void 0,o._imageIndexPromise=void 0,o$R(o,w$O)}})).otherwise((function(e){console.error("Error loading image for billboard: "+e),o._imageIndexPromise=void 0}))}},n$I.prototype.setImage=function(e,t){if(!e$2b(e))throw new t$16("id is required.");if(!e$2b(t))throw new t$16("image is required.");this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,e$2b(this._billboardCollection._textureAtlas)&&this._loadImage())},n$I.prototype.setImageSubRegion=function(e,t){if(!e$2b(e))throw new t$16("id is required.");if(!e$2b(t))throw new t$16("subRegion is required.");this._imageId===e&&f$18.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=f$18.clone(t),e$2b(this._billboardCollection._textureAtlas)&&this._loadImage())},n$I.prototype._setTranslate=function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._translate;o$1o.equals(t,e)||(o$1o.clone(e,t),o$R(this,F$W))},n$I.prototype._getActualPosition=function(){return e$2b(this._clampedPosition)?this._clampedPosition:this._actualPosition},n$I.prototype._setActualPosition=function(e){e$2b(this._clampedPosition)||o$1p.clone(e,this._actualPosition),o$R(this,T$P)};var H$U=new e$29;n$I._computeActualPosition=function(e,t,i,n){return e$2b(e._clampedPosition)?(i.mode!==e._mode&&e._updateClamping(),e._clampedPosition):i.mode===C$13.SCENE3D?t:(p$1d.multiplyByPoint(n,t,H$U),s$Q.computeActualWgs84Position(i,H$U))};var M$T=new o$1p;n$I._computeScreenSpacePosition=function(e,t,i,n,r,o){var a=p$1d.multiplyByPoint(e,t,M$T),s=s$Q.wgs84WithEyeOffsetToWindowCoordinates(r,a,i,o);if(e$2b(s))return o$1o.add(s,n,s),s};var v$G=new o$1o(0,0);n$I.prototype.computeScreenSpacePosition=function(e,t){var i=this._billboardCollection;if(e$2b(t)||(t=this._screenSpacePosition),!e$2b(i))throw new t$16("Billboard must be in a collection. Was it removed?");if(!e$2b(e))throw new t$16("scene is required.");o$1o.clone(this._pixelOffset,v$G),o$1o.add(v$G,this._translate,v$G);var n=i.modelMatrix,r=this._position;if(e$2b(this._clampedPosition)&&(r=this._clampedPosition,e.mode!==C$13.SCENE3D)){var o=e.mapProjection,a=o.ellipsoid,s=o.unproject(r,C$T);r=a.cartographicToCartesian(s,M$T),n=p$1d.IDENTITY}return n$I._computeScreenSpacePosition(n,r,this._eyeOffset,v$G,e,t)},n$I.getScreenSpaceBoundingBox=function(e,t,i){var n=e.width,r=e.height,o=e.scale;n*=o,r*=o;var a=t.x;e.horizontalOrigin===j$T.RIGHT?a-=n:e.horizontalOrigin===j$T.CENTER&&(a-=.5*n);var s=t.y;return e.verticalOrigin===S$O.BOTTOM||e.verticalOrigin===S$O.BASELINE?s-=r:e.verticalOrigin===S$O.CENTER&&(s-=.5*r),e$2b(i)||(i=new f$18),i.x=a,i.y=s,i.width=n,i.height=r,i},n$I.prototype.equals=function(e){return this===e||e$2b(e)&&this._id===e._id&&o$1p.equals(this._position,e._position)&&this._imageId===e._imageId&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&f$18.equals(this._imageSubRegion,e._imageSubRegion)&&e$1U.equals(this._color,e._color)&&o$1o.equals(this._pixelOffset,e._pixelOffset)&&o$1o.equals(this._translate,e._translate)&&o$1p.equals(this._eyeOffset,e._eyeOffset)&&o$Y.equals(this._scaleByDistance,e._scaleByDistance)&&o$Y.equals(this._translucencyByDistance,e._translucencyByDistance)&&o$Y.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&r$Y.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},n$I.prototype._destroy=function(){e$2b(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),e$2b(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0},n$I.prototype.setBillboardStyle=function(e){!e$2b(e)||(this.image=u$_(e.image,this._image))};const _0x2d144b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5e0762=_0x2d144b(void 0,(function(){return _0x5e0762.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e0762).search("(((.+)+)+)+$")}));_0x5e0762();class _0x772bf3{constructor(e,t,i){const n=this.boxCells=[],r=this.circleCells=[];this.xCellCount=Math.ceil(e/i),this.yCellCount=Math.ceil(t/i);for(let e=0;e<this.xCellCount*this.yCellCount;e++)n.push([]),r.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=t,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/t,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,t,i,n,r){this._forEachCell(t,i,n,r,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)}insertCircle(e,t,i,n){this._forEachCell(t-n,i-n,t+n,i+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(i),this.circles.push(n)}_insertBoxCell(e,t,i,n,r,o){this.boxCells[r].push(o)}_insertCircleCell(e,t,i,n,r,o){this.circleCells[r].push(o)}_query(e,t,i,n,r,o){if(i<0||e>this.width||n<0||t>this.height)return!r&&[];const a=[];if(e<=0&&t<=0&&this.width<=i&&this.height<=n){if(r)return!0;for(let e=0;e<this.boxKeys.length;e++)a.push({key:this.boxKeys[e],x1:this.bboxes[4*e],y1:this.bboxes[4*e+1],x2:this.bboxes[4*e+2],y2:this.bboxes[4*e+3]});for(let e=0;e<this.circleKeys.length;e++){const t=this.circles[3*e],i=this.circles[3*e+1],n=this.circles[3*e+2];a.push({key:this.circleKeys[e],x1:t-n,y1:i-n,x2:t+n,y2:i+n})}return o?a.filter(o):a}{const s={hitTest:r,seenUids:{box:{},circle:{}}};return this._forEachCell(e,t,i,n,this._queryCell,a,s,o),r?a.length>0:a}}_queryCircle(e,t,i,n,r){const o=e-i,a=e+i,s=t-i,l=t+i;if(a<0||o>this.width||l<0||s>this.height)return!n&&[];const u=[],c={hitTest:n,circle:{x:e,y:t,radius:i},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,u,c,r),n?u.length>0:u}query(e,t,i,n,r){return this._query(e,t,i,n,!1,r)}hitTest(e,t,i,n,r){return this._query(e,t,i,n,!0,r)}hitTestCircle(e,t,i,n){return this._queryCircle(e,t,i,!0,n)}_queryCell(e,t,i,n,r,o,a,s){const l=a.seenUids,u=this.boxCells[r];if(null!==u){const r=this.bboxes;for(const c of u)if(!l.box[c]){l.box[c]=!0;const u=4*c;if(e<=r[u+2]&&t<=r[u+3]&&i>=r[u+0]&&n>=r[u+1]&&(!s||s(this.boxKeys[c]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[c],x1:r[u],y1:r[u+1],x2:r[u+2],y2:r[u+3]})}}}const c=this.circleCells[r];if(null!==c){const r=this.circles;for(const u of c)if(!l.circle[u]){l.circle[u]=!0;const c=3*u;if(this._circleAndRectCollide(r[c],r[c+1],r[c+2],e,t,i,n)&&(!s||s(this.circleKeys[u]))){if(a.hitTest)return o.push(!0),!0;{const e=r[c],t=r[c+1],i=r[c+2];o.push({key:this.circleKeys[u],x1:e-i,y1:t-i,x2:e+i,y2:t+i})}}}}}_queryCellCircle(e,t,i,n,r,o,a,s){const l=a.circle,u=a.seenUids,c=this.boxCells[r];if(null!==c){const e=this.bboxes;for(const t of c)if(!u.box[t]){u.box[t]=!0;const i=4*t;if(this._circleAndRectCollide(l.x,l.y,l.radius,e[i+0],e[i+1],e[i+2],e[i+3])&&(!s||s(this.boxKeys[t])))return o.push(!0),!0}}const h=this.circleCells[r];if(null!==h){const e=this.circles;for(const t of h)if(!u.circle[t]){u.circle[t]=!0;const i=3*t;if(this._circlesCollide(e[i],e[i+1],e[i+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[t])))return o.push(!0),!0}}}_forEachCell(e,t,i,n,r,o,a,s){const l=this._convertToXCellCoord(e),u=this._convertToYCellCoord(t),c=this._convertToXCellCoord(i),h=this._convertToYCellCoord(n);for(let d=l;d<=c;d++)for(let l=u;l<=h;l++){const u=this.xCellCount*l+d;if(r.call(this,e,t,i,n,u,o,a,s))return}}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,i,n,r,o){const a=n-e,s=r-t,l=i+o;return l*l>a*a+s*s}_circleAndRectCollide(e,t,i,n,r,o,a){const s=(o-n)/2,l=Math.abs(e-(n+s));if(l>s+i)return!1;const u=(a-r)/2,c=Math.abs(t-(r+u));if(c>u+i)return!1;if(l<=s||c<=u)return!0;const h=l-s,d=c-u;return h*h+d*d<=i*i}}const _0x2d175b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x197ec5=_0x2d175b(void 0,(function(){return _0x197ec5.toString().search("(((.+)+)+)+$").toString().constructor(_0x197ec5).search("(((.+)+)+)+$")}));_0x197ec5();const _0x52f08b=100;class _0x4024c{constructor(e,t,i,n,r){this.transform=i,this.grid=n||new _0x772bf3(e+2*_0x52f08b,t+2*_0x52f08b,25),this.ignoredGrid=r||new _0x772bf3(e+2*_0x52f08b,t+2*_0x52f08b,25),this.pitchfactor=Math.cos(i._pitch)*i.cameraToCenterDistance,this.screenRightBoundary=e+_0x52f08b,this.screenBottomBoundary=t+_0x52f08b,this.gridRightBoundary=e+2*_0x52f08b,this.gridBottomBoundary=t+2*_0x52f08b}placeCollisionBox(e,t,i){const n=e.x1,r=e.y1,o=e.x2,a=e.y2;return!this.isInsideGrid(n,r,o,a)||!t&&this.grid.hitTest(n,r,o,a,i)?{box:[],offscreen:!1}:{box:[n,r,o,a],offscreen:this.isOffscreen(n,r,o,a)}}approximateTileDistance(e,t,i,n,r){const o=r?1:n/this.pitchfactor,a=e.lastSegmentViewportDistance*i;return e.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(t))}placeCollisionCircles(e,t,i,n,r,o,a,s,l,u,c,h,d){const f=[],p=this.projectAnchor(l,r.anchorX,r.anchorY),_=s/24,m=r.lineOffsetX*s,g=r.lineOffsetY*s,x=new Point(r.anchorX,r.anchorY),v=projection.project(x,u).point,y=projection.placeFirstAndLastGlyph(_,a,m,g,!1,v,x,r,o,u,{},!0);let $=!1,b=!1,T=!0;const C=p.perspectiveRatio*n,S=1/(n*i);let w=0,E=0;y&&(w=this.approximateTileDistance(y.first.tileDistance,y.first.angle,S,p.cameraDistance,h),E=this.approximateTileDistance(y.last.tileDistance,y.last.angle,S,p.cameraDistance,h));for(let i=0;i<e.length;i+=5){const n=e[i],r=e[i+1],o=e[i+2],a=e[i+3];if(!y||a<-w||a>E){_0x4de5e4(e,i,!1);continue}const s=this.projectPoint(l,n,r),u=o*C;if(f.length>0){const t=s.x-f[f.length-4],n=s.y-f[f.length-3];if(u*u*2>t*t+n*n){if(i+8<e.length){const t=e[i+8];if(t>-w&&t<E){_0x4de5e4(e,i,!1);continue}}}}const h=i/5;f.push(s.x,s.y,u,h),_0x4de5e4(e,i,!0);const p=s.x-u,_=s.y-u,m=s.x+u,g=s.y+u;if(T=T&&this.isOffscreen(p,_,m,g),b=b||this.isInsideGrid(p,_,m,g),!t&&this.grid.hitTestCircle(s.x,s.y,u,d)){if(!c)return{circles:[],offscreen:!1};$=!0}}return{circles:$||!b?[]:f,offscreen:T}}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const t=[];let i=1/0,n=1/0,r=-1/0,o=-1/0;for(const a of e){const e=new Point(a.x+_0x52f08b,a.y+_0x52f08b);i=Math.min(i,e.x),n=Math.min(n,e.y),r=Math.max(r,e.x),o=Math.max(o,e.y),t.push(e)}const a=this.grid.query(i,n,r,o).concat(this.ignoredGrid.query(i,n,r,o)),s={},l={};for(const e of a){const i=e.key;if(void 0===s[i.bucketInstanceId]&&(s[i.bucketInstanceId]={}),s[i.bucketInstanceId][i.featureIndex])continue;(void 0)(t,[new Point(e.x1,e.y1),new Point(e.x2,e.y1),new Point(e.x2,e.y2),new Point(e.x1,e.y2)])&&(s[i.bucketInstanceId][i.featureIndex]=!0,void 0===l[i.bucketInstanceId]&&(l[i.bucketInstanceId]=[]),l[i.bucketInstanceId].push(i.featureIndex))}return l}insertCollisionBox(e,t,i,n,r){const o={bucketInstanceId:i,featureIndex:n,collisionGroupID:r};(t?this.ignoredGrid:this.grid).insert(o,e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,i,n,r){const o=t?this.ignoredGrid:this.grid,a={bucketInstanceId:i,featureIndex:n,collisionGroupID:r};for(let t=0;t<e.length;t+=4)o.insertCircle(a,e[t],e[t+1],e[t+2])}projectAnchor(e,t,i){const n=[t,i,0,1];return projection.xyTransformMat4(n,n,e),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5,cameraDistance:n[3]}}projectPoint(e,t,i){const n=[t,i,0,1];return projection.xyTransformMat4(n,n,e),new Point((n[0]/n[3]+1)/2*this.transform.width+_0x52f08b,(-n[1]/n[3]+1)/2*this.transform.height+_0x52f08b)}projectAndGetPerspectiveRatio(e,t,i){const n=[t,i,0,1];projection.xyTransformMat4(n,n,e);return{point:new Point((n[0]/n[3]+1)/2*this.transform.width+_0x52f08b,(-n[1]/n[3]+1)/2*this.transform.height+_0x52f08b),perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5}}isOffscreen(e,t,i,n){return i<_0x52f08b||e>=this.screenRightBoundary||n<_0x52f08b||t>this.screenBottomBoundary}isInsideGrid(e,t,i,n){return i>=0&&e<this.gridRightBoundary&&n>=0&&t<this.gridBottomBoundary}}function _0x4de5e4(e,t,i){e[t+4]=i?1:0}var _0xa5f321=(_0x57f327=!0,function(e,t){var i=_0x57f327?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57f327=!1,i}),_0x28bd4c=_0xa5f321(void 0,(function(){return _0x28bd4c.toString().search("(((.+)+)+)+$").toString().constructor(_0x28bd4c).search("(((.+)+)+)+$")})),_0x57f327;_0x28bd4c(),new e$1U;class _0x19f555{constructor(e,t,i,n){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):n&&i?1:0,this.placed=i}isHidden(){return 0===this.opacity&&!this.placed}}class _0x315e28{constructor(e,t,i,n,r){this.text=new _0x19f555(e?e.text:null,t,i,r),this.icon=new _0x19f555(e?e.icon:null,t,n,r)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class _0x40d9f3{constructor(e,t,i){this.text=e,this.icon=t,this.skipFade=i}}class Placement{constructor(e,t,i,n){this.scene=e,this.transform=t.clone(),this.collisionIndex=new _0x4024c(e.drawingBufferWidth,e.drawingBufferHeight,this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=i,this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}placeLayerTile(e,t){var i=this,n=t._MVTLabel._billboardsByLayers[e.id],r=this.scene.frameState.frameNumber;for(var o in n){for(var a=n[o],s=void 0,l=0;l<a.length;l++){var u=a[l];if(u.collisionFrameNumber!==r){u.collisionFrameNumber=r;var c=u.computeScreenSpacePosition(i.scene);if(c)if(s){var h=n$I.getScreenSpaceBoundingBox(u,c);f$18.union(s,h,s)}else s=new f$18,n$I.getScreenSpaceBoundingBox(u,c,s)}}if(!s)continue;var d={x1:s.x,y1:s.y,x2:s.x+s.width,y2:s.y+s.height,anchorPointX:0,anchorPointY:0};const e=i.collisionIndex.placeCollisionBox(d,false);if(e.box&&e.box.length>0&&t._visible){i.collisionIndex.insertCollisionBox(e.box,!1,o),this.placements[o]=new _0x40d9f3(!0,!1,e.offscreen)}}}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const t=this.prevPlacement;let i=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;const n=t?t.symbolFadeChange(e):1,r=t?t.opacities:{};for(const e in this.placements){const t=this.placements[e],o=r[e];o?(this.opacities[e]=new _0x315e28(o,n,t.text,t.icon),i=i||t.text!==o.text.placed||t.icon!==o.icon.placed):(this.opacities[e]=new _0x315e28(null,n,t.text,t.icon,t.skipFade),i=i||t.text||t.icon)}for(const e in r){const t=r[e];if(!this.opacities[e]){const r=new _0x315e28(t,n,!1,!1);!r.isHidden()&&(this.opacities[e]=r,i=i||t.text.placed||t.icon.placed)}}i?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){const i=new _0x315e28(null,0,!1,!1,!0);for(var n=0;n<t.length;n++){var r=t[n]._MVTLabel._billboardsByLayers[e.id];if(r)for(var o in r){var a=r[o];let e=this.opacities[o];!e&&(e=i,this.opacities[o]=e);for(var s=0;s<a.length;s++){a[s].opacityState=e.text}}}}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,t){let i;if(this.zoomAtLastRecencyCheck===t){i=1-this.zoomAdjustment(t)}else i=1;this.zoomAtLastRecencyCheck=t;return this.commitTime+this.fadeDuration*i>e}setStale(){this.stale=!0}}const _0x3d9437=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x368a0d=_0x3d9437(void 0,(function(){return _0x368a0d.toString().search("(((.+)+)+)+$").toString().constructor(_0x368a0d).search("(((.+)+)+)+$")}));_0x368a0d();class _0x53d1bc{constructor(){this._currentTileIndex=0}continuePlacement(e,t,i,n){for(;this._currentTileIndex<e.length;){const r=e[this._currentTileIndex];if(t.placeLayerTile(i,r),this._currentTileIndex++,n())return!0}}}class _0x1b1ac8{constructor(e,t,i,n,r,o){this.placement=new Placement(e,t,r,o),this._currentPlacementIndex=i.length-1,this._forceFullPlacement=n,this._done=!1}isDone(){return this._done}continuePlacement(e,t,i){const n=performance.now(),r=()=>{const e=performance.now()-n;return!this._forceFullPlacement&&e>2};for(;this._currentPlacementIndex>=0;){const n=t[e[this._currentPlacementIndex]];if(n){if(this.placement.collisionIndex.transform.zoom,"symbol"===n.type){if("point"!==n.layout.get("symbol-placement")){this._currentPlacementIndex--;continue}!this._inProgressLayer&&(this._inProgressLayer=new _0x53d1bc);if(this._inProgressLayer.continuePlacement(i,this.placement,n,r))return;delete this._inProgressLayer}this._currentPlacementIndex--}else this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}var _0x2cda14=(_0x5f73b9=!0,function(e,t){var i=_0x5f73b9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f73b9=!1,i}),_0x3e6014=_0x2cda14(void 0,(function(){return _0x3e6014.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e6014).search("(((.+)+)+)+$")})),_0x5f73b9;function _0x4ae6a8(e){this.dispatcher=new _0x254b91(_0x2f8351(),this),this._layers={},this._order=[],this.sourceCaches={},this._loaded=!1,this.highLighting=!1,this.imageManager=new _0x38c377,this.glyphManager=new _0x5d88ab(e._requestManager,e._localIdeographFontFamily),this.lineAtlas=new _0x183e32(256,512),this.map=e,this._resetUpdates()}_0x3e6014(),_0x4ae6a8.prototype._load=function(e){for(var t in this._loaded=!0,this.stylesheet=e,e.sources);e.sprite?this._spriteRequest=_0x5bef2f(e.sprite,this.map._requestManager,((e,t)=>{if(this._spriteRequest=null,e);else if(t)for(const e in t)this.imageManager.addImage(e,t[e]);this.imageManager.setLoaded(!0),this.dispatcher.broadcast("setImages",this.imageManager.listImages()),this.map._resourceReady=!0})):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var i=this.stylesheet.layers;this._order=i.map((function(e){return e.id})),this._layers={};for(var n=0,r=i;n<r.length;n+=1){var o=d=r[n];if(null!=(d=_0x5c454c(d))){d.config=o,d.config.originalFilter=clone(d.filter);var a=new _0x4f93ac(0);d.recalculate(a),this._layers[d.id]=d}}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order));var s=this._layers,l=new _0x223d33(i);for(var u in l.familiesBySource){var c=l.familiesBySource[u];for(var h in c)for(n=0,r=c[h];n<r.length;n+=1){var d,f=r[n],p=(d=f[0]).id;f.map((function(e){s[e.id].bucketName=p}))}}},_0x4ae6a8.prototype.update=function(e){if(this._loaded){var t=new _0x4f93ac(0);if(this._changed,this._changed){var i=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var r in(i.length||n.length)&&this._updateWorkerLayers(e,i,n),this._updatedPaintProps)this._layers[r].updateTransitions(t);this._resetUpdates()}for(var o in this.sourceCaches)this.sourceCaches[o].used=!1;for(var a=0,s=this._order;a<s.length;a+=1){var l=s[a],u=this._layers[l];null!=u&&null!=u&&u.recalculate(t,this.imageManager.listImages())}}},_0x4ae6a8.prototype._updateWorkerLayers=function(e,t,i){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:i});for(var n=[],r=0;r<t.length;r++){var o=t[r],a=this._layers[o];e$2b(a)&&n.push(a.config)}for(var s in e){e[s].addRepaintTask(n,i,this.highLighting)}this.highLighting=!1},_0x4ae6a8.prototype.addLayer=function(e,t,i){var n=e.id;if(this.getLayer(n))console.log('Layer with id "'+n+'" already exists on this map');else{var r=_0x5c454c(e);r.config=e;var o=t?this._order.indexOf(t):this._order.length;t&&-1===o?console.log('Layer with id "'+t+'" does not exist on this map.'):(this._order.splice(o,0,n),this._layerOrderChanged=!0,this._layers[n]=r,this._updateLayer(r))}},_0x4ae6a8.prototype.moveLayer=function(e,t){if(this._changed=!0,this._layers[e]){if(e!==t){var i=this._order.indexOf(e);this._order.splice(i,1);var n=t?this._order.indexOf(t):this._order.length;t&&-1===n?console.log('Layer with id "'+t+'" does not exist on this map.'):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}}else console.log("The layer '"+e+"' does not exist in the map's style and cannot be moved.")},_0x4ae6a8.prototype.loaded=function(){if(!this._loaded)return!1;if(id!==before){var e=this._order.indexOf(id);this._order.splice(e,1);var t=before?this._order.indexOf(before):this._order.length;before&&-1===t||(this._order.splice(t,0,id),this._layerOrderChanged=!0)}},_0x4ae6a8.prototype.removeLayer=function(e){var t=this._layers[e];if(t){var i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],t.onRemove&&t.onRemove(this.map)}else console.log("The layer '"+e+"' does not exist in the map's style and cannot be removed.")},_0x4ae6a8.prototype.getLayer=function(e){return this._layers[e]},_0x4ae6a8.prototype.setFilter=function(e,t,i){var n=this.getLayer(e);if(n){if(!_0xc968bb(n.filter,t)){if(null==t)e$2b(n.config.originalFilter)?(n.filter=n.config.originalFilter,n.config.filter=n.config.originalFilter):(n.filter=void 0,n.config.filter=null);else if(e$2b(n.filter)&&Array.isArray(n.filter)&&"all"===n.filter[0]){var r=!1;if("in"===t[0])for(var o=0;o<n.filter.length;o++)"in"===n.filter[o][0]&&(n.filter[o]=t,r=!0);!r&&(n.filter.push(t),n.config.filter=n.filter)}else n.filter=clone(t),n.config.filter=n.filter;this._updateLayer(n)}}else console.log("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")},_0x4ae6a8.prototype.getFilter=function(e){return clone(this.getLayer(e).filter)},_0x4ae6a8.prototype.setLayoutProperty=function(e,t,i,n){void 0===n&&(n={});var r=this.getLayer(e);r?_0xc968bb(r.getLayoutProperty(t),i)||(r.setLayoutProperty(t,i,n),this._updateLayer(r)):console.log("The layer '"+e+"' does not exist in the map's style and cannot be styled.")},_0x4ae6a8.prototype.getLayoutProperty=function(e,t){var i=this.getLayer(e);if(i)return i.getLayoutProperty(t);console.log("The layer '"+e+"' does not exist in the map's style.")},_0x4ae6a8.prototype.setPaintProperty=function(e,t,i,n){void 0===n&&(n={});var r=this.getLayer(e);r?_0xc968bb(r.getPaintProperty(t),i)||(r.setPaintProperty(t,i,n),this._updateLayer(r),this._changed=!0,this._updatedPaintProps[e]=!0):console.log("The layer '"+e+"' does not exist in the map's style and cannot be styled.")},_0x4ae6a8.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},_0x4ae6a8.prototype._serializeLayers=function(e){for(var t=[],i=0,n=e;i<n.length;i+=1){var r=n[i],o=this._layers[r];e$2b(o)&&("custom"!==o.type&&t.push(o.serialize()))}return t},_0x4ae6a8.prototype.serialize=function(){return filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},_0x4ae6a8.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},_0x4ae6a8.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,this._changed=!0},_0x4ae6a8.prototype.setHighLight=function(e,t){var i=this._findHighLightFeature(e);if(!e$2b(i))return e$2b(this.lastHighLightLayerID)&&(this.removeLayer(this.lastHighLightLayerID),this.lastHighLightLayerID=null,this.highLighting=!0),void(t._currentPickID=void 0);e.featureID=i.id,e.layerID=i.layer.id;var n=i.layer,r=n["source-layer"]+"_"+n.type+"_highlight",o=this._layers[r];if(t._currentPickID=r+e.featureID,!e$2b(o)){var a={};a["source-layer"]=n["source-layer"],a.source=n.source,a.id=r;var s=n.paint["fill-color"]&&0===e$1U.fromCssColorString(n.paint["fill-color"]).alpha||0===n.paint["fill-opacity"],l={};"circle"==n.type?(a.type="circle",l["circle-color"]=t._selectedColor.toCssColorString(),l["circle-radius"]=n.paint["circle-radius"]||5):"fill"!=n.type||s?(a.type="line",l["line-color"]=t._selectedColor.toCssColorString(),l["line-width"]=2):(a.type="fill",l["fill-color"]=t._selectedColor.toCssColorString()),a.paint=l,this.addLayer(a)}var u=["in","$id",i.id];this.setFilter(r,u),e$2b(this.lastHighLightLayerID)&&this.lastHighLightLayerID!==r&&this.removeLayer(this.lastHighLightLayerID),this.lastHighLightLayerID=r,this.highLighting=!0},_0x4ae6a8.prototype.cancelHighLight=function(e){e$2b(this.lastHighLightLayerID)&&(this.removeLayer(this.lastHighLightLayerID),this.lastHighLightLayerID=null,this.highLighting=!0),e._currentPickID=void 0},_0x4ae6a8.prototype._findHighLightFeature=function(e){for(var t={},i=0;i<this._order.length;i++){t[this._order[i]]=i}var n=null,r=0;for(var o in e)for(var a=e[o],s=0;s<a.length;s++){var l=a[s].feature;if(1==l.type||2==l.type||3==l.type){var u=t[l.layer.id];u>=r&&(n=l,r=u)}}return n},_0x4ae6a8.prototype._updatePlacement=function(e,t,i){let n=!1;var r=this.map.innerLayer._imageryCache,o=[];for(var a in r)o.push(r[a]);o.sort((function(e,t){return t.level-e.level||(e.isTileIDLessThan(t)?-1:1)}));const s=this._layerOrderChanged||0===i;if((s||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(window.performance.now(),t.zoom))&&(this.pauseablePlacement=new _0x1b1ac8(e,t,this._order,s,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,o),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(window.performance.now()),n=!0)),n)for(const e of this._order){const t=this._layers[e];t&&"symbol"===t.type&&this.placement.updateLayerOpacities(t,o)}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(performance.now())},_0x4ae6a8.prototype.getImages=function(e,t,i){this.imageManager.getImages(t.icons,i)},_0x4ae6a8.prototype.getGlyphs=function(e,t,i){this.glyphManager.getGlyphs(t.stacks,i)},_0x4ae6a8.prototype.getResource=function(e,t,i){return makeRequest(t,i)};const _0x44f09b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x312361=_0x44f09b(void 0,(function(){return _0x312361.toString().search("(((.+)+)+)+$").toString().constructor(_0x312361).search("(((.+)+)+)+$")}));_0x312361();class _0x420acd{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))}setNorthEast(e){return this._ne=e instanceof _0xf8942b?new _0xf8942b(e.lng,e.lat):_0xf8942b.convert(e),this}setSouthWest(e){return this._sw=e instanceof _0xf8942b?new _0xf8942b(e.lng,e.lat):_0xf8942b.convert(e),this}extend(e){const t=this._sw,i=this._ne;let n,r;if(e instanceof _0xf8942b)n=e,r=e;else{if(!(e instanceof _0x420acd))return Array.isArray(e)?e.every(Array.isArray)?this.extend(_0x420acd.convert(e)):this.extend(_0xf8942b.convert(e)):this;if(n=e._sw,r=e._ne,!n||!r)return this}return t||i?(t.lng=Math.min(n.lng,t.lng),t.lat=Math.min(n.lat,t.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new _0xf8942b(n.lng,n.lat),this._ne=new _0xf8942b(r.lng,r.lat)),this}getCenter(){return new _0xf8942b((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new _0xf8942b(this.getWest(),this.getNorth())}getSouthEast(){return new _0xf8942b(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"}isEmpty(){return!(this._sw&&this._ne)}contains(e){const{lng:t,lat:i}=_0xf8942b.convert(e),n=this._sw.lat<=i&&i<=this._ne.lat;let r=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(r=this._sw.lng>=t&&t>=this._ne.lng),n&&r}static convert(e){return!e||e instanceof _0x420acd?e:new _0x420acd(e)}}const _0x517c32=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x35b993=_0x517c32(void 0,(function(){return _0x35b993.toString().search("(((.+)+)+)+$").toString().constructor(_0x35b993).search("(((.+)+)+)+$")}));_0x35b993();class _0xf8942b{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new _0xf8942b(wrap(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return"LngLat("+this.lng+", "+this.lat+")"}toBounds(e){const t=360*e/40075017,i=t/Math.cos(Math.PI/180*this.lat);return new _0x420acd(new _0xf8942b(this.lng-i,this.lat-t),new _0xf8942b(this.lng+i,this.lat+t))}static convert(e){if(e instanceof _0xf8942b)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new _0xf8942b(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new _0xf8942b(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const _0x3b3357=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1cf9f8=_0x3b3357(void 0,(function(){return _0x1cf9f8.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cf9f8).search("(((.+)+)+)+$")}));_0x1cf9f8();const _0x552f1b=2*Math.PI*6378137;function _0x446ace(e){return _0x552f1b*Math.cos(e*Math.PI/180)}function mercatorXfromLng(e){return(180+e)/360}function mercatorYfromLat(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function mercatorZfromAltitude(e,t){return e/_0x446ace(t)}function lngFromMercatorX(e){return 360*e-180}function latFromMercatorY(e){const t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}function altitudeFromMercatorZ(e,t){return e*_0x446ace(latFromMercatorY(t))}function mercatorScale(e){return 1/Math.cos(e*Math.PI/180)}class _0x3ee3e9{constructor(e,t,i=0){this.x=+e,this.y=+t,this.z=+i}static fromLngLat(e,t=0){const i=_0xf8942b.convert(e);return new _0x3ee3e9(mercatorXfromLng(i.lng),mercatorYfromLat(i.lat),mercatorZfromAltitude(t,i.lat))}toLngLat(){return new _0xf8942b(lngFromMercatorX(this.x),latFromMercatorY(this.y))}toAltitude(){return altitudeFromMercatorZ(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/_0x552f1b*mercatorScale(latFromMercatorY(this.y))}}const _0x542ca2=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x145e66=_0x542ca2(void 0,(function(){return _0x145e66.toString().search("(((.+)+)+)+$").toString().constructor(_0x145e66).search("(((.+)+)+)+$")}));_0x145e66();class _0x183136{constructor(e,t,i,n,r){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===r||r,this._minZoom=e||0,this._maxZoom=t||26,this._minPitch=null==i?0:i,this._maxPitch=null==n?60:n,this.setMaxBounds(),this.width=0,this.height=0,this._center=new _0xf8942b(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const e=new _0x183136(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._calcMatrices(),e}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get centerPoint(){return this.size._div(2)}get size(){return new _0x46bdc2(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(e){const t=-wrap(e,-180,180)*Math.PI/180;this.angle!==t&&(this._unmodified=!1,this.angle=t,this._calcMatrices(),this.rotationMatrix=mat2.create(),mat2.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(e){const t=clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==t&&(this._unmodified=!1,this._pitch=t,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(e){const t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())}get center(){return this._center}set center(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}coveringZoomLevel(e){const t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)}getVisibleUnwrappedCoordinates(e){const t=[new UnwrappedTileID(0,e)];if(this._renderWorldCopies){const i=this.pointCoordinate(new _0x46bdc2(0,0)),n=this.pointCoordinate(new _0x46bdc2(this.width,0)),r=this.pointCoordinate(new _0x46bdc2(this.width,this.height)),o=this.pointCoordinate(new _0x46bdc2(0,this.height)),a=Math.floor(Math.min(i.x,n.x,r.x,o.x)),s=Math.floor(Math.max(i.x,n.x,r.x,o.x)),l=1;for(let i=a-l;i<=s+l;i++)0!==i&&t.push(new UnwrappedTileID(i,e))}return t}coveringTiles(e){let t=this.coveringZoomLevel(e);const i=t;if(void 0!==e.minzoom&&t<e.minzoom)return[];void 0!==e.maxzoom&&t>e.maxzoom&&(t=e.maxzoom);const n=_0x3ee3e9.fromLngLat(this.center),r=Math.pow(2,t),o=new _0x46bdc2(r*n.x-.5,r*n.y-.5),a=[this.pointCoordinate(new _0x46bdc2(0,0)),this.pointCoordinate(new _0x46bdc2(this.width,0)),this.pointCoordinate(new _0x46bdc2(this.width,this.height)),this.pointCoordinate(new _0x46bdc2(0,this.height))];return tileCover(t,a,e.reparseOverscaled?i:t,this._renderWorldCopies).sort(((e,t)=>o.dist(e.canonical)-o.dist(t.canonical)))}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(e){const t=clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new _0x46bdc2(mercatorXfromLng(e.lng)*this.worldSize,mercatorYfromLat(t)*this.worldSize)}unproject(e){return new _0x3ee3e9(e.x/this.worldSize,e.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}setLocationAtPoint(e,t){const i=this.pointCoordinate(t),n=this.pointCoordinate(this.centerPoint),r=this.locationCoordinate(e),o=new _0x3ee3e9(r.x-(i.x-n.x),r.y-(i.y-n.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(e){return this.coordinatePoint(this.locationCoordinate(e))}pointLocation(e){return this.coordinateLocation(this.pointCoordinate(e))}locationCoordinate(e){return _0x3ee3e9.fromLngLat(e)}coordinateLocation(e){return e.toLngLat()}pointCoordinate(e){const t=[e.x,e.y,0,1],i=[e.x,e.y,1,1];vec4.transformMat4(t,t,this.pixelMatrixInverse),vec4.transformMat4(i,i,this.pixelMatrixInverse);const n=t[3],r=i[3],o=t[1]/n,a=i[1]/r,s=t[2]/n,l=i[2]/r,u=s===l?0:(0-s)/(l-s);return new _0x3ee3e9(interpolate(t[0]/n,i[0]/r,u)/this.worldSize,interpolate(o,a,u)/this.worldSize)}coordinatePoint(e){const t=[e.x*this.worldSize,e.y*this.worldSize,0,1];return vec4.transformMat4(t,t,this.pixelMatrix),new _0x46bdc2(t[0]/t[3],t[1]/t[3])}getBounds(){return(new _0x420acd).extend(this.pointLocation(new _0x46bdc2(0,0))).extend(this.pointLocation(new _0x46bdc2(this.width,0))).extend(this.pointLocation(new _0x46bdc2(this.width,this.height))).extend(this.pointLocation(new _0x46bdc2(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new _0x420acd([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}setMaxBounds(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(e,t=!1){const i=e.key,n=t?this._alignedPosMatrixCache:this._posMatrixCache;if(n[i])return n[i];const r=e.canonical,o=this.worldSize/this.zoomScale(r.z),a=r.x+Math.pow(2,r.z)*e.wrap,s=_0x3f85ef.mat4.identity(new Float64Array(16));return _0x3f85ef.mat4.translate(s,s,[a*o,r.y*o,0]),_0x3f85ef.mat4.scale(s,s,[o/ae$s,o/ae$s,1]),_0x3f85ef.mat4.multiply(s,t?this.alignedProjMatrix:this.projMatrix,s),n[i]=new Float32Array(s),n[i]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let e,t,i,n,r=-90,o=90,a=-180,s=180;const l=this.size,u=this._unmodified;if(this.latRange){const t=this.latRange;r=mercatorYfromLat(t[1])*this.worldSize,o=mercatorYfromLat(t[0])*this.worldSize,e=o-r<l.y?l.y/(o-r):0}if(this.lngRange){const e=this.lngRange;a=mercatorXfromLng(e[0])*this.worldSize,s=mercatorXfromLng(e[1])*this.worldSize,t=s-a<l.x?l.x/(s-a):0}const c=this.point,h=Math.max(t||0,e||0);if(h)return this.center=this.unproject(new _0x46bdc2(t?(s+a)/2:c.x,e?(o+r)/2:c.y)),this.zoom+=this.scaleZoom(h),this._unmodified=u,void(this._constraining=!1);if(this.latRange){const e=c.y,t=l.y/2;e-t<r&&(n=r+t),e+t>o&&(n=o-t)}if(this.lngRange){const e=c.x,t=l.x/2;e-t<a&&(i=a+t),e+t>s&&(i=s-t)}(void 0!==i||void 0!==n)&&(this.center=this.unproject(new _0x46bdc2(void 0!==i?i:c.x,void 0!==n?n:c.y))),this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;const e=this._fov/2,t=Math.PI/2+this._pitch,i=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-t-e),n=this.point,r=n.x,o=n.y,a=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),s=this.height/50;let l=new Float64Array(16);_0x3f85ef.mat4.perspective(l,this._fov,this.width/this.height,s,a),_0x3f85ef.mat4.scale(l,l,[1,-1,1]),_0x3f85ef.mat4.translate(l,l,[0,0,-this.cameraToCenterDistance]),_0x3f85ef.mat4.rotateX(l,l,this._pitch),_0x3f85ef.mat4.rotateZ(l,l,this.angle),_0x3f85ef.mat4.translate(l,l,[-r,-o,0]),this.mercatorMatrix=_0x3f85ef.mat4.scale([],l,[this.worldSize,this.worldSize,this.worldSize]),_0x3f85ef.mat4.scale(l,l,[1,1,mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=l;const u=this.width%2/2,c=this.height%2/2,h=Math.cos(this.angle),d=Math.sin(this.angle),f=r-Math.round(r)+h*u+d*c,p=o-Math.round(o)+h*c+d*u,_=new Float64Array(l);if(_0x3f85ef.mat4.translate(_,_,[f>.5?f-1:f,p>.5?p-1:p,0]),this.alignedProjMatrix=_,l=_0x3f85ef.mat4.create(),_0x3f85ef.mat4.scale(l,l,[this.width/2,-this.height/2,1]),_0x3f85ef.mat4.translate(l,l,[1,-1,0]),this.labelPlaneMatrix=l,l=_0x3f85ef.mat4.create(),_0x3f85ef.mat4.scale(l,l,[1,-1,1]),_0x3f85ef.mat4.translate(l,l,[-1,-1,0]),_0x3f85ef.mat4.scale(l,l,[2/this.width,2/this.height,1]),this.glCoordMatrix=l,this.pixelMatrix=_0x3f85ef.mat4.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),l=_0x3f85ef.mat4.invert(new Float64Array(16),this.pixelMatrix),!l)throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const e=this.pointCoordinate(new _0x46bdc2(0,0)),t=[e.x*this.worldSize,e.y*this.worldSize,0,1];return vec4.transformMat4(t,t,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const e=this._pitch,t=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new _0x46bdc2(0,t))}getCameraQueryGeometry(e){const t=this.getCameraPoint();if(1===e.length)return[e[0],t];{let i=t.x,n=t.y,r=t.x,o=t.y;for(const t of e)i=Math.min(i,t.x),n=Math.min(n,t.y),r=Math.max(r,t.x),o=Math.max(o,t.y);return[new _0x46bdc2(i,n),new _0x46bdc2(r,n),new _0x46bdc2(r,o),new _0x46bdc2(i,o),new _0x46bdc2(i,n)]}}}function i$P(e,t){return 0!=(e&t)}var e$1c={None:0,QuadKey:1},X$N=Object.freeze(e$1c);function a$K(e,t,i,n){if(!e$2b(e))throw new t$16("uint8Array is required.");if(t<0)throw new t$16("byteOffset cannot be negative.");if(i<0)throw new t$16("byteLength cannot be negative.");if(t+i>e.byteLength)throw new t$16("sub-region exceeds array bounds.");return t=u$_(t,0),i=u$_(i,e.byteLength-t),n=u$_(n,"utf-8"),e=e.subarray(t,t+i),a$K.decode(e,n)}function f$Q(e,t,i){return t<=e&&e<=i}function g$W(e){for(var t=0,i=0,n=0,r=128,o=191,a=[],s=e.length,l=0;l<s;++l){var u=e[l];if(0===n){if(f$Q(u,0,127)){a.push(u);continue}if(f$Q(u,194,223)){n=1,t=31&u;continue}if(f$Q(u,224,239)){224===u&&(r=160),237===u&&(o=159),n=2,t=15&u;continue}if(f$Q(u,240,244)){240===u&&(r=144),244===u&&(o=143),n=3,t=7&u;continue}throw new t$14("String decoding failed.")}f$Q(u,r,o)?(r=128,o=191,t=t<<6|63&u,++i===n&&(a.push(t),t=n=i=0)):(t=n=i=0,r=128,o=191,--l)}return a}a$K.decodeWithTextDecoder=function(e,t){return new TextDecoder(t).decode(e)},a$K.decodeWithFromCharCode=function(e){for(var t="",i=g$W(e),n=i.length,r=0;r<n;++r){var o=i[r];o<=65535?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode(55296+(o>>10),56320+(1023&o)))}return t},typeof TextDecoder<"u"?a$K.decode=a$K.decodeWithTextDecoder:a$K.decode=a$K.decodeWithFromCharCode;var We$j=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642478e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],U$Q=0;function I$10(e,t){t=u$_(t,{}),this._name=t.name,this._tilingScheme=t.tilingScheme,this._owner=void 0,this._hasTileWith=!1,e$2b(t.tileWidth)&&e$2b(t.tileHeight)&&(this._hasTileWith=!0),this._tileWidth=u$_(parseInt(t.tileWidth)||void 0,512),this._tileHeight=u$_(parseInt(t.tileHeight)||void 0,512),this._canvasWidth=u$_(parseInt(t.canvasWidth)||void 0,512),this._canvasWidth=e$2a.clamp(this._canvasWidth,128,1024),e$2b(t.minimumLevel)&&e$2b(t.maximumLevel)&&(this._hasLevel=!0),this._minimumLevel=u$_(parseInt(t.minimumLevel)||void 0,0),this._maximumLevel=parseInt(t.maximumLevel)||void 0,this.minimumTerrainLevel=parseInt(t.minimumTerrainLevel)||void 0,this.maximumTerrainLevel=parseInt(t.maximumTerrainLevel)||void 0,this._styleName=u$_(t.styleName,""),this._mapboxStyle=t.mapboxStyle,this._colDiff=0,this._rowDiff=0,this._ready=!1,this._resourceReady=!1,this._requestMetadataSuccess=!1,this._requestStyleSuccess=!1,this._readyPromise=o$1l.defer(),this._layers={},this._selectEnabled=u$_(t.selectEnabled,!0),this._selectedColor=u$_(t.selectedColor,e$1U.fromCssColorString("#00FFFF")),this._overlapDisplayedThreshold=0,this._localIdeographFontFamily=u$_(t.localIdeographFontFamily,!1),this._key=u$_(t.key,""),this._url=u$_(t.url,""),this._labelScaleByDistance=t.labelScaleByDistance,this._resource=t$11.createIfNeeded(this._url),this._context=e,this._transform=new _0x183136(0,22,0,60),this._painter=new _0x391a82(e,this._transform,this._canvasWidth),this._painter.lineAntialiasing=t.lineAntialiasing,this._requestManager=new _0x414e6d((e=>({url:e,headers:t.customRequestHeaders}))),this._MVTStyle=new _0x4ae6a8(this),this._viewer=t.viewer,this._iswmts=-1!==this._url.indexOf("wmts"),this._isgeoserver=-1!==this._url.indexOf("/geoserver/"),this._isRealspace=-1!==this._url.indexOf("rest/realspace"),this._isTdt=u$_(t.isTdt,!1),this._packingRequest=this._isRealspace?t.packingRequest:void 0,this._hasIndex=t.hasIndex||!1,this._isTdt?(this._urlTiles=this._url+"?t=vt&z={z}&x={x}&y={y}",this.tablename=this._url):this._iswmts?(this._layer=u$_(t.layer,""),this._format=u$_(t.format,"mvt"),this._tilematrixset=u$_(t.tilematrixset,""),this._minimumLevel=u$_(parseInt(t.minimumLevel)||void 0,0),this._maximumLevel=u$_(parseInt(t.maximumLevel)||void 0,0),this.tablename=this._layer+this._tilematrixset):this._isRealspace?(this._urlTiles=this._url+"/data/index/{y}/{x}.mvt?level={z}",this.tablename=this._url):(this._urlTiles=this._url+"/tiles/{z}/{x}/{y}.mvt",this.tablename=this._url),this._tileCache={},this._scales=u$_(t.scales,We$j),this._id=-1,this._errorEvent=new o$1h,this._pausing=!1,this._selectEnabled=!0,this._maxImageCacheLevel=0,this.minificationFilter=t.minificationFilter,this.magnificationFilter=t.magnificationFilter,this._renderTextureList={"512_512":new t$V({context:e,width:512,height:512,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})},this._isOverlapDisplayed=!1,this._enableMorphing=!1,this.realtime=u$_(t.realtime,!1),this._billboardMode=u$_(t.billboardMode,yr$1.None),this.selectTolerance=.2,this._customRequestHeaders=t.customRequestHeaders;var i=this;function n(){if(i._iswmts){var e=t.url+"?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities";e$2b(a$O.CREDENTIAL)&&(e=e$2b(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),o$1l(d$1f(e,i._customRequestHeaders),a,u)}else if(i._isRealspace){e=t.url+"/config";e$2b(a$O.CREDENTIAL)&&(e=e$2b(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),o$1l(u$R(e,i._customRequestHeaders),r,u)}else{var n=t.url+".json";e$2b(a$O.CREDENTIAL)&&(n=e$2b(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,n):a$O.addToken(n)),o$1l(u$Q(n,i._customRequestHeaders),l,u)}}function r(e){var t=function(e){e=o.parseFromString(e,"application/xml");for(var t="http://www.supermap.com/SuperMapCache/sci3d",n=e.childNodes[0],r=Ge$f(G$Z(n,"Levels",t),"Level",t),a=[],s=0,l=r.length;s<l;s++)a.push(parseInt(r[s].textContent,10));var u=G$Z(n,"Bounds",t),c=D$R(u,"Left",t),h=D$R(u,"Right",t),d=D$R(u,"Top",t),f=D$R(u,"Bottom",t),p=ce$q(n,"FileExtentName",t),_=D$R(n,"CellWidth",t),m=D$R(n,"CellHeight",t),g=ce$q(n,"CacheName",t);return i._name||(i._name=g||""),{left:c,right:h,top:d,bottom:f,fileExtentName:p,levels:a,imageSizeWidth:_,imageSizeHeight:m}}(e);i._fileExtension=u$_(t.fileExtentName,"mvt"),i._tileWidth=u$_(t.imageSizeWidth,256),i._tileHeight=u$_(t.imageSizeHeight,256),i._coordUnit="DEGREE";var n=t.levels,r=n.length;i._minimumLevel=u$_(n[0],0),i._maximumLevel=u$_(n[r-1],r-1),e$2b(i._tilingScheme)||(i._tilingScheme=new g$13);var a,s,l,u,c=i._tilingScheme;e$2b(i._rectangle)||t.left&&t.right&&t.top&&t.bottom&&(a=e$2a.toRadians(t.left),l=e$2a.toRadians(t.right),s=e$2a.toRadians(t.bottom),u=e$2a.toRadians(t.top),i._rectangle=new h$18(a,s,l,u));i._rectangle.west<c.rectangle.west&&(i._rectangle.west=c.rectangle.west),i._rectangle.east>c.rectangle.east&&(i._rectangle.east=c.rectangle.east),i._rectangle.south<c.rectangle.south&&(i._rectangle.south=c.rectangle.south),i._rectangle.north>c.rectangle.north&&(i._rectangle.north=c.rectangle.north),i._tilingScheme=c,i._urlTemplate=i._url+"data/index/{y}/{x}.{fileExtension}?level={level}",i._ready=!0,i._requestMetadataSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}this._subdomains=t.subdomains,e$2b(this._subdomains)&&(t.url=t.url.replace(/({.*?})/g,(function(e,t){if(!e$2b(i._subdomains.length))throw new t$16("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?i._subdomains[0]:e}))),this._isTdt?function(e){if(!e._hasLevel){var t=30,i=-1;if(!e$2b(e._mapboxStyle))throw new t$16("tdt mapbox style should be passed.");for(var n in e._mapboxStyle.sources){var r=e._mapboxStyle.sources[n];t=Math.min(r.minZoom,t),i=Math.max(r.maxZoom,i)}e._minimumLevel=t,e._maximumLevel=i}e$2b(e._tilingScheme)||(e._tilingScheme=new g$13),e._coordUnit=e._tilingScheme instanceof g$13?"DEGREE":"METER",e._rectangle=h$18.clone(e._tilingScheme._rectangle),e._urlTemplate=e._url+"?t=vt&z={z}&x={x}&y={y}",e._requestMetadataSuccess=!0,A$Z(e,e._mapboxStyle),e._requestStyleSuccess=!0,e._readyPromise.resolve(!0)}(this):(n(),this._isgeoserver||function(){var e;if(e$2b(i._mapboxStyle))A$Z(i,i._mapboxStyle);else if(i._isRealspace)e=t.url+"/data/path/style.json",e$2b(a$O.CREDENTIAL)&&(e=e$2b(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),n=u$Q(e,i._customRequestHeaders);else{var n;e=i._iswmts?t.url+"?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetStyle&STYLENAME="+i._styleName:t.url+"/style.json",e$2b(a$O.CREDENTIAL)&&(e=e$2b(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),n=u$Q(e,i._customRequestHeaders)}o$1l(n,(function(e){e$2b(e)?(i._mapboxStyle=e,A$Z(i,e),i._requestStyleSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)):console.log("style request failed")}),(function(n){e=t.url+"/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true",e$2b(a$O.CREDENTIAL)&&(e=e$2b(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),u$Q(e,i._customRequestHeaders).then((function(e){i._mapboxStyle=e,A$Z(i,e),i._tileFeature=!0,i._urlTiles=i._url+"/tileFeature.mvt?returnAttributes=true&x={x}&y={y}&width=512&height=512&scale={scale}&origin={'x':-180,'y':90}"})),u()}))}());var o=new DOMParser;function a(e){var n=function(e){var t,n,r=e.firstChild,o=r.namespace,a=s$S.queryFirstNode(r,"Contents",o),s=s$S.queryNodes(a,"Layer",o);if(s.length>1)for(var l=0,u=s.length;l<u;l++){var c=s$S.queryFirstNode(s[l],"Title",o),h=s$S.queryStringValue(c),d=s$S.queryFirstNode(s[l],"Identifier",o),f=s$S.queryStringValue(d);if(h===i._layer||f===i._layer){t=s[l],n=h;break}}else t=s$S.queryFirstNode(a,"Layer",o);var p,_,m,g,x=s$S.queryFirstNode(t,"WGS84BoundingBox",o),v=s$S.queryStringValue(x,"LowerCorner",o),y=s$S.queryStringValue(x,"UpperCorner",o),$=v.split(" "),b=y.split(" ");m=parseFloat(b[0]),g=parseFloat(b[1]),p=parseFloat($[0]),_=parseFloat($[1]);var T=s$S.queryFirstNode(a,"TileMatrixSet",o),C=s$S.queryFirstNode(T,"TileMatrix",o),S=s$S.queryNumericValue(C,"TileWidth",o),w=s$S.queryNumericValue(C,"TileHeight",o);return{left:p,right:m,top:g,bottom:_,width:S,height:w,styleName:n}}(e);e$2b(i._tilingScheme)||(i._tilingScheme=new g$13);var r={};r.left=e$2a.clamp(n.left,-180,180),r.bottom=e$2a.clamp(n.bottom,-90,90),r.right=e$2a.clamp(n.right,-180,180),r.top=e$2a.clamp(n.top,-90,90),i._rectangle=h$18.fromDegrees(r.left,r.bottom,r.right,r.top),i._hasTileWith||(i._tileWidth=n.width,i._tileHeight=n.height),i._urlTiles=i._url+"?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER="+i._layer+"&FORMAT="+i._format+"&TILEMATRIXSET="+i._tilematrixset+"&WIDTH="+i._tileWidth+"&HEIGHT="+i._tileHeight+"&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}",i._rectangle||(i._rectangle=u$_(t.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._requestMetadataSuccess=!0,i._isgeoserver&&(e$2b(i._mapboxStyle)||(i._mapboxStyle={version:8,name:n.styleName,layers:[{id:n.styleName+"_fill",source:n.styleName,"source-layer":n.styleName,type:"fill",layout:{visibility:"visible"},paint:{"fill-color":"rgba(224,207,226,1.00)","fill-antialias":!0},filter:["all",["==","$type","Polygon"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}},{id:n.styleName+"_outline",source:n.styleName,"source-layer":n.styleName,type:"line",layout:{visibility:"visible"},paint:{"line-width":1,"line-color":"rgba(102,102,102,1.00)"},filter:["all",["==","$type","Polygon"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}},{id:n.styleName+"line",source:n.styleName,"source-layer":n.styleName,type:"line",layout:{visibility:"visible"},paint:{"line-width":.38,"line-color":"rgba(149,55,52,1.00)"},filter:["all",["==","$type","LineString"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}},{id:n.styleName+"point",source:n.styleName,"source-layer":n.styleName,type:"circle",layout:{visibility:"visible"},paint:{"circle-radius":2.27,"circle-color":"rgba(54,96,146,1.00)"},filter:["all",["==","$type","Point"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}}]}),A$Z(i,i._mapboxStyle),i._requestStyleSuccess=!0,i._urlTiles=i._url+"?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER="+i._layer+"&FORMAT="+i._format+"&TILEMATRIXSET="+i._tilematrixset+"&WIDTH="+i._tileWidth+"&HEIGHT="+i._tileHeight+"&TILEMATRIX=EPSG:4326:{z}&TILEROW={y}&TILECOL={x}&&STYLE="),i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}function s(e,t){var i=[],n=Math.abs(e)/512;n=function(e,t,i){var n=e*t*39.37007874015748*ze$d(i);return 1/n}(n,96,t);for(var r=0;r<22;r++)0!=r?(n*=2,i[r]=n):i[r]=n;return i}function l(e){var n=e.prjCoordSys.coordUnit;i._coordUnit=n;var r=e.bounds,o=e.viewer.width,a=e.viewer.height;if(i._hasTileWith||(i._tileWidth=o,i._tileHeight=a),i._hasLevel||function(e,t){e._minimumLevel=0,e._maximumLevel=22;var i,n=[];if(i=3857==t.prjCoordSys.epsgCode?[1/295829355.454566,1/147914677.727283,1/73957338.8636414,1/36978669.4318207,1/18489334.7159103,1/9244667.35795517,1/4622333.67897759,1/2311166.83948879,1/1155583.4197444,1/577791.709872198,1/288895.854936099,1/144447.92746805,1/72223.9637340248,1/36111.9818670124,1/18055.9909335062,1/9027.9954667531,1/4513.99773337655,1/2256.99886668828,1/1128.49943334414,1/564.249716672069,1/282.124858336034,1/141.062429168017]:"DEGREE"==t.prjCoordSys.coordUnit?s(360,t.prjCoordSys.coordUnit):s(40075016.6855785,t.prjCoordSys.coordUnit),t.visibleScales&&t.visibleScales.length>0){for(var r,o=null,a=null,l=0;l<t.visibleScales.length;l++){for(var u=0;u<=i.length-1;u++)if(0!=u){if(!(a>(r=Math.abs(t.visibleScales[l]-i[u]))))break;a=r,o=u}else a=Math.abs(t.visibleScales[l]-i[u]),o=0;o>=0&&n.push(o)}e._minimumLevel=n[0],e._maximumLevel=n[n.length-1]}}(i,e),"DEGREE"==n)e$2b(i._tilingScheme)||(i._tilingScheme=new g$13),r.left=e$2a.clamp(r.left,-180,180),r.bottom=e$2a.clamp(r.bottom,-90,90),r.right=e$2a.clamp(r.right,-180,180),r.top=e$2a.clamp(r.top,-90,90),i._rectangle=h$18.fromDegrees(r.left,r.bottom,r.right,r.top),i._urlTemplate=i._url+"/tiles/{z}/{x}/{y}.mvt";else{var l=new o$1p(r.left,r.bottom,0);l.x=Math.max(-20037508.342789244,l.x),l.y=Math.max(-20037508.342789244,l.y);var u=new o$1p(r.right,r.top,0);if(u.x=Math.min(20037508.342789244,u.x),u.y=Math.min(20037508.342789244,u.y),!e$2b(i._tilingScheme)){var c=e$2b(e.prjCoordSys)&&(3857==e.prjCoordSys.epsgCode||e$2b(e.prjCoordSys.projection)&&("PRJ_SPHERE_MERCATOR"===e.prjCoordSys.projection.type||"PRJ_TRANSVERSE_MERCATOR"===e.prjCoordSys.projection.type));i._tilingScheme=new c$R({rectangleSouthwestInMeters:c?void 0:l,rectangleNortheastInMeters:c?void 0:u})}var h=i._tilingScheme._projection.unproject(l),d=i._tilingScheme._projection.unproject(u);i._rectangle=new h$18(h.longitude,h.latitude,d.longitude,d.latitude),i._urlTemplate=i._url+"/tiles/{z}/{x}/{y}.mvt"}i._rectangle||(i._rectangle=u$_(t.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._requestMetadataSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}function u(e){var t,r="An error occurred while accessing "+i._url+".";t=l$W.handleError(t,i,i._errorEvent,r,void 0,void 0,void 0,n),i._readyPromise.reject(new RuntimeError(r))}}function ke$c(e,t){if(e$2b(t.metadata)&&e$2b(t.metadata.indexbounds)){var i=-180,n=-270,r=360;e$2b(t.metadata.epsgcode)&&("3857"==t.metadata.epsgcode||t.metadata.indexbounds[0]<-180)&&(i=-20037508.3427892,n="METER"==e._coordUnit?-20037508.3427892:-30056262.5141838,r=40075016.6855784);var o=t.metadata.indexbounds,a=(o[0]-i)/r,s=(o[1]-n)/r;e._colDiff=a,e._rowDiff=s}}function A$Z(e,t){e._MVTStyle._load(t),ke$c(e,t)}function oe$s(e,t,i){var n=Math.pow(2,t);return e+Math.round(n*i)}function He$a(e){e.priority=U$Q,e.throttle=!0,(U$Q+=.001)>100&&(U$Q=0)}function ue$x(e,t,i){return{mvt:!0,colorTexture:new t$V({context:e._context,width:e._canvasWidth,height:e._canvasWidth,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,generateMipmap:!0,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:u$_(e.minificationFilter,tt$h.LINEAR_MIPMAP_LINEAR),magnificationFilter:u$_(e.magnificationFilter,rt$i.LINEAR)})}),rawData:t,indexData:i}}Object.defineProperties(I$10.prototype,{name:{get:function(){return this._name}},proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel>18?this._maximumLevel:18}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},isOverlapDisplayed:{get:function(){return this._isOverlapDisplayed},set:function(e){this._isOverlapDisplayed=e}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready&&this._resourceReady}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}},mapboxStyle:{get:function(){return this._mapboxStyle},set:function(e){this._mapboxStyle=e,e$2b(this._mapboxStyle)&&A$Z(this,this._mapboxStyle)}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2b(e)&&!e$2b(e.length))throw new t$16("Excepted MvtProvider.subdomains to be type of Array.");this._subdomains=e}},globalLineWidthScale:{get:function(){return this._painter._globalLineWidthScale},set:function(e){this._painter._globalLineWidthScale=e}},lineAntialiasing:{get:function(){return this._painter._lineAntialiasing},set:function(e){this._painter._lineAntialiasing=e}},enableMorphing:{get:function(){return this._enableMorphing},set:function(e){this._enableMorphing=e}},billboardMode:{get:function(){return this._billboardMode}},selectedColor:{get:function(){return this._selectedColor},set:function(e){this._selectedColor=e}}}),I$10.prototype.getTileCredits=function(e,t,i){},I$10.prototype.resetVisible=function(){var e=this.innerLayer._imageryCache;for(var t in e)e[t]._visible=!1},I$10.prototype.update=function(e,t,i){var n=this.innerLayer._imageryCache;this._MVTStyle.update(n);var r=[];for(var o in n)r.push(n[o]);r.sort((function(e,t){return e.level<t.level?1:e.level>t.level?-1:0})),this._maxImageCacheLevel=0;for(var a=[],s=[],l=r.length,u=0;u<l;u++){var c=r[u];if(this._maxImageCacheLevel=Math.max(this._maxImageCacheLevel,c.level),c.update(),c._visible&&this.realtime&&(c.realtimeRender(),a.push(c)),t.passes.pick||c._visible){var h=c._MVTLabel;h._textCollection&&s.push(h._textCollection),h._iconCollection&&s.push(h._iconCollection)}}var d=1;t.passes.pick||(this._transform.zoom=this._viewer.scene.camera.zoomLevel,this._MVTStyle._updatePlacement(this._viewer.scene,this._transform,500),d=this._MVTStyle.placement.symbolFadeChange(performance.now()));for(u=0;u<s.length;u++)t.passes.pick||(s[u].fadeChage=d),s[u].update(t,e,i)},I$10.prototype.removeTile=function(e,t,i){},I$10.prototype.requestImage=function(e,t,i,n,r,o){He$a(n);var a=this,s=i+1;return this.tilingScheme instanceof c$R&&(s=i),this._tileFeature&&(s+=1),this._isgeoserver&&(s-=1),i>a._maximumLevel?(o.hasRawData=!1,ue$x(a,null)):(o.hasRawData=!0,Oe$k(o,n,e,t,s,a),ue$x(a))};var Ve$g=/({.*?})/g;function Oe$k(e,t,i,n,r,o){var a=o._urlTiles;if(o.tilingScheme instanceof c$R||(i=oe$s(i,r,o._colDiff),n=oe$s(n,r,o._rowDiff)),e.requestX=i,e.requestY=n,e.requestZ=r,t.quadKey=Ue$g(i,n,r),o._packingRequest===X$N.QuadKey&&(t.type=V$15.PACK,t.providerName=o._name,t.throttle=!0),o._tileFeature){var s=o._scales[r];a=a.replace("{x}",i).replace("{y}",n).replace("{scale}",s)}else a=a.replace("{x}",i).replace("{y}",n).replace("{z}",r);if(e$2b(o._subdomains)){var l=o._subdomains,u=l[(i+n+r)%l.length];a=a.replace(Ve$g,(function(e,t){return"{s}"===t?u:e}))}e$2b(a$O.CREDENTIAL)&&(e$2b(a$O.CREDENTIAL._keymap[o._url])?o._isTdt?a+="&tk="+a$O.CREDENTIAL._keymap[o._url]:a=a$O.addTokenWithKey(o._url,a):o._isTdt?a+="&tk="+a$O.CREDENTIAL._value:a=a$O.addToken(a)),e.requestUrl=a}function he$p(e,t){Array.isArray(e)||(e=[e]);var i=null;for(var n in t){for(var r=t[n],o=!0,a=0;a<e.length;a++)if(!h$18.contains(r.rectangle,e[a])){o=!1;break}if(o)if(null==i)i=r;else{var s=i.rectangle.width;r.rectangle.width<s&&(i=r)}}for(;e$2b(i)&&!e$2b(i.featureIndex);)i=i.parent;return i}function fe$p(e,t,i){var n=i.rectangle;return new _0x46bdc2((e-n.west)/n.width*ae$s,(t-n.south)/n.height*ae$s)}function ze$d(e){var t;return"METER"==e?t=1:"DEGREE"==e?t=2*Math.PI*6378137/360:"KILOMETER"==e?t=.001:"INCH"==e?t=1/.025399999918:"FOOT"==e&&(t=.3048),t}function Ue$g(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function G$Z(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function Ge$f(e,t,i){if(e$2b(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function D$R(e,t,i){var n=G$Z(e,t,i);if(e$2b(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function ce$q(e,t,i){var n=G$Z(e,t,i);if(e$2b(n))return n.textContent.trim()}function e$1b(e,t,i,n){this.quadKey=t,this.data=i,this.provider=e,this.promise=n}function v$F(e,t,i,n){if(o$1q.defined("context",e),!t||0===t.length)throw new t$16("At least one attribute is required.");var r=v$F._verifyAttributes(t);i=u$_(i,0);for(var o,a,s=[],l={},u=r.length,c=0;c<u;++c){var h=r[c];h.vertexBuffer?s.push(h):(e$2b(o=l[a=h.usage])||(o=l[a]=[]),o.push(h))}function d(e,t){return S$12.getSizeInBytes(t.componentDatatype)-S$12.getSizeInBytes(e.componentDatatype)}for(a in this._allBuffers=[],l)if(l.hasOwnProperty(a)){(o=l[a]).sort(d);var f=v$F._vertexSizeInBytes(o),p={vertexSizeInBytes:f,vertexBuffer:void 0,usage:o[0].usage,needsCommit:!1,arrayBuffer:void 0,arrayViews:v$F._createArrayViews(o,f)};this._allBuffers.push(p)}this._size=0,this._instanced=u$_(n,!1),this._precreated=s,this._context=e,this.writers=void 0,this.va=void 0,this.resize(i)}I$10.prototype.pick=function(e){var t=he$p(e,this.innerLayer._imageryCache);if(null!=t&&e$2b(t.featureIndex)){var i=[];i.push(fe$p(e.longitude,e.latitude,t));var n={};for(var r in this._MVTStyle._layers){var o=this._MVTStyle._layers[r];e$2b(o)&&(e$2b(o.visibility)?"none"!=o.visibility&&(n[r]=o):n[r]=o)}var a=null;if(e$2b(t.frameState)){var s=t.frameState.camera;e$2b(s)&&e$2b(s.zoomLevel)&&s.zoomLevel!=1/0&&(a=s.zoomLevel)}var l={realtime:this.realtime,zoom:a,selectTolerance:this.selectTolerance},u=t.queryRenderedFeatures(n,i,l);if(this._MVTStyle.setHighLight(u,this),e$2b(u))return Object.keys(u).length>0?u:void 0}},I$10.prototype.queryRenderedFeatures=function(e,t){var i=[],n=he$p(e,this.innerLayer._imageryCache);if(!e$2b(n)||!e$2b(n.featureIndex))return i;var r,o,a,s=n,l=[];for(r=0,a=e.length;r<a;r++)l.push(fe$p(e[r].longitude,e[r].latitude,s));var u=s.queryRenderedFeatures(this._MVTStyle._layers,l,t);e$2b(u)&&i.push(u);var c=[];for(r=0,a=i.length;r<a;r++){var h=i[r];for(var d in h){var f=h[d];for(o=0;o<f.length;o++)c.push(f[o])}}return c},I$10.prototype.querySourceFeatures=function(e){var t=[];if("string"==typeof e.filter[2]&&e.filter[2].indexOf("%")>-1){var i=this._viewer.scene.camera.computeViewRectangle();if(!e$2b(i))return t;for(var n=h$18.southwest(i),r=h$18.southeast(i),o=h$18.northeast(i),a=h$18.northwest(i),s=this.queryRenderedFeatures([n,r,o,a],{layers:[e.sourceLayer]}),l=_0x570fee.createFilter(e&&e.filter),u=0;u<s.length;u++){var c=s[u].feature;l(new _0x4f93ac(0),c)&&t.push(c)}}else{var h=this.innerLayer._imageryCache;for(var d in h){h[d].querySourceFeatures(e,t)}}return t},e$1b.prototype.free=function(){delete this.provider.blockCache[this.quadKey]},v$F._verifyAttributes=function(e){for(var t=[],i=0;i<e.length;++i){var n=e[i],r={index:u$_(n.index,i),name:u$_(n.name,""),enabled:u$_(n.enabled,!0),componentsPerAttribute:n.componentsPerAttribute,componentDatatype:u$_(n.componentDatatype,S$12.FLOAT),normalize:u$_(n.normalize,!1),vertexBuffer:n.vertexBuffer,usage:u$_(n.usage,A$19.STATIC_DRAW)};if(t.push(r),1!==r.componentsPerAttribute&&2!==r.componentsPerAttribute&&3!==r.componentsPerAttribute&&4!==r.componentsPerAttribute)throw new t$16("attribute.componentsPerAttribute must be in the range [1, 4].");var o=r.componentDatatype;if(!S$12.validate(o))throw new t$16("Attribute must have a valid componentDatatype or not specify it.");if(!A$19.validate(r.usage))throw new t$16("Attribute must have a valid usage or not specify it.")}for(var a=new Array(t.length),s=0;s<t.length;++s){var l=t[s].index;if(a[l])throw new t$16("Index "+l+" is used by more than one attribute.");a[l]=!0}return t},v$F._vertexSizeInBytes=function(e){for(var t=0,i=e.length,n=0;n<i;++n){var r=e[n];t+=r.componentsPerAttribute*S$12.getSizeInBytes(r.componentDatatype)}var o=i>0?S$12.getSizeInBytes(e[0].componentDatatype):0,a=o>0?t%o:0;return t+=0===a?0:o-a},v$F._createArrayViews=function(e,t){for(var i=[],n=0,r=e.length,o=0;o<r;++o){var a=e[o],s=a.componentDatatype;i.push({index:a.index,name:a.name,enabled:a.enabled,componentsPerAttribute:a.componentsPerAttribute,componentDatatype:s,normalize:a.normalize,offsetInBytes:n,vertexSizeInComponentType:t/S$12.getSizeInBytes(s),view:void 0}),n+=a.componentsPerAttribute*S$12.getSizeInBytes(s)}return i},v$F.prototype.resize=function(e){this._size=e;var t=this._allBuffers;this.writers=[];for(var i=0,n=t.length;i<n;++i){var r=t[i];v$F._resize(r,this._size),v$F._appendWriters(this.writers,r)}B$O(this)},v$F._resize=function(e,t){if(e.vertexSizeInBytes>0){var i=new ArrayBuffer(t*e.vertexSizeInBytes);if(e$2b(e.arrayBuffer))for(var n=new Uint8Array(i),r=new Uint8Array(e.arrayBuffer),o=r.length,a=0;a<o;++a)n[a]=r[a];for(var s=e.arrayViews,l=s.length,u=0;u<l;++u){var c=s[u];c.view=S$12.createArrayBufferView(c.componentDatatype,i,c.offsetInBytes)}e.arrayBuffer=i}};var T$O=[function(e,t,i){return function(n,r){t[n*i]=r,e.needsCommit=!0}},function(e,t,i){return function(n,r,o){var a=n*i;t[a]=r,t[a+1]=o,e.needsCommit=!0}},function(e,t,i){return function(n,r,o,a){var s=n*i;t[s]=r,t[s+1]=o,t[s+2]=a,e.needsCommit=!0}},function(e,t,i){return function(n,r,o,a,s){var l=n*i;t[l]=r,t[l+1]=o,t[l+2]=a,t[l+3]=s,e.needsCommit=!0}}];function U$P(e,t){if(t.needsCommit&&t.vertexSizeInBytes>0){t.needsCommit=!1;var i=t.vertexBuffer,n=e._size*t.vertexSizeInBytes,r=e$2b(i);if(!r||i.sizeInBytes<n)return r&&i.destroy(),t.vertexBuffer=t$Y.createVertexBuffer({context:e._context,typedArray:t.arrayBuffer,usage:t.usage}),t.vertexBuffer.vertexArrayDestroyable=!1,!0;t.vertexBuffer.copyFromArrayView(t.arrayBuffer)}return!1}function O$C(e,t,i){if(e.needsCommit&&e.vertexSizeInBytes>0){var n=e.vertexSizeInBytes*t,r=e.vertexSizeInBytes*i;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,n,r),n)}}function B$O(e){var t=e.va;if(e$2b(t)){for(var i=t.length,n=0;n<i;++n)t[n].va.destroy();e.va=void 0}}v$F._appendWriters=function(e,t){for(var i=t.arrayViews,n=i.length,r=0;r<n;++r){var o=i[r];e[o.index]=T$O[o.componentsPerAttribute-1](t,o.view,o.vertexSizeInComponentType)}},v$F.prototype.commit=function(e){var t,i,n,r=!1,o=this._allBuffers;for(i=0,n=o.length;i<n;++i)r=U$P(this,t=o[i])||r;if(r||!e$2b(this.va)){B$O(this);for(var a=this.va=[],s=e$2b(e)?Math.ceil(this._size/(e$2a.SIXTY_FOUR_KILOBYTES-1)):1,l=0;l<s;++l){var u=[];for(i=0,n=o.length;i<n;++i){var c=l*((t=o[i]).vertexSizeInBytes*(e$2a.SIXTY_FOUR_KILOBYTES-1));v$F._appendAttributes(u,t,c,this._instanced)}u=u.concat(this._precreated),a.push({va:new c$12({context:this._context,attributes:u,indexBuffer:e}),indicesCount:1.5*(l!==s-1?e$2a.SIXTY_FOUR_KILOBYTES-1:this._size%(e$2a.SIXTY_FOUR_KILOBYTES-1))})}}},v$F._appendAttributes=function(e,t,i,n){for(var r=t.arrayViews,o=r.length,a=0;a<o;++a){var s=r[a];e.push({index:s.index,name:s.name,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:s.componentDatatype,normalize:s.normalize,vertexBuffer:t.vertexBuffer,offsetInBytes:i+s.offsetInBytes,strideInBytes:t.vertexSizeInBytes,instanceDivisor:n?1:0})}},v$F.prototype.subCommit=function(e,t){if(e<0||e>=this._size)throw new t$16("offsetInVertices must be greater than or equal to zero and less than the vertex array size.");if(e+t>this._size)throw new t$16("offsetInVertices + lengthInVertices cannot exceed the vertex array size.");for(var i=this._allBuffers,n=0,r=i.length;n<r;++n)O$C(i[n],e,t)},v$F.prototype.endSubCommits=function(){for(var e=this._allBuffers,t=0,i=e.length;t<i;++t)e[t].needsCommit=!1},v$F.prototype.isDestroyed=function(){return!1},v$F.prototype.destroy=function(){for(var e=this._allBuffers,t=0,i=e.length;t<i;++t){var n=e[t];n.vertexBuffer=n.vertexBuffer&&n.vertexBuffer.destroy()}return B$O(this),i$10(this)};var Lt$5="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D u_atlas;\n#ifdef APPLY_SWIPE\nuniform vec4 uSwipeRegion;\n#endif\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvarying float v_depth;\nvarying vec2 v_textureCoordinates;\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed;\nvarying mat2 v_rotationMatrix;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT1 = 2.0;\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\nfloat getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, vec2 dimensions, vec2 imageSize)\n{\nvec2 lookupVector = imageSize * (depthLookupST - adjustedST);\nlookupVector = v_rotationMatrix * lookupVector;\nvec2 labelOffset = (dimensions - imageSize) * (depthLookupST - vec2(0.0, v_originTextureCoordinateAndTranslate.y));\nvec2 translation = v_originTextureCoordinateAndTranslate.zw;\nif (applyTranslate)\n{\ntranslation += (dimensions * v_originTextureCoordinateAndTranslate.xy * vec2(1.0, 0.0));\n}\nvec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw;\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, st));\nif (logDepthOrDepth == 0.0)\n{\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\n#ifdef SDF\nfloat getDistance(vec2 position)\n{\n#if defined(MVT) && !defined(WEBGPU)\nreturn texture2D(u_atlas, position).a;\n#else\nreturn texture2D(u_atlas, position).r;\n#endif\n}\nvec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)\n{\nfloat distance = getDistance(position);\nif (outlineWidth > 0.0)\n{\nfloat outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);\nfloat outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\nvec4 sdfColor = mix(outlineColor, v_color, outlineFactor);\nfloat alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);\nreturn vec4(sdfColor.rgb, sdfColor.a * alpha);\n}\nelse\n{\nfloat alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\nreturn vec4(v_color.rgb, v_color.a * alpha);\n}\n}\n#endif\nvoid main()\n{\n#ifdef APPLY_SWIPE\nczm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\nvec4 color = texture2D(u_atlas, v_textureCoordinates);\n#ifdef SDF\nfloat outlineWidth = v_outlineWidth;\nvec4 outlineColor = v_outlineColor;\nfloat distance = getDistance(v_textureCoordinates);\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2) || defined(WEBGPU)\nfloat smoothing = fwidth(distance);\nvec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));\nvec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\nvec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\ncolor = (center + color1 + color2 + color3 + color4)/5.0;\n#else\nfloat smoothing = 1.0/32.0;\ncolor = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n#endif\ncolor = czm_gammaCorrect(color);\n#else\ncolor = czm_gammaCorrect(color);\ncolor *= czm_gammaCorrect(v_color);\n#endif\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\nif (color.a < 0.005)\n{\ndiscard;\n}\n#else\n#ifdef OPAQUE\nif (color.a < 0.995)\n{\ndiscard;\n}\n#else\nif (color.a >= 0.995)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef VECTOR_TILE\ncolor *= u_highlightColor;\n#endif\n#ifdef PARTICLESYSTEM\n#ifdef LOG_DEPTH\nfloat fDepth = log2(v_depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\nfloat fDepth = gl_FragCoord.z;\n#endif\ngl_FragColor = vec4(fDepth, fDepth * fDepth, 1.0, 1.0);\n#else\ngl_FragColor = color;\n#endif\n#ifdef LOG_DEPTH\nczm_writeLogDepth();\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nfloat temp = v_compressed.y;\ntemp = temp * SHIFT_RIGHT1;\nfloat temp2 = (temp - floor(temp)) * SHIFT_LEFT1;\nbool enableDepthTest = temp2 != 0.0;\nbool applyTranslate = floor(temp) != 0.0;\nif (enableDepthTest) {\ntemp = v_compressed.z;\ntemp = temp * SHIFT_RIGHT12;\nvec2 dimensions;\ndimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\ndimensions.x = floor(temp);\ntemp = v_compressed.w;\ntemp = temp * SHIFT_RIGHT12;\nvec2 imageSize;\nimageSize.y = (temp - floor(temp)) * SHIFT_LEFT12;\nimageSize.x = floor(temp);\nvec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy;\nadjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y);\nfloat epsilonEyeDepth = v_compressed.x + czm_epsilon1;\nfloat globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize);\nif (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth)\n{\nfloat globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize);\nif (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth)\n{\nfloat globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize);\nif (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth)\n{\ndiscard;\n}\n}\n}\n}\n#endif\n}\n",Vt$7="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nattribute vec4 compressedAttribute0;\nattribute vec4 compressedAttribute1;\nattribute vec4 compressedAttribute2;\nattribute vec4 eyeOffset;\nattribute vec4 scaleByDistance;\nattribute vec4 pixelOffsetScaleByDistance;\nattribute vec4 compressedAttribute3;\nattribute vec2 sdf;\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\nattribute vec4 textureCoordinateBoundsOrLabelTranslate;\n#endif\n#ifdef VECTOR_TILE\nattribute float a_batchId;\n#endif\n#ifdef MVT\nattribute vec4 a_fade_opacity;\n#endif\nuniform float u_eyeOffsetZ;\nuniform float u_fade_change;\nvarying float v_depth;\nvarying vec2 v_textureCoordinates;\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed;\nvarying mat2 v_rotationMatrix;\n#endif\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\nconst float UPPER_BOUND = 32768.0;\nconst float SHIFT_LEFT16 = 65536.0;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_LEFT7 = 128.0;\nconst float SHIFT_LEFT5 = 32.0;\nconst float SHIFT_LEFT3 = 8.0;\nconst float SHIFT_LEFT2 = 4.0;\nconst float SHIFT_LEFT1 = 2.0;\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT7 = 1.0 / 128.0;\nconst float SHIFT_RIGHT5 = 1.0 / 32.0;\nconst float SHIFT_RIGHT3 = 1.0 / 8.0;\nconst float SHIFT_RIGHT2 = 1.0 / 4.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)\n{\nvec2 halfSize = imageSize * scale * 0.5;\nhalfSize *= ((direction * 2.0) - 1.0);\nvec2 originTranslate = origin * abs(halfSize);\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nif (validAlignedAxis || rotation != 0.0)\n{\nfloat angle = rotation;\nif (validAlignedAxis)\n{\nvec4 projectedAlignedAxis = czm_modelViewProjection * vec4(alignedAxis, 0.0);\nangle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /\n(projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));\n}\nfloat cosTheta = cos(angle);\nfloat sinTheta = sin(angle);\nrotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\nhalfSize = rotationMatrix * halfSize;\n}\nelse\n{\nrotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n}\n#endif\nmpp = czm_metersPerPixel(positionEC);\n#ifdef FixedXYZ\nvec4 origViewPos = czm_view * vec4(0.0, 0.0, 0.0, 1.0);\nvec4 fixedAxis = positionEC - origViewPos;\nvec3 zAxis = normalize(fixedAxis.xyz);\nvec3 upViewVector = vec3(0.0, 1.0, 0.0);\nvec3 xAxis = normalize(cross(upViewVector, zAxis));\nvec3 yAxis = cross(zAxis, xAxis);\nyAxis = normalize(yAxis);\nmat3 matrix = mat3(xAxis,yAxis,zAxis);\nvec3 tmp = matrix * vec3((originTranslate + halfSize + translate + pixelOffset), 0.0);\ntmp *= czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\npositionEC.xy += tmp.xy;\n#else\npositionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\npositionEC.xy += (translate + pixelOffset) * mpp;\n#endif\nreturn positionEC;\n}\n#ifdef VERTEX_DEPTH_CHECK\nfloat getGlobeDepth(vec4 positionEC)\n{\nvec4 posWC = czm_eyeToWindowCoordinates(positionEC);\nfloat globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\nif (globeDepth == 0.0)\n{\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\nvoid main()\n{\nvec3 positionHigh = positionHighAndScale.xyz;\nvec3 positionLow = positionLowAndRotation.xyz;\nfloat scale = positionHighAndScale.w;\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nfloat rotation = positionLowAndRotation.w;\n#else\nfloat rotation = 0.0;\n#endif\nfloat compressed = compressedAttribute0.x;\nvec2 pixelOffset;\npixelOffset.x = floor(compressed * SHIFT_RIGHT7);\ncompressed -= pixelOffset.x * SHIFT_LEFT7;\npixelOffset.x -= UPPER_BOUND;\nvec2 origin;\norigin.x = floor(compressed * SHIFT_RIGHT5);\ncompressed -= origin.x * SHIFT_LEFT5;\norigin.y = floor(compressed * SHIFT_RIGHT3);\ncompressed -= origin.y * SHIFT_LEFT3;\n#ifdef FRAGMENT_DEPTH_CHECK\nvec2 depthOrigin = origin.xy;\n#endif\norigin -= vec2(1.0);\nfloat show = floor(compressed * SHIFT_RIGHT2);\ncompressed -= show * SHIFT_LEFT2;\n#ifdef INSTANCED\nvec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\nvec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\n#ifdef MVT\nvec2 textureCoordinates;\ntextureCoordinates.x = textureCoordinatesBottomLeft.x + direction.x * textureCoordinatesRange.x;\ntextureCoordinates.y = textureCoordinatesBottomLeft.y - direction.y * textureCoordinatesRange.y;\n#else\nvec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n#endif\n#else\nvec2 direction;\ndirection.x = floor(compressed * SHIFT_RIGHT1);\ndirection.y = compressed - direction.x * SHIFT_LEFT1;\nvec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n#endif\nfloat temp = compressedAttribute0.y * SHIFT_RIGHT8;\npixelOffset.y = -(floor(temp) - UPPER_BOUND);\nvec2 translate;\ntranslate.y = (temp - floor(temp)) * SHIFT_LEFT16;\ntemp = compressedAttribute0.z * SHIFT_RIGHT8;\ntranslate.x = floor(temp) - UPPER_BOUND;\ntranslate.y += (temp - floor(temp)) * SHIFT_LEFT8;\ntranslate.y -= UPPER_BOUND;\ntemp = compressedAttribute1.x * SHIFT_RIGHT8;\nfloat temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);\nvec2 imageSize = vec2(floor(temp), temp2);\n#ifdef FRAGMENT_DEPTH_CHECK\nfloat labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));\nfloat applyTranslate = 0.0;\nif (labelHorizontalOrigin != 0.0)\n{\napplyTranslate = 1.0;\nlabelHorizontalOrigin -= 2.0;\ndepthOrigin.x = labelHorizontalOrigin + 1.0;\n}\ndepthOrigin = vec2(1.0) - (depthOrigin * 0.5);\n#endif\n#ifdef EYE_DISTANCE_TRANSLUCENCY\nvec4 translucencyByDistance;\ntranslucencyByDistance.x = compressedAttribute1.z;\ntranslucencyByDistance.z = compressedAttribute1.w;\ntranslucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\ntemp = compressedAttribute1.y * SHIFT_RIGHT8;\ntranslucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\ntemp = compressedAttribute3.w;\ntemp = temp * SHIFT_RIGHT12;\nvec2 dimensions;\ndimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\ndimensions.x = floor(temp);\n#endif\n#ifdef ALIGNED_AXIS\nvec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\ntemp = compressedAttribute2.z * SHIFT_RIGHT5;\nbool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n#else\nvec3 alignedAxis = vec3(0.0);\nbool validAlignedAxis = false;\n#endif\nvec4 pickColor;\nvec4 color;\ntemp = compressedAttribute2.y;\ntemp = temp * SHIFT_RIGHT8;\npickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor.r = floor(temp);\ntemp = compressedAttribute2.x;\ntemp = temp * SHIFT_RIGHT8;\ncolor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\ncolor.g = (temp - floor(temp)) * SHIFT_LEFT8;\ncolor.r = floor(temp);\ntemp = compressedAttribute2.z * SHIFT_RIGHT8;\nbool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor /= 255.0;\ncolor.a = floor(temp);\ncolor /= 255.0;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\n#if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK)\nfloat eyeDepth = positionEC.z;\n#endif\n#ifdef MVT\nvec2 fade_opacity = a_fade_opacity.xy;\nfloat placed = fade_opacity.x;\nfloat fade_change = placed > 0.5 ? u_fade_change : -u_fade_change;\nfloat interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity.y + fade_change));\ncolor.a = interpolated_fade_opacity;\nvec3 realEyeOffset = eyeOffset.xyz;\nfloat meterPerPixel = czm_metersPerPixel(positionEC);\nrealEyeOffset.y = meterPerPixel * eyeOffset.y;\nrealEyeOffset.z = u_eyeOffsetZ;\npositionEC = czm_eyeOffset(positionEC, realEyeOffset.xyz);\nif (interpolated_fade_opacity == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#else\npositionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\n#endif\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nlengthSq = dot(positionEC.xyz, positionEC.xyz);\n}\n#endif\n#ifdef EYE_DISTANCE_SCALING\nfloat distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);\nscale *= distanceScale;\ntranslate *= distanceScale;\nif (scale == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\nfloat translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\ntranslucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\nif (translucency == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\n#ifdef EYE_DISTANCE_PIXEL_OFFSET\nfloat pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\npixelOffset *= pixelOffsetScale;\n#endif\n#ifdef DISTANCE_DISPLAY_CONDITION\nfloat nearSq = compressedAttribute3.x;\nfloat farSq = compressedAttribute3.y;\nif (lengthSq < nearSq || lengthSq > farSq)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\nmat2 rotationMatrix;\nfloat mpp;\n#ifdef DISABLE_DEPTH_DISTANCE\nfloat disableDepthTestDistance = compressedAttribute3.z;\n#endif\n#ifdef VERTEX_DEPTH_CHECK\nif (lengthSq < disableDepthTestDistance) {\nfloat depthsilon = 10.0;\nvec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy;\nvec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth1 = getGlobeDepth(pEC1);\nif (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)\n{\nvec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth2 = getGlobeDepth(pEC2);\nif (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)\n{\nvec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth3 = getGlobeDepth(pEC3);\nif (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)\n{\npositionEC.xyz = vec3(0.0);\n}\n}\n}\n}\n#endif\npositionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\npositionEC.xyz *= show;\ngl_Position = czm_projection * positionEC;\nv_textureCoordinates = textureCoordinates;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth();\nv_depth = 1.0 - czm_currentFrustum.x + gl_Position.w;\n#endif\n#ifdef DISABLE_DEPTH_DISTANCE\nif (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n{\ndisableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n}\nif (disableDepthTestDistance != 0.0)\n{\nfloat zclip = gl_Position.z / gl_Position.w;\n#ifdef WEBGPU\nbool clipped = (zclip < 0.0 || zclip > 1.0);\n#else\nbool clipped = (zclip < -1.0 || zclip > 1.0);\n#endif\nif (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n{\n#ifdef WEBGPU\ngl_Position.z = 0.0;\n#else\ngl_Position.z = -gl_Position.w;\n#endif\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = 1.0;\n#endif\n}\n}\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nif (sizeInMeters) {\ntranslate /= mpp;\ndimensions /= mpp;\nimageSize /= mpp;\n}\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nv_rotationMatrix = rotationMatrix;\n#else\nv_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n#endif\nfloat enableDepthCheck = 0.0;\nif (lengthSq < disableDepthTestDistance)\n{\nenableDepthCheck = 1.0;\n}\nfloat dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12));\nfloat dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12));\nfloat iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12));\nfloat ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12));\nv_compressed.x = eyeDepth;\nv_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck;\nv_compressed.z = dw * SHIFT_LEFT12 + dh;\nv_compressed.w = iw * SHIFT_LEFT12 + ih;\nv_originTextureCoordinateAndTranslate.xy = depthOrigin;\nv_originTextureCoordinateAndTranslate.zw = translate;\nv_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate;\n#endif\n#ifdef SDF\nvec4 outlineColor;\nfloat outlineWidth;\ntemp = sdf.x;\ntemp = temp * SHIFT_RIGHT8;\noutlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.r = floor(temp);\ntemp = sdf.y;\ntemp = temp * SHIFT_RIGHT8;\nfloat temp3 = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.a = floor(temp);\noutlineColor /= 255.0;\nv_outlineWidth = outlineWidth / 255.0;\nv_outlineColor = outlineColor;\n#endif\nv_pickColor = pickColor;\nv_color = color;\nv_color.a *= translucency;\n}\n",e$1a={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2},S$J=Object.freeze(e$1a),e$19={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},V$I=Object.freeze(e$19);function O$B(e,t,i,n,r){return new F$V(e,t,i,n,r)}function F$V(e,t,i,n,r){t=t||P$O,i=i||Q$N,r=r||Array,this.nodeSize=n||64,this.points=e,this.ids=new r(e.length),this.coords=new r(2*e.length);for(var o=0;o<e.length;o++)this.ids[o]=o,this.coords[2*o]=t(e[o]),this.coords[2*o+1]=i(e[o]);K$J(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function P$O(e){return e[0]}function Q$N(e){return e[1]}function J$K(e,t,i,n,r,o){var a=r-i,s=o-n,l={x:e-.5*a,y:t-.5*s,width:a,height:s},u={x:i,y:n,width:a,height:s},c=l.x,h=l.y,d=u.x,f=u.y;return!(c>d+u.width||c+l.width<d||h+l.height<f||h>f+u.height)}function R$N(e,t,i,n,r,o,a,s,l,u,c){for(var h,d,f=[0,e.length-1,0],p=[];f.length;){var _=f.pop(),m=f.pop(),g=f.pop(),x=void 0;if(m-g<=a)for(var v=g;v<=m;v++)h=t[2*v],d=t[2*v+1],void 0!==s&&s.length>v&&(x=l(s[e[v]])),void 0!==u?u(h,d,i,n,r,o,s[e[v]],x,c)&&p.push(e[v]):J$K(h,d,i,n,r,o)&&p.push(e[v]);else{var y=Math.floor((g+m)/2);h=t[2*y],d=t[2*y+1],void 0!==s&&s.length>y&&(x=l(s[e[y]])),void 0!==u?u(h,d,i,n,r,o,s[e[y]],x,c)&&p.push(e[y]):J$K(h,d,i,n,r,o)&&p.push(e[y]);var $=(_+1)%2;(0===_?i<=h:n<=d)&&(f.push(g),f.push(y-1),f.push($)),(0===_?r>=h:o>=d)&&(f.push(y+1),f.push(m),f.push($))}}return p}function U$O(e,t,i,n,r,o,a){for(var s,l,u=[0,e.length-1,0],c=[];u.length;){var h=u.pop(),d=u.pop(),f=u.pop();if(d-f<=a)for(var p=f;p<=d;p++)s=t[2*p],l=t[2*p+1],s>=i&&s<=r&&l>=n&&l<=o&&c.push(e[p]);else{var _=Math.floor((f+d)/2);s=t[2*_],l=t[2*_+1],s>=i&&s<=r&&l>=n&&l<=o&&c.push(e[_]);var m=(h+1)%2;(0===h?i<=s:n<=l)&&(u.push(f),u.push(_-1),u.push(m)),(0===h?r>=s:o>=l)&&(u.push(_+1),u.push(d),u.push(m))}}return c}function K$J(e,t,i,n,r,o){if(!(r-n<=i)){var a=Math.floor((n+r)/2);L$W(e,t,a,n,r,o%2),K$J(e,t,i,n,a-1,o+1),K$J(e,t,i,a+1,r,o+1)}}function L$W(e,t,i,n,r,o){for(;r>n;){if(r-n>600){var a=r-n+1,s=i-n+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);L$W(e,t,i,Math.max(n,Math.floor(i-s*u/a+c)),Math.min(r,Math.floor(i+(a-s)*u/a+c)),o)}var h=t[2*i+o],d=n,f=r;for(B$N(e,t,n,i),t[2*r+o]>h&&B$N(e,t,n,r);d<f;){for(B$N(e,t,d,f),d++,f--;t[2*d+o]<h;)d++;for(;t[2*f+o]>h;)f--}t[2*n+o]===h?B$N(e,t,n,f):B$N(e,t,++f,r),f<=i&&(n=f+1),i<=f&&(r=f-1)}}function B$N(e,t,i,n){C$S(e,i,n),C$S(t,2*i,2*n),C$S(t,2*i+1,2*n+1)}function C$S(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function V$H(e,t,i,n,r,o){for(var a=[0,e.length-1,0],s=[],l=r*r;a.length;){var u=a.pop(),c=a.pop(),h=a.pop();if(c-h<=o)for(var d=h;d<=c;d++)N$J(t[2*d],t[2*d+1],i,n)<=l&&s.push(e[d]);else{var f=Math.floor((h+c)/2),p=t[2*f],_=t[2*f+1];N$J(p,_,i,n)<=l&&s.push(e[f]);var m=(u+1)%2;(0===u?i-r<=p:n-r<=_)&&(a.push(h),a.push(f-1),a.push(m)),(0===u?i+r>=p:n+r>=_)&&(a.push(f+1),a.push(c),a.push(m))}}return s}function N$J(e,t,i,n){var r=e-i,o=t-n;return r*r+o*o}F$V.prototype={range:function(e,t,i,n){return U$O(this.ids,this.coords,e,t,i,n,this.nodeSize)},within:function(e,t,i){return V$H(this.ids,this.coords,e,t,i,this.nodeSize)},intersect:function(e,t,i,n,r,o,a,s){return R$N(this.ids,this.coords,e,t,i,n,this.nodeSize,r,o,a,s)}};var _0x3dc1be=(_0x2c3686=!0,function(e,t){var i=_0x2c3686?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c3686=!1,i}),_0x2d5759=_0x3dc1be(void 0,(function(){return _0x2d5759.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d5759).search("(((.+)+)+)+$")})),_0x2c3686;_0x2d5759();var X$M="\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute float aColor;\nuniform float uLineWidth;\nvarying float vColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nvoid main()\n{\n bool bUsePre = aTexCoord0.x < 0.1;\n float offset = bUsePre ? -uLineWidth : uLineWidth;\n vec4 viewPos1 = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tviewPos1.x = viewPos1.x + offset * computerOnePixelLength();\n\tgl_Position = czm_projection * viewPos1;\n\tvColor = aColor;\n}";function _$L(e){this._point3Ds={},this._points=[],this._style=void 0,this._billboardCollection=void 0,this._isInitialize=!1,this._pointsChanged=!0,this._colorCommand=void 0,this._worldMatrix=p$1d.clone(p$1d.IDENTITY),this._boundingSphere=new i$1c,this._isVisible=!1,this._frameState=void 0,this._colors=void 0,this._isUpdateColor=!1}function G$Y(e,t,i){A$Y(e);var n=q$W(e,i.mode);H$T(e),Y$F(e,t,n),e._isInitialize=!0}function A$Y(e){e$2b(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0)}function Y$F(e,t,i){A$Y(e);var n=t$Y.createVertexBuffer({context:t,typedArray:i.vertices,usage:A$19.STATIC_DRAW}),r=t$Y.createVertexBuffer({context:t,typedArray:i.texcoords,usage:A$19.STATIC_DRAW}),o=t$Y.createVertexBuffer({context:t,typedArray:i.colors,usage:A$19.STATIC_DRAW}),a=[],s={aPosition:0,aTexCoord0:1,aColor:2};a.push({index:s.aPosition,vertexBuffer:n,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),a.push({index:s.aTexCoord0,vertexBuffer:r,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),a.push({index:s.aColor,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$12.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:1,normalize:!1});var l=t$Y.createIndexBuffer({context:t,typedArray:i.indexPackage,usage:A$19.STATIC_DRAW,indexDatatype:i.indexDataType});e._colorCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$s.S3MTiles,owner:e}),e._colorCommand.vertexArray=new c$12({context:t,attributes:a,indexBuffer:l});var u=new s$U({sources:[X$M]}),c=new s$U({sources:["uniform vec4 uFillColor;\nvarying float vColor;\nvoid main()\n{\n if(vColor < 0.1)\n {\n discard;\n return;\n }\n gl_FragColor = uFillColor;\n}\n"]});e._colorCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:s}),e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),e._colorCommand.uniformMap={uLineWidth:function(){return e._style._calloutWidth},uFillColor:function(){return e._style._calloutColor}}}function q$W(e){for(var t=0,i=0,n=0,r=0,o=2*e._points.length,a=S$12.createTypedArray(S$12.FLOAT,3*o),s=S$12.createTypedArray(S$12.FLOAT,2*o),l=new Uint8Array(o),u=o/2*3,c=o>65535?ce$x.UNSIGNED_INT:ce$x.UNSIGNED_SHORT,h=S$12.createTypedArray(c,u),d=0;d<e._points.length/2;d++){var f=e._points[2*d],p=e._points[2*d+1],_=t/3;a[t++]=p.x,a[t++]=p.y,a[t++]=p.z;var m=t/3;a[t++]=p.x,a[t++]=p.y,a[t++]=p.z;var g=t/3;a[t++]=f.x,a[t++]=f.y,a[t++]=f.z;var x=t/3;a[t++]=f.x,a[t++]=f.y,a[t++]=f.z,s[i++]=0,s[i++]=0,s[i++]=1,s[i++]=0,s[i++]=1,s[i++]=1,s[i++]=0,s[i++]=1,h[n++]=_,h[n++]=m,h[n++]=g,h[n++]=_,h[n++]=g,h[n++]=x}for(d=0;d<o;d++)l[r++]=255;return e._colors=l,{vertices:a,texcoords:s,colors:l,indexPackage:h,indexDataType:c}}function H$T(e,t){for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0;l<e._points.length;l++){var u=e._points[l];n=Math.max(n,u.x),i=Math.min(i,u.x),o=Math.max(o,u.y),r=Math.min(r,u.y),s=Math.max(s,u.z),a=Math.min(a,u.z)}SuperMap3D.Math.equalsEpsilon(n,i,SuperMap3D.Math.EPSILON6)&&(n=i+.1),SuperMap3D.Math.equalsEpsilon(o,r,SuperMap3D.Math.EPSILON6)&&(o=r+.1),SuperMap3D.Math.equalsEpsilon(s,a,SuperMap3D.Math.EPSILON6)&&(s=a+.1);var c=new o$1p((n+i)/2,(o+r)/2,(s+a)/2),h=Math.max(Math.max(s-a,o-r),n-i);e._boundingSphere=new i$1c(c,h/2)}function E$S(e){if(e._pointsChanged){if(e._points=[],e._frameState.mode===C$13.SCENE3D)for(var t in e._point3Ds)for(var i=e._point3Ds[t],n=0;n<i.length;n++){var r=i[n].position,o=new o$1p;o$1p.normalize(r,o),o$1p.multiplyByScalar(o,6378137,o),i[n].dataIndex=2*e._points.length,e._points.push(r),e._points.push(o)}else for(var t in e._point3Ds)for(i=e._point3Ds[t],n=0;n<i.length;n++){o=new o$1p((r=i[n].position).x,r.y,0);i[n].dataIndex=2*e._points.length,e._points.push(r),e._points.push(o)}e._pointsChanged=!1}}function Z$M(e){if(e._isUpdateColor&&e$2b(e._colors)){for(var t in e._point3Ds)for(var i=e._point3Ds[t],n=0;n<i.length;n++){var r=i[n].dataIndex;e._colors[r]=i[n].show?255:0,e._colors[r+1]=e._colors[r],e._colors[r+2]=e._colors[r],e._colors[r+3]=e._colors[r]}e._colorCommand.vertexArray.getAttribute(2).vertexBuffer.copyFromArrayView(e._colors),e._isUpdateColor=!1}}Object.defineProperties(_$L.prototype,{style:{get:function(){return this._style},set:function(e){this._style=e}},count:{get:function(){return this._points.length}},isVisible:{get:function(){return this._isVisible},set:function(e){this._isVisible=e}}}),_$L.prototype.destroy=function(){return A$Y(this),i$10(this)},_$L.prototype.addPoint=function(e,t,i){var n={id:e,position:o$1p.clone(i),index:t,dataIndex:0,show:!0};e$2b(this._point3Ds[e])||(this._point3Ds[e]=[]),this._point3Ds[e].push(n),this._isInitialize=!1,this._pointsChanged=!0},_$L.prototype.remove=function(e,t){var i=this.getByID(e);if(null!=i){for(var n=0;n<i.length;n++)i[n].index===t&&(delete i[n],i[n]=null);var r=[];for(n=0;n<i.length;n++)null!==i[n]&&r.push(i[n]);0===r.length?delete this._point3Ds[e]:this._point3Ds[e]=r}this._pointsChanged=!0,this._isInitialize=!0},_$L.prototype.getByID=function(e){return e$2b(this._point3Ds[e])?this._point3Ds[e]:null},_$L.prototype._setVisibleByID=function(e,t,i){if(E$S(this),!e$2b(this._point3Ds[e])||0===this._point3Ds[e].length)return null;for(var n=this._point3Ds[e],r=0;r<n.length;r++)n[r].index===t&&n[r].show!==i&&(n[r].show=i,this._isUpdateColor=!0)},_$L.prototype._updateIndex=function(e,t,i){var n=this._point3Ds[e];if(e$2b(n))for(var r=0;r<n.length;r++)n[r].index===t&&(n[r].index=i)},_$L.prototype.update=function(e,t,i){this._frameState=t,this._pointsChanged&&E$S(this),0!==this._points.length&&this._points.length%2==0&&this._isVisible&&(this._isInitialize||G$Y(this,e,t),Z$M(this),e$2b(this._colorCommand)&&i.push(this._colorCommand))};var it$8=n$I.SHOW_INDEX,re$B=n$I.POSITION_INDEX,Le$p=n$I.PIXEL_OFFSET_INDEX,Ve$f=n$I.EYE_OFFSET_INDEX,st$5=n$I.HORIZONTAL_ORIGIN_INDEX,rt$e=n$I.VERTICAL_ORIGIN_INDEX,at$b=n$I.SCALE_INDEX,ae$r=n$I.IMAGE_INDEX_INDEX,be$q=n$I.COLOR_INDEX,nt$8=n$I.ROTATION_INDEX,ht$7=n$I.ALIGNED_AXIS_INDEX,Fe$i=n$I.SCALE_BY_DISTANCE_INDEX,Me$k=n$I.TRANSLUCENCY_BY_DISTANCE_INDEX,Ue$f=n$I.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,He$9=n$I.DISTANCE_DISPLAY_CONDITION,Gt$5=n$I.DISABLE_DEPTH_DISTANCE,ot$8=n$I.TEXTURE_COORDINATE_BOUNDS,_t$6=n$I.SDF_INDEX,dt$8=n$I.OPACITY_STATE_INDEX,Ae$o=n$I.NUMBER_OF_PROPERTIES,m$Q,Wt$8={positionHighAndScale:0,positionLowAndRotation:1,compressedAttribute0:2,compressedAttribute1:3,compressedAttribute2:4,eyeOffset:5,scaleByDistance:6,pixelOffsetScaleByDistance:7,compressedAttribute3:8,textureCoordinateBoundsOrLabelTranslate:9,a_batchId:10,sdf:11,a_fade_opacity:12},zt$5={direction:0,positionHighAndScale:1,positionLowAndRotation:2,compressedAttribute0:3,compressedAttribute1:4,compressedAttribute2:5,eyeOffset:6,scaleByDistance:7,pixelOffsetScaleByDistance:8,compressedAttribute3:9,textureCoordinateBoundsOrLabelTranslate:10,a_batchId:11,sdf:12,a_fade_opacity:13},Yt$5={enabled:!0,equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.SOURCE_ALPHA,functionDestinationRgb:l$14.ONE,functionSourceAlpha:l$14.ONE,functionDestinationAlpha:l$14.ONE},Ge$e;function w$N(e){e=u$_(e,u$_.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._spTranslucent=void 0,this._spParticleSystem=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._rsParticleSystem=void 0,this._vaf=void 0,this._billboardsID={},this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._shaderRotation=!1,this._compiledShaderRotation=!1,this._shaderAlignedAxis=!1,this._compiledShaderAlignedAxis=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderPixelOffsetScaleByDistance=!1,this._compiledShaderPixelOffsetScaleByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._shaderClampToGround=!1,this._compiledShaderClampToGround=!1,this._propertiesChanged=new Uint32Array(Ae$o),this._maxSize=0,this._maxEyeOffset=0,this._maxScale=1,this._maxPixelOffset=0,this._allHorizontalCenter=!0,this._allVerticalCenter=!0,this._allSizedInMeters=!0,this._baseVolume=new i$1c,this._baseVolumeWC=new i$1c,this._baseVolume2D=new i$1c,this._boundingVolume=new i$1c,this._boundingVolumeDirty=!1,this._colorCommands=[],this._depthTestEnable=u$_(e.depthTestEnable,!0),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.debugShowTextureAtlas=u$_(e.debugShowTextureAtlas,!1),this.blendOption=u$_(e.blendOption,S$J.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._isParticleSystem=e.particleSystem,this._isMVT=u$_(e.isMVT,!1),this._ignoreShow=e.ignoreShow,this._fadeChange=1,this._mode=C$13.SCENE3D,this._buffersUsage=new Array(Ae$o),this._buffersUsage[it$8]=A$19.STATIC_DRAW,this._buffersUsage[re$B]=A$19.STATIC_DRAW,this._buffersUsage[Le$p]=A$19.STATIC_DRAW,this._buffersUsage[Ve$f]=A$19.STATIC_DRAW,this._buffersUsage[st$5]=A$19.STATIC_DRAW,this._buffersUsage[rt$e]=A$19.STATIC_DRAW,this._buffersUsage[at$b]=A$19.STATIC_DRAW,this._buffersUsage[ae$r]=A$19.STATIC_DRAW,this._buffersUsage[be$q]=A$19.STATIC_DRAW,this._buffersUsage[nt$8]=A$19.STATIC_DRAW,this._buffersUsage[ht$7]=A$19.STATIC_DRAW,this._buffersUsage[Fe$i]=A$19.STATIC_DRAW,this._buffersUsage[Me$k]=A$19.STATIC_DRAW,this._buffersUsage[Ue$f]=A$19.STATIC_DRAW,this._buffersUsage[He$9]=A$19.STATIC_DRAW,this._buffersUsage[ot$8]=A$19.STATIC_DRAW,this._buffersUsage[dt$8]=A$19.DYNAMIC_DRAW,this._highlightColor=e$1U.clone(e$1U.WHITE);var t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture},u_highlightColor:function(){return t._highlightColor},u_eyeOffsetZ:function(){if(!e$2b(t._scene)||!e$2b(t._scene.camera))return 0;var e=t._scene.camera;return.01*e.positionCartographic.height*Math.sin(e.pitch)},u_fade_change:function(){return t._fadeChange}};var i=this._scene;e$2b(i)&&e$2b(i.terrainProviderChanged)&&(this._removeCallbackFunc=i.terrainProviderChanged.addEventListener((function(){for(var e=this._billboards,t=e.length,i=0;i<t;++i)e[i]._updateClamping()}),this)),this._lineCallout=new _$L,this._style3D=u$_(e.style3D,void 0),this._lineCallout.style=this._style3D,this._visibleViewport=4095,this._swipeEnabled=u$_(e.swipeEnabled,!1),this._swipeRegion=u$_(e.swipeRegion,new f$18(0,0,1,1)),this._compiledSwipeEnabled=!1,this._compiledSwipeRegion=new f$18(0,0,1,1),this._billboardMode=u$_(e.billboardMode,yr$1.None)}function ft$6(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function Xe$a(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;for(var t=[],i=e._billboards,n=i.length,r=0,o=0;r<n;++r){var a=i[r];if(a){var s=a._index;a._index=o++,t.push(a),e._lineCallout._updateIndex(a.id,s,a._index)}}e._billboards=t}}function kt$5(e){var t=e.cache.billboardCollection_indexBufferBatched;if(e$2b(t))return t;for(var i=new Uint16Array(98298),n=0,r=0;n<98298;n+=6,r+=4)i[n]=r,i[n+1]=r+1,i[n+2]=r+2,i[n+3]=r+0,i[n+4]=r+2,i[n+5]=r+3;return(t=t$Y.createIndexBuffer({context:e,typedArray:i,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=t,t}function Kt$6(e){var t=e.cache.billboardCollection_indexBufferInstanced;return e$2b(t)||((t=t$Y.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function Qt$5(e){var t=e.cache.billboardCollection_vertexBufferInstanced;return e$2b(t)||((t=t$Y.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:A$19.STATIC_DRAW})).vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}function qt$7(e,t,i,n,r,o,a){var s=[{index:m$Q.positionHighAndScale,name:"positionHighAndScale",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[re$B]},{index:m$Q.positionLowAndRotation,name:"positionLowAndRotation",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[re$B]},{index:m$Q.compressedAttribute0,name:"compressedAttribute0",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[Le$p]},{index:m$Q.compressedAttribute1,name:"compressedAttribute1",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[Me$k]},{index:m$Q.compressedAttribute2,name:"compressedAttribute2",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[be$q]},{index:m$Q.eyeOffset,name:"eyeOffset",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[Ve$f]},{index:m$Q.scaleByDistance,name:"scaleByDistance",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[Fe$i]},{index:m$Q.pixelOffsetScaleByDistance,name:"pixelOffsetScaleByDistance",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[Ue$f]},{index:m$Q.compressedAttribute3,name:"compressedAttribute3",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[He$9]},{index:m$Q.textureCoordinateBoundsOrLabelTranslate,name:"textureCoordinateBoundsOrLabelTranslate",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[ot$8]}];return n&&s.push({index:m$Q.direction,name:"direction",componentsPerAttribute:2,componentDatatype:S$12.FLOAT,vertexBuffer:Qt$5(e)}),e$2b(r)&&s.push({index:m$Q.a_batchId,name:"a_batchId",componentsPerAttribute:1,componentDatatyps:S$12.FLOAT,bufferUsage:A$19.STATIC_DRAW}),o&&s.push({index:m$Q.sdf,name:"sdf",componentsPerAttribute:2,componentDatatype:S$12.FLOAT,usage:i[_t$6]}),a&&s.push({index:m$Q.a_fade_opacity,name:"a_fade_opacity",componentsPerAttribute:2,componentDatatype:S$12.FLOAT,usage:A$19.STATIC_DRAW}),new v$F(e,s,n?t:4*t,n)}Object.defineProperties(w$N.prototype,{length:{get:function(){return Xe$a(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}},style3D:{get:function(){return this._style3D},set:function(e){this._style3D=e,this.setBillboardImage(this._style3D),this._lineCallout.style=e}},showCallout:{get:function(){return this._lineCallout.isVisible},set:function(e){this._lineCallout.isVisible=e}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(e$2b(e)&&e instanceof f$18))throw new t$16("Expected BillboardCollection.swipeRegion to be type of BoundingRectangle.");f$18.equals(e,this._swipeRegion)||f$18.clone(e,this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){o$1q.typeOf.bool("BillboardCollection.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e)}},fadeChage:{get:function(){return this._fadeChange},set:function(e){e!==this._fadeChange&&(this._fadeChange=e)}}}),w$N.prototype.add=function(e){var t=new n$I(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,e$2b(t.id)&&(this._billboardsID[t.id]=t),e$2b(e)&&e$2b(e.position)&&this._lineCallout.addPoint(t.id,t._index,e.position),t},w$N.prototype.remove=function(e){return!!this.contains(e)&&(e$2b(e.id)&&delete this._billboardsID[e.id],this._billboards[e._index]=null,this._billboardsRemoved=!0,this._createVertexArray=!0,this._lineCallout.remove(e.id,e._index),e._destroy(),!0)},w$N.prototype.removeAll=function(){ft$6(this._billboards),this._billboards=[],this._billboardsID={},this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},w$N.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},w$N.prototype.contains=function(e){return e$2b(e)&&e._billboardCollection===this},w$N.prototype.containsByID=function(e){return this._billboardsID.hasOwnProperty(e)},w$N.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return Xe$a(this),this._billboards[e]},w$N.prototype.getById=function(e){if(!e$2b(e))throw new t$16("id is required.");return e$2b(this._billboardsID[e])?this._billboardsID[e]:null},w$N.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,n=0;n<Ae$o;++n){var r=0===i[n]?A$19.STATIC_DRAW:A$19.STREAM_DRAW;t=t||e[n]!==r,e[n]=r}return t};var We$i=new i$11;function ut$8(e,t,i,n,r){var o,a=n[m$Q.positionHighAndScale],s=n[m$Q.positionLowAndRotation],l=r._getActualPosition();e._mode===C$13.SCENE3D&&(i$1c.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),i$11.fromCartesian(l,We$i);var u=r.scale,c=r.rotation;0!==c&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,u);var h=We$i.high,d=We$i.low;e._instanced?(a(o=r._index,h.x,h.y,h.z,u),s(o,d.x,d.y,d.z,c)):(a((o=4*r._index)+0,h.x,h.y,h.z,u),a(o+1,h.x,h.y,h.z,u),a(o+2,h.x,h.y,h.z,u),a(o+3,h.x,h.y,h.z,u),s(o+0,d.x,d.y,d.z,c),s(o+1,d.x,d.y,d.z,c),s(o+2,d.x,d.y,d.z,c),s(o+3,d.x,d.y,d.z,c))}var b$11=new o$1o,F$U=32768,ne$D=65536,ze$c=4096,z$M=256,Zt$4=128,Jt$5=32,$t$4=8,pt$7=4,jt$4=1/256,ct$7=0,lt$3=2,mt$4=3,Tt$9=1;function vt$8(e,t,i,n,r){var o,a=n[m$Q.compressedAttribute0],s=r.pixelOffset,l=s.x,u=s.y,c=r._translate,h=c.x,d=c.y;e._maxPixelOffset=Math.max(e._maxPixelOffset,Math.abs(l+h),Math.abs(-u+d));var f=r.horizontalOrigin,p=r._verticalOrigin,_=r.show&&r.clusterShow;0===r.color.alpha&&(_=!1),p===S$O.BASELINE&&(p=S$O.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&f===j$T.CENTER,e._allVerticalCenter=e._allVerticalCenter&&p===S$O.CENTER;var m=0,g=0,x=0,v=0,y=r._imageIndex;if(-1!==y){var $=i[y];if(!e$2b($))throw new t$16("Invalid billboard image index: "+y);m=$.x,g=$.y,x=$.width,v=$.height}var b=m+x,T=g+v,C=Math.floor(e$2a.clamp(l,-F$U,F$U)+F$U)*Zt$4;C+=(f+1)*Jt$5,C+=(p+1)*$t$4,C+=(_?1:0)*pt$7;var S=Math.floor(e$2a.clamp(u,-F$U,F$U)+F$U)*z$M,w=Math.floor(e$2a.clamp(h,-F$U,F$U)+F$U)*z$M,E=(e$2a.clamp(d,-F$U,F$U)+F$U)*jt$4,P=Math.floor(E);if(S+=P,w+=Math.floor((E-P)*z$M),e._isMVT){var A=T;T=g,g=A}b$11.x=m,b$11.y=g;var L=t$10.compressTextureCoordinates(b$11);b$11.x=b;var M=t$10.compressTextureCoordinates(b$11);b$11.y=T;var R=t$10.compressTextureCoordinates(b$11);b$11.x=m;var O=t$10.compressTextureCoordinates(b$11);e._instanced?a(o=r._index,C,S,w,L):(a((o=4*r._index)+0,C+ct$7,S,w,L),a(o+1,C+lt$3,S,w,M),a(o+2,C+mt$4,S,w,R),a(o+3,C+Tt$9,S,w,O))}function xt$6(e,t,i,n,r){var o,a=n[m$Q.compressedAttribute1],s=r.alignedAxis;o$1p.equals(s,o$1p.ZERO)||(e._shaderAlignedAxis=!0);var l=0,u=1,c=1,h=1,d=r.translucencyByDistance;e$2b(d)&&(l=d.near,u=d.nearValue,c=d.far,h=d.farValue,(1!==u||1!==h)&&(e._shaderTranslucencyByDistance=!0));var f=0,p=r._imageIndex;if(-1!==p){var _=i[p];if(!e$2b(_))throw new t$16("Invalid billboard image index: "+p);f=_.width}var m=e._textureAtlas.texture.width,g=Math.round(u$_(r.width,m*f));e._maxSize=Math.max(e._maxSize,g);var x=e$2a.clamp(g,0,ne$D),v=0;Math.abs(o$1p.magnitudeSquared(s)-1)<e$2a.EPSILON6&&(v=t$10.octEncodeFloat(s)),u=e$2a.clamp(u,0,1),x=x*z$M+(u=1===u?255:255*u|0),h=e$2a.clamp(h,0,1),v=v*z$M+(h=1===h?255:255*h|0),e._instanced?a(o=r._index,x,v,l,c):(a((o=4*r._index)+0,x,v,l,c),a(o+1,x,v,l,c),a(o+2,x,v,l,c),a(o+3,x,v,l,c))}function Ye$d(e,t,i,n,r){var o,a=n[m$Q.compressedAttribute2],s=r.color,l=e$2b(e._batchTable)?e$1U.WHITE:r.getPickId(t).color,u=r.sizeInMeters?1:0,c=Math.abs(o$1p.magnitudeSquared(r.alignedAxis)-1)<e$2a.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&1===u;var h=0,d=r._imageIndex;if(-1!==d){var f=i[d];if(!e$2b(f))throw new t$16("Invalid billboard image index: "+d);h=f.height}var p=e._textureAtlas.texture.dimensions,_=Math.round(u$_(r.height,p.y*h));e._maxSize=Math.max(e._maxSize,_);var m=u$_(r._labelHorizontalOrigin,-2),g=_*pt$7+(m+=2),x=e$1U.floatToByte(s.red),v=e$1U.floatToByte(s.green),y=e$1U.floatToByte(s.blue),$=x*ne$D+v*z$M+y;x=e$1U.floatToByte(l.red),v=e$1U.floatToByte(l.green),y=e$1U.floatToByte(l.blue);var b=x*ne$D+v*z$M+y,T=e$1U.floatToByte(s.alpha)*ne$D+e$1U.floatToByte(l.alpha)*z$M;T+=2*u+c,e._instanced?a(o=r._index,$,b,T,g):(a((o=4*r._index)+0,$,b,T,g),a(o+1,$,b,T,g),a(o+2,$,b,T,g),a(o+3,$,b,T,g))}function ke$b(e,t,i,n,r){var o,a=n[m$Q.eyeOffset],s=r.eyeOffset,l=s.z;if(r._heightReference!==k$P.NONE&&(l*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(s.x),Math.abs(s.y),Math.abs(l)),e._instanced){var u=0,c=0,h=r._imageIndex;if(-1!==h){var d=i[h];if(!e$2b(d))throw new t$16("Invalid billboard image index: "+h);u=d.width,c=d.height}b$11.x=u,b$11.y=c;var f=t$10.compressTextureCoordinates(b$11);a(o=r._index,s.x,s.y,l,f)}else a((o=4*r._index)+0,s.x,s.y,l,0),a(o+1,s.x,s.y,l,0),a(o+2,s.x,s.y,l,0),a(o+3,s.x,s.y,l,0)}function Dt$7(e,t,i,n,r){var o,a=n[m$Q.scaleByDistance],s=0,l=1,u=1,c=1,h=r.scaleByDistance;e$2b(h)&&(s=h.near,l=h.nearValue,u=h.far,c=h.farValue,(1!==l||1!==c)&&(e._shaderScaleByDistance=!0)),e._instanced?a(o=r._index,s,l,u,c):(a((o=4*r._index)+0,s,l,u,c),a(o+1,s,l,u,c),a(o+2,s,l,u,c),a(o+3,s,l,u,c))}function At$6(e,t,i,n,r){var o,a=n[m$Q.pixelOffsetScaleByDistance],s=0,l=1,u=1,c=1,h=r.pixelOffsetScaleByDistance;e$2b(h)&&(s=h.near,l=h.nearValue,u=h.far,c=h.farValue,(1!==l||1!==c)&&(e._shaderPixelOffsetScaleByDistance=!0)),e._instanced?a(o=r._index,s,l,u,c):(a((o=4*r._index)+0,s,l,u,c),a(o+1,s,l,u,c),a(o+2,s,l,u,c),a(o+3,s,l,u,c))}function Et$6(e,t,i,n,r){var o,a=n[m$Q.compressedAttribute3],s=0,l=Number.MAX_VALUE,u=r.distanceDisplayCondition;e$2b(u)&&(s=u.near,l=u.far,s*=s,l*=l,e._shaderDistanceDisplayCondition=!0);var c,h,d=r.disableDepthTestDistance,f=r.heightReference===k$P.CLAMP_TO_GROUND&&e._scene.context.depthTexture;if(e$2b(d)||(d=f?5e3:0),d*=d,(f||d>0)&&(e._shaderDisableDepthDistance=!0,d===Number.POSITIVE_INFINITY&&(d=-1)),e$2b(r._labelDimensions))h=r._labelDimensions.x,c=r._labelDimensions.y;else{var p=0,_=0,m=r._imageIndex;if(-1!==m){var g=i[m];if(!e$2b(g))throw new t$16("Invalid billboard image index: "+m);p=g.height,_=g.width}c=Math.round(u$_(r.height,e._textureAtlas.texture.dimensions.y*p));var x=e._textureAtlas.texture.width;h=Math.round(u$_(r.width,x*_))}var v=Math.floor(e$2a.clamp(h,0,ze$c)),y=Math.floor(e$2a.clamp(c,0,ze$c)),$=v*ze$c+y;e._instanced?a(o=r._index,s,l,d,$):(a((o=4*r._index)+0,s,l,d,$),a(o+1,s,l,d,$),a(o+2,s,l,d,$),a(o+3,s,l,d,$))}function St$4(e,t,i,n,r){r.heightReference===k$P.CLAMP_TO_GROUND&&(e._shaderClampToGround=e._scene.context.depthTexture);var o,a=n[m$Q.textureCoordinateBoundsOrLabelTranslate];if(e$1T.maximumVertexTextureImageUnits>0){var s=0,l=0;return e$2b(r._labelTranslate)&&(s=r._labelTranslate.x,l=r._labelTranslate.y),void(e._instanced?(o=r._index,a(o,s,l,0,0)):(o=4*r._index,a(o+0,s,l,0,0),a(o+1,s,l,0,0),a(o+2,s,l,0,0),a(o+3,s,l,0,0)))}var u=0,c=0,h=0,d=0,f=r._imageIndex;if(-1!==f){var p=i[f];if(!e$2b(p))throw new t$16("Invalid billboard image index: "+f);u=p.x,c=p.y,h=p.width,d=p.height}var _=u+h,m=c+d;e._instanced?a(o=r._index,u,c,_,m):(a((o=4*r._index)+0,u,c,_,m),a(o+1,u,c,_,m),a(o+2,u,c,_,m),a(o+3,u,c,_,m))}function ei$3(e,t,i,n,r){if(e$2b(e._batchTable)){var o,a=n[m$Q.a_batchId],s=r._batchIndex;e._instanced?a(o=r._index,s):(a((o=4*r._index)+0,s),a(o+1,s),a(o+2,s),a(o+3,s))}}function yt$6(e,t,i,n,r){if(e._sdf){var o,a=n[m$Q.sdf],s=r.outlineColor,l=r.outlineWidth,u=e$1U.floatToByte(s.red),c=e$1U.floatToByte(s.green),h=e$1U.floatToByte(s.blue),d=u*ne$D+c*z$M+h,f=l/V$I.RADIUS,p=e$1U.floatToByte(s.alpha)*ne$D+e$1U.floatToByte(f)*z$M;e._instanced?a(o=r._index,d,p):(o=4*r._index,t.webgpu?(a(o+0,d,p),a(o+1,d,p),a(o+2,d,p),a(o+3,d,p)):(a(o+0,d+ct$7,p),a(o+1,d+lt$3,p),a(o+2,d+mt$4,p),a(o+3,d+Tt$9,p)))}}function It$8(e,t,i,n,r){if(e._isMVT){var o,a=n[m$Q.a_fade_opacity],s=r.opacityState,l=s.placed?1:0,u=s.opacity;e._instanced?a(o=r._index,l,u):(a((o=4*r._index)+0,l,u),a(o+1,l,u),a(o+2,l,u),a(o+3,l,u))}}function ti$4(e,t,i,n,r){ut$8(e,t,i,n,r),vt$8(e,t,i,n,r),xt$6(e,t,i,n,r),Ye$d(e,t,i,n,r),ke$b(e,t,i,n,r),Dt$7(e,t,i,n,r),At$6(e,t,i,n,r),Et$6(e,t,i,n,r),St$4(e,t,i,n,r),ei$3(e,t,i,n,r),yt$6(e,t,i,n,r),It$8(e,t,i,n,r)}function Ke$a(e,t,i,n,r,o){var a;n.mode===C$13.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=n$I._computeActualPosition(u,c,n,r);e$2b(h)&&(u._setActualPosition(h),o?s.push(h):i$1c.expand(a,h,a))}o&&i$1c.fromPoints(s,a)}function ii$4(e,t){var i=t.mode,n=e._billboards,r=e._billboardsToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==C$13.SCENE3D&&!p$1d.equals(o,e.modelMatrix)?(e._mode=i,p$1d.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===C$13.SCENE3D||i===C$13.SCENE2D||i===C$13.COLUMBUS_VIEW)&&Ke$a(e,n,n.length,t,o,!0)):i===C$13.MORPHING?Ke$a(e,n,n.length,t,o,!0):(i===C$13.SCENE2D||i===C$13.COLUMBUS_VIEW)&&Ke$a(e,r,e._billboardsToUpdateIndex,t,o,!1)}function si$4(e,t,i){var n=1;(!e._allSizedInMeters||0!==e._maxPixelOffset)&&(n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight));var r=n*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(r*=.5);var o=n*e._maxPixelOffset+e._maxEyeOffset;i.radius+=r+o}function ri$3(e,t){var i=t.createViewportQuadCommand("uniform sampler2D billboard_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n gl_FragColor = texture2D(billboard_texture, v_textureCoordinates); \n} \n",{uniformMap:{billboard_texture:function(){return e._textureAtlas.texture}}});return i.pass=Le$s.OVERLAY,i}w$N.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},w$N.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport};var ai$5=[],Y$E=new e$29;w$N.prototype.update=function(e,t,i){if(!e.passes.offscreen&&!e.camera.bReflect){if(this._lineCallout.update(t,e,i),e.multiViewportIndex>-1&&this._billboards.length>0){if(e$2b(this._billboards[0])&&e$2b(this._billboards[0]._id)&&e$2b(this._billboards[0]._id.entityCollection)){var n=this._billboards[0]._id.entityCollection.owner;if(typeof n.getVisibleInViewport<"u")if(!n.getVisibleInViewport(e.multiViewportIndex))return}if(!this.getVisibleInViewport(e.multiViewportIndex))return}Xe$a(this);var r=this._billboards,o=r.length;t=e.context;this._instanced=t.instancedArrays,m$Q=this._instanced?zt$5:Wt$8,Ge$e=this._instanced?Kt$6:kt$5;var a=this._textureAtlas;if(!e$2b(a)){a=this._textureAtlas=new v$I({context:t});for(var s=0;s<o;++s)r[s]._loadImage()}var l=a.textureCoordinates;if(0!==l.length){ii$4(this,e),o=(r=this._billboards).length;var u=this._billboardsToUpdate,c=this._billboardsToUpdateIndex,h=this._propertiesChanged,d=a.guid,f=this._createVertexArray||this._textureAtlasGUID!==d;this._textureAtlasGUID=d;var p,_=e.passes,m=_.pick;if(f||!m&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var g=0;g<Ae$o;++g)h[g]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),o>0){this._vaf=qt$7(t,o,this._buffersUsage,this._instanced,this._batchTable,this._sdf,this._isMVT),p=this._vaf.writers;for(var x=0;x<o;++x){var v=this._billboards[x];v._dirty=!1,ti$4(this,t,l,p,v)}this._vaf.commit(Ge$e(t))}this._billboardsToUpdateIndex=0}else if(c>0){var y=ai$5;y.length=0,(h[re$B]||h[nt$8]||h[at$b])&&y.push(ut$8),(h[ae$r]||h[Le$p]||h[st$5]||h[rt$e]||h[it$8])&&(y.push(vt$8),this._instanced&&y.push(ke$b)),(h[ae$r]||h[ht$7]||h[Me$k])&&(y.push(xt$6),y.push(Ye$d)),(h[ae$r]||h[be$q])&&y.push(Ye$d),h[Ve$f]&&y.push(ke$b),h[Fe$i]&&y.push(Dt$7),h[Ue$f]&&y.push(At$6),(h[He$9]||h[Gt$5]||h[ae$r]||h[re$B])&&y.push(Et$6),(h[ae$r]||h[re$B])&&y.push(St$4),h[_t$6]&&y.push(yt$6),h[dt$8]&&y.push(It$8);var $=y.length;if(p=this._vaf.writers,c/o>.1){for(var b=0;b<c;++b){var T=u[b];T._dirty=!1;for(var C=0;C<$;++C)y[C](this,t,l,p,T)}this._vaf.commit(Ge$e(t))}else{for(var S=0;S<c;++S){var w=u[S];w._dirty=!1;for(var E=0;E<$;++E)y[E](this,t,l,p,w);this._instanced?this._vaf.subCommit(w._index,1):this._vaf.subCommit(4*w._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(c>1.5*o&&(u.length=o),e$2b(this._vaf)&&e$2b(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,i$1c.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var P,A=p$1d.IDENTITY;e.mode===C$13.SCENE3D?(A=this.modelMatrix,P=i$1c.clone(this._baseVolumeWC,this._boundingVolume)):P=i$1c.clone(this._baseVolume2D,this._boundingVolume),si$4(this,e,P);var L=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,L){this._blendOption===S$J.OPAQUE||this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=d$1m.fromCache({depthTest:{enabled:this._depthTestEnable,func:de$x.LESS},depthMask:!0}):this._rsOpaque=void 0;var M=this._blendOption===S$J.TRANSLUCENT;this._blendOption===S$J.TRANSLUCENT||this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=d$1m.fromCache({depthTest:{enabled:this._depthTestEnable,func:M?de$x.LEQUAL:de$x.LESS},depthMask:M,blending:Ee$r.ALPHA_BLEND}):this._rsTranslucent=void 0}this._isParticleSystem&&(this._rsParticleSystem=d$1m.fromCache({depthTest:{enabled:!1,func:de$x.LESS},depthMask:!1,blending:Yt$5})),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance;var R,O,I,D,B,N=e$1T.maximumVertexTextureImageUnits>0;if(L||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF||this._swipeEnabled!==this._compiledSwipeEnabled||!e$29.equals(this._swipeRegion,this._compiledSwipeRegion)){R=Vt$7,O=Lt$5,B=[],e$2b(this._batchTable)&&(B.push("VECTOR_TILE"),R=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(R),O=this._batchTable.getFragmentShaderCallback(!1,void 0)(O)),I=new s$U({defines:B,sources:[R],name:"BillboardCollectionVS"}),this._instanced&&I.defines.push("INSTANCED"),this._shaderRotation&&I.defines.push("ROTATION"),this._shaderAlignedAxis&&I.defines.push("ALIGNED_AXIS"),this._billboardMode===yr$1.FixedXYZ&&I.defines.push("FixedXYZ"),this._shaderScaleByDistance&&I.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&I.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&I.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&I.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&I.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(N?I.defines.push("VERTEX_DEPTH_CHECK"):I.defines.push("FRAGMENT_DEPTH_CHECK")),this._ignoreShow&&I.defines.push("IGNORE_SHOW"),this._isMVT&&I.defines.push("MVT");var F=1-V$I.CUTOFF;this._sdf&&I.defines.push("SDF");var U=e$2b(this._batchTable)?"VECTOR_TILE":"";if(this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT&&(D=new s$U({defines:["OPAQUE",U],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(N?D.defines.push("VERTEX_DEPTH_CHECK"):D.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(D.defines.push("SDF"),D.defines.push("SDF_EDGE "+F)),this._isMVT&&D.defines.push("MVT"),this._swipeEnabled&&D.defines.push("APPLY_SWIPE"),this._sp=r$13.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:I,fragmentShaderSource:D,attributeLocations:m$Q}),D=new s$U({defines:["TRANSLUCENT",U],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(N?D.defines.push("VERTEX_DEPTH_CHECK"):D.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(D.defines.push("SDF"),D.defines.push("SDF_EDGE "+F)),this._isMVT&&D.defines.push("MVT"),this._swipeEnabled&&D.defines.push("APPLY_SWIPE"),this._spTranslucent=r$13.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:I,fragmentShaderSource:D,attributeLocations:m$Q})),this._blendOption===S$J.OPAQUE&&(D=new s$U({defines:[U],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(N?D.defines.push("VERTEX_DEPTH_CHECK"):D.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(D.defines.push("SDF"),D.defines.push("SDF_EDGE "+F)),this._isMVT&&D.defines.push("MVT"),this._swipeEnabled&&D.defines.push("APPLY_SWIPE"),this._sp=r$13.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:I,fragmentShaderSource:D,attributeLocations:m$Q})),this._blendOption===S$J.TRANSLUCENT&&(D=new s$U({defines:[U],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(N?D.defines.push("VERTEX_DEPTH_CHECK"):D.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(D.defines.push("SDF"),D.defines.push("SDF_EDGE "+F)),this._isMVT&&D.defines.push("MVT"),this._swipeEnabled&&D.defines.push("APPLY_SWIPE"),this._spTranslucent=r$13.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:I,fragmentShaderSource:D,attributeLocations:m$Q})),this._swipeEnabled&&!e$2b(this._uniforms.uSwipeRegion)){var G=this;this._uniforms.uSwipeRegion=function(){var t=G._swipeRegion;return e$29.fromElements(t.x,t.y,t.x+t.width,t.y+t.height,Y$E),Y$E.x=Y$E.x*e.context.drawingBufferWidth,Y$E.y=(1-Y$E.y)*e.context.drawingBufferHeight,Y$E.z=Y$E.z*e.context.drawingBufferWidth,Y$E.w=(1-Y$E.w)*e.context.drawingBufferHeight,Y$E}}this._isParticleSystem&&(D=new s$U({defines:[U],sources:[O],name:"BillboardCollectionFS"}),this._spParticleSystem=r$13.replaceCache({context:t,shaderProgram:this._spParticleSystem,vertexShaderSource:I,fragmentShaderSource:D,attributeLocations:m$Q})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf,this._compiledSwipeEnabled=this._swipeEnabled,f$18.clone(this._swipeRegion,this._compiledSwipeRegion)}i=e.commandList;var z=!0;if(e._fboState.frameBufferType===Qe$c.NORMAL_AND_DEPTH&&(z=!1),z&&(_.render||_.pick)){var V,k=this._colorCommands,W=this._blendOption===S$J.OPAQUE,H=this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT,q=this._vaf.va,j=q.length,Y=this._uniforms;e$2b(this._batchTable)?(Y=this._batchTable.getUniformMapCallback()(Y),V=this._batchTable.getPickId()):V="v_pickColor",k.length=j;for(var X=H?2*j:j,K=0;K<X;++K){var Q=k[K];e$2b(Q)||(Q=k[K]=new i$_);var Z=W||H&&K%2==0;Q.owner=this;var J=H?Math.floor(K/2):K;Q.boundingVolume=P,Q.modelMatrix=A,Q.count=q[J].indicesCount,Q.uniformMap=Y,Q.vertexArray=q[J].va,this._isParticleSystem?(Q.pass=Le$s.Particle,Q.renderState=this._rsParticleSystem,Q.shaderProgram=this._spParticleSystem,Q.pickId=void 0):(Q.pass=Z||!H?Le$s.Label_Billboard:Le$s.TRANSLUCENT,Q.renderState=Z?this._rsOpaque:this._rsTranslucent,Q.shaderProgram=Z?this._sp:this._spTranslucent,Q.pickId=V),Q.debugShowBoundingVolume=this.debugShowBoundingVolume,this._instanced&&(Q.count=6,Q.instanceCount=o),i.push(Q)}this.debugShowTextureAtlas&&(e$2b(this.debugCommand)||(this.debugCommand=ri$3(this,e.context)),i.push(this.debugCommand))}}}}},w$N.prototype.isDestroyed=function(){return!1},w$N.prototype.destroy=function(){return e$2b(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),ft$6(this._billboards),i$10(this)},w$N.prototype.setBillboardImage=function(e){for(var t=this._billboards.length,i=0;i<t;++i){var n=this._billboards[i];n.isDestroyed()||n.setBillboardStyle(e)}};var u$K=function(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},F$T=function(e,t,i,n){var r=e.measureText(t),o=u$K(e.canvas,"font-family"),a=u$K(e.canvas,"font-size").replace("px",""),s=u$K(e.canvas,"font-style"),l=u$K(e.canvas,"font-weight"),u=!/\S/.test(t);r.fontsize=a;var c=document.createElement("div");c.style.position="absolute",c.style.opacity=0,c.style.font=s+" "+l+" "+a+"px "+o,c.innerHTML=t+"<br/>"+t,document.body.appendChild(c),r.leading=1.2*a;var h=u$K(c,"height");if((h=h.replace("px",""))>=2*a&&(r.leading=h/2|0),document.body.removeChild(c),u)r.ascent=0,r.descent=0,r.bounds={minx:0,maxx:r.width,miny:0,maxy:0},r.height=0;else{var d=document.createElement("canvas"),f=100;d.width=r.width+f,d.height=3*a,d.style.opacity=1,d.style.fontFamily=o,d.style.fontSize=a,d.style.fontStyle=s,d.style.fontWeight=l;var p=d.getContext("2d");p.font=s+" "+l+" "+a+"px "+o;var _=d.width,m=d.height,g=m/2;p.fillStyle="white",p.fillRect(-1,-1,_+2,m+2),i&&(p.strokeStyle="black",p.lineWidth=e.lineWidth,p.strokeText(t,50,g)),n&&(p.fillStyle="black",p.fillText(t,50,g));for(var x=p.getImageData(0,0,_,m).data,v=0,y=4*_,$=x.length;++v<$&&255===x[v];);var b=v/y|0;for(v=$-1;--v>0&&255===x[v];);var T=v/y|0;for(v=0;v<$&&255===x[v];)(v+=y)>=$&&(v=v-$+4);var C=v%y/4|0,S=1;for(v=$-3;v>=0&&255===x[v];)(v-=y)<0&&(v=$-3-4*S++);var w=v%y/4+1|0;r.ascent=g-b,r.descent=T-g,r.bounds={minx:C-50,maxx:w-50,miny:0,maxy:T-b},r.height=T-b+1}return r},o$Q;function x$X(e,t){if(!e$2b(e))throw new t$16("text is required.");if(""!==e){t=u$_(t,u$_.EMPTY_OBJECT);var i=u$_(t.font,"10px sans-serif"),n=u$_(t.stroke,!1),r=u$_(t.fill,!0),o=u$_(t.strokeWidth,1),a=u$_(t.backgroundColor,e$1U.TRANSPARENT),s=u$_(t.padding,0),l=2*s,u=document.createElement("canvas");u.width=1,u.height=1,u.style.font=i;var c=u.getContext("2d",{willReadFrequently:!0});e$2b(o$Q)||(e$2b(c.imageSmoothingEnabled)?o$Q="imageSmoothingEnabled":e$2b(c.mozImageSmoothingEnabled)?o$Q="mozImageSmoothingEnabled":e$2b(c.webkitImageSmoothingEnabled)?o$Q="webkitImageSmoothingEnabled":e$2b(c.msImageSmoothingEnabled)&&(o$Q="msImageSmoothingEnabled")),c.font=i,c.lineJoin="round",c.lineWidth=o,c[o$Q]=!1,c.textBaseline=u$_(t.textBaseline,"bottom"),u.style.visibility="hidden",document.body.appendChild(u);var h=F$T(c,e,n,r);u.dimensions=h,document.body.removeChild(u),u.style.visibility="";var d=-h.bounds.minx,f=Math.ceil(h.width)+d+l,p=h.height+l,_=p-(p-h.ascent+s)+l;if(u.width=f,u.height=p,c.font=i,c.lineJoin="round",c.lineWidth=o,c[o$Q]=!1,a!==e$1U.TRANSPARENT&&(c.fillStyle=a.toCssColorString(),c.fillRect(0,0,u.width,u.height)),n){var m=u$_(t.strokeColor,e$1U.BLACK);c.strokeStyle=m.toCssColorString(),c.strokeText(e,d+s,_)}if(r){var g=u$_(t.fillColor,e$1U.WHITE);c.fillStyle=g.toCssColorString(),c.fillText(e,d+s,_)}return u}}var c$Q=1e20;function R$M(e,t,i){return t<i?e<t?t:e>i?i:e:e<i?i:e>t?t:e}function b$10(e,t){t||(t={});var i,n,r,o,a,s,l,u,c,h,d,f=null==t.cutoff?.25:t.cutoff,p=null==t.radius?8:t.radius,_=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,n=t.height,o=e,s=t.stride?t.stride:Math.floor(e.length/i/n)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(l=(u=e).getContext("2d"),i=u.width,n=u.height,o=(c=l.getImageData(0,0,i,n)).data,s=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(l=e,i=(u=e.canvas).width,n=u.height,o=(c=l.getImageData(0,0,i,n)).data,s=4):window.ImageData&&e instanceof window.ImageData&&(c=e,i=e.width,n=e.height,o=c.data,s=4);if(r=Math.max(i,n),window.Uint8ClampedArray&&o instanceof window.Uint8ClampedArray||window.Uint8Array&&o instanceof window.Uint8Array)for(a=o,o=Array(i*n),h=0,d=a.length;h<d;h++)o[h]=a[h*s+_]/255;else if(1!==s)throw Error("Raw data can have only 1 value per pixel");var m=Array(i*n),g=Array(i*n),x=Array(r),v=Array(r),y=Array(r+1),$=Array(r);for(h=0,d=i*n;h<d;h++){var b=o[h];m[h]=1===b?0:0===b?c$Q:Math.pow(Math.max(0,.5-b),2),g[h]=1===b?c$Q:0===b?0:Math.pow(Math.max(0,b-.5),2)}U$N(m,i,n,x,v,$,y),U$N(g,i,n,x,v,$,y);var T=window.Float32Array?new Float32Array(i*n):new Array(i*n);for(h=0,d=i*n;h<d;h++)T[h]=R$M(1-((m[h]-g[h])/p+f),0,1);return T}function U$N(e,t,i,n,r,o,a){for(var s=0;s<t;s++){for(var l=0;l<i;l++)n[l]=e[l*t+s];for(s$H(n,r,o,a,i),l=0;l<i;l++)e[l*t+s]=r[l]}for(l=0;l<i;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(s$H(n,r,o,a,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(r[s])}}function s$H(e,t,i,n,r){i[0]=0,n[0]=-c$Q,n[1]=+c$Q;for(var o=1,a=0;o<r;o++){for(var s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);s<=n[a];)a--,s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);i[++a]=o,n[a]=s,n[a+1]=+c$Q}for(o=0,a=0;o<r;o++){for(;n[a+1]<o;)a++;t[o]=(o-i[a])*(o-i[a])+e[i[a]]}}var g$V=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function w$M(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function q$V(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function x$W(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function I$$(e){var t=document.createElement("div");t.style.position="absolute",t.style.opacity=0,/bold/i.test(e._font)?(e._font=e._font.replace(/\sbold/i,""),t.style.font=e._font,t.style.fontWeight="bold"):t.style.font=e._font,document.body.appendChild(t),e._fontFamily=x$W(t,"font-family"),e._fontSize=(e$2b(t.style.fontSize)&&""!==t.style.fontSize&&/\d+px/.test(t.style.fontSize)?t.style.fontSize:x$W(t,"font-size")).replace("px",""),e._fontStyle=x$W(t,"font-style"),e._fontWeight=x$W(t,"font-weight"),document.body.removeChild(t)}function D$Q(e,t){if(e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).s3MTilesLabelStyle)){var i=e.s3MTilesLabelStyle;e.font=i.font,e.fillColor=i.fillColor,e.outlineColor=i.outlineColor,e.outlineWidth=i.outlineWidth,e.showBackground=i.showBackground,e.backgroundColor=i.backgroundColor,e.backgroundPadding=i.backgroundPadding,e.style=i.fillStyle,e.verticalOrigin=i.verticalOrigin,e.horizontalOrigin=i.horizontalOrigin,e.pixelOffset=i.pixelOffset,e.eyeOffset=i.eyeOffset,e.scale=i.scale,e.translucencyByDistance=i.translucencyByDistance,e.pixelOffsetScaleByDistance=i.pixelOffsetScaleByDistance,e.scaleByDistance=i.scaleByDistance,e.heightReference=i.heightReference,e.distanceDisplayCondition=i.distanceDisplayCondition,e.disableDepthTestDistance=i.disableDepthTestDistance}if(e$2b(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$16("disableDepthTestDistance must be greater than 0.0.");var n=e.translucencyByDistance,r=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,a=e.distanceDisplayCondition;if(e$2b(n)){if(n.far<=n.near)throw new t$16("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=o$Y.clone(n)}if(e$2b(r)){if(r.far<=r.near)throw new t$16("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");r=o$Y.clone(r)}if(e$2b(o)){if(o.far<=o.near)throw new t$16("scaleByDistance.far must be greater than scaleByDistance.near.");o=o$Y.clone(o)}if(e$2b(a)){if(a.far<=a.near)throw new t$16("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");a=r$Y.clone(a)}this._renderedText=void 0,this._text=void 0,this._show=u$_(e.show,!0),this._font=u$_(e.font,"30px sans-serif"),this._fillColor=e$1U.clone(u$_(e.fillColor,e$1U.WHITE)),this._oriFillColor=e$1U.clone(this._fillColor),this._outlineColor=e$1U.clone(u$_(e.outlineColor,e$1U.BLACK)),this._outlineWidth=u$_(e.outlineWidth,1),this._showBackground=u$_(e.showBackground,!1),this._backgroundColor=u$_(e.backgroundColor,new e$1U(.165,.165,.165,.8)),this._backgroundPadding=u$_(e.backgroundPadding,new o$1o(7,5)),this._backgroundImage=u$_(e.backgroundImage,null),this._style=u$_(e.style,R$Q.FILL),this._verticalOrigin=u$_(e.verticalOrigin,S$O.BASELINE),this._horizontalOrigin=u$_(e.horizontalOrigin,j$T.CENTER),this._pixelOffset=o$1o.clone(u$_(e.pixelOffset,o$1o.ZERO)),this._eyeOffset=o$1p.clone(u$_(e.eyeOffset,o$1p.ZERO)),this._position=o$1p.clone(u$_(e.position,o$1p.ZERO)),this._scale=u$_(e.scale,1),this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=r,this._scaleByDistance=o,this._heightReference=u$_(e.heightReference,k$P.NONE),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=u$_(e.text,""),this._relativeSize=1,this._index=u$_(e.index,0),this._isPicked=!1,this._screenSpacePosition=new o$1o,this._localScreenSpaceBBox=new f$18,this._mvtLayerID=e.mvtLayerID,this._mapName=e.mapName,this._mvtProperties=e.mvtProperties,I$$(this),this._updateClamping(),this._opacityState={opacity:0,placed:!1}}function j$Q(e,t){for(var i=/[a-zA-Z0-9]/,n=/[()[\]{}<>]/,r=[],o="",a=g$V.LTR,s="",l=e.length,u=0;u<l;++u){var c=e.charAt(u);s=t.test(c)?g$V.RTL:i.test(c)?g$V.LTR:n.test(c)?g$V.BRACKETS:g$V.WEAK,0===u&&(a=s),a===s&&s!==g$V.BRACKETS?o+=c:(""!==o&&r.push({Type:a,Word:o}),a=s,o=c)}return r.push({Type:s,Word:o}),r}function J$J(e){return e.split("").reverse().join("")}function A$X(e,t,i){return e.slice(0,t)+i+e.slice(t)}function Q$M(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}Object.defineProperties(D$Q.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2b(e))throw new t$16("value is required.");if(this._show!==e){this._show=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i].billboard;e$2b(r)&&(r.show=e)}var o=this._backgroundBillboard;e$2b(o)&&(o.show=e)}}},position:{get:function(){return this._position},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._position;if(!o$1p.equals(t,e)){o$1p.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n].billboard;e$2b(o)&&(o.position=e)}var a=this._backgroundBillboard;e$2b(a)&&(a.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(!e$2b(e))throw new t$16("value is required.");if(e!==this._heightReference){this._heightReference=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i].billboard;e$2b(r)&&(r.heightReference=e)}var o=this._backgroundBillboard;e$2b(o)&&(o.heightReference=e),q$V(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._text!==e&&(this._text=e,this._renderedText=D$Q.enableRightToLeftDetection?X$L(e):e,w$M(this))}},font:{get:function(){return this._font},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._font!==e&&(this._font=e,w$M(this),I$$(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._fillColor;e$1U.equals(t,e)||(this._oriFillColor=e$1U.clone(t),e$1U.clone(e,t),w$M(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._outlineColor;e$1U.equals(t,e)||(e$1U.clone(e,t),w$M(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,w$M(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._showBackground!==e&&(this._showBackground=e,w$M(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._backgroundColor;if(!e$1U.equals(t,e)){e$1U.clone(e,t);var i=this._backgroundBillboard;e$2b(i)&&(i.color=t)}}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._backgroundPadding;o$1o.equals(t,e)||(o$1o.clone(e,t),q$V(this))}},style:{get:function(){return this._style},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._style!==e&&(this._style=e,w$M(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._pixelOffset;if(!o$1o.equals(t,e)){o$1o.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2b(o.billboard)&&(o.billboard.pixelOffset=e)}var a=this._backgroundBillboard;e$2b(a)&&(a.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._translucencyByDistance;if(!o$Y.equals(t,e)){this._translucencyByDistance=o$Y.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2b(o.billboard)&&(o.billboard.translucencyByDistance=e)}var a=this._backgroundBillboard;e$2b(a)&&(a.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._pixelOffsetScaleByDistance;if(!o$Y.equals(t,e)){this._pixelOffsetScaleByDistance=o$Y.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2b(o.billboard)&&(o.billboard.pixelOffsetScaleByDistance=e)}var a=this._backgroundBillboard;e$2b(a)&&(a.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._scaleByDistance;if(!o$Y.equals(t,e)){this._scaleByDistance=o$Y.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2b(o.billboard)&&(o.billboard.scaleByDistance=e)}var a=this._backgroundBillboard;e$2b(a)&&(a.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._eyeOffset;if(!o$1p.equals(t,e)){o$1p.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2b(o.billboard)&&(o.billboard.eyeOffset=e)}var a=this._backgroundBillboard;e$2b(a)&&(a.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._horizontalOrigin!==e&&(this._horizontalOrigin=e,q$V(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(!e$2b(e))throw new t$16("value is required.");if(this._verticalOrigin!==e){this._verticalOrigin=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2b(r.billboard)&&(r.billboard.verticalOrigin=e)}var o=this._backgroundBillboard;e$2b(o)&&(o.verticalOrigin=e),q$V(this)}}},scale:{get:function(){return this._scale},set:function(e){if(!e$2b(e))throw new t$16("value is required.");if(this._scale!==e){this._scale=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2b(r.billboard)&&(r.billboard.scale=e*this._relativeSize)}var o=this._backgroundBillboard;e$2b(o)&&(o.scale=e*this._relativeSize),q$V(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far must be greater than near");if(!r$Y.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=r$Y.clone(e,this._distanceDisplayCondition);for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2b(r.billboard)&&(r.billboard.distanceDisplayCondition=e)}var o=this._backgroundBillboard;e$2b(o)&&(o.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(e$2b(e)&&e<0)throw new t$16("disableDepthTestDistance must be greater than 0.0.");this._disableDepthTestDistance=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2b(r.billboard)&&(r.billboard.disableDepthTestDistance=e)}var o=this._backgroundBillboard;e$2b(o)&&(o.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2b(r.billboard)&&(r.billboard.id=e)}var o=this._backgroundBillboard;e$2b(o)&&(o.id=e)}}},pickId:{get:function(){if(0!==this._glyphs.length&&e$2b(this._glyphs[0].billboard))return this._glyphs[0].billboard.pickId}},isPicked:{get:function(){return this._isPicked},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._isPicked=e}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=o$1p.clone(e,this._actualClampedPosition),e$2b(e)&&this._mode===C$13.COLUMBUS_VIEW&&(e=m$17.convertToColumbusCartesian(e));for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2b(r.billboard)&&(r.billboard._clampedPosition=e)}var o=this._backgroundBillboard;e$2b(o)&&(o._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2b(r.billboard)&&(r.billboard.clusterShow=e)}var o=this._backgroundBillboard;e$2b(o)&&(o.clusterShow=e)}}},opacityState:{get:function(){return this._opacityState},set:function(e){if(this._opacityState.opacity!==e.opacity||this._opacityState.placed!==e.placed){this._opacityState=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2b(r.billboard)&&(r.billboard.opacityState=e)}var o=this._backgroundBillboard;e$2b(o)&&(o.opacityState=e)}}}}),D$Q.prototype._updateClamping=function(){n$I._updateClamping(this._labelCollection,this)},D$Q.prototype.computeScreenSpacePosition=function(e,t){if(!e$2b(e))throw new t$16("scene is required.");e$2b(t)||(t=this._screenSpacePosition);var i=this._labelCollection.modelMatrix,n=e$2b(this._actualClampedPosition)?this._actualClampedPosition:this._position;return n$I._computeScreenSpacePosition(i,n,this._eyeOffset,this._pixelOffset,e,t)},D$Q.prototype.computeLocalScreenSpaceBoundingBox=function(e,t){var i=0,n=0,r=0,o=0,a=e.totalScale,s=e._backgroundBillboard;if(e$2b(s))i=s._translate.x,n=-s._translate.y,r=s.width*a,o=s.height*a,e.verticalOrigin===S$O.BOTTOM||e.verticalOrigin===S$O.BASELINE?n-=o:e.verticalOrigin===S$O.CENTER&&(n-=.5*o);else{i=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(var l=0,u=0,c=e._glyphs,h=c.length,d=0;d<h;++d){var f=c[d],p=f.billboard;if(e$2b(p)){var _=p._translate.x,m=-p._translate.y,g=f.dimensions.width*a,x=f.dimensions.height*a;e.verticalOrigin===S$O.BOTTOM||e.verticalOrigin===S$O.BASELINE?m-=x:e.verticalOrigin===S$O.CENTER&&(m-=.5*x),e._verticalOrigin===S$O.TOP?m+=V$I.PADDING*a:(e._verticalOrigin===S$O.BOTTOM||e._verticalOrigin===S$O.BASELINE)&&(m-=V$I.PADDING*a),i=Math.min(i,_),n=Math.min(n,m),l=Math.max(l,_+g),u=Math.max(u,m+x)}}r=l-i,o=u-n}return e$2b(t)||(t=new f$18),t.x=i,t.y=n,t.width=r,t.height=o,e._text.indexOf("\n")>-1&&(t.height*=e._text.split("\n").length),t},D$Q.prototype.getScreenSpaceBoundingBox=function(e,t,i){return e$2b(i)||(i=new f$18),this.computeLocalScreenSpaceBoundingBox(e,i),i.x+=t.x,i.y+=t.y,i},D$Q.getScreenSpaceBoundingBox=function(e,t,i){var n=0,r=0,o=0,a=0,s=e.totalScale,l=e._backgroundBillboard;if(e$2b(l))n=t.x+l._translate.x,r=t.y-l._translate.y,o=l.width*s,a=l.height*s,e.verticalOrigin===S$O.BOTTOM||e.verticalOrigin===S$O.BASELINE?r-=a:e.verticalOrigin===S$O.CENTER&&(r-=.5*a);else{n=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(var u=0,c=0,h=e._glyphs,d=h.length,f=0;f<d;++f){var p=h[f],_=p.billboard;if(e$2b(_)){var m=t.x+_._translate.x,g=t.y-_._translate.y,x=p.dimensions.width*s,v=p.dimensions.height*s;e.verticalOrigin===S$O.BOTTOM||e.verticalOrigin===S$O.BASELINE?g-=v:e.verticalOrigin===S$O.CENTER&&(g-=.5*v),e._verticalOrigin===S$O.TOP?g+=V$I.PADDING*s:(e._verticalOrigin===S$O.BOTTOM||e._verticalOrigin===S$O.BASELINE)&&(g-=V$I.PADDING*s),n=Math.min(n,m),r=Math.min(r,g),u=Math.max(u,m+x),c=Math.max(c,g+v)}}o=u-n,a=c-r}return e$2b(i)||(i=new f$18),i.x=n,i.y=r,i.width=o,i.height=a,i},D$Q.prototype.equals=function(e){return this===e||e$2b(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&o$1p.equals(this._position,e._position)&&e$1U.equals(this._fillColor,e._fillColor)&&e$1U.equals(this._outlineColor,e._outlineColor)&&e$1U.equals(this._backgroundColor,e._backgroundColor)&&o$1o.equals(this._backgroundPadding,e._backgroundPadding)&&o$1o.equals(this._pixelOffset,e._pixelOffset)&&o$1p.equals(this._eyeOffset,e._eyeOffset)&&o$Y.equals(this._translucencyByDistance,e._translucencyByDistance)&&o$Y.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&o$Y.equals(this._scaleByDistance,e._scaleByDistance)&&r$Y.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id},D$Q.prototype.isDestroyed=function(){return!1},D$Q.prototype.restFillColor=function(){var e=e$1U.clone(this._fillColor),t=this._oriFillColor;e$1U.equals(e,t)||(this._fillColor=e$1U.clone(t),w$M(this))},D$Q.prototype.setLabelStyle=function(e){!e$2b(e)||(this._font=u$_(e.font,this._font),this._fillColor=e$1U.clone(u$_(e.fillColor,this._fillColor)),this._oriFillColor=e$1U.clone(this._fillColor),this._outlineColor=e$1U.clone(u$_(e.outlineColor,this._outlineColor)),this._outlineWidth=u$_(e.outlineWidth,this._outlineWidth),this._showBackground=u$_(e.showBackground,this._showBackground),this._backgroundColor=e$1U.clone(u$_(e.backgroundColor,this._backgroundColor)),this._backgroundPadding=u$_(e.backgroundPadding,this._backgroundPadding),this._style=u$_(e.fillStyle,this._style),this._verticalOrigin=u$_(e.verticalOrigin,this._verticalOrigin),this._horizontalOrigin=u$_(e.horizontalOrigin,this._horizontalOrigin),this._pixelOffset=o$1o.clone(u$_(e.pixelOffset,this._pixelOffset)),this._eyeOffset=o$1p.clone(u$_(e.eyeOffset,this._eyeOffset)),this._scale=u$_(e.scale,this._scale),this._translucencyByDistance=o$Y.clone(u$_(e.translucencyByDistance,this._translucencyByDistance)),this._pixelOffsetScaleByDistance=o$Y.clone(u$_(e.pixelOffsetScaleByDistance,this._pixelOffsetScaleByDistance)),this._scaleByDistance=o$Y.clone(u$_(e.scaleByDistance,this._scaleByDistance)),this._heightReference=u$_(e.heightReference,this._heightReference),this._distanceDisplayCondition=r$Y.clone(u$_(e.distanceDisplayCondition,this._distanceDisplayCondition)),this._disableDepthTestDistance=u$_(e.disableDepthTestDistance,this._disableDepthTestDistance),I$$(this),w$M(this))},D$Q.enableRightToLeftDetection=!1;var $$P="א-ת",H$S="؀-ۿݐ-ݿࢠ-ࣿ",L$V=new RegExp("["+$$P+H$S+"]");function X$L(e){for(var t=e.split("\n"),i="",n=0;n<t.length;n++){for(var r=t[n],o=L$V.test(r.charAt(0)),a=j$Q(r,L$V),s=0,l="",u=0;u<a.length;++u){var c=a[u],h=c.Type===g$V.BRACKETS?Q$M(c.Word):J$J(c.Word);o?c.Type===g$V.RTL?(l=h+l,s=0):c.Type===g$V.LTR?(l=A$X(l,s,c.Word),s+=c.Word.length):(c.Type===g$V.WEAK||c.Type===g$V.BRACKETS)&&(c.Type===g$V.WEAK&&a[u-1].Type===g$V.BRACKETS?l=h+l:a[u-1].Type===g$V.RTL?(l=h+l,s=0):a.length>u+1?a[u+1].Type===g$V.RTL?(l=h+l,s=0):(l=A$X(l,s,c.Word),s+=c.Word.length):l=A$X(l,0,h)):c.Type===g$V.RTL?l=A$X(l,s,h):c.Type===g$V.LTR?s=(l+=c.Word).length:(c.Type===g$V.WEAK||c.Type===g$V.BRACKETS)&&(u>0&&a[u-1].Type===g$V.RTL?a.length>u+1?a[u+1].Type===g$V.RTL?l=A$X(l,s,h):s=(l+=c.Word).length:l+=c.Word:s=(l+=c.Word).length)}i+=l,n<t.length-1&&(i+="\n")}return i}function T$N(){var e=3,t=4,i=12,n=13,r=16,o=17;function a(e,t){return 55296<=e.charCodeAt(t)&&e.charCodeAt(t)<=56319&&56320<=e.charCodeAt(t+1)&&e.charCodeAt(t+1)<=57343}function s(e,t){void 0===t&&(t=0);var i=e.charCodeAt(t);if(55296<=i&&i<=56319&&t<e.length-1){var n=i;return 56320<=(r=e.charCodeAt(t+1))&&r<=57343?1024*(n-55296)+(r-56320)+65536:n}if(56320<=i&&i<=57343&&t>=1){var r=i;return 55296<=(n=e.charCodeAt(t-1))&&n<=56319?1024*(n-55296)+(r-56320)+65536:r}return i}function l(a,s,l){var u=[a].concat(s).concat([l]),c=u[u.length-2],h=l,d=u.lastIndexOf(14);if(d>1&&u.slice(1,d).every((function(t){return t==e}))&&-1==[e,n,o].indexOf(a))return 2;var f=u.lastIndexOf(t);if(f>0&&u.slice(1,f).every((function(e){return e==t}))&&-1==[i,t].indexOf(c))return u.filter((function(e){return e==t})).length%2==1?3:4;if(0==c&&1==h)return 0;if(2==c||0==c||1==c)return 14==h&&s.every((function(t){return t==e}))?2:1;if(2==h||0==h||1==h)return 1;if(6==c&&(6==h||7==h||9==h||10==h))return 0;if(!(9!=c&&7!=c||7!=h&&8!=h))return 0;if((10==c||8==c)&&8==h)return 0;if(h==e||15==h)return 0;if(5==h)return 0;if(c==i)return 0;var p=-1!=u.indexOf(e)?u.lastIndexOf(e)-1:u.length-2;return-1!=[n,o].indexOf(u[p])&&u.slice(p+1,-1).every((function(t){return t==e}))&&14==h||15==c&&-1!=[r,o].indexOf(h)?0:-1!=s.indexOf(t)?2:c==t&&h==t?0:1}function u(a){return 1536<=a&&a<=1541||1757==a||1807==a||2274==a||3406==a||69821==a||70082<=a&&a<=70083||72250==a||72326<=a&&a<=72329||73030==a?i:13==a?0:10==a?1:0<=a&&a<=9||11<=a&&a<=12||14<=a&&a<=31||127<=a&&a<=159||173==a||1564==a||6158==a||8203==a||8206<=a&&a<=8207||8232==a||8233==a||8234<=a&&a<=8238||8288<=a&&a<=8292||8293==a||8294<=a&&a<=8303||55296<=a&&a<=57343||65279==a||65520<=a&&a<=65528||65529<=a&&a<=65531||113824<=a&&a<=113827||119155<=a&&a<=119162||917504==a||917505==a||917506<=a&&a<=917535||917632<=a&&a<=917759||918e3<=a&&a<=921599?2:768<=a&&a<=879||1155<=a&&a<=1159||1160<=a&&a<=1161||1425<=a&&a<=1469||1471==a||1473<=a&&a<=1474||1476<=a&&a<=1477||1479==a||1552<=a&&a<=1562||1611<=a&&a<=1631||1648==a||1750<=a&&a<=1756||1759<=a&&a<=1764||1767<=a&&a<=1768||1770<=a&&a<=1773||1809==a||1840<=a&&a<=1866||1958<=a&&a<=1968||2027<=a&&a<=2035||2070<=a&&a<=2073||2075<=a&&a<=2083||2085<=a&&a<=2087||2089<=a&&a<=2093||2137<=a&&a<=2139||2260<=a&&a<=2273||2275<=a&&a<=2306||2362==a||2364==a||2369<=a&&a<=2376||2381==a||2385<=a&&a<=2391||2402<=a&&a<=2403||2433==a||2492==a||2494==a||2497<=a&&a<=2500||2509==a||2519==a||2530<=a&&a<=2531||2561<=a&&a<=2562||2620==a||2625<=a&&a<=2626||2631<=a&&a<=2632||2635<=a&&a<=2637||2641==a||2672<=a&&a<=2673||2677==a||2689<=a&&a<=2690||2748==a||2753<=a&&a<=2757||2759<=a&&a<=2760||2765==a||2786<=a&&a<=2787||2810<=a&&a<=2815||2817==a||2876==a||2878==a||2879==a||2881<=a&&a<=2884||2893==a||2902==a||2903==a||2914<=a&&a<=2915||2946==a||3006==a||3008==a||3021==a||3031==a||3072==a||3134<=a&&a<=3136||3142<=a&&a<=3144||3146<=a&&a<=3149||3157<=a&&a<=3158||3170<=a&&a<=3171||3201==a||3260==a||3263==a||3266==a||3270==a||3276<=a&&a<=3277||3285<=a&&a<=3286||3298<=a&&a<=3299||3328<=a&&a<=3329||3387<=a&&a<=3388||3390==a||3393<=a&&a<=3396||3405==a||3415==a||3426<=a&&a<=3427||3530==a||3535==a||3538<=a&&a<=3540||3542==a||3551==a||3633==a||3636<=a&&a<=3642||3655<=a&&a<=3662||3761==a||3764<=a&&a<=3769||3771<=a&&a<=3772||3784<=a&&a<=3789||3864<=a&&a<=3865||3893==a||3895==a||3897==a||3953<=a&&a<=3966||3968<=a&&a<=3972||3974<=a&&a<=3975||3981<=a&&a<=3991||3993<=a&&a<=4028||4038==a||4141<=a&&a<=4144||4146<=a&&a<=4151||4153<=a&&a<=4154||4157<=a&&a<=4158||4184<=a&&a<=4185||4190<=a&&a<=4192||4209<=a&&a<=4212||4226==a||4229<=a&&a<=4230||4237==a||4253==a||4957<=a&&a<=4959||5906<=a&&a<=5908||5938<=a&&a<=5940||5970<=a&&a<=5971||6002<=a&&a<=6003||6068<=a&&a<=6069||6071<=a&&a<=6077||6086==a||6089<=a&&a<=6099||6109==a||6155<=a&&a<=6157||6277<=a&&a<=6278||6313==a||6432<=a&&a<=6434||6439<=a&&a<=6440||6450==a||6457<=a&&a<=6459||6679<=a&&a<=6680||6683==a||6742==a||6744<=a&&a<=6750||6752==a||6754==a||6757<=a&&a<=6764||6771<=a&&a<=6780||6783==a||6832<=a&&a<=6845||6846==a||6912<=a&&a<=6915||6964==a||6966<=a&&a<=6970||6972==a||6978==a||7019<=a&&a<=7027||7040<=a&&a<=7041||7074<=a&&a<=7077||7080<=a&&a<=7081||7083<=a&&a<=7085||7142==a||7144<=a&&a<=7145||7149==a||7151<=a&&a<=7153||7212<=a&&a<=7219||7222<=a&&a<=7223||7376<=a&&a<=7378||7380<=a&&a<=7392||7394<=a&&a<=7400||7405==a||7412==a||7416<=a&&a<=7417||7616<=a&&a<=7673||7675<=a&&a<=7679||8204==a||8400<=a&&a<=8412||8413<=a&&a<=8416||8417==a||8418<=a&&a<=8420||8421<=a&&a<=8432||11503<=a&&a<=11505||11647==a||11744<=a&&a<=11775||12330<=a&&a<=12333||12334<=a&&a<=12335||12441<=a&&a<=12442||42607==a||42608<=a&&a<=42610||42612<=a&&a<=42621||42654<=a&&a<=42655||42736<=a&&a<=42737||43010==a||43014==a||43019==a||43045<=a&&a<=43046||43204<=a&&a<=43205||43232<=a&&a<=43249||43302<=a&&a<=43309||43335<=a&&a<=43345||43392<=a&&a<=43394||43443==a||43446<=a&&a<=43449||43452==a||43493==a||43561<=a&&a<=43566||43569<=a&&a<=43570||43573<=a&&a<=43574||43587==a||43596==a||43644==a||43696==a||43698<=a&&a<=43700||43703<=a&&a<=43704||43710<=a&&a<=43711||43713==a||43756<=a&&a<=43757||43766==a||44005==a||44008==a||44013==a||64286==a||65024<=a&&a<=65039||65056<=a&&a<=65071||65438<=a&&a<=65439||66045==a||66272==a||66422<=a&&a<=66426||68097<=a&&a<=68099||68101<=a&&a<=68102||68108<=a&&a<=68111||68152<=a&&a<=68154||68159==a||68325<=a&&a<=68326||69633==a||69688<=a&&a<=69702||69759<=a&&a<=69761||69811<=a&&a<=69814||69817<=a&&a<=69818||69888<=a&&a<=69890||69927<=a&&a<=69931||69933<=a&&a<=69940||70003==a||70016<=a&&a<=70017||70070<=a&&a<=70078||70090<=a&&a<=70092||70191<=a&&a<=70193||70196==a||70198<=a&&a<=70199||70206==a||70367==a||70371<=a&&a<=70378||70400<=a&&a<=70401||70460==a||70462==a||70464==a||70487==a||70502<=a&&a<=70508||70512<=a&&a<=70516||70712<=a&&a<=70719||70722<=a&&a<=70724||70726==a||70832==a||70835<=a&&a<=70840||70842==a||70845==a||70847<=a&&a<=70848||70850<=a&&a<=70851||71087==a||71090<=a&&a<=71093||71100<=a&&a<=71101||71103<=a&&a<=71104||71132<=a&&a<=71133||71219<=a&&a<=71226||71229==a||71231<=a&&a<=71232||71339==a||71341==a||71344<=a&&a<=71349||71351==a||71453<=a&&a<=71455||71458<=a&&a<=71461||71463<=a&&a<=71467||72193<=a&&a<=72198||72201<=a&&a<=72202||72243<=a&&a<=72248||72251<=a&&a<=72254||72263==a||72273<=a&&a<=72278||72281<=a&&a<=72283||72330<=a&&a<=72342||72344<=a&&a<=72345||72752<=a&&a<=72758||72760<=a&&a<=72765||72767==a||72850<=a&&a<=72871||72874<=a&&a<=72880||72882<=a&&a<=72883||72885<=a&&a<=72886||73009<=a&&a<=73014||73018==a||73020<=a&&a<=73021||73023<=a&&a<=73029||73031==a||92912<=a&&a<=92916||92976<=a&&a<=92982||94095<=a&&a<=94098||113821<=a&&a<=113822||119141==a||119143<=a&&a<=119145||119150<=a&&a<=119154||119163<=a&&a<=119170||119173<=a&&a<=119179||119210<=a&&a<=119213||119362<=a&&a<=119364||121344<=a&&a<=121398||121403<=a&&a<=121452||121461==a||121476==a||121499<=a&&a<=121503||121505<=a&&a<=121519||122880<=a&&a<=122886||122888<=a&&a<=122904||122907<=a&&a<=122913||122915<=a&&a<=122916||122918<=a&&a<=122922||125136<=a&&a<=125142||125252<=a&&a<=125258||917536<=a&&a<=917631||917760<=a&&a<=917999?e:127462<=a&&a<=127487?t:2307==a||2363==a||2366<=a&&a<=2368||2377<=a&&a<=2380||2382<=a&&a<=2383||2434<=a&&a<=2435||2495<=a&&a<=2496||2503<=a&&a<=2504||2507<=a&&a<=2508||2563==a||2622<=a&&a<=2624||2691==a||2750<=a&&a<=2752||2761==a||2763<=a&&a<=2764||2818<=a&&a<=2819||2880==a||2887<=a&&a<=2888||2891<=a&&a<=2892||3007==a||3009<=a&&a<=3010||3014<=a&&a<=3016||3018<=a&&a<=3020||3073<=a&&a<=3075||3137<=a&&a<=3140||3202<=a&&a<=3203||3262==a||3264<=a&&a<=3265||3267<=a&&a<=3268||3271<=a&&a<=3272||3274<=a&&a<=3275||3330<=a&&a<=3331||3391<=a&&a<=3392||3398<=a&&a<=3400||3402<=a&&a<=3404||3458<=a&&a<=3459||3536<=a&&a<=3537||3544<=a&&a<=3550||3570<=a&&a<=3571||3635==a||3763==a||3902<=a&&a<=3903||3967==a||4145==a||4155<=a&&a<=4156||4182<=a&&a<=4183||4228==a||6070==a||6078<=a&&a<=6085||6087<=a&&a<=6088||6435<=a&&a<=6438||6441<=a&&a<=6443||6448<=a&&a<=6449||6451<=a&&a<=6456||6681<=a&&a<=6682||6741==a||6743==a||6765<=a&&a<=6770||6916==a||6965==a||6971==a||6973<=a&&a<=6977||6979<=a&&a<=6980||7042==a||7073==a||7078<=a&&a<=7079||7082==a||7143==a||7146<=a&&a<=7148||7150==a||7154<=a&&a<=7155||7204<=a&&a<=7211||7220<=a&&a<=7221||7393==a||7410<=a&&a<=7411||7415==a||43043<=a&&a<=43044||43047==a||43136<=a&&a<=43137||43188<=a&&a<=43203||43346<=a&&a<=43347||43395==a||43444<=a&&a<=43445||43450<=a&&a<=43451||43453<=a&&a<=43456||43567<=a&&a<=43568||43571<=a&&a<=43572||43597==a||43755==a||43758<=a&&a<=43759||43765==a||44003<=a&&a<=44004||44006<=a&&a<=44007||44009<=a&&a<=44010||44012==a||69632==a||69634==a||69762==a||69808<=a&&a<=69810||69815<=a&&a<=69816||69932==a||70018==a||70067<=a&&a<=70069||70079<=a&&a<=70080||70188<=a&&a<=70190||70194<=a&&a<=70195||70197==a||70368<=a&&a<=70370||70402<=a&&a<=70403||70463==a||70465<=a&&a<=70468||70471<=a&&a<=70472||70475<=a&&a<=70477||70498<=a&&a<=70499||70709<=a&&a<=70711||70720<=a&&a<=70721||70725==a||70833<=a&&a<=70834||70841==a||70843<=a&&a<=70844||70846==a||70849==a||71088<=a&&a<=71089||71096<=a&&a<=71099||71102==a||71216<=a&&a<=71218||71227<=a&&a<=71228||71230==a||71340==a||71342<=a&&a<=71343||71350==a||71456<=a&&a<=71457||71462==a||72199<=a&&a<=72200||72249==a||72279<=a&&a<=72280||72343==a||72751==a||72766==a||72873==a||72881==a||72884==a||94033<=a&&a<=94078||119142==a||119149==a?5:4352<=a&&a<=4447||43360<=a&&a<=43388?6:4448<=a&&a<=4519||55216<=a&&a<=55238?7:4520<=a&&a<=4607||55243<=a&&a<=55291?8:44032==a||44060==a||44088==a||44116==a||44144==a||44172==a||44200==a||44228==a||44256==a||44284==a||44312==a||44340==a||44368==a||44396==a||44424==a||44452==a||44480==a||44508==a||44536==a||44564==a||44592==a||44620==a||44648==a||44676==a||44704==a||44732==a||44760==a||44788==a||44816==a||44844==a||44872==a||44900==a||44928==a||44956==a||44984==a||45012==a||45040==a||45068==a||45096==a||45124==a||45152==a||45180==a||45208==a||45236==a||45264==a||45292==a||45320==a||45348==a||45376==a||45404==a||45432==a||45460==a||45488==a||45516==a||45544==a||45572==a||45600==a||45628==a||45656==a||45684==a||45712==a||45740==a||45768==a||45796==a||45824==a||45852==a||45880==a||45908==a||45936==a||45964==a||45992==a||46020==a||46048==a||46076==a||46104==a||46132==a||46160==a||46188==a||46216==a||46244==a||46272==a||46300==a||46328==a||46356==a||46384==a||46412==a||46440==a||46468==a||46496==a||46524==a||46552==a||46580==a||46608==a||46636==a||46664==a||46692==a||46720==a||46748==a||46776==a||46804==a||46832==a||46860==a||46888==a||46916==a||46944==a||46972==a||47e3==a||47028==a||47056==a||47084==a||47112==a||47140==a||47168==a||47196==a||47224==a||47252==a||47280==a||47308==a||47336==a||47364==a||47392==a||47420==a||47448==a||47476==a||47504==a||47532==a||47560==a||47588==a||47616==a||47644==a||47672==a||47700==a||47728==a||47756==a||47784==a||47812==a||47840==a||47868==a||47896==a||47924==a||47952==a||47980==a||48008==a||48036==a||48064==a||48092==a||48120==a||48148==a||48176==a||48204==a||48232==a||48260==a||48288==a||48316==a||48344==a||48372==a||48400==a||48428==a||48456==a||48484==a||48512==a||48540==a||48568==a||48596==a||48624==a||48652==a||48680==a||48708==a||48736==a||48764==a||48792==a||48820==a||48848==a||48876==a||48904==a||48932==a||48960==a||48988==a||49016==a||49044==a||49072==a||49100==a||49128==a||49156==a||49184==a||49212==a||49240==a||49268==a||49296==a||49324==a||49352==a||49380==a||49408==a||49436==a||49464==a||49492==a||49520==a||49548==a||49576==a||49604==a||49632==a||49660==a||49688==a||49716==a||49744==a||49772==a||49800==a||49828==a||49856==a||49884==a||49912==a||49940==a||49968==a||49996==a||50024==a||50052==a||50080==a||50108==a||50136==a||50164==a||50192==a||50220==a||50248==a||50276==a||50304==a||50332==a||50360==a||50388==a||50416==a||50444==a||50472==a||50500==a||50528==a||50556==a||50584==a||50612==a||50640==a||50668==a||50696==a||50724==a||50752==a||50780==a||50808==a||50836==a||50864==a||50892==a||50920==a||50948==a||50976==a||51004==a||51032==a||51060==a||51088==a||51116==a||51144==a||51172==a||51200==a||51228==a||51256==a||51284==a||51312==a||51340==a||51368==a||51396==a||51424==a||51452==a||51480==a||51508==a||51536==a||51564==a||51592==a||51620==a||51648==a||51676==a||51704==a||51732==a||51760==a||51788==a||51816==a||51844==a||51872==a||51900==a||51928==a||51956==a||51984==a||52012==a||52040==a||52068==a||52096==a||52124==a||52152==a||52180==a||52208==a||52236==a||52264==a||52292==a||52320==a||52348==a||52376==a||52404==a||52432==a||52460==a||52488==a||52516==a||52544==a||52572==a||52600==a||52628==a||52656==a||52684==a||52712==a||52740==a||52768==a||52796==a||52824==a||52852==a||52880==a||52908==a||52936==a||52964==a||52992==a||53020==a||53048==a||53076==a||53104==a||53132==a||53160==a||53188==a||53216==a||53244==a||53272==a||53300==a||53328==a||53356==a||53384==a||53412==a||53440==a||53468==a||53496==a||53524==a||53552==a||53580==a||53608==a||53636==a||53664==a||53692==a||53720==a||53748==a||53776==a||53804==a||53832==a||53860==a||53888==a||53916==a||53944==a||53972==a||54e3==a||54028==a||54056==a||54084==a||54112==a||54140==a||54168==a||54196==a||54224==a||54252==a||54280==a||54308==a||54336==a||54364==a||54392==a||54420==a||54448==a||54476==a||54504==a||54532==a||54560==a||54588==a||54616==a||54644==a||54672==a||54700==a||54728==a||54756==a||54784==a||54812==a||54840==a||54868==a||54896==a||54924==a||54952==a||54980==a||55008==a||55036==a||55064==a||55092==a||55120==a||55148==a||55176==a?9:44033<=a&&a<=44059||44061<=a&&a<=44087||44089<=a&&a<=44115||44117<=a&&a<=44143||44145<=a&&a<=44171||44173<=a&&a<=44199||44201<=a&&a<=44227||44229<=a&&a<=44255||44257<=a&&a<=44283||44285<=a&&a<=44311||44313<=a&&a<=44339||44341<=a&&a<=44367||44369<=a&&a<=44395||44397<=a&&a<=44423||44425<=a&&a<=44451||44453<=a&&a<=44479||44481<=a&&a<=44507||44509<=a&&a<=44535||44537<=a&&a<=44563||44565<=a&&a<=44591||44593<=a&&a<=44619||44621<=a&&a<=44647||44649<=a&&a<=44675||44677<=a&&a<=44703||44705<=a&&a<=44731||44733<=a&&a<=44759||44761<=a&&a<=44787||44789<=a&&a<=44815||44817<=a&&a<=44843||44845<=a&&a<=44871||44873<=a&&a<=44899||44901<=a&&a<=44927||44929<=a&&a<=44955||44957<=a&&a<=44983||44985<=a&&a<=45011||45013<=a&&a<=45039||45041<=a&&a<=45067||45069<=a&&a<=45095||45097<=a&&a<=45123||45125<=a&&a<=45151||45153<=a&&a<=45179||45181<=a&&a<=45207||45209<=a&&a<=45235||45237<=a&&a<=45263||45265<=a&&a<=45291||45293<=a&&a<=45319||45321<=a&&a<=45347||45349<=a&&a<=45375||45377<=a&&a<=45403||45405<=a&&a<=45431||45433<=a&&a<=45459||45461<=a&&a<=45487||45489<=a&&a<=45515||45517<=a&&a<=45543||45545<=a&&a<=45571||45573<=a&&a<=45599||45601<=a&&a<=45627||45629<=a&&a<=45655||45657<=a&&a<=45683||45685<=a&&a<=45711||45713<=a&&a<=45739||45741<=a&&a<=45767||45769<=a&&a<=45795||45797<=a&&a<=45823||45825<=a&&a<=45851||45853<=a&&a<=45879||45881<=a&&a<=45907||45909<=a&&a<=45935||45937<=a&&a<=45963||45965<=a&&a<=45991||45993<=a&&a<=46019||46021<=a&&a<=46047||46049<=a&&a<=46075||46077<=a&&a<=46103||46105<=a&&a<=46131||46133<=a&&a<=46159||46161<=a&&a<=46187||46189<=a&&a<=46215||46217<=a&&a<=46243||46245<=a&&a<=46271||46273<=a&&a<=46299||46301<=a&&a<=46327||46329<=a&&a<=46355||46357<=a&&a<=46383||46385<=a&&a<=46411||46413<=a&&a<=46439||46441<=a&&a<=46467||46469<=a&&a<=46495||46497<=a&&a<=46523||46525<=a&&a<=46551||46553<=a&&a<=46579||46581<=a&&a<=46607||46609<=a&&a<=46635||46637<=a&&a<=46663||46665<=a&&a<=46691||46693<=a&&a<=46719||46721<=a&&a<=46747||46749<=a&&a<=46775||46777<=a&&a<=46803||46805<=a&&a<=46831||46833<=a&&a<=46859||46861<=a&&a<=46887||46889<=a&&a<=46915||46917<=a&&a<=46943||46945<=a&&a<=46971||46973<=a&&a<=46999||47001<=a&&a<=47027||47029<=a&&a<=47055||47057<=a&&a<=47083||47085<=a&&a<=47111||47113<=a&&a<=47139||47141<=a&&a<=47167||47169<=a&&a<=47195||47197<=a&&a<=47223||47225<=a&&a<=47251||47253<=a&&a<=47279||47281<=a&&a<=47307||47309<=a&&a<=47335||47337<=a&&a<=47363||47365<=a&&a<=47391||47393<=a&&a<=47419||47421<=a&&a<=47447||47449<=a&&a<=47475||47477<=a&&a<=47503||47505<=a&&a<=47531||47533<=a&&a<=47559||47561<=a&&a<=47587||47589<=a&&a<=47615||47617<=a&&a<=47643||47645<=a&&a<=47671||47673<=a&&a<=47699||47701<=a&&a<=47727||47729<=a&&a<=47755||47757<=a&&a<=47783||47785<=a&&a<=47811||47813<=a&&a<=47839||47841<=a&&a<=47867||47869<=a&&a<=47895||47897<=a&&a<=47923||47925<=a&&a<=47951||47953<=a&&a<=47979||47981<=a&&a<=48007||48009<=a&&a<=48035||48037<=a&&a<=48063||48065<=a&&a<=48091||48093<=a&&a<=48119||48121<=a&&a<=48147||48149<=a&&a<=48175||48177<=a&&a<=48203||48205<=a&&a<=48231||48233<=a&&a<=48259||48261<=a&&a<=48287||48289<=a&&a<=48315||48317<=a&&a<=48343||48345<=a&&a<=48371||48373<=a&&a<=48399||48401<=a&&a<=48427||48429<=a&&a<=48455||48457<=a&&a<=48483||48485<=a&&a<=48511||48513<=a&&a<=48539||48541<=a&&a<=48567||48569<=a&&a<=48595||48597<=a&&a<=48623||48625<=a&&a<=48651||48653<=a&&a<=48679||48681<=a&&a<=48707||48709<=a&&a<=48735||48737<=a&&a<=48763||48765<=a&&a<=48791||48793<=a&&a<=48819||48821<=a&&a<=48847||48849<=a&&a<=48875||48877<=a&&a<=48903||48905<=a&&a<=48931||48933<=a&&a<=48959||48961<=a&&a<=48987||48989<=a&&a<=49015||49017<=a&&a<=49043||49045<=a&&a<=49071||49073<=a&&a<=49099||49101<=a&&a<=49127||49129<=a&&a<=49155||49157<=a&&a<=49183||49185<=a&&a<=49211||49213<=a&&a<=49239||49241<=a&&a<=49267||49269<=a&&a<=49295||49297<=a&&a<=49323||49325<=a&&a<=49351||49353<=a&&a<=49379||49381<=a&&a<=49407||49409<=a&&a<=49435||49437<=a&&a<=49463||49465<=a&&a<=49491||49493<=a&&a<=49519||49521<=a&&a<=49547||49549<=a&&a<=49575||49577<=a&&a<=49603||49605<=a&&a<=49631||49633<=a&&a<=49659||49661<=a&&a<=49687||49689<=a&&a<=49715||49717<=a&&a<=49743||49745<=a&&a<=49771||49773<=a&&a<=49799||49801<=a&&a<=49827||49829<=a&&a<=49855||49857<=a&&a<=49883||49885<=a&&a<=49911||49913<=a&&a<=49939||49941<=a&&a<=49967||49969<=a&&a<=49995||49997<=a&&a<=50023||50025<=a&&a<=50051||50053<=a&&a<=50079||50081<=a&&a<=50107||50109<=a&&a<=50135||50137<=a&&a<=50163||50165<=a&&a<=50191||50193<=a&&a<=50219||50221<=a&&a<=50247||50249<=a&&a<=50275||50277<=a&&a<=50303||50305<=a&&a<=50331||50333<=a&&a<=50359||50361<=a&&a<=50387||50389<=a&&a<=50415||50417<=a&&a<=50443||50445<=a&&a<=50471||50473<=a&&a<=50499||50501<=a&&a<=50527||50529<=a&&a<=50555||50557<=a&&a<=50583||50585<=a&&a<=50611||50613<=a&&a<=50639||50641<=a&&a<=50667||50669<=a&&a<=50695||50697<=a&&a<=50723||50725<=a&&a<=50751||50753<=a&&a<=50779||50781<=a&&a<=50807||50809<=a&&a<=50835||50837<=a&&a<=50863||50865<=a&&a<=50891||50893<=a&&a<=50919||50921<=a&&a<=50947||50949<=a&&a<=50975||50977<=a&&a<=51003||51005<=a&&a<=51031||51033<=a&&a<=51059||51061<=a&&a<=51087||51089<=a&&a<=51115||51117<=a&&a<=51143||51145<=a&&a<=51171||51173<=a&&a<=51199||51201<=a&&a<=51227||51229<=a&&a<=51255||51257<=a&&a<=51283||51285<=a&&a<=51311||51313<=a&&a<=51339||51341<=a&&a<=51367||51369<=a&&a<=51395||51397<=a&&a<=51423||51425<=a&&a<=51451||51453<=a&&a<=51479||51481<=a&&a<=51507||51509<=a&&a<=51535||51537<=a&&a<=51563||51565<=a&&a<=51591||51593<=a&&a<=51619||51621<=a&&a<=51647||51649<=a&&a<=51675||51677<=a&&a<=51703||51705<=a&&a<=51731||51733<=a&&a<=51759||51761<=a&&a<=51787||51789<=a&&a<=51815||51817<=a&&a<=51843||51845<=a&&a<=51871||51873<=a&&a<=51899||51901<=a&&a<=51927||51929<=a&&a<=51955||51957<=a&&a<=51983||51985<=a&&a<=52011||52013<=a&&a<=52039||52041<=a&&a<=52067||52069<=a&&a<=52095||52097<=a&&a<=52123||52125<=a&&a<=52151||52153<=a&&a<=52179||52181<=a&&a<=52207||52209<=a&&a<=52235||52237<=a&&a<=52263||52265<=a&&a<=52291||52293<=a&&a<=52319||52321<=a&&a<=52347||52349<=a&&a<=52375||52377<=a&&a<=52403||52405<=a&&a<=52431||52433<=a&&a<=52459||52461<=a&&a<=52487||52489<=a&&a<=52515||52517<=a&&a<=52543||52545<=a&&a<=52571||52573<=a&&a<=52599||52601<=a&&a<=52627||52629<=a&&a<=52655||52657<=a&&a<=52683||52685<=a&&a<=52711||52713<=a&&a<=52739||52741<=a&&a<=52767||52769<=a&&a<=52795||52797<=a&&a<=52823||52825<=a&&a<=52851||52853<=a&&a<=52879||52881<=a&&a<=52907||52909<=a&&a<=52935||52937<=a&&a<=52963||52965<=a&&a<=52991||52993<=a&&a<=53019||53021<=a&&a<=53047||53049<=a&&a<=53075||53077<=a&&a<=53103||53105<=a&&a<=53131||53133<=a&&a<=53159||53161<=a&&a<=53187||53189<=a&&a<=53215||53217<=a&&a<=53243||53245<=a&&a<=53271||53273<=a&&a<=53299||53301<=a&&a<=53327||53329<=a&&a<=53355||53357<=a&&a<=53383||53385<=a&&a<=53411||53413<=a&&a<=53439||53441<=a&&a<=53467||53469<=a&&a<=53495||53497<=a&&a<=53523||53525<=a&&a<=53551||53553<=a&&a<=53579||53581<=a&&a<=53607||53609<=a&&a<=53635||53637<=a&&a<=53663||53665<=a&&a<=53691||53693<=a&&a<=53719||53721<=a&&a<=53747||53749<=a&&a<=53775||53777<=a&&a<=53803||53805<=a&&a<=53831||53833<=a&&a<=53859||53861<=a&&a<=53887||53889<=a&&a<=53915||53917<=a&&a<=53943||53945<=a&&a<=53971||53973<=a&&a<=53999||54001<=a&&a<=54027||54029<=a&&a<=54055||54057<=a&&a<=54083||54085<=a&&a<=54111||54113<=a&&a<=54139||54141<=a&&a<=54167||54169<=a&&a<=54195||54197<=a&&a<=54223||54225<=a&&a<=54251||54253<=a&&a<=54279||54281<=a&&a<=54307||54309<=a&&a<=54335||54337<=a&&a<=54363||54365<=a&&a<=54391||54393<=a&&a<=54419||54421<=a&&a<=54447||54449<=a&&a<=54475||54477<=a&&a<=54503||54505<=a&&a<=54531||54533<=a&&a<=54559||54561<=a&&a<=54587||54589<=a&&a<=54615||54617<=a&&a<=54643||54645<=a&&a<=54671||54673<=a&&a<=54699||54701<=a&&a<=54727||54729<=a&&a<=54755||54757<=a&&a<=54783||54785<=a&&a<=54811||54813<=a&&a<=54839||54841<=a&&a<=54867||54869<=a&&a<=54895||54897<=a&&a<=54923||54925<=a&&a<=54951||54953<=a&&a<=54979||54981<=a&&a<=55007||55009<=a&&a<=55035||55037<=a&&a<=55063||55065<=a&&a<=55091||55093<=a&&a<=55119||55121<=a&&a<=55147||55149<=a&&a<=55175||55177<=a&&a<=55203?10:9757==a||9977==a||9994<=a&&a<=9997||127877==a||127938<=a&&a<=127940||127943==a||127946<=a&&a<=127948||128066<=a&&a<=128067||128070<=a&&a<=128080||128110==a||128112<=a&&a<=128120||128124==a||128129<=a&&a<=128131||128133<=a&&a<=128135||128170==a||128372<=a&&a<=128373||128378==a||128400==a||128405<=a&&a<=128406||128581<=a&&a<=128583||128587<=a&&a<=128591||128675==a||128692<=a&&a<=128694||128704==a||128716==a||129304<=a&&a<=129308||129310<=a&&a<=129311||129318==a||129328<=a&&a<=129337||129341<=a&&a<=129342||129489<=a&&a<=129501?n:127995<=a&&a<=127999?14:8205==a?15:9792==a||9794==a||9877<=a&&a<=9878||9992==a||10084==a||127752==a||127806==a||127859==a||127891==a||127908==a||127912==a||127979==a||127981==a||128139==a||128187<=a&&a<=128188||128295==a||128300==a||128488==a||128640==a||128658==a?r:128102<=a&&a<=128105?o:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var i=u(s(e,t)),n=[],r=t+1;r<e.length;r++)if(!a(e,r-1)){var o=u(s(e,r));if(l(i,n,o))return r;n.push(o)}return e.length},this.splitGraphemes=function(e){for(var t,i=[],n=0;(t=this.nextBreak(e,n))<e.length;)i.push(e.slice(n,t)),n=t;return n<e.length&&i.push(e.slice(n)),i},this.iterateGraphemes=function(e){var t=0,i={next:function(){var i,n;return(n=this.nextBreak(e,t))<e.length?(i=e.slice(t,n),t=n,{value:i,done:!1}):t<e.length?(i=e.slice(t),t=e.length,{value:i,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(i[Symbol.iterator]=function(){return i}),i},this.countGraphemes=function(e){for(var t,i=0,n=0;(t=this.nextBreak(e,n))<e.length;)n=t,i++;return n<e.length&&i++,i},this}function ue$w(){this.textureInfo=void 0,this.dimensions=void 0,this.billboard=void 0}function pe$r(e,t,i){this.labelCollection=e,this.index=t,this.dimensions=i}var ge$o=1.2,ie$z="ID_WHITE_PIXEL",q$U=new o$1o(4,4),ve$n=new f$18(1,1,1,1);function ye$k(e,t){var i=document.createElement("canvas");i.width=q$U.x,i.height=q$U.y;var n=i.getContext("2d");n.fillStyle="#fff",n.fillRect(0,0,i.width,i.height),e.addImage(ie$z,i).then((function(e){t._whitePixelIndex=e}))}var D$P={};function me$r(e,t,i,n,r,o,a){return D$P.font=t,D$P.fillColor=i,D$P.strokeColor=n,D$P.strokeWidth=r,D$P.padding=V$I.PADDING,a===S$O.CENTER?D$P.textBaseline="middle":a===S$O.TOP?D$P.textBaseline="top":D$P.textBaseline="bottom",D$P.fill=o===R$Q.FILL||o===R$Q.FILL_AND_OUTLINE,D$P.stroke=o===R$Q.OUTLINE||o===R$Q.FILL_AND_OUTLINE,D$P.backgroundColor=e$1U.BLACK,x$X(e,D$P)}function Z$L(e,t){t.textureInfo=void 0,t.dimensions=void 0;var i=t.billboard;e$2b(i)&&(i.show=!1,i.image=void 0,e$2b(i._removeCallbackFunc)&&(i._removeCallbackFunc(),i._removeCallbackFunc=void 0),e._spareBillboards.push(i),t.billboard=void 0)}function xe$n(e,t,i,n){e.addImage(t,i).then((function(e){n.index=e}))}var we$i=new T$N,J$I=new o$1p;function be$p(e,t){var i,n,r,o=t._renderedText,a=we$i.splitGraphemes(o),s=a.length,l=t._glyphs,u=l.length;if(t._relativeSize=t._fontSize/V$I.FONT_SIZE,s<u)for(n=s;n<u;++n)Z$L(e,l[n]);l.length=s;var c=t._showBackground&&o.split("\n").join("").length>0,h=t._backgroundBillboard,d=e._backgroundBillboardCollection;c?(e$2b(h)||(h=e$2b(t._backgroundImage)?d.add({collection:e,image:t._backgroundImage}):d.add({collection:e,image:ie$z,imageSubRegion:ve$n}),t._backgroundBillboard=h),e$2b(t._backgroundImage)||(h.color=t._backgroundColor),h.show=t._show,h.position=t._position,h.eyeOffset=t._eyeOffset,h.pixelOffset=t._pixelOffset,h.horizontalOrigin=j$T.LEFT,h.verticalOrigin=t._verticalOrigin,h.heightReference=t._heightReference,h.scale=t.totalScale,h.pickPrimitive=t,h.id=t._id,h.translucencyByDistance=t._translucencyByDistance,h.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,h.scaleByDistance=t._scaleByDistance,h.distanceDisplayCondition=t._distanceDisplayCondition,h.disableDepthTestDistance=t._disableDepthTestDistance,h.opacityState=t._opacityState):e$2b(h)&&(d.remove(h),t._backgroundBillboard=h=void 0);var f=e._glyphTextureCache,p=[0],_=0;for(r=0;r<s;++r){var m=a[r],g=t._verticalOrigin,x=JSON.stringify([m,t._fontFamily,t._fontStyle,t._fontWeight,+g]),v=f[x];if(!e$2b(v)){var y=me$r(m,t._fontStyle+" "+t._fontWeight+" "+V$I.FONT_SIZE+"px "+t._fontFamily,e$1U.WHITE,e$1U.WHITE,0,R$Q.FILL,g);if(v=new pe$r(e,-1,y.dimensions),f[x]=v,y.width>0&&y.height>0){for(var $=b$10(y,{cutoff:V$I.CUTOFF,radius:V$I.RADIUS}),b=y.getContext("2d"),T=y.width,C=y.height,S=b.getImageData(0,0,T,C),w=0;w<T;w++)for(var E=0;E<C;E++){var P=E*T+w,A=255*$[P],L=4*P;S.data[L+0]=A,S.data[L+1]=A,S.data[L+2]=A,S.data[L+3]=A}b.putImageData(S,0,0)," "!==m&&xe$n(e._textureAtlas,x,y,v)}}if("\n"===m?p[++_]=0:p[_]=Math.max(p[_],v.dimensions.height),e$2b(i=l[r])?-1===v.index?Z$L(e,i):e$2b(i.textureInfo)&&(i.textureInfo=void 0):(i=new ue$w,l[r]=i),i.textureInfo=v,i.dimensions=v.dimensions,-1!==v.index){var M=i.billboard,R=e._spareBillboards;e$2b(M)||(R.length>0?M=R.pop():((M=e._billboardCollection.add({collection:e}))._labelDimensions=new o$1o,M._labelTranslate=new o$1o),i.billboard=M),M.show=t._show,M._heightReference=t._heightReference,M.position=t._position,M.eyeOffset=t._eyeOffset,M.pixelOffset=t._pixelOffset,M.horizontalOrigin=j$T.LEFT,M.verticalOrigin=t._verticalOrigin,M.scale=t.totalScale,M.pickPrimitive=t,M.id=t._id,M.image=x,M.translucencyByDistance=t._translucencyByDistance,M.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,M.scaleByDistance=t._scaleByDistance,M.distanceDisplayCondition=t._distanceDisplayCondition,M.disableDepthTestDistance=t._disableDepthTestDistance,M._batchIndex=t._batchIndex,M.outlineColor=t.outlineColor,M.opacityState=t._opacityState,t.style===R$Q.FILL_AND_OUTLINE?(M.color=t._fillColor,M.outlineWidth=t.outlineWidth):t.style===R$Q.FILL?(M.color=t._fillColor,M.outlineWidth=0):t.style===R$Q.OUTLINE&&(M.color=e$1U.TRANSPARENT,M.outlineWidth=t.outlineWidth)}}e._isMVT&&Te$l(t,h,l,s,p),t._repositionAllGlyphs=!0}function Te$l(e,t,i,n,r){for(var o=0,a=0;a<r.length;a++)o+=r[a];for(var s=0;s<n;++s){var l=i[s];if(e$2b(l)&&e$2b(l.billboard)){var u=l.billboard,c=.2*o;J$I.y=c,u.eyeOffset=J$I,e$2b(t)&&(t.eyeOffset=J$I)}}}function ne$C(e,t,i){return t===j$T.CENTER?-e/2:t===j$T.RIGHT?-(e+i.x):i.x}var c$P=new o$1o,Ce$i=new o$1o;function Ie$j(e){var t,i,n,r=e._glyphs,o=e._renderedText,a=0,s=0,l=[],u=Number.NEGATIVE_INFINITY,c=0,h=1,d=r.length,f=e._backgroundBillboard,p=o$1o.clone(e$2b(f)?e._backgroundPadding:o$1o.ZERO,Ce$i);for(p.x/=e._relativeSize,p.y/=e._relativeSize,n=0;n<d;++n)"\n"===o.charAt(n)?(l.push(a),++h,a=0):(i=(t=r[n]).dimensions,c=Math.max(c,i.height-i.descent),u=Math.max(u,i.descent),a+=i.width-i.bounds.minx,n<d-1&&(a+=r[n+1].dimensions.bounds.minx),s=Math.max(s,a));l.push(a);var _=c+u,m=e.totalScale,g=e._horizontalOrigin,x=e._verticalOrigin,v=0,y=l[v],$=ne$C(y,g,p),b=ge$o*_,T=b*(h-1),C=s,S=_+T;e$2b(f)&&(C+=2*p.x,S+=2*p.y,f._labelHorizontalOrigin=g),c$P.x=$*m,c$P.y=0;var w=!0,E=0;for(n=0;n<d;++n)if("\n"===o.charAt(n))E+=b,$=ne$C(y=l[++v],g,p),c$P.x=$*m,w=!0;else if(i=(t=r[n]).dimensions,x===S$O.TOP?(c$P.y=i.height-c-p.y,c$P.y+=V$I.PADDING):x===S$O.CENTER?c$P.y=(T+i.height-c)/2:x===S$O.BASELINE?(c$P.y=T,c$P.y-=V$I.PADDING):(c$P.y=T+u+p.y,c$P.y-=V$I.PADDING),c$P.y=(c$P.y-i.descent-E)*m,w&&(c$P.x-=V$I.PADDING*m,w=!1),e$2b(t.billboard)&&(t.billboard._setTranslate(c$P),t.billboard._labelDimensions.x=C,t.billboard._labelDimensions.y=S,t.billboard._labelHorizontalOrigin=g),n<d-1){var P=r[n+1];c$P.x+=(i.width-i.bounds.minx+P.dimensions.bounds.minx)*m}if(e$2b(f)&&o.split("\n").join("").length>0&&($=g===j$T.CENTER?-s/2-p.x:g===j$T.RIGHT?-(s+2*p.x):0,c$P.x=$*m,x===S$O.TOP?c$P.y=_-c-u:x===S$O.CENTER?c$P.y=(_-c)/2-u:x===S$O.BASELINE?c$P.y=-p.y-u:c$P.y=0,c$P.y=c$P.y*m,f.width=C,f.height=S,f._setTranslate(c$P),f._labelTranslate=o$1o.clone(c$P,f._labelTranslate)),e.heightReference===k$P.CLAMP_TO_GROUND)for(n=0;n<d;++n){var A=(t=r[n]).billboard;e$2b(A)&&(A._labelTranslate=o$1o.clone(c$P,A._labelTranslate))}}function se$u(e,t){for(var i=t._glyphs,n=0,r=i.length;n<r;++n)Z$L(e,i[n]);e$2b(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,e$2b(t._removeCallbackFunc)&&t._removeCallbackFunc(),i$10(t)}function g$U(e){e=u$_(e,u$_.EMPTY_OBJECT),this._id=e.id,this._s3MlayerId=-1,this._scene=e.scene,this._isMVT=e.isMVT,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._backgroundTextureAtlas=void 0,this._whitePixelIndex=void 0,this._swipeEnabled=u$_(e.swipeEnabled,!1),this._swipeRegion=u$_(e.swipeRegion,new f$18(0,0,1,1)),this._billboardMode=u$_(e.billboardMode,yr$1.None),this._backgroundBillboardCollection=new w$N({scene:this._scene,isMVT:this._isMVT,depthTestEnable:e.depthTestEnable,swipeEnabled:this._swipeEnabled,swipeRegion:this._swipeRegion,billboardMode:this._billboardMode}),this._backgroundBillboardCollection.destroyTextureAtlas=!1,this._billboardCollection=new w$N({scene:this._scene,batchTable:this._batchTable,isMVT:this._isMVT,depthTestEnable:e.depthTestEnable,swipeEnabled:this._swipeEnabled,swipeRegion:this._swipeRegion,billboardMode:this._billboardMode}),this._billboardCollection.destroyTextureAtlas=!1,this._billboardCollection._sdf=!0,this._spareBillboards=[],this._glyphTextureCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=e$1U.clone(e$1U.WHITE),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.blendOption=u$_(e.blendOption,S$J.OPAQUE_AND_TRANSLUCENT),this._isS3MTileLabels=u$_(e.isS3MTileLabels,!1),this._labelsID={},this._pickedlabelsID=[],this._isPicked=!1,this._selectedColor=e$1U.clone(u$_(e.selectedColor,new e$1U(.7,.7,1,1))),this._labelSelected=new o$1h,this._visibleViewport=4095}function De$n(e){return e.coord.x}function Oe$j(e){return e.coord.y}Object.defineProperties(g$U.prototype,{length:{get:function(){return this._labels.length}},s3MlayerId:{get:function(){return this._s3MlayerId},set:function(e){o$1q.defined("labelCollection Id value",e),this._s3MlayerId=e}},selectedColor:{get:function(){return this._selectedColor},set:function(e){o$1q.defined("selectedColor value",e),e$1U.clone(e,this._selectedColor)}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(e$2b(e)&&e instanceof f$18))throw new t$16("Expected LabelCollection.swipeRegion to be type of BoundingRectangle.");f$18.equals(e,this._swipeRegion)||(f$18.clone(e,this._swipeRegion),this._billboardCollection.swipeRegion=this._swipeRegion,this._backgroundBillboardCollection.swipeRegion=this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){o$1q.typeOf.bool("LabelCollection.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e,this._billboardCollection.swipeEnabled=e,this._backgroundBillboardCollection.swipeEnabled=e)}},billboardMode:{get:function(){return this._billboardMode}},fadeChage:{get:function(){return this._billboardCollection.fadeChage},set:function(e){this._billboardCollection.fadeChage=e}}}),g$U.prototype.add=function(e){e=u$_(e,{});var t=this._labels.length;e.index=t;var i=new D$Q(e,this);return this._labels.push(i),this._labelsToUpdate.push(i),e$2b(i.id)&&(this._labelsID[i.id]=i),i},g$U.prototype.remove=function(e){if(e$2b(e)&&e._labelCollection===this){var t=this._labels.indexOf(e);if(-1!==t)return this._labels.splice(t,1),se$u(this,e),e$2b(e.id)&&Object.keys(this._labelsID).length>0&&delete this._labelsID[e.id],!0}return!1},g$U.prototype.removeAll=function(){for(var e=this._labels,t=0,i=e.length;t<i;++t)se$u(this,e[t]);e.length=0,this._labelsID={},this._pickedlabelsID.length=0,this._isPicked=!1},g$U.prototype.contains=function(e){return e$2b(e)&&e._labelCollection===this},g$U.prototype.containsLabel=function(e){return this._labelsID.hasOwnProperty(e)},g$U.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return this._labels[e]},g$U.prototype.getById=function(e){if(!e$2b(e))throw new t$16("id is required.");return e$2b(this._labelsID[e])?this._labelsID[e]:null},g$U.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},g$U.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},g$U.prototype.update=function(e,t,i){if(e.multiViewportIndex>-1&&this._labels.length>0){if(e$2b(this._labels[0]._id)&&e$2b(this._labels[0]._id.entityCollection)){var n=this._labels[0]._id.entityCollection.owner;if(typeof n.getVisibleInViewport<"u")if(!n.getVisibleInViewport(e.multiViewportIndex))return}if(!this.getVisibleInViewport(e.multiViewportIndex))return}var r=this._billboardCollection,o=this._backgroundBillboardCollection;r.modelMatrix=this.modelMatrix,r.debugShowBoundingVolume=this.debugShowBoundingVolume,o.modelMatrix=this.modelMatrix,o.debugShowBoundingVolume=this.debugShowBoundingVolume;t=e.context;e$2b(this._textureAtlas)||(this._textureAtlas=new v$I({context:t}),r.textureAtlas=this._textureAtlas),e$2b(this._backgroundTextureAtlas)||(this._backgroundTextureAtlas=new v$I({context:t,initialSize:q$U}),o.textureAtlas=this._backgroundTextureAtlas,ye$k(this._backgroundTextureAtlas,this));for(var a=this._labelsToUpdate.length,s=0;s<a;++s){var l=this._labelsToUpdate[s];if(!l.isDestroyed()){var u=l._glyphs.length;l._rebindAllGlyphs&&(be$p(this,l),l._rebindAllGlyphs=!1),l._repositionAllGlyphs&&(Ie$j(l),l._repositionAllGlyphs=!1),l.computeLocalScreenSpaceBoundingBox(l,l._localScreenSpaceBBox);var c=l._glyphs.length-u;this._totalGlyphCount+=c}}var h=o.length>0?S$J.TRANSLUCENT:this.blendOption;r.blendOption=h,o.blendOption=h,r._highlightColor=this._highlightColor,o._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,o.update(e,t,i),r.update(e,t,i)},g$U.prototype.isDestroyed=function(){return!1},g$U.prototype.destroy=function(){return this.removeAll(),this._billboardCollection=this._billboardCollection.destroy(),this._textureAtlas=this._textureAtlas&&this._textureAtlas.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),this._backgroundTextureAtlas=this._backgroundTextureAtlas&&this._backgroundTextureAtlas.destroy(),i$10(this)},g$U.prototype.setLabelStyle=function(e){for(var t=this._labels.length,i=0;i<t;++i){var n=this._labels[i];n.isDestroyed()||n.setLabelStyle(e)}},g$U.prototype.setLabelVisible=function(e,t){if(!e$2b(e))throw new t$16("index is required.");this._labels[e].show=t},g$U.prototype.setAllLabelsVisible=function(e){for(var t=this._labels.length,i=0;i<t;++i){var n=this._labels[i];n.isDestroyed()||(n.show=e)}},g$U.prototype.setVisibleIndex=function(e){for(var t={},i=0,n=e.length;i<n;i++)t[e[i]]=!0;for(var r in this._labelsID)e$2b(t[r])?this._labelsID[r].show=!0:this._labelsID[r].show=!1},g$U.prototype.setVisibleLabels=function(e){if(0!==e.length&&0!==this._labels.length){for(var t=this._scene._view.viewport,i=t.x,n=t.x+t.width,r=t.y,o=t.y+t.height,a=[],s=0,l=e.length;s<l;++s){var u=e[s];if(e$2b(this._labelsID[u])){var c,h=(_=this._labelsID[u]).computeScreenSpacePosition(this._scene,c);!e$2b(h)||h.x>=i&&h.x<=n&&h.y>=r&&h.y<=o&&a.push({index:u,clustered:!0,coord:h})}}var d=O$B(a,De$n,Oe$j,4096,Int32Array),f=[],p=a.length;for(s=0;s<p;++s){for(var _,m=a[s],g=m.index,x=m.coord,v=(_=this._labelsID[g]).getScreenSpaceBoundingBox(_,x,c),y=d.intersect(v.x,v.y,v.x+v.width,v.y+v.height),$=y.length,b=0,T=0;T<$;++T){var C=y[T],S=a[C];s!==C&&!S.clustered&&++b}b<1&&(m.clustered=!1,f.push(g))}this.setVisibleIndex(f)}},g$U.prototype.setSelection=function(e){if(this.releaseSelection(),0!==Object.keys(this._labelsID).length){if(this._labelsID.hasOwnProperty(e)){var t=this._labelsID[e];if(t.isDestroyed())return;if(t.id===e){t.isPicked=!0;var i=e$1U.clone(this._selectedColor);t.fillColor=i,this._pickedlabelsID.push(e),this._labelSelected.raiseEvent({id:t.id,text:t.text,scale:t.scale,font:t.font,fillColor:t.fillColor})}}this._isPicked=!0}},g$U.prototype.releaseSelection=function(){if(this._isPicked&&0!==Object.keys(this._labelsID).length){for(var e=this._pickedlabelsID.length,t=0;t<e;++t){var i=this._pickedlabelsID[t];if(this._labelsID.hasOwnProperty(i)){var n=this._labelsID[i];n.isDestroyed()||(n.isPicked&&n.restFillColor(),n.isPicked=!1)}}this._pickedlabelsID=[]}};const _0x5da7c0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x84e881=_0x5da7c0(void 0,(function(){return _0x84e881.toString().search("(((.+)+)+)+$").toString().constructor(_0x84e881).search("(((.+)+)+)+$")}));function BillboardCollectionPool(e,t){this._use=[],this._unUse=[],this._owner=t,this._scene=e.scene,this._showCallout=u$_(e.showCallout,!1)}function i$O(e){if(!e$2b(e.provider))throw new t$16("options.provder and options.viewer is required.");this._layerConfig=e.layerConfig,this._provider=e.provider,this._provider.lineAntialiasing=e.lineAntialiasing||!1,this._inner=e.layer,this._imagelayerCollection=e.imagelayerCollection,this._name=e.name,e$2b(e.layerConfig)&&e$2b(e.layerConfig.id)&&(this._name=e.layerConfig.id),this._style3D=u$_(e.style3D,new e$1s),this._swipeEnabled=u$_(e.swipeEnabled,!1),this._billboardMode=u$_(e.billboardMode,yr$1.None),this._labelDepthTestEnabled=u$_(e.labelDepthTestEnabled,!0),this._swipeRegion=u$_(e.swipeRegion,new f$18(0,0,1,1)),this._provider.enableMorphing=u$_(e.enableMorphing,!1),this._isTdt=!1,this._inner.swipeEnabled=this._swipeEnabled,this._inner.swipeRegion=this._swipeRegion,this._provider._style3D=this._style3D,this.labelSelected=new o$1h,this._visibleViewport=4095,this._selectedColor=this._provider._selectedColor,this._overlapDisplayedThreshold=this._provider._overlapDisplayedThreshold,this._billboardCollectionPool=new BillboardCollectionPool(e,this),this._provider._billboardCollectionPool=this._billboardCollectionPool}_0x84e881(),Object.defineProperties(BillboardCollectionPool.prototype,{showCallout:{get:function(){return!1},set:function(e){}},swipeRegion:{get:function(){return!1},set:function(e){}},swipeEnabled:{get:function(){return!1},set:function(e){}}}),BillboardCollectionPool.prototype.pushBack=function(e){let t=this._use.indexOf(e);-1!=t&&(this._use.splice(t,1),this._unUse.push(e))},BillboardCollectionPool.prototype.getOne=function(){let e;return this._unUse.length>0?(e=this._unUse[0],this._unUse.splice(0,1),this._use.push(e),e):(e=new w$N({scene:this._scene,style3D:this._owner._style3D,isMVT:!0,swipeEnabled:this._owner._swipeEnabled,swipeRegion:this._owner._swipeRegion,billboardMode:this._owner._billboardMode,depthTestEnable:!1}),e.showCallout=this._showCallout,this._use.push(e),e)},BillboardCollectionPool.prototype.setVisibleInViewport=function(e,t){},BillboardCollectionPool.prototype.getVisibleInViewport=function(e){return 0},BillboardCollectionPool.prototype.destroy=function(){for(var e=0;e<this._use.length;e++)this._use[e].destroy();for(e=0;e<this._unUse.length;e++)this._unUse[e].destroy();this._use=[],this._unUse=[]},Object.defineProperties(i$O.prototype,{detailLevelOffset:{get:function(){return this._inner._detailLevelOffset},set:function(e){e$2b(e)&&"number"==typeof e&&(this._inner._detailLevelOffset=e)}},tileWidth:{get:function(){return this._provider._tileWidth}},tileHeight:{get:function(){return this._provider._tileHeight}},maximumLevel:{get:function(){return this._provider._ready?this._provider._maximumLevel:-1}},minimumLevel:{get:function(){return this._provider._ready?this._provider._minimumLevel:-1}},tilingScheme:{get:function(){return this._provider._tilingScheme}},rectangle:{get:function(){return this._provider._ready?this._provider._rectangle:null}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._provider._errorEvent}},ready:{get:function(){return this._provider._ready}},readyPromise:{get:function(){return this._provider.readyPromise}},hasAlphaChannel:{get:function(){return!0}},show:{get:function(){return this._inner.show},set:function(e){this._inner.show=e}},mapboxStyle:{get:function(){return this._provider instanceof I$10?this._provider._MVTStyle.serialize():this._provider.mapboxStyle},set:function(e){this._provider.mapboxStyle=e}},alpha:{get:function(){return this._inner.alpha},set:function(e){this._inner.alpha=e}},selectedColor:{get:function(){return this._provider._selectedColor},set:function(e){e instanceof e$1U&&(this._provider._selectedColor=e)}},overlapDisplayedThreshold:{get:function(){return this._provider._overlapDisplayedThreshold},set:function(e){o$1q.typeOf.number("vectortilesmap overlapDisplayedThreshold",e),this._provider._overlapDisplayedThreshold=e}},name:{get:function(){return this._name},set:function(e){this._name=e}},pausing:{get:function(){return this._inner._pausing},set:function(e){this._inner._pausing=e,this._provider._pausing=e}},indexedDBSetting:{get:function(){return this._provider._indexedDBSetting},set:function(e){e$2b(e)&&"boolean"==typeof e.isOpen&&(this._provider._indexedDBSetting.isOpen=e.isOpen)}},layerConfig:{get:function(){return this._layerConfig}},selectEnabled:{get:function(){return this._selectEnabled},set:function(e){this._selectEnabled=e,this._provider._selectEnabled=e}},showCallout:{get:function(){return this._showCallout},set:function(e){this._billboardCollectionPool.showCallout=e}},style3D:{get:function(){return this._style3D},set:function(e){this._style3D=e,this._provider._style3D=this._style3D,this._billboardCollectionPool.style3D=this._style3D}},globalLineWidthExpand:{get:function(){return 0},set:function(e){}},globalLineWidthScale:{get:function(){return this._provider.globalLineWidthScale},set:function(e){e<=0&&(e=.01),e>100&&(e=100),this._provider.globalLineWidthScale=e}},lineAntialiasing:{get:function(){return this._provider.lineAntialiasing},set:function(e){this._provider.lineAntialiasing=e}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(e$2b(e)&&e instanceof f$18))throw new t$16("Expected VectorTilesMap.swipeRegion to be type of BoundingRectangle.");f$18.equals(e,this._swipeRegion)||(f$18.clone(e,this._swipeRegion),this._billboardCollectionPool.swipeRegion=this._swipeRegion,this._inner.swipeRegion=this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){o$1q.typeOf.bool("VectorTilesMap.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e,this._billboardCollectionPool.swipeEnabled=e,this._inner.swipeEnabled=this._swipeEnabled)}},isOverlapDisplayed:{get:function(){return this._provider.isOverlapDisplayed},set:function(e){this._provider.isOverlapDisplayed=e}},enableMorphing:{get:function(){return this._provider.enableMorphing},set:function(e){this._provider.enableMorphing=e}},queryTolerance:{get:function(){return this._provider.selectTolerance},set:function(e){this._provider.selectTolerance=e}},imageryLayer:{get:function(){return this._inner}}}),i$O.prototype.addLayer=function(e,t,i){this._provider._MVTStyle.addLayer(e,t,i)},i$O.prototype.removeLayer=function(e){this._provider._MVTStyle.removeLayer(e)},i$O.prototype.setFilter=function(e,t,i){if(!0===i){var n=[],r=this._provider._viewer.scene.camera.computeViewRectangle();if(e$2b(r)){var o=h$18.southwest(r),a=h$18.southeast(r),s=h$18.northeast(r),l=h$18.northwest(r);n=this._provider.queryRenderedFeatures([o,a,s,l],{layers:[e.replace(/(.*)(_highlight)/,"$1")]});for(var u=["in","$id"],c=(t=_0x570fee.createFilter(t),0);c<n.length;c++){var h=n[c].feature;t(new _0x4f93ac(0),h)&&u.push(h.id)}this.setFilter(e,u)}}else this._provider._currentPickID=void 0,this._provider._MVTStyle.setFilter(e,t)},i$O.prototype.getFilter=function(e){return this._provider._MVTStyle.getFilter(e)},i$O.prototype.setLayoutProperty=function(e,t,i,n){this._provider._MVTStyle.setLayoutProperty(e,t,i,n)},i$O.prototype.getLayoutProperty=function(e,t){return this._provider._MVTStyle.getLayoutProperty(e,t)},i$O.prototype.setPaintProperty=function(e,t,i,n){this._provider._MVTStyle.setPaintProperty(e,t,i,n)},i$O.prototype.getPaintProperty=function(e,t){return this._provider._MVTStyle.getPaintProperty(e,t)},i$O.prototype.queryRenderedFeatures=function(e,t){for(var i=[],n=0,r=e.length;n<r;n++){var o=e[n],a=a$18.fromCartesian(o);i.push(a)}return this._provider.queryRenderedFeatures(i,t)},i$O.prototype.querySourceFeatures=function(e){return this._provider.querySourceFeatures(e)},i$O.prototype.update=function(e,t){},i$O.prototype.getProperty=function(e){return this._provider.getProperty(e)},i$O.prototype.setVisibleInViewport=function(e,t){e$2b(this._inner)&&this._inner.setVisibleInViewport(e,t),this._billboardCollectionPool.setVisibleInViewport(e,t)},i$O.prototype.getVisibleInViewport=function(e){e$2b(this._inner)&&this._inner.getVisibleInViewport(e),this._billboardCollectionPool.getVisibleInViewport(e)},i$O.prototype.refresh=function(){var e=this._inner._imageryCache;for(var t in e)e[t].isRendered=!1;for(var i of(this._imagelayerCollection.remove(this._inner,!0,!0),this._inner=this._imagelayerCollection.addImageryProvider(this._provider),this._provider.innerLayer=this._inner,this._provider._viewer.scene.layers.layerQueue))i._imageryLayer===this&&(i._removeCoverImageryLayer(),i.coverImageryLayer=this)},i$O.prototype.isDestroyed=function(){return!1},i$O.prototype.destroy=function(){return this._provider._billboardCollectionPool=null,e$2b(this._billboardCollectionPool)&&(this._billboardCollectionPool.destroy(),this._billboardCollectionPool=null),this._imagelayerCollection.remove(this._inner,!0,!0),i$10(this)},i$O.prototype.releaseSelection=function(){this._provider._MVTStyle.cancelHighLight(this._provider)};var ce$p=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],ve$m=["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"],he$o=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"],Te$k=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],Ae$n=["#text"],_e$p=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],q$T=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"],ge$n=["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"],M$S=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"];function o$P(e,t){for(var i=t.length;i--;)"string"==typeof t[i]&&(t[i]=t[i].toLowerCase()),e[t[i]]=!0;return e}function ye$j(e){var t={},i=void 0;for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}var We$h=/\{\{[\s\S]*|[\s\S]*\}\}/gm,Be$i=/<%[\s\S]*|[\s\S]*%>/gm,Ge$d=/^data-[\-\w.\u00B7-\uFFFF]/,$e$9=/^aria-[\-\w]+$/,qe$c=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,Ve$e=/^(?:\w+script|data):/i,Xe$9=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,x$V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function c$O(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var Ye$c=function(){return typeof window>"u"?null:window};function Ee$l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ye$c(),t=function(e){return Ee$l(e)};if(t.version="1.0.8",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var i=e.document,n=!1,r=!1,o=e.document,a=e.DocumentFragment,s=e.HTMLTemplateElement,l=e.Node,u=e.NodeFilter,c=e.NamedNodeMap,h=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,d=e.Text,f=e.Comment,p=e.DOMParser;if("function"==typeof s){var _=o.createElement("template");_.content&&_.content.ownerDocument&&(o=_.content.ownerDocument)}var m=o,g=m.implementation,x=m.createNodeIterator,v=m.getElementsByTagName,y=m.createDocumentFragment,$=i.importNode,b={};t.isSupported=g&&typeof g.createHTMLDocument<"u"&&9!==o.documentMode;var T=We$h,C=Be$i,S=Ge$d,w=$e$9,E=Ve$e,P=Xe$9,A=qe$c,L=null,M=o$P({},[].concat(c$O(ce$p),c$O(ve$m),c$O(he$o),c$O(Te$k),c$O(Ae$n))),R=null,O=o$P({},[].concat(c$O(_e$p),c$O(q$T),c$O(ge$n),c$O(M$S))),I=null,D=null,B=!0,N=!0,F=!1,U=!1,G=!1,z=!1,V=!1,k=!1,W=!1,H=!1,q=!1,j=!0,Y=!0,X=!1,K={},Q=o$P({},["audio","head","math","script","style","template","svg","video"]),Z=o$P({},["audio","video","img","source","image"]),J=o$P({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ee=null,te=o.createElement("form"),ie=function(e){"object"!==(typeof e>"u"?"undefined":x$V(e))&&(e={}),L="ALLOWED_TAGS"in e?o$P({},e.ALLOWED_TAGS):M,R="ALLOWED_ATTR"in e?o$P({},e.ALLOWED_ATTR):O,I="FORBID_TAGS"in e?o$P({},e.FORBID_TAGS):{},D="FORBID_ATTR"in e?o$P({},e.FORBID_ATTR):{},K="USE_PROFILES"in e&&e.USE_PROFILES,B=!1!==e.ALLOW_ARIA_ATTR,N=!1!==e.ALLOW_DATA_ATTR,F=e.ALLOW_UNKNOWN_PROTOCOLS||!1,U=e.SAFE_FOR_JQUERY||!1,G=e.SAFE_FOR_TEMPLATES||!1,z=e.WHOLE_DOCUMENT||!1,W=e.RETURN_DOM||!1,H=e.RETURN_DOM_FRAGMENT||!1,q=e.RETURN_DOM_IMPORT||!1,k=e.FORCE_BODY||!1,j=!1!==e.SANITIZE_DOM,Y=!1!==e.KEEP_CONTENT,X=e.IN_PLACE||!1,A=e.ALLOWED_URI_REGEXP||A,G&&(N=!1),H&&(W=!0),K&&(L=o$P({},[].concat(c$O(Ae$n))),R=[],!0===K.html&&(o$P(L,ce$p),o$P(R,_e$p)),!0===K.svg&&(o$P(L,ve$m),o$P(R,q$T),o$P(R,M$S)),!0===K.svgFilters&&(o$P(L,he$o),o$P(R,q$T),o$P(R,M$S)),!0===K.mathMl&&(o$P(L,Te$k),o$P(R,ge$n),o$P(R,M$S))),e.ADD_TAGS&&(L===M&&(L=ye$j(L)),o$P(L,e.ADD_TAGS)),e.ADD_ATTR&&(R===O&&(R=ye$j(R)),o$P(R,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&o$P(J,e.ADD_URI_SAFE_ATTR),Y&&(L["#text"]=!0),z&&o$P(L,["html","head","body"]),L.table&&o$P(L,["tbody"]),Object&&"freeze"in Object&&Object.freeze(e),ee=e},ne=function(e){t.removed.push({element:e});try{e.parentNode.removeChild(e)}catch{e.outerHTML=""}},re=function(e,i){try{t.removed.push({attribute:i.getAttributeNode(e),from:i})}catch{t.removed.push({attribute:null,from:i})}i.removeAttribute(e)},oe=function(e){var t=void 0,i=void 0;if(k)e="<remove></remove>"+e;else{var a=e.match(/^[\s]+/);(i=a&&a[0])&&(e=e.slice(i.length))}if(n)try{t=(new p).parseFromString(e,"text/html")}catch{}if(r&&o$P(I,["title"]),!t||!t.documentElement){var s=(t=g.createHTMLDocument("")).body;s.parentNode.removeChild(s.parentNode.firstElementChild),s.outerHTML=e}return i&&t.body.insertBefore(o.createTextNode(i),t.body.childNodes[0]||null),v.call(t,z?"html":"body")[0]};t.isSupported&&(function(){try{oe('<svg><p><style><img src="</style><img src=x onerror=alert(1)//">').querySelector("svg img")&&(n=!0)}catch{}}(),function(){try{oe("<x/><title></title><img>").querySelector("title").textContent.match(/<\/title/)&&(r=!0)}catch{}}());var ae=function(e){return x.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},se=function(e){return!(e instanceof d||e instanceof f)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute)},le=function(e){return"object"===(typeof l>"u"?"undefined":x$V(l))?e instanceof l:e&&"object"===(typeof e>"u"?"undefined":x$V(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ue=function(e,i,n){!b[e]||b[e].forEach((function(e){e.call(t,i,n,ee)}))},ce=function(e){var i=void 0;if(ue("beforeSanitizeElements",e,null),se(e))return ne(e),!0;var n=e.nodeName.toLowerCase();if(ue("uponSanitizeElement",e,{tagName:n,allowedTags:L}),!L[n]||I[n]){if(Y&&!Q[n]&&"function"==typeof e.insertAdjacentHTML)try{e.insertAdjacentHTML("AfterEnd",e.innerHTML)}catch{}return ne(e),!0}return U&&!e.firstElementChild&&(!e.content||!e.content.firstElementChild)&&/</g.test(e.textContent)&&(t.removed.push({element:e.cloneNode()}),e.innerHTML?e.innerHTML=e.innerHTML.replace(/</g,"<"):e.innerHTML=e.textContent.replace(/</g,"<")),G&&3===e.nodeType&&(i=(i=(i=e.textContent).replace(T," ")).replace(C," "),e.textContent!==i&&(t.removed.push({element:e.cloneNode()}),e.textContent=i)),ue("afterSanitizeElements",e,null),!1},he=function(e,t,i){if(j&&("id"===t||"name"===t)&&(i in o||i in te))return!1;if(!(G&&(i=i.replace(T," "),i=i.replace(C," ")),N&&S.test(t)||B&&w.test(t))){if(!R[t]||D[t])return!1;if(!J[t]&&!A.test(i.replace(P,""))&&("src"!==t&&"xlink:href"!==t||"script"===e||0!==i.indexOf("data:")||!Z[e])&&(!F||E.test(i.replace(P,"")))&&i)return!1}return!0},de=function(e){var i=void 0,n=void 0,r=void 0,o=void 0,a=void 0;ue("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R};for(a=s.length;a--;){var u=i=s[a],c=u.name,h=u.namespaceURI;if(n=i.value.trim(),r=c.toLowerCase(),l.attrName=r,l.attrValue=n,l.keepAttr=!0,ue("uponSanitizeAttribute",e,l),n=l.attrValue,"name"===r&&"IMG"===e.nodeName&&s.id)o=s.id,s=Array.prototype.slice.apply(s),re("id",e),re(c,e),s.indexOf(o)>a&&e.setAttribute("id",o.value);else{if("INPUT"===e.nodeName&&"type"===r&&"file"===n&&(R[r]||!D[r]))continue;"id"===c&&e.setAttribute(c,""),re(c,e)}if(l.keepAttr){var d=e.nodeName.toLowerCase();if(he(d,r,n))try{h?e.setAttributeNS(h,c,n):e.setAttribute(c,n),t.removed.pop()}catch{}}}ue("afterSanitizeAttributes",e,null)}},fe=function e(t){var i=void 0,n=ae(t);for(ue("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)ue("uponSanitizeShadowNode",i,null),!ce(i)&&(i.content instanceof a&&e(i.content),de(i));ue("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(n,r){var o=void 0,s=void 0,u=void 0,c=void 0,h=void 0;if(n||(n="\x3c!--\x3e"),"string"!=typeof n&&!le(n)){if("function"!=typeof n.toString)throw new TypeError("toString is not a function");if("string"!=typeof(n=n.toString()))throw new TypeError("dirty is not a string, aborting")}if(!t.isSupported){if("object"===x$V(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof n)return e.toStaticHTML(n);if(le(n))return e.toStaticHTML(n.outerHTML)}return n}if(V||ie(r),t.removed=[],!X)if(n instanceof l)1===(s=(o=oe("\x3c!--\x3e")).ownerDocument.importNode(n,!0)).nodeType&&"BODY"===s.nodeName?o=s:o.appendChild(s);else{if(!W&&!z&&-1===n.indexOf("<"))return n;if(!(o=oe(n)))return W?null:""}o&&k&&ne(o.firstChild);for(var d=ae(X?n:o);u=d.nextNode();)3===u.nodeType&&u===c||ce(u)||(u.content instanceof a&&fe(u.content),de(u),c=u);if(X)return n;if(W){if(H)for(h=y.call(o.ownerDocument);o.firstChild;)h.appendChild(o.firstChild);else h=o;return q&&(h=$.call(i,h,!0)),h}return z?o.outerHTML:o.innerHTML},t.setConfig=function(e){ie(e),V=!0},t.clearConfig=function(){ee=null,V=!1},t.isValidAttribute=function(e,t,i){ee||ie({});var n=e.toLowerCase(),r=t.toLowerCase();return he(n,r,i)},t.addHook=function(e,t){"function"==typeof t&&(b[e]=b[e]||[],b[e].push(t))},t.removeHook=function(e){b[e]&&b[e].pop()},t.removeHooks=function(e){b[e]&&(b[e]=[])},t.removeAllHooks=function(){b={}},t}var je$d=Ee$l(),a$J=0,l$V={};function r$T(e,t){o$1q.typeOf.string("html",e);var i,n=e;e$2b(l$V[n])?i=l$V[n]:(i=a$J++,l$V[n]=i),t=u$_(t,!1),this._id=i,this._html=e,this._showOnScreen=t,this._element=void 0}function f$P(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.typeOf.object("options.clock",e.clock),o$1q.typeOf.object("options.times",e.times),o$1q.typeOf.func("options.requestImageFunction",e.requestImageFunction),o$1q.typeOf.func("options.reloadFunction",e.reloadFunction),this._tileCache={},this._tilesRequestedForInterval=[];var t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}function _$K(e,t,i){return e+"-"+t+"-"+i}function F$S(e){var t=e.split("-");if(3===t.length)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function k$M(e){var t=e._times;if(e$2b(t)){var i=e._clock,n=i.currentTime,r=i.canAnimate&&i.shouldAnimate,o=i.multiplier;if(r||0===o){var a,s=t.indexOf(n);if(!(s<0)){var l=t.get(s);return o>0?(a=a$15.secondsDifference(l.stop,n),++s):(a=a$15.secondsDifference(l.start,n),--s),a/=o,s>=0&&a<=5?t.get(s):void 0}}}}function I$_(e,t,i){var n=e._times.indexOf(i.start),r=e._tileCache,o=r[n];e$2b(o)||(o=r[n]={});var a=t.key;if(e$2b(o[a]))return!0;var s=F$S(a),l=new r$1b({throttle:!0,throttleByServer:!0,type:V$15.IMAGERY,priorityFunction:t.priorityFunction}),u=e._requestImageFunction(s.x,s.y,s.level,l,i);return!!e$2b(u)&&(o[a]={promise:u,request:l},!0)}function B$M(e){var t;(o$1q.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?t=o$1l.resolve(e):t=t$11.createIfNeeded(e).fetchArrayBuffer();if(e$2b(t))return t.then((function(e){if(e$2b(e))return U$M(e)}))}function U$M(e){var t=new DataView(e),i=0,n=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT,t.getUint32(i,!0),i+=Uint32Array.BYTES_PER_ELEMENT;var r=32===n?V$10.RGBA_DXT5:V$10.RGB_DXT1,o=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var a=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT,t.getUint32(i,!0),i+=Uint32Array.BYTES_PER_ELEMENT;var s=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var l=new Uint8Array(e,i,s),u=nt$9.inflate(l).buffer;return new e$1H(r,o,a,new Uint8Array(u))}Object.defineProperties(r$T.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen}},element:{get:function(){if(!e$2b(this._element)){var e=je$d.sanitize(this._html),t=document.createElement("div");t._creditId=this._id,t.style.display="inline",t.innerHTML=e;for(var i=t.querySelectorAll("a"),n=0;n<i.length;n++)i[n].setAttribute("target","_blank");this._element=t}return this._element}}}),r$T.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e._id===t._id},r$T.prototype.equals=function(e){return r$T.equals(this,e)},r$T.getIonCredit=function(e){var t=e$2b(e.collapsible)&&!e.collapsible,i=new r$T(e.html,t);return i._isIon=-1!==i.html.indexOf("logo.png"),i},r$T.clone=function(e){if(e$2b(e))return new r$T(e.html,e.showOnScreen)},Object.defineProperties(f$P.prototype,{clock:{get:function(){return this._clock},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}}),f$P.prototype.getFromCache=function(e,t,i,n){var r,o=_$K(e,t,i),a=this._tileCache[this._currentIntervalIndex];if(e$2b(a)&&e$2b(a[o])){var s=a[o];r=s.promise.otherwise((function(e){throw n.state=s.request.state,e})),delete a[o]}return r},f$P.prototype.checkApproachingInterval=function(e,t,i,n){var r=_$K(e,t,i),o=this._tilesRequestedForInterval,a=k$M(this),s={key:r,priorityFunction:n.priorityFunction};(!e$2b(a)||!I$_(this,s,a))&&o.push(s),o.length>=512&&o.splice(0,256)},f$P.prototype._clockOnTick=function(e){var t=e.currentTime,i=this._times.indexOf(t),n=this._currentIntervalIndex;if(i!==n){var r=this._tileCache[n];for(var o in r)r.hasOwnProperty(o)&&r[o].request.cancel();return delete this._tileCache[n],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,void this._reloadFunction()}var a=k$M(this);if(e$2b(a))for(var s=this._tilesRequestedForInterval,l=!0;l&&0!==s.length;){var u=s.pop();(l=I$_(this,u,a))||s.push(u)}};var Y$D=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function v$E(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url))throw new t$16("options.url is required.");if(!e$2b(e.layer))throw new t$16("options.layer is required.");if(!e$2b(e.style))throw new t$16("options.style is required.");if(!e$2b(e.tileMatrixSetID))throw new t$16("options.tileMatrixSetID is required.");if(e$2b(e.times)&&!e$2b(e.clock))throw new t$16("options.times was specified, so options.clock is required.");this._baseUrl=e.url;var t=t$11.createIfNeeded(e.url),i=e.style,n=e.tileMatrixSetID;if(t.url.indexOf("{")>=0){var r={style:i,Style:i,TileMatrixSet:n};t.setTemplateValues(r),this._useKvp=!1}else t.setQueryParameters(Y$D),this._useKvp=!0;this._resource=t,this._layer=e.layer,this._style=i,this._tileMatrixSetID=n,this._tileMatrixLabels=e.tileMatrixLabels,this._format=u$_(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=e$2b(e.tilingScheme)?e.tilingScheme:new c$R({ellipsoid:e.ellipsoid}),this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._minimumLevel=u$_(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=u$_(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;var o=this;this._reload=void 0;var a=this._baseUrl;this.tablename=this._layer,new l$15({name:a}).then((function(e){e.checkObjectStoreExit(o.tablename)?o._indexedDBScheduler=e:e.createObjectStore(o.tablename).then((function(){o._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){o._indexedDBScheduler.clear(o.tablename)},cache:[]},e$2b(e.times)&&(this._timeDynamicImagery=new f$P({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,n,r){return x$U(o,e,t,i,n,r)},reloadFunction:function(){e$2b(o._reload)&&o._reload()}})),this._readyPromise=o$1l.resolve(!0);var s=this._tilingScheme.positionToTileXY(h$18.southwest(this._rectangle),this._minimumLevel),l=this._tilingScheme.positionToTileXY(h$18.northeast(this._rectangle),this._minimumLevel);Math.abs(l.x-s.x),Math.abs(l.y-s.y),u$_(e.limitLevelZeroTilesCount,!0),this._errorEvent=new o$1h;var u=e.credit;this._credit="string"==typeof u?new r$T(u):u,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():e$2b(this._subdomains)&&this._subdomains.length>0?this._subdomains=this._subdomains.split(""):this._subdomains=["a","b","c"],this._customRequestHeaders=e.customRequestHeaders}function x$U(e,t,i,n,r,o){var a,s=e._tileMatrixLabels,l=e$2b(s)?s[n]:n.toString(),u=e._subdomains,c=e._dimensions,h=e$2b(o)?o.data:void 0;if(e._useKvp){var d={};d.tilematrix=l,d.layer=e._layer,d.style=e._style,d.tilerow=i,d.tilecol=t,d.tilematrixset=e._tileMatrixSetID,d.format=e._format,e$2b(c)&&(d=p$19(d,c)),e$2b(h)&&(d=p$19(d,h)),a=e._resource.getDerivedResource({queryParameters:d,request:r})}else{var f={TileMatrix:l,TileRow:i.toString(),TileCol:t.toString(),s:u[(t+i+n)%u.length]};(a=e._resource.getDerivedResource({request:r})).setTemplateValues(f),e$2b(c)&&a.setTemplateValues(c),e$2b(h)&&a.setTemplateValues(h)}return e$2b(a$O.CREDENTIAL)&&(e$2b(a$O.CREDENTIAL._keymap[e._baseUrl])?a.url=a$O.addTokenWithKey(e._baseUrl,a.url):a.url=a$O.addToken(a.url)),V$G(e,a)}function A$W(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(v$E.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},format:{get:function(){return this._format}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,e$2b(this._reload)&&this._reload())}}}),v$E.prototype.getTileCredits=function(e,t,i){},v$E.prototype.requestImage=function(e,t,i,n){var r,o,a=this._timeDynamicImagery;if(e$2b(a)&&(o=a.currentInterval,r=a.getFromCache(e,t,i,n)),n.quadKey=A$W(e,t,i),!0===this._indexedDBSetting.isOpen&&!e$2b(r)&&!0===n.cacheEnable){if(e$2b(this._indexedDBScheduler)){var s=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2b(s)?s.then((function(e){return e$2b(e)?e:"cacheError"}),(function(e){return"cacheError"})):x$U(this,e,t,i,n,o)}return x$U(this,e,t,i,n,o)}return e$2b(r)||(n.cacheEnable=!1,r=x$U(this,e,t,i,n,o)),e$2b(r)&&e$2b(a)&&a.checkApproachingInterval(e,t,i,n),r},v$E.prototype.pickFeatures=function(e,t,i,n,r){};var j$P=/\.ktx$/i,F$R=/\.crn$/i,N$I=/\.dxtz$/i;function V$G(e,t){o$1q.defined("url",t);var i=t$11.createIfNeeded(t);return j$P.test(i.url)?k$V(i):F$R.test(i.url)?a$P(i):N$I.test(i.url)?(e.flipY=!0,B$M(i)):e$2b(e.tileDiscardPolicy)?i.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(e$2b(e._customRequestHeaders)&&(i.headers=p$19(i.headers,e._customRequestHeaders)),!0===e._indexedDBSetting.isOpen?i.fetchBlob():i.fetchImage({preferImageBitmap:!0,flipY:!0}))}var W$R=new i$V("indexedDBWorker"),Ee$k=-1;function h$Q(e,t){this._imageryProvider=e,t=u$_(t,{}),this.alpha=u$_(t.alpha,u$_(e.defaultAlpha,1)),this.brightness=u$_(t.brightness,u$_(e.defaultBrightness,h$Q.DEFAULT_BRIGHTNESS)),this.contrast=u$_(t.contrast,u$_(e.defaultContrast,h$Q.DEFAULT_CONTRAST)),this.hue=u$_(t.hue,u$_(e.defaultHue,h$Q.DEFAULT_HUE)),this.saturation=u$_(t.saturation,u$_(e.defaultSaturation,h$Q.DEFAULT_SATURATION)),this.gamma=u$_(t.gamma,u$_(e.defaultGamma,h$Q.DEFAULT_GAMMA)),this.transparentBackColor=u$_(t.transparentBackColor,u$_(e.defaultTransparentBackColor,h$Q.DEFAULT_TRANSPARENTBACKCOLOR)),this.transparentBackColorTolerance=u$_(t.transparentBackColorTolerance,u$_(e.defaultTransparentBackColorTolerance,h$Q.DEFAULT_TRANSPARENTBACKCOLORTOLERANCE));var i=u$_(t.splitDirection,u$_(e.defaultSplit,h$Q.DEFAULT_SPLIT)),n=u$_(t.splitDirection,u$_(e.defaultSplit,h$Q.DEFAULT_SPLIT));this.splitDirection=new o$1o(i,n),this.minificationFilter=u$_(t.minificationFilter,u$_(e.defaultMinificationFilter,h$Q.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=u$_(t.magnificationFilter,u$_(e.defaultMagnificationFilter,h$Q.DEFAULT_MAGNIFICATION_FILTER)),this.show=u$_(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=u$_(t.rectangle,h$18.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new o$S(o$V.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this._visibleViewport=4095,this.colorToAlpha=t.colorToAlpha,this._selectColor=new e$1U(0,0,1,1),this.colorToAlphaThreshold=u$_(t.colorToAlphaThreshold,h$Q.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD),this._pausing=!1,e$2b(e._indexedDBSetting)?this._indexedDBSetting=e._indexedDBSetting:this._indexedDBSetting={isOpen:!1},this._imageCanvas={},this._swipeRegion=new e$29(0,0,1,1),this._swipeEnabled=!1,this._lodOffset=0,this._detailLevelOffset=0,this._featherEdgesEnabled=!1,this._minHeight=Number.NEGATIVE_INFINITY,this._maxHeight=1/0,this._inVisibleHeightRange=1,this.enableUpsample=!0,this.enableImageryClip=!1}Object.defineProperties(h$Q.prototype,{featherEdgesEnabled:{get:function(){return this._featherEdgesEnabled},set:function(e){e$2b(e)&&"boolean"==typeof e&&(this._featherEdgesEnabled=e)}},lodOffset:{get:function(){return this._lodOffset},set:function(e){e$2b(e)&&"number"==typeof e&&(this._lodOffset=e)}},imageryProvider:{get:function(){return this._imageryProvider}},rectangle:{get:function(){return this._rectangle}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){e$2b(e)&&"boolean"==typeof e.isOpen&&(this._indexedDBSetting.isOpen=e.isOpen)}},swipeRegion:{get:function(){return new f$18(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2b(e)){if(!(e instanceof f$18))throw new t$16("swipeRegion must be a instance of BoundingRectangle.");e$29.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?o$1o.fromElements(0,0,this.splitDirection):e$29.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e)}},minHeight:{get:function(){return this._minHeight},set:function(e){this._minHeight=e}},maxHeight:{get:function(){return this._maxHeight},set:function(e){return this._maxHeight=e}}}),h$Q.DEFAULT_BRIGHTNESS=1,h$Q.DEFAULT_CONTRAST=1,h$Q.DEFAULT_HUE=0,h$Q.DEFAULT_SATURATION=1,h$Q.DEFAULT_GAMMA=1,h$Q.DEFAULT_TRANSPARENTBACKCOLOR=e$1U.BLACK,h$Q.DEFAULT_TRANSPARENTBACKCOLORTOLERANCE=0,h$Q.DEFAULT_SPLIT=Xe$b.NONE,h$Q.DEFAULT_MINIFICATION_FILTER=tt$h.LINEAR,h$Q.DEFAULT_MAGNIFICATION_FILTER=rt$i.LINEAR,h$Q.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004,h$Q.prototype.isBaseLayer=function(){return this._isBaseLayer&&!e$2b(this._imageryProvider._scales)&&!e$2b(this._imageryProvider._useKvp)},h$Q.prototype.isDestroyed=function(){return!1},h$Q.prototype.destroy=function(){return i$10(this)};var Le$o=new h$18,Ae$m=new h$18,se$t=new h$18,xe$m=new h$18;function Re$j(e,t,i){if(e$2b(e._imageryProvider._indexedDBScheduler)){var n={blob:i,key:t.quadKey,tablename:e._imageryProvider.tablename,dbname:e._imageryProvider._indexedDBScheduler.dbname};W$R.scheduleTask(n,[])}}function ye$i(e,t,i,n,r){var o=new DataView(e),a=0,s=o.getUint32(a,!0);if(t>s-1||s>256)throw new t$16("pack imagery index invalid");a+=4;var l,u,c=[];for(l=0;l<s;l++)u=o.getUint32(a,!0),c.push(u),a+=4;for(l=0;l<s;l++){if(u=c[l],l===t){if(0===u)return void(!0===i._indexedDBSetting.isOpen&&Re$j(i,n,Ee$k));if(!e$2b(r)){var h=new Uint8Array(e,a,u);return new Uint8Array(h).buffer}return et$c({uint8Array:new Uint8Array(e,a,u),format:r,flipY:!0,layer:i,imagery:n})}a+=u}}h$Q.prototype.getViewableRectangle=function(){var e=this._imageryProvider,t=this._rectangle;return e.readyPromise.then((function(){return h$18.intersection(e.rectangle,t)}))},h$Q.prototype._createTileImagerySkeletons=function(e,t,i){var n=e.data;if(e$2b(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||e$2b(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;var r=this._imageryProvider;if(e$2b(i)||(i=n.imagery.length),!r.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),n.imagery.splice(i,0,this._skeletonPlaceholder),!0;var o=r.tilingScheme.projection instanceof t$O&&e.rectangle.north<t$O.MaximumLatitude&&e.rectangle.south>-t$O.MaximumLatitude,a=h$18.intersection(r.rectangle,this._rectangle,Le$o),s=h$18.intersection(e.rectangle,a,Ae$m);if(!e$2b(s)){if(!this.isBaseLayer())return!1;var l=a,u=e.rectangle;s=Ae$m,u.south>=l.north?s.north=s.south=l.north:u.north<=l.south?s.north=s.south=l.south:(s.south=Math.max(u.south,l.south),s.north=Math.min(u.north,l.north)),u.west>=l.east?s.west=s.east=l.east:u.east<=l.west?s.west=s.east=l.west:(s.west=Math.max(u.west,l.west),s.east=Math.min(u.east,l.east))}var c=0;s.south>0?c=s.south:s.north<0&&(c=s.north);var h=nt$7(this,1*t.getLevelMaximumGeometricError(e.level),c,e$2b(this._imageryProvider.resolution)?this._imageryProvider.resolution:1);h=Math.max(0,h);var d=r.maximumLevel;if(h>d&&(h=d),e$2b(r.minimumLevel)&&!(r instanceof I$10)){var f=r.minimumLevel;h<f&&(h=f)}var p=r.tilingScheme,_=p.positionToTileXY(h$18.northwest(s),h),m=p.positionToTileXY(h$18.southeast(s),h),g=e.rectangle.width/512,x=e.rectangle.height/512,v=p.tileXYToRectangle(_.x,_.y,h);Math.abs(v.south-e.rectangle.north)<x&&_.y<m.y&&++_.y,Math.abs(v.east-e.rectangle.west)<g&&_.x<m.x&&++_.x;var y=p.tileXYToRectangle(m.x,m.y,h);Math.abs(y.north-e.rectangle.south)<x&&m.y>_.y&&--m.y,Math.abs(y.west-e.rectangle.east)<g&&m.x>_.x&&--m.x,v.east<r.rectangle.west&&++_.x,v.south>r.rectangle.north&&++_.y,y.west>r.rectangle.east&&--m.x,y.north<r.rectangle.south&&--m.y;var $,b=h$18.clone(e.rectangle,xe$m),T=p.tileXYToRectangle(_.x,_.y,h),C=h$18.intersection(T,a,se$t);o?(p.rectangleToNativeRectangle(b,b),p.rectangleToNativeRectangle(T,T),p.rectangleToNativeRectangle(C,C),p.rectangleToNativeRectangle(a,a),$=p.tileXYToNativeRectangle.bind(p),g=b.width/512,x=b.height/512):$=p.tileXYToRectangle.bind(p);var S,w,E=0,P=1;!this.isBaseLayer()&&Math.abs(C.west-b.west)>=g&&(E=Math.min(1,(C.west-b.west)/b.width)),!this.isBaseLayer()&&Math.abs(C.north-b.north)>=x&&(P=Math.max(0,(C.north-b.south)/b.height));for(var A=P,L=u$_(this._imageryProvider.flipY,!1),M=_.x;M<=m.x;M++)if(S=E,T=$(M,_.y,h),e$2b(C=h$18.simpleIntersection(T,a,se$t))){E=Math.min(1,(C.east-b.west)/b.width),M===m.x&&(this.isBaseLayer()||Math.abs(C.east-b.east)<g)&&(E=1),P=A;for(var R=_.y;R<=m.y;R++)if(w=P,T=$(M,R,h),e$2b(C=h$18.simpleIntersection(T,a,se$t))){P=Math.max(0,(C.south-b.south)/b.height),R===m.y&&(this.isBaseLayer()||Math.abs(C.south-b.south)<x)&&(P=0);var O=new e$29(S,P,E,w),I=this.getImageryFromCache(M,R,h);if(n.imagery.splice(i,0,new o$S(I,O,o,L)),++i,this._imageryProvider.enableMorphing&&e$2b(I.mvtProvider)&&e$2b(I.parent)){var D=new o$S(this.getImageryFromCache(I.parent.x,I.parent.y,I.parent.level),O,o,L);D.morphingAlpha=.9,n.imagery.splice(i,0,D),++i}}}return!0},h$Q.prototype._calculateTextureTranslationAndScale=function(e,t){var i=t.readyImagery.rectangle,n=e.rectangle;if(t.useWebMercatorT){var r=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;i=r.rectangleToNativeRectangle(i,Le$o),n=r.rectangleToNativeRectangle(n,xe$m)}var o=n.width,a=n.height,s=o/i.width,l=a/i.height;return new e$29(s*(n.west-i.west)/o,l*(n.south-i.south)/a,s,l)};var Je$7=/\.dxtz/i;function be$o(e,t,i){var n=new DataView(e),r=0;n.getUint32(r,!0),r+=4;var o=n.getUint32(r,!0);r+=4;for(var a=t.col,s=t.row*t.blockSize+a,l=0,u=0,c=0;c<o;c++){if(c<s)l+=n.getUint32(r,!0);else if(c===s){u=n.getUint32(r,!0),r+=4;break}r+=4}if(r=8+4*o,0!==u){r+=l;var h=o$1l.defer(),d=t.url;return Je$7.test(d)?h.resolve($e$8(e,r,u)):w$Q({uint8Array:new Uint8Array(e,r,u),format:i,flipY:!0})}}function $e$8(e,t,i){var n=new DataView(e,t,i),r=0,o=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var a=32===o?V$10.RGBA_DXT5:V$10.RGB_DXT1,s=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var l=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var u=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var c=new Uint8Array(e,r+t,u),h=nt$9.inflate(c).buffer;return new e$1H(a,s,l,new Uint8Array(h))}function et$c(e){var t=e.uint8Array,i=e.format,n=e.request,r=u$_(e.flipY,!1),o=e.layer,a=e.imagery;o$1q.typeOf.object("uint8Array",t),o$1q.typeOf.string("format",i);var s,l=new Blob([t],{type:i});return!0===o._indexedDBSetting.isOpen&&Re$j(o,a,l),t$11.supportsImageBitmapOptions().then((function(e){return e?o$1l(t$11.createImageBitmapFromBlob(l,{flipY:r,premultiplyAlpha:!1})):new t$11({url:s=window.URL.createObjectURL(l),request:n}).fetchImage({flipY:r})})).then((function(e){return e$2b(s)&&window.URL.revokeObjectURL(s),e})).otherwise((function(e){return e$2b(s)&&window.URL.revokeObjectURL(s),o$1l.reject(e)}))}function tt$d(e,t){var i=document.createElement("canvas");i.getContext("bitmaprenderer").transferFromImageBitmap(e),i.toBlob(t)}function De$m(e,t){var i=e.slice(0),n=new Int8Array(i);for(var r=t.split("").map((function(e){return e.charCodeAt(0)})),o=0;o<r.length;o++)n[o]=n[o]^r[o];return n.buffer}var rt$d={webp:"image/webp",png:"image/png"};function Ie$i(e,t,i){return e+":"+t+":"+i}function ue$v(e,t,i){return JSON.stringify([e,t,i])}h$Q.prototype._requestImagery=function(e){var t=this._imageryProvider,i=this;function n(n){if(!e.isDestroyed()){if(!e$2b(n))return r();if(n===Ee$k)return void(e.state=wt$6.FAILED);if("cacheError"===n)return void o(!1);if(n instanceof ArrayBuffer&&e$2b(t._cacheKey)&&t._cacheKey.length>0&&e.request.type!==V$15.BLOCK){var a=De$m(n,t._cacheKey);n=e.request.type===V$15.PACK?a:new Blob([new Uint8Array(a,0,a.byteLength)],{type:t._fileExtension||"image/png"})}if(e.request.type!==V$15.PACK&&!n.mvt&&e.request.type!==V$15.BLOCK&&e.request.type!==V$15.BLOCKPACK){if(n instanceof Blob){if(!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2b(i._imageryProvider._indexedDBScheduler)){e.quadKey=e.request.quadKey;var s={blob:n,key:e.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};W$R.scheduleTask(s,[])}return void t$11.supportsImageBitmapOptions().then((function(t){if(t)t$11.createImageBitmapFromBlob(n,{flipY:!0,premultiplyAlpha:!1}).then((function(t){e.image=t,e.state=wt$6.RECEIVED,e.request=void 0,l$W.handleSuccess(i._requestImageError)}));else{var r=window.URL.createObjectURL(n);t$T(r,!1).then((function(e){return window.URL.revokeObjectURL(r),e}),(function(e){return window.URL.revokeObjectURL(r),o$1l.reject(e)})).then((function(t){e.image=t,e.state=wt$6.RECEIVED,e.request=void 0,l$W.handleSuccess(i._requestImageError)}))}}))}!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2b(i._imageryProvider._indexedDBScheduler)&&(e.quadKey=e.request.quadKey,createImageBitmap(n,{imageOrientation:"flipY",premultiplyAlpha:"none"}).then((function(t){tt$d(t,(function(t){var n={blob:t,key:e.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};W$R.scheduleTask(n,[])}))})))}var l=rt$d[t._fileExtension];if(e.request.type!==V$15.BLOCKPACK||n.mvt)if(e.request.type!==V$15.PACK||n.mvt)if(e.request.type===V$15.BLOCK){if(!e$2b((c=t.blockCache[e.request.quadKey]).data)&&(c.data=n,!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2b(i._imageryProvider._indexedDBScheduler))){s={blob:n.slice(0),key:e.request.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};W$R.scheduleTask(s,[])}t.blockCacheQueue.touch(c),t.blockCacheQueue.trim(t.blockCacheSize),e$2b(t._cacheKey)&&t._cacheKey.length>0&&(n=De$m(n,t._cacheKey)),e$2b(h=be$o(n,e.request.blockInfo,l))||(e.state=wt$6.FAILED),h.then((function(t){e.image=t,e.state=wt$6.RECEIVED})).otherwise((function(t){e.state=wt$6.FAILED}))}else e.image=n,e.state=wt$6.RECEIVED;else{if(n instanceof Blob&&e.request.cacheEnable&&!0===i._indexedDBSetting.isOpen)return void t$11.supportsImageBitmapOptions().then((function(t){if(t)t$11.createImageBitmapFromBlob(n,{flipY:!0,premultiplyAlpha:!1}).then((function(t){e.image=t,e.state=wt$6.RECEIVED,e.request=void 0,l$W.handleSuccess(i._requestImageError)}));else{var r=window.URL.createObjectURL(n);t$T(r,!1).then((function(e){return window.URL.revokeObjectURL(r),e}),(function(e){return window.URL.revokeObjectURL(r),o$1l.reject(e)})).then((function(t){e.image=t,e.state=wt$6.RECEIVED,e.request=void 0,l$W.handleSuccess(i._requestImageError)}))}}));e.quadKey=e.request.quadKey,l=u$_(l,"image/png");var u=ye$i(n,e.request.quadKeyIndex,i,e,l);if(!e$2b(u))return void(e.state=wt$6.FAILED);u.then((function(t){e.image=t,e.state=wt$6.RECEIVED})).otherwise((function(t){e.state=wt$6.FAILED}))}else if(!e$2b(e.request.quadKeyIndex)&&e$2b(e.request.blockRequest)&&(e.request.quadKeyIndex=e.request.blockRequest.quadKeyIndex),e$2b(e.request.quadKeyIndex)&&(n=ye$i(n,e.request.quadKeyIndex,i,e)),e$2b(n)){var c,h;if(!e$2b(c=t.blockCache[e.request.quadKey])&&(c=new e$1b(t,e.request.quadKey,n),t.blockCache[e.request.quadKey]=c,!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2b(i._imageryProvider._indexedDBScheduler))){var s={blob:n.slice(0),key:e.request.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:5};W$R.scheduleTask(s,[])}t.blockCacheQueue.touch(c),t.blockCacheQueue.trim(t.blockCacheSize),e$2b(h=be$o(n,e.request.blockInfo,l))||(e.state=wt$6.FAILED),h.then((function(t){e.image=t,e.state=wt$6.RECEIVED})).otherwise((function(t){e.state=wt$6.FAILED}))}else e.state=wt$6.FAILED;e.request=void 0,l$W.handleSuccess(i._requestImageError)}}function r(n){if(!e.isDestroyed()){if(e.request.state===W$1c.CANCELLED)return e.state=wt$6.UNLOADED,void(e.request=void 0);e.state=wt$6.FAILED,e.request=void 0;var r="Failed to obtain image tile X: "+e.x+" Y: "+e.y+" Level: "+e.level+".";i._requestImageError=l$W.handleError(i._requestImageError,t,t.errorEvent,r,e.x,e.y,e.level,o,n)}}function o(i){var o=new r$1b({throttle:!1,throttleByServer:!0,type:V$15.IMAGERY});o.cacheEnable=i,e.request=o,e.state=wt$6.TRANSITIONING;var a=t.requestImage(e.x,e.y,e.level,o,e.rectangle,e);if(!e$2b(a))return e.state=wt$6.UNLOADED,void(e.request=void 0);e$2b(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),e.beginRequestTime=performance.now(),o$1l(a,n,r)}o(!0)},h$Q.prototype._createTextureWebGL=function(e,t){var i=new e$1P({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),n=t.image;return e$2b(n.internalFormat)?new t$V({context:e,pixelFormat:n.internalFormat,width:n.width,height:n.height,source:{arrayBufferView:n.bufferView},sampler:i}):e$2b(n.mvt)?n.colorTexture:new t$V({context:e,source:n,pixelFormat:this._imageryProvider.hasAlphaChannel?V$10.RGBA:V$10.RGB,sampler:i})},h$Q.prototype._createTexture=function(e,t,i){var n=this._imageryProvider,r=t.image;if(e$2b(n.tileDiscardPolicy)){var o=n.tileDiscardPolicy;if(e$2b(o)){if(!o.isReady())return void(t.state=wt$6.RECEIVED);if(o.shouldDiscardImage(r))return void(t.state=wt$6.INVALID)}}if(this.minificationFilter!==tt$h.NEAREST&&this.minificationFilter!==tt$h.LINEAR)throw new t$16("ImageryLayer minification filter must be NEAREST or LINEAR");var a=this._createTextureWebGL(e,t);e$2b(r.mvt)&&(t.isMvtTexture=!0,t.iconImageObjects=r.iconImageObjects,t.textObjects=r.textObjects,t.tile=r.tile,t.transform=r.transform,t.isRendered=!1),n.tilingScheme.projection instanceof t$O?t.textureWebMercator=a:t.texture=a,t.image=void 0,t.state=wt$6.TEXTURE_LOADED},h$Q.prototype._finalizeReprojectTexture=function(e,t){var i=this.minificationFilter,n=this.magnificationFilter;if(i===tt$h.LINEAR&&n===rt$i.LINEAR&&!V$10.isCompressedFormat(t.pixelFormat)&&e$2a.isPowerOfTwo(t.width)&&e$2a.isPowerOfTwo(t.height)){i=tt$h.LINEAR_MIPMAP_LINEAR;var r=e$1T.maximumTextureFilterAnisotropy,o=Math.min(r,u$_(this._maximumAnisotropy,r)),a=Ie$i(i,n,o),s=e.cache.imageryLayerMipmapSamplers;e$2b(s)||(s={},e.cache.imageryLayerMipmapSamplers=s);var l=s[a];e$2b(l)||(l=s[a]=new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n,maximumAnisotropy:o})),t.generateMipmap(I$1e.NICEST),t.sampler=l,t.samplerKey=a}else{var u=Ie$i(i,n,0),c=e.cache.imageryLayerNonMipmapSamplers;e$2b(c)||(c={},e.cache.imageryLayerNonMipmapSamplers=c);var h=c[u];e$2b(h)||(h=c[u]=new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n})),t.sampler=h,t.samplerKey=u}},h$Q.prototype._reprojectTexture=function(e,t,i){var n=t.textureWebMercator||t.texture,r=t.rectangle,o=e.context;if((i=u$_(i,!0))&&!(this._imageryProvider.tilingScheme.projection instanceof n$1b)&&r.width/n.width>1e-5){var a=this;t.addReference();var s=new t$I({name:"imageReprojectTexture",persists:!0,owner:this,preExecute:function(e){at$a(e,o,n,t.rectangle)},postExecute:function(e){o.webgpu&&o.engine.flushFramebuffer(),t.texture=e,a._finalizeReprojectTexture(o,e),t.state=wt$6.READY,t.releaseReference()}});this._reprojectComputeCommands.push(s)}else i&&(t.texture=n),this._finalizeReprojectTexture(o,n),t.state=wt$6.READY},h$Q.prototype.queueReprojectionCommands=function(e){for(var t=this._reprojectComputeCommands,i=t.length,n=0;n<i;++n)e.commandList.push(t[n]);t.length=0},h$Q.prototype.cancelReprojections=function(){this._reprojectComputeCommands.length=0},h$Q.prototype.getImageryFromCache=function(e,t,i,n){var r=ue$v(e,t,i),o=this._imageryCache[r];return e$2b(o)||(o=this._imageryProvider instanceof I$10?new _0x4276c1(this,e,t,i,n):new o$V(this,e,t,i,n),this._imageryCache[r]=o),o.addReference(),o},h$Q.prototype.getReadyImageryFromCache=function(e,t,i){for(var n=void 0,r=i;r>0&&!e$2b(n);){r--;var o=ue$v(e,t,i);e$2b(n=this._imageryCache[o])&&n.state!=wt$6.READY&&(n=void 0)}return n},h$Q.prototype.removeImageryFromCache=function(e){var t=ue$v(e.x,e.y,e.level);delete this._imageryCache[t]};var te$w={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new o$1o,texture:void 0},it$7=s$Y.supportsTypedArrays()?new Float32Array(128):void 0;function at$a(e,t,i,n){var r=t.cache.imageryLayer_reproject;if(!e$2b(r)){r=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){e$2b(this.framebuffer)&&this.framebuffer.destroy(),e$2b(this.vertexArray)&&this.vertexArray.destroy(),e$2b(this.shaderProgram)&&this.shaderProgram.destroy()}};for(var o=new Float32Array(256),a=0,s=0;s<64;++s){var l=s/63;o[a++]=0,o[a++]=l,o[a++]=1,o[a++]=l}var u={position:0,webMercatorT:1},c=I$12.getRegularGridIndicesForReproject(2,64),h=t$Y.createIndexBuffer({context:t,typedArray:c,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});r.vertexArray=new c$12({context:t,attributes:[{name:"position",index:u.position,vertexBuffer:t$Y.createVertexBuffer({context:t,typedArray:o,usage:A$19.STATIC_DRAW}),componentsPerAttribute:2},{name:"webMercatorT",index:u.webMercatorT,vertexBuffer:t$Y.createVertexBuffer({context:t,sizeInBytes:512,usage:A$19.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:h});var d=new s$U({sources:[je$f]});r.shaderProgram=r$13.fromCache({name:"ReprojectWebMercator",context:t,vertexShaderSource:d,fragmentShaderSource:Ve$i,attributeLocations:u}),r.sampler=new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}i.sampler=r.sampler;var f=i.width,p=i.height;te$w.textureDimensions.x=f,te$w.textureDimensions.y=p,te$w.texture=i;var _=Math.sin(n.south),m=.5*Math.log((1+_)/(1-_));_=Math.sin(n.north);var g=1/(.5*Math.log((1+_)/(1-_))-m),x=new t$V({context:t,width:f,height:p,pixelFormat:t.webgpu&&i.pixelFormat===V$10.RGB?V$10.RGBA:i.pixelFormat,pixelDatatype:i.pixelDatatype,preMultiplyAlpha:i.preMultiplyAlpha,generateMipmap:e$2a.isPowerOfTwo(f)&&e$2a.isPowerOfTwo(p)});e$2a.isPowerOfTwo(f)&&e$2a.isPowerOfTwo(p)&&x.generateMipmap(I$1e.NICEST);for(var v=n.south,y=n.north,$=it$7,b=0,T=0;T<64;++T){var C=T/63,S=e$2a.lerp(v,y,C);_=Math.sin(S);var w=(.5*Math.log((1+_)/(1-_))-m)*g;$[b++]=w,$[b++]=w}r.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView($),e.shaderProgram=r.shaderProgram,e.outputTexture=x,e.uniformMap=te$w,e.vertexArray=r.vertexArray}function nt$7(e,t,i,n){var r=e._imageryProvider,o=r.tilingScheme,a=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof n$1b?1:Math.cos(i),l=o.rectangle,u=o.getNumberOfXTilesAtLevel(0);e$2b(o._suggest)&&o._suggest?u=o._numberOfLevelZeroTilesX:0!==e._lodOffset&&(e._lodOffset>0?u/=1<<Math.floor(e._lodOffset):u*=1<<Math.floor(-e._lodOffset));var c=l.width,h=a.maximumRadius*c*s/(r.tileWidth*u/n);if(e$2b(o._scaleDenominators)&&o._scaleDenominators.length>0){var d;d=o.tileXYToRectangle(0,0,0,d);var f=o.getNumberOfXTilesAtLevel(0)*d.width;h=a.maximumRadius*c*s/(c/f*r.tileWidth*u/n)}var p=h/t,_=Math.log(p)/Math.log(2);return 0|Math.round(_)}h$Q.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},h$Q.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},h$Q.prototype.saveLocalCache=function(){if(!0===this._indexedDBSetting.isOpen&&e$2b(this._imageryProvider._indexedDBScheduler)){var e={tablename:this._imageryProvider.tablename,dbname:this._imageryProvider._indexedDBScheduler.dbname};W$R.scheduleTask(e,[])}};var A$V=void 0,b$$=void 0;h$Q.prototype.getImagery=function(e,t){var i=1;e$2b(t)&&(i<<=t);var n=[],r=this._imageryProvider;if(e$2b(b$$)||(b$$=new h$18),!e$2b(e)||(b$$.west=e.min.longitude,b$$.south=e.min.latitude,b$$.east=e.max.longitude,b$$.north=e.max.latitude,!e$2b(h$18.intersection(r.rectangle,b$$))))return n;var o,a,s=0,l=23;for(e$2b(r._maximumLevel)&&(l=r._maximumLevel);s<=l&&(o=r._tilingScheme.positionToTileXY(e.max,s),a=r._tilingScheme.positionToTileXY(e.min,s),e$2b(o)||(o=new o$1o(r._tilingScheme.getNumberOfXTilesAtLevel(s),0)),e$2b(a)||(a=new o$1o(0,r._tilingScheme.getNumberOfYTilesAtLevel(s))),s!==l&&(e$2b(A$V)||(A$V=new h$18),r._tilingScheme.tileXYToRectangle(a.x,a.y,s,A$V),!e$2b(A$V)||!(A$V.width*i<2*(e.max.longitude-e.min.longitude)||A$V.height*i<2*(e.max.latitude-e.min.latitude))));s++);for(var u=a.x;u<=o.x;u++)for(var c=a.y;c>=o.y;c--)e$2b(A$V)||(A$V=new h$18),r._tilingScheme.tileXYToRectangle(u,c,s,A$V),e$2b(h$18.intersection(A$V,r.rectangle))&&e$2b(h$18.intersection(A$V,b$$))&&n.push(this.getImageryFromCache(u,c,s));return n},h$Q.prototype.getMaxScaleLevel=function(e){var t=1,i=0,n=this._imageryProvider;if(e$2b(b$$)||(b$$=new h$18),b$$.west=e.min.longitude,b$$.south=e.min.latitude,b$$.east=e.max.longitude,b$$.north=e.max.latitude,!e$2b(h$18.intersection(n.rectangle,b$$)))return[];var r,o,a=0,s=23;for(e$2b(n._maximumLevel)&&(s=n._maximumLevel);a<=s&&(r=n._tilingScheme.positionToTileXY(e.max,a),o=n._tilingScheme.positionToTileXY(e.min,a),e$2b(r)||(r=new o$1o(n._tilingScheme.getNumberOfXTilesAtLevel(a),0)),e$2b(o)||(o=new o$1o(0,n._tilingScheme.getNumberOfYTilesAtLevel(a))),a!==s);a++)e$2b(A$V)||(A$V=new h$18),n._tilingScheme.tileXYToRectangle(o.x,o.y,a,A$V),e$2b(A$V)&&(A$V.width*t<2*(e.max.longitude-e.min.longitude)||A$V.height*t<2*(e.max.latitude-e.min.latitude))&&(i+=1,t*=2);return i},h$Q.prototype.refresh=function(){var e=this._imageryLayers;if(e$2b(e)){for(var t in this._imageryCache){var i=this._imageryCache[t];this.removeImageryFromCache(i)}var n=e.indexOf(this);e.remove(this,!1,!0),e.add(this,n)}},h$Q.prototype.setLayerStatusParameters=function(e){var t=o$1l.defer();return this._imageryProvider.setLayerStatusParameters(e).then((e=>{this.refresh(),t.resolve(e)})).otherwise((e=>{t.reject(e)})),t.promise};var _0x1c15fe=(_0x413897=!0,function(e,t){var i=_0x413897?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x413897=!1,i}),_0x589240=_0x1c15fe(void 0,(function(){return _0x589240.toString().search("(((.+)+)+)+$").toString().constructor(_0x589240).search("(((.+)+)+)+$")})),_0x413897;_0x589240();var _0x43f264=null,_0xb4f2cc=null;function _0x215208(){}null!==_0x1c5342&&(_0x43f264=_0x1c5342.cwrap("floatToTextureColor","number",["number","number","number","number","number","number","number"]),_0xb4f2cc=_0x1c5342.cwrap("free_result",null,["number"]));var _0x4974f4=new s$S;function _0x503312(e,t){for(var i=new Uint8Array(4*e.length),n=t._ceiling-t._floor,r=0,o=e.length;r<o;r++){var a=e[r],s=4*r;if(a<0||a>1)i[s+0]=255,i[s+1]=255,i[s+2]=255,i[s+3]=255;else{a=a*n+t._floor;var l=t._dictColorTable.getColor(a);i[s+0]=255*l.red,i[s+1]=255*l.green,i[s+2]=255*l.blue,i[s+3]=255*l.alpha}}return i}function _0x2e9bb5(e,t){var i=e,n=i.length,r=_0x1c5342._malloc(Float32Array.BYTES_PER_ELEMENT*n);_0x1c5342.HEAPF32.set(i,r/Float32Array.BYTES_PER_ELEMENT);var o=t._ceiling,a=t._floor,s=t._dictColorTable._dictTable._hash,l=[],u=[];for(var c in s)l.push(parseFloat(c));l.sort((function(e,t){return e-t}));for(var h=0,d=l.length;h<d;h++)u.push(s[l[h]]);var f=new ArrayBuffer(4*l.length),p=new Uint8Array(f),_=0;for(d=l.length;_<d;_++){var m=u[_];p[4*_]=255*m.red,p[4*_+1]=255*m.green,p[4*_+2]=255*m.blue,p[4*_+3]=255*m.alpha}var g=new Float32Array(f),x=(c=new Float32Array(l)).length,v=_0x1c5342._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x1c5342.HEAPF32.set(c,v/Float32Array.BYTES_PER_ELEMENT);var y=_0x1c5342._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x1c5342.HEAPF32.set(g,y/Float32Array.BYTES_PER_ELEMENT);var $=_0x43f264(r,n,o,a,v,y,x),b=new Uint8Array(_0x1c5342.HEAPU8.buffer,$,4*n);return _0xb4f2cc($),_0x1c5342._free(r),_0x1c5342._free(v),_0x1c5342._free(y),b}function _0x10a17c(e,t){var i=e.length/4;return _0x2e9bb5(new Float32Array(e.buffer,e.byteOffset,i),t)}function _0xd080bd(e,t){for(var i=e.length/4,n=new Float32Array(e.buffer,e.byteOffset,i),r=0;r<n.length;r++){var o=n[r],a=4*r;if(o<0||o>1)e[a+0]=255,e[a+1]=255,e[a+2]=255,e[a+3]=255;else{o=o*(t._ceiling-t._floor)+t._floor;var s=t._dictColorTable.getColor(o);e[a+0]=255*s.red,e[a+1]=255*s.green,e[a+2]=255*s.blue,e[a+3]=255*s.alpha}}return new Uint8Array(e.buffer,0,e.length)}function _0x2213ff(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function _0x2b64db(e,t,i){for(var n=new Uint8Array(4*e.length),r=0;r<e.length;r++){var o,a,s,l,u=e[r],c=4*r,h=new e$29(0,0,0,0);if(u>=0&&u<=1){var d=_0x2213ff(u);h.x=d.x,h.y=d.y,h.z=d.z,h.w=1}o=255*h.x,a=255*h.y,s=255*h.z,l=255*h.w,e$2b(i)&&!0===i?(n[c+0]=parseInt(s),n[c+1]=parseInt(a),n[c+2]=parseInt(o),n[c+3]=parseInt(l)):(n[c+0]=parseInt(o),n[c+1]=parseInt(a),n[c+2]=parseInt(s),n[c+3]=parseInt(l))}return n}function _0x4f368d(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a,s,l,u,c=r[o],h=4*o,d=new e$29(0,0,0,0);if(c>=0&&c<=1){c<e$2a.EPSILON9?c=e$2a.EPSILON9:1-c<e$2a.EPSILON9&&(c=1-e$2a.EPSILON9);var f=_0x2213ff(c);d.x=f.x,d.y=f.y,d.z=f.z,d.w=1}a=255*d.x,s=255*d.y,l=255*d.z,u=255*d.w,e$2b(i)&&!0===i?(e[h+0]=l,e[h+1]=s,e[h+2]=a,e[h+3]=u):(e[h+0]=a,e[h+1]=s,e[h+2]=l,e[h+3]=u)}return new Uint8Array(e.buffer,0,e.length)}function _0x73ec9a(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(e$2b(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function _0x444666(e,t,i){if(!e$2b(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];e$2b(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function _0x1af293(e,t,i){var n=_0x73ec9a(e,t,i);if(e$2b(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function _0x4956cc(e,t,i){var n=_0x73ec9a(e,t,i);if(e$2b(n))return n.textContent.trim()}function _0x134561(e,t,i){var n=_0x73ec9a(e,t,i);if(e$2b(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function _0x4a7e5e(e,t,i,n){var r=p$1d.multiply(t,i,new p$1d),o=e.vertexAttributes[0],a=o.typedArray,s=new Float32Array(a.buffer,a.byteOffset,a.byteLength/4),l=o.componentsPerAttribute,u=e.verticesCount,c=new Float32Array(3*u),h=e.attrLocation;h.aRatio=Object.keys(h).length;for(var d=0;d<u;d++){var f=new o$1p(s[d*l],s[d*l+1],s[d*l+2]),p=new o$1p;p$1d.multiplyByPoint(r,f,p);var _=a$18.fromCartesian(p),m=e$2a.toDegrees(_.longitude),g=e$2a.toDegrees(_.latitude),x=_.height,v=(m-n.left)/n.width,y=(g-n.bottom)/n.length,$=(x-n.minHeight)/n.height;c[3*d]=v,c[3*d+1]=y,c[3*d+2]=$}e.vertexAttributes.push({index:h.aRatio,typedArray:c,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0x48a6ae(e,t){for(var i=[],n=Math.max(t.max.longitude-t.min.longitude,t.max.latitude-t.min.latitude),r=0,o=Math.PI;r<23&&!(n>o);)o*=.5,r++;r--;var a=e,s=a._imageryProvider;e instanceof i$O&&(s=a._provider,a=a._inner);var l=new g$13,u=l.positionToTileXY(t.max,r),c=l.positionToTileXY(t.min,r);if(!e$2b(s._minimumLevel)||r>s._minimumLevel){var h=s._maximumLevel;if(e instanceof i$O&&h--,e$2b(h)){var d=r-h;d>0&&(c.x=Math.floor(c.x/Math.pow(2,d)),c.y=Math.floor(c.y/Math.pow(2,d)),u.x=Math.floor(u.x/Math.pow(2,d)),u.y=Math.floor(u.y/Math.pow(2,d)),r=h)}for(var f=c.x;f<=u.x;f++)for(var p=c.y;p>=u.y;p--)i.push(a.getImageryFromCache(f,p,r))}return i}_0x215208.convertFloat=function(e,t,i){i===k$Q.FilterMode.NEAREST?null===_0x43f264?_0xd080bd(e.imageArray,t):e.imageArray=_0x10a17c(e.imageArray,t):_0x4f368d(e.imageArray)},_0x215208.convertFloatTexture=function(e,t,i){return i===k$Q.FilterMode.LINEAR?_0x2b64db(e.imageArray,t,!0):null===_0x43f264?_0x503312(e.imageArray,t):_0x2e9bb5(e.imageArray,t)},_0x215208.parseResult=function(e,t,i,n){if(i.isDestroyed())return i.s3mBuffer=null,i.volBuffer=null,void(i.task=void 0);var r=i._fileName.split("_"),o=parseInt(r[1]),a=parseInt(r[2]);o=Math.pow(2,t._level)-o-1,t._version=e.version;for(var s=t._gl,l=_0x4974f4.read(e.xmlDoc).firstChild,u=l.namespaceURI,c=_0x444666(_0x73ec9a(l,"Material3Ds",u),"material",u),h={},d=[],f=t._context,p=0,_=c.length;p<_;p++){var m=c[p],g=_0x4956cc(m,"name",u),x=new _0x21d1b1({});h[g]=x;var v=_0x73ec9a(m,"Ambient",u),y=u$_(_0x1af293(v,"AmbientR",u),_0x1af293(v,"R",u)),$=u$_(_0x1af293(v,"AmbientG",u),_0x1af293(v,"G",u)),b=u$_(_0x1af293(v,"AmbientB",u),_0x1af293(v,"B",u)),T=u$_(_0x1af293(v,"AmbientA",u),_0x1af293(v,"A",u));x._ambientColor=new e$1U(y,$,b,T);var C=_0x73ec9a(m,"Diffuse",u);y=u$_(_0x1af293(C,"DiffuseR",u),_0x1af293(C,"R",u)),$=u$_(_0x1af293(C,"DiffuseG",u),_0x1af293(C,"G",u)),b=u$_(_0x1af293(C,"DiffuseB",u),_0x1af293(C,"B",u)),T=u$_(_0x1af293(C,"DiffuseA",u),_0x1af293(C,"A",u)),x._diffuseColor=new e$1U(y,$,b,T);var S=_0x73ec9a(m,"Specular",u);y=u$_(_0x1af293(S,"SpecularR",u),_0x1af293(S,"R",u)),$=u$_(_0x1af293(S,"SpecularG",u),_0x1af293(S,"G",u)),b=u$_(_0x1af293(S,"SpecularB",u),_0x1af293(S,"B",u)),T=u$_(_0x1af293(S,"SpecularA",u),_0x1af293(S,"A",u)),x._specularColor=new e$1U(y,$,b,T);var w=_0x1af293(m,"Shininess",u);x._shininess=w,x._bTransparentSorting=_0x134561(m,"TransparentSorting",u);var E=_0x444666(m,"texture",u);0===E.length&&t._fileType===d$15.OSGBFile&&(x._isInvalidOblique=!0);for(var P=0;P<E.length;P++){var A=E[P],L=_0x4956cc(A,"name",u),M=_0x4956cc(A,"TextureName",u),R=_0x73ec9a(A,"AddressMode",u),O=_0x4956cc(R,"u",u),I=_0x4956cc(R,"v",u);O="TAM_WRAP"===O?q$19.REPEAT:q$19.CLAMP_TO_EDGE,I="TAM_WRAP"===I?q$19.REPEAT:q$19.CLAMP_TO_EDGE;for(var D=_0x4956cc(A,"TexModMatrix",u).split(","),B=16;B--;)D[B]=parseFloat(D[B]);x._texMatrix=p$1d.unpack(D);var N=e.texturePackage[L],F=L+t._id+f._id+i._relativePath.path;if(e$2b(N)&&(F+=N.imageBuffer.length),e$2b(N)&&N.width>0&&N.height>0&&e$2b(N.imageBuffer)&&N.imageBuffer.byteLength>0)switch(0===N.compressType&&(t._supportCompressType=0),i._texturesByteLength+=N.imageBuffer.length,N.compressType){case _0x3dfacd.WEBP:var U=x.createWebp(F,M,f,P,N.imageBuffer,N.width,N.height,t.mipmapEnabled);d.push(U),x._isWEBP=!0;break;case _0x3dfacd.CRN_DXT5:var G=x.createCRN(F,M,f,P,N,O,I,t.mipmapEnabled);d.push(G);break;default:var z=Se$d.CreateTexture(F,f,N.width,N.height,N.nFormat,N.compressType,N.imageBuffer,!1,O,I,t.mipmapEnabled);x._textures.push(z)}else if(t._isTextureShare){var V=t._baseUri+"Texture/"+M;e$2b(a$O.CREDENTIAL)&&(V=a$O.addToken(V));var k=x.requestSharedTexture(V,L,M,f,P,t.customRequestHeaders,O,I);d.push(k)}if("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt){var W=L+"_"+i._fileName;W=""!==t._volName?W+"_"+t._volName:W,"vol_texture_mapping"===t._strVolumeExt?W+=".vol":W+=".png";var H=i._relativePath.resolve(t._baseUri)+W;if(0!=t.urlType){var q=t._urlArguments,j=H.indexOf("datas")+5,Y=q.layer3DName,X=H.substring(H.indexOf("/path/")+6).split("/"),K=q.scene3DName,Q=X[0],Z=X[1].substring(0,X[1].indexOf(".")),J=X[1].substring(X[1].indexOf(".")+1,X[1].length);H=H.substring(0,j)+"?layerName="+Y+"&rootTile="+Q+"&tile="+Z+"&suffix="+J+"&scene3DName="+K+"&layer3DName="+Y}var ee=void 0;"vol_texture_mapping"===t._strVolumeExt?e$2b(ee=o$10(H,void 0))&&function(e,n,r){e.then((function(e){var o;if(e$2b(e)){var a=void 0,s=new Uint8Array(e,8),l=nt$9.inflate(s).buffer;if(1===new Float64Array(l,0,1)[0]){var u=new Uint32Array(l,8,4),c=u[0],h=u[1],d=u[2];a={nFormat:c,nWidth:h,nHeight:d,nPixelSize:u[3],imageArray:new Float32Array(l,24,h*d)}}if(e$2b(a)){var f,p=tt$h.LINEAR,_=rt$i.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(p=tt$h.NEAREST,_=rt$i.NEAREST),f=t._hypsometricSetting.filterMode===k$Q.FilterMode.LINEAR?_0x2b64db(a.imageArray,t._hypsometricSetting,!0):null===_0x43f264?_0x503312(a.imageArray,t._hypsometricSetting):_0x2e9bb5(a.imageArray,t._hypsometricSetting),(o=new t$V({context:t._context,width:a.nWidth,height:a.nHeight,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({minificationFilter:p,magnificationFilter:_})})).copyFrom({width:a.nWidth,height:a.nHeight,arrayBufferView:f}),i._volTextures[n]=o,r.texID2Vol=n}e=null}}),(function(e){}))}(ee,F,x):"png"===t._strVolumeExt&&(e$2b(ee=t$T(H))&&function(e,n,r){e.then((function(e){var o;if(e$2b(e)){var a,s=tt$h.LINEAR,l=rt$i.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(s=tt$h.NEAREST,l=rt$i.NEAREST),a=t._hypsometricSetting.filterMode===k$Q.FilterMode.LINEAR?_0x4f368d(d$13(e),t._hypsometricSetting,!0):null===_0x43f264?_0xd080bd(d$13(e),t._hypsometricSetting):_0x10a17c(d$13(e),t._hypsometricSetting),(o=new t$V({context:t._context,width:e.width,height:e.height,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({minificationFilter:s,magnificationFilter:l})})).copyFrom({width:e.width,height:e.height,arrayBufferView:a}),e=null,i._volTextures[n]=o,r.texID2Vol=n}}),(function(e){}))}(ee,F,x)),d.push(ee)}}}o$1l.all(d,(function(){var n,r;if(e$2b(t._volData)){n=t._volData._volBounds;var c=t._context._id+"_"+t.id+"_layerVol",d=k$Q.FilterMode.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(d=k$Q.FilterMode.NEAREST),e$2b(t._hypsometricSetting)&&e$2b(t._volData._buffer)&&(d===k$Q.FilterMode.NEAREST?null===_0x43f264?_0xd080bd(t._volData._buffer,t._hypsometricSetting):t._volData._buffer=_0x10a17c(t._volData._buffer,t._hypsometricSetting):_0x4f368d(t._volData._buffer,t._hypsometricSetting));var f={};f.nLength=t._volData._nLength,f.imageArray=t._volData._buffer;var p=Se$d.CreateVolumeTexture(c,s,t._context,f,d);delete t._volData._buffer,t._volData._buffer=void 0,r={volTexture:p,nFormat:3201,nSideBlockCount:t._volData._nSideBlockCount,nBlockLength:t._volData._nBlockLength,nLength:t._volData._nLength,nWidth:t._volData._width,nHeight:t._volData._height,nDepth:t._volData._depth,id:c,dataFloor:t._volData._minValue,dataCeil:t._volData._maxValue,volBounds:n},i._volObj=r}else if("vol"===t._strVolumeExt)if(e.volImageBuffer){n=e.volBounds;c=t._context._id+"_"+t.id+"_"+i._relativePath.resolve(t._baseUri)+"_"+i._fileName,d=k$Q.FilterMode.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(d=k$Q.FilterMode.NEAREST),3201===e.volImageBuffer.nFormat&&e$2b(t._hypsometricSetting)&&(d===k$Q.FilterMode.NEAREST?null===_0x43f264?_0xd080bd(e.volImageBuffer.imageArray,t._hypsometricSetting):e.volImageBuffer.imageArray=_0x10a17c(e.volImageBuffer.imageArray,t._hypsometricSetting):_0x4f368d(e.volImageBuffer.imageArray,t._hypsometricSetting)),r={volTexture:p=Se$d.CreateVolumeTexture(c,s,t._context,e.volImageBuffer,d),nFormat:e.volImageBuffer.nFormat,nSideBlockCount:e.volImageBuffer.nSideBlockCount,nBlockLength:e.volImageBuffer.nBlockLength,nLength:e.volImageBuffer.nLength,nWidth:e.volImageBuffer.nWidth,nHeight:e.volImageBuffer.nHeight,nDepth:e.volImageBuffer.nDepth,id:c,dataFloor:t._fMinValue,dataCeil:t._fMaxValue,volBounds:n},delete e.volImageBuffer.imageArray,e.volImageBuffer.imageArray=null,e$2b(i._volObj)&&Se$d.DecRef(i._volObj.id),i._volObj=r}else t._bVolume&&(e$2b(r=i._volObj)&&(n=i._volObj.volBounds));var _=_0x73ec9a(l,"PageLods",u),m=_0x444666(_,"PagedLOD",u),g=t._matModel;if(m.length>0){for(var x=0;x<m.length;x++){(re=new _0x46a5cb)._fileType=t._fileType;var v=m[x],y=_0x4956cc(v,"RangeDataList",u);y?y=y.replace(/.osgb$/,"").replace(/.s3m$/,""):i._isLeafTile=!0;var $=_0x4956cc(v,"RangeMode",u),b=_0x1af293(v,"RangeList",u),T=_0x73ec9a(v,"BoundingSphere",u),C=_0x1af293(T,"x",u),S=_0x1af293(T,"y",u),w=_0x1af293(T,"z",u),E=_0x1af293(T,"radius",u),P=new o$1p(C,S,w);re._rangeMode="DISTANCE_FROM_EYE_POINT"==$?_0x2056d1.DISTANCE_FROM_EYE_POINT:_0x2056d1.PIXEL_SIZE_ON_SCREEN,re._rangeDataList=y,0===re._rangeDataList.indexOf("Root")&&(re._processFileType=1),re._rangeList=b,re._boundingSphere=new i$1c(P,E),re._originalBS=new i$1c(P,E),i$1c.transform(re._boundingSphere,t._matModel,re._boundingSphere);for(var A=_0x444666(v,"Geode",u),L=[],M=[],R=0;R<A.length;R++){for(var O=_0x4956cc(ae=A[R],"GeoDeModMatrix",u).split(","),I=0;I<16;I++)O[I]=parseFloat(O[I]);if(O=p$1d.unpack(O),1===t._heightScale)se=p$1d.multiply(g,O,new p$1d);else{var D=p$1d.multiplyByScale(O,new o$1p(1,1,t._heightScale),new p$1d);se=p$1d.multiply(g,D,new p$1d)}for(var B=_0x444666(ae,"GeoName"),N=0;N<B.length;N++){var F=B[N].textContent.trim();if(!((ue=(le=e.geoPackage[F]).vertexPackage).verticesCount<1)){var U=le.arrIndexPackage,G=le.pickInfo,z={};for(R=0;R<U.length;R++){if(e$2b(ce=U[R])){var V=ce.materialCode,k=h[V],W=new _0x21d1b1({});e$2b(k)&&k.clone(W),z[V]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&e$2b(k.texID2Vol)&&(p=i._volTextures[k.texID2Vol])}}r&&(_0x4a7e5e(ue,t._oriMatModel,O,n),Se$d.AddRef(i._fileName));var H=re._boundingSphere;if(re._boundingSphere.radius<0){H=_0x58bcd6.calcBoundingSphere(t,ue,se);var q=i$1c.transform(H,p$1d.inverse(se,new p$1d),new i$1c);i$1c.transform(q,O,q),L.push(H),M.push(q)}var j={context:t._context,vertexPackage:ue,arrIndexPackage:U,edgeGeometry:le.edgeGeometry,pickInfo:G,version:e.version,mapPass:z,layer:t,matModel:se,boundingVolume:H,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:O,level:t._level,row:o,col:a,geoName:F,entity:i};if(e$2b(t.themeStyle)&&e$2b(t.themeStyle._image)){var Y=_0x14f094.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(Y)}else{var X=new _0x30a010(j);if(t._imageryLayer instanceof Array){for(var K=[],Q=0;Q<t._imageryLayer.length;Q++){if(e$2b(he=t._imageryLayer[Q])&&(he instanceof h$Q||he instanceof i$O)){var Z=_0x48a6ae(he,le.cartographicBounds);K=K.concat(Z)}}K.length>0&&X.setImagerys(K,le.cartographicBounds)}else{if(e$2b(t._imageryLayer)&&(t._imageryLayer instanceof h$Q||t._imageryLayer instanceof i$O))(K=_0x48a6ae(t._imageryLayer,le.cartographicBounds)).length>0&&X.setImagerys(K,le.cartographicBounds)}re._renderEntityList.push(X)}}}}re._boundingSphere.radius<0&&(re._boundingSphere=i$1c.fromBoundingSpheres(L,new i$1c),re._originalBS=i$1c.fromBoundingSpheres(M,new i$1c)),e$2b(i._pagelodMap[y])?(i._pagelodMap[y]._renderEntityList=re._renderEntityList,i._pagelodMap[y]._ready=!0):(i._childrenPageLod.push(re),t.LoadingPriority===_0x10659f.UsePagedLodInfo&&(re._isLeafNode=!0))}if((A=_0x444666(_,"Geode",u)).length>0){L=[],M=[];(re=new _0x46a5cb)._fileType=t._fileType,re._isLeafNode=!0;for(R=0;R<A.length;R++){for(O=_0x4956cc(ae=A[R],"GeoDeModMatrix",u).split(","),I=0;I<16;I++)O[I]=parseFloat(O[I]);if(1===t._heightScale)se=p$1d.multiply(g,O,new p$1d);else{D=p$1d.multiplyByScale(O,new o$1p(1,1,t._heightScale),new p$1d);se=p$1d.multiply(g,D,new p$1d)}for(var J=_0x444666(ae,"GeoName",u),ee=0;ee<J.length;ee++){F=J[ee].textContent.trim();if(!((ue=(le=e.geoPackage[F]).vertexPackage).verticesCount<1)){G=le.pickInfo;var te=_0x58bcd6.calcBoundingSphere(t,ue,se);q=i$1c.transform(te,p$1d.inverse(se,new p$1d),new i$1c);i$1c.transform(q,O,q),L.push(te),M.push(q);var ie=_0x58bcd6.calcBoundingRectangle(t,ue);U=le.arrIndexPackage,z={};for(var ne in U){if(e$2b(ce=U[ne])){V=ce.materialCode,k=h[V],W=new _0x21d1b1({});e$2b(k)&&k.clone(W),z[V]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&e$2b(k.texID2Vol)&&(p=i._volTextures[k.texID2Vol])}}r&&(_0x4a7e5e(ue,t._oriMatModel,O,n),Se$d.AddRef(i._fileName));j={context:t._context,vertexPackage:ue,arrIndexPackage:U,edgeGeometry:le.edgeGeometry,pickInfo:G,version:e.version,mapPass:z,layer:t,matModel:se,boundingVolume:te,boundingRectangle:ie,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:O,level:t._level,row:o,col:a,geoName:F,entity:i};if(e$2b(t.themeStyle)){Y=_0x14f094.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(Y)}else{X=new _0x30a010(j);if(t._imageryLayer instanceof Array){for(K=[],Q=0;Q<t._imageryLayer.length;Q++){if(e$2b(he=t._imageryLayer[Q])&&(he instanceof h$Q||he instanceof i$O)){Z=_0x48a6ae(he,le.cartographicBounds);K=K.concat(Z)}}K.length>0&&X.setImagerys(K,le.cartographicBounds)}else{if(e$2b(t._imageryLayer)&&(t._imageryLayer instanceof h$Q||t._imageryLayer instanceof i$O))(K=_0x48a6ae(t._imageryLayer,le.cartographicBounds)).length>0&&X.setImagerys(K,le.cartographicBounds)}re._renderEntityList.push(X)}}}}re._boundingSphere=i$1c.fromBoundingSpheres(L,new i$1c),re._originalBS=i$1c.fromBoundingSpheres(M,new i$1c),re._ready=!0,i._childrenPageLod.push(re)}}else{var re;i._isLeafTile=!0,(re=new _0x46a5cb)._isLeafNode=!0,re._fileType=t._fileType;var oe=_0x444666(_,"Geode");for(L=[],M=[],x=0;x<oe.length;x++){var ae;for(O=_0x4956cc(ae=oe[x],"GeoDeModMatrix",u).split(","),I=0;I<16;I++)O[I]=parseFloat(O[I]);var se;if(O=p$1d.unpack(O),1===t._heightScale)se=p$1d.multiply(g,O,new p$1d);else{D=p$1d.multiplyByScale(O,new o$1p(1,1,t._heightScale),new p$1d);se=p$1d.multiply(g,D,new p$1d)}for(J=_0x444666(ae,"GeoName",u),ee=0;ee<J.length;ee++){var le,ue;F=J[ee].textContent.trim();if(!((ue=(le=e.geoPackage[F]).vertexPackage).verticesCount<1)){G=le.pickInfo,te=_0x58bcd6.calcBoundingSphere(t,ue,se),q=i$1c.transform(te,p$1d.inverse(se,new p$1d),new i$1c);i$1c.transform(q,O,q),L.push(te),M.push(te);for(ie=_0x58bcd6.calcBoundingRectangle(t,ue),U=le.arrIndexPackage,z={},R=0;R<U.length;R++){var ce;if(e$2b(ce=U[R])){V=ce.materialCode,k=h[V],W=new _0x21d1b1({});e$2b(k)&&k.clone(W),z[V]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&e$2b(k.texID2Vol)&&(p=i._volTextures[k.texID2Vol])}}r&&(_0x4a7e5e(ue,t._oriMatModel,O,n),Se$d.AddRef(i._fileName));j={context:t._context,vertexPackage:ue,arrIndexPackage:U,edgeGeometry:le.edgeGeometry,pickInfo:G,version:e.version,mapPass:z,layer:t,matModel:se,boundingVolume:te,boundingRectangle:ie,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:O,level:t._level,row:o,col:a,geoName:F,entity:i};if(e$2b(t.themeStyle)&&e$2b(t.themeStyle._image)){Y=_0x14f094.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(Y)}else{X=new _0x30a010(j);if(t._imageryLayer instanceof Array){for(K=[],Q=0;Q<t._imageryLayer.length;Q++){var he;if(e$2b(he=t._imageryLayer[Q])&&(he instanceof h$Q||he instanceof i$O)){Z=_0x48a6ae(he,le.cartographicBounds);K=K.concat(Z)}}K.length>0&&X.setImagerys(K,le.cartographicBounds)}else{if(e$2b(t._imageryLayer)&&(t._imageryLayer instanceof h$Q||t._imageryLayer instanceof i$O))(K=_0x48a6ae(t._imageryLayer,le.cartographicBounds)).length>0&&X.setImagerys(K,le.cartographicBounds)}re._renderEntityList.push(X)}}}}re._boundingSphere=i$1c.fromBoundingSpheres(L,new i$1c),re._originalBS=i$1c.fromBoundingSpheres(M,new i$1c),re._ready=!0,i._childrenPageLod.push(re)}if(!e$2b(i._boundingSphere)||i._isLeafTile){for(var de=[],fe=0;fe<i._childrenPageLod.length;fe++)de.push(i._childrenPageLod[fe]._boundingSphere);i._boundingSphere=i$1c.fromBoundingSpheres(de),i._oriBoundingSphere=i$1c.clone(i._boundingSphere)}if(!o$1p.equals(t._boundingSphereOffset,o$1p.ZERO)){var pe=Math.max(Math.abs(t._boundingSphereOffset.x),Math.abs(t._boundingSphereOffset.y),Math.abs(t._boundingSphereOffset.z));i.extendRadius(pe)}for(var _e in h){var me=h[_e];!e$2b(me)||(me.destroy(),h[_e]=null)}r&&Se$d.DecRef(i._fileName),i._s3mLoadState=N$P.PARSED,i._isParsed=!0,t.LoadingPriority===_0x10659f.UsePagedLodInfo&&i._isEmptyTree&&i.setEmptyTreeFlag(!1)}))},_0x215208.binaryDataParser=function(e,t,i,n){if(t._s3mLoadState===N$P.UNLOAD)return t.s3mBuffer=null,t.volBuffer=null,void(t.task=void 0);var r;e$2b(e._imageryLayer)&&(r=e._fileType!==d$15.OSGBFile&&e._fileType!==d$15.OSGBCacheFile||e$2b(e.waterEffectSet)?void 0:p$1d.pack(e._matModel,new Array(16)));var o={buffer:i,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,bVolume:!1,modelMatrix:r,isCoverImageryLayer:e$2b(e._imageryLayer)},a=[i];e$2b(n)&&"vol"===e._strVolumeExt&&(o.bVolume=!0,o.volbuffer=n,a.push(n)),_0x46a73d.init||_0x46a73d.initWebAssembly();var s=_0x46a73d.S3MTaskProcessor.scheduleTask(o,a);!e$2b(s)||(t._s3mLoadState=N$P.PARSING,e._layerScheduler._statistics.numberOfProcessingAttempted=0,e._layerScheduler._statistics.numberOfTilesProcessing++,t.s3mBuffer=null,t.volBuffer=null,s.then((function(i){if(e$2b(window.Proxy)){var r=t._relativePath.toString()+t._fileName;if((!0===e._indexedDBSetting.isGeoTilesSave||e._indexedDBSetting.isGeoTilesRootNodeSave&&e._layerScheduler._isRootNode(r))&&e$2b(e._layerScheduler._indexedDBScheduler)){if(e$2b(e._layerScheduler._indexedDBScheduler.cachestatus)&&e$2b(e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename])&&(1===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]||2===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]))return;var o={blob:i,key:r,tablename:e._layerScheduler.tablename,dbname:e._layerScheduler._indexedDBScheduler.dbname};_0x46a73d.indexTaskProcessor.scheduleTask(o,[])}}e._layerScheduler._statistics.numberOfTilesProcessing--,_0x215208.parseResult(i,e,t,n)})).otherwise((function(i){if(e._layerScheduler._statistics.numberOfTilesProcessing--,t.task=void 0,t._s3mLoadState==N$P.UNLOAD)return t.s3mBuffer=null,void(t.volBuffer=null);e$2b(i)?(t.s3mBuffer=null,t.volBuffer=null,t._s3mLoadState=N$P.FAILED,console.log(i)):t._s3mLoadState=N$P.LOADED})))};var _0x5a279b=(_0x4a63b7=!0,function(e,t){var i=_0x4a63b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a63b7=!1,i}),_0x38a494=_0x5a279b(void 0,(function(){return _0x38a494.toString().search("(((.+)+)+)+$").toString().constructor(_0x38a494).search("(((.+)+)+)+$")})),_0x4a63b7;function _0x212e1c(){this.skeletons=new e$1N,this.bufferCache={},this.vertexJob=new _0x38010a,this.indexJob=new _0x54c6f3}_0x38a494(),_0x212e1c.STATE={SkeletonParsing:0,SkeletonReady:1};var _0x4f1c86={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,PARSED:4,CREATING:5,READY:6,LOADFAILED:7,PARSFAILED:8};function _0x38010a(){this.context=void 0,this.geoPackage=void 0,this.index=0}function _0x54c6f3(){this.geoPackage=void 0,this.context=void 0,this.index=0}function _0x4ebd8d(e,t,i){if(!e$2b(t.request)){let o=i.split("#");var n=new h$16("./ModelFile/"+(encodeURIComponent(o[0])+(o[1]?"#"+o[1]:""))).resolve(e._baseUri).toString();e$2b(a$O.CREDENTIAL)&&(n=a$O.addToken(n));var r=new r$1b({url:n,throttle:!0,throttleByServer:!0,serverKey:r$1a.getServerKey(n),priorityFunction:function(){return 1e3}});t.request=r}var o=o$10(t.request.url,void 0,t.request);!e$2b(o)||(t.state=_0x4f1c86.LOADING,o.then((function(e){t.request=void 0,t.buffer=e,t.state=_0x4f1c86.LOADED})).otherwise((function(e){e$2b(e)?t.state=_0x4f1c86.LOADFAILED:(t.state=_0x4f1c86.UNLOAD,t.request=void 0)})))}function _0x13d29d(e,t,i){var n={buffer:i,isS3MZ:!1,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,isJsonScp:e._isJsonScp,createEdge:!1},r=[i];if(_0x46a73d.init||_0x46a73d.initWebAssembly(),_0x46a73d.taskProcessorReady){var o=_0x46a73d.S3MBTaskProcessor.scheduleTask(n,r);!e$2b(o)||(t.buffer=void 0,t.state=_0x4f1c86.PARSING,o.then((function(e){t.state=_0x4f1c86.PARSED,t.skeletonPackage=e})).otherwise((function(e){t.state=_0x4f1c86.PARSFAILED})))}}function _0xb2e26f(e,t,i,n){var r=e._context,o=i.skeletonPackage.geoPackage;for(var a in delete o.ignoreNormal,o)if(o.hasOwnProperty(a)){for(var s=o[a],l=s.vertexPackage.vertexAttributes.length,u=new r$16,c=0;c<l;c++)u.enqueue(c);i.vertexBufferToCreate.set(a,u);var h=s.arrIndexPackage[0];if(e$2b(h)){ce$x.UNSIGNED_SHORT,(1===h.indexType||s.vertexPackage.verticesCount>=e$2a.SIXTY_FOUR_KILOBYTES)&&r.elementIndexUint&&ce$x.UNSIGNED_INT;var d=new r$16;d.enqueue(0),i.indexBufferToCreate.set(a,d)}t.bufferCache[n+"_"+a]=1}i.state=_0x4f1c86.CREATING}function _0x4c09ed(e,t,i,n){var r=!0;for(var o in i.vertexBufferToCreate._hash){for(var a=i.vertexBufferToCreate._hash[o];a.length;){var s=a.peek();if(t.vertexJob.set(e._context,i.skeletonPackage.geoPackage[o],s),!e._frameState.jobScheduler.execute(t.vertexJob,i$Q.BUFFER))break;a.dequeue()}r=r&&0===a.length}for(var o in i.indexBufferToCreate._hash){for(a=i.indexBufferToCreate._hash[o];a.length;){s=a.peek();if(t.indexJob.set(e._context,i.skeletonPackage.geoPackage[o],s),!e._frameState.jobScheduler.execute(t.indexJob,i$Q.BUFFER))break;a.dequeue()}r=r&&0===a.length}r&&(i.vertexBufferToCreate=void 0,i.indexBufferToCreate=void 0,i.state=_0x4f1c86.READY)}_0x38010a.prototype.set=function(e,t,i){this.context=e,this.geoPackage=t,this.index=i},_0x38010a.prototype.execute=function(){var e=this.context,t=this.index,i=this.geoPackage.vertexPackage.vertexAttributes[t];e$2b(i.vertexBuffer)||(i.vertexBuffer=t$Y.createVertexBuffer({context:e,typedArray:i.typedArray,usage:A$19.STATIC_DRAW}),delete i.typedArray,i.vertexBuffer.vertexArrayDestroyable=!1)},_0x54c6f3.prototype.set=function(e,t,i){this.geoPackage=t,this.context=e,this.index=i},_0x54c6f3.prototype.execute=function(){var e=this.context;this.index;var t=this.geoPackage.arrIndexPackage[0],i=this.geoPackage.vertexPackage.verticesCount,n=ce$x.UNSIGNED_SHORT;(1===t.indexType||i>=e$2a.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(n=ce$x.UNSIGNED_INT);var r=t$Y.createIndexBuffer({context:e,typedArray:t.indicesTypedArray,usage:A$19.STATIC_DRAW,indexDatatype:n});r.vertexArrayDestroyable=!1,delete t.indicesTypedArray,t.indexBuffer=r},_0x212e1c.prototype.getSkeleton=function(e,t,i){var n=t.skeletonPackages,r=i.indexOf("#"),o=i;r>-1&&(o=i.substring(0,r));var a=this.skeletons.get(o);return e$2b(a)||(a={state:_0x4f1c86.UNLOAD,skeletonPackage:void 0,vertexBufferToCreate:new e$1N,indexBufferToCreate:new e$1N},this.skeletons.set(o,a)),a.state===_0x4f1c86.UNLOAD?_0x4ebd8d(e,a,i):a.state===_0x4f1c86.LOADED?_0x13d29d(e,a,a.buffer):a.state===_0x4f1c86.PARSED?_0xb2e26f(e,this,a,o):a.state===_0x4f1c86.CREATING&&_0x4c09ed(e,this,a),a.state===_0x4f1c86.READY&&(n.contains(o)||n.set(o,a.skeletonPackage)),a},_0x212e1c.prototype.remove=function(e){var t=this.skeletons.get(e);if(e$2b(t)&&e$2b(t.skeletonPackage)){var i=t.skeletonPackage.geoPackage;for(var n in i)if(i.hasOwnProperty(n)){for(var r=i[n],o=r.vertexPackage.vertexAttributes,a=o.length,s=0;s<a;s++){var l=o[s];if(e$2b(l.vertexBuffer)){var u=l.vertexBuffer;l.vertexBuffer.vertexArrayDestroyable=!0,e$2b(u)&&!u.isDestroyed()&&u.vertexArrayDestroyable&&u.destroy(),l.vertexBuffer=void 0}}var c=r.arrIndexPackage[0];if(e$2b(c)){var h=c.indexBuffer;h.vertexArrayDestroyable=!0,e$2b(h)&&!h.isDestroyed()&&h.vertexArrayDestroyable&&h.destroy(),c.indexBuffer=void 0}delete this.bufferCache[e+"_"+n]}this.skeletons.remove(e)}},_0x212e1c.parse=function(e,t){var i=t.instancePackage.geoPackage;delete i.ignoreNormal;var n=!0;for(var r in e$2b(t.skeletonPackages)||(t.skeletonPackages=new e$1N),i)if(i.hasOwnProperty(r)){n=e.instanceSkeletonManager.getSkeleton(e,t,r).state===_0x4f1c86.READY&&n}n&&(t.skeletonState=_0x212e1c.STATE.SkeletonReady)};var y$O=1,l$U=2,B$L=4,P$N=32;function H$R(e,t,i,n){var r=e|t<<8,o=r>>11&31,a=r>>5&63,s=31&r;return i[n+0]=o<<3|o>>2,i[n+1]=a<<2|a>>4,i[n+2]=s<<3|s>>2,i[n+3]=255,r}function M$R(e,t,i,n){for(var r=new Uint8Array(16),o=H$R(t[i+0],t[i+1],r,0),a=H$R(t[i+2],t[i+3],r,4),s=0;s<3;s++){var l=r[s],u=r[4+s];n&&o<=a?(r[8+s]=(l+u)/2,r[12+s]=0):(r[8+s]=(2*l+u)/3,r[12+s]=(l+2*u)/3)}r[11]=255,r[15]=n&&o<=a?0:255;var c=new Uint8Array(16);for(s=0;s<4;++s){var h=t[i+4+s];c[4*s+0]=3&h,c[4*s+1]=h>>2&3,c[4*s+2]=h>>4&3,c[4*s+3]=h>>6&3}for(s=0;s<16;++s)for(var d=4*c[s],f=0;f<4;++f)e[4*s+f]=r[d+f]}function N$H(e,t,i){for(var n=0;n<8;++n){var r=bytes[i+n],o=15&r,a=240&r;e[8*n+3]=o|o<<4,e[8*n+7]=a|a>>4}}function W$Q(e,t,i){var n=t[i+0],r=t[i+1],o=new Uint8Array(8);if(o[0]=n,o[1]=r,n<=r){for(var a=1;a<5;++a)o[1+a]=((5-a)*n+a*r)/5;o[6]=0,o[7]=255}else for(a=1;a<7;++a)o[1+a]=((7-a)*n+a*r)/7;var s=new Uint8Array(16),l=(i=i+2,0);for(a=0;a<2;++a){for(var u=0,c=0;c<3;++c){u|=t[i++]<<8*c}for(c=0;c<8;++c){var h=u>>3*c&7;s[l++]=h}}for(a=0;a<16;++a)e[4*a+3]=o[s[a]]}function E$R(e,t,i,n){var r=0;0!=(n&(l$U|B$L))&&(r=8),M$R(e,t,i+r,0!=(n&y$O)),0!=(n&l$U)?N$H(e,t,i):0!=(n&B$L)&&W$Q(e,t,i)}function G$X(e,t,i,n){for(var r=new Uint16Array(4),o=e,a=0,s=0,l=0,u=0,c=0,h=0,d=0,f=0,p=0,_=t/4,m=i/4,g=0;g<m;g++)for(var x=0;x<_;x++)l=4*((m-g)*_+x),r[0]=n[l],r[1]=n[l+1],u=31&r[0],c=2016&r[0],h=63488&r[0],d=31&r[1],f=2016&r[1],p=63488&r[1],r[2]=5*u+3*d>>3|5*c+3*f>>3&2016|5*h+3*p>>3&63488,r[3]=5*d+3*u>>3|5*f+3*c>>3&2016|5*p+3*h>>3&63488,a=n[l+2],o[s=4*g*t+4*x]=r[3&a],o[s+1]=r[a>>2&3],o[s+2]=r[a>>4&3],o[s+3]=r[a>>6&3],o[s+=t]=r[a>>8&3],o[s+1]=r[a>>10&3],o[s+2]=r[a>>12&3],o[s+3]=r[a>>14],a=n[l+3],o[s+=t]=r[3&a],o[s+1]=r[a>>2&3],o[s+2]=r[a>>4&3],o[s+3]=r[a>>6&3],o[s+=t]=r[a>>8&3],o[s+1]=r[a>>10&3],o[s+2]=r[a>>12&3],o[s+3]=r[a>>14];return o}function R$L(e,t,i,n,r){for(var o=0!=(r&y$O)?8:16,a=0,s=0;s<i;s+=4)for(var l=0;l<t;l+=4){var u=new Uint8Array(64);E$R(u,n,a,r);for(var c=0,h=0;h<4;++h)for(var d=0;d<4;++d){var f=l+d,p=s+h;if(f<t&&p<i)for(var _=4*(t*(i-p)+f),m=0;m<4;++m)e[_++]=u[c++];else c+=4}a+=o}}function L$U(e){}L$U.decode=function(e,t,i,n,r){if(null!=e&&null!=n&&0!=i&&0!=t){var o=0;(o=r>_0x3dfacd.BGR||r===_0x3dfacd.LUMINANCE_ALPHA?B$L:y$O|P$N)&y$O&&o&P$N?G$X(e,t,i,n):R$L(e,t,i,n,o)}};var _0x2b6006=(_0x3d282f=!0,function(e,t){var i=_0x3d282f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3d282f=!1,i}),_0x24d678=_0x2b6006(void 0,(function(){return _0x24d678.toString().search("(((.+)+)+)+$").toString().constructor(_0x24d678).search("(((.+)+)+)+$")})),_0x3d282f;_0x24d678();var _0x55a639=4369,_0x3bcf5d=6410;function _0x413c78(e){this.context=e.context,this.contextId=e.context.id,this.layerId=e.layerId,this.rootName=e.rootName,this.textureId=e.textureId,this._width=e.width,this._height=e.height,this._compressType=e.compressType,this._supportCompressType=e.supportCompressType,this._pixelFormat=e.pixelFormat,this._internalFormat=e.internalFormat,this.wrapS=u$_(e.wrapS,q$19.CLAMP_TO_EDGE),this.wrapT=u$_(e.wrapT,q$19.CLAMP_TO_EDGE),this.arrayBufferView=e.arrayBufferView,this._inner=void 0,this.size=this._width*this._height,this.refCount=1,this.ready=!1,this.renderable=!1,this.isTexBlock=!0,e$2b(this.arrayBufferView)&&this.init(),this._sizeInBytes=V$10.compressedTextureSizeInBytes(this._internalFormat,this._width,this._height),this.context.memorySize+=this._sizeInBytes}function _0x35d955(e,t,i,n){var r=1;if(!e$2a.isPowerOfTwo(i)||!e$2a.isPowerOfTwo(n))return!1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=V$10.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l===o?r:1}Object.defineProperties(_0x413c78.prototype,{_texture:{get:function(){return this._inner._texture}},_target:{get:function(){return this._inner._target}}}),_0x413c78.prototype.init=function(){if(this._compressType===_0x2072ef.enrS3TCDXTN&&1!=this._supportCompressType){if(e$2b(this.arrayBufferView)){var e=null;L$U.decode(e,this._width,this._height,this.arrayBufferView,this._pixelFormat),e=this._pixelFormat>_0x3dfacd.BGR||this._pixelFormat===_0x3dfacd.LUMINANCE_ALPHA?new Uint8Array(this._width*this._height*4):new Uint16Array(this._width*this._height),L$U.decode(e,this._width,this._height,this.arrayBufferView,this._pixelFormat),this.arrayBufferView=e}this._internalFormat=_0x55a639}var t,i,n,r=!1,o=this._internalFormat,a=0,s={};if(e$2b(this.arrayBufferView)){var l=this._width,u=this._height,c=_0x35d955(this.arrayBufferView,o,this._width,this._height)>1,h=this.arrayBufferView.byteLength,d=0;(o===_0x3bcf5d||o===_0x55a639)&&(r=!0);var f=[];do{var p=V$10.compressedTextureSizeInBytes(o,l,u),_=new Uint8Array(this.arrayBufferView.buffer,this.arrayBufferView.byteOffset+d,p);0==a?s.arrayBufferView=_:f.push(_),a++,l=Math.max(l>>1,1),u=Math.max(u>>1,1),d+=p}while(c&&d<h);s.mipLevels=f}else{var m=V$10.compressedTextureSizeInBytes(o,this._width,this._height);s.arrayBufferView=o===_0x55a639?new Uint8Array(this._width*this._height*4):new Uint8Array(m)}a>1?(i=rt$i.LINEAR,t=e$2a.isPowerOfTwo(this._width)&&e$2a.isPowerOfTwo(this._height)?tt$h.LINEAR_MIPMAP_LINEAR:tt$h.LINEAR):(i=rt$i.LINEAR,t=tt$h.LINEAR),n=this._internalFormat==_0x55a639?V$10.RGBA:this._internalFormat==_0x3bcf5d?V$10.LUMINANCE_ALPHA:this._internalFormat,this._inner=new t$V({context:this.context,width:this._width,height:this._height,pixelFormat:n,pixelDatatype:_$$.UNSIGNED_BYTE,flipY:r,source:s,sampler:new e$1P({wrapS:this.wrapS,wrapT:this.wrapT,minificationFilter:t,magnificationFilter:i,maximumAnisotropy:e$1T.maximumTextureFilterAnisotropy})}),this.arrayBufferView=void 0,this.ready=!0},_0x413c78.prototype.copyFrom=function(e){var t=e.xOffset,i=e.yOffset,n=e.width,r=e.height,o=e.arrayBufferView,a=this._internalFormat;if(this._compressType===_0x2072ef.enrS3TCDXTN&&1!=this._supportCompressType){var s=null;a=this._pixelFormat;L$U.decode(s,n,r,o,a),s=a>_0x3dfacd.BGR||a===_0x3dfacd.LUMINANCE_ALPHA?new Uint8Array(n*r*4):new Uint16Array(n*r),L$U.decode(s,n,r,o,a),o=s,this._internalFormat=_0x55a639,this._inner.copyFrom({width:n,height:r,arrayBufferView:o},t,i)}else{var l=V$10.compressedTextureSizeInBytes(a,n,r),u=new Uint8Array(o.buffer,o.byteOffset,l);this._inner.copyFrom({width:n,height:r,arrayBufferView:u},t,i)}},_0x413c78.prototype.update=function(e){this.context=e.context,this.contextId=e.context.id,this.layerId=e.layerId,this.rootName=e.rootName,this.textureId=e.textureId,this._width=e.width,this._height=e.height,this._internalFormat=e.internalFormat,this.arrayBufferView=e.arrayBufferView,this.refCount=1,this.ready=!1,this.renderable=!1,e$2b(this.arrayBufferView)&&this.init()},_0x413c78.prototype.destroy=function(){this._inner&&this._inner.destroy(),this._inner=null,this.refCount=0,this.ready=!1,this.renderable=!1,this.context.memorySize-=this._sizeInBytes};var _0x2f8693=(_0x2e3a6e=!0,function(e,t){var i=_0x2e3a6e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e3a6e=!1,i}),_0x2b8377=_0x2f8693(void 0,(function(){return _0x2b8377.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b8377).search("(((.+)+)+)+$")})),_0x2e3a6e;_0x2b8377();var _0x27ac16={cache:{},cacheSize:0,freeCache:{},freeQueue:new r$16,freeCacheSize:0,throttleSize:52428800,getCache:function(e,t,i){var n=this.cache[e];e$2b(n)||(n=this.cache[e]={});var r=n[t];e$2b(r)||(r=n[t]={});var o=r[i];return e$2b(o)||(o=r[i]={}),o},get:function(e,t,i,n){var r=this.getCache(e,t,i)[n];if(e$2b(r))return r.refCount++,r},create:function(e){var t=e.context,i=t.id,n=e.layerId,r=e.rootName,o=e.textureId,a=this.getCache(i,n,r),s=a[o];if(e$2b(s))return s.refCount++,s;var l=e.width,u=e.height,c=e.compressType,h=e.supportCompressType,d=e.pixelFormat,f=e.arrayBufferView;return s=new _0x413c78({context:t,layerId:n,rootName:r,textureId:o,width:l,height:u,compressType:c,supportCompressType:h,pixelFormat:d,internalFormat:e.internalFormat,arrayBufferView:f}),a[o]=s,s},del:function(e){if(e$2b(e.contextId)){var t=this.getCache(e.contextId,e.layerId,e.rootName);!e$2b(t[e.textureId])||0==--e.refCount&&(delete t[e.textureId],e.destroy())}}},_0x581deb=(_0x118a7f=!0,function(e,t){var i=_0x118a7f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x118a7f=!1,i}),_0x2f5247=_0x581deb(void 0,(function(){return _0x2f5247.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f5247).search("(((.+)+)+)+$")})),_0x118a7f;function _0x34f811(){this.isRoot=!1,this.isLeaf=!1,this.ownerLayerName=void 0,this._refCount=0,this.ownerEntity=void 0,this._ambientColor=new e$29(1,1,1,1),this._diffuseColor=new e$29(1,1,1,1),this._specularColor=new e$29(0),this._texMatrix=p$1d.clone(p$1d.IDENTITY,new p$1d),this._shininess=50,this._bTransparentSorting=!1,this._textures=[],this._created=!1,this._createdBaker=!1,this._subRequested=!1,this._subRequestedBaker=!1,this._subRequestNames=void 0,this._subRequestNamesBake=void 0,this._subTextureNames=void 0,this._subTextureNamesBake=void 0,this._subBatchValues=void 0,this._oriTextureBake=void 0,this._batchTable=void 0,this._batchTableBake=void 0,this._ancestorTexture=void 0,this._oriTexture=void 0,this.textureParameter=void 0,this.textureParameterBake=void 0,this.textureInitilized=!1,this.textureBakeInitilized=!1,this.textureRenderableFlag=!1,this.textureBakeRenderableFlag=!1,this.isCrnTexture=!1,this.taskMap={},this._usePBR=!1}function _0x37286a(e){if(!e$2b(e))return this._offsetPeriod=0,this._offsetSpeedU=0,this._offsetSpeedV=0,this._tilingPeriod=0,this._tilingSpeedU=0,void(this._tilingSpeedV=0);this._offsetPeriod=e.OffsetPeriod,this._offsetSpeedU=e.OffsetSpeedU,this._offsetSpeedV=e.OffsetSpeedV,this._tilingPeriod=e.TilingPeriod,this._tilingSpeedU=e.TilingSpeedU,this._tilingSpeedV=e.TilingSpeedV}_0x2f5247(),Object.defineProperties(_0x34f811.prototype,{hasTexture:{get:function(){return this._textures.length>0||(e$2b(this.baseColorTexture)||e$2b(this.normalTexture)||e$2b(this.emissiveTexture)||e$2b(this.metallicRoughnessTexture)||e$2b(this.occlusionTexture))}}}),_0x34f811.prototype.createPBRParamter=function(e){if(e$2b(e.pbrMetallicRoughness)&&!this._usePBR){var t=e.pbrMetallicRoughness;this._usePBR=!0,this._alphaCutoff=u$_(t.alphaCutoff,e.alphaCutoff),this._alphaMode=u$_(t.alphaMode,e.alphaMode),this._baseColor=new e$1U(t.baseColor.x,t.baseColor.y,t.baseColor.z,t.baseColor.w),this._baseColorTextureIndex=t.baseColorTextureIndex,this._baseColorTextureCoordIndex=t.baseColorTextureCoordIndex,this._doubleSided=t.doubleSided,this._emissiveFactor=new e$1U(t.emissiveFactor.x,t.emissiveFactor.y,t.emissiveFactor.z,1),this._emissiveTextureIndex=t.emissiveTextureIndex,this._emissiveTextureCoordIndex=t.emissiveTextureCoordIndex,this._roughnessFactor=t.roughnessFactor,this._metallicFactor=t.metallicFactor,this._metallicRoughnessTextureIndex=t.metallicRoughnessTextureIndex,this._metallicRoughnessTextureCoordIndex=t.metallicRoughnessTextureCoordIndex,this._normalTextureIndex=t.normalTextureIndex,this._normalTextureCoordIndex=t.normalTextureCoordIndex,this._normalTextureScale=t.normalTextureScale,this._occlusionTextureIndex=t.occlusionTextureIndex,this._occlusionTextureCoordIndex=t.occlusionTextureCoordIndex,this._occlusionTextureStrength=t.occlusionTextureStrength,this._baseColorTextureMotion=new _0x37286a(t.baseColorTextureMotion),this._emissiveTextureMotion=new _0x37286a(t.emissiveTextureMotion)}};var _0x32917e={};function _0x2e40b4(e,t,i){for(var n in i)if(i.hasOwnProperty(n)){var r=i[n],o=Number(n);t.setBatchedAttribute(o,0,r)}t.update(e)}function _0x3ba183(e,t,i,n,r,o){var a=r[n];if(e$2b(a)){for(var s=_0x27ac16.get(e,t,i,a);e$2b(a)&&e$2b(s)&&!s.renderable;)s.refCount--,a=r[a],s=_0x27ac16.get(e,t,i,a);return o.name=a,s}}function _0x476047(e){var t=e.indexOf(".");return e.substr(0,t)}_0x34f811.prototype.createBakeTexture=function(e,t,i,n,r,o,a,s){if(!this._createdBaker){this.textureParameterBake={context:e,layer:t,isRoot:i,rootName:n,curTextureName:r,textureInfo:o,rootBatchIdMap:a,ancestorMap:s};var l=t._textureLod;this._createdBaker=!0,this._subRequestedBaker=i&&l;var u=o.textureData,c=V$10.RGBA_DXT5,h=_0x27ac16.create({context:e,layerId:t.id,rootName:n,textureId:o.id,width:o.width,height:o.height,compressType:o.compressType,supportCompressType:t._supportCompressType,pixelFormat:o.format,internalFormat:c,arrayBufferView:u});h.renderable=i&&l;var d=o.subTexInfos.length,f=a[o.rootTextureName];if(this._textures.push(h),l){var p=[{functionName:"czm_batchTable_xywh_BakeTex",componentDatatype:S$12.FLOAT,componentsPerAttribute:4}],_=e$2b(f)?Object.keys(f).length:d;this._batchTableBake=new h$W(e,p,_),this._batchTableBake.useUBO=!0,this._batchTableBake.useForMaterial=!0,this._batchTableBake.suffix="_bakeTex";var m=_0x32917e[t.name];e$2b(m)||(m=_0x32917e[t.name]={});var g=m[n];e$2b(g)||(g=m[n]={});var x=g[r];e$2b(x)||(x=g[r]={});for(var v=o.subTexInfos,y=0;y<d;y++){var $=v[y],b=$.subName.split("_")[0],T=new e$29($.offsetX,$.offsetY,$.width,$.height);x[b]=T}}if(!i||!l){this._subRequestNamesBake=[];for(y=0;y<o.requestNames.length;y++){var C=o.requestNames[y],S=_0x476047(C);if("Tex"===S.split("_")[0]){var w=C.split("#"),E=_0x476047(w[0]);if(w.length>1)for(var P=w[1],A=P.length,L=0;L<A;L+=3){var M=E+"_"+P.substring(L,L+3);this._subRequestNamesBake.push(M)}}else this._subRequestNamesBake.push(S)}}return this._oriTextureBake=h,h}},_0x34f811.prototype.initTexture=function(){if(!this.textureInitilized&&e$2b(this.textureParameter)){this.textureInitilized=!0;var e=this.textureParameter.context,t=this.textureParameter.layer,i=this.textureParameter.isRoot,n=this.textureParameter.rootName,r=this.textureParameter.curTextureName,o=this.textureParameter.textureInfo,a=this.textureParameter.rootBatchIdMap,s=this.textureParameter.ancestorMap;this.textureParameter=void 0;var l={},u=a[o.rootTextureName],c=i||!t._textureLod?void 0:_0x3ba183(e.id,t.id,n,r,s,l),h=_0x32917e[t.name];e$2b(h)||(h=_0x32917e[t.name]={});var d=h[n];e$2b(d)||(d=h[n]={});var f=d[r];e$2b(f)||(f=d[r]={});for(var p=i?void 0:e$2b(l.name)?d[l.name]:void 0,_={},m=o.subTexInfos,g=[],x=o.subTexInfos.length,v=0;v<x;v++){var y=m[v];if(g.push(y.subName),t._textureLod){var $=y.subName.split("_")[0],b=new e$29(y.offsetX,y.offsetY,y.width,y.height),T=e$2b(u)?u[$]:v,C=i?void 0:e$2b(p)?p[$]:void 0,S=e$2b(C)?C:b;this._batchTable.setBatchedAttribute(T,0,S),_[T]=b,f[$]=b}}this._subTexInfos=m,this._subTextureNames=g,this._subBatchValues=_,this._ancestorTexture=c}},_0x34f811.prototype.initBakeTexture=function(){if(!this.textureBakeInitilized&&e$2b(this.textureParameterBake)){this.textureBakeInitilized=!0;var e=this.textureParameterBake.context,t=this.textureParameterBake.layer,i=this.textureParameterBake.isRoot,n=this.textureParameterBake.rootName,r=this.textureParameterBake.curTextureName,o=this.textureParameterBake.textureInfo,a=this.textureParameterBake.rootBatchIdMap,s=this.textureParameterBake.ancestorMap;this.textureParameterBake=void 0;var l={},u=a[o.rootTextureName],c=i||!t._textureLod?void 0:_0x3ba183(e.id,t.id,n,r,s,l),h=_0x32917e[t.name];e$2b(h)||(h=_0x32917e[t.name]={});var d=h[n];e$2b(d)||(d=h[n]={});var f=d[r];e$2b(f)||(f=d[r]={});for(var p=i?void 0:e$2b(l.name)?d[l.name]:void 0,_={},m=o.subTexInfos,g=[],x=o.subTexInfos.length,v=0;v<x;v++){var y=m[v];if(g.push(y.subName),t._textureLod){var $=y.subName.split("_")[0],b=new e$29(y.offsetX,y.offsetY,y.width,y.height),T=e$2b(u)?u[$]:v,C=i?void 0:e$2b(p)?p[$]:void 0,S=e$2b(C)?C:b;this._batchTableBake.setBatchedAttribute(T,0,S),_[T]=b,f[$]=b}}this._subTexInfosBake=m,this._subTextureNamesBake=g,this._subBatchValuesBake=_,this._ancestorTextureBake=c}},_0x34f811.prototype.createTexture=function(e,t,i,n,r,o,a,s){if(!this._created){this.isCrnTexture=o.compressType===_0x3dfacd.CRN_DXT5,this.textureParameter={context:e,layer:t,isRoot:i,rootName:n,curTextureName:r,textureInfo:o,rootBatchIdMap:a,ancestorMap:s};var l=t._textureLod;this.isRoot=i&&l,this._created=!0,this._subRequested=i&&l;var u=o.textureData,c=V$10.RGBA_DXT5,h=_0x27ac16.create({context:e,layerId:t.id,rootName:n,textureId:o.id,width:o.width,height:o.height,compressType:o.compressType,supportCompressType:t._supportCompressType,pixelFormat:o.format,internalFormat:c,arrayBufferView:u});h.renderable=i&&l;var d=o.subTexInfos.length,f=a[o.rootTextureName];if(this._textures.push(h),l){var p=[{functionName:"czm_batchTable_xywh_BaseTex",componentDatatype:S$12.FLOAT,componentsPerAttribute:4}],_=e$2b(f)?Object.keys(f).length:d;this._batchTable=new h$W(e,p,_),this._batchTable.useUBO=!0,this._batchTable.useForMaterial=!0,this._batchTable.suffix="_baseTex";var m=_0x32917e[t.name];e$2b(m)||(m=_0x32917e[t.name]={});var g=m[n];e$2b(g)||(g=m[n]={});var x=g[r];e$2b(x)||(x=g[r]={});for(var v=o.subTexInfos,y=0;y<d;y++){var $=v[y],b=$.subName.split("_")[0],T=new e$29($.offsetX,$.offsetY,$.width,$.height);x[b]=T}}if(!i||!l){this._subRequestNames=[];for(y=0;y<o.requestNames.length;y++){var C=o.requestNames[y],S=_0x476047(C);if("Tex"===S.split("_")[0]){var w=C.split("#"),E=_0x476047(w[0]);if(w.length>1)for(var P=w[1],A=P.length,L=0;L<A;L+=3){var M=E+"_"+P.substring(L,L+3);this._subRequestNames.push(M)}}else this._subRequestNames.push(S)}}return this.isLeaf=!(i&&l||1===o.requestNames.length&&o.requestNames[0]===r),this._oriTexture=h,h}},_0x34f811.prototype.requestSubTextures=function(e,t,i,n){if(!this._subRequested&&e$2b(this._subRequestNames)){for(var r=this._subRequestNames,o=this._subTexInfos,a=this._subTextureNames,s=this._subBatchValues,l=this._oriTexture,u=[],c=i._baseUri,h=t._subTextureManager,d=0,f=r.length;d<f;d++){var p=r[d];if(e$2b(g=h.get(i._id,c,p,this))){var _=g.result;for(var m in u.push(d),_)if(_.hasOwnProperty(m)){var g=_[m],x=a.indexOf(m);if(x<0&&this.isLeaf)continue;var v=0,y=0,$=g.width,b=g.height;if(x>=0){var T=o[x];v=T.offsetX,y=T.offsetY}this.isLeaf?n.enqueue({texture:l,subTextureInfo:{xOffset:v,yOffset:y,width:$,height:b,arrayBufferView:g.arrayBufferView}}):l.arrayBufferView=g.arrayBufferView}}}if(u.length===r.length)r.length=0;else{var C=0;for(d=0,f=u.length;d<f;d++)r.splice(u[d]-C,1),C++}0===r.length&&(this.textureRenderableFlag=!0,this.isLeaf||l.init(),i._textureLod&&_0x2e40b4(e,this._batchTable,s),this._subRequested=!0,this._subRequestNames=void 0,this._subTextureNames=void 0,this._subBatchValues=void 0,this._subTexInfos=void 0)}},_0x34f811.prototype.requestBakeSubTextures=function(e,t,i,n){if(!this._subRequestedBaker&&e$2b(this._subRequestNamesBake)){for(var r=this._subRequestNamesBake,o=this._subTexInfosBake,a=this._subTextureNamesBake,s=this._subBatchValuesBake,l=this._oriTextureBake,u=[],c=i._baseUri,h=t._subTextureManager,d=0,f=r.length;d<f;d++){var p=r[d];if(e$2b(g=h.get(i._id,c,p,this))){var _=g.result;for(var m in u.push(d),_)if(_.hasOwnProperty(m)){var g=_[m],x=a.indexOf(m);if(x<0&&this.isLeaf)continue;var v=0,y=0,$=g.width,b=g.height;if(x>=0){var T=o[x];v=T.offsetX,y=T.offsetY}n.enqueue({texture:l,subTextureInfo:{xOffset:v,yOffset:y,width:$,height:b,arrayBufferView:g.arrayBufferView}})}}}if(u.length===r.length)r.length=0;else{var C=0;for(d=0,f=u.length;d<f;d++)r.splice(u[d]-C,1),C++}0===r.length&&(this.textureBakeRenderableFlag=!0,this.isLeaf||l.init(),this._subRequestedBaker=!0,this._subRequestNamesBake=void 0,this._subTextureNamesBake=void 0,this._subBatchValuesBake=void 0,this._subTexInfosBake=void 0,i._textureLod&&_0x2e40b4(e,this._batchTableBake,s))}},_0x34f811.prototype.enableTextureRenderable=function(){if(this.textureRenderableFlag){this.textureRenderableFlag=!1;var e=this._oriTexture;e.renderable=!0,e$2b(this._ancestorTexture)&&this._ancestorTexture.textureId!==e.textureId&&_0x27ac16.del(this._ancestorTexture),this._textures[0]=e,this._oriTexture=void 0,this._ancestorTexture=void 0}},_0x34f811.prototype.enableBakeTextureRenderable=function(){if(this.textureBakeRenderableFlag){this.textureBakeRenderableFlag=!1;var e=this._oriTextureBake;e.renderable=!0,e$2b(this._ancestorTextureBake)&&this._ancestorTextureBake.textureId!==e.textureId&&_0x27ac16.del(this._ancestorTextureBake),this._textures[1]=e,this._oriTextureBake=void 0,this._ancestorTextureBake=void 0}},_0x34f811.prototype.isDestroyed=function(){return!1},_0x34f811.prototype.destroy=function(e){this._ambientColor=null,this._diffuseColor=null,this._specularColor=null;for(var t=0,i=this._textures.length;t<i;t++){var n=this._textures[t];_0x27ac16.del(n)}this._textures.length=0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._batchTableBake=this._batchTableBake&&this._batchTableBake.destroy(),this._subTexInfos=void 0,this._subTextureNames=void 0,this._subBatchValues=void 0,this._subTextureNamesBake=void 0,this._subTexInfosBake=void 0,e$2b(this._ancestorTexture)&&this._ancestorTexture.textureId!==this._oriTexture.textureId&&_0x27ac16.del(this._ancestorTexture),this._oriTexture=void 0,this._ancestorTexture=void 0,this.ownerEntity=void 0,this.textureParameter=void 0,this._oriTextureBake=void 0;var r=e._context;if(e$2b(this._subRequestNames)){for(t=0,i=this._subRequestNames.length;t<i;t++){var o=(a=this._subRequestNames[t]).split(".")[0];o=(s=a.indexOf("%23"))>-1?o+a.substring(s):o,r._subTextureManager.del(e._id,o)}this._subRequestNames=void 0}if(e$2b(this._subRequestNamesBake)){for(t=0,i=this._subRequestNamesBake.length;t<i;t++){var a,s;o=(a=this._subRequestNamesBake[t]).split(".")[0];o=(s=a.indexOf("%23"))>-1?o+a.substring(s):o,r._subTextureManager.del(e._id,o)}this._subRequestNames=void 0}if(e$2b(this.taskMap))for(var l in this.taskMap)if(this.taskMap.hasOwnProperty(l)){var u=this.taskMap[l];_0x46a73d.cancelTask(u)}return this.taskMap=void 0,i$10(this)};var _0x55af22=(_0x101427=!0,function(e,t){var i=_0x101427?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x101427=!1,i}),_0x29ddcf=_0x55af22(void 0,(function(){return _0x29ddcf.toString().search("(((.+)+)+)+$").toString().constructor(_0x29ddcf).search("(((.+)+)+)+$")})),_0x101427;function _0x5b0881(){this.cache={}}function h$P(){this.head=void 0,this.tail=void 0,this._length=0}function r$S(e,t,i){this.item=e,this.previous=t,this.next=i}function n$H(e,t){e$2b(t.previous)&&e$2b(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):e$2b(t.previous)?(t.previous.next=void 0,e.tail=t.previous):e$2b(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}_0x29ddcf(),_0x5b0881.prototype.create=function(e){var t=this.cache[e];return e$2b(t)?t._refCount++:(t=new _0x34f811,this.cache[e]=t),t},_0x5b0881.prototype.free=function(e,t){var i=this.cache[t];!e$2b(i)||0==--i._refCount&&(delete this.cache[t],i.destroy(e))},Object.defineProperties(h$P.prototype,{length:{get:function(){return this._length}}}),h$P.prototype.add=function(e){var t=new r$S(e,this.tail,void 0);return e$2b(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t},h$P.prototype.addToHead=function(e){var t=new r$S(e,void 0,this.head);return e$2b(this.head)?(this.head.previous=t,this.head=t):(this.head=t,this.tail=t),++this._length,t},h$P.prototype.remove=function(e){!e$2b(e)||(n$H(this,e),--this._length)},h$P.prototype.splice=function(e,t){if(e!==t&&e$2b(e)){n$H(this,t);var i=e.next;e.next=t,this.tail===e?this.tail=t:e$2b(i)&&(i.previous=t),t.next=i,t.previous=e}},h$P.prototype.moveNodeBefore=function(e,t){if(e!==t){n$H(this,t);var i=e.previous;e.previous=t,this.head===e?this.head=t:i.next=t,t.next=e,t.previous=i}};var _0x3c3683=(_0x76e0a1=!0,function(e,t){var i=_0x76e0a1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x76e0a1=!1,i}),_0x59a256=_0x3c3683(void 0,(function(){return _0x59a256.toString().search("(((.+)+)+)+$").toString().constructor(_0x59a256).search("(((.+)+)+)+$")})),_0x76e0a1;_0x59a256();var _0xdcb724={UnLoad:0,Loading:1,Loaded:2,Parsing:3,Ready:4,Failed:5};function _0x3fad8f(){this.state={},this.cache={},this.zipBufferCache={},this.list=new h$P,this.requests=[],this.requestPriorityMap={},this.requestMap={},this.parseTaskMap={},this.tablenames=[],this.indexedDBSchedulers=[]}var _0xe654f8=0,_0x464955=209715200;_0x3fad8f.prototype.prepareRequest=function(e,t,i,n,r){var o=e+"_"+i;if(!e$2b(this.requestMap[o])){var a=t+i+".texblock",s=new r$1b({url:a,throttle:!0,throttleByServer:!0,type:4,priorityFunction:function(){return n._disFromCamera}});s.quadKey=i,s.providerName=r.ownerLayerName;var l=this.requestPriorityMap[n._priority];e$2b(l)||(l=this.requestPriorityMap[n._priority]=[]),l.push({request:s,url:a,keyWord:o,priority:s.priorityFunction()}),this.requestMap[o]=s}};var _0x9e2e1=function(e,t){return e.priority-t.priority};function _0x111f70(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(!(t>r-1||r>256)){n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e).slice(n,n+a).buffer;n+=a}}}function _0x51d202(e){return function(){return e._disFromCamera}}function f$O(e){if(!e$2b(e))throw new t$16("uri is required.");var t=new h$16(e);t.normalize();var i=t.path,n=i.lastIndexOf("/");return-1!==n&&(i=i.substr(n+1)),i}_0x3fad8f.prototype.processRequests=function(e){var t=0;for(var i in this.requestPriorityMap)if(this.requestPriorityMap.hasOwnProperty(i)){if(t===r$1a.perPacketCount){for(var n=0,r=(a=this.requestPriorityMap[i]).length;n<r;n++){var o=a[n];delete this.requestMap[o.keyWord]}continue}var a;(a=this.requestPriorityMap[i]).sort(_0x9e2e1);for(n=0,r=a.length;n<r;n++){o=a[n];if(this.load(o,e),++t===r$1a.perPacketCount)break}for(;n<r;n++){o=a[n];delete this.requestMap[o.keyWord]}}this.requestPriorityMap={}},_0x3fad8f.prototype.load=function(e,t){var i=this.tablenames[t.id];if(!e$2b(i))return this.request(e,t);var n=e.keyWord,r=this,o=n.indexOf("_"),a=this.indexedDBSchedulers[t.id].getElementFromDB(i,n.slice(o+1));return e$2b(a)?a.then((function(i){if(!e$2b(i))return r.request(e,t);var o={keyWord:t.id+"_"+i.keyWord,result:i.result,byteLength:i.byteLength},a=r.list.add(o);r.cache[n]=a,r.state[n]=_0xdcb724.Ready,delete r.state[n],delete r.parseTaskMap[n],_0xe654f8+=i.byteLength;for(var s=r.list.head;_0xe654f8>_0x464955;){var l=s,u=s.item.keyWord,c=r.cache[u].item;_0xe654f8-=c.byteLength,delete r.cache[u],s=s.next,r.list.remove(l)}}),(function(i){return r.request(e,t)})):r.request(e,t)},_0x3fad8f.prototype.request=function(e,t){var i=e.keyWord,n=e.request,r=o$10(e.url,void 0,n);if(e$2b(r)){this.state[i]=_0xdcb724.Loading;var o=this;r.then((function(e){if(t._layerScheduler._prepareLoaded||t._layerScheduler.dealWithPrepareLoad(e.byteLength),delete o.requestMap[i],e$2b(o.state[i])){o.state[i]=_0xdcb724.Loaded;var r=_0x111f70(e,n.quadKeyIndex);if(!e$2b(r))return delete o.requestMap[i],void(o.state[i]=_0xdcb724.Failed);var a=new Uint8Array(r),s=new DataView(r),l=0,u=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT,o.zipBufferCache[i]=[];for(var c=0;c<u;c++){var h=s.getUint32(l,!0),d=a$K(a,l+=Uint32Array.BYTES_PER_ELEMENT,h);l+=h;var f=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var p=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var _=new Uint8Array(r).slice(l,l+p);o.zipBufferCache[i].push({unzipLength:f,zippedLength:p,zipBuffer:_,name:d}),l+=p}}}),(function(e){delete o.requestMap[i],o.state[i]=e$2b(e)?_0xdcb724.Failed:_0xdcb724.UnLoad}))}else delete this.requestMap[i]},_0x3fad8f.prototype.parse=function(e,t){if(!this.parseTaskMap[e]){var i=this.zipBufferCache[e];if(!e$2b(i))return void(this.state[e]=_0xdcb724.UnLoad);var n=t.taskMap[e];e$2b(n)||(n=t.taskMap[e]={data:{data:i,isCRN:t.isCrnTexture},priority:t.ownerEntity._disFromCamera,state:0,priorityFunction:_0x51d202(t.ownerEntity),processorName:"UnZipData"});var r=_0x46a73d.startTask(n);if(e$2b(r)){this.parseTaskMap[e]=!0,this.state[e]=_0xdcb724.Parsing;var o=this;r.then((function(i){try{delete o.zipBufferCache[e],delete t.taskMap[e];for(var n=i.data,r={},a=0;a<n.length;a++){var s=n[a],l=s.name,u=new Uint8Array(s.unzipBuffer).buffer,c=new DataView(u),h=0;c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var d=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var f=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var p=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var _=new Uint8Array(u,h,p);h+=p,r[l]={width:d,height:f,arrayBufferView:_}}var m={keyWord:e,result:r,byteLength:u.byteLength},g=o.list.add(m);o.cache[e]=g,o.state[e]=_0xdcb724.Ready;var x=e.indexOf("_"),v=e.slice(0,x),y=e.slice(x+1);if(e$2b(o.indexedDBSchedulers[v])){var $={blob:{keyWord:y,result:r,byteLength:u.byteLength},key:y,tablename:o.tablenames[v],dbname:o.indexedDBSchedulers[v].dbname};_0x46a73d.indexTaskProcessor.scheduleTask($,[])}delete o.state[e],delete t.taskMap[e],delete o.parseTaskMap[e],_0xe654f8+=u.byteLength;for(var b=o.list.head;_0xe654f8>_0x464955;){var T=b.item,C=b,S=T.keyWord,w=o.cache[S].item;_0xe654f8-=w.byteLength,delete o.cache[S],b=b.next,o.list.remove(C)}}catch(e){console.log(e),console.log(t.ownerEntity)}})).otherwise((function(i){delete t.taskMap[e],delete o.parseTaskMap[e],e$2b(o.state)&&(e$2b(i)?(console.log(i),o.state[e]=_0xdcb724.Failed):o.state[e]=_0xdcb724.Loaded)}))}}},_0x3fad8f.prototype.get=function(e,t,i,n){var r=e+"_"+i,o=this.cache[r];if(e$2b(o))return this.list.splice(this.list.tail,o),o.item;var a=this.state[r];e$2b(a)||(a=this.state[r]=_0xdcb724.UnLoad),a===_0xdcb724.UnLoad&&this.prepareRequest(e,t,i,n.ownerEntity,n),a===_0xdcb724.Loaded&&this.parse(r,n)},_0x3fad8f.prototype.del=function(e,t){var i=e+"_"+t;delete this.state[i],delete this.zipBufferCache[i];var n=this.requestMap[i];e$2b(n)&&(n.cancelled=!0,delete this.requestMap[i])};var _0x5611c5=(_0x4ac135=!0,function(e,t){var i=_0x4ac135?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4ac135=!1,i}),_0x35dd21=_0x5611c5(void 0,(function(){return _0x35dd21.toString().search("(((.+)+)+)+$").toString().constructor(_0x35dd21).search("(((.+)+)+)+$")})),_0x4ac135;_0x35dd21();var _0x454bc5=null,_0xeadd26=null;function _0x1309b8(){this._taskProcessorReady=!1}function _0x587082(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a,s,l,u,c=r[o],h=4*o,d=new e$29(0,0,0,0);if(c>=0&&c<=1){c<e$2a.EPSILON9?c=e$2a.EPSILON9:1-c<e$2a.EPSILON9&&(c=1-e$2a.EPSILON9);var f=_0x4f1c92(c);d.x=f.x,d.y=f.y,d.z=f.z,d.w=1}a=255*d.x,s=255*d.y,l=255*d.z,u=255*d.w,e$2b(i)&&!0===i?(e[h+0]=l,e[h+1]=s,e[h+2]=a,e[h+3]=u):(e[h+0]=a,e[h+1]=s,e[h+2]=l,e[h+3]=u)}return new Uint8Array(e.buffer,0,e.length)}function _0x1b3561(e,t,i){for(var n=new Uint8Array(4*e.length),r=0;r<e.length;r++){var o,a,s,l,u=e[r],c=4*r,h=new e$29(0,0,0,0);if(u>=0&&u<=1){var d=_0x4f1c92(u);h.x=d.x,h.y=d.y,h.z=d.z,h.w=1}o=255*h.x,a=255*h.y,s=255*h.z,l=255*h.w,e$2b(i)&&!0===i?(n[c+0]=parseInt(s),n[c+1]=parseInt(a),n[c+2]=parseInt(o),n[c+3]=parseInt(l)):(n[c+0]=parseInt(o),n[c+1]=parseInt(a),n[c+2]=parseInt(s),n[c+3]=parseInt(l))}return n}function _0x351f4b(e,t){for(var i=e.length/4,n=new Float32Array(e.buffer,e.byteOffset,i),r=0;r<n.length;r++){var o=n[r],a=4*r;if(o<0||o>1)e[a+0]=255,e[a+1]=255,e[a+2]=255,e[a+3]=255;else{o=o*(t._ceiling-t._floor)+t._floor;var s=t._dictColorTable.getColor(o);e[a+0]=255*s.red,e[a+1]=255*s.green,e[a+2]=255*s.blue,e[a+3]=255*s.alpha}}return new Uint8Array(e.buffer,0,e.length)}function _0x4a8014(e,t){var i=e.length/4;return _0x3da2dc(new Float32Array(e.buffer,e.byteOffset,i),t)}function _0x4f1c92(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function _0x3880d7(e,t){for(var i=new Uint8Array(4*e.length),n=t._ceiling-t._floor,r=0,o=e.length;r<o;r++){var a=e[r],s=4*r;if(a<0||a>1)i[s+0]=255,i[s+1]=255,i[s+2]=255,i[s+3]=255;else{a=a*n+t._floor;var l=t._dictColorTable.getColor(a);i[s+0]=255*l.red,i[s+1]=255*l.green,i[s+2]=255*l.blue,i[s+3]=255*l.alpha}}return i}function _0x3da2dc(e,t){var i=e,n=i.length,r=_0x1c5342._malloc(Float32Array.BYTES_PER_ELEMENT*n);_0x1c5342.HEAPF32.set(i,r/Float32Array.BYTES_PER_ELEMENT);var o=t._ceiling,a=t._floor,s=t._dictColorTable._dictTable._hash,l=[],u=[];for(var c in s)l.push(parseFloat(c));l.sort((function(e,t){return e-t}));for(var h=0,d=l.length;h<d;h++)u.push(s[l[h]]);var f=new ArrayBuffer(4*l.length),p=new Uint8Array(f),_=0;for(d=l.length;_<d;_++){var m=u[_];p[4*_]=255*m.red,p[4*_+1]=255*m.green,p[4*_+2]=255*m.blue,p[4*_+3]=255*m.alpha}var g=new Float32Array(f),x=(c=new Float32Array(l)).length,v=_0x1c5342._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x1c5342.HEAPF32.set(c,v/Float32Array.BYTES_PER_ELEMENT);var y=_0x1c5342._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x1c5342.HEAPF32.set(g,y/Float32Array.BYTES_PER_ELEMENT);var $=_0x454bc5(r,n,o,a,v,y,x),b=new Uint8Array(_0x1c5342.HEAPU8.buffer,$,4*n);return _0xeadd26($),_0x1c5342._free(r),_0x1c5342._free(v),_0x1c5342._free(y),b}function _0x2af3cf(e,t,i,n){var r=p$1d.multiply(t,i,new p$1d),o=e.vertexAttributes[0],a=o.typedArray,s=new Float32Array(a.buffer,a.byteOffset,a.byteLength/4),l=o.componentsPerAttribute,u=e.verticesCount,c=new Float32Array(3*u),h=e.attrLocation;h.aRatio=Object.keys(h).length;for(var d=0;d<u;d++){var f=new o$1p(s[d*l],s[d*l+1],s[d*l+2]),p=new o$1p;p$1d.multiplyByPoint(r,f,p);var _=a$18.fromCartesian(p),m=e$2a.toDegrees(_.longitude),g=e$2a.toDegrees(_.latitude),x=_.height,v=(m-n.left)/n.width,y=(g-n.bottom)/n.length,$=(x-n.minHeight)/n.height;c[3*d]=v,c[3*d+1]=y,c[3*d+2]=$}e.vertexAttributes.push({index:h.aRatio,typedArray:c,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0x4c68d7(e,t,i){e._version=i.version,e._dataVersion=i.dataVersion,e._gl;var n=i.groupNode,r=i.geoPackage,o=i.matrials.material,a=e._context,s=e.materialManager;if(e$2b(s)||(s=e.materialManager=new _0x5b0881),e$2b(a._subTextureManager)||(a._subTextureManager=new _0x3fad8f),e.indexedDBSetting.isGeoTilesSave&&!e$2b(a._subTextureManager.indexedDBSchedulers[e.id])&&e$2b(e._layerScheduler._indexedDBScheduler)&&(a._subTextureManager.indexedDBSchedulers[e.id]=e._layerScheduler._indexedDBScheduler,a._subTextureManager.tablenames[e.id]=e._layerScheduler.tablename+"Texture"),e._layerScheduler._prepareLoaded||!t._prepareLoad)for(var l=0,u=o.length;l<u;l++){var c=o[l].material,h=c.id,d=s.create(h);d.createPBRParamter(c),d.ownerLayerName=e.name,d.ownerEntity=t;var f=c.ambient;e$2b(f)&&(d._ambientColor=new e$1U(f.r,f.g,f.b,f.a));var p=c.diffuse;e$2b(p)&&(d._diffuseColor=new e$1U(p.r,p.g,p.b,p.a));var _=c.specular;e$2b(_)&&(d._specularColor=new e$1U(_.r,_.g,_.b,_.a)),d._shininess=u$_(c.shininess,d._shininess),d._bTransparentSorting=u$_(c.transparentsorting,!1),d.id=h;for(var m=c.textureunitstates,g=0;g<m.length;g++){var x=m[g].textureunitstate,v=x.id;0===x.addressmode.u?q$19.REPEAT:q$19.CLAMP_TO_EDGE,0===x.addressmode.v?q$19.REPEAT:q$19.CLAMP_TO_EDGE;var y,$=i.texturePackage[v];if(e$2b($))e$2b(y=0===g?d.createTexture(a,e,t._isRootTile,t._rootName,v,$,i.rootBatchIdMap,i.ancestorMap):d.createBakeTexture(a,e,t._isRootTile,t._rootName,v,$,i.rootBatchIdMap,i.ancestorMap))&&(t._texturesByteLength+=y._sizeInBytes)}}var b=e._matModel,T=n.pageLods,C=!0;for(l=0;l<T.length;l++){var S=new _0x46a5cb;S._fileType=e._fileType;var w=T[l];if(""===w.childTile?S._isLeafNode=!0:C=!1,S._rangeMode=w.rangeMode,S._rangeDataList=w.childTile,S._rangeList=w.rangeList,-1===w.boundingSphere.radius&&(w.boundingSphere.radius=6378137),S._isLeafNode||(S._boundingSphere=new i$1c(w.boundingSphere.center,w.boundingSphere.radius),i$1c.transform(S._boundingSphere,e._matModel,S._boundingSphere)),e$2b(w._obb)){var E=o$1p.fromElements(w._obb.obbCenter.x,w._obb.obbCenter.y,w._obb.obbCenter.z);p$1d.multiplyByPoint(e._matModel,E,E);var P=e$29.fromElements(w._obb.xExtent.x,w._obb.xExtent.y,w._obb.xExtent.z,0),A=e$29.fromElements(w._obb.yExtent.x,w._obb.yExtent.y,w._obb.yExtent.z,0),L=e$29.fromElements(w._obb.zExtent.x,w._obb.zExtent.y,w._obb.zExtent.z,0);p$1d.multiplyByVector(e._matModel,P,P),p$1d.multiplyByVector(e._matModel,A,A),p$1d.multiplyByVector(e._matModel,L,L);var M=new p$1e(P.x,A.x,L.x,P.y,A.y,L.y,P.z,A.z,L.z);S._orientedBoundingBox=new y$Z(E,M)}var R=w.geodes,O=[];if(e._layerScheduler._prepareLoaded||!t._prepareLoad)for(var I=0;I<R.length;I++){var D,B=R[I],N=B.matrix;if(1===e._heightScale)D=p$1d.multiply(b,N,new p$1d);else{var F=p$1d.multiplyByScale(N,new o$1p(1,1,e._heightScale),new p$1d);D=p$1d.multiply(b,F,new p$1d)}N=p$1d.unpack(N);for(var U=B.skeletonNames,G=0;G<U.length;G++){var z=U[G],V=r[z],k=V.vertexPackage;if(_0x143c43(V,e)){var W;if(S._isLeafNode){var H=k.boundingSphere;e$2b(H)?(W=new i$1c(H.center,H.radius),i$1c.transform(W,D,W)):W=_0x58bcd6.calcBoundingSphere(e,k,D),O.push(W)}var q=_0x58bcd6.calcBoundingRectangle(e,k),j=V.arrIndexPackage,Y=V.pickInfo,X={};for(u=0;u<j.length&&u<1;u++){var K=j[u];if(e$2b(K)){h=K.materialCode;var Q=s.create(h);X[h]=Q}}var Z={context:e._context,vertexPackage:k,arrIndexPackage:j,edgeGeometry:V.edgeGeometry,pickInfo:Y,version:i.version,mapPass:X,layer:e,entity:t,matModel:D,boundingVolume:S._boundingSphere?S._boundingSphere:W,boundingRectangle:q,volObj:null,fileType:e._fileType,isS3MB:e._isS3MB,geoMatrix:N,dataType:e._dataType,level:e._level,geoName:z,isS3MBlock:!0};if(e$2b(e.themeStyle)){var J=_0x14f094.createRenderEntityPageLOD(Z,e);S._renderEntityList=S._renderEntityList.concat(J)}else{var ee=new _0x30a010(Z);if(e._imageryLayer instanceof Array){for(var te=[],ie=0;ie<e._imageryLayer.length;ie++){var ne=e._imageryLayer[ie];if(e$2b(ne)&&(ne instanceof h$Q||ne instanceof i$O)){var re=ne.getImagery(V.cartographicBounds);te=te.concat(re)}}te.length>0&&ee.setImagerys(te,V.cartographicBounds)}else{if(e$2b(e._imageryLayer)&&(e._imageryLayer instanceof h$Q||e._imageryLayer instanceof i$O))((te=e._imageryLayer.getImagery(V.cartographicBounds)).length>0||e._needCoverImageryLayer)&&ee.setImagerys(te,V.cartographicBounds)}S._renderEntityList.push(ee)}}}}S._isLeafNode&&(S._boundingSphere=i$1c.fromBoundingSpheres(O,new i$1c)),e$2b(t._pagelodMap[w.childTile])?(t._pagelodMap[w.childTile]._renderEntityList=S._renderEntityList,t._pagelodMap[w.childTile]._ready=!0):(t._childrenPageLod.push(S),e.LoadingPriority===_0x10659f.UsePagedLodInfo&&(S._ready=!0,t._childrenPageLod.shift(),S._isLeafNode=!0))}if(t._isLeafTile=C,!e$2b(t._boundingSphere)||t._isLeafTile){for(var oe=[],ae=t._childrenPageLod.length;ae--;)oe.push(t._childrenPageLod[ae]._boundingSphere);t._boundingSphere=i$1c.fromBoundingSpheres(oe),t._oriBoundingSphere=i$1c.clone(t._boundingSphere)}t._s3mLoadState=N$P.PARSED}function _0x3353d5(e,t,i){var n=e[i._fileName];if(e$2b(n)){i._blockKey=i._fileName,i._isAncestorBlock=!0,i._rootBatchIdMap=n.rootBatchIdMap,i._ancestorMap=n.ancestorMap,_0x4c68d7(t,i,n);for(var r=[i];r.length;)for(var o=r.pop(),a=o._childrenPageLod,s=0,l=a.length;s<l;s++){var u=a[s],c=u._rangeDataList;if(""!==c){var h=new _0x206cda;if(h.layer=o.layer,h._subdomainIndex=o._subdomainIndex+s+1,h._priority=o._priority-1,h._rootBatchIdMap=e$2b(n)?n.rootBatchIdMap:o._rootBatchIdMap,h._ancestorMap=e$2b(n)?n.ancestorMap:o._ancestorMap,h._rootName=o._rootName,c.indexOf("/")>-1){var d=c.lastIndexOf("/"),f=c.substring(0,d+1);h._fileName=c.substring(d+1),h._relativePath=new Uri(f).resolve(o._relativePath)}else h._relativePath=o._relativePath,h._fileName=c;h._boundingSphere=u._boundingSphere,h._originalBS=u._originalBS,h._orientedBoundingBox=u._orientedBoundingBox,u._entity=h,e$2b(n=e[h._fileName])?(h._blockKey=o._blockKey,h._isChildBlock=!0,_0x4c68d7(t,h,n),r.push(h)):(h._isAncestorBlock=!0,h._blockKey=h._fileName)}}}}function _0x5fb1bc(e){return function(){return e._disFromCamera}}function _0x2619e0(e){return e$2b(e.clampRegionEdge)&&e.clampRegionEdge}function _0x143c43(e,t){var i=e.vertexPackage;if(i.verticesCount<1)return!1;if(t._fileType===d$15.ClampGroundPolygon){var n=t.style3D.fillStyle;return n===fr$2.WireFrame?_0x2619e0(i):n!==fr$2.Fill||!_0x2619e0(i)}return!0}null!==_0x1c5342&&(_0x454bc5=_0x1c5342.cwrap("floatToTextureColor","number",["number","number","number","number","number","number","number"]),_0xeadd26=_0x1c5342.cwrap("free_result",null,["number"])),_0x1309b8.parseResult=function(e,t,i,n){t._version=e.version,t._dataVersion=e.dataVersion;var r=t._gl,o=e.groupNode,a=e.geoPackage,s=e.matrials.material,l={},u=[],c=t._context;t._RGBTOBGR;var h=i._fileName.split("_"),d=parseInt(h[1]),f=parseInt(h[2]);if(d=Math.pow(2,t._level)-d-1,t._layerScheduler._prepareLoaded||!i._prepareLoad){if(e$2b(t._imageryLayer))if(t._imageryLayer instanceof Array)for(var p=0;p<t._imageryLayer.length;p++)u.push(t._imageryLayer[p]._imageryProvider._readyPromise);else(t._imageryLayer instanceof h$Q||t._imageryLayer instanceof i$O)&&u.push(t._imageryLayer._imageryProvider._readyPromise);for(var _=0,m=s.length;_<m;_++){var g=s[_].material,x=g.id,v=!1;if(e$2b(t._materialMap)){var y=t._materialMap[x];e$2b(y)&&(g=y.material,v=!0)}var $=new _0x21d1b1({});$.isAssociateMaterial=v,i._tmpMaterialArr.push($),$.createPBRParamter(g),l[x]=$;var b=u$_(g.ambient,e$1U.WHITE);$._ambientColor=new e$1U(b.r,b.g,b.b,b.a);var T=u$_(g.diffuse,e$1U.WHITE);$._diffuseColor=new e$1U(T.r,T.g,T.b,T.a);var C=u$_(g.specular,e$1U.WHITE);$._specularColor=new e$1U(C.r,C.g,C.b,C.a),$._shininess=u$_(g.shininess,10),$._bTransparentSorting=u$_(g.transparentsorting,!1),$._alphaMode=g.alphaMode;var S=g.textureunitstates;0===S.length&&t._fileType===d$15.OSGBFile&&($._isInvalidOblique=!0);for(var w=0;w<S.length;w++){var E=S[w].textureunitstate,P=E.id,A=P.indexOf("PBRMaterialParam")>-1,L=$._baseColorTextureIndex===w,M=$._emissiveTextureIndex===w,R=$._normalTextureIndex===w,O=$._metallicRoughnessTextureIndex===w,I=$._occlusionTextureIndex===w;A&&($._usePBRTextureBatch=!0);var D=0===E.addressmode.u?q$19.REPEAT:q$19.CLAMP_TO_EDGE,B=0===E.addressmode.v?q$19.REPEAT:q$19.CLAMP_TO_EDGE;0===w&&($._texMatrix=p$1d.unpack(E.texmodmatrix));var N=e.texturePackage[P]||e.texturePackage[P+"\0"],F=P+t._id+t._context._id+i._relativePath.path+i._fileName;if(e$2b(N)&&(F+=N.imageBuffer.length),e$2b(N)&&N.width>0&&N.height>0&&N.imageBuffer.length>0){var U={isPBRMaterialParam:A,isEmissiveTex:M,isNormalTexture:R,isMetallicRoughnessTexture:O,isBaseColorTexture:L};switch(N.compressType){case _0x3dfacd.WEBP:$._RGBTOBGR=N.nFormat===_0x3dfacd.ABGR;var G=$.createWebp(F,P,c,w,N.imageBuffer,N.width,N.height,D,B,N.mipmapLevel,t.mipmapEnabled);u.push(G);break;case _0x3dfacd.CRN_DXT5:if(!e$2b(z=$.createCRN(F,P,c,w,N,D,B,!1,t.mipmapEnabled,U)))return void i.parsingResult;u.push(z);break;case _0x3dfacd.STANDARD_CRN:var z;if(!e$2b(z=$.createCRN(F,P,c,w,N,D,B,!0,t.mipmapEnabled)))return void i.parsingResult;u.push(z);break;case _0x3dfacd.KTX2:var V=$.createKTX2(F,P,c,w,N,D,B,t.mipmapEnabled);e$2b(V)&&u.push(V);break;default:var k=Se$d.CreateTexture(F,c,N.width,N.height,N.nFormat,N.compressType,N.imageBuffer,!1,D,B,t.mipmapEnabled,N.oriCompressType);A?$.pbrParamTexture=k:M?$.emissiveTexture=k:R?$.normalTexture=k:O?$.metallicRoughnessTexture=k:I?$.occlusionTexture=k:L?$.baseColorTexture=k:$._textures.push(k)}}else if(t._isTextureShare&&!e$2b(t._materialMap)){F=P+t._id+t._context._id,P.lastIndexOf("\\")>-1&&(P=f$O(P.replace(/\\/g,"/").replace("png","dxtz"))),P.lastIndexOf("/")>-1&&(P=f$O(P.replace("png","dxtz")));var W=t._baseUri+"Texture/"+P;e$2b(a$O.CREDENTIAL)&&(W=a$O.addToken(W));var H=$.requestSharedTexture(W,F,P,c,w,t.customRequestHeaders,D,B);if(e$2b(H)&&H instanceof _0x2dc616){k=H;L?$.baseColorTexture=k:M?$.emissiveTexture=k:R?$.normalTexture=k:O?$.metallicRoughnessTexture=k:I&&($.occlusionTexture=k),0==w&&$._textures.length>0?$._textures.splice(0,0,k):$._textures.push(k)}else e$2b(H)&&u.push(H)}if(e$2b(t._maps)&&t._maps.mapNames.length>0){var q=P.substring(0,P.indexOf("."))+"_"+i._fileName+"."+t._maps.mapExts[0],j=i._relativePath.path;i._relativePath.path=t._maps.mapNames[0]+"/"+i._relativePath.path;var Y=i._relativePath.resolve(t._baseUri)+q;i._relativePath.path=j,Y=Y.replace(/\+/g,"%2b");var X=o$1l.defer(),K=X.promise;u.push(K);var Q=o$10(Y,void 0);e$2b(Q)?function(e,t,i,n){e.then((function(e){if(e$2b(e)){var r=w$Q({uint8Array:e,format:"image/webp"});e$2b(r)?(o=t,a=i,s=n,r.then((function(e){if(e$2b(e)){var t=new t$V({context:c,source:e,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({wrapS:D,wrapT:B,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})});t.id=o+"map",a._mapTextures[o]=t,Se$d.textureManager.textures[t.id]=t,Se$d.textureManager.refCounts[t.id]=1}s.resolve(Y)}),(function(e){s.resolve()}))):n.resolve(),e=null}else n.resolve();var o,a,s}),(function(e){n.resolve()}))}(Q,F,$,X):X.resolve()}if("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt){var Z=x+"_"+i._fileName;Z=""!==t._volName?Z+"_"+t._volName:Z,"vol_texture_mapping"===t._strVolumeExt?Z+=".vol":Z+=".png";var J=i._relativePath.resolve(t._baseUri)+Z;if(0!==t.urlType){var ee=t._urlArguments,te=J.indexOf("datas")+5,ie=ee.layer3DName,ne=J.substring(J.indexOf("/path/")+6).split("/"),re=ee.scene3DName,oe=ne[0],ae=ne[1].substring(0,ne[1].indexOf(".")),se=ne[1].substring(ne[1].indexOf(".")+1,ne[1].length);J=J.substring(0,te)+"?layerName="+ie+"&rootTile="+oe+"&tile="+ae+"&suffix="+se+"&scene3DName="+re+"&layer3DName="+ie}var le=void 0;"vol_texture_mapping"===t._strVolumeExt?e$2b(le=o$10(J,void 0))&&function(e,n,r){e.then((function(e){var o;if(e$2b(e)){var a=void 0,s=new Uint8Array(e,8),l=nt$9.inflate(s).buffer;if(1===new Float64Array(l,0,1)[0]){var u=new Uint32Array(l,8,4),c=u[0],h=u[1];u[2];var d=u[3];a={nFormat:c,nWidth:h,nHeight:d,nPixelSize:d,imageArray:new Float32Array(l,24,nCount)}}if(e$2b(a)){var f,p=tt$h.LINEAR,_=rt$i.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(p=tt$h.NEAREST,_=rt$i.NEAREST),t._hypsometricSetting.filterMode===k$Q.FilterMode.LINEAR?f=_0x1b3561(a.imageArray,t._hypsometricSetting,!0):(f=null===_0x454bc5?_0x3880d7(a.imageArray,t._hypsometricSetting):_0x3da2dc(a.imageArray,t._hypsometricSetting),(o=new t$V({context:t._context,width:a.nWidth,height:a.nHeight,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({minificationFilter:p,magnificationFilter:_})})).copyForm({width:a.nWidth,height:a.nHeight,arrayBufferView:f}),i._volTexures[n]=o,r.texID2Vol=texureId),e=null}}}),(function(e){}))}(le,F,$):"png"===t._strVolumeExt&&(e$2b(le=t$T(J))&&(e$2b(le=t$T(J))&&function(e,n,r){e.then((function(e){var o;if(e$2b(e)){var a,s=tt$h.LINEAR,l=rt$i.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(s=tt$h.NEAREST,l=rt$i.NEAREST),a=t._hypsometricSetting.filterMode===k$Q.FilterMode.LINEAR?_0x1b3561(d$13(e),t._hypsometricSetting,!0):null==_0x454bc5?_0x351f4b(d$13(e),t._hypsometricSetting):_0x4a8014(d$13(e),t._hypsometricSetting),(o=new t$V({context:t._context,width:e.width,height:e.height,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({minificationFilter:s,magnificationFilter:l})})).copyFrom({width:e.width,height:e.height,arrayBufferView:a}),e=null,i._volTextures[n]=o,r.texID2Vol=n}}),(function(e){}))}(le,F,$)))}}}}o$1l.all(u,(function(){if(i._tmpMaterialArr.length=0,i._s3mLoadState!==N$P.UNLOAD){var n,s;if(e$2b(t._volData)){n=t._volData._volBounds;var u=t._context._id+"_"+t.id+"_layerVol",c=k$Q.FilterMode.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(c=k$Q.FilterMode.NEAREST),e$2b(t._hypsometricSetting)&&e$2b(t._volData._buffer)&&(c===k$Q.FilterMode.NEAREST?null===_0x454bc5?_0x351f4b(t._volData._buffer,t._hypsometricSetting):t._volData._buffer=_0x4a8014(t._volData._buffer,t._hypsometricSetting):_0x587082(t._volData._buffer,t._hypsometricSetting));var h={};h.nLength=t._volData._nLength,h.imageArray=t._volData._buffer;var p=Se$d.CreateVolumeTexture(u,r,t._context,h,c);delete t._volData._buffer,t._volData._buffer=void 0,s={volTexture:p,nFormat:3201,nSideBlockCount:t._volData._nSideBlockCount,nBlockLength:t._volData._nBlockLength,nLength:t._volData._nLength,nWidth:t._volData._width,nHeight:t._volData._height,nDepth:t._volData._depth,id:u,dataFloor:t._volData._minValue,dataCeil:t._volData._maxValue,volBounds:n},i._volObj=s}else if("vol"===t._strVolumeExt)if(e.volImageBuffer){n=e.volBounds;u=t._context._id+"_"+t.id+"_"+i._relativePath.resolve(t._baseUri)+"_"+i._fileName,c=k$Q.FilterMode.LINEAR;e$2b(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(c=k$Q.FilterMode.NEAREST),3201===e.volImageBuffer.nFormat&&e$2b(t._hypsometricSetting)&&(c===k$Q.FilterMode.NEAREST?null===_0x454bc5?_0x351f4b(e.volImageBuffer.imageArray,t._hypsometricSetting):e.volImageBuffer.imageArray=_0x4a8014(e.volImageBuffer.imageArray,t._hypsometricSetting):_0x587082(e.volImageBuffer.imageArray,t._hypsometricSetting)),s={volTexture:p=Se$d.CreateVolumeTexture(u,r,t._context,e.volImageBuffer,c),nFormat:e.volImageBuffer.nFormat,nSideBlockCount:e.volImageBuffer.nSideBlockCount,nBlockLength:e.volImageBuffer.nBlockLength,nLength:e.volImageBuffer.nLength,nWidth:e.volImageBuffer.nWidth,nHeight:e.volImageBuffer.nHeight,nDepth:e.volImageBuffer.nDepth,id:u,dataFloor:t._fMinValue,dataCeil:t._fMaxValue,volBounds:n},delete e.volImageBuffer.imageArray,e.volImageBuffer.imageArray=null,e$2b(i._volObj)&&Se$d.DecRef(i._volObj.id),i._volObj=s}else t._bVolume&&(e$2b(s=i._volObj)&&(n=i._volObj.volBounds));for(var _=t._matModel,m=o.pageLods,g=!0,x=0;x<m.length;x++){var v=new _0x46a5cb;v._fileType=t._fileType;var y=m[x];if(""===y.childTile?v._isLeafNode=!0:g=!1,v._rangeMode=y.rangeMode,v._rangeDataList=y.childTile,v._rangeList=y.rangeList,-1===y.boundingSphere.radius&&(y.boundingSphere.radius=6378137),y.boundingSphere&&(t._dataVersion>2||!v._isLeafNode)&&(v._boundingSphere=new i$1c(y.boundingSphere.center,y.boundingSphere.radius),v._originalBS=new i$1c(y.boundingSphere.center,y.boundingSphere.radius),i$1c.transform(v._boundingSphere,t._matModel,v._boundingSphere)),e$2b(y._obb)){var $=o$1p.fromElements(y._obb.obbCenter.x,y._obb.obbCenter.y,y._obb.obbCenter.z),b=e$29.fromElements(y._obb.xExtent.x,y._obb.xExtent.y,y._obb.xExtent.z,0),T=e$29.fromElements(y._obb.yExtent.x,y._obb.yExtent.y,y._obb.yExtent.z,0),C=e$29.fromElements(y._obb.zExtent.x,y._obb.zExtent.y,y._obb.zExtent.z,0),S=new p$1e(b.x,T.x,C.x,b.y,T.y,C.y,b.z,T.z,C.z);v._orientedBoundingBox=new y$Z($,S),v._orientedBoundingBox._updateBBox(),v.min=v._orientedBoundingBox.bbox[0].clone(),v.max=v._orientedBoundingBox.bbox[0].clone();for(var w,E=1;E<8;E++)w=v._orientedBoundingBox.bbox[E],v.min.x>w.x&&(v.min.x=w.x),v.min.y>w.y&&(v.min.y=w.y),v.min.z>w.z&&(v.min.z=w.z),v.max.x<w.x&&(v.max.x=w.x),v.max.y<w.y&&(v.max.y=w.y),v.max.z<w.z&&(v.max.z=w.z);p$1d.multiplyByPoint(t._matModel,$,$),p$1d.multiplyByVector(t._matModel,b,b),p$1d.multiplyByVector(t._matModel,T,T),p$1d.multiplyByVector(t._matModel,C,C),S[0]=b.x,S[1]=b.y,S[2]=b.z,S[3]=T.x,S[4]=T.y,S[5]=T.z,S[6]=C.x,S[7]=C.y,S[8]=C.z,v._orientedBoundingBox.center=$,v._orientedBoundingBox.halfAxes=S,v._orientedBoundingBox.areaDirty=1}else if(e$2b(y.min)){var P=[];P.push(new o$1p(y.min.x,y.min.y,y.min.z)),P.push(new o$1p(y.min.x,y.min.y,y.max.z)),P.push(new o$1p(y.min.x,y.max.y,y.min.z)),P.push(new o$1p(y.min.x,y.max.y,y.max.z)),P.push(new o$1p(y.max.x,y.min.y,y.min.z)),P.push(new o$1p(y.max.x,y.min.y,y.max.z)),P.push(new o$1p(y.max.x,y.max.y,y.min.z)),P.push(new o$1p(y.max.x,y.max.y,y.max.z)),v.obbMin=y.min,v.obbMax=y.max;for(var A=0;A<8;A++)P[A]=p$1d.multiplyByPoint(t._matModel,P[A],P[A]);v._orientedBoundingBox=y$Z.fromPoints(P,v._orientedBoundingBox)}var L=y.geodes,M=[],R=[];if(t._layerScheduler._prepareLoaded||!i._prepareLoad)for(var O=0;O<L.length;O++){var I,D=L[O],B=D.matrix;if(1===t._heightScale)I=p$1d.multiply(_,B,new p$1d);else{var N=p$1d.multiplyByScale(B,new o$1p(1,1,t._heightScale),new p$1d);I=p$1d.multiply(_,N,new p$1d)}B=p$1d.unpack(B);for(var F=D.skeletonNames,U=0;U<F.length;U++){var G=F[U],z=a[G],V=z.vertexPackage;if(_0x143c43(z,t)){var k,W;if(v._isLeafNode&&!e$2b(v._boundingSphere)){var H=V.boundingSphere;e$2b(H)?(W=new i$1c(H.center,H.radius),k=i$1c.transform(W,I,new i$1c),W=i$1c.transform(W,B,W)):(k=_0x58bcd6.calcBoundingSphere(t,V,I),W=i$1c.transform(k,p$1d.inverse(I,new p$1d),new i$1c),i$1c.transform(W,B,W)),M.push(k),R.push(W)}for(var q=_0x58bcd6.calcBoundingRectangle(t,V),j=z.arrIndexPackage,Y=z.pickInfo,X={},K=0;K<j.length;K++){var Q=j[K];if(e$2b(Q)){var Z=Q.materialCode;if(e$2b(Z)){var J=new _0x21d1b1({});Z=Z.replace(/\0/,"");var ee=l[Z];e$2b(ee)&&ee.clone(J),X[Z]=J;for(let e=0;e<J._textures.length;e++){let t=J._textures[e];i._texturesByteLength+=t.sizeInBytes,e$2b(J.normalTexture)&&(i._texturesByteLength+=J.normalTexture._sizeInBytes),e$2b(J.baseColorTexture)&&(i._texturesByteLength+=J.baseColorTexture._sizeInBytes),e$2b(J.emissiveTexture)&&(i._texturesByteLength+=J.emissiveTexture._sizeInBytes),e$2b(J.metallicRoughnessTexture)&&(i._texturesByteLength+=J.metallicRoughnessTexture._sizeInBytes),e$2b(J.occlusionTexture)&&(i._texturesByteLength+=J.occlusionTexture._sizeInBytes)}}}}s&&(_0x2af3cf(V,t._oriMatModel,B,n),Se$d.AddRef(i._fileName));var te=u$_(y$Z.clone(v._orientedBoundingBox),i$1c.clone(v._boundingSphere));te=u$_(te,k);var ie={context:t._context,vertexPackage:V,arrIndexPackage:j,edgeGeometry:z.edgeGeometry,pickInfo:Y,version:e.version,mapPass:X,layer:t,entity:i,matModel:I,boundingVolume:te,boundingRectangle:q,volObj:s,volTexture:p,fileType:t._fileType,isS3MB:t._isS3MB,geoMatrix:B,dataType:t._dataType,level:t._level,row:d,col:f,geoName:G};if(t._fileType===d$15.PointCloudFile){var ne=G.split("#");if(ne.length>0&&"SupermapPointCloud"===ne[0]){for(var re={},oe=1;oe<ne.length;oe++){var ae=ne[oe].split("%");if(2===ae.length){var se=ae[0],le=ae[1].split("_");if(2===le.length){var ue=le[0],ce=le[1];re[se]={start:parseInt(ue),end:parseInt(ce)}}}}ie.ptIndexGroup=re}else if(G.lastIndexOf("_")>-1){var he=G.substring(0,G.lastIndexOf("_"));ie.groupName=he}}if(e$2b(t.themeStyle)&&e$2b(t.themeStyle._image)){var de=_0x14f094.createRenderEntityPageLOD(ie,t);v._renderEntityList=v._renderEntityList.concat(de)}else if(V.vertexAttributes.length>0){var fe=new _0x30a010(ie);if(t._imageryLayer instanceof Array){for(var pe=[],_e=0;_e<t._imageryLayer.length;_e++){var me=t._imageryLayer[_e];if(e$2b(me)&&(me instanceof h$Q||me instanceof i$O)){var ge=me.getImagery(z.cartographicBounds);pe=pe.concat(ge)}}pe.length>0&&fe.setImagerys(pe,z.cartographicBounds)}else{if(e$2b(t._imageryLayer)&&(t._imageryLayer instanceof h$Q||t._imageryLayer instanceof i$O))((pe=t._imageryLayer.getImagery(z.cartographicBounds)).length>0||t._needCoverImageryLayer)&&fe.setImagerys(pe,z.cartographicBounds)}v._renderEntityList.push(fe)}}}}if(v._isLeafNode&&!e$2b(v._boundingSphere)&&(v._boundingSphere=i$1c.fromBoundingSpheres(M,new i$1c),v._originalBS=i$1c.fromBoundingSpheres(R,new i$1c)),t.LoadingPriority===_0x10659f.UsePagedLodInfo){var xe=i._fileName;0===xe.indexOf("./")&&(xe=xe.substring(2));_e=xe.lastIndexOf("/");var ve=y.childTile;_e>0&&""!=ve&&(ve=xe.substring(0,_e+1)+ve),e$2b(i._pagelodMap[ve])?i._pagelodMap[ve]._renderEntityList=v._renderEntityList:(i._leafChildren.push(v),v._isLeafNode=!0)}else i._childrenPageLod.push(v)}if(i._isLeafTile=g,!e$2b(i._boundingSphere)||i._isLeafTile||i._hasLeafChild){for(var ye=[],$e=i._childrenPageLod.length;$e--;)ye.push(i._childrenPageLod[$e]._boundingSphere);for(var be=i._leafChildren.length;be--;)ye.push(i._leafChildren[be]._boundingSphere);i._boundingSphere=i$1c.fromBoundingSpheres(ye),i._oriBoundingSphere=i$1c.clone(i._boundingSphere)}for(var Te in l)if(l.hasOwnProperty(Te)){var Ce=l[Te];if(!e$2b(Ce))continue;Ce.destroy(),l[Te]=null}i._s3mLoadState=N$P.PARSED}}))},_0x1309b8.parseResultInstance=function(e,t){var i=t.instancePackage,n=t.skeletonPackages;e._version=i.version,e._gl;var r={},o=e._context,a=i.groupNode;for(C=0;C<n.length;C++){var s=(H=n.values[C]).matrials.material;for(F=0;F<s.length;F++){var l=s[F].material,u=l.id;(Se=new _0x21d1b1({})).createPBRParamter(l),r[u]=Se;var c=l.ambient;e$2b(c)&&(Se._ambientColor=new e$1U(c.r,c.g,c.b,c.a));var h=l.diffuse;e$2b(h)&&(Se._diffuseColor=new e$1U(h.r,h.g,h.b,h.a));var d=l.specular;e$2b(d)&&(Se._specularColor=new e$1U(d.r,d.g,d.b,d.a)),Se._shininess=u$_(l.shininess,Se._shininess),Se._bTransparentSorting=u$_(l.transparentsorting,Se._bTransparentSorting);var f=l.textureunitstates;for(Y=0;Y<f.length;Y++){var p=f[Y].textureunitstate,_=p.id,m=0===p.addressmode.u?q$19.REPEAT:q$19.CLAMP_TO_EDGE,g=0===p.addressmode.v?q$19.REPEAT:q$19.CLAMP_TO_EDGE;Se._texMatrix=p$1d.unpack(p.texmodmatrix);var x=H.texturePackage[_],v=_+e._id+e._context._id;if(e$2b(x)&&x.width>0&&x.height>0&&x.imageBuffer.length>0){0===x.compressType&&(e._supportCompressType=0);var y=Se$d.CreateTexture(v,o,x.width,x.height,x.nFormat,x.compressType,x.imageBuffer,!1,m,g);Se._textures.push(y)}}}}for(var $=e._matModel,b=a.pageLods,T=!0,C=0;C<b.length;C++){var S=new _0x46a5cb;S._fileType=e._fileType;var w=b[C];if(""===w.childTile?S._isLeafNode=!0:T=!1,S._rangeMode=w.rangeMode,S._rangeDataList=w.childTile,S._rangeList=w.rangeList,-1===w.boundingSphere.radius&&(w.boundingSphere.radius=6378137),w.boundingSphere&&(S._boundingSphere=new i$1c(w.boundingSphere.center,w.boundingSphere.radius),S._originalBS=new i$1c(w.boundingSphere.center,w.boundingSphere.radius),i$1c.transform(S._boundingSphere,e._matModel,S._boundingSphere)),e$2b(w._obb)){var E=o$1p.fromElements(w._obb.obbCenter.x,w._obb.obbCenter.y,w._obb.obbCenter.z),P=e$29.fromElements(w._obb.xExtent.x,w._obb.xExtent.y,w._obb.xExtent.z,0),A=e$29.fromElements(w._obb.yExtent.x,w._obb.yExtent.y,w._obb.yExtent.z,0),L=e$29.fromElements(w._obb.zExtent.x,w._obb.zExtent.y,w._obb.zExtent.z,0),M=new p$1e(P.x,A.x,L.x,P.y,A.y,L.y,P.z,A.z,L.z);if(o$1p.equals(o$1p.ZERO,P)||o$1p.equals(o$1p.ZERO,A)||o$1p.equals(o$1p.ZERO,L))S._orientedBoundingBox=void 0;else{S._orientedBoundingBox=new y$Z(E,M),S._orientedBoundingBox._updateBBox(),S.min=S._orientedBoundingBox.bbox[0].clone(),S.max=S._orientedBoundingBox.bbox[0].clone();for(var R,O=1;O<8;O++)R=S._orientedBoundingBox.bbox[O],S.min.x>R.x&&(S.min.x=R.x),S.min.y>R.y&&(S.min.y=R.y),S.min.z>R.z&&(S.min.z=R.z),S.max.x<R.x&&(S.max.x=R.x),S.max.y<R.y&&(S.max.y=R.y),S.max.z<R.z&&(S.max.z=R.z);p$1d.multiplyByPoint(e._matModel,E,E),p$1d.multiplyByVector(e._matModel,P,P),p$1d.multiplyByVector(e._matModel,A,A),p$1d.multiplyByVector(e._matModel,L,L),M[0]=P.x,M[1]=P.y,M[2]=P.z,M[3]=A.x,M[4]=A.y,M[5]=A.z,M[6]=L.x,M[7]=L.y,M[8]=L.z,S._orientedBoundingBox.center=E,S._orientedBoundingBox.halfAxes=M,S._orientedBoundingBox.areaDirty=1}}else if(e$2b(w.min)){var I=[];I.push(new o$1p(w.min.x,w.min.y,w.min.z)),I.push(new o$1p(w.min.x,w.min.y,w.max.z)),I.push(new o$1p(w.min.x,w.max.y,w.min.z)),I.push(new o$1p(w.min.x,w.max.y,w.max.z)),I.push(new o$1p(w.max.x,w.min.y,w.min.z)),I.push(new o$1p(w.max.x,w.min.y,w.max.z)),I.push(new o$1p(w.max.x,w.max.y,w.min.z)),I.push(new o$1p(w.max.x,w.max.y,w.max.z)),S.obbMin=w.min,S.obbMax=w.max;for(var D=0;D<8;D++)I[D]=p$1d.multiplyByPoint(e._matModel,I[D],I[D]);S._orientedBoundingBox=y$Z.fromPoints(I,S._orientedBoundingBox)}S._isLeafNode||(S._boundingSphere=new i$1c(w.boundingSphere.center,w.boundingSphere.radius),i$1c.transform(S._boundingSphere,e._matModel,S._boundingSphere));for(var B=w.geodes,N=[],F=0;F<B.length;F++){var U,G=B[F],z=G.matrix;if(1===e._heightScale)U=p$1d.multiply($,z,new p$1d);else{var V=p$1d.multiplyByScale(z,new o$1p(1,1,e._heightScale),new p$1d);U=p$1d.multiply($,V,new p$1d)}z=p$1d.unpack(z);for(var k=G.skeletonNames,W=0;W<k.length;W++){var H,q=k[W],j=q;if((Me=q.indexOf("#"))>-1&&(j=q.substring(0,Me)),e$2b(H=n.get(j))){var Y,X,K=[],Q={};for(Y=0;Y<H.groupNode.pageLods.length;Y++){var Z=H.groupNode.pageLods[Y].geodes;for(X=0;X<Z.length;X++)for(var J=Z[X],ee=p$1d.unpack(J.matrix,0,new p$1d),te=0;te<J.skeletonNames.length;te++){var ie=J.skeletonNames[te];Q[ie]=ee,K.push(ie)}}for(Y=0;Y<K.length;Y++){var ne=K[Y],re=Q[ne],oe=H.geoPackage[ne];if(e$2b(oe)){var ae=i.geoPackage[q],se=l$1g(ae.pickInfo),le=e$2b(oe.pickInfo)?Object.keys(oe.pickInfo):[],ue=le.length;for(var ce in se)se.hasOwnProperty(ce)&&(se[ce].skeletonIds=le);var he=ae.vertexPackage,de=oe.vertexPackage,fe={},pe=[],_e=de.vertexAttributes.length;for(X=0;X<de.vertexAttributes.length;X++){var me=p$19({},ge=de.vertexAttributes[X]);pe.push(me)}for(X=0;X<he.vertexAttributes.length;X++){var ge;if((ge=he.vertexAttributes[X]).instanceDivisor>0)(me=p$19({},ge)).index=_e++,pe.push(me)}for(var xe in _e=de.vertexAttributes.length,delete he.attrLocation.aColor,fe=p$19({},de.attrLocation),he.attrLocation)fe[xe]=he.attrLocation[xe]+_e;var ve,ye={attrLocation:fe,minVerticesValue:de.minVerticesValue,nCompressOptions:de.nCompressOptions,vertCompressConstant:de.vertCompressConstant,vertexAttributes:pe,vertexColor:de.vertexColor,verticesCount:de.verticesCount,skeletonCount:ue};if(ye.instanceIndex=he.instanceIndex,ye.instanceCount=he.instanceCount,ye.instanceMode=he.instanceMode,ye.instanceBuffer=he.instanceBuffer,ye.instanceBounds=he.instanceBounds,delete he.attrLocation.aColor,S._isLeafNode&&!e$2b(S._boundingSphere)){var $e=ye.boundingSphere;e$2b($e)?(ve=new i$1c($e.center,$e.radius),i$1c.transform(ve,U,ve)):ve=_0x58bcd6.calcBoundingSphere(e,ye,U),N.push(ve),_0x58bcd6.calcBoundingRectangle(e,ye)}var be=u$_(e$2b(S._orientedBoundingBox)?y$Z.clone(S._orientedBoundingBox):void 0,i$1c.clone(S._boundingSphere));be=u$_(be,ve);var Te=oe.arrIndexPackage,Ce={},Se=r[u=Te[0].materialCode],we=new _0x21d1b1({});e$2b(Se)&&Se.clone(we),Ce[u]=we;var Ee={context:e._context,version:i.version,vertexPackage:ye,arrIndexPackage:Te,pickInfo:se,mapPass:Ce,layer:e,entity:t,matModel:U,boundingVolume:be,fileType:e._fileType,isS3MB:e._isS3MB,geoMatrix:z,instanceSkeletonMatrix:re,dataType:e._dataType,instanceSkeletonManager:e.instanceSkeletonManager,geoName:ne,skeletonUrl:j};if(e$2b(e.themeStyle)){var Pe=_0x14f094.createRenderEntityPageLOD(Ee,e);S._renderEntityList=S._renderEntityList.concat(Pe)}else{var Ae=new _0x30a010(Ee);if(e._imageryLayer instanceof Array){for(var Le=[],Me=0;Me<e._imageryLayer.length;Me++){var Re=e._imageryLayer[Me];if(e$2b(Re)&&(Re instanceof h$Q||Re instanceof i$O)){var Oe=Re.getImagery(oe.cartographicBounds);Le=Le.concat(Oe)}}Le.length>0&&Ae.setImagerys(Le,oe.cartographicBounds)}else{if(e$2b(e._imageryLayer)&&(e._imageryLayer instanceof h$Q||e._imageryLayer instanceof i$O))((Le=e._imageryLayer.getImagery(oe.cartographicBounds)).length>0||e._needCoverImageryLayer)&&Ae.setImagerys(Le,oe.cartographicBounds)}S._renderEntityList.push(Ae)}}}}}}if(S._isLeafNode&&!e$2b(S._boundingSphere)){S._boundingSphere=i$1c.fromBoundingSpheres(N,new i$1c);for(var Ie=0;Ie<S._renderEntityList.length;Ie++)S._renderEntityList[Ie]._boundingVolume=S._boundingSphere}t._childrenPageLod.push(S)}if(t._isLeafTile=T,!e$2b(t._boundingSphere)||t._isLeafTile){for(var De=[],Be=t._childrenPageLod.length;Be--;)De.push(t._childrenPageLod[Be]._boundingSphere);t._boundingSphere=i$1c.fromBoundingSpheres(De)}if(!o$1p.equals(e._boundingSphereOffset,o$1p.ZERO)){var Ne=Math.max(Math.abs(e._boundingSphereOffset.x),Math.abs(e._boundingSphereOffset.y),Math.abs(e._boundingSphereOffset.z));t.extendRadius(Ne)}for(var Fe in r)if(r.hasOwnProperty(Fe)){var Ue=r[Fe];if(!e$2b(Ue))continue;Ue.destroy(),r[Fe]=null}t._s3mLoadState=N$P.PARSED,t.instancePackage=void 0,t.skeletonPackages=void 0,t.skeletonState=void 0},_0x1309b8.parseChildGroup=_0x3353d5,_0x1309b8.binaryDataParser=function(e,t,i,n){if(t._s3mLoadState===N$P.UNLOAD)return t.s3mBuffer=null,t.volBuffer=null,void(t.task=void 0);var r;(e._computeHeight||e._needCoverImageryLayer)&&(r=e._fileType!==d$15.OSGBFile&&e._fileType!==d$15.OSGBCacheFile||e$2b(e.waterEffectSet)?void 0:p$1d.pack(e._matModel,new Array(16)));var o,a=e._frameState.mode===C$13.SCENE3D&&e._fileType!=d$15.ClampGroundRealtimeRasterCache&&e._fileType!=d$15.PolylineEffect;if(6378137!==t$13.WGS84.radii.z&&"Ellipsoid_WGS84"!==e._globeType&&a&&!e$2b(e._animationInfo.duration)){var s=new t$13(6378137,6378137,6378137),l=o$1p.fromDegrees(e.lon,e.lat,e.height+e.style3D.bottomAltitude,s);o={sphereMatrix:m$17.eastNorthUpToFixedFrame(l,s),ellipsoidMatrix:e._matModel}}var u={buffer:i,isS3MZ:e._isS3MZ,fileType:e._fileType,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,isJsonScp:e._isJsonScp,isRoot:t._isRootTile,rootBatchIdMap:t._rootBatchIdMap,ancestorMap:t._ancestorMap,isS3MBlock:e._isS3MBlock,modelMatrix:r,materialType:e._materialType,isOSGB:e._isOSGB,isCoverImageryLayer:e._needCoverImageryLayer,fileName:t._fileName,transformPar:o,ellipsoid:6378137!==t$13.WGS84.radii.z&&"Ellipsoid_WGS84"===e._globeType},c=[i];if(e$2b(n)&&(u.bVolume=!0,u.volbuffer=n,c.push(n)),_0x46a73d.init||_0x46a73d.initWebAssembly(),_0x46a73d.taskProcessorReady){e$2b(t.task)||(t.task={data:u,transferableObjects:e._isS3MBlock?void 0:c,priority:t._disFromCamera,state:0,priorityFunction:_0x5fb1bc(t),processorName:"S3MBTilesParser"});var h=_0x46a73d.startTask(t.task);!e$2b(h)||(t._s3mLoadState=N$P.PARSING,e._layerScheduler._statistics.numberOfProcessingAttempted=0,e._layerScheduler._statistics.numberOfTilesProcessing++,h.then((function(i){if(t.s3mBuffer=null,t.volBuffer=null,t.task=void 0,t._s3mLoadState!==N$P.UNLOAD){if(e$2b(window.Proxy)){var r=t._relativePath.toString()+t._fileName;if((!0===e._indexedDBSetting.isGeoTilesSave||e._indexedDBSetting.isGeoTilesRootNodeSave&&e._layerScheduler._isRootNode(r))&&e$2b(e._layerScheduler._indexedDBScheduler)){if(e$2b(e._layerScheduler._indexedDBScheduler.cachestatus)&&e$2b(e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename])&&(1===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]||2===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]))return;var o={blob:i,key:r,tablename:e._layerScheduler.tablename,dbname:e._layerScheduler._indexedDBScheduler.dbname,reserveCount:e._localCacheMemoryReserveCount};_0x46a73d.indexTaskProcessor.scheduleTask(o,[])}e.offlineDownload&&e$2b(e._layerScheduler._indexedDBScheduler)&&(sumEntity++,e._layerScheduler._indexedDBScheduler.putElementInDB(e._layerScheduler.tablename,r,i).then((function(){savedEntity++,sumEntity===savedEntity&&console.log("complete")})).otherwise((function(e){})))}e._layerScheduler._statistics.numberOfTilesProcessing--,null==i&&(t._s3mLoadState,N$P.UNLOAD),"InstanceModel"===e._dataType?(t.skeletonState=_0x212e1c.STATE.SkeletonParsing,t.instancePackage=i):e._isS3MBlock?_0x3353d5(i,e,t):_0x1309b8.parseResult(i,e,t,n)}})).otherwise((function(i){if(e._layerScheduler._statistics.numberOfTilesProcessing--,t.task=void 0,t._s3mLoadState==N$P.UNLOAD)return t.s3mBuffer=null,void(t.volBuffer=null);e$2b(i)?(t.s3mBuffer=null,t.volBuffer=null,t._s3mLoadState=N$P.FAILED,console.log(i)):t._s3mLoadState=N$P.LOADED})))}},_0x1309b8.saveLocalCache=function(e,t){var i={tablename:e,dbname:t};_0x46a73d.indexTaskProcessor.scheduleTask(i,[])};var _0x285a40=(_0xab0760=!0,function(e,t){var i=_0xab0760?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xab0760=!1,i}),_0x3e116f=_0x285a40(void 0,(function(){return _0x3e116f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e116f).search("(((.+)+)+)+$")})),_0xab0760;_0x3e116f();var _0x2ee409={REST:0,KEY_VALUE:1},Tr$3=Object.freeze(_0x2ee409);if(typeof WebAssembly<"u"&&"object"!=typeof window){let e=function(e){return t$G.locateFile?t$G.locateFile(e,x$T):x$T+e},t=function(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1)},i=function(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return l$T[e>>0];case"i16":return A$U[e>>1];case"i32":case"i64":return E$Q[e>>2];case"float":return ue$u[e>>2];case"double":return le$u[e>>3];default:Z("invalid type for getValue: "+t)}return null},n=function(e,t){e||Z("Assertion failed: "+t)},r=function(e){var t=t$G["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=$$O(i),c(e,t,i)}return t},array:function(e){var t=$$O(e.length);return h(e,t),t}};var u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p<o.length;p++){var _=s[i[p]];_?(0===f&&(f=Te$j()),d[p]=_(o[p])):d[p]=o[p]}var m=u.apply(null,d);return m=function(e){return"string"===t?l(e):"boolean"===t?Boolean(e):e}(m),0!==f&&Ge$c(f),m},a=function(e,t,i,n){return function(){return o(e,t,i,arguments)}},s=function(e,i,n){for(var r=i+n,o=i;e[o]&&!(o>=r);)++o;if(o-i>16&&e.subarray&&De$l)return De$l.decode(e.subarray(i,o));for(var a="";i<o;){var s=e[i++];if(128&s){var l=63&e[i++];if(192!=(224&s)){var u=63&e[i++];if(224==(240&s)?s=(15&s)<<12|l<<6|u:(240!=(248&s)&&t("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),s=(7&s)<<18|l<<12|u<<6|63&e[i++]),s<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(b$_,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343)l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s);if(l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,b$_,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),l$T.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return t$G.extraStackTrace&&(e+="\n"+t$G.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){t$G.HEAP8=l$T=new Int8Array(w$L),t$G.HEAP16=A$U=new Int16Array(w$L),t$G.HEAP32=E$Q=new Int32Array(w$L),t$G.HEAPU8=b$_=new Uint8Array(w$L),t$G.HEAPU16=new Uint16Array(w$L),t$G.HEAPU32=I$Z=new Uint32Array(w$L),t$G.HEAPF32=ue$u=new Float32Array(w$L),t$G.HEAPF64=le$u=new Float64Array(w$L)},g=function(){n(0==(3&U$L)),I$Z[(U$L>>2)-1]=34821223,I$Z[(U$L>>2)-2]=2310721022},x=function(){(34821223!=I$Z[(U$L>>2)-1]||2310721022!=I$Z[(U$L>>2)-2])&&Z("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+I$Z[(U$L>>2)-2].toString(16)+" "+I$Z[(U$L>>2)-1].toString(16)),1668509029!==E$Q[0]&&Z("Runtime error: The application has corrupted its heap memory area (address zero)!")},v=function(e){Z("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(U$L-Te$j()+e)+" bytes available!")},y=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?t$G.dynCall_v(i):t$G.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},$=function(){if(t$G.preRun)for("function"==typeof t$G.preRun&&(t$G.preRun=[t$G.preRun]);t$G.preRun.length;)S(t$G.preRun.shift());y(Le$n)},b=function(){x(),!h$O&&(h$O=!0,y(Qe$a))},T=function(){x(),y(Pe$h)},C=function(){if(x(),t$G.postRun)for("function"==typeof t$G.postRun&&(t$G.postRun=[t$G.postRun]);t$G.postRun.length;)w(t$G.postRun.shift());y(je$c)},S=function(e){Le$n.unshift(e)},w=function(e){je$c.unshift(e)},E=function(e){k$L++,t$G.monitorRunDependencies&&t$G.monitorRunDependencies(k$L),e&&(n(!P$M[e]),P$M[e]=1,null===C$R&&typeof setInterval<"u"&&(C$R=setInterval((function(){if(ee$t)return clearInterval(C$R),void(C$R=null)}),1e4)))},P=function(e){if(k$L--,t$G.monitorRunDependencies&&t$G.monitorRunDependencies(k$L),e?(n(P$M[e]),delete P$M[e]):v$D("warning: run dependency removed without ID"),0==k$L&&(null!==C$R&&(clearInterval(C$R),C$R=null),Y$C)){var t=Y$C;Y$C=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(Be$h):0===e.indexOf(Be$h)},L=function(){try{if(t$G.wasmBinary)return new Uint8Array(t$G.wasmBinary);if(t$G.readBinary)return t$G.readBinary(D$O);throw"both async and sync fetching of the wasm failed"}catch(e){Z(e)}},M=function(){return t$G.wasmBinary||!W$P&&!N$G||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(D$O,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+D$O+"'";return e.arrayBuffer()})).catch((function(){return L()}))},R=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Xt$3};function i(e,t){var i=e.exports;t$G.asm=i,P("wasm-instantiate")}E("wasm-instantiate");var r=t$G;function o(e){n(t$G===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(t$G.instantiateWasm)try{return t$G.instantiateWasm(t,i)}catch{return!1}return function(){if(t$G.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(D$O)||"function"!=typeof fetch)return a(o);fetch(D$O,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},O=function(){},I=function(e,t){p$P.varargs=t;try{p$P.getStreamFromFD(),p$P.get(),p$P.get(),p$P.get(),p$P.get();return Z("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$N>"u"||!(e instanceof y$N.ErrnoError))&&Z(e),-e.errno}},D=function(){var e=t$G._fflush;e&&e(0);var t=p$P.buffers;t[1].length&&p$P.printChar(1,10),t[2].length&&p$P.printChar(2,10)},B=function(e,t){p$P.varargs=t;try{for(var i=p$P.get(),n=p$P.get(),r=p$P.get(),o=0,a=0;a<r;a++){for(var s=E$Q[n+8*a>>2],l=E$Q[n+(8*a+4)>>2],u=0;u<l;u++)p$P.printChar(i,b$_[s+u]);o+=l}return o}catch(e){return(typeof y$N>"u"||!(e instanceof y$N.ErrnoError))&&Z(e),-e.errno}},N=function(e,t){p$P.varargs=t;try{return 0}catch(e){return(typeof y$N>"u"||!(e instanceof y$N.ErrnoError))&&Z(e),-e.errno}},F=function(e,t){p$P.varargs=t;try{p$P.getStreamFromFD();return Z("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$N>"u"||!(e instanceof y$N.ErrnoError))&&Z(e),-e.errno}},U=function(){},G=function(){return l$T.length},z=function(e,t,i){b$_.set(b$_.subarray(t,t+i),e)},V=function(e){return t$G.___errno_location?E$Q[t$G.___errno_location()>>2]=e:v$D("failed to set errno from JS"),e},k=function(e){Z("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+l$T.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},W=function(e){e=_(e,65536);var t=w$L.byteLength;try{return-1!==z$L.grow((e-t)/65536)&&(w$L=z$L.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},H=function(e){var i=G();n(e>i);var r=65536,o=2147418112;if(e>o)return v$D("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+o+" bytes!"),!1;for(var a=Math.max(i,16777216);a<e;)(a=a<=536870912?_(2*a,r):Math.min(_((3*a+2147483648)/4,r),o))===i&&t("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+l$T.length);return W(a)?(m(),!0):(v$D("Failed to grow the heap from "+i+" bytes to "+a+" bytes, not enough memory!"),!1)},q=function(e){v$D("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),v$D("Build with ASSERTIONS=2 for more info."),Z(e)},j=function(e){v$D("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),v$D("Build with ASSERTIONS=2 for more info."),Z(e)},Y=function(e){v$D("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),v$D("Build with ASSERTIONS=2 for more info."),Z(e)},X=function(e){v$D("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),v$D("Build with ASSERTIONS=2 for more info."),Z(e)},K=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},Q=function(e){function t(){t$G.calledRun||(t$G.calledRun=!0,!ee$t&&(b(),T(),t$G.onRuntimeInitialized&&t$G.onRuntimeInitialized(),n(!t$G._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),C()))}e=e||t$G.arguments,k$L>0||(g(),$(),k$L>0)||t$G.calledRun||(t$G.setStatus?(t$G.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t$G.setStatus("")}),1),t()}),1)):t(),x())},Z=function(e){t$G.onAbort&&t$G.onAbort(e),ee$t=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw qe$b&&qe$b.forEach((function(i){t=i(t,e)})),t};var t$G=typeof t$G<"u"?t$G:{},q$S={},S$I;for(S$I in t$G)t$G.hasOwnProperty(S$I)&&(q$S[S$I]=t$G[S$I]);t$G.arguments=[],t$G.thisProgram="./this.program",t$G.quit=function(e,t){throw t},t$G.preRun=[],t$G.postRun=[];var W$P=!1,N$G=!1,ie$y=!1,Oe$i=!1,xe$l=!1;if(W$P="object"==typeof window,N$G="function"==typeof importScripts,Oe$i="object"==typeof process&&"function"==typeof require,ie$y=Oe$i&&!W$P&&!N$G,xe$l=!W$P&&!ie$y&&!N$G,t$G.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var x$T="",oe$r,se$s;if(ie$y)x$T=__dirname+"/",t$G.read=function(e,t){var i;return oe$r||(oe$r=require("fs")),se$s||(se$s=require("path")),e=se$s.normalize(e),i=oe$r.readFileSync(e),t?i:i.toString()},t$G.readBinary=function(e){var t=t$G.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(t$G.thisProgram=process.argv[1].replace(/\\/g,"/")),t$G.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=t$G),process.on("uncaughtException",(function(e){if(!(e instanceof K))throw e})),process.on("unhandledRejection",Z),t$G.quit=function(e){process.exit(e)},t$G.inspect=function(){return"[Emscripten Module object]"};else if(xe$l)typeof read<"u"&&(t$G.read=function(e){return read(e)}),t$G.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?t$G.arguments=scriptArgs:typeof arguments<"u"&&(t$G.arguments=arguments),"function"==typeof quit&&(t$G.quit=function(e){quit(e)});else{if(!W$P&&!N$G)throw new Error("environment detection error");N$G?x$T=self.location.href:document.currentScript&&(x$T=document.currentScript.src),x$T=0!==x$T.indexOf("blob:")?x$T.substr(0,x$T.indexOf("/Workers")+1):"",t$G.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},N$G&&(t$G.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),t$G.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},t$G.setWindowTitle=function(e){document.title=e}}var V$F=t$G.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),v$D=t$G.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||V$F);for(S$I in q$S)q$S.hasOwnProperty(S$I)&&(t$G[S$I]=q$S[S$I]);q$S=void 0,n(typeof t$G.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$G.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$G.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$G.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),Te$j=Ge$c=$$O=function(){Z("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Xt$3={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var Ae$l=0,Dt$6=function(e){Ae$l=e},Nt$6=function(){return Ae$l};"object"!=typeof WebAssembly&&Z("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var z$L,ee$t=!1,De$l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Ie$h=65536,w$L,l$T,b$_,A$U,E$Q,I$Z,ue$u,le$u,ke$a=15104,U$L=5257984,Ce$h=5257984,J$H=15072;n(ke$a%16==0,"stack must start aligned"),n(Ce$h%16==0,"heap must start aligned");var he$n=5242880;t$G.TOTAL_STACK&&n(he$n===t$G.TOTAL_STACK,"the stack size can no longer be determined at runtime");var X$K=t$G.TOTAL_MEMORY||16777216;if(X$K<he$n&&v$D("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+X$K+"! (TOTAL_STACK="+he$n+")"),n(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),t$G.buffer?(w$L=t$G.buffer,n(w$L.byteLength===X$K,"provided buffer should be "+X$K+" bytes, but it is "+w$L.byteLength)):("object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(n(X$K%Ie$h==0),z$L=new WebAssembly.Memory({initial:X$K/Ie$h}),w$L=z$L.buffer):w$L=new ArrayBuffer(X$K),n(w$L.byteLength===X$K)),m(),E$Q[J$H>>2]=Ce$h,E$Q[0]=1668509029,A$U[1]=25459,115!==b$_[2]||99!==b$_[3])throw"Runtime error: expected the system to be little-endian!";var Le$n=[],Qe$a=[],Pe$h=[],je$c=[],h$O=!1,_$J=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var k$L=0,C$R=null,Y$C=null,P$M={};t$G.preloadedImages={},t$G.preloadedAudios={};var y$N={error:function(){Z("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){y$N.error()},createDataFile:function(){y$N.error()},createPreloadedFile:function(){y$N.error()},createLazyFile:function(){y$N.error()},open:function(){y$N.error()},mkdev:function(){y$N.error()},registerDevice:function(){y$N.error()},analyzePath:function(){y$N.error()},loadFilesFromDB:function(){y$N.error()},ErrnoError:function(){y$N.error()}};t$G.FS_createDataFile=y$N.createDataFile,t$G.FS_createPreloadedFile=y$N.createPreloadedFile;var Be$h="data:application/octet-stream;base64,",D$O="ThirdParty/unzip.wasm";A(D$O)||(D$O=e(D$O)),t$G.asm=function(e,t,i){t.memory=z$L,t.table=new WebAssembly.Table({initial:22,maximum:22,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=R(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var F$Q=15088;n(F$Q%8==0);var p$P={buffers:[null,[],[]],printChar:function(e,t){var i=p$P.buffers[e];n(i),0===t||10===t?((1===e?V$F:v$D)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return p$P.varargs+=4,E$Q[p$P.varargs-4>>2]},getStr:function(){return l(p$P.get())},get64:function(){var e=p$P.get(),t=p$P.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===p$P.get())}},Bt$8={},Gt$4={abort:Z,setTempRet0:Dt$6,getTempRet0:Nt$6,abortStackOverflow:v,nullFunc_ii:q,nullFunc_iiii:j,nullFunc_jiji:Y,nullFunc_vii:X,___lock:O,___setErrNo:V,___syscall140:I,___syscall146:B,___syscall54:N,___syscall6:F,___unlock:U,_emscripten_get_heap_size:G,_emscripten_memcpy_big:z,_emscripten_resize_heap:H,abortOnCannotGrowMemory:k,emscripten_realloc_buffer:W,flush_NO_FILESYSTEM:D,tempDoublePtr:F$Q,DYNAMICTOP_PTR:J$H},T$M=t$G.asm(Bt$8,Gt$4,w$L),qt$6=T$M.___errno_location;T$M.___errno_location=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),qt$6.apply(null,arguments)};var Wt$7=T$M._fflush;T$M._fflush=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Wt$7.apply(null,arguments)};var Vt$6=T$M._free;T$M._free=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Vt$6.apply(null,arguments)};var zt$4=T$M._freePointer;T$M._freePointer=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),zt$4.apply(null,arguments)};var Jt$4=T$M._llvm_bswap_i32;T$M._llvm_bswap_i32=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Jt$4.apply(null,arguments)};var Yt$4=T$M._malloc;T$M._malloc=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Yt$4.apply(null,arguments)};var Zt$3=T$M._sbrk;T$M._sbrk=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Zt$3.apply(null,arguments)};var $t$3=T$M._unzip;T$M._unzip=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),$t$3.apply(null,arguments)};var Ht$5=T$M.establishStackSpace;T$M.establishStackSpace=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ht$5.apply(null,arguments)};var Kt$5=T$M.stackAlloc;T$M.stackAlloc=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Kt$5.apply(null,arguments)};var Mt$5=T$M.stackRestore;T$M.stackRestore=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Mt$5.apply(null,arguments)};var en$3=T$M.stackSave;T$M.stackSave=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),en$3.apply(null,arguments)},t$G.asm=T$M,t$G.___errno_location=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.___errno_location.apply(null,arguments)},t$G._emscripten_replace_memory=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._emscripten_replace_memory.apply(null,arguments)},t$G._fflush=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._fflush.apply(null,arguments)},t$G._free=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._free.apply(null,arguments)},t$G._freePointer=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._freePointer.apply(null,arguments)},t$G._llvm_bswap_i32=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._llvm_bswap_i32.apply(null,arguments)},t$G._malloc=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._malloc.apply(null,arguments)},t$G._memcpy=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._memcpy.apply(null,arguments)},t$G._memset=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._memset.apply(null,arguments)},t$G._sbrk=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._sbrk.apply(null,arguments)},t$G._unzip=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._unzip.apply(null,arguments)},t$G.establishStackSpace=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.establishStackSpace.apply(null,arguments)};var $$O=t$G.stackAlloc=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.stackAlloc.apply(null,arguments)},Ge$c=t$G.stackRestore=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.stackRestore.apply(null,arguments)},Te$j=t$G.stackSave=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.stackSave.apply(null,arguments)};t$G.dynCall_ii=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_ii.apply(null,arguments)},t$G.dynCall_iiii=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_iiii.apply(null,arguments)},t$G.dynCall_jiji=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_jiji.apply(null,arguments)},t$G.dynCall_vii=function(){return n(h$O,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!_$J,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_vii.apply(null,arguments)},t$G.asm=T$M,t$G.intArrayFromString||(t$G.intArrayFromString=function(){Z("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.intArrayToString||(t$G.intArrayToString=function(){Z("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.ccall=o,t$G.cwrap=a,t$G.setValue||(t$G.setValue=function(){Z("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getValue=i,t$G.allocate||(t$G.allocate=function(){Z("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getMemory||(t$G.getMemory=function(){Z("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.AsciiToString||(t$G.AsciiToString=function(){Z("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToAscii||(t$G.stringToAscii=function(){Z("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF8ArrayToString||(t$G.UTF8ArrayToString=function(){Z("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF8ToString||(t$G.UTF8ToString=function(){Z("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF8Array||(t$G.stringToUTF8Array=function(){Z("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF8||(t$G.stringToUTF8=function(){Z("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.lengthBytesUTF8||(t$G.lengthBytesUTF8=function(){Z("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF16ToString||(t$G.UTF16ToString=function(){Z("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF16||(t$G.stringToUTF16=function(){Z("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.lengthBytesUTF16||(t$G.lengthBytesUTF16=function(){Z("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF32ToString||(t$G.UTF32ToString=function(){Z("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF32||(t$G.stringToUTF32=function(){Z("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.lengthBytesUTF32||(t$G.lengthBytesUTF32=function(){Z("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.allocateUTF8||(t$G.allocateUTF8=function(){Z("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackTrace||(t$G.stackTrace=function(){Z("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnPreRun||(t$G.addOnPreRun=function(){Z("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnInit||(t$G.addOnInit=function(){Z("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnPreMain||(t$G.addOnPreMain=function(){Z("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnExit||(t$G.addOnExit=function(){Z("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnPostRun||(t$G.addOnPostRun=function(){Z("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.writeStringToMemory||(t$G.writeStringToMemory=function(){Z("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.writeArrayToMemory||(t$G.writeArrayToMemory=function(){Z("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.writeAsciiToMemory||(t$G.writeAsciiToMemory=function(){Z("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addRunDependency||(t$G.addRunDependency=function(){Z("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.removeRunDependency||(t$G.removeRunDependency=function(){Z("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.ENV||(t$G.ENV=function(){Z("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.FS||(t$G.FS=function(){Z("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.FS_createFolder||(t$G.FS_createFolder=function(){Z("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createPath||(t$G.FS_createPath=function(){Z("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createDataFile||(t$G.FS_createDataFile=function(){Z("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createPreloadedFile||(t$G.FS_createPreloadedFile=function(){Z("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createLazyFile||(t$G.FS_createLazyFile=function(){Z("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createLink||(t$G.FS_createLink=function(){Z("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createDevice||(t$G.FS_createDevice=function(){Z("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_unlink||(t$G.FS_unlink=function(){Z("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.GL||(t$G.GL=function(){Z("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.dynamicAlloc||(t$G.dynamicAlloc=function(){Z("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.warnOnce||(t$G.warnOnce=function(){Z("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.loadDynamicLibrary||(t$G.loadDynamicLibrary=function(){Z("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.loadWebAssemblyModule||(t$G.loadWebAssemblyModule=function(){Z("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getLEB||(t$G.getLEB=function(){Z("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getFunctionTables||(t$G.getFunctionTables=function(){Z("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.alignFunctionTables||(t$G.alignFunctionTables=function(){Z("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.registerFunctions||(t$G.registerFunctions=function(){Z("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addFunction||(t$G.addFunction=function(){Z("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.removeFunction||(t$G.removeFunction=function(){Z("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getFuncWrapper||(t$G.getFuncWrapper=function(){Z("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.prettyPrint||(t$G.prettyPrint=function(){Z("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.makeBigInt||(t$G.makeBigInt=function(){Z("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.dynCall||(t$G.dynCall=function(){Z("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getCompilerSetting||(t$G.getCompilerSetting=function(){Z("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackSave||(t$G.stackSave=function(){Z("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackRestore||(t$G.stackRestore=function(){Z("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackAlloc||(t$G.stackAlloc=function(){Z("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.establishStackSpace||(t$G.establishStackSpace=function(){Z("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.print||(t$G.print=function(){Z("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.printErr||(t$G.printErr=function(){Z("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getTempRet0||(t$G.getTempRet0=function(){Z("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.setTempRet0||(t$G.setTempRet0=function(){Z("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.Pointer_stringify||(t$G.Pointer_stringify=function(){Z("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.ALLOC_NORMAL||Object.defineProperty(t$G,"ALLOC_NORMAL",{get:function(){Z("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$G.ALLOC_STACK||Object.defineProperty(t$G,"ALLOC_STACK",{get:function(){Z("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$G.ALLOC_DYNAMIC||Object.defineProperty(t$G,"ALLOC_DYNAMIC",{get:function(){Z("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$G.ALLOC_NONE||Object.defineProperty(t$G,"ALLOC_NONE",{get:function(){Z("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),K.prototype=new Error,K.prototype.constructor=K,Y$C=function e(){t$G.calledRun||Q(),t$G.calledRun||(Y$C=e)},t$G.run=Q;var qe$b=[];if(t$G.abort=Z,t$G.preInit)for("function"==typeof t$G.preInit&&(t$G.preInit=[t$G.preInit]);t$G.preInit.length>0;)t$G.preInit.pop()();t$G.noExitRuntime=!0,Q()}else var t$G=null;var _0x3ebab5=t$G;function r$R(e){e=u$_(e,0),this._array=new Array(e),this._length=e}Object.defineProperties(r$R.prototype,{length:{get:function(){return this._length},set:function(e){this._length=e,e>this._array.length&&(this._array.length=e)}},values:{get:function(){return this._array}}}),r$R.prototype.get=function(e){return o$1q.typeOf.number.lessThan("index",e,this._array.length),this._array[e]},r$R.prototype.set=function(e,t){o$1q.typeOf.number("index",e),e>=this.length&&(this.length=e+1),this._array[e]=t},r$R.prototype.peek=function(){return this._array[this._length-1]},r$R.prototype.push=function(e){var t=this.length++;this._array[t]=e},r$R.prototype.pop=function(){return this._array[--this.length]},r$R.prototype.reserve=function(e){o$1q.typeOf.number.greaterThanOrEquals("length",e,0),e>this._array.length&&(this._array.length=e)},r$R.prototype.resize=function(e){o$1q.typeOf.number.greaterThanOrEquals("length",e,0),this.length=e},r$R.prototype.trim=function(e){e=u$_(e,this.length),this._array.length=e};var _0x2ed872=(_0x42cb9f=!0,function(e,t){var i=_0x42cb9f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42cb9f=!1,i}),_0x178ed5=_0x2ed872(void 0,(function(){return _0x178ed5.toString().search("(((.+)+)+)+$").toString().constructor(_0x178ed5).search("(((.+)+)+)+$")})),_0x42cb9f;_0x178ed5();var _0x5150e8={Normal:0,Add:1};function _0x3a8ba7(e){return function(){return e._disFromCamera}}function _0x52b7a2(e){return function(){return e._priority}}function _0x3c2b42(e,t){return function(){var i=t._currentMaxLevel,n=1/Math.pow(2,i-e._nLODLev);return e._disFromCamera*n}}var _0x2e6772=function(e){e=e||{},this._context=e.context,this._layer=e.layer,this._customRequestHeaders=e.customRequestHeaders,this._renderQueue=[],this._cache=new e$1N,this._rootEntities=[],this._cameraPos=new o$1p,this._cameraDir=new o$1p,this._cameraUp=new o$1p,this._cacheEntityCount=u$_(e.cacheEntityCount,0),this._sceneMode=C$13.SCENE3D,this._projection=null,this._oriRootEntities=e.rootEntities,this._initializeRootEntities(e.rootEntities),this._nLoadingPriority=_0x10659f.Child_Priority_NonLinear,this.createPriorityFunction=_0x3a8ba7,this._currentMaxLevel=0,this._replacementList=new h$P,this._replacementSentinel=this._replacementList.add(),this._cacheKey=e.cacheKey;var t=this._layer._baseUri.toString(),i=t.substring(0,t.indexOf("/datas"));this.tablename=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),this._indexedDBSetting=this._layer._indexedDBSetting;var n=this,r=o$1l.defer();if(n._attributes={_errorNum:0,_reStoreTimes:0,_memoryCache:0,_redownload:!1,status:{promise:r.promise,needDownload:void 0}},this._scpUrl=e.scpUrl,e$2b(window.Proxy)){var o=o$1l.defer();n._dpPromise=o.promise,new l$15({name:i+this.tablename}).then((function(e){e.checkObjectStoreExit(n.tablename)?e.checkObjectStoreExit(n.tablename+"Texture")?(_0x3c82ae(e,n,r),n._indexedDBScheduler=e,o.resolve(!0)):(_0x3c82ae(e,n,r),e.createObjectStore(n.tablename+"Texture"),n._indexedDBScheduler=e,o.resolve(!0)):e.createObjectStore(n.tablename).then((function(){e.checkObjectStoreExit(n.tablename+"Texture")?(_0x3c82ae(e,n,r),n._indexedDBScheduler=e,o.resolve(!0)):(_0x3c82ae(e,n,r),e.createObjectStore(n.tablename+"Texture"),n._indexedDBScheduler=e,o.resolve(!0))}))}))}this._rasterFrequency=0,this._statistics={numberOfPendingRequests:0,numberOfAttemptedRequests:0,numberOfTilesProcessing:0,numberOfProcessingAttempted:0,lastLoadedTrigger:{time:Date.now(),done:!1},numberOfColorChangePending:0,numberOfColorChangeAttempted:0,numberOfColorChangeProcessing:0,lastColorChangeTrigger:{time:Date.now(),done:!1}},this._statisticsLastRender=p$19({},this._statistics),this._packingRequest=!1,this._packRequestEntities=[],this._parsingEntities=[],this._attrloaded=!1,this._selectEntities=[],this._requestEntities=[],this.attrsave=!1,this._extrudedId=void 0,this._polygons=void 0,this._indexedDBRequestNum=0,this._indexedDBRequestLimit=3,this._requestByteLength=0,this._prepareLoaded=!0,this._prepareRatio=0,this._associatedFieldName=void 0,this._entityObjectId={},this._objectIdChange=!1,this._isFineLayer=!1,this._entityModelId={},this._stopLoadImagery=!1,this._savetoIndexDBDatas=[]};function _0x3c82ae(e,t,i){e.checkObjectStoreExit("attributes")?!0===t._indexedDBSetting.isAttributesSave&&e.getElementFromDB("attributes","queryFieldNames").then((function(n){if("ALL"===n&&(t._attributes.status.needDownload=!1,i.resolve(!0)),e$2b(t._layer.queryFieldNames)){for(var r=0;r<t._layer.queryFieldNames.length;r++)if(-1===n.indexOf(t._layer.queryFieldNames[r]))return t._attributes.status.needDownload=!0,e.updateElementInDB("attributes","queryFieldNames",n.concat(t._layer.queryFieldNames)),void i.resolve(!0);t._attributes.status.needDownload=!1,i.resolve(!0)}})).otherwise((function(){!0===t._indexedDBSetting.isAttributesSave&&(e$2b(t._layer.queryFieldNames)?e.putElementInDB("attributes","queryFieldNames",t._layer.queryFieldNames):e.putElementInDB("attributes","queryFieldNames","ALL"),t._attributes.status.needDownload=!0,i.resolve(!0))})):e.createObjectStore("attributes").then((function(){i.resolve(!0),!0===t._indexedDBSetting.isAttributesSave&&(e$2b(t._layer.queryFieldNames)?e.putElementInDB("attributes","queryFieldNames",t._layer.queryFieldNames):e.putElementInDB("attributes","queryFieldNames","ALL"),t._attributes.status.needDownload=!0)}))}function _0x4a3e23(e,t){!e._indexedDBSetting.isAttributesSave||(e$2b(e._indexedDBScheduler)?_0x3b47a1(e,t):e._dpPromise.then((function(){_0x3b47a1(e,t)})))}function _0x3b47a1(e,t){var i=new TextEncoder("utf-8"),n=[],r=o$1l.defer();if(e._indexedDBScheduler.checkObjectStoreExit("attributes")){for(var o in t){try{var a=JSON.stringify(t[o]);a=i.encode(a).join(256)}catch{return r.reject(null),r.promise}n.push(e._indexedDBScheduler.putElementInDB("attributes",o,a))}o$1l.all(n,(function(t){0===e._savetoIndexDBDatas.length&&e._indexedDBScheduler.putElementInDB("attributes","saved",!0)}),(function(i){t._reStoreTimes<=3&&(t._reStoreTimes++,setTimeout((function(){_0x4a3e23(e,t)}),2e3))}))}else e._indexedDBScheduler.createObjectStore("attributes").then((function(){for(var o in t){try{var a=JSON.stringify(t[o]);a=i.encode(a).join(256)}catch{return r.reject(null),r.promise}n.push(e._indexedDBScheduler.putElementInDB("attributes",o,a))}o$1l.all(n,(function(t){0===e._savetoIndexDBDatas.length&&e._indexedDBScheduler.putElementInDB("attributes","saved",!0)}),(function(i){t._reStoreTimes<=3&&(t._reStoreTimes++,setTimeout((function(){_0x4a3e23(e,t)}),2e3))}))}))}function _0xbea8e7(e,t){if(Array.isArray(e)){for(var i={},n=e.length,r=0;r<n;r++){o=e$2b(t._layer.idFieldName)?e[r][t._layer.idFieldName]:e[r].id||e[r].SmID||e[r].SMID||e[r].smid,!t._attributes.hasOwnProperty(o)&&(t._attributes[o]=e[r],i[o]=e[r],n>500&&r&&r%500==0&&(t._savetoIndexDBDatas.push(i),i={}))}t._savetoIndexDBDatas.push(i)}else{var o;e$2b(o=e.id||e.SmID||e.SMID)&&(t._attributes[o]=e)}t._attributes._memoryCache=1}function _0x59f579(e,t){var i=[],n=e._layer,r="attribute"===n._attributeExtentName?".attribute":n._isS3MB?".s3md":".scvd",o=()=>{};e$2b(a$O.CREDENTIAL)&&(o=e$2b(a$O.CREDENTIAL._keymap[e._scpUrl])?t=>a$O.addTokenWithKey(e._scpUrl,t):e=>a$O.addToken(e));var a="";".attribute"===r&&(a=Object.keys(n._fieldsInfo._hash).join(";"),a=n._fieldsInfo._hash.hasOwnProperty("smid")?"?fields=smid;"+a.replace("smid;",""):"?fields=SmID;"+a.replace("SmID;",""));var s="",l=n._indexInfoAttributeMap;if(e$2b(l)){var u=n._baseUri.toString();for(var c in l)for(var h=l[c],d=0;d<h.length;d++)o(s=u+h[d].url+a),i.push(o$10(s))}else for(var f=0,p=e._rootEntities.length;f<p;f++)s=n._isS3MBlock?e._rootEntities[f]._relativePath.resolve(n._baseUri).toString()+e._rootEntities[f]._fileName:e._rootEntities[f]._relativePath.resolve(n._baseUri).toString()+f$O(e._rootEntities[f]._relativePath.toString().replace(/\/$/,"")),o(s+=r+a),i.push(o$10(s));o$1l.all(i,(function(e){n.attrDatas=e}),(function(t){for(var i=0,o=e._rootEntities.length;i<o;i++){var a;if(a=n._isS3MBlock?e._rootEntities[i]._relativePath.resolve(n._baseUri).toString()+e._rootEntities[i]._fileName+r:e._rootEntities[i]._relativePath.resolve(n._baseUri).toString()+f$O(e._rootEntities[i]._relativePath.toString().replace(/\/$/,""))+r,".attribute"===r){var s=Object.keys(n._fieldsInfo._hash).join(";");n._fieldsInfo._hash.hasOwnProperty("smid")?a=a+"?fields=smid;"+(s=s.replace("smid;","")):a=a+"?fields=SmID;"+(s=s.replace("SmID;",""))}e$2b(a$O.CREDENTIAL)&&(a=e$2b(a$O.CREDENTIAL._keymap[e._scpUrl])?a$O.addTokenWithKey(e._scpUrl,a):a$O.addToken(a)),o$10(a).then((function(e){n.attrDatas=[e]}))}}))}Object.defineProperties(_0x2e6772.prototype,{LoadingPriority:{get:function(){return this._nLoadingPriority},set:function(e){this._nLoadingPriority=e,this.createPriorityFunction=this._nLoadingPriority===_0x10659f.Root_Priority?_0x3c2b42:_0x3a8ba7,this._nLoadingPriority===_0x10659f.UsePagedLodInfo&&(this.createPriorityFunction=_0x52b7a2)}}}),_0x2e6772.prototype._updatingTiles=function(){return this._statistics.numberOfPendingRequests+this._statistics.numberOfAttemptedRequests+this._statistics.numberOfTilesProcessing},_0x2e6772.prototype._requestAllScvd=function(){var e=this;e$2b(this._indexedDBScheduler)?_0x59f579(e,e._layer._isS3MB):this._dpPromise.then((function(){_0x59f579(e,e._layer._isS3MB)}))},_0x2e6772.prototype.getAttributesById=function(e){var t=new TextDecoder("utf-8"),i=o$1l.defer();if(e$2b(this._attributes[e]))return i.resolve(this._attributes[e]),i.promise;if(!this._indexedDBSetting.isAttributesSave&&!this._layer._showLabel||!e$2b(this._indexedDBScheduler)||!this._indexedDBScheduler.checkObjectStoreExit("attributes"))return i.resolve(null),i.promise;var n=this;return this._indexedDBScheduler.getElementFromDB("attributes",e.toString()).then((function(r){if(null!==r){r=r.split(256);var o=new Uint8Array(r);r=t.decode(o),r=JSON.parse(r)}else n._attributes._errorNum++,n._attributes._errorNum>3&&(_0x59f579(n,n._layer._isS3MB),n._attributes._errorNum=0);n._attributes[e]=r,i.resolve(r)}),(function(e){n._attributes._errorNum++,n._attributes._errorNum>3&&!n._attributes._redownload&&(_0x59f579(n,n._layer._isS3MB),n._attributes._redownload=!0),i.resolve(null)})),i.promise},_0x2e6772.prototype._downloadAttributes=function(){for(var e=[],t=o$1l.defer(),i="attribute"===this._layer._attributeExtentName?".attribute":this._layer._isS3MB?".s3md":".scvd",n=this,r=this._layer,o=0,a=this._rootEntities.length;o<a;o++){var s=this._rootEntities[o];if(e$2b(r._indexInfoMap)){var l=s._fileName,u=r._indexInfoMap[l];if(e$2b(u))for(var c=0;c<u.length;c++){var h=new h$16(u[c].url).resolve(r._baseUri).toString(),d=Object.keys(this._layer._fieldsInfo._hash).join(";");r._fieldsInfo._hash.hasOwnProperty("smid")?h=h+"?fields=smid;"+(d=d.replace("smid;","")):h=h+"?fields=SmID;"+(d=d.replace("SmID;","")),e$2b(a$O.CREDENTIAL)&&(h=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,h):a$O.addToken(h)),e.push(o$10(h))}}else{h=this._rootEntities[o]._relativePath.resolve(this._layer._baseUri).toString()+f$O(this._rootEntities[o]._relativePath.toString().replace(/\/$/,""))+i,d=Object.keys(this._layer._fieldsInfo._hash).join(";");this._layer._fieldsInfo._hash.hasOwnProperty("smid")?h=h+"?fields=smid;"+(d=d.replace("smid;","")):h=h+"?fields=SmID;"+(d=d.replace("SmID;","")),e$2b(a$O.CREDENTIAL)&&(h=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,h):a$O.addToken(h)),e.push(o$10(h))}}return o$1l.all(e,(function(e){for(var r=[],o=0,a=e.length;o<a;o++)r.push(_0x2eee9a(e[o],i,n._layer._fieldsInfo));for(var s=0;s<r.length;s++)_0xbea8e7(r[s],n);n._attrloaded||(n._attrloaded=!0,n._layer.attributeDownloaded.raiseEvent(n._layer.name+" attribute downloaded.")),t.resolve(!0)}),(function(e){for(var r=0,o=n._rootEntities.length;r<o;r++){var a=n._rootEntities[r]._relativePath.resolve(n._layer._baseUri).toString()+f$O(n._rootEntities[r]._relativePath.toString().replace(/\/$/,""))+i;e$2b(a$O.CREDENTIAL)&&(a=e$2b(a$O.CREDENTIAL._keymap[n._scpUrl])?a$O.addTokenWithKey(n._scpUrl,a):a$O.addToken(a)),o$10(a).then((function(e){var r=[];r.push(_0x2eee9a(e,i,n._layer._fieldsInfo)),_0xbea8e7(r[0],n),t.resolve(!0)}))}})),t.promise};var _0x7b4aed=null,_0x1d5a67=null,_0x52529f=!1;function _0x31323d(e){var t=4*e.length,i=_0x3ebab5._malloc(Uint8Array.BYTES_PER_ELEMENT*t),n=new Uint8Array(t);_0x3ebab5.HEAPU8.set(n,i/Uint8Array.BYTES_PER_ELEMENT);var r,o=_0x3ebab5._malloc(Uint8Array.BYTES_PER_ELEMENT*e.length);for(_0x3ebab5.HEAPU8.set(e,o/Uint8Array.BYTES_PER_ELEMENT);0==(r=_0x7b4aed(i,t,o,e.length));)_0x1d5a67(i),t*=4,i=_0x3ebab5._malloc(Uint8Array.BYTES_PER_ELEMENT*t),n=new Uint8Array(t),_0x3ebab5.HEAPU8.set(n,i/Uint8Array.BYTES_PER_ELEMENT);var a=new Uint8Array(_0x3ebab5.HEAPU8.buffer,i,r);e=null,n=null;var s=new Uint8Array(a).buffer;return _0x1d5a67(i),_0x1d5a67(o),s}function _0x2eee9a(e,t,i){if(".attribute"===t){var n=new Int32Array(e,0,1);n=n[0];for(var r=new Int32Array(e,4,n),o=[],a=0;a<n;a++)o.push(r[a]);var s=Math.floor(o[0]/4.125),l=g=Math.ceil(s/8),u=new Int8Array(e,4*(n+1)+g,4*s),c=u.subarray(0,4*s),h=new Int8Array(c);u=new Int32Array(h.buffer);var d=4*(n+1)+o[0],f=[];for(a=1;a<n;a++){var p=(i=i)._array[a],_=p.type,m=Number(p.size);s=Math.floor(o[a]/(m+.125));var g=Math.ceil(s/8);(10==_||"ntext"===_||"text"===_)&&(m=1,g=l,s=o[a]-g);var x=new Int8Array(e,d+g,s*m).subarray(0,s*m);h=new Int8Array(x);if(4==_||"int32"===_)x=new Int32Array(h.buffer);else if(16==_||"int64"===_)x=new BigInt64Array(h.buffer);else if(6==_||"float"===_)x=new Float32Array(h.buffer);else if(7==_||"double"===_)x=new Float64Array(h.buffer);else if(10==_||"ntext"===_||"text"===_){for(var v=new DataView(x.buffer),y=0,$=[];y+x.byteOffset<v.byteLength;){var b=v.getInt32(y+x.byteOffset,!0);if((y+=4)+b>h.buffer.byteLength||b<0)break;var T=new Uint8Array(h.buffer,y,b);y+=b;var C=a$K(T,void 0,void 0,"gbk");$.push(C)}x=$}d+=o[a],f.push(x)}var S=Object.keys(i._hash),w=[];for(a=0;a<u.length;a++){(O={})[S[0]]=u[a];for(var E=0;E<f.length;E++)O[S[E+1]]=f[E][a];w.push(O)}return w}var P,A=new Uint8Array(e,8);if(null!==_0x7b4aed&&!0===_0x52529f)try{P=_0x31323d(A)}catch{return[]}else P=nt$9.inflate(A).buffer;h=new Uint8Array(P);var L=new TextDecoder("utf-8").decode(h);if(".s3md"===t){var M,R=L.substring(4);try{M=JSON.parse(R)}catch{R=L.substring(L.indexOf("{")),M=JSON.parse(R)}for(var O=[],I=0,D=M.layerInfos.length;I<D;I++)for(var B=M.layerInfos[I].records,N=(a=0,B.length);a<N;a++){for(var F={},U=(E=0,(z=B[a]).values.length);E<U;E++)F[z.values[E].name]=z.values[E].field,F[z.values[E].name]=!isNaN(1*F[z.values[E].name])&1*F[z.values[E].name]<Number.MAX_SAFE_INTEGER?1*F[z.values[E].name]:F[z.values[E].name];O.push(F)}return O}O=[];var G=(new s$S).read(L).getElementsByTagName("Record");for(a=0,N=G.length;a<N;a++){for(F={},h=G[a].innerHTML.split("\n"),E=0;E<h.length;E++){var z;if(""!==(z=h[E]))if(-1!==z.indexOf("<ID>"))F.id=z.substring(z.indexOf(">")+1,z.indexOf("</"));else{var V=z.indexOf('"');V=z.indexOf('"',V+1);var k=z.substring(z.indexOf("Name=")+6,V);-1!==z.indexOf("/>")?F[k]="":F[k]=z.substring(z.indexOf(">")+1,z.indexOf("</"))}}O.push(F)}return O}function _0xfdcb2c(e,t){var i=new Int8Array(e);for(var n=t.split("").map((function(e){return e.charCodeAt(0)})),r=0;r<n.length;r++)i[r]=i[r]^n[r];return i.buffer}typeof WebAssembly<"u"&&e$2b(_0x3ebab5)&&(_0x3ebab5.onRuntimeInitialized=function(){_0x52529f=!0},_0x7b4aed=_0x3ebab5.cwrap("unzip","number",["number","number","number","number"]),_0x1d5a67=_0x3ebab5.cwrap("freePointer",null,["number"])),_0x2e6772.prototype._updateRootBoundingSphere=function(e,t){for(var i=0,n=e.length;i<n;i++){var r=e[i],o=this._rootEntities[i];if(e$2b(r.bSphere)&&r.bSphere.radius>0&&(o._boundingSphere=i$1c.transform(r.bSphere,t,new i$1c),e$2b(r.min))){var a=[];a.push(new o$1p(r.min.x,r.min.y,r.min.z)),a.push(new o$1p(r.min.x,r.min.y,r.max.z)),a.push(new o$1p(r.min.x,r.max.y,r.min.z)),a.push(new o$1p(r.min.x,r.max.y,r.max.z)),a.push(new o$1p(r.max.x,r.min.y,r.min.z)),a.push(new o$1p(r.max.x,r.min.y,r.max.z)),a.push(new o$1p(r.max.x,r.max.y,r.min.z)),a.push(new o$1p(r.max.x,r.max.y,r.max.z));for(var s=0;s<8;s++)a[s]=p$1d.multiplyByPoint(t,a[s],a[s]);o._orientedBoundingBox=y$Z.fromPoints(a,o._orientedBoundingBox)}}},_0x2e6772.prototype._initializeRootEntities=function(e){if(e$2b(e)){this._rootNodeNameList=[];for(var t=this._layer,i=t._fileType,n=i===d$15.ClampGroundPolygon||i===d$15.ClampObjectPolygon||i===d$15.ClampGroundLine||i===d$15.ClampObjectLine,r=new o$1p,o=new o$1p,a=!1,s=[],l=0,u=e.length;l<u;l++){var c=e[l],h=new _0x206cda;h.layer=t,h._isAncestorBlock=t._isS3MBlock,h._fileName=c.name,h._relativePath=c.relativePath,h._isRootTile=!0,h._nLODLev=0;var d=h._relativePath.toString()+h._fileName;if(this._rootNodeNameList.push(d),e$2b(c.bSphere)&&c.bSphere.radius>0){if(h._originalBS=c.bSphere,h._boundingSphere=i$1c.transform(c.bSphere,t._matModel,new i$1c),h._oriBoundingSphere=i$1c.clone(h._boundingSphere),s.push(h._boundingSphere),e$2b(c.min)&&!t._isS3MBlock){var f=[];f.push(new o$1p(c.min.x,c.min.y,c.min.z)),f.push(new o$1p(c.min.x,c.min.y,c.max.z)),f.push(new o$1p(c.min.x,c.max.y,c.min.z)),f.push(new o$1p(c.min.x,c.max.y,c.max.z)),f.push(new o$1p(c.max.x,c.min.y,c.min.z)),f.push(new o$1p(c.max.x,c.min.y,c.max.z)),f.push(new o$1p(c.max.x,c.max.y,c.min.z)),f.push(new o$1p(c.max.x,c.max.y,c.max.z));for(var p=0;p<8;p++)f[p]=p$1d.multiplyByPoint(t._matModel,f[p],f[p]);h._orientedBoundingBox=y$Z.fromPoints(f,h._orientedBoundingBox),h.obbMin=c.min,h.obbMax=c.max,0==l?(r=c.max.clone(),o=c.min.clone()):(r.x=Math.max(r.x,c.max.x),r.y=Math.max(r.y,c.max.y),r.z=Math.max(r.z,c.max.z),o.x=Math.min(o.x,c.min.x),o.y=Math.min(o.y,c.min.y),o.z=Math.min(o.z,c.min.z),a=!0)}}else if(e$2b(c.obb)){var _=c.obb,m=new p$1e,g=new o$1p(_.center.x,_.center.y,_.center.z),x=new e$29(_.xExtent.x,_.xExtent.y,_.xExtent.z,0),v=new e$29(_.yExtent.x,_.yExtent.y,_.yExtent.z,0),y=new e$29(_.zExtent.x,_.zExtent.y,_.zExtent.z,0);p$1e.setColumn(m,0,x,m),p$1e.setColumn(m,1,v,m),p$1e.setColumn(m,2,y,m);var $=new y$Z(g,m);h._oriBoundingSphere=i$1c.fromOrientedBoundingBox($,new i$1c),h._boundingSphere=i$1c.transform(h._oriBoundingSphere,t._matModel,new i$1c),g=p$1d.multiplyByPoint(t._matModel,g,g),x=p$1d.multiplyByVector(t._matModel,x,x),v=p$1d.multiplyByVector(t._matModel,v,v),y=p$1d.multiplyByVector(t._matModel,y,y),p$1e.setColumn(m,0,x,m),p$1e.setColumn(m,1,v,m),p$1e.setColumn(m,2,y,m),h._orientedBoundingBox=new y$Z(g,m),h.obbMin=x,h.obbMax=v}n&&e$2b(h._boundingSphere)&&(h._boundingSphere.radius+=9e3),h._subdomainIndex=l,this._rootEntities.push(h)}this._layer.max=r,this._layer.min=o,t._oriBoundingSphere=new i$1c,a?i$1c.fromCornerPoints(o,r,t._oriBoundingSphere):s.length>0&&i$1c.fromBoundingSpheres(s,t._oriBoundingSphere),t._boundingSphere=i$1c.transform(t._oriBoundingSphere,t._matModel,new i$1c)}},_0x2e6772.prototype._isRootNode=function(e){return!!e$2b(this._rootNodeNameList)&&-1!==this._rootNodeNameList.indexOf(e)},_0x2e6772.prototype.appendQueryFieldName=function(e){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i],o="attribute"===e._attributeExtentName?".attribute":this._layer._isS3MB?".s3md":".scvd",a=r._relativePath.resolve(this._layer._baseUri).toString()+f$O(r._relativePath.toString().replace(/\/$/,""))+o,s=e._queryFieldNames,l=s.join(";"),u=this;if("attribute"===e._attributeExtentName){var c;if(e._fieldsInfo._hash.hasOwnProperty("smid")?(a=a+"?fields=smid;"+l,c="smid"):(a=a+"?fields=SmID;"+l,c="SmID"),e._urlType===Tr$3.KEY_VALUE){var h=r._relativePath.path.replace(/\//g,"").replace(".",""),d=e._urlArguments,f={layerName:e.name,rootTile:h,tile:r._fileName,suffix:"attribute",fields:c+";"+l},p=m$1b(f=Object.assign(f,d),!0);(g=a.match(/(\S*)\/datas/)).length>0&&(a=g[0]+"?"+p)}e$2b(a$O.CREDENTIAL)&&(a=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,a):a$O.addToken(a));var _=new r$1b({url:a,throttle:!1,throttleByServer:!1,serverKey:r$1a.getServerKey(a)}),m=o$10(a,this._customRequestHeaders,_);e$2b(promies)&&(m.then((function(e){var t=new Int32Array(e,0,1);t=t[0];for(var i=new Int32Array(e,4,t),n=[],r=0;r<t;r++)n.push(i[r]);var o=Math.floor(n[0]/4.125),a=Math.ceil(o/8),l=new Int8Array(e,4*(t+1)+a,4*o),c=l.subarray(0,4*o),h=new Int8Array(c);l=new Int32Array(h.buffer);var d=4*(t+1)+n[0],f=[];for(r=1;r<t;r++){var p=u._layer._fieldsInfo._array[r],_=p.type,m=Number(p.size);o=Math.floor(n[r]/(m+.125));a=Math.ceil(o/8);var g=new Int8Array(e,d+a,o*m).subarray(0,o*m);h=new Int8Array(g);4==_||16==_?g=new Int32Array(h.buffer):6==_?g=new Float32Array(h.buffer):7==_&&(g=new Float64Array(h.buffer)),d+=n[r],f.push(g)}for(r=0;r<l.length;r++){for(var x={},v=0;v<f.length;v++)x[s[v]]=f[v][r];Object.assign(u._attributes[l[r]],x)}})),t.push(m))}else{if(a=a+"?fields="+l,e._urlType===Tr$3.KEY_VALUE){var g;h=r._relativePath.path.replace(/\//g,"").replace(".",""),d=e._urlArguments,f={layerName:e.name,rootTile:h,tile:r._fileName,suffix:e._attributeExtentName,fields:l},p=m$1b(f=Object.assign(f,d),!0);(g=a.match(/(\S*)\/datas/)).length>0&&(a=g[0]+"?"+p)}e$2b(a$O.CREDENTIAL)&&(a=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,a):a$O.addToken(a));m=u$Q(a,this._customRequestHeaders).then((function(e){for(var t=e.Records,i=0;i<t.length;i++){var n=t[i].ID||t[i].id||t[i].SmID||t[i].SMID;u._attributes.hasOwnProperty(n)||Object.assign(u._attributes[n],t[i])}}));t.push(m)}}return t};var _0x599da4=void 0;function _0x5cb704(e,t){if(e$2b(e.xExtent)){var i=o$1p.fromElements(e.center.x,e.center.y,e.center.z),n=e$29.fromElements(e.xExtent.x,e.xExtent.y,e.xExtent.z,0),r=e$29.fromElements(e.yExtent.x,e.yExtent.y,e.yExtent.z,0),o=e$29.fromElements(e.zExtent.x,e.zExtent.y,e.zExtent.z,0);if(p$1d.multiplyByPoint(t,i,i),p$1d.multiplyByVector(t,n,n),p$1d.multiplyByVector(t,r,r),p$1d.multiplyByVector(t,o,o),e$2b(_0x599da4))_0x599da4.center=i,_0x599da4.halfAxes[0]=n.x,_0x599da4.halfAxes[1]=n.y,_0x599da4.halfAxes[2]=n.z,_0x599da4.halfAxes[3]=r.x,_0x599da4.halfAxes[4]=r.y,_0x599da4.halfAxes[5]=r.z,_0x599da4.halfAxes[6]=o.x,_0x599da4.halfAxes[7]=o.y,_0x599da4.halfAxes[8]=o.z,_0x599da4.areaDirty=1;else{var a=new p$1e(n.x,r.x,o.x,n.y,r.y,o.y,n.z,r.z,o.z);_0x599da4=new y$Z(i,a)}_0x599da4._updateBBox();var s=o$1p.distance(_0x599da4.center,_0x599da4.bbox[0]);return m=new i$1c(_0x599da4.center,s)}var l=e.min.x,u=e.min.y,c=e.min.z,h=e.max.x,d=e.max.y,f=e.max.z,p=new o$1p(l,u,c),_=new o$1p(h,d,f),m=new i$1c;return i$1c.fromCornerPoints(p,_,m),i$1c.transform(m,t,m),m}function _0x3586c0(e,t){var i,n=[];n.push(new o$1p(e.min.x,e.min.y,e.min.z)),n.push(new o$1p(e.min.x,e.min.y,e.max.z)),n.push(new o$1p(e.min.x,e.max.y,e.min.z)),n.push(new o$1p(e.min.x,e.max.y,e.max.z)),n.push(new o$1p(e.max.x,e.min.y,e.min.z)),n.push(new o$1p(e.max.x,e.min.y,e.max.z)),n.push(new o$1p(e.max.x,e.max.y,e.min.z)),n.push(new o$1p(e.max.x,e.max.y,e.max.z));for(var r=0;r<8;r++)n[r]=p$1d.multiplyByPoint(t,n[r],n[r]);return i=y$Z.fromPoints(n,i)}function _0x564fb6(e,t,i,n,r,o){if(e$2b(n)){var a=new _0x206cda;if(i._entity=a,a._parent=t,a._relativePath=o,a._boundingSphere=i._boundingSphere,a._orientedBoundingBox=i._orientedBoundingBox,a._fileName=n.modelPath,a._fileName=a._fileName.replace(/.s3mb*|.s3m*../g,""),a._parentPagelod=i,a._depth=i._depth+1,a._index=t._childrenPageLod.length-1,a._rootName=t._rootName,a._subdomainIndex=t._subdomainIndex+a._index+1,a._indexFilePath=n.indexFilePath,e$2b(n.state)&&"PartLeaf"===n.state&&(a._hasLeafChild=!0),e$2b(n.indexFilePath))return void(a._hasConfig=!0);var s=n.children;if(!e$2b(s))return a._isLeafTile=!0,void(a._boundingSphere=void 0);for(var l=0,u=s.length;l<u;l++){var c=s[l];if(e$2b(c.tileInfo)){if(""===c.tileInfo.modelPath){a._hasLeafChild=!0;continue}var h=new _0x46a5cb;if(h._fileType=e._fileType,h._rangeList=c.tileInfo.rangeValue,h._rangeDataList=c.tileInfo.modelPath,h._rangeDataList=h._rangeDataList.replace(/.s3mb*|.s3m*../g,""),0===h._rangeDataList.indexOf("./")&&(h._rangeDataList=h._rangeDataList.substring(2)),"pixelSizeOnScreen"===c.tileInfo.rangeMode?h._rangeMode=_0x2056d1.PIXEL_SIZE_ON_SCREEN:"geometricError"===c.tileInfo.rangeMode&&(h._rangeMode=_0x2056d1.GEOMETRY_ERROR),c.tileInfo.boundingBox.xExtent){var d=c.tileInfo.boundingBox,f=o$1p.fromElements(d.center.x,d.center.y,d.center.z),p=e$29.fromElements(d.xExtent.x,d.xExtent.y,d.xExtent.z,0),_=e$29.fromElements(d.yExtent.x,d.yExtent.y,d.yExtent.z,0),m=e$29.fromElements(d.zExtent.x,d.zExtent.y,d.zExtent.z,0),g=new p$1e(p.x,_.x,m.x,p.y,_.y,m.y,p.z,_.z,m.z);h._orientedBoundingBox=new y$Z(f,g),h._orientedBoundingBox._updateBBox(),h.min=h._orientedBoundingBox.bbox[0].clone(),h.max=h._orientedBoundingBox.bbox[0].clone();for(var x,v=1;v<8;v++)x=h._orientedBoundingBox.bbox[v],h.min.x>x.x&&(h.min.x=x.x),h.min.y>x.y&&(h.min.y=x.y),h.min.z>x.z&&(h.min.z=x.z),h.max.x<x.x&&(h.max.x=x.x),h.max.y<x.y&&(h.max.y=x.y),h.max.z<x.z&&(h.max.z=x.z);var y=o$1p.distance(h._orientedBoundingBox.center,h._orientedBoundingBox.bbox[0]);p$1d.multiplyByPoint(r,f,f),p$1d.multiplyByVector(r,p,p),p$1d.multiplyByVector(r,_,_),p$1d.multiplyByVector(r,m,m),h._orientedBoundingBox.center=f,h._orientedBoundingBox.halfAxes[0]=p.x,h._orientedBoundingBox.halfAxes[1]=p.y,h._orientedBoundingBox.halfAxes[2]=p.z,h._orientedBoundingBox.halfAxes[3]=_.x,h._orientedBoundingBox.halfAxes[4]=_.y,h._orientedBoundingBox.halfAxes[5]=_.z,h._orientedBoundingBox.halfAxes[6]=m.x,h._orientedBoundingBox.halfAxes[7]=m.y,h._orientedBoundingBox.halfAxes[8]=m.z,h._orientedBoundingBox.areaDirty=1,h._boundingSphere=new i$1c(f,y)}else h._boundingSphere=_0x5cb704(c.tileInfo.boundingBox,r),h._orientedBoundingBox=_0x3586c0(c.tileInfo.boundingBox,r),h.max=o$1p.fromElements(c.tileInfo.boundingBox.max.x,c.tileInfo.boundingBox.max.y,c.tileInfo.boundingBox.max.z),h.min=o$1p.fromElements(c.tileInfo.boundingBox.min.x,c.tileInfo.boundingBox.min.y,c.tileInfo.boundingBox.min.z);h._parent=a._parentPagelod,h._depth=a._depth,(!e$2b(n.state)||"AllLeaf"!=n.state)&&(a._childrenPageLod.push(h),a._pagelodMap[h._rangeDataList]=h,_0x564fb6(e,a,h,c.tileInfo,r,o))}}}}function _0x2d2c6b(e,t,i){for(var n=[],r=0;r<e._childrenPageLod.length;r++)e._childrenPageLod[r]._entity._skipLevel=i,n.push(e._childrenPageLod[r]._entity);for(;n.length<t&&n.length>0;){for(var o=[],a=0;a<n.length;a++)for(var s=0;s<n[a]._childrenPageLod.length;s++)n[a]._childrenPageLod[s]._entity._skipLevel=i,o.push(n[a]._childrenPageLod[s]._entity);n=o}if(n.length>0)for(s=0;s<n.length;s++)n[s]._needLoad=!0,_0x2d2c6b(n[s],t,i+1)}function _0x3687f4(e){1==e._childrenPageLod.length?_0x3687f4(e._childrenPageLod[0]._entity):e._needLoad=!0}function _0x69d08c(e,t,i){var n=i._matModel;t._configReady=!0,t._configLoadState=N$P.LOADED;var r=t._relativePath;if(e$2b(e.lodTreeExport.tileInfo.children))for(var o=0,a=e.lodTreeExport.tileInfo.children.length;o<a;o++){t._boundingSphere=_0x5cb704(e.lodTreeExport.tileInfo.boundingBox,n);var s=e.lodTreeExport.tileInfo.children[o];if(e$2b(s.tileInfo)&&(""===s.tileInfo.modelPath&&(t._hasLeafChild=!0),""!==s.tileInfo.modelPath)){var l=new _0x46a5cb;if(l._fileType=i._fileType,l._rangeList=s.tileInfo.rangeValue,l._rangeDataList=s.tileInfo.modelPath,l._rangeDataList=l._rangeDataList.replace(/.s3mb*/g,""),0===l._rangeDataList.indexOf("./")&&(l._rangeDataList=l._rangeDataList.substring(2)),"pixelSizeOnScreen"===s.tileInfo.rangeMode?l._rangeMode=_0x2056d1.PIXEL_SIZE_ON_SCREEN:"geometricError"===s.tileInfo.rangeMode&&(l._rangeMode=_0x2056d1.GEOMETRY_ERROR),s.tileInfo.boundingBox.xExtent){var u=s.tileInfo.boundingBox,c=o$1p.fromElements(u.center.x,u.center.y,u.center.z),h=e$29.fromElements(u.xExtent.x,u.xExtent.y,u.xExtent.z,0),d=e$29.fromElements(u.yExtent.x,u.yExtent.y,u.yExtent.z,0),f=e$29.fromElements(u.zExtent.x,u.zExtent.y,u.zExtent.z,0),p=new p$1e(h.x,d.x,f.x,h.y,d.y,f.y,h.z,d.z,f.z);l._orientedBoundingBox=new y$Z(c,p),l._orientedBoundingBox._updateBBox(),l.min=l._orientedBoundingBox.bbox[0].clone(),l.max=l._orientedBoundingBox.bbox[0].clone();for(var _,m=1;m<8;m++)_=l._orientedBoundingBox.bbox[m],l.min.x>_.x&&(l.min.x=_.x),l.min.y>_.y&&(l.min.y=_.y),l.min.z>_.z&&(l.min.z=_.z),l.max.x<_.x&&(l.max.x=_.x),l.max.y<_.y&&(l.max.y=_.y),l.max.z<_.z&&(l.max.z=_.z);var g=o$1p.distance(l._orientedBoundingBox.center,l._orientedBoundingBox.bbox[0]);p$1d.multiplyByPoint(n,c,c),p$1d.multiplyByVector(n,h,h),p$1d.multiplyByVector(n,d,d),p$1d.multiplyByVector(n,f,f),l._orientedBoundingBox.center=c,l._orientedBoundingBox.halfAxes[0]=h.x,l._orientedBoundingBox.halfAxes[1]=h.y,l._orientedBoundingBox.halfAxes[2]=h.z,l._orientedBoundingBox.halfAxes[3]=d.x,l._orientedBoundingBox.halfAxes[4]=d.y,l._orientedBoundingBox.halfAxes[5]=d.z,l._orientedBoundingBox.halfAxes[6]=f.x,l._orientedBoundingBox.halfAxes[7]=f.y,l._orientedBoundingBox.halfAxes[8]=f.z,l._orientedBoundingBox.areaDirty=1,l._boundingSphere=new i$1c(c,g)}else l._boundingSphere=_0x5cb704(s.tileInfo.boundingBox,n),l._orientedBoundingBox=_0x3586c0(s.tileInfo.boundingBox,n),l.max=o$1p.fromElements(s.tileInfo.boundingBox.max.x,s.tileInfo.boundingBox.max.y,s.tileInfo.boundingBox.max.z),l.min=o$1p.fromElements(s.tileInfo.boundingBox.min.x,s.tileInfo.boundingBox.min.y,s.tileInfo.boundingBox.min.z);l._parent=void 0,l._depth=t._depth,t._childrenPageLod.push(l),t._pagelodMap[l._rangeDataList]=l,e$2b(t._parent)?t._rootName=t._parent._rootName:t._rootName=t._fileName,l._rootName=t._rootName,_0x564fb6(i,t,l,s.tileInfo,n,r)}}_0x2d2c6b(t,i._maxSkipNum,t._skipLevel),t._isRootTile&&_0x3687f4(t)}function _0x1c0e8c(e,t){var i=u$_(e._indexFilePath,e._fileName);i=i.replace(".json","");var n,r,o=e._relativePath.resolve(t._baseUri)+i+".json";(o=o.replace(/\+/g,"%2B"),e$2b(t._wstTaskProcessor))?(r=t._isS3MBlock?o.substring(o.indexOf("data/path/")+9):o.substring(o.indexOf("/data/")+5),r=decodeURIComponent(r),n=t._wstTaskProcessor.scheduleTask({data:r,dataType:"json"})):(e$2b(a$O.CREDENTIAL)&&(o=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,o):a$O.addToken(o)),n=u$Q(o,void 0,new r$1b({url:o,throttle:!1,throttleByServer:!0,serverKey:r$1a.getServerKey(o)})));e$2b(n)&&(e._configLoadState=N$P.LOADING,n.then((function(i){if(e$2b(i)){if(e._needLoad=!1,_0x69d08c(i,e,t),e$2b(t._layerScheduler._indexedDBScheduler)){var n={blob:i,key:e._relativePath.toString()+e._fileName+".json",tablename:t._layerScheduler.tablename,dbname:t._layerScheduler._indexedDBScheduler.dbname};_0x46a73d.indexTaskProcessor.scheduleTask(n,[])}}else e._configLoadState=N$P.UNLOAD}),(function(t){e$2b(t)?e._configLoadState=N$P.FAILED:e._configLoadState=N$P.UNLOAD})))}_0x2e6772.prototype.loadConfig=function(e){if(e._configLoadState===N$P.UNLOAD){var t=this._layer,i=u$_(e._indexFilePath,e._fileName);i=i.replace(".json","");var n=e._relativePath.toString()+i+".json";if(e$2b(window.Proxy)&&(!0===this._indexedDBSetting.isGeoTilesSave||this._indexedDBSetting.isGeoTilesRootNodeSave&&this._isRootNode(n)))if(e$2b(this._indexedDBScheduler)){var r=this._indexedDBScheduler.getElementFromDB(this.tablename,n);e$2b(r)?(e._configLoadState=N$P.LOADING,r.then((function(i){e$2b(i)?_0x69d08c(i,e,t):(e._configLoadState=N$P.UNLOAD,_0x1c0e8c(e,t))}),(function(i){e._configLoadState=N$P.UNLOAD,_0x1c0e8c(e,t)}))):(e._configLoadState=N$P.UNLOAD,_0x1c0e8c(e,t))}else _0x1c0e8c(e,t);else _0x1c0e8c(e,t)}},_0x2e6772.prototype.loadEntity=function(e){var t=e._s3mLoadState,i=this._layer;this._cacheKey;var n,r,o,a,s=this;if(_0x2438b4(e,i._frameState)){if(N$P.UNLOAD===t)if(i._isS3MBlock&&i._blockCache.contains(i._id,e._blockKey))e.s3mBuffer=i._blockCache.get(i._id,e._blockKey),t=e._s3mLoadState=N$P.LOADED;else{if(!e$2b(e.request)){var l=".s3m",u="s3m";i._isS3MBlock?l=".s3mblock":i._isS3MB?(l=i._isS3MZ?".s3mbz":".s3mb",u=i._isS3MZ?"s3mbz":"s3mb"):i._isOSGB&&(l=".osgb",l=".osgb"),e._fileName=e._fileName.replace(/\0/,"");var c=e._relativePath.resolve(i._baseUri)+e._fileName+l;if(i.subdomains&&(c=c.replace(/(.*realspace)/,i._subdomainsUrlScheme)),c=c.replace(/\+/g,"%2B"),i._urlType===Tr$3.KEY_VALUE){n=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),r=i._urlArguments;var h={layerName:i.name,rootTile:n,tile:e._fileName,suffix:u};o=m$1b(h=Object.assign(h,r),!0),(a=c.match(/(\S*)\/datas/)).length>0&&(c=a[0]+"?"+o)}e.request=new r$1b({url:c,throttle:!0,throttleByServer:!0,serverKey:r$1a.getServerKey(c),priorityFunction:this.createPriorityFunction(e,this)})}var d=e._relativePath.toString()+e._fileName;if(e$2b(window.Proxy)&&(!0===this._indexedDBSetting.isGeoTilesSave||this._indexedDBSetting.isGeoTilesRootNodeSave&&this._isRootNode(d)))if(e$2b(this._indexedDBScheduler)&&this._indexedDBRequestNum<this._indexedDBRequestLimit){this._indexedDBRequestNum++;s=this;var f=this._indexedDBScheduler.getElementFromDB(this.tablename,d);e$2b(f)?(e._s3mLoadState=N$P.LOADING,f.then((function(t){s._indexedDBRequestNum--,e$2b(t)?(e._s3mLoadState=N$P.PARSING,e.s3mBuffer=null,e.volBuffer=null,i._isS3MB?i._isS3MBlock?_0x1309b8.parseChildGroup(t,s._layer,e):_0x1309b8.parseResult(t,s._layer,e):_0x215208.parseResult(t,s._layer,e,e.volBuffer)):(e._s3mLoadState=N$P.UNLOAD,_0x4675f7(e,s))}),(function(t){s._indexedDBRequestNum--,e._s3mLoadState=N$P.UNLOAD,_0x4675f7(e,s)}))):(this._indexedDBRequestNum--,e._s3mLoadState=N$P.UNLOAD,_0x4675f7(e,s))}else _0x4675f7(e,s);else this._packingRequest?this._packRequestEntities.push(e):_0x4675f7(e,s)}if(N$P.PARSING===t&&"InstanceModel"===i._dataType&&(e.skeletonState===_0x212e1c.STATE.SkeletonParsing?_0x212e1c.parse(i,e):e.skeletonState===_0x212e1c.STATE.SkeletonReady&&_0x1309b8.parseResultInstance(i,e)),N$P.PARSING===t&&e$2b(e.parsingResult)&&(i._isS3MB?i._isS3MBlock?_0x1309b8.parseChildGroup(e.parsingResult,i,e):_0x1309b8.parseResult(e.parsingResult,i,e):_0x215208.parseResult(e.parsingResult,i,e,e.volBuffer),e.parsingResult=null),N$P.LOADED===t&&(!1!==i._bVolume&&i.loadVolumeData?e._s3mLoadState===N$P.LOST?e._s3mLoadState=N$P.UNLOAD:e._s3mLoadState=N$P.LOADVOL:this._packingRequest?this._parsingEntities.push(e):i._isS3MB||i._isOSGB?_0x1309b8.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer):_0x215208.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer),i._S3MTileLoadedEvent.raiseEvent(e._boundingSphere)),N$P.PARSED===t&&e.transformResource(i._frameState,i,Number.MAX_VALUE),N$P.LOADVOL===t&&"vol"===i._strVolumeExt){var p,_,m;if(""===i._volName?(p=e._relativePath.resolve(i._baseUri)+e._fileName+"."+i._strVolumeExt,_=e._fileName):(p=e._relativePath.resolve(i._baseUri)+e._fileName+"_"+i._volName+"."+i._strVolumeExt,_=e._fileName+"_"+i._volName),i._urlType===Tr$3.KEY_VALUE){n=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),r=i._urlArguments;h={layerName:i.name,rootTile:n,tile:_,suffix:i._strVolumeExt};o=m$1b(h=Object.assign(h,r),!0),(a=p.match(/(\S*)\/datas/)).length>0&&(p=a[0]+"?"+o)}e$2b(a$O.CREDENTIAL)&&(p=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,p):a$O.addToken(p)),e$2b(e.request)||(e.request=new r$1b({url:p,throttle:!0,throttleByServer:!0,serverKey:r$1a.getServerKey(p),priorityFunction:this.createPriorityFunction(e,this)})),e$2b(m="png"===i._strVolumeExt?t$T(e.request.url,this._customRequestHeaders,e.request):o$10(e.request.url,this._customRequestHeaders,e.request))&&(e._s3mLoadState=N$P.LOADING,this._statistics.numberOfPendingRequests++,e.request=null,m.then((function(t){e._s3mLoadState=N$P.VOLLOADED,"png"===i._strVolumeExt?e.volImage=t:e.volBuffer=t,s._statistics.numberOfPendingRequests--,s._statistics.numberOfProcessingAttempted++}),(function(t){e$2b(t)?(s._statistics.numberOfPendingRequests--,e._s3mLoadState=N$P.VOLFAILED):(s._statistics.numberOfAttemptedRequests++,s._statistics.numberOfPendingRequests--,e._s3mLoadState=N$P.LOADVOL)})))}else N$P.LOADVOL===t&&("png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt)&&(e._s3mLoadState=N$P.VOLLOADED);(N$P.VOLLOADED===t||N$P.VOLFAILED===t)&&e$2b(e.s3mBuffer)&&("png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt?i._isS3MB?_0x1309b8.binaryDataParser(i,e,e.s3mBuffer,e.volImage):_0x215208.binaryDataParser(i,e,e.s3mBuffer,e.volImage):i._isS3MB?_0x1309b8.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer):_0x215208.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer))}},_0x2e6772.prototype.reloadVol=function(e){var t,i,n,r,o=this._layer;if(this._cacheKey,"vol"===o._strVolumeExt){var a,s,l;if(""===o._volName?(a=e._relativePath.resolve(o._baseUri)+e._fileName+"."+o._strVolumeExt,s=e._fileName):(a=e._relativePath.resolve(o._baseUri)+e._fileName+"_"+o._volName+"."+o._strVolumeExt,s=e._fileName+"_"+o._volName),o._urlType===Tr$3.KEY_VALUE){t=e._relativePath.path.replace(/\//g,"").replace(".",""),i=o._urlArguments;var u={layerName:o.name,rootTile:t,tile:s,suffix:o._strVolumeExt};n=m$1b(u=Object.assign(u,i),!0),(r=a.match(/(\S*)\/datas/)).length>0&&(a=r[0]+"?"+n)}if(e$2b(a$O.CREDENTIAL)&&(a=e$2b(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,a):a$O.addToken(a)),e$2b(e.request)||(e.request=new r$1b({url:a,throttle:!0,throttleByServer:!0,serverKey:r$1a.getServerKey(a),priorityFunction:this.createPriorityFunction(e,this)})),l="png"===o._strVolumeExt?t$T(e.request.url,this._customRequestHeaders,e.request):o$10(e.request.url,this._customRequestHeaders,e.request),this._statistics.numberOfColorChangeProcessing++,e$2b(l)){e.request=null,e._reloadVol=!1,this._statistics.numberOfColorChangePending++;var c=this;l.then((function(t){if(c._statistics.numberOfColorChangePending--,"vol"===o._strVolumeExt&&e$2b(t)&&t.byteLength>7&&e$2b(e._volObj)){var i,n=new Uint8Array(t,8);i=null!=_0x7b4aed?_0x31323d(n):nt$9.inflate(n).buffer;var r=new Float64Array(i,0,1),a=new Uint32Array(i,48,1);if(0===r[0]||3200===a[0]||3201===a[0]){var s=0;0===r[0]&&(s=8);var l=new Float64Array(i,s,6),u=l[0],h=l[1],d=l[2],f=l[3],p=l[4]<l[5]?l[4]:l[5],_=l[4]>l[5]?l[4]:l[5],m={left:u,top:h,right:d,bottom:f,minHeight:p,maxHeight:_,width:d-u,length:h-f,height:_-p},g=new Uint32Array(i,48+s,7),x=g[0],v=g[1],y=g[2],$=g[3],b={nFormat:x,nSideBlockCount:v,nBlockLength:y,nLength:$,nWidth:g[4],nHeight:g[5],nDepth:g[6],imageArray:new Uint8Array(i,76+s,$*$*4)},T=o._context._id+"_"+o.id+"_"+e._relativePath.resolve(o._baseUri)+"_"+e._fileName,C=k$Q.FilterMode.LINEAR;e$2b(o._hypsometricSetting)&&o._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(C=k$Q.FilterMode.NEAREST),3201===b.nFormat&&e$2b(o._hypsometricSetting)&&_0x215208.convertFloat(b,o._hypsometricSetting,C);var S=Se$d.ReloadVolumeTexture(T,o._gl,o._context,b,C);e._volObj.volTexture=S,e._volObj.nFormat=b.nFormat,e._volObj.nSideBlockCount=b.nSideBlockCount,e._volObj.nBlockLength=b.nBlockLength,e._volObj.nLength=b.nLength,e._volObj.nWidth=b.nWidth,e._volObj.nHeight=b.nHeight,e._volObj.nDepth=b.nDepth,e._volObj.id=T,e._volObj.dataFloor=o._fMinValue,e._volObj.dataCeil=o._fMaxValue,e._volObj.volBounds=m}}c._statistics.numberOfColorChangeProcessing--}),(function(t){e$2b(t)||(c._statistics.numberOfColorChangeAttempted++,e._reloadVol=!0),c._statistics.numberOfColorChangePending--,c._statistics.numberOfColorChangeProcessing--}))}else this._statistics.numberOfColorChangeProcessing--}},_0x2e6772.prototype.reloadVolMapping=function(e){var t=this._layer;if("vol_texture_mapping"===t._strVolumeExt){var i=t._context;for(var n in e._volTextures){this._statistics.numberOfColorChangeProcessing++;var r=n,o=e._volTextures[r],a=t._id+i._id,s=r.substring(0,r.length-a.length)+"_"+e._fileName;s=""!==t._volName?s+"_"+t._volName:s,s+=".vol";var l=e._relativePath.resolve(t._baseUri)+s;if(0!=t.urlType){var u=t._urlArguments,c=l.indexOf("datas")+5,h=u.layer3DName,d=l.substring(l.indexOf("/path/")+6).split("/"),f=d[0],p=d[1].substring(0,d[1].indexOf(".")),_=d[1].substring(d[1].indexOf(".")+1,d[1].length);for(var n in l=l.substring(0,c)+"?layerName="+h+"&rootTile="+f+"&tile="+p+"&suffix="+_,u)l=l+"&"+n+"="+u[n]}var m=o$10(l,this._customRequestHeaders);if(e$2b(m)){this._statistics.numberOfColorChangePending++;var g=this;m.then((function(i){if(g._statistics.numberOfColorChangePending--,e$2b(i)){var n,r=void 0,a=new Uint8Array(i,8);if(n=null!=_0x7b4aed?_0x31323d(a):nt$9.inflate(a).buffer,1===new Float64Array(n,0,1)[0]){var s=new Uint32Array(n,8,4),l=s[0],u=s[1],c=s[2];r={nFormat:l,nWidth:u,nHeight:c,nPixelSize:s[3],imageArray:new Float32Array(n,24,u*c)}}if(e$2b(r)){var h=_0x215208.convertFloatTexture(r,t._hypsometricSetting,t._hypsometricSetting.filterMode);o.copyFrom({width:r.nWidth,height:r.nHeight,arrayBufferView:h})}g._statistics.numberOfColorChangeProcessing--,i=null,e._reloadVol=!1}}),(function(e){g._statistics.numberOfColorChangePending--,g._statistics.numberOfColorChangeAttempted++,g._statistics.numberOfColorChangeProcessing--}))}else this._statistics.numberOfColorChangeProcessing--}}},_0x2e6772.prototype.dealWithPrepareLoad=function(e){if(this._requestByteLength+=e,this._requestByteLength>this._layer._prepareLoadSize)this._layer._prepareLoadEvent.raiseEvent(100),this._prepareLoaded=!0,this.refreshPrepareLoad();else{var t=Math.floor(100*this._requestByteLength/this._layer._prepareLoadSize);t>this._prepareRatio&&(this._prepareRatio=t,this._layer._prepareLoadEvent.raiseEvent(t))}};var _0x5233c6=/({.*?})/g;function _0x4675f7(e,t){var i,n=e.request.url;if(e$2b(t._layer._wstTaskProcessor)){var r;r=t._layer._isS3MBlock?e.request.url.substring(e.request.url.indexOf("data/path/")+9):e.request.url.substring(e.request.url.indexOf("/data/")+5),r=decodeURIComponent(r),i=t._layer._wstTaskProcessor.scheduleTask({dataType:"arraybuffer",data:r})}else{if(e$2b(t._layer._subdomains)){var o=t._layer._subdomains,a=o[e._subdomainIndex%o.length];n=n.replace(_0x5233c6,(function(e,t){return"{s}"===t?a:e}))}e$2b(a$O.CREDENTIAL)&&(n=e$2b(a$O.CREDENTIAL._keymap[n])?a$O.addTokenWithKey(t._scpUrl,n):a$O.addToken(n)),i=o$10(n,t._customRequestHeaders,e.request)}e$2b(i)?(e._s3mLoadState=N$P.LOADING,t._statistics.numberOfPendingRequests++,i.then((function(i){if(e$2b(t._layer._wstTaskProcessor)&&(!e$2b(i)||!e._isVisible||!ti$3.update(t._layer._context.memorySize)))return e._s3mLoadState=N$P.UNLOAD,void(e.request=null);t._prepareLoaded||t.dealWithPrepareLoad(i.byteLength),e.request=null,t._statistics.numberOfPendingRequests--,e._s3mLoadState===N$P.LOADING&&(t._layer._isS3MBlock&&t._layer._blockCache.set(t._layer._id,e._blockKey,i),0!=t._cacheKey.length?e.s3mBuffer=_0xfdcb2c(i,t._cacheKey):e.s3mBuffer=i,e._s3mLoadState=N$P.LOADED,t._statistics.numberOfProcessingAttempted++)}),(function(i){e.request=null,e$2b(i)?(t._statistics.numberOfPendingRequests--,e._s3mLoadState=N$P.FAILED):(t._statistics.numberOfAttemptedRequests++,t._statistics.numberOfPendingRequests--,e._s3mLoadState=N$P.UNLOAD)}))):e.request=null}function _0x1c0125(e,t,i){var n=t._layer;if(n.hasAttributeIndex&&i){if(e.leafAttrLoadState===N$P.LOADED)return}else if(t.attrsave||e.attrLoadState===N$P.LOADED)return;var r=t;e$2b(n._queryFieldNames)&&"attribute"===n._attributeExtentName&&(i||(e.attrLoadState=N$P.LOADING),r._indexedDBSetting.isAttributesSave?r._indexedDBScheduler.checkObjectStoreExit(e._fileName)?r._indexedDBScheduler.getElementFromDB(e._fileName,"saved").then((function(i){1==i?r._indexedDBScheduler.db.transaction(e._fileName).objectStore(e._fileName).get("obj").onsuccess=function(i){var n=i.target.result.value,r=new FileReader;r.onload=function(){var i=JSON.parse(r.result);t._attributes=Object.assign(t._attributes,i),e.attrLoadState=N$P.LOADED},r.readAsText(n)}:_0x21eae3(e,t)})).otherwise((function(){_0x21eae3(e,t)})):_0x21eae3(e,t):_0x21eae3(e,t,i))}function _0x21eae3(e,t,i){var n=t._layer;if((!t.attrsave||n.hasAttributeIndex)&&e$2b(n._queryFieldNames)){var r="attribute"===n._attributeExtentName?".attribute":n._isS3MB?".s3md":".scvd",o=t,a=e._attrAppend.length>0?e._attrAppend:n._queryFieldNames,s=a.join(";"),l=()=>{};e$2b(a$O.CREDENTIAL)&&(l=e$2b(a$O.CREDENTIAL._keymap[o._scpUrl])?e=>a$O.addTokenWithKey(o._scpUrl,e):e=>a$O.addToken(e));var u=r;if(n.hasAttributeIndex&&i&&(u="_1"+r),".attribute"===r){var c="";c=n._fieldsInfo._hash.hasOwnProperty("smid")?"?fields=smid;"+s:"?fields=SmID;"+s;var h="",d=[],f=n._baseUri.toString(),p=n._indexInfoAttributeMap;if(e$2b(p))for(var _=p[e._relativePath.path+e._fileName],m=0;m<_.length;m++)l(h=f+_[m].url+c),d.push(o$10(h));else{if(h=""===e._relativePath.toString()?f+e._rootName:e._relativePath.resolve(n._baseUri).toString()+f$O(e._relativePath.toString().replace(/\/$/,"")),h+=u+c,n._urlType===Tr$3.KEY_VALUE){var g=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),x=n._urlArguments,v={layerName:n.name,rootTile:g,tile:e._fileName,suffix:"attribute",fields:s},y=m$1b(v=Object.assign(v,x),!0),$=h.match(/(\S*)\/datas/);$.length>0&&(h=$[0]+"?"+y)}l(h),d.push(o$10(h))}d.length>0?(n.hasAttributeIndex&&i?e.leafAttrLoadState=N$P.LOADING:e.attrLoadState=N$P.LOADING,o$1l.all(d,(function(t){o.attrsave=!0,n.hasAttributeIndex&&i?e.leafAttrLoadState=N$P.LOADED:e.attrLoadState=N$P.LOADED,e._attrAppend=[];for(let i=0;i<t.length;i++){var r=t[i],s=new Int32Array(r,0,1);s=s[0];for(var l=new Int32Array(r,4,s),u=[],c=0;c<s;c++)u.push(l[c]);var h=Math.floor(u[0]/4.125),d=C=Math.ceil(h/8),f=new Int8Array(r,4*(s+1)+C,4*h),p=f.subarray(0,4*h),_=new Int8Array(p);f=new Int32Array(_.buffer);var m=4*(s+1)+u[0],g=[],x=[];for(c=1;c<=a.length;c++){var v=o._layer._fieldsInfo,y=a[c-1],$=v.get(y),b=$.type,T=Number($.size);h=Math.floor(u[c]/(T+.125));var C=Math.ceil(h/8);(10==b||"ntext"===b||"text"===b)&&(T=1,C=d,h=u[c]-C);var S=new Uint8Array(r,m,C);g.push(S);var w=new Int8Array(r,m+C,h*T).subarray(0,h*T);_=new Int8Array(w);if(4==b||"int32"===b)w=new Int32Array(_.buffer);else if("int16"===b)w=new Int16Array(_.buffer);else if(16==b||"int64"===b)w=new BigInt64Array(_.buffer);else if(6==b||"float"===b)w=new Float32Array(_.buffer);else if(7==b||"double"===b)w=new Float64Array(_.buffer);else if(10==b||"ntext"===b||"text"===b){for(var E=new DataView(w.buffer.slice(m+C,m+C+h*T)),P=0,A=[];P<E.byteLength;){var L=E.getInt32(P,!0);if((P+=4)+L>_.buffer.byteLength||L<0)break;var M=new Uint8Array(_.buffer,P,L);P+=L;var R=a$K(M,void 0,void 0,"gbk");A.push(R)}w=A}m+=u[c],x.push(w)}var O={};for(c=0;c<f.length;c++){for(var I={},D=0;D<x.length;D++){0!=(g[D][Math.floor(c/8)]>>7-c%8&1)?I[a[D]]=x[D][c]:I[a[D]]=null}e$2b(o._attributes[f[c]])&&(I=p$19(I,o._attributes[f[c]])),o._attributes[f[c]]=I,O[f[c]]=I}if(o._indexedDBSetting.isAttributesSave){var B=new Blob([JSON.stringify(O)],{type:"application/json"});if(o._indexedDBScheduler.checkObjectStoreExit(e._fileName))o._indexedDBScheduler.putElementInDB(e._fileName,"obj",B).then((function(){o.attrsave=!1,o._indexedDBScheduler.putElementInDB(e._fileName,"saved",!0),f=null})).otherwise((function(){o._indexedDBScheduler.clear(e._fileName),o.attrsave=!1,f=null}));else o._indexedDBScheduler.createObjectStore(e._fileName).then((function(){o._indexedDBScheduler.putElementInDB(e._fileName,"obj",B).then((function(){o.attrsave=!1,o._indexedDBScheduler.putElementInDB(e._fileName,"saved",!0),f=null})).otherwise((function(){o.attrsave=!1,f=null}))})).otherwise((function(e){o.attrsave=!1,f=null}))}else o.attrsave=!1}if(e$2b(n.themeStyle))for(var N,F=[e];N=F.pop();)for(var U=0;U<N._childrenPageLod.length;U++)for(var G=N._childrenPageLod[U],z=0;z<G._renderEntityList.length;z++){G._renderEntityList[z].updateTheme(n),e$2b(G._entity)&&F.push(G._entity)}})).otherwise((function(t){o.attrsave=!1,e$2b(t)?n.hasAttributeIndex&&i?e.leafAttrLoadState=N$P.FAILED:e.attrLoadState=N$P.FAILED:n.hasAttributeIndex&&i?e.leafAttrLoadState=N$P.UNLOAD:e.attrLoadState=N$P.UNLOAD}))):n.hasAttributeIndex&&i?e.leafAttrLoadState=N$P.UNLOAD:e.attrLoadState=N$P.UNLOAD}}}function _0x50cee8(e,t){if(e$2b(t._cartographic))if(e instanceof Array){for(var i=[],n=0;n<e.length;n++){var r=e[n];if(e$2b(r)&&(r instanceof h$Q||r instanceof i$O)){var o=r.getImagery(t._cartographic);i=i.concat(o)}}i.length>0&&(t.setImagerys(i,t._cartographic),t._imageRasterFinish=!1,t._imageryLevels=[])}else{if(e$2b(e)&&(e instanceof h$Q||e instanceof i$O))(i=e.getImagery(t._cartographic)).length>0&&(t.setImagerys(i,t._cartographic),t._imageRasterFinish=!1,t._imageryLevels=[])}}function _0x53a47e(e){const t=e._layer,i=t.attrDatas;if(!e$2b(i)||0===i.length)return;const n=t._fieldsInfo,r="attribute"===t._attributeExtentName?".attribute":t._isS3MB?".s3md":".scvd",o=performance.now();for(;i.length;){if(_0xbea8e7(_0x2eee9a(i.pop(),r,n),e),performance.now()-o>10)break}}function _0x32915a(e){const t=e._layer,i=t.attrDatas,n=e._savetoIndexDBDatas;if(e$2b(i)&&0===i.length&&0!==n.length&&0===i.length){e._attrloaded||(e._attrloaded=!0,t.attributeDownloaded.raiseEvent(t.name+" attribute downloaded."));const i=performance.now();for(;n.length;){if(_0x4a3e23(e,n.pop()),performance.now()-i>1)break}}}function _0x298688(e,t){var i=e._statistics,n=e._statisticsLastRender,r=i.numberOfPendingRequests,o=i.numberOfTilesProcessing,a=n.numberOfPendingRequests,s=n.numberOfTilesProcessing,l=r!==a||o!==s,u=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests&&0===i.numberOfProcessingAttempted,c=i.numberOfColorChangePending,h=n.numberOfColorChangePending,d=i.numberOfColorChangeProcessing,f=n.numberOfColorChangeProcessing,p=(c!==h||d!==f)&&0===i.numberOfColorChangeAttempted&&0===c&&0===d;Date.now()-i.lastLoadedTrigger.time>2e3&&i.lastLoadedTrigger.done&&t.afterRender.push((function(){e._layer._allTilesLoaded.raiseEvent(),i.lastLoadedTrigger.done=!1})),l&&u&&(i.lastLoadedTrigger.done=!0,i.lastLoadedTrigger.time=Date.now()),Date.now()-i.lastColorChangeTrigger.time>2e3&&i.lastColorChangeTrigger.done&&t.afterRender.push((function(){e._layer._colorTableChanged.raiseEvent(),i.lastColorChangeTrigger.done=!1})),p&&u&&(i.lastColorChangeTrigger.done=!0,i.lastColorChangeTrigger.time=Date.now())}_0x2e6772.prototype._clearIndexedDBCache=function(){e$2b(this._indexedDBScheduler)&&this._indexedDBScheduler.clear(this.tablename)},_0x2e6772.prototype._refreshVolume=function(){if(this._layer._bVolume){var e=[],t={};if("vol"===this._layer._strVolumeExt){for(var i=0,n=this._rootEntities.length;i<n;i++){e$2b(r=this._rootEntities[i])&&e$2b(r._fileName)&&(t[r._relativePath.resolve(this._layer._baseUri)+r._fileName]=r,e.push(r))}for(;s=e.pop();)for(i=0,n=s._childrenPageLod.length;i<n;i++){if(e$2b((o=s._childrenPageLod[i])._entity)&&e$2b(o._entity._fileName))e$2b(t[u=o._entity._relativePath.resolve(this._layer._baseUri)+o._entity._fileName])||(t[u]=o._entity),e.push(o._entity)}}else if("vol_texture_mapping"===this._layer._strVolumeExt){for(i=0,n=this._rootEntities.length;i<n;i++){var r;e$2b((r=this._rootEntities[i])._volTextures)&&(t[r.name]=r,e.push(r))}for(;s=e.pop();)for(i=0,n=s._childrenPageLod.length;i<n;i++){var o;e$2b((o=s._childrenPageLod[i])._entity)&&e$2b(o._entity._volTextures)&&(t[r.name]=o._entity,e.push(o._entity))}}if(this._layer._refreshVolume)for(var a in this._layer._refreshVolume=!1,t)t[a]._reloadVol=!0;if("vol"===this._layer._strVolumeExt)for(var a in t){var s;if(e$2b(s=t[a])&&s._isParsed&&e$2b(s._volObj)&&s._reloadVol){var l=this._layer,u=l._context._id+"_"+l.id+"_"+s._relativePath.resolve(l._baseUri)+"_"+s._fileName;s._volObj.id==u&&this.reloadVol(s)}}else if("vol_texture_mapping"===this._layer._strVolumeExt)for(var a in t)t[a]._reloadVol&&this.reloadVolMapping(t[a]);e.length=0,t=[]}},_0x2e6772.prototype._refreshImage=function(){if(e$2b(this._layer._imageryLayer)){for(var e=[],t={},i=0;i<this._rootEntities.length;i++){var n=this._rootEntities[i];if(e$2b(n)&&e$2b(n._fileName))for(var r=0;r<n._childrenPageLod.length;r++)for(var o=n._childrenPageLod[r],a=0;a<o._renderEntityList.length;a++){_0x50cee8(this._layer._imageryLayer,o._renderEntityList[a]);for(var s=o._renderEntityList[a]._imagerys.length,l=0;l<s;l++){for(var u=o._renderEntityList[a]._imagerys[l];e$2b(u.parent)&&u.level>u.imageryLayer._imageryProvider.minimumLevel&&!(u=u.parent).rectangle.contains(this._layer.layerBounds););t[JSON.stringify([u.x,u.y,u.level,u.imageryLayer._layerIndex])]=u}e$2b(o._entity)&&e$2b(o._entity._fileName)&&e.push(o._entity)}}for(var c in t)t[c].processStateMachine(this._layer._frameState,!1);for(var h;h=e.pop();)for(i=0,r=h._childrenPageLod.length;i<r;i++){for(o=h._childrenPageLod[i],a=0;a<o._renderEntityList.length;a++)_0x50cee8(this._layer._imageryLayer,o._renderEntityList[a]);e$2b(o._entity)&&e$2b(o._entity._fileName)&&e.push(o._entity)}e.length=0}},_0x2e6772.prototype._hideImage=function(e){if(e$2b(this._layer._imageryLayer)){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i];e$2b(r)&&e$2b(r._fileName)&&t.push(r)}for(var o;o=t.pop();)for(i=0,n=o._childrenPageLod.length;i<n;i++){for(var a=o._childrenPageLod[i],s=0;s<a._renderEntityList.length;s++)a._renderEntityList[s]._showImagerysImmediate=!1;e$2b(a._entity)&&e$2b(a._entity._fileName)&&t.push(a._entity)}t.length=0}},_0x2e6772.prototype.update=function(e,t,i){this._updateSceneMode(t.camera);var n=t.passes.pick;this._statistics.numberOfAttemptedRequests=0,this._statistics.numberOfColorChangeAttempted=0,!n&&!t._fboState.enabled&&(this.LoadingPriority===_0x10659f.UsePagedLodInfo?this._scheduleSkip(t):this._schedule(t)),this._refreshVolume(),this._updatePolygons(),this._updateRenderQueue(e,t,i),t.passes.render&&_0x298688(this,t),this._statisticsLastRender=p$19({},this._statistics),this.traverseRenderEntityRecursionForObjsTranslate(),_0x53a47e(this),_0x32915a(this)},_0x2e6772.prototype._updateRenderQueue=function(e,t,i){if(this.LoadingPriority,_0x10659f.UsePagedLodInfo,i.length,this._layer._fileType===d$15.ClampGroundRealtimeRasterCache){this._rasterFrequency++,40==this._rasterFrequency&&(this._rasterFrequency=0),t.rasterPerFrame=this._layer.rasterPerFrame;for(var n=0,r=this._renderQueue.length;n<r;n++){(o=this._renderQueue[n]).isDestroyed()||o.update(e,t,i,this._layer)}}else for(n=0,r=this._renderQueue.length;n<r;n++){var o;(o=this._renderQueue[n]).isDestroyed()||o.update(e,t,i,this._layer)}},_0x2e6772.prototype._updatePolygons=function(){if(e$2b(this._extrudedId)&&e$2b(this._polygons)){for(var e=0,t=this._renderQueue.length;e<t;e++){var i=this._renderQueue[e],n=i._selectionInforMap._hash;if(e$2b(i._polygonId)){var r={};r[i._polygonId]=0,i.updateObjsOperation(r)}e$2b(n[this._extrudedId])?(i._polygons=this._polygons,i._polygonId=this._extrudedId):(i._polygons=void 0,i._polygonId=void 0,i._polygonCommands=[])}this._polygons=void 0}},_0x2e6772.prototype.saveLocalCache=function(e){if((!0===this._layer._indexedDBSetting.isGeoTilesSave||!0===this._layer._indexedDBSetting.isGeoTilesRootNodeSave||!0===this._layer._indexedDBSetting.isAttributesSave)&&e$2b(this._indexedDBScheduler)){var t={tablename:this.tablename,dbname:this._indexedDBScheduler.dbname};if(e.push(t),this._layer._isS3MBlock){t={tablename:this.tablename+"Texture",dbname:this._indexedDBScheduler.dbname};e.push(t)}}};var _0x35ee84=function(e,t){return e._disFromCamera-t._disFromCamera};function _0x303032(e){e._readyAncestor=void 0;var t=e._parentPagelod;if(e$2b(t)){e._readyAncestor=t._ready?t:t._readyAncestor;for(var i=e._childrenPageLod,n=i.length,r=0;r<n;r++){i[r]._readyAncestor=e._readyAncestor}var o=e._leafChildren;for(n=o.length,r=0;r<n;r++){o[r]._readyAncestor=e._readyAncestor}}}function _0x2342fa(e){return!e._isLeafTile&&e._needRefine}var _0x3df52c=new o$1p,_0x5f7fd8=new o$1p;function _0x3c9068(e,t,i){var n=i._boundingSphere;if(e$2b(n)){var r;if(i._isRootTile){var o=e.cullingVolume,a=e$2b(i._orientedBoundingBox)?i._orientedBoundingBox:n,s=i$W.MASK_INDETERMINATE;i._visibilityPlaneMask=o.computeVisibilityWithPlaneMask(a,s),r=i._visibilityPlaneMask!==i$W.MASK_OUTSIDE}else r=!0;var l=o$1p.distance(n.center,e.camera.position)-n.radius;l=Math.max(0,l),i._disFromCamera=l;var u=o$1p.subtract(n.center,e.camera.positionWC,_0x3df52c);i._centerZDepth=o$1p.dot(e.camera.directionWC,u),i._isVisible=r&&l<=t._visibleDistanceMax&&l>=t._visibleDistanceMin;var c=e.camera,h=n.radius,d=o$1p.multiplyByScalar(c.directionWC,i._centerZDepth,_0x5f7fd8),f=o$1p.add(c.positionWC,d,_0x5f7fd8),p=o$1p.subtract(f,n.center,_0x5f7fd8);if(o$1p.magnitude(p)>h){var _=o$1p.normalize(p,_0x5f7fd8),m=o$1p.multiplyByScalar(_,h,_0x5f7fd8),g=o$1p.add(n.center,m,_0x5f7fd8),x=o$1p.subtract(g,c.positionWC,_0x5f7fd8),v=o$1p.normalize(x,_0x5f7fd8);i._foveatedFactor=1-Math.abs(o$1p.dot(c.directionWC,v))}else i._foveatedFactor=0}else i._isVisible=!0}function _0x318ac6(e,t,i,n){if(e$2b(i._boundingSphere)){var r=e$2b(i._orientedBoundingBox)?i._orientedBoundingBox:i._boundingSphere,o=e.cullingVolume.computeVisibilityWithPlaneMask(r,n),a=o!==i$W.MASK_OUTSIDE;e$2b(i._entity)&&(i._entity._visibilityPlaneMask=o);var s=o$1p.subtract(i._boundingSphere.center,e.camera.positionWC,_0x3df52c);i._centerZDepth=o$1p.dot(e.camera.directionWC,s),i._isVisible=a}else i._isVisible=!0}function _0x2c6cd7(e,t){e._maximumPriority.distance=Math.max(t._disFromCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t._disFromCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t._skipLevel,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t._skipLevel,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t._foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t._foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.pixel=Math.max(t._avgPix,e._maximumPriority.pixel),e._minimumPriority.pixel=Math.min(t._avgPix,e._minimumPriority.pixel)}function _0x130130(e,t,i){var n=e.positionWC,r=t.radius,o=t.center,a=o$1p.distance(o,n),s=.5*e$2a.PI_OVER_FOUR;return 2*(.5*i/Math.tan(s)*r/a)}function _0x59356d(e,t,i){_0x3c9068(e,t,i),i._shouldSelect=!1,i._selected=!1,i._needRequest=!0,i._needRefine=!1;for(var n=i._childrenPageLod,r=n.length,o=0;o<r;o++){(s=n[o])._selected=!1,s._shouldSelect=!1,s._selectionDepth=0,s._stackLength=0,s._finalResolution=!0,s._needRefine=!1,_0x318ac6(e,t,s,i._visibilityPlaneMask),s._isVisible&&(s.calcPixFromCam(e.camera,t._context,t._lodRangeScale,t._fileType,t.LoadingPriority),t._layerScheduler._prepareLoaded||(pageLod._isLessLodDis&&(i._prepareLoad=!0),pageLod._isLessLodDis=!1),s._isLessLodDis||(i._needRefine=!0,s._needRefine=!0))}i._isRootTile&&(i._avgPix=_0x130130(e.camera,i._boundingSphere,t._context.drawingBufferHeight));var a=i._leafChildren;for(r=a.length,o=0;o<r;o++){var s;(s=a[o])._shouldSelect=!1,_0x318ac6(e,t,s,i._visibilityPlaneMask),s._selected=!1,s._needRefine=!1}_0x2c6cd7(t,i)}function _0x441312(e){return e._isVisible}function _0x189d09(e,t,i,n){var r=t._layer;if(n._depth>r._maxSkipLevel&&!n._ready)return!0;var o,a=n._childrenPageLod,s=a.length,l=[],u=!1;for(o=0;o<s;o++){var c=a[o];if(c._isVisible){var h=c._entity;e$2b(h)?(_0x59356d(e,r,h),c._isLessLodDis?u=!0:l.push(h)):u=!0}}n._childrenPageLod.sort(_0x450e29),s=(a=n._leafChildren).length,n._leafChildren.sort(_0x450e29),(n._hasLeafChild||n._leafChildren.length>0)&&(u=!0),s=l.length;var d,f=!1;for(o=0;o<s;o++)_0x441312(d=l[o])&&(i.push(d),f=!0);return!f||u}function _0x2f5f1d(e,t,i){var n=i._boundingVolume;i._isVisible=e.cullingVolume.computeVisibility(n)!==Ae$u.OUTSIDE}function _0x1d3adf(e){if(e._renderEntityList.length>0&&e._ready)return{state:0};var t=[];if(_0x1658d0(e)){for(var i=!1,n=e._entity._childrenPageLod,r=n.length,o=0,a=0,s=0;s<r;++s){if((u=n[s])._isVisible)1===(c=_0x1d3adf(u)).state?(t=t.concat(c.clipBounds),o++):2===c.state&&(t=t.concat(c.clipBounds),i=!0);else o++,a++}var l=(n=e._entity._leafChildren).length;for(s=0;s<l;++s){var u,c;if((u=n[s])._isVisible)0===r&&!e$2b(u.max)&&(u.max=e.max,u.min=e.min),1===(c=_0x1d3adf(u)).state?(t=t.concat(c.clipBounds),o++):2===c.state&&(t=t.concat(c.clipBounds),i=!0);else o++,a++}var h=l+r;return 0===l&&0===r||h===a?((t=[]).push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t}):0===t.length?{state:0}:i||o!==h?{state:2,clipBounds:t}:((t=[]).push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t})}return t.push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t}}function _0x44fb0e(e,t,i){if(!i._selected){i._selected=!0;for(var n=i._renderEntityList,r=n.length,o=0;o<r;o++){var a=n[o];if(a.ownerPagelod=i,_0x2f5f1d(e,t,a),a._isVisible)if(a._clipBounds=[],i._finalResolution)t._renderQueue.push(a);else{for(var s=i._entity._childrenPageLod,l=s.length,u=0;u<l;++u){var c=s[u];if(c._isVisible){var h=_0x1d3adf(c);0!=h.state&&(a._clipBounds=a._clipBounds.concat(h.clipBounds))}}a._clipBounds.length>0&&t._renderQueue.push(a)}}}}function _0x3cf52c(e,t,i){var n=t._layer,r=[];r.push(i);for(var o=!1;r.length>0;)for(var a=r.pop(),s=a._childrenPageLod,l=s.length,u=0;u<l;++u){_0x318ac6(e,n,s[u],a._visibilityPlaneMask);var c=s[u]._entity;e$2b(c)&&_0x441312(s[u])&&(s[u]._needRefine=!0,_0x1c01b6(t,c),c._ready?(o=!0,_0x59356d(e,n,c),_0x211f06(e,t,c)):r.push(c))}return o}function _0x211f06(e,t,i){if(!i._selected){i._selected=!0;for(var n=i._childrenPageLod,r=n.length,o=0;o<r;o++){!(s=n[o])._isVisible||(s._isLessLodDis||!e$2b(s._entity)||s._shouldSelect)&&(s._shouldSelect=!0)}var a=i._leafChildren;for(r=a.length,o=0;o<r;o++){var s;(s=a[o])._isVisible&&(s._shouldSelect=!0)}}}function _0x1c1e01(e,t,i){if(i._ready)_0x211f06(e,t,i);else{var n=i._readyAncestor;e$2b(n)&&(n._shouldSelect=!0),_0x3cf52c(e,t,i)}}function _0x2438b4(e,t){var i=e._boundingSphere;if(!e$2b(i))return!0;!e$2b(i)&&e$2b(e._orientedBoundingBox)&&(i=e._boundingSphere=i$1c.fromOrientedBoundingBox(e._orientedBoundingBox));var n=Math.max(2*i.radius,1),r=t.camera;return 60*(0!==r.positionWCDeltaMagnitude?r.positionWCDeltaMagnitude:r.positionWCDeltaMagnitudeLastFrame)/n<1}function _0x3e2b92(e,t,i){!i._ready&&i._needRequest&&_0x2438b4(i,e)&&(i._hasConfig&&!i._configReady&&(i._needLoad=!0,t.loadConfig(i)),e$2b(i._parent)&&0==i._skipLevel&&(i._parent._hasConfig?i._skipLevel=i._parent._skipLevel+1:i._skipLevel=i._parent._skipLevel),i._needRequest=!1,t._requestEntities.push({entity:i,priority:i._priority,owner:t}))}function _0x1c01b6(e,t){var i=e._replacementList,n=e._replacementSentinel;e$2b(t._replacementNode)?i.splice(n,t._replacementNode):t._replacementNode=i.add(t)}function _0x1658d0(e){if(e$2b(e._entity)&&e._entity._hasLeafChild)for(var t=0;t<e._entity._leafChildren.length;t++){if(!e._entity._leafChildren[t]._ready)return!1}return e._needRefine&&!e._isLeafNode}var _0x989595={stack:new r$R,stackMaximumLength:0,ancestorStack:new r$R,ancestorStackMaximumLength:0};function _0x157273(e,t,i){var n,r=e._layer,o=_0x989595.stack,a=_0x989595.ancestorStack;for(o.push(i);o.length>0||a.length>0;){if(_0x989595.stackMaximumLength=Math.max(_0x989595.stackMaximumLength,o.length),_0x989595.ancestorStackMaximumLength=Math.max(_0x989595.ancestorStackMaximumLength,a.length),a.length>0){var s=a.peek();if(s._stackLength===o.length){a.pop(),s!==n&&(s._finalResolution=!1),_0x44fb0e(t,e,s);continue}}var l=o.pop(),u=l._shouldSelect,c=_0x1658d0(l);if(u){if(l._selectionDepth=a.length,l._selectionDepth>0&&(r._hasMixedContent=!0),n=l,!c){_0x44fb0e(t,e,l);continue}a.push(l),l._stackLength=o.length}if(c){for(var h=l._entity._childrenPageLod,d=h.length,f=0;f<d;++f){(p=h[f])._isVisible&&o.push(p)}d=(h=l._entity._leafChildren).length;for(f=0;f<d;++f){var p;(p=h[f])._isVisible&&o.push(p)}}}}var _0x450e29=function(e,t){return 0===e._disFromCamera&&0===t._disFromCamera?e._centerZDepth-t._centerZDepth:e._disFromCamera-t._disFromCamera};function _0x115e29(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function _0x3daa9c(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(!(t>r-1)){n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e,n,a);n+=a}}}function _0x1b60d3(e,t){var i=t._fileName.split("_"),n=t.request.url;t.request.throttle=!0,t.request.throttleByServer=!0,t.request.type=V$15.PACK,t.request.quadKey=_0x115e29(i[2],i[1],i[0]),t.request.providerName=n.substring(n.indexOf("datas/")+6,n.indexOf("/data/"));var r=t$11.createIfNeeded(n).getDerivedResource({url:n,request:t.request}).fetchArrayBuffer();e$2b(r)?(t._s3mLoadState=N$P.LOADING,e._statistics.numberOfPendingRequests++,r.then((function(i){var n=_0x3daa9c(i,t.request.quadKeyIndex);e$2b(n)?(i=new Uint8Array(n).buffer,0!=e._cacheKey.length?t.s3mBuffer=_0xfdcb2c(i,e._cacheKey):t.s3mBuffer=i,t._s3mLoadState=N$P.LOADED,e._statistics.numberOfPendingRequests--,e._statistics.numberOfProcessingAttempted++,t.request=null):t._s3mLoadState=N$P.FAILED}),(function(i){e$2b(i)?(e._statistics.numberOfPendingRequests--,t._s3mLoadState=N$P.FAILED):(e._statistics.numberOfAttemptedRequests++,e._statistics.numberOfPendingRequests--,t._s3mLoadState=N$P.UNLOAD,t.request=null)}))):t.request=null}function _0x137248(e,t,i){e._isS3MBlock&&!i._isAncestorBlock||(e$2b(i._replacementNode)?t.splice(t.tail,i._replacementNode):i._replacementNode=t.add(i))}function _0x5e7644(e,t,i){var n=e._nLODLev;const r=new _0x206cda;r.layer=e.layer,r._subdomainIndex=e._subdomainIndex+i+1,!e$2b(r._volObj)&&e$2b(e._volObj)&&(r._volObj=e._volObj,Se$d.AddRef(e._volObj.id));var o=t._rangeDataList;if(o.indexOf("/")>-1){var a=o.lastIndexOf("/"),s=o.substring(0,a+1);r._fileName=o.substring(a+1),r._relativePath=new h$16(s).resolve(e._relativePath)}else r._relativePath=e._relativePath,r._fileName=o;return r._avgPix=t._pix,r._disFromCamera=t._disFromCamera,r._nLODLev=n+1,r._boundingSphere=t._boundingSphere,r._originalBS=t._originalBS,r._orientedBoundingBox=t._orientedBoundingBox,r}function _0x19a9a0(e,t){e$2b(e._entityObjectId[t._fileName])&&(e._entityObjectId[t._fileName]=void 0,e._objectIdChange=!0),e$2b(e._entityModelId[t._fileName])&&(e._entityModelId[t._fileName]=void 0,e._objectIdChange=!0)}function _0x8f920b(e,t){if(e$2b(e._associatedFieldName)&&e$2b(e._entityObjectId[t._fileName])){for(var i={},n=0;n<t._childrenPageLod.length;n++)for(var r=0;r<t._childrenPageLod[n]._renderEntityList.length;r++){var o=t._childrenPageLod[n]._renderEntityList[r];for(var a in o._selectionInforMap._hash)i[a]=e._attributes[a][e._associatedFieldName]}e._entityObjectId[t._fileName]=i,e._objectIdChange=!0}}function _0x4a338b(e,t){if(e._isFineLayer&&e$2b(e._entityModelId[t._fileName])){for(var i={},n=0;n<t._childrenPageLod.length;n++)for(var r=0;r<t._childrenPageLod[n]._renderEntityList.length;r++){var o=t._childrenPageLod[n]._renderEntityList[r];for(var a in o._selectionInforMap._hash)i[a]=a}e._entityModelId[t._fileName]=i,e._objectIdChange=!0}}function _0x59aca4(e,t,i){if(e$2b(t._hypsometricSetting))for(var n=e.positionWC,r=_0xf6df4(i,t._hypsometricSetting,n)&&_0x44603d(t._hypsometricSetting,e),o=0;o<i._renderEntityList.length;o++){i._renderEntityList[o]._isHypsometricVisible=r}}function _0x27b6a0(e,t){!e$2b(t._entity._volObj)&&e$2b(e._volObj)&&(t._entity._volObj=e._volObj,Se$d.AddRef(e._volObj.id))}function _0x38f75a(e,t){return o$1p.distance(e.center,t.center)<=e.radius+t.radius}function _0x5a5203(e,t){if(e._flattening){var i=t._boundingSphere;if(e$2b(i))for(var n=e._flattenRegions.values,r=0,o=n.length;r<o;r++){var a=n[r].boundingSphere;if(e$2b(a)&&_0x38f75a(i,a)){t.isFlatten=!0;break}}}}function _0x4c6d9a(e,t,i,n){var r,o=[];if(t instanceof Array)for(var a=0;a<t.length;a++){if(!t[a].imageryProvider.ready)return;var s=t[a].getMaxScaleLevel(e._cartographic);o.push(s),r=0===a?s:Math.max(r,s)}else{if(!t.imageryProvider.ready)return;r=t.getMaxScaleLevel(e._cartographic)}var l=Math.min(i,r);if(l>0&&!e.hasScaleImagerys(l)){var u=[];if(t instanceof Array)for(a=0;a<t.length;a++){var c=t[a].getImagery(e._cartographic,Math.min(o[a],l));u=u.concat(c)}else u=t.getImagery(e._cartographic,l);u.length>0&&e.setScaleImagerys(u,l)}e.resetScaleImagerys(l,n)}function _0x35e240(e,t,i){var n=t._layer,r=e.calcImageryScaleLevel(i.camera,i.context,n._lodRangeScale,t._nLoadingPriority,e._rangeMode);r=Math.ceil(r)-1;for(var o=0;o<e._renderEntityList.length;o++){var a=e._renderEntityList[o];i.cullingVolume.computeVisibility(a._boundingVolume)!=Ae$u.OUTSIDE&&e$2b(a._cartographic)&&_0x4c6d9a(a,n._imageryLayer,r,i)}}function _0x305eab(e,t){if(!e)return 0;for(var i=0,n=0,r=e._childrenPageLod.length;n<r;n++){var o=e._childrenPageLod[n],a=_0x13a796(o,t);o._oriBoundingSphere||(o._oriBoundingSphere=o._boundingSphere.clone()),o._boundingSphere.radius=o._oriBoundingSphere.radius+a,i+=a=Math.max(a,_0x305eab(o._entity,t))}return i}function _0x13a796(e,t){for(var i=0,n=0;n<e._renderEntityList.length;n++)if(e$2b(e._renderEntityList[n])){var r=e._renderEntityList[n];i=Math.max(r._radiusToExpand(t),i)}return i}function _0x2aa23a(e,t){var i=t.positionCartographic.height;return(i=i<0?0:i)<=e._maxVisibleAltitude&&i>=e._minVisibleAltitude}function _0xf6df4(e,t,i){var n=o$1p.distance(e._boundingSphere.center,i)-e._boundingSphere.radius;return(n=n<0?0:n)<=t._visibleDistanceMax&&n>=t._visibleDistanceMin}function _0x44603d(e,t){var i=t.positionCartographic.height;return(i=i<0?0:i)<=e._maxVisibleAltitude&&i>=e._minVisibleAltitude}function _0x53eb49(e,t,i){var n,r=e._boundingSphere,o=e._orientedBoundingBox;if(t._fileType===d$15.ClampGroundRealtimeRasterCache){var a=r.center,s=r.radius,l=o$1p.fromRadians(e$2a.toRadians(a.x),e$2a.toRadians(a.y),a.z),u=o$1p.fromRadians(e$2a.toRadians(a.x),e$2a.toRadians(a.y-s),a.z),c=o$1p.distance(l,u);n=o$1p.distance(l,i)-c}else n=e$2b(r)?o$1p.distance(r.center,i)-r.radius:Math.sqrt(y$Z.distanceSquaredTo(o,i));n=n<0?0:n,e._disFromCamera=n;var h=t._translucencyByDistance?t._visibleDistanceMax+2e3:t._visibleDistanceMax;return n>=t._visibleDistanceMin&&n<=h}_0x2e6772.prototype._scheduleSkip=function(e){var t=this._layer;this._selectEntities.length=0,this._renderQueue.length=0,this._replacementList.splice(this._replacementList.tail,this._replacementSentinel);var i,n,r,o=[],a=[];for(i=0,n=this._rootEntities.length;i<n;i++){var s=this._rootEntities[i];if(_0x59356d(e,t,s),t.residentRootTile||_0x441312(s)){if(!s._configReady){this.loadConfig(s);continue}o.push(s),a.push(s)}}for(a.sort(_0x450e29),o.sort(_0x35ee84);r=o.pop();){_0x303032(r);var l=!0;_0x2342fa(r)&&(l=_0x189d09(e,this,o,r)),r._isLeafTile&&_0x59356d(e,t,r),(l||r._needLoad||t.residentRootTile&&r._isRootTile)&&(_0x1c1e01(e,this,r),_0x3e2b92(e,this,r)),_0x1c01b6(this,r)}for(i=0,n=a.length;i<n;i++){for(var u=a[i],c=0,h=u._childrenPageLod.length;c<h;c++){_0x157273(this,e,u._childrenPageLod[c])}for(var d=0,f=u._leafChildren.length;d<f;d++){_0x157273(this,e,u._leafChildren[d])}}this.freeResource(e);var p=this._requestEntities.length;for(i=0;i<p;i++)this._requestEntities[i].entity.updatePriority(t),e.requests.push(this._requestEntities[i]);this._requestEntities.length=0},_0x2e6772.prototype._processPackRequests=function(){var e=this._packRequestEntities,t=e.length;if(!(t<1)){e.sort(_0x35ee84);for(var i=0;i<t;i++){_0x1b60d3(this,e[i])}this._packRequestEntities.length=0}},_0x2e6772.prototype._processParsingEntities=function(){var e=this._parsingEntities,t=e.length;if(!(t<1)){e.sort(_0x35ee84);for(var i=this._layer,n=i._isS3MB?_0x1309b8.binaryDataParser:_0x215208.binaryDataParser,r=0;r<t;r++){var o=e[r];n(i,o,o.s3mBuffer,o.volBuffer)}this._parsingEntities.length=0}},_0x2e6772.prototype._schedule=function(e){var t=e.camera,i=t.positionWC,n=e.cullingVolume,r=this._layer,o=this._context,a=_0x2aa23a(r,t),s=[],l=e.requests;const u=[],c=e.processingTiles,h=e.replacementList;var d=this;if(!a)return void(r._fileType===d$15.ClampGroundRealtimeRasterCache&&this.refreshRaster(e));var f=0,p=[];const _=i$W.MASK_INDETERMINATE,m=r._fileType===d$15.ClampGroundRealtimeRasterCache,g=e$2b(r.themeStyle)&&e$2b(r.queryFieldNames);for(var x=0,v=this._rootEntities.length;x<v;x++){if((T=this._rootEntities[x])._rootName=T._fileName,T._blockKey=T._fileName,!_0x53eb49(T,r,i)){_0x19a9a0(this,T);continue}const e=T.boundingVolume;(T._visibilityPlaneMask=n.computeVisibilityWithPlaneMask(e,_),T.isVisible=T.isFlatten||T.hasTranslate||T._visibilityPlaneMask!==i$W.MASK_OUTSIDE||m,T.isVisible)?(e$2b(r._queryFieldNames)&&T.attrLoadState!=N$P.LOADED&&T.attrLoadState!=N$P.LOADING&&(!0===d._indexedDBSetting.isAttributesSave?d._attributes.status.promise.then((function(){T.attrLoadState!=N$P.LOADED&&T.attrLoadState!=N$P.LOADING&&_0x1c0125(T,d)})):p.push(T)),T.attrLoadState===N$P.LOADED&&f++,g&&T.attrLoadState!==N$P.LOADED?T.isVisible=!1:(_0x137248(r,h,T),T._s3mLoadState!==N$P.PARSED?T._ready?(s.push(T),_0x8f920b(this,T),_0x4a338b(this,T)):(l.push({entity:T,priority:T._disFromCamera,owner:this}),_0x19a9a0(this,T)):c.push(T))):_0x19a9a0(this,T)}f===v&&!this._attrloaded&&(this._attrloaded=!0,r.attributeDownloaded.raiseEvent(r.name+" attribute downloaded."));for(var y;y=s.pop();){_0x137248(r,h,y);const i=y._visibilityPlaneMask;for(let a=0,d=y._childrenPageLod.length;a<d;a++){const d=y._childrenPageLod[a];if(_0x59aca4(t,r,d),d._isLeafNode){e$2b(r._imageryLayer)&&_0x35e240(d,this,e),u.push(d);continue}if(d.calcPixFromCam(t,o,r._lodRangeScale,r._adjustedLodRangeScale,this._nLoadingPriority),this._prepareLoaded||(d._isLessLodDis&&e$2b(d._entity)&&(d._entity._prepareLoad=!0),d._isLessLodDis=!1),d._isLessLodDis){u.push(d);continue}if(!e$2b(d._entity)){var $=_0x5e7644(y,d,a);_0x5a5203(r,$),this._currentMaxLevel=Math.max(this._currentMaxLevel,$._nLODLev),d._entity=$,u.push(d),_0x137248(r,h,$);continue}const f=d._entity,p=f.boundingVolume;if(f._visibilityPlaneMask=n.computeVisibilityWithPlaneMask(p,i),f.isVisible=f.isFlatten||f.hasTranslate||f._visibilityPlaneMask!==i$W.MASK_OUTSIDE,this._beginToLoadLeaf=!0,this._prepareLoaded||(f.isVisible||(d._entity._prepareLoad=!0),f.isVisible=!0),f.isVisible){if(_0x137248(r,h,f),f._s3mLoadState===N$P.PARSED){c.push(f),u.push(d);continue}if(f._s3mLoadState===N$P.TRANSFORMED){r._nProcessType===_0x5150e8.Add&&u.push(d),s.push(f);continue}_0x27b6a0(y,d),u.push(d),l.push({entity:f,priority:f._disFromCamera,owner:this})}}}let b=[];for(let e=0,t=u.length;e<t;e++){const t=u[e];b=b.concat(t._renderEntityList)}if(this._renderQueue=b,!this._indexedDBSetting.isAttributesSave){for(p.sort(_0x35ee84),x=0;x<p.length;x++)p[x].attrLoadState===N$P.UNLOAD&&_0x1c0125(p[x],this,!1);if(this._beginToLoadLeaf&&r.hasAttributeIndex)for(x=0,v=this._rootEntities.length;x<v;x++){var T;((T=this._rootEntities[x]).leafAttrLoadState===N$P.UNLOAD||T.leafAttrLoadState===N$P.FAILED)&&_0x1c0125(T,this,!0)}}if(r._showLabel||r._showIcon){const e=[];for(let t=0,i=b.length;t<i;t++){const i=b[t];for(let t in i._labelIndexs)i._labelIndexs.hasOwnProperty(t)&&e.push(t)}r._showLabel&&this._layer._labelCollection.setVisibleLabels(e),r._showIcon&&this._layer._iconCollection.setVisibleLabels(e)}this._packingRequest&&(this._processPackRequests(),this._processParsingEntities())},_0x2e6772.prototype.loadImagery=function(e,t){if(!this._stopLoadImagery){for(var i=0,n=[],r=0,o=this._rootEntities.length;r<o;r++){var a=this._rootEntities[r];n.push(a)}for(var s;s=n.pop();){if((i+=s.loadImagery(e,t))>10)return;for(r=0,o=s._childrenPageLod.length;r<o;r++){var l=s._childrenPageLod[r];e$2b(l._entity)&&(l._entity.loadImagery(e,t),n.push(l._entity))}}}},_0x2e6772.prototype._getCameraChanged=function(e){var t=!o$1p.equals(this._cameraPos,e.positionWC)||!o$1p.equals(this._cameraDir,e.directionWC)||!o$1p.equals(this._cameraUp,e.upWC);(this._cameraPos=o$1p.clone(e.position,this._cameraPos),this._cameraDir=o$1p.clone(e.direction,this._cameraDir),this._cameraUp=o$1p.clone(e.up,this._cameraUp),t)?e._clockStart=(new Date).getTime():(new Date).getTime()-e._clockStart<200&&(t=!0);return t},_0x2e6772.prototype.refresh=function(){this._renderQueue.length=0;for(var e=0,t=this._rootEntities.length;e<t;e++){for(var i=this._rootEntities[e],n=0;n<i._childrenPageLod.length;n++){var r=i._childrenPageLod[n];r=r&&!r.isDestroyed()&&r.destroy()}i._childrenPageLod.length=0,i.attributeBuffer=i.attributeBuffer&&!i.attributeBuffer.isDestroyed()&&i.attributeBuffer.destroy(),i._ready=!1,i._s3mLoadState=N$P.UNLOAD}},_0x2e6772.prototype.refreshPrepareLoad=function(){for(var e=[],t=0,i=this._rootEntities.length;t<i;t++){var n=this._rootEntities[t];n._ready&&e.push(n)}for(var r;r=e.pop();)if(r._prepareLoad){for(var o=0;o<r._childrenPageLod.length;o++){var a=r._childrenPageLod[o];a=a&&!a.isDestroyed()&&a.destroy()}r._childrenPageLod.length=0,r.attributeBuffer=r.attributeBuffer&&!r.attributeBuffer.isDestroyed()&&r.attributeBuffer.destroy(),r._ready=!1,r._s3mLoadState=N$P.UNLOAD}else for(t=0,i=r._childrenPageLod.length;t<i;t++){var s=r._childrenPageLod[t];r._isLeafTile||s._entity&&e.push(s._entity)}},_0x2e6772.prototype.getRenderQueueSize=function(){return this._renderQueue.length},_0x2e6772.prototype._updateSceneMode=function(e){if(e._mode!==this._sceneMode){var t=this._layer,i=new p$1d;p$1d.inverse(t._matModel,i),this._sceneMode=e._mode,this._projection=e._projection,t.refresh();for(var n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];!e$2b(o)||!e$2b(o._boundingSphere)||(i$1c.transform(o._boundingSphere,i,o._boundingSphere),i$1c.transform(o._boundingSphere,t._matModel,o._boundingSphere),e$2b(o._orientedBoundingBox)&&(p$1d.multiplyByPoint(i,o._orientedBoundingBox.center,o._orientedBoundingBox.center),p$1d.multiplyByPoint(t._matModel,o._orientedBoundingBox.center,o._orientedBoundingBox.center)))}}},_0x2e6772.prototype.traverseRenderEntity=function(e,t){for(var i=[],n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];i.push(o)}for(var a;a=i.pop();)for(n=0,r=a._childrenPageLod.length;n<r;n++){for(var s=a._childrenPageLod[n],l=0;l<s._renderEntityList.length;l++)!e$2b(s._renderEntityList[l])||(e.entity=a,t(s._renderEntityList[l],e));s._entity&&i.push(s._entity)}},_0x2e6772.prototype.traverseRenderEntityRecursionForObjsTranslate=function(){if(!(Object.keys(this._layer._objsOffsetList).length<1))for(var e=0,t=this._rootEntities.length;e<t;e++){var i=this._rootEntities[e];if(i._ready){var n=_0x305eab(i,this._layer._objsOffsetList);i._oriBoundingSphere||(i._oriBoundingSphere=i._boundingSphere.clone()),i._boundingSphere.radius=i._oriBoundingSphere.radius+n}}},_0x2e6772.prototype.refreshRasterById=function(e,t){for(var i=[],n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];o._ready&&i.push(o)}for(var a;a=i.pop();)for(n=0,r=a._childrenPageLod.length;n<r;n++){for(var s=a._childrenPageLod[n],l=0;l<s._renderEntityList.length;l++)if(e$2b(s._renderEntityList[l])){var u=s._renderEntityList[l]._selectionInforMap;if(e$2b(u))for(var c in u._hash){if(parseInt(c)===parseInt(e)){s._renderEntityList[l].refreshRaster(t,!0);break}}}a._isLeafTile||s._entity&&i.push(s._entity)}},_0x2e6772.prototype.refreshRaster=function(e){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i];r._ready&&t.push(r)}for(var o;o=t.pop();)for(i=0,n=o._childrenPageLod.length;i<n;i++){for(var a=o._childrenPageLod[i],s=0;s<a._renderEntityList.length;s++)!e$2b(a._renderEntityList[s])||a._renderEntityList[s].refreshRaster(e,!0);o._isLeafTile||a._entity&&t.push(a._entity)}},_0x2e6772.prototype._getMemoryUsageInBytes=function(){for(var e=0,t=this._replacementList.head;e$2b(t)&&(e$2b(t.item)||e$2b(t.next));){var i=t.item;e$2b(i)&&(e+=i.memoryUsage()),t=t.next}return e},_0x2e6772.prototype._getCacheMemoryUsageInBytes=function(){for(var e=0,t=this._replacementList.head;t!==this._replacementSentinel;){var i=t.item;e$2b(i)&&(e+=i.memoryUsage()),t=t.next}return e},_0x2e6772.prototype.freeResource=function(e){for(var t=this._getCacheMemoryUsageInBytes(),i=1024*ti$3.getCacheSize()*1024,n=this._replacementList.head;e$2b(n)&&n!==this._replacementSentinel&&(this._layer._clearMemoryImmediately||t>i);){var r=n.item;if(n=n.next,e$2b(r)&&(this._replacementList.remove(r._replacementNode),r._replacementNode=null,!r._isRootTile||!this._layer.residentRootTile)){var o={geoSize:0,texSize:0},a=r.memoryUsageEx(o);ti$3._memGeometryRemoved(o.geoSize),r.freeResource(e),t-=a}}},_0x2e6772.prototype.isDestroyed=function(){return!1},_0x2e6772.prototype.destroy=function(){this._renderQueue.length=0,this._replacementList.splice(this._replacementList.tail,this._replacementSentinel);var e=this._layer,t=void 0;e._fileType===d$15.ClampGroundRealtimeRasterCache&&(t=e._frameState);for(var i=this._replacementList.head;i!==this._replacementSentinel;){var n=i.item,r={geoSize:0,texSize:0};n.memoryUsageEx(r),ti$3._memGeometryRemoved(r.geoSize),i=i.next,this._replacementList.remove(n._replacementNode),n.destroy(t)}return i$10(this)};var _0x32789f=(_0x4fa749=!0,function(e,t){var i=_0x4fa749?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fa749=!1,i}),_0x3c37f7=_0x32789f(void 0,(function(){return _0x3c37f7.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c37f7).search("(((.+)+)+)+$")})),_0x4fa749;_0x3c37f7();var _0x4dbad4="attribute vec4 position;\nuniform vec4 uRect;\nuniform vec4 uSingleRegion;\nvarying float fHeight;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vTexCoord = (vPos.xy - uSingleRegion.xy) / (uSingleRegion.zw - uSingleRegion.xy);\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.5, 1.0);\n fHeight = vPos.z;\n}",k$K=Math.cos,z$K=Math.sin,H$Q=Math.sqrt,j$O={computePosition:function(e,t,i,n,r,o,a){var s=t.radiiSquared,l=e.nwCorner,u=e.boundingRectangle,c=l.latitude-e.granYCos*n+r*e.granXSin,h=k$K(c),d=z$K(c),f=s.z*d,p=l.longitude+n*e.granYSin+r*e.granXCos,_=h*k$K(p),m=h*z$K(p),g=s.x*_,x=s.y*m,v=H$Q(g*_+x*m+f*d);if(o.x=g/v,o.y=x/v,o.z=f/v,i){var y=e.stNwCorner;e$2b(y)?(c=y.latitude-e.stGranYCos*n+r*e.stGranXSin,p=y.longitude+n*e.stGranYSin+r*e.stGranXCos,a.x=(p-e.stWest)*e.lonScalar,a.y=(c-e.stSouth)*e.latScalar):(a.x=(p-u.west)*e.lonScalar,a.y=(c-u.south)*e.latScalar)}}},J$G=new f$13,h$N=new o$1p,K$I=new a$18,E$P=new o$1p,q$R=new n$1b;function Z$K(e,t,i,n,r,o,a){var s=Math.cos(t),l=n*s,u=i*s,c=Math.sin(t),h=n*c,d=i*c;h$N=q$R.project(e,h$N),h$N=o$1p.subtract(h$N,E$P,h$N);var f=f$13.fromRotation(t,J$G);h$N=f$13.multiplyByVector(f,h$N,h$N),h$N=o$1p.add(h$N,E$P,h$N),o-=1,a-=1;var p=(e=q$R.unproject(h$N,e)).latitude,_=p+o*d,m=p-l*a,g=p-l*a+o*d,x=Math.max(p,_,m,g),v=Math.min(p,_,m,g),y=e.longitude,$=y+o*u,b=y+a*h,T=y+a*h+o*u;return{north:x,south:v,east:Math.max(y,$,b,T),west:Math.min(y,$,b,T),granYCos:l,granYSin:h,granXCos:u,granXSin:d,nwCorner:e}}j$O.computeOptions=function(e,t,i,n,r,o,a){var s=e.east,l=e.west,u=e.north,c=e.south,h=!1,d=!1;u===e$2a.PI_OVER_TWO&&(h=!0),c===-e$2a.PI_OVER_TWO&&(d=!0);var f,p,_,m,g,x=u-c;_=(g=l>s?e$2a.TWO_PI-l+s:s-l)/((f=Math.ceil(g/t)+1)-1),m=x/((p=Math.ceil(x/t)+1)-1);var v=h$18.northwest(e,o),y=h$18.center(e,K$I);(0!==i||0!==n)&&(y.longitude<v.longitude&&(y.longitude+=e$2a.TWO_PI),E$P=q$R.project(y,E$P));var $=m,b=_,T=h$18.clone(e,r),C={granYCos:$,granYSin:0,granXCos:b,granXSin:0,nwCorner:v,boundingRectangle:T,width:f,height:p,northCap:h,southCap:d};if(0!==i){var S=Z$K(v,i,_,m,y,f,p);if(u=S.north,c=S.south,s=S.east,l=S.west,u<-e$2a.PI_OVER_TWO||u>e$2a.PI_OVER_TWO||c<-e$2a.PI_OVER_TWO||c>e$2a.PI_OVER_TWO)throw new t$16("Rotated rectangle is invalid. It crosses over either the north or south pole.");C.granYCos=S.granYCos,C.granYSin=S.granYSin,C.granXCos=S.granXCos,C.granXSin=S.granXSin,T.north=u,T.south=c,T.east=s,T.west=l}if(0!==n){i-=n;var w=h$18.northwest(T,a),E=Z$K(w,i,_,m,y,f,p);C.stGranYCos=E.granYCos,C.stGranXCos=E.granXCos,C.stGranYSin=E.granYSin,C.stGranXSin=E.granXSin,C.stNwCorner=w,C.stWest=E.west,C.stSouth=E.south}return C};var Lt$4=new o$1p,Bt$7=new o$1p,Yt$3=new o$1p,qt$5=new o$1p,Xt$2=new h$18,ne$B=new o$1o,ie$x=new i$1c,oe$q=new i$1c;function Wt$6(e,t){var i=new I$1p({attributes:new a$_,primitiveType:W$18.TRIANGLES});return i.attributes.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(i.attributes.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(i.attributes.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(i.attributes.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:t.bitangents})),i}function ue$t(e,t,i,n){var r=e.length,o=t.normal?new Float32Array(r):void 0,a=t.tangent?new Float32Array(r):void 0,s=t.bitangent?new Float32Array(r):void 0,l=0,u=qt$5,c=Yt$3,h=Bt$7;if(t.normal||t.tangent||t.bitangent)for(var d=0;d<r;d+=3){var f=o$1p.fromArray(e,d,Lt$4),p=l+1,_=l+2;h=i.geodeticSurfaceNormal(f,h),(t.tangent||t.bitangent)&&(o$1p.cross(o$1p.UNIT_Z,h,c),p$1e.multiplyByVector(n,c,c),o$1p.normalize(c,c),t.bitangent&&o$1p.normalize(o$1p.cross(h,c,u),u)),t.normal&&(o[l]=h.x,o[p]=h.y,o[_]=h.z),t.tangent&&(a[l]=c.x,a[p]=c.y,a[_]=c.z),t.bitangent&&(s[l]=u.x,s[p]=u.y,s[_]=u.z),l+=3}return Wt$6(t,{positions:e,normals:o,tangents:a,bitangents:s})}var Tt$8=new o$1p,jt$3=new o$1p;function se$r(e,t,i){var n=e.length,r=t.normal?new Float32Array(n):void 0,o=t.tangent?new Float32Array(n):void 0,a=t.bitangent?new Float32Array(n):void 0,s=0,l=0,u=0,c=!0,h=qt$5,d=Yt$3,f=Bt$7;if(t.normal||t.tangent||t.bitangent)for(var p=0;p<n;p+=6){var _=o$1p.fromArray(e,p,Lt$4),m=o$1p.fromArray(e,(p+6)%n,Tt$8);if(c){var g=o$1p.fromArray(e,(p+3)%n,jt$3);o$1p.subtract(m,_,m),o$1p.subtract(g,_,g),f=o$1p.normalize(o$1p.cross(g,m,f),f),c=!1}o$1p.equalsEpsilon(m,_,e$2a.EPSILON10)&&(c=!0),(t.tangent||t.bitangent)&&(h=i.geodeticSurfaceNormal(_,h),t.tangent&&(d=o$1p.normalize(o$1p.cross(h,f,d),d))),t.normal&&(r[s++]=f.x,r[s++]=f.y,r[s++]=f.z,r[s++]=f.x,r[s++]=f.y,r[s++]=f.z),t.tangent&&(o[l++]=d.x,o[l++]=d.y,o[l++]=d.z,o[l++]=d.x,o[l++]=d.y,o[l++]=d.z),t.bitangent&&(a[u++]=h.x,a[u++]=h.y,a[u++]=h.z,a[u++]=h.x,a[u++]=h.y,a[u++]=h.z)}return Wt$6(t,{positions:e,normals:r,tangents:o,bitangents:a})}function Jt$3(e,t){var i=e._vertexFormat,n=e._ellipsoid,r=t.height,o=t.width,a=t.northCap,s=t.southCap,l=0,u=r,c=r,h=0;a&&(l=1,c-=1,h+=1),s&&(u-=1,c-=1,h+=1),h+=o*c;for(var d=i.position?new Float64Array(3*h):void 0,f=i.st?new Float32Array(2*h):void 0,p=0,_=0,m=Lt$4,g=ne$B,x=Number.MAX_VALUE,v=Number.MAX_VALUE,y=-Number.MAX_VALUE,$=-Number.MAX_VALUE,b=l;b<u;++b)for(var T=0;T<o;++T)j$O.computePosition(t,n,i.st,b,T,m,g),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(f[_++]=g.x,f[_++]=g.y,x=Math.min(x,g.x),v=Math.min(v,g.y),y=Math.max(y,g.x),$=Math.max($,g.y));if(a&&(j$O.computePosition(t,n,i.st,0,0,m,g),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(f[_++]=g.x,f[_++]=g.y,x=g.x,v=g.y,y=g.x,$=g.y)),s&&(j$O.computePosition(t,n,i.st,r-1,0,m,g),d[p++]=m.x,d[p++]=m.y,d[p]=m.z,i.st&&(f[_++]=g.x,f[_]=g.y,x=Math.min(x,g.x),v=Math.min(v,g.y),y=Math.max(y,g.x),$=Math.max($,g.y))),i.st&&(x<0||v<0||y>1||$>1))for(var C=0;C<f.length;C+=2)f[C]=(f[C]-x)/(y-x),f[C+1]=(f[C+1]-v)/($-v);var S=ue$t(d,i,n,t.tangentRotationMatrix),w=6*(o-1)*(c-1);a&&(w+=3*(o-1)),s&&(w+=3*(o-1));var E,P=ce$x.createTypedArray(h,w),A=0,L=0;for(E=0;E<c-1;++E){for(var M=0;M<o-1;++M){var R=A,O=R+o,I=O+1,D=R+1;P[L++]=R,P[L++]=O,P[L++]=D,P[L++]=D,P[L++]=O,P[L++]=I,++A}++A}if(a||s){var B,N,F=h-1,U=h-1;if(a&&s&&(F=h-2),A=0,a)for(E=0;E<o-1;E++)N=(B=A)+1,P[L++]=F,P[L++]=B,P[L++]=N,++A;if(s)for(A=(c-1)*o,E=0;E<o-1;E++)N=(B=A)+1,P[L++]=B,P[L++]=U,P[L++]=N,++A}return S.indices=P,i.st&&(S.attributes.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:f})),S}function ct$6(e,t,i,n,r){return e[t++]=n[i],e[t++]=n[i+1],e[t++]=n[i+2],e[t++]=r[i],e[t++]=r[i+1],e[t]=r[i+2],e}function ht$6(e,t,i,n){return e[t++]=n[i],e[t++]=n[i+1],e[t++]=n[i],e[t]=n[i+1],e}var Ht$4=new n$11;function fe$o(e,t){var i,n=e._shadowVolume,r=e._offsetAttribute,o=e._vertexFormat,a=e._extrudedHeight,s=e._surfaceHeight,l=e._ellipsoid,u=t.height,c=t.width;if(n){var h=n$11.clone(o,Ht$4);h.normal=!0,e._vertexFormat=h}var d=Jt$3(e,t);n&&(e._vertexFormat=o);var f=A$1g.scaleToGeodeticHeight(d.attributes.position.values,s,l,!1),p=(f=new Float64Array(f)).length,_=2*p,m=new Float64Array(_);m.set(f);var g=A$1g.scaleToGeodeticHeight(d.attributes.position.values,a,l);m.set(g,p),d.attributes.position.values=m;var x,v,y=o.normal?new Float32Array(_):void 0,$=o.tangent?new Float32Array(_):void 0,b=o.bitangent?new Float32Array(_):void 0,T=o.st?new Float32Array(_/3*2):void 0;if(o.normal){for(v=d.attributes.normal.values,y.set(v),i=0;i<p;i++)v[i]=-v[i];y.set(v,p),d.attributes.normal.values=y}if(n){v=d.attributes.normal.values,o.normal||(d.attributes.normal=void 0);var C=new Float32Array(_);for(i=0;i<p;i++)v[i]=-v[i];C.set(v,p),d.attributes.extrudeDirection=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:C})}var S=e$2b(r);if(S){var w=p/3*2,E=new Uint8Array(w);r===_0x58701d.TOP?E=d$1s(E,1,0,w/2):E=d$1s(E,r===_0x58701d.NONE?0:1),d.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}if(o.tangent){var P=d.attributes.tangent.values;for($.set(P),i=0;i<p;i++)P[i]=-P[i];$.set(P,p),d.attributes.tangent.values=$}if(o.bitangent){var A=d.attributes.bitangent.values;b.set(A),b.set(A,p),d.attributes.bitangent.values=b}o.st&&(x=d.attributes.st.values,T.set(x),T.set(x,p/3*2),d.attributes.st.values=T);var L=d.indices,M=L.length,R=p/3,O=ce$x.createTypedArray(_/3,2*M);for(O.set(L),i=0;i<M;i+=3)O[i+M]=L[i+2]+R,O[i+1+M]=L[i+1]+R,O[i+2+M]=L[i]+R;d.indices=O;var I=t.northCap,D=t.southCap,B=u,N=2,F=0,U=4,G=4;I&&(N-=1,B-=1,F+=1,U-=2,G-=1),D&&(N-=1,B-=1,F+=1,U-=2,G-=1);var z=2*((F+=N*c+2*B-U)+G),V=new Float64Array(3*z),k=n?new Float32Array(3*z):void 0,W=S?new Uint8Array(z):void 0,H=o.st?new Float32Array(2*z):void 0,q=r===_0x58701d.TOP;S&&!q&&(W=d$1s(W,r===_0x58701d.ALL?1:0));var j,Y=0,X=0,K=0,Q=0,Z=c*B;for(i=0;i<Z;i+=c)V=ct$6(V,Y,j=3*i,f,g),Y+=6,o.st&&(H=ht$6(H,X,2*i,x),X+=4),n&&(K+=3,k[K++]=v[j],k[K++]=v[j+1],k[K++]=v[j+2]),q&&(W[Q++]=1,Q+=1);if(D){var J=I?Z+1:Z;for(j=3*J,i=0;i<2;i++)V=ct$6(V,Y,j,f,g),Y+=6,o.st&&(H=ht$6(H,X,2*J,x),X+=4),n&&(K+=3,k[K++]=v[j],k[K++]=v[j+1],k[K++]=v[j+2]),q&&(W[Q++]=1,Q+=1)}else for(i=Z-c;i<Z;i++)V=ct$6(V,Y,j=3*i,f,g),Y+=6,o.st&&(H=ht$6(H,X,2*i,x),X+=4),n&&(K+=3,k[K++]=v[j],k[K++]=v[j+1],k[K++]=v[j+2]),q&&(W[Q++]=1,Q+=1);for(i=Z-1;i>0;i-=c)V=ct$6(V,Y,j=3*i,f,g),Y+=6,o.st&&(H=ht$6(H,X,2*i,x),X+=4),n&&(K+=3,k[K++]=v[j],k[K++]=v[j+1],k[K++]=v[j+2]),q&&(W[Q++]=1,Q+=1);if(I){var ee=Z;for(j=3*ee,i=0;i<2;i++)V=ct$6(V,Y,j,f,g),Y+=6,o.st&&(H=ht$6(H,X,2*ee,x),X+=4),n&&(K+=3,k[K++]=v[j],k[K++]=v[j+1],k[K++]=v[j+2]),q&&(W[Q++]=1,Q+=1)}else for(i=c-1;i>=0;i--)V=ct$6(V,Y,j=3*i,f,g),Y+=6,o.st&&(H=ht$6(H,X,2*i,x),X+=4),n&&(K+=3,k[K++]=v[j],k[K++]=v[j+1],k[K++]=v[j+2]),q&&(W[Q++]=1,Q+=1);var te=se$r(V,o,l);o.st&&(te.attributes.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:H})),n&&(te.attributes.extrudeDirection=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:k})),S&&(te.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:W}));var ie,ne,re,oe,ae=ce$x.createTypedArray(z,6*F);p=V.length/3;var se=0;for(i=0;i<p-1;i+=2){oe=((ie=i)+2)%p;var le=o$1p.fromArray(V,3*ie,Tt$8),ue=o$1p.fromArray(V,3*oe,jt$3);o$1p.equalsEpsilon(le,ue,e$2a.EPSILON10)||(re=((ne=(ie+1)%p)+2)%p,ae[se++]=ie,ae[se++]=ne,ae[se++]=oe,ae[se++]=oe,ae[se++]=ne,ae[se++]=re)}return te.indices=ae,(te=k$13.combineInstances([new d$1o({geometry:d}),new d$1o({geometry:te})]))[0]}var ve$l=[new o$1p,new o$1p,new o$1p,new o$1p],Qt$4=new a$18,le$t=new a$18;function Ot$6(e,t,i,n,r){if(0===i)return h$18.clone(e,r);var o=j$O.computeOptions(e,t,i,0,Xt$2,Qt$4),a=o.height,s=o.width,l=ve$l;return j$O.computePosition(o,n,!1,0,0,l[0]),j$O.computePosition(o,n,!1,0,s-1,l[1]),j$O.computePosition(o,n,!1,a-1,0,l[2]),j$O.computePosition(o,n,!1,a-1,s-1,l[3]),h$18.fromCartesianArray(l,n,r)}function j$N(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).rectangle;if(o$1q.typeOf.object("rectangle",t),h$18.validate(t),t.north<t.south)throw new t$16("options.rectangle.north must be greater than or equal to options.rectangle.south");var i=u$_(e.height,0),n=u$_(e.extrudedHeight,i);this._rectangle=h$18.clone(t),this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._surfaceHeight=Math.max(i,n),this._rotation=u$_(e.rotation,0),this._stRotation=u$_(e.stRotation,0),this._vertexFormat=n$11.clone(u$_(e.vertexFormat,n$11.DEFAULT)),this._extrudedHeight=Math.min(i,n),this._shadowVolume=u$_(e.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}j$N.packedLength=h$18.packedLength+t$13.packedLength+n$11.packedLength+7,j$N.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),h$18.pack(e._rectangle,t,i),i+=h$18.packedLength,t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=u$_(e._offsetAttribute,-1),t};var Zt$2=new h$18,Kt$4=t$13.clone(t$13.UNIT_SPHERE),tt$c={rectangle:Zt$2,ellipsoid:Kt$4,vertexFormat:Ht$4,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};j$N.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=h$18.unpack(e,t,Zt$2);t+=h$18.packedLength;var r=t$13.unpack(e,t,Kt$4);t+=t$13.packedLength;var o=n$11.unpack(e,t,Ht$4);t+=n$11.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=1===e[t++],d=e[t];return e$2b(i)?(i._rectangle=h$18.clone(n,i._rectangle),i._ellipsoid=t$13.clone(r,i._ellipsoid),i._vertexFormat=n$11.clone(o,i._vertexFormat),i._granularity=a,i._surfaceHeight=s,i._rotation=l,i._stRotation=u,i._extrudedHeight=c,i._shadowVolume=h,i._offsetAttribute=-1===d?void 0:d,i):(tt$c.granularity=a,tt$c.height=s,tt$c.rotation=l,tt$c.stRotation=u,tt$c.extrudedHeight=c,tt$c.shadowVolume=h,tt$c.offsetAttribute=-1===d?void 0:d,new j$N(tt$c))},j$N.computeRectangle=function(e,t){var i=(e=u$_(e,u$_.EMPTY_OBJECT)).rectangle;if(o$1q.typeOf.object("rectangle",i),h$18.validate(i),i.north<i.south)throw new t$16("options.rectangle.north must be greater than or equal to options.rectangle.south");var n=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),r=u$_(e.ellipsoid,t$13.WGS84);return Ot$6(i,n,u$_(e.rotation,0),r,t)};var ce$o=new p$1e,$t$2=new n$13,he$m=new a$18;j$N.createGeometry=function(e){if(!e$2a.equalsEpsilon(e._rectangle.north,e._rectangle.south,e$2a.EPSILON10)&&!e$2a.equalsEpsilon(e._rectangle.east,e._rectangle.west,e$2a.EPSILON10)){var t=e._rectangle,i=e._ellipsoid,n=e._rotation,r=e._stRotation,o=e._vertexFormat,a=j$O.computeOptions(t,e._granularity,n,r,Xt$2,Qt$4,le$t),s=ce$o;if(0!==r||0!==n){var l=h$18.center(t,he$m),u=i.geodeticSurfaceNormalCartographic(l,Tt$8);n$13.fromAxisAngle(u,-r,$t$2),p$1e.fromQuaternion($t$2,s)}else p$1e.clone(p$1e.IDENTITY,s);var c,h,d=e._surfaceHeight,f=e._extrudedHeight,p=!e$2a.equalsEpsilon(d,f,0,e$2a.EPSILON2);if(a.lonScalar=1/e._rectangle.width,a.latScalar=1/e._rectangle.height,a.tangentRotationMatrix=s,t=e._rectangle,p){c=fe$o(e,a);var _=i$1c.fromRectangle3D(t,i,d,oe$q),m=i$1c.fromRectangle3D(t,i,f,ie$x);h=i$1c.union(_,m)}else{if((c=Jt$3(e,a)).attributes.position.values=A$1g.scaleToGeodeticHeight(c.attributes.position.values,d,i,!1),e$2b(e._offsetAttribute)){var g=c.attributes.position.values.length,x=new Uint8Array(g/3);d$1s(x,e._offsetAttribute===_0x58701d.NONE?0:1),c.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}h=i$1c.fromRectangle3D(t,i,d)}return o.position||delete c.attributes.position,new I$1p({attributes:c.attributes,indices:c.indices,primitiveType:c.primitiveType,boundingSphere:h,offsetAttribute:e._offsetAttribute})}},j$N.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new j$N({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:r,stRotation:e._stRotation,granularity:n,extrudedHeight:a,height:o,vertexFormat:n$11.POSITION_ONLY,shadowVolume:!0})};var It$7=new h$18,de$q=[new o$1o,new o$1o,new o$1o],me$q=new f$13,ge$m=new a$18;function pe$q(e){if(0===e._stRotation)return[0,0,0,1,1,0];var t=h$18.clone(e._rectangle,It$7),i=e._granularity,n=e._ellipsoid,r=Ot$6(t,i,e._rotation-e._stRotation,n,It$7),o=de$q;o[0].x=r.west,o[0].y=r.south,o[1].x=r.west,o[1].y=r.north,o[2].x=r.east,o[2].y=r.south;for(var a=e.rectangle,s=f$13.fromRotation(e._stRotation,me$q),l=h$18.center(a,ge$m),u=0;u<3;++u){var c=o[u];c.x-=l.longitude,c.y-=l.latitude,f$13.multiplyByVector(s,c,c),c.x+=l.longitude,c.y+=l.latitude,c.x=(c.x-a.west)/a.width,c.y=(c.y-a.south)/a.height}var h=o[0],d=o[1],f=o[2],p=new Array(6);return o$1o.pack(h,p),o$1o.pack(d,p,2),o$1o.pack(f,p,4),p}Object.defineProperties(j$N.prototype,{rectangle:{get:function(){return e$2b(this._rotatedRectangle)||(this._rotatedRectangle=Ot$6(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return e$2b(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=pe$q(this)),this._textureCoordinateRotationPoints}}});var _0x54ba4f=(_0x23aee3=!0,function(e,t){var i=_0x23aee3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23aee3=!1,i}),_0x32b091=_0x54ba4f(void 0,(function(){return _0x32b091.toString().search("(((.+)+)+)+$").toString().constructor(_0x32b091).search("(((.+)+)+)+$")})),_0x23aee3;function _0x4ee275(e){e=e||{},this._font=u$_(e.font,"30px sans-serif"),this._fillColor=u$_(e.fillColor,e$1U.WHITE),this._outlineColor=u$_(e.outlineColor,e$1U.BLACK),this._outlineWidth=u$_(e.outlineWidth,1),this._showBackground=u$_(e.showBackground,!1),this._backgroundColor=u$_(e.backgroundColor,new e$1U(.165,.165,.165,.8)),this._style=u$_(e.fillStyle,R$Q.FILL),this._pixelOffset=o$1o.clone(u$_(e.pixelOffset,o$1o.ZERO)),this._scale=u$_(e.scale,1),this._textField=u$_(e.textField,"Name"),this._heightReference=u$_(e.heightReference,k$P.NONE),this._distanceDisplayCondition=e.distanceDisplayCondition,this._textFieldChanged=!1}_0x32b091(),Object.defineProperties(_0x4ee275.prototype,{font:{get:function(){return this._font},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._font!==e&&(this._font=e)}},fillColor:{get:function(){return this._fillColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._fillColor=e}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._outlineColor=e}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e)}},showBackground:{get:function(){return this._showBackground},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._showBackground!==e&&(this._showBackground=e)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._backgroundColor=e}},fillStyle:{get:function(){return this._style},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._style!==e&&(this._style=e)}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._pixelOffset=e}},scale:{get:function(){return this._scale},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._scale!==e&&(this._scale=e)}},textField:{get:function(){return this._textField},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._textField!==e?(this._textField=e,this._textFieldChanged=!0):this._textFieldChanged=!1}},heightReference:{get:function(){return this._heightReference},set:function(e){this._heightReference=e}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=e}}});var _0xcdf1ea=(_0x560db9=!0,function(e,t){var i=_0x560db9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x560db9=!1,i}),_0x108e06=_0xcdf1ea(void 0,(function(){return _0x108e06.toString().search("(((.+)+)+)+$").toString().constructor(_0x108e06).search("(((.+)+)+)+$")})),_0x560db9;_0x108e06();var _0x4582f3={Hide:0,Visible:1,ResetAll:2},_0x576c2d=Object.freeze(_0x4582f3),_0x1836a9=(_0x2a0609=!0,function(e,t){var i=_0x2a0609?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a0609=!1,i}),_0x5c55c9=_0x1836a9(void 0,(function(){return _0x5c55c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c55c9).search("(((.+)+)+)+$")})),_0x2a0609;function _0x5730db(e,t,i){this._id=e,this._type=t,this._pointCounts=i}_0x5c55c9(),Object.defineProperties(_0x5730db.prototype,{id:{get:function(){return this._id},set:function(e){o$1q.defined("PointCloudClassificationInfo id",e),this._id=e}},type:{get:function(){return this._type},set:function(e){o$1q.defined("PointCloudClassificationInfo type",e),this._type=e}},pointCounts:{get:function(){return this._pointCounts},set:function(e){o$1q.defined("PointCloudClassificationInfo pointCounts",e),this._pointCounts=e}}}),_0x5730db.prototype.isDestroyed=function(){return!1},_0x5730db.prototype.destroy=function(){return i$10(this)};var _0x272d3c=(_0x1441e9=!0,function(e,t){var i=_0x1441e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1441e9=!1,i}),_0x1975bc=_0x272d3c(void 0,(function(){return _0x1975bc.toString().search("(((.+)+)+)+$").toString().constructor(_0x1975bc).search("(((.+)+)+)+$")})),_0x1441e9;_0x1975bc();var _0x35b23a={NONE:0,COLOR:1,MODEL_COLOR:2},_0xff9e19=Object.freeze(_0x35b23a),_0x40520b=(_0x1d7ee3=!0,function(e,t){var i=_0x1d7ee3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d7ee3=!1,i}),_0x1bfeb3=_0x40520b(void 0,(function(){return _0x1bfeb3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bfeb3).search("(((.+)+)+)+$")})),_0x1d7ee3;_0x1bfeb3();var _0x2c582d={NONE:0,STRIP:1,DOT:2,CHECKBOARD:3,GRID:4};function _0x14c08b(){this._rotationAngle=0,this._foreColor=new e$29(1,1,0,1),this._backColor=new e$29(1,0,1,1),this._type=_0x2c582d.DOT,this._lineWidthX=2,this._lineWidthY=2,this._offsetX=0,this._offsetY=0,this._repeatX=20,this._repeatY=20}_0x14c08b.prototype.setValue=function(e,t){"ForeColor"===e&&(this._foreColor=t),"BackColor"===e&&(this._backColor=t),"RegionType"===e&&(this._type=t),"RotationAngle"===e&&(this._rotationAngle=t),"WidthX"===e&&(this._lineWidthX=t),"WidthY"===e&&(this._lineWidthY=t),"OffsetX"===e&&(this._offsetX=t),"OffsetY"===e&&(this._offsetY=t),"RepeatX"===e&&(this._repeatX=t),"RepeatY"===e&&(this._repeatY=t)},_0x14c08b.prototype.getEffectSetting=function(){return[{name:"ForeColor",value:new e$29(1,1,0,1),description:"Region Fore Color",max:new e$29(1,1,1,1),min:new e$29(0,0,0,0),type:e$29},{name:"BackColor",value:new e$29(1,0,1,1),description:"Region Back Color",max:new e$29(1,1,1,1),min:new e$29(0,0,0,0),type:e$29},{name:"RegionType",value:_0x2c582d.DOT,description:"Region Effect Type",max:4,min:0,type:_0x2c582d},{name:"RotationAngle",value:0,description:"Region RotationAngle",max:0,min:1,type:Number},{name:"WidthX",value:2,description:"Region horizontal Line Width",max:20,min:1,type:Number},{name:"WidthY",value:2,description:"Region vertical Line Width",max:20,min:1,type:Number},{name:"OffsetX",value:0,description:"Region horizontal Offset",max:20,min:0,type:Number},{name:"OffsetY",value:0,description:"Region vertical Offset",max:20,min:0,type:Number},{name:"RepeatX",value:20,description:"Region horizontal Repeat",max:20,min:1,type:Number},{name:"RepeatY",value:20,description:"Region vertical Repeat",max:20,min:1,type:Number}]};var _0x2405c2=(_0x3ea41e=!0,function(e,t){var i=_0x3ea41e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ea41e=!1,i}),_0x218c1b=_0x2405c2(void 0,(function(){return _0x218c1b.toString().search("(((.+)+)+)+$").toString().constructor(_0x218c1b).search("(((.+)+)+)+$")})),_0x3ea41e;_0x218c1b();var _0xbe5e40={NONE:0,DASH:1,OUTLINE:2,GLOW:3};function _0x2f60f9(){this._lineWidth=1,this._color=new e$29(1,1,1,1),this._type=_0xbe5e40.NONE,this._outlineColor=new e$29(0,0,0,1),this._outlineWidth=1,this._gapColor=new e$29(1,1,1,0),this._dashLength=16,this._dashPattern=255,this._glowPower=.25,this._isArrow=!1,this._isMove=!1,this._frame=0}_0x2f60f9.prototype.setValue=function(e,t){"Color"===e&&(this._color=t),"Width"===e&&(this._lineWidth=t),"PolylineType"===e&&(this._type=t),"OutlineColor"===e&&(this._outlineColor=t),"OutlineWidth"===e&&(this._outlineWidth=t),"GapColor"===e&&(this._gapColor=t),"DashLength"===e&&(this._dashLength=t),"DashPattern"===e&&(this._dashPattern=t),"GlowPower"===e&&(this._glowPower=t),"IsArrow"===e&&(this._isArrow=t),"IsMove"===e&&(this._isMove=t)},_0x2f60f9.prototype.getEffectSetting=function(){return[{name:"Color",value:new e$29(1,1,1,1),description:"Polyline Color",max:new e$29(1,1,1,1),min:new e$29(0,0,0,0),type:e$29},{name:"Width",value:5,description:"Polyline Width",max:20,min:1,type:Number},{name:"PolylineType",value:_0xbe5e40.DASH,description:"Polyline Type",max:3,min:0,type:_0xbe5e40},{name:"OutlineColor",value:new e$29(0,0,0,1),description:"Polyline Outline Color",max:new e$29(1,1,1,1),min:new e$29(0,0,0,0),type:e$29},{name:"OutlineWidth",value:1,description:"Polyline Outline Width",max:10,min:1,type:Number},{name:"GapColor",value:new e$29(1,1,1,0),description:"Polyline Gap Color",max:new e$29(1,1,1,1),min:new e$29(0,0,0,0),type:e$29},{name:"DashLength",value:16,description:"Polyline Gap Dash Length",max:64,min:1,type:Number},{name:"DashPattern",value:255,description:"Polyline Gap Dash Pattern",max:65535,min:0,type:Number},{name:"GlowPower",value:.25,description:"Polyline Glow Power",max:1,min:0,type:Number},{name:"IsArrow",value:!1,description:"Polyline Is Have Arrow",max:!0,min:!1,type:Boolean},{name:"IsMove",value:!1,description:"Polyline Is Moving",max:!0,min:!1,type:Boolean}]};var _0xd7a1ee=(_0x3e1ac2=!0,function(e,t){var i=_0x3e1ac2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3e1ac2=!1,i}),_0x382375=_0xd7a1ee(void 0,(function(){return _0x382375.toString().search("(((.+)+)+)+$").toString().constructor(_0x382375).search("(((.+)+)+)+$")})),_0x3e1ac2;function _0x5370ac(){}_0x382375();var _0x46f8d2="Assets/Textures/PBR_Material/",_0x1f16f4="",_0x3cf703="",_0x13bdfa="",_0x65eb06="",_0x2fc719="",_0x3b467a="";_0x5370ac.getMaterial=function(e){return e===je$g.TITANIUM_SCUFFED?(_0x1f16f4="titanium_scuffed/Titanium-Scuffed_metallic.png",_0x3cf703="titanium_scuffed/Titanium-Scuffed_roughness.png",_0x13bdfa="titanium_scuffed/Titanium-Scuffed_basecolor.png"):e===je$g.METAL_PLATE&&(_0x1f16f4="metal_plate/metal_plate_disp_1k.jpg",_0x3cf703="metal_plate/metal_plate_rough_1k.jpg",_0x13bdfa="metal_plate/metal_plate_diff_1k.jpg"),_0x65eb06=n$15(_0x46f8d2+_0x1f16f4),_0x2fc719=n$15(_0x46f8d2+_0x3cf703),_0x3b467a=n$15(_0x46f8d2+_0x13bdfa),{metalTextureUrl:_0x65eb06,roughTextureUrl:_0x2fc719,albedoTextureUrl:_0x3b467a}};var _0x5dfbe5=(_0x4f8ed4=!0,function(e,t){var i=_0x4f8ed4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f8ed4=!1,i}),_0x5db831=_0x5dfbe5(void 0,(function(){return _0x5db831.toString().search("(((.+)+)+)+$").toString().constructor(_0x5db831).search("(((.+)+)+)+$")})),_0x4f8ed4;_0x5db831();var _0x3af776="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthTexture;\nuniform vec3 u_distancesAndEdlStrength;\nvarying vec2 v_textureCoordinates;\n\nvec2 neighborContribution(float log2Depth, vec2 padding)\n{\nfloat depthOrLogDepth = texture2D(u_pointCloud_depthTexture, v_textureCoordinates + padding).r;\nif (depthOrLogDepth == 1.0) {\nreturn vec2(0.0);\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(v_textureCoordinates + padding, depthOrLogDepth);\nreturn vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\nvoid main()\n{\nfloat depthOrLogDepth = texture2D(u_pointCloud_depthTexture, v_textureCoordinates).r;\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat log2Depth = log2(-eyeCoordinate.z);\nif (depthOrLogDepth == 1.0)\n{\ndiscard;\n}\nvec4 color = texture2D(u_pointCloud_colorGBuffer, v_textureCoordinates);\n#ifdef EDL_SHADING\nfloat distX = u_distancesAndEdlStrength.x;\nfloat distY = u_distancesAndEdlStrength.y;\nvec2 responseAndCount = vec2(0.0);\nresponseAndCount += neighborContribution(log2Depth, vec2(0, distY));\nresponseAndCount += neighborContribution(log2Depth, vec2(distX, 0));\nresponseAndCount += neighborContribution(log2Depth, vec2(0, -distY));\nresponseAndCount += neighborContribution(log2Depth, vec2(-distX, 0));\nfloat response = responseAndCount.x / responseAndCount.y;\nfloat shade = exp(-response * 300.0 * u_distancesAndEdlStrength.z);\ncolor.rgb *= shade;\n#endif\ngl_FragColor = vec4(color);\ngl_FragColor.a = 1.0;\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + (czm_projection * vec4(eyeCoordinate.xyz, 1.0)).w);\n#else\ngl_FragDepthEXT = czm_eyeToWindowCoordinates(vec4(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n",_0x3fbbe7=(_0x3919ce=!0,function(e,t){var i=_0x3919ce?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3919ce=!1,i}),_0x86a8b5=_0x3fbbe7(void 0,(function(){return _0x86a8b5.toString().search("(((.+)+)+)+$").toString().constructor(_0x86a8b5).search("(((.+)+)+)+$")})),_0x3919ce;_0x86a8b5();var _0x4b2711="\n#include <SceneUboDecl>\nvar u_pointCloud_colorGBuffer : texture_2d<f32>;\nvar u_pointCloud_colorGBufferSampler : sampler;\n\nvar u_pointCloud_depthTexture : texture_depth_2d;\nvar u_pointCloud_depthTextureSampler : sampler;\n\nuniform u_distancesAndEdlStrength : vec3<f32>;\nvarying v_textureCoordinates : vec2<f32>;\n\nfn windowToEyeCoordinates_v4(fragmentCoordinate : vec4<f32>) -> vec4<f32>\n{\n // Reconstruct NDC coordinates\n var x = 2.0 * (fragmentCoordinate.x - Scene.uViewport.x) / Scene.uViewport.z - 1.0;\n var y = 2.0 * (fragmentCoordinate.y - Scene.uViewport.y) / Scene.uViewport.w - 1.0;\n var z = (fragmentCoordinate.z - uniforms.czm_viewportTransformation[3][2]) / uniforms.czm_viewportTransformation[2][2];\n var q = vec4<f32>(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= fragmentCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n q = Scene.uInverseProjection * q;\n\n return q;\n}\n\n\nfn windowToEyeCoordinates(fragmentCoordinateXY : vec2<f32>, depthOrLogDepth : f32) -> vec4<f32>\n{\n var eyeCoordinate : vec4<f32>;\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#ifdef LOG_DEPTH\n var near = Scene.uCurrentFrustum.x;\n var far = Scene.uCurrentFrustum.y;\n var log2Depth = depthOrLogDepth * Scene.uLog2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n var depthFromCamera = depthFromNear + near;\n var windowCoord = vec4<f32>(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n eyeCoordinate = windowToEyeCoordinates_v4(windowCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n#else\n var windowCoord = vec4<f32>(fragmentCoordinateXY, depthOrLogDepth, 1.0);\n eyeCoordinate = windowToEyeCoordinates_v4(windowCoord);\n#endif\n return eyeCoordinate;\n}\n\nfn eyeToWindowCoordinates(positionEC : vec4<f32>) -> vec4<f32>\n{\n var q = Scene.uProjection * positionEC; // clip coordinates\n var qxyz = q.xyz;\n q = vec4<f32>(qxyz / q.w, q.w); // normalized device coordinates\n q = vec4<f32>((uniforms.czm_viewportTransformation * vec4<f32>(q.xyz, 1.0)).xyz, q.w); // window coordinates\n return q;\n}\n\nfn neighborContribution(log2Depth : f32, padding : vec2<f32>) -> vec2<f32>\n{\n var depthOrLogDepth = textureSample(u_pointCloud_depthTexture, u_pointCloud_depthTextureSampler, v_textureCoordinates + padding);\n if (depthOrLogDepth == 1.0) \n {\n return vec2<f32>(0.0);\n }\n var eyeCoordinate = windowToEyeCoordinates(v_textureCoordinates + padding, depthOrLogDepth);\n return vec2<f32>(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var depthOrLogDepth = textureSample(u_pointCloud_depthTexture, u_pointCloud_depthTextureSampler, v_textureCoordinates);\n var eyeCoordinate = windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\n eyeCoordinate /= eyeCoordinate.w;\n var log2Depth = log2(-eyeCoordinate.z);\n if (depthOrLogDepth == 1.0)\n {\n discard;\n }\n var color = textureSample(u_pointCloud_colorGBuffer, u_pointCloud_colorGBufferSampler, v_textureCoordinates);\n#ifdef EDL_SHADING\n var distX = uniforms.u_distancesAndEdlStrength.x;\n var distY = uniforms.u_distancesAndEdlStrength.y;\n var responseAndCount = vec2<f32>(0.0);\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(0, distY));\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(distX, 0));\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(0, -distY));\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(-distX, 0));\n var response = responseAndCount.x / responseAndCount.y;\n var shade = exp(-response * 300.0 * uniforms.u_distancesAndEdlStrength.z);\n color.r *= shade;\n color.g *= shade;\n color.b *= shade;\n#endif\n gl_FragColor = vec4<f32>(color);\n gl_FragColor.a = 1.0;\n#ifdef LOG_DEPTH\n czm_writeLogDepth(1.0 + (Scene.uProjection * vec4<f32>(eyeCoordinate.xyz, 1.0)).w);\n#else\n gl_FragDepth = czm_eyeToWindowCoordinates(vec4<f32>(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n",y$M="#define SAMPLES 8\nuniform float delta;\nuniform float sigma;\nuniform float direction;\nuniform sampler2D colorTexture;\n#ifdef USE_STEP_SIZE\nuniform float stepSize;\n#else\nuniform vec2 step;\n#endif\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec2 st = v_textureCoordinates;\nvec2 dir = vec2(1.0 - direction, direction);\n#ifdef USE_STEP_SIZE\nvec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));\n#else\nvec2 step = step;\n#endif\nvec3 g;\ng.x = 1.0 / (sqrt(czm_twoPi) * sigma);\ng.y = exp((-0.5 * delta * delta) / (sigma * sigma));\ng.z = g.y * g.y;\nvec4 result = texture2D(colorTexture, st) * g.x;\nfor (int i = 1; i < SAMPLES; ++i)\n{\ng.xy *= g.yz;\nvec2 offset = float(i) * dir * step;\nresult += texture2D(colorTexture, st - offset) * g.x;\nresult += texture2D(colorTexture, st + offset) * g.x;\n}\ngl_FragColor = result;\n}\n",_0x3ea35c=(_0x352f9d=!0,function(e,t){var i=_0x352f9d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x352f9d=!1,i}),_0x475d9a=_0x3ea35c(void 0,(function(){return _0x475d9a.toString().search("(((.+)+)+)+$").toString().constructor(_0x475d9a).search("(((.+)+)+)+$")})),_0x352f9d,_0x1bc4e2;function _0xd131b7(e){return new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:e,magnificationFilter:e})}function _0x3cffe6(){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthTexture=void 0,this._blurXFrameBuffer=void 0,this._blurXTexture=void 0,this._blurYFrameBuffer=void 0,this._blurYTexture=void 0,this._useCount=0}_0x475d9a(),_0x3cffe6._useCount=0,_0x3cffe6.addRef=function(){this._useCount++},_0x3cffe6.removeRef=function(){if(this._useCount--,0==this._useCount){var e=_0x1bc4e2._framebuffer;if(!e$2b(e))return;_0x1bc4e2._colorGBuffer.destroy(),_0x1bc4e2._depthTexture.destroy(),e.destroy()}this._useCount=Math.max(0,this._useCount)},_0x3cffe6.setCurrentFrameBuffer=function(e){_0x1bc4e2=e},_0x3cffe6.createFrameBuffer=function(e,t){var i=e.drawingBufferWidth*t,n=e.drawingBufferHeight*t,r=new t$V({context:e,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:_0xd131b7(tt$h.LINEAR)});new t$V({context:e,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:_0xd131b7(tt$h.NEAREST)});var o=new t$V({context:e,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8,sampler:_0xd131b7(tt$h.NEAREST)});_0x1bc4e2._framebuffer=new t$W({context:e,colorTextures:[r],depthStencilTexture:o,destroyAttachments:!1}),_0x1bc4e2._colorGBuffer=r,_0x1bc4e2._depthTexture=o,_0x1bc4e2._blurXTexture=new t$V({context:e,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:_0xd131b7(tt$h.LINEAR)}),_0x1bc4e2._blurXFrameBuffer=new t$W({context:e,colorTextures:[_0x1bc4e2._blurXTexture],destroyAttachments:!1}),_0x1bc4e2._blurYTexture=new t$V({context:e,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:_0xd131b7(tt$h.LINEAR)}),_0x1bc4e2._blurYFrameBuffer=new t$W({context:e,colorTextures:[_0x1bc4e2._blurYTexture],destroyAttachments:!1})},_0x3cffe6.getColorGBuffer=function(){return _0x1bc4e2._colorGBuffer},_0x3cffe6.getDepthTexture=function(){return _0x1bc4e2._depthTexture},_0x3cffe6.getFrameBuffer=function(){return _0x1bc4e2._framebuffer},_0x3cffe6.getBlurXFrameBuffer=function(){return _0x1bc4e2._blurXFrameBuffer},_0x3cffe6.getBlurYFrameBuffer=function(){return _0x1bc4e2._blurYFrameBuffer},_0x3cffe6.getBlurXTexture=function(){return _0x1bc4e2._blurXTexture},_0x3cffe6.getBlurYTexture=function(){return _0x1bc4e2._blurYTexture},_0x3cffe6.destroyFrameBuffer=function(){var e=_0x1bc4e2._framebuffer;!e$2b(e)||(_0x1bc4e2._colorGBuffer.destroy(),_0x1bc4e2._depthTexture.destroy(),e.destroy(),_0x1bc4e2._blurXTexture.destroy(),_0x1bc4e2._blurYTexture.destroy(),_0x1bc4e2._blurXFrameBuffer.destroy(),_0x1bc4e2._blurYFrameBuffer.destroy())};var _0x5b6e3=(_0x3706e4=!0,function(e,t){var i=_0x3706e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3706e4=!1,i}),_0x1941cc=_0x5b6e3(void 0,(function(){return _0x1941cc.toString().search("(((.+)+)+)+$").toString().constructor(_0x1941cc).search("(((.+)+)+)+$")})),_0x3706e4;_0x1941cc();var _0x58ef6d=.5;function _0x25441b(e){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthTexture=void 0,this._blurXFrameBuffer=void 0,this._blurXTexture=void 0,this._blurYFrameBuffer=void 0,this._blurYTexture=void 0,this._blurXCommand=void 0,this._blurYCommand=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this.edlShading=!1,this._edlShading=!1,this._performance=!1,this._strength=1,this._radius=1,this._passType=Le$s.S3MTiles,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},_0x3cffe6.addRef(),this.textureScale=_0x58ef6d}var _0x2f431a=new o$1p,_0x3fa541=new o$1o;function _0x8f7a6b(e,t){_0x3fa541.x=1/e._colorGBuffer.width,_0x3fa541.y=1/e._colorGBuffer.height;var i={delta:function(){return 1},sigma:function(){return 2},stepSize:function(){return 1},direction:function(){return 0},colorTexture:function(){return e._colorGBuffer}},n={delta:function(){return 1},sigma:function(){return 2},stepSize:function(){return 1},direction:function(){return 1},colorTexture:function(){return e._blurXTexture}},r="#define USE_STEP_SIZE\n"+y$M;e._blurXCommand=t.createViewportQuadCommand(r,{shaderProgramName:"blurX",uniformMap:i,pass:e._passType,owner:e}),e._blurXCommand.framebuffer=e._blurXFrameBuffer,e._blurXCommand.renderState=d$1m.fromCache({viewport:_0x45a1fe}),e._blurYCommand=t.createViewportQuadCommand(r,{shaderProgramName:"blurY",uniformMap:n,pass:e._passType,owner:e}),e._blurYCommand.framebuffer=e._blurYFrameBuffer,e._blurYCommand.renderState=d$1m.fromCache({viewport:_0x45a1fe});var o={u_pointCloud_colorGBuffer:function(){return e._performance?e._blurYTexture:e._colorGBuffer},u_pointCloud_depthTexture:function(){return e._depthTexture},u_distancesAndEdlStrength:function(){return _0x2f431a.x=e._radius/(t.drawingBufferWidth*_0x58ef6d),_0x2f431a.y=e._radius/(t.drawingBufferHeight*_0x58ef6d),_0x2f431a.z=e._strength,_0x2f431a}},a=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0}}),s=new s$U({name:"S3MPointCloudEDLFp",sources:[t.webgpu?_0x4b2711:_0x3af776],useWGSL:t.webgpu});e._edlShading&&s.defines.push("EDL_SHADING"),e._drawCommand=t.createViewportQuadCommand(s,{shaderProgramName:"S3MPointCloudEDL",uniformMap:o,renderState:a,pass:e._passType,owner:e,useWGSL:t.webgpu}),e._drawCommand.addUniformBuffer(t.uniformState._sceneUBO),e._clearCommand=new t$X({framebuffer:e._framebuffer,color:new e$1U(0,0,0,0),depth:1,renderState:d$1m.fromCache(),pass:e._passType,owner:e})}function _0x34424e(e,t){var i=t.drawingBufferWidth*_0x58ef6d,n=t.drawingBufferHeight*_0x58ef6d;_0x45a1fe.width=i,_0x45a1fe.height=n;var r=_0x3cffe6.getColorGBuffer(),o=!1,a=e$2b(r)&&(r.width!==i||r.height!==n);(!e$2b(r)||a)&&(_0x3cffe6.destroyFrameBuffer(),_0x3cffe6.createFrameBuffer(t,_0x58ef6d));var s=e._edlShading!=e.edlShading;e._edlShading=e.edlShading;var l=e._colorGBuffer;return a=e._screenWidth!==i||e._screenHeight!==n,(!e$2b(l)||a||s)&&(e._colorGBuffer=_0x3cffe6.getColorGBuffer(),e._depthTexture=_0x3cffe6.getDepthTexture(),e._framebuffer=_0x3cffe6.getFrameBuffer(),e._blurXFrameBuffer=_0x3cffe6.getBlurXFrameBuffer(),e._blurYFrameBuffer=_0x3cffe6.getBlurYFrameBuffer(),e._blurXTexture=_0x3cffe6.getBlurXTexture(),e._blurYTexture=_0x3cffe6.getBlurYTexture(),_0x8f7a6b(e,t),o=!0),e._screenWidth=i,e._screenHeight=n,o}function _0x4b70d5(e){return e.drawBuffers&&e.fragmentDepth}_0x25441b.isSupported=_0x4b70d5;var _0x45a1fe=new f$18;function _0x408338(e,t){var i=e[t.id];if(!e$2b(i)||i.viewport.width!=_0x45a1fe.width||i.viewport.height!=_0x45a1fe.height){var n=d$1m.getState(t);n.viewport=_0x45a1fe,i=d$1m.fromCache(n),e[t.id]=i}return i}_0x25441b.prototype.update=function(e,t,i){if(_0x4b70d5(e.context)){_0x3cffe6.setCurrentFrameBuffer(e.context._sharedEDL),this._strength=i.eyeDomeLightingStrength,this._radius=i.eyeDomeLightingRadius,this._performance=i.performance,this.edlShading=i.eyeDomeLighting,_0x58ef6d=i.performance?.5:1,this.textureScale=_0x58ef6d;var n,r=_0x34424e(this,e.context),o=e.commandList,a=o.length;for(n=t;n<a;++n){var s=o[n];if(s.owner._layer._fileType===d$15.PointCloudFile){var l=s.derivedCommands.pointCloudProcessor;(!e$2b(l)||s.dirty||r||l.framebuffer!==this._framebuffer)&&(l=i$_.shallowClone(s),s.derivedCommands.pointCloudProcessor=l,l.framebuffer=this._framebuffer,l.renderState=_0x408338(this._renderStateCache,l.renderState),l.castShadows=!1,l.receiveShadows=!1,l._pointCloudEyeDomeLighting=!0),o[n]=l}}var u=this._clearCommand,c=this._drawCommand;i.performance&&(o.push(this._blurXCommand),o.push(this._blurYCommand)),o.push(c),o.push(u)}},_0x25441b.prototype.isDestroyed=function(){return!1},_0x25441b.prototype.destroy=function(){return _0x3cffe6.removeRef(),i$10(this)};var _0x33ea35=(_0x5ef8d2=!0,function(e,t){var i=_0x5ef8d2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ef8d2=!1,i}),_0x2d62a0=_0x33ea35(void 0,(function(){return _0x2d62a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d62a0).search("(((.+)+)+)+$")})),_0x5ef8d2;_0x2d62a0();var R$K="attribute vec4 aPosition;\n#ifdef HAS_TEXTURECOORD\nattribute vec3 aTexCoord;\n#endif\n#ifdef Volume\n attribute vec3 aRatio;\n varying vec3 vecRotioCoord;\n\tvarying vec2 vecHypTexCoord;\n#endif\n#ifdef GEOCYLINDER\n uniform float uGeometryHeight;\n#endif\nvarying vec2 v_texCoord;\nvarying float v_face;\nvoid main()\n{\n#ifdef HAS_TEXTURECOORD\n v_texCoord = aTexCoord.xy;\n v_face = aTexCoord.z;\n#endif\n#ifdef GEOCYLINDER\n v_texCoord.y = aPosition.z / uGeometryHeight;\n#endif\n#ifdef Volume\nvecRotioCoord = aRatio;\n#endif\n#ifdef USE_RelativeOrigin\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz - czm_relativeOrigin, 1.0);\n#else\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n#endif\n}",_0x444331=(_0xda221c=!0,function(e,t){var i=_0xda221c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xda221c=!1,i}),_0x3cb131=_0x444331(void 0,(function(){return _0x3cb131.toString().search("(((.+)+)+)+$").toString().constructor(_0x3cb131).search("(((.+)+)+)+$")})),_0xda221c;_0x3cb131();var _0x5a01b0="uniform sampler2D uClampTexture;\nuniform vec4 uClipPlaneColor;\nuniform float uUseColor;\nvoid main()\n{\nvec2 center = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\nvec4 clampColor = texture2D(uClampTexture, center);\nif(clampColor.r < 0.01 && clampColor.g < 0.01 && clampColor.b < 0.01)\n{\n discard;\n}\ngl_FragColor = mix(clampColor, uClipPlaneColor, uUseColor);\n}",_0x5c6c07=(_0x280dbd=!0,function(e,t){var i=_0x280dbd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x280dbd=!1,i}),_0x313445=_0x5c6c07(void 0,(function(){return _0x313445.toString().search("(((.+)+)+)+$").toString().constructor(_0x313445).search("(((.+)+)+)+$")})),_0x280dbd;_0x313445();var _0x2742bb="void main()\n{\ngl_FragColor = vec4(1.0);\n}",_0x26be82=(_0xe50926=!0,function(e,t){var i=_0xe50926?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe50926=!1,i}),_0x5b91ed=_0x26be82(void 0,(function(){return _0x5b91ed.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b91ed).search("(((.+)+)+)+$")})),_0xe50926;function _0x3218ec(e){this._layer=e,this._colorCommand=void 0,this._depthCommand=void 0,this._firstPoint=void 0,this._secondPoint=void 0,this._thirdPoint=void 0,this._boundingSphere=new i$1c(new o$1p(0,0,0),6378137),this._matModel=p$1d.IDENTITY,this._attributeLocations={}}_0x5b91ed(),Object.defineProperties(_0x3218ec.prototype,{}),_0x3218ec.prototype.initialize=function(e,t){this._initialize||(this.createCommand(e,t),this._initialize=!0)},_0x3218ec.prototype.update=function(e,t,i){if(this.initialize(e,t),!t.passes.pick&&!t.passes.depth){if(t._fboState.frameBufferType==Qe$c.CLAMP)return void(e$2b(this._depthCommand)&&i.push(this._depthCommand));e$2b(this._colorCommand)&&i.push(this._colorCommand)}};var _0x2fe92b=new o$1p;function _0x884aed(e){e$2b(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}_0x3218ec.prototype.createVertices=function(e){var t=S$12.createTypedArray(S$12.FLOAT,9),i=0,n=1e3;return t[i++]=(this._firstPoint.x-e.x)*n,t[i++]=(this._firstPoint.y-e.y)*n,t[i++]=(this._firstPoint.z-e.z)*n,t[i++]=(this._secondPoint.x-e.x)*n,t[i++]=(this._secondPoint.y-e.y)*n,t[i++]=(this._secondPoint.z-e.z)*n,t[i++]=(this._thirdPoint.x-e.x)*n,t[i++]=(this._thirdPoint.y-e.y)*n,t[i++]=(this._thirdPoint.z-e.z)*n,t},_0x3218ec.prototype.createCommand=function(e,t){_0x884aed(this._colorCommand),_0x884aed(this._depthCommand);var i=S$12.createTypedArray(S$12.UNSIGNED_SHORT,3);i[0]=0,i[1]=1,i[2]=2,_0x2fe92b.x=(this._firstPoint.x+this._secondPoint.x+this._thirdPoint.x)/3,_0x2fe92b.y=(this._firstPoint.y+this._secondPoint.y+this._thirdPoint.y)/3,_0x2fe92b.z=(this._firstPoint.z+this._secondPoint.z+this._thirdPoint.z)/3;var n=this.createVertices(_0x2fe92b),r=t$Y.createVertexBuffer({context:e,typedArray:n,usage:A$19.STATIC_DRAW}),o=[];this._attributeLocations.aPosition=0,o.push({name:"aPosition",index:this._attributeLocations.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var a=t$Y.createIndexBuffer({context:e,typedArray:i,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),s={};p$1d.fromRotationTranslation(p$1e.IDENTITY,_0x2fe92b,s),this._matModel=s,this._depthCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matModel,boundingVolume:this._boundingSphere,pass:Le$s.S3MTiles,cull:!1}),this._depthCommand.vertexArray=new c$12({context:e,attributes:o,indexBuffer:a}),this._depthCommand.shaderProgram=r$13.fromCache({name:"ClipPlaneDepth",context:e,vertexShaderSource:R$K,fragmentShaderSource:_0x2742bb,attributeLocations:this._attributeLocations}),this._depthCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!0,colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this.createColorCommand(e,t)},_0x3218ec.prototype.createColorCommand=function(e,t){var i=i$_.shallowClone(this._depthCommand),n=this._depthCommand.shaderProgram.vertexShaderSource.clone();i.shaderProgram=r$13.fromCache({name:"ClipPlaneColor",context:e,vertexShaderSource:n,fragmentShaderSource:_0x5a01b0,attributeLocations:this._attributeLocations});var r=this;i.uniformMap={uClampTexture:function(){var i=t._framebufferList.clampTexture;return e$2b(i)?i.renderTexture._fb.getColorTexture(0):e.defaultTexture},uClipPlaneColor:function(){return r._layer._clipPlaneColor},uUseColor:function(){var e=r._layer._clipPlaneMode;return e===_0xff9e19.COLOR?1:(_0xff9e19.MODEL_COLOR,0)}},i.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!0}),i.pass=Le$s.S3MTiles-1,this._colorCommand=i},_0x3218ec.prototype.setPoints=function(e,t,i){this._initialize=!1,this._firstPoint=e,this._secondPoint=t,this._thirdPoint=i},_0x3218ec.prototype.destroy=function(){return _0x884aed(this._colorCommand),this._colorCommand=void 0,_0x884aed(this._depthCommand),this._depthCommand=void 0,i$10(this)};var _0x1b6e2a=(_0x2c585a=!0,function(e,t){var i=_0x2c585a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c585a=!1,i}),_0xb0d308=_0x1b6e2a(void 0,(function(){return _0xb0d308.toString().search("(((.+)+)+)+$").toString().constructor(_0xb0d308).search("(((.+)+)+)+$")})),_0x2c585a;function _0x5ea05b(e){this._enable=!1,this._speed=100,this._period=0,this._layer=e}_0xb0d308(),Object.defineProperties(_0x5ea05b.prototype,{enable:{get:function(){return this._enable},set:function(e){e!=this._enable&&(this._enable=e,this._layer.bloomEnableChange(e))}},speed:{get:function(){return this._speed},set:function(e){this._speed=e}},period:{get:function(){return this._period/1e3},set:function(e){this._period=1e3*e}},maxBloomHeight:{get:function(){if(0==this._period)return Number.MAX_VALUE;var e=performance.now()%this._period;return this._speed*e/1e3}}});var _0x1649be=(_0x45ae4f=!0,function(e,t){var i=_0x45ae4f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45ae4f=!1,i}),_0x1878a5=_0x1649be(void 0,(function(){return _0x1878a5.toString().search("(((.+)+)+)+$").toString().constructor(_0x1878a5).search("(((.+)+)+)+$")})),_0x45ae4f;function _0x5d6ada(){this._cache={},this._queue=new r$16}_0x1878a5();var _0x4ae8ad=0,_0x2f5d88=104857600;_0x5d6ada.prototype.set=function(e,t,i){var n=e+"_"+t;if(!e$2b(this._cache[n])){var r={id:n,buffer:i};for(this._cache[n]=r,this._queue.enqueue(n),_0x4ae8ad+=i.byteLength;_0x4ae8ad>_0x2f5d88;){var o=this._queue.dequeue(),a=this._cache[o];_0x4ae8ad-=a.buffer.byteLength,delete this._cache[o]}}},_0x5d6ada.prototype.get=function(e,t){var i=e+"_"+t,n=this._cache[i];if(e$2b(n))return n.buffer},_0x5d6ada.prototype.contains=function(e,t){var i=e+"_"+t;return e$2b(this._cache[i])},_0x5d6ada._singleInstance=void 0,_0x5d6ada.getSingleInstance=function(){return e$2b(_0x5d6ada._singleInstance)||(_0x5d6ada._singleInstance=new _0x5d6ada),_0x5d6ada._singleInstance};var e$18={KeepOutside:1,KeepInside:2},R$J=Object.freeze(e$18),_0x21397c=(_0x565d42=!0,function(e,t){var i=_0x565d42?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x565d42=!1,i}),_0x364019=_0x21397c(void 0,(function(){return _0x364019.toString().search("(((.+)+)+)+$").toString().constructor(_0x364019).search("(((.+)+)+)+$")})),_0x565d42;_0x364019();var Z$J="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nattribute vec2 aTexCoord1;\nvarying float vHeight;\nvarying float regionHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vHeight = aPosition.w;\n vTexCoord0 = aTexCoord0.xy;\n vTexCoord1 = aTexCoord1;\n regionHeight = aTexCoord0.z;\n gl_Position = pos;\n v_positionMC = vec4(aPosition.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\n}",_0x172f56=(_0x4a5a56=!0,function(e,t){var i=_0x4a5a56?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a5a56=!1,i}),_0x2baec7=_0x172f56(void 0,(function(){return _0x2baec7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2baec7).search("(((.+)+)+)+$")})),_0x4a5a56;_0x2baec7();var $$N="uniform sampler2D uColorTexture;\nuniform sampler2D uRasterTexture;\n#ifdef IsExtract\nuniform float uExtractHeight;\n#endif\nvarying float vHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying float regionHeight;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uRasterTexture, vTexCoord0));\n if(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n }\n if (vHeight > terrainHeight || vHeight < regionHeight) { \n discard;\n }\n#ifdef IsExtract\n if (vHeight < uExtractHeight) { \n discard;\n }\n#endif\n vec4 baseColorWithAlpha = texture2D(uColorTexture, vTexCoord1);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(vTexCoord1.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(vTexCoord1.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, vTexCoord1.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n if(gl_FrontFacing)\n {\n n = -n;\n }\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}";function t$F(e){if(this._renderTexture=new s$L(e),this._context=e,this._isUpdate=!0,this._beginFunc=void 0,this._endFunc=void 0,this._useColor=!0,this._useHeight=!0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!1,isUnderGlobeVisible:!1,isOnlyS3MObjectVisible:!1},!e.webgpu){var t=e._gl,i=e$2b(e._currentFramebuffer)?e._currentFramebuffer._framebuffer:null;e.webgpu||t.bindFramebuffer(t.FRAMEBUFFER,i)}}Object.defineProperties(t$F.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},useType:{get:function(){return this._useHeight<<2|this._useColor<<1|this._isDepth},set:function(e){this._useHeight=(4&e)>0?1:0,this._useColor=(2&e)>0?1:0,this._isDepth=1&e}},frameBufferType:{get:function(){return Qe$c.RASTER}}}),t$F.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._beginFunc&&this._beginFunc(e),this._renderTexture._passState},t$F.prototype.end=function(e){this._endFunc&&this._endFunc(e)},t$F.prototype.update=function(e,t){},t$F.prototype.isDestroyed=function(){return!1},t$F.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)};var e$17={NONE:0,BITS12:1},me$p=Object.freeze(e$17),e$16={NONE:-1,PARTIAL:0,FULL:1},fe$n=Object.freeze(e$16),e$15={DisplayMode:{NONE:0,FACE:1,ARROW:2,FACE_AND_ARROW:3}},_0x256766=Object.freeze(e$15),e$14={NONE:0,LERC:1},T$L=Object.freeze(e$14);function s$G(e,t){o$1q.typeOf.object("ellipsoid",e),this._ellipsoid=e,this._cameraPosition=new o$1p,this._cameraPositionInScaledSpace=new o$1p,this._distanceToLimbInScaledSpaceSquared=0,e$2b(t)&&(this.cameraPosition=t)}Object.defineProperties(s$G.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){var t=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=o$1p.magnitudeSquared(t)-1;o$1p.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=t,this._distanceToLimbInScaledSpaceSquared=i}}});var _$I=new o$1p;s$G.prototype.isPointVisible=function(e){return h$M(this._ellipsoid.transformPositionToScaledSpace(e,_$I),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},s$G.prototype.isScaledSpacePointVisible=function(e){return h$M(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var w$K=new o$1p;s$G.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){var i,n,r=this._ellipsoid;return e$2b(t)&&t<0&&r.minimumRadius>-t?((n=w$K).x=this._cameraPosition.x/(r.radii.x+t),n.y=this._cameraPosition.y/(r.radii.y+t),n.z=this._cameraPosition.z/(r.radii.z+t),i=n.x*n.x+n.y*n.y+n.z*n.z-1):(n=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),h$M(e,n,i)},s$G.prototype.computeHorizonCullingPoint=function(e,t,i){return q$Q(this._ellipsoid,e,t,i)};var b$Z=t$13.clone(t$13.UNIT_SPHERE);s$G.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,i,n){return q$Q(z$J(this._ellipsoid,i,b$Z),e,t,n)},s$G.prototype.computeHorizonCullingPointFromVertices=function(e,t,i,n,r){return E$O(this._ellipsoid,e,t,i,n,r)},s$G.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,i,n,r,o){return E$O(z$J(this._ellipsoid,r,b$Z),e,t,i,n,o)};var O$A=[];s$G.prototype.computeHorizonCullingPointFromRectangle=function(e,t,i){o$1q.typeOf.object("rectangle",e);var n=h$18.subsample(e,t,0,O$A),r=i$1c.fromPoints(n);if(!(o$1p.magnitude(r.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(r.center,n,i)};var R$I=new o$1p;function z$J(e,t,i){if(e$2b(t)&&t<0&&e.minimumRadius>-t){var n=o$1p.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,R$I);e=t$13.fromCartesian3(n,i)}return e}function q$Q(e,t,i,n){o$1q.typeOf.object("directionToPoint",t),o$1q.defined("positions",i),e$2b(n)||(n=new o$1p);for(var r=C$Q(e,t),o=0,a=0,s=i.length;a<s;++a){var l=g$T(e,i[a],r);if(l<0)return;o=Math.max(o,l)}return x$S(r,o,n)}var m$P=new o$1p;function E$O(e,t,i,n,r,o){o$1q.typeOf.object("directionToPoint",t),o$1q.defined("vertices",i),o$1q.typeOf.number("stride",n),e$2b(o)||(o=new o$1p),n=u$_(n,3),r=u$_(r,o$1p.ZERO);for(var a=C$Q(e,t),s=0,l=0,u=i.length;l<u;l+=n){m$P.x=i[l]+r.x,m$P.y=i[l+1]+r.y,m$P.z=i[l+2]+r.z;var c=g$T(e,m$P,a);if(c<0)return;s=Math.max(s,c)}return x$S(a,s,o)}function h$M(e,t,i){var n=t,r=i,o=o$1p.subtract(e,n,_$I),a=-o$1p.dot(o,n);return!(r<0?a>0:a>r&&a*a/o$1p.magnitudeSquared(o)>r)}var V$E=new o$1p,k$J=new o$1p;function g$T(e,t,i){var n=e.transformPositionToScaledSpace(t,V$E),r=o$1p.magnitudeSquared(n),o=Math.sqrt(r),a=o$1p.divideByScalar(n,o,k$J);r=Math.max(1,r);var s=1/(o=Math.max(1,o));return 1/(o$1p.dot(a,i)*s-o$1p.magnitude(o$1p.cross(a,i,a))*(Math.sqrt(r-1)*s))}function x$S(e,t,i){if(!(t<=0||t===1/0||t!=t))return o$1p.multiplyByScalar(e,t,i)}var P$L=new o$1p;function C$Q(e,t){return o$1p.equals(t,o$1p.ZERO)?t:(e.transformPositionToScaledSpace(t,P$L),o$1p.normalize(P$L,P$L))}var N$F=new o$1p,B$K=new o$1p,c$N=new o$1o,M$Q=new p$1d,I$Y=new p$1d,g$S=Math.pow(2,12);function h$L(e,t,i,n,r,o){var a,s,l,u=me$p.NONE;if(e$2b(e)&&e$2b(t)&&e$2b(i)&&e$2b(n)){var c=e.minimum,h=e.maximum,d=o$1p.subtract(h,c,B$K),f=i-t;u=Math.max(o$1p.maximumComponent(d),f)<g$S-1?me$p.BITS12:me$p.NONE,u=me$p.NONE,a=e.center,s=p$1d.inverseTransformation(n,new p$1d);var p=o$1p.negate(c,N$F);p$1d.multiply(p$1d.fromTranslation(p,M$Q),s,s);var _=N$F;_.x=1/d.x,_.y=1/d.y,_.z=1/d.z,p$1d.multiply(p$1d.fromScale(_,M$Q),s,s),l=p$1d.clone(n),p$1d.setTranslation(l,o$1p.ZERO,l),n=p$1d.clone(n,new p$1d);var m=p$1d.fromTranslation(c,M$Q),g=p$1d.fromScale(d,I$Y),x=p$1d.multiply(m,g,M$Q);p$1d.multiply(n,x,n),p$1d.multiply(l,x,l)}this.quantization=u,this.minimumHeight=t,this.maximumHeight=i,this.center=a,this.toScaledENU=s,this.fromScaledENU=n,this.matrix=l,this.hasVertexNormals=r,this.hasWebMercatorT=u$_(o,!1)}h$L.prototype.encode=function(e,t,i,n,r,o,a){var s=n.x,l=n.y;if(this.quantization===me$p.BITS12){(i=p$1d.multiplyByPoint(this.toScaledENU,i,N$F)).x=e$2a.clamp(i.x,0,1),i.y=e$2a.clamp(i.y,0,1),i.z=e$2a.clamp(i.z,0,1);var u=this.maximumHeight-this.minimumHeight,c=e$2a.clamp((r-this.minimumHeight)/u,0,1);o$1o.fromElements(i.x,i.y,c$N);var h=t$10.compressTextureCoordinates(c$N);o$1o.fromElements(i.z,c,c$N);var d=t$10.compressTextureCoordinates(c$N);o$1o.fromElements(s,l,c$N);var f=t$10.compressTextureCoordinates(c$N);if(e[t++]=h,e[t++]=d,e[t++]=f,this.hasWebMercatorT){o$1o.fromElements(a,0,c$N);var p=t$10.compressTextureCoordinates(c$N);e[t++]=p}}else o$1p.subtract(i,this.center,N$F),e[t++]=N$F.x,e[t++]=N$F.y,e[t++]=N$F.z,e[t++]=r,e[t++]=s,e[t++]=l,this.hasWebMercatorT&&(e[t++]=a);return this.hasVertexNormals&&(e[t++]=t$10.octPackFloat(o)),t},h$L.prototype.decodePosition=function(e,t,i){if(e$2b(i)||(i=new o$1p),t*=this.getStride(),this.quantization===me$p.BITS12){var n=t$10.decompressTextureCoordinates(e[t],c$N);i.x=n.x,i.y=n.y;var r=t$10.decompressTextureCoordinates(e[t+1],c$N);return i.z=r.x,p$1d.multiplyByPoint(this.fromScaledENU,i,i)}return i.x=e[t],i.y=e[t+1],i.z=e[t+2],o$1p.add(i,this.center,i)},h$L.prototype.decodeTextureCoordinates=function(e,t,i){return e$2b(i)||(i=new o$1o),t*=this.getStride(),this.quantization===me$p.BITS12?t$10.decompressTextureCoordinates(e[t+2],i):o$1o.fromElements(e[t+4],e[t+5],i)},h$L.prototype.decodeHeight=function(e,t){return t*=this.getStride(),this.quantization===me$p.BITS12?t$10.decompressTextureCoordinates(e[t+1],c$N).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]},h$L.prototype.decodeWebMercatorT=function(e,t){return t*=this.getStride(),this.quantization===me$p.BITS12?t$10.decompressTextureCoordinates(e[t+3],c$N).x:e[t+6]},h$L.prototype.getOctEncodedNormal=function(e,t,i){var n=e[t=(t+1)*this.getStride()-1]/256,r=Math.floor(n),o=256*(n-r);return o$1o.fromElements(r,o,i)},h$L.prototype.getStride=function(){var e;if(this.quantization===me$p.BITS12)e=3;else e=6;return this.hasWebMercatorT&&++e,this.hasVertexNormals&&++e,e};var H$P={position3DAndHeight:0,textureCoordAndEncodedNormals:1},F$P={compressed0:0,compressed1:1};h$L.prototype.getAttributes=function(e){var t,i=S$12.FLOAT,n=S$12.getSizeInBytes(i);if(this.quantization===me$p.NONE){var r=2;this.hasWebMercatorT&&++r,this.hasVertexNormals&&++r,t=(4+r)*n;var o=[{index:H$P.position3DAndHeight,name:"position3DAndHeight",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:4,offsetInBytes:0,strideInBytes:t},{index:H$P.textureCoordAndEncodedNormals,name:"textureCoordAndEncodedNormals",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:r,offsetInBytes:4*n,strideInBytes:t}];return o}var a=3,s=0;return(this.hasWebMercatorT||this.hasVertexNormals)&&++a,this.hasWebMercatorT&&this.hasVertexNormals?(t=(a+ ++s)*n,[{index:o.compressed0,name:"compressed0",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a,offsetInBytes:0,strideInBytes:t},{index:o.compressed1,name:"compressed1",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:s,offsetInBytes:a*n,strideInBytes:t}]):[{index:o.compressed0,name:"compressed0",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a}]},h$L.prototype.getAttributeLocations=function(){return this.quantization===me$p.NONE?H$P:F$P},h$L.clone=function(e,t){return e$2b(t)||(t=new h$L),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=o$1p.clone(e.center),t.toScaledENU=p$1d.clone(e.toScaledENU),t.fromScaledENU=p$1d.clone(e.fromScaledENU),t.matrix=p$1d.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t};var m$O={};m$O.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var lr$6=new o$1p,sa$3=new p$1d,ua$3=new o$1p,Ta$4=new o$1p;function T$K(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x){this.center=e,this.vertices=t,this.stride=u$_(u,6),this.indexCountWithoutSkirts=n,this.vertexCountWithoutSkirts=r,this.indices=i,this.minimumHeight=o,this.maximumHeight=a,this.boundingSphere3D=s,this.occludeePointInScaledSpace=l,this.orientedBoundingBox=c,this.validOrientedBoundingBox=x,this.encoding=h,this.exaggeration=d,this.westIndicesSouthToNorth=f,this.southIndicesEastToWest=p,this.eastIndicesNorthToSouth=_,this.northIndicesWestToEast=m,this.invalid=u$_(g,!1)}function T$J(e){if(!e$2b(e)||!e$2b(e.buffer))throw new t$16("options.buffer is required.");if(!e$2b(e.width))throw new t$16("options.width is required.");if(!e$2b(e.height))throw new t$16("options.height is required.");this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=u$_(e.childTileMask,15),this._encoding=u$_(e.encoding,T$L.NONE),this._valid=u$_(e.valid,!0),e$2b(e.childTileMaskExt)&&(this._childTileMaskExt=e.childTileMaskExt,this._level=e.level,this._x=e.x,this._y=e.y);var t=m$O.DEFAULT_STRUCTURE,i=e.structure;e$2b(i)?i!==t&&(i.heightScale=u$_(i.heightScale,t.heightScale),i.heightOffset=u$_(i.heightOffset,t.heightOffset),i.elementsPerHeight=u$_(i.elementsPerHeight,t.elementsPerHeight),i.stride=u$_(i.stride,t.stride),i.elementMultiplier=u$_(i.elementMultiplier,t.elementMultiplier),i.isBigEndian=u$_(i.isBigEndian,t.isBigEndian)):i=t,this._structure=i,this._createdByUpsampling=u$_(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===T$L.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0,this._skirtMode=u$_(e.skirtMode,!0),this._skirtScale=u$_(e.skirtScale,.1),this._releaseBuffer=!0,e$2b(e.releaseBuffer)&&(this._releaseBuffer=e.releaseBuffer),this._normalTexture=e.normalTexture}m$O.computeVertices=function(e){if(!e$2b(e)||!e$2b(e.heightmap))throw new t$16("options.heightmap is required.");if(!e$2b(e.width)||!e$2b(e.height))throw new t$16("options.width and options.height are required.");if(!e$2b(e.nativeRectangle))throw new t$16("options.nativeRectangle is required.");if(!e$2b(e.skirtHeight))throw new t$16("options.skirtHeight is required.");var t,i,n,r,o=Math.cos,a=Math.sin,s=Math.sqrt,l=Math.atan,u=Math.exp,c=e$2a.PI_OVER_TWO,h=e$2a.toRadians,d=e.heightmap,f=e.width,p=e.height,_=e.skirtHeight,m=u$_(e.isGeographic,!0),g=u$_(e.ellipsoid,t$13.WGS84),x=1/g.maximumRadius,v=e.nativeRectangle,y=e.rectangle;e$2b(y)?(t=y.west,i=y.south,n=y.east,r=y.north):m?(t=h(v.west),i=h(v.south),n=h(v.east),r=h(v.north)):(t=v.west*x,i=c-2*l(u(-v.south*x)),n=v.east*x,r=c-2*l(u(-v.north*x)));var $=e.relativeToCenter,b=e$2b($);$=b?$:o$1p.ZERO;var T=u$_(e.exaggeration,1),C=u$_(e.includeWebMercatorT,!1),S=u$_(e.structure,m$O.DEFAULT_STRUCTURE),w=u$_(S.heightScale,m$O.DEFAULT_STRUCTURE.heightScale),E=u$_(S.heightOffset,m$O.DEFAULT_STRUCTURE.heightOffset),P=u$_(S.elementsPerHeight,m$O.DEFAULT_STRUCTURE.elementsPerHeight),A=u$_(S.stride,m$O.DEFAULT_STRUCTURE.stride),L=u$_(S.elementMultiplier,m$O.DEFAULT_STRUCTURE.elementMultiplier),M=u$_(S.isBigEndian,m$O.DEFAULT_STRUCTURE.isBigEndian),R=h$18.computeWidth(v),O=h$18.computeHeight(v),I=R/(f-1),D=O/(p-1);m||(R*=x,O*=x);var B,N,F=g.radiiSquared,U=F.x,G=F.y,z=F.z,V=65536,k=-65536,W=m$17.eastNorthUpToFixedFrame($,g),H=p$1d.inverseTransformation(W,sa$3);C&&(B=t$O.geodeticLatitudeToMercatorAngle(i),N=1/(t$O.geodeticLatitudeToMercatorAngle(r)-B));var q=ua$3;q.x=Number.POSITIVE_INFINITY,q.y=Number.POSITIVE_INFINITY,q.z=Number.POSITIVE_INFINITY;var j=Ta$4;j.x=Number.NEGATIVE_INFINITY,j.y=Number.NEGATIVE_INFINITY,j.z=Number.NEGATIVE_INFINITY;var Y=Number.POSITIVE_INFINITY,X=f*p,K=X+(_>0?2*f+2*p:0),Q=new Array(K),Z=new Array(K),J=new Array(K),ee=C?new Array(K):[],te=0,ie=p,ne=0,re=f;_>0&&(--te,++ie,--ne,++re);for(var oe=1e-5,ae=te;ae<ie;++ae){var se=ae;se<0&&(se=0),se>=p&&(se=p-1);var le=v.north-D*se,ue=((le=m?h(le):c-2*l(u(-le*x)))-i)/(r-i);ue=e$2a.clamp(ue,0,1);var ce=ae===te,he=ae===ie-1;_>0&&(ce?le+=oe*O:he&&(le-=oe*O));var de,fe=o(le),pe=a(le),_e=z*pe;C&&(de=(t$O.geodeticLatitudeToMercatorAngle(le)-B)*N);for(var me=ne;me<re;++me){var ge=me;ge<0&&(ge=0),ge>=f&&(ge=f-1);var xe,ve,ye=se*(f*A)+ge*A;if(1===P)xe=d[ye];else if(xe=0,M)for(ve=0;ve<P;++ve)xe=xe*L+d[ye+ve];else for(ve=P-1;ve>=0;--ve)xe=xe*L+d[ye+ve];xe=(xe*w+E)*T,k=Math.max(k,xe),V=Math.min(V,xe);var $e=v.west+I*ge;m?$e=h($e):$e*=x;var be=($e-t)/(n-t);be=e$2a.clamp(be,0,1);var Te=se*f+ge;if(_>0){var Ce=me===ne,Se=me===re-1,we=ce||he||Ce||Se;if((ce||he)&&(Ce||Se))continue;we&&(xe-=_,Ce?(Te=X+(p-se-1),$e-=oe*R):he?Te=X+p+(f-ge-1):Se?(Te=X+p+f+se,$e+=oe*R):ce&&(Te=X+p+f+p+ge))}var Ee=fe*o($e),Pe=fe*a($e),Ae=U*Ee,Le=G*Pe,Me=1/s(Ae*Ee+Le*Pe+_e*pe),Re=Ae*Me,Oe=Le*Me,Ie=_e*Me,De=new o$1p;De.x=Re+Ee*xe,De.y=Oe+Pe*xe,De.z=Ie+pe*xe,Q[Te]=De,Z[Te]=xe,J[Te]=new o$1o(be,ue),C&&(ee[Te]=de),p$1d.multiplyByPoint(H,De,lr$6),o$1p.minimumByComponent(lr$6,q,q),o$1p.maximumByComponent(lr$6,j,j),Y=Math.min(Y,xe)}}var Be,Ne,Fe=i$1c.fromPoints(Q);(e$2b(y)&&(Be=y$Z.fromRectangle(y,V,k,g)),b)&&(Ne=new s$G(g).computeHorizonCullingPointPossiblyUnderEllipsoid($,Q,V));for(var Ue=new h$L(new e$26(q,j,$),Y,k,W,!1,C),Ge=new Float32Array(K*Ue.getStride()),ze=0,Ve=0;Ve<K;++Ve)ze=Ue.encode(Ge,ze,Q[Ve],J[Ve],Z[Ve],void 0,ee[Ve]);return{vertices:Ge,maximumHeight:k,minimumHeight:V,encoding:Ue,boundingSphere3D:Fe,orientedBoundingBox:Be,occludeePointInScaledSpace:Ne}},Object.defineProperties(T$J.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return e$2b(this._mesh)}},normalTexture:{get:function(){return this._normalTexture}}});var Q$L=new i$V("createVerticesFromHeightmap");T$J.prototype.createMesh=function(e,t,i,n,r){if(!e$2b(e))throw new t$16("tilingScheme is required.");if(!e$2b(t))throw new t$16("x is required.");if(!e$2b(i))throw new t$16("y is required.");if(!e$2b(n))throw new t$16("level is required.");var o=e.ellipsoid,a=e.tileXYToNativeRectangle(t,i,n),s=e.tileXYToRectangle(t,i,n);r=u$_(r,1);var l=o.cartographicToCartesian(h$18.center(s)),u=this._structure,c=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<n);if(this._skirtMode)if(e.isSct){var h=Math.min.apply(null,this._buffer),d=Math.max.apply(null,this._buffer);this._skirtHeight=this._skirtScale*(d-h),0===this._skirtHeight&&(this._skirtHeight=Math.min(4*c,1e3))}else this._skirtHeight=Math.min(4*c,1e3);else this._skirtHeight=0;var f=Q$L.scheduleTask({heightmap:this._buffer,structure:u,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:a,rectangle:s,relativeToCenter:l,ellipsoid:o,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof n$1b,exaggeration:r,encoding:this._encoding});if(e$2b(f)){var p=this;return o$1l(f,(function(e){var t;t=p._skirtHeight>0?I$12.getRegularGridAndSkirtIndicesAndEdgeIndices(e.gridWidth,e.gridHeight):I$12.getRegularGridIndicesAndEdgeIndices(e.gridWidth,e.gridHeight);var i=e.gridWidth*e.gridHeight;return p._mesh=new T$K(l,new Float32Array(e.vertices),t.indices,t.indexCountWithoutSkirts,i,e.minimumHeight,e.maximumHeight,i$1c.clone(e.boundingSphere3D),o$1p.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,y$Z.clone(e.orientedBoundingBox),h$L.clone(e.encoding),r,t.westIndicesSouthToNorth,t.southIndicesEastToWest,t.eastIndicesNorthToSouth,t.northIndicesWestToEast),p._buffer=void 0,p._mesh}))}},T$J.prototype._createMeshSync=function(e,t,i,n,r){if(!e$2b(e))throw new t$16("tilingScheme is required.");if(!e$2b(t))throw new t$16("x is required.");if(!e$2b(i))throw new t$16("y is required.");if(!e$2b(n))throw new t$16("level is required.");var o=e.ellipsoid,a=e.tileXYToNativeRectangle(t,i,n),s=e.tileXYToRectangle(t,i,n);r=u$_(r,1);var l=o.cartographicToCartesian(h$18.center(s)),u=this._structure,c=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<n);this._skirtHeight=Math.min(4*c,1e3);var h,d=m$O.computeVertices({heightmap:this._buffer,structure:u,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:a,rectangle:s,relativeToCenter:l,ellipsoid:o,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof n$1b,exaggeration:r});this._buffer=void 0,h=this._skirtHeight>0?I$12.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):I$12.getRegularGridIndicesAndEdgeIndices(this._width,this._height);var f=d.gridWidth*d.gridHeight;return new T$K(l,d.vertices,h.indices,h.indexCountWithoutSkirts,f,d.minimumHeight,d.maximumHeight,d.boundingSphere3D,d.occludeePointInScaledSpace,d.encoding.getStride(),d.orientedBoundingBox,d.encoding,r,h.westIndicesSouthToNorth,h.southIndicesEastToWest,h.eastIndicesNorthToSouth,h.northIndicesWestToEast)},T$J.prototype.interpolateHeight=function(e,t,i){var n,r=this._width,o=this._height,a=this._structure,s=a.stride,l=a.elementsPerHeight,u=a.elementMultiplier,c=a.isBigEndian,h=a.heightOffset,d=a.heightScale;e$2b(this._mesh)?n=G$W(this._mesh.vertices,this._mesh.encoding,h,d,e,r,o,t,i,this._mesh.exaggeration):n=(n=ee$s(this._buffer,l,u,s,c,e,r,o,t,i))*d+h;return n};var y$L=33,$$M=new Float32Array(y$L*y$L);function ee$s(e,t,i,n,r,o,a,s,l,u){var c=(l-o.west)*(a-1)/(o.east-o.west),h=(u-o.south)*(s-1)/(o.north-o.south),d=0|c,f=d+1;f>=a&&(f=a-1,d=a-2);var p=0|h,_=p+1;return _>=s&&(_=s-1,p=s-2),_=s-1-_,D$N(c-d,h-p,A$T(e,t,i,n,r,(p=s-1-p)*a+d),A$T(e,t,i,n,r,p*a+f),A$T(e,t,i,n,r,_*a+d),A$T(e,t,i,n,r,_*a+f))}function G$W(e,t,i,n,r,o,a,s,l,u){var c=(s-r.west)*(o-1)/(r.east-r.west),h=(l-r.south)*(a-1)/(r.north-r.south),d=0|c,f=d+1;f>=o&&(f=o-1,d=o-2);var p=0|h,_=p+1;_>=a&&(_=a-1,p=a-2);var m=h-p;return p=a-1-p,_=a-1-_,D$N(c-d,m,(t.decodeHeight(e,p*o+d)/u-i)/n,(t.decodeHeight(e,p*o+f)/u-i)/n,(t.decodeHeight(e,_*o+d)/u-i)/n,(t.decodeHeight(e,_*o+f)/u-i)/n)}function D$N(e,t,i,n,r,o){return t<e?i+e*(n-i)+t*(o-n):i+e*(o-r)+t*(r-i)}function A$T(e,t,i,n,r,o){o*=n;var a,s=0;if(r)for(a=0;a<t;++a)s=s*i+e[o+a];else for(a=t-1;a>=0;--a)s=s*i+e[o+a];return s}function re$A(e,t,i,n,r,o,a,s){var l;if(a*=r,o)for(l=0;l<t-1;++l)e[a+l]=s/n|0,s-=e[a+l]*n,n/=i;else for(l=t-1;l>0;--l)e[a+l]=s/n|0,s-=e[a+l]*n,n/=i;e[a+l]=s}function r$Q(){this.head=void 0,this.tail=void 0,this.count=0}function t$E(e,t){var i=t.previous,n=t.next;t===e.head?e.head=n:i.next=n,t===e.tail?e.tail=i:n.previous=i,t.previous=void 0,t.next=void 0,--e.count}function se$q(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).urls))throw new t$16("options.urls is required.");this._urls=e.urls;for(var t=0;t<this._urls.length;t++)this._urls[t].length>0&&"/"!==this._urls[t][this._urls[t].length-1]&&(this._urls[t]+="/");var i=e.urls[0].indexOf("wmts100");this._useConfigFile=u$_(e.useConfigFile,!0),this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer(),this._isCreateSkirt=e.isCreateSkirt,this._skirtScale=e.skirtScale,this._isSkirtDirty=!1,this._proxy=e.proxy,this._terrainDataStructure={heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1};var n=e.credit;"string"==typeof n&&(n=new r$T({text:n})),this._credit=n,this._tilingScheme=void 0,this._rectangles=[],this._levels=[],this._compressType="NONE",this._quadtree=void 0,this._packingRequest=e.packingRequest,this._combiInfo={},this._isBlock=!1,this._blockCache={},this._blockCacheQueue=new r$Q,this._blockCacheSize=100,this._blockScale=0;var r,o=this,a=u$_(e.ellipsoid,t$13.WGS84);this._hasNormalBuffer=!1,this._requestVertexNormals=u$_(e.requestVertexNormals,!1);var s=0;function l(e){if(1===parseFloat(e.getElementsByTagName("sml:Version")[0].textContent)){var t=e.getElementsByTagName("sml:StoreType",void 0);o._blockScale=t[0].getAttribute("BlockScale"),e$2b(o._blockScale)&&o._blockScale>0&&(o._isBlock=!0)}o._compressType=e.getElementsByTagName("sml:CompressType")[0].textContent,o._heightmapWidth=parseInt(e.getElementsByTagName("sml:CellWidth")[0].textContent),o._heightmapHeight=parseInt(e.getElementsByTagName("sml:CellHeight")[0].textContent),o._tilingScheme=new g$13({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,2*Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0));var i=e.getElementsByTagName("sml:Bounds")[0],n=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Left")[0].textContent)),r=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Bottom")[0].textContent)),u=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Right")[0].textContent)),h=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Top")[0].textContent));o._rectangles.push(new h$18(n,r,u,h));for(var d=e.getElementsByTagName("sml:Levels")[0].getElementsByTagName("sml:Level"),f=[],p=0;p<d.length;++p){var _=d[p];f.push(parseInt(_.textContent))}if(o._levels.push(f),o._ready=!0,o._readyPromise.resolve(!0),s<o._urls.length){var m=o._urls[s++],g=m.substring(0,m.length-1),x=m+"config";e$2b(a$O.CREDENTIAL)&&(x=e$2b(a$O.CREDENTIAL._keymap[g])?a$O.addTokenWithKey(g,x):a$O.addToken(x)),o$1l(d$1f(x),l,c)}}function u(t){var i=(new s$S).read(t).documentElement,n=s$S.queryFirstNode(i,"Contents",void 0),r=s$S.queryFirstNode(n,"Layer",void 0);o._tempLayerName=s$S.queryStringValue(r,"Title",void 0);var h=s$S.queryFirstNode(n,"TileMatrixSet",void 0);o._wmtstileMatrixSet=s$S.queryStringValue(h,"Identifier",void 0);var d=s$S.queryFirstNode(r,"BoundingBox",void 0),f=s$S.queryStringValue(d,"LowerCorner",void 0),p=s$S.queryStringValue(d,"UpperCorner",void 0),_=f.split(" "),m=p.split(" "),g=parseFloat(_[0]),x=parseFloat(m[0]),v=parseFloat(_[1]),y=parseFloat(m[1]);g&&x&&v&&y&&o._rectangles.push(new h$18(g,v,x,y));var $=s$S.queryFirstNode(n,"TileMatrixSet",void 0),b=(h=s$S.queryChildNodes($,"TileMatrix",void 0),s$S.queryNumericValue(h[0],"ScaleDenominator",void 0)),T=s$S.queryNumericValue(h[h.length-1],"ScaleDenominator",void 0),C=s$S.queryNumericValue(h[0],"Identifier",void 0);b=1/b,T=1/T;var S=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],w=S.indexOf(b),E=S.indexOf(T);for(let e=0;e<S.length;e++)b>S[e]&&S[e+1]&&b<S[e+1]&&(w=e-1),T>S[e]&&S[e+1]&&T<S[e+1]&&(E=e-1);w=Math.max(w,0),o.wmts_sub=u$_(w-C,0);for(var P=[],A=w;A<=E;A++)P.push(A);if(o._levels.push(P),e.blockscale>0&&(o._blockScale=1*e.blockscale,o._isBlock=!0),o._compressType="ZIP",o._heightmapWidth=e.cellWidth||32,o._heightmapHeight=e.cellHeight||32,o._tilingScheme=new g$13({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,2*Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0)),o._ready=!0,o._readyPromise.resolve(!0),s<o._urls.length){var L=o._urls[s++];if(-1!==L.indexOf("wmts100")){o$1l(u$R(R=L+"1.0.0/WMTSCapabilities.xml"),u,c)}else{var M=L.substring(0,L.length-1),R=L+"config";e$2b(a$O.CREDENTIAL)&&(R=e$2b(a$O.CREDENTIAL._keymap[M])?a$O.addTokenWithKey(M,R):a$O.addToken(R)),o$1l(d$1f(R),l,c)}}}function c(e){var t=u$_(e,"An error occurred while accessing "+o._url+".");r=l$W.handleError(r,o,o._errorEvent,t,void 0,void 0,void 0,h)}function h(){if(!e$2b(e.rectangles)||!e$2b(e.levels))throw new t$16("options.rectangles,options.levels is required.");o._compressType=u$_(e.compressType,"ZIP"),o._heightmapWidth=u$_(e.heightmapWidth,32),o._heightmapHeight=u$_(e.heightmapHeight,32),o._tilingScheme=new g$13({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0)),o._rectangles=e.rectangles,o._levels=e.levels,o._ready=!0,o._readyPromise.resolve(!0)}this._useConfigFile?function(){if(-1!==i){o$1l(u$R(n=(e=o._urls[s++])+"1.0.0/WMTSCapabilities.xml"),u,c)}else{var e,t=(e=o._urls[s++]).substring(0,e.length-1),n=e+"config";e$2b(a$O.CREDENTIAL)&&(n=e$2b(a$O.CREDENTIAL._keymap[t])?a$O.addTokenWithKey(t,n):a$O.addToken(n)),o$1l(d$1f(n),l,c)}}():h()}function qe$a(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function Me$j(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(t>r-1)throw new t$16("pack imagery index invalid");n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e,n,a);n+=a}}function Re$i(e,t,i,n){var r=Math.min(e._blockScale,n),o=Math.pow(2,r),a=t%o;return{x:Math.floor(t/o),y:Math.floor(i/o),col:a,row:i%o,level:n,blockSize:o}}function We$g(e,t){var i=new DataView(e),n=0;i.getUint32(n,!0),n+=4;var r=i.getUint32(n,!0);n+=4;for(var o=t.col,a=t.row*t.blockSize+o,s=0,l=0,u=0;u<r;u++){if(u<a)s+=i.getUint32(n,!0);else if(u===a){l=i.getUint32(n,!0),n+=4;break}n+=4}if(n=8+4*r,0!==l)return n+=s,new Uint8Array(e).slice(n,n+l).buffer}T$J.prototype.upsample=function(e,t,i,n,r,o,a){if(!e$2b(e))throw new t$16("tilingScheme is required.");if(!e$2b(t))throw new t$16("thisX is required.");if(!e$2b(i))throw new t$16("thisY is required.");if(!e$2b(n))throw new t$16("thisLevel is required.");if(!e$2b(r))throw new t$16("descendantX is required.");if(!e$2b(o))throw new t$16("descendantY is required.");if(!e$2b(a))throw new t$16("descendantLevel is required.");if(a-n>1)throw new t$16("Upsampling through more than one level at a time is not currently supported.");if(!this._valid){var s=16,l=16;return new T$J({buffer:new Uint8Array(s*l),width:s,height:l,skirtMode:this._skirtMode,skirtScale:this._skirtScale,childTileMask:0,structure:this._structure,createdByUpsampling:!0,valid:!1})}var u=this._mesh;if(e$2b(u)){s=this._width,l=this._height;e$2b(this._valid)&&!this._valid&&(s=Math.max(Math.floor(.5*this._width+1),y$L),l=Math.max(Math.floor(.5*this._height+1),y$L));for(var c=this._structure,h=c.stride,d=new this._bufferType(s*l*h),f=u.vertices,p=u.encoding,_=e.tileXYToRectangle(t,i,n),m=e.tileXYToRectangle(r,o,a),g=c.heightOffset,x=c.heightScale,v=u.exaggeration,y=c.elementsPerHeight,$=c.elementMultiplier,b=c.isBigEndian,T=Math.pow($,y-1),C=0;C<l;++C)for(var S=e$2a.lerp(m.north,m.south,C/(l-1)),w=0;w<s;++w){var E=G$W(f,p,g,x,_,s,l,e$2a.lerp(m.west,m.east,w/(s-1)),S,v);re$A(d,y,$,T,h,b,C*s+w,E=(E=E<c.lowestEncodedHeight?c.lowestEncodedHeight:E)>c.highestEncodedHeight?c.highestEncodedHeight:E)}if(!this._structure.isBigEndian){var P=!1;for(w=0;w<d.length;w++)if(Math.abs(d[w])>e$2a.EPSILON3){P=!0;break}P||(l=y$L,s=y$L,d=$$M)}return new T$J({buffer:d,width:s,height:l,skirtMode:this._skirtMode,skirtScale:this._skirtScale,childTileMask:0,structure:this._structure,createdByUpsampling:!0,valid:this._valid})}},T$J.prototype.isChildAvailable=function(e,t,i,n){if(!e$2b(e))throw new t$16("thisX is required.");if(!e$2b(t))throw new t$16("thisY is required.");if(!e$2b(i))throw new t$16("childX is required.");if(!e$2b(n))throw new t$16("childY is required.");var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},T$J.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling},r$Q.prototype.trim=function(e){for(var t=this.tail;this.count>e&&e$2b(t);){var i=t.previous;t.free(),t$E(this,t),t=i}},r$Q.prototype.touch=function(e){var t=this.head;if(t!==e){if(++this.count,!e$2b(t))return e.previous=void 0,e.next=void 0,this.head=e,void(this.tail=e);(e$2b(e.previous)||e$2b(e.next))&&t$E(this,e),e.previous=void 0,e.next=t,t.previous=e,this.head=e}},Object.defineProperties(se$q.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$16("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}},skirtScale:{get:function(){return this._skirtScale},set:function(e){e!==this._skirtScale&&(this._isSkirtDirty=!0),this._skirtScale=e}},hasNormalBuffer:{get:function(){return this._hasNormalBuffer}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}}}),se$q.prototype.division=function(e,t,i,n,r){for(var o=[],a=0;a<r;a++)for(var s=0;s<r;s++){var l=(i+n*(r-1-a)/(r-1))*(r-1),u=(t+n*s/(r-1))*(r-1),c=Math.floor(l),h=Math.ceil(l),d=Math.floor(u),f=Math.ceil(u),p=e[(r-1-c)*r+d],_=e[(r-1-c)*r+f],m=e[(r-1-h)*r+d],g=e[(r-1-h)*r+f],x=m*(l-c)+p*(h-l),v=g*(l-c)+_*(h-l);c===h&&(x=m,v=g);var y=v*(u-d)+x*(f-u);d===f&&(y=v),o[a*r+s]=y}return o};var ue$s=new h$18;function Qe$9(e,t,i,n,r){if(null!=e){for(var o=new Uint8Array(t*i*3),a=6378137,s=n.width,l=n.height,u=e,c=0;c<t;c++)for(var h=0;h<i;h++){var d=h*t+c;u[h*t+c];var f=c,p=h;r>13&&(c=(c=0==c?c+1:c)==t-1?t-2:c,h=(h=0==h?h+1:h)==i-1?i-2:h);var _=Math.max(c-1,0),m=h,g=u[m*t+_],x=u[(m=h)*t+(_=Math.min(c+1,t-1))];_=c;var v=u[(m=Math.min(h+1,i-1))*t+_];_=c;var y=u[(m=Math.max(h-1,0))*t+_];c=f,h=p;var $=n.south+l*(512-2*h-1)/512,b=new o$1p((g-x)/(a*Math.cos($)*s/t),(y-v)/(a*l/i),2);o$1p.normalize(b,b),o[3*d+0]=255*(.5*b.x+.5),o[3*d+1]=255*(.5*b.y+.5),o[3*d+2]=255*(.5*b.z+.5)}return o}}se$q.prototype.requestTileGeometry=function(e,t,i,n,r){if(!this.ready)throw new t$16("requestTileGeometry must not be called before ready returns true.");if(0===i){var o=new Array(this._heightmapWidth*this._heightmapHeight);return o.fill(0),this._hasNormalBuffer=!1,new T$J({buffer:o,width:this._heightmapWidth,height:this._heightmapHeight,skirtMode:this._isCreateSkirt,skirtScale:this._skirtScale,childTileMask:Ie$g(this,e,t,i),structure:this._terrainDataStructure,valid:!1})}var a=[],s=this._tilingScheme.tileXYToRectangle(e,t,i),l=this,u=!1,c=this._rectangles.length-1,h=this._levels[c][this._levels[c].length-1];c=0;var d=this._levels[c][this._levels[c].length-1];if(e$2b(r)||!(i>d)){var f=this,p=!1;(e$2b(f._packingRequest)&&f._packingRequest===X$N.QuadKey||f._isBlock)&&(p=!0);for(var _=0;_<this._rectangles.length;_++){var m=h$18.intersection(this._rectangles[_],s,ue$s);if(e$2b(r)&&!p){var g=r[this._urls[_]];if(e$2b(g)&&(1===g&&(u=!0),0===g||2===g))continue}if(0===a.length&&_===this._rectangles.length-1&&i>h)break;if(e$2b(m)){var x=this._levels[_][0],v=this._levels[_][this._levels[_].length-1],y=!1;if(i>=x&&i<=d&&(y=!0),y){var $=0,b=0,T=1,C=e,S=t,w=i;w>v&&(T=1/Math.pow(2,w-v));for(var E=T;w>v;)C%2==1&&($+=E),S%2==0&&(b+=E),E*=2,w--,C=Math.floor(.5*C),S=Math.floor(.5*S);var P={srcX:$,srcY:b,width:T,dataName:l._urls[_]},A=i+"_"+e+"_"+t;e$2b(l._combiInfo[A])?l._combiInfo[A].push(P):l._combiInfo[A]=[P],function(e){var t,i=l._urls[e];if(-1!==i.indexOf("wmts100")){var n=w-l.wmts_sub;t=i.substring(0,i.lastIndexOf("/"))+"?tilematrix="+n+"&layer="+l._tempLayerName+"&tilerow="+S+"&tilecol="+C+"&tilematrixset="+l._wmtstileMatrixSet+"&service=WMTS&request=GetTile"}else{var r=i.substring(0,i.length-1);t=l._urls[e]+"data/index/"+S+"/"+C+".bil?level="+w}var o=l._proxy;e$2b(o)&&(t=o.getURL(t));var s=new r$1b({throttle:!0,throttleByServer:!1,type:V$15.TERRAIN}),u=void 0;if(e$2b(f._packingRequest)&&f._packingRequest===X$N.QuadKey&&f._isBlock){s.type=V$15.BLOCKPACK;var c=Re$i(f,C,S,w);s.quadKey=qe$a(c.x,c.y,c.level),s.blockInfo=c,s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),e$2b(h=f.blockCache[s.quadKey+"_"+s.providerName])&&(f.blockCacheQueue.touch(h),u={buffer:h.data})}else if(e$2b(f._packingRequest)&&f._packingRequest===X$N.QuadKey)s.type=V$15.PACK,s.quadKey=qe$a(C,S,w),s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/"));else if(f._isBlock){s.type=V$15.BLOCK;var h;c=Re$i(f,C,S,w);s.quadKey=qe$a(c.x,c.y,c.level),s.blockInfo=c,s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),e$2b(h=f.blockCache[s.quadKey+"_"+s.providerName])&&(f.blockCacheQueue.touch(h),u={buffer:h.data})}if(!e$2b(u)){e$2b(a$O.CREDENTIAL)&&(t=e$2b(a$O.CREDENTIAL._keymap[r])?a$O.addTokenWithKey(r,t):a$O.addToken(t));var d=t$11.createIfNeeded(t),p=t;e$2b(s.blockInfo)&&(p=l._urls[e]+"data/index/"+c.y+"/"+c.x+".bil?level="+w),u=d.getDerivedResource({url:p,request:s}).fetchArrayBuffer()}e$2b(u)&&(u.id=e,u.url=t,u.subRequest=s),a.push(u)}(_)}if(u)break}}if(!(a.indexOf(void 0)>-1))return this._hasNormalBuffer=!0,o$1l.allSettled(a,(function(n){if(!(n.length<1)){for(var r=[],o=0;o<n.length;o++){var u=n[o];if(e$2b(u)){if(e$2b(u.buffer)&&(u=u.buffer),0!==i){if(f._isBlock&&e$2b(f._packingRequest)&&f._packingRequest===X$N.QuadKey)!e$2b(a[o].subRequest.quadKeyIndex)&&e$2b(a[o].subRequest.blockRequest)&&(a[o].subRequest.quadKeyIndex=a[o].subRequest.blockRequest.quadKeyIndex),e$2b(a[o].subRequest.quadKeyIndex)&&(u=Me$j(u,a[o].subRequest.quadKeyIndex),u=new Uint8Array(u).buffer),e$2b(c=f.blockCache[a[o].subRequest.quadKey])||(c=new e$1b(f,a[o].subRequest.quadKey,u),f.blockCache[a[o].subRequest.quadKey+"_"+a[o].subRequest.providerName]=c),f.blockCacheQueue.touch(c),f.blockCacheQueue.trim(f.blockCacheSize),u=We$g(u,a[o].subRequest.blockInfo);else if(e$2b(f._packingRequest)&&f._packingRequest===X$N.QuadKey)u=Me$j(u,a[o].subRequest.quadKeyIndex);else if(f._isBlock){var c;e$2b(c=f.blockCache[a[o].subRequest.quadKey])||(c=new e$1b(f,a[o].subRequest.quadKey,u),f.blockCache[a[o].subRequest.quadKey+"_"+a[o].subRequest.providerName]=c),f.blockCacheQueue.touch(c),f.blockCacheQueue.trim(f.blockCacheSize),u=We$g(u,a[o].subRequest.blockInfo)}if(!e$2b(u)){if(0===o&&n.length>1){var h=i+"_"+e+"_"+t;if(1!=(g=l._combiInfo[h])[o+1].width)return void delete l._combiInfo[h]}continue}}var d,p;if(2===(d="ZIP"===l._compressType?nt$9.inflate(u).buffer:u).byteLength/(l._heightmapWidth*l._heightmapHeight)){var _=new Int16Array(d,0,l._heightmapWidth*l._heightmapHeight);p=[];for(var m=0;m<_.length;m++)p.push(parseFloat(_[m]))}else p=new Float32Array(d,0,l._heightmapWidth*l._heightmapHeight);r.push(p)}else r.push(void 0)}h=i+"_"+e+"_"+t;var g=l._combiInfo[h];if(delete l._combiInfo[h],r.length>1)for(o=0;o<r.length;o++)if(e$2b(r[o])&&(0!=g[o].srcX||0!=g[o].srcY||1!=g[o].width)){_=l.division(r[o],g[o].srcX,g[o].srcY,g[o].width,l._heightmapWidth);r[o]=_}var x=[{},{},{},{}];for(o=0;o<r.length;o++)if(e$2b(r[o])){var v=g[o].dataName,y=-1,$=-1,b=-1,T=-1;y=0==r[o][0]?2:1,$=0==r[o][l._heightmapWidth-1]?2:1,b=0==r[o][(l._heightmapHeight-1)*l._heightmapWidth]?2:1,T=0==r[o][l._heightmapHeight*l._heightmapWidth-1]?2:1;for(var C=.5*l._heightmapWidth,S=.5*l._heightmapHeight,w=0;w<r[o].length;w++){var E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E<S&&P<C){var A=r[o][w];if(1===y){if(0==A){y=3;break}}else if(0!=A){y=3;break}}}x[0][v]=y;for(w=0;w<r[o].length;w++){E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E<S&&P>=C){A=r[o][w];if(1===$){if(0==A){$=3;break}}else if(0!=A){$=3;break}}}x[1][v]=$;for(w=0;w<r[o].length;w++){E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E>=S&&P<C){A=r[o][w];if(1===b){if(0==A){b=3;break}}else if(0!=A){b=3;break}}}x[2][v]=b;for(w=0;w<r[o].length;w++){E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E>=S&&P>=C){A=r[o][w];if(1===T){if(0==A){T=3;break}}else if(0!=A){T=3;break}}}if(x[3][v]=T,1===y&&1===$&&1===b&&1===T)break}var L=[];for(o=0;o<r.length;o++)e$2b(r[o])&&L.push(r[o]);if(0!==L.length){var M=L[0];if(L.length>1)for(w=0;w<M.length;w++)if(0==M[w])for(o=1;o<L.length;o++)if(0!=L[o][w]){M[w]=L[o][w];break}var R=!1;for(o=0;o<M.length;o++)if(Math.abs(M[o])>e$2a.EPSILON3){R=!0;break}var O=l._heightmapWidth,I=l._heightmapHeight,D=void 0;return l._requestVertexNormals&&(D=Qe$9(M,O,I,s,i)),new T$J({buffer:M,width:O,height:I,skirtMode:l._isCreateSkirt,skirtScale:l._skirtScale,childTileMask:Ie$g(l,e,t,i),structure:l._terrainDataStructure,valid:R,childTileMaskExt:x,normalTexture:D,level:i,x:e,y:t})}}}),(function(e){return o$1l.reject(e)}))}},se$q.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var ue$s=new h$18;function Ie$g(e,t,i,n){for(var r=e._tilingScheme,o=r.tileXYToRectangle(t,i,n),a=0,s=0;s<e._rectangles.length;s++){var l=e._rectangles[s];e$2b(h$18.intersection(l,o,ue$s))&&(ge$l(r,l,2*t,2*i,n+1)&&(a|=4),ge$l(r,l,2*t+1,2*i,n+1)&&(a|=8),ge$l(r,l,2*t,2*i+1,n+1)&&(a|=1),ge$l(r,l,2*t+1,2*i+1,n+1)&&(a|=2))}return a}function ge$l(e,t,i,n,r){var o=e.tileXYToRectangle(i,n,r);return e$2b(h$18.intersection(o,t,ue$s))}se$q.prototype.getTileDataAvailable=function(e,t,i){if(0===i)return!0;for(var n=this._tilingScheme.tileXYToRectangle(e,t,i),r=0;r<this._rectangles.length;r++){if(e$2b(h$18.intersection(this._rectangles[r],n,ue$s))&&i>=this._levels[r][0]&&i<=this._levels[r][this._levels[r].length-1])return!0}return!1},se$q.prototype.loadTileDataAvailability=function(e,t,i){};var ot$7="attribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_Position = aPosition;\nv_textureCoordinates = textureCoordinates;\n}\n",da$1="uniform sampler2D u_LineTexture;\nuniform float u_texelOffset;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 maxValues = vec4(0.0);\nfloat halfCoreSize = float(CORESIZE) / 2.0;\nfor(int y = 0; y < CORESIZE; y++){\nfor(int x = 0; x < CORESIZE; x++){\nfloat offsetX = (-halfCoreSize + float(x)) * u_texelOffset;\nfloat offsetY = (-halfCoreSize + float(y)) * u_texelOffset;\nvec2 realTexCoord = v_textureCoordinates + vec2(offsetX, offsetY);\nif(realTexCoord.x > 1.0 || realTexCoord.x < 0.0 || realTexCoord.y > 1.0 || realTexCoord.y < 0.0){\ncontinue;\n}\nvec4 color = texture2D(u_LineTexture, realTexCoord);\nmaxValues = max(maxValues, color);\n}\n}\nif(maxValues.a < 0.01){\ndiscard;\n}\ngl_FragColor = maxValues;\n}\n",la$4="varying vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nvoid main()\n{\nvec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\nvec4 color = FxaaPixelShader(\nv_textureCoordinates,\ncolorTexture,\nfxaaQualityRcpFrame,\nfxaaQualitySubpix,\nfxaaQualityEdgeThreshold,\nfxaaQualityEdgeThresholdMin);\nfloat alpha = texture2D(colorTexture, v_textureCoordinates).a;\ngl_FragColor = vec4(color.rgb, alpha);\n}\n",k$I="#if (FXAA_QUALITY_PRESET == 10)\n#define FXAA_QUALITY_PS 3\n#define FXAA_QUALITY_P0 1.5\n#define FXAA_QUALITY_P1 3.0\n#define FXAA_QUALITY_P2 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 11)\n#define FXAA_QUALITY_PS 4\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 3.0\n#define FXAA_QUALITY_P3 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 12)\n#define FXAA_QUALITY_PS 5\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 4.0\n#define FXAA_QUALITY_P4 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 13)\n#define FXAA_QUALITY_PS 6\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 4.0\n#define FXAA_QUALITY_P5 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 14)\n#define FXAA_QUALITY_PS 7\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 4.0\n#define FXAA_QUALITY_P6 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 15)\n#define FXAA_QUALITY_PS 8\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 4.0\n#define FXAA_QUALITY_P7 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 20)\n#define FXAA_QUALITY_PS 3\n#define FXAA_QUALITY_P0 1.5\n#define FXAA_QUALITY_P1 2.0\n#define FXAA_QUALITY_P2 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 21)\n#define FXAA_QUALITY_PS 4\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 22)\n#define FXAA_QUALITY_PS 5\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 23)\n#define FXAA_QUALITY_PS 6\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 24)\n#define FXAA_QUALITY_PS 7\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 3.0\n#define FXAA_QUALITY_P6 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 25)\n#define FXAA_QUALITY_PS 8\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 4.0\n#define FXAA_QUALITY_P7 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 26)\n#define FXAA_QUALITY_PS 9\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 4.0\n#define FXAA_QUALITY_P8 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 27)\n#define FXAA_QUALITY_PS 10\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 4.0\n#define FXAA_QUALITY_P9 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 28)\n#define FXAA_QUALITY_PS 11\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 4.0\n#define FXAA_QUALITY_P10 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 29)\n#define FXAA_QUALITY_PS 12\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 2.0\n#define FXAA_QUALITY_P10 4.0\n#define FXAA_QUALITY_P11 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 39)\n#define FXAA_QUALITY_PS 12\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.0\n#define FXAA_QUALITY_P2 1.0\n#define FXAA_QUALITY_P3 1.0\n#define FXAA_QUALITY_P4 1.0\n#define FXAA_QUALITY_P5 1.5\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 2.0\n#define FXAA_QUALITY_P10 4.0\n#define FXAA_QUALITY_P11 8.0\n#endif\n#define FxaaBool bool\n#define FxaaFloat float\n#define FxaaFloat2 vec2\n#define FxaaFloat3 vec3\n#define FxaaFloat4 vec4\n#define FxaaHalf float\n#define FxaaHalf2 vec2\n#define FxaaHalf3 vec3\n#define FxaaHalf4 vec4\n#define FxaaInt2 vec2\n#define FxaaTex sampler2D\n#define FxaaSat(x) clamp(x, 0.0, 1.0)\n#define FxaaTexTop(t, p) texture2D(t, p)\n#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r))\nFxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }\nFxaaFloat4 FxaaPixelShader(\nFxaaFloat2 pos,\nFxaaTex tex,\nFxaaFloat2 fxaaQualityRcpFrame,\nFxaaFloat fxaaQualitySubpix,\nFxaaFloat fxaaQualityEdgeThreshold,\nFxaaFloat fxaaQualityEdgeThresholdMin\n) {\nFxaaFloat2 posM;\nposM.x = pos.x;\nposM.y = pos.y;\nFxaaFloat4 rgbyM = FxaaTexTop(tex, posM);\n#define lumaM rgbyM.y\nFxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));\nFxaaFloat maxSM = max(lumaS, lumaM);\nFxaaFloat minSM = min(lumaS, lumaM);\nFxaaFloat maxESM = max(lumaE, maxSM);\nFxaaFloat minESM = min(lumaE, minSM);\nFxaaFloat maxWN = max(lumaN, lumaW);\nFxaaFloat minWN = min(lumaN, lumaW);\nFxaaFloat rangeMax = max(maxWN, maxESM);\nFxaaFloat rangeMin = min(minWN, minESM);\nFxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\nFxaaFloat range = rangeMax - rangeMin;\nFxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\nFxaaBool earlyExit = range < rangeMaxClamped;\nif(earlyExit)\nreturn rgbyM;\nFxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaNS = lumaN + lumaS;\nFxaaFloat lumaWE = lumaW + lumaE;\nFxaaFloat subpixRcpRange = 1.0/range;\nFxaaFloat subpixNSWE = lumaNS + lumaWE;\nFxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\nFxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\nFxaaFloat lumaNESE = lumaNE + lumaSE;\nFxaaFloat lumaNWNE = lumaNW + lumaNE;\nFxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\nFxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\nFxaaFloat lumaNWSW = lumaNW + lumaSW;\nFxaaFloat lumaSWSE = lumaSW + lumaSE;\nFxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\nFxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\nFxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\nFxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\nFxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\nFxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;\nFxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;\nFxaaFloat lengthSign = fxaaQualityRcpFrame.x;\nFxaaBool horzSpan = edgeHorz >= edgeVert;\nFxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\nif(!horzSpan) lumaN = lumaW;\nif(!horzSpan) lumaS = lumaE;\nif(horzSpan) lengthSign = fxaaQualityRcpFrame.y;\nFxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;\nFxaaFloat gradientN = lumaN - lumaM;\nFxaaFloat gradientS = lumaS - lumaM;\nFxaaFloat lumaNN = lumaN + lumaM;\nFxaaFloat lumaSS = lumaS + lumaM;\nFxaaBool pairN = abs(gradientN) >= abs(gradientS);\nFxaaFloat gradient = max(abs(gradientN), abs(gradientS));\nif(pairN) lengthSign = -lengthSign;\nFxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);\nFxaaFloat2 posB;\nposB.x = posM.x;\nposB.y = posM.y;\nFxaaFloat2 offNP;\noffNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\noffNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\nif(!horzSpan) posB.x += lengthSign * 0.5;\nif( horzSpan) posB.y += lengthSign * 0.5;\nFxaaFloat2 posN;\nposN.x = posB.x - offNP.x * FXAA_QUALITY_P0;\nposN.y = posB.y - offNP.y * FXAA_QUALITY_P0;\nFxaaFloat2 posP;\nposP.x = posB.x + offNP.x * FXAA_QUALITY_P0;\nposP.y = posB.y + offNP.y * FXAA_QUALITY_P0;\nFxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;\nFxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));\nFxaaFloat subpixE = subpixC * subpixC;\nFxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));\nif(!pairN) lumaNN = lumaSS;\nFxaaFloat gradientScaled = gradient * 1.0/4.0;\nFxaaFloat lumaMM = lumaM - lumaNN * 0.5;\nFxaaFloat subpixF = subpixD * subpixE;\nFxaaBool lumaMLTZero = lumaMM < 0.0;\nlumaEndN -= lumaNN * 0.5;\nlumaEndP -= lumaNN * 0.5;\nFxaaBool doneN = abs(lumaEndN) >= gradientScaled;\nFxaaBool doneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;\nFxaaBool doneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;\n#if (FXAA_QUALITY_PS > 3)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;\n#if (FXAA_QUALITY_PS > 4)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;\n#if (FXAA_QUALITY_PS > 5)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;\n#if (FXAA_QUALITY_PS > 6)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;\n#if (FXAA_QUALITY_PS > 7)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;\n#if (FXAA_QUALITY_PS > 8)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;\n#if (FXAA_QUALITY_PS > 9)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;\n#if (FXAA_QUALITY_PS > 10)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;\n#if (FXAA_QUALITY_PS > 11)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;\n#if (FXAA_QUALITY_PS > 12)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\nFxaaFloat dstN = posM.x - posN.x;\nFxaaFloat dstP = posP.x - posM.x;\nif(!horzSpan) dstN = posM.y - posN.y;\nif(!horzSpan) dstP = posP.y - posM.y;\nFxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\nFxaaFloat spanLength = (dstP + dstN);\nFxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\nFxaaFloat spanLengthRcp = 1.0/spanLength;\nFxaaBool directionN = dstN < dstP;\nFxaaFloat dst = min(dstN, dstP);\nFxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;\nFxaaFloat subpixG = subpixF * subpixF;\nFxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\nFxaaFloat subpixH = subpixG * fxaaQualitySubpix;\nFxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\nFxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\nif(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;\nif( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;\nreturn FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);\n}\n";function a$I(e,t){o$1q.typeOf.object("normal",e),o$1q.typeOf.number("distance",t),this._distance=t,this._normal=new s$F(e,this),this.onChangeCallback=void 0,this.index=-1}function s$F(e,t){this._clippingPlane=t,this._cartesian3=o$1p.clone(e)}function h$K(e){e=u$_(e,u$_.EMPTY_OBJECT),this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=u$_(e.enabled,!0),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this.edgeColor=e$1U.clone(u$_(e.edgeColor,e$1U.WHITE)),this.edgeWidth=u$_(e.edgeWidth,0),this.planeAdded=new o$1h,this.planeRemoved=new o$1h,this._owner=void 0;var t=u$_(e.unionClippingRegions,!1);this._unionClippingRegions=t,this._testIntersection=t?C$P:P$K,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;var i=e.planes;if(e$2b(i))for(var n=i.length,r=0;r<n;++r)this.add(i[r])}function C$P(e){return e===Ae$u.OUTSIDE}function P$K(e){return e===Ae$u.INSIDE}function F$O(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||-1!==e._dirtyIndex&&e._dirtyIndex!==t,e._dirtyIndex=t}function D$M(e,t){for(var i=e.length,n=0;n<i;++n)if(o$1m.equals(e[n],t))return n;return-1}Object.defineProperties(a$I.prototype,{distance:{get:function(){return this._distance},set:function(e){o$1q.typeOf.number("value",e),e$2b(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){o$1q.typeOf.object("value",e),e$2b(this.onChangeCallback)&&!o$1p.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),o$1p.clone(e,this._normal._cartesian3)}}}),a$I.fromPlane=function(e,t){return o$1q.typeOf.object("plane",e),e$2b(t)?(t.normal=e.normal,t.distance=e.distance):t=new a$I(e.normal,e.distance),t},a$I.clone=function(e,t){return e$2b(t)?(t.normal=e.normal,t.distance=e.distance,t):new a$I(e.normal,e.distance)},Object.defineProperties(s$F.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){o$1q.typeOf.number("value",e),e$2b(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){o$1q.typeOf.number("value",e),e$2b(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){o$1q.typeOf.number("value",e),e$2b(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}}),Object.defineProperties(h$K.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?C$P:P$K)}},enabled:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e)}},texture:{get:function(){return this._clippingPlanesTexture}},owner:{get:function(){return this._owner}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}}),h$K.prototype.add=function(e){var t=this._planes.length,i=this;e.onChangeCallback=function(e){F$O(i,e)},e.index=t,F$O(this,t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)},h$K.prototype.get=function(e){return o$1q.typeOf.number("index",e),this._planes[e]},h$K.prototype.contains=function(e){return-1!==D$M(this._planes,e)},h$K.prototype.remove=function(e){var t=this._planes,i=D$M(t,e);if(-1===i)return!1;e instanceof a$I&&(e.onChangeCallback=void 0,e.index=-1);for(var n=t.length-1,r=i;r<n;++r){var o=t[r+1];t[r]=o,o instanceof a$I&&(o.index=r)}return this._multipleDirtyPlanes=!0,t.length=n,this.planeRemoved.raiseEvent(e,i),!0},h$K.prototype.removeAll=function(){for(var e=this._planes,t=e.length,i=0;i<t;++i){var n=e[i];n instanceof a$I&&(n.onChangeCallback=void 0,n.index=-1),this.planeRemoved.raiseEvent(n,i)}this._multipleDirtyPlanes=!0,this._planes=[]};var j$M=new e$29,k$H=new e$29;function V$D(e,t,i){for(var n=e._uint8View,r=e._planes,o=0,a=t;a<i;++a){var s=r[a],l=t$10.octEncodeToCartesian4(s.normal,k$H);n[o]=l.x,n[o+1]=l.y,n[o+2]=l.z,n[o+3]=l.w;var u=e$29.packFloat(s.distance,j$M);n[o+4]=u.x,n[o+5]=u.y,n[o+6]=u.z,n[o+7]=u.w,o+=8}}function M$P(e,t,i){for(var n=e._float32View,r=e._planes,o=0,a=t;a<i;++a){var s=r[a],l=s.normal;n[o]=l.x,n[o+1]=l.y,n[o+2]=l.z,n[o+3]=s.distance,o+=4}}function b$Y(e,t){var i=e$1T.maximumTextureSize;return t.x=Math.min(e,i),t.y=Math.ceil(e/t.x),t}var H$O=new o$1o;h$K.prototype.update=function(e){var t=this._clippingPlanesTexture,i=e.context,n=h$K.useFloatTexture(i),r=n?this.length:2*this.length;if(e$2b(t)){var o=t.width*t.height;(o<r||r<.25*o)&&(t.destroy(),t=void 0,this._clippingPlanesTexture=void 0)}if(0!==this.length){if(!e$2b(t)){var a=b$Y(r,H$O);a.y*=2;var s=new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST});n?(t=new t$V({context:i,width:a.x,height:a.y,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT,sampler:s,flipY:!1}),this._float32View=new Float32Array(a.x*a.y*4)):(t=new t$V({context:i,width:a.x,height:a.y,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:s,flipY:!1}),this._uint8View=new Uint8Array(a.x*a.y*4)),this._clippingPlanesTexture=t,this._multipleDirtyPlanes=!0}var l=this._dirtyIndex;if(this._multipleDirtyPlanes||-1!==l){if(this._multipleDirtyPlanes)n?(M$P(this,0,this._planes.length),t.copyFrom({width:t.width,height:t.height,arrayBufferView:this._float32View})):(V$D(this,0,this._planes.length),t.copyFrom({width:t.width,height:t.height,arrayBufferView:this._uint8View}));else{var u=0,c=0;n?(c=Math.floor(l/t.width),u=Math.floor(l-c*t.width),M$P(this,l,l+1),t.copyFrom({width:1,height:1,arrayBufferView:this._float32View},u,c)):(c=Math.floor(2*l/t.width),u=Math.floor(2*l-c*t.width),V$D(this,l,l+1),t.copyFrom({width:2,height:1,arrayBufferView:this._uint8View},u,c))}this._multipleDirtyPlanes=!1,this._dirtyIndex=-1}}};var J$F=new p$1d,S$H=new o$1m(o$1p.UNIT_X,0);h$K.prototype.computeIntersectionWithBoundingVolume=function(e,t){var i=this._planes,n=i.length,r=this.modelMatrix;e$2b(t)&&(r=p$1d.multiply(t,r,J$F));var o=Ae$u.INSIDE;!this.unionClippingRegions&&n>0&&(o=Ae$u.OUTSIDE);for(var a=0;a<n;++a){var s=i[a];o$1m.transform(s,r,S$H);var l=e.intersectPlane(S$H);if(l===Ae$u.INTERSECTING)o=l;else if(this._testIntersection(l))return l}return o},h$K.setOwner=function(e,t,i){if(e!==t[i]&&(t[i]=t[i]&&t[i].destroy(),e$2b(e))){if(e$2b(e._owner))throw new t$16("ClippingPlaneCollection should only be assigned to one object");e._owner=t,t[i]=e}},h$K.useFloatTexture=function(e){return e.floatingPointTexture},h$K.getTextureResolution=function(e,t,i){var n=e.texture;if(e$2b(n))return i.x=n.width,i.y=n.height,i;var r=b$Y(h$K.useFloatTexture(t)?e.length:2*e.length,i);return r.y*=2,r},h$K.prototype.isDestroyed=function(){return!1},h$K.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),i$10(this)};var e$13={START:0,LOADING:1,DONE:2,FAILED:3},re$z=Object.freeze(e$13),I$X={FAILED:0,UNLOADED:1,RECEIVING:2,UNZIP:3,UNZIPING:4,RECEIVED:5,TRANSFORMING:6,TRANSFORMED:7,READY:8,INVALID:9},Le$m=Object.freeze(I$X),Q$K=new i$1c,X$J=new i$1c,Z$I=new o$1p,$$L=new h$18;function Y$B(e,t){var i=e._ellipsoid,n=t.height,r=t.width,o=t.northCap,a=t.southCap,s=n,l=2,u=0,c=4;o&&(l-=1,s-=1,u+=1,c-=2),a&&(l-=1,s-=1,u+=1,c-=2),u+=l*r+2*s-c;var h,d=new Float64Array(3*u),f=0,p=0,_=Z$I;if(o)j$O.computePosition(t,i,!1,p,0,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;else for(h=0;h<r;h++)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(h=r-1,p=1;p<n;p++)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;if(p=n-1,!a)for(h=r-2;h>=0;h--)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(h=0,p=n-2;p>0;p--)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(var m=d.length/3*2,g=ce$x.createTypedArray(d.length/3,m),x=0,v=0;v<d.length/3-1;v++)g[x++]=v,g[x++]=v+1;g[x++]=d.length/3-1,g[x++]=0;var y=new I$1p({attributes:new a$_,primitiveType:W$18.LINES});return y.attributes.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:d}),y.indices=g,y}function G$V(e,t){var i=e._surfaceHeight,n=e._extrudedHeight,r=e._ellipsoid,o=n,a=i,s=Y$B(e,t),l=t.height,u=t.width,c=A$1g.scaleToGeodeticHeight(s.attributes.position.values,a,r,!1),h=c.length,d=new Float64Array(2*h);d.set(c);var f=A$1g.scaleToGeodeticHeight(s.attributes.position.values,o,r);d.set(f,h),s.attributes.position.values=d;var p=t.northCap,_=t.southCap,m=4;p&&(m-=1),_&&(m-=1);var g,x=2*(d.length/3+m),v=ce$x.createTypedArray(d.length/3,x);h=d.length/6;for(var y=0,$=0;$<h-1;$++)v[y++]=$,v[y++]=$+1,v[y++]=$+h,v[y++]=$+h+1;if(v[y++]=h-1,v[y++]=0,v[y++]=h+h-1,v[y++]=h,v[y++]=0,v[y++]=h,p)g=l-1;else{var b=u-1;v[y++]=b,v[y++]=b+h,g=u+l-2}if(v[y++]=g,v[y++]=g+h,!_){var T=u+g-1;v[y++]=T,v[y]=T+h}return s.indices=v,s}function k$G(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).rectangle,i=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),n=u$_(e.ellipsoid,t$13.WGS84),r=u$_(e.rotation,0);if(!e$2b(t))throw new t$16("rectangle is required.");if(h$18.validate(t),t.north<t.south)throw new t$16("options.rectangle.north must be greater than options.rectangle.south");var o=u$_(e.height,0),a=u$_(e.extrudedHeight,o);this._rectangle=h$18.clone(t),this._granularity=i,this._ellipsoid=n,this._surfaceHeight=Math.max(o,a),this._rotation=r,this._extrudedHeight=Math.min(o,a),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}k$G.packedLength=h$18.packedLength+t$13.packedLength+5,k$G.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),h$18.pack(e._rectangle,t,i),i+=h$18.packedLength,t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._extrudedHeight,t[i]=u$_(e._offsetAttribute,-1),t};var V$C=new h$18,J$E=t$13.clone(t$13.UNIT_SPHERE),D$L={rectangle:V$C,ellipsoid:J$E,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};k$G.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n=h$18.unpack(e,t,V$C);t+=h$18.packedLength;var r=t$13.unpack(e,t,J$E);t+=t$13.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t];return e$2b(i)?(i._rectangle=h$18.clone(n,i._rectangle),i._ellipsoid=t$13.clone(r,i._ellipsoid),i._surfaceHeight=a,i._rotation=s,i._extrudedHeight=l,i._offsetAttribute=-1===u?void 0:u,i):(D$L.granularity=o,D$L.height=a,D$L.rotation=s,D$L.extrudedHeight=l,D$L.offsetAttribute=-1===u?void 0:u,new k$G(D$L))};var I$W=new a$18;function y$K(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.rectangle",e.rectangle),this.rectangle=h$18.clone(e.rectangle),this.minimumHeight=u$_(e.minimumHeight,0),this.maximumHeight=u$_(e.maximumHeight,0),this.southwestCornerCartesian=new o$1p,this.northeastCornerCartesian=new o$1p,this.westNormal=new o$1p,this.southNormal=new o$1p,this.eastNormal=new o$1p,this.northNormal=new o$1p;var t=u$_(e.ellipsoid,t$13.WGS84);tt$b(this,e.rectangle,t),u$_(e.computeBoundingVolumes,!0)&&(this._orientedBoundingBox=y$Z.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,t),this._boundingSphere=i$1c.fromOrientedBoundingBox(this._orientedBoundingBox))}k$G.createGeometry=function(e){var t,i,n=e._rectangle,r=e._ellipsoid,o=j$O.computeOptions(n,e._granularity,e._rotation,0,$$L,I$W);if(!e$2a.equalsEpsilon(n.north,n.south,e$2a.EPSILON10)&&!e$2a.equalsEpsilon(n.east,n.west,e$2a.EPSILON10)){var a=e._surfaceHeight,s=e._extrudedHeight;if(!e$2a.equalsEpsilon(a,s,0,e$2a.EPSILON2)){if(t=G$V(e,o),e$2b(e._offsetAttribute)){var l=t.attributes.position.values.length/3,u=new Uint8Array(l);e._offsetAttribute===_0x58701d.TOP?u=d$1s(u,1,0,l/2):u=d$1s(u,e._offsetAttribute===_0x58701d.NONE?0:1),t.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}var c=i$1c.fromRectangle3D(n,r,a,X$J),h=i$1c.fromRectangle3D(n,r,s,Q$K);i=i$1c.union(c,h)}else{if((t=Y$B(e,o)).attributes.position.values=A$1g.scaleToGeodeticHeight(t.attributes.position.values,a,r,!1),e$2b(e._offsetAttribute)){var d=t.attributes.position.values.length,f=new Uint8Array(d/3);d$1s(f,e._offsetAttribute===_0x58701d.NONE?0:1),t.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}i=i$1c.fromRectangle3D(n,r,a)}return new I$1p({attributes:t.attributes,indices:t.indices,primitiveType:W$18.LINES,boundingSphere:i,offsetAttribute:e._offsetAttribute})}},Object.defineProperties(y$K.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});var z$I=new o$1p,M$O=new o$1p,E$N=new o$1p,$$K=new o$1p,F$N=new o$1p,B$J=new o$1p,o$O=new a$18,G$U=new o$1m(o$1p.UNIT_X,0),f$N=new f$17;function tt$b(e,t,i){i.cartographicToCartesian(h$18.southwest(t),e.southwestCornerCartesian),i.cartographicToCartesian(h$18.northeast(t),e.northeastCornerCartesian),o$O.longitude=t.west,o$O.latitude=.5*(t.south+t.north),o$O.height=0;var n=i.cartographicToCartesian(o$O,F$N),r=o$1p.cross(n,o$1p.UNIT_Z,z$I);o$1p.normalize(r,e.westNormal),o$O.longitude=t.east;var o=i.cartographicToCartesian(o$O,B$J),a=o$1p.cross(o$1p.UNIT_Z,o,z$I);o$1p.normalize(a,e.eastNormal);var s,l=o$1p.subtract(n,o,z$I),u=o$1p.normalize(l,$$K),c=t.south;if(c>0){o$O.longitude=.5*(t.west+t.east),o$O.latitude=c;var h=i.cartographicToCartesian(o$O,f$N.origin);o$1p.clone(u,f$N.direction);var d=o$1m.fromPointNormal(e.southwestCornerCartesian,e.westNormal,G$U);g$1h.rayPlane(f$N,d,e.southwestCornerCartesian),s=i.geodeticSurfaceNormal(h,M$O)}else s=i.geodeticSurfaceNormalCartographic(h$18.southeast(t),M$O);var f=o$1p.cross(s,l,E$N);o$1p.normalize(f,e.southNormal);var p,_=t.north;if(_<0){o$O.longitude=.5*(t.west+t.east),o$O.latitude=_;var m=i.cartographicToCartesian(o$O,f$N.origin);o$1p.negate(u,f$N.direction);var g=o$1m.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,G$U);g$1h.rayPlane(f$N,g,e.northeastCornerCartesian),p=i.geodeticSurfaceNormal(m,M$O)}else p=i.geodeticSurfaceNormalCartographic(h$18.northwest(t),M$O);var x=o$1p.cross(l,p,E$N);o$1p.normalize(x,e.northNormal)}var rt$c=new o$1p,et$b=new o$1p,it$6=new o$1p(0,-1,0),at$9=new o$1p(0,0,-1),Z$H=new o$1p;y$K.prototype.distanceToCamera=function(e){o$1q.defined("frameState",e);var t=e.camera,i=new o$1p,n=new a$18;if(e$2b(t._sensitivePosition)&&t._sensitivePositionRatio>0){var r=a$18.fromCartesian(t._sensitivePosition);n.latitude=r.latitude*t._sensitivePositionRatio+t.positionCartographic.latitude*(1-t._sensitivePositionRatio),n.longitude=r.longitude*t._sensitivePositionRatio+t.positionCartographic.longitude*(1-t._sensitivePositionRatio),n.height=t.positionCartographic.height,i=a$18.toCartesian(n)}else i=t.positionWC,n=t.positionCartographic;var o,a,s,l=0;if(!h$18.contains(this.rectangle,n)){var u=this.southwestCornerCartesian,c=this.northeastCornerCartesian,h=this.westNormal,d=this.southNormal,f=this.eastNormal,p=this.northNormal;e.mode!==C$13.SCENE3D&&((u=e.mapProjection.project(h$18.southwest(this.rectangle),rt$c)).z=u.y,u.y=u.x,u.x=0,(c=e.mapProjection.project(h$18.northeast(this.rectangle),et$b)).z=c.y,c.y=c.x,c.x=0,h=it$6,f=o$1p.UNIT_Y,d=at$9,p=o$1p.UNIT_Z);var _=o$1p.subtract(i,u,Z$H),m=o$1p.dot(_,h),g=o$1p.dot(_,d),x=o$1p.subtract(i,c,Z$H),v=o$1p.dot(x,f),y=o$1p.dot(x,p);m>0?l+=m*m:v>0&&(l+=v*v),g>0?l+=g*g:y>0&&(l+=y*y)}e.mode===C$13.SCENE3D?(o=n.height,a=this.minimumHeight,s=this.maximumHeight):(o=i.x,a=this.minimumHeight,s=this.maximumHeight);var $=0;if(o>s){var b=o-s;$=b*b}else if(o<a){var T=a-o;$=T*T}return l>t._sensitiveRegionRatio*$?l+=$:l=$,Math.sqrt(l)},y$K.prototype.intersectPlane=function(e){return o$1q.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)},y$K.prototype.createDebugVolume=function(e){o$1q.defined("color",e);var t=new p$1d.clone(p$1d.IDENTITY);return new y$S({geometryInstances:new d$1o({geometry:new k$G({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),id:"outline",modelMatrix:t,attributes:{color:o$16.fromColor(e)}}),appearance:new t$R({translucent:!1,flat:!0}),asynchronous:!1})};var d$10={};function p$O(e){if(!e$2b(e)||!e$2b(e.quantizedVertices))throw new t$16("options.quantizedVertices is required.");if(!e$2b(e.indices))throw new t$16("options.indices is required.");if(!e$2b(e.minimumHeight))throw new t$16("options.minimumHeight is required.");if(!e$2b(e.maximumHeight))throw new t$16("options.maximumHeight is required.");if(!e$2b(e.boundingSphere))throw new t$16("options.boundingSphere is required.");if(!e$2b(e.horizonOcclusionPoint))throw new t$16("options.horizonOcclusionPoint is required.");if(!e$2b(e.westIndices))throw new t$16("options.westIndices is required.");if(!e$2b(e.southIndices))throw new t$16("options.southIndices is required.");if(!e$2b(e.eastIndices))throw new t$16("options.eastIndices is required.");if(!e$2b(e.northIndices))throw new t$16("options.northIndices is required.");if(!e$2b(e.westSkirtHeight))throw new t$16("options.westSkirtHeight is required.");if(!e$2b(e.southSkirtHeight))throw new t$16("options.southSkirtHeight is required.");if(!e$2b(e.eastSkirtHeight))throw new t$16("options.eastSkirtHeight is required.");if(!e$2b(e.northSkirtHeight))throw new t$16("options.northSkirtHeight is required.");this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;var t=this._quantizedVertices.length/3,i=this._uValues=this._quantizedVertices.subarray(0,t),n=this._vValues=this._quantizedVertices.subarray(t,2*t);function r(e,t){return n[e]-n[t]}function o(e,t){return i[e]-i[t]}this._heightValues=this._quantizedVertices.subarray(2*t,3*t),this._westIndices=y$J(e.westIndices,r,t),this._southIndices=y$J(e.southIndices,o,t),this._eastIndices=y$J(e.eastIndices,r,t),this._northIndices=y$J(e.northIndices,o,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=u$_(e.childTileMask,15),this._createdByUpsampling=u$_(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0,this._normalTexture=e.normalTexture,this.invalid=u$_(e.invalid,!1),0===this._maximumHeight&&(this.invalid=!0),this.rasterIndex=e.rasterIndex,this.rasterVertex=e.rasterVertex,this.modelMatrix=e.modelMatrix,this.hasInvalid=e.hasInvalid,this._validMinimumHeight=e.validMinimumHeight,this._validMaximumHeight=e.validMaximumHeight,this._validOrientedBoundingBox=e.validOrientedBoundingBox}d$10.clipTriangleAtAxisAlignedThreshold=function(e,t,i,n,r,o){if(!e$2b(e))throw new t$16("threshold is required.");if(!e$2b(t))throw new t$16("keepAbove is required.");if(!e$2b(i))throw new t$16("u0 is required.");if(!e$2b(n))throw new t$16("u1 is required.");if(!e$2b(r))throw new t$16("u2 is required.");var a,s,l;e$2b(o)?o.length=0:o=[],t?(a=i<e,s=n<e,l=r<e):(a=i>e,s=n>e,l=r>e);var u,c,h,d,f,p,_=a+s+l;return 1===_?a?(u=(e-i)/(n-i),c=(e-i)/(r-i),o.push(1),o.push(2),1!==c&&(o.push(-1),o.push(0),o.push(2),o.push(c)),1!==u&&(o.push(-1),o.push(0),o.push(1),o.push(u))):s?(h=(e-n)/(r-n),d=(e-n)/(i-n),o.push(2),o.push(0),1!==d&&(o.push(-1),o.push(1),o.push(0),o.push(d)),1!==h&&(o.push(-1),o.push(1),o.push(2),o.push(h))):l&&(f=(e-r)/(i-r),p=(e-r)/(n-r),o.push(0),o.push(1),1!==p&&(o.push(-1),o.push(2),o.push(1),o.push(p)),1!==f&&(o.push(-1),o.push(2),o.push(0),o.push(f))):2===_?a||i===e?s||n===e?!l&&r!==e&&(c=(e-i)/(r-i),h=(e-n)/(r-n),o.push(2),o.push(-1),o.push(0),o.push(2),o.push(c),o.push(-1),o.push(1),o.push(2),o.push(h)):(p=(e-r)/(n-r),u=(e-i)/(n-i),o.push(1),o.push(-1),o.push(2),o.push(1),o.push(p),o.push(-1),o.push(0),o.push(1),o.push(u)):(d=(e-n)/(i-n),f=(e-r)/(i-r),o.push(0),o.push(-1),o.push(1),o.push(0),o.push(d),o.push(-1),o.push(2),o.push(0),o.push(f)):3!==_&&(o.push(0),o.push(1),o.push(2)),o},d$10.computeBarycentricCoordinates=function(e,t,i,n,r,o,a,s,l){if(!e$2b(e))throw new t$16("x is required.");if(!e$2b(t))throw new t$16("y is required.");if(!e$2b(i))throw new t$16("x1 is required.");if(!e$2b(n))throw new t$16("y1 is required.");if(!e$2b(r))throw new t$16("x2 is required.");if(!e$2b(o))throw new t$16("y2 is required.");if(!e$2b(a))throw new t$16("x3 is required.");if(!e$2b(s))throw new t$16("y3 is required.");var u=i-a,c=a-r,h=o-s,d=n-s,f=1/(h*u+c*d),p=t-s,_=e-a,m=(h*_+c*p)*f,g=(-d*_+u*p)*f,x=1-m-g;return e$2b(l)?(l.x=m,l.y=g,l.z=x,l):new o$1p(m,g,x)},d$10.computeLineSegmentLineSegmentIntersection=function(e,t,i,n,r,o,a,s,l){o$1q.typeOf.number("x00",e),o$1q.typeOf.number("y00",t),o$1q.typeOf.number("x01",i),o$1q.typeOf.number("y01",n),o$1q.typeOf.number("x10",r),o$1q.typeOf.number("y10",o),o$1q.typeOf.number("x11",a),o$1q.typeOf.number("y11",s);var u=(s-o)*(i-e)-(a-r)*(n-t);if(0!==u){var c=((a-r)*(t-o)-(s-o)*(e-r))/u,h=((i-e)*(t-o)-(n-t)*(e-r))/u;if(c>=0&&c<=1&&h>=0&&h<=1)return e$2b(l)||(l=new o$1o),l.x=e+c*(i-e),l.y=t+c*(n-t),l}},Object.defineProperties(p$O.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return e$2b(this._mesh)}},normalTexture:{get:function(){return this._normalTexture}}});var B$I=[];function y$J(e,t,i){B$I.length=e.length;for(var n=!1,r=0,o=e.length;r<o;++r)B$I[r]=e[r],n=n||r>0&&t(e[r-1],e[r])>0;return n?(B$I.sort(t),ce$x.createTypedArray(i,B$I)):e}var F$M=new i$V("createVerticesFromQuantizedTerrainMesh");p$O.prototype.createMesh=function(e,t,i,n,r){if(!e$2b(e))throw new t$16("tilingScheme is required.");if(!e$2b(t))throw new t$16("x is required.");if(!e$2b(i))throw new t$16("y is required.");if(!e$2b(n))throw new t$16("level is required.");var o=e.ellipsoid,a=e.tileXYToRectangle(t,i,n);r=u$_(r,1);var s=F$M.scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,validMinimumHeight:this._validMinimumHeight,validMaximumHeight:this._validMaximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:a,relativeToCenter:this._boundingSphere.center,ellipsoid:o,exaggeration:r,level:n});if(e$2b(s)){var l=this;return o$1l(s,(function(e){var t=l._quantizedVertices.length/3,i=t+l._westIndices.length+l._southIndices.length+l._eastIndices.length+l._northIndices.length,n=ce$x.createTypedArray(i,e.indices),o=new Float32Array(e.vertices),a=e.center,s=e.minimumHeight,u=e.maximumHeight,c=u$_(i$1c.clone(e.boundingSphere),l._boundingSphere),h=u$_(y$Z.clone(e.orientedBoundingBox),l._orientedBoundingBox),d=u$_(y$Z.clone(e.validOrientedBoundingBox),l._validOrientedBoundingBox),f=u$_(o$1p.clone(e.occludeePointInScaledSpace),l._horizonOcclusionPoint),p=e.vertexStride,_=h$L.clone(e.encoding),m=0===n.length||0===u||l.invalid;return l._mesh=new T$K(a,o,n,e.indexCountWithoutSkirts,t,s,u,c,f,p,h,_,r,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast,m,d),l._quantizedVertices=void 0,l._encodedNormals=void 0,l._indices=void 0,l._uValues=void 0,l._vValues=void 0,l._heightValues=void 0,l._westIndices=void 0,l._southIndices=void 0,l._eastIndices=void 0,l._northIndices=void 0,l._mesh}))}};var X$I=new i$V("upsampleQuantizedTerrainMesh");p$O.prototype.upsample=function(e,t,i,n,r,o,a){if(!e$2b(e))throw new t$16("tilingScheme is required.");if(!e$2b(t))throw new t$16("thisX is required.");if(!e$2b(i))throw new t$16("thisY is required.");if(!e$2b(n))throw new t$16("thisLevel is required.");if(!e$2b(r))throw new t$16("descendantX is required.");if(!e$2b(o))throw new t$16("descendantY is required.");if(!e$2b(a))throw new t$16("descendantLevel is required.");if(a-n>1)throw new t$16("Upsampling through more than one level at a time is not currently supported.");var s=this._mesh;if(e$2b(this._mesh)){var l=2*t!==r,u=2*i===o,c=e.ellipsoid,h=e.tileXYToRectangle(r,o,a),d=X$I.scheduleTask({vertices:s.vertices,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,validMinimumHeight:this._validMinimumHeight,validMaximumHeight:this._validMaximumHeight,isEastChild:l,isNorthChild:u,childRectangle:h,ellipsoid:c,exaggeration:s.exaggeration});if(e$2b(d)){var f=Math.min(this._westSkirtHeight,this._eastSkirtHeight);f=Math.min(f,this._southSkirtHeight),f=Math.min(f,this._northSkirtHeight);var p=l?.5*f:this._westSkirtHeight,_=u?.5*f:this._southSkirtHeight,m=l?this._eastSkirtHeight:.5*f,g=u?this._northSkirtHeight:.5*f,x=this._credits;return o$1l(d).then((function(e){var t,i=new Uint16Array(e.vertices),n=ce$x.createTypedArray(i.length/3,e.indices);if(e$2b(e.encodedNormals)&&(t=new Uint8Array(e.encodedNormals)),e$2b(e.horizonOcclusionPoint))return new p$O({quantizedVertices:i,indices:n,encodedNormals:t,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:i$1c.clone(e.boundingSphere),orientedBoundingBox:y$Z.clone(e.orientedBoundingBox),horizonOcclusionPoint:o$1p.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:p,southSkirtHeight:_,eastSkirtHeight:m,northSkirtHeight:g,childTileMask:0,credits:x,createdByUpsampling:!0,validMaximumHeight:e.validMaximumHeight,validMinimumHeight:e.validMinimumHeight,validOrientedBoundingBox:e.validOrientedBoundingBox})}))}}};var N$E=32767,E$M=new o$1p;function R$H(e,t,i,n,r,o,a,s){var l=Math.min(i,r,a),u=Math.max(i,r,a),c=Math.min(n,o,s),h=Math.max(n,o,s);return e>=l&&e<=u&&t>=c&&t<=h}p$O.prototype.interpolateHeight=function(e,t,i){var n=e$2a.clamp((t-e.west)/e.width,0,1),r=n*N$E,o=e$2a.clamp((i-e.south)/e.height,0,1),a=o*N$E;return e$2b(this._mesh)?J$D(this,n,o):K$H(this,r,a)};var Y$A=new o$1o,D$K=new o$1o,G$T=new o$1o;function J$D(e,t,i){for(var n=e._mesh,r=n.vertices,o=n.encoding,a=n.indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=o.decodeTextureCoordinates(r,u,Y$A),f=o.decodeTextureCoordinates(r,c,D$K),p=o.decodeTextureCoordinates(r,h,G$T);if(R$H(t,i,d.x,d.y,f.x,f.y,p.x,p.y)){var _=d$10.computeBarycentricCoordinates(t,i,d.x,d.y,f.x,f.y,p.x,p.y,E$M);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){var m=o.decodeHeight(r,u),g=o.decodeHeight(r,c),x=o.decodeHeight(r,h);return _.x*m+_.y*g+_.z*x}}}}function K$H(e,t,i){for(var n=e._uValues,r=e._vValues,o=e._heightValues,a=e._indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=n[u],f=n[c],p=n[h],_=r[u],m=r[c],g=r[h];if(R$H(t,i,d,_,f,m,p,g)){var x=d$10.computeBarycentricCoordinates(t,i,d,_,f,m,p,g,E$M);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){var v=x.x*o[u]+x.y*o[c]+x.z*o[h];return e$2a.lerp(e._minimumHeight,e._maximumHeight,v/N$E)}}}}p$O.prototype.isChildAvailable=function(e,t,i,n){if(!e$2b(e))throw new t$16("thisX is required.");if(!e$2b(t))throw new t$16("thisY is required.");if(!e$2b(i))throw new t$16("childX is required.");if(!e$2b(n))throw new t$16("childY is required.");var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},p$O.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var D$J={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=D$J.RENDERED_AND_KICKED},originalResult:function(e){return 3&e},kick:function(e){return 4|e}},w$J=32767,P$J=w$J/2|0,ie$w=new o$1p,ot$6=new o$1p,ht$5=new o$1p,h$J=new a$18,qe$9=new o$1o,dt$7=[],Ge$b=[],ut$7=[],ft$5=[],ct$5=[],vt$7=[],gt$5=[],lt$2=new o$1p,mt$3=new i$1c,pt$6=new y$Z,It$6=new o$1o;function Ne$g(){}function wt$5(e){var t,i=e.length,n=0;for(t=0;t<i;t++){n+=(s=e[t]).indices.length}var r=new Uint16Array(n),o=0,a=0;for(t=0;t<i;t++){for(var s,l=(s=e[t]).indices.length,u=0;u<l;u++)r[o+u]=s.indices[u]+a;o+=l,a+=s.attributes.position.values.length/3}return r}function Be$g(e,t){var i;return"function"==typeof e.slice&&("function"!=typeof(i=e.slice()).sort&&(i=void 0)),e$2b(i)||(i=Array.prototype.slice.call(e)),i.sort(t),i}function Ae$k(e,t,i,n,r,o,a,s,l,u,c){var h=s.north,d=s.south,f=s.east,p=s.west;f<p&&(f+=e$2a.TWO_PI);for(var _=i.length,m=0;m<_;++m){var g=i[m],x=r[g],v=o[g];h$J.longitude=e$2a.lerp(p,f,v.x)+u,h$J.latitude=e$2a.lerp(d,h,v.y)+c,h$J.height=x-l;var y=a.cartographicToCartesian(h$J,ie$w);t=n.encode(e,t,y,v,h$J.height,qe$9,0)}}function x$R(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}x$R.prototype.clone=function(e){return e$2b(e)||(e=new x$R),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},x$R.prototype.initializeIndexed=function(e,t,i,n){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=i,this.index=n,this.first=void 0,this.second=void 0,this.ratio=void 0},x$R.prototype.initializeFromClipResult=function(e,t,i){var n=t+1;return-1!==e[t]?i[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=i[e[n]],++n,this.second=i[e[n]],++n,this.ratio=e[n],++n),n},x$R.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},x$R.prototype.isIndexed=function(){return e$2b(this.index)},x$R.prototype.getH=function(){return e$2b(this.index)?this.heightBuffer[this.index]:e$2a.lerp(this.first.getH(),this.second.getH(),this.ratio)},x$R.prototype.getU=function(){return e$2b(this.index)?this.uBuffer[this.index]:e$2a.lerp(this.first.getU(),this.second.getU(),this.ratio)},x$R.prototype.getV=function(){return e$2b(this.index)?this.vBuffer[this.index]:e$2a.lerp(this.first.getV(),this.second.getV(),this.ratio)};var N$D=[];function We$f(e,t,i,n,r,o,a){if(0!==o.length){for(var s=0,l=0;l<o.length;)l=N$D[s++].initializeFromClipResult(o,l,a);for(var u=0;u<s;++u){var c=N$D[u];if(c.isIndexed())c.newIndex=r[c.index],c.uBuffer=e,c.vBuffer=t,c.heightBuffer=i;else{var h=c.getKey();if(e$2b(r[h]))c.newIndex=r[h];else{var d=e.length;e.push(c.getU()),t.push(c.getV()),i.push(c.getH()),c.newIndex=d,r[h]=d}}}3===s?(n.push(N$D[0].newIndex),n.push(N$D[1].newIndex),n.push(N$D[2].newIndex)):4===s&&(n.push(N$D[0].newIndex),n.push(N$D[1].newIndex),n.push(N$D[2].newIndex),n.push(N$D[0].newIndex),n.push(N$D[2].newIndex),n.push(N$D[3].newIndex))}}N$D.push(new x$R),N$D.push(new x$R),N$D.push(new x$R),N$D.push(new x$R),Ne$g.createTerrainMesh=function(e,t){var i=e.tilingScheme.ellipsoid,n=e.rectangle,r=t._quantizedVertices,o=r.length/3,a=t._westIndices.length+t._eastIndices.length+t._southIndices.length+t._northIndices.length,s=n.west,l=n.south,u=n.east,c=n.north,h=1*t._minimumHeight,d=1*t._maximumHeight,f=t$O.geodeticLatitudeToMercatorAngle(l),p=1/(t$O.geodeticLatitudeToMercatorAngle(c)-f),_=t._boundingSphere.center,m=r.subarray(0,o),g=r.subarray(o,2*o),x=r.subarray(2*o,3*o),v=new Array(o),y=new Array(o),$=new Array(o),b=new Array(o),T=ot$6;T.x=Number.POSITIVE_INFINITY,T.y=Number.POSITIVE_INFINITY,T.z=Number.POSITIVE_INFINITY;var C=ht$5;C.x=Number.NEGATIVE_INFINITY,C.y=Number.NEGATIVE_INFINITY,C.z=Number.NEGATIVE_INFINITY;for(var S=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,E=Number.POSITIVE_INFINITY,P=Number.NEGATIVE_INFINITY,A=0;A<o;++A){var L,M;if(t.wasCreatedByUpsampling()){var R=m[A],O=g[A];L=R/w$J,M=O/w$J,h$J.longitude=e$2a.lerp(s,u,L),h$J.latitude=e$2a.lerp(l,c,M),h$J.height=x[A]}else h$J.longitude=m[A],h$J.latitude=g[A],h$J.height=x[A],L=(h$J.longitude-s)/n.width,M=(h$J.latitude-l)/n.height;S=Math.min(h$J.longitude,S),w=Math.max(h$J.longitude,w),E=Math.min(h$J.latitude,E),P=Math.max(h$J.latitude,P);var I=i.cartographicToCartesian(h$J);v[A]=new o$1o(L,M),y[A]=h$J.height,$[A]=I,b[A]=(t$O.geodeticLatitudeToMercatorAngle(h$J.latitude)-f)*p}var D,B,N=Be$g(t._westIndices,(function(e,t){return v[e].y-v[t].y})),F=Be$g(t._eastIndices,(function(e,t){return v[t].y-v[e].y})),U=Be$g(t._southIndices,(function(e,t){return v[t].x-v[e].x})),G=Be$g(t._northIndices,(function(e,t){return v[e].x-v[t].x}));B=i$1c.fromPoints($),D=y$Z.fromRectangle(n,h,d,i),_=o$1p.clone(B.center);var z=m$17.eastNorthUpToFixedFrame(_,i),V=p$1d.inverseTransformation(z,new p$1d);for(A=0;A<o;A++){I=$[A];p$1d.multiplyByPoint(V,I,ie$w),o$1p.minimumByComponent(ie$w,T,T),o$1p.maximumByComponent(ie$w,C,C)}for(var k=new h$L(new e$26(T,C,_),h,d,z,!1,!0),W=k.getStride(),H=new Float32Array(o*W+a*W),q=0,j=0;j<o;++j)q=k.encode(H,q,$[j],v[j],y[j],qe$9,b[j]);var Y=Math.max(0,2*(a-4)),X=t._indices.length+3*Y,K=ce$x.createTypedArray(o+a,X);K.set(t._indices,0);var Q=1e-4,Z=(w-S)*Q,J=(P-E)*Q,ee=-Z,te=Z,ie=J,ne=-J,re=o*W;Ae$k(H,re,N,k,y,v,i,n,t._westSkirtHeight,ee,0),Ae$k(H,re+=t._westIndices.length*W,U,k,y,v,i,n,t._southSkirtHeight,0,ne),Ae$k(H,re+=t._southIndices.length*W,F,k,y,v,i,n,t._eastSkirtHeight,te,0),Ae$k(H,re+=t._eastIndices.length*W,G,k,y,v,i,n,t._northSkirtHeight,0,ie),I$12.addSkirtIndices(N,U,F,G,o,K,t._indices.length,void 0);var oe=t._quantizedVertices.length/3,ae=oe+t._westIndices.length+t._southIndices.length+t._eastIndices.length+t._northIndices.length,se=ce$x.createTypedArray(ae,K.buffer),le=0===se.length;return t._mesh=new T$K(_,H,se,t._indices.length,oe,h,d,B,void 0,W,D,k,1,N,U,F,G,le),t._quantizedVertices=void 0,t._encodedNormals=void 0,t._indices=void 0,t._uValues=void 0,t._vValues=void 0,t._heightValues=void 0,t._westIndices=void 0,t._southIndices=void 0,t._eastIndices=void 0,t._northIndices=void 0,t._mesh},Ne$g.upsampleTerrainData=function(e){var t=e.parent;if(e$2b(t)&&e$2b(t.data)&&e$2b(t.data.modifyTerrainData)){var i=t.data.modifyTerrainData,n=t.x,r=t.y;t.level;var o=i._mesh;if(e$2b(o)){var a=2*n!==e.x,s=2*r===e.y,l=e.tilingScheme,u=l.ellipsoid,c=l.tileXYToRectangle(e.x,e.y,e.level),h=a?P$J:0,d=a?w$J:P$J,f=s?P$J:0,p=s?w$J:P$J,_=ft$5,m=ct$5,g=vt$7;_.length=0,m.length=0,g.length=0;var x=gt$5;x.length=0;var v={},y=o.vertices,$=o.indices;$=$.subarray(0,o.indexCountWithoutSkirts);var b=o.encoding,T=o.exaggeration,C=0,S=o.vertexCountWithoutSkirts;i._minimumHeight,i._maximumHeight;var w,E,P,A,L,M=new Array(S),R=new Array(S),O=new Array(S);for(E=0,P=0;E<S;++E,P+=2){var I=b.decodeTextureCoordinates(y,E,It$6);w=b.decodeHeight(y,E)/T,A=e$2a.clamp(I.x*w$J|0,0,w$J),L=e$2a.clamp(I.y*w$J|0,0,w$J),O[E]=w,A<20&&(A=0),L<20&&(L=0),w$J-A<20&&(A=w$J),w$J-L<20&&(L=w$J),M[E]=A,R[E]=L,(a&&A>=P$J||!a&&A<=P$J)&&(s&&L>=P$J||!s&&L<=P$J)&&(v[E]=C,_.push(A),m.push(L),g.push(O[E]),++C)}var D=[];D.push(new x$R),D.push(new x$R),D.push(new x$R);var B,N=[];for(N.push(new x$R),N.push(new x$R),N.push(new x$R),E=0;E<$.length;E+=3){var F=$[E],U=$[E+1],G=$[E+2],z=M[F],V=M[U],k=M[G];D[0].initializeIndexed(M,R,O,F),D[1].initializeIndexed(M,R,O,U),D[2].initializeIndexed(M,R,O,G);var W=d$10.clipTriangleAtAxisAlignedThreshold(P$J,a,z,V,k,dt$7);!((B=0)>=W.length)&&(!((B=N[0].initializeFromClipResult(W,B,D))>=W.length)&&(!((B=N[1].initializeFromClipResult(W,B,D))>=W.length)&&(B=N[2].initializeFromClipResult(W,B,D),We$f(_,m,g,x,v,d$10.clipTriangleAtAxisAlignedThreshold(P$J,s,N[0].getV(),N[1].getV(),N[2].getV(),Ge$b),N),B<W.length&&(N[2].clone(N[1]),N[2].initializeFromClipResult(W,B,D),We$f(_,m,g,x,v,d$10.clipTriangleAtAxisAlignedThreshold(P$J,s,N[0].getV(),N[1].getV(),N[2].getV(),Ge$b),N)))))}var H=a?-w$J:0,q=s?-w$J:0,j=[],Y=[],X=[],K=[],Q=Number.MAX_VALUE,Z=-Q,J=ut$7;J.length=0;var ee=c,te=ee.north,ie=ee.south,ne=ee.east,re=ee.west;for(ne<re&&(ne+=e$2a.TWO_PI),E=0;E<_.length;++E)(A=Math.round(_[E]))<=h?(j.push(E),A=0):A>=d?(X.push(E),A=w$J):A=2*A+H,_[E]=A,(L=Math.round(m[E]))<=f?(Y.push(E),L=0):L>=p?(K.push(E),L=w$J):L=2*L+q,m[E]=L,(w=g[E])<Q&&(Q=w),w>Z&&(Z=w),g[E]=w,h$J.longitude=e$2a.lerp(re,ne,A/w$J),h$J.latitude=e$2a.lerp(ie,te,L/w$J),h$J.height=w,u.cartographicToCartesian(h$J,ie$w),J.push(ie$w.x),J.push(ie$w.y),J.push(ie$w.z);var oe=i$1c.fromVertices(J,o$1p.ZERO,3,mt$3),ae=y$Z.fromRectangle(ee,Q,Z,u,pt$6),se=new s$G(u).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(oe.center,J,3,oe.center,Q,lt$2),le=new Float64Array(_.length+m.length+g.length);for(E=0;E<_.length;++E)le[E]=_[E];var ue=_.length;for(E=0;E<m.length;++E)le[ue+E]=m[E];for(ue+=m.length,E=0;E<g.length;++E)le[ue+E]=g[E];var ce=ce$x.createTypedArray(_.length,x),he=new Float64Array(le.buffer),de=ce$x.createTypedArray(he.length/3,ce.buffer),fe=Math.min(i._westSkirtHeight,i._eastSkirtHeight);fe=Math.min(fe,i._southSkirtHeight),fe=Math.min(fe,i._northSkirtHeight);var pe=a?.5*fe:i._westSkirtHeight,_e=s?.5*fe:i._southSkirtHeight,me=a?i._eastSkirtHeight:.5*fe,ge=s?i._northSkirtHeight:.5*fe,xe=i._credits;if(0!==he.length)return new p$O({quantizedVertices:he,indices:de,minimumHeight:Q,maximumHeight:Z,boundingSphere:oe,orientedBoundingBox:ae,horizonOcclusionPoint:se,westIndices:j,southIndices:Y,eastIndices:X,northIndices:K,westSkirtHeight:pe,southSkirtHeight:_e,eastSkirtHeight:me,northSkirtHeight:ge,childTileMask:0,credits:xe,createdByUpsampling:!0})}}},Ne$g.createTerrainData=function(e,t,i,n,r){var o=t.length;if(!(o<1)){e.data,e.rectangle;for(var a=[],s=0;s<o;s++){var l=t[s].attributes;a=a.concat(o$1p.unpackArray(l.position.values))}var u=a.length,c=new Float64Array(3*u);for(s=0;s<u;s++){var h=a[s];a$18.fromCartesian(h,void 0,h$J);var d=h$J.height;if(e$2b(r)){var f=yt$5(e,h$J);d=r+(f>0?f:0)}c[s]=h$J.longitude,c[u+s]=h$J.latitude,c[2*u+s]=d}return new p$O({quantizedVertices:c,indices:o>1?wt$5(t):t[0].indices,encodedNormals:void 0,minimumHeight:i,maximumHeight:n,boundingSphere:new i$1c,orientedBoundingBox:new y$Z,horizonOcclusionPoint:new o$1p,westIndices:[],southIndices:[],eastIndices:[],northIndices:[],westSkirtHeight:0,southSkirtHeight:0,eastSkirtHeight:0,northSkirtHeight:0,childTileMask:0,credits:void 0,createdByUpsampling:!1})}};var xt$5=new o$1p,Ke$9=new o$1p,St$3=new a$18,Tt$7=new f$17;function yt$5(e,t){if(!e$2b(t))throw new DeveloperError("cartographic is required");for(;e._lastSelectionResult===D$J.REFINED;)e=Ye$b(e.southwestChild,t)||Ye$b(e.southeastChild,t)||Ye$b(e.northwestChild,t)||e.northeastChild;if(e$2b(e.data)&&e$2b(e.data.renderedMesh)){var i=e.tilingScheme.ellipsoid,n=o$1p.fromRadians(t.longitude,t.latitude,0,i,xt$5),r=Tt$7,o=i.geodeticSurfaceNormal(n,r.direction);if(!e$2b(i.getSurfaceNormalIntersectionWithZAxis(n,11500,r.origin))){var a=Math.min(defaultValue(e.data.minimumHeight,0),-11500),s=o$1p.multiplyByScalar(o,Math.abs(a)+1,Ke$9);o$1p.subtract(n,s,r.origin)}if(e$2b(e.data.terrainData)&&e.data.terrainData instanceof p$O)return e.data.terrainData.interpolateHeight(e.rectangle,t.longitude,t.latitude);var l=e.data.pick(r,void 0,void 0,!1,Ke$9);if(e$2b(l))return i.cartesianToCartographic(l,St$3).height}}function Ye$b(e,t){return h$18.contains(e.rectangle,t)?e:void 0}function x$Q(e){this.terrainLayer=e,this.terrainData=void 0,this.vertexArray=void 0,this.terrainState=Le$m.UNLOADED,this.mesh=void 0,this.orientedBoundingBox=void 0,this.occludeePointInScaledSpace=new o$1p,this._rasterTerrainFBO=void 0,this._rasterTerrainTexture=void 0,this._rasterized=!1,this._rasterTextureSize=256}function $$J(e,t,i,n,r){function o(i){e.request=void 0,e$2b(i)?"cacheError"!==i?"cacheInvalid"!==i?(e.terrainData=i,e.terrainState=Le$m.RECEIVED,t._isTerrainZ&&0!==r&&(e.terrainState=Le$m.UNZIP,e.zipTerrainData=i,e.terrainData=void 0)):e.terrainState=Le$m.FAILED:s(!1):e.terrainState=Le$m.FAILED}function a(){if(e.request.state===W$1c.CANCELLED)return e.terrainData=void 0,e.terrainState=Le$m.UNLOADED,void(e.request=void 0);e.terrainState=Le$m.FAILED,e.request=void 0;var o="Failed to obtain terrain tile X: "+i+" Y: "+n+" Level: "+r+".";t._requestError=l$W.handleError(t._requestError,t,t.errorEvent,o,i,n,r,s)}function s(s){var l=new r$1b({throttle:!1,throttleByServer:!0,type:V$15.TERRAIN});l.cacheEnable=s,e.request=l;var u=t.requestTileGeometry(i,n,r,l);e$2b(u)?(e.terrainState=Le$m.RECEIVING,o$1l(u,o,a)):(e.terrainState=Le$m.UNLOADED,e.request=void 0)}s(!0)}function ee$r(e,t,i,n,r,o,a){var s=t.parent;if(s){var l=s.data.terrain[e.terrainLayer.terrainProvider.tablename];if(e$2b(l)){var u=l.terrainData,c=s.x,h=s.y,d=s.level;if(e$2b(u)){var f=u.upsample(n.tilingScheme,c,h,d,r,o,a);!e$2b(f)||(e.terrainState=Le$m.RECEIVING,o$1l(f,(function(t){if(e$2b(t)){var i=u.rasterVertex,n=u.rasterIndex,a=void 0,s=u.hasInvalid;if(e$2b(i)){var l=new p$1d(2,0,0,0,0,2,0,0,0,0,1,0,0,0,0,1);r%c==1&&(l[12]=-32767),o%h==0&&(l[13]=-32767),e$2b(u.modelMatrix)?(a=new p$1d,a=p$1d.multiply(l,u.modelMatrix,a)):a=l,t.rasterVertex=i,t.rasterIndex=n,t.modelMatrix=a,t.hasInvalid=s}e.terrainData=t,e.terrainState=Le$m.RECEIVED}else e.terrainState=Le$m.INVALID}),(function(){e.terrainState=Le$m.FAILED})))}}}else t.state=QuadtreeTileLoadState.FAILED}function re$y(e,t,i,n,r){var o=t.unzip(e.zipTerrainData.buffer);e$2b(o)&&(e.terrainState=Le$m.UNZIPING,o$1l(o,(function(i){if(!e$2b(i))return e.terrainState=Le$m.FAILED,e.zipTerrainData=void 0,void(e.terrainData=void 0);e.terrainState=Le$m.RECEIVED,e.terrainData=t.createTerrainData(e.zipTerrainData,i.data.buffer,!0),e.zipTerrainData=void 0}),(function(t){e.terrainState=Le$m.FAILED})))}function te$v(e,t,i,n,r,o){var a=i.tilingScheme,s=e.terrainData.createMesh(a,n,r,o,t.terrainExaggeration);!e$2b(s)||(e.terrainState=Le$m.TRANSFORMING,o$1l(s,(function(t){e.mesh=t,e.orientedBoundingBox=y$Z.clone(t.orientedBoundingBox,e.orientedBoundingBox),e.occludeePointInScaledSpace=o$1p.clone(t.occludeePointInScaledSpace,e.occludeePointInScaledSpace),e.terrainState=Le$m.TRANSFORMED}),(function(){e.terrainState=Le$m.FAILED})))}function R$G(){this.context=void 0,this.tileTerrain=void 0,this.mesh=void 0}x$Q.prototype.freeResources=function(){this._rasterTerrainTexture=this._rasterTerrainTexture&&!this._rasterTerrainTexture.isDestroyed()&&this._rasterTerrainTexture.destroy(),this._rasterTerrainFBO=this._rasterTerrainFBO&&!this._rasterTerrainFBO.isDestroyed()&&this._rasterTerrainFBO.destroy(),this._rasterTerrainFBO=void 0},Object.defineProperties(x$Q.prototype,{name:{get:function(){return this.terrainLayer.terrainProvider.tablename}}}),x$Q.prototype.processStateMachine=function(e,t){var i=this.terrainLayer.terrainProvider;if(i._ready){var n=e.parent;if(e$2b(n)&&e$2b(n.data)){var r=n.data.terrain[i.tablename];if(e$2b(r)&&this.terrainState===Le$m.FAILED)void 0!==r.terrainData&&!1!==r.terrainData.canUpsample||r.processStateMachine(n,t)}this.terrainState===Le$m.FAILED&&ee$r(this,e,t,i,e.x,e.y,e.level),this.terrainState===Le$m.UNLOADED&&$$J(this,i,e.x,e.y,e.level),this.terrainState===Le$m.UNZIP&&re$y(this,i,e.x,e.y,e.level),this.terrainState===Le$m.RECEIVED&&te$v(this,t,i,e.x,e.y,e.level),this.terrainState===Le$m.TRANSFORMED&&ae$q(t,this,t.context,i,e.x,e.y,e.level),this.terrainState,Le$m.INVALID}},R$G.prototype.set=function(e,t,i,n){this.context=e,this.tileTerrain=t,this.mesh=i,this.terrainProvider=n},R$G.prototype.execute=function(){var e=this.context,t=this.mesh,i=this.tileTerrain;!1===this.terrainProvider.isShowGlobe&&t.invalid?i.vertexArray=void 0:i.vertexArray=v$C._createVertexArrayForMesh(e,t)};var C$O=new R$G;function ae$q(e,t,i,n,r,o,a){C$O.set(i,t,t.mesh,n),e.jobScheduler.execute(C$O,2)&&(t.terrainState=Le$m.READY)}x$Q.prototype.createRealtimeRasterTerrainFBO=function(e){this._rasterTerrainTexture=new t$V({context:e.context,width:this._rasterTextureSize,height:this._rasterTextureSize,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}),this._rasterTerrainFBO=new t$W({context:e.context,colorTextures:[this._rasterTerrainTexture],destroyAttachments:!1})};var ie$v=new f$18(0,0,256,256);function v$C(){this.terrain={},this.imagery=[],this.gridImagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new e$29(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.orientedBoundingBox=void 0,this.boundingVolumeSourceTile=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new o$1p,this.tileTerrainOrientedBoundingBox=void 0,this.terrainState=Le$m.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new i$1c,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1,this.normalTexture=void 0,this.normalTextureTranslationAndScale=new e$29(0,0,1,1),this.modifyTerrainData=void 0,this.modifyTerrainMesh=void 0,this.modifyTerrainVertexArray=void 0,this.modifyOrientedBoundingBox=void 0,this.subDivisionMesh=void 0,this.subDivisionVertexArray=void 0,this.invalid=!1,this.invalidMesh=void 0,this.invalidOrientedBoundingBox=void 0,this.invalidOccludeePointInScaledSpace=void 0,this.invalidVertexArray=void 0,this.invalidTerrainData=void 0}function C$N(e,t,i,n,r,o){if(e.decodePosition(n,r,o),e$2b(t)&&t!==C$13.SCENE3D){var a=i.ellipsoid.cartesianToCartographic(o);i.project(a,o),o$1p.fromElements(o.z,o.x,o.y,o)}return o}x$Q.prototype.realtimeRasterValidTerrain=function(e,t,i){if(!(this._rasterized||i.level<2)&&e$2b(this.terrainData)){this._rasterized=!0;var n=void 0,r=void 0,o=p$1d.IDENTITY;if(e$2b(this.terrainData)){n=this.terrainData.rasterIndex,r=this.terrainData.rasterVertex;e$2b(this.terrainData.modelMatrix)&&(o=this.terrainData.modelMatrix)}if(!e$2b(r))return void(e$2b(this._rasterTerrainFBO)&&(i._clearCommand.framebuffer=this._rasterTerrainFBO,i._clearCommand.execute(e.context)));e$2b(this._rasterTerrainTexture)||this.createRealtimeRasterTerrainFBO(e);var a=t._rasterAAFBOs[0];i._clearCommand.framebuffer=a,i._clearCommand.execute(e.context),i._clearCommand.framebuffer=this._rasterTerrainFBO,i._clearCommand.execute(e.context);var s=i.setRasterValidTerrainCamera(i,e);if(e$2b(r)){var l=t$Y.createVertexBuffer({context:e.context,typedArray:r,usage:A$19.STATIC_DRAW}),u=t$Y.createIndexBuffer({context:e.context,typedArray:n,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.fromSizeInBytes(n.BYTES_PER_ELEMENT)});u.vertexArrayDestroyable=!1,u.referenceCount=1;var c,h=[{index:0,vertexBuffer:l,componentDatatype:S$12.SHORT,componentsPerAttribute:3,offsetInBytes:0,strideInBytes:3*S$12.getSizeInBytes(S$12.SHORT)}],d=new c$12({context:e.context,attributes:h,indexBuffer:u}),f=["attribute vec4 position;","void main()","{"," gl_Position = czm_modelViewProjection * vec4(position.xy, 0.0, 1.0);","}"].join("\n"),p=["void main()","{"," gl_FragColor = czm_packValue(0.0);","}"].join("\n"),_=new s$U({sources:[f]}),m=new s$U({sources:[p]});(c=new i$_).cull=!1,c.boundingVolume=new i$1c(o$1p.ZERO,65535),c.shaderProgram=r$13.fromCache({context:e.context,vertexShaderSource:_,fragmentShaderSource:m,attributeLocations:{position:0}}),c.modelMatrix=o,c.primitiveType=W$18.TRIANGLES,c.vertexArray=d,c.count=n.length,c.pass=2,c.renderState=d$1m.fromCache({viewport:ie$v}),c.framebuffer=this._rasterTerrainFBO,c.execute(e.context)}i.resetCamera(e,s)}},Object.defineProperties(v$C.prototype,{eligibleForUnloading:{get:function(){for(var e=this.terrainState,t=!(e===Le$m.RECEIVING||e===Le$m.TRANSFORMING),i=this.imagery,n=0,r=i.length;t&&n<r;++n){var o=i[n];t=!e$2b(o.loadingImagery)||o.loadingImagery.state!==wt$6.TRANSITIONING}return t}},renderedMesh:{get:function(){return e$2b(this.subDivisionVertexArray)?this.subDivisionMesh:e$2b(this.vertexArray)?this.mesh:e$2b(this.fill)?this.fill.mesh:void 0}}});var ae$p=new o$1p,te$u=new o$1p,ie$u=new o$1p;function ne$A(e,t,i,n){var r=t.getTileDataAvailable(e.x,e.y,e.level);if(!e$2b(r)&&e$2b(e.parent)){var o=e.parent,a=o.data;e$2b(a)&&e$2b(a.terrainData)&&(r=a.terrainData.isChildAvailable(o.x,o.y,e.x,e.y))}!1===r&&(e.data.terrainState=Le$m.FAILED);for(var s=0,l=n.length;s<l;++s){var u=n.get(s);u.show&&u._createTileImagerySkeletons(e,t)}}function oe$p(e){var t=void 0;return e$2b(e.parent)&&e$2b(e.parent._childTileMaskExt)&&(t=e.x%e.parent.x==0?e.y%e.parent.y==0?e.parent._childTileMaskExt[0]:e.parent._childTileMaskExt[2]:e.y%e.parent.y==0?e.parent._childTileMaskExt[1]:e.parent._childTileMaskExt[3]),t}function de$p(e,t,i,n,r,o){var a=e.data,s=e.parent,l=!1;for(var u in a.terrain)a.terrain[u].processStateMachine(e,t),a.terrain[u].terrainState===Le$m.FAILED&&(l=!0);if((a.terrainState===Le$m.FAILED||l)&&void 0!==s)if(void 0!==s.data&&void 0!==s.data.terrainData&&!1!==s.data.terrainData.canUpsample){if(l)for(var u in s.data.terrain)(!e$2b(s.data.terrain[u].terrainData)||0==s.data.terrain[u].terrainData.canUpsample)&&s.data.terrain[u].processStateMachine(s,t)}else v$C.processStateMachine(s,t,i,n,r,!0);if(a.terrainState===Le$m.FAILED&&se$p(a,e,t,i,e.x,e.y,e.level),a.terrainState===Le$m.UNLOADED){var c=oe$p(e);fe$m(a,i,e.x,e.y,e.level,c)}if(a.terrainState===Le$m.UNZIP&&ue$r(a,i,e.x,e.y,e.level),a.terrainState===Le$m.RECEIVED&&(e$2b(a.terrainData)&&(e._childTileMaskExt=a.terrainData._childTileMaskExt),e.showInvalid&&!a.invalid&&a.setShowInvalid(),he$l(a,t,i,e.x,e.y,e.level)),a.terrainState===Le$m.TRANSFORMED&&me$o(t,a,t.context,i,e.x,e.y,e.level,o),a.terrainState!==Le$m.INVALID){var h;if(a.terrainState>=Le$m.RECEIVED&&void 0===a.waterMaskTexture&&i.hasWaterMask)if(void 0!==a.terrainData.waterMask)ce$n(t.context,a);else e$2b(h=a._findAncestorTileWithTerrainData(e))&&e$2b(h.data.waterMaskTexture)&&(a.waterMaskTexture=h.data.waterMaskTexture,++a.waterMaskTexture.referenceCount,a._computeWaterMaskTranslationAndScale(e,h,a.waterMaskTranslationAndScale));if(a.terrainState>=Le$m.RECEIVED&&void 0===a.normalTexture&&i.hasNormalBuffer)if(void 0!==a.terrainData._normalTexture)xe$k(t.context,a);else e$2b(h=a._findAncestorTileWithTerrainData(e))&&e$2b(h.data.normalTexture)&&(a.normalTexture=h.data.normalTexture,++a.normalTexture.referenceCount,a._computeNormalTextureTranslationAndScale(e,h,a.normalTextureTranslationAndScale))}}function se$p(e,t,i,n,r,o,a){var s=t.parent;if(s){var l=s.data.terrainData,u=s.x,c=s.y,h=s.level;if(e$2b(l)){var d=l.upsample(n.tilingScheme,u,c,h,r,o,a);!e$2b(d)||(e.terrainState=Le$m.RECEIVING,o$1l(d,(function(t){if(e$2b(t)){e.terrainData=t;var i=s.data.invalidTerrainData;if(e$2b(i)){var l=i.upsample(n.tilingScheme,u,c,h,r,o,a);if(!e$2b(l))return void(e.terrainState=Le$m.FAILED);o$1l(l,(function(t){e$2b(t)?(e.invalidTerrainData=t,e.terrainState=Le$m.RECEIVED,e.invalid=s.data.invalid):e.terrainState=Le$m.INVALID}))}else e.terrainState=Le$m.RECEIVED,e.invalid=s.data.invalid}else e.terrainState=Le$m.INVALID}),(function(){e.terrainState=Le$m.FAILED})))}}else t.state=re$z.FAILED}function fe$m(e,t,i,n,r,o){function a(i){e.request=void 0,e$2b(i)?"cacheError"!==i?"cacheInvalid"!==i?(e.terrainData=i,e.terrainState=Le$m.RECEIVED,t._isTerrainZ&&0!==r&&(e.terrainState=Le$m.UNZIP,e.zipTerrainData=i,e.terrainData=void 0)):e.terrainState=Le$m.FAILED:l(!1):e.terrainState=Le$m.FAILED}function s(){if(e.request.state===W$1c.CANCELLED)return e.terrainData=void 0,e.terrainState=Le$m.UNLOADED,void(e.request=void 0);e.terrainState=Le$m.FAILED,e.request=void 0;var o="Failed to obtain terrain tile X: "+i+" Y: "+n+" Level: "+r+".";t._requestError=l$W.handleError(t._requestError,t,t.errorEvent,o,i,n,r,l)}function l(l){var u=new r$1b({throttle:!1,throttleByServer:!0,type:V$15.TERRAIN});u.cacheEnable=l,e.request=u;var c=t.requestTileGeometry(i,n,r,u,o);e$2b(c)?(e.terrainState=Le$m.RECEIVING,o$1l(c,a,s)):(e.terrainState=Le$m.UNLOADED,e.request=void 0)}l(!0)}function ue$r(e,t,i,n,r){var o=t.unzip(e.zipTerrainData.buffer);e$2b(o)&&(e.terrainState=Le$m.UNZIPING,o$1l(o,(function(i){if(!e$2b(i))return e.terrainState=Le$m.FAILED,e.zipTerrainData=void 0,void(e.terrainData=void 0);e.terrainState=Le$m.RECEIVED,e.terrainData=t.createTerrainData(e.zipTerrainData,i.data.buffer),t._invisibility&&(e.invalidTerrainData=new T$J({buffer:new Uint8Array(256),width:16,height:16,skirtMode:!0,valid:!1})),e.zipTerrainData=void 0}),(function(t){e.terrainState=Le$m.FAILED})))}function he$l(e,t,i,n,r,o){var a=i.tilingScheme,s=e.terrainData.createMesh(a,n,r,o,t.terrainExaggeration);!e$2b(s)||(e.terrainState=Le$m.TRANSFORMING,o$1l(s,(function(s){if(i._isSct&&i._extrudeTileBoundingBox&&i._levels[0]>12&&s.maximumHeight<1&&(s.maximumHeight=Math.max(i._maxHeight,s.maximumHeight)),e.mesh=s,e.orientedBoundingBox=y$Z.clone(s.orientedBoundingBox,e.orientedBoundingBox),e.occludeePointInScaledSpace=o$1p.clone(s.occludeePointInScaledSpace,e.occludeePointInScaledSpace),i._enablePrjArea&&(e$2b(s.validOrientedBoundingBox)?e.tileBoundingRegion._orientedBoundingBox=y$Z.clone(s.validOrientedBoundingBox,e.tileBoundingRegion._orientedBoundingBox):e.tileBoundingRegion._orientedBoundingBox=y$Z.clone(e.orientedBoundingBox,e.tileBoundingRegion._orientedBoundingBox),e.tileBoundingRegion._boundingSphere=i$1c.fromOrientedBoundingBox(e.tileBoundingRegion._orientedBoundingBox)),e$2b(e.invalidTerrainData)){var l=e.invalidTerrainData.createMesh(a,n,r,o,t.terrainExaggeration);if(!e$2b(l))return void(e.terrainState=Le$m.RECEIVED);o$1l(l,(function(t){e.invalidMesh=t,e.invalidOrientedBoundingBox=y$Z.clone(t.orientedBoundingBox,e.invalidOrientedBoundingBox),e.invalidOccludeePointInScaledSpace=o$1p.clone(t.occludeePointInScaledSpace,e.invalidOccludeePointInScaledSpace),e.terrainState=Le$m.TRANSFORMED}))}else e.terrainState=Le$m.TRANSFORMED}),(function(){e.terrainState=Le$m.FAILED})))}function b$X(){this.context=void 0,this.surfaceTile=void 0,this.mesh=void 0}v$C.prototype.pick=function(e,t,i,n,r){var o=this.renderedMesh;if(e$2b(o)){for(var a=o.vertices,s=o.indices,l=o.encoding,u=s.length,c=Number.MAX_VALUE,h=0;h<u;h+=3){var d=s[h],f=s[h+1],p=s[h+2],_=C$N(l,t,i,a,d,ae$p),m=C$N(l,t,i,a,f,te$u),g=C$N(l,t,i,a,p,ie$u),x=g$1h.rayTriangleParametric(e,_,m,g,n);e$2b(x)&&x<c&&x>=0&&(c=x)}return c!==Number.MAX_VALUE?f$17.getPoint(e,c,r):void 0}},v$C.prototype.freeResources=function(){e$2b(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),e$2b(this.normalTexture)&&(--this.normalTexture.referenceCount,0===this.normalTexture.referenceCount&&this.normalTexture.destroy(),this.normalTexture=void 0),this.terrainData=void 0,this.modifyTerrainData=void 0,this.terrainState=Le$m.UNLOADED,this.mesh=void 0,this.modifyTerrainMesh=void 0,this.subDivisionMesh=void 0,this.fill=this.fill&&this.fill.destroy();for(var e=this.imagery,t=0,i=e.length;t<i;++t)e[t].freeResources();for(var n in this.imagery.length=0,this.terrain)this.terrain[n].freeResources();this.terrain={};var r=this.gridImagery;for(t=0,i=r.length;t<i;++t)r[t].freeResources();this.gridImagery.length=0,this.freeVertexArray(),this.invalid=!1,this.invalidMesh=void 0,this.invalidOrientedBoundingBox=void 0,this.invalidOccludeePointInScaledSpace=void 0,this.invalidVertexArray=void 0,this.invalidTerrainData=void 0},v$C.prototype.freeVertexArray=function(){v$C._freeVertexArray(this.vertexArray),this.vertexArray=void 0,v$C._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0,v$C._freeVertexArray(this.modifyTerrainVertexArray),this.modifyTerrainVertexArray=void 0,v$C._freeVertexArray(this.subDivisionVertexArray),this.subDivisionVertexArray=void 0},v$C.initialize=function(e,t,i,n){var r=e.data;e$2b(r)||(r=e.data=new v$C),e.state===re$z.START&&(ne$A(e,t,i,n),e.state=re$z.LOADING)},v$C.processStateMachine=function(e,t,i,n,r,o,a){v$C.initialize(e,i,n,r);var s=e.data;if(e.state===re$z.LOADING&&de$p(e,t,i,n,r,o),!a||0==e.level){var l=e.renderable;e.renderable=e$2b(s.vertexArray)||!1===i.isShowGlobe&&e$2b(s.mesh)&&s.mesh.invalid;var u=s.terrainState===Le$m.READY;for(var c in s.terrain)if(s.terrain[c].terrainState!==Le$m.READY){u=!1;break}e.upsampledFromParent=e$2b(s.terrainData)&&s.terrainData.wasCreatedByUpsampling();var h=!0,d=r._maxDetailLevelOffset();if(d>0){var f=e.level-d;f=Math.max(0,f);for(var p=e.level,_=e;p>f&&e$2b(_);)e$2b(_=_.parent)&&(v$C.initialize(_,i,n,r),h=s.processImagery(_,i,t)&&h),p=_.level}var m=s.processImagery(e,i,t)&&h,g=s.processGridTile(e,t);if(u&&m&&g||s.terrainState===Le$m.INVALID){var x=e._loadedCallbacks,v={};for(var y in x)x.hasOwnProperty(y)&&(x[y](e)||(v[y]=x[y]));e._loadedCallbacks=v,e.state=re$z.DONE}l&&(e.renderable=!0)}},v$C.prototype.processImagery=function(e,t,i,n){var r,o,a=e.data,s=e.upsampledFromParent,l=!1,u=!0,c=a.imagery,h=!1,d=!1;for(r=0,o=c.length;r<o;++r){var f=c[r];if(!e$2b(f.loadingImagery)&&!e$2b(f.readyImagery)&&e$2b(f.imageryLayer)&&(f.loadingImagery=f.imageryLayer.getImageryFromCache(e.x,e.y,e.level),f.imageryLayer=void 0),e$2b(f.loadingImagery)){if(f.loadingImagery.state===wt$6.PLACEHOLDER){var p=f.loadingImagery.imageryLayer;if(p.imageryProvider.ready){f.freeResources(),c.splice(r,1),p._createTileImagerySkeletons(e,t,r),--r,o=c.length;continue}s=!1}var _,m=void 0;if(f.loadingImagery.imageryLayer._imageryProvider instanceof I$10&&(m=f.loadingImagery.imageryLayer._imageryProvider,h=!0),i.camera._scene._mvtVisibleControl){var g=i.camera._scene._mvtVisibleLevel;!e$2b(m)||e._level>i.camera._endLevel-g?(_=f.processStateMachine(e,i,n))&&e$2b(m)&&(d=!0):_=!0}else _=f.processStateMachine(e,i,n);u=u&&_,l=l||_||e$2b(f.readyImagery),s=s&&e$2b(f.loadingImagery)&&(f.loadingImagery.state===wt$6.FAILED||f.loadingImagery.state===wt$6.INVALID)}else s=!1}return(!h||d)&&(e._mvtLoaded=!0),e.upsampledFromParent=s,e.renderable=e.renderable&&(l||u),u},new h$18,b$X.prototype.set=function(e,t,i,n){this.context=e,this.surfaceTile=t,this.mesh=i,this.terrainProvider=n},b$X.prototype.execute=function(){var e=this.context,t=this.mesh,i=this.surfaceTile;!1===this.terrainProvider.isShowGlobe&&t.invalid?i.vertexArray=void 0:(i.vertexArray=v$C._createVertexArrayForMesh(e,t),e$2b(i.invalidMesh)&&(i.invalidVertexArray=v$C._createVertexArrayForMesh(e,i.invalidMesh)))};var H$N=new b$X;function me$o(e,t,i,n,r,o,a,s){H$N.set(i,t,t.mesh,n),e.jobScheduler.execute(H$N,2)&&(t.terrainState=Le$m.READY,t.fill=t.fill&&t.fill.destroy(s))}function ve$k(e){var t=e.cache.tile_waterMaskData;if(!e$2b(t)){var i=t$V.create({context:e,pixelFormat:e.webgpu?V$10.RED:V$10.LUMINANCE,pixelDatatype:_$$.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});i.referenceCount=1,t={allWaterTexture:i,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR}),destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function ce$n(e,t){var i,n=t.terrainData.waterMask,r=ve$k(e),o=n.length;if(1===o){if(0===n[0])return;i=r.allWaterTexture}else{var a=Math.sqrt(o);(i=t$V.create({context:e,pixelFormat:e.webgpu?V$10.RED:V$10.LUMINANCE,pixelDatatype:_$$.UNSIGNED_BYTE,source:{width:a,height:a,arrayBufferView:n},sampler:r.sampler,flipY:!1})).referenceCount=0}++i.referenceCount,t.waterMaskTexture=i,e$29.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}function le$s(e){var t=e.cache.tile_normalTextureData;if(!e$2b(t)){var i=new t$V({context:e,pixelFormat:e.webgpu?V$10.RGBA:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([0,0,255]),width:1,height:1}});i.referenceCount=1,t={allNormalTexture:i,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR}),destroy:function(){this.allNormalTexture.destroy()}},e.cache.tile_normalTextureData=t}return t}function xe$k(e,t){var i=t.normalTexture;if(e$2b(i)&&(--i.referenceCount,0===i.referenceCount&&i.destroy(),t.normalTexture=void 0),e$2b(t.terrainData)){var n=t.terrainData.normalTexture;if(e$2b(n)){var r,o=le$s(e),a=n.length/3,s=Math.sqrt(a);e.webgpu&&(n=V$10.RGBToRGBA(n,_$$.UNSIGNED_BYTE,s,s)),(r=new t$V({context:e,pixelFormat:e.webgpu?V$10.RGBA:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:o.sampler})).referenceCount=0,++r.referenceCount,t.normalTexture=r,e$29.fromElements(0,0,1,1,t.normalTextureTranslationAndScale)}}}function pe$p(e,t){for(var i=(t=e.data).modifyTerrainMesh.minimumHeight,n=t.modifyTerrainMesh.maximumHeight,r=t.mesh,o=e.parent;!e$2b(r)&&e$2b(o)&&e$2b(o.data);)r=(t=o.data).mesh,o=o.parent;if(!e$2b(r))return t.modifyTerrainMesh.orientedBoundingBox;var a=Math.min(r.minimumHeight,i),s=Math.max(r.maximumHeight,n);return y$Z.fromRectangle(e.rectangle,a,s)}function ge$k(e,t){var i=t.data;i.modifyTerrainVertexArray=v$C._createVertexArrayForMesh(e,i.modifyTerrainMesh),i.modifyOrientedBoundingBox=pe$p(t,i),t.isModified=!0}v$C.prototype.processGridTile=function(e,t,i){for(var n=!0,r=e.data.gridImagery,o=0;o<r.length;o++){var a=r[o]._processStateMachine(e,t,i);n=n&&a}return n},v$C._createVertexArrayForMesh=function(e,t){var i=t.vertices,n=t$Y.createVertexBuffer({context:e,typedArray:i,usage:A$19.STATIC_DRAW}),r=t.encoding.getAttributes(n),o=t.indices.indexBuffers||{},a=o[e.id];if(!e$2b(a)||a.isDestroyed()){var s=t.indices;(a=t$Y.createIndexBuffer({context:e,typedArray:s,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.fromSizeInBytes(s.BYTES_PER_ELEMENT)})).vertexArrayDestroyable=!1,a.referenceCount=1,o[e.id]=a,t.indices.indexBuffers=o}else++a.referenceCount;return new c$12({context:e,attributes:r,indexBuffer:a})},v$C._freeVertexArray=function(e){if(e$2b(e)){var t=e.indexBuffer;e.destroy(),e$2b(t)&&!t.isDestroyed()&&e$2b(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}},v$C.prototype._findAncestorTileWithTerrainData=function(e){for(var t=e.parent;e$2b(t)&&(!e$2b(t.data)||!e$2b(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t},v$C.prototype._computeWaterMaskTranslationAndScale=function(e,t,i){var n=t.rectangle,r=e.rectangle,o=r.width,a=r.height,s=o/n.width,l=a/n.height;return i.x=s*(r.west-n.west)/o,i.y=l*(r.south-n.south)/a,i.z=s,i.w=l,i},v$C.prototype._computeNormalTextureTranslationAndScale=function(e,t,i){var n=t.rectangle,r=e.rectangle,o=r.width,a=r.height,s=o/n.width,l=a/n.height;return i.x=s*(r.west-n.west)/o,i.y=l*(r.south-n.south)/a,i.z=s,i.w=l,i},v$C.prototype.createModifyVertexArray=function(e,t,i,n,r,o,a){var s;if(e$2b(this.modifyTerrainVertexArray)&&(this.modifyTerrainData=void 0,this.modifyTerrainMesh=void 0,this.modifyTerrainVertexArray=!this.modifyTerrainVertexArray.isDestroyed()&&this.modifyTerrainVertexArray.destroy()),e$2b(s=a?Ne$g.upsampleTerrainData(i):Ne$g.createTerrainData(i,n,r,o,t._extractExtendHeight))){this.modifyTerrainData=s,this.modifyTerrainMesh=Ne$g.createTerrainMesh(i,s),ge$k(e,i);var l=i._level+" "+i._x+i._y;t._modifyTilesMap[l]=i}},v$C.prototype.freeModifyResource=function(){v$C._freeVertexArray(this.modifyTerrainVertexArray),this.modifyTerrainVertexArray=void 0,v$C._freeVertexArray(this.subDivisionVertexArray),this.subDivisionVertexArray=void 0,this.modifyTerrainData=void 0,this.modifyOrientedBoundingBox=void 0,this.subDivisionMesh=void 0},v$C.prototype.setShowInvalid=function(e){if(this.invalid!==e){if(e$2b(this.vertexArray)&&e$2b(this.invalidVertexArray)){var t=this.invalidOrientedBoundingBox,i=this.invalidOccludeePointInScaledSpace,n=this.invalidVertexArray,r=this.invalidMesh,o=this.invalidTerrainData;this.invalidOrientedBoundingBox=this.orientedBoundingBox,this.invalidOccludeePointInScaledSpace=this.occludeePointInScaledSpace,this.invalidVertexArray=this.vertexArray,this.invalidMesh=this.mesh,this.invalidTerrainData=this.terrainData,this.orientedBoundingBox=t,this.occludeePointInScaledSpace=i,this.vertexArray=n,this.mesh=r,this.terrainData=o,this.invalid=e}else if(this.terrainState===Le$m.RECEIVED){if(e$2b(this.terrainData)&&e$2b(this.invalidTerrainData)){o=this.invalidTerrainData;this.invalidTerrainData=this.terrainData,this.terrainData=o,this.invalid=e}}else if(this.terrainState===Le$m.TRANSFORMED&&e$2b(this.mesh)&&e$2b(this.invalidMesh)){t=this.invalidOrientedBoundingBox,i=this.invalidOccludeePointInScaledSpace,r=this.invalidMesh,o=this.invalidTerrainData;this.invalidOrientedBoundingBox=this.orientedBoundingBox,this.invalidOccludeePointInScaledSpace=this.occludeePointInScaledSpace,this.invalidMesh=this.mesh,this.invalidTerrainData=this.terrainData,this.orientedBoundingBox=t,this.occludeePointInScaledSpace=i,this.mesh=r,this.terrainData=o,this.invalid=e}this.boundingVolumeSourceTile=void 0}};var T$I={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7};function Q$J(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new e$29}Q$J.prototype.update=function(e,t,i){this.changedThisFrame&&(Le$l(e,t,this.tile,i),this.changedThisFrame=!1)},Q$J.prototype.destroy=function(e){e$2b(this.vertexArray)&&(e$2b(e)?e.push(this.vertexArray):v$C._freeVertexArray(this.vertexArray,e),this.vertexArray=void 0),e$2b(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};var Qe$8=new r$16;function k$F(e,t,i,n,r,o,a,s,l){if(void 0!==n){for(var u=n;u&&(u._lastSelectionResultFrame!==r||D$J.wasKicked(u._lastSelectionResult)||D$J.originalResult(u._lastSelectionResult)===D$J.CULLED);){if(a)return;var c=u.parent;if(o>=T$I.NORTHWEST&&void 0!==c)switch(o){case T$I.NORTHWEST:u=u===c.northwestChild?c:void 0;break;case T$I.NORTHEAST:u=u===c.northeastChild?c:void 0;break;case T$I.SOUTHWEST:u=u===c.southwestChild?c:void 0;break;case T$I.SOUTHEAST:u=u===c.southeastChild?c:void 0}else u=c}if(void 0!==u){if(u._lastSelectionResult===D$J.RENDERED){if(e$2b(u.data.vertexArray))return;return void De$k(e,t,i,u,o,r,s,l)}if(D$J.originalResult(n._lastSelectionResult)!==D$J.CULLED)switch(o){case T$I.WEST:k$F(e,t,i,n.northwestChild,r,o,!0,s,l),k$F(e,t,i,n.southwestChild,r,o,!0,s,l);break;case T$I.EAST:k$F(e,t,i,n.southeastChild,r,o,!0,s,l),k$F(e,t,i,n.northeastChild,r,o,!0,s,l);break;case T$I.SOUTH:k$F(e,t,i,n.southwestChild,r,o,!0,s,l),k$F(e,t,i,n.southeastChild,r,o,!0,s,l);break;case T$I.NORTH:k$F(e,t,i,n.northeastChild,r,o,!0,s,l),k$F(e,t,i,n.northwestChild,r,o,!0,s,l);break;case T$I.NORTHWEST:k$F(e,t,i,n.northwestChild,r,o,!0,s,l);break;case T$I.NORTHEAST:k$F(e,t,i,n.northeastChild,r,o,!0,s,l);break;case T$I.SOUTHWEST:k$F(e,t,i,n.southwestChild,r,o,!0,s,l);break;case T$I.SOUTHEAST:k$F(e,t,i,n.southeastChild,r,o,!0,s,l);break;default:throw new t$16("Invalid edge")}}}}function De$k(e,t,i,n,r,o,a,s){var l=n.data;if(void 0===l.fill)l.fill=new Q$J(n);else if(l.fill.visitedFrame===o)return;l.fill.enqueuedFrame!==o&&(l.fill.enqueuedFrame=o,l.fill.changedThisFrame=!1,a.enqueue(n)),ye$h(e,t,i,n,r,s)}function ye$h(e,t,i,n,r,o){var a,s,l,u=n.data.fill,c=i.data.fill;switch(e$2b(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(Le$l(e,t,i,o),c.changedThisFrame=!1),a=i.data.fill.mesh):a=i.data.mesh,r){case T$I.WEST:s=u.westMeshes,l=u.westTiles;break;case T$I.SOUTH:s=u.southMeshes,l=u.southTiles;break;case T$I.EAST:s=u.eastMeshes,l=u.eastTiles;break;case T$I.NORTH:s=u.northMeshes,l=u.northTiles;break;case T$I.NORTHWEST:return u.changedThisFrame=u.changedThisFrame||u.northwestMesh!==a,u.northwestMesh=a,void(u.northwestTile=i);case T$I.NORTHEAST:return u.changedThisFrame=u.changedThisFrame||u.northeastMesh!==a,u.northeastMesh=a,void(u.northeastTile=i);case T$I.SOUTHWEST:return u.changedThisFrame=u.changedThisFrame||u.southwestMesh!==a,u.southwestMesh=a,void(u.southwestTile=i);case T$I.SOUTHEAST:return u.changedThisFrame=u.changedThisFrame||u.southeastMesh!==a,u.southeastMesh=a,void(u.southeastTile=i)}if(i.level<=n.level)return u.changedThisFrame=u.changedThisFrame||s[0]!==a||1!==s.length,s[0]=a,l[0]=i,s.length=1,void(l.length=1);var h,d,f,p,_=i.rectangle,m=n.rectangle;switch(r){case T$I.WEST:for(p=(m.north-m.south)*e$2a.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2a.greaterThan(_.north,f.south,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2a.greaterThanOrEquals(_.south,f.north,p));++d);break;case T$I.SOUTH:for(p=(m.east-m.west)*e$2a.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2a.lessThan(_.west,f.east,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2a.lessThanOrEquals(_.east,f.west,p));++d);break;case T$I.EAST:for(p=(m.north-m.south)*e$2a.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2a.lessThan(_.south,f.north,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2a.lessThanOrEquals(_.north,f.south,p));++d);break;case T$I.NORTH:for(p=(m.east-m.west)*e$2a.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2a.greaterThan(_.east,f.west,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2a.greaterThanOrEquals(_.west,f.east,p));++d);}d-h==1?(u.changedThisFrame=u.changedThisFrame||s[h]!==a,s[h]=a,l[h]=i):(u.changedThisFrame=!0,s.splice(h,d-h,a),l.splice(h,d-h,i))}Q$J.updateFillTiles=function(e,t,i,n){var r=e._quadtree,o=r._levelZeroTiles,a=r._lastSelectionFrameNumber,s=Qe$8;s.clear();for(var l=0;l<t.length;++l){e$2b(t[l].data.vertexArray)&&s.enqueue(t[l])}for(var u=s.dequeue();void 0!==u;){var c=u.findTileToWest(o),h=u.findTileToSouth(o),d=u.findTileToEast(o),f=u.findTileToNorth(o);k$F(e,i,u,c,a,T$I.EAST,!1,s,n),k$F(e,i,u,h,a,T$I.NORTH,!1,s,n),k$F(e,i,u,d,a,T$I.WEST,!1,s,n),k$F(e,i,u,f,a,T$I.SOUTH,!1,s,n);var p=c.findTileToNorth(o),_=c.findTileToSouth(o),m=d.findTileToNorth(o),g=d.findTileToSouth(o);k$F(e,i,u,p,a,T$I.SOUTHEAST,!1,s,n),k$F(e,i,u,m,a,T$I.SOUTHWEST,!1,s,n),k$F(e,i,u,_,a,T$I.NORTHEAST,!1,s,n),k$F(e,i,u,g,a,T$I.NORTHWEST,!1,s,n),u=s.dequeue()}};var G$S=new a$18,xe$j=new a$18,$$I=new o$1p,ke$9=new o$1p,de$o=new o$1o,Te$i=new o$1o,C$M=new o$1o;function re$x(){this.height=0,this.encodedNormal=new o$1o}function he$k(e,t,i,n,r,o,a,s,l){if(e$2b(r))return r;var u;if(e$2b(o)&&e$2b(a))u=.5*(o.height+a.height);else if(e$2b(o))u=o.height;else if(e$2b(a))u=a.height;else if(e$2b(s))u=s.height;else{var c=e.tile.data.tileBoundingRegion,h=0,d=0;e$2b(c)&&(h=c.minimumHeight,d=c.maximumHeight),u=.5*(h+d)}return Ce$g(e,t,i,n,u,l),l}var et$a={minimumHeight:0,maximumHeight:0},pe$o=new re$x,We$e=new re$x,be$n=new re$x,Ue$e=new re$x,tt$a=typeof Uint8Array<"u"?new Uint8Array(81):void 0;function Le$l(e,t,i,n){v$C.initialize(i,e.terrainProvider,e._terrainLayers,e._imageryLayers);var r=i.data,o=r.fill,a=i.rectangle,s=i.tilingScheme.ellipsoid,l=ne$z(o,s,0,1,o.northwestTile,o.northwestMesh,o.northTiles,o.northMeshes,o.westTiles,o.westMeshes,be$n),u=ne$z(o,s,0,0,o.southwestTile,o.southwestMesh,o.westTiles,o.westMeshes,o.southTiles,o.southMeshes,pe$o),c=ne$z(o,s,1,0,o.southeastTile,o.southeastMesh,o.southTiles,o.southMeshes,o.eastTiles,o.eastMeshes,We$e),h=ne$z(o,s,1,1,o.northeastTile,o.northeastMesh,o.eastTiles,o.eastMeshes,o.northTiles,o.northMeshes,Ue$e);l=he$k(o,s,0,1,l,u,h,c,be$n),u=he$k(o,s,0,0,u,l,c,h,pe$o),c=he$k(o,s,1,1,c,u,h,l,We$e),h=he$k(o,s,1,1,h,c,l,u,Ue$e);var d,f,p=u.height,_=c.height,m=l.height,g=h.height,x=Math.min(p,_,m,g),v=Math.max(p,_,m,g),y=.5*(x+v),$=e.getLevelMaximumGeometricError(i.level),b=s.maximumRadius-$,T=4*Math.acos(b/s.maximumRadius);if(T*=1.5,a.width>T&&v-x<=$){var C=new T$J({width:9,height:9,buffer:tt$a,structure:{heightOffset:v}});o.mesh=C._createMeshSync(i.tilingScheme,i.x,i.y,i.level,1)}else{var S=new h$L(void 0,void 0,void 0,void 0,!0,!0),w=xe$j;w.longitude=.5*(a.east+a.west),w.latitude=.5*(a.north+a.south),w.height=y,S.center=s.cartographicToCartesian(w,S.center);var E,P=5;for(d=0,f=(E=o.westMeshes).length;d<f;++d)e$2b(E[d])&&(P+=E[d].eastIndicesNorthToSouth.length);for(d=0,f=(E=o.southMeshes).length;d<f;++d)e$2b(E[d])&&(P+=E[d].northIndicesWestToEast.length);for(d=0,f=(E=o.eastMeshes).length;d<f;++d)e$2b(E[d])&&(P+=E[d].westIndicesSouthToNorth.length);for(d=0,f=(E=o.northMeshes).length;d<f;++d)e$2b(E[d])&&(P+=E[d].southIndicesEastToWest.length);var A=et$a;A.minimumHeight=x,A.maximumHeight=v;var L=S.getStride(),M=new Float32Array(P*L),R=0,O=R;e$2b(l.height)&&!isNaN(l.height)&&(R=ce$m(o,s,S,M,R=ie$t(s,a,S,M,R,0,1,l.height,l.encodedNormal,1,A),o.westTiles,o.westMeshes,T$I.EAST,A));var I=R;e$2b(u.height)&&!isNaN(u.height)&&(R=ce$m(o,s,S,M,R=ie$t(s,a,S,M,R,0,0,u.height,u.encodedNormal,0,A),o.southTiles,o.southMeshes,T$I.NORTH,A));var D=R;e$2b(c.height)&&!isNaN(c.height)&&(R=ce$m(o,s,S,M,R=ie$t(s,a,S,M,R,1,0,c.height,c.encodedNormal,0,A),o.eastTiles,o.eastMeshes,T$I.WEST,A));var B=R;e$2b(h.height)&&!isNaN(h.height)&&(R=ce$m(o,s,S,M,R=ie$t(s,a,S,M,R,1,1,h.height,h.encodedNormal,1,A),o.northTiles,o.northMeshes,T$I.SOUTH,A)),x=isNaN(A.minimumHeight)?0:A.minimumHeight,v=isNaN(A.maximumHeight)?0:A.maximumHeight;var N=y$Z.fromRectangle(a,x,v,i.tilingScheme.ellipsoid),F=t$O.geodeticLatitudeToMercatorAngle(a.south),U=1/(t$O.geodeticLatitudeToMercatorAngle(a.north)-F),G=(t$O.geodeticLatitudeToMercatorAngle(w.latitude)-F)*U;s.geodeticSurfaceNormalCartographic(G$S,ke$9);var z=t$10.octEncode(ke$9,de$o),V=R;S.encode(M,R*L,N.center,o$1o.fromElements(.5,.5,C$M),y,z,G);var k,W=++R,H=3*(W-1),q=H*(W<256?1:2);if((M.length-W*L)*Float32Array.BYTES_PER_ELEMENT>=q){var j=W*L*Float32Array.BYTES_PER_ELEMENT;k=W<256?new Uint8Array(M.buffer,j,H):new Uint16Array(M.buffer,j,H)}else k=W<256?new Uint8Array(H):new Uint16Array(H);M=new Float32Array(M.buffer,0,W*L);var Y=0;for(d=0;d<W-2;++d)k[Y++]=V,k[Y++]=d,k[Y++]=d+1;k[Y++]=V,k[Y++]=d,k[Y++]=0;var X=[];for(d=I;d>=O;--d)X.push(d);var K=[];for(d=D;d>=I;--d)K.push(d);var Q=[];for(d=B;d>=D;--d)Q.push(d);var Z=[];for(Z.push(0),d=V-1;d>=B;--d)Z.push(d);o.mesh=new T$K(S.center,M,k,H,W,x,v,i$1c.fromOrientedBoundingBox(N),nt$6(e,N.center,a,x,v),S.getStride(),N,S,t.terrainExaggeration,X,K,Q,Z)}var J=t.context;e$2b(o.vertexArray)&&(e$2b(n)?0!==o.mesh.vertices.length&&0!==o.mesh.indices.length&&n.push(o.vertexArray):v$C._freeVertexArray(o.vertexArray)),0!==o.mesh.vertices.length&&0!==o.mesh.indices.length&&(o.vertexArray=v$C._createVertexArrayForMesh(J,o.mesh)),r.processImagery(i,e.terrainProvider,t,!0);var ee=o.waterMaskTexture;if(o.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){var te=r._findAncestorTileWithTerrainData(i);e$2b(te)&&e$2b(te.data.waterMaskTexture)&&(o.waterMaskTexture=te.data.waterMaskTexture,++o.waterMaskTexture.referenceCount,r._computeWaterMaskTranslationAndScale(i,te,o.waterMaskTranslationAndScale))}e$2b(ee)&&(--ee.referenceCount,0===ee.referenceCount&&ee.destroy())}function ie$t(e,t,i,n,r,o,a,s,l,u,c){var h=G$S;h.longitude=e$2a.lerp(t.west,t.east,o),h.latitude=e$2a.lerp(t.south,t.north,a),h.height=s;var d=e.cartographicToCartesian(h,$$I),f=Te$i;return f.x=o,f.y=a,i.encode(n,r*i.getStride(),d,f,s,l,u),c.minimumHeight=Math.min(c.minimumHeight,s),c.maximumHeight=Math.max(c.maximumHeight,s),r+1}var oe$o=new h$18;function D$I(e,t,i,n){var r=e.rectangle,o=t.rectangle;0===t.x&&1===i.x&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?((r=h$18.clone(e.rectangle,oe$o)).west-=e$2a.TWO_PI,r.east-=e$2a.TWO_PI):0===e.x&&0===i.x&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&((r=h$18.clone(e.rectangle,oe$o)).west+=e$2a.TWO_PI,r.east+=e$2a.TWO_PI);var a=r.east-r.west,s=(o.west-r.west)/a,l=(o.east-r.west)/a,u=r.north-r.south,c=(o.south-r.south)/u,h=(o.north-r.south)/u,d=(i.x-s)/(l-s),f=(i.y-c)/(h-c);return Math.abs(d)<Math.EPSILON5?d=0:Math.abs(d-1)<Math.EPSILON5&&(d=1),Math.abs(f)<Math.EPSILON5?f=0:Math.abs(f-1)<Math.EPSILON5&&(f=1),n.x=d,n.y=f,n}var at$8=new o$1o;function ge$j(e,t,i,n,r){var o=e.encoding,a=e.vertices;if(r.height=o.decodeHeight(a,t),o.hasVertexNormals)o.getOctEncodedNormal(a,t,r.encodedNormal);else{var s=r.encodedNormal;s.x=0,s.y=0}}var st$4=new o$1o,rt$b=new o$1p;function ht$4(e,t,i,n,r,o,a,s,l,u){var c,h=n.encoding,d=n.vertices,f=D$I(t,i,h.decodeTextureCoordinates(d,r,C$M),C$M),p=D$I(t,i,h.decodeTextureCoordinates(d,o,Te$i),Te$i);c=l?(a-f.x)/(p.x-f.x):(s-f.y)/(p.y-f.y);var _,m=h.decodeHeight(d,r),g=h.decodeHeight(d,o),x=i.rectangle;if(G$S.longitude=e$2a.lerp(x.west,x.east,a),G$S.latitude=e$2a.lerp(x.south,x.north,s),u.height=G$S.height=e$2a.lerp(m,g,c),!h.isModify)if(h.hasVertexNormals){var v=h.getOctEncodedNormal(d,r,at$8),y=h.getOctEncodedNormal(d,o,st$4),$=t$10.octDecode(v.x,v.y,$$I),b=t$10.octDecode(y.x,y.y,rt$b);_=o$1p.lerp($,b,c,$$I),o$1p.normalize(_,_),t$10.octEncode(_,u.encodedNormal)}else _=e.geodeticSurfaceNormalCartographic(G$S,$$I),t$10.octEncode(_,u.encodedNormal)}function Ce$g(e,t,i,n,r,o){o.height=r;var a=t.geodeticSurfaceNormalCartographic(G$S,$$I);t$10.octEncode(a,o.encodedNormal)}function ne$z(e,t,i,n,r,o,a,s,l,u,c){var h;return _e$o(e,t,s,a,!1,i,n,c)||_e$o(e,t,u,l,!0,i,n,c)?c:ve$j(r,o)?(ge$j(o,0===i?0===n?o.eastIndicesNorthToSouth[0]:o.southIndicesEastToWest[0]:0===n?o.northIndicesWestToEast[0]:o.westIndicesSouthToNorth[0],i,n,c),c):e$2b(h=0===i?0===n?fe$l(e.westMeshes,e.westTiles,T$I.EAST,e.southMeshes,e.southTiles,T$I.NORTH):fe$l(e.northMeshes,e.northTiles,T$I.SOUTH,e.westMeshes,e.westTiles,T$I.EAST):0===n?fe$l(e.southMeshes,e.southTiles,T$I.NORTH,e.eastMeshes,e.eastTiles,T$I.WEST):fe$l(e.eastMeshes,e.eastTiles,T$I.WEST,e.northMeshes,e.northTiles,T$I.SOUTH))?(Ce$g(e,t,i,n,h,c),c):void 0}function fe$l(e,t,i,n,r,o,a,s){var l=Re$h(e,t,!1,i),u=Re$h(n,r,!0,o);return e$2b(l)&&e$2b(u)?.5*(l+u):e$2b(l)?l:u}function ce$m(e,t,i,n,r,o,a,s,l){for(var u=0;u<o.length;++u)e$2b(a[u])&&(r=it$5(e,t,i,n,r,o[u],a[u],s,l));return r}function it$5(e,t,i,n,r,o,a,s,l){var u=o.rectangle;s===T$I.EAST&&0===e.tile.x?((u=h$18.clone(o.rectangle,oe$o)).west-=e$2a.TWO_PI,u.east-=e$2a.TWO_PI):s===T$I.WEST&&0===o.x&&((u=h$18.clone(o.rectangle,oe$o)).west+=e$2a.TWO_PI,u.east+=e$2a.TWO_PI);var c,h,d,f,p=e.tile.rectangle;switch(r>0&&(i.decodeTextureCoordinates(n,r-1,C$M),c=C$M.x,h=C$M.y),s){case T$I.WEST:d=a.westIndicesSouthToNorth,f=!1;break;case T$I.NORTH:d=a.northIndicesWestToEast,f=!0;break;case T$I.EAST:d=a.eastIndicesNorthToSouth,f=!1;break;case T$I.SOUTH:d=a.southIndicesEastToWest,f=!0}var _,m,g=o,x=e.tile,v=a.encoding,y=a.vertices,$=i.getStride();v.hasWebMercatorT&&(_=t$O.geodeticLatitudeToMercatorAngle(p.south),m=1/(t$O.geodeticLatitudeToMercatorAngle(p.north)-_));for(var b=0;b<d.length;++b){var T=d[b],C=v.decodeTextureCoordinates(y,T,C$M);D$I(g,x,C,C);var S=C.x,w=C.y,E=f?S:w;if(!(E<0||E>1||Math.abs(S-c)<e$2a.EPSILON5&&Math.abs(w-h)<e$2a.EPSILON5)){var P=Math.abs(S)<e$2a.EPSILON5||Math.abs(S-1)<e$2a.EPSILON5,A=Math.abs(w)<e$2a.EPSILON5||Math.abs(w-1)<e$2a.EPSILON5;if(!P||!A){var L,M=v.decodePosition(y,T,$$I),R=v.decodeHeight(y,T);v.hasVertexNormals?L=v.getOctEncodedNormal(y,T,de$o):((L=de$o).x=0,L.y=0);var O=w;if(v.hasWebMercatorT){var I=e$2a.lerp(p.south,p.north,w);O=(t$O.geodeticLatitudeToMercatorAngle(I)-_)*m}i.encode(n,r*$,M,C,R,L,O),l.minimumHeight=Math.min(l.minimumHeight,R),l.maximumHeight=Math.max(l.maximumHeight,R),++r}}}return r}function Re$h(e,t,i,n,r,o){var a,s,l;i?(a=0,s=e.length,l=1):(a=e.length-1,s=-1,l=-1);for(var u=a;u!==s;u+=l){var c=e[u];if(ve$j(t[u],c)){var h;switch(n){case T$I.WEST:h=c.westIndicesSouthToNorth;break;case T$I.SOUTH:h=c.southIndicesEastToWest;break;case T$I.EAST:h=c.eastIndicesNorthToSouth;break;case T$I.NORTH:h=c.northIndicesWestToEast}var d=h[i?0:h.length-1];if(e$2b(d))return c.encoding.decodeHeight(c.vertices,d)}}}function ve$j(e,t){return e$2b(t)&&(!e$2b(e.data.fill)||!e.data.fill.changedThisFrame)}function _e$o(e,t,i,n,r,o,a,s){var l,u,c,h,d,f=n[r?0:i.length-1],p=i[r?0:i.length-1];if(ve$j(f,p)&&(0===o?0===a?(l=r?p.northIndicesWestToEast:p.eastIndicesNorthToSouth,u=r,c=r):(l=r?p.eastIndicesNorthToSouth:p.southIndicesEastToWest,u=!r,c=!1):0===a?(l=r?p.westIndicesSouthToNorth:p.northIndicesWestToEast,u=!r,c=!0):(l=r?p.southIndicesEastToWest:p.westIndicesSouthToNorth,u=r,c=!r),l.length>0)){d=l[h=r?0:l.length-1],p.encoding.decodeTextureCoordinates(p.vertices,d,C$M);var _=D$I(f,e.tile,C$M,C$M);if(_.x===o&&_.y===a)return ge$j(p,d,o,a,s),!0;if(h=a$17(l,u?o:a,(function(t,i){p.encoding.decodeTextureCoordinates(p.vertices,t,C$M);var n=D$I(f,e.tile,C$M,C$M);return c?u?n.x-o:n.y-a:u?o-n.x:a-n.y})),!(h<0))return ge$j(p,l[h],o,a,s),!0;if((h=~h)>0&&h<l.length)return ht$4(t,f,e.tile,p,l[h-1],l[h],o,a,u,s),!0}return!1}var ot$5=[new o$1p,new o$1p,new o$1p,new o$1p];function nt$6(e,t,i,n,r,o){var a=e.quadtree._occluders.ellipsoid,s=a.ellipsoid,l=ot$5;return o$1p.fromRadians(i.west,i.south,r,s,l[0]),o$1p.fromRadians(i.east,i.south,r,s,l[1]),o$1p.fromRadians(i.west,i.north,r,s,l[2]),o$1p.fromRadians(i.east,i.north,r,s,l[3]),a.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,n,o)}var _0x231306=(_0x1c0f3e=!0,function(e,t){var i=_0x1c0f3e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c0f3e=!1,i}),_0x379cb6=_0x231306(void 0,(function(){return _0x379cb6.toString().search("(((.+)+)+)+$").toString().constructor(_0x379cb6).search("(((.+)+)+)+$")})),_0x1c0f3e;_0x379cb6();var xa$3="attribute vec4 position;\nattribute vec2 st;\nvarying vec2 v_texCoord;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n v_texCoord = st;\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n v_positionMC = vec4(position.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(position.xyz, 1.0)).xyz;\n}",_0x321504=(_0x37e11b=!0,function(e,t){var i=_0x37e11b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37e11b=!1,i}),_0x29d241=_0x321504(void 0,(function(){return _0x29d241.toString().search("(((.+)+)+)+$").toString().constructor(_0x29d241).search("(((.+)+)+)+$")})),_0x37e11b;_0x29d241();var Ta$3="varying vec2 v_texCoord;\nuniform sampler2D texture1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n vec4 baseColorWithAlpha = texture2D(texture1, v_texCoord);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(v_texCoord.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(v_texCoord.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, v_texCoord.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}",_0x13ebae=(_0x5b0031=!0,function(e,t){var i=_0x5b0031?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b0031=!1,i}),_0xd109f2=_0x13ebae(void 0,(function(){return _0xd109f2.toString().search("(((.+)+)+)+$").toString().constructor(_0xd109f2).search("(((.+)+)+)+$")})),_0x5b0031;_0xd109f2();const _0x3c7ea8="u_dayTextures",_0x2e5fb8="u_gridTextures",_0x2ac6d9="u_waterMask",_0x494605="u_oceanNormalMap",_0x16e394="uModifyRasterTexture",_0x503735="TileUBO",_0x684fbc=16;function _0x55856b(e){var t=_0x3e2f69.call(this)||this;t._context=e,t._dayTextures=[],t._dayTexturesSampleKey=[],t._gridTextures=[],t._waterMask=void 0,t._oceanNormalMap=void 0,t._modifyRasterTexture=void 0,t._center=new o$1p,t._tileBounds=new e$29,t._modifiedModelView=new p$1d,t._modifiedModelViewProjection=new p$1d,t._dayTextureTranslationAndScale=[];for(var i=0;i<_0x684fbc;i++)t._dayTextureTranslationAndScale.push(0),t._dayTextureTranslationAndScale.push(0),t._dayTextureTranslationAndScale.push(0),t._dayTextureTranslationAndScale.push(0);t._dayTextureSize=[];for(i=0;i<_0x684fbc;i++)t._dayTextureSize.push(0),t._dayTextureSize.push(0),t._dayTextureSize.push(0),t._dayTextureSize.push(0);t._dayTextureTexCoordsRectangle=[];for(i=0;i<_0x684fbc;i++)t._dayTextureTexCoordsRectangle.push(0),t._dayTextureTexCoordsRectangle.push(0),t._dayTextureTexCoordsRectangle.push(0),t._dayTextureTexCoordsRectangle.push(0);t._name=_0x503735}_0x3e2f69&&(_0x55856b.__proto__=_0x3e2f69),_0x55856b.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x55856b.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x55856b.prototype,{}),_0x55856b.prototype._initUBO=function(e){this._ubo=new _0x2e52cb(e.engine,void 0,!1,_0x503735,!1,!1),this._ubo.addUniform("u_modifiedModelView",16),this._ubo.addUniform("u_modifiedModelViewProjection",16),this._ubo.addUniform("u_dayTextureTranslationAndScale",4,_0x684fbc),this._ubo.addUniform("u_dayTextureSize",4,_0x684fbc),this._ubo.addUniform("u_dayTextureTexCoordsRectangle",4,_0x684fbc),this._ubo.addUniform("u_dayTextureUseWebMercatorT",1,_0x684fbc),this._ubo.addUniform("u_dayTextureFlipY",1,_0x684fbc),this._ubo.addUniform("u_normalTextureTranslationAndScale",4),this._ubo.addUniform("uTileBounds",4),this._ubo.addUniform("u_tileRectangle",4),this._ubo.addUniform("u_center3D",3),this._ubo.addUniform("u_southAndNorthLatitude",2),this._ubo.addUniform("u_southMercatorYAndOneOverHeight",2),this._ubo.addUniform("u_useNormalTexture",1),this._ubo.create()},_0x55856b.prototype._textureDirty=function(e){if(this._dayTextures.length!=e.dayTextures.length)return!0;var t;for(t=0;t<this._dayTextures.length;t++)if(this._dayTextures[t].id!=e.dayTextures[t].id||this._dayTexturesSampleKey[t]!=e.dayTextures[t].samplerKey)return!0;if(this._gridTextures.length!=e.gridTextures.length)return!0;for(t=0;t<this._gridTextures.length;t++)if(this._gridTextures[t].id!=e.gridTextures[t].id)return!0;return this._waterMask!=e.waterMask||this._oceanNormalMap!=e.oceanNormalMap},_0x55856b.prototype.updateFromProperties=function(e){if(this._context.webgpu){var t;for(e$2b(this._ubo)||this._initUBO(this._context),this._updateUniform(e),this._ubo.updateFloatArray("u_dayTextureTranslationAndScale",this._dayTextureTranslationAndScale),this._ubo.updateFloatArray("u_dayTextureSize",this._dayTextureSize),this._ubo.updateFloatArray("u_dayTextureTexCoordsRectangle",this._dayTextureTexCoordsRectangle),this._ubo.updateFloatArray("u_dayTextureUseWebMercatorT",e.dayTextureUseWebMercatorT),this._ubo.updateFloatArray("u_dayTextureFlipY",e.dayTextureFlipY),_0x3e2f69.writeCartesian4ToUBO("u_normalTextureTranslationAndScale",this._ubo,e.normalTextureTranslationAndScale),_0x3e2f69.writeMatrix4ToUBO("u_modifiedModelView",this._ubo,this._modifiedModelView),_0x3e2f69.writeMatrix4ToUBO("u_modifiedModelViewProjection",this._ubo,this._modifiedModelViewProjection),_0x3e2f69.writeCartesian4ToUBO("uTileBounds",this._ubo,e.tileBounds),_0x3e2f69.writeCartesian4ToUBO("u_tileRectangle",this._ubo,e.tileRectangle),_0x3e2f69.writeCartesian3ToUBO("u_center3D",this._ubo,e.center3D),_0x3e2f69.writeCartesian2ToUBO("u_southAndNorthLatitude",this._ubo,e.southAndNorthLatitude),_0x3e2f69.writeCartesian2ToUBO("u_southMercatorYAndOneOverHeight",this._ubo,e.southMercatorYAndOneOverHeight),this._ubo.updateFloat("u_useNormalTexture",e.normalTexture?1:0),this._ubo.update(),this._isTextureDirty=this._textureDirty(e),this._dayTextures=e.dayTextures,this._dayTexturesSampleKey=[],t=0;t<this._dayTextures.length;t++)this._dayTexturesSampleKey.push(this._dayTextures[t].samplerKey);this._gridTextures=e.gridTextures,this._waterMask=e.waterMask,this._oceanNormalMap=e.oceanNormalMap,this._modifyRasterTexture=e.modifyRasterTexture}};var _0x32e838=new o$1p,_0x5d18c2=new o$1p;_0x55856b.prototype._updateUniform=function(e){var t=this._context.uniformState.view;_0x5d18c2=o$1p.subtract(e.rtc,this._context.relativeOrigin,_0x5d18c2);var i=p$1d.multiplyByPoint(t,_0x5d18c2,_0x32e838);p$1d.setTranslation(t,i,this._modifiedModelView);var n=this._context.uniformState.projection;p$1d.multiply(n,this._modifiedModelView,this._modifiedModelViewProjection),e.dayTextureTranslationAndScale.length>_0x684fbc&&console.log("GlobeTileUBO max day texture is "+_0x684fbc+", used day textures is "+e.dayTextureTranslationAndScale.length);for(var r=0;r<e.dayTextureTranslationAndScale.length;r++){var o=e.dayTextureTranslationAndScale[r];e$29.pack(o,this._dayTextureTranslationAndScale,4*r)}for(r=0;r<e.dayTextureSize.length;r++){var a=e.dayTextureSize[r];e$29.pack(a,this._dayTextureSize,4*r)}for(r=0;r<e.dayTextureTexCoordsRectangle.length;r++){var s=e.dayTextureTexCoordsRectangle[r];e$29.pack(s,this._dayTextureTexCoordsRectangle,4*r)}},_0x55856b.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),_0x3e2f69.setTextureArrayToEffect(e,this._dayTextures,_0x3c7ea8),_0x3e2f69.setTextureArrayToEffect(e,this._gridTextures,_0x2e5fb8),_0x3e2f69.setTextureToEffect(e,this._waterMask,_0x2ac6d9),_0x3e2f69.setTextureToEffect(e,this._oceanNormalMap,_0x494605),_0x3e2f69.setTextureToEffect(e,this._modifyRasterTexture,_0x16e394)},_0x55856b.prototype.isDestroyed=function(){return!1},_0x55856b.prototype.destroy=function(){return i$10(this)};var L$T="varying vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nconst float fxaaQualitySubpix = 1.0;\nconst float fxaaQualityEdgeThreshold = 0.166;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nconst vec3 kLumaCoefficients = vec3(0.2126, 0.7152, 0.0722);\n#define FxaaLuma(rgba) dot(rgba.rgb, kLumaCoefficients)\nvoid main(){\nvec2 texelSize = vec2(1.0) / czm_viewport.zw;\nvec2 sampleCoordS = v_textureCoordinates + vec2( 0.0, 1.0) * texelSize;\nvec2 sampleCoordE = v_textureCoordinates + vec2( 1.0, 0.0) * texelSize;\nvec2 sampleCoordN = v_textureCoordinates + vec2( 0.0,-1.0) * texelSize;\nvec2 sampleCoordW = v_textureCoordinates + vec2(-1.0, 0.0) * texelSize;\nvec2 sampleCoordNW = v_textureCoordinates + vec2(-1.0,-1.0) * texelSize;\nvec2 sampleCoordSE = v_textureCoordinates + vec2( 1.0, 1.0) * texelSize;\nvec2 sampleCoordNE = v_textureCoordinates + vec2( 1.0,-1.0) * texelSize;\nvec2 sampleCoordSW = v_textureCoordinates + vec2(-1.0, 1.0) * texelSize;\nvec2 posM;\nposM.x = v_textureCoordinates.x;\nposM.y = v_textureCoordinates.y;\nvec4 rgbyM = texture2D(colorTexture, v_textureCoordinates, 0.0);\nfloat lumaM = FxaaLuma(rgbyM);\nfloat lumaS = FxaaLuma(texture2D(colorTexture, sampleCoordS, 0.0));\nfloat lumaE = FxaaLuma(texture2D(colorTexture, sampleCoordE, 0.0));\nfloat lumaN = FxaaLuma(texture2D(colorTexture, sampleCoordN, 0.0));\nfloat lumaW = FxaaLuma(texture2D(colorTexture, sampleCoordW, 0.0));\nfloat maxSM = max(lumaS, lumaM);\nfloat minSM = min(lumaS, lumaM);\nfloat maxESM = max(lumaE, maxSM);\nfloat minESM = min(lumaE, minSM);\nfloat maxWN = max(lumaN, lumaW);\nfloat minWN = min(lumaN, lumaW);\nfloat rangeMax = max(maxWN, maxESM);\nfloat rangeMin = min(minWN, minESM);\nfloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\nfloat range = rangeMax - rangeMin;\nfloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\nfloat lumaNW = FxaaLuma(texture2D(colorTexture, sampleCoordNW, 0.0));\nfloat lumaSE = FxaaLuma(texture2D(colorTexture, sampleCoordSE, 0.0));\nfloat lumaNE = FxaaLuma(texture2D(colorTexture, sampleCoordNE, 0.0));\nfloat lumaSW = FxaaLuma(texture2D(colorTexture, sampleCoordSW, 0.0));\nfloat lumaNS = lumaN + lumaS;\nfloat lumaWE = lumaW + lumaE;\nfloat subpixRcpRange = 1.0 / range;\nfloat subpixNSWE = lumaNS + lumaWE;\nfloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\nfloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\nfloat lumaNESE = lumaNE + lumaSE;\nfloat lumaNWNE = lumaNW + lumaNE;\nfloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\nfloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\nfloat lumaNWSW = lumaNW + lumaSW;\nfloat lumaSWSE = lumaSW + lumaSE;\nfloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\nfloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\nfloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\nfloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\nfloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\nfloat edgeVert = abs(edgeVert3) + edgeVert4;\nfloat subpixNWSWNESE = lumaNWSW + lumaNESE;\nfloat lengthSign = texelSize.x;\nbool horzSpan = edgeHorz >= edgeVert;\nfloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\nif (!horzSpan)\n{\nlumaN = lumaW;\n}\nif (!horzSpan)\n{\nlumaS = lumaE;\n}\nif (horzSpan)\n{\nlengthSign = texelSize.y;\n}\nfloat subpixB = (subpixA * (1.0 / 12.0)) - lumaM;\nfloat gradientN = lumaN - lumaM;\nfloat gradientS = lumaS - lumaM;\nfloat lumaNN = lumaN + lumaM;\nfloat lumaSS = lumaS + lumaM;\nbool pairN = abs(gradientN) >= abs(gradientS);\nfloat gradient = max(abs(gradientN), abs(gradientS));\nif (pairN)\n{\nlengthSign = -lengthSign;\n}\nfloat subpixC = clamp(abs(subpixB) * subpixRcpRange, 0.0, 1.0);\nvec2 posB;\nposB.x = posM.x;\nposB.y = posM.y;\nvec2 offNP;\noffNP.x = (!horzSpan) ? 0.0 : texelSize.x;\noffNP.y = (horzSpan) ? 0.0 : texelSize.y;\nif (!horzSpan)\n{\nposB.x += lengthSign * 0.5;\n}\nif (horzSpan)\n{\nposB.y += lengthSign * 0.5;\n}\nvec2 posN;\nposN.x = posB.x - offNP.x * 1.5;\nposN.y = posB.y - offNP.y * 1.5;\nvec2 posP;\nposP.x = posB.x + offNP.x * 1.5;\nposP.y = posB.y + offNP.y * 1.5;\nfloat subpixD = ((-2.0) * subpixC) + 3.0;\nfloat lumaEndN = FxaaLuma(texture2D(colorTexture, posN, 0.0));\nfloat subpixE = subpixC * subpixC;\nfloat lumaEndP = FxaaLuma(texture2D(colorTexture, posP, 0.0));\nif (!pairN)\n{\nlumaNN = lumaSS;\n}\nfloat gradientScaled = gradient * 1.0 / 4.0;\nfloat lumaMM = lumaM - lumaNN * 0.5;\nfloat subpixF = subpixD * subpixE;\nbool lumaMLTZero = lumaMM < 0.0;\nlumaEndN -= lumaNN * 0.5;\nlumaEndP -= lumaNN * 0.5;\nbool doneN = abs(lumaEndN) >= gradientScaled;\nbool doneP = abs(lumaEndP) >= gradientScaled;\nif (!doneN)\n{\nposN.x -= offNP.x * 3.0;\n}\nif (!doneN)\n{\nposN.y -= offNP.y * 3.0;\n}\nbool doneNP = (!doneN) || (!doneP);\nif (!doneP)\n{\nposP.x += offNP.x * 3.0;\n}\nif (!doneP)\n{\nposP.y += offNP.y * 3.0;\n}\nvec4 t0 = texture2D(colorTexture, posN.xy, 0.0);\nvec4 t1 = texture2D(colorTexture, posN.xy, 0.0);\nif (doneNP)\n{\nif (!doneN) lumaEndN = FxaaLuma(t0);\nif (!doneP) lumaEndP = FxaaLuma(t1);\nif (!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif (!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif (!doneN) posN.x -= offNP.x * 12.0;\nif (!doneN) posN.y -= offNP.y * 12.0;\ndoneNP = (!doneN) || (!doneP);\nif (!doneP) posP.x += offNP.x * 12.0;\nif (!doneP) posP.y += offNP.y * 12.0;\n}\nfloat dstN = posM.x - posN.x;\nfloat dstP = posP.x - posM.x;\nif (!horzSpan)\n{\ndstN = posM.y - posN.y;\n}\nif (!horzSpan)\n{\ndstP = posP.y - posM.y;\n}\nbool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\nfloat spanLength = (dstP + dstN);\nbool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\nfloat spanLengthRcp = 1.0 / spanLength;\nbool directionN = dstN < dstP;\nfloat dst = min(dstN, dstP);\nbool goodSpan = directionN ? goodSpanN : goodSpanP;\nfloat subpixG = subpixF * subpixF;\nfloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\nfloat subpixH = subpixG * fxaaQualitySubpix;\nfloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\nfloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\nif (!horzSpan)\n{\nposM.x += pixelOffsetSubpix * lengthSign;\n}\nif (horzSpan)\n{\nposM.y += pixelOffsetSubpix * lengthSign;\n}\n#ifdef MALI\nif(range < rangeMaxClamped)\n{\ngl_FragColor = rgbyM;\n}\nelse\n{\ngl_FragColor = texture2D(colorTexture, posM, 0.0);\n}\n#else\ngl_FragColor = texture2D(colorTexture, posM, 0.0);\n#endif\n}\n";function A$S(e){if(!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.terrainProvider))throw new t$16("options.terrainProvider is required.");if(!e$2b(e.imageryLayers))throw new t$16("options.imageryLayers is required.");if(!e$2b(e.surfaceShaderSet))throw new t$16("options.surfaceShaderSet is required.");this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=W$W.RECEIVE_ONLY,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._terrainLayers=e.terrainLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._pickRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new o$1h,this._imageryLayers.layerAdded.addEventListener(A$S.prototype._onLayerAdded,this),this._imageryLayers.layerRemoved.addEventListener(A$S.prototype._onLayerRemoved,this),this._imageryLayers.layerMoved.addEventListener(A$S.prototype._onLayerMoved,this),this._imageryLayers.layerShownOrHidden.addEventListener(A$S.prototype._onLayerShownOrHidden,this),this._imageryLayers.layerUpdate.addEventListener(A$S.prototype._onLayerUpdate,this),this._tileLoadedEvent=new o$1h,this._imageryLayersUpdatedEvent=new o$1h,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._pickCommands=[],this._usedDrawCommands=0,this._usedPickCommands=0,this._drawCommandsByTile={},this._modifyDrawCommandsByTile={},this._uniformMapsByTile={},this._modifyUniformMapsByTile={},this._modifyUsedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new e$1U(0,0,.5,1),this._clippingPlanes=void 0,this.cartographicLimitRectangle=h$18.clone(h$18.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._flattenTextureWidth=1024,this._flattenTexture=void 0,this._hypsometricSetting=void 0,this._hypsometricTexture=void 0,this._hypsometricRenderTexture=void 0,this._hypsometricRegion=void 0,this._hypsometricBound=new e$29,this._bUseHypColorTable=!1,this._bUseHypRegion=!1,this._hypsometricRegionUpdate=!1,this._hypAnalysisMode=k$Q.AnalysisRegionMode.ARM_NONE,this._hypMaxInstensity=e.MaxInstensity,this._hypMinInstensity=e.MinInstensity,this._hypMaxHeight=e.MaxHeight,this._hypMinHeight=e.MinHeight,this._hypUseColorByHeight=!0,this._geoBounds=new e$29,this._style3D=new e$1s,this._slopeSetting=void 0,this._slopeColorTexture=void 0,this._slopeArrowsTexture=void 0,this._slopePolygonTexture=void 0,this._slopeRegion=void 0,this._slopeBound=new e$29,this._bUseSlopeColorTable=!1,this._slopeRegionUpdate=!1,this._slopeAnalysisMode=k$Q.AnalysisRegionMode.ARM_NONE,this._slopeArrowUrl=n$15("Assets/Textures/arrow.png"),this._excavateRectangle=new h$18,this._clipRasterTilesMap={},this._modifyRegions=new e$1N,this._modifyTilesMap={},this._modifyRegionUpdate=!1,this.clippingType=R$J.KeepOutside,this._excavateRegions=new e$1N,this._excavateRegionUpdate=!1,this._extractRegions=new e$1N,this._extractRegionsUpdate=!1,this._imageryClipRegions=new e$1N,this._imageryClipRegionUpate=!1,this._oriClipPlane=[],this._clipPlane=[];for(var t=0;t<6;t++)this._clipPlane[t]=new e$29(0,0,0,0),this._oriClipPlane[t]=new e$29(0,0,0,0);this._clipMode=0,this._clipLineColor=new e$29(1,0,0,1),this._clipping=!1,this._splitDirection=new o$1o,this._cullEnabled=!0,this._rasterTextureSizes=[256,512],this._rasterLineWidth=1,this._rasterLineFBOs=[],this._rasterAAFBOs=[],this._rasterCurrentFBOIdx=0,this._lineExpandCommand=void 0,this._lineFXAACommand=void 0,this._swipeRegion=new e$29(0,0,1,1),this._swipeEnabled=!1,this._polygonOffset={enabled:!1,value:new o$1o(0,0)},this._excavateRegionCommands=new e$1N,this._pbrParameter=je$g.NONE,this._PBRMaterialParams={metallic:0,roughness:0,baseColorFactor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissionFactor:o$1p.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1},this._excavationSideTextureUrl=n$15("Assets/Textures/excavationregion_side.jpg"),this._excavationBottomTextureUrl=n$15("Assets/Textures/excavationregion_top.jpg")}function ba$2(e,t){var i=e.loadingImagery;e$2b(i)||(i=e.readyImagery);var n=t.loadingImagery;return e$2b(n)||(n=t.readyImagery),i.imageryLayer._layerIndex-n.imageryLayer._layerIndex}function Ba$3(e){var t=e.indexBuffer;e.destroy(),!t.isDestroyed()&&e$2b(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}function Sa$2(e,t){var i=t.creditDisplay;e._terrainProvider.ready&&e$2b(e._terrainProvider.credit)&&i.addCredit(e._terrainProvider.credit);for(var n=e._imageryLayers,r=0,o=n.length;r<o;++r){var a=n.get(r).imageryProvider;e$2b(a)&&a.ready&&e$2b(a.credit)&&i.addCredit(a.credit);var s=n.get(r).gridProvider;e$2b(s)&&s.ready&&e$2b(s.credit)&&i.addCredit(s.credit)}}function ii$3(e,t){var i=t.data.mesh;if(e$2b(i)&&!i.isModified){for(var n=e.context,r=i.encoding,o=i.vertices,a=(new o$1o,new o$1p),s=new o$1p,l=i.center,u=new a$18,c=i.stride,h=o.length,d=new Array(h/c),f=0;f<h;f+=c){var p=f/c;d[p]=o$1p.unpack(o,f,d[p]),d[p]=o$1p.add(d[p],l,d[p])}for(var _=t.rectangle.width/50,m=new Array(i.indices.length),g=(f=0,m.length);f<g;f++)m[f]=i.indices[f];var x=A$1g.computeSubdivision(t$13.WGS84,d,m,_,!0),v=x.attributes.position.values;h=v.length;var y=t.rectangle,$=y.width,b=y.height,T=new Float32Array(h/3*c),C=t$O.geodeticLatitudeToMercatorAngle(y.south),S=1/(t$O.geodeticLatitudeToMercatorAngle(y.north)-C),w=0;for(f=0;f<h;f+=3){o$1p.unpack(v,f,a),a$18.fromCartesian(a,void 0,u);var E=(u.longitude-y.west)/$,P=(u.latitude-y.south)/b,A={x:E=e$2a.clamp(E,0,1),y:P=e$2a.clamp(P,0,1)};o$1p.fromRadians(u.longitude,u.latitude,0,void 0,s);var L=(t$O.geodeticLatitudeToMercatorAngle(u.latitude)-C)*S;w=r.encode(T,w,a,A,u.height,new o$1o,L)}var M=new T$K;M.encoding=i.encoding,M.vertices=T,M.indices=new Uint16Array(x.indices),M.center=o$1p.clone(l),t.data.subDivisionMesh=M,t.data.subDivisionVertexArray=t.data.subDivisionVertexArray&&t.data.subDivisionVertexArray.destroy(),t.data.subDivisionVertexArray=v$C._createVertexArrayForMesh(n,t.data.subDivisionMesh),i.isModified=!0}}Object.defineProperties(A$S.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._baseColor=e,this._firstPassInitialColor=e$29.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._quadtree=e}},ready:{get:function(){return this._terrainProvider.ready&&(0===this._imageryLayers.length||this._imageryLayers.get(0).imageryProvider.ready)}},tilingScheme:{get:function(){return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},tileLoadedEvent:{get:function(){return this._tileLoadedEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){if(this._terrainProvider!==e||e._isSkirtDirty){if(!e$2b(e))throw new t$16("terrainProvider is required.");this._terrainProvider=e,this._terrainProvider instanceof se$q&&(this._terrainProvider._quadtree=this._quadtree),e$2b(this._quadtree)&&this._quadtree.invalidateAllTiles()}}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){h$K.setOwner(e,this,"_clippingPlanes")}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection.x=e.x,this._splitDirection.y=e.y}},excavationSideTextureUrl:{get:function(){return this._excavationSideTextureUrl},set:function(e){this._excavationSideTextureUrl=e}},excavationBottomTextureUrl:{get:function(){return this._excavationBottomTextureUrl},set:function(e){this._excavationBottomTextureUrl=e}}}),A$S.prototype.update=function(e){this._imageryLayers._update(),this.terrainProvider._isSkirtDirty&&(this.terrainProvider=this.terrainProvider,this.terrainProvider._isSkirtDirty=!1)},A$S.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile((function(e){e.data.imagery.sort(ba$2)}))),Sa$2(this,e);for(var t=this._vertexArraysToDestroy,i=t.length,n=0;n<i;++n)Ba$3(t[n]);t.length=0,e._quadtree=this._quadtree},A$S.prototype.beginUpdate=function(e){for(var t=this._tilesToRenderByTextureCount,i=0,n=t.length;i<n;++i){var r=t[i];e$2b(r)&&(r.length=0)}var o=this._clippingPlanes;e$2b(o)&&o.enabled&&o.update(e),this._usedDrawCommands=0,this._modifyUsedDrawCommands=0,this._drawCommands=[]},A$S.prototype.createTexture=function(e){if(e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:e,width:1024,height:64,pixelFormat:V$10.RGBA,flipY:!1}),e$2b(this._hypsometricSetting)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer})),e$2b(this._slopeColorTexture)||(this._slopeColorTexture=new t$V({context:e,width:1024,height:64,pixelFormat:V$10.RGBA,flipY:!1}),e$2b(this._slopeSetting)&&this._slopeColorTexture.copyFrom({width:1024,height:64,arrayBufferView:this._slopeSetting.ColorTable._imageBuffer})),!e$2b(this._slopeArrowsTexture)&&(this._slopeArrowsTexture=this._slopeArrowsTexture&&this._slopeArrowsTexture.destroy(),e$2b(this._slopeArrowUrl))){var t=this;o$1l(t$T(this._slopeArrowUrl),(function(i){t._slopeArrowUrl==t._slopeArrowUrl&&(t._slopeArrowsTexture=new t$V({context:e,source:i,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT})}))}))}},A$S.prototype.updateHypRegionFrameBuffer=function(e){if(this._hypsometricRegionUpdate){if(!e$2b(this._hypsometricRegion))return void(this._bUseHypRegion=!1);this._hypsometricRegionUpdate=!1,this._bUseHypRegion=!0,De$j(e.context,this._hypsometricRegion)}},A$S.prototype.updateSlopeRegionFrameBuffer=function(e){if(this._slopeRegionUpdate){if(!e$2b(this._slopeRegion))return void(this._bUseSlopeRegion=!1);this._slopeRegionUpdate=!1,this._bUseSlopeRegion=!0,De$j(e.context,this._slopeRegion)}},A$S.prototype.endUpdate=function(e){if(!e$2b(this._renderState)){this._renderState=d$1m.fromCache({cull:{enabled:this._cullEnabled},depthTest:{enabled:!0,func:re$E.LESS}}),this._blendRenderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:re$E.LESS_OR_EQUAL},blending:Ee$r.ALPHA_BLEND});let e=l$1g(this._renderState,!0);e.cull.enabled=!1,this._disableCullingRenderState=d$1m.fromCache(e),e=l$1g(this._blendRenderState,!0),e.cull.enabled=!1,this._disableCullingBlendRenderState=d$1m.fromCache(e)}if(e._fboState.frameBufferType!=Qe$c.CLAMP){this.createTexture(e.context),this.updateHypRegionFrameBuffer(e),this.updateSlopeRegionFrameBuffer(e),this._updateExcavateRegions(e),this._updateModifyRegions(e),this._updateImageryClipRegions(e),this._updateExtractRegions(e),tn$3(this,e),an$2(this,e),e.rasterLineWidth>1&&e$2b(e.commandListRealtimeRaster)&&e.commandListRealtimeRaster.length>0&&(en$2(this,e),rn$2(this,e)),this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&!1!==this.terrainProvider.isShowGlobe&&Q$J.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);for(var t=0,i=this._tilesToRenderByTextureCount,n=0,r=i.length;n<r;++n){var o=i[n];if(e$2b(o)){var a=0;o.length>0&&(a=o[o.length-1]._level);for(var s=0,l=o.length;s<l;++s){o[s].realtimeRasterVectors(e,this),o[s].renderVectorBy2DCanvas(e,this);var u=o[s],c=u.data.tileBoundingRegion;if(u.data.terrainState!==Le$m.INVALID){u.rasterClipRegion(e,this),e$2b(u.data.modifyTerrainVertexArray)&&(!e._fboState.enabled||e._fboState.name.indexOf("_excavationGlobeHeight2")>-1)&&(nr$6(this,u,void 0,a,e,!0),ii$3(e,u));for(var h=void 0,d=!1,f=e.camera._scene.terrainLayers._layers,p=1;p<f.length;p++){var _=f[p]._terrainProvider.tablename,m=u.data.terrain[_];if(e$2b(m)){if(e$2b(m.terrainData)&&e$2b(m.terrainData.hasInvalid)){if(!m.terrainData.hasInvalid){e$2b(m.terrainData)&&e$2b(m.vertexArray)&&e$2b(m.mesh)&&(u.data.terrainData=m.terrainData,u.data.vertexArray=m.vertexArray,u.data.mesh=m.mesh);break}d=!0}nr$6(this,u,m,a,e,!1,h),e$2b(m)&&(e$2b(m.mesh)&&!m.mesh.invalid&&e$2b(m.vertexArray)?(m.realtimeRasterValidTerrain(e,this,u),h=m._rasterTerrainTexture):h=void 0)}}d&&ii$3(e,u),nr$6(this,u,void 0,a,e,!1,h),e$2b(u.data)&&e$2b(u.data.terrainData)&&e$2b(u.data.terrainData._maximumHeight)&&e$2b(u.data.terrainData._minimumHeight)&&(0==s?t=.5*(u.data.terrainData._maximumHeight+u.data.terrainData._minimumHeight):t+=.5*(u.data.terrainData._maximumHeight+u.data.terrainData._minimumHeight))}e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,c.minimumHeight)}l>1&&(t/=l,e.averageTerrainHeight=t)}}if(e.commandListRealtimeRaster.length=0,!e.camera.bReflect)for(var g in this._excavateRegionCommands._hash)if((e$2b(this._excavationSideTextureUrl)||!(g.indexOf("side")>-1))&&(e$2b(this._excavationBottomTextureUrl)||!(g.indexOf("bottom")>-1))){var x=this._excavateRegionCommands._hash[g];e.commandList.push(x)}if(this._clipping){var v=e.camera.inverseViewMatrix,y=new p$1d;p$1d.transpose(v,y);for(p=0;p<6;p++)p$1d.multiplyByVector(y,this._oriClipPlane[p],this._clipPlane[p])}}},A$S.prototype.updateForPick=function(e){for(var t=this._drawCommands,i=0,n=this._usedDrawCommands;i<n;++i)e.commandList.push(t[i])},A$S.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()},A$S.prototype.getLevelMaximumGeometricError=function(e){return this._terrainProvider.getLevelMaximumGeometricError(e)},A$S.prototype.loadTile=function(e,t){var i=t.parent,n=t.data;if(e$2b(i)&&e$2b(i.data)&&i.data.terrainState===Le$m.INVALID)return n.terrainState=Le$m.INVALID,void(t.state=re$z.DONE);var r,o=!0;e$2b(n)&&(o=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===D$J.CULLED_BUT_NEEDED,r=n.terrainState),v$C.processStateMachine(t,e,this.terrainProvider,this._terrainLayers,this._imageryLayers,this._vertexArraysToDestroy,o),n=t.data,o&&r!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)&&n.boundingVolumeSourceTile===t&&(o=!1,v$C.processStateMachine(t,e,this.terrainProvider,this._terrainLayers,this._imageryLayers,this._vertexArraysToDestroy,o)),t.renderable&&this._tileLoadedEvent.raiseEvent(t)};var La$3=new i$1c,ai$4=new h$18,Ea$3=new h$18,Fa$3=new a$18;function ir$5(e,t){if(t.west<t.east)return t;var i=h$18.clone(t,Ea$3);return h$18.center(e,Fa$3).longitude>0?i.east=e$2a.PI:i.west=-e$2a.PI,i}A$S.prototype.computeTileVisibility=function(e,t,i){var n=this.computeDistanceToTile(e,t);if(e._distance=n,t.fog.enabled&&e$2a.fog(n,t.fog.density)>=1)return fe$n.NONE;var r=e.data,o=r.tileBoundingRegion;if(void 0===r.boundingVolumeSourceTile)return fe$n.PARTIAL;var a=t.cullingVolume,s=u$_(r.modifyOrientedBoundingBox,r.orientedBoundingBox);if(!e$2b(s)&&e$2b(r.renderedMesh))for(var l in s=r.renderedMesh.boundingSphere3D,r.terrain)s=i$1c.union(e,r.terrain[l].mesh.boundingSphere3D,s,s);r.clippedByBoundaries=!1;var u=ir$5(e.rectangle,this.cartographicLimitRectangle),c=h$18.simpleIntersection(u,e.rectangle,ai$4);if(!e$2b(c))return fe$n.NONE;if(h$18.equals(c,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==C$13.SCENE3D)for(var l in s=La$3,i$1c.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,o.minimumHeight,o.maximumHeight,s),o$1p.fromElements(s.center.z,s.center.x,s.center.y,s.center),t.mode===C$13.MORPHING&&e$2b(r.renderedMesh)&&(s=i$1c.union(r.renderedMesh.boundingSphere3D,s,s)),r.terrain)s=i$1c.union(e,r.terrain[l].mesh.boundingSphere3D,s,s);var h=this._clippingPlanes;if(e$2b(h)&&h.enabled&&e$2b(s)){var d=h.computeIntersectionWithBoundingVolume(s);if(e.isClipped=d!==Ae$u.INSIDE,d===Ae$u.OUTSIDE)return fe$n.NONE}var f=Ae$u.INTERSECTING;if(e$2b(s)){if((f=a.computeVisibility(s))===Ae$u.OUTSIDE)for(var l in r.terrain)if(e$2b(s=r.terrain[l].orientedBoundingBox)||(s=r.tileTerrainOrientedBoundingBox),e$2b(s)&&(f=a.computeVisibility(s))!==Ae$u.OUTSIDE)break;if(f===Ae$u.OUTSIDE)return e$2b(e.parent)&&e$2b(e.parent.data.modifyOrientedBoundingBox)?a.computeVisibility(e.parent.data.modifyOrientedBoundingBox):fe$n.NONE}if(e.isModified)return f;var p=t.mode===C$13.SCENE3D&&t.camera.frustum instanceof a$V;if(t.mode===C$13.SCENE3D&&!p&&e$2b(i)){var _=r.occludeePointInScaledSpace;return!e$2b(_)||i.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(_,o.minimumHeight)?f:fe$n.NONE}return f},A$S.prototype.canRefine=function(e){return!!e$2b(e.data.terrainData)||void 0!==this.terrainProvider.getTileDataAvailable(2*e.x,2*e.y,e.level+1)};var Da$3=[],Ia$3=[];A$S.prototype.canRenderWithoutLosingDetail=function(e,t){var i=e.data,n=Da$3;n.length=this._imageryLayers.length;var r,o,a,s=!1,l=!1;for(e$2b(i)&&(s=i.terrainState===Le$m.READY,l=!0,r=i.imagery),o=0,a=n.length;o<a;++o)n[o]=l;if(e$2b(r))for(o=0,a=r.length;o<a;++o){var u=r[o];if(!e$2b(u.imageryLayer)){var c=u.loadingImagery,h=!e$2b(c)||c.state===wt$6.FAILED||c.state===wt$6.INVALID,d=(u.loadingImagery||u.readyImagery).imageryLayer._layerIndex;n[d]=h&&n[d]}}var f=this.quadtree._lastSelectionFrameNumber,p=Ia$3;for(p.length=0,p.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);p.length>0;){var _=p.pop(),m=_._lastSelectionResultFrame===f?_._lastSelectionResult:D$J.NONE;if(m===D$J.RENDERED){if(!e$2b(_.data))continue;if(!s&&_.data.terrainState===Le$m.READY)return!1;var g=_.data.imagery;for(o=0,a=g.length;o<a;++o){var x=g[o];if(!e$2b(x.imageryLayer)){var v=x.loadingImagery,y=!e$2b(v)||v.state===wt$6.FAILED||v.state===wt$6.INVALID,$=(x.loadingImagery||x.readyImagery).imageryLayer._layerIndex;if(y&&!n[$])return!1}}}else m===D$J.REFINED&&p.push(_.southwestChild,_.southeastChild,_.northwestChild,_.northeastChild)}return!0};var Ha$2=new o$1p;A$S.prototype.computeTileLoadPriority=function(e,t){var i=e.data;if(void 0===i)return 0;var n=i.orientedBoundingBox;if(void 0===n)return 0;var r=t.camera.positionWC,o=t.camera.directionWC,a=o$1p.subtract(n.center,r,Ha$2),s=o$1p.magnitude(a);return s<e$2a.EPSILON5?0:(o$1p.divideByScalar(a,s,a),(1-o$1p.dot(a,o))*e._distance)};var ni$4=new p$1d,At$5=new p$1d,Ma$3=new e$29,Ua$3=new e$29,Va$2=new o$1p,oi$3=new o$1p,Na$1=new o$1p,Oa$2=new o$1p,Fe$h=new o$1p;A$S.prototype.showTileThisFrame=function(e,t){for(var i=0,n=e.data.imagery,r=0,o=n.length;r<o;++r){var a=n[r];e$2b(a.readyImagery)&&0!==a.readyImagery.imageryLayer.alpha&&++i}var s=this._tilesToRenderByTextureCount[i];e$2b(s)||(s=[],this._tilesToRenderByTextureCount[i]=s),s.push(e),e$2b(e.data.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;var l=this._debug;++l.tilesRendered,l.texturesRendered+=i};var za$3=[new o$1p,new o$1p,new o$1p,new o$1p];function Ga$3(e,t,i,n,r,o){var a=e.quadtree._occluders.ellipsoid,s=a.ellipsoid,l=za$3;return o$1p.fromRadians(i.west,i.south,r,s,l[0]),o$1p.fromRadians(i.east,i.south,r,s,l[1]),o$1p.fromRadians(i.west,i.north,r,s,l[2]),o$1p.fromRadians(i.east,i.north,r,s,l[3]),a.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,n,o)}function Wa$2(e,t,i){var n=e.data;void 0===n&&(n=e.data=new v$C),void 0===n.tileBoundingRegion&&(n.tileBoundingRegion=new y$K({computeBoundingVolumes:t._enablePrjArea,rectangle:e.rectangle,ellipsoid:e.tilingScheme.ellipsoid,minimumHeight:0,maximumHeight:.1}));var r=n.terrainData,o=n.mesh,a=n.tileBoundingRegion,s=!1;for(var l in void 0!==o&&void 0!==o.minimumHeight&&void 0!==o.maximumHeight?(a.minimumHeight=o.minimumHeight,a.maximumHeight=o.maximumHeight,s=!0):void 0!==r&&void 0!==r._minimumHeight&&void 0!==r._maximumHeight?(a.minimumHeight=r._minimumHeight*i.terrainExaggeration,a.maximumHeight=r._maximumHeight*i.terrainExaggeration,s=!0):e.showInvalid&&(a.minimumHeight=0,a.maximumHeight=0,s=!0),n.terrain)e$2b(n.terrain[l].mesh)?(a.minimumHeight=Math.min(n.terrain[l].mesh.minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(n.terrain[l].mesh.maximumHeight,a.maximumHeight)):e$2b(n.terrain[l].terrainData)?(a.minimumHeight=Math.min(n.terrain[l].terrainData._minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(n.terrain[l].terrainData._maximumHeight,a.maximumHeight)):s=!1;if(s)return e;a.minimumHeight=Number.NaN,a.maximumHeight=Number.NaN;for(var u=e.parent;void 0!==u;){var c=u.data;if(void 0!==c){var h=c.mesh;if(void 0!==h&&void 0!==h.minimumHeight&&void 0!==h.maximumHeight)a.minimumHeight=h.minimumHeight,a.maximumHeight=h.maximumHeight,s=!0;else{var d=c.terrainData;void 0!==d&&void 0!==d._minimumHeight&&void 0!==d._maximumHeight&&(a.minimumHeight=d._minimumHeight*i.terrainExaggeration,a.maximumHeight=d._maximumHeight*i.terrainExaggeration,s=!0)}for(var l in c.terrain)e$2b(c.terrain[l].mesh)?(a.minimumHeight=Math.min(c.terrain[l].mesh.minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(c.terrain[l].mesh.maximumHeight,a.maximumHeight)):e$2b(c.terrain[l].terrainData)?(a.minimumHeight=Math.min(c.terrain[l].terrainData._minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(c.terrain[l].terrainData._maximumHeight,a.maximumHeight)):s=!1;if(s)return u}u=u.parent}}function si$3(e,t,i){return function(n){var r,o,a,s=-1,l=n.data.imagery,u=l.length;for(a=0;a<u;++a)if((o=u$_((r=l[a]).readyImagery,r.loadingImagery)).imageryLayer===t){s=a;break}if(-1!==s){var c=s+e;if(o=e$2b(r=l[c])?u$_(r.readyImagery,r.loadingImagery):void 0,!e$2b(o)||o.imageryLayer!==t)return!t._createTileImagerySkeletons(n,i,c);for(a=s;a<c;++a)l[a].freeResources();l.splice(s,e)}return!0}}A$S.prototype.computeDistanceToTile=function(e,t){var i=Wa$2(e,this.terrainProvider,t),n=e.data,r=n.tileBoundingRegion;if(void 0===i)return 9999999999;n.boundingVolumeSourceTile!==i&&(n.boundingVolumeSourceTile=i,e$2b(e.rectangle)&&(n.orientedBoundingBox=y$Z.fromRectangle(e.rectangle,r.minimumHeight,r.maximumHeight,e.tilingScheme.ellipsoid,n.orientedBoundingBox),n.occludeePointInScaledSpace=Ga$3(this,n.orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,n.occludeePointInScaledSpace),n.tileTerrainOrientedBoundingBox=new y$Z(n.orientedBoundingBox.center,n.orientedBoundingBox.halfAxes)));var o=r.minimumHeight,a=r.maximumHeight;if(n.boundingVolumeSourceTile!==e){var s=t.camera.positionCartographic.height;Math.abs(s-o)>Math.abs(s-a)?(r.minimumHeight=o,r.maximumHeight=o):(r.minimumHeight=a,r.maximumHeight=a)}var l=r.distanceToCamera(t);return r.minimumHeight=o,r.maximumHeight=a,l},A$S.prototype._onLayerAdded=function(e,t){e.show&&(this._terrainProvider,this._imageLayerAdded(e,t),this._gridLayerAdded(e,t))},A$S.prototype._onLayerRemoved=function(e,t){e$2b(e.imageryProvider)&&(this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.imagery,n=-1,r=0,o=0,a=i.length;o<a;++o){var s=i[o],l=s.loadingImagery;if(e$2b(l)||(l=s.readyImagery),l.imageryLayer===e)-1===n&&(n=o),s.freeResources(),++r;else if(-1!==n)break}-1!==n&&i.splice(n,r)})),e$2b(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()),e$2b(e.gridProvider)&&(this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.gridImagery,n=-1,r=0,o=0,a=i.length;o<a;++o){var s=i[o],l=s.loadingGrid;if(e$2b(l)||(l=s.readyGrid),l.gridLayer===e)-1===n&&(n=o),s.freeResources(),++r;else if(-1!==n)break}-1!==n&&i.splice(n,r)})),e$2b(e.gridProvider)&&(e.gridProvider._reload=void 0))},A$S.prototype._onLayerMoved=function(e,t,i){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()},A$S.prototype._onLayerShownOrHidden=function(e,t,i){i?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)},A$S.prototype._imageLayerAdded=function(e,t){var i=this._terrainProvider,n=this,r=e.imageryProvider;if(e$2b(r)){var o=this._imageryLayersUpdatedEvent;r._reload=function(){e._imageryCache={},n._quadtree.forEachLoadedTile((function(t){if(!e$2b(t._loadedCallbacks[e._layerIndex])){var n,r=t.data.imagery,o=r.length,a=-1,s=0;for(n=0;n<o;++n){var l=r[n];if(u$_(l.readyImagery,l.loadingImagery).imageryLayer===e)-1===a&&(a=n),++s;else if(-1!==a)break}if(-1!==a){var u=a+s;e._createTileImagerySkeletons(t,i,u)&&(t._loadedCallbacks[e._layerIndex]=si$3(s,e,i),t.state=re$z.LOADING)}}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=re$z.LOADING,0!==t.level&&(t._lastSelectionResultFrame!==n.quadtree._lastSelectionFrameNumber||t._lastSelectionResult!==D$J.RENDERED)&&(t.renderable=!1))})),this._layerOrderChanged=!0,o.raiseEvent()}},A$S.prototype._gridLayerAdded=function(e,t){var i=this._terrainProvider,n=this,r=e.gridProvider;if(e$2b(r)){var o=this._imageryLayersUpdatedEvent;r._reload=function(){e._gridCache={},n._quadtree.forEachLoadedTile((function(t){if(!e$2b(t._loadedCallbacks[e._layerIndex])){var n,r=t.data.gridImagery,o=r.length,a=-1,s=0;for(n=0;n<o;++n){var l=r[n];if(u$_(l.readyGrid,l.loadingGrid).gridLayer===e)-1===a&&(a=n),++s;else if(-1!==a)break}if(-1!==a){var u=a+s;e._createTileImagerySkeletons(t,i,u)&&(t._loadedCallbacks[e._layerIndex]=si$3(s,e,i),t.state=re$z.LOADING)}}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=re$z.LOADING,0!==t.level&&(t._lastSelectionResultFrame!==n.quadtree._lastSelectionFrameNumber||t._lastSelectionResult!==D$J.RENDERED)&&(t.renderable=!1))})),this._layerOrderChanged=!0,o.raiseEvent()}},A$S.prototype._onLayerUpdate=function(e,t){e$2b(e.gridProvider)&&(this._quadtree.forEachLoadedTile((function(e){e.data.gridImagery.length>0&&(e.state=re$z.LOADING)})),e._isUpdate=!1)};var ka$2=new p$1d,je$b=new e$29,ui$5,di$5,Ct$5;function qa$3(e,t){var i={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){var t=e.context.uniformState.view;Fe$h=o$1p.subtract(this.properties.rtc,e.context.relativeOrigin,Fe$h);var i=p$1d.multiplyByPoint(t,Fe$h,oi$3);return p$1d.setTranslation(t,i,ni$4),ni$4},u_modifiedModelViewProjection:function(){var t=e.context.uniformState.view,i=e.context.uniformState.projection;Fe$h=o$1p.subtract(this.properties.rtc,e.context.relativeOrigin,Fe$h);var n=p$1d.multiplyByPoint(t,Fe$h,oi$3);return p$1d.setTranslation(t,n,At$5),p$1d.multiply(i,At$5,At$5),At$5},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureSize:function(){return this.properties.dayTextureSize},u_transparentBackColor:function(){return this.properties.transparentBackColor},u_imageryClipEnable:function(){return this.properties.imageryClipEnable},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureFlipY:function(){return this.properties.dayTextureFlipY},u_dayTextureAlpha:function(){var e=this.properties.morphingParentIndex;if(e>0){this.properties.morphingBeginTime<0&&(this.properties.morphingBeginTime=performance.now());var t=(performance.now()-this.properties.morphingBeginTime)/1e3;t=Math.min(t,1),this.properties.dayTextureAlpha[e]=1-t}return this.properties.dayTextureAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureSwipeRegion:function(){return this.properties.dayTextureSwipeRegion},u_normalTexture:function(){return this.properties.normalTexture?this.properties.normalTexture:e.context.defaultTexture},u_useNormalTexture:function(){return e$2b(this.properties.normalTexture)?1:0},u_normalTextureTranslationAndScale:function(){return this.properties.normalTextureTranslationAndScale},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){var i=t._clippingPlanes;return e$2b(i)&&e$2b(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){var i=t._clippingPlanes;return e$2b(i)?p$1d.multiply(e.context.uniformState.view,i.modelMatrix,ka$2):p$1d.IDENTITY},u_clippingPlanesEdgeStyle:function(){var e=this.properties.clippingPlanesEdgeColor;return e.alpha=this.properties.clippingPlanesEdgeWidth,e},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_GlobeSplitDirection:function(){return this.properties.globeSplitDirection},u_GlobeSwipeRegion:function(){return je$b.x=this.properties.globeSwipeRegion.x*e.context.drawingBufferWidth,je$b.y=(1-this.properties.globeSwipeRegion.y)*e.context.drawingBufferHeight,je$b.z=this.properties.globeSwipeRegion.z*e.context.drawingBufferWidth,je$b.w=(1-this.properties.globeSwipeRegion.w)*e.context.drawingBufferHeight,je$b},u_polygonOffset:function(){return this.properties.polygonOffset},uHypContourFillMode:function(){return this.properties.hypContourFillMode},uHypContourInterval:function(){return this.properties.hypContourInterval},uHypFloor:function(){return this.properties.hypFloor},uHypCeil:function(){return this.properties.hypCeil},uHypOpacity:function(){return this.properties.hypOpacity},uHypLineColor:function(){return this.properties.hypLineColor},uHypsometricTexture:function(){return this.properties.hypsometricTexture},uHypsometricRenderTexture:function(){return this.properties.hypsometricRenderTexture},uHypHasAnalysisRegion:function(){return this.properties.hypHasAnalysisRegion},uHypRect:function(){return this.properties.hypRect},uHypMaxVisibleValue:function(){return this.properties.hypMaxVisibleValue},uHypMinVisibleValue:function(){return this.properties.hypMinVisibleValue},uHypHasColorTable:function(){return this.properties.hypHasColorTable},uSlopeFillMode:function(){return this.properties.slopeFillMode},uSlopeRect:function(){return this.properties.slopeRect},uSlopeFloor:function(){return this.properties.slopeFloor},uSlopeCeil:function(){return this.properties.slopeCeil},uSlopeOpacity:function(){return this.properties.slopeOpacity},uSlopeColorTexture:function(){return this.properties.slopeColorTexture},uSlopePolygonTexture:function(){return this.properties.slopePolygonTexture},uSlopeArrowsTexture:function(){return this.properties.slopeArrowsTexture},uHasSlopeRegion:function(){return this.properties.hasSlopeRegion},uSlopeMaxVisibleValue:function(){return this.properties.slopeMaxVisibleValue},uSlopeMinVisibleValue:function(){return this.properties.slopeMinVisibleValue},uSlopeHasColorTable:function(){return this.properties.slopeHasColorTable},uLevel:function(){return this.properties.level},uTopLevel:function(){return this.properties.topLevel},clip_mode:function(){return this.properties.clip_mode},clip_planes:function(){return this.properties.clip_planes},clip_line_color:function(){return this.properties.clip_line_color},flattenTexture:function(){return this.properties.flattenTexture},uTileBounds:function(){return this.properties.tileBounds},u_gridTextures:function(){return this.properties.gridTextures},u_gridTextureTranslationAndScale:function(){return this.properties.gridTextureTranslationAndScale},u_gridTextureUseWebMercatorT:function(){return this.properties.gridTextureUseWebMercatorT},u_gridTextureTexCoordsRectangle:function(){return this.properties.gridTextureTexCoordsRectangle},uModifyRasterTexture:function(){return this.properties.modifyRasterTexture},uParentMixDirection:function(){return this.properties.parentMixDirection},uBaseColorFactor:function(){return this.properties.baseColorFactor},uMetallicFactor:function(){return this.properties.metallic},uRoughnessFactor:function(){return this.properties.roughness},uEmissionFactor:function(){return this.properties.emissionFactor},uFloodTexture:function(){return this.properties.floodTexture},uFloodRect:function(){return this.properties.floodRect},u_sunLightColor:function(){return this.properties.sunLightColor},u_ambientLightColor:function(){return this.properties.ambientLightColor},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},properties:{tileUBO:new _0x55856b(e.context),initialColor:new e$29(0,0,.5,1),fillHighlightColor:new e$1U(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new o$1o(65e5,9e6),nightFadeDistance:new o$1o(1e7,4e7),hsbShift:new o$1p,center3D:void 0,rtc:new o$1p,modifiedModelView:new p$1d,tileRectangle:new e$29,dayTextures:[],dayTextureTranslationAndScale:[],dayTextureSize:[],transparentBackColor:[],imageryClipEnable:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureFlipY:[],dayTextureAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureSwipeRegion:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new o$1o,southMercatorYAndOneOverHeight:new o$1o,waterMask:void 0,waterMaskTranslationAndScale:new e$29,minMaxHeight:new o$1o,scaleAndBias:new p$1d,clippingPlanesEdgeColor:e$1U.clone(e$1U.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new e$29,normalTexture:void 0,normalTextureTranslationAndScale:new e$29,tileBounds:new e$29,hypContourFillMode:0,uHypContourInterval:0,hypFloor:0,hypCeil:0,hypOpacity:1,hypLineColor:new e$1U,hypsometricTexture:void 0,hypsometricRenderTexture:void 0,hypHasAnalysisRegion:new e$29,hypRect:new e$29,hypMaxVisibleValue:0,hypMinVisibleValue:0,hypHasColorTable:!1,slopeFillMode:0,slopeRect:new e$29,slopeFloor:0,slopeCeil:0,slopeOpacity:1,slopeColorTexture:void 0,slopePolygonTexture:void 0,slopeArrowsTexture:void 0,hasSlopeRegion:!1,slopeMaxVisibleValue:0,slopeMinVisibleValue:0,slopeHasColorTable:!1,level:0,topLevel:0,clip_mode:0,clip_planes:void 0,clip_line_color:new e$1U,flattenTexture:void 0,gridTextures:[],gridTextureTranslationAndScale:[],gridTextureTexCoordsRectangle:[],gridTextureUseWebMercatorT:[],modifyRasterTexture:void 0,morphingParentIndex:-1,morphingBeginTime:-1,parentMixDirection:0,baseColorFactor:new e$29(1,1,1,1),metallic:0,roughness:0,emissionFactor:o$1p.UNIT_XYZ,floodRect:new e$29,floodTexture:void 0,sunLightColor:new e$1U,ambientLightColor:new e$1U,frontFaceAlphaByDistance:new e$29,backFaceAlphaByDistance:new e$29}};return i}function Ya$3(e,t,i){var n,r,o=i.data;if(e$2b(o.vertexArray)?(n=o.mesh,r=o.vertexArray):e$2b(o.fill)&&e$2b(o.fill.vertexArray)&&(n=o.fill.mesh,r=o.fill.vertexArray),e$2b(n)&&e$2b(r)){if(e$2b(o.wireframeVertexArray)){if(o.wireframeVertexArray.mesh===n)return;o.wireframeVertexArray.destroy(),o.wireframeVertexArray=void 0}o.wireframeVertexArray=Xa$3(e,r,n),o.wireframeVertexArray.mesh=n}}function Xa$3(e,t,i){var n={indices:i.indices,primitiveType:W$18.TRIANGLES};k$13.toWireframe(n);var r=n.indices,o=t$Y.createIndexBuffer({context:e,typedArray:r,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new c$12({context:e,attributes:t._attributes,indexBuffer:o})}!function(){var e,t,i=new d$1o({geometry:o$17.fromDimensions({dimensions:new o$1p(2,2,2)})}),n=new d$1o({geometry:new a$U({radius:1})}),r=new p$1d;function o(e){return new y$S({geometryInstances:e,appearance:new t$R({translucent:!1,flat:!0}),asynchronous:!1})}ui$5=function(n,a){return n===e||(Ct$5(),e=n,r=p$1d.fromRotationTranslation(n.halfAxes,n.center,r),i.modelMatrix=r,i.attributes.color=o$16.fromColor(a),t=o(i)),t},di$5=function(i,a){return i===e||(Ct$5(),e=i,r=p$1d.fromTranslation(i.center,r),r=p$1d.multiplyByUniformScale(r,i.radius,r),n.modelMatrix=r,n.attributes.color=o$16.fromColor(a),t=o(n)),t},Ct$5=function(){e$2b(t)&&(t.destroy(),t=void 0,e=void 0)}}();var Qa$3=new e$29(0,0,0,0),Ka$3={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applySplit:void 0,applySwipe:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,numberOfGridTextures:void 0,gridUpdate:!1};function Za$3(e,t){const i=t.globeTranslucencyState;if(i.translucent){const n=e.renderState.blending.enabled;i.pushDerivedCommands(e,n,t)}else t.commandList.push(e)}var Je$6=new e$29;function nr$6(e,t,i,n,r,o,a){var s=t.data;if(s.terrainState===Le$m.INVALID||!1===e.terrainProvider.isShowGlobe&&(!e$2b(s.mesh)||s.mesh.invalid)||e$2b(i)&&(!e$2b(i.mesh)||i.mesh.invalid||!e$2b(i.vertexArray))||!e$2b(s.vertexArray)&&(void 0===s.fill&&(s.fill=new Q$J(t)),s.fill.update(e,r),!e$2b(t.data.fill.vertexArray)))return;var l=r.creditDisplay,u=s.terrainData;if(e$2b(i))u=i.terrainData;if(e$2b(u)&&e$2b(u.credits))for(var c=u.credits,h=0,d=c.length;h<d;++h)l.addCredit(c[h]);var f=e$1T.maximumTextureImageUnits,p=s.waterMaskTexture,_=s.waterMaskTranslationAndScale;!e$2b(p)&&e$2b(s.fill)&&(p=s.fill.waterMaskTexture,_=s.fill.waterMaskTranslationAndScale);const m=r.cameraUnderground,g=r.globeTranslucencyState,x=g.translucent,v=g.frontFaceAlphaByDistance,y=g.backFaceAlphaByDistance;g.rectangle;var $=e.hasWaterMask&&e$2b(p),b=e.oceanNormalMap,T=$&&e$2b(b),C=e.terrainProvider.ready&&e.terrainProvider.hasVertexNormals,S=e$2b(e._PBRMaterialParams)&&e._PBRMaterialParams.roughness>0,w=r.fog.enabled,E=e.showGroundAtmosphere,P=W$W.castShadows(e.shadows)&&!x,A=W$W.receiveShadows(e.shadows)&&!x,L=e.hueShift,M=e.saturationShift,R=e.brightnessShift,O=!(e$2a.equalsEpsilon(L,0,e$2a.EPSILON7)&&e$2a.equalsEpsilon(M,0,e$2a.EPSILON7)&&e$2a.equalsEpsilon(R,0,e$2a.EPSILON7)),I=!1;if(E){var D,B=r.mode,N=r.camera;D=B===C$13.SCENE2D||B===C$13.COLUMBUS_VIEW?N.positionCartographic.height:o$1p.magnitude(N.positionWC);var F=e.nightFadeOutDistance;B!==C$13.SCENE3D&&(F-=r.mapProjection.ellipsoid.maximumRadius),I=D>F}var U=s.normalTexture,G=e$2b(U),z=e$2b(e._slopeSetting)&&e._slopeSetting.DisplayMode!==_0x256766.DisplayMode.NONE&&e._bUseSlopeColorTable,V=e$2b(e._hypsometricSetting)&&e._hypsometricSetting.DisplayMode!==k$Q.DisplayMode.NONE&&e._bUseHypColorTable,k=e$2b(r.camera._scene.globe._floodFlagTexture);$&&--f,T&&--f,G&&--f,z&&(f-=3),V&&(f-=2),r.shadowMaps.length>0&&--f,k&&--f;var W=!o&&t._clipRegionRasterized&&t.isModified,H=!o&&t._clipRegionRasterized&&(e._excavateRegions.length>0||e._extractRegions.length>0),q=!o&&t._clipRegionRasterized&&e._extractRegions.length>0,j=!o&&t._clipRegionRasterized&&!t.isModified&&e._imageryClipRegions.length>0,Y=!o&&z&&!t.isModified&&e$2b(e._slopeRegion),X=!o&&V&&!t.isModified&&e$2b(e._hypsometricRegion)&&e$2b(t._clipRasterTexture),K=!1,Q=!1;H&&-1===r._fboState.name.indexOf("_excavationGlobeHeight")&&(--f,K=e.clippingType===R$J.KeepOutside,Q=e.clippingType===R$J.KeepInside),W||(W=!e$2b(i)&&e$2b(a)),K||(K=!e$2b(i)&&e$2b(a)),j&&--f;var Z=o?s.modifyTerrainMesh:s.renderedMesh;e$2b(i)&&i.mesh&&(Z=i.mesh);var J=Z.center,ee=Z.encoding,te=Ma$3,ie=0,ne=0,re=0,oe=0,ae=!1;if(r.mode!==C$13.SCENE3D){var se=r.mapProjection,le=se.project(h$18.southwest(t.rectangle),Na$1),ue=se.project(h$18.northeast(t.rectangle),Oa$2);if(te.x=le.x,te.y=le.y,te.z=ue.x,te.w=ue.y,r.mode!==C$13.MORPHING&&((J=Va$2).x=0,J.y=.5*(te.z+te.x),J.z=.5*(te.w+te.y),te.x-=J.y,te.y-=J.z,te.z-=J.y,te.w-=J.z),r.mode===C$13.SCENE2D&&ee.quantization===me$p.BITS12){var ce=1/(Math.pow(2,12)-1)*.5,he=(te.z-te.x)*ce,de=(te.w-te.y)*ce;te.x-=he,te.y-=de,te.z+=he,te.w+=de}se instanceof t$O&&(ie=t.rectangle.south,ne=t.rectangle.north,re=t$O.geodeticLatitudeToMercatorAngle(ie),oe=1/(t$O.geodeticLatitudeToMercatorAngle(ne)-re),ae=!0)}var fe=Ka$3;fe.frameState=r,fe.surfaceTile=s,fe.showReflectiveOcean=$,fe.showOceanWaves=T,fe.enableLighting=e.enableLighting,fe.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,fe.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,fe.showGroundAtmosphere=E,fe.perFragmentGroundAtmosphere=I,fe.hasVertexNormals=C,fe.hasRoughness=S,fe.useWebMercatorProjection=ae,fe.clippedByBoundaries=s.clippedByBoundaries,fe.applyModify=W,fe.applyExtract=q,fe.excavationRegion=K,fe.excavationOuter=Q;var pe=s.imagery,_e=[];if(t._useParentImage){pe=[];for(var me=0;me<s.imagery.length;me++){var ge=!1,xe=s.imagery[me].readyImagery;if(e$2b(xe)&&xe.imageryLayer.featherEdgesEnabled){var ve=t.parent;if(e$2b(ve))for(var ye=xe.imageryLayer.imageryProvider.tablename,$e=0;$e<ve.data.imagery.length;$e++){var be=ve.data.imagery[$e],Te=be.readyImagery;if(e$2b(Te))if((wt=Te.imageryLayer).imageryProvider.tablename===ye){_e[me]=wt._calculateTextureTranslationAndScale(t,be),pe.push(be),ge=!0;break}}}ge||pe.push(s.imagery[me])}}var Ce=0,Se=0,we=pe.length,Ee=s.gridImagery,Pe=Ee.length,Ae=[],Le=[],Me=[];e$2b(t._rasterTexture)&&(Ae.push(t._rasterTexture),Le.push(new e$29(0,0,0,0)),Me.push(1),we+=1),e$2b(t._2DRasterTexture)&&(Ae.push(t._2DRasterTexture),Le.push(new e$29(0,0,0,.1)),Me.push(t._2DRasterTexture.textureAlpha),we+=1);const Re=e.showSkirts&&!m&&!x,Oe=e.backFaceCulling&&!m&&!x;var Ie=Ae.length,De=Oe?e._renderState:e._disableCullingRenderState,Be=Oe?e._blendRenderState:e._disableCullingBlendRenderState,Ne=De,Fe=e._firstPassInitialColor,Ue=r.context;e$2b(e._debug.boundingSphereTile)||Ct$5();var Ge=(4&r.useType)>0?1:0;Ge&&--f;var ze=(2&r.useType)>0?1:0;ze&&--f,e$2b(r.mvtLayerCount)&&r.mvtLayerCount>0&&f--;var Ve=r.multiViewportIndex>-1,ke=e._drawCommands,We=o?e._modifyDrawCommandsByTile:e._drawCommandsByTile,He=o?e._modifyUniformMapsByTile:e._uniformMapsByTile,qe=0;do{var je,Ye,Xe=0,Ke=`${t.x}:${t.y}:${t.level}:${qe}`;qe++,We[Ke]?(je=We[Ke],Ye=He[Ke]):((je=new i$_).owner=t,je.cull=!1,je.boundingVolume=new i$1c,je.orientedBoundingBox=void 0,Ye=qa$3(r,e),Ue.webgpu&&je.addUniformBuffer(Ye.properties.tileUBO),We[Ke]=je,He[Ke]=Ye),ke.push(je),je.owner=t,o?++e._modifyUsedDrawCommands:++e._usedDrawCommands,t===e._debug.boundingSphereTile&&(e$2b(s.orientedBoundingBox)?ui$5(s.orientedBoundingBox,e$1U.RED).update(r):e$2b(s.boundingSphere3D)&&di$5(s.boundingSphere3D,e$1U.RED).update(r));var Qe=Ye.properties;e$29.clone(Fe,Qe.initialColor),e$1U.clone(r.lightSource.sunLightColor,Qe.sunLightColor),e$1U.clone(r.lightSource.ambientLightColor,Qe.ambientLightColor),Qe.oceanNormalMap=b,Qe.lightingFadeDistance.x=e.lightingFadeOutDistance,Qe.lightingFadeDistance.y=e.lightingFadeInDistance,Qe.nightFadeDistance.x=e.nightFadeOutDistance,Qe.nightFadeDistance.y=e.nightFadeInDistance,Qe.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity,Qe.tileBounds.x=t.rectangle.west,Qe.tileBounds.y=t.rectangle.south,Qe.tileBounds.z=t.rectangle.east,Qe.tileBounds.w=t.rectangle.north,e$2b(e._hypsometricSetting)&&(Qe.hypContourFillMode=e._hypsometricSetting.DisplayMode,Qe.hypContourInterval=e._hypsometricSetting.LineInterval,Qe.hypFloor=e._hypsometricSetting.ColorTableMinKey,Qe.hypCeil=e._hypsometricSetting.ColorTableMaxKey,Qe.hypOpacity=e._hypsometricSetting.Opacity,Qe.hypLineColor=e._hypsometricSetting.LineColor,Qe.hypsometricTexture=e._hypsometricTexture,Qe.hypsometricRenderTexture=e._hypsometricRenderTexture,Qe.hypHasAnalysisRegion=e._bUseHypRegion,Qe.hypRect=e._geoBounds,Qe.hypMaxVisibleValue=e._hypsometricSetting.MaxVisibleValue,Qe.hypMinVisibleValue=e._hypsometricSetting.MinVisibleValue,Qe.hypHasColorTable=e._bUseHypColorTable&&!ze),S&&(Qe.baseColorFactor=e._PBRMaterialParams.baseColorFactor,Qe.metallic=e._PBRMaterialParams.metallic,Qe.roughness=e._PBRMaterialParams.roughness,Qe.emissionFactor=e._PBRMaterialParams.emissionFactor),e$2b(e._slopeSetting)&&(Qe.slopeFillMode=e._slopeSetting.DisplayMode,Qe.slopeRect=e._slopeBound,Qe.slopeFloor=e$2a.toRadians(e._slopeSetting.ColorTableMinKey),Qe.slopeCeil=e$2a.toRadians(e._slopeSetting.ColorTableMaxKey),Qe.slopeOpacity=e._slopeSetting.Opacity,Qe.slopeColorTexture=e._slopeColorTexture,Qe.slopePolygonTexture=e._slopePolygonTexture,Qe.slopeArrowsTexture=e._slopeArrowsTexture,Qe.hasSlopeRegion=e._bUseSlopeRegion,Qe.slopeMaxVisibleValue=e$2a.toRadians(e._slopeSetting.MaxVisibleValue),Qe.slopeMinVisibleValue=e$2a.toRadians(e._slopeSetting.MinVisibleValue),Qe.slopeHasColorTable=e._bUseSlopeColorTable,Qe.level=t.level,Qe.topLevel=n),e$2b(r.camera._scene.globe._floodFlagTexture)&&(Qe.floodRect=r.camera._scene.globe._floodRect,Qe.floodTexture=r.camera._scene.globe._floodFlagTexture),e$2b(t._clipRasterTexture)?Qe.modifyRasterTexture=t._clipRasterTexture:!e$2b(i)&&e$2b(a)&&(Qe.modifyRasterTexture=a),Qe.clip_mode=e._clipMode,Qe.clip_planes=e._clipPlane,Qe.clip_line_color=e._clipLineColor,Qe.flattenTexture=e._flattenTexture;var Ze=!e$2b(s.vertexArray)&&e$2b(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;Ze&&e$1U.clone(e.fillHighlightColor,Qe.fillHighlightColor),Qe.center3D=Z.center,o$1p.clone(J,Qe.rtc),e$29.clone(te,Qe.tileRectangle),Qe.southAndNorthLatitude.x=ie,Qe.southAndNorthLatitude.y=ne,Qe.southMercatorYAndOneOverHeight.x=re,Qe.southMercatorYAndOneOverHeight.y=oe,Qe.globeSplitDirection=e.splitDirection,Qe.globeSwipeRegion=e._swipeRegion,Qe.polygonOffset=e._polygonOffset.value;const u=m?y:v,c=m?v:y;e$2b(u)&&(e$29.fromElements(u.near,u.nearValue,u.far,u.farValue,Qe.frontFaceAlphaByDistance),e$29.fromElements(c.near,c.nearValue,c.far,c.farValue,Qe.backFaceAlphaByDistance));var Je=Ua$3,et=ir$5(t.rectangle,e.cartographicLimitRectangle);o$1p.fromElements(L,M,R,Qe.hsbShift);var tt=t.rectangle,it=1/tt.width,nt=1/tt.height;Je.x=(et.west-tt.west)*it,Je.y=(et.south-tt.south)*nt,Je.z=(et.east-tt.west)*it,Je.w=(et.north-tt.south)*nt,e$29.clone(Je,Qe.localizedCartographicLimitRectangle);var rt=w;!r.context.webgpu&&e$2a.fog(t._distance,r.fog.density)<e$2a.EPSILON3&&(rt=!1),O=O&&(rt||E);for(var ot=!1,at=!1,st=!1,lt=!1,ut=!1,ct=!1,ht=!1,dt=!1,ft=!1,pt=!1,_t=!o$1o.equals(e.splitDirection,o$1o.ZERO),mt=e._swipeEnabled,gt=[],xt=e._polygonOffset.enabled;Xe<f&&Ce<we;)if(Ce!=we-Ie||0==Ie){var vt=pe[Ce],yt=_e[Ce],$t=vt.readyImagery;if(++Ce,!e$2b($t)||vt.discard)continue;var bt=r.camera._positionCartographic.height,Tt=$t.imageryLayer.maxHeight,Ct=$t.imageryLayer.minHeight;if($t.imageryLayer._inVisibleHeightRange=bt>Tt||bt<Ct?0:1,$t.imageryLayer.alpha*$t.imageryLayer._inVisibleHeightRange==0||($t.setVisible(!0),Ve&&!$t.imageryLayer._isBaseLayer&&!$t.imageryLayer.getVisibleInViewport(r.multiViewportIndex)))continue;if(r.camera._scene._mvtVisibleControl){var St=r.camera._scene._mvtVisibleLevel;if(e$2b($t.isMvtTexture)&&$t.isMvtTexture&&!(t._level>r.camera._endLevel-St))continue}if(!e$2b(Vt=vt.useWebMercatorT?$t.textureWebMercator:$t.texture))throw new t$16("readyImagery is not actually ready!");var wt=$t.imageryLayer;if(e$2b($t.isMvtTexture)&&$t.isMvtTexture){var Et=$t.imageryLayer._selectColor;gt.push({textureIndex:Xe,selectColor:Et})}if(e$2b(vt.textureTranslationAndScale)||(vt.textureTranslationAndScale=wt._calculateTextureTranslationAndScale(t,vt)),!e$2b(vt.dayTextureSize)){var Pt=new e$29(Vt.width,Vt.height,1/Vt.width,1/Vt.height);vt.dayTextureSize=Pt}Qe.dayTextures[Xe]=Vt,Qe.dayTextureTranslationAndScale[Xe]=vt.textureTranslationAndScale,Qe.dayTextureTexCoordsRectangle[Xe]=vt.textureCoordinateRectangle,Qe.dayTextureSize[Xe]=vt.dayTextureSize,e$2b(yt)&&(Qe.dayTextureTranslationAndScale[Xe]=yt,Qe.dayTextureTexCoordsRectangle[Xe]=new e$29(0,0,1,1)),Qe.dayTextureUseWebMercatorT[Xe]=vt.useWebMercatorT,Qe.dayTextureFlipY[Xe]=vt.flipY;var At=new e$29;if(At.x=wt.transparentBackColor.red,At.y=wt.transparentBackColor.green,At.z=wt.transparentBackColor.blue,At.w=wt.transparentBackColorTolerance,Qe.transparentBackColor[Xe]=At,Qe.imageryClipEnable[Xe]=wt.enableImageryClip,Qe.dayTextureAlpha[Xe]=u$_(vt.morphingAlpha,wt.alpha),ct=ct||1!==Qe.dayTextureAlpha[Xe],vt.morphingAlpha<1){var Lt=pe[Ce-1];e$2b(Lt)&&!e$2b(Lt.loadingImagery)&&(Qe.morphingParentIndex=Xe,Qe.morphingBeginTime=Lt.morphingBeginTime)}Qe.dayTextureBrightness[Xe]=wt.brightness,ot=ot||Qe.dayTextureBrightness[Xe]!==h$Q.DEFAULT_BRIGHTNESS,Qe.dayTextureContrast[Xe]=wt.contrast,at=at||Qe.dayTextureContrast[Xe]!==h$Q.DEFAULT_CONTRAST,Qe.dayTextureHue[Xe]=wt.hue,st=st||Qe.dayTextureHue[Xe]!==h$Q.DEFAULT_HUE,Qe.dayTextureSaturation[Xe]=wt.saturation,lt=lt||Qe.dayTextureSaturation[Xe]!==h$Q.DEFAULT_SATURATION,Qe.dayTextureOneOverGamma[Xe]=1/wt.gamma,ut=ut||Qe.dayTextureOneOverGamma[Xe]!==1/h$Q.DEFAULT_GAMMA,Qe.dayTextureSplit[Xe]=wt.splitDirection,Je$6.x=wt._swipeRegion.x*r.context.drawingBufferWidth,Je$6.y=(1-wt._swipeRegion.y)*r.context.drawingBufferHeight,Je$6.z=wt._swipeRegion.z*r.context.drawingBufferWidth,Je$6.w=(1-wt._swipeRegion.w)*r.context.drawingBufferHeight,Qe.dayTextureSwipeRegion[Xe]=e$29.clone(Je$6,new e$29),ht=ht||!o$1o.equals(Qe.dayTextureSplit[Xe],o$1o.ZERO),dt=dt||wt.swipeEnabled;var Mt=Qe.dayTextureCutoutRectangles[Xe];if(e$2b(Mt)||(Mt=Qe.dayTextureCutoutRectangles[Xe]=new e$29),e$29.clone(e$29.ZERO,Mt),e$2b(wt.cutoutRectangle)){var Rt=ir$5(tt,wt.cutoutRectangle);ft=e$2b(h$18.simpleIntersection(Rt,tt,ai$4))||ft,Mt.x=(Rt.west-tt.west)*it,Mt.y=(Rt.south-tt.south)*nt,Mt.z=(Rt.east-tt.west)*it,Mt.w=(Rt.north-tt.south)*nt}var Ot=Qe.colorsToAlpha[Xe];e$2b(Ot)||(Ot=Qe.colorsToAlpha[Xe]=new e$29);var It=e$2b(wt.colorToAlpha)&&wt.colorToAlphaThreshold>0;if(pt=pt||It,It){var Dt=wt.colorToAlpha;Ot.x=Dt.red,Ot.y=Dt.green,Ot.z=Dt.blue,Ot.w=wt.colorToAlphaThreshold}else Ot.w=-1;if(++Xe,e$2b($t.credits))for(var Bt=$t.credits,Nt=0,Ft=Bt.length;Nt<Ft;++Nt)l.addCredit(Bt[Nt])}else{if(++Ce,!e$2b(Vt=Ae[Se]))throw new t$16("readyImagery is not actually ready!");Qe.dayTextures[Xe]=Vt,Qe.dayTextureTranslationAndScale[Xe]=new e$29(0,0,1,1),Qe.dayTextureSize[Xe]=new e$29(Vt.width,Vt.height,1/Vt.width,1/Vt.height),Qe.transparentBackColor[Xe]=Le[Se],Qe.dayTextureTexCoordsRectangle[Xe]=new e$29(0,0,1,1),Qe.dayTextureUseWebMercatorT[Xe]=!1,Qe.dayTextureAlpha[Xe]=Me[Se],ct=ct||1!==Me[Se],Qe.dayTextureBrightness[Xe]=1,ot=!1,Qe.dayTextureContrast[Xe]=1,at=!1,Qe.dayTextureHue[Xe]=0,st=!1,Qe.dayTextureSaturation[Xe]=1,lt=!1,Qe.dayTextureOneOverGamma[Xe]=1,ut=!1,Qe.dayTextureSplit[Xe]=new o$1o(0,0),Qe.dayTextureSwipeRegion[Xe]=r.realtimeRasterSwipeParams.swipeRegion,ht=!0,dt=r.realtimeRasterSwipeParams.swipeEnabled,Se++,++Xe}for(var Ut=0,Gt=0,zt=!1;Ut<f-Xe&&Gt<Pe;){var Vt,kt=Ee[Gt],Wt=kt.readyGrid;if(++Gt,null!=Wt&&(!Ve||Wt.gridLayer.getVisibleInViewport(r.multiViewportIndex)))if(null!=(Vt=kt.useWebMercatorT?Wt.textureWebMercator:Wt.texture)){Wt.needUpdate&&(zt=!0,Wt.needUpdate=!1);var Ht=Wt.gridLayer;e$2b(kt.textureTranslationAndScale)||(kt.textureTranslationAndScale=Ht._calculateTextureTranslationAndScale(t,kt)),Qe.gridTextures[Ut]=Vt,Qe.gridTextureTranslationAndScale[Ut]=kt.textureTranslationAndScale,Qe.gridTextureTexCoordsRectangle[Ut]=kt.textureCoordinateRectangle,Qe.gridTextureUseWebMercatorT[Ut]=kt.useWebMercatorT,Ut++}}Qe.gridTextures.length=Ut,Qe.dayTextures.length=Xe,Qe.waterMask=p,e$29.clone(_,Qe.waterMaskTranslationAndScale),Qe.minMaxHeight.x=ee.minimumHeight,Qe.minMaxHeight.y=ee.maximumHeight,p$1d.clone(ee.matrix,Qe.scaleAndBias);var qt=e._clippingPlanes,jt=e$2b(qt)&&qt.enabled&&t.isClipped;jt&&(Qe.clippingPlanesEdgeColor=e$1U.clone(qt.edgeColor,Qe.clippingPlanesEdgeColor),Qe.clippingPlanesEdgeWidth=qt.edgeWidth),e$2b(e.uniformMap)&&(Ye=p$19(Ye,e.uniformMap)),fe.numberOfDayTextures=Xe,fe.applyBrightness=ot,fe.applyContrast=at,fe.applyHue=st,fe.applySaturation=lt,fe.applyGamma=ut,fe.applyAlpha=ct,fe.applySplit=ht,fe.applySwipe=dt,fe.applyGlobeSwipe=mt,fe.applyGlobeSplit=_t,fe.enableFog=rt,fe.enableClippingPlanes=jt,fe.clippingPlanes=qt,fe.hasImageryLayerCutout=ft,fe.colorCorrect=O,fe.isHeight=Ge,fe.isColor=ze,fe.hasNormalMap=G,fe.hasHypsometricSetting=V,fe.hasSlopeAnalysis=z,fe.highlightFillTile=Ze,fe.colorToAlpha=pt,fe.mvtTextureObj=gt,fe.numberOfGridTextures=Ut,fe.gridUpdate=zt,fe.applyPolygonOffset=xt,fe.mixDirection=0,fe.mixIndex=0,fe.hasFlood=k,fe.applyImageryClip=j,fe.hasHypsometricRegion=X,fe.applySlopeRegion=Y,fe.translucent=x;var Yt=Z.indices.length;Re||(Yt=Z.indexCountWithoutSkirts),Yt=o?s.modifyTerrainVertexArray.indexBuffer.numberOfIndices:Yt,Qe.normalTexture=U,e$29.clone(s.normalTextureTranslationAndScale,Qe.normalTextureTranslationAndScale),je.shaderProgram=e._surfaceShaderSet.getShaderProgram(fe),je.castShadows=P,je.receiveShadows=A,je.renderState=Ne,je.primitiveType=W$18.TRIANGLES,e$2b(i)?je.vertexArray=o?s.modifyTerrainVertexArray:i.vertexArray:je.vertexArray=o?s.modifyTerrainVertexArray:s.subDivisionVertexArray||s.vertexArray||s.fill.vertexArray,je.count=Yt,je.uniformMap=Ye,je.pass=Le$s.GLOBE,e._debug.wireframe&&(Ya$3(Ue,e,t),e$2b(s.wireframeVertexArray)&&(je.vertexArray=s.wireframeVertexArray,je.primitiveType=W$18.LINES));var Xt=je.boundingVolume,Kt=je.orientedBoundingBox;if(r.mode!==C$13.SCENE3D){var Qt=s.tileBoundingRegion;i$1c.fromRectangleWithHeights2D(t.rectangle,r.mapProjection,Qt.minimumHeight,Qt.maximumHeight,Xt),o$1p.fromElements(Xt.center.z,Xt.center.x,Xt.center.y,Xt.center),r.mode===C$13.MORPHING&&(Xt=i$1c.union(Z.boundingSphere3D,Xt,Xt))}else je.boundingVolume=i$1c.clone(Z.boundingSphere3D,Xt),je.orientedBoundingBox=y$Z.clone(s.orientedBoundingBox,Kt),e$2b(je.boundingVolume)||(je.boundingVolume=i$1c.fromOrientedBoundingBox(je.orientedBoundingBox));je.invalid=u$_(t.invalid,!1),x&&g.updateDerivedCommands(je,r),Za$3(je,r),Ne=Be,Fe=Qa$3,Ye.properties.tileUBO.updateFromProperties(Ye.properties)}while(Ce<we)}var li$5=new o$1p,bt$6=new a$18;function $a$3(e,t){for(var i=p$1d.getTranslation(t,new o$1p),n=e.attributes.position.values,r=n.length,o=0;o<r;o+=3){o$1p.unpack(n,o,li$5),a$18.fromCartesian(li$5,void 0,bt$6);var a=e$2a.toDegrees(bt$6.longitude);a-=i.x;var s=e$2a.toDegrees(bt$6.latitude);s-=i.y,n[o]=a,n[o+1]=s,n[o+2]=bt$6.height-1}}function De$j(e,t){if(!e$2b(t.command)){var i=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:t.modelMatrix});$a$3(t.worldGeometry,t.modelMatrix),i.vertexArray=c$12.fromGeometry({context:e,geometry:t.worldGeometry,attributeLocations:{position:0},bufferUsage:A$19.STATIC_DRAW,interleave:!0});var n=["attribute vec4 position;","varying float vHeight;","void main()","{"," vHeight = position.z;"," gl_Position = czm_modelViewProjection * vec4(position.xy, 0.0, 1.0);","}"].join("\n"),r=["varying float vHeight;","void main()","{"," gl_FragColor = czm_packValue(vHeight);","}"].join("\n"),o=new s$U({sources:[n]}),a=new s$U({sources:[r]});i.shaderProgram=r$13.fromCache({name:"ClipRasterTerrain",context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:{position:0}}),i.useRelativeOrigin=!1,t.command=i}}function Ie$f(e){var t=e._clipRasterTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1}}function or$5(e,t){var i=e._clipRasterTilesMap;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];e$2b(h$18.intersection(t,r.rectangle))||(r._clipRasterTexture=r._clipRasterTexture&&!r._clipRasterTexture.isDestroyed()&&r._clipRasterTexture.destroy(),r._clipRasterFbo=r._clipRasterFbo&&!r._clipRasterFbo.isDestroyed()&&r._clipRasterFbo.destroy(),r._clipRegionsCount=0,r._clipRegionRasterized=!1)}}function sr$5(e,t,i){if(i){var n=e.camera._projection.project(a$18.fromDegrees(t.positions[0],t.positions[1]));n=new o$1p(n.z,n.x,n.y),t._excavateMatrix=p$1d.fromTranslation(n)}else t._excavateMatrix=m$17.eastNorthUpToFixedFrame(o$1p.fromDegrees(t.positions[0],t.positions[1]))}function hi$5(e,t){!t._excavationSideTexture&&e$2b(t._excavationSideTextureUrl)&&o$1l(t$11.createIfNeeded(t._excavationSideTextureUrl).fetchImage(),(function(i){t._excavationSideTexture=new t$V({context:e.context,source:i,sampler:new e$1P({wrapS:t._excavateTextureWrap,wrapT:t._excavateTextureWrap})}),t._excavationSideTexture.generateMipmap(I$1e.NICEST)}))}function ci$6(e,t){!t._excavationBottomTexture&&e$2b(t._excavationBottomTextureUrl)&&o$1l(t$11.createIfNeeded(t._excavationBottomTextureUrl).fetchImage(),(function(i){t._excavationBottomTexture=new t$V({context:e.context,source:i})}))}function fi$5(e,t){!t._excavationNormalTexture&&e$2b(t.excavationNormalTextureUrl)&&o$1l(t$11.createIfNeeded(t.excavationNormalTextureUrl).fetchImage(),(function(i){t._excavationNormalTexture=new t$V({context:e.context,source:i})}));!t._excavationSideNormalTexture&&e$2b(t.excavationSideNormalTextureUrl)&&o$1l(t$11.createIfNeeded(t.excavationSideNormalTextureUrl).fetchImage(),(function(i){t._excavationSideNormalTexture=new t$V({context:e.context,source:i,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT})})}))}A$S.prototype._updateExcavateRegions=function(e){if(!(!this._excavateRegionUpdate||e.camera.bReflect||this._tilesToRenderByTextureCount.length<1)){for(var t in this._excavateRegionUpdate=!1,e._framebufferList)t.indexOf("_excavationGlobeHeight")>-1&&!e$2b(this._excavateRegions.get(t.slice(22)))&&(e._framebufferList[t]=!e._framebufferList[t].isDestroyed()&&e._framebufferList[t].destroy(),delete e._framebufferList[t]);if(this._excavateRegions.length<1)return void Ie$f(this);this._onceExcavateRegionsEmpty&&(Ie$f(this),this._onceExcavateRegionsEmpty=!1);var i=!1;e.camera._scene.mode===C$13.COLUMBUS_VIEW&&(i=!0);var n=Pe$g(this._excavateRegions.values);or$5(this,n),this._excavateRectangle=n,hi$5(e,this),ci$6(e,this),fi$5(e,this);for(var r=this._excavateRegions.length,o=0;o<r;o++){var a=this._excavateRegions.values[o];sr$5(e,a,i),De$j(e.context,a),this._excavateTransparent||(ur$3(e,this,a,i),dr$2(e,this,a,i))}}},A$S.prototype._updateExtractRegions=function(e){if(this._extractRegionsUpdate&&!e.camera.bReflect){for(var t in this._extractRegionsUpdate=!1,e._framebufferList)t.indexOf("_excavationGlobeHeight")>-1&&!e$2b(this._extractRegions.get(t.slice(22)))&&(e._framebufferList[t]=!e._framebufferList[t].isDestroyed()&&e._framebufferList[t].destroy(),delete e._framebufferList[t]);if(this._extractRegions.length<1)Ie$f(this);else{this._onceExcavateRegionsEmpty&&(Ie$f(this),this._onceExcavateRegionsEmpty=!1);var i=!1;e.camera._scene.mode===C$13.COLUMBUS_VIEW&&(i=!0);var n=Pe$g(this._extractRegions.values);or$5(this,n),this._excavateRectangle=n,hi$5(e,this),ci$6(e,this),fi$5(e,this);for(var r=this._extractRegions.length,o=0;o<r;o++){sr$5(e,d=this._extractRegions.values[o],i),De$j(e.context,d),this._extractTransparent||(ur$3(e,this,d,i),dr$2(e,this,d,i),ur$3(e,this,d,i,!0),dr$2(e,this,d,i,!0))}if(0!==this._quadtree._tilesToRender.length&&!(this._quadtree._tilesToRender[0].level<10)){if(r<1)return void pi$6(this);mi$3(this,n);var a=lr$5(this._quadtree._tilesToRender,n);if(e$2b(a)&&e$2b(a.data)){var s=a.data,l=e.context,u=[],c=Number.MAX_VALUE,h=Number.MIN_VALUE;for(o=0;o<r;o++){var d=this._extractRegions.values[o];u.push(d.geometry_extract),c=Math.min(c,d.minimumHeight),h=Math.max(h,d.maximumHeight)}s.createModifyVertexArray(l,this,a,u,c,h,!1),e$2b(s.modifyTerrainVertexArray)&&xe$i(l,this,a,n,u,c,h,!0)}}}}else this._extractRegions.length>0&&this._updateModifyTiles(e,this._extractRegions.values,!0)},A$S.prototype._updateImageryClipRegions=function(e){if(this._imageryClipRegionUpate&&!e.camera.bReflect){if(this._imageryClipRegionUpate=!1,this._imageryClipRegions.length<1)return void Ie$f(this);this._onceImageryClipRegionsEmpty&&(Ie$f(this),this._onceImageryClipRegionsEmpty=!1),or$5(this,Pe$g(this._imageryClipRegions.values));for(var t=this._imageryClipRegions.length,i=0;i<t;i++){var n=this._imageryClipRegions.values[i];sr$5(e,n,false),De$j(e.context,n)}}},A$S.prototype._removeAllExcavationCommands=function(){for(var e=Object.keys(this._excavateRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this._removeExcavationCommands(n)}},A$S.prototype._removeAllExtractCommands=function(){for(var e=Object.keys(this._extractRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this._removeExtractCommands(n)}this.modifyParentTiles=void 0},A$S.prototype._removeExcavationCommands=function(e){var t=this._excavateRegions.get(e);t.heightBuffer=t.heightBuffer&&!t.heightBuffer.isDestroyed()&&t.heightBuffer.destroy();var i=this._excavateRegionCommands.get(e+"side"),n=this._excavateRegionCommands.get(e+"bottom");i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),n&&(n.vertexArray=n.vertexArray&&!n.vertexArray.isDestroyed()&&n.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom")},A$S.prototype._removeExtractCommands=function(e){var t=this._extractRegions.get(e);t.heightBuffer=t.heightBuffer&&!t.heightBuffer.isDestroyed()&&t.heightBuffer.destroy(),t.heightBuffer2=t.heightBuffer2&&!t.heightBuffer2.isDestroyed()&&t.heightBuffer2.destroy();var i=this._excavateRegionCommands.get(e+"side"),n=this._excavateRegionCommands.get(e+"side_extract"),r=this._excavateRegionCommands.get(e+"bottom"),o=this._excavateRegionCommands.get(e+"bottom_extract");i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),n&&(n.vertexArray=n.vertexArray&&!n.vertexArray.isDestroyed()&&n.vertexArray.destroy()),r&&(r.vertexArray=r.vertexArray&&!r.vertexArray.isDestroyed()&&r.vertexArray.destroy()),o&&(o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom"),this._excavateRegionCommands.remove(e+"side_extract"),this._excavateRegionCommands.remove(e+"bottom_extract"),this.modifyParentTiles=void 0};var _e$n=new a$V,ja$2=new o$15;function Ja$3(e,t,i,n){var r=e.camera._projection,o=e.camera;if(!o.bReflect){var a=t,s=a.width,l=a.height,u=6378137*Math.cos(a.south+.5*l)*Math.sin(s)*.5,c=6378137*Math.sin(l)*.5;if(s=u,l=c,n){var h=r.project(new a$18(a.west,a.south)),d=r.project(new a$18(a.east,a.north));s=(d.x-h.x)/2,l=(d.y-h.y)/2}var f=o.frustum.clone(ja$2),p=o._scene.globe.globeAlpha,_=new o$1p,m=new o$1p,g=new o$1p,x=new p$1d;i.isUpdate=!0,e$2b(i._beginFunc)||(i._beginFunc=function(){p=o._scene.globe.globeAlpha,o._scene.globe.globeAlpha=1,o$1p.clone(o.position,_),o$1p.clone(o.direction,m),o$1p.clone(o.up,g),p$1d.clone(o.transform,x),o._setTransform(p$1d.IDENTITY),o.setView({destination:o$1p.fromRadians(a.west+.5*a.width,a.south+.5*a.height,1e4)}),_e$n.width=2*s,_e$n.height=2*l,_e$n.near=1,_e$n.far=1e6,_e$n.aspectRatio=s/l,o.frustum=_e$n,e.context.uniformState.updateFrustum(_e$n)}),e$2b(i._endFunc)||(i._endFunc=function(){o._scene.globe.globeAlpha=p,i.isUpdate=!1,o.frustum=f,o._setTransform(x),o$1p.clone(_,o.position),o$1p.clone(m,o.direction),o$1p.clone(g,o.up),o$1p.cross(m,g,o.right),e.context.uniformState.updateFrustum(o.frustum)})}}function ur$3(e,t,i,n,r){var o=e.camera._projection,a=t._excavateRegionCommands;if((!a.contains(i.name+"side")||r)&&(!a.contains(i.name+"side_extract")||!r)){var s=e.context,l=p$1d.inverse(i._excavateMatrix,new p$1d),u=i.positions,c=i.rectangle,h=c.east-c.west,d=c.north-c.south,f=u.length/3,p=new Float32Array(8*f),_=new Float32Array(6*f),m=new Float32Array(4*f),g=new Uint16Array(6*f),x=new o$1p,v=f$18.fromRectangle(i.rectangle),y=Math.max(v.width/100,1),$=Math.max(v.height/100,1),b=Math.max(y,$);b=Math.floor(b),b=Math.min(b,10);for(var T=0;T<f;T++){var C,S;n?(C=new o$1p((C=o.project(a$18.fromDegrees(u[3*T+0],u[3*T+1],-1e4))).z,C.x,C.y),S=new o$1p((S=o.project(a$18.fromDegrees(u[3*T+0],u[3*T+1],1e4))).z,S.x,S.y)):(C=o$1p.fromDegrees(u[3*T+0],u[3*T+1],-1e4),S=o$1p.fromDegrees(u[3*T+0],u[3*T+1],1e4)),x.x=C.x,x.y=C.y,x.z=C.z,x.w=1,p$1d.multiplyByVector(l,x,x),C.x=x.x,C.y=x.y,C.z=x.z,x.x=S.x,x.y=S.y,x.z=S.z,x.w=1,p$1d.multiplyByVector(l,x,x),S.x=x.x,S.y=x.y,S.z=x.z,p[8*T]=S.x,p[8*T+1]=S.y,p[8*T+2]=S.z,p[8*T+3]=1e4,p[8*T+4]=C.x,p[8*T+5]=C.y,p[8*T+6]=C.z,p[8*T+7]=-1e4,_[6*T+0]=_[6*T+3]=(e$2a.toRadians(u[3*T+0])-c.west)/h,_[6*T+1]=_[6*T+4]=(e$2a.toRadians(u[3*T+1])-c.south)/d,_[6*T+2]=_[6*T+5]=i.height,m[4*T+0]=b*(T%2),m[4*T+1]=t._excavateTextureWrap===q$19.CLAMP_TO_EDGE?1:200,m[4*T+2]=b*(T%2),m[4*T+3]=0}for(T=0;T<f-1;T++)g[6*T+0]=0+2*T,g[6*T+1]=2+2*T,g[6*T+2]=3+2*T,g[6*T+3]=0+2*T,g[6*T+4]=3+2*T,g[6*T+5]=1+2*T;g[6*(f-1)+0]=0+2*(f-1),g[6*(f-1)+1]=0,g[6*(f-1)+2]=1,g[6*(f-1)+3]=0+2*(f-1),g[6*(f-1)+4]=1,g[6*(f-1)+5]=1+2*(f-1);var w=t$Y.createVertexBuffer({context:s,typedArray:p,usage:A$19.STATIC_DRAW}),E=t$Y.createVertexBuffer({context:s,typedArray:_,usage:A$19.STATIC_DRAW}),P=t$Y.createVertexBuffer({context:s,typedArray:m,usage:A$19.STATIC_DRAW}),A=[],L={aPosition:0,aTexCoord0:1,aTexCoord1:2};A.push({name:"aPosition",index:L.aPosition,vertexBuffer:w,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),A.push({name:"aTexCoord0",index:L.aTexCoord0,vertexBuffer:E,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),A.push({name:"aTexCoord1",index:L.aTexCoord1,vertexBuffer:P,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var M=t$Y.createIndexBuffer({context:s,typedArray:g,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),R=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:i._excavateMatrix,pass:Le$s.TERRAIN_CLASSIFICATION,owner:t,cull:!1});R.vertexArray=new c$12({context:s,attributes:A,indexBuffer:M});var O=new s$U({sources:[Z$J]}),I=new s$U({sources:[$$N]});r&&I.defines.push("IsExtract"),e$2b(t.excavationNormalTextureUrl)&&I.defines.push("NormalTexture"),R.shaderProgram=r$13.fromCache({name:"SideExcavation",context:s,vertexShaderSource:O,fragmentShaderSource:I,attributeLocations:L}),R.renderState=d$1m.fromCache({cull:{enabled:!1,face:de$x.BACK},depthTest:{enabled:!0}}),R.uniformMap={uRasterTexture:function(){return r?i.heightBuffer2._renderTexture._fb.getColorTexture(0):i.heightBuffer._renderTexture._fb.getColorTexture(0)},uColorTexture:function(){return e$2b(t._excavationSideTexture)?t._excavationSideTexture:s.defaultTexture},uNormalTexture:function(){return t._excavationSideNormalTexture||s.defaultTexture},uExtractHeight:function(){return i.height+t._extractExtendHeight}};var D=new t$F(e.context);D.useType=4,D.environmentVisible.isGlobalVisible=!0,Ja$3(e,i.rectangle,D,n),e$2b(i.removeListenerFunc)||(i.removeListenerFunc=t.tileLoadedEvent.addEventListener((function(e){e$2b(h$18.intersection(e.rectangle,i.rectangle))&&(D.isUpdate=!0)}))),r?(a.set(i.name+"side_extract",R),i.heightBuffer2=D,e._framebufferList["_excavationGlobeHeight2"+i.name]=D):(a.set(i.name+"side",R),i.heightBuffer=D,e._framebufferList["_excavationGlobeHeight"+i.name]=D)}}function dr$2(e,t,i,n,r){var o=e.camera._projection,a=t._excavateRegionCommands;if((!a.contains(i.name+"bottom")||r)&&(!a.contains(i.name+"bottom_extract")||!r)){for(var s=i._excavateMatrix,l=e.context,u=new i$_({primitiveType:W$18.TRIANGLES,pass:Le$s.TERRAIN_CLASSIFICATION,modelMatrix:s}),c=new o$1p,h=[],d=i.worldGeometry,f=p$1d.getTranslation(i.modelMatrix,new o$1p),p=0;p<d.attributes.position.values.length;p+=3)h.push(d.attributes.position.values[p]+f.x),h.push(d.attributes.position.values[p+1]+f.y),h.push(i.height);var _=p$1d.inverse(s,new p$1d),m=[];if(n){p=0;for(var g=h.length;p<g;p+=3){var x=o.project(a$18.fromDegrees(h[p],h[p+1],h[p+2]));m.push(new o$1p(x.z,x.x,x.y))}}else m=o$1p.fromDegreesArrayHeights(h);var v=new Float32Array(4*m.length);for(p=0;p<m.length;p++)c.x=m[p].x,c.y=m[p].y,c.z=m[p].z,c.w=1,p$1d.multiplyByVector(_,c,c),v[4*p]=c.x,v[4*p+1]=c.y,v[4*p+2]=c.z,v[4*p+3]=c.z;var y=i.colorGeometry.attributes.position;y.values=v,y.componentsPerAttribute=4,y.componentDatatype=S$12.FLOAT,u.vertexArray=c$12.fromGeometry({context:l,geometry:i.colorGeometry,attributeLocations:{position:0,st:1},bufferUsage:A$19.STATIC_DRAW,interleave:!0});var $=new s$U({sources:[xa$3]}),b=new s$U({sources:[Ta$3]});if(e$2b(t.excavationNormalTextureUrl)&&b.defines.push("NormalTexture"),u.shaderProgram=r$13.fromCache({name:"BottomExcavation",context:l,vertexShaderSource:$,fragmentShaderSource:b,attributeLocations:{position:0,st:1}}),u.uniformMap={texture1:function(){return e$2b(t._excavationBottomTexture)?t._excavationBottomTexture:l.defaultTexture},uNormalTexture:function(){return t._excavationNormalTexture||l.defaultTexture}},u.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),r){var T=t._extractExtendHeight,C=o$1p.fromArray([0,0,T]),S=p$1d.fromTranslation(C);p$1d.multiply(u.modelMatrix,S,S),u.modelMatrix=S,a.set(i.name+"bottom_extract",u)}else a.set(i.name+"bottom",u)}}function Pe$g(e){for(var t=h$18.clone(e[0].rectangle),i=1,n=e.length;i<n;i++){var r=e[i];t=h$18.union(t,r.rectangle)}return t}function lr$5(e,t){for(var i,n=!1,r=0,o=e.length;r<o;r++){if(i=e[r],e$2b(h$18.simpleIntersection(i.rectangle,t))){n=!0;break}}if(e$2b(i)&&n)for(;e$2b(i);){if(i.rectangle.contains(t))return i;i=i.parent}}function xe$i(e,t,i,n,r,o,a,s){var l=i._southwestChild;e$2b(l)&&e$2b(l.data)&&(e$2b(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2b(l.data.modifyTerrainVertexArray)&&xe$i(e,t,l,n,r,o,a,s))),e$2b(l=i._southeastChild)&&e$2b(l.data)&&(e$2b(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2b(l.data.modifyTerrainVertexArray)&&xe$i(e,t,l,n,r,o,a,s))),e$2b(l=i._northwestChild)&&e$2b(l.data)&&(e$2b(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2b(l.data.modifyTerrainVertexArray)&&xe$i(e,t,l,n,r,o,a,s))),e$2b(l=i._northeastChild)&&e$2b(l.data)&&(e$2b(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2b(l.data.modifyTerrainVertexArray)&&xe$i(e,t,l,n,r,o,a,s)))}function Pa$2(e,t){return t.modifyParentTiles?!(e.level<12):!(!e$2b(e.parent)||!e.parent.isModified)||(e._southwestChild.isModified||e._southeastChild.isModified||e._northwestChild.isModified||e._northeastChild.isModified)}function pi$6(e){var t=e._modifyTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1,n.isModified=!1,n.data.mesh&&(n.data.mesh.isModified=!1),n.data.freeModifyResource()}e._modifyTilesMap={}}function mi$3(e,t){var i=e._modifyTilesMap;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];h$18.intersection(t,r.rectangle)||(r._clipRasterTexture=r._clipRasterTexture&&!r._clipRasterTexture.isDestroyed()&&r._clipRasterTexture.destroy(),r._clipRasterFbo=r._clipRasterFbo&&!r._clipRasterFbo.isDestroyed()&&r._clipRasterFbo.destroy(),r._clipRegionsCount=0,r._clipRegionRasterized=!1,r.isModified=!1,r.data.freeModifyResource(),delete i[n])}}function He$8(e,t,i){var n=new o$1p,r=new o$1p;o$1p.subtract(t,e,n),o$1p.subtract(i,e,r);var o=new o$1p;o$1p.cross(n,r,o),o$1p.normalize(o,o);var a=-o$1p.dot(o,e);return new e$29(o.x,o.y,o.z,a)}function gi$6(e,t){var i=t.context;return new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:e,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})],destroyAttachments:!1,depthStencilTexture:new t$V({context:i,width:e,height:e,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})})}function en$2(e,t){if(!(e._rasterLineFBOs.length>0))for(var i=0;i<e._rasterTextureSizes.length;i++)e._rasterLineFBOs.push(gi$6(e._rasterTextureSizes[i],t))}function tn$3(e,t){if(!(e._rasterAAFBOs.length>0))for(var i=0;i<e._rasterTextureSizes.length;i++)e._rasterAAFBOs.push(gi$6(e._rasterTextureSizes[i],t))}function rn$2(e,t){if(!e$2b(e._lineExpandCommand)||e._rasterLineWidth!==t.rasterLineWidth){e._rasterLineWidth=t.rasterLineWidth;var i=t.context,n=Math.ceil(t.rasterLineWidth),r="#define CORESIZE "+n+"\n",o=new s$U({name:"RasterImageExpandFS_width_"+n,sources:[r+=da$1]}),a=new s$U({name:"ViewportQuadVS",sources:[ot$7]});e._lineExpandCommand=i.createCustomViewportQuadCommand(a,o,{uniformMap:{},owner:e}),e._lineExpandCommand.uniformMap.u_LineTexture=function(){return e._rasterLineFBOs[e._rasterCurrentFBOIdx].getColorTexture(0)},e._lineExpandCommand.uniformMap.u_texelOffset=function(){return 1/e._rasterTextureSizes[e._rasterCurrentFBOIdx]}}}function an$2(e,t){if(!e$2b(e._lineFXAACommand)){var i=t.context,n="#define FXAA_QUALITY_PRESET 39 \n#define FXAA_QUALITY_PS 12 \n#define FXAA_QUALITY_P0 1.0 \n#define FXAA_QUALITY_P1 1.0 \n#define FXAA_QUALITY_P2 1.0 \n#define FXAA_QUALITY_P3 1.0 \n#define FXAA_QUALITY_P4 1.0 \n#define FXAA_QUALITY_P5 1.5 \n#define FXAA_QUALITY_P6 2.0 \n#define FXAA_QUALITY_P7 2.0 \n#define FXAA_QUALITY_P8 2.0 \n#define FXAA_QUALITY_P9 2.0 \n#define FXAA_QUALITY_P10 2.0 \n#define FXAA_QUALITY_P11 8.0 \n"+k$I+"\n"+la$4,r=L$T;e._lineFXAACommand=i.createViewportQuadCommand(i.webgpu?r:n,{shaderProgramName:"RasterLineFXAA",uniformMap:{},owner:e}),e._lineFXAACommand.uniformMap.colorTexture=function(){return e._rasterAAFBOs[e._rasterCurrentFBOIdx].getColorTexture(0)}}}function b$W(){}new o$1p,A$S.prototype._updateModifyTiles=function(e,t,i){for(var n=this._quadtree._tilesToRender,r=n.length,o=!1,a=0;a<r;a++)if(Pa$2(n[a],this)){o=!0;break}if(o){var s=Pe$g(t),l=lr$5(n,s);if(e$2b(l)&&e$2b(l.data)){!e$2b(this.modifyParentTiles)&&i&&(this.modifyParentTiles=l);for(var u=l.data,c=e.context,h=[],d=Number.MAX_VALUE,f=Number.MIN_VALUE,p=(a=0,t.length);a<p;a++){var _=t[a],m=i?_.geometry_extract:_.geometry;h.push(m),d=Math.min(d,_.minimumHeight),f=Math.max(f,_.maximumHeight)}if(l.isModified||u.createModifyVertexArray(c,this,l,h,d,f,!1),e$2b(u.modifyTerrainVertexArray)){if(this.modifyParentTiles&&l.level<this.modifyParentTiles.level)return;xe$i(c,this,l,s,h,d,f,!1)}}}},A$S.prototype._updateModifyRegions=function(e){if(this._modifyRegionUpdate){if(0!==this._quadtree._tilesToRender.length&&!(this._quadtree._tilesToRender[0].level<10)){this._modifyRegionUpdate=!1;var t=this._modifyRegions.values,i=t.length;if(i<1)return void pi$6(this);var n=Pe$g(t);mi$3(this,n),this._excavateRectangle=n;for(var r=0;r<i;r++){var o=t[r];De$j(e.context,o)}var a=lr$5(this._quadtree._tilesToRender,n);if(e$2b(a)&&e$2b(a.data)){var s=a.data,l=e.context,u=[],c=Number.MAX_VALUE,h=Number.MIN_VALUE;for(r=0;r<i;r++){o=t[r];u.push(o.geometry),c=Math.min(c,o.minimumHeight),h=Math.max(h,o.maximumHeight)}s.createModifyVertexArray(l,this,a,u,c,h,!1),e$2b(s.modifyTerrainVertexArray)&&xe$i(l,this,a,n,u,c,h,!0)}}}else this._modifyRegions.length>0&&this._updateModifyTiles(e,this._modifyRegions.values)},A$S.prototype.clearCustomClipBox=function(){this._clipping=!1,this._clipMode=0},A$S.prototype.setCustomClipBox=function(e){if(!((e=e||{}).dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$16("dimensions position is required to create CustomClipBox");if(this._clipMode=2,e$2b(e.clipMode))switch(e.clipMode){case"clip_behind_any_plane":this._clipMode=1;break;case"clip_behind_all_plane":this._clipMode=2;break;case"only_keep_line":this._clipMode=3}if(e.clipLineColor&&e.clipLineColor instanceof e$1U&&(this._clipLineColor=new e$29(e.clipLineColor.red,e.clipLineColor.green,e.clipLineColor.blue,e.clipLineColor.alpha)),e.dimensions){var t=new p$1d,i=e.position,n=new i$15(e.heading||0,e.pitch||0,e.roll||0);m$17.headingPitchRollToFixedFrame(i,n,t$13.WGS84,t);var r=.5*e.dimensions.x,o=.5*e.dimensions.y,a=.5*e.dimensions.z,s=[];s[0]=new e$29,s[0].x=-r,s[0].y=o,s[0].z=a,s[0].w=1,s[1]=new e$29,s[1].x=r,s[1].y=o,s[1].z=a,s[1].w=1,s[2]=new e$29,s[2].x=r,s[2].y=-o,s[2].z=a,s[2].w=1,s[3]=new e$29,s[3].x=-r,s[3].y=-o,s[3].z=a,s[3].w=1,s[4]=new e$29,s[4].x=-r,s[4].y=o,s[4].z=-a,s[4].w=1,s[5]=new e$29,s[5].x=r,s[5].y=o,s[5].z=-a,s[5].w=1,s[6]=new e$29,s[6].x=r,s[6].y=-o,s[6].z=-a,s[6].w=1,s[7]=new e$29,s[7].x=-r,s[7].y=-o,s[7].z=-a,s[7].w=1;for(var l=0;l<8;l++)p$1d.multiplyByVector(t,s[l],s[l]);this._oriClipPlane[0]=e$29.clone(He$8(s[0],s[1],s[2])),this._oriClipPlane[1]=e$29.clone(He$8(s[0],s[4],s[1])),this._oriClipPlane[2]=e$29.clone(He$8(s[0],s[3],s[4])),this._oriClipPlane[3]=e$29.clone(He$8(s[6],s[2],s[5])),this._oriClipPlane[4]=e$29.clone(He$8(s[6],s[7],s[2])),this._oriClipPlane[5]=e$29.clone(He$8(s[6],s[5],s[7]))}else for(l=0;l<e.planePos.length;l++){var u=e.planePos[l],c=e.planeNormal[l];this._oriClipPlane[l].x=c.x,this._oriClipPlane[l].y=c.y,this._oriClipPlane[l].z=c.z,this._oriClipPlane[l].w=-o$1p.dot(u,c)}this._clipping=!0},A$S.prototype.removeAllModifyRegion=function(){for(var e=this._modifyRegions.values,t=0;t<e.length;t++){var i=e[t];e$2b(i.command)&&(i.command.vertexArray=i.command.vertexArray&&!i.command.vertexArray.isDestroyed()&&i.command.vertexArray.destroy(),i.command.shaderProgram=i.command.shaderProgram&&!i.command.shaderProgram.isDestroyed()&&i.command.shaderProgram.destroy()),i.command=void 0}this._modifyRegions.removeAll(),this._modifyTilesMap={},this._modifyRegionUpdate=!1},A$S.prototype.removeAllExcavationRegion=function(){},A$S.prototype.removeAllExtractRegion=function(){},A$S.prototype.isDestroyed=function(){return!1},A$S.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this.removeAllExcavationRegion(),this.removeAllModifyRegion(),this.removeAllExtractRegion(),this._hypsometricTexture=this._hypsometricTexture&&this._hypsometricTexture.destroy(),this._slopeArrowsTexture=this._slopeArrowsTexture&&this._slopeArrowsTexture.destroy();for(var e=0;e<this._rasterTextureSizes.length;e++)e$2b(this._rasterLineFBOs[e])&&this._rasterLineFBOs[e].destroy(),this._rasterAAFBOs.length>0&&this._rasterAAFBOs[e].destroy();return i$10(this)};var _$H=new a$V,ne$y=new o$15,se$o=new o$1p;function ue$q(e,t,i){if(!(u=e.camera).bReflect){var n=t,r=n.width,o=n.height,a=6378137*Math.cos(n.south+.5*o)*Math.sin(r)*.5,s=6378137*Math.sin(o)*.5;r=a,o=s;var l=u.frustum.clone(ne$y),u=e.camera;i.isUpdate=!0,e$2b(i._beginFunc)||(i._beginFunc=function(){i.oldCameraParameter={destination:o$1p.clone(u.position,se$o),orientation:{heading:u.heading,pitch:u.pitch,roll:u.roll}},u.setView({destination:o$1p.fromRadians(n.west+.5*n.width,n.south+.5*n.height,1e3)}),_$H.width=2*r,_$H.height=2*o,_$H.near=1,_$H.far=1e4,_$H.aspectRatio=r/o,u.frustum=_$H,e.context.uniformState.updateFrustum(_$H)}),e$2b(i._endFunc)||(i._endFunc=function(){i.isUpdate=!1,u.frustum=l,u.setView(i.oldCameraParameter),e.context.uniformState.updateFrustum(u.frustum)})}}function n$G(){this.times=void 0,this.points=void 0,t$16.throwInstantiationError()}function r$P(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).points,i=e.times;if(!e$2b(t)||!e$2b(i))throw new t$16("points and times are required.");if(t.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$16("times.length must be equal to points.length.");this._times=i,this._points=t,this._lastTimeIndex=0}function c$M(e){var t=e.points,i=e.times;return function(n,r){e$2b(r)||(r=new n$13);var o=e._lastTimeIndex=e.findTimeInterval(n,e._lastTimeIndex),a=(n-i[o])/(i[o+1]-i[o]),s=t[o],l=t[o+1];return n$13.fastSlerp(s,l,a,r)}}function r$O(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).points,i=e.times;if(!e$2b(t)||!e$2b(i))throw new t$16("points and times are required.");if(t.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$16("times.length must be equal to points.length.");this._times=i,this._points=t,this._evaluateFunction=c$M(this),this._lastTimeIndex=0}function n$F(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).points,i=e.times;if(!e$2b(t)||!e$2b(i))throw new t$16("points and times are required.");if(2!==i.length)throw new t$16("times.length must be equal to 2.");if(2!==t.length)throw new t$16("points.length must be equal to 2.");this._mode=u$_(e.mode,0),this._acceleration=2*o$1p.distance(t[1],t[0])/((i[1]-i[0])*(i[1]-i[0])),this._points=t,this._times=i,this._direction=o$1p.subtract(t[1],t[0],new o$1p),this._duration=this._times[1]-this._times[0],o$1p.normalize(this._direction,this._direction)}b$W._createExcavationSideCommand=function(e,t,i){var n=t._excavateRegionCommands;if(!n.contains(i.name+"side")){for(var r=e.context,o=p$1d.inverse(i._excavateMatrix,new p$1d),a=i.positions,s=i.rectangle,l=s.east-s.west,u=s.north-s.south,c=a.length/3,h=new Float32Array(8*c),d=new Float32Array(6*c),f=new Float32Array(4*c),p=new Uint16Array(6*c),_=new o$1p,m=0;m<c;m++){var g=o$1p.fromDegrees(a[3*m+0],a[3*m+1],-1e3),x=o$1p.fromDegrees(a[3*m+0],a[3*m+1],1e3);_.x=g.x,_.y=g.y,_.z=g.z,_.w=1,p$1d.multiplyByVector(o,_,_),g.x=_.x,g.y=_.y,g.z=_.z,_.x=x.x,_.y=x.y,_.z=x.z,_.w=1,p$1d.multiplyByVector(o,_,_),x.x=_.x,x.y=_.y,x.z=_.z,h[8*m]=x.x,h[8*m+1]=x.y,h[8*m+2]=x.z,h[8*m+3]=1e3,h[8*m+4]=g.x,h[8*m+5]=g.y,h[8*m+6]=g.z,h[8*m+7]=-1e3,d[6*m+0]=d[6*m+3]=(e$2a.toRadians(a[3*m+0])-s.west)/l,d[6*m+1]=d[6*m+4]=(e$2a.toRadians(a[3*m+1])-s.south)/u,d[6*m+2]=d[6*m+5]=i.height,f[4*m+0]=m/(c-1),f[4*m+1]=1,f[4*m+2]=m/(c-1),f[4*m+3]=0}for(m=0;m<c-1;m++)p[6*m+0]=0+2*m,p[6*m+1]=2+2*m,p[6*m+2]=3+2*m,p[6*m+3]=0+2*m,p[6*m+4]=3+2*m,p[6*m+5]=1+2*m;p[6*(c-1)+0]=0+2*(c-1),p[6*(c-1)+1]=0,p[6*(c-1)+2]=1,p[6*(c-1)+3]=0+2*(c-1),p[6*(c-1)+4]=1,p[6*(c-1)+5]=1+2*(c-1);var v=t$Y.createVertexBuffer({context:r,typedArray:h,usage:A$19.STATIC_DRAW}),y=t$Y.createVertexBuffer({context:r,typedArray:d,usage:A$19.STATIC_DRAW}),$=t$Y.createVertexBuffer({context:r,typedArray:f,usage:A$19.STATIC_DRAW}),b=[],T={aPosition:0,aTexCoord0:1,aTexCoord1:2};b.push({name:"aPosition",index:T.aPosition,vertexBuffer:v,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),b.push({name:"aTexCoord0",index:T.aTexCoord0,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),b.push({name:"aTexCoord1",index:T.aTexCoord1,vertexBuffer:$,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var C=t$Y.createIndexBuffer({context:r,typedArray:p,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),S=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:i._excavateMatrix,pass:Le$s.OPAQUE,owner:t,cull:!1});S.vertexArray=new c$12({context:r,attributes:b,indexBuffer:C});var w=new s$U({name:"ExcavationRegionSideVp",sources:[Z$J]}),E=new s$U({name:"ExcavationRegionSideFp",sources:[$$N]});S.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:w,fragmentShaderSource:E,attributeLocations:T}),S.renderState=d$1m.fromCache({cull:{enabled:!1,face:de$x.BACK},depthTest:{enabled:!0}}),S.uniformMap={uRasterTexture:function(){return window.texture11=i.heightBuffer._renderTexture._fb.getColorTexture(0),window.texture11},uColorTexture:function(){return e$2b(t._excavationSideTexture)?t._excavationSideTexture:r.defaultTexture}},n.set(i.name+"side",S);var P=new t$F(e.context);i.heightBuffer=P,P.useType=4,P.environmentVisible.isOnlyS3MObjectVisible=!0;var A=t instanceof A$S?"Globe":"Layer";e._framebufferList["_excavationHeight"+A+i.name]=P,ue$q(e,i.rectangle,P)}},b$W._createExcavationBottomCommand=function(e,t,i){var n=t._excavateRegionCommands;if(!n.contains(i.name+"bottom")){var r=e.context,o=new i$_({primitiveType:W$18.TRIANGLES,pass:Le$s.OPAQUE,modelMatrix:i._excavateMatrix});n.set(i.name+"bottom",o);for(var a=new o$1p,s=[],l=i._geometry,u=0;u<l.attributes.position.values.length;u+=3)a.x=l.attributes.position.values[u],a.y=l.attributes.position.values[u+1],a.z=l.attributes.position.values[u+2],p$1d.multiplyByPoint(t._matModel,a,a),a=a$18.fromCartesian(a),s.push(e$2a.toDegrees(a.longitude)),s.push(e$2a.toDegrees(a.latitude)),s.push(i.height);var c=p$1d.inverse(i._excavateMatrix,new p$1d),h=o$1p.fromDegreesArrayHeights(s),d=new Float32Array(4*h.length);for(u=0;u<h.length;u++)a.x=h[u].x,a.y=h[u].y,a.z=h[u].z,a.w=1,p$1d.multiplyByVector(c,a,a),d[4*u]=a.x,d[4*u+1]=a.y,d[4*u+2]=a.z,d[4*u+3]=a.z;var f=i.colorGeometry.attributes.position;f.values=d,f.componentsPerAttribute=4,f.componentDatatype=S$12.FLOAT,o.vertexArray=c$12.fromGeometry({context:r,geometry:i.colorGeometry,attributeLocations:{position:0,st:1,normal:2},bufferUsage:A$19.STATIC_DRAW,interleave:!0});var p=["attribute vec3 position;","attribute vec2 texCoord;","varying vec2 v_texCoord;","void main()","{"," v_texCoord = texCoord;"," gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);","}"].join("\n"),_=["varying vec2 v_texCoord;","uniform sampler2D texture1;","void main()","{"," gl_FragColor = texture2D(texture1, v_texCoord);","}"].join("\n"),m=new s$U({sources:[p]}),g=new s$U({sources:[_]});o.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:m,fragmentShaderSource:g,attributeLocations:{position:0,texCoord:1}}),o.uniformMap={texture1:function(){return e$2b(t._excavationBottomTexture)?t._excavationBottomTexture:r.defaultTexture}},o.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND})}},b$W.createExcavationSideTexture=function(e,t){t._excavationSideTexture||o$1l(t$11.createIfNeeded(n$15("Assets/Textures/excavationregion_side.jpg")).fetchImage(),(function(i){t._excavationSideTexture=new t$V({context:e.context,source:i})}))},b$W.createExcavationBottomTexture=function(e,t){t._excavationBottomTexture||o$1l(t$11.createIfNeeded(n$15("Assets/Textures/excavationregion_top.jpg")).fetchImage(),(function(i){t._excavationBottomTexture=new t$V({context:e.context,source:i})}))},n$G.prototype.evaluate=t$16.throwInstantiationError,n$G.prototype.findTimeInterval=function(e,t){var i,n=this.times,r=n.length;if(!e$2b(e))throw new t$16("time is required.");if(e<n[0]||e>n[r-1])throw new t$16("time is out of range.");if(e>=n[t=u$_(t,0)]){if(t+1<r&&e<n[t+1])return t;if(t+2<r&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;if(e>n[t])for(i=t;i<r-1&&!(e>=n[i]&&e<n[i+1]);++i);else for(i=t-1;i>=0&&!(e>=n[i]&&e<n[i+1]);--i);return i===r-1&&(i=r-2),i},n$G.prototype.wrapTime=function(e){o$1q.typeOf.number("time",e);var t=this.times,i=t[t.length-1],n=t[0],r=i-n;return e<n&&(e+=(Math.floor((n-e)/r)+1)*r),e>i&&(e-=(Math.floor((e-i)/r)+1)*r),e},n$G.prototype.clampTime=function(e){o$1q.typeOf.number("time",e);var t=this.times;return e$2a.clamp(e,t[0],t[t.length-1])},Object.defineProperties(r$P.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),r$P.prototype.findTimeInterval=n$G.prototype.findTimeInterval,r$P.prototype.wrapTime=n$G.prototype.wrapTime,r$P.prototype.clampTime=n$G.prototype.clampTime,r$P.prototype.evaluate=function(e,t){var i=this.points,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);return e$2b(t)||(t=new o$1p),o$1p.lerp(i[r],i[r+1],o,t)},Object.defineProperties(r$O.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),r$O.prototype.findTimeInterval=n$G.prototype.findTimeInterval,r$O.prototype.wrapTime=n$G.prototype.wrapTime,r$O.prototype.clampTime=n$G.prototype.clampTime,r$O.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},Object.defineProperties(n$F.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),n$F.prototype.clampTime=function(e){return e},n$F.prototype.evaluate=function(e,t){e$2b(t)||(t=new o$1p);var i,n=this._points;(e-=this._times[0],0===this._mode)?i=.5*this._acceleration*e*e:i=this._acceleration*this._duration*e-.5*this._acceleration*e*e;return o$1p.multiplyByScalar(this._direction,i,t),o$1p.add(n[0],t,t),t};var _0x4bc0c3=(_0x25d47d=!0,function(e,t){var i=_0x25d47d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x25d47d=!1,i}),_0x5e134d=_0x4bc0c3(void 0,(function(){return _0x5e134d.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e134d).search("(((.+)+)+)+$")})),_0x25d47d;_0x5e134d();var _0x265574={Linear:0,Acceleration:1,Deceleration:2,CubicSpline:3,SmoothStep:4},_0x186188=Object.freeze(_0x265574),m$N={solve:function(e,t,i,n){if(!(e$2b(e)&&e instanceof Array))throw new t$16("The array lower is required.");if(!(e$2b(t)&&t instanceof Array))throw new t$16("The array diagonal is required.");if(!(e$2b(i)&&i instanceof Array))throw new t$16("The array upper is required.");if(!(e$2b(n)&&n instanceof Array))throw new t$16("The array right is required.");if(t.length!==n.length)throw new t$16("diagonal and right must have the same lengths.");if(e.length!==i.length)throw new t$16("lower and upper must have the same lengths.");if(e.length!==t.length-1)throw new t$16("lower and upper must be one less than the length of diagonal.");var r,o,a=new Array(i.length),s=new Array(n.length),l=new Array(n.length);for(r=0;r<s.length;r++)s[r]=new o$1p,l[r]=new o$1p;for(a[0]=i[0]/t[0],s[0]=o$1p.multiplyByScalar(n[0],1/t[0],s[0]),r=1;r<a.length;++r)o=1/(t[r]-a[r-1]*e[r-1]),a[r]=i[r]*o,s[r]=o$1p.subtract(n[r],o$1p.multiplyByScalar(s[r-1],e[r-1],s[r]),s[r]),s[r]=o$1p.multiplyByScalar(s[r],o,s[r]);for(o=1/(t[r]-a[r-1]*e[r-1]),s[r]=o$1p.subtract(n[r],o$1p.multiplyByScalar(s[r-1],e[r-1],s[r]),s[r]),s[r]=o$1p.multiplyByScalar(s[r],o,s[r]),l[l.length-1]=s[s.length-1],r=l.length-2;r>=0;--r)l[r]=o$1p.subtract(s[r],o$1p.multiplyByScalar(l[r+1],a[r],l[r]),l[r]);return l}},y$I=[],b$V=[],_$G=[],B$H=[];function C$L(e,t,i){var n,r=y$I,o=_$G,a=b$V,s=B$H;r.length=o.length=e.length-1,a.length=s.length=e.length,r[0]=a[0]=1,o[0]=0;var l=s[0];for(e$2b(l)||(l=s[0]=new o$1p),o$1p.clone(t,l),n=1;n<r.length-1;++n)r[n]=o[n]=1,a[n]=4,e$2b(l=s[n])||(l=s[n]=new o$1p),o$1p.subtract(e[n+1],e[n-1],l),o$1p.multiplyByScalar(l,3,l);return r[n]=0,o[n]=1,a[n]=4,e$2b(l=s[n])||(l=s[n]=new o$1p),o$1p.subtract(e[n+1],e[n-1],l),o$1p.multiplyByScalar(l,3,l),a[n+1]=1,e$2b(l=s[n+1])||(l=s[n+1]=new o$1p),o$1p.clone(i,l),m$N.solve(r,a,o,s)}function q$P(e){var t,i=y$I,n=_$G,r=b$V,o=B$H;i.length=n.length=e.length-1,r.length=o.length=e.length,i[0]=n[0]=1,r[0]=2;var a=o[0];for(e$2b(a)||(a=o[0]=new o$1p),o$1p.subtract(e[1],e[0],a),o$1p.multiplyByScalar(a,3,a),t=1;t<i.length;++t)i[t]=n[t]=1,r[t]=4,e$2b(a=o[t])||(a=o[t]=new o$1p),o$1p.subtract(e[t+1],e[t-1],a),o$1p.multiplyByScalar(a,3,a);return r[t]=2,e$2b(a=o[t])||(a=o[t]=new o$1p),o$1p.subtract(e[t],e[t-1],a),o$1p.multiplyByScalar(a,3,a),m$N.solve(i,r,n,o)}function m$M(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).points,i=e.times,n=e.inTangents,r=e.outTangents;if(!(e$2b(t)&&e$2b(i)&&e$2b(n)&&e$2b(r)))throw new t$16("times, points, inTangents, and outTangents are required.");if(t.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$16("times.length must be equal to points.length.");if(n.length!==r.length||n.length!==t.length-1)throw new t$16("inTangents and outTangents must have a length equal to points.length - 1.");this._times=i,this._points=t,this._inTangents=n,this._outTangents=r,this._lastTimeIndex=0}Object.defineProperties(m$M.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}}),m$M.createC1=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).times,i=e.points,n=e.tangents;if(!e$2b(i)||!e$2b(t)||!e$2b(n))throw new t$16("points, times and tangents are required.");if(i.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(t.length!==i.length||t.length!==n.length)throw new t$16("times, points and tangents must have the same length.");var r=n.slice(0,n.length-1);return new m$M({times:t,points:i,inTangents:n.slice(1,n.length),outTangents:r})},m$M.createNaturalCubic=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).times,i=e.points;if(!e$2b(i)||!e$2b(t))throw new t$16("points and times are required.");if(i.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(t.length!==i.length)throw new t$16("times.length must be equal to points.length.");if(i.length<3)return new r$P({points:i,times:t});var n=q$P(i),r=n.slice(0,n.length-1);return new m$M({times:t,points:i,inTangents:n.slice(1,n.length),outTangents:r})},m$M.createClampedCubic=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).times,i=e.points,n=e.firstTangent,r=e.lastTangent;if(!(e$2b(i)&&e$2b(t)&&e$2b(n)&&e$2b(r)))throw new t$16("points, times, firstTangent and lastTangent are required.");if(i.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(t.length!==i.length)throw new t$16("times.length must be equal to points.length.");if(i.length<3)return new r$P({points:i,times:t});var o=C$L(i,n,r),a=o.slice(0,o.length-1);return new m$M({times:t,points:i,inTangents:o.slice(1,o.length),outTangents:a})},m$M.hermiteCoefficientMatrix=new p$1d(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0),m$M.prototype.findTimeInterval=n$G.prototype.findTimeInterval;var x$P=new e$29,c$L=new o$1p;m$M.prototype.wrapTime=n$G.prototype.wrapTime,m$M.prototype.clampTime=n$G.prototype.clampTime,m$M.prototype.evaluate=function(e,t){e$2b(t)||(t=new o$1p);var i=this.points,n=this.times,r=this.inTangents,o=this.outTangents,a=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),s=(e-n[a])/(n[a+1]-n[a]),l=x$P;l.z=s,l.y=s*s,l.x=l.y*s,l.w=1;var u=p$1d.multiplyByVector(m$M.hermiteCoefficientMatrix,l,l);return t=o$1p.multiplyByScalar(i[a],u.x,t),o$1p.multiplyByScalar(i[a+1],u.y,c$L),o$1p.add(t,c$L,t),o$1p.multiplyByScalar(o[a],u.z,c$L),o$1p.add(t,c$L,t),o$1p.multiplyByScalar(r[a],u.w,c$L),o$1p.add(t,c$L,t)};var M$N=new e$29,C$K=new o$1p,s$E=new o$1p;function V$B(e){var t=e.points,i=e.times;if(t.length<3){var n=i[0],r=1/(i[1]-n),o=t[0],a=t[1];return function(e,t){e$2b(t)||(t=new o$1p);var i=(e-n)*r;return o$1p.lerp(o,a,i,t)}}return function(n,r){e$2b(r)||(r=new o$1p);var o,a,s,l,u,c=e._lastTimeIndex=e.findTimeInterval(n,e._lastTimeIndex),h=(n-i[c])/(i[c+1]-i[c]),d=M$N;return d.z=h,d.y=h*h,d.x=d.y*h,d.w=1,0===c?(o=t[0],a=t[1],s=e.firstTangent,l=o$1p.subtract(t[2],o,C$K),o$1p.multiplyByScalar(l,.5,l),u=p$1d.multiplyByVector(m$M.hermiteCoefficientMatrix,d,d)):c===t.length-2?(o=t[c],a=t[c+1],l=e.lastTangent,s=o$1p.subtract(a,t[c-1],C$K),o$1p.multiplyByScalar(s,.5,s),u=p$1d.multiplyByVector(m$M.hermiteCoefficientMatrix,d,d)):(o=t[c-1],a=t[c],s=t[c+1],l=t[c+2],u=p$1d.multiplyByVector(c$K.catmullRomCoefficientMatrix,d,d)),r=o$1p.multiplyByScalar(o,u.x,r),o$1p.multiplyByScalar(a,u.y,s$E),o$1p.add(r,s$E,r),o$1p.multiplyByScalar(s,u.z,s$E),o$1p.add(r,s$E,r),o$1p.multiplyByScalar(l,u.w,s$E),o$1p.add(r,s$E,r)}}var O$z=new o$1p,E$L=new o$1p;function c$K(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).points,i=e.times,n=e.firstTangent,r=e.lastTangent;if(o$1q.defined("points",t),o$1q.defined("times",i),o$1q.typeOf.number.greaterThanOrEquals("points.length",t.length,2),o$1q.typeOf.number.equals("times.length","points.length",i.length,t.length),t.length>2&&(e$2b(n)||(n=O$z,o$1p.multiplyByScalar(t[1],2,n),o$1p.subtract(n,t[2],n),o$1p.subtract(n,t[0],n),o$1p.multiplyByScalar(n,.5,n)),!e$2b(r))){var o=t.length-1;r=E$L,o$1p.multiplyByScalar(t[o-1],2,r),o$1p.subtract(t[o],r,r),o$1p.add(r,t[o-2],r),o$1p.multiplyByScalar(r,.5,r)}this._times=i,this._points=t,this._firstTangent=o$1p.clone(n),this._lastTangent=o$1p.clone(r),this._evaluateFunction=V$B(this),this._lastTimeIndex=0}function r$N(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).points,i=e.times;if(!e$2b(t)||!e$2b(i))throw new t$16("points and times are required.");if(t.length<2)throw new t$16("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$16("times.length must be equal to points.length.");this._times=i,this._points=t,this._lastTimeIndex=0}Object.defineProperties(c$K.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}}),c$K.catmullRomCoefficientMatrix=new p$1d(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0),c$K.prototype.findTimeInterval=n$G.prototype.findTimeInterval,c$K.prototype.wrapTime=n$G.prototype.wrapTime,c$K.prototype.clampTime=n$G.prototype.clampTime,c$K.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},Object.defineProperties(r$N.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),r$N.prototype.findTimeInterval=n$G.prototype.findTimeInterval,r$N.prototype.wrapTime=n$G.prototype.wrapTime,r$N.prototype.clampTime=n$G.prototype.clampTime,r$N.prototype.evaluate=function(e,t){var i=this.points,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);return o*=(3-2*o)*o,e$2b(t)||(t=new o$1p),o$1p.lerp(i[r],i[r+1],o,t)};var _0x3bca38=(_0x5b86cb=!0,function(e,t){var i=_0x5b86cb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b86cb=!1,i}),_0x13f35d=_0x3bca38(void 0,(function(){return _0x13f35d.toString().search("(((.+)+)+)+$").toString().constructor(_0x13f35d).search("(((.+)+)+)+$")})),_0x5b86cb;_0x13f35d();var _0x4744c1={None:0,First:1,Second:2},_0x3ba5f2=Object.freeze(_0x4744c1),j$L=[],D$H=[];function Q$I(e,t,i,n,r){var o=f$14.fromPoints(t,e).projectPointsOntoPlane(t,j$L);A$1g.computeWindingOrder2D(o)===W$13.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var a,s,l=t.length,u=0;if(n)for(a=new Float64Array(2*l*3),s=0;s<l;s++){var c=t[s],h=t[(s+1)%l];a[u++]=c.x,a[u++]=c.y,a[u++]=c.z,a[u++]=h.x,a[u++]=h.y,a[u++]=h.z}else{var d=0;if(r===m$1f.GEODESIC)for(s=0;s<l;s++)d+=y$_.subdivideLineCount(t[s],t[(s+1)%l],i);else if(r===m$1f.RHUMB)for(s=0;s<l;s++)d+=y$_.subdivideRhumbLineCount(e,t[s],t[(s+1)%l],i);for(a=new Float64Array(3*d),s=0;s<l;s++){var f;r===m$1f.GEODESIC?f=y$_.subdivideLine(t[s],t[(s+1)%l],i,D$H):r===m$1f.RHUMB&&(f=y$_.subdivideRhumbLine(e,t[s],t[(s+1)%l],i,D$H));for(var p=f.length,_=0;_<p;++_)a[u++]=f[_]}}var m=2*(l=a.length/3),g=ce$x.createTypedArray(l,m);for(u=0,s=0;s<l-1;s++)g[u++]=s,g[u++]=s+1;return g[u++]=l-1,g[u++]=0,new d$1o({geometry:new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:a})}),indices:g,primitiveType:W$18.LINES})})}function V$A(e,t,i,n,r){var o=f$14.fromPoints(t,e).projectPointsOntoPlane(t,j$L);A$1g.computeWindingOrder2D(o)===W$13.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var a,s,l=t.length,u=new Array(l),c=0;if(n)for(a=new Float64Array(2*l*3*2),s=0;s<l;++s){u[s]=c/3;var h=t[s],d=t[(s+1)%l];a[c++]=h.x,a[c++]=h.y,a[c++]=h.z,a[c++]=d.x,a[c++]=d.y,a[c++]=d.z}else{var f=0;if(r===m$1f.GEODESIC)for(s=0;s<l;s++)f+=y$_.subdivideLineCount(t[s],t[(s+1)%l],i);else if(r===m$1f.RHUMB)for(s=0;s<l;s++)f+=y$_.subdivideRhumbLineCount(e,t[s],t[(s+1)%l],i);for(a=new Float64Array(3*f*2),s=0;s<l;++s){var p;u[s]=c/3,r===m$1f.GEODESIC?p=y$_.subdivideLine(t[s],t[(s+1)%l],i,D$H):r===m$1f.RHUMB&&(p=y$_.subdivideRhumbLine(e,t[s],t[(s+1)%l],i,D$H));for(var _=p.length,m=0;m<_;++m)a[c++]=p[m]}}l=a.length/6;var g=u.length,x=2*(2*l+g),v=ce$x.createTypedArray(l,x);for(c=0,s=0;s<l;++s)v[c++]=s,v[c++]=(s+1)%l,v[c++]=s+l,v[c++]=(s+1)%l+l;for(s=0;s<g;s++){var y=u[s];v[c++]=y,v[c++]=y+l}return new d$1o({geometry:new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:a})}),indices:v,primitiveType:W$18.LINES})})}function A$R(e){if(o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&e$2b(e.height))throw new t$16("Cannot use both options.perPositionHeight and options.height");if(e$2b(e.arcType)&&e.arcType!==m$1f.GEODESIC&&e.arcType!==m$1f.RHUMB)throw new t$16("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var t=e.polygonHierarchy,i=u$_(e.ellipsoid,t$13.WGS84),n=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),r=u$_(e.perPositionHeight,!1),o=r&&e$2b(e.extrudedHeight),a=u$_(e.arcType,m$1f.GEODESIC),s=u$_(e.height,0),l=u$_(e.extrudedHeight,s);if(!o){var u=Math.max(s,l);l=Math.min(s,l),s=u}this._ellipsoid=t$13.clone(i),this._granularity=n,this._height=s,this._extrudedHeight=l,this._arcType=a,this._polygonHierarchy=t,this._perPositionHeight=r,this._perPositionHeightExtrude=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=y$_.computeHierarchyPackedLength(t)+t$13.packedLength+8}A$R.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),i=y$_.packPolygonHierarchy(e._polygonHierarchy,t,i),t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._arcType,t[i++]=u$_(e._offsetAttribute,-1),t[i]=e.packedLength,t};var X$H=t$13.clone(t$13.UNIT_SPHERE),Z$G={polygonHierarchy:{}};function n$E(e){e=e||[],this._extrudedHeight=void 0,this._closeTop=!0,this._closeBottom=!0,this.init(e)}function c$J(e){for(var t=Number.MAX_VALUE,i=-Number.MAX_VALUE,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=0;o<e.length;o++){var a=e[o];t=Math.min(a.x,t),i=Math.max(a.x,i),n=Math.min(a.y,n),r=Math.max(a.y,r)}return{minLon:t,maxLon:i,minLat:n,maxLat:r}}A$R.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=y$_.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=t$13.unpack(e,t,X$H);t+=t$13.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=1===e[t++],u=1===e[t++],c=e[t++],h=e[t++],d=e[t];return e$2b(i)||(i=new A$R(Z$G)),i._polygonHierarchy=n,i._ellipsoid=t$13.clone(r,i._ellipsoid),i._height=o,i._extrudedHeight=a,i._granularity=s,i._perPositionHeight=u,i._perPositionHeightExtrude=l,i._arcType=c,i._offsetAttribute=-1===h?void 0:h,i.packedLength=d,i},A$R.fromPositions=function(e){return e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new A$R({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute})},A$R.createGeometry=function(e){var t=e._ellipsoid,i=e._granularity,n=e._polygonHierarchy,r=e._perPositionHeight,o=e._arcType,a=y$_.polygonOutlinesFromHierarchy(n,!r,t);if(0!==a.length){var s,l,u=[],c=e$2a.chordLength(i,t.maximumRadius),h=e._height,d=e._extrudedHeight;if(e._perPositionHeightExtrude||!e$2a.equalsEpsilon(h,d,0,e$2a.EPSILON2))for(l=0;l<a.length;l++){if((s=V$A(t,a[l],c,r,o)).geometry=y$_.scaleToGeodeticHeightExtruded(s.geometry,h,d,t,r),e$2b(e._offsetAttribute)){var f=s.geometry.attributes.position.values.length/3,p=new Uint8Array(f);e._offsetAttribute===_0x58701d.TOP?p=d$1s(p,1,0,f/2):p=d$1s(p,e._offsetAttribute===_0x58701d.NONE?0:1),s.geometry.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}u.push(s)}else for(l=0;l<a.length;l++){if((s=Q$I(t,a[l],c,r,o)).geometry.attributes.position.values=A$1g.scaleToGeodeticHeight(s.geometry.attributes.position.values,h,t,!r),e$2b(e._offsetAttribute)){var _=s.geometry.attributes.position.values.length,m=new Uint8Array(_/3);d$1s(m,e._offsetAttribute===_0x58701d.NONE?0:1),s.geometry.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}u.push(s)}var g=k$13.combineInstances(u)[0],x=i$1c.fromVertices(g.attributes.position.values);return new I$1p({attributes:g.attributes,indices:g.indices,primitiveType:g.primitiveType,boundingSphere:x,offsetAttribute:e._offsetAttribute})}},n$E.prototype=new o$11,n$E.prototype.constructor=n$E,n$E.prototype.parent=o$11.prototype,Object.defineProperties(n$E.prototype,{partCount:{get:function(){return this.parts.length}},extrudedHeight:{get:function(){return this._extrudedHeight},set:function(e){this._extrudedHeight=e,this.polygon.extrudedHeight=e,this._isGeometryDirty=!0}},closeTop:{set:function(e){this._closeTop=e,this.polygon.closeTop=e,this._isGeometryDirty=!0}},closeBottom:{set:function(e){this._closeBottom=e,this.polygon.closeBottom=e,this._isGeometryDirty=!0}},bottomAltitude:{get:function(){return this.polygon.height},set:function(e){this.polygon.height=e,this.polygon.perPositionHeight=!1,this._isGeometryDirty=!0}}}),n$E.prototype.init=function(e){this.type=P$U.GEOREGION3D,this.parts=[],this.points=[],this.polygon={positions:[],extrudedHeight:this.extrudedHeight,closeTop:this._closeTop,closeBottom:this._closeBottom,perPositionHeight:!0};for(var t=0,i=e.length;t<i;t++){var n=e[t].pntArray.length;if(this.parts.push(n),n>0)for(var r=0;r<n;r++)this.polygon.positions.push(o$1p.fromDegrees(e[t].pntArray[r].x,e[t].pntArray[r].y,e[t].pntArray[r].z)),this.points.push(new s$M(e[t].pntArray[r].x,e[t].pntArray[r].y,e[t].pntArray[r].z))}this.type=P$U.GEOREGION3D;var o=c$J(this.points),a=o$1p.fromDegrees(o.minLon,o.maxLat,0),s=o$1p.fromDegrees(o.maxLon,o.maxLat,0),l=o$1p.fromDegrees(o.minLon,o.minLat,0);this.width=o$1p.distance(a,s),this.height=o$1p.distance(a,l)},n$E.prototype.addPart=function(e){if(!(!e instanceof t$M)){for(var t=0,i=e.pntArray.length;t<i;t++){var n=e.pntArray[t];this.points.push(n),this.polygon.positions.push(o$1p.fromDegrees(n.x,n.y,n.z))}this.parts.push(e.pntArray.length)}},n$E.prototype.getPart=function(e){if("number"!=typeof e||e>=this.partCount)return null;for(var t=new t$M,i=0,n=0;n<e;n++)i+=this.parts[n];for(n=i;n<this.parts[e];n++)t.add(new s$M(this.points[n].x,this.points[n].y,this.points[n].z));return t},n$E.prototype._createGeometry=function(){var e=z$_.fromPositions(this.polygon);this._geometry=z$_.createGeometry(e),this._isGeometryDirty=!1};const _0x33085f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2bd048=_0x33085f(void 0,(function(){return _0x2bd048.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bd048).search("(((.+)+)+)+$")}));_0x2bd048();const _0x3e247e="uExcavationTexture",_0x18c5c2="uEmissionTexAtlas",_0x3dbc30="uFrontColorTexture",_0xa67472="uFrontDepthTexture",_0x53a5d5="uBackDepthTexture",_0x366751="uCategorieTexture",_0x4ea79b="uOverlayTexture",_0x431981="uFlattenTexture",_0x2a4e3b="uHypsometricTexture",_0x1f609="uHypsometricRenderTexture",_0xbbfeb6="uNormalDepthTexture";function _0x473d2d(e){var t=_0x3e2f69.call(this)||this;t._layer=e,t._hasExcavation=e._hasExcavation,t._textures={},t._name=_0x27131a.LAYER,t._lastTextureUpdateFrame=-1,this._initUniformMap()}function _0x21ffef(e){return 1!==e._brightness||1!==e._contrast||0!==e._hue||1!==e._saturation||1!==e._gamma}function _0x4c279e(e){var t=e._fileType;return t===d$15.ClampGroundPolygon||t===d$15.ClampObjectPolygon||t===d$15.ExtendClampPolygonCache||t===d$15.ClampGroundLine||t===d$15.ClampObjectLine}_0x3e2f69&&(_0x473d2d.__proto__=_0x3e2f69),_0x473d2d.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x473d2d.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x473d2d.prototype,{}),_0x473d2d.prototype._initUBOStruct=function(){this._ubo.addUniform("uSelColor",4),this._ubo.addUniform("uTranslationAndBottom",4),this._ubo.addUniform("uFillForeColor",4),this._ubo.addUniform("uPolygonOffset",4),this._ubo.addUniform("uPointSize",1),this._ubo.addUniform("uMinMaxTransparent",2),this._ubo.addUniform("uTransparentFilter",1),this._ubo.addUniform("uHypLineColor",4),this._ubo.addUniform("uNoValueColor",4),this._ubo.addUniform("uHypRect",4),this._ubo.addUniform("uHypHasAnalysisRegion",1),this._ubo.addUniform("uMixColorType",1),this._ubo.addUniform("uHypOpacity",1),this._ubo.addUniform("uHypContourInterval",1),this._ubo.addUniform("uHypContourFillMode",1),this._ubo.addUniform("uHypFloor",1),this._ubo.addUniform("uHypCeil",1),this._ubo.addUniform("uDataFloor",1),this._ubo.addUniform("uDataCeil",1),this._ubo.addUniform("uHypMaxVisibleValue",1),this._ubo.addUniform("uHypMinVisibleValue",1),this._ubo.addUniform("uHypsometricVisible",1),this._ubo.addUniform("uRect",4),this._ubo.addUniform("uCameraHeight",1),this._ubo.addUniform("uExcavationRect",4),this._ubo.addUniform("uServerExcavationRect",4),this._ubo.addUniform("uExcavationMode",1),this._ubo.addUniform("uServerExcavationMode",1),this._ubo.addUniform("uSwipeRegion",4),this._ubo.addUniform("uBrightness",1),this._ubo.addUniform("uContrast",1),this._ubo.addUniform("uHue",1),this._ubo.addUniform("uSaturation",1),this._ubo.addUniform("uOneOverGamma",1),this._ubo.addUniform("uClipPlanes",4,6),this._ubo.addUniform("uClipLineColor",4),this._ubo.addUniform("uClipMode",1),this._ubo.addUniform("uMaxCategory",1),this._ubo.addUniform("uMinCategory",1),this._ubo.addUniform("uCategoryWidht",1),this._ubo.addUniform("uCategoryHeight",1),this._ubo.addUniform("uLineColor",4),this._ubo.addUniform("uLineWidth",1),this._ubo.addUniform("uFillStyle",1),this._ubo.addUniform("uTransparentBackColor",4),this._ubo.addUniform("uTransparentBackColorTolerance",1),this._ubo.addUniform("uVisibleDistanceMax",1),this._ubo.addUniform("uHorizontalColor",4),this._ubo.addUniform("uHorizontalLine",1),this._ubo.addUniform("uDistanceFalloffFactor",1),this._ubo.addUniform("uStrokesTextureScale",2),this._ubo.addUniform("uStrokesLog2Resolution",1),this._ubo.addUniform("uMinMaxTerrainHeightAndPickInfo",4),this._ubo.addUniform("uOverlayRect",4),this._ubo.addUniform("uEmissionTexAtlasTilingAndOffset",4,10),this._ubo.addUniform("uEmissionTexAtlasRects",4,10),this._ubo.addUniform("uEmissionColor",4),this._ubo.addUniform("uLayerBounds",4),this._ubo.addUniform("uLayerCornerLength",1),this._ubo.addUniform("uMaxCategoryOrHypCeil",1),this._ubo.addUniform("uMinCategoryOrHypFloor",1),this._ubo.addUniform("uEmissionTexAtlasCount",1),this._ubo.addUniform("uSnowCoverageFactor",1),this._ubo.addUniform("uAnimationSpeed",1),this._ubo.addUniform("uRippleScale",1),this._ubo.addUniform("uWindIntensity",1),this._ubo.addUniform("uRain",1),this._ubo.addUniform("uCameraDepth",1),this._ubo.addUniform("uWetnessFactor",1),this._ubo.addUniform("uSelectColorType",1)},_0x473d2d.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x473d2d.prototype._updateHypData=function(){const e=this._layer,t=e._hypsometricSetting,i=t.LineColor,n=t.noValueColor,r=e._hypsometricBound;this._ubo.updateFloat4("uHypLineColor",i.red,i.green,i.blue,i.alpha),this._ubo.updateFloat4("uNoValueColor",n.red,n.green,n.blue,n.alpha),this._ubo.updateFloat4("uHypRect",r.x,r.y,r.z,r.w),this._ubo.updateFloat("uHypHasAnalysisRegion",e._bUseHypRegion),this._ubo.updateFloat("uMixColorType",e._mixColorType),this._ubo.updateFloat("uHypOpacity",t.Opacity),this._ubo.updateFloat("uHypContourInterval",t.LineInterval);let o=1;switch(t.DisplayMode){case k$Q.DisplayMode.NONE:o=0;break;case k$Q.DisplayMode.FACE:o=1;break;case k$Q.DisplayMode.LINE:o=2;break;case k$Q.DisplayMode.FACE_AND_LINE:o=3}this._ubo.updateFloat("uHypContourFillMode",o),this._ubo.updateFloat("uHypFloor",t.ColorTableMinKey),this._ubo.updateFloat("uHypCeil",t.ColorTableMaxKey);let a=e._fMinValue===e._fMaxValue?0:e._fMinValue,s=e._fMinValue===e._fMaxValue?1:e._fMaxValue;this._ubo.updateFloat("uDataFloor",a),this._ubo.updateFloat("uDataCeil",s),this._ubo.updateFloat("uHypMaxVisibleValue",t.MaxVisibleValue),this._ubo.updateFloat("uHypMinVisibleValue",t.MinVisibleValue+e$2a.EPSILON5),this._ubo.updateFloat("uHypsometricVisible",1)},_0x473d2d.prototype._updateWVisibleData=function(){this._ubo.updateVector4("uMaxCategory",this._layer._bUseHypRegion),this._ubo.updateVector4("uMinCategory",this._layer._bUseHypRegion),this._ubo.updateVector4("uCategoryWidht",this._layer._bUseHypRegion),this._ubo.updateVector4("uCategoryHeight",this._layer._bUseHypRegion)},_0x473d2d.prototype._updateSwipe=function(){const e=this._layer,t=this._ubo,i=e._frameState.context,n=e._swipeRegion,r=i.drawingBufferWidth,o=e._frameState.context.drawingBufferHeight,a=n.x*r,s=(1-n.y)*o,l=n.z*r,u=(1-n.w)*o;t.updateFloat4("uSwipeRegion",a,s,l,u)},_0x473d2d.prototype._updateEmissive=function(){const e=this._layer,t=this._ubo,i=e._layerModelBounds,n=i.x,r=i.y,o=i.z-i.x,a=i.w-i.y,s=Math.sqrt(i.z*i.z+i.w*i.w);let l=100,u=0;const c=e._hypsometricSetting;if(e$2b(c)&&(0!==c._floor||0!==c._ceiling)&&(l=c._ceiling,u=c._floor),t.updateFloat4("uLayerBounds",n,r,o,a),t.updateFloat("uLayerCornerLength",s),t.updateFloat("uMaxCategoryOrHypCeil",l),t.updateFloat("uMinCategoryOrHypFloor",u),e$2b(c)){var h=c._getEmissionAtlasTextureRects(),d=c._getEmissionTexAtlasTilingAndOffset(),f=[],p=[];let e=Math.min(10,h.length);for(let t=0;t<e;t++){let e=h[t];e$29.pack(e,f,4*t);let i=d[t];e$29.pack(i,p,4*t)}t.updateFloatArray("uEmissionTexAtlasRects",f),t.updateFloatArray("uEmissionTexAtlasTilingAndOffset",p),t.updateFloat("uEmissionTexAtlasCount",e)}},_0x473d2d.prototype._updateClipValue=function(){const e=this._layer,t=this._ubo,i=e._clipLineColor,n=e._clipPlane,r=n.length,o=new Array(4*r);for(let e=0;e<r;e++){const t=n[e];o[4*e]=t.x,o[4*e+1]=t.y,o[4*e+2]=t.z,o[4*e+3]=t.w}t.updateFloatArray("uClipPlanes",o),t.updateFloat4("uClipLineColor",i.x,i.y,i.z,i.w),t.updateFloat("uClipMode",e._clipMode)},_0x473d2d.prototype._updateWireFrameSketch=function(){const e=this._layer,t=this._ubo;e$2b(e._edgeStrokesTexture)||e._initEdgeTexture(),t.updateFloat2("uStrokesTextureScale",e._strokesTextureScale.x,e._strokesTextureScale.y),t.updateFloat("uStrokesLog2Resolution",e._strokesLog2Resolution)},_0x473d2d.prototype.update=function(e,t){if(!e.webgpu&&!e.webgl2)return;e$2b(this._ubo)||this._initUBO(e);const i=this._layer,n=this._ubo,r=i.style3D,o=i.selectedColor,a=i.selectedTranslate,s=r.fillForeColor,l=r.emissionColor;this._ubo.updateFloat4("uSelColor",o.red,o.green,o.blue,o.alpha),this._ubo.updateFloat4("uTranslationAndBottom",a.x,a.y,a.z,r.bottomAltitude),this._ubo.updateFloat4("uFillForeColor",s.red,s.green,s.blue,s.alpha),this._ubo.updateFloat4("uEmissionColor",l.red,l.green,l.blue,l.alpha);var u=this._layer._rsColor.polygonOffset,c=0,h=0;e$2b(u)&&(c=u.factor,h=u.units),this._ubo.updateFloat4("uPolygonOffset",c,h,-5,-5),this._ubo.updateFloat("uPointSize",this._layer.style3D.pointSize);const d=r.lineColor,f=r.lineWidth;if(this._ubo.updateFloat4("uLineColor",d.red,d.green,d.blue,d.alpha),this._ubo.updateFloat("uLineWidth",f),this._layer._hasExcavation&&(this._ubo.updateFloat2("uExcavationMode",this._layer._excavationMode),this._ubo.updateFloat4("uExcavationRect",this._layer._excavationBounds.x,this._layer._excavationBounds.y,this._layer._excavationBounds.z,this._layer._excavationBounds.w)),n.updateFloat2("uMinMaxTransparent",i.minTransparentAlpha,i.maxTransparentAlpha),i._flattening&&(this._ubo.updateVector4("uRect",i._flattenBounds),this._ubo.updateFloat("uCameraHeight",i._frameState.camera.positionCartographic.height)),i._bUseHypColorTable&&this._updateHypData(),i._hasExcavation&&(n.updateVector4("uExcavationRect",i._excavationBounds),n.updateFloat("uExcavationMode",i._excavationMode)),i._hasServerExcavation&&(n.updateVector4("uServerExcavationRect",i._serverExcavationBounds),n.updateFloat("uServerExcavationMode",i._serverExcavationMode)),i.swipeEnabled&&this._updateSwipe(),i._hasEmissiveTexAtlas&&this._updateEmissive(),_0x21ffef(i)&&(n.updateFloat("uBrightness",i._brightness),n.updateFloat("uContrast",i._contrast),n.updateFloat("uHue",i._hue),n.updateFloat("uSaturation",i._saturation),n.updateFloat("uOneOverGamma",1/i._gamma)),i._clipping&&this._updateClipValue(),e$2b(i._categorieTexture)&&(n.updateFloat("uMaxCategory",i._hypMaxCategory),n.updateFloat("uMinCategory",i._hypMinCategory),n.updateFloat("uCategoryWidht",i._categorieTexture&&i._categorieTexture.width||256),n.updateFloat("uCategoryHeight",i._categorieTexture&&i._categorieTexture.height||1)),n.updateFloat("uFillStyle",i.style3D.fillStyle),i._transparentBackColorTolerance>0&&(n.updateColor("uTransparentBackColor",i._transparentBackColor),n.updateFloat("uTransparentBackColorTolerance",i._transparentBackColorTolerance)),i.visibleDistanceMax<6378137&&i.translucencyByDistance&&n.updateFloat("uVisibleDistanceMax",i._visibleDistanceMax),i.horizontalline&&(n.updateVector4("uHorizontalColor",i._HorizontalColor),n.updateFloat("uHorizontalLine",i._fHorizontalLine)),n.updateFloat("uDistanceFalloffFactor",i._edgeDistanceFalloffFactor),i.wireFrameMode===_0x15916e.Sketch&&this._updateWireFrameSketch(),_0x4c279e(i)&&n.updateFloat4("uMinMaxTerrainHeightAndPickInfo",i._shadowVolumeBottomHeight,i._shadowVolumeTopHeight,i._picking,i._context._pickPositionHeight),i._hasOverlay&&n.updateVector4("uOverlayRect",i._overlayBounds),i._hasSnowEffect){const e=i._PBRMaterialParams.pbrMetallicRoughness.snowEffect;let t=e.snow_coverage>0?e.snow_coverage:.5;n.updateFloat("uSnowCoverageFactor",t)}if(i._hasRainEffect){const e=i._PBRMaterialParams.pbrMetallicRoughness.rainEffect,t=e.ripple_scale>0?e.ripple_scale:5,r=e.rain>0?e.rain:200,o=e.cameraDepth>0?e.cameraDepth:.8,a=e.wetnessFactor>0?e.wetnessFactor:0;n.updateFloat("uAnimationSpeed",e.animationSpeed),n.updateFloat("uRippleScale",t),n.updateFloat("uWindIntensity",e.wind_intensity),n.updateFloat("uRain",r),n.updateFloat("uCameraDepth",o),n.updateFloat("uWetnessFactor",a)}n.updateFloat("uSelectColorType",i.selectColorType),n.updateFloat("uTransparentFilter",i.selectionFiltrateByTransparency),this._ubo.update(),this._setLayerTextureToUBO(t)},_0x473d2d.prototype._setLayerTextureToUBO=function(e){e.frameNumber!=this._lastTextureUpdateFrame&&(e$2b(this._layer._sqTextures)&&this._layer._sqTextures.length>0?(this._isLayerTextureChanged(_0xa67472,this._layer._sqTextures[0]),this._isLayerTextureChanged(_0x53a5d5,this._layer._sqTextures[1]),this._isLayerTextureChanged(_0x3dbc30,this._layer._sqTextures[2])):(this._isLayerTextureChanged(_0xa67472,void 0),this._isLayerTextureChanged(_0x53a5d5,void 0),this._isLayerTextureChanged(_0x3dbc30,void 0)),this._isLayerTextureChanged(_0x18c5c2,this._layer._hasEmissiveTexAtlas?this._layer._hypsometricSetting._emissionTextureAtlas.texture:void 0),this._isLayerTextureChanged(_0x366751,this._layer._categorieTexture),this._isLayerTextureChanged(_0x3e247e,this._layer._excavationTexture),this._isLayerTextureChanged(_0x4ea79b,this._layer._overlayTexture),this._isLayerTextureChanged(_0x431981,this._layer._flattenTexture),this._isLayerTextureChanged(_0x2a4e3b,this._layer._hypsometricTexture),this._isLayerTextureChanged(_0x1f609,this._layer._hypsometricRenderTexture),this._isLayerTextureChanged(_0xbbfeb6,this._layer.isSilhouette()?this._layer._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0):void 0),this._lastTextureUpdateFrame=e.frameNumber)},_0x473d2d.prototype._isLayerTextureChanged=function(e,t){this._isTextureDirty=this._textures[e]!==t,this._textures[e]=t},_0x473d2d.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name);for(const t in this._textures)this._setTextureToEffect(e,this._textures[t],t)},_0x473d2d.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}};var _0x3fda11=new o$1o,_0x43b22a=new o$1o;const _0x3adb9f=new e$29;_0x473d2d.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(!t.webgl2&&!t.webgpu){var i={uSelColor:function(){return e.selectedColor},uTranslationAndBottom:function(){return _0x3adb9f.x=e.selectedTranslate.x,_0x3adb9f.y=e.selectedTranslate.y,_0x3adb9f.z=e.selectedTranslate.z,_0x3adb9f.w=e.style3D.bottomAltitude,e.selectedTranslate},uFillForeColor:function(){return e.style3D.fillForeColor},uPolygonOffset:function(){var t=e._rsColor.polygonOffset;return e$2b(t)?(_0x43b22a.x=t.factor,_0x43b22a.y=t.units):(_0x43b22a.x=0,_0x43b22a.y=0),_0x43b22a},uPointSize:function(){return e.style3D.pointSize},uMinMaxTransparent:function(){return _0x3fda11.x=e.minTransparentAlpha,_0x3fda11.y=e.maxTransparentAlpha,_0x3fda11},uTransparentFilter:function(){return e.selectionFiltrateByTransparency},uHypLineColor:function(){return e$2b(e._hypsometricSetting)?(_0x3adb9f.x=e._hypsometricSetting.LineColor.red,_0x3adb9f.y=e._hypsometricSetting.LineColor.green,_0x3adb9f.z=e._hypsometricSetting.LineColor.blue,_0x3adb9f.w=e._hypsometricSetting.LineColor.alpha,_0x3adb9f):e$29.ZERO},uNoValueColor:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.noValueColor:Color.WHITE},uHypRect:function(){return e._hypsometricBound},uHypHasAnalysisRegion:function(){return e._bUseHypRegion},uMixColorType:function(){return e$2b(e._mixColorType)?e._mixColorType:0},uHypOpacity:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.Opacity:1},uHypContourInterval:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.LineInterval:100},uHypContourFillMode:function(){var t=1;if(e$2b(e._hypsometricSetting))switch(e._hypsometricSetting.DisplayMode){case k$Q.DisplayMode.NONE:t=0;break;case k$Q.DisplayMode.FACE:t=1;break;case k$Q.DisplayMode.LINE:t=2;break;case k$Q.DisplayMode.FACE_AND_LINE:t=3}return t},uHypFloor:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMaxKey:0},uDataFloor:function(){return e._fMinValue===e._fMaxValue?0:e._fMinValue},uDataCeil:function(){return e._fMinValue===e._fMaxValue?1:e._fMaxValue},uHypMaxVisibleValue:function(){return(e$2b(e._hypsometricSetting)?e._hypsometricSetting.MaxVisibleValue:0)+e$2a.EPSILON5},uHypMinVisibleValue:function(){return(e$2b(e._hypsometricSetting)?e._hypsometricSetting.MinVisibleValue:0)-e$2a.EPSILON5},uHypsometricVisible:function(){return 1},uRect:function(){return e._flattenBounds},uCameraHeight:function(){return e._frameState.camera.positionCartographic.height},uExcavationMode:function(){return e._excavationMode},uExcavationRect:function(){return e._excavationBounds},uServerExcavationMode:function(){return e._serverExcavationMode},uServerExcavationRect:function(){return e._serverExcavationBounds},uSwipeRegion:function(){return _0x3adb9f.x=e._swipeRegion.x*e._frameState.context.drawingBufferWidth,_0x3adb9f.y=(1-e._swipeRegion.y)*e._frameState.context.drawingBufferHeight,_0x3adb9f.z=e._swipeRegion.z*e._frameState.context.drawingBufferWidth,_0x3adb9f.w=(1-e._swipeRegion.w)*e._frameState.context.drawingBufferHeight,_0x3adb9f},uBrightness:function(){return e._brightness},uContrast:function(){return e._contrast},uHue:function(){return e._hue},uSaturation:function(){return e._saturation},uOneOverGamma:function(){return 1/e._gamma},uClipMode:function(){return e._clipMode},uClipPlanes:function(){return e._clipPlane},uClipLineColor:function(){return e._clipLineColor},uMaxCategory:function(){return e._hypMaxCategory},uMinCategory:function(){return e._hypMinCategory},uCategoryWidht:function(){return e._categorieTexture&&e._categorieTexture.width||256},uCategoryHeight:function(){return e._categorieTexture&&e._categorieTexture.height||1},uLineColor:function(){return e.style3D.lineColor},uLineWidth:function(){return e.style3D.lineWidth},uFillStyle:function(){return e.style3D.fillStyle},uTransparentBackColor:function(){return e._transparentBackColor},uTransparentBackColorTolerance:function(){return e._transparentBackColorTolerance},uVisibleDistanceMax:function(){return e._visibleDistanceMax},uHorizontalColor:function(){return e$2b(e$2b(e._HorizontalColor))?e._HorizontalColor:new e$29(1,1,0,0)},uHorizontalLine:function(){return e$2b(e._fHorizontalLine)?e._fHorizontalLine:0},uDistanceFalloffFactor:function(){return e._edgeDistanceFalloffFactor},uStrokesTextureScale:function(){return e._strokesTextureScale},uStrokesLog2Resolution:function(){return e._strokesLog2Resolution},uMinMaxTerrainHeightAndPickInfo:function(){return _0x3adb9f.x=e._shadowVolumeBottomHeight,_0x3adb9f.x=e._shadowVolumeTopHeight,_0x3adb9f.x=e._picking,_0x3adb9f.x=e._context._pickPositionHeight,_0x3adb9f},uOverlayRect:function(){return e._overlayBounds},uEmissionTexAtlasTilingAndOffset:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting._getEmissionTexAtlasTilingAndOffset():[]},uEmissionTexAtlasRects:function(){return e$2b(e._hypsometricSetting)?e._hypsometricSetting._getEmissionAtlasTextureRects():[]},uEmissionColor:function(){return e.style3D.emissionColor},uLayerBounds:function(){return _0x3adb9f.x=e._layerModelBounds.x,_0x3adb9f.y=e._layerModelBounds.y,_0x3adb9f.z=e._layerModelBounds.z-e._layerModelBounds.x,_0x3adb9f.w=e._layerModelBounds.w-e._layerModelBounds.y,_0x3adb9f},uLayerCornerLength:function(){return Math.sqrt(e._layerModelBounds.z*e._layerModelBounds.z+e._layerModelBounds.w*e._layerModelBounds.w)},uMaxCategoryOrHypCeil:function(){var t=e._hypMaxCategory;return e$2b(e._hypsometricSetting)&&(0!=e._hypsometricSetting._floor||0!=e._hypsometricSetting._ceiling)&&(t=e._hypsometricSetting._ceiling),e$2b(t)||(t=100),t},uMinCategoryOrHypFloor:function(){var t=e._hypMinCategory;return e$2b(e._hypsometricSetting)&&(0!=e._hypsometricSetting._floor||0!=e._hypsometricSetting._ceiling)&&(t=e._hypsometricSetting._floor),e$2b(t)||(t=0),t},uEmissionTexAtlasCount:function(){const t=e._hypsometricSetting;if(e$2b(t)){var i=t._getEmissionAtlasTextureRects();return Math.min(10,i.length)}return 0},uSnowCoverageFactor:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.snowEffect;return t.snow_coverage>0?t.snow_coverage:.5},uAnimationSpeed:function(){return e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.animationSpeed},uRippleScale:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.ripple_scale>0?t.ripple_scale:5},uWindIntensity:function(){return e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity},uRain:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.rain>0?t.rain:200},uCameraDepth:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.cameraDepth>0?t.cameraDepth:.8},uWetnessFactor:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.wetnessFactor>0?t.wetnessFactor:0}};this._uniformMap=i}},_0x473d2d.prototype.isDestroyed=function(){return!1},_0x473d2d.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};const _0x551bf4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x50c528=_0x551bf4(void 0,(function(){return _0x50c528.toString().search("(((.+)+)+)+$").toString().constructor(_0x50c528).search("(((.+)+)+)+$")}));function _0x360415(e){var t=_0x3e2f69.call(this)||this;t._layer=e,t._name=_0x27131a.WaterLayer,this._initUniformMap()}_0x50c528(),_0x3e2f69&&(_0x360415.__proto__=_0x3e2f69),_0x360415.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x360415.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x360415.prototype,{}),_0x360415.prototype._initUBOStruct=function(){this._ubo.addUniform("uWaterColor",4),this._ubo.addUniform("uSunColor",4),this._ubo.addUniform("uBumpSpeed",2),this._ubo.addUniform("uTimeVal",1),this._ubo.addUniform("uWaterBrightness",1),this._ubo.addUniform("uUseRefectMap",1),this._ubo.addUniform("uNoiseScale",1),this._ubo.addUniform("uMinVisibleValue",1),this._ubo.addUniform("uMaxVisibleValue",1),this._ubo.addUniform("uReflectMapLod",1)},_0x360415.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())};let _0xfc1b4c=0,_0x55dbf8=0;_0x360415.prototype.update=function(e){if(!e.webgpu&&!e.webgl2)return;e$2b(this._ubo)||this._initUBO(e);const t=this._layer,i=this._ubo,n=t._waterParamter,r=n.waterColour,o=t._frameState.lightSource.sunLightColor,a=n.bumpSpeed,s=n.noiseScale;_0x55dbf8!==t._frameState.frameNumber&&(_0xfc1b4c+=1/60,_0x55dbf8=t._frameState.frameNumber);const l=t._frameState._framebufferList.water;let u=l&&l.isUpdate?1:0;i.updateFloat4("uWaterColor",r.x,r.y,r.z,r.w),i.updateFloat4("uSunColor",o.red,o.green,o.blue,o.alpha),i.updateFloat2("uBumpSpeed",a.x,a.y),i.updateFloat("uTimeVal",_0xfc1b4c),i.updateFloat("uWaterBrightness",n.waterBrightness),i.updateFloat("uUseRefectMap",u),i.updateFloat("uNoiseScale",s),i.updateFloat("uMinVisibleValue",t._hypMinCategory+e$2a.EPSILON5),i.updateFloat("uMaxVisibleValue",t._hypMaxCategory),i.updateFloat("uReflectMapLod",5-l.distinctQuality),this._ubo.update()},_0x360415.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x360415.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x360415.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(t.webgl2||t.webgpu)return;const i=e._waterParamter;this._uniformMap={},this._uniformMap.uWaterColor=function(){return i.waterColour},this._uniformMap.uSunColor=function(){return e._frameState.lightSource.sunLightColor},this._uniformMap.uBumpSpeed=function(){return i.bumpSpeed},this._uniformMap.uTimeVal=function(){return _0x55dbf8!==e._frameState.frameNumber&&(_0xfc1b4c+=1/60,_0x55dbf8=e._frameState.frameNumber),_0xfc1b4c},this._uniformMap.uWaterBrightness=function(){return i.waterBrightness},this._uniformMap.uUseRefectMap=function(){const t=e._frameState._framebufferList.water;return t&&t.isUpdate?1:0},this._uniformMap.uNoiseScale=function(){return i.noiseScale},this._uniformMap.uMaxVisibleValue=function(){return e._hypMaxCategory},this._uniformMap.uMinVisibleValue=function(){return e._hypMinCategory+e$2a.EPSILON5}},_0x360415.prototype.isDestroyed=function(){return!1},_0x360415.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};var _0x21df66=(_0x2a4592=!0,function(e,t){var i=_0x2a4592?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a4592=!1,i}),_0x2b0d67=_0x21df66(void 0,(function(){return _0x2b0d67.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b0d67).search("(((.+)+)+)+$")})),_0x2a4592;_0x2b0d67(),new a$18;var _0x2c98df=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),_0x4a6483={CLIP_NOTHING:0,CLIP_BEHIND_ANY_PLANE:1,CLIP_BEHIND_ALL_PLANE:2,ONLY_KEEP_LINE:3},_0x236c52={Altitude:0,Color:1,Texture:2},_0x2afcbd={Normal:0,Add:1},_0x155b1b={LOD_Loading:0,All_Loading:1},_0x4a4277={DEGREE:"Degree",METER:"Meter"},_0x3fb372=-1e3,_0x15581b=9e3,_0x22e933=function(e){var t=(e=e||{}).gl,i=e.name,n=e.position;if(this._materialType=e.materialType,this._isS3MB=e.isS3MB,this._isOSGB=e.isOSGB,this._isS3MZ=e.isS3MZ,this._isS3MBlock=e.isS3MBlock,this._context=e.context,this._gl=t,this._name=i,this._globeType=e.globeType,this._groupName=e.groupName,this._id=-1,this._version=void 0,this._baseUri=e.baseUri,this._dataType=e.dataType,this._isTextureShare=u$_(e.isTextureShare,!1),this._associateMaterialUrl=e.associateMaterialUrl,this._isTransparencyOptimization=u$_(e.isTransparencyOptimization,!1),this._vertexCompressionType=e.vertexCompressionType,e$2b(e.vertexWeightMode))switch(e.vertexWeightMode){case"DatasetField":default:this._vertexWeightMode=_0x7aa085.DatasetField;break;case"EdgeLengthMin":this._vertexWeightMode=_0x7aa085.EdgeLengthMin}if(this._triangleFiltratePixel=0,this._urlType=u$_(e.urlType,Tr$3.REST),this._urlArguments=e.urlArguments,this._fileType=d$15.OSGBFile,this._RGBTOBGR=!1,this._S3MTileLoadedEvent=new o$1h,this._allTilesLoaded=new o$1h,this._colorTableChanged=new o$1h,this._attributeDownloaded=new o$1h,this._prepareLoadSize=0,this._prepareLoadEvent=void 0,e.pointCloudLayerNames&&e.pointCloudLayerNames.length>0){this._pointCloudLayerVisible={};for(var r=0,o=e.pointCloudLayerNames.length;r<o;r++)this._pointCloudLayerVisible[e.pointCloudLayerNames[r]]=!0;this._pointCloudLayerNames=e.pointCloudLayerNames.slice(0)}if(e$2b(e.fileType))switch(e.fileType){case"ClampGroundLineCache":this._fileType=d$15.ClampGroundLine;break;case"ClampObjectLineCache":this._fileType=d$15.ClampObjectLine;break;case"ClampGroundPolygonCache":this._fileType=d$15.ClampGroundPolygon;break;case"ClampObjectPolygonCache":this._fileType=d$15.ClampObjectPolygon;break;case"ExtendClampPolygonCache":this._fileType=d$15.ExtendClampPolygonCache;break;case"IconPointCache":this._fileType=d$15.IconPoint;break;case"TextCache":this._fileType=d$15.Text;break;case"PointCloudFile":this._fileType=d$15.PointCloudFile;break;case"OSGBCacheFile":this._fileType=d$15.OSGBCacheFile;break;case"ExtendRegionCache":this._fileType=d$15.ExtendRegion3D;break;case"RegionEffect":this._fileType=d$15.RegionEffect;break;case"PolylineEffect":this._fileType=d$15.PolylineEffect;break;case"ClampGroundAndObjectLineCache":this._fileType=d$15.ClampGroundAndObjectLineCache;break;case"ClampGroundRealtimeRasterCache":this._fileType=d$15.ClampGroundRealtimeRasterCache}this._supportCompressType=e.supportCompressType,this.lon=n.lon,this.lat=n.lat,this.height=n.height,this.positionUnits=n.units,this._layerBounds=e.layerBounds;var a=.5*(this._layerBounds.north+this._layerBounds.south);this._layerRange=a$18.sphericalDistance(e$2a.toDegrees(this._layerBounds.east),e$2a.toDegrees(a),e$2a.toDegrees(this._layerBounds.west),e$2a.toDegrees(a)),this._style3D=u$_(e.style3D,new e$1s),this._style3D._owner=this,this._lodRangeScale=u$_(e.lodRangeScale,1),this._adjustedLodRangeScale=this._lodRangeScale,this._selectColorType=Zr$2.MIX,this._mixColorType=_0x203e3b.MIX,this._brightness=u$_(e.brightness,1),this._contrast=u$_(e.constrast,1),this._hue=u$_(e.hue,0),this._saturation=u$_(e.saturation,1),this._gamma=u$_(e.gamma,1),this._visibleDistanceMax=u$_(e.maxVisibleDistance,Number.MAX_VALUE),this._visibleDistanceMin=u$_(e.minVisibleDistance,0),this._minVisibleAltitude=u$_(e.minVisibleAltitude,0),this._maxVisibleAltitude=u$_(e.maxVisibleAltitude,Number.MAX_VALUE),this._hasLight=!(this._fileType===d$15.OSGBFile||this._fileType===d$15.PointCloudFile),this._selectEnabled=u$_(e.selectEnable,!0),this._enableHighlight=u$_(e.enableHighlight,!0),this._heading=u$_(e.heading,0),this._cullEnabled=u$_(e.cullEnabled,!1);let s=e.cullMode;switch(s){case"CW":s=W$13.CLOCKWISE;break;case"CCW":s=W$13.COUNTER_CLOCKWISE;break;default:s=W$13.NONE}this._cullMode=u$_(s,W$13.NONE),this._shadowType=u$_(e.shadowType,_0x381f49.NONE),this._visibleViewport=4095,this._visible=u$_(e.isVisible,!0),this._sceneMode=u$_(e.sceneMode,C$13.SCENE3D),this._selections=[],this._multiChoose=!1,this._selectedColor=new e$1U(.7,.7,1,1),this._selectedLineColor=new e$1U(1,1,1),this._skeletonSelectedColor=new e$1U(1,0,0,1),this._selectedTranslate=new o$1p(0,0,0),this._objsColorList={},this._objsOffsetList={},this._objsVisibleList=new e$1N,this._objsHideList=new e$1N,this._objsVisibleMap={},this._objsOperationList={},this._operationType=_0x4580ad.RESET,this._fileType===d$15.ExtendRegion3D&&(this._objsHeightList=new e$1N),e$2b(e.effect)?this._effect=e.effect:this._fileType===d$15.RegionEffect?this._effect=new _0x14c08b:this._fileType===d$15.PolylineEffect&&(this._effect=new _0x2f60f9),this._bloomEffect=new _0x5ea05b(this),this.waterEffectSet=e.waterEffectSet,this._noiseMapUrl=n$15("Assets/Textures/noise.png"),this._noiseMapTexture=void 0,this._flattenTextureWidth=1024,this._flattening=!1,this._flattenBounds=new e$29,this._flattenTexture=void 0,this._flattenRegions=new e$1N,this._flattenUpdate=!1,this._flattenVisibleViewport=255,this._hasExcavation=!1,this._hasServerExcavation=!1,this._excavationBounds=new e$29,this._excavationTexture=void 0,this._excavationRegions=new e$1N,this._excavationUpdate=!1,this._excavationMode=_0x25a093.CLIP_INSIDE,this._serverExcavationMode=_0x25a093.CLIP_OUTSIDE,this._serverExcavationBounds=new e$29,this._serverExcavationRegions=new e$1N,this._hasOverlay=!1,this._overlayBounds=new e$29,this._overlayRegions=new e$1N,this._overlayTextures=new e$1N,this._overlayTexture=void 0,this.__overlayUpdate=!1,this._hypsometricSetting=void 0,this._hypsometricTexture=void 0,this._hypsometricRenderTexture=void 0,this._hypsometricRegion=void 0,this._hypsometricBound=new e$29,this._bUseHypColorTable=!1,this._bUseHypRegion=!1,this._hypsometricRegionUpdate=!1,this._hypAnalysisMode=k$Q.AnalysisRegionMode.ARM_NONE,this._hypMaxInstensity=e.maxInstensity,this._hypMinInstensity=e.minInstensity,this._hypMaxHeight=e.maxHeight,this._hypMinHeight=e.minHeight,this._hypMaxCategory=e.maxCategory,this._hypMinCategory=e.minCategory,this._hypUseColorByHeight=!0,this._MultiTemporalUseWater=!1,this._categorieTexture=void 0,this._categoryHideList=new e$1N,this._fHorizontalLine=e.horizontalLine,this._oriClipPlane=[],this._renderClipPlaneArray=new e$1N,this._clipPlane=[];for(r=0;r<6;r++)this._clipPlane[r]=new e$29(0,0,0,0),this._oriClipPlane[r]=new e$29(0,0,0,0);this._clipMode=_0x4a6483.CLIP_NOTHING,this._clipLineColor=new e$29(1,0,0,0),this._clipping=!1,this._section=!1,this._clipPlaneMode=_0xff9e19.NONE,this._clipPlaneColor=new e$29(1,0,0,1),this._matModel=new p$1d,this._oriMatModel=new p$1d,this._bReleaseColor=u$_(e.bReleaseColor,!1),this._fileType===d$15.OSGBFile||this._fileType===d$15.OSGBCacheFile?this._ignoreNormal=u$_(e.ignoreNormal,!1):this._ignoreNormal=!1,this._textureLod=u$_(e.textureLod,!0);var l=u$_(e.processType,"Normal");if(this._nProcessType="Normal"===l?_0x2afcbd.Normal:_0x2afcbd.Add,this._nLoadingMode=_0x155b1b.All_Loading,this._clockStart=0,this._polygonOffsetConfig=e.polygonOffset,this._wireFrameType=_0x15916e.Quad,this._bVolume=!1,e$2b(e.volumeObj)&&(this._bVolume=e.volumeObj.bVolume,this._strVolumeExts=e.volumeObj.strVolumeExts,this._volNames=e.volumeObj.volNames,this._maxVolumeValues=e.volumeObj.maxValues,this._minVolumeValues=e.volumeObj.minValues,this._volName=this._volNames[0],this._fMaxValue=this._maxVolumeValues[0],this._fMinValue=this._minVolumeValues[0],this._strVolumeExt=this._strVolumeExts[0]),this._maps=e.maps,this._volData=void 0,this._splitDirection=u$_(e.splitDirection,_0x405774.NONE),this._splitPosition=u$_(e.splitPosition,.5*this._context.drawingBufferWidth),this._pickPosition=new e$29,this._selectionFiltrateByTransparency=.01,this._receiveObjectClamp=!0,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0,this._edgeDistanceFalloffFactor=0,this._enableDepthTest=!0,this.initialize(),e$2b(window.Proxy)){var u=this,c={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1,clear:function(){u._layerScheduler._clearIndexedDBCache()}};this._indexedDBSetting=new Proxy(c,{get:function(e,t){return e[t]},set:function(e,t,i){return"isAttributesSave"===t&&!1===e.isAttributesSave&&!0===i&&!e$2b(u._queryFieldNames)&&(e$2b(u._layerScheduler._indexedDBScheduler)?u._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()}),(function(){0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()})):u._layerScheduler._dpPromise.then((function(){u._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()}),(function(){0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()}))}))),e[t]=i,!0}}),this._isJsonScp=e._isJson||!1}this._queryFieldNames=e.queryFieldNames,this._fieldsInfo=e.fieldsInfo,this._indexInfoMap=e.indexInfoMap,this._indexInfoAttributeMap=e.indexInfoAttributeMap,this._attributeExtentName=u$_(e.attributeExtentName,""),this._layerScheduler=new _0x2e6772({context:this._context,layer:this,rootEntities:e.rootEntities,cacheEntityCount:e.cacheEntityCount,cacheKey:u$_(e.cacheKey,""),customRequestHeaders:e.customRequestHeaders,scpUrl:e.scpUrl}),this._clearMemoryImmediately=!1,this._totalMemoryUsageInBytes=0,this._maximumMemoryUsage=512,this._PBRMaterialType=je$g.NONE,this._pbrMetalTexture=void 0,this._pbrRoughTexture=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:o$1p.ZERO,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}},this._usePBR=!1,this._localCacheMemoryReserveCount=500,this._fileType===d$15.Text&&(this._id2RectangleList=new e$1N),this._textureUVSpeed=new o$1o(0,0),this._pointCloudEyeDomeLighting=new _0x25441b(this._context),this._pointCloudShading=new o$Z({attenuation:!0,geometricErrorScale:1,maximumAttenuation:8,eyeDomeLighting:!0}),this._pointCloudClassificationInfos=void 0,this._styleEngine=new e$1r,this._manualShadowVolumeBottomHeight=_0x3fb372,this._manualShadowVolumeTopHeight=_0x15581b,this._shadowVolumeBottomHeight=_0x3fb372,this._shadowVolumeTopHeight=_0x15581b,"InstanceModel"===this._dataType&&(this.instanceSkeletonManager=new _0x212e1c),this._level=e.level,this._refreshVolume=!1,this._useMercatorProject=u$_(e.useMercatorProject,!1),this._groupNameBounds=e.groupNameBounds,this._skeletonSelectEnable=!1,this._lastSelectSkeletonId=-1,this._minTransparentAlpha=.1,this._maxTransparentAlpha=.98,this._selectRect=void 0,this._selectUpdate=!1,this._matSelectViewProj=new p$1d,this._useOIT=!0,this._partlyTransparent=!1,this._showLabel=!1,this._s3MTilesLabelStyle=new _0x4ee275,this._labelCollection=new g$U({scene:e.scene,isS3MTileLabels:!0,selectedColor:this._selectedColor}),this._scene=e.scene,this._transparentBackColor=u$_(e.transparentBackColor,_0x22e933.DEFAULT_TRANSPARENT_BACK_COLOR),this._transparentBackColorTolerance=u$_(e.transparentBackColorTolerance,_0x22e933.DEFAULT_TRANSPARENT_BACK_COLOR_TOLERANCE),this._shadowDarkness=.5,this._spatialQueryEnable=!1,this._spatialClipEnable=!1,this._sqTextures=[],this._sqViewMatirx=new p$1d,this._sqPrjMatirx=new p$1d,this._sqMode=j$X.Disjoint,this._swipeRegion=new e$29(0,0,1,1),this._swipeEnabled=!1,this._allObjsHide=!1,this._residentRootTile=!1,this._idFieldName=u$_(e.idFieldName,"SmID"),this._imageryLayer=void 0,this._needCoverImageryLayer=!1,this._iconCollection=new w$N({scene:e.scene,style3D:this._style3D}),this._showIcon=u$_(e.showIcon,!1),this._boundingSphereOffset=o$1p.ZERO,this._loadVolumeData=u$_(e.loadVolumeData,!0),this._hasWireframe=!1,this._edgeStrokesTexture=void 0;var h=u$_(e.subdomainConfig,{});this._subdomains=h.subdomains,this._subdomainsUrlScheme=h.urlScheme,this._isOverlapDisplayed=!1,this._iconRelatedTextLayerID=void 0,this._priorityScale=u$_(e.priorityScale,1),this._blockCache=_0x5d6ada.getSingleInstance(),this._clippingType=R$J.KeepOutside,this._spatialQuery=void 0,this._pickObjs={},this._hasMixedContent=!1,this._backfaceCommands=[],this._excavateRegionCommands=new e$1N,this._rasterPerFrame=!1,this._animationInfo={startTime:void 0,array:[],defers:void 0,duration:void 0,defaultInterpolation:void 0,done:!0},this._textureEmissionUnit=_0x3ba5f2.None,this._pbrParameter=je$g.NONE,this._maxSkipNum=256,this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,pixel:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,pixel:Number.MAX_VALUE},this._computeHeight=!1,this._polygonsTranslate={},this._maxSkipLevel=22,this._mipmapEnabled=!0,this._enableFusion=!1,this._floodFlagTexture=void 0,this._floodRect=void 0,this._matFloodInvertMatrix=p$1d.IDENTITY,this._heightScale=1,this._useRasterCull=!1,this._temporalCount=e$2b(e.temporalCount)?e.temporalCount:0,this._temporalSetting=void 0,this._translucencyByDistance=!1,this._overlapWeightAttributeName=void 0,this._heightRangeAttributeName=void 0,this.hasAttributeIndex=e.hasAttributeIndex,this._historicalRecord=e.historicalRecord,this._layerUBO=new _0x473d2d(this),e$2b(this.waterEffectSet)&&(this._waterLayerUbo=new _0x360415(this)),this._fileType===d$15.PolylineEffect&&(this._polylineEffectUbo=new _0x280589(this)),this._fileType===d$15.RegionEffect&&(this._regionEffectUbo=new S3MRegionEffectUBO(this)),this._envMapIntensity=1,this._hasEmissiveTexAtlas=!1,this._hasSnowEffect=!1,this._hasRainEffect=!1};function _0x3a8394(e,t,i,n){for(var r={times:[],points:[],interpolations:[]},o=0,a=i.length;o<a;o++){var s=i[o],l=+s.slice(0,-1)/100*e.duration,u=n[s],c=u$_(u.interpolationType,e.defaultInterpolation);(h=u[t])&&(r.times.push(l),r.points.push(h),r.interpolations.push(c))}var h=_0x4cad54(r=_0x20c3d6(r),e,t);return e.array.push(h),r}function _0x20c3d6(e){var t=e.interpolations,i=e.times,n=e.points;e=[];for(var r=0,o=t.length-1;r<o;r++)e.push({times:[i[r],i[r+1]],points:[n[r],n[r+1]],interpolationType:t[r]});return e}function _0x4cad54(e,t,i){for(var n=[],r=0,o=e.length;r<o;r++){var a=e[r];n.push(_0x4ab0fa(i,a.interpolationType,a.times,a.points))}return{type:i,splines:n}}function _0x4ab0fa(e,t,i,n){var r;if("rotation"===e)return n.forEach((function(e,t){n[t]=n$13.fromHeadingPitchRoll(e)})),new r$O({times:i,points:n});switch(t){case _0x186188.Linear:r=new r$P({times:i,points:n});break;case _0x186188.Acceleration:r=new n$F({times:i,points:n,mode:0});break;case _0x186188.Deceleration:r=new n$F({times:i,points:n,mode:1});break;case _0x186188.CubicSpline:r=new c$K({times:i,points:n});break;case _0x186188.SmoothStep:r=new r$N({times:i,points:n});break;default:r=new r$P({times:i,points:n})}return r}function _0x390168(e,t){!t||!e$2b(h$18.intersection(e.layerBounds,t.rectangle))||(t._rasterized=!1,_0x390168(e,t._southwestChild),_0x390168(e,t._southeastChild),_0x390168(e,t._northwestChild),_0x390168(e,t._northeastChild))}function _0x25b0a3(e){var t=0;e$2b(e.style3D)&&(t=e.style3D.bottomAltitude);var i=e.height+t;if(e._sceneMode===C$13.SCENE3D)if(e._fileType===d$15.ClampGroundRealtimeRasterCache)e._position=new o$1p(e.lon,e.lat,i),p$1d.fromTranslation(e._position,e._matModel);else{var n=o$1p.fromDegrees(e.lon,e.lat,i),r=o$1p.fromDegrees(e.lon,e.lat,e.height);e._position=n;var o=new i$15(e._heading,0,0);m$17.headingPitchRollToFixedFrame(n,o,t$13.WGS84,m$17.eastNorthUpToFixedFrame,e._matModel),m$17.headingPitchRollToFixedFrame(r,o,t$13.WGS84,m$17.eastNorthUpToFixedFrame,e._oriMatModel)}else if(e._fileType!==d$15.ClampGroundRealtimeRasterCache){if(e.lon>180||e.lon<-180||e.lat>180||e.lat<-180||e.positionUnits===_0x4a4277.METER)if(e.useMercatorProject){var a=(u=new t$O).unproject(new o$1p(e.lon,e.lat,0));e._position=e._scene.camera._projection.project(a)}else{var s=e.lon,l=e.lat;s>20037508.342789244&&(o$1p.globalOffset.x=20037508.342789244*Math.floor(s/20037508.342789244),s-=o$1p.globalOffset.x),l>10018754.171394622&&(o$1p.globalOffset.y=20037508.342789244*Math.floor((l+10018754.171394622)/20037508.342789244),l-=o$1p.globalOffset.y),e._position=new o$1p(s,l,i)}else{var u=new n$1b;n=o$1p.fromDegrees(e.lon,e.lat,i),a=u.ellipsoid.cartesianToCartographic(n);e._position=u.project(a)}p$1d.fromTranslation(e._position,e._matModel),p$1d.multiply(_0x2c98df,e._matModel,e._matModel)}else e._position=new o$1p(e.lon,e.lat,i),p$1d.fromTranslation(e._position,e._matModel);e._style3D._dirty&&e$2b(e._layerScheduler)&&(e._layerScheduler._updateRootBoundingSphere(e._layerScheduler._oriRootEntities,e._matModel),e._style3D._dirty=!1),e$2b(e._layerScheduler)&&e._layerScheduler.traverseRenderEntity({},(function(t){!t._colorCommand||(t._colorCommand.modelMatrix=p$1d.multiply(e._matModel,t._geoMatrix,t._colorCommand.modelMatrix))}))}function _0x18fd4b(e,t){var i=e._hypsometricSetting;if(e$2b(i)){if(i._emissionTextureChanged){e$2b(i._emissionTextureAtlas)&&!i._emissionTextureAtlas.isDestroyed()&&i._emissionTextureAtlas.destroy(),i._emissionTextureAtlas=new v$I({context:t});var n={};n.layer=e,n.textureCount=1,e$2b(i._emissionTextureArray)&&i._emissionTextureArray.length>0?i._emissionTextureArray.map((function(t){i._emissionTextureAtlas.addImage(t.url,t.url).then((function(r){t.textureAtlasID=r,i._loadedEmissionTexture++,i._loadedEmissionTexture==i._emissionTextureArray.length&&(e._hasEmissiveTexAtlas=!0,n.enable=!0,n.textureCount=i._loadedEmissionTexture,e.traverseRenderEntity(n,_0x388bf7))}))})):(n.enable=!1,n.textureCount=0,e.traverseRenderEntity(n,_0x388bf7)),i._emissionTextureChanged=!1}}else e._hasEmissiveTexAtlas=!1}function _0x4d88a5(e,t){e._manualShadowVolumeBottomHeight===_0x3fb372&&e._manualShadowVolumeTopHeight===_0x15581b?0===t.minTerrainHeight&&0===t.maxTerrainHeight?(e._shadowVolumeBottomHeight=_0x3fb372,e._shadowVolumeTopHeight=_0x15581b):(e._shadowVolumeBottomHeight=t.minTerrainHeight-10,e._shadowVolumeTopHeight=t.maxTerrainHeight+10):(e._shadowVolumeBottomHeight=e._manualShadowVolumeBottomHeight,e._shadowVolumeTopHeight=e._manualShadowVolumeTopHeight)}function _0x579c48(e,t,i,n,r){var o=t$11.createIfNeeded(t).fetchImage().then((function(t){var o=new t$V({context:e,source:t,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.LINEAR_MIPMAP_LINEAR,magnificationFilter:tt$h.LINEAR}),generateMipmap:!0});!e$2a.isPowerOfTwo(o.width)||!e$2a.isPowerOfTwo(o.height)||o.generateMipmap(I$1e.NICEST),n[r]=o,i.readyTextureCount++})).otherwise((function(){i.pendingTextureCount--}));n[r]=o}function _0x10fc30(e){if(!e._animationInfo.done){var t=(Date.now()-e._animationInfo.startTime)/1e3;t>=e._animationInfo.duration&&(e._animationInfo.defer.resolve(),e._animationInfo.done=!0,t=e._animationInfo.duration);for(var i=0,n=e._animationInfo.array.length;i<n;i++){var r=e._animationInfo.array[i];_0x31d37c(e,r,t),_0x1b9790(e,r,t),_0x4d6b8d(e,r,t)}e.traverseRenderEntity({},(function(e,t){e._modelMatrixDirty=!0})),_0x4ed776(e)}}_0x22e933.DEFAULT_TRANSPARENT_BACK_COLOR=e$1U.BLACK,_0x22e933.DEFAULT_TRANSPARENT_BACK_COLOR_TOLERANCE=0,Object.defineProperties(_0x22e933.prototype,{overlapWeightAttributeName:{get:function(){return this._overlapWeightAttributeName},set:function(e){this._overlapWeightAttributeName=e}},heightRangeAttributeName:{get:function(){return this._heightRangeAttributeName},set:function(e){this._heightRangeAttributeName=e}},urlType:{get:function(){return this._urlType},set:function(e){this._urlType=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){o$1q.typeOf.number("min visible altitude",e),this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){o$1q.typeOf.number("max visible altitude",e),this._maxVisibleAltitude=e}},heading:{get:function(){return this._heading},set:function(e){o$1q.typeOf.number("heading",e),this._heading=e,this.initialize()}},lodRangeScale:{get:function(){return this._lodRangeScale},set:function(e){this._lodRangeScale=e}},priorityScale:{get:function(){return this._priorityScale},set:function(e){this._priorityScale=e}},customRequestHeaders:{get:function(){return this._layerScheduler._customRequestHeaders},set:function(e){this._layerScheduler._customRequestHeaders=e}},style3D:{get:function(){return this._style3D},set:function(e){e&&(this._style3D=e,this._style3D._owner=this,this._iconCollection.style3D=this._style3D)}},themeStyle:{get:function(){return this._styleEngine.style},set:function(e){var t=this;if(e$2b(this._queryFieldNames)||0!==t._layerScheduler._attributes._memoryCache){if(e$2b(t.themeStyle)&&e$2b(t.themeStyle.pbrMaterialIndex)){var i={enable:!0};i.layer=t,t.traverseRenderEntity(i,_0x1ffa57)}t._styleEngine.style=e}else t._layerScheduler._downloadAttributes().then((function(){if(t._styleEngine.style=e,e$2b(t.themeStyle)&&e$2b(t.themeStyle.pbrMaterialIndex)){var i={enable:!0};i.layer=t,t.traverseRenderEntity(i,_0x1ffa57)}}));this.traverseRenderEntity({},(function(e){e._themeDirty=!0}))}},wireFrameMode:{get:function(){return this._wireFrameType},set:function(e){if(e!==this._wireFrameType){if(e===_0x15916e.Quad&&(e=_0x15916e.EffectOutline),e===_0x15916e.Sketch||this._wireFrameType===_0x15916e.Sketch){var t={};t.edgeMode=e===_0x15916e.Sketch?1:0,t.layer=this,this.traverseRenderEntity(t,_0x469ac0)}this._wireFrameType=e}}},visible:{get:function(){return this._visible},set:function(e){this._fileType===d$15.ClampGroundRealtimeRasterCache&&this._visible!=e&&this._layerScheduler.refreshRaster(this._frameState),this._visible=e}},dataMaxValue:{get:function(){return e$2b(this._hypMaxCategory)?this._hypMaxCategory:this._hypMaxHeight}},dataMinValue:{get:function(){return e$2b(this._hypMinCategory)?this._hypMinCategory:this._hypMinHeight}},ColorDictTableMode:{set:function(e){this._hypUseColorByHeight=e}},hypsometricSetting:{get:function(){return LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_hypsometricSetting"),{hypsometricSetting:this._hypsometricSetting,analysisMode:this._hypAnalysisMode}},set:function(e){LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_hypsometricSetting"),this._bUseHypColorTable=!1,this._hypsometricRegionUpdate=!0,e$2b(this._hypsometricRegion)&&(this._hypsometricRegion.destroy(),this._hypsometricRegion=null),e$2b(this._hypsometricRenderTexture)||(this._hypsometricRenderTexture=new t$V({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$10.RGBA})),e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:this._context,width:1024,height:64,pixelFormat:V$10.RGBA,flipY:!1}));var t={};if(t.layer=this,!e$2b(e)||!e$2b(e.hypsometricSetting))return e$2b(this._hypsometricSetting)&&(this._hypsometricSetting.destroy(),this._hypsometricSetting=void 0),void this.traverseRenderEntity(t,_0x1067d9);if(this._hypAnalysisMode=e.analysisMode||this._hypAnalysisMode,this._hypsometricSetting=u$M.clone(e.hypsometricSetting,this._hypsometricSetting),this._hypsometricSetting._emissionTextureChanged=!0,e$2b(this._hypsometricSetting.ColorTable)&&(this._hypsometricSetting.ColorTable.generateBuffer(),e$2b(this._hypsometricTexture)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer})),this._hypAnalysisMode!==k$Q.AnalysisRegionMode.ARM_NONE?(this._bUseHypColorTable=!0,this.traverseRenderEntity(t,_0x2d0dfd)):this.traverseRenderEntity(t,_0x1067d9),this._hypsometricSetting.UpdatePolygonRegion&&this._hypAnalysisMode===k$Q.AnalysisRegionMode.ARM_REGION&&this._hypsometricSetting.CoverageArea.length>0){var i=this._hypsometricSetting.CoverageArea,n=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),r=z$_.createGeometry(n),o=new p$1d;p$1d.inverse(this._matModel,o),f$X.updateGeometry(r,i,o,this._frameState.mode===C$13.COLUMBUS_VIEW);var a=f$X.updateGeoBounds(r),s=.01*(a.z-a.x);a.w,a.y,this._hypsometricRegion=new f$X,this._hypsometricRegion._geometry=r,this._hypsometricRegion._bounds.x=a.x-s,this._hypsometricRegion._bounds.y=a.y-s,this._hypsometricRegion._bounds.z=a.z+s,this._hypsometricRegion._bounds.w=a.w+s,e$29.clone(this._hypsometricRegion._bounds,this._hypsometricBound)}this._bVolume||this._colorTableChanged.raiseEvent()}},multiTemporalUseWater:{get:function(){return this._MultiTemporalUseWater},set:function(e){this._MultiTemporalUseWater=e,e$2b(this._waterLayerUbo)||(this._waterLayerUbo=new _0x360415(this));let t=new o$1o(1,1),i=new e$29(0,.05,.05,1),n=new e$29(0,.67451,.913725,1);this._waterParamter={bumpSpeed:t,fresnelPower:.1,maxFresnel:1,minFresnel:0,noise:1,noiseScale:1,scale:100,scroll:1,timeVal:.05,tintColour:i,waterBrightness:.7,waterColour:n,averageHeight:3.7}}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e}},LoadingMode:{get:function(){return this._nLoadingMode},set:function(e){this._nLoadingMode=e}},LoadingPriority:{get:function(){return e$2b(this._layerScheduler)?this._layerScheduler.LoadingPriority:_0x10659f.Child_Priority},set:function(e){e$2b(this._layerScheduler)&&(this._layerScheduler.LoadingPriority=e)}},bReleaseColor:{get:function(){return this._bReleaseColor},set:function(e){this._bReleaseColor=e}},ignoreNormal:{get:function(){return this._ignoreNormal},set:function(e){this._ignoreNormal!==e&&(this._ignoreNormal=e,this.refresh())}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}},visibleDistanceMin:{get:function(){return this._visibleDistanceMin},set:function(e){this._visibleDistanceMin=e}},clipLineColor:{get:function(){return new e$1U(this._clipLineColor.x,this._clipLineColor.y,this._clipLineColor.z,this._clipLineColor.w)},set:function(e){e instanceof e$1U&&(this._clipLineColor=new e$29(e.red,e.green,e.blue,e.alpha))}},clipPlaneColor:{get:function(){return new e$1U(this._clipPlaneColor.x,this._clipPlaneColor.y,this._clipPlaneColor.z,this._clipPlaneColor.w)},set:function(e){e instanceof e$1U&&(this._clipPlaneColor=new e$29(e.red,e.green,e.blue,e.alpha))}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this.updateShadow())}},horizontalline:{get:function(){return this._fHorizontalLine},set:function(e){this._fHorizontalLine=e}},horizontalColor:{get:function(){return new e$1U(this._HorizontalColor.x,this._HorizontalColor.y,this._HorizontalColor.z,this._HorizontalColor.w)},set:function(e){e instanceof e$1U&&(this._HorizontalColor=new e$29(e.red,e.green,e.blue,e.alpha))}},hasLight:{get:function(){return this._hasLight},set:function(e){if(e$2b(e)){this._hasLight=e;var t={};t.layer=this,t.enable=e,this.traverseRenderEntity(t,_0x5a24f0)}}},cullEnabled:{get:function(){return this._cullEnabled},set:function(e){this.cullMode=e?W$13.COUNTER_CLOCKWISE:W$13.NONE}},cullMode:{get:function(){return this._cullMode},set:function(e){this._cullMode=e;var t=d$1m.getState(this._rsColor);t.cull.enabled=e!==W$13.NONE,t.frontFace=e!==W$13.NONE?e:W$13.COUNTER_CLOCKWISE,this._rsColor=d$1m.fromCache(t)}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){this._enableDepthTest=e;var t=d$1m.getState(this._rsColor);t.depthTest.enabled=e,this._rsColor=d$1m.fromCache(t)}},selectColorType:{get:function(){return this._selectColorType},set:function(e){if(this._selectColorType!==e){this._selectColorType=e,this.isSilhouette()?this._context.numNormalAndDepthObject++:(this._context.numNormalAndDepthObject--,this._context.numNormalAndDepthObject=Math.max(this._context.numNormalAndDepthObject,0));var t={};t.layer=this,t.selectColorType=e,this.traverseRenderEntity(t,_0x264393)}}},mixColorType:{get:function(){return this._mixColorType},set:function(e){if(this._mixColorType!==e){this._mixColorType=e;var t={layer:this,mixColorType:e};this.traverseRenderEntity(t,_0x3fe446)}}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},groupName:{get:function(){return this._groupName}},selectEnabled:{get:function(){return this._selectEnabled},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._selectEnabled=e}},enableHighlight:{get:function(){return this._enableHighlight},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._enableHighlight=e}},skeletonSelectEnable:{get:function(){return this._skeletonSelectEnable},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._skeletonSelectEnable=e,this.refresh()}},selectedColor:{get:function(){return this._selectedColor},set:function(e){o$1q.defined("selectedColor value",e),this._selectedColor=e$1U.clone(e),this._labelCollection.selectedColor=e$1U.clone(e)}},selectedLineColor:{get:function(){return this._selectedLineColor},set:function(e){o$1q.defined("selectedColor value",e),this._selectedLineColor=e$1U.clone(e)}},skeletonSelectedColor:{get:function(){return this._skeletonSelectedColor},set:function(e){o$1q.defined("skeletonSelectedColor value",e),this._skeletonSelectedColor=e$1U.clone(e)}},selectedSkeletonId:{get:function(){return this._lastSelectSkeletonId},set:function(e){o$1q.defined("selectSkeletonId value",e),this._lastSelectSkeletonId=e}},multiChoose:{get:function(){return this._multiChoose},set:function(e){o$1q.defined("multiChoose",e),o$1q.typeOf.bool("multiChoose",e),this._multiChoose=e}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x90188f)}},contrast:{get:function(){return this._contrast},set:function(e){this._contrast=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x90188f)}},hue:{get:function(){return this._hue},set:function(e){this._hue=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x90188f)}},saturation:{get:function(){return this._saturation},set:function(e){this._saturation=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x90188f)}},gamma:{get:function(){return this._gamma},set:function(e){this._gamma=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x90188f)}},transparentBackColor:{get:function(){return this._transparentBackColor},set:function(e){if(this._transparentBackColor!==e){this._transparentBackColor=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x5f032b)}}},transparentBackColorTolerance:{get:function(){return this._transparentBackColorTolerance},set:function(e){if(this._transparentBackColorTolerance!==e){this._transparentBackColorTolerance=e;var t={};t.layer=this,0===this._transparentBackColorTolerance?this.traverseRenderEntity(t,_0x1fc069):this.traverseRenderEntity(t,_0x5f032b)}}},volName:{get:function(){return this._volName},set:function(e){for(var t=0;t<this._volNames.length;t++)this._volNames[t]==e&&(this._volName=e,this._fMaxValue=this._maxVolumeValues[t],this._fMinValue=this._minVolumeValues[t],this._strVolumeExt=this._strVolumeExts[t],this.refreshVolume())}},coverImageryLayer:{get:function(){return this._imageryLayer},set:function(e){if(e$2b(e))if(e$2b(this._imageryLayer)){!(this._imageryLayer instanceof Array)&&!this._imageryLayer.show&&this._layerScheduler._hideImage(),this._imageryLayer=e;var t=this;if(this._imageryLayer instanceof Array){for(var i=[],n=0;n<this._imageryLayer.length;n++)i.push(this._imageryLayer[n]._imageryProvider._readyPromise);t._layerScheduler._stopLoadImagery=!0,Promise.all(i).then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1}))}else t._layerScheduler._stopLoadImagery=!0,this._imageryLayer._imageryProvider._readyPromise.then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1}))}else{if(!this._needCoverImageryLayer)return this.refresh(),this._imageryLayer=e,void(this._needCoverImageryLayer=!0);var r=!1;e$2b(this._imageryLayer)||(r=!0),this._imageryLayer=e;t=this;if(this._imageryLayer instanceof Array){for(i=[],n=0;n<this._imageryLayer.length;n++)i.push(this._imageryLayer[n]._imageryProvider._readyPromise);t._layerScheduler._stopLoadImagery=!0,Promise.all(i).then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1,r&&t._updateCoverImageryLayer(!1)}))}else t._layerScheduler._stopLoadImagery=!0,this._imageryLayer._imageryProvider._readyPromise.then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1,r&&t._updateCoverImageryLayer(!1)}));this._needCoverImageryLayer=!0}else e$2b(this._imageryLayer)&&(this._updateCoverImageryLayer(!0),this._imageryLayer=void 0)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){if(o$1q.typeOf.number("splitDirection",e),this._splitDirection!==e){this._splitDirection=e;var t={layer:this,enableSplit:e!==_0x405774.NONE};this.traverseRenderEntity(t,_0x320632)}}},splitPosition:{get:function(){return this._splitPosition},set:function(e){o$1q.typeOf.number("splitPosition",e),this._splitPosition=e}},selectionFiltrateByTransparency:{get:function(){return this._selectionFiltrateByTransparency},set:function(e){o$1q.typeOf.number("selectionFiltrateByTransparency value",e),this._selectionFiltrateByTransparency=e}},effect:{get:function(){return this._effect},set:function(e){this._effect=e}},bloomEffect:{get:function(){return e$2b(this._bloomEffect)||(this._bloomEffect=new _0x5ea05b),this._bloomEffect}},bloomEnable:{get:function(){return!!e$2b(this._bloomEffect)&&this._bloomEffect.enable}},selectedTranslate:{get:function(){return this._selectedTranslate},set:function(e){o$1q.typeOf.object("selected translate",e),!o$1p.equals(e,this._selectedTranslate)&&(this._selectedTranslate=e)}},clearMemoryImmediately:{get:function(){return this._clearMemoryImmediately},set:function(e){this._clearMemoryImmediately=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMemoryUsage=e}},PBRMaterialType:{get:function(){return this._PBRMaterialType},set:function(e){if(this._PBRMaterialType!==e){this._PBRMaterialType=e;var t=_0x5370ac.getMaterial(e),i=this;e$2b(this._pbrMetalTexture)&&(this._pbrMetalTexture.destroy(),this._pbrMetalTexture=null),e$2b(this._pbrRoughTexture)&&(this._pbrRoughTexture.destroy(),this._pbrRoughTexture=null),o$1l(t$T(t.metalTextureUrl),(function(e){i._pbrMetalTexture=new t$V({context:i._frameState.context,source:e,pixelFormat:V$10.LUMINANCE,pixelDatatype:_$$.UNSIGNED_BYTE})})),o$1l(t$T(t.roughTextureUrl),(function(e){i._pbrRoughTexture=new t$V({context:i._frameState.context,source:e,pixelFormat:V$10.LUMINANCE,pixelDatatype:_$$.UNSIGNED_BYTE})}));var n={};n.layer=this,n.PBRType=e,this.traverseRenderEntity(n,_0x30c7b8)}}},PBRMetallic:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.metallicFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.metallicFactor=e}},PBRRoughness:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor=e}},emissiveFactor:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor=e}},rainEffect:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.rainEffect},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.rainEffect=e}},textureUVSpeed:{get:function(){return this._textureUVSpeed},set:function(e){o$1q.typeOf.object("textureUVSpeed value",e),o$1o.clone(e,this._textureUVSpeed);var t={};t.layer=this,t.enable=0!==this._textureUVSpeed.x||0!==this._textureUVSpeed.y,this.traverseRenderEntity(t,_0xa7b04e)}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){if(e$2b(window.Proxy)){var t=this;if(e$2b(e)&&"boolean"==typeof e.isGeoTilesSave&&"boolean"==typeof e.isAttributesSave&&"boolean"==typeof e.isGeoTilesRootNodeSave){(i={}).isGeoTilesSave=e.isGeoTilesSave,i.isAttributesSave=e.isAttributesSave,i.isGeoTilesRootNodeSave=e.isGeoTilesRootNodeSave,i.clear=function(){t._layerScheduler._clearIndexedDBCache()};var i={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1,clear:function(){t._layerScheduler._clearIndexedDBCache()}};this._indexedDBSetting=new Proxy(i,{get:function(e,t){return e[t]},set:function(e,i,n){"isAttributesSave"===i&&!1===e.isAttributesSave&&!0===n&&(e$2b(t._layerScheduler._indexedDBScheduler)?t._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}),(function(){0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()})):t._layerScheduler._dpPromise.then((function(){t._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}),(function(){0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}))}))),e[i]=n}}),this._layerScheduler._indexedDBSetting=this._indexedDBSetting}}else this._indexedDBSetting={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1},this._layerScheduler._indexedDBSetting=this._indexedDBSetting}},pointCloudShading:{get:function(){return this._pointCloudShading}},shadowVolumeTopHeight:{get:function(){return this._manualShadowVolumeTopHeight},set:function(e){this._manualShadowVolumeTopHeight=e}},shadowVolumeBottomHeight:{get:function(){return this._manualShadowVolumeBottomHeight},set:function(e){this._manualShadowVolumeBottomHeight=e}},triangleFiltratePixel:{get:function(){return this._triangleFiltratePixel},set:function(e){var t=parseFloat(e),i=this._triangleFiltratePixel>0,n=t>0;if(this._triangleFiltratePixel=t,this._vertexWeightMode===_0x7aa085.EdgeLengthMin&&i!=n){var r={};r.layer=this,r.enable=n,this.traverseRenderEntity(r,_0x45f5e3)}}},useMercatorProject:{get:function(){return this._useMercatorProject},set:function(e){this._useMercatorProject=e,this.refresh()}},minTransparentAlpha:{get:function(){return this._minTransparentAlpha},set:function(e){this._minTransparentAlpha=e}},maxTransparentAlpha:{get:function(){return this._maxTransparentAlpha},set:function(e){this._maxTransparentAlpha=e}},selectBound:{get:function(){return this._selectRect},set:function(e){this._selectRect=e,this._selectUpdate=!0,this._selectEnabled=!0}},S3MTileLoadedEvent:{get:function(){return this._S3MTileLoadedEvent}},attributeDownloaded:{get:function(){return this._attributeDownloaded}},allTilesLoaded:{get:function(){return this._allTilesLoaded}},prepareLoadEvent:{get:function(){return this._prepareLoadEvent}},prepareLoadDataSize:{get:function(){return this._prepareLoadSize},set:function(e){o$1q.typeOf.number("value",e),e>0&&(this._prepareLoadSize=e,e$2b(this._prepareLoadEvent)||(this._prepareLoadEvent=new o$1h),this._layerScheduler._prepareLoaded=!1)}},colorTableChanged:{get:function(){return this._colorTableChanged}},receiveObjectClamp:{get:function(){return this._receiveObjectClamp},set:function(e){this._receiveObjectClamp=e;var t=d$1m.getState(this._rsColor);t.stencilTest=_0x187e60.createReceiveClampObjectStencilTest(e),this._rsColor=d$1m.fromCache(t)}},orderIndependentTranslucency:{get:function(){return this._useOIT},set:function(e){o$1q.typeOf.bool("value",e),this._useOIT=e}},partlyTransparent:{get:function(){return this._partlyTransparent},set:function(e){o$1q.typeOf.bool("value",e),this._partlyTransparent=e}},showLabel:{get:function(){return this._showLabel},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._showLabel=e,this._showLabel&&0===Object.keys(this._layerScheduler._attributes).length&&this._layerScheduler._requestAllScvd()}},labelStyle:{get:function(){return this._s3MTilesLabelStyle},set:function(e){o$1q.defined("value",e),(this._s3MTilesLabelStyle._textFieldChanged||e$2b(e._textField)&&this._s3MTilesLabelStyle._textField!==e._textField)&&this._labelCollection.removeAll(),this._s3MTilesLabelStyle=e,e$2b(this._labelCollection)&&this._labelCollection.setLabelStyle(this._s3MTilesLabelStyle)}},swipeRegion:{get:function(){return new f$18(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2b(e)){if(!(e instanceof f$18))throw new t$16("swipeRegion must be a instance of BoundingRectangle.");e$29.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?this.splitDirection=_0x405774.NONE:e$29.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e,this.traverseRenderEntity({layer:this,enableSwipe:e},_0x5ac131))}},allObjsHide:{get:function(){return this._allObjsHide}},residentRootTile:{get:function(){return this._residentRootTile},set:function(e){o$1q.typeOf.bool("residentRootTile",e),this._residentRootTile=e}},idFieldName:{get:function(){return this._idFieldName}},loadVolumeData:{get:function(){return this._loadVolumeData},set:function(e){this._loadVolumeData=e}},showIcon:{get:function(){return this._showIcon},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._showIcon=e}},showCallout:{get:function(){return this._iconCollection.showCallout},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._iconCollection.showCallout=e}},waterColor:{get:function(){return this._waterParamter&&this._waterParamter.waterColour},set:function(e){if(!e$2b(this._waterParamter))throw new t$16("No water exists in this layer");if(o$1q.defined("value",e),!(e instanceof e$1U))throw new t$16("Expected waterColor to be typeof color");let t=new e$29;t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,this._waterParamter.waterColour=t}},waterSpeed:{get:function(){return this._waterParamter&&this._waterParamter.bumpSpeed},set:function(e){if(!this._waterParamter)throw new t$16("No water exists in this layer");if(o$1q.defined("value",e),!(e instanceof o$1o))throw new t$16("Expected waterSpeed to be typeof Cartesian2");this._waterParamter.bumpSpeed=e}},waterWaveScale:{get:function(){return this._waterParamter&&this._waterParamter.noiseScale},set:function(e){if(!this._waterParamter)throw new t$16("No water exists in this layer");o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._waterParamter.noiseScale=e}},attributeFieldNames:{get:function(){return e$2b(this._fieldsInfo)?Object.keys(this._fieldsInfo._hash):void 0}},queryFieldNames:{get:function(){return this._queryFieldNames},set:function(e){if(e$2b(this._queryFieldNames)&&this._queryFieldNames.sort().toString()!==e.sort().toString())for(var t=e.filter((e=>!this._queryFieldNames.includes(e))),i=this._layerScheduler,n=0;n<i._rootEntities.length;n++){var r=i._rootEntities[n];r._attrAppend=t,r.attrLoadState=N$P.UNLOAD}this._queryFieldNames=e}},hasWireframe:{get:function(){return this._hasWireframe}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2b(e)&&!e$2b(e.length))throw new t$16("Excepted S3MTilesLayer.subdomains to be type of Array.");this._subdomains=e}},iconRelatedTextLayerID:{get:function(){return this._iconRelatedTextLayerID},set:function(e){if(typeof e<"u"&&"number"!=typeof e)throw new t$16("Excepted S3MTilesLayer.iconRelatedTextLayerID to be type of number or undefined");this._iconRelatedTextLayerID=e}},isOverlapDisplayed:{get:function(){return this._isOverlapDisplayed},set:function(e){o$1q.typeOf.bool("isOverlapDisplayed",e),this._isOverlapDisplayed=e,this._isOverlapDisplayed?this.setOnlyObjsVisible([],!1,!0,!0):this.setOnlyObjsVisible([],!0,!1)}},clippingType:{get:function(){return this._clippingType},set:function(e){o$1q.defined("clipping type",e),this._clippingType=e,e$2b(this._spatialQuery)&&(this._spatialQuery.positionMode=_0x3e670b(e))}},rasterPerFrame:{get:function(){return this._rasterPerFrame&&this._fileType===d$15.ClampGroundRealtimeRasterCache},set:function(e){o$1q.typeOf.bool("rasterPerFrame",e),this._rasterPerFrame=e}},RGBTOBGR:{get:function(){return this._RGBTOBGR},set:function(e){o$1q.typeOf.bool("RGBTOBGR",e),this._RGBTOBGR=e}},textureEmissionUnit:{get:function(){return this._textureEmissionUnit},set:function(e){this._textureEmissionUnit=e}},computeHeight:{get:function(){return this._computeHeight},set:function(e){this._computeHeight=e}},mipmapEnabled:{get:function(){return this._mipmapEnabled},set:function(e){this._mipmapEnabled=e}},enableFusion:{get:function(){return this._enableFusion},set:function(e){e!==this._enableFusion&&(this._enableFusion=e,this.traverseRenderEntity({enable:e,layer:this},_0xcf3b3))}},heightScale:{get:function(){return this._heightScale},set:function(e){if(e!==this._heightScale){e=Math.max(e,1e-5),this._heightScale=e;var t=p$1d.fromScale(new o$1p(1,1,e),new p$1d);this.traverseRenderEntity({scaleMatrix:t,layerMatrix:this._matModel},_0x10da3d)}}},temporalCount:{get:function(){return this._temporalCount}},temporalSetting:{get:function(){return this._temporalSetting},set:function(e){this._temporalSetting=e}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=e}}}),_0x22e933.prototype.initialize=function(){_0x25b0a3(this);var e,t=this._fileType,i=_0x187e60.createClampGroundStencilRenderState();if(t===d$15.ClampGroundLine||t===d$15.ClampGroundPolygon||t===d$15.ExtendClampPolygonCache?(e=_0x187e60.createClampGroundColorRenderState(),i=_0x187e60.createClampGroundStencilRenderState()):t===d$15.ClampObjectPolygon||t===d$15.ClampObjectLine?(e=_0x187e60.createClampObjectColorRenderState(),i=_0x187e60.createClampObjectStencilRenderState()):t===d$15.ClampGroundAndObjectLineCache?e=_0x187e60.createClampGroundAndObjectLineRenderState():(e=_0x187e60.createNormalColorRenderState(this.cullMode)).stencilTest=_0x187e60.createReceiveClampObjectStencilTest(this._receiveObjectClamp),e$2b(this._polygonOffsetConfig)&&!0===this._polygonOffsetConfig.enabled&&(e.polygonOffset=this._polygonOffsetConfig),this._rsColor=d$1m.fromCache(e),this._rsClampColor=d$1m.fromCache(_0x187e60.createClampGroundColorRenderState()),this._rsClampLineColor=d$1m.fromCache(_0x187e60.createClampGroundAndObjectLineRenderState()),this._rsStencil=d$1m.fromCache(i),e$2b(this.waterEffectSet)&&!e$2b(this._waterParamter)){this._waterPlanes=new e$1N,this._waterParamter=[];for(var n=0;n<this.waterEffectSet[0].gpuProgramParameters.length;n++){for(var r=this.waterEffectSet[0].gpuProgramParameters[n],o=0;o<r.atuoConstants.length;o++){var a=r.atuoConstants[o];if("timeVal"===a.name){this._waterParamter[a.name]=a.fData;break}}for(o=0;o<r.gpuConstants.length;o++){var s=r.gpuConstants[o],l=null;switch(s.arraySize){case 1:l=s.arrayFloat[0];break;case 2:l=new o$1o,o$1o.unpack(s.arrayFloat,0,l);break;case 3:l=new o$1p,o$1p.unpack(s.arrayFloat,0,l);break;case 4:l=new e$29,e$29.unpack(s.arrayFloat,0,l)}!e$2b(l)||(this._waterParamter[s.name]=l)}}}this._computeLayerModelBounds()},_0x22e933.prototype._updateCoverImageryLayer=function(e){for(var t=this._layerScheduler,i=[],n=0;n<t._rootEntities.length;n++){var r=t._rootEntities[n];i.push(r)}for(var o,a={layer:this};o=i.pop();)for(var s=0;s<o._childrenPageLod.length;s++){for(var l=o._childrenPageLod[s]._renderEntityList,u=l.length,c=0;c<u;c++)e?(l[c]._imagerys=void 0,l[c].removeProgramDefineForCommand(l[c]._colorCommand,a,!0,!0,"IMAGERY"),l[c]._imageRasterFinish=!1,l[c]._imageryLevels=[],l[c].destroyScaleImagerys()):l[c].appendProgramDefineForCommand(l[c]._colorCommand,a,!0,!0,"IMAGERY");o._childrenPageLod[s]._entity&&i.push(o._childrenPageLod[s]._entity)}},_0x22e933.prototype.appendQueryFieldName=function(e){e$2b(e.length)||new t$16("Expected value to be type of Array");for(var t=this._queryFieldNames,i=[],n=0,r=e.length;n<r;n++){var o=e[n];-1===t.indexOf(o)&&i.push(o)}if(0===i.length)return o$1l.resolve();this._queryFieldNames=i;var a=this;return o$1l.all(this._layerScheduler.appendQueryFieldName(this)).then((function(){a._queryFieldNames=t.concat(i)}))},_0x22e933.prototype.getPointCloudClassificationInfos=function(){if(e$2b(this._pointCloudClassificationInfos))return this._pointCloudClassificationInfos;if(this._isS3MB){var e=u$Q(i=new h$16("./attribute.json").resolve(this._baseUri).toString()),t=this;return e.then((function(e){var i=[];if(!e$2b(e.classificationInfos))return t._pointCloudClassificationInfos=i,i;for(var n=0,r=e.classificationInfos.length;n<r;n++){var o=e.classificationInfos[n].id,a=e.classificationInfos[n].name,s=e.classificationInfos[n].pointCount;i.push(new _0x5730db(o,a,s))}return t._pointCloudClassificationInfos=i,i})).otherwise((function(e){console.log(e)}))}var i=new h$16("./indexData.dat").resolve(this._baseUri).toString();e$2b(a$O.CREDENTIAL)&&(i=a$O.addToken(i));e=d$1f(i),t=this;return e.then((function(e){for(var i=e.firstChild,n=i.namespaceURI,r=s$S.queryNodes(i,"PointCloudClassification",n),o=[],a=0,s=r.length;a<s;a++){var l=r[a],u=s$S.queryStringAttribute(l,"ID"),c=s$S.queryStringAttribute(l,"Name"),h=s$S.queryNumericAttribute(l,"PointCounts");o.push(new _0x5730db(u,c,h))}return t._pointCloudClassificationInfos=o,o})).otherwise((function(e){console.log(e)}))},_0x22e933.prototype.setPolygonoffset=function(e,t){if(this._rsColor._applyFunctions.length=0,this._rsColor.polygonOffset.factor!==e||this._rsColor.polygonOffset.units!==t){var i=d$1m.getState(this._rsColor);i.polygonOffset={enabled:!0,factor:u$_(e,0),units:u$_(t,0)},this._rsColor=d$1m.fromCache(i)}},_0x22e933.prototype.getVolNames=function(){return this._volNames},_0x22e933.prototype.setQueryParameter=function(e){if(!e$2b((e=e||{}).url))throw new t$16("options.url is required!");if(!e$2b(e.dataSourceName))throw new t$16("options.dataSourceName is required!");if(!e$2b(e.dataSetName)&&!0!==e.isMerge)throw new t$16("options.dataSetName is required or isMerge must be true!");if(e.keyWord=u$_(e.keyWord,"SmID"),e.hasGeometry=u$_(e.hasGeometry,!1),this.queryParameter=l$1g(e),!e$2b(this.queryParameter.dataSetName)&&1==this.queryParameter.isMerge){var t=this;this.datasetInfo().then((function(e){t.queryParameter.datasetList=e}))}},_0x22e933.prototype.getQueryParameter=function(){return this.queryParameter},_0x22e933.prototype.datasetInfo=function(){var e=o$1l.defer();if(this._isS3MB){var t=this._baseUri+"attribute.json";e$2b(a$O.CREDENTIAL)&&(t=a$O.addToken(t)),u$Q(t).then((function(t){for(var i=t.layerInfos,n=new Array,r=0;r<i.length;r++){var o=i[r],a={};a.datasetName=o.layerName,a.startID=parseInt(o.idRange.minID),a.endID=parseInt(o.idRange.maxID),n.push(a)}e.resolve(n)}))}else{var i=this._baseUri+"indexData.dat";e$2b(a$O.CREDENTIAL)&&(i=a$O.addToken(i));e=o$1l.defer();o$1l(d$1f(i),(function(t){for(var i=s$S.getElementsByTagNameNS(t,"*","DatasetName"),n=s$S.getElementsByTagNameNS(t,"*","DatasetIDRange"),r=new Array,o=0;o<i.length;o++){var a={};a.datasetName=i[o].innerHTML;var s=n[o].innerHTML,l=s.indexOf("_");a.startID=parseInt(s.substr(0,l)),a.endID=parseInt(s.substr(l+1,s.length-l-1)),r.push(a)}e.resolve(r)}))}return e.promise},_0x22e933.prototype.getLodRangeScale=function(){return this._lodRangeScale},_0x22e933.prototype.setAnimation=function(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.keyframes",e.keyframes),o$1q.typeOf.number.greaterThan("options.duration",e.duration,0);var t=e.keyframes,i=e.duration,n=e.interpolationType;if("0%"in t){var r=t["0%"];r.scale=u$_(r.scale,new o$1p(1,1,1)),r.rotation=u$_(r.rotation,new i$15(this._heading,0,0)),r.translation=u$_(r.translation,o$1p.fromDegrees(this.lon,this.lat,this.style3D.bottomAltitude))}else t["0%"]={translation:o$1p.fromDegrees(this.lon,this.lat,this.style3D.bottomAltitude),scale:new o$1p(1,1,1),rotation:new i$15(this._heading,0,0)};var o=Object.keys(t);return(o=o.filter((function(e){return"%"===e[e.length-1]}))).sort((function(e,t){return(e=+e.slice(0,-1))-(t=+t.slice(0,-1))})),this._animationInfo={startTime:Date.now(),array:[],duration:i,defer:o$1l.defer(),defaultInterpolation:u$_(n,_0x186188.Linear),done:!1},_0x3a8394(this._animationInfo,"rotation",o,t),_0x3a8394(this._animationInfo,"scale",o,t),_0x3a8394(this._animationInfo,"translation",o,t),this._animationInfo.defer},_0x22e933.prototype.setLodRangeScale=function(e){this._lodRangeScale=e},_0x22e933.prototype.refreshRaster=function(){if(e$2b(this._frameState)){var e=this._frameState._quadtree._levelZeroTiles;e[0]&&_0x390168(this,e[0]),e[1]&&_0x390168(this,e[1])}},_0x22e933.prototype._isNeedUpdate=function(e,t){return!(!e$2b(e)||!e$2b(t)||!this._visible||(e$2b(this.waterEffectSet)||this.multiTemporalUseWater)&&t._fboState.enabled&&"water"===t._fboState.name)},_0x22e933.prototype._loadMaterialTexture=function(e,t){e.loadingTexture=!0;var i=e.pbrMetallicRoughness,n=e.textureunitstates,r=i.baseColorTextureIndex;e$2b(e.pendingTextureCount)||(e.pendingTextureCount=0),e$2b(e.readyTextureCount)||(e.readyTextureCount=0);var o=this._context,a=e$2b(t)?t:this._baseUri+this._materialRelativePath;r>-1&&!e$2b(i.baseColorTexture)&&(_0x579c48(o,a+n[r].textureunitstate.url,e,e.pbrMetallicRoughness,"baseColorTexture"),e.pendingTextureCount++);var s=i.emissiveTextureIndex;s>-1&&!e$2b(i.emissiveTexture)&&(_0x579c48(o,a+n[s].textureunitstate.url,e,e.pbrMetallicRoughness,"emissiveTexture"),e.pendingTextureCount++);var l=i.normalTextureIndex;l>-1&&!e$2b(i.normalTexture)&&(_0x579c48(o,a+n[l].textureunitstate.url,e,e.pbrMetallicRoughness,"normalTexture"),e.pendingTextureCount++);var u=i.metallicRoughnessTextureIndex;u>-1&&!e$2b(i.metallicRoughnessTexture)&&(_0x579c48(o,a+n[u].textureunitstate.url,e,e.pbrMetallicRoughness,"metallicRoughnessTexture"),e.pendingTextureCount++);var c=i.occlusionTextureIndex;c>-1&&!e$2b(i.occlusionTexture)&&(_0x579c48(o,a+n[c].textureunitstate.url,e,e.pbrMetallicRoughness,"occlusionTexture"),e.pendingTextureCount++)},_0x22e933.prototype._loadMaterial=function(e,t,i){var n=this;t$11.createIfNeeded(e).fetchJson().then((function(e){if(e$2b(n._materialMap)||(n._materialMap={}),e.material.ready=!1,e$2b(i)&&e.material.textureunitstates.length>0){var r=e.material.textureunitstates[0].textureunitstate.texmodmatrix,o=p$1d.unpack(r),a=new o$1p(i.ScaleU,i.ScaleV,1);p$1d.fromScale(a,o),p$1d.pack(o,r)}n._materialMap[t]=e,n.readyMaterialCount++}))},_0x22e933.prototype._loadMaterialMap=function(e){if(e$2b(this._materialMapInfo)){this.readyMaterialCount=0;for(var t=0,i=this._materialMapInfo.length;t<i;t++){var n=this._materialMapInfo[t],r=this._baseUri+this._materialRelativePath+n.AssociateMaterial+".json";this._loadMaterial(r,n.OriginalMaterial,n.UVTransformation)}this.pendingMaterialCount=this._materialMapInfo.length,this._materialMapInfo=void 0}if(e$2b(this._materialMap)&&this.pendingMaterialCount===this.readyMaterialCount){var o=!0;for(var a in this._materialMap)if(this._materialMap.hasOwnProperty(a)){var s=this._materialMap[a].material;s.loadingTexture||this._loadMaterialTexture(s),s.pendingTextureCount===s.readyTextureCount&&(s.ready=!0),o=o&&s.ready}this._materialMapReady=o}if(!e$2b(this._associateMaterialPromise)){var l=this,u=e.lastIndexOf("/");this._materialRelativePath=e.substring(0,u+1),e=this._baseUri+e;var c=t$11.createIfNeeded(e);this._associateMaterialPromise=c.fetchJson().then((function(e){l._materialMapInfo=e.Scenes[0].Layers[0].Materials.MaterialExportedMap}))}},_0x22e933.prototype.update=function(e,t,i,n){if(this._fileType!==d$15.Text&&this._fileType!==d$15.IconPoint||!t.passes.pick||!t.passes.offscreen){if(e$2b(this._associateMaterialUrl)&&!this._materialMapReady)return void this._loadMaterialMap(this._associateMaterialUrl);if(this._PBRMaterialParams.loadingTexture&&this._updatePBRMaterial(),_0x10fc30(this),this._isNeedUpdate(e,t)){this._style3D._dirty&&(this.refresh(),_0x25b0a3(this),this._style3D._dirty=!1),this._style3D.billboardMode===yr$1.FixedXYZ&&(this._isOverlapDisplayed=!0),_0x18fd4b(this,e);var r=t.camera;this._sceneMode=r._mode,this._projection=r._projection,this._picking=t.passes.pick,this._frameState=t,this._backfaceCommands.length=0,this._hasMixedContent=!1;var o,a=i.length;for(h=0,o=this._renderClipPlaneArray.length;h<o;h++){this._renderClipPlaneArray.values[h].update(e,t,i)}var s=this._objsVisibleMap;this._hasObjsVisibleMap=Object.keys(s).length>0,this._hasHeightRangeAttributeName=e$2b(this._heightRangeAttributeName);var l=this._PBRMaterialParams.pbrMetallicRoughness.snowEffect,u=this._PBRMaterialParams.pbrMetallicRoughness.rainEffect;if(this._hasSnowEffect=e$2b(l)&&e$2b(l.snowMaskTexture)&&e$2b(l.snowNormalTexture),this._hasRainEffect=e$2b(u)&&e$2b(u.rippleTexture),this._layerScheduler.update(e,t,i),this._shadowDarkness=t.shadowDarkness,this._showIcon&&this._iconCollection.length>0&&this._iconCollection.update(t,e,i),n=u$_(n,!1),this._showLabel&&!0!==n&&(this._labelCollection.s3MlayerId=this._id,this._labelCollection.update(t,e,i)),this._fileType===d$15.PointCloudFile&&t.passes.render)i.length-a>0&&(this._pointCloudShading.eyeDomeLighting||this._pointCloudShading.performance)&&this._pointCloudEyeDomeLighting.update(t,a,this._pointCloudShading);this._fileType===d$15.ClampGroundRealtimeRasterCache&&(t.rasterLineWidth=this.style3D.lineWidth),_0x4d88a5(this,t),this._updateEdgeDistanceFalloffFactor();for(var c=this._excavateRegionCommands.values.length,h=0;h<c;h++){var d=this._excavateRegionCommands.values[h];t.commandList.push(d)}_0x5d18c0(t,this),this._layerUBO.update(e,t),e$2b(this._waterLayerUbo)&&this._waterLayerUbo.update(e),e$2b(this._polylineEffectUbo)&&this._polylineEffectUbo.update(e),e$2b(this._regionEffectUbo)&&this._regionEffectUbo.update(e)}}};var _0x3e6308=new p$1d;function _0x4ed776(e){for(var t=[],i=0,n=e._layerScheduler._rootEntities.length;i<n;i++){var r=e._layerScheduler._rootEntities[i];t.push(r)}for(;t.length;){if(e$2b(r=t.pop())){e$2b(r._originalBS)&&(i$1c.transform(r._originalBS,e._matModel,r._boundingSphere),_0x132fa8(r,e._matModel));for(i=0,n=r._childrenPageLod.length;i<n;i++){var o=r._childrenPageLod[i];_0x132fa8(o,e._matModel),e$2b(o._originalBS)&&i$1c.transform(o._originalBS,e._matModel,o._boundingSphere);for(var a=0,s=o._renderEntityList.length;a<s;a++){var l=o._renderEntityList[a];!e$2b(l)||!e$2b(l._colorCommand)||(p$1d.inverse(l._colorCommand.modelMatrix,_0x3e6308),i$1c.transform(l._boundingVolume,_0x3e6308,l._boundingVolume),p$1d.multiply(e._matModel,l._geoMatrix,l._colorCommand.modelMatrix),i$1c.transform(l._boundingVolume,l._colorCommand.modelMatrix,l._boundingVolume),l._colorCommand._boundingVolume=l._boundingVolume)}t.push(o._entity)}}}}function _0x132fa8(e,t){if(e$2b(e.obbMin)){var i=e.obbMin,n=e.obbMax,r=[];r.push(new o$1p(i.x,i.y,i.z)),r.push(new o$1p(i.x,i.y,n.z)),r.push(new o$1p(i.x,n.y,i.z)),r.push(new o$1p(i.x,n.y,n.z)),r.push(new o$1p(n.x,i.y,i.z)),r.push(new o$1p(n.x,i.y,n.z)),r.push(new o$1p(n.x,n.y,i.z)),r.push(new o$1p(n.x,n.y,n.z));for(var o=0;o<8;o++)r[o]=p$1d.multiplyByPoint(t,r[o],r[o]);e._orientedBoundingBox=y$Z.fromPoints(r,e._orientedBoundingBox)}}function _0x94c960(e,t,i){for(var n,r=0,o=e.length;r<o;r++){var a=e[r],s=a.times;if(t>=s[0]&&t<=s[s.length-1]){n=a;break}}n&&n.evaluate(t,i)}var _0x49662a=n$13.clone(n$13.IDENTITY),_0x12aee3=new i$15,_0x1b7121=new p$1d,_0xffc54a=new p$1e,_0x38366c=new p$1e,_0x425e65=new o$1p;function _0x31d37c(e,t,i){"rotation"===t.type&&(_0x94c960(t.splines,i,_0x49662a),p$1e.fromQuaternion(_0x49662a,_0x38366c),m$17.headingPitchRollToFixedFrame(e._position,_0x12aee3,t$13.WGS84,m$17.eastNorthUpToFixedFrame,_0x1b7121),p$1d.getRotation(_0x1b7121,_0xffc54a),p$1e.multiply(_0xffc54a,_0x38366c,_0xffc54a),p$1d.getTranslation(e._matModel,_0x425e65),p$1d.fromRotationTranslation(_0xffc54a,_0x425e65,e._matModel))}var _0x1b7037=new o$1p(1,1,1);function _0x1b9790(e,t,i){"scale"===t.type&&(_0x94c960(t.splines,i,_0x1b7037),p$1d.setScale(e._matModel,_0x1b7037,e._matModel))}function _0x4d6b8d(e,t,i){"translation"===t.type&&(_0x94c960(t.splines,i,e._position),p$1d.setTranslation(e._matModel,e._position,e._matModel))}var _0x540b05=new e$29;function _0x5d18c0(e,t){e$2b(e.realtimeRasterSwipeParams)||(e.realtimeRasterSwipeParams={}),_0x540b05.x=t._swipeRegion.x*e.context.drawingBufferWidth,_0x540b05.y=(1-t._swipeRegion.y)*e.context.drawingBufferHeight,_0x540b05.z=t._swipeRegion.z*e.context.drawingBufferWidth,_0x540b05.w=(1-t._swipeRegion.w)*e.context.drawingBufferHeight,e.realtimeRasterSwipeParams.swipeRegion=_0x540b05,e.realtimeRasterSwipeParams.swipeEnabled=t._swipeEnabled}var _0x4c8082=new e$29;function _0x3f747d(e,t){e.updateAllObjsVisible(t.layer,t.isVisible)}function _0x538ae5(e,t){e.updateTheme(t.layer)}function _0x2f0852(e,t){e.updateObjsColor(t.ids)}function _0x3f1376(e,t){e.updateObjsTranslate(t.ids)}function _0x58b954(e,t){e.updateExtendHeight(t.ids)}function _0x30e390(e,t){e.removeExtendHeight(t.ids)}function _0x505c51(e,t){e.removeAllExtendHeight()}function _0x9f80c9(e,t){e.updateObjsOperation(t.ids,t)}function _0x3efb93(e,t,i){var n=new o$1p,r=new o$1p;o$1p.subtract(t,e,n),o$1p.subtract(i,e,r);var o=new o$1p;o$1p.cross(n,r,o),o$1p.normalize(o,o);var a=-o$1p.dot(o,e);return new e$29(o.x,o.y,o.z,a)}function _0x230367(e,t){var i=e._projection,n=i.ellipsoid,r=new o$1p,o=new a$18;return n.cartesianToCartographic(t,o),i.project(o,r),o$1p.fromElements(r.z,r.x,r.y)}_0x22e933.prototype.render=function(e,t){if(e$2b(e)&&e$2b(t)){if(t.passes.pick){_0x4c8082.x=e._pickPosition[0],_0x4c8082.y=e._pickPosition[1],_0x4c8082.z=e._pickPosition[2],_0x4c8082.w=1;var i=new p$1d;p$1d.inverse(this._matModel,i),p$1d.multiplyByVector(i,_0x4c8082,_0x4c8082),_0x4c8082.z=_0x4c8082.z+this.height<0?2:_0x4c8082.z+this.height,e$29.clone(_0x4c8082,this._pickPosition)}if(this._picking=t.passes.pick,this.updateFlattenFrameBuffer(e,t),this._updateExcavationFrameBuffer(e,t),this.updateHypRegionFrameBuffer(e,t),this.updateOverlayFrameBuffer(e,t),this._clipping){var n=t.camera.inverseViewMatrix,r=new p$1d;p$1d.transpose(n,r);for(var o=0;o<6;o++)p$1d.multiplyByVector(r,this._oriClipPlane[o],this._clipPlane[o])}this._spatialClipEnable&&e$2b(this._spatialQuery)&&this._spatialQuery._updateTextures(e,t)}},_0x22e933.prototype.setSelection=function(e,t){if(_0x41168d.S3M!==this._version&&(o$1q.defined("setSelection ids",e),this._selectEnabled&&this._enableHighlight)){if(Array.isArray(e)||(e=[e]),this.multiChoose||this.releaseSelection(),this._lastSelectSkeletonId=u$_(t,-1),this._fileType===d$15.ClampGroundRealtimeRasterCache)for(var i=0,n=e.length;i<n;i++)this._layerScheduler.refreshRasterById(e[i],this._frameState);this._scene._layers.setSelectedLayer(this),this._selections=this._selections.concat(e),this.setObjectsOperationByID(e,_0x4580ad.SELECTED)}},_0x22e933.prototype.getSelection=function(){return[].concat(this._selections)},_0x22e933.prototype.releaseSelection=function(){if(_0x41168d.S3M!==this._version&&(this._showLabel&&this._labelCollection.releaseSelection(),!(this._selections.length<1))){if(this._fileType===d$15.ClampGroundRealtimeRasterCache)for(var e=0,t=this._selections.length;e<t;e++)this._layerScheduler.refreshRasterById(this._selections[e],this._frameState);this.removeObjectsOperation(this._selections,_0x4580ad.SELECTED),this._selections.length=0}},_0x22e933.prototype.setSkeletonSelection=function(e){},_0x22e933.prototype.setRenderSelectionTexBySkeletonId=function(e){var t={};t.layer=this,t.enable=e,this.traverseRenderEntity(t,_0x4c8e11)},_0x22e933.prototype.setObjsColor=function(e,t){if(_0x41168d.S3M!==this._version&&this._fileType!==d$15.ClampObjectPolygon){o$1q.defined("setObjsColor ids",e),o$1q.defined("setObjsColor color",t),o$1q.typeOf.object("setObjsColor color",t),Array.isArray(e)||(e=[e]);for(var i={},n=0,r=e.length;n<r;n++){var o=e[n]+"";!e$2b(o)||(this._objsColorList[o]=t,i[o]=t)}this.updateObjsColor(i)}},_0x22e933.prototype.getObjsColor=function(e){if(!e$2b(e))throw new Error("id is required");return _0x41168d.S3M===this._version?null:this._objsColorList[e]},_0x22e933.prototype.removeObjsColor=function(e){o$1q.defined("removeObjsColor ids",e),Array.isArray(e)||(e=[e]);for(var t={},i=0,n=e.length;i<n;i++){var r=e[i];e$2b(this._objsColorList[r])&&(t[r]=e$1U.TRANSPARENT,delete this._objsColorList[r])}this.removeObjectsOperation(e,_0x4580ad.SetColor),this.updateObjsColor(t)},_0x22e933.prototype.removeAllObjsColor=function(){if(!(Object.keys(this._objsColorList).length<1)){var e={};for(var t in this._objsColorList)this._objsColorList.hasOwnProperty(t)&&(e[t]=e$1U.TRANSPARENT);this._objsColorList={},this.updateObjsColor(e)}},_0x22e933.prototype.setObjsExtendHeight=function(e,t){if(_0x41168d.S3M!=this._version&&e$2b(this._objsHeightList)){o$1q.defined("setObjsExtendHeight ids",e),o$1q.defined("setObjsExtendHeight height",t),Array.isArray(e)||(e=[e]);for(var i=new e$1N,n=0,r=e.length;n<r;n++){var o=e[n];this._objsHeightList.set(o,t),i.set(o,t)}this.updateExtendHeight(i)}},_0x22e933.prototype.removeAllObjsExtendHeight=function(){!e$2b(this._objsHeightList)||(this._objsHeightList.removeAll(),this.removeAllExtendHeight())},_0x22e933.prototype.removeObjsExtendHeight=function(e){if(e$2b(this._objsHeightList)){o$1q.defined("removeObjsExtendHeight ids",e),Array.isArray(e)||(e=[e]);for(var t=0,i=e.length;t<i;t++){var n=e[t];this._objsHeightList.remove(n)}this.removeExtendHeight(e)}},_0x22e933.prototype.setOnlyObjsVisible=function(e,t,i,n){if(i=u$_(i,!0),n=u$_(n,!1),_0x41168d.S3M===this._version)return null;if(o$1q.defined("setOnlyObjsVisible ids",e),o$1q.typeOf.bool("setOnlyObjsVisible isVisible",t),Array.isArray(e)||(e=[e]),0===e.length){this._allObjsHide=t,this._objsVisibleList.removeAll();var r=Object.keys(this._objsHideList._hash);return this.removeObjectsOperation(r,_0x4580ad.HIDE),this._objsHideList.removeAll(),i&&!n&&(this._objsVisibleMap={}),void this.updateAllObjsVisible(!t)}var o=this._objsVisibleList,a=this._objsHideList,s=this._objsVisibleMap;t?(e.map((function(e){o.set(e,!0),a.remove(e),i&&(s[e]=!0)})),this.removeObjectsOperation(e,_0x4580ad.HIDE)):(e.map((function(e){o.remove(e),a.set(e,!0),i&&(s[e]=!1)})),this.setObjectsOperationByID(e,_0x4580ad.HIDE))},_0x22e933.prototype.setObjsVisible=function(e,t,i){0!==e.length?(this.setOnlyObjsVisible([],t,i),this.setOnlyObjsVisible(e,t,i)):this.setOnlyObjsVisible([],t,i)},_0x22e933.prototype.setPointCloudGroupsVisible=function(e,t){if(this._fileType===d$15.PointCloudFile&&e$2b(this._pointCloudLayerVisible)){o$1q.defined("setPointCloudGroupsVisible groupNames",e),o$1q.typeOf.bool("setPointCloudGroupsVisible isVisible",t),Array.isArray(e)||(e=[e]);for(var i=0,n=e.length;i<n;i++)this._pointCloudLayerVisible.hasOwnProperty(e[i])&&(this._pointCloudLayerVisible[e[i]]=t)}},_0x22e933.prototype.getPointCloudGroupInfos=function(){if(this._fileType!==d$15.PointCloudFile)return[];if(!e$2b(this._pointCloudLayerVisible))return[];var e=[];for(var t in this._pointCloudLayerVisible)this._pointCloudLayerVisible.hasOwnProperty(t)&&e.push(t);return e},_0x22e933.prototype.getPointCloudGroupBounds=function(e){if(this._fileType===d$15.PointCloudFile&&e$2b(this._groupNameBounds))return this._groupNameBounds.get(e)},_0x22e933.prototype.getObjsVisible=function(e){if(!this.visible)return!1;if(_0x41168d.S3M===this._version)return!0;var t=this._objsColorList[e],i=!0;return e$2b(t)&&(i&=t.alpha),i},_0x22e933.prototype.setObjsOffset=function(e){if(e$2b(this._layerScheduler._extrudedId))if(Array.isArray(e))for(var t=0;t<e.length;t++)this._polygonsTranslate[e[t]]=o$1p.clone(this._selectedTranslate);else this._polygonsTranslate[e]=o$1p.clone(this._selectedTranslate);else this._boundingSphereOffset=o$1p.clone(this._selectedTranslate),this.setObjectsOperationByID(e,_0x4580ad.OFFSET)},_0x22e933.prototype.setObjsTranslate=function(e,t){if(_0x41168d.S3M!==this._version){o$1q.defined("setObjsTranslate ids",e),o$1q.defined("setObjsTranslate translate",t),o$1q.typeOf.object("setObjsTranslate translate",t),Array.isArray(e)||(e=[e]);for(var i={},n=0,r=e.length;n<r;n++){var o=e[n];!e$2b(o)||(this._objsOffsetList[o]=t,i[o]=t)}Object.keys(i).length>0&&(this.traverseRenderEntity({ids:i},_0x3f1376),this.setObjectsOperationByID(e,_0x4580ad.OFFSET))}},_0x22e933.prototype.setBatchObjsTranslate=function(e){_0x41168d.S3M!==this._version&&(o$1q.defined("setObjsTranslate option",e),Object.getPrototypeOf(e)===Object.prototype&&(Object.assign(this._objsOffsetList,e),Object.keys(e).length>0&&(this.traverseRenderEntity({ids:e},_0x3f1376),this.setObjectsOperationByID(Object.keys(e),_0x4580ad.OFFSET))))},_0x22e933.prototype.removeObjsTranslate=function(e){o$1q.defined("removeObjsTranslate ids",e),Array.isArray(e)||(e=[e]);for(var t={},i=0,n=e.length;i<n;i++){var r=e[i];e$2b(this._objsOffsetList[r])&&(delete this._objsOffsetList[r],t[r]=o$1p.ZERO)}this.removeObjectsOperation(e,_0x4580ad.OFFSET),Object.keys(t).length>0&&this.traverseRenderEntity({ids:t},_0x3f1376)},_0x22e933.prototype.removeAllObjsTranslate=function(){var e={};for(var t in this._objsOffsetList)this._objsOffsetList.hasOwnProperty(t)&&(e[t]=o$1p.ZERO);this.traverseRenderEntity({ids:e},_0x3f1376),this._objsOffsetList={}},_0x22e933.prototype.removeObjsOffset=function(e){this.removeObjectsOperation(e,_0x4580ad.OFFSET)},_0x22e933.prototype.removeAllObjsOffset=function(){this._boundingSphereOffset=o$1p.ZERO,this.removeAllObjectsOperation(_0x4580ad.OFFSET)},_0x22e933.prototype.setObjectsOperationByID=function(e,t){if(_0x41168d.S3M!==this._version){o$1q.defined("set Objs Operation ids",e),o$1q.defined("set Objs Operation operationType",t),Array.isArray(e)||(e=[e]),t===_0x4580ad.CLIP&&(this._operationType&_0x4580ad.CLIP)===_0x4580ad.RESET&&(this._operationType|=t,this.traverseRenderEntity({layer:this,enable:!0},_0x30c63e));for(var i,n=new e$1N,r=0,o=e.length;r<o;r++)if(e$2b(i=e[r])){var a=u$_(this._objsOperationList[i],0);a!==t&&(a|=t,this._objsOperationList[i]=a,n.set(i,a))}n.length>0&&this.updateObjsOperation(n._hash)}},_0x22e933.prototype.removeObjectsOperation=function(e,t){if(_0x41168d.S3M!==this._version){o$1q.defined("set Objs Operation ids",e),Array.isArray(e)||(e=[e]);for(var i,n=_0x4580ad.ALL^t,r=new e$1N,o=0,a=e.length;o<a;o++){i=e[o];var s=this._objsOperationList[i];!e$2b(s)||((s&=n)===_0x4580ad.RESET?delete this._objsOperationList[i]:this._objsOperationList[i]=s,r.set(i,s))}r.length>0&&this.updateObjsOperation(r._hash)}},_0x22e933.prototype.removeAllObjectsOperation=function(e){if(_0x41168d.S3M!==this._version&&!(Object.keys(this._objsOperationList).length<1)){var t=_0x4580ad.ALL^e,i=new e$1N,n=this._objsOperationList;for(var r in n)if(n.hasOwnProperty(r)){var o=this._objsOperationList[r];if(!e$2b(o))continue;(o&=t)===_0x4580ad.RESET?delete this._objsOperationList[r]:this._objsOperationList[r]=o,i.set(r,o)}i.length>0&&this.updateObjsOperation(i._hash)}},_0x22e933.prototype.setCategoriesVisible=function(e,t){o$1q.defined("set Categories Visible",e),Array.isArray(e)||(e=[e]);var i=this._hypMaxCategory,n=this._hypMinCategory,r=256,o=Math.max(Math.ceil((i-n)/r),1);e$2b(this._categorieTexture)||(this._categorieTexture=new t$V({context:this._context,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,width:r,height:o,flipY:!1,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),this.traverseRenderEntity({layer:this},_0x2696f4));var a=new Uint8Array(r*o*4);if(t!==_0x576c2d.ResetAll){var s,l,u;if(t===_0x576c2d.Hide)for(s=0,l=e.length;s<l;s++)u=e[s],this._categoryHideList.set(u,u);else for(s=0,l=e.length;s<l;s++)u=e[s],this._categoryHideList.contains(u)&&this._categoryHideList.remove(u);for(s=0;s<this._categoryHideList.values.length;s++){var c=(u=this._categoryHideList.values[s])-n;a[4*c]=255,a[4*c+1]=255,a[4*c+2]=255,a[4*c+3]=255}this._categorieTexture.copyFrom({width:r,height:o,arrayBufferView:a})}else this._categorieTexture.copyFrom({width:r,height:o,arrayBufferView:a})},_0x22e933.prototype.addFlattenRegion=function(e){var t=e.name,i=e.position;if(!e$2b(t)||!e$2b(i))return!1;if(e$2b(this._flattenRegions.get(t)))return!1;e$2b(this._flattenTexture)||(this._flattenTexture=new t$V({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$10.RGBA,pixelDatatype:this._context.floatingPointTexture?_$$.FLOAT:void 0}));var n=this._createRasterRegion(i),r=o$1p.fromDegreesArrayHeights(i),o=i$1c.fromPoints(r,new i$1c);if(n.boundingSphere=o,this._flattenRegions.set(t,n),this._flattenUpdate=!0,this._flattening=!0,1===this._flattenRegions.values.length){var a={};a.layer=this,a.boundingSphere=o,this.traverseRenderEntity(a,_0x8f962)}return!0},_0x22e933.prototype.removeFlattenRegion=function(e){if(!this._flattenRegions.remove(e))return!1;if(this._flattenUpdate=!0,0===this._flattenRegions.values.length){this._flattenUpdate=!1,this._flattening=!1;var t={};t.layer=this,this.traverseRenderEntity(t,_0xb76181)}return!0},_0x22e933.prototype.removeAllFlattenRegion=function(){for(var e=0;e<this._flattenRegions.values.length;e++)this._flattenRegions.values[e].destroy(),this._flattenRegions.values[e]=null;this._flattenRegions.removeAll(),this._flattening=!1;var t={};t.layer=this,this.traverseRenderEntity(t,_0xb76181)},_0x22e933.prototype.addOverlayImage=function(e){var t=(e=u$_(e,{})).name,i=e.bounds,n=e.image;if(!e$2b(t)||!e$2b(i)||!e$2b(e.image))return!1;var r=this._overlayRegions.get(t);if(e$2b(r))return!1;e$2b(this._overlayTexture)||(this._overlayTexture=new t$V({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$10.RGBA}));var o=new t$V({context:this._context,width:n.width,height:n.height,pixelFormat:V$10.RGBA,source:n});if(this._overlayTextures.set(t,o),r=this._createRasterBounds(i),this._overlayRegions.set(t,r),this._overlayUpdate=!0,this._hasOverlay=!0,1===this._overlayRegions.values.length){var a={};a.layer=this,this.traverseRenderEntity(a,_0x56bfb4)}return!0},_0x22e933.prototype.removeOverlayImage=function(e){if(!e$2b(e))return!1;if(!e$2b(this._overlayRegions.get(e)))return!1;if(this._overlayTextures.remove(e),this._overlayRegions.remove(e),this._overlayUpdate=!0,0===this._overlayRegions.values.length){var t={};t.layer=this,this.traverseRenderEntity(t,_0x5d5603)}return!0},_0x22e933.prototype.setModifyRegions=function(e,t){if(this.clearModifyRegions(),t==_0x25a093.CLIP_INSIDE||t==_0x25a093.CLIP_OUTSIDE)for(var i=e.length,n=0;n<i;n++){var r={position:e[n],name:"modify_"+n};this.addExcavationRegion(r)}this._excavationMode=t},_0x22e933.prototype._setServerClipRegions=function(e,t){for(var i=0,n=e.length;i<n;i++){var r={position:e[i],name:"server_clipregion_"+i};this._addServerExcavationRegion(r)}this._serverExcavationMode=u$_(t,_0x25a093.CLIP_OUTSIDE)},_0x22e933.prototype.setClipRegions=function(e){if(!(e instanceof Array))throw new t$16("regions must be a georegion3d array");var t=this._baseUri.toString();new t$11(a={url:t.substring(0,t.indexOf("/data/path"))+"/config",method:"POST",data:JSON.stringify({clipRegions:e})})._makeRequest({method:"POST",data:a.data});for(var i=0;i<e.length;i++){for(var n=[],r=e[i],o=0;o<r.points.length;o++)n.push(r.points[o].x),n.push(r.points[o].y),n.push(r.points[o].z);var a={position:n,name:"server_clipregion_x"+i};this._addServerExcavationRegion(a)}},_0x22e933.prototype.clearModifyRegions=function(){for(var e=Object.keys(this._excavationRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];n.startsWith("modify_")&&this.removeExcavationRegion(n)}},_0x22e933.prototype.addExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(e$2b(t)||o$1q.typeOf.string("options.name",t),e$2b(i)||o$1q.typeOf.string("options.position",i),e$2b(this._excavationRegions.get(t)))return!1;e$2b(this._excavationTexture)||(this._excavationTexture=new t$V({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$10.RGBA}));var r=this._createRasterRegion(i,n,e$2b(n));if(r.name=t,this._excavationRegions.set(t,r),this._excavationUpdate=!0,this._hasExcavation=!0,1===this._excavationRegions.values.length){var o={};o.layer=this,this.traverseRenderEntity(o,_0x235e1d)}return!0},_0x22e933.prototype._addServerExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(e$2b(t)||o$1q.typeOf.string("options.name",t),e$2b(i)||o$1q.typeOf.string("options.position",i),e$2b(this._serverExcavationRegions.get(t)))return!1;e$2b(this._excavationTexture)||(this._excavationTexture=new t$V({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$10.RGBA}));var r=this._createRasterRegion(i,n,e$2b(n));if(r.name=t,this._serverExcavationRegions.set(t,r),this._excavationUpdate=!0,this._hasServerExcavation=!0,1===this._serverExcavationRegions.values.length){var o={};o.layer=this,this.traverseRenderEntity(o,_0x3f4d51)}return!0},_0x22e933.prototype.removeExcavationRegion=function(e){var t=this._excavationRegions.get(e);if(!this._excavationRegions.remove(e))return!1;if(t.destroy(),this._removeExcavationCommands(e),this._excavationUpdate=!0,0===this._excavationRegions.values.length){this._hasExcavation=!1,this._excavationUpdate=!1;var i={};i.layer=this,this.traverseRenderEntity(i,_0x5038fd)}return!0},_0x22e933.prototype._removeServerExcavationRegion=function(e){var t=this._serverExcavationRegions.get(e);if(!this._serverExcavationRegions.remove(e))return!1;if(t.destroy(),this._removeExcavationCommands(e),this._excavationUpdate=!0,0===this._serverExcavationRegions.values.length){this._excavationUpdate=!1,this._hasExcavation=!1;var i={};i.layer=this,this.traverseRenderEntity(i,_0x11e85f)}return!0},_0x22e933.prototype._removeExcavationCommands=function(e){var t=this._excavateRegionCommands.get(e+"side"),i=this._excavateRegionCommands.get(e+"bottom");t&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy()),i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom")},_0x22e933.prototype.removeAllExcavationRegion=function(){this._hasExcavation=!1;for(var e=Object.keys(this._excavationRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this.removeExcavationRegion(n)}this._excavationRegions.removeAll()},_0x22e933.prototype._createRasterRegion=function(e,t,i){var n=o$1p.fromDegreesArrayHeights(e);if(this._sceneMode!==C$13.SCENE3D)for(var r=0;r<n.length;r++)n[r]=_0x230367(this,n[r]);var o=new z$_({polygonHierarchy:{positions:n},perPositionHeight:!0}),a=z$_.createGeometry(o),s=new p$1d;p$1d.inverse(this._matModel,s),f$X.updateGeometry(a,e,s);var l=new f$X;if(l._geometry=a,l._bounds=f$X.updateGeoBounds(a),i){l.worldGeometry=z$_.createGeometry(o),l.colorGeometry=z$_.createGeometry(o);var u=o$1p.fromDegrees(e[0],e[1],0),c=new i$15(0,0,0);l._excavateMatrix=m$17.headingPitchRollToFixedFrame(u,c,t$13.WGS84),l.modelMatrix=p$1d.fromTranslation(new o$1p(e[0],e[1],0),new p$1d);for(var h=Number.MAX_VALUE,d=(r=0,e.length);r<d;r+=3)h=Math.min(h,e[r+2]);l.height=h-t,l.rectangle=h$18.fromCartesianArray(n),l.positions=e}return l},_0x22e933.prototype._createRasterBounds=function(e){var t=new j$N({rectangle:e}),i=j$N.createGeometry(t),n=new p$1d;if(p$1d.inverse(this._matModel,n),this._sceneMode===C$13.COLUMBUS_VIEW)for(var r=0;r<i.attributes.position.values.length;r+=i.attributes.position.componentsPerAttribute){var o=new o$1p(i.attributes.position.values[r],i.attributes.position.values[r+1],i.attributes.position.values[r+2]),a=a$18.fromCartesian(o),s=new o$1p;this._projection.project(a,s),i.attributes.position.values[r]=s.z,i.attributes.position.values[r+1]=s.x,i.attributes.position.values[r+2]=s.y}f$X.updateGeometry(i,void 0,n);var l=new f$X;return l._geometry=i,l._bounds=f$X.updateGeoBounds(i),l},_0x22e933.prototype._computeLayerModelBounds=function(){var e=new o$1p.fromRadians(this._layerBounds.west,this._layerBounds.south,0),t=new o$1p.fromRadians(this._layerBounds.west,this._layerBounds.north,0),i=new o$1p.fromRadians(this._layerBounds.east,this._layerBounds.south,0),n=new o$1p.fromRadians(this._layerBounds.east,this._layerBounds.north,0),r=[];r.push(e),r.push(t),r.push(i),r.push(n);var o=new p$1d;p$1d.inverse(this._matModel,o),this._layerModelBounds=new e$29(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(var a=0;a<4;a++)p$1d.multiplyByPoint(o,r[a],r[a]),this._layerModelBounds.x=Math.min(r[a].x,this._layerModelBounds.x),this._layerModelBounds.y=Math.min(r[a].y,this._layerModelBounds.y),this._layerModelBounds.z=Math.max(r[a].x,this._layerModelBounds.z),this._layerModelBounds.w=Math.max(r[a].y,this._layerModelBounds.w)},_0x22e933.prototype._combineRegionBounds=function(e){for(var t=new e$29(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),i=0;i<e.length;i++){var n=e[i]._bounds;t.x=Math.min(n.x,t.x),t.y=Math.min(n.y,t.y),t.z=Math.max(n.z,t.z),t.w=Math.max(n.w,t.w)}return t},_0x22e933.prototype.createRasterRegionDrawCommand=function(e,t,i,n){if(e$2b(t)&&!e$2b(t._command)){var r=new i$_({primitiveType:W$18.TRIANGLES});t._command=r;var o={position:0};r.vertexArray=c$12.fromGeometry({context:e,geometry:t._geometry,attributeLocations:o,bufferUsage:A$19.STATIC_DRAW,interleave:!0});var a=new s$U({sources:[_0x3af34f]});n==_0x236c52.Altitude?(a.defines.push("Mode_Height"),i.pixelDatatype===_$$.FLOAT&&a.defines.push("UseFloatTexture"),r.shaderProgram=r$13.fromCache({name:"RegionAltitudeSp",context:e,vertexShaderSource:_0x568483,fragmentShaderSource:a,attributeLocations:o})):n==_0x236c52.Texture?(a.defines.push("OVERLAY"),r.shaderProgram=r$13.fromCache({name:"RegionTextureSp",context:e,vertexShaderSource:_0x4dbad4,fragmentShaderSource:a,attributeLocations:o})):r.shaderProgram=r$13.fromCache({name:"RegionRasterSp",context:e,vertexShaderSource:_0x3a1ce5,fragmentShaderSource:a,attributeLocations:o}),r.framebuffer=new t$W({context:e,colorTextures:[i],destroyAttachments:!1}),r.renderState=d$1m.fromCache({viewport:new f$18(0,0,this._flattenTextureWidth,this._flattenTextureWidth)})}},_0x22e933.prototype.updateHypRegionFrameBuffer=function(e,t){if(this._hypsometricRegionUpdate){if(!e$2b(this._hypsometricRegion))return void(this._bUseHypRegion=!1);this._bUseHypRegion=!0,this._hypsometricRegionUpdate=!1;var i=new t$X({color:new e$1U(0,0,0,0),depth:1});i.framebuffer=new t$W({context:e,colorTextures:[this._hypsometricRenderTexture],destroyAttachments:!1}),i.renderState=d$1m.fromCache(),i.execute(e),this.createRasterRegionDrawCommand(e,this._hypsometricRegion,this._hypsometricRenderTexture,_0x236c52.Color);var n=this;this._hypsometricRegion._command.uniformMap={uRect:function(){return n._hypsometricBound}},this._hypsometricRegion._command.execute(e),i.framebuffer.destroy()}},_0x22e933.prototype.updateFlattenFrameBuffer=function(e,t){if(this._flattenUpdate){this._flattening=!0,this._flattenUpdate=!1,this._flattenBounds=this._combineRegionBounds(this._flattenRegions.values);var i=new t$X({color:new e$1U(0,0,0,0),depth:1});e$2b(this._flattenTexture)||(this._flattenTexture=new t$V({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$10.RGBA,pixelDatatype:this._context.floatingPointTexture?_$$.FLOAT:void 0})),i.framebuffer=new t$W({context:e,colorTextures:[this._flattenTexture],destroyAttachments:!1}),i.renderState=d$1m.fromCache(),i.execute(e);var n=this._flattenRegions.values.length;n<1&&(this._flattening=!1);for(var r=0;r<n;r++){var o=this._flattenRegions.values[r];this.createRasterRegionDrawCommand(e,o,this._flattenTexture,_0x236c52.Altitude);var a=this;o._command.uniformMap={uRect:function(){return a._flattenBounds}},o._command.execute(e)}i.framebuffer.destroy()}},_0x22e933.prototype.updateOverlayFrameBuffer=function(e,t){if(this._overlayUpdate){this._overlayUpdate=!1,this._overlayBounds=this._combineRegionBounds(this._overlayRegions.values),this._hasOverlay=this._overlayRegions.length>0;var i=new t$X({color:new e$1U(1,1,1,1),depth:1});i.framebuffer=new t$W({context:e,colorTextures:[this._overlayTexture],destroyAttachments:!1}),i.renderState=d$1m.fromCache(),i.execute(e);for(var n=this._overlayRegions.values.length,r=0;r<n;r++){var o=this._overlayRegions.values[r],a=this._overlayTextures.values[r];this.createRasterRegionDrawCommand(e,o,this._overlayTexture,_0x236c52.Texture),o._command.uniformMap=s(this._overlayBounds,a,o._bounds),o._command.execute(e)}i.framebuffer.destroy()}function s(e,t,i){return{uRect:function(){return e},uTexture:function(){return t},uSingleRegion:function(){return i}}}},_0x22e933.prototype._updateExcavationFrameBuffer=function(e,t){if(this._excavationUpdate){for(var i in t._framebufferList)i.indexOf("_excavationHeightLayer")>-1&&!e$2b(this._excavationRegions.get(i.slice(22)))&&(t._framebufferList[i]=!t._framebufferList[i].isDestroyed()&&t._framebufferList[i].destroy(),delete t._framebufferList[i]);var n=this._excavationRegions.values.length;this._hasExcavation=n>0,this._excavationUpdate=!1,this._excavationBounds=this._combineRegionBounds(this._excavationRegions.values);var r=this._serverExcavationRegions.values.length;if(this._hasServerExcavation=r>0,this._serverExcavationBounds=this._combineRegionBounds(this._serverExcavationRegions.values),0!=n||0!=r){var o=new t$X({color:new e$1U(0,0,0,0),depth:1});o.framebuffer=new t$W({context:e,colorTextures:[this._excavationTexture],destroyAttachments:!1}),o.renderState=d$1m.fromCache(),o.execute(e),b$W.createExcavationSideTexture(t,this),b$W.createExcavationBottomTexture(t,this);for(var a=0;a<n;a++){var s=this._excavationRegions.values[a];this.createRasterRegionDrawCommand(e,s,this._excavationTexture,_0x236c52.Color),e$2b(s.height)&&(b$W._createExcavationSideCommand(t,this,s),b$W._createExcavationBottomCommand(t,this,s));var l=this;s._command.uniformMap={uRect:function(){return l._excavationBounds}},s._command.execute(e)}for(var u=0;u<r;u++){s=this._serverExcavationRegions.values[u];this.createRasterRegionDrawCommand(e,s,this._excavationTexture,_0x236c52.Color),e$2b(s.height)&&(b$W._createExcavationSideCommand(t,this,s),b$W._createExcavationBottomCommand(t,this,s));l=this;s._command.uniformMap={uRect:function(){return l._serverExcavationBounds}},s._command.execute(e)}o.framebuffer.destroy()}}},_0x22e933.prototype.updateAllObjsVisible=function(e){this.traverseRenderEntity({layer:this,isVisible:e},_0x3f747d)},_0x22e933.prototype.updateObjsTheme=function(){var e={layer:this};this.traverseRenderEntity(e,_0x538ae5)},_0x22e933.prototype.updateObjsColor=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x2f0852)},_0x22e933.prototype.updateExtendHeight=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x58b954)},_0x22e933.prototype.removeExtendHeight=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x30e390)},_0x22e933.prototype.removeAllExtendHeight=function(){this.traverseRenderEntity({},_0x505c51)},_0x22e933.prototype.updateObjsOperation=function(e){var t={ids:e,offset:Math.max(Math.abs(this.selectedTranslate.x),Math.abs(this.selectedTranslate.y),Math.abs(this.selectedTranslate.z))};this.traverseRenderEntity(t,_0x9f80c9)},_0x22e933.prototype.refresh=function(){this._layerScheduler.refresh(),this.initialize()},_0x22e933.prototype.refreshVolume=function(){this._refreshVolume=!0},_0x22e933.prototype.clearCustomClipBox=function(){this.isRenderClipSection()&&this._context.numClampClipPlaneLayer--;for(var e=0,t=this._renderClipPlaneArray.values.length;e<t;e++)this._renderClipPlaneArray.values[e].destroy(),this._renderClipPlaneArray.values[e]=null;this._renderClipPlaneArray.removeAll(),this._clipping=!1;var i={layer:this,enable:!1};this.traverseRenderEntity(i,_0x5e8ef6),this._section=!1};var _0x14b66c=new a$18;function _0x3e670b(e){return e===R$J.KeepOutside?j$X.Disjoint:j$X.Intersects}function _0x423032(e,t){e.lightSourceChanged(t)}function _0x3d3175(e,t){e.updateShadow(t.layer)}function _0x5e8ef6(e,t){e.setCustomClipBox(t.layer,t.enable)}function _0x90188f(e,t){e.enableAdjustColor(t)}function _0x235e1d(e,t){e.enableExcavation(t)}function _0x5038fd(e,t){e.disableExcavation(t)}function _0x3f4d51(e,t){e.enableServerExcavation(t)}function _0x11e85f(e,t){e.disableServerExcavation(t)}function _0x8f962(e,t){e.enableFlatten(t)}function _0x56bfb4(e,t){e.enableOverlay(t)}function _0x5d5603(e,t){e.disableOverlay(t)}function _0x5f032b(e,t){e.enableAjustTransparentBackColor(t)}function _0x1fc069(e,t){e.disableAjustTransparentBackColor(t)}function _0xb76181(e,t){e.disableFlatten(t)}function _0x2d0dfd(e,t){e.enableHypsometric(t)}function _0x1067d9(e,t){e.disableHypsometric(t)}function _0x5a24f0(e,t){e.hasLightChange(t)}function _0x4c8e11(e,t){e.skeletonSelectEnable(t)}function _0x264393(e,t){e.selectColorTypeChange(t)}function _0x3fe446(e,t){e.mixColorTypeChange(t)}function _0x320632(e,t){e.splitDirectionChange(t)}function _0x5ac131(e,t){e.swipeStateChange(t)}function _0x30c7b8(e,t){e.PBRMaterialTypeChange(t)}function _0x2696f4(e,t){e.enableCategoryVisible(t)}function _0x388bf7(e,t){e.emissionTextureChange(t)}function _0xa7b04e(e,t){e.enableTextureMove(t)}function _0x45f5e3(e,t){e.enableTriangleFiltrate(t)}function _0x30c63e(e,t){e.enableClipFilt(t)}function _0xcf3b3(e,t){e.enableFusionChange(t)}function _0x44c915(e,t){e.enableFlood(t)}function _0x2c98e0(e,t){e.disableFlood(t)}function _0x53b69d(e){for(var t=1;t<e;)t<<=1;return t}function _0x1e4fa7(e,t){e.emissionTextureUnitChange(t)}function _0x10da3d(e,t){var i=p$1d.multiply(e._geoMatrix,t.scaleMatrix,new p$1d);p$1d.multiply(t.layerMatrix,i,e._matModel),e._modelMatrixDirty=!0}function _0x1ffa57(e,t){e.pbrParameterChange(t)}function _0x469ac0(e,t){e.edgeWireFrameModeChange(t)}function _0x407dab(e,t){var i=t,n=i._PBRMaterialParams.baseUri;i._PBRMaterialParams=e.material,i._PBRMaterialParams.baseUri=n,i._loadMaterialTexture(i._PBRMaterialParams,n);var r=i._PBRMaterialParams.pbrMetallicRoughness,o=i._PBRMaterialParams.textureunitstates;if(e$2b(r.snowEffect)&&-1!==r.snowEffect.snowNormalTextureIndex){var a=n+o[r.snowEffect.snowNormalTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0x579c48(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.snowEffect,"snowNormalTexture")}if(e$2b(r.snowEffect)&&-1!==r.snowEffect.snowMaskTextureIndex){a=n+o[r.snowEffect.snowMaskTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0x579c48(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.snowEffect,"snowMaskTexture")}if(e$2b(r.rainEffect)&&-1!==r.rainEffect.rippleTextureIndex){a=n+o[r.rainEffect.rippleTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0x579c48(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.rainEffect,"rippleTexture")}}function _0x4dd49b(e,t){return e.find((e=>t.url.includes(e._fileName)))}function _0x3b4551(e,t){e._historicalRecord.rootTiles.forEach((i=>{let n=_0x4dd49b(e._layerScheduler._rootEntities,i);if(n){let a=i.History[t];if(!a||(a=a.replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,""),a==n._fileName))return;n._fileName=f$O(a);for(var r=0;r<n._childrenPageLod.length;r++){var o=n._childrenPageLod[r];o=o&&!o.isDestroyed()&&o.destroy()}n._childrenPageLod.length=0,n.attributeBuffer=n.attributeBuffer&&!n.attributeBuffer.isDestroyed()&&n.attributeBuffer.destroy(),e._layerScheduler.LoadingPriority==_0x10659f.UsePagedLodInfo&&n._isRootTile?(n._configReady=!1,n._configLoadState=N$P.UNLOAD):(n._ready=!1,n._s3mLoadState=N$P.UNLOAD)}}))}_0x22e933.prototype.setCustomClipBox=function(e){if(!((e=e||{}).dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$16("dimensions position is required to create CustomClipBox");if(this._clipMode=_0x4a6483.CLIP_BEHIND_ALL_PLANE,e$2b(e.clipMode))switch(e.clipMode){case"clip_behind_any_plane":this._clipMode=_0x4a6483.CLIP_BEHIND_ANY_PLANE;break;case"clip_behind_all_plane":this._clipMode=_0x4a6483.CLIP_BEHIND_ALL_PLANE;break;case"only_keep_line":this._clipMode=_0x4a6483.ONLY_KEEP_LINE}if(e.dimensions){var t=new p$1d,i=e.position,n=new i$15(e.heading||0,e.pitch||0,e.roll||0);t=m$17.headingPitchRollToFixedFrame(i,n,t$13.WGS84);var r=.5*e.dimensions.x,o=.5*e.dimensions.y,a=.5*e.dimensions.z,s=[];s[0]=new e$29,s[0].x=-r,s[0].y=o,s[0].z=a,s[0].w=1,s[1]=new e$29,s[1].x=r,s[1].y=o,s[1].z=a,s[1].w=1,s[2]=new e$29,s[2].x=r,s[2].y=-o,s[2].z=a,s[2].w=1,s[3]=new e$29,s[3].x=-r,s[3].y=-o,s[3].z=a,s[3].w=1,s[4]=new e$29,s[4].x=-r,s[4].y=o,s[4].z=-a,s[4].w=1,s[5]=new e$29,s[5].x=r,s[5].y=o,s[5].z=-a,s[5].w=1,s[6]=new e$29,s[6].x=r,s[6].y=-o,s[6].z=-a,s[6].w=1,s[7]=new e$29,s[7].x=-r,s[7].y=-o,s[7].z=-a,s[7].w=1;for(var l=0;l<8;l++)p$1d.multiplyByVector(t,s[l],s[l]);if(this._sceneMode!==C$13.SCENE3D){var u=new n$1b;for(l=0;l<8;l++){var c=s[l],h=a$18.fromCartesian(c,void 0,_0x14b66c),d=u.project(h,s[l]);p$1d.multiplyByPoint(_0x2c98df,d,s[l])}}this._oriClipPlane[0]=e$29.clone(_0x3efb93(s[0],s[1],s[2])),this._oriClipPlane[1]=e$29.clone(_0x3efb93(s[0],s[4],s[1])),this._oriClipPlane[2]=e$29.clone(_0x3efb93(s[0],s[3],s[4])),this._oriClipPlane[3]=e$29.clone(_0x3efb93(s[6],s[2],s[5])),this._oriClipPlane[4]=e$29.clone(_0x3efb93(s[6],s[7],s[2])),this._oriClipPlane[5]=e$29.clone(_0x3efb93(s[6],s[5],s[7]))}else for(l=0;l<e.planePos.length;l++){var f=e.planePos[l],p=e.planeNormal[l];this._oriClipPlane[l].x=p.x,this._oriClipPlane[l].y=p.y,this._oriClipPlane[l].z=p.z,this._oriClipPlane[l].w=-o$1p.dot(f,p)}if(!this._clipping){e={layer:this,enable:!0};this.traverseRenderEntity(e,_0x5e8ef6)}this._clipping=!0},_0x22e933.prototype.setClipSection=function(e,t,i,n){var r=u$_(n,_0xff9e19.NONE);if(this._clipPlaneMode!==r&&(r!==_0xff9e19.NONE?this._context.numClampClipPlaneLayer++:this._context.numClampClipPlaneLayer--),this._clipPlaneMode=r,this.isRenderClipSection()){var o=this._renderClipPlaneArray.get(0);e$2b(o)||(o=new _0x3218ec(this),this._renderClipPlaneArray.set(0,o)),o.setPoints(e,t,i),this._section||this._context.numClampClipPlaneLayer++}},_0x22e933.prototype.setCustomClipPlane=function(e,t,i,n){if(this._sceneMode===C$13.COLUMBUS_VIEW&&(e=_0x230367(this,e),t=_0x230367(this,t),i=_0x230367(this,i)),this.setClipSection(e,t,i,n),this._oriClipPlane[0]=_0x3efb93(e,t,i),this._clipMode=_0x4a6483.CLIP_BEHIND_ALL_PLANE,this._section=!0,!this._clipping){var r={layer:this,enable:!0};this.traverseRenderEntity(r,_0x5e8ef6)}this._clipping=!0},_0x22e933.prototype.setCustomClipGeometry=function(e){var t=(e=e||{}).geometry;this._spatialClipEnable=!0;var i=e.spatialQuery,n=e.clippingType;i.geometry=t,i.positionMode=_0x3e670b(n),i._profile=!0,i._clipLayers.set(this.name,this),this._sqMode=i.positionMode,this._spatialQuery=i,this._clippingType=n},_0x22e933.prototype.clearCustomClipGeometry=function(){this._spatialClipEnable=!1},_0x22e933.prototype.setCustomClipCross=function(e){if(!(e=e||{}).dimensions||!e.position)throw new t$16("dimensions position is required to create CustomClipBox");this._clipMode=_0x4a6483.CLIP_BEHIND_ALL_PLANE;var t,i,n,r=new p$1d,o=e.position;t=e.heading||0,i=e.pitch||0,n=e.roll||0;var a,s,l,u=u$_(e.extrudeDistance,.1),c=new i$15(e$2a.toRadians(t),e$2a.toRadians(i),e$2a.toRadians(n));if(this._sceneMode===C$13.SCENE3D)r=m$17.headingPitchRollToFixedFrame(o,c,t$13.WGS84);else{var h=_0x230367(this,o);p$1d.setTranslation(p$1d.clone(p$1d.IDENTITY),h,r);var d=p$1e.fromHeadingPitchRoll(c);p$1d.multiplyByMatrix3(r,d,r)}a=.5*e.dimensions.x,s=.5*e.dimensions.y,l=u;var f=[];f[0]=new e$29,f[0].x=-a,f[0].y=s,f[0].z=l,f[0].w=1,f[1]=new e$29,f[1].x=a,f[1].y=s,f[1].z=l,f[1].w=1,f[2]=new e$29,f[2].x=a,f[2].y=-s,f[2].z=l,f[2].w=1,f[3]=new e$29,f[3].x=-a,f[3].y=-s,f[3].z=l,f[3].w=1,f[4]=new e$29,f[4].x=-a,f[4].y=s,f[4].z=-l,f[4].w=1,f[5]=new e$29,f[5].x=a,f[5].y=s,f[5].z=-l,f[5].w=1,f[6]=new e$29,f[6].x=a,f[6].y=-s,f[6].z=-l,f[6].w=1,f[7]=new e$29,f[7].x=-a,f[7].y=-s,f[7].z=-l,f[7].w=1;for(var p=0;p<8;p++)p$1d.multiplyByVector(r,f[p],f[p]);this._oriClipPlane[0]=new e$29(0,0,0,0),this._oriClipPlane[1]=e$29.clone(_0x3efb93(f[0],f[4],f[1])),this._oriClipPlane[2]=e$29.clone(_0x3efb93(f[0],f[3],f[4])),this._oriClipPlane[3]=e$29.clone(_0x3efb93(f[6],f[2],f[5])),this._oriClipPlane[4]=e$29.clone(_0x3efb93(f[6],f[7],f[2])),this._oriClipPlane[5]=e$29.clone(_0x3efb93(f[6],f[5],f[7])),this._clipping||this.traverseRenderEntity({layer:this,enable:!0},_0x5e8ef6),this._clipping=!0},_0x22e933.prototype.getClipRegion=function(){if(this._clipping){var e=o$1m.fromCartesian4(this._oriClipPlane[0]),t=this._layerBounds;if(e$2b(t)){var i=h$18.southwest(t),n=h$18.northwest(t),r=h$18.northeast(t),o=h$18.southeast(t);i=o$1p.fromRadians(i.longitude,i.latitude,i.height),n=o$1p.fromRadians(n.longitude,n.latitude,n.height),r=o$1p.fromRadians(r.longitude,r.latitude,r.height),o=o$1p.fromRadians(o.longitude,o.latitude,o.height);var a=new o$1p(0,0,0),s=o$1p.normalize(i,new o$1p),l=o$1p.normalize(n,new o$1p),u=o$1p.normalize(r,new o$1p),c=o$1p.normalize(o,new o$1p),h=new f$17(a,s),d=new f$17(a,l),f=new f$17(a,u),p=new f$17(a,c),_=g$1h.rayPlane(h,e),m=g$1h.rayPlane(d,e),g=g$1h.rayPlane(f,e),x=g$1h.rayPlane(p,e);if(e$2b(_)&&e$2b(m)&&e$2b(g)&&e$2b(x))return{polygon:{hierarchy:[_,m,g,x],material:e$1U.WHITE.withAlpha(.5),perPositionHeight:!0}}}}},_0x22e933.prototype.addWaterPlane=function(e){if(!(e=e||{}).boundingVolume)throw new t$16("position radius distance is required to add the plane");this._waterPlanes=this._waterPlanes?this._waterPlanes:new e$1N;var t=this._waterPlanes.length;return this._waterPlanes.set(t,e),t},_0x22e933.prototype.removeWaterPlane=function(e){this._waterPlanes.remove(e)},_0x22e933.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x22e933.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~3");return 1<<e&this._visibleViewport},_0x22e933.prototype.setFlattenRegionVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._flattenVisibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x22e933.prototype.updateShadow=function(){var e={layer:this};this.traverseRenderEntity(e,_0x3d3175)},_0x22e933.prototype.isSilhouette=function(){return this._selectColorType===Zr$2.SILHOUETTE||this._selectColorType===Zr$2.ALWAYS_SHOW_SILHOUETTE},_0x22e933.prototype.isRenderClipSection=function(){return this._clipPlaneMode!==_0xff9e19.NONE},_0x22e933.prototype.bloomEnableChange=function(e){e?this._context.numPostEffectFilterObject++:this._context.numPostEffectFilterObject--},_0x22e933.prototype.lightSourceChanged=function(e){this.traverseRenderEntity({changedList:e,layer:this},_0x423032)},_0x22e933.prototype.getAttributesById=function(e){if(0!==parseInt(e)&&!parseInt(e))throw new t$16("id must be a number!");return this._layerScheduler.getAttributesById(e)},_0x22e933.prototype.traverseRenderEntity=function(e,t){this._layerScheduler.traverseRenderEntity(e,t)},_0x22e933.prototype.isDestroyed=function(){return!1},_0x22e933.prototype.destroy=function(){e$2b(this._layerScheduler)&&(this._layerScheduler.destroy(),this._layerScheduler=null);for(var e=0;e<this._flattenRegions.values.length;e++)this._flattenRegions.values[e].destroy(),this._flattenRegions.values[e]=null;this._flattenRegions.removeAll(),delete this._flattenBounds,this._flattenBounds=null,e$2b(this._flattenTexture)&&(this._flattenTexture.destroy(),this._flattenTexture=null);for(var t=Object.keys(this._excavationRegions._hash),i=(e=0,t.length);e<i;e++){var n=t[e];this._excavationRegions.get(n).destroy(),this._removeExcavationCommands(n)}if(this._excavationRegions.removeAll(),delete this._excavationBounds,this._excavationBounds=null,e$2b(this._excavationTexture)&&(this._excavationTexture.destroy(),this._excavationTexture=null),e$2b(this._excavationSideTexture)&&(this._excavationSideTexture.destroy(),this._excavationSideTexture=null),e$2b(this._excavationBottomTexture)&&(this._excavationBottomTexture.destroy(),this._excavationBottomTexture=null),e$2b(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),e$2b(this._hypsometricRenderTexture)&&(this._hypsometricRenderTexture.destroy(),this._hypsometricRenderTexture=null),e$2b(this._hypsometricSetting)&&(this._hypsometricSetting.destroy(),this._hypsometricSetting=null),e$2b(this._hypsometricRegion)&&(this._hypsometricRegion.destroy(),this._hypsometricRegion=null),e$2b(this._noiseMapTexture)&&(this._noiseMapTexture.destroy(),this._noiseMapTexture=null),e$2b(this._pbrMetalTexture)&&(this._pbrMetalTexture.destroy(),this._pbrMetalTexture=null),e$2b(this._pbrRoughTexture)&&(this._pbrRoughTexture.destroy(),this._pbrRoughTexture=null),this._fileType===d$15.ClampGroundRealtimeRasterCache&&this.refreshRaster(),e$2b(this._spatialQuery)&&e$2b(this._spatialQuery._clipLayers)&&this._spatialQuery._clipLayers.remove(this.name),e$2b(this._commonLayerUniformBuffer)&&(this._commonLayerUniformBuffer.destroy(),this._commonLayerUniformBuffer=null),e$2b(this._materialMap))for(var r in this._materialMap)if(this._materialMap.hasOwnProperty(r)){var o=this._materialMap[r].material.pbrMetallicRoughness;if(!e$2b(o))continue;e$2b(o.baseColorTexture)&&o.baseColorTexture.destroy(),e$2b(o.normalTexture)&&o.normalTexture.destroy(),e$2b(o.emissiveTexture)&&o.emissiveTexture.destroy(),e$2b(o.metallicRoughnessTexture)&&o.metallicRoughnessTexture.destroy(),e$2b(o.occlusionTexture)&&o.occlusionTexture.destroy()}if(e$2b(this._spatialQuery)&&e$2b(this._spatialQuery._clipLayers)&&this._spatialQuery._clipLayers.remove(this.name),e$2b(this.instanceSkeletonManager)){for(var r in this.instanceSkeletonManager.skeletons._hash)this.instanceSkeletonManager.skeletons._hash.hasOwnProperty(r)&&this.instanceSkeletonManager.remove(r);this.instanceSkeletonManager=void 0}return e$2b(this._layerUBO)&&(this._layerUBO.destroy(),this._layerUBO=null),i$10(this)},_0x22e933.prototype.setVolume=function(e){if(!(e$2b(e.values)&&e$2b(e.width)&&e$2b(e.height)&&e$2b(e.depth)&&e$2b(e.maxValue)&&e$2b(e.minValue)&&e$2b(e.maxHeight)&&e$2b(e.minHeight)&&e$2b(e.bounds)))throw new t$16("invalid volume object");this._volData={};var t=e.width,i=e.height,n=e.depth,r=Math.ceil(Math.sqrt(n));this._volData._nSideBlockCount=r;var o=Math.max(t,i)+2;this._volData._nBlockLength=o;var a=_0x53b69d(o*r-2);this._volData._nLength=a;var s=e.maxValue,l=e.minValue;this._volData._maxValue=s,this._volData._minValue=l,this._volData._width=t,this._volData._height=i,this._volData._depth=n;var u=e.bounds.leftBottom.x,c=e.bounds.rightTop.y,h=e.bounds.rightTop.x,d=e.bounds.leftBottom.y;this._volData._volBounds={left:u,top:c,right:h,bottom:d,minHeight:e.minHeight,maxHeight:e.maxHeight,width:h-u,length:c-d,height:e.maxHeight-e.minHeight};var f=a*a,p=new Array(f);p.fill(-1);for(var _=s-l,m=0;m<n;m++)for(var g=parseInt(m/r)*o,x=m%r*o,v=0;v<o-2;v++)for(var y=0;y<o-2;y++){var $=Math.min(y,t-1),b=m*i*t+(i-1-Math.min(v,i-1))*t+$,T=e.values[b];new e$29(0,0,0,0),-9999!=T&&(T=(T-l)/_,p[b=(g+v)*a+x+y]=T)}var C=new Float32Array(p,0,f);this._volData._buffer=new Uint8Array(C.buffer,0,4*f),this._fMaxValue=s,this._fMinValue=l},_0x22e933.prototype._setSQTextures=function(e){this._sqTextures=e},_0x22e933.prototype._setSQViewPrjMatrix=function(e,t){this._sqViewMatirx=e,this._sqPrjMatirx=t},_0x22e933.prototype._setSQMode=function(e){this._sqMode=e},_0x22e933.prototype._updateEdgeDistanceFalloffFactor=function(){0!=this._edgeCurrentCount?(this._edgeDistanceFalloffFactor=this._edgeCurrentTotalLength/this._edgeCurrentCount*40,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0):this._edgeCurrentTotalLength=0},_0x22e933.prototype._addRenderedEdge=function(e,t){this._edgeCurrentTotalLength+=e,this._edgeCurrentCount+=t},_0x22e933.prototype.setTextureEmissive=function(e){if(e!==this.textureEmissionUnit){this.textureEmissionUnit=e;var t={enable:!0};t.layer=this,this.traverseRenderEntity(t,_0x1e4fa7)}},_0x22e933.prototype.setPBRMaterial=function(e){LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_setPBRMaterial");var t=this._pbrParameter;if(this._pbrParameter|=e,t!==this._pbrParameter){var i={enable:!0};i.layer=this,this.traverseRenderEntity(i,_0x1ffa57)}},_0x22e933.prototype.setPBRMaterialFromJSON=function(e){if(LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_setPBRMaterial"),this._pbrParameter===je$g.NONE){var t=this,i="string"==typeof e;t._PBRMaterialParams.baseUri=i?i$1a(e):"",i?u$Q(e).then((function(e){_0x407dab(e,t)})):_0x407dab(e,t),this._usePBR=!0}},_0x22e933.prototype._updatePBRMaterial=function(){if(e$2b(this._PBRMaterialParams)&&e$2b(this._PBRMaterialParams.pendingTextureCount)&&this._PBRMaterialParams.pendingTextureCount===this._PBRMaterialParams.readyTextureCount){var e={enable:!0};e.layer=this,this.traverseRenderEntity(e,_0x1ffa57),this._PBRMaterialParams.loadingTexture=!1}},_0x22e933.prototype.removePBRMaterial=function(){var e=this._PBRMaterialParams.pbrMetallicRoughness;for(var t in e)e.hasOwnProperty(t)&&e[t]instanceof t$V&&e[t].destroy();this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:0,baseColor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:o$1p.ZERO,emissiveTextureIndex:-1,occlusionTextureIndex:-1,metallicRoughnessTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0,intensityScale:1,snowEffect:void 0,rainEffect:void 0},loadingTexture:void 0},this._usePBR=!1;var i={enable:!0};i.layer=this,this.traverseRenderEntity(i,_0x1ffa57)},_0x22e933.prototype.setExtrudedPolygons=function(e,t){this._layerScheduler._extrudedId=e,this._layerScheduler._polygons=t},_0x22e933.prototype._initEdgeTexture=function(){var e=[1,256,65536,16777216];function t(t,i,n){var r,o,a,s;n=u$_(n,0),r=t,o=0,a=1,t=Math.min(Math.max(r,o),a);for(var l=0;l<4;l++)i[n+l]=Math.floor(256*((s=t*e[l])-Math.floor(s)))}const i=8,n=256,r=[{distance:[-1.59027,-1.59426,-1.59674,-1.59766,-1.59702,-1.59479,-1.59095,-1.5855,-1.57843,-1.56973,-1.55942,-1.5475,-1.53398,-1.5189,-1.50226,-1.4841,-1.46446,-1.44337,-1.42088,-1.39703,-1.37188,-1.34547,-1.31786,-1.28912,-1.2593,-1.22847,-1.19668,-1.16402,-1.13053,-1.09629,-1.06137,-1.02582,-.98972,-.95313,-.91611,-.87872,-.84102,-.80306,-.76488,-.72654,-.68807,-.64952,-.61092,-.57232,-.53375,-.49527,-.45692,-.41874,-.38078,-.34309,-.3057,-.26867,-.23204,-.19585,-.16015,-.12497,-.09036,-.05634,-.02296,.00977,.04183,.07321,.10389,.13386,.16313,.19169,.21956,.24672,.27321,.299,.32413,.34858,.37237,.3955,.41798,.43981,.461,.48154,.50145,.52073,.53939,.55744,.57488,.5917,.6079,.62347,.63837,.65259,.66609,.67885,.69083,.70201,.71235,.72183,.73042,.73812,.7449,.75076,.7557,.75973,.76284,.76507,.76642,.76692,.76659,.76545,.76352,.76083,.7574,.75324,.74837,.74279,.73652,.72959,.72199,.71377,.70493,.69553,.68558,.67515,.66426,.65298,.64135,.62944,.6173,.60499,.59257,.58008,.56759,.55513,.54275,.5305,.51842,.50654,.4949,.48353,.47246,.4617,.45128,.44121,.43149,.42213,.41313,.40448,.39617,.38818,.3805,.37309,.36594,.35902,.35229,.34572,.33927,.33292,.32663,.32035,.31407,.30774,.30135,.29486,.28824,.28148,.27454,.26739,.26002,.25241,.24454,.23639,.22796,.21922,.21016,.20076,.19098,.18082,.17023,.1592,.14768,.13566,.1231,.10996,.09624,.08188,.06688,.05121,.03485,.01778,0,-.0185,-.03771,-.05763,-.07824,-.09952,-.12144,-.14396,-.16706,-.19069,-.21481,-.23938,-.26436,-.28971,-.31539,-.34136,-.36759,-.39404,-.42067,-.44746,-.47437,-.50136,-.52839,-.55544,-.58248,-.60948,-.63642,-.66329,-.6901,-.71684,-.74352,-.77015,-.79675,-.82332,-.84988,-.87644,-.90301,-.92958,-.95615,-.98272,-1.00926,-1.03575,-1.06217,-1.08847,-1.11463,-1.1406,-1.16633,-1.19178,-1.2169,-1.24164,-1.26595,-1.28979,-1.31312,-1.3359,-1.35809,-1.37963,-1.4005,-1.42064,-1.44,-1.45853,-1.47616,-1.49285,-1.50853,-1.52313,-1.53659,-1.54886,-1.55986,-1.56955,-1.57788,-1.5848],pressure:[-.01365,-.00206,.01025,.02327,.03696,.05129,.06619,.08163,.09755,.11393,.1307,.14784,.16531,.18308,.20111,.21938,.23786,.25651,.2753,.29419,.31315,.33215,.35115,.37015,.38913,.40806,.42694,.44576,.46449,.48313,.50167,.5201,.53839,.55653,.57448,.59222,.60971,.62692,.6438,.66033,.67648,.69221,.70753,.72242,.73688,.75093,.76456,.77779,.79063,.80309,.81517,.82686,.83817,.84911,.85967,.86987,.87972,.88924,.89845,.90734,.91594,.92425,.93229,.94005,.94754,.95475,.96166,.96826,.97451,.9804,.98588,.99092,.99549,.99957,.99685,.99381,.99131,.98936,.98796,.98711,.98681,.98706,.98787,.98923,.99113,.99357,.99654,1,.99607,.99171,.98695,.98181,.97634,.97057,.96452,.95824,.95175,.94506,.93818,.93113,.92389,.91647,.90887,.90109,.89314,.88501,.87672,.86831,.85978,.85119,.84256,.83393,.82533,.8168,.80836,.80002,.79181,.78374,.77582,.7681,.76059,.75331,.74629,.73955,.73311,.72697,.72116,.71568,.71054,.70572,.70121,.697,.69304,.68931,.68576,.68236,.67905,.67582,.67262,.66941,.66619,.66291,.65957,.65613,.65259,.64892,.6451,.6411,.6369,.63248,.62783,.62295,.61783,.61247,.60688,.60104,.59498,.58868,.58216,.57542,.56845,.56125,.5538,.5461,.53813,.52986,.52129,.51239,.50316,.49359,.4837,.47349,.46299,.45223,.44124,.43005,.41869,.40719,.39557,.38386,.37207,.36023,.34836,.33648,.32464,.31287,.30119,.28963,.27822,.26698,.25594,.2451,.23448,.22409,.21391,.20394,.19415,.18452,.17503,.16565,.15636,.14713,.13794,.1288,.11968,.11058,.10151,.09247,.08346,.07447,.06552,.05659,.0477,.03885,.03007,.02137,.01278,.00433,-.00393,-.012,-.01983,-.02738,-.03463,-.04155,-.0481,-.05429,-.0601,-.06553,-.07057,-.07524,-.07954,-.08347,-.08703,-.09022,-.09303,-.09544,-.09744,-.09898,-.10004,-.10059,-.1006,-.10005,-.09892,-.0972,-.09487,-.09192,-.08833,-.08409,-.07918,-.07357,-.06724,-.06019,-.0524,-.04386,-.03455,-.02448]},{distance:[-3.46259,-3.47131,-3.47668,-3.47863,-3.47712,-3.4721,-3.46352,-3.45138,-3.43566,-3.41635,-3.39347,-3.36704,-3.33709,-3.30368,-3.26684,-3.22667,-3.18322,-3.1366,-3.08689,-3.0342,-2.97865,-2.92036,-2.85946,-2.79607,-2.73034,-2.66241,-2.59242,-2.52052,-2.44686,-2.37159,-2.29485,-2.2168,-2.13757,-2.05731,-1.97616,-1.89426,-1.81174,-1.72875,-1.64543,-1.56191,-1.47833,-1.39483,-1.3115,-1.22847,-1.14581,-1.06361,-.98193,-.90083,-.82036,-.74054,-.66141,-.583,-.50532,-.4284,-.35228,-.277,-.20261,-.12916,-.05672,.01463,.08485,.15384,.22153,.28784,.35269,.41602,.47776,.53787,.59629,.653,.70799,.76123,.81274,.86253,.9106,.95698,1.0017,1.04477,1.0862,1.126,1.16415,1.20065,1.23546,1.26857,1.29994,1.32953,1.35731,1.38321,1.40719,1.42921,1.44922,1.46719,1.48309,1.49691,1.50862,1.51825,1.52581,1.53133,1.53486,1.53644,1.53616,1.53409,1.53031,1.52493,1.51803,1.50972,1.50009,1.48924,1.47725,1.46421,1.45019,1.43527,1.4195,1.40295,1.38568,1.36778,1.34929,1.3303,1.31087,1.29108,1.27099,1.25066,1.23018,1.2096,1.18898,1.16838,1.14785,1.12745,1.10721,1.08719,1.06741,1.04791,1.02871,1.00986,.99136,.97324,.95551,.93819,.92127,.90476,.88866,.87296,.85767,.84277,.82823,.81406,.80022,.7867,.77346,.76049,.74774,.73519,.72278,.71049,.69827,.68606,.67381,.66145,.64893,.63618,.62313,.60973,.5959,.5816,.56675,.5513,.53516,.51826,.50053,.4819,.46231,.44169,.42002,.39725,.37336,.34834,.32219,.2949,.2665,.23698,.20638,.17469,.14193,.10809,.07316,.03714,0,-.03827,-.07772,-.11836,-.16022,-.20332,-.24768,-.29332,-.34024,-.38844,-.43788,-.48854,-.54036,-.59329,-.64724,-.70211,-.75782,-.81425,-.87128,-.92881,-.98674,-1.04498,-1.10346,-1.1621,-1.22086,-1.27969,-1.33854,-1.3974,-1.45625,-1.51511,-1.57396,-1.63283,-1.69173,-1.75067,-1.80968,-1.86875,-1.9279,-1.98712,-2.04639,-2.10568,-2.16495,-2.22416,-2.28322,-2.34208,-2.40063,-2.4588,-2.51647,-2.57354,-2.62989,-2.68543,-2.74002,-2.79357,-2.84597,-2.89711,-2.94689,-2.99521,-3.04195,-3.087,-3.13023,-3.17152,-3.21075,-3.24779,-3.28252,-3.3148,-3.34451,-3.37154,-3.39577,-3.41709,-3.43539,-3.45059],pressure:[.87183,.87151,.87129,.87118,.87117,.87128,.87149,.87182,.87225,.8728,.87347,.87424,.87513,.87613,.87723,.87845,.87978,.88122,.88276,.88441,.88616,.88801,.88996,.892,.89414,.89637,.89868,.90108,.90356,.90611,.90874,.91144,.91421,.91704,.91993,.92287,.92587,.92892,.93201,.93514,.93831,.94151,.94474,.94799,.95126,.95456,.95786,.96118,.9645,.96783,.97116,.97448,.9778,.98111,.98441,.9877,.99096,.99421,.99742,.99938,.99622,.9931,.99001,.98697,.98397,.98101,.97811,.97526,.97246,.96972,.96703,.96441,.96185,.95935,.95691,.95455,.95225,.95002,.94786,.94577,.94376,.94182,.93995,.93817,.93646,.93483,.93328,.93181,.93042,.92911,.92788,.92673,.92566,.92467,.92376,.92293,.92217,.92149,.92088,.92034,.91987,.91947,.91913,.91886,.91864,.91849,.91838,.91833,.91834,.91839,.91849,.91863,.91883,.91907,.91935,.91968,.92005,.92046,.92092,.92142,.92195,.92253,.92314,.9238,.92449,.92521,.92598,.92677,.9276,.92847,.92936,.93029,.93125,.93224,.93325,.9343,.93537,.93646,.93758,.93872,.93988,.94106,.94225,.94346,.94469,.94593,.94718,.94844,.94971,.95098,.95226,.95354,.95482,.9561,.95738,.95867,.95995,.96122,.9625,.96377,.96504,.9663,.96757,.96883,.97009,.97135,.97261,.97387,.97513,.9764,.97767,.97895,.98023,.98153,.98284,.98416,.98549,.98684,.98821,.9896,.99101,.99244,.99389,.99537,.99688,.99842,1,.99839,.99675,.99508,.99336,.99161,.98982,.98799,.98613,.98422,.98228,.98029,.97827,.97622,.97414,.97202,.96987,.9677,.96551,.9633,.96107,.95882,.95656,.9543,.95202,.94975,.94747,.94519,.94292,.94065,.93838,.93613,.93388,.93164,.92941,.9272,.92499,.9228,.92062,.91846,.91631,.91418,.91207,.90998,.90792,.90588,.90387,.90189,.89995,.89804,.89617,.89434,.89256,.89083,.88914,.88752,.88595,.88443,.88299,.88161,.8803,.87907,.87791,.87683,.87584,.87494,.87412,.8734,.87278,.87225]},{distance:[.39335,.43437,.47737,.52234,.56923,.61801,.66864,.72109,.7753,.83123,.88882,.94801,1.00875,1.07097,1.13461,1.1996,1.26586,1.33333,1.40193,1.47158,1.54221,1.61373,1.68607,1.75913,1.83284,1.90711,1.98186,2.05699,2.13243,2.20809,2.28387,2.35971,2.4355,2.51117,2.58663,2.66179,2.73658,2.81092,2.88473,2.95792,3.03043,3.10217,3.17308,3.24309,3.31211,3.3801,3.44697,3.51267,3.57712,3.64028,3.70208,3.76247,3.8214,3.87881,3.93467,3.98892,4.04152,4.09244,4.14164,4.18908,4.23474,4.27859,4.32061,4.36077,4.39905,4.43544,4.46992,4.50249,4.53314,4.56185,4.58864,4.61349,4.63642,4.65745,4.67657,4.69381,4.7092,4.72274,4.73447,4.74441,4.75259,4.75903,4.76376,4.76682,4.76822,4.768,4.76618,4.76279,4.75786,4.75142,4.74348,4.73409,4.72326,4.71102,4.69739,4.68241,4.6661,4.64849,4.6296,4.60948,4.58816,4.56567,4.54204,4.51732,4.49154,4.46473,4.43694,4.4082,4.37854,4.348,4.31662,4.28443,4.25145,4.21773,4.1833,4.14819,4.11243,4.07606,4.03912,4.00162,3.96361,3.92512,3.88618,3.84683,3.80708,3.76697,3.72653,3.68579,3.64478,3.60351,3.56202,3.52033,3.47845,3.43642,3.39425,3.35196,3.30957,3.2671,3.22455,3.18196,3.13933,3.09668,3.05402,3.01136,2.96873,2.92613,2.88357,2.84108,2.79865,2.75631,2.71407,2.67195,2.62994,2.58807,2.54634,2.50477,2.46338,2.42216,2.38114,2.34032,2.29971,2.25933,2.21916,2.17923,2.13954,2.10008,2.06087,2.02189,1.98316,1.94468,1.90644,1.86845,1.83069,1.79316,1.75586,1.71877,1.68189,1.6452,1.60868,1.57232,1.53611,1.50004,1.46407,1.4282,1.39241,1.35668,1.321,1.28535,1.24972,1.2141,1.17849,1.14286,1.10723,1.07158,1.03593,1.00028,.96464,.92902,.89344,.85793,.8225,.78719,.75203,.71705,.68231,.64784,.61369,.57991,.54656,.51368,.48134,.44959,.41849,.3881,.35848,.32967,.30174,.27474,.24872,.22373,.19982,.17702,.15539,.13497,.11579,.09791,.08137,.06621,.05248,.04022,.02948,.02029,.01271,.00677,.00252,0,-76e-5,27e-5,.00314,.00788,.01451,.02307,.03357,.04604,.0605,.07697,.09546,.11599,.13858,.16322,.18992,.21869,.24952,.28241,.31735,.35434],pressure:[.95248,.95236,.95228,.95223,.95222,.95224,.95231,.95241,.95256,.95274,.95296,.95322,.95352,.95385,.95423,.95465,.9551,.9556,.95613,.9567,.95731,.95796,.95864,.95936,.96012,.96091,.96173,.96259,.96348,.9644,.96535,.96633,.96734,.96838,.96944,.97053,.97164,.97277,.97393,.9751,.97629,.9775,.97873,.97997,.98122,.98249,.98376,.98505,.98634,.98763,.98893,.99023,.99154,.99284,.99414,.99544,.99673,.99802,.9993,.99942,.99816,.99691,.99568,.99445,.99324,.99205,.99087,.98972,.98858,.98746,.98636,.98528,.98423,.9832,.98219,.98121,.98025,.97931,.9784,.97752,.97666,.97582,.97501,.97423,.97347,.97274,.97203,.97135,.9707,.97007,.96948,.9689,.96836,.96784,.96735,.96689,.96646,.96605,.96567,.96533,.965,.96471,.96445,.96421,.964,.96382,.96367,.96355,.96346,.96339,.96335,.96334,.96336,.9634,.96348,.96358,.9637,.96385,.96403,.96423,.96446,.96471,.96499,.96529,.96561,.96595,.96631,.96669,.96709,.96751,.96795,.9684,.96887,.96935,.96984,.97035,.97087,.9714,.97194,.97249,.97304,.97361,.97418,.97476,.97534,.97592,.97651,.97711,.9777,.9783,.9789,.9795,.9801,.9807,.9813,.9819,.9825,.98309,.98369,.98428,.98486,.98545,.98603,.98661,.98718,.98775,.98832,.98888,.98944,.99,.99056,.99112,.99167,.99223,.99279,.99335,.99392,.99449,.99507,.99565,.99624,.99684,.99745,.99807,.9987,.99934,1,.99933,.99866,.99797,.99727,.99656,.99583,.9951,.99435,.99359,.99283,.99205,.99126,.99046,.98966,.98885,.98803,.9872,.98637,.98554,.9847,.98387,.98303,.98219,.98134,.9805,.97967,.97883,.978,.97717,.97634,.97552,.97471,.97389,.97309,.97229,.9715,.97071,.96993,.96915,.96838,.96762,.96687,.96612,.96539,.96466,.96395,.96324,.96255,.96187,.9612,.96055,.95991,.95929,.95869,.95811,.95754,.957,.95648,.95599,.95552,.95508,.95467,.95428,.95393,.9536,.95331,.95305,.95283,.95264]},{distance:[2.85606,2.86149,2.86432,2.8645,2.862,2.85686,2.84912,2.83886,2.82618,2.81117,2.79393,2.77456,2.75314,2.72975,2.70447,2.67734,2.64844,2.61784,2.58564,2.55196,2.5169,2.48057,2.44305,2.40438,2.36462,2.32383,2.28208,2.23943,2.19591,2.15153,2.10628,2.06016,2.01321,1.96548,1.91702,1.86793,1.8183,1.76829,1.71803,1.66767,1.61737,1.56726,1.51746,1.46803,1.41902,1.37044,1.32228,1.27452,1.22716,1.18023,1.13376,1.08781,1.04244,.99769,.95357,.91003,.86701,.82447,.78238,.74069,.69938,.65836,.61758,.57699,.53656,.49627,.45611,.41611,.37632,.33683,.29776,.25924,.22141,.18441,.14839,.11346,.07972,.04727,.01619,-.01348,-.0417,-.0684,-.09351,-.11698,-.13875,-.1588,-.17713,-.19381,-.20889,-.22242,-.23444,-.24501,-.25421,-.26216,-.26897,-.27473,-.27951,-.28336,-.28631,-.28836,-.28948,-.28963,-.28873,-.28673,-.28355,-.27916,-.27354,-.26673,-.25878,-.2498,-.23992,-.22929,-.21802,-.20623,-.19398,-.18134,-.16836,-.1551,-.14163,-.12809,-.11461,-.1013,-.08826,-.07557,-.06335,-.0517,-.04077,-.03065,-.02143,-.01321,-.00606,0,.00496,.00888,.01181,.01385,.01511,.0157,.01574,.01533,.01458,.01358,.0124,.01112,.00979,.00851,.00738,.0065,.006,.00596,.00646,.00754,.00924,.01161,.01471,.01858,.02323,.02865,.03481,.04169,.0493,.05765,.06677,.07671,.08754,.09934,.11222,.12628,.14159,.15823,.17624,.19561,.21632,.23828,.26142,.28563,.31083,.33696,.36397,.39185,.42057,.4501,.48036,.51125,.54264,.5744,.60646,.63871,.67105,.70337,.73556,.76751,.79918,.83048,.86139,.8919,.92202,.95184,.98144,1.01094,1.04045,1.0701,1.10002,1.13029,1.16103,1.1923,1.22416,1.25664,1.28979,1.32364,1.35824,1.39363,1.42985,1.4669,1.50475,1.54332,1.58252,1.62227,1.6625,1.70312,1.744,1.78501,1.82598,1.8668,1.90734,1.94754,1.98732,2.02666,2.06555,2.10402,2.1421,2.17985,2.2173,2.25448,2.29139,2.328,2.36424,2.4,2.43515,2.46955,2.50309,2.53565,2.56717,2.59761,2.62692,2.65505,2.68191,2.7074,2.73138,2.75375,2.7744,2.79324,2.81017,2.82504,2.83772,2.8481],pressure:[.22758,.23641,.24578,.25568,.26609,.27699,.28835,.30016,.31237,.32495,.33789,.35113,.36466,.37843,.39241,.40658,.4209,.43535,.44989,.4645,.47916,.49385,.50853,.5232,.53784,.55243,.56696,.58141,.59578,.61004,.62419,.63821,.65209,.6658,.67934,.69268,.70582,.71873,.73139,.7438,.75594,.76779,.77935,.79061,.80156,.81221,.82254,.83258,.84231,.85176,.86091,.86978,.87837,.88669,.89473,.9025,.91,.91725,.92425,.931,.93752,.9438,.94985,.95566,.96124,.96658,.97168,.97652,.98109,.98539,.98939,.99309,.99646,.99949,.99783,.99552,.99361,.99209,.99098,.99029,.99003,.99019,.99079,.99181,.99324,.9951,.99735,1,.99698,.99361,.98992,.98592,.98163,.97709,.97231,.96731,.96212,.95676,.95122,.94554,.93973,.93378,.92773,.92157,.91532,.90899,.90258,.89612,.88961,.88308,.87653,.87,.8635,.85705,.85068,.8444,.83823,.83219,.82628,.82052,.81493,.80952,.8043,.79929,.7945,.78994,.78561,.78151,.77765,.77402,.77062,.76742,.76443,.76161,.75896,.75645,.75406,.75175,.74951,.7473,.74511,.74289,.74064,.73833,.73592,.73341,.73078,.728,.72507,.72197,.71869,.71522,.71156,.70769,.70363,.69936,.69489,.69021,.68533,.68023,.67492,.66939,.66363,.65765,.65145,.64501,.63833,.63143,.62428,.61691,.60931,.60148,.59344,.58521,.57679,.5682,.55948,.55063,.54167,.53264,.52354,.51439,.50522,.49603,.48686,.47773,.46865,.45964,.45072,.44192,.43324,.42469,.41629,.40804,.39994,.392,.3842,.37655,.36903,.36164,.35437,.3472,.34012,.33312,.3262,.31933,.31251,.30574,.299,.2923,.28563,.27899,.27239,.26583,.25933,.25288,.24652,.24025,.2341,.22808,.22221,.21653,.21104,.20576,.20072,.19592,.19138,.18712,.18313,.17943,.17602,.17292,.17013,.16766,.16551,.16369,.16222,.1611,.16036,.16001,.16007,.16055,.16148,.16286,.16471,.16705,.16988,.17321,.17706,.18144,.18636,.19182,.19785,.20443,.21158,.2193]},{distance:[-2.31317,-2.3191,-2.32189,-2.32154,-2.31811,-2.31174,-2.30254,-2.29062,-2.27609,-2.25904,-2.23954,-2.21767,-2.19355,-2.16732,-2.13907,-2.10885,-2.07672,-2.04268,-2.00677,-1.96911,-1.92985,-1.88914,-1.84713,-1.80397,-1.75979,-1.71467,-1.66864,-1.62171,-1.57395,-1.52546,-1.47625,-1.42628,-1.3755,-1.32384,-1.27131,-1.218,-1.16408,-1.10972,-1.05508,-1.00031,-.94551,-.89077,-.83615,-.7817,-.72757,-.6739,-.62076,-.56821,-.51625,-.46484,-.41397,-.36366,-.314,-.26506,-.21689,-.16957,-.12316,-.07766,-.03301,.01085,.05399,.09643,.13827,.17967,.22079,.26176,.30265,.34342,.38397,.42414,.46381,.50285,.54115,.57863,.61524,.65093,.6856,.71914,.75153,.78275,.81283,.84182,.86972,.89651,.92208,.94634,.96919,.99052,1.01025,1.02835,1.04484,1.05976,1.07309,1.08479,1.09492,1.1036,1.11096,1.11714,1.12224,1.12627,1.12916,1.13083,1.13125,1.13036,1.12816,1.12466,1.11992,1.11397,1.10677,1.09827,1.08849,1.07746,1.06527,1.05203,1.03786,1.02283,1.00695,.99025,.97279,.9546,.93573,.9163,.8965,.8765,.85647,.83652,.81687,.79775,.77939,.76199,.74568,.73049,.71635,.70316,.69082,.67925,.66834,.65804,.64831,.63911,.63032,.62184,.61363,.60564,.59788,.59036,.58308,.57597,.5689,.56177,.55447,.5469,.53896,.53062,.5219,.51283,.5034,.49355,.48335,.47287,.46223,.45154,.44085,.43012,.41923,.40805,.39648,.38441,.37176,.35849,.34458,.32999,.31461,.29833,.28109,.26288,.2437,.22361,.20265,.18082,.15807,.13434,.1096,.0838,.0569,.02894,0,-.0298,-.0604,-.09173,-.12364,-.15594,-.18843,-.22092,-.25331,-.28559,-.31781,-.35006,-.38244,-.41502,-.44785,-.48098,-.5144,-.54811,-.58218,-.61666,-.65153,-.68677,-.72232,-.75807,-.79397,-.83002,-.86628,-.90281,-.93968,-.97693,-1.01465,-1.05282,-1.09139,-1.13031,-1.16956,-1.20917,-1.24905,-1.28907,-1.32908,-1.36891,-1.40844,-1.44765,-1.48658,-1.52527,-1.56376,-1.60206,-1.64016,-1.67801,-1.71552,-1.75264,-1.78936,-1.8257,-1.86161,-1.89702,-1.93182,-1.96584,-1.99894,-2.03102,-2.06203,-2.0919,-2.12056,-2.14794,-2.17397,-2.19852,-2.22138,-2.24235,-2.26129,-2.27805,-2.29243,-2.30422],pressure:[.9681,.97424,.98046,.98674,.99309,.9995,.99404,.98754,.981,.97444,.96785,.96124,.95462,.94801,.94139,.93479,.92822,.92167,.91515,.90868,.90225,.89589,.88959,.88336,.87722,.87115,.86519,.85932,.85356,.84792,.84239,.83699,.83173,.8266,.82162,.81679,.81211,.80759,.80324,.79906,.79505,.79121,.78756,.78409,.78081,.77771,.77481,.77211,.76959,.76728,.76516,.76324,.76153,.76001,.75869,.75757,.75665,.75593,.7554,.75507,.75493,.75498,.75523,.75565,.75627,.75706,.75803,.75917,.76049,.76197,.76361,.76541,.76737,.76947,.77172,.77409,.7766,.77923,.78198,.78484,.7878,.79086,.79401,.79724,.80055,.80394,.8074,.81092,.8145,.81813,.82182,.82556,.82934,.83317,.83703,.84093,.84487,.84884,.85284,.85687,.86094,.86503,.86915,.87329,.87746,.88166,.88587,.89011,.89436,.89863,.90291,.9072,.91149,.91579,.92009,.92438,.92867,.93295,.9372,.94144,.94566,.94985,.954,.95812,.96219,.96623,.97021,.97415,.97802,.98184,.9856,.9893,.99293,.9965,1,.99657,.9932,.98991,.98668,.98352,.98042,.97738,.9744,.97148,.9686,.96577,.96298,.96023,.95751,.95482,.95214,.94949,.94684,.9442,.94156,.93892,.93627,.93361,.93094,.92825,.92555,.92284,.9201,.91735,.91458,.91179,.90899,.90616,.90332,.90047,.8976,.89472,.89183,.88893,.88603,.88314,.88024,.87735,.87448,.87162,.86878,.86597,.86319,.86044,.85774,.85508,.85247,.84993,.84744,.84503,.84269,.84042,.83825,.83616,.83417,.83227,.83048,.8288,.82724,.82578,.82445,.82324,.82215,.82119,.82037,.81967,.81911,.81868,.81839,.81824,.81823,.81835,.81862,.81903,.81957,.82026,.82109,.82206,.82317,.82443,.82583,.82737,.82906,.83089,.83287,.83499,.83726,.83968,.84223,.84494,.84778,.85077,.8539,.85717,.86058,.86412,.86781,.87163,.87559,.87968,.88391,.88826,.89275,.89737,.90211,.90698,.91198,.91709,.92233,.92768,.93315,.93873,.94441,.95019,.95607,.96205]},{distance:[4.72925,4.81721,4.9037,4.98859,5.07177,5.15311,5.23249,5.3098,5.38491,5.45772,5.52811,5.59598,5.66122,5.72375,5.78346,5.84028,5.8941,5.94486,5.99248,6.03689,6.07803,6.11584,6.15028,6.18128,6.20882,6.23285,6.25336,6.27031,6.28369,6.29348,6.29969,6.3023,6.30133,6.29678,6.28867,6.27703,6.26187,6.24324,6.22116,6.19567,6.16683,6.13468,6.09928,6.06068,6.01896,5.97417,5.92639,5.87569,5.82217,5.76589,5.70696,5.64545,5.58147,5.5151,5.44644,5.37559,5.30265,5.2277,5.15085,5.0722,4.99184,4.90987,4.82639,4.74151,4.65533,4.56794,4.47945,4.38996,4.29959,4.20843,4.11658,4.02416,3.93125,3.83796,3.74437,3.65057,3.55666,3.46272,3.36884,3.27509,3.18155,3.08831,2.99545,2.90303,2.81114,2.71984,2.62922,2.53933,2.45026,2.36207,2.27484,2.18862,2.10349,2.01951,1.93675,1.85528,1.77515,1.69644,1.61919,1.54348,1.46935,1.39685,1.32605,1.25698,1.18967,1.12417,1.06049,.99863,.93862,.88044,.82408,.76953,.71676,.66574,.61644,.56882,.52282,.47841,.43553,.39413,.35414,.31551,.27817,.24206,.20712,.17328,.14048,.10866,.07776,.04772,.01848,-.00999,-.03776,-.06487,-.09134,-.11721,-.14251,-.16725,-.19144,-.21509,-.2382,-.26076,-.28275,-.30416,-.32496,-.34511,-.36459,-.38334,-.40134,-.41852,-.43485,-.45026,-.46471,-.47815,-.49052,-.50179,-.51189,-.52081,-.52849,-.5349,-.54003,-.54383,-.54627,-.54734,-.54702,-.54528,-.54211,-.53752,-.53149,-.52403,-.51515,-.50487,-.4932,-.48015,-.46575,-.45001,-.43297,-.41463,-.39503,-.37419,-.35213,-.32887,-.30443,-.27885,-.25214,-.22432,-.19541,-.16544,-.13442,-.10235,-.06926,-.03514,0,.03616,.07336,.11159,.15088,.19125,.23272,.27531,.31906,.36401,.41019,.45764,.5064,.55651,.60802,.66096,.71538,.77129,.82874,.88776,.94836,1.01056,1.07438,1.13982,1.20687,1.27554,1.34581,1.41766,1.49107,1.56599,1.64239,1.72025,1.79951,1.88013,1.96209,2.04532,2.12979,2.21546,2.30226,2.39017,2.47911,2.56905,2.65991,2.75164,2.84416,2.93742,3.03133,3.12582,3.2208,3.31619,3.41191,3.50785,3.60393,3.70006,3.79612,3.89202,3.98765,4.08291,4.17767,4.27182,4.36525,4.45783,4.54944,4.63995],pressure:[.30942,.30838,.30765,.30724,.30715,.30738,.30795,.30884,.31007,.31164,.31354,.31578,.31837,.32129,.32455,.32815,.33209,.33636,.34097,.34591,.35117,.35675,.36265,.36887,.37539,.38221,.38933,.39674,.40442,.41238,.4206,.42907,.43779,.44675,.45593,.46533,.47493,.48473,.49471,.50486,.51517,.52563,.53623,.54694,.55777,.5687,.57971,.59079,.60194,.61313,.62435,.6356,.64686,.65811,.66935,.68056,.69174,.70286,.71391,.72489,.73579,.74659,.75728,.76785,.7783,.7886,.79876,.80877,.81861,.82827,.83776,.84706,.85617,.86507,.87378,.88227,.89056,.89863,.90649,.91412,.92153,.92872,.93568,.94241,.94892,.95519,.96122,.96702,.97258,.97791,.98299,.98783,.99242,.99677,.99911,.99525,.99164,.98827,.98515,.98228,.97966,.97728,.97514,.97324,.97159,.97017,.96898,.96801,.96727,.96674,.96641,.96629,.96635,.96661,.96703,.96762,.96838,.96928,.97032,.97149,.97279,.9742,.97572,.97734,.97905,.98085,.98273,.98468,.98669,.98877,.99091,.99311,.99535,.99765,1,.9976,.99516,.99267,.99014,.98755,.98491,.98222,.97947,.97666,.97378,.97083,.96781,.96471,.96153,.95826,.9549,.95144,.94787,.9442,.94042,.93651,.93249,.92834,.92407,.91966,.91512,.91045,.90564,.90069,.8956,.89037,.885,.87949,.87384,.86806,.86214,.85608,.84988,.84356,.83711,.83053,.82383,.81702,.81009,.80306,.79594,.78872,.78141,.77403,.76657,.75905,.75148,.74385,.73619,.72849,.72076,.71302,.70526,.69749,.68972,.68195,.67419,.66644,.65871,.65099,.64329,.63561,.62795,.62032,.61271,.60512,.59755,.59001,.58248,.57497,.56749,.56002,.55256,.54512,.5377,.5303,.52291,.51554,.50819,.50087,.49358,.48632,.4791,.47192,.4648,.45773,.45072,.44378,.43692,.43015,.42346,.41687,.41039,.40403,.39779,.39168,.38571,.37989,.37423,.36873,.36342,.35828,.35335,.34862,.34409,.3398,.33573,.3319,.32831,.32498,.32192,.31912,.3166,.31436,.31242,.31077]}];function o(e,t){if(!e)return null;var i=e.length/2;const n=.1*i;i=Array(i);let r=0;t=1===t;for(let o=0;o<e.length;o+=2){const a=(e[o]+e[o+1])/2;i[r++]=t?Math.min(n,1-.5*(1-a)):Math.min(n,.5*a)}return i}var a=function(){var e=n,a=e/2;const s=new Uint8Array(4*e*e),l=4*e*a,u=2*(a=i),c=4*e,h=r.length;let d=8*h*c;for(var f of r){var p=f.distance,_=f.pressure;let e=d;for(let i=0;i<9;i++){0!==i&&(p=o(p,0),_=o(_,1));for(let i=0;i<n;i++){const n=_?_[i%_.length]:1;t(.5+(p?p[i%p.length]/u:0),s,e),t(n,s,e+l),e+=4}e-=c*(h+1)}d+=c}return s}(),s=new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR});this._edgeStrokesTexture=new t$V({context:this._frameState.context,source:{width:256,height:256,arrayBufferView:a},sampler:s,flipY:!1});var l=this._edgeStrokesTexture.width,u=this._edgeStrokesTexture.height;this._strokesLog2Resolution=e$2a.log2(l),this._strokesTextureScale=new o$1o(1/l,1/u)},_0x22e933.prototype._setFloodTexture=function(e,t,i){this._floodFlagTexture=e,this._floodRect=t;var n=new p$1d;p$1d.inverse(i,n),this._matFloodInvertMatrix=n;var r={};r.layer=this,this.traverseRenderEntity(r,_0x44c915)},_0x22e933.prototype._removeFloodTexture=function(){this._floodFlagTexture=void 0,this._floodRect=void 0,this._matFloodInvertMatrix=p$1d.IDENTITY;var e={};e.layer=this,this.traverseRenderEntity(e,_0x2c98e0)},_0x22e933.prototype.setHistoryDataByKey=function(e){if(e$2b(this._historicalRecord))if(e$2b(this._historicalRecord.rootTiles))_0x3b4551(this,e);else{u$Q(this._baseUri.toString()+this._historicalRecord,this.customRequestHeaders).then((t=>{this._historicalRecord=t,_0x3b4551(this,e)}))}},_0x22e933.prototype.getHistoryDataKeys=function(){if(!e$2b(this._historicalRecord))return Promise.resolve();if(e$2b(this._historicalRecord.rootTiles))return Promise.resolve(Object.keys(this._historicalRecord.rootTiles[0].History));return u$Q(this._baseUri.toString()+this._historicalRecord,this.customRequestHeaders).then((e=>(this._historicalRecord=e,Object.keys(this._historicalRecord.rootTiles[0].History))))};var r$M=function(){if(this._layers=null,this.minQuality=1,this._jsHeapSizeLimitRatio=1,this._maxMemory=1024,s$Y.isPCBroswer()&&(this._maxMemory=4096),window.performance&&window.performance.memory){var e=window.performance.memory.usedJSHeapSize/1048576,t=window.performance.memory.jsHeapSizeLimit/1048576;this._maxMemory=(t-e)*this._jsHeapSizeLimitRatio}this._cacheSize=1024,this._memoryUsed=0,this._memoryPredicted=0,this._quality=1,this._canFastRecover=0,this._downscaleMemoryUsed=this._stableQuality=0,this._QualityShrinkRatio=1.3,this._QualityIncreaseStep=.01,this._updating=0,this._geoMemoryEstimate=0,this._texMemoryEstimate=0,this._EMA=0,this._learningWeight=.9,this._beta=1-this._learningWeight,this._logTime=0,this._showMemoryInfo=!1};r$M.showMemoryInfo=function(e){e$12._showMemoryInfo=e},r$M.setCacheSize=function(e){e$12._cacheSize=Math.min(e,e$12._maxMemory)},r$M.getCacheSize=function(){return e$12._cacheSize},r$M.reAllocateMaxMemory=function(e){if(e$12._jsHeapSizeLimitRatio=e,window.performance&&window.performance.memory){var t=window.performance.memory.usedJSHeapSize/1048576,i=window.performance.memory.jsHeapSizeLimit/1048576;e$12._maxMemory=(i-t)*e$12._jsHeapSizeLimitRatio}},r$M.setMaxMemory=function(e){e$12._maxMemory=e},r$M.getMaxMemory=function(){return e$12._maxMemory};const d$$={GeForce:{1050:3,1060:3,1070:8,1080:8,1650:4,1660:6,2060:6,2070:8,2080:8,3050:8,3060:8,3080:12,3090:24,4070:12,4080:16,4090:24},AMD:{7900:24,7600:8,6950:16,6900:16,6800:16,6750:12,6700:12,6650:8,6600:8,6500:4,6400:4,5700:8,5600:6,5500:8,64:8,56:8,590:8,580:4,570:4,560:4,550:4,480:4,470:4,390:8,380:4,7990:6,7970:3,7950:3,6990:4}};r$M._autoSetMaxMemory=function(e){var t=e.split(" "),i=t.filter((function(e,t){return/^[1-9]/g.test(e)}));if(i.length>0){var n,r=t.indexOf("GeForce")>-1,o=t.indexOf("AMD")>-1,a=i[0];r?n=d$$.GeForce[a]:o&&(n=d$$.AMD[a]),n=e$2b(n)?.9*n:2,n*=1024,r$M.setMaxMemory(n)}},r$M.setMinQuality=function(e){e$12.minQuality=Math.min(e,1)},r$M.getMinQuality=function(){return e$12.minQuality},r$M._memGeometryAdded=function(e){e$12._geoMemoryEstimate+=e},r$M._memGeometryRemoved=function(e){e$12._geoMemoryEstimate-=e},r$M._memTextureAdded=function(e){e$12._texMemoryEstimate+=e},r$M._memTextureRemoved=function(e){e$12._texMemoryEstimate-=e},r$M._attachLayers=function(e){e$12._layers=e},r$M._updateMemory=function(e){var t=1048576*e$12._maxMemory,i=e$12._memoryUsed*t;if(e$12._memoryUsed=e,e$12._memoryPredicted=e$12._memoryUsed-i,e$12._memoryPredicted=0==e$12._EMA?e$12._memoryPredicted:e$12._memoryPredicted*e$12._learningWeight+e$12._EMA*(1-e$12._learningWeight),e$12._EMA=e$12._memoryPredicted,e$12._showMemoryInfo&&e$12._memoryUsed>t){var n=Et$a();n-e$12._logTime>1e4&&(console.log(r$M.getStatistics()),e$12._logTime=n)}e$12._memoryPredicted=(e$12._memoryUsed+e$12._memoryPredicted)/t,e$12._memoryUsed=e$12._memoryUsed/t},r$M.getStatistics=function(){var e="内存上限(MB): "+e$12._maxMemory,t=e$12._memoryUsed;e$12._memoryUsed<1&&(t=1048576*e$12._maxMemory*t);for(var i="当前占用内存(MB): "+t/1048576,n="缓存上限(MB): "+e$12._cacheSize,r="当前缓存占用(MB): ",o=0;o<e$12._layers._layerQueue.length;o++){var a=e$12._layers._layerQueue[o];if(a instanceof _0x22e933){var s=a._layerScheduler._getCacheMemoryUsageInBytes()/1048576;r+="第"+o+"层, 图层名:"+a._name+",缓存占用:"+s+","}}var l=e+","+i+","+("渲染质量:"+e$12._quality)+"\n"+n+","+r;if(window.performance&&window.performance.memory){var u=window.performance.memory.totalJSHeapSize/1048576,c=window.performance.memory.usedJSHeapSize/1048576;l+="\n浏览器最大内存(MB):"+window.performance.memory.jsHeapSizeLimit/1048576+",已分配内存(MB):"+c+",堆活跃内存(MB):"+u}return l},r$M.getMemoryUsed=function(){return e$12._memoryUsed},r$M.getQuality=function(){return e$12._quality},r$M._updateQuality=function(e){return(e=Math.min(Math.max(e,e$12.minQuality),1))===e$12._quality?0:(e$12._quality=e,1)},r$M._layersUpdating=function(){for(var e=e$12._layers._layerQueue.length,t=0;t<e;t++){var i=e$12._layers._layerQueue[t];if(i instanceof _0x22e933&&i._layerScheduler._updatingTiles()>0)return!0}return!1},r$M.update=function(e){e$12._layers._setMaxMemory(e$12._maxMemory),e$12._layers._setCacheMemory(e$12._cacheSize),this._updateMemory(e);var t=!0;if(e$12._memoryPredicted>0||e$12._updating){var i=this._layersUpdating();e$12._memoryPredicted<.6&&e$12._canFastRecover?(e$12._stableQuality=e$12._downscaleMemoryUsed=0,e$12._canFastRecover=0,this._updateQuality(1)):i?(e$12._memoryPredicted>1.1||e$12._memoryUsed>1)&&(e$12._stableQuality>0?(e$12._downscaleMemoryUsed=0,this._updateQuality(e$12._stableQuality)):e$12._quality>e$12.minQuality&&e$12._downscaleMemoryUsed<e$12._memoryUsed?(t=i=this._updateQuality(e$12._quality/e$12._QualityShrinkRatio),e$12._downscaleMemoryUsed=e$12._memoryUsed,e$12._canFastRecover=0):t=!1):(i=this._layersUpdating(),e$12._downscaleMemoryUsed=0,e$12._memoryUsed>1?(e$12._stableQuality=0,e$12._canFastRecover=0,t=i=this._updateQuality(e$12._quality/e$12._QualityShrinkRatio),e$12._downscaleMemoryUsed=e$12._memoryPredicted):e$12._stableQuality!=e$12._quality&&(e$12._memoryUsed<.8&&e$12._quality<1?(e$12._stableQuality=e$12._quality,i=this._updateQuality(e$12._quality+e$12._QualityIncreaseStep)):e$12._quality<1&&(e$12._canFastRecover=1))),e$12._updating=i}return t};var e$12=new r$M;r$M.memManager=e$12;var ti$3=r$M,_0x1d4c3f=(_0x3864fa=!0,function(e,t){var i=_0x3864fa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3864fa=!1,i}),_0x284165=_0x1d4c3f(void 0,(function(){return _0x284165.toString().search("(((.+)+)+)+$").toString().constructor(_0x284165).search("(((.+)+)+)+$")})),_0x3864fa;_0x284165();var _0x304496=273,_0x5b2cf4=function(){this.textures={},this.refCounts={},this.unUsedTextures={},this.unUsedSize=0};_0x5b2cf4.reservedMemorySize=50,_0x5b2cf4.CreateTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=_0x532d19.textures[e];if(d)_0x532d19.refCounts[e]++;else{var f=null;switch(o){case _0x2072ef.enrS3TCDXTN:f=r===_0x3dfacd.BGR||r===_0x3dfacd.RGB?V$10.RGB_DXT1:V$10.RGBA_DXT5;break;case _0x2072ef.enrPVRTPF_PVRTC2:case _0x2072ef.enrPVRTPF_PVRTC:f=r===_0x3dfacd.BGR||r===_0x3dfacd.RGB?V$10.RGB_PVRTC_2BPPV1:V$10.RGBA_PVRTC_2BPPV1;break;case _0x2072ef.enrPVRTPF_PVRTC_4bpp:f=V$10.RGBA_PVRTC_4BPPV1;break;case _0x2072ef.enrPVRTPF_ETC1:f=V$10.RGB_ETC1;break;case _0x2072ef.encNONE:f=r===_0x3dfacd.BGR||r===_0x3dfacd.RGB?_0x304496:r===_0x3dfacd.LUMINANCE_ALPHA?V$10.LUMINANCE_ALPHA:V$10.RGBA}var p=25===r?_$$.FLOAT:_$$.UNSIGNED_BYTE;e$2b(_0x532d19.unUsedTextures[e])?(d=_0x532d19.unUsedTextures[e],_0x532d19.unUsedSize-=d.size,delete _0x532d19.unUsedTextures[e]):(s||(d=this.UseTexture(e,t,i,n,f,a,l,u,p)),null==d&&(d=new _0x2dc616(e,t,i,n,f,a,s,l,u,p,c,h),ti$3._memTextureAdded(d.sizeInBytes))),_0x532d19.refCounts[e]=1,_0x532d19.textures[e]=d}return d},_0x5b2cf4.UseTexture=function(e,t,i,n,r,o,a,s,l){for(var u in _0x532d19.unUsedTextures)if(_0x532d19.unUsedTextures[u].size===o.length){var c=_0x532d19.unUsedTextures[u];if(c.context.id!==t.id)return;if(t.webgl2&&(i!==c.width||n!==c.height)||e$2b(t.engine))continue;_0x532d19.unUsedSize-=c.size,delete _0x532d19.unUsedTextures[u];var h={width:i,height:n,internalFormat:r,wrapS:u$_(a,q$19.CLAMP_TO_EDGE),wrapT:u$_(s,q$19.CLAMP_TO_EDGE),pixelDataType:u$_(l,_$$.UNSIGNED_BYTE)};return c.pixelDataType===_$$.FLOAT&&(h.wrapS=q$19.CLAMP_TO_EDGE,h.wrapT=q$19.CLAMP_TO_EDGE),c.updateTexture(e,o,h),c}},_0x5b2cf4.CreateVolumeTexture=function(e,t,i,n,r){var o=_0x532d19.textures[e],a=tt$h.LINEAR,s=rt$i.LINEAR;if(r===k$Q.FilterMode.NEAREST&&(a=tt$h.NEAREST,s=rt$i.NEAREST),o&&!e$2b(n.imageArray))_0x532d19.refCounts[e]++,o.sampler=new e$1P({minificationFilter:a,magnificationFilter:s});else{var l=n.nLength,u=n.imageArray;(o=new t$V({context:i,width:l,height:l,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({minificationFilter:a,magnificationFilter:s})})).copyFrom({width:l,height:l,arrayBufferView:u}),_0x532d19.refCounts[e]=1,_0x532d19.textures[e]=o,ti$3._memTextureAdded(o.sizeInBytes)}return o},_0x5b2cf4.ReloadVolumeTexture=function(e,t,i,n,r){var o=_0x532d19.textures[e];if(o){var a=n.nLength,s=n.imageArray;o.copyFrom({width:a,height:a,arrayBufferView:s})}return o},_0x5b2cf4.AddRef=function(e){_0x532d19.refCounts[e]++},_0x5b2cf4.DecRef=function(e){_0x532d19.refCounts[e]--},_0x5b2cf4.DestroyTexture=function(e){var t=_0x532d19.refCounts[e];_0x532d19.refCounts[e]=t-1,0==_0x532d19.refCounts[e]&&(_0x532d19.textures[e].is3D||e$2b(_0x532d19.textures[e].sampler)?(ti$3._memTextureRemoved(_0x532d19.textures[e].sizeInBytes),_0x532d19.textures[e].destroy()):(_0x532d19.unUsedTextures[e]=_0x532d19.textures[e],_0x532d19.unUsedSize+=_0x532d19.textures[e].size),delete _0x532d19.textures[e],delete _0x532d19.refCounts[e])},_0x5b2cf4.GetUnusedSize=function(){return _0x532d19.unUsedSize},_0x5b2cf4.DeleteUnusedTextures=function(){for(var e in _0x532d19.unUsedTextures)_0x532d19.unUsedTextures[e].is3D&&(_0x532d19.unUsedSize-=_0x532d19.unUsedTextures[e].size,ti$3._memTextureRemoved(_0x532d19.textures[e].sizeInBytes),_0x532d19.unUsedTextures[e].destroy(),delete _0x532d19.unUsedTextures[e]);var t=1024*_0x5b2cf4.reservedMemorySize*1024;for(var e in _0x532d19.unUsedTextures){if(t>_0x532d19.unUsedSize)break;var i=_0x532d19.unUsedTextures[e];_0x532d19.unUsedSize-=i.size,ti$3._memTextureRemoved(i.sizeInBytes),i.destroy(),delete _0x532d19.unUsedTextures[e],i.isShared&&delete _0x5b2cf4._shareTextureCache[i.sharedKey]}};var _0x532d19=new _0x5b2cf4;_0x5b2cf4.textureManager=_0x532d19,_0x5b2cf4._shareTextureCache={};var Se$d=_0x5b2cf4,n$D={},v$B=typeof document<"u"?new h$16(document.location.href):new h$16;function f$M(e){var t=new h$16(e).resolve(v$B);t.normalize();var i=t.authority;return/:/.test(i)||(i=i+":"+("https"===t.scheme?"443":"80")),i}function o$N(e,t){var i=f$M(e),n=u$_(n$D[i],0);if(!(n>=o$N.maximumRequestsPerServer))return n$D[i]=n+1,o$1l(t(e),(function(e){return n$D[i]--,e})).otherwise((function(e){return n$D[i]--,o$1l.reject(e)}))}o$N.maximumRequestsPerServer=6;var _0x52adb4=(_0x333fae=!0,function(e,t){var i=_0x333fae?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x333fae=!1,i}),_0x36c929=_0x52adb4(void 0,(function(){return _0x36c929.toString().search("(((.+)+)+)+$").toString().constructor(_0x36c929).search("(((.+)+)+)+$")})),_0x333fae;_0x36c929();var _0x4d4b5c={INSTANCED_LAYER:"Instanced_Layer",INSTANCED_OBJECT:"Instanced_Object"},bt$5=Object.freeze(_0x4d4b5c),_0x302c63=(_0x256ae2=!0,function(e,t){var i=_0x256ae2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x256ae2=!1,i}),_0x359a7c=_0x302c63(void 0,(function(){return _0x359a7c.toString().search("(((.+)+)+)+$").toString().constructor(_0x359a7c).search("(((.+)+)+)+$")})),_0x256ae2;_0x359a7c();var _0xcde203=new e$1U(.7,.7,1,1);function _0x331f36(e,t,i,n){n=u$_(n,u$_.EMPTY_OBJECT),o$1q.defined("options.position",n.position),this._type=bt$5.INSTANCED_OBJECT,this._ownerGroup=i,this._position=n.position,this._color=u$_(n.color,new e$1U),this._scale=u$_(n.scale,new o$1p(1,1,1)),this._offset=u$_(n.offset,new o$1p(0,0,0));var r=u$_(n.hpr,new i$15);this._hpr=r,this._feature=u$_(n.feature,u$_.EMPTY_OBJECT);var o=a$18.fromCartesian(this._position);o.longitude+=this._offset.x,o.latitude+=this._offset.y,o.height+=this._offset.z,this._offsetPosition=o$1p.fromRadians(o.longitude,o.latitude,o.height),this._mode=n.sceneMode,this._mode===C$13.COLUMBUS_VIEW&&(this._position=m$17.convertToColumbusCartesian(this._position),this._offsetPosition=m$17.convertToColumbusCartesian(this._offsetPosition)),this._quaternion=m$17.headingPitchRollQuaternion(this._position,r);var a={id:t,primitive:this},s=e.createPickId(a).color,l=new e$1U;l.x=e$1U.floatToByte(s.red),l.y=e$1U.floatToByte(s.green),l.z=e$1U.floatToByte(s.blue),l.w=e$1U.floatToByte(s.alpha),this._pickColor=l,this._isSelected=!1,this._preColor=e$1U.clone(this._color),this._oriCenter=void 0,this._oriRadius=1,this._boundingSphere=void 0,this._id=t,this._index=-1,this._isDeleted=!1,this._visible=u$_(n.visible,!0),this._distanceVisible=!0,this._localTransform=void 0,this._localTranslation=void 0,this._localQuaternion=void 0}Object.defineProperties(_0x331f36.prototype,{type:{get:function(){return this._type}},position:{get:function(){return this._position}},color:{get:function(){return this._color}},scale:{get:function(){return this._scale}},hpr:{get:function(){return this._hpr}},visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("S3M Instance visible",e),e!==this._visible&&(this._visible=e,this.updatePosition(this._position))}},show:{get:function(){return this.visible},set:function(e){this.visible=e}},distanceVisible:{get:function(){return this._distanceVisible},set:function(e){o$1q.typeOf.bool("S3M Instance distanceVisible",e),e!==this._distanceVisible&&(this._distanceVisible=e,this.updatePosition(this._position))}},offset:{get:function(){return this._offset}},feature:{get:function(){return this._feature}},isSelected:{get:function(){return this._isSelected}},oriCenter:{get:function(){return this._oriCenter},set:function(e){!e$2b(e)||(this._oriCenter=e)}},oriRadius:{get:function(){return this._oriRadius},set:function(e){!e$2b(e)||(this._oriRadius=e)}},boundingSphere:{get:function(){return this._boundingSphere},set:function(e){!e$2b(e)||(this._boundingSphere=e)}},index:{get:function(){return this._index},set:function(e){this._index=e}},id:{get:function(){return this._id},set:function(e){!e$2b(e)||(this._id=e)}},isDeleted:{get:function(){return this._isDeleted},set:function(e){e$2b(e)&&(this._isDeleted=e)}},localTransform:{get:function(){return this._localTransform}},localTranslation:{get:function(){return this._localTranslation}},localQuaternion:{get:function(){return this._localQuaternion}}}),_0x331f36.prototype.updatePosition=function(e){if(e$2b(e)){var t=this._index;this._position=o$1p.clone(e);var i=a$18.fromCartesian(this._position);i.longitude+=this._offset.x,i.latitude+=this._offset.y,i.height+=this._offset.z,this._offsetPosition=o$1p.fromRadians(i.longitude,i.latitude,i.height);var n=this._ownerGroup.renderEntities;if(e$2b(n)&&!(n.length<1)){for(var r=this._visible&&this._distanceVisible?1:0,o=o$1p.multiplyByScalar(e,r,new o$1p),a=0,s=n.length;a<s;a++){var l=n[a],u=l._colorCommand.vertexArray.getAttribute(l._attributeLocations.aPosHigh),c=t*u.strideInBytes+u.offsetInBytes,h=S$12.createTypedArray(u.componentDatatype,2*u.componentsPerAttribute),d=i$11.fromCartesian(o),f=d.high,p=d.low;h[0]=f.x,h[1]=f.y,h[2]=f.z,h[3]=p.x,h[4]=p.y,h[5]=p.z,u.vertexBuffer.copyFromArrayView(h,c)}o$1p.clone(e,this._boundingSphere.center)}}},_0x331f36.prototype.updateColor=function(e){if(e$2b(e)&&!this._isDeleted){var t=this._index;if(!e$1U.equals(this._color,e)){this._color=e$1U.clone(e,this._color),this._preColor=e$1U.clone(e);var i=this._ownerGroup.renderEntities;if(e$2b(i)&&!(i.length<1))for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aColor2),s=t*a.strideInBytes+a.offsetInBytes,l=S$12.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=e.red,l[1]=e.green,l[2]=e.blue,l[3]=e.alpha,a.vertexBuffer.copyFromArrayView(l,s)}}}},_0x331f36.prototype.updateScale=function(e){if(e$2b(e)){var t=this._index;if(!o$1p.equals(this._scale,e)){this._scale=o$1p.clone(e);var i=this._ownerGroup.renderEntities;if(e$2b(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aScaleAndRadius),s=t*a.strideInBytes+a.offsetInBytes,l=S$12.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=e.x,l[1]=e.y,l[2]=e.z,l[3]=this._oriRadius,a.vertexBuffer.copyFromArrayView(l,s)}var u=o$1p.maximumComponent(e);this._boundingSphere.radius=this.oriRadius*u}}}},_0x331f36.prototype.updateRotation=function(e){if(e$2b(e)){var t=this._index;if(!i$15.equals(this._hpr,e)){if(this._hpr=i$15.clone(e),this._quaternion=m$17.headingPitchRollQuaternion(this._position,e),this._mode===C$13.COLUMBUS_VIEW){var i=p$1e.fromRotationY(-Math.PI/2),n=n$13.fromRotationMatrix(i);this._quaternion=n$13.multiply(this._quaternion,n,this._quaternion)}var r=this._ownerGroup.renderEntities;if(e$2b(r)&&!(r.length<1))for(var o=0,a=r.length;o<a;o++){var s=r[o],l=s._colorCommand.vertexArray.getAttribute(s._attributeLocations.aQuaternion),u=t*l.strideInBytes+l.offsetInBytes,c=S$12.createTypedArray(l.componentDatatype,l.componentsPerAttribute);c[0]=this._quaternion.x,c[1]=this._quaternion.y,c[2]=this._quaternion.z,c[3]=this._quaternion.w,l.vertexBuffer.copyFromArrayView(c,u)}}}},_0x331f36.prototype.updateModelMatrix=function(e){var t=p$1d.getScale(e,new o$1p);this.updateScale(t),this._localTransform=p$1d.clone(e),this._localTranslation=p$1d.getTranslation(e,new o$1p);var i=p$1d.setScale(e,new o$1p(1,1,1),new p$1d),n=p$1d.getRotation(i,new p$1e);this._localQuaternion=n$13.fromRotationMatrix(n,new n$13)},_0x331f36.prototype.setSelected=function(){var e=this._index;if(e$2b(e)&&!(e<0)&&!e$1U.equals(this._color,_0xcde203)){var t=e$1U.multiply(_0xcde203,this._preColor,new e$1U),i=this._ownerGroup.renderEntities;if(e$2b(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aColor2),s=e*a.strideInBytes+a.offsetInBytes,l=S$12.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=t.red,l[1]=t.green,l[2]=t.blue,l[3]=t.alpha,a.vertexBuffer.copyFromArrayView(l,s)}this._isSelected=!0}}},_0x331f36.prototype.setUnSelected=function(){var e=this._index;if(e$2b(e)&&!(e<0)&&this._isSelected){this._isSelected=!1,this._color=e$1U.clone(this._preColor);var t=this._ownerGroup.renderEntities;if(e$2b(t)&&!(t.length<1))for(var i=0,n=t.length;i<n;i++){var r=t[i],o=r._colorCommand.vertexArray.getAttribute(r._attributeLocations.aColor2),a=e*o.strideInBytes+o.offsetInBytes,s=S$12.createTypedArray(o.componentDatatype,o.componentsPerAttribute);s[0]=this._preColor.red,s[1]=this._preColor.green,s[2]=this._preColor.blue,s[3]=this._preColor.alpha,o.vertexBuffer.copyFromArrayView(s,a)}}};var _0x394343=(_0x1de117=!0,function(e,t){var i=_0x1de117?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1de117=!1,i}),_0x454015=_0x394343(void 0,(function(){return _0x454015.toString().search("(((.+)+)+)+$").toString().constructor(_0x454015).search("(((.+)+)+)+$")})),_0x1de117;_0x454015();var _0x451393="\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#extension GL_EXT_shader_texture_lod : enable\n#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef ClampObject\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n #ifdef WEBGPU\n layout(location = 0) out vec4 glFragData[2];\n #endif\n#endif\n\n#include <SceneUboDecl>\n#include <LightUboDecl>\n#include <MaterialUboDecl>\n\n#ifdef TEXTURE\nuniform sampler2D uTexture;\n#endif\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec3 vNormalEC;\nvarying mat4 vModelMatrix;\n\n#ifdef SQRESULT\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \n#endif\n#ifdef Volume2\nvarying vec3 vecRotioCoord;\n#endif\nfloat computeDepth()\n{\n#ifdef LOG_DEPTH\n return log2(v_depthFromNearPlusOne) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\n return gl_FragCoord.z;\n#endif\n}\n#ifdef SQRESULT\nbool isPointInObject(vec2 texCoord)\n{\n bool bIn = false;\n vec4 colorInClipTexture = texture2D(uFrontColorTexture,texCoord.xy);\n if(colorInClipTexture.r > 0.99 && colorInClipTexture.g < 0.01 && colorInClipTexture.b < 0.01)\n {\n float depthNear = czm_unpackDepth(textureLod(uFrontDepthTexture, texCoord.xy, 0.0)) - 0.00001;\n float depthFar = czm_unpackDepth(textureLod(uBackDepthTexture, texCoord.xy, 0.0)) + 0.00001;\n float currentDepth = computeDepth();\n if(currentDepth > depthNear && currentDepth < depthFar){\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\n#endif\n\nvec4 SRGBtoLinear(vec4 srgbIn) \n{\n return vec4(pow(srgbIn.rgb, vec3(2.2)), srgbIn.a);\n}\nvec4 LineartoSRGB(vec4 linearIn) \n{\n#ifndef HDR \n return vec4(pow(linearIn.rgb, vec3(1.0/2.2)), linearIn.a);\n#else \n return linearIn;\n#endif \n}\n\n#include <SRGBtoLINEAR>\n#include <shaderModelBase>\n#include <brdf>\n#include <blinnPhong>\n\nvoid main()\n{\n#ifdef ClampObject\n czm_writeDepthClampedToFarPlane();\n#endif\n vec4 color = vColor;\n#ifdef ClampObject\n #ifdef PROFILE\n #ifdef MRT\n gl_FragData[0] = vec4(vPickColor.xyz, 1.0);\n gl_FragData[1] = color;\n #else\n gl_FragColor = vec4(vPickColor.xyz, 1.0);\n #endif\n #else\n gl_FragColor = color;\n #endif\n#else\n vec2 vecTexCoord = vec2(0.0);\n #ifdef SQRESULT\n vec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\n if(!isPointInObject(texCoord)) \n { \n discard; \n } \n #endif\n \n\t#ifdef TEXTURE\n #ifdef FLIP_Y\n vecTexCoord = vec2(vTexCoord.x,1.0-vTexCoord.y);\n #else\n vecTexCoord = vec2(vTexCoord.x,vTexCoord.y);\n #endif\n #endif\n \n #ifdef TEXTURE\n color = SRGBtoLinear(texture2D(uTexture, vecTexCoord.xy, 0.0)) * color;\n #endif\n vec3 normalEC;\n if(vPositionMC.w > 0.9)\n {\n normalEC = normalize(vNormalEC);\n }\n #ifndef HAS_NORMAL\n vec3 normalMC = czm_computeNormal(vPositionMC.xyz);\n mat4 modelViewMatrix4 = uView * vModelMatrix;\n modelViewMatrix4 = czm_inverseMatrix(modelViewMatrix4);\n mat3 modelViewMatrix3 = mat3(modelViewMatrix4);\n modelViewMatrix3 = czm_transpose(modelViewMatrix3);\n normalEC = normalize(modelViewMatrix3 * normalMC);\n #endif\n \n #ifdef BRDF\n gl_FragColor = brdf(color, vecTexCoord, vTexCoord, vPositionEC, vPositionMC.xyz, normalEC, vModelMatrix);\n #else\n gl_FragColor = blinnPhong(color, vecTexCoord, vTexCoord, vPositionEC, vPositionMC.xyz, normalEC, vModelMatrix);\n #ifdef TEXTURE\n gl_FragColor = LineartoSRGB(gl_FragColor);\n #endif\n #endif\n \n #ifdef Volume\n #ifdef Volume2\n if((vecRotioCoord.x < 1.0 && vecRotioCoord.x >0.0) && (vecRotioCoord.y < 1.0 && vecRotioCoord.y >0.0) && (vecRotioCoord.z < 1.0 && vecRotioCoord.z >0.0))\n {\n vec4 volumeColor = czm_getVolumeValue(vecRotioCoord);\n if (volumeColor.r * volumeColor.g * volumeColor.b * volumeColor.a < 0.99) {\n gl_FragColor = volumeColor;\n }\n }\n #else\n float wValue = 0.0;\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, wValue);\n #endif\n #endif\n#endif\n\n#ifndef MRT\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n#endif\n}",_0x302008=(_0x141af5=!0,function(e,t){var i=_0x141af5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x141af5=!1,i}),_0x2ba86b=_0x302008(void 0,(function(){return _0x2ba86b.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ba86b).search("(((.+)+)+)+$")})),_0x141af5;_0x2ba86b();var _0x4bd175={getDataShape:function(e,t){for(var i=-1/0,n=0,r=0,o=0,a=0;a<e.length;a++){var s=0;if(e[a].value&&(s=e[a].value[3]),s<i){if(o&&o!==r)throw new Error("Invalid data. data should be a row major 2d array.");o=r,r=0,n++}i=s,r++}return{row:n+1,column:r}}},_0x5605df=[],_0x47debb=[],_0x54d348=[];function _0x385fe1(e){var t;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)?(3==(t=e.substring(1).split("")).length&&(t=[t[0],t[0],t[1],t[1],t[2],t[2]]),[((t="0x"+t.join(""))>>16&255)/255,(t>>8&255)/255,(255&t)/255,1]):[255,255,255,1]}_0x4bd175.updateSurfaceMesh=function(e,t,i){for(var n=new Float32Array(3*e.length),r=-900,o=900,a=-900,s=900,l=-900,u=900,c=0;c<e.length;c+=3)r=Math.max(e[c].value[0],r),o=Math.min(e[c].value[0],o),a=Math.max(e[c].value[1],a),s=Math.min(e[c].value[1],s),l=Math.max(e[c].value[2],l),u=Math.min(e[c].value[2],u);var h=_0x4d902f(o,r);_0x5605df=_0x21c072(o,r,h);var d=_0x4d902f(s,a);_0x47debb=_0x21c072(s,a,d);var f=_0x4d902f(u,l);_0x54d348=_0x21c072(u,l,f);var p=0;e.forEach((function(e){e.value&&e.value instanceof Array&&_0xe8c9e7(e.value[0],e.value[1],e.value[2],p,n),p++}));var _=_0x1ce754(0,null,[-50,50],_0x5605df),m=_0x1ce754(0,null,[50,-50],_0x47debb),g=_0x1ce754(0,null,[-50,50],_0x54d348),x=null,v=null,y=null,$=null,b=null,T=t.row,C=t.column,S=(T-1)*(C-1)*4;x=new Float32Array(3*S),$=new Float32Array(4*S),b=new Float32Array(4*S),y=new Float32Array(2*S);var w,E,P,A,L,M,R,O,I,D,B,N,F,U,G,z=[0,3,1,1,3,2],V=[[1,1,0,0],[0,1,0,1],[1,0,0,1],[1,0,1,0]],k=new(S>65535?Uint32Array:Uint16Array)((T-1)*(C-1)*6),W=function(e,t,i){i[1]=e*C+t,i[0]=e*C+t+1,i[3]=(e+1)*C+t+1,i[2]=(e+1)*C+t},H=[],q=[],j=0;v=new Float32Array(3*S);var Y=[[],[],[]],X=[],K=[],Q=[0,0,0],Z=function(e,t,i){var n=3*t;return i[0]=e[n],i[1]=e[n+1],i[2]=e[n+2],i},J=new Float32Array(n.length),ee=new Float32Array(n.length/3*4),te=[0,0,0,1];for(c=0;c<e.length;c++){e[c].itemStyle&&"string"==typeof e[c].itemStyle.color?te=ue=_0x385fe1(e[c].itemStyle.color):ue=te;ue[3]*=1,ue[3];for(var ie=0;ie<4;ie++)ee[4*c+ie]=ue[ie]}for(c=0;c<T-1;c++)for(var ne=0;ne<C-1;ne++){var re=4*(c*(C-1)+ne)*3;W(c,ne,H);for(ie=0;ie<4;ie++)Z(n,H[ie],q);for(ie=0;ie<4;ie++)Z(n,H[ie],q),x.set(q,re+3*ie),$.set(V[ie],re/3*4+ie);for(ie=0;ie<6;ie++)k[j++]=z[ie]+re/3;for(ie=0;ie<2;ie++){for(var oe=3*ie,ae=0;ae<3;ae++){Z(n,he=H[z[oe]+ae],Y[ae])}var se=function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e};se(X,Y[0],Y[1]),se(K,Y[1],Y[2]);R=Q,I=K,D=void 0,B=void 0,N=void 0,F=void 0,U=void 0,G=void 0,D=(O=X)[0],B=O[1],N=O[2],F=I[0],U=I[1],G=I[2],R[0]=B*G-N*U,R[1]=N*F-D*G,R[2]=D*U-B*F;for(ae=0;ae<3;ae++){var le=3*H[z[oe]+ae];J[le]=J[le]+Q[0],J[le+1]=J[le+1]+Q[1],J[le+2]=J[le+2]+Q[2]}}}for(c=0;c<J.length/3;c++){Z(J,c,Q);w=Q,P=void 0,A=void 0,L=void 0,M=void 0,P=(E=Q)[0],A=E[1],L=E[2],(M=P*P+A*A+L*L)>0&&(M=1/Math.sqrt(M),w[0]=E[0]*M,w[1]=E[1]*M,w[2]=E[2]*M),J[3*c]=Q[0],J[3*c+1]=Q[1],J[3*c+2]=Q[2]}var ue=[],ce=[];for(c=0;c<T-1;c++)for(ne=0;ne<C-1;ne++){re=4*(c*(C-1)+ne)*4;W(c,ne,H);for(ie=0;ie<4;ie++){for(ae=0;ae<4;ae++)ue[ae]=ee[4*H[ie]+ae];b.set(ue,re+4*ie),Z(J,H[ie],Q),v.set(Q,re/4*3+3*ie);var he=H[ie];ce[0]=he%C/(C-1),ce[1]=Math.floor(he/C)/(T-1),y.set(ce,re/4*2+2*ie)}0}for(c=0;c<x.length;c+=3){x[c]-=_,x[c+1]-=m,x[c+2]-=g;var de=x[c+1],fe=x[c+2];x[c+2]=de,x[c+1]=fe}return{positionAttr:x,normalAttr:v,texcoordAttr:y,barycentricAttr:$,colorAttr:b,indices:k,vertexColors:ee,vertexNormals:J,vertexCount:S}};var _0x43857a=[0,1];function _0x56850a(e,t,i,n){return(i=i||[])[0]=_0x1ce754(e[0],n,[-50,50],_0x5605df),i[1]=_0x1ce754(e[1],n,[50,-50],_0x47debb),i[2]=_0x1ce754(e[2],n,[-50,50],_0x54d348),i}function _0x1ce754(e,t,i,n){return _0x3e2dce(e=_0x3bd6b2(e,n),_0x43857a,i,t)}function _0x3bd6b2(e,t){var i=t;return i[1]===i[0]?.5:(e-i[0])/(i[1]-i[0])}function _0x3e2dce(e,t,i,n){var r=t[1]-t[0],o=i[1]-i[0];if(0===r)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(e<=t[0])return i[0];if(e>=t[1])return i[1]}else{if(e>=t[0])return i[0];if(e<=t[1])return i[1]}else{if(e===t[0])return i[0];if(e===t[1])return i[1]}return(e-t[0])/r*o+i[0]}function _0xe8c9e7(e,t,i,n,r,o){var a;a=_0x56850a([e,t,i]),r[3*n]=a[0],r[3*n+1]=a[1],r[3*n+2]=a[2]}function _0x4d902f(e,t){var i=(t-e)/5,n=_0x5c361f(i),r=Math.pow(10,n),o=i/r;return i=(o<1.5?1:o<2.5?2:o<4?3:o<7?5:10)*r,n>=-20?+i.toFixed(n<0?-n:0):i}function _0x5c361f(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function _0x21c072(e,t,i){var n=[];return n[0]=_0x21b518(Math.floor(e/i)*i),n[1]=_0x21b518(Math.ceil(t/i)*i),n}function _0x21b518(e,t,i){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),i?e:+e}var _0x15f5b0=(_0x328cb1=!0,function(e,t){var i=_0x328cb1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x328cb1=!1,i}),_0x28ef10=_0x15f5b0(void 0,(function(){return _0x28ef10.toString().search("(((.+)+)+)+$").toString().constructor(_0x28ef10).search("(((.+)+)+)+$")})),_0x328cb1;_0x28ef10();var _0x20f6a4={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,READY:4,LOST:5},_0x5e3972=new s$S,_0x41b30e=25;function _0x243ce4(e,t,i){var n=e.vertexAttributes[0],r=n.typedArray,o=new Float32Array(r.buffer,r.byteOffset,r.byteLength/4),a=n.componentsPerAttribute,s=e.verticesCount,l=new Float32Array(3*s),u=e.attrLocation;u.aRatio=Object.keys(u).length;for(var c=0;c<s;c++){var h=new o$1p(o[c*a],o[c*a+1],o[c*a+2]),d=new o$1p;p$1d.multiplyByPoint(t,h,d);var f=a$18.fromCartesian(d),p=e$2a.toDegrees(f.longitude),_=e$2a.toDegrees(f.latitude),m=f.height,g=(p-i.left)/(i.right-i.left),x=(_-i.bottom)/(i.top-i.bottom),v=(m-i.minHeight)/(i.maxHeight-i.minHeight);l[3*c]=g,l[3*c+1]=x,l[3*c+2]=v}e.vertexAttributes.push({index:u.aRatio,typedArray:l,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0x448857(e){if(!e$2b(e))throw new t$16("context is required.");this._context=e,this._gl=e._gl,this._type=bt$5.INSTANCED_LAYER,this._group={},this._visible=!0,this._picking=!1,this._clampToObject=!1,this._profile=!1,this._visibleViewport=4095,this._maxVisibleAltitude=Number.MAX_VALUE,this._maxVisibleDistance=Number.MAX_VALUE,this._minVisibleAltitude=0,this._minVisibleDistance=0,this._filterMode=_0x2056d1.DISTANCE_FROM_EYE_POINT,this._filterPixel=0,null!==e.s3tc?this._supportCompressType=1:null!==e.pvrtc?this._supportCompressType=2:null!==e.etc1&&(this._supportCompressType=3),this._isOverLay=!1,this._spatialQueryEnable=!1,this._sqTextures=[],this._sqMode=j$X.Disjoint,this._allColorCommand=[],this._shadowType=_0x381f49.NONE,this._needToRender=!0,this._addedEvent=new o$1h,this._volume=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:new o$1p,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}},this._pbrParameter=je$g.NONE,this._mixColorType=_0x203e3b.MIX,_0x46a73d.S3MBTaskProcessor.scheduleTask({})}function _0x2e80e0(e,t,i){if(e$2b(e._profileCommand)||e.createProfileCommand(t),e._profileCommand.derivedCommands={},i){var n=_0x187e60.createClampObjectColorRenderState();e._profileCommand.renderState=d$1m.fromCache(n),e._profileCommand.pass=Le$s.ClampObject,e$2b(e._stencilCommand)||e.createClampCommand()}else e._profileCommand.renderState=d$1m.fromCache({cull:{enabled:group.cullEnabled,face:group.cullFace},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),e.removeProgramDefine(!0,!0,"ClampObject",!0)}function _0x11ed3b(e,t){var i=e._group[t],n=e.customRequestHeaders,r=i.state;if(_0x20f6a4.UNLOAD==r){var o=o$N(t,(function(e){return o$10(e,n)}));e$2b(o)&&(i.state=_0x20f6a4.LOADING,o.then((function(e){i._arrayBuffer=e,i.state=_0x20f6a4.LOADED}),(function(e){i.state=_0x20f6a4.LOST})))}_0x20f6a4.LOADED==r&&(e$2b(i._arrayBuffer)?_0x5c4563(e,i,i._arrayBuffer):e$2b(i._threedmodeling)&&_0xd4664c(e,i._threedmodeling,i))}function _0x527075(e){return e._shadowType==_0x381f49.SELECTION||e._shadowType==_0x381f49.ALL}function _0x5831ff(e,t){var i=e.instances.length,n=e.renderEntities;if(n&&!(n.length<1)&&0!==i){var r=e.instances.values[0];if(e$2b(r)){var o=e$2b(r.localTransform)?_0x41b30e+8:_0x41b30e,a=e.oriCenter,s=e.oriRadius;e.instanceBuffer&&e.instanceBuffer.destroy();for(var l=new Float32Array(i*o),u=0;u<i;u++){(m=e.instances.values[u]).index=u,_0x2c353e(t,l,m,u*o)}e.instanceBuffer=t$Y.createVertexBuffer({context:t,typedArray:l,usage:A$19.STATIC_DRAW}),e.instanceBuffer.vertexArrayDestroyable=!1;u=0;for(var c=n.length;u<c;u++){var h=n[u],d=h._colorCommand;d.vertexArray.destroy();for(var f=0;f<h.attributes.length;f++){var p=h.attributes[f];e$2b(p.instanceDivisor)&&p.instanceDivisor>0&&(p.vertexBuffer=e.instanceBuffer)}d.vertexArray=new c$12({context:t,attributes:h.attributes,indexBuffer:h.indexBuffer}),d.instanceCount=i;for(var _=0;_<i;_++){var m;if((m=e.instances.values[_]).index=_,m.oriCenter=a,m.oriRadius=s,!e$2b(m.boundingSphere)){m.boundingSphere=new i$1c;var g=o$1p.maximumComponent(m.scale);m.boundingSphere.radius=s*g;var x=m$17.eastNorthUpToFixedFrame(m.position,t$13.WGS84,new p$1d);p$1d.multiplyByPoint(x,a,m.boundingSphere.center)}}}e.instanceCount=i,e.dirty=!1}}}function _0x2c353e(e,t,i,n){var r=o$1p.clone(i._offsetPosition),o=i._quaternion;if(i._mode===C$13.COLUMBUS_VIEW){var a=p$1e.fromRotationY(-Math.PI/2),s=n$13.fromRotationMatrix(a);n$13.multiply(o,s,o)}var l=i._scale,u=i$11.fromCartesian(r),c=i.visible?u.high:o$1p.ZERO,h=i.visible?u.low:o$1p.ZERO,d=i._color,f=i._pickColor,p=i._offset,_=i.oriRadius,m=i.localTranslation,g=i.localQuaternion,x=0;t[n+x++]=c.x,t[n+x++]=c.y,t[n+x++]=c.z,t[n+x++]=h.x,t[n+x++]=h.y,t[n+x++]=h.z,t[n+x++]=o.x,t[n+x++]=o.y,t[n+x++]=o.z,t[n+x++]=o.w,t[n+x++]=l.x,t[n+x++]=l.y,t[n+x++]=l.z,t[n+x++]=_,t[n+x++]=d.red,t[n+x++]=d.green,t[n+x++]=d.blue,t[n+x++]=d.alpha,t[n+x++]=f.x,t[n+x++]=f.y,t[n+x++]=f.z,t[n+x++]=f.w,t[n+x++]=p.x,t[n+x++]=p.y,t[n+x++]=p.z,e$2b(m)&&(t[n+x++]=m.x,t[n+x++]=m.y,t[n+x++]=m.z,t[n+x++]=1),e$2b(g)&&(t[n+x++]=g.x,t[n+x++]=g.y,t[n+x++]=g.z,t[n+x++]=g.w)}function _0x37e656(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;if(!(e.arrIndexPackage&&e.vertexPackage&&e.collection&&e.mapPass))throw new t$16("gl texture indexes vertexes collection is required to create RenderEntityPagelod");this._arrIndexPackage=t,this._vertexPackage=i,this._collection=e.collection,this._layer=this._collection,this._attributeLocations={},this._initialize=!1,this._geoMatrix=u$_(e.geoMatrix,p$1d.IDENTITY),this._mapPass=n,this._colorCommand=void 0,this._stencilCommand=void 0,this._profileCommand=void 0,this._spatialQueryCommand=void 0,this._boundingVolume=e.boundingVolume,this._ownerGroup=e.ownerGroup;var r=this._arrIndexPackage[0];this._material=e$2b(r)&&e$2b(r.materialCode)?n[r.materialCode]:_0x21d1b1.Default,this._materialUBO=new _0xfa6ee5(this,this._material,this._collection)}function _0xd4664c(e,t,i){i.state=_0x20f6a4.PARSING;for(var n=new o$1p,r=[],o=Number.MAX_VALUE,a=Number.MIN_VALUE,s=0;s<t.vertexCount;s++)o$1p.fromArray(t.positionAttr,3*s,n),r.push(o$1p.clone(n)),o=Math.min(o,n.y),a=Math.max(a,n.y);var l=p$1d.clone(p$1d.IDENTITY,new p$1d),u=i$1c.fromPoints(r,new i$1c);i$1c.transform(u,l,u);var c=new _0x37e656({vertexPackage:{vertexAttributes:[{index:0,typedArray:t.positionAttr,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1},{index:1,typedArray:t.colorAttr,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:0},{index:2,typedArray:t.normalAttr,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:0}],attrLocation:{aPosition:0,aColor:1,aNormal:2},instanceCount:0,instanceMode:0,instanceIndex:-1,verticesCount:t.vertexCount},arrIndexPackage:[{indicesTypedArray:t.indices,indexType:0,primitiveType:4}],mapPass:{},boundingVolume:u,collection:e,ownerGroup:i,geoMatrix:l});c.initialize(e),i.renderEntities.push(c),i._threedmodeling=void 0,i.state=_0x20f6a4.READY,i.ready=!0,e._addedEvent.raiseEvent(i.url)}function _0x567cba(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function _0x238861(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function _0x5c4563(e,t,i){var n,r={buffer:i,supportCompressType:e._supportCompressType},o=!1;if(t.url.endsWith("s3mb")||/\.(x|X|dae|DAE|osgb)$/.test(t.url)){if(/\.(x|X|dae|DAE|osgb)$/.test(t.url)&&(r.isOSGB=!0),r.suffix=t.url.substring(t.url.lastIndexOf(".")+1),o=!0,_0x46a73d.init||_0x46a73d.initWebAssembly(),!_0x46a73d.taskProcessorReady)return;n=_0x46a73d.S3MBTaskProcessor.scheduleTask(r,[i])}else n=_0x46a73d.S3MTaskProcessor.scheduleTask(r,[i]);e$2b(n)?(t.state=_0x20f6a4.PARSING,t._arrayBuffer=void 0,n.then((function(i){i&&i.result?(o?_0x299732(i,t,e):_0x4b2751(i,t,e),t.ready=!0,t.dirty=!1,t.state=_0x20f6a4.READY):t.state=_0x20f6a4.UNLOAD})).otherwise((function(e){console.log(e)})).then((function(){e._addedEvent.raiseEvent(t.url)}))):t.state=_0x20f6a4.LOADED}function _0x299732(e,t,i){i._gl;var n=i._context,r=e.groupNode,o=e.geoPackage,a=e.matrials.material,s={},l=0,u=0,c=o$1l.defer();a.map((function(i){var r=i.material,o=r.id,a=new _0x21d1b1({});s[o]=a,a.createCommonParamter(r),a.createPBRParamter(r);var h=r.textureunitstates;l+=h.length;for(var d=0;d<h.length;d++){var f=h[d].textureunitstate,p=f.id,_=0===f.addressmode.u?q$19.REPEAT:q$19.CLAMP_TO_EDGE,m=0===f.addressmode.v?q$19.REPEAT:q$19.CLAMP_TO_EDGE;a._texMatrix=p$1d.unpack(f.texmodmatrix);var g=e.texturePackage[p],x=p;if(e$2b(g)&&!n.webgl2)(!e$2a.isPowerOfTwo(g.width)||!e$2a.isPowerOfTwo(g.height))&&(_=q$19.CLAMP_TO_EDGE,m=q$19.CLAMP_TO_EDGE);if(e$2b(g)||!p.endsWith("jpg")&&!p.endsWith("png")){if(e$2b(g)&&g.width>0&&g.height>0&&g.imageBuffer.length>0){var v=Se$d.CreateTexture(x,n,g.width,g.height,g.nFormat,g.compressType,g.imageBuffer,!1,_,m),y=p.indexOf("PBRMaterialParam")>-1,$=a._emissiveTextureIndex===d,b=a._normalTextureIndex===d,T=a._metallicRoughnessTextureIndex===d,C=a._occlusionTextureIndex===d;y?(a._usePBRTextureBatch=!0,a.pbrParamTexture=v):$?a.emissiveTexture=v:b?a.normalTexture=v:T?a.metallicRoughnessTexture=v:C?a.occlusionTexture=v:a._textures.push(v)}c.resolve()}else{var S=t.url.substring(0,t.url.lastIndexOf("/")+1)+p;o$10(S).then((function(e){var t=S.endsWith("jpg")?"jpg":"png";a.createJPGPNG(x,n,d,e,_,m,t).then((function(e){++u==l&&c.resolve()})).otherwise((function(){++u==l&&c.resolve()}))})).otherwise((function(){++u==l&&c.resolve()}))}}c.resolve()})),c.promise.then((function(){var n=r.pageLods,a=[],l=new i$1c;n.forEach((e=>{e.boundingSphere&&a.push(e.boundingSphere)})),i$1c.fromBoundingSpheres(a,l);for(var u=0;u<n.length;u++){n[u].geodes.map((function(n){for(var r=n.matrix,a=n.skeletonNames,u=0;u<t.instances.length;u++){var c=t.instances.values[u];c.oriCenter=o$1p.clone(l.center),c.oriRadius=l.radius,e$2b(t.oriCenter)||(t.oriCenter=c.oriCenter,t.oriRadius=c.oriRadius);var h=c.position,d=m$17.eastNorthUpToFixedFrame(h,t$13.WGS84,new p$1d),f=i$1c.transform(l,d,new i$1c);c.boundingSphere=f}for(var p=0;p<a.length;p++){for(var _=a[p],m=o[_],g=m.vertexPackage,x=m.arrIndexPackage,v={},y=0;y<x.length;y++){var $=x[y];if(e$2b($)){var b=$.materialCode,T=s[b];v[b]=T}}var C=new _0x37e656({vertexPackage:g,arrIndexPackage:x,version:e.version,mapPass:v,collection:i,ownerGroup:t,geoMatrix:r});C.initialize(i),t.renderEntities.push(C)}}))}}))}function _0x4b2751(e,t,i){i._gl;for(var n=i._context,r=_0x5e3972.read(e.xmlDoc).firstChild,o=r.namespaceURI,a=_0x43ec62(_0x38867c(r,"Material3Ds",o),"material",o),s={},l=0,u=a.length;l<u;l++){var c=a[l],h=_0x2411b5(c,"name",o),d=new _0x21d1b1({});s[h]=d;var f=_0x38867c(c,"Ambient",o),p=_0x247774(f,"AmbientR",o),_=_0x247774(f,"AmbientG",o),m=_0x247774(f,"AmbientB",o),g=_0x247774(f,"AmbientA",o);d._ambientColor=new e$1U(p,_,m,g);var x=_0x38867c(c,"Diffuse",o);p=_0x247774(x,"DiffuseR",o),_=_0x247774(x,"DiffuseG",o),m=_0x247774(x,"DiffuseB",o),g=_0x247774(x,"DiffuseA",o),d._diffuseColor=new e$1U(p,_,m,g);var v=_0x38867c(c,"Specular",o);p=_0x247774(v,"SpecularR",o),_=_0x247774(v,"SpecularG",o),m=_0x247774(v,"SpecularB",o),g=_0x247774(v,"SpecularA",o),d._specularColor=new e$1U(p,_,m,g);var y=_0x247774(c,"Shininess",o);d._shininess=y,_0x38867c(c,"TransparentSorting",o),d._bTransparentSorting=_0x3b993d(c,"TransparentSorting",o)||d._diffuseColor.alpha<1;var $=_0x38867c(c,"texture",o),b=_0x2411b5($,"name",o),T=_0x38867c($,"AddressMode",o),C=_0x2411b5(T,"u",o),S=_0x2411b5(T,"v",o);C="TAM_WRAP"===C?q$19.REPEAT:q$19.CLAMP_TO_EDGE,S="TAM_WRAP"===S?q$19.REPEAT:q$19.CLAMP_TO_EDGE;var w=e.texturePackage[b];if(e$2b(w)){b=n._id+"_"+b,(!e$2a.isPowerOfTwo(w.width)||!e$2a.isPowerOfTwo(w.height))&&(C=q$19.CLAMP_TO_EDGE,S=q$19.CLAMP_TO_EDGE);var E=Se$d.CreateTexture(b,n,w.width,w.height,w.nFormat,w.compressType,w.imageBuffer,!1,C,S);d._textures.push(E),0===w.compressType&&(i._supportCompressType=0)}}var P=_0x533f61(_0x38867c(r,"PageLods",o),"Geode",o);for(l=0,u=P.length;l<u;l++){for(var A=[],L=P[l],M=_0x2411b5(L,"GeoDeModMatrix",o).split(","),R=0;R<16;R++)M[R]=parseFloat(M[R]);M=p$1d.unpack(M,0);for(var O=_0x533f61(L,"GeoName",o),I=[],D=0,B=O.length;D<B;D++){var N=O[D].textContent.trim();-1===I.indexOf(N)&&I.push(N)}for(var F=new i$1c,U=0;U<I.length;U++){if(e$2b(J=e.geoPackage[I[U]])){var G=_0x948aea(ee=J.vertexPackage,M);A.push(G)}}if(A.length>0){var z=i$1c.fromBoundingSpheres(A,new i$1c),V=!1;t.instances.length>0&&e$2b(t.instances.values[0].localTransform)&&(i$1c.transform(z,t.instances.values[0].localTransform,z),V=!0);for(var k=[],W=0;W<t.instances.length;W++){var H=t.instances.values[W];H.oriCenter=o$1p.clone(z.center),H.oriRadius=z.radius,e$2b(t.oriCenter)||(t.oriCenter=H.oriCenter,t.oriRadius=H.oriRadius);var q=H.position,j=m$17.eastNorthUpToFixedFrame(q,t$13.WGS84,new p$1d),Y=i$1c.transform(z,j,new i$1c),X=V?2:o$1p.maximumComponent(H.scale);Y.radius=Y.radius*X,H.boundingSphere=Y,k.push(Y)}i$1c.fromBoundingSpheres(k,F)}var K=new p$1d;if(e$2b(i._volume)){var Q=t.instances.values[0]._offsetPosition,Z=new i$15;j=m$17.headingPitchRollToFixedFrame(Q,Z,t$13.WGS84,m$17.eastNorthUpToFixedFrame);K=p$1d.multiply(j,M,K),K=p$1d.multiplyByScale(K,t.instances.values[0].scale,K)}for(B=0;B<I.length;B++){var J;if(e$2b(J=e.geoPackage[I[B]])){var ee=J.vertexPackage,te=J.arrIndexPackage,ie={};for(var ne in te){var re=te[ne];if(e$2b(re)){d=s[h=re.materialCode];ie[h]=d}}e$2b(i._volume)&&_0x243ce4(ee,K,i._volume._volBounds);var oe=new _0x37e656({vertexPackage:ee,arrIndexPackage:te,version:e.version,mapPass:ie,boundingVolume:F,collection:i,ownerGroup:t,geoMatrix:M});oe.initialize(i),t.renderEntities.push(oe)}}}}function _0x948aea(e,t){for(var i=[],n=new i$1c,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1c.fromPoints(i,n),i.length=0,i$1c.transform(n,t,n),n}function _0x38867c(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(e$2b(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function _0x533f61(e,t,i){if(e$2b(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];e$2b(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}}function _0x43ec62(e,t,i){if(!e$2b(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];e$2b(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function _0x247774(e,t,i){var n=_0x38867c(e,t,i);if(e$2b(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function _0x2411b5(e,t,i){var n=_0x38867c(e,t,i);if(e$2b(n))return n.textContent.trim()}function _0x3b993d(e,t,i){var n=_0x38867c(e,t,i);if(e$2b(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function _0x2bfbda(e,t,i,n,r){var o=e$2b(r)?_0x41b30e+8:_0x41b30e,a=S$12.getSizeInBytes(S$12.FLOAT),s=0;t.aPosHigh=i++,e.push({name:"aPosHigh",index:t.aPosHigh,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:s,strideInBytes:a*o,instanceDivisor:1}),s+=3,t.aPosLow=i++,e.push({name:"aPosLow",index:t.aPosLow,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=3,t.aQuaternion=i++,e.push({name:"aQuaternion",index:t.aQuaternion,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aScaleAndRadius=i++,e.push({name:"aScaleAndRadius",index:t.aScaleAndRadius,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aColor2=i++,e.push({name:"aColor2",index:t.aColor2,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aPickColor=i++,e.push({name:"aPickColor",index:t.aPickColor,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aOffset=i++,e.push({name:"aOffset",index:t.aOffset,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=3,e$2b(r)&&(t.aLocalTranslation=i++,e.push({name:"aLocalTranslation",index:t.aLocalTranslation,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aLocalQuaternion=i++,e.push({name:"aLocalQuaternion",index:t.aLocalQuaternion,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4)}function _0x284e0c(e,t,i){var n=t.layer,r={uTexture:function(){return t.texture||n._context._defaultTexture},uHasNormal:function(){return t.hasNormal},uAmbientColor:function(){return n._mixColorType===_0x203e3b.REPLACE?e$1U.WHITE:t.ambientColor},uDiffuseColor:function(){return n._mixColorType===_0x203e3b.REPLACE?e$1U.WHITE:t.diffuseColor},uSpecularColor:function(){return t.specularColor},uShininess:function(){return t.shininess},uPicking:function(){return t.layer._picking},uGeoMat:function(){return t.geoMat},uRangeMode:function(){return n.filterMode},uVisibleDistance:function(){return new o$1o(n.maxVisibleDistance,n.minVisibleDistance)},uFilterPixel:function(){return n.filterPixel},uFillColor:function(){return t.diffuseColor},uVolumeTexture:function(){return n._volume._volTexture},width:function(){return n._volume._volImageBuffer.nWidth},height:function(){return n._volume._volImageBuffer.nHeight},depth:function(){return n._volume._volImageBuffer.nDepth},sideBlockCount:function(){return n._volume._volImageBuffer.nSideBlockCount},blockLength:function(){return n._volume._volImageBuffer.nBlockLength},texLength:function(){return n._volume._volImageBuffer.nLength},uFilterMode:function(){var e=0;return e$2b(n._volume.hypsometricSetting)&&n._volume.hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(e=1),e},uMixColorType:function(){return n._mixColorType},uDataFloor:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMinKey:0},uDataCeil:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMaxKey:0},uVolumeType:function(){return e$2b(n._volume.hypsometricSetting)&&n._volume.hypsometricSetting.filterMode===k$Q.FilterMode.LINEAR?0:1},uHypOpacity:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.Opacity:1},uHypContourInterval:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.LineInterval:100},uHypLineColor:function(){var e=new e$29(0,1,1,1);return e$2b(n._volume.hypsometricSetting)&&(e.x=n._volume.hypsometricSetting.LineColor.red,e.y=n._volume.hypsometricSetting.LineColor.green,e.z=n._volume.hypsometricSetting.LineColor.blue,e.w=n._volume.hypsometricSetting.LineColor.alpha),e},uHypContourFillMode:function(){var e=1;if(e$2b(n._volume.hypsometricSetting))switch(n._volume.hypsometricSetting.DisplayMode){case k$Q.DisplayMode.NONE:e=0;break;case k$Q.DisplayMode.FACE:e=1;break;case k$Q.DisplayMode.LINE:e=2;break;case k$Q.DisplayMode.FACE_AND_LINE:e=3}return e},uHypFloor:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMaxKey:0},uHypMaxVisibleValue:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.MaxVisibleValue:0},uHypMinVisibleValue:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.MinVisibleValue:0},uNoValueColor:function(){return e$2b(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.noValueColor:e$1U.WHITE},uHypsometricVisible:function(){return 1},uHypHasAnalysisRegion:function(){return 0},uHypsometricRenderTexture:function(){return 0},uHypsometricTexture:function(){return n._volume._hypsometricTexture},uBaseColorFactor:function(){return e$2b(i._baseColor)?i._baseColor:n._PBRMaterialParams[t.groupName].baseColorFactor},uBaseColorTextureIndex:function(){return i._baseColorTextureIndex>-1?i._baseColorTextureIndex:n._PBRMaterialParams[t.groupName].baseColorTextureIndex},uMetallicFactor:function(){return e$2b(i._metallicFactor)?i._metallicFactor:n._PBRMaterialParams[t.groupName].metallic},uRoughnessFactor:function(){return e$2b(i._roughnessFactor)?i._roughnessFactor:n._PBRMaterialParams[t.groupName].roughness},uEmissiveFactor:function(){return e$2b(i._emissiveFactor)?i._emissiveFactor:n._PBRMaterialParams[t.groupName].emissionFactor},uEmissionTexture:function(){return e$2b(i.emissiveTexture)&&i._emissiveTextureIndex>-1?i.emissiveTexture:n._PBRMaterialParams[t.groupName].emissiveTexture},uEmissiveUVOffsetAndTiling:function(){var e=i._emissiveTextureMotion,t=new e$29,n=performance.now()/1e3;if(e._offsetPeriod>0){var r=n%e._offsetPeriod;t.x=r*e._offsetSpeedU,t.y=r*e._offsetSpeedV}else t.x=0,t.y=0;if(e._tilingPeriod>0){var o=n%e._tilingPeriod;t.z=1+o*e._tilingSpeedU,t.w=1+o*e._tilingSpeedV}else t.z=1,t.w=1;return t},uBaseTexture:function(){return e$2b(i.baseColorTexture)&&i._baseColorTextureIndex>-1?i.baseColorTexture:n._PBRMaterialParams[t.groupName].baseTexture},uNormalTexture:function(){return e$2b(i.normalTexture)&&i._normalTextureIndex>-1?i.normalTexture:n._PBRMaterialParams[t.groupName].normalTexture},uMetallicRoughnessTexture:function(){return e$2b(i.metallicRoughnessTexture)&&i._metallicRoughnessTextureIndex>-1?i.metallicRoughnessTexture:n._PBRMaterialParams[t.groupName].metallicRoughnessTexture},uOcclusionTexture:function(){return e$2b(i.occlusionTexture)&&i._occlusionTextureIndex>-1?i.occlusionTexture:n._PBRMaterialParams[t.groupName].occlusionTexture}};r=p$19(r,i.createPBRUniformMap()),r=p$19(r,n._frameState.lightSource.createUniformMap()),e.uniformMap=r}function _0x1a2aa1(e,t,i,n){var r=t$11.createIfNeeded(t).fetchImage().then((function(t){var r=new t$V({context:e,source:t,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.LINEAR_MIPMAP_LINEAR,magnificationFilter:tt$h.LINEAR})});!e$2a.isPowerOfTwo(r.width)||!e$2a.isPowerOfTwo(r.height)||r.generateMipmap(I$1e.NICEST),i[n]=r})).otherwise((function(){i[n]=void 0}));i[n]=r}function _0x1f8f59(e,t){if(e$2b(e._group[t])&&e._group[t].renderEntities.length>0)for(var i=e._group[t].renderEntities,n=0;n<i.length;n++)e$2b(i[n]._colorCommand)&&(e$2b(e._PBRMaterialParams[t])&&e$2b(e._PBRMaterialParams[t].roughness)?(i[n].appendProgramDefine(!1,!0,Y$H.BRDF,!1),e._PBRMaterialParams[t].baseColorTextureIndex>-1&&e$2b(e._PBRMaterialParams[t].baseTexture)&&i[n].appendProgramDefine(!1,!0,Y$H.HAS_BASE_TEXTURE,!1),e._PBRMaterialParams[t].normalTextureIndex>-1&&e$2b(e._PBRMaterialParams[t].normalTexture)&&i[n].appendProgramDefine(!1,!0,Y$H.HAS_NORMAL_TEXTURE,!1),e._PBRMaterialParams[t].emissionTextureIndex>-1&&i[n].appendProgramDefine(!1,!0,Y$H.HAS_EMISSIVE_TEXTURE,!1),e$2b(e._frameState.specularEnvironmentMaps)&&i[n].appendProgramDefine(!1,!0,Y$H.IBL,!1)):(i[n].removeProgramDefine(!1,!0,Y$H.BRDF,!1),i[n].removeProgramDefine(!1,!0,Y$H.HAS_BASE_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,Y$H.HAS_NORMAL_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,Y$H.HAS_EMISSIVE_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,Y$H.IBL,!1)))}Object.defineProperties(_0x448857.prototype,{type:{get:function(){return this._type}},group:{get:function(){return this._group}},visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("value",e),this._visible=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){o$1q.typeOf.number("maxVisibleAltitude",e),this._maxVisibleAltitude=e}},maxVisibleDistance:{get:function(){return this._maxVisibleDistance},set:function(e){o$1q.typeOf.number("maxVisibleDistance",e),this._maxVisibleDistance=e}},minVisibleDistance:{get:function(){return this._minVisibleDistance},set:function(e){o$1q.typeOf.number("minVisibleDistance",e),this._minVisibleDistance=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){o$1q.typeOf.number("minVisibleAltitude",e),this._minVisibleAltitude=e}},filterMode:{get:function(){return this._filterMode},set:function(e){o$1q.typeOf.number("filterMode",e),this._filterMode=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){o$1q.typeOf.number("filterPixel",e),this._filterPixel=e}},isOverLay:{get:function(){return this._isOverLay},set:function(e){o$1q.typeOf.bool("value",e),this._isOverLay=e}},clampToObject:{get:function(){return this._clampToObject},set:function(e){if(o$1q.typeOf.bool("value",e),this._clampToObject!==e){this._clampToObject=e;var t=this._group;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];if(!n.ready)continue;for(var r=0,o=n.renderEntities.length;r<o;r++){var a=n.renderEntities[r];this._profile?_0x2e80e0(a,this,e):e$2b(a._colorCommand)&&(a._colorCommand.derivedCommands={},a.createColorRenderState(n,e),e?(a._colorCommand.pass=Le$s.ClampObject,e$2b(a._stencilCommand)||a.createClampCommand(),a.appendProgramDefine(!0,!0,"ClampObject",!1)):a.removeProgramDefine(!0,!0,"ClampObject",!1))}}}}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}},addedEvent:{get:function(){return this._addedEvent}},mixColorType:{get:function(){return this._mixColorType},set:function(e){this._mixColorType!==e&&(this._mixColorType=e)}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders!==e&&(this._customRequestHeaders=e)}}}),_0x448857.prototype.add=function(e,t,i,n){o$1q.defined("url",e),o$1q.typeOf.string("url",e),o$1q.defined("attrs",t),Array.isArray(t)||(t=[t]),e$2b(this._group[e])||(this._group[e]={instances:new e$1N,ready:!1,state:e$2b(i)?_0x20f6a4.LOADED:_0x20f6a4.UNLOAD,instanceCount:0,instanceBuffer:void 0,renderEntities:[],cullEnabled:!1,cullFace:G$17.BACK,oriCenter:void 0,oriRadius:void 0,dirty:!1,url:e});for(var r=this._group[e],o=this._context,a=0,s=t.length;a<s;a++){var l=t[a],u=u$_(l.id,r.instances.length);if(r.instances.contains(u))console.log("id "+u+" exist");else{l.sceneMode=this._context._us._mode;var c=new _0x331f36(o,u,r,l);r.instances.set(u,c)}}if(e$2b(i))if(n=u$_(n,!0),i instanceof Blob){var h=new FileReader,d=this;h.addEventListener("load",(function(){if(n){var t=new Uint8Array(h.result).buffer;d._group[e]._arrayBuffer=t}else d._group[e]._arrayBuffer=h.result})),h.addEventListener("error",(function(){})),h.readAsArrayBuffer(i)}else if(i instanceof ArrayBuffer)if(n){var f=i;this._group[e]._arrayBuffer=f}else this._group[e]._arrayBuffer=i;else{var p=_0x4bd175.getDataShape(i);r=_0x4bd175.updateSurfaceMesh(i,p,!0);this._group[e]._threedmodeling=r}r.dirty=!0},_0x448857.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x448857.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},_0x448857.prototype.removeCollection=function(e){o$1q.defined("removeCollection url",e);var t=this._group[e];if(!e$2b(t))return!1;for(var i=0,n=t.renderEntities.length;i<n;i++)t.renderEntities[i].destroy();return t.renderEntities.length=0,t.instances.removeAll(),this._group[e]=null,delete this._group[e],!0},_0x448857.prototype.getInstance=function(e,t){o$1q.defined("S3MInstanceCollection getInstance url",e),o$1q.defined("S3MInstanceCollection getInstance id",t);var i=this._group[e];if(e$2b(i))return i.instances.get(t)},_0x448857.prototype.removeInstance=function(e,t){o$1q.defined("removeInstance url",e),o$1q.defined("removeInstance ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(!e$2b(i))return!1;for(var n,r=0,o=t.length;r<o;r++){var a=t[r];e$2b(n=i.instances.get(a))&&(n.updateColor(e$1U.WHITE.withAlpha(0),n.id),n.isDeleted=!0,i.instances.remove(a),n=null,this._group[e].dirty=!0)}return!0},_0x448857.prototype.setCullEnabled=function(e,t){o$1q.typeOf.string("S3MInstanceCollection setCullEnabled url",e),t=u$_(t,G$17.BACK);var i=this._group[e];if(e$2b(i)&&(!i.cullEnabled||i.cullFace!==t)&&(i.cullEnabled=!0,i.cullFace=t,i.ready))for(var n=0,r=i.renderEntities.length;n<r;n++){var o=i.renderEntities[n],a=d$1m.getState(o._colorCommand.renderState);a.cull.enabled=!0,a.cull.face=t,o._colorCommand.renderState=d$1m.fromCache(a)}},_0x448857.prototype.setUnSelected=function(){var e=this._group;if(e$2b(e))for(var t in e){var i=e[t];if(e$2b(i.instances)&&!(i.instances.length<1))for(var n=0,r=i.instances.length;n<r;n++){i.instances.values[n].setUnSelected()}}},_0x448857.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;if(this._visible){if(e$2b(this._volume)){if(!this._volume._ready)return;this._volume.loadTexture(this._context)}var t=e.camera;if(!(t.positionCartographic.height>this._maxVisibleAltitude||t.positionCartographic.height<this._minVisibleAltitude)){this._frameState=e;var i=e.commandList,n=this._group,r=e.passes;for(var o in this._picking=r.pick,this._allColorCommand=[],n){var a=n[o];if(_0x11ed3b(this,o),a.ready){a.dirty&&_0x5831ff(a,this._context);for(var s=[],l=!1,u=0;u<a.instances.length;u++){var c=a.instances.values[u];0===u&&(l=c.color.alpha<1);var h=c.boundingSphere;s.push(h)}for(var d=i$1c.fromBoundingSpheres(s,new i$1c),f=0,p=a.renderEntities.length;f<p;f++){var _=a.renderEntities[f];if(_._materialUBO.update(this._context),this._clampToObject&&this._profile){if(e._fboState.frameBufferType===Qe$c.CLAMP)_._stencilCommand.boundingVolume=d,i.push(_._stencilCommand),_._profileCommand.boundingVolume=d,_._profileCommand.instanceCount=a.instanceCount,_._profileCommand.pass=Le$s.ClampObject,i.push(_._profileCommand);else if(this._spatialQueryEnable){e$2b(_._spatialQueryCommand)||_.createSpatialQueryCommand(this);var m=3===this._sqTextures.length?_._spatialQueryCommand:_._colorCommand;m.boundingVolume=d,m.instanceCount=a.instanceCount,m.pass=this._isOverLay?Le$s.OVERLAY_AGAINST_DEPTH:l?Le$s.TRANSLUCENT:Le$s.OPAQUE,e._fboState.enabled||i.push(m)}}else this._clampToObject&&(_._stencilCommand.boundingVolume=d,i.push(_._stencilCommand)),_._colorCommand.boundingVolume=d,_._colorCommand.instanceCount=a.instanceCount,_._colorCommand.pass=this._isOverLay?Le$s.OVERLAY_AGAINST_DEPTH:this._clampToObject?Le$s.ClampObject:l?Le$s.TRANSLUCENT:Le$s.OPAQUE,this._needToRender&&i.push(_._colorCommand),this._allColorCommand.push(_._colorCommand)}}}}}},_0x448857.prototype.isDestroyed=function(){return!1},_0x448857.prototype._updateShadow=function(e){var t=_0x527075(e),i=e._group;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s._colorCommand.castShadows=t,s._colorCommand.receiveShadows=t}}},_0x448857.prototype.destroy=function(){for(var e in this._group){var t=this._group[e];if(t.ready){for(var i=0;i<t.renderEntities.length;i++){var n=t.renderEntities[i]._colorCommand;if(e$2b(n.vertexArray)&&!n.vertexArray.isDestroyed()){n.vertexArray._inner._indexBuffer.vertexArrayDestroyable=!0;for(var r=0;r<n.vertexArray._inner._attributes.length;r++){n.vertexArray._inner._attributes[r].vertexBuffer.vertexArrayDestroyable=!0}n.vertexArray=n.vertexArray.destroy()}n.shaderProgram=n.shaderProgram&&n.shaderProgram.destroy()}t.instanceBuffer=t.instanceBuffer&&!t.instanceBuffer.isDestroyed()&&t.instanceBuffer.destroy()}}return this._group=void 0,this._allColorCommand=[],i$10(this)},_0x37e656.prototype.initialize=function(e){this._initialize||(this.createCommand(e),this._initialize=!0)},_0x37e656.prototype.createVertexData=function(e){for(var t=this._vertexPackage.vertexAttributes,i=0,n=t.length;i<n;i++){var r=t[i];!e$2b(r.typedArray)||(r.vertexBuffer=t$Y.createVertexBuffer({context:e,typedArray:r.typedArray,usage:A$19.STATIC_DRAW}),r.vertexBuffer.vertexArrayDestroyable=!1,r.typedArray=null,delete r.typedArray)}if(!e$2b(this._ownerGroup.instanceBuffer)){var o=this._ownerGroup.instances,a=void 0;o.length>0&&(a=o.values[0].localTransform);var s=o.length;this._ownerGroup.instanceCount=s;var l=e$2b(a)?_0x41b30e+8:_0x41b30e,u=new Float32Array(s*l);for(i=0;i<s;i++){var c=o.values[i];c.index=i,_0x2c353e(e,u,c,i*l)}this._ownerGroup.instanceBuffer=t$Y.createVertexBuffer({context:e,typedArray:u,usage:A$19.STATIC_DRAW})}for(var h in this._attributeLocations=this._vertexPackage.attrLocation,this._attributeLocations){t[d=this._attributeLocations[h]].name=h}var d=Object.keys(this._attributeLocations).length;return _0x2bfbda(t,this._attributeLocations,d,this._ownerGroup,a),t},_0x37e656.prototype.createCommand=function(e){var t=e._context,i=this.createVertexData(t),n=Le$s.OPAQUE;if(!e$2b(this._arrIndexPackage)||!e$2b(this._arrIndexPackage[0]))return;var r=this._arrIndexPackage[0],o=this._vertexPackage.verticesCount,a=ce$x.UNSIGNED_SHORT;(1===r.indexType||o>=e$2a.SIXTY_FOUR_KILOBYTES)&&t.elementIndexUint&&(a=ce$x.UNSIGNED_INT);var s=t$Y.createIndexBuffer({context:t,typedArray:r.indicesTypedArray,usage:A$19.STATIC_DRAW,indexDatatype:a});s.vertexArrayDestroyable=!1,this.indexBuffer=s,this.attributes=i;var l=this._mapPass[r.materialCode]||_0x21d1b1.Default;this._arrIndexPackage[0]=null,!0===l._bTransparentSorting&&(n=Le$s.TRANSLUCENT);var u=W$18.TRIANGLES;switch(r.primitiveType){case 1:u=W$18.POINTS;break;case 2:u=W$18.LINES;break;case 4:u=W$18.TRIANGLES}n=e._isOverLay?Le$s.OVERLAY_AGAINST_DEPTH:n;var c=new i$_({primitiveType:u,boundingVolume:this._boundingVolume,pass:n,owner:this,cull:!0}),h=e._context.uniformState;c.addUniformBuffer(h._sceneUBO),c.addUniformBuffer(h._lightUBO),c.addUniformBuffer(this._materialUBO),e._shadowType===_0x381f49.ALL||e._shadowType===_0x381f49.SELECTION?(c.castShadows=!0,c.receiveShadows=!0):(c.castShadows=!1,c.receiveShadows=!1),c.pickId="vPickColor",c.instanceCount=this._ownerGroup.instances.length,c.vertexArray=new c$12({context:t,attributes:i,indexBuffer:s});var d=new s$U({name:"S3MInstanceCollectionVertex",sources:[_0x3e7b8e]}),f=new s$U({name:"S3ModelFP",sources:[_0x451393]});0===this._collection._supportCompressType&&f.defines.push("FLIP_Y"),e$2b(this._attributeLocations.aColor)&&d.defines.push("VertexColor"),l._textures.length>0&&e$2b(this._attributeLocations.aTexCoord0)&&(d.defines.push("TEXTURE"),f.defines.push("TEXTURE")),e$2b(this._attributeLocations.aNormal)&&(d.defines.push(Y$H.HAS_NORMAL),f.defines.push(Y$H.HAS_NORMAL)),e$2b(e._volume)&&(d.defines.push(Y$H.VOLUME),f.defines.push(Y$H.VOLUME),e._volume.hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(d.defines.push(Y$H.VOLUME2),f.defines.push(Y$H.VOLUME2))),this._collection.clampToObject&&(d.defines.push("ClampObject"),f.defines.push("ClampObject"));const p=e._frameState.lightSource;e$2b(p)&&(f.defines.push("MAX_POINT_LIGHT_COUNT "+s$I.MaxPointLightCount),f.defines.push("MAX_SPOT_LIGHT_COUNT "+s$I.MaxSpotLightCount),f.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$I.MaxDirectionLightCount),p.directionalLight.length>0&&f.defines.push(Y$H.HAS_DIR_LIGHTS),p._visibleLightList[_0x1d9df9.POINT].length>0&&f.defines.push(Y$H.HAS_POINT_LIGHTS),p._visibleLightList[_0x1d9df9.SPOT].length>0&&f.defines.push(Y$H.HAS_SPOT_LIGHTS),p.hemisphereLight.length>0&&f.defines.push(Y$H.HAS_HEMISPHERE_LIGHTS));this._ownerGroup.instances.length>0&&e$2b(this._ownerGroup.instances.values[0].localTransform)&&d.defines.push("LocalTransform");var _=this._ownerGroup.url;(l._usePBR||e$2b(e._PBRMaterialParams[_])&&e._PBRMaterialParams[_].roughness>0)&&(f.defines.push(Y$H.BRDF),(l.baseColorTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_].baseColorTextureIndex>-1&&e$2b(e._PBRMaterialParams[_].baseTexture))&&f.defines.push(Y$H.HAS_BASE_TEXTURE),(l.uNormalTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_].normalTextureIndex>-1&&e$2b(e._PBRMaterialParams[_].normalTexture))&&f.defines.push(Y$H.HAS_NORMAL_TEXTURE),(l.emissiveTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_].emissionTextureIndex>-1)&&f.defines.push(Y$H.HAS_EMISSIVE_TEXTURE),(l.metallicRoughnessTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_]._metallicRoughnessTextureIndex>-1)&&f.defines.push(Y$H.HAS_MetallicRoughness_TEXTURE),(l.occlusionTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_]._occlusionTextureIndex>-1)&&f.defines.push(Y$H.HAS_OCCLUSION_TEXTURE),(e$2b(e._frameState.specularEnvironmentMaps)||e$2b(e._frameState.hdrEnvMap))&&(f.defines.push(Y$H.IBL),e$2b(e._frameState.specularEnvironmentMaps)&&f.defines.push(Y$H.KtxEnvMap)),e$2b(l._alphaMode)&&l._alphaMode===_0x5f0e97.MASK&&f.defines.push(Y$H.MASK)),l.appendPBRMacroToShader(d,f);var m=e$2b(this._attributeLocations.aNormal);c.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:f,attributeLocations:this._attributeLocations});var g=l._diffuseColor,x=l._diffuseColor,v=l._specularColor,y=l._shininess;_0x284e0c(c,{texture:l._textures[0],hasNormal:m,ambientColor:g,diffuseColor:x,specularColor:v,shininess:y,layer:this._collection,geoMat:this._geoMatrix,groupName:_},l),this._texture=l._textures[0],this._colorCommand=c,this._vertexPackage=void 0,this._arrIndexPackage.length=0,this.createColorRenderState(this._ownerGroup,this._collection._clampToObject),this._collection._clampToObject&&(c.pass=Le$s.ClampObject,this.createClampCommand())},_0x37e656.prototype.appendProgramDefine=function(e,t,i,n){var r=this._collection._context,o=n?this._profileCommand:this._colorCommand;if(e$2b(o)){var a=o.shaderProgram.fragmentShaderSource,s=o.shaderProgram.vertexShaderSource;e&&_0x567cba(s,i),t&&_0x567cba(a,i),o.shaderProgram.destroy(),o.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:this._attributeLocations}),e$2b(this._stencilCommand)&&(this._stencilCommand.shaderProgram=o.shaderProgram)}},_0x37e656.prototype.removeProgramDefine=function(e,t,i,n){var r=this._collection._context,o=n?this._profileCommand:this._colorCommand;if(e$2b(o)){var a=o.shaderProgram.fragmentShaderSource,s=o.shaderProgram.vertexShaderSource;e&&_0x238861(s,i),t&&_0x238861(a,i),o.shaderProgram.destroy(),o.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:this._attributeLocations})}},_0x37e656.prototype.createColorRenderState=function(e,t){if(t){var i=_0x187e60.createClampObjectColorRenderState();this._colorCommand.renderState=d$1m.fromCache(i)}else this._colorCommand.renderState=d$1m.fromCache({cull:{enabled:e.cullEnabled,face:e.cullFace},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND})},_0x37e656.prototype.createClampCommand=function(){if(!e$2b(this._stencilCommand)){var e=_0x187e60.createClampObjectStencilRenderState(),t=e$2b(this._profileCommand)?this._profileCommand:this._colorCommand,i=i$_.shallowClone(t);i.renderState=d$1m.fromCache(e),this._stencilCommand=i}},_0x37e656.prototype.createProfileCommand=function(e){if(!e$2b(this._profileCommand)){var t=this._colorCommand,i=t.shaderProgram.vertexShaderSource.clone(),n=t.shaderProgram.fragmentShaderSource.clone();i.defines.push("ClampObject"),n.defines.push("ClampObject"),i.defines.push("PROFILE"),n.defines.push("PROFILE");var r=e._context;r.drawBuffers&&r.colorBufferFloat&&r.depthTexture&&n.defines.push("MRT");var o=i$_.shallowClone(t);o.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._profileCommand=o}},_0x37e656.prototype.createSpatialQueryCommand=function(e){if(!e$2b(this._spatialQueryCommand)){var t=this._colorCommand,i=t.shaderProgram.vertexShaderSource.clone(),n=t.shaderProgram.fragmentShaderSource.clone();i.defines.push("SQRESULT"),n.defines.push("SQRESULT"),e._frameState.useLogDepth&&n.defines.push("LOG_DEPTH");var r=i$_.shallowClone(t);r.uniformMap.uFrontDepthTexture=function(){return e._sqTextures[0]},r.uniformMap.uBackDepthTexture=function(){return e._sqTextures[1]},r.uniformMap.uFrontColorTexture=function(){return e._sqTextures[2]},r.uniformMap.uSQMode=function(){return e._sqMode},r.shaderProgram=r$13.fromCache({context:e._context,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._spatialQueryCommand=r}},_0x37e656.prototype.destroy=function(){for(var e in this._mapPass)this._mapPass.hasOwnProperty(e)&&(this._mapPass[e]=this._mapPass[e]&&!this._mapPass[e].isDestroyed()&&this._mapPass[e].destroy());this._mapPass=void 0;var t=this._colorCommand;e$2b(t)&&(t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy(),this._colorCommand=void 0),e$2b(t=this._stencilCommand)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),this._stencilCommand=void 0),e$2b(t=this._profileCommand)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),this._profileCommand=void 0),this._vertexPackage=null,this._arrIndexPackage.length=0},_0x448857.prototype._setSQTextures=function(e){this._sqTextures=e},_0x448857.prototype._setSQMode=function(e){this._sqMode=e},_0x448857.prototype._getAllColorCommand=function(){return this._allColorCommand},_0x448857.prototype.setPBRMaterialFromJSON=function(e,t){if(this._pbrParameter===je$g.NONE){var i=this;e in i._PBRMaterialParams||(i._PBRMaterialParams[e]={metallic:0,roughness:0,baseColorFactor:new e$29(1,1,1,1),baseColorTextureIndex:-1,baseTexture:void 0,emissionFactor:o$1p.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseUri:""}),i._PBRMaterialParams[e].baseUri=i$1a(t),u$Q(t).then((function(t){var n=t.material,r=n.pbrMetallicRoughness,o=n.textureunitstates;if(i._PBRMaterialParams[e].baseColorFactor=e$2b(r.baseColor)?e$29.fromElements(r.baseColor.x,r.baseColor.y,r.baseColor.z,r.baseColor.w):i._PBRMaterialParams[e].baseColorFactor,i._PBRMaterialParams[e].baseColorTextureIndex=e$2b(r.baseColorTextureIndex)?r.baseColorTextureIndex:-1,i._PBRMaterialParams[e].emissionFactor=e$2b(r.emissiveFactor)?o$1p.fromElements(r.emissiveFactor.x,r.emissiveFactor.y,r.emissiveFactor.z):o$1p.UNIT_XYZ,i._PBRMaterialParams[e].emissionTextureIndex=e$2b(r.emissiveTextureIndex)?r.emissiveTextureIndex:i._PBRMaterialParams[e].emissionTextureIndex,i._PBRMaterialParams[e].metallic=e$2b(r.metallicFactor)?r.metallicFactor:i._PBRMaterialParams[e].metallic,i._PBRMaterialParams[e].roughness=e$2b(r.roughnessFactor)?r.roughnessFactor:i._PBRMaterialParams[e].roughness,i._PBRMaterialParams[e].occlusionTextureIndex=e$2b(r.occlusionTextureIndex)?r.occlusionTextureIndex:-1,i._PBRMaterialParams[e].normalTextureIndex=e$2b(r.normalTextureIndex)?r.normalTextureIndex:-1,-1!==r.baseColorTextureIndex){var a=i._PBRMaterialParams[e].baseUri+o[r.baseColorTextureIndex].textureunitstate.url;_0x1a2aa1(i._context,a,i._PBRMaterialParams[e],"baseTexture")}if(-1!==r.normalTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.normalTextureIndex].textureunitstate.url;_0x1a2aa1(i._context,a,i._PBRMaterialParams[e],"normalTexture")}if(-1!==r.emissiveTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.emissiveTextureIndex].textureunitstate.url;_0x1a2aa1(i._context,a,i._PBRMaterialParams[e],"emissiveTexture")}if(-1!==r.metallicRoughnessTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.metallicRoughnessTextureIndex].textureunitstate.url;_0x1a2aa1(i._context,a,i._PBRMaterialParams[e],"metallicRoughnessTexture")}if(-1!==r.occlusionTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.occlusionTextureIndex].textureunitstate.url;_0x1a2aa1(i._context,a,i._PBRMaterialParams[e],"occlusionTexture")}_0x1f8f59(i,e)}))}},_0x448857.prototype.removePBRMaterial=function(e){delete this._PBRMaterialParams[e],_0x1f8f59(this,e)};var _0x2757fb=(_0x5c282d=!0,function(e,t){var i=_0x5c282d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c282d=!1,i}),_0x371605=_0x2757fb(void 0,(function(){return _0x371605.toString().search("(((.+)+)+)+$").toString().constructor(_0x371605).search("(((.+)+)+)+$")})),_0x5c282d;function _0x4d0d03(e){if(!e$2b(e))throw new t$16("scene are required.");if(!e.context.depthTexture)throw new t$16("the depth buffer is not supported.");this._scene=e,this._name="",this._frameState=void 0,this._isInitlized=!1,this._depthDirty=!1,this._bufferDirty=!1,this._updateIDs=!1,this._disjointIDs=[],this._intersectsIDs=[],this._ids=[],this._textures=[],this._depthBuffers=[],this._resultBuffer=void 0,this._disjointBuffer=void 0,this._worldMatrix=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._matDepthView=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._matDepthProject=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._boundingSphere=new i$1c,this._depthCommands=[],this._colorCommand=void 0,this._clearCommand=new t$X({color:new e$1U(0,0,0,0),stencil:0,depth:1}),this._geometry=void 0,this._layers=[],this._fillColor=new e$1U(1,1,0,.5),this._outlineColor=new e$1U(1,0,0,1),this._positionMode=j$X.Disjoint,this._fillStyle=fr$2.Fill,this._positionMode=j$X.Disjoint,this._beQueryCollection=void 0,this._queryCollection=void 0,this._allS3MColorCommand=[],this._profile=!1,this._clipLayers=new e$1N,this._curFrameNumber=-1,this._width=1,this._height=1}function _0x3c111a(e){e$2b(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&!e._colorCommand.vertexArray.isDestroyed()&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&!e._colorCommand.shaderProgram.isDestroyed()&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0);for(var t=0;t<e._depthCommands.length;t++)e._depthCommands[t].vertexArray=e._depthCommands[t].vertexArray&&!e._depthCommands[t].vertexArray.isDestroyed()&&e._depthCommands[t].vertexArray.destroy(),e._depthCommands[t].shaderProgram=e._depthCommands[t].shaderProgram&&!e._depthCommands[t].shaderProgram.isDestroyed()&&e._depthCommands[t].shaderProgram.destroy(),e._depthCommands[t]=void 0;e._depthCommands=[],e$2b(e._outlineCommand)&&(e._outlineCommand.vertexArray=e._outlineCommand.vertexArray&&!e._outlineCommand.vertexArray.isDestroyed()&&e._outlineCommand.vertexArray.destroy(),e._outlineCommand.shaderProgram=e._outlineCommand.shaderProgram&&!e._outlineCommand.shaderProgram.isDestroyed()&&e._outlineCommand.shaderProgram.destroy(),e._outlineCommand=void 0)}function _0x5843d7(e){for(var t=0;t<e._textures.length;t++)e$2b(e._textures[t])&&(e._textures[t]=e._textures[t]&&e._textures[t].destroy(),e._textures[t]=null);e._textures=[]}function _0xf68f99(e){e$2b(e._frameState)&&(e$2b(e._disjointBuffer)&&delete e._frameState._framebufferList.sqDisjoinTexture,e$2b(e._resultBuffer)&&delete e._frameState._framebufferList.sqResultTexture,e._frameState=void 0),e._disjointBuffer=e._disjointBuffer&&e._disjointBuffer.destroy(),e._resultBuffer=e._resultBuffer&&e._resultBuffer.destroy();for(var t=0;t<e._depthBuffers.length;t++)e._depthBuffers[t]=e._depthBuffers[t]&&e._depthBuffers[t].destroy();e._depthBuffers=[]}function _0x592671(e){return!!e$2b(e)&&(e.geoType===P$U.GEOCONE||e.geoType===P$U.GEOBOX||e.geoType===P$U.GEOCYLINDER||e.geoType===P$U.GEOSPHERE||e.geoType===P$U.GEOREGION3D||e.geoType===P$U.GEOELLIPSOID||e.geoType===P$U.GEOMODEL3D||e instanceof y$S)}function _0x52ad99(e,t,i){_0x3c111a(e);var n=t.drawingBufferWidth,r=t.drawingBufferHeight,o=!0;if(e._textures.length>0){var a=e._textures[0];o=n!=a.width||r!=a.height}o&&(_0xf68f99(e),_0x5843d7(e),_0x1e5c3b(e,t,i),_0x37ae11(e,t)),_0x2a4da7(e,t,i);for(var s=0;s<e._layers.length;s++)e._layers[s]._spatialQueryEnable=!0,e._layers[s]._setSQTextures(e._textures),e._layers[s].selectEnabled=!0;s=0;for(var l=e._clipLayers.length;s<l;s++){e._clipLayers.values[s]._setSQTextures(e._textures)}e._isInitlized=!0}function _0x1e5c3b(e,t,i){var n=t.drawingBufferWidth,r=t.drawingBufferHeight;if(0===e._textures.length)for(var o=0;o<3;o++){var a=new t$V({context:t,width:n,height:r,pixelFormat:V$10.UNSIGNED_BYTE,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})});e._textures.push(a)}var s=new t$L(t);s.isUpdate=!1,i._framebufferList.sqResultTexture=s,e._resultBuffer=s;var l=new t$L(t);l.isUpdate=!1,i._framebufferList.sqDisjoinTexture=l,e._disjointBuffer=l}function _0x2a4da7(e,t,i){if(!e$2b(e._colorCommand)||!e$2b(e._outlineCommand))if(_0x3c111a(e),e._allS3MColorCommand.length>0)for(var n=0;n<e._allS3MColorCommand.length;n++)_0x1d6f0b(e,t,i,e._allS3MColorCommand[n]);else _0x537076(e,t,i)}function _0x537076(e,t,i){var n=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$s.TRANSLUCENT,owner:e}),r={aPosition:0,aNormal:1},o=new s$U({sources:[_0x49106d]});p$1d.equals(e._worldMatrix,p$1d.IDENTITY)&&o.defines.push("USE_RelativeOrigin"),n.vertexArray=e._geometry.getVertexArray(t),n.shaderProgram=r$13.fromCache({name:"spatialQuerySimple",context:t,vertexShaderSource:o,fragmentShaderSource:_0x1b19d0,attributeLocations:r}),n.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),n.uniformMap={uDiffuseColor:function(){return e._fillColor}},e._colorCommand=n,_0x1d6f0b(e,t,i,n);var a=new i$_({primitiveType:W$18.LINES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$s.TRANSLUCENT,owner:e});a.vertexArray=e._geometry.getOutlineVertexArray(t),a.shaderProgram=r$13.fromCache({name:"spatialQueryOutline",context:t,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:r}),a.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),a.uniformMap={uDiffuseColor:function(){return e._outlineColor}},e._outlineCommand=a}function _0x1d6f0b(e,t,i,n){var r=n.shaderProgram.vertexShaderSource.clone(),o=new s$U({name:"SpatialQueryFp",sources:[_0x594de8]});if(o.defines.push("DEPTH"),i.useLogDepth){r.defines.push("LOG_DEPTH");for(var a=r.sources,s=0;s<a.length;++s)a[s]=s$U.replaceMain(a[s],"czm_log_depth_main");a.push("\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n"),o.defines.push("LOG_DEPTH")}var l=n.shaderProgram._attributeLocations,u=i$_.shallowClone(n);u.renderState=d$1m.fromCache({depthTest:{enabled:!0},cull:{enabled:!0,face:de$x.BACK}}),u.shaderProgram=r$13.fromCache({name:"spatialQueryFrontDepth",context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:l}),u.framebuffer=e._depthBuffers[0],e._depthCommands.push(u);var c=i$_.shallowClone(n);c.renderState=d$1m.fromCache({depthTest:{enabled:!0},cull:{enabled:!0,face:de$x.FRONT}}),c.shaderProgram=r$13.fromCache({name:"spatialQueryBackDepth",context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:l}),c.framebuffer=e._depthBuffers[1],e._depthCommands.push(c);var h=i$_.shallowClone(n),d=new s$U({name:"SpatialQueryFp",sources:[_0x594de8]});d.defines.push("COLOR"),h.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1}}),h.shaderProgram=r$13.fromCache({name:"spatialQueryFrontColor",context:t,vertexShaderSource:r,fragmentShaderSource:d,attributeLocations:l}),h.framebuffer=e._depthBuffers[2],e._depthCommands.push(h)}function _0x37ae11(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=new t$W({context:t,colorTextures:[e._textures[0]],destroyAttachments:!1,depthStencilTexture:new t$V({context:t,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})});e._depthBuffers.push(r);var o=new t$W({context:t,colorTextures:[e._textures[1]],destroyAttachments:!1,depthStencilTexture:new t$V({context:t,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})});e._depthBuffers.push(o);var a=new t$W({context:t,colorTextures:[e._textures[2]],destroyAttachments:!1,depthStencilTexture:new t$V({context:t,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})});e._depthBuffers.push(a)}function _0x574b56(e,t,i,n){if(!e$2b(i))return Promise.resolve(!1);var r=[];return _0x4a4337(e._scene._context,i,e._layers,n,r).then((t=>{if(e._positionMode===j$X.Intersects)for(var i=Object.keys(n),o=0;o<i.length;o++){var a=r[i[o]],s=e._layers[a],l=n[i[o]];l.length>0&&s.setSelection(l)}return Promise.resolve(t)}))}function _0x4a4337(e,t,i,n,r){if(!e$2b(t)||!t.isUpdate)return Promise.resolve(!1);var o=t.renderTexture._width,a=t.renderTexture._height;return e.readPixelsAsync({framebuffer:t.renderTexture._fb,x:0,y:0,width:o,height:a}).then((t=>{for(var s=[],l=0;l<i.length;l++){var u=_0x1b4f72(_=i[l].id);r[u]=l,s.push(u),n[u]=[]}for(var c=0;c<o;c++)for(var h=0;h<a;h++){var d=4*(h*o+c);if(0!==t[d]||0!==t[d+1]||0!==t[d+2]){var f=e$1U.byteToRgba(t[d],t[d+1],t[d+2],t[d+3]),p=e.getObjectByPickId(f);if(e$2b(p)){var _=p.primitive.id,m=p.id,g=(u=_0x1b4f72(_),s.indexOf(u));if(!(g<0))if(i[r[u]],0==n[u].length){var x=[];x.push(m),n[u]=x}else(g=n[u].indexOf(m))<0&&n[u].push(m)}}}return Promise.resolve(!0)}))}function _0x1b4f72(e){return"id_"+e}function _0x229894(e,t,i){if(e._profile){e$2b(e._beQueryCollection)&&e._beQueryCollection._setSQMode(e._positionMode);for(var n=0,r=e._clipLayers.length;n<r;n++){e._clipLayers.values[n]._setSQMode(e._positionMode)}}else e._frameState=i,0!==e._textures.length&&e._bufferDirty&&!e._depthDirty&&(e._resultBuffer.isUpdate=!0,e._resultBuffer._beginFunc=function(t){for(var i=0;i<e._layers.length;i++)e._layers[i]._setSQMode(j$X.Intersects)},e._resultBuffer._endFunc=function(t){e._intersectsIDs=[],_0x574b56(e,t,e._resultBuffer,e._intersectsIDs).then((t=>{e._updateIDs=!0})),e._resultBuffer.isUpdate=!1},e._positionMode!==j$X.Intersects&&(e._disjointBuffer.isUpdate=!0,e._disjointBuffer._beginFunc=function(t){for(var i=0;i<e._layers.length;i++)e._layers[i]._setSQMode(j$X.Disjoint)},e._disjointBuffer._endFunc=function(t){e._disjointIDs=[],_0x574b56(e,t,e._disjointBuffer,e._disjointIDs).then((t=>{_0x5f0c57(e),_0x37f7b0(e),e._updateIDs=!0})),e._disjointBuffer.isUpdate=!1}),e._bufferDirty=!1)}function _0x5f0c57(e){if(e._positionMode===j$X.Disjoint)for(var t=Object.keys(e._disjointIDs),i=Object.keys(e._intersectsIDs),n=0;n<e._layers.length;n++){var r=e._layers[n],o=_0x1b4f72(r.id);if(!(t.indexOf(o)<0)){if(i.indexOf(o)<0){r.setSelection(e._disjointIDs[o]);continue}for(var a=e._intersectsIDs[o],s=e._disjointIDs[o],l=0;l<a.length;l++){var u=s.indexOf(a[l]);u>=0&&s.splice(u,1)}r.setSelection(s)}}}function _0x37f7b0(e){if(e._positionMode===j$X.Contains)for(var t=Object.keys(e._disjointIDs),i=Object.keys(e._intersectsIDs),n=0;n<e._layers.length;n++){var r=e._layers[n],o=_0x1b4f72(r.id);if(!(i.indexOf(o)<0)){if(t.indexOf(o)<0){r.setSelection(e._intersectsIDs[o]);continue}for(var a=e._intersectsIDs[o],s=e._disjointIDs[o],l=0;l<s.length;l++){var u=a.indexOf(s[l]);u>=0&&a.splice(u,1)}r.setSelection(a)}}}_0x371605(),Object.defineProperties(_0x4d0d03.prototype,{geometry:{get:function(){return this._geometry},set:function(e){if(LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),this._geometry&&this._geometry.type===P$U.GEOMODEL3D&&(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[],this._queryCollection=void 0),this._geometry=e,this._depthDirty=!0,this._isInitlized=!1,this._geometry.type===P$U.GEOMODEL3D)e$2b(this._queryCollection)&&(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[]),this._queryCollection=new _0x448857(this._scene.context),this._queryCollection._needToRender=!1,this._requestModel(e);else if(e$2b(this._geometry._shape)){var t=new y$S({geometryInstances:new d$1o({attributes:{color:new o$16},geometry:this._geometry}),appearance:new t$R({translucent:!1})});this._scene.primitives.add(t),this._geometry=t}}},layers:{get:function(){return this._layers},set:function(e){for(var t=0;t<this._layers.length;t++)this._layers[t]._spatialQueryEnable=!1;this._layers=e,this._bufferDirty=!0}},fillColor:{get:function(){return this._fillColor},set:function(e){this._fillColor=e}},outlineColor:{get:function(){return this._outlineColor},set:function(e){this._outlineColor=e}},positionMode:{get:function(){return this._positionMode},set:function(e){this._positionMode=e,this._bufferDirty=!0}},fillStyle:{get:function(){return this._fillStyle},set:function(e){this._fillStyle=e}}}),_0x4d0d03.prototype.destroy=function(){return LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),_0xf68f99(this),_0x3c111a(this),_0x5843d7(this),e$2b(this._geometry)&&this._geometry.type===P$U.GEOMODEL3D?(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[]):this._beQueryCollection=void 0,this._profile=!1,this._scene._analyst3D.remove(this._name,!0),i$10(this)},_0x4d0d03.prototype.clear=function(){LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),this._scene._analyst3D.remove(this._name,!1)},_0x4d0d03.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),""===this._name?(this._name="spatialQuery3D"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this)):e$2b(this._scene._analyst3D.find(this._name))||this._scene._analyst3D.add(this)},_0x4d0d03.prototype.update=function(e,t,i){if(this._curFrameNumber!==t.frameNumber&&(this._curFrameNumber=t,!t._fboState.enabled&&e$2b(this._geometry)&&(0!==this._clipLayers.length||0!==this._layers.length||e$2b(this._beQueryCollection)))){if(!_0x592671(this._geometry))throw new t$16("the geometry type is not supported.");var n=e.drawingBufferWidth,r=e.drawingBufferHeight;if((this._width!==n||this._height!==r)&&(this._geometry.isGeometryDirty=!0,this._width=n,this._height=r),this._geometry.isGeometryDirty&&(this._isInitlized=!1),this._geometry.type===P$U.GEOMODEL3D){if(this._queryCollection.update(t),this._allS3MColorCommand=this._queryCollection._getAllColorCommand(),0===this._allS3MColorCommand.length)return}else if(this._geometry instanceof y$S){if(this._allS3MColorCommand=this._geometry._colorCommands,0===this._allS3MColorCommand.length)return;this._geometry._state=_0x142e29.FAILED}else{p$1d.equalsEpsilon(this._worldMatrix,this._geometry.modelMatrix,e$2a.EPSILON8)?0==this._boundingSphere.radius&&(this._boundingSphere=this.geometry._getGeometry().boundingSphere):(p$1d.clone(this._geometry.modelMatrix,this._worldMatrix),i$1c.transform(this.geometry._getGeometry().boundingSphere,this._worldMatrix,this._boundingSphere),this._depthDirty=!0)}this._isInitlized||(_0x52ad99(this,e,t),this._geometry.isGeometryDirty=!1),this._profile||this._updateTextures(e,t),_0x229894(this,e,t),e$2b(this._colorCommand)&&(this.fillStyle===fr$2.Fill||this.fillStyle===fr$2.Fill_And_WireFrame)&&!this._profile&&i.push(this._colorCommand),e$2b(this._outlineCommand)&&(this.fillStyle===fr$2.WireFrame||this.fillStyle===fr$2.Fill_And_WireFrame)&&i.push(this._outlineCommand)}},_0x4d0d03.prototype.getQueryIDs=function(){if(LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),!this._updateIDs)return this._ids;var e=o$1l.defer();this._ids=[],this._bufferDirty=!0,this._resultBuffer.isUpdate=!0,this._scene.initializeFrame();var t=this;return this._scene._renderForQueryAsync().then((function(){for(var i=new e$1N;;){for(var n=!1,r=0;r<t._layers.length;r++){var o=(u=t._layers[r]).getSelection();if(!(o.length<=0)){if(i.contains(u.id)){var a;a=o.concat(i.get(u.id).ids),o=a}var s={layerName:u.name,layerIndex:r,ids:o};i.set(u.id,s),n=!0,u.releaseSelection(),u.setObjsVisible(o,!1)}}if(!n){t._bufferDirty=!1,t._resultBuffer.isUpdate=!1;break}}for(var l=0;l<i.values.length;l++){var u;(u=t._layers[i.values[l].layerIndex]).setObjsVisible([],!1);var c={layerName:i.values[l].layerName,ids:i.values[l].ids};t._ids.push(c)}t._updateIDs=!1,e.resolve(t._ids)})),e.promise},_0x4d0d03.prototype._requestModel=function(){var e=this,t=this._geometry.geoModel;if(e$2b(t)){var i=new Uint8Array(t.model);this._queryCollection.add(this._name,{position:o$1p.fromDegrees(t.position.x,t.position.y,t.position.z),id:this._dataIndex,color:this._fillColor,scale:new o$1p(t.scaleX,t.scaleY,t.scaleZ)},i.buffer)}else if(""!==this._geometry.geoFilePath){var n=this._geometry.geoFilePath,r=n.replace(/\?returnContent=.*$/,"");".json"===(r=r.substring(r.length-5).toLowerCase())?u$Q(this._geometry.geoFilePath).then((function(t){if(null!=t.geometry){e._geometry.geoModel=t.geometry;var i=new Uint8Array(t.geometry.model);e._queryCollection.add(e._name,{position:o$1p.fromDegrees(t.geometry.position.x,t.geometry.position.y,t.geometry.position.z),id:e._dataIndex,color:e._fillColor,scale:new o$1p(t.geometry.scaleX,t.geometry.scaleY,t.geometry.scaleZ)},i.buffer)}})):o$10(n).then((function(t){var i=new DataView(t),r=0,o=i.getInt32(r,!0);r+=4;var a=a$K(new Uint8Array(t,r,o)),s=JSON.parse(a).geometry;if(null!=s){r+=o;var l=i.getInt32(r,!0);r+=4;var u,c,h=[];for(u=0;u<l;u++)c=i.getInt32(r,!0),h.push(c),r+=4;var d=[];for(u=0;u<l;u++){if(0===(c=h[u]))d.push(null);else{var f=new Uint8Array(t,r,c);d.push(new Uint8Array(f).buffer)}r+=c}e._queryCollection.add(n,{position:o$1p.fromDegrees(s.position.x,s.position.y,s.position.z),id:e._dataIndex,scale:new o$1p(s.scaleX,s.scaleY,s.scaleZ),hpr:i$15.fromDegrees(-s.rotationZ,s.rotationX,s.rotationY)},d[0],!1)}}))}},_0x4d0d03.prototype._updateTextures=function(e,t){if(this._curFrameNumber!==t.frameNumber&&(this._curFrameNumber=t,!(!this._depthDirty||e$2b(this._resultBuffer)&&this._resultBuffer.isUpdate||e$2b(this._disjointBuffer)&&this._disjointBuffer.isUpdate)||this._profile)){for(var i=t.camera,n=0;n<this._textures.length;n++)this._clearCommand.framebuffer=this._depthBuffers[n],this._clearCommand.execute(e),this._depthCommands[n].execute(e);e$2b(this._beQueryCollection)&&3===this._textures.length&&this._beQueryCollection._setSQTextures(this._textures),this._clearCommand.framebuffer=void 0,p$1d.clone(i.viewMatrix,this._matDepthView),p$1d.clone(e.uniformState.projection,this._matDepthProject);for(n=0;n<this._layers.length;n++)this._layers[n]._setSQViewPrjMatrix(this._matDepthView,this._matDepthProject);this._depthDirty=!1,this._bufferDirty=!0}};var _0x93ec6f=(_0xb56518=!0,function(e,t){var i=_0xb56518?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb56518=!1,i}),_0x4d1f3f=_0x93ec6f(void 0,(function(){return _0x4d1f3f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d1f3f).search("(((.+)+)+)+$")})),_0xb56518;_0x4d1f3f();var _0x69adc8="\nattribute vec4 aPosition;\nuniform mat4 uTexWorldViewProjMatrix0;\nuniform mat4 uTexWorldViewProjMatrix1;\nuniform mat4 uTexWorldViewProjMatrix2;\nuniform mat4 uTexWorldViewProjMatrix3;\nuniform mat4 uTexWorldViewProjMatrix4;\n\nuniform float uRadius;\n\nvarying vec4 clip_pos0;\nvarying vec4 clip_pos1;\nvarying vec4 clip_pos2;\nvarying vec4 clip_pos3;\nvarying vec4 clip_pos4;\n\n// vec4 GetUV(const mat4 renderTextureMatrix)\n// {\n// \tvec4 texCoord = renderTextureMatrix * vec4(vexPos.xyz, 1.0);\n// \ttexCoord = texCoord / texCoord.w;\n// \ttexCoord.xyz = texCoord.xyz * 0.5 + 0.5;\n// \treturn texCoord;\n// }\n\nvoid main()\n{\t\n vec3 newPos = vec3(aPosition.xyz);\n\tnewPos = newPos * uRadius;\n\tvec4 vexPos = vec4(newPos.xyz, 1.0);\n\tclip_pos0 = uTexWorldViewProjMatrix0 * vexPos;\n\tclip_pos1 = uTexWorldViewProjMatrix1 * vexPos;\n\tclip_pos2 = uTexWorldViewProjMatrix2 * vexPos;\n\tclip_pos3 = uTexWorldViewProjMatrix3 * vexPos;\n\tclip_pos4 = uTexWorldViewProjMatrix4 * vexPos;\n\n\tgl_Position = czm_modelViewProjection * vexPos;\n\t\n}",_0x1f2229=(_0x119524=!0,function(e,t){var i=_0x119524?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x119524=!1,i}),_0x3df629=_0x1f2229(void 0,(function(){return _0x3df629.toString().search("(((.+)+)+)+$").toString().constructor(_0x3df629).search("(((.+)+)+)+$")})),_0x119524;_0x3df629();var _0xefb578="\nuniform sampler2D uDepthMap0;\nuniform sampler2D uDepthMap1;\nuniform sampler2D uDepthMap2;\nuniform sampler2D uDepthMap3;\nuniform sampler2D uDepthMap4;\nuniform int uDomeType;\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\n\n\nvarying vec4 clip_pos0;\nvarying vec4 clip_pos1;\nvarying vec4 clip_pos2;\nvarying vec4 clip_pos3;\nvarying vec4 clip_pos4;\n\nbool IsValidNDC(vec4 ndc)\n{\n\tfloat minNDCZ = -1.0;\n#ifdef WEBGPU\n\tminNDCZ = 0.0;\n#endif\n\tif ((ndc.x<=1.0)&&(ndc.x>=-1.0)&&(ndc.y<=1.0)&&(ndc.y>=-1.0)&&(ndc.z<=1.0)&&(ndc.z>=minNDCZ))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}\n\nbool IsVisible(float depth, vec4 ndc)\n{\n bool isVisible = true;\n\tfloat tolerance = 0.00001;\n\tif(depth < tolerance)\n {\n return isVisible;\n }\n#ifdef WEBGPU\n\tfloat compareNDCZ = depth;\n#else\n\tfloat compareNDCZ = depth * 2.0 - 1.0;\n#endif\n\tif(ndc.z > (compareNDCZ + tolerance))\n {\n isVisible = false;\n }\n\treturn isVisible;\n}\n\nvoid main()\n{\n\tvec4 ndc0 = clip_pos0 / clip_pos0.w;\n\tvec4 ndc1 = clip_pos1 / clip_pos1.w;\n\tvec4 ndc2 = clip_pos2 / clip_pos2.w;\n\tvec4 ndc3 = clip_pos3 / clip_pos3.w;\n\tvec4 ndc4 = clip_pos4 / clip_pos4.w;\n\n\tvec2 texCoord0 = ndc0.xy * 0.5 + 0.5;\n\tvec2 texCoord1 = ndc1.xy * 0.5 + 0.5;\n\tvec2 texCoord2 = ndc2.xy * 0.5 + 0.5;\n\tvec2 texCoord3 = ndc3.xy * 0.5 + 0.5;\n\tvec2 texCoord4 = ndc4.xy * 0.5 + 0.5;\n\n\tfloat depth0 = czm_unpackDepth(texture2D(uDepthMap0, texCoord0.xy));\n\tfloat depth1 = czm_unpackDepth(texture2D(uDepthMap1, texCoord1.xy));\n\tfloat depth2 = czm_unpackDepth(texture2D(uDepthMap2, texCoord2.xy));\n\tfloat depth3 = czm_unpackDepth(texture2D(uDepthMap3, texCoord3.xy));\n\tfloat depth4 = czm_unpackDepth(texture2D(uDepthMap4, texCoord4.xy));\n\t\n\tbool isVisible = true;\n\tif(IsValidNDC(ndc0))\n\t{\n\t\tisVisible = IsVisible(depth0, ndc0);\n\t}\n\telse if(IsValidNDC(ndc1))\n\t{\n\t\tisVisible = IsVisible(depth1, ndc1);\n\t}\n\telse if(IsValidNDC(ndc2))\n\t{\n\t\tisVisible = IsVisible(depth2, ndc2);\n\t}\n\telse if(IsValidNDC(ndc3))\n\t{\n\t\tisVisible = IsVisible(depth3, ndc3);\n\t}\n\telse if(IsValidNDC(ndc4))\n\t{\n\t\tisVisible = IsVisible(depth4, ndc4);\n\t}\n\n\tif(uDomeType == 0)\n\t{\n if (!isVisible)\n {\n discard;\n }\n else\n {\n gl_FragColor = uVisibleAreaColor;\n }\n\t}\n\telse if(uDomeType == 1)\n\t{\n\t\tif (!isVisible)\n\t\t{\n\t\t\tgl_FragColor = uHiddenAreaColor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdiscard;\n\t\t}\n\t}\n\telse\n\t{\n\t if (!isVisible)\n\t\t{\n\t\t\tgl_FragColor = uHiddenAreaColor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgl_FragColor = uVisibleAreaColor;\n\t\t}\n\t}\n}",_0x46175f=(_0x32dc8b=!0,function(e,t){var i=_0x32dc8b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x32dc8b=!1,i}),_0x4228c8=_0x46175f(void 0,(function(){return _0x4228c8.toString().search("(((.+)+)+)+$").toString().constructor(_0x4228c8).search("(((.+)+)+)+$")})),_0x32dc8b;_0x4228c8();var _0x306f15={VISIBLEDOME:0,HIDDENDOME:1,ALLDOME:2},_0xc82867=Object.freeze(_0x306f15),_0x41f32a=(_0x16c4db=!0,function(e,t){var i=_0x16c4db?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16c4db=!1,i}),_0x1894c5=_0x41f32a(void 0,(function(){return _0x1894c5.toString().search("(((.+)+)+)+$").toString().constructor(_0x1894c5).search("(((.+)+)+)+$")})),_0x16c4db;_0x1894c5();var _0x1fc643=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function _0x4f36f0(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._cameraDepthBuffer=[],this._cameraNames=[],this._renderTextureMatrix=[],this._texWorldViewMatrix=[],this._texPrjMatrix=[],this._dirRadian=[],this._dPitch=[],this._colorCommand=void 0,this._boundingSphere=new i$1c,this._frameState=void 0,this._viewPosition=[0,0,0],this._startAngle=0,this._endAngle=360,this._visibleAreaColor=new e$29(0,1,0,.5),this._hiddenAreaColor=new e$29(1,0,0,.5),this._domeType=_0xc82867.ALLDOME,this._quality=0,this._displayMode=0,this._name="",this._checking=!1,this._sceneName="",this._updateCamera=!0,this._isRecreateTexture=!0,this._targetPoints=[],this._worldMatrix=p$1d.IDENTITY.clone(),this._initialize=!1,this._id=0,this._isUpdateCommand=!1,this._textureFinish=!1,this._isClosed=!1}function _0x2153f5(e){e$2b(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0)}function _0x311e1a(e){if(e$2b(e._frameState)){for(var t in e._cameraDepthBuffer)e$2b(e._cameraDepthBuffer[t])&&delete e._frameState._framebufferList[t];e._frameState=void 0}for(var t in e._cameraDepthBuffer)e._cameraDepthBuffer[t]=e._cameraDepthBuffer[t]&&e._cameraDepthBuffer[t].destroy()}function _0x1b73b4(e,t,i){var n=i.camera,r=n.frustum.aspectRatio,o=n.frustum.fov,a=n.frustum.near,s=n.frustum.far,l=new o$1p,u=n.heading,c=n.pitch,h=e._scene.globe.cullEnabled;o$1p.clone(n.position,l);for(var d=0;d<5;d++){var f=90*e$2a.RADIANS_PER_DEGREE,p=90*e$2a.RADIANS_PER_DEGREE,_=Math.tan(.5*f)/Math.tan(.5*p),m=.001*e._distance,g=Math.max(e._distance,10),x=o$1p.fromDegreesArrayHeights(e._viewPosition)[0],v=e._cameraNames[d];e._cameraDepthBuffer[v].isUpdate=!0;var y=i.useLogDepth;e._cameraDepthBuffer[v]._beginFunc=function(t){e._scene.globe.cullEnabled=!1,t.useLogDepth=!1,e._textureFinish=!1;var i=t._fboState.name,r=e._dirRadian[i]*e$2a.RADIANS_PER_DEGREE,o=e._dPitch[i]*e$2a.RADIANS_PER_DEGREE;n.frustum.aspectRatio=_,n.frustum.fov=f,n.frustum.near=m,n.frustum.far=g+100,n.setView({destination:x,orientation:{heading:r,pitch:o,roll:n.roll}}),p$1d.multiply(n.viewMatrix,e._worldMatrix,e._texWorldViewMatrix[i]),p$1d.multiply(n.frustum.projectionMatrix,e._texWorldViewMatrix[i],e._renderTextureMatrix[i]),p$1d.clone(n.frustum.projectionMatrix,e._texPrjMatrix[i])},e._cameraDepthBuffer[v]._endFunc=function(i){n.setView({destination:l,orientation:{heading:u,pitch:c,roll:n.roll},convert:!1}),e._scene.globe.cullEnabled=h,n.frustum.aspectRatio=r,n.frustum.fov=o,n.frustum.near=a,n.frustum.far=s;var d=i._fboState.name;for(var f in e._cameraDepthBuffer[d]._isUpdate=!1,e._cameraDepthBuffer)if(e._cameraDepthBuffer[f]._isUpdate)return void(i.useLogDepth=y);if(e._textureFinish=!0,e._textureFinish){if(!e$2b(e._colorCommand))return;var p=e._colorCommand.shaderProgram.fragmentShaderSource,_=e._colorCommand.shaderProgram.vertexShaderSource,m={aPosition:0};e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=r$13.fromCache({name:"viewDome",context:t,vertexShaderSource:_,fragmentShaderSource:p,attributeLocations:m})}i.useLogDepth=y}}}function _0x3d0151(e,t){var i=_0x317e7e(e);_0x1e3827(e),_0x2ce344(e,t),_0x48ac6a(e,t,i.vertexPackage,i.indexPackage)}function _0x317e7e(e){return{vertexPackage:_0x53e7fe(129,129,1,e._startAngle,e._endAngle,e._isClosed),indexPackage:_0x897896(129,129,e._startAngle,e._endAngle,e._isClosed)}}function _0x53e7fe(e,t,i,n,r,o){var a=e,s=t,l=(r-n)*e$2a.RADIANS_PER_DEGREE/s,u=Math.PI/(2*a),c=0,h=0,d=!1;o&&(0!=n||360!=r)&&(d=!0);for(var f=0,p=d?(e+1)*t+1:(e+1)*t,_=S$12.createTypedArray(S$12.FLOAT,3*p),m=0;m<s;m++){h=m*l+n*e$2a.RADIANS_PER_DEGREE;for(var g=0;g<=a;g++){c=g*u;var x=i*Math.sin(c)*Math.cos(h),v=i*Math.sin(c)*Math.sin(h),y=i*Math.cos(c);_[f++]=v,_[f++]=x,_[f++]=y}}return d&&(_[f++]=0,_[f++]=0,_[f++]=0),_}function _0x897896(e,t,i,n,r){for(var o=[],a=0==i&&360==n?t:t-1,s=0;s<e;s++)for(var l=0;l<a;l++){var u=s+l*(e+1),c=u+1,h=l==t-1?s+1:u+e+2;o.push(u),o.push(c),o.push(h),o.push(u),o.push(h),o.push(h-1)}if(r&&(0!=i||360!=n)){var d=(e+1)*t,f=a*(e+1);for(s=0;s<e;s++)o.push(s),o.push(s+1),o.push(d),o.push(s+f+1),o.push(s+f),o.push(d)}for(var p=0,_=S$12.createTypedArray(S$12.UNSIGNED_SHORT,o.length),m=0;m<o.length;m++)_[p++]=o[m];return _}function _0x1e3827(e){if(e._scene.mode===C$13.SCENE3D){var t=o$1p.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]),i=new i$15(0,0,0);m$17.headingPitchRollToFixedFrame(t,i,t$13.WGS84,m$17.eastNorthUpToFixedFrame,e._worldMatrix)}else if(e._viewPosition[0]>180||e._viewPosition[0]<-180||e._viewPosition[1]>180||e._viewPosition[1]<-180)layer._position=new o$1p(layer.lon,layer.lat,height);else{var n=e._scene._frameState.camera._projection,r=o$1p.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]),o=n.ellipsoid.cartesianToCartographic(r);r=n.project(o),p$1d.fromTranslation(r,e._worldMatrix),p$1d.multiply(_0x1fc643,e._worldMatrix,e._worldMatrix)}o$1p.clone(o$1p.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,i$1c.transform(e._boundingSphere,e._worldMatrix,e._boundingSphere)}function _0x2ce344(e,t){if(e._isRecreateTexture){var i=e._frameState;_0x311e1a(e),e._frameState=i;for(var n=0;n<5;n++){var r=new s$T(t);r.environmentVisible.isObjectVisible=!0,r.environmentVisible.isGlobalVisible=!0,r._visibleViewport=e._visibleViewport;var o=e._cameraNames[n];e._cameraDepthBuffer[o]=r,e._frameState._framebufferList[o]=e._cameraDepthBuffer[o],e._renderTextureMatrix[o]=new p$1d,e._texWorldViewMatrix[o]=new p$1d,e._texPrjMatrix[o]=new p$1d,e._dirRadian[o]=90*n,e._dPitch[o]=4==n?90:0}e._isRecreateTexture=!1}}function _0x48ac6a(e,t,i,n){var r=t$Y.createVertexBuffer({context:t,typedArray:i,usage:A$19.STATIC_DRAW}),o=[],a={aPosition:0};o.push({name:"aPosition",index:a.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var s=t$Y.createIndexBuffer({context:t,typedArray:n,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});e._colorCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!1}),e._colorCommand.vertexArray=new c$12({context:t,attributes:o,indexBuffer:s});var l=new s$U({name:"ViewDomeVp",sources:[_0x69adc8]}),u=new s$U({name:"ViewDomeFp",sources:[_0xefb578]});e._colorCommand.shaderProgram=r$13.fromCache({name:"viewDome",context:t,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:a}),e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),e._colorCommand.uniformMap={uVisibleAreaColor:function(){return e._visibleAreaColor},uHiddenAreaColor:function(){return e._hiddenAreaColor},uTexWorldViewProjMatrix0:function(){return e._renderTextureMatrix[e._cameraNames[0]]},uTexWorldViewProjMatrix1:function(){return e._renderTextureMatrix[e._cameraNames[1]]},uTexWorldViewProjMatrix2:function(){return e._renderTextureMatrix[e._cameraNames[2]]},uTexWorldViewProjMatrix3:function(){return e._renderTextureMatrix[e._cameraNames[3]]},uTexWorldViewProjMatrix4:function(){return e._renderTextureMatrix[e._cameraNames[4]]},uTexWorldViewMatrix0:function(){return e._texWorldViewMatrix[e._cameraNames[0]]},uTexWorldViewMatrix1:function(){return e._texWorldViewMatrix[e._cameraNames[1]]},uTexWorldViewMatrix2:function(){return e._texWorldViewMatrix[e._cameraNames[2]]},uTexWorldViewMatrix3:function(){return e._texWorldViewMatrix[e._cameraNames[3]]},uTexWorldViewMatrix4:function(){return e._texWorldViewMatrix[e._cameraNames[4]]},uTexProjMatrix0:function(){return e._texPrjMatrix[e._cameraNames[0]]},uTexProjMatrix1:function(){return e._texPrjMatrix[e._cameraNames[1]]},uTexProjMatrix2:function(){return e._texPrjMatrix[e._cameraNames[2]]},uTexProjMatrix3:function(){return e._texPrjMatrix[e._cameraNames[3]]},uTexProjMatrix4:function(){return e._texPrjMatrix[e._cameraNames[4]]},uDepthMap0:function(){return e._cameraDepthBuffer[e._cameraNames[0]].depthTexture},uDepthMap1:function(){return e._cameraDepthBuffer[e._cameraNames[1]].depthTexture},uDepthMap2:function(){return e._cameraDepthBuffer[e._cameraNames[2]].depthTexture},uDepthMap3:function(){return e._cameraDepthBuffer[e._cameraNames[3]].depthTexture},uDepthMap4:function(){return e._cameraDepthBuffer[e._cameraNames[4]].depthTexture},uRadius:function(){return e._distance},uDomeType:function(){return e._domeType}}}Object.defineProperties(_0x4f36f0.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._updateCamera=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$16("the distance is greater than 0.0");this._distance=e,this._updateCamera=!0}},startAngle:{get:function(){return this._startAngle},set:function(e){this._startAngle=e,this._initialize=!1,this._updateCamera=!0}},endAngle:{get:function(){return this._endAngle},set:function(e){this._endAngle=e,this._initialize=!1,this._updateCamera=!0}},visibleAreaColor:{get:function(){var e=new e$1U;return e.red=this._visibleAreaColor.x,e.green=this._visibleAreaColor.y,e.blue=this._visibleAreaColor.z,e.alpha=this._visibleAreaColor.w,e},set:function(e){this._visibleAreaColor.x=e.red,this._visibleAreaColor.y=e.green,this._visibleAreaColor.z=e.blue,this._visibleAreaColor.w=e.alpha}},hiddenAreaColor:{get:function(){var e=new e$1U;return e.red=this._hiddenAreaColor.x,e.green=this._hiddenAreaColor.y,e.blue=this._hiddenAreaColor.z,e.alpha=this._hiddenAreaColor.w,e},set:function(e){this._hiddenAreaColor.x=e.red,this._hiddenAreaColor.y=e.green,this._hiddenAreaColor.z=e.blue,this._hiddenAreaColor.w=e.alpha}},domeType:{get:function(){return this._domeType},set:function(e){this._domeType=e}},isClosed:{get:function(){return this._isClosed},set:function(e){this._isClosed=e,this._initialize=!1,this._updateCamera=!0,this._isRecreateTexture=!0}}}),_0x4f36f0.prototype.destroy=function(){return _0x311e1a(this),_0x2153f5(this),this._scene.farToNearRatio=1e3,this._scene._analyst3D.remove(this._name,!0),i$10(this)},_0x4f36f0.prototype.build=function(){if(LicenseChecker.LICENSECHECKER.verify("ViewDome"),""===this._name&&!this._checking){this._name="ViewDome"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene";for(var e=0;e<5;e++)this._cameraNames.push(this._name+"_camera"+e);this._scene._analyst3D.add(this)}},_0x4f36f0.prototype.update=function(e,t,i){"water"===t._fboState.name||t.passes.pick||t._fboState.enabled||(t.camera.bReflect||(this._initialize||(this._frameState=t,_0x3d0151(this,e),this._initialize=!0,this._textureFinish=!1),this._updateCamera&&(this._frameState=t,this._isRecreateTexture&&(_0x2ce344(this),this._isRecreateTexture=!1),_0x1b73b4(this,e,this._frameState),this._update=!1,this._updateCamera=!1),e$2b(this._colorCommand)&&this._textureFinish&&i.push(this._colorCommand)))},_0x4f36f0.prototype.clear=function(){this._scene._analyst3D.remove(this._name,!1)};var _0x1fd1c2=(_0xd64465=!0,function(e,t){var i=_0xd64465?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd64465=!1,i}),_0x16a845=_0x1fd1c2(void 0,(function(){return _0x16a845.toString().search("(((.+)+)+)+$").toString().constructor(_0x16a845).search("(((.+)+)+)+$")})),_0xd64465;_0x16a845();var _0x2818b6="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\nuniform mat4 uRenderTextureMatrix;\nuniform vec2 uTexture1_size;\nuniform sampler2D uTexture1;\nuniform sampler2D uGlobalDepthTexture;\nuniform vec2 uGlobeTextureSize;\nvarying vec4 vClip_pos;\n\nfloat getDepth(in vec4 depth)\n{\n float z_window = czm_unpackDepth(depth);\n#ifdef WEBGPU\n\treturn z_window;\n#else\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n#endif\n}\n\nfloat getDepthFromShadowMap(in vec2 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(uTexture1, t00));\n\tfloat z10 = getDepth(texture2D(uTexture1, t01));\n\tfloat z01 = getDepth(texture2D(uTexture1, t10));\n\tfloat z11 = getDepth(texture2D(uTexture1, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n\n#ifdef CLIPPOLYGON\nuniform sampler2D uPolygonTexture;\nuniform mat4 uPolygonTextureMatrix;\nuniform float uPolygonMode;\nbool isClipValid(vec2 texcoord)\n{\n bool keepInside = (uPolygonMode > 1.5);\n if(keepInside)\n {\n return texture2D(uPolygonTexture, texcoord).r > 0.5;\n }\n else\n {\n return texture2D(uPolygonTexture, texcoord).r < 0.5;\n }\n}\n#endif\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n// #ifdef LOG_DEPTH\n// depthTexCoord.x = depthTexCoord.x * czm_viewport.z / uGlobeTextureSize.x + czm_viewport.x / uGlobeTextureSize.x;\n// depthTexCoord.y = depthTexCoord.y * czm_viewport.w / uGlobeTextureSize.y + czm_viewport.y / uGlobeTextureSize.y;\n// #endif\n\tfloat sceneDepth = czm_unpackDepth(texture2D(uGlobalDepthTexture, depthTexCoord.xy));\n// #ifdef LOG_DEPTH\n// sceneDepth = czm_reverseLogDepth(sceneDepth);\n// #endif\n\n#ifndef WEBGPU\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n#endif\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\t//vec4 viewPos = czm_inverseProjection * pos;\n\tvec4 renderTextureCoord = uRenderTextureMatrix * pos;\n\tvec4 ndcInDepthScene = renderTextureCoord / renderTextureCoord.w;\n\tvec2 texCoord = ndcInDepthScene.xy * 0.5 + 0.5;\n\tfloat depth = getDepthFromShadowMap(texCoord);\n\n\tfloat dxc = abs(dFdx(ndcInDepthScene.z));\n\tfloat dyc = abs(dFdy(ndcInDepthScene.z));\n\tfloat dF = max(dxc, dyc) * 3.0;\n\tfloat bias = 1.0e-6 + dF;\n#ifdef WEBGPU\n\tbias *= 2.0;\n#endif\n\tfloat c = float(depth + bias < ndcInDepthScene.z);\n\tvec4 resultColor = mix(uVisibleAreaColor, uHiddenAreaColor, vec4(c));\n\tif(resultColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIPPOLYGON\n vec4 polygonTextureCoord = uPolygonTextureMatrix * pos;\n\tvec4 texCoordPolygon = polygonTextureCoord / polygonTextureCoord.w;\n\ttexCoordPolygon.xyz = texCoordPolygon.xyz * 0.5 + 0.5;\n\tif(texCoordPolygon.x < 0.0 || texCoordPolygon.x > 1.0 || texCoordPolygon.y < 0.0 || texCoordPolygon.y > 1.0)\n\t{\n\t\tdiscard;\n }\n\tif(!isClipValid(texCoordPolygon.xy))\n {\n discard;\n }\n#endif\n\tgl_FragColor = resultColor;\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x3025ab=(_0x3af55b=!0,function(e,t){var i=_0x3af55b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3af55b=!1,i}),_0x59c650=_0x3025ab(void 0,(function(){return _0x59c650.toString().search("(((.+)+)+)+$").toString().constructor(_0x59c650).search("(((.+)+)+)+$")})),_0x3af55b;_0x59c650();var _0xe651ea="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\nuniform vec2 uTexture1_size;\n#if TEXTURE_UNITS > 0\nuniform sampler2D uTextures[TEXTURE_UNITS];\nuniform mat4 uRenderTextureMatrixs[TEXTURE_UNITS];\n#endif\nuniform sampler2D uGlobalDepthTexture;\nuniform vec2 uGlobeTextureSize;\nuniform int textureCount;\nvarying vec4 vClip_pos;\n\nfloat getDepth(in vec4 depth)\n{\n float z_window = czm_unpackDepth(depth);\n#ifdef WEBGPU\n\treturn z_window;\n#else\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n#endif\n}\n\n#define inline\nfloat getDepthFromShadowMap(in sampler2D viewShedTexture, in vec4 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(viewShedTexture, t00));\n\tfloat z10 = getDepth(texture2D(viewShedTexture, t01));\n\tfloat z01 = getDepth(texture2D(viewShedTexture, t10));\n\tfloat z11 = getDepth(texture2D(viewShedTexture, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n\n#define inline\nfloat isVisibleForOneViewShed(in sampler2D viewShedTexture, in vec4 viewPos, in mat4 renderTextureMatrix1)\n{\n vec4 renderTextureCoord = renderTextureMatrix1 * viewPos;\n\tvec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n\ttexCoord.xyz = texCoord.xyz * 0.5 + 0.5;\n\n if (texCoord.x<0.0 || texCoord.x>1.0\n || texCoord.y<0.0 || texCoord.y>1.0)\n {\n return 1.0;\n }\n\n float depth = getDepthFromShadowMap(viewShedTexture, texCoord);\n depth = depth * 0.5 + 0.5;\n float dxc = abs(dFdx(texCoord.z));\n float dyc = abs(dFdy(texCoord.z));\n float dF = max(dxc, dyc) * 3.0;\n float bias = 1.0e-6 + dF;\n#ifdef WEBGPU\n\tbias *= 2.0;\n#endif\n float c = float(depth+bias < texCoord.z);\n return c;\n}\n\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n\tdepthTexCoord.x = depthTexCoord.x * czm_viewport.z / uGlobeTextureSize.x + czm_viewport.x / uGlobeTextureSize.x;\n\tdepthTexCoord.y = depthTexCoord.y * czm_viewport.w / uGlobeTextureSize.y + czm_viewport.y / uGlobeTextureSize.y;\n\tfloat sceneDepth = czm_unpackDepth(texture2D(uGlobalDepthTexture, depthTexCoord.xy));\n // sceneDepth = czm_reverseLogDepth(sceneDepth);\n#ifndef WEBGPU\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n#endif\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\t//vec4 viewPos = czm_inverseProjection * pos;\n float c = isVisibleForMultiViewShed(pos);\n\tvec4 resultColor = mix(uVisibleAreaColor, uHiddenAreaColor, vec4(c));\n\tif(resultColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = resultColor;\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x435913=(_0x14feba=!0,function(e,t){var i=_0x14feba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x14feba=!1,i}),_0x5efb2a=_0x435913(void 0,(function(){return _0x5efb2a.toString().search("(((.+)+)+)+$").toString().constructor(_0x5efb2a).search("(((.+)+)+)+$")})),_0x14feba;function _0x12cc1f(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._globalDepthBuffer=void 0,this._cameraDepthBuffer=void 0,this._clearStencilCommand=new t$X({stencil:0}),this._clearStencilCommand.pass=Le$s.ANALYSIS,this._lineCommand=void 0,this._stencilCommand=void 0,this._colorCommand=void 0,this._boundingSphere=new i$1c,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._horizontalFov=90,this._verticalFov=60,this._distance=200,this._visibleAreaColor=new e$29(0,1,0,.5),this._hiddenAreaColor=new e$29(1,0,0,.5),this._hintLineColor=new e$29(1,1,1,1),this._segmentCount=20,this._invertViewMatrix=new p$1d,this._viewProjMatrix=new p$1d,this._matProj=new p$1d,this._renderTextureMatrix=new p$1d,this._update=!0,this._id=0,this._name="",this._sceneName="",this._cameraName="",this._checking=!1,this._visibleViewport=4095,this._targetPoints=[],this._multiNames=[],this._isUpdateCommand=!1,this._isShowLine=!0,this._polygonTexture=void 0,this._polygonRegions=new e$1N,this._polygonTextureMatrix=new p$1d,this._polygonViewProjMatrix=new p$1d,this._polygonUpdate=!1,this._polygonMode=R$J.KeepInside,this._attributeLocations={aPosition:0}}function _0x4e4eb7(e){e$2b(e._stencilCommand)&&(e._stencilCommand.vertexArray=e._stencilCommand.vertexArray&&e._stencilCommand.vertexArray.destroy(),e._stencilCommand.shaderProgram=e._stencilCommand.shaderProgram&&e._stencilCommand.shaderProgram.destroy(),e._stencilCommand=void 0),e$2b(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),e$2b(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0)}function _0x1ade4c(e,t,i){var n=e._horizontalFov*e$2a.RADIANS_PER_DEGREE,r=e._verticalFov*e$2a.RADIANS_PER_DEGREE,o=Math.tan(.5*n)/Math.tan(.5*r);e._distance;var a=Math.max(e._distance,10),s=e._direction*e$2a.RADIANS_PER_DEGREE,l=e._pitch*e$2a.RADIANS_PER_DEGREE,u=o$1p.fromDegreesArrayHeights(e._viewPosition)[0],c=i.camera,h=c.frustum.aspectRatio,d=c.frustum.fov,f=c.frustum.near,p=c.frustum.far,_=new o$1p,m=c.heading,g=c.pitch,x=p$1d.clone(c.transform,x);o$1p.clone(c.position,_),e._cameraDepthBuffer.isUpdate=!0;var v=i.useLogDepth,y=e._scene.globe.depthTestAgainstTerrain;e._cameraDepthBuffer._beginFunc=function(t){t.useLogDepth=!1,e._scene.globe.depthTestAgainstTerrain=!0,h=c.frustum.aspectRatio,d=c.frustum.fov,f=c.frustum.near,p=c.frustum.far,m=c.heading,g=c.pitch,x=p$1d.clone(c.transform,x),c._setTransform(p$1d.IDENTITY),o$1p.clone(c.position,_),c.frustum.aspectRatio=o,c.frustum.fov=n,c.frustum.near=1,c.frustum.far=a+100,c.setView({destination:u,orientation:{heading:s,pitch:l,roll:c.roll}}),p$1d.multiply(c.frustum.projectionMatrix,c.viewMatrix,e._viewProjMatrix),p$1d.clone(c.inverseViewMatrix,e._invertViewMatrix),p$1d.clone(c.frustum.projectionMatrix,e._matProj),o$1p.clone(o$1p.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,i$1c.transform(e._boundingSphere,e._invertViewMatrix,e._boundingSphere)},e._cameraDepthBuffer._endFunc=function(t){c.setView({destination:_,orientation:{heading:m,pitch:g,roll:c.roll},convert:!1}),c.frustum.aspectRatio=h,c.frustum.fov=d,c.frustum.near=f,c.frustum.far=p,c._setTransform(x),e._cameraDepthBuffer.isUpdate=!1,t.useLogDepth=v,e._scene.globe.depthTestAgainstTerrain=y},e$2b(e._globalDepthBuffer)&&(e._globalDepthBuffer.isUpdate=!0,e._globalDepthBuffer._beginFunc=function(t){e._scene.globe.depthTestAgainstTerrain=!0,t.useLogDepth=!1;var i=o$1p.distance(c.positionWC,e._boundingSphere.center),n=i<e._boundingSphere.radius?2:i-e._boundingSphere.radius,r=i+e._boundingSphere.radius;c.frustum.near=n,c.frustum.far=r,e._globalDepthProjMatrix=c.frustum.projectionMatrix,e._globalDepthProjMatrixInv=p$1d.inverse(e._globalDepthProjMatrix,new p$1d);var o=p$1d.multiply(c.inverseViewMatrix,e._globalDepthProjMatrixInv,new p$1d);p$1d.multiply(e._viewProjMatrix,o,e._renderTextureMatrix),e$2b(e._polygonViewProjMatrix)&&p$1d.multiply(e._polygonViewProjMatrix,o,e._polygonTextureMatrix)},e._globalDepthBuffer._endFunc=function(t){t.useLogDepth=v,c.frustum.near=f,c.frustum.far=p,e._scene.globe.depthTestAgainstTerrain=y})}function _0x43984b(e,t,i){var n=(e._segmentCount+1)*(e._segmentCount+1)+1,r=S$12.createTypedArray(S$12.FLOAT,3*n),o=3,a=e._horizontalFov*e$2a.RADIANS_PER_DEGREE,s=e._verticalFov*e$2a.RADIANS_PER_DEGREE,l=(Math.tan(.5*a),Math.tan(.5*s));e._distance;var u=e._distance*l,c=Math.PI-.5*a,h=0,d=0,f=a/e._segmentCount;e._targetPoints.length=0;for(var p=0;p<e._segmentCount+1;p++){h=c+p*f;for(var _=u/(e._distance/Math.cos(h)),m=Math.atan(_),g=-m,x=2*m/e._segmentCount,v=new t$M,y=0;y<e._segmentCount+1;y++){d=g+y*x;var $=e._distance*Math.cos(d)*Math.sin(h),b=e._distance*Math.sin(d),T=e._distance*Math.cos(d)*Math.cos(h);r[o++]=$,r[o++]=b,r[o++]=T,v.add(new s$M($,b,T))}e._targetPoints.push(v)}e._targetPoints.reverse();var C=2*(4+5*e._segmentCount+2*e._segmentCount*3),S=e._segmentCount*e._segmentCount*3*2+3*e._segmentCount*4,w=S$12.createTypedArray(S$12.UNSIGNED_SHORT,C),E=S$12.createTypedArray(S$12.UNSIGNED_SHORT,S),P=0;for(p=0;p<e._segmentCount;p++)for(y=0;y<e._segmentCount;y++)E[P++]=1+p+y*(e._segmentCount+1),E[P++]=1+p+1+y*(e._segmentCount+1),E[P++]=1+p+(y+1)*(e._segmentCount+1),E[P++]=1+p+1+y*(e._segmentCount+1),E[P++]=1+p+1+(y+1)*(e._segmentCount+1),E[P++]=1+p+(y+1)*(e._segmentCount+1);for(p=0;p<e._segmentCount;p++)E[P++]=p+1+1,E[P++]=p+1,E[P++]=0,E[P++]=0,E[P++]=p+e._segmentCount*(e._segmentCount+1)+1,E[P++]=p+1+e._segmentCount*(e._segmentCount+1)+1;for(p=0;p<e._segmentCount;p++)E[P++]=0,E[P++]=p*(e._segmentCount+1)+1,E[P++]=(p+1)*(e._segmentCount+1)+1,E[P++]=e._segmentCount+(p+1)*(e._segmentCount+1)+1,E[P++]=e._segmentCount+p*(e._segmentCount+1)+1,E[P++]=0;P=0,w[P++]=0,w[P++]=1,w[P++]=0,w[P++]=e._segmentCount+1,w[P++]=0,w[P++]=e._segmentCount*(e._segmentCount+1)+1,w[P++]=0,w[P++]=(e._segmentCount+1)*(e._segmentCount+1);for(p=0;p<5;p++)for(y=0;y<e._segmentCount;y++)w[P++]=1+y+5*(e._segmentCount+1)*p,w[P++]=1+(y+1)+5*(e._segmentCount+1)*p;for(p=0;p<5;p++)for(y=0;y<e._segmentCount;y++)w[P++]=1+(e._segmentCount+1)*y+5*p,w[P++]=1+(e._segmentCount+1)*(y+1)+5*p;var A=t$Y.createVertexBuffer({context:t,typedArray:r,usage:A$19.STATIC_DRAW}),L=[],M=e._attributeLocations;L.push({name:"aPosition",index:M.aPosition,vertexBuffer:A,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var R=t$Y.createIndexBuffer({context:t,typedArray:w,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),O=t$Y.createIndexBuffer({context:t,typedArray:E,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});e._lineCommand=new i$_({primitiveType:W$18.LINES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!0}),e._lineCommand.vertexArray=new c$12({context:t,attributes:L,indexBuffer:R}),e._lineCommand.shaderProgram=r$13.fromCache({name:"viewshed_lineCommand_SP",context:t,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:M}),e._lineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var I=[];for(p=0;p<6;p++)I[p]=new e$29(0,0,0,0);e._lineCommand.uniformMap={uDiffuseColor:function(){return e._hintLineColor},clip_mode:function(){return 0},clip_planes:function(){return I},clip_line_color:function(){return e$29.UNIT_W}},e._stencilCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!0}),e._stencilCommand.vertexArray=new c$12({context:t,attributes:L,indexBuffer:O}),e._stencilCommand.shaderProgram=r$13.fromCache({name:"viewshed_stencilCommand_SP",context:t,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:M}),e._stencilCommand.renderState=d$1m.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0,func:re$E.GREATER},stencilTest:{enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.INCREMENT_WRAP},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:0,mask:65535}}),e._stencilCommand.uniformMap={uDiffuseColor:function(){return e$29.UNIT_W},clip_mode:function(){return 0},clip_planes:function(){return I},clip_line_color:function(){return e$29.UNIT_W}},e._colorCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!0}),e._colorCommand.vertexArray=new c$12({context:t,attributes:L,indexBuffer:O});var D=void 0,B=new s$U({name:"ViewShedAnalysisVp",sources:[_0x2f8522]});if(e._multiNames.length>1){let t=_0xe651ea.indexOf("void main");var N="#define inline\n float isVisibleForMultiViewShed(vec4 viewPos) {\n float c = 1.0;\n #if TEXTURE_UNITS > 0\n";for(let t=0;t<e._multiNames.length;t++)N+=" c = isVisibleForOneViewShed(uTextures["+t+"], \n viewPos, uRenderTextureMatrixs["+t+"]);\n if(c == 0.0 || textureCount == 1)\n {\n return c;\n }\n";N+=" #endif\n return c;\n }",D=new s$U({sources:[_0xe651ea.slice(0,t)+N+_0xe651ea.slice(t)]})}else D=new s$U({sources:[_0x2818b6]});e._colorCommand.shaderProgram=r$13.fromCache({name:"viewshed_colorCommand_SP",context:t,vertexShaderSource:B,fragmentShaderSource:D,attributeLocations:M}),e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$X.NOT_EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},backFunction:m$X.NOT_EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:0,mask:65535},blending:Ee$r.ALPHA_BLEND}),e._multiNames.length<=1?(e._colorCommand.uniformMap={uVisibleAreaColor:function(){return e._visibleAreaColor},uHiddenAreaColor:function(){return e._hiddenAreaColor},uRenderTextureMatrix:function(){return e._renderTextureMatrix},uTexture1_size:function(){var t=e._cameraDepthBuffer.depthTexture;return new o$1o(t.width,t.height)},uTexture1:function(){return e._cameraDepthBuffer.depthTexture},uGlobalDepthTexture:function(){return e._globalDepthBuffer.depthTexture},uGlobeTextureSize:function(){return new o$1o(e._globalDepthBuffer.depthTexture.width,e._globalDepthBuffer.depthTexture.height)},uPolygonTexture:function(){return e._polygonTexture},uPolygonMode:function(){return e._polygonMode},uPolygonTextureMatrix:function(){return e._polygonTextureMatrix}},e._colorCommand._isViewShed=!0):(D.defines.push("TEXTURE_UNITS "+e._multiNames.length),e._isUpdateCommand=!0)}function _0x1ba372(e,t,i,n){if(e$2b(i)&&!e$2b(i._command)){var r=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix});i._command=r;var o={position:0};r.vertexArray=c$12.fromGeometry({context:t,geometry:i._geometry,attributeLocations:o,bufferUsage:A$19.STATIC_DRAW,interleave:!0});var a=new s$U({sources:["attribute vec4 position;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n}\n"]}),s=new s$U({sources:["void main()\n{\n gl_FragColor = vec4(1.0);\n}\n"]});r.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:o}),r.framebuffer=new t$W({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=d$1m.fromCache({cull:{enabled:!1}})}}function _0x3541ed(e,t,i){if(e._polygonUpdate&&0!==e._polygonRegions.length){e._polygonUpdate=!1;var n=new t$X({color:new e$1U(0,0,0,0),depth:1});n.framebuffer=new t$W({context:t,colorTextures:[e._polygonTexture],destroyAttachments:!1}),n.renderState=d$1m.fromCache(),n.execute(t);for(var r=0;r<e._polygonRegions.values.length;r++){var o=e._polygonRegions.values[r];_0x1ba372(e,t,o,e._polygonTexture),o._command.execute(t)}n.framebuffer.destroy()}}_0x5efb2a(),Object.defineProperties(_0x12cc1f.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},horizontalFov:{get:function(){return this._horizontalFov},set:function(e){this._horizontalFov=e,this._update=!0}},verticalFov:{get:function(){return this._verticalFov},set:function(e){this._verticalFov=e,this._update=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$16("the distance is greater than 0.0");this._distance=e,this._update=!0}},visibleAreaColor:{get:function(){var e=new e$1U;return e.red=this._visibleAreaColor.x,e.green=this._visibleAreaColor.y,e.blue=this._visibleAreaColor.z,e.alpha=this._visibleAreaColor.w,e},set:function(e){this._visibleAreaColor.x=e.red,this._visibleAreaColor.y=e.green,this._visibleAreaColor.z=e.blue,this._visibleAreaColor.w=e.alpha}},hiddenAreaColor:{get:function(){var e=new e$1U;return e.red=this._hiddenAreaColor.x,e.green=this._hiddenAreaColor.y,e.blue=this._hiddenAreaColor.z,e.alpha=this._hiddenAreaColor.w,e},set:function(e){this._hiddenAreaColor.x=e.red,this._hiddenAreaColor.y=e.green,this._hiddenAreaColor.z=e.blue,this._hiddenAreaColor.w=e.alpha}},hintLineColor:{get:function(){var e=new e$1U;return e.red=this._hintLineColor.x,e.green=this._hintLineColor.y,e.blue=this._hintLineColor.z,e.alpha=this._hintLineColor.w,e},set:function(e){this._hintLineColor.x=e.red,this._hintLineColor.y=e.green,this._hintLineColor.z=e.blue,this._hintLineColor.w=e.alpha}},isShowLine:{get:function(){return this._isShowLine},set:function(e){this._isShowLine=e}}}),_0x12cc1f.prototype.destroy=function(){return e$2b(this._frameState)&&(e$2b(this._globalDepthBuffer)&&delete this._frameState._framebufferList[this._sceneName],e$2b(this._cameraDepthBuffer)&&delete this._frameState._framebufferList[this._cameraName],this._frameState=void 0),this._globalDepthBuffer=this._globalDepthBuffer&&this._globalDepthBuffer.destroy(),this._cameraDepthBuffer=this._cameraDepthBuffer&&this._cameraDepthBuffer.destroy(),_0x4e4eb7(this),this._clearStencilCommand=void 0,this._scene.farToNearRatio=1e3,this._scene._analyst3D.remove(this._name,!0),e$2b(this._polygonTexture)&&(this._polygonTexture.destroy(),this._polygonTexture=null),i$10(this)},_0x12cc1f.prototype.clear=function(){this._scene._analyst3D.remove(this._name,!1)},_0x12cc1f.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("ViewShed3D"),""===this._name&&!this._checking&&(this._name="viewshed3d"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_global",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},_0x12cc1f.prototype.setDistDirByPoint=function(e){if(e[0]===this._viewPosition[0]&&e[1]===this._viewPosition[1]&&e[2]===this._viewPosition[2])throw new t$16("the position is [longitude, latitude ,height] and is not equals viewPosition");var t,i,n=this._scene._frameState.camera,r=n._projection;if(this._scene.mode===C$13.SCENE3D)t=o$1p.fromDegreesArrayHeights(e)[0],i=o$1p.fromDegreesArrayHeights(this._viewPosition)[0];else{var o=a$18.fromDegrees(e[0],e[1],e[2]);t=r.project(o,new o$1p);var a=a$18.fromDegrees(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]);i=r.project(a,new o$1p)}var s=new o$1p;o$1p.subtract(t,i,s);var l=o$1p.magnitude(s);o$1p.normalize(s,s),this.distance=l;var u=n.heading,c=n.pitch,h=n.roll,d=new o$1p;o$1p.clone(n.position,d);var f=s.clone(),p=i.clone();p=o$1p.normalize(p,p),Math.abs(o$1p.dot(p,f))>=1&&(p=Math.abs(o$1p.dot(f,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,p):o$1p.clone(o$1p.UNIT_Z,p));var _=new o$1p;o$1p.cross(p,f,_),_=o$1p.normalize(_,_),o$1p.cross(f,_,p),p=o$1p.normalize(p,p),n.setView({destination:i,orientation:{direction:f,up:p},convert:!1}),this.direction=n.heading*e$2a.DEGREES_PER_RADIAN,this.pitch=n.pitch*e$2a.DEGREES_PER_RADIAN,n.setView({destination:d,orientation:{heading:u,pitch:c,roll:h},convert:!1})},_0x12cc1f.prototype.update=function(e,t,i){if("normal"===t._fboState.name&&!t.passes.pick){if(t._fboState.enabled&&(t._fboState.name===this._sceneName||t._fboState.name===this._cameraName))return void(t._fboState.name===this._sceneName&&e$2b(this._stencilCommand)&&i.push(this._stencilCommand));if(!t.camera.bReflect&&(this._update&&(this._frameState=t,e$2b(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new s$T(e),this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),e$2b(this._globalDepthBuffer)||(this._globalDepthBuffer=new s$T(e),this._globalDepthBuffer.environmentVisible.isObjectVisible=!0,this._globalDepthBuffer.environmentVisible.isGlobalVisible=!0,this._globalDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._sceneName]=this._globalDepthBuffer),this._update=!1,_0x4e4eb7(this),_0x1ade4c(this,e,t),_0x43984b(this,e)),e$2b(this._cameraDepthBuffer.framebuffer))){var n=i.pop();!e$2b(n)||(e$2b(this._clearStencilCommand)&&i.push(this._clearStencilCommand),e$2b(this._stencilCommand)&&i.push(this._stencilCommand),e$2b(this._colorCommand)&&i.push(this._colorCommand),e$2b(this._lineCommand)&&this._isShowLine&&i.push(this._lineCommand),i.push(n))}}},_0x12cc1f.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=1<<e,e$2b(this._cameraDepthBuffer)&&(this._cameraDepthBuffer._visibleViewport=this._visibleViewport)},_0x12cc1f.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},_0x12cc1f.prototype.getViewshedParameter=function(){for(var e=[],t=this._invertViewMatrix,i=0,n=this._targetPoints.length;i<n;i++){for(var r=this._targetPoints[i].pntArray,o=new t$M,a=0,s=r.length;a<s;a++){var l=this.getBarrierPoint(r[a]);if(e$2b(l))o.add(l);else{var u=p$1d.multiplyByPoint(t,r[a],new o$1p),c=a$18.fromCartesian(u),h=c.longitude*e$2a.DEGREES_PER_RADIAN,d=c.latitude*e$2a.DEGREES_PER_RADIAN;o.add(new s$M(h,d,c.height))}}e.push(o)}return{viewPosition:new s$M(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]),point3DList:e,distance:this._distance}};var _0x7ba2d1=new e$29(1/255,1/65025,1/160581375,1/4228250625);function _0x297b9b(e,t){for(var i=o$1p.fromDegreesArrayHeights(t),n=new z$_({polygonHierarchy:{positions:i},vertexFormat:{bitangent:!1,color:!1,normal:!1,position:!0,st:!1,tangent:!1},perPositionHeight:!0}),r=z$_.createGeometry(n),o=o$1p.fromDegreesArrayHeights(t),a=h$18.fromCartesianArray(o),s=[],l=1;l<i.length-1;l++)s.push(0),s.push(l),s.push(l+1);r.indices=s;var u=new p$1d;p$1d.inverse(e._invertViewMatrix,u),f$X.updateGeometry(r,t,u);var c=new f$X;return c._geometry=r,c._rectangle=a,c}function _0x286f69(e,t){if(e$2b(e._colorCommand)){var i=e._scene._context,n=e._colorCommand.shaderProgram.fragmentShaderSource,r=e._colorCommand.shaderProgram.vertexShaderSource,o=n.defines.indexOf("CLIPPOLYGON");t?o<0&&n.defines.push("CLIPPOLYGON"):o>=0&&n.defines.splice(o,1),e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=r$13.fromCache({context:i,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:e._attributeLocations})}}function m$L(e){if(e=u$_(e,{}),this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._rectangle=u$_(e.rectangle,h$18.MAX_VALUE),this._projection=new n$1b(this._ellipsoid),this._numberOfLevelZeroTilesX=u$_(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=u$_(e.numberOfLevelZeroTilesY,1),e.hasOwnProperty("tileInfo")&&(this._tileInfo=e.tileInfo),this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._beginLevel=0,this._suggest=void 0,e$2b(e.resolutions)){this._resolutions=e.resolutions;for(var t=0,i=6378137*Math.PI/this._tileWidth;i>this._resolutions[0];)i*=.5,t++;this._beginLevel=t-1,this._dataBounds=e.dataBounds,this._tileBounds=[];for(var n=this._dataBounds.east-this._tileInfo.origin.x,r=this._tileInfo.origin.y-this._dataBounds.south,o=this._dataBounds.west-this._tileInfo.origin.x,a=this._tileInfo.origin.y-this._dataBounds.north,s=0;s<this._resolutions.length;s++){var l=this._resolutions[s]*this._tileInfo.cols,u=this._resolutions[s]*this._tileInfo.rows,c=Math.floor(o/l),h=Math.floor(a/u),d=Math.floor(n/l),f=Math.floor(r/u);this._tileBounds.push(new h$18(c,f,d,h))}}}function n$C(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}_0x12cc1f.prototype.getBarrierPoint=function(e){var t=new e$29(e.x,e.y,e.z,1);if(p$1d.multiplyByVector(this._matProj,t,t),e$29.divideByScalar(t,t.w,t),!(t.x>1||t.x<-1||t.y>1||t.y<-1)){var i=this._scene.context,n=i.drawingBufferWidth,r=i.drawingBufferHeight,o=(.5*t.x+.5)*n-.5,a=(.5*t.y+.5)*r-.5;if(!(o<0||a<0)){for(var s=Math.floor(o),l=o-s,u=Math.floor(a),c=a-u,h=i.readPixels({framebuffer:this._cameraDepthBuffer.framebuffer,x:s,y:u,width:2,height:2}),d=new e$29,f=[],p=0;p<4;p++){var _=e$29.unpack(h,4*p,d);if(f[p]=2*e$29.dot(_,_0x7ba2d1)-1,!(f[p]<1&&f[p]>0))return}var m=(1-c)*((1-l)*f[0]+l*f[1])+c*((1-l)*f[2]+l*f[3]);if(t.z-m>1e-6){var g=new p$1d;p$1d.inverse(this._viewProjMatrix,g),t.z=m,p$1d.multiplyByVector(g,t,t),e$29.divideByScalar(t,t.w,t);var x=a$18.fromCartesian(t);return new s$M(x.longitude*e$2a.DEGREES_PER_RADIAN,x.latitude*e$2a.DEGREES_PER_RADIAN,x.height)}}}},_0x12cc1f.prototype._setMultiViewShedNames=function(e){if(this._multiNames.length!=e.length)return this._update=!0,void(this._multiNames=e);for(var t=0;t<this._multiNames.length;t++)if(this._multiNames[t]!=e[t])return this._update=!0,void(this._multiNames=e)},_0x12cc1f.prototype.addClipRegion=function(e){var t=e.name,i=e.position;if(!e$2b(t)||!e$2b(i))return!1;if(e$2b(this._polygonRegions.get(t)))return!1;var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;e$2b(this._polygonTexture)||(this._polygonTexture=new t$V({context:this._scene._context,width:n,height:r}));var o=_0x297b9b(this,i);this._polygonRegions.set(t,o),this._polygonUpdate=!0;var a=this._frameState.camera,s=o._rectangle,l=new o$1p,u=a.heading,c=a.pitch,h=a._positionCartographic.height;o$1p.clone(a.position,l),a.setView({destination:o$1p.fromRadians(s.west+.5*s.width,s.south+.5*s.height,h+1e3)}),p$1d.multiply(a.frustum.projectionMatrix,a.viewMatrix,this._polygonViewProjMatrix),this._scene._context.uniformState.update(this._frameState),_0x3541ed(this,this._scene._context,this._frameState),_0x286f69(this,!0),a.setView({destination:l,orientation:{heading:u,pitch:c,roll:a.roll}})},_0x12cc1f.prototype.removeClipRegion=function(e){return!!this._polygonRegions.remove(e)&&(this._polygonUpdate=!0,0===this._polygonRegions.values.length&&_0x286f69(this,!1),!0)},_0x12cc1f.prototype.removeAllClipRegion=function(){for(var e=0;e<this._polygonRegions.values.length;e++)this._polygonRegions.values[e].destroy(),this._polygonRegions.values[e]=null;this._polygonRegions.removeAll(),this._polygonUpdate=!0,_0x286f69(this,!1)},_0x12cc1f.prototype.setClipMode=function(e){this._polygonMode=e},Object.defineProperties(m$L.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),m$L.prototype.getNumberOfXTilesAtLevel=function(e){if(e$2b(this._resolutions)){if(e<this._beginLevel)return this._numberOfLevelZeroTilesX<<e;var t=this._dataBounds.east-this._tileInfo.origin.x,i=e$2a.clamp(e-this._beginLevel,0,this._resolutions.length-1),n=this._resolutions[i]*this._tileInfo.cols;return Math.ceil(t/n)}if(e$2b(this._tileInfo)){var r=this._tileInfo.lods.filter((function(t){return t.level===e})),o=e$2a.toDegrees(this._rectangle.east)-this._tileInfo.origin.x,a=r[0].resolution;return Math.ceil(o/(this._tileInfo.rows*a))}return this._numberOfLevelZeroTilesX<<e},m$L.prototype.getNumberOfYTilesAtLevel=function(e){if(e$2b(this._resolutions)){if(e<this._beginLevel)return this._numberOfLevelZeroTilesY<<e;var t=this._tileInfo.origin.y-this._dataBounds.south,i=e$2a.clamp(e-this._beginLevel,0,this._resolutions.length-1),n=this._resolutions[i]*this._tileInfo.rows;return Math.ceil(t/n)}if(e$2b(this._tileInfo)){var r=this._tileInfo.lods.filter((function(t){return t.level===e})),o=this._tileInfo.origin.y-e$2a.toDegrees(this._rectangle.south),a=r[0].resolution;return Math.ceil(o/(this._tileInfo.cols*a))}return this._numberOfLevelZeroTilesY<<e},m$L.prototype.rectangleToNativeRectangle=function(e,t){o$1q.defined("rectangle",e);var i=e$2a.toDegrees(e.west),n=e$2a.toDegrees(e.south),r=e$2a.toDegrees(e.east),o=e$2a.toDegrees(e.north);return e$2b(t)?(t.west=i,t.south=n,t.east=r,t.north=o,t):new h$18(i,n,r,o)},m$L.prototype.tileXYToNativeRectangle=function(e,t,i,n){var r=this.tileXYToRectangle(e,t,i,n);return r.west=e$2a.toDegrees(r.west),r.south=e$2a.toDegrees(r.south),r.east=e$2a.toDegrees(r.east),r.north=e$2a.toDegrees(r.north),r},m$L.prototype.tileXYToRectangle=function(e,t,i,n){var r=this._rectangle;if(e$2b(this._resolutions)){var o=this._resolutions[i-this._beginLevel],a=this._tileInfo.origin.x,s=this._tileInfo.origin.y,l=a+e*this._tileWidth*o,u=a+(e+1)*this._tileWidth*o,c=s-t*this._tileHeight*o,h=s-(t+1)*this._tileHeight*o;return e$2b(n)?(n.west=l,n.south=h,n.east=u,n.north=c,n):new h$18(l/6378137,h/6378137,u/6378137,c/6378137)}if(e$2b(this._tileInfo)){o=this._tileInfo.lods[i].resolution*e$2a.TWO_PI/360;a=e$2a.toRadians(this._tileInfo.origin.x),s=e$2a.toRadians(this._tileInfo.origin.y);l=a+e*this._tileWidth*o,u=a+(e+1)*this._tileWidth*o,c=s-t*this._tileHeight*o,h=s-(t+1)*this._tileHeight*o;return e$2b(n)?(n.west=l,n.south=h,n.east=u,n.north=c,n):new h$18(l,h,u,c)}var d=this.getNumberOfXTilesAtLevel(i),f=this.getNumberOfYTilesAtLevel(i),p=r.width/d,_=(l=e*p+r.west,u=(e+1)*p+r.west,r.height/f);c=r.north-t*_,h=r.north-(t+1)*_;return e$2b(n)||(n=new h$18(l,h,u,c)),n.west=l,n.south=h,n.east=u,n.north=c,n},m$L.prototype.positionToTileXY=function(e,t,i){var n=this._rectangle;if(h$18.contains(n,e)){var r=this.getNumberOfXTilesAtLevel(t),o=this.getNumberOfYTilesAtLevel(t),a=n.width/r,s=n.height/o;if(e$2b(this._resolutions)){var l=this._resolutions[t-this._beginLevel];a=this._tileWidth*l,s=this._tileHeight*l}else if(e$2b(this._tileInfo)){l=this._tileInfo.lods[t].resolution*e$2a.TWO_PI/360;a=this._tileWidth*l,s=this._tileHeight*l}var u,c,h=e.longitude;n.east<n.west&&(h+=e$2a.TWO_PI);var d=(h-(u=e$2b(this._resolutions)?this._tileInfo.origin.x:e$2b(this._tileInfo)?e$2a.toRadians(this._tileInfo.origin.x):n.west))/a|0;e$2b(this._resolutions)&&(d=(6378137*h-u)/a|0,d=e$2a.clamp(d,this._tileBounds[t-this._beginLevel].west,this._tileBounds[t-this._beginLevel].east)),d>=r&&(d=r-1);var f=((c=e$2b(this._resolutions)?this._tileInfo.origin.y:e$2b(this._tileInfo)?e$2a.toRadians(this._tileInfo.origin.y):n.north)-e.latitude)/s|0;return e$2b(this._resolutions)&&(f=(c-6378137*e.latitude)/s|0,f=e$2a.clamp(f,this._tileBounds[t-this._beginLevel].north,this._tileBounds[t-this._beginLevel].south)),f>=o&&(f=o-1),e$2b(i)?(i.x=d,i.y=f,i):new o$1o(d,f)}};var l$S=new h$18;function S$G(e,t,i,n){for(var r=n.length,o=0;o<r;++o){var a=n[o];if(a.x===t&&a.y===i&&a.level===e)return!0}return!1}n$C.prototype.addAvailableTileRange=function(e,t,i,n,r){var o=this._tilingScheme,a=this._rootNodes;if(0===e)for(var s=i;s<=r;++s)for(var l=t;l<=n;++l)S$G(e,l,s,a)||a.push(new _$F(o,void 0,0,l,s));o.tileXYToRectangle(t,i,e,l$S);var u=l$S.west,c=l$S.north;o.tileXYToRectangle(n,r,e,l$S);for(var h=l$S.east,d=new Y$z(e,u,l$S.south,h,c),f=0;f<a.length;++f){var p=a[f];L$S(p.extent,d)&&j$K(this._maximumLevel,p,d)}},n$C.prototype.computeMaximumLevelAtPosition=function(e){for(var t,i=0;i<this._rootNodes.length;++i){var n=this._rootNodes[i];if(m$K(n.extent,e)){t=n;break}}return e$2b(t)?x$O(void 0,t,e):-1};var W$O=[],b$U=[],Q$H=new h$18,X$G=new h$18;n$C.prototype.computeBestAvailableLevelOverRectangle=function(e){var t=W$O;t.length=0,e.east<e.west?(t.push(h$18.fromRadians(-Math.PI,e.south,e.east,e.north,Q$H)),t.push(h$18.fromRadians(e.west,e.south,Math.PI,e.north,X$G))):t.push(e);var i,n=b$U;for(n.length=0,i=0;i<this._rootNodes.length;++i)M$M(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(e$2b(n[i])&&0===n[i].length)return i;return 0};var o$M=new a$18;function _$F(e,t,i,n,r){this.tilingScheme=e,this.parent=t,this.level=i,this.x=n,this.y=r,this.extent=e.tileXYToRectangle(n,r,i),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}function Y$z(e,t,i,n,r){this.level=e,this.west=t,this.south=i,this.east=n,this.north=r}function L$S(e,t){var i=Math.max(e.west,t.west),n=Math.max(e.south,t.south),r=Math.min(e.east,t.east);return n<Math.min(e.north,t.north)&&i<r}function j$K(e,t,i){for(;t.level<e;)if(A$Q(t.nw.extent,i))t=t.nw;else if(A$Q(t.ne.extent,i))t=t.ne;else if(A$Q(t.sw.extent,i))t=t.sw;else{if(!A$Q(t.se.extent,i))break;t=t.se}if(0===t.rectangles.length||t.rectangles[t.rectangles.length-1].level<=i.level)t.rectangles.push(i);else{var n=a$17(t.rectangles,i.level,I$V);n<=0&&(n=~n),t.rectangles.splice(n,0,i)}}function I$V(e,t){return e.level-t}function A$Q(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function m$K(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function x$O(e,t,i){for(var n=0,r=!1;!r;){var o=t._nw&&m$K(t._nw.extent,i),a=t._ne&&m$K(t._ne.extent,i),s=t._sw&&m$K(t._sw.extent,i),l=t._se&&m$K(t._se.extent,i);if(o+a+s+l>1){o&&(n=Math.max(n,x$O(t,t._nw,i))),a&&(n=Math.max(n,x$O(t,t._ne,i))),s&&(n=Math.max(n,x$O(t,t._sw,i))),l&&(n=Math.max(n,x$O(t,t._se,i)));break}o?t=t._nw:a?t=t._ne:s?t=t._sw:l?t=t._se:r=!0}for(;t!==e;){for(var u=t.rectangles,c=u.length-1;c>=0&&u[c].level>n;--c){var h=u[c];m$K(h,i)&&(n=h.level)}t=t.parent}return n}function M$M(e,t,i){if(t){var n,r=!1;for(n=0;n<i.length;++n)r=r||L$S(t.extent,i[n]);if(r){var o=t.rectangles;for(n=0;n<o.length;++n){var a=o[n];e[a.level]||(e[a.level]=i),e[a.level]=q$O(e[a.level],a)}M$M(e,t._nw,i),M$M(e,t._ne,i),M$M(e,t._sw,i),M$M(e,t._se,i)}}}function q$O(e,t){for(var i=[],n=0;n<e.length;++n){var r=e[n];L$S(r,t)?(r.west<t.west&&i.push(new h$18(r.west,r.south,t.west,r.north)),r.east>t.east&&i.push(new h$18(t.east,r.south,r.east,r.north)),r.south<t.south&&i.push(new h$18(Math.max(t.west,r.west),r.south,Math.min(t.east,r.east),t.south)),r.north>t.north&&i.push(new h$18(Math.max(t.west,r.west),t.north,Math.min(t.east,r.east),r.north))):i.push(r)}return i}n$C.prototype.isTileAvailable=function(e,t,i){var n=this._tilingScheme.tileXYToRectangle(t,i,e,l$S);return h$18.center(n,o$M),this.computeMaximumLevelAtPosition(o$M)>=e},n$C.prototype.computeChildMaskForTile=function(e,t,i){var n=e+1;if(n>=this._maximumLevel)return 0;var r=0;return r|=this.isTileAvailable(n,2*t,2*i+1)?1:0,r|=this.isTileAvailable(n,2*t+1,2*i+1)?2:0,r|=this.isTileAvailable(n,2*t,2*i)?4:0,r|=this.isTileAvailable(n,2*t+1,2*i)?8:0},Object.defineProperties(_$F.prototype,{nw:{get:function(){return this._nw||(this._nw=new _$F(this.tilingScheme,this,this.level+1,2*this.x,2*this.y)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new _$F(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new _$F(this.tilingScheme,this,this.level+1,2*this.x,2*this.y+1)),this._sw}},se:{get:function(){return this._se||(this._se=new _$F(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y+1)),this._se}}});var j$J=15;function _$E(e){if(!e$2b(e)||!e$2b(e.url))throw new t$16("options.url is required.");this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;var t=e.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};var i=this,n=u$_(e.ellipsoid,t$13.WGS84);this._readyPromise=o$1l(e.url).then((function(e){var n=t$11.createIfNeeded(e);return n.appendForwardSlash(),e$2b(t)&&(n=n.getDerivedResource({queryParameters:{token:t}})),i._resource=n,n.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()})).then((function(e){var t=e.copyrightText;e$2b(t)&&(i._credit=new r$T(t));var r=e.spatialReference,o=u$_(r.latestWkid,r.wkid),a=e.extent,s={ellipsoid:n};if(4326===o)s.rectangle=h$18.fromDegrees(a.xmin,a.ymin,a.xmax,a.ymax),i._tilingScheme=new g$13(s);else{if(3857!==o)return o$1l.reject(new t$14("Invalid spatial reference"));s.rectangleSouthwestInMeters=new o$1o(a.xmin,a.ymin),s.rectangleNortheastInMeters=new o$1o(a.xmax,a.ymax),i._tilingScheme=new c$R(s)}var l=e.tileInfo;return e$2b(l)?(i._width=l.rows+1,i._height=l.cols+1,i._encoding="LERC"===l.format?T$L.LERC:T$L.NONE,i._lodCount=l.lods.length-1,(i._hasAvailability=-1!==e.capabilities.indexOf("Tilemap"))&&(i._tilesAvailable=new n$C(i._tilingScheme,i._lodCount),i._tilesAvailable.addAvailableTileRange(0,0,0,i._tilingScheme.getNumberOfXTilesAtLevel(0),i._tilingScheme.getNumberOfYTilesAtLevel(0)),i._tilesAvailablityLoaded=new n$C(i._tilingScheme,i._lodCount)),i._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(i._tilingScheme.ellipsoid,i._width,i._tilingScheme.getNumberOfXTilesAtLevel(0)),e.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),i._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:e.minValues[0],highestEncodedHeight:e.maxValues[0]},i._ready=!0,!0):o$1l.reject(new t$14("tileInfo is required"))})).otherwise((function(e){var t="An error occurred while accessing "+i._resource.url+".";return l$W.handleError(void 0,i,i._errorEvent,t),o$1l.reject(e)})),this._errorEvent=new o$1h}function w$I(e,t,i,n){if(e._hasAvailability){var r=e._tilesAvailablityLoaded,o=e._tilesAvailable;if(t>e._lodCount)return!1;if(o.isTileAvailable(t,i,n))return!0;if(r.isTileAvailable(t,i,n))return!1}}function H$M(e,t,i,n){for(var r=t-1,o=i-1,a=n[e.y*t+e.x],s=[],l={startX:e.x,startY:e.y,endX:0,endY:0},u=new o$1o(e.x+1,e.y+1),c=!1,h=!1;!c||!h;){var d=u.x,f=h?u.y+1:u.y;if(!c){for(var p=e.y;p<f;++p)if(n[p*t+u.x]!==a){c=!0;break}c?(s.push(new o$1o(u.x,e.y)),--u.x,--d,l.endX=u.x):u.x===r?(l.endX=u.x,c=!0):++u.x}if(!h){for(var _=u.y*t,m=e.x;m<=d;++m)if(n[_+m]!==a){h=!0;break}h?(s.push(new o$1o(e.x,u.y)),--u.y,l.endY=u.y):u.y===o?(l.endY=u.y,h=!0):++u.y}}return{endingIndices:s,range:l,value:a}}function V$z(e,t,i,n,r){var o=[],a=r.every((function(e){return e===r[0]}));if(a)return 1===r[0]&&o.push({startX:e,startY:t,endX:e+i-1,endY:t+n-1}),o;for(var s=[new o$1o(0,0)];s.length>0;){var l=H$M(s.pop(),i,n,r);if(1===l.value){var u=l.range;u.startX+=e,u.endX+=e,u.startY+=t,u.endY+=t,o.push(u)}var c=l.endingIndices;c.length>0&&(s=s.concat(c))}return o}function L$R(e,t,i,n){if(!e._hasAvailability)return{};var r=128*Math.floor(i/128),o=128*Math.floor(n/128),a=Math.min(1<<t,128),s="tilemap/"+t+"/"+o+"/"+r+"/"+a+"/"+a,l=e._availableCache;if(e$2b(l[s]))return l[s];var u=new r$1b({throttle:!0,throttleByServer:!0,type:V$15.TERRAIN}),c=e._resource.getDerivedResource({url:s,request:u}).fetchJson();return e$2b(c)?(c=c.then((function(s){var l=V$z(r,o,a,a,s.data);e._tilesAvailablityLoaded.addAvailableTileRange(r,o,r+a,o+a);for(var u=e._tilesAvailable,c=0;c<l.length;++c){var h=l[c];u.addAvailableTileRange(t,h.startX,h.startY,h.endX,h.endY)}return w$I(e,t,i,n)})),l[s]={promise:c,request:u},c=c.always((function(e){return delete l[s],e})),{promise:c,request:u}):{}}function l$R(e,t,i){if(o$1q.defined("array",e),e$2b(t)&&o$1q.typeOf.number("begin",t),e$2b(i)&&o$1q.typeOf.number("end",i),"function"==typeof e.slice)return e.slice(t,i);for(var n=Array.prototype.slice.call(e,t,i),r=s$Y.typedArrayTypes,o=r.length,a=0;a<o;++a)if(e instanceof r[a]){n=new r[a](n);break}return n}Object.defineProperties(_$E.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this.ready)throw new t$16("credit must not be called before ready returns true.");return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$16("tilingScheme must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),_$E.prototype.requestTileGeometry=function(e,t,i,n){if(!this._ready)throw new t$16("requestTileGeometry must not be called before the terrain provider is ready.");var r,o=this._resource.getDerivedResource({url:"tile/"+i+"/"+t+"/"+e,request:n}),a=this._hasAvailability,s=o$1l.resolve(!0);if(a&&!e$2b(w$I(this,i+1,2*e,2*t))){var l=L$R(this,i+1,2*e,2*t);s=l.promise,r=l.request}var u=o.fetchArrayBuffer();if(e$2b(u)&&e$2b(s)){var c=this,h=this._tilesAvailable;return o$1l.join(u,s).then((function(n){return new T$J({buffer:n[0],width:c._width,height:c._height,childTileMask:a?h.computeChildMaskForTile(i,e,t):j$J,structure:c._terrainDataStructure,encoding:c._encoding})})).otherwise((function(e){return e$2b(r)&&r.state===W$1c.CANCELLED?(n.cancel(),n.deferred.promise.always((function(){return n.state=W$1c.CANCELLED,o$1l.reject(e)}))):o$1l.reject(e)}))}},_$E.prototype.getLevelMaximumGeometricError=function(e){if(!this.ready)throw new t$16("getLevelMaximumGeometricError must not be called before ready returns true.");return this._levelZeroMaximumGeometricError/(1<<e)},_$E.prototype.getTileDataAvailable=function(e,t,i){if(this._hasAvailability){var n=w$I(this,i,e,t);if(e$2b(n))return n;L$R(this,i,e,t)}},_$E.prototype.loadTileDataAvailability=function(e,t,i){};var e$11={defaultKey:void 0,getKey:function(e){return e$2b(e)?e:e$11.defaultKey}},i$N="";function o$L(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).key;this._key=e$11.getKey(t),this._resource=new t$11({url:i$N,queryParameters:{key:this._key}})}Object.defineProperties(o$L.prototype,{url:{get:function(){return i$N}},key:{get:function(){return this._key}}}),o$L.prototype.geocode=function(e){return o$1q.typeOf.string("query",e),this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then((function(e){return 0===e.resourceSets.length?[]:e.resourceSets[0].resources.map((function(e){var t=e.bbox,i=t[0],n=t[1],r=t[2],o=t[3];return{displayName:e.name,destination:h$18.fromDegrees(n,i,o,r)}}))}))};var W$N=new o$1p;function O$y(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).minimum,i=e.maximum;if(o$1q.typeOf.object("min",t),o$1q.typeOf.object("max",i),e$2b(e.offsetAttribute)&&e.offsetAttribute===_0x58701d.TOP)throw new t$16("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");var n=u$_(e.vertexFormat,n$11.DEFAULT);this._minimum=o$1p.clone(t),this._maximum=o$1p.clone(i),this._vertexFormat=n,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}O$y.fromDimensions=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).dimensions;o$1q.typeOf.object("dimensions",t),o$1q.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=o$1p.multiplyByScalar(t,.5,new o$1p);return new O$y({minimum:o$1p.negate(i,new o$1p),maximum:i,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},O$y.fromAxisAlignedBoundingBox=function(e){return o$1q.typeOf.object("boundingBox",e),new O$y({minimum:e.minimum,maximum:e.maximum})},O$y.packedLength=2*o$1p.packedLength+n$11.packedLength+1,O$y.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),o$1p.pack(e._minimum,t,i),o$1p.pack(e._maximum,t,i+o$1p.packedLength),n$11.pack(e._vertexFormat,t,i+2*o$1p.packedLength),t[i+2*o$1p.packedLength+n$11.packedLength]=u$_(e._offsetAttribute,-1),t};var N$C=new o$1p,U$K=new o$1p,G$R=new n$11,S$F={minimum:N$C,maximum:U$K,vertexFormat:G$R,offsetAttribute:void 0},u$J,n$B;function t$D(e){n$B(e)}function N$B(){}O$y.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=o$1p.unpack(e,t,N$C),r=o$1p.unpack(e,t+o$1p.packedLength,U$K),o=n$11.unpack(e,t+2*o$1p.packedLength,G$R),a=e[t+2*o$1p.packedLength+n$11.packedLength];return e$2b(i)?(i._minimum=o$1p.clone(n,i._minimum),i._maximum=o$1p.clone(r,i._maximum),i._vertexFormat=n$11.clone(o,i._vertexFormat),i._offsetAttribute=-1===a?void 0:a,i):(S$F.offsetAttribute=-1===a?void 0:a,new O$y(S$F))},O$y.createGeometry=function(e){var t=e._minimum,i=e._maximum,n=e._vertexFormat;if(!o$1p.equals(t,i)){var r,o,a=new a$_;if(n.position&&(n.st||n.normal||n.tangent||n.bitangent)){if(n.position&&((o=new Float64Array(72))[0]=t.x,o[1]=t.y,o[2]=i.z,o[3]=i.x,o[4]=t.y,o[5]=i.z,o[6]=i.x,o[7]=i.y,o[8]=i.z,o[9]=t.x,o[10]=i.y,o[11]=i.z,o[12]=t.x,o[13]=t.y,o[14]=t.z,o[15]=i.x,o[16]=t.y,o[17]=t.z,o[18]=i.x,o[19]=i.y,o[20]=t.z,o[21]=t.x,o[22]=i.y,o[23]=t.z,o[24]=i.x,o[25]=t.y,o[26]=t.z,o[27]=i.x,o[28]=i.y,o[29]=t.z,o[30]=i.x,o[31]=i.y,o[32]=i.z,o[33]=i.x,o[34]=t.y,o[35]=i.z,o[36]=t.x,o[37]=t.y,o[38]=t.z,o[39]=t.x,o[40]=i.y,o[41]=t.z,o[42]=t.x,o[43]=i.y,o[44]=i.z,o[45]=t.x,o[46]=t.y,o[47]=i.z,o[48]=t.x,o[49]=i.y,o[50]=t.z,o[51]=i.x,o[52]=i.y,o[53]=t.z,o[54]=i.x,o[55]=i.y,o[56]=i.z,o[57]=t.x,o[58]=i.y,o[59]=i.z,o[60]=t.x,o[61]=t.y,o[62]=t.z,o[63]=i.x,o[64]=t.y,o[65]=t.z,o[66]=i.x,o[67]=t.y,o[68]=i.z,o[69]=t.x,o[70]=t.y,o[71]=i.z,a.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:o})),n.normal){var s=new Float32Array(72);s[0]=0,s[1]=0,s[2]=1,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=1,s[9]=0,s[10]=0,s[11]=1,s[12]=0,s[13]=0,s[14]=-1,s[15]=0,s[16]=0,s[17]=-1,s[18]=0,s[19]=0,s[20]=-1,s[21]=0,s[22]=0,s[23]=-1,s[24]=1,s[25]=0,s[26]=0,s[27]=1,s[28]=0,s[29]=0,s[30]=1,s[31]=0,s[32]=0,s[33]=1,s[34]=0,s[35]=0,s[36]=-1,s[37]=0,s[38]=0,s[39]=-1,s[40]=0,s[41]=0,s[42]=-1,s[43]=0,s[44]=0,s[45]=-1,s[46]=0,s[47]=0,s[48]=0,s[49]=1,s[50]=0,s[51]=0,s[52]=1,s[53]=0,s[54]=0,s[55]=1,s[56]=0,s[57]=0,s[58]=1,s[59]=0,s[60]=0,s[61]=-1,s[62]=0,s[63]=0,s[64]=-1,s[65]=0,s[66]=0,s[67]=-1,s[68]=0,s[69]=0,s[70]=-1,s[71]=0,a.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:s})}if(n.st){var l=new Float32Array(72),u=0;l[u++]=0,l[u++]=0,l[u++]=-1,l[u++]=1,l[u++]=0,l[u++]=-1,l[u++]=1,l[u++]=1,l[u++]=-1,l[u++]=0,l[u++]=1,l[u++]=-1,l[u++]=1,l[u++]=0,l[u++]=-1,l[u++]=0,l[u++]=0,l[u++]=-1,l[u++]=0,l[u++]=1,l[u++]=-1,l[u++]=1,l[u++]=1,l[u++]=-1,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,a.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:l})}if(n.tangent){var c=new Float32Array(72);c[0]=1,c[1]=0,c[2]=0,c[3]=1,c[4]=0,c[5]=0,c[6]=1,c[7]=0,c[8]=0,c[9]=1,c[10]=0,c[11]=0,c[12]=-1,c[13]=0,c[14]=0,c[15]=-1,c[16]=0,c[17]=0,c[18]=-1,c[19]=0,c[20]=0,c[21]=-1,c[22]=0,c[23]=0,c[24]=0,c[25]=1,c[26]=0,c[27]=0,c[28]=1,c[29]=0,c[30]=0,c[31]=1,c[32]=0,c[33]=0,c[34]=1,c[35]=0,c[36]=0,c[37]=-1,c[38]=0,c[39]=0,c[40]=-1,c[41]=0,c[42]=0,c[43]=-1,c[44]=0,c[45]=0,c[46]=-1,c[47]=0,c[48]=-1,c[49]=0,c[50]=0,c[51]=-1,c[52]=0,c[53]=0,c[54]=-1,c[55]=0,c[56]=0,c[57]=-1,c[58]=0,c[59]=0,c[60]=1,c[61]=0,c[62]=0,c[63]=1,c[64]=0,c[65]=0,c[66]=1,c[67]=0,c[68]=0,c[69]=1,c[70]=0,c[71]=0,a.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:c})}if(n.bitangent){var h=new Float32Array(72);h[0]=0,h[1]=1,h[2]=0,h[3]=0,h[4]=1,h[5]=0,h[6]=0,h[7]=1,h[8]=0,h[9]=0,h[10]=1,h[11]=0,h[12]=0,h[13]=1,h[14]=0,h[15]=0,h[16]=1,h[17]=0,h[18]=0,h[19]=1,h[20]=0,h[21]=0,h[22]=1,h[23]=0,h[24]=0,h[25]=0,h[26]=1,h[27]=0,h[28]=0,h[29]=1,h[30]=0,h[31]=0,h[32]=1,h[33]=0,h[34]=0,h[35]=1,h[36]=0,h[37]=0,h[38]=1,h[39]=0,h[40]=0,h[41]=1,h[42]=0,h[43]=0,h[44]=1,h[45]=0,h[46]=0,h[47]=1,h[48]=0,h[49]=0,h[50]=1,h[51]=0,h[52]=0,h[53]=1,h[54]=0,h[55]=0,h[56]=1,h[57]=0,h[58]=0,h[59]=1,h[60]=0,h[61]=0,h[62]=1,h[63]=0,h[64]=0,h[65]=1,h[66]=0,h[67]=0,h[68]=1,h[69]=0,h[70]=0,h[71]=1,a.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:h})}(r=new Uint16Array(36))[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=6,r[7]=5,r[8]=4,r[9]=7,r[10]=6,r[11]=4,r[12]=8,r[13]=9,r[14]=10,r[15]=8,r[16]=10,r[17]=11,r[18]=14,r[19]=13,r[20]=12,r[21]=15,r[22]=14,r[23]=12,r[24]=18,r[25]=17,r[26]=16,r[27]=19,r[28]=18,r[29]=16,r[30]=20,r[31]=21,r[32]=22,r[33]=20,r[34]=22,r[35]=23}else(o=new Float64Array(24))[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=i.x,o[4]=t.y,o[5]=t.z,o[6]=i.x,o[7]=i.y,o[8]=t.z,o[9]=t.x,o[10]=i.y,o[11]=t.z,o[12]=t.x,o[13]=t.y,o[14]=i.z,o[15]=i.x,o[16]=t.y,o[17]=i.z,o[18]=i.x,o[19]=i.y,o[20]=i.z,o[21]=t.x,o[22]=i.y,o[23]=i.z,a.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:o}),(r=new Uint16Array(36))[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;var d=o$1p.subtract(i,t,W$N),f=.5*o$1p.magnitude(d);if(e$2b(e._offsetAttribute)){var p=o.length,_=new Uint8Array(p/3);d$1s(_,e._offsetAttribute===_0x58701d.NONE?0:1),a.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new I$1p({attributes:a,indices:r,primitiveType:W$18.TRIANGLES,boundingSphere:new i$1c(o$1p.ZERO,f),offsetAttribute:e._offsetAttribute})}},O$y.getUnitBox=function(){return e$2b(u$J)||(u$J=O$y.createGeometry(O$y.fromDimensions({dimensions:new o$1p(1,1,1),vertexFormat:n$11.POSITION_ONLY}))),u$J},typeof cancelAnimationFrame<"u"&&(n$B=cancelAnimationFrame),function(){if(!e$2b(n$B)&&typeof window<"u")for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!e$2b(n$B);)e$2b(n$B=window[e[t]+"CancelAnimationFrame"])||(n$B=window[e[t]+"CancelRequestAnimationFrame"]),++t;e$2b(n$B)||(n$B=clearTimeout)}(),N$B.prototype.geocode=function(e){o$1q.typeOf.string("query",e);var t=e.match(/[^\s,\n]+/g);if(2===t.length||3===t.length){var i=+t[0],n=+t[1],r=3===t.length?+t[2]:300;if(isNaN(i)&&isNaN(n))for(var o=/^(\d+.?\d*)([nsew])/i,a=0;a<t.length;++a){var s=t[a].match(o);o.test(t[a])&&3===s.length&&(/^[ns]/i.test(s[2])?n=/^[n]/i.test(s[2])?+s[1]:-s[1]:/^[ew]/i.test(s[2])&&(i=/^[e]/i.test(s[2])?+s[1]:-s[1]))}if(!isNaN(i)&&!isNaN(n)&&!isNaN(r)){var l={displayName:e,destination:o$1p.fromDegrees(i,n,r)};return o$1l.resolve([l])}}return o$1l.resolve([])};var C$J={},b$T=new o$1p,Q$G=new o$1p,G$Q=new n$13,N$A=new p$1e;function W$M(e,t,i,n,r,o,a,s,l,u){var c=e+t;o$1p.multiplyByScalar(n,Math.cos(c),b$T),o$1p.multiplyByScalar(i,Math.sin(c),Q$G),o$1p.add(b$T,Q$G,b$T);var h=Math.cos(e);h*=h;var d=Math.sin(e);d*=d;var f=o/Math.sqrt(a*h+r*d)/s;return n$13.fromAxisAngle(b$T,f,G$Q),p$1e.fromQuaternion(G$Q,N$A),p$1e.multiplyByVector(N$A,l,u),o$1p.normalize(u,u),o$1p.multiplyByScalar(u,s,u),u}var U$J=new o$1p,Z$F=new o$1p,j$I=new o$1p,D$G=new o$1p;C$J.raisePositionsToHeight=function(e,t,i){for(var n=t.ellipsoid,r=t.height,o=t.extrudedHeight,a=i?e.length/3*2:e.length/3,s=new Float64Array(3*a),l=e.length,u=i?l:0,c=0;c<l;c+=3){var h=c+1,d=c+2,f=o$1p.fromArray(e,c,U$J);n.scaleToGeodeticSurface(f,f);var p=o$1p.clone(f,Z$F),_=n.geodeticSurfaceNormal(f,D$G),m=o$1p.multiplyByScalar(_,r,j$I);o$1p.add(f,m,f),i&&(o$1p.multiplyByScalar(_,o,m),o$1p.add(p,m,p),s[c+u]=p.x,s[h+u]=p.y,s[d+u]=p.z),s[c]=f.x,s[h]=f.y,s[d]=f.z}return s};var J$C=new o$1p,K$G=new o$1p,X$F=new o$1p;C$J.computeEllipsePositions=function(e,t,i){var n=e.semiMinorAxis,r=e.semiMajorAxis,o=e.rotation,a=e.center,s=8*e.granularity,l=n*n,u=r*r,c=r*n,h=o$1p.magnitude(a),d=o$1p.normalize(a,J$C),f=o$1p.cross(o$1p.UNIT_Z,a,K$G);f=o$1p.normalize(f,f);var p=o$1p.cross(d,f,X$F),_=1+Math.ceil(e$2a.PI_OVER_TWO/s),m=e$2a.PI_OVER_TWO/(_-1),g=e$2a.PI_OVER_TWO-_*m;g<0&&(_-=Math.ceil(Math.abs(g)/m));var x,v,y,$,b,T=t?new Array(3*(_*(_+2)*2)):void 0,C=0,S=U$J,w=Z$F,E=4*_*3,P=E-1,A=0,L=i?new Array(E):void 0;for(S=W$M(g=e$2a.PI_OVER_TWO,o,p,f,l,c,u,h,d,S),t&&(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z),i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x),g=e$2a.PI_OVER_TWO-m,x=1;x<_+1;++x){if(S=W$M(g,o,p,f,l,c,u,h,d,S),w=W$M(Math.PI-g,o,p,f,l,c,u,h,d,w),t){for(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z,y=2*x+2,v=1;v<y-1;++v)$=v/(y-1),b=o$1p.lerp(S,w,$,j$I),T[C++]=b.x,T[C++]=b.y,T[C++]=b.z;T[C++]=w.x,T[C++]=w.y,T[C++]=w.z}i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,L[A++]=w.x,L[A++]=w.y,L[A++]=w.z),g=e$2a.PI_OVER_TWO-(x+1)*m}for(x=_;x>1;--x){if(S=W$M(-(g=e$2a.PI_OVER_TWO-(x-1)*m),o,p,f,l,c,u,h,d,S),w=W$M(g+Math.PI,o,p,f,l,c,u,h,d,w),t){for(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z,y=2*(x-1)+2,v=1;v<y-1;++v)$=v/(y-1),b=o$1p.lerp(S,w,$,j$I),T[C++]=b.x,T[C++]=b.y,T[C++]=b.z;T[C++]=w.x,T[C++]=w.y,T[C++]=w.z}i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,L[A++]=w.x,L[A++]=w.y,L[A++]=w.z)}S=W$M(-(g=e$2a.PI_OVER_TWO),o,p,f,l,c,u,h,d,S);var M={};return t&&(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z,M.positions=T,M.numPts=_),i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,M.outerPositions=L),M};var te$t=new o$1p,xe$h=new o$1p,pe$n=new o$1p,Me$i=new o$1p,p$N=new o$1o,Te$h=new p$1e,Ye$a=new p$1e,_e$m=new n$13,Ee$j=new o$1p,Ne$f=new o$1p,Fe$g=new o$1p,le$r=new a$18,Se$c=new o$1p,Oe$h=new o$1o,Ce$f=new o$1o;function Pe$f(e,t,i){var n=t.vertexFormat,r=t.center,o=t.semiMajorAxis,a=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,u=i?e.length/3*2:e.length/3,c=t.shadowVolume,h=n.st?new Float32Array(2*u):void 0,d=n.normal?new Float32Array(3*u):void 0,f=n.tangent?new Float32Array(3*u):void 0,p=n.bitangent?new Float32Array(3*u):void 0,_=c?new Float32Array(3*u):void 0,m=0,g=Ee$j,x=Ne$f,v=Fe$g,y=new n$1b(s),$=y.project(s.cartesianToCartographic(r,le$r),Se$c),b=s.scaleToGeodeticSurface(r,te$t);s.geodeticSurfaceNormal(b,b);var T=Te$h,C=Ye$a;if(0!==l){var S=n$13.fromAxisAngle(b,l,_e$m);T=p$1e.fromQuaternion(S,T),S=n$13.fromAxisAngle(b,-l,_e$m),C=p$1e.fromQuaternion(S,C)}else T=p$1e.clone(p$1e.IDENTITY,T),C=p$1e.clone(p$1e.IDENTITY,C);for(var w=o$1o.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Oe$h),E=o$1o.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Ce$f),P=e.length,A=i?P:0,L=A/3*2,M=0;M<P;M+=3){var R=M+1,O=M+2,I=o$1p.fromArray(e,M,te$t);if(n.st){var D=p$1e.multiplyByVector(T,I,xe$h),B=y.project(s.cartesianToCartographic(D,le$r),pe$n);o$1p.subtract(B,$,B),p$N.x=(B.x+o)/(2*o),p$N.y=(B.y+a)/(2*a),w.x=Math.min(p$N.x,w.x),w.y=Math.min(p$N.y,w.y),E.x=Math.max(p$N.x,E.x),E.y=Math.max(p$N.y,E.y),i&&(h[m+L]=p$N.x,h[m+1+L]=p$N.y),h[m++]=p$N.x,h[m++]=p$N.y}(n.normal||n.tangent||n.bitangent||c)&&(g=s.geodeticSurfaceNormal(I,g),c&&(_[M+A]=-g.x,_[R+A]=-g.y,_[O+A]=-g.z),(n.normal||n.tangent||n.bitangent)&&((n.tangent||n.bitangent)&&(x=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,g,x),x),p$1e.multiplyByVector(C,x,x)),n.normal&&(d[M]=g.x,d[R]=g.y,d[O]=g.z,i&&(d[M+A]=-g.x,d[R+A]=-g.y,d[O+A]=-g.z)),n.tangent&&(f[M]=x.x,f[R]=x.y,f[O]=x.z,i&&(f[M+A]=-x.x,f[R+A]=-x.y,f[O+A]=-x.z)),n.bitangent&&(v=o$1p.normalize(o$1p.cross(g,x,v),v),p[M]=v.x,p[R]=v.y,p[O]=v.z,i&&(p[M+A]=v.x,p[R+A]=v.y,p[O+A]=v.z))))}if(n.st){P=h.length;for(var N=0;N<P;N+=2)h[N]=(h[N]-w.x)/(E.x-w.x),h[N+1]=(h[N+1]-w.y)/(E.y-w.y)}var F=new a$_;if(n.position){var U=C$J.raisePositionsToHeight(e,t,i);F.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:U})}if(n.st&&(F.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:h})),n.normal&&(F.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:d})),n.tangent&&(F.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:f})),n.bitangent&&(F.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:p})),c&&(F.extrudeDirection=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:_})),i&&e$2b(t.offsetAttribute)){var G=new Uint8Array(u);if(t.offsetAttribute===_0x58701d.TOP)G=d$1s(G,1,0,u/2);else G=d$1s(G,t.offsetAttribute===_0x58701d.NONE?0:1);F.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:G})}return F}function Ie$e(e){var t,i,n,r,o,a=new Array(e*(e+1)*12-6),s=0;for(t=0,n=1,r=0;r<3;r++)a[s++]=n++,a[s++]=t,a[s++]=n;for(r=2;r<e+1;++r){for(n=r*(r+1)-1,t=(r-1)*r-1,a[s++]=n++,a[s++]=t,a[s++]=n,i=2*r,o=0;o<i-1;++o)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;a[s++]=n++,a[s++]=t,a[s++]=n}for(i=2*e,++n,++t,r=0;r<i-1;++r)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;for(a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t++,a[s++]=t,++t,r=e-1;r>1;--r){for(a[s++]=t++,a[s++]=t,a[s++]=n,i=2*r,o=0;o<i-1;++o)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;a[s++]=t++,a[s++]=t++,a[s++]=n++}for(r=0;r<3;r++)a[s++]=t++,a[s++]=t,a[s++]=n;return a}var $$H=new o$1p;function ke$8(e){var t=e.center;$$H=o$1p.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,$$H),e.height,$$H);var i=new i$1c($$H=o$1p.add(t,$$H,$$H),e.semiMajorAxis),n=C$J.computeEllipsePositions(e,!0,!1),r=n.positions,o=n.numPts,a=Pe$f(r,e,!1),s=Ie$e(o);return{boundingSphere:i,attributes:a,indices:s=ce$x.createTypedArray(r.length/3,s)}}function Ue$d(e,t){var i=t.vertexFormat,n=t.center,r=t.semiMajorAxis,o=t.semiMinorAxis,a=t.ellipsoid,s=t.height,l=t.extrudedHeight,u=t.stRotation,c=e.length/3*2,h=new Float64Array(3*c),d=i.st?new Float32Array(2*c):void 0,f=i.normal?new Float32Array(3*c):void 0,p=i.tangent?new Float32Array(3*c):void 0,_=i.bitangent?new Float32Array(3*c):void 0,m=t.shadowVolume,g=m?new Float32Array(3*c):void 0,x=0,v=Ee$j,y=Ne$f,$=Fe$g,b=new n$1b(a),T=b.project(a.cartesianToCartographic(n,le$r),Se$c),C=a.scaleToGeodeticSurface(n,te$t);a.geodeticSurfaceNormal(C,C);for(var S=n$13.fromAxisAngle(C,u,_e$m),w=p$1e.fromQuaternion(S,Te$h),E=o$1o.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Oe$h),P=o$1o.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Ce$f),A=e.length,L=A/3*2,M=0;M<A;M+=3){var R,O=M+1,I=M+2,D=o$1p.fromArray(e,M,te$t);if(i.st){var B=p$1e.multiplyByVector(w,D,xe$h),N=b.project(a.cartesianToCartographic(B,le$r),pe$n);o$1p.subtract(N,T,N),p$N.x=(N.x+r)/(2*r),p$N.y=(N.y+o)/(2*o),E.x=Math.min(p$N.x,E.x),E.y=Math.min(p$N.y,E.y),P.x=Math.max(p$N.x,P.x),P.y=Math.max(p$N.y,P.y),d[x+L]=p$N.x,d[x+1+L]=p$N.y,d[x++]=p$N.x,d[x++]=p$N.y}D=a.scaleToGeodeticSurface(D,D),R=o$1p.clone(D,xe$h),v=a.geodeticSurfaceNormal(D,v),m&&(g[M+A]=-v.x,g[O+A]=-v.y,g[I+A]=-v.z);var F=o$1p.multiplyByScalar(v,s,Me$i);if(D=o$1p.add(D,F,D),F=o$1p.multiplyByScalar(v,l,F),R=o$1p.add(R,F,R),i.position&&(h[M+A]=R.x,h[O+A]=R.y,h[I+A]=R.z,h[M]=D.x,h[O]=D.y,h[I]=D.z),i.normal||i.tangent||i.bitangent){$=o$1p.clone(v,$);var U=o$1p.fromArray(e,(M+3)%A,Me$i);o$1p.subtract(U,D,U);var G=o$1p.subtract(R,D,pe$n);v=o$1p.normalize(o$1p.cross(G,U,v),v),i.normal&&(f[M]=v.x,f[O]=v.y,f[I]=v.z,f[M+A]=v.x,f[O+A]=v.y,f[I+A]=v.z),i.tangent&&(y=o$1p.normalize(o$1p.cross($,v,y),y),p[M]=y.x,p[O]=y.y,p[I]=y.z,p[M+A]=y.x,p[M+1+A]=y.y,p[M+2+A]=y.z),i.bitangent&&(_[M]=$.x,_[O]=$.y,_[I]=$.z,_[M+A]=$.x,_[O+A]=$.y,_[I+A]=$.z)}}if(i.st){A=d.length;for(var z=0;z<A;z+=2)d[z]=(d[z]-E.x)/(P.x-E.x),d[z+1]=(d[z+1]-E.y)/(P.y-E.y)}var V=new a$_;if(i.position&&(V.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:h})),i.st&&(V.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:d})),i.normal&&(V.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:f})),i.tangent&&(V.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:p})),i.bitangent&&(V.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:_})),m&&(V.extrudeDirection=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:g})),e$2b(t.offsetAttribute)){var k=new Uint8Array(c);if(t.offsetAttribute===_0x58701d.TOP)k=d$1s(k,1,0,c/2);else k=d$1s(k,t.offsetAttribute===_0x58701d.NONE?0:1);V.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:k})}return V}function We$d(e){for(var t=e.length/3,i=ce$x.createTypedArray(t,6*t),n=0,r=0;r<t;r++){var o=r,a=r+t,s=(o+1)%t,l=s+t;i[n++]=o,i[n++]=a,i[n++]=s,i[n++]=s,i[n++]=a,i[n++]=l}return i}var de$n=new i$1c,Ae$j=new i$1c;function qe$8(e){var t=e.center,i=e.ellipsoid,n=e.semiMajorAxis,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,te$t),e.height,te$t);de$n.center=o$1p.add(t,r,de$n.center),de$n.radius=n,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,r),e.extrudedHeight,r),Ae$j.center=o$1p.add(t,r,Ae$j.center),Ae$j.radius=n;var o=C$J.computeEllipsePositions(e,!0,!0),a=o.positions,s=o.numPts,l=o.outerPositions,u=i$1c.union(de$n,Ae$j),c=Pe$f(a,e,!0),h=Ie$e(s),d=h.length;h.length=2*d;for(var f=a.length/3,p=0;p<d;p+=3)h[p+d]=h[p+2]+f,h[p+1+d]=h[p+1]+f,h[p+2+d]=h[p]+f;var _=new I$1p({attributes:c,indices:ce$x.createTypedArray(2*f/3,h),primitiveType:W$18.TRIANGLES}),m=Ue$d(l,e);h=We$d(l);var g=new I$1p({attributes:m,indices:ce$x.createTypedArray(2*l.length/3,h),primitiveType:W$18.TRIANGLES}),x=k$13.combineInstances([new d$1o({geometry:_}),new d$1o({geometry:g})]);return{boundingSphere:u,attributes:x[0].attributes,indices:x[0].indices}}function Re$g(e,t,i,n,r,o,a){for(var s=C$J.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:i,rotation:n,granularity:r},!1,!0).outerPositions,l=s.length/3,u=new Array(l),c=0;c<l;++c)u[c]=o$1p.fromArray(s,3*c);var h=h$18.fromCartesianArray(u,o,a);return h.width>e$2a.PI&&(h.north=h.north>0?e$2a.PI_OVER_TWO-e$2a.EPSILON7:h.north,h.south=h.south<0?e$2a.EPSILON7-e$2a.PI_OVER_TWO:h.south,h.east=e$2a.PI,h.west=-e$2a.PI),h}function Y$y(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).center,i=u$_(e.ellipsoid,t$13.WGS84),n=e.semiMajorAxis,r=e.semiMinorAxis,o=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),a=u$_(e.vertexFormat,n$11.DEFAULT);if(o$1q.defined("options.center",t),o$1q.typeOf.number("options.semiMajorAxis",n),o$1q.typeOf.number("options.semiMinorAxis",r),n<r)throw new t$16("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(o<=0)throw new t$16("granularity must be greater than zero.");var s=u$_(e.height,0),l=u$_(e.extrudedHeight,s);this._center=o$1p.clone(t),this._semiMajorAxis=n,this._semiMinorAxis=r,this._ellipsoid=t$13.clone(i),this._rotation=u$_(e.rotation,0),this._stRotation=u$_(e.stRotation,0),this._height=Math.max(l,s),this._granularity=o,this._vertexFormat=n$11.clone(a),this._extrudedHeight=Math.min(l,s),this._shadowVolume=u$_(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}Y$y.packedLength=o$1p.packedLength+t$13.packedLength+n$11.packedLength+9,Y$y.pack=function(e,t,i){return o$1q.defined("value",e),o$1q.defined("array",t),i=u$_(i,0),o$1p.pack(e._center,t,i),i+=o$1p.packedLength,t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=u$_(e._offsetAttribute,-1),t};var je$a=new o$1p,De$i=new t$13,Ve$d=new n$11,k$E={center:je$a,ellipsoid:De$i,vertexFormat:Ve$d,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};function Qe$7(e){var t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];for(var i=C$J.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,n=i.length/3,r=new Array(n),o=0;o<n;++o)r[o]=o$1p.fromArray(i,3*o);var a=e._ellipsoid,s=e.rectangle;return I$1p._textureCoordinateRotationPoints(r,t,a,s)}function n$A(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).radius;o$1q.typeOf.number("radius",t);var i={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new Y$y(i),this._workerName="createCircleGeometry"}Y$y.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=o$1p.unpack(e,t,je$a);t+=o$1p.packedLength;var r=t$13.unpack(e,t,De$i);t+=t$13.packedLength;var o=n$11.unpack(e,t,Ve$d);t+=n$11.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=1===e[t++],p=e[t];return e$2b(i)?(i._center=o$1p.clone(n,i._center),i._ellipsoid=t$13.clone(r,i._ellipsoid),i._vertexFormat=n$11.clone(o,i._vertexFormat),i._semiMajorAxis=a,i._semiMinorAxis=s,i._rotation=l,i._stRotation=u,i._height=c,i._granularity=h,i._extrudedHeight=d,i._shadowVolume=f,i._offsetAttribute=-1===p?void 0:p,i):(k$E.height=c,k$E.extrudedHeight=d,k$E.granularity=h,k$E.stRotation=u,k$E.rotation=l,k$E.semiMajorAxis=a,k$E.semiMinorAxis=s,k$E.shadowVolume=f,k$E.offsetAttribute=-1===p?void 0:p,new Y$y(k$E))},Y$y.computeRectangle=function(e,t){var i=(e=u$_(e,u$_.EMPTY_OBJECT)).center,n=u$_(e.ellipsoid,t$13.WGS84),r=e.semiMajorAxis,o=e.semiMinorAxis,a=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),s=u$_(e.rotation,0);if(o$1q.defined("options.center",i),o$1q.typeOf.number("options.semiMajorAxis",r),o$1q.typeOf.number("options.semiMinorAxis",o),r<o)throw new t$16("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(a<=0)throw new t$16("granularity must be greater than zero.");return Re$g(i,r,o,s,a,n,t)},Y$y.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,n=!e$2a.equalsEpsilon(t,i,0,e$2a.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var r,o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation};if(n)o.extrudedHeight=i,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=qe$8(o);else if(r=ke$8(o),e$2b(e._offsetAttribute)){var a=r.attributes.position.values.length,s=new Uint8Array(a/3);d$1s(s,e._offsetAttribute===_0x58701d.NONE?0:1),r.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:s})}return new I$1p({attributes:r.attributes,indices:r.indices,primitiveType:W$18.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})}},Y$y.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new Y$y({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:r,rotation:e._rotation,stRotation:e._stRotation,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$11.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(Y$y.prototype,{rectangle:{get:function(){return e$2b(this._rectangle)||(this._rectangle=Re$g(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e$2b(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Qe$7(this)),this._textureCoordinateRotationPoints}}}),n$A.packedLength=Y$y.packedLength,n$A.pack=function(e,t,i){return o$1q.typeOf.object("value",e),Y$y.pack(e._ellipseGeometry,t,i)};var x$N=new Y$y({center:new o$1p,semiMajorAxis:1,semiMinorAxis:1}),t$C={center:new o$1p,radius:void 0,ellipsoid:t$13.clone(t$13.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new n$11,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};n$A.unpack=function(e,t,i){var n=Y$y.unpack(e,t,x$N);return t$C.center=o$1p.clone(n._center,t$C.center),t$C.ellipsoid=t$13.clone(n._ellipsoid,t$C.ellipsoid),t$C.height=n._height,t$C.extrudedHeight=n._extrudedHeight,t$C.granularity=n._granularity,t$C.vertexFormat=n$11.clone(n._vertexFormat,t$C.vertexFormat),t$C.stRotation=n._stRotation,t$C.shadowVolume=n._shadowVolume,e$2b(i)?(t$C.semiMajorAxis=n._semiMajorAxis,t$C.semiMinorAxis=n._semiMinorAxis,i._ellipseGeometry=new Y$y(t$C),i):(t$C.radius=n._semiMajorAxis,new n$A(t$C))},n$A.createGeometry=function(e){return Y$y.createGeometry(e._ellipseGeometry)},n$A.createShadowVolume=function(e,t,i){var n=e._ellipseGeometry._granularity,r=e._ellipseGeometry._ellipsoid,o=t(n,r),a=i(n,r);return new n$A({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:r,stRotation:e._ellipseGeometry._stRotation,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$11.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(n$A.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var V$y=new o$1p,g$R=new o$1p;function F$L(e){var t=e.center;g$R=o$1p.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,g$R),e.height,g$R);var i=new i$1c(g$R=o$1p.add(t,g$R,g$R),e.semiMajorAxis),n=C$J.computeEllipsePositions(e,!1,!0).outerPositions,r=u$_(e.outlineWidth,1);r>1&&n.push(n[0],n[1],n[2]);var o=new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:C$J.raisePositionsToHeight(n,e,!1)})});r>1&&(o.sideness=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:new Float32Array([0,0,0,1,1,1,1,0])}),o.sideness.isInstanceAttribute=!0);for(var a=n.length/3,s=ce$x.createTypedArray(a,2*a),l=0,u=0;u<a;++u)s[l++]=u,s[l++]=(u+1)%a;return{boundingSphere:i,attributes:o,indices:s}}var N$z=new i$1c,j$H=new i$1c;function Y$x(e){var t=e.center,i=e.ellipsoid,n=e.semiMajorAxis,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,V$y),e.height,V$y);N$z.center=o$1p.add(t,r,N$z.center),N$z.radius=n,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,r),e.extrudedHeight,r),j$H.center=o$1p.add(t,r,j$H.center),j$H.radius=n;var o=C$J.computeEllipsePositions(e,!1,!0).outerPositions,a=new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:C$J.raisePositionsToHeight(o,e,!0)})});o=a.position.values;var s=i$1c.union(N$z,j$H),l=o.length/3;if(e$2b(e.offsetAttribute)){var u=new Uint8Array(l);if(e.offsetAttribute===_0x58701d.TOP)u=d$1s(u,1,0,l/2);else u=d$1s(u,e.offsetAttribute===_0x58701d.NONE?0:1);a.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}var c=u$_(e.numberOfVerticalLines,16);c=e$2a.clamp(c,0,l/2);var h=ce$x.createTypedArray(l,2*l+2*c);l/=2;var d,f,p=0;for(d=0;d<l;++d)h[p++]=d,h[p++]=(d+1)%l,h[p++]=d+l,h[p++]=(d+1)%l+l;if(c>0){var _=Math.min(c,l);f=Math.round(l/_);var m=Math.min(f*c,l);for(d=0;d<m;d+=f)h[p++]=d,h[p++]=d+l}return{boundingSphere:s,attributes:a,indices:h}}function M$L(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).center,i=u$_(e.ellipsoid,t$13.WGS84),n=e.semiMajorAxis,r=e.semiMinorAxis,o=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE);if(!e$2b(t))throw new t$16("center is required.");if(!e$2b(n))throw new t$16("semiMajorAxis is required.");if(!e$2b(r))throw new t$16("semiMinorAxis is required.");if(n<r)throw new t$16("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(o<=0)throw new t$16("granularity must be greater than zero.");var a=u$_(e.height,0),s=u$_(e.extrudedHeight,a);this._center=o$1p.clone(t),this._semiMajorAxis=n,this._semiMinorAxis=r,this._ellipsoid=t$13.clone(i),this._rotation=u$_(e.rotation,0),this._height=Math.max(s,a),this._granularity=o,this._extrudedHeight=Math.min(s,a),this._numberOfVerticalLines=Math.max(u$_(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._outlineWidth=u$_(e.outlineWidth,1),this._workerName="createEllipseOutlineGeometry"}M$L.packedLength=o$1p.packedLength+t$13.packedLength+9,M$L.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),o$1p.pack(e._center,t,i),i+=o$1p.packedLength,t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i++]=u$_(e._offsetAttribute,-1),t[i]=e._outlineWidth,t};var B$G=new o$1p,q$N=new t$13,A$P={center:B$G,ellipsoid:q$N,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0,outlineWidth:void 0};function a$H(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).radius;o$1q.typeOf.number("radius",t);var i={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new M$L(i),this._workerName="createCircleOutlineGeometry"}M$L.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n=o$1p.unpack(e,t,B$G);t+=o$1p.packedLength;var r=t$13.unpack(e,t,q$N);t+=t$13.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=e[t];return e$2b(i)?(i._center=o$1p.clone(n,i._center),i._ellipsoid=t$13.clone(r,i._ellipsoid),i._semiMajorAxis=o,i._semiMinorAxis=a,i._rotation=s,i._height=l,i._granularity=u,i._extrudedHeight=c,i._numberOfVerticalLines=h,i._offsetAttribute=-1===d?void 0:d,i._outlineWidth=f,i):(A$P.height=l,A$P.extrudedHeight=c,A$P.granularity=u,A$P.rotation=s,A$P.semiMajorAxis=o,A$P.semiMinorAxis=a,A$P.numberOfVerticalLines=h,A$P.offsetAttribute=-1===d?void 0:d,A$P.outlineWidth=f,new M$L(A$P))},M$L.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,n=!e$2a.equalsEpsilon(t,i,0,e$2a.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var r,o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,outlineWidth:e._outlineWidth,numberOfVerticalLines:e._numberOfVerticalLines};if(n)o.extrudedHeight=i,o.offsetAttribute=e._offsetAttribute,r=Y$x(o);else if(r=F$L(o),e$2b(e._offsetAttribute)){var a=r.attributes.position.values.length,s=new Uint8Array(a/3);d$1s(s,e._offsetAttribute===_0x58701d.NONE?0:1),r.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:s})}return new I$1p({attributes:r.attributes,indices:r.indices,primitiveType:e._outlineWidth>1?W$18.TRIANGLES:W$18.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})}},a$H.packedLength=M$L.packedLength,a$H.pack=function(e,t,i){return o$1q.typeOf.object("value",e),M$L.pack(e._ellipseGeometry,t,i)};var c$I=new M$L({center:new o$1p,semiMajorAxis:1,semiMinorAxis:1}),i$M={center:new o$1p,radius:void 0,ellipsoid:t$13.clone(t$13.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};a$H.unpack=function(e,t,i){var n=M$L.unpack(e,t,c$I);return i$M.center=o$1p.clone(n._center,i$M.center),i$M.ellipsoid=t$13.clone(n._ellipsoid,i$M.ellipsoid),i$M.height=n._height,i$M.extrudedHeight=n._extrudedHeight,i$M.granularity=n._granularity,i$M.numberOfVerticalLines=n._numberOfVerticalLines,e$2b(i)?(i$M.semiMajorAxis=n._semiMajorAxis,i$M.semiMinorAxis=n._semiMinorAxis,i._ellipseGeometry=new M$L(i$M),i):(i$M.radius=n._semiMajorAxis,new a$H(i$M))},a$H.createGeometry=function(e){return M$L.createGeometry(e._ellipseGeometry)};var e$10={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},tt$9=Object.freeze(e$10),e$$={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},g$Q=Object.freeze(e$$);function u$I(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).currentTime,i=e.startTime,n=e.stopTime;if(t=e$2b(t)?a$15.clone(t):e$2b(i)?a$15.clone(i):e$2b(n)?a$15.addDays(n,-1,new a$15):a$15.now(),i=e$2b(i)?a$15.clone(i):a$15.clone(t),n=e$2b(n)?a$15.clone(n):a$15.addDays(i,1,new a$15),a$15.greaterThan(i,n))throw new t$16("startTime must come before stopTime.");this.startTime=i,this.stopTime=n,this.clockRange=u$_(e.clockRange,tt$9.UNBOUNDED),this.canAnimate=u$_(e.canAnimate,!0),this.onTick=new o$1h,this.onStop=new o$1h,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Et$a(),this.currentTime=t,this.multiplier=u$_(e.multiplier,1),this.shouldAnimate=u$_(e.shouldAnimate,!1),this.clockStep=u$_(e.clockStep,g$Q.SYSTEM_CLOCK_MULTIPLIER)}Object.defineProperties(u$I.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){a$15.equals(this._currentTime,e)||(this._clockStep===g$Q.SYSTEM_CLOCK&&(this._clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===g$Q.SYSTEM_CLOCK&&(this._clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===g$Q.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=a$15.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===g$Q.SYSTEM_CLOCK&&(this._clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}}),u$I.prototype.tick=function(){var e=Et$a(),t=a$15.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){var i=this._clockStep;if(i===g$Q.SYSTEM_CLOCK)t=a$15.now(t);else{var n=this._multiplier;if(i===g$Q.TICK_DEPENDENT)t=a$15.addSeconds(t,n,t);else{var r=e-this._lastSystemTime;t=a$15.addSeconds(t,n*(r/1e3),t)}var o=this.clockRange,a=this.startTime,s=this.stopTime;if(o===tt$9.CLAMPED)a$15.lessThan(t,a)?t=a$15.clone(a,t):a$15.greaterThan(t,s)&&(t=a$15.clone(s,t),this.onStop.raiseEvent(this));else if(o===tt$9.LOOP_STOP)for(a$15.lessThan(t,a)&&(t=a$15.clone(a,t));a$15.greaterThan(t,s);)t=a$15.addSeconds(a,a$15.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};const e$_={Webgl1:1,Webgl2:2,WebGPU:3};var De$h=Object.freeze(e$_),g$P={},B$F=new o$1p,C$I=new o$1p,y$H=new o$1p,P$I=new o$1p,M$K=new y$Z;function w$H(e,t,i,n,r){var o=o$1p.subtract(e,t,B$F),a=o$1p.dot(i,o),s=o$1p.dot(n,o);return o$1o.fromElements(a,s,r)}g$P.validOutline=function(e){o$1q.defined("positions",e);var t=y$Z.fromPoints(e,M$K).halfAxes,i=p$1e.getColumn(t,0,C$I),n=p$1e.getColumn(t,1,y$H),r=p$1e.getColumn(t,2,P$I),o=o$1p.magnitude(i),a=o$1p.magnitude(n),s=o$1p.magnitude(r);return!(0===o&&(0===a||0===s)||0===a&&0===s)},g$P.computeProjectTo2DArguments=function(e,t,i,n){o$1q.defined("positions",e),o$1q.defined("centerResult",t),o$1q.defined("planeAxis1Result",i),o$1q.defined("planeAxis2Result",n);var r,o,a=y$Z.fromPoints(e,M$K),s=a.halfAxes,l=p$1e.getColumn(s,0,C$I),u=p$1e.getColumn(s,1,y$H),c=p$1e.getColumn(s,2,P$I),h=o$1p.magnitude(l),d=o$1p.magnitude(u),f=o$1p.magnitude(c),p=Math.min(h,d,f);return(0!==h||0!==d&&0!==f)&&(0!==d||0!==f)&&((p===d||p===f)&&(r=l),p===h?r=u:p===f&&(o=u),(p===h||p===d)&&(o=c),o$1p.normalize(r,i),o$1p.normalize(o,n),o$1p.clone(a.center,t),!0)},g$P.createProjectPointsTo2DFunction=function(e,t,i){return function(n){for(var r=new Array(n.length),o=0;o<n.length;o++)r[o]=w$H(n[o],e,t,i);return r}},g$P.createProjectPointTo2DFunction=function(e,t,i){return function(n,r){return w$H(n,e,t,i,r)}};var ce$l=new o$1p,pe$m=new f$18,se$n=new o$1o,me$n=new o$1o,le$q=new o$1p,ve$i=new o$1p,fe$k=new o$1p,C$H=new o$1p,ye$g=new o$1p,he$j=new o$1p,W$L=new n$13,ue$p=new p$1e,de$m=new p$1e,ge$i=new o$1p;function we$h(e,t,i,n,r,o,a,s){var l=e.positions,u=A$1g.triangulate(e.positions2D,e.holes);u.length<3&&(u=[0,1,2]);var c=ce$x.createTypedArray(l.length,u.length);c.set(u);var h=ue$p;if(0!==n){var d=n$13.fromAxisAngle(o,n,W$L);if(h=p$1e.fromQuaternion(d,h),t.tangent||t.bitangent){d=n$13.fromAxisAngle(o,-n,W$L);var f=p$1e.fromQuaternion(d,de$m);a=o$1p.normalize(p$1e.multiplyByVector(f,a,a),a),t.bitangent&&(s=o$1p.normalize(o$1p.cross(o,a,s),s))}}else h=p$1e.clone(p$1e.IDENTITY,h);var p=me$n;t.st&&(p.x=i.x,p.y=i.y);for(var _=l.length,m=3*_,g=new Float64Array(m),x=t.normal?new Float32Array(m):void 0,v=t.tangent?new Float32Array(m):void 0,y=t.bitangent?new Float32Array(m):void 0,$=t.st?new Float32Array(2*_):void 0,b=0,T=0,C=0,S=0,w=0,E=0;E<_;E++){var P=l[E];if(g[b++]=P.x,g[b++]=P.y,g[b++]=P.z,t.st){var A=r(p$1e.multiplyByVector(h,P,ce$l),se$n);o$1o.subtract(A,p,A);var L=e$2a.clamp(A.x/i.width,0,1),M=e$2a.clamp(A.y/i.height,0,1);$[w++]=L,$[w++]=M}t.normal&&(x[T++]=o.x,x[T++]=o.y,x[T++]=o.z),t.tangent&&(v[S++]=a.x,v[S++]=a.y,v[S++]=a.z),t.bitangent&&(y[C++]=s.x,y[C++]=s.y,y[C++]=s.z)}var R=new a$_;return t.position&&(R.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:g})),t.normal&&(R.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:x})),t.tangent&&(R.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:v})),t.bitangent&&(R.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:y})),t.st&&(R.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:$})),new I$1p({attributes:R,indices:c,primitiveType:W$18.TRIANGLES})}function P$H(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).polygonHierarchy;o$1q.defined("options.polygonHierarchy",t);var i=u$_(e.vertexFormat,n$11.DEFAULT);this._vertexFormat=n$11.clone(i),this._polygonHierarchy=t,this._stRotation=u$_(e.stRotation,0),this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._workerName="createCoplanarPolygonGeometry",this.packedLength=y$_.computeHierarchyPackedLength(t)+n$11.packedLength+t$13.packedLength+2}P$H.fromPositions=function(e){return e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new P$H({polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid})},P$H.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),i=y$_.packPolygonHierarchy(e._polygonHierarchy,t,i),t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._stRotation,t[i]=e.packedLength,t};var Pe$e=t$13.clone(t$13.UNIT_SPHERE),Ae$i=new n$11,be$m={polygonHierarchy:{}};function T$H(e){for(var t=e.length,i=new Float64Array(3*t),n=ce$x.createTypedArray(t,2*t),r=0,o=0,a=0;a<t;a++){var s=e[a];i[r++]=s.x,i[r++]=s.y,i[r++]=s.z,n[o++]=a,n[o++]=(a+1)%t}return new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:i})}),indices:n,primitiveType:W$18.LINES})}function a$G(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).polygonHierarchy;o$1q.defined("options.polygonHierarchy",t),this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=y$_.computeHierarchyPackedLength(t)+1}P$H.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=y$_.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=t$13.unpack(e,t,Pe$e);t+=t$13.packedLength;var o=n$11.unpack(e,t,Ae$i);t+=n$11.packedLength;var a=e[t++],s=e[t];return e$2b(i)||(i=new P$H(be$m)),i._polygonHierarchy=n,i._ellipsoid=t$13.clone(r,i._ellipsoid),i._vertexFormat=n$11.clone(o,i._vertexFormat),i._stRotation=a,i.packedLength=s,i},P$H.createGeometry=function(e){var t=e._vertexFormat,i=e._polygonHierarchy,n=e._stRotation,r=i.positions;if(!((r=D$11(r,o$1p.equalsEpsilon,!0)).length<3)){var o=le$q,a=ve$i,s=fe$k,l=ye$g,u=he$j;if(g$P.computeProjectTo2DArguments(r,C$H,l,u)){if(o=o$1p.cross(l,u,o),o=o$1p.normalize(o,o),!o$1p.equalsEpsilon(C$H,o$1p.ZERO,e$2a.EPSILON6)){var c=e._ellipsoid.geodeticSurfaceNormal(C$H,ge$i);o$1p.dot(o,c)<0&&(o=o$1p.negate(o,o),l=o$1p.negate(l,l))}var h=g$P.createProjectPointsTo2DFunction(C$H,l,u),d=g$P.createProjectPointTo2DFunction(C$H,l,u);t.tangent&&(a=o$1p.clone(l,a)),t.bitangent&&(s=o$1p.clone(u,s));var f=y$_.polygonsFromHierarchy(i,h,!1),p=f.hierarchy,_=f.polygons;if(0!==p.length){r=p[0].outerRing;for(var m=i$1c.fromPoints(r),g=y$_.computeBoundingRectangle(o,d,r,n,pe$m),x=[],v=0;v<_.length;v++){var y=new d$1o({geometry:we$h(_[v],t,g,n,d,o,a,s)});x.push(y)}var $=k$13.combineInstances(x)[0];$.attributes.position.values=new Float64Array($.attributes.position.values),$.indices=ce$x.createTypedArray($.attributes.position.values.length/3,$.indices);var b=$.attributes;return t.position||delete b.position,new I$1p({attributes:b,indices:$.indices,primitiveType:$.primitiveType,boundingSphere:m})}}}},a$G.fromPositions=function(e){return e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new a$G({polygonHierarchy:{positions:e.positions}})},a$G.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i=y$_.packPolygonHierarchy(e._polygonHierarchy,t,i)]=e.packedLength,t};var C$G={polygonHierarchy:{}};a$G.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=y$_.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=e[t];return e$2b(i)||(i=new a$G(C$G)),i._polygonHierarchy=n,i.packedLength=r,i},a$G.createGeometry=function(e){var t=e._polygonHierarchy,i=t.positions;if(!((i=D$11(i,o$1p.equalsEpsilon,!0)).length<3)&&g$P.validOutline(i)){var n=y$_.polygonOutlinesFromHierarchy(t,!1);if(0!==n.length){for(var r=[],o=0;o<n.length;o++){var a=new d$1o({geometry:T$H(n[o])});r.push(a)}var s=k$13.combineInstances(r)[0],l=i$1c.fromPoints(t.positions);return new I$1p({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:l})}}};var e$Z={ROUNDED:0,MITERED:1,BEVELED:2},ar$5=Object.freeze(e$Z),g$O=[new o$1p,new o$1p],hr$2=new o$1p,gr$2=new o$1p,dr$1=new o$1p,pr$2=new o$1p,wr$2=new o$1p,Sr$1=new o$1p,Br$2=new o$1p,xr$3=new o$1p,Er$2=new o$1p,X$E=new o$1p,er$7=new o$1p,J$B={},ur$2=new a$18;function Tr$2(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++){var r=e[n];ur$2=t.cartesianToCartographic(r,ur$2),i[n]=ur$2.height,e[n]=t.scaleToGeodeticSurface(r,r)}return i}function $$G(e,t,i,n){var r,o=e[0],a=e[1],s=o$1p.angleBetween(o,a),l=Math.ceil(s/n),u=new Array(l);if(t===i){for(r=0;r<l;r++)u[r]=t;return u.push(i),u}var c=(i-t)/l;for(r=1;r<l;r++){var h=t+r*c;u[r]=h}return u[0]=t,u.push(i),u}var nr$5=new o$1p,tr$5=new o$1p;function zr$3(e,t,i,n){var r=new f$14(i,n),o=r.projectPointOntoPlane(o$1p.add(i,e,nr$5),nr$5),a=r.projectPointOntoPlane(o$1p.add(i,t,tr$5),tr$5),s=o$1o.angleBetween(o,a);return a.x*o.y-a.y*o.x>=0?-s:s}var Ar$1=new o$1p(-1,0,0),D$F=p$1d.clone(p$1d.IDENTITY),Cr$2=new p$1d,R$F=new p$1e,Nr$1=p$1e.IDENTITY.clone(),Fr$1=new o$1p,Lr$2=new e$29,vr$3=new o$1p;function I$U(e,t,i,n,r,o,a,s){var l=Fr$1,u=Lr$2;D$F=m$17.eastNorthUpToFixedFrame(e,r,D$F),l=p$1d.multiplyByPointAsVector(D$F,Ar$1,l);var c=zr$3(l=o$1p.normalize(l,l),t,e,r);R$F=p$1e.fromRotationZ(c,R$F),vr$3.z=o,D$F=p$1d.multiplyTransformation(D$F,p$1d.fromRotationTranslation(R$F,vr$3,Cr$2),D$F);var h=Nr$1;h[0]=a;for(var d=0;d<s;d++)for(var f=0;f<i.length;f+=3)u=o$1p.fromArray(i,f,u),u=p$1e.multiplyByVector(h,u,u),u=p$1d.multiplyByPoint(D$F,u,u),n.push(u.x,u.y,u.z);return n}function k$D(e,t,i,n,r,o,a,s,l){var u=Fr$1,c=Lr$2;D$F=m$17.eastNorthUpToFixedFrame(e,r,D$F),u=p$1d.multiplyByPointAsVector(D$F,Ar$1,u);var h=zr$3(u=o$1p.normalize(u,u),t,e,r);R$F=p$1e.fromRotationZ(h,R$F),vr$3.z=o,D$F=p$1d.multiplyTransformation(D$F,p$1d.fromRotationTranslation(R$F,vr$3,Cr$2),D$F);var d=Nr$1;d[0]=a;for(var f=0;f<s;f++)for(var p=0;p<i.length;p+=3)c=o$1p.fromArray(i,p,c),c=p$1e.multiplyByVector(d,c,c),c=p$1d.multiplyByPoint(D$F,c,c),c=p$1d.multiplyByPoint(l,c,c),n.push(c.x,c.y,c.z);return n}var Dr$1=new o$1p;function rr$7(e,t,i,n,r,o,a){for(var s=0;s<e.length;s+=3){n=I$U(o$1p.fromArray(e,s,Dr$1),t,i,n,r,o[s/3],a,1)}return n}function Ir$4(e,t,i,n,r,o,a,s){for(var l=0;l<e.length;l+=3){n=k$D(o$1p.fromArray(e,l,Dr$1),t,i,n,r,o[l/3],a,1,s)}return n}function Vr$1(e,t){var i=e.length,n=new Array(6*i),r=0,o=t.x+t.width/2,a=t.y+t.height/2,s=e[0];n[r++]=s.x-o,n[r++]=0,n[r++]=s.y-a;for(var l=1;l<i;l++){var u=(s=e[l]).x-o,c=s.y-a;n[r++]=u,n[r++]=0,n[r++]=c,n[r++]=u,n[r++]=0,n[r++]=c}return s=e[0],n[r++]=s.x-o,n[r++]=0,n[r++]=s.y-a,n}function lr$4(e,t){for(var i=e.length,n=new Array(3*i),r=0,o=t.x+t.width/2,a=t.y+t.height/2,s=0;s<i;s++)n[r++]=e[s].x-o,n[r++]=0,n[r++]=e[s].y-a;return n}var Mr$3=new n$13,Or$1=new o$1p,Gr$2=new p$1e;function or$4(e,t,i,n,r,o,a,s,l,u){var c,h,d=o$1p.angleBetween(o$1p.subtract(t,e,X$E),o$1p.subtract(i,e,er$7)),f=n===ar$5.BEVELED?0:Math.ceil(d/e$2a.toRadians(5));if(c=r?p$1e.fromQuaternion(n$13.fromAxisAngle(o$1p.negate(e,X$E),d/(f+1),Mr$3),Gr$2):p$1e.fromQuaternion(n$13.fromAxisAngle(e,d/(f+1),Mr$3),Gr$2),t=o$1p.clone(t,Or$1),f>0)for(var p=u?2:1,_=0;_<f;_++)t=p$1e.multiplyByVector(c,t,t),h=o$1p.subtract(t,e,X$E),h=o$1p.normalize(h,h),r||(h=o$1p.negate(h,h)),a=I$U(o.scaleToGeodeticSurface(t,er$7),h,s,a,o,l,1,p);else h=o$1p.subtract(t,e,X$E),h=o$1p.normalize(h,h),r||(h=o$1p.negate(h,h)),a=I$U(o.scaleToGeodeticSurface(t,er$7),h,s,a,o,l,1,1),i=o$1p.clone(i,Or$1),h=o$1p.subtract(i,e,X$E),h=o$1p.normalize(h,h),r||(h=o$1p.negate(h,h)),a=I$U(o.scaleToGeodeticSurface(i,er$7),h,s,a,o,l,1,1);return a}J$B.removeDuplicatesFromShape=function(e){for(var t=e.length,i=[],n=t-1,r=0;r<t;n=r++){var o=e[n],a=e[r];o$1o.equals(o,a)||i.push(a)}return i},J$B.angleIsGreaterThanPi=function(e,t,i,n){var r=new f$14(i,n),o=r.projectPointOntoPlane(o$1p.add(i,e,nr$5),nr$5),a=r.projectPointOntoPlane(o$1p.add(i,t,tr$5),tr$5);return a.x*o.y-a.y*o.x>=0};var Ur$3=new o$1p,_r$2=new o$1p;J$B.computePositions=function(e,t,i,n,r){var o=n._ellipsoid,a=Tr$2(e,o),s=n._granularity,l=n._cornerType,u=r?Vr$1(t,i):lr$4(t,i),c=r?lr$4(t,i):void 0,h=i.height/2,d=i.width/2,f=e.length,p=[],_=r?[]:void 0,m=hr$2,g=gr$2,x=dr$1,v=pr$2,y=wr$2,$=Sr$1,b=Br$2,T=xr$3,C=Er$2,S=e[0],w=e[1];v=o.geodeticSurfaceNormal(S,v),m=o$1p.subtract(w,S,m),m=o$1p.normalize(m,m),T=o$1p.cross(v,m,T),T=o$1p.normalize(T,T);var E=a[0],P=a[1];r&&(_=I$U(S,T,c,_,o,E+h,1,1)),C=o$1p.clone(S,C),S=w,g=o$1p.negate(m,g);for(var A,L=1;L<f-1;L++){var M=r?2:1;w=e[L+1],m=o$1p.subtract(w,S,m),m=o$1p.normalize(m,m),x=o$1p.add(m,g,x),x=o$1p.normalize(x,x),v=o.geodeticSurfaceNormal(S,v);var R=o$1p.multiplyByScalar(v,o$1p.dot(m,v),Ur$3);o$1p.subtract(m,R,R),o$1p.normalize(R,R);var O=o$1p.multiplyByScalar(v,o$1p.dot(g,v),_r$2);if(o$1p.subtract(g,O,O),o$1p.normalize(O,O),!e$2a.equalsEpsilon(Math.abs(o$1p.dot(R,O)),1,e$2a.EPSILON7)){x=o$1p.cross(x,v,x),x=o$1p.cross(v,x,x),x=o$1p.normalize(x,x);var I=1/Math.max(.25,o$1p.magnitude(o$1p.cross(x,g,X$E))),D=J$B.angleIsGreaterThanPi(m,g,S,o);D?(y=o$1p.add(S,o$1p.multiplyByScalar(x,I*d,x),y),$=o$1p.add(y,o$1p.multiplyByScalar(T,d,$),$),g$O[0]=o$1p.clone(C,g$O[0]),g$O[1]=o$1p.clone($,g$O[1]),A=$$G(g$O,E+h,P+h,s),p=rr$7(m$V.generateArc({positions:g$O,granularity:s,ellipsoid:o}),T,u,p,o,A,1),T=o$1p.cross(v,m,T),T=o$1p.normalize(T,T),b=o$1p.add(y,o$1p.multiplyByScalar(T,d,b),b),l===ar$5.ROUNDED||l===ar$5.BEVELED?or$4(y,$,b,l,D,o,p,u,P+h,r):p=I$U(S,x=o$1p.negate(x,x),u,p,o,P+h,I,M),C=o$1p.clone(b,C)):(y=o$1p.add(S,o$1p.multiplyByScalar(x,I*d,x),y),$=o$1p.add(y,o$1p.multiplyByScalar(T,-d,$),$),g$O[0]=o$1p.clone(C,g$O[0]),g$O[1]=o$1p.clone($,g$O[1]),A=$$G(g$O,E+h,P+h,s),p=rr$7(m$V.generateArc({positions:g$O,granularity:s,ellipsoid:o}),T,u,p,o,A,1),T=o$1p.cross(v,m,T),T=o$1p.normalize(T,T),b=o$1p.add(y,o$1p.multiplyByScalar(T,-d,b),b),l===ar$5.ROUNDED||l===ar$5.BEVELED?or$4(y,$,b,l,D,o,p,u,P+h,r):p=I$U(S,x,u,p,o,P+h,I,M),C=o$1p.clone(b,C)),g=o$1p.negate(m,g)}else p=I$U(C,T,u,p,o,E+h,1,1),C=S;E=P,P=a[L+1],S=w}g$O[0]=o$1p.clone(C,g$O[0]),g$O[1]=o$1p.clone(S,g$O[1]),A=$$G(g$O,E+h,P+h,s),p=rr$7(m$V.generateArc({positions:g$O,granularity:s,ellipsoid:o}),T,u,p,o,A,1),r&&(_=I$U(S,T,c,_,o,P+h,1,1)),f=p.length;var B=r?f+_.length:f,N=new Float64Array(B);return N.set(p),r&&N.set(_,f),N},J$B.computeLocalPositions=function(e,t,i,n,r,o){var a=n._ellipsoid,s=Tr$2(e,a),l=n._granularity,u=n._cornerType,c=r?Vr$1(t,i):lr$4(t,i),h=r?lr$4(t,i):void 0,d=i.width/2,f=e.length,p=[],_=r?[]:void 0,m=hr$2,g=gr$2,x=dr$1,v=pr$2,y=wr$2,$=Sr$1,b=Br$2,T=xr$3,C=Er$2,S=m$17.eastNorthUpToFixedFrame(o,a,new p$1d),w=p$1d.inverse(S,new p$1d),E=e[0],P=e[1];v=a.geodeticSurfaceNormal(E,v),m=o$1p.subtract(P,E,m),m=o$1p.normalize(m,m),T=o$1p.cross(v,m,T),T=o$1p.normalize(T,T);var A=s[0],L=s[1];r&&(_=k$D(E,T,h,_,a,A+0,1,1,w)),C=o$1p.clone(E,C),E=P,g=o$1p.negate(m,g);for(var M,R=1;R<f-1;R++){var O=r?2:1;P=e[R+1],m=o$1p.subtract(P,E,m),m=o$1p.normalize(m,m),x=o$1p.add(m,g,x),x=o$1p.normalize(x,x),v=a.geodeticSurfaceNormal(E,v);var I=o$1p.multiplyByScalar(v,o$1p.dot(m,v),Ur$3);o$1p.subtract(m,I,I),o$1p.normalize(I,I);var D=o$1p.multiplyByScalar(v,o$1p.dot(g,v),_r$2);if(o$1p.subtract(g,D,D),o$1p.normalize(D,D),!e$2a.equalsEpsilon(Math.abs(o$1p.dot(I,D)),1,e$2a.EPSILON7)){x=o$1p.cross(x,v,x),x=o$1p.cross(v,x,x),x=o$1p.normalize(x,x);var B=1/Math.max(.25,o$1p.magnitude(o$1p.cross(x,g,X$E))),N=J$B.angleIsGreaterThanPi(m,g,E,a);N?(y=o$1p.add(E,o$1p.multiplyByScalar(x,B*d,x),y),$=o$1p.add(y,o$1p.multiplyByScalar(T,d,$),$),g$O[0]=o$1p.clone(C,g$O[0]),g$O[1]=o$1p.clone($,g$O[1]),M=$$G(g$O,A+0,L+0,l),p=rr$7(m$V.generateArc({positions:g$O,granularity:l,ellipsoid:a}),T,c,p,a,M,1,fromEnu),T=o$1p.cross(v,m,T),T=o$1p.normalize(T,T),b=o$1p.add(y,o$1p.multiplyByScalar(T,d,b),b),u===ar$5.ROUNDED||u===ar$5.BEVELED?or$4(y,$,b,u,N,a,p,c,L+0,r):p=k$D(E,x=o$1p.negate(x,x),c,p,a,L+0,B,O,w),C=o$1p.clone(b,C)):(y=o$1p.add(E,o$1p.multiplyByScalar(x,B*d,x),y),$=o$1p.add(y,o$1p.multiplyByScalar(T,-d,$),$),g$O[0]=o$1p.clone(C,g$O[0]),g$O[1]=o$1p.clone($,g$O[1]),M=$$G(g$O,A+0,L+0,l),p=rr$7(m$V.generateArc({positions:g$O,granularity:l,ellipsoid:a}),T,c,p,a,M,1),T=o$1p.cross(v,m,T),T=o$1p.normalize(T,T),b=o$1p.add(y,o$1p.multiplyByScalar(T,-d,b),b),u===ar$5.ROUNDED||u===ar$5.BEVELED?or$4(y,$,b,u,N,a,p,c,L+0,r):p=k$D(E,x,c,p,a,L+0,B,O,w),C=o$1p.clone(b,C)),g=o$1p.negate(m,g)}else p=k$D(C,T,c,p,a,A+0,1,1,w),C=E;A=L,L=s[R+1],E=P}g$O[0]=o$1p.clone(C,g$O[0]),g$O[1]=o$1p.clone(E,g$O[1]),M=$$G(g$O,A+0,L+0,l),p=Ir$4(m$V.generateArc({positions:g$O,granularity:l,ellipsoid:a}),T,c,p,a,M,1,w),r&&(_=k$D(E,T,h,_,a,L+0,1,1,w)),f=p.length;var F=r?f+_.length:f,U=new Float64Array(F);return U.set(p),r&&U.set(_,f),U};var b$S={},A$O=new o$1p,H$L=new o$1p,P$G=new o$1p,I$T=new o$1p,g$N=[new o$1p,new o$1p],J$A=new o$1p,K$F=new o$1p,W$K=new o$1p,rr$6=new o$1p,ar$4=new o$1p,er$6=new o$1p,nr$4=new o$1p,ir$4=new o$1p,lr$3=new o$1p,tr$4=new o$1p,X$D=new n$13,Y$w=new p$1e;function V$x(e,t,i,n,r){var o,a=o$1p.angleBetween(o$1p.subtract(t,e,A$O),o$1p.subtract(i,e,H$L)),s=n===ar$5.BEVELED?1:Math.ceil(a/e$2a.toRadians(5))+1,l=3*s,u=new Array(l);u[l-3]=i.x,u[l-2]=i.y,u[l-1]=i.z,o=r?p$1e.fromQuaternion(n$13.fromAxisAngle(o$1p.negate(e,A$O),a/s,X$D),Y$w):p$1e.fromQuaternion(n$13.fromAxisAngle(e,a/s,X$D),Y$w);var c=0;t=o$1p.clone(t,A$O);for(var h=0;h<s;h++)t=p$1e.multiplyByVector(o,t,t),u[c++]=t.x,u[c++]=t.y,u[c++]=t.z;return u}function or$3(e){var t=J$A,i=K$F,n=W$K,r=e[1];i=o$1p.fromArray(e[1],r.length-3,i),n=o$1p.fromArray(e[0],0,n);var o=V$x(t=o$1p.midpoint(i,n,t),i,n,ar$5.ROUNDED,!1),a=e.length-1,s=e[a-1];return r=e[a],i=o$1p.fromArray(s,s.length-3,i),n=o$1p.fromArray(r,0,n),[o,V$x(t=o$1p.midpoint(i,n,t),i,n,ar$5.ROUNDED,!1)]}function Z$E(e,t,i,n){var r=A$O;return n||(t=o$1p.negate(t,t)),[(r=o$1p.add(e,t,r)).x,r.y,r.z,i.x,i.y,i.z]}function q$M(e,t,i,n){for(var r=new Array(e.length),o=new Array(e.length),a=o$1p.multiplyByScalar(t,i,A$O),s=o$1p.negate(a,H$L),l=0,u=e.length-1,c=0;c<e.length;c+=3){var h=o$1p.fromArray(e,c,P$G),d=o$1p.add(h,s,I$T);r[l++]=d.x,r[l++]=d.y,r[l++]=d.z;var f=o$1p.add(h,a,I$T);o[u--]=f.z,o[u--]=f.y,o[u--]=f.x}return n.push(r,o),n}b$S.addAttribute=function(e,t,i,n){var r=t.x,o=t.y,a=t.z;e$2b(i)&&(e[i]=r,e[i+1]=o,e[i+2]=a),e$2b(n)&&(e[n]=a,e[n-1]=o,e[n-2]=r)};var vr$2=new o$1p,sr$4=new o$1p;b$S.computePositions=function(e){var t=e.granularity,i=e.positions,n=e.ellipsoid,r=e.width/2,o=e.cornerType,a=e.saveAttributes,s=J$A,l=K$F,u=W$K,c=rr$6,h=ar$4,d=er$6,f=nr$4,p=ir$4,_=lr$3,m=tr$4,g=[],x=a?[]:void 0,v=a?[]:void 0,y=i[0],$=i[1];l=o$1p.normalize(o$1p.subtract($,y,l),l),s=n.geodeticSurfaceNormal(y,s),c=o$1p.normalize(o$1p.cross(s,l,c),c),a&&(x.push(c.x,c.y,c.z),v.push(s.x,s.y,s.z)),f=o$1p.clone(y,f),y=$,u=o$1p.negate(l,u);var b,T,C=[],S=i.length;for(b=1;b<S-1;b++){s=n.geodeticSurfaceNormal(y,s),$=i[b+1],l=o$1p.normalize(o$1p.subtract($,y,l),l),h=o$1p.normalize(o$1p.add(l,u,h),h);var w=o$1p.multiplyByScalar(s,o$1p.dot(l,s),vr$2);o$1p.subtract(l,w,w),o$1p.normalize(w,w);var E=o$1p.multiplyByScalar(s,o$1p.dot(u,s),sr$4);if(o$1p.subtract(u,E,E),o$1p.normalize(E,E),!e$2a.equalsEpsilon(Math.abs(o$1p.dot(w,E)),1,e$2a.EPSILON7)){h=o$1p.cross(h,s,h),h=o$1p.cross(s,h,h),h=o$1p.normalize(h,h);var P=r/Math.max(.25,o$1p.magnitude(o$1p.cross(h,u,A$O))),A=J$B.angleIsGreaterThanPi(l,u,y,n);h=o$1p.multiplyByScalar(h,P,h),A?(p=o$1p.add(y,h,p),m=o$1p.add(p,o$1p.multiplyByScalar(c,r,m),m),_=o$1p.add(p,o$1p.multiplyByScalar(c,2*r,_),_),g$N[0]=o$1p.clone(f,g$N[0]),g$N[1]=o$1p.clone(m,g$N[1]),g=q$M(m$V.generateArc({positions:g$N,granularity:t,ellipsoid:n}),c,r,g),a&&(x.push(c.x,c.y,c.z),v.push(s.x,s.y,s.z)),d=o$1p.clone(_,d),c=o$1p.normalize(o$1p.cross(s,l,c),c),_=o$1p.add(p,o$1p.multiplyByScalar(c,2*r,_),_),f=o$1p.add(p,o$1p.multiplyByScalar(c,r,f),f),o===ar$5.ROUNDED||o===ar$5.BEVELED?C.push({leftPositions:V$x(p,d,_,o,A)}):C.push({leftPositions:Z$E(y,o$1p.negate(h,h),_,A)})):(_=o$1p.add(y,h,_),m=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,r,m),m),m),p=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,2*r,p),p),p),g$N[0]=o$1p.clone(f,g$N[0]),g$N[1]=o$1p.clone(m,g$N[1]),g=q$M(m$V.generateArc({positions:g$N,granularity:t,ellipsoid:n}),c,r,g),a&&(x.push(c.x,c.y,c.z),v.push(s.x,s.y,s.z)),d=o$1p.clone(p,d),c=o$1p.normalize(o$1p.cross(s,l,c),c),p=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,2*r,p),p),p),f=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,r,f),f),f),o===ar$5.ROUNDED||o===ar$5.BEVELED?C.push({rightPositions:V$x(_,d,p,o,A)}):C.push({rightPositions:Z$E(y,h,p,A)})),u=o$1p.negate(l,u)}y=$}return s=n.geodeticSurfaceNormal(y,s),g$N[0]=o$1p.clone(f,g$N[0]),g$N[1]=o$1p.clone(y,g$N[1]),g=q$M(m$V.generateArc({positions:g$N,granularity:t,ellipsoid:n}),c,r,g),a&&(x.push(c.x,c.y,c.z),v.push(s.x,s.y,s.z)),o===ar$5.ROUNDED&&(T=or$3(g)),{positions:g,corners:C,lefts:x,normals:v,endPositions:T}};var Be$f=new o$1p,Ye$9=new o$1p,Le$k=new o$1p,Ne$e=new o$1p,Pe$d=new o$1p,We$c=new o$1p,fe$j=new o$1p,me$m=new o$1p;function Ge$a(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function j$G(e,t,i,n,r,o){var a=e.normals,s=e.tangents,l=e.bitangents,u=o$1p.normalize(o$1p.cross(i,t,fe$j),fe$j);o.normal&&b$S.addAttribute(a,t,n,r),o.tangent&&b$S.addAttribute(s,u,n,r),o.bitangent&&b$S.addAttribute(l,i,n,r)}function qe$7(e,t,i){var n,r,o,a=e.positions,s=e.corners,l=e.endPositions,u=e.lefts,c=e.normals,h=new a$_,d=0,f=0,p=0;for(r=0;r<a.length;r+=2)d+=o=a[r].length-3,p+=2*o,f+=a[r+1].length-3;for(d+=3,f+=3,r=0;r<s.length;r++){n=s[r];var _=s[r].leftPositions;e$2b(_)?(d+=o=_.length,p+=o):(f+=o=s[r].rightPositions.length,p+=o)}var m,g=e$2b(l);g&&(d+=m=l[0].length-3,f+=m,p+=6*(m/=3));var x,v,y,$,b,T,C=d+f,S=new Float64Array(C),w={normals:t.normal?new Float32Array(C):void 0,tangents:t.tangent?new Float32Array(C):void 0,bitangents:t.bitangent?new Float32Array(C):void 0},E=0,P=C-1,A=Be$f,L=Ye$9,M=m/2,R=ce$x.createTypedArray(C/3,p),O=0;if(g){T=Le$k,b=Ne$e;var I=l[0];for(A=o$1p.fromArray(c,0,A),L=o$1p.fromArray(u,0,L),r=0;r<M;r++)T=o$1p.fromArray(I,3*(M-1-r),T),b=o$1p.fromArray(I,3*(M+r),b),b$S.addAttribute(S,b,E),b$S.addAttribute(S,T,void 0,P),j$G(w,A,L,E,P,t),$=(v=E/3)+1,y=(x=(P-2)/3)-1,R[O++]=x,R[O++]=v,R[O++]=y,R[O++]=y,R[O++]=v,R[O++]=$,E+=3,P-=3}var D,B,N=0,F=0,U=a[N++],G=a[N++];for(S.set(U,E),S.set(G,P-G.length+1),L=o$1p.fromArray(u,F,L),o=G.length-3,r=0;r<o;r+=3)D=i.geodeticSurfaceNormal(o$1p.fromArray(U,r,fe$j),fe$j),B=i.geodeticSurfaceNormal(o$1p.fromArray(G,o-r,me$m),me$m),j$G(w,A=o$1p.normalize(o$1p.add(D,B,A),A),L,E,P,t),$=(v=E/3)+1,y=(x=(P-2)/3)-1,R[O++]=x,R[O++]=v,R[O++]=y,R[O++]=y,R[O++]=v,R[O++]=$,E+=3,P-=3;for(D=i.geodeticSurfaceNormal(o$1p.fromArray(U,o,fe$j),fe$j),B=i.geodeticSurfaceNormal(o$1p.fromArray(G,o,me$m),me$m),A=o$1p.normalize(o$1p.add(D,B,A),A),F+=3,r=0;r<s.length;r++){var z,V,k,W=(n=s[r]).leftPositions,H=n.rightPositions,q=We$c,j=Le$k,Y=Ne$e;if(A=o$1p.fromArray(c,F,A),e$2b(W)){for(j$G(w,A,L,void 0,P,t),P-=3,V=$,k=y,z=0;z<W.length/3;z++)q=o$1p.fromArray(W,3*z,q),R[O++]=V,R[O++]=k-z-1,R[O++]=k-z,b$S.addAttribute(S,q,void 0,P),j=o$1p.fromArray(S,3*(k-z-1),j),Y=o$1p.fromArray(S,3*V,Y),j$G(w,A,L=o$1p.normalize(o$1p.subtract(j,Y,L),L),void 0,P,t),P-=3;q=o$1p.fromArray(S,3*V,q),j=o$1p.subtract(o$1p.fromArray(S,3*k,j),q,j),Y=o$1p.subtract(o$1p.fromArray(S,3*(k-z),Y),q,Y),j$G(w,A,L=o$1p.normalize(o$1p.add(j,Y,L),L),E,void 0,t),E+=3}else{for(j$G(w,A,L,E,void 0,t),E+=3,V=y,k=$,z=0;z<H.length/3;z++)q=o$1p.fromArray(H,3*z,q),R[O++]=V,R[O++]=k+z,R[O++]=k+z+1,b$S.addAttribute(S,q,E),j=o$1p.fromArray(S,3*V,j),Y=o$1p.fromArray(S,3*(k+z),Y),j$G(w,A,L=o$1p.normalize(o$1p.subtract(j,Y,L),L),E,void 0,t),E+=3;q=o$1p.fromArray(S,3*V,q),j=o$1p.subtract(o$1p.fromArray(S,3*(k+z),j),q,j),Y=o$1p.subtract(o$1p.fromArray(S,3*k,Y),q,Y),j$G(w,A,L=o$1p.normalize(o$1p.negate(o$1p.add(Y,j,L),L),L),void 0,P,t),P-=3}for(U=a[N++],G=a[N++],U.splice(0,3),G.splice(G.length-3,3),S.set(U,E),S.set(G,P-G.length+1),o=G.length-3,F+=3,L=o$1p.fromArray(u,F,L),z=0;z<G.length;z+=3)D=i.geodeticSurfaceNormal(o$1p.fromArray(U,z,fe$j),fe$j),B=i.geodeticSurfaceNormal(o$1p.fromArray(G,o-z,me$m),me$m),j$G(w,A=o$1p.normalize(o$1p.add(D,B,A),A),L,E,P,t),v=($=E/3)-1,x=(y=(P-2)/3)+1,R[O++]=x,R[O++]=v,R[O++]=y,R[O++]=y,R[O++]=v,R[O++]=$,E+=3,P-=3;E-=3,P+=3}if(j$G(w,A=o$1p.fromArray(c,c.length-3,A),L,E,P,t),g){E+=3,P-=3,T=Le$k,b=Ne$e;var X=l[1];for(r=0;r<M;r++)T=o$1p.fromArray(X,3*(m-r-1),T),b=o$1p.fromArray(X,3*r,b),b$S.addAttribute(S,T,void 0,P),b$S.addAttribute(S,b,E),j$G(w,A,L,E,P,t),v=($=E/3)-1,x=(y=(P-2)/3)+1,R[O++]=x,R[O++]=v,R[O++]=y,R[O++]=y,R[O++]=v,R[O++]=$,E+=3,P-=3}if(h.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:S}),t.st){var K,Q,Z=new Float32Array(C/3*2),J=0;if(g){d/=3,f/=3;var ee=Math.PI/(m+1);Q=1/(d-m+1),K=1/(f-m+1);var te,ie=m/2;for(r=ie+1;r<m+1;r++)te=e$2a.PI_OVER_TWO+ee*r,Z[J++]=K*(1+Math.cos(te)),Z[J++]=.5*(1+Math.sin(te));for(r=1;r<f-m+1;r++)Z[J++]=r*K,Z[J++]=0;for(r=m;r>ie;r--)te=e$2a.PI_OVER_TWO-r*ee,Z[J++]=1-K*(1+Math.cos(te)),Z[J++]=.5*(1+Math.sin(te));for(r=ie;r>0;r--)te=e$2a.PI_OVER_TWO-ee*r,Z[J++]=1-Q*(1+Math.cos(te)),Z[J++]=.5*(1+Math.sin(te));for(r=d-m;r>0;r--)Z[J++]=r*Q,Z[J++]=1;for(r=1;r<ie+1;r++)te=e$2a.PI_OVER_TWO+ee*r,Z[J++]=Q*(1+Math.cos(te)),Z[J++]=.5*(1+Math.sin(te))}else{for(Q=1/((d/=3)-1),K=1/((f/=3)-1),r=0;r<f;r++)Z[J++]=r*K,Z[J++]=0;for(r=d;r>0;r--)Z[J++]=(r-1)*Q,Z[J++]=1}h.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:Z})}return t.normal&&(h.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:w.normals})),t.tangent&&(h.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:w.tangents})),t.bitangent&&(h.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:w.bitangents})),{attributes:h,indices:R}}function xe$g(e,t){if(!(t.normal||t.tangent||t.bitangent||t.st))return e;var i,n,r=e.position.values;(t.normal||t.bitangent)&&(i=e.normal.values,n=e.bitangent.values);var o,a=e.position.values.length/18,s=3*a,l=2*a,u=2*s;if(t.normal||t.bitangent||t.tangent){var c=t.normal?new Float32Array(6*s):void 0,h=t.tangent?new Float32Array(6*s):void 0,d=t.bitangent?new Float32Array(6*s):void 0,f=Be$f,p=Ye$9,_=Le$k,m=Ne$e,g=Pe$d,x=We$c,v=u;for(o=0;o<s;o+=3){var y=v+u;f=o$1p.fromArray(r,o,f),p=o$1p.fromArray(r,o+s,p),_=o$1p.fromArray(r,(o+3)%s,_),p=o$1p.subtract(p,f,p),_=o$1p.subtract(_,f,_),m=o$1p.normalize(o$1p.cross(p,_,m),m),t.normal&&(b$S.addAttribute(c,m,y),b$S.addAttribute(c,m,y+3),b$S.addAttribute(c,m,v),b$S.addAttribute(c,m,v+3)),(t.tangent||t.bitangent)&&(x=o$1p.fromArray(i,o,x),t.bitangent&&(b$S.addAttribute(d,x,y),b$S.addAttribute(d,x,y+3),b$S.addAttribute(d,x,v),b$S.addAttribute(d,x,v+3)),t.tangent&&(g=o$1p.normalize(o$1p.cross(x,m,g),g),b$S.addAttribute(h,g,y),b$S.addAttribute(h,g,y+3),b$S.addAttribute(h,g,v),b$S.addAttribute(h,g,v+3))),v+=6}if(t.normal){for(c.set(i),o=0;o<s;o+=3)c[o+s]=-i[o],c[o+s+1]=-i[o+1],c[o+s+2]=-i[o+2];e.normal.values=c}else e.normal=void 0;if(t.bitangent?(d.set(n),d.set(n,s),e.bitangent.values=d):e.bitangent=void 0,t.tangent){var $=e.tangent.values;h.set($),h.set($,s),e.tangent.values=h}}if(t.st){var b=e.st.values,T=new Float32Array(6*l);T.set(b),T.set(b,l);for(var C=2*l,S=0;S<2;S++){for(T[C++]=b[0],T[C++]=b[1],o=2;o<l;o+=2){var w=b[o],E=b[o+1];T[C++]=w,T[C++]=E,T[C++]=w,T[C++]=E}T[C++]=b[0],T[C++]=b[1]}e.st.values=T}return e}function Oe$g(e,t,i){i[t++]=e[0],i[t++]=e[1],i[t++]=e[2];for(var n=3;n<e.length;n+=3){var r=e[n],o=e[n+1],a=e[n+2];i[t++]=r,i[t++]=o,i[t++]=a,i[t++]=r,i[t++]=o,i[t++]=a}return i[t++]=e[0],i[t++]=e[1],i[t++]=e[2],i}function er$5(e,t){var i=new n$11({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),n=e.ellipsoid,r=qe$7(b$S.computePositions(e),i,n),o=e.height,a=e.extrudedHeight,s=r.attributes,l=r.indices,u=s.position.values,c=u.length,h=new Float64Array(6*c),d=new Float64Array(c);d.set(u);var f=new Float64Array(4*c);f=Oe$g(u=A$1g.scaleToGeodeticHeight(u,o,n),0,f),f=Oe$g(d=A$1g.scaleToGeodeticHeight(d,a,n),2*c,f),h.set(u),h.set(d,c),h.set(f,2*c),s.position.values=h,s=xe$g(s,t);var p,_=c/3;if(e.shadowVolume){var m=s.normal.values;c=m.length;var g=new Float32Array(6*c);for(p=0;p<c;p++)m[p]=-m[p];g.set(m,c),g=Oe$g(m,4*c,g),s.extrudeDirection=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:g}),t.normal||(s.normal=void 0)}if(e$2b(e.offsetAttribute)){var x=new Uint8Array(6*_);if(e.offsetAttribute===_0x58701d.TOP)x=d$1s(x,1,0,_),x=d$1s(x,1,2*_,4*_);else x=d$1s(x,e.offsetAttribute===_0x58701d.NONE?0:1);s.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}var v=l.length,y=_+_,$=ce$x.createTypedArray(h.length/3,2*v+3*y);$.set(l);var b,T,C,S,w=v;for(p=0;p<v;p+=3){var E=l[p],P=l[p+1],A=l[p+2];$[w++]=A+_,$[w++]=P+_,$[w++]=E+_}for(p=0;p<y;p+=2)C=(b=p+y)+1,S=(T=b+y)+1,$[w++]=b,$[w++]=T,$[w++]=C,$[w++]=C,$[w++]=T,$[w++]=S;return{attributes:s,indices:$}}var Je$5=new o$1p,pe$l=new o$1p,X$C=new a$18;function Ke$8(e,t,i,n,r,o){var a=o$1p.subtract(t,e,Je$5);o$1p.normalize(a,a);var s=i.geodeticSurfaceNormal(e,pe$l),l=o$1p.cross(a,s,Je$5);o$1p.multiplyByScalar(l,n,l);var u=r.latitude,c=r.longitude,h=o.latitude,d=o.longitude;o$1p.add(e,l,pe$l),i.cartesianToCartographic(pe$l,X$C);var f=X$C.latitude,p=X$C.longitude;u=Math.min(u,f),c=Math.min(c,p),h=Math.max(h,f),d=Math.max(d,p),o$1p.subtract(e,l,pe$l),i.cartesianToCartographic(pe$l,X$C),f=X$C.latitude,p=X$C.longitude,u=Math.min(u,f),c=Math.min(c,p),h=Math.max(h,f),d=Math.max(d,p),r.latitude=u,r.longitude=c,o.latitude=h,o.longitude=d}var Z$D=new o$1p,_e$l=new o$1p,G$P=new a$18,q$L=new a$18;function Qe$6(e,t,i,n,r){var o=D$11(e=Ge$a(e,t),o$1p.equalsEpsilon),a=o.length;if(a<2||i<=0)return new h$18;var s,l,u=.5*i;if(G$P.latitude=Number.POSITIVE_INFINITY,G$P.longitude=Number.POSITIVE_INFINITY,q$L.latitude=Number.NEGATIVE_INFINITY,q$L.longitude=Number.NEGATIVE_INFINITY,n===ar$5.ROUNDED){var c=o[0];o$1p.subtract(c,o[1],Z$D),o$1p.normalize(Z$D,Z$D),o$1p.multiplyByScalar(Z$D,u,Z$D),o$1p.add(c,Z$D,_e$l),t.cartesianToCartographic(_e$l,X$C),s=X$C.latitude,l=X$C.longitude,G$P.latitude=Math.min(G$P.latitude,s),G$P.longitude=Math.min(G$P.longitude,l),q$L.latitude=Math.max(q$L.latitude,s),q$L.longitude=Math.max(q$L.longitude,l)}for(var h=0;h<a-1;++h)Ke$8(o[h],o[h+1],t,u,G$P,q$L);var d=o[a-1];o$1p.subtract(d,o[a-2],Z$D),o$1p.normalize(Z$D,Z$D),o$1p.multiplyByScalar(Z$D,u,Z$D),o$1p.add(d,Z$D,_e$l),Ke$8(d,_e$l,t,u,G$P,q$L),n===ar$5.ROUNDED&&(t.cartesianToCartographic(_e$l,X$C),s=X$C.latitude,l=X$C.longitude,G$P.latitude=Math.min(G$P.latitude,s),G$P.longitude=Math.min(G$P.longitude,l),q$L.latitude=Math.max(q$L.latitude,s),q$L.longitude=Math.max(q$L.longitude,l));var f=e$2b(r)?r:new h$18;return f.north=q$L.latitude,f.south=G$P.latitude,f.east=q$L.longitude,f.west=G$P.longitude,f}function P$F(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,i=e.width;o$1q.defined("options.positions",t),o$1q.defined("options.width",i);var n=u$_(e.height,0),r=u$_(e.extrudedHeight,n);this._positions=t,this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._vertexFormat=n$11.clone(u$_(e.vertexFormat,n$11.DEFAULT)),this._width=i,this._height=Math.max(n,r),this._extrudedHeight=Math.min(n,r),this._cornerType=u$_(e.cornerType,ar$5.ROUNDED),this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._shadowVolume=u$_(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*o$1p.packedLength+t$13.packedLength+n$11.packedLength+7}P$F.pack=function(e,t,i){o$1q.defined("value",e),o$1q.defined("array",t),i=u$_(i,0);var n=e._positions,r=n.length;t[i++]=r;for(var o=0;o<r;++o,i+=o$1p.packedLength)o$1p.pack(n[o],t,i);return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i++]=e._shadowVolume?1:0,t[i]=u$_(e._offsetAttribute,-1),t};var Xe$8=t$13.clone(t$13.UNIT_SPHERE),Ze$7=new n$11,x$M={positions:void 0,ellipsoid:Xe$8,vertexFormat:Ze$7,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};P$F.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);for(var n=e[t++],r=new Array(n),o=0;o<n;++o,t+=o$1p.packedLength)r[o]=o$1p.unpack(e,t);var a=t$13.unpack(e,t,Xe$8);t+=t$13.packedLength;var s=n$11.unpack(e,t,Ze$7);t+=n$11.packedLength;var l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=1===e[t++],p=e[t];return e$2b(i)?(i._positions=r,i._ellipsoid=t$13.clone(a,i._ellipsoid),i._vertexFormat=n$11.clone(s,i._vertexFormat),i._width=l,i._height=u,i._extrudedHeight=c,i._cornerType=h,i._granularity=d,i._shadowVolume=f,i._offsetAttribute=-1===p?void 0:p,i):(x$M.positions=r,x$M.width=l,x$M.height=u,x$M.extrudedHeight=c,x$M.cornerType=h,x$M.granularity=d,x$M.shadowVolume=f,x$M.offsetAttribute=-1===p?void 0:p,new P$F(x$M))},P$F.computeRectangle=function(e,t){var i=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,n=e.width;return o$1q.defined("options.positions",i),o$1q.defined("options.width",n),Qe$6(i,u$_(e.ellipsoid,t$13.WGS84),n,u$_(e.cornerType,ar$5.ROUNDED),t)},P$F.createGeometry=function(e){var t=e._positions,i=e._width,n=e._ellipsoid,r=D$11(t=Ge$a(t,n),o$1p.equalsEpsilon);if(!(r.length<2||i<=0)){var o,a=e._height,s=e._extrudedHeight,l=!e$2a.equalsEpsilon(a,s,0,e$2a.EPSILON2),u=e._vertexFormat,c={ellipsoid:n,positions:r,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0};if(l)c.height=a,c.extrudedHeight=s,c.shadowVolume=e._shadowVolume,c.offsetAttribute=e._offsetAttribute,o=er$5(c,u);else if((o=qe$7(b$S.computePositions(c),u,n)).attributes.position.values=A$1g.scaleToGeodeticHeight(o.attributes.position.values,a,n),e$2b(e._offsetAttribute)){var h=e._offsetAttribute===_0x58701d.NONE?0:1,d=o.attributes.position.values.length,f=new Uint8Array(d/3);d$1s(f,h),o.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}var p=o.attributes,_=i$1c.fromVertices(p.position.values,void 0,3);return u.position||(o.attributes.position.values=void 0),new I$1p({attributes:p,indices:o.indices,primitiveType:W$18.TRIANGLES,boundingSphere:_,offsetAttribute:e._offsetAttribute})}},P$F.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new P$F({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:r,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$11.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(P$F.prototype,{rectangle:{get:function(){return e$2b(this._rectangle)||(this._rectangle=Qe$6(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var te$s=new o$1p,ie$s=new o$1p,pe$k=new o$1p;function ue$o(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function re$w(e,t){var i,n,r,o=[],a=e.positions,s=e.corners,l=e.endPositions,u=new a$_,c=0,h=0,d=0;for(n=0;n<a.length;n+=2)c+=r=a[n].length-3,d+=r/3*4,h+=a[n+1].length-3;for(c+=3,h+=3,n=0;n<s.length;n++){i=s[n];var f=s[n].leftPositions;e$2b(f)?(c+=r=f.length,d+=r/3*2):(h+=r=s[n].rightPositions.length,d+=r/3*2)}var p,_=e$2b(l);_&&(c+=p=l[0].length-3,h+=p,d+=4*(p/=3));var m,g,x,v,y,$,b=c+h,T=new Float64Array(b),C=0,S=b-1,w=p/2,E=ce$x.createTypedArray(b/3,d+4),P=0;if(E[P++]=C/3,E[P++]=(S-2)/3,_){o.push(C/3),$=te$s,y=ie$s;var A=l[0];for(n=0;n<w;n++)$=o$1p.fromArray(A,3*(w-1-n),$),y=o$1p.fromArray(A,3*(w+n),y),b$S.addAttribute(T,y,C),b$S.addAttribute(T,$,void 0,S),v=(g=C/3)+1,x=(m=(S-2)/3)-1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=v,C+=3,S-=3}var L=0,M=a[L++],R=a[L++];for(T.set(M,C),T.set(R,S-R.length+1),r=R.length-3,o.push(C/3,(S-2)/3),n=0;n<r;n+=3)v=(g=C/3)+1,x=(m=(S-2)/3)-1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=v,C+=3,S-=3;for(n=0;n<s.length;n++){var O,I,D=(i=s[n]).leftPositions,B=i.rightPositions,N=pe$k;if(e$2b(D)){for(S-=3,I=x,o.push(v),O=0;O<D.length/3;O++)N=o$1p.fromArray(D,3*O,N),E[P++]=I-O-1,E[P++]=I-O,b$S.addAttribute(T,N,void 0,S),S-=3;o.push(I-Math.floor(D.length/6)),t===ar$5.BEVELED&&o.push((S-2)/3+1),C+=3}else{for(C+=3,I=v,o.push(x),O=0;O<B.length/3;O++)N=o$1p.fromArray(B,3*O,N),E[P++]=I+O,E[P++]=I+O+1,b$S.addAttribute(T,N,C),C+=3;o.push(I+Math.floor(B.length/6)),t===ar$5.BEVELED&&o.push(C/3-1),S-=3}for(M=a[L++],R=a[L++],M.splice(0,3),R.splice(R.length-3,3),T.set(M,C),T.set(R,S-R.length+1),r=R.length-3,O=0;O<R.length;O+=3)g=(v=C/3)-1,m=(x=(S-2)/3)+1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=v,C+=3,S-=3;C-=3,S+=3,o.push(C/3,(S-2)/3)}if(_){C+=3,S-=3,$=te$s,y=ie$s;var F=l[1];for(n=0;n<w;n++)$=o$1p.fromArray(F,3*(p-n-1),$),y=o$1p.fromArray(F,3*n,y),b$S.addAttribute(T,$,void 0,S),b$S.addAttribute(T,y,C),g=(v=C/3)-1,m=(x=(S-2)/3)+1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=v,C+=3,S-=3;o.push(C/3)}else o.push(C/3,(S-2)/3);return E[P++]=C/3,E[P++]=(S-2)/3,u.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:T}),{attributes:u,indices:E,wallIndices:o}}function de$l(e){var t=e.ellipsoid,i=re$w(b$S.computePositions(e),e.cornerType),n=i.wallIndices,r=e.height,o=e.extrudedHeight,a=i.attributes,s=i.indices,l=a.position.values,u=l.length,c=new Float64Array(u);c.set(l);var h=new Float64Array(2*u);if(l=A$1g.scaleToGeodeticHeight(l,r,t),c=A$1g.scaleToGeodeticHeight(c,o,t),h.set(l),h.set(c,u),a.position.values=h,u/=3,e$2b(e.offsetAttribute)){var d=new Uint8Array(2*u);if(e.offsetAttribute===_0x58701d.TOP)d=d$1s(d,1,0,u);else d=d$1s(d,e.offsetAttribute===_0x58701d.NONE?0:1);a.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}var f,p=s.length,_=ce$x.createTypedArray(h.length/3,2*(p+n.length));_.set(s);var m,g,x=p;for(f=0;f<p;f+=2){var v=s[f],y=s[f+1];_[x++]=v+u,_[x++]=y+u}for(f=0;f<n.length;f++)g=(m=n[f])+u,_[x++]=m,_[x++]=g;return{attributes:a,indices:_}}function V$w(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,i=e.width;o$1q.typeOf.object("options.positions",t),o$1q.typeOf.number("options.width",i);var n=u$_(e.height,0),r=u$_(e.extrudedHeight,n);this._positions=t,this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._width=i,this._height=Math.max(n,r),this._extrudedHeight=Math.min(n,r),this._cornerType=u$_(e.cornerType,ar$5.ROUNDED),this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*o$1p.packedLength+t$13.packedLength+6}V$w.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.typeOf.object("array",t),i=u$_(i,0);var n=e._positions,r=n.length;t[i++]=r;for(var o=0;o<r;++o,i+=o$1p.packedLength)o$1p.pack(n[o],t,i);return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i]=u$_(e._offsetAttribute,-1),t};var oe$n=t$13.clone(t$13.UNIT_SPHERE),R$E={positions:void 0,ellipsoid:oe$n,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};function i$L(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}function d$_(e,t){var i=t.replacementPrevious,n=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=n),t===e.head?e.head=n:i.replacementNext=n,t===e.tail?e.tail=i:n.replacementPrevious=i,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}V$w.unpack=function(e,t,i){o$1q.typeOf.object("array",e),t=u$_(t,0);for(var n=e[t++],r=new Array(n),o=0;o<n;++o,t+=o$1p.packedLength)r[o]=o$1p.unpack(e,t);var a=t$13.unpack(e,t,oe$n);t+=t$13.packedLength;var s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return e$2b(i)?(i._positions=r,i._ellipsoid=t$13.clone(a,i._ellipsoid),i._width=s,i._height=l,i._extrudedHeight=u,i._cornerType=c,i._granularity=h,i._offsetAttribute=-1===d?void 0:d,i):(R$E.positions=r,R$E.width=s,R$E.height=l,R$E.extrudedHeight=u,R$E.cornerType=c,R$E.granularity=h,R$E.offsetAttribute=-1===d?void 0:d,new V$w(R$E))},V$w.createGeometry=function(e){var t=e._positions,i=e._width,n=e._ellipsoid,r=D$11(t=ue$o(t,n),o$1p.equalsEpsilon);if(!(r.length<2||i<=0)){var o,a=e._height,s=e._extrudedHeight,l=!e$2a.equalsEpsilon(a,s,0,e$2a.EPSILON2),u={ellipsoid:n,positions:r,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1};if(l)u.height=a,u.extrudedHeight=s,u.offsetAttribute=e._offsetAttribute,o=de$l(u);else if((o=re$w(b$S.computePositions(u),u.cornerType)).attributes.position.values=A$1g.scaleToGeodeticHeight(o.attributes.position.values,a,n),e$2b(e._offsetAttribute)){var c=o.attributes.position.values.length,h=new Uint8Array(c/3);d$1s(h,e._offsetAttribute===_0x58701d.NONE?0:1),o.attributes.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}var d=o.attributes,f=i$1c.fromVertices(d.position.values,void 0,3);return new I$1p({attributes:d,indices:o.indices,primitiveType:W$18.LINES,boundingSphere:f,offsetAttribute:e._offsetAttribute})}},i$L.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head},i$L.prototype.trimTiles=function(e,t){for(var i=this.tail,n=!0;n&&e$2b(this._lastBeforeStartOfFrame)&&this.count>e&&e$2b(i);){n=i!==this._lastBeforeStartOfFrame;var r=i.replacementPrevious;i.eligibleForUnloading&&(i.freeResources(),d$_(this,i)),i=r}for(this._lastBeforeStartOfFrame&&(i=this._lastBeforeStartOfFrame.replacementNext);t&&i;)i=i.replacementNext;for(;i;){if(i&&i.data)for(var o=i.data.imagery,a=0,s=o.length;a<s;++a){var l=o[a];l.readyImagery&&l.readyImagery.imageryLayer._imageryProvider instanceof I$10&&e$2b(l.readyImagery)&&(l.imageryLayer=l.readyImagery.imageryLayer,l.readyImagery.releaseReference(),l.readyImagery=void 0,i.state=re$z.LOADING)}i=i.replacementNext}},i$L.prototype.markTileRendered=function(e){var t=this.head;if(t!==e)return++this.count,e$2b(t)?((e$2b(e.replacementPrevious)||e$2b(e.replacementNext))&&d$_(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,void(this.head=e)):(e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,void(this.tail=e));e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext)};var De$g=-1;function et$9(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.availabilityPromiseCache={},this.subLevel=e.subLevel}function ne$x(e){if(!e$2b(e)||!e$2b(e.url))throw new t$16("options.url is required.");var t=-1;if(this._isSct=u$_(e.isSct,!0),"string"==typeof e.url){this._baseUrl=e.url;var i=e.url;t=i.indexOf("wmts100");var n=i.substring(0,i.indexOf("/datas"));this.tablename=i.substring(i.indexOf("datas/")+6,i.length);var r=this;new l$15({name:n+this.tablename}).then((function(e){e.checkObjectStoreExit(r.tablename)?r._indexedDBScheduler=e:e.createObjectStore(r.tablename).then((function(){r._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){e$2b(r._indexedDBScheduler)&&r._indexedDBScheduler.clear(r.tablename)},cache:[]}}else this._isSct=!1;this._tilingScheme=new g$13({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid}),this._heightmapWidth=65,this._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,this._heightmapWidth,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._packingRequest=e.packingRequest,this._isBlock=!1,this._extrudeTileBoundingBox=!1,this._blockCache={},this._blockCacheQueue=new r$Q,this._blockCacheSize=100,this._blockScale=0,this._subdomains=e.subdomains,this._requestVertexNormals=u$_(e.requestVertexNormals,!1),this._requestWaterMask=u$_(e.requestWaterMask,!1),this._requestMetadata=u$_(e.requestMetadata,!0),this._cacheKey=u$_(e.cacheKey,""),this._originOffset=u$_(e.originOffset,new o$1o(0,0)),this._errorEvent=new o$1h;var o=e.credit;"string"==typeof o&&(o=new r$T(o)),this._credit=o,this._availability=void 0;var a=o$1l.defer();this._ready=!1,this._readyPromise=a,this._tileCredits=void 0,this._bounds=null,this._isCreateSkirt=u$_(e.isCreateSkirt,!0),this._urlType=u$_(e.urlType,Tr$3.REST),this._isShowGlobe=!0,this._isTerrainZ=!1,this._hasNormalBuffer=!1,this._currentVersion=null,this._needRefresh=!1,this._isSct&&(this._isShowGlobe=u$_(e.isShowGlobe,!0)),this._isSkirtDirty=!1,this._customRequestHeaders=e.customRequestHeaders,this._invisibility=u$_(e.invisibility,!1),this._visible=!0,this._offset={_x:0,_y:0,_level:0},this._enablePrjArea=u$_(e.enablePrjArea,!1);var s,l,u;r=this;e$2b(this._subdomains)&&(i=i.replace(/({.*?})/g,(function(e,t){if(!e$2b(r._subdomains.length))throw new t$16("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?r._subdomains[0]:e})));var c=this._layers=[],h="",d=[],f=0;if(this._isSct&&-1===t){var p;if(r._hasWaterMask=!0,r._urlType===Tr$3.KEY_VALUE){var _=e.url,m=_.replace(_.substring(_.indexOf("datas")+5,_.indexOf("scene3DName")),"?");r._tileUrlTemplates=[m+"&tile1={z}&tile2={x}&tile3={y}&ext=terrainz&v=1.16389.0"],p=_}else{r._tileUrlTemplates=[e.url+"/data/path/{z}/{x}/{y}.terrain?v=1.16389.0"];var g=e.url.split("/");g[g.length-1],p=n$U(i,"config")}e$2b(a$O.CREDENTIAL)&&(p=e$2b(a$O.CREDENTIAL._keymap[r._baseUrl])?a$O.addTokenWithKey(r._baseUrl,p):a$O.addToken(p)),LicenseChecker.LICENSECHECKER.getLicense(p).then((function(e){LicenseChecker.LICENSECHECKER.check(e)})),o$1l(u$R(p,this._customRequestHeaders),(function(t){t=t.replace("<SuperMapCache>",'<SuperMapCache xmlns:sml="http://www.supermap.com/SuperMapCache">');var i=(new s$S).read(t).documentElement;if(2===s$S.queryNumericValue(i,"Version",void 0)){var n=s$S.queryFirstNode(i,"StoreType",void 0);r._blockScale=s$S.queryNumericAttribute(n,"BlockScale",void 0),e$2b(r._blockScale)&&r._blockScale>0&&(r._isBlock=!0)}var o,a=s$S.queryStringValue(i,"FileExtentName",void 0);if(a=a.toLowerCase(),r._isTerrainZ="terrainz"===a,r._urlType===Tr$3.KEY_VALUE){var s=e.url;o=s.replace(s.substring(s.indexOf("datas")+5,s.indexOf("scene3DName")),"?"),o+="&tile1={z}&tile2={x}&tile3={y}&ext={fileExtent}&v=1.16389.0"}else o=e.url+"/data/path/{z}/{x}/{y}.{fileExtent}?v=1.16389.0";o=o.replace("{fileExtent}",a),r._tileUrlTemplates=[o];var l=s$S.queryFirstNode(i,"HeightRange",void 0),u=s$S.queryNumericValue(l,"MaxHeight",void 0),h=s$S.queryNumericValue(l,"MinHeight",void 0);r._maxHeight=u,r._minHeight=h;var f=s$S.queryFirstNode(i,"Bounds",void 0),p=s$S.queryNumericValue(f,"Left",void 0),_=s$S.queryNumericValue(f,"Right",void 0),m=s$S.queryNumericValue(f,"Bottom",void 0),g=s$S.queryNumericValue(f,"Top",void 0),x=s$S.queryFirstNode(i,"PlaneBounds",void 0);if(e$2b(x)){p>180&&(r._offset._x=Math.floor(p/180)),g>90&&(r._offset._y=Math.floor((g+90)/180));var v=t$13.WGS84.maximumRadius,y=r._offset._x*Math.PI*v,$=r._offset._y*Math.PI*v;p=s$S.queryNumericValue(x,"Left",void 0),p-=y,_=s$S.queryNumericValue(x,"Right",void 0),_-=y,m=s$S.queryNumericValue(x,"Bottom",void 0),m-=$,g=s$S.queryNumericValue(x,"Top",void 0),g-=$;var b=new o$1p(p,m,0),T=new o$1p(_,g,0),C=new n$1b,S=C.unproject(b),w=C.unproject(T);p=e$2a.toDegrees(S.longitude),_=e$2a.toDegrees(w.longitude),m=e$2a.toDegrees(S.latitude),g=e$2a.toDegrees(w.latitude),Math.abs(y)>e$2a.EPSILON1&&(o$1p.globalOffset.x=y),Math.abs($)>e$2a.EPSILON1&&(o$1p.globalOffset.y=$)}p&&_&&m&&g&&(r._bounds=new h$18(p,m,_,g),r._boundsRadians=h$18.fromDegrees(p,m,_,g));for(var E=s$S.queryFirstNode(i,"Levels",void 0),P=s$S.queryChildNodes(E,"Level",void 0),A=[],L=0,M=P.length;L<M;L++){var R=parseInt(P[L].textContent);A.push(R)}var O=s$S.queryFirstNode(i,"History",void 0);if(null!=O){var I=s$S.queryChildNodes(O,"Version",void 0),D=[];for(L=0,M=I.length;L<M;L++){R=I[L].textContent;D.push(R)}r._historyVersions=D}var B=A[0],N=A[A.length-1],F=s$S.queryFirstNode(i,"Available",void 0);if(e$2b(F)){var U=s$S.queryChildNodes(F,"TilesBounds",void 0),G=B>0?A.length+1:A.length,z=new Array(G);for(L=0;L<B;L++)z[L]=[];for(L=0,M=U.length;L<M;L++){var V=U[L],k=[];z[ie=s$S.queryNumericAttribute(V,"level",void 0)]=k;for(var W=s$S.queryChildNodes(V,"TileBounds",void 0),H=0,q=W.length;H<q;H++){var j=W[H],Y=s$S.queryNumericValue(j,"StartCol",void 0),X=s$S.queryNumericValue(j,"StartRow",void 0),K=s$S.queryNumericValue(j,"EndCol",void 0),Q=s$S.queryNumericValue(j,"EndRow",void 0);if(ie>=r._offset._level){var Z=1<<ie-r._offset._level,J=r._offset._x*Z;Y-=J,K-=J;var ee=r._offset._y*Z;X-=ee,Q-=ee}k.push({startX:Y,startY:X,endX:K,endY:Q})}}z[0]=[{startX:0,startY:0,endX:1,endY:1}];for(var te=new n$C(r._tilingScheme,N),ie=0;ie<z.length;++ie){var ne=z[ie],re=r._tilingScheme.getNumberOfYTilesAtLevel(ie);if(e$2b(d[ie])||(d[ie]=[]),e$2b(ne))for(var oe=0;oe<ne.length;++oe){var ae=ne[oe],se=re-ae.endY-1,le=re-ae.startY-1;d[ie].push([ae.startX,se,ae.endX,le]),te.addAvailableTileRange(ie,ae.startX,se,ae.endX,le)}}r._availability=te}c.push(new et$9({resource:t$11.createIfNeeded(e.url),version:"",isHeightmap:!1,tileUrlTemplates:r._tileUrlTemplates,availability:te,hasVertexNormals:!1,hasWaterMask:!0,hasMetadata:!1,availabilityLevels:0,availabilityTilesLoaded:!1,littleEndianExtensionSize:!0})),r._levels=A,r._ready=!0,r._readyPromise.resolve(!0)}),(function(){r._readyPromise.reject(!1)}))}else if(t>-1){var x=i+"/1.0.0/WMTSCapabilities.xml";r._wmtslayer=e.layer||null,r._wmtsformat=e.format||"binary",r._wmtstileMatrixSet=e.tilematrixset||null,e.blockscale>0&&(r._blockScale=1*e.blockscale,r._isBlock=!0),o$1l(u$R(x),(function(t){var i=(new s$S).read(t).documentElement,n=s$S.queryFirstNode(i,"Contents",void 0),o=s$S.queryFirstNode(n,"Layer",void 0);r._tempLayerName=s$S.queryStringValue(o,"Title",void 0);var a=s$S.queryFirstNode(n,"TileMatrixSet",void 0);r._wmtstileMatrixSet=s$S.queryStringValue(a,"Identifier",void 0),r._tileUrlTemplates=[e.url+"?tilematrix={z}&layer="+(r._wmtslayer||r._tempLayerName)+"&tilerow={y}&tilecol={x}&tilematrixset="+r._wmtstileMatrixSet+"&service=WMTS&request=GetTile"];var s=s$S.queryFirstNode(o,"BoundingBox",void 0),l=s$S.queryStringValue(s,"LowerCorner",void 0),u=s$S.queryStringValue(s,"UpperCorner",void 0),h=l.split(" "),d=u.split(" "),f=parseFloat(h[0]),p=parseFloat(d[0]),_=parseFloat(h[1]),m=parseFloat(d[1]);f&&p&&_&&m&&(r._bounds=new h$18(f,_,p,m),r._boundsRadians=h$18.fromDegrees(f,_,p,m));var g=s$S.queryFirstNode(n,"TileMatrixSet",void 0),x=(a=s$S.queryChildNodes(g,"TileMatrix",void 0),s$S.queryNumericValue(a[0],"ScaleDenominator",void 0)),v=s$S.queryNumericValue(a[a.length-1],"ScaleDenominator",void 0),y=s$S.queryNumericValue(a[0],"Identifier",void 0);x=1/x,v=1/v;var $=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],b=$.indexOf(x),T=$.indexOf(v);for(let e=0;e<$.length;e++)x>$[e]&&$[e+1]&&x<$[e+1]&&(b=e-1),v>$[e]&&$[e+1]&&v<$[e+1]&&(T=e-1);for(var C=u$_((b=Math.max(b,0))-y,0),S=[],w=b;w<=T;w++)S.push(w);r._isTerrainZ="terrainz",c.push(new et$9({resource:t$11.createIfNeeded(e.url),version:"",isHeightmap:!1,tileUrlTemplates:r._tileUrlTemplates,hasVertexNormals:!1,hasWaterMask:!0,hasMetadata:!1,availabilityLevels:0,availabilityTilesLoaded:!1,littleEndianExtensionSize:!0,subLevel:C})),r._levels=S,r._ready=!0,r._readyPromise.resolve(!0)}),(function(){r._readyPromise.reject(!1)}))}else o$1l(e.url).then((function(e){var t=t$11.createIfNeeded(e);t.appendForwardSlash(),l=(s=t).getDerivedResource({url:"layer.json"}),r._tileCredits=t.credits,T()})).otherwise((function(e){a.reject(e)}));function v(e){var t;if(!e.format)return t="The tile format is not specified in the layer.json file.",void(u=l$W.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T));if(!e.tiles||0===e.tiles.length)return t="The layer.json file does not specify any tile URL templates.",void(u=l$W.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T));var i=!1,n=!1,o=!1,a=!0,p=!1;if("heightmap-1.0"===e.format)p=!0,e$2b(r._heightmapStructure)||(r._heightmapStructure={heightScale:.2,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:65535}),n=!0,r._requestWaterMask=!0;else if(0!==e.format.indexOf("quantized-mesh-1."))return t='The tile format "'+e.format+'" is invalid or not supported.',void(u=l$W.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T));var _,m=e.tiles,g=e.maxzoom;f=Math.max(f,g),e$2b(e.extensions)&&-1!==e.extensions.indexOf("octvertexnormals")?i=!0:e$2b(e.extensions)&&-1!==e.extensions.indexOf("vertexnormals")&&(i=!0,a=!1),e$2b(e.extensions)&&-1!==e.extensions.indexOf("watermask")&&(n=!0),e$2b(e.extensions)&&-1!==e.extensions.indexOf("metadata")&&(o=!0);var x,$=e.metadataAvailability,b=e.available;if(e$2b(b)&&!e$2b($)){x=new n$C(r._tilingScheme,b.length);for(var C=0;C<b.length;++C){var S=b[C],w=r._tilingScheme.getNumberOfYTilesAtLevel(C);e$2b(d[C])||(d[C]=[]);for(var E=0;E<S.length;++E){var P=S[E],A=w-P.endY-1,L=w-P.startY-1;d[C].push([P.startX,A,P.endX,L]),x.addAvailableTileRange(C,P.startX,A,P.endX,L)}}}else e$2b($)&&(_=new n$C(r._tilingScheme,g),x=new n$C(r._tilingScheme,g),d[0]=[[0,0,1,0]],x.addAvailableTileRange(0,0,0,1,0));r._hasWaterMask=r._hasWaterMask||n,r._hasVertexNormals=r._hasVertexNormals||i,r._hasMetadata=r._hasMetadata||o,e$2b(e.attribution)&&(h.length>0&&(h+=" "),h+=e.attribution),c.push(new et$9({resource:s,version:e.version,isHeightmap:p,tileUrlTemplates:m,availability:x,hasVertexNormals:i,hasWaterMask:n,hasMetadata:o,availabilityLevels:$,availabilityTilesLoaded:_,littleEndianExtensionSize:a}));var M=e.parentUrl;return e$2b(M)?e$2b(x)?((s=s.getDerivedResource({url:M})).appendForwardSlash(),o$1l((l=s.getDerivedResource({url:"layer.json"})).fetchJson(),v,y)):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),o$1l.resolve()):o$1l.resolve()}function y(e){var t="An error occurred while accessing "+l.url+".";u=l$W.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T)}function $(e){v(e).then((function(){if(!e$2b(u)){var e=d.length;if(e>0)for(var t=r._availability=new n$C(r._tilingScheme,f),i=0;i<e;++i)for(var n=d[i],o=0;o<n.length;++o){var a=n[o];t.addAvailableTileRange(i,a[0],a[1],a[2],a[3])}if(h.length>0){var s=new r$T(h);e$2b(r._tileCredits)?r._tileCredits.push(s):r._tileCredits=[s]}r._ready=!0,r._readyPromise.resolve(!0)}}))}function b(e){e$2b(e)&&404===e.statusCode?$({tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]}):y()}function T(){o$1l(l.fetchJson()).then($).otherwise(b)}}var Ye$8={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4,INVALID_FLAG:127};function vt$6(e){return e$2b(e)&&0!==e.length?{Accept:"application/vnd.quantized-mesh;extensions="+e.join("-")+",application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}}function tt$8(e,t,i,n,r,o){var a=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new T$J({buffer:a,childTileMask:new Uint8Array(t,a.byteLength,1)[0],waterMask:new Uint8Array(t,a.byteLength+1,t.byteLength-a.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function We$b(e,t,i,n,r,o,a,s){var l=a.littleEndianExtensionSize,u=0,c=3*Float64Array.BYTES_PER_ELEMENT,h=4*Float64Array.BYTES_PER_ELEMENT,d=3*Uint16Array.BYTES_PER_ELEMENT,f=Uint16Array.BYTES_PER_ELEMENT,p=3*f,_=new DataView(t),m=new o$1p(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0));u+=c;var g=_.getFloat32(u,!0);u+=Float32Array.BYTES_PER_ELEMENT;var x=_.getFloat32(u,!0);u+=Float32Array.BYTES_PER_ELEMENT;var v=x,y=g,$=new i$1c(new o$1p(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0)),_.getFloat64(u+c,!0));u+=h;var b=new o$1p(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0));u+=c;var T=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var C=new Uint16Array(t,u,3*T);u+=T*d,T>65536&&(p=3*(f=Uint32Array.BYTES_PER_ELEMENT));var S=C.subarray(0,T),w=C.subarray(T,2*T),E=C.subarray(2*T,3*T);t$10.zigZagDeltaDecode(S,w,E),u%f!=0&&(u+=f-u%f);var P=_.getUint32(u,!0),A=u+=Uint32Array.BYTES_PER_ELEMENT,L=ce$x.createTypedArrayFromArrayBuffer(T,t,u,3*P);u+=P*p;for(var M=0,R=L.length,O=0;O<R;++O){var I=L[O];L[O]=M-I,0===I&&++M}var D=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var B=ce$x.createTypedArrayFromArrayBuffer(T,t,u,D);u+=D*f;var N=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var F=ce$x.createTypedArrayFromArrayBuffer(T,t,u,N);u+=N*f;var U=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var G=ce$x.createTypedArrayFromArrayBuffer(T,t,u,U);u+=U*f;var z=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var V=ce$x.createTypedArrayFromArrayBuffer(T,t,u,z);u+=z*f;var k,W,H,q,j=!1,Y=!1,X=void 0,K=void 0;!1===e._isShowGlobe&&(0===x||u>=_.byteLength)&&(j=!0);for(var Q=0;u<_.byteLength;){var Z=_.getUint8(u,!0);if(0!==Z){u+=Uint8Array.BYTES_PER_ELEMENT;var J=_.getUint32(u,l);if(u+=Uint32Array.BYTES_PER_ELEMENT,Z===Ye$8.OCT_VERTEX_NORMALS&&e._requestVertexNormals)k=new Uint8Array(t,u,2*T);else if(Z===Ye$8.WATER_MASK&&e._requestWaterMask)W=new Uint8Array(t,u,J);else if(Z===Ye$8.METADATA&&e._requestMetadata&&!e._isSct){var ee=_.getUint32(u,!0);if(ee>0){var te=a$K(new Uint8Array(t),u+Uint32Array.BYTES_PER_ELEMENT,ee),ie=JSON.parse(te).available;if(e$2b(ie))for(var ne=0;ne<ie.length;++ne)for(var re=i+ne+1,oe=ie[ne],ae=e._tilingScheme.getNumberOfYTilesAtLevel(re),se=0;se<oe.length;++se){var le=oe[se],ue=ae-le.endY-1,ce=ae-le.startY-1;e.availability.addAvailableTileRange(re,le.startX,ue,le.endX,ce),a.availability.addAvailableTileRange(re,le.startX,ue,le.endX,ce)}}a.availabilityTilesLoaded.addAvailableTileRange(i,n,r,n,r)}else if(Z===Ye$8.INVALID_FLAG){if((Q=_.getUint32(u,!0))>0){var he=0,de=32767;for(O=0;O<Q;O++)he=Math.max(he,E[L[O]]),de=Math.min(de,E[L[O]]);he<32767&&(v=g+(x-g)*he/32767),de>0&&(y=g+(x-g)*de/32767)}(!1===e._isShowGlobe||e$2b(s))&&(!1===e._isShowGlobe&&(0===Q?j=!0:L=ce$x.createTypedArrayFromArrayBuffer(T,t,A,Q)),(3*P!=Q||0==Q)&&(Y=!0),e$2b(s)&&Q>0&&(0===(X=ce$x.createTypedArrayFromArrayBuffer(T,t,A,Q)).length&&(X=void 0)))}else if(125===Z){var fe=J/4;H=new Uint8Array(3*fe);var pe=u,_e=new o$1p;for(O=0;O<fe;O++){var me=_.getInt16(pe,!0);pe+=Int16Array.BYTES_PER_ELEMENT;var ge=_.getInt16(pe,!0);pe+=Int16Array.BYTES_PER_ELEMENT,t$10.octShortDecode(me,ge,_e),H[3*O]=255*(.5*_e.x+.5),H[3*O+1]=255*(.5*_e.y+.5),H[3*O+2]=255*(.5*_e.z+.5)}}u+=J}else u+=1}if(e$2b(X)){K=new Uint16Array(3*T);for(O=0;O<T;O++)K[3*O]=C[O],K[3*O+1]=C[T+O],K[3*O+2]=C[2*T+O]}!1===e._isShowGlobe&&(q=0);var xe,ve,ye=e._tilingScheme.tileXYToRectangle(n,r,i);return ye.width<e$2a.PI_OVER_TWO+e$2a.EPSILON5&&(xe=y$Z.fromRectangle(ye,g,x,e._tilingScheme.ellipsoid),ve=y$Z.fromRectangle(ye,y,v,e._tilingScheme.ellipsoid)),q=e._isCreateSkirt?5*e.getLevelMaximumGeometricError(i):0,e._hasNormalBuffer=e$2b(H),new p$O({center:m,minimumHeight:g,maximumHeight:x,boundingSphere:$,orientedBoundingBox:xe,validMinimumHeight:y,validMaximumHeight:v,validOrientedBoundingBox:ve,horizonOcclusionPoint:b,quantizedVertices:C,encodedNormals:k,indices:L,westIndices:B,southIndices:F,eastIndices:G,northIndices:V,westSkirtHeight:q,southSkirtHeight:q,eastSkirtHeight:q,northSkirtHeight:q,childTileMask:e._isSct||!e$2b(e.availability)?15:e.availability.computeChildMaskForTile(i,n,r),waterMask:W,credits:e._tileCredits,normalTexture:H,invalid:j,rasterIndex:X,rasterVertex:K,hasInvalid:Y})}function Ne$d(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function _t$5(e,t,i,n){var r=Math.min(e._blockScale,n),o=Math.pow(2,r),a=t%o;return{x:Math.floor(t/o),y:Math.floor(i/o),col:a,row:i%o,level:n,blockSize:o}}ne$x.prototype.requestTileGeometry=function(e,t,i,n,r){if(!this._ready)throw new t$16("requestTileGeometry must not be called before the terrain provider is ready.");if(0===i&&this._isSct){for(var o=new Uint16Array(12288),a=0;a<64;a++)for(var s=0;s<64;s++)o[64*a+s]=Math.floor(32767*a/63),o[4096+64*a+s]=Math.floor(32767*s/63),o[8192+64*a+s]=0;var l=new Uint16Array(23814);for(a=0;a<63;a++)for(s=0;s<63;s++)l[6*(63*a+s)]=64*a+s,l[6*(63*a+s)+1]=64*(a+1)+s+1,l[6*(63*a+s)+2]=64*a+s+1,l[6*(63*a+s)+3]=64*(a+1)+s,l[6*(63*a+s)+4]=64*(a+1)+s+1,l[6*(63*a+s)+5]=64*a+s;var u=new Uint16Array(0),c=new o$1p(NaN,-1/0,NaN),h=new o$1p(0,-3189068.5,0);1===e&&(h.y=3189068.5,c.y=1/0);var d=this;return o$1l.resolve(new p$O({center:h,minimumHeight:0,maximumHeight:0,boundingSphere:new i$1c(h,9567205.5),horizonOcclusionPoint:c,quantizedVertices:o,indices:l,westIndices:u,southIndices:u,eastIndices:u,northIndices:u,westSkirtHeight:0,southSkirtHeight:0,eastSkirtHeight:0,northSkirtHeight:0,childTileMask:d._isSct||!e$2b(d.availability)?15:d.availability.computeChildMaskForTile(i,e,t),invalid:!1,hasInvalid:!1}))}var f,p=this._layers,_=p.length;if(1===_)f=p[0];else for(a=0;a<_;++a){var m=p[a];if(!e$2b(m.availability)||m.availability.isTileAvailable(i,e,t)){f=m;break}}return yt$4(this,e,t,i,f,n,r)};var Dt$5=/({.*?})/g;function yt$4(e,t,i,n,r,o,a){if(!e$2b(r))return o$1l.reject(new t$14("Terrain tile doesn't exist"));var s=r.tileUrlTemplates;if(0!==s.length){var l=e._tilingScheme.getNumberOfYTilesAtLevel(n)-i-1,u=[];e._requestVertexNormals&&r.hasVertexNormals&&u.push(r.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&r.hasWaterMask&&u.push("watermask"),e._requestMetadata&&r.hasMetadata&&u.push("metadata");var c,h,d=s[(t+l+n)%s.length];e$2b(e._currentVersion)&&(d+="&dataVersion="+e._currentVersion),e._isSct&&0===n&&(d=n$15("Assets/Terrain/"+n+"/"+t+"/"+i+".terrain"));var f,p=r.resource;if(e$2b(p._ionEndpoint)&&!e$2b(p._ionEndpoint.externalType)?(0!==u.length&&(h={extensions:u.join("-")}),c=vt$6(void 0)):(c=vt$6(u),e$2b(e._customRequestHeaders)&&(c=p$19(c,e._customRequestHeaders))),0!==n&&(e$2b(e._packingRequest)||e._isBlock))if(e._isBlock&&e$2b(e._packingRequest)&&e._packingRequest===X$N.QuadKey&&!a){if(o.type=V$15.BLOCKPACK,o.throttle=!0,o.providerName=e.tablename,f=_t$5(e,t,l,n),o.quadKey=Ne$d(f.x,f.y,f.level),o.blockInfo=f,e$2b(x=e.blockCache[o.quadKey])&&e$2b(x.data))return e.blockCacheQueue.touch(x),e$2b(_=Fe$f(x.data,f))?{buffer:_,layerToUse:r,level:n,x:t,y:i,tmsY:l}:"cacheInvalid"}else if(e._packingRequest!==X$N.QuadKey||a){if(e._isBlock){var _;if(o.type=V$15.BLOCK,o.providerName=e.tablename,f=_t$5(e,t,l,n),o.quadKey=Ne$d(f.x,f.y,f.level),o.blockInfo=f,e$2b(x=e.blockCache[o.quadKey])&&e$2b(x.data)&&!a)return e.blockCacheQueue.touch(x),e$2b(_=Fe$f(x.data,f))?{buffer:_,layerToUse:r,level:n,x:t,y:i,tmsY:l}:"cacheInvalid";if(!0===e._indexedDBSetting.isOpen&&e$2b(e._indexedDBScheduler)&&!0===o.cacheEnable)return e$2b(y=e._indexedDBScheduler.getElementFromDB(e.tablename,o.quadKey))?y.then((function(a){if(e$2b(a)){if(a===De$g)return"cacheInvalid";var s=new e$1b(e,o.quadKey,a);e.blockCache[o.quadKey]=s;var u=Fe$f(a,f);return e$2b(u)?e._isTerrainZ&&0!==n?{buffer:u,layerToUse:r,level:n,x:t,y:i,tmsY:l}:e$2b(e._heightmapStructure)?tt$8(e,u):We$b(e,u,n,t,i,l,r):"cacheError"}return"cacheError"}),(function(e){return"cacheError"})):"cacheError"}}else o.type=V$15.PACK,o.providerName=e.tablename,o.quadKey=Ne$d(t,l,n),o.throttle=!0;if(!e$2b(e._indexedDBSetting)||!0!==e._indexedDBSetting.isOpen||!0!==o.cacheEnable){let s=function(s){var u;if(e$2b(u=0!==e._cacheKey.length?Ot$5(s,e._cacheKey):s)){if(0!==n&&(e$2b(e._packingRequest)||e._isBlock)){if(e._isBlock&&e$2b(e._packingRequest)&&e._packingRequest===X$N.QuadKey&&!a){!e$2b(o.quadKeyIndex)&&e$2b(o.blockRequest)&&(o.quadKeyIndex=o.blockRequest.quadKeyIndex);var c=gt$4(s,o.quadKeyIndex);e$2b(h=e.blockCache[o.quadKey])&&(h.data=s),e.blockCacheQueue.touch(h),e.blockCacheQueue.trim(e.blockCacheSize),u=Fe$f(c,o.blockInfo)}else if(e._packingRequest!==X$N.QuadKey||a){if(e._isBlock){var h;if(!e$2b((h=e.blockCache[o.quadKey]).data)&&(h.data=s,!0===e._indexedDBSetting.isOpen&&e$2b(e._indexedDBScheduler)&&!o.cacheEnable)){var d=o.quadKey,f={blob:s.slice(0),key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname,cacheSize:5};Ge$9.scheduleTask(f,[])}e.blockCacheQueue.touch(h),e.blockCacheQueue.trim(e.blockCacheSize),u=Fe$f(s,o.blockInfo)}}else u=gt$4(s,o.quadKeyIndex);if(!e$2b(u))return;if(u===De$g){d=Ne$d(t,l,n),f={blob:De$g,key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname};return void Ge$9.scheduleTask(f,[])}}if(e$2b(e._indexedDBSetting)&&!0===e._indexedDBSetting.isOpen&&!e._isBlock&&e$2b(e._indexedDBScheduler)&&e$2b(u)){d=Ne$d(t,l,n),f={blob:u.slice(0),key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname};Ge$9.scheduleTask(f,[])}return e._isTerrainZ&&0!==n?{buffer:u,layerToUse:r,level:n,x:t,y:i,tmsY:l}:e$2b(e._heightmapStructure)?tt$8(e,u):We$b(e,u,n,t,i,l,r)}};if(e$2b(e._subdomains)&&0!==n){var m=e._subdomains,g=m[(t+i+n)%m.length];d=d.replace(Dt$5,(function(e,t){return"{s}"===t?g:e}))}var x,v;return e._isBlock?e$2b(x=e.blockCache[o.quadKey||n+""+t+i])?x.promise.then(s):(v=bt$4(p,d,r,n,t,i,l,h,c,o,e,a,f))?(x=new e$1b(e,o.quadKey||n+""+t+i),e.blockCache[o.quadKey]=x,x.promise=v,v.then(s)):void 0:(v=bt$4(p,d,r,n,t,i,l,h,c,o,e,a,f))?v.then(s):void 0}if(e$2b(e._indexedDBScheduler)){var y,$=Ne$d(t,l,n);return e$2b(y=e._indexedDBScheduler.getElementFromDB(e.tablename,$))?y.then((function(o){return e$2b(o)?o===De$g?"cacheInvalid":e._isTerrainZ&&0!==n?{buffer:o,layerToUse:r,level:n,x:t,y:i,tmsY:l}:e$2b(e._heightmapStructure)?tt$8(e,o):We$b(e,o,n,t,i,l,r):"cacheError"}),(function(e){return"cacheError"})):"cacheError"}}}function gt$4(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(t>r-1)throw new t$16("pack imagery index invalid");n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?De$g:new Uint8Array(e).slice(n,n+a).buffer;n+=a}}function Fe$f(e,t){var i=new DataView(e),n=0;i.getUint32(n,!0),n+=4;var r=i.getUint32(n,!0);n+=4;for(var o=t.col,a=t.row*t.blockSize+o,s=0,l=0,u=0;u<r;u++){if(u<a)s+=i.getUint32(n,!0);else if(u===a){l=i.getUint32(n,!0),n+=4;break}n+=4}if(n=8+4*r,0!==l)return n+=s,new Uint8Array(e).slice(n,n+l).buffer}var Ge$9=new i$V("indexedDBWorker");function bt$4(e,t,i,n,r,o,a,s,l,u,c,h,d){var f,p=t.substring(0,t.lastIndexOf("/realspace/")+10);if(e$2b(a$O.CREDENTIAL)&&(t=e$2b(a$O.CREDENTIAL._keymap[p])?a$O.addTokenWithKey(p,t):a$O.addToken(t)),e$2b(d)){var _=d.x,m=d.y;if(n>=c._offset._level){var g=1<<n-c._offset._level;_+=c._offset._x*g/d.blockSize,m+=c._offset._y*g/d.blockSize}f=e.getDerivedResource({url:t,templateValues:{version:i.version,z:n,x:_,y:m},queryParameters:s,headers:l,request:u}).fetchArrayBuffer()}else{var x=u$_(i.subLevel,0);f=e.getDerivedResource({url:t,templateValues:{version:i.version,z:n-x,x:r,y:a},queryParameters:s,headers:l,request:u}).fetchArrayBuffer()}return f}var Pt$4=new i$V("UnZipTerrainData");ne$x.prototype.unzip=function(e){return Pt$4.scheduleTask({data:e},[e])},ne$x.prototype.createTerrainData=function(e,t,i){return We$b(this,t,e.level,e.x,e.y,e.tmsY,e.layerToUse,i)},Object.defineProperties(ne$x.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this._ready)throw new t$16("credit must not be called before the terrain provider is ready.");return this._credit}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the terrain provider is ready.");return this._tilingScheme}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){if(!this._ready)throw new t$16("hasWaterMask must not be called before the terrain provider is ready.");return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){if(!this._ready)throw new t$16("hasVertexNormals must not be called before the terrain provider is ready.");return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){if(!this._ready)throw new t$16("hasMetadata must not be called before the terrain provider is ready.");return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){if(!this._ready)throw new t$16("availability must not be called before the terrain provider is ready.");return this._availability}},isShowGlobe:{get:function(){return this._isShowGlobe}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){e$2b(e)&&"boolean"==typeof e.isOpen&&(this._indexedDBSetting.isOpen=e.isOpen)}},hasNormalBuffer:{get:function(){return this._hasNormalBuffer}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2b(e)&&!e$2b(e.length))throw new t$16("Excepted SuperMapTerrainProvider.subdomains to be type of Array.");this._subdomains=e}},currentVersion:{get:function(){return this._currentVersion},set:function(e){this._currentVersion=e,this._blockCache={},this._needRefresh=!0}},historyVersions:{get:function(){return this._historyVersions}},visible:{get:function(){return this._visible},set:function(e){this._visible=e}},extrudeTileBoundingBox:{get:function(){return this._extrudeTileBoundingBox},set:function(e){this._extrudeTileBoundingBox=e}}}),ne$x.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var Ut$5=new h$18;function rt$a(e,t,i,n){if(0!==n){var r=e.availabilityLevels,o=n%r==0?n-r:(n/r|0)*r,a=1<<n-o;return{level:o,x:t/a|0,y:i/a|0}}}function Et$5(e,t,i,n,r,o){if(!e$2b(r.availabilityLevels))return{result:!1};for(var a,s=function(){delete r.availabilityPromiseCache[a]},l=r.availabilityTilesLoaded,u=r.availability,c=rt$a(r,t,i,n);e$2b(c);){if(u.isTileAvailable(c.level,c.x,c.y)&&!l.isTileAvailable(c.level,c.x,c.y)){var h;if(!o&&(a=c.level+"-"+c.x+"-"+c.y,!e$2b(h=r.availabilityPromiseCache[a]))){var d=new r$1b({throttle:!0,throttleByServer:!0,type:V$15.TERRAIN});e$2b(h=yt$4(e,c.x,c.y,c.level,r,d))&&(r.availabilityPromiseCache[a]=h,h.then(s))}return{result:!0,promise:h}}c=rt$a(r,c.x,c.y,c.level)}return{result:!1}}function Ot$5(e,t){var i=new Int8Array(e);for(var n=t.split("").map((function(e){return e.charCodeAt(0)})),r=0;r<n.length;r++)i[r]=i[r]^n[r];return i.buffer}ne$x.prototype.getTileDataAvailable=function(e,t,i){if(e$2b(this._availability)){if(i>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(i,e,t))return!0;if(!this._hasMetadata)return!1;for(var n=this._layers,r=n.length,o=0;o<r;++o){if(Et$5(this,e,t,i,n[o],0===o).result)return}return!1}if(this._isSct&&0!==i){if(-1!==this._levels.indexOf(i)){var a=this._tilingScheme.tileXYToRectangle(e,t,i);return e$2b(h$18.intersection(this._boundsRadians,a,Ut$5))}return!1}},ne$x.prototype.loadTileDataAvailability=function(e,t,i){if(!(!e$2b(this._availability)||i>this._availability._maximumLevel||this._availability.isTileAvailable(i,e,t))&&this._hasMetadata)for(var n=this._layers,r=n.length,o=0;o<r;++o){var a=Et$5(this,e,t,i,n[o],0===o);if(e$2b(a.promise))return a.promise}},ne$x.prototype.saveLocalCache=function(){if(e$2b(this._indexedDBSetting)&&!0===this._indexedDBSetting.isOpen&&e$2b(this._indexedDBScheduler)){var e={tablename:this.tablename,dbname:this._indexedDBScheduler.dbname};Ge$9.scheduleTask(e,[])}},ne$x._getAvailabilityTile=rt$a;var i$K,n$z="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhZmRiYzgzMy1hODQ3LTRkMDktYjE0Ni0zNTViMTdmNGEyZWEiLCJpZCI6MjU5LCJzY29wZXMiOlsiYXNyIiwiZ2MiXSwiaWF0IjoxNTgzMTYzMTYwfQ.blu_ATsUNqSYK0fIBrNRvxq9HiCzY5Ul_4v_4-3F5QY",e$Y={};function n$y(e,t){o$1q.defined("endpoint",e),o$1q.defined("endpointResource",t);var i,n=e.externalType,r=e$2b(n);if(r){if("3DTILES"!==n&&"STK_TERRAIN_SERVER"!==n)throw new t$14("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");i={url:e.options.url}}else i={url:e.url,retryAttempts:1,retryCallback:_$D};t$11.call(this,i),this._ionEndpoint=e,this._ionEndpointDomain=r?void 0:new h$16(e.url).authority,this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=r}function _$D(e,t){var i=u$_(e._ionRoot,e),n=i._ionEndpointResource;return e$2b(t)&&(401===t.statusCode||t.target instanceof Image)?(e$2b(i._pendingPromise)||(i._pendingPromise=n.fetchJson().then((function(e){return i._ionEndpoint=e,e})).always((function(e){return i._pendingPromise=void 0,e}))),i._pendingPromise.then((function(t){return e._ionEndpoint=t,!0}))):o$1l.resolve(!1)}function u$H(e){return e=u$_(e,u$_.EMPTY_OBJECT),new ne$x({url:n$y.fromAssetId(1),requestVertexNormals:u$_(e.requestVertexNormals,!1),requestWaterMask:u$_(e.requestWaterMask,!1)})}e$Y.defaultAccessToken=n$z,e$Y.defaultServer=new t$11({url:""}),e$Y.getDefaultTokenCredit=function(e){if(e===n$z){if(!e$2b(i$K)){i$K=new r$T("<b> This application is using SuperMap3D's default ion access token. Please assign <i>SuperMap3D.Ion.defaultAccessToken</i> with an access token from your ion account before making any SuperMap3D API calls. You can sign up for a free ion account at .</b>",!0)}return i$K}},e$2b(Object.create)&&(n$y.prototype=Object.create(t$11.prototype),n$y.prototype.constructor=n$y),n$y.fromAssetId=function(e,t){var i=n$y._createEndpointResource(e,t);return i.fetchJson().then((function(e){return new n$y(e,i)}))},Object.defineProperties(n$y.prototype,{credits:{get:function(){return e$2b(this._ionRoot)?this._ionRoot.credits:(e$2b(this._credits)||(this._credits=n$y.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource)),this._credits)}}}),n$y.getCreditsFromEndpoint=function(e,t){var i=e.attributions.map(r$T.getIonCredit),n=e$Y.getDefaultTokenCredit(t.queryParameters.access_token);return e$2b(n)&&i.push(r$T.clone(n)),i},n$y.prototype.clone=function(e){var t=u$_(this._ionRoot,this);return e$2b(e)||(e=new n$y(t._ionEndpoint,t._ionEndpointResource)),(e=t$11.prototype.clone.call(this,e))._ionRoot=t,e._isExternal=this._isExternal,e},n$y.prototype.fetchImage=function(e){if(!this._isExternal){var t=e;e={preferBlob:!0},e$2b(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return t$11.prototype.fetchImage.call(this,e)},n$y.prototype._makeRequest=function(e){return this._isExternal||new h$16(this.url).authority!==this._ionEndpointDomain||(e$2b(e.headers)||(e.headers={}),e.headers.Authorization="Bearer "+this._ionEndpoint.accessToken),t$11.prototype._makeRequest.call(this,e)},n$y._createEndpointResource=function(e,t){o$1q.defined("assetId",e),t=u$_(t,u$_.EMPTY_OBJECT);var i=u$_(t.server,e$Y.defaultServer),n=u$_(t.accessToken,e$Y.defaultAccessToken);i=t$11.createIfNeeded(i);var r={url:"v1/assets/"+e+"/endpoint"};return e$2b(n)&&(r.queryParameters={access_token:n}),i.getDerivedResource(r)};var Pa$1=function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]},Y$v=1,tt$7=2,wa$1=4,Ot$4=5,ot$4=484813681109536e-20,m$J=Math.PI/2,Sa$1=.16666666666666666,Ia$2=.04722222222222222,Ra$2=.022156084656084655,_$C=1e-10,$$F=.017453292519943295,H$K=57.29577951308232,w$G=Math.PI/4,qt$4=2*Math.PI,R$D=3.14159265359,z$H={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},Oa$1={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},Ft$5=/[\s_\-\/\(\)]/g;function X$B(e,t){if(e[t])return e[t];for(var i,n=Object.keys(e),r=t.toLowerCase().replace(Ft$5,""),o=-1;++o<n.length;)if((i=n[o]).toLowerCase().replace(Ft$5,"")===r)return e[i]}var Tt$6=function(e){var t,i,n,r={},o=e.split("+").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var i=t.split("=");return i.push(!0),e[i[0].toLowerCase()]=i[1],e}),{}),a={proj:"projName",datum:"datumCode",rf:function(e){r.rf=parseFloat(e)},lat_0:function(e){r.lat0=e*$$F},lat_1:function(e){r.lat1=e*$$F},lat_2:function(e){r.lat2=e*$$F},lat_ts:function(e){r.lat_ts=e*$$F},lon_0:function(e){r.long0=e*$$F},lon_1:function(e){r.long1=e*$$F},lon_2:function(e){r.long2=e*$$F},alpha:function(e){r.alpha=parseFloat(e)*$$F},lonc:function(e){r.longc=e*$$F},x_0:function(e){r.x0=parseFloat(e)},y_0:function(e){r.y0=parseFloat(e)},k_0:function(e){r.k0=parseFloat(e)},k:function(e){r.k0=parseFloat(e)},a:function(e){r.a=parseFloat(e)},b:function(e){r.b=parseFloat(e)},r_a:function(){r.R_A=!0},zone:function(e){r.zone=parseInt(e,10)},south:function(){r.utmSouth=!0},towgs84:function(e){r.datum_params=e.split(",").map((function(e){return parseFloat(e)}))},to_meter:function(e){r.to_meter=parseFloat(e)},units:function(e){r.units=e;var t=X$B(Oa$1,e);t&&(r.to_meter=t.to_meter)},from_greenwich:function(e){r.from_greenwich=e*$$F},pm:function(e){var t=X$B(z$H,e);r.from_greenwich=(t||parseFloat(e))*$$F},nadgrids:function(e){"@null"===e?r.datumCode="none":r.nadgrids=e},axis:function(e){var t="ewnsud";3===e.length&&-1!==t.indexOf(e.substr(0,1))&&-1!==t.indexOf(e.substr(1,1))&&-1!==t.indexOf(e.substr(2,1))&&(r.axis=e)}};for(t in o)i=o[t],t in a?"function"==typeof(n=a[t])?n(i):r[n]=i:r[t]=i;return"string"==typeof r.datumCode&&"WGS84"!==r.datumCode&&(r.datumCode=r.datumCode.toLowerCase()),r},lt$1=1,jt$2=2,Qt$3=3,xt$4=4,Wt$5=5,$t$1=-1,qa$2=/\s/,Ta$2=/[A-Za-z]/,$a$2=/[A-Za-z84]/,bt$3=/[,\]]/,Ht$3=/[\d\.E\-\+]/;function Q$F(e){if("string"!=typeof e)throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=lt$1}function La$2(e){return new Q$F(e).output()}function Xt$1(e,t,i){Array.isArray(t)&&(i.unshift(t),t=null);var n=t?{}:e,r=i.reduce((function(e,t){return at$7(t,e),e}),n);t&&(e[t]=r)}function at$7(e,t){if(Array.isArray(e)){var i=e.shift();if("PARAMETER"===i&&(i=e.shift()),1===e.length)return Array.isArray(e[0])?(t[i]={},void at$7(e[0],t[i])):void(t[i]=e[0]);if(e.length)if("TOWGS84"!==i){if("AXIS"===i)return i in t||(t[i]=[]),void t[i].push(e);var n;switch(Array.isArray(i)||(t[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return t[i]={name:e[0].toLowerCase(),convert:e[1]},void(3===e.length&&at$7(e[2],t[i]));case"SPHEROID":case"ELLIPSOID":return t[i]={name:e[0],a:e[1],rf:e[2]},void(4===e.length&&at$7(e[3],t[i]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return e[0]=["name",e[0]],void Xt$1(t,i,e);default:for(n=-1;++n<e.length;)if(!Array.isArray(e[n]))return at$7(e,t[i]);return Xt$1(t,i,e)}}else t[i]=e;else t[i]=!0}else t[e]=!0}Q$F.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==xt$4)for(;qa$2.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case lt$1:return this.neutral(e);case jt$2:return this.keyword(e);case xt$4:return this.quoted(e);case Wt$5:return this.afterquote(e);case Qt$3:return this.number(e);case $t$1:return}},Q$F.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=xt$4);if(bt$3.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},Q$F.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=lt$1)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=lt$1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=$t$1))):void 0},Q$F.prototype.number=function(e){if(!Ht$3.test(e)){if(bt$3.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},Q$F.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=Wt$5},Q$F.prototype.keyword=function(e){if($a$2.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=lt$1)}if(!bt$3.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},Q$F.prototype.neutral=function(e){if(Ta$2.test(e))return this.word=e,void(this.state=jt$2);if('"'===e)return this.word="",void(this.state=xt$4);if(Ht$3.test(e))return this.word=e,void(this.state=Qt$3);if(!bt$3.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},Q$F.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===$t$1)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var Ga$2=.017453292519943295;function za$2(e,t){var i=t[0],n=t[1];!(i in e)&&n in e&&(e[i]=e[n],3===t.length&&(e[i]=t[2](e[i])))}function W$J(e){return e*Ga$2}function Da$2(e){if("GEOGCS"===e.type?e.projName="longlat":"LOCAL_CS"===e.type?(e.projName="identity",e.local=!0):"object"==typeof e.PROJECTION?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",i=0,n=e.AXIS.length;i<n;++i){var r=e.AXIS[i][0].toLowerCase();-1!==r.indexOf("north")?t+="n":-1!==r.indexOf("south")?t+="s":-1!==r.indexOf("east")?t+="e":-1!==r.indexOf("west")&&(t+="w")}2===t.length&&(t+="u"),3===t.length&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.UNIT.convert&&("GEOGCS"===e.type?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var o=e.GEOGCS;function a(t){return t*(e.to_meter||1)}"GEOGCS"===e.type&&(o=e),o&&(o.DATUM?e.datumCode=o.DATUM.name.toLowerCase():e.datumCode=o.name.toLowerCase(),"d_"===e.datumCode.slice(0,2)&&(e.datumCode=e.datumCode.slice(2)),("new_zealand_geodetic_datum_1949"===e.datumCode||"new_zealand_1949"===e.datumCode)&&(e.datumCode="nzgd49"),("wgs_1984"===e.datumCode||"world_geodetic_system_1984"===e.datumCode)&&("Mercator_Auxiliary_Sphere"===e.PROJECTION&&(e.sphere=!0),e.datumCode="wgs84"),"_ferro"===e.datumCode.slice(-6)&&(e.datumCode=e.datumCode.slice(0,-6)),"_jakarta"===e.datumCode.slice(-8)&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(e.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===e.ellps.toLowerCase().slice(0,13)&&(e.ellps="intl"),e.a=o.DATUM.SPHEROID.a,e.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(e.datum_params=o.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),"ch1903+"===e.datumCode&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a);[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",W$J],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",W$J],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",W$J],["lat0","latitude_of_origin",W$J],["lat0","standard_parallel_1",W$J],["lat1","standard_parallel_1",W$J],["lat2","standard_parallel_2",W$J],["azimuth","Azimuth"],["alpha","azimuth",W$J],["srsCode","name"]].forEach((function(t){return za$2(e,t)})),!e.long0&&e.longc&&("Albers_Conic_Equal_Area"===e.projName||"Lambert_Azimuthal_Equal_Area"===e.projName)&&(e.long0=e.longc),!e.lat_ts&&e.lat1&&("Stereographic_South_Pole"===e.projName||"Polar Stereographic (variant B)"===e.projName)&&(e.lat0=W$J(e.lat1>0?90:-90),e.lat_ts=e.lat1)}var Kt$3=function(e){var t=La$2(e),i=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",i]);var r={};return at$7(t,r),Da$2(r),r};function L$Q(e){var t=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?L$Q[e]=Tt$6(arguments[1]):L$Q[e]=Kt$3(arguments[1]):L$Q[e]=i}else if(1===arguments.length){if(Array.isArray(e))return e.map((function(e){Array.isArray(e)?L$Q.apply(t,e):L$Q(e)}));if("string"==typeof e){if(e in L$Q)return L$Q[e]}else"EPSG"in e?L$Q["EPSG:"+e.EPSG]=e:"ESRI"in e?L$Q["ESRI:"+e.ESRI]=e:"IAU2000"in e?L$Q["IAU2000:"+e.IAU2000]=e:console.log(e);return}}function ka$1(e){return"string"==typeof e}function pa$1(e){return e in L$Q}Pa$1(L$Q);var Ua$2=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Ba$2(e){return Ua$2.some((function(t){return e.indexOf(t)>-1}))}var Fa$2=["3857","900913","3785","102113"];function ja$1(e){var t=X$B(e,"authority");if(t){var i=X$B(t,"epsg");return i&&Fa$2.indexOf(i)>-1}}function Qa$2(e){var t=X$B(e,"extension");if(t)return X$B(t,"proj4")}function Wa$1(e){return"+"===e[0]}function Ha$1(e){if(!ka$1(e))return e;if(pa$1(e))return L$Q[e];if(Ba$2(e)){var t=Kt$3(e);if(ja$1(t))return L$Q["EPSG:3857"];var i=Qa$2(t);return i?Tt$6(i):t}return Wa$1(e)?Tt$6(e):void 0}var Jt$2=function(e,t){var i,n;if(e=e||{},!t)return e;for(n in t)void 0!==(i=t[n])&&(e[n]=i);return e},F$K=function(e,t,i){var n=e*t;return i/Math.sqrt(1-n*n)},ft$4=function(e){return e<0?-1:1},g$M=function(e){return Math.abs(e)<=R$D?e:e-ft$4(e)*qt$4},U$I=function(e,t,i){var n=e*i,r=.5*e;return n=Math.pow((1-n)/(1+n),r),Math.tan(.5*(m$J-t))/n},Mt$4=function(e,t){for(var i,n,r=.5*e,o=m$J-2*Math.atan(t),a=0;a<=15;a++)if(i=e*Math.sin(o),o+=n=m$J-2*Math.atan(t*Math.pow((1-i)/(1+i),r))-o,Math.abs(n)<=1e-10)return o;return-9999};function Xa$2(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=F$K(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Ka$2(e){var t,i,n=e.x,r=e.y;if(r*H$K>90&&r*H$K<-90&&n*H$K>180&&n*H$K<-180)return null;if(Math.abs(Math.abs(r)-m$J)<=_$C)return null;if(this.sphere)t=this.x0+this.a*this.k0*g$M(n-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(w$G+.5*r));else{var o=Math.sin(r),a=U$I(this.e,r,o);t=this.x0+this.a*this.k0*g$M(n-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=i,e}function Ja$2(e){var t,i,n=e.x-this.x0,r=e.y-this.y0;if(this.sphere)i=m$J-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var o=Math.exp(-r/(this.a*this.k0));if(-9999===(i=Mt$4(this.e,o)))return null}return t=g$M(this.long0+n/(this.a*this.k0)),e.x=t,e.y=i,e}var Za$2=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],Va$1={init:Xa$2,forward:Ka$2,inverse:Ja$2,names:Za$2};function Ya$2(){}function Zt$1(e){return e}var ts=["longlat","identity"],as={init:Ya$2,forward:Zt$1,inverse:Zt$1,names:ts},ss=[Va$1,as],Ct$4={},Et$4=[];function Vt$5(e,t){var i=Et$4.length;return e.names?(Et$4[i]=e,e.names.forEach((function(e){Ct$4[e.toLowerCase()]=i})),this):(console.log(t),!0)}function is(e){if(!e)return!1;var t=e.toLowerCase();return typeof Ct$4[t]<"u"&&Et$4[Ct$4[t]]?Et$4[Ct$4[t]]:void 0}function hs(){ss.forEach(Vt$5)}var es={start:hs,add:Vt$5,get:is},b$R={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},rs=b$R.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};function ns(e,t,i,n){var r=e*e,o=t*t,a=(r-o)/r,s=0;return n?(r=(e*=1-a*(Sa$1+a*(Ia$2+a*Ra$2)))*e,a=0):s=Math.sqrt(a),{es:a,e:s,ep2:(r-o)/o}}function os(e,t,i,n,r){if(!e){var o=X$B(b$R,n);o||(o=rs),e=o.a,t=o.b,i=o.rf}return i&&!t&&(t=(1-1/i)*e),(0===i||Math.abs(e-t)<_$C)&&(r=!0,t=e),{a:e,b:t,rf:i,sphere:r}}b$R.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var q$K={};function ls(e,t,i,n,r,o){var a={};return a.datum_type=void 0===e||"none"===e?Ot$4:wa$1,t&&(a.datum_params=t.map(parseFloat),(0!==a.datum_params[0]||0!==a.datum_params[1]||0!==a.datum_params[2])&&(a.datum_type=Y$v),a.datum_params.length>3&&(0!==a.datum_params[3]||0!==a.datum_params[4]||0!==a.datum_params[5]||0!==a.datum_params[6])&&(a.datum_type=tt$7,a.datum_params[3]*=ot$4,a.datum_params[4]*=ot$4,a.datum_params[5]*=ot$4,a.datum_params[6]=a.datum_params[6]/1e6+1)),a.a=i,a.b=n,a.es=r,a.ep2=o,a}function j$F(e,t){if(!(this instanceof j$F))return new j$F(e);t=t||function(e){if(e)throw e};var i=Ha$1(e);if("object"==typeof i){var n=j$F.projections.get(i.projName);if(n){if(i.datumCode&&"none"!==i.datumCode){var r=X$B(q$K,i.datumCode);r&&(i.datum_params=r.towgs84?r.towgs84.split(","):null,i.ellps=r.ellipse,i.datumName=r.datumName?r.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84";var o=os(i.a,i.b,i.rf,i.ellps,i.sphere),a=ns(o.a,o.b,o.rf,i.R_A),s=i.datum||ls(i.datumCode,i.datum_params,o.a,o.b,a.es,a.ep2);Jt$2(this,i),Jt$2(this,n),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=s,this.init(),t(null,this)}else t(e)}else t(e)}function fs(e,t){return!(e.datum_type!==t.datum_type||e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===Y$v?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==tt$7||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}function Yt$2(e,t,i){var n,r,o,a,s=e.x,l=e.y,u=e.z?e.z:0;if(l<-m$J&&l>-1.001*m$J)l=-m$J;else if(l>m$J&&l<1.001*m$J)l=m$J;else{if(l<-m$J)return{x:-1/0,y:-1/0,z:e.z};if(l>m$J)return{x:1/0,y:1/0,z:e.z}}return s>Math.PI&&(s-=2*Math.PI),r=Math.sin(l),a=Math.cos(l),o=r*r,{x:((n=i/Math.sqrt(1-t*o))+u)*a*Math.cos(s),y:(n+u)*a*Math.sin(s),z:(n*(1-t)+u)*r}}function ta$2(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v=1e-12,y=e.x,$=e.y,b=e.z?e.z:0;if(r=Math.sqrt(y*y+$*$),o=Math.sqrt(y*y+$*$+b*b),r/i<v){if(g=0,o/i<v)return m$J,x=-n,{x:e.x,y:e.y,z:e.z}}else g=Math.atan2($,y);a=b/o,h=(s=r/o)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*s*s)),d=a*l,m=0;do{m++,u=t*(c=i/Math.sqrt(1-t*d*d))/(c+(x=r*h+b*d-c*(1-t*d*d))),_=(p=a*(l=1/Math.sqrt(1-u*(2-u)*s*s)))*h-(f=s*(1-u)*l)*d,h=f,d=p}while(_*_>1e-24&&m<30);return{x:g,y:Math.atan(p/Math.abs(f)),z:x}}function Ms(e,t,i){if(t===Y$v)return{x:e.x+i[0],y:e.y+i[1],z:e.z+i[2]};if(t===tt$7){var n=i[0],r=i[1],o=i[2],a=i[3],s=i[4],l=i[5],u=i[6];return{x:u*(e.x-l*e.y+s*e.z)+n,y:u*(l*e.x+e.y-a*e.z)+r,z:u*(-s*e.x+a*e.y+e.z)+o}}}function vs(e,t,i){if(t===Y$v)return{x:e.x-i[0],y:e.y-i[1],z:e.z-i[2]};if(t===tt$7){var n=i[0],r=i[1],o=i[2],a=i[3],s=i[4],l=i[5],u=i[6],c=(e.x-n)/u,h=(e.y-r)/u,d=(e.z-o)/u;return{x:c+l*h-s*d,y:-l*c+h+a*d,z:s*c-a*h+d}}}function At$4(e){return e===Y$v||e===tt$7}q$K.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},q$K.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},q$K.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},q$K.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},q$K.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},q$K.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},q$K.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},q$K.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},q$K.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},q$K.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},q$K.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},q$K.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},q$K.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},q$K.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},q$K.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},q$K.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},q$K.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},j$F.projections=es,j$F.projections.start();var us=function(e,t,i){return fs(e,t)||e.datum_type===Ot$4||t.datum_type===Ot$4||e.es===t.es&&e.a===t.a&&!At$4(e.datum_type)&&!At$4(t.datum_type)?i:(i=Yt$2(i,e.es,e.a),At$4(e.datum_type)&&(i=Ms(i,e.datum_type,e.datum_params)),At$4(t.datum_type)&&(i=vs(i,t.datum_type,t.datum_params)),ta$2(i,t.es,t.a,t.b))},aa$3=function(e,t,i){var n,r,o,a=i.x,s=i.y,l=i.z||0,u={};for(o=0;o<3;o++)if(!t||2!==o||void 0!==i.z)switch(0===o?(n=a,r=-1!=="ew".indexOf(e.axis[o])?"x":"y"):1===o?(n=s,r=-1!=="ns".indexOf(e.axis[o])?"y":"x"):(n=l,r="z"),e.axis[o]){case"e":case"w":case"n":case"s":u[r]=n;break;case"u":void 0!==i[r]&&(u.z=n);break;case"d":void 0!==i[r]&&(u.z=-n);break;default:return null}return u},sa$2=function(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t},cs=function(e){ia$2(e.x),ia$2(e.y)};function ia$2(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function ms(e,t){return(e.datum.datum_type===Y$v||e.datum.datum_type===tt$7)&&"WGS84"!==t.datumCode||(t.datum.datum_type===Y$v||t.datum.datum_type===tt$7)&&"WGS84"!==e.datumCode}function Nt$5(e,t,i){var n;return Array.isArray(i)&&(i=sa$2(i)),cs(i),e.datum&&t.datum&&ms(e,t)&&(i=Nt$5(e,n=new j$F("WGS84"),i),e=n),"enu"!==e.axis&&(i=aa$3(e,!1,i)),"longlat"===e.projName?i={x:i.x*$$F,y:i.y*$$F,z:i.z||0}:(e.to_meter&&(i={x:i.x*e.to_meter,y:i.y*e.to_meter,z:i.z||0}),i=e.inverse(i)),e.from_greenwich&&(i.x+=e.from_greenwich),i=us(e.datum,t.datum,i),t.from_greenwich&&(i={x:i.x-t.from_greenwich,y:i.y,z:i.z||0}),"longlat"===t.projName?i={x:i.x*H$K,y:i.y*H$K,z:i.z||0}:(i=t.forward(i),t.to_meter&&(i={x:i.x/t.to_meter,y:i.y/t.to_meter,z:i.z||0})),"enu"!==t.axis?aa$3(t,!0,i):i}var ha$3=j$F("WGS84");function Lt$3(e,t,i){var n,r,o;return Array.isArray(i)?(n=Nt$5(e,t,i)||{x:NaN,y:NaN},i.length>2?typeof e.name<"u"&&"geocent"===e.name||typeof t.name<"u"&&"geocent"===t.name?"number"==typeof n.z?[n.x,n.y,n.z].concat(i.splice(3)):[n.x,n.y,i[2]].concat(i.splice(3)):[n.x,n.y].concat(i.splice(2)):[n.x,n.y]):(r=Nt$5(e,t,i),2===(o=Object.keys(i)).length||o.forEach((function(n){if(typeof e.name<"u"&&"geocent"===e.name||typeof t.name<"u"&&"geocent"===t.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;r[n]=i[n]})),r)}function ea$4(e){return e instanceof j$F?e:e.oProj?e.oProj:j$F(e)}function k$C(e,t,i){e=ea$4(e);var n,r=!1;return typeof t>"u"?(t=e,e=ha$3,r=!0):(typeof t.x<"u"||Array.isArray(t))&&(i=t,t=e,e=ha$3,r=!0),t=ea$4(t),i?Lt$3(e,t,i):(n={forward:function(i){return Lt$3(e,t,i)},inverse:function(i){return Lt$3(t,e,i)}},r&&(n.oProj=t),n)}var ra$3=6,na$2="AJSAJS",oa$3="AFAFAF",st$3=65,D$E=73,p$M=79,vt$5=86,ut$6=90,ds={forward:la$3,inverse:ys,toPoint:fa$2};function la$3(e,t){return t=t||5,xs(_s({lat:e[1],lon:e[0]}),t)}function ys(e){var t=zt$3(ua$2(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function fa$2(e){var t=zt$3(ua$2(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Gt$3(e){return e*(Math.PI/180)}function Ma$2(e){return e/Math.PI*180}function _s(e){var t,i,n,r,o,a,s,l=e.lat,u=e.lon,c=6378137,h=.00669438,d=.9996,f=Gt$3(l),p=Gt$3(u);s=Math.floor((u+180)/6)+1,180===u&&(s=60),l>=56&&l<64&&u>=3&&u<12&&(s=32),l>=72&&l<84&&(u>=0&&u<9?s=31:u>=9&&u<21?s=33:u>=21&&u<33?s=35:u>=33&&u<42&&(s=37)),a=Gt$3(6*(s-1)-180+3),t=h/(1-h),i=c/Math.sqrt(1-h*Math.sin(f)*Math.sin(f)),n=Math.tan(f)*Math.tan(f),r=t*Math.cos(f)*Math.cos(f);var _=d*i*((o=Math.cos(f)*(p-a))+(1-n+r)*o*o*o/6+(5-18*n+n*n+72*r-58*t)*o*o*o*o*o/120)+5e5,m=d*(c*(.9983242984503243*f-.002514607064228144*Math.sin(2*f)+2639046602129982e-21*Math.sin(4*f)-35*h*h*h/3072*Math.sin(6*f))+i*Math.tan(f)*(o*o/2+(5-n+9*r+4*r*r)*o*o*o*o/24+(61-58*n+n*n+600*r-330*t)*o*o*o*o*o*o/720));return l<0&&(m+=1e7),{northing:Math.round(m),easting:Math.round(_),zoneNumber:s,zoneLetter:gs(l)}}function zt$3(e){var t=e.northing,i=e.easting,n=e.zoneLetter,r=e.zoneNumber;if(r<0||r>60)return null;var o,a,s,l,u,c,h,d,f,p=.9996,_=6378137,m=.00669438,g=(1-Math.sqrt(1-m))/(1+Math.sqrt(1-m)),x=i-5e5,v=t;n<"N"&&(v-=1e7),h=6*(r-1)-180+3,o=m/(1-m),f=(d=v/p/6367449.145945056)+(3*g/2-27*g*g*g/32)*Math.sin(2*d)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*d)+151*g*g*g/96*Math.sin(6*d),a=_/Math.sqrt(1-m*Math.sin(f)*Math.sin(f)),s=Math.tan(f)*Math.tan(f),l=o*Math.cos(f)*Math.cos(f),u=_*(1-m)/Math.pow(1-m*Math.sin(f)*Math.sin(f),1.5),c=x/(a*p);var y=f-a*Math.tan(f)/u*(c*c/2-(5+3*s+10*l-4*l*l-9*o)*c*c*c*c/24+(61+90*s+298*l+45*s*s-252*o-3*l*l)*c*c*c*c*c*c/720);y=Ma$2(y);var $,b=(c-(1+2*s+l)*c*c*c/6+(5-2*l+28*s-3*l*l+8*o+24*s*s)*c*c*c*c*c/120)/Math.cos(f);if(b=h+Ma$2(b),e.accuracy){var T=zt$3({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});$={top:T.lat,right:T.lon,bottom:y,left:b}}else $={lat:y,lon:b};return $}function gs(e){var t="Z";return 84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C"),t}function xs(e,t){var i="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+bs(e.easting,e.northing,e.zoneNumber)+i.substr(i.length-5,t)+n.substr(n.length-5,t)}function bs(e,t,i){var n=va$1(i);return Cs(Math.floor(e/1e5),Math.floor(t/1e5)%20,n)}function va$1(e){var t=e%ra$3;return 0===t&&(t=ra$3),t}function Cs(e,t,i){var n=i-1,r=na$2.charCodeAt(n),o=oa$3.charCodeAt(n),a=r+e-1,s=o+t,l=!1;return a>ut$6&&(a=a-ut$6+st$3-1,l=!0),(a===D$E||r<D$E&&a>D$E||(a>D$E||r<D$E)&&l)&&a++,(a===p$M||r<p$M&&a>p$M||(a>p$M||r<p$M)&&l)&&(++a===D$E&&a++),a>ut$6&&(a=a-ut$6+st$3-1),s>vt$5?(s=s-vt$5+st$3-1,l=!0):l=!1,(s===D$E||o<D$E&&s>D$E||(s>D$E||o<D$E)&&l)&&s++,(s===p$M||o<p$M&&s>p$M||(s>p$M||o<p$M)&&l)&&(++s===D$E&&s++),s>vt$5&&(s=s-vt$5+st$3-1),String.fromCharCode(a)+String.fromCharCode(s)}function ua$2(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,i=e.length,n=null,r="",o=0;!/[A-Z]/.test(t=e.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+e;r+=t,o++}var a=parseInt(r,10);if(0===o||o+3>i)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(o++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+e;n=e.substring(o,o+=2);for(var l=va$1(a),u=Es(n.charAt(0),l),c=As(n.charAt(1),l);c<Ns(s);)c+=2e6;var h=i-o;if(h%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+e;var d,f,p,_=h/2,m=0,g=0;return _>0&&(d=1e5/Math.pow(10,_),f=e.substring(o,o+_),m=parseFloat(f)*d,p=e.substring(o+_),g=parseFloat(p)*d),{easting:m+u,northing:g+c,zoneLetter:s,zoneNumber:a,accuracy:d}}function Es(e,t){for(var i=na$2.charCodeAt(t-1),n=1e5,r=!1;i!==e.charCodeAt(0);){if(++i===D$E&&i++,i===p$M&&i++,i>ut$6){if(r)throw"Bad character: "+e;i=st$3,r=!0}n+=1e5}return n}function As(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var i=oa$3.charCodeAt(t-1),n=0,r=!1;i!==e.charCodeAt(0);){if(++i===D$E&&i++,i===p$M&&i++,i>vt$5){if(r)throw"Bad character: "+e;i=st$3,r=!0}n+=1e5}return n}function Ns(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function it$4(e,t,i){if(!(this instanceof it$4))return new it$4(e,t,i);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&typeof t>"u"){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}it$4.fromMGRS=function(e){return new it$4(fa$2(e))},it$4.prototype.toMGRS=function(e){return la$3([this.x,this.y],e)};var Ps=1,ws=.25,ca$1=.046875,ma$2=.01953125,da=.01068115234375,Ss=.75,Is=.46875,Rs=.013020833333333334,Os=.007120768229166667,qs=.3645833333333333,Ts=.005696614583333333,$s=.3076171875,ya$1=function(e){var t=[];t[0]=Ps-e*(ws+e*(ca$1+e*(ma$2+e*da))),t[1]=e*(Ss-e*(ca$1+e*(ma$2+e*da)));var i=e*e;return t[2]=i*(Is-e*(Rs+e*Os)),i*=e,t[3]=i*(qs-e*Ts),t[4]=i*e*$s,t},Pt$3=function(e,t,i,n){return i*=t,t*=t,n[0]*e-i*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))},Ls=20,_a$2=function(e,t,i){for(var n=1/(1-t),r=e,o=Ls;o;--o){var a=Math.sin(r),s=1-t*a*a;if(r-=s=(Pt$3(r,a,Math.cos(r),i)-e)*(s*Math.sqrt(s))*n,Math.abs(s)<_$C)return r}return r};function Gs(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=ya$1(this.es),this.ml0=Pt$3(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function zs(e){var t,i,n,r=e.x,o=e.y,a=g$M(r-this.long0),s=Math.sin(o),l=Math.cos(o);if(this.es){var u=l*a,c=Math.pow(u,2),h=this.ep2*Math.pow(l,2),d=Math.pow(h,2),f=Math.abs(l)>_$C?Math.tan(o):0,p=Math.pow(f,2),_=Math.pow(p,2);t=1-this.es*Math.pow(s,2),u/=Math.sqrt(t);var m=Pt$3(o,s,l,this.en);i=this.a*(this.k0*u*(1+c/6*(1-p+h+c/20*(5-18*p+_+14*h-58*p*h+c/42*(61+179*_-_*p-479*p)))))+this.x0,n=this.a*(this.k0*(m-this.ml0+s*a*u/2*(1+c/12*(5-p+9*h+4*d+c/30*(61+_-58*p+270*h-330*p*h+c/56*(1385+543*_-_*p-3111*p))))))+this.y0}else{var g=l*Math.sin(a);if(Math.abs(Math.abs(g)-1)<_$C)return 93;if(i=.5*this.a*this.k0*Math.log((1+g)/(1-g))+this.x0,n=l*Math.cos(a)/Math.sqrt(1-Math.pow(g,2)),(g=Math.abs(n))>=1){if(g-1>_$C)return 93;n=0}else n=Math.acos(n);o<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return e.x=i,e.y=n,e}function Ds(e){var t,i,n,r,o=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,i=_a$2(t,this.es,this.en),Math.abs(i)<m$J){var s=Math.sin(i),l=Math.cos(i),u=Math.abs(l)>_$C?Math.tan(i):0,c=this.ep2*Math.pow(l,2),h=Math.pow(c,2),d=Math.pow(u,2),f=Math.pow(d,2);t=1-this.es*Math.pow(s,2);var p=o*Math.sqrt(t)/this.k0,_=Math.pow(p,2);n=i-(t*=u)*_/(1-this.es)*.5*(1-_/12*(5+3*d-9*c*d+c-4*h-_/30*(61+90*d-252*c*d+45*f+46*c-_/56*(1385+3633*d+4095*f+1574*f*d)))),r=g$M(this.long0+p*(1-_/6*(1+2*d+c-_/20*(5+28*d+24*f+8*c*d+6*c-_/42*(61+662*d+1320*f+720*f*d))))/l)}else n=m$J*ft$4(a),r=0;else{var m=Math.exp(o/this.k0),g=.5*(m-1/m),x=this.lat0+a/this.k0,v=Math.cos(x);t=Math.sqrt((1-Math.pow(v,2))/(1+Math.pow(g,2))),n=Math.asin(t),a<0&&(n=-n),r=0===g&&0===v?0:g$M(Math.atan2(g,v)+this.long0)}return e.x=r,e.y=n,e}var ks=["Transverse_Mercator","Transverse Mercator","tmerc"],ps={init:Gs,forward:zs,inverse:Ds,names:ks},ga$2=function(e){var t=Math.exp(e);return t=(t-1/t)/2},Dt$4=function(e,t){e=Math.abs(e),t=Math.abs(t);var i=Math.max(e,t),n=Math.min(e,t)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))},Us=function(e){var t=1+e,i=t-1;return 0===i?e:e*Math.log(t)/i},Bs=function(e){var t=Math.abs(e);return t=Us(t*(1+t/(Dt$4(1,t)+1))),e<0?-t:t},kt$4=function(e,t){for(var i,n=2*Math.cos(2*t),r=e.length-1,o=e[r],a=0;--r>=0;)i=n*o-a+e[r],a=o,o=i;return t+i*Math.sin(2*t)},Fs=function(e,t){for(var i,n=2*Math.cos(t),r=e.length-1,o=e[r],a=0;--r>=0;)i=n*o-a+e[r],a=o,o=i;return Math.sin(t)*i},js=function(e){var t=Math.exp(e);return t=(t+1/t)/2},xa$2=function(e,t,i){for(var n,r,o=Math.sin(t),a=Math.cos(t),s=ga$2(i),l=js(i),u=2*a*l,c=-2*o*s,h=e.length-1,d=e[h],f=0,p=0,_=0;--h>=0;)n=p,r=f,d=u*(p=d)-n-c*(f=_)+e[h],_=c*p-r+u*f;return[(u=o*l)*d-(c=a*s)*_,u*_+c*d]};function Qs(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),i=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),i*=t,this.cgb[1]=i*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),i*=t,this.cgb[2]=i*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=i*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),i*=t,this.cgb[3]=i*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=i*(1237/630+t*(t*(-24832/14175)-2.4)),i*=t,this.cgb[4]=i*(4174/315+t*(-144838/6237)),this.cbg[4]=i*(-734/315+t*(109598/31185)),i*=t,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=i*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=i*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),i*=t,this.utg[2]=i*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=i*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),i*=t,this.utg[3]=i*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=i*(49561/161280+t*(-179/168+t*(6601661/7257600))),i*=t,this.utg[4]=i*(-4583/161280+t*(108847/3991680)),this.gtu[4]=i*(34729/80640+t*(-3418889/1995840)),i*=t,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var n=kt$4(this.cbg,this.lat0);this.Zb=-this.Qn*(n+Fs(this.gtu,2*n))}function Ws(e){var t=g$M(e.x-this.long0),i=e.y;i=kt$4(this.cbg,i);var n=Math.sin(i),r=Math.cos(i),o=Math.sin(t),a=Math.cos(t);i=Math.atan2(n,a*r),t=Math.atan2(o*r,Dt$4(n,r*a)),t=Bs(Math.tan(t));var s,l,u=xa$2(this.gtu,2*i,2*t);return i+=u[0],t+=u[1],Math.abs(t)<=2.623395162778?(s=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*i+this.Zb)+this.y0):(s=1/0,l=1/0),e.x=s,e.y=l,e}function Hs(e){var t,i,n=(e.x-this.x0)*(1/this.a),r=(e.y-this.y0)*(1/this.a);if(r=(r-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var o=xa$2(this.utg,2*r,2*n);r+=o[0],n+=o[1],n=Math.atan(ga$2(n));var a=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);r=Math.atan2(a*u,Dt$4(l,u*s)),n=Math.atan2(l,u*s),t=g$M(n+this.long0),i=kt$4(this.cgb,r)}else t=1/0,i=1/0;return e.x=t,e.y=i,e}var Xs=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"],wt$4={init:Qs,forward:Ws,inverse:Hs,names:Xs},Ks=function(e,t){if(void 0===e){if((e=Math.floor(30*(g$M(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e},Js="etmerc";function Zs(){var e=Ks(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*$$F,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,wt$4.init.apply(this),this.forward=wt$4.forward,this.inverse=wt$4.inverse}var Vs=["Universal Transverse Mercator System","utm"],Ys={init:Zs,names:Vs,dependsOn:Js},pt$5=function(e,t){return Math.pow((1-e)/(1+e),t)},ti$2=20;function ai$3(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+w$G)/(Math.pow(Math.tan(.5*this.lat0+w$G),this.C)*pt$5(this.e*e,this.ratexp))}function si$2(e){var t=e.x,i=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+w$G),this.C)*pt$5(this.e*Math.sin(i),this.ratexp))-m$J,e.x=this.C*t,e}function ii$2(e){for(var t=e.x/this.C,i=e.y,n=Math.pow(Math.tan(.5*i+w$G)/this.K,1/this.C),r=ti$2;r>0&&(i=2*Math.atan(n*pt$5(this.e*Math.sin(e.y),-.5*this.e))-m$J,!(Math.abs(i-e.y)<1e-14));--r)e.y=i;return r?(e.x=t,e.y=i,e):null}var hi$4=["gauss"],Ut$4={init:ai$3,forward:si$2,inverse:ii$2,names:hi$4};function ei$2(){Ut$4.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function ri$2(e){var t,i,n,r;return e.x=g$M(e.x-this.long0),Ut$4.forward.apply(this,[e]),t=Math.sin(e.y),i=Math.cos(e.y),n=Math.cos(e.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*i*n),e.x=r*i*Math.sin(e.x),e.y=r*(this.cosc0*t-this.sinc0*i*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function ni$3(e){var t,i,n,r,o;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,o=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(o,this.R2);t=Math.sin(a),i=Math.cos(a),r=Math.asin(i*this.sinc0+e.y*t*this.cosc0/o),n=Math.atan2(e.x*t,o*this.cosc0*i-e.y*this.sinc0*t)}else r=this.phic0,n=0;return e.x=n,e.y=r,Ut$4.inverse.apply(this,[e]),e.x=g$M(e.x+this.long0),e}var oi$2=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],li$4={init:ei$2,forward:ri$2,inverse:ni$3,names:oi$2};function fi$4(e,t,i){return t*=i,Math.tan(.5*(m$J+e))*Math.pow((1-t)/(1+t),.5*i)}function Mi$4(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=_$C&&(this.k0=.5*(1+ft$4(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=_$C&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=_$C&&(this.k0=.5*this.cons*F$K(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/U$I(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=F$K(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-m$J,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function vi$4(e){var t,i,n,r,o,a,s=e.x,l=e.y,u=Math.sin(l),c=Math.cos(l),h=g$M(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=_$C&&Math.abs(l+this.lat0)<=_$C?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*u+this.coslat0*c*Math.cos(h)),e.x=this.a*t*c*Math.sin(h)+this.x0,e.y=this.a*t*(this.coslat0*u-this.sinlat0*c*Math.cos(h))+this.y0,e):(i=2*Math.atan(this.ssfn_(l,u,this.e))-m$J,r=Math.cos(i),n=Math.sin(i),Math.abs(this.coslat0)<=_$C?(o=U$I(this.e,l*this.con,this.con*u),a=2*this.a*this.k0*o/this.cons,e.x=this.x0+a*Math.sin(s-this.long0),e.y=this.y0-this.con*a*Math.cos(s-this.long0),e):(Math.abs(this.sinlat0)<_$C?(t=2*this.a*this.k0/(1+r*Math.cos(h)),e.y=t*n):(t=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*n+this.cosX0*r*Math.cos(h))),e.y=t*(this.cosX0*n-this.sinX0*r*Math.cos(h))+this.y0),e.x=t*r*Math.sin(h)+this.x0,e))}function ui$4(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,o,a=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var s=2*Math.atan(a/(2*this.a*this.k0));return t=this.long0,i=this.lat0,a<=_$C?(e.x=t,e.y=i,e):(i=Math.asin(Math.cos(s)*this.sinlat0+e.y*Math.sin(s)*this.coslat0/a),t=Math.abs(this.coslat0)<_$C?this.lat0>0?g$M(this.long0+Math.atan2(e.x,-1*e.y)):g$M(this.long0+Math.atan2(e.x,e.y)):g$M(this.long0+Math.atan2(e.x*Math.sin(s),a*this.coslat0*Math.cos(s)-e.y*this.sinlat0*Math.sin(s))),e.x=t,e.y=i,e)}if(Math.abs(this.coslat0)<=_$C){if(a<=_$C)return i=this.lat0,t=this.long0,e.x=t,e.y=i,e;e.x*=this.con,e.y*=this.con,n=a*this.cons/(2*this.a*this.k0),i=this.con*Mt$4(this.e,n),t=this.con*g$M(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else r=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=_$C?o=this.X0:(o=Math.asin(Math.cos(r)*this.sinX0+e.y*Math.sin(r)*this.cosX0/a),t=g$M(this.long0+Math.atan2(e.x*Math.sin(r),a*this.cosX0*Math.cos(r)-e.y*this.sinX0*Math.sin(r)))),i=-1*Mt$4(this.e,Math.tan(.5*(m$J+o)));return e.x=t,e.y=i,e}var ci$5=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],mi$2={init:Mi$4,forward:vi$4,inverse:ui$4,names:ci$5,ssfn_:fi$4};function di$4(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),i=this.a,n=1/this.rf,r=2*n-Math.pow(n,2),o=this.e=Math.sqrt(r);this.R=this.k0*i*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+o*t)/(1-o*t));this.K=a-this.alpha*s+this.alpha*o/2*l}function yi$4(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+i)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(o))),s=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(o));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e}function _i$6(e){for(var t=e.x-this.x0,i=e.y-this.y0,n=t/this.R,r=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),s=this.lambda0+a/this.alpha,l=0,u=o,c=-1e3,h=0;Math.abs(u-c)>1e-7;){if(++h>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=s,e.y=u,e}var gi$5=["somerc"],xi$4={init:di$4,forward:yi$4,inverse:_i$6,names:gi$5};function bi$4(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var e=Math.sin(this.lat0),t=Math.cos(this.lat0),i=this.e*e;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(t,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-i*i);var n,r,o=U$I(this.e,this.lat0,e),a=this.bl/t*Math.sqrt((1-this.es)/(1-i*i));if(a*a<1&&(a=1),isNaN(this.longc)){var s=U$I(this.e,this.lat1,Math.sin(this.lat1)),l=U$I(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(a+Math.sqrt(a*a-1))*Math.pow(o,this.bl):this.el=(a-Math.sqrt(a*a-1))*Math.pow(o,this.bl);var u=Math.pow(s,this.bl),c=Math.pow(l,this.bl);r=.5*((n=this.el/u)-1/n);var h=(this.el*this.el-c*u)/(this.el*this.el+c*u),d=(c-u)/(c+u),f=g$M(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(h*Math.tan(.5*this.bl*f)/d)/this.bl,this.long0=g$M(this.long0);var p=g$M(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*p)/r),this.alpha=Math.asin(a*Math.sin(this.gamma0))}else n=this.lat0>=0?a+Math.sqrt(a*a-1):a-Math.sqrt(a*a-1),this.el=n*Math.pow(o,this.bl),r=.5*(n-1/n),this.gamma0=Math.asin(Math.sin(this.alpha)/a),this.long0=this.longc-Math.asin(r*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha))}function Ci$5(e){var t,i,n,r=e.x,o=e.y,a=g$M(r-this.long0);if(Math.abs(Math.abs(o)-m$J)<=_$C)n=o>0?-1:1,i=this.al/this.bl*Math.log(Math.tan(w$G+n*this.gamma0*.5)),t=-1*n*m$J*this.al/this.bl;else{var s=U$I(this.e,o,Math.sin(o)),l=this.el/Math.pow(s,this.bl),u=.5*(l-1/l),c=.5*(l+1/l),h=Math.sin(this.bl*a),d=(u*Math.sin(this.gamma0)-h*Math.cos(this.gamma0))/c;i=Math.abs(Math.abs(d)-1)<=_$C?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-d)/(1+d))/this.bl,t=Math.abs(Math.cos(this.bl*a))<=_$C?this.al*this.bl*a:this.al*Math.atan2(u*Math.cos(this.gamma0)+h*Math.sin(this.gamma0),Math.cos(this.bl*a))/this.bl}return this.no_rot?(e.x=this.x0+t,e.y=this.y0+i):(t-=this.uc,e.x=this.x0+i*Math.cos(this.alpha)+t*Math.sin(this.alpha),e.y=this.y0+t*Math.cos(this.alpha)-i*Math.sin(this.alpha)),e}function Ei$4(e){var t,i;this.no_rot?(i=e.y-this.y0,t=e.x-this.x0):(i=(e.x-this.x0)*Math.cos(this.alpha)-(e.y-this.y0)*Math.sin(this.alpha),t=(e.y-this.y0)*Math.cos(this.alpha)+(e.x-this.x0)*Math.sin(this.alpha),t+=this.uc);var n=Math.exp(-1*this.bl*i/this.al),r=.5*(n-1/n),o=.5*(n+1/n),a=Math.sin(this.bl*t/this.al),s=(a*Math.cos(this.gamma0)+r*Math.sin(this.gamma0))/o,l=Math.pow(this.el/Math.sqrt((1+s)/(1-s)),1/this.bl);return Math.abs(s-1)<_$C?(e.x=this.long0,e.y=m$J):Math.abs(s+1)<_$C?(e.x=this.long0,e.y=-1*m$J):(e.y=Mt$4(this.e,l),e.x=g$M(this.long0-Math.atan2(r*Math.cos(this.gamma0)-a*Math.sin(this.gamma0),Math.cos(this.bl*t/this.al))/this.bl)),e}var Ai$3=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"],Ni$4={init:bi$4,forward:Ci$5,inverse:Ei$4,names:Ai$3};function Pi$5(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<_$C)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),i=Math.cos(this.lat1),n=F$K(this.e,t,i),r=U$I(this.e,this.lat1,t),o=Math.sin(this.lat2),a=Math.cos(this.lat2),s=F$K(this.e,o,a),l=U$I(this.e,this.lat2,o),u=U$I(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>_$C?this.ns=Math.log(n/s)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function wi$4(e){var t=e.x,i=e.y;Math.abs(2*Math.abs(i)-Math.PI)<=_$C&&(i=ft$4(i)*(m$J-2*_$C));var n,r,o=Math.abs(Math.abs(i)-m$J);if(o>_$C)n=U$I(this.e,i,Math.sin(i)),r=this.a*this.f0*Math.pow(n,this.ns);else{if((o=i*this.ns)<=0)return null;r=0}var a=this.ns*g$M(t-this.long0);return e.x=this.k0*(r*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,e}function Si$4(e){var t,i,n,r,o,a=(e.x-this.x0)/this.k0,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+s*s),i=1):(t=-Math.sqrt(a*a+s*s),i=-1);var l=0;if(0!==t&&(l=Math.atan2(i*a,i*s)),0!==t||this.ns>0){if(i=1/this.ns,n=Math.pow(t/(this.a*this.f0),i),-9999===(r=Mt$4(this.e,n)))return null}else r=-m$J;return o=g$M(l/this.ns+this.long0),e.x=o,e.y=r,e}var Ii$3=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"],Ri$3={init:Pi$5,forward:wi$4,inverse:Si$4,names:Ii$3};function Oi$4(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function qi$2(e){var t,i,n,r,o,a,s,l=e.x,u=e.y,c=g$M(l-this.long0);return t=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),o=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(r)),a=this.n*o,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e}function Ti$4(e){var t,i,n,r,o,a,s,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),o=Math.sqrt(e.x*e.x+e.y*e.y),r=Math.atan2(e.y,e.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),i=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(t)),e.x=this.long0-i/this.alfa,a=t,s=0;var u=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,u+=1}while(0===s&&u<15);return u>=15?null:e}var $i$2=["Krovak","krovak"],Li$2={init:Oi$4,forward:qi$2,inverse:Ti$4,names:$i$2},G$O=function(e,t,i,n,r){return e*r-t*Math.sin(2*r)+i*Math.sin(4*r)-n*Math.sin(6*r)},ct$4=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},mt$2=function(e){return.375*e*(1+.25*e*(1+.46875*e))},dt$6=function(e){return.05859375*e*e*(1+.75*e)},yt$3=function(e){return e*e*e*(35/3072)},ht$3=function(e,t,i){var n=t*i;return e/Math.sqrt(1-n*n)},et$8=function(e){return Math.abs(e)<m$J?e:e-ft$4(e)*Math.PI},St$2=function(e,t,i,n,r){var o,a;o=e/t;for(var s=0;s<15;s++)if(o+=a=(e-(t*o-i*Math.sin(2*o)+n*Math.sin(4*o)-r*Math.sin(6*o)))/(t-2*i*Math.cos(2*o)+4*n*Math.cos(4*o)-6*r*Math.cos(6*o)),Math.abs(a)<=1e-10)return o;return NaN};function Gi$2(){this.sphere||(this.e0=ct$4(this.es),this.e1=mt$2(this.es),this.e2=dt$6(this.es),this.e3=yt$3(this.es),this.ml0=this.a*G$O(this.e0,this.e1,this.e2,this.e3,this.lat0))}function zi$4(e){var t,i,n=e.x,r=e.y;if(n=g$M(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(r),Math.cos(n))-this.lat0);else{var o=Math.sin(r),a=Math.cos(r),s=ht$3(this.a,this.e,o),l=Math.tan(r)*Math.tan(r),u=n*Math.cos(r),c=u*u,h=this.es*a*a/(1-this.es);t=s*u*(1-c*l*(1/6-(8-l+8*h)*c/120)),i=this.a*G$O(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+s*o/a*c*(.5+(5-l+6*h)*c/24)}return e.x=t+this.x0,e.y=i+this.y0,e}function Di$5(e){e.x-=this.x0,e.y-=this.y0;var t,i,n=e.x/this.a,r=e.y/this.a;if(this.sphere){var o=r+this.lat0;t=Math.asin(Math.sin(o)*Math.cos(n)),i=Math.atan2(Math.tan(n),Math.cos(o))}else{var a=this.ml0/this.a+r,s=St$2(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-m$J)<=_$C)return e.x=this.long0,e.y=m$J,r<0&&(e.y*=-1),e;var l=ht$3(this.a,this.e,Math.sin(s)),u=l*l*l/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(s),2),h=n*this.a/l,d=h*h;t=s-l*Math.tan(s)/u*h*h*(.5-(1+3*c)*h*h/24),i=h*(1-d*(c/3+(1+3*c)*c*d/15))/Math.cos(s)}return e.x=g$M(i+this.long0),e.y=et$8(t),e}var ki$4=["Cassini","Cassini_Soldner","cass"],pi$5={init:Gi$2,forward:zi$4,inverse:Di$5,names:ki$4},K$E=function(e,t){var i;return e>1e-7?(1-e*e)*(t/(1-(i=e*t)*i)-.5/e*Math.log((1-i)/(1+i))):2*t},Ui$3=1,Bi$2=2,Fi$2=3,ji$3=4;function Qi$2(){var e,t=Math.abs(this.lat0);if(Math.abs(t-m$J)<_$C?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<_$C?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=K$E(this.e,1),this.mmf=.5/(1-this.es),this.apa=th(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=K$E(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function Wi$3(e){var t,i,n,r,o,a,s,l,u,c,h=e.x,d=e.y;if(h=g$M(h-this.long0),this.sphere){if(o=Math.sin(d),c=Math.cos(d),n=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+c*n:1+this.sinph0*o+this.cosph0*c*n)<=_$C)return null;t=(i=Math.sqrt(2/i))*c*Math.sin(h),i*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.phi0)<_$C)return null;i=w$G-.5*d,t=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(h),i*=n}}else{switch(s=0,l=0,u=0,n=Math.cos(h),r=Math.sin(h),o=Math.sin(d),a=K$E(this.e,o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(s=a/this.qp,l=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:u=1+this.sinb1*s+this.cosb1*l*n;break;case this.EQUIT:u=1+l*n;break;case this.N_POLE:u=m$J+d,a=this.qp-a;break;case this.S_POLE:u=d-m$J,a=this.qp+a}if(Math.abs(u)<_$C)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:u=Math.sqrt(2/u),i=this.mode===this.OBLIQ?this.ymf*u*(this.cosb1*s-this.sinb1*l*n):(u=Math.sqrt(2/(1+l*n)))*s*this.ymf,t=this.xmf*u*l*r;break;case this.N_POLE:case this.S_POLE:a>=0?(t=(u=Math.sqrt(a))*r,i=n*(this.mode===this.S_POLE?u:-u)):t=i=0}}return e.x=this.a*t+this.x0,e.y=this.a*i+this.y0,e}function Hi$3(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,o,a,s,l=e.x/this.a,u=e.y/this.a;if(this.sphere){var c,h=0,d=0;if((i=.5*(c=Math.sqrt(l*l+u*u)))>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=Math.sin(i),h=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=_$C?0:Math.asin(u*d/c),l*=d,u=h*c;break;case this.OBLIQ:i=Math.abs(c)<=_$C?this.phi0:Math.asin(h*this.sinph0+u*d*this.cosph0/c),l*=d*this.cosph0,u=(h-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:u=-u,i=m$J-i;break;case this.S_POLE:i-=m$J}t=0!==u||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(l,u):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(l/=this.dd,u*=this.dd,(a=Math.sqrt(l*l+u*u))<_$C)return e.x=0,e.y=this.phi0,e;r=2*Math.asin(.5*a/this.rq),n=Math.cos(r),l*=r=Math.sin(r),this.mode===this.OBLIQ?(s=n*this.sinb1+u*r*this.cosb1/a,o=this.qp*s,u=a*this.cosb1*n-u*this.sinb1*r):(s=u*r/a,o=this.qp*s,u=a*n)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(u=-u),!(o=l*l+u*u))return e.x=0,e.y=this.phi0,e;s=1-o/this.qp,this.mode===this.S_POLE&&(s=-s)}t=Math.atan2(l,u),i=ah(Math.asin(s),this.apa)}return e.x=g$M(this.long0+t),e.y=i,e}var Xi$1=.3333333333333333,Ki$2=.17222222222222222,Ji$2=.10257936507936508,Zi$3=.06388888888888888,Vi$4=.0664021164021164,Yi$2=.016415012942191543;function th(e){var t,i=[];return i[0]=e*Xi$1,t=e*e,i[0]+=t*Ki$2,i[1]=t*Zi$3,t*=e,i[0]+=t*Ji$2,i[1]+=t*Vi$4,i[2]=t*Yi$2,i}function ah(e,t){var i=e+e;return e+t[0]*Math.sin(i)+t[1]*Math.sin(i+i)+t[2]*Math.sin(i+i+i)}var sh=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],ih={init:Qi$2,forward:Wi$3,inverse:Hi$3,names:sh,S_POLE:Ui$3,N_POLE:Bi$2,EQUIT:Fi$2,OBLIQ:ji$3},J$z=function(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)};function hh(){Math.abs(this.lat1+this.lat2)<_$C||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=F$K(this.e3,this.sin_po,this.cos_po),this.qs1=K$E(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=F$K(this.e3,this.sin_po,this.cos_po),this.qs2=K$E(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=K$E(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>_$C?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function eh(e){var t=e.x,i=e.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=K$E(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*g$M(t-this.long0),a=r*Math.sin(o)+this.x0,s=this.rh-r*Math.cos(o)+this.y0;return e.x=a,e.y=s,e}function rh(e){var t,i,n,r,o,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),r=0,0!==t&&(r=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,i)),o=g$M(r/this.ns0+this.long0),e.x=o,e.y=a,e}function nh(e,t){var i,n,r,o,a=J$z(.5*t);if(e<_$C)return a;for(var s=e*e,l=1;l<=25;l++)if(a+=o=.5*(r=1-(n=e*(i=Math.sin(a)))*n)*r/Math.cos(a)*(t/(1-s)-i/r+.5/e*Math.log((1-n)/(1+n))),Math.abs(o)<=1e-7)return a;return null}var oh=["Albers_Conic_Equal_Area","Albers","aea"],lh={init:hh,forward:eh,inverse:rh,names:oh,phi1z:nh};function fh(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Mh(e){var t,i,n,r,o,a,s,l=e.x,u=e.y;return n=g$M(l-this.long0),t=Math.sin(u),i=Math.cos(u),r=Math.cos(n),1,(o=this.sin_p14*t+this.cos_p14*i*r)>0||Math.abs(o)<=_$C?(a=this.x0+1*this.a*i*Math.sin(n)/o,s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*i*r)/o):(a=this.x0+this.infinity_dist*i*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*i*r)),e.x=a,e.y=s,e}function vh(e){var t,i,n,r,o,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(r=Math.atan2(t,this.rc),i=Math.sin(r),n=Math.cos(r),a=J$z(n*this.sin_p14+e.y*i*this.cos_p14/t),o=Math.atan2(e.x*i,t*this.cos_p14*n-e.y*this.sin_p14*i),o=g$M(this.long0+o)):(a=this.phic0,o=0),e.x=o,e.y=a,e}var uh=["gnom"],ch={init:fh,forward:Mh,inverse:vh,names:uh},mh=function(e,t){var i=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-i)<1e-6)return t<0?-1*m$J:m$J;for(var n,r,o,a,s=Math.asin(.5*t),l=0;l<30;l++)if(r=Math.sin(s),o=Math.cos(s),a=e*r,s+=n=Math.pow(1-a*a,2)/(2*o)*(t/(1-e*e)-r/(1-a*a)+.5/e*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return s;return NaN};function dh(){this.sphere||(this.k0=F$K(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function yh(e){var t,i,n=e.x,r=e.y,o=g$M(n-this.long0);if(this.sphere)t=this.x0+this.a*o*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var a=K$E(this.e,Math.sin(r));t=this.x0+this.a*this.k0*o,i=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=i,e}function _h(e){var t,i;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=g$M(this.long0+e.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(i=mh(this.e,2*e.y*this.k0/this.a),t=g$M(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=i,e}var gh=["cea"],xh={init:dh,forward:yh,inverse:_h,names:gh};function bh(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Ch(e){var t=e.x,i=e.y,n=g$M(t-this.long0),r=et$8(i-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*r,e}function Eh(e){var t=e.x,i=e.y;return e.x=g$M(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=et$8(this.lat0+(i-this.y0)/this.a),e}var Ah=["Equirectangular","Equidistant_Cylindrical","eqc"],Nh={init:bh,forward:Ch,inverse:Eh,names:Ah},ba$1=20;function Ph(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ct$4(this.es),this.e1=mt$2(this.es),this.e2=dt$6(this.es),this.e3=yt$3(this.es),this.ml0=this.a*G$O(this.e0,this.e1,this.e2,this.e3,this.lat0)}function wh(e){var t,i,n,r=e.x,o=e.y,a=g$M(r-this.long0);if(n=a*Math.sin(o),this.sphere)Math.abs(o)<=_$C?(t=this.a*a,i=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(o),i=this.a*(et$8(o-this.lat0)+(1-Math.cos(n))/Math.tan(o)));else if(Math.abs(o)<=_$C)t=this.a*a,i=-1*this.ml0;else{var s=ht$3(this.a,this.e,Math.sin(o))/Math.tan(o);t=s*Math.sin(n),i=this.a*G$O(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+s*(1-Math.cos(n))}return e.x=t+this.x0,e.y=i+this.y0,e}function Sh(e){var t,i,n,r,o,a,s,l,u;if(n=e.x-this.x0,r=e.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=_$C)t=g$M(n/this.a+this.long0),i=0;else{var c;for(a=this.lat0+r/this.a,s=n*n/this.a/this.a+a*a,l=a,o=ba$1;o;--o)if(l+=u=-1*(a*(l*(c=Math.tan(l))+1)-l-.5*(l*l+s)*c)/((l-a)/c-1),Math.abs(u)<=_$C){i=l;break}t=g$M(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(r+this.ml0)<=_$C)i=0,t=g$M(this.long0+n/this.a);else{var h,d,f,p,_;for(a=(this.ml0+r)/this.a,s=n*n/this.a/this.a+a*a,l=a,o=ba$1;o;--o)if(_=this.e*Math.sin(l),h=Math.sqrt(1-_*_)*Math.tan(l),d=this.a*G$O(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=u=(a*(h*(p=d/this.a)+1)-p-.5*h*(p*p+s))/(this.es*Math.sin(2*l)*(p*p+s-2*a*p)/(4*h)+(a-p)*(h*f-2/Math.sin(2*l))-f),Math.abs(u)<=_$C){i=l;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),t=g$M(this.long0+Math.asin(n*h/this.a)/Math.sin(i))}return e.x=t,e.y=i,e}var Ih=["Polyconic","poly"],Rh={init:Ph,forward:wh,inverse:Sh,names:Ih};function Oh(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function qh(e){var t,i=e.x,n=e.y-this.lat0,r=i-this.long0,o=n/ot$4*1e-5,a=r,s=1,l=0;for(t=1;t<=10;t++)s*=o,l+=this.A[t]*s;var u,c=l,h=a,d=1,f=0,p=0,_=0;for(t=1;t<=6;t++)u=f*c+d*h,d=d*c-f*h,f=u,p=p+this.B_re[t]*d-this.B_im[t]*f,_=_+this.B_im[t]*d+this.B_re[t]*f;return e.x=_*this.a+this.x0,e.y=p*this.a+this.y0,e}function Th(e){var t,i,n=e.x,r=e.y,o=n-this.x0,a=(r-this.y0)/this.a,s=o/this.a,l=1,u=0,c=0,h=0;for(t=1;t<=6;t++)i=u*a+l*s,l=l*a-u*s,u=i,c=c+this.C_re[t]*l-this.C_im[t]*u,h=h+this.C_im[t]*l+this.C_re[t]*u;for(var d=0;d<this.iterations;d++){var f,p=c,_=h,m=a,g=s;for(t=2;t<=6;t++)f=_*c+p*h,p=p*c-_*h,_=f,m+=(t-1)*(this.B_re[t]*p-this.B_im[t]*_),g+=(t-1)*(this.B_im[t]*p+this.B_re[t]*_);p=1,_=0;var x=this.B_re[1],v=this.B_im[1];for(t=2;t<=6;t++)f=_*c+p*h,p=p*c-_*h,_=f,x+=t*(this.B_re[t]*p-this.B_im[t]*_),v+=t*(this.B_im[t]*p+this.B_re[t]*_);var y=x*x+v*v;c=(m*x+g*v)/y,h=(g*x-m*v)/y}var $=c,b=h,T=1,C=0;for(t=1;t<=9;t++)T*=$,C+=this.D[t]*T;var S=this.lat0+C*ot$4*1e5,w=this.long0+b;return e.x=w,e.y=S,e}var $h=["New_Zealand_Map_Grid","nzmg"],Lh={init:Oh,forward:qh,inverse:Th,names:$h};function Gh(){}function zh(e){var t=e.x,i=e.y,n=g$M(t-this.long0),r=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return e.x=r,e.y=o,e}function Dh(e){e.x-=this.x0,e.y-=this.y0;var t=g$M(this.long0+e.x/this.a),i=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=i,e}var kh=["Miller_Cylindrical","mill"],ph={init:Gh,forward:zh,inverse:Dh,names:kh},Uh=20;function Bh(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=ya$1(this.es)}function Fh(e){var t,i,n=e.x,r=e.y;if(n=g$M(n-this.long0),this.sphere){if(this.m)for(var o=this.n*Math.sin(r),a=Uh;a;--a){var s=(this.m*r+Math.sin(r)-o)/(this.m+Math.cos(r));if(r-=s,Math.abs(s)<_$C)break}else r=1!==this.n?Math.asin(this.n*Math.sin(r)):r;t=this.a*this.C_x*n*(this.m+Math.cos(r)),i=this.a*this.C_y*r}else{var l=Math.sin(r),u=Math.cos(r);i=this.a*Pt$3(r,l,u,this.en),t=this.a*n*u/Math.sqrt(1-this.es*l*l)}return e.x=t,e.y=i,e}function jh(e){var t,i,n,r;return e.x-=this.x0,n=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,n/=this.C_x*(this.m+Math.cos(t)),this.m?t=J$z((this.m*t+Math.sin(t))/this.n):1!==this.n&&(t=J$z(Math.sin(t)/this.n)),n=g$M(n+this.long0),t=et$8(t)):(t=_a$2(e.y/this.a,this.es,this.en),(r=Math.abs(t))<m$J?(r=Math.sin(t),i=this.long0+e.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),n=g$M(i)):r-_$C<m$J&&(n=this.long0)),e.x=n,e.y=t,e}var Qh=["Sinusoidal","sinu"],Wh={init:Bh,forward:Fh,inverse:jh,names:Qh};function Hh(){}function Xh(e){for(var t=e.x,i=e.y,n=g$M(t-this.long0),r=i,o=Math.PI*Math.sin(i);;){var a=-(r+Math.sin(r)-o)/(1+Math.cos(r));if(r+=a,Math.abs(a)<_$C)break}r/=2,Math.PI/2-Math.abs(i)<_$C&&(n=0);var s=.900316316158*this.a*n*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return e.x=s,e.y=l,e}function Kh(e){var t,i;e.x-=this.x0,e.y-=this.y0,i=e.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),t=Math.asin(i);var n=g$M(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*t+Math.sin(2*t))/Math.PI,Math.abs(i)>1&&(i=1);var r=Math.asin(i);return e.x=n,e.y=r,e}var Jh=["Mollweide","moll"],Zh={init:Hh,forward:Xh,inverse:Kh,names:Jh};function Vh(){Math.abs(this.lat1+this.lat2)<_$C||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ct$4(this.es),this.e1=mt$2(this.es),this.e2=dt$6(this.es),this.e3=yt$3(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=F$K(this.e,this.sinphi,this.cosphi),this.ml1=G$O(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<_$C?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=F$K(this.e,this.sinphi,this.cosphi),this.ml2=G$O(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=G$O(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function Yh(e){var t,i=e.x,n=e.y;if(this.sphere)t=this.a*(this.g-n);else{var r=G$O(this.e0,this.e1,this.e2,this.e3,n);t=this.a*(this.g-r)}var o=this.ns*g$M(i-this.long0),a=this.x0+t*Math.sin(o),s=this.y0+this.rh-t*Math.cos(o);return e.x=a,e.y=s,e}function te$r(e){var t,i,n,r;e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns>=0?(i=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(i=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var o=0;if(0!==i&&(o=Math.atan2(t*e.x,t*e.y)),this.sphere)return r=g$M(this.long0+o/this.ns),n=et$8(this.g-i/this.a),e.x=r,e.y=n,e;var a=this.g-i/this.a;return n=St$2(a,this.e0,this.e1,this.e2,this.e3),r=g$M(this.long0+o/this.ns),e.x=r,e.y=n,e}var ae$o=["Equidistant_Conic","eqdc"],se$m={init:Vh,forward:Yh,inverse:te$r,names:ae$o};function ie$r(){this.R=this.a}function he$i(e){var t,i,n=e.x,r=e.y,o=g$M(n-this.long0);Math.abs(r)<=_$C&&(t=this.x0+this.R*o,i=this.y0);var a=J$z(2*Math.abs(r/Math.PI));(Math.abs(o)<=_$C||Math.abs(Math.abs(r)-m$J)<=_$C)&&(t=this.x0,i=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var s=.5*Math.abs(Math.PI/o-o/Math.PI),l=s*s,u=Math.sin(a),c=Math.cos(a),h=c/(u+c-1),d=h*h,f=h*(2/u-1),p=f*f,_=Math.PI*this.R*(s*(h-p)+Math.sqrt(l*(h-p)*(h-p)-(p+l)*(d-p)))/(p+l);o<0&&(_=-_),t=this.x0+_;var m=l+h;return _=Math.PI*this.R*(f*m-s*Math.sqrt((p+l)*(l+1)-m*m))/(p+l),i=r>=0?this.y0+_:this.y0-_,e.x=t,e.y=i,e}function ee$q(e){var t,i,n,r,o,a,s,l,u,c,h,d;return e.x-=this.x0,e.y-=this.y0,h=Math.PI*this.R,o=(n=e.x/h)*n+(r=e.y/h)*r,h=3*(r*r/(l=-2*(a=-Math.abs(r)*(1+o))+1+2*r*r+o*o)+(2*(s=a-2*r*r+n*n)*s*s/l/l/l-9*a*s/l/l)/27)/(u=(a-s*s/3/l)/l)/(c=2*Math.sqrt(-u/3)),Math.abs(h)>1&&(h=h>=0?1:-1),d=Math.acos(h)/3,i=e.y>=0?(-c*Math.cos(d+Math.PI/3)-s/3/l)*Math.PI:-(-c*Math.cos(d+Math.PI/3)-s/3/l)*Math.PI,t=Math.abs(n)<_$C?this.long0:g$M(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-r*r)+o*o))/2/n),e.x=t,e.y=i,e}var re$v=["Van_der_Grinten_I","VanDerGrinten","vandg"],ne$w={init:ie$r,forward:he$i,inverse:ee$q,names:re$v};function oe$m(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function le$p(e){var t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T=e.x,C=e.y,S=Math.sin(e.y),w=Math.cos(e.y),E=g$M(T-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=_$C?(e.x=this.x0+this.a*(m$J-C)*Math.sin(E),e.y=this.y0-this.a*(m$J-C)*Math.cos(E),e):Math.abs(this.sin_p12+1)<=_$C?(e.x=this.x0+this.a*(m$J+C)*Math.sin(E),e.y=this.y0+this.a*(m$J+C)*Math.cos(E),e):(x=this.sin_p12*S+this.cos_p12*w*Math.cos(E),g=(m=Math.acos(x))/Math.sin(m),e.x=this.x0+this.a*g*w*Math.sin(E),e.y=this.y0+this.a*g*(this.cos_p12*S-this.sin_p12*w*Math.cos(E)),e):(t=ct$4(this.es),i=mt$2(this.es),n=dt$6(this.es),r=yt$3(this.es),Math.abs(this.sin_p12-1)<=_$C?(o=this.a*G$O(t,i,n,r,m$J),a=this.a*G$O(t,i,n,r,C),e.x=this.x0+(o-a)*Math.sin(E),e.y=this.y0-(o-a)*Math.cos(E),e):Math.abs(this.sin_p12+1)<=_$C?(o=this.a*G$O(t,i,n,r,m$J),a=this.a*G$O(t,i,n,r,C),e.x=this.x0+(o+a)*Math.sin(E),e.y=this.y0+(o+a)*Math.cos(E),e):(s=S/w,l=ht$3(this.a,this.e,this.sin_p12),u=ht$3(this.a,this.e,S),c=Math.atan((1-this.es)*s+this.es*l*this.sin_p12/(u*w)),v=0===(h=Math.atan2(Math.sin(E),this.cos_p12*Math.tan(c)-this.sin_p12*Math.cos(E)))?Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.abs(Math.abs(h)-Math.PI)<=_$C?-Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.asin(Math.sin(E)*Math.cos(c)/Math.sin(h)),d=this.e*this.sin_p12/Math.sqrt(1-this.es),m=l*v*(1-(y=v*v)*(_=(f=this.e*this.cos_p12*Math.cos(h)/Math.sqrt(1-this.es))*f)*(1-_)/6+($=y*v)/8*(p=d*f)*(1-2*_)+(b=$*v)/120*(_*(4-7*_)-3*d*d*(1-7*_))-b*v/48*p),e.x=this.x0+m*Math.sin(h),e.y=this.y0+m*Math.cos(h),e))}function fe$i(e){var t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=Math.sqrt(e.x*e.x+e.y*e.y))>2*m$J*this.a?void 0:(i=t/this.a,n=Math.sin(i),r=Math.cos(i),o=this.long0,Math.abs(t)<=_$C?a=this.lat0:(a=J$z(r*this.sin_p12+e.y*n*this.cos_p12/t),s=Math.abs(this.lat0)-m$J,o=Math.abs(s)<=_$C?this.lat0>=0?g$M(this.long0+Math.atan2(e.x,-e.y)):g$M(this.long0-Math.atan2(-e.x,e.y)):g$M(this.long0+Math.atan2(e.x*n,t*this.cos_p12*r-e.y*this.sin_p12*n))),e.x=o,e.y=a,e):(l=ct$4(this.es),u=mt$2(this.es),c=dt$6(this.es),h=yt$3(this.es),Math.abs(this.sin_p12-1)<=_$C?(d=this.a*G$O(l,u,c,h,m$J),t=Math.sqrt(e.x*e.x+e.y*e.y),a=St$2((d-t)/this.a,l,u,c,h),o=g$M(this.long0+Math.atan2(e.x,-1*e.y)),e.x=o,e.y=a,e):Math.abs(this.sin_p12+1)<=_$C?(d=this.a*G$O(l,u,c,h,m$J),t=Math.sqrt(e.x*e.x+e.y*e.y),a=St$2((t-d)/this.a,l,u,c,h),o=g$M(this.long0+Math.atan2(e.x,e.y)),e.x=o,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),_=Math.atan2(e.x,e.y),f=ht$3(this.a,this.e,this.sin_p12),m=Math.cos(_),x=-(g=this.e*this.cos_p12*m)*g/(1-this.es),v=3*this.es*(1-x)*this.sin_p12*this.cos_p12*m/(1-this.es),b=1-x*($=(y=t/f)-x*(1+x)*Math.pow(y,3)/6-v*(1+3*x)*Math.pow(y,4)/24)*$/2-y*$*$*$/6,p=Math.asin(this.sin_p12*Math.cos($)+this.cos_p12*Math.sin($)*m),o=g$M(this.long0+Math.asin(Math.sin(_)*Math.sin($)/Math.cos(p))),a=Math.atan((1-this.es*b*this.sin_p12/Math.sin(p))*Math.tan(p)/(1-this.es)),e.x=o,e.y=a,e))}var Me$h=["Azimuthal_Equidistant","aeqd"],ve$h={init:oe$m,forward:le$p,inverse:fe$i,names:Me$h};function ue$n(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function ce$k(e){var t,i,n,r,o,a,s,l=e.x,u=e.y;return n=g$M(l-this.long0),t=Math.sin(u),i=Math.cos(u),r=Math.cos(n),1,((o=this.sin_p14*t+this.cos_p14*i*r)>0||Math.abs(o)<=_$C)&&(a=1*this.a*i*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*i*r)),e.x=a,e.y=s,e}function me$l(e){var t,i,n,r,o,a,s;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),i=J$z(t/this.a),n=Math.sin(i),r=Math.cos(i),a=this.long0,Math.abs(t)<=_$C?(s=this.lat0,e.x=a,e.y=s,e):(s=J$z(r*this.sin_p14+e.y*n*this.cos_p14/t),o=Math.abs(this.lat0)-m$J,Math.abs(o)<=_$C?(a=this.lat0>=0?g$M(this.long0+Math.atan2(e.x,-e.y)):g$M(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=s,e):(a=g$M(this.long0+Math.atan2(e.x*n,t*this.cos_p14*r-e.y*this.sin_p14*n)),e.x=a,e.y=s,e))}var de$k=["ortho"],ye$f={init:ue$n,forward:ce$k,inverse:me$l,names:de$k},I$S={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},P$E={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function _e$k(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=m$J-w$G/2?this.face=I$S.TOP:this.lat0<=-(m$J-w$G/2)?this.face=I$S.BOTTOM:Math.abs(this.long0)<=w$G?this.face=I$S.FRONT:Math.abs(this.long0)<=m$J+w$G?this.face=this.long0>0?I$S.RIGHT:I$S.LEFT:this.face=I$S.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function ge$h(e){var t,i,n,r,o,a,s={x:0,y:0},l={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,i=e.x,this.face===I$S.TOP)r=m$J-t,i>=w$G&&i<=m$J+w$G?(l.value=P$E.AREA_0,n=i-m$J):i>m$J+w$G||i<=-(m$J+w$G)?(l.value=P$E.AREA_1,n=i>0?i-R$D:i+R$D):i>-(m$J+w$G)&&i<=-w$G?(l.value=P$E.AREA_2,n=i+m$J):(l.value=P$E.AREA_3,n=i);else if(this.face===I$S.BOTTOM)r=m$J+t,i>=w$G&&i<=m$J+w$G?(l.value=P$E.AREA_0,n=-i+m$J):i<w$G&&i>=-w$G?(l.value=P$E.AREA_1,n=-i):i<-w$G&&i>=-(m$J+w$G)?(l.value=P$E.AREA_2,n=-i-m$J):(l.value=P$E.AREA_3,n=i>0?-i+R$D:-i-R$D);else{var u,c,h,d,f,p;this.face===I$S.RIGHT?i=rt$9(i,+m$J):this.face===I$S.BACK?i=rt$9(i,+R$D):this.face===I$S.LEFT&&(i=rt$9(i,-m$J)),d=Math.sin(t),f=Math.cos(t),p=Math.sin(i),u=f*Math.cos(i),c=f*p,h=d,this.face===I$S.FRONT?n=It$5(r=Math.acos(u),h,c,l):this.face===I$S.RIGHT?n=It$5(r=Math.acos(c),h,-u,l):this.face===I$S.BACK?n=It$5(r=Math.acos(-u),h,-c,l):this.face===I$S.LEFT?n=It$5(r=Math.acos(-c),h,u,l):(r=n=0,l.value=P$E.AREA_0)}return a=Math.atan(12/R$D*(n+Math.acos(Math.sin(n)*Math.cos(w$G))-m$J)),o=Math.sqrt((1-Math.cos(r))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),l.value===P$E.AREA_1?a+=m$J:l.value===P$E.AREA_2?a+=R$D:l.value===P$E.AREA_3&&(a+=1.5*R$D),s.x=o*Math.cos(a),s.y=o*Math.sin(a),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,e.x=s.x,e.y=s.y,e}function xe$f(e){var t,i,n,r,o,a,s,l,u,c,h,d,f={lam:0,phi:0},p={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,i=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?p.value=P$E.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(p.value=P$E.AREA_1,t-=m$J):e.x<0&&-e.x>=Math.abs(e.y)?(p.value=P$E.AREA_2,t=t<0?t+R$D:t-R$D):(p.value=P$E.AREA_3,t+=m$J),u=R$D/12*Math.tan(t),o=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(o),(s=1-(n=Math.cos(t))*n*(r=Math.tan(i))*r*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?s=-1:s>1&&(s=1),this.face===I$S.TOP)l=Math.acos(s),f.phi=m$J-l,p.value===P$E.AREA_0?f.lam=a+m$J:p.value===P$E.AREA_1?f.lam=a<0?a+R$D:a-R$D:p.value===P$E.AREA_2?f.lam=a-m$J:f.lam=a;else if(this.face===I$S.BOTTOM)l=Math.acos(s),f.phi=l-m$J,p.value===P$E.AREA_0?f.lam=-a+m$J:p.value===P$E.AREA_1?f.lam=-a:p.value===P$E.AREA_2?f.lam=-a-m$J:f.lam=a<0?-a-R$D:-a+R$D;else{var _,m,g;u=(_=s)*_,m=(u+=(g=u>=1?0:Math.sqrt(1-u)*Math.sin(a))*g)>=1?0:Math.sqrt(1-u),p.value===P$E.AREA_1?(u=m,m=-g,g=u):p.value===P$E.AREA_2?(m=-m,g=-g):p.value===P$E.AREA_3&&(u=m,m=g,g=-u),this.face===I$S.RIGHT?(u=_,_=-m,m=u):this.face===I$S.BACK?(_=-_,m=-m):this.face===I$S.LEFT&&(u=_,_=m,m=-u),f.phi=Math.acos(-g)-m$J,f.lam=Math.atan2(m,_),this.face===I$S.RIGHT?f.lam=rt$9(f.lam,-m$J):this.face===I$S.BACK?f.lam=rt$9(f.lam,-R$D):this.face===I$S.LEFT&&(f.lam=rt$9(f.lam,+m$J))}0!==this.es&&(c=f.phi<0?1:0,h=Math.tan(f.phi),d=this.b/Math.sqrt(h*h+this.one_minus_f_squared),f.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),c&&(f.phi=-f.phi));return f.lam+=this.long0,e.x=f.lam,e.y=f.phi,e}function It$5(e,t,i,n){var r;return e<_$C?(n.value=P$E.AREA_0,r=0):(r=Math.atan2(t,i),Math.abs(r)<=w$G?n.value=P$E.AREA_0:r>w$G&&r<=m$J+w$G?(n.value=P$E.AREA_1,r-=m$J):r>m$J+w$G||r<=-(m$J+w$G)?(n.value=P$E.AREA_2,r=r>=0?r-R$D:r+R$D):(n.value=P$E.AREA_3,r+=m$J)),r}function rt$9(e,t){var i=e+t;return i<-R$D?i+=qt$4:i>+R$D&&(i-=qt$4),i}var be$l=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],Ce$e={init:_e$k,forward:ge$h,inverse:xe$f,names:be$l},Bt$6=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],_t$4=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ca$1=.8487,Ea$2=1.3523,Aa$2=H$K/5,Ee$i=1/Aa$2,nt$5=18,Rt$5=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},Ae$h=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};function Ne$c(e,t,i,n){for(var r=t;n;--n){var o=e(r);if(r-=o,Math.abs(o)<i)break}return r}function Pe$c(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function we$g(e){var t=g$M(e.x-this.long0),i=Math.abs(e.y),n=Math.floor(i*Aa$2);n<0?n=0:n>=nt$5&&(n=nt$5-1),i=H$K*(i-Ee$i*n);var r={x:Rt$5(Bt$6[n],i)*t,y:Rt$5(_t$4[n],i)};return e.y<0&&(r.y=-r.y),r.x=r.x*this.a*Ca$1+this.x0,r.y=r.y*this.a*Ea$2+this.y0,r}function Se$b(e){var t={x:(e.x-this.x0)/(this.a*Ca$1),y:Math.abs(e.y-this.y0)/(this.a*Ea$2)};if(t.y>=1)t.x/=Bt$6[nt$5][0],t.y=e.y<0?-m$J:m$J;else{var i=Math.floor(t.y*nt$5);for(i<0?i=0:i>=nt$5&&(i=nt$5-1);;)if(_t$4[i][0]>t.y)--i;else{if(!(_t$4[i+1][0]<=t.y))break;++i}var n=_t$4[i],r=5*(t.y-n[0])/(_t$4[i+1][0]-n[0]);r=Ne$c((function(e){return(Rt$5(n,e)-t.y)/Ae$h(n,e)}),r,_$C,100),t.x/=Rt$5(Bt$6[i],r),t.y=(5*i+r)*$$F,e.y<0&&(t.y=-t.y)}return t.x=g$M(t.x+this.long0),t}var Ie$d=["Robinson","robin"],Re$f={init:Pe$c,forward:we$g,inverse:Se$b,names:Ie$d};function Oe$f(){this.name="geocent"}function qe$6(e){return Yt$2(e,this.es,this.a)}function Te$g(e){return ta$2(e,this.es,this.a,this.b)}var $e$7=["Geocentric","geocentric","geocent","Geocent"],Le$j={init:Oe$f,forward:qe$6,inverse:Te$g,names:$e$7},Ge$8=function(e){e.Proj.projections.add(ps),e.Proj.projections.add(wt$4),e.Proj.projections.add(Ys),e.Proj.projections.add(li$4),e.Proj.projections.add(mi$2),e.Proj.projections.add(xi$4),e.Proj.projections.add(Ni$4),e.Proj.projections.add(Ri$3),e.Proj.projections.add(Li$2),e.Proj.projections.add(pi$5),e.Proj.projections.add(ih),e.Proj.projections.add(lh),e.Proj.projections.add(ch),e.Proj.projections.add(xh),e.Proj.projections.add(Nh),e.Proj.projections.add(Rh),e.Proj.projections.add(Lh),e.Proj.projections.add(ph),e.Proj.projections.add(Wh),e.Proj.projections.add(Zh),e.Proj.projections.add(se$m),e.Proj.projections.add(ne$w),e.Proj.projections.add(ve$h),e.Proj.projections.add(ye$f),e.Proj.projections.add(Ce$e),e.Proj.projections.add(Re$f),e.Proj.projections.add(Le$j)};function p$L(e){e=u$_(e,{});var t=u$_(e.name,"tmerc"),i=u$_(e.centralMeridian,117),n=u$_(e.primeMeridian,0),r=u$_(e.standardParallel_1,0),o=u$_(e.standardParallel_2,0),a=u$_(e.eastFalse,5e5),s=u$_(e.northFalse,0),l=u$_(e.semimajorAxis,6378137),u=u$_(e.inverseFlattening,298.257222101),c=(1-1/u)*l,h=e.ellps;if(e$2b(h))d="+proj={name} +lon_0={lon_0} +lat_0={lat_0} +lat_1={lat_1} +lat_2={lat_2} +x_0={x_0} +y_0={y_0} +ellps={ellps}",this._projection=d.replace("{name}",t).replace("{lon_0}",i).replace("{lat_0}",n).replace("{lat_1}",r).replace("{lat_2}",o).replace("{x_0}",a).replace("{y_0}",s).replace("{ellps}",h);else{var d="+proj={name} +lon_0={lon_0} +lat_0={lat_0} +lat_1={lat_1} +lat_2={lat_2} +x_0={x_0} +y_0={y_0} +a={a} +b={b} +rf={rf}";this._projection=d.replace("{name}",t).replace("{lon_0}",i).replace("{lat_0}",n).replace("{lat_1}",r).replace("{lat_2}",o).replace("{x_0}",a).replace("{y_0}",s).replace("{a}",l).replace("{b}",c).replace("{rf}",u)}}k$C.defaultDatum="WGS84",k$C.Proj=j$F,k$C.WGS84=new k$C.Proj("WGS84"),k$C.Point=it$4,k$C.toPoint=sa$2,k$C.defs=L$Q,k$C.transform=Nt$5,k$C.mgrs=ds,k$C.version="2.6.1",Ge$8(k$C),Object.defineProperties(p$L.prototype,{projection:{get:function(){return this._projection}}}),p$L.prototype.project=function(e,t){var i=k$C(this._projection,[e$2a.toDegrees(e.longitude),e$2a.toDegrees(e.latitude)]);return e$2b(t)?(t.x=i[0],t.y=i[1],t.z=e.height,t):new o$1p(i[0],i[1],e.height)},p$L.prototype.unproject=function(e,t){if(!e$2b(e))throw new t$16("cartesian is required");var i=k$C(this._projection).inverse([e.x,e.y]),n=e$2a.toRadians(i[0]),r=e$2a.toRadians(i[1]);return e$2b(t)?(t.longitude=n,t.latitude=r,t):new a$18(n,r)};var I$R={computePositions:function(e,t,i,n,r){var o,a=.5*e,s=-a,l=n+n,u=new Float64Array(3*(r?2*l:l)),c=0,h=0,d=r?3*l:0,f=r?3*(l+n):3*n;for(o=0;o<n;o++){var p=o/n*e$2a.TWO_PI,_=Math.cos(p),m=Math.sin(p),g=_*i,x=m*i,v=_*t,y=m*t;u[h+d]=g,u[h+d+1]=x,u[h+d+2]=s,u[h+f]=v,u[h+f+1]=y,u[h+f+2]=a,h+=3,r&&(u[c++]=g,u[c++]=x,u[c++]=s,u[c++]=v,u[c++]=y,u[c++]=a)}return u}},M$J=new o$1o,at$6=new o$1p,ut$5=new o$1p,mt$1=new o$1p,vt$4=new o$1p;function l$Q(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=u$_(e.vertexFormat,n$11.DEFAULT),o=u$_(e.slices,128);if(!e$2b(t))throw new t$16("options.length must be defined.");if(!e$2b(i))throw new t$16("options.topRadius must be defined.");if(!e$2b(n))throw new t$16("options.bottomRadius must be defined.");if(o<3)throw new t$16("options.slices must be greater than or equal to 3.");if(e$2b(e.offsetAttribute)&&e.offsetAttribute===_0x58701d.TOP)throw new t$16("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=i,this._bottomRadius=n,this._vertexFormat=n$11.clone(r),this._slices=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}l$Q.packedLength=n$11.packedLength+5,l$Q.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=u$_(e._offsetAttribute,-1),t};var H$J=new n$11,E$K={vertexFormat:H$J,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0},G$N;l$Q.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n=n$11.unpack(e,t,H$J);t+=n$11.packedLength;var r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return e$2b(i)?(i._vertexFormat=n$11.clone(n,i._vertexFormat),i._length=r,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._offsetAttribute=-1===l?void 0:l,i):(E$K.length=r,E$K.topRadius=o,E$K.bottomRadius=a,E$K.slices=s,E$K.offsetAttribute=-1===l?void 0:l,new l$Q(E$K))},l$Q.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._vertexFormat,o=e._slices;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=o+o,l=o+s,u=s+s,c=I$R.computePositions(t,i,n,o,!0),h=r.st?new Float32Array(2*u):void 0,d=r.normal?new Float32Array(3*u):void 0,f=r.tangent?new Float32Array(3*u):void 0,p=r.bitangent?new Float32Array(3*u):void 0,_=r.normal||r.tangent||r.bitangent;if(_){var m=r.tangent||r.bitangent,g=0,x=0,v=0,y=Math.atan2(n-i,t),$=at$6;$.z=Math.sin(y);var b=Math.cos(y),T=mt$1,C=ut$5;for(a=0;a<o;a++){var S=a/o*e$2a.TWO_PI,w=b*Math.cos(S),E=b*Math.sin(S);_&&($.x=w,$.y=E,m&&(T=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,$,T),T)),r.normal&&(d[g++]=$.x,d[g++]=$.y,d[g++]=$.z,d[g++]=$.x,d[g++]=$.y,d[g++]=$.z),r.tangent&&(f[x++]=T.x,f[x++]=T.y,f[x++]=T.z,f[x++]=T.x,f[x++]=T.y,f[x++]=T.z),r.bitangent&&(C=o$1p.normalize(o$1p.cross($,T,C),C),p[v++]=C.x,p[v++]=C.y,p[v++]=C.z,p[v++]=C.x,p[v++]=C.y,p[v++]=C.z))}for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=-1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[v++]=0,p[v++]=-1,p[v++]=0);for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[v++]=0,p[v++]=1,p[v++]=0)}var P=12*o-12,A=ce$x.createTypedArray(u,P),L=0,M=0;for(a=0;a<o-1;a++)A[L++]=M,A[L++]=M+2,A[L++]=M+3,A[L++]=M,A[L++]=M+3,A[L++]=M+1,M+=2;for(A[L++]=s-2,A[L++]=0,A[L++]=1,A[L++]=s-2,A[L++]=1,A[L++]=s-1,a=1;a<o-1;a++)A[L++]=s+a+1,A[L++]=s+a,A[L++]=s;for(a=1;a<o-1;a++)A[L++]=l,A[L++]=l+a,A[L++]=l+a+1;var R=0;if(r.st){var O=Math.max(i,n);for(a=0;a<u;a++){var I=o$1p.fromArray(c,3*a,vt$4);h[R++]=(I.x+O)/(2*O),h[R++]=(I.y+O)/(2*O)}}var D=new a$_;r.position&&(D.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:c})),r.normal&&(D.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:d})),r.tangent&&(D.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:f})),r.bitangent&&(D.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:p})),r.st&&(D.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:h})),M$J.x=.5*t,M$J.y=Math.max(n,i);var B=new i$1c(o$1p.ZERO,o$1o.magnitude(M$J));if(e$2b(e._offsetAttribute)){t=c.length;var N=new Uint8Array(t/3);d$1s(N,e._offsetAttribute===_0x58701d.NONE?0:1),D.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:N})}return new I$1p({attributes:D,indices:A,primitiveType:W$18.TRIANGLES,boundingSphere:B,offsetAttribute:e._offsetAttribute})}},l$Q.getUnitCylinder=function(){return e$2b(G$N)||(G$N=l$Q.createGeometry(new l$Q({topRadius:1,bottomRadius:1,length:1,vertexFormat:n$11.POSITION_ONLY}))),G$N};var l$P=new o$1o;function d$Z(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=u$_(e.slices,128),o=Math.max(u$_(e.numberOfVerticalLines,16),0);if(o$1q.typeOf.number("options.positions",t),o$1q.typeOf.number("options.topRadius",i),o$1q.typeOf.number("options.bottomRadius",n),o$1q.typeOf.number.greaterThanOrEquals("options.slices",r,3),e$2b(e.offsetAttribute)&&e.offsetAttribute===_0x58701d.TOP)throw new t$16("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=i,this._bottomRadius=n,this._slices=r,this._numberOfVerticalLines=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}d$Z.packedLength=6,d$Z.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i++]=e._numberOfVerticalLines,t[i]=u$_(e._offsetAttribute,-1),t};var b$Q={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};d$Z.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=e[t++],r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return e$2b(i)?(i._length=n,i._topRadius=r,i._bottomRadius=o,i._slices=a,i._numberOfVerticalLines=s,i._offsetAttribute=-1===l?void 0:l,i):(b$Q.length=n,b$Q.topRadius=r,b$Q.bottomRadius=o,b$Q.slices=a,b$Q.numberOfVerticalLines=s,b$Q.offsetAttribute=-1===l?void 0:l,new d$Z(b$Q))},d$Z.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._slices,o=e._numberOfVerticalLines;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=2*r,l=I$R.computePositions(t,i,n,r,!1),u=2*r;if(o>0){var c=Math.min(o,r);a=Math.round(r/c),u+=c}var h,d=ce$x.createTypedArray(s,2*u),f=0;for(h=0;h<r-1;h++)d[f++]=h,d[f++]=h+1,d[f++]=h+r,d[f++]=h+1+r;if(d[f++]=r-1,d[f++]=0,d[f++]=r+r-1,d[f++]=r,o>0)for(h=0;h<r;h+=a)d[f++]=h,d[f++]=h+r;var p=new a$_;p.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:l}),l$P.x=.5*t,l$P.y=Math.max(n,i);var _=new i$1c(o$1p.ZERO,o$1o.magnitude(l$P));if(e$2b(e._offsetAttribute)){t=l.length;var m=new Uint8Array(t/3);d$1s(m,e._offsetAttribute===_0x58701d.NONE?0:1),p.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return new I$1p({attributes:p,indices:d,primitiveType:W$18.LINES,boundingSphere:_,offsetAttribute:e._offsetAttribute})}};var w$F=1953029805,c$H=2917034100;function f$L(e,t){if(f$L.passThroughDataForTesting)return t;o$1q.typeOf.object("key",e),o$1q.typeOf.object("data",t);var i=e.byteLength;if(0===i||i%4!=0)throw new t$14("The length of key must be greater than 0 and a multiple of 4.");var n=new DataView(t),r=n.getUint32(0,!0);if(r===w$F||r===c$H)return t;for(var o,a=new DataView(e),s=0,l=t.byteLength,u=l-l%8,c=i,h=8;s<u;)for(o=h=(h+8)%24;s<u&&o<c;)n.setUint32(s,n.getUint32(s,!0)^a.getUint32(o,!0),!0),n.setUint32(s+4,n.getUint32(s+4,!0)^a.getUint32(o+4,!0),!0),s+=8,o+=24;if(s<l)for(o>=c&&(o=h=(h+8)%24);s<l;)n.setUint8(s,n.getUint8(s)^a.getUint8(o)),s++,o++}function o$K(e){this.proxy=e}function t$B(e,t){if(e=u$_(e,0),(t=u$_(t,Number.MAX_VALUE))<=e)throw new t$16("far distance must be greater than near distance.");this.value=new Float32Array([e,t])}f$L.passThroughDataForTesting=!1,o$K.prototype.getURL=function(e){var t=-1===this.proxy.indexOf("?")?"?":"";return this.proxy+t+encodeURIComponent(e)},Object.defineProperties(t$B.prototype,{componentDatatype:{get:function(){return S$12.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}}),t$B.fromDistanceDisplayCondition=function(e){if(!e$2b(e))throw new t$16("distanceDisplayCondition is required.");if(e.far<=e.near)throw new t$16("distanceDisplayCondition.far distance must be greater than distanceDisplayCondition.near distance.");return new t$B(e.near,e.far)},t$B.toValue=function(e,t){if(!e$2b(e))throw new t$16("distanceDisplayCondition is required.");return e$2b(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Ni$3=new o$1p,zi$3=new o$1p,Di$4=new o$1p,Si$3=new o$1p,Ui$2=new o$1p(1,1,1),_i$5=Math.cos,Ci$4=Math.sin;function b$P(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.radii,Ui$2),i=u$_(e.innerRadii,t),n=u$_(e.minimumClock,0),r=u$_(e.maximumClock,e$2a.TWO_PI),o=u$_(e.minimumCone,0),a=u$_(e.maximumCone,e$2a.PI),s=Math.round(u$_(e.stackPartitions,64)),l=Math.round(u$_(e.slicePartitions,64)),u=u$_(e.vertexFormat,n$11.DEFAULT);if(l<3)throw new t$16("options.slicePartitions cannot be less than three.");if(s<3)throw new t$16("options.stackPartitions cannot be less than three.");this._radii=o$1p.clone(t),this._innerRadii=o$1p.clone(i),this._minimumClock=n,this._maximumClock=r,this._minimumCone=o,this._maximumCone=a,this._stackPartitions=s,this._slicePartitions=l,this._vertexFormat=n$11.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}b$P.packedLength=2*o$1p.packedLength+n$11.packedLength+7,b$P.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return i=u$_(i,0),o$1p.pack(e._radii,t,i),i+=o$1p.packedLength,o$1p.pack(e._innerRadii,t,i),i+=o$1p.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=u$_(e._offsetAttribute,-1),t};var ki$3=new o$1p,li$3=new o$1p,Pi$4=new n$11,O$x={radii:ki$3,innerRadii:li$3,vertexFormat:Pi$4,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0},ni$2;function t$A(e){e=u$_(e,{}),this._tilingScheme=e.tilingScheme,e$2b(this._tilingScheme)||(this._tilingScheme=new g$13({ellipsoid:u$_(e.ellipsoid,t$13.WGS84)})),this._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new o$1h,this._isCreateSkirt=e.isCreateSkirt,this._isSkirtDirty=!1,this._readyPromise=o$1l.resolve(!0)}function n$x(){this._removalFunctions=[]}b$P.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n=o$1p.unpack(e,t,ki$3);t+=o$1p.packedLength;var r=o$1p.unpack(e,t,li$3);t+=o$1p.packedLength;var o=n$11.unpack(e,t,Pi$4);t+=n$11.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return e$2b(i)?(i._radii=o$1p.clone(n,i._radii),i._innerRadii=o$1p.clone(r,i._innerRadii),i._vertexFormat=n$11.clone(o,i._vertexFormat),i._minimumClock=a,i._maximumClock=s,i._minimumCone=l,i._maximumCone=u,i._stackPartitions=c,i._slicePartitions=h,i._offsetAttribute=-1===d?void 0:d,i):(O$x.minimumClock=a,O$x.maximumClock=s,O$x.minimumCone=l,O$x.maximumCone=u,O$x.stackPartitions=c,O$x.slicePartitions=h,O$x.offsetAttribute=-1===d?void 0:d,new b$P(O$x))},b$P.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._vertexFormat,l=e._slicePartitions+1,u=e._stackPartitions+1;(l=Math.round(l*Math.abs(r-n)/e$2a.TWO_PI))<2&&(l=2),(u=Math.round(u*Math.abs(a-o)/e$2a.PI))<2&&(u=2);var c,h,d=0,f=[o],p=[n];for(c=0;c<u;c++)f.push(o+c*(a-o)/(u-1));for(f.push(a),h=0;h<l;h++)p.push(n+h*(r-n)/(l-1));p.push(r);var _=f.length,m=p.length,g=0,x=1,v=i.x!==t.x||i.y!==t.y||i.z!==t.z,y=!1,$=!1,b=!1;v&&(x=2,o>0&&(y=!0,g+=l-1),a<Math.PI&&($=!0,g+=l-1),(r-n)%e$2a.TWO_PI?(b=!0,g+=2*(u-1)+1):g+=1);var T=m*_*x,C=new Float64Array(3*T),S=d$1s(new Array(T),!1),w=d$1s(new Array(T),!1),E=l*u*x,P=6*(E+g+1-(l+u)*x),A=ce$x.createTypedArray(E,P),L=s.normal?new Float32Array(3*T):void 0,M=s.tangent?new Float32Array(3*T):void 0,R=s.bitangent?new Float32Array(3*T):void 0,O=s.st?new Float32Array(2*T):void 0,I=new Array(_),D=new Array(_);for(c=0;c<_;c++)I[c]=Ci$4(f[c]),D[c]=_i$5(f[c]);var B=new Array(m),N=new Array(m);for(h=0;h<m;h++)N[h]=_i$5(p[h]),B[h]=Ci$4(p[h]);for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=t.x*I[c]*N[h],C[d++]=t.y*I[c]*B[h],C[d++]=t.z*D[c];var F,U,G,z,V=T/2;if(v)for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=i.x*I[c]*N[h],C[d++]=i.y*I[c]*B[h],C[d++]=i.z*D[c],S[V]=!0,c>0&&c!==_-1&&0!==h&&h!==m-1&&(w[V]=!0),V++;for(d=0,c=1;c<_-2;c++)for(F=c*m,U=(c+1)*m,h=1;h<m-2;h++)A[d++]=U+h,A[d++]=U+h+1,A[d++]=F+h+1,A[d++]=U+h,A[d++]=F+h+1,A[d++]=F+h;if(v){var k=_*m;for(c=1;c<_-2;c++)for(F=k+c*m,U=k+(c+1)*m,h=1;h<m-2;h++)A[d++]=U+h,A[d++]=F+h,A[d++]=F+h+1,A[d++]=U+h,A[d++]=F+h+1,A[d++]=U+h+1}if(v){if(y)for(z=_*m,c=1;c<m-2;c++)A[d++]=c,A[d++]=c+1,A[d++]=z+c+1,A[d++]=c,A[d++]=z+c+1,A[d++]=z+c;if($)for(G=_*m-m,z=_*m*x-m,c=1;c<m-2;c++)A[d++]=G+c+1,A[d++]=G+c,A[d++]=z+c,A[d++]=G+c+1,A[d++]=z+c,A[d++]=z+c+1}if(b){for(c=1;c<_-2;c++)z=m*_+m*c,G=m*c,A[d++]=z,A[d++]=G+m,A[d++]=G,A[d++]=z,A[d++]=z+m,A[d++]=G+m;for(c=1;c<_-2;c++)z=m*_+m*(c+1)-1,G=m*(c+1)-1,A[d++]=G+m,A[d++]=z,A[d++]=G,A[d++]=G+m,A[d++]=z+m,A[d++]=z}var W=new a$_;s.position&&(W.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:C}));var H,q=0,j=0,Y=0,X=0,K=T/2,Q=t$13.fromCartesian3(t),Z=t$13.fromCartesian3(i);if(s.st||s.normal||s.tangent||s.bitangent){for(c=0;c<T;c++){H=S[c]?Z:Q;var J=o$1p.fromArray(C,3*c,Ni$3),ee=H.geodeticSurfaceNormal(J,zi$3);if(s.st){var te=Math.atan2(ee.y,ee.x);te<0&&(te+=e$2a.TWO_PI),O[q++]=te/e$2a.TWO_PI,O[q++]=Math.asin(ee.z)/Math.PI+.5}if(s.normal&&(w[c]&&o$1p.negate(ee,ee),L[j++]=ee.x,L[j++]=ee.y,L[j++]=ee.z),s.tangent||s.bitangent){var ie,ne=Di$4,re=0;if(S[c]&&(re=K),ie=!y&&c>=re&&c<re+2*m?o$1p.UNIT_X:o$1p.UNIT_Z,o$1p.cross(ie,ee,ne),o$1p.normalize(ne,ne),s.tangent&&(M[Y++]=ne.x,M[Y++]=ne.y,M[Y++]=ne.z),s.bitangent){var oe=o$1p.cross(ee,ne,Si$3);o$1p.normalize(oe,oe),R[X++]=oe.x,R[X++]=oe.y,R[X++]=oe.z}}}s.st&&(W.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:O})),s.normal&&(W.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:L})),s.tangent&&(W.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:M})),s.bitangent&&(W.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:R}))}if(e$2b(e._offsetAttribute)){var ae=C.length,se=new Uint8Array(ae/3);d$1s(se,e._offsetAttribute===_0x58701d.NONE?0:1),W.applyOffset=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:1,values:se})}return new I$1p({attributes:W,indices:A,primitiveType:W$18.TRIANGLES,boundingSphere:i$1c.fromEllipsoid(Q),offsetAttribute:e._offsetAttribute})}}},b$P.getUnitEllipsoid=function(){return e$2b(ni$2)||(ni$2=b$P.createGeometry(new b$P({radii:new o$1p(1,1,1),vertexFormat:n$11.POSITION_ONLY}))),ni$2},Object.defineProperties(t$A.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}}}),t$A.prototype.requestTileGeometry=function(e,t,i,n){return o$1l.resolve(new T$J({buffer:new Uint8Array(256),width:16,height:16,skirtMode:this._isCreateSkirt}))},t$A.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},t$A.prototype.getTileDataAvailable=function(e,t,i){},t$A.prototype.loadTileDataAvailability=function(e,t,i){},n$x.prototype.add=function(e,t,i){if(!e$2b(e))throw new t$16("event is required");var n=e.addEventListener(t,i);this._removalFunctions.push(n);var r=this;return function(){n();var e=r._removalFunctions;e.splice(e.indexOf(n),1)}},n$x.prototype.removeAll=function(){for(var e=this._removalFunctions,t=0,i=e.length;t<i;++t)e[t]();e.length=0};var e$X={NONE:0,HOLD:1,EXTRAPOLATE:2},_0x346789=Object.freeze(e$X);function o$J(){}o$J.prototype.geocode=t$16.throwInstantiationError;var e$W={SEARCH:0,AUTOCOMPLETE:1},c$G=Object.freeze(e$W);function a$F(e,t){return a$K(e,t=u$_(t,0),Math.min(4,e.length))}function g$L(){this.PI=3.14159265358979,this.param_a=0,this.param_d=1e-12,this.p=206264.8062471,this.a=6378137,this.b=6356752.31414036,this.alpha=.003352810681182319,this.e2=.0066943800229,this.e21=.00673949677548,this.c=6399593.62586,this.K0=1.57048761144159e-7,this.K1=.00505250178820567,this.K2=298472900956587e-19,this.K3=2.41626669230084e-7,this.K4=2.22241238938534e-9,this.alpha=1/298.257222101,this.e4=Math.pow(this.e2,2),this.e6=Math.pow(this.e2,3),this.e8=Math.pow(this.e2,4),this.A=1+.5*this.e2+.375*this.e4+.3125*this.e6+630/2304*this.e8,this.B=1/6*this.e2+15/80*this.e4+.1875*this.e6+420/2304*this.e8,this.C=3/80*this.e4+7/112*this.e6+.078125*this.e8,this.D=1/112*this.e6+45/2304*this.e8,this.E=5/2304*this.e8}function x$L(){this.PI=3.14159265358979,this.param_a=0,this.param_d=1e-12,this.p=206264.8062471,this.a=6378140,this.b=6356755.288157528,this.alpha=.0033528131778969143,this.e2=.00669438499958795,this.e21=.00673950181947292,this.c=6399596.65198801,this.K0=1.57048687472752e-7,this.K1=.00505250559291393,this.K2=298473350966158e-19,this.K3=2.41627215981336e-7,this.K4=2.22241909461273e-9,this.e4=Math.pow(this.e2,2),this.e6=Math.pow(this.e2,3),this.e8=Math.pow(this.e2,4),this.A=1+.5*this.e2+.375*this.e4+.3125*this.e6+630/2304*this.e8,this.B=1/6*this.e2+15/80*this.e4+.1875*this.e6+420/2304*this.e8,this.C=3/80*this.e4+7/112*this.e6+.078125*this.e8,this.D=1/112*this.e6+45/2304*this.e8,this.E=5/2304*this.e8}function E$J(e,t,i,n,r,o){var a=0;a=t>1e6?t-5e5-1e6*r:t-5e5;var s=o.K0*e,l=Math.sin(s),u=s+Math.cos(s)*(o.K1*l-o.K2*Math.pow(l,3)+o.K3*Math.pow(l,5)-o.K4*Math.pow(l,7)),c=Math.tan(u),h=o.e21*Math.pow(Math.cos(u),2),d=Math.sqrt(1+h),f=a/(o.c/d),p=Math.pow(d,2)*c,_=Math.pow(c,2);i.B=u-p*Math.pow(f,2)/2+(5+3*_+h-9*h*_)*p*Math.pow(f,4)/24-(61+90*_+45*Math.pow(_,2))*p*Math.pow(f,6)/720;var m=1/Math.cos(u);i.L=m*f-(1+2*_+h)*m*Math.pow(f,3)/6+(5+28*_+24*Math.pow(_,2)+6*h+8*h*_)*m*Math.pow(f,5)/120+n}function G$M(e,t,i,n,r,o){var a=(t-e)/2,s=(t+e)/2,l=(n+i)/2,u=2*o.b*o.b*l,c=Math.cos(s),h=Math.sin(a),d=[];return d[0]=u*o.A*h*c,d[1]=u*o.B*Math.sin(3*a)*Math.cos(3*s),d[2]=u*o.C*Math.sin(5*a)*Math.cos(5*s),d[3]=u*o.D*Math.sin(7*a)*Math.cos(7*s),d[4]=u*o.E*Math.sin(9*a)*Math.cos(9*s),d[0]-d[1]+d[2]-d[3]+d[4]}function q$J(e,t,i,n){for(var r=0,o=0;o<e.length-1;o++)for(var a=e[o],s=e[o+1],l=a.x,u=a.y,c=s.x,h=s.y,d=s.x-a.x,f=s.y-a.y,p=Math.pow(Math.abs(d),2),_=Math.pow(Math.abs(f),2),m=Math.sqrt(p+_),g=Math.floor(m/70),x=1;x<=g+1;x++){var v=0,y=0;x<g+1?(v=a.x+d*x/(g+1),y=a.y+f*x/(g+1)):(v=c,y=h);var $={B:0,L:0},b={B:0,L:0};E$J(u,l,$,t,i,n),E$J(y,v,b,t,i,n),r+=G$M($.B,b.B,$.L,b.L,t,n),l=v,u=y}return Math.abs(r)}function I$Q(e,t,i,n){for(var r=0,o=0;o<e.length-1;o++){var a={B:0,L:0},s={B:0,L:0};E$J(e[o].y,e[o].x,a,t,i,n),E$J(e[o+1].y,e[o+1].x,s,t,i,n);var l=[],u=(s.B-a.B)/2,c=(s.B+a.B)/2,h=(s.L+a.L)/2,d=2*n.b*n.b*h,f=Math.cos(c),p=Math.sin(u);l[0]=d*n.A*f*p,l[1]=d*n.B*Math.sin(3*u)*Math.cos(3*c),l[2]=d*n.C*Math.sin(5*u)*Math.cos(5*c),l[3]=d*n.D*Math.sin(7*u)*Math.cos(7*c),l[4]=d*n.E*Math.sin(9*u)*Math.cos(9*c),r+=l[0]-l[1]+l[2]-l[3]+l[4]}return Math.abs(r)}function R$C(e,t,i,n,r){var o=0,a=e$2a.toRadians(i);if("China2000"===t)o=q$J(e,a,n,new g$L);else if("Xian1980"===t){o=I$Q(e,a,n,new x$L)}return o}var tmp={};(function(global,undefined$1){!function(e,t,i){global.protobuf=function i(n){var r=t[n];return r||e[n][0].call(r=t[n]={exports:{}},i,r,r.exports),r.exports}(7)}({1:[function(e,t,i){t.exports=function(e,t){for(var i=[],n=2;n<arguments.length;)i.push(arguments[n++]);var r=!0;return new Promise((function(n,o){i.push((function(e){if(r)if(r=!1,e)o(e);else{for(var t=[],i=1;i<arguments.length;)t.push(arguments[i++]);n.apply(null,t)}}));try{e.apply(t||this,i)}catch(e){r&&(r=!1,o(e))}}))}},{}],2:[function(e,t,i){var n=i;n.length=function(e){var t=e.length;if(!t)return 0;for(var i=0;--t%4>1&&"="===e.charAt(t);)++i;return Math.ceil(3*e.length)/4-i};for(var r=new Array(64),o=new Array(123),a=0;a<64;)o[r[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;n.encode=function(e,t,i){for(var n,o=[],a=0,s=0;t<i;){var l=e[t++];switch(s){case 0:o[a++]=r[l>>2],n=(3&l)<<4,s=1;break;case 1:o[a++]=r[n|l>>4],n=(15&l)<<2,s=2;break;case 2:o[a++]=r[n|l>>6],o[a++]=r[63&l],s=0}}return s&&(o[a++]=r[n],o[a]=61,1===s&&(o[a+1]=61)),String.fromCharCode.apply(String,o)};var s="invalid encoding";n.decode=function(e,t,i){for(var n,r=i,a=0,l=0;l<e.length;){var u=e.charCodeAt(l++);if(61===u&&a>1)break;if((u=o[u])===undefined$1)throw Error(s);switch(a){case 0:n=u,a=1;break;case 1:t[i++]=n<<2|(48&u)>>4,n=u,a=2;break;case 2:t[i++]=(15&n)<<4|(60&u)>>2,n=u,a=3;break;case 3:t[i++]=(3&n)<<6|u,a=0}}if(1===a)throw Error(s);return i-r},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{}],3:[function(e,t,i){function n(){this._listeners={}}t.exports=n,n.prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this},n.prototype.off=function(e,t){if(e===undefined$1)this._listeners={};else if(t===undefined$1)this._listeners[e]=[];else for(var i=this._listeners[e],n=0;n<i.length;)i[n].fn===t?i.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var i=[],n=1;n<arguments.length;)i.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,i)}return this}},{}],4:[function(require,module,exports){function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],5:[function(e,t,i){t.exports=function(e,t,i){var n=i||8192,r=n>>>1,o=null,a=n;return function(i){if(i<1||i>r)return e(i);a+i>n&&(o=e(n),a=0);var s=t.call(o,a,a+=i);return 7&a&&(a=1+(7|a)),s}}},{}],6:[function(e,t,i){var n=i;n.length=function(e){for(var t=0,i=0,n=0;n<e.length;++n)(i=e.charCodeAt(n))<128?t+=1:i<2048?t+=2:55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,i){if(i-t<1)return"";for(var n,r=null,o=[],a=0;t<i;)(n=e[t++])<128?o[a++]=n:n>191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,o)),a=0);return r?(a&&r.push(String.fromCharCode.apply(String,o.slice(0,a))),r.join("")):String.fromCharCode.apply(String,o.slice(0,a))},n.write=function(e,t,i){for(var n,r,o=i,a=0;a<e.length;++a)(n=e.charCodeAt(a))<128?t[i++]=n:n<2048?(t[i++]=n>>6|192,t[i++]=63&n|128):55296==(64512&n)&&56320==(64512&(r=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&r),++a,t[i++]=n>>18|240,t[i++]=n>>12&63|128,t[i++]=n>>6&63|128,t[i++]=63&n|128):(t[i++]=n>>12|224,t[i++]=n>>6&63|128,t[i++]=63&n|128);return i-o}},{}],7:[function(e,t,i){var n=i;function r(){n.Reader._configure(n.BufferReader),n.util._configure()}n.build="minimal",n.roots={},n.Writer=e(14),n.BufferWriter=e(15),n.Reader=e(8),n.BufferReader=e(9),n.util=e(13),n.rpc=e(10),n.configure=r,n.Writer._configure(n.BufferWriter),r()},{10:10,13:13,14:14,15:15,8:8,9:9}],8:[function(e,t,i){t.exports=l;var n,r=e(13),o=r.LongBits,a=r.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var u=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")};function c(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw s(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}l.create=r.Buffer?function(e){return(l.create=function(e){return r.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u,l.prototype._slice=r.Array.prototype.subarray||r.Array.prototype.slice,l.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return h(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|h(this.buf,this.pos+=4)};var f=typeof Float32Array<"u"?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(i,n){return t[0]=i[n],t[1]=i[n+1],t[2]=i[n+2],t[3]=i[n+3],e[0]}:function(i,n){return t[0]=i[n+3],t[1]=i[n+2],t[2]=i[n+1],t[3]=i[n],e[0]}}():function(e,t){var i=h(e,t+4),n=2*(i>>31)+1,r=i>>>23&255,o=8388607&i;return 255===r?o?NaN:n*(1/0):0===r?1401298464324817e-60*n*o:n*Math.pow(2,r-150)*(o+8388608)};l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=f(this.buf,this.pos);return this.pos+=4,e};var p=typeof Float64Array<"u"?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(i,n){return t[0]=i[n],t[1]=i[n+1],t[2]=i[n+2],t[3]=i[n+3],t[4]=i[n+4],t[5]=i[n+5],t[6]=i[n+6],t[7]=i[n+7],e[0]}:function(i,n){return t[0]=i[n+7],t[1]=i[n+6],t[2]=i[n+5],t[3]=i[n+4],t[4]=i[n+3],t[5]=i[n+2],t[6]=i[n+1],t[7]=i[n],e[0]}}():function(e,t){var i=h(e,t+4),n=h(e,t+8),r=2*(n>>31)+1,o=n>>>20&2047,a=4294967296*(1048575&n)+i;return 2047===o?a?NaN:r*(1/0):0===o?5e-324*r*a:r*Math.pow(2,o-1075)*(a+4503599627370496)};l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=p(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,i=this.pos+e;if(i>this.len)throw s(this,e);return this.pos+=e,t===i?new this.buf.constructor(0):this._slice.call(this.buf,t,i)},l.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4==(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){n=e;var t=r.Long?"toLong":"toNumber";r.merge(l.prototype,{int64:function(){return c.call(this)[t](!1)},uint64:function(){return c.call(this)[t](!0)},sint64:function(){return c.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},{13:13}],9:[function(e,t,i){t.exports=o;var n=e(8);(o.prototype=Object.create(n.prototype)).constructor=o;var r=e(13);function o(e){n.call(this,e)}r.Buffer&&(o.prototype._slice=r.Buffer.prototype.slice),o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{13:13,8:8}],10:[function(e,t,i){i.Service=e(11)},{11:11}],11:[function(e,t,i){t.exports=r;var n=e(13);function r(e,t,i){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(i)}(r.prototype=Object.create(n.EventEmitter.prototype)).constructor=r,r.prototype.rpcCall=function e(t,i,r,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,i,r,o);if(!s.rpcImpl)return setTimeout((function(){a(Error("already ended"))}),0),undefined$1;try{return s.rpcImpl(t,i[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,i){if(e)return s.emit("error",e,t),a(e);if(null===i)return s.end(!0),undefined$1;if(!(i instanceof r))try{i=r[s.responseDelimited?"decodeDelimited":"decode"](i)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",i,t),a(null,i)}))}catch(e){return s.emit("error",e,t),setTimeout((function(){a(e)}),0),undefined$1}},r.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{13:13}],12:[function(e,t,i){t.exports=r;var n=e(13);function r(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=r.zero=new r(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var i=e>>>0,n=(e-i)/4294967296>>>0;return t&&(n=~n>>>0,i=~i>>>0,++i>4294967295&&(i=0,++n>4294967295&&(n=0))),new r(i,n)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if(n.isString(e)){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):o},r.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,i=~this.hi>>>0;return t||(i=i+1>>>0),-(t+4294967296*i)}return this.lo+4294967296*this.hi},r.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;r.fromHash=function(e){return e===a?o:new r((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},r.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},r.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:i<128?9:10}},{13:13}],13:[function(e,t,i){var n=i;function r(e,t,i){for(var n=Object.keys(t),r=0;r<n.length;++r)(e[n[r]]===undefined$1||!i)&&(e[n[r]]=t[n[r]]);return e}function o(e){function t(e,i){if(!(this instanceof t))return new t(e,i);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),i&&r(this,i)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=e(1),n.base64=e(2),n.EventEmitter=e(3),n.inquire=e(4),n.utf8=e(6),n.pool=e(5),n.LongBits=e(12),n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)},n.Array=typeof Uint8Array<"u"?Uint8Array:Array,n.Long=global.dcodeIO&&global.dcodeIO.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var i=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(i.lo,i.hi,t):i.toNumber(Boolean(t))},n.merge=r,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},i=0;i<e.length;++i)t[e[i]]=1;return function(){for(var e=Object.keys(this),i=e.length-1;i>-1;--i)if(1===t[e[i]]&&this[e[i]]!==undefined$1&&null!==this[e[i]])return e[i]}},n.oneOfSetter=function(e){return function(t){for(var i=0;i<e.length;++i)e[i]!==t&&delete this[e[i]]}},n.lazyResolve=function(e,t){for(var i=0;i<t.length;++i)for(var n=Object.keys(t[i]),r=0;r<n.length;++r){for(var o=t[i][n[r]].split("."),a=e;o.length;)a=a[o.shift()];t[i][n[r]]=a}},n.toJSONOptions={longs:String,enums:String,bytes:String},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,i){return new e(t,i)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},{1:1,12:12,2:2,3:3,4:4,5:5,6:6}],14:[function(e,t,i){t.exports=h;var n,r=e(13),o=r.LongBits,a=r.base64,s=r.utf8;function l(e,t,i){this.fn=e,this.len=t,this.next=undefined$1,this.val=i}function u(){}function c(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function h(){this.len=0,this.head=new l(u,0,0),this.tail=this.head,this.states=null}function d(e,t,i){t[i]=255&e}function f(e,t){this.len=e,this.next=undefined$1,this.val=t}function p(e,t,i){for(;e.hi;)t[i++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[i++]=127&e.lo|128,e.lo=e.lo>>>7;t[i++]=e.lo}function _(e,t,i){t[i++]=255&e,t[i++]=e>>>8&255,t[i++]=e>>>16&255,t[i]=e>>>24}h.create=r.Buffer?function(){return(h.create=function(){return new n})()}:function(){return new h},h.alloc=function(e){return new r.Array(e)},r.Array!==Array&&(h.alloc=r.pool(h.alloc,r.Array.prototype.subarray)),h.prototype.push=function(e,t,i){return this.tail=this.tail.next=new l(e,t,i),this.len+=t,this},f.prototype=Object.create(l.prototype),f.prototype.fn=function(e,t,i){for(;e>127;)t[i++]=127&e|128,e>>>=7;t[i]=e},h.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},h.prototype.int32=function(e){return e<0?this.push(p,10,o.fromNumber(e)):this.uint32(e)},h.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},h.prototype.uint64=function(e){var t=o.from(e);return this.push(p,t.length(),t)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this.push(p,t.length(),t)},h.prototype.bool=function(e){return this.push(d,1,e?1:0)},h.prototype.fixed32=function(e){return this.push(_,4,e>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(e){var t=o.from(e);return this.push(_,4,t.lo).push(_,4,t.hi)},h.prototype.sfixed64=h.prototype.fixed64;var m=typeof Float32Array<"u"?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(i,n,r){e[0]=i,n[r++]=t[0],n[r++]=t[1],n[r++]=t[2],n[r]=t[3]}:function(i,n,r){e[0]=i,n[r++]=t[3],n[r++]=t[2],n[r++]=t[1],n[r]=t[0]}}():function(e,t,i){var n=e<0?1:0;if(n&&(e=-e),0===e)_(1/e>0?0:2147483648,t,i);else if(isNaN(e))_(2147483647,t,i);else if(e>34028234663852886e22)_((n<<31|2139095040)>>>0,t,i);else if(e<11754943508222875e-54)_((n<<31|Math.round(e/1401298464324817e-60))>>>0,t,i);else{var r=Math.floor(Math.log(e)/Math.LN2);_((n<<31|r+127<<23|8388607&Math.round(e*Math.pow(2,-r)*8388608))>>>0,t,i)}};h.prototype.float=function(e){return this.push(m,4,e)};var g=typeof Float64Array<"u"?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(i,n,r){e[0]=i,n[r++]=t[0],n[r++]=t[1],n[r++]=t[2],n[r++]=t[3],n[r++]=t[4],n[r++]=t[5],n[r++]=t[6],n[r]=t[7]}:function(i,n,r){e[0]=i,n[r++]=t[7],n[r++]=t[6],n[r++]=t[5],n[r++]=t[4],n[r++]=t[3],n[r++]=t[2],n[r++]=t[1],n[r]=t[0]}}():function(e,t,i){var n=e<0?1:0;if(n&&(e=-e),0===e)_(0,t,i),_(1/e>0?0:2147483648,t,i+4);else if(isNaN(e))_(4294967295,t,i),_(2147483647,t,i+4);else if(e>17976931348623157e292)_(0,t,i),_((n<<31|2146435072)>>>0,t,i+4);else{var r;if(e<22250738585072014e-324)_((r=e/5e-324)>>>0,t,i),_((n<<31|r/4294967296)>>>0,t,i+4);else{var o=Math.floor(Math.log(e)/Math.LN2);1024===o&&(o=1023),_(4503599627370496*(r=e*Math.pow(2,-o))>>>0,t,i),_((n<<31|o+1023<<20|1048576*r&1048575)>>>0,t,i+4)}}};h.prototype.double=function(e){return this.push(g,8,e)};var x=r.Array.prototype.set?function(e,t,i){t.set(e,i)}:function(e,t,i){for(var n=0;n<e.length;++n)t[i+n]=e[n]};h.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this.push(d,1,0);if(r.isString(e)){var i=h.alloc(t=a.length(e));a.decode(e,i,0),e=i}return this.uint32(t).push(x,t,e)},h.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t).push(s.write,t,e):this.push(d,1,0)},h.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(u,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},h.prototype.ldelim=function(){var e=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=e.next,this.tail=t,this.len+=i),this},h.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),i=0;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t},h._configure=function(e){n=e}},{13:13}],15:[function(e,t,i){t.exports=a;var n=e(14);(a.prototype=Object.create(n.prototype)).constructor=a;var r=e(13),o=r.Buffer;function a(){n.call(this)}a.alloc=function(e){return(a.alloc=r._Buffer_allocUnsafe)(e)};var s=o&&o.prototype instanceof Uint8Array&&"set"===o.prototype.set.name?function(e,t,i){t.set(e,i)}:function(e,t,i){if(e.copy)e.copy(t,i,0,e.length);else for(var n=0;n<e.length;)t[i++]=e[n++]};function l(e,t,i){e.length<40?r.utf8.write(e,t,i):t.utf8Write(e,i)}a.prototype.bytes=function(e){r.isString(e)&&(e=r._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(s,t,e),this},a.prototype.string=function(e){var t=o.byteLength(e);return this.uint32(t),t&&this.push(l,t,e),this}},{13:13,14:14}]},{})})(tmp);var R$B=tmp.protobuf,d$Y=[1,2,4,8],a$E=15,m$I=16,p$K=64,y$G=128;function e$V(e,t,i,n,r,o){this._bits=e,this.cnodeVersion=t,this.imageryVersion=i,this.terrainVersion=n,this.imageryProvider=r,this.terrainProvider=o,this.ancestorHasTerrain=!1,this.terrainState=void 0}function U$H(e){for(var t=e.length,i=new ArrayBuffer(t),n=new Uint8Array(i),r=0;r<t;++r)n[r]=e.charCodeAt(r);return i}e$V.clone=function(e,t){return e$2b(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new e$V(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t},e$V.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},e$V.prototype.hasSubtree=function(){return i$P(this._bits,m$I)},e$V.prototype.hasImagery=function(){return i$P(this._bits,p$K)},e$V.prototype.hasTerrain=function(){return i$P(this._bits,y$G)},e$V.prototype.hasChildren=function(){return i$P(this._bits,a$E)},e$V.prototype.hasChild=function(e){return i$P(this._bits,d$Y[e])},e$V.prototype.getChildBitmask=function(){return this._bits&a$E};var X$A=U$H('Eô½\vyâjE"’,ÍqøIFgQ\0B%Æèa,f)\bÆ4Üjb%y\nwmiÖðœk“¡½NuàA[ß@V\fÙ»r›|3SîOlÔq°{ÀEVZ­wUe\v3’*¬l5Å0sø3>mF8J´Ýð.ÝuڌDt"úa"\f3"So¯9D\vŒ9Ù9L¹¿«\\ŒP_Ÿ"uxéq‘h;Áěð<VqH‚\'UfYNe˜u£aF}a?A\0Ÿ×´4M·F°Õ¸Š\'{‹Ü+»Mg0ÈÑö\\Pú[/F›n5/\'C.ë\n\f^¥se4ål.jC\'c#U©?q{gC}:¯ÍâTUœýKÆâŸ/(íË\\Æ-fˆ§;/*"N°k.Ý\r•}}GºC²²+>Mª>}æÎI‰Ææx\fa1-¤O¥~q ˆì\r1èN\v\0nPh}=\b\r•¦n£h—$[kó#ó¶s³\r\v@ÀŸØQ]ú".jßI\0¹ wUÆïj¿{GLƒîÜÜF…©­S+S4ÿ”Yä8è1ƒN¹XFkË-#†’p\x005ˆ"Ï1²&/çÃu-6,rt°#G·ÓÑ&…7râ\0ŒDÏÚ3-Þ`†i#i*|ÍKQ\r•T9w.)ê¦P¢joP™\\>TûïP[\vE‰m(w7ێJfJo™ åpâ¹q~\fmI-zþrÇòY0»]såÉ êxì ðŠB|G`°½&·q¶ÇŸÑ3‚=Ó«îc™È+S D\\qÆÌD2O<ÊÀ)=RÓaX©}e´ÜÏ\rô=ñ\b©BÚ#\tØ¿^PIøMÀËGLO÷{+ØÅ1’;µoÜl\r’ˆўÛ?âéÚ_ԄâFaZÞUϤ\0¾ýÎgñJi—æ HØ]~®q N®ÀV©‘<‚rçvì)IÖ]-ƒãÛ6©;f—‡jÕ¶=P^R¹KÇsWxÉô.Y•“oÐKW>\'\'Ç`Û;íšSD>?’mw¢\në?R¨ÆU^1I7…ôÅ&-©¿‹\'TÚÃj å*x°Öprª‹h½ˆ÷_H±~ÀXL?fù>áeÀp§Ï8i¯ðVldIœ\'­xtO‡ÞV9\0Úw\vË-‰û5Oõ\bQ`Á\nZGM&30xÚÀœFGâ[y`In7gS\n>éìF9²ñ4\rƄSuná\fYÙÞ)…{II¥wy¾IV.6ç\v:»Ob{ÒM1•/½8{¨O!áìFpv•})"xˆ\nÝ\\ÚÞQÏðüYRe|3ßóHÚ»*uÛ`²Ôüíì5¨ÿ(1-È܈F|Š["');function c$F(e){o$1q.defined("resourceOrUrl",e);var t=e;"string"!=typeof t&&!(t instanceof t$11)&&(o$1q.typeOf.string("resourceOrUrl.url",e.url),t=e.url);var i=t$11.createIfNeeded(t);i.appendForwardSlash(),this._resource=i,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=e$2a.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};var n=this;this._readyPromise=z$G(this).then((function(){return n.getQuadTreePacket("",n._quadPacketVersion)})).then((function(){return!0})).otherwise((function(e){var t="An error occurred while accessing "+B$E(n,"",1).url+".";return o$1l.reject(new t$14(t))}))}Object.defineProperties(c$F.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}}),c$F.tileXYToQuadKey=function(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n},c$F.quadKeyToTileXY=function(e){for(var t=0,i=0,n=e.length-1,r=n;r>=0;--r){var o=1<<r,a=+e[n-r];i$P(a,2)?i$P(a,1)||(t|=o):(i|=o,i$P(a,1)&&(t|=o))}return{x:t,y:i,level:n}},c$F.prototype.isValid=function(e){var t=this.getTileInformationFromQuadKey(e);if(e$2b(t))return null!==t;for(var i,n=!0,r=e;r.length>1;){if(i=r.substring(r.length-1),r=r.substring(0,r.length-1),e$2b(t=this.getTileInformationFromQuadKey(r))){!t.hasSubtree()&&!t.hasChild(parseInt(i))&&(n=!1);break}if(null===t){n=!1;break}}return n};var k$B=new i$V("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY),w$E,I$P;function P$D(e,t,i){var n=e._tileInfo,r=t,o=n[r];if(e$2b(o)&&(!o.hasSubtree()||o.hasChildren()))return o;for(;void 0===o&&r.length>1;)o=n[r=r.substring(0,r.length-1)];var a,s=e._subtreePromises,l=s[r];return e$2b(l)?l.then((function(){return a=new r$1b({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),P$D(e,t,a)})):e$2b(o)&&o.hasSubtree()?e$2b(l=e.getQuadTreePacket(r,o.cnodeVersion,i))?(s[r]=l,l.then((function(){return a=new r$1b({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),P$D(e,t,a)})).always((function(){delete s[r]}))):void 0:o$1l.reject(new t$14("Couldn't load metadata for tile "+t))}function B$E(e,t,i,n){return e._resource.getDerivedResource({url:"flatfile?q2-0"+t+"-q."+i.toString(),request:n})}function z$G(e){var t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!e$2b(I$P)){var i=n$15("ThirdParty/google-earth-dbroot-parser.js"),n=window.cesiumGoogleEarthDbRootParser;I$P=a$11(i).then((function(){w$E=window.cesiumGoogleEarthDbRootParser(R$B),e$2b(n)?window.cesiumGoogleEarthDbRootParser=n:delete window.cesiumGoogleEarthDbRootParser}))}return I$P.then((function(){return t.fetchArrayBuffer()})).then((function(t){var i=w$E.EncryptedDbRootProto.decode(new Uint8Array(t)),n=i.encryptionData,r=n.byteOffset,o=r+n.byteLength,a=e.key=n.buffer.slice(r,o);o=(r=(n=i.dbrootData).byteOffset)+n.byteLength;var s=n.buffer.slice(r,o);return k$B.scheduleTask({buffer:s,type:"DbRoot",key:a},[s])})).then((function(t){var i=w$E.DbRootProto.decode(new Uint8Array(t.buffer));if(e.imageryPresent=u$_(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=u$_(i.terrainPresent,e.terrainPresent),e$2b(i.endSnippet)&&e$2b(i.endSnippet.model)){var n=i.endSnippet.model;e.negativeAltitudeExponentBias=u$_(n.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=u$_(n.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)}e$2b(i.databaseVersion)&&(e._quadPacketVersion=u$_(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));for(var r=e.providers,o=u$_(i.providerInfo,[]),a=o.length,s=0;s<a;++s){var l=o[s],u=l.copyrightString;e$2b(u)&&(r[l.providerId]=new r$T(u.value))}})).otherwise((function(){console.log("Failed to retrieve "+t.url+". Using defaults."),e.key=X$A}))}function T$G(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.typeOf.object("options.buffer",e.buffer),o$1q.typeOf.number("options.negativeAltitudeExponentBias",e.negativeAltitudeExponentBias),o$1q.typeOf.number("options.negativeElevationThreshold",e.negativeElevationThreshold),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;var t=u$_(e.childTileMask,15),i=3&t;i|=4&t?8:0,i|=8&t?4:0,this._childTileMask=i,this._createdByUpsampling=u$_(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}c$F.prototype.getQuadTreePacket=function(e,t,i){t=u$_(t,1);var n=B$E(this,e=u$_(e,""),t,i).fetchArrayBuffer();if(e$2b(n)){var r=this._tileInfo,o=this.key;return n.then((function(t){return k$B.scheduleTask({buffer:t,quadKey:e,type:"Metadata",key:o},[t]).then((function(t){var i,n=-1;if(""!==e){n=e.length+1;var o=t[e];(i=r[e])._bits|=o._bits,delete t[e]}var a=Object.keys(t);a.sort((function(e,t){return e.length-t.length}));for(var s=a.length,l=0;l<s;++l){var u=a[l];if(null!==t[u]){var c=e$V.clone(t[u]),h=u.length;if(h===n)c.setParent(i);else if(h>1){var d=r[u.substring(0,u.length-1)];c.setParent(d)}r[u]=c}else r[u]=null}}))}))}},c$F.prototype.populateSubtree=function(e,t,i,n){return P$D(this,c$F.tileXYToQuadKey(e,t,i),n)},c$F.prototype.getTileInformation=function(e,t,i){var n=c$F.tileXYToQuadKey(e,t,i);return this._tileInfo[n]},c$F.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]},Object.defineProperties(T$G.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var te$q=new i$V("createVerticesFromGoogleEarthEnterpriseBuffer"),F$J=new h$18,z$F=new h$18;T$G.prototype.createMesh=function(e,t,i,n,r){o$1q.typeOf.object("tilingScheme",e),o$1q.typeOf.number("x",t),o$1q.typeOf.number("y",i),o$1q.typeOf.number("level",n);var o=e.ellipsoid;e.tileXYToNativeRectangle(t,i,n,F$J),e.tileXYToRectangle(t,i,n,z$F),r=u$_(r,1);var a=o.cartographicToCartesian(h$18.center(z$F)),s=40075.16/(1<<n);this._skirtHeight=Math.min(8*s,1e3);var l=te$q.scheduleTask({buffer:this._buffer,nativeRectangle:F$J,rectangle:z$F,relativeToCenter:a,ellipsoid:o,skirtHeight:this._skirtHeight,exaggeration:r,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(e$2b(l)){var u=this;return l.then((function(e){return u._mesh=new T$K(a,new Float32Array(e.vertices),new Uint16Array(e.indices),e.indexCountWithoutSkirts,e.vertexCountWithoutSkirts,e.minimumHeight,e.maximumHeight,i$1c.clone(e.boundingSphere3D),o$1p.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,y$Z.clone(e.orientedBoundingBox),h$L.clone(e.encoding),r,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast),u._minimumHeight=e.minimumHeight,u._maximumHeight=e.maximumHeight,u._buffer=void 0,u._mesh}))}},T$G.prototype.interpolateHeight=function(e,t,i){var n=e$2a.clamp((t-e.west)/e.width,0,1),r=e$2a.clamp((i-e.south)/e.height,0,1);return e$2b(this._mesh)?oe$l(this,n,r):de$j(this,n,r,e)};var ie$q=new i$V("upsampleQuantizedTerrainMesh");T$G.prototype.upsample=function(e,t,i,n,r,o,a){if(o$1q.typeOf.object("tilingScheme",e),o$1q.typeOf.number("thisX",t),o$1q.typeOf.number("thisY",i),o$1q.typeOf.number("thisLevel",n),o$1q.typeOf.number("descendantX",r),o$1q.typeOf.number("descendantY",o),o$1q.typeOf.number("descendantLevel",a),a-n>1)throw new t$16("Upsampling through more than one level at a time is not currently supported.");var s=this._mesh;if(e$2b(this._mesh)){var l=2*t!==r,u=2*i===o,c=e.ellipsoid,h=e.tileXYToRectangle(r,o,a),d=ie$q.scheduleTask({vertices:s.vertices,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:l,isNorthChild:u,childRectangle:h,ellipsoid:c,exaggeration:s.exaggeration});if(e$2b(d)){var f=this;return d.then((function(e){var t=new Uint16Array(e.vertices),i=ce$x.createTypedArray(t.length/3,e.indices),n=f._skirtHeight;return new p$O({quantizedVertices:t,indices:i,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:i$1c.clone(e.boundingSphere),orientedBoundingBox:y$Z.clone(e.orientedBoundingBox),horizonOcclusionPoint:o$1p.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:n,southSkirtHeight:n,eastSkirtHeight:n,northSkirtHeight:n,childTileMask:0,createdByUpsampling:!0,credits:f._credits})}))}}},T$G.prototype.isChildAvailable=function(e,t,i,n){o$1q.typeOf.number("thisX",e),o$1q.typeOf.number("thisY",t),o$1q.typeOf.number("childX",i),o$1q.typeOf.number("childY",n);var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},T$G.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var re$u=new o$1o,ne$v=new o$1o,ae$n=new o$1o,Y$u=new o$1p;function oe$l(e,t,i){for(var n=e._mesh,r=n.vertices,o=n.encoding,a=n.indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=o.decodeTextureCoordinates(r,u,re$u),f=o.decodeTextureCoordinates(r,c,ne$v),p=o.decodeTextureCoordinates(r,h,ae$n),_=d$10.computeBarycentricCoordinates(t,i,d.x,d.y,f.x,f.y,p.x,p.y,Y$u);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){var m=o.decodeHeight(r,u),g=o.decodeHeight(r,c),x=o.decodeHeight(r,h);return _.x*m+_.y*g+_.z*x}}}var se$l=Uint16Array.BYTES_PER_ELEMENT,L$P=Uint32Array.BYTES_PER_ELEMENT,P$C=Int32Array.BYTES_PER_ELEMENT,he$h=Float32Array.BYTES_PER_ELEMENT,U$G=Float64Array.BYTES_PER_ELEMENT;function de$j(e,t,i,n){var r=e._buffer,o=0,a=0,s=0;i>.5?(t>.5?(o=2,a=.5):o=3,s=.5):t>.5&&(o=1,a=.5);for(var l=new DataView(r),u=0,c=0;c<o;++c)u+=l.getUint32(u,!0),u+=L$P;u+=L$P,u+=2*U$G;var h=e$2a.toRadians(180*l.getFloat64(u,!0));u+=U$G;var d=e$2a.toRadians(180*l.getFloat64(u,!0));u+=U$G;var f=n.width/h/2,p=n.height/d/2,_=l.getInt32(u,!0);u+=P$C;var m=3*l.getInt32(u,!0);u+=P$C,u+=P$C;var g,x=new Array(_),v=new Array(_),y=new Array(_);for(g=0;g<_;++g)x[g]=a+l.getUint8(u++)*f,v[g]=s+l.getUint8(u++)*p,y[g]=6371010*l.getFloat32(u,!0),u+=he$h;var $=new Array(m);for(g=0;g<m;++g)$[g]=l.getUint16(u,!0),u+=se$l;for(g=0;g<m;g+=3){var b=$[g],T=$[g+1],C=$[g+2],S=x[b],w=x[T],E=x[C],P=v[b],A=v[T],L=v[C],M=d$10.computeBarycentricCoordinates(t,i,S,P,w,A,E,L,Y$u);if(M.x>=-1e-15&&M.y>=-1e-15&&M.z>=-1e-15)return M.x*y[b]+M.y*y[T]+M.z*y[C]}}var d$X={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},S$E=new a$15;function I$O(){this._terrainCache={},this._lastTidy=a$15.now()}function _$B(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url)&&!e$2b(e.metadata))throw new t$16("options.url or options.metadata is required.");var t;if(e$2b(e.metadata))t=e.metadata;else{var i=t$11.createIfNeeded(e.url);t=new c$F(i)}this._metadata=t,this._tilingScheme=new g$13({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new h$18(-e$2a.PI,-e$2a.PI,e$2a.PI,e$2a.PI),ellipsoid:e.ellipsoid});var n=e.credit;"string"==typeof n&&(n=new r$T(n)),this._credit=n,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new I$O,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new o$1h,this._ready=!1;var r,o=this;this._readyPromise=t.readyPromise.then((function(e){if(!t.terrainPresent){var i=new t$14("The server "+t.url+" doesn't have terrain");return r=l$W.handleError(r,o,o._errorEvent,i.message,void 0,void 0,void 0,i),o$1l.reject(i)}return l$W.handleSuccess(r),o._ready=e,e})).otherwise((function(e){return r=l$W.handleError(r,o,o._errorEvent,e.message,void 0,void 0,void 0,e),o$1l.reject(e)}))}I$O.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:a$15.now()}},I$O.prototype.get=function(e){var t=this._terrainCache[e];if(e$2b(t))return delete this._terrainCache[e],t.buffer},I$O.prototype.tidy=function(){if(a$15.now(S$E),a$15.secondsDifference(S$E,this._lastTidy)>10){for(var e=this._terrainCache,t=Object.keys(e),i=t.length,n=0;n<i;++n){var r=t[n],o=e[r];a$15.secondsDifference(S$E,o.timestamp)>10&&delete e[r]}a$15.clone(S$E,this._lastTidy)}},Object.defineProperties(_$B.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var z$E=new i$V("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY);function G$L(e,t,i){var n=t.getChildBitmask();if(t.terrainState===d$X.PARENT){n=0;for(var r=0;r<4;++r){var o=i.getTileInformationFromQuadKey(e+r.toString());e$2b(o)&&o.hasTerrain()&&(n|=1<<r)}}return n}function $$E(e,t,i,n){return i=e$2b(i)&&i>0?i:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1c-0"+t+"-t."+i.toString(),request:n})}_$B.prototype.requestTileGeometry=function(e,t,i,n){if(!this._ready)throw new t$16("requestTileGeometry must not be called before the terrain provider is ready.");var r=c$F.tileXYToQuadKey(e,t,i),o=this._terrainCache,a=this._metadata,s=a.getTileInformationFromQuadKey(r);if(!e$2b(s))return o$1l.reject(new t$14("Terrain tile doesn't exist"));var l=s.terrainState;e$2b(l)||(l=s.terrainState=d$X.UNKNOWN);var u=o.get(r);if(e$2b(u)){var c=a.providers[s.terrainProvider];return o$1l.resolve(new T$G({buffer:u,childTileMask:G$L(r,s,a),credits:e$2b(c)?[c]:void 0,negativeAltitudeExponentBias:a.negativeAltitudeExponentBias,negativeElevationThreshold:a.negativeAltitudeThreshold}))}if(o.tidy(),!s.ancestorHasTerrain)return o$1l.resolve(new T$J({buffer:new Uint8Array(256),width:16,height:16}));if(l===d$X.NONE)return o$1l.reject(new t$14("Terrain tile doesn't exist"));var h,d=r,f=-1;switch(l){case d$X.SELF:f=s.terrainVersion;break;case d$X.PARENT:d=d.substring(0,d.length-1),f=(h=a.getTileInformationFromQuadKey(d)).terrainVersion;break;case d$X.UNKNOWN:s.hasTerrain()?f=s.terrainVersion:(d=d.substring(0,d.length-1),e$2b(h=a.getTileInformationFromQuadKey(d))&&h.hasTerrain()&&(f=h.terrainVersion))}if(f<0)return o$1l.reject(new t$14("Terrain tile doesn't exist"));var p,_,m=this._terrainPromises,g=this._terrainRequests;if(e$2b(m[d]))p=m[d],_=g[d];else{var x=$$E(this,d,f,_=n).fetchArrayBuffer();if(!e$2b(x))return;p=x.then((function(e){return e$2b(e)?z$E.scheduleTask({buffer:e,type:"Terrain",key:a.key},[e]).then((function(e){var t=a.getTileInformationFromQuadKey(d);t.terrainState=d$X.SELF,o.add(d,e[0]);for(var i=t.terrainProvider,n=e.length-1,r=0;r<n;++r){var s=d+r.toString(),l=a.getTileInformationFromQuadKey(s);e$2b(l)&&(o.add(s,e[r+1]),l.terrainState=d$X.PARENT,0===l.terrainProvider&&(l.terrainProvider=i))}})):o$1l.reject(new t$14("Failed to load terrain."))})),m[d]=p,g[d]=_,p=p.always((function(){delete m[d],delete g[d]}))}return p.then((function(){var e=o.get(r);if(e$2b(e)){var t=a.providers[s.terrainProvider];return new T$G({buffer:e,childTileMask:G$L(r,s,a),credits:e$2b(t)?[t]:void 0,negativeAltitudeExponentBias:a.negativeAltitudeExponentBias,negativeElevationThreshold:a.negativeAltitudeThreshold})}return o$1l.reject(new t$14("Failed to load terrain."))})).otherwise((function(e){return _.state===W$1c.CANCELLED?(n.state=_.state,o$1l.reject(e)):(s.terrainState=d$X.NONE,o$1l.reject(e))}))},_$B.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},_$B.prototype.getTileDataAvailable=function(e,t,i){var n=this._metadata,r=c$F.tileXYToQuadKey(e,t,i),o=n.getTileInformation(e,t,i);if(null===o)return!1;if(e$2b(o)){if(!o.ancestorHasTerrain)return!0;var a=o.terrainState;if(a===d$X.NONE)return!1;if(!(e$2b(a)&&a!==d$X.UNKNOWN||(o.terrainState=d$X.UNKNOWN,o.hasTerrain()))){r=r.substring(0,r.length-1);var s=n.getTileInformationFromQuadKey(r);if(!e$2b(s)||!s.hasTerrain())return!1}return!0}if(n.isValid(r)){var l=new r$1b({throttle:!0,throttleByServer:!0,type:V$15.TERRAIN});n.populateSubtree(e,t,i,l)}return!1},_$B.prototype.loadTileDataAvailability=function(e,t,i){};var K$D=e$2a.factorial;function k$A(e,t,i,n,r,o){var a,s,l,u=0;if(n>0){for(s=0;s<r;s++){for(a=!1,l=0;l<o.length&&!a;l++)s===o[l]&&(a=!0);a||(o.push(s),u+=k$A(e,t,i,n-1,r,o),o.splice(o.length-1,1))}return u}for(u=1,s=0;s<r;s++){for(a=!1,l=0;l<o.length&&!a;l++)s===o[l]&&(a=!0);a||(u*=e-i[t[s]])}return u}var E$I={type:"Hermite",getRequiredDataPoints:function(e,t){if(t=u$_(t,0),!e$2b(e))throw new t$16("degree is required.");if(e<0)throw new t$16("degree must be 0 or greater.");if(t<0)throw new t$16("inputOrder must be 0 or greater.");return Math.max(Math.floor((e+1)/(t+1)),2)},interpolateOrderZero:function(e,t,i,n,r){e$2b(r)||(r=new Array(n));var o,a,s,l,u,c=t.length,h=new Array(n);for(o=0;o<n;o++){r[o]=0;var d=new Array(c);for(h[o]=d,a=0;a<c;a++)d[a]=[]}var f=c,p=new Array(f);for(o=0;o<f;o++)p[o]=o;var _=c-1;for(l=0;l<n;l++){for(a=0;a<f;a++)u=p[a]*n+l,h[l][0].push(i[u]);for(o=1;o<f;o++){var m=!1;for(a=0;a<f-o;a++){var g,x=t[p[a]],v=t[p[a+o]];v-x<=0?(g=i[u=p[a]*n+n*o+l],h[l][o].push(g/K$D(o))):(g=h[l][o-1][a+1]-h[l][o-1][a],h[l][o].push(g/(v-x))),m=m||0!==g}m||(_=o-1)}}for(s=0,0;s<=0;s++)for(o=s;o<=_;o++){var y=k$A(e,p,t,s,o,[]);for(l=0;l<n;l++){var $=h[l][o][0];r[l+s*n]+=$*y}}return r}},Q$E=[];function U$F(e,t,i,n,r,o){for(var a,s,l=-1,u=t.length,c=u*(u+1)/2,h=0;h<r;h++){var d=Math.floor(h*c);for(a=0;a<u;a++)s=t[a]*r*(o+1)+h,e[d+a]=n[s];for(var f=1;f<u;f++){var p=0,_=Math.floor(f*(1-f)/2)+u*f,m=!1;for(a=0;a<u-f;a++){var g,x,v=i[t[a]],y=i[t[a+f]];if(y-v<=0)x=(g=n[s=t[a]*r*(o+1)+r*f+h])/e$2a.factorial(f),e[d+_+p]=x,p++;else{var $=Math.floor((f-1)*(2-f)/2)+u*(f-1);x=(g=e[d+$+a+1]-e[d+$+a])/(y-v),e[d+_+p]=x,p++}m=m||0!==g}m&&(l=Math.max(l,f))}}return l}function o$I(e,t,i,n){this.rightAscension=e,this.declination=t,this.rotation=i,this.rotationRate=n}E$I.interpolate=function(e,t,i,n,r,o,a){var s=n*(o+1);e$2b(a)||(a=new Array(s));for(var l=0;l<s;l++)a[l]=0;var u,c=t.length,h=new Array(c*(r+1));for(u=0;u<c;u++)for(var d=0;d<r+1;d++)h[u*(r+1)+d]=u;for(var f=h.length,p=Q$E,_=U$F(p,h,t,i,n,r),m=[],g=f*(f+1)/2,x=Math.min(_,o),v=0;v<=x;v++)for(u=v;u<=_;u++){m.length=0;for(var y=k$A(e,h,t,v,u,m),$=Math.floor(u*(1-u)/2)+f*u,b=0;b<n;b++){var T=p[Math.floor(b*g)+$];a[b+v*n]+=T*y}}return a};var y$F={},_0=32.184,h0$1=2451545,L$O=-.0529921,b$O=-.1059842,j$E=13.0120009,k$z=13.3407154,q$I=.9856003,z$D=26.4057084,B$D=13.064993,F$I=.3287146,H$I=1.7484877,K$C=-.1589763,Q$D=.0036096,V$v=.1643573,W$I=12.9590088,s$D=new a$15;function h$I(e){(!e$2b(e)||"function"!=typeof e)&&(e=y$F.ComputeMoon),this._computeFunction=e}y$F.ComputeMoon=function(e,t){e$2b(e)||(e=a$15.now()),s$D=a$15.addSeconds(e,_0,s$D);var i=a$15.totalDays(s$D)-h0$1,n=i/h$17.DAYS_PER_JULIAN_CENTURY,r=(125.045+L$O*i)*e$2a.RADIANS_PER_DEGREE,o=(250.089+b$O*i)*e$2a.RADIANS_PER_DEGREE,a=(260.008+j$E*i)*e$2a.RADIANS_PER_DEGREE,s=(176.625+k$z*i)*e$2a.RADIANS_PER_DEGREE,l=(357.529+q$I*i)*e$2a.RADIANS_PER_DEGREE,u=(311.589+z$D*i)*e$2a.RADIANS_PER_DEGREE,c=(134.963+B$D*i)*e$2a.RADIANS_PER_DEGREE,h=(276.617+F$I*i)*e$2a.RADIANS_PER_DEGREE,d=(34.226+H$I*i)*e$2a.RADIANS_PER_DEGREE,f=(15.134+K$C*i)*e$2a.RADIANS_PER_DEGREE,p=(119.743+Q$D*i)*e$2a.RADIANS_PER_DEGREE,_=(239.961+V$v*i)*e$2a.RADIANS_PER_DEGREE,m=(25.053+W$I*i)*e$2a.RADIANS_PER_DEGREE,g=Math.sin(r),x=Math.sin(o),v=Math.sin(a),y=Math.sin(s),$=Math.sin(l),b=Math.sin(u),T=Math.sin(c),C=Math.sin(h),S=Math.sin(d),w=Math.sin(f),E=Math.sin(p),P=Math.sin(_),A=Math.sin(m),L=Math.cos(r),M=Math.cos(o),R=Math.cos(a),O=Math.cos(s),I=Math.cos(l),D=Math.cos(u),B=Math.cos(c),N=Math.cos(h),F=Math.cos(d),U=Math.cos(f),G=Math.cos(p),z=Math.cos(_),V=Math.cos(m),k=(269.9949+.0031*n-3.8787*g-.1204*x+.07*v-.0172*y+.0072*b-.0052*w+.0043*A)*e$2a.RADIANS_PER_DEGREE,W=(66.5392+.013*n+1.5419*L+.0239*M-.0278*R+.0068*O-.0029*D+9e-4*B+8e-4*U-9e-4*V)*e$2a.RADIANS_PER_DEGREE,H=(38.3213+13.17635815*i-14e-13*i*i+3.561*g+.1208*x-.0642*v+.0158*y+.0252*$-.0066*b-.0047*T-.0046*C+.0028*S+.0052*w+.004*E+.0019*P-.0044*A)*e$2a.RADIANS_PER_DEGREE,q=(13.17635815-2*i*14e-13+3.561*L*L$O+.1208*M*b$O-.0642*R*j$E+.0158*O*k$z+.0252*I*q$I-.0066*D*z$D-.0047*B*B$D-.0046*N*F$I+.0028*F*H$I+.0052*U*K$C+.004*G*Q$D+.0019*z*V$v-.0044*V*W$I)/86400*e$2a.RADIANS_PER_DEGREE;return e$2b(t)||(t=new o$I),t.rightAscension=k,t.declination=W,t.rotation=H,t.rotationRate=q,t};var y$E=new o$1p,A$N=new o$1p,w$D=new o$1p;function z$C(e,t,i){var n=y$E;n.x=Math.cos(e+e$2a.PI_OVER_TWO),n.y=Math.sin(e+e$2a.PI_OVER_TWO),n.z=0;var r=Math.cos(t),o=w$D;o.x=r*Math.cos(e),o.y=r*Math.sin(e),o.z=Math.sin(t);var a=o$1p.cross(o,n,A$N);return e$2b(i)||(i=new p$1e),i[0]=n.x,i[1]=a.x,i[2]=o.x,i[3]=n.y,i[4]=a.y,i[5]=o.y,i[6]=n.z,i[7]=a.z,i[8]=o.z,i}var u$G=new p$1e,_$A=new n$13;h$I.prototype.evaluate=function(e,t){e$2b(e)||(e=a$15.now());var i=this._computeFunction(e),n=z$C(i.rightAscension,i.declination,t),r=e$2a.zeroToTwoPi(i.rotation),o=n$13.fromAxisAngle(o$1p.UNIT_Z,r,_$A),a=p$1e.fromQuaternion(n$13.conjugate(o,o),u$G);return p$1e.multiply(a,n,n)};var r$L={};function i$J(e){o$1q.defined("url",e),this._url=t$11.createIfNeeded(e),this._url.appendForwardSlash()}function s$C(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.typeOf.object("options.scene",e.scene);var t=u$_(e.accessToken,e$Y.defaultAccessToken),i=t$11.createIfNeeded(u$_(e.server,e$Y.defaultServer));i.appendForwardSlash();var n=e$Y.getDefaultTokenCredit(t);e$2b(n)&&e.scene.frameState.creditDisplay.addDefaultCredit(r$T.clone(n));var r=i.getDerivedResource({url:"v1/geocode"});e$2b(t)&&r.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=i,this._pelias=new i$J(r)}function d$W(e){e=u$_(e,u$_.EMPTY_OBJECT),this.start=e$2b(e.start)?a$15.clone(e.start):new a$15,this.stop=e$2b(e.stop)?a$15.clone(e.stop):new a$15,this.data=e.data,this.isStartIncluded=u$_(e.isStartIncluded,!0),this.isStopIncluded=u$_(e.isStopIncluded,!0)}r$L.type=void 0,r$L.getRequiredDataPoints=t$16.throwInstantiationError,r$L.interpolateOrderZero=t$16.throwInstantiationError,r$L.interpolate=t$16.throwInstantiationError,Object.defineProperties(i$J.prototype,{url:{get:function(){return this._url}}}),i$J.prototype.geocode=function(e,t){return o$1q.typeOf.string("query",e),this._url.getDerivedResource({url:t===c$G.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then((function(e){return e.features.map((function(e){var t,i=e.bbox;if(e$2b(i))t=h$18.fromDegrees(i[0],i[1],i[2],i[3]);else{var n=e.geometry.coordinates[0],r=e.geometry.coordinates[1];t=o$1p.fromDegrees(n,r)}return{displayName:e.properties.label,destination:t}}))}))},s$C.prototype.geocode=function(e,t){return this._pelias.geocode(e,t)},Object.defineProperties(d$W.prototype,{isEmpty:{get:function(){var e=a$15.compare(this.stop,this.start);return e<0||0===e&&(!this.isStartIncluded||!this.isStopIncluded)}}});var I$N={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};d$W.fromIso8601=function(e,t){o$1q.typeOf.object("options",e),o$1q.typeOf.string("options.iso8601",e.iso8601);var i=e.iso8601.split("/");if(2!==i.length)throw new t$16("options.iso8601 is an invalid ISO 8601 interval.");var n=a$15.fromIso8601(i[0]),r=a$15.fromIso8601(i[1]),o=u$_(e.isStartIncluded,!0),a=u$_(e.isStopIncluded,!0),s=e.data;return e$2b(t)?(t.start=n,t.stop=r,t.isStartIncluded=o,t.isStopIncluded=a,t.data=s,t):(I$N.start=n,I$N.stop=r,I$N.isStartIncluded=o,I$N.isStopIncluded=a,I$N.data=s,new d$W(I$N))},d$W.toIso8601=function(e,t){return o$1q.typeOf.object("timeInterval",e),a$15.toIso8601(e.start,t)+"/"+a$15.toIso8601(e.stop,t)},d$W.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new d$W(e)},d$W.equals=function(e,t,i){return e===t||e$2b(e)&&e$2b(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&a$15.equals(e.start,t.start)&&a$15.equals(e.stop,t.stop)&&(e.data===t.data||e$2b(i)&&i(e.data,t.data)))},d$W.equalsEpsilon=function(e,t,i,n){return o$1q.typeOf.number("epsilon",i),e===t||e$2b(e)&&e$2b(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&a$15.equalsEpsilon(e.start,t.start,i)&&a$15.equalsEpsilon(e.stop,t.stop,i)&&(e.data===t.data||e$2b(n)&&n(e.data,t.data)))},d$W.intersect=function(e,t,i,n){if(o$1q.typeOf.object("left",e),o$1q.typeOf.object("result",i),!e$2b(t))return d$W.clone(d$W.EMPTY,i);var r=e.start,o=e.stop,a=t.start,s=t.stop,l=a$15.greaterThanOrEquals(a,r)&&a$15.greaterThanOrEquals(o,a),u=!l&&a$15.lessThanOrEquals(a,r)&&a$15.lessThanOrEquals(r,s);if(!l&&!u)return d$W.clone(d$W.EMPTY,i);var c=e.isStartIncluded,h=e.isStopIncluded,d=t.isStartIncluded,f=t.isStopIncluded,p=a$15.lessThan(o,s);return i.start=l?a:r,i.isStartIncluded=c&&d||!a$15.equals(a,r)&&(l&&d||u&&c),i.stop=p?o:s,i.isStopIncluded=p?h:h&&f||!a$15.equals(s,o)&&f,i.data=e$2b(n)?n(e.data,t.data):e.data,i},d$W.contains=function(e,t){if(o$1q.typeOf.object("timeInterval",e),o$1q.typeOf.object("julianDate",t),e.isEmpty)return!1;var i=a$15.compare(e.start,t);if(0===i)return e.isStartIncluded;var n=a$15.compare(t,e.stop);return 0===n?e.isStopIncluded:i<0&&n<0},d$W.prototype.clone=function(e){return d$W.clone(this,e)},d$W.prototype.equals=function(e,t){return d$W.equals(this,e,t)},d$W.prototype.equalsEpsilon=function(e,t,i){return d$W.equalsEpsilon(this,e,t,i)},d$W.prototype.toString=function(){return d$W.toIso8601(this)},d$W.EMPTY=Object.freeze(new d$W({start:new a$15,stop:new a$15,isStartIncluded:!1,isStopIncluded:!1}));var M$I=Object.freeze(a$15.fromIso8601("0000-01-01T00:00:00Z")),r$K=Object.freeze(a$15.fromIso8601("9999-12-31T24:00:00Z")),t$z=Object.freeze(new d$W({start:M$I,stop:r$K})),o$H={MINIMUM_VALUE:M$I,MAXIMUM_VALUE:r$K,MAXIMUM_INTERVAL:t$z},e$U={SHIFT:0,CTRL:1,ALT:2},Aa$1=Object.freeze(e$U),i$I={type:"Lagrange",getRequiredDataPoints:function(e){return Math.max(e+1,2)},interpolateOrderZero:function(e,t,i,n,r){e$2b(r)||(r=new Array(n));var o,a,s=t.length;for(o=0;o<n;o++)r[o]=0;for(o=0;o<s;o++){var l=1;for(a=0;a<s;a++)if(a!==o){var u=t[o]-t[a];l*=(e-t[a])/u}for(a=0;a<n;a++)r[a]+=l*i[o*n+a]}return r}},v$A={type:"Linear"};function l$O(e,t,i){return p$_({url:e,responseType:"blob",headers:t,request:i})}v$A.getRequiredDataPoints=function(e){return 2},v$A.interpolateOrderZero=function(e,t,i,n,r){if(2!==t.length)throw new t$16("The xTable provided to the linear interpolator must have exactly two elements.");if(n<=0)throw new t$16("There must be at least 1 dependent variable for each independent variable.");e$2b(r)||(r=new Array(n));var o,a,s,l=t[0],u=t[1];if(l===u)throw new t$16("Divide by zero error: xTable[0] and xTable[1] are equal");for(o=0;o<n;o++)a=i[o],s=i[o+n],r[o]=((s-a)*e+u*a-l*s)/(u-l);return r};var p$J=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch{return!1}}();function c$E(e,t){if(!p$J||e$23(e))return t$T(e,void 0,t);var i=l$O(e,void 0,t);return e$2b(i)?i.then((function(e){var t=window.URL.createObjectURL(e);return t$T(t,!1).then((function(i){return i.blob=e,window.URL.revokeObjectURL(t),i}),(function(e){return window.URL.revokeObjectURL(t),o$1l.reject(e)}))})):void 0}function d$V(e,t,i){if(!e$2b(e))throw new t$16("url is required.");var n;t=u$_(t,u$_.EMPTY_OBJECT);do{n="loadJsonp"+Math.random().toString().substring(2,8)}while(e$2b(window[n]));var r=new h$16(e),o=m$1a(u$_(r.query,""));e$2b(t.parameters)&&(o=p$19(t.parameters,o)),o[u$_(t.callbackParameterName,"callback")]=n,r.query=m$1b(o),e=r.toString();var a=t.proxy;return e$2b(a)&&(e=a.getURL(e)),(i=e$2b(i)?i:new r$1b).url=e,i.requestFunction=function(){var t=o$1l.defer();return window[n]=function(e){t.resolve(e);try{delete window[n]}catch{window[n]=void 0}},d$V.loadAndExecuteScript(e,n,t),t.promise},r$1a.request(i)}d$V.loadAndExecuteScript=function(e,t,i){var n=document.createElement("script");n.async=!0,n.src=e;var r=document.getElementsByTagName("head")[0];n.onload=function(){n.onload=void 0,r.removeChild(n)},n.onerror=function(e){i.reject(e)},r.appendChild(n)},d$V.defaultLoadAndExecuteScript=d$V.loadAndExecuteScript;var e$T={defaultAccessToken:void 0},n$w=!1,o$G,a$D="<b>This application is using SuperMap3D's default Mapbox access token. Please create a new access token for the application as soon as possible and prior to deployment , and provide your token to SuperMap3D by setting the SuperMap3D.MapboxApi.defaultAccessToken property before constructing the Widget or any other object that uses the Mapbox API.</b>";function r$J(){t$16.throwInstantiationError()}e$T.getAccessToken=function(e){return e$2b(e)?e:e$2b(e$T.defaultAccessToken)?e$T.defaultAccessToken:(n$w||(console.log(a$D),n$w=!0),"pk.eyJ1IjoiYW5hbHl0aWNhbGdyYXBoaWNzIiwiYSI6ImNpd204Zm4wejAwNzYyeW5uNjYyZmFwdWEifQ.7i-VIZZWX8pd1bTfxIVj9g")},e$T.getErrorCredit=function(e){if(!e$2b(e)&&!e$2b(e$T.defaultAccessToken))return e$2b(o$G)||(o$G=new r$T(a$D,!0)),o$G},Object.defineProperties(r$J.prototype,{ellipsoid:{get:t$16.throwInstantiationError}}),r$J.prototype.project=t$16.throwInstantiationError,r$J.prototype.unproject=t$16.throwInstantiationError;var l$N=[],c$D=[];function M$H(e,t,i,n,r,o){var a,s,l=r-n+1,u=o-r,c=l$N,h=c$D;for(a=0;a<l;++a)c[a]=e[n+a];for(s=0;s<u;++s)h[s]=e[r+s+1];a=0,s=0;for(var d=n;d<=o;++d){var f=c[a],p=h[s];a<l&&(s>=u||t(f,p,i)<=0)?(e[d]=f,++a):s<u&&(e[d]=p,++s)}}function u$F(e,t,i,n,r){if(!(n>=r)){var o=Math.floor(.5*(n+r));u$F(e,t,i,n,o),u$F(e,t,i,o+1,r),M$H(e,t,i,n,o,r)}}function m$H(e,t,i){if(!e$2b(e))throw new t$16("array is required.");if(!e$2b(t))throw new t$16("comparator is required.");var n=e.length,r=Math.ceil(.5*n);l$N.length=r,c$D.length=r,u$F(e,t,i,0,n-1),l$N.length=0,c$D.length=0}function d$U(e,t){if(!e$2b(e))throw new t$16("occluderBoundingSphere is required.");if(!e$2b(t))throw new t$16("camera position is required.");this._occluderPosition=o$1p.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var m$G=new o$1p;Object.defineProperties(d$U.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){if(!e$2b(e))throw new t$16("cameraPosition is required.");e=o$1p.clone(e,this._cameraPosition);var t,i,n,r=o$1p.subtract(this._occluderPosition,e,m$G),o=o$1p.magnitudeSquared(r),a=this._occluderRadius*this._occluderRadius;if(o>a){t=Math.sqrt(o-a),o=1/Math.sqrt(o),i=o$1p.multiplyByScalar(r,o,m$G);var s=t*t*o;n=o$1p.add(e,o$1p.multiplyByScalar(i,s,m$G),m$G)}else t=Number.MAX_VALUE;this._horizonDistance=t,this._horizonPlaneNormal=i,this._horizonPlanePosition=n,this._cameraPosition=e}}}),d$U.fromBoundingSphere=function(e,t,i){if(!e$2b(e))throw new t$16("occluderBoundingSphere is required.");if(!e$2b(t))throw new t$16("camera position is required.");return e$2b(i)?(o$1p.clone(e.center,i._occluderPosition),i._occluderRadius=e.radius,i.cameraPosition=t,i):new d$U(e,t)};var L$N=new o$1p;d$U.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){var t=o$1p.subtract(e,this._occluderPosition,L$N),i=this._occluderRadius;if((i=o$1p.magnitudeSquared(t)-i*i)>0)return i=Math.sqrt(i)+this._horizonDistance,t=o$1p.subtract(e,this._cameraPosition,t),i*i>o$1p.magnitudeSquared(t)}return!1};var X$z=new o$1p;d$U.prototype.isBoundingSphereVisible=function(e){var t=o$1p.clone(e.center,X$z),i=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){var n=o$1p.subtract(t,this._occluderPosition,L$N),r=this._occluderRadius-i;if(r=o$1p.magnitudeSquared(n)-r*r,i<this._occluderRadius)return r>0&&(r=Math.sqrt(r)+this._horizonDistance,n=o$1p.subtract(t,this._cameraPosition,n),r*r+i*i>o$1p.magnitudeSquared(n));if(r>0){n=o$1p.subtract(t,this._cameraPosition,n);var o=o$1p.magnitudeSquared(n),a=this._occluderRadius*this._occluderRadius,s=i*i;return(this._horizonDistance*this._horizonDistance+a)*s>o*a||(r=Math.sqrt(r)+this._horizonDistance)*r+s>o}return!0}return!1};var j$D=new o$1p;d$U.prototype.computeVisibility=function(e){if(!e$2b(e))throw new t$16("occludeeBS is required.");var t=o$1p.clone(e.center),i=e.radius;if(i>this._occluderRadius)return fe$n.FULL;if(this._horizonDistance!==Number.MAX_VALUE){var n=o$1p.subtract(t,this._occluderPosition,j$D),r=this._occluderRadius-i,o=o$1p.magnitudeSquared(n);if((r=o-r*r)>0){r=Math.sqrt(r)+this._horizonDistance,n=o$1p.subtract(t,this._cameraPosition,n);var a=o$1p.magnitudeSquared(n);return r*r+i*i<a?fe$n.NONE:(r=o-(r=this._occluderRadius+i)*r)>0?a<(r=Math.sqrt(r)+this._horizonDistance)*r+i*i?fe$n.FULL:fe$n.PARTIAL:(n=o$1p.subtract(t,this._horizonPlanePosition,n),o$1p.dot(n,this._horizonPlaneNormal)>-i?fe$n.PARTIAL:fe$n.FULL)}}return fe$n.NONE};var b$N=new o$1p;d$U.computeOccludeePoint=function(e,t,i){if(!e$2b(e))throw new t$16("occluderBoundingSphere is required.");if(!e$2b(i))throw new t$16("positions is required.");if(0===i.length)throw new t$16("positions must contain at least one element");var n=o$1p.clone(t),r=o$1p.clone(e.center),o=e.radius,a=i.length;if(o$1p.equals(r,t))throw new t$16("occludeePosition must be different than occluderBoundingSphere.center");var s=o$1p.normalize(o$1p.subtract(n,r,b$N),b$N),l=-o$1p.dot(s,r),u=d$U._anyRotationVector(r,s,l),c=d$U._horizonToPlaneNormalDotProduct(e,s,l,u,i[0]);if(c){for(var h,d=1;d<a;++d){if(!(h=d$U._horizonToPlaneNormalDotProduct(e,s,l,u,i[d])))return;h<c&&(c=h)}if(!(c<.0017453283658983088)){var f=o/c;return o$1p.add(r,o$1p.multiplyByScalar(s,f,b$N),b$N)}}};var B$C=[];d$U.computeOccludeePointFromRectangle=function(e,t){if(!e$2b(e))throw new t$16("rectangle is required.");t=u$_(t,t$13.WGS84);var i=h$18.subsample(e,t,0,B$C),n=i$1c.fromPoints(i),r=o$1p.ZERO;if(!o$1p.equals(r,n.center))return d$U.computeOccludeePoint(new i$1c(r,t.minimumRadius),n.center,i)};var Z$C=new o$1p;d$U._anyRotationVector=function(e,t,i){var n=o$1p.abs(t,Z$C),r=n.x>n.y?0:1;(0===r&&n.z>n.x||1===r&&n.z>n.y)&&(r=2);var o,a=new o$1p;0===r?(n.x=e.x,n.y=e.y+1,n.z=e.z+1,o=o$1p.UNIT_X):1===r?(n.x=e.x+1,n.y=e.y,n.z=e.z+1,o=o$1p.UNIT_Y):(n.x=e.x+1,n.y=e.y+1,n.z=e.z,o=o$1p.UNIT_Z);var s=(o$1p.dot(t,n)+i)/-o$1p.dot(t,o);return o$1p.normalize(o$1p.subtract(o$1p.add(n,o$1p.multiplyByScalar(o,s,a),n),e,n),n)};var G$K=new o$1p;d$U._rotationVector=function(e,t,i,n,r){var o=o$1p.subtract(n,e,G$K);if(o=o$1p.normalize(o,o),o$1p.dot(t,o)<.9999999847691291){var a=o$1p.cross(t,o,o);if(o$1p.magnitude(a)>e$2a.EPSILON13)return o$1p.normalize(a,new o$1p)}return r};var S$D=new o$1p,W$H=new o$1p,q$H=new o$1p,T$F=new o$1p;function s$B(e,t,i){o$1q.defined("url",e),o$1q.defined("apiKey",t),e$2b(i)&&o$1q.typeOf.object("params",i),(e=t$11.createIfNeeded(e)).appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=u$_(i,{})}d$U._horizonToPlaneNormalDotProduct=function(e,t,i,n,r){var o=o$1p.clone(r,S$D),a=o$1p.clone(e.center,W$H),s=e.radius,l=o$1p.subtract(a,o,q$H),u=o$1p.magnitudeSquared(l),c=s*s;if(u<c)return!1;var h=u-c,d=Math.sqrt(h),f=d*(1/Math.sqrt(u))*d;l=o$1p.normalize(l,l);var p=o$1p.add(o,o$1p.multiplyByScalar(l,f,T$F),T$F),_=Math.sqrt(h-f*f),m=this._rotationVector(a,t,i,o,n),g=o$1p.fromElements(m.x*m.x*l.x+(m.x*m.y-m.z)*l.y+(m.x*m.z+m.y)*l.z,(m.x*m.y+m.z)*l.x+m.y*m.y*l.y+(m.y*m.z-m.x)*l.z,(m.x*m.z-m.y)*l.x+(m.y*m.z+m.x)*l.y+m.z*m.z*l.z,S$D);g=o$1p.normalize(g,g);var x=o$1p.multiplyByScalar(g,_,S$D);m=o$1p.normalize(o$1p.subtract(o$1p.add(p,x,q$H),a,q$H),q$H);var v=o$1p.dot(t,m);m=o$1p.normalize(o$1p.subtract(o$1p.subtract(p,x,m),a,m),m);var y=o$1p.dot(t,m);return v<y?v:y},Object.defineProperties(s$B.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}}),s$B.prototype.geocode=function(e){return o$1q.typeOf.string("query",e),this._url.getDerivedResource({url:"json",queryParameters:p$19(this._params,{q:e})}).fetchJson().then((function(e){return e.results.map((function(e){var t,i=e.bounds;if(e$2b(i))t=h$18.fromDegrees(i.southwest.lng,i.southwest.lat,i.northeast.lng,i.northeast.lat);else{var n=e.geometry.lat,r=e.geometry.lng;t=o$1p.fromDegrees(n,r)}return{displayName:e.formatted,destination:t}}))}))};var t$y={packedLength:void 0,pack:t$16.throwInstantiationError,unpack:t$16.throwInstantiationError},o$F={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:t$16.throwInstantiationError,unpackInterpolationResult:t$16.throwInstantiationError},e$S={BASECOLOR_UV_OFFSET_AND_TILING:0,EMISSIVE_UV_OFFSET_AND_TILING:1},ie$p=Object.freeze(e$S);function s$A(){this._cache={}}s$A.prototype.fromColor=function(e,t){if(!e$2b(e))throw new t$16("color is required");if(!e$2b(t))throw new t$16("size is required");return h$H(void 0,void 0,e,t,this._cache)},s$A.prototype.fromUrl=function(e,t,i){if(!e$2b(e))throw new t$16("url is required");if(!e$2b(t))throw new t$16("color is required");if(!e$2b(i))throw new t$16("size is required");return h$H(e,void 0,t,i,this._cache)},s$A.prototype.fromMakiIconId=function(e,t,i){if(!e$2b(e))throw new t$16("id is required");if(!e$2b(t))throw new t$16("color is required");if(!e$2b(i))throw new t$16("size is required");return h$H(n$15("Assets/Textures/maki/"+encodeURIComponent(e)+".png"),void 0,t,i,this._cache)},s$A.prototype.fromText=function(e,t,i){if(!e$2b(e))throw new t$16("text is required");if(!e$2b(t))throw new t$16("color is required");if(!e$2b(i))throw new t$16("size is required");return h$H(void 0,e,t,i,this._cache)};var q$G=new e$1U;function b$M(e,t,i){e.save(),e.scale(i/24,i/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,q$G).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function C$F(e,t,i){var n=i/2.5,r=n,o=n;t.width>t.height?o=n*(t.height/t.width):t.width<t.height&&(r=n*(t.width/t.height));var a=Math.round((i-r)/2),s=Math.round(7/24*i-o/2);e.globalCompositeOperation="destination-out",e.drawImage(t,a-1,s,r,o),e.drawImage(t,a,s-1,r,o),e.drawImage(t,a+1,s,r,o),e.drawImage(t,a,s+1,r,o),e.globalCompositeOperation="destination-over",e.fillStyle=e$1U.BLACK.toCssColorString(),e.fillRect(a-1,s-1,r+2,o+2),e.globalCompositeOperation="destination-out",e.drawImage(t,a,s,r,o),e.globalCompositeOperation="destination-over",e.fillStyle=e$1U.WHITE.toCssColorString(),e.fillRect(a-1,s-2,r+2,o+2)}var l$M=new Array(4);function h$H(e,t,i,n,r){l$M[0]=e,l$M[1]=t,l$M[2]=i,l$M[3]=n;var o=JSON.stringify(l$M),a=r[o];if(e$2b(a))return a;var s=document.createElement("canvas");s.width=n,s.height=n;var l=s.getContext("2d");if(b$M(l,i,n),e$2b(e)){var u=t$11.createIfNeeded(e).fetchImage().then((function(e){return C$F(l,e,n),r[o]=s,s}));return r[o]=u,u}if(e$2b(t)){var c=x$X(t,{font:"bold "+n+"px sans-serif"});C$F(l,c,n)}return r[o]=s,s}function f$K(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.vertexFormat,n$11.DEFAULT);this._vertexFormat=t,this._workerName="createPlaneGeometry"}f$K.packedLength=n$11.packedLength,f$K.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$_(i,0),n$11.pack(e._vertexFormat,t,i),t};var T$E=new n$11,G$J={vertexFormat:T$E};f$K.unpack=function(e,t,i){o$1q.defined("array",e),t=u$_(t,0);var n=n$11.unpack(e,t,T$E);return e$2b(i)?(i._vertexFormat=n$11.clone(n,i._vertexFormat),i):new f$K(G$J)};var w$C=new o$1p(-.5,-.5,0),A$M=new o$1p(.5,.5,0);function i$H(){this._workerName="createPlaneOutlineGeometry"}f$K.createGeometry=function(e){var t,i,n=e._vertexFormat,r=new a$_;if(n.position){if((i=new Float64Array(12))[0]=w$C.x,i[1]=w$C.y,i[2]=0,i[3]=A$M.x,i[4]=w$C.y,i[5]=0,i[6]=A$M.x,i[7]=A$M.y,i[8]=0,i[9]=w$C.x,i[10]=A$M.y,i[11]=0,r.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:i}),n.normal){var o=new Float32Array(12);o[0]=0,o[1]=0,o[2]=1,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=1,o[9]=0,o[10]=0,o[11]=1,r.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:o})}if(n.st){var a=new Float32Array(8);a[0]=0,a[1]=0,a[2]=1,a[3]=0,a[4]=1,a[5]=1,a[6]=0,a[7]=1,r.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:a})}if(n.tangent){var s=new Float32Array(12);s[0]=1,s[1]=0,s[2]=0,s[3]=1,s[4]=0,s[5]=0,s[6]=1,s[7]=0,s[8]=0,s[9]=1,s[10]=0,s[11]=0,r.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:s})}if(n.bitangent){var l=new Float32Array(12);l[0]=0,l[1]=1,l[2]=0,l[3]=0,l[4]=1,l[5]=0,l[6]=0,l[7]=1,l[8]=0,l[9]=0,l[10]=1,l[11]=0,r.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:l})}(t=new Uint16Array(6))[0]=0,t[1]=1,t[2]=2,t[3]=0,t[4]=2,t[5]=3}return new I$1p({attributes:r,indices:t,primitiveType:W$18.TRIANGLES,boundingSphere:new i$1c(o$1p.ZERO,Math.sqrt(2))})},i$H.packedLength=0,i$H.pack=function(e,t){return o$1q.defined("value",e),o$1q.defined("array",t),t},i$H.unpack=function(e,t,i){return o$1q.defined("array",e),e$2b(i)?i:new i$H};var r$I=new o$1p(-.5,-.5,0),o$E=new o$1p(.5,.5,0);i$H.createGeometry=function(){var e=new a$_,t=new Uint16Array(8),i=new Float64Array(12);return i[0]=r$I.x,i[1]=r$I.y,i[2]=r$I.z,i[3]=o$E.x,i[4]=r$I.y,i[5]=r$I.z,i[6]=o$E.x,i[7]=o$E.y,i[8]=r$I.z,i[9]=r$I.x,i[10]=o$E.y,i[11]=r$I.z,e.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:i}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new I$1p({attributes:e,indices:t,primitiveType:W$18.LINES,boundingSphere:new i$1c(o$1p.ZERO,Math.sqrt(2))})};var r$H=new o$1p;function c$C(e,t,i,n){return S$Z(e,t,i,n,r$H),r$H.x>0&&r$H.y>0&&r$H.z>0}var fe$h=[];function xe$e(e,t,i,n,r){var o=fe$h;o.length=r;var a,s=i.red,l=i.green,u=i.blue,c=i.alpha,h=n.red,d=n.green,f=n.blue,p=n.alpha;if(e$1U.equals(i,n)){for(a=0;a<r;a++)o[a]=e$1U.clone(i);return o}var _=(h-s)/r,m=(d-l)/r,g=(f-u)/r,x=(p-c)/r;for(a=0;a<r;a++)o[a]=new e$1U(s+a*_,l+a*m,u+a*g,c+a*x);return o}function R$A(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,i=e.colors,n=u$_(e.width,1),r=u$_(e.hMax,-1),o=u$_(e.colorsPerVertex,!1);if(!e$2b(t)||t.length<2)throw new t$16("At least two positions are required.");if("number"!=typeof n)throw new t$16("width must be a number");if(e$2b(i)&&(o&&i.length<t.length||!o&&i.length<t.length-1))throw new t$16("colors has an invalid length.");this._positions=t,this._colors=i,this._width=n,this._hMax=r,this._colorsPerVertex=o,this._dist=e.dist,this._period=e.period,this._vertexFormat=n$11.clone(u$_(e.vertexFormat,n$11.DEFAULT)),this._followSurface=u$_(e.followSurface,!0),e$2b(e.followSurface)&&(t$12("PolylineGeometry.followSurface","PolylineGeometry.followSurface is deprecated and will be removed in SuperMap3D. Use PolylineGeometry.arcType instead."),e.arcType=e.followSurface?m$1f.GEODESIC:m$1f.NONE),this._arcType=u$_(e.arcType,m$1f.GEODESIC),this._followSurface=this._arcType!==m$1f.NONE,this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._workerName="createPolylineGeometry";var a=1+t.length*o$1p.packedLength;a+=e$2b(i)?1+i.length*e$1U.packedLength:1,this.packedLength=a+t$13.packedLength+n$11.packedLength+4+2}R$A.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");i=u$_(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._colors;for(o=e$2b(a)?a.length:0,t[i++]=o,n=0;n<o;++n,i+=e$1U.packedLength)e$1U.pack(a[n],t,i);return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._width,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i++]=e._granularity,t[i++]=e._hMax,t[i++]=e._dist,t[i]=e._period,t};var le$o=t$13.clone(t$13.UNIT_SPHERE),se$k=new n$11,P$B={positions:void 0,colors:void 0,ellipsoid:le$o,vertexFormat:se$k,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};R$A.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);var a=(r=e[t++])>0?new Array(r):void 0;for(n=0;n<r;++n,t+=e$1U.packedLength)a[n]=e$1U.unpack(e,t);var s=t$13.unpack(e,t,le$o);t+=t$13.packedLength;var l=n$11.unpack(e,t,se$k);t+=n$11.packedLength;var u=e[t++],c=1===e[t++],h=e[t++],d=e[t++],f=e[t++],p=1==e[t++],_=e[t];return e$2b(i)?(i._positions=o,i._colors=a,i._ellipsoid=t$13.clone(s,i._ellipsoid),i._vertexFormat=n$11.clone(l,i._vertexFormat),i._width=u,i._colorsPerVertex=c,i._arcType=h,i._granularity=d,i._hMax=f,i._dist=p,i._period=_,i):(P$B.positions=o,P$B.colors=a,P$B.width=u,P$B.colorsPerVertex=c,P$B.arcType=h,P$B.granularity=d,P$B.hMax=f,P$B.dist=p,P$B.period=_,new R$A(P$B))};var de$i=new o$1p,me$k=new o$1p,_e$j=new o$1p,ue$m=new o$1p;function ae$m(e,t,i,n){var r=e.combinedPositions,o=e.combinedLocalPositions,a=new a$_;n.position&&(a.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:r}));var s,l,u,c,h,d,f=t.length,p=r.length/3,_=(p-2*f)/(2*f),m=A$1g.triangulate(t),g=(_-1)*f*6+2*m.length,x=ce$x.createTypedArray(p,g),v=2*f,y=0;for(s=0;s<_-1;s++){for(l=0;l<f-1;l++)d=(u=2*l+s*f*2)+v,h=(c=u+1)+v,x[y++]=c,x[y++]=u,x[y++]=h,x[y++]=h,x[y++]=u,x[y++]=d;h=(c=(u=2*f-2+s*f*2)+1)+v,d=u+v,x[y++]=c,x[y++]=u,x[y++]=h,x[y++]=h,x[y++]=u,x[y++]=d}if(n.st||n.tangent||n.bitangent){var $,b,T=new Float32Array(2*p),C=1/(_-1),S=1/i.height,w=i.height/2,E=0;for(s=0;s<_;s++){for($=s*C,b=S*(t[0].y+w),T[E++]=$,T[E++]=b,l=1;l<f;l++)b=S*(t[l].y+w),T[E++]=$,T[E++]=b,T[E++]=$,T[E++]=b;b=S*(t[0].y+w),T[E++]=$,T[E++]=b}for(l=0;l<f;l++)$=0,b=S*(t[l].y+w),T[E++]=$,T[E++]=b;for(l=0;l<f;l++)$=(_-1)*C,b=S*(t[l].y+w),T[E++]=$,T[E++]=b;a.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:new Float32Array(T)})}var P=p-2*f;for(s=0;s<m.length;s+=3){var A=m[s]+P,L=m[s+1]+P,M=m[s+2]+P;x[y++]=A,x[y++]=L,x[y++]=M,x[y++]=M+f,x[y++]=L+f,x[y++]=A+f}var R=new I$1p({attributes:a,indices:x,boundingSphere:i$1c.fromVertices(r),primitiveType:W$18.TRIANGLES});if(n.normal&&(R=k$13.computeNormal(R)),n.tangent||n.bitangent){try{R=k$13.computeTangentAndBitangent(R)}catch{e$1$("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}n.tangent||(R.attributes.tangent=void 0),n.bitangent||(R.attributes.bitangent=void 0),n.st||(R.attributes.st=void 0)}return e$2b(o)&&(R.attributes.position.values=o,R.attributes.position.componentDatatype=S$12.FLOAT),R}function N$y(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;if(!e$2b(t))throw new t$16("options.polylinePositions is required.");if(!e$2b(i))throw new t$16("options.shapePositions is required.");this._positions=t,this._shape=i,this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._cornerType=u$_(e.cornerType,ar$5.ROUNDED),this._vertexFormat=n$11.clone(u$_(e.vertexFormat,n$11.DEFAULT)),this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry",this.enuCenter=u$_(e.enuCenter,o$1p.ZERO);var n=1+t.length*o$1p.packedLength;n+=1+i.length*o$1o.packedLength+o$1p.packedLength,this.packedLength=n+t$13.packedLength+n$11.packedLength+2}R$A.createGeometry=function(e){var t,i,n,r=e._width,o=e._hMax,a=e._vertexFormat,s=e._colors,l=e._colorsPerVertex,u=e._arcType,c=e._granularity,h=e._ellipsoid,d=e._dist,f=e._period,p=D$11(e._positions,o$1p.equalsEpsilon),_=p.length;if(!(_<2||r<=0)){if(u===m$1f.GEODESIC||u===m$1f.RHUMB){var m,g;u===m$1f.GEODESIC?(m=e$2a.chordLength(c,h.maximumRadius),g=m$V.numberOfPoints):(m=c,g=m$V.numberOfPointsRhumbLine);var x=m$V.extractHeights(p,h);if(e$2b(s)){var v=1;for(t=0;t<_-1;++t)v+=g(p[t],p[t+1],m);var y=new Array(v),$=0;for(t=0;t<_-1;++t){var b=p[t],T=p[t+1],C=s[t],S=g(b,T,m);if(l&&t<v){var w=xe$e(b,T,C,s[t+1],S),E=w.length;for(i=0;i<E;++i)y[$++]=w[i]}else for(i=0;i<S;++i)y[$++]=e$1U.clone(C)}y[$]=e$1U.clone(s[s.length-1]),s=y,fe$h.length=0}p=u===m$1f.GEODESIC?m$V.generateCartesianArc({positions:p,minDistance:m,ellipsoid:h,height:x,hMax:o}):m$V.generateCartesianRhumbArc({positions:p,granularity:m,ellipsoid:h,height:x})}var P,A=4*(_=p.length)-4,L=new Float64Array(3*A),M=new Float64Array(3*A),R=new Float64Array(3*A),O=new Float32Array(2*A),I=a.st?new Float32Array(2*A):void 0,D=e$2b(s)?new Uint8Array(4*A):void 0,B=d?new Float32Array(3*A):void 0,N=0,F=0,U=0,G=0,z=0,V=0;for(i=0;i<_;++i){var k,W;0===i?(P=de$i,o$1p.subtract(p[0],p[1],P),o$1p.add(p[0],P,P)):P=p[i-1],o$1p.clone(P,_e$j),o$1p.clone(p[i],me$k),i===_-1?(P=de$i,o$1p.subtract(p[_-1],p[_-2],P),o$1p.add(p[_-1],P,P)):P=p[i+1],o$1p.clone(P,ue$m),e$2b(D)&&(k=0===i||l?s[i]:s[i-1],i!==_-1&&(W=s[i]));var H=i===_-1?2:4;for(n=0===i?2:0;n<H;++n){o$1p.pack(me$k,L,N),o$1p.pack(_e$j,M,N),o$1p.pack(ue$m,R,N),N+=3;var q=n-2<0?-1:1,j=n%2*2-1,Y=j*i/_;if(O[F++]=o>0?Y:j,O[F++]=q*r,a.st&&(I[U++]=i/(_-1),I[U++]=Math.max(O[F-2],0)),e$2b(D)){var X=n<2?k:W;D[G++]=e$1U.floatToByte(X.red),D[G++]=e$1U.floatToByte(X.green),D[G++]=e$1U.floatToByte(X.blue),D[G++]=e$1U.floatToByte(X.alpha)}d&&(B[3*z]=V,z++)}V+=o$1p.distance(P,p[i])}if(d){var K=V,Q=Math.random()*(f>0?f:K);for(i=0;i<A;i++)B[3*i+1]=K,B[3*i+2]=Q}var Z=new a$_;Z.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:L}),Z.prevPosition=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:M}),Z.nextPosition=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:R}),Z.expandAndWidth=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:O}),a.st&&(Z.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:I})),e$2b(D)&&(Z.color=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,values:D,normalize:!0})),d&&(Z.dist=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:B}));var J=ce$x.createTypedArray(A,6*_-6),ee=0,te=0,ie=_-1;for(i=0;i<ie;++i)J[te++]=ee,J[te++]=ee+2,J[te++]=ee+1,J[te++]=ee+1,J[te++]=ee+2,J[te++]=ee+3,ee+=4;return new I$1p({attributes:Z,indices:J,primitiveType:W$18.TRIANGLES,boundingSphere:i$1c.fromPoints(p),geometryType:Me$p.POLYLINES})}},N$y.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");i=u$_(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._shape;for(o=a.length,t[i++]=o,n=0;n<o;++n,i+=o$1o.packedLength)o$1o.pack(a[n],t,i);return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._cornerType,t[i++]=e._granularity,o$1p.pack(e.enuCenter,t,i),t};var z$B=t$13.clone(t$13.UNIT_SPHERE),Q$C=new n$11,C$E={polylinePositions:void 0,shapePositions:void 0,ellipsoid:z$B,vertexFormat:Q$C,cornerType:void 0,granularity:void 0,enuCenter:void 0};N$y.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);r=e[t++];var a=new Array(r);for(n=0;n<r;++n,t+=o$1o.packedLength)a[n]=o$1o.unpack(e,t);var s=t$13.unpack(e,t,z$B);t+=t$13.packedLength;var l=n$11.unpack(e,t,Q$C);t+=n$11.packedLength;var u,c=e[t++],h=e[t++];return u=o$1p.unpack(e,t),e$2b(i)?(i._positions=o,i._shape=a,i._ellipsoid=t$13.clone(s,i._ellipsoid),i._vertexFormat=n$11.clone(l,i._vertexFormat),i._cornerType=c,i._granularity=h,i.enuCenter=u,i):(C$E.polylinePositions=o,C$E.shapePositions=a,C$E.cornerType=c,C$E.granularity=h,C$E.enuCenter=u,new N$y(C$E))};var pe$j=new f$18;function U$E(e,t){var i=new a$_;i.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:e});var n,r,o=t.length,a=i.position.values.length/3,s=e.length/3/o,l=ce$x.createTypedArray(a,2*o*(s+1)),u=0,c=(n=0)*o;for(r=0;r<o-1;r++)l[u++]=r+c,l[u++]=r+c+1;for(l[u++]=o-1+c,l[u++]=c,c=(n=s-1)*o,r=0;r<o-1;r++)l[u++]=r+c,l[u++]=r+c+1;for(l[u++]=o-1+c,l[u++]=c,n=0;n<s-1;n++){var h=o*n,d=h+o;for(r=0;r<o;r++)l[u++]=r+h,l[u++]=r+d}return new I$1p({attributes:i,indices:ce$x.createTypedArray(a,l),boundingSphere:i$1c.fromVertices(e),primitiveType:W$18.LINES})}function _$z(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;if(!e$2b(t))throw new t$16("options.polylinePositions is required.");if(!e$2b(i))throw new t$16("options.shapePositions is required.");this._positions=t,this._shape=i,this._ellipsoid=t$13.clone(u$_(e.ellipsoid,t$13.WGS84)),this._cornerType=u$_(e.cornerType,ar$5.ROUNDED),this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";var n=1+t.length*o$1p.packedLength;n+=1+i.length*o$1o.packedLength,this.packedLength=n+t$13.packedLength+2}N$y.createGeometry=function(e){for(var t=D$11(e._positions,o$1p.equalsEpsilon),i=t.length,n=new Array(i),r=0;r<i;r++)n[r]=o$1p.clone(t[r]);var o=e._shape;if(o=J$B.removeDuplicatesFromShape(o),!(t.length<2||o.length<3)){A$1g.computeWindingOrder2D(o)===W$13.CLOCKWISE&&o.reverse();var a=f$18.fromPoints(o,pe$j),s={};if(s.combinedPositions=J$B.computePositions(n,o,a,e,!0),!o$1p.equals(e.enuCenter,o$1p.ZERO)){var l=new Array(i);for(r=0;r<i;r++)l[r]=o$1p.clone(t[r]);s.combinedLocalPositions=J$B.computeLocalPositions(l,o,a,e,!0,e.enuCenter)}return ae$m(s,o,a,e._vertexFormat)}},_$z.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");i=u$_(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._shape;for(o=a.length,t[i++]=o,n=0;n<o;++n,i+=o$1o.packedLength)o$1o.pack(a[n],t,i);return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,t[i++]=e._cornerType,t[i]=e._granularity,t};var L$M=t$13.clone(t$13.UNIT_SPHERE),P$A={polylinePositions:void 0,shapePositions:void 0,ellipsoid:L$M,height:void 0,cornerType:void 0,granularity:void 0};_$z.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);r=e[t++];var a=new Array(r);for(n=0;n<r;++n,t+=o$1o.packedLength)a[n]=o$1o.unpack(e,t);var s=t$13.unpack(e,t,L$M);t+=t$13.packedLength;var l=e[t++],u=e[t];return e$2b(i)?(i._positions=o,i._shape=a,i._ellipsoid=t$13.clone(s,i._ellipsoid),i._cornerType=l,i._granularity=u,i):(P$A.polylinePositions=o,P$A.shapePositions=a,P$A.cornerType=l,P$A.granularity=u,new _$z(P$A))};var V$u=new f$18;_$z.createGeometry=function(e){var t=D$11(e._positions,o$1p.equalsEpsilon),i=e._shape;if(i=J$B.removeDuplicatesFromShape(i),!(t.length<2||i.length<3)){A$1g.computeWindingOrder2D(i)===W$13.CLOCKWISE&&i.reverse();var n=f$18.fromPoints(i,V$u);return U$E(J$B.computePositions(t,i,n,e,!1),i)}};var e$R={TMERC:"tmerc",ALBERS:"aea",LCC:"lcc",UTM:"utm"},ProjectionName=Object.freeze(e$R);function B$B(e,t){if(!(this instanceof B$B))return new B$B(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function w$B(e,t,i){if(!i)return t.indexOf(e);for(var n=0;n<t.length;n++)if(i(e,t[n]))return n;return-1}function u$E(e,t){x$K(e,0,e.children.length,t,e)}function x$K(e,t,i,n,r){r||(r=m$F(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=t;a<i;a++)o=e.children[a],p$I(r,e.leaf?n(o):o);return r}function p$I(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function g$K(e,t){return e.minX-t.minX}function v$z(e,t){return e.minY-t.minY}function X$y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d$T(e){return e.maxX-e.minX+(e.maxY-e.minY)}function S$C(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function A$L(e,t){var i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}function Y$t(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function M$G(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function m$F(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y$D(e,t,i,n,r){for(var o,a=[t,i];a.length;)!((i=a.pop())-(t=a.pop())<=n)&&(s$J(e,o=t+Math.ceil((i-t)/n/2)*n,t,i,r),a.push(t,o,o,i))}function r$G(){this._tree=B$B()}function n$v(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}function d$S(e,t){return e.id===t.id}B$B.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,i=[],n=this.toBBox;if(!M$G(e,t))return i;for(var r,o,a,s,l=[];t;){for(r=0,o=t.children.length;r<o;r++)a=t.children[r],M$G(e,s=t.leaf?n(a):a)&&(t.leaf?i.push(a):Y$t(e,s)?this._all(a,i):l.push(a));t=l.pop()}return i},collides:function(e){var t=this.data,i=this.toBBox;if(!M$G(e,t))return!1;for(var n,r,o,a,s=[];t;){for(n=0,r=t.children.length;n<r;n++)if(o=t.children[n],M$G(e,a=t.leaf?i(o):o)){if(t.leaf||Y$t(e,a))return!0;s.push(o)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=m$F([]),this},remove:function(e,t){if(!e)return this;for(var i,n,r,o,a=this.data,s=this.toBBox(e),l=[],u=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=u.pop(),o=!0),a.leaf&&-1!==(r=w$B(e,a.children,t)))return a.children.splice(r,1),l.push(a),this._condense(l),this;o||a.leaf||!Y$t(a,s)?n?(i++,a=n.children[i],o=!1):a=null:(l.push(a),u.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:g$K,compareMinY:v$z,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},_build:function(e,t,i,n){var r,o=i-t+1,a=this._maxEntries;if(o<=a)return u$E(r=m$F(e.slice(t,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=m$F([])).leaf=!1,r.height=n;var s,l,u,c,h=Math.ceil(o/a),d=h*Math.ceil(Math.sqrt(a));for(y$D(e,t,i,d,this.compareMinX),s=t;s<=i;s+=d)for(y$D(e,s,u=Math.min(s+d-1,i),h,this.compareMinY),l=s;l<=u;l+=h)c=Math.min(l+h-1,u),r.children.push(this._build(e,l,c,n-1));return u$E(r,this.toBBox),r},_chooseSubtree:function(e,t,i,n){for(var r,o,a,s,l,u,c,h;n.push(t),!t.leaf&&n.length-1!==i;){for(c=h=1/0,r=0,o=t.children.length;r<o;r++)l=X$y(a=t.children[r]),(u=S$C(e,a)-l)<h?(h=u,c=l<c?l:c,s=a):u===h&&l<c&&(c=l,s=a);t=s||t.children[0]}return t},_insert:function(e,t,i){var n=this.toBBox,r=i?e:n(e),o=[],a=this._chooseSubtree(r,this.data,t,o);for(a.children.push(e),p$I(a,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},_split:function(e,t){var i=e[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=m$F(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,u$E(i,this.toBBox),u$E(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(e,t){this.data=m$F([e,t]),this.data.height=e.height+1,this.data.leaf=!1,u$E(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,i){var n,r,o,a,s,l,u,c;for(l=u=1/0,n=t;n<=i-t;n++)a=A$L(r=x$K(e,0,n,this.toBBox),o=x$K(e,n,i,this.toBBox)),s=X$y(r)+X$y(o),a<l?(l=a,c=n,u=s<u?s:u):a===l&&s<u&&(u=s,c=n);return c},_chooseSplitAxis:function(e,t,i){var n=e.leaf?this.compareMinX:g$K,r=e.leaf?this.compareMinY:v$z;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)},_allDistMargin:function(e,t,i,n){e.children.sort(n);var r,o,a=this.toBBox,s=x$K(e,0,t,a),l=x$K(e,i-t,i,a),u=d$T(s)+d$T(l);for(r=t;r<i-t;r++)o=e.children[r],p$I(s,e.leaf?a(o):o),u+=d$T(s);for(r=i-t-1;r>=t;r--)o=e.children[r],p$I(l,e.leaf?a(o):o),u+=d$T(l);return u},_adjustParentBBoxes:function(e,t,i){for(var n=i;n>=0;n--)p$I(t[n],e)},_condense:function(e){for(var t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children).splice(t.indexOf(e[i]),1):this.clear():u$E(e[i],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}},n$v.fromRectangleAndId=function(e,t,i){return i.minX=t.west,i.minY=t.south,i.maxX=t.east,i.maxY=t.north,i.id=e,i},r$G.prototype.insert=function(e,t){o$1q.typeOf.string("id",e),o$1q.typeOf.object("rectangle",t);var i=n$v.fromRectangleAndId(e,t,new n$v);this._tree.insert(i)};var h$G=new n$v;r$G.prototype.remove=function(e,t){o$1q.typeOf.string("id",e),o$1q.typeOf.object("rectangle",t);var i=n$v.fromRectangleAndId(e,t,h$G);this._tree.remove(i,d$S)};var m$E=new n$v,e$Q;function p$H(e){return e$Q(e)}function y$C(e,t,i){return o$1q.typeOf.object("terrainProvider",e),o$1q.typeOf.number("level",t),o$1q.defined("positions",i),e.readyPromise.then((function(){return b$L(e,t,i)}))}function b$L(e,t,i){var n,r=e.tilingScheme,o=[],a={};for(n=0;n<i.length;++n){var s=r.positionToTileXY(i[n],t),l=s.toString();if(!a.hasOwnProperty(l)){var u={x:s.x,y:s.y,level:t,tilingScheme:r,terrainProvider:e,positions:[]};a[l]=u,o.push(u)}a[l].positions.push(i[n])}var c=[];for(n=0;n<o.length;++n){var h=o[n],d=new r$1b({throttle:!1,throttleByServer:!1,type:V$15.TERRAIN}),f=h.terrainProvider.requestTileGeometry(h.x,h.y,h.level,d,!0).then(w$A(h,e)).otherwise(x$J(h));c.push(f)}return o$1l.all(c,(function(){return i}))}function w$A(e,t){var i=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(e){if(t._isSct&&t._isTerrainZ)for(var r=nt$9.inflate(e.buffer).buffer,o=t.createTerrainData(e,r),a=0;a<i.length;++a){(s=i[a]).height=o.interpolateHeight(n,s.longitude,s.latitude)}else for(a=0;a<i.length;++a){var s;(s=i[a]).height=e.interpolateHeight(n,s.longitude,s.latitude)}}}function x$J(e){var t=e.positions;return function(){for(var e=0;e<t.length;++e){t[e].height=void 0}}}r$G.prototype.collides=function(e){o$1q.typeOf.object("rectangle",e);var t=n$v.fromRectangleAndId("",e,m$E);return this._tree.collides(t)},typeof requestAnimationFrame<"u"&&(e$Q=requestAnimationFrame),function(){if(!e$2b(e$Q)&&typeof window<"u")for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!e$2b(e$Q);)e$Q=window[e[t]+"RequestAnimationFrame"],++t;if(!e$2b(e$Q)){var n=0;e$Q=function(e){var t=Et$a(),i=Math.max(16.666666666666668-(t-n),0);return n=t+i,setTimeout((function(){e(n)}),i)}}}();var o$D=new o$1o;function y$B(e,t){if(!e$2b(e))throw new t$16("terrainProvider is required.");if(!e$2b(t))throw new t$16("positions is required.");return e.readyPromise.then((function(){var i=[],n=[],r=e.availability;if(!e$2b(r)&&!e._isSct)throw new t$16("sampleTerrainMostDetailed requires a terrain provider that has tile availability.");for(var o=[],a=0;a<t.length;++a){var s=t[a],l=e$2b(r)?r.computeMaximumLevelAtPosition(s):e._levels[e._levels.length-1];if(n[a]=l,0===l){e.tilingScheme.positionToTileXY(s,1,o$D);var u=e.loadTileDataAvailability(o$D.x,o$D.y,1);e$2b(u)&&o.push(u)}var c=i[l];e$2b(c)||(i[l]=c=[]),c.push(s)}return o$1l.all(o).then((function(){return o$1l.all(i.map((function(t,i){if(e$2b(t))return y$C(e,i,t)})))})).then((function(){for(var i=[],o=0;o<t.length;++o){var a=t[o];(e$2b(r)?r.computeMaximumLevelAtPosition(a):e._levels[e._levels.length-1])!==n[o]&&i.push(a)}if(i.length>0)return y$B(e,i)})).then((function(){return t}))}))}var E$H={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},G$I=Object.freeze(E$H);function w$z(e,t,i){let n=e._element,r=n.offsetWidth/n.getBoundingClientRect().width,o=n.offsetHeight/n.getBoundingClientRect().height;if(n===document)return i.x=t.clientX*r,i.y=t.clientY*o,i;var a=n.getBoundingClientRect();return i.x=(t.clientX-a.left)*r,i.y=(t.clientY-a.top)*o,i}function R$z(e,t){var i=e;return e$2b(t)&&(i+="+"+t),i}function y$A(e){return e.shiftKey?Aa$1.SHIFT:e.ctrlKey?Aa$1.CTRL:e.altKey?Aa$1.ALT:void 0}var l$L={LEFT:0,MIDDLE:1,RIGHT:2};function T$D(e,t,i,n){function r(t){n(e,t)}i.addEventListener(t,r,!1),e._removalFunctions.push((function(){i.removeEventListener(t,r,!1)}))}function ho(e){var t=e._element,i=e$2b(t.disableRootEvents)?t:document;s$Y.supportsPointerEvents()?(T$D(e,"pointerdown",t,go),T$D(e,"pointerup",t,W$G),T$D(e,"pointermove",t,ao),T$D(e,"pointercancel",t,W$G)):(T$D(e,"mousedown",t,j$C),T$D(e,"mouseup",i,K$B),T$D(e,"mousemove",i,Q$B),T$D(e,"touchstart",t,To),T$D(e,"touchend",i,$$D),T$D(e,"touchmove",i,Po),T$D(e,"touchcancel",i,$$D)),T$D(e,"dblclick",t,lo),T$D(e,"onwheel"in t?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",t,mo)}function _o(e){for(var t=e._removalFunctions,i=0;i<t.length;++i)t[i]()}var Y$s={position:new o$1o};function O$w(e){e._lastSeenTouchEvent=Et$a()}function k$y(e){return Et$a()-e._lastSeenTouchEvent>g$J.mouseEmulationIgnoreMilliseconds}function d$R(e,t,i){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)<i}function j$C(e,t){if(k$y(e)){var i,n=t.button;if(e._buttonDown[n]=!0,n===l$L.LEFT)i=G$I.LEFT_DOWN;else if(n===l$L.MIDDLE)i=G$I.MIDDLE_DOWN;else{if(n!==l$L.RIGHT)return;i=G$I.RIGHT_DOWN}var r=w$z(e,t,e._primaryPosition);o$1o.clone(r,e._primaryStartPosition),o$1o.clone(r,e._primaryPreviousPosition);var o=y$A(t),a=e.getInputAction(i,o);e$2b(a)&&(o$1o.clone(r,Y$s.position),a(Y$s),t.preventDefault())}}var z$A={position:new o$1o},J$y={position:new o$1o};function G$H(e,t,i,n){var r=y$A(n),o=e.getInputAction(t,r),a=e.getInputAction(i,r);if(e$2b(o)||e$2b(a)){var s=w$z(e,n,e._primaryPosition);if(e$2b(o)&&(o$1o.clone(s,z$A.position),o(z$A)),e$2b(a))d$R(e._primaryStartPosition,s,e._clickPixelTolerance)&&(o$1o.clone(s,J$y.position),a(J$y))}}function K$B(e,t){if(k$y(e)){var i=t.button;i!==l$L.LEFT&&i!==l$L.MIDDLE&&i!==l$L.RIGHT||(e._buttonDown[l$L.LEFT]&&(G$H(e,G$I.LEFT_UP,G$I.LEFT_CLICK,t),e._buttonDown[l$L.LEFT]=!1),e._buttonDown[l$L.MIDDLE]&&(G$H(e,G$I.MIDDLE_UP,G$I.MIDDLE_CLICK,t),e._buttonDown[l$L.MIDDLE]=!1),e._buttonDown[l$L.RIGHT]&&(G$H(e,G$I.RIGHT_UP,G$I.RIGHT_CLICK,t),e._buttonDown[l$L.RIGHT]=!1))}}var U$D={startPosition:new o$1o,endPosition:new o$1o};function Q$B(e,t){if(k$y(e)){var i=y$A(t),n=w$z(e,t,e._primaryPosition),r=e._primaryPreviousPosition,o=e.getInputAction(G$I.MOUSE_MOVE,i);e$2b(o)&&(o$1o.clone(r,U$D.startPosition),o$1o.clone(n,U$D.endPosition),o(U$D,t)),o$1o.clone(n,r),(e._buttonDown[l$L.LEFT]||e._buttonDown[l$L.MIDDLE]||e._buttonDown[l$L.RIGHT])&&t.preventDefault()}}var Z$B={position:new o$1o};function lo(e,t){var i;if(t.button===l$L.LEFT){i=G$I.LEFT_DOUBLE_CLICK;var n=y$A(t),r=e.getInputAction(i,n);e$2b(r)&&(w$z(e,t,Z$B.position),r(Z$B))}}function mo(e,t){var i;if(e$2b(t.deltaY)){var n=t.deltaMode;i=n===t.DOM_DELTA_PIXEL?-t.deltaY:n===t.DOM_DELTA_LINE?40*-t.deltaY:120*-t.deltaY}else i=t.detail>0?-120*t.detail:t.wheelDelta;if(e$2b(i)){var r=y$A(t),o=e.getInputAction(G$I.WHEEL,r);e$2b(o)&&(o(i),t.preventDefault())}}function To(e,t){O$w(e);var i,n,r,o=t.changedTouches,a=o.length,s=e._positions;for(i=0;i<a;++i)r=(n=o[i]).identifier,s.set(r,w$z(e,n,new o$1o));p$G(e,t);var l=e._previousPositions;for(i=0;i<a;++i)r=(n=o[i]).identifier,l.set(r,o$1o.clone(s.get(r)))}function $$D(e,t){O$w(e);var i,n,r=t.changedTouches,o=r.length,a=e._positions;for(i=0;i<o;++i)n=r[i].identifier,a.remove(n);p$G(e,t);var s=e._previousPositions;for(i=0;i<o;++i)n=r[i].identifier,s.remove(n)}var X$x={position:new o$1o},N$x={position1:new o$1o,position2:new o$1o},e$P={position:new o$1o},E$G={position:new o$1o},H$H={position:new o$1o};function p$G(e,t){var i,n,r=y$A(t),o=e._positions,a=o.length,s=e._isPinching;if(1!==a&&e._buttonDown[l$L.LEFT]){if(e._buttonDown[l$L.LEFT]=!1,e$2b(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),e$2b(i=e.getInputAction(G$I.LEFT_UP,r))&&(o$1o.clone(e._primaryPosition,e$P.position),i(e$P)),0===a&&!e._isTouchHolding&&e$2b(n=e.getInputAction(G$I.LEFT_CLICK,r)))d$R(e._primaryStartPosition,e._previousPositions.values[0],e._clickPixelTolerance)&&(o$1o.clone(e._primaryPosition,E$G.position),n(E$G));e._isTouchHolding=!1}if(0===a&&s&&(e._isPinching=!1,e$2b(i=e.getInputAction(G$I.PINCH_END,r))&&i()),1===a&&!s){var l=o.values[0];o$1o.clone(l,e._primaryPosition),o$1o.clone(l,e._primaryStartPosition),o$1o.clone(l,e._primaryPreviousPosition),e._buttonDown[l$L.LEFT]=!0,e$2b(i=e.getInputAction(G$I.LEFT_DOWN,r))&&(o$1o.clone(l,X$x.position),i(X$x)),e._touchHoldTimer=setTimeout((function(){!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,e$2b(n=e.getInputAction(G$I.RIGHT_CLICK,r)))&&(d$R(e._primaryStartPosition,e._previousPositions.values[0],e._holdPixelTolerance)&&(o$1o.clone(e._primaryPosition,H$H.position),n(H$H)))}),g$J.touchHoldDelayMilliseconds),t.preventDefault()}2===a&&!s&&(e._isPinching=!0,e$2b(i=e.getInputAction(G$I.PINCH_START,r))&&(o$1o.clone(o.values[0],N$x.position1),o$1o.clone(o.values[1],N$x.position2),i(N$x),t.preventDefault()))}function Po(e,t){O$w(e);var i,n,r,o=t.changedTouches,a=o.length,s=e._positions;for(i=0;i<a;++i){r=(n=o[i]).identifier;var l=s.get(r);e$2b(l)&&w$z(e,n,l)}S$B(e,t);var u=e._previousPositions;for(i=0;i<a;++i)r=(n=o[i]).identifier,o$1o.clone(s.get(r),u.get(r))}var c$B={startPosition:new o$1o,endPosition:new o$1o},L$L={distance:{startPosition:new o$1o,endPosition:new o$1o},angleAndHeight:{startPosition:new o$1o,endPosition:new o$1o}};function S$B(e,t){var i,n=y$A(t),r=e._positions,o=e._previousPositions,a=r.length;if(1===a&&e._buttonDown[l$L.LEFT]){var s=r.values[0];o$1o.clone(s,e._primaryPosition);var l=e._primaryPreviousPosition;e$2b(i=e.getInputAction(G$I.MOUSE_MOVE,n))&&(o$1o.clone(l,c$B.startPosition),o$1o.clone(s,c$B.endPosition),i(c$B,t)),o$1o.clone(s,l),t.preventDefault()}else if(2===a&&e._isPinching&&e$2b(i=e.getInputAction(G$I.PINCH_MOVE,n))){var u=r.values[0],c=r.values[1],h=o.values[0],d=o.values[1],f=c.x-u.x,p=c.y-u.y,_=.25*Math.sqrt(f*f+p*p),m=d.x-h.x,g=d.y-h.y,x=.25*Math.sqrt(m*m+g*g),v=.125*(c.y+u.y),y=.125*(d.y+h.y),$=Math.atan2(p,f),b=Math.atan2(g,m);o$1o.fromElements(0,x,L$L.distance.startPosition),o$1o.fromElements(0,_,L$L.distance.endPosition),o$1o.fromElements(b,y,L$L.angleAndHeight.startPosition),o$1o.fromElements($,v,L$L.angleAndHeight.endPosition),i(L$L)}}function go(e,t){if(t.target.setPointerCapture(t.pointerId),"touch"===t.pointerType){var i=e._positions,n=t.pointerId;i.set(n,w$z(e,t,new o$1o)),p$G(e,t),e._previousPositions.set(n,o$1o.clone(i.get(n)))}else j$C(e,t)}function W$G(e,t){if("touch"===t.pointerType){var i=e._positions,n=t.pointerId;i.remove(n),p$G(e,t),e._previousPositions.remove(n)}else K$B(e,t)}function ao(e,t){if("touch"===t.pointerType){var i=e._positions,n=t.pointerId,r=i.get(n);if(!e$2b(r))return;w$z(e,t,r),S$B(e,t);var o=e._previousPositions;o$1o.clone(i.get(n),o.get(n))}else Q$B(e,t)}function g$J(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-g$J.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new o$1o,this._primaryPosition=new o$1o,this._primaryPreviousPosition=new o$1o,this._positions=new e$1N,this._previousPositions=new e$1N,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=u$_(e,document),ho(this)}g$J.prototype.setInputAction=function(e,t,i){if(!e$2b(e))throw new t$16("action is required.");if(!e$2b(t))throw new t$16("type is required.");var n=R$z(t,i);this._inputEvents[n]=e},g$J.prototype.getInputAction=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=R$z(e,t);return this._inputEvents[i]},g$J.prototype.removeInputAction=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=R$z(e,t);delete this._inputEvents[i]},g$J.prototype.registerListenersForWindowTop=function(){var e=window.top,t=e$2b(e.disableRootEvents)?e:document;s$Y.supportsPointerEvents()?T$D(this,"pointerup",e,W$G):T$D(this,"mouseup",t,K$B)},g$J.prototype.isDestroyed=function(){return!1},g$J.prototype.destroy=function(){return _o(this),i$10(this)},g$J.mouseEmulationIgnoreMilliseconds=800,g$J.touchHoldDelayMilliseconds=1500;var F$H={};function wa(e){var t=6.239996+.0172019696544*e;return.001657*Math.sin(t+.01671*Math.sin(t))}var Ta$1=32.184,la$2=2451545;function K$A(e,t){t=a$15.addSeconds(e,Ta$1,t);var i=a$15.totalDays(t)-la$2;return t=a$15.addSeconds(t,wa(i),t)}var B$A=new a$15(2451545,0,H$19.TAI),ga$1=1e3,S$A=e$2a.RADIANS_PER_DEGREE,p$F=e$2a.RADIANS_PER_ARCSECOND,f$J=14959787e4,X$w=new p$1e;function k$x(e,t,i,n,r,o,a){if(i<0&&(i=-i,r+=e$2a.PI),i<0||i>e$2a.PI)throw new t$16("The inclination is out of range. Inclination must be greater than or equal to zero and less than or equal to Pi radians.");var s=e*(1-t),l=n-r,u=r,c=Aa(o-n,t);if("Hyperbolic"===Ea$1(t,0)&&Math.abs(e$2a.negativePiToPi(c))>=Math.acos(-1/t))throw new t$16("The true anomaly of the hyperbolic orbit lies outside of the bounds of the hyperbola.");ba(l,i,u,X$w);var h=s*(1+t),d=Math.cos(c),f=Math.sin(c),p=1+t*d;if(p<=e$2a.Epsilon10)throw new t$16("elements cannot be converted to cartesian");var _=h/p;return e$2b(a)?(a.x=_*d,a.y=_*f,a.z=0):a=new o$1p(_*d,_*f,0),p$1e.multiplyByVector(X$w,a,a)}function Ea$1(e,t){if(e<0)throw new t$16("eccentricity cannot be negative.");return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function Aa(e,t){if(t<0||t>=1)throw new t$16("eccentricity out of range.");return _a$1(Oa(e,t),t)}var G$G=50,Ia$1=e$2a.EPSILON8;function Oa(e,t){if(t<0||t>=1)throw new t$16("eccentricity out of range.");var i,n=Math.floor(e/e$2a.TWO_PI),r=(e-=n*e$2a.TWO_PI)+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE;for(i=0;i<G$G&&Math.abs(o-r)>Ia$1;++i){r=(o=r)-(o-t*Math.sin(o)-e)/(1-t*Math.cos(o))}if(i>=G$G)throw new t$16("Kepler equation did not converge");return o=r+n*e$2a.TWO_PI}function _a$1(e,t){if(t<0||t>=1)throw new t$16("eccentricity out of range.");var i=Math.floor(e/e$2a.TWO_PI);e-=i*e$2a.TWO_PI;var n=Math.cos(e)-t,r=Math.sin(e)*Math.sqrt(1-t*t),o=Math.atan2(r,n);return o=e$2a.zeroToTwoPi(o),e<0&&(o-=e$2a.TWO_PI),o+=i*e$2a.TWO_PI}function ba(e,t,i,n){if(t<0||t>e$2a.PI)throw new t$16("inclination out of range");var r=Math.cos(e),o=Math.sin(e),a=Math.cos(t),s=Math.sin(t),l=Math.cos(i),u=Math.sin(i);return e$2b(n)?(n[0]=l*r-u*o*a,n[1]=u*r+l*o*a,n[2]=o*s,n[3]=-l*o-u*r*a,n[4]=-u*o+l*r*a,n[5]=r*s,n[6]=u*s,n[7]=-l*s,n[8]=a):n=new p$1e(l*r-u*o*a,-l*o-u*r*a,u*s,u*r+l*o*a,-u*o+l*r*a,-l*s,o*s,r*s,a),n}var Da$1=1.0000010178*f$J,Na=100.46645683*S$A,ya=1295977422.83429*p$F,Q$A=16002,Z$A=21863,$$C=32004,j$B=10931,aa$2=14529,ra$2=16368,ta$1=15318,oa$2=32794,Ra$1=64*1e-7*f$J,qa$1=1e-7*-152*f$J,xa$1=62*1e-7*f$J,La$1=-8e-7*f$J,Wa=32*1e-7*f$J,Ya$1=1e-7*-41*f$J,Ua$1=19*1e-7*f$J,Ba$1=1e-7*-11*f$J,Va=1e-7*-150*f$J,Fa$1=1e-7*-46*f$J,Ja$1=68*1e-7*f$J,za$1=54*1e-7*f$J,Ha=14*1e-7*f$J,Ka$1=24*1e-7*f$J,Xa$1=1e-7*-28*f$J,ka=22*1e-7*f$J,na$1=10,ea$3=16002,ia$1=21863,sa$1=10931,ha$2=1473,va=32004,Ma$1=4387,ca=73,Ga$1=1e-7*-325,Qa$1=1e-7*-322,Za$1=1e-7*-79,$a$1=232*1e-7,ja=1e-7*-52,a0=97*1e-7,r0=55*1e-7,t0$1=1e-7*-41,o0=1e-7*-105,n0=1e-7*-137,e0=258*1e-7,i0=35*1e-7,s0=1e-7*-116,h0=1e-7*-88,v0=1e-7*-112,M0=1e-7*-80,b$K=new a$15(0,0,H$19.TAI);function c0(e,t){K$A(e,b$K);var i=(b$K.dayNumber-B$A.dayNumber+(b$K.secondsOfDay-B$A.secondsOfDay)/h$17.SECONDS_PER_DAY)/(10*h$17.DAYS_PER_JULIAN_CENTURY),n=.3595362*i,r=Da$1+Ra$1*Math.cos(Q$A*n)+Va*Math.sin(Q$A*n)+qa$1*Math.cos(Z$A*n)+Fa$1*Math.sin(Z$A*n)+xa$1*Math.cos($$C*n)+Ja$1*Math.sin($$C*n)+La$1*Math.cos(j$B*n)+za$1*Math.sin(j$B*n)+Wa*Math.cos(aa$2*n)+Ha*Math.sin(aa$2*n)+Ya$1*Math.cos(ra$2*n)+Ka$1*Math.sin(ra$2*n)+Ua$1*Math.cos(ta$1*n)+Xa$1*Math.sin(ta$1*n)+Ba$1*Math.cos(oa$2*n)+ka*Math.sin(oa$2*n),o=Na+ya*i+Ga$1*Math.cos(na$1*n)+o0*Math.sin(na$1*n)+Qa$1*Math.cos(ea$3*n)+n0*Math.sin(ea$3*n)+Za$1*Math.cos(ia$1*n)+e0*Math.sin(ia$1*n)+$a$1*Math.cos(sa$1*n)+i0*Math.sin(sa$1*n)+ja*Math.cos(ha$2*n)+s0*Math.sin(ha$2*n)+a0*Math.cos(va*n)+h0*Math.sin(va*n)+r0*Math.cos(Ma$1*n)+v0*Math.sin(Ma$1*n)+t0$1*Math.cos(ca*n)+M0*Math.sin(ca*n);return k$x(r,.0167086342-.0004203654*i,469.97289*p$F*i,102.93734808*S$A+11612.3529*p$F*i,174.87317577*S$A-8679.27034*p$F*i,o,t)}function fa$1(e,t){K$A(e,b$K);var i=(b$K.dayNumber-B$A.dayNumber+(b$K.secondsOfDay-B$A.secondsOfDay)/h$17.SECONDS_PER_DAY)/h$17.DAYS_PER_JULIAN_CENTURY,n=i*i,r=n*i,o=r*i,a=383397.7725+.004*i,s=.055545526-16e-9*i,l=5.15668983*S$A,u=-8e-5*i+.02966*n-42e-6*r-13e-8*o,c=83.35324312*S$A,h=14643420.2669*i-38.2702*n-.045047*r+21301e-8*o,d=125.04455501*S$A,f=-6967919.3631*i+6.3602*n+.007625*r-3586e-8*o,p=218.31664563*S$A,_=1732559343.4847*i-6.391*n+.006588*r-3169e-8*o,m=297.85019547*S$A+p$F*(1602961601.209*i-6.3706*n+.006593*r-3169e-8*o),g=134.96340251*S$A+p$F*(1717915923.2178*i+31.8792*n+.051635*r-2447e-7*o),x=357.52910918*S$A+p$F*(129596581.0481*i-.5532*n+136e-6*r-1149e-8*o),v=310.17137918*S$A-p$F*(6967051.436*i+6.2068*n+.007618*r-3219e-8*o),y=2*m,$=4*m,b=6*m,T=2*g,C=3*g,S=4*g,w=2*(93.27209062*S$A+p$F*(1739527262.8478*i-12.7512*n-.001037*r+417e-8*o));a+=3400.4*Math.cos(y)-635.6*Math.cos(y-g)-235.6*Math.cos(g)+218.1*Math.cos(y-x)+181*Math.cos(y+g),s+=.014216*Math.cos(y-g)+.008551*Math.cos(y-T)-.001383*Math.cos(g)+.001356*Math.cos(y+g)-.001147*Math.cos($-C)-914e-6*Math.cos($-T)+869e-6*Math.cos(y-x-g)-627e-6*Math.cos(y)-394e-6*Math.cos($-S)+282e-6*Math.cos(y-x-T)-279e-6*Math.cos(m-g)-236e-6*Math.cos(T)+231e-6*Math.cos($)+229e-6*Math.cos(b-S)-201e-6*Math.cos(T-w),u+=486.26*Math.cos(y-w)-40.13*Math.cos(y)+37.51*Math.cos(w)+25.73*Math.cos(T-w)+19.97*Math.cos(y-x-w),h+=-55609*Math.sin(y-g)-34711*Math.sin(y-T)-9792*Math.sin(g)+9385*Math.sin($-C)+7505*Math.sin($-T)+5318*Math.sin(y+g)+3484*Math.sin($-S)-3417*Math.sin(y-x-g)-2530*Math.sin(b-S)-2376*Math.sin(y)-2075*Math.sin(y-C)-1883*Math.sin(T)-1736*Math.sin(b-5*g)+1626*Math.sin(x)-1370*Math.sin(b-C),f+=-5392*Math.sin(y-w)-540*Math.sin(x)-441*Math.sin(y)+423*Math.sin(w)-288*Math.sin(T-w),_+=-3332.9*Math.sin(y)+1197.4*Math.sin(y-g)-662.5*Math.sin(x)+396.3*Math.sin(g)-218*Math.sin(y-x);var E=2*v,P=3*v;u+=46.997*Math.cos(v)*i-.614*Math.cos(y-w+v)*i+.614*Math.cos(y-w-v)*i-.0297*Math.cos(E)*n-.0335*Math.cos(v)*n+.0012*Math.cos(y-w+E)*n-16e-5*Math.cos(v)*r+4e-5*Math.cos(P)*r+4e-5*Math.cos(E)*r;var A=2.116*Math.sin(v)*i-.111*Math.sin(y-w-v)*i-.0015*Math.sin(v)*n;return h+=A,_+=A,f+=-520.77*Math.sin(v)*i+13.66*Math.sin(y-w+v)*i+1.12*Math.sin(y-v)*i-1.06*Math.sin(w-v)*i+.66*Math.sin(E)*n+.371*Math.sin(v)*n-.035*Math.sin(y-w+E)*n-.015*Math.sin(y-w+v)*n+.0014*Math.sin(v)*r-.0011*Math.sin(P)*r-9e-4*Math.sin(E)*r,k$x(a*=ga$1,s,l+u*p$F,c+h*p$F,d+f*p$F,p+_*p$F,t)}var ua$1=.012300034,f0=ua$1/(ua$1+1)*-1;function u0(e,t){return t=fa$1(e,t),o$1p.multiplyByScalar(t,f0,t)}var ma$1=new p$1e(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),R$y=new o$1p;function ae$l(e,t,i,n,r,o,a){var s,l=m$V.numberOfPoints(e,t,r),u=i.red,c=i.green,h=i.blue,d=i.alpha,f=n.red,p=n.green,_=n.blue,m=n.alpha;if(e$1U.equals(i,n)){for(s=0;s<l;s++)o[a++]=e$1U.floatToByte(u),o[a++]=e$1U.floatToByte(c),o[a++]=e$1U.floatToByte(h),o[a++]=e$1U.floatToByte(d);return a}var g=(f-u)/l,x=(p-c)/l,v=(_-h)/l,y=(m-d)/l,$=a;for(s=0;s<l;s++)o[$++]=e$1U.floatToByte(u+s*g),o[$++]=e$1U.floatToByte(c+s*x),o[$++]=e$1U.floatToByte(h+s*v),o[$++]=e$1U.floatToByte(d+s*y);return $}function S$z(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,i=e.colors,n=u$_(e.colorsPerVertex,!1);if(!e$2b(t)||t.length<2)throw new t$16("At least two positions are required.");if(e$2b(i)&&(n&&i.length<t.length||!n&&i.length<t.length-1))throw new t$16("colors has an invalid length.");this._positions=t,this._colors=i,this._colorsPerVertex=n,this._arcType=u$_(e.arcType,m$1f.GEODESIC),this._granularity=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._workerName="createSimplePolylineGeometry";var r=1+t.length*o$1p.packedLength;r+=e$2b(i)?1+i.length*e$1U.packedLength:1,this.packedLength=r+t$13.packedLength+3}F$H.computeSunPositionInEarthInertialFrame=function(e,t){return e$2b(e)||(e=a$15.now()),e$2b(t)||(t=new o$1p),R$y=c0(e,R$y),t=o$1p.negate(R$y,t),u0(e,R$y),o$1p.subtract(t,R$y,t),p$1e.multiplyByVector(ma$1,t,t),t},F$H.computeMoonPositionInEarthInertialFrame=function(e,t){return e$2b(e)||(e=a$15.now()),t=fa$1(e,t),p$1e.multiplyByVector(ma$1,t,t),t},S$z.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");i=u$_(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._colors;for(o=e$2b(a)?a.length:0,t[i++]=o,n=0;n<o;++n,i+=e$1U.packedLength)e$1U.pack(a[n],t,i);return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i]=e._granularity,t},S$z.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);var a=(r=e[t++])>0?new Array(r):void 0;for(n=0;n<r;++n,t+=e$1U.packedLength)a[n]=e$1U.unpack(e,t);var s=t$13.unpack(e,t);t+=t$13.packedLength;var l=1===e[t++],u=e[t++],c=e[t];return e$2b(i)?(i._positions=o,i._colors=a,i._ellipsoid=s,i._colorsPerVertex=l,i._arcType=u,i._granularity=c,i):new S$z({positions:o,colors:a,ellipsoid:s,colorsPerVertex:l,arcType:u,granularity:c})};var U$C=new Array(2),q$F=new Array(2),te$p={positions:U$C,height:q$F,ellipsoid:void 0,minDistance:void 0,granularity:void 0};function l$K(){this._maxVisibleValue=17976931348623157e292,this._minVisibleValue=-17976931348623157e292,this._floor=0,this._ceiling=0,this._opacity=1,this._updateColorDictTable=!1,this._coverageArea=[],this._updatePolygon=!0,this._displayMode=_0x256766.DisplayMode.FACE,this._dictColorTable=void 0}function n$u(e){var t=u$_(e.radius,1),i={radii:new o$1p(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new b$P(i),this._workerName="createSphereGeometry"}S$z.createGeometry=function(e){var t,i,n,r,o,a=e._positions,s=e._colors,l=e._colorsPerVertex,u=e._arcType,c=e._granularity,h=e._ellipsoid,d=e$2a.chordLength(c,h.maximumRadius),f=e$2b(s)&&!l,p=a.length,_=0;if(u===m$1f.GEODESIC||u===m$1f.RHUMB){var m,g,x;u===m$1f.GEODESIC?(m=e$2a.chordLength(c,h.maximumRadius),g=m$V.numberOfPoints,x=m$V.generateArc):(m=c,g=m$V.numberOfPointsRhumbLine,x=m$V.generateRhumbArc);var v=m$V.extractHeights(a,h),y=te$p;if(u===m$1f.GEODESIC?y.minDistance=d:y.granularity=c,y.ellipsoid=h,f){var $=0;for(t=0;t<p-1;t++)$+=g(a[t],a[t+1],m)+1;i=new Float64Array(3*$),r=new Uint8Array(4*$),y.positions=U$C,y.height=q$F;var b=0;for(t=0;t<p-1;++t){U$C[0]=a[t],U$C[1]=a[t+1],q$F[0]=v[t],q$F[1]=v[t+1];var T=x(y);if(e$2b(s)){var C=T.length/3;o=s[t];for(var S=0;S<C;++S)r[b++]=e$1U.floatToByte(o.red),r[b++]=e$1U.floatToByte(o.green),r[b++]=e$1U.floatToByte(o.blue),r[b++]=e$1U.floatToByte(o.alpha)}i.set(T,_),_+=T.length}}else if(y.positions=a,y.height=v,i=new Float64Array(x(y)),e$2b(s)){for(r=new Uint8Array(i.length/3*4),t=0;t<p-1;++t){_=ae$l(a[t],a[t+1],s[t],s[t+1],d,r,_)}var w=s[p-1];r[_++]=e$1U.floatToByte(w.red),r[_++]=e$1U.floatToByte(w.green),r[_++]=e$1U.floatToByte(w.blue),r[_++]=e$1U.floatToByte(w.alpha)}}else{n=f?2*p-2:p,i=new Float64Array(3*n),r=e$2b(s)?new Uint8Array(4*n):void 0;var E=0,P=0;for(t=0;t<p;++t){var A=a[t];if(f&&t>0&&(o$1p.pack(A,i,E),E+=3,o=s[t-1],r[P++]=e$1U.floatToByte(o.red),r[P++]=e$1U.floatToByte(o.green),r[P++]=e$1U.floatToByte(o.blue),r[P++]=e$1U.floatToByte(o.alpha)),f&&t===p-1)break;o$1p.pack(A,i,E),E+=3,e$2b(s)&&(o=s[t],r[P++]=e$1U.floatToByte(o.red),r[P++]=e$1U.floatToByte(o.green),r[P++]=e$1U.floatToByte(o.blue),r[P++]=e$1U.floatToByte(o.alpha))}}var L=new a$_;L.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:i}),e$2b(s)&&(L.color=new o$1c({componentDatatype:S$12.UNSIGNED_BYTE,componentsPerAttribute:4,values:r,normalize:!0}));var M=2*((n=i.length/3)-1),R=ce$x.createTypedArray(n,M),O=0;for(t=0;t<n-1;++t)R[O++]=t,R[O++]=t+1;return new I$1p({attributes:L,indices:R,primitiveType:W$18.LINES,boundingSphere:i$1c.fromPoints(a)})},l$K.prototype.destroy=function(){this._coverageArea.length=0,e$2b(this._dictColorTable)&&this._dictColorTable.destroy()},Object.defineProperties(l$K.prototype,{MinVisibleValue:{get:function(){return this._minVisibleValue},set:function(e){this._minVisibleValue=e}},MaxVisibleValue:{get:function(){return this._maxVisibleValue},set:function(e){this._maxVisibleValue=e}},ColorTableMaxKey:{get:function(){return this._ceiling},set:function(e){this._ceiling=e}},ColorTableMinKey:{get:function(){return this._floor},set:function(e){this._floor=e}},ColorTable:{get:function(){return this._dictColorTable},set:function(e){if(e$2b(e)){this._dictColorTable=i$S.clone(e,this._dictColorTable),this._updateColorDictTable=!0;var t=this._dictColorTable.count();if(!(t<1)){new e$1U;var i=0,n=0,r=this._dictColorTable.getItem(0);e$2b(r)&&e$2b(r.altitude)&&(i=parseFloat(r.altitude)),e$2b(r=this._dictColorTable.getItem(t-1))&&e$2b(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n)}}else e$2b(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null)}},Opacity:{get:function(){return this._opacity},set:function(e){this._opacity=e}},CoverageArea:{get:function(){return this._coverageArea},set:function(e){if(this._updatePolygon=!0,this._coverageArea.length=0,e$2b(e))for(var t=0;t<e.length;t++)this._coverageArea[t]=e[t]}},DisplayMode:{get:function(){return this._displayMode},set:function(e){this._displayMode=e}},UpdateColorDictTable:{get:function(){return this._updateColorDictTable},set:function(e){this._updateColorDictTable=e}},UpdatePolygonRegion:{get:function(){return this._updatePolygon},set:function(e){this._updatePolygon=e}}}),l$K.clone=function(e,t){if(e$2b(e)){e$2b(t)||(t=new l$K),t._maxVisibleValue=e._maxVisibleValue,t._minVisibleValue=e._minVisibleValue,t._floor=e._floor,t._ceiling=e._ceiling,t._opacity=e._opacity,t._updateColorDictTable=e._updateColorDictTable,t._updatePolygon=e._updatePolygon,t._displayMode=e._displayMode,t._dictColorTable=i$S.clone(e._dictColorTable,t._dictColorTable),t._coverageArea.length=0;for(var i=0;i<e._coverageArea.length;i++)t._coverageArea[i]=e._coverageArea[i];return t}},n$u.packedLength=b$P.packedLength,n$u.pack=function(e,t,i){return o$1q.typeOf.object("value",e),b$P.pack(e._ellipsoidGeometry,t,i)};var p$E=new b$P,r$F={radius:void 0,radii:new o$1p,vertexFormat:new n$11,stackPartitions:void 0,slicePartitions:void 0};function c$A(e,t,i){this.clock=u$_(e,0),this.cone=u$_(t,0),this.magnitude=u$_(i,1)}function f$I(e){this.url=u$_(e.url,"")}function r$E(){t$16.throwInstantiationError()}function o$C(e){throw new t$16("This type should not be instantiated directly. Instead, use WebMercatorTilingScheme or GeographicTilingScheme.")}function D$D(e,t){return a$15.compare(e.start,t.start)}function c$z(e){if(this._intervals=[],this._changedEvent=new o$1h,e$2b(e))for(var t=e.length,i=0;i<t;i++)this.addInterval(e[i])}n$u.unpack=function(e,t,i){var n=b$P.unpack(e,t,p$E);return r$F.vertexFormat=n$11.clone(n._vertexFormat,r$F.vertexFormat),r$F.stackPartitions=n._stackPartitions,r$F.slicePartitions=n._slicePartitions,e$2b(i)?(o$1p.clone(n._radii,r$F.radii),i._ellipsoidGeometry=new b$P(r$F),i):(r$F.radius=n._radii.x,new n$u(r$F))},n$u.createGeometry=function(e){return b$P.createGeometry(e._ellipsoidGeometry)},c$A.fromCartesian3=function(e,t){o$1q.typeOf.object("cartesian3",e);var i=e.x,n=e.y,r=e.z,o=i*i+n*n;return e$2b(t)||(t=new c$A),t.clock=Math.atan2(n,i),t.cone=Math.atan2(Math.sqrt(o),r),t.magnitude=Math.sqrt(o+r*r),t},c$A.clone=function(e,t){if(e$2b(e))return e$2b(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new c$A(e.clock,e.cone,e.magnitude)},c$A.normalize=function(e,t){return o$1q.typeOf.object("spherical",e),e$2b(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new c$A(e.clock,e.cone,1)},c$A.equals=function(e,t){return e===t||e$2b(e)&&e$2b(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude},c$A.equalsEpsilon=function(e,t,i){return i=u$_(i,0),e===t||e$2b(e)&&e$2b(t)&&Math.abs(e.clock-t.clock)<=i&&Math.abs(e.cone-t.cone)<=i&&Math.abs(e.magnitude-t.magnitude)<=i},c$A.prototype.equals=function(e){return c$A.equals(this,e)},c$A.prototype.clone=function(e){return c$A.clone(this,e)},c$A.prototype.equalsEpsilon=function(e,t){return c$A.equalsEpsilon(this,e,t)},c$A.prototype.toString=function(){return"("+this.clock+", "+this.cone+", "+this.magnitude+")"},f$I.checkSptialLicense=function(e){if(!e$2b(e))throw new t$16("url is required");if("string"!=typeof e)throw new t$16("url must be a string");var t=e.lastIndexOf("realspace");if(-1===t)return o$1l.resolve(!1).then((function(){return!1})).otherwise((function(){return!1}));var i=e.substring(0,t);return e=i+"realspace/spatiallicense.xml",e$2b(a$O.CREDENTIAL)&&(e=a$O.addToken(e)),p$_({url:e,responseType:"text"}).then((function(e){return-1!==e.indexOf("<boolean>true</boolean>")})).otherwise((function(e){return!1}))},Object.defineProperties(r$E.prototype,{credits:{get:t$16.throwInstantiationError},waterMask:{get:t$16.throwInstantiationError}}),r$E.prototype.interpolateHeight=t$16.throwInstantiationError,r$E.prototype.isChildAvailable=t$16.throwInstantiationError,r$E.prototype.createMesh=t$16.throwInstantiationError,r$E.prototype.upsample=t$16.throwInstantiationError,r$E.prototype.wasCreatedByUpsampling=t$16.throwInstantiationError,Object.defineProperties(o$C.prototype,{ellipsoid:{get:t$16.throwInstantiationError},rectangle:{get:t$16.throwInstantiationError},projection:{get:t$16.throwInstantiationError}}),o$C.prototype.getNumberOfXTilesAtLevel=t$16.throwInstantiationError,o$C.prototype.getNumberOfYTilesAtLevel=t$16.throwInstantiationError,o$C.prototype.rectangleToNativeRectangle=t$16.throwInstantiationError,o$C.prototype.tileXYToNativeRectangle=t$16.throwInstantiationError,o$C.prototype.tileXYToRectangle=t$16.throwInstantiationError,o$C.prototype.positionToTileXY=t$16.throwInstantiationError,Object.defineProperties(c$z.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){var e=this._intervals;return 0===e.length?void 0:e[0].start}},isStartIncluded:{get:function(){var e=this._intervals;return 0!==e.length&&e[0].isStartIncluded}},stop:{get:function(){var e=this._intervals,t=e.length;return 0===t?void 0:e[t-1].stop}},isStopIncluded:{get:function(){var e=this._intervals,t=e.length;return 0!==t&&e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return 0===this._intervals.length}}}),c$z.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof c$z))return!1;var i=this._intervals,n=e._intervals,r=i.length;if(r!==n.length)return!1;for(var o=0;o<r;o++)if(!d$W.equals(i[o],n[o],t))return!1;return!0},c$z.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return this._intervals[e]},c$z.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))},c$z.prototype.findIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t]:void 0},c$z.prototype.findDataForIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0},c$z.prototype.contains=function(e){return this.indexOf(e)>=0};var q$E=new d$W;c$z.prototype.indexOf=function(e){if(!e$2b(e))throw new t$16("date is required");var t=this._intervals;q$E.start=e,q$E.stop=e;var i=a$17(t,q$E,D$D);return i>=0?t[i].isStartIncluded?i:i>0&&t[i-1].stop.equals(e)&&t[i-1].isStopIncluded?i-1:~i:(i=~i)>0&&i-1<t.length&&d$W.contains(t[i-1],e)?i-1:~i},c$z.prototype.findInterval=function(e){for(var t=(e=u$_(e,u$_.EMPTY_OBJECT)).start,i=e.stop,n=e.isStartIncluded,r=e.isStopIncluded,o=this._intervals,a=0,s=o.length;a<s;a++){var l=o[a];if((!e$2b(t)||l.start.equals(t))&&(!e$2b(i)||l.stop.equals(i))&&(!e$2b(n)||l.isStartIncluded===n)&&(!e$2b(r)||l.isStopIncluded===r))return o[a]}},c$z.prototype.addInterval=function(e,t){if(!e$2b(e))throw new t$16("interval is required");if(!e.isEmpty){var i=this._intervals;if(0===i.length||a$15.greaterThan(e.start,i[i.length-1].stop))return i.push(e),void this._changedEvent.raiseEvent(this);var n,r=a$17(i,e,D$D);for(r<0?r=~r:r>0&&e.isStartIncluded&&i[r-1].isStartIncluded&&i[r-1].start.equals(e.start)?--r:r<i.length&&!e.isStartIncluded&&i[r].isStartIncluded&&i[r].start.equals(e.start)&&++r,r>0&&(((n=a$15.compare(i[r-1].stop,e.start))>0||0===n&&(i[r-1].isStopIncluded||e.isStartIncluded))&&((e$2b(t)?t(i[r-1].data,e.data):i[r-1].data===e.data)?(e=a$15.greaterThan(e.stop,i[r-1].stop)?new d$W({start:i[r-1].start,stop:e.stop,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):new d$W({start:i[r-1].start,stop:i[r-1].stop,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:i[r-1].isStopIncluded||e.stop.equals(i[r-1].stop)&&e.isStopIncluded,data:e.data}),i.splice(r-1,1),--r):(((n=a$15.compare(i[r-1].stop,e.stop))>0||0===n&&i[r-1].isStopIncluded&&!e.isStopIncluded)&&i.splice(r,0,new d$W({start:e.stop,stop:i[r-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[r-1].isStopIncluded,data:i[r-1].data})),i[r-1]=new d$W({start:i[r-1].start,stop:e.start,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:i[r-1].data}))));r<i.length&&((n=a$15.compare(e.stop,i[r].start))>0||0===n&&(e.isStopIncluded||i[r].isStartIncluded));)if(e$2b(t)?t(i[r].data,e.data):i[r].data===e.data)e=new d$W({start:e.start,stop:a$15.greaterThan(i[r].stop,e.stop)?i[r].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:a$15.greaterThan(i[r].stop,e.stop)?i[r].isStopIncluded:e.isStopIncluded,data:e.data}),i.splice(r,1);else{if(i[r]=new d$W({start:e.stop,stop:i[r].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[r].isStopIncluded,data:i[r].data}),!i[r].isEmpty)break;i.splice(r,1)}i.splice(r,0,e),this._changedEvent.raiseEvent(this)}},c$z.prototype.removeInterval=function(e){if(!e$2b(e))throw new t$16("interval is required");if(e.isEmpty)return!1;var t=this._intervals,i=a$17(t,e,D$D);i<0&&(i=~i);var n=!1;for(i>0&&(a$15.greaterThan(t[i-1].stop,e.start)||t[i-1].stop.equals(e.start)&&t[i-1].isStopIncluded&&e.isStartIncluded)&&(n=!0,(a$15.greaterThan(t[i-1].stop,e.stop)||t[i-1].isStopIncluded&&!e.isStopIncluded&&t[i-1].stop.equals(e.stop))&&t.splice(i,0,new d$W({start:e.stop,stop:t[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i-1].isStopIncluded,data:t[i-1].data})),t[i-1]=new d$W({start:t[i-1].start,stop:e.start,isStartIncluded:t[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[i-1].data})),i<t.length&&!e.isStartIncluded&&t[i].isStartIncluded&&e.start.equals(t[i].start)&&(n=!0,t.splice(i,0,new d$W({start:t[i].start,stop:t[i].start,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data})),++i);i<t.length&&a$15.greaterThan(e.stop,t[i].stop);)n=!0,t.splice(i,1);return i<t.length&&e.stop.equals(t[i].stop)&&(n=!0,!e.isStopIncluded&&t[i].isStopIncluded?i+1<t.length&&t[i+1].start.equals(e.stop)&&t[i].data===t[i+1].data?(t.splice(i,1),t[i]=new d$W({start:t[i].start,stop:t[i].stop,isStartIncluded:!0,isStopIncluded:t[i].isStopIncluded,data:t[i].data})):t[i]=new d$W({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data}):t.splice(i,1)),i<t.length&&(a$15.greaterThan(e.stop,t[i].start)||e.stop.equals(t[i].start)&&e.isStopIncluded&&t[i].isStartIncluded)&&(n=!0,t[i]=new d$W({start:e.stop,stop:t[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i].isStopIncluded,data:t[i].data})),n&&this._changedEvent.raiseEvent(this),n},c$z.prototype.intersect=function(e,t,i){if(!e$2b(e))throw new t$16("other is required.");for(var n=new c$z,r=0,o=0,a=this._intervals,s=e._intervals;r<a.length&&o<s.length;){var l=a[r],u=s[o];if(a$15.lessThan(l.stop,u.start))++r;else if(a$15.lessThan(u.stop,l.start))++o;else{if(e$2b(i)||e$2b(t)&&t(l.data,u.data)||!e$2b(t)&&u.data===l.data){var c=d$W.intersect(l,u,new d$W,i);c.isEmpty||n.addInterval(c,t)}a$15.lessThan(l.stop,u.stop)||l.stop.equals(u.stop)&&!l.isStopIncluded&&u.isStopIncluded?++r:++o}}return n},c$z.fromJulianDateArray=function(e,t){if(!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.julianDates))throw new t$16("options.iso8601Array is required.");e$2b(t)||(t=new c$z);var i,n=e.julianDates,r=n.length,o=e.dataCallback,a=u$_(e.isStartIncluded,!0),s=u$_(e.isStopIncluded,!0),l=u$_(e.leadingInterval,!1),u=u$_(e.trailingInterval,!1),c=0;l&&(++c,(i=new d$W({start:o$H.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!a})).data=e$2b(o)?o(i,t.length):t.length,t.addInterval(i));for(var h=0;h<r-1;++h){var d=n[h],f=n[h+1];(i=new d$W({start:d,stop:f,isStartIncluded:t.length!==c||a,isStopIncluded:h===r-2&&s})).data=e$2b(o)?o(i,t.length):t.length,t.addInterval(i),d=f}return u&&((i=new d$W({start:n[r-1],stop:o$H.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0})).data=e$2b(o)?o(i,t.length):t.length,t.addInterval(i)),t};var I$M=new d$1r,m$D=[0,31,28,31,30,31,30,31,31,30,31,30,31];function _$y(e,t,i){e$2b(i)||(i=new a$15),a$15.toGregorianDate(e,I$M);var n=I$M.millisecond+t.millisecond,r=I$M.second+t.second,o=I$M.minute+t.minute,a=I$M.hour+t.hour,s=I$M.day+t.day,l=I$M.month+t.month,u=I$M.year+t.year;for(n>=1e3&&(r+=Math.floor(n/1e3),n%=1e3),r>=60&&(o+=Math.floor(r/60),r%=60),o>=60&&(a+=Math.floor(o/60),o%=60),a>=24&&(s+=Math.floor(a/24),a%=24),m$D[2]=i$1b(u)?29:28;s>m$D[l]||l>=13;)s>m$D[l]&&(s-=m$D[l],++l),l>=13&&(--l,u+=Math.floor(l/12),l%=12,++l),m$D[2]=i$1b(u)?29:28;return I$M.millisecond=n,I$M.second=r,I$M.minute=o,I$M.hour=a,I$M.day=s,I$M.month=l,I$M.year=u,a$15.fromGregorianDate(I$M,i)}var k$w=new a$15,N$w=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function A$K(e,t){if(!e$2b(e)||0===e.length)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,"P"===e[0]){var i=e.match(N$w);if(!e$2b(i))return!1;if(e$2b(i[1])&&(t.year=Number(i[1].replace(",","."))),e$2b(i[2])&&(t.month=Number(i[2].replace(",","."))),e$2b(i[3])&&(t.day=7*Number(i[3].replace(",","."))),e$2b(i[4])&&(t.day+=Number(i[4].replace(",","."))),e$2b(i[5])&&(t.hour=Number(i[5].replace(",","."))),e$2b(i[6])&&(t.minute=Number(i[6].replace(",","."))),e$2b(i[7])){var n=Number(i[7].replace(",","."));t.second=Math.floor(n),t.millisecond=n%1*1e3}}else"Z"!==e[e.length-1]&&(e+="Z"),a$15.toGregorianDate(a$15.fromIso8601(e,k$w),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var w$y=new d$1r;function n$t(e){e=u$_(e,u$_.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=u$_(e.epoch,o$H.MINIMUM_VALUE),this.tolerance=u$_(e.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}function p$D(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}function B$z(e,t){this.rectangle=e,this.maxLevel=t}function l$J(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url))throw new t$16("options.url is required.");var t=t$11.createIfNeeded(e.url);this._resource=t,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer(),this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:16777215};var i=e.credit;"string"==typeof i&&(i=new r$T(i)),this._credit=i,this._tilingScheme=void 0,this._rectangles=[];var n,r=this,o=u$_(e.ellipsoid,t$13.WGS84);function a(e){var t=e.getElementsByTagName("SRS")[0].textContent;if("EPSG:4326"===t){r._tilingScheme=new g$13({ellipsoid:o});var i=e.getElementsByTagName("TileFormat")[0];r._heightmapWidth=parseInt(i.getAttribute("width"),10),r._heightmapHeight=parseInt(i.getAttribute("height"),10),r._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,Math.min(r._heightmapWidth,r._heightmapHeight),r._tilingScheme.getNumberOfXTilesAtLevel(0));for(var n=e.getElementsByTagName("DataExtent"),a=0;a<n.length;++a){var l=n[a],u=e$2a.toRadians(parseFloat(l.getAttribute("minx"))),c=e$2a.toRadians(parseFloat(l.getAttribute("miny"))),h=e$2a.toRadians(parseFloat(l.getAttribute("maxx"))),d=e$2a.toRadians(parseFloat(l.getAttribute("maxy"))),f=parseInt(l.getAttribute("maxlevel"),10);r._rectangles.push(new B$z(new h$18(u,c,h,d),f))}r._ready=!0,r._readyPromise.resolve(!0)}else s("SRS "+t+" is not supported.")}function s(e){var t=u$_(e,"An error occurred while accessing "+r._resource.url+".");n=l$W.handleError(n,r,r._errorEvent,t,void 0,void 0,void 0,l)}function l(){o$1l(r._resource.fetchXML(),a,s)}l()}c$z.fromIso8601=function(e,t){if(!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.iso8601))throw new t$16("options.iso8601 is required.");var i=e.iso8601.split("/"),n=a$15.fromIso8601(i[0]),r=a$15.fromIso8601(i[1]),o=[];if(A$K(i[2],w$y)){var a=a$15.clone(n);for(o.push(a);a$15.compare(a,r)<0;){a=_$y(a,w$y),a$15.compare(r,a)<=0&&a$15.clone(r,a),o.push(a)}}else o.push(n,r);return c$z.fromJulianDateArray({julianDates:o,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},c$z.fromIso8601DateArray=function(e,t){if(!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.iso8601Dates))throw new t$16("options.iso8601Dates is required.");return c$z.fromJulianDateArray({julianDates:e.iso8601Dates.map((function(e){return a$15.fromIso8601(e)})),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},c$z.fromIso8601DurationArray=function(e,t){if(!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.epoch))throw new t$16("options.epoch is required.");if(!e$2b(e.iso8601Durations))throw new t$16("options.iso8601Durations is required.");for(var i,n,r=e.epoch,o=e.iso8601Durations,a=u$_(e.relativeToPrevious,!1),s=[],l=o.length,u=0;u<l;++u)(A$K(o[u],w$y)||0===u)&&(i=a&&e$2b(n)?_$y(n,w$y):_$y(r,w$y),s.push(i),n=i);return c$z.fromJulianDateArray({julianDates:s,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},Object.defineProperties(n$t.prototype,{clock:{get:function(){return this._clock},set:function(e){var t=this._clock;t!==e&&(e$2b(t)&&(this._clockSubscription(),this._clockSubscription=void 0),e$2b(e)&&(this._clockSubscription=e.onTick.addEventListener(n$t.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){var t=this._element;t!==e&&(e$2b(t)&&t.removeEventListener("seeked",this._seekFunction,!1),e$2b(e)&&(this._seeking=!1,this._seekFunction=p$D(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}}),n$t.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,i$10(this)},n$t.prototype.isDestroyed=function(){return!1},n$t.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate!==e.multiplier){var t=this._element;try{t.playbackRate=e.multiplier}catch{t.playbackRate=0}this._lastPlaybackRate=e.multiplier}},n$t.prototype._onTick=function(e){var t=this._element;if(e$2b(t)&&!(t.readyState<2)){var i=t.paused,n=e.shouldAnimate;if(n===i&&(n?t.play():t.pause()),this._seeking||this._firstTickAfterSeek)return void(this._firstTickAfterSeek=!1);this._trySetPlaybackRate(e);var r,o=e.currentTime,a=u$_(this.epoch,o$H.MINIMUM_VALUE),s=a$15.secondsDifference(o,a),l=t.duration,u=t.currentTime;t.loop?((s%=l)<0&&(s=l-s),r=s):r=s>l?l:s<0?0:s;var c=n?u$_(this.tolerance,1):.001;Math.abs(r-u)>c&&(this._seeking=!0,t.currentTime=r)}},Object.defineProperties(l$J.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$16("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),l$J.prototype.requestTileGeometry=function(e,t,i,n){if(!this.ready)throw new t$16("requestTileGeometry must not be called before ready returns true.");var r=this._tilingScheme.getNumberOfYTilesAtLevel(i),o=this._resource.getDerivedResource({url:i+"/"+e+"/"+(r-t-1)+".tif",queryParameters:{supermap3d:!0},request:n}).fetchImage({preferImageBitmap:!0});if(e$2b(o)){var a=this;return o$1l(o).then((function(n){return new T$J({buffer:d$13(n),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:W$F(a,e,t,i),structure:a._terrainDataStructure})}))}},l$J.prototype.getLevelMaximumGeometricError=function(e){if(!this.ready)throw new t$16("requestTileGeometry must not be called before ready returns true.");return this._levelZeroMaximumGeometricError/(1<<e)};var S$y=new h$18;function W$F(e,t,i,n){for(var r=e._tilingScheme,o=e._rectangles,a=r.tileXYToRectangle(t,i,n),s=0,l=0;l<o.length&&15!==s;++l){var u=o[l];if(!(u.maxLevel<=n)){var c=u.rectangle;e$2b(h$18.intersection(c,a,S$y))&&(y$z(r,c,2*t,2*i,n+1)&&(s|=4),y$z(r,c,2*t+1,2*i,n+1)&&(s|=8),y$z(r,c,2*t,2*i+1,n+1)&&(s|=1),y$z(r,c,2*t+1,2*i+1,n+1)&&(s|=2))}}return s}function y$z(e,t,i,n,r){var o=e.tileXYToRectangle(i,n,r);return e$2b(h$18.intersection(o,t,S$y))}l$J.prototype.getTileDataAvailable=function(e,t,i){},l$J.prototype.loadTileDataAvailability=function(e,t,i){};var _$x={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},VulkanConstants=Object.freeze(_$x),D$C={};function x$I(e,t){return e$2a.equalsEpsilon(e.latitude,t.latitude,e$2a.EPSILON10)&&e$2a.equalsEpsilon(e.longitude,t.longitude,e$2a.EPSILON10)}var M$F=new a$18,R$x=new a$18;function U$B(e,t,i,n){var r=(t=D$11(t,o$1p.equalsEpsilon)).length;if(!(r<2)){var o=e$2b(n),a=e$2b(i),s=!0,l=new Array(r),u=new Array(r),c=new Array(r),h=t[0];l[0]=h;var d=e.cartesianToCartographic(h,M$F);a&&(d.height=i[0]),s=s&&0==d.height,u[0]=d.height,c[0]=o?n[0]:0;for(var f=1,p=1;p<r;++p){var _=t[p],m=e.cartesianToCartographic(_,R$x);a&&(m.height=i[p]),s=s&&0==m.height,x$I(d,m)?d.height<m.height&&(u[f-1]=m.height):(l[f]=_,u[f]=m.height,c[f]=o?n[p]:0,a$18.clone(m,d),++f)}if(!(s||f<2))return l.length=f,u.length=f,c.length=f,{positions:l,topHeights:u,bottomHeights:c}}}var z$z=new Array(2),G$F=new Array(2),W$E={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};function O$v(e,t){for(var i=new Array(e.length),n=0;n<e.length;n+=3){var r=new o$1p(e[n],e[n+1],e[n+2]);p$1d.multiplyByPoint(t,r,r),i[n]=r.x,i[n+1]=r.y,i[n+2]=r.z}return i}D$C.computePositions=function(e,t,i,n,r,o,a){var s=U$B(e,t,i,n);if(e$2b(s)){var l=m$17.eastNorthUpToFixedFrame(s.positions[0],e,new p$1d),u=p$1d.inverse(l,new p$1d);t=s.positions,i=s.topHeights,n=s.bottomHeights;var c,h,d,f,p=t.length,_=p-2,m=e$2a.chordLength(r,e.maximumRadius),g=W$E;if(g.minDistance=m,g.ellipsoid=e,o){var x,v=0;for(x=0;x<p-1;x++)v+=m$V.numberOfPoints(t[x],t[x+1],m)+1;c=new Float64Array(3*v),h=new Float64Array(3*v),e$2b(a)&&(d=new Float64Array(3*v),f=new Float64Array(3*v));var y=z$z,$=G$F;g.positions=y,g.height=$;var b=0;for(x=0;x<p-1;x++){y[0]=t[x],y[1]=t[x+1],$[0]=i[x],$[1]=i[x+1];var T=m$V.generateArc(g);c.set(T,b),e$2b(a)&&d.set(O$v(T,u),b),$[0]=n[x],$[1]=n[x+1],h.set(m$V.generateArc(g),b),e$2b(a)&&f.set(O$v(m$V.generateArc(g),u),b),b+=T.length}}else g.positions=t,g.height=i,c=new Float64Array(m$V.generateArc(g)),e$2b(a)&&(d=new Float64Array(O$v(m$V.generateArc(g)))),g.height=n,h=new Float64Array(m$V.generateArc(g)),e$2b(a)&&(f=new Float64Array(O$v(m$V.generateArc(g))));var C={pos:{bottomPositions:h,topPositions:c,numCorners:_}};return e$2b(a)&&(C.localPos={bottomPositions:f,topPositions:d,numCorners:_}),C}};var $$B=new o$1p,U$A=new o$1p,re$t=new o$1p,ye$e=new o$1p,ne$u=new o$1p,be$k=new o$1p,Fe$e=new o$1p,Ce$d=new o$1p;function E$F(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,i=e.maximumHeights,n=e.minimumHeights;if(!e$2b(t))throw new t$16("options.positions is required.");if(e$2b(i)&&i.length!==t.length)throw new t$16("options.positions and options.maximumHeights must have the same length.");if(e$2b(n)&&n.length!==t.length)throw new t$16("options.positions and options.minimumHeights must have the same length.");var r=u$_(e.vertexFormat,n$11.DEFAULT),o=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),a=u$_(e.ellipsoid,t$13.WGS84);this._positions=t,this._minimumHeights=n,this._maximumHeights=i,this._vertexFormat=n$11.clone(r),this._granularity=o,this._ellipsoid=t$13.clone(a),this._enuCenter=e.enuCenter,this._workerName="createWallGeometry";var s=1+t.length*o$1p.packedLength+2;e$2b(n)&&(s+=n.length),e$2b(i)&&(s+=i.length),this.packedLength=s+t$13.packedLength+n$11.packedLength+1,this.packedLength+=o$1p.packedLength}E$F.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");i=u$_(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._minimumHeights;if(o=e$2b(a)?a.length:0,t[i++]=o,e$2b(a))for(n=0;n<o;++n)t[i++]=a[n];var s=e._maximumHeights;if(o=e$2b(s)?s.length:0,t[i++]=o,e$2b(s))for(n=0;n<o;++n)t[i++]=s[n];return t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,n$11.pack(e._vertexFormat,t,i),i+=n$11.packedLength,t[i++]=e._granularity,e$2b(e._enuCenter)?o$1p.pack(e._enuCenter,t,i):o$1p.pack(o$1p.ZERO,t,i),t};var ae$k=t$13.clone(t$13.UNIT_SPHERE),oe$k=new n$11,N$v={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:ae$k,vertexFormat:oe$k,granularity:void 0,enuCenter:void 0};E$F.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n,r,o,a=e[t++],s=new Array(a);for(n=0;n<a;++n,t+=o$1p.packedLength)s[n]=o$1p.unpack(e,t);if((a=e[t++])>0)for(r=new Array(a),n=0;n<a;++n)r[n]=e[t++];if((a=e[t++])>0)for(o=new Array(a),n=0;n<a;++n)o[n]=e[t++];var l=t$13.unpack(e,t,ae$k);t+=t$13.packedLength;var u=n$11.unpack(e,t,oe$k);t+=n$11.packedLength;var c=e[t++],h=o$1p.unpack(e,t);return o$1p.equals(h,o$1p.ZERO)&&(h=void 0),e$2b(i)?(i._positions=s,i._minimumHeights=r,i._maximumHeights=o,i._ellipsoid=t$13.clone(l,i._ellipsoid),i._vertexFormat=n$11.clone(u,i._vertexFormat),i._granularity=c,i._enuCenter=h,i):(N$v.positions=s,N$v.minimumHeights=r,N$v.maximumHeights=o,N$v.granularity=c,N$v.enuCenter=h,new E$F(N$v))},E$F.fromConstantHeights=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions;if(!e$2b(t))throw new t$16("options.positions is required.");var i,n,r=e.minimumHeight,o=e.maximumHeight,a=e$2b(r),s=e$2b(o);if(a||s){var l=t.length;i=a?new Array(l):void 0,n=s?new Array(l):void 0;for(var u=0;u<l;++u)a&&(i[u]=r),s&&(n[u]=o)}return new E$F({positions:t,maximumHeights:n,minimumHeights:i,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat})},E$F.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,n=e._maximumHeights,r=e._vertexFormat,o=e._granularity,a=e._ellipsoid,s=e._enuCenter,l=D$C.computePositions(a,t,n,i,o,!0,s);if(e$2b(l.pos)){var u;e$2b(s)&&(u=m$17.eastNorthUpToFixedFrame(s));var c,h=l.pos.bottomPositions,d=l.pos.topPositions,f=l.pos.numCorners,p=d.length,_=2*p,m=r.position?new Float64Array(_):void 0,g=r.normal?new Float32Array(_):void 0,x=r.tangent?new Float32Array(_):void 0,v=r.bitangent?new Float32Array(_):void 0,y=r.st?new Float32Array(_/3*2):void 0,$=0,b=0,T=0,C=0,S=0,w=Ce$d,E=Fe$e,P=be$k,A=!0,L=0,M=1/((p/=3)-t.length+1);for(c=0;c<p;++c){var R=3*c,O=o$1p.fromArray(d,R,$$B),I=o$1p.fromArray(h,R,U$A);if(r.position&&(m[$++]=I.x,m[$++]=I.y,m[$++]=I.z,m[$++]=O.x,m[$++]=O.y,m[$++]=O.z),r.st&&(y[S++]=L,y[S++]=0,y[S++]=L,y[S++]=1),r.normal||r.tangent||r.bitangent){var D,B=o$1p.clone(o$1p.ZERO,ne$u),N=a.scaleToGeodeticSurface(o$1p.fromArray(d,R,U$A),U$A);if(c+1<p&&(D=a.scaleToGeodeticSurface(o$1p.fromArray(d,R+3,re$t),re$t),B=o$1p.fromArray(d,R+3,ne$u)),A){var F=o$1p.subtract(B,O,ye$e),U=o$1p.subtract(N,O,$$B);w=o$1p.normalize(o$1p.cross(U,F,w),w),A=!1}o$1p.equalsEpsilon(D,N,e$2a.EPSILON10)?A=!0:(L+=M,r.tangent&&(E=o$1p.normalize(o$1p.subtract(D,N,E),E)),r.bitangent&&(P=o$1p.normalize(o$1p.cross(w,E,P),P))),r.normal&&(e$2b(s)&&(p$1d.multiplyByPoint(u,w,w),o$1p.normalize(w,w)),g[b++]=w.x,g[b++]=w.y,g[b++]=w.z,g[b++]=w.x,g[b++]=w.y,g[b++]=w.z),r.tangent&&(x[C++]=E.x,x[C++]=E.y,x[C++]=E.z,x[C++]=E.x,x[C++]=E.y,x[C++]=E.z),r.bitangent&&(v[T++]=P.x,v[T++]=P.y,v[T++]=P.z,v[T++]=P.x,v[T++]=P.y,v[T++]=P.z)}}var G=new a$_;r.position&&(G.position=new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:m})),r.normal&&(G.normal=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:g})),r.tangent&&(G.tangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:x})),r.bitangent&&(G.bitangent=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:v})),r.st&&(G.st=new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:y}));var z=_/3;_-=6*(f+1);var V=ce$x.createTypedArray(z,_),k=0;for(c=0;c<z-2;c+=2){var W=c,H=c+2,q=o$1p.fromArray(m,3*W,$$B),j=o$1p.fromArray(m,3*H,U$A);if(!o$1p.equalsEpsilon(q,j,e$2a.EPSILON10)){var Y=c+1,X=c+3;V[k++]=Y,V[k++]=W,V[k++]=X,V[k++]=X,V[k++]=W,V[k++]=H}}var K=new I$1p({attributes:G,indices:V,primitiveType:W$18.TRIANGLES,boundingSphere:new i$1c.fromVertices(m)});return e$2b(e._enuCenter)&&(K.attributes.position.values.set(l.localPos.topPositions,0),K.attributes.position.values.set(l.localPos.bottomPositions,K.attributes.position.values.length/2),K.attributes.position.componentDatatype=S$12.FLOAT),K}};var S$x=new o$1p,q$D=new o$1p;function w$x(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions,i=e.maximumHeights,n=e.minimumHeights;if(!e$2b(t))throw new t$16("options.positions is required.");if(e$2b(i)&&i.length!==t.length)throw new t$16("options.positions and options.maximumHeights must have the same length.");if(e$2b(n)&&n.length!==t.length)throw new t$16("options.positions and options.minimumHeights must have the same length.");var r=u$_(e.granularity,e$2a.RADIANS_PER_DEGREE),o=u$_(e.ellipsoid,t$13.WGS84);this._positions=t,this._minimumHeights=n,this._maximumHeights=i,this._granularity=r,this._ellipsoid=t$13.clone(o),this._workerName="createWallOutlineGeometry";var a=1+t.length*o$1p.packedLength+2;e$2b(n)&&(a+=n.length),e$2b(i)&&(a+=i.length),this.packedLength=a+t$13.packedLength+1}w$x.pack=function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");i=u$_(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._minimumHeights;if(o=e$2b(a)?a.length:0,t[i++]=o,e$2b(a))for(n=0;n<o;++n)t[i++]=a[n];var s=e._maximumHeights;if(o=e$2b(s)?s.length:0,t[i++]=o,e$2b(s))for(n=0;n<o;++n)t[i++]=s[n];return t$13.pack(e._ellipsoid,t,i),t[i+=t$13.packedLength]=e._granularity,t};var G$E=t$13.clone(t$13.UNIT_SPHERE),A$J={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:G$E,granularity:void 0};function t$x(e){switch(e){case de$x.FLOAT:return"float";case de$x.FLOAT_VEC2:return"vec2";case de$x.FLOAT_VEC3:return"vec3";case de$x.FLOAT_VEC4:return"vec4";case de$x.FLOAT_MAT2:return"mat2";case de$x.FLOAT_MAT3:return"mat3";case de$x.FLOAT_MAT4:return"mat4";case de$x.SAMPLER_2D:return"sampler2D";case de$x.BOOL:return"bool"}}w$x.unpack=function(e,t,i){if(!e$2b(e))throw new t$16("array is required");t=u$_(t,0);var n,r,o,a=e[t++],s=new Array(a);for(n=0;n<a;++n,t+=o$1p.packedLength)s[n]=o$1p.unpack(e,t);if((a=e[t++])>0)for(r=new Array(a),n=0;n<a;++n)r[n]=e[t++];if((a=e[t++])>0)for(o=new Array(a),n=0;n<a;++n)o[n]=e[t++];var l=t$13.unpack(e,t,G$E),u=e[t+=t$13.packedLength];return e$2b(i)?(i._positions=s,i._minimumHeights=r,i._maximumHeights=o,i._ellipsoid=t$13.clone(l,i._ellipsoid),i._granularity=u,i):(A$J.positions=s,A$J.minimumHeights=r,A$J.maximumHeights=o,A$J.granularity=u,new w$x(A$J))},w$x.fromConstantHeights=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).positions;if(!e$2b(t))throw new t$16("options.positions is required.");var i,n,r=e.minimumHeight,o=e.maximumHeight,a=e$2b(r),s=e$2b(o);if(a||s){var l=t.length;i=a?new Array(l):void 0,n=s?new Array(l):void 0;for(var u=0;u<l;++u)a&&(i[u]=r),s&&(n[u]=o)}return new w$x({positions:t,maximumHeights:n,minimumHeights:i,ellipsoid:e.ellipsoid})},w$x.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,n=e._maximumHeights,r=e._granularity,o=e._ellipsoid,a=D$C.computePositions(o,t,n,i,r,!1);if(e$2b(a)){var s,l=a.pos.bottomPositions,u=a.pos.topPositions,c=u.length,h=2*c,d=new Float64Array(h),f=0;for(c/=3,s=0;s<c;++s){var p=3*s,_=o$1p.fromArray(u,p,S$x),m=o$1p.fromArray(l,p,q$D);d[f++]=m.x,d[f++]=m.y,d[f++]=m.z,d[f++]=_.x,d[f++]=_.y,d[f++]=_.z}var g=new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:d})}),x=h/3;h=2*x-4+x;var v=ce$x.createTypedArray(x,h),y=0;for(s=0;s<x-2;s+=2){var $=s,b=s+2,T=o$1p.fromArray(d,3*$,S$x),C=o$1p.fromArray(d,3*b,q$D);if(!o$1p.equalsEpsilon(T,C,e$2a.EPSILON10)){var S=s+1,w=s+3;v[y++]=S,v[y++]=$,v[y++]=S,v[y++]=w,v[y++]=$,v[y++]=b}}return v[y++]=x-2,v[y++]=x-1,new I$1p({attributes:g,indices:v,primitiveType:W$18.LINES,boundingSphere:new i$1c.fromVertices(d)})}};var u$D={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3};function l$I(e,t,i){this._url=e,this._maximumActiveTasks=u$_(i.maximumActiveTasks,100),this._activeTasks=0,this._deferreds={},this._nextID=0,this._event=t,this._enableHeartCheck=u$_(i.enableHeartCheck,!1),this._heartTimeOut=u$_(i.heartTimeOut,1e4),this._createWS(t)}function x$H(e,t){if(t instanceof ArrayBuffer){--e._activeTasks;var i=new DataView(t).getInt32(0,!0);if(!e$2b(i))return;var n=e._deferreds,r=n[i];if(e$2b(r)){if("blob"===r.binaryType)4===t.byteLength?r.reject(404):r.resolve(new Blob([t.slice(4,t.byteLength)]));else if("arraybuffer"===r.binaryType)if(4===t.byteLength)r.reject(404);else{var o=t.slice(4,t.byteLength);r.extratiles?r.progress(o):r.resolve(o)}else{t=t.slice(4,t.byteLength);var a=a$K(new Uint8Array(t));if("json"===r.binaryType){var s=JSON.parse(a);r.resolve(s)}else r.resolve(a)}!0!==r.extratiles&&delete n[i]}}}function m$C(e,t,i,n){var r;return-1!==t.indexOf("extratiles=")?(n.extratiles=!0,r={id:e,binaryType:u$_(i,"blob"),tileName:t.substring(0,t.indexOf("?")),extraTiles:t.substring(t.indexOf("extratiles=")+11)}):(n.extratiles=!1,r={id:e,binaryType:u$_(i,"blob"),tileName:t}),JSON.stringify(r)}function r$D(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).weights,i=e.times;if(o$1q.defined("weights",t),o$1q.defined("times",i),o$1q.typeOf.number.greaterThanOrEquals("weights.length",t.length,3),t.length%i.length!=0)throw new t$16("times.length must be a factor of weights.length.");this._times=i,this._weights=t,this._count=t.length/i.length,this._lastTimeIndex=0}function e$O(e,t,i){if("function"!=typeof t)throw new t$16("oldFunction is required to be a function.");if("function"!=typeof i)throw new t$16("oldFunction is required to be a function.");return function(){i.apply(e,arguments),t.apply(e,arguments)}}l$I.prototype.scheduleTask=function(e,t){var i=this;if(!this.isOpened()){var n=o$1l.defer();return this._event.addEventListener((function(r){if(r===u$D.OPEN){++i._activeTasks;var o=i,a=o._nextID++;o._deferreds[a]=n,n.binaryType=t;var s=m$C(a,e,t,n);o._ws.send(s)}})),n.promise}if(!(this._activeTasks>=this._maximumActiveTasks)){++this._activeTasks;var r=this,o=r._nextID++;n=o$1l.defer();r._deferreds[o]=n,n.binaryType=t;var a=m$C(o,e,t,n);return r._ws.send(a),n.promise}},l$I.prototype._createWS=function(e){this._ws=new WebSocket(this._url),this._ws.binaryType="arraybuffer";var t=this;this._ws.onopen=function(){e.raiseEvent(u$D.OPEN)},this._ws.onclose=function(){e.raiseEvent(u$D.CLOSED)},this._ws.onerror=function(){error=new t$14("open failure"),e.raiseEvent(error)},this._ws.onmessage=function(e){x$H(t,e.data)}},l$I.prototype.isOpened=function(){return this._ws&&this._ws.readyState===u$D.OPEN},l$I.prototype.close=function(){this._ws.close()},Object.defineProperties(r$D.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}}),r$D.prototype.findTimeInterval=n$G.prototype.findTimeInterval,r$D.prototype.wrapTime=n$G.prototype.wrapTime,r$D.prototype.clampTime=n$G.prototype.clampTime,r$D.prototype.evaluate=function(e,t){var i=this.weights,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);e$2b(t)||(t=new Array(this._count));for(var a=0;a<this._count;a++){var s=r*this._count+a;t[a]=i[s]*(1-o)+i[s+this._count]*o}return t};var e$N={DONE:0,PENDING:1,FAILED:2},R$w=Object.freeze(e$N),U$z=e$1U.WHITE,z$y=o$1p.ZERO,A$I=k$P.NONE,I$L=o$1o.ZERO,P$z=1,q$C=0,H$G=o$1p.ZERO,T$C=j$T.CENTER,L$K=S$O.CENTER,M$E=!1,Z$z=new o$1p,F$G=new e$1U,j$A=new o$1p,W$D=new o$1o,k$v=new o$Y,J$x=new o$Y,K$z=new o$Y,Q$z=new f$18,X$v=new r$Y;function C$D(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function g$I(e,t){if(!e$2b(e))throw new t$16("entityCluster is required.");if(!e$2b(t))throw new t$16("entityCollection is required.");t.collectionChanged.addEventListener(g$I.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1N,this._onCollectionChanged(t,t.values,[],[])}function p$C(e,t,i){e$2b(e)&&(e.billboard=void 0,i.removeBillboard(t))}g$I.prototype.update=function(e){if(!e$2b(e))throw new t$16("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a,s=t[n],l=s.entity,u=l._billboard,c=s.billboard,h=l.isShowing&&l.isAvailable(e)&&r$Z.getValueOrDefault(u._show,e,!0);if(h&&(a=r$Z.getValueOrUndefined(l._position,e,Z$z),o=r$Z.getValueOrUndefined(u._image,e),h=e$2b(a)&&e$2b(o)),h){r$Z.isConstant(l._position)||(i._clusterDirty=!0),e$2b(c)||((c=i.getBillboard(l)).id=l,c.image=void 0,s.billboard=c),c.show=h,(!e$2b(c.image)||s.textureValue!==o)&&(c.image=o,s.textureValue=o),c.position=a,c.color=r$Z.getValueOrDefault(u._color,e,U$z,F$G),c.eyeOffset=r$Z.getValueOrDefault(u._eyeOffset,e,z$y,j$A),c.heightReference=r$Z.getValueOrDefault(u._heightReference,e,A$I),c.pixelOffset=r$Z.getValueOrDefault(u._pixelOffset,e,I$L,W$D),c.scale=r$Z.getValueOrDefault(u._scale,e,P$z),c.rotation=r$Z.getValueOrDefault(u._rotation,e,q$C),c.alignedAxis=r$Z.getValueOrDefault(u._alignedAxis,e,H$G),c.horizontalOrigin=r$Z.getValueOrDefault(u._horizontalOrigin,e,T$C),c.verticalOrigin=r$Z.getValueOrDefault(u._verticalOrigin,e,L$K),c.width=r$Z.getValueOrUndefined(u._width,e),c.height=r$Z.getValueOrUndefined(u._height,e),c.scaleByDistance=r$Z.getValueOrUndefined(u._scaleByDistance,e,k$v),c.translucencyByDistance=r$Z.getValueOrUndefined(u._translucencyByDistance,e,J$x),c.pixelOffsetScaleByDistance=r$Z.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,K$z),c.sizeInMeters=r$Z.getValueOrDefault(u._sizeInMeters,e,M$E),c.distanceDisplayCondition=r$Z.getValueOrUndefined(u._distanceDisplayCondition,e,X$v),c.disableDepthTestDistance=r$Z.getValueOrUndefined(u._disableDepthTestDistance,e);var d=r$Z.getValueOrUndefined(u._imageSubRegion,e,Q$z);e$2b(d)&&c.setImageSubRegion(c._imageId,d)}else p$C(s,l,i)}return!0},g$I.prototype.getBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("entity is required.");if(!e$2b(t))throw new t$16("result is required.");var i=this._items.get(e.id);if(!e$2b(i)||!e$2b(i.billboard))return R$w.FAILED;var n=i.billboard;if(n.heightReference===k$P.NONE)t.center=o$1p.clone(n.position,t.center);else{if(!e$2b(n._clampedPosition))return R$w.PENDING;t.center=o$1p.clone(n._clampedPosition,t.center)}return t.radius=0,R$w.DONE},g$I.prototype.isDestroyed=function(){return!1},g$I.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(g$I.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return i$10(this)},g$I.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)e$2b((o=t[r])._billboard)&&e$2b(o._position)&&a.set(o.id,new C$D(o));for(r=n.length-1;r>-1;r--)e$2b((o=n[r])._billboard)&&e$2b(o._position)?a.contains(o.id)||a.set(o.id,new C$D(o)):(p$C(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],p$C(a.get(o.id),o,s),a.remove(o.id)};var f$H="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nmat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = tangentToEyeMatrix;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nmaterialInput.st = v_st;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",d$Q="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec3 tangent;\nattribute vec3 bitangent;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_tangentEC = czm_normal * tangent;\nv_bitangentEC = czm_normal * bitangent;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",i$G="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",l$H="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",m$B="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nmaterialInput.st = v_st;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",h$F="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",_$w="attribute vec3 position;\nattribute vec3 normal;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = vec4(position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\nv_normalEC = czm_normal * normal;\ngl_Position = czm_modelViewProjection * p;\n}\n",g$H="attribute vec3 position;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = vec4(position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\nv_normalEC = czm_normal * normal;\nv_st = st;\ngl_Position = czm_modelViewProjection * p;\n}\n";function t$w(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.translucent,!0),i=u$_(e.closed,!1),n=u$_(e.materialSupport,t$w.MaterialSupport.TEXTURED);this.material=e$2b(e.material)?e.material:r$X.fromType(r$X.ColorType),this.translucent=t,this._vertexShaderSource=u$_(e.vertexShaderSource,n.vertexShaderSource),this._fragmentShaderSource=u$_(e.fragmentShaderSource,n.fragmentShaderSource),this._renderState=a$S.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._materialSupport=n,this._vertexFormat=n.vertexFormat,this._flat=u$_(e.flat,!1),this._faceForward=u$_(e.faceForward,!i)}function r$C(){t$16.throwInstantiationError()}function a$C(e,t,i){o$1q.defined("geometryUpdater",e),o$1q.defined("primitives",t),o$1q.defined("orderedGroundPrimitives",i),this._primitives=t,this._orderedGroundPrimitives=i,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}Object.defineProperties(t$w.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),t$w.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,t$w.prototype.isTranslucent=a$S.prototype.isTranslucent,t$w.prototype.getRenderState=a$S.prototype.getRenderState,t$w.MaterialSupport={BASIC:Object.freeze({vertexFormat:n$11.POSITION_AND_NORMAL,vertexShaderSource:l$H,fragmentShaderSource:i$G}),BASICMODEL:Object.freeze({vertexFormat:n$11.POSITION_AND_NORMAL,vertexShaderSource:_$w,fragmentShaderSource:i$G}),TEXTURED:Object.freeze({vertexFormat:n$11.POSITION_NORMAL_AND_ST,vertexShaderSource:h$F,fragmentShaderSource:m$B}),TEXTUREDMODEL:Object.freeze({vertexFormat:n$11.POSITION_NORMAL_AND_ST,vertexShaderSource:g$H,fragmentShaderSource:m$B}),ALL:Object.freeze({vertexFormat:n$11.ALL,vertexShaderSource:d$Q,fragmentShaderSource:f$H})},Object.defineProperties(r$C.prototype,{isConstant:{get:t$16.throwInstantiationError},definitionChanged:{get:t$16.throwInstantiationError}}),r$C.prototype.getType=t$16.throwInstantiationError,r$C.prototype.getValue=t$16.throwInstantiationError,r$C.prototype.equals=t$16.throwInstantiationError,r$C.getValue=function(e,t,i){var n;return e$2b(t)&&e$2b(n=t.getType(e))?((!e$2b(i)||i.type!==n)&&(i=r$X.fromType(n)),t.getValue(e,i.uniforms),i):((!e$2b(i)||i.type!==r$X.ColorType)&&(i=r$X.fromType(r$X.ColorType)),e$1U.clone(e$1U.WHITE,i.uniforms.color),i)},a$C.prototype._isHidden=function(e,t,i){return!e.isShowing||!e.isAvailable(i)||!r$Z.getValueOrDefault(t.show,i,!0)},a$C.prototype._setOptions=t$16.throwInstantiationError,a$C.prototype.update=function(e){o$1q.defined("time",e);var t=this._geometryUpdater,i=t._onTerrain,n=this._primitives,r=this._orderedGroundPrimitives;r.remove(this._primitive),n.removeAndDestroy(this._primitive),n.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0,this._primitive=void 0;var o=this._entity,a=o[this._geometryUpdater._geometryPropertyName];if(this._setOptions(o,a,e),!this._isHidden(o,a,e)){var s=this._geometryUpdater.shadowsProperty.getValue(e),l=this._options;if(!e$2b(a.fill)||a.fill.getValue(e)){var u,c=t.fillMaterialProperty,h=c instanceof t$Q,d=t._getIsClosed(l);if(h)u=new t$R({closed:d,flat:i&&!t._supportsMaterialsforEntitiesOnTerrain});else{var f=r$C.getValue(e,c,this._material);this._material=f,u=new t$w({material:f,translucent:f.isTranslucent(),closed:d})}if(i)l.vertexFormat=t$R.VERTEX_FORMAT,this._primitive=r.add(new d$14({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:u,asynchronous:!1,shadows:s,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),r$Z.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{l.vertexFormat=u.vertexFormat;var p=this._geometryUpdater.createFillGeometryInstance(e);h&&(u.translucent=255!==p.attributes.color.value[3]),this._primitive=n.add(new y$S({geometryInstances:p,appearance:u,asynchronous:!1,shadows:s}))}}if(!i&&e$2b(a.outline)&&a.outline.getValue(e)){var _=this._geometryUpdater.createOutlineGeometryInstance(e),m=r$Z.getValueOrDefault(a.outlineWidth,e,1);this._outlinePrimitive=n.add(new y$S({geometryInstances:_,appearance:new t$R({flat:!0,translucent:255!==_.attributes.color.value[3],renderState:{lineWidth:t._scene.clampLineWidth(m)}}),asynchronous:!1,shadows:s}))}}},a$C.prototype.getBoundingSphere=function(e){if(!e$2b(e))throw new t$16("result is required.");var t,i=this._entity,n=this._primitive,r=this._outlinePrimitive;return e$2b(n)&&n.show&&n.ready&&(e$2b(t=n.getGeometryInstanceAttributes(i))&&e$2b(t.boundingSphere))||e$2b(r)&&r.show&&r.ready&&(e$2b(t=r.getGeometryInstanceAttributes(i))&&e$2b(t.boundingSphere))?(i$1c.clone(t.boundingSphere,e),R$w.DONE):e$2b(n)&&!n.ready||e$2b(r)&&!r.ready?R$w.PENDING:R$w.FAILED},a$C.prototype.isDestroyed=function(){return!1},a$C.prototype.destroy=function(){var e=this._primitives;this._orderedGroundPrimitives.remove(this._primitive),e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),i$10(this)};var M$D=new t$Q(e$1U.WHITE),D$B=new e$1I(!0),V$t=new e$1I(!0),N$u=new e$1I(!1),U$y=new e$1I(e$1U.BLACK),A$H=new e$1I(W$W.DISABLED),L$J=new e$1I(new r$Y),S$w=new e$1I(_0x3b5200.BOTH);function i$F(e){o$1q.defined("options.entity",e.entity),o$1q.defined("options.scene",e.scene),o$1q.defined("options.geometryOptions",e.geometryOptions),o$1q.defined("options.geometryPropertyName",e.geometryPropertyName),o$1q.defined("options.observedPropertyNames",e.observedPropertyNames);var t=e.entity,i=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new o$1h,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=i,this._id=i+"-"+t.id,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=h$V.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(i$F.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!e$2b(this._entity.availability)&&r$Z.isConstant(this._showProperty)&&r$Z.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!e$2b(this._entity.availability)&&r$Z.isConstant(this._showProperty)&&r$Z.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),i$F.prototype.isOutlineVisible=function(e){var t=this._entity;return u$_(this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e),!1)},i$F.prototype.isFilled=function(e){var t=this._entity;return u$_(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e),!1)},i$F.prototype.createFillGeometryInstance=t$16.throwInstantiationError,i$F.prototype.createOutlineGeometryInstance=t$16.throwInstantiationError,i$F.prototype.isDestroyed=function(){return!1},i$F.prototype.destroy=function(){i$10(this)},i$F.prototype._isHidden=function(e,t){var i=t.show;return e$2b(i)&&i.isConstant&&!i.getValue(o$H.MINIMUM_VALUE)},i$F.prototype._isOnTerrain=function(e,t){return!1},i$F.prototype._getIsClosed=function(e){return!0},i$F.prototype._isDynamic=t$16.throwInstantiationError,i$F.prototype._setStaticOptions=t$16.throwInstantiationError,i$F.prototype._onEntityPropertyChanged=function(e,t,i,n){if(-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(!e$2b(r))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var o=r.fill,a=!e$2b(o)||!o.isConstant||o.getValue(o$H.MINIMUM_VALUE),s=r.outline,l=e$2b(s);if(l&&s.isConstant&&(l=s.getValue(o$H.MINIMUM_VALUE)),!a&&!l)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var u=r.show;if(this._isHidden(e,r))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));this._materialProperty=u$_(r.material,M$D),this._fillProperty=u$_(o,V$t),this._showProperty=u$_(u,D$B),this._showOutlineProperty=u$_(r.outline,N$u),this._outlineColorProperty=l?u$_(r.outlineColor,U$y):void 0,this._shadowsProperty=u$_(r.shadows,A$H),this._distanceDisplayConditionProperty=u$_(r.distanceDisplayCondition,L$J),this._classificationTypeProperty=u$_(r.classificationType,S$w),this._fillEnabled=a;var c=this._isOnTerrain(e,r)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof t$Q);if(l&&c&&(e$1$(e$1$.geometryOutlines),l=!1),this._onTerrain=c,this._outlineEnabled=l,this._isDynamic(e,r))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,r),this._isClosed=this._getIsClosed(this._options);var h=r.outlineWidth;this._outlineWidth=e$2b(h)?h.getValue(o$H.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}}},i$F.prototype.createDynamicUpdater=function(e,t){if(o$1q.defined("primitives",e),o$1q.defined("groundPrimitives",t),!this._dynamic)throw new t$16("This instance does not represent dynamic geometry.");return new this.constructor.DynamicGeometryUpdater(this,e,t)};var m$A=new o$1p,H$F=new a$18;function h$E(e,t,i,n){o$1q.defined("scene",e),o$1q.defined("positionProperty",t),this._scene=e,this._heightReference=i,this._extrudedHeightReference=n,this._positionProperty=t,this._position=new o$1p,this._cartographicPosition=new a$18,this._normal=new o$1p,this._definitionChanged=new o$1h,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;var r=this;if(e$2b(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener((function(){r._updateClamping()})),this._removeModeListener=e.morphComplete.addEventListener((function(){r._updateClamping()}))),t.isConstant){var o=t.getValue(o$H.MINIMUM_VALUE,m$A);if(!e$2b(o)||o$1p.equals(o,o$1p.ZERO)||!e$2b(e.globe))return;this._position=o$1p.clone(o,this._position),this._updateClamping(),this._normal=e.globe.ellipsoid.geodeticSurfaceNormal(o,this._normal)}}function a$B(e,t,i,n){if(i$F.prototype._onEntityPropertyChanged.call(this,e,t,i,n),-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(e$2b(r)){e$2b(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);var o=r.heightReference;if(e$2b(o)){var a=new n$V(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new h$E(this._scene,a,o)}}}}Object.defineProperties(h$E.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),h$E.prototype._updateClamping=function(){e$2b(this._removeCallbackFunc)&&this._removeCallbackFunc();var e=this._scene,t=e.globe,i=this._position;if(e$2b(t)&&!o$1p.equals(i,o$1p.ZERO)){var n=t.ellipsoid,r=t._surface,o=this,a=n.cartesianToCartographic(i,this._cartographicPosition),s=t.getHeight(a);e$2b(s)?this._terrainHeight=s:this._terrainHeight=0,this._removeCallbackFunc=r.updateHeight(a,(function(t){if(e.mode===C$13.SCENE3D){var i=n.cartesianToCartographic(t,H$F);o._terrainHeight=i.height}else o._terrainHeight=t.x;o.definitionChanged.raiseEvent()}))}else this._terrainHeight=0},h$E.prototype.getValue=function(e,t){var i=r$Z.getValueOrDefault(this._heightReference,e,k$P.NONE),n=r$Z.getValueOrDefault(this._extrudedHeightReference,e,k$P.NONE);if(i===k$P.NONE&&n!==k$P.RELATIVE_TO_GROUND)return this._position=o$1p.clone(o$1p.ZERO,this._position),o$1p.clone(o$1p.ZERO,t);if(this._positionProperty.isConstant)return o$1p.multiplyByScalar(this._normal,this._terrainHeight,t);var r=this._scene,o=this._positionProperty.getValue(e,m$A);if(!e$2b(o)||o$1p.equals(o,o$1p.ZERO)||!e$2b(r.globe))return o$1p.clone(o$1p.ZERO,t);if(o$1p.equalsEpsilon(this._position,o,e$2a.EPSILON10))return o$1p.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=o$1p.clone(o,this._position),this._updateClamping();var a=r.globe.ellipsoid.geodeticSurfaceNormal(o,this._normal);return o$1p.multiplyByScalar(a,this._terrainHeight,t)},h$E.prototype.isDestroyed=function(){return!1},h$E.prototype.destroy=function(){return e$2b(this._removeEventListener)&&this._removeEventListener(),e$2b(this._removeModeListener)&&this._removeModeListener(),e$2b(this._removeCallbackFunc)&&this._removeCallbackFunc(),i$10(this)};var V$s=o$1p.ZERO,E$E=new o$1p,N$t=new o$1p,G$D=new e$1U;function H$E(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function i$E(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new H$E(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}function p$B(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(i$E.prototype=Object.create(i$F.prototype),i$E.prototype.constructor=i$E),Object.defineProperties(i$E.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),i$E.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:t$B.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,G$D)),e$2b(t)||(t=e$1U.WHITE),a.color=o$16.fromColor(t));return e$2b(this._options.offsetAttribute)&&(a.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,V$s,E$E))),new d$1o({id:i,geometry:O$y.fromDimensions(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:a})},i$E.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,G$D),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r),offset:void 0};return e$2b(this._options.offsetAttribute)&&(o.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,V$s,E$E))),new d$1o({id:t,geometry:o$17.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:o})},i$E.prototype._computeCenter=function(e,t){return r$Z.getValueOrUndefined(this._entity.position,e,t)},i$E.prototype._isHidden=function(e,t){return!e$2b(t.dimensions)||!e$2b(e.position)||i$F.prototype._isHidden.call(this,e,t)},i$E.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$Z.isConstant(e.orientation)&&t.dimensions.isConstant&&r$Z.isConstant(t.outlineWidth))},i$E.prototype._setStaticOptions=function(e,t){var i=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$Q?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,n.dimensions=t.dimensions.getValue(o$H.MINIMUM_VALUE,n.dimensions),n.offsetAttribute=i!==k$P.NONE?_0x58701d.ALL:void 0},i$E.prototype._onEntityPropertyChanged=a$B,i$E.DynamicGeometryUpdater=p$B,e$2b(Object.create)&&(p$B.prototype=Object.create(a$C.prototype),p$B.prototype.constructor=p$B),p$B.prototype._isHidden=function(e,t,i){var n=r$Z.getValueOrUndefined(e.position,i,N$t),r=this._options.dimensions;return!e$2b(n)||!e$2b(r)||a$C.prototype._isHidden.call(this,e,t,i)},p$B.prototype._setOptions=function(e,t,i){var n=r$Z.getValueOrDefault(t.heightReference,i,k$P.NONE),r=this._options;r.dimensions=r$Z.getValueOrUndefined(t.dimensions,i,r.dimensions),r.offsetAttribute=n!==k$P.NONE?_0x58701d.ALL:void 0};var a$A={X:0,Y:1,Z:2,Y_UP_TO_Z_UP:p$1d.fromRotationTranslation(p$1e.fromRotationX(e$2a.PI_OVER_TWO)),Z_UP_TO_Y_UP:p$1d.fromRotationTranslation(p$1e.fromRotationX(-e$2a.PI_OVER_TWO)),X_UP_TO_Z_UP:p$1d.fromRotationTranslation(p$1e.fromRotationY(-e$2a.PI_OVER_TWO)),Z_UP_TO_X_UP:p$1d.fromRotationTranslation(p$1e.fromRotationY(e$2a.PI_OVER_TWO)),X_UP_TO_Y_UP:p$1d.fromRotationTranslation(p$1e.fromRotationZ(e$2a.PI_OVER_TWO)),Y_UP_TO_X_UP:p$1d.fromRotationTranslation(p$1e.fromRotationZ(-e$2a.PI_OVER_TWO)),fromName:function(e){return o$1q.typeOf.string("name",e),a$A[e]}},v$y=Object.freeze(a$A),A$G={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"},Q$y=Object.freeze(A$G),e$M={HIGHLIGHT:0,REPLACE:1,MIX:2},L$I=Object.freeze(e$M),T$B={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},c$y={SCALAR:void 0,VEC2:o$1o,VEC3:o$1p,VEC4:e$29,MAT2:f$13,MAT3:p$1e,MAT4:p$1d};function M$C(e){var t,i=e.componentType;t="string"==typeof i?S$12.fromName(i):i;var n=T$B[e.type],r=c$y[e.type];return{componentsPerAttribute:n,classType:r,createArrayBufferView:function(e,i,r){return S$12.createArrayBufferView(t,e,i,n*r)}}}var I$K=e$1U.WHITE,X$u=!0;function h$D(e,t,i,n,r){var o;this.featuresLength=t,this._translucentFeaturesLength=0,e$2b(i)&&(o=i.extensions),this._extensions=u$_(o,{});var a,s,l=_e$i(i);if(this._properties=l,this._batchTableHierarchy=me$j(this,i,n),this._batchTableBinaryProperties=V$r(t,l,n),this._showAlphaProperties=void 0,this._batchValues=void 0,this._batchValuesDirty=!1,this._batchTexture=void 0,this._defaultTexture=void 0,this._pickTexture=void 0,this._pickIds=[],this._content=e,this._colorChangedCallback=r,t>0){var u=Math.min(t,e$1T.maximumTextureSize),c=Math.ceil(t/e$1T.maximumTextureSize),h=1/u,d=.5*h,f=1/c,p=.5*f;a=new o$1o(u,c),s=new e$29(h,d,f,p)}this._textureDimensions=a,this._textureStep=s}function _e$i(e){var t={};if(!e$2b(e))return t;for(var i in e)e.hasOwnProperty(i)&&"HIERARCHY"!==i&&"extensions"!==i&&"extras"!==i&&(t[i]=l$1g(e[i],!0));return t}function me$j(e,t,i){if(e$2b(t)){var n=e._extensions["3DTILES_batch_table_hierarchy"],r=t.HIERARCHY;if(e$2b(r)&&(h$D._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),e._extensions["3DTILES_batch_table_hierarchy"]=r,n=r),e$2b(n))return ge$g(n,i)}}function ge$g(e,t){var i,n,r,o=e.instancesLength,a=e.classes,s=e.classIds,l=e.parentCounts,u=e.parentIds,c=o;if(e$2b(s.byteOffset)&&(s.componentType=u$_(s.componentType,S$12.UNSIGNED_SHORT),s.type=Q$y.SCALAR,s=M$C(s).createArrayBufferView(t.buffer,t.byteOffset+s.byteOffset,o)),e$2b(l))for(e$2b(l.byteOffset)&&(l.componentType=u$_(l.componentType,S$12.UNSIGNED_SHORT),l.type=Q$y.SCALAR,l=M$C(l).createArrayBufferView(t.buffer,t.byteOffset+l.byteOffset,o)),r=new Uint16Array(o),c=0,i=0;i<o;++i)r[i]=c,c+=l[i];e$2b(u)&&e$2b(u.byteOffset)&&(u.componentType=u$_(u.componentType,S$12.UNSIGNED_SHORT),u.type=Q$y.SCALAR,u=M$C(u).createArrayBufferView(t.buffer,t.byteOffset+u.byteOffset,c));var h=a.length;for(i=0;i<h;++i){var d=a[i].length,f=a[i].instances,p=V$r(d,f,t);a[i].instances=p$19(p,f)}var _=d$1s(new Array(h),0),m=new Uint16Array(o);for(i=0;i<o;++i)n=s[i],m[i]=_[n],++_[n];var g={classes:a,classIds:s,classIndexes:m,parentCounts:l,parentIndexes:r,parentIds:u};return ye$d(g),g}h$D._deprecationWarning=t$12,Object.defineProperties(h$D.prototype,{memorySizeInBytes:{get:function(){var e=0;return e$2b(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),e$2b(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}}});var de$h=[];function ye$d(e){var t=de$h;t.length=0;for(var i=e.classIds.length,n=0;n<i;++n)j$z(e,n,t)}function j$z(e,t,i){var n=e.parentCounts,r=e.parentIds,o=e.parentIndexes,a=e.classIds.length;if(e$2b(r)){if(t>=a)throw new t$16("Parent index "+t+" exceeds the total number of instances: "+a);if(i.indexOf(t)>-1)throw new t$16("Circular dependency detected in the batch table hierarchy.");i.push(t);for(var s=e$2b(n)?n[t]:1,l=e$2b(n)?o[t]:t,u=0;u<s;++u){var c=r[l+u];c!==t&&j$z(e,c,i)}i.pop(t)}}function V$r(e,t,i){var n;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=o.byteOffset;if(e$2b(a)){var s=o.componentType,l=o.type;if(!e$2b(s))throw new t$14("componentType is required.");if(!e$2b(l))throw new t$14("type is required.");if(!e$2b(i))throw new t$14("Property "+r+" requires a batch table binary.");var u=M$C(o),c=u.componentsPerAttribute,h=u.classType,d=u.createArrayBufferView(i.buffer,i.byteOffset+a,e);e$2b(n)||(n={}),n[r]={typedArray:d,componentCount:c,type:h}}}return n}function Z$y(e){var t=e._textureDimensions;return t.x*t.y*4}function $$A(e){if(!e$2b(e._batchValues)){var t=Z$y(e),i=new Uint8Array(t);d$1s(i,255),e._batchValues=i}return e._batchValues}function J$w(e){if(!e$2b(e._showAlphaProperties)){var t=2*e.featuresLength,i=new Uint8Array(t);d$1s(i,255),e._showAlphaProperties=i}return e._showAlphaProperties}function g$G(e,t){if(!e$2b(e)||e<0||e>t)throw new t$16("batchId is required and between zero and featuresLength - 1 ("+t-NaN)}h$D.getBinaryProperties=function(e,t,i){return V$r(e,t,i)},h$D.prototype.setShow=function(e,t){if(g$G(e,this.featuresLength),o$1q.typeOf.bool("show",t),!t||e$2b(this._showAlphaProperties)){var i=J$w(this),n=2*e,r=t?255:0;if(i[n]!==r)i[n]=r,$$A(this)[4*e+3]=t?i[n+1]:0,this._batchValuesDirty=!0}},h$D.prototype.setAllShow=function(e){o$1q.typeOf.bool("show",e);for(var t=this.featuresLength,i=0;i<t;++i)this.setShow(i,e)},h$D.prototype.getShow=function(e){if(g$G(e,this.featuresLength),!e$2b(this._showAlphaProperties))return!0;var t=2*e;return 255===this._showAlphaProperties[t]};var Se$a=new Array(4);h$D.prototype.setColor=function(e,t){if(g$G(e,this.featuresLength),o$1q.typeOf.object("color",t),!e$1U.equals(t,I$K)||e$2b(this._batchValues)){var i=t.toBytes(Se$a),n=i[3],r=$$A(this),o=4*e,a=J$w(this),s=2*e;if(r[o]!==i[0]||r[o+1]!==i[1]||r[o+2]!==i[2]||a[s+1]!==n){r[o]=i[0],r[o+1]=i[1],r[o+2]=i[2];var l=255!==a[s+1],u=0!==a[s];r[o+3]=u?n:0,a[s+1]=n;var c=255!==n;c&&!l?++this._translucentFeaturesLength:!c&&l&&--this._translucentFeaturesLength,this._batchValuesDirty=!0,e$2b(this._colorChangedCallback)&&this._colorChangedCallback(e,t)}}},h$D.prototype.setAllColor=function(e){o$1q.typeOf.object("color",e);for(var t=this.featuresLength,i=0;i<t;++i)this.setColor(i,e)},h$D.prototype.getColor=function(e,t){if(g$G(e,this.featuresLength),o$1q.typeOf.object("result",t),!e$2b(this._batchValues))return e$1U.clone(I$K,t);var i=this._batchValues,n=4*e,r=this._showAlphaProperties,o=2*e;return e$1U.fromBytes(i[n],i[n+1],i[n+2],r[o+1],t)},h$D.prototype.getPickColor=function(e){return g$G(e,this.featuresLength),this._pickIds[e]};var Te$f=new e$1U;function ee$p(e,t){var i=e.typedArray,n=e.componentCount;return 1===n?i[t]:e.type.unpack(i,t*n)}function te$o(e,t,i){var n=e.typedArray,r=e.componentCount;1===r?n[t]=i:e.type.pack(i,n,t*r)}h$D.prototype.applyStyle=function(e){if(!e$2b(e))return this.setAllColor(I$K),void this.setAllShow(X$u);for(var t=this._content,i=this.featuresLength,n=0;n<i;++n){var r=t.getFeature(n),o=e$2b(e.color)?e.color.evaluateColor(r,Te$f):I$K,a=e$2b(e.show)?e.show.evaluate(r):X$u;this.setColor(n,o),this.setShow(n,a)}};var xe$d=[],Ce$c=[],Le$i=0;function Ae$g(e,t,i){var n=e.classIds,r=e.parentCounts,o=e.parentIds,a=e.parentIndexes,s=n.length,l=xe$d;l.length=Math.max(l.length,s);var u=++Le$i,c=Ce$c;for(c.length=0,c.push(t);c.length>0;)if(l[t=c.pop()]!==u){l[t]=u;var h=i(e,t);if(e$2b(h))return h;for(var d=r[t],f=a[t],p=0;p<d;++p){var _=o[f+p];_!==t&&c.push(_)}}}function we$f(e,t,i){for(var n=!0;n;){var r=i(e,t);if(e$2b(r))return r;var o=e.parentIds[t];n=o!==t,t=o}}function P$y(e,t,i){var n=e.parentCounts;return e$2b(e.parentIds)?e$2b(n)?Ae$g(e,t,i):we$f(e,t,i):i(e,t)}function De$f(e,t,i){var n=P$y(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t];if(e$2b(e.classes[n].instances[i]))return!0}));return e$2b(n)}function Pe$b(e,t,i){P$y(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t],r=e.classes[n].instances;for(var o in r)r.hasOwnProperty(o)&&-1===i.indexOf(o)&&i.push(o)}))}function Ee$h(e,t,i){return P$y(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t],r=e.classes[n],o=e.classIndexes[t],a=r.instances[i];if(e$2b(a))return e$2b(a.typedArray)?ee$p(a,o):l$1g(a[o],!0)}))}function be$j(e,t,i,n){var r=P$y(e._batchTableHierarchy,t,(function(e,r){var o=e.classIds[r],a=e.classes[o],s=e.classIndexes[r],l=a.instances[i];if(e$2b(l)){if(r!==t)throw new t$16('Inherited property "'+i+'" is read-only.');return e$2b(l.typedArray)?te$o(l,s,n):l[s]=l$1g(n,!0),!0}}));return e$2b(r)}function Oe$e(e){return 1===e._textureDimensions.y?"uniform vec4 tile_textureStep; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n return vec2(centerX + (batchId * stepX), 0.5); \n} \n":"uniform vec4 tile_textureStep; \nuniform vec2 tile_textureDimensions; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n float stepY = tile_textureStep.z; \n float centerY = tile_textureStep.w; \n float xId = mod(batchId, tile_textureDimensions.x); \n float yId = floor(batchId / tile_textureDimensions.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function re$s(e,t){return e=s$U.replaceMain(e,"tile_main"),t?e+"uniform float tile_colorBlend; \nvoid tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n tile_featureColor = czm_gammaCorrect(tile_featureColor); \n gl_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n} \n":e+"void tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n} \n"}function Ie$c(e,t){for(var i,n="texture2D("+t,r=0,o=e.indexOf(n,r);o>-1;){for(var a=0,s=o;s<e.length;++s){var l=e.charAt(s);if("("===l)++a;else if(")"===l&&0===--a){i=s+1;break}}var u="tile_diffuse_final("+e.slice(o,i)+", tile_diffuse)";e=e.slice(0,o)+u+e.slice(i),r=o+u.length,o=e.indexOf(n,r)}return e}function ne$t(e,t,i){if(!e$2b(t))return re$s(e,i);var n=new RegExp("(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+"+t+";"),r=e.match(n);if(!e$2b(r))return re$s(e,i);var o=r[0],a=r[2];e=(e=s$U.replaceMain(e,"tile_main")).replace(o,"");var s;if("vec3"===a||"vec4"===a){var l="vec3"===a?"vec4("+t+", 1.0)":t,u="vec3"===a?"tile_diffuse.xyz":"tile_diffuse";n=new RegExp(t,"g"),e=e.replace(n,u),s=" vec4 source = "+l+"; \n tile_diffuse = tile_diffuse_final(source, tile_featureColor); \n tile_main(); \n"}else"sampler2D"===a&&(e=Ie$c(e,t),s=" tile_diffuse = tile_featureColor; \n tile_main(); \n");return e="uniform float tile_colorBlend; \nvec4 tile_diffuse = vec4(1.0); \nbool isWhite(vec3 color) \n{ \n return all(greaterThan(color, vec3(1.0 - czm_epsilon3))); \n} \nvec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse) \n{ \n vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend); \n vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse; \n return vec4(diffuse.rgb, sourceDiffuse.a); \n} \n"+o+"\n"+e+"\nvoid tile_color(vec4 tile_featureColor) \n{ \n"+s,i&&(e+=" tile_featureColor = czm_gammaCorrect(tile_featureColor); \n gl_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n"),e+="} \n"}function ke$7(e){var t=e._content.tileset,i=t.colorBlendMode,n=t.colorBlendAmount;if(i===L$I.HIGHLIGHT)return 0;if(i===L$I.REPLACE)return 1;if(i===L$I.MIX)return e$2a.clamp(n,e$2a.EPSILON4,1);throw new t$16('Invalid color blend mode "'+i+'".')}h$D.prototype.isClass=function(e,t){g$G(e,this.featuresLength),o$1q.typeOf.string("className",t);var i=this._batchTableHierarchy;if(!e$2b(i))return!1;var n=P$y(i,e,(function(e,i){var n=e.classIds[i];if(e.classes[n].name===t)return!0}));return e$2b(n)},h$D.prototype.isExactClass=function(e,t){return o$1q.typeOf.string("className",t),this.getExactClassName(e)===t},h$D.prototype.getExactClassName=function(e){g$G(e,this.featuresLength);var t=this._batchTableHierarchy;if(e$2b(t)){var i=t.classIds[e];return t.classes[i].name}},h$D.prototype.hasProperty=function(e,t){return g$G(e,this.featuresLength),o$1q.typeOf.string("name",t),e$2b(this._properties[t])||e$2b(this._batchTableHierarchy)&&De$f(this,e,t)},h$D.prototype.getPropertyNames=function(e,t){g$G(e,this.featuresLength),(t=e$2b(t)?t:[]).length=0;var i=Object.keys(this._properties);return t.push.apply(t,i),e$2b(this._batchTableHierarchy)&&Pe$b(this,e,t),t},h$D.prototype.getProperty=function(e,t){if(g$G(e,this.featuresLength),o$1q.typeOf.string("name",t),e$2b(this._batchTableBinaryProperties)){var i=this._batchTableBinaryProperties[t];if(e$2b(i))return ee$p(i,e)}var n=this._properties[t];if(e$2b(n))return l$1g(n[e],!0);if(e$2b(this._batchTableHierarchy)){var r=Ee$h(this,e,t);if(e$2b(r))return r}},h$D.prototype.setProperty=function(e,t,i){var n=this.featuresLength;if(g$G(e,n),o$1q.typeOf.string("name",t),e$2b(this._batchTableBinaryProperties)){var r=this._batchTableBinaryProperties[t];if(e$2b(r))return void te$o(r,e,i)}if(!e$2b(this._batchTableHierarchy)||!be$j(this,e,t,i)){var o=this._properties[t];e$2b(o)||(this._properties[t]=new Array(n),o=this._properties[t]),o[e]=l$1g(i,!0)}},h$D.prototype.getVertexShaderCallback=function(e,t,i){if(0!==this.featuresLength){var n=this;return function(r){var o,a=ne$t(r,i,!1);return e$1T.maximumVertexTextureImageUnits>0?(o="",e&&(o+="uniform bool tile_translucentCommand; \n"),o+="uniform sampler2D tile_batchTexture; \nvarying vec4 tile_featureColor; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n vec2 st = computeSt("+t+"); \n vec4 featureProperties = texture2D(tile_batchTexture, st); \n tile_color(featureProperties); \n float show = ceil(featureProperties.a); \n gl_Position *= show; \n",e&&(o+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n gl_Position *= 0.0; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n gl_Position *= 0.0; \n } \n } \n"),o+=" tile_featureColor = featureProperties; \n tile_featureSt = st; \n}"):o="varying vec2 tile_featureSt; \nvoid main() \n{ \n tile_color(vec4(1.0)); \n tile_featureSt = computeSt("+t+"); \n}",a+"\n"+Oe$e(n)+o}}},h$D.prototype.getFragmentShaderCallback=function(e,t){if(0!==this.featuresLength)return function(i){return i=ne$t(i,t,!0),e$1T.maximumVertexTextureImageUnits>0?i+="#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\nuniform sampler2D tile_pickTexture; \nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n#ifdef APPLY_SWIPE \n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n tile_color(tile_featureColor); \n}":(e&&(i+="uniform bool tile_translucentCommand; \n"),i+="uniform sampler2D tile_pickTexture; \nuniform sampler2D tile_batchTexture; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n",e&&(i+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n discard; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n discard; \n } \n } \n"),i+=" tile_color(featureProperties); \n} \n"),i}},h$D.prototype.getClassificationFragmentShaderCallback=function(){if(0!==this.featuresLength)return function(e){return e=s$U.replaceMain(e,"tile_main"),e$1T.maximumVertexTextureImageUnits>0?e+="uniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n tile_main(); \n gl_FragColor = tile_featureColor; \n}":e+="uniform sampler2D tile_batchTexture; \nuniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvoid main() \n{ \n tile_main(); \n vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n gl_FragColor = featureProperties; \n} \n",e}},h$D.prototype.getUniformMapCallback=function(){if(0!==this.featuresLength){var e=this;return function(t){var i={tile_batchTexture:function(){return u$_(e._batchTexture,e._defaultTexture)},tile_textureDimensions:function(){return e._textureDimensions},tile_textureStep:function(){return e._textureStep},tile_colorBlend:function(){return ke$7(e)},uSwipeRegion:function(){var t=e._content.tileset._swipeRegion,i=e._content.tileset.frameState.context.drawingBufferWidth,n=e._content.tileset.frameState.context.drawingBufferHeight,r=new e$29;return r.x=t.x*i,r.y=(1-t.y)*n,r.z=t.z*i,r.w=(1-t.w)*n,r},tile_pickTexture:function(){return e._pickTexture}};return p$19(t,i)}}},h$D.prototype.getPickId=function(){return"texture2D(tile_pickTexture, tile_featureSt)"};var x$G={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};function Re$e(e){var t=e._translucentFeaturesLength;return 0===t?x$G.ALL_OPAQUE:t===e.featuresLength?x$G.ALL_TRANSLUCENT:x$G.OPAQUE_AND_TRANSLUCENT}function Be$e(e){var t=i$_.shallowClone(e),i=t.pass===Le$s.TRANSLUCENT;return t.uniformMap=e$2b(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return i},t}function Me$g(e){var t=i$_.shallowClone(e);return t.pass=Le$s.TRANSLUCENT,t.renderState=ze$b(e.renderState),t}function Ue$c(e){var t=i$_.shallowClone(e);return t.renderState=Ge$7(e.renderState),t}function Ne$b(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!e$2b(i)){var n=t.fragmentShaderSource.clone();n.defines=e$2b(n.defines)?n.defines.slice(0):[],n.defines.push("POLYGON_OFFSET"),n.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),i=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:t._attributeLocations})}return i}function Ve$c(e,t){var i=i$_.shallowClone(t),n=l$1g(i.renderState,!0);n.cull.enabled=!0,n.cull.face=G$17.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5},n.stencilTest=u$N.setCesium3DTileBit(),n.stencilMask=u$N.CESIUM_3D_TILE_MASK,i.renderState=d$1m.fromCache(n),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=l$1g(t.uniformMap);var r=new o$1o(5,5);return i.uniformMap.u_polygonOffset=function(){return r},i.shaderProgram=Ne$b(e,t.shaderProgram),i}function Fe$d(e,t){var i=i$_.shallowClone(e),n=l$1g(i.renderState,!0);return n.stencilTest.enabled=!0,n.stencilTest.mask=u$N.SKIP_LOD_MASK,n.stencilTest.reference=u$N.CESIUM_3D_TILE_MASK|t<<u$N.SKIP_LOD_BIT_SHIFT,n.stencilTest.frontFunction=m$X.GREATER_OR_EQUAL,n.stencilTest.frontOperation.zPass=n$Y.REPLACE,n.stencilTest.backFunction=m$X.GREATER_OR_EQUAL,n.stencilTest.backOperation.zPass=n$Y.REPLACE,n.stencilMask=u$N.CESIUM_3D_TILE_MASK|u$N.SKIP_LOD_MASK,i.renderState=d$1m.fromCache(n),i}function He$7(e){return(e.renderState.stencilTest.reference&u$N.SKIP_LOD_MASK)>>>u$N.SKIP_LOD_BIT_SHIFT}function ze$b(e){var t=l$1g(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=Ee$r.ALPHA_BLEND,d$1m.fromCache(t)}function Ge$7(e){var t=l$1g(e,!0);return t.stencilTest=u$N.setCesium3DTileBit(),t.stencilMask=u$N.CESIUM_3D_TILE_MASK,d$1m.fromCache(t)}function ie$o(e,t,i){var n=e._textureDimensions;return new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,source:{width:n.x,height:n.y,arrayBufferView:i},flipY:!1,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})}function Ke$7(e,t){var i=e.featuresLength;if(!e$2b(e._pickTexture)&&i>0){for(var n=e._pickIds,r=Z$y(e),o=new Uint8Array(r),a=e._content,s=0;s<i;++s){var l=t.createPickId(a.getFeature(s));n.push(l);var u=l.color,c=4*s;o[c]=e$1U.floatToByte(u.red),o[c+1]=e$1U.floatToByte(u.green),o[c+2]=e$1U.floatToByte(u.blue),o[c+3]=e$1U.floatToByte(u.alpha)}e._pickTexture=ie$o(e,t,o),a.tileset._statistics.batchTableByteLength+=e._pickTexture.sizeInBytes}}function Ye$7(e){var t=e._textureDimensions;e._batchTexture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function e$L(e,t){this._content=e,this._batchId=t,this._color=void 0}function o$B(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function n$s(e,t,i,n,r,o){var a=e._cachedTypedArrays,s=a[t];return e$2b(s)||(s=S$12.createArrayBufferView(i,e.buffer.buffer,e.buffer.byteOffset+o,r*n),a[t]=s),s}function A$F(e,t,i,n){var r=e._cachedTypedArrays,o=r[t];return e$2b(o)||(o=S$12.createTypedArray(i,n),r[t]=o),o}function d$P(e,t,i){if(i=u$_(i,!1)){var n=e.indexOf(t);if(n>-1)return n}return e.push(t),e.length-1}function i$D(e,t){return e$2b(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}function e$K(){}function r$B(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}function p$A(e,t){var i=t.bufferView;if(e$2b(i)){var n=e.bufferViews[i];if(e$2b(n.byteStride)&&n.byteStride>0)return n.byteStride}return S$12.getSizeInBytes(t.componentType)*r$B(t.type)}function E$D(e){e$K.accessor(e,(function(e){e$2b(e.bufferView)&&(e.byteOffset=u$_(e.byteOffset,0))})),e$K.bufferView(e,(function(e){e$2b(e.buffer)&&(e.byteOffset=u$_(e.byteOffset,0))})),e$K.mesh(e,(function(t){e$K.meshPrimitive(t,(function(t){if(t.mode=u$_(t.mode,de$x.TRIANGLES),!e$2b(t.material)){e$2b(e.materials)||(e.materials=[]);t.material=d$P(e.materials,{name:"default"})}}))})),e$K.accessorContainingVertexAttributeData(e,(function(t){var i=e.accessors[t],n=i.bufferView;if(i.normalized=u$_(i.normalized,!1),e$2b(n)){var r=e.bufferViews[n];r.byteStride=p$A(e,i),r.target=de$x.ARRAY_BUFFER}})),e$K.accessorContainingIndexData(e,(function(t){var i=e.accessors[t].bufferView;e$2b(i)&&(e.bufferViews[i].target=de$x.ELEMENT_ARRAY_BUFFER)})),e$K.material(e,(function(e){var t=u$_(e.extensions,u$_.EMPTY_OBJECT),i=t.KHR_materials_common;if(e$2b(i)){var n=i.technique,r=e$2b(i.values)?i.values:{};return i.values=r,r.ambient=e$2b(r.ambient)?r.ambient:[0,0,0,1],r.emission=e$2b(r.emission)?r.emission:[0,0,0,1],r.transparency=u$_(r.transparency,1),r.transparent=u$_(r.transparent,!1),r.doubleSided=u$_(r.doubleSided,!1),void("CONSTANT"!==n&&(r.diffuse=e$2b(r.diffuse)?r.diffuse:[0,0,0,1],"LAMBERT"!==n&&(r.specular=e$2b(r.specular)?r.specular:[0,0,0,1],r.shininess=u$_(r.shininess,0))))}e.emissiveFactor=u$_(e.emissiveFactor,[0,0,0]),e.alphaMode=u$_(e.alphaMode,"OPAQUE"),e.doubleSided=u$_(e.doubleSided,!1),"MASK"===e.alphaMode&&(e.alphaCutoff=u$_(e.alphaCutoff,.5)),e$2b(t.KHR_techniques_webgl)&&e$K.materialValue(e,(function(e){e$2b(e.index)&&d$O(e)})),d$O(e.emissiveTexture),d$O(e.normalTexture),d$O(e.occlusionTexture);var o=e.pbrMetallicRoughness;e$2b(o)&&(o.baseColorFactor=u$_(o.baseColorFactor,[1,1,1,1]),o.metallicFactor=u$_(o.metallicFactor,1),o.roughnessFactor=u$_(o.roughnessFactor,1),d$O(o.baseColorTexture),d$O(o.metallicRoughnessTexture));var a=t.pbrSpecularGlossiness;e$2b(a)&&(a.diffuseFactor=u$_(a.diffuseFactor,[1,1,1,1]),a.specularFactor=u$_(a.specularFactor,[1,1,1]),a.glossinessFactor=u$_(a.glossinessFactor,1),d$O(a.specularGlossinessTexture))})),e$K.animation(e,(function(e){e$K.animationSampler(e,(function(e){e.interpolation=u$_(e.interpolation,"LINEAR")}))}));var t=l$G(e);return e$K.node(e,(function(e,i){e$2b(t[i])||e$2b(e.translation)||e$2b(e.rotation)||e$2b(e.scale)?(e.translation=u$_(e.translation,[0,0,0]),e.rotation=u$_(e.rotation,[0,0,0,1]),e.scale=u$_(e.scale,[1,1,1])):e.matrix=u$_(e.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])})),e$K.sampler(e,(function(e){e.wrapS=u$_(e.wrapS,de$x.REPEAT),e.wrapT=u$_(e.wrapT,de$x.REPEAT)})),e$2b(e.scenes)&&!e$2b(e.scene)&&(e.scene=0),e}function l$G(e){var t={};return e$K.animation(e,(function(e){e$K.animationChannel(e,(function(e){var i=e.target,n=i.node,r=i.path;("translation"===r||"rotation"===r||"scale"===r)&&(t[n]=!0)}))})),t}function d$O(e){e$2b(e)&&(e.texCoord=u$_(e.texCoord,0))}function s$z(e){return e$K.shader(e,(function(e){n$r(e)})),e$K.buffer(e,(function(e){n$r(e)})),e$K.image(e,(function(e){n$r(e),e$K.compressedImage(e,(function(e){n$r(e)}))})),n$r(e),e}function n$r(e){e.extras=e$2b(e.extras)?e.extras:{},e.extras._pipeline=e$2b(e.extras._pipeline)?e.extras._pipeline:{}}function s$y(e,t){var i=e.extensionsRequired;if(e$2b(i)){var n=i.indexOf(t);n>=0&&i.splice(n,1),0===i.length&&delete e.extensionsRequired}}function d$N(e,t){var i=e.extensionsUsed;if(e$2b(i)){var n=i.indexOf(t);n>=0&&i.splice(n,1),s$y(e,t),0===i.length&&delete e.extensionsUsed}}h$D.prototype.addDerivedCommands=function(e,t){for(var i=e.commandList,n=i.length,r=this._content._tile,o=r._finalResolution,a=r.tileset,s=a._skipLevelOfDetail&&a._hasMixedContent&&e.context.stencilBuffer,l=Re$e(this),u=t;u<n;++u){var c=i[u],h=c.derivedCommands.tileset;(!e$2b(h)||c.dirty)&&(h={},c.derivedCommands.tileset=h,h.originalCommand=Be$e(c),c.dirty=!1);var d=h.originalCommand;l!==x$G.ALL_OPAQUE&&c.pass!==Le$s.TRANSLUCENT&&(e$2b(h.translucent)||(h.translucent=Me$g(d))),l!==x$G.ALL_TRANSLUCENT&&c.pass!==Le$s.TRANSLUCENT&&(e$2b(h.opaque)||(h.opaque=Ue$c(d)),s&&(o||(e$2b(h.zback)||(h.zback=Ve$c(e.context,d)),a._backfaceCommands.push(h.zback)),(!e$2b(h.stencil)||r._selectionDepth!==He$7(h.stencil))&&(c.renderState.depthMask?h.stencil=Fe$d(d,r._selectionDepth):h.stencil=h.opaque)));var f=s?h.stencil:h.opaque,p=h.translucent;c.pass!==Le$s.TRANSLUCENT?(l===x$G.ALL_OPAQUE&&(i[u]=f),l===x$G.ALL_TRANSLUCENT&&(i[u]=p),l===x$G.OPAQUE_AND_TRANSLUCENT&&(i[u]=f,i.push(p))):i[u]=d}},h$D.prototype.update=function(e,t){var i=t.context;this._defaultTexture=i.defaultTexture;var n=t.passes;(n.pick||n.postProcess)&&Ke$7(this,i),this._batchValuesDirty&&(this._batchValuesDirty=!1,e$2b(this._batchTexture)||(this._batchTexture=ie$o(this,i,this._batchValues),e._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes),Ye$7(this))},h$D.prototype.isDestroyed=function(){return!1},h$D.prototype.destroy=function(){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),this._pickTexture=this._pickTexture&&this._pickTexture.destroy();for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();return i$10(this)},Object.defineProperties(e$L.prototype,{show:{get:function(){return this._content.batchTable.getShow(this._batchId)},set:function(e){this._content.batchTable.setShow(this._batchId,e)}},color:{get:function(){return e$2b(this._color)||(this._color=new e$1U),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickId:{get:function(){return this._content.batchTable.getPickColor(this._batchId)}}}),e$L.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},e$L.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},e$L.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},e$L.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},e$L.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},e$L.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},e$L.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},o$B.prototype.getGlobalProperty=function(e,t,i){var n=this.json[e];if(e$2b(n))return e$2b(n.byteOffset)?n$s(this,e,t=u$_(t,S$12.UNSIGNED_INT),i=u$_(i,1),1,n.byteOffset):n},o$B.prototype.getPropertyArray=function(e,t,i){var n=this.json[e];if(e$2b(n))return e$2b(n.byteOffset)?(e$2b(n.componentType)&&(t=S$12.fromName(n.componentType)),n$s(this,e,t,i,this.featuresLength,n.byteOffset)):A$F(this,e,t,n)},o$B.prototype.getProperty=function(e,t,i,n,r){if(e$2b(this.json[e])){var o=this.getPropertyArray(e,t,i);if(1===i)return o[n];for(var a=0;a<i;++a)r[a]=o[i*n+a];return r}},e$K.objectLegacy=function(e,t){if(e$2b(e))for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=t(e[i],i);if(e$2b(n))return n}},e$K.object=function(e,t){if(e$2b(e))for(var i=e.length,n=0;n<i;n++){var r=t(e[n],n);if(e$2b(r))return r}},e$K.topLevel=function(e,t,i){var n=e[t];return e$2b(n)&&!Array.isArray(n)?e$K.objectLegacy(n,i):e$K.object(n,i)},e$K.accessor=function(e,t){return e$K.topLevel(e,"accessors",t)},e$K.accessorWithSemantic=function(e,t,i){var n={};return e$K.mesh(e,(function(e){return e$K.meshPrimitive(e,(function(e){var r=e$K.meshPrimitiveAttribute(e,(function(e,r){if(0===r.indexOf(t)&&!e$2b(n[e])){n[e]=!0;var o=i(e);if(e$2b(o))return o}}));return e$2b(r)?r:e$K.meshPrimitiveTarget(e,(function(e){return e$K.meshPrimitiveTargetAttribute(e,(function(e,r){if(0===r.indexOf(t)&&!e$2b(n[e])){n[e]=!0;var o=i(e);if(e$2b(o))return o}}))}))}))}))},e$K.accessorContainingVertexAttributeData=function(e,t){var i={};return e$K.mesh(e,(function(e){return e$K.meshPrimitive(e,(function(e){var n=e$K.meshPrimitiveAttribute(e,(function(e){if(!e$2b(i[e])){i[e]=!0;var n=t(e);if(e$2b(n))return n}}));return e$2b(n)?n:e$K.meshPrimitiveTarget(e,(function(e){return e$K.meshPrimitiveTargetAttribute(e,(function(e){if(!e$2b(i[e])){i[e]=!0;var n=t(e);if(e$2b(n))return n}}))}))}))}))},e$K.accessorContainingIndexData=function(e,t){var i={};return e$K.mesh(e,(function(e){return e$K.meshPrimitive(e,(function(e){var n=e.indices;if(e$2b(n)&&!e$2b(i[n])){i[n]=!0;var r=t(n);if(e$2b(r))return r}}))}))},e$K.animation=function(e,t){return e$K.topLevel(e,"animations",t)},e$K.animationChannel=function(e,t){var i=e.channels;return e$K.object(i,t)},e$K.animationSampler=function(e,t){var i=e.samplers;return e$K.object(i,t)},e$K.buffer=function(e,t){return e$K.topLevel(e,"buffers",t)},e$K.bufferView=function(e,t){return e$K.topLevel(e,"bufferViews",t)},e$K.camera=function(e,t){return e$K.topLevel(e,"cameras",t)},e$K.image=function(e,t){return e$K.topLevel(e,"images",t)},e$K.compressedImage=function(e,t){if(e$2b(e.extras)){var i=e.extras.compressedImage3DTiles;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2b(r))return r}}},e$K.material=function(e,t){return e$K.topLevel(e,"materials",t)},e$K.materialValue=function(e,t){var i=e.values;for(var n in e$2b(e.extensions)&&e$2b(e.extensions.KHR_techniques_webgl)&&(i=e.extensions.KHR_techniques_webgl.values),i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2b(r))return r}},e$K.mesh=function(e,t){return e$K.topLevel(e,"meshes",t)},e$K.meshPrimitive=function(e,t){var i=e.primitives;if(e$2b(i))for(var n=i.length,r=0;r<n;r++){var o=t(i[r],r);if(e$2b(o))return o}},e$K.meshPrimitiveAttribute=function(e,t){var i=e.attributes;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2b(r))return r}},e$K.meshPrimitiveTarget=function(e,t){var i=e.targets;if(e$2b(i))for(var n=i.length,r=0;r<n;++r){var o=t(i[r],r);if(e$2b(o))return o}},e$K.meshPrimitiveTargetAttribute=function(e,t){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=t(e[i],i);if(e$2b(n))return n}},e$K.node=function(e,t){return e$K.topLevel(e,"nodes",t)},e$K.nodeInTree=function(e,t,i){var n=e.nodes;if(e$2b(n))for(var r=t.length,o=0;o<r;o++){var a=t[o],s=n[a];if(e$2b(s)){var l=i(s,a);if(e$2b(l))return l;var u=s.children;if(e$2b(u)&&e$2b(l=e$K.nodeInTree(e,u,i)))return l}}},e$K.nodeInScene=function(e,t,i){var n=t.nodes;if(e$2b(n))return e$K.nodeInTree(e,n,i)},e$K.program=function(e,t){return i$D(e,"KHR_techniques_webgl")?e$K.object(e.extensions.KHR_techniques_webgl.programs,t):e$K.topLevel(e,"programs",t)},e$K.sampler=function(e,t){return e$K.topLevel(e,"samplers",t)},e$K.scene=function(e,t){return e$K.topLevel(e,"scenes",t)},e$K.shader=function(e,t){return i$D(e,"KHR_techniques_webgl")?e$K.object(e.extensions.KHR_techniques_webgl.shaders,t):e$K.topLevel(e,"shaders",t)},e$K.skin=function(e,t){return e$K.topLevel(e,"skins",t)},e$K.skinJoint=function(e,t){var i=e.joints;if(e$2b(i))for(var n=i.length,r=0;r<n;r++){var o=t(i[r]);if(e$2b(o))return o}},e$K.techniqueAttribute=function(e,t){var i=e.attributes;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2b(r))return r}},e$K.techniqueUniform=function(e,t){var i=e.uniforms;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2b(r))return r}},e$K.techniqueParameter=function(e,t){var i=e.parameters;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2b(r))return r}},e$K.technique=function(e,t){return i$D(e,"KHR_techniques_webgl")?e$K.object(e.extensions.KHR_techniques_webgl.techniques,t):e$K.topLevel(e,"techniques",t)},e$K.texture=function(e,t){return e$K.topLevel(e,"textures",t)};var x$F=4;function O$u(e){if("glTF"!==a$F(e))throw new t$14("File is not valid binary glTF");var t=d$M(e,0,5),i=t[1];if(1!==i&&2!==i)throw new t$14("Binary glTF version is not 1 or 2");return 1===i?S$v(e,t):T$A(e,t)}function d$M(e,t,i){for(var n=new DataView(e.buffer),r=new Array(i),o=0;o<i;++o)r[o]=n.getUint32(e.byteOffset+t+o*x$F,!0);return r}function S$v(e,t){var i=t[2],n=t[3];if(0!==t[4])throw new t$14("Binary glTF scene format is not JSON");var r=20+n,o=a$K(e,20,n),a=JSON.parse(o);s$z(a);var s=e.subarray(r,i),l=a.buffers;if(e$2b(l)&&Object.keys(l).length>0){var u=u$_(l.binary_glTF,l.KHR_binary_glTF);e$2b(u)&&(u.extras._pipeline.source=s)}return d$N(a,"KHR_binary_glTF"),a}function T$A(e,t){for(var i,n,r=t[2],o=12;o<r;){var a=d$M(e,o,2),s=a[0],l=a[1];o+=8;var u=e.subarray(o,o+s);if(o+=s,1313821514===l){var c=a$K(u);s$z(i=JSON.parse(c))}else 5130562===l&&(n=u)}if(e$2b(i)&&e$2b(n)){var h=i.buffers;if(e$2b(h)&&h.length>0)h[0].extras._pipeline.source=n}return i}function i$C(e,t){var i=e.extensionsUsed;e$2b(i)||(i=[],e.extensionsUsed=i),d$P(i,t,!0)}function c$x(e){switch(e){case S$12.BYTE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt8(t+o*n)};case S$12.UNSIGNED_BYTE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint8(t+o*n)};case S$12.SHORT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt16(t+o*n,!0)};case S$12.UNSIGNED_SHORT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint16(t+o*n,!0)};case S$12.INT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt32(t+o*n,!0)};case S$12.UNSIGNED_INT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint32(t+o*n,!0)};case S$12.FLOAT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getFloat32(t+o*n,!0)};case S$12.DOUBLE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getFloat64(t+o*n,!0)}}}function B$y(e,t){var i=e.bufferViews,n=e.buffers,r=t.bufferView,o=r$B(t.type);if(!e$2b(t.bufferView))return{min:d$1s(new Array(o),0),max:d$1s(new Array(o),0)};for(var a=d$1s(new Array(o),Number.POSITIVE_INFINITY),s=d$1s(new Array(o),Number.NEGATIVE_INFINITY),l=i[r],u=n[l.buffer].extras._pipeline.source,c=t.count,h=p$A(e,t),d=t.byteOffset+l.byteOffset+u.byteOffset,f=t.componentType,p=S$12.getSizeInBytes(f),_=new DataView(u.buffer),m=new Array(o),g=c$x(f),x=0;x<c;x++){g(_,d,o,p,m);for(var v=0;v<o;v++){var y=m[v];a[v]=Math.min(a[v],y),s[v]=Math.max(s[v],y)}d+=h}return{min:a,max:s}}var E$C=[de$x.FUNC_ADD,de$x.FUNC_ADD],p$z=[de$x.ONE,de$x.ZERO,de$x.ONE,de$x.ZERO];function O$t(e,t){var i=e.enable;return!!e$2b(i)&&i.indexOf(t)>-1}var N$s=[de$x.ZERO,de$x.ONE,de$x.SRC_COLOR,de$x.ONE_MINUS_SRC_COLOR,de$x.SRC_ALPHA,de$x.ONE_MINUS_SRC_ALPHA,de$x.DST_ALPHA,de$x.ONE_MINUS_DST_ALPHA,de$x.DST_COLOR,de$x.ONE_MINUS_DST_COLOR];function L$H(e,t){if(!e$2b(e))return t;for(var i=0;i<4;i++)if(-1===N$s.indexOf(e[i]))return t;return e}function R$v(e){var t={},i={};return e$2b(e.techniques)&&(e$K.technique(e,(function(e,n){var r=e.states;if(e$2b(r)){var o=i[n]={};if(O$t(r,de$x.BLEND)){o.alphaMode="BLEND";var a=r.functions;e$2b(a)&&(e$2b(a.blendEquationSeparate)||e$2b(a.blendFuncSeparate))&&(t[n]={blendEquation:u$_(a.blendEquationSeparate,E$C),blendFactors:L$H(a.blendFuncSeparate,p$z)})}O$t(r,de$x.CULL_FACE)||(o.doubleSided=!0),delete e.states}})),Object.keys(t).length>0&&(e$2b(e.extensions)||(e.extensions={}),i$C(e,"KHR_blend")),e$K.material(e,(function(e){if(e$2b(e.technique)){var n=i[e.technique];e$K.objectLegacy(n,(function(t,i){e[i]=t}));var r=t[e.technique];e$2b(r)&&(e$2b(e.extensions)||(e.extensions={}),e.extensions.KHR_blend=r)}}))),e}function s$x(e,t){var i=e.extensionsRequired;e$2b(i)||(i=[],e.extensionsRequired=i),d$P(i,t,!0),i$C(e,t)}function R$u(e){var t=e.techniques,i={},n={};if(e$2b(t)){var r={programs:[],shaders:[],techniques:[]},o=e.glExtensionsUsed;delete e.glExtensionsUsed,e$K.technique(e,(function(t,a){var s,l={name:t.name,program:void 0,attributes:{},uniforms:{}};e$K.techniqueAttribute(t,(function(e,i){s=t.parameters[e],l.attributes[i]={semantic:s.semantic}})),e$K.techniqueUniform(t,(function(e,n){s=t.parameters[e],l.uniforms[n]={count:s.count,node:s.node,type:s.type,semantic:s.semantic,value:s.value},i[e]=n}));var u=e.programs[t.program],c={name:u.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:o},h=e.shaders[u.fragmentShader];c.fragmentShader=d$P(r.shaders,h,!0);var d=e.shaders[u.vertexShader];c.vertexShader=d$P(r.shaders,d,!0),l.program=d$P(r.programs,c),n[a]=d$P(r.techniques,l)})),r.techniques.length>0&&(e$2b(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,i$C(e,"KHR_techniques_webgl"),s$x(e,"KHR_techniques_webgl"))}return e$K.material(e,(function(e){if(e$2b(e.technique)){var t={technique:n[e.technique]};e$K.objectLegacy(e.values,(function(e,n){e$2b(t.values)||(t.values={});var r=i[n];t.values[r]=e})),e$2b(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=t}delete e.technique,delete e.values})),delete e.techniques,delete e.programs,delete e.shaders,e}var b$J=["mesh","node","material","accessor","bufferView","buffer"];function d$L(e,t){return t=u$_(t,b$J),b$J.forEach((function(i){t.indexOf(i)>-1&&p$y(e,i)})),e}var _$v={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",node:"nodes",material:"materials",mesh:"meshes"};function p$y(e,t){var i=e[_$v[t]];if(e$2b(i))for(var n=0,r=m$z[t](e),o=i.length,a=0;a<o;++a)r[a]||(a$z[t](e,a-n),n++)}function a$z(){}function m$z(){}function v$x(e,t){return!(e$2b(t.mesh)||e$2b(t.camera)||e$2b(t.skin)||e$2b(t.weights)||e$2b(t.extras)||e$2b(t.extensions)&&0!==t.extensions.length)&&(!e$2b(t.children)||0===t.children.filter((function(t){return!v$x(e,e.nodes[t])})).length)}function a$y(e,t){var i={byteLength:t.length,extras:{_pipeline:{source:t}}},n={buffer:d$P(e.buffers,i),byteOffset:0,byteLength:t.length};return d$P(e.bufferViews,n)}function T$z(e,t){var i=p$A(e,t),n=S$12.getSizeInBytes(t.componentType),r=r$B(t.type),o=t.count,a=new Array(r*o);if(!e$2b(t.bufferView))return d$1s(a,0),a;for(var s=e.bufferViews[t.bufferView],l=e.buffers[s.buffer].extras._pipeline.source,u=t.byteOffset+s.byteOffset+l.byteOffset,c=new DataView(l.buffer),h=new Array(r),d=c$x(t.componentType),f=0;f<o;++f){d(c,u,r,n,h);for(var p=0;p<r;++p)a[f*r+p]=h[p];u+=i}return a}function T$y(e){var t;return e$K.accessorWithSemantic(e,"JOINTS_0",(function(i){var n=e.accessors[i];(t=n.componentType)===de$x.BYTE?t$v(e,n,S$12.UNSIGNED_BYTE):t!==de$x.UNSIGNED_BYTE&&t!==de$x.UNSIGNED_SHORT&&t$v(e,n,S$12.UNSIGNED_SHORT)})),e$K.accessorWithSemantic(e,"WEIGHTS_0",(function(i){var n=e.accessors[i];(t=n.componentType)===de$x.BYTE?t$v(e,n,S$12.UNSIGNED_BYTE):t===de$x.SHORT&&t$v(e,n,S$12.UNSIGNED_SHORT)})),e}function t$v(e,t,i){var n=S$12.createTypedArray(i,T$z(e,t)),r=new Uint8Array(n.buffer);t.bufferView=a$y(e,r),t.componentType=i,t.byteOffset=0}a$z.accessor=function(e,t){e.accessors.splice(t,1),e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$K.meshPrimitiveAttribute(e,(function(i,n){i>t&&e.attributes[n]--})),e$K.meshPrimitiveTarget(e,(function(e){e$K.meshPrimitiveTargetAttribute(e,(function(i,n){i>t&&e[n]--}))}));var i=e.indices;e$2b(i)&&i>t&&e.indices--}))})),e$K.skin(e,(function(e){e$2b(e.inverseBindMatrices)&&e.inverseBindMatrices>t&&e.inverseBindMatrices--})),e$K.animation(e,(function(e){e$K.animationSampler(e,(function(e){e$2b(e.input)&&e.input>t&&e.input--,e$2b(e.output)&&e.output>t&&e.output--}))}))},a$z.buffer=function(e,t){e.buffers.splice(t,1),e$K.bufferView(e,(function(e){e$2b(e.buffer)&&e.buffer>t&&e.buffer--}))},a$z.bufferView=function(e,t){e.bufferViews.splice(t,1),e$K.accessor(e,(function(e){e$2b(e.bufferView)&&e.bufferView>t&&e.bufferView--})),e$K.shader(e,(function(e){e$2b(e.bufferView)&&e.bufferView>t&&e.bufferView--})),e$K.image(e,(function(e){e$2b(e.bufferView)&&e.bufferView>t&&e.bufferView--,e$K.compressedImage(e,(function(e){var i=e.bufferView;e$2b(i)&&i>t&&e.bufferView--}))})),i$D(e,"KHR_draco_mesh_compression")&&e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$2b(e.extensions)&&e$2b(e.extensions.KHR_draco_mesh_compression)&&e.extensions.KHR_draco_mesh_compression.bufferView>t&&e.extensions.KHR_draco_mesh_compression.bufferView--}))}))},a$z.mesh=function(e,t){e.meshes.splice(t,1),e$K.node(e,(function(e){e$2b(e.mesh)&&(e.mesh>t?e.mesh--:e.mesh===t&&delete e.mesh)}))},a$z.node=function(e,t){e.nodes.splice(t,1),e$K.skin(e,(function(e){e$2b(e.skeleton)&&e.skeleton>t&&e.skeleton--,e.joints=e.joints.map((function(e){return e>t?e-1:e}))})),e$K.animation(e,(function(e){e$K.animationChannel(e,(function(e){e$2b(e.target)&&e$2b(e.target.node)&&e.target.node>t&&e.target.node--}))})),e$K.technique(e,(function(e){e$K.techniqueUniform(e,(function(e){e$2b(e.node)&&e.node>t&&e.node--}))})),e$K.node(e,(function(e){!e$2b(e.children)||(e.children=e.children.filter((function(e){return e!==t})).map((function(e){return e>t?e-1:e})))})),e$K.scene(e,(function(e){e.nodes=e.nodes.filter((function(e){return e!==t})).map((function(e){return e>t?e-1:e}))}))},a$z.material=function(e,t){e.materials.splice(t,1),e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$2b(e.material)&&e.material>t&&e.material--}))}))},m$z.accessor=function(e){var t={};return e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$K.meshPrimitiveAttribute(e,(function(e){t[e]=!0})),e$K.meshPrimitiveTarget(e,(function(e){e$K.meshPrimitiveTargetAttribute(e,(function(e){t[e]=!0}))}));var i=e.indices;e$2b(i)&&(t[i]=!0)}))})),e$K.skin(e,(function(e){e$2b(e.inverseBindMatrices)&&(t[e.inverseBindMatrices]=!0)})),e$K.animation(e,(function(e){e$K.animationSampler(e,(function(e){e$2b(e.input)&&(t[e.input]=!0),e$2b(e.output)&&(t[e.output]=!0)}))})),t},m$z.buffer=function(e){var t={};return e$K.bufferView(e,(function(e){e$2b(e.buffer)&&(t[e.buffer]=!0)})),t},m$z.bufferView=function(e){var t={};return e$K.accessor(e,(function(e){e$2b(e.bufferView)&&(t[e.bufferView]=!0)})),e$K.shader(e,(function(e){e$2b(e.bufferView)&&(t[e.bufferView]=!0)})),e$K.image(e,(function(e){e$2b(e.bufferView)&&(t[e.bufferView]=!0),e$K.compressedImage(e,(function(e){e$2b(e.bufferView)&&(t[e.bufferView]=!0)}))})),i$D(e,"KHR_draco_mesh_compression")&&e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$2b(e.extensions)&&e$2b(e.extensions.KHR_draco_mesh_compression)&&(t[e.extensions.KHR_draco_mesh_compression.bufferView]=!0)}))})),t},m$z.mesh=function(e){var t={};return e$K.node(e,(function(i){if(e$2b(i.mesh&&e$2b(e.meshes))){var n=e.meshes[i.mesh];e$2b(n)&&e$2b(n.primitives)&&n.primitives.length>0&&(t[i.mesh]=!0)}})),t},m$z.node=function(e){var t={};return e$K.node(e,(function(i,n){v$x(e,i)||(t[n]=!0)})),e$K.skin(e,(function(e){e$2b(e.skeleton)&&(t[e.skeleton]=!0),e$K.skinJoint(e,(function(e){t[e]=!0}))})),e$K.animation(e,(function(e){e$K.animationChannel(e,(function(e){e$2b(e.target)&&e$2b(e.target.node)&&(t[e.target.node]=!0)}))})),e$K.technique(e,(function(e){e$K.techniqueUniform(e,(function(e){e$2b(e.node)&&(t[e.node]=!0)}))})),t},m$z.material=function(e){var t={};return e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$2b(e.material)&&(t[e.material]=!0)}))})),t};var V$q={.8:se$j,"1.0":Re$d,"2.0":void 0};function re$r(e,t){var i=(t=u$_(t,u$_.EMPTY_OBJECT)).targetVersion,n=e.version;e.asset=u$_(e.asset,{version:"1.0"}),e.asset.version=u$_(e.asset.version,"1.0"),n=u$_(n,e.asset.version).toString(),Object.prototype.hasOwnProperty.call(V$q,n)||(e$2b(n)&&(n=n.substring(0,3)),Object.prototype.hasOwnProperty.call(V$q,n)||(n="1.0"));for(var r=V$q[n];e$2b(r)&&n!==i;)r(e,t),n=e.asset.version,r=V$q[n];return e}function F$F(e){var t=e.materials;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.instanceTechnique;e$2b(r)&&(n.technique=r.technique,n.values=r.values,delete n.instanceTechnique)}}function ie$n(e){var t=e.meshes;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i].primitives;if(e$2b(n))for(var r=n.length,o=0;o<r;++o){var a=n[o],s=u$_(a.primitive,de$x.TRIANGLES);a.mode=u$_(a.mode,s),delete a.primitive}}}function ne$s(e){var t=e.nodes,i=new o$1p,n=new n$13;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var o=t[r];if(e$2b(o.rotation)){var a=o.rotation;o$1p.fromArray(a,0,i),n$13.fromAxisAngle(i,a[3],n),o.rotation=[n.x,n.y,n.z,n.w]}var s=o.instanceSkin;e$2b(s)&&(o.skeletons=s.skeletons,o.skin=s.skin,o.meshes=s.meshes,delete o.instanceSkin)}}function te$n(e){var t=e.animations,i=e.accessors,n=e.bufferViews,r=e.buffers,o={},a=new o$1p,s=new n$13;for(var l in t)if(Object.prototype.hasOwnProperty.call(t,l)){var u=t[l],c=u.channels,h=u.parameters,d=u.samplers;if(e$2b(c))for(var f=c.length,p=0;p<f;++p){var _=c[p];if("rotation"===_.target.path){var m=h[d[_.sampler].output];if(e$2b(o[m]))continue;o[m]=!0;for(var g=i[m],x=n[g.bufferView],v=r[x.buffer].extras._pipeline.source,y=v.byteOffset+x.byteOffset+g.byteOffset,$=g.componentType,b=g.count,T=r$B(g.type),C=g.count*T,S=S$12.createArrayBufferView($,v.buffer,y,C),w=0;w<b;w++){var E=w*T;o$1p.unpack(S,E,a);var P=S[E+3];n$13.fromAxisAngle(a,P,s),n$13.pack(s,S,E)}}}}}function ae$j(e){var t=e.techniques;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.passes;if(e$2b(r)){var o=u$_(n.pass,"defaultPass");if(Object.prototype.hasOwnProperty.call(r,o)){var a=r[o],s=a.instanceProgram;n.attributes=u$_(n.attributes,s.attributes),n.program=u$_(n.program,s.program),n.uniforms=u$_(n.uniforms,s.uniforms),n.states=u$_(n.states,a.states)}delete n.passes,delete n.pass}}}function se$j(e){e$2b(e.asset)||(e.asset={});var t=e.asset;if(t.version="1.0","string"==typeof t.profile){var i=t.profile.split(" ");t.profile={api:i[0],version:i[1]}}else t.profile={};if(e$2b(e.version)&&delete e.version,F$F(e),ie$n(e),ne$s(e),te$n(e),ae$j(e),e$2b(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions),e$2b(e.lights)){var n=u$_(e.extensions,{});e.extensions=n;var r=u$_(n.KHR_materials_common,{});n.KHR_materials_common=r,r.lights=e.lights,delete e.lights,i$C(e,"KHR_materials_common")}}function oe$j(e){var t=e.animations;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.parameters;if(e$2b(r)){var o=n.samplers;for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)){var s=o[a];s.input=r[s.input],s.output=r[s.output]}delete n.parameters}}}function K$y(e,t){var i=[];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];t[n]=i.length,i.push(r),e$2b(r.name)||(r.name=n)}return i}function fe$g(e){var t,i,n={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}},r={},o=e.nodes;for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e$2b(i=o[a].jointName)&&(r[i]=a));for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&e$2b(n[s])){var l={},u=e[s];e[s]=K$y(u,l),n[s]=l}for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&(r[i]=n.nodes[r[i]]);e$2b(e.scene)&&(e.scene=n.scenes[e.scene]),e$K.bufferView(e,(function(e){e$2b(e.buffer)&&(e.buffer=n.buffers[e.buffer])})),e$K.accessor(e,(function(e){e$2b(e.bufferView)&&(e.bufferView=n.bufferViews[e.bufferView])})),e$K.shader(e,(function(e){var t=e.extensions;if(e$2b(t)){var i=t.KHR_binary_glTF;e$2b(i)&&(e.bufferView=n.bufferViews[i.bufferView],delete t.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}})),e$K.program(e,(function(e){e$2b(e.vertexShader)&&(e.vertexShader=n.shaders[e.vertexShader]),e$2b(e.fragmentShader)&&(e.fragmentShader=n.shaders[e.fragmentShader])})),e$K.technique(e,(function(e){e$2b(e.program)&&(e.program=n.programs[e.program]),e$K.techniqueParameter(e,(function(e){e$2b(e.node)&&(e.node=n.nodes[e.node]);var t=e.value;"string"==typeof t&&(e.value={index:n.textures[t]})}))})),e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$2b(e.indices)&&(e.indices=n.accessors[e.indices]),e$K.meshPrimitiveAttribute(e,(function(t,i){e.attributes[i]=n.accessors[t]})),e$2b(e.material)&&(e.material=n.materials[e.material])}))})),e$K.node(e,(function(i){var r=i.children;if(e$2b(r)){var o=r.length;for(t=0;t<o;++t)r[t]=n.nodes[r[t]]}if(e$2b(i.meshes)){var a=i.meshes,s=a.length;if(s>0)for(i.mesh=n.meshes[a[0]],t=1;t<s;++t){var l={mesh:n.meshes[a[t]]},u=d$P(e.nodes,l);e$2b(r)||(r=[],i.children=r),r.push(u)}delete i.meshes}if(e$2b(i.camera)&&(i.camera=n.cameras[i.camera]),e$2b(i.skin)&&(i.skin=n.skins[i.skin]),e$2b(i.skeletons)){var c=i.skeletons;if(c.length>0&&e$2b(i.skin))e.skins[i.skin].skeleton=n.nodes[c[0]];delete i.skeletons}e$2b(i.jointName)&&delete i.jointName})),e$K.skin(e,(function(e){e$2b(e.inverseBindMatrices)&&(e.inverseBindMatrices=n.accessors[e.inverseBindMatrices]);var i=e.jointNames;if(e$2b(i)){var o=[],a=i.length;for(t=0;t<a;++t)o[t]=r[i[t]];e.joints=o,delete e.jointNames}})),e$K.scene(e,(function(e){var i=e.nodes;if(e$2b(i)){var r=i.length;for(t=0;t<r;++t)i[t]=n.nodes[i[t]]}})),e$K.animation(e,(function(e){var t={};e.samplers=K$y(e.samplers,t),e$K.animationSampler(e,(function(e){e.input=n.accessors[e.input],e.output=n.accessors[e.output]})),e$K.animationChannel(e,(function(e){e.sampler=t[e.sampler];var i=e.target;e$2b(i)&&(i.node=n.nodes[i.id],delete i.id)}))})),e$K.material(e,(function(e){e$2b(e.technique)&&(e.technique=n.techniques[e.technique]),e$K.materialValue(e,(function(t,i){"string"==typeof t&&(e.values[i]={index:n.textures[t]})}));var t=e.extensions;if(e$2b(t)){var i=t.KHR_materials_common;e$2b(i)&&e$K.materialValue(i,(function(e,t){"string"==typeof e&&(i.values[t]={index:n.textures[e]})}))}})),e$K.image(e,(function(e){var t=e.extensions;if(e$2b(t)){var i=t.KHR_binary_glTF;e$2b(i)&&(e.bufferView=n.bufferViews[i.bufferView],e.mimeType=i.mimeType,delete t.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}e$K.compressedImage(e,(function(e){var i=e.extensions;if(e$2b(i)){var r=i.KHR_binary_glTF;e$2b(r)&&(e.bufferView=n.bufferViews[r.bufferView],e.mimeType=r.mimeType,delete i.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}}))})),e$K.texture(e,(function(e){e$2b(e.sampler)&&(e.sampler=n.samplers[e.sampler]),e$2b(e.source)&&(e.source=n.images[e.source])}))}function ue$l(e){e$K.animation(e,(function(e){e$K.animationSampler(e,(function(e){delete e.name}))}))}function ve$g(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];Array.isArray(i)&&0===i.length&&delete e[t]}e$K.node(e,(function(e){e$2b(e.children)&&0===e.children.length&&delete e.children}))}function ce$j(e){var t=e.asset;delete t.profile,delete t.premultipliedAlpha}var me$i={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function pe$i(e){var t=e.extensionsUsed;if(e.extensionsRequired=u$_(e.extensionsRequired,[]),e$2b(t))for(var i=t.length,n=0;n<i;++n){var r=t[n];e$2b(me$i[r])&&e.extensionsRequired.push(r)}}function be$i(e){e$K.buffer(e,(function(e){delete e.type}))}function he$g(e){e$K.texture(e,(function(e){delete e.format,delete e.internalFormat,delete e.target,delete e.type}))}function ye$c(e){e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){e$K.meshPrimitiveAttribute(e,(function(t,i){"TEXCOORD"===i?e.attributes.TEXCOORD_0=t:"COLOR"===i&&(e.attributes.COLOR_0=t)})),delete e.attributes.TEXCOORD,delete e.attributes.COLOR}))})),e$K.technique(e,(function(e){e$K.techniqueParameter(e,(function(e){var t=e.semantic;e$2b(t)&&("TEXCOORD"===t?e.semantic="TEXCOORD_0":"COLOR"===t&&(e.semantic="COLOR_0"))}))}))}var Oe$d={POSITION:!0,NORMAL:!0,TANGENT:!0},le$n={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function de$g(e){var t={};e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){for(var i in e$K.meshPrimitiveAttribute(e,(function(e,i){if("_"!==i.charAt(0)){var n=i.search(/_[0-9]+/g),r=i,o="_0";n>=0&&(r=i.substring(0,n),o=i.substring(n));var a,s=le$n[r];e$2b(s)?(a=s+o,t[i]=a):e$2b(Oe$d[r])||(a="_"+i,t[i]=a)}})),t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=e.attributes[i];e$2b(r)&&(delete e.attributes[i],e.attributes[n]=r)}}))})),e$K.technique(e,(function(e){e$K.techniqueParameter(e,(function(e){var i=t[e.semantic];e$2b(i)&&(e.semantic=i)}))}))}function Te$e(e){e$K.camera(e,(function(e){var t=e.perspective;if(e$2b(t)){var i=t.aspectRatio;e$2b(i)&&0===i&&delete t.aspectRatio;var n=t.yfov;e$2b(n)&&0===n&&(t.yfov=1)}}))}function C$C(e,t){return e$2b(t.byteStride)&&0!==t.byteStride?t.byteStride:p$A(e,t)}function we$e(e){e$K.buffer(e,(function(e){e$2b(e.byteLength)||(e.byteLength=e.extras._pipeline.source.length)})),e$K.accessor(e,(function(t){var i=t.bufferView;if(e$2b(i)){var n=e.bufferViews[i],r=C$C(e,t),o=t.byteOffset+t.count*r;n.byteLength=Math.max(u$_(n.byteLength,0),o)}}))}function xe$c(e){var t,i,n,r=e.bufferViews,o={};e$K.accessorContainingVertexAttributeData(e,(function(t){var i=e.accessors[t];e$2b(i.bufferView)&&(o[i.bufferView]=!0)}));var a={};for(var s in e$K.accessor(e,(function(e){e$2b(e.bufferView)&&(a[e.bufferView]=u$_(a[e.bufferView],[]),a[e.bufferView].push(e))})),a)if(Object.prototype.hasOwnProperty.call(a,s)){n=r[s];var l=a[s];l.sort((function(e,t){return e.byteOffset-t.byteOffset}));var u=0,c=0,h=l.length;for(t=0;t<h;++t){var d=l[t],f=C$C(e,d),p=d.byteOffset,_=d.count*f;delete d.byteStride;var m=t<h-1;if(f!==(m?C$C(e,l[t+1]):void 0)){var g=l$1g(n,!0);o[s]&&(g.byteStride=f),g.byteOffset+=u,g.byteLength=p+_-u;var x=d$P(r,g);for(i=c;i<=t;++i)(d=l[i]).bufferView=x,d.byteOffset=d.byteOffset-u;u=m?l[t+1].byteOffset:void 0,c=t+1}}}d$L(e,["accessor","bufferView","buffer"])}function Ae$f(e){e$K.accessorWithSemantic(e,"POSITION",(function(t){var i=e.accessors[t];if(!e$2b(i.min)||!e$2b(i.max)){var n=B$y(e,i);i.min=n.min,i.max=n.max}}))}function D$A(e){return(!e$2b(e.children)||0===e.children.length)&&(!e$2b(e.meshes)||0===e.meshes.length)&&!e$2b(e.camera)&&!e$2b(e.skin)&&!e$2b(e.skeletons)&&!e$2b(e.jointName)&&(!e$2b(e.translation)||o$1p.fromArray(e.translation).equals(o$1p.ZERO))&&(!e$2b(e.scale)||o$1p.fromArray(e.scale).equals(new o$1p(1,1,1)))&&(!e$2b(e.rotation)||e$29.fromArray(e.rotation).equals(new e$29(0,0,0,1)))&&(!e$2b(e.matrix)||p$1d.fromColumnMajorArray(e.matrix).equals(p$1d.IDENTITY))&&!e$2b(e.extensions)&&!e$2b(e.extras)}function L$G(e,t){e$K.scene(e,(function(e){var i=e.nodes;if(e$2b(i))for(var n=i.length;n>=0;--n)if(i[n]===t)return void i.splice(n,1)})),e$K.node(e,(function(i,n){if(e$2b(i.children)){var r=i.children.indexOf(t);r>-1&&(i.children.splice(r,1),D$A(i)&&L$G(e,n))}})),delete e.nodes[t]}function _e$h(e){return e$K.node(e,(function(t,i){D$A(t)&&L$G(e,i)})),e}function Pe$a(e){e$K.animation(e,(function(t){e$K.animationSampler(t,(function(t){var i=e.accessors[t.input];if(!e$2b(i.min)||!e$2b(i.max)){var n=B$y(e,i);i.min=n.min,i.max=n.max}}))}))}function Re$d(e){e.asset=u$_(e.asset,{}),e.asset.version="2.0",F$F(e),oe$j(e),_e$h(e),fe$g(e),ue$l(e),ce$j(e),pe$i(e),we$e(e),xe$c(e),Ae$f(e),Pe$a(e),be$i(e),he$g(e),ye$c(e),de$g(e),T$y(e),Te$e(e),R$v(e),R$u(e),ve$g(e)}function t$u(){this.initialized=!1,this.resourcesParsed=!1,this.vertexBuffersToCreate=new r$16,this.indexBuffersToCreate=new r$16,this.buffers={},this.pendingBufferLoads=0,this.programsToCreate=new r$16,this.shaders={},this.pendingShaderLoads=0,this.texturesToCreate=new r$16,this.pendingTextureLoads=0,this.texturesToCreateFromBufferView=new r$16,this.pendingBufferViewToImage=0,this.createSamplers=!0,this.createSkins=!0,this.createRuntimeAnimations=!0,this.createVertexArrays=!0,this.createRenderStates=!0,this.createUniformMaps=!0,this.createRuntimeNodes=!0,this.createdBufferViews={},this.primitivesToDecode=new r$16,this.activeDecodingTasks=0,this.pendingDecodingCache=!1,this.skinnedNodesIds=[]}function s$w(e,t,i){return e.subarray(t,t+i)}t$u.prototype.getBuffer=function(e){return s$w(this.buffers[e.buffer],e.byteOffset,e.byteLength)},t$u.prototype.finishedPendingBufferLoads=function(){return 0===this.pendingBufferLoads},t$u.prototype.finishedBuffersCreation=function(){return 0===this.pendingBufferLoads&&0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length},t$u.prototype.finishedProgramCreation=function(){return 0===this.pendingShaderLoads&&0===this.programsToCreate.length},t$u.prototype.finishedTextureCreation=function(){var e=0===this.pendingTextureLoads,t=0===this.texturesToCreate.length&&0===this.texturesToCreateFromBufferView.length;return e&&t},t$u.prototype.finishedEverythingButTextureCreation=function(){var e=0===this.pendingBufferLoads&&0===this.pendingShaderLoads,t=0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length&&0===this.programsToCreate.length&&0===this.pendingBufferViewToImage;return this.finishedDecoding()&&e&&t},t$u.prototype.finishedDecoding=function(){return 0===this.primitivesToDecode.length&&0===this.activeDecodingTasks&&!this.pendingDecodingCache},t$u.prototype.finished=function(){return this.finishedDecoding()&&this.finishedTextureCreation()&&this.finishedEverythingButTextureCreation()};var s$v={updateForwardAxis:function(e){var t=e.gltf.extras.sourceVersion;(e$2b(t)&&"2.0"!==t||"2.0"!==s$v.getAssetVersion(e.gltf))&&(e._gltfForwardAxis=v$y.X)},getAssetVersion:function(e){return e$2b(e.asset)&&e$2b(e.asset.version)?e.asset.version:"1.0"},splitIncompatibleMaterials:function(e){var t=e.accessors,i=e.materials,n={};return e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){var r,o,a=e.material,s=i[a],l=e.attributes.JOINTS_0;if(e$2b(l)){var u=t[l];r=u.componentType,o=u.type}var c=e$2b(l),h=e$2b(e.attributes.COLOR_0),d=e$2b(e.targets),f=e$2b(e.attributes.NORMAL),p=e$2b(e.attributes.TANGENT),_=e$2b(e.attributes.TEXCOORD_0),m=_&&e$2b(e.attributes.TEXCOORD_1),g=n[a];if(e$2b(g)){if(g.skinning.skinned!==c||g.skinning.type!==o||g.hasVertexColors!==h||g.hasMorphTargets!==d||g.hasNormals!==f||g.hasTangents!==p||g.hasTexCoords!==_||g.hasTexCoord1!==m){var x=l$1g(s,!0);a=d$P(i,x),e.material=a,n[a]={skinning:{skinned:c,componentType:r,type:o},hasVertexColors:h,hasMorphTargets:d,hasNormals:f,hasTangents:p,hasTexCoords:_,hasTexCoord1:m}}}else n[a]={skinning:{skinned:c,componentType:r,type:o},hasVertexColors:h,hasMorphTargets:d,hasNormals:f,hasTangents:p,hasTexCoords:_,hasTexCoord1:m}}))})),n},getShaderVariable:function(e){return"SCALAR"===e?"float":e.toLowerCase()},ModelState:{NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3},getFailedLoadFunction:function(e,t,i){return function(n){e._state=s$v.ModelState.FAILED;var r="Failed to load "+t+": "+i;e$2b(n)&&(r+="\n"+n.message),e._readyPromise.reject(new t$14(r))}},parseBuffers:function(e,t){var i=e._loadResources;e$K.buffer(e.gltf,(function(n,r){if(e$2b(n.extras._pipeline.source))i.buffers[r]=n.extras._pipeline.source;else if(e$2b(t)){var o=e._resource.getDerivedResource({url:n.uri});++i.pendingBufferLoads,o.fetchArrayBuffer().then(t(e,r)).otherwise(s$v.getFailedLoadFunction(e,"buffer",o.url))}}))}},cn$1=new o$1p,fn$1=new o$1p;function vn$1(e,t){return e$K.techniqueAttribute(e,(function(e,i){if(e.semantic===t)return i}))}function _n$1(e,t){var i=e.accessors,n=e.materials,r=e.extensions.KHR_techniques_webgl,o=r.techniques,a=r.programs,s=r.shaders,l=t.targets,u=t.attributes;for(var c in l)if(l.hasOwnProperty(c)){var h=l[c];for(var d in h)"extras"!==d&&(u[d+"_"+c]=h[d])}var f=o[n[t.material].extensions.KHR_techniques_webgl.technique],p=s[a[f.program].vertexShader];for(var _ in u)if(u.hasOwnProperty(_)&&!e$2b(vn$1(f,_))){var m=i[u[_]],g=_.toLowerCase();"_"===g.charAt(0)&&(g=g.slice(1));var x="a_"+g;f.attributes[x]={semantic:_,type:m.componentType};var v=p.extras._pipeline,y=v.source;y="attribute "+s$v.getShaderVariable(m.type)+" "+x+";\n"+y,v.source=y}}function tn$2(e,t,i,n){return i$D(e,"KHR_techniques_webgl")?function(e,t){if(!(e.semantic!==i||n&&e$2b(e.node)))return t}:function(e,r){var o=t.parameters[e];if(!(o.semantic!==i||n&&e$2b(o.node)))return r}}s$v.computeBoundingSphere=function(e){for(var t=e.gltf,i=t.nodes,n=t.meshes,r=t.scenes[t.scene].nodes,o=r.length,a=[],s=new o$1p(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),l=new o$1p(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),u=0;u<o;++u){var c=i[r[u]];for(c._transformToRoot=s$v.getTransform(c),a.push(c);a.length>0;){var h=(c=a.pop())._transformToRoot,d=c.mesh;if(e$2b(d))for(var f=n[d].primitives,p=f.length,_=0;_<p;++_){var m=f[_].attributes.POSITION;if(e$2b(m)){var g=s$v.getAccessorMinMax(t,m),x=o$1p.fromArray(g.min,0,cn$1),v=o$1p.fromArray(g.max,0,fn$1);e$2b(s)&&e$2b(l)&&(p$1d.multiplyByPoint(h,x,x),p$1d.multiplyByPoint(h,v,v),o$1p.minimumByComponent(s,x,s),o$1p.maximumByComponent(l,v,l))}}var y=c.children;if(e$2b(y))for(var $=y.length,b=0;b<$;++b){var T=i[y[b]];T._transformToRoot=s$v.getTransform(T),p$1d.multiplyTransformation(h,T._transformToRoot,T._transformToRoot),a.push(T)}delete c._transformToRoot}}var C=i$1c.fromCornerPoints(s,l);return e._minCorner=s,e._maxCorner=l,e._forwardAxis===v$y.Z&&i$1c.transformWithoutScale(C,v$y.Z_UP_TO_X_UP,C),e._upAxis===v$y.Y?i$1c.transformWithoutScale(C,v$y.Y_UP_TO_Z_UP,C):e._upAxis===v$y.X&&i$1c.transformWithoutScale(C,v$y.X_UP_TO_Z_UP,C),C},s$v.ensureSemanticExistence=function(e){return e$K.mesh(e,(function(t){e$K.meshPrimitive(t,(function(t){_n$1(e,t)}))})),e},s$v.createAttributeLocations=function(e,t){var i={},n=!1,r=1;if(e$K.techniqueAttribute(e,(function(e,t){/pos/i.test(t)&&!n?(i[t]=0,n=!0):i[t]=r++})),e$2b(t))for(var o in t)t.hasOwnProperty(o)&&(i[o]=r++);return i},s$v.getAccessorMinMax=function(e,t){var i=e.accessors[t],n=i.extensions,r=i.min,o=i.max;if(e$2b(n)){var a=n.WEB3D_quantized_attributes;e$2b(a)&&(r=a.decodedMin,o=a.decodedMax)}return{min:r,max:o}},s$v.getAttributeOrUniformBySemantic=function(e,t,i,n){return e$K.technique(e,(function(r){if(!e$2b(i)||r.program===i){var o=e$K.techniqueAttribute(r,tn$2(e,r,t,n));return e$2b(o)?o:e$K.techniqueUniform(r,tn$2(e,r,t,n))}}))},s$v.getDiffuseAttributeOrUniform=function(e,t){var i=s$v.getAttributeOrUniformBySemantic(e,"COLOR_0",t);return e$2b(i)||(i=s$v.getAttributeOrUniformBySemantic(e,"_3DTILESDIFFUSE",t)),i};var ln$1=new o$1p,mn$1=new n$13,hn$1=new o$1p;function N$r(e,t,i){t+="(?!\\w)",t=new RegExp(t,"g");var n=e.search(t);return e.replace(t,(function(e,t){return n===t?e:i}))}function En$1(e,t){var i=e.accessors[t].extensions;if(e$2b(i))return i.WEB3D_quantized_attributes}function on$1(e,t,i){var n=t.material,r=e.materials[n];if(i$D(e,"KHR_techniques_webgl")&&e$2b(r.extensions)&&e$2b(r.extensions.KHR_techniques_webgl)){var o=r.extensions.KHR_techniques_webgl.technique,a=e.extensions.KHR_techniques_webgl.techniques[o];return e$K.techniqueAttribute(a,(function(e,t){if(e.semantic===i)return t}))}}function D$z(e){var t={value:e,clone:function(e,t){return e},func:function(){return t.value}};return t}function K$x(e){var t={value:o$1o.fromArray(e),clone:o$1o.clone,func:function(){return t.value}};return t}function X$t(e){var t={value:o$1p.fromArray(e),clone:o$1p.clone,func:function(){return t.value}};return t}function d$K(e){var t={value:e$29.fromArray(e),clone:e$29.clone,func:function(){return t.value}};return t}function Y$r(e){var t={value:f$13.fromColumnMajorArray(e),clone:f$13.clone,func:function(){return t.value}};return t}function Z$x(e){var t={value:p$1e.fromColumnMajorArray(e),clone:p$1e.clone,func:function(){return t.value}};return t}function G$C(e){var t={value:p$1d.fromColumnMajorArray(e),clone:p$1d.clone,func:function(){return t.value}};return t}s$v.getTransform=function(e,t){return e$2b(e.matrix)?p$1d.fromColumnMajorArray(e.matrix,t):p$1d.fromTranslationQuaternionRotationScale(o$1p.fromArray(e.translation,0,ln$1),n$13.unpack(e.rotation,0,mn$1),o$1p.fromArray(e.scale,0,hn$1),t)},s$v.getUsedExtensions=function(e){var t=e.extensionsUsed,i={};if(e$2b(t))for(var n=t.length,r=0;r<n;r++){i[t[r]]=!0}return i},s$v.getRequiredExtensions=function(e){var t=e.extensionsRequired,i={};if(e$2b(t))for(var n=t.length,r=0;r<n;r++){i[t[r]]=!0}return i},s$v.supportedExtensions={AGI_articulations:!0,CESIUM_RTC:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_binary_glTF:!0,KHR_draco_mesh_compression:!0,KHR_materials_common:!0,KHR_techniques_webgl:!0,KHR_materials_unlit:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_texture_transform:!0,WEB3D_quantized_attributes:!0},s$v.checkSupportedExtensions=function(e,t){for(var i in e)if(e.hasOwnProperty(i)){if(!s$v.supportedExtensions[i])throw new t$14("Unsupported glTF Extension: "+i);if("EXT_texture_webp"===i&&!1===t)throw new t$14("Loaded model requires WebP but browser does not support it.")}},s$v.checkSupportedGlExtensions=function(e,t){if(e$2b(e))for(var i=e.length,n=0;n<i;n++){var r=e[n];if("OES_element_index_uint"!==r)throw new t$14("Unsupported WebGL Extension: "+r);if(!t.elementIndexUint)throw new t$14("OES_element_index_uint WebGL extension is not enabled.")}},s$v.modifyShaderForDracoQuantizedAttributes=function(e,t,i,n){var r={};for(var o in n)if(n.hasOwnProperty(o)){var a=n[o],s=a.quantization;if(!e$2b(s))continue;var l=on$1(e,t,o);"_"===o.charAt(0)&&(o=o.substring(1));var u="gltf_u_dec_"+o.toLowerCase();if(!e$2b(r[u])){var c,h="gltf_decoded_"+o,d=l.replace("a_","gltf_a_dec_"),f=a.componentsPerAttribute;i=N$r(i,l,d),i=(c=s.octEncoded?"vec3":f>1?"vec"+f:"float")+" "+d+";\n"+i;var p=3===f&&"COLOR_0"===o;p&&(i=N$r(i,d,"vec4("+d+", 1.0)"));var _="";if(s.octEncoded){var m=u+"_rangeConstant";i="uniform float "+m+";\n"+i,_="\nvoid main() {\n "+d+" = czm_octDecode("+l+".xy, "+m+").zxy;\n "+h+"();\n}\n"}else{var g=u+"_normConstant",x=u+"_min";i="uniform float "+g+";\nuniform "+c+" "+x+";\n"+i,_="\nvoid main() {\n "+d+" = "+x+" + "+l+(p?".xyz":"")+" * "+g+";\n "+h+"();\n}\n"}i=s$U.replaceMain(i,h),i+=_}}return{shader:i}},s$v.modifyShaderForQuantizedAttributes=function(e,t,i){var n={},r=t.attributes;for(var o in r)if(r.hasOwnProperty(o)){var a=on$1(e,t,o),s=t.attributes[o];"_"===o.charAt(0)&&(o=o.substring(1));var l="gltf_u_dec_"+o.toLowerCase(),u=l+"_scale",c=l+"_translate";if(!e$2b(n[l])&&!e$2b(n[u])){var h=En$1(e,s);if(e$2b(h)){var d,f=h.decodeMatrix,p="gltf_decoded_"+o,_=a.replace("a_","gltf_a_dec_"),m=Math.floor(Math.sqrt(f.length));i=(d=m>2?"vec"+(m-1):"float")+" "+_+";\n"+(i=N$r(i,a,_));var g="";5===m?(i="uniform vec4 "+c+";\n"+(i="uniform mat4 "+u+";\n"+i),g="\nvoid main() {\n "+_+" = "+u+" * "+a+" + "+c+";\n "+p+"();\n}\n",n[u]={mat:4},n[c]={vec:4}):(i="uniform mat"+m+" "+l+";\n"+i,g="\nvoid main() {\n "+_+" = "+d+"("+l+" * vec"+m+"("+a+",1.0));\n "+p+"();\n}\n",n[l]={mat:m}),i=s$U.replaceMain(i,p),i+=g}}}return{shader:i,uniforms:n}},s$v.toClipCoordinatesGLSL=function(e,t){var i=s$v.getAttributeOrUniformBySemantic(e,"POSITION"),n=i.replace("a_","gltf_a_dec_");-1!==t.indexOf(n)&&(i=n);var r=s$v.getAttributeOrUniformBySemantic(e,"MODELVIEWPROJECTION",void 0,!0);if(!e$2b(r)||-1===t.indexOf(r)){var o=s$v.getAttributeOrUniformBySemantic(e,"PROJECTION",void 0,!0),a=s$v.getAttributeOrUniformBySemantic(e,"MODELVIEW",void 0,!0);-1!==t.indexOf("czm_instanced_modelView ")?a="czm_instanced_modelView":e$2b(a)||(a=s$v.getAttributeOrUniformBySemantic(e,"CESIUM_RTC_MODELVIEW",void 0,!0)),r=o+" * "+a}return r+" * vec4("+i+".xyz, 1.0)"},s$v.modifyFragmentShaderForLogDepth=function(e){return e=s$U.replaceMain(e,"czm_depth_main"),e+="\nvoid main() \n{ \n czm_depth_main(); \n czm_writeLogDepth(); \n} \n"},s$v.modifyVertexShaderForLogDepth=function(e,t){return e=s$U.replaceMain(e,"czm_depth_main"),e+="\nvoid main() \n{ \n czm_depth_main(); \n czm_vertexLogDepth("+t+"); \n} \n"};var R$t=new e$29;function un$1(e){var t={value:e,clone:e$29.clone,func:function(){var e=performance.now()/1e3,i=t.value[4];if(i>0){var n=e%i;R$t.x=n*t.value[0]+t.value[1],R$t.y=n*t.value[2]+t.value[3]}else R$t.x=t.value[1],R$t.y=t.value[3];var r=t.value[9];if(r>0){var o=e%r;R$t.z=o*t.value[5]+t.value[6],R$t.w=o*t.value[7]+t.value[8]}else R$t.z=t.value[6],R$t.w=t.value[8];return R$t}};return t}function j$y(e,t,i){this._value=void 0,this._textureId=e.index,this._textures=t,this._defaultTexture=i}function pn$1(e,t,i){var n=new j$y(e,t,i);return n.func=function(){return n.value._texture?n.value:i},n}Object.defineProperties(j$y.prototype,{value:{get:function(){if(!e$2b(this._value)){var e=this._textures[this._textureId];if(!e$2b(e))return this._defaultTexture;this._value=e}return this._value},set:function(e){this._value=e}}}),j$y.prototype.clone=function(e){return e},j$y.prototype.func=void 0;var A$E={};A$E[de$x.FLOAT]=D$z,A$E[de$x.FLOAT_VEC2]=K$x,A$E[de$x.FLOAT_VEC3]=X$t,A$E[de$x.FLOAT_VEC4]=d$K,A$E[de$x.INT]=D$z,A$E[de$x.INT_VEC2]=K$x,A$E[de$x.INT_VEC3]=X$t,A$E[de$x.INT_VEC4]=d$K,A$E[de$x.BOOL]=D$z,A$E[de$x.BOOL_VEC2]=K$x,A$E[de$x.BOOL_VEC3]=X$t,A$E[de$x.BOOL_VEC4]=d$K,A$E[de$x.FLOAT_MAT2]=Y$r,A$E[de$x.FLOAT_MAT3]=Z$x,A$E[de$x.FLOAT_MAT4]=G$C,A$E[de$x.SAMPLER_2D]=pn$1;var z$x={};function gn$1(e){return[e[0],e[1],e[2],e[3],e[5],e[6],e[7],e[8],e[10],e[11],e[12],e[13],e[15],e[16],e[17],e[18]]}function On$1(e){return[e[20],e[21],e[22],e[23]]}z$x[ie$p.BASECOLOR_UV_OFFSET_AND_TILING]=un$1,z$x[ie$p.EMISSIVE_UV_OFFSET_AND_TILING]=un$1,s$v.createUniformFunction=function(e,t,i,n,r){return e$2b(r)?z$x[r](t,i,n):A$E[e](t,i,n)},s$v.createUniformsForDracoQuantizedAttributes=function(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i],r=n.quantization;if(!e$2b(r))continue;"_"===i.charAt(0)&&(i=i.substring(1));var o="gltf_u_dec_"+i.toLowerCase();if(r.octEncoded){var a=o+"_rangeConstant",s=(1<<r.quantizationBits)-1;t[a]=D$z(s).func;continue}var l=o+"_normConstant",u=r.range/(1<<r.quantizationBits);t[l]=D$z(u).func;var c=o+"_min";switch(n.componentsPerAttribute){case 1:t[c]=D$z(r.minValues).func;break;case 2:t[c]=K$x(r.minValues).func;break;case 3:t[c]=X$t(r.minValues).func;break;case 4:t[c]=d$K(r.minValues).func}}return t},s$v.createUniformsForQuantizedAttributes=function(e,t,i){var n=e.accessors,r={},o={},a=t.attributes;for(var s in a)if(a.hasOwnProperty(s)){var l=n[a[s]],u=l.extensions;if("_"===s.charAt(0)&&(s=s.substring(1)),e$2b(u)){var c=u.WEB3D_quantized_attributes;if(e$2b(c)){var h=c.decodeMatrix,d="gltf_u_dec_"+s.toLowerCase();switch(l.type){case Q$y.SCALAR:o[d]=Y$r(h).func,r[d]=!0;break;case Q$y.VEC2:o[d]=Z$x(h).func,r[d]=!0;break;case Q$y.VEC3:o[d]=G$C(h).func,r[d]=!0;break;case Q$y.VEC4:var f=d+"_scale",p=d+"_translate";o[f]=G$C(gn$1(h)).func,o[p]=d$K(On$1(h)).func,r[f]=!0,r[p]=!0}}}}for(var _ in i)if(i.hasOwnProperty(_)&&!r[_]){var m=i[_];e$2b(m.mat)&&(2===m.mat?o[_]=Y$r(f$13.IDENTITY).func:3===m.mat?o[_]=Z$x(p$1e.IDENTITY).func:4===m.mat&&(o[_]=G$C(p$1d.IDENTITY).func)),e$2b(m.vec)&&4===m.vec&&(o[_]=d$K([0,0,0,0]).func)}return o};var B$x=new o$1p,Tn$1={MODEL:function(e,t){return function(){return e.model}},VIEW:function(e,t){return function(){return e.view}},PROJECTION:function(e,t){return function(){return e.projection}},MODELVIEW:function(e,t){return function(){return e.modelView}},CESIUM_RTC_MODELVIEW:function(e,t){var i=new p$1d;return function(){return e$2b(t._rtcCenter)?(p$1d.getTranslation(e.model,B$x),o$1p.add(B$x,t._rtcCenter,B$x),p$1d.multiplyByPoint(e.view,B$x,B$x),p$1d.setTranslation(e.modelView,B$x,i)):e.modelView}},MODELVIEWPROJECTION:function(e,t){return function(){return e.modelViewProjection}},MODELINVERSE:function(e,t){return function(){return e.inverseModel}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t){return function(){return e.inverseModelView}},MODELVIEWPROJECTIONINVERSE:function(e,t){return function(){return e.inverseModelViewProjection}},MODELINVERSETRANSPOSE:function(e,t){return function(){return e.inverseTransposeModel}},MODELVIEWINVERSETRANSPOSE:function(e,t){return function(){return e.normal}},VIEWPORT:function(e,t){return function(){return e.viewportCartesian4}}};function ue$k(e,t){if(t=u$_(t,{}),e$2b(e)&&i$D(e,"KHR_materials_common")){i$D(e,"KHR_techniques_webgl")||(e$2b(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl"));var i=e.extensions.KHR_techniques_webgl;le$m(e);var n=ve$f(e),r=s$v.splitIncompatibleMaterials(e),o={},a=!1;return e$K.material(e,(function(s,l){if(e$2b(s.extensions)&&e$2b(s.extensions.KHR_materials_common)){var u=s.extensions.KHR_materials_common,c=r[l],h=_e$g(u,c),d=o[h];e$2b(d)||(d=fe$f(e,i,c,u,n,t.addBatchIdToGeneratedShaders),o[h]=d,a=!0);var f={},p=u.values;for(var _ in p)p.hasOwnProperty(_)&&"transparent"!==_&&"doubleSided"!==_&&(f["u_"+_.toLowerCase()]=p[_]);s.extensions.KHR_techniques_webgl={technique:d,values:f},s.alphaMode="OPAQUE",u.transparent&&(s.alphaMode="BLEND"),u.doubleSided&&(s.doubleSided=!0)}})),a&&s$v.ensureSemanticExistence(e),e}}function ve$f(e){var t,i={};if(e$2b(e.extensions)&&e$2b(e.extensions.KHR_materials_common)&&(t=e.extensions.KHR_materials_common.lights),e$2b(t)){var n=e.nodes;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];if(e$2b(o.extensions)&&e$2b(o.extensions.KHR_materials_common)){var a=o.extensions.KHR_materials_common.light;e$2b(a)&&e$2b(t[a])&&(t[a].node=r),delete o.extensions.KHR_materials_common}}var s=0;for(var l in t)if(t.hasOwnProperty(l)){var u=t[l],c=u.type;if("ambient"!==c&&!e$2b(u.node)){delete t[l];continue}var h="light"+s.toString();switch(u.baseName=h,c){case"ambient":var d=u.ambient;i[h+"Color"]={type:de$x.FLOAT_VEC3,value:d.color};break;case"directional":var f=u.directional;i[h+"Color"]={type:de$x.FLOAT_VEC3,value:f.color},e$2b(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$x.FLOAT_MAT4});break;case"point":var p=u.point;i[h+"Color"]={type:de$x.FLOAT_VEC3,value:p.color},e$2b(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$x.FLOAT_MAT4}),i[h+"Attenuation"]={type:de$x.FLOAT_VEC3,value:[p.constantAttenuation,p.linearAttenuation,p.quadraticAttenuation]};break;case"spot":var _=u.spot;i[h+"Color"]={type:de$x.FLOAT_VEC3,value:_.color},e$2b(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$x.FLOAT_MAT4},i[h+"InverseTransform"]={node:u.node,semantic:"MODELVIEWINVERSE",type:de$x.FLOAT_MAT4,useInFragment:!0}),i[h+"Attenuation"]={type:de$x.FLOAT_VEC3,value:[_.constantAttenuation,_.linearAttenuation,_.quadraticAttenuation]},i[h+"FallOff"]={type:de$x.FLOAT_VEC2,value:[_.fallOffAngle,_.fallOffExponent]}}++s}}return i}function fe$f(e,t,i,n,r,o){e$2b(n)||(n={}),o=u$_(o,!1);var a,s=t.techniques,l=t.shaders,u=t.programs,c=n.technique.toUpperCase();e$2b(e.extensions)&&e$2b(e.extensions.KHR_materials_common)&&(a=e.extensions.KHR_materials_common.lights);var h,d=n.values,f=u$_(n.jointCount,0),p=!1,_=!1;e$2b(i)&&(p=(h=i.skinning).skinned,_=i.hasVertexColors);var m="precision highp float;\n",g="precision highp float;\n",x="CONSTANT"!==c,v={u_modelViewMatrix:{semantic:i$D(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:de$x.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:de$x.FLOAT_MAT4}};x&&(v.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:de$x.FLOAT_MAT3}),p&&(v.u_jointMatrix={count:f,semantic:"JOINTMATRIX",type:de$x.FLOAT_MAT4});var y,$=!1;for(var b in d)if(d.hasOwnProperty(b)&&"transparent"!==b&&"doubleSided"!==b){var T=ne$r(b,d[b]);y="u_"+b.toLowerCase(),!$&&T===de$x.SAMPLER_2D&&($=!0),v[y]={type:T}}if(e$2b(v.u_diffuse)&&(v.u_diffuse.semantic="_3DTILESDIFFUSE"),e$2b(r))for(var C in r)r.hasOwnProperty(C)&&(v[y="u_"+C]=r[C]);for(y in v)if(v.hasOwnProperty(y)){var S=v[y],w=e$2b(S.count)?"["+S.count+"]":"";S.type!==de$x.FLOAT_MAT3&&S.type!==de$x.FLOAT_MAT4||S.useInFragment?(g+="uniform "+t$x(S.type)+" "+y+w+";\n",delete S.useInFragment):m+="uniform "+t$x(S.type)+" "+y+w+";\n"}var E="";if(p){var P,A,L=r$B(h.type),M=!1;if(0===h.type.indexOf("MAT")&&(M=!0,L=Math.sqrt(L)),M)for(P=0;P<L;P++)for(A=0;A<L;A++)E+=0===P&&0===A?" mat4 skinMat = ":" skinMat += ",E+="a_weight["+P+"]["+A+"] * u_jointMatrix[int(a_joint["+P+"]["+A+"])];\n";else for(P=0;P<L;P++)E+=0===P?" mat4 skinMat = ":" skinMat += ",E+="a_weight["+P+"] * u_jointMatrix[int(a_joint["+P+"])];\n"}var R,O={a_position:{semantic:"POSITION"}};if(m+="attribute vec3 a_position;\n",m+="varying vec3 v_positionEC;\n",E+=p?" vec4 pos = u_modelViewMatrix * skinMat * vec4(a_position,1.0);\n":" vec4 pos = u_modelViewMatrix * vec4(a_position,1.0);\n",E+=" v_positionEC = pos.xyz;\n",E+=" gl_Position = u_projectionMatrix * pos;\n",g+="varying vec3 v_positionEC;\n",x&&(O.a_normal={semantic:"NORMAL"},m+="attribute vec3 a_normal;\n",m+="varying vec3 v_normal;\n",E+=p?" v_normal = u_normalMatrix * mat3(skinMat) * a_normal;\n":" v_normal = u_normalMatrix * a_normal;\n",g+="varying vec3 v_normal;\n"),$&&(O.a_texcoord_0={semantic:"TEXCOORD_0"},m+="attribute vec2 a_texcoord_0;\n",m+="varying vec2 "+(R="v_texcoord_0")+";\n",E+=" "+R+" = a_texcoord_0;\n",g+="varying vec2 "+R+";\n"),p){var I=s$v.getShaderVariable(h.type);O.a_joint={semantic:"JOINT"},O.a_weight={semantic:"WEIGHT"},m+="attribute "+I+" a_joint;\n",m+="attribute "+I+" a_weight;\n"}_&&(O.a_vertexColor={semantic:"COLOR_0"},m+="attribute vec4 a_vertexColor;\n",m+="varying vec4 v_vertexColor;\n",E+=" v_vertexColor = a_vertexColor;\n",g+="varying vec4 v_vertexColor;\n"),o&&(O.a_batchId={semantic:"_BATCHID"},m+="attribute float a_batchId;\n");var D=x&&("BLINN"===c||"PHONG"===c)&&e$2b(v.u_specular)&&e$2b(v.u_shininess)&&v.u_shininess>0,B=!1,N=!1,F="";for(var U in a)if(a.hasOwnProperty(U)){var G=a[U],z=G.type.toLowerCase(),V=G.baseName;F+=" {\n";var k,W,H="u_"+V+"Color";"ambient"===z?(N=!0,F+=" ambientLight += "+H+";\n"):x&&(B=!0,k="v_"+V+"Direction",W="v_"+V+"Position","point"!==z&&(m+="varying vec3 "+k+";\n",g+="varying vec3 "+k+";\n",E+=" "+k+" = mat3(u_"+V+"Transform) * vec3(0.,0.,1.);\n","directional"===z&&(F+=" vec3 l = normalize("+k+");\n")),"directional"!==z?(m+="varying vec3 "+W+";\n",g+="varying vec3 "+W+";\n",E+=" "+W+" = u_"+V+"Transform[3].xyz;\n",F+=" vec3 VP = "+W+" - v_positionEC;\n",F+=" vec3 l = normalize(VP);\n",F+=" float range = length(VP);\n",F+=" float attenuation = 1.0 / (u_"+V+"Attenuation.x + ",F+="(u_"+V+"Attenuation.y * range) + ",F+="(u_"+V+"Attenuation.z * range * range));\n"):F+=" float attenuation = 1.0;\n","spot"===z&&(F+=" float spotDot = dot(l, normalize("+k+"));\n",F+=" if (spotDot < cos(u_"+V+"FallOff.x * 0.5))\n",F+=" {\n",F+=" attenuation = 0.0;\n",F+=" }\n",F+=" else\n",F+=" {\n",F+=" attenuation *= max(0.0, pow(spotDot, u_"+V+"FallOff.y));\n",F+=" }\n"),F+=" diffuseLight += "+H+"* max(dot(normal,l), 0.) * attenuation;\n",D&&("BLINN"===c?(F+=" vec3 h = normalize(l + viewDir);\n",F+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess)) * attenuation;\n"):(F+=" vec3 reflectDir = reflect(-l, normal);\n",F+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess)) * attenuation;\n"),F+=" specularLight += "+H+" * specularIntensity;\n")),F+=" }\n"}if(N||(F+=" ambientLight += vec3(0.2, 0.2, 0.2);\n"),!B&&"CONSTANT"!==c){F+=" vec3 l = normalize(czm_sunDirectionEC);\n";F+=" diffuseLight += vec3(1.0, 1.0, 1.0) * max(dot(normal,l), 0.2);\n",D&&("BLINN"===c?(F+=" vec3 h = normalize(l + viewDir);\n",F+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess));\n"):(F+=" vec3 reflectDir = reflect(-l, normal);\n",F+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess));\n"),F+=" specularLight += vec3(1.0, 1.0, 1.0) * specularIntensity;\n")}m+="void main(void) {\n",m+=E,m+="}\n",g+="void main(void) {\n";var q,j=" vec3 color = vec3(0.0, 0.0, 0.0);\n";x&&(g+=" vec3 normal = normalize(v_normal);\n",n.doubleSided&&(g+=" if (gl_FrontFacing == false)\n",g+=" {\n",g+=" normal = -normal;\n",g+=" }\n")),"CONSTANT"!==c?(e$2b(v.u_diffuse)&&(v.u_diffuse.type===de$x.SAMPLER_2D?g+=" vec4 diffuse = texture2D(u_diffuse, "+R+");\n":g+=" vec4 diffuse = u_diffuse;\n",g+=" vec3 diffuseLight = vec3(0.0, 0.0, 0.0);\n",j+=" color += diffuse.rgb * diffuseLight;\n"),D&&(v.u_specular.type===de$x.SAMPLER_2D?g+=" vec3 specular = texture2D(u_specular, "+R+").rgb;\n":g+=" vec3 specular = u_specular.rgb;\n",g+=" vec3 specularLight = vec3(0.0, 0.0, 0.0);\n",j+=" color += specular * specularLight;\n"),q=e$2b(v.u_transparency)?" gl_FragColor = vec4(color * diffuse.a * u_transparency, diffuse.a * u_transparency);\n":" gl_FragColor = vec4(color * diffuse.a, diffuse.a);\n"):q=e$2b(v.u_transparency)?" gl_FragColor = vec4(color * u_transparency, u_transparency);\n":" gl_FragColor = vec4(color, 1.0);\n",_&&(j+=" color *= v_vertexColor.rgb;\n"),e$2b(v.u_emission)&&(v.u_emission.type===de$x.SAMPLER_2D?g+=" vec3 emission = texture2D(u_emission, "+R+").rgb;\n":g+=" vec3 emission = u_emission.rgb;\n",j+=" color += emission;\n"),(e$2b(v.u_ambient)||"CONSTANT"!==c)&&(e$2b(v.u_ambient)?v.u_ambient.type===de$x.SAMPLER_2D?g+=" vec3 ambient = texture2D(u_ambient, "+R+").rgb;\n":g+=" vec3 ambient = u_ambient.rgb;\n":g+=" vec3 ambient = diffuse.rgb;\n",j+=" color += ambient * ambientLight;\n"),g+=" vec3 viewDir = -normalize(v_positionEC);\n",g+=" vec3 ambientLight = vec3(0.0, 0.0, 0.0);\n",g+=F,g+=j,g+=q,g+="}\n";var Y=d$P(l,{type:de$x.VERTEX_SHADER,extras:{_pipeline:{source:m,extension:".glsl"}}}),X=d$P(l,{type:de$x.FRAGMENT_SHADER,extras:{_pipeline:{source:g,extension:".glsl"}}}),K=d$P(u,{fragmentShader:X,vertexShader:Y});return d$P(s,{attributes:O,program:K,uniforms:v})}function ne$r(e,t){var i;switch(i=e$2b(t.value)?t.value:e$2b(t.index)?[t.index]:t,e){case"ambient":case"diffuse":case"emission":case"specular":return 1===i.length?de$x.SAMPLER_2D:de$x.FLOAT_VEC4;case"shininess":case"transparency":return de$x.FLOAT;case"transparent":case"doubleSided":return de$x.BOOL}}function _e$g(e,t){var i="";i+="technique:"+e.technique+";";for(var n=e.values,r=Object.keys(n).sort(),o=r.length,a=0;a<o;++a){var s=r[a];n.hasOwnProperty(s)&&(i+=s+":"+ne$r(s,n[s]),i+=";")}var l=u$_(e.jointCount,0);if(i+=l.toString()+";",e$2b(t)){var u=t.skinning;l>0&&(i+=u.type+";"),i+=t.hasVertexColors}return i}function le$m(e){var t=e.extensions.KHR_materials_common;if(e$2b(t)&&e$2b(t.lights))for(var i=t.lights,n=i.length,r=0;r<n;r++){var o=i[r];if("ambient"===o.type){e$2b(o.ambient)||(o.ambient={});var a=o.ambient;e$2b(a.color)||(a.color=[1,1,1])}else if("directional"===o.type){e$2b(o.directional)||(o.directional={});var s=o.directional;e$2b(s.color)||(s.color=[1,1,1])}else if("point"===o.type){e$2b(o.point)||(o.point={});var l=o.point;e$2b(l.color)||(l.color=[1,1,1]),l.constantAttenuation=u$_(l.constantAttenuation,1),l.linearAttenuation=u$_(l.linearAttenuation,0),l.quadraticAttenuation=u$_(l.quadraticAttenuation,0)}else if("spot"===o.type){e$2b(o.spot)||(o.spot={});var u=o.spot;e$2b(u.color)||(u.color=[1,1,1]),u.constantAttenuation=u$_(u.constantAttenuation,1),u.fallOffAngle=u$_(u.fallOffAngle,3.14159265),u.fallOffExponent=u$_(u.fallOffExponent,0),u.linearAttenuation=u$_(u.linearAttenuation,0),u.quadraticAttenuation=u$_(u.quadraticAttenuation,0)}}}function he$f(e,t){if(t=u$_(t,{}),i$D(e,"KHR_techniques_webgl")||!e$2b(e.materials)||0===e.materials.length)return e;e$2b(e.extensions)||(e.extensions={}),e$2b(e.extensionsUsed)||(e.extensionsUsed=[]),e$2b(e.extensionsRequired)||(e.extensionsRequired=[]),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl");var i=s$v.splitIncompatibleMaterials(e);return e$K.material(e,(function(n,r){var o={},a=xe$b(e,n,r,o,i,t);e$2b(n.extensions)||(n.extensions={}),n.extensions.KHR_techniques_webgl={values:o,technique:a}})),s$v.ensureSemanticExistence(e),e}function pe$h(e){return e$2b(e.extensions)&&e$2b(e.extensions.KHR_materials_pbrSpecularGlossiness)}function ge$f(e){return e$2b(e.textureMotion)}function te$m(e,t,i){var n=0,r=0,o=0,a=0,s=0,l=0,u=0,c=0,h=0;e.hasOwnProperty("start")&&(n+=e.start[0],o+=e.start[1]),e.hasOwnProperty("range")&&(n+=e.range[0],r=e.range[1],o+=e.range[2],a=e.range[3],c=e.range[0],h=e.range[2]),e.hasOwnProperty("speed")&&0!=e.speed&&(s=(r-c)/(u=1/e.speed),l=(a-h)/u),t[i]=s,t[i+1]=n,t[i+2]=l,t[i+3]=o,t[i+4]=u}function se$i(e,t,i,n){i[n]=[0,0,0,0,1,0,1,0,1,1],e$2b(e)&&te$m(e,i[n],0),e$2b(t)&&te$m(t,i[n],5)}function me$h(e,t){var i=e.textureMotion;(i.hasOwnProperty("baseColorTextureScroll")||i.hasOwnProperty("baseColorTextureScale"))&&se$i(i.baseColorTextureScroll,i.baseColorTextureScale,t,"u_baseColorUVOffsetAndTiling"),(i.hasOwnProperty("emissiveTextureScroll")||i.hasOwnProperty("emissiveTextureScale"))&&se$i(i.emissiveTextureScroll,i.emissiveTextureScale,t,"u_emissiveUVOffsetAndTiling")}function xe$b(e,t,i,n,r,o){var a,s,l=u$_(o.addBatchIdToGeneratedShaders,!1),u=e.extensions.KHR_techniques_webgl,c=u.techniques,h=u.shaders,d=u.programs,f=pe$h(t),p=ge$f(t),_=t.pbrMetallicRoughness;if(e$2b(_)&&!f)for(s in _)_.hasOwnProperty(s)&&(n[a="u_"+s]=_[s]);if(f){var m=t.extensions.KHR_materials_pbrSpecularGlossiness;for(s in m)m.hasOwnProperty(s)&&(n[a="u_"+s]=m[s])}for(var g in p&&me$h(t,n),t)t.hasOwnProperty(g)&&(g.indexOf("Texture")>=0||g.indexOf("Factor")>=0)&&(n[a="u_"+g]=t[g]);var x,v="precision highp float;\n",y="precision highp float;\n";e$2b(e.skins)&&(x=e.skins[0]);var $,b,T=e$2b(x)?x.joints:[],C=T.length,S=r[i],w=!1,E=!1,P=!1,A=!1,L=!1,M=!1,R=!1;e$2b(S)&&(w=($=S.skinning).skinned&&T.length>0,E=S.hasVertexColors,P=S.hasMorphTargets,A=S.hasNormals,L=S.hasTangents,M=S.hasTexCoords),P&&e$K.mesh(e,(function(e){e$K.meshPrimitive(e,(function(e){if(e.material===i){var t=e.targets;e$2b(t)&&(b=t)}}))}));var O={u_modelViewMatrix:{semantic:i$D(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:de$x.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:de$x.FLOAT_MAT4}};e$2b(t.extensions)&&e$2b(t.extensions.KHR_materials_unlit)&&(R=!0,A=!1,L=!1),A&&(O.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:de$x.FLOAT_MAT3}),w&&(O.u_jointMatrix={count:C,semantic:"JOINTMATRIX",type:de$x.FLOAT_MAT4}),P&&(O.u_morphWeights={count:b.length,semantic:"MORPHWEIGHTS",type:de$x.FLOAT});var I=t.alphaMode;for(a in e$2b(I)&&"MASK"===I&&(O.u_alphaCutoff={semantic:"ALPHACUTOFF",type:de$x.FLOAT}),n)n.hasOwnProperty(a)&&(O[a]={type:Te$d(a),extensionType:Ce$b(a)});var D=u$_(O.u_baseColorTexture,O.u_baseColorFactor);for(a in e$2b(D)&&(D.semantic="_3DTILESDIFFUSE"),O)if(O.hasOwnProperty(a)){var B=O[a],N=e$2b(B.count)?"["+B.count+"]":"";B.type!==de$x.FLOAT_MAT3&&B.type!==de$x.FLOAT_MAT4&&"u_morphWeights"!==a||B.useInFragment?(y+="uniform "+t$x(B.type)+" "+a+N+";\n",delete B.useInFragment):v+="uniform "+t$x(B.type)+" "+a+N+";\n"}var F="";if(w){var U,G,z=r$B($.type),V=!1;if(0===$.type.indexOf("MAT")&&(V=!0,z=Math.sqrt(z)),V)for(U=0;U<z;U++)for(G=0;G<z;G++)F+=0===U&&0===G?" mat4 skinMatrix = ":" skinMatrix += ",F+="a_weight["+U+"]["+G+"] * u_jointMatrix[int(a_joint["+U+"]["+G+"])];\n";else for(U=0;U<z;U++)F+=0===U?" mat4 skinMatrix = ":" skinMatrix += ",F+="a_weight["+U+"] * u_jointMatrix[int(a_joint["+U+"])];\n"}var k,W={a_position:{semantic:"POSITION"}};if(v+="attribute vec3 a_position;\n",A&&(v+="varying vec3 v_positionEC;\n",v+="varying vec3 v_positionWC;\n"),F+=" vec3 weightedPosition = a_position;\n",A&&(F+=" vec3 weightedNormal = a_normal;\n"),L&&(F+=" vec4 weightedTangent = a_tangent;\n"),P)for(var H=0;H<b.length;H++){var q=b[H];for(var j in q)if(q.hasOwnProperty(j)&&"extras"!==j){var Y="a_"+j+"_"+H;W[Y]={semantic:j+"_"+H},v+="attribute vec3 "+Y+";\n","POSITION"===j?F+=" weightedPosition += u_morphWeights["+H+"] * "+Y+";\n":"NORMAL"===j?F+=" weightedNormal += u_morphWeights["+H+"] * "+Y+";\n":L&&"TANGENT"===j&&(F+=" weightedTangent.xyz += u_morphWeights["+H+"] * "+Y+";\n")}}if(F+=w?" vec4 position = skinMatrix * vec4(weightedPosition, 1.0);\n":" vec4 position = vec4(weightedPosition, 1.0);\n",A&&(F+=" v_positionWC = (czm_model * position).xyz;\n"),F+=" position = u_modelViewMatrix * position;\n",A&&(F+=" v_positionEC = position.xyz;\n"),F+=" gl_Position = u_projectionMatrix * position;\n",A&&(W.a_normal={semantic:"NORMAL"},v+="attribute vec3 a_normal;\n",v+="varying vec3 v_normal;\n",F+=w?" v_normal = u_normalMatrix * mat3(skinMatrix) * weightedNormal;\n":" v_normal = u_normalMatrix * weightedNormal;\n",y+="varying vec3 v_normal;\n",y+="varying vec3 v_positionEC;\n",y+="varying vec3 v_positionWC;\n"),L&&(W.a_tangent={semantic:"TANGENT"},v+="attribute vec4 a_tangent;\n",v+="varying vec4 v_tangent;\n",F+=" v_tangent.xyz = u_normalMatrix * weightedTangent.xyz;\n",F+=" v_tangent.w = weightedTangent.w;\n",y+="varying vec4 v_tangent;\n"),M&&(W.a_texcoord_0={semantic:"TEXCOORD_0"},v+="attribute vec2 a_texcoord_0;\n",v+="varying vec2 "+(k="v_texcoord_0")+";\n",F+=" "+k+" = a_texcoord_0;\n",y+="varying vec2 "+k+";\n"),w){var X=s$v.getShaderVariable($.type);W.a_joint={semantic:"JOINTS_0"},W.a_weight={semantic:"WEIGHTS_0"},v+="attribute "+X+" a_joint;\n",v+="attribute "+X+" a_weight;\n"}E&&(W.a_vertexColor={semantic:"COLOR_0"},v+="attribute vec4 a_vertexColor;\n",v+="varying vec4 v_vertexColor;\n",F+=" v_vertexColor = a_vertexColor;\n",y+="varying vec4 v_vertexColor;\n"),l&&(W.a_batchId={semantic:"_BATCHID"},v+="attribute float a_batchId;\n"),v+="void main(void) \n{\n",v+=F,v+="}\n",A&&(y+="const float M_PI = 3.141592653589793;\n",y+="vec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\n\n",y+="vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\n\n",y+="vec3 fresnelSchlick(float metalness, float VdotH) \n{\n return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n}\n\n",y+="vec3 F_Schlick(float ndv, vec3 spec) \n{\n return spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n}\n\n",y+="float D_Phong(float g, float ndh) \n{\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\n",y+="float smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\n",y+="float smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\n\n",y+="float GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\n\n",y+="void getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm) \n{\n vec3 h = normalize(viewDir + lightDir);\n float NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\n float NdotH = clamp(dot(normal, h), 0.0, 1.0);\n vec3 li = lightColor * NdotL;\n diffuseTerm = li;\n specularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n}\n\n"),y+="vec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\n",y+="vec4 SRGBtoLINEAR4(vec4 srgbIn) \n{\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\n",y+="vec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR \n return czm_acesTonemapping(linearIn);\n#else \n return linearIn;\n#endif \n}\n\n",y+="vec3 LINEARtoSRGB(vec3 linearIn) \n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else \n return linearIn;\n#endif \n}\n\n",y+="float calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent) \n{\n return pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n}\n\n",y+="#ifdef USE_IBL_LIGHTING \n",y+="uniform vec2 gltf_iblFactor; \n",y+="#endif \n",y+="#ifdef USE_CUSTOM_LIGHT_COLOR \n",y+="uniform vec3 gltf_lightColor; \n",y+="#endif \n",y+="void main(void) \n{\n",A&&(y+=" vec3 ng = normalize(v_normal);\n",e$2b(n.u_normalTexture)?L?(y+=" vec3 t = normalize(v_tangent.xyz);\n",y+=" vec3 b = normalize(cross(ng, t) * v_tangent.w);\n",y+=" mat3 tbn = mat3(t, b, ng);\n",y+=" vec3 n = texture2D(u_normalTexture, "+k+").rgb;\n",y+=" n = normalize(tbn * (2.0 * n - 1.0));\n"):(y="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"+y,y+="#ifdef GL_OES_standard_derivatives\n",y+=" vec3 pos_dx = dFdx(v_positionEC);\n",y+=" vec3 pos_dy = dFdy(v_positionEC);\n",y+=" vec3 tex_dx = dFdx(vec3("+k+",0.0));\n",y+=" vec3 tex_dy = dFdy(vec3("+k+",0.0));\n",y+=" vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n",y+=" t = normalize(t - ng * dot(ng, t));\n",y+=" vec3 b = normalize(cross(ng, t));\n",y+=" mat3 tbn = mat3(t, b, ng);\n",y+=" vec3 n = texture2D(u_normalTexture, "+k+").rgb;\n",y+=" n = normalize(tbn * (2.0 * n - 1.0));\n",y+="#else\n",y+=" vec3 n = ng;\n",y+="#endif\n"):y+=" vec3 n = ng;\n",t.doubleSided&&(y+=" if (!gl_FrontFacing)\n",y+=" {\n",y+=" n = -n;\n",y+=" }\n")),e$2b(n.u_baseColorTexture)?(y+=" vec2 uvOffset = vec2(0.0);\n",y+=" vec2 uvTiling = vec2(1.0);\n",e$2b(n.u_baseColorUVOffsetAndTiling)&&(y+=" uvOffset = u_baseColorUVOffsetAndTiling.xy;\n",y+=" uvTiling = u_baseColorUVOffsetAndTiling.zw;\n"),y+=" vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, "+k+" * uvTiling.xy + uvOffset.xy));\n",e$2b(n.u_baseColorFactor)&&(y+=" baseColorWithAlpha *= u_baseColorFactor;\n")):e$2b(n.u_baseColorFactor)?y+=" vec4 baseColorWithAlpha = u_baseColorFactor;\n":y+=" vec4 baseColorWithAlpha = vec4(1.0);\n",E&&(y+=" baseColorWithAlpha *= v_vertexColor;\n"),y+=" vec3 baseColor = baseColorWithAlpha.rgb;\n",A?(f?(e$2b(n.u_specularGlossinessTexture)?(y+=" vec4 specularGlossiness = SRGBtoLINEAR4(texture2D(u_specularGlossinessTexture, "+k+"));\n",y+=" vec3 specular = specularGlossiness.rgb;\n",y+=" float glossiness = specularGlossiness.a;\n",e$2b(n.u_specularFactor)&&(y+=" specular *= u_specularFactor;\n"),e$2b(n.u_glossinessFactor)&&(y+=" glossiness *= u_glossinessFactor;\n")):(e$2b(n.u_specularFactor)?y+=" vec3 specular = clamp(u_specularFactor, vec3(0.0), vec3(1.0));\n":y+=" vec3 specular = vec3(1.0);\n",e$2b(n.u_glossinessFactor)?y+=" float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);\n":y+=" float glossiness = 1.0;\n"),e$2b(n.u_diffuseTexture)?(e$2b(n.u_diffuseTextureUVSpeedFactor)?y+=" vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, "+k+" + u_diffuseTextureUVSpeedFactor.xy));\n":y+=" vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, "+k+"));\n",e$2b(n.u_diffuseFactor)&&(y+=" diffuse *= u_diffuseFactor;\n")):e$2b(n.u_diffuseFactor)?y+=" vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));\n":y+=" vec4 diffuse = vec4(1.0);\n"):e$2b(n.u_metallicRoughnessTexture)?(y+=" vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, "+k+").rgb;\n",y+=" float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n",y+=" float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n",e$2b(n.u_metallicFactor)&&(y+=" metalness *= u_metallicFactor;\n"),e$2b(n.u_roughnessFactor)&&(y+=" roughness *= u_roughnessFactor;\n")):(e$2b(n.u_metallicFactor)?y+=" float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n":y+=" float metalness = 1.0;\n",e$2b(n.u_roughnessFactor)?y+=" float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n":y+=" float roughness = 1.0;\n"),y+=" vec3 v = -normalize(v_positionEC);\n",f?(y+=" float roughness = 1.0 - glossiness;\n",y+=" vec3 diffuseColor = diffuse.rgb * (1.0 - max(max(specular.r, specular.g), specular.b));\n",y+=" vec3 specularColor = specular;\n"):(y+=" vec3 f0 = vec3(0.04);\n",y+=" vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n",y+=" vec3 specularColor = mix(f0, baseColor, metalness);\n"),y+=" float NdotV = abs(dot(n, v)) + 0.001;\n",y+=" vec3 diffuseTerm = vec3(0.0);\n",y+=" vec3 specularTerm = vec3(0.0);\n",y+=" vec3 fresnelTerm = F_Schlick(NdotV, specularColor);\n",y+=" vec3 color = vec3(0.0);\n",y+="#if DIR_LIGHTS > 0 \n",y+=" for (int i = 0; i < DIR_LIGHTS; i++) { \n",y+=" vec3 lightDiffuseTerm = vec3(0.0);\n",y+=" vec3 lightSpecularTerm = vec3(0.0);\n",y+=" getLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",y+=" diffuseTerm +=lightDiffuseTerm;\n",y+=" specularTerm += lightSpecularTerm;\n",y+=" } \n",y+="#endif \n",y+="#if POINT_LIGHTS > 0 \n",y+=" for (int i = 0; i < POINT_LIGHTS; i++) { \n",y+=" vec3 lVector = uPointLightPositionEC[i] - v_positionEC;\n",y+=" float lightDistance = length(lVector);\n",y+=" float lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\n",y+=" if(lightAttenuation < 0.001) {\n",y+=" continue;}\n",y+=" vec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\n",y+=" vec3 lightDiffuseTerm = vec3(0.0);\n",y+=" vec3 lightSpecularTerm = vec3(0.0);\n",y+=" getLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",y+=" diffuseTerm +=lightDiffuseTerm;\n",y+=" specularTerm += lightSpecularTerm;\n",y+=" }\n",y+="#endif \n",y+="#if SPOT_LIGHTS > 0 \n",y+=" for (int i = 0; i < SPOT_LIGHTS; i++) { \n",y+=" vec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\n",y+=" float lightDistance = length(lVector);\n",y+=" float lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\n",y+=" if(lightAttenuation < 0.001) {\n",y+=" continue;}\n",y+=" float spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\n",y+=" if(spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z) {\n",y+=" vec3 spotLightColor = uSpotLightColorAndExponent[i].xyz * lightAttenuation * spotEffect;\n",y+=" vec3 lightDiffuseTerm = vec3(0.0);\n",y+=" vec3 lightSpecularTerm = vec3(0.0);\n",y+=" getLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",y+=" diffuseTerm +=lightDiffuseTerm;\n",y+=" specularTerm += lightSpecularTerm;\n",y+=" }\n",y+=" }\n",y+="#endif \n",y+=" color = baseColor; \n",y+=" color *= max(diffuseTerm, vec3(0.0)); \n",y+=" color += max(specularTerm, vec3(0.0)); \n",y+="#ifndef USE_CUSTOM_LIGHT_COLOR \n",y+=" vec3 lightColorHdr = czm_lightColorHdr;\n",y+="#else \n",y+=" vec3 lightColorHdr = gltf_lightColor;\n",y+="#endif \n",y+=" vec3 l = normalize(czm_lightDirectionEC);\n",y+=" vec3 h = normalize(v + l);\n",y+=" float NdotL = clamp(dot(n, l), 0.001, 1.0);\n",y+=" float NdotH = clamp(dot(n, h), 0.0, 1.0);\n",y+=" float LdotH = clamp(dot(l, h), 0.0, 1.0);\n",y+=" float VdotH = clamp(dot(v, h), 0.0, 1.0);\n",y+=" float alpha = roughness * roughness;\n",y+=" float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n",y+=" vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n",y+=" vec3 r0 = specularColor.rgb;\n",y+=" vec3 F = fresnelSchlick2(r0, r90, VdotH);\n",y+=" float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n",y+=" float D = GGX(alpha, NdotH);\n",y+=" vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n",y+=" vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n",y+=" color += NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n",y+="#if defined(USE_IBL_LIGHTING) && !defined(DIFFUSE_IBL) && !defined(SPECULAR_IBL) \n",y+=" vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n",y+=" czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n",y+=" float vertexRadius = length(v_positionWC);\n",y+=" float horizonDotNadir = 1.0 - min(1.0, ellipsoid.radii.x / vertexRadius);\n",y+=" float reflectionDotNadir = dot(r, normalize(v_positionWC));\n",y+=" r.x = -r.x;\n",y+=" r = -normalize(czm_temeToPseudoFixed * r);\n",y+=" r.x = -r.x;\n",y+=" float inverseRoughness = 1.04 - roughness;\n",y+=" inverseRoughness *= inverseRoughness;\n",y+=" vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n",y+=" float atmosphereHeight = 0.05;\n",y+=" float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n",y+=" float blendRegionOffset = roughness * -1.0;\n",y+=" float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n",y+=" float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n",y+=" float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n",y+=" float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n",y+=" vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n",y+=" vec3 nadirColor = belowHorizonColor * 0.5;\n",y+=" vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n",y+=" vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n",y+=" vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n",y+=" vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n",y+=" float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n",y+=" float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n",y+=" vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n",y+=" float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n",y+=" vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n",y+=" specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n",y+=" specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n",y+="#ifdef USE_SUN_LUMINANCE \n",y+=" float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(v_positionWC * -1.0)), 0.001, 1.0);\n",y+=" float S = acos(LdotZenith);\n",y+=" float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(v_positionWC * -1.0)), 0.001, 1.0);\n",y+=" float sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\n",y+=" float gamma = acos(sunNdotL);\n",y+=" float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n",y+=" float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n",y+=" float luminance = gltf_luminanceAtZenith * (numerator / denominator);\n",y+="#endif \n",y+=" vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",y+=" vec3 IBLColor = (diffuseIrradiance * diffuseColor * gltf_iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * gltf_iblFactor.y);\n",y+="#ifdef USE_SUN_LUMINANCE \n",y+=" color += IBLColor * luminance;\n",y+="#else \n",y+=" color += IBLColor; \n",y+="#endif \n",y+="#elif defined(DIFFUSE_IBL) || defined(SPECULAR_IBL) \n",y+=" mat3 fixedToENU = mat3(gltf_clippingPlanesMatrix[0][0], gltf_clippingPlanesMatrix[1][0], gltf_clippingPlanesMatrix[2][0], \n",y+=" gltf_clippingPlanesMatrix[0][1], gltf_clippingPlanesMatrix[1][1], gltf_clippingPlanesMatrix[2][1], \n",y+=" gltf_clippingPlanesMatrix[0][2], gltf_clippingPlanesMatrix[1][2], gltf_clippingPlanesMatrix[2][2]); \n",y+=" const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0); \n",y+=" vec3 cubeDir = normalize(yUpToZUp * fixedToENU * normalize(reflect(-v, n))); \n",y+="#ifdef DIFFUSE_IBL \n",y+="#ifdef CUSTOM_SPHERICAL_HARMONICS \n",y+=" vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, gltf_sphericalHarmonicCoefficients); \n",y+="#else \n",y+=" vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients); \n",y+="#endif \n",y+="#else \n",y+=" vec3 diffuseIrradiance = vec3(0.0); \n",y+="#endif \n",y+="#ifdef SPECULAR_IBL \n",y+=" vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",y+="#ifdef CUSTOM_SPECULAR_IBL \n",y+=" vec3 specularIBL = czm_sampleOctahedralProjection(gltf_specularMap, gltf_specularMapSize, cubeDir, roughness * gltf_maxSpecularLOD, gltf_maxSpecularLOD);\n",y+="#else \n",y+=" vec3 specularIBL = czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, czm_specularEnvironmentMapSize, cubeDir, roughness * czm_specularEnvironmentMapsMaximumLOD, czm_specularEnvironmentMapsMaximumLOD);\n",y+="#endif \n",y+=" specularIBL *= F * brdfLut.x + brdfLut.y;\n",y+="#else \n",y+=" vec3 specularIBL = vec3(0.0); \n",y+="#endif \n",y+=" color += diffuseIrradiance * diffuseColor + specularColor * specularIBL;\n",y+="#endif \n"):y+=" vec3 color = baseColor;\n",R||(e$2b(n.u_occlusionTexture)&&(y+=" color *= texture2D(u_occlusionTexture, "+k+").r;\n"),e$2b(n.u_emissiveTexture)?(y+=" vec2 uvEmissiveOffset = vec2(0.0);\n",y+=" vec2 uvEmissiveTiling = vec2(1.0);\n",e$2b(n.u_emissiveUVOffsetAndTiling)&&(y+=" uvEmissiveOffset = u_emissiveUVOffsetAndTiling.xy;\n",y+=" uvEmissiveTiling = u_emissiveUVOffsetAndTiling.zw;\n"),y+=" vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, "+k+"* uvEmissiveTiling.xy + uvEmissiveOffset.xy).rgb);\n",e$2b(n.u_emissiveFactor)&&(y+=" emissive *= u_emissiveFactor;\n"),y+=" color += emissive;\n"):e$2b(n.u_emissiveFactor)&&(y+=" color += u_emissiveFactor;\n")),R||(y+=" color = applyTonemapping(color);\n"),y+=" color = LINEARtoSRGB(color);\n",e$2b(I)?"MASK"===I?(y+=" if (baseColorWithAlpha.a < u_alphaCutoff) {\n",y+=" discard;\n",y+=" }\n",y+=" gl_FragColor = vec4(color, 1.0);\n"):y+="BLEND"===I?" gl_FragColor = vec4(color, baseColorWithAlpha.a);\n":" gl_FragColor = vec4(color, 1.0);\n":y+=" gl_FragColor = vec4(color, 1.0);\n",y+="}\n";var K=d$P(h,{type:de$x.VERTEX_SHADER,extras:{_pipeline:{source:v,extension:".glsl"}}}),Q=d$P(h,{type:de$x.FRAGMENT_SHADER,extras:{_pipeline:{source:y,extension:".glsl"}}}),Z=d$P(d,{fragmentShader:Q,vertexShader:K});return d$P(c,{attributes:W,program:Z,uniforms:O})}function Te$d(e){switch(e){case"u_baseColorFactor":case"u_baseColorUVOffsetAndTiling":case"u_emissiveUVOffsetAndTiling":case"u_diffuseFactor":return de$x.FLOAT_VEC4;case"u_metallicFactor":case"u_roughnessFactor":case"u_glossinessFactor":return de$x.FLOAT;case"u_baseColorTexture":case"u_metallicRoughnessTexture":case"u_normalTexture":case"u_occlusionTexture":case"u_emissiveTexture":case"u_diffuseTexture":case"u_specularGlossinessTexture":return de$x.SAMPLER_2D;case"u_emissiveFactor":case"u_specularFactor":return de$x.FLOAT_VEC3}return-1!==e.indexOf("Offset")?de$x.FLOAT_VEC2:-1!==e.indexOf("Rotation")?de$x.FLOAT:-1!==e.indexOf("Scale")?de$x.FLOAT_VEC2:-1!==e.indexOf("Texture")?de$x.SAMPLER_2D:void 0}function Ce$b(e){switch(e){case"u_baseColorUVOffsetAndTiling":return ie$p.BASECOLOR_UV_OFFSET_AND_TILING;case"u_emissiveUVOffsetAndTiling":return ie$p.EMISSIVE_UV_OFFSET_AND_TILING}}function c$w(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}s$v.getGltfSemanticUniforms=function(){return Tn$1};var G$B="attribute vec3 position;\nattribute float a_batchId;\nuniform mat4 u_modifiedModelViewProjection;\nvoid main()\n{\ngl_Position = czm_depthClampFarPlane(u_modifiedModelViewProjection * vec4(position, 1.0));\n}\n",J$v={};!function(e){var t="Compound",i="MemberExpression",n="Literal",r=function(e,t){var i=new Error(e+" at character "+t);throw i.index=t,i.description=e,i},o=!0,a={"-":o,"!":o,"~":o,"+":o},s={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},l=function(e){var t,i=0;for(var n in e)(t=n.length)>i&&e.hasOwnProperty(n)&&(i=t);return i},u=l(a),c=l(s),h={true:!0,false:!1,null:null},d=function(e){return s[e]||0},f=function(e,t,i){return{type:"||"===e||"&&"===e?"LogicalExpression":"BinaryExpression",operator:e,left:t,right:i}},p=function(e){return e>=48&&e<=57},_=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=128&&!s[String.fromCharCode(e)]},m=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e>=128&&!s[String.fromCharCode(e)]},g=function(e){for(var o,l,g=0,x=e.charAt,v=e.charCodeAt,y=function(t){return x.call(e,t)},$=function(t){return v.call(e,t)},b=e.length,T=function(){for(var e=$(g);32===e||9===e;)e=$(++g)},C=function(){var e,t,i=w();return T(),63!==$(g)?i:(g++,(e=C())||r("Expected expression",g),T(),58===$(g)?(g++,(t=C())||r("Expected expression",g),{type:"ConditionalExpression",test:i,consequent:e,alternate:t}):void r("Expected :",g))},S=function(){T();for(var t=e.substr(g,c),i=t.length;i>0;){if(s.hasOwnProperty(t))return g+=i,t;t=t.substr(0,--i)}return!1},w=function(){var e,t,i,n,o,a,s,l;if(a=E(),!(t=S()))return a;for(o={value:t,prec:d(t)},(s=E())||r("Expected expression after "+t,g),n=[a,o,s];(t=S())&&0!==(i=d(t));){for(o={value:t,prec:i};n.length>2&&i<=n[n.length-2].prec;)s=n.pop(),t=n.pop().value,a=n.pop(),e=f(t,a,s),n.push(e);(e=E())||r("Expected expression after "+t,g),n.push(o,e)}for(e=n[l=n.length-1];l>1;)e=f(n[l-1].value,n[l-2],e),l-=2;return e},E=function(){var t,i,n;if(T(),t=$(g),p(t)||46===t)return P();if(39===t||34===t)return A();if(_(t)||40===t)return R();if(91===t)return I();for(n=(i=e.substr(g,u)).length;n>0;){if(a.hasOwnProperty(i))return g+=n,{type:"UnaryExpression",operator:i,argument:E(),prefix:!0};i=i.substr(0,--n)}return!1},P=function(){for(var e,t,i="";p($(g));)i+=y(g++);if(46===$(g))for(i+=y(g++);p($(g));)i+=y(g++);if("e"===(e=y(g))||"E"===e){for(i+=y(g++),("+"===(e=y(g))||"-"===e)&&(i+=y(g++));p($(g));)i+=y(g++);p($(g-1))||r("Expected exponent ("+i+y(g)+")",g)}return t=$(g),_(t)?r("Variable names cannot start with a number ("+i+y(g)+")",g):46===t&&r("Unexpected period",g),{type:n,value:parseFloat(i),raw:i}},A=function(){for(var e,t="",i=y(g++),o=!1;g<b;){if((e=y(g++))===i){o=!0;break}if("\\"===e)switch(e=y(g++),e){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+="\\"+e}else t+=e}return o||r('Unclosed quote after "'+t+'"',g),{type:n,value:t,raw:i+t+i}},L=function(){var t,i=$(g),o=g;for(_(i)?g++:r("Unexpected "+y(g),g);g<b&&(i=$(g),m(i));)g++;return t=e.slice(o,g),h.hasOwnProperty(t)?{type:n,value:h[t],raw:t}:"this"===t?{type:"ThisExpression"}:{type:"Identifier",name:t}},M=function(e){for(var i,n,o=[],a=!1;g<b;){if(T(),(i=$(g))===e){a=!0,g++;break}44===i?g++:((!(n=C())||n.type===t)&&r("Expected comma",g),o.push(n))}return a||r("Expected "+String.fromCharCode(e),g),o},R=function(){var e,t;for(t=40===(e=$(g))?O():L(),T(),e=$(g);46===e||91===e||40===e;)g++,46===e?(T(),t={type:i,computed:!1,object:t,property:L()}):91===e?(t={type:i,computed:!0,object:t,property:C()},T(),93!==(e=$(g))&&r("Unclosed [",g),g++):40===e&&(t={type:"CallExpression",arguments:M(41),callee:t}),T(),e=$(g);return t},O=function(){g++;var e=C();if(T(),41===$(g))return g++,e;r("Unclosed (",g)},I=function(){return g++,{type:"ArrayExpression",elements:M(93)}},D=[];g<b;)59===(o=$(g))||44===o?g++:(l=C())?D.push(l):g<b&&r('Unexpected "'+y(g)+'"',g);return 1===D.length?D[0]:{type:t,body:D}};g.version="0.3.1",g.toString=function(){return"JavaScript Expression Parser (JSEP) v"+g.version},g.addUnaryOp=function(e){return u=Math.max(e.length,u),a[e]=o,this},g.addBinaryOp=function(e,t){return c=Math.max(e.length,c),s[e]=t,this},g.addLiteral=function(e,t){return h[e]=t,this},g.removeUnaryOp=function(e){return delete a[e],e.length===u&&(u=l(a)),this},g.removeAllUnaryOps=function(){return a={},u=0,this},g.removeBinaryOp=function(e){return delete s[e],e.length===c&&(c=l(s)),this},g.removeAllBinaryOps=function(){return s={},c=0,this},g.removeLiteral=function(e){return delete h[e],this},g.removeAllLiterals=function(){return h={},this},e.jsep=g}(J$v);var q$B=J$v.jsep,L$F={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18},s$u=Object.freeze(L$F);function L$E(e,t){var i;o$1q.typeOf.string("expression",e),this._expression=e,e=fe$e(le$l(e=se$h(e,t))),q$B.addBinaryOp("=~",0),q$B.addBinaryOp("!~",0);try{i=q$B(e)}catch(e){throw new t$14(e)}this._runtimeAst=_$u(this,i)}Object.defineProperties(L$E.prototype,{expression:{get:function(){return this._expression}}});var m$y={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new o$1o],cartesian3Array:[new o$1p],cartesian4Array:[new e$29],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);var e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new o$1o),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new o$1p),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new e$29),this.cartesian4Array[this.cartesian4Index++]}};L$E.prototype.evaluate=function(e,t){m$y.reset();var i=this._runtimeAst.evaluate(e);return t instanceof e$1U&&i instanceof e$29?e$1U.fromCartesian4(i,t):i instanceof o$1o||i instanceof o$1p||i instanceof e$29?i.clone(t):i},L$E.prototype.evaluateColor=function(e,t){m$y.reset();var i=this._runtimeAst.evaluate(e);return e$1U.fromCartesian4(i,t)},L$E.prototype.getShaderFunction=function(e,t,i,n){var r=this.getShaderExpression(t,i);return r=n+" "+e+"() \n{ \n return "+r+"; \n} \n"},L$E.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};var K$w=["!","-","+"],G$A=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],V$p=/\${(.*?)}/g,J$u=/\\/g,W$C="@#%",Z$w=/@#%/g,T$x=new e$1U,C$B={abs:w$w(Math.abs),sqrt:w$w(Math.sqrt),cos:w$w(Math.cos),sin:w$w(Math.sin),tan:w$w(Math.tan),acos:w$w(Math.acos),asin:w$w(Math.asin),atan:w$w(Math.atan),radians:w$w(e$2a.toRadians),degrees:w$w(e$2a.toDegrees),sign:w$w(e$2a.sign),floor:w$w(Math.floor),ceil:w$w(Math.ceil),round:w$w(Math.round),exp:w$w(Math.exp),exp2:w$w(ee$o),log:w$w(Math.log),log2:w$w(te$l),fract:w$w(Q$x),length:re$q,normalize:ae$i},O$s={atan2:B$w(Math.atan2,!1),pow:B$w(Math.pow,!1),min:B$w(Math.min,!0),max:B$w(Math.max,!0),distance:ne$q,dot:ie$m,cross:ue$j},F$E={clamp:Y$q(e$2a.clamp,!0),mix:Y$q(e$2a.lerp,!0)};function Q$x(e){return e-Math.floor(e)}function ee$o(e){return Math.pow(2,e)}function te$l(e){return e$2a.log2(e)}function w$w(e){return function(t,i){if("number"==typeof i)return e(i);if(i instanceof o$1o)return o$1o.fromElements(e(i.x),e(i.y),m$y.getCartesian2());if(i instanceof o$1p)return o$1p.fromElements(e(i.x),e(i.y),e(i.z),m$y.getCartesian3());if(i instanceof e$29)return e$29.fromElements(e(i.x),e(i.y),e(i.z),e(i.w),m$y.getCartesian4());throw new t$14('Function "'+t+'" requires a vector or number argument. Argument is '+i+".")}}function B$w(e,t){return function(i,n,r){if(t&&"number"==typeof r){if("number"==typeof n)return e(n,r);if(n instanceof o$1o)return o$1o.fromElements(e(n.x,r),e(n.y,r),m$y.getCartesian2());if(n instanceof o$1p)return o$1p.fromElements(e(n.x,r),e(n.y,r),e(n.z,r),m$y.getCartesian3());if(n instanceof e$29)return e$29.fromElements(e(n.x,r),e(n.y,r),e(n.z,r),e(n.w,r),m$y.getCartesian4())}if("number"==typeof n&&"number"==typeof r)return e(n,r);if(n instanceof o$1o&&r instanceof o$1o)return o$1o.fromElements(e(n.x,r.x),e(n.y,r.y),m$y.getCartesian2());if(n instanceof o$1p&&r instanceof o$1p)return o$1p.fromElements(e(n.x,r.x),e(n.y,r.y),e(n.z,r.z),m$y.getCartesian3());if(n instanceof e$29&&r instanceof e$29)return e$29.fromElements(e(n.x,r.x),e(n.y,r.y),e(n.z,r.z),e(n.w,r.w),m$y.getCartesian4());throw new t$14('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+n+" and "+r+".")}}function Y$q(e,t){return function(i,n,r,o){if(t&&"number"==typeof o){if("number"==typeof n&&"number"==typeof r)return e(n,r,o);if(n instanceof o$1o&&r instanceof o$1o)return o$1o.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),m$y.getCartesian2());if(n instanceof o$1p&&r instanceof o$1p)return o$1p.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),e(n.z,r.z,o),m$y.getCartesian3());if(n instanceof e$29&&r instanceof e$29)return e$29.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),e(n.z,r.z,o),e(n.w,r.w,o),m$y.getCartesian4())}if("number"==typeof n&&"number"==typeof r&&"number"==typeof o)return e(n,r,o);if(n instanceof o$1o&&r instanceof o$1o&&o instanceof o$1o)return o$1o.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),m$y.getCartesian2());if(n instanceof o$1p&&r instanceof o$1p&&o instanceof o$1p)return o$1p.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),e(n.z,r.z,o.z),m$y.getCartesian3());if(n instanceof e$29&&r instanceof e$29&&o instanceof e$29)return e$29.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),e(n.z,r.z,o.z),e(n.w,r.w,o.w),m$y.getCartesian4());throw new t$14('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+n+", "+r+", and "+o+".")}}function re$q(e,t){if("number"==typeof t)return Math.abs(t);if(t instanceof o$1o)return o$1o.magnitude(t);if(t instanceof o$1p)return o$1p.magnitude(t);if(t instanceof e$29)return e$29.magnitude(t);throw new t$14('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function ae$i(e,t){if("number"==typeof t)return 1;if(t instanceof o$1o)return o$1o.normalize(t,m$y.getCartesian2());if(t instanceof o$1p)return o$1p.normalize(t,m$y.getCartesian3());if(t instanceof e$29)return e$29.normalize(t,m$y.getCartesian4());throw new t$14('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function ne$q(e,t,i){if("number"==typeof t&&"number"==typeof i)return Math.abs(t-i);if(t instanceof o$1o&&i instanceof o$1o)return o$1o.distance(t,i);if(t instanceof o$1p&&i instanceof o$1p)return o$1p.distance(t,i);if(t instanceof e$29&&i instanceof e$29)return e$29.distance(t,i);throw new t$14('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function ie$m(e,t,i){if("number"==typeof t&&"number"==typeof i)return t*i;if(t instanceof o$1o&&i instanceof o$1o)return o$1o.dot(t,i);if(t instanceof o$1p&&i instanceof o$1p)return o$1p.dot(t,i);if(t instanceof e$29&&i instanceof e$29)return e$29.dot(t,i);throw new t$14('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function ue$j(e,t,i){if(t instanceof o$1p&&i instanceof o$1p)return o$1p.cross(t,i,m$y.getCartesian3());throw new t$14('Function "'+e+'" requires vec3 arguments. Arguments are '+t+" and "+i+".")}function u$C(e,t,i,n,r){this._type=e,this._value=t,this._left=i,this._right=n,this._test=r,this.evaluate=void 0,we$d(this)}function se$h(e,t){if(!e$2b(t))return e;for(var i in t)if(t.hasOwnProperty(i)){var n=new RegExp("\\$\\{"+i+"\\}","g"),r="("+t[i]+")";e$2b(r)&&(e=e.replace(n,r))}return e}function le$l(e){return e.replace(J$u,W$C)}function d$J(e){return e.replace(Z$w,"\\")}function fe$e(e){for(var t=e,i="",n=t.indexOf("${");n>=0;){var r,o=t.indexOf("'"),a=t.indexOf('"');if(o>=0&&o<n)r=t.indexOf("'",o+1),i+=t.substr(0,r+1),n=(t=t.substr(r+1)).indexOf("${");else if(a>=0&&a<n)r=t.indexOf('"',a+1),i+=t.substr(0,r+1),n=(t=t.substr(r+1)).indexOf("${");else{i+=t.substr(0,n);var s=t.indexOf("}");if(s<0)throw new t$14("Unmatched {.");i+="czm_"+t.substr(n+2,s-(n+2)),n=(t=t.substr(s+1)).indexOf("${")}}return i+=t}function oe$i(e){var t=typeof e.value;return null===e.value?new u$C(s$u.LITERAL_NULL,null):"boolean"===t?new u$C(s$u.LITERAL_BOOLEAN,e.value):"number"===t?new u$C(s$u.LITERAL_NUMBER,e.value):"string"===t?e.value.indexOf("${")>=0?new u$C(s$u.VARIABLE_IN_STRING,e.value):new u$C(s$u.LITERAL_STRING,d$J(e.value)):void 0}function ve$e(e,t){var i,n,r,o,a=t.arguments,s=a.length;if("MemberExpression"===t.callee.type){i=t.callee.property.name;var l=t.callee.object;if("test"===i||"exec"===i){if("regExp"!==l.callee.name)throw new t$14(i+" is not a function.");return 0===s?"test"===i?new u$C(s$u.LITERAL_BOOLEAN,!1):new u$C(s$u.LITERAL_NULL,null):(r=_$u(e,l),o=_$u(e,a[0]),new u$C(s$u.FUNCTION_CALL,i,r,o))}if("toString"===i)return n=_$u(e,l),new u$C(s$u.FUNCTION_CALL,i,n);throw new t$14('Unexpected function call "'+i+'".')}if("color"===(i=t.callee.name)){if(0===s)return new u$C(s$u.LITERAL_COLOR,i);if(n=_$u(e,a[0]),e$2b(a[1])){var u=_$u(e,a[1]);return new u$C(s$u.LITERAL_COLOR,i,[n,u])}return new u$C(s$u.LITERAL_COLOR,i,[n])}if("rgb"===i||"hsl"===i){if(s<3)throw new t$14(i+" requires three arguments.");return n=[_$u(e,a[0]),_$u(e,a[1]),_$u(e,a[2])],new u$C(s$u.LITERAL_COLOR,i,n)}if("rgba"===i||"hsla"===i){if(s<4)throw new t$14(i+" requires four arguments.");return n=[_$u(e,a[0]),_$u(e,a[1]),_$u(e,a[2]),_$u(e,a[3])],new u$C(s$u.LITERAL_COLOR,i,n)}if("vec2"===i||"vec3"===i||"vec4"===i){n=new Array(s);for(var c=0;c<s;++c)n[c]=_$u(e,a[c]);return new u$C(s$u.LITERAL_VECTOR,i,n)}if("isNaN"===i||"isFinite"===i)return 0===s?new u$C(s$u.LITERAL_BOOLEAN,"isNaN"===i):(n=_$u(e,a[0]),new u$C(s$u.UNARY,i,n));if("isExactClass"===i||"isClass"===i){if(s<1||s>1)throw new t$14(i+" requires exactly one argument.");return n=_$u(e,a[0]),new u$C(s$u.UNARY,i,n)}if("getExactClassName"===i){if(s>0)throw new t$14(i+" does not take any argument.");return new u$C(s$u.UNARY,i)}if(e$2b(C$B[i])){if(1!==s)throw new t$14(i+" requires exactly one argument.");return n=_$u(e,a[0]),new u$C(s$u.UNARY,i,n)}if(e$2b(O$s[i])){if(2!==s)throw new t$14(i+" requires exactly two arguments.");return r=_$u(e,a[0]),o=_$u(e,a[1]),new u$C(s$u.BINARY,i,r,o)}if(e$2b(F$E[i])){if(3!==s)throw new t$14(i+" requires exactly three arguments.");r=_$u(e,a[0]),o=_$u(e,a[1]);var h=_$u(e,a[2]);return new u$C(s$u.TERNARY,i,r,o,h)}if("Boolean"===i)return 0===s?new u$C(s$u.LITERAL_BOOLEAN,!1):(n=_$u(e,a[0]),new u$C(s$u.UNARY,i,n));if("Number"===i)return 0===s?new u$C(s$u.LITERAL_NUMBER,0):(n=_$u(e,a[0]),new u$C(s$u.UNARY,i,n));if("String"===i)return 0===s?new u$C(s$u.LITERAL_STRING,""):(n=_$u(e,a[0]),new u$C(s$u.UNARY,i,n));if("regExp"===i)return ce$i(e,t);throw new t$14('Unexpected function call "'+i+'".')}function ce$i(e,t){var i=t.arguments;if(0===i.length)return new u$C(s$u.LITERAL_REGEX,new RegExp);var n,r=_$u(e,i[0]);if(i.length>1){var o=_$u(e,i[1]);if(U$x(r)&&U$x(o)){try{n=new RegExp(d$J(String(r._value)),o._value)}catch(e){throw new t$14(e)}return new u$C(s$u.LITERAL_REGEX,n)}return new u$C(s$u.REGEX,r,o)}if(U$x(r)){try{n=new RegExp(d$J(String(r._value)))}catch(e){throw new t$14(e)}return new u$C(s$u.LITERAL_REGEX,n)}return new u$C(s$u.REGEX,r)}function me$g(e){if(ye$b(e.name)){var t=ge$e(e.name);return"tiles3d_"===t.substr(0,8)?new u$C(s$u.BUILTIN_VARIABLE,t):new u$C(s$u.VARIABLE,t)}if("NaN"===e.name)return new u$C(s$u.LITERAL_NUMBER,NaN);if("Infinity"===e.name)return new u$C(s$u.LITERAL_NUMBER,1/0);if("undefined"===e.name)return new u$C(s$u.LITERAL_UNDEFINED,void 0);throw new t$14(e.name+" is not defined.")}function he$e(e){var t=e.property.name;return"PI"===t?new u$C(s$u.LITERAL_NUMBER,Math.PI):"E"===t?new u$C(s$u.LITERAL_NUMBER,Math.E):void 0}function _e$f(e){if("POSITIVE_INFINITY"===e.property.name)return new u$C(s$u.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function pe$g(e,t){if("Math"===t.object.name)return he$e(t);if("Number"===t.object.name)return _e$f(t);var i,n=_$u(e,t.object);return t.computed?(i=_$u(e,t.property),new u$C(s$u.MEMBER,"brackets",n,i)):(i=new u$C(s$u.LITERAL_STRING,t.property.name),new u$C(s$u.MEMBER,"dot",n,i))}function U$x(e){return e._type>=s$u.LITERAL_NULL}function ye$b(e){return"czm_"===e.substr(0,4)}function ge$e(e){return e.substr(4)}function _$u(e,t){var i,n,r,o;if("Literal"===t.type)i=oe$i(t);else if("CallExpression"===t.type)i=ve$e(e,t);else if("Identifier"===t.type)i=me$g(t);else if("UnaryExpression"===t.type){n=t.operator;var a=_$u(e,t.argument);if(!(K$w.indexOf(n)>-1))throw new t$14('Unexpected operator "'+n+'".');i=new u$C(s$u.UNARY,n,a)}else if("BinaryExpression"===t.type){if(n=t.operator,r=_$u(e,t.left),o=_$u(e,t.right),!(G$A.indexOf(n)>-1))throw new t$14('Unexpected operator "'+n+'".');i=new u$C(s$u.BINARY,n,r,o)}else if("LogicalExpression"===t.type)n=t.operator,r=_$u(e,t.left),o=_$u(e,t.right),G$A.indexOf(n)>-1&&(i=new u$C(s$u.BINARY,n,r,o));else if("ConditionalExpression"===t.type){var s=_$u(e,t.test);r=_$u(e,t.consequent),o=_$u(e,t.alternate),i=new u$C(s$u.CONDITIONAL,"?",r,o,s)}else if("MemberExpression"===t.type)i=pe$g(e,t);else{if("ArrayExpression"!==t.type)throw"Compound"===t.type?new t$14("Provide exactly one expression."):new t$14("Cannot parse expression.");for(var l=[],u=0;u<t.elements.length;u++)l[u]=_$u(e,t.elements[u]);i=new u$C(s$u.ARRAY,l)}return i}function we$d(e){e._type===s$u.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===s$u.FUNCTION_CALL?"test"===e._value?e.evaluate=e._evaluateRegExpTest:"exec"===e._value?e.evaluate=e._evaluateRegExpExec:"toString"===e._value&&(e.evaluate=e._evaluateToString):e._type===s$u.UNARY?"!"===e._value?e.evaluate=e._evaluateNot:"-"===e._value?e.evaluate=e._evaluateNegative:"+"===e._value?e.evaluate=e._evaluatePositive:"isNaN"===e._value?e.evaluate=e._evaluateNaN:"isFinite"===e._value?e.evaluate=e._evaluateIsFinite:"isExactClass"===e._value?e.evaluate=e._evaluateIsExactClass:"isClass"===e._value?e.evaluate=e._evaluateIsClass:"getExactClassName"===e._value?e.evaluate=e._evaluateGetExactClassName:"Boolean"===e._value?e.evaluate=e._evaluateBooleanConversion:"Number"===e._value?e.evaluate=e._evaluateNumberConversion:"String"===e._value?e.evaluate=e._evaluateStringConversion:e$2b(C$B[e._value])&&(e.evaluate=Ae$e(e._value)):e._type===s$u.BINARY?"+"===e._value?e.evaluate=e._evaluatePlus:"-"===e._value?e.evaluate=e._evaluateMinus:"*"===e._value?e.evaluate=e._evaluateTimes:"/"===e._value?e.evaluate=e._evaluateDivide:"%"===e._value?e.evaluate=e._evaluateMod:"==="===e._value?e.evaluate=e._evaluateEqualsStrict:"!=="===e._value?e.evaluate=e._evaluateNotEqualsStrict:"<"===e._value?e.evaluate=e._evaluateLessThan:"<="===e._value?e.evaluate=e._evaluateLessThanOrEquals:">"===e._value?e.evaluate=e._evaluateGreaterThan:">="===e._value?e.evaluate=e._evaluateGreaterThanOrEquals:"&&"===e._value?e.evaluate=e._evaluateAnd:"||"===e._value?e.evaluate=e._evaluateOr:"=~"===e._value?e.evaluate=e._evaluateRegExpMatch:"!~"===e._value?e.evaluate=e._evaluateRegExpNotMatch:e$2b(O$s[e._value])&&(e.evaluate=Re$c(e._value)):e._type===s$u.TERNARY?e.evaluate=be$h(e._value):e._type===s$u.MEMBER?"brackets"===e._value?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===s$u.ARRAY?e.evaluate=e._evaluateArray:e._type===s$u.VARIABLE?e.evaluate=e._evaluateVariable:e._type===s$u.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===s$u.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===s$u.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===s$u.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===s$u.REGEX?e.evaluate=e._evaluateRegExp:e._type===s$u.BUILTIN_VARIABLE?"tiles3d_tileset_time"===e._value&&(e.evaluate=Ee$g):e.evaluate=e._evaluateLiteral}function Ee$g(e){return e$2b(e)?e.content.tileset.timeSinceLoad:0}function Ae$e(e){var t=C$B[e];return function(i){var n=this._left.evaluate(i);return t(e,n)}}function Re$c(e){var t=O$s[e];return function(i){var n=this._left.evaluate(i),r=this._right.evaluate(i);return t(e,n,r)}}function be$h(e){var t=F$E[e];return function(i){var n=this._left.evaluate(i),r=this._right.evaluate(i),o=this._test.evaluate(i);return t(e,n,r,o)}}function M$B(e,t){if(e$2b(e))return e.getProperty(t)}function D$y(e){return"feature"===e._value}function k$u(e){for(var t=e._left,i=t.length,n=0;n<i;++n)if(t[n]._type!==s$u.LITERAL_NUMBER)return;var r=t[0]._value,o=t[1]._value,a=t[2]._value,s=4===i?t[3]._value:1;return e$1U.fromHsl(r,o,a,s,T$x)}function P$x(e){for(var t=e._left,i=t.length,n=0;n<i;++n)if(t[n]._type!==s$u.LITERAL_NUMBER)return;var r=T$x;return r.red=t[0]._value/255,r.green=t[1]._value/255,r.blue=t[2]._value/255,r.alpha=4===i?t[3]._value:1,r}function A$D(e){return e%1==0?e.toFixed(1):e.toString()}function Le$h(e){return"vec3("+A$D(e.red)+", "+A$D(e.green)+", "+A$D(e.blue)+")"}function S$u(e){return"vec4("+A$D(e.red)+", "+A$D(e.green)+", "+A$D(e.blue)+", "+A$D(e.alpha)+")"}function X$s(e,t,i,n){for(var r=e.length,o=new Array(r),a=0;a<r;++a)o[a]=e[a].getShaderExpression(t,i,n);return o}u$C.prototype._evaluateLiteral=function(){return this._value},u$C.prototype._evaluateLiteralColor=function(e){var t=T$x,i=this._left;if("color"===this._value)e$2b(i)?i.length>1?(e$1U.fromCssColorString(i[0].evaluate(e),t),t.alpha=i[1].evaluate(e)):e$1U.fromCssColorString(i[0].evaluate(e),t):e$1U.fromBytes(255,255,255,255,t);else if("rgb"===this._value)e$1U.fromBytes(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),255,t);else if("rgba"===this._value){var n=255*i[3].evaluate(e);e$1U.fromBytes(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),n,t)}else"hsl"===this._value?e$1U.fromHsl(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),1,t):"hsla"===this._value&&e$1U.fromHsl(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),i[3].evaluate(e),t);return e$29.fromColor(t,m$y.getCartesian4())},u$C.prototype._evaluateLiteralVector=function(e){for(var t=m$y.getArray(),i=this._value,n=this._left,r=n.length,o=0;o<r;++o){var a=n[o].evaluate(e);if("number"==typeof a)t.push(a);else if(a instanceof o$1o)t.push(a.x,a.y);else if(a instanceof o$1p)t.push(a.x,a.y,a.z);else{if(!(a instanceof e$29))throw new t$14(i+" argument must be a vector or number. Argument is "+a+".");t.push(a.x,a.y,a.z,a.w)}}var s=t.length,l=parseInt(i.charAt(3));if(0===s)throw new t$14("Invalid "+i+" constructor. No valid arguments.");if(s<l&&s>1)throw new t$14("Invalid "+i+" constructor. Not enough arguments.");if(s>l&&r>1)throw new t$14("Invalid "+i+" constructor. Too many arguments.");if(1===s){var u=t[0];t.push(u,u,u)}return"vec2"===i?o$1o.fromArray(t,0,m$y.getCartesian2()):"vec3"===i?o$1p.fromArray(t,0,m$y.getCartesian3()):"vec4"===i?e$29.fromArray(t,0,m$y.getCartesian4()):void 0},u$C.prototype._evaluateLiteralString=function(){return this._value},u$C.prototype._evaluateVariableString=function(e){for(var t=this._value,i=V$p.exec(t);null!==i;){var n=i[0],r=M$B(e,i[1]);e$2b(r)||(r=""),t=t.replace(n,r),i=V$p.exec(t)}return t},u$C.prototype._evaluateVariable=function(e){return M$B(e,this._value)},u$C.prototype._evaluateMemberDot=function(e){if(D$y(this._left))return M$B(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(e$2b(t)){var i=this._right.evaluate(e);if(t instanceof o$1o||t instanceof o$1p||t instanceof e$29){if("r"===i)return t.x;if("g"===i)return t.y;if("b"===i)return t.z;if("a"===i)return t.w}return t[i]}},u$C.prototype._evaluateMemberBrackets=function(e){if(D$y(this._left))return M$B(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(e$2b(t)){var i=this._right.evaluate(e);if(t instanceof o$1o||t instanceof o$1p||t instanceof e$29){if(0===i||"r"===i)return t.x;if(1===i||"g"===i)return t.y;if(2===i||"b"===i)return t.z;if(3===i||"a"===i)return t.w}return t[i]}},u$C.prototype._evaluateArray=function(e){for(var t=[],i=0;i<this._value.length;i++)t[i]=this._value[i].evaluate(e);return t},u$C.prototype._evaluateNot=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$14('Operator "!" requires a boolean argument. Argument is '+t+".");return!t},u$C.prototype._evaluateNegative=function(e){var t=this._left.evaluate(e);if(t instanceof o$1o)return o$1o.negate(t,m$y.getCartesian2());if(t instanceof o$1p)return o$1p.negate(t,m$y.getCartesian3());if(t instanceof e$29)return e$29.negate(t,m$y.getCartesian4());if("number"==typeof t)return-t;throw new t$14('Operator "-" requires a vector or number argument. Argument is '+t+".")},u$C.prototype._evaluatePositive=function(e){var t=this._left.evaluate(e);if(!(t instanceof o$1o||t instanceof o$1p||t instanceof e$29||"number"==typeof t))throw new t$14('Operator "+" requires a vector or number argument. Argument is '+t+".");return t},u$C.prototype._evaluateLessThan=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$14('Operator "<" requires number arguments. Arguments are '+t+" and "+i+".");return t<i},u$C.prototype._evaluateLessThanOrEquals=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$14('Operator "<=" requires number arguments. Arguments are '+t+" and "+i+".");return t<=i},u$C.prototype._evaluateGreaterThan=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$14('Operator ">" requires number arguments. Arguments are '+t+" and "+i+".");return t>i},u$C.prototype._evaluateGreaterThanOrEquals=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$14('Operator ">=" requires number arguments. Arguments are '+t+" and "+i+".");return t>=i},u$C.prototype._evaluateOr=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$14('Operator "||" requires boolean arguments. First argument is '+t+".");if(t)return!0;var i=this._right.evaluate(e);if("boolean"!=typeof i)throw new t$14('Operator "||" requires boolean arguments. Second argument is '+i+".");return t||i},u$C.prototype._evaluateAnd=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$14('Operator "&&" requires boolean arguments. First argument is '+t+".");if(!t)return!1;var i=this._right.evaluate(e);if("boolean"!=typeof i)throw new t$14('Operator "&&" requires boolean arguments. Second argument is '+i+".");return t&&i},u$C.prototype._evaluatePlus=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.add(t,i,m$y.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.add(t,i,m$y.getCartesian3());if(i instanceof e$29&&t instanceof e$29)return e$29.add(t,i,m$y.getCartesian4());if("string"==typeof t||"string"==typeof i)return t+i;if("number"==typeof t&&"number"==typeof i)return t+i;throw new t$14('Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateMinus=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.subtract(t,i,m$y.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.subtract(t,i,m$y.getCartesian3());if(i instanceof e$29&&t instanceof e$29)return e$29.subtract(t,i,m$y.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t-i;throw new t$14('Operator "-" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateTimes=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.multiplyComponents(t,i,m$y.getCartesian2());if(i instanceof o$1o&&"number"==typeof t)return o$1o.multiplyByScalar(i,t,m$y.getCartesian2());if(t instanceof o$1o&&"number"==typeof i)return o$1o.multiplyByScalar(t,i,m$y.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.multiplyComponents(t,i,m$y.getCartesian3());if(i instanceof o$1p&&"number"==typeof t)return o$1p.multiplyByScalar(i,t,m$y.getCartesian3());if(t instanceof o$1p&&"number"==typeof i)return o$1p.multiplyByScalar(t,i,m$y.getCartesian3());if(i instanceof e$29&&t instanceof e$29)return e$29.multiplyComponents(t,i,m$y.getCartesian4());if(i instanceof e$29&&"number"==typeof t)return e$29.multiplyByScalar(i,t,m$y.getCartesian4());if(t instanceof e$29&&"number"==typeof i)return e$29.multiplyByScalar(t,i,m$y.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t*i;throw new t$14('Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateDivide=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.divideComponents(t,i,m$y.getCartesian2());if(t instanceof o$1o&&"number"==typeof i)return o$1o.divideByScalar(t,i,m$y.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.divideComponents(t,i,m$y.getCartesian3());if(t instanceof o$1p&&"number"==typeof i)return o$1p.divideByScalar(t,i,m$y.getCartesian3());if(i instanceof e$29&&t instanceof e$29)return e$29.divideComponents(t,i,m$y.getCartesian4());if(t instanceof e$29&&"number"==typeof i)return e$29.divideByScalar(t,i,m$y.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t/i;throw new t$14('Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateMod=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.fromElements(t.x%i.x,t.y%i.y,m$y.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.fromElements(t.x%i.x,t.y%i.y,t.z%i.z,m$y.getCartesian3());if(i instanceof e$29&&t instanceof e$29)return e$29.fromElements(t.x%i.x,t.y%i.y,t.z%i.z,t.w%i.w,m$y.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t%i;throw new t$14('Operator "%" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateEqualsStrict=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);return i instanceof o$1o&&t instanceof o$1o||i instanceof o$1p&&t instanceof o$1p||i instanceof e$29&&t instanceof e$29?t.equals(i):("bigint"==typeof t&&(t=Number(t)),t===i)},u$C.prototype._evaluateNotEqualsStrict=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);return i instanceof o$1o&&t instanceof o$1o||i instanceof o$1p&&t instanceof o$1p||i instanceof e$29&&t instanceof e$29?!t.equals(i):t!==i},u$C.prototype._evaluateConditional=function(e){var t=this._test.evaluate(e);if("boolean"!=typeof t)throw new t$14("Conditional argument of conditional expression must be a boolean. Argument is "+t+".");return t?this._left.evaluate(e):this._right.evaluate(e)},u$C.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))},u$C.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))},u$C.prototype._evaluateIsExactClass=function(e){return!!e$2b(e)&&e.isExactClass(this._left.evaluate(e))},u$C.prototype._evaluateIsClass=function(e){return!!e$2b(e)&&e.isClass(this._left.evaluate(e))},u$C.prototype._evaluateGetExactClassName=function(e){if(e$2b(e))return e.getExactClassName()},u$C.prototype._evaluateBooleanConversion=function(e){return Boolean(this._left.evaluate(e))},u$C.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))},u$C.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))},u$C.prototype._evaluateRegExp=function(e){var t,i=this._value.evaluate(e),n="";e$2b(this._left)&&(n=this._left.evaluate(e));try{t=new RegExp(i,n)}catch(e){throw new t$14(e)}return t},u$C.prototype._evaluateRegExpTest=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof i))throw new t$14("RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+i+".");return t.test(i)},u$C.prototype._evaluateRegExpMatch=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof i)return t.test(i);if(i instanceof RegExp&&"string"==typeof t)return i.test(t);throw new t$14('Operator "=~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateRegExpNotMatch=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof i)return!t.test(i);if(i instanceof RegExp&&"string"==typeof t)return!i.test(t);throw new t$14('Operator "!~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+i+".")},u$C.prototype._evaluateRegExpExec=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof i))throw new t$14("RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+i+".");var n=t.exec(i);return e$2b(n)?n[1]:null},u$C.prototype._evaluateToString=function(e){var t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof o$1o||t instanceof o$1p||t instanceof e$29)return String(t);throw new t$14('Unexpected function call "'+this._value+'".')};var $$z="czm_infinity";function y$y(e){e=u$_(e,u$_.EMPTY_OBJECT),this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=u$_(e.center,o$1p.ZERO),this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilPreloadPass=void 0,this._rsStencilPreloadPass3DTiles=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=e$1U.clone(e$1U.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=u$_(e.classificationType,_0x3b5200.BOTH),this._vertexShaderSource=e._vertexShaderSource,this._fragmentShaderSource=e._fragmentShaderSource,this._attributeLocations=e._attributeLocations,this._uniformMap=e._uniformMap,this._pickId=e._pickId,this._modelMatrix=e._modelMatrix,this._boundingSphere=e._boundingSphere,this._batchIdLookUp={};for(var t=this._batchIds.length,i=0;i<t;++i){var n=this._batchIds[i];this._batchIdLookUp[n]=i}}u$C.prototype.getShaderExpression=function(e,t,i){var n,r,o,a,s=this._type,l=this._value;switch(e$2b(this._left)&&(r=Array.isArray(this._left)?X$s(this._left,e,t,this):this._left.getShaderExpression(e,t,this)),e$2b(this._right)&&(o=this._right.getShaderExpression(e,t,this)),e$2b(this._test)&&(a=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(l=X$s(this._value,e,t,this)),s){case s$u.VARIABLE:return e+l;case s$u.UNARY:if("Boolean"===l)return"bool("+r+")";if("Number"===l)return"float("+r+")";if("round"===l)return"floor("+r+" + 0.5)";if(e$2b(C$B[l]))return l+"("+r+")";if("isNaN"===l)return"("+r+" != "+r+")";if("isFinite"===l)return"(abs("+r+") < czm_infinity)";if("String"===l||"isExactClass"===l||"isClass"===l||"getExactClassName"===l)throw new t$14('Error generating style shader: "'+l+'" is not supported.');return e$2b(C$B[l])?l+"("+r+")":l+r;case s$u.BINARY:return"%"===l?"mod("+r+", "+o+")":"==="===l?"("+r+" == "+o+")":"!=="===l?"("+r+" != "+o+")":"atan2"===l?"atan("+r+", "+o+")":e$2b(O$s[l])?l+"("+r+", "+o+")":"("+r+" "+l+" "+o+")";case s$u.TERNARY:if(e$2b(F$E[l]))return l+"("+r+", "+o+", "+a+")";break;case s$u.CONDITIONAL:return"("+a+" ? "+r+" : "+o+")";case s$u.MEMBER:return"r"===o||"x"===o||"0.0"===o?r+"[0]":"g"===o||"y"===o||"1.0"===o?r+"[1]":"b"===o||"z"===o||"2.0"===o?r+"[2]":"a"===o||"w"===o||"3.0"===o?r+"[3]":r+"[int("+o+")]";case s$u.FUNCTION_CALL:throw new t$14('Error generating style shader: "'+l+'" is not supported.');case s$u.ARRAY:if(4===l.length)return"vec4("+l[0]+", "+l[1]+", "+l[2]+", "+l[3]+")";if(3===l.length)return"vec3("+l[0]+", "+l[1]+", "+l[2]+")";if(2===l.length)return"vec2("+l[0]+", "+l[1]+")";throw new t$14("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case s$u.REGEX:throw new t$14("Error generating style shader: Regular expressions are not supported.");case s$u.VARIABLE_IN_STRING:throw new t$14("Error generating style shader: Converting a variable to a string is not supported.");case s$u.LITERAL_NULL:return $$z;case s$u.LITERAL_BOOLEAN:return l?"true":"false";case s$u.LITERAL_NUMBER:return A$D(l);case s$u.LITERAL_STRING:if(e$2b(i)&&i._type===s$u.MEMBER&&("r"===l||"g"===l||"b"===l||"a"===l||"x"===l||"y"===l||"z"===l||"w"===l))return l;if(e$2b(n=e$1U.fromCssColorString(l,T$x)))return Le$h(n);throw new t$14("Error generating style shader: String literals are not supported.");case s$u.LITERAL_COLOR:var u=r;if("color"===l){if(!e$2b(u))return"vec4(1.0)";if(u.length>1){var c=u[0],h=u[1];return"1.0"!==h&&(t.translucent=!0),"vec4("+c+", "+h+")"}return"vec4("+u[0]+", 1.0)"}if("rgb"===l)return e$2b(n=P$x(this))?S$u(n):"vec4("+u[0]+" / 255.0, "+u[1]+" / 255.0, "+u[2]+" / 255.0, 1.0)";if("rgba"===l)return"1.0"!==u[3]&&(t.translucent=!0),e$2b(n=P$x(this))?S$u(n):"vec4("+u[0]+" / 255.0, "+u[1]+" / 255.0, "+u[2]+" / 255.0, "+u[3]+")";if("hsl"===l)return e$2b(n=k$u(this))?S$u(n):"vec4(czm_HSLToRGB(vec3("+u[0]+", "+u[1]+", "+u[2]+")), 1.0)";if("hsla"===l)return e$2b(n=k$u(this))?(1!==n.alpha&&(t.translucent=!0),S$u(n)):("1.0"!==u[3]&&(t.translucent=!0),"vec4(czm_HSLToRGB(vec3("+u[0]+", "+u[1]+", "+u[2]+")), "+u[3]+")");break;case s$u.LITERAL_VECTOR:if(!e$2b(r))throw new t$16("left should always be defined for type ExpressionNodeType.LITERAL_VECTOR");for(var d=r.length,f=l+"(",p=0;p<d;++p)f+=r[p],p<d-1&&(f+=", ");return f+=")";case s$u.LITERAL_REGEX:throw new t$14("Error generating style shader: Regular expressions are not supported.");case s$u.LITERAL_UNDEFINED:return $$z;case s$u.BUILTIN_VARIABLE:if("tiles3d_tileset_time"===l)return"u_time"}},Object.defineProperties(y$y.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var te$k={position:0,a_batchId:1};function se$g(e,t){if(!e$2b(e._va)){var i=t$Y.createVertexBuffer({context:t,typedArray:e._positions,usage:A$19.STATIC_DRAW}),n=t$Y.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:A$19.STATIC_DRAW}),r=t$Y.createIndexBuffer({context:t,typedArray:e._indices,usage:A$19.DYNAMIC_DRAW,indexDatatype:2===e._indices.BYTES_PER_ELEMENT?ce$x.UNSIGNED_SHORT:ce$x.UNSIGNED_INT}),o=[{index:0,vertexBuffer:i,componentDatatype:S$12.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:n,componentDatatype:S$12.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}];e._va=new c$12({context:t,attributes:o,indexBuffer:r}),t.webgl2&&(e._vaSwap=new c$12({context:t,attributes:o,indexBuffer:t$Y.createIndexBuffer({context:t,sizeInBytes:r.sizeInBytes,usage:A$19.DYNAMIC_DRAW,indexDatatype:r.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._verticesPromise=void 0}}function ne$p(e,t){if(!e$2b(e._sp)){var i=e._batchTable,n=u$_(e._attributeLocations,te$k),r=e._pickId,o=e._vertexShaderSource,a=e._fragmentShaderSource;if(e$2b(o))return e._sp=r$13.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:n}),e._spStencil=e._sp,a=(a=s$U.replaceMain(a,"czm_non_pick_main"))+"void main() \n{ \n czm_non_pick_main(); \n gl_FragColor = "+r+"; \n} \n",void(e._spPick=r$13.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:n}));var s=i.getVertexShaderCallback(!1,"a_batchId",void 0)(G$B),l=i.getFragmentShaderCallback()(Q$Q,!1,void 0);r=i.getPickId();var u=new s$U({sources:[s]}),c=new s$U({defines:["VECTOR_TILE"],sources:[l]});e._sp=r$13.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:n}),u=new s$U({sources:[G$B]}),c=new s$U({defines:["VECTOR_TILE"],sources:[Q$Q]}),e._spStencil=r$13.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:n}),l=(l=s$U.replaceMain(l,"czm_non_pick_main"))+"\nvoid main() \n{ \n czm_non_pick_main(); \n gl_FragColor = "+r+"; \n} \n";var h=new s$U({sources:[s]}),d=new s$U({defines:["VECTOR_TILE"],sources:[l]});e._spPick=r$13.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:n})}}function m$x(e){var t=e?m$X.EQUAL:m$X.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.DECREMENT_WRAP,zPass:n$Y.DECREMENT_WRAP},backFunction:t,backOperation:{fail:n$Y.KEEP,zFail:n$Y.INCREMENT_WRAP,zPass:n$Y.INCREMENT_WRAP},reference:u$N.CESIUM_3D_TILE_MASK,mask:u$N.CESIUM_3D_TILE_MASK},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1}}function J$t(e){var t=e?m$X.EQUAL:m$X.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.INCREMENT_WRAP},backFunction:t,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:u$N.CESIUM_3D_TILE_MASK,mask:u$N.CESIUM_3D_TILE_MASK},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:re$E.LESS_OR_EQUAL},depthMask:!1}}var oe$h={stencilTest:{enabled:!0,frontFunction:m$X.NOT_EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},backFunction:m$X.NOT_EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:0,mask:u$N.CLASSIFICATION_MASK},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Ee$r.ALPHA_BLEND},fe$d={stencilTest:{enabled:!0,frontFunction:m$X.NOT_EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},backFunction:m$X.NOT_EQUAL,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.DECREMENT_WRAP},reference:0,mask:u$N.CLASSIFICATION_MASK},stencilMask:u$N.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function ce$h(e){e$2b(e._rsStencilPreloadPass)||(e._rsStencilPreloadPass=d$1m.fromCache(m$x(!1)),e._rsStencilPreloadPass3DTiles=d$1m.fromCache(m$x(!0)),e._rsStencilDepthPass=d$1m.fromCache(J$t(!1)),e._rsStencilDepthPass3DTiles=d$1m.fromCache(J$t(!0)),e._rsColorPass=d$1m.fromCache(oe$h),e._rsPickPass=d$1m.fromCache(fe$d))}var w$v=new p$1d,Z$v=new o$1p;function _e$e(e,t){if(!e$2b(e._uniformMap)){var i={u_modifiedModelViewProjection:function(){var i=t.uniformState.view,n=t.uniformState.projection;return p$1d.clone(i,w$v),p$1d.multiplyByPoint(w$v,e._center,Z$v),p$1d.setTranslation(w$v,Z$v,w$v),p$1d.multiply(n,w$v,w$v),w$v},u_highlightColor:function(){return e._highlightColor}};e._uniformMap=e._batchTable.getUniformMapCallback()(i)}}function U$w(e,t,i,n,r,o,a){for(var s=e.constructor.BYTES_PER_ELEMENT,l=o.length,u=0;u<l;++u){var c=a[o[u]],h=n[c],d=r[c],f=new e.constructor(e.buffer,s*h,d);t.set(f,i),n[c]=i,i+=d}return i}function ue$i(e,t){var i=e._indices,n=e._indexOffsets,r=e._indexCounts,o=e._batchIdLookUp,a=new i.constructor(i.length),s=t.pop(),l=[s],u=U$w(i,a,0,n,r,s.batchIds,o);for(s.offset=0,s.count=u;t.length>0;){var c=t.pop();if(e$1U.equals(c.color,s.color))u=U$w(i,a,u,n,r,c.batchIds,o),s.batchIds=s.batchIds.concat(c.batchIds),s.count=u-s.offset;else{var h=u;u=U$w(i,a,u,n,r,c.batchIds,o),c.offset=h,c.count=u-h,l.push(c),s=c}}e._va.indexBuffer.copyFromArrayView(a),e._indices=a,e._batchedIndices=l}function B$v(e,t,i,n,r,o,a){for(var s=e.bytesPerIndex,l=o.length,u=0;u<l;++u){var c=a[o[u]],h=n[c],d=r[c];t.copyFromBuffer(e,h*s,i*s,d*s),n[c]=i,i+=d}return i}function he$d(e,t){var i=e._indexOffsets,n=e._indexCounts,r=e._batchIdLookUp,o=t.pop(),a=[o],s=e._va.indexBuffer,l=e._vaSwap.indexBuffer,u=B$v(s,l,0,i,n,o.batchIds,r);for(o.offset=0,o.count=u;t.length>0;){var c=t.pop();if(e$1U.equals(c.color,o.color))u=B$v(s,l,u,i,n,c.batchIds,r),o.batchIds=o.batchIds.concat(c.batchIds),o.count=u-o.offset;else{var h=u;u=B$v(s,l,u,i,n,c.batchIds,r),c.offset=h,c.count=u-h,a.push(c),o=c}}var d=e._va;e._va=e._vaSwap,e._vaSwap=d,e._batchedIndices=a}function de$f(e,t){return t.color.toRgba()-e.color.toRgba()}function le$k(e,t){if(!e._batchDirty)return!1;for(var i=e._batchedIndices,n=i.length,r=!1,o={},a=0;a<n;++a){var s=i[a].color.toRgba();if(e$2b(o[s])){r=!0;break}o[s]=!0}return r?r&&!e.forceRebatch&&e._framesSinceLastRebatch<120?void++e._framesSinceLastRebatch:(i.sort(de$f),t.webgl2?he$d(e,i):ue$i(e,i),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0):(e._batchDirty=!1,!1)}function ie$l(e,t){var i=le$k(e,t),n=e._commands,r=e._batchedIndices,o=r.length,a=3*o;if(!e$2b(n)||i||n.length!==a){n.length=a;for(var s=e._va,l=e._sp,u=u$_(e._modelMatrix,p$1d.IDENTITY),c=e._uniformMap,h=e._boundingVolume,d=0;d<o;++d){var f=r[d].offset,p=r[d].count,_=n[3*d];e$2b(_)||(_=n[3*d]=new i$_({owner:e})),_.vertexArray=s,_.modelMatrix=u,_.offset=f,_.count=p,_.renderState=e._rsStencilPreloadPass,_.shaderProgram=l,_.uniformMap=c,_.boundingVolume=h,_.cull=!1,_.pass=Le$s.TERRAIN_CLASSIFICATION;var m=i$_.shallowClone(_,_.derivedCommands.tileset);m.renderState=e._rsStencilPreloadPass3DTiles,m.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,_.derivedCommands.tileset=m;var g=n[3*d+1];e$2b(g)||(g=n[3*d+1]=new i$_({owner:e})),g.vertexArray=s,g.modelMatrix=u,g.offset=f,g.count=p,g.renderState=e._rsStencilDepthPass,g.shaderProgram=l,g.uniformMap=c,g.boundingVolume=h,g.cull=!1,g.pass=Le$s.TERRAIN_CLASSIFICATION;var x=i$_.shallowClone(g,g.derivedCommands.tileset);x.renderState=e._rsStencilDepthPass3DTiles,x.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,g.derivedCommands.tileset=x;var v=n[3*d+2];e$2b(v)||(v=n[3*d+2]=new i$_({owner:e})),v.vertexArray=s,v.modelMatrix=u,v.offset=f,v.count=p,v.renderState=e._rsColorPass,v.shaderProgram=l,v.uniformMap=c,v.boundingVolume=h,v.cull=!1,v.pass=Le$s.TERRAIN_CLASSIFICATION;var y=i$_.shallowClone(v,v.derivedCommands.tileset);y.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,v.derivedCommands.tileset=y}e._commandsDirty=!0}}function Ie$b(e,t){if(e.classificationType!==_0x3b5200.TERRAIN&&t.invertClassification&&(!e$2b(e._commandsIgnoreShow)||e._commandsDirty)){for(var i=e._commands,n=e._commandsIgnoreShow,r=e._spStencil,o=i.length,a=n.length=o/3*2,s=0,l=0;l<a;l+=2){var u=n[l]=i$_.shallowClone(i[s],n[l]);u.shaderProgram=r,u.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,(u=n[l+1]=i$_.shallowClone(i[s+1],n[l+1])).shaderProgram=r,u.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,s+=3}e._commandsDirty=!1}}function Se$9(e){if(e._pickCommandsDirty){var t=e._indexOffsets.length,i=e._pickCommands;i.length=3*t;for(var n=e._va,r=e._spStencil,o=e._spPick,a=u$_(e._modelMatrix,p$1d.IDENTITY),s=e._uniformMap,l=0;l<t;++l){var u=e._indexOffsets[l],c=e._indexCounts[l],h=e$2b(e._boundingVolumes)?e._boundingVolumes[l]:e.boundingVolume,d=i[3*l];e$2b(d)||(d=i[3*l]=new i$_({owner:e,pickOnly:!0})),d.vertexArray=n,d.modelMatrix=a,d.offset=u,d.count=c,d.renderState=e._rsStencilPreloadPass,d.shaderProgram=r,d.uniformMap=s,d.boundingVolume=h,d.pass=Le$s.TERRAIN_CLASSIFICATION;var f=i$_.shallowClone(d,d.derivedCommands.tileset);f.renderState=e._rsStencilPreloadPass3DTiles,f.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=f;var p=i[3*l+1];e$2b(p)||(p=i[3*l+1]=new i$_({owner:e,pickOnly:!0})),p.vertexArray=n,p.modelMatrix=a,p.offset=u,p.count=c,p.renderState=e._rsStencilDepthPass,p.shaderProgram=r,p.uniformMap=s,p.boundingVolume=h,p.pass=Le$s.TERRAIN_CLASSIFICATION;var _=i$_.shallowClone(p,p.derivedCommands.tileset);_.renderState=e._rsStencilDepthPass3DTiles,_.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=_;var m=i[3*l+2];e$2b(m)||(m=i[3*l+2]=new i$_({owner:e,pickOnly:!0})),m.vertexArray=n,m.modelMatrix=a,m.offset=u,m.count=c,m.renderState=e._rsPickPass,m.shaderProgram=o,m.uniformMap=s,m.boundingVolume=h,m.pass=Le$s.TERRAIN_CLASSIFICATION;var g=i$_.shallowClone(m,m.derivedCommands.tileset);g.pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,m.derivedCommands.tileset=g}e._pickCommandsDirty=!1}}function be$g(e,t){e._updatingAllCommands=!0;var i,n=e._batchIds,r=n.length;for(i=0;i<r;++i){var o=t[n[i]];o.show=!0,o.color=e$1U.WHITE}var a=e._batchedIndices;for(r=a.length,i=0;i<r;++i)a[i].color=e$1U.clone(e$1U.WHITE);e._updatingAllCommands=!1,e._batchDirty=!0}y$y.prototype.createFeatures=function(e,t){for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=i[r];t[o]=new e$L(e,o)}},y$y.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var ge$d=new e$1U,Ee$f=e$1U.WHITE,Te$c=!0,Ae$d=/\$/;function $$y(e,t,i,n){var r,o,a=e.classificationType,s=a!==_0x3b5200.CESIUM_3D_TILE,l=a!==_0x3b5200.TERRAIN,u=t.commandList,c=i.length;for(o=0;o<c;++o)s&&((r=i[o]).pass=Le$s.TERRAIN_CLASSIFICATION,u.push(r)),l&&((r=i[o].derivedCommands.tileset).pass=Le$s.CESIUM_3D_TILE_CLASSIFICATION,u.push(r));if(t.invertClassification&&e$2b(n))for(c=n.length,o=0;o<c;++o)u.push(n[o])}function ve$d(e,t){for(var i=e.commandList,n=t.length,r=0;r<n;r+=3){var o=t[r+2];o.pass=Le$s.OPAQUE,i.push(o)}}function Le$g(e){var t=e.debugWireframe===e._debugWireframe;if(!(t=t&&!(e.debugWireframe&&e._wireframeDirty))){var i,n;e$2b(e._rsWireframe)||(e._rsWireframe=d$1m.fromCache({})),e.debugWireframe?(i=e._rsWireframe,n=W$18.LINES):(i=e._rsColorPass,n=W$18.TRIANGLES);for(var r=e._commands,o=r.length,a=0;a<o;a+=3){var s=r[a+2];s.renderState=i,s.primitiveType=n}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}}y$y.prototype.applyStyle=function(e,t){if(e$2b(e)){var i=e.color,n=i instanceof L$E&&!Ae$d.test(i.expression);this._updatingAllCommands=n;var r,o=this._batchIds,a=o.length;for(r=0;r<a;++r){var s=t[o[r]];s.color=e$2b(e.color)?e.color.evaluateColor(s,ge$d):Ee$f,s.show=e$2b(e.show)?e.show.evaluate(s):Te$c}if(n){var l=this._batchedIndices;for(a=l.length,r=0;r<a;++r)l[r].color=e$1U.clone(e$1U.WHITE);this._updatingAllCommands=!1,this._batchDirty=!0}}else be$g(this,t)},y$y.prototype.updateCommands=function(e,t){if(!this._updatingAllCommands){var i=this._batchIdLookUp,n=i[e];if(e$2b(n)){var r,o=this._indexOffsets,a=this._indexCounts,s=o[n],l=a[n],u=this._batchedIndices,c=u.length;for(r=0;r<c;++r){var h=u[r].offset,d=u[r].count;if(s>=h&&s<h+d)break}u.push(new c$w({color:e$1U.clone(t),offset:s,count:l,batchIds:[e]}));for(var f=[],p=[],_=u[r].batchIds,m=_.length,g=0;g<m;++g){var x=_[g];if(x!==e)o[i[x]]<s?f.push(x):p.push(x)}0!==p.length&&u.push(new c$w({color:e$1U.clone(u[r].color),offset:s+l,count:u[r].offset+u[r].count-(s+l),batchIds:p})),0!==f.length?(u[r].count=s-u[r].offset,u[r].batchIds=f):u.splice(r,1),this._batchDirty=!0}}},y$y.prototype.update=function(e){var t=e.context;se$g(this,t),ne$p(this,t),ce$h(this),_e$e(this,t);var i=e.passes;i.render&&(ie$l(this,t),Ie$b(this,e),Le$g(this),this._debugWireframe?ve$d(e,this._commands):$$y(this,e,this._commands,this._commandsIgnoreShow)),i.pick&&(Se$9(this),$$y(this,e,this._pickCommands))},y$y.prototype.isDestroyed=function(){return!1},y$y.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaSwap=this._vaSwap&&this._vaSwap.destroy(),i$10(this)};var Ee$e=new o$1p,y$x=s$v.ModelState;function A$C(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).gltf;if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),!(t instanceof Uint8Array))throw new t$14("Only binary glTF is supported as a classifier.");re$r(t=O$u(t)),E$D(t),ue$k(t),he$f(t),e$K.buffer(t,(function(e){if(!e$2b(e.extras._pipeline.source))throw new t$14("Buffer data must be embedded in the binary gltf.")}));var i=t.nodes,n=t.meshes,r=i[0].mesh;if(1!==i.length||!e$2b(r))throw new t$14("Only one node is supported for classification and it must have a mesh.");if(1!==n.length)throw new t$14("Only one mesh is supported when using b3dm for classification.");var o=n[0].primitives;if(1!==o.length)throw new t$14("Only one primitive per mesh is supported when using b3dm for classification.");if(!e$2b(o[0].attributes.POSITION))throw new t$14("The mesh must have a position attribute.");if(!e$2b(o[0].attributes._BATCHID))throw new t$14("The mesh must have a batch id attribute.");this._gltf=t,this.show=u$_(e.show,!0),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(this.modelMatrix),this._ready=!1,this._readyPromise=o$1l.defer(),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=u$_(e.debugWireframe,!1),this._debugWireframe=!1,this._classificationType=e.classificationType,this._vertexShaderLoaded=e.vertexShaderLoaded,this._classificationShaderLoaded=e.classificationShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=u$_(e.ignoreCommands,!1),this._upAxis=u$_(e.upAxis,v$y.Y),this._batchTable=e.batchTable,this._computedModelMatrix=new p$1d,this._initialRadius=void 0,this._boundingSphere=void 0,this._scaledBoundingSphere=new i$1c,this._state=y$x.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._dirty=!1,this._nodeMatrix=new p$1d,this._primitive=void 0,this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms=void 0,this._buffers={},this._vertexArray=void 0,this._shaderProgram=void 0,this._uniformMap=void 0,this._geometryByteLength=0,this._trianglesLength=0,this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0}function Ce$a(e){var t=e.gltf,i=e._loadResources;e$K.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function Be$d(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;e$K.bufferView(e.gltf,(function(e,t){e.target===de$x.ARRAY_BUFFER&&i.enqueue(t)}));var n=e._loadResources.indexBuffersToCreate,r={};e$K.accessor(e.gltf,(function(e){var i=e.bufferView;t[i].target===de$x.ELEMENT_ARRAY_BUFFER&&!e$2b(r[i])&&(r[i]=!0,n.enqueue({id:i,componentType:e.componentType}))}))}function Le$f(e,t){var i=t._loadResources,n=t.gltf.bufferViews[e],r=i.getBuffer(n);t._buffers[e]=r,t._geometryByteLength+=r.byteLength}function Oe$c(e,t,i){var n=i._loadResources,r=i.gltf.bufferViews[e],o={typedArray:n.getBuffer(r),indexDatatype:t};i._buffers[e]=o,i._geometryByteLength+=o.typedArray.byteLength}function Ae$c(e){var t=e._loadResources;if(0===t.pendingBufferLoads){for(var i=t.vertexBuffersToCreate,n=t.indexBuffersToCreate;i.length>0;)Le$f(i.dequeue(),e);for(;n.length>0;){var r=n.dequeue();Oe$c(r.id,r.componentType,e)}}}function Me$f(e,t){var i=t.gltf.meshes[0].primitives[0],n=s$v.modifyShaderForQuantizedAttributes(t.gltf,i,e);return t._quantizedUniforms=n.uniforms,n.shader}function ne$o(e,t){return e$2b(t)&&(e=t(e)),e}function we$c(e){var t=e.gltf,i=s$v.getAttributeOrUniformBySemantic(t,"POSITION"),n=s$v.getAttributeOrUniformBySemantic(t,"_BATCHID"),r={};r[i]=0,r[n]=1;var o,a,s=s$v.getAttributeOrUniformBySemantic(t,"MODELVIEWPROJECTION");if(e$2b(s))o="uniform mat4 "+s+";\n",a=s+" * vec4("+i+", 1.0)";else{var l=s$v.getAttributeOrUniformBySemantic(t,"PROJECTION"),u=s$v.getAttributeOrUniformBySemantic(t,"MODELVIEW");e$2b(u)||(u=s$v.getAttributeOrUniformBySemantic(t,"CESIUM_RTC_MODELVIEW")),o="uniform mat4 "+u+";\nuniform mat4 "+l+";\n",a=l+" * "+u+" * vec4("+i+", 1.0)"}var c="attribute vec3 "+i+";\nattribute float "+n+";\n"+o+"void main() {\n"+(" vec4 positionInClipCoords = "+a+";\n")+" gl_Position = czm_depthClampFarPlane(positionInClipCoords);\n}\n";e.extensionsUsed.WEB3D_quantized_attributes&&(c=Me$f(c,e));var h=ne$o(c,e._vertexShaderLoaded),d=ne$o("#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvoid main() \n{ \n gl_FragColor = vec4(1.0); \n czm_writeDepthClampedToFarPlane();\n}\n",e._classificationShaderLoaded);h=s$v.modifyVertexShaderForLogDepth(h,a),d=s$v.modifyFragmentShaderForLogDepth(d),e._shaderProgram={vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:r}}function De$e(){return{POSITION:0,_BATCHID:1}}function Re$b(e){if(e._loadResources.finishedBuffersCreation()&&!e$2b(e._vertexArray)){var t,i=e._buffers,n=e.gltf,r=n.accessors,o=n.meshes[0].primitives[0],a=De$e(),s={};if(e$K.meshPrimitiveAttribute(o,(function(e,t){var o=a[t];if(e$2b(o)){var l=r[e];s[t]={index:o,vertexBuffer:i[l.bufferView],componentsPerAttribute:r$B(l.type),componentDatatype:l.componentType,offsetInBytes:l.byteOffset,strideInBytes:p$A(n,l)}}})),e$2b(o.indices)){var l=r[o.indices];t=i[l.bufferView]}e._vertexArray={attributes:s,indexBuffer:t}}}Object.defineProperties(A$C.prototype,{gltf:{get:function(){return this._gltf}},boundingSphere:{get:function(){if(this._state!==y$x.LOADED)throw new t$16("The model is not loaded. Use ClassificationModel.readyPromise or wait for ClassificationModel.ready to be true.");var e=this.modelMatrix,t=p$1d.getScale(e,Ee$e),i=this._scaledBoundingSphere;return i.center=o$1p.multiplyComponents(this._boundingSphere.center,t,i.center),i.radius=o$1p.maximumComponent(t)*this._initialRadius,e$2b(this._rtcCenter)&&o$1p.add(this._rtcCenter,i.center,i.center),i}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},dirty:{get:function(){return this._dirty}},extensionsUsed:{get:function(){return e$2b(this._extensionsUsed)||(this._extensionsUsed=s$v.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return e$2b(this._extensionsRequired)||(this._extensionsRequired=s$v.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return 0}},classificationType:{get:function(){return this._classificationType}}});var se$f={PROJECTION:function(e,t){return s$v.getGltfSemanticUniforms().PROJECTION(e,t)},MODELVIEW:function(e,t){return s$v.getGltfSemanticUniforms().MODELVIEW(e,t)},CESIUM_RTC_MODELVIEW:function(e,t){return s$v.getGltfSemanticUniforms().CESIUM_RTC_MODELVIEW(e,t)},MODELVIEWPROJECTION:function(e,t){return s$v.getGltfSemanticUniforms().MODELVIEWPROJECTION(e,t)}};function Pe$9(e,t){if(!e$2b(e._uniformMap)){var i={};e$K.technique(e.gltf,(function(n){e$K.techniqueUniform(n,(function(n,r){!e$2b(n.semantic)||!e$2b(se$f[n.semantic])||(i[r]=se$f[n.semantic](t.uniformState,e))}))})),e._uniformMap=i}}function Ue$b(e,t){return s$v.createUniformsForQuantizedAttributes(e.gltf,t,e._quantizedUniforms)}function Ve$b(e,t){switch(e.mode){case W$18.TRIANGLES:return t/3;case W$18.TRIANGLE_STRIP:case W$18.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function Ne$a(e){var t,i,n=e._batchTable,r=e._uniformMap,o=e._vertexArray,a=e.gltf,s=a.accessors,l=a.meshes[0].primitives[0],u=s[l.indices],c=l.attributes.POSITION,h=s$v.getAccessorMinMax(a,c),d=i$1c.fromCornerPoints(o$1p.fromArray(h.min),o$1p.fromArray(h.max));e$2b(u)?(i=u.count,t=u.byteOffset/ce$x.getSizeInBytes(u.componentType)):(i=s[l.attributes.POSITION].count,t=0);(e._trianglesLength+=Ve$b(l,i),e$2b(e._uniformMapLoaded)&&(r=e._uniformMapLoaded(r)),e.extensionsUsed.WEB3D_quantized_attributes)&&(r=p$19(r,Ue$b(e,l)));var f=o.attributes.POSITION,p=f.componentDatatype,_=f.vertexBuffer,m=_.byteOffset,g=_.byteLength/S$12.getSizeInBytes(p),x=S$12.createArrayBufferView(p,_.buffer,m,g);p=(f=o.attributes._BATCHID).componentDatatype,m=(_=f.vertexBuffer).byteOffset,g=_.byteLength/S$12.getSizeInBytes(p);var v,y=S$12.createArrayBufferView(p,_.buffer,m,g),$=o.indexBuffer.typedArray;v=o.indexBuffer.indexDatatype===ce$x.UNSIGNED_SHORT?new Uint16Array($.buffer,$.byteOffset,$.byteLength/Uint16Array.BYTES_PER_ELEMENT):new Uint32Array($.buffer,$.byteOffset,$.byteLength/Uint32Array.BYTES_PER_ELEMENT),x=l$R(x);var b=[],T=[],C=[],S=[],w=(y=l$R(y))[(v=l$R(v,t,t+i))[0]];b.push(w),C.push(0);for(var E,P,A,L=v.length,M=1;M<L;++M)(E=y[v[M]])!==w&&(A=M-(P=C[C.length-1]),b.push(E),T.push(A),C.push(M),S.push(new c$w({offset:P,count:A,batchIds:[w],color:e$1U.WHITE})),w=E);A=L-(P=C[C.length-1]),T.push(A),S.push(new c$w({offset:P,count:A,batchIds:[w],color:e$1U.WHITE}));var R=e._shaderProgram,O=R.vertexShaderSource,I=R.fragmentShaderSource,D=R.attributeLocations,B=e$2b(e._pickIdLoaded)?e._pickIdLoaded():void 0;e._primitive=new y$y({classificationType:e._classificationType,positions:x,indices:v,indexOffsets:C,indexCounts:T,batchIds:b,vertexBatchIds:y,batchedIndices:S,batchTable:n,boundingVolume:new i$1c,_vertexShaderSource:O,_fragmentShaderSource:I,_attributeLocations:D,_uniformMap:r,_pickId:B,_modelMatrix:new p$1d,_boundingSphere:d}),e._buffers=void 0,e._vertexArray=void 0,e._shaderProgram=void 0,e._uniformMap=void 0}function We$a(e){if(e._loadResources.finished()&&!e$2b(e._primitive)){var t=e.gltf.nodes[0];e._nodeMatrix=s$v.getTransform(t,e._nodeMatrix),Ne$a(e)}}function ae$h(e,t){var i=t.context;s$v.checkSupportedGlExtensions(e.gltf.glExtensionsUsed,i),Ae$c(e),we$c(e),Re$b(e),Pe$9(e,i),We$a(e)}var Fe$c=new e$29,Z$u=new p$1d;function qe$5(e,t,i,n){var r=e._computedModelMatrix;if(e._mode!==C$13.SCENE3D&&!e._ignoreCommands){var o=p$1d.getColumn(r,3,Fe$c);if(e$29.equals(o,e$29.UNIT_W)){var a=e.boundingSphere.center,s=m$17.wgs84To2DModelMatrix(n,a,Z$u);r=p$1d.multiply(s,r,Z$u),e$2b(e._rtcCenter)&&(p$1d.setTranslation(r,e$29.UNIT_W,r),e._rtcCenter=e._rtcCenter2D)}else r=m$17.basisTo2D(n,r,Z$u),e._rtcCenter=e._rtcCenter3D}var l=e._primitive;(t||i)&&(p$1d.multiplyTransformation(r,e._nodeMatrix,l._modelMatrix),i$1c.transform(l._boundingSphere,l._modelMatrix,l._boundingVolume),e$2b(e._rtcCenter)&&o$1p.add(e._rtcCenter,l._boundingVolume.center,l._boundingVolume.center))}A$C.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},A$C.prototype.update=function(e){if(e.mode!==C$13.MORPHING){var t=s$Y.supportsWebPSync();if(e$2b(t)){if(this._state===y$x.NEEDS_LOAD&&e$2b(this.gltf)&&(this._state=y$x.LOADING,this._state!==y$x.FAILED)){var i=this.gltf.extensions;if(e$2b(i)&&e$2b(i.CESIUM_RTC)){var n=o$1p.fromArray(i.CESIUM_RTC.center);if(!o$1p.equals(n,o$1p.ZERO)){this._rtcCenter3D=n;var r=e.mapProjection,o=r.ellipsoid.cartesianToCartographic(this._rtcCenter3D),a=r.project(o);o$1p.fromElements(a.z,a.x,a.y,a),this._rtcCenter2D=a,this._rtcCenterEye=new o$1p,this._rtcCenter=this._rtcCenter3D}}this._loadResources=new t$u,s$v.parseBuffers(this)}var s=this._loadResources,l=!1;this._state===y$x.LOADING&&(0===s.pendingBufferLoads&&(s$v.checkSupportedExtensions(this.extensionsRequired,t),Ce$a(this),Be$d(this),this._boundingSphere=s$v.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,ae$h(this,e)),s.finished()&&(this._state=y$x.LOADED,l=!0)),e$2b(s)&&this._state===y$x.LOADED&&(l||ae$h(this,e),s.finished()&&(this._loadResources=void 0));var u=this.show;if(u&&this._state===y$x.LOADED||l){this._dirty=!1;var c=this.modelMatrix,h=e.mode!==this._mode;this._mode=e.mode;var d=!p$1d.equals(this._modelMatrix,c)||h;if(d||l){p$1d.clone(c,this._modelMatrix);var f=this._computedModelMatrix;p$1d.clone(c,f),this._upAxis===v$y.Y?p$1d.multiplyTransformation(f,v$y.Y_UP_TO_Z_UP,f):this._upAxis===v$y.X&&p$1d.multiplyTransformation(f,v$y.X_UP_TO_Z_UP,f)}(d||l)&&(qe$5(this,d,l,e.mapProjection),this._dirty=!0)}if(l){var p=this;return void e.afterRender.push((function(){p._ready=!0,p._readyPromise.resolve(p)}))}u&&!this._ignoreCommands&&(this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.debugWireframe=this.debugWireframe,this._primitive.update(e))}}},A$C.prototype.isDestroyed=function(){return!1},A$C.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$10(this)};var e$J={HIGHLIGHT:0,REPLACE:1,MIX:2,getColorBlend:function(e,t){return e===e$J.HIGHLIGHT?0:e===e$J.REPLACE?1:e===e$J.MIX?e$2a.clamp(t,e$2a.EPSILON4,1):void 0}},I$J=Object.freeze(e$J);function r$A(){}function b$I(e,t){var i="runtime."+Object.keys(e.createdBufferViews).length,n=e.buffers,r=Object.keys(n).length;return n[r]=t,e.createdBufferViews[i]={buffer:r,byteOffset:0,byteLength:t.byteLength},i}function R$s(e,t,i){var n=t._loadResources,r=b$I(n,e);return n.vertexBuffersToCreate.enqueue(r),r}function P$w(e,t,i){var n=e.typedArray,r=t._loadResources,o=b$I(r,n);return r.indexBuffersToCreate.enqueue({id:o,componentType:S$12.fromTypedArray(n)}),{bufferViewId:o,numberOfIndices:e.numberOfIndices}}function T$w(e,t,i,n){if(r$A._taskProcessorReady){var r=i.primitivesToDecode.peek();if(e$2b(r)){var o=e.scheduleTask(r,[r.array.buffer]);if(e$2b(o))return i.activeDecodingTasks++,i.primitivesToDecode.dequeue(),o.then((function(e){i.activeDecodingTasks--;var n=P$w(e.indexArray,t),o={},a=e.attributeData;for(var s in a)if(a.hasOwnProperty(s)){var l=a[s],u=R$s(l.array,t),c=l.data;c.bufferView=u,o[s]=c}t._decodedData[r.mesh+".primitive."+r.primitive]={bufferView:n.bufferViewId,numberOfIndices:n.numberOfIndices,attributes:o}}))}}}function p$x(e,t,i){return o$1q.typeOf.string("samplerUniformName",e),o$1q.typeOf.string("matrixUniformName",t),o$1q.typeOf.string("styleUniformName",i)," float clipDistance = clip(gl_FragCoord, "+e+", "+t+"); \n vec4 clippingPlanesEdgeColor = vec4(1.0); \n clippingPlanesEdgeColor.rgb = "+i+".rgb; \n float clippingPlanesEdgeWidth = "+i+".a; \n if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) \n { \n gl_FragColor = clippingPlanesEdgeColor;\n } \n"}r$A._maxDecodingConcurrency=Math.max(s$Y.hardwareConcurrency-1,1),r$A._decoderTaskProcessor=void 0,r$A._taskProcessorReady=!1,r$A._getDecoderTaskProcessor=function(){if(!e$2b(r$A._decoderTaskProcessor)){var e=new i$V("decodeDraco",r$A._maxDecodingConcurrency);e.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper.js",wasmBinaryFile:"ThirdParty/draco_decoder.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(){r$A._taskProcessorReady=!0})),r$A._decoderTaskProcessor=e}return r$A._decoderTaskProcessor},r$A.hasExtension=function(e){return e$2b(e.extensionsRequired.KHR_draco_mesh_compression)||e$2b(e.extensionsUsed.KHR_draco_mesh_compression)},r$A._decodedModelResourceCache=void 0,r$A.parse=function(e,t){if(r$A.hasExtension(e)){var i=e._loadResources,n=e.cacheKey;if(e$2b(n)){e$2b(r$A._decodedModelResourceCache)||(e$2b(t.cache.modelDecodingCache)||(t.cache.modelDecodingCache={}),r$A._decodedModelResourceCache=t.cache.modelDecodingCache);var r=r$A._decodedModelResourceCache[n];if(e$2b(r))return r.count++,void(i.pendingDecodingCache=!0)}var o=e._dequantizeInShader,a=e.gltf;e$K.mesh(a,(function(e,t){e$K.meshPrimitive(e,(function(e,n){if(e$2b(e.extensions)){var r=e.extensions.KHR_draco_mesh_compression;if(e$2b(r)){var s=a.bufferViews[r.bufferView],l=l$R(a.buffers[s.buffer].extras._pipeline.source,s.byteOffset,s.byteOffset+s.byteLength);i.primitivesToDecode.enqueue({mesh:t,primitive:n,array:l,bufferView:s,compressedAttributes:r.attributes,dequantizeInShader:o})}}}))}))}},r$A.decodeModel=function(e,t){if(!r$A.hasExtension(e))return o$1l.resolve();var i=e._loadResources,n=e.cacheKey;if(e$2b(n)&&e$2b(r$A._decodedModelResourceCache)){var r=r$A._decodedModelResourceCache[n];if(e$2b(r)&&i.pendingDecodingCache)return o$1l(r.ready,(function(){e._decodedData=r.data,i.pendingDecodingCache=!1}));r$A._decodedModelResourceCache[n]={ready:!1,count:1,data:void 0}}if(0===i.primitivesToDecode.length)return o$1l.resolve();for(var o=r$A._getDecoderTaskProcessor(),a=[],s=T$w(o,e,i);e$2b(s);)a.push(s),s=T$w(o,e,i);return o$1l.all(a)},r$A.decodePointCloud=function(e){var t=r$A._getDecoderTaskProcessor();if(r$A._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])},r$A.cacheDataForModel=function(e){var t=e.cacheKey;if(e$2b(t)&&e$2b(r$A._decodedModelResourceCache)){var i=r$A._decodedModelResourceCache[t];e$2b(i)&&(i.ready=!0,i.data=e._decodedData)}},r$A.destroyCachedDataForModel=function(e){var t=e.cacheKey;if(e$2b(t)&&e$2b(r$A._decodedModelResourceCache)){var i=r$A._decodedModelResourceCache[t];e$2b(i)&&0==--i.count&&delete r$A._decodedModelResourceCache[t]}};var m$w=new o$1o;function f$G(e,t){o$1q.typeOf.object("clippingPlaneCollection",e),o$1q.typeOf.object("context",t);var i=e.unionClippingRegions,n=e.length,r=h$K.useFloatTexture(t),o=h$K.getTextureResolution(e,t,m$w),a=o.x,s=o.y,l=r?x$E(a,s):d$I(a,s);return l+="\n",l+=i?s$t(n):v$w(n)}function s$t(e){for(var t="#define inline\nfloat clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount;\n float amount;\n float pixelWidth = czm_metersPerPixel(position);\n bool breakAndDiscard = false;\n vec4 clippingPlane = vec4(0.0);\n",i=0;i<e;++i)t+=" clippingPlane = getClippingPlane(clippingPlanes, "+i+", clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = czm_branchFreeTernary("+i+" == 0, amount, min(amount, clipAmount));\n if (amount <= 0.0)\n {\n breakAndDiscard = true;\n //break;\n }\n";return t+=" if (breakAndDiscard) {\n discard;\n }\n return clipAmount;\n}\n"}function v$w(e){for(var t="#define inline\nfloat clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n bool clipped = true;\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount = 0.0;\n float amount;\n float pixelWidth = czm_metersPerPixel(position);\n vec4 clippingPlane = vec4(0.0);\n",i=0;i<e;++i)t+=" clippingPlane = getClippingPlane(clippingPlanes, "+i+", clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = max(amount, clipAmount);\n clipped = clipped && (amount <= 0.0);\n";return t+=" if (clipped)\n {\n discard;\n }\n return clipAmount;\n}\n"}function x$E(e,t){var i=1/t,n=1/e+"";-1===n.indexOf(".")&&(n+=".0");var r=i+"";return-1===r.indexOf(".")&&(r+=".0"),"#define inline\nvec4 getClippingPlane(sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int pixY = clippingPlaneNumber / "+e+";\n int pixX = clippingPlaneNumber - (pixY * "+e+");\n float u = (float(pixX) + 0.5) * "+n+";\n float v = (float(pixY) + 0.5) * "+r+";\n vec4 plane = texture2D(packedClippingPlanes, vec2(u, v));\n return czm_transformPlane(plane, transform);\n}\n"}function d$I(e,t){var i=1/t,n=1/e+"";-1===n.indexOf(".")&&(n+=".0");var r=i+"";return-1===r.indexOf(".")&&(r+=".0"),"#define inline\nvec4 getClippingPlane(sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int clippingPlaneStartIndex = clippingPlaneNumber * 2;\n int pixY = clippingPlaneStartIndex / "+e+";\n int pixX = clippingPlaneStartIndex - (pixY * "+e+");\n float u = (float(pixX) + 0.5) * "+n+";\n float v = (float(pixY) + 0.5) * "+r+";\n vec4 oct32 = texture2D(packedClippingPlanes, vec2(u, v)) * 255.0;\n vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);\n vec4 plane;\n plane.xyz = czm_octDecode(oct, 65535.0);\n plane.w = czm_unpackFloat(texture2D(packedClippingPlanes, vec2(u + "+n+", v)));\n return czm_transformPlane(plane, transform);\n}\n"}function S$t(){}var W$B=/^data\:/i;function d$H(e,t){var i=e.gltf,n=i.buffers,r=i.bufferViews[t.bufferView],o=n[r.buffer],a=r.byteOffset+t.byteOffset,s=t.count*r$B(t.type),l=W$B.test(o.uri)?"":o.uri;return e.cacheKey+"//"+l+"/"+a+"/"+s}var k$t={};S$t.getAnimationParameterValues=function(e,t){var i=d$H(e,t),n=k$t[i];if(!e$2b(n)){var r=e.gltf,o=r.buffers,a=r.bufferViews[t.bufferView],s=o[a.buffer].extras._pipeline.source,l=t.componentType,u=t.type,c=r$B(u),h=t.count,d=p$A(r,t);n=new Array(h);for(var f=u$_(t.byteOffset,0),p=a.byteOffset+f,_=0;_<h;_++){var m=S$12.createArrayBufferView(l,s.buffer,s.byteOffset+p,c);"SCALAR"===u?n[_]=m[0]:"VEC3"===u?n[_]=o$1p.fromArray(m):"VEC4"===u&&(n[_]=n$13.unpack(m)),p+=d}e$2b(e.cacheKey)&&(k$t[i]=n)}return n};var L$D={};function D$x(e,t,i){return e.cacheKey+"//"+t+"/"+i}function V$o(e){this._value=e}V$o.prototype.evaluate=function(e,t){return this._value},V$o.prototype.wrapTime=function(e){return 0},V$o.prototype.clampTime=function(e){return 0},S$t.getAnimationSpline=function(e,t,i,n,r,o,a,s){var l=D$x(e,t,n),u=L$D[l];if(!e$2b(u)){var c=o,h=s;1===c.length&&1===h.length?u=new V$o(h[0]):"LINEAR"===r.interpolation&&("translation"===a||"scale"===a?u=new r$P({times:c,points:h}):"rotation"===a?u=new r$O({times:c,points:h}):"weights"===a&&(u=new r$D({times:c,weights:h}))),e$2b(e.cacheKey)&&(L$D[l]=u)}return u};var c$v={};S$t.getSkinInverseBindMatrices=function(e,t){var i=d$H(e,t),n=c$v[i];if(!e$2b(n)){var r=e.gltf,o=r.buffers,a=r.bufferViews[t.bufferView],s=o[a.buffer].extras._pipeline.source,l=t.componentType,u=t.type,c=t.count,h=p$A(r,t),d=a.byteOffset+t.byteOffset,f=r$B(u);if(n=new Array(c),l===de$x.FLOAT&&u===Q$y.MAT4)for(var p=0;p<c;++p){var _=S$12.createArrayBufferView(l,s.buffer,s.byteOffset+d,f);n[p]=p$1d.fromArray(_),d+=h}c$v[i]=n}return n};var e$I={NONE:0,REPEAT:1,MIRRORED_REPEAT:2},_0x157d80=Object.freeze(e$I),E$B=Object.freeze({STOPPED:0,ANIMATING:1});function a$x(e,t,i){this._name=i.name,this._startTime=a$15.clone(e.startTime),this._delay=u$_(e.delay,0),this._stopTime=e.stopTime,this.removeOnStop=u$_(e.removeOnStop,!1),this._multiplier=u$_(e.multiplier,1),this._reverse=u$_(e.reverse,!1),this._loop=u$_(e.loop,_0x157d80.NONE),this.start=new o$1h,this.update=new o$1h,this.stop=new o$1h,this._state=E$B.STOPPED,this._runtimeAnimation=i,this._computedStartTime=void 0,this._duration=void 0;var n=this;this._raiseStartEvent=function(){n.start.raiseEvent(t,n)},this._updateEventTime=0,this._raiseUpdateEvent=function(){n.update.raiseEvent(t,n,n._updateEventTime)},this._raiseStopEvent=function(){n.stop.raiseEvent(t,n)}}function f$F(e){this.animationAdded=new o$1h,this.animationRemoved=new o$1h,this._model=e,this._scheduledAnimations=[],this._previousTime=void 0}function R$r(e,t,i){var n=e._model,r=new a$x(i,n,n._runtime.animations[t]);return e._scheduledAnimations.push(r),e.animationAdded.raiseEvent(n,r),r}function N$q(e,t){for(var i=e.channelEvaluators,n=i.length,r=0;r<n;++r)i[r](t)}Object.defineProperties(a$x.prototype,{name:{get:function(){return this._name}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}}}),Object.defineProperties(f$F.prototype,{length:{get:function(){return this._scheduledAnimations.length}}}),f$F.prototype.add=function(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=this._model._runtime.animations;if(!e$2b(t))throw new t$16("Animations are not loaded. Wait for Model.readyPromise to resolve.");if(!e$2b(e.name)&&!e$2b(e.index))throw new t$16("Either options.name or options.index must be defined.");if(e$2b(e.multiplier)&&e.multiplier<=0)throw new t$16("options.multiplier must be greater than zero.");if(e$2b(e.index)&&(e.index>=t.length||e.index<0))throw new t$16("options.index must be a valid animation index.");if(e$2b(e.index))return R$r(this,e.index,e);for(var i,n=t.length,r=0;r<n;++r)if(t[r].name===e.name){i=r;break}if(!e$2b(i))throw new t$16("options.name must be a valid animation name.");return R$r(this,i,e)},f$F.prototype.addAll=function(e){if(e=u$_(e,u$_.EMPTY_OBJECT),!e$2b(this._model._runtime.animations))throw new t$16("Animations are not loaded. Wait for Model.readyPromise to resolve.");if(e$2b(e.multiplier)&&e.multiplier<=0)throw new t$16("options.multiplier must be greater than zero.");for(var t=[],i=this._model._runtime.animations.length,n=0;n<i;++n)t.push(R$r(this,n,e));return t},f$F.prototype.remove=function(e){if(e$2b(e)){var t=this._scheduledAnimations,i=t.indexOf(e);if(-1!==i)return t.splice(i,1),this.animationRemoved.raiseEvent(this._model,e),!0}return!1},f$F.prototype.removeAll=function(){var e=this._model,t=this._scheduledAnimations,i=t.length;this._scheduledAnimations=[];for(var n=0;n<i;++n)this.animationRemoved.raiseEvent(e,t[n])},f$F.prototype.contains=function(e){return!!e$2b(e)&&-1!==this._scheduledAnimations.indexOf(e)},f$F.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return this._scheduledAnimations[e]};var T$v=[];function q$A(e,t,i){return function(){e.animationRemoved.raiseEvent(t,i)}}function a$w(e,t,i){this._name=t.name,this._id=i,this._uniformMap=e._uniformMaps[i],this._technique=void 0,this._program=void 0,this._values=void 0}function a$v(e,t,i){for(var n=[],r=e.primitives,o=r.length,a=0;a<o;++a){var s=r[a];n[a]=t[s.material]}this._name=e.name,this._materials=n,this._id=i}function r$z(e,t,i,n,r){this._model=e,this._runtimeNode=i,this._name=t.name,this._id=n,this.useMatrix=!1,this._show=!0,this._matrix=p$1d.clone(r),this._originalMatrix=p$1d.clone(r)}f$F.prototype.update=function(e){var t=this._scheduledAnimations,i=t.length;if(0===i)return this._previousTime=void 0,!1;if(a$15.equals(e.time,this._previousTime))return!1;this._previousTime=a$15.clone(e.time,this._previousTime);for(var n=!1,r=e.time,o=this._model,a=0;a<i;++a){var s=t[a],l=s._runtimeAnimation;e$2b(s._computedStartTime)||(s._computedStartTime=a$15.addSeconds(u$_(s.startTime,r),s.delay,new a$15)),e$2b(s._duration)||(s._duration=l.stopTime*(1/s.multiplier));var u=s._computedStartTime,c=s._duration,h=s.stopTime,d=0!==c?a$15.secondsDifference(r,u)/c:0,f=d>=0,p=s.loop===_0x157d80.REPEAT||s.loop===_0x157d80.MIRRORED_REPEAT;if((f||p&&!e$2b(s.startTime))&&(d<=1||p)&&(!e$2b(h)||a$15.lessThanOrEquals(r,h))){if(s._state===E$B.STOPPED&&(s._state=E$B.ANIMATING,s.start.numberOfListeners>0&&e.afterRender.push(s._raiseStartEvent)),s.loop===_0x157d80.REPEAT)d-=Math.floor(d);else if(s.loop===_0x157d80.MIRRORED_REPEAT){var _=Math.floor(d),m=d-_;d=_%2==1?1-m:m}s.reverse&&(d=1-d);var g=d*c*s.multiplier;N$q(l,g=e$2a.clamp(g,l.startTime,l.stopTime)),s.update.numberOfListeners>0&&(s._updateEventTime=g,e.afterRender.push(s._raiseUpdateEvent)),n=!0}else f&&s._state===E$B.ANIMATING&&(s._state=E$B.STOPPED,s.stop.numberOfListeners>0&&e.afterRender.push(s._raiseStopEvent),s.removeOnStop&&T$v.push(s))}i=T$v.length;for(var x=0;x<i;++x){var v=T$v[x];t.splice(t.indexOf(v),1),e.afterRender.push(q$A(this,o,v))}return T$v.length=0,n},Object.defineProperties(a$w.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}}}),a$w.prototype.setValue=function(e,t){if(!e$2b(e))throw new t$16("name is required.");var i="u_"+e,n=this._uniformMap.values[i];if(!e$2b(n))throw new t$16("name must match a parameter name in the material's technique that is targetable and not optimized out.");n.value=n.clone(t,n.value)},a$w.prototype.getValue=function(e){if(!e$2b(e))throw new t$16("name is required.");var t="u_"+e,i=this._uniformMap.values[t];if(e$2b(i))return i.value},Object.defineProperties(a$v.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},materials:{get:function(){return this._materials}}}),Object.defineProperties(r$z.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._model._perNodeShowDirty=!0)}},matrix:{get:function(){return this._matrix},set:function(e){this._matrix=p$1d.clone(e,this._matrix),this.useMatrix=!0;var t=this._model;t._cesiumAnimationsDirty=!0,this._runtimeNode.dirtyNumber=t._maxDirtyNumber}},originalMatrix:{get:function(){return this._originalMatrix}}}),r$z.prototype.setMatrix=function(e){p$1d.clone(e,this._matrix)};var $$x="varying vec2 v_textureCoordinates;\nuniform float originalSize;\nuniform sampler2D texture0;\nuniform sampler2D texture1;\nuniform sampler2D texture2;\nuniform sampler2D texture3;\nuniform sampler2D texture4;\nuniform sampler2D texture5;\nconst float yMipLevel1 = 1.0 - (1.0 / pow(2.0, 1.0));\nconst float yMipLevel2 = 1.0 - (1.0 / pow(2.0, 2.0));\nconst float yMipLevel3 = 1.0 - (1.0 / pow(2.0, 3.0));\nconst float yMipLevel4 = 1.0 - (1.0 / pow(2.0, 4.0));\nvoid main()\n{\nvec2 uv = v_textureCoordinates;\nvec2 textureSize = vec2(originalSize * 1.5 + 2.0, originalSize);\nvec2 pixel = 1.0 / textureSize;\nfloat mipLevel = 0.0;\nif (uv.x - pixel.x > (textureSize.y / textureSize.x))\n{\nmipLevel = 1.0;\nif (uv.y - pixel.y > yMipLevel1)\n{\nmipLevel = 2.0;\nif (uv.y - pixel.y * 3.0 > yMipLevel2)\n{\nmipLevel = 3.0;\nif (uv.y - pixel.y * 5.0 > yMipLevel3)\n{\nmipLevel = 4.0;\nif (uv.y - pixel.y * 7.0 > yMipLevel4)\n{\nmipLevel = 5.0;\n}\n}\n}\n}\n}\nif (mipLevel > 0.0)\n{\nfloat scale = pow(2.0, mipLevel);\nuv.y -= (pixel.y * (mipLevel - 1.0) * 2.0);\nuv.x *= ((textureSize.x - 2.0) / textureSize.y);\nuv.x -= 1.0 + pixel.x;\nuv.y -= (1.0 - (1.0 / pow(2.0, mipLevel - 1.0)));\nuv *= scale;\n}\nelse\n{\nuv.x *= (textureSize.x / textureSize.y);\n}\nvec4 color0 = texture2D(texture0, uv);\nvec4 color1 = texture2D(texture1, uv);\nvec4 color2 = texture2D(texture2, uv);\nvec4 color3 = texture2D(texture3, uv);\nvec4 color4 = texture2D(texture4, uv);\nvec4 color5 = texture2D(texture5, uv);\nif(mipLevel == 0.0)\n{\ngl_FragColor = color0;\n}\nelse if(mipLevel == 1.0)\n{\ngl_FragColor = color1;\n}\nelse if(mipLevel == 2.0)\n{\ngl_FragColor = color2;\n}\nelse if(mipLevel == 3.0)\n{\ngl_FragColor = color3;\n}\nelse if(mipLevel == 4.0)\n{\ngl_FragColor = color4;\n}\nelse if(mipLevel == 5.0)\n{\ngl_FragColor = color5;\n}\nelse\n{\ngl_FragColor = vec4(0.0);\n}\n}\n",z$w="varying vec3 v_cubeMapCoordinates;\nuniform samplerCube cubeMap;\nvoid main()\n{\nvec4 rgba = textureCube(cubeMap, v_cubeMapCoordinates);\n#ifdef RGBA_NORMALIZED\ngl_FragColor = vec4(rgba.rgb, 1.0);\n#else\nfloat m = rgba.a * 16.0;\nvec3 r = rgba.rgb * m;\ngl_FragColor = vec4(r * r, 1.0);\n#endif\n}\n",Q$w="attribute vec4 aPosition;\nattribute vec3 cubeMapCoordinates;\nvarying vec3 v_cubeMapCoordinates;\nvoid main()\n{\ngl_Position = aPosition;\nv_cubeMapCoordinates = cubeMapCoordinates;\n}\n";function u$B(e){this._url=e,this._cubeMapBuffers=void 0,this._cubeMaps=void 0,this._texture=void 0,this._mipTextures=void 0,this._va=void 0,this._sp=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._readyPromise=o$1l.defer()}var J$s=/(^data:image\/ktx)|(\.ktx$)/i,ee$n=/(^data:image\/ktx2)|(\.ktx2$)/i;Object.defineProperties(u$B.prototype,{url:{get:function(){return this._url}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),u$B.isSupported=function(e){return e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat};for(var te$j=new o$1p(1,0,0),re$p=new o$1p(0,0,1),ie$k=new o$1p(-1,0,0),ae$g=new o$1p(0,0,-1),d$G=new o$1p(0,1,0),oe$g=new o$1p(0,-1,0),C$A=[d$G,ie$k,re$p,oe$g,te$j,d$G,ae$g,d$G,d$G],L$C=C$A.length,D$w=new Float32Array(3*L$C),F$D=0,_$t=0;_$t<L$C;++_$t,F$D+=3)o$1p.pack(C$A[_$t],D$w,F$D);var ne$n=new Float32Array([-1,1,-1,0,0,1,0,0,1,0,1,1,0,-1,-1,-1,1,-1]),se$e=new Uint16Array([0,1,2,2,3,1,7,6,1,3,6,1,2,5,4,3,4,2,4,8,6,3,4,6]);function ue$h(e){var t=t$Y.createVertexBuffer({context:e,typedArray:ne$n,usage:A$19.STATIC_DRAW}),i=t$Y.createVertexBuffer({context:e,typedArray:D$w,usage:A$19.STATIC_DRAW}),n=t$Y.createIndexBuffer({context:e,typedArray:se$e,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});return new c$12({context:e,attributes:[{name:"aPosition",index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:S$12.FLOAT},{name:"cubeMapCoordinates",index:1,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:S$12.FLOAT}],indexBuffer:n})}function O$r(e){return function(){return e}}function x$D(e){e._va=e._va&&e._va.destroy(),e._sp=e._sp&&e._sp.destroy(),e._atlasSp=e._atlasSp&&e._atlasSp.destroy();var t,i,n=e._cubeMaps;if(e$2b(n))for(i=n.length,t=0;t<i;++t)n[t].destroy();var r=e._mipTextures;if(e$2b(r))for(i=r.length,t=0;t<i;++t)r[t].destroy();e._va=void 0,e._sp=void 0,e._atlasSp=void 0,e._cubeMaps=void 0,e._cubeMapBuffers=void 0,e._mipTextures=void 0}function f$E(e){return e$K.shader(e,(function(e){n$q(e)})),e$K.buffer(e,(function(e){n$q(e)})),e$K.image(e,(function(e){n$q(e),e$K.compressedImage(e,(function(e){n$q(e)}))})),n$q(e),e}function n$q(e){!e$2b(e.extras)||(e$2b(e.extras._pipeline)&&delete e.extras._pipeline,0===Object.keys(e.extras).length&&delete e.extras)}u$B.prototype.update=function(e){var t=e.context;if(!u$B.isSupported(t)||(e$2b(this._texture)&&e$2b(this._va)&&x$D(this),e$2b(this._texture)))return;if(!e$2b(this._texture)&&!this._loading){var i=t.textureCache.getTexture(this._url);if(e$2b(i))return x$D(this),this._texture=i,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0,void this._readyPromise.resolve()}var n=this._cubeMapBuffers;if(!e$2b(n)&&!this._loading){var r=this;J$s.test(this._url)?k$V(this._url).then((function(e){r._cubeMapBuffers=e,r._loading=!1})).otherwise(this._readyPromise.reject):ee$n.test(this._url)&&f$S(this._url).then((function(e){r._cubeMapBuffers=e,r._loading=!1})).otherwise(this._readyPromise.reject),this._loading=!0}if(!e$2b(this._cubeMapBuffers))return;const o=[];let a=n[0].positiveX.pixelDatatype;e$2b(a)?o.push("RGBA_NORMALIZED"):a=t.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT;const s=V$10.RGBA,l=new s$U({defines:o,sources:[z$w]});this._va=ue$h(t),this._sp=r$13.fromCache({name:"OctahedralProjection",context:t,vertexShaderSource:Q$w,fragmentShaderSource:l,attributeLocations:{aPosition:0,cubeMapCoordinates:1}});var u=Math.min(n.length,6);this._maximumMipmapLevel=u-1;for(var c=this._cubeMaps=new Array(u),h=this._mipTextures=new Array(u),d=2*n[0].positiveX.width,f={originalSize:function(){return d}},p=0;p<u;++p){var _=n[p].positiveY;n[p].positiveY=n[p].negativeY,n[p].negativeY=_;var m=c[p]=new e$1M({context:t,source:n[p],pixelDatatype:a}),g=2*c[p].width,x=h[p]=new t$V({context:t,width:g,height:g,pixelDatatype:a,pixelFormat:s}),v=new t$I({name:"OctahedralProjection",vertexArray:this._va,shaderProgram:this._sp,uniformMap:{cubeMap:O$r(m)},outputTexture:x,persists:!0,owner:this});e.commandList.push(v),f["texture"+p]=O$r(x)}this._texture=new t$V({context:t,width:1.5*d+2,height:d,pixelDatatype:a,pixelFormat:s}),this._texture.maximumMipmapLevel=this._maximumMipmapLevel,t.textureCache.addTexture(this._url,this._texture),this._atlasSp=r$13.fromCache({name:"AtlasSP",context:t,vertexShaderSource:ot$7,fragmentShaderSource:$$x,attributeLocations:{aPosition:0,textureCoordinates:1}});var y=new t$I({name:"OctahedralProjectionAtlas",shaderProgram:this._atlasSp,uniformMap:f,outputTexture:this._texture,persists:!1,owner:this});e.commandList.push(y),this._ready=!0,this._readyPromise.resolve()},u$B.prototype.isDestroyed=function(){return!1},u$B.prototype.destroy=function(){return x$D(this),this._texture=this._texture&&this._texture.destroy(),i$10(this)};var Tt$5=new o$1p,O$q=s$v.ModelState,At$3="model/gltf-binary,model/gltf+json;q=0.8,application/json;q=0.2,*/*;q=0.01";function $e$6(e,t){e._cachedGltf=t}function be$f(e){this._gltf=e.gltf,this.ready=e.ready,this.modelsToLoad=[],this.count=0}Object.defineProperties(be$f.prototype,{gltf:{set:function(e){this._gltf=e},get:function(){return this._gltf}}}),be$f.prototype.makeReady=function(e){this.gltf=e;for(var t=this.modelsToLoad,i=t.length,n=0;n<i;++n){var r=t[n];r.isDestroyed()||$e$6(r,this)}this.modelsToLoad=void 0,this.ready=!0};var X$r={},Lr$1={};function F$C(e){var t,i=(e=u$_(e,u$_.EMPTY_OBJECT)).cacheKey;if(this._cacheKey=i,this._cachedGltf=void 0,this._releaseGltfJson=u$_(e.releaseGltfJson,!1),e$2b(i)&&e$2b(X$r[i])&&X$r[i].ready)++(t=X$r[i]).count;else{var n=e.gltf;if(e$2b(n)){if(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),n instanceof Uint8Array)t=new be$f({gltf:O$u(n),ready:!0});else t=new be$f({gltf:e.gltf,ready:!0});t.count=1,e$2b(i)&&(X$r[i]=t)}}$e$6(this,t);var r=u$_(e.basePath,"");this._resource=t$11.createIfNeeded(r),this.owner=e.owner,this.show=u$_(e.show,!0),this.silhouetteColor=u$_(e.silhouetteColor,e$1U.RED),this._silhouetteColor=new e$1U,this._silhouetteColorPreviousAlpha=1,this._normalAttributeName=void 0,this.silhouetteSize=u$_(e.silhouetteSize,0),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(this.modelMatrix),this._clampedModelMatrix=void 0,this.scale=u$_(e.scale,1),this._scale=this.scale,this.minimumPixelSize=u$_(e.minimumPixelSize,0),this._minimumPixelSize=this.minimumPixelSize,this.maximumScale=e.maximumScale,this._maximumScale=this.maximumScale,this.id=e.id,this._id=e.id,this.heightReference=u$_(e.heightReference,k$P.NONE),this._heightReference=this.heightReference,this._heightChanged=!1,this._removeUpdateHeightCallback=void 0;var o=e.scene;this._scene=o,e$2b(o)&&e$2b(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener((function(){this._heightChanged=!0}),this)),this._pickObject=e.pickObject,this._allowPicking=u$_(e.allowPicking,!0),this._ready=!1,this._readyPromise=o$1l.defer(),this.activeAnimations=new f$F(this),this.clampAnimations=u$_(e.clampAnimations,!0),this._defaultTexture=void 0,this._incrementallyLoadTextures=u$_(e.incrementallyLoadTextures,!0),this._asynchronous=u$_(e.asynchronous,!0),this.shadows=u$_(e.shadows,W$W.ENABLED),this._shadows=this.shadows,this.color=u$_(e.color,e$1U.clone(e$1U.WHITE)),this._color=new e$1U,this._colorPreviousAlpha=1,this.colorBlendMode=u$_(e.colorBlendMode,I$J.HIGHLIGHT),this.colorBlendAmount=u$_(e.colorBlendAmount,.5),this._colorShadingEnabled=!1,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._clippingPlanesState=0,this.clippingPlanesOriginMatrix=void 0,this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=u$_(e.debugWireframe,!1),this._debugWireframe=!1,this._distanceDisplayCondition=e.distanceDisplayCondition,this._addBatchIdToGeneratedShaders=e.addBatchIdToGeneratedShaders,this._precreatedAttributes=e.precreatedAttributes,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=u$_(e.ignoreCommands,!1),this._requestType=e.requestType,this._upAxis=u$_(e.upAxis,v$y.Y),this._gltfForwardAxis=v$y.Z,this._forwardAxis=e.forwardAxis,this.cull=u$_(e.cull,!0),this.opaquePass=u$_(e.opaquePass,Le$s.OPAQUE),this._computedModelMatrix=new p$1d,this._clippingPlaneModelViewMatrix=p$1d.clone(p$1d.IDENTITY),this._initialRadius=void 0,this._boundingSphere=void 0,this._minCorner=void 0,this._maxCorner=void 0,this._scaledBoundingSphere=new i$1c,this._state=O$q.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._perNodeShowDirty=!1,this._cesiumAnimationsDirty=!1,this._dirty=!1,this._maxDirtyNumber=0,this._runtime={animations:void 0,rootNodes:void 0,nodes:void 0,nodesByName:void 0,skinnedNodes:void 0,meshesByName:void 0,materialsByName:void 0,materialsById:void 0},this._uniformMaps={},this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms={},this._programPrimitives={},this._rendererResources={buffers:{},vertexArrays:{},programs:{},sourceShaders:{},silhouettePrograms:{},textures:{},samplers:{},renderStates:{}},this._cachedRendererResources=void 0,this._loadRendererResourcesFromCache=!1,this._dequantizeInShader=u$_(e.dequantizeInShader,!0),this._decodedData={},this._cachedGeometryByteLength=0,this._cachedTexturesByteLength=0,this._geometryByteLength=0,this._texturesByteLength=0,this._trianglesLength=0,this._sourceTechniques={},this._sourcePrograms={},this._quantizedVertexShaders={},this._nodeCommands=[],this._pickIds=[],this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0,this._sourceVersion=void 0,this._sourceKHRTechniquesWebGL=void 0,this._imageBasedLightingFactor=new o$1o(1,1),o$1o.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this._lightColor=o$1p.clone(e.lightColor),this._luminanceAtZenith=void 0,this.luminanceAtZenith=u$_(e.luminanceAtZenith,.2),this._sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._shouldUpdateSpecularMapAtlas=!0,this._specularEnvironmentMapAtlas=void 0,this._useDefaultSphericalHarmonics=!1,this._useDefaultSpecularMaps=!1,this._shouldRegenerateShaders=!1}function Pr$1(e){return e.stencilBuffer}function er$4(e){return!e$1U.equals(e.color,e$1U.WHITE)||e.colorBlendMode!==I$J.HIGHLIGHT}function Rr(e){var t=e._clippingPlanes;return e$2b(t)&&t.enabled&&0!==t.length}function It$4(e){return"glTF"===a$F(e)}function rr$5(e,t,i){if(e._state!==O$q.LOADED)throw new t$16("The model is not loaded. Use Model.readyPromise or wait for Model.ready to be true.");if(!e$2b(i))throw new t$16("name is required.");return e._runtime[t][i]}function Bt$5(e){var t=e.gltf,i=e._loadResources;e$K.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function Ft$4(e,t){return function(i){var n=e._loadResources,r=new Uint8Array(i);--n.pendingBufferLoads,e.gltf.buffers[t].extras._pipeline.source=r}}function Dt$3(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;e$K.bufferView(e.gltf,(function(e,t){e.target===de$x.ARRAY_BUFFER&&i.enqueue(t)}));var n=e._loadResources.indexBuffersToCreate,r={};e$K.accessor(e.gltf,(function(e){var i=e.bufferView;e$2b(i)&&(t[i].target===de$x.ELEMENT_ARRAY_BUFFER&&!e$2b(r[i])&&(r[i]=!0,n.enqueue({id:i,componentType:e.componentType})))}))}function Nt$4(e){var t=e.gltf;if(i$D(t,"KHR_techniques_webgl")){var i=e._sourcePrograms,n=e._sourceTechniques,r=t.extensions.KHR_techniques_webgl.programs;e$K.technique(t,(function(e,t){n[t]=l$1g(e);var o=e.program;e$2b(i[o])||(i[o]=l$1g(r[o]))}))}}function Ot$3(e,t,i){return function(n){var r=e._loadResources;r.shaders[i]={source:n,type:t,bufferView:void 0},--r.pendingShaderLoads,e._rendererResources.sourceShaders[i]=n}}function Ut$3(e){var t=e.gltf,i=t.buffers,n=t.bufferViews,r=e._rendererResources.sourceShaders;e$K.shader(t,(function(t,o){if(e$2b(t.bufferView)){var a=t.bufferView,s=n[a],l=s.buffer,u=a$K(i[l].extras._pipeline.source,s.byteOffset,s.byteLength);r[o]=u}else if(e$2b(t.extras._pipeline.source))r[o]=t.extras._pipeline.source;else{++e._loadResources.pendingShaderLoads;var c=e._resource.getDerivedResource({url:t.uri});c.fetchText().then(Ot$3(e,t.type,o)).otherwise(s$v.getFailedLoadFunction(e,"shader",c.url))}}))}function Vt$4(e){var t=e._sourceTechniques;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];e._loadResources.programsToCreate.enqueue({programId:n.program,techniqueId:i})}}function He$6(e,t){return function(i){const n=e._loadResources;let r;--n.pendingTextureLoads,Array.isArray(i)&&(r=i.slice(1,i.length).map((function(e){return e.bufferView})),i=i[0]),n.texturesToCreate.enqueue({id:t,image:i,bufferView:i.bufferView,width:i.width,height:i.height,internalFormat:i.internalFormat,mipLevels:r})}}Object.defineProperties(F$C.prototype,{gltf:{get:function(){return e$2b(this._cachedGltf)?this._cachedGltf.gltf:void 0}},releaseGltfJson:{get:function(){return this._releaseGltfJson}},cacheKey:{get:function(){return this._cacheKey}},basePath:{get:function(){return this._resource.url}},boundingSphere:{get:function(){if(this._state!==O$q.LOADED)throw new t$16("The model is not loaded. Use Model.readyPromise or wait for Model.ready to be true.");var e=this.modelMatrix;this.heightReference!==k$P.NONE&&this._clampedModelMatrix&&(e=this._clampedModelMatrix);var t,i=p$1d.getScale(e,Tt$5);this.scale instanceof o$1p?(t=this.scale,e$2b(this.maximumScale)&&(t.x=Math.min(this.maximumScale,t.x),t.y=Math.min(this.maximumScale,t.y),t.z=Math.min(this.maximumScale,t.z)),o$1p.multiplyComponents(i,t,i)):(t=e$2b(this.maximumScale)?Math.min(this.maximumScale,this.scale):this.scale,o$1p.multiplyByScalar(i,t,i));var n=this._scaledBoundingSphere;return n.center=o$1p.multiplyComponents(this._boundingSphere.center,i,n.center),n.radius=o$1p.maximumComponent(i)*this._initialRadius,e$2b(this._rtcCenter)&&o$1p.add(this._rtcCenter,n.center,n.center),n}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},asynchronous:{get:function(){return this._asynchronous}},allowPicking:{get:function(){return this._allowPicking}},incrementallyLoadTextures:{get:function(){return this._incrementallyLoadTextures}},pendingTextureLoads:{get:function(){return e$2b(this._loadResources)?this._loadResources.pendingTextureLoads:0}},dirty:{get:function(){return this._dirty}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far must be greater than near");this._distanceDisplayCondition=r$Y.clone(e,this._distanceDisplayCondition)}},extensionsUsed:{get:function(){return e$2b(this._extensionsUsed)||(this._extensionsUsed=s$v.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return e$2b(this._extensionsRequired)||(this._extensionsRequired=s$v.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},forwardAxis:{get:function(){return e$2b(this._forwardAxis)?this._forwardAxis:this._gltfForwardAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return this._texturesByteLength}},cachedGeometryByteLength:{get:function(){return this._cachedGeometryByteLength}},cachedTexturesByteLength:{get:function(){return this._cachedTexturesByteLength}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&h$K.setOwner(e,this,"_clippingPlanes")}},pickIds:{get:function(){return this._pickIds}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o$1q.typeOf.object("imageBasedLightingFactor",e),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1);var t=this._imageBasedLightingFactor;e===t||o$1o.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._imageBasedLightingFactor.x>0&&0===e.x||0===this._imageBasedLightingFactor.x&&e.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._imageBasedLightingFactor.y>0&&0===e.y||0===this._imageBasedLightingFactor.y&&e.y>0,o$1o.clone(e,this._imageBasedLightingFactor))}},lightColor:{get:function(){return this._lightColor},set:function(e){var t=this._lightColor;e===t||o$1p.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||e$2b(t)&&!e$2b(e)||e$2b(e)&&!e$2b(t),this._lightColor=o$1p.clone(e,t))}},luminanceAtZenith:{get:function(){return this._luminanceAtZenith},set:function(e){var t=this._luminanceAtZenith;e!==t&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||e$2b(t)&&!e$2b(e)||e$2b(e)&&!e$2b(t),this._luminanceAtZenith=e)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){if(e$2b(e)&&(!Array.isArray(e)||9!==e.length))throw new t$16("sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.");e!==this._sphericalHarmonicCoefficients&&(this._sphericalHarmonicCoefficients=e,this._shouldRegenerateShaders=!0)}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){this._shouldUpdateSpecularMapAtlas=e!==this._specularEnvironmentMaps,this._specularEnvironmentMaps=e}}}),F$C.silhouetteSupported=function(e){return Pr$1(e.context)},F$C.fromGltf=function(e){if(!e$2b(e)||!e$2b(e.url))throw new t$16("options.url is required");var t=e.url;e=l$1g(e);var i=t$11.createIfNeeded(t),n=u$_(e.basePath,i.clone()),r=t$11.createIfNeeded(n),o=u$_(e.cacheKey,Lr$1[o$1j(i.url)]);e$2b(o)||(o=e$1Q(),Lr$1[o$1j(i.url)]=o),e$2b(e.basePath)&&!e$2b(e.cacheKey)&&(o+=r.url),e.cacheKey=o,e.basePath=r;var a=new F$C(e),s=X$r[o];return e$2b(s)?s.ready||(++s.count,s.modelsToLoad.push(a)):((s=new be$f({ready:!1})).count=1,s.modelsToLoad.push(a),$e$6(a,s),X$r[o]=s,e$2b(i.headers.Accept)||(i.headers.Accept=At$3),i.fetchArrayBuffer().then((function(e){var t=new Uint8Array(e);if(It$4(t)){var i=O$u(t);s.makeReady(i)}else{var n=a$K(t);s.makeReady(JSON.parse(n))}})).otherwise(s$v.getFailedLoadFunction(a,"model",i.url))),a},F$C._gltfCache=X$r,F$C.prototype.getNode=function(e){var t=rr$5(this,"nodesByName",e);return e$2b(t)?t.publicNode:void 0},F$C.prototype.getMesh=function(e){return rr$5(this,"meshesByName",e)},F$C.prototype.getMaterial=function(e){return rr$5(this,"materialsByName",e)};var qt$3=/(^data:image\/ktx)|(\.ktx$)/i,Ht$2=/(^data:image\/crn)|(\.crn$)/i;function zt$2(e,t,i){var n,r=e.gltf,o=r.images;e$K.texture(r,(function(r,a){var s=r.source;e$2b(r.extensions)&&e$2b(r.extensions.EXT_texture_webp)&&i&&(s=r.extensions.EXT_texture_webp.source);var l=o[s],u=l.extras,c=l.bufferView,h=l.mimeType;if(n=l.uri,e$2b(u)&&e$2b(u.compressedImage3DTiles)){var d=u.compressedImage3DTiles.crunch,f=u.compressedImage3DTiles.s3tc,p=u.compressedImage3DTiles.pvrtc1,_=u.compressedImage3DTiles.etc1;t.s3tc&&e$2b(d)?(h=d.mimeType,e$2b(d.bufferView)?c=d.bufferView:n=d.uri):t.s3tc&&e$2b(f)?(h=f.mimeType,e$2b(f.bufferView)?c=f.bufferView:n=f.uri):t.pvrtc&&e$2b(p)?(h=p.mimeType,e$2b(p.bufferView)?c=p.bufferView:n=p.uri):t.etc1&&e$2b(_)&&(h=_.mimeType,e$2b(_.bufferView)?c=_.bufferView:n=_.uri)}if(e$2b(c))e._loadResources.texturesToCreateFromBufferView.enqueue({id:a,image:void 0,bufferView:c,mimeType:h});else{++e._loadResources.pendingTextureLoads;var m=e._resource.getDerivedResource({url:n});(qt$3.test(n)?k$V(m):Ht$2.test(n)?a$P(m,void 0,!0):m.fetchImage()).then(He$6(e,a)).otherwise(s$v.getFailedLoadFunction(e,"image",m.url))}}))}function kt$3(e){var t={},i={},n=[],r=e._loadResources.skinnedNodesIds;e$K.node(e.gltf,(function(o,a){var s={matrix:void 0,translation:void 0,rotation:void 0,scale:void 0,computedShow:!0,transformToRoot:new p$1d,computedMatrix:new p$1d,dirtyNumber:0,commands:[],inverseBindMatrices:void 0,bindShapeMatrix:void 0,joints:[],computedJointMatrices:[],jointName:o.jointName,weights:[],children:[],parents:[],publicNode:void 0};s.publicNode=new r$z(e,o,s,a,s$v.getTransform(o)),t[a]=s,i[o.name]=s,e$2b(o.skin)&&(r.push(a),n.push(s))})),e._runtime.nodes=t,e._runtime.nodesByName=i,e._runtime.skinnedNodes=n}function Gt$2(e){var t=e.gltf,i=e._sourceTechniques,n={},r={},o=e._uniformMaps;e$K.material(t,(function(t,a){o[a]={uniformMap:void 0,values:void 0,jointMatrixUniformName:void 0,morphWeightsUniformName:void 0};var s=new a$w(e,t,a);if(e$2b(t.extensions)&&e$2b(t.extensions.KHR_techniques_webgl)){var l=t.extensions.KHR_techniques_webgl.technique;s._technique=l,s._program=i[l].program,e$K.materialValue(t,(function(e,t){e$2b(s._values)||(s._values={}),s._values[t]=l$1g(e)}))}n[t.name]=s,r[a]=s})),e._runtime.materialsByName=n,e._runtime.materialsById=r}function Wt$4(e){var t={},i=e._runtime.materialsById;e$K.mesh(e.gltf,(function(n,r){t[n.name]=new a$v(n,i,r),(e$2b(e.extensionsUsed.WEB3D_quantized_attributes)||e._dequantizeInShader)&&e$K.meshPrimitive(n,(function(t,i){var n=nr$3(e,t),o=e._programPrimitives[n];e$2b(o)||(o={},e._programPrimitives[n]=o),o[r+".primitive."+i]=t}))})),e._runtime.meshesByName=t}var tr$3=function(){this.id=void 0,this.model=void 0,this.context=void 0};function Tr$1(e,t,i){var n=t._loadResources,r=t.gltf.bufferViews[e];e$2b(r)||(r=n.createdBufferViews[e]);var o=t$Y.createVertexBuffer({context:i,typedArray:n.getBuffer(r),usage:A$19.STATIC_DRAW});o.vertexArrayDestroyable=!1,t._rendererResources.buffers[e]=o,t._geometryByteLength+=o.sizeInBytes}tr$3.prototype.set=function(e,t,i){this.id=e,this.model=t,this.context=i},tr$3.prototype.execute=function(){Tr$1(this.id,this.model,this.context)};var ir$3=function(){this.id=void 0,this.componentType=void 0,this.model=void 0,this.context=void 0};function Ar(e,t,i,n){var r=i._loadResources,o=i.gltf.bufferViews[e];e$2b(o)||(o=r.createdBufferViews[e]);var a=t$Y.createIndexBuffer({context:n,typedArray:r.getBuffer(o),usage:A$19.STATIC_DRAW,indexDatatype:t});a.vertexArrayDestroyable=!1,i._rendererResources.buffers[e]=a,i._geometryByteLength+=a.sizeInBytes}ir$3.prototype.set=function(e,t,i,n){this.id=e,this.componentType=t,this.model=i,this.context=n},ir$3.prototype.execute=function(){Ar(this.id,this.componentType,this.model,this.context)};var Ir$3=new tr$3,Br$1=new ir$3;function Kt$2(e,t){var i=e._loadResources;if(0===i.pendingBufferLoads){var n,r=t.context,o=i.vertexBuffersToCreate,a=i.indexBuffersToCreate;if(e.asynchronous){for(;o.length>0&&(Ir$3.set(o.peek(),e,r),t.jobScheduler.execute(Ir$3,i$Q.BUFFER));)o.dequeue();for(;a.length>0&&(n=a.peek(),Br$1.set(n.id,n.componentType,e,r),t.jobScheduler.execute(Br$1,i$Q.BUFFER));)a.dequeue()}else{for(;o.length>0;)Tr$1(o.dequeue(),e,r);for(;a.length>0;)Ar((n=a.dequeue()).id,n.componentType,e,r)}}}function nr$3(e,t){var i=e._runtime.materialsById[t.material];if(e$2b(i))return i._program}function Fr(e,t,i){var n,r,o=i._programPrimitives[t];if(!e$2b(o))return e;for(r in o)if(o.hasOwnProperty(r)&&nr$3(i,n=o[r])===t)break;var a=e;if(i.extensionsUsed.WEB3D_quantized_attributes)a=s$v.modifyShaderForQuantizedAttributes(i.gltf,n,e),i._quantizedUniforms[t]=a.uniforms;else{var s=i._decodedData[r];if(!e$2b(s))return a;a=s$v.modifyShaderForDracoQuantizedAttributes(i.gltf,n,e,s.attributes)}return i._programPrimitives[t]=void 0,a.shader}function jt$1(e){return e=s$U.replaceMain(e,"gltf_blend_main"),e+="uniform vec4 gltf_color; \nuniform float gltf_colorBlend; \nvoid main() \n{ \n gltf_blend_main(); \n gl_FragColor.rgb = mix(gl_FragColor.rgb, gltf_color.rgb, gltf_colorBlend); \n float highlight = ceil(gltf_colorBlend); \n gl_FragColor.rgb *= mix(gltf_color.rgb, vec3(1.0), highlight); \n gl_FragColor.a *= gltf_color.a; \n} \n"}function Me$e(e,t,i){return e$2b(i)&&(e=i(e,t)),e}var ar$3=function(){this.programToCreate=void 0,this.model=void 0,this.context=void 0,this.frameState=void 0};function Dr(e,t,i){return i="#include <LightUboDecl>\n"+i,t="#define DIR_LIGHTS "+e.lightSource.directionalLight.length+"\n"+t,i="#define DIR_LIGHTS "+e.lightSource.directionalLight.length+"\n"+i,t="#define POINT_LIGHTS "+e.lightSource.pointLight.length+"\n"+t,i="#define POINT_LIGHTS "+e.lightSource.pointLight.length+"\n"+i,{vs:t="#define SPOT_LIGHTS "+e.lightSource.spotLight.length+"\n"+t,fs:i="#define SPOT_LIGHTS "+e.lightSource.spotLight.length+"\n"+i}}function Nr(e,t,i,n){var r=e.programId,o=e.techniqueId,a=t._sourcePrograms[r],s=t._rendererResources.sourceShaders,l=s[a.vertexShader],u=s[a.fragmentShader],c=t._quantizedVertexShaders,h=t._toClipCoordinatesGLSL[r];if(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader){var d=c[r];e$2b(d)||(d=Fr(l,r,t),c[r]=d),l=d}var f=Me$e(l,r,t._vertexShaderLoaded),p=Me$e(u,r,t._fragmentShaderLoaded);s$Y.isInternetExplorer()||(f=s$v.modifyVertexShaderForLogDepth(f,h),p=s$v.modifyFragmentShaderForLogDepth(p));var _=[];e$2b(t._uniformMapLoaded)||(p="uniform vec4 czm_pickColor;\n"+p);var m=t._imageBasedLightingFactor.x>0||t._imageBasedLightingFactor.y>0;m&&(p="#define USE_IBL_LIGHTING \n\n"+p,_.push("USE_IBL_LIGHTING")),e$2b(t._lightColor)&&(p="#define USE_CUSTOM_LIGHT_COLOR \n\n"+p,_.push("USE_CUSTOM_LIGHT_COLOR")),e$2b(t.owner)&&t.owner._swipeEnabled&&(p="#define APPLY_SWIPE \n\n"+p,_.push("APPLY_SWIPE"));var g=Dr(n,f,p);if(f=g.vs,p=g.fs,("2.0"!==t._sourceVersion||t._sourceKHRTechniquesWebGL)&&(p=s$U.replaceMain(p,"non_gamma_corrected_main"),p+="\nvoid main() { \n non_gamma_corrected_main(); \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),u$B.isSupported(i)){var x=e$2b(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,v=e$2b(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps;(x||v||m)&&(p="uniform mat4 gltf_clippingPlanesMatrix; \n"+p),e$2b(t._sphericalHarmonicCoefficients)?(p="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+p,_.push("DIFFUSE_IBL"),_.push("CUSTOM_SPHERICAL_HARMONICS")):t._useDefaultSphericalHarmonics&&(p="#define DIFFUSE_IBL \n"+p,_.push("DIFFUSE_IBL")),e$2b(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?(p="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+p,_.push("SPECULAR_IBL"),_.push("CUSTOM_SPECULAR_IBL")):t._useDefaultSpecularMaps&&(p="#define SPECULAR_IBL \n"+p,_.push("SPECULAR_IBL"))}e$2b(t._luminanceAtZenith)&&(p="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+p,_.push("USE_SUN_LUMINANCE"));var y=new s$U({name:"gltfVp_"+a.vertexShader,sources:[f],defines:_});Or(r,o,new s$U({name:"gltfFp_"+a.fragmentShader,sources:[p],defines:_}),y,t,i)}function Yt$1(e,t,i,n){var r=e.programId,o=e.techniqueId,a=t._sourcePrograms[r],s=t._rendererResources.sourceShaders,l=t._quantizedVertexShaders,u=t._toClipCoordinatesGLSL[r],c=t.clippingPlanes,h=Rr(t),d=s[a.vertexShader],f=s[a.fragmentShader];(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader)&&(d=l[r]);var p=f;er$4(t)&&(p=F$C._modifyShaderForColor(p)),h&&(p=Yi$1(p,c,i));var _=Me$e(d,r,t._vertexShaderLoaded),m=Me$e(p,r,t._fragmentShaderLoaded);s$Y.isInternetExplorer()||(_=s$v.modifyVertexShaderForLogDepth(_,u),m=s$v.modifyFragmentShaderForLogDepth(m));var g=[];e$2b(t._uniformMapLoaded)||(m="uniform vec4 czm_pickColor;\n"+m);var x=t._imageBasedLightingFactor.x>0||t._imageBasedLightingFactor.y>0;x&&(m="#define USE_IBL_LIGHTING \n\n"+m,g.push("USE_IBL_LIGHTING")),e$2b(t._lightColor)&&(m="#define USE_CUSTOM_LIGHT_COLOR \n\n"+m,g.push("USE_CUSTOM_LIGHT_COLOR")),e$2b(t.owner)&&t.owner._swipeEnabled&&(m="#define APPLY_SWIPE \n\n"+m,g.push("APPLY_SWIPE"));var v=Dr(n,_,m);if(_=v.vs,m=v.fs,("2.0"!==t._sourceVersion||t._sourceKHRTechniquesWebGL)&&(m=s$U.replaceMain(m,"non_gamma_corrected_main"),m+="\nvoid main() { \n non_gamma_corrected_main(); \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),u$B.isSupported(i)){var y=e$2b(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,$=e$2b(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps;!h&&(y||$||x)&&(m="uniform mat4 gltf_clippingPlanesMatrix; \n"+m),e$2b(t._sphericalHarmonicCoefficients)?(m="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+m,g.push("DIFFUSE_IBL"),g.push("CUSTOM_SPHERICAL_HARMONICS")):t._useDefaultSphericalHarmonics&&(m="#define DIFFUSE_IBL \n"+m,g.push("DIFFUSE_IBL")),e$2b(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?(m="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+m,g.push("SPECULAR_IBL"),g.push("CUSTOM_SPECULAR_IBL")):t._useDefaultSpecularMaps&&(m="#define SPECULAR_IBL \n"+m,g.push("SPECULAR_IBL"))}e$2b(t._luminanceAtZenith)&&(m="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+m,g.push("USE_SUN_LUMINANCE"));var b=new s$U({name:"gltfVp_"+a.vertexShader,sources:[_],defines:g});Or(r,o,new s$U({name:"gltfFp_"+a.fragmentShader,sources:[m],defines:g}),b,t,i)}function Or(e,t,i,n,r,o){var a=r._sourceTechniques[t],s=s$v.createAttributeLocations(a,r._precreatedAttributes);r._rendererResources.programs[e]=r$13.fromCache({context:o,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:s}),o.webgpu&&r._rendererResources.programs[e]._createEffect()}ar$3.prototype.set=function(e,t,i,n){this.programToCreate=e,this.model=t,this.context=i,this.frameState=n},ar$3.prototype.execute=function(){Nr(this.programToCreate,this.model,this.context,this.frameState)};var Ur$2=new ar$3;function Zt(e,t){var i=e._loadResources,n=i.programsToCreate;if(0===i.pendingShaderLoads&&0===i.pendingBufferLoads){var r=t.context;if(e.asynchronous)for(;n.length>0&&(Ur$2.set(n.peek(),e,r,t),t.jobScheduler.execute(Ur$2,i$Q.PROGRAM));)n.dequeue();else for(;n.length>0;)Nr(n.dequeue(),e,r)}}function Jt$1(e,t){return function(i){e.texturesToCreate.enqueue({id:t.id,image:i,bufferView:void 0}),--e.pendingBufferViewToImage}}function Qt$2(e){var t=e._loadResources;if(0===t.pendingBufferLoads)for(;t.texturesToCreateFromBufferView.length>0;){var i=t.texturesToCreateFromBufferView.dequeue(),n=e.gltf,r=n.bufferViews[i.bufferView];n.textures[i.id].source;var o=s$v.getFailedLoadFunction(e,"image","id: "+i.id+", bufferView: "+i.bufferView);if("image/ktx"===i.mimeType)k$V(t.getBuffer(r)).then(He$6(e,i.id)).otherwise(o),++e._loadResources.pendingTextureLoads;else if("image/ktx2"===i.mimeType){f$S(new Uint8Array(t.getBuffer(r))).then(He$6(e,i.id)),++e._loadResources.pendingTextureLoads}else if("image/crn"===i.mimeType){var a=a$P(t.getBuffer(r),void 0,!0);e$2b(a)&&a.then(He$6(e,i.id)).otherwise(o),++e._loadResources.pendingTextureLoads}else{var s=Jt$1(t,i);w$Q({uint8Array:t.getBuffer(r),format:i.mimeType,flipY:!1}).then(s).otherwise(o),++t.pendingBufferViewToImage}}}function Xt(e){var t=e._loadResources;if(t.createSamplers){t.createSamplers=!1;var i=e._rendererResources.samplers;e$K.sampler(e.gltf,(function(e,t){i[t]=new e$1P({wrapS:e.wrapS,wrapT:e.wrapT,minificationFilter:e.minFilter,magnificationFilter:e.magFilter})}))}}var sr$3=function(){this.gltfTexture=void 0,this.model=void 0,this.context=void 0};function Vr(e,t,i){var n=t.gltf.textures[e.id],r=t._rendererResources.samplers[n.sampler];r=u$_(r,new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT}));var o,a=e.internalFormat,s=!(e$2b(a)&&V$10.isCompressedFormat(a)||r.minificationFilter!==tt$h.NEAREST_MIPMAP_NEAREST&&r.minificationFilter!==tt$h.NEAREST_MIPMAP_LINEAR&&r.minificationFilter!==tt$h.LINEAR_MIPMAP_NEAREST&&r.minificationFilter!==tt$h.LINEAR_MIPMAP_LINEAR),l=s||r.wrapS===q$19.REPEAT||r.wrapS===q$19.MIRRORED_REPEAT||r.wrapT===q$19.REPEAT||r.wrapT===q$19.MIRRORED_REPEAT,u=e.image;if(e$2b(a))o=new t$V({context:i,source:{arrayBufferView:e.bufferView,mipLevels:e.mipLevels},width:e.width,height:e.height,pixelFormat:a,sampler:r});else if(e$2b(u)){var c=!e$2a.isPowerOfTwo(u.width)||!e$2a.isPowerOfTwo(u.height);if(l&&c){var h=document.createElement("canvas");h.width=e$2a.nextPowerOfTwo(u.width),h.height=e$2a.nextPowerOfTwo(u.height),h.getContext("2d").drawImage(u,0,0,u.width,u.height,0,0,h.width,h.height),u=h}o=new t$V({context:i,source:u,pixelFormat:n.internalFormat,pixelDatatype:n.type,sampler:r,flipY:!1}),s&&o.generateMipmap()}e$2b(o)&&(t._rendererResources.textures[e.id]=o,t._texturesByteLength+=o.sizeInBytes)}sr$3.prototype.set=function(e,t,i){this.gltfTexture=e,this.model=t,this.context=i},sr$3.prototype.execute=function(){Vr(this.gltfTexture,this.model,this.context)};var qr=new sr$3;function $t(e,t){var i=t.context,n=e._loadResources.texturesToCreate;if(e.asynchronous)for(;n.length>0&&(qr.set(n.peek(),e,i),t.jobScheduler.execute(qr,i$Q.TEXTURE));)n.dequeue();else for(;n.length>0;)Vr(n.dequeue(),e,i)}function ei$1(e,t){var i,n,r=e._sourceTechniques,o={},a=e._runtime.materialsById[t.material];if(!e$2b(a))return o;var s=r[a._technique];if(!e$2b(s))return o;var l=s.attributes,u=e._rendererResources.programs[s.program],c=u.vertexAttributes,h=u._attributeLocations;for(i in c)if(c.hasOwnProperty(i)){var d=l[i];e$2b(d)&&(n=h[i],o[d.semantic]={index:n,nameInProgram:i})}var f=e._precreatedAttributes;if(e$2b(f))for(i in f)f.hasOwnProperty(i)&&(n=h[i],o[i]={index:n,nameInProgram:i});return o}function ri$1(e,t){for(var i=e.gltf,n=i.skins,r=i.nodes,o=e._runtime.nodes,a=e._loadResources.skinnedNodesIds,s=a.length,l=0;l<s;++l){var u=a[l],c=o[u],h=r[u],d=t[h.skin];c.inverseBindMatrices=d.inverseBindMatrices,c.bindShapeMatrix=d.bindShapeMatrix;for(var f=n[h.skin].joints,p=f.length,_=0;_<p;++_){var m=o[f[_]];c.joints.push(m)}}}function ti$1(e){var t=e._loadResources;if(0===t.pendingBufferLoads&&t.createSkins){t.createSkins=!1;var i=e.gltf,n=i.accessors,r={};e$K.skin(i,(function(t,i){var o,a=n[t.inverseBindMatrices];p$1d.equals(t.bindShapeMatrix,p$1d.IDENTITY)||(o=p$1d.clone(t.bindShapeMatrix)),r[i]={inverseBindMatrices:S$t.getSkinInverseBindMatrices(e,a),bindShapeMatrix:o}})),ri$1(e,r)}}function ii$1(e,t,i,n){return function(r){e$2b(n)&&(r=e.clampAnimations?n.clampTime(r):n.wrapTime(r),t[i]=n.evaluate(r,t[i]),t.dirtyNumber=e._maxDirtyNumber)}}function ni$1(e){var t=e._loadResources;if(t.finishedPendingBufferLoads()&&t.createRuntimeAnimations){t.createRuntimeAnimations=!1,e._runtime.animations=[];var i=e._runtime.nodes,n=e.gltf.accessors;e$K.animation(e.gltf,(function(t,r){for(var o=t.channels,a=t.samplers,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=o.length,c=new Array(u),h=0;h<u;++h){var d=o[h],f=d.target,p=f.path,_=a[d.sampler],m=S$t.getAnimationParameterValues(e,n[_.input]),g=S$t.getAnimationParameterValues(e,n[_.output]);s=Math.min(s,m[0]),l=Math.max(l,m[m.length-1]);var x=S$t.getAnimationSpline(e,r,t,d.sampler,_,m,p,g);c[h]=ii$1(e,i[f.node],f.path,x)}e._runtime.animations[r]={name:t.name,startTime:s,stopTime:l,channelEvaluators:c}}))}}function Hr(e){console.log("webgpu引擎要求顶点属性是4字节的倍数, gltf数据中的"+e+"顶点属性不符合要求,不能显示.")}function zr$2(e,t){var i=e._loadResources;if(i.finishedBuffersCreation()&&i.finishedProgramCreation()&&i.createVertexArrays){i.createVertexArrays=!1;var n=e._rendererResources.buffers,r=e._rendererResources.vertexArrays,o=e.gltf,a=o.accessors;e$K.mesh(o,(function(i,s){e$K.meshPrimitive(i,(function(i,l){var u,c=[],h=ei$1(e,i),d=e._decodedData[s+".primitive."+l];e$K.meshPrimitiveAttribute(i,(function(e,i){if(e$2b(h[i])){if(u=h[i].index,e$2b(d)){var r=d.attributes;if(r.hasOwnProperty(i)){var s=r[i];return t.webgpu&&s.byteStride%4!=0&&Hr(h[i].nameInProgram),void c.push({name:h[i].nameInProgram,index:u,vertexBuffer:n[s.bufferView],componentsPerAttribute:s.componentsPerAttribute,componentDatatype:s.componentDatatype,normalize:s.normalized,offsetInBytes:s.byteOffset,strideInBytes:s.byteStride})}}var l=a[e],f=p$A(o,l);t.webgpu&&f%4!=0&&Hr(h[i].nameInProgram);var p=e$2b(l.normalized)&&l.normalized;c.push({name:h[i].nameInProgram,index:u,vertexBuffer:n[l.bufferView],componentsPerAttribute:r$B(l.type),componentDatatype:l.componentType,normalize:p,offsetInBytes:l.byteOffset,strideInBytes:f})}}));var f,p,_,m=e._precreatedAttributes;if(e$2b(m))for(p in m)m.hasOwnProperty(p)&&e$2b(h[p])&&(u=h[p].index,(f=m[p]).index=u,c.push(f));if(e$2b(i.indices)){var g=a[i.indices].bufferView;e$2b(d)&&(g=d.bufferView),_=n[g]}r[s+".primitive."+l]=new c$12({context:t,attributes:c,indexBuffer:_})}))}))}}function ai$2(e){var t=e._loadResources;t.createRenderStates&&(t.createRenderStates=!1,e$K.material(e.gltf,(function(t,i){si$1(e,t,i)})))}function si$1(e,t,i){var n=e._rendererResources.renderStates,r=[de$x.FUNC_ADD,de$x.FUNC_ADD],o=[de$x.ONE,de$x.ONE_MINUS_SRC_ALPHA,de$x.ONE,de$x.ONE_MINUS_SRC_ALPHA];e$2b(t.extensions)&&e$2b(t.extensions.KHR_blend)&&(r=t.extensions.KHR_blend.blendEquation,o=t.extensions.KHR_blend.blendFactors);var a=!t.doubleSided,s="BLEND"===t.alphaMode;n[i]=d$1m.fromCache({cull:{enabled:a},depthTest:{enabled:!0},depthMask:!s,blending:{enabled:s,equationRgb:r[0],equationAlpha:r[1],functionSourceRgb:o[0],functionDestinationRgb:o[1],functionSourceAlpha:o[2],functionDestinationAlpha:o[3]},stencilTest:{enabled:!0,frontFunction:m$X.ALWAYS,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.REPLACE},backFunction:m$X.ALWAYS,backOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.REPLACE},reference:u$N.MODEL,mask:65535}})}var oi$1={MODEL:function(e,t,i){return function(){return i.computedMatrix}},VIEW:function(e,t,i){return function(){return e.view}},PROJECTION:function(e,t,i){return function(){return e.projection}},MODELVIEW:function(e,t,i){var n=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n)}},CESIUM_RTC_MODELVIEW:function(e,t,i){var n=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.setTranslation(n,t._rtcCenterEye,n)}},MODELVIEWPROJECTION:function(e,t,i){var n=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.multiply(e._projection,n,n)}},MODELINVERSE:function(e,t,i){var n=new p$1d;return function(){return p$1d.inverse(i.computedMatrix,n)}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t,i){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t,i){var n=new p$1d,r=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.inverse(n,r)}},MODELVIEWPROJECTIONINVERSE:function(e,t,i){var n=new p$1d,r=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.multiply(e._projection,n,n),p$1d.inverse(n,r)}},MODELINVERSETRANSPOSE:function(e,t,i){var n=new p$1d,r=new p$1e;return function(){return p$1d.inverse(i.computedMatrix,n),p$1d.getRotation(n,r),p$1e.transpose(r,r)}},MODELVIEWINVERSETRANSPOSE:function(e,t,i){var n=new p$1d,r=new p$1d,o=new p$1e;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.inverse(n,r),p$1d.getRotation(r,o),p$1e.transpose(o,o)}},VIEWPORT:function(e,t,i){return function(){return e.viewportCartesian4}}};function ui$3(e,t,i,n){var r=t._runtime.nodes[e];return oi$1[i](n,t,r)}function ci$4(e,t,i,n,r,o,a){var s,l,u={},c={};return e$K.techniqueUniform(i,(function(i,h){var d;if(e$2b(n)&&e$2b(n[h]))d=s$v.createUniformFunction(i.type,n[h],o,a,i.extensionType),u[h]=d.func,c[h]=d;else if(e$2b(i.node))u[h]=ui$3(i.node,e,i.semantic,r.uniformState);else if(e$2b(i.semantic))if("JOINTMATRIX"===i.semantic)s=h;else if("MORPHWEIGHTS"===i.semantic)l=h;else if("ALPHACUTOFF"===i.semantic){var f=t.alphaMode;if(e$2b(f)&&"MASK"===f){var p=u$_(t.alphaCutoff,.5);d=s$v.createUniformFunction(i.type,p,o,a,i.extensionType),u[h]=d.func,c[h]=d}}else u[h]=s$v.getGltfSemanticUniforms()[i.semantic](r.uniformState,e);else if(e$2b(i.value)){var _=s$v.createUniformFunction(i.type,i.value,o,a,i.extensionType);u[h]=_.func,c[h]=_}})),{map:u,values:c,jointMatrixUniformName:s,morphWeightsUniformName:l}}function fi$3(e,t){var i=e._loadResources;if(i.finishedProgramCreation()&&i.createUniformMaps){i.createUniformMaps=!1;var n=e.gltf,r=e._sourceTechniques,o=e._uniformMaps,a=e._rendererResources.textures,s=e._defaultTexture;e$K.material(n,(function(i,n){var l=e._runtime.materialsById[n],u=r[l._technique],c=l._values,h=ci$4(e,i,u,c,t,a,s),d=o[n];d.uniformMap=h.map,d.values=h.values,d.jointMatrixUniformName=h.jointMatrixUniformName,d.morphWeightsUniformName=h.morphWeightsUniformName}))}}function hi$3(e){return s$v.createUniformsForDracoQuantizedAttributes(e.attributes)}function li$2(e,t){var i=nr$3(e,t),n=e._quantizedUniforms[i];return s$v.createUniformsForQuantizedAttributes(e.gltf,t,n)}function di$3(e){return function(){return e}}function pi$4(e){return function(){return e.computedJointMatrices}}function _i$4(e){return function(){return e.weights}}function gi$4(e){return function(){return e.silhouetteColor}}function vi$3(e){return function(){return e.silhouetteSize}}function mi$1(e){return function(){return e.color}}var xi$3=new p$1d;function yi$3(e){return function(){var t=e.clippingPlanes;if(!e$2b(t)&&!e$2b(e._sphericalHarmonicCoefficients)&&!e$2b(e._specularEnvironmentMaps))return p$1d.IDENTITY;var i=e$2b(t)?t.modelMatrix:p$1d.IDENTITY;return p$1d.multiply(e._clippingPlaneModelViewMatrix,i,xi$3)}}function Si$2(e){return function(){var t=e.clippingPlanes;return e$2b(t)&&t.enabled?t.texture:e._defaultTexture}}function Ci$3(e){return function(){var t=e.clippingPlanes;if(!e$2b(t))return e$1U.WHITE.withAlpha(0);var i=e$1U.clone(t.edgeColor);return i.alpha=t.edgeWidth,i}}function Ei$3(e){return function(){return I$J.getColorBlend(e.colorBlendMode,e.colorBlendAmount)}}function bi$3(e){return function(){return e._imageBasedLightingFactor}}function Mi$3(e){return function(){return e._lightColor}}function wi$3(e){return function(){return e.luminanceAtZenith}}function Li$1(e){return function(){return e._sphericalHarmonicCoefficients}}function Pi$3(e){return function(){return e._specularEnvironmentMapAtlas.texture}}function Ri$2(e){return function(){return e._specularEnvironmentMapAtlas.texture.dimensions}}function Ti$3(e){return function(){return e._specularEnvironmentMapAtlas.maximumMipmapLevel}}function Ai$2(e,t){switch(e.mode){case W$18.TRIANGLES:return t/3;case W$18.TRIANGLE_STRIP:case W$18.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function Ii$2(e,t,i,n,r,o){for(var a=e._nodeCommands,s=e._pickIds,l=e.allowPicking,u=e._runtime.meshesByName,c=e._rendererResources,h=c.vertexArrays,d=c.programs,f=c.renderStates,p=e._uniformMaps,_=e.gltf,m=_.accessors,g=_.meshes,x=t.mesh,v=g[x],y=v.primitives,$=y.length,b=0;b<$;++b){var T,C=y[b],S=m[C.indices],w=e._runtime.materialsById[C.material]._program,E=e._decodedData[x+".primitive."+b],P=C.attributes.POSITION;if(e$2b(P)){var A=s$v.getAccessorMinMax(_,P);T=i$1c.fromCornerPoints(o$1p.fromArray(A.min),o$1p.fromArray(A.max))}var L,M,R=h[x+".primitive."+b];if(e$2b(E))M=E.numberOfIndices,L=0;else if(e$2b(S))M=S.count,L=S.byteOffset/ce$x.getSizeInBytes(S.componentType);else{M=m[C.attributes.POSITION].count,L=0}e._trianglesLength+=Ai$2(C,M);var O=p[C.material],I=O.uniformMap;if(e$2b(O.jointMatrixUniformName)){var D={};D[O.jointMatrixUniformName]=pi$4(i),I=p$19(I,D)}if(e$2b(O.morphWeightsUniformName)){var B={};B[O.morphWeightsUniformName]=_i$4(i),I=p$19(I,B)}I=p$19(I,{gltf_color:mi$1(e),gltf_colorBlend:Ei$3(e),gltf_clippingPlanes:Si$2(e),gltf_clippingPlanesEdgeStyle:Ci$3(e),gltf_clippingPlanesMatrix:yi$3(e),gltf_iblFactor:bi$3(e),gltf_lightColor:Mi$3(e),gltf_sphericalHarmonicCoefficients:Li$1(e),gltf_specularMap:Pi$3(e),gltf_specularMapSize:Ri$2(e),gltf_maxSpecularLOD:Ti$3(e),gltf_luminanceAtZenith:wi$3(e)}),I=p$19(I,o.lightSource.createUniformMap()),e$2b(e._uniformMapLoaded)&&(I=e._uniformMapLoaded(I,w,i));var N={};e.extensionsUsed.WEB3D_quantized_attributes?N=li$2(e,C):e._dequantizeInShader&&e$2b(E)&&(N=hi$3(E)),I=p$19(I,N);var F=f[C.material],U=F.blending.enabled,G=e._pickObject;e$2b(G)||(G={primitive:e,id:e.id,node:i.publicNode,mesh:u[v.name]});var z,V=W$W.castShadows(e._shadows),k=W$W.receiveShadows(e._shadows);if(l&&!e$2b(e._uniformMapLoaded))z=n.createPickId(G),s.push(z),I=p$19(I,{czm_pickColor:di$3(z.color)});l&&(z=e$2b(e._pickIdLoaded)&&e$2b(e._uniformMapLoaded)?e._pickIdLoaded():"czm_pickColor");var W,H=new i$_({boundingVolume:new i$1c,cull:e.cull,modelMatrix:new p$1d,primitiveType:C.mode,vertexArray:R,count:M,offset:L,shaderProgram:d[w],castShadows:V,receiveShadows:k,uniformMap:I,renderState:F,owner:G,pass:U?Le$s.TRANSLUCENT:e.opaquePass,pickId:z});H.addUniformBuffer(n.uniformState._lightUBO),r||((W=i$_.shallowClone(H)).boundingVolume=new i$1c,W.modelMatrix=new p$1d);var q={show:!0,boundingSphere:T,command:H,command2D:W,silhouetteModelCommand:void 0,silhouetteModelCommand2D:void 0,silhouetteColorCommand:void 0,silhouetteColorCommand2D:void 0,translucentCommand:void 0,translucentCommand2D:void 0,programId:w};i.commands.push(q),a.push(q)}}function Bi$1(e,t,i,n){var r=e._loadResources;if(r.finishedEverythingButTextureCreation()&&r.createRuntimeNodes){r.createRuntimeNodes=!1;for(var o=[],a=e._runtime.nodes,s=e.gltf,l=s.nodes,u=(s.skins,s.scenes[s.scene].nodes),c=u.length,h=[],d={},f=0;f<c;++f)for(h.push({parentRuntimeNode:void 0,gltfNode:l[u[f]],id:u[f]});h.length>0;){var p=h.pop();d[p.id]=!0;var _=p.parentRuntimeNode,m=p.gltfNode,g=a[p.id];if(0===g.parents.length)if(e$2b(m.matrix))g.matrix=p$1d.fromColumnMajorArray(m.matrix);else{var x=m.rotation;g.translation=o$1p.fromArray(m.translation),g.rotation=n$13.unpack(x),g.scale=o$1p.fromArray(m.scale)}e$2b(_)?(_.children.push(g),g.parents.push(_)):o.push(g),e$2b(m.mesh)&&Ii$2(e,m,g,t,i,n);var v=m.children;if(e$2b(v))for(var y=v.length,$=0;$<y;$++){var b=v[$];d[b]||h.push({parentRuntimeNode:g,gltfNode:l[b],id:v[$]})}}e._runtime.rootNodes=o,e._runtime.nodes=a}}function Fi$1(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&(t+=e[i].sizeInBytes);return t}function Di$3(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&(t+=e[i].sizeInBytes);return t}function kr$2(e,t){var i=t.context,n=t.scene3DOnly,r=e._quantizedVertexShaders,o=e._toClipCoordinatesGLSL={},a=e._sourceTechniques,s=e._sourcePrograms,l=e._rendererResources,u=l.sourceShaders;for(var c in e._loadRendererResourcesFromCache&&(u=l.sourceShaders=e._cachedRendererResources.sourceShaders),a)if(a.hasOwnProperty(c)){var h=a[c].program,d=s[h],f=u[d.vertexShader];if(s$v.checkSupportedGlExtensions(d.glExtensions,i),e.extensionsUsed.WEB3D_quantized_attributes||e._dequantizeInShader){var p=r[h];e$2b(p)||(p=Fr(f,h,e),r[h]=p),f=p}f=Me$e(f,h,e._vertexShaderLoaded),o[h]=s$v.toClipCoordinatesGLSL(e.gltf,f)}if(e._loadRendererResourcesFromCache){var _=e._cachedRendererResources;l.buffers=_.buffers,l.vertexArrays=_.vertexArrays,l.programs=_.programs,l.silhouettePrograms=_.silhouettePrograms,l.textures=_.textures,l.samplers=_.samplers,l.renderStates=_.renderStates,e$2b(e._precreatedAttributes)&&zr$2(e,i),e._cachedGeometryByteLength+=Fi$1(_.buffers),e._cachedTexturesByteLength+=Di$3(_.textures)}else Kt$2(e,t),Zt(e,t),Xt(e),Qt$2(e),$t(e,t);ti$1(e),ni$1(e),e._loadRendererResourcesFromCache||(zr$2(e,i),ai$2(e)),fi$3(e,i),Bi$1(e,i,n,t)}function Gr$1(e,t){var i=e.publicNode,n=i.matrix;i.useMatrix&&e$2b(n)?p$1d.clone(n,t):e$2b(e.matrix)?p$1d.clone(e.matrix,t):(p$1d.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t),i.setMatrix(t))}var Wr=[],Ni$2=new e$29,or$2=new p$1d;function Kr$2(e,t,i,n){var r=e._maxDirtyNumber,o=e._runtime.rootNodes,a=o.length,s=Wr,l=e._computedModelMatrix;if(e._mode!==C$13.SCENE3D&&!e._ignoreCommands){var u=p$1d.getColumn(l,3,Ni$2);if(e$29.equals(u,e$29.UNIT_W)){var c=e.boundingSphere.center,h=m$17.wgs84To2DModelMatrix(n,c,or$2);l=p$1d.multiply(h,l,or$2),e$2b(e._rtcCenter)&&(p$1d.setTranslation(l,e$29.UNIT_W,l),e._rtcCenter=e._rtcCenter2D)}else l=m$17.basisTo2D(n,l,or$2),e._rtcCenter=e._rtcCenter3D}for(var d=0;d<a;++d){var f=o[d];for(Gr$1(f,f.transformToRoot),s.push(f);s.length>0;){var p=(f=s.pop()).transformToRoot,_=f.commands;if(f.dirtyNumber===r||t||i){var m=p$1d.multiplyTransformation(l,p,f.computedMatrix),g=_.length;if(g>0)for(var x=0;x<g;++x){var v=_[x],y=v.command;p$1d.clone(m,y.modelMatrix),i$1c.transform(v.boundingSphere,y.modelMatrix,y.boundingVolume),e$2b(e._rtcCenter)&&o$1p.add(e._rtcCenter,y.boundingVolume.center,y.boundingVolume.center),e$2b(y=v.command2D)&&e._mode===C$13.SCENE2D&&(p$1d.clone(m,y.modelMatrix),y.modelMatrix[13]-=2*e$2a.sign(y.modelMatrix[13])*e$2a.PI*n.ellipsoid.maximumRadius,i$1c.transform(v.boundingSphere,y.modelMatrix,y.boundingVolume))}}var $=f.children;if(e$2b($))for(var b=$.length,T=0;T<b;++T){var C=$[T];C.dirtyNumber=Math.max(C.dirtyNumber,f.dirtyNumber),(C.dirtyNumber===r||i)&&(Gr$1(C,C.transformToRoot),p$1d.multiplyTransformation(p,C.transformToRoot,C.transformToRoot)),s.push(C)}}}++e._maxDirtyNumber}var ur$1=new p$1d;function jr$1(e){for(var t=e._runtime.skinnedNodes,i=t.length,n=0;n<i;++n){var r=t[n];ur$1=p$1d.inverseTransformation(r.transformToRoot,ur$1);for(var o=r.computedJointMatrices,a=r.joints,s=r.bindShapeMatrix,l=r.inverseBindMatrices,u=l.length,c=0;c<u;++c)e$2b(o[c])||(o[c]=new p$1d),o[c]=p$1d.multiplyTransformation(ur$1,a[c].transformToRoot,o[c]),o[c]=p$1d.multiplyTransformation(o[c],l[c],o[c]),e$2b(s)&&(o[c]=p$1d.multiplyTransformation(o[c],s,o[c]))}}function Oi$3(e){for(var t=e._runtime.rootNodes,i=t.length,n=Wr,r=0;r<i;++r){var o=t[r];for(o.computedShow=o.publicNode.show,n.push(o);n.length>0;){for(var a=(o=n.pop()).computedShow,s=o.commands,l=s.length,u=0;u<l;++u)s[u].show=a;var c=o.children;if(e$2b(c))for(var h=c.length,d=0;d<h;++d){var f=c[d];f.computedShow=a&&f.publicNode.show,n.push(f)}}}}function Ui$1(e,t){var i=e.id;if(e._id!==i){e._id=i;for(var n=e._pickIds,r=n.length,o=0;o<r;++o)n[o].object.id=i}}function Vi$3(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?W$18.LINES:W$18.TRIANGLES,i=e._nodeCommands,n=i.length,r=0;r<n;++r)i[r].command.primitiveType=t}}function qi$1(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e.debugShowBoundingVolume,i=e._nodeCommands,n=i.length,r=0;r<n;++r)i[r].command.debugShowBoundingVolume=t}}function Hi$2(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=W$W.castShadows(e.shadows),i=W$W.receiveShadows(e.shadows),n=e._nodeCommands,r=n.length,o=0;o<r;o++){var a=n[o];a.command.castShadows=t,a.command.receiveShadows=i}}}function zi$2(e){var t=l$1g(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=Ee$r.ALPHA_BLEND,d$1m.fromCache(t)}function Yr$1(e){var t=i$_.shallowClone(e);return t.pass=Le$s.TRANSLUCENT,t.renderState=zi$2(e.renderState),t}function Zr$1(e,t,i){var n=t.scene3DOnly,r=e.color.alpha;if(r>0&&r<1){var o=e._nodeCommands,a=o.length;if(!e$2b(o[0].translucentCommand)||i)for(var s=0;s<a;++s){var l=o[s],u=l.command;if(l.translucentCommand=Yr$1(u),!n){var c=l.command2D;l.translucentCommand2D=Yr$1(c)}}}}function ki$2(e,t){var i=e._rendererResources.programs;for(var n in i)if(i.hasOwnProperty(n)&&i[n]===t)return n}function Gi$1(e,t,i){var n=t.vertexShaderSource.sources[0],r=t._attributeLocations,o=e._normalAttributeName;n=s$U.replaceMain(n,"gltf_silhouette_main"),n+="uniform float gltf_silhouetteSize; \nvoid main() \n{ \n gltf_silhouette_main(); \n vec3 n = normalize(czm_normal3D * "+o+"); \n n.x *= czm_projection[0][0]; \n n.y *= czm_projection[1][1]; \n vec4 clip = gl_Position; \n clip.xy += n.xy * clip.w * gltf_silhouetteSize / czm_viewport.z; \n gl_Position = clip; \n}";return r$13.fromCache({context:i.context,vertexShaderSource:n,fragmentShaderSource:"uniform vec4 gltf_silhouetteColor; \nvoid main() \n{ \n gl_FragColor = gltf_silhouetteColor; \n}",attributeLocations:r})}function Jr$1(e,t){return Pr$1(t.context)&&e.silhouetteSize>0&&e.silhouetteColor.alpha>0&&e$2b(e._normalAttributeName)}function Wi$2(e){for(var t=e._nodeCommands,i=t.length,n=0;n<i;++n){if(t[n].command.pass===Le$s.TRANSLUCENT)return!0}return!1}function cr$2(e){return e.color.alpha>0&&e.color.alpha<1}function Qr$1(e){return 0===e.color.alpha}function Xr$1(e,t){return Math.floor(e)!==Math.floor(t)||Math.ceil(e)!==Math.ceil(t)}var Ki$1=0;function ji$2(e,t){for(var i=++Ki$1%255,n=Wi$2(e)||cr$2(e)||e.silhouetteColor.alpha<1,r=e._rendererResources.silhouettePrograms,o=t.scene3DOnly,a=e._nodeCommands,s=a.length,l=0;l<s;++l){var u=a[l],c=u.command,h=cr$2(e)?u.translucentCommand:c,d=i$_.shallowClone(h),f=l$1g(h.renderState);f.stencilTest={enabled:!0,frontFunction:de$x.ALWAYS,backFunction:de$x.ALWAYS,reference:i,mask:65535,frontOperation:{fail:de$x.KEEP,zFail:de$x.KEEP,zPass:de$x.REPLACE},backOperation:{fail:de$x.KEEP,zFail:de$x.KEEP,zPass:de$x.REPLACE}},Qr$1(e)&&(f.colorMask={red:!1,green:!1,blue:!1,alpha:!1},f.depthMask=!1),f=d$1m.fromCache(f),d.renderState=f,u.silhouetteModelCommand=d;var p=i$_.shallowClone(c);(f=l$1g(c.renderState,!0)).depthTest.enabled=!0,f.cull.enabled=!1,n&&(p.pass=Le$s.TRANSLUCENT,f.depthMask=!1,f.blending=Ee$r.ALPHA_BLEND),f.stencilTest={enabled:!0,frontFunction:de$x.NOTEQUAL,backFunction:de$x.NOTEQUAL,reference:i,mask:65535,frontOperation:{fail:de$x.KEEP,zFail:de$x.KEEP,zPass:de$x.KEEP},backOperation:{fail:de$x.KEEP,zFail:de$x.KEEP,zPass:de$x.KEEP}},f=d$1m.fromCache(f);var _=c.shaderProgram,m=ki$2(e,_),g=r[m];e$2b(g)||(g=Gi$1(e,_,t),r[m]=g);var x=p$19(c.uniformMap,{gltf_silhouetteColor:gi$4(e),gltf_silhouetteSize:vi$3(e)});if(p.renderState=f,p.shaderProgram=g,p.uniformMap=x,p.castShadows=!1,p.receiveShadows=!1,u.silhouetteColorCommand=p,!o){var v=u.command2D,y=i$_.shallowClone(d);y.boundingVolume=v.boundingVolume,y.modelMatrix=v.modelMatrix,u.silhouetteModelCommand2D=y;var $=i$_.shallowClone(p);y.boundingVolume=v.boundingVolume,y.modelMatrix=v.modelMatrix,u.silhouetteColorCommand2D=$}}}function Yi$1(e,t,i){return e=s$U.replaceMain(e,"gltf_clip_main"),e+=F$C._getClippingFunction(t,i)+"\n",e+="uniform sampler2D gltf_clippingPlanes; \nuniform mat4 gltf_clippingPlanesMatrix; \nuniform vec4 gltf_clippingPlanesEdgeStyle; \nvoid main() \n{ \n gltf_clip_main(); \n"+p$x("gltf_clippingPlanes","gltf_clippingPlanesMatrix","gltf_clippingPlanesEdgeStyle")+"} \n"}function $r$2(e,t,i){if(Jr$1(e,t)){var n=e._nodeCommands,r=Xr$1(e.color.alpha,e._colorPreviousAlpha)||Xr$1(e.silhouetteColor.alpha,e._silhouetteColorPreviousAlpha)||!e$2b(n[0].silhouetteModelCommand);e._colorPreviousAlpha=e.color.alpha,e._silhouetteColorPreviousAlpha=e.silhouetteColor.alpha,(r||i)&&ji$2(e,t)}}function Zi$2(e,t){var i=e._clippingPlanes;e$2b(i)&&i.owner===e&&i.enabled&&i.update(t)}var fr$1=new i$1c;function Ji$1(e,t,i){return fr$1.center=e,fr$1.radius=t,i.camera.getPixelSize(fr$1,i.context.drawingBufferWidth,i.context.drawingBufferHeight)}var B$u=new o$1p,we$b=new a$18,Qi$1=new o$1p;function Xi(e,t){var i=e.scale;if(0!==e.minimumPixelSize){var n=t.context,r=Math.max(n.drawingBufferWidth,n.drawingBufferHeight),o=e$2b(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;if(B$u.x=o[12],B$u.y=o[13],B$u.z=o[14],e$2b(e._rtcCenter)&&o$1p.add(e._rtcCenter,B$u,B$u),e._mode!==C$13.SCENE3D){var a=t.mapProjection,s=a.ellipsoid.cartesianToCartographic(B$u,we$b);a.project(s,B$u),o$1p.fromElements(B$u.z,B$u.x,B$u.y,B$u)}var l=e.boundingSphere.radius,u=Ji$1(B$u,l,t),c=1/u;Math.min(c*(2*l),r)<e.minimumPixelSize&&(i=e.minimumPixelSize*u/(2*e._initialRadius))}return i instanceof o$1p?e$2b(e.maximumScale)&&(i.x=i.x>e.maximumScale?e.maximumScale:i.x,i.y=i.y>e.maximumScale?e.maximumScale:i.y,i.z=i.z>e.maximumScale?e.maximumScale:i.z):(e$2b(e.maximumScale)&&(i=i>e.maximumScale?e.maximumScale:i),i=o$1p.fromElements(i,i,i,Qi$1)),i}function et$7(e){e$2b(e._cacheKey)&&e$2b(e._cachedGltf)&&0==--e._cachedGltf.count&&delete X$r[e._cacheKey],e._cachedGltf=void 0}function hr$1(e,t){this.buffers=void 0,this.vertexArrays=void 0,this.programs=void 0,this.sourceShaders=void 0,this.silhouettePrograms=void 0,this.textures=void 0,this.samplers=void 0,this.renderStates=void 0,this.ready=!1,this.context=e,this.cacheKey=t,this.count=0}function $$w(e){for(var t in e)e.hasOwnProperty(t)&&e[t].destroy()}function $i$1(e){$$w(e.buffers),$$w(e.vertexArrays),$$w(e.programs),$$w(e.silhouettePrograms),$$w(e.textures)}function rt$8(e,t,i){return function(n){if(e.heightReference===k$P.RELATIVE_TO_GROUND){var r=t.cartesianToCartographic(n,we$b);r.height+=i.height,t.cartographicToCartesian(r,n)}var o=e._clampedModelMatrix;p$1d.clone(e.modelMatrix,o),o[12]=n.x,o[13]=n.y,o[14]=n.z,e._heightChanged=!0}}function en$1(e){e$2b(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);var t=e._scene;if(e$2b(t)&&e$2b(t.globe)&&e.heightReference!==k$P.NONE){var i=t.globe,n=i.ellipsoid,r=e.modelMatrix;B$u.x=r[12],B$u.y=r[13],B$u.z=r[14];var o=n.cartesianToCartographic(B$u);e$2b(e._clampedModelMatrix)||(e._clampedModelMatrix=p$1d.clone(r,new p$1d));var a=i._surface;e._removeUpdateHeightCallback=a.updateHeight(o,rt$8(e,n,o));var s=i.getHeight(o);if(e$2b(s)){var l=rt$8(e,n,o);a$18.clone(o,we$b),we$b.height=s,n.cartographicToCartesian(we$b,B$u),l(B$u)}}else{if(e.heightReference!==k$P.NONE)throw new t$16("Height reference is not supported without a scene and globe.");e._clampedModelMatrix=void 0}}hr$1.prototype.release=function(){if(0==--this.count)return e$2b(this.cacheKey)&&delete this.context.cache.modelRendererResourceCache[this.cacheKey],$i$1(this),i$10(this)};var rn$1=new o$1p,tn$1=new a$18;function nn$1(e,t){var i,n=e.distanceDisplayCondition,r=n.near*n.near,o=n.far*n.far;if(t.mode===C$13.SCENE2D){i=.5*(t.camera.frustum.right-t.camera.frustum.left),i*=i}else{var a=p$1d.getTranslation(e.modelMatrix,rn$1);if(t.mode===C$13.COLUMBUS_VIEW){var s=t.mapProjection,l=s.ellipsoid.cartesianToCartographic(a,tn$1);a=s.project(l,a),o$1p.fromElements(a.z,a.x,a.y,a)}i=o$1p.distanceSquared(a,t.camera.positionWC)}return i>=r&&i<=o}var an$1=new o$1p,_e$d=new o$1p,Le$e=new p$1d;function tt$6(e,t){e.programs!==t.programs&&$$w(e.programs),e.silhouettePrograms!==t.silhouettePrograms&&$$w(e.silhouettePrograms)}function sn$1(e,t){var i,n=e._rendererResources,r=e._cachedRendererResources;if(tt$6(n,r),Rr(e)||er$4(e)||e._shouldRegenerateShaders){e._shouldRegenerateShaders=!1,n.programs={},n.silhouettePrograms={};var o={},a=e._sourceTechniques;for(var s in a)a.hasOwnProperty(s)&&(o[i=a[s].program]||(o[i]=!0,Yt$1({programId:i,techniqueId:s},e,t.context,t)))}else n.programs=r.programs,n.silhouettePrograms=r.silhouettePrograms;for(var l=n.programs,u=e._nodeCommands,c=u.length,h=0;h<c;++h){var d=u[h],f=l[i=d.programId];d.command.shaderProgram=f,e$2b(d.command2D)&&(d.command2D.shaderProgram=f)}Zr$1(e,t,!0),$r$2(e,t,!0)}function n$p(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._model=void 0,this._batchTable=void 0,this._features=void 0,this._batchIdAttributeName=void 0,this._diffuseAttributeOrUniformName={},this._rtcCenterTransform=void 0,this._contentModelMatrix=void 0,this.featurePropertiesDirty=!1,re$o(this,n,r)}F$C.prototype.update=function(e){if(e.multiViewportIndex>-1&&e$2b(this.id)){var t=this.id.entityCollection;if(e$2b(t)){var i=t.owner;if(e$2b(i)&&typeof i.getVisibleInViewport<"u")if(!i.getVisibleInViewport(e.multiViewportIndex))return}}if(e.mode!==C$13.MORPHING){var n=s$Y.supportsWebPSync();if(e$2b(n)){var r=e.context;if(this._defaultTexture=r.defaultTexture,this._state===O$q.NEEDS_LOAD&&e$2b(this.gltf)){var o,a=this.cacheKey;if(e$2b(a)){r.cache.modelRendererResourceCache=u$_(r.cache.modelRendererResourceCache,{});var s=r.cache.modelRendererResourceCache;if(e$2b(o=s[this.cacheKey])){if(!o.ready)return;++o.count,this._loadRendererResourcesFromCache=!0}else(o=new hr$1(r,a)).count=1,s[this.cacheKey]=o;this._cachedRendererResources=o}else(o=new hr$1(r)).count=1,this._cachedRendererResources=o;if(this._state=O$q.LOADING,this._state!==O$q.FAILED){var l=this.gltf.extensions;if(e$2b(l)&&e$2b(l.CESIUM_RTC)){var u=o$1p.fromArray(l.CESIUM_RTC.center);if(!o$1p.equals(u,o$1p.ZERO)){this._rtcCenter3D=u;var c=e.mapProjection,h=c.ellipsoid.cartesianToCartographic(this._rtcCenter3D),d=c.project(h);o$1p.fromElements(d.z,d.x,d.y,d),this._rtcCenter2D=d,this._rtcCenterEye=new o$1p,this._rtcCenter=this._rtcCenter3D}}s$z(this.gltf),this._loadResources=new t$u,this._loadRendererResourcesFromCache||s$v.parseBuffers(this,Ft$4)}}var f=this._loadResources,p=this._incrementallyLoadTextures,_=!1;if(this._state===O$q.LOADING){if(0===f.pendingBufferLoads){if(!f.initialized){if(e.brdfLutGenerator.update(e),s$v.checkSupportedExtensions(this.extensionsRequired,n),s$v.updateForwardAxis(this),!this._loadRendererResourcesFromCache){var m=this.gltf;m.extras.sourceVersion=s$v.getAssetVersion(m),m.extras.sourceKHRTechniquesWebGL=e$2b(s$v.getUsedExtensions(m).KHR_techniques_webgl),this._sourceVersion=m.extras.sourceVersion,this._sourceKHRTechniquesWebGL=m.extras.sourceKHRTechniquesWebGL,re$r(m),E$D(m);var g={addBatchIdToGeneratedShaders:this._addBatchIdToGeneratedShaders};ue$k(m,g),he$f(m,g)}this._sourceVersion=this.gltf.extras.sourceVersion,this._sourceKHRTechniquesWebGL=this.gltf.extras.sourceKHRTechniquesWebGL,this._dequantizeInShader=this._dequantizeInShader&&r$A.hasExtension(this),Bt$5(this),Nt$4(this),this._loadRendererResourcesFromCache||(Dt$3(this),Ut$3(this),Vt$4(this),zt$2(this,r,n)),Gt$2(this),Wt$4(this),kt$3(this),r$A.parse(this,r),f.initialized=!0}f.finishedDecoding()||r$A.decodeModel(this,r).otherwise(s$v.getFailedLoadFunction(this,"model",this.basePath)),f.finishedDecoding()&&!f.resourcesParsed&&(this._boundingSphere=s$v.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,r$A.cacheDataForModel(this),f.resourcesParsed=!0),f.resourcesParsed&&0===f.pendingShaderLoads&&kr$2(this,e)}(f.finished()||p&&f.finishedEverythingButTextureCreation())&&(this._state=O$q.LOADED,_=!0)}if(e$2b(f)&&this._state===O$q.LOADED&&(p&&!_&&kr$2(this,e),f.finished())){this._loadResources=void 0;var x=this._rendererResources,v=this._cachedRendererResources;v.buffers=x.buffers,v.vertexArrays=x.vertexArrays,v.programs=x.programs,v.sourceShaders=x.sourceShaders,v.silhouettePrograms=x.silhouettePrograms,v.textures=x.textures,v.samplers=x.samplers,v.renderStates=x.renderStates,v.ready=!0,this._normalAttributeName=s$v.getAttributeOrUniformBySemantic(this.gltf,"NORMAL"),e$2b(this._precreatedAttributes)&&(v.vertexArrays={}),this.releaseGltfJson&&et$7(this)}var y=u$B.isSupported(r);if(this._shouldUpdateSpecularMapAtlas&&y){if(this._shouldUpdateSpecularMapAtlas=!1,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),this._specularEnvironmentMapAtlas=void 0,e$2b(this._specularEnvironmentMaps)){this._specularEnvironmentMapAtlas=new u$B(this._specularEnvironmentMaps);var $=this;this._specularEnvironmentMapAtlas.readyPromise.then((function(){$._shouldRegenerateShaders=!0}))}this._shouldRegenerateShaders=!0}e$2b(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e);var b=!e$2b(this._specularEnvironmentMapAtlas)&&e$2b(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,T=!e$2b(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,C=!e$2b(this._sphericalHarmonicCoefficients)&&e$2b(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,S=!e$2b(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||b||T||C||S,this._useDefaultSpecularMaps=!e$2b(this._specularEnvironmentMapAtlas)&&e$2b(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!e$2b(this._sphericalHarmonicCoefficients)&&e$2b(e.sphericalHarmonicCoefficients);var w=Jr$1(this,e),E=cr$2(this),P=Qr$1(this),A=!e$2b(this.distanceDisplayCondition)||nn$1(this,e),L=this.show&&A&&(this.scale instanceof o$1p?!o$1p.equals(this._scale,o$1p.ZERO):0!==this.scale)&&(!P||w);if(L&&this._state===O$q.LOADED||_){var M=this.activeAnimations.update(e)||this._cesiumAnimationsDirty;this._cesiumAnimationsDirty=!1,this._dirty=!1;var R=this.modelMatrix,O=e.mode!==this._mode;this._mode=e.mode;var I=!p$1d.equals(this._modelMatrix,R)||(this.scale instanceof o$1p?!o$1p.equals(this._scale,this.scale):this._scale!==this.scale)||this._minimumPixelSize!==this.minimumPixelSize||0!==this.minimumPixelSize||this._maximumScale!==this.maximumScale||this._heightReference!==this.heightReference||this._heightChanged||O;if(I||_){p$1d.clone(R,this._modelMatrix),en$1(this),e$2b(this._clampedModelMatrix)&&(R=this._clampedModelMatrix),this._minimumPixelSize=this.minimumPixelSize,this._maximumScale=this.maximumScale,this._heightReference=this.heightReference,this._heightChanged=!1;var D=Xi(this,e),B=this._computedModelMatrix;if(e$2b(this._offsetMatrix)){if(!this._lastDefinedOffset){"number"==typeof this._scale?(_e$d.x=this._scale,_e$d.y=this._scale,_e$d.z=this._scale):o$1p.clone(this._scale,_e$d);var N=p$1d.getTranslation(this._offsetMatrix,an$1),F=o$1p.divideComponents(N,_e$d,_e$d);o$1p.negate(N,N),this._offsetMat4ForScale=this._offsetMat4ForScale||new p$1d,this._realOffsetMat4ForScale=this._realOffsetMat4ForScale||new p$1d,p$1d.fromTranslation(N,this._offsetMat4ForScale),p$1d.fromTranslation(F,this._realOffsetMat4ForScale)}p$1d.multiply(p$1d.fromScale(D),this._realOffsetMat4ForScale,Le$e),p$1d.multiply(this._offsetMat4ForScale,Le$e,Le$e)}else p$1d.fromScale(D,Le$e);p$1d.multiply(R,Le$e,B),this._scale=this.scale,this._lastDefinedOffset=e$2b(this._offsetMatrix),this._upAxis===v$y.Y?p$1d.multiplyTransformation(B,v$y.Y_UP_TO_Z_UP,B):this._upAxis===v$y.X&&p$1d.multiplyTransformation(B,v$y.X_UP_TO_Z_UP,B),this.forwardAxis===v$y.Z&&p$1d.multiplyTransformation(B,v$y.Z_UP_TO_X_UP,B)}(M||I||_)&&(Kr$2(this,I,_,e.mapProjection),this._dirty=!0,(M||_)&&jr$1(this)),this._perNodeShowDirty&&(this._perNodeShowDirty=!1,Oi$3(this)),Ui$1(this),Vi$3(this),qi$1(this),Hi$2(this),Zi$2(this,e);var U=this._clippingPlanes,G=0,z=e$2b(U)&&U.enabled&&U.length>0,V=e$2b(this._sphericalHarmonicCoefficients)||this._useDefaultSphericalHarmonics,k=e$2b(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready||this._useDefaultSpecularMaps;if(z||V||k){var W=u$_(this.clippingPlanesOriginMatrix,R);p$1d.multiply(r.uniformState.view3D,W,this._clippingPlaneModelViewMatrix)}z&&(G=U.clippingPlanesState),e.lightSource.hasChange()&&(this._shouldRegenerateShaders=!0);var H=this._shouldRegenerateShaders;H=H||this._clippingPlanesState!==G,this._clippingPlanesState=G;var q=er$4(this);q!==this._colorShadingEnabled&&(this._colorShadingEnabled=q,H=!0),H?sn$1(this,e):(Zr$1(this,e,!1),$r$2(this,e,!1))}if(_){var j=this;return void e.afterRender.push((function(){j._ready=!0,j._readyPromise.resolve(j)}))}if(L&&!this._ignoreCommands){var Y,X,K,Q=e.commandList,Z=e.passes,J=this._nodeCommands,ee=J.length,te=e.mapProjection.ellipsoid.maximumRadius*e$2a.PI;if(Z.render||Z.pick&&this.allowPicking){for(Y=0;Y<ee;++Y)if((X=J[Y]).show){var ie=E?X.translucentCommand:X.command;if(ie=w?X.silhouetteModelCommand:ie,Q.push(ie),K=X.command.boundingVolume,e.mode===C$13.SCENE2D&&(K.center.y+K.radius>te||K.center.y-K.radius<te)){var ne=E?X.translucentCommand2D:X.command2D;ne=w?X.silhouetteModelCommand2D:ne,Q.push(ne)}}if(w&&!Z.pick)for(Y=0;Y<ee;++Y)(X=J[Y]).show&&(Q.push(X.silhouetteColorCommand),K=X.command.boundingVolume,e.mode===C$13.SCENE2D&&(K.center.y+K.radius>te||K.center.y-K.radius<te)&&Q.push(X.silhouetteColorCommand2D))}}}}},F$C.prototype.updateAnimation=function(e){this._state===O$q.LOADED&&((this.activeAnimations.update(e)||this._cesiumAnimationsDirty)&&(Kr$2(this,!0,!0,e.mapProjection),jr$1(this)))},F$C.prototype.isDestroyed=function(){return!1},F$C.prototype.destroy=function(){e$2b(this._precreatedAttributes)&&$$w(this._rendererResources.vertexArrays),e$2b(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),e$2b(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0),e$2b(this._cachedRendererResources)&&tt$6(this._rendererResources,this._cachedRendererResources),this._rendererResources=void 0,this._cachedRendererResources=this._cachedRendererResources&&this._cachedRendererResources.release(),r$A.destroyCachedDataForModel(this);for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();et$7(this),this._quantizedVertexShaders=void 0;var n=this._clippingPlanes;return e$2b(n)&&!n.isDestroyed()&&n.owner===this&&n.destroy(),this._clippingPlanes=void 0,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),i$10(this)},F$C._getClippingFunction=f$G,F$C._modifyShaderForColor=jt$1,n$p._deprecationWarning=t$12,Object.defineProperties(n$p.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return this._model.trianglesLength}},geometryByteLength:{get:function(){return this._model.geometryByteLength}},texturesByteLength:{get:function(){return this._model.texturesByteLength}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._model.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var s$s=Uint32Array.BYTES_PER_ELEMENT;function O$p(e){var t=s$v.getAttributeOrUniformBySemantic(e,"_BATCHID");return e$2b(t)||e$2b(t=s$v.getAttributeOrUniformBySemantic(e,"BATCHID"))&&n$p._deprecationWarning("b3dm-legacy-batchid","The glTF in this b3dm uses the semantic `BATCHID`. Application-specific semantics should be prefixed with an underscore: `_BATCHID`."),t}function I$I(e){return function(t,i){var n=e._batchTable,r=!e$2b(e._tileset.classificationType),o=e._model.gltf;e$2b(o)&&(e._batchIdAttributeName=O$p(o),e._diffuseAttributeOrUniformName[i]=s$v.getDiffuseAttributeOrUniform(o,i));var a=n.getVertexShaderCallback(r,e._batchIdAttributeName,e._diffuseAttributeOrUniformName[i]);return e$2b(a)?a(t):t}}function ee$m(e){return function(t,i){var n=e._batchTable,r=!e$2b(e._tileset.classificationType),o=e._model.gltf;e$2b(o)&&(e._diffuseAttributeOrUniformName[i]=s$v.getDiffuseAttributeOrUniform(o,i));var a=n.getFragmentShaderCallback(r,e._diffuseAttributeOrUniformName[i]);return e$2b(a)?a(t):t}}function N$p(e){return function(){return e._batchTable.getPickId()}}function te$i(e){return function(t){var i=e._batchTable.getClassificationFragmentShaderCallback();return e$2b(i)?i(t):t}}function ie$j(e){return function(t,i){e._model.updateCommands(t,i)}}function re$o(e,t,i){var n=e._tileset,r=e._tile,o=e._resource,a=u$_(i,0);i=a;var s=new Uint8Array(t),l=new DataView(t);i+=s$s;var u=l.getUint32(i,!0);if(1!==u)throw new t$14("Only Batched 3D Model version 1 is supported. Version "+u+" is not.");i+=s$s;var c=l.getUint32(i,!0);i+=s$s;var h=l.getUint32(i,!0);i+=s$s;var d=l.getUint32(i,!0);i+=s$s;var f=l.getUint32(i,!0);i+=s$s;var p,_,m=l.getUint32(i,!0);if(i+=s$s,f>=570425344?(i-=2*s$s,p=h,f=d,m=0,h=0,d=0,n$p._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] .")):m>=570425344&&(i-=s$s,p=f,f=h,m=d,h=0,d=0,n$p._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] .")),0===h)_={BATCH_LENGTH:u$_(p,0)};else{var g=a$K(s,i,h);_=JSON.parse(g),i+=h}var x=new Uint8Array(t,i,d);i+=d;var v,y,$,b=new o$B(_,x);if(p=b.getGlobalProperty("BATCH_LENGTH"),b.featuresLength=p,f>0){var T=a$K(s,i,f);v=JSON.parse(T),i+=f,m>0&&(y=new Uint8Array(t,i,m),y=new Uint8Array(y),i+=m)}e$2b(n.classificationType)&&($=ie$j(e));var C=new h$D(e,p,v,y,$);e._batchTable=C;var S,w=a+c-i;if(0===w)throw new t$14("glTF byte length must be greater than 0.");i%4==0?S=new Uint8Array(t,i,w):(n$p._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),S=new Uint8Array(s.subarray(i,i+w)));var E={content:e,primitive:n};e._rtcCenterTransform=p$1d.IDENTITY;var P=b.getGlobalProperty("RTC_CENTER",S$12.FLOAT,3);e$2b(P)&&(e._rtcCenterTransform=p$1d.fromTranslation(o$1p.fromArray(P))),e._contentModelMatrix=p$1d.multiply(r.computedTransform,e._rtcCenterTransform,new p$1d),e$2b(n.classificationType)?e._model=new A$C({gltf:S,cull:!1,basePath:o,requestType:V$15.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:n._gltfUpAxis,forwardAxis:v$y.X,debugWireframe:n.debugWireframe,vertexShaderLoaded:I$I(e),classificationShaderLoaded:te$i(e),uniformMapLoaded:C.getUniformMapCallback(),pickIdLoaded:N$p(e),classificationType:n._classificationType,batchTable:C}):e._model=new F$C({gltf:S,cull:!1,releaseGltfJson:!0,opaquePass:Le$s.CESIUM_3D_TILE,basePath:o,requestType:V$15.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:n._gltfUpAxis,forwardAxis:v$y.X,shadows:n.shadows,debugWireframe:n.debugWireframe,incrementallyLoadTextures:!1,vertexShaderLoaded:I$I(e),fragmentShaderLoaded:ee$m(e),uniformMapLoaded:C.getUniformMapCallback(),pickIdLoaded:N$p(e),addBatchIdToGeneratedShaders:p>0,pickObject:E,imageBasedLightingFactor:n.imageBasedLightingFactor,lightColor:n.lightColor,luminanceAtZenith:n.luminanceAtZenith,sphericalHarmonicCoefficients:n.sphericalHarmonicCoefficients,specularEnvironmentMaps:n.specularEnvironmentMaps,owner:n})}function ae$f(e){var t=e.featuresLength;if(!e$2b(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$L(e,n);e._features=i}}function i$B(e,t,i,n,r,o){this._tileset=e,this._tile=t,this._resource=i,this._contents=[],this._readyPromise=o$1l.defer(),L$B(this,n,r,o)}n$p.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},n$p.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2b(e)||e<0||e>=t)throw new t$16("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return ae$f(this),this._features[e]},n$p.prototype.applyDebugSettings=function(e,t){t=e?t:e$1U.WHITE,0===this.featuresLength?this._model.color=t:this._batchTable.setAllColor(t)},n$p.prototype.applyStyle=function(e){if(0===this.featuresLength){var t=e$2b(e)&&e$2b(e.color),i=e$2b(e)&&e$2b(e.show);this._model.color=t?e.color.evaluateColor(void 0,this._model.color):e$1U.clone(e$1U.WHITE,this._model.color),this._model.show=!i||e.show.evaluate(void 0)}else this._batchTable.applyStyle(e)},n$p.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._contentModelMatrix=p$1d.multiply(this._tile.computedTransform,this._rtcCenterTransform,this._contentModelMatrix),this._model.modelMatrix=this._contentModelMatrix,this._model.shadows=this._tileset.shadows,this._model.imageBasedLightingFactor=this._tileset.imageBasedLightingFactor,this._model.lightColor=this._tileset.lightColor,this._model.luminanceAtZenith=this._tileset.luminanceAtZenith,this._model.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._model.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._model.debugWireframe=this._tileset.debugWireframe;var n=this._tileset.clippingPlanes;this._model.clippingPlanesOriginMatrix=this._tileset.clippingPlanesOriginMatrix,e$2b(n)&&this._tile.clippingPlanesDirty&&(this._model._clippingPlanes=n.enabled&&this._tile._isClipped?n:void 0),e$2b(n)&&e$2b(this._model._clippingPlanes)&&this._model._clippingPlanes!==n&&(this._model._clippingPlanes=n),this._model.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&!e$2b(e.classificationType)&&this._batchTable.addDerivedCommands(t,i)},n$p.prototype.isDestroyed=function(){return!1},n$p.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$10(this)},Object.defineProperties(i$B.prototype,{featurePropertiesDirty:{get:function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)if(e[i].featurePropertiesDirty)return!0;return!1},set:function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}});var u$A=Uint32Array.BYTES_PER_ELEMENT;function L$B(e,t,i,n){i=u$_(i,0);var r=new Uint8Array(t),o=new DataView(t);i+=u$A;var a=o.getUint32(i,!0);if(1!==a)throw new t$14("Only Composite Tile version 1 is supported. Version "+a+" is not.");i+=u$A,i+=u$A;var s=o.getUint32(i,!0);i+=u$A;for(var l=[],u=0;u<s;++u){var c=a$F(r,i),h=o.getUint32(i+2*u$A,!0),d=n[c];if(!e$2b(d))throw new t$14("Unknown tile content type, "+c+", inside Composite tile");var f=d(e._tileset,e._tile,e._resource,t,i);e._contents.push(f),l.push(f.readyPromise),i+=h}o$1l.all(l).then((function(){e._readyPromise.resolve(e)})).otherwise((function(t){e._readyPromise.reject(t)}))}function e$H(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,e$2b(this._center)||(e$2b(this._boundingVolume)?this._center=o$1p.clone(this._boundingVolume.center):this._center=o$1p.clone(o$1p.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=_0x3b5200.BOTH}function F$B(e){var t=new Float64Array(p$1d.packedLength+o$1p.packedLength),i=0;return o$1p.pack(e._center,t,i),i+=o$1p.packedLength,p$1d.pack(e._modelMatrix,t,i),t}function M$A(e,t){for(var i=0,n=t[i++],r=t[i++],o=e._boundingVolumes=new Array(r),a=0;a<r;++a)o[a]=i$1c.unpack(t,i),i+=i$1c.packedLength;for(var s=t[i++],l=e._batchedIndices=new Array(s),u=0;u<s;++u){var c=e$1U.unpack(t,i);i+=e$1U.packedLength;for(var h=t[i++],d=t[i++],f=t[i++],p=new Array(f),_=0;_<f;++_)p[_]=t[i++];l[u]=new c$w({color:c,offset:h,count:d,batchIds:p})}return n}i$B.prototype.hasProperty=function(e,t){return!1},i$B.prototype.getFeature=function(e){},i$B.prototype.applyDebugSettings=function(e,t){for(var i=this._contents,n=i.length,r=0;r<n;++r)i[r].applyDebugSettings(e,t)},i$B.prototype.applyStyle=function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].applyStyle(e)},i$B.prototype.update=function(e,t){for(var i=this._contents,n=i.length,r=0;r<n;++r)i[r].update(e,t)},i$B.prototype.isDestroyed=function(){return!1},i$B.prototype.destroy=function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)e[i].destroy();return i$10(this)},Object.defineProperties(e$H.prototype,{trianglesLength:{get:function(){return e$2b(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return e$2b(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}}),e$H.packedBoxLength=p$1d.packedLength+o$1p.packedLength,e$H.packedCylinderLength=p$1d.packedLength+2,e$H.packedEllipsoidLength=p$1d.packedLength+o$1p.packedLength,e$H.packedSphereLength=o$1p.packedLength+1;var R$q=new i$V("createVectorTileGeometries"),E$A=new e$1U;function W$A(e){if(!e$2b(e._primitive)){if(!e$2b(e._verticesPromise)){var t=e._boxes,i=e._boxBatchIds,n=e._cylinders,r=e._cylinderBatchIds,o=e._ellipsoids,a=e._ellipsoidBatchIds,s=e._spheres,l=e._sphereBatchIds,u=e._batchTableColors,c=e._packedBuffer;if(!e$2b(u)){var h=0;e$2b(e._boxes)&&(t=e._boxes=l$R(t),h+=(i=e._boxBatchIds=l$R(i)).length),e$2b(e._cylinders)&&(n=e._cylinders=l$R(n),h+=(r=e._cylinderBatchIds=l$R(r)).length),e$2b(e._ellipsoids)&&(o=e._ellipsoids=l$R(o),h+=(a=e._ellipsoidBatchIds=l$R(a)).length),e$2b(e._spheres)&&(s=e._sphere=l$R(s),h+=(l=e._sphereBatchIds=l$R(l)).length),u=e._batchTableColors=new Uint32Array(h);for(var d=e._batchTable,f=0;f<h;++f){var p=d.getColor(f,E$A);u[f]=p.toRgba()}c=e._packedBuffer=F$B(e)}var _=[];e$2b(t)&&_.push(t.buffer,i.buffer),e$2b(n)&&_.push(n.buffer,r.buffer),e$2b(o)&&_.push(o.buffer,a.buffer),e$2b(s)&&_.push(s.buffer,l.buffer),_.push(u.buffer,c.buffer);var m={boxes:e$2b(t)?t.buffer:void 0,boxBatchIds:e$2b(t)?i.buffer:void 0,cylinders:e$2b(n)?n.buffer:void 0,cylinderBatchIds:e$2b(n)?r.buffer:void 0,ellipsoids:e$2b(o)?o.buffer:void 0,ellipsoidBatchIds:e$2b(o)?a.buffer:void 0,spheres:e$2b(s)?s.buffer:void 0,sphereBatchIds:e$2b(s)?l.buffer:void 0,batchTableColors:u.buffer,packedBuffer:c.buffer},g=e._verticesPromise=R$q.scheduleTask(m,_);if(!e$2b(g))return;g.then((function(t){var i=new Float64Array(t.packedBuffer),n=M$A(e,i);e._indices=2===n?new Uint16Array(t.indices):new Uint32Array(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._positions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.vertexBatchIds),e._batchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!e$2b(e._primitive)&&(e._primitive=new y$y({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:u$_(e._pickObject,e)}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}function p$w(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._geometries=void 0,this._contentReadyPromise=void 0,this._readyPromise=o$1l.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,Q$v(this,n,r)}function q$z(e){return function(t,i){e$2b(e._geometries)&&e._geometries.updateCommands(t,i)}}function K$v(e,t){var i,n,r,o,a,s=u$_(e.BOXES_LENGTH,0),l=u$_(e.CYLINDERS_LENGTH,0),u=u$_(e.ELLIPSOIDS_LENGTH,0),c=u$_(e.SPHERES_LENGTH,0);if(s>0&&e$2b(e.BOX_BATCH_IDS)){var h=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,h,s)}if(l>0&&e$2b(e.CYLINDER_BATCH_IDS)){var d=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,d,l)}if(u>0&&e$2b(e.ELLIPSOID_BATCH_IDS)){var f=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,f,u)}if(c>0&&e$2b(e.SPHERE_BATCH_IDS)){var p=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,p,c)}var _=e$2b(i)||e$2b(n)||e$2b(r)||e$2b(o),m=s>0&&!e$2b(i)||l>0&&!e$2b(n)||u>0&&!e$2b(r)||c>0&&!e$2b(o);if(_&&m)throw new t$14("If one group of batch ids is defined, then all batch ids must be defined.");if(!(e$2b(i)||e$2b(n)||e$2b(r)||e$2b(o))){var g=0;if(!e$2b(i)&&s>0)for(i=new Uint16Array(s),a=0;a<s;++a)i[a]=g++;if(!e$2b(n)&&l>0)for(n=new Uint16Array(l),a=0;a<l;++a)n[a]=g++;if(!e$2b(r)&&u>0)for(r=new Uint16Array(u),a=0;a<u;++a)r[a]=g++;if(!e$2b(o)&&c>0)for(o=new Uint16Array(c),a=0;a<c;++a)o[a]=g++}return{boxes:i,cylinders:n,ellipsoids:r,spheres:o}}e$H.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},e$H.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},e$H.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},e$H.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},e$H.prototype.update=function(e){W$A(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},e$H.prototype.isDestroyed=function(){return!1},e$H.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$10(this)},Object.defineProperties(p$w.prototype,{featuresLength:{get:function(){return e$2b(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return e$2b(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return e$2b(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return e$2b(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var c$u=Uint32Array.BYTES_PER_ELEMENT;function Q$v(e,t,i){i=u$_(i,0);var n=new Uint8Array(t),r=new DataView(t);i+=c$u;var o=r.getUint32(i,!0);if(1!==o)throw new t$14("Only Geometry tile version 1 is supported. Version "+o+" is not.");i+=c$u;var a=r.getUint32(i,!0);if(i+=c$u,0!==a){var s=r.getUint32(i,!0);if(i+=c$u,0===s)throw new t$14("Feature table must have a byte length greater than zero");var l=r.getUint32(i,!0);i+=c$u;var u=r.getUint32(i,!0);i+=c$u;var c=r.getUint32(i,!0),h=a$K(n,i+=c$u,s),d=JSON.parse(h);i+=s;var f,p,_=new Uint8Array(t,i,l);if(i+=l,u>0){var m=a$K(n,i,u);f=JSON.parse(m),i+=u,c>0&&(p=new Uint8Array(t,i,c),p=new Uint8Array(p))}var g=u$_(d.BOXES_LENGTH,0),x=u$_(d.CYLINDERS_LENGTH,0),v=u$_(d.ELLIPSOIDS_LENGTH,0),y=u$_(d.SPHERES_LENGTH,0),$=g+x+v+y,b=new h$D(e,$,f,p,q$z(e));if(e._batchTable=b,0!==$){var T,C=e.tile.computedTransform;e$2b(d.RTC_CENTER)&&(T=o$1p.unpack(d.RTC_CENTER),p$1d.multiplyByPoint(C,T,T));var S=K$v(d,_);if(g>0||x>0||v>0||y>0){var w,E,P,A;if(g>0){var L=_.byteOffset+d.BOXES.byteOffset;w=new Float32Array(_.buffer,L,e$H.packedBoxLength*g)}if(x>0){var M=_.byteOffset+d.CYLINDERS.byteOffset;E=new Float32Array(_.buffer,M,e$H.packedCylinderLength*x)}if(v>0){var R=_.byteOffset+d.ELLIPSOIDS.byteOffset;P=new Float32Array(_.buffer,R,e$H.packedEllipsoidLength*v)}if(y>0){var O=_.byteOffset+d.SPHERES.byteOffset;A=new Float32Array(_.buffer,O,e$H.packedSphereLength*y)}e._geometries=new e$H({boxes:w,boxBatchIds:S.boxes,cylinders:E,cylinderBatchIds:S.cylinders,ellipsoids:P,ellipsoidBatchIds:S.ellipsoids,spheres:A,sphereBatchIds:S.spheres,center:T,modelMatrix:C,batchTable:b,boundingVolume:e.tile.boundingVolume.boundingVolume})}}}else e._readyPromise.resolve(e)}function x$C(e){var t=e.featuresLength;if(!e$2b(e._features)&&t>0){var i=new Array(t);e$2b(e._geometries)&&e._geometries.createFeatures(e,i),e._features=i}}function e$G(e,t,i){this.primitive=e,this._modelMatrix=p$1d.clone(t),this._instanceId=i}p$w.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},p$w.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2b(e)||e<0||e>=t)throw new t$16("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return x$C(this),this._features[e]},p$w.prototype.applyDebugSettings=function(e,t){e$2b(this._geometries)&&this._geometries.applyDebugSettings(e,t)},p$w.prototype.applyStyle=function(e){x$C(this),e$2b(this._geometries)&&this._geometries.applyStyle(e,this._features)},p$w.prototype.update=function(e,t){if(e$2b(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),e$2b(this._batchTable)&&this._geometries._ready&&this._batchTable.update(e,t),!e$2b(this._contentReadyPromise)){var i=this;this._contentReadyPromise=this._geometries.readyPromise.then((function(){i._readyPromise.resolve(i)}))}},p$w.prototype.isDestroyed=function(){return!1},p$w.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$10(this)},Object.defineProperties(e$G.prototype,{instanceId:{get:function(){return this._instanceId}},model:{get:function(){return this.primitive._model}},modelMatrix:{get:function(){return p$1d.clone(this._modelMatrix)},set:function(e){p$1d.clone(e,this._modelMatrix),this.primitive.expandBoundingSphere(this._modelMatrix),this.primitive._dirty=!0}}});var y$w={NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3};function w$u(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).gltf)&&!e$2b(e.url))throw new t$16("Either options.gltf or options.url is required.");if(e$2b(e.gltf)&&e$2b(e.url))throw new t$16("Cannot pass in both options.gltf and options.url.");this.show=u$_(e.show,!0),this._instancingSupported=!1,this._dynamic=u$_(e.dynamic,!1),this._allowPicking=u$_(e.allowPicking,!0),this._ready=!1,this._readyPromise=o$1l.defer(),this._state=y$w.NEEDS_LOAD,this._dirty=!1,this._cull=u$_(e.cull,!0),this._opaquePass=u$_(e.opaquePass,Le$s.OPAQUE),this._instances=re$n(this,e.instances),this._batchTable=e.batchTable,this._model=void 0,this._vertexBufferTypedArray=void 0,this._vertexBuffer=void 0,this._batchIdBuffer=void 0,this._instancedUniformsByProgram=void 0,this._drawCommands=[],this._modelCommands=void 0,this._boundingSphere=ae$e(this),this._center=o$1p.clone(this._boundingSphere.center),this._rtcTransform=new p$1d,this._rtcModelView=new p$1d,this._mode=void 0,this.modelMatrix=p$1d.clone(p$1d.IDENTITY),this._modelMatrix=p$1d.clone(this.modelMatrix),this._url=t$11.createIfNeeded(e.url),this._requestType=e.requestType,this._gltf=e.gltf,this._basePath=t$11.createIfNeeded(e.basePath),this._asynchronous=e.asynchronous,this._incrementallyLoadTextures=e.incrementallyLoadTextures,this._upAxis=e.upAxis,this._forwardAxis=e.forwardAxis,this.shadows=u$_(e.shadows,W$W.ENABLED),this._shadows=this.shadows,this._pickIdLoaded=e.pickIdLoaded,this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=u$_(e.debugWireframe,!1),this._debugWireframe=!1,this._imageBasedLightingFactor=new o$1o(1,1),o$1o.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=e.luminanceAtZenith,this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps}function re$n(e,t){for(var i=(t=u$_(t,[])).length,n=new Array(i),r=0;r<i;++r){var o=t[r],a=o.modelMatrix,s=u$_(o.batchId,r);n[r]=new e$G(e,a,s)}return n}function ae$e(e){for(var t=e.length,i=new Array(t),n=0;n<t;++n)i[n]=p$1d.getTranslation(e._instances[n]._modelMatrix,new o$1p);return i$1c.fromPoints(i)}Object.defineProperties(w$u.prototype,{allowPicking:{get:function(){return this._allowPicking}},length:{get:function(){return this._instances.length}},activeAnimations:{get:function(){return this._model.activeAnimations}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o$1q.typeOf.object("imageBasedLightingFactor",e),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),o$1o.clone(e,this._imageBasedLightingFactor)}}});var te$h=new o$1p,M$z=new p$1d;function ne$m(e,t,i,n){return function(r,o){var a=r.semantic;if(e$2b(a)&&e.indexOf(a)>-1){if(!(t.indexOf(a)>-1))throw new t$14('Shader program cannot be optimized for instancing. Uniform "'+o+'" in program "'+i+'" uses unsupported semantic "'+a+'"');n[o]=a}}}function F$A(e,t){if(e$2b(e._instancedUniformsByProgram))return e._instancedUniformsByProgram[t];var i={};e._instancedUniformsByProgram=i;var n=["MODEL","MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELINVERSE","MODELVIEWINVERSE","MODELVIEWPROJECTIONINVERSE","MODELINVERSETRANSPOSE","MODELVIEWINVERSETRANSPOSE"],r=["MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELVIEWINVERSETRANSPOSE"],o=e._model._sourceTechniques;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a],l=s.program;if(!e$2b(i[l])){var u={};i[l]=u,e$K.techniqueUniform(s,ne$m(n,r,t,u))}}return i[t]}function ie$i(e){return function(t,i){var n=F$A(e,i),r=e$2b(e._batchTable),o=s$U.replaceMain(t,"czm_instancing_main"),a="",s="";for(var l in n)if(n.hasOwnProperty(l)){var u,c=n[l];"MODELVIEW"===c||"CESIUM_RTC_MODELVIEW"===c?u="czm_instanced_modelView":"MODELVIEWPROJECTION"===c?(u="czm_instanced_modelViewProjection",a+="mat4 czm_instanced_modelViewProjection;\n",s+="czm_instanced_modelViewProjection = czm_projection * czm_instanced_modelView;\n"):"MODELVIEWINVERSETRANSPOSE"===c&&(u="czm_instanced_modelViewInverseTranspose",a+="mat3 czm_instanced_modelViewInverseTranspose;\n",s+="czm_instanced_modelViewInverseTranspose = mat3(czm_instanced_modelView);\n");var h=new RegExp("uniform.*"+l+".*");o=o.replace(h,""),h=new RegExp(l+"\\b","g"),o=o.replace(h,u)}var d,f,p;r?(d="attribute float a_batchId;\n",f="",p=""):(d="",f="attribute vec4 pickColor;\nvarying vec4 v_pickColor;\n",p=" v_pickColor = pickColor;\n");var _="uniform mat4 czm_instanced_modifiedModelView;\nuniform mat4 czm_instanced_nodeTransform;\n"+a+"mat4 czm_instanced_modelView;\nattribute vec4 czm_modelMatrixRow0;\nattribute vec4 czm_modelMatrixRow1;\nattribute vec4 czm_modelMatrixRow2;\n"+d+f+o+"void main()\n{\n mat4 czm_instanced_model = mat4(czm_modelMatrixRow0.x, czm_modelMatrixRow1.x, czm_modelMatrixRow2.x, 0.0, czm_modelMatrixRow0.y, czm_modelMatrixRow1.y, czm_modelMatrixRow2.y, 0.0, czm_modelMatrixRow0.z, czm_modelMatrixRow1.z, czm_modelMatrixRow2.z, 0.0, czm_modelMatrixRow0.w, czm_modelMatrixRow1.w, czm_modelMatrixRow2.w, 1.0);\n czm_instanced_modelView = czm_instanced_modifiedModelView * czm_instanced_model * czm_instanced_nodeTransform;\n"+s+" czm_instancing_main();\n"+p+"}\n";if(r){var m=e._model.gltf,g=s$v.getDiffuseAttributeOrUniform(m,i);_=e._batchTable.getVertexShaderCallback(!0,"a_batchId",g)(_)}return _}}function se$d(e){return function(t,i){var n=e._batchTable;if(e$2b(n)){var r=e._model.gltf,o=s$v.getDiffuseAttributeOrUniform(r,i);t=n.getFragmentShaderCallback(!0,o)(t)}else t="varying vec4 v_pickColor;\n"+t;return t}}function de$e(e,t){return function(){return p$1d.multiply(t.uniformState.view,e._rtcTransform,e._rtcModelView)}}function oe$f(e){return function(){return e.computedMatrix}}function me$f(e,t){return function(i,n,r){(i=l$1g(i)).czm_instanced_modifiedModelView=de$e(e,t),i.czm_instanced_nodeTransform=oe$f(r);var o=F$A(e,n);for(var a in o)o.hasOwnProperty(a)&&delete i[a];return e$2b(e._batchTable)&&(i=e._batchTable.getUniformMapCallback()(i)),i}}function ue$g(e){return function(t,i){if(e$2b(e._batchTable)){var n=e._model.gltf,r=s$v.getDiffuseAttributeOrUniform(n,i);t="uniform float a_batchId\n;"+(t=e._batchTable.getVertexShaderCallback(!0,"a_batchId",r)(t))}return t}}function he$c(e){return function(t,i){var n=e._batchTable;if(e$2b(n)){var r=e._model.gltf,o=s$v.getDiffuseAttributeOrUniform(r,i);t=n.getFragmentShaderCallback(!0,o)(t)}else t="uniform vec4 czm_pickColor;\n"+t;return t}}function fe$c(e){return function(t){return e$2b(e._batchTable)&&(t=e._batchTable.getUniformMapCallback()(t)),t}}function U$v(e){var t=e._instances,i=e.length,n=e._center,r=e._vertexBufferTypedArray;e$2b(r)||(r=new Float32Array(12*i)),e._dynamic&&(e._vertexBufferTypedArray=r);for(var o=0;o<i;++o){var a=t[o]._modelMatrix,s=p$1d.clone(a,M$z);s[12]-=n.x,s[13]-=n.y,s[14]-=n.z;var l=12*o;r[l+0]=s[0],r[l+1]=s[4],r[l+2]=s[8],r[l+3]=s[12],r[l+4]=s[1],r[l+5]=s[5],r[l+6]=s[9],r[l+7]=s[13],r[l+8]=s[2],r[l+9]=s[6],r[l+10]=s[10],r[l+11]=s[14]}return r}function _e$c(e,t){var i,n=e._instances,r=e.length,o=e._dynamic,a=e$2b(e._batchTable);if(a){var s=new Uint16Array(r);for(i=0;i<r;++i)s[i]=n[i]._instanceId;e._batchIdBuffer=t$Y.createVertexBuffer({context:t,typedArray:s,usage:A$19.STATIC_DRAW})}if(!a){var l=new Uint8Array(4*r);for(i=0;i<r;++i){var u=e._pickIds[i].color,c=4*i;l[c]=e$1U.floatToByte(u.red),l[c+1]=e$1U.floatToByte(u.green),l[c+2]=e$1U.floatToByte(u.blue),l[c+3]=e$1U.floatToByte(u.alpha)}e._pickIdBuffer=t$Y.createVertexBuffer({context:t,typedArray:l,usage:A$19.STATIC_DRAW})}var h=U$v(e);e._vertexBuffer=t$Y.createVertexBuffer({context:t,typedArray:h,usage:o?A$19.STREAM_DRAW:A$19.STATIC_DRAW})}function ge$c(e){var t=U$v(e);e._vertexBuffer.copyFromArrayView(t)}function ce$g(e,t){for(var i=e._instances,n=i.length,r=new Array(n),o=0;o<n;++o)r[o]=t.createPickId(i[o]);return r}function ve$c(e,t){var i=e._instancingSupported,n=e$2b(e._batchTable),r=e._allowPicking,o={url:e._url,requestType:e._requestType,gltf:e._gltf,basePath:e._basePath,shadows:e._shadows,cacheKey:void 0,asynchronous:e._asynchronous,allowPicking:r,incrementallyLoadTextures:e._incrementallyLoadTextures,upAxis:e._upAxis,forwardAxis:e._forwardAxis,precreatedAttributes:void 0,vertexShaderLoaded:void 0,fragmentShaderLoaded:void 0,uniformMapLoaded:void 0,pickIdLoaded:e._pickIdLoaded,ignoreCommands:!0,opaquePass:e._opaquePass,imageBasedLightingFactor:e.imageBasedLightingFactor,lightColor:e.lightColor,luminanceAtZenith:e.luminanceAtZenith,sphericalHarmonicCoefficients:e.sphericalHarmonicCoefficients,specularEnvironmentMaps:e.specularEnvironmentMaps};if(n||(e._pickIds=ce$g(e,t)),i){_e$c(e,t);var a=S$12.getSizeInBytes(S$12.FLOAT),s={czm_modelMatrixRow0:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:12*a,instanceDivisor:1},czm_modelMatrixRow1:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:4*a,strideInBytes:12*a,instanceDivisor:1},czm_modelMatrixRow2:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:8*a,strideInBytes:12*a,instanceDivisor:1}};n&&(s.a_batchId={index:0,vertexBuffer:e._batchIdBuffer,componentsPerAttribute:1,componentDatatype:S$12.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),n||(s.pickColor={index:0,vertexBuffer:e._pickIdBuffer,componentsPerAttribute:4,componentDatatype:S$12.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),o.precreatedAttributes=s,o.vertexShaderLoaded=ie$i(e),o.fragmentShaderLoaded=se$d(e),o.uniformMapLoaded=me$f(e,t),e$2b(e._url)&&(o.cacheKey=e._url.getUrlComponent()+"#instanced")}else o.vertexShaderLoaded=ue$g(e),o.fragmentShaderLoaded=he$c(e),o.uniformMapLoaded=fe$c(e);e$2b(e._url)?e._model=F$C.fromGltf(o):e._model=new F$C(o)}function pe$f(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?W$18.LINES:W$18.TRIANGLES,i=e._drawCommands,n=i.length,r=0;r<n;++r)i[r].primitiveType=t}}function le$j(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e._drawCommands,i=t.length,n=0;n<i;++n)t[n].debugShowBoundingVolume=e.debugShowBoundingVolume}}function be$e(e,t){for(var i=t.length,n=e.length,r=e._boundingSphere,o=e._cull,a=0;a<i;++a){var s=i$_.shallowClone(t[a]);s.instanceCount=n,s.boundingVolume=r,s.cull=o,e$2b(e._batchTable)?s.pickId=e._batchTable.getPickId():s.pickId="v_pickColor",e._drawCommands.push(s)}}function ye$a(e){return function(){return e}}function we$a(e){return function(){return e}}function Ee$d(e,t){for(var i=e._instances,n=t.length,r=e.length,o=e$2b(e._batchTable),a=e._cull,s=0;s<n;++s)for(var l=0;l<r;++l){var u=i$_.shallowClone(t[s]);if(u.modelMatrix=new p$1d,u.boundingVolume=new i$1c,u.cull=a,u.uniformMap=l$1g(u.uniformMap),o)u.uniformMap.a_batchId=ye$a(i[l]._instanceId);else{var c=e._pickIds[l];u.uniformMap.czm_pickColor=we$a(c.color)}e._drawCommands.push(u)}}function W$z(e){for(var t=e._modelCommands,i=t.length,n=e.length,r=e._rtcTransform,o=e._center,a=0;a<i;++a)for(var s=t[a],l=0;l<n;++l){var u=a*n+l,c=e._drawCommands[u],h=p$1d.clone(e._instances[l]._modelMatrix,M$z);h[12]-=o.x,h[13]-=o.y,h[14]-=o.z,h=p$1d.multiply(r,h,M$z);var d=s.modelMatrix,f=c.modelMatrix;p$1d.multiply(h,d,f);var p=s.boundingVolume,_=c.boundingVolume;i$1c.transform(p,h,_)}}function q$y(e){for(var t=e._nodeCommands,i=t.length,n=[],r=0;r<i;++r){var o=t[r];o.show&&n.push(o.command)}return n}function Te$b(e){for(var t=e._nodeCommands,i=t.length,n=0;n<i;n++){if(t[n].command.dirty)return!0}return!1}function H$D(e,t){e._drawCommands=[];var i=q$y(e._model);t?be$e(e,i):(Ee$d(e,i),W$z(e))}function Ie$a(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=W$W.castShadows(e.shadows),i=W$W.receiveShadows(e.shadows),n=e._drawCommands,r=n.length,o=0;o<r;++o){var a=n[o];a.castShadows=t,a.receiveShadows=i}}}function u$z(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._modelInstanceCollection=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,Se$8(this,n,r)}function Ne$9(e){return function(){return e._batchTable.getPickId()}}w$u.prototype.expandBoundingSphere=function(e){var t=p$1d.getTranslation(e,te$h);i$1c.expand(this._boundingSphere,t,this._boundingSphere)},w$u.prototype.update=function(e){if(e.mode!==C$13.MORPHING&&this.show&&0!==this.length){var t=e.context;if(this._state===y$w.NEEDS_LOAD){this._state=y$w.LOADING,this._instancingSupported=t.instancedArrays,ve$c(this,t);var i=this;this._model.readyPromise.otherwise((function(e){i._state=y$w.FAILED,i._readyPromise.reject(e)}))}var n=this._instancingSupported,r=this._model;if(r.imageBasedLightingFactor=this.imageBasedLightingFactor,r.lightColor=this.lightColor,r.luminanceAtZenith=this.luminanceAtZenith,r.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,r.specularEnvironmentMaps=this.specularEnvironmentMaps,r.update(e),r.ready&&this._state===y$w.LOADING){this._state=y$w.LOADED,this._ready=!0;var o=r.boundingSphere.radius+o$1p.magnitude(r.boundingSphere.center);return this._boundingSphere.radius+=o,this._modelCommands=q$y(r),H$D(this,n),void this._readyPromise.resolve(this)}if(this._state===y$w.LOADED){var a=e.mode!==this._mode,s=this.modelMatrix,l=!p$1d.equals(this._modelMatrix,s);if(a||l){this._mode=e.mode,p$1d.clone(s,this._modelMatrix);var u=p$1d.multiplyByTranslation(this._modelMatrix,this._center,this._rtcTransform);this._mode!==C$13.SCENE3D&&(u=m$17.basisTo2D(e.mapProjection,u,u)),p$1d.getTranslation(u,this._boundingSphere.center)}n&&this._dirty&&(this._dynamic=!0,this._dirty=!1,ge$c(this)),Te$b(r)&&H$D(this,n),!n&&(r.dirty||this._dirty||a||l)&&W$z(this),Ie$a(this),pe$f(this),le$j(this);var c=e.passes;if(c.render||c.pick)for(var h=e.commandList,d=this._drawCommands,f=d.length,p=0;p<f;++p)h.push(d[p])}}},w$u.prototype.isDestroyed=function(){return!1},w$u.prototype.destroy=function(){this._model=this._model&&this._model.destroy();var e=this._pickIds;if(e$2b(e))for(var t=e.length,i=0;i<t;++i)e[i].destroy();return i$10(this)},u$z._deprecationWarning=t$12,Object.defineProperties(u$z.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){var e=this._modelInstanceCollection._model;return e$2b(e)?e.trianglesLength:0}},geometryByteLength:{get:function(){var e=this._modelInstanceCollection._model;return e$2b(e)?e.geometryByteLength:0}},texturesByteLength:{get:function(){var e=this._modelInstanceCollection._model;return e$2b(e)?e.texturesByteLength:0}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._modelInstanceCollection.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var g$F=Uint32Array.BYTES_PER_ELEMENT,L$A=new Array(4),ie$h=new Array(4);function Se$8(e,t,i){var n=u$_(i,0);i=n;var r=new Uint8Array(t),o=new DataView(t);i+=g$F;var a=o.getUint32(i,!0);if(1!==a)throw new t$14("Only Instanced 3D Model version 1 is supported. Version "+a+" is not.");i+=g$F;var s=o.getUint32(i,!0);i+=g$F;var l=o.getUint32(i,!0);if(0===l)throw new t$14("featureTableJsonByteLength is zero, the feature table must be defined.");i+=g$F;var u=o.getUint32(i,!0);i+=g$F;var c=o.getUint32(i,!0);i+=g$F;var h=o.getUint32(i,!0);i+=g$F;var d=o.getUint32(i,!0);if(1!==d&&0!==d)throw new t$14("Only glTF format 0 (uri) or 1 (embedded) are supported. Format "+d+" is not.");var f=a$K(r,i+=g$F,l),p=JSON.parse(f);i+=l;var _=new Uint8Array(t,i,u);i+=u;var m,g,x=new o$B(p,_),v=x.getGlobalProperty("INSTANCES_LENGTH");if(x.featuresLength=v,!e$2b(v))throw new t$14("Feature table global property: INSTANCES_LENGTH must be defined");if(c>0){var y=a$K(r,i,c);m=JSON.parse(y),i+=c,h>0&&(g=new Uint8Array(t,i,h),g=new Uint8Array(g),i+=h)}e._batchTable=new h$D(e,v,m,g);var $,b=n+s-i;if(0===b)throw new t$14("glTF byte length is zero, i3dm must have a glTF to instance.");i%4==0?$=new Uint8Array(t,i,b):(u$z._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),$=new Uint8Array(r.subarray(i,i+b)));var T=e._tileset,C={instances:new Array(v),batchTable:e._batchTable,cull:!1,url:void 0,requestType:V$15.TILES3D,gltf:void 0,basePath:void 0,incrementallyLoadTextures:!1,upAxis:T._gltfUpAxis,forwardAxis:v$y.X,opaquePass:Le$s.CESIUM_3D_TILE,pickIdLoaded:Ne$9(e),imageBasedLightingFactor:T.imageBasedLightingFactor,lightColor:T.lightColor,luminanceAtZenith:T.luminanceAtZenith,sphericalHarmonicCoefficients:T.sphericalHarmonicCoefficients,specularEnvironmentMaps:T.specularEnvironmentMaps};if(0===d){var S=a$K($);S=S.replace(/[\s\0]+$/,""),C.url=e._resource.getDerivedResource({url:S})}else C.gltf=$,C.basePath=e._resource.clone();var w,E=x.getGlobalProperty("EAST_NORTH_UP"),P=x.getGlobalProperty("RTC_CENTER",S$12.FLOAT,3);e$2b(P)&&(w=o$1p.unpack(P));for(var A=C.instances,L=new o$1p,M=new Array(3),R=new o$1p,O=new o$1p,I=new o$1p,D=new p$1e,B=new n$13,N=new o$1p,F=new e$1X,U=new p$1d,G=0;G<v;G++){var z=x.getProperty("POSITION",S$12.FLOAT,3,G,L$A);if(!e$2b(z)){z=M;var V=x.getProperty("POSITION_QUANTIZED",S$12.UNSIGNED_SHORT,3,G,L$A);if(!e$2b(V))throw new t$14("Either POSITION or POSITION_QUANTIZED must be defined for each instance.");var k=x.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",S$12.FLOAT,3);if(!e$2b(k))throw new t$14("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");var W=x.getGlobalProperty("QUANTIZED_VOLUME_SCALE",S$12.FLOAT,3);if(!e$2b(W))throw new t$14("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");for(var H=0;H<3;H++)z[H]=V[H]/65535*W[H]+k[H]}o$1p.unpack(z,0,L),e$2b(w)&&o$1p.add(L,w,L),F.translation=L;var q=x.getProperty("NORMAL_UP",S$12.FLOAT,3,G,L$A),j=x.getProperty("NORMAL_RIGHT",S$12.FLOAT,3,G,ie$h),Y=!1;if(e$2b(q)){if(!e$2b(j))throw new t$14("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");o$1p.unpack(q,0,O),o$1p.unpack(j,0,R),Y=!0}else{var X=x.getProperty("NORMAL_UP_OCT32P",S$12.UNSIGNED_SHORT,2,G,L$A),K=x.getProperty("NORMAL_RIGHT_OCT32P",S$12.UNSIGNED_SHORT,2,G,ie$h);if(e$2b(X)){if(!e$2b(K))throw new t$14("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");t$10.octDecodeInRange(X[0],X[1],65535,O),t$10.octDecodeInRange(K[0],K[1],65535,R),Y=!0}else E?(m$17.eastNorthUpToFixedFrame(L,t$13.WGS84,U),p$1d.getMatrix3(U,D)):p$1e.clone(p$1e.IDENTITY,D)}Y&&(o$1p.cross(R,O,I),o$1p.normalize(I,I),p$1e.setColumn(D,0,R,D),p$1e.setColumn(D,1,O,D),p$1e.setColumn(D,2,I,D)),n$13.fromRotationMatrix(D,B),F.rotation=B,N=o$1p.fromElements(1,1,1,N);var Q=x.getProperty("SCALE",S$12.FLOAT,1,G);e$2b(Q)&&o$1p.multiplyByScalar(N,Q,N);var Z=x.getProperty("SCALE_NON_UNIFORM",S$12.FLOAT,3,G,L$A);e$2b(Z)&&(N.x*=Z[0],N.y*=Z[1],N.z*=Z[2]),F.scale=N;var J=x.getProperty("BATCH_ID",S$12.UNSIGNED_SHORT,1,G);e$2b(J)||(J=G),p$1d.fromTranslationRotationScale(F,U);var ee=U.clone();A[G]={modelMatrix:ee,batchId:J}}e._modelInstanceCollection=new w$u(C)}function Ue$a(e){var t=e.featuresLength;if(!e$2b(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$L(e,n);e._features=i}}u$z.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},u$z.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2b(e)||e<0||e>=t)throw new t$16("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return Ue$a(this),this._features[e]},u$z.prototype.applyDebugSettings=function(e,t){t=e?t:e$1U.WHITE,this._batchTable.setAllColor(t)},u$z.prototype.applyStyle=function(e){this._batchTable.applyStyle(e)},u$z.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._modelInstanceCollection.modelMatrix=this._tile.computedTransform,this._modelInstanceCollection.shadows=this._tileset.shadows,this._modelInstanceCollection.lightColor=this._tileset.lightColor,this._modelInstanceCollection.luminanceAtZenith=this._tileset.luminanceAtZenith,this._modelInstanceCollection.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._modelInstanceCollection.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._modelInstanceCollection.debugWireframe=this._tileset.debugWireframe;var n=this._modelInstanceCollection._model;if(e$2b(n)){var r=this._tileset.clippingPlanes;n.clippingPlanesOriginMatrix=this._tileset.clippingPlanesOriginMatrix,e$2b(r)&&this._tile.clippingPlanesDirty&&(n._clippingPlanes=r.enabled&&this._tile._isClipped?r:void 0),e$2b(r)&&e$2b(n._clippingPlanes)&&n._clippingPlanes!==r&&(n._clippingPlanes=r)}this._modelInstanceCollection.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&this._batchTable.addDerivedCommands(t,i,!1)},u$z.prototype.isDestroyed=function(){return!1},u$z.prototype.destroy=function(){return this._modelInstanceCollection=this._modelInstanceCollection&&this._modelInstanceCollection.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$10(this)};var e$F={ADD:0,REPLACE:1},f$D=Object.freeze(e$F),K$u={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function ie$g(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.arrayBuffer",e.arrayBuffer),this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=e$1U.clone(e$1U.DARKGRAY),this._highlightColor=e$1U.clone(e$1U.WHITE),this._pointSize=1,this._rtcCenter=void 0,this._quantizedVolumeScale=void 0,this._quantizedVolumeOffset=void 0,this._styleableShaderAttributes=void 0,this._isQuantized=!1,this._isOctEncoded16P=!1,this._isRGB565=!1,this._hasColors=!1,this._hasNormals=!1,this._hasBatchIds=!1,this._decodingState=K$u.READY,this._dequantizeInShader=!0,this._isQuantizedDraco=!1,this._isOctEncodedDraco=!1,this._quantizedRange=0,this._octEncodedRange=0,this.backFaceCulling=!1,this._backFaceCulling=!1,this.normalShading=!0,this._normalShading=!0,this._opaqueRenderState=void 0,this._translucentRenderState=void 0,this._mode=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._pointsLength=0,this._geometryByteLength=0,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._batchTableLoaded=e.batchTableLoaded,this._pickIdLoaded=e.pickIdLoaded,this._opaquePass=u$_(e.opaquePass,Le$s.OPAQUE),this._cull=u$_(e.cull,!0),this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=p$1d.clone(p$1d.IDENTITY),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.time=0,this.shadows=W$W.ENABLED,this._boundingSphere=void 0,this.clippingPlanes=void 0,this.isClipped=!1,this.clippingPlanesDirty=!1,this.clippingPlanesOriginMatrix=void 0,this.attenuation=!1,this._attenuation=!1,this.geometricError=0,this.geometricErrorScale=1,this.maximumAttenuation=this._pointSize,We$9(this,e)}Object.defineProperties(ie$g.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},color:{get:function(){return e$1U.clone(this._highlightColor)},set:function(e){this._highlightColor=e$1U.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(e$2b(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=i$1c.clone(e,this._boundingSphere)}}});var X$q=Uint32Array.BYTES_PER_ELEMENT;function We$9(e,t){var i=t.arrayBuffer,n=u$_(t.byteOffset,0),r=new Uint8Array(i),o=new DataView(i);n+=X$q;var a=o.getUint32(n,!0);if(1!==a)throw new t$14("Only Point Cloud tile version 1 is supported. Version "+a+" is not.");n+=X$q,n+=X$q;var s=o.getUint32(n,!0);if(0===s)throw new t$14("Feature table must have a byte length greater than zero");n+=X$q;var l=o.getUint32(n,!0);n+=X$q;var u=o.getUint32(n,!0);n+=X$q;var c=o.getUint32(n,!0),h=a$K(r,n+=X$q,s),d=JSON.parse(h);n+=s;var f,p,_=new Uint8Array(i,n,l);if(n+=l,u>0){var m=a$K(r,n,u);f=JSON.parse(m),n+=u,c>0&&(p=new Uint8Array(i,n,c),n+=c)}var g=new o$B(d,_),x=g.getGlobalProperty("POINTS_LENGTH");if(g.featuresLength=x,!e$2b(x))throw new t$14("Feature table global property: POINTS_LENGTH must be defined");var v=g.getGlobalProperty("RTC_CENTER",S$12.FLOAT,3);e$2b(v)&&(e._rtcCenter=o$1p.unpack(v));var y,$,b,T,C,S,w,E,P,A=!1,L=!1,M=!1,R=!1,O=!1,I=!1,D=!1,B=!1,N=e$2b(d.extensions)?d.extensions["3DTILES_draco_point_compression"]:void 0,F=e$2b(f)&&e$2b(f.extensions)?f.extensions["3DTILES_draco_point_compression"]:void 0;if(e$2b(F)&&(w=F.properties),e$2b(N)){S=N.properties;var U=N.byteOffset,G=N.byteLength;if(!e$2b(S)||!e$2b(U)||!e$2b(G))throw new t$14("Draco properties, byteOffset, and byteLength must be defined");C=l$R(_,U,U+G),A=e$2b(S.POSITION),L=e$2b(S.RGB)||e$2b(S.RGBA),M=e$2b(S.NORMAL),R=e$2b(S.BATCH_ID),I=e$2b(S.RGBA),e._decodingState=K$u.NEEDS_DECODE}if(e$2b(C)&&(E={buffer:C,featureTableProperties:S,batchTableProperties:w,properties:p$19(S,w),dequantizeInShader:e._dequantizeInShader}),!A)if(e$2b(d.POSITION))y=g.getPropertyArray("POSITION",S$12.FLOAT,3),A=!0;else if(e$2b(d.POSITION_QUANTIZED)){y=g.getPropertyArray("POSITION_QUANTIZED",S$12.UNSIGNED_SHORT,3),O=!0,A=!0;var z=g.getGlobalProperty("QUANTIZED_VOLUME_SCALE",S$12.FLOAT,3);if(!e$2b(z))throw new t$14("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");e._quantizedVolumeScale=o$1p.unpack(z),e._quantizedRange=65535;var V=g.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",S$12.FLOAT,3);if(!e$2b(V))throw new t$14("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");e._quantizedVolumeOffset=o$1p.unpack(V)}if(L||(e$2b(d.RGBA)?($=g.getPropertyArray("RGBA",S$12.UNSIGNED_BYTE,4),I=!0,L=!0):e$2b(d.RGB)?($=g.getPropertyArray("RGB",S$12.UNSIGNED_BYTE,3),L=!0):e$2b(d.RGB565)&&($=g.getPropertyArray("RGB565",S$12.UNSIGNED_SHORT,1),D=!0,L=!0)),M||(e$2b(d.NORMAL)?(b=g.getPropertyArray("NORMAL",S$12.FLOAT,3),M=!0):e$2b(d.NORMAL_OCT16P)&&(b=g.getPropertyArray("NORMAL_OCT16P",S$12.UNSIGNED_BYTE,2),B=!0,M=!0)),R||e$2b(d.BATCH_ID)&&(T=g.getPropertyArray("BATCH_ID",S$12.UNSIGNED_SHORT,1),R=!0),!A)throw new t$14("Either POSITION or POSITION_QUANTIZED must be defined.");if(e$2b(d.CONSTANT_RGBA)){var k=g.getGlobalProperty("CONSTANT_RGBA",S$12.UNSIGNED_BYTE,4);e._constantColor=e$1U.fromBytes(k[0],k[1],k[2],k[3],e._constantColor)}if(R){var W=g.getGlobalProperty("BATCH_LENGTH");if(!e$2b(W))throw new t$14("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");e$2b(p)&&(p=new Uint8Array(p)),e$2b(e._batchTableLoaded)&&e._batchTableLoaded(W,f,p)}!R&&e$2b(p)&&(P=h$D.getBinaryProperties(x,f,p)),e._parsedContent={positions:y,colors:$,normals:b,batchIds:T,styleableProperties:P,draco:E},e._pointsLength=x,e._isQuantized=O,e._isOctEncoded16P=B,e._isRGB565=D,e._isTranslucent=I,e._hasColors=L,e._hasNormals=M,e._hasBatchIds=R}var je$9=new o$1p,Je$4=new o$1p,Ke$6=new o$1p,le$i;function Xe$7(e){if(!e$2b(le$i)){e$2a.setRandomNumberSeed(0),le$i=new Array(e);for(var t=0;t<e;++t)le$i[t]=e$2a.nextRandomNumber()}return le$i}function $e$5(e){for(var t=e.length/3,i=Math.min(t,20),n=Xe$7(20),r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=o$1p.fromElements(r,r,r,je$9),s=o$1p.fromElements(o,o,o,Je$4),l=0;l<i;++l){var u=Math.floor(n[l]*t),c=o$1p.unpack(e,3*u,Ke$6);o$1p.minimumByComponent(a,c,a),o$1p.maximumByComponent(s,c,s)}var h=i$1c.fromCornerPoints(a,s);return h.radius+=e$2a.EPSILON2,h}function Ne$8(e,t){var i=S$12.fromTypedArray(e);return i===S$12.INT||i===S$12.UNSIGNED_INT||i===S$12.DOUBLE?(e$1$("Cast pnts property to floats",'Point cloud property "'+t+'" will be casted to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.'),new Float32Array(e)):e}var er$3=new e$29,rr$4=new e$29,tr$2=new e$1U,Be$c=0,fe$b=1,_e$b=2,ze$a=3,ar$2=4,ue$f=new p$1d;function ir$2(e,t){var i,n,r=t.context,o=e._parsedContent,a=e._pointsLength,s=o.positions,l=o.colors,u=o.normals,c=o.batchIds,h=o.styleableProperties,d=e$2b(h),f=e._isQuantized,p=e._isQuantizedDraco,_=e._isOctEncoded16P,m=e._isOctEncodedDraco,g=e._quantizedRange,x=e._octEncodedRange,v=e._isRGB565,y=e._isTranslucent,$=e._hasColors,b=e._hasNormals,T=e._hasBatchIds,C=[],S={};if(e._styleableShaderAttributes=S,d){var w=ar$2;for(var E in h)if(h.hasOwnProperty(E)){var P=h[E],A=Ne$8(P.typedArray,E);i=P.componentCount,n=S$12.fromTypedArray(A);var L=t$Y.createVertexBuffer({context:r,typedArray:A,usage:A$19.STATIC_DRAW});e._geometryByteLength+=L.sizeInBytes;var M={index:w,vertexBuffer:L,componentsPerAttribute:i,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0};C.push(M),S[E]={location:w,componentCount:i},++w}}var R,O,I,D=t$Y.createVertexBuffer({context:r,typedArray:s,usage:A$19.STATIC_DRAW});e._geometryByteLength+=D.sizeInBytes,$&&(R=t$Y.createVertexBuffer({context:r,typedArray:l,usage:A$19.STATIC_DRAW}),e._geometryByteLength+=R.sizeInBytes),b&&(O=t$Y.createVertexBuffer({context:r,typedArray:u,usage:A$19.STATIC_DRAW}),e._geometryByteLength+=O.sizeInBytes),T&&(c=Ne$8(c,"batchIds"),I=t$Y.createVertexBuffer({context:r,typedArray:c,usage:A$19.STATIC_DRAW}),e._geometryByteLength+=I.sizeInBytes);var B=[];if(n=f?S$12.UNSIGNED_SHORT:p?g<=255?S$12.UNSIGNED_BYTE:S$12.UNSIGNED_SHORT:S$12.FLOAT,B.push({index:Be$c,vertexBuffer:D,componentsPerAttribute:3,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(e._boundingSphere=f||p?i$1c.fromCornerPoints(o$1p.ZERO,e._quantizedVolumeScale):$e$5(s)),$)if(v)B.push({index:fe$b,vertexBuffer:R,componentsPerAttribute:1,componentDatatype:S$12.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{var N=y?4:3;B.push({index:fe$b,vertexBuffer:R,componentsPerAttribute:N,componentDatatype:S$12.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}b&&(_?(i=2,n=S$12.UNSIGNED_BYTE):m?(i=2,n=x<=255?S$12.UNSIGNED_BYTE:S$12.UNSIGNED_SHORT):(i=3,n=S$12.FLOAT),B.push({index:_e$b,vertexBuffer:O,componentsPerAttribute:i,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0})),T&&B.push({index:ze$a,vertexBuffer:I,componentsPerAttribute:1,componentDatatype:S$12.fromTypedArray(c),normalize:!1,offsetInBytes:0,strideInBytes:0}),d&&(B=B.concat(C));var F=new c$12({context:r,attributes:B}),U={depthTest:{enabled:!0}};e._opaquePass===Le$s.CESIUM_3D_TILE&&(U.stencilTest=u$N.setCesium3DTileBit(),U.stencilMask=u$N.CESIUM_3D_TILE_MASK),e._opaqueRenderState=d$1m.fromCache(U),e._translucentRenderState=d$1m.fromCache({depthTest:{enabled:!0},depthMask:!1,blending:Ee$r.ALPHA_BLEND}),e._drawCommand=new i$_({boundingVolume:new i$1c,cull:e._cull,modelMatrix:new p$1d,primitiveType:W$18.POINTS,vertexArray:F,count:a,shaderProgram:void 0,uniformMap:void 0,renderState:y?e._translucentRenderState:e._opaqueRenderState,pass:y?Le$s.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function nr$2(e,t){var i=t.context,n=e._isQuantized,r=e._isQuantizedDraco,o=e._isOctEncodedDraco,a={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){var n=er$3;if(n.x=e._attenuation?e.maximumAttenuation:e._pointSize,n.x*=t.pixelRatio,n.y=e.time,e._attenuation){var r,o=t.camera.frustum;r=t.mode===C$13.SCENE2D||o instanceof a$V?Number.POSITIVE_INFINITY:i.drawingBufferHeight/t.camera.frustum.sseDenominator,n.z=e.geometricError*e.geometricErrorScale,n.w=r}return n},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){var t=e.clippingPlanes;return e.isClipped?t.texture:i.defaultTexture},u_clippingPlanesEdgeStyle:function(){var t=e.clippingPlanes;if(!e$2b(t))return e$1U.TRANSPARENT;var i=e$1U.clone(t.edgeColor,tr$2);return i.alpha=t.edgeWidth,i},u_clippingPlanesMatrix:function(){var t=e.clippingPlanes;if(!e$2b(t))return p$1d.IDENTITY;var n=u$_(e.clippingPlanesOriginMatrix,e._modelMatrix);return p$1d.multiply(i.uniformState.view3D,n,ue$f),p$1d.multiply(ue$f,t.modelMatrix,ue$f)}};(n||r||o)&&(a=p$19(a,{u_quantizedVolumeScaleAndOctEncodedRange:function(){var t=rr$4;if(e$2b(e._quantizedVolumeScale)){var i=o$1p.clone(e._quantizedVolumeScale,t);o$1p.divideByScalar(i,e._quantizedRange,t)}return t.w=e._octEncodedRange,t}})),e$2b(e._uniformMapLoaded)&&(a=e._uniformMapLoaded(a)),e._drawCommand.uniformMap=a}var ve$b=["POSITION","COLOR","NORMAL","POSITION_ABSOLUTE"];function ge$b(e,t){for(var i=/czm_tiles3d_style_(\w+)/g,n=i.exec(e);null!==n;){var r=n[1];-1===t.indexOf(r)&&t.push(r),n=i.exec(e)}}function pe$e(e,t){for(var i=e.numberOfAttributes,n=0;n<i;++n){var r=e.getAttribute(n);if(r.index===t)return r}}function ye$9(e){for(var t=ve$b.length,i=0;i<t;++i){var n=ve$b[i],r="czm_tiles3d_style_"+n,o=n.toLowerCase();e=e.replace(new RegExp(r+"(\\W)","g"),o+"$1")}return e.replace("()","(vec3 position, vec3 position_absolute, vec4 color, vec3 normal)")}function or$1(e,t,i){var n,r,o,a,s,l,u=t.context,c=e$2b(i),h=e._isQuantized,d=e._isQuantizedDraco,f=e._isOctEncoded16P,p=e._isOctEncodedDraco,_=e._isRGB565,m=e._isTranslucent,g=e._hasColors,x=e._hasNormals,v=e._hasBatchIds,y=e._backFaceCulling,$=e._normalShading,b=e._drawCommand.vertexArray,T=e.clippingPlanes,C=e._attenuation,S=m;if(c){var w={translucent:!1};a=i.getColorShaderFunction("getColorFromStyle","czm_tiles3d_style_",w),s=i.getShowShaderFunction("getShowFromStyle","czm_tiles3d_style_",w),l=i.getPointSizeShaderFunction("getPointSizeFromStyle","czm_tiles3d_style_",w),e$2b(a)&&w.translucent&&(S=!0)}e._styleTranslucent=S;var E=e$2b(a),P=e$2b(s),A=e$2b(l),L=e.isClipped,M=[];E&&(ge$b(a,M),a=ye$9(a)),P&&(ge$b(s,M),s=ye$9(s)),A&&(ge$b(l,M),l=ye$9(l));var R=M.indexOf("COLOR")>=0,O=M.indexOf("NORMAL")>=0,I=M.filter((function(e){return-1===ve$b.indexOf(e)}));if(O&&!x)throw new t$14("Style references the NORMAL semantic but the point cloud does not have normals");var D=e._styleableShaderAttributes;for(r in D)if(D.hasOwnProperty(r)){o=D[r];var B=I.indexOf(r)>=0;pe$e(b,o.location).enabled=B}var N=g&&(!E||R);g&&(pe$e(b,fe$b).enabled=N);var F=x&&($||y||O);x&&(pe$e(b,_e$b).enabled=F);var U={a_position:Be$c};N&&(U.a_color=fe$b),F&&(U.a_normal=_e$b),v&&(U.a_batchId=ze$a);var G="",z=I.length;for(n=0;n<z;++n){if(!e$2b(o=D[r=I[n]]))throw new t$14('Style references a property "'+r+'" that does not exist or is not styleable.');var V=o.componentCount,k="czm_tiles3d_style_"+r;G+="attribute "+(1===V?"float":"vec"+V)+" "+k+"; \n",U[k]=o.location}nr$2(e,t);var W="attribute vec3 a_position; \nvarying vec4 v_color; \nuniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier; \nuniform vec4 u_constantColor; \nuniform vec4 u_highlightColor; \n";W+="float u_pointSize; \nfloat u_time; \n",C&&(W+="float u_geometricError; \nfloat u_depthMultiplier; \n"),W+=G,N&&(W+=m?"attribute vec4 a_color; \n":_?"attribute float a_color; \nconst float SHIFT_RIGHT_11 = 1.0 / 2048.0; \nconst float SHIFT_RIGHT_5 = 1.0 / 32.0; \nconst float SHIFT_LEFT_11 = 2048.0; \nconst float SHIFT_LEFT_5 = 32.0; \nconst float NORMALIZE_6 = 1.0 / 64.0; \nconst float NORMALIZE_5 = 1.0 / 32.0; \n":"attribute vec3 a_color; \n"),F&&(W+=f||p?"attribute vec2 a_normal; \n":"attribute vec3 a_normal; \n"),v&&(W+="attribute float a_batchId; \n"),(h||d||p)&&(W+="uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange; \n"),E&&(W+=a),P&&(W+=s),A&&(W+=l),W+="void main() \n{ \n u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x; \n u_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y; \n",C&&(W+=" u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z; \n u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w; \n"),W+=N?m?" vec4 color = a_color; \n":_?" float compressed = a_color; \n float r = floor(compressed * SHIFT_RIGHT_11); \n compressed -= r * SHIFT_LEFT_11; \n float g = floor(compressed * SHIFT_RIGHT_5); \n compressed -= g * SHIFT_LEFT_5; \n float b = compressed; \n vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5); \n vec4 color = vec4(rgb, 1.0); \n":" vec4 color = vec4(a_color, 1.0); \n":" vec4 color = u_constantColor; \n",W+=h||d?" vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz; \n":" vec3 position = a_position; \n",W+=" vec3 position_absolute = vec3(czm_model * vec4(position, 1.0)); \n",F?(W+=f?" vec3 normal = czm_octDecode(a_normal); \n":p?" vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy; \n":" vec3 normal = a_normal; \n",W+=" vec3 normalEC = czm_normal * normal; \n"):W+=" vec3 normal = vec3(1.0); \n",E&&(W+=" color = getColorFromStyle(position, position_absolute, color, normal); \n"),P&&(W+=" float show = float(getShowFromStyle(position, position_absolute, color, normal)); \n"),W+=A?" gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio; \n":C?" vec4 positionEC = czm_modelView * vec4(position, 1.0); \n float depth = -positionEC.z; \n gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize); \n":" gl_PointSize = u_pointSize; \n",W+=" color = color * u_highlightColor; \n",F&&$&&(W+=" float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); \n diffuseStrength = max(diffuseStrength, 0.4); \n color.xyz *= diffuseStrength * czm_lightColor; \n"),W+=" v_color = color; \n gl_Position = czm_modelViewProjection * vec4(position, 1.0); \n",F&&y&&(W+=" float visible = step(-normalEC.z, 0.0); \n gl_Position *= visible; \n gl_PointSize *= visible; \n"),P&&(W+=" gl_Position.w *= float(show); \n gl_PointSize *= float(show); \n"),W+="} \n";var H="varying vec4 v_color; \n";L&&(H+="uniform sampler2D u_clippingPlanes; \nuniform mat4 u_clippingPlanesMatrix; \nuniform vec4 u_clippingPlanesEdgeStyle; \n",H+="\n",H+=f$G(T,u),H+="\n"),H+="void main() \n{ \n gl_FragColor = czm_gammaCorrect(v_color); \n",L&&(H+=p$x("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),H+="} \n",e$2b(e._vertexShaderLoaded)&&(W=e._vertexShaderLoaded(W)),e$2b(e._fragmentShaderLoaded)&&(H=e._fragmentShaderLoaded(H));var q=e._drawCommand;e$2b(q.shaderProgram)&&q.shaderProgram.destroy(),q.shaderProgram=r$13.fromCache({context:u,vertexShaderSource:W,fragmentShaderSource:H,attributeLocations:U});try{q.shaderProgram._bind()}catch{throw new t$14("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function sr$2(e,t){if(e._decodingState===K$u.READY)return!1;if(e._decodingState===K$u.NEEDS_DECODE){var i=e._parsedContent,n=i.draco,r=r$A.decodePointCloud(n,t);e$2b(r)&&(e._decodingState=K$u.DECODING,r.then((function(t){e._decodingState=K$u.READY;var r=e$2b(t.POSITION)?t.POSITION.array:void 0,o=e$2b(t.RGB)?t.RGB.array:void 0,a=e$2b(t.RGBA)?t.RGBA.array:void 0,s=e$2b(t.NORMAL)?t.NORMAL.array:void 0,l=e$2b(t.BATCH_ID)?t.BATCH_ID.array:void 0,u=e$2b(r)&&e$2b(t.POSITION.data.quantization),c=e$2b(s)&&e$2b(t.NORMAL.data.quantization);if(u){var h=t.POSITION.data.quantization,d=h.range;e._quantizedVolumeScale=o$1p.fromElements(d,d,d),e._quantizedVolumeOffset=o$1p.unpack(h.minValues),e._quantizedRange=(1<<h.quantizationBits)-1,e._isQuantizedDraco=!0}c&&(e._octEncodedRange=(1<<t.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);var f=i.styleableProperties,p=n.batchTableProperties;for(var _ in p)if(p.hasOwnProperty(_)){var m=t[_];e$2b(f)||(f={}),f[_]={typedArray:m.array,componentCount:m.data.componentsPerAttribute}}i.positions=u$_(r,i.positions),i.colors=u$_(u$_(a,o),i.colors),i.normals=u$_(s,i.normals),i.batchIds=u$_(l,i.batchIds),i.styleableProperties=f})).otherwise((function(t){e._decodingState=K$u.FAILED,e._readyPromise.reject(t)})))}return!0}var cr$1=new e$29,lr$2=new o$1p;function a$u(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._pickId=void 0,this._batchTable=void 0,this._styleDirty=!1,this._features=void 0,this.featurePropertiesDirty=!1,this._pointCloud=new ie$g({arrayBuffer:n,byteOffset:r,cull:!1,opaquePass:Le$s.CESIUM_3D_TILE,vertexShaderLoaded:v$v(this),fragmentShaderLoaded:P$v(this),uniformMapLoaded:k$s(this),batchTableLoaded:x$B(this),pickIdLoaded:E$z(this)})}function v$v(e){return function(t){return e$2b(e._batchTable)?e._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(t):t}}function P$v(e){return function(t){return e$2b(e._batchTable)?e._batchTable.getFragmentShaderCallback(!1,void 0)(t):"uniform vec4 czm_pickColor;\n"+t}}function k$s(e){return function(t){return e$2b(e._batchTable)?e._batchTable.getUniformMapCallback()(t):p$19(t,{czm_pickColor:function(){return e._pickId.color}})}}function x$B(e){return function(t,i,n){e._batchTable=new h$D(e,t,i,n)}}function E$z(e){return function(){return e$2b(e._batchTable)?e._batchTable.getPickId():"czm_pickColor"}}function I$H(e){var t=e._tileset.pointCloudShading,i=e._tile.contentBoundingVolume.boundingSphere.volume(),n=e$2a.cbrt(i/e.pointsLength),r=e._tile.geometricError;return 0===r&&(r=e$2b(t)&&e$2b(t.baseResolution)?t.baseResolution:n),r}function B$t(e){var t=e.featuresLength;if(!e$2b(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$L(e,n);e._features=i}}ie$g.prototype.update=function(e){if(!sr$2(this,e.context)){var t=!1,i=!p$1d.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,i=!0),e$2b(this._drawCommand)||(ir$2(this,e),i=!0,t=!0,this._ready=!0,this._readyPromise.resolve(this),this._parsedContent=void 0),i){p$1d.clone(this.modelMatrix,this._modelMatrix);var n=this._drawCommand.modelMatrix;if(p$1d.clone(this._modelMatrix,n),e$2b(this._rtcCenter)&&p$1d.multiplyByTranslation(n,this._rtcCenter,n),e$2b(this._quantizedVolumeOffset)&&p$1d.multiplyByTranslation(n,this._quantizedVolumeOffset,n),e.mode!==C$13.SCENE3D){var r=e.mapProjection,o=p$1d.getColumn(n,3,cr$1);e$29.equals(o,e$29.UNIT_W)||m$17.basisTo2D(r,n,n)}var a=this._drawCommand.boundingVolume;if(i$1c.clone(this._boundingSphere,a),this._cull){var s=a.center;p$1d.multiplyByPoint(n,s,s);var l=p$1d.getScale(n,lr$2);a.radius*=o$1p.maximumComponent(l)}}this.clippingPlanesDirty&&(this.clippingPlanesDirty=!1,t=!0),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,t=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,t=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,t=!0),(this._style!==this.style||this.styleDirty)&&(this._style=this.style,this.styleDirty=!1,t=!0),t&&or$1(this,e,this._style),this._drawCommand.castShadows=W$W.castShadows(this.shadows),this._drawCommand.receiveShadows=W$W.receiveShadows(this.shadows);var u=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=u?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=u?Le$s.TRANSLUCENT:this._opaquePass;var c=e.commandList,h=e.passes;(h.render||h.pick)&&c.push(this._drawCommand)}},ie$g.prototype.isDestroyed=function(){return!1},ie$g.prototype.destroy=function(){var e=this._drawCommand;return e$2b(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),i$10(this)},Object.defineProperties(a$u.prototype,{featuresLength:{get:function(){return e$2b(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return this._pointCloud.pointsLength}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return this._pointCloud.geometryByteLength}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return e$2b(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._pointCloud.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}}),a$u.prototype.hasProperty=function(e,t){return!!e$2b(this._batchTable)&&this._batchTable.hasProperty(e,t)},a$u.prototype.getFeature=function(e){if(e$2b(this._batchTable)){var t=this.featuresLength;if(!e$2b(e)||e<0||e>=t)throw new t$16("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return B$t(this),this._features[e]}},a$u.prototype.applyDebugSettings=function(e,t){this._pointCloud.color=e?t:e$1U.WHITE},a$u.prototype.applyStyle=function(e){e$2b(this._batchTable)?this._batchTable.applyStyle(e):this._styleDirty=!0};var w$t=new o$Z;function t$t(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._readyPromise=o$1l.defer(),this.featurePropertiesDirty=!1,c$t(this,n,r)}function c$t(e,t,i){i=u$_(i,0);var n,r=a$K(new Uint8Array(t),i);try{n=JSON.parse(r)}catch{return void e._readyPromise.reject(new t$14("Invalid tile content."))}e._tileset.loadTileset(e._resource,n,e._tile),e._readyPromise.resolve(e)}function i$A(e,t,i,n,r){return function(){var o=document.createElement("canvas"),a=r+2*n;o.height=o.width=a;var s=o.getContext("2d");return s.clearRect(0,0,a,a),0!==n&&(s.beginPath(),s.arc(a/2,a/2,a/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=i,s.fill(),e<1&&(s.save(),s.globalCompositeOperation="destination-out",s.beginPath(),s.arc(a/2,a/2,r/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle="black",s.fill(),s.restore())),s.beginPath(),s.arc(a/2,a/2,r/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=t,s.fill(),o}}function i$z(e,t,i,n,r){this._content=e,this._billboard=i,this._label=n,this._polyline=r,this._batchId=t,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),s$r(this)}a$u.prototype.update=function(e,t){var i,n=this._pointCloud,r=u$_(e.pointCloudShading,w$t),o=this._tile,a=this._batchTable,s=t.mode,l=e.clippingPlanes;!e$2b(this._pickId)&&!e$2b(a)&&(this._pickId=t.context.createPickId({primitive:e,content:this})),e$2b(a)&&a.update(e,t),i=e$2b(o._contentBoundingVolume)?s===C$13.SCENE3D?o._contentBoundingVolume.boundingSphere:o._contentBoundingVolume2D.boundingSphere:s===C$13.SCENE3D?o._boundingVolume.boundingSphere:o._boundingVolume2D.boundingSphere;var u=this._styleDirty;this._styleDirty=!1,n.clippingPlanesOriginMatrix=e.clippingPlanesOriginMatrix,n.style=e$2b(a)?void 0:e.style,n.styleDirty=u,n.modelMatrix=o.computedTransform,n.time=e.timeSinceLoad,n.shadows=e.shadows,n.boundingSphere=i,n.clippingPlanes=l,n.isClipped=e$2b(l)&&l.enabled&&o._isClipped,n.clippingPlanesDirty=o.clippingPlanesDirty,n.attenuation=r.attenuation,n.backFaceCulling=r.backFaceCulling,n.normalShading=r.normalShading,n.geometricError=I$H(this),n.geometricErrorScale=r.geometricErrorScale,e$2b(r)&&e$2b(r.maximumAttenuation)?n.maximumAttenuation=r.maximumAttenuation:o.refine===f$D.ADD?n.maximumAttenuation=5:n.maximumAttenuation=e.maximumScreenSpaceError,n.update(t)},a$u.prototype.isDestroyed=function(){return!1},a$u.prototype.destroy=function(){return this._pickId=this._pickId&&this._pickId.destroy(),this._pointCloud=this._pointCloud&&this._pointCloud.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$10(this)},Object.defineProperties(t$t.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}}),t$t.prototype.hasProperty=function(e,t){return!1},t$t.prototype.getFeature=function(e){},t$t.prototype.applyDebugSettings=function(e,t){},t$t.prototype.applyStyle=function(e){},t$t.prototype.update=function(e,t){},t$t.prototype.isDestroyed=function(){return!1},t$t.prototype.destroy=function(){return i$10(this)};var m$v=new a$18;function s$r(e){var t=e._billboard;if(e$2b(e._billboardImage)&&e._billboardImage!==t.image)t.image=e._billboardImage;else if(!e$2b(e._billboardImage)){var i=u$_(e._color,i$z.defaultColor),n=u$_(e._pointOutlineColor,i$z.defaultPointOutlineColor),r=u$_(e._pointOutlineWidth,i$z.defaultPointOutlineWidth),o=u$_(e._pointSize,i$z.defaultPointSize),a=e._billboardColor,s=e._billboardOutlineColor,l=e._billboardOutlineWidth,u=e._billboardSize;if(!e$1U.equals(i,a)||!e$1U.equals(n,s)||r!==l||o!==u){e._billboardColor=e$1U.clone(i,e._billboardColor),e._billboardOutlineColor=e$1U.clone(n,e._billboardOutlineColor),e._billboardOutlineWidth=r,e._billboardSize=o;var c=i.alpha,h=i.toCssColorString(),d=n.toCssColorString(),f=JSON.stringify([h,o,d,r]);t.setImage(f,i$A(c,h,d,r,o))}}}function b$H(e){this._positions=e.positions,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._rectangle=e.rectangle,this._minHeight=e.minimumHeight,this._maxHeight=e.maximumHeight,this._billboardCollection=void 0,this._labelCollection=void 0,this._polylineCollection=void 0,this._verticesPromise=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._resolvedPromise=!1}function G$z(e,t){var i=e._rectangle,n=e._minHeight,r=e._maxHeight,o=2+h$18.packedLength+t$13.packedLength,a=new Float64Array(o),s=0;return a[s++]=n,a[s++]=r,h$18.pack(i,a,s),s+=h$18.packedLength,t$13.pack(t,a,s),a}Object.defineProperties(i$z.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=e$1U.clone(e,this._color),s$r(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,s$r(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=e$1U.clone(e,this._pointOutlineColor),s$r(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,s$r(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&e.alpha>0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){e$2b(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){var t=u$_(this._heightOffset,0),i=this._content.tileset.ellipsoid,n=i.cartesianToCartographic(this._billboard.position,m$v);n.height=n.height-t+e;var r=i.cartographicToCartesian(n);this._billboard.position=r,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],r],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=e$1U.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){var t=this._billboardImage!==e;this._billboardImage=e,t&&s$r(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){var e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}}),i$z.defaultColor=e$1U.WHITE,i$z.defaultPointOutlineColor=e$1U.BLACK,i$z.defaultPointOutlineWidth=0,i$z.defaultPointSize=8,i$z.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},i$z.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},i$z.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},i$z.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},i$z.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},i$z.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},i$z.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},Object.defineProperties(b$H.prototype,{pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){return this._billboardCollection.textureAtlas.texture.sizeInBytes+this._labelCollection._textureAtlas.texture.sizeInBytes}},readyPromise:{get:function(){return this._readyPromise.promise}}});var q$x=new i$V("createVectorTilePoints"),J$r=new o$1p;function K$t(e,t){if(!e$2b(e._billboardCollection)){var i;if(!e$2b(e._verticesPromise)){i=e._positions;var n=e._packedBuffer;e$2b(n)||(i=e._positions=l$R(i),e._batchIds=l$R(e._batchIds),n=e._packedBuffer=G$z(e,t));var r=[i.buffer,n.buffer],o={positions:i.buffer,packedBuffer:n.buffer},a=e._verticesPromise=q$x.scheduleTask(o,r);if(!e$2b(a))return;a.then((function(t){e._positions=new Float64Array(t.positions),e._ready=!0}))}if(e._ready&&!e$2b(e._billboardCollection)){i=e._positions;var s=e._batchTable,l=e._batchIds,u=e._billboardCollection=new w$N({batchTable:s}),c=e._labelCollection=new g$U({batchTable:s}),h=e._polylineCollection=new k$T;h._useHighlightColor=!0;for(var d=i.length/3,f=0;f<d;++f){var p=l[f],_=o$1p.unpack(i,3*f,J$r),m=u.add();m.position=_,m._batchIndex=p;var g=c.add();g.text=" ",g.position=_,g._batchIndex=p,h.add().positions=[o$1p.clone(_),o$1p.clone(_)]}e._positions=void 0,e._packedBuffer=void 0}}}function M$y(e,t){for(var i=e._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.show=!0,o.pointSize=i$z.defaultPointSize,o.color=i$z.defaultColor,o.pointOutlineColor=i$z.defaultPointOutlineColor,o.pointOutlineWidth=i$z.defaultPointOutlineWidth,o.labelColor=e$1U.WHITE,o.labelOutlineColor=e$1U.WHITE,o.labelOutlineWidth=1,o.font="30px sans-serif",o.labelStyle=R$Q.FILL,o.labelText=void 0,o.backgroundColor=new e$1U(.165,.165,.165,.8),o.backgroundPadding=new o$1o(7,5),o.backgroundEnabled=!1,o.scaleByDistance=void 0,o.translucencyByDistance=void 0,o.distanceDisplayCondition=void 0,o.heightOffset=0,o.anchorLineEnabled=!1,o.anchorLineColor=e$1U.WHITE,o.image=void 0,o.disableDepthTestDistance=0,o.horizontalOrigin=j$T.CENTER,o.verticalOrigin=S$O.CENTER,o.labelHorizontalOrigin=j$T.RIGHT,o.labelVerticalOrigin=S$O.BASELINE}}b$H.prototype.createFeatures=function(e,t){for(var i=this._billboardCollection,n=this._labelCollection,r=this._polylineCollection,o=this._batchIds,a=o.length,s=0;s<a;++s){var l=o[s],u=i.get(s),c=n.get(s),h=r.get(s);t[l]=new i$z(e,l,u,c,h)}},b$H.prototype.applyDebugSettings=function(e,t){e?(e$1U.clone(t,this._billboardCollection._highlightColor),e$1U.clone(t,this._labelCollection._highlightColor),e$1U.clone(t,this._polylineCollection._highlightColor)):(e$1U.clone(e$1U.WHITE,this._billboardCollection._highlightColor),e$1U.clone(e$1U.WHITE,this._labelCollection._highlightColor),e$1U.clone(e$1U.WHITE,this._polylineCollection._highlightColor))};var Q$u=new e$1U,U$u=new e$1U,X$p=new e$1U,Y$p=new e$1U,Z$t=new e$1U,$$v=new e$1U,g$E=new o$Y,C$z=new o$Y,k$r=new r$Y;function a$t(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=u$_(e.center,o$1p.ZERO),this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=_0x3b5200.BOTH}function U$t(e){var t=new Float64Array(3+o$1p.packedLength+t$13.packedLength+h$18.packedLength),i=0;return t[i++]=e._indices.BYTES_PER_ELEMENT,t[i++]=e._minimumHeight,t[i++]=e._maximumHeight,o$1p.pack(e._center,t,i),i+=o$1p.packedLength,t$13.pack(e._ellipsoid,t,i),i+=t$13.packedLength,h$18.pack(e._rectangle,t,i),t}function F$z(e,t){for(var i=1,n=t[i++],r=e._boundingVolumes=new Array(n),o=0;o<n;++o)r[o]=y$Z.unpack(t,i),i+=y$Z.packedLength;for(var a=t[i++],s=e._batchedIndices=new Array(a),l=0;l<a;++l){var u=e$1U.unpack(t,i);i+=e$1U.packedLength;for(var c=t[i++],h=t[i++],d=t[i++],f=new Array(d),p=0;p<d;++p)f[p]=t[i++];s[l]=new c$w({color:u,offset:c,count:h,batchIds:f})}}b$H.prototype.applyStyle=function(e,t){if(e$2b(e))for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];if(e$2b(e.show)&&(o.show=e.show.evaluate(o)),e$2b(e.pointSize)&&(o.pointSize=e.pointSize.evaluate(o)),e$2b(e.color)&&(o.color=e.color.evaluateColor(o,Q$u)),e$2b(e.pointOutlineColor)&&(o.pointOutlineColor=e.pointOutlineColor.evaluateColor(o,U$u)),e$2b(e.pointOutlineWidth)&&(o.pointOutlineWidth=e.pointOutlineWidth.evaluate(o)),e$2b(e.labelColor)&&(o.labelColor=e.labelColor.evaluateColor(o,X$p)),e$2b(e.labelOutlineColor)&&(o.labelOutlineColor=e.labelOutlineColor.evaluateColor(o,Y$p)),e$2b(e.labelOutlineWidth)&&(o.labelOutlineWidth=e.labelOutlineWidth.evaluate(o)),e$2b(e.font)&&(o.font=e.font.evaluate(o)),e$2b(e.labelStyle)&&(o.labelStyle=e.labelStyle.evaluate(o)),e$2b(e.labelText)?o.labelText=e.labelText.evaluate(o):o.labelText=void 0,e$2b(e.backgroundColor)&&(o.backgroundColor=e.backgroundColor.evaluateColor(o,Z$t)),e$2b(e.backgroundPadding)&&(o.backgroundPadding=e.backgroundPadding.evaluate(o)),e$2b(e.backgroundEnabled)&&(o.backgroundEnabled=e.backgroundEnabled.evaluate(o)),e$2b(e.scaleByDistance)){var a=e.scaleByDistance.evaluate(o);g$E.near=a.x,g$E.nearValue=a.y,g$E.far=a.z,g$E.farValue=a.w,o.scaleByDistance=g$E}else o.scaleByDistance=void 0;if(e$2b(e.translucencyByDistance)){var s=e.translucencyByDistance.evaluate(o);C$z.near=s.x,C$z.nearValue=s.y,C$z.far=s.z,C$z.farValue=s.w,o.translucencyByDistance=C$z}else o.translucencyByDistance=void 0;if(e$2b(e.distanceDisplayCondition)){var l=e.distanceDisplayCondition.evaluate(o);k$r.near=l.x,k$r.far=l.y,o.distanceDisplayCondition=k$r}else o.distanceDisplayCondition=void 0;e$2b(e.heightOffset)&&(o.heightOffset=e.heightOffset.evaluate(o)),e$2b(e.anchorLineEnabled)&&(o.anchorLineEnabled=e.anchorLineEnabled.evaluate(o)),e$2b(e.anchorLineColor)&&(o.anchorLineColor=e.anchorLineColor.evaluateColor(o,$$v)),e$2b(e.image)?o.image=e.image.evaluate(o):o.image=void 0,e$2b(e.disableDepthTestDistance)&&(o.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(o)),e$2b(e.horizontalOrigin)&&(o.horizontalOrigin=e.horizontalOrigin.evaluate(o)),e$2b(e.verticalOrigin)&&(o.verticalOrigin=e.verticalOrigin.evaluate(o)),e$2b(e.labelHorizontalOrigin)&&(o.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(o)),e$2b(e.labelVerticalOrigin)&&(o.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(o))}else M$y(this,t)},b$H.prototype.update=function(e){K$t(this,e.mapProjection.ellipsoid),this._ready&&(this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e),this._resolvedPromise||(this._readyPromise.resolve(),this._resolvedPromise=!0))},b$H.prototype.isDestroyed=function(){return!1},b$H.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),i$10(this)},Object.defineProperties(a$t.prototype,{trianglesLength:{get:function(){return e$2b(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return e$2b(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}});var W$y=new i$V("createVectorTilePolygons"),z$v=new e$1U;function G$y(e){if(!e$2b(e._primitive)){if(!e$2b(e._verticesPromise)){var t=e._positions,i=e._counts,n=e._indexCounts,r=e._indices,o=e._transferrableBatchIds,a=e._batchTableColors,s=e._packedBuffer;if(!e$2b(a)){t=e._positions=l$R(e._positions),i=e._counts=l$R(e._counts),n=e._indexCounts=l$R(e._indexCounts),r=e._indices=l$R(e._indices),e._center=e._ellipsoid.cartographicToCartesian(h$18.center(e._rectangle)),o=e._transferrableBatchIds=new Uint32Array(e._batchIds),a=e._batchTableColors=new Uint32Array(o.length);for(var l=e._batchTable,u=a.length,c=0;c<u;++c){var h=l.getColor(c,z$v);a[c]=h.toRgba()}s=e._packedBuffer=U$t(e)}var d=[t.buffer,i.buffer,n.buffer,r.buffer,o.buffer,a.buffer,s.buffer],f={packedBuffer:s.buffer,positions:t.buffer,counts:i.buffer,indexCounts:n.buffer,indices:r.buffer,batchIds:o.buffer,batchTableColors:a.buffer},p=e._polygonMinimumHeights,_=e._polygonMaximumHeights;e$2b(p)&&e$2b(_)&&(p=l$R(p),_=l$R(_),d.push(p.buffer,_.buffer),f.minimumHeights=p,f.maximumHeights=_);var m=e._verticesPromise=W$y.scheduleTask(f,d);if(!e$2b(m))return;o$1l(m,(function(t){e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;var i=new Float64Array(t.packedBuffer),n=i[0];F$z(e,i),e._indices=2===ce$x.getSizeInBytes(n)?new Uint16Array(t.indices):new Uint32Array(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._batchedPositions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!e$2b(e._primitive)&&(e._primitive=new y$y({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}a$t.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},a$t.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},a$t.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},a$t.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},a$t.prototype.update=function(e){G$y(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},a$t.prototype.isDestroyed=function(){return!1},a$t.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$10(this)};var $$u="attribute vec4 currentPosition;\nattribute vec4 previousPosition;\nattribute vec4 nextPosition;\nattribute vec2 expandAndWidth;\nattribute float a_batchId;\nuniform mat4 u_modifiedModelView;\nvoid main()\n{\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = u_modifiedModelView * currentPosition;\nvec4 prev = u_modifiedModelView * previousPosition;\nvec4 next = u_modifiedModelView * nextPosition;\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth(czm_projection * p);\n#endif\n}\n";function h$C(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=e$1U.clone(e$1U.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._readyPromise=o$1l.defer(),this._verticesPromise=void 0}function re$m(e){var t=e._rectangle,i=e._minimumHeight,n=e._maximumHeight,r=e._ellipsoid,o=e._center,a=2+h$18.packedLength+t$13.packedLength+o$1p.packedLength,s=new Float64Array(a),l=0;return s[l++]=i,s[l++]=n,h$18.pack(t,s,l),l+=h$18.packedLength,t$13.pack(r,s,l),l+=t$13.packedLength,o$1p.pack(o,s,l),s}Object.defineProperties(h$C.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},readyPromise:{get:function(){return this._readyPromise.promise}}});var ae$d=new i$V("createVectorTilePolylines"),m$u={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function ne$l(e,t){if(!e$2b(e._va)){if(!e$2b(e._verticesPromise)){var i=e._positions,n=e._widths,r=e._counts,o=e._transferrableBatchIds,a=e._packedBuffer;e$2b(a)||(i=e._positions=l$R(i),n=e._widths=l$R(n),r=e._counts=l$R(r),o=e._transferrableBatchIds=l$R(e._batchIds),a=e._packedBuffer=re$m(e));var s=[i.buffer,n.buffer,r.buffer,o.buffer,a.buffer],l={positions:i.buffer,widths:n.buffer,counts:r.buffer,batchIds:o.buffer,packedBuffer:a.buffer},u=e._verticesPromise=ae$d.scheduleTask(l,s);if(!e$2b(u))return;o$1l(u,(function(t){e._currentPositions=new Float32Array(t.currentPositions),e._previousPositions=new Float32Array(t.previousPositions),e._nextPositions=new Float32Array(t.nextPositions),e._expandAndWidth=new Float32Array(t.expandAndWidth),e._vertexBatchIds=new Uint16Array(t.batchIds);var i=t.indexDatatype;e._indices=i===ce$x.UNSIGNED_SHORT?new Uint16Array(t.indices):new Uint32Array(t.indices),e._ready=!0}))}if(e._ready&&!e$2b(e._va)){var c=e._currentPositions,h=e._previousPositions,d=e._nextPositions,f=e._expandAndWidth,p=e._vertexBatchIds,_=e._indices,m=h.byteLength+c.byteLength+d.byteLength;m+=f.byteLength+p.byteLength+_.byteLength,e._trianglesLength=_.length/3,e._geometryByteLength=m;var g=t$Y.createVertexBuffer({context:t,typedArray:h,usage:A$19.STATIC_DRAW}),x=t$Y.createVertexBuffer({context:t,typedArray:c,usage:A$19.STATIC_DRAW}),v=t$Y.createVertexBuffer({context:t,typedArray:d,usage:A$19.STATIC_DRAW}),y=t$Y.createVertexBuffer({context:t,typedArray:f,usage:A$19.STATIC_DRAW}),$=t$Y.createVertexBuffer({context:t,typedArray:p,usage:A$19.STATIC_DRAW}),b=t$Y.createIndexBuffer({context:t,typedArray:_,usage:A$19.STATIC_DRAW,indexDatatype:2===_.BYTES_PER_ELEMENT?ce$x.UNSIGNED_SHORT:ce$x.UNSIGNED_INT}),T=[{index:m$u.previousPosition,vertexBuffer:g,componentDatatype:S$12.FLOAT,componentsPerAttribute:3},{index:m$u.currentPosition,vertexBuffer:x,componentDatatype:S$12.FLOAT,componentsPerAttribute:3},{index:m$u.nextPosition,vertexBuffer:v,componentDatatype:S$12.FLOAT,componentsPerAttribute:3},{index:m$u.expandAndWidth,vertexBuffer:y,componentDatatype:S$12.FLOAT,componentsPerAttribute:2},{index:m$u.a_batchId,vertexBuffer:$,componentDatatype:S$12.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new c$12({context:t,attributes:T,indexBuffer:b}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0,e._readyPromise.resolve()}}}var b$G=new p$1d,H$C=new o$1p;function oe$e(e,t){e$2b(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){var i=t.uniformState.view;return p$1d.clone(i,b$G),p$1d.multiplyByPoint(b$G,e._center,H$C),p$1d.setTranslation(b$G,H$C,b$G),b$G},u_highlightColor:function(){return e._highlightColor}})}function ie$f(e){if(!e$2b(e._rs)){e._rs=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:{enabled:!0,factor:-5,units:-5}})}}var de$d="uniform vec4 u_highlightColor; \nvoid main()\n{\n gl_FragColor = u_highlightColor;\n}\n";function fe$a(e,t){if(!e$2b(e._sp)){var i=e._batchTable,n=i.getVertexShaderCallback(!1,"a_batchId",void 0)($$u),r=i.getFragmentShaderCallback()(de$d,!1,void 0),o=new s$U({defines:["VECTOR_TILE",s$Y.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[Z$Y,n]}),a=new s$U({defines:["VECTOR_TILE"],sources:[r]});e._sp=r$13.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:m$u})}}function ue$e(e,t){if(!e$2b(e._command)){var i=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new i$_({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:i,boundingVolume:e._boundingVolume,pass:Le$s.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}function se$c(e,t){for(var i=e._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.show=!0,o.color=e$1U.WHITE}}h$C.prototype.createFeatures=function(e,t){for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=i[r];t[o]=new e$L(e,o)}},h$C.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var he$b=new e$1U,ce$f=e$1U.WHITE,_e$a=!0;function y$v(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._contentReadyPromise=void 0,this._readyPromise=o$1l.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,vt$3(this,n,r)}function ft$3(e){return function(t,i){e$2b(e._polygons)&&e._polygons.updateCommands(t,i)}}function dt$5(e,t){var i,n,r,o,a=u$_(e.POLYGONS_LENGTH,0),s=u$_(e.POLYLINES_LENGTH,0),l=u$_(e.POINTS_LENGTH,0);if(a>0&&e$2b(e.POLYGON_BATCH_IDS)){var u=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,u,a)}if(s>0&&e$2b(e.POLYLINE_BATCH_IDS)){var c=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,c,s)}if(l>0&&e$2b(e.POINT_BATCH_IDS)){var h=t.byteOffset+e.POINT_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,h,l)}var d=e$2b(i)||e$2b(n)||e$2b(r),f=a>0&&!e$2b(i)||s>0&&!e$2b(n)||l>0&&!e$2b(r);if(d&&f)throw new t$14("If one group of batch ids is defined, then all batch ids must be defined.");if(!e$2b(i)&&!e$2b(n)&&!e$2b(r)){var p=0;if(!e$2b(i)&&a>0)for(i=new Uint16Array(a),o=0;o<a;++o)i[o]=p++;if(!e$2b(n)&&s>0)for(n=new Uint16Array(s),o=0;o<s;++o)n[o]=p++;if(!e$2b(r)&&l>0)for(r=new Uint16Array(l),o=0;o<l;++o)r[o]=p++}return{polygons:i,polylines:n,points:r}}h$C.prototype.applyStyle=function(e,t){if(e$2b(e))for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.color=e$2b(e.color)?e.color.evaluateColor(o,he$b):ce$f,o.show=e$2b(e.show)?e.show.evaluate(o):_e$a}else se$c(this,t)},h$C.prototype.update=function(e){var t=e.context;if(ne$l(this,t),oe$e(this,t),fe$a(this,t),ie$f(this),this._ready){var i=e.passes;(i.render||i.pick)&&ue$e(this,e)}},h$C.prototype.isDestroyed=function(){return!1},h$C.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),i$10(this)},Object.defineProperties(y$v.prototype,{featuresLength:{get:function(){return e$2b(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return e$2b(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){var e=0;return e$2b(this._polygons)&&(e+=this._polygons.trianglesLength),e$2b(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){var e=0;return e$2b(this._polygons)&&(e+=this._polygons.geometryByteLength),e$2b(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return e$2b(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return e$2b(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var B$s=Uint16Array.BYTES_PER_ELEMENT,h$B=Uint32Array.BYTES_PER_ELEMENT;function vt$3(e,t,i){i=u$_(i,0);var n=new Uint8Array(t),r=new DataView(t);i+=h$B;var o=r.getUint32(i,!0);if(1!==o)throw new t$14("Only Vector tile version 1 is supported. Version "+o+" is not.");i+=h$B;var a=r.getUint32(i,!0);if(i+=h$B,0!==a){var s=r.getUint32(i,!0);if(i+=h$B,0===s)throw new t$14("Feature table must have a byte length greater than zero");var l=r.getUint32(i,!0);i+=h$B;var u=r.getUint32(i,!0);i+=h$B;var c=r.getUint32(i,!0);i+=h$B;var h=r.getUint32(i,!0);i+=h$B;var d=r.getUint32(i,!0);i+=h$B;var f=r.getUint32(i,!0);i+=h$B;var p=r.getUint32(i,!0),_=a$K(n,i+=h$B,s),m=JSON.parse(_);i+=s;var g,x,v=new Uint8Array(t,i,l);if(i+=l,u>0){var y=a$K(n,i,u);g=JSON.parse(y),i+=u,c>0&&(x=new Uint8Array(t,i,c),x=new Uint8Array(x),i+=c)}var $=u$_(m.POLYGONS_LENGTH,0),b=u$_(m.POLYLINES_LENGTH,0),T=u$_(m.POINTS_LENGTH,0),C=$+b+T,S=new h$D(e,C,g,x,ft$3(e));if(e._batchTable=S,0!==C){var w,E,P;if(!e$2b(m.REGION))throw new t$14("REGION is required in the feature table.");var A=m.REGION;w=h$18.unpack(A),E=A[4],P=A[5];var L,M=e._tile.computedTransform;e$2b(m.RTC_CENTER)?(L=o$1p.unpack(m.RTC_CENTER),p$1d.multiplyByPoint(M,L,L)):((L=h$18.center(w)).height=e$2a.lerp(E,P,.5),L=t$13.WGS84.cartographicToCartesian(L));var R=dt$5(m,v);if(i+=i%4,$>0){var O=new Uint32Array(t,i,h/h$B);i+=h;var I=new Uint16Array(t,i,d/B$s);i+=d;var D,B,N=v.byteOffset+m.POLYGON_COUNT.byteOffset,F=new Uint32Array(v.buffer,N,$),U=v.byteOffset+m.POLYGON_INDEX_COUNT.byteOffset,G=new Uint32Array(v.buffer,U,$);if(e$2b(m.POLYGON_MINIMUM_HEIGHTS)&&e$2b(m.POLYGON_MAXIMUM_HEIGHTS)){var z=v.byteOffset+m.POLYGON_MINIMUM_HEIGHTS.byteOffset;D=new Float32Array(v.buffer,z,$);var V=v.byteOffset+m.POLYGON_MAXIMUM_HEIGHTS.byteOffset;B=new Float32Array(v.buffer,V,$)}e._polygons=new a$t({positions:I,counts:F,indexCounts:G,indices:O,minimumHeight:E,maximumHeight:P,polygonMinimumHeights:D,polygonMaximumHeights:B,center:L,rectangle:w,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:S,batchIds:R.polygons,modelMatrix:M})}if(b>0){var k=new Uint16Array(t,i,f/B$s);i+=f;var W,H=v.byteOffset+m.POLYLINE_COUNT.byteOffset,q=new Uint32Array(v.buffer,H,b);if(e$2b(m.POLYLINE_WIDTHS)){var j=v.byteOffset+m.POLYLINE_WIDTHS.byteOffset;W=new Uint16Array(v.buffer,j,b)}else{W=new Uint16Array(b);for(var Y=0;Y<b;++Y)W[Y]=2}e._polylines=new h$C({positions:k,widths:W,counts:q,batchIds:R.polylines,minimumHeight:E,maximumHeight:P,center:L,rectangle:w,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:S})}if(T>0){var X=new Uint16Array(t,i,p/B$s);e._points=new b$H({positions:X,batchIds:R.points,minimumHeight:E,maximumHeight:P,rectangle:w,batchTable:S})}}}else e._readyPromise.resolve(e)}function k$q(e){var t=e.featuresLength;if(!e$2b(e._features)&&t>0){var i=new Array(t);e$2b(e._polygons)&&e._polygons.createFeatures(e,i),e$2b(e._polylines)&&e._polylines.createFeatures(e,i),e$2b(e._points)&&e._points.createFeatures(e,i),e._features=i}}y$v.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},y$v.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2b(e)||e<0||e>=t)throw new t$16("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return k$q(this),this._features[e]},y$v.prototype.applyDebugSettings=function(e,t){e$2b(this._polygons)&&this._polygons.applyDebugSettings(e,t),e$2b(this._polylines)&&this._polylines.applyDebugSettings(e,t),e$2b(this._points)&&this._points.applyDebugSettings(e,t)},y$v.prototype.applyStyle=function(e){k$q(this),e$2b(this._polygons)&&this._polygons.applyStyle(e,this._features),e$2b(this._polylines)&&this._polylines.applyStyle(e,this._features),e$2b(this._points)&&this._points.applyStyle(e,this._features)},y$v.prototype.update=function(e,t){var i=!0;if(e$2b(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),i=i&&this._polygons._ready),e$2b(this._polylines)&&(this._polylines.update(t),i=i&&this._polylines._ready),e$2b(this._points)&&(this._points.update(t),i=i&&this._points._ready),e$2b(this._batchTable)&&i&&this._batchTable.update(e,t),!e$2b(this._contentReadyPromise)){var n=e$2b(this._points)?this._points.readyPromise:void 0,r=e$2b(this._polygons)?this._polygons.readyPromise:void 0,o=e$2b(this._polylines)?this._polylines.readyPromise:void 0,a=this;this._contentReadyPromise=o$1l.all([n,r,o]).then((function(){a._readyPromise.resolve(a)}))}},y$v.prototype.isDestroyed=function(){return!1},y$v.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$10(this)};var i$y={b3dm:function(e,t,i,n,r){return new n$p(e,t,i,n,r)},pnts:function(e,t,i,n,r){return new a$u(e,t,i,n,r)},i3dm:function(e,t,i,n,r){return new u$z(e,t,i,n,r)},cmpt:function(e,t,i,n,r){return new i$B(e,t,i,n,r,i$y)},json:function(e,t,i,n,r){return new t$t(e,t,i,n,r)},geom:function(e,t,i,n,r){return new p$w(e,t,i,n,r)},vctr:function(e,t,i,n,r){return new y$v(e,t,i,n,r)}},e$E={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5},X$o=Object.freeze(e$E),e$D={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0},s$q=Object.freeze(e$D);function f$C(){}var u$y={stack:new r$R,stackMaximumLength:0};function d$F(e){return e._visible&&e._inRequestVolume}function m$t(e){return e.hasEmptyContent||e.hasTilesetContent}function l$F(e){return!m$t(e)&&e.contentUnloaded}function T$u(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:(t.hasEmptyContent,!0))}function g$D(e,t,i,n){for(var r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];s.updateVisibility(n),d$F(s)&&i.push(s)}}function C$y(e,t){(l$F(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function _$s(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function b$F(e){++e.statistics.visited}function x$A(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==Ae$u.OUTSIDE&&e._selectedTiles.push(t)}function W$x(){}function g$C(e){return e._visible&&e._inRequestVolume}f$C.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e._hasMixedContent=!1;var i=!0,n=e.root;if(n.updateVisibility(t),!d$F(n))return i;var r=u$y.stack;for(r.push(e.root);r.length>0;){u$y.stackMaximumLength=Math.max(u$y.stackMaximumLength,r.length);var o=r.pop(),a=o.refine===f$D.ADD,s=o.refine===f$D.REPLACE,l=T$u(e,o);l&&g$D(e,o,r,t),(a||s&&!l)&&(C$y(e,o),_$s(e,o,t),x$A(e,o,t),!m$t(o)&&!o.contentAvailable&&(i=!1)),b$F(e)}return u$y.stack.trim(u$y.stackMaximumLength),i};var k$p={stack:new r$R,stackMaximumLength:0},E$y={stack:new r$R,stackMaximumLength:0},S$s={stack:new r$R,stackMaximumLength:0},d$E={stack:new r$R,stackMaximumLength:0,ancestorStack:new r$R,ancestorStackMaximumLength:0},H$B=2;function I$G(e,t,i){V$n(e,t,e._maximumScreenSpaceError,e._maximumScreenSpaceError,i)}function B$r(e,t,i){V$n(e,t,Number.MAX_VALUE,e._maximumScreenSpaceError,i),w$s(e,t,i)}function z$u(e,t,i){V$n(e,t,Math.max(e.baseScreenSpaceError,e.maximumScreenSpaceError),e.maximumScreenSpaceError,i),w$s(e,t,i)}function C$x(e){return e._skipLevelOfDetail}function Z$s(e,t){e._emptyTiles.push(t)}function b$E(e,t,i){if(t.contentVisibility(i)!==Ae$u.OUTSIDE){var n=t.content;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,t.lastStyleTime=0,e._selectedTilesToStyle.push(t)):t._selectedFrame<i.frameNumber-1&&e._selectedTilesToStyle.push(t),t._selectedFrame=i.frameNumber,e._selectedTiles.push(t)}}function X$n(e,t,i){var n=S$s.stack;for(n.push(t);n.length>0;){S$s.stackMaximumLength=Math.max(S$s.stackMaximumLength,n.length);for(var r=n.pop().children,o=r.length,a=0;a<o;++a){var s=r[a];g$C(s)&&(s.contentAvailable?(P$u(e,s,i),F$y(e,s,i),b$E(e,s,i)):s._depth-t._depth<H$B&&n.push(s))}}}function D$v(e,t,i){if(C$x(e)){var n=t.contentAvailable?t:t._ancestorWithContentAvailable;e$2b(n)?n._shouldSelect=!0:X$n(e,t,i)}else t.contentAvailable&&b$E(e,t,i)}function j$x(e,t,i){++e._statistics.visited,t._visitedFrame=i.frameNumber}function F$y(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function G$x(e,t){e._maximumPriority.distance=Math.max(t._priorityHolder._distanceToCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t._priorityHolder._distanceToCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t._depth,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t._depth,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t._priorityHolder._foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t._priorityHolder._foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.reverseScreenSpaceError=Math.max(t._priorityReverseScreenSpaceError,e._maximumPriority.reverseScreenSpaceError),e._minimumPriority.reverseScreenSpaceError=Math.min(t._priorityReverseScreenSpaceError,e._minimumPriority.reverseScreenSpaceError)}function J$q(e,t,i){if(!e._cullRequestsWhileMoving)return!0;var n=t.boundingSphere,r=Math.max(2*n.radius,1),o=i.camera,a=0!==o.positionWCDeltaMagnitude?o.positionWCDeltaMagnitude:o.positionWCDeltaMagnitudeLastFrame;return e.cullRequestsWhileMovingMultiplier*a/r<1}function x$z(e,t,i){if(t._requestedFrame!==i.frameNumber&&(q$w(t)||t.contentExpired)&&J$q(e,t,i)){var n=i.camera.timeSinceMoved<e.foveatedTimeDelay;t.priorityDeferred&&n||(t._requestedFrame=i.frameNumber,e._requestedTiles.push(t))}}function N$o(e,t,i){t._updatedVisibilityFrame!==e._updatedVisibilityFrame&&(t.updateVisibility(i),t._updatedVisibilityFrame=e._updatedVisibilityFrame)}function K$s(e,t,i){for(var n=!1,r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];N$o(e,s,i),n=n||g$C(s)}return n}function Q$t(e,t,i){var n=t.parent;return!(!e$2b(n)||n.hasTilesetContent||n.refine!==f$D.ADD)&&t.getScreenSpaceError(i,!0)<=e._maximumScreenSpaceError}function O$o(e,t,i){if(N$o(e,t,i),g$C(t)){var n=t.children.length>0;if(t.hasTilesetContent&&n){var r=t.children[0];return O$o(e,r,i),void(t._visible=r._visible)}if(Q$t(e,t,i))return void(t._visible=!1);var o=t.refine===f$D.REPLACE,a=t._optimChildrenWithinParent===s$q.USE_OPTIMIZATION;if(o&&a&&n&&!K$s(e,t,i))return++e._statistics.numberOfTilesCulledWithChildrenUnion,void(t._visible=!1)}}function P$u(e,t,i){O$o(e,t,i),t.updateExpiration(),t._wasMinPriorityChild=!1,t._priorityHolder=t,G$x(e,t),t._shouldSelect=!1,t._finalResolution=!0}function Y$o(e,t){e._ancestorWithContent=void 0,e._ancestorWithContentAvailable=void 0;var i=e.parent;if(e$2b(i)){var n=!q$w(i)||i._requestedFrame===t.frameNumber;e._ancestorWithContent=n?i:i._ancestorWithContent,e._ancestorWithContentAvailable=i.contentAvailable?i:i._ancestorWithContentAvailable}}function L$z(e){return e.hasEmptyContent||e.hasTilesetContent}function q$w(e){return!L$z(e)&&e.contentUnloaded}function $$t(e,t){var i=t._ancestorWithContent;return!e.immediatelyLoadDesiredLevelOfDetail&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf||e$2b(i)&&t._screenSpaceError<i._screenSpaceError/e.skipScreenSpaceErrorFactor&&t._depth>i._depth+e.skipLevels)}function rr$3(e,t){return 0===t._distanceToCamera&&0===e._distanceToCamera?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera}function ar$1(e,t,i,n){var r,o=t.refine===f$D.REPLACE,a=t.children,s=a.length;for(r=0;r<s;++r)P$u(e,a[r],n);a.sort(rr$3);var l,u=!C$x(e)&&o&&!L$z(t),c=!0,h=!1,d=-1,f=Number.MAX_VALUE;for(r=0;r<s;++r)if(g$C(l=a[r])?(i.push(l),l._foveatedFactor<f&&(d=r,f=l._foveatedFactor),h=!0):(u||e.loadSiblings)&&(l._foveatedFactor<f&&(d=r,f=l._foveatedFactor),x$z(e,l,n),F$y(e,l,n)),u){var p;p=!!l._inRequestVolume&&(L$z(l)?nr$1(e,l,n):l.contentAvailable),c=c&&p}if(h||(c=!1),-1!==d&&!C$x(e)&&o){var _=a[d];_._wasMinPriorityChild=!0;var m=(t._wasMinPriorityChild||t===e.root)&&f<=t._priorityHolder._foveatedFactor?t._priorityHolder:t;for(m._foveatedFactor=Math.min(_._foveatedFactor,m._foveatedFactor),m._distanceToCamera=Math.min(_._distanceToCamera,m._distanceToCamera),r=0;r<s;++r)(l=a[r])._priorityHolder=m}return c}function er$2(e,t,i){return!C$x(e)||!e.immediatelyLoadDesiredLevelOfDetail&&(!e$2b(t._ancestorWithContent)||(0===t._screenSpaceError?t.parent._screenSpaceError>i:t._screenSpaceError>i))}function A$B(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:t._screenSpaceError>e._maximumScreenSpaceError)}function V$n(e,t,i,n,r){var o=k$p.stack;for(o.push(t);o.length>0;){k$p.stackMaximumLength=Math.max(k$p.stackMaximumLength,o.length);var a=o.pop();Y$o(a,r);var s=er$2(e,a,i),l=a.refine===f$D.ADD,u=a.refine===f$D.REPLACE,c=a.parent,h=!e$2b(c)||c._refines,d=!1;A$B(e,a)&&(d=ar$1(e,a,o,r)&&h);var f=!d&&h;L$z(a)?(Z$s(e,a),x$z(e,a,r),f&&D$v(e,a,r)):l?(D$v(e,a,r),x$z(e,a,r)):u&&(s?(x$z(e,a,r),f&&D$v(e,a,r)):f?(D$v(e,a,r),x$z(e,a,r)):$$t(e,a)&&x$z(e,a,r)),j$x(e,a,r),F$y(e,a,r),a._refines=d}}function nr$1(e,t,i){var n=!0,r=E$y.stack;for(r.push(t);r.length>0;){E$y.stackMaximumLength=Math.max(E$y.stackMaximumLength,r.length);var o=r.pop(),a=o.children,s=a.length,l=L$z(o)&&A$B(e,o);if(!l&&!o.contentAvailable&&(n=!1),P$u(e,o,i),g$C(o)||(x$z(e,o,i),F$y(e,o,i)),l)for(var u=0;u<s;++u){var c=a[u];r.push(c)}}return n}function w$s(e,t,i){var n,r=d$E.stack,o=d$E.ancestorStack;for(r.push(t);r.length>0||o.length>0;){if(d$E.stackMaximumLength=Math.max(d$E.stackMaximumLength,r.length),d$E.ancestorStackMaximumLength=Math.max(d$E.ancestorStackMaximumLength,o.length),o.length>0){var a=o.peek();if(a._stackLength===r.length){o.pop(),a!==n&&(a._finalResolution=!1),b$E(e,a,i);continue}}var s=r.pop();if(e$2b(s)){var l=s.refine===f$D.ADD,u=s._shouldSelect,c=s.children,h=c.length,d=A$B(e,s);if(u)if(l)b$E(e,s,i);else{if(s._selectionDepth=o.length,s._selectionDepth>0&&(e._hasMixedContent=!0),n=s,!d){b$E(e,s,i);continue}o.push(s),s._stackLength=r.length}if(d)for(var f=0;f<h;++f){var p=c[f];g$C(p)&&r.push(p)}}}}W$x.selectTiles=function(e,t){if(e._requestedTiles.length=0,!e.debugFreezeFrame){e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e._hasMixedContent=!1;var i=e.root;if(P$u(e,i,t),g$C(i)&&!(i.getScreenSpaceError(t,!0)<=e._maximumScreenSpaceError)){C$x(e)?e.immediatelyLoadDesiredLevelOfDetail?B$r(e,i,t):z$u(e,i,t):I$G(e,i,t),k$p.stack.trim(k$p.stackMaximumLength),E$y.stack.trim(E$y.stackMaximumLength),S$s.stack.trim(S$s.stackMaximumLength),d$E.stack.trim(d$E.stackMaximumLength),d$E.ancestorStack.trim(d$E.ancestorStackMaximumLength);for(var n=e._requestedTiles,r=n.length,o=0;o<r;++o)n[o].updatePriority()}}};var e$C={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},r$y=new Array(e$C.NUMBER_OF_PASSES);r$y[e$C.RENDER]=Object.freeze({traversal:W$x,isRender:!0,requestTiles:!0,ignoreCommands:!1}),r$y[e$C.PICK]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!1,ignoreCommands:!1}),r$y[e$C.SHADOW]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!1}),r$y[e$C.PRELOAD]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$C.PRELOAD_FLIGHT]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$C.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$C.MOST_DETAILED_PRELOAD]=Object.freeze({traversal:f$C,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$C.MOST_DETAILED_PICK]=Object.freeze({traversal:f$C,isRender:!1,requestTiles:!1,ignoreCommands:!1}),e$C.getPassOptions=function(e){return r$y[e]};var ue$d=Object.freeze(e$C);function t$s(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}function t$r(e,t){0===t&&(t=e$2a.EPSILON7),this._boundingSphere=new i$1c(e,t)}Object.defineProperties(t$s.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},batchTable:{get:function(){}}}),t$s.prototype.hasProperty=function(e,t){return!1},t$s.prototype.getFeature=function(e){},t$s.prototype.applyDebugSettings=function(e,t){},t$s.prototype.applyStyle=function(e){},t$s.prototype.update=function(e,t){},t$s.prototype.isDestroyed=function(){return!1},t$s.prototype.destroy=function(){return i$10(this)},Object.defineProperties(t$r.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}}),t$r.prototype.distanceToCamera=function(e){o$1q.defined("frameState",e);var t=this._boundingSphere;return Math.max(0,o$1p.distance(t.center,e.camera.positionWC)-t.radius)},t$r.prototype.intersectPlane=function(e){return o$1q.defined("plane",e),i$1c.intersectPlane(this._boundingSphere,e)},t$r.prototype.update=function(e,t){o$1p.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t},t$r.prototype.createDebugVolume=function(e){return o$1q.defined("color",e),new y$S({geometryInstances:new d$1o({geometry:new a$U({radius:this.radius}),id:"outline",modelMatrix:p$1d.fromTranslation(this.center,new p$1d.clone(p$1d.IDENTITY)),attributes:{color:o$16.fromColor(e)}}),appearance:new t$R({translucent:!1,flat:!0}),asynchronous:!1})};var b$D=new o$1p,h$A=new o$1p,I$F=new o$1p,S$r=new o$1p;function u$x(e,t,i){i=o$1p.cross(e,t,i);var n=o$1p.magnitude(i);return o$1p.multiplyByScalar(i,e$2a.EPSILON7/n,i)}function g$B(e,t){var i=o$1p.normalize(e,S$r);return u$x(e,o$1p.equalsEpsilon(i,o$1p.UNIT_X,e$2a.EPSILON6)?o$1p.UNIT_Y:o$1p.UNIT_X,t)}function B$q(e){var t=p$1e.getColumn(e,0,b$D),i=p$1e.getColumn(e,1,h$A),n=p$1e.getColumn(e,2,I$F),r=o$1p.equals(t,o$1p.ZERO),o=o$1p.equals(i,o$1p.ZERO),a=o$1p.equals(n,o$1p.ZERO);return r||o||a?r&&o&&a?(e[0]=e$2a.EPSILON7,e[4]=e$2a.EPSILON7,e[8]=e$2a.EPSILON7,e):(!r||o||a?r||!o||a?r||o||!a?r?o?a||(i=u$x(n,t=g$B(n,t),i)):n=u$x(i,t=g$B(i,t),n):n=u$x(i=g$B(t,i),t,n):n=u$x(i,t,n):i=u$x(t,n,i):t=u$x(i,n,t),p$1e.setColumn(e,0,t,e),p$1e.setColumn(e,1,i,e),p$1e.setColumn(e,2,n,e),e):e}function c$s(e,t){t=B$q(t),this._orientedBoundingBox=new y$Z(e,t),this._boundingSphere=i$1c.fromOrientedBoundingBox(this._orientedBoundingBox)}function c$r(e,t,i,n){this._tileset=e,this._header=i;var r=i.content;this.transform=e$2b(i.transform)?p$1d.unpack(i.transform):p$1d.clone(p$1d.IDENTITY);var o,a,s,l,u,c,h,d,f=e$2b(n)?n.computedTransform:e.modelMatrix,p=p$1d.multiply(f,this.transform,new p$1d),_=e$2b(n)?n._initialTransform:p$1d.IDENTITY;if(this._initialTransform=p$1d.multiply(_,this.transform,new p$1d),this.computedTransform=p,this._boundingVolume=this.createBoundingVolume(i.boundingVolume,p),this._boundingVolume2D=void 0,e$2b(r)&&e$2b(r.boundingVolume)&&(o=this.createBoundingVolume(r.boundingVolume,p)),this._contentBoundingVolume=o,this._contentBoundingVolume2D=void 0,e$2b(i.viewerRequestVolume)&&(a=this.createBoundingVolume(i.viewerRequestVolume,p)),this._viewerRequestVolume=a,this.geometricError=i.geometricError,this._geometricError=i.geometricError,e$2b(this._geometricError)||(this._geometricError=e$2b(n)?n.geometricError:e._geometricError,c$r._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale(),e$2b(i.refine)?(("replace"===i.refine||"add"===i.refine)&&c$r._deprecationWarning("lowercase-refine",'This tile uses a lowercase refine "'+i.refine+'". Instead use "'+i.refine.toUpperCase()+'".'),s="REPLACE"===i.refine.toUpperCase()?f$D.REPLACE:f$D.ADD):s=e$2b(n)?n.refine:f$D.REPLACE,this.refine=s,this.children=[],this.parent=n,t=t$11.createIfNeeded(t),e$2b(r)){var m=r.uri;e$2b(r.url)&&(c$r._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),m=r.url),u=!1,c=X$o.UNLOADED,(h=e.isSuperMapiServer?-1!==m.indexOf(".json")?-1===t.url.indexOf("/data/path")?t.getDerivedResource({url:"./data/path/"+m}):t.getDerivedResource({url:m}):-1===t.url.indexOf("/data/path")&&-1!==m.indexOf(".b3dm")?t.getDerivedResource({url:"./data/path/"+m}):t.getDerivedResource({url:m}):t.getDerivedResource({url:m})).url=h.url.replace(/\+/g,"%2B"),d=r$1a.getServerKey(h.getUrlComponent())}else l=new t$s(e,this),u=!0,c=X$o.READY;this._content=l,this._contentResource=h,this._contentState=c,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this._expiredContent=void 0,this._serverKey=d,this.hasEmptyContent=u,this.hasTilesetContent=!1,this.cacheNode=void 0;var g,x,v=i.expire;e$2b(v)&&(g=v.duration,e$2b(v.date)&&(x=a$15.fromIso8601(v.date))),this.expireDuration=g,this.expireDate=x,this.lastStyleTime=0,this._optimChildrenWithinParent=s$q.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.priorityDeferred=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._clippingPlanesState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=e$1U.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,this._priorityHolder=this,this._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new a$15,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}Object.defineProperties(c$s.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}}),c$s.prototype.distanceToCamera=function(e){return o$1q.defined("frameState",e),Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))},c$s.prototype.intersectPlane=function(e){return o$1q.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)},c$s.prototype.update=function(e,t){o$1p.clone(e,this._orientedBoundingBox.center),t=B$q(t),p$1e.clone(t,this._orientedBoundingBox.halfAxes),i$1c.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)},c$s.prototype.createDebugVolume=function(e){return o$1q.defined("color",e),new y$S({geometryInstances:new d$1o({geometry:new o$17({minimum:new o$1p(-1,-1,-1),maximum:new o$1p(1,1,1)}),id:"outline",modelMatrix:p$1d.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),attributes:{color:o$16.fromColor(e)}}),appearance:new t$R({translucent:!1,flat:!0}),asynchronous:!1})},c$r._deprecationWarning=t$12,Object.defineProperties(c$r.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return u$_(this._contentBoundingVolume,this._boundingVolume)}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},extras:{get:function(){return this._header.extras}},color:{get:function(){return e$2b(this._color)||(this._color=new e$1U),e$1U.clone(this._color)},set:function(e){this._color=e$1U.clone(e,this._color),this._colorDirty=!0}},contentAvailable:{get:function(){return this.contentReady&&!this.hasEmptyContent&&!this.hasTilesetContent||e$2b(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===X$o.READY}},contentUnloaded:{get:function(){return this._contentState===X$o.UNLOADED}},contentExpired:{get:function(){return this._contentState===X$o.EXPIRED}},contentFailed:{get:function(){return this._contentState===X$o.FAILED}},contentReadyToProcessPromise:{get:function(){if(e$2b(this._contentReadyToProcessPromise))return this._contentReadyToProcessPromise.promise}},contentReadyPromise:{get:function(){if(e$2b(this._contentReadyPromise))return this._contentReadyPromise.promise}},commandsLength:{get:function(){return this._commandsLength}}});var P$t=new o$1p;function Ce$9(e,t){var i=e._tileset,n=t.camera,r=e.boundingSphere,o=r.radius,a=o$1p.multiplyByScalar(n.directionWC,e._centerZDepth,P$t),s=o$1p.add(n.positionWC,a,P$t),l=o$1p.subtract(s,r.center,P$t);if(o$1p.magnitude(l)>o){var u=o$1p.normalize(l,P$t),c=o$1p.multiplyByScalar(u,o,P$t),h=o$1p.add(r.center,c,P$t),d=o$1p.subtract(h,n.positionWC,P$t),f=o$1p.normalize(d,P$t);e._foveatedFactor=1-Math.abs(o$1p.dot(n.directionWC,f))}else e._foveatedFactor=0;var p=e.refine===f$D.REPLACE,_=i._skipLevelOfDetail;if(p&&!_||!i.foveatedScreenSpaceError||1===i.foveatedConeSize||e._priorityProgressiveResolution&&p&&_||i._pass===ue$d.PRELOAD_FLIGHT||i._pass===ue$d.PRELOAD)return!1;var m=1-Math.cos(.5*n.frustum.fov),g=i.foveatedConeSize*m;if(e._foveatedFactor<=g)return!1;var x=m-g,v=e$2a.clamp((e._foveatedFactor-g)/x,0,1),y=i.foveatedInterpolationCallback(i.foveatedMinimumScreenSpaceErrorRelaxation,i.maximumScreenSpaceError,v),$=0===e._screenSpaceError&&e$2b(e.parent)?.5*e.parent._screenSpaceError:e._screenSpaceError;return i.maximumScreenSpaceError-y<=$}var X$m=new a$15;function Ee$c(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;var i=t._screenSpaceErrorProgressiveResolution>e._maximumScreenSpaceError;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;var n=t.parent,r=e._maximumScreenSpaceError,o=t._screenSpaceErrorProgressiveResolution<=r,a=e$2b(n)&&n._screenSpaceErrorProgressiveResolution>r;return o&&a&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}function be$d(e,t){var i=t.parent,n=e$2b(i)&&(!e._skipLevelOfDetail||0===t._screenSpaceError||i.hasTilesetContent)?i._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-n}function De$d(e){if(e$2b(e.expireDuration)){var t=a$15.now(X$m);a$15.addSeconds(t,e.expireDuration,t),e$2b(e.expireDate)?a$15.lessThan(e.expireDate,t)&&a$15.clone(t,e.expireDate):e.expireDate=a$15.clone(t)}}function Re$a(e,t){return function(i){e._contentState===X$o.PROCESSING?--t.statistics.numberOfTilesProcessing:--t.statistics.numberOfPendingRequests,e._contentState=X$o.FAILED,e._contentReadyPromise.reject(i),e._contentReadyToProcessPromise.reject(i)}}function Pe$8(e){return function(){return e._priority}}c$r.prototype.getScreenSpaceError=function(e,t,i){var n=this._tileset,r=u$_(i,1),o=e$2b(this.parent)?this.parent.geometricError:n._geometricError,a=t?o:this.geometricError;if(0===a)return 0;var s,l=e.camera,u=l.frustum,c=e.context,h=c.drawingBufferWidth,d=c.drawingBufferHeight*r;if(e.mode===C$13.SCENE2D||u instanceof a$V){e$2b(u._offCenterFrustum)&&(u=u._offCenterFrustum),s=a/(Math.max(u.top-u.bottom,u.right-u.left)/Math.max(h,d))}else{var f=Math.max(this._distanceToCamera,e$2a.EPSILON7);if(s=a*d/(f*l.frustum.sseDenominator),n.dynamicScreenSpaceError){var p=n._dynamicScreenSpaceErrorComputedDensity,_=n.dynamicScreenSpaceErrorFactor;s-=e$2a.fog(f,p)*_}}return s/=e.pixelRatio},c$r.prototype.updateVisibility=function(e){var t=this.parent,i=this._tileset,n=e$2b(t)?t.computedTransform:i.modelMatrix,r=e$2b(t)?t._visibilityPlaneMask:i$W.MASK_INDETERMINATE;this.updateTransform(n),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,i.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,r),this._visible=this._visibilityPlaneMask!==i$W.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=be$d(i,this),this._priorityProgressiveResolution=Ee$c(i,this),this.priorityDeferred=Ce$9(this,e)},c$r.prototype.updateExpiration=function(){if(e$2b(this.expireDate)&&this.contentReady&&!this.hasEmptyContent){var e=a$15.now(X$m);a$15.lessThan(this.expireDate,e)&&(this._contentState=X$o.EXPIRED,this._expiredContent=this._content)}},c$r.prototype.requestContent=function(){var e=this,t=this._tileset;if(this.hasEmptyContent)return!1;var i=this._contentResource.clone(),n=this.contentExpired;n&&i.setQueryParameters({expired:this.expireDate.toString()});var r=new r$1b({throttle:!0,throttleByServer:!0,type:V$15.TILES3D,priorityFunction:Pe$8(this),serverKey:this._serverKey});this._request=r,i.request=r;var o=i.fetchArrayBuffer();if(!e$2b(o))return!1;var a=this._contentState;this._contentState=X$o.LOADING,this._contentReadyToProcessPromise=o$1l.defer(),this._contentReadyPromise=o$1l.defer();var s=Re$a(this,t);return o.then((function(i){if(!e.isDestroyed()){var r,o=a$F(new Uint8Array(i)),a=i$y[o];return t._disableSkipLevelOfDetail=t._disableSkipLevelOfDetail||"vctr"===o||"geom"===o,e$2b(a)?r=a(t,e,e._contentResource,i,0):(r=i$y.json(t,e,e._contentResource,i,0),e.hasTilesetContent=!0),n&&(e.expireDate=void 0),e._content=r,e._contentState=X$o.PROCESSING,e._contentReadyToProcessPromise.resolve(r),r.readyPromise.then((function(t){e.isDestroyed()?s():(De$d(e),e._selectedFrame=0,e.lastStyleTime=0,a$15.now(e._loadTimestamp),e._contentState=X$o.READY,e._contentReadyPromise.resolve(t))}))}s()})).otherwise((function(i){if(r.state===W$1c.CANCELLED)return e._contentState=a,--t.statistics.numberOfPendingRequests,void++t.statistics.numberOfAttemptedRequests;s(i)})),!0},c$r.prototype.unloadContent=function(){this.hasEmptyContent||this.hasTilesetContent||(this._content=this._content&&this._content.destroy(),this._contentState=X$o.UNLOADED,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this.lastStyleTime=0,this.clippingPlanesDirty=0===this._clippingPlanesState,this._clippingPlanesState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var Q$s=new i$1c;function j$w(e,t){if(t.mode!==C$13.SCENE3D&&!e$2b(e._boundingVolume2D)){var i=e._boundingVolume.boundingSphere,n=i$1c.projectTo2D(i,t.mapProjection,Q$s);e._boundingVolume2D=new t$r(n.center,n.radius)}return t.mode!==C$13.SCENE3D?e._boundingVolume2D:e._boundingVolume}function Te$a(e,t){if(t.mode!==C$13.SCENE3D&&!e$2b(e._contentBoundingVolume2D)){var i=e._contentBoundingVolume.boundingSphere,n=i$1c.projectTo2D(i,t.mapProjection,Q$s);e._contentBoundingVolume2D=new t$r(n.center,n.radius)}return t.mode!==C$13.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}c$r.prototype.visibility=function(e,t){var i=e.cullingVolume,n=j$w(this,e),r=this._tileset,o=r.clippingPlanes;if(e$2b(o)&&o.enabled){var a=o.computeIntersectionWithBoundingVolume(n,r.clippingPlanesOriginMatrix);if(this._isClipped=a!==Ae$u.INSIDE,a===Ae$u.OUTSIDE)return i$W.MASK_OUTSIDE}return i.computeVisibilityWithPlaneMask(n,t)},c$r.prototype.contentVisibility=function(e){if(!e$2b(this._contentBoundingVolume))return Ae$u.INSIDE;if(this._visibilityPlaneMask===i$W.MASK_INSIDE)return Ae$u.INSIDE;var t=e.cullingVolume,i=Te$a(this,e),n=this._tileset,r=n.clippingPlanes;if(e$2b(r)&&r.enabled){var o=r.computeIntersectionWithBoundingVolume(i,n.clippingPlanesOriginMatrix);if(this._isClipped=o!==Ae$u.INSIDE,o===Ae$u.OUTSIDE)return Ae$u.OUTSIDE}return t.computeVisibility(i)},c$r.prototype.distanceToTile=function(e){return j$w(this,e).distanceToCamera(e)};var Be$b=new o$1p;c$r.prototype.distanceToTileCenter=function(e){var t=j$w(this,e).boundingVolume,i=o$1p.subtract(t.center,e.camera.positionWC,Be$b);return o$1p.dot(e.camera.directionWC,i)},c$r.prototype.insideViewerRequestVolume=function(e){var t=this._viewerRequestVolume;return!e$2b(t)||0===t.distanceToCamera(e)};var $$s=new p$1e,ee$l=new o$1p,we$9=new p$1e,te$g=new o$1p,re$l=new h$18,xe$a=new y$Z,K$r=new p$1d;function Le$d(e,t,i){var n=o$1p.fromElements(e[0],e[1],e[2],te$g),r=p$1e.fromArray(e,3,we$9);n=p$1d.multiplyByPoint(t,n,n);var o=p$1d.getMatrix3(t,$$s);return r=p$1e.multiply(o,r,r),e$2b(i)?(i.update(n,r),i):new c$s(n,r)}function qe$4(e,t,i,n){var r=h$18.unpack(e,0,re$l),o=e[4],a=e[5],s=y$Z.fromRectangle(r,o,a,t$13.WGS84,xe$a),l=s.center,u=s.halfAxes;t=p$1d.multiplyTransformation(t,p$1d.inverseTransformation(i,K$r),K$r),l=p$1d.multiplyByPoint(t,l,l);var c=p$1d.getMatrix3(t,$$s);return u=p$1e.multiply(c,u,u),e$2b(n)&&n instanceof c$s?(n.update(l,u),n):new c$s(l,u)}function Fe$b(e,t,i,n){return p$1d.equalsEpsilon(t,i,e$2a.EPSILON8)?e$2b(n)?n:new y$K({rectangle:h$18.unpack(e,0,re$l),minimumHeight:e[4],maximumHeight:e[5]}):qe$4(e,t,i,n)}function Ie$9(e,t,i){var n=o$1p.fromElements(e[0],e[1],e[2],te$g),r=e[3];n=p$1d.multiplyByPoint(t,n,n);var o=p$1d.getScale(t,ee$l);return r*=o$1p.maximumComponent(o),e$2b(i)?(i.update(n,r),i):new t$r(n,r)}function Oe$b(e,t,i,n){if(n.isRender){var r=e$2b(e._header.content)&&e$2b(e._header.content.boundingVolume),o=e.hasEmptyContent||e.hasTilesetContent,a=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!r;if(a){var s;s=e._finalResolution?o?e$1U.DARKGRAY:e$1U.WHITE:e$1U.YELLOW,e$2b(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(s)),e._debugBoundingVolume.update(i);var l=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");l.color=o$16.toValue(s,l.color)}else!a&&e$2b(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&r?(e$2b(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(e$1U.BLUE)),e._debugContentBoundingVolume.update(i)):!t.debugShowContentBoundingVolume&&e$2b(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&e$2b(e._viewerRequestVolume)?(e$2b(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(e$1U.YELLOW)),e._debugViewerRequestVolume.update(i)):!t.debugShowViewerRequestVolume&&e$2b(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());var u=t.debugColorizeTiles&&!e._debugColorizeTiles||e$2b(t._heatmap.tilePropertyName),c=!t.debugColorizeTiles&&e._debugColorizeTiles;u?(t._heatmap.colorize(e,i),e._debugColorizeTiles=!0,e.color=e._debugColor):c&&(e._debugColorizeTiles=!1,e.color=e$1U.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),c&&t.makeStyleDirty()}}function Ae$b(e,t,i){var n=e._content,r=e._expiredContent;if(e$2b(r)){if(!e.contentReady)return void r.update(t,i);e._expiredContent.destroy(),e._expiredContent=void 0}n.update(t,i)}function Me$d(e,t){var i=t.clippingPlanes,n=0;e$2b(i)&&e._isClipped&&i.enabled&&(n=i.clippingPlanesState),n!==e._clippingPlanesState&&(e._clippingPlanesState=n,e.clippingPlanesDirty=!0)}c$r.prototype.createBoundingVolume=function(e,t,i){if(!e$2b(e))throw new t$14("boundingVolume must be defined");if(e$2b(e.box))return Le$d(e.box,t,i);if(e$2b(e.region))return Fe$b(e.region,t,this._initialTransform,i);if(e$2b(e.sphere))return Ie$9(e.sphere,t,i);throw new t$14("boundingVolume must contain a sphere, region, or box")},c$r.prototype.updateTransform=function(e){e=u$_(e,p$1d.IDENTITY);var t=p$1d.multiply(e,this.transform,K$r);if(!p$1d.equals(t,this.computedTransform)){p$1d.clone(t,this.computedTransform);var i=this._header,n=this._header.content;this._boundingVolume=this.createBoundingVolume(i.boundingVolume,this.computedTransform,this._boundingVolume),e$2b(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(n.boundingVolume,this.computedTransform,this._contentBoundingVolume)),e$2b(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(i.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy()}},c$r.prototype.updateGeometricErrorScale=function(){var e=p$1d.getScale(this.computedTransform,ee$l),t=o$1p.maximumComponent(e);this.geometricError=this._geometricError*t},c$r.prototype.update=function(e,t,i){var n=t.commandList.length;Me$d(this,e),Oe$b(this,e,t,i),Ae$b(this,e,t),this._commandsLength=t.commandList.length-n,this.clippingPlanesDirty=!1};var ie$e=[];function ne$k(e,t,i){var n=e*Math.pow(10,t);return parseInt(n)*Math.pow(10,i)}function F$x(e,t,i){return Math.max(e$2a.normalize(e,t,i)-e$2a.EPSILON7,0)}c$r.prototype.process=function(e,t){var i=t.commandList;t.commandList=ie$e,this._content.update(e,t),ie$e.length=0,t.commandList=i},c$r.prototype.updatePriority=function(){var e=this.tileset,t=e.preferLeaves,i=e._minimumPriority,n=e._maximumPriority,r=Math.pow(10,8),o=Math.pow(10,9),a=Math.pow(10,10),s=F$x(this._depth,i.depth,n.depth);s=t?1-s:s;var l=ne$k(!e._skipLevelOfDetail&&this.refine===f$D.REPLACE?F$x(this._priorityHolder._distanceToCamera,i.distance,n.distance):F$x(this._priorityReverseScreenSpaceError,i.reverseScreenSpaceError,n.reverseScreenSpaceError),4,0),u=this._priorityProgressiveResolution?0:r,c=ne$k(F$x(this._priorityHolder._foveatedFactor,i.foveatedFactor,n.foveatedFactor),4,4),h=this.priorityDeferred?o:0,d=e._pass===ue$d.PRELOAD_FLIGHT?0:a;this._priority=s+l+u+c+h+d},c$r.prototype.isDestroyed=function(){return!1},c$r.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),i$10(this)};var I$E={},y$u=new o$1p;function e$B(){this._list=new h$P,this._sentinel=this._list.add(),this._trimTiles=!1}function a$s(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function f$B(e,t){return"_loadTimestamp"===t?a$15.toDate(e).getTime():e}function L$y(e,t){var i=e.tilePropertyName;if(e$2b(i)){var n=f$B(t[i],i);return e$2b(n)?(e._maximum=Math.max(n,e._maximum),e._minimum=Math.min(n,e._minimum),n):(e.tilePropertyName=void 0,n)}}I$E.checkChildrenWithinParent=function(e){o$1q.typeOf.object("tile",e);var t=e.children,i=t.length,n=e.boundingVolume;if(n instanceof c$s||n instanceof y$K){var r=n._orientedBoundingBox;e._optimChildrenWithinParent=s$q.USE_OPTIMIZATION;for(var o=0;o<i;++o){var a=t[o].boundingVolume;if(!(a instanceof c$s||a instanceof y$K)){e._optimChildrenWithinParent=s$q.SKIP_OPTIMIZATION;break}var s=a._orientedBoundingBox,l=o$1p.subtract(s.center,r.center,y$u),u=o$1p.magnitude(l);if(o$1p.divideByScalar(l,u,l),Math.abs(r.halfAxes[0]*l.x)+Math.abs(r.halfAxes[1]*l.y)+Math.abs(r.halfAxes[2]*l.z)+Math.abs(r.halfAxes[3]*l.x)+Math.abs(r.halfAxes[4]*l.y)+Math.abs(r.halfAxes[5]*l.z)+Math.abs(r.halfAxes[6]*l.x)+Math.abs(r.halfAxes[7]*l.y)+Math.abs(r.halfAxes[8]*l.z)<=Math.abs(s.halfAxes[0]*l.x)+Math.abs(s.halfAxes[1]*l.y)+Math.abs(s.halfAxes[2]*l.z)+Math.abs(s.halfAxes[3]*l.x)+Math.abs(s.halfAxes[4]*l.y)+Math.abs(s.halfAxes[5]*l.z)+Math.abs(s.halfAxes[6]*l.x)+Math.abs(s.halfAxes[7]*l.y)+Math.abs(s.halfAxes[8]*l.z)+u){e._optimChildrenWithinParent=s$q.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===s$q.USE_OPTIMIZATION},e$B.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)},e$B.prototype.touch=function(e){var t=e.cacheNode;e$2b(t)&&this._list.splice(this._sentinel,t)},e$B.prototype.add=function(e){e$2b(e.cacheNode)||(e.cacheNode=this._list.add(e))},e$B.prototype.unloadTile=function(e,t,i){var n=t.cacheNode;!e$2b(n)||(this._list.remove(n),t.cacheNode=void 0,i(e,t))},e$B.prototype.unloadTiles=function(e,t){var i=this._trimTiles;this._trimTiles=!1;for(var n=this._list,r=1024*e.maximumMemoryUsage*1024,o=this._sentinel,a=n.head;a!==o&&(e.totalMemoryUsageInBytes>r||i);){var s=a.item;a=a.next,this.unloadTile(e,s,t)}},e$B.prototype.trim=function(){this._trimTiles=!0},a$s.prototype.setReferenceMinimumMaximum=function(e,t,i){this._referenceMinimum[i]=f$B(e,i),this._referenceMaximum[i]=f$B(t,i)};var p$v=[new e$1U(.1,.1,.1,1),new e$1U(.153,.278,.878,1),new e$1U(.827,.231,.49,1),new e$1U(.827,.188,.22,1),new e$1U(1,.592,.259,1),new e$1U(1,.843,0,1)];function r$x(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.batchTableByteLength=0}function f$A(e,t,i,n){var r=t.innerContents,o=t.pointsLength,a=t.trianglesLength,s=t.featuresLength,l=t.geometryByteLength,u=t.texturesByteLength,c=t.batchTableByteLength;if(n?(e.numberOfFeaturesLoaded+=i?-s:s,e.numberOfPointsLoaded+=i?-o:o,e.geometryByteLength+=i?-l:l,e.texturesByteLength+=i?-u:u,e.batchTableByteLength+=i?-c:c):(e.numberOfFeaturesSelected+=i?-s:s,e.numberOfPointsSelected+=i?-o:o,e.numberOfTrianglesSelected+=i?-a:a),e$2b(r))for(var h=r.length,d=0;d<h;++d)f$A(e,r[d],i,n)}function p$u(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.url",e.url),this._url=void 0,this._basePath=void 0,this._root=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._extensionsUsed=void 0,this._gltfUpAxis=void 0,this._cache=new e$B,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._cullWithChildrenBounds=u$_(e.cullWithChildrenBounds,!0),this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new r$R,this._maximumScreenSpaceError=u$_(e.maximumScreenSpaceError,16),this._maximumMemoryUsage=u$_(e.maximumMemoryUsage,512),this._styleEngine=new e$1r,this._modelMatrix=e$2b(e.modelMatrix)?p$1d.clone(e.modelMatrix):p$1d.clone(p$1d.IDENTITY),this._statistics=new r$x,this._statisticsLast=new r$x,this._statisticsPerPass=new Array(ue$d.NUMBER_OF_PASSES);for(var t=0;t<ue$d.NUMBER_OF_PASSES;++t)this._statisticsPerPass[t]=new r$x;this._requestedTilesInFlight=[],this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,reverseScreenSpaceError:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,reverseScreenSpaceError:Number.MAX_VALUE},this._heatmap=new a$s(e.debugHeatmapTilePropertyName),this.cullRequestsWhileMoving=u$_(e.cullRequestsWhileMoving,!0),this._cullRequestsWhileMoving=!1,this._visibleViewport=4095,this.cullRequestsWhileMovingMultiplier=u$_(e.cullRequestsWhileMovingMultiplier,60),this.progressiveResolutionHeightFraction=e$2a.clamp(u$_(e.progressiveResolutionHeightFraction,.3),0,.5),this.preferLeaves=u$_(e.preferLeaves,!1),this._tilesLoaded=!1,this._initialTilesLoaded=!1,this._tileDebugLabels=void 0,this._readyPromise=o$1l.defer(),this._classificationType=e.classificationType,this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._initialClippingPlanesOriginMatrix=p$1d.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this.preloadWhenHidden=u$_(e.preloadWhenHidden,!1),this.preloadFlightDestinations=u$_(e.preloadFlightDestinations,!0),this._pass=void 0,this.dynamicScreenSpaceError=u$_(e.dynamicScreenSpaceError,!1),this.foveatedScreenSpaceError=u$_(e.foveatedScreenSpaceError,!0),this._foveatedConeSize=u$_(e.foveatedConeSize,.1),this._foveatedMinimumScreenSpaceErrorRelaxation=u$_(e.foveatedMinimumScreenSpaceErrorRelaxation,0),this.foveatedInterpolationCallback=u$_(e.foveatedInterpolationCallback,e$2a.lerp),this.foveatedTimeDelay=u$_(e.foveatedTimeDelay,.2),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorFactor=4,this.dynamicScreenSpaceErrorHeightFalloff=.25,this._dynamicScreenSpaceErrorComputedDensity=0,this.shadows=u$_(e.shadows,W$W.ENABLED),this.show=u$_(e.show,!0),this.colorBlendMode=L$I.HIGHLIGHT,this.colorBlendAmount=.5,this.pointCloudShading=new o$Z(e.pointCloudShading),this._pointCloudEyeDomeLighting=new m$U,this.loadProgress=new o$1h,this.allTilesLoaded=new o$1h,this.initialTilesLoaded=new o$1h,this.tileLoad=new o$1h,this.tileUnload=new o$1h,this.tileFailed=new o$1h,this.tileVisible=new o$1h,this.skipLevelOfDetail=u$_(e.skipLevelOfDetail,!1),this._skipLevelOfDetail=this.skipLevelOfDetail,this._disableSkipLevelOfDetail=!1,this.baseScreenSpaceError=u$_(e.baseScreenSpaceError,1024),this.skipScreenSpaceErrorFactor=u$_(e.skipScreenSpaceErrorFactor,16),this.skipLevels=u$_(e.skipLevels,1),this.immediatelyLoadDesiredLevelOfDetail=u$_(e.immediatelyLoadDesiredLevelOfDetail,!1),this.loadSiblings=u$_(e.loadSiblings,!1),this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._imageBasedLightingFactor=new o$1o(1,1),o$1o.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=u$_(e.luminanceAtZenith,.2),this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps,this.debugFreezeFrame=u$_(e.debugFreezeFrame,!1),this.debugColorizeTiles=u$_(e.debugColorizeTiles,!1),this.debugWireframe=u$_(e.debugWireframe,!1),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.debugShowContentBoundingVolume=u$_(e.debugShowContentBoundingVolume,!1),this.debugShowViewerRequestVolume=u$_(e.debugShowViewerRequestVolume,!1),this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=u$_(e.debugShowGeometricError,!1),this.debugShowRenderingStatistics=u$_(e.debugShowRenderingStatistics,!1),this.debugShowMemoryUsage=u$_(e.debugShowMemoryUsage,!1),this.debugShowUrl=u$_(e.debugShowUrl,!1),this.isSuperMapiServer=u$_(e.isSuperMapiServer,!1),this._swipeRegion=new e$29(0,0,1,1),this._swipeEnabled=!1;var i,n=this;o$1l(e.url).then((function(e){var t;return i=t$11.createIfNeeded(e),n._credits=i.credits,"json"===i.extension?t=i.getBaseUri(!0):i.isDataUri&&(t=""),n._url=i.url,n._basePath=t,p$u.loadJson(i)})).then((function(e){n._root=n.loadTileset(i,e);var t=e$2b(e.asset.gltfUpAxis)?v$y.fromName(e.asset.gltfUpAxis):v$y.Y,r=e.asset;n._asset=r,n._properties=e.properties,n._geometricError=e.geometricError,n._extensionsUsed=e.extensionsUsed,n._gltfUpAxis=t,n._extras=e.extras;var o=r.extras;if(e$2b(o)&&e$2b(o.supermap3d)&&e$2b(o.supermap3d.credits)){var a=o.supermap3d.credits,s=n._credits;e$2b(s)||(s=[],n._credits=s);for(var l=0;l<a.length;++l){var u=a[l];s.push(new r$T(u.html,u.showOnScreen))}}var c=n._root.createBoundingVolume(e.root.boundingVolume,p$1d.IDENTITY).boundingSphere.center,h=n._ellipsoid.cartesianToCartographic(c);e$2b(h)&&h.height>e$1E._defaultMinTerrainHeight&&(n._initialClippingPlanesOriginMatrix=m$17.eastNorthUpToFixedFrame(c)),n._clippingPlanesOriginMatrix=p$1d.clone(n._initialClippingPlanesOriginMatrix),n._readyPromise.resolve(n)})).otherwise((function(e){n._readyPromise.reject(e)}))}a$s.prototype.colorize=function(e,t){if(e$2b(this.tilePropertyName)&&e.contentAvailable&&e._selectedFrame===t.frameNumber){var i=L$y(this,e),n=this._previousMinimum,r=this._previousMaximum;if(n!==Number.MAX_VALUE&&r!==-Number.MAX_VALUE){var o=r-n+e$2a.EPSILON7,a=e$2a.clamp(i-n,0,o)/o*(p$v.length-1),s=Math.floor(a),l=Math.ceil(a),u=a-s,c=p$v[s],h=p$v[l],d=e$1U.clone(e$1U.WHITE);d.red=e$2a.lerp(c.red,h.red,u),d.green=e$2a.lerp(c.green,h.green,u),d.blue=e$2a.lerp(c.blue,h.blue,u),e._debugColor=d}}},a$s.prototype.resetMinimumMaximum=function(){var e=this.tilePropertyName;if(e$2b(e)){var t=this._referenceMinimum[e],i=this._referenceMaximum[e],n=e$2b(t)&&e$2b(i);this._previousMinimum=n?t:this._minimum,this._previousMaximum=n?i:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}},r$x.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0},r$x.prototype.incrementSelectionCounts=function(e){f$A(this,e,!1,!1)},r$x.prototype.incrementLoadCounts=function(e){f$A(this,e,!1,!0)},r$x.prototype.decrementLoadCounts=function(e){f$A(this,e,!0,!0)},r$x.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.selected=e.selected,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.batchTableByteLength=e.batchTableByteLength},Object.defineProperties(p$u.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){if(!this.ready)throw new t$16("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._asset}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){h$K.setOwner(e,this,"_clippingPlanes")}},properties:{get:function(){if(!this.ready)throw new t$16("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._properties}},ready:{get:function(){return e$2b(this._root)}},readyPromise:{get:function(){return this._readyPromise.promise}},tilesLoaded:{get:function(){return this._tilesLoaded}},url:{get:function(){return this._url}},basePath:{get:function(){return t$12("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("maximumScreenSpaceError",e,0),this._maximumScreenSpaceError=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMemoryUsage=e}},root:{get:function(){if(!this.ready)throw new t$16("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._root}},boundingSphere:{get:function(){if(!this.ready)throw new t$16("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=p$1d.clone(e,this._modelMatrix)}},swipeRegion:{get:function(){return new f$18(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2b(e)){if(!(e instanceof f$18))throw new t$16("swipeRegion must be a instance of BoundingRectangle.");e$29.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){if(e!==this._swipeEnabled){e||e$29.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e;var t=[];for(t.push(this.root);t.length>0;)for(var i=t.pop().children,n=i.length,r=0;r<n;++r)if(t.push(i[r]),e$2b(i[r]._content)){var o=i[r]._content._model;!e$2b(o)||(o._shouldRegenerateShaders=!0)}}}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){var e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return e$2b(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(p$1d.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):p$1d.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("foveatedConeSize",e,0),o$1q.typeOf.number.lessThanOrEquals("foveatedConeSize",e,1),this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,0),o$1q.typeOf.number.lessThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,this.maximumScreenSpaceError),this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){if(!this.ready)throw new t$16("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._extras}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o$1q.typeOf.object("imageBasedLightingFactor",e),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),o$1o.clone(e,this._imageBasedLightingFactor)}}}),p$u.loadJson=function(e){return t$11.createIfNeeded(e).fetchJson()},p$u.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},p$u.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},p$u.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()},p$u.prototype.loadTileset=function(e,t,i){var n=t.asset;if(!e$2b(n))throw new t$14("Tileset must have an asset property.");if("0.0"!==n.version&&"1.0"!==n.version)throw new t$14("The tileset must be 3D Tiles version 0.0 or 1.0.");var r=this._statistics,o=n.tilesetVersion;e$2b(o)&&(this._basePath+="?v="+o,e.setQueryParameters({v:o}));var a=new c$r(this,e,t.root,i);e$2b(i)&&(i.children.push(a),a._depth=i._depth+1);var s=[];for(s.push(a);s.length>0;){var l=s.pop();++r.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&l.refine===f$D.ADD;var u=l._header.children;if(e$2b(u))for(var c=u.length,h=0;h<c;++h){var d=new c$r(this,e,u[h],l);l.children.push(d),d._depth=l._depth+1,s.push(d)}this._cullWithChildrenBounds&&I$E.checkChildrenWithinParent(l)}return a};var j$v=new o$1p,Me$c=new a$18,Pe$7=new p$1d,Le$c=new o$1p,xe$9=new o$1p,De$c=new o$1p;function Oe$a(e,t){var i,n,r,o,a,s=t.camera,l=e._root,u=l.contentBoundingVolume;if(u instanceof y$K)i=o$1p.normalize(s.positionWC,j$v),n=s.directionWC,r=s.positionCartographic.height,o=u.minimumHeight,a=u.maximumHeight;else{var c=p$1d.inverseTransformation(l.computedTransform,Pe$7),h=t.mapProjection.ellipsoid,d=u.boundingVolume,f=p$1d.multiplyByPoint(c,d.center,Le$c);if(o$1p.magnitude(f)>h.minimumRadius){var p=a$18.fromCartesian(f,h,Me$c);i=o$1p.normalize(s.positionWC,j$v),n=s.directionWC,r=s.positionCartographic.height,o=0,a=2*p.height}else{var _=p$1d.multiplyByPoint(c,s.positionWC,xe$9);if(i=o$1p.UNIT_Z,n=p$1d.multiplyByPointAsVector(c,s.directionWC,De$c),n=o$1p.normalize(n,n),r=_.z,u instanceof c$s){var m=l._header.boundingVolume.box[11];o=f.z-m,a=f.z+m}else if(u instanceof t$r){var g=d.radius;o=f.z-g,a=f.z+g}}}var x=o+(a-o)*e.dynamicScreenSpaceErrorHeightFalloff,v=a,y=e$2a.clamp((r-x)/(v-x),0,1),$=1-Math.abs(o$1p.dot(n,i));$*=1-y;var b=e.dynamicScreenSpaceErrorDensity;b*=$,e._dynamicScreenSpaceErrorComputedDensity=b}function Re$9(e,t){if(!t.hasEmptyContent){var i=e._statistics,n=t.contentExpired;if(!t.requestContent())return void++i.numberOfAttemptedRequests;n&&(t.hasTilesetContent?He$5(e,t):(i.decrementLoadCounts(t.content),--i.numberOfTilesWithContentReady)),++i.numberOfPendingRequests,e._requestedTilesInFlight.push(t),t.contentReadyToProcessPromise.then(Ue$9(e,t)),t.contentReadyPromise.then(qe$3(e,t)).otherwise(Be$a(e,t))}}function Ae$a(e,t){return e._priority-t._priority}function Ve$a(e,t){for(var i=e._requestedTilesInFlight,n=0,r=i.length,o=0;o<r;++o){var a=i[o],s=t.frameNumber-a._touchedFrame>=1;a._contentState===X$o.LOADING?s?(a._request.cancel(),++n):n>0&&(i[o-n]=a):++n}i.length-=n}function Fe$a(e,t){var i=e._requestedTiles,n=i.length;i.sort(Ae$a);for(var r=0;r<n;++r)Re$9(e,i[r])}function Ue$9(e,t){return function(){e._processingQueue.push(t),--e._statistics.numberOfPendingRequests,++e._statistics.numberOfTilesProcessing}}function Be$a(e,t){return function(i){var n=t._contentResource.url,r=e$2b(i.message)?i.message:i.toString();e.tileFailed.numberOfListeners>0?e.tileFailed.raiseEvent({url:n,message:r}):(console.log("A 3D tile failed to load: "+n),console.log("Error: "+r))}}function qe$3(e,t){return function(){--e._statistics.numberOfTilesProcessing,t.hasTilesetContent||(e._statistics.incrementLoadCounts(t.content),++e._statistics.numberOfTilesWithContentReady,++e._statistics.numberOfLoadedTilesTotal,e._cache.add(t)),e.tileLoad.raiseEvent(t)}}function Ne$7(e){for(var t=e._processingQueue,i=t.length,n=0,r=0;r<i;++r){var o=t[r];o._contentState===X$o.PROCESSING?n>0&&(t[r-n]=o):++n}t.length-=n}function Ie$8(e,t){Ne$7(e);for(var i=e._processingQueue,n=i.length,r=0;r<n;++r)i[r].process(e,t)}p$u.prototype.postPassesUpdate=function(e){!this.ready||(Ve$a(this,e),Ge$6(this,e),this._cache.unloadTiles(this,K$q))},p$u.prototype.prePassesUpdate=function(e){if(this.ready){Ie$8(this,e);var t=this._clippingPlanes;this._clippingPlanesOriginMatrixDirty=!0,e$2b(t)&&t.enabled&&t.update(e),e$2b(this._loadTimestamp)||(this._loadTimestamp=a$15.clone(e.time)),this._timeSinceLoad=Math.max(1e3*a$15.secondsDifference(e.time,this._loadTimestamp),0),this._skipLevelOfDetail=this.skipLevelOfDetail&&!e$2b(this._classificationType)&&!this._disableSkipLevelOfDetail&&!this._allTilesAdditive,this.dynamicScreenSpaceError&&Oe$a(this,e),e.newFrame&&this._cache.reset()}};var D$u=new o$1p,ke$6={maximumFractionDigits:3};function Q$r(e){var t=e/1048576;return t<1?t.toLocaleString(void 0,ke$6):Math.round(t).toLocaleString()}function V$m(e){var t=e.boundingVolume.boundingVolume,i=t.halfAxes,n=t.radius,r=o$1p.clone(t.center,D$u);if(e$2b(i))r.x+=.75*(i[0]+i[3]+i[6]),r.y+=.75*(i[1]+i[4]+i[7]),r.z+=.75*(i[2]+i[5]+i[8]);else if(e$2b(n)){var o=o$1p.normalize(t.center,D$u);o=o$1p.multiplyByScalar(o,.75*n,D$u),r=o$1p.add(o,t.center,D$u)}return r}function F$w(e,t,i){var n="",r=0;(t.debugShowGeometricError&&(n+="\nGeometric error: "+e.geometricError,r++),t.debugShowRenderingStatistics)&&(n+="\nCommands: "+e.commandsLength,r++,e.content.pointsLength>0&&(n+="\nPoints: "+e.content.pointsLength,r++),e.content.trianglesLength>0&&(n+="\nTriangles: "+e.content.trianglesLength,r++),n+="\nFeatures: "+e.content.featuresLength,r++);t.debugShowMemoryUsage&&(n+="\nTexture Memory: "+Q$r(e.content.texturesByteLength),n+="\nGeometry Memory: "+Q$r(e.content.geometryByteLength),r+=2),t.debugShowUrl&&(n+="\nUrl: "+e._header.content.uri,r++);var o={text:n.substring(1),position:i,font:19-r+"px sans-serif",showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(o)}function We$8(e,t){var i,n,r=e._selectedTiles,o=r.length,a=e._emptyTiles,s=a.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(e$2b(e.debugPickedTile)){var l=e$2b(e.debugPickPosition)?e.debugPickPosition:V$m(e.debugPickedTile);F$w(e.debugPickedTile,e,l).pixelOffset=new o$1o(15,-15)}}else{for(i=0;i<o;++i)F$w(n=r[i],e,V$m(n));for(i=0;i<s;++i)(n=a[i]).hasTilesetContent&&F$w(n,e,V$m(n))}e._tileDebugLabels.update(t)}function ze$9(e,t,i){e._styleEngine.applyStyle(e,i);var n,r,o=i.isRender,a=e._statistics,s=t.commandList,l=s.length,u=e._selectedTiles,c=u.length,h=e._emptyTiles,d=h.length,f=e.tileVisible,p=e._skipLevelOfDetail&&e._hasMixedContent&&t.context.stencilBuffer&&c>0;e._backfaceCommands.length=0,p&&(e$2b(e._stencilClearCommand)||(e._stencilClearCommand=new t$X({stencil:0,pass:Le$s.CESIUM_3D_TILE,renderState:d$1m.fromCache({stencilMask:u$N.SKIP_LOD_MASK})})),s.push(e._stencilClearCommand));var _=s.length;for(n=0;n<c;++n)r=u[n],o&&f.raiseEvent(r),r.update(e,t,i),a.incrementSelectionCounts(r.content),++a.selected;for(n=0;n<d;++n)(r=h[n]).update(e,t,i);var m=s.length-_;if(e._backfaceCommands.trim(),p){var g=e._backfaceCommands.values,x=g.length;for(s.length+=x,n=m-1;n>=0;--n)s[_+x+n]=s[_+n];for(n=0;n<x;++n)s[_+n]=g[n]}m=s.length-l,a.numberOfCommands=m,o&&e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&m>0&&e._pointCloudEyeDomeLighting.update(t,l,e.pointCloudShading),o&&(e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(e$2b(e._tileDebugLabels)||(e._tileDebugLabels=new g$U),We$8(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var Y$n=[];function He$5(e,t){var i=t,n=Y$n;for(n.push(t);n.length>0;){for(var r=(t=n.pop()).children,o=r.length,a=0;a<o;++a)n.push(r[a]);t!==i&&(Xe$6(e,t),--e._statistics.numberOfTilesTotal)}i.children=[]}function K$q(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function Xe$6(e,t){e._cache.unloadTile(e,t,K$q),t.destroy()}function Ge$6(e,t){var i=e._statistics,n=e._statisticsLast,r=i.numberOfPendingRequests,o=i.numberOfTilesProcessing,a=n.numberOfPendingRequests,s=n.numberOfTilesProcessing;r$x.clone(i,n);var l=r!==a||o!==s;l&&t.afterRender.push((function(){e.loadProgress.raiseEvent(r,o)})),e._tilesLoaded=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests,l&&e._tilesLoaded&&(t.afterRender.push((function(){e.allTilesLoaded.raiseEvent()})),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push((function(){e.initialTilesLoaded.raiseEvent()}))))}function je$8(e){e._heatmap.resetMinimumMaximum(),e._minimumPriority.depth=Number.MAX_VALUE,e._maximumPriority.depth=-Number.MAX_VALUE,e._minimumPriority.foveatedFactor=Number.MAX_VALUE,e._maximumPriority.foveatedFactor=-Number.MAX_VALUE,e._minimumPriority.distance=Number.MAX_VALUE,e._maximumPriority.distance=-Number.MAX_VALUE,e._minimumPriority.reverseScreenSpaceError=Number.MAX_VALUE,e._maximumPriority.reverseScreenSpaceError=-Number.MAX_VALUE}function Qe$5(e,t){(t.frameNumber!==e._updatedModelMatrixFrame||!e$2b(e._previousModelMatrix))&&(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!p$1d.equals(e.modelMatrix,e._previousModelMatrix),e._previousModelMatrix=p$1d.clone(e.modelMatrix,e._previousModelMatrix))}function Ye$6(e,t,i,n){if(t.mode===C$13.MORPHING||!e.ready)return!1;var r=e._statistics;r.clear();var o=n.isRender;++e._updatedVisibilityFrame,je$8(e),Qe$5(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;var a=n.traversal.selectTiles(e,t),s=t.context;if(n.requestTiles&&s.memorySize<s.memoryThresholdValue&&Fe$a(e),ze$9(e,t,n),r$x.clone(r,i),o){var l=e._credits;if(e$2b(l)&&0!==r.selected)for(var u=l.length,c=0;c<u;++c)t.creditDisplay.addCredit(l[c])}return a}p$u.prototype.trimLoadedTiles=function(){this._cache.trim()},p$u.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;this.frameState=e,this.updateForPass(e,e.tilesetPassState)},p$u.prototype.updateForPass=function(e,t){o$1q.typeOf.object("frameState",e),o$1q.typeOf.object("tilesetPassState",t);var i=t.pass;if((i!==ue$d.PRELOAD||this.preloadWhenHidden&&!this.show)&&(i!==ue$d.PRELOAD_FLIGHT||this.preloadFlightDestinations&&(this.show||this.preloadWhenHidden))&&(i!==ue$d.REQUEST_RENDER_MODE_DEFER_CHECK||!(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))){var n=e.commandList,r=e.camera,o=e.cullingVolume;t.ready=!1;var a=ue$d.getPassOptions(i),s=a.ignoreCommands,l=u$_(t.commandList,n),u=l.length;e.commandList=l,e.camera=u$_(t.camera,r),e.cullingVolume=u$_(t.cullingVolume,o);var c=this._statisticsPerPass[i];(this.show||s)&&(this._pass=i,t.ready=Ye$6(this,e,c,a)),s&&(l.length=u),e.commandList=n,e.camera=r,e.cullingVolume=o}},p$u.prototype.hasExtension=function(e){return!!e$2b(this._extensionsUsed)&&this._extensionsUsed.indexOf(e)>-1},p$u.prototype.isDestroyed=function(){return!1},p$u.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),e$2b(this._root)){var e=Y$n;for(e.push(this._root);e.length>0;){var t=e.pop();t.destroy();for(var i=t.children,n=i.length,r=0;r<n;++r)e.push(i[r])}}return this._root=void 0,i$10(this)};var P$s=new p$1d;function l$E(e,t){if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(t))throw new t$16("entityCollection is required.");t.collectionChanged.addEventListener(l$E.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new e$1N,this._onCollectionChanged(t,t.values,[],[])}function _$r(e,t,i,n){var r=i[t.id];e$2b(r)&&(n.removeAndDestroy(r.tilesetPrimitive),delete i[t.id])}function V$l(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}l$E.prototype.update=function(e){if(!e$2b(e))throw new t$16("time is required.");for(var t=this._entitiesToVisualize.values,i=this._tilesetHash,n=this._primitives,r=0,o=t.length;r<o;r++){var a,s,l=t[r],u=l._tileset,c=i[l.id],h=l.isShowing&&l.isAvailable(e)&&r$Z.getValueOrDefault(u._show,e,!0);if(h&&(s=l.computeModelMatrix(e,P$s),a=t$11.createIfNeeded(r$Z.getValueOrUndefined(u._uri,e))),h){var d=e$2b(c)?c.tilesetPrimitive:void 0;(!e$2b(d)||a.url!==c.url)&&(e$2b(d)&&(n.removeAndDestroy(d),delete i[l.id]),(d=new p$u({url:a})).id=l,n.add(d),c={tilesetPrimitive:d,url:a.url,loadFail:!1},i[l.id]=c,V$l(d,l,i)),d.show=!0,e$2b(s)&&(d.modelMatrix=s),d.maximumScreenSpaceError=r$Z.getValueOrDefault(u.maximumScreenSpaceError,e,d.maximumScreenSpaceError)}else e$2b(c)&&(c.tilesetPrimitive.show=!1)}return!0},l$E.prototype.isDestroyed=function(){return!1},l$E.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$E.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._tilesetHash,i=this._primitives,n=e.length-1;n>-1;n--)_$r(this,e[n],t,i);return i$10(this)},l$E.prototype.getBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("entity is required.");if(!e$2b(t))throw new t$16("result is required.");var i=this._tilesetHash[e.id];if(!e$2b(i)||i.loadFail)return R$w.FAILED;var n=i.tilesetPrimitive;return e$2b(n)&&n.show?n.ready?(i$1c.clone(n.boundingSphere,t),R$w.DONE):R$w.PENDING:R$w.FAILED},l$E.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._entitiesToVisualize,s=this._tilesetHash,l=this._primitives;for(r=t.length-1;r>-1;r--)e$2b((o=t[r])._tileset)&&a.set(o.id,o);for(r=n.length-1;r>-1;r--)e$2b((o=n[r])._tileset)?a.set(o.id,o):(_$r(this,o,s,l),a.remove(o.id));for(r=i.length-1;r>-1;r--)_$r(this,o=i[r],s,l),a.remove(o.id)};var f$z=e$1U.WHITE,p$t=e$1U.BLACK,u$w=new o$1o(2,2);function r$w(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(r$w.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._evenColor)&&r$Z.isConstant(this._oddColor)&&r$Z.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:C$$("evenColor"),oddColor:C$$("oddColor"),repeat:C$$("repeat")}),r$w.prototype.getType=function(e){return"Checkerboard"},r$w.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.lightColor=r$Z.getValueOrClonedDefault(this._evenColor,e,f$z,t.lightColor),t.darkColor=r$Z.getValueOrClonedDefault(this._oddColor,e,p$t,t.darkColor),t.repeat=r$Z.getValueOrDefault(this._repeat,e,u$w),t},r$w.prototype.equals=function(e){return this===e||e instanceof r$w&&r$Z.equals(this._evenColor,e._evenColor)&&r$Z.equals(this._oddColor,e._oddColor)&&r$Z.equals(this._repeat,e._repeat)};var A$A={id:void 0};function _$q(e){if(e._firing)e._refire=!0;else if(0===e._suspendCount){var t=e._addedEntities,i=e._removedEntities,n=e._changedEntities;if(0!==n.length||0!==t.length||0!==i.length){e._firing=!0;do{e._refire=!1;var r=t.values.slice(0),o=i.values.slice(0),a=n.values.slice(0);t.removeAll(),i.removeAll(),n.removeAll(),e._collectionChanged.raiseEvent(e,r,o,a)}while(e._refire);e._firing=!1}}}function r$v(e){this._owner=e,this._entities=new e$1N,this._addedEntities=new e$1N,this._removedEntities=new e$1N,this._changedEntities=new e$1N,this._suspendCount=0,this._collectionChanged=new o$1h,this._id=e$1Q(),this._show=!0,this._firing=!1,this._refire=!1}function b$C(e){if(e$2b(e.box))return{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),box:{dimensions:new o$1p(e.box.dimensions.x,e.box.dimensions.y,e.box.dimensions.z),material:new e$1U(0,0,1,.2)}};if(e$2b(e.cylinder))return{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),cylinder:{length:e.cylinder.length,topRadius:e.cylinder.topRadius,bottomRadius:e.cylinder.bottomRadius,material:new e$1U(0,0,1,.2)}};if(e$2b(e.billboard))return{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),billboard:{image:e.imagePath,width:e.width,height:e.height}};if(e$2b(e.ellipsoid))return e$2b(e.radius)?{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.radius),ellipsoid:{radii:new o$1p(e.radius,e.radius,e.radius),material:new e$1U(0,0,1,.2)}}:{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.yAxis),ellipsoid:{radii:new o$1p(e.ellipsoid.radii.x,e.ellipsoid.radii.y,e.ellipsoid.radii.z),material:new e$1U(0,0,1,.2)}};if(e$2b(e.polygon))return{polygon:{hierarchy:e.polygon.positions,material:new e$1U(1,0,0,.1),extrudedHeight:e.polygon.extrudedHeight,perPositionHeight:e.polygon.perPositionHeight,height:e.polygon.height}};if(e$2b(e.polyline)){for(var t=[],i=0,n=e.polyline.positions.length;i<n;++i)t.push(o$1p.fromDegrees(e.polyline.positions[i].x,e.polyline.positions[i].y,e.polyline.positions[i].z));return{polyline:{positions:t,width:5,material:new e$1U(1,0,0,1)}}}return e$2b(e.ellipse)?{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z),ellipse:{semiMinorAxis:e.ellipse.semiMinorAxis,semiMajorAxis:e.ellipse.semiMajorAxis,height:e.position.z,material:new e$1U(0,0,1,.2)}}:"POINT3D"===e.type?{position:o$1p.fromDegrees(e.x,e.y,e.z),point:new n$M({color:new e$1U(1,1,0),pixelSize:10,outlineColor:new e$1U(0,1,1)})}:{}}r$v.prototype.suspendEvents=function(){this._suspendCount++},r$v.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new t$16("resumeEvents can not be called before suspendEvents.");this._suspendCount--,_$q(this)},r$v.collectionChangedEventCallback=void 0,Object.defineProperties(r$v.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(!e$2b(e))throw new t$16("value is required.");if(e!==this._show){this.suspendEvents();var t,i=[],n=this._entities.values,r=n.length;for(t=0;t<r;t++)i.push(n[t].isShowing);for(this._show=e,t=0;t<r;t++){var o=i[t],a=n[t];o!==a.isShowing&&a.definitionChanged.raiseEvent(a,"isShowing",a.isShowing,o)}this.resumeEvents()}}},owner:{get:function(){return this._owner}}}),r$v.prototype.computeAvailability=function(){for(var e=o$H.MAXIMUM_VALUE,t=o$H.MINIMUM_VALUE,i=this._entities.values,n=0,r=i.length;n<r;n++){var o=i[n].availability;if(e$2b(o)){var a=o.start,s=o.stop;a$15.lessThan(a,e)&&!a.equals(o$H.MINIMUM_VALUE)&&(e=a),a$15.greaterThan(s,t)&&!s.equals(o$H.MAXIMUM_VALUE)&&(t=s)}}return o$H.MAXIMUM_VALUE.equals(e)&&(e=o$H.MINIMUM_VALUE),o$H.MINIMUM_VALUE.equals(t)&&(t=o$H.MAXIMUM_VALUE),new d$W({start:e,stop:t})},r$v.prototype.add=function(e){if(!e$2b(e))throw new t$16("entity is required.");e instanceof o$11&&(e=b$C(e)),e instanceof h$V||(e=new h$V(e));var t=e.id,i=this._entities;if(i.contains(t))throw new t$14("An entity with id "+t+" already exists in this collection.");return e.entityCollection=this,i.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(r$v.prototype._onEntityDefinitionChanged,this),_$q(this),e},r$v.prototype.remove=function(e){return!!e$2b(e)&&this.removeById(e.id)},r$v.prototype.contains=function(e){if(!e$2b(e))throw new t$16("entity is required");return!!e$2b(e.id)&&this._entities.get(e.id)===e},r$v.prototype.removeById=function(e){if(!e$2b(e))return!1;var t=this._entities.get(e);return!!this._entities.remove(e)&&(e$2b(t._polygon)&&e$2b(t._polygon.outlines)&&t._polygon.outlines.removeAll(),e$2b(t._polygon)&&e$2b(t._polygon.clampOutlines)&&t.entityCollection._owner._entityCluster._scene._primitives.remove(t._polygon.clampOutlines),this._addedEntities.remove(e)||(this._removedEntities.set(e,t),this._changedEntities.remove(e)),this._entities.remove(e),t.definitionChanged.removeEventListener(r$v.prototype._onEntityDefinitionChanged,this),_$q(this),!0)},r$v.prototype.removeAll=function(){for(var e=this._entities,t=e.length,i=e.values,n=this._addedEntities,r=this._removedEntities,o=0;o<t;o++){var a=i[o];e$2b(a._polygon)&&e$2b(a._polygon.outlines)&&a._polygon.outlines.removeAll(),e$2b(a._polygon)&&e$2b(a._polygon.clampOutlines)&&a.entityCollection._owner._entityCluster._scene._primitives.remove(a._polygon.clampOutlines);var s=a.id;e$2b(n.get(s))||(a.definitionChanged.removeEventListener(r$v.prototype._onEntityDefinitionChanged,this),r.set(s,a))}e.removeAll(),n.removeAll(),this._changedEntities.removeAll(),_$q(this)},r$v.prototype.getById=function(e){if(!e$2b(e))throw new t$16("id is required.");return this._entities.get(e)},r$v.prototype.getOrCreateEntity=function(e){if(!e$2b(e))throw new t$16("id is required.");var t=this._entities.get(e);return e$2b(t)||(A$A.id=e,t=new h$V(A$A),this.add(t)),t},r$v.prototype._onEntityDefinitionChanged=function(e){var t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),_$q(this)};var w$r={id:void 0},C$w=new Array(2);function x$y(e){for(var t=e.propertyNames,i=t.length,n=0;n<i;n++)e[t[n]]=void 0;e._name=void 0,e._availability=void 0}function A$z(e,t,i,n){C$w[0]=i,C$w[1]=n.id,t[JSON.stringify(C$w)]=n.definitionChanged.addEventListener(s$p.prototype._onDefinitionChanged,e)}function T$t(e,t,i,n){C$w[0]=i,C$w[1]=n.id;var r=JSON.stringify(C$w);t[r](),t[r]=void 0}function g$A(e){if(e._shouldRecomposite=!0,0===e._suspendCount){var t,i,n,r,o,a,s=e._collections,l=s.length,u=e._collectionsCopy,c=u.length,h=e._composite,d=new r$v(e),f=e._eventHash;for(t=0;t<c;t++)for((o=u[t]).collectionChanged.removeEventListener(s$p.prototype._onCollectionChanged,e),n=o.values,a=o.id,r=n.length-1;r>-1;r--)T$t(e,f,a,i=n[r]);for(t=l-1;t>=0;t--)for((o=s[t]).collectionChanged.addEventListener(s$p.prototype._onCollectionChanged,e),n=o.values,a=o.id,r=n.length-1;r>-1;r--){A$z(e,f,a,i=n[r]);var p=d.getById(i.id);e$2b(p)||(e$2b(p=h.getById(i.id))?x$y(p):(w$r.id=i.id,p=new h$V(w$r)),d.add(p)),p.merge(i)}e._collectionsCopy=s.slice(0),h.suspendEvents(),h.removeAll();var _=d.values;for(t=0;t<_.length;t++)h.add(_[t]);h.resumeEvents()}}function s$p(e,t){this._owner=t,this._composite=new r$v(this),this._suspendCount=0,this._collections=e$2b(e)?e.slice():[],this._collectionsCopy=[],this._id=e$1Q(),this._eventHash={},g$A(this),this._shouldRecomposite=!1}function E$x(e,t){if(!e$2b(t))throw new t$16("collection is required.");var i=e.indexOf(t);if(-1===i)throw new t$16("collection is not in this composite.");return i}function q$v(e,t,i){var n=e._collections;if((t=e$2a.clamp(t,0,n.length-1))!==(i=e$2a.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,g$A(e)}}function c$q(e,t,i,n){function r(){i.raiseEvent(e)}var o=[];t.removeAll();for(var a=n.length,s=0;s<a;s++){var l=n.get(s);e$2b(l.data)&&-1===o.indexOf(l.data)&&t.add(l.data.definitionChanged,r)}}function e$A(){this._eventHelper=new n$x,this._definitionChanged=new o$1h,this._intervals=new c$z,this._intervals.changedEvent.addEventListener(e$A.prototype._intervalsChanged,this)}function e$z(){this._definitionChanged=new o$1h,this._composite=new e$A,this._composite.definitionChanged.addEventListener(e$z.prototype._raiseDefinitionChanged,this)}function t$q(e){this._referenceFrame=u$_(e,Re$k.FIXED),this._definitionChanged=new o$1h,this._composite=new e$A,this._composite.definitionChanged.addEventListener(t$q.prototype._raiseDefinitionChanged,this)}Object.defineProperties(s$p.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}}),s$p.prototype.addCollection=function(e,t){var i=e$2b(t);if(!e$2b(e))throw new t$16("collection is required.");if(i){if(t<0)throw new t$16("index must be greater than or equal to zero.");if(t>this._collections.length)throw new t$16("index must be less than or equal to the number of collections.")}i?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),g$A(this)},s$p.prototype.removeCollection=function(e){var t=this._collections.indexOf(e);return-1!==t&&(this._collections.splice(t,1),g$A(this),!0)},s$p.prototype.removeAllCollections=function(){this._collections.length=0,g$A(this)},s$p.prototype.containsCollection=function(e){return-1!==this._collections.indexOf(e)},s$p.prototype.contains=function(e){return this._composite.contains(e)},s$p.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)},s$p.prototype.getCollection=function(e){if(!e$2b(e))throw new t$16("index is required.","index");return this._collections[e]},s$p.prototype.getCollectionsLength=function(){return this._collections.length},s$p.prototype.raiseCollection=function(e){var t=E$x(this._collections,e);q$v(this,t,t+1)},s$p.prototype.lowerCollection=function(e){var t=E$x(this._collections,e);q$v(this,t,t-1)},s$p.prototype.raiseCollectionToTop=function(e){var t=E$x(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),g$A(this))},s$p.prototype.lowerCollectionToBottom=function(e){var t=E$x(this._collections,e);0!==t&&(this._collections.splice(t,1),this._collections.splice(0,0,e),g$A(this))},s$p.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()},s$p.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new t$16("resumeEvents can not be called before suspendEvents.");this._suspendCount--,this._shouldRecomposite&&0===this._suspendCount&&(g$A(this),this._shouldRecomposite=!1),this._composite.resumeEvents()},s$p.prototype.computeAvailability=function(){return this._composite.computeAvailability()},s$p.prototype.getById=function(e){return this._composite.getById(e)},s$p.prototype._onCollectionChanged=function(e,t,i){var n=this._collectionsCopy,r=n.length,o=this._composite;o.suspendEvents();var a,s,l,u,c=i.length,h=this._eventHash,d=e.id;for(a=0;a<c;a++){var f=i[a];T$t(this,h,d,f);var p=f.id;for(s=r-1;s>=0;s--)e$2b(l=n[s].getById(p))&&(e$2b(u)||x$y(u=o.getById(p)),u.merge(l));e$2b(u)||o.removeById(p),u=void 0}var _=t.length;for(a=0;a<_;a++){var m=t[a];A$z(this,h,d,m);var g=m.id;for(s=r-1;s>=0;s--)e$2b(l=n[s].getById(g))&&(e$2b(u)||(e$2b(u=o.getById(g))?x$y(u):(w$r.id=g,u=new h$V(w$r),o.add(u))),u.merge(l));u=void 0}o.resumeEvents()},s$p.prototype._onDefinitionChanged=function(e,t,i,n){for(var r=this._collections,o=this._composite,a=r.length,s=e.id,l=o.getById(s),u=l[t],c=!e$2b(u),h=!0,d=a-1;d>=0;d--){var f=r[d].getById(e.id);if(e$2b(f)){var p=f[t];if(e$2b(p)){if(h){if(h=!1,!e$2b(p.merge)||!e$2b(p.clone)){u=p;break}u=p.clone(u)}u.merge(p)}}}c&&-1===l.propertyNames.indexOf(t)&&l.addProperty(t),l[t]=u},Object.defineProperties(e$A.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),e$A.prototype.getValue=function(e,t){if(!e$2b(e))throw new t$16("time is required");var i=this._intervals.findDataForIntervalContainingDate(e);if(e$2b(i))return i.getValue(e,t)},e$A.prototype.equals=function(e){return this===e||e instanceof e$A&&this._intervals.equals(e._intervals,r$Z.equals)},e$A.prototype._intervalsChanged=function(){c$q(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)},Object.defineProperties(e$z.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}}),e$z.prototype.getType=function(e){if(!e$2b(e))throw new t$16("time is required");var t=this._composite._intervals.findDataForIntervalContainingDate(e);if(e$2b(t))return t.getType(e)},e$z.prototype.getValue=function(e,t){if(!e$2b(e))throw new t$16("time is required");var i=this._composite._intervals.findDataForIntervalContainingDate(e);if(e$2b(i))return i.getValue(e,t)},e$z.prototype.equals=function(e){return this===e||e instanceof e$z&&this._composite.equals(e._composite,r$Z.equals)},e$z.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(t$q.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}}),t$q.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$k.FIXED,t)},t$q.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2b(e))throw new t$16("time is required.");if(!e$2b(t))throw new t$16("referenceFrame is required.");var n=this._composite._intervals.findDataForIntervalContainingDate(e);if(e$2b(n))return n.getValueInReferenceFrame(e,t,i)},t$q.prototype.equals=function(e){return this===e||e instanceof t$q&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,r$Z.equals)},t$q.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var N$n=new e$1I(0);function i$x(e){i$F.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}e$2b(Object.create)&&(i$x.prototype=Object.create(i$F.prototype),i$x.prototype.constructor=i$x),Object.defineProperties(i$x.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),i$x.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!e$2b(t.height)&&!e$2b(t.extrudedHeight)&&d$14.isSupported(this._scene)},i$x.prototype._getIsClosed=function(e){var t=e.height,i=e.extrudedHeight;return 0===t||e$2b(i)&&i!==t},i$x.prototype._computeCenter=t$16.throwInstantiationError,i$x.prototype._onEntityPropertyChanged=function(e,t,i,n){if(i$F.prototype._onEntityPropertyChanged.call(this,e,t,i,n),-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(e$2b(r)){e$2b(r.zIndex)&&(e$2b(r.height)||e$2b(r.extrudedHeight))&&e$1$(e$1$.geometryZIndex),this._zIndex=u$_(r.zIndex,N$n),e$2b(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);var o=r.heightReference,a=r.extrudedHeightReference;if(e$2b(o)||e$2b(a)){var s=new n$V(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new h$E(this._scene,s,o,a)}}}},i$x.prototype.destroy=function(){e$2b(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),i$F.prototype.destroy.call(this)},i$x.getGeometryHeight=function(e,t){if(o$1q.defined("heightReference",t),e$2b(e))return t!==k$P.CLAMP_TO_GROUND?e:0;t!==k$P.NONE&&e$1$(e$1$.geometryHeightReference)},i$x.getGeometryExtrudedHeight=function(e,t){if(o$1q.defined("extrudedHeightReference",t),e$2b(e))return t!==k$P.CLAMP_TO_GROUND?e:i$x.CLAMP_TO_GROUND;t!==k$P.NONE&&e$1$(e$1$.geometryExtrudedHeightReference)},i$x.CLAMP_TO_GROUND="clamp",i$x.computeGeometryOffsetAttribute=function(e,t,i,n){(!e$2b(e)||!e$2b(t))&&(t=k$P.NONE),(!e$2b(i)||!e$2b(n))&&(n=k$P.NONE);var r=0;return t!==k$P.NONE&&r++,n===k$P.RELATIVE_TO_GROUND&&r++,2===r?_0x58701d.ALL:1===r?_0x58701d.TOP:void 0};var H$A=new e$1U,I$D=o$1p.ZERO,D$t=new o$1p,G$w=new h$18;function T$s(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function f$y(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new T$s(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}function l$D(e,t,i){a$C.call(this,e,t,i)}function o$A(){t$16.throwInstantiationError()}function s$o(e,t){if(e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$16("disableDepthTestDistance must be greater than or equal to 0.0.");var i=e.translucencyByDistance,n=e.scaleByDistance,r=e.distanceDisplayCondition;if(e$2b(i)){if(i.far<=i.near)throw new t$16("translucencyByDistance.far must be greater than translucencyByDistance.near.");i=o$Y.clone(i)}if(e$2b(n)){if(n.far<=n.near)throw new t$16("scaleByDistance.far must be greater than scaleByDistance.near.");n=o$Y.clone(n)}if(e$2b(r)){if(r.far<=r.near)throw new t$16("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");r=r$Y.clone(r)}this._show=u$_(e.show,!0),this._position=o$1p.clone(u$_(e.position,o$1p.ZERO)),this._actualPosition=o$1p.clone(this._position),this._color=e$1U.clone(u$_(e.color,e$1U.WHITE)),this._outlineColor=e$1U.clone(u$_(e.outlineColor,e$1U.TRANSPARENT)),this._outlineWidth=u$_(e.outlineWidth,0),this._pixelSize=u$_(e.pixelSize,10),this._scaleByDistance=n,this._translucencyByDistance=i,this._distanceDisplayCondition=r,this._disableDepthTestDistance=u$_(e.disableDepthTestDistance,0),this._id=e.id,this._collection=u$_(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1}e$2b(Object.create)&&(f$y.prototype=Object.create(i$x.prototype),f$y.prototype.constructor=f$y),f$y.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,H$A)),e$2b(t)||(t=e$1U.WHITE),r.color=o$16.fromColor(t));return e$2b(this._options.offsetAttribute)&&(r.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,I$D,D$t))),new d$1o({id:i,geometry:new P$F(this._options),attributes:r})},f$y.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,H$A),r={show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return e$2b(this._options.offsetAttribute)&&(r.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,I$D,D$t))),new d$1o({id:t,geometry:new V$w(this._options),attributes:r})},f$y.prototype._computeCenter=function(e,t){var i=r$Z.getValueOrUndefined(this._entity.corridor.positions,e);if(e$2b(i)&&0!==i.length)return o$1p.clone(i[Math.floor(i.length/2)],t)},f$y.prototype._isHidden=function(e,t){return!e$2b(t.positions)||!e$2b(t.width)||i$F.prototype._isHidden.call(this,e,t)},f$y.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!r$Z.isConstant(t.height)||!r$Z.isConstant(t.extrudedHeight)||!r$Z.isConstant(t.granularity)||!r$Z.isConstant(t.width)||!r$Z.isConstant(t.outlineWidth)||!r$Z.isConstant(t.cornerType)||!r$Z.isConstant(t.zIndex)||this._onTerrain&&!r$Z.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$Q)},f$y.prototype._setStaticOptions=function(e,t){var i=r$Z.getValueOrUndefined(t.height,o$H.MINIMUM_VALUE),n=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),r=r$Z.getValueOrUndefined(t.extrudedHeight,o$H.MINIMUM_VALUE),o=r$Z.getValueOrDefault(t.extrudedHeightReference,o$H.MINIMUM_VALUE,k$P.NONE);e$2b(r)&&!e$2b(i)&&(i=0);var a=this._options;a.vertexFormat=this._materialProperty instanceof t$Q?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,a.positions=t.positions.getValue(o$H.MINIMUM_VALUE,a.positions),a.width=t.width.getValue(o$H.MINIMUM_VALUE),a.granularity=r$Z.getValueOrUndefined(t.granularity,o$H.MINIMUM_VALUE),a.cornerType=r$Z.getValueOrUndefined(t.cornerType,o$H.MINIMUM_VALUE),a.offsetAttribute=i$x.computeGeometryOffsetAttribute(i,n,r,o),a.height=i$x.getGeometryHeight(i,n),(r=i$x.getGeometryExtrudedHeight(r,o))===i$x.CLAMP_TO_GROUND&&(r=e$1E.getMinimumMaximumHeights(P$F.computeRectangle(a,G$w)).minimumTerrainHeight),a.extrudedHeight=r},f$y.DynamicGeometryUpdater=l$D,e$2b(Object.create)&&(l$D.prototype=Object.create(a$C.prototype),l$D.prototype.constructor=l$D),l$D.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2b(n.positions)||!e$2b(n.width)||a$C.prototype._isHidden.call(this,e,t,i)},l$D.prototype._setOptions=function(e,t,i){var n=this._options,r=r$Z.getValueOrUndefined(t.height,i),o=r$Z.getValueOrDefault(t.heightReference,i,k$P.NONE),a=r$Z.getValueOrUndefined(t.extrudedHeight,i),s=r$Z.getValueOrDefault(t.extrudedHeightReference,i,k$P.NONE);e$2b(a)&&!e$2b(r)&&(r=0),n.positions=r$Z.getValueOrUndefined(t.positions,i),n.width=r$Z.getValueOrUndefined(t.width,i),n.granularity=r$Z.getValueOrUndefined(t.granularity,i),n.cornerType=r$Z.getValueOrUndefined(t.cornerType,i),n.offsetAttribute=i$x.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$x.getGeometryHeight(r,o),(a=i$x.getGeometryExtrudedHeight(a,s))===i$x.CLAMP_TO_GROUND&&(a=e$1E.getMinimumMaximumHeights(P$F.computeRectangle(n,G$w)).minimumTerrainHeight),n.extrudedHeight=a},Object.defineProperties(o$A.prototype,{name:{get:t$16.throwInstantiationError},clock:{get:t$16.throwInstantiationError},entities:{get:t$16.throwInstantiationError},isLoading:{get:t$16.throwInstantiationError},changedEvent:{get:t$16.throwInstantiationError},errorEvent:{get:t$16.throwInstantiationError},loadingEvent:{get:t$16.throwInstantiationError},show:{get:t$16.throwInstantiationError},clustering:{get:t$16.throwInstantiationError}}),o$A.prototype.update=t$16.throwInstantiationError,o$A.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var I$C=s$o.SHOW_INDEX=0,C$v=s$o.POSITION_INDEX=1,g$z=s$o.COLOR_INDEX=2,O$n=s$o.OUTLINE_COLOR_INDEX=3,b$B=s$o.OUTLINE_WIDTH_INDEX=4,q$u=s$o.PIXEL_SIZE_INDEX=5,A$y=s$o.SCALE_BY_DISTANCE_INDEX=6,X$l=s$o.TRANSLUCENCY_BY_DISTANCE_INDEX=7,x$x=s$o.DISTANCE_DISPLAY_CONDITION_INDEX=8,L$x=s$o.DISABLE_DEPTH_DISTANCE_INDEX=9;function c$p(e,t){var i=e._pointPrimitiveCollection;e$2b(i)&&(i._updatePointPrimitive(e,t),e._dirty=!0)}s$o.NUMBER_OF_PROPERTIES=10,Object.defineProperties(s$o.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._show!==e&&(this._show=e,c$p(this,I$C))}},position:{get:function(){return this._position},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._position;o$1p.equals(t,e)||(o$1p.clone(e,t),o$1p.clone(e,this._actualPosition),c$p(this,C$v))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._scaleByDistance;o$Y.equals(t,e)||(this._scaleByDistance=o$Y.clone(e,t),c$p(this,A$y))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far distance must be greater than near distance.");var t=this._translucencyByDistance;o$Y.equals(t,e)||(this._translucencyByDistance=o$Y.clone(e,t),c$p(this,X$l))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._pixelSize!==e&&(this._pixelSize=e,c$p(this,q$u))}},color:{get:function(){return this._color},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._color;e$1U.equals(t,e)||(e$1U.clone(e,t),c$p(this,g$z))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2b(e))throw new t$16("value is required.");var t=this._outlineColor;e$1U.equals(t,e)||(e$1U.clone(e,t),c$p(this,O$n))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!e$2b(e))throw new t$16("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,c$p(this,b$B))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2b(e)&&e.far<=e.near)throw new t$16("far must be greater than near");r$Y.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=r$Y.clone(e,this._distanceDisplayCondition),c$p(this,x$x))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(!e$2b(e)||e<0)throw new t$16("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,c$p(this,L$x)}}},id:{get:function(){return this._id},set:function(e){this._id=e,e$2b(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,c$p(this,I$C))}}}),s$o.prototype.getPickId=function(e){return e$2b(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId},s$o.prototype._getActualPosition=function(){return this._actualPosition},s$o.prototype._setActualPosition=function(e){o$1p.clone(e,this._actualPosition),c$p(this,C$v)};var m$s=new e$29;s$o._computeActualPosition=function(e,t,i){return t.mode===C$13.SCENE3D?e:(p$1d.multiplyByPoint(i,e,m$s),s$Q.computeActualWgs84Position(t,m$s))};var E$w=new e$29;s$o._computeScreenSpacePosition=function(e,t,i,n){var r=p$1d.multiplyByVector(e,e$29.fromElements(t.x,t.y,t.z,1,E$w),E$w);return s$Q.wgs84ToWindowCoordinates(i,r,n)},s$o.prototype.computeScreenSpacePosition=function(e,t){var i=this._pointPrimitiveCollection;if(e$2b(t)||(t=new o$1o),!e$2b(i))throw new t$16("PointPrimitive must be in a collection.");if(!e$2b(e))throw new t$16("scene is required.");var n=i.modelMatrix,r=s$o._computeScreenSpacePosition(n,this._actualPosition,e,t);if(e$2b(r))return r.y=e.canvas.clientHeight-r.y,r},s$o.getScreenSpaceBoundingBox=function(e,t,i){var n=e.pixelSize,r=.5*n,o=t.x-r,a=t.y-r,s=n,l=n;return e$2b(i)||(i=new f$18),i.x=o,i.y=a,i.width=s,i.height=l,i},s$o.prototype.equals=function(e){return this===e||e$2b(e)&&this._id===e._id&&o$1p.equals(this._position,e._position)&&e$1U.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&e$1U.equals(this._outlineColor,e._outlineColor)&&o$Y.equals(this._scaleByDistance,e._scaleByDistance)&&o$Y.equals(this._translucencyByDistance,e._translucencyByDistance)&&r$Y.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},s$o.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var X$k="varying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nvarying vec2 v_offset;\nvoid main()\n{\nif(length(v_offset) > 0.5){\ndiscard;\n}\nfloat distanceToCenter = 0.0;\nfloat maxDistance = max(0.0, 0.5 - v_pixelDistance);\nfloat wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\nfloat innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);\nvec4 color = mix(v_outlineColor, v_color, innerAlpha);\ncolor.a *= wholeAlpha;\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\nif (color.a < 0.005)\n{\ndiscard;\n}\n#else\n#ifdef OPAQUE\nif (color.a < 0.995)\n{\ndiscard;\n}\n#else\nif (color.a >= 0.995)\n{\ndiscard;\n}\n#endif\n#endif\ngl_FragColor = czm_gammaCorrect(color);\nczm_writeLogDepth();\n}\n",Pe$6="uniform float u_maxTotalPointSize;\nattribute vec2 offset;\nattribute vec4 positionHighAndSize;\nattribute vec4 positionLowAndOutline;\nattribute vec4 compressedAttribute0;\nattribute vec4 compressedAttribute1;\nattribute vec4 scaleByDistance;\nattribute vec3 distanceDisplayConditionAndDisableDepth;\nvarying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nvarying vec2 v_offset;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nfloat computerOnePixelLength(vec4 viewPos)\n{\nvec4 winPos = czm_projection * viewPos;\nfloat dwidth = czm_metersPerPixel(viewPos);\nwinPos.x = winPos.x - 2.0 * dwidth;\nvec4 newViewPos = czm_inverseProjection * winPos;\nreturn length(viewPos - newViewPos);\n}\nvoid main()\n{\nvec3 positionHigh = positionHighAndSize.xyz;\nvec3 positionLow = positionLowAndOutline.xyz;\nfloat outlineWidthBothSides = 2.0 * positionLowAndOutline.w;\nfloat totalSize = positionHighAndSize.w + outlineWidthBothSides;\nfloat outlinePercent = outlineWidthBothSides / totalSize;\ntotalSize *= czm_pixelRatio;\ntotalSize += 3.0;\nfloat temp = compressedAttribute1.x * SHIFT_RIGHT8;\nfloat show = floor(temp);\n#ifdef EYE_DISTANCE_TRANSLUCENCY\nvec4 translucencyByDistance;\ntranslucencyByDistance.x = compressedAttribute1.z;\ntranslucencyByDistance.z = compressedAttribute1.w;\ntranslucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\ntemp = compressedAttribute1.y * SHIFT_RIGHT8;\ntranslucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\nvec4 color;\nvec4 outlineColor;\nvec4 pickColor;\ntemp = compressedAttribute0.z * SHIFT_RIGHT8;\npickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor.r = floor(temp);\ntemp = compressedAttribute0.x * SHIFT_RIGHT8;\ncolor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\ncolor.g = (temp - floor(temp)) * SHIFT_LEFT8;\ncolor.r = floor(temp);\ntemp = compressedAttribute0.y * SHIFT_RIGHT8;\noutlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.r = floor(temp);\ntemp = compressedAttribute0.w * SHIFT_RIGHT8;\npickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor = pickColor / 255.0;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor /= 255.0;\ncolor.a = floor(temp);\ncolor /= 255.0;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nlengthSq = dot(positionEC.xyz, positionEC.xyz);\n}\n#endif\n#ifdef EYE_DISTANCE_SCALING\ntotalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);\n#endif\nif (totalSize < 1.0)\n{\npositionEC.xyz = vec3(0.0);\ntotalSize = 1.0;\n}\nfloat translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\ntranslucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\nif (translucency < 0.004)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\n#ifdef DISTANCE_DISPLAY_CONDITION\nfloat nearSq = distanceDisplayConditionAndDisableDepth.x;\nfloat farSq = distanceDisplayConditionAndDisableDepth.y;\nif (lengthSq < nearSq || lengthSq > farSq) {\npositionEC.xyz = vec3(0.0, 0.0, 1.0);\n}\n#endif\npositionEC.xy = positionEC.xy + offset * computerOnePixelLength(positionEC) * totalSize;\ngl_Position = czm_projection * positionEC;\nczm_vertexLogDepth();\n#ifdef DISABLE_DEPTH_DISTANCE\nfloat disableDepthTestDistance = distanceDisplayConditionAndDisableDepth.z;\nif (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n{\ndisableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n}\nif (disableDepthTestDistance != 0.0)\n{\nfloat zclip = gl_Position.z / gl_Position.w;\nbool clipped = (zclip < -1.0 || zclip > 1.0);\nif (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n{\ngl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth(vec4(czm_currentFrustum.x));\n#endif\n}\n}\n#endif\nv_color = color;\nv_color.a *= translucency * show;\nv_outlineColor = outlineColor;\nv_outlineColor.a *= translucency * show;\nv_innerPercent = 1.0 - outlinePercent;\nv_pixelDistance = 2.0 / totalSize;\nv_offset = offset;\ngl_Position *= show;\nv_pickColor = pickColor;\n}\n",Le$b=s$o.SHOW_INDEX,Z$r=s$o.POSITION_INDEX,de$c=s$o.COLOR_INDEX,Ve$9=s$o.OUTLINE_COLOR_INDEX,Ue$8=s$o.OUTLINE_WIDTH_INDEX,we$8=s$o.PIXEL_SIZE_INDEX,_e$9=s$o.SCALE_BY_DISTANCE_INDEX,pe$d=s$o.TRANSLUCENCY_BY_DISTANCE_INDEX,le$h=s$o.DISTANCE_DISPLAY_CONDITION_INDEX,Re$8=s$o.DISABLE_DEPTH_DISTANCE_INDEX,q$t=s$o.NUMBER_OF_PROPERTIES,p$s={offset:0,positionHighAndSize:1,positionLowAndOutline:2,compressedAttribute0:3,compressedAttribute1:4,scaleByDistance:5,distanceDisplayConditionAndDisableDepth:6};function D$s(e){e=u$_(e,u$_.EMPTY_OBJECT),this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(q$t),this._maxPixelSize=1,this._baseVolume=new i$1c,this._baseVolumeWC=new i$1c,this._baseVolume2D=new i$1c,this._boundingVolume=new i$1c,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.blendOption=u$_(e.blendOption,S$J.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=C$13.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW,A$19.STATIC_DRAW];var t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}},this.depthTestEnabled=u$_(e.depthTestEnabled,!0)}function ue$c(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function J$p(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;for(var t=[],i=e._pointPrimitives,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._pointPrimitives=t}}function Me$b(e,t,i){return new v$F(e,[{index:p$s.positionHighAndSize,name:"positionHighAndSize",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[Z$r]},{index:p$s.positionLowAndOutline,name:"positionLowAndOutline",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[Z$r]},{index:p$s.compressedAttribute0,name:"compressedAttribute0",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[de$c]},{index:p$s.compressedAttribute1,name:"compressedAttribute1",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[pe$d]},{index:p$s.scaleByDistance,name:"scaleByDistance",componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:i[_e$9]},{index:p$s.distanceDisplayConditionAndDisableDepth,name:"distanceDisplayConditionAndDisableDepth",componentsPerAttribute:3,componentDatatype:S$12.FLOAT,usage:i[le$h]},{name:"offset",index:p$s.offset,vertexBuffer:e.createBillboardOffsetVertexBuffer(),componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}],t,!0)}Object.defineProperties(D$s.prototype,{length:{get:function(){return J$p(this),this._pointPrimitives.length}}}),D$s.prototype.add=function(e){var t=new s$o(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t},D$s.prototype.remove=function(e){return!!this.contains(e)&&(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},D$s.prototype.removeAll=function(){ue$c(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0},D$s.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]},D$s.prototype.contains=function(e){return e$2b(e)&&e._pointPrimitiveCollection===this},D$s.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return J$p(this),this._pointPrimitives[e]},D$s.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,n=0;n<q$t;++n){var r=0===i[n]?A$19.STATIC_DRAW:A$19.STREAM_DRAW;t=t||e[n]!==r,e[n]=r}return t};var K$p=new i$11;function ce$e(e,t,i,n){var r=n._index,o=n._getActualPosition();e._mode===C$13.SCENE3D&&(i$1c.expand(e._baseVolume,o,e._baseVolume),e._boundingVolumeDirty=!0),i$11.fromCartesian(o,K$p);var a=n.pixelSize,s=n.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,a+s);var l=i[p$s.positionHighAndSize],u=K$p.high;l(r,u.x,u.y,u.z,a);var c=i[p$s.positionLowAndOutline],h=K$p.low;c(r,h.x,h.y,h.z,s)}var z$t=65536,L$w=256;function fe$9(e,t,i,n){var r=n._index,o=n.color,a=n.getPickId(t).color,s=n.outlineColor,l=e$1U.floatToByte(o.red),u=e$1U.floatToByte(o.green),c=e$1U.floatToByte(o.blue),h=l*z$t+u*L$w+c;l=e$1U.floatToByte(s.red),u=e$1U.floatToByte(s.green),c=e$1U.floatToByte(s.blue);var d=l*z$t+u*L$w+c;l=e$1U.floatToByte(a.red),u=e$1U.floatToByte(a.green),c=e$1U.floatToByte(a.blue);var f=l*z$t+u*L$w+c,p=e$1U.floatToByte(o.alpha)*z$t+e$1U.floatToByte(s.alpha)*L$w+e$1U.floatToByte(a.alpha);(0,i[p$s.compressedAttribute0])(r,h,d,f,p)}function me$e(e,t,i,n){var r=n._index,o=0,a=1,s=1,l=1,u=n.translucencyByDistance;e$2b(u)&&(o=u.near,a=u.nearValue,s=u.far,l=u.farValue,(1!==a||1!==l)&&(e._shaderTranslucencyByDistance=!0));var c=n.show&&n.clusterShow;0===n.color.alpha&&0===n.outlineColor.alpha&&(c=!1),a=e$2a.clamp(a,0,1);var h=(c?1:0)*L$w+(a=1===a?255:255*a|0),d=l=1===(l=e$2a.clamp(l,0,1))?255:255*l|0;(0,i[p$s.compressedAttribute1])(r,h,d,o,s)}function De$b(e,t,i,n){var r=n._index,o=i[p$s.scaleByDistance],a=0,s=1,l=1,u=1,c=n.scaleByDistance;e$2b(c)&&(a=c.near,s=c.nearValue,l=c.far,u=c.farValue,(1!==s||1!==u)&&(e._shaderScaleByDistance=!0)),o(r,a,s,l,u)}function ve$a(e,t,i,n){var r=n._index,o=i[p$s.distanceDisplayConditionAndDisableDepth],a=0,s=Number.MAX_VALUE,l=n.distanceDisplayCondition;e$2b(l)&&(a=l.near,s=l.far,a*=a,s*=s,e._shaderDistanceDisplayCondition=!0);var u=n.disableDepthTestDistance;(u*=u)>0&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1)),o(r,a,s,u)}function Xe$5(e,t,i,n){ce$e(e,t,i,n),fe$9(e,t,i,n),me$e(e,t,i,n),De$b(e,t,i,n),ve$a(e,t,i,n)}function $$r(e,t,i,n,r,o){var a;n.mode===C$13.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=s$o._computeActualPosition(c,n,r);e$2b(h)&&(u._setActualPosition(h),o?s.push(h):i$1c.expand(a,h,a))}o&&i$1c.fromPoints(s,a)}function ze$8(e,t){var i=t.mode,n=e._pointPrimitives,r=e._pointPrimitivesToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==C$13.SCENE3D&&!p$1d.equals(o,e.modelMatrix)?(e._mode=i,p$1d.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===C$13.SCENE3D||i===C$13.SCENE2D||i===C$13.COLUMBUS_VIEW)&&$$r(e,n,n.length,t,o,!0)):i===C$13.MORPHING?$$r(e,n,n.length,t,o,!0):(i===C$13.SCENE2D||i===C$13.COLUMBUS_VIEW)&&$$r(e,r,e._pointPrimitivesToUpdateIndex,t,o,!1)}function Fe$9(e,t,i){var n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;i.radius+=n}var We$7=[];function a$r(e){e=u$_(e,u$_.EMPTY_OBJECT),this._enabled=u$_(e.enabled,!1),this._pixelRange=u$_(e.pixelRange,80),this._minimumClusterSize=u$_(e.minimumClusterSize,1),this._clusterBillboards=u$_(e.clusterBillboards,!0),this._clusterLabels=u$_(e.clusterLabels,!0),this._clusterPoints=u$_(e.clusterPoints,!0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new o$1h}function ci$3(e){return e.coord.x}function di$2(e){return e.coord.y}function Z$q(e,t){e.x-=t,e.y-=t,e.width+=2*t,e.height+=2*t}D$s.prototype.update=function(e){if(e.multiViewportIndex>-1&&this._pointPrimitives.length>0&&e$2b(this._pointPrimitives[0])&&e$2b(this._pointPrimitives[0].id)&&e$2b(this._pointPrimitives[0].id.entityCollection)&&e$2b(this._pointPrimitives[0].id.entityCollection.owner)){var t=this._pointPrimitives[0].id.entityCollection.owner;if(typeof t.getVisibleInViewport<"u")if(!t.getVisibleInViewport(e.multiViewportIndex))return}J$p(this),this._maxTotalPointSize=e$1T.maximumAliasedPointSize,ze$8(this,e);var i,n=this._pointPrimitives.length,r=this._pointPrimitivesToUpdate,o=this._pointPrimitivesToUpdateIndex,a=this._propertiesChanged,s=this._createVertexArray,l=e.context,u=e.passes,c=u.pick;if(s||!c&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var h=0;h<q$t;++h)a[h]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=Me$b(l,n,this._buffersUsage),i=this._vaf.writers;for(var d=0;d<n;++d){var f=this._pointPrimitives[d];f._dirty=!1,Xe$5(this,l,i,f)}this._vaf.commit(l.createBillboardPointIndexBuffer())}this._pointPrimitivesToUpdateIndex=0}else if(o>0){var p=We$7;p.length=0,(a[Z$r]||a[Ue$8]||a[we$8])&&p.push(ce$e),(a[de$c]||a[Ve$9])&&p.push(fe$9),(a[Le$b]||a[pe$d])&&p.push(me$e),a[_e$9]&&p.push(De$b),(a[le$h]||a[Re$8])&&p.push(ve$a);var _=p.length;if(i=this._vaf.writers,o/n>.1){for(var m=0;m<o;++m){var g=r[m];g._dirty=!1;for(var x=0;x<_;++x)p[x](this,l,i,g)}this._vaf.commit(l.createBillboardPointIndexBuffer())}else{for(var v=0;v<o;++v){var y=r[v];y._dirty=!1;for(var $=0;$<_;++$)p[$](this,l,i,y);this._vaf.subCommit(y._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(o>1.5*n&&(r.length=n),e$2b(this._vaf)&&e$2b(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,i$1c.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var b,T=p$1d.IDENTITY;e.mode===C$13.SCENE3D?(T=this.modelMatrix,b=i$1c.clone(this._baseVolumeWC,this._boundingVolume)):b=i$1c.clone(this._baseVolume2D,this._boundingVolume),Fe$9(this,e,b);var C,S,w=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,w&&(this._blendOption===S$J.OPAQUE||this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=d$1m.fromCache({depthTest:{enabled:this.depthTestEnabled,func:de$x.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===S$J.TRANSLUCENT||this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=d$1m.fromCache({depthTest:{enabled:!0,func:de$x.LEQUAL},depthMask:!1,blending:Ee$r.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance,(w||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(C=new s$U({name:"PointPrimitiveCollectionVS",sources:[Pe$6]}),this._shaderScaleByDistance&&C.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&C.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&C.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&C.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT&&(S=new s$U({name:"PointPrimitiveCollectionFS",defines:["OPAQUE"],sources:[X$k]}),this._sp=r$13.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s}),S=new s$U({name:"PointPrimitiveCollectionFS",defines:["TRANSLUCENT"],sources:[X$k]}),this._spTranslucent=r$13.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s})),this._blendOption===S$J.OPAQUE&&(S=new s$U({name:"PointPrimitiveCollectionFS",sources:[X$k]}),this._sp=r$13.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s})),this._blendOption===S$J.TRANSLUCENT&&(S=new s$U({name:"PointPrimitiveCollectionFS",sources:[X$k]}),this._spTranslucent=r$13.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);var E,P,A,L,M=e.commandList;if(e._fboState.frameBufferType!=Qe$c.CLAMP&&(u.render||c)){var R=this._colorCommands,O=this._blendOption===S$J.OPAQUE,I=this._blendOption===S$J.OPAQUE_AND_TRANSLUCENT;P=(E=this._vaf.va).length,R.length=P;var D=I?2*P:P;for(L=0;L<D;++L){var B=O||I&&L%2==0;e$2b(A=R[L])||(A=R[L]=new i$_),A.primitiveType=W$18.TRIANGLES,A.pass=B||!I?Le$s.OPAQUE:Le$s.TRANSLUCENT,A.owner=this,A.instanceCount=this._pointPrimitives.length;var N=I?Math.floor(L/2):L;A.boundingVolume=b,A.modelMatrix=T,A.shaderProgram=B?this._sp:this._spTranslucent,A.uniformMap=this._uniforms,A.vertexArray=E[N].va,A.renderState=B?this._rsOpaque:this._rsTranslucent,A.debugShowBoundingVolume=this.debugShowBoundingVolume,A.pickId="v_pickColor",M.push(A)}}}},D$s.prototype.isDestroyed=function(){return!1},D$s.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),ue$c(this._pointPrimitives),i$10(this)};var ai$1=new f$18;function G$v(e,t,i,n,r){if(e$2b(e._labelCollection)&&n._clusterLabels?r=D$Q.getScreenSpaceBoundingBox(e,t,r):e$2b(e._billboardCollection)&&n._clusterBillboards?r=n$I.getScreenSpaceBoundingBox(e,t,r):e$2b(e._pointPrimitiveCollection)&&n._clusterPoints&&(r=s$o.getScreenSpaceBoundingBox(e,t,r)),Z$q(r,i),n._clusterLabels&&!e$2b(e._labelCollection)&&e$2b(e.id)&&J$o(n,e.id.id)&&e$2b(e.id._label)){var o=n._collectionIndicesByEntity[e.id.id].labelIndex,a=n._labelCollection.get(o),s=a.getScreenSpaceBoundingBox(a,t,ai$1);Z$q(s,i),r=f$18.union(r,s,r)}return r}function ui$2(e,t){if(e.clusterShow=!0,!e$2b(e._labelCollection)&&e$2b(e.id)&&J$o(t,e.id.id)&&e$2b(e.id._label)){var i=t._collectionIndicesByEntity[e.id.id].labelIndex;t._labelCollection.get(i).clusterShow=!0}}function hi$2(e,t,i,n){var r={billboard:n._clusterBillboardCollection.add(),label:n._clusterLabelCollection.add(),point:n._clusterPointCollection.add()};r.billboard.show=!1,r.point.show=!1,r.label.show=!0,r.label.text=t.toLocaleString(),r.label.id=i,r.billboard.position=r.label.position=r.point.position=e,n._clusterEvent.raiseEvent(i,r)}function J$o(e,t){return e$2b(e)&&e$2b(e._collectionIndicesByEntity[t])&&e$2b(e._collectionIndicesByEntity[t].labelIndex)}function z$s(e,t,i,n,r){if(e$2b(e))for(var o=e.length,a=0;a<o;++a){var s=e.get(a);if(s.clusterShow=!1,s.show&&(r._scene.mode!==C$13.SCENE3D||n.isPointVisible(s.position))){var l=r._clusterLabels&&e$2b(s._labelCollection),u=r._clusterBillboards&&e$2b(s.id._billboard),c=r._clusterPoints&&e$2b(s.id._point);if(!l||!c&&!u){var h=s.computeScreenSpacePosition(i);!e$2b(h)||t.push({index:a,collection:e,clustered:!1,coord:h})}}}}var _i$3=new f$18,bi$2=new f$18,fi$2=new f$18;function gi$3(e){return function(t){if(!(e$2b(t)&&t<.05)&&e.enabled){var i=e._scene,n=e._labelCollection,r=e._billboardCollection,o=e._pointCollection;if((e$2b(n)||e$2b(r)||e$2b(o))&&(e._clusterBillboards||e._clusterLabels||e._clusterPoints)){var a=e._clusterLabelCollection,s=e._clusterBillboardCollection,l=e._clusterPointCollection;e$2b(a)?a.removeAll():a=e._clusterLabelCollection=new g$U({scene:i}),e$2b(s)?s.removeAll():s=e._clusterBillboardCollection=new w$N({scene:i}),e$2b(l)?l.removeAll():l=e._clusterPointCollection=new D$s;var u=e._pixelRange,c=e._minimumClusterSize;e._previousClusters;var h=[];e._previousHeight;var d=i.camera.positionCartographic.height,f=i.mapProjection.ellipsoid,p=i.camera.positionWC,_=new s$G(f,p),m=[];e._clusterLabels&&z$s(n,m,i,_,e),e._clusterBillboards&&z$s(r,m,i,_,e),e._clusterPoints&&z$s(o,m,i,_,e);var g,x,v,y,$,b,T,C,S,w,E,P=O$B(m,ci$3,di$2,4096,Int32Array);for(v=m.length,g=0;g<v;++g){var A=m[g];if(!A.clustered){A.clustered=!0,w=A.collection,E=A.index;var L=w.get(E);y=G$v(L,A.coord,u,e,_i$3);var M=f$18.clone(y,bi$2);b=($=P.intersect(y.x,y.y,y.x+y.width,y.y+y.height)).length;var R=o$1p.clone(L.position);S=1,C=[L.id];var O=o$1p.distanceSquared(p,R);for(x=0;x<b;++x)if(!(T=m[$[x]]).clustered){var I=T.collection.get(T.index),D=G$v(I,T.coord,u,e,fi$2);o$1p.distanceSquared(p,I.position)<O&&(R=o$1p.clone(I.position)),f$18.union(M,D,M),++S,C.push(I.id)}if(S>=c){var B=o$1p.clone(R);for(hi$2(B,S,C,e),h.push({position:B,width:M.width,height:M.height,minimumWidth:y.width,minimumHeight:y.height}),x=0;x<b;++x)m[$[x]].clustered=!0}else ui$2(L,e)}}0===a.length&&(a.destroy(),e._clusterLabelCollection=void 0),0===s.length&&(s.destroy(),e._clusterBillboardCollection=void 0),0===l.length&&(l.destroy(),e._clusterPointCollection=void 0),e._previousClusters=h,e._previousHeight=d}}}}function R$p(e,t,i,n){return function(r){var o=this[e];e$2b(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});var a=this._collectionIndicesByEntity[r.id];if(e$2b(a)||(a=this._collectionIndicesByEntity[r.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),e$2b(o)&&e$2b(a[n]))return o.get(a[n]);e$2b(o)||(o=this[e]=new t({scene:this._scene}));var s,l,u=this[i];return u.length>0?(s=u.pop(),l=o.get(s)):(l=o.add(),s=o.length-1),a[n]=s,this._clusterDirty=!0,l}}function Y$m(e,t){var i=e._collectionIndicesByEntity[t];!e$2b(i.billboardIndex)&&!e$2b(i.labelIndex)&&!e$2b(i.pointIndex)&&delete e._collectionIndicesByEntity[t]}function M$x(e){if(e$2b(e))for(var t=e.length,i=0;i<t;++i)e.get(i).clusterShow=!0}function pi$3(e){e.enabled||(e$2b(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),e$2b(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),e$2b(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,M$x(e._labelCollection),M$x(e._billboardCollection),M$x(e._pointCollection))}function n$o(e){this._name=e,this._clock=void 0,this._changed=new o$1h,this._error=new o$1h,this._isLoading=!1,this._loading=new o$1h,this._entityCollection=new r$v(this),this._entityCluster=new a$r}function K$o(e){this.id=e,this.vertexFormat=void 0,this.slices=void 0,this.offsetAttribute=void 0}a$r.prototype._initialize=function(e){this._scene=e;var t=gi$3(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)},Object.defineProperties(a$r.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}}}),a$r.prototype.getLabel=R$p("_labelCollection",g$U,"_unusedLabelIndices","labelIndex"),a$r.prototype.removeLabel=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(e$2b(this._labelCollection)&&e$2b(t)&&e$2b(t.labelIndex)){var i=t.labelIndex;t.labelIndex=void 0,Y$m(this,e.id);var n=this._labelCollection.get(i);n.show=!1,n.text="",n.id=void 0,this._unusedLabelIndices.push(i),this._clusterDirty=!0}},a$r.prototype.getBillboard=R$p("_billboardCollection",w$N,"_unusedBillboardIndices","billboardIndex"),a$r.prototype.removeBillboard=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(e$2b(this._billboardCollection)&&e$2b(t)&&e$2b(t.billboardIndex)){var i=t.billboardIndex;t.billboardIndex=void 0,Y$m(this,e.id);var n=this._billboardCollection.get(i);n.id=void 0,n.show=!1,n.image=void 0,this._unusedBillboardIndices.push(i),this._clusterDirty=!0}},a$r.prototype.getPoint=R$p("_pointCollection",D$s,"_unusedPointIndices","pointIndex"),a$r.prototype.removePoint=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(e$2b(this._pointCollection)&&e$2b(t)&&e$2b(t.pointIndex)){var i=t.pointIndex;t.pointIndex=void 0,Y$m(this,e.id);var n=this._pointCollection.get(i);n.show=!1,n.id=void 0,this._unusedPointIndices.push(i),this._clusterDirty=!0}},a$r.prototype.update=function(e){var t;e$2b(this._labelCollection)&&this._labelCollection.length>0&&0===this._labelCollection.get(0)._glyphs.length&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),e$2b(this._billboardCollection)&&this._billboardCollection.length>0&&!e$2b(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,pi$3(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),e$2b(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),e$2b(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),e$2b(this._clusterPointCollection)&&this._clusterPointCollection.update(e),e$2b(this._labelCollection)&&this._labelCollection.update(e),e$2b(this._billboardCollection)&&this._billboardCollection.update(e),e$2b(this._pointCollection)&&this._pointCollection.update(e)},a$r.prototype.destroy=function(){this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),e$2b(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1},Object.defineProperties(n$o.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){o$A.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2b(e))throw new t$16("value must be defined.");this._entityCluster=e}}});var N$m=new i$V("ruleModeling"),i$w={unResolved:0,parsing:1,resolved:2,failed:3};function m$r(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new K$o(e),geometryPropertyName:"geometry",observedPropertyNames:["loftParam","geometry","children","orientation","scale","position"]}),this.asynchronous=!1,this.twoPasses=!0,this.wrapS=q$19.REPEAT,this.wrapT=q$19.REPEAT,this.compressVertices=!1;var i=this;e$2b(e.geometry)&&(e.geometry.outlineWidth=new e$1I(e.geometry.outlineWidth||1),this._outline=new e$1I(e.geometry.outline||!1),Object.defineProperties(e.geometry,{outline:{get:function(){return i._outline},set:function(t){t!==i._outline&&(!0===t?(i._outline.setValue(!0),e.geometry.outlineWidth=new e$1I(e.geometry.outlineWidth||1),i._onEntityPropertyChanged(e,"geometry",e.geometry,void 0)):i._outline.setValue(!1))}}})),this._onEntityPropertyChanged(e,"geometry",e.geometry,void 0),this.geometryState=i$w.unResolved,this.outlineState=i$w.unResolved}function Q$q(e,t){var i={attrLocation:{aPosition:0},vertexAttributes:[{componentsPerAttribute:3,typedArray:new Float32Array(e)}]},n=[{indexType:1,indicesTypedArray:new Uint32Array(t)}];return _0x30c9ea.createEdgeData(i,n)}e$2b(Object.create)&&(m$r.prototype=Object.create(i$F.prototype),m$r.prototype.constructor=m$r),Object.defineProperties(m$r.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),m$r.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");if(this._options.instance instanceof d$1o)return this._options.instance;if(this.geometryState===i$w.unResolved){var t=N$m.scheduleTask({loftParam:this._options.loftParam,linearExtrudeParam:this._options.linearExtrudeParam,rotateExtrudeParam:this._options.rotateExtrudeParam},[]);if(!e$2b(t))return"unResolve";this.geometryState=i$w.parsing;var i=this;return t.then((function(t){if("notReady"!==t){if(!e$2b(t))return i.geometry=null,void(i.geometryState=i$w.resolved);var n,r,o=[],a=i._entity;n=e$2b(a.orientation)?a.orientation.getValue(e):{heading:0,pitch:0,roll:0},r=e$2b(a.scale)?a.scale.getValue(e):{x:1,y:1,z:1};for(var s=0;s<t.length;s++){var l=t[s].vertex.typedArray,u=t[s].indices.typedArray,c=t[s].normal,h=t[s].uv,d=t[s].position,f=a.isAvailable(e);(!e$2b(a.position)||!e$2b(a.position.getValue(e)))&&(a.position=d);var p=new a$_({position:new o$1c({componentDatatype:S$12.DOUBLE,componentsPerAttribute:3,values:new Float64Array(l)}),normal:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:new Float32Array(c)}),st:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:new Float32Array(h)})});0===h.length&&delete p.st;var _=i$1c.fromVertices(new Float64Array(l),new o$1p(0,0,0),3),m=new I$1p({attributes:p,indices:u,primitiveType:W$18.TRIANGLES,boundingSphere:_});0===c.length&&(m=k$13.computeNormal(m)),d=a.position.getValue(e);var g=m$17.headingPitchRollToFixedFrame(o$1p.fromDegrees(d.x,d.y,d.z),new i$15(n.heading,n.pitch,n.roll),t$13.WGS84,m$17.eastNorthUpToFixedFrame);p$1d.multiplyByScale(g,r,g),o.push(new d$1o({id:a,geometry:m,modelMatrix:g,attributes:{show:new e$1F(f&&a.isShowing&&i._showProperty.getValue(e))}}))}if(o.length>1){var x=[];for(s=0;s<o.length;s++){var v=new a$R(a.geometry.material);v._unique=!0;var y=new h$V({geometry:{instance:o[s],material:v}});y.position=d,x.push(y)}a.children=x,i.geometry=null,i.geometryState=i$w.resolved}else i.geometry=o[0],i.geometryState=i$w.resolved}else i.geometryState=i$w.unResolved})).otherwise((function(){i.geometryState=i$w.failed})),"unResolve"}return this.geometryState===i$w.parsing?"unResolve":this.geometryState===i$w.failed?null:this.geometry},m$r.prototype.createOutlineGeometryInstance=function(e){var t,i,n,r=this._options.loftParam,o=this._options.linearExtrudeParam,a=this._options.rotateExtrudeParam;if(this.outlineState===i$w.unResolved){if(e$2b(r)){var s={createTexCoord:r.buildParam.createTexCoord,generateNormal:r.buildParam.generateNormal,group:!0,att:r.buildParam.att,splitSegment:r.buildParam.splitSegment,splitSide:r.buildParam.splitSide,chamferFactor:r.buildParam.chamferFactor,segmentClosed:r.buildParam.segmentClosed,normalAngle:r.buildParam.normalAngle};t={line:r.line,region:r.region,buildParam:s,uvwParam:r.uvwParam}}else if(e$2b(o)){s={createTexCoord:o.buildParam.createTexCoord,generateNormal:o.buildParam.generateNormal,group:!0,att:o.buildParam.att,height:o.buildParam.height,scaleX:o.buildParam.scaleX,scaleY:o.buildParam.scaleY,normalAngle:o.buildParam.normalAngle};i={region:o.region,buildParam:s,uvwParam:o.uvwParam}}else if(e$2b(a)){s={createTexCoord:a.buildParam.createTexCoord,generateNormal:a.buildParam.generateNormal,group:!0,att:a.buildParam.att,normalAngle:a.buildParam.normalAngle,slices:a.buildParam.slices,angle:a.buildParam.angle};n={region:a.geometry,buildParam:s,uvwParam:a.uvwParam}}var l=N$m.scheduleTask({loftParam:t,linearExtrudeParam:i,rotateExtrudeParam:n},[]);if(!e$2b(l))return this.createOutlineGeometryInstance();this.outlineState=i$w.parsing;var u=this;l.then((function(e){if("notReady"===e)return u.outlineState=i$w.unResolved,void u.createOutlineGeometryInstance();var t=e[0].vertex.typedArray,i=e[0].indices.typedArray,n=u._entity,r=Q$q(t,i),o=i$1c.fromVertices(new Float64Array(t),new o$1p(0,0,0),3);n.boundingSphere=o,n.edgedata=r,u.outlineState=i$w.resolved}))}return null},m$r.prototype._isDynamic=function(e,t){return!1},m$r.prototype.isOutlineVisible=function(e){return!0},m$r.prototype._setStaticOptions=function(e,t){var i=this._options;i.loftParam=t.loftParam,i.linearExtrudeParam=t.linearExtrudeParam,i.rotateExtrudeParam=t.rotateExtrudeParam,i.instance=t.instance},m$r.prototype._onEntityPropertyChanged=a$B;var P$r=o$1p.ZERO,U$s=new o$1p,N$l=new o$1p,D$r=new e$1U;function x$w(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function s$n(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new x$w(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}function f$x(e,t,i){a$C.call(this,e,t,i)}function e$y(){this._definitionChanged=new o$1h,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}e$2b(Object.create)&&(s$n.prototype=Object.create(i$F.prototype),s$n.prototype.constructor=s$n),Object.defineProperties(s$n.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),s$n.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:t$B.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,D$r)),e$2b(t)||(t=e$1U.WHITE),a.color=o$16.fromColor(t));return e$2b(this._options.offsetAttribute)&&(a.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,P$r,U$s))),new d$1o({id:i,geometry:new l$Q(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:a})},s$n.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,D$r),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r),offset:void 0};return e$2b(this._options.offsetAttribute)&&(o.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,P$r,U$s))),new d$1o({id:t,geometry:new d$Z(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:o})},s$n.prototype._computeCenter=function(e,t){return r$Z.getValueOrUndefined(this._entity.position,e,t)},s$n.prototype._isHidden=function(e,t){return!e$2b(e.position)||!e$2b(t.length)||!e$2b(t.topRadius)||!e$2b(t.bottomRadius)||i$F.prototype._isHidden.call(this,e,t)},s$n.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$Z.isConstant(e.orientation)&&t.length.isConstant&&t.topRadius.isConstant&&t.bottomRadius.isConstant&&r$Z.isConstant(t.slices)&&r$Z.isConstant(t.outlineWidth)&&r$Z.isConstant(t.numberOfVerticalLines))},s$n.prototype._setStaticOptions=function(e,t){var i=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$Q?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,n.length=t.length.getValue(o$H.MINIMUM_VALUE),n.topRadius=t.topRadius.getValue(o$H.MINIMUM_VALUE),n.bottomRadius=t.bottomRadius.getValue(o$H.MINIMUM_VALUE),n.slices=r$Z.getValueOrUndefined(t.slices,o$H.MINIMUM_VALUE),n.numberOfVerticalLines=r$Z.getValueOrUndefined(t.numberOfVerticalLines,o$H.MINIMUM_VALUE),n.offsetAttribute=i!==k$P.NONE?_0x58701d.ALL:void 0},s$n.prototype._onEntityPropertyChanged=a$B,s$n.DynamicGeometryUpdater=f$x,e$2b(Object.create)&&(f$x.prototype=Object.create(a$C.prototype),f$x.prototype.constructor=f$x),f$x.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2b(r$Z.getValueOrUndefined(e.position,i,N$l))||!e$2b(n.length)||!e$2b(n.topRadius)||!e$2b(n.bottomRadius)||a$C.prototype._isHidden.call(this,e,t,i)},f$x.prototype._setOptions=function(e,t,i){var n=r$Z.getValueOrDefault(t.heightReference,i,k$P.NONE),r=this._options;r.length=r$Z.getValueOrUndefined(t.length,i),r.topRadius=r$Z.getValueOrUndefined(t.topRadius,i),r.bottomRadius=r$Z.getValueOrUndefined(t.bottomRadius,i),r.slices=r$Z.getValueOrUndefined(t.slices,i),r.numberOfVerticalLines=r$Z.getValueOrUndefined(t.numberOfVerticalLines,i),r.offsetAttribute=n!==k$P.NONE?_0x58701d.ALL:void 0},Object.defineProperties(e$y.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:c$W("startTime"),stopTime:c$W("stopTime"),currentTime:c$W("currentTime"),clockRange:c$W("clockRange"),clockStep:c$W("clockStep"),multiplier:c$W("multiplier")}),e$y.prototype.clone=function(e){return e$2b(e)||(e=new e$y),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e},e$y.prototype.equals=function(e){return this===e||e$2b(e)&&a$15.equals(this.startTime,e.startTime)&&a$15.equals(this.stopTime,e.stopTime)&&a$15.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier},e$y.prototype.merge=function(e){if(!e$2b(e))throw new t$16("source is required.");this.startTime=u$_(this.startTime,e.startTime),this.stopTime=u$_(this.stopTime,e.stopTime),this.currentTime=u$_(this.currentTime,e.currentTime),this.clockRange=u$_(this.clockRange,e.clockRange),this.clockStep=u$_(this.clockStep,e.clockStep),this.multiplier=u$_(this.multiplier,e.multiplier)},e$y.prototype.getValue=function(e){return e$2b(e)||(e=new u$I),e.startTime=u$_(this.startTime,e.startTime),e.stopTime=u$_(this.stopTime,e.stopTime),e.currentTime=u$_(this.currentTime,e.currentTime),e.clockRange=u$_(this.clockRange,e.clockRange),e.multiplier=u$_(this.multiplier,e.multiplier),e.clockStep=u$_(this.clockStep,e.clockStep),e};var h$z=e$1U.WHITE,u$v=.1,c$o=new o$1o(8,8),d$D=new o$1o(0,0),p$r=new o$1o(1,1);function t$p(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}function t$o(e){this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(t$p.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)&&r$Z.isConstant(this._cellAlpha)&&r$Z.isConstant(this._lineCount)&&r$Z.isConstant(this._lineThickness)&&r$Z.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color"),cellAlpha:C$$("cellAlpha"),lineCount:C$$("lineCount"),lineThickness:C$$("lineThickness"),lineOffset:C$$("lineOffset")}),t$p.prototype.getType=function(e){return"Grid"},t$p.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,h$z,t.color),t.cellAlpha=r$Z.getValueOrDefault(this._cellAlpha,e,u$v),t.lineCount=r$Z.getValueOrClonedDefault(this._lineCount,e,c$o,t.lineCount),t.lineThickness=r$Z.getValueOrClonedDefault(this._lineThickness,e,p$r,t.lineThickness),t.lineOffset=r$Z.getValueOrClonedDefault(this._lineOffset,e,d$D,t.lineOffset),t},t$p.prototype.equals=function(e){return this===e||e instanceof t$p&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._cellAlpha,e._cellAlpha)&&r$Z.equals(this._lineCount,e._lineCount)&&r$Z.equals(this._lineThickness,e._lineThickness)&&r$Z.equals(this._lineOffset,e._lineOffset)},Object.defineProperties(t$o.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color")}),t$o.prototype.getType=function(e){return"PolylineArrow"},t$o.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,e$1U.WHITE,t.color),t},t$o.prototype.equals=function(e){return this===e||e instanceof t$o&&r$Z.equals(this._color,e._color)};var d$C=e$1U.WHITE,l$C=e$1U.TRANSPARENT,f$w=16,g$y=255;function o$z(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=e.color,this.gapColor=e.gapColor,this.dashLength=e.dashLength,this.dashPattern=e.dashPattern}Object.defineProperties(o$z.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)&&r$Z.isConstant(this._gapColor)&&r$Z.isConstant(this._dashLength)&&r$Z.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color"),gapColor:C$$("gapColor"),dashLength:C$$("dashLength"),dashPattern:C$$("dashPattern")}),o$z.prototype.getType=function(e){return"PolylineDash"},o$z.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,d$C,t.color),t.gapColor=r$Z.getValueOrClonedDefault(this._gapColor,e,l$C,t.gapColor),t.dashLength=r$Z.getValueOrDefault(this._dashLength,e,f$w,t.dashLength),t.dashPattern=r$Z.getValueOrDefault(this._dashPattern,e,g$y,t.dashPattern),t},o$z.prototype.equals=function(e){return this===e||e instanceof o$z&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._gapColor,e._gapColor)&&r$Z.equals(this._dashLength,e._dashLength)&&r$Z.equals(this._dashPattern,e._dashPattern)};var f$v=e$1U.WHITE,p$q=.25,P$q=1;function t$n(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower,this.taperPower=e.taperPower}Object.defineProperties(t$n.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)&&r$Z.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color"),glowPower:C$$("glowPower"),taperPower:C$$("taperPower")}),t$n.prototype.getType=function(e){return"PolylineGlow"},t$n.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,f$v,t.color),t.glowPower=r$Z.getValueOrDefault(this._glowPower,e,p$q,t.glowPower),t.taperPower=r$Z.getValueOrDefault(this._taperPower,e,P$q,t.taperPower),t},t$n.prototype.equals=function(e){return this===e||e instanceof t$n&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._glowPower,e._glowPower)&&r$Z.equals(this._taperPower,e._taperPower)};var f$u=e$1U.WHITE,h$y=e$1U.BLACK,a$q=1;function e$x(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}function n$n(e,t){this._value=void 0,this._definitionChanged=new o$1h,this._eventHelper=new n$x,this._referenceFrame=u$_(t,Re$k.FIXED),this.setValue(e)}function i$v(e){this._value=void 0,this._definitionChanged=new o$1h,this._eventHelper=new n$x,this.setValue(e)}function s$m(e){var t=e._targetProperty;if(!e$2b(t)){var i=e._targetEntity;if(!e$2b(i)){if(!e$2b(i=e._targetCollection.getById(e._targetId)))return void(e._targetEntity=e._targetProperty=void 0);i.definitionChanged.addEventListener(a$p.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=i}var n=e._targetPropertyNames;t=e._targetEntity;for(var r=0,o=n.length;r<o&&e$2b(t);++r)t=t[n[r]];e._targetProperty=t}return t}function a$p(e,t,i){if(!e$2b(e))throw new t$16("targetCollection is required.");if(!e$2b(t)||""===t)throw new t$16("targetId is required.");if(!e$2b(i)||0===i.length)throw new t$16("targetPropertyNames is required.");for(var n=0;n<i.length;n++){var r=i[n];if(!e$2b(r)||""===r)throw new t$16("reference contains invalid properties.")}this._targetCollection=e,this._targetId=t,this._targetPropertyNames=i,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new o$1h,e.collectionChanged.addEventListener(a$p.prototype._onCollectionChanged,this)}Object.defineProperties(e$x.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)&&r$Z.isConstant(this._outlineColor)&&r$Z.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth")}),e$x.prototype.getType=function(e){return"PolylineOutline"},e$x.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,f$u,t.color),t.outlineColor=r$Z.getValueOrClonedDefault(this._outlineColor,e,h$y,t.outlineColor),t.outlineWidth=r$Z.getValueOrDefault(this._outlineWidth,e,a$q),t},e$x.prototype.equals=function(e){return this===e||e instanceof e$x&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._outlineColor,e._outlineColor)&&r$Z.equals(this._outlineWidth,e._outlineWidth)},Object.defineProperties(n$n.prototype,{isConstant:{get:function(){var e=this._value;if(!e$2b(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!r$Z.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),n$n.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$k.FIXED,t)},n$n.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2b(e))throw new t$16("time is required.");if(!e$2b(t))throw new t$16("referenceFrame is required.");var n=this._value;if(e$2b(n)){var r=n.length;e$2b(i)||(i=new Array(r));for(var o=0,a=0;o<r;){var s=n[o].getValueInReferenceFrame(e,t,i[o]);e$2b(s)&&(i[a]=s,a++),o++}return i.length=a,i}},n$n.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),e$2b(e)){this._value=e.slice();for(var i=e.length,n=0;n<i;n++){var r=e[n];e$2b(r)&&t.add(r.definitionChanged,n$n.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},n$n.prototype.equals=function(e){return this===e||e instanceof n$n&&this._referenceFrame===e._referenceFrame&&r$Z.arrayEquals(this._value,e._value)},n$n.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(i$v.prototype,{isConstant:{get:function(){var e=this._value;if(!e$2b(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!r$Z.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),i$v.prototype.getValue=function(e,t){if(!e$2b(e))throw new t$16("time is required.");var i=this._value;if(e$2b(i)){var n=i.length;e$2b(t)||(t=new Array(n));for(var r=0,o=0;r<n;){var a=this._value[r].getValue(e,t[r]);e$2b(a)&&(t[o]=a,o++),r++}return t.length=o,t}},i$v.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),e$2b(e)){this._value=e.slice();for(var i=e.length,n=0;n<i;n++){var r=e[n];e$2b(r)&&t.add(r.definitionChanged,i$v.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},i$v.prototype.equals=function(e){return this===e||e instanceof i$v&&r$Z.arrayEquals(this._value,e._value)},i$v.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(a$p.prototype,{isConstant:{get:function(){return r$Z.isConstant(s$m(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){var e=s$m(this);return e$2b(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return s$m(this)}}}),a$p.fromString=function(e,t){if(!e$2b(e))throw new t$16("targetCollection is required.");if(!e$2b(t))throw new t$16("referenceString is required.");for(var i,n=[],r=!0,o=!1,a="",s=0;s<t.length;++s){var l=t.charAt(s);o?(a+=l,o=!1):"\\"===l?o=!0:r&&"#"===l?(i=a,r=!1,a=""):r||"."!==l?a+=l:(n.push(a),a="")}return n.push(a),new a$p(e,i,n)},a$p.prototype.getValue=function(e,t){var i=s$m(this);return e$2b(i)?i.getValue(e,t):void 0},a$p.prototype.getValueInReferenceFrame=function(e,t,i){var n=s$m(this);return e$2b(n)?n.getValueInReferenceFrame(e,t,i):void 0},a$p.prototype.getType=function(e){var t=s$m(this);return e$2b(t)?t.getType(e):void 0},a$p.prototype.equals=function(e){if(this===e)return!0;var t=this._targetPropertyNames,i=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==i.length)return!1;for(var n=this._targetPropertyNames.length,r=0;r<n;r++)if(t[r]!==i[r])return!1;return!0},a$p.prototype._onTargetEntityDefinitionChanged=function(e,t,i,n){e$2b(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))},a$p.prototype._onCollectionChanged=function(e,t,i){var n=this._targetEntity;e$2b(n)&&-1!==i.indexOf(n)?(n.definitionChanged.removeEventListener(a$p.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):e$2b(n)||e$2b(n=s$m(this))&&this._definitionChanged.raiseEvent(this)};var m$q={packedLength:1,pack:function(e,t,i){if(!e$2b(e))throw new t$16("value is required");if(!e$2b(t))throw new t$16("array is required");return t[i=u$_(i,0)]=e,t},unpack:function(e,t,i){if(!e$2b(e))throw new t$16("array is required");return e[t=u$_(t,0)]},convertPackedArrayForInterpolation:function(e,t,i,n){if(!e$2b(e))throw new t$16("packedArray is required");t=u$_(t,0);for(var r,o=0,a=(i=u$_(i,e.length))-t+1;o<a;o++){var s=e[t+o];0===o||Math.abs(r-s)<Math.PI?n[o]=s:n[o]=s-e$2a.TWO_PI,r=s}},unpackInterpolationResult:function(e,t,i,n,r){if(!e$2b(e))throw new t$16("array is required");if(!e$2b(t))throw new t$16("sourceArray is required");return(r=e[0])<0?r+e$2a.TWO_PI:r}},j$u={packedLength:1,pack:function(e,t,i){t[i=u$_(i,0)]=e},unpack:function(e,t,i){return e[t=u$_(t,0)]}};function J$n(e,t,i){var n,r=e.length,o=i.length,a=r+o;if(e.length=a,r!==t){var s=r-1;for(n=a-1;n>=t;n--)e[n]=e[s--]}for(n=0;n<o;n++)e[t++]=i[n]}function Z$p(e,t){return e instanceof a$15?e:"string"==typeof e?a$15.fromIso8601(e):a$15.addSeconds(t,e,new a$15)}var P$p=[],q$s=[];function S$q(e,t,i,n,r){for(var o,a,s,l,u,c,h=0;h<n.length;){var d=0,f=0;if((s=a$17(t,u=Z$p(n[h],e),a$15.compare))<0){for(l=(s=~s)*r,a=void 0,c=t[s];h<n.length&&(u=Z$p(n[h],e),!(e$2b(a)&&a$15.compare(a,u)>=0||e$2b(c)&&a$15.compare(u,c)>=0));){for(P$p[d++]=u,h+=1,o=0;o<r;o++)q$s[f++]=n[h],h+=1;a=u}d>0&&(q$s.length=f,J$n(i,l,q$s),P$p.length=d,J$n(t,s,P$p))}else{for(o=0;o<r;o++)h++,i[s*r+o]=n[h];h++}}}function g$x(e,t){o$1q.defined("type",e);var i=e;i===Number&&(i=j$u);var n,r=i.packedLength,o=u$_(i.packedInterpolationLength,r),a=0;if(e$2b(t)){var s=t.length;n=new Array(s);for(var l=0;l<s;l++){var u=t[l];u===Number&&(u=j$u);var c=u.packedLength;r+=c,o+=u$_(u.packedInterpolationLength,c),n[l]=u}a=s}this._type=e,this._innerType=i,this._interpolationDegree=1,this._interpolationAlgorithm=v$A,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=r,this._packedInterpolationLength=o,this._updateTableLength=!0,this._interpolationResult=new Array(o),this._definitionChanged=new o$1h,this._derivativeTypes=t,this._innerDerivativeTypes=n,this._inputOrder=a,this._forwardExtrapolationType=_0x346789.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=_0x346789.NONE,this._backwardExtrapolationDuration=0}function z$r(e,t,i){var n=e._packedLength;e._times.splice(t,i),e._values.splice(t*n,i*n),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}function o$y(e,t){var i;if((t=u$_(t,0))>0){i=new Array(t);for(var n=0;n<t;n++)i[n]=o$1p}this._numberOfDerivatives=t,this._property=new g$x(o$1p,i),this._definitionChanged=new o$1h,this._referenceFrame=u$_(e,Re$k.FIXED),this._property._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)}Object.defineProperties(g$x.prototype,{isConstant:{get:function(){return 0===this._values.length}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}}),g$x.prototype.getValue=function(e,t){o$1q.defined("time",e);var i=this._times,n=i.length;if(0!==n){var r,o=this._innerType,a=this._values,s=a$17(i,e,a$15.compare);if(s<0){if(0===(s=~s)){var l=i[s];if(r=this._backwardExtrapolationDuration,this._backwardExtrapolationType===_0x346789.NONE||0!==r&&a$15.secondsDifference(l,e)>r)return;if(this._backwardExtrapolationType===_0x346789.HOLD)return o.unpack(a,0,t)}if(s>=n){var u=i[s=n-1];if(r=this._forwardExtrapolationDuration,this._forwardExtrapolationType===_0x346789.NONE||0!==r&&a$15.secondsDifference(e,u)>r)return;if(this._forwardExtrapolationType===_0x346789.HOLD)return s=n-1,o.unpack(a,s*o.packedLength,t)}var c=this._xTable,h=this._yTable,d=this._interpolationAlgorithm,f=this._packedInterpolationLength,p=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;var _=Math.min(d.getRequiredDataPoints(this._interpolationDegree,p),n);_!==this._numberOfPoints&&(this._numberOfPoints=_,c.length=_,h.length=_*f)}var m=this._numberOfPoints-1;if(m<1)return;var g=0,x=n-1;if(x-g+1>=m+1){var v=s-(m/2|0)-1;v<g&&(v=g);var y=v+m;y>x&&((v=(y=x)-m)<g&&(v=g)),g=v,x=y}for(var $=x-g+1,b=0;b<$;++b)c[b]=a$15.secondsDifference(i[g+b],i[x]);if(e$2b(o.convertPackedArrayForInterpolation))o.convertPackedArrayForInterpolation(a,g,x,h);else for(var T=0,C=this._packedLength,S=g*C,w=(x+1)*C;S<w;)h[T]=a[S],S++,T++;var E,P=a$15.secondsDifference(e,i[x]);if(0!==p&&e$2b(d.interpolate)){var A=Math.floor(f/(p+1));E=d.interpolate(P,c,h,A,p,p,this._interpolationResult)}else E=d.interpolateOrderZero(P,c,h,f,this._interpolationResult);return e$2b(o.unpackInterpolationResult)?o.unpackInterpolationResult(E,a,g,x,t):o.unpack(E,0,t)}return o.unpack(a,s*this._packedLength,t)}},g$x.prototype.setInterpolationOptions=function(e){if(e$2b(e)){var t=!1,i=e.interpolationAlgorithm,n=e.interpolationDegree;e$2b(i)&&this._interpolationAlgorithm!==i&&(this._interpolationAlgorithm=i,t=!0),e$2b(n)&&this._interpolationDegree!==n&&(this._interpolationDegree=n,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this))}},g$x.prototype.addSample=function(e,t,i){var n=this._innerDerivativeTypes,r=e$2b(n);o$1q.defined("time",e),o$1q.defined("value",t),r&&o$1q.defined("derivatives",i);var o=this._innerType,a=[];if(a.push(e),o.pack(t,a,a.length),r)for(var s=n.length,l=0;l<s;l++)n[l].pack(i[l],a,a.length);S$q(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$x.prototype.addSamples=function(e,t,i){var n=this._innerDerivativeTypes,r=e$2b(n);if(o$1q.defined("times",e),o$1q.defined("values",t),e.length!==t.length)throw new t$16("times and values must be the same length.");if(r&&(!e$2b(i)||i.length!==e.length))throw new t$16("times and derivativeValues must be the same length.");for(var o=this._innerType,a=e.length,s=[],l=0;l<a;l++)if(s.push(e[l]),o.pack(t[l],s,s.length),r)for(var u=i[l],c=n.length,h=0;h<c;h++)n[h].pack(u[h],s,s.length);S$q(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$x.prototype.addSamplesPackedArray=function(e,t){o$1q.defined("packedSamples",e),S$q(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$x.prototype.removeSample=function(e){o$1q.defined("time",e);var t=a$17(this._times,e,a$15.compare);return!(t<0)&&(z$r(this,t,1),!0)},g$x.prototype.removeSamples=function(e){o$1q.defined("timeInterval",e);var t=this._times,i=a$17(t,e.start,a$15.compare);i<0?i=~i:e.isStartIncluded||++i;var n=a$17(t,e.stop,a$15.compare);n<0?n=~n:e.isStopIncluded&&++n,z$r(this,i,n-i)},g$x.prototype.equals=function(e){if(this===e)return!0;if(!e$2b(e)||this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;var t,i,n=this._derivativeTypes,r=e$2b(n),o=e._derivativeTypes;if(r!==e$2b(o))return!1;if(r){if((i=n.length)!==o.length)return!1;for(t=0;t<i;t++)if(n[t]!==o[t])return!1}var a=this._times,s=e._times;if((i=a.length)!==s.length)return!1;for(t=0;t<i;t++)if(!a$15.equals(a[t],s[t]))return!1;var l=this._values,u=e._values;for(t=0;t<i;t++)if(l[t]!==u[t])return!1;return!0},g$x._mergeNewSamples=S$q,Object.defineProperties(o$y.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}}),o$y.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$k.FIXED,t)},o$y.prototype.getValueInReferenceFrame=function(e,t,i){if(o$1q.defined("time",e),o$1q.defined("referenceFrame",t),e$2b(i=this._property.getValue(e,i)))return t$K.convertToReferenceFrame(e,i,this._referenceFrame,t,i)},o$y.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)},o$y.prototype.addSample=function(e,t,i){var n=this._numberOfDerivatives;if(n>0&&(!e$2b(i)||i.length!==n))throw new t$16("derivatives length must be equal to the number of derivatives.");this._property.addSample(e,t,i)},o$y.prototype.addSamples=function(e,t,i){this._property.addSamples(e,t,i)},o$y.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)},o$y.prototype.removeSample=function(e){this._property.removeSample(e)},o$y.prototype.removeSamples=function(e){this._property.removeSamples(e)},o$y.prototype.equals=function(e){return this===e||e instanceof o$y&&r$Z.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var e$w={HORIZONTAL:0,VERTICAL:1},mr$1=Object.freeze(e$w),l$B=mr$1.HORIZONTAL,u$u=e$1U.WHITE,C$u=e$1U.BLACK,p$p=0,_$p=1;function i$u(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}function t$m(e){this._definitionChanged=new o$1h,this._intervals=new c$z,this._intervals.changedEvent.addEventListener(t$m.prototype._intervalsChanged,this),this._referenceFrame=u$_(e,Re$k.FIXED)}function t$l(){this._definitionChanged=new o$1h,this._intervals=new c$z,this._intervals.changedEvent.addEventListener(t$l.prototype._intervalsChanged,this)}function r$u(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new o$1h,this._normalize=u$_(t,!0),this.position=e}Object.defineProperties(i$u.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._orientation)&&r$Z.isConstant(this._evenColor)&&r$Z.isConstant(this._oddColor)&&r$Z.isConstant(this._offset)&&r$Z.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:C$$("orientation"),evenColor:C$$("evenColor"),oddColor:C$$("oddColor"),offset:C$$("offset"),repeat:C$$("repeat")}),i$u.prototype.getType=function(e){return"Stripe"},i$u.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.horizontal=r$Z.getValueOrDefault(this._orientation,e,l$B)===mr$1.HORIZONTAL,t.evenColor=r$Z.getValueOrClonedDefault(this._evenColor,e,u$u,t.evenColor),t.oddColor=r$Z.getValueOrClonedDefault(this._oddColor,e,C$u,t.oddColor),t.offset=r$Z.getValueOrDefault(this._offset,e,p$p),t.repeat=r$Z.getValueOrDefault(this._repeat,e,_$p),t},i$u.prototype.equals=function(e){return this===e||e instanceof i$u&&r$Z.equals(this._orientation,e._orientation)&&r$Z.equals(this._evenColor,e._evenColor)&&r$Z.equals(this._oddColor,e._oddColor)&&r$Z.equals(this._offset,e._offset)&&r$Z.equals(this._repeat,e._repeat)},Object.defineProperties(t$m.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}}),t$m.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$k.FIXED,t)},t$m.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2b(e))throw new t$16("time is required.");if(!e$2b(t))throw new t$16("referenceFrame is required.");var n=this._intervals.findDataForIntervalContainingDate(e);if(e$2b(n))return t$K.convertToReferenceFrame(e,n,this._referenceFrame,t,i)},t$m.prototype.equals=function(e){return this===e||e instanceof t$m&&this._intervals.equals(e._intervals,r$Z.equals)&&this._referenceFrame===e._referenceFrame},t$m.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(t$l.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),t$l.prototype.getValue=function(e,t){if(!e$2b(e))throw new t$16("time is required");var i=this._intervals.findDataForIntervalContainingDate(e);return e$2b(i)&&"function"==typeof i.clone?i.clone(t):i},t$l.prototype.equals=function(e){return this===e||e instanceof t$l&&this._intervals.equals(e._intervals,r$Z.equals)},t$l.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(r$u.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){var t=this._position;t!==e&&(e$2b(t)&&this._subscription(),this._position=e,e$2b(e)&&(this._subscription=e._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(e){this._normalize!==e&&(this._normalize=e,this._definitionChanged.raiseEvent(this))}}});var C$t=new o$1p,c$n=new o$1p,_$o=new a$15,p$o=1/60;function e$v(e,t){this._velocityVectorProperty=new r$u(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new o$1h,this.ellipsoid=u$_(t,t$13.WGS84);var i=this;this._velocityVectorProperty.definitionChanged.addEventListener((function(){i._definitionChanged.raiseEvent(i)}))}r$u.prototype.getValue=function(e,t){return this._getValue(e,t)},r$u.prototype._getValue=function(e,t,i){if(!e$2b(e))throw new t$16("time is required");e$2b(t)||(t=new o$1p);var n=this._position;if(r$Z.isConstant(n))return this._normalize?void 0:o$1p.clone(o$1p.ZERO,t);var r=n.getValue(e,C$t),o=n.getValue(a$15.addSeconds(e,p$o,_$o),c$n);if(e$2b(r)&&(e$2b(o)||(o=r,e$2b(r=n.getValue(a$15.addSeconds(e,-p$o,_$o),c$n))))){if(o$1p.equals(r,o))return this._normalize?void 0:o$1p.clone(o$1p.ZERO,t);e$2b(i)&&r.clone(i);var a=o$1p.subtract(o,r,t);return this._normalize?o$1p.normalize(a,t):o$1p.divideByScalar(a,p$o,t)}},r$u.prototype.equals=function(e){return this===e||e instanceof r$u&&r$Z.equals(this._position,e._position)},Object.defineProperties(e$v.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){this._ellipsoid!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var s$l=new o$1p,m$p=new o$1p,l$A=new p$1e,xr$2;function y$t(){}function U$r(e,t){return"#"===t[0]&&(t=xr$2+t),a$p.fromString(e,t)}function Kr$1(e,t,i){if(e$2b(i.reference))return U$r(t,i.reference);if(e$2b(i.velocityReference)){var n=U$r(t,i.velocityReference);switch(e){case o$1p:case y$t:return new r$u(n,e===y$t);case n$13:return new e$v(n)}}throw new t$14(JSON.stringify(i)+" is not valid CZML.")}function Ye$5(e,t){return new n$V((function(i,n){return t(e.getValue(i,n))}),e.isConstant)}e$v.prototype.getValue=function(e,t){var i=this._velocityVectorProperty._getValue(e,m$p,s$l);if(e$2b(i))return m$17.rotationMatrixFromPositionVelocity(s$l,i,this._ellipsoid,l$A),n$13.fromRotationMatrix(l$A,t)},e$v.prototype.equals=function(e){return this===e||e instanceof e$v&&r$Z.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))},y$t.packedLength=o$1p.packedLength,y$t.unpack=o$1p.unpack,y$t.pack=o$1p.pack;var g$w=new o$1p,B$p=new c$A,x$v=new a$18,Y$l=new d$W,pr$1=new n$13;function Ke$5(e){var t=e.rgbaf;if(e$2b(t))return t;var i=e.rgba;if(e$2b(i)){var n=i.length;if(n===e$1U.packedLength)return[e$1U.byteToFloat(i[0]),e$1U.byteToFloat(i[1]),e$1U.byteToFloat(i[2]),e$1U.byteToFloat(i[3])];t=new Array(n);for(var r=0;r<n;r+=5)t[r]=i[r],t[r+1]=e$1U.byteToFloat(i[r+1]),t[r+2]=e$1U.byteToFloat(i[r+2]),t[r+3]=e$1U.byteToFloat(i[r+3]),t[r+4]=e$1U.byteToFloat(i[r+4]);return t}}function $r$1(e,t){var i=u$_(e.uri,e);return e$2b(t)?t.getDerivedResource({url:i}):t$11.createIfNeeded(i)}function $e$4(e){var t=e.wsen;if(e$2b(t))return t;var i=e.wsenDegrees;if(e$2b(i)){var n=i.length;if(n===h$18.packedLength)return[e$2a.toRadians(i[0]),e$2a.toRadians(i[1]),e$2a.toRadians(i[2]),e$2a.toRadians(i[3])];t=new Array(n);for(var r=0;r<n;r+=5)t[r]=i[r],t[r+1]=e$2a.toRadians(i[r+1]),t[r+2]=e$2a.toRadians(i[r+2]),t[r+3]=e$2a.toRadians(i[r+3]),t[r+4]=e$2a.toRadians(i[r+4]);return t}}function Ie$7(e){var t=e.length;if(B$p.magnitude=1,2===t)return B$p.clock=e[0],B$p.cone=e[1],o$1p.fromSpherical(B$p,g$w),[g$w.x,g$w.y,g$w.z];for(var i=new Array(t/3*4),n=0,r=0;n<t;n+=3,r+=4)i[r]=e[n],B$p.clock=e[n+1],B$p.cone=e[n+2],o$1p.fromSpherical(B$p,g$w),i[r+1]=g$w.x,i[r+2]=g$w.y,i[r+3]=g$w.z;return i}function ke$5(e){var t=e.length;if(3===t)return B$p.clock=e[0],B$p.cone=e[1],B$p.magnitude=e[2],o$1p.fromSpherical(B$p,g$w),[g$w.x,g$w.y,g$w.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],B$p.clock=e[n+1],B$p.cone=e[n+2],B$p.magnitude=e[n+3],o$1p.fromSpherical(B$p,g$w),i[n+1]=g$w.x,i[n+2]=g$w.y,i[n+3]=g$w.z;return i}function je$7(e){var t=e.length;if(3===t)return x$v.longitude=e[0],x$v.latitude=e[1],x$v.height=e[2],t$13.WGS84.cartographicToCartesian(x$v,g$w),[g$w.x,g$w.y,g$w.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],x$v.longitude=e[n+1],x$v.latitude=e[n+2],x$v.height=e[n+3],t$13.WGS84.cartographicToCartesian(x$v,g$w),i[n+1]=g$w.x,i[n+2]=g$w.y,i[n+3]=g$w.z;return i}function ze$7(e){var t=e.length;if(3===t)return x$v.longitude=e$2a.toRadians(e[0]),x$v.latitude=e$2a.toRadians(e[1]),x$v.height=e[2],t$13.WGS84.cartographicToCartesian(x$v,g$w),[g$w.x,g$w.y,g$w.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],x$v.longitude=e$2a.toRadians(e[n+1]),x$v.latitude=e$2a.toRadians(e[n+2]),x$v.height=e[n+3],t$13.WGS84.cartographicToCartesian(x$v,g$w),i[n+1]=g$w.x,i[n+2]=g$w.y,i[n+3]=g$w.z;return i}function _r$1(e){var t=e.cartesian;if(e$2b(t))return t;var i=e.cartesianVelocity;if(e$2b(i))return i;var n=e.unitCartesian;if(e$2b(n))return n;var r=e.unitSpherical;if(e$2b(r))return Ie$7(r);var o=e.spherical;if(e$2b(o))return ke$5(o);var a=e.cartographicRadians;if(e$2b(a))return je$7(a);var s=e.cartographicDegrees;if(e$2b(s))return ze$7(s);throw new t$14(JSON.stringify(e)+" is not a valid CZML interval.")}function Ir$2(e,t){o$1p.unpack(e,t,g$w),o$1p.normalize(g$w,g$w),o$1p.pack(g$w,e,t)}function Ce$8(e){var t=_r$1(e);if(3===t.length)return Ir$2(t,0),t;for(var i=1;i<t.length;i+=4)Ir$2(t,i);return t}function kr$1(e,t){n$13.unpack(e,t,pr$1),n$13.normalize(pr$1,pr$1),n$13.pack(pr$1,e,t)}function Ue$7(e){var t=e.unitQuaternion;if(e$2b(t)){if(4===t.length)return kr$1(t,0),t;for(var i=1;i<t.length;i+=5)kr$1(t,i)}return t}function jr(e){return"boolean"==typeof e?Boolean:"number"==typeof e?Number:"string"==typeof e?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?f$18:e.hasOwnProperty("cartesian2")?o$1o:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?o$1p:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?y$t:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?e$1U:e.hasOwnProperty("arcType")?m$1f:e.hasOwnProperty("classificationType")?_0x3b5200:e.hasOwnProperty("colorBlendMode")?I$J:e.hasOwnProperty("cornerType")?ar$5:e.hasOwnProperty("heightReference")?k$P:e.hasOwnProperty("horizontalOrigin")?j$T:e.hasOwnProperty("date")?a$15:e.hasOwnProperty("labelStyle")?R$Q:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?o$Y:e.hasOwnProperty("distanceDisplayCondition")?r$Y:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?n$13:e.hasOwnProperty("shadowMode")?W$W:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?mr$1:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?h$18:e.hasOwnProperty("uri")?h$16:e.hasOwnProperty("verticalOrigin")?S$O:Object}function rn(e,t,i){switch(e){case m$1f:return m$1f[u$_(t.arcType,t)];case Array:return t.array;case Boolean:return u$_(t.boolean,t);case f$18:return t.boundingRectangle;case o$1o:return t.cartesian2;case o$1p:return _r$1(t);case y$t:return Ce$8(t);case e$1U:return Ke$5(t);case _0x3b5200:return _0x3b5200[u$_(t.classificationType,t)];case I$J:return I$J[u$_(t.colorBlendMode,t)];case ar$5:return ar$5[u$_(t.cornerType,t)];case k$P:return k$P[u$_(t.heightReference,t)];case j$T:return j$T[u$_(t.horizontalOrigin,t)];case Image:return $r$1(t,i);case a$15:return a$15.fromIso8601(u$_(t.date,t));case R$Q:return R$Q[u$_(t.labelStyle,t)];case Number:return u$_(t.number,t);case o$Y:return t.nearFarScalar;case r$Y:return t.distanceDisplayCondition;case Object:return u$_(u$_(t.object,t.value),t);case n$13:return Ue$7(t);case m$q:return u$_(t.number,t);case W$W:return W$W[u$_(u$_(t.shadowMode,t.shadows),t)];case String:return u$_(t.string,t);case mr$1:return mr$1[u$_(t.stripeOrientation,t)];case h$18:return $e$4(t);case h$16:return $r$1(t,i);case S$O:return S$O[u$_(t.verticalOrigin,t)];default:throw new t$14(e)}}var en={HERMITE:E$I,LAGRANGE:i$I,LINEAR:v$A};function lr$1(e,t){var i=e.interpolationAlgorithm,n=e.interpolationDegree;(e$2b(i)||e$2b(n))&&t.setInterpolationOptions({interpolationAlgorithm:en[i],interpolationDegree:n});var r=e.forwardExtrapolationType;e$2b(r)&&(t.forwardExtrapolationType=_0x346789[r]);var o=e.forwardExtrapolationDuration;e$2b(o)&&(t.forwardExtrapolationDuration=o);var a=e.backwardExtrapolationType;e$2b(a)&&(t.backwardExtrapolationType=_0x346789[a]);var s=e.backwardExtrapolationDuration;e$2b(s)&&(t.backwardExtrapolationDuration=s)}var zr$1={iso8601:void 0};function b$A(e){if(e$2b(e))return zr$1.iso8601=e,d$W.fromIso8601(zr$1)}function Br(e){var t=o$H.MAXIMUM_INTERVAL.clone();return t.data=e,t}function Cr$1(e){var t=new e$A;return t.intervals.addInterval(Br(e)),t}function Ur$1(e){var t=new t$q(e.referenceFrame);return t.intervals.addInterval(Br(e)),t}function gr$1(e,t,i,n,r,o,a){var s=b$A(n.interval);e$2b(r)&&(s=e$2b(s)?d$W.intersect(s,r,Y$l):r);var l,u,c,h=!e$2b(n.reference)&&!e$2b(n.velocityReference),d=e$2b(s)&&!s.equals(o$H.MAXIMUM_INTERVAL);if(!0===n.delete)return d?re$k(t[i],s):void(t[i]=void 0);var f=!1;if(h){if(!e$2b(u=rn(e,n,o)))return;l=u$_(e.packedLength,1),c=u$_(u.length,1),f=!e$2b(n.array)&&"string"!=typeof u&&c>l&&e!==Object}var p="function"==typeof e.unpack&&e!==m$q;if(f||d){var _,m,g=t[i],x=n.epoch;if(e$2b(x)&&(_=a$15.fromIso8601(x)),f&&!d)return g instanceof g$x||(t[i]=g=new g$x(e)),g.addSamplesPackedArray(u,_),void lr$1(n,g);if(!f&&d)return(s=s.clone()).data=h?p?e.unpack(u,0):u:Kr$1(e,a,n),e$2b(g)||(t[i]=g=h?new t$l:new e$A),void(h&&g instanceof t$l?g.intervals.addInterval(s):g instanceof e$A?(h&&(s.data=new e$1I(s.data)),g.intervals.addInterval(s)):(t[i]=g=Cr$1(g),h&&(s.data=new e$1I(s.data)),g.intervals.addInterval(s)));e$2b(g)||(t[i]=g=new e$A),g instanceof e$A||(t[i]=g=Cr$1(g));var v=g.intervals;(!e$2b(m=v.findInterval(s))||!(m.data instanceof g$x))&&((m=s.clone()).data=new g$x(e),v.addInterval(m)),m.data.addSamplesPackedArray(u,_),lr$1(n,m.data)}else t[i]=h?new e$1I(p?e.unpack(u,0):u):Kr$1(e,a,n)}function re$k(e,t){if(e instanceof g$x)e.removeSamples(t);else if(e instanceof t$l)e.intervals.removeInterval(t);else if(e instanceof e$A){for(var i=e.intervals,n=0;n<i.length;++n){var r=d$W.intersect(i.get(n),t,Y$l);r.isEmpty||re$k(r.data,t)}i.removeInterval(t)}else;}function f$t(e,t,i,n,r,o,a){if(e$2b(n))if(Array.isArray(n))for(var s=0,l=n.length;s<l;++s)gr$1(e,t,i,n[s],r,o,a);else gr$1(e,t,i,n,r,o,a)}function ee$k(e,t,i,n,r,o){var a=b$A(i.interval);e$2b(n)&&(a=e$2b(a)?d$W.intersect(a,n,Y$l):n);var s,l=e$2b(i.cartesianVelocity)?1:0,u=o$1p.packedLength*(l+1),c=!e$2b(i.reference),h=e$2b(a)&&!a.equals(o$H.MAXIMUM_INTERVAL);if(!0===i.delete)return h?ne$j(e[t],a):void(e[t]=void 0);var d,f=!1;if(c&&(e$2b(i.referenceFrame)&&(d=Re$k[i.referenceFrame]),d=u$_(d,Re$k.FIXED),f=u$_((s=_r$1(i)).length,1)>u),f||h){var p,_,m=e[t],g=i.epoch;if(e$2b(g)&&(p=a$15.fromIso8601(g)),f&&!h)return(!(m instanceof o$y)||e$2b(d)&&m.referenceFrame!==d)&&(e[t]=m=new o$y(d,l)),m.addSamplesPackedArray(s,p),void lr$1(i,m);if(!f&&h)return(a=a.clone()).data=c?o$1p.unpack(s):U$r(o,i.reference),e$2b(m)||(m=c?new t$m(d):new t$q(d),e[t]=m),void(c&&m instanceof t$m&&e$2b(d)&&m.referenceFrame===d?m.intervals.addInterval(a):m instanceof t$q?(c&&(a.data=new r$U(a.data,d)),m.intervals.addInterval(a)):(e[t]=m=Ur$1(m),c&&(a.data=new r$U(a.data,d)),m.intervals.addInterval(a)));e$2b(m)?m instanceof t$q||(e[t]=m=Ur$1(m)):e[t]=m=new t$q(d);var x=m.intervals;(!e$2b(_=x.findInterval(a))||!(_.data instanceof o$y)||e$2b(d)&&_.data.referenceFrame!==d)&&((_=a.clone()).data=new o$y(d,l),x.addInterval(_)),_.data.addSamplesPackedArray(s,p),lr$1(i,_.data)}else e[t]=c?new r$U(o$1p.unpack(s),d):U$r(o,i.reference)}function ne$j(e,t){if(e instanceof o$y)e.removeSamples(t);else if(e instanceof t$m)e.intervals.removeInterval(t);else if(e instanceof t$q){for(var i=e.intervals,n=0;n<i.length;++n){var r=d$W.intersect(i.get(n),t,Y$l);r.isEmpty||ne$j(r.data,t)}i.removeInterval(t)}else;}function ae$c(e,t,i,n,r,o){if(e$2b(i))if(Array.isArray(i))for(var a=0,s=i.length;a<s;++a)ee$k(e,t,i[a],n,r,o);else ee$k(e,t,i,n,r,o)}function ie$d(e,t,i,n,r,o){var a=b$A(i.interval);e$2b(n)&&(a=e$2b(a)?d$W.intersect(a,n,Y$l):n);var s,l,u,c=e[t];if(e$2b(a)){c instanceof e$z||(c=new e$z,e[t]=c);var h=c.intervals;e$2b(l=h.findInterval({start:a.start,stop:a.stop}))?s=l.data:(l=a.clone(),h.addInterval(l))}else s=c;e$2b(i.solidColor)?(s instanceof t$Q||(s=new t$Q),f$t(e$1U,s,"color",(u=i.solidColor).color,void 0,void 0,o)):e$2b(i.grid)?(s instanceof t$p||(s=new t$p),f$t(e$1U,s,"color",(u=i.grid).color,void 0,r,o),f$t(Number,s,"cellAlpha",u.cellAlpha,void 0,r,o),f$t(o$1o,s,"lineCount",u.lineCount,void 0,r,o),f$t(o$1o,s,"lineThickness",u.lineThickness,void 0,r,o),f$t(o$1o,s,"lineOffset",u.lineOffset,void 0,r,o)):e$2b(i.image)?(s instanceof a$R||(s=new a$R),u=i.image,f$t(Image,s,"image",u.image,void 0,r,o),f$t(o$1o,s,"repeat",u.repeat,void 0,r,o),f$t(e$1U,s,"color",u.color,void 0,r,o),f$t(Boolean,s,"transparent",u.transparent,void 0,r,o)):e$2b(i.stripe)?(s instanceof i$u||(s=new i$u),u=i.stripe,f$t(mr$1,s,"orientation",u.orientation,void 0,r,o),f$t(e$1U,s,"evenColor",u.evenColor,void 0,r,o),f$t(e$1U,s,"oddColor",u.oddColor,void 0,r,o),f$t(Number,s,"offset",u.offset,void 0,r,o),f$t(Number,s,"repeat",u.repeat,void 0,r,o)):e$2b(i.polylineOutline)?(s instanceof e$x||(s=new e$x),f$t(e$1U,s,"color",(u=i.polylineOutline).color,void 0,r,o),f$t(e$1U,s,"outlineColor",u.outlineColor,void 0,r,o),f$t(Number,s,"outlineWidth",u.outlineWidth,void 0,r,o)):e$2b(i.polylineGlow)?(s instanceof t$n||(s=new t$n),f$t(e$1U,s,"color",(u=i.polylineGlow).color,void 0,r,o),f$t(Number,s,"glowPower",u.glowPower,void 0,r,o),f$t(Number,s,"taperPower",u.taperPower,void 0,r,o)):e$2b(i.polylineArrow)?(s instanceof t$o||(s=new t$o),f$t(e$1U,s,"color",(u=i.polylineArrow).color,void 0,void 0,o)):e$2b(i.polylineDash)?(s instanceof o$z||(s=new o$z),f$t(e$1U,s,"color",(u=i.polylineDash).color,void 0,void 0,o),f$t(e$1U,s,"gapColor",u.gapColor,void 0,void 0,o),f$t(Number,s,"dashLength",u.dashLength,void 0,r,o),f$t(Number,s,"dashPattern",u.dashPattern,void 0,r,o)):e$2b(i.checkerboard)&&(s instanceof r$w||(s=new r$w),f$t(e$1U,s,"evenColor",(u=i.checkerboard).evenColor,void 0,r,o),f$t(e$1U,s,"oddColor",u.oddColor,void 0,r,o),f$t(o$1o,s,"repeat",u.repeat,void 0,r,o)),e$2b(l)?l.data=s:e[t]=s}function L$v(e,t,i,n,r,o){if(e$2b(i))if(Array.isArray(i))for(var a=0,s=i.length;a<s;++a)ie$d(e,t,i[a],n,r,o);else ie$d(e,t,i,n,r,o)}function nn(e,t,i,n){e$2b(t.name)&&(e.name=t.name)}function an(e,t,i,n){var r=t.description;e$2b(r)&&f$t(String,e,"description",r,void 0,n,i)}function on(e,t,i,n){var r=t.position;e$2b(r)&&ae$c(e,"position",r,void 0,n,i)}function sn(e,t,i,n){var r=t.viewFrom;e$2b(r)&&f$t(o$1p,e,"viewFrom",r,void 0,n,i)}function fn(e,t,i,n){var r=t.orientation;e$2b(r)&&f$t(n$13,e,"orientation",r,void 0,n,i)}function tn(e,t,i,n){var r=t.properties;if(e$2b(r))for(var o in e$2b(e.properties)||(e.properties=new f$T),r)if(r.hasOwnProperty(o)){e.properties.hasProperty(o)||e.properties.addProperty(o);var a=r[o];if(Array.isArray(a))for(var s=0,l=a.length;s<l;++s)gr$1(jr(a[s]),e.properties,o,a[s],void 0,n,i);else gr$1(jr(a),e.properties,o,a,void 0,n,i)}}function Mr$2(e,t,i,n,r,o,a){var s=i.map((function(e){return U$r(r,e)}));if(e$2b(n)){n=b$A(n);var l=e[t];if(!(l instanceof a)){var u=new a;u.intervals.addInterval(Br(l)),e[t]=l=u}n.data=new o(s),l.intervals.addInterval(n)}else e[t]=new o(s)}function oe$d(e,t,i,n){var r=i.references;e$2b(r)?Mr$2(e,t,r,i.interval,n,i$v,e$A):f$t(Array,e,t,i,void 0,void 0,n)}function se$b(e,t,i,n){if(e$2b(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)oe$d(e,t,i[r],n);else oe$d(e,t,i,n)}function fe$8(e,t,i,n){var r=i.references;e$2b(r)?Mr$2(e,t,r,i.interval,n,n$n,t$q):(e$2b(i.cartesian)?i.array=o$1p.unpackArray(i.cartesian):e$2b(i.cartographicRadians)?i.array=o$1p.fromRadiansArrayHeights(i.cartographicRadians):e$2b(i.cartographicDegrees)&&(i.array=o$1p.fromDegreesArrayHeights(i.cartographicDegrees)),e$2b(i.array)&&f$t(Array,e,t,i,void 0,void 0,n))}function vr$1(e,t,i,n){if(e$2b(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)fe$8(e,t,i[r],n);else fe$8(e,t,i,n)}function dn(e){return o$1p.unpackArray(e)}function un(e){return o$1p.fromRadiansArrayHeights(e)}function hn(e){return o$1p.fromDegreesArrayHeights(e)}function te$f(e,t,i,n){var r=i.references;if(e$2b(r)){var o=r.map((function(e){var t={};return Mr$2(t,"positions",e,i.interval,n,n$n,t$q),t.positions}));e[t]=new n$n(o)}else e$2b(i.cartesian)?i.array=i.cartesian.map(dn):e$2b(i.cartographicRadians)?i.array=i.cartographicRadians.map(un):e$2b(i.cartographicDegrees)&&(i.array=i.cartographicDegrees.map(hn)),e$2b(i.array)&&f$t(Array,e,t,i,void 0,void 0,n)}function mn(e,t,i,n){if(e$2b(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)te$f(e,t,i[r],n);else te$f(e,t,i,n)}function pn(e,t,i,n){var r=t.availability;if(e$2b(r)){var o;if(Array.isArray(r))for(var a=0,s=r.length;a<s;++a)e$2b(o)||(o=new c$z),o.addInterval(b$A(r[a]));else(o=new c$z).addInterval(b$A(r));e.availability=o}}function ln(e,t,i,n,r){!e$2b(t)||f$t(y$t,e,"alignedAxis",t,i,n,r)}function gn(e,t,i,n){var r=t.billboard;if(e$2b(r)){var o=b$A(r.interval),a=e.billboard;e$2b(a)||(e.billboard=a=new n$T),f$t(Boolean,a,"show",r.show,o,n,i),f$t(Image,a,"image",r.image,o,n,i),f$t(Number,a,"scale",r.scale,o,n,i),f$t(o$1o,a,"pixelOffset",r.pixelOffset,o,n,i),f$t(o$1p,a,"eyeOffset",r.eyeOffset,o,n,i),f$t(j$T,a,"horizontalOrigin",r.horizontalOrigin,o,n,i),f$t(S$O,a,"verticalOrigin",r.verticalOrigin,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(e$1U,a,"color",r.color,o,n,i),f$t(m$q,a,"rotation",r.rotation,o,n,i),ln(a,r.alignedAxis,o,n,i),f$t(Boolean,a,"sizeInMeters",r.sizeInMeters,o,n,i),f$t(Number,a,"width",r.width,o,n,i),f$t(Number,a,"height",r.height,o,n,i),f$t(o$Y,a,"scaleByDistance",r.scaleByDistance,o,n,i),f$t(o$Y,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),f$t(o$Y,a,"pixelOffsetScaleByDistance",r.pixelOffsetScaleByDistance,o,n,i),f$t(f$18,a,"imageSubRegion",r.imageSubRegion,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function vn(e,t,i,n){var r=t.box;if(e$2b(r)){var o=b$A(r.interval),a=e.box;e$2b(a)||(e.box=a=new n$S),f$t(Boolean,a,"show",r.show,o,n,i),f$t(o$1p,a,"dimensions",r.dimensions,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function wn(e,t,i,n){var r=t.corridor;if(e$2b(r)){var o=b$A(r.interval),a=e.corridor;e$2b(a)||(e.corridor=a=new n$R),f$t(Boolean,a,"show",r.show,o,n,i),vr$1(a,"positions",r.positions,i),f$t(Number,a,"width",r.width,o,n,i),f$t(Number,a,"height",r.height,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$t(k$P,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$t(ar$5,a,"cornerType",r.cornerType,o,n,i),f$t(Number,a,"granularity",r.granularity,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(_0x3b5200,a,"classificationType",r.classificationType,o,n,i),f$t(Number,a,"zIndex",r.zIndex,o,n,i)}}function Pn(e,t,i,n){var r=t.cylinder;if(e$2b(r)){var o=b$A(r.interval),a=e.cylinder;e$2b(a)||(e.cylinder=a=new n$Q),f$t(Boolean,a,"show",r.show,o,n,i),f$t(Number,a,"length",r.length,o,n,i),f$t(Number,a,"topRadius",r.topRadius,o,n,i),f$t(Number,a,"bottomRadius",r.bottomRadius,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(Number,a,"numberOfVerticalLines",r.numberOfVerticalLines,o,n,i),f$t(Number,a,"slices",r.slices,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function bn(e,t){var i=e.version;if(e$2b(i)&&"string"==typeof i){var n=i.split(".");if(2===n.length){if("1"!==n[0])throw new t$14("SuperMap3D only supports CZML version 1.");t._version=i}}if(!e$2b(t._version))throw new t$14("CZML version information invalid. It is expected to be a property on the document object in the <Major>.<Minor> version format.");var r=t._documentPacket;e$2b(e.name)&&(r.name=e.name);var o=e.clock;if(e$2b(o)){var a=r.clock;e$2b(a)?(a.interval=u$_(o.interval,a.interval),a.currentTime=u$_(o.currentTime,a.currentTime),a.range=u$_(o.range,a.range),a.step=u$_(o.step,a.step),a.multiplier=u$_(o.multiplier,a.multiplier)):r.clock={interval:o.interval,currentTime:o.currentTime,range:o.range,step:o.step,multiplier:o.multiplier}}}function On(e,t,i,n){var r=t.ellipse;if(e$2b(r)){var o=b$A(r.interval),a=e.ellipse;e$2b(a)||(e.ellipse=a=new n$P),f$t(Boolean,a,"show",r.show,o,n,i),f$t(Number,a,"semiMajorAxis",r.semiMajorAxis,o,n,i),f$t(Number,a,"semiMinorAxis",r.semiMinorAxis,o,n,i),f$t(Number,a,"height",r.height,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$t(k$P,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$t(m$q,a,"rotation",r.rotation,o,n,i),f$t(m$q,a,"stRotation",r.stRotation,o,n,i),f$t(Number,a,"granularity",r.granularity,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(Number,a,"numberOfVerticalLines",r.numberOfVerticalLines,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(_0x3b5200,a,"classificationType",r.classificationType,o,n,i),f$t(Number,a,"zIndex",r.zIndex,o,n,i)}}function Tn(e,t,i,n){var r=t.ellipsoid;if(e$2b(r)){var o=b$A(r.interval),a=e.ellipsoid;e$2b(a)||(e.ellipsoid=a=new e$1n),f$t(Boolean,a,"show",r.show,o,n,i),f$t(o$1p,a,"radii",r.radii,o,n,i),f$t(o$1p,a,"innerRadii",r.innerRadii,o,n,i),f$t(Number,a,"minimumClock",r.minimumClock,o,n,i),f$t(Number,a,"maximumClock",r.maximumClock,o,n,i),f$t(Number,a,"minimumCone",r.minimumCone,o,n,i),f$t(Number,a,"maximumCone",r.maximumCone,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(Number,a,"stackPartitions",r.stackPartitions,o,n,i),f$t(Number,a,"slicePartitions",r.slicePartitions,o,n,i),f$t(Number,a,"subdivisions",r.subdivisions,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function An(e,t,i,n){var r=t.label;if(e$2b(r)){var o=b$A(r.interval),a=e.label;e$2b(a)||(e.label=a=new n$O),f$t(Boolean,a,"show",r.show,o,n,i),f$t(String,a,"text",r.text,o,n,i),f$t(String,a,"font",r.font,o,n,i),f$t(R$Q,a,"style",r.style,o,n,i),f$t(Number,a,"scale",r.scale,o,n,i),f$t(Boolean,a,"showBackground",r.showBackground,o,n,i),f$t(e$1U,a,"backgroundColor",r.backgroundColor,o,n,i),f$t(o$1o,a,"backgroundPadding",r.backgroundPadding,o,n,i),f$t(o$1o,a,"pixelOffset",r.pixelOffset,o,n,i),f$t(o$1p,a,"eyeOffset",r.eyeOffset,o,n,i),f$t(j$T,a,"horizontalOrigin",r.horizontalOrigin,o,n,i),f$t(S$O,a,"verticalOrigin",r.verticalOrigin,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(e$1U,a,"fillColor",r.fillColor,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(o$Y,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),f$t(o$Y,a,"pixelOffsetScaleByDistance",r.pixelOffsetScaleByDistance,o,n,i),f$t(o$Y,a,"scaleByDistance",r.scaleByDistance,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function Rn(e,t,i,n){var r=t.model;if(e$2b(r)){var o=b$A(r.interval),a=e.model;e$2b(a)||(e.model=a=new t$J),f$t(Boolean,a,"show",r.show,o,n,i),f$t(h$16,a,"uri",r.gltf,o,n,i),f$t(Number,a,"scale",r.scale,o,n,i),f$t(Number,a,"minimumPixelSize",r.minimumPixelSize,o,n,i),f$t(Number,a,"maximumScale",r.maximumScale,o,n,i),f$t(Boolean,a,"incrementallyLoadTextures",r.incrementallyLoadTextures,o,n,i),f$t(Boolean,a,"runAnimations",r.runAnimations,o,n,i),f$t(Boolean,a,"clampAnimations",r.clampAnimations,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(e$1U,a,"silhouetteColor",r.silhouetteColor,o,n,i),f$t(Number,a,"silhouetteSize",r.silhouetteSize,o,n,i),f$t(e$1U,a,"color",r.color,o,n,i),f$t(I$J,a,"colorBlendMode",r.colorBlendMode,o,n,i),f$t(Number,a,"colorBlendAmount",r.colorBlendAmount,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i);var s,l,u=r.nodeTransformations;if(e$2b(u))if(Array.isArray(u))for(s=0,l=u.length;s<l;++s)de$b(a,u[s],o,n,i);else de$b(a,u,o,n,i);var c=r.articulations;if(e$2b(c))if(Array.isArray(c))for(s=0,l=c.length;s<l;++s)ue$b(a,c[s],o,n,i);else ue$b(a,c,o,n,i)}}function de$b(e,t,i,n,r){var o=b$A(t.interval);e$2b(i)&&(o=e$2b(o)?d$W.intersect(o,i,Y$l):i);for(var a=e.nodeTransformations,s=Object.keys(t),l=0,u=s.length;l<u;++l){var c=s[l];if("interval"!==c){var h=t[c];if(e$2b(h)){e$2b(a)||(e.nodeTransformations=a=new f$T),a.hasProperty(c)||a.addProperty(c);var d=a[c];e$2b(d)||(a[c]=d=new a$N),f$t(o$1p,d,"translation",h.translation,o,n,r),f$t(n$13,d,"rotation",h.rotation,o,n,r),f$t(o$1p,d,"scale",h.scale,o,n,r)}}}}function ue$b(e,t,i,n,r){var o=b$A(t.interval);e$2b(i)&&(o=e$2b(o)?d$W.intersect(o,i,Y$l):i);for(var a=e.articulations,s=Object.keys(t),l=0,u=s.length;l<u;++l){var c=s[l];if("interval"!==c){var h=t[c];!e$2b(h)||(e$2b(a)||(e.articulations=a=new f$T),a.hasProperty(c)||a.addProperty(c),f$t(Number,a,c,h,o,n,r))}}}function xn(e,t,i,n){var r=t.path;if(e$2b(r)){var o=b$A(r.interval),a=e.path;e$2b(a)||(e.path=a=new n$N),f$t(Boolean,a,"show",r.show,o,n,i),f$t(Number,a,"leadTime",r.leadTime,o,n,i),f$t(Number,a,"trailTime",r.trailTime,o,n,i),f$t(Number,a,"width",r.width,o,n,i),f$t(Number,a,"resolution",r.resolution,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function _n(e,t,i,n){var r=t.point;if(e$2b(r)){var o=b$A(r.interval),a=e.point;e$2b(a)||(e.point=a=new n$M),f$t(Boolean,a,"show",r.show,o,n,i),f$t(Number,a,"pixelSize",r.pixelSize,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(e$1U,a,"color",r.color,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(o$Y,a,"scaleByDistance",r.scaleByDistance,o,n,i),f$t(o$Y,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function rr$2(e){this.polygon=e,this._definitionChanged=new o$1h}function Bn(e,t,i,n){var r=t.polygon;if(e$2b(r)){var o=b$A(r.interval),a=e.polygon;e$2b(a)||(e.polygon=a=new l$Z),f$t(Boolean,a,"show",r.show,o,n,i),vr$1(a,"_positions",r.positions,i),mn(a,"_holes",r.holes,i),(e$2b(a._positions)||e$2b(a._holes))&&(a.hierarchy=new rr$2(a)),f$t(Number,a,"height",r.height,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$t(k$P,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$t(m$q,a,"stRotation",r.stRotation,o,n,i),f$t(Number,a,"granularity",r.granularity,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(Boolean,a,"perPositionHeight",r.perPositionHeight,o,n,i),f$t(Boolean,a,"closeTop",r.closeTop,o,n,i),f$t(Boolean,a,"closeBottom",r.closeBottom,o,n,i),f$t(m$1f,a,"arcType",r.arcType,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(_0x3b5200,a,"classificationType",r.classificationType,o,n,i),f$t(Number,a,"zIndex",r.zIndex,o,n,i)}}function Mn(e){return e?m$1f.GEODESIC:m$1f.NONE}function En(e,t,i,n){var r=t.polyline;if(e$2b(r)){var o=b$A(r.interval),a=e.polyline;if(e$2b(a)||(e.polyline=a=new a$L),f$t(Boolean,a,"show",r.show,o,n,i),vr$1(a,"positions",r.positions,i),f$t(Number,a,"width",r.width,o,n,i),f$t(Number,a,"granularity",r.granularity,o,n,i),L$v(a,"material",r.material,o,n,i),L$v(a,"depthFailMaterial",r.depthFailMaterial,o,n,i),f$t(m$1f,a,"arcType",r.arcType,o,n,i),f$t(Boolean,a,"clampToGround",r.clampToGround,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(_0x3b5200,a,"classificationType",r.classificationType,o,n,i),f$t(Number,a,"zIndex",r.zIndex,o,n,i),e$2b(r.followSurface)&&!e$2b(r.arcType)){var s={};f$t(Boolean,s,"followSurface",r.followSurface,o,n,i),a.arcType=Ye$5(s.followSurface,Mn)}}}function Nn(e,t,i,n){var r=t.rectangle;if(e$2b(r)){var o=b$A(r.interval),a=e.rectangle;e$2b(a)||(e.rectangle=a=new n$L),f$t(Boolean,a,"show",r.show,o,n,i),f$t(h$18,a,"coordinates",r.coordinates,o,n,i),f$t(Number,a,"height",r.height,o,n,i),f$t(k$P,a,"heightReference",r.heightReference,o,n,i),f$t(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$t(k$P,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$t(m$q,a,"rotation",r.rotation,o,n,i),f$t(m$q,a,"stRotation",r.stRotation,o,n,i),f$t(Number,a,"granularity",r.granularity,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$t(_0x3b5200,a,"classificationType",r.classificationType,o,n,i),f$t(Number,a,"zIndex",r.zIndex,o,n,i)}}function Ln(e,t,i,n){var r=t.tileset;if(e$2b(r)){var o=b$A(r.interval),a=e.tileset;e$2b(a)||(e.tileset=a=new i$R),f$t(Boolean,a,"show",r.show,o,n,i),f$t(h$16,a,"uri",r.uri,o,n,i),f$t(Number,a,"maximumScreenSpaceError",r.maximumScreenSpaceError,o,n,i)}}function Sn(e,t,i,n){var r=t.wall;if(e$2b(r)){var o=b$A(r.interval),a=e.wall;e$2b(a)||(e.wall=a=new e$1j),f$t(Boolean,a,"show",r.show,o,n,i),vr$1(a,"positions",r.positions,i),se$b(a,"minimumHeights",r.minimumHeights,i),se$b(a,"maximumHeights",r.maximumHeights,i),f$t(Number,a,"granularity",r.granularity,o,n,i),f$t(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$t(Boolean,a,"outline",r.outline,o,n,i),f$t(e$1U,a,"outlineColor",r.outlineColor,o,n,i),f$t(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$t(W$W,a,"shadows",r.shadows,o,n,i),f$t(r$Y,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function he$a(e,t,i,n,r){var o=e.id;if(e$2b(o)||(o=e$1Q()),xr$2=o,!e$2b(r._version)&&"document"!==o)throw new t$14("The first CZML packet is required to be the document object.");if(!0===e.delete)t.removeById(o);else if("document"===o)bn(e,r);else{var a=t.getOrCreateEntity(o),s=e.parent;e$2b(s)&&(a.parent=t.getOrCreateEntity(s));for(var l=i.length-1;l>-1;l--)i[l](a,e,t,n)}xr$2=void 0}function Hn(e){var t,i=e._documentPacket.clock;if(!e$2b(i)){if(!e$2b(e._clock)){var n=e._entityCollection.computeAvailability();if(!n.start.equals(o$H.MINIMUM_VALUE)){var r=n.start,o=n.stop,a=a$15.secondsDifference(o,r),s=Math.round(a/120);return(t=new e$y).startTime=a$15.clone(r),t.stopTime=a$15.clone(o),t.clockRange=tt$9.LOOP_STOP,t.multiplier=s,t.currentTime=a$15.clone(r),t.clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}e$2b(e._clock)?t=e._clock.clone():((t=new e$y).startTime=o$H.MINIMUM_VALUE.clone(),t.stopTime=o$H.MAXIMUM_VALUE.clone(),t.currentTime=o$H.MINIMUM_VALUE.clone(),t.clockRange=tt$9.LOOP_STOP,t.clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);var l=b$A(i.interval);return e$2b(l)&&(t.startTime=l.start,t.stopTime=l.stop),e$2b(i.currentTime)&&(t.currentTime=a$15.fromIso8601(i.currentTime)),e$2b(i.range)&&(t.clockRange=u$_(tt$9[i.range],tt$9.LOOP_STOP)),e$2b(i.step)&&(t.clockStep=u$_(g$Q[i.step],g$Q.SYSTEM_CLOCK_MULTIPLIER)),e$2b(i.multiplier)&&(t.multiplier=i.multiplier),!t.equals(e._clock)&&(e._clock=t.clone(e._clock),!0)}function me$d(e,t,i,n){if(!e$2b(t))throw new t$16("czml is required.");var r=t,o=(i=u$_(i,u$_.EMPTY_OBJECT)).sourceUri,a=i.credit;if("string"==typeof a&&(a=new r$T(a)),e._credit=a,"string"==typeof t||t instanceof t$11){r=(t=t$11.createIfNeeded(t)).fetchJson(),o=u$_(o,t.clone());var s=e._resourceCredits,l=t.credits;if(e$2b(l))for(var u=l.length,c=0;c<u;c++)s.push(l[c])}return o=t$11.createIfNeeded(o),o$A.setLoading(e,!0),o$1l(r,(function(t){return cn(e,t,o,n)})).otherwise((function(t){return o$A.setLoading(e,!1),e._error.raiseEvent(e,t),console.log(t),o$1l.reject(t)}))}function cn(e,t,i,n){o$A.setLoading(e,!0);var r=e._entityCollection;n&&(e._version=void 0,e._documentPacket=new pe$c,r.removeAll()),E$v._processCzml(t,r,i,void 0,e);var o=Hn(e),a=e._documentPacket;return e$2b(a.name)&&e._name!==a.name?(e._name=a.name,o=!0):!e$2b(e._name)&&e$2b(i)&&(e._name=f$O(i.getUrlComponent()),o=!0),o$A.setLoading(e,!1),o&&e._changed.raiseEvent(e),e}function pe$c(){this.name=void 0,this.clock=void 0}function E$v(e){this._name=e,this._changed=new o$1h,this._error=new o$1h,this._isLoading=!1,this._loading=new o$1h,this._clock=void 0,this._documentPacket=new pe$c,this._version=void 0,this._entityCollection=new r$v(this),this._entityCluster=new a$r,this._credit=void 0,this._resourceCredits=[]}function i$t(){this._dataSources=[],this._dataSourceAdded=new o$1h,this._dataSourceRemoved=new o$1h,this._dataSourceMoved=new o$1h}function c$m(e,t){if(!e$2b(t))throw new t$16("dataSource is required.");var i=e.indexOf(t);if(-1===i)throw new t$16("dataSource is not in this collection.");return i}function h$x(e,t,i){var n=e._dataSources,r=n.length-1;if((t=e$2a.clamp(t,0,r))!==(i=e$2a.clamp(i,0,r))){var o=n[t];n[t]=n[i],n[i]=o,e.dataSourceMoved.raiseEvent(o,i,t)}}function o$x(e){e=u$_(e,u$_.EMPTY_OBJECT),this._primitives=[],this._guid=e$1Q(),this._zIndex=void 0,this.show=u$_(e.show,!0),this.destroyPrimitives=u$_(e.destroyPrimitives,!0)}function a$o(e,t){if(!e.contains(t))throw new t$16("primitive is not in this collection.");return e._primitives.indexOf(t)}function r$t(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}function r$s(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new e$1N}Object.defineProperties(rr$2.prototype,{isConstant:{get:function(){var e=this.polygon._positions,t=this.polygon._holes;return(!e$2b(e)||e.isConstant)&&(!e$2b(t)||t.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}}),rr$2.prototype.getValue=function(e,t){var i,n;return e$2b(this.polygon._positions)&&(i=this.polygon._positions.getValue(e)),e$2b(this.polygon._holes)&&(e$2b(n=this.polygon._holes.getValue(e))&&(n=n.map((function(e){return new e$1J(e)})))),e$2b(t)?(t.positions=i,t.holes=n,t):new e$1J(i,n)},rr$2.prototype.equals=function(e){return this===e||e instanceof rr$2&&r$Z.equals(this.polygon._positions,e.polygon._positions)&&r$Z.equals(this.polygon._holes,e.polygon._holes)},E$v.load=function(e,t){return(new E$v).load(e,t)},Object.defineProperties(E$v.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2b(e))throw new t$16("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),E$v.updaters=[gn,vn,wn,Pn,On,Tn,An,Rn,nn,an,xn,_n,Bn,En,tn,Nn,on,Ln,sn,Sn,fn,pn],E$v.prototype.process=function(e,t){return me$d(this,e,t,!1)},E$v.prototype.load=function(e,t){return me$d(this,e,t,!0)},E$v.processPacketData=f$t,E$v.processPositionPacketData=ae$c,E$v.processMaterialPacketData=L$v,E$v._processCzml=function(e,t,i,n,r){if(n=u$_(n,E$v.updaters),Array.isArray(e))for(var o=0,a=e.length;o<a;++o)he$a(e[o],t,n,i,r);else he$a(e,t,n,i,r)},Object.defineProperties(i$t.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}}),i$t.prototype.add=function(e){if(!e$2b(e))throw new t$16("dataSource is required.");var t=this,i=this._dataSources;return o$1l(e,(function(e){return i===t._dataSources&&(t._dataSources.push(e),t._dataSourceAdded.raiseEvent(t,e)),e}))},i$t.prototype.remove=function(e,t){t=u$_(t,!1);var i=this._dataSources.indexOf(e);if(-1!==i){this._dataSources.splice(i,1);for(var n=0;n<e._entityCollection.values.length;n++){var r=e._entityCollection.values[n];e$2b(r._polygon)&&e$2b(r._polygon.outlines)&&r._polygon.outlines.removeAll(),e$2b(r._polygon)&&e$2b(r._polygon.clampOutlines)&&r.entityCollection._owner._entityCluster._scene._primitives.remove(r._polygon.clampOutlines)}return this._dataSourceRemoved.raiseEvent(this,e),t&&"function"==typeof e.destroy&&e.destroy(),!0}return!1},i$t.prototype.removeAll=function(e){e=u$_(e,!1);for(var t=this._dataSources,i=0,n=t.length;i<n;++i){var r=t[i];this._dataSourceRemoved.raiseEvent(this,r);for(var o=0;o<r._entityCollection.values.length;o++){var a=r._entityCollection.values[o];e$2b(a._polygon)&&e$2b(a._polygon.outlines)&&a._polygon.outlines.removeAll(),e$2b(a._polygon)&&e$2b(a._polygon.clampOutlines)&&a.entityCollection._owner._entityCluster._scene._primitives.remove(a._polygon.clampOutlines)}e&&"function"==typeof r.destroy&&r.destroy()}this._dataSources=[]},i$t.prototype.contains=function(e){return-1!==this.indexOf(e)},i$t.prototype.indexOf=function(e){return this._dataSources.indexOf(e)},i$t.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return this._dataSources[e]},i$t.prototype.getByName=function(e){if(!e$2b(e))throw new t$16("name is required.");return this._dataSources.filter((function(t){return t.name===e}))},i$t.prototype.raise=function(e){var t=c$m(this._dataSources,e);h$x(this,t,t+1)},i$t.prototype.lower=function(e){var t=c$m(this._dataSources,e);h$x(this,t,t-1)},i$t.prototype.raiseToTop=function(e){var t=c$m(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))},i$t.prototype.lowerToBottom=function(e){var t=c$m(this._dataSources,e);0!==t&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))},i$t.prototype.isDestroyed=function(){return!1},i$t.prototype.destroy=function(){return this.removeAll(!0),i$10(this)},Object.defineProperties(o$x.prototype,{length:{get:function(){return this._primitives.length}}}),o$x.prototype.add=function(e){if(!e$2b(e))throw new t$16("primitive is required.");var t=e._external=e._external||{};return(t._composites=t._composites||{})[this._guid]={collection:this},this._primitives.push(e),e},o$x.prototype.remove=function(e){if(this.contains(e)){var t=this._primitives.indexOf(e);if(-1!==t)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this.destroyPrimitives&&e.destroy(),!0}return!1},o$x.prototype.removeAndDestroy=function(e){var t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t},o$x.prototype.removeAll=function(){for(var e=this._primitives,t=e.length,i=0;i<t;++i)delete e[i]._external._composites[this._guid],this.destroyPrimitives&&e[i].destroy();this._primitives=[]},o$x.prototype.contains=function(e){return!!(e$2b(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])},o$x.prototype.raise=function(e){if(e$2b(e)){var t=a$o(this,e),i=this._primitives;if(t!==i.length-1){var n=i[t];i[t]=i[t+1],i[t+1]=n}}},o$x.prototype.raiseToTop=function(e){if(e$2b(e)){var t=a$o(this,e),i=this._primitives;t!==i.length-1&&(i.splice(t,1),i.push(e))}},o$x.prototype.lower=function(e){if(e$2b(e)){var t=a$o(this,e),i=this._primitives;if(0!==t){var n=i[t];i[t]=i[t-1],i[t-1]=n}}},o$x.prototype.lowerToBottom=function(e){if(e$2b(e)){var t=a$o(this,e),i=this._primitives;0!==t&&(i.splice(t,1),i.unshift(e))}},o$x.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return this._primitives[e]},o$x.prototype.update=function(e){if(this.show)for(var t=this._primitives,i=0;i<t.length;++i)t[i].update(e)},o$x.prototype.prePassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var n=t[i];e$2b(n.prePassesUpdate)&&n.prePassesUpdate(e)}},o$x.prototype.updateForPass=function(e,t){for(var i=this._primitives,n=0;n<i.length;++n){var r=i[n];e$2b(r.updateForPass)&&r.updateForPass(e,t)}},o$x.prototype.postPassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var n=t[i];e$2b(n.postPassesUpdate)&&n.postPassesUpdate(e)}},o$x.prototype.isDestroyed=function(){return!1},o$x.prototype.destroy=function(){return this.removeAll(),i$10(this)},Object.defineProperties(r$t.prototype,{length:{get:function(){return this._length}}}),r$t.prototype.add=function(e,t){o$1q.defined("primitive",e),e$2b(t)&&o$1q.typeOf.number("zIndex",t),t=u$_(t,0);var i=this._collections[t];if(!e$2b(i)){(i=new o$x({destroyPrimitives:!1}))._zIndex=t,this._collections[t]=i;for(var n=this._collectionsArray,r=0;r<n.length&&n[r]._zIndex<t;)r++;n.splice(r,0,i)}return i.add(e),this._length++,e._zIndex=t,e},r$t.prototype.set=function(e,t){return o$1q.defined("primitive",e),o$1q.typeOf.number("zIndex",t),t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e},r$t.prototype.remove=function(e,t){if(this.contains(e)){var i,n=e._zIndex,r=this._collections[n];return(i=t?r.remove(e):r.removeAndDestroy(e))&&this._length--,0===r.length&&(this._collectionsArray.splice(this._collectionsArray.indexOf(r),1),this._collections[n]=void 0,r.destroy()),i}return!1},r$t.prototype.removeAll=function(){for(var e=this._collectionsArray,t=0;t<e.length;t++){var i=e[t];i.destroyPrimitives=!0,i.destroy()}this._collections={},this._collectionsArray=[],this._length=0},r$t.prototype.contains=function(e){if(!e$2b(e))return!1;var t=this._collections[e._zIndex];return e$2b(t)&&t.contains(e)},r$t.prototype.update=function(e){if(this.show)for(var t=this._collectionsArray,i=0;i<t.length;i++)t[i].update(e)},r$t.prototype.isDestroyed=function(){return!1},r$t.prototype.destroy=function(){return this.removeAll(),i$10(this)},r$s.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))},r$s.prototype.remove=function(e){var t=e.id,i=this._dynamicUpdaters.get(t);e$2b(i)&&(this._dynamicUpdaters.remove(t),i.destroy())},r$s.prototype.update=function(e){for(var t=this._dynamicUpdaters.values,i=0,n=t.length;i<n;i++)t[i].update(e);return!0},r$s.prototype.removeAllPrimitives=function(){for(var e=this._dynamicUpdaters.values,t=0,i=e.length;t<i;t++)e[t].destroy();this._dynamicUpdaters.removeAll()},r$s.prototype.getBoundingSphere=function(e,t){return e$2b(e=this._dynamicUpdaters.get(e.id))&&e$2b(e.getBoundingSphere)?e.getBoundingSphere(t):R$w.FAILED};var I$B=new e$1U,E$u=o$1p.ZERO,H$z=new o$1p,D$q=new h$18;function L$u(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function u$t(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new L$u(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}function h$w(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(u$t.prototype=Object.create(i$x.prototype),u$t.prototype.constructor=u$t),u$t.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,I$B)),e$2b(t)||(t=e$1U.WHITE),r.color=o$16.fromColor(t));return e$2b(this._options.offsetAttribute)&&(r.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,E$u,H$z))),new d$1o({id:i,geometry:new Y$y(this._options),attributes:r})},u$t.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,I$B),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r),offset:void 0};return e$2b(this._options.offsetAttribute)&&(o.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,E$u,H$z))),new d$1o({id:t,geometry:new M$L(this._options),attributes:o})},u$t.prototype._computeCenter=function(e,t){return r$Z.getValueOrUndefined(this._entity.position,e,t)},u$t.prototype._isHidden=function(e,t){return!e$2b(e.position)||!e$2b(t.semiMajorAxis)||!e$2b(t.semiMinorAxis)||i$F.prototype._isHidden.call(this,e,t)},u$t.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!r$Z.isConstant(t.rotation)||!r$Z.isConstant(t.height)||!r$Z.isConstant(t.extrudedHeight)||!r$Z.isConstant(t.granularity)||!r$Z.isConstant(t.stRotation)||!r$Z.isConstant(t.outlineWidth)||!r$Z.isConstant(t.numberOfVerticalLines)||!r$Z.isConstant(t.zIndex)||this._onTerrain&&!r$Z.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$Q)},u$t.prototype._setStaticOptions=function(e,t){var i=r$Z.getValueOrUndefined(t.height,o$H.MINIMUM_VALUE),n=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),r=r$Z.getValueOrUndefined(t.extrudedHeight,o$H.MINIMUM_VALUE),o=r$Z.getValueOrDefault(t.extrudedHeightReference,o$H.MINIMUM_VALUE,k$P.NONE);e$2b(r)&&!e$2b(i)&&(i=0);var a=this._options;a.vertexFormat=this._materialProperty instanceof t$Q?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,a.center=e.position.getValue(o$H.MINIMUM_VALUE,a.center),a.semiMajorAxis=t.semiMajorAxis.getValue(o$H.MINIMUM_VALUE,a.semiMajorAxis),a.semiMinorAxis=t.semiMinorAxis.getValue(o$H.MINIMUM_VALUE,a.semiMinorAxis),a.rotation=r$Z.getValueOrUndefined(t.rotation,o$H.MINIMUM_VALUE),a.granularity=r$Z.getValueOrUndefined(t.granularity,o$H.MINIMUM_VALUE),a.stRotation=r$Z.getValueOrUndefined(t.stRotation,o$H.MINIMUM_VALUE),a.numberOfVerticalLines=r$Z.getValueOrUndefined(t.numberOfVerticalLines,o$H.MINIMUM_VALUE),a.offsetAttribute=i$x.computeGeometryOffsetAttribute(i,n,r,o),a.height=i$x.getGeometryHeight(i,n),a.outlineWidth=t.outlineWidth?t.outlineWidth.getValue():1,(r=i$x.getGeometryExtrudedHeight(r,o))===i$x.CLAMP_TO_GROUND&&(r=e$1E.getMinimumMaximumHeights(Y$y.computeRectangle(a,D$q)).minimumTerrainHeight),a.extrudedHeight=r},u$t.DynamicGeometryUpdater=h$w,e$2b(Object.create)&&(h$w.prototype=Object.create(a$C.prototype),h$w.prototype.constructor=h$w),h$w.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2b(n.center)||!e$2b(n.semiMajorAxis)||!e$2b(n.semiMinorAxis)||a$C.prototype._isHidden.call(this,e,t,i)},h$w.prototype._setOptions=function(e,t,i){var n=this._options,r=r$Z.getValueOrUndefined(t.height,i),o=r$Z.getValueOrDefault(t.heightReference,i,k$P.NONE),a=r$Z.getValueOrUndefined(t.extrudedHeight,i),s=r$Z.getValueOrDefault(t.extrudedHeightReference,i,k$P.NONE);e$2b(a)&&!e$2b(r)&&(r=0),n.center=r$Z.getValueOrUndefined(e.position,i,n.center),n.semiMajorAxis=r$Z.getValueOrUndefined(t.semiMajorAxis,i),n.semiMinorAxis=r$Z.getValueOrUndefined(t.semiMinorAxis,i),n.rotation=r$Z.getValueOrUndefined(t.rotation,i),n.granularity=r$Z.getValueOrUndefined(t.granularity,i),n.stRotation=r$Z.getValueOrUndefined(t.stRotation,i),n.numberOfVerticalLines=r$Z.getValueOrUndefined(t.numberOfVerticalLines,i),n.offsetAttribute=i$x.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$x.getGeometryHeight(r,o),(a=i$x.getGeometryExtrudedHeight(a,s))===i$x.CLAMP_TO_GROUND&&(a=e$1E.getMinimumMaximumHeights(Y$y.computeRectangle(n,D$q)).minimumTerrainHeight),n.extrudedHeight=a};var pe$b=new t$Q(e$1U.WHITE),G$u=o$1p.ZERO,L$t=new o$1p,ye$8=new o$1p,_e$8=new o$1p,F$v=new e$1U,ve$9=new o$1p(1,1,1);function Ce$7(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function l$z(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new Ce$7(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}function M$w(e,t,i){a$C.call(this,e,t,i),this._scene=e._scene,this._modelMatrix=new p$1d,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new o$1p,this._material={}}e$2b(Object.create)&&(l$z.prototype=Object.create(i$F.prototype),l$z.prototype.constructor=l$z),Object.defineProperties(l$z.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),l$z.prototype.createFillGeometryInstance=function(e,t,i){o$1q.defined("time",e);var n,r,o=this._entity,a=o.isAvailable(e),s=new e$1F(a&&o.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),l=this._distanceDisplayConditionProperty.getValue(e),u={show:s,distanceDisplayCondition:t$B.fromDistanceDisplayCondition(l),color:void 0,offset:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||a)&&(r=this._materialProperty.color.getValue(e,F$v)),e$2b(r)||(r=e$1U.WHITE),n=o$16.fromColor(r),u.color=n);return e$2b(this._options.offsetAttribute)&&(u.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,G$u,L$t))),new d$1o({id:o,geometry:new b$P(this._options),modelMatrix:t?void 0:o.computeModelMatrixForHeightReference(e,o.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:u})},l$z.prototype.createOutlineGeometryInstance=function(e,t,i){o$1q.defined("time",e);var n=this._entity,r=n.isAvailable(e),o=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,F$v),a=this._distanceDisplayConditionProperty.getValue(e),s={show:new e$1F(r&&n.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(o),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(a),offset:void 0};return e$2b(this._options.offsetAttribute)&&(s.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,G$u,L$t))),new d$1o({id:n,geometry:new x$13(this._options),modelMatrix:t?void 0:n.computeModelMatrixForHeightReference(e,n.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:s})},l$z.prototype._computeCenter=function(e,t){return r$Z.getValueOrUndefined(this._entity.position,e,t)},l$z.prototype._isHidden=function(e,t){return!e$2b(e.position)||!e$2b(t.radii)||i$F.prototype._isHidden.call(this,e,t)},l$z.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$Z.isConstant(e.orientation)&&t.radii.isConstant&&r$Z.isConstant(t.innerRadii)&&r$Z.isConstant(t.stackPartitions)&&r$Z.isConstant(t.slicePartitions)&&r$Z.isConstant(t.outlineWidth)&&r$Z.isConstant(t.minimumClock)&&r$Z.isConstant(t.maximumClock)&&r$Z.isConstant(t.minimumCone)&&r$Z.isConstant(t.maximumCone)&&r$Z.isConstant(t.subdivisions))},l$z.prototype._setStaticOptions=function(e,t){var i=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$Q?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,n.radii=t.radii.getValue(o$H.MINIMUM_VALUE,n.radii),n.innerRadii=r$Z.getValueOrUndefined(t.innerRadii,n.radii),n.minimumClock=r$Z.getValueOrUndefined(t.minimumClock,o$H.MINIMUM_VALUE),n.maximumClock=r$Z.getValueOrUndefined(t.maximumClock,o$H.MINIMUM_VALUE),n.minimumCone=r$Z.getValueOrUndefined(t.minimumCone,o$H.MINIMUM_VALUE),n.maximumCone=r$Z.getValueOrUndefined(t.maximumCone,o$H.MINIMUM_VALUE),n.stackPartitions=r$Z.getValueOrUndefined(t.stackPartitions,o$H.MINIMUM_VALUE),n.slicePartitions=r$Z.getValueOrUndefined(t.slicePartitions,o$H.MINIMUM_VALUE),n.subdivisions=r$Z.getValueOrUndefined(t.subdivisions,o$H.MINIMUM_VALUE),n.offsetAttribute=i!==k$P.NONE?_0x58701d.ALL:void 0},l$z.prototype._onEntityPropertyChanged=a$B,l$z.DynamicGeometryUpdater=M$w,e$2b(Object.create)&&(M$w.prototype=Object.create(a$C.prototype),M$w.prototype.constructor=M$w),M$w.prototype.update=function(e){o$1q.defined("time",e);var t=this._entity,i=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!r$Z.getValueOrDefault(i.show,e,!0))return e$2b(this._primitive)&&(this._primitive.show=!1),void(e$2b(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var n=r$Z.getValueOrUndefined(i.radii,e,ye$8),r=e$2b(n)?t.computeModelMatrixForHeightReference(e,i.heightReference,.5*n.z,this._scene.mapProjection.ellipsoid,this._modelMatrix):void 0;if(!e$2b(r)||!e$2b(n))return e$2b(this._primitive)&&(this._primitive.show=!1),void(e$2b(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var o=r$Z.getValueOrDefault(i.fill,e,!0),a=r$Z.getValueOrDefault(i.outline,e,!1),s=r$Z.getValueOrClonedDefault(i.outlineColor,e,e$1U.BLACK,F$v),l=r$C.getValue(e,u$_(i.material,pe$b),this._material),u=r$Z.getValueOrUndefined(i.innerRadii,e,_e$8),c=r$Z.getValueOrUndefined(i.minimumClock,e),h=r$Z.getValueOrUndefined(i.maximumClock,e),d=r$Z.getValueOrUndefined(i.minimumCone,e),f=r$Z.getValueOrUndefined(i.maximumCone,e),p=r$Z.getValueOrUndefined(i.stackPartitions,e),_=r$Z.getValueOrUndefined(i.slicePartitions,e),m=r$Z.getValueOrUndefined(i.subdivisions,e),g=r$Z.getValueOrDefault(i.outlineWidth,e,1),x=r$Z.getValueOrDefault(i.heightReference,e,k$P.NONE),v=x!==k$P.NONE?_0x58701d.ALL:void 0,y=this._scene.mode,$=y===C$13.SCENE3D&&x===k$P.NONE,b=this._options,T=this._geometryUpdater.shadowsProperty.getValue(e),C=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),S=r$Z.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,G$u,L$t);if(!$||this._lastSceneMode!==y||!e$2b(this._primitive)||b.stackPartitions!==p||b.slicePartitions!==_||e$2b(u)&&!o$1p.equals(b.innerRadii!==u)||b.minimumClock!==c||b.maximumClock!==h||b.minimumCone!==d||b.maximumCone!==f||b.subdivisions!==m||this._lastOutlineWidth!==g||b.offsetAttribute!==v){var w=this._primitives;if(w.removeAndDestroy(this._primitive),w.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=y,this._lastOutlineWidth=g,b.stackPartitions=p,b.slicePartitions=_,b.subdivisions=m,b.offsetAttribute=v,b.radii=o$1p.clone($?ve$9:n,b.radii),e$2b(u))if($){var E=o$1p.magnitude(n);b.innerRadii=o$1p.fromElements(u.x/E,u.y/E,u.z/E,b.innerRadii)}else b.innerRadii=o$1p.clone(u,b.innerRadii);else b.innerRadii=void 0;b.minimumClock=c,b.maximumClock=h,b.minimumCone=d,b.maximumCone=f;var P=new t$w({material:l,translucent:l.isTranslucent(),closed:!0});b.vertexFormat=P.vertexFormat;var A=this._geometryUpdater.createFillGeometryInstance(e,$,this._modelMatrix);this._primitive=w.add(new y$S({geometryInstances:A,appearance:P,asynchronous:!1,shadows:T}));var L=this._geometryUpdater.createOutlineGeometryInstance(e,$,this._modelMatrix);this._outlinePrimitive=w.add(new y$S({geometryInstances:L,appearance:new t$R({flat:!0,translucent:255!==L.attributes.color.value[3],renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(g)}}),asynchronous:!1,shadows:T})),this._lastShow=o,this._lastOutlineShow=a,this._lastOutlineColor=e$1U.clone(s,this._lastOutlineColor),this._lastDistanceDisplayCondition=C,this._lastOffset=o$1p.clone(S,this._lastOffset)}else if(this._primitive.ready){var M=this._primitive,R=this._outlinePrimitive;M.show=!0,R.show=!0,M.appearance.material=l;var O=this._attributes;e$2b(O)||(O=M.getGeometryInstanceAttributes(t),this._attributes=O),o!==this._lastShow&&(O.show=e$1F.toValue(o,O.show),this._lastShow=o);var I=this._outlineAttributes;e$2b(I)||(I=R.getGeometryInstanceAttributes(t),this._outlineAttributes=I),a!==this._lastOutlineShow&&(I.show=e$1F.toValue(a,I.show),this._lastOutlineShow=a),e$1U.equals(s,this._lastOutlineColor)||(I.color=o$16.toValue(s,I.color),e$1U.clone(s,this._lastOutlineColor)),r$Y.equals(C,this._lastDistanceDisplayCondition)||(O.distanceDisplayCondition=t$B.toValue(C,O.distanceDisplayCondition),I.distanceDisplayCondition=t$B.toValue(C,I.distanceDisplayCondition),r$Y.clone(C,this._lastDistanceDisplayCondition)),o$1p.equals(S,this._lastOffset)||(O.offset=e$1B.toValue(S,O.offset),I.offset=e$1B.toValue(S,O.offset),o$1p.clone(S,this._lastOffset))}$&&(n.x=Math.max(n.x,.001),n.y=Math.max(n.y,.001),n.z=Math.max(n.z,.001),r=p$1d.multiplyByScale(r,n,r),this._primitive.modelMatrix=r,this._outlinePrimitive.modelMatrix=r)};var R$o=new o$1p,N$k=new e$1U;function z$q(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function p$n(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new z$q(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}function h$v(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(p$n.prototype=Object.create(i$F.prototype),p$n.prototype.constructor=p$n),p$n.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$1F(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=t$B.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$Q?(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,N$k)),e$2b(i)||(i=e$1U.WHITE),t={show:o,distanceDisplayCondition:s,color:o$16.fromColor(i)}):t={show:o,distanceDisplayCondition:s};var l=n.plane,u=this._options,c=n.computeModelMatrix(e),h=r$Z.getValueOrDefault(l.plane,e,u.plane),d=r$Z.getValueOrUndefined(l.dimensions,e,u.dimensions);return u.plane=h,u.dimensions=d,c=O$m(h,d,c,this._scene.mapProjection.ellipsoid,c),new d$1o({id:n,geometry:new f$K(this._options),modelMatrix:c,attributes:t})},p$n.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,N$k),r=this._distanceDisplayConditionProperty.getValue(e),o=t.plane,a=this._options,s=t.computeModelMatrix(e),l=r$Z.getValueOrDefault(o.plane,e,a.plane),u=r$Z.getValueOrUndefined(o.dimensions,e,a.dimensions);return a.plane=l,a.dimensions=u,s=O$m(l,u,s,this._scene.mapProjection.ellipsoid,s),new d$1o({id:t,geometry:new i$H,modelMatrix:s,attributes:{show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r)}})},p$n.prototype._isHidden=function(e,t){return!e$2b(t.plane)||!e$2b(t.dimensions)||!e$2b(e.position)||i$F.prototype._isHidden.call(this,e,t)},p$n.prototype._getIsClosed=function(e){return!1},p$n.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$Z.isConstant(e.orientation)&&t.plane.isConstant&&t.dimensions.isConstant&&r$Z.isConstant(t.outlineWidth))},p$n.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$Q,n=this._options;n.vertexFormat=i?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,n.plane=t.plane.getValue(o$H.MINIMUM_VALUE,n.plane),n.dimensions=t.dimensions.getValue(o$H.MINIMUM_VALUE,n.dimensions)},p$n.DynamicGeometryUpdater=h$v,e$2b(Object.create)&&(h$v.prototype=Object.create(a$C.prototype),h$v.prototype.constructor=h$v),h$v.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2b(r$Z.getValueOrUndefined(e.position,i,R$o))||!e$2b(n.plane)||!e$2b(n.dimensions)||a$C.prototype._isHidden.call(this,e,t,i)},h$v.prototype._setOptions=function(e,t,i){var n=this._options;n.plane=r$Z.getValueOrDefault(t.plane,i,n.plane),n.dimensions=r$Z.getValueOrUndefined(t.dimensions,i,n.dimensions)};var B$o=new o$1p,Q$p=new o$1p,X$j=new o$1p,q$r=new o$1p,W$w=new o$1p,k$o=new n$13,K$n=new p$1e;function O$m(e,t,i,n,r){var o=e.normal,a=e.distance,s=o$1p.multiplyByScalar(o,-a,X$j);s=p$1d.multiplyByPoint(i,s,s);var l=p$1d.multiplyByPointAsVector(i,o,q$r);o$1p.normalize(l,l);var u=n.geodeticSurfaceNormal(s,Q$p);e$2a.equalsEpsilon(Math.abs(o$1p.dot(u,l)),1,e$2a.EPSILON8)&&(u=o$1p.clone(o$1p.UNIT_Z,u),e$2a.equalsEpsilon(Math.abs(o$1p.dot(u,l)),1,e$2a.EPSILON8)&&(u=o$1p.clone(o$1p.UNIT_X,u)));var c=o$1p.cross(u,l,B$o);u=o$1p.cross(l,c,u),o$1p.normalize(c,c),o$1p.normalize(u,u);var h=K$n;p$1e.setColumn(h,0,c,h),p$1e.setColumn(h,1,u,h),p$1e.setColumn(h,2,l,h);var d=n$13.fromRotationMatrix(h,k$o),f=o$1o.clone(t,W$w);return f.z=1,p$1d.fromTranslationQuaternionRotationScale(s,d,f,r)}p$n.createPrimitiveMatrix=O$m;var B$n="Entity polygons cannot have both height and perPositionHeight. height will be ignored",S$p="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",j$t=new e$1U,F$u=o$1p.ZERO,W$v=new o$1p,X$i=new h$18,te$e=[],re$j=new o$1o;function ie$c(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0,this.depthTestEnabled=void 0,this.groundBottomAltitude=void 0,this.groundExtrudedHeight=void 0}function l$y(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new ie$c(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}function v$u(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(l$y.prototype=Object.create(i$x.prototype),l$y.prototype.constructor=l$y),l$y.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=this._options,o={show:new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,j$t)),e$2b(t)||(t=e$1U.WHITE),o.color=o$16.fromColor(t));return e$2b(r.offsetAttribute)&&(o.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,F$u,W$v))),new d$1o({id:i,geometry:r.perPositionHeight&&!e$2b(r.extrudedHeight)?new P$H(r):new z$_(r),attributes:o})},l$y.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=this._options,r=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,j$t),o=this._distanceDisplayConditionProperty.getValue(e),a={show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(r),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(o),offset:void 0};return e$2b(n.offsetAttribute)&&(a.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,F$u,W$v))),new d$1o({id:t,geometry:n.perPositionHeight&&!e$2b(n.extrudedHeight)?new a$G(n):new A$R(n),attributes:a})},l$y.prototype._computeCenter=function(e,t){var i=r$Z.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(e$2b(i)){var n=i.positions;if(0!==n.length){for(var r=this._scene.mapProjection.ellipsoid,o=f$14.fromPoints(n,r),a=o.projectPointsOntoPlane(n,te$e),s=a.length,l=0,u=s-1,c=new o$1o,h=0;h<s;u=h++){var d=a[h],f=a[u],p=d.x*f.y-f.x*d.y,_=o$1o.add(d,f,re$j);_=o$1o.multiplyByScalar(_,p,_),c=o$1o.add(c,_,c),l+=p}var m=1/(3*l);return c=o$1o.multiplyByScalar(c,m,c),o.projectPointOntoEllipsoid(c,t)}}},l$y.prototype._isHidden=function(e,t){return!e$2b(t.hierarchy)||i$F.prototype._isHidden.call(this,e,t)},l$y.prototype._isOnTerrain=function(e,t){var i=i$x.prototype._isOnTerrain.call(this,e,t),n=t.perPositionHeight,r=e$2b(n)&&(!n.isConstant||n.getValue(o$H.MINIMUM_VALUE));return i&&!r},l$y.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!r$Z.isConstant(t.height)||!r$Z.isConstant(t.extrudedHeight)||!r$Z.isConstant(t.granularity)||!r$Z.isConstant(t.stRotation)||!r$Z.isConstant(t.outlineWidth)||!r$Z.isConstant(t.perPositionHeight)||!r$Z.isConstant(t.closeTop)||!r$Z.isConstant(t.closeBottom)||!r$Z.isConstant(t.zIndex)||!r$Z.isConstant(t.arcType)||this._onTerrain&&!r$Z.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$Q)},l$y.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$Q,n=this._options;n.vertexFormat=i?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat;var r,o=t.hierarchy.getValue(o$H.MINIMUM_VALUE),a=r$Z.getValueOrUndefined(t.height,o$H.MINIMUM_VALUE),s=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),l=r$Z.getValueOrUndefined(t.extrudedHeight,o$H.MINIMUM_VALUE),u=r$Z.getValueOrDefault(t.extrudedHeightReference,o$H.MINIMUM_VALUE,k$P.NONE),c=r$Z.getValueOrDefault(t.perPositionHeight,o$H.MINIMUM_VALUE,!1);a=i$x.getGeometryHeight(a,s),c?(e$2b(a)&&(a=void 0,e$1$(B$n)),s!==k$P.NONE&&c&&(a=void 0,e$1$(S$p))):(e$2b(l)&&!e$2b(a)&&(a=0),r=i$x.computeGeometryOffsetAttribute(a,s,l,u)),n.polygonHierarchy=o,n.granularity=r$Z.getValueOrUndefined(t.granularity,o$H.MINIMUM_VALUE),n.stRotation=r$Z.getValueOrUndefined(t.stRotation,o$H.MINIMUM_VALUE),n.perPositionHeight=c,n.closeTop=r$Z.getValueOrDefault(t.closeTop,o$H.MINIMUM_VALUE,!0),n.closeBottom=r$Z.getValueOrDefault(t.closeBottom,o$H.MINIMUM_VALUE,!0),n.offsetAttribute=r,n.height=a,n.arcType=r$Z.getValueOrDefault(t.arcType,o$H.MINIMUM_VALUE,m$1f.GEODESIC),n.depthTestEnabled=!e$2b(e._depthTestEnabled)||e._depthTestEnabled,(l=i$x.getGeometryExtrudedHeight(l,u))===i$x.CLAMP_TO_GROUND&&(l=e$1E.getMinimumMaximumHeights(z$_.computeRectangle(n,X$i)).minimumTerrainHeight),n.extrudedHeight=l,n.groundBottomAltitude=r$Z.getValueOrUndefined(t.groundBottomAltitude,o$H.MINIMUM_VALUE),n.groundExtrudedHeight=r$Z.getValueOrUndefined(t.groundExtrudedHeight,o$H.MINIMUM_VALUE)},l$y.prototype._getIsClosed=function(e){var t=e.height,i=e.extrudedHeight,n=e$2b(i)&&i!==t;return!e.perPositionHeight&&(!n&&0===t||n&&e.closeTop&&e.closeBottom)},l$y.DynamicGeometryUpdater=v$u,e$2b(Object.create)&&(v$u.prototype=Object.create(a$C.prototype),v$u.prototype.constructor=v$u),v$u.prototype._isHidden=function(e,t,i){return!e$2b(this._options.polygonHierarchy)||a$C.prototype._isHidden.call(this,e,t,i)},v$u.prototype._setOptions=function(e,t,i){var n=this._options;n.polygonHierarchy=r$Z.getValueOrUndefined(t.hierarchy,i),Array.isArray(n.polygonHierarchy)&&(n.polygonHierarchy=new e$1J(n.polygonHierarchy));var r,o=r$Z.getValueOrUndefined(t.height,i),a=r$Z.getValueOrDefault(t.heightReference,i,k$P.NONE),s=r$Z.getValueOrDefault(t.extrudedHeightReference,i,k$P.NONE),l=r$Z.getValueOrUndefined(t.extrudedHeight,i),u=r$Z.getValueOrUndefined(t.perPositionHeight,i);o=i$x.getGeometryHeight(o,s),u?(e$2b(o)&&(o=void 0,e$1$(B$n)),a!==k$P.NONE&&u&&(o=void 0,e$1$(S$p))):(e$2b(l)&&!e$2b(o)&&(o=0),r=i$x.computeGeometryOffsetAttribute(o,a,l,s)),n.granularity=r$Z.getValueOrUndefined(t.granularity,i),n.stRotation=r$Z.getValueOrUndefined(t.stRotation,i),n.perPositionHeight=r$Z.getValueOrUndefined(t.perPositionHeight,i),n.closeTop=r$Z.getValueOrDefault(t.closeTop,i,!0),n.closeBottom=r$Z.getValueOrDefault(t.closeBottom,i,!0),n.offsetAttribute=r,n.height=o,n.arcType=r$Z.getValueOrDefault(t.arcType,i,m$1f.GEODESIC),(l=i$x.getGeometryExtrudedHeight(l,s))===i$x.CLAMP_TO_GROUND&&(l=e$1E.getMinimumMaximumHeights(z$_.computeRectangle(n,X$i)).minimumTerrainHeight),n.extrudedHeight=l};var M$v=new e$1U;function A$x(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0,this.enuCenter=void 0}function a$n(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new A$x(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}function l$x(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(a$n.prototype=Object.create(i$F.prototype),a$n.prototype.constructor=a$n),a$n.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$1F(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=t$B.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$Q?(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,M$v)),e$2b(i)||(i=e$1U.WHITE),t={show:o,distanceDisplayCondition:s,color:o$16.fromColor(i)}):t={show:o,distanceDisplayCondition:s};return new d$1o({id:n,geometry:new N$y(this._options),attributes:t})},a$n.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,M$v),r=this._distanceDisplayConditionProperty.getValue(e);return new d$1o({id:t,geometry:new _$z(this._options),attributes:{show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r)}})},a$n.prototype._isHidden=function(e,t){return!e$2b(t.positions)||!e$2b(t.shape)||i$F.prototype._isHidden.call(this,e,t)},a$n.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&t.shape.isConstant&&r$Z.isConstant(t.granularity)&&r$Z.isConstant(t.outlineWidth)&&r$Z.isConstant(t.cornerType))},a$n.prototype._setStaticOptions=function(e,t){var i=t.granularity,n=t.cornerType,r=t.enuCenter,o=this._options,a=this._materialProperty instanceof t$Q;o.vertexFormat=a?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(o$H.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(o$H.MINIMUM_VALUE,o.shape),o.granularity=e$2b(i)?i.getValue(o$H.MINIMUM_VALUE):void 0,o.cornerType=e$2b(n)?n.getValue(o$H.MINIMUM_VALUE):void 0,o.enuCenter=e$2b(r)?r.getValue(o$H.MINIMUM_VALUE):void 0},a$n.DynamicGeometryUpdater=l$x,e$2b(Object.create)&&(l$x.prototype=Object.create(a$C.prototype),l$x.prototype.constructor=l$x),l$x.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2b(n.polylinePositions)||!e$2b(n.shapePositions)||a$C.prototype._isHidden.call(this,e,t,i)},l$x.prototype._setOptions=function(e,t,i){var n=this._options;n.polylinePositions=r$Z.getValueOrUndefined(t.positions,i,n.polylinePositions),n.shapePositions=r$Z.getValueOrUndefined(t.shape,i),n.granularity=r$Z.getValueOrUndefined(t.granularity,i),n.cornerType=r$Z.getValueOrUndefined(t.cornerType,i)};var D$p=new e$1U,G$t=o$1p.ZERO,E$t=new o$1p,w$q=new h$18,S$o=new h$18,F$t=new a$18;function j$s(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function d$B(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new j$s(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}function h$u(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(d$B.prototype=Object.create(i$x.prototype),d$B.prototype.constructor=d$B),d$B.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,D$p)),e$2b(t)||(t=e$1U.WHITE),r.color=o$16.fromColor(t));return e$2b(this._options.offsetAttribute)&&(r.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,G$t,E$t))),new d$1o({id:i,geometry:new j$N(this._options),attributes:r})},d$B.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,D$p),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r),offset:void 0};return e$2b(this._options.offsetAttribute)&&(o.offset=e$1B.fromCartesian3(r$Z.getValueOrDefault(this._terrainOffsetProperty,e,G$t,E$t))),new d$1o({id:t,geometry:new k$G(this._options),attributes:o})},d$B.prototype._computeCenter=function(e,t){var i=r$Z.getValueOrUndefined(this._entity.rectangle.coordinates,e,S$o);if(e$2b(i)){var n=h$18.center(i,F$t);return a$18.toCartesian(n,t$13.WGS84,t)}},d$B.prototype._isHidden=function(e,t){return!e$2b(t.coordinates)||i$F.prototype._isHidden.call(this,e,t)},d$B.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!r$Z.isConstant(t.height)||!r$Z.isConstant(t.extrudedHeight)||!r$Z.isConstant(t.granularity)||!r$Z.isConstant(t.stRotation)||!r$Z.isConstant(t.rotation)||!r$Z.isConstant(t.outlineWidth)||!r$Z.isConstant(t.zIndex)||this._onTerrain&&!r$Z.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$Q)},d$B.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$Q,n=r$Z.getValueOrUndefined(t.height,o$H.MINIMUM_VALUE),r=r$Z.getValueOrDefault(t.heightReference,o$H.MINIMUM_VALUE,k$P.NONE),o=r$Z.getValueOrUndefined(t.extrudedHeight,o$H.MINIMUM_VALUE),a=r$Z.getValueOrDefault(t.extrudedHeightReference,o$H.MINIMUM_VALUE,k$P.NONE);e$2b(o)&&!e$2b(n)&&(n=0);var s=this._options;s.vertexFormat=i?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,s.rectangle=t.coordinates.getValue(o$H.MINIMUM_VALUE,s.rectangle),s.granularity=r$Z.getValueOrUndefined(t.granularity,o$H.MINIMUM_VALUE),s.stRotation=r$Z.getValueOrUndefined(t.stRotation,o$H.MINIMUM_VALUE),s.rotation=r$Z.getValueOrUndefined(t.rotation,o$H.MINIMUM_VALUE),s.offsetAttribute=i$x.computeGeometryOffsetAttribute(n,r,o,a),s.height=i$x.getGeometryHeight(n,r),(o=i$x.getGeometryExtrudedHeight(o,a))===i$x.CLAMP_TO_GROUND&&(o=e$1E.getMinimumMaximumHeights(j$N.computeRectangle(s,w$q)).minimumTerrainHeight),s.extrudedHeight=o},d$B.DynamicGeometryUpdater=h$u,e$2b(Object.create)&&(h$u.prototype=Object.create(a$C.prototype),h$u.prototype.constructor=h$u),h$u.prototype._isHidden=function(e,t,i){return!e$2b(this._options.rectangle)||a$C.prototype._isHidden.call(this,e,t,i)},h$u.prototype._setOptions=function(e,t,i){var n=this._options,r=r$Z.getValueOrUndefined(t.height,i),o=r$Z.getValueOrDefault(t.heightReference,i,k$P.NONE),a=r$Z.getValueOrUndefined(t.extrudedHeight,i),s=r$Z.getValueOrDefault(t.extrudedHeightReference,i,k$P.NONE);e$2b(a)&&!e$2b(r)&&(r=0),n.rectangle=r$Z.getValueOrUndefined(t.coordinates,i,n.rectangle),n.granularity=r$Z.getValueOrUndefined(t.granularity,i),n.stRotation=r$Z.getValueOrUndefined(t.stRotation,i),n.rotation=r$Z.getValueOrUndefined(t.rotation,i),n.offsetAttribute=i$x.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$x.getGeometryHeight(r,o),(a=i$x.getGeometryExtrudedHeight(a,s))===i$x.CLAMP_TO_GROUND&&(a=e$1E.getMinimumMaximumHeights(j$N.computeRectangle(n,w$q)).minimumTerrainHeight),n.extrudedHeight=a};var W$u=new e$1U,Y$k=new r$Y,$$q=new r$Y,ee$j=o$1p.ZERO,te$d=new o$1p;function v$t(e,t,i,n,r,o,a){var s;this.translucent=t,this.appearanceType=i,this.depthFailAppearanceType=n,this.depthFailMaterialProperty=r,this.depthFailMaterial=void 0,this.closed=o,this.shadows=a,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1N,this.updaters=new e$1N,this.updatersWithAttributes=new e$1N,this.attributes=new e$1N,this.subscriptions=new e$1N,this.showsUpdated=new e$1N,this.itemsToRemove=[],this.invalidated=!1,this.asynchronous=!0,e$2b(r)&&(s=r.definitionChanged.addEventListener(v$t.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=s}function y$s(e,t,i,n,r){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=n,this._shadows=r}function q$q(e,t){for(var i=e.length-1;i>=0;i--){var n=e[i];if(n.remove(t))return 0===n.updaters.length&&(e.splice(i,1),n.destroy()),!0}return!1}function L$s(e,t,i){for(var n=!1,r=t.length,o=0;o<r;++o){var a=t[o],s=a.itemsToRemove,l=s.length;if(l>0)for(o=0;o<l;o++){var u=s[o];a.remove(u),e.add(i,u),n=!0}}return n}function C$s(e,t,i,n){var r,o=t.length;for(r=o-1;r>=0;r--){var a=t[r];if(a.invalidated){t.splice(r,1);for(var s=a.updaters.values,l=s.length,u=0;u<l;u++)e.add(i,s[u]);a.destroy()}}for(o=t.length,r=0;r<o;++r)n=t[r].update(i)&&n;return n}function N$j(e,t,i){for(var n=e.length,r=0;r<n;r++){var o=e[r];if(o.contains(t))return o.getBoundingSphere(t,i)}return R$w.FAILED}function x$u(e){for(var t=e.length,i=0;i<t;i++)e[i].destroy();e.length=0}v$t.prototype.onMaterialChanged=function(){this.invalidated=!0},v$t.prototype.isMaterial=function(e){var t=this.depthFailMaterialProperty,i=e.depthFailMaterialProperty;return i===t||!!e$2b(t)&&t.equals(i)},v$t.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,e$2b(e.asynchronous)&&(this.asynchronous=e.asynchronous),this.enuCenter=e._options&&e._options.enuCenter,e$2b(this.enuCenter)&&(this.materialSupport=t$R.MaterialSupport.FLOAT_POSITION),this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&r$Z.isConstant(e.distanceDisplayConditionProperty)&&r$Z.isConstant(e.terrainOffsetProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},v$t.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2b(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},v$t.prototype.update=function(e){var t,i=!0,n=0,r=this.primitive,o=this.primitives;if(this.createPrimitive){var a=this.geometry.values;if(a.length>0){var s;e$2b(r)&&(e$2b(this.oldPrimitive)?o.remove(r):this.oldPrimitive=r),e$2b(this.depthFailAppearanceType)&&(e$2b(this.depthFailMaterialProperty)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),s=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),(r=new y$S({show:!1,asynchronous:this.asynchronous,geometryInstances:a,appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed,materialSupport:this.materialSupport,renderState:{depthTest:{enabled:this._depthTestEnabled}}}),depthFailAppearance:s,shadows:this.shadows,updateBoundingSphere:!e$2b(this.enuCenter),modelMatrix:e$2b(this.enuCenter)?m$17.eastNorthUpToFixedFrame(this.enuCenter,t$13.WGS84,new p$1d):void 0}))._polygonOffset=this.polygonOffset,o.add(r),i=!1}else{e$2b(r)&&(o.remove(r),r=void 0);var l=this.oldPrimitive;e$2b(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(e$2b(r)&&r.ready){r.show=!0,e$2b(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),e$2b(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof t$Q)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);var u=this.updatersWithAttributes.values,c=u.length,h=this.waitingOnCreate;for(t=0;t<c;t++){var d=u[t],f=this.geometry.get(d.id),p=this.attributes.get(f.id.id);if(e$2b(p)||(p=r.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,p)),!d.fillMaterialProperty.isConstant||h){var _=d.fillMaterialProperty.color,m=r$Z.getValueOrDefault(_,e,e$1U.WHITE,W$u);e$1U.equals(p._lastColor,m)||(p._lastColor=e$1U.clone(m,p._lastColor),p.color=o$16.toValue(m,p.color),(this.translucent&&255===p.color[3]||!this.translucent&&255!==p.color[3])&&(this.itemsToRemove[n++]=d))}if(e$2b(this.depthFailAppearanceType)&&d.depthFailMaterialProperty instanceof t$Q&&(!d.depthFailMaterialProperty.isConstant||h)){var g=d.depthFailMaterialProperty.color,x=r$Z.getValueOrDefault(g,e,e$1U.WHITE,W$u);e$1U.equals(p._lastDepthFailColor,x)||(p._lastDepthFailColor=e$1U.clone(x,p._lastDepthFailColor),p.depthFailColor=o$16.toValue(x,p.depthFailColor))}var v=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e));v!==(1===p.show[0])&&(p.show=e$1F.toValue(v,p.show));var y=d.distanceDisplayConditionProperty;if(!r$Z.isConstant(y)){var $=r$Z.getValueOrDefault(y,e,$$q,Y$k);r$Y.equals($,p._lastDistanceDisplayCondition)||(p._lastDistanceDisplayCondition=r$Y.clone($,p._lastDistanceDisplayCondition),p.distanceDisplayCondition=t$B.toValue($,p.distanceDisplayCondition))}var b=d.terrainOffsetProperty;if(!r$Z.isConstant(b)){var T=r$Z.getValueOrDefault(b,e,ee$j,te$d);o$1p.equals(T,p._lastOffset)||(p._lastOffset=o$1p.clone(T,p._lastOffset),p.offset=e$1B.toValue(T,p.offset))}}this.updateShows(r),this.waitingOnCreate=!1}else e$2b(r)&&!r.ready&&(i=!1);return this.itemsToRemove.length=n,i},v$t.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);e$2b(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$1F.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},v$t.prototype.contains=function(e){return this.updaters.contains(e.id)},v$t.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2b(n)||!e$2b(n.boundingSphere)||e$2b(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},v$t.prototype.destroy=function(){var e=this.primitive,t=this.primitives;e$2b(e)&&t.remove(e);var i=this.oldPrimitive;e$2b(i)&&t.remove(i),e$2b(this.removeMaterialSubscription)&&this.removeMaterialSubscription()},y$s.prototype.add=function(e,t){var i,n,r=t.createFillGeometryInstance(e);255===r.attributes.color.value[3]?(i=this._solidItems,n=!1):(i=this._translucentItems,n=!0);for(var o=i.length,a=0;a<o;a++){var s=i[a];if(this.enuCenter)break;if(!s._hasEnuCenter&&s.isMaterial(t))return void s.add(t,r)}var l=new v$t(this._primitives,n,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);l._hasEnuCenter=t._options&&!!t._options.enuCenter,l._depthTestEnabled=!e$2b(t._options)||!e$2b(t._options.depthTestEnabled)||t._options.depthTestEnabled,l.polygonOffset=t._entity._polygonOffset,l.add(t,r),i.push(l)},y$s.prototype.remove=function(e){q$q(this._solidItems,e)||q$q(this._translucentItems,e)},y$s.prototype.update=function(e){var t=C$s(this,this._solidItems,e,!0);t=C$s(this,this._translucentItems,e,t)&&t;var i=L$s(this,this._solidItems,e),n=L$s(this,this._translucentItems,e);return(i||n)&&(t=C$s(this,this._solidItems,e,t)&&t,t=C$s(this,this._translucentItems,e,t)&&t),t},y$s.prototype.getBoundingSphere=function(e,t){var i=N$j(this._solidItems,e,t);return i===R$w.FAILED?N$j(this._translucentItems,e,t):i},y$s.prototype.removeAllPrimitives=function(){x$u(this._solidItems),x$u(this._translucentItems)};var J$m=new r$Y,K$m=new r$Y,Q$o=o$1p.ZERO,Y$j=new o$1p;function p$m(e,t,i,n,r,o,a){this.primitives=e,this.appearanceType=t,this.materialProperty=i,this.depthFailAppearanceType=n,this.depthFailMaterialProperty=r,this.closed=o,this.shadows=a,this.updaters=new e$1N,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1N,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new e$1N,this.attributes=new e$1N,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(p$m.prototype.onMaterialChanged,this),this.subscriptions=new e$1N,this.showsUpdated=new e$1N,this.materialSupport=void 0,this.asynchronous=!0,this.wrapS=q$19.CLAMP_TO_EDGE,this.wrapT=q$19.CLAMP_TO_EDGE,this.compressVertices=!0}p$m.prototype.onMaterialChanged=function(){},p$m.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty,n=this.depthFailMaterialProperty,r=e.depthFailMaterialProperty;if(i===t&&r===n)return!0;var o=e$2b(t)&&t.equals(i);return o=(!e$2b(n)&&!e$2b(r)||e$2b(n)&&n.equals(r))&&o},p$m.prototype.add=function(e,t){var i=t.id;this.updaters.set(i,t);var n=t.createFillGeometryInstance(e);if("unResolve"===n?(this.invalidated=!0,this.geometry.set(i,null)):this.geometry.set(i,n),this.enuCenter=e$2b(t._options)?t._options.enuCenter:void 0,e$2b(this.enuCenter)&&(this.materialSupport=t$w.MaterialSupport.TEXTUREDMODEL),e$2b(t.asynchronous)&&(this.asynchronous=t.asynchronous),e$2b(t.wrapS)&&(this.wrapS=t.wrapS),e$2b(t.wrapT)&&(this.wrapT=t.wrapT),e$2b(t.compressVertices)&&(this.compressVertices=t.compressVertices),this.twoPasses=t.twoPasses,t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$Z.isConstant(t.distanceDisplayConditionProperty)&&r$Z.isConstant(t.terrainOffsetProperty)){var r=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(i,t);this.createPrimitive=!0},p$m.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2b(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};var $$p=new e$1U;p$m.prototype.update=function(e){for(var t=!0,i=this.primitive,n=this.primitives,r=this.geometry.values,o=0;o<r.length;o++)null===r[o]&&(r.splice(o,1),o--);if(0===r.length&&(this.createPrimitive=!1),this.createPrimitive){if(r.length>0){var a;if(e$2b(i)&&(e$2b(this.oldPrimitive)?n.remove(i):this.oldPrimitive=i),this.material=r$C.getValue(e,this.materialProperty,this.material),this.material._wrapS=this.wrapS,this.material._wrapT=this.wrapT,e$2b(this.depthFailMaterialProperty)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),r.length>1){var s=r[0].modelMatrix,l=p$1d.inverse(r[0].modelMatrix,new p$1d);for(o=1;o<r.length;o++)!p$1d.equals(s,r[o].modelMatrix)&&e$2b(r[o].id.geometry)&&(ee$i(r[o].modelMatrix,r[o].geometry.attributes.position,l),r[o].modelMatrix=s,r[o].geometry.boundingSphere=i$1c.fromVertices(r[o].geometry.attributes.position.values,new o$1p(0,0,0),3))}i=new y$S({show:!1,asynchronous:this.asynchronous,geometryInstances:r,appearance:new this.appearanceType({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed,materialSupport:this.materialSupport}),depthFailAppearance:a,shadows:this.shadows,updateBoundingSphere:!e$2b(this.enuCenter),modelMatrix:e$2b(this.enuCenter)?m$17.eastNorthUpToFixedFrame(this.enuCenter,t$13.WGS84,new p$1d):void 0,twoPasses:this.twoPasses,compressVertices:this.compressVertices}),n.add(i),t=!1}else{e$2b(i)&&(n.remove(i),i=void 0);var u=this.oldPrimitive;e$2b(u)&&(n.remove(u),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1}else if(e$2b(i)&&i.ready){i.show=!0,e$2b(this.oldPrimitive)&&(n.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=r$C.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,e$2b(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof t$Q)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);var c=this.updatersWithAttributes.values,h=c.length;for(o=0;o<h;o++){var d=c[o],f=d.entity,p=this.geometry.get(d.id),_=this.attributes.get(p.id.id);if(e$2b(_)||(_=i.getGeometryInstanceAttributes(p.id),this.attributes.set(p.id.id,_)),e$2b(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof t$Q&&!d.depthFailMaterialProperty.isConstant){var m=d.depthFailMaterialProperty.color,g=r$Z.getValueOrDefault(m,e,e$1U.WHITE,$$p);e$1U.equals(_._lastDepthFailColor,g)||(_._lastDepthFailColor=e$1U.clone(g,_._lastDepthFailColor),_.depthFailColor=o$16.toValue(g,_.depthFailColor))}var x=f.isShowing&&(d.hasConstantFill||d.isFilled(e));x!==(1===_.show[0])&&(_.show=e$1F.toValue(x,_.show));var v=d.distanceDisplayConditionProperty;if(!r$Z.isConstant(v)){var y=r$Z.getValueOrDefault(v,e,K$m,J$m);r$Y.equals(y,_._lastDistanceDisplayCondition)||(_._lastDistanceDisplayCondition=r$Y.clone(y,_._lastDistanceDisplayCondition),_.distanceDisplayCondition=t$B.toValue(y,_.distanceDisplayCondition))}var $=d.terrainOffsetProperty;if(!r$Z.isConstant($)){var b=r$Z.getValueOrDefault($,e,Q$o,Y$j);o$1p.equals(b,_._lastOffset)||(_._lastOffset=o$1p.clone(b,_._lastOffset),_.offset=e$1B.toValue(b,_.offset))}}this.updateShows(i)}else e$2b(i)&&!i.ready&&(t=!1);return t};var M$u=new o$1p;function ee$i(e,t,i){if(e$2b(t))for(var n=t.values,r=n.length,o=0;o<r;o+=3){o$1p.unpack(n,o,M$u),p$1d.multiplyByPoint(e,M$u,M$u);var a=p$1d.multiplyByPoint(i,M$u,new o$1p);o$1p.pack(a,n,o)}}function u$s(e,t,i,n,r){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=n,this._shadows=r}p$m.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);e$2b(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$1F.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},p$m.prototype.contains=function(e){return this.updaters.contains(e.id)},p$m.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!e$2b(i)||!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2b(n)||!e$2b(n.boundingSphere)||e$2b(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},p$m.prototype.destroy=function(){var e=this.primitive,t=this.primitives;e$2b(e)&&t.remove(e);var i=this.oldPrimitive;e$2b(i)&&t.remove(i),this.removeMaterialSubscription()},u$s.prototype.add=function(e,t){var i=this._items,n=i.length;if(t instanceof a$n&&e$2b(t.entity._polylineVolume.enuCenter))if(0===i.length){(a=new p$m(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),a.enuCenter=t.entity._polylineVolume.enuCenter._value,i.push(a)}else{for(var r=0;r<n;r++){var o=i[r];if(o$1p.equals(o.enuCenter,t.entity._polylineVolume.enuCenter._value))return void o.add(e,t)}(a=new p$m(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),a.enuCenter=t.entity._polylineVolume.enuCenter._value,i.push(a)}else{for(r=0;r<n;r++){if((o=i[r]).isMaterial(t))return void o.add(e,t)}var a;(a=new p$m(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),i.push(a)}},u$s.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},u$s.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},u$s.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},u$s.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var x$t=new e$1U,E$s=new r$Y,F$s=new r$Y;function d$A(e,t,i,n){this.primitives=e,this.zIndex=n,this.classificationType=t,this.color=i,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1N,this.updaters=new e$1N,this.updatersWithAttributes=new e$1N,this.attributes=new e$1N,this.subscriptions=new e$1N,this.showsUpdated=new e$1N,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new r$G}function p$l(e,t){this._batches=[],this._primitives=e,this._classificationType=t}d$A.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},d$A.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),this.rectangleCollisionCheck.insert(i,t.geometry.rectangle),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&r$Z.isConstant(e.distanceDisplayConditionProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},d$A.prototype.remove=function(e){var t=e.id,i=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,i.geometry.rectangle),this.updatersWithAttributes.remove(t);var n=this.subscriptions.get(t);return e$2b(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},d$A.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.primitives;if(this.createPrimitive){var o=this.geometry.values;if(o.length>0)e$2b(n)&&(e$2b(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),n=new d$14({show:!1,asynchronous:!0,geometryInstances:o.slice(),classificationType:this.classificationType}),r.add(n,this.zIndex),i=!1;else{e$2b(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;e$2b(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(e$2b(n)&&n.ready){n.show=!0,e$2b(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0);var s=this.updatersWithAttributes.values,l=s.length,u=this.waitingOnCreate;for(t=0;t<l;t++){var c=s[t],h=this.geometry.get(c.id),d=this.attributes.get(h.id.id);if(e$2b(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d)),!c.fillMaterialProperty.isConstant||u){var f=c.fillMaterialProperty.color,p=r$Z.getValueOrDefault(f,e,e$1U.WHITE,x$t);e$1U.equals(d._lastColor,p)||(d._lastColor=e$1U.clone(p,d._lastColor),d.color=o$16.toValue(p,d.color))}var _=c.entity.isShowing&&(c.hasConstantFill||c.isFilled(e));_!==(1===d.show[0])&&(d.show=e$1F.toValue(_,d.show));var m=c.distanceDisplayConditionProperty;if(!r$Z.isConstant(m)){var g=r$Z.getValueOrDefault(m,e,F$s,E$s);r$Y.equals(g,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=r$Y.clone(g,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=t$B.toValue(g,d.distanceDisplayCondition))}}this.updateShows(n),this.waitingOnCreate=!1}else e$2b(n)&&!n.ready&&(i=!1);return this.itemsToRemove.length=0,i},d$A.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);e$2b(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$1F.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},d$A.prototype.contains=function(e){return this.updaters.contains(e.id)},d$A.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getBoundingSphere(e.entity);return e$2b(n)?(n.clone(t),R$w.DONE):R$w.FAILED},d$A.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;e$2b(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;e$2b(i)&&(e.remove(i),this.oldPrimitive=void 0)},p$l.prototype.add=function(e,t){for(var i,n=t.createFillGeometryInstance(e),r=this._batches,o=r$Z.getValueOrDefault(t.zIndex,0),a=r.length,s=0;s<a;++s){var l=r[s];if(l.zIndex===o&&!l.overlapping(n.geometry.rectangle)){i=l;break}}return e$2b(i)||(i=new d$A(this._primitives,this._classificationType,n.attributes.color.value,o),r.push(i)),i.add(t,n),i},p$l.prototype.remove=function(e){for(var t=this._batches,i=t.length,n=0;n<i;++n)if(t[n].remove(e))return},p$l.prototype.update=function(e){var t,i,n=!0,r=this._batches,o=r.length;for(t=0;t<o;++t)n=r[t].update(e)&&n;for(t=0;t<o;++t)for(var a=r[t],s=a.itemsToRemove,l=s.length,u=0;u<l;u++){i=s[u],a.remove(i);var c=this.add(e,i);a.isDirty=!0,c.isDirty=!0}for(t=o-1;t>=0;--t){var h=r[t];h.isDirty&&(n=r[t].update(e)&&n,h.isDirty=!1),0===h.geometry.length&&r.splice(t,1)}return n},p$l.prototype.getBoundingSphere=function(e,t){for(var i=this._batches,n=i.length,r=0;r<n;++r){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},p$l.prototype.removeAllPrimitives=function(){for(var e=this._batches,t=e.length,i=0;i<t;++i)e[i].removeAllPrimitives()};var b$z=new r$Y,U$q=new r$Y;function v$s(e,t,i,n,r,o){this.primitives=e,this.classificationType=t,this.appearanceType=i,this.materialProperty=n,this.updaters=new e$1N,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1N,this.material=void 0,this.updatersWithAttributes=new e$1N,this.attributes=new e$1N,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(v$s.prototype.onMaterialChanged,this),this.subscriptions=new e$1N,this.showsUpdated=new e$1N,this.usingSphericalTextureCoordinates=r,this.zIndex=o,this.rectangleCollisionCheck=new r$G}function f$s(e,t,i){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=i}v$s.prototype.onMaterialChanged=function(){this.invalidated=!0},v$s.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},v$s.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty;return i===t||i instanceof t$Q&&t instanceof t$Q||e$2b(t)&&t.equals(i)},v$s.prototype.add=function(e,t,i){var n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,i),this.rectangleCollisionCheck.insert(n,i.geometry.rectangle),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$Z.isConstant(t.distanceDisplayConditionProperty)){var r=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},v$s.prototype.remove=function(e){var t=e.id,i=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,i.geometry.rectangle),this.updatersWithAttributes.remove(t);var n=this.subscriptions.get(t);return e$2b(n)&&(n(),this.subscriptions.remove(t)),!0}return!1},v$s.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.primitives,o=this.geometry.values;if(this.createPrimitive){if(o.length>0)e$2b(n)&&(e$2b(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),this.material=r$C.getValue(e,this.materialProperty,this.material),n=new d$14({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({material:this.material}),classificationType:this.classificationType}),r.add(n,this.zIndex),i=!1;else{e$2b(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;e$2b(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(e$2b(n)&&n.ready){n.show=!0,e$2b(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=r$C.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;var s=this.updatersWithAttributes.values,l=s.length;for(t=0;t<l;t++){var u=s[t],c=u.entity,h=this.geometry.get(u.id),d=this.attributes.get(h.id.id);e$2b(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d));var f=c.isShowing&&(u.hasConstantFill||u.isFilled(e));f!==(1===d.show[0])&&(d.show=e$1F.toValue(f,d.show));var p=u.distanceDisplayConditionProperty;if(!r$Z.isConstant(p)){var _=r$Z.getValueOrDefault(p,e,U$q,b$z);r$Y.equals(_,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=r$Y.clone(_,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=t$B.toValue(_,d.distanceDisplayCondition))}}this.updateShows(n)}else e$2b(n)&&!n.ready&&(i=!1);return i},v$s.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);e$2b(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$1F.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},v$s.prototype.contains=function(e){return this.updaters.contains(e.id)},v$s.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2b(n)||!e$2b(n.boundingSphere)||e$2b(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},v$s.prototype.destroy=function(){var e=this.primitive,t=this.primitives;e$2b(e)&&t.remove(e);var i=this.oldPrimitive;e$2b(i)&&t.remove(i),this.removeMaterialSubscription()},f$s.prototype.add=function(e,t){for(var i=this._items,n=i.length,r=t.createFillGeometryInstance(e),o=y$R.shouldUseSphericalCoordinates(r.geometry.rectangle),a=r$Z.getValueOrDefault(t.zIndex,0),s=0;s<n;++s){var l=i[s];if(l.isMaterial(t)&&l.usingSphericalTextureCoordinates===o&&l.zIndex===a&&!l.overlapping(r.geometry.rectangle))return void l.add(e,t,r)}var u=new v$s(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,o,a);u.add(e,t,r),i.push(u)},f$s.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},f$s.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},f$s.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},f$s.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var x$s=new e$1U,F$r=new r$Y,H$y=new r$Y,Z$o=o$1p.ZERO,j$r=new o$1p;function c$l(e,t,i,n){this.translucent=t,this.width=i,this.shadows=n,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1N,this.updaters=new e$1N,this.updatersWithAttributes=new e$1N,this.attributes=new e$1N,this.itemsToRemove=[],this.subscriptions=new e$1N,this.showsUpdated=new e$1N}function y$r(e,t,i){this._primitives=e,this._scene=t,this._shadows=i,this._solidBatches=new e$1N,this._translucentBatches=new e$1N}c$l.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantOutline&&e.outlineColorProperty.isConstant&&r$Z.isConstant(e.distanceDisplayConditionProperty)&&r$Z.isConstant(e.terrainOffsetProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},c$l.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2b(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},c$l.prototype.update=function(e){var t,i=!0,n=0,r=this.primitive,o=this.primitives;if(this.createPrimitive){var a=this.geometry.values;if(a.length>0)e$2b(r)&&(e$2b(this.oldPrimitive)?o.remove(r):this.oldPrimitive=r),r=new y$S({show:!1,asynchronous:!0,geometryInstances:a,appearance:new t$R({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width},hasSideness:e$2b(this.outlineWidth)}),shadows:this.shadows}),e$2b(this.outlineWidth)&&(r._outlineWidth=this.outlineWidth),o.add(r),i=!1;else{e$2b(r)&&(o.remove(r),r=void 0);var s=this.oldPrimitive;e$2b(s)&&(o.remove(s),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(e$2b(r)&&r.ready){r.show=!0,e$2b(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);var l=this.updatersWithAttributes.values,u=l.length,c=this.waitingOnCreate;for(t=0;t<u;t++){var h=l[t],d=this.geometry.get(h.id),f=this.attributes.get(d.id.id);if(e$2b(f)||(f=r.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,f)),!h.outlineColorProperty.isConstant||c){var p=h.outlineColorProperty,_=r$Z.getValueOrDefault(p,e,e$1U.WHITE,x$s);e$1U.equals(f._lastColor,_)||(f._lastColor=e$1U.clone(_,f._lastColor),f.color=o$16.toValue(_,f.color),(this.translucent&&255===f.color[3]||!this.translucent&&255!==f.color[3])&&(this.itemsToRemove[n++]=h))}var m=h.entity.isShowing&&(h.hasConstantOutline||h.isOutlineVisible(e));m!==(1===f.show[0])&&(f.show=e$1F.toValue(m,f.show));var g=h.distanceDisplayConditionProperty;if(!r$Z.isConstant(g)){var x=r$Z.getValueOrDefault(g,e,H$y,F$r);r$Y.equals(x,f._lastDistanceDisplayCondition)||(f._lastDistanceDisplayCondition=r$Y.clone(x,f._lastDistanceDisplayCondition),f.distanceDisplayCondition=t$B.toValue(x,f.distanceDisplayCondition))}var v=h.terrainOffsetProperty;if(!r$Z.isConstant(v)){var y=r$Z.getValueOrDefault(v,e,Z$o,j$r);o$1p.equals(y,f._lastOffset)||(f._lastOffset=o$1p.clone(y,f._lastOffset),f.offset=e$1B.toValue(y,f.offset))}}this.updateShows(r),this.waitingOnCreate=!1}else e$2b(r)&&!r.ready&&(i=!1);return this.itemsToRemove.length=n,i},c$l.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);e$2b(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$1F.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},c$l.prototype.contains=function(e){return this.updaters.contains(e.id)},c$l.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2b(n)||!e$2b(n.boundingSphere)||e$2b(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},c$l.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;e$2b(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;e$2b(i)&&(e.remove(i),this.oldPrimitive=void 0)},y$r.prototype.add=function(e,t){var i=t.createOutlineGeometryInstance(e);if(e$2b(i)){var n,r,o,a=this._scene.clampLineWidth(t.outlineWidth);if(255===i.attributes.color.value[3])n=this._solidBatches,t instanceof u$t?(o=t.outlineWidth,r=n.get(o)):r=n.get(a),e$2b(r)||(r=new c$l(this._primitives,!1,a,this._shadows),e$2b(o)?(n.set(o,r),r.outlineWidth=o):n.set(a,r)),r.add(t,i);else n=this._translucentBatches,t instanceof u$t?(o=t.outlineWidth,r=n.get(o)):r=n.get(a),e$2b(r)||(r=new c$l(this._primitives,!0,a,this._shadows),n.set(a,r),e$2b(o)&&(r.outlineWidth=o)),r.add(t,i)}},y$r.prototype.remove=function(e){var t,i=this._solidBatches.values,n=i.length;for(t=0;t<n;t++)if(i[t].remove(e))return;var r=this._translucentBatches.values,o=r.length;for(t=0;t<o;t++)if(r[t].remove(e))return},y$r.prototype.update=function(e){var t,i,n,r,o,a=this._solidBatches.values,s=a.length,l=this._translucentBatches.values,u=l.length,c=!0,h=!1;do{for(h=!1,i=0;i<s;i++){c=(r=a[i]).update(e);var d=(o=r.itemsToRemove).length;if(d>0)for(h=!0,t=0;t<d;t++)n=o[t],r.remove(n),this.add(e,n)}for(i=0;i<u;i++){c=(r=l[i]).update(e);var f=(o=r.itemsToRemove).length;if(f>0)for(h=!0,t=0;t<f;t++)n=o[t],r.remove(n),this.add(e,n)}}while(h);return c},y$r.prototype.getBoundingSphere=function(e,t){var i,n=this._solidBatches.values,r=n.length;for(i=0;i<r;i++){var o=n[i];if(o.contains(e))return o.getBoundingSphere(e,t)}var a=this._translucentBatches.values,s=a.length;for(i=0;i<s;i++){var l=a[i];if(l.contains(e))return l.getBoundingSphere(e,t)}return R$w.FAILED},y$r.prototype.removeAllPrimitives=function(){var e,t=this._solidBatches.values,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._translucentBatches.values,r=n.length;for(e=0;e<r;e++)n[e].removeAllPrimitives()};var I$A=new e$1U;function A$w(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0,this.enuCenter=void 0}function n$m(e,t){i$F.call(this,{entity:e,scene:t,geometryOptions:new A$w(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}function p$k(e,t,i){a$C.call(this,e,t,i)}e$2b(Object.create)&&(n$m.prototype=Object.create(i$F.prototype),n$m.prototype.constructor=n$m),n$m.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$1F(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=t$B.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$Q?(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,I$A)),e$2b(i)||(i=e$1U.WHITE),t={show:o,distanceDisplayCondition:s,color:o$16.fromColor(i)}):t={show:o,distanceDisplayCondition:s};return new d$1o({id:n,geometry:new E$F(this._options),attributes:t})},n$m.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$16("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$Z.getValueOrDefault(this._outlineColorProperty,e,e$1U.BLACK,I$A),r=this._distanceDisplayConditionProperty.getValue(e);return new d$1o({id:t,geometry:new w$x(this._options),attributes:{show:new e$1F(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$B.fromDistanceDisplayCondition(r)}})},n$m.prototype._isHidden=function(e,t){return!e$2b(t.positions)||i$F.prototype._isHidden.call(this,e,t)},n$m.prototype._getIsClosed=function(e){return!1},n$m.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&r$Z.isConstant(t.minimumHeights)&&r$Z.isConstant(t.maximumHeights)&&r$Z.isConstant(t.outlineWidth)&&r$Z.isConstant(t.granularity))},n$m.prototype._setStaticOptions=function(e,t){var i=t.minimumHeights,n=t.maximumHeights,r=t.granularity,o=this._materialProperty instanceof t$Q,a=t.enuCenter,s=this._options;s.vertexFormat=o?t$R.VERTEX_FORMAT:t$w.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(o$H.MINIMUM_VALUE,s.positions),s.minimumHeights=e$2b(i)?i.getValue(o$H.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=e$2b(n)?n.getValue(o$H.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=e$2b(r)?r.getValue(o$H.MINIMUM_VALUE):void 0,s.enuCenter=e$2b(a)?a.getValue(o$H.MINIMUM_VALUE):void 0},n$m.DynamicGeometryUpdater=p$k,e$2b(Object.create)&&(p$k.prototype=Object.create(a$C.prototype),p$k.prototype.constructor=p$k),p$k.prototype._isHidden=function(e,t,i){return!e$2b(this._options.positions)||a$C.prototype._isHidden.call(this,e,t,i)},p$k.prototype._setOptions=function(e,t,i){var n=this._options;n.positions=r$Z.getValueOrUndefined(t.positions,i,n.positions),n.minimumHeights=r$Z.getValueOrUndefined(t.minimumHeights,i,n.minimumHeights),n.maximumHeights=r$Z.getValueOrUndefined(t.maximumHeights,i,n.maximumHeights),n.granularity=r$Z.getValueOrUndefined(t.granularity,i)};var ee$h=[],I$z=[i$E,s$n,f$y,u$t,l$z,p$n,l$y,a$n,d$B,n$m,m$r];function m$o(e,t){this.entity=e,this.scene=t;var i=new Array(I$z.length),n=new o$1h;function r(e){n.raiseEvent(e)}for(var o=new n$x,a=0;a<i.length;a++){var s=new I$z[a](e,t);o.add(s.geometryChanged,r),i[a]=s}this.updaters=i,this.geometryChanged=n,this.eventHelper=o,this._removeEntitySubscription=e.definitionChanged.addEventListener(m$o.prototype._onEntityPropertyChanged,this)}function c$k(e,t,i,n){o$1q.defined("scene",e),o$1q.defined("entityCollection",t),i=u$_(i,e.primitives),n=u$_(n,e.groundPrimitives),this._scene=e,this._primitives=i,this._groundPrimitives=n,this._entityCollection=void 0,this._addedObjects=new e$1N,this._removedObjects=new e$1N,this._changedObjects=new e$1N;var r=W$W.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(2*r),this._closedColorBatches=new Array(2*r),this._closedMaterialBatches=new Array(2*r),this._openColorBatches=new Array(2*r),this._openMaterialBatches=new Array(2*r);var o,a=h$V.supportsMaterialsforEntitiesOnTerrain(e);for(this._supportsMaterialsforEntitiesOnTerrain=a,o=0;o<r;++o)this._outlineBatches[o]=new y$r(i,e,o,!1),this._outlineBatches[r+o]=new y$r(i,e,o,!0),this._closedColorBatches[o]=new y$s(i,t$R,void 0,!0,o,!0),this._closedColorBatches[r+o]=new y$s(i,t$R,void 0,!0,o,!1),this._closedMaterialBatches[o]=new u$s(i,t$w,void 0,!0,o,!0),this._closedMaterialBatches[r+o]=new u$s(i,t$w,void 0,!0,o,!1),this._openColorBatches[o]=new y$s(i,t$R,void 0,!1,o,!0),this._openColorBatches[r+o]=new y$s(i,t$R,void 0,!1,o,!1),this._openMaterialBatches[o]=new u$s(i,t$w,void 0,!1,o,!0),this._openMaterialBatches[r+o]=new u$s(i,t$w,void 0,!1,o,!1);var s=_0x3b5200.NUMBER_OF_CLASSIFICATION_TYPES,l=new Array(s),u=[];if(a)for(o=0;o<s;++o)u.push(new f$s(n,o,t$w)),l[o]=new p$l(n,o);else for(o=0;o<s;++o)l[o]=new p$l(n,o);this._groundColorBatches=l,this._groundMaterialBatches=u,this._dynamicBatch=new r$s(i,n),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new e$1N,this._updaterSets=new e$1N,this._entityCollection=t,t.collectionChanged.addEventListener(c$k.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,ee$h)}m$o.prototype._onEntityPropertyChanged=function(e,t,i,n){for(var r=this.updaters,o=0;o<r.length;o++)r[o]._onEntityPropertyChanged(e,t,i,n)},m$o.prototype.forEach=function(e){for(var t=this.updaters,i=0;i<t.length;i++)e(t[i])},m$o.prototype.destroy=function(){this.eventHelper.removeAll();for(var e=this.updaters,t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),i$10(this)},c$k.prototype.update=function(e){o$1q.defined("time",e);var t,i,n,r,o=this._addedObjects,a=o.values,s=this._removedObjects,l=s.values,u=this._changedObjects,c=u.values,h=this;for(t=c.length-1;t>-1;t--)n=(i=c[t]).id,(r=this._updaterSets.get(n)).entity===i?r.forEach((function(t){h._removeUpdater(t),h._insertUpdaterIntoBatch(e,t)})):(l.push(i),a.push(i));for(t=l.length-1;t>-1;t--)if(n=(i=l[t]).id,e$2b(r=this._updaterSets.get(n))&&(r.forEach(this._removeUpdater.bind(this)),r.destroy(),this._updaterSets.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n),i.children.length>0))for(var d=0;d<i.children.length;d++){n=(f=i.children[d]).id,e$2b(r=this._updaterSets.get(n))&&(r.forEach(this._removeUpdater.bind(this)),r.destroy(),this._updaterSets.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n))}for(t=a.length-1;t>-1;t--)if(n=(i=a[t]).id,r=new m$o(i,this._scene),this._updaterSets.set(n,r),r.forEach((function(t){h._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(n,r.geometryChanged.addEventListener(c$k._onGeometryChanged,this)),i.children.length>0)for(d=0;d<i.children.length;d++){var f=i.children[d];i.entityCollection.contains(f)||(n=f.id,r=new m$o(f,this._scene),this._updaterSets.set(n,r),r.forEach((function(t){h._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(n,r.geometryChanged.addEventListener(c$k._onGeometryChanged,this)))}o.removeAll(),s.removeAll(),u.removeAll();var p=!0,_=this._batches,m=_.length;for(t=0;t<m;t++)p=_[t].update(e)&&p;return p};var te$c=[],re$i=new i$1c;c$k.prototype.getBoundingSphere=function(e,t){o$1q.defined("entity",e),o$1q.defined("result",t);for(var i=te$c,n=re$i,r=0,o=R$w.DONE,a=this._batches,s=a.length,l=e.id,u=this._updaterSets.get(l).updaters,c=0;c<u.length;c++)for(var h=u[c],d=0;d<s;d++){if((o=a[d].getBoundingSphere(h,n))===R$w.PENDING)return R$w.PENDING;o===R$w.DONE&&(i[r]=i$1c.clone(n,i[r]),r++)}return 0===r?R$w.FAILED:(i.length=r,i$1c.fromBoundingSpheres(i,t),R$w.DONE)},c$k.prototype.isDestroyed=function(){return!1},c$k.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(c$k.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var e,t=this._batches,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._subscriptions.values;for(i=n.length,e=0;e<i;e++)n[e]();this._subscriptions.removeAll();var r=this._updaterSets.values;for(i=r.length,e=0;e<i;e++)r[e].destroy();return this._updaterSets.removeAll(),i$10(this)},c$k.prototype._removeUpdater=function(e){for(var t=this._batches,i=t.length,n=0;n<i;n++)t[n].remove(e)},c$k.prototype._insertUpdaterIntoBatch=function(e,t){if(t.isDynamic)this._dynamicBatch.add(e,t);else{var i;(t.outlineEnabled||t.fillEnabled)&&(i=t.shadowsProperty.getValue(e));var n=W$W.NUMBER_OF_SHADOW_MODES;if(t.outlineEnabled&&(e$2b(t.terrainOffsetProperty)?this._outlineBatches[n+i].add(e,t):this._outlineBatches[i].add(e,t)),t.fillEnabled)if(t.onTerrain){var r=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof t$Q?this._groundColorBatches[r].add(e,t):this._groundMaterialBatches[r].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof t$Q?e$2b(t.terrainOffsetProperty)?this._closedColorBatches[n+i].add(e,t):this._closedColorBatches[i].add(e,t):e$2b(t.terrainOffsetProperty)?this._closedMaterialBatches[n+i].add(e,t):this._closedMaterialBatches[i].add(e,t):t.fillMaterialProperty instanceof t$Q?e$2b(t.terrainOffsetProperty)?this._openColorBatches[n+i].add(e,t):this._openColorBatches[i].add(e,t):e$2b(t.terrainOffsetProperty)?this._openMaterialBatches[n+i].add(e,t):this._openMaterialBatches[i].add(e,t)}},c$k._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,n=e.entity,r=n.id;!e$2b(t.get(r))&&!e$2b(i.get(r))&&i.set(r,n)},c$k.prototype._onCollectionChanged=function(e,t,i){var n,r,o,a=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)r=(o=i[n]).id,a.remove(r)||(s.set(r,o),l.remove(r));for(n=t.length-1;n>-1;n--)r=(o=t[n]).id,s.remove(r)?l.set(r,o):a.set(r,o)};var U$p=1,q$p="30px sans-serif",N$i=R$Q.FILL,z$p=e$1U.WHITE,A$v=e$1U.BLACK,F$q=1,H$x=!1,T$r=new e$1U(.165,.165,.165,.8),W$t=new o$1o(7,5),I$y=o$1o.ZERO,Z$n=o$1p.ZERO,j$q=k$P.NONE,K$l=j$T.CENTER,J$l=S$O.CENTER,M$t=new o$1p,Q$n=new e$1U,X$h=new e$1U,Y$i=new e$1U,$$o=new o$1o,G$s=new o$1p,b$y=new o$1o,ee$g=new o$Y,te$b=new o$Y,re$h=new o$Y,ne$i=new r$Y;function S$n(e){this.entity=e,this.label=void 0,this.index=void 0}function l$w(e,t){if(!e$2b(e))throw new t$16("entityCluster is required.");if(!e$2b(t))throw new t$16("entityCollection is required.");t.collectionChanged.addEventListener(l$w.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1N,this._onCollectionChanged(t,t.values,[],[])}function y$q(e,t,i){e$2b(e)&&(e.label=void 0,i.removeLabel(t))}l$w.prototype.update=function(e){if(!e$2b(e))throw new t$16("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a,s=t[n],l=s.entity,u=l._label,c=s.label,h=l.isShowing&&l.isAvailable(e)&&r$Z.getValueOrDefault(u._show,e,!0);if(h&&(a=r$Z.getValueOrUndefined(l._position,e,M$t),o=r$Z.getValueOrUndefined(u._text,e),h=e$2b(a)&&e$2b(o)),h){r$Z.isConstant(l._position)||(i._clusterDirty=!0);var d=!1,f=r$Z.getValueOrDefault(u._heightReference,e,j$q);e$2b(c)||((c=i.getLabel(l)).id=l,s.label=c,d=o$1p.equals(c.position,a)&&c.heightReference===f),c.show=!0,c.position=a,c.text=o,c.scale=r$Z.getValueOrDefault(u._scale,e,U$p),c.font=r$Z.getValueOrDefault(u._font,e,q$p),c.style=r$Z.getValueOrDefault(u._style,e,N$i),c.fillColor=r$Z.getValueOrDefault(u._fillColor,e,z$p,Q$n),c.outlineColor=r$Z.getValueOrDefault(u._outlineColor,e,A$v,X$h),c.outlineWidth=r$Z.getValueOrDefault(u._outlineWidth,e,F$q),c.showBackground=r$Z.getValueOrDefault(u._showBackground,e,H$x),c.backgroundColor=r$Z.getValueOrDefault(u._backgroundColor,e,T$r,Y$i),c.backgroundPadding=r$Z.getValueOrDefault(u._backgroundPadding,e,W$t,$$o),c.pixelOffset=r$Z.getValueOrDefault(u._pixelOffset,e,I$y,b$y),c.eyeOffset=r$Z.getValueOrDefault(u._eyeOffset,e,Z$n,G$s),c.heightReference=f,c.horizontalOrigin=r$Z.getValueOrDefault(u._horizontalOrigin,e,K$l),c.verticalOrigin=r$Z.getValueOrDefault(u._verticalOrigin,e,J$l),c.translucencyByDistance=r$Z.getValueOrUndefined(u._translucencyByDistance,e,ee$g),c.pixelOffsetScaleByDistance=r$Z.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,te$b),c.scaleByDistance=r$Z.getValueOrUndefined(u._scaleByDistance,e,re$h),c.distanceDisplayCondition=r$Z.getValueOrUndefined(u._distanceDisplayCondition,e,ne$i),c.disableDepthTestDistance=r$Z.getValueOrUndefined(u._disableDepthTestDistance,e),d&&c._updateClamping()}else y$q(s,l,i)}return!0},l$w.prototype.getBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("entity is required.");if(!e$2b(t))throw new t$16("result is required.");var i=this._items.get(e.id);if(!e$2b(i)||!e$2b(i.label))return R$w.FAILED;var n=i.label;return t.center=o$1p.clone(u$_(n._clampedPosition,n.position),t.center),t.radius=0,R$w.DONE},l$w.prototype.isDestroyed=function(){return!1},l$w.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$w.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return i$10(this)},l$w.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)e$2b((o=t[r])._label)&&e$2b(o._position)&&a.set(o.id,new S$n(o));for(r=n.length-1;r>-1;r--)e$2b((o=n[r])._label)&&e$2b(o._position)?a.contains(o.id)||a.set(o.id,new S$n(o)):(y$q(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],y$q(a.get(o.id),o,s),a.remove(o.id)};var N$h=1,j$p=0,k$n=!0,W$s=!0,J$k=W$W.ENABLED,K$k=k$P.NONE,Q$m=e$1U.RED,X$g=0,Y$h=e$1U.WHITE,Z$m=I$J.HIGHLIGHT,$$n=.5,G$r=new o$1o(1,1),ee$f=new p$1d,ie$b=new p$1d;function d$z(e,t){if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(t))throw new t$16("entityCollection is required.");t.collectionChanged.addEventListener(d$z.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new e$1N,this._onCollectionChanged(t,t.values,[],[])}function M$s(e,t,i,n){var r=i[t.id];e$2b(r)&&(n.removeAndDestroy(r.modelPrimitive),delete i[t.id])}function re$g(e,t){var i=t[e.id];e$2b(i)&&(i.nodeTransformationsScratch={})}function te$a(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}function i$s(e){this._definitionChanged=new o$1h,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}d$z.prototype.update=function(e){if(!e$2b(e))throw new t$16("time is required.");for(var t=this._entitiesToVisualize.values,i=this._modelHash,n=this._primitives,r=0,o=t.length;r<o;r++){var a,s,l=t[r],u=l._model,c=i[l.id],h=l.isShowing&&l.isAvailable(e)&&r$Z.getValueOrDefault(u._show,e,!0);if(h&&(s=l.computeModelMatrix(e,ee$f),a=t$11.createIfNeeded(r$Z.getValueOrUndefined(u._uri,e)),h=e$2b(s)&&e$2b(a)),h){var d=e$2b(c)?c.modelPrimitive:void 0;if((!e$2b(d)||a.url!==c.url)&&(e$2b(d)&&(n.removeAndDestroy(d),delete i[l.id]),(d=F$C.fromGltf({url:a,incrementallyLoadTextures:r$Z.getValueOrDefault(u._incrementallyLoadTextures,e,k$n),scene:this._scene})).id=l,n.add(d),c={modelPrimitive:d,url:a.url,animationsRunning:!1,nodeTransformationsScratch:{},originalNodeMatrixHash:{},loadFail:!1},i[l.id]=c,te$a(d,l,i)),d.show=!0,d.scale=r$Z.getValueOrDefault(u._scale,e,N$h),d._offsetMatrix=u._offsetMatrix,d.minimumPixelSize=r$Z.getValueOrDefault(u._minimumPixelSize,e,j$p),d.maximumScale=r$Z.getValueOrUndefined(u._maximumScale,e),d.modelMatrix=p$1d.clone(s,d.modelMatrix),d.shadows=r$Z.getValueOrDefault(u._shadows,e,J$k),d.heightReference=r$Z.getValueOrDefault(u._heightReference,e,K$k),d.distanceDisplayCondition=r$Z.getValueOrUndefined(u._distanceDisplayCondition,e),d.silhouetteColor=r$Z.getValueOrDefault(u._silhouetteColor,e,Q$m,d._silhouetteColor),d.silhouetteSize=r$Z.getValueOrDefault(u._silhouetteSize,e,X$g),d.color=r$Z.getValueOrDefault(u._color,e,Y$h,d._color),d.colorBlendMode=r$Z.getValueOrDefault(u._colorBlendMode,e,Z$m),d.colorBlendAmount=r$Z.getValueOrDefault(u._colorBlendAmount,e,$$n),d.clippingPlanes=r$Z.getValueOrUndefined(u._clippingPlanes,e),d.clampAnimations=r$Z.getValueOrDefault(u._clampAnimations,e,W$s),d.imageBasedLightingFactor=r$Z.getValueOrDefault(u._imageBasedLightingFactor,e,G$r),d.lightColor=r$Z.getValueOrUndefined(u._lightColor,e),d.ready){var f=r$Z.getValueOrDefault(u._runAnimations,e,!0);c.animationsRunning!==f&&(f?d.activeAnimations.addAll({loop:_0x157d80.REPEAT}):d.activeAnimations.removeAll(),c.animationsRunning=f);var p=r$Z.getValueOrUndefined(u._nodeTransformations,e,c.nodeTransformationsScratch);if(e$2b(p))for(var _=c.originalNodeMatrixHash,m=Object.keys(p),g=0,x=m.length;g<x;++g){var v=m[g],y=p[v];if(e$2b(y)){var $=d.getNode(v);if(e$2b($)){var b=_[v];e$2b(b)||(b=$.matrix.clone(),_[v]=b);var T=p$1d.fromTranslationRotationScale(y,ie$b);$.matrix=p$1d.multiply(b,T,T)}}}}}else e$2b(c)&&(c.modelPrimitive.show=!1)}return!0},d$z.prototype.isDestroyed=function(){return!1},d$z.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(d$z.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._modelHash,i=this._primitives,n=e.length-1;n>-1;n--)M$s(this,e[n],t,i);return i$10(this)},d$z.prototype.getBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("entity is required.");if(!e$2b(t))throw new t$16("result is required.");var i=this._modelHash[e.id];if(!e$2b(i)||i.loadFail)return R$w.FAILED;var n=i.modelPrimitive;if(!e$2b(n)||!n.show)return R$w.FAILED;if(!n.ready)return R$w.PENDING;if(n.heightReference===k$P.NONE)i$1c.transform(n.boundingSphere,n.modelMatrix,t);else{if(!e$2b(n._clampedModelMatrix))return R$w.PENDING;i$1c.transform(n.boundingSphere,n._clampedModelMatrix,t)}return R$w.DONE},d$z.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._entitiesToVisualize,s=this._modelHash,l=this._primitives;for(r=t.length-1;r>-1;r--)e$2b((o=t[r])._model)&&e$2b(o._position)&&a.set(o.id,o);for(r=n.length-1;r>-1;r--)e$2b((o=n[r])._model)&&e$2b(o._position)?(re$g(o,s),a.set(o.id,o)):(M$s(this,o,s,l),a.remove(o.id));for(r=i.length-1;r>-1;r--)M$s(this,o=i[r],s,l),a.remove(o.id)},Object.defineProperties(i$s.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return e$2b(this._value)?this._value.referenceFrame:Re$k.FIXED}}}),i$s.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$k.FIXED,t)},i$s.prototype.setValue=function(e){this._value!==e&&(this._value=e,e$2b(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),e$2b(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))},i$s.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2b(e))throw new t$16("time is required.");if(!e$2b(t))throw new t$16("referenceFrame is required.");if(e$2b(this._value))return e$2b(i=this._value.getValueInReferenceFrame(e,t,i))?t$13.WGS84.scaleToGeodeticSurface(i,i):void 0},i$s.prototype.equals=function(e){return this===e||e instanceof i$s&&this._value===e._value},i$s.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var $$m=60,U$o=1,F$p=new d$W,V$k=new d$W,D$o=new d$W;function T$q(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function ee$e(e,t,i,n,r,o,a,s,l){var u,c=s;e$2b(u=e.getValueInReferenceFrame(t,o,l[c]))&&(l[c++]=u);for(var h,d,f,p=!e$2b(r)||a$15.lessThanOrEquals(r,t)||a$15.greaterThanOrEquals(r,i),_=0,m=n.length,g=n[_],x=i,v=!1;_<m;){if(!p&&a$15.greaterThanOrEquals(g,r)&&(e$2b(u=e.getValueInReferenceFrame(r,o,l[c]))&&(l[c++]=u),p=!0),a$15.greaterThan(g,t)&&a$15.lessThan(g,x)&&!g.equals(r)&&(e$2b(u=e.getValueInReferenceFrame(g,o,l[c]))&&(l[c++]=u)),_<m-1){if(a>0&&!v){var y=n[_+1],$=a$15.secondsDifference(y,g);(v=$>a)&&(h=Math.ceil($/a),d=0,f=$/Math.max(h,2),h=Math.max(h-1,1))}if(v&&d<h){g=a$15.addSeconds(g,f,new a$15),d++;continue}}v=!1,g=n[++_]}return e$2b(u=e.getValueInReferenceFrame(i,o,l[c]))&&(l[c++]=u),c}function ne$h(e,t,i,n,r,o,a,s){for(var l,u=0,c=a,h=t,d=Math.max(o,60),f=!e$2b(n)||a$15.lessThanOrEquals(n,t)||a$15.greaterThanOrEquals(n,i);a$15.lessThan(h,i);)!f&&a$15.greaterThanOrEquals(h,n)&&(f=!0,e$2b(l=e.getValueInReferenceFrame(n,r,s[c]))&&(s[c]=l,c++)),e$2b(l=e.getValueInReferenceFrame(h,r,s[c]))&&(s[c]=l,c++),u++,h=a$15.addSeconds(t,d*u,new a$15);return e$2b(l=e.getValueInReferenceFrame(i,r,s[c]))&&(s[c]=l,c++),c}function oe$c(e,t,i,n,r,o,a,s){D$o.start=t,D$o.stop=i;for(var l=a,u=e.intervals,c=0;c<u.length;c++){var h=u.get(c);if(!d$W.intersect(h,D$o,F$p).isEmpty){var d=h.start;h.isStartIncluded||(d=h.isStopIncluded?h.stop:a$15.addSeconds(h.start,a$15.secondsDifference(h.stop,h.start)/2,new a$15));var f=e.getValueInReferenceFrame(d,r,s[l]);e$2b(f)&&(s[l]=f,l++)}}return l}function ie$a(e,t,i,n,r,o,a,s){var l=e.getValueInReferenceFrame(t,r,s[a]);return e$2b(l)&&(s[a++]=l),a}function re$f(e,t,i,n,r,o,a,s){V$k.start=t,V$k.stop=i;for(var l=a,u=e.intervals,c=0;c<u.length;c++){var h=u.get(c);if(!d$W.intersect(h,V$k,F$p).isEmpty){var d=h.start,f=h.stop,p=t;a$15.greaterThan(d,p)&&(p=d);var _=i;a$15.lessThan(f,_)&&(_=f),l=x$r(h.data,p,_,n,r,o,l,s)}}return l}function x$r(e,t,i,n,r,o,a,s){for(;e instanceof a$p;)e=e.resolvedProperty;e instanceof o$y?a=ee$e(e,t,i,e._property._times,n,r,o,a,s):a=e instanceof t$q?re$f(e,t,i,n,r,o,a,s):e instanceof t$m?oe$c(e,t,i,n,r,o,a,s):e instanceof r$U||e instanceof i$s&&r$Z.isConstant(e)?ie$a(e,t,i,n,r,o,a,s):ne$h(e,t,i,n,r,o,a,s);return a}function A$u(e,t,i,n,r,o,a){e$2b(a)||(a=[]);var s=x$r(e,t,i,n,r,o,0,a);return a.length=s,a}var G$q=new p$1e;function I$x(e,t){this._unusedIndexes=[],this._polylineCollection=new k$T,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}function w$p(e,t){if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(t))throw new t$16("entityCollection is required.");t.collectionChanged.addEventListener(w$p.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new e$1N,this._onCollectionChanged(t,t.values,[],[])}I$x.prototype.update=function(e){if(this._referenceFrame===Re$k.INERTIAL){var t=m$17.computeIcrfToFixedMatrix(e,G$q);e$2b(t)||(t=m$17.computeTemeToPseudoFixedMatrix(e,G$q)),p$1d.fromRotationTranslation(t,o$1p.ZERO,this._polylineCollection.modelMatrix)}},I$x.prototype.updateObject=function(e,t){var i,n,r=t.entity,o=r._path,a=r._position,s=o._show,l=t.polyline,u=r.isShowing&&(!e$2b(s)||s.getValue(e));if(u){var c=r$Z.getValueOrUndefined(o._leadTime,e),h=r$Z.getValueOrUndefined(o._trailTime,e),d=r._availability,f=e$2b(d),p=e$2b(c),_=e$2b(h);if(u=f||p&&_){if(_&&(i=a$15.addSeconds(e,-h,new a$15)),p&&(n=a$15.addSeconds(e,c,new a$15)),f){var m=d.start,g=d.stop;(!_||a$15.greaterThan(m,i))&&(i=m),(!p||a$15.lessThan(g,n))&&(n=g)}u=a$15.lessThan(i,n)}}if(u){if(!e$2b(l)){var x=this._unusedIndexes;if(x.length>0){var v=x.pop();l=this._polylineCollection.get(v),t.index=v}else t.index=this._polylineCollection.length,l=this._polylineCollection.add();l.id=r,t.polyline=l}var y=r$Z.getValueOrDefault(o._resolution,e,$$m);l.show=!0,l.positions=A$u(a,i,n,e,this._referenceFrame,y,l.positions.slice()),l.material=r$C.getValue(e,o._material,l.material),l.width=r$Z.getValueOrDefault(o._width,e,U$o),l.distanceDisplayCondition=r$Z.getValueOrUndefined(o._distanceDisplayCondition,e,l.distanceDisplayCondition)}else e$2b(l)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,l.show=!1,t.index=void 0)},I$x.prototype.removeObject=function(e){var t=e.polyline;e$2b(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)},I$x.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),i$10(this)},w$p.prototype.update=function(e){if(!e$2b(e))throw new t$16("time is required.");var t=this._updaters;for(var i in t)t.hasOwnProperty(i)&&t[i].update(e);var n=this._items.values;if(0===n.length&&e$2b(this._updaters)&&Object.keys(this._updaters).length>0){for(var r in t)t.hasOwnProperty(r)&&t[r].destroy();this._updaters={}}for(var o=0,a=n.length;o<a;o++){var s=n[o],l=s.entity._position,u=s.updater,c=Re$k.FIXED;this._scene.mode===C$13.SCENE3D&&(c=l.referenceFrame);var h=this._updaters[c];u===h&&e$2b(h)?h.updateObject(e,s):(e$2b(u)&&u.removeObject(s),e$2b(h)||((h=new I$x(this._scene,c)).update(e),this._updaters[c]=h),s.updater=h,e$2b(h)&&h.updateObject(e,s))}return!0},w$p.prototype.isDestroyed=function(){return!1},w$p.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(w$p.prototype._onCollectionChanged,this);var e=this._updaters;for(var t in e)e.hasOwnProperty(t)&&e[t].destroy();return i$10(this)},w$p.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a,s=this._items;for(r=t.length-1;r>-1;r--)e$2b((o=t[r])._path)&&e$2b(o._position)&&s.set(o.id,new T$q(o));for(r=n.length-1;r>-1;r--)e$2b((o=n[r])._path)&&e$2b(o._position)?s.contains(o.id)||s.set(o.id,new T$q(o)):e$2b(a=s.get(o.id))&&(e$2b(a.updater)&&a.updater.removeObject(a),s.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],e$2b(a=s.get(o.id))&&(e$2b(a.updater)&&a.updater.removeObject(a),s.remove(o.id))},w$p._subSample=A$u;var x$q=e$1U.WHITE,I$w=e$1U.BLACK,L$r=0,W$r=1,z$o=0,M$r=new e$1U,w$o=new o$1p,F$o=new e$1U,H$w=new o$Y,j$o=new o$Y,k$m=new r$Y;function J$j(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function v$r(e,t){if(!e$2b(e))throw new t$16("entityCluster is required.");if(!e$2b(t))throw new t$16("entityCollection is required.");t.collectionChanged.addEventListener(v$r.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1N,this._onCollectionChanged(t,t.values,[],[])}function V$j(e,t,i){if(e$2b(e)){if(e$2b(e.pointPrimitive))return e.pointPrimitive=void 0,void i.removePoint(t);e$2b(e.billboard)&&(e.billboard=void 0,i.removeBillboard(t))}}v$r.prototype.update=function(e){if(!e$2b(e))throw new t$16("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a=t[n],s=a.entity,l=s._point,u=a.pointPrimitive,c=a.billboard,h=r$Z.getValueOrDefault(l._heightReference,e,k$P.NONE),d=s.isShowing&&s.isAvailable(e)&&r$Z.getValueOrDefault(l._show,e,!0);if(d&&(d=e$2b(o=r$Z.getValueOrUndefined(s._position,e,w$o))),d){r$Z.isConstant(s._position)||(i._clusterDirty=!0);var f=!1,p=!1;if(h===k$P.NONE||e$2b(c)?h===k$P.NONE&&!e$2b(u)&&(e$2b(c)&&(V$j(a,s,i),c=void 0),(u=i.getPoint(s)).id=s,a.pointPrimitive=u):(e$2b(u)&&(V$j(a,s,i),u=void 0),(c=i.getBillboard(s)).id=s,c.image=void 0,a.billboard=c,f=!0,p=o$1p.equals(c.position,o)&&c.heightReference===h),e$2b(u))u.show=!0,u.position=o,u.scaleByDistance=r$Z.getValueOrUndefined(l._scaleByDistance,e,H$w),u.translucencyByDistance=r$Z.getValueOrUndefined(l._translucencyByDistance,e,j$o),u.color=r$Z.getValueOrDefault(l._color,e,x$q,M$r),u.outlineColor=r$Z.getValueOrDefault(l._outlineColor,e,I$w,F$o),u.outlineWidth=r$Z.getValueOrDefault(l._outlineWidth,e,L$r),u.pixelSize=r$Z.getValueOrDefault(l._pixelSize,e,W$r),u.distanceDisplayCondition=r$Z.getValueOrUndefined(l._distanceDisplayCondition,e,k$m),u.disableDepthTestDistance=r$Z.getValueOrDefault(l._disableDepthTestDistance,e,z$o);else if(e$2b(c)){c.show=!0,c.position=o,c.scaleByDistance=r$Z.getValueOrUndefined(l._scaleByDistance,e,H$w),c.translucencyByDistance=r$Z.getValueOrUndefined(l._translucencyByDistance,e,j$o),c.distanceDisplayCondition=r$Z.getValueOrUndefined(l._distanceDisplayCondition,e,k$m),c.disableDepthTestDistance=r$Z.getValueOrDefault(l._disableDepthTestDistance,e,z$o),c.heightReference=h;var _=r$Z.getValueOrDefault(l._color,e,x$q,M$r),m=r$Z.getValueOrDefault(l._outlineColor,e,I$w,F$o),g=Math.round(r$Z.getValueOrDefault(l._outlineWidth,e,L$r)),x=Math.max(1,Math.round(r$Z.getValueOrDefault(l._pixelSize,e,W$r)));if(g>0?(c.scale=1,f=f||g!==a.outlineWidth||x!==a.pixelSize||!e$1U.equals(_,a.color)||!e$1U.equals(m,a.outlineColor)):(c.scale=x/50,x=50,f=f||g!==a.outlineWidth||!e$1U.equals(_,a.color)||!e$1U.equals(m,a.outlineColor)),f){a.color=e$1U.clone(_,a.color),a.outlineColor=e$1U.clone(m,a.outlineColor),a.pixelSize=x,a.outlineWidth=g;var v=_.alpha,y=_.toCssColorString(),$=m.toCssColorString(),b=JSON.stringify([y,x,$,g]);c.setImage(b,i$A(v,y,$,g,x))}p&&c._updateClamping()}}else V$j(a,s,i)}return!0},v$r.prototype.getBoundingSphere=function(e,t){if(!e$2b(e))throw new t$16("entity is required.");if(!e$2b(t))throw new t$16("result is required.");var i=this._items.get(e.id);if(!e$2b(i)||!e$2b(i.pointPrimitive)&&!e$2b(i.billboard))return R$w.FAILED;if(e$2b(i.pointPrimitive))t.center=o$1p.clone(i.pointPrimitive.position,t.center);else{var n=i.billboard;if(!e$2b(n._clampedPosition))return R$w.PENDING;t.center=o$1p.clone(n._clampedPosition,t.center)}return t.radius=0,R$w.DONE},v$r.prototype.isDestroyed=function(){return!1},v$r.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(v$r.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return i$10(this)},v$r.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)e$2b((o=t[r])._point)&&e$2b(o._position)&&a.set(o.id,new J$j(o));for(r=n.length-1;r>-1;r--)e$2b((o=n[r])._point)&&e$2b(o._position)?a.contains(o.id)||a.set(o.id,new J$j(o)):(V$j(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],V$j(a.get(o.id),o,s),a.remove(o.id)};var d$y=e$1U.WHITE,l$v=1,f$r=.3,h$t=5,u$r=0,c$j=1e3;function o$w(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._spotSize=void 0,this._trailLength=void 0,this._spotIntensity=void 0,this._constantSpeed=void 0,this._period=void 0,this.color=e.color,this.spotSize=e.spotSize,this.trailLength=e.trailLength,this.spotIntensity=e.spotIntensity,this.constantSpeed=e.constantSpeed/1e3,this.period=1e3*e.period,this.trailTime=void 0,this._startTime=performance.now(),this._bAsy=u$_(e.bAsy,!0)}Object.defineProperties(o$w.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._trailLength)&&r$Z.isConstant(this._constantSpeed)&&r$Z.isConstant(this._period)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color"),spotSize:C$$("spotSize"),trailLength:C$$("trailLength"),spotIntensity:C$$("spotIntensity"),constantSpeed:C$$("constantSpeed"),period:C$$("period")}),o$w.prototype.getType=function(e){return"PolylineTrail"},o$w.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,d$y,t.color),t.trailTime=performance.now(),t.spotSize=r$Z.getValueOrDefault(this._spotSize,e,l$v),t.constantSpeed=r$Z.getValueOrDefault(this._constantSpeed,e,u$r),t.trailLength=r$Z.getValueOrDefault(this._trailLength,e,f$r),t.period=r$Z.getValueOrDefault(this._period,e,c$j),t.spotIntensity=r$Z.getValueOrDefault(this._spotIntensity,e,h$t),t.startTime=this._startTime,t},o$w.prototype.equals=function(e){return this===e||e instanceof o$w&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._spotSize,e._spotSize)&&r$Z.equals(this._constantSpeed,e._constantSpeed)&&r$Z.equals(this._trailLength,e._trailLength)&&r$Z.equals(this._period,e._period)&&r$Z.equals(this._spotIntensity,e._spotIntensity)};var ne$g=new e$1I(0),O$l={},W$q=new e$1U,oe$b=new t$Q(e$1U.WHITE),ae$b=new e$1I(!0),se$a=new e$1I(W$W.DISABLED),le$g=new e$1I(new r$Y),de$a=new e$1I(_0x3b5200.BOTH);function pe$a(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.hMax=void 0,this.followSurface=void 0,this.arcType=void 0,this.granularity=void 0}function he$9(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function u$q(e,t){if(!e$2b(e))throw new t$16("entity is required");if(!e$2b(t))throw new t$16("scene is required");this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(u$q.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new o$1h,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new pe$a,this._groundGeometryOptions=new he$9,this._id="polyline-"+e.id,this._clampToGround=!1,this._supportsPolylinesOnTerrain=h$V.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(u$q.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!e$2b(this._entity.availability)&&r$Z.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}}),u$q.prototype.isOutlineVisible=function(e){return!1},u$q.prototype.isFilled=function(e){var t=this._entity;return u$_(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e),!1)},u$q.prototype.createFillGeometryInstance=function(e){if(!e$2b(e))throw new t$16("time is required.");if(!this._fillEnabled)throw new t$16("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$1F(n&&i.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:t$B.fromDistanceDisplayCondition(o)};return this._materialProperty instanceof t$Q&&(e$2b(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,W$q)),e$2b(t)||(t=e$1U.WHITE),a.color=o$16.fromColor(t)),this.clampToGround||this.entity.clampToS3M?new d$1o({id:i,geometry:new aa$4(this._groundGeometryOptions),attributes:a}):(this._materialProperty instanceof o$w?(this._geometryOptions.dist=1,e$2b(this._materialProperty.constantSpeed)&&this._materialProperty.constantSpeed>0?this._geometryOptions.period=-1:this._geometryOptions.period=e$2b(this._materialProperty.period)?this._materialProperty.period:1e3):(this._geometryOptions.dist=0,this._geometryOptions.period=-1),e$2b(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof t$Q&&(e$2b(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(t=this._depthFailMaterialProperty.color.getValue(e,W$q)),e$2b(t)||(t=e$1U.WHITE),a.depthFailColor=o$16.fromColor(t)),new d$1o({id:i,geometry:new R$A(this._geometryOptions),attributes:a}))},u$q.prototype.createOutlineGeometryInstance=function(e){throw new t$16("This instance does not represent an outlined geometry.")},u$q.prototype.isDestroyed=function(){return!1},u$q.prototype.destroy=function(){this._entitySubscription(),i$10(this)},u$q.prototype._onEntityPropertyChanged=function(e,t,i,n){if("availability"===t||"polyline"===t){var r=this._entity.polyline;if(!e$2b(r))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));var o=r.positions,a=r.show;if(e$2b(a)&&a.isConstant&&!a.getValue(o$H.MINIMUM_VALUE)||!e$2b(o))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=r.zIndex,l=u$_(r.material,oe$b),u=l instanceof t$Q;this._materialProperty=l,this._depthFailMaterialProperty=r.depthFailMaterial,this._showProperty=u$_(a,ae$b),this._shadowsProperty=u$_(r.shadows,se$a),this._distanceDisplayConditionProperty=u$_(r.distanceDisplayCondition,le$g),this._classificationTypeProperty=u$_(r.classificationType,de$a),this._fillEnabled=!0,this._zIndex=u$_(s,ne$g);var c=r.width,h=r.hMax,d=r.followSurface,f=r.arcType,p=r.clampToGround,_=r.granularity;if(o.isConstant&&r$Z.isConstant(c)&&r$Z.isConstant(d)&&r$Z.isConstant(f)&&r$Z.isConstant(_)&&r$Z.isConstant(p)&&r$Z.isConstant(s)){var m,g=this._geometryOptions,x=o.getValue(o$H.MINIMUM_VALUE,g.positions);if(!e$2b(x)||x.length<2)return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));m=u&&(!e$2b(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof t$Q)?e$1C.VERTEX_FORMAT:r$W.VERTEX_FORMAT,g.vertexFormat=m,g.positions=x,g.width=e$2b(c)?c.getValue(o$H.MINIMUM_VALUE):void 0,g.hMax=e$2b(h)?h.getValue(o$H.MINIMUM_VALUE):void 0,g.followSurface=e$2b(d)?d.getValue(o$H.MINIMUM_VALUE):void 0,g.arcType=e$2b(f)?f.getValue(o$H.MINIMUM_VALUE):void 0,g.granularity=e$2b(_)?_.getValue(o$H.MINIMUM_VALUE):void 0;var v=this._groundGeometryOptions;v.positions=x,v.width=g.width,v.arcType=g.arcType,v.granularity=g.granularity,this._clampToGround=!!e$2b(p)&&p.getValue(o$H.MINIMUM_VALUE),!this._clampToGround&&e$2b(s)&&e$1$("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},u$q.prototype.createDynamicUpdater=function(e,t){if(o$1q.defined("primitives",e),o$1q.defined("groundPrimitives",t),!this._dynamic)throw new t$16("This instance does not represent dynamic geometry.");return new I$v(e,t,this)};var w$n={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function I$v(e,t,i){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=i,this._positions=[]}function q$o(e){if(e$2b(e._line))return e._line;var t=e._geometryUpdater._scene.id,i=O$l[t],n=e._primitives;!e$2b(i)||i.isDestroyed()?(i=new k$T,O$l[t]=i,n.add(i)):n.contains(i)||n.add(i);var r=i.add();return r.id=e._geometryUpdater._entity,e._line=r,r}I$v.prototype.update=function(e){var t=this._geometryUpdater,i=t._entity,n=i.polyline,r=n.positions,o=r$Z.getValueOrUndefined(r,e,this._positions);t._clampToGround=r$Z.getValueOrDefault(n._clampToGround,e,!1),t._groundGeometryOptions.positions=o,t._groundGeometryOptions.width=r$Z.getValueOrDefault(n._width,e,1),t._groundGeometryOptions.arcType=r$Z.getValueOrDefault(n._arcType,e,m$1f.GEODESIC),t._groundGeometryOptions.granularity=r$Z.getValueOrDefault(n._granularity,e,9999);var a=this._groundPrimitives;if(e$2b(this._groundPolylinePrimitive)&&(a.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!i.isShowing||!i.isAvailable(e)||!r$Z.getValueOrDefault(n._show,e,!0)||!e$2b(o)||o.length<2)return;var s,l=t.fillMaterialProperty;if(l instanceof t$Q)s=new e$1C;else{var u=r$C.getValue(e,l,this._material);s=new r$W({material:u,translucent:u.isTranslucent()}),this._material=u}return this._groundPolylinePrimitive=a.add(new g$11({geometryInstances:t.createFillGeometryInstance(e),appearance:s,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),r$Z.getValueOrUndefined(t.zIndex,e)),void(e$2b(this._line)&&(this._line.show=!1))}var c=q$o(this);if(i.isShowing&&i.isAvailable(e)&&r$Z.getValueOrDefault(n._show,e,!0))if(!e$2b(o)||o.length<2)c.show=!1;else{var h=r$Z.getValueOrUndefined(n._followSurface,e),d=m$1f.GEODESIC;e$2b(h)&&(d=h?m$1f.GEODESIC:m$1f.NONE),d=r$Z.getValueOrDefault(n._arcType,e,d);var f=t._scene.globe;d!==m$1f.NONE&&e$2b(f)&&(w$n.ellipsoid=f.ellipsoid,w$n.positions=o,w$n.granularity=r$Z.getValueOrUndefined(n._granularity,e),w$n.height=m$V.extractHeights(o,f.ellipsoid),w$n.hMax=r$Z.getValueOrUndefined(n._hMax,e),o=m$V.generateCartesianArc(w$n)),c.show=!0,c.positions=o.slice(),c.material=r$C.getValue(e,t.fillMaterialProperty,c.material),c.width=r$Z.getValueOrDefault(n._width,e,1),c.distanceDisplayCondition=r$Z.getValueOrUndefined(n._distanceDisplayCondition,e,c.distanceDisplayCondition)}else c.show=!1},I$v.prototype.getBoundingSphere=function(e){if(o$1q.defined("result",e),this._geometryUpdater.clampToGround){var t=this._groundPolylinePrimitive;if(e$2b(t)&&t.show&&t.ready){var i=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(e$2b(i)&&e$2b(i.boundingSphere))return i$1c.clone(i.boundingSphere,e),R$w.DONE}return e$2b(t)&&!t.ready?R$w.PENDING:R$w.DONE}var n=q$o(this);return n.show&&n.positions.length>0?(i$1c.fromPoints(n.positions,e),R$w.DONE):R$w.FAILED},I$v.prototype.isDestroyed=function(){return!1},I$v.prototype.destroy=function(){var e=this._geometryUpdater._scene.id,t=O$l[e];e$2b(t)&&(t.remove(this._line),0===t.length&&(this._primitives.removeAndDestroy(t),delete O$l[e])),e$2b(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),i$10(this)};var b$x=new e$1U,L$q=new r$Y,O$k=new r$Y;function v$q(e,t,i,n,r){var o;o=i instanceof t$Q?e$1C:r$W,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=o,this.materialProperty=i,this.updaters=new e$1N,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1N,this.material=void 0,this.updatersWithAttributes=new e$1N,this.attributes=new e$1N,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(v$q.prototype.onMaterialChanged,this),this.subscriptions=new e$1N,this.showsUpdated=new e$1N,this.zIndex=n,this._asynchronous=r}function m$n(e,t,i){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=u$_(i,!0)}v$q.prototype.onMaterialChanged=function(){this.invalidated=!0},v$q.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty;return i===t||i instanceof t$Q&&t instanceof t$Q||e$2b(t)&&t.equals(i)},v$q.prototype.add=function(e,t,i){var n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,i),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$Z.isConstant(t.distanceDisplayConditionProperty)){var r=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},v$q.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2b(i)&&(i(),this.subscriptions.remove(t)),!0}return!1},v$q.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.orderedGroundPrimitives,o=this.geometry.values;if(this.createPrimitive){if(o.length>0)e$2b(n)&&(e$2b(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),n=new g$11({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===r$W&&(this.material=r$C.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),r.add(n,this.zIndex),i=!1;else{e$2b(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;e$2b(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(e$2b(n)&&n.ready){n.show=!0,e$2b(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===r$W&&(this.material=r$C.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);var s=this.updatersWithAttributes.values,l=s.length;for(t=0;t<l;t++){var u=s[t],c=u.entity,h=this.geometry.get(u.id),d=this.attributes.get(h.id.id);if(e$2b(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d)),!u.fillMaterialProperty.isConstant){var f=u.fillMaterialProperty.color,p=r$Z.getValueOrDefault(f,e,e$1U.WHITE,b$x);e$1U.equals(d._lastColor,p)||(d._lastColor=e$1U.clone(p,d._lastColor),d.color=o$16.toValue(p,d.color))}var _=c.isShowing&&(u.hasConstantFill||u.isFilled(e));_!==(1===d.show[0])&&(d.show=e$1F.toValue(_,d.show));var m=u.distanceDisplayConditionProperty;if(!r$Z.isConstant(m)){var g=r$Z.getValueOrDefault(m,e,O$k,L$q);r$Y.equals(g,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=r$Y.clone(g,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=t$B.toValue(g,d.distanceDisplayCondition))}}this.updateShows(n)}else e$2b(n)&&!n.ready&&(i=!1);return i},v$q.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);e$2b(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$1F.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},v$q.prototype.contains=function(e){return this.updaters.contains(e.id)},v$q.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2b(n)||!e$2b(n.boundingSphere)||e$2b(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},v$q.prototype.destroy=function(){var e=this.primitive,t=this.orderedGroundPrimitives;e$2b(e)&&t.remove(e);var i=this.oldPrimitive;e$2b(i)&&t.remove(i),this.removeMaterialSubscription()},m$n.prototype.add=function(e,t){for(var i=this._items,n=i.length,r=t.createFillGeometryInstance(e),o=r$Z.getValueOrDefault(t.zIndex,0),a=0;a<n;++a){var s=i[a];if(s.isMaterial(t)&&s.zIndex===o)return void s.add(e,t,r)}var l=new v$q(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,o,this._asynchronous);l.add(e,t,r),i.push(l)},m$n.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},m$n.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},m$n.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},m$n.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var I$u=[];function A$t(e,t){for(var i=e._batches,n=i.length,r=0;r<n;r++)i[r].remove(t)}function E$r(e,t,i,n){if(i.isDynamic)e._dynamicBatch.add(t,i);else{if((i.clampToGround||i.entity.clampToS3M)&&i.fillEnabled){var r=i.classificationTypeProperty.getValue(t);return i.entity.clampToS3M&&(r=_0x3b5200.S3M_TILE),void e._groundBatches[r].add(t,i)}var o;i.fillEnabled&&(o=i.shadowsProperty.getValue(t));var a,s=0;e$2b(i.depthFailMaterialProperty)&&(s=i.depthFailMaterialProperty instanceof t$Q?1:2),e$2b(o)&&(a=o+s*W$W.NUMBER_OF_SHADOW_MODES),i.fillEnabled&&(i.fillMaterialProperty instanceof t$Q?e._colorBatches[a].add(t,i):e._materialBatches[a].add(t,i))}}function l$u(e,t,i,n){o$1q.defined("scene",e),o$1q.defined("entityCollection",t),n=u$_(n,e.groundPrimitives),i=u$_(i,e.primitives),this._scene=e,this._primitives=i,this._entityCollection=void 0,this._addedObjects=new e$1N,this._removedObjects=new e$1N,this._changedObjects=new e$1N;var r,o=W$W.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(3*o),this._materialBatches=new Array(3*o),r=0;r<o;++r)this._colorBatches[r]=new y$s(i,e$1C,void 0,!1,r),this._materialBatches[r]=new u$s(i,r$W,void 0,!1,r),this._colorBatches[r+o]=new y$s(i,e$1C,e$1C,!1,r),this._materialBatches[r+o]=new u$s(i,r$W,e$1C,!1,r),this._colorBatches[r+2*o]=new y$s(i,e$1C,r$W,!1,r),this._materialBatches[r+2*o]=new u$s(i,r$W,r$W,!1,r);this._dynamicBatch=new r$s(i,n);var a=_0x3b5200.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(a),r=0;r<a;++r)this._groundBatches[r]=new m$n(n,r);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new e$1N,this._updaters=new e$1N,this._entityCollection=t,t.collectionChanged.addEventListener(l$u.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,I$u)}l$u.prototype.update=function(e){o$1q.defined("time",e);var t,i,n,r,o=this._addedObjects,a=o.values,s=this._removedObjects,l=s.values,u=this._changedObjects,c=u.values;for(t=c.length-1;t>-1;t--)n=(i=c[t]).id,(r=this._updaters.get(n)).entity===i?(A$t(this,r),E$r(this,e,r)):(l.push(i),a.push(i));for(t=l.length-1;t>-1;t--)n=(i=l[t]).id,A$t(this,r=this._updaters.get(n)),r.destroy(),this._updaters.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n);for(t=a.length-1;t>-1;t--)n=(i=a[t]).id,r=new u$q(i,this._scene),this._updaters.set(n,r),E$r(this,e,r),this._subscriptions.set(n,r.geometryChanged.addEventListener(l$u._onGeometryChanged,this));o.removeAll(),s.removeAll(),u.removeAll();var h=!0,d=this._batches,f=d.length;for(t=0;t<f;t++)h=d[t].update(e)&&h;return h};var T$p=[],F$n=new i$1c;function u$p(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.scene",e.scene),o$1q.typeOf.object("options.dataSourceCollection",e.dataSourceCollection),d$14.initializeTerrainHeights(),g$11.initializeTerrainHeights();var t=e.scene,i=e.dataSourceCollection;this._eventHelper=new n$x,this._eventHelper.add(i.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(i.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(i.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=i,this._scene=t,this._visualizersCallback=u$_(e.visualizersCallback,u$p.defaultVisualizersCallback);var n=!1,r=new o$x,o=new o$x;i.length>0&&(t.primitives.add(r),t.groundPrimitives.add(o),n=!0),this._primitives=r,this._groundPrimitives=o;for(var a=0,s=i.length;a<s;a++)this._onDataSourceAdded(i,i.get(a));var l,u,c=new n$o;if(this._onDataSourceAdded(void 0,c),this._defaultDataSource=c,!n){var h=this,d=function(){t.primitives.add(r),t.groundPrimitives.add(o),l(),u(),h._removeDefaultDataSourceListener=void 0,h._removeDataSourceCollectionListener=void 0};l=c.entities.collectionChanged.addEventListener(d),u=i.dataSourceAdded.addEventListener(d)}this._removeDefaultDataSourceListener=l,this._removeDataSourceCollectionListener=u,this._ready=!1}l$u.prototype.getBoundingSphere=function(e,t){o$1q.defined("entity",e),o$1q.defined("result",t);for(var i=T$p,n=F$n,r=0,o=R$w.DONE,a=this._batches,s=a.length,l=this._updaters.get(e.id),u=0;u<s;u++){if((o=a[u].getBoundingSphere(l,n))===R$w.PENDING)return R$w.PENDING;o===R$w.DONE&&(i[r]=i$1c.clone(n,i[r]),r++)}return 0===r?R$w.FAILED:(i.length=r,i$1c.fromBoundingSpheres(i,t),R$w.DONE)},l$u.prototype.isDestroyed=function(){return!1},l$u.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$u.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var e,t=this._batches,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._subscriptions.values;for(i=n.length,e=0;e<i;e++)n[e]();return this._subscriptions.removeAll(),i$10(this)},l$u._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,n=e.entity,r=n.id;!e$2b(t.get(r))&&!e$2b(i.get(r))&&i.set(r,n)},l$u.prototype._onCollectionChanged=function(e,t,i){var n,r,o,a=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)r=(o=i[n]).id,a.remove(r)||(s.set(r,o),l.remove(r));for(n=t.length-1;n>-1;n--)r=(o=t[n]).id,s.remove(r)?l.set(r,o):a.set(r,o)},u$p.defaultVisualizersCallback=function(e,t,i){var n=i.entities;return[new g$I(t,n),new c$k(e,n,i._primitives,i._groundPrimitives),new l$w(t,n),new d$z(e,n),new l$E(e,n),new v$r(t,n),new w$p(e,n),new l$u(e,n,i._primitives,i._groundPrimitives)]},Object.defineProperties(u$p.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}}),u$p.prototype.isDestroyed=function(){return!1},u$p.prototype.destroy=function(){this._eventHelper.removeAll();for(var e=this._dataSourceCollection,t=0,i=e.length;t<i;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),e$2b(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),i$10(this)},u$p.prototype.update=function(e){if(o$1q.defined("time",e),!e$1E.initialized)return this._ready=!1,!1;var t,i,n,r,o=!0,a=this._dataSourceCollection,s=a.length;for(t=0;t<s;t++){var l=a.get(t);for(e$2b(l.update)&&(o=l.update(e)&&o),r=(n=l._visualizers).length,i=0;i<r;i++)o=n[i].update(e)&&o}for(r=(n=this._defaultDataSource._visualizers).length,i=0;i<r;i++)o=n[i].update(e)&&o;return this._ready=o,o},u$p.prototype._postRender=function(){for(var e=this._scene.frameState,t=this._dataSourceCollection,i=t.length,n=0;n<i;n++){var r=t.get(n),o=r.credit;e$2b(o)&&e.creditDisplay.addCredit(o);var a=r._resourceCredits;if(e$2b(a))for(var s=a.length,l=0;l<s;l++)e.creditDisplay.addCredit(a[l])}};var R$n=[],k$l=new i$1c;function h$s(e,t,i,n){if(!e$2b(e))throw new t$16("entity is required.");if(!e$2b(n))throw new t$16("result is required.");var r;return e$2b(t)&&t.show&&t.ready&&(e$2b(r=t.getGeometryInstanceAttributes(e))&&e$2b(r.boundingSphere))||e$2b(i)&&i.show&&i.ready&&(e$2b(r=i.getGeometryInstanceAttributes(e))&&e$2b(r.boundingSphere))?(i$1c.clone(r.boundingSphere,n),R$w.DONE):e$2b(t)&&!t.ready||e$2b(i)&&!i.ready?R$w.PENDING:R$w.FAILED}u$p.prototype.getBoundingSphere=function(e,t,i){if(o$1q.defined("entity",e),o$1q.typeOf.bool("allowPartial",t),o$1q.defined("result",i),!this._ready)return R$w.PENDING;var n,r,o=this._defaultDataSource;if(!o.entities.contains(e)){o=void 0;var a=this._dataSourceCollection;for(r=a.length,n=0;n<r;n++){var s=a.get(n);if(s.entities.contains(e)){o=s;break}}}if(!e$2b(o))return R$w.FAILED;var l=R$n,u=k$l,c=0,h=R$w.DONE,d=o._visualizers,f=d.length;for(n=0;n<f;n++){if(e$2b(d[n].getBoundingSphere)){if(h=d[n].getBoundingSphere(e,u),!t&&h===R$w.PENDING)return R$w.PENDING;h===R$w.DONE&&(l[c]=i$1c.clone(u,l[c]),c++)}}return 0===c?R$w.FAILED:(l.length=c,i$1c.fromBoundingSpheres(l,i),R$w.DONE)},u$p.prototype._onDataSourceAdded=function(e,t){var i=this._scene,n=this._primitives,r=this._groundPrimitives,o=n.add(new o$x),a=r.add(new r$t);t._primitives=o,t._groundPrimitives=a;var s=t.clustering;s._initialize(i),o.add(s),t._visualizers=this._visualizersCallback(i,s,t)},u$p.prototype._onDataSourceRemoved=function(e,t){var i=this._primitives,n=this._groundPrimitives,r=t._primitives,o=t._groundPrimitives,a=t.clustering;r.remove(a);for(var s=r._primitives,l=0;l<s.length;l++)if(e$2b(s[l]._instanceIds))for(var u=s[l]._instanceIds,c=0;c<u.length;c++)e$2b(u[c]._polygon)&&e$2b(u[c]._polygon.outlines)&&this._scene._primitives.remove(u[c]._polygon.outlines);var h=t._visualizers,d=h.length;for(c=0;c<d;c++)h[c].destroy();i.remove(r),n.remove(o),t._visualizers=void 0},u$p.prototype._onDataSourceMoved=function(e,t,i){var n=this._primitives,r=this._groundPrimitives,o=e._primitives,a=e._groundPrimitives;t===i+1?(n.raise(o),r.raise(a)):t===i-1?(n.lower(o),r.lower(a)):0===t?(n.lowerToBottom(o),r.lowerToBottom(a),n.raise(o),r.raise(a)):(n.raiseToTop(o),r.raiseToTop(a))};var p$j=new e$1U(1,1,1,1);function t$k(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=new e$1U(1,1,1,1),this._colorSubscription=void 0,this.color=e.color}Object.defineProperties(t$k.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color")}),t$k.prototype.getType=function(e){return"EmissionColor"},t$k.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,p$j,t.color),t},t$k.prototype.equals=function(e){return this===e||e instanceof t$k&&r$Z.equals(this._color,e._color)};var Z$l=new p$1e,F$m=new p$1e,j$n=new p$1e,s$k=new p$1d,P$o=new o$1p,J$i=new o$1p,q$n=new o$1p,x$p=new o$1p,W$p=new o$1p,K$j=new o$1p,_$n=new a$15,B$m=1.25;function ee$d(e,t,i,n,r,o,a){var s=e.scene.mode,l=r.getValue(o,e._lastCartesian);if(e$2b(l)){var u,c,h,d,f,p,_=!1,m=!1;if(s===C$13.SCENE3D){a$15.addSeconds(o,.001,_$n);var g=r.getValue(_$n,P$o);if(e$2b(g)||(a$15.addSeconds(o,-.001,_$n),g=r.getValue(_$n,P$o),m=!0),e$2b(g)){var x,v=m$17.computeFixedToIcrfMatrix(o,Z$l),y=m$17.computeFixedToIcrfMatrix(_$n,F$m);e$2b(v)&&e$2b(y)?x=p$1e.transpose(v,j$n):(x=m$17.computeTemeToPseudoFixedMatrix(o,j$n),v=p$1e.transpose(x,Z$l),y=m$17.computeTemeToPseudoFixedMatrix(_$n,F$m),p$1e.transpose(y,y));var $=p$1e.multiplyByVector(v,l,W$p),b=p$1e.multiplyByVector(y,g,K$j);o$1p.subtract($,b,x$p);var T=1e3*o$1p.magnitude(x$p),C=e$2a.GRAVITATIONALPARAMETER,S=-C/(T*T-2*C/o$1p.magnitude($));S<0||S>B$m*a.maximumRadius?(u=J$i,o$1p.normalize(l,u),o$1p.negate(u,u),h=o$1p.clone(o$1p.UNIT_Z,q$n),c=o$1p.cross(h,u,P$o),o$1p.magnitude(c)>e$2a.EPSILON7&&(o$1p.normalize(u,u),o$1p.normalize(c,c),h=o$1p.cross(u,c,q$n),o$1p.normalize(h,h),_=!0)):o$1p.equalsEpsilon(l,g,e$2a.EPSILON7)||(h=J$i,o$1p.normalize($,h),o$1p.normalize(b,b),c=o$1p.cross(h,b,q$n),m&&(c=o$1p.multiplyByScalar(c,-1,c)),o$1p.equalsEpsilon(c,o$1p.ZERO,e$2a.EPSILON7)||(u=o$1p.cross(c,h,P$o),p$1e.multiplyByVector(x,u,u),p$1e.multiplyByVector(x,c,c),p$1e.multiplyByVector(x,h,h),o$1p.normalize(u,u),o$1p.normalize(c,c),o$1p.normalize(h,h),_=!0))}}e$2b(e.boundingSphere)&&(l=e.boundingSphere.center),n&&(d=o$1p.clone(t.position,x$p),f=o$1p.clone(t.direction,W$p),p=o$1p.clone(t.up,K$j));var w=s$k;_?(w[0]=u.x,w[1]=u.y,w[2]=u.z,w[3]=0,w[4]=c.x,w[5]=c.y,w[6]=c.z,w[7]=0,w[8]=h.x,w[9]=h.y,w[10]=h.z,w[11]=0,w[12]=l.x,w[13]=l.y,w[14]=l.z,w[15]=0):m$17.eastNorthUpToFixedFrame(l,a,w),t._setTransform(w),n&&(o$1p.clone(d,t.position),o$1p.clone(f,t.direction),o$1p.clone(p,t.up),o$1p.cross(f,p,t.right))}if(i){var E=s===C$13.SCENE2D||o$1p.equals(e._offset3D,o$1p.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,E)}}function V$i(e,t,i){o$1q.defined("entity",e),o$1q.defined("scene",t),this.entity=e,this.scene=t,this.ellipsoid=u$_(i,t$13.WGS84),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new o$1p,this._defaultOffset3D=void 0,this._offset3D=new o$1p}Object.defineProperties(V$i,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=o$1p.clone(e,new o$1p)}}}),V$i.defaultOffset3D=new o$1p(-14e3,3500,3500);var C$r=new a$T,re$e=new o$1p;V$i.prototype.update=function(e,t){o$1q.defined("time",e);var i=this.scene,n=this.ellipsoid,r=i.mode;if(r!==C$13.MORPHING){var o=this.entity,a=o.position;if(e$2b(a)){var s=o!==this._lastEntity,l=r!==this._mode,u=i.camera,c=s||l,h=!0;if(s){var d=o.viewFrom,f=e$2b(d);if(!f&&e$2b(t)){C$r.pitch=-e$2a.PI_OVER_FOUR,C$r.range=0;var p=a.getValue(e,re$e);if(e$2b(p)){var _=2-1/Math.max(1,o$1p.magnitude(p)/n.maximumRadius);C$r.pitch*=_}u.viewBoundingSphere(t,C$r),this.boundingSphere=t,c=!1,h=!1}else(!f||!e$2b(d.getValue(e,this._offset3D)))&&o$1p.clone(V$i._defaultOffset3D,this._offset3D)}else!l&&this._mode!==C$13.SCENE2D&&o$1p.clone(u.position,this._offset3D);this._lastEntity=o,this._mode=r,ee$d(this,u,c,h,a,e,n)}}};var $$l={};!function(e){var t,i,n="File format is not recognized.",r="Error while reading zip file.",o="Error while reading file data.",a=524288,s="text/plain",l="message";try{t=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch{}function u(){var e=-1,t=this;t.append=function(i){var n,r=t.table;for(n=0;n<i.length;n++)e=e>>>8^r[255&(e^i[n])]},t.get=function(){return~e}}function c(e,t){var i,n;return i=new ArrayBuffer(e),n=new Uint8Array(i),t&&n.set(t,0),{buffer:i,array:n,view:new DataView(i)}}function h(){}function d(e){var t,i=this;i.size=0,i.init=function(n,r){var o=new Blob([e],{type:s});(t=new p(o)).init((function(){i.size=t.size,n()}),r)},i.readUint8Array=function(e,i,n,r){t.readUint8Array(e,i,n,r)}}function f(e){var t,i=this;i.size=0,i.init=function(n){for(var r=e.length;"="==e.charAt(r-1);)r--;t=e.indexOf(",")+1,i.size=Math.floor(.75*(r-t)),n()},i.readUint8Array=function(i,n,r){var o,a=c(n),s=4*Math.floor(i/3),l=4*Math.ceil((i+n)/3),u=window.atob(e.substring(s+t,l+t)),h=i-3*Math.floor(s/4);for(o=h;o<h+n;o++)a.array[o-h]=u.charCodeAt(o);r(a.array)}}function p(e){var t=this;t.size=0,t.init=function(t){this.size=e.size,t()},t.readUint8Array=function(t,i,n,r){var o=new FileReader;o.onload=function(e){n(new Uint8Array(e.target.result))},o.onerror=r,o.readAsArrayBuffer(function(e,t,i){return e.slice?e.slice(t,t+i):e.webkitSlice?e.webkitSlice(t,t+i):e.mozSlice?e.mozSlice(t,t+i):e.msSlice?e.msSlice(t,t+i):void 0}(e,t,i))}}function _(){}function m(e){var i,n=this;n.init=function(e){i=new Blob([],{type:s}),e()},n.writeUint8Array=function(e,n){i=new Blob([i,t?e:e.buffer],{type:s}),n()},n.getData=function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=n,r.readAsText(i,e)}}function g(e){var t=this,i="",n="";t.init=function(t){i+="data:"+(e||"")+";base64,",t()},t.writeUint8Array=function(e,t){var r,o=n.length,a=n;for(n="",r=0;r<3*Math.floor((o+e.length)/3)-o;r++)a+=String.fromCharCode(e[r]);for(;r<e.length;r++)n+=String.fromCharCode(e[r]);a.length>2?i+=window.btoa(a):n=a,t()},t.getData=function(e){e(i+window.btoa(n))}}function x(e){var i,n=this;n.init=function(t){i=new Blob([],{type:e}),t()},n.writeUint8Array=function(n,r){i=new Blob([i,t?n:n.buffer],{type:e}),r()},n.getData=function(e){e(i)}}function v(e,t,i,n,r,o,s,u,c,h){var d,f,p=0;function _(){e.removeEventListener(l,m,!1),u(f)}function m(e){var t=e.data,n=t.data;t.onappend&&(f+=n.length,i.writeUint8Array(n,(function(){o(!1,n),g()}),h)),t.onflush&&(n?(f+=n.length,i.writeUint8Array(n,(function(){o(!1,n),_()}),h)):_()),t.progress&&s&&s(d+t.current,r)}function g(){(d=p*a)<r?t.readUint8Array(n+d,Math.min(a,r-d),(function(t){e.postMessage({append:!0,data:t}),p++,s&&s(d,r),o(!0,t)}),c):e.postMessage({flush:!0})}f=0,e.addEventListener(l,m,!1),g()}function y(e,t,i,n,r,o,s,l,u,c){var h,d=0,f=0;!function p(){var _;(h=d*a)<r?t.readUint8Array(n+h,Math.min(a,r-h),(function(t){var a=e.append(t,(function(){s&&s(n+h,r)}));f+=a.length,o(!0,t),i.writeUint8Array(a,(function(){o(!1,a),d++,setTimeout(p,1)}),c),s&&s(h,r)}),u):(_=e.flush())?(f+=_.length,i.writeUint8Array(_,(function(){o(!1,_),l(f)}),c)):l(f)}()}function $(e,t,i,n,r,o,s,l,c){var h=0,d=new u;!function u(){var f=h*a;f<n?e.readUint8Array(i+f,Math.min(a,n-f),(function(e){r&&d.append(e),s&&s(f,n,e),t.writeUint8Array(e,(function(){h++,u()}),c)}),l):o(n,d.get())}()}function b(e){var t,i,n="",r=["Ç","ü","é","â","ä","à","å","ç","ê","ë","è","ï","î","ì","Ä","Å","É","æ","Æ","ô","ö","ò","û","ù","ÿ","Ö","Ü","ø","£","Ø","×","ƒ","á","í","ó","ú","ñ","Ñ","ª","º","¿","®","¬","½","¼","¡","«","»","_","_","_","¦","¦","Á","Â","À","©","¦","¦","+","+","¢","¥","+","+","-","-","+","-","+","ã","Ã","+","+","-","-","¦","-","+","¤","ð","Ð","Ê","Ë","È","i","Í","Î","Ï","+","+","_","_","¦","Ì","_","Ó","ß","Ô","Ò","õ","Õ","µ","þ","Þ","Ú","Û","Ù","ý","Ý","¯","´","­","±","_","¾","¶","§","÷","¸","°","¨","·","¹","³","²","_"," "];for(t=0;t<e.length;t++)n+=(i=255&e.charCodeAt(t))>127?r[i-128]:String.fromCharCode(i);return n}function T(e){return decodeURIComponent(escape(e))}function C(e){var t,i="";for(t=0;t<e.length;t++)i+=String.fromCharCode(e[t]);return i}function S(e,t,i,n,r){e.version=t.view.getUint16(i,!0),e.bitFlag=t.view.getUint16(i+2,!0),e.compressionMethod=t.view.getUint16(i+4,!0),e.lastModDateRaw=t.view.getUint32(i+6,!0),e.lastModDate=function(e){var t=(4294901760&e)>>16,i=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&i)>>11,(2016&i)>>5,2*(31&i),0)}catch{}}(e.lastModDateRaw),1!=(1&e.bitFlag)?((n||8!=(8&e.bitFlag))&&(e.crc32=t.view.getUint32(i+10,!0),e.compressedSize=t.view.getUint32(i+14,!0),e.uncompressedSize=t.view.getUint32(i+18,!0)),4294967295!==e.compressedSize&&4294967295!==e.uncompressedSize?(e.filenameLength=t.view.getUint16(i+22,!0),e.extraFieldLength=t.view.getUint16(i+24,!0)):r("File is using Zip64 (4gb+ file size).")):r("File contains encrypted entry.")}function w(t,i){function a(){}function s(e,n){t.readUint8Array(t.size-e,e,(function(t){var i=c(t.length,t).view;1347093766!=i.getUint32(0)?s(e+1,n):n(i)}),(function(){i(r)}))}return a.prototype.getData=function(r,a,s,l){var h,d=this;function f(e,t){h&&h.terminate(),h=null,e&&e(t)}function p(e,t){l&&!function(e){var t=c(4);return t.view.setUint32(0,e),d.crc32==t.view.getUint32(0)}(t)?_():r.getData((function(e){f(a,e)}))}function _(){f(i,o)}function m(){f(i,"Error while writing file data.")}t.readUint8Array(d.offset,30,(function(o){var a,f=c(o.length,o);1347093252==f.view.getUint32(0)?(S(d,f,4,!1,i),a=d.offset+30+d.filenameLength+d.extraFieldLength,r.init((function(){0===d.compressionMethod?$(t,r,a,d.compressedSize,l,p,s,_,m):h=function(t,i,n,r,o,a,s,l,c){var h,d=new u;function f(e,t){o&&!e&&d.append(t)}function p(e){a(e,d.get())}return e.zip.useWebWorkers?v(h=new Worker(e.zip.workerScriptsPath+"inflate.js"),t,i,n,r,f,s,p,l,c):y(new e.zip.Inflater,t,i,n,r,f,s,p,l,c),h}(t,r,a,d.compressedSize,l,p,s,_,m)}),m)):i(n)}),_)},{getEntries:function(e){t.size<22?i(n):s(22,(function(o){var s,l;s=o.getUint32(16,!0),l=o.getUint16(8,!0),t.readUint8Array(s,t.size-s,(function(t){var r,o,s,u,h=0,d=[],f=c(t.length,t);for(r=0;r<l;r++){if(o=new a,1347092738!=f.view.getUint32(h))return void i(n);S(o,f,h+6,!0,i),o.commentLength=f.view.getUint16(h+32,!0),o.directory=16==(16&f.view.getUint8(h+38)),o.offset=f.view.getUint32(h+42,!0),s=C(f.array.subarray(h+46,h+46+o.filenameLength)),o.filename=2048==(2048&o.bitFlag)?T(s):b(s),!o.directory&&"/"==o.filename.charAt(o.filename.length-1)&&(o.directory=!0),u=C(f.array.subarray(h+46+o.filenameLength+o.extraFieldLength,h+46+o.filenameLength+o.extraFieldLength+o.commentLength)),o.comment=2048==(2048&o.bitFlag)?T(u):b(u),d.push(o),h+=46+o.filenameLength+o.extraFieldLength+o.commentLength}e(d)}),(function(){i(r)}))}))},close:function(e){e&&e()}}}function E(e){return unescape(encodeURIComponent(e))}function P(e){var t,i=[];for(t=0;t<e.length;t++)i.push(e.charCodeAt(t));return i}function A(t,i,n){var r,a={},s=[],h=0;function d(e,t){r&&r.terminate(),r=null,e&&e(t)}function f(){d(i,"Error while writing zip file.")}function p(){d(i,o)}return{add:function(o,_,m,g,x){var b,T,C;function S(e,i){var n=c(16);h+=e||0,n.view.setUint32(0,1347094280),typeof i<"u"&&(b.view.setUint32(10,i,!0),n.view.setUint32(4,i,!0)),_&&(n.view.setUint32(8,e,!0),b.view.setUint32(14,e,!0),n.view.setUint32(12,_.size,!0),b.view.setUint32(18,_.size,!0)),t.writeUint8Array(n.array,(function(){h+=16,d(m)}),f)}function w(){x=x||{},o=o.trim(),x.directory&&"/"!=o.charAt(o.length-1)&&(o+="/"),a.hasOwnProperty(o)?i("File already exists."):(T=P(E(o)),s.push(o),function(e){var i;C=x.lastModDate||new Date,b=c(26),a[o]={headerArray:b.array,directory:x.directory,filename:T,offset:h,comment:P(E(x.comment||""))},b.view.setUint32(0,335546376),x.version&&b.view.setUint8(0,x.version),!n&&0!==x.level&&!x.directory&&b.view.setUint16(4,2048),b.view.setUint16(6,(C.getHours()<<6|C.getMinutes())<<5|C.getSeconds()/2,!0),b.view.setUint16(8,(C.getFullYear()-1980<<4|C.getMonth()+1)<<5|C.getDate(),!0),b.view.setUint16(22,T.length,!0),(i=c(30+T.length)).view.setUint32(0,1347093252),i.array.set(b.array,4),i.array.set(T,30),h+=i.array.length,t.writeUint8Array(i.array,e,f)}((function(){_?n||0===x.level?$(_,t,0,_.size,!0,S,g,p,f):r=function(t,i,n,r,o,a,s){var c,h=new u;function d(e,t){e&&h.append(t)}function f(e){r(e,h.get())}return e.zip.useWebWorkers?((c=new Worker(e.zip.workerScriptsPath+"deflate.js")).addEventListener(l,(function e(){c.removeEventListener(l,e,!1),v(c,t,i,0,t.size,d,o,f,a,s)}),!1),c.postMessage({init:!0,level:n})):y(new e.zip.Deflater,t,i,0,t.size,d,o,f,a,s),c}(_,t,x.level,S,g,p,f):S()})))}_?_.init(w,p):w()},close:function(e){var i,n,r,o=0,l=0;for(n=0;n<s.length;n++)o+=46+(r=a[s[n]]).filename.length+r.comment.length;for(i=c(o+22),n=0;n<s.length;n++)r=a[s[n]],i.view.setUint32(l,1347092738),i.view.setUint16(l+4,5120),i.array.set(r.headerArray,l+6),i.view.setUint16(l+32,r.comment.length,!0),r.directory&&i.view.setUint8(l+38,16),i.view.setUint32(l+42,r.offset,!0),i.array.set(r.filename,l+46),i.array.set(r.comment,l+46+r.filename.length),l+=46+r.filename.length+r.comment.length;i.view.setUint32(l,1347093766),i.view.setUint16(l+8,s.length,!0),i.view.setUint16(l+10,s.length,!0),i.view.setUint32(l+12,o,!0),i.view.setUint32(l+16,h,!0),t.writeUint8Array(i.array,(function(){d((function(){t.getData(e)}))}),f)}}}u.prototype.table=function(){var e,t,i,n=[];for(e=0;e<256;e++){for(i=e,t=0;t<8;t++)1&i?i=i>>>1^3988292384:i>>>=1;n[e]=i}return n}(),d.prototype=new h,d.prototype.constructor=d,f.prototype=new h,f.prototype.constructor=f,p.prototype=new h,p.prototype.constructor=p,_.prototype.getData=function(e){e(this.data)},m.prototype=new _,m.prototype.constructor=m,g.prototype=new _,g.prototype.constructor=g,x.prototype=new _,x.prototype.constructor=x,e.zip={Reader:h,Writer:_,BlobReader:p,Data64URIReader:f,TextReader:d,BlobWriter:x,Data64URIWriter:g,TextWriter:m,createReader:function(e,t,i){e.init((function(){t(w(e,i))}),i)},createWriter:function(e,t,i,n){e.init((function(){t(A(e,i,n))}),i)},useWebWorkers:!0},Object.defineProperties(e.zip,{workerScriptsPath:{get:function(){return typeof i>"u"&&(i=n$15("ThirdParty/Workers/")),i}}})}($$l);var he$8=$$l.zip,ie$9=32,ze$6="http://www.opengis.net/kml/2.2",A$s="http://www.google.com/kml/ext/2.2",Ge$5="http://www.w3.org/2000/xmlns/";function Y$g(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var We$6=/^data:image\/([^,;]+)/;function je$6(e,t){return function(i){e._files[t]=i}}function $$k(e){this._time=e}function ne$f(){this._ids={},this._styles={},this._count=0}function se$9(){this._ids={}}function oe$a(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).entities,i=u$_(e.kmz,!1);if(!e$2b(t))throw new t$16("entities is required.");var n=oe$a._createState(e),r=t.values.filter((function(e){return!e$2b(e.parent)})),o=n.kmlDoc,a=o.documentElement;a.setAttributeNS(Ge$5,"xmlns:gx",A$s);var s=o.createElement("Document");a.appendChild(s),ge$a(n,s,r),n.styleCache.save(s);var l=n.externalFileHandler;return l.promise.then((function(){var e=(new XMLSerializer).serializeToString(n.kmlDoc);return i?qe$2(e,l.files):{kml:e,externalFiles:l.files}}))}function qe$2(e,t){var i=o$1l.defer();return he$8.createWriter(new he$8.BlobWriter,(function(n){Ke$4(n,e).then((function(){var e=Object.keys(t);return me$c(n,e,t,0)})).then((function(){n.close((function(e){i.resolve({kmz:e})}))}))})),i.promise}function Ke$4(e,t){var i=o$1l.defer();return e.add("doc.kml",new he$8.TextReader(t),(function(){i.resolve()})),i.promise}function me$c(e,t,i,n){if(t.length!==n){var r=t[n],o=o$1l.defer();return e.add(r,new he$8.BlobReader(i[r]),(function(){o.resolve()})),o.promise.then((function(){return me$c(e,t,i,n+1)}))}}function ge$a(e,t,i){for(var n,r,o,a=e.kmlDoc,s=e.styleCache,l=e.valueGetter,u=e.idManager,c=i.length,h=0;h<c;++h){var d=i[h];n=[],Xe$4(e,d,r=[],o=[]),Ze$6(e,d.polyline,r,o),we$7(e,d.rectangle,r,o,n),we$7(e,d.polygon,r,o,n),rr$1(e,d,d.model,r,o);var f,p=d.availability;e$2b(p)&&(f=a.createElement("TimeSpan"),a$15.equals(p.start,o$H.MINIMUM_VALUE)||f.appendChild(l$t(a,"begin",a$15.toIso8601(p.start))),a$15.equals(p.stop,o$H.MAXIMUM_VALUE)||f.appendChild(l$t(a,"end",a$15.toIso8601(p.stop))));for(var _=0;_<n.length;++_){var m=n[_];m.setAttribute("id",u.get(d.id)),m.appendChild(l$t(a,"name",d.name)),m.appendChild(l$t(a,"visibility",d.show)),m.appendChild(l$t(a,"description",d.description)),e$2b(f)&&m.appendChild(f),t.appendChild(m)}var g=r.length;if(g>0){var x=a.createElement("Placemark");x.setAttribute("id",u.get(d.id));var v=d.name,y=d.label;if(e$2b(y)){var $=a.createElement("LabelStyle"),b=l.get(y.text);v=e$2b(b)&&b.length>0?b:v;var T=l.getColor(y.fillColor);e$2b(T)&&($.appendChild(l$t(a,"color",T)),$.appendChild(l$t(a,"colorMode","normal")));var C=l.get(y.scale);e$2b(C)&&$.appendChild(l$t(a,"scale",C)),o.push($)}x.appendChild(l$t(a,"name",v)),x.appendChild(l$t(a,"visibility",d.show)),x.appendChild(l$t(a,"description",d.description)),e$2b(f)&&x.appendChild(f),t.appendChild(x);var S=o.length;if(S>0){for(var w=a.createElement("Style"),E=0;E<S;++E)w.appendChild(o[E]);x.appendChild(l$t(a,"styleUrl",s.get(w)))}if(1===r.length)x.appendChild(r[0]);else if(r.length>1){for(var P=a.createElement("MultiGeometry"),A=0;A<g;++A)P.appendChild(r[A]);x.appendChild(P)}}var L=d._children;if(L.length>0){var M=a.createElement("Folder");M.setAttribute("id",u.get(d.id)),M.appendChild(l$t(a,"name",d.name)),M.appendChild(l$t(a,"visibility",d.show)),M.appendChild(l$t(a,"description",d.description)),t.appendChild(M),ge$a(e,M,L)}}}Y$g.prototype.texture=function(e){var t,i=this;if("string"==typeof e||e instanceof t$11){if(!(e=t$11.createIfNeeded(e)).isDataUri)return e.url;var n=e.url.match(We$6);t="texture_"+ ++this._count,e$2b(n)&&(t+="."+n[1]);var r=e.fetchBlob().then((function(e){i._files[t]=e}));return this._promises.push(r),t}if(e instanceof HTMLCanvasElement){var o=o$1l.defer();return this._promises.push(o.promise),t="texture_"+ ++this._count+".png",e.toBlob((function(e){i._files[t]=e,o.resolve()})),t}return""},Y$g.prototype.model=function(e,t){var i=this._modelCallback;if(!e$2b(i))throw new t$14("Encountered a model entity while exporting to KML, but no model callback was supplied.");var n={},r=i(e,t,n);for(var o in n)if(n.hasOwnProperty(o)){var a=o$1l(n[o]);this._promises.push(a),a.then(je$6(this,o))}return r},Object.defineProperties(Y$g.prototype,{promise:{get:function(){return o$1l.all(this._promises)}},files:{get:function(){return this._files}}}),$$k.prototype.get=function(e,t,i){var n;return e$2b(e)&&(n=e$2b(e.getValue)?e.getValue(this._time,i):e),u$_(n,t)},$$k.prototype.getColor=function(e,t){var i=this.get(e,t);if(e$2b(i))return H$v(i)},$$k.prototype.getMaterialType=function(e){if(e$2b(e))return e.getType(this._time)},ne$f.prototype.get=function(e){var t=this._ids,i=e.innerHTML;if(e$2b(t[i]))return t[i];var n="style-"+ ++this._count;return e.setAttribute("id",n),n="#"+n,t[i]=n,this._styles[i]=e,n},ne$f.prototype.save=function(e){var t=this._styles,i=e.childNodes[0];for(var n in t)t.hasOwnProperty(n)&&e.insertBefore(t[n],i)},se$9.prototype.get=function(e){if(!e$2b(e))return this.get(e$1Q());var t=this._ids;return e$2b(t[e])?e.toString()+"-"+ ++t[e]:(t[e]=0,e)},oe$a._createState=function(e){var t=e.entities,i=new ne$f,n=t.computeAvailability(),r=e$2b(e.time)?e.time:n.start,o=u$_(e.defaultAvailability,n),a=u$_(e.sampleDuration,60);o.start===o$H.MINIMUM_VALUE?o.stop===o$H.MAXIMUM_VALUE?o=new d$W:a$15.addSeconds(o.stop,-10*a,o.start):o.stop===o$H.MAXIMUM_VALUE&&a$15.addSeconds(o.start,10*a,o.stop);var s=new Y$g(e.modelCallback);return{kmlDoc:document.implementation.createDocument(ze$6,"kml"),ellipsoid:u$_(e.ellipsoid,t$13.WGS84),idManager:new se$9,styleCache:i,externalFileHandler:s,time:r,valueGetter:new $$k(r),sampleDuration:a,defaultAvailability:new c$z([o])}};var T$o=new o$1p,_$m=new a$18,R$m=new a$15;function Xe$4(e,t,i,n){var r=e.kmlDoc,o=e.ellipsoid,a=e.valueGetter,s=u$_(t.billboard,t.point);if(e$2b(s)||e$2b(t.path)){var l=t.position;if(!l.isConstant)return void Ce$6(e,t,s,i,n);a.get(l,void 0,T$o);var u=l$t(r,"coordinates",F$l(T$o,o)),c=r.createElement("Point"),h=r.createElement("altitudeMode");h.appendChild(B$l(e,s.heightReference)),c.appendChild(h),c.appendChild(u),i.push(c);var d=s instanceof n$T?De$a(e,s):Ee$b(e,s);n.push(d)}}function Ce$6(e,t,i,n,r){var o,a=e.kmlDoc,s=e.ellipsoid,l=e.valueGetter,u=t.position,c=!0;u instanceof t$q?(o=u.intervals,c=!1):o=u$_(t.availability,e.defaultAvailability);var h,d,f,p=i instanceof t$J,_=[];for(h=0;h<o.length;++h){var m=o.get(h),g=c?u:m.data,x=a.createElement("altitudeMode");g instanceof i$s?(g=g._value,x.appendChild(B$l(e,k$P.CLAMP_TO_GROUND))):e$2b(i)?x.appendChild(B$l(e,i.heightReference)):x.appendChild(B$l(e,k$P.NONE));var v=[],y=[];if(g.isConstant){l.get(g,void 0,T$o);var $=l$t(a,"coordinates",F$l(T$o,s));v.push(a$15.toIso8601(m.start)),y.push($),v.push(a$15.toIso8601(m.stop)),y.push($)}else if(g instanceof o$y)for(f=g._property._times,d=0;d<f.length;++d)v.push(a$15.toIso8601(f[d])),g.getValueInReferenceFrame(f[d],Re$k.FIXED,T$o),y.push(F$l(T$o,s));else if(g instanceof g$x){f=g._times;var b=g._values;for(d=0;d<f.length;++d)v.push(a$15.toIso8601(f[d])),o$1p.fromArray(b,3*d,T$o),y.push(F$l(T$o,s))}else{var T=e.sampleDuration;m.start.clone(R$m),m.isStartIncluded||a$15.addSeconds(R$m,T,R$m);for(var C=m.stop;a$15.lessThan(R$m,C);)g.getValue(R$m,T$o),v.push(a$15.toIso8601(R$m)),y.push(F$l(T$o,s)),a$15.addSeconds(R$m,T,R$m);m.isStopIncluded&&a$15.equals(R$m,C)&&(g.getValue(R$m,T$o),v.push(a$15.toIso8601(R$m)),y.push(F$l(T$o,s)))}var S=a.createElementNS(A$s,"Track");S.appendChild(x);for(var w=0;w<v.length;++w){var E=l$t(a,"when",v[w]),P=l$t(a,"coord",y[w],A$s);S.appendChild(E),S.appendChild(P)}p&&S.appendChild(_e$7(e,i)),_.push(S)}if(1===_.length)n.push(_[0]);else if(_.length>1){var A=a.createElementNS(A$s,"MultiTrack");for(h=0;h<_.length;++h)A.appendChild(_[h]);n.push(A)}if(e$2b(i)&&!p){var L=i instanceof n$T?De$a(e,i):Ee$b(e,i);r.push(L)}var M=t.path;if(e$2b(M)){var R=l.get(M.width),O=M.material;if(e$2b(O)||e$2b(R)){var I=a.createElement("LineStyle");e$2b(R)&&I.appendChild(l$t(a,"width",R)),de$9(e,O,I),r.push(I)}}}function Ee$b(e,t){var i=e.kmlDoc,n=e.valueGetter,r=i.createElement("IconStyle"),o=n.getColor(t.color);e$2b(o)&&(r.appendChild(l$t(i,"color",o)),r.appendChild(l$t(i,"colorMode","normal")));var a=n.get(t.pixelSize);return e$2b(a)&&r.appendChild(l$t(i,"scale",a/ie$9)),r}function De$a(e,t){var i=e.kmlDoc,n=e.valueGetter,r=e.externalFileHandler,o=i.createElement("IconStyle"),a=n.get(t.image);if(e$2b(a)){a=r.texture(a);var s=i.createElement("Icon");s.appendChild(l$t(i,"href",a));var l=n.get(t.imageSubRegion);e$2b(l)&&(s.appendChild(l$t(i,"x",l.x,A$s)),s.appendChild(l$t(i,"y",l.y,A$s)),s.appendChild(l$t(i,"w",l.width,A$s)),s.appendChild(l$t(i,"h",l.height,A$s))),o.appendChild(s)}var u=n.getColor(t.color);e$2b(u)&&(o.appendChild(l$t(i,"color",u)),o.appendChild(l$t(i,"colorMode","normal")));var c=n.get(t.scale);e$2b(c)&&o.appendChild(l$t(i,"scale",c));var h=n.get(t.pixelOffset);if(e$2b(h)){c=u$_(c,1),o$1o.divideByScalar(h,c,h);var d=n.get(t.width,ie$9),f=n.get(t.height,ie$9),p=n.get(t.horizontalOrigin,j$T.CENTER);p===j$T.CENTER?h.x-=.5*d:p===j$T.RIGHT&&(h.x-=d);var _=n.get(t.verticalOrigin,S$O.CENTER);_===S$O.TOP?h.y+=f:_===S$O.CENTER&&(h.y+=.5*f);var m=i.createElement("hotSpot");m.setAttribute("x",-h.x),m.setAttribute("y",h.y),m.setAttribute("xunits","pixels"),m.setAttribute("yunits","pixels"),o.appendChild(m)}var g=n.get(t.rotation),x=n.get(t.alignedAxis);return e$2b(g)&&o$1p.equals(o$1p.UNIT_Z,x)&&(0===(g=e$2a.toDegrees(-g))&&(g=360),o.appendChild(l$t(i,"heading",g))),o}function Ze$6(e,t,i,n){var r=e.kmlDoc,o=e.ellipsoid,a=e.valueGetter;if(e$2b(t)){var s,l=r.createElement("LineString"),u=r.createElement("altitudeMode"),c=a.get(t.clampToGround,!1);c?(l.appendChild(l$t(r,"tessellate",!0)),s=r.createTextNode("clampToGround")):s=r.createTextNode("absolute"),u.appendChild(s),l.appendChild(u);var h=t.positions,d=l$t(r,"coordinates",F$l(a.get(h),o));l.appendChild(d);var f=a.get(t.zIndex);c&&e$2b(f)&&l.appendChild(l$t(r,"drawOrder",f,A$s)),i.push(l);var p=r.createElement("LineStyle"),_=a.get(t.width);e$2b(_)&&p.appendChild(l$t(r,"width",_)),de$9(e,t.material,p),n.push(p)}}function Je$3(e,t,i){var n,r=e.kmlDoc,o=e.valueGetter,a=o.get(t.height,0);i>0&&(a=i);for(var s=t.coordinates,l=o.get(s),u=[],c=[h$18.northeast,h$18.southeast,h$18.southwest,h$18.northwest],h=0;h<4;++h)c[h](l,_$m),u.push(e$2a.toDegrees(_$m.longitude)+","+e$2a.toDegrees(_$m.latitude)+","+a);n=l$t(r,"coordinates",u.join(" "));var d=r.createElement("outerBoundaryIs"),f=r.createElement("LinearRing");return f.appendChild(n),d.appendChild(f),[d]}function Me$a(e,t,i,n){for(var r=e.kmlDoc,o=e.ellipsoid,a=[],s=t.length,l=0;l<s;++l)a$18.fromCartesian(t[l],o,_$m),a.push(e$2a.toDegrees(_$m.longitude)+","+e$2a.toDegrees(_$m.latitude)+","+(n?_$m.height:i));var u=l$t(r,"coordinates",a.join(" ")),c=r.createElement("LinearRing");return c.appendChild(u),c}function Qe$4(e,t,i){var n=e.kmlDoc,r=e.valueGetter,o=r.get(t.height,0),a=r.get(t.perPositionHeight,!1);!a&&i>0&&(o=i);var s=[],l=t.hierarchy,u=r.get(l),c=Array.isArray(u)?u:u.positions,h=n.createElement("outerBoundaryIs");h.appendChild(Me$a(e,c,o,a)),s.push(h);var d=u.holes;if(e$2b(d))for(var f=d.length,p=0;p<f;++p){var _=n.createElement("innerBoundaryIs");_.appendChild(Me$a(e,d[p].positions,o,a)),s.push(_)}return s}function we$7(e,t,i,n,r){var o=e.kmlDoc,a=e.valueGetter;if(e$2b(t)){var s=t instanceof n$L;if(s&&"Image"===a.getMaterialType(t.material))return void Ve$8(e,t,r);var l=o.createElement("Polygon"),u=a.get(t.extrudedHeight,0);u>0&&l.appendChild(l$t(o,"extrude",!0));for(var c=s?Je$3(e,t,u):Qe$4(e,t,u),h=c.length,d=0;d<h;++d)l.appendChild(c[d]);var f=o.createElement("altitudeMode");f.appendChild(B$l(e,t.heightReference)),l.appendChild(f),i.push(l);var p=o.createElement("PolyStyle"),_=a.get(t.fill,!1);_&&p.appendChild(l$t(o,"fill",_)),de$9(e,t.material,p);var m=a.get(t.outline,!1);if(m){p.appendChild(l$t(o,"outline",m));var g=o.createElement("LineStyle"),x=a.get(t.outlineWidth,1);g.appendChild(l$t(o,"width",x));var v=a.getColor(t.outlineColor,e$1U.BLACK);g.appendChild(l$t(o,"color",v)),g.appendChild(l$t(o,"colorMode","normal")),n.push(g)}n.push(p)}}function Ve$8(e,t,i){var n=e.kmlDoc,r=e.valueGetter,o=e.externalFileHandler,a=n.createElement("GroundOverlay"),s=n.createElement("altitudeMode");s.appendChild(B$l(e,t.heightReference)),a.appendChild(s);var l=r.get(t.height);e$2b(l)&&a.appendChild(l$t(n,"altitude",l));var u=r.get(t.coordinates),c=n.createElement("LatLonBox");c.appendChild(l$t(n,"north",e$2a.toDegrees(u.north))),c.appendChild(l$t(n,"south",e$2a.toDegrees(u.south))),c.appendChild(l$t(n,"east",e$2a.toDegrees(u.east))),c.appendChild(l$t(n,"west",e$2a.toDegrees(u.west))),a.appendChild(c);var h=r.get(t.material),d=o.texture(h.image),f=n.createElement("Icon");f.appendChild(l$t(n,"href",d)),a.appendChild(f),e$2b(h.color)&&a.appendChild(l$t(n,"color",H$v(h.color))),i.push(a)}var Ye$4=new o$1p;function _e$7(e,t){var i=e.kmlDoc,n=e.valueGetter,r=e.externalFileHandler,o=i.createElement("Model"),a=n.get(t.scale);if(e$2b(a)){a instanceof o$1p||(a=o$1p.fromElements(a,a,a,Ye$4));var s=i.createElement("Scale");s.appendChild(l$t(i,"x",a.x)),s.appendChild(l$t(i,"y",a.y)),s.appendChild(l$t(i,"z",a.z)),o.appendChild(s)}var l=i.createElement("Link"),u=r.model(t,e.time);return l.appendChild(l$t(i,"href",u)),o.appendChild(l),o}var xe$8=new p$1e,$e$3=new p$1d,le$f=new p$1d;function er$1(e,t){var i=m$17.eastNorthUpToFixedFrame(e,void 0,le$f),n=p$1e.fromQuaternion(t,xe$8),r=p$1d.fromRotationTranslation(n,o$1p.ZERO,$e$3),o=p$1d.inverse(i,le$f),a=p$1d.multiply(o,r,le$f),s=p$1d.getMatrix3(a,xe$8);return i$15.fromQuaternion(n$13.fromRotationMatrix(s))}function rr$1(e,t,i,n,r){var o=e.kmlDoc,a=e.ellipsoid,s=e.valueGetter;if(e$2b(i)){var l=t.position;if(!l.isConstant)return void Ce$6(e,t,i,n,r);var u=_e$7(e,i),c=o.createElement("altitudeMode");c.appendChild(B$l(e,i.heightReference)),u.appendChild(c),s.get(l,void 0,T$o),a$18.fromCartesian(T$o,a,_$m);var h=o.createElement("Location");h.appendChild(l$t(o,"longitude",e$2a.toDegrees(_$m.longitude))),h.appendChild(l$t(o,"latitude",e$2a.toDegrees(_$m.latitude))),h.appendChild(l$t(o,"altitude",_$m.height)),u.appendChild(h);var d=n$13.IDENTITY;e$2b(t.orientation)&&(d=t.orientation.getValue(e.time));var f=er$1(t.position.getValue(e.time),d),p=o.createElement("Orientation");p.appendChild(l$t(o,"heading",e$2a.toDegrees(f.heading))),p.appendChild(l$t(o,"tilt",e$2a.toDegrees(f.pitch))),p.appendChild(l$t(o,"roll",e$2a.toDegrees(f.roll))),u.appendChild(p),n.push(u)}}function de$9(e,t,i){var n=e.kmlDoc,r=e.valueGetter;if(e$2b(t)){var o=r.get(t);if(e$2b(o)){var a;switch(r.getMaterialType(t)){case"Image":a=H$v(e$1U.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":a=H$v(o.color);break;case"PolylineOutline":a=H$v(o.color);var s=H$v(o.outlineColor),l=o.outlineWidth;i.appendChild(l$t(n,"outerColor",s,A$s)),i.appendChild(l$t(n,"outerWidth",l,A$s));break;case"Stripe":a=H$v(o.oddColor)}e$2b(a)&&(i.appendChild(l$t(n,"color",a)),i.appendChild(l$t(n,"colorMode","normal")))}}}function B$l(e,t){var i,n=e.kmlDoc;switch(e.valueGetter.get(t,k$P.NONE)){case k$P.NONE:i=n.createTextNode("absolute");break;case k$P.CLAMP_TO_GROUND:i=n.createTextNode("clampToGround");break;case k$P.RELATIVE_TO_GROUND:i=n.createTextNode("relativeToGround")}return i}function F$l(e,t){Array.isArray(e)||(e=[e]);for(var i=e.length,n=[],r=0;r<i;++r)a$18.fromCartesian(e[r],t,_$m),n.push(e$2a.toDegrees(_$m.longitude)+","+e$2a.toDegrees(_$m.latitude)+","+_$m.height);return n.join(" ")}function l$t(e,t,i,n){"boolean"==typeof(i=u$_(i,""))&&(i=i?"1":"0");var r=e$2b(n)?e.createElementNS(n,t):e.createElement(t),o="string"===i&&-1!==i.indexOf("<")?e.createCDATASection(i):e.createTextNode(i);return r.appendChild(o),r}function H$v(e){for(var t="",i=e.toBytes(),n=3;n>=0;--n)t+=i[n]<16?"0"+i[n].toString(16):i[n].toString(16);return t}var ce$d={};!function(e,t){!function(e){var t=function(e){return e},i=function(e){if(null==e)return t;var i,n,r=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(i=n=0);var l=2,u=e.length,c=new Array(u);for(c[0]=(i+=e[0])*r+a,c[1]=(n+=e[1])*o+s;l<u;)c[l]=e[l],++l;return c}},n=function(e){var t,n=i(e.transform),r=1/0,o=r,a=-r,s=-r;function l(e){(e=n(e))[0]<r&&(r=e[0]),e[0]>a&&(a=e[0]),e[1]<o&&(o=e[1]),e[1]>s&&(s=e[1])}function u(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(u);break;case"Point":l(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(l)}}for(t in e.arcs.forEach((function(e){for(var t,i=-1,l=e.length;++i<l;)(t=n(e[i],i))[0]<r&&(r=t[0]),t[0]>a&&(a=t[0]),t[1]<o&&(o=t[1]),t[1]>s&&(s=t[1])})),e.objects)u(e.objects[t]);return[r,o,a,s]},r=function(e,t){for(var i,n=e.length,r=n-t;r<--n;)i=e[r],e[r++]=e[n],e[n]=i},o=function(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return a(e,t)}))}:a(e,t)};function a(e,t){var i=t.id,n=t.bbox,r=null==t.properties?{}:t.properties,o=s(e,t);return null==i&&null==n?{type:"Feature",properties:r,geometry:o}:null==n?{type:"Feature",id:i,properties:r,geometry:o}:{type:"Feature",id:i,bbox:n,properties:r,geometry:o}}function s(e,t){var n=i(e.transform),o=e.arcs;function a(e,t){t.length&&t.pop();for(var i=o[e<0?~e:e],a=0,s=i.length;a<s;++a)t.push(n(i[a],a));e<0&&r(t,s)}function s(e){return n(e)}function l(e){for(var t=[],i=0,n=e.length;i<n;++i)a(e[i],t);return t.length<2&&t.push(t[0]),t}function u(e){for(var t=l(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(u)}function h(e){var t,i=e.type;switch(i){case"GeometryCollection":return{type:i,geometries:e.geometries.map(h)};case"Point":t=s(e.coordinates);break;case"MultiPoint":t=e.coordinates.map(s);break;case"LineString":t=l(e.arcs);break;case"MultiLineString":t=e.arcs.map(l);break;case"Polygon":t=c(e.arcs);break;case"MultiPolygon":t=e.arcs.map(c);break;default:return null}return{type:i,coordinates:t}}return h(t)}var l=function(e,t){var i={},n={},r={},o=[],a=-1;function s(t){var i,n=e.arcs[t<0?~t:t],r=n[0];return e.transform?(i=[0,0],n.forEach((function(e){i[0]+=e[0],i[1]+=e[1]}))):i=n[n.length-1],t<0?[i,r]:[r,i]}function l(e,t){for(var n in e){var r=e[n];delete t[r.start],delete r.start,delete r.end,r.forEach((function(e){i[e<0?~e:e]=1})),o.push(r)}}return t.forEach((function(i,n){var r,o=e.arcs[i<0?~i:i];o.length<3&&!o[1][0]&&!o[1][1]&&(r=t[++a],t[a]=i,t[n]=r)})),t.forEach((function(e){var t,i,o=s(e),a=o[0],l=o[1];if(t=r[a])if(delete r[t.end],t.push(e),t.end=l,i=n[l]){delete n[i.start];var u=i===t?t:t.concat(i);n[u.start=t.start]=r[u.end=i.end]=u}else n[t.start]=r[t.end]=t;else if(t=n[l])if(delete n[t.start],t.unshift(e),t.start=a,i=r[a]){delete r[i.end];var c=i===t?t:i.concat(t);n[c.start=i.start]=r[c.end=t.end]=c}else n[t.start]=r[t.end]=t;else n[(t=[e]).start=a]=r[t.end=l]=t})),l(r,n),l(n,r),t.forEach((function(e){i[e<0?~e:e]||o.push([e])})),o},u=function(e){return s(e,c.apply(this,arguments))};function c(e,t,i){var n,r,o;if(arguments.length>1)n=h(e,t,i);else for(r=0,n=new Array(o=e.arcs.length);r<o;++r)n[r]=r;return{type:"MultiLineString",arcs:l(e,n)}}function h(e,t,i){var n,r=[],o=[];function a(e){var t=e<0?~e:e;(o[t]||(o[t]=[])).push({i:e,g:n})}function s(e){e.forEach(a)}function l(e){e.forEach(s)}function u(e){e.forEach(l)}function c(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(c);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":u(e.arcs)}}return c(t),o.forEach(null==i?function(e){r.push(e[0].i)}:function(e){i(e[0].g,e[e.length-1].g)&&r.push(e[0].i)}),r}function d(e){for(var t,i=-1,n=e.length,r=e[n-1],o=0;++i<n;)t=r,r=e[i],o+=t[0]*r[1]-t[1]*r[0];return Math.abs(o)}var f=function(e){return s(e,p.apply(this,arguments))};function p(e,t){var i={},n=[],r=[];function o(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(o);break;case"Polygon":a(e.arcs);break;case"MultiPolygon":e.arcs.forEach(a)}}function a(e){e.forEach((function(t){t.forEach((function(t){(i[t=t<0?~t:t]||(i[t]=[])).push(e)}))})),n.push(e)}function u(t){return d(s(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach(o),n.forEach((function(e){if(!e._){var t=[],n=[e];for(e._=1,r.push(t);e=n.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].forEach((function(e){e._||(e._=1,n.push(e))}))}))}))}})),n.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:r.map((function(t){var n,r=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].length<2&&r.push(e)}))}))})),(n=(r=l(e,r)).length)>1)for(var o,a,s=1,c=u(r[0]);s<n;++s)(o=u(r[s]))>c&&(a=r[0],r[0]=r[s],r[s]=a,c=o);return r}))}}var _=function(e,t){for(var i=0,n=e.length;i<n;){var r=i+n>>>1;e[r]<t?i=r+1:n=r}return i},m=function(e){var t={},i=e.map((function(){return[]}));function n(e,i){e.forEach((function(e){e<0&&(e=~e);var n=t[e];n?n.push(i):t[e]=[i]}))}function r(e,t){e.forEach((function(e){n(e,t)}))}function o(e,t){"GeometryCollection"===e.type?e.geometries.forEach((function(e){o(e,t)})):e.type in a&&a[e.type](e.arcs,t)}var a={LineString:n,MultiLineString:r,Polygon:r,MultiPolygon:function(e,t){e.forEach((function(e){r(e,t)}))}};for(var s in e.forEach(o),t)for(var l=t[s],u=l.length,c=0;c<u;++c)for(var h=c+1;h<u;++h){var d,f=l[c],p=l[h];(d=i[f])[s=_(d,p)]!==p&&d.splice(s,0,p),(d=i[p])[s=_(d,f)]!==f&&d.splice(s,0,f)}return i},g=function(e){if(null==e)return t;var i,n,r=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(i=n=0);var l=2,u=e.length,c=new Array(u),h=Math.round((e[0]-a)/r),d=Math.round((e[1]-s)/o);for(c[0]=h-i,i=h,c[1]=d-n,n=d;l<u;)c[l]=e[l],++l;return c}},x=function(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)l=e.bbox;else{if(!((i=Math.floor(t))>=2))throw new Error("n must be ≥2");var i,r=(l=e.bbox||n(e))[0],o=l[1],a=l[2],s=l[3];t={scale:[a-r?(a-r)/(i-1):1,s-o?(s-o)/(i-1):1],translate:[r,o]}}var l,u,c=g(t),h=e.objects,d={};function f(e){return c(e)}function p(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(p)};break;case"Point":t={type:"Point",coordinates:f(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(f)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function _(e){var t,i=0,n=1,r=e.length,o=new Array(r);for(o[0]=c(e[0],0);++i<r;)((t=c(e[i],i))[0]||t[1])&&(o[n++]=t);return 1===n&&(o[n++]=[0,0]),o.length=n,o}for(u in h)d[u]=p(h[u]);return{type:"Topology",bbox:l,transform:t,objects:d,arcs:e.arcs.map(_)}},v=function(e){var t=1/0,i=1/0,n=-1/0,r=-1/0;function o(e){null!=e&&a.hasOwnProperty(e.type)&&a[e.type](e)}var a={GeometryCollection:function(e){e.geometries.forEach(o)},Point:function(e){s(e.coordinates)},MultiPoint:function(e){e.coordinates.forEach(s)},LineString:function(e){l(e.arcs)},MultiLineString:function(e){e.arcs.forEach(l)},Polygon:function(e){e.arcs.forEach(l)},MultiPolygon:function(e){e.arcs.forEach(u)}};function s(e){var o=e[0],a=e[1];o<t&&(t=o),o>n&&(n=o),a<i&&(i=a),a>r&&(r=a)}function l(e){e.forEach(s)}function u(e){e.forEach(l)}for(var c in e)o(e[c]);return n>=t&&r>=i?[t,i,n,r]:void 0},y=function(e,t,i,n,r){3===arguments.length&&(n=Array,r=null);for(var o=new n(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),a=e-1,s=0;s<e;++s)o[s]=r;function l(n){for(var s=t(n)&a,l=o[s],u=0;l!=r;){if(i(l,n))return!0;if(++u>=e)throw new Error("full hashset");l=o[s=s+1&a]}return o[s]=n,!0}function u(n){for(var s=t(n)&a,l=o[s],u=0;l!=r;){if(i(l,n))return!0;if(++u>=e)break;l=o[s=s+1&a]}return!1}function c(){for(var e=[],t=0,i=o.length;t<i;++t){var n=o[t];n!=r&&e.push(n)}return e}return{add:l,has:u,values:c}},$=function(e,t,i,n,r,o){3===arguments.length&&(n=o=Array,r=null);for(var a=new n(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),s=new o(e),l=e-1,u=0;u<e;++u)a[u]=r;function c(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u]=o;if(++h>=e)throw new Error("full hashmap");c=a[u=u+1&l]}return a[u]=n,s[u]=o,o}function h(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u];if(++h>=e)throw new Error("full hashmap");c=a[u=u+1&l]}return a[u]=n,s[u]=o,o}function d(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u];if(++h>=e)break;c=a[u=u+1&l]}return o}function f(){for(var e=[],t=0,i=a.length;t<i;++t){var n=a[t];n!=r&&e.push(n)}return e}return{set:c,maybeSet:h,get:d,keys:f}},b=function(e,t){return e[0]===t[0]&&e[1]===t[1]},T=new ArrayBuffer(16),C=new Uint32Array(T),S=function(e){var t=C[0]^C[1];return 2147483647&(t=t<<5^t>>7^C[2]^C[3])},w=function(e){var t,i,n,r,o=e.coordinates,a=e.lines,s=e.rings,l=C(),u=new Int32Array(o.length),c=new Int32Array(o.length),h=new Int32Array(o.length),d=new Int8Array(o.length),f=0;for(t=0,i=o.length;t<i;++t)u[t]=c[t]=h[t]=-1;for(t=0,i=a.length;t<i;++t){var p=a[t],_=p[0],m=p[1];for(n=l[_],r=l[++_],++f,d[n]=1;++_<=m;)T(t,n,n=r,r=l[_]);++f,d[r]=1}for(t=0,i=o.length;t<i;++t)u[t]=-1;for(t=0,i=s.length;t<i;++t){var g=s[t],x=g[0]+1,v=g[1];for(T(t,l[v-1],n=l[x-1],r=l[x]);++x<=v;)T(t,n,n=r,r=l[x])}function T(e,t,i,n){if(u[i]!==e){u[i]=e;var r=c[i];if(r>=0){var o=h[i];(r!==t||o!==n)&&(r!==n||o!==t)&&(++f,d[i]=1)}else c[i]=t,h[i]=n}}function C(){for(var e=$(1.4*o.length,w,E,Int32Array,-1,Int32Array),t=new Int32Array(o.length),i=0,n=o.length;i<n;++i)t[i]=e.maybeSet(i,i);return t}function w(e){return S(o[e])}function E(e,t){return b(o[e],o[t])}u=c=h=null;var P,A=y(1.4*f,S,b);for(t=0,i=o.length;t<i;++t)d[P=l[t]]&&A.add(o[P]);return A},E=function(e){var t,i,n,r=w(e),o=e.coordinates,a=e.lines,s=e.rings;for(i=0,n=a.length;i<n;++i)for(var l=a[i],u=l[0],c=l[1];++u<c;)r.has(o[u])&&(t={0:u,1:l[1]},l[1]=u,l=l.next=t);for(i=0,n=s.length;i<n;++i)for(var h=s[i],d=h[0],f=d,p=h[1],_=r.has(o[d]);++f<p;)r.has(o[f])&&(_?(t={0:f,1:h[1]},h[1]=f,h=h.next=t):(P(o,d,p,p-f),o[p]=o[d],_=!0,f=d));return e};function P(e,t,i,n){A(e,t,i),A(e,t,t+n),A(e,t+n,i)}function A(e,t,i){for(var n,r=t+(i---t>>1);t<r;++t,--i)n=e[t],e[t]=e[i],e[i]=n}var L=function(e){var t,i,n,r,o=e.coordinates,a=e.lines,s=e.rings,l=a.length+s.length;for(delete e.lines,delete e.rings,n=0,r=a.length;n<r;++n)for(t=a[n];t=t.next;)++l;for(n=0,r=s.length;n<r;++n)for(i=s[n];i=i.next;)++l;var u=$(2*l*1.4,S,b),c=e.arcs=[];for(n=0,r=a.length;n<r;++n){t=a[n];do{h(t)}while(t=t.next)}for(n=0,r=s.length;n<r;++n)if((i=s[n]).next)do{h(i)}while(i=i.next);else d(i);function h(e){var t,i,n,r,a,s,l,h;if(n=u.get(t=o[e[0]]))for(l=0,h=n.length;l<h;++l)if(f(r=n[l],e))return e[0]=r[0],void(e[1]=r[1]);if(a=u.get(i=o[e[1]]))for(l=0,h=a.length;l<h;++l)if(p(s=a[l],e))return e[1]=s[0],void(e[0]=s[1]);n?n.push(e):u.set(t,[e]),a?a.push(e):u.set(i,[e]),c.push(e)}function d(e){var t,i,n,r,a;if(i=u.get(t=o[e[0]]))for(r=0,a=i.length;r<a;++r){if(_(n=i[r],e))return e[0]=n[0],void(e[1]=n[1]);if(m(n,e))return e[0]=n[1],void(e[1]=n[0])}if(i=u.get(t=o[e[0]+g(e)]))for(r=0,a=i.length;r<a;++r){if(_(n=i[r],e))return e[0]=n[0],void(e[1]=n[1]);if(m(n,e))return e[0]=n[1],void(e[1]=n[0])}i?i.push(e):u.set(t,[e]),c.push(e)}function f(e,t){var i=e[0],n=t[0],r=e[1];if(i-r!=n-t[1])return!1;for(;i<=r;++i,++n)if(!b(o[i],o[n]))return!1;return!0}function p(e,t){var i=e[0],n=t[0],r=e[1],a=t[1];if(i-r!=n-a)return!1;for(;i<=r;++i,--a)if(!b(o[i],o[a]))return!1;return!0}function _(e,t){var i=e[0],n=t[0],r=e[1]-i;if(r!==t[1]-n)return!1;for(var a=g(e),s=g(t),l=0;l<r;++l)if(!b(o[i+(l+a)%r],o[n+(l+s)%r]))return!1;return!0}function m(e,t){var i=e[0],n=t[0],r=e[1],a=t[1],s=r-i;if(s!==a-n)return!1;for(var l=g(e),u=s-g(t),c=0;c<s;++c)if(!b(o[i+(c+l)%s],o[a-(c+u)%s]))return!1;return!0}function g(e){for(var t=e[0],i=e[1],n=t,r=n,a=o[n];++n<i;){var s=o[n];(s[0]<a[0]||s[0]===a[0]&&s[1]<a[1])&&(r=n,a=s)}return r-t}return e},M=function(e){for(var t=-1,i=e.length;++t<i;){for(var n,r,o=e[t],a=0,s=1,l=o.length,u=o[0],c=u[0],h=u[1];++a<l;)n=(u=o[a])[0],r=u[1],(n!==c||r!==h)&&(o[s++]=[n-c,r-h],c=n,h=r);1===s&&(o[s++]=[0,0]),o.length=s}return e},R=function(e){var t=-1,i=[],n=[],r=[];function o(e){e&&a.hasOwnProperty(e.type)&&a[e.type](e)}var a={GeometryCollection:function(e){e.geometries.forEach(o)},LineString:function(e){e.arcs=s(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(s)},Polygon:function(e){e.arcs=e.arcs.map(l)},MultiPolygon:function(e){e.arcs=e.arcs.map(u)}};function s(e){for(var n=0,o=e.length;n<o;++n)r[++t]=e[n];var a={0:t-o+1,1:t};return i.push(a),a}function l(e){for(var i=0,o=e.length;i<o;++i)r[++t]=e[i];var a={0:t-o+1,1:t};return n.push(a),a}function u(e){return e.map(l)}for(var c in e)o(e[c]);return{type:"Topology",coordinates:r,lines:i,rings:n,objects:e}},O=function(e){var t,i={};for(t in e)i[t]=I(e[t]);return i};function I(e){return null==e?{type:null}:("FeatureCollection"===e.type?D:"Feature"===e.type?B:N)(e)}function D(e){var t={type:"GeometryCollection",geometries:e.features.map(B)};return null!=e.bbox&&(t.bbox=e.bbox),t}function B(e){var t,i=N(e.geometry);for(t in null!=e.id&&(i.id=e.id),null!=e.bbox&&(i.bbox=e.bbox),e.properties){i.properties=e.properties;break}return i}function N(e){if(null==e)return{type:null};var t="GeometryCollection"===e.type?{type:"GeometryCollection",geometries:e.geometries.map(N)}:"Point"===e.type||"MultiPoint"===e.type?{type:e.type,coordinates:e.coordinates}:{type:e.type,arcs:e.coordinates};return null!=e.bbox&&(t.bbox=e.bbox),t}var F=function(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=o-n?(i-1)/(o-n):1,l=a-r?(i-1)/(a-r):1;function u(e){return[Math.round((e[0]-n)*s),Math.round((e[1]-r)*l)]}function c(e,t){for(var i,o,a,u,c,h=-1,d=0,f=e.length,p=new Array(f);++h<f;)i=e[h],u=Math.round((i[0]-n)*s),c=Math.round((i[1]-r)*l),(u!==o||c!==a)&&(p[d++]=[o=u,a=c]);for(p.length=d;d<t;)d=p.push([p[0][0],p[0][1]]);return p}function h(e){return c(e,2)}function d(e){return c(e,4)}function f(e){return e.map(d)}function p(e){null!=e&&_.hasOwnProperty(e.type)&&_[e.type](e)}var _={GeometryCollection:function(e){e.geometries.forEach(p)},Point:function(e){e.coordinates=u(e.coordinates)},MultiPoint:function(e){e.coordinates=e.coordinates.map(u)},LineString:function(e){e.arcs=h(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(h)},Polygon:function(e){e.arcs=f(e.arcs)},MultiPolygon:function(e){e.arcs=e.arcs.map(f)}};for(var m in e)p(e[m]);return{scale:[1/s,1/l],translate:[n,r]}},U=function(e,t){var i=v(e=O(e)),n=t>0&&i&&F(e,i,t),r=L(E(R(e))),o=r.coordinates,a=$(1.4*r.arcs.length,G,z);function s(e){e&&l.hasOwnProperty(e.type)&&l[e.type](e)}e=r.objects,r.bbox=i,r.arcs=r.arcs.map((function(e,t){return a.set(e,t),o.slice(e[0],e[1]+1)})),delete r.coordinates,o=null;var l={GeometryCollection:function(e){e.geometries.forEach(s)},LineString:function(e){e.arcs=u(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(u)},Polygon:function(e){e.arcs=e.arcs.map(u)},MultiPolygon:function(e){e.arcs=e.arcs.map(c)}};function u(e){var t=[];do{var i=a.get(e);t.push(e[0]<e[1]?i:~i)}while(e=e.next);return t}function c(e){return e.map(u)}for(var h in e)s(e[h]);return n&&(r.transform=n,r.arcs=M(r.arcs)),r};function G(e){var t,i=e[0],n=e[1];return n<i&&(t=i,i=n,n=t),i+31*n}function z(e,t){var i,n=e[0],r=e[1],o=t[0],a=t[1];return r<n&&(i=n,n=r,r=i),a<o&&(i=o,o=a,a=i),n===o&&r===a}var V=function(e){var t,i,n=e.objects,r={},o=e.arcs,a=o.length,s=-1,l=new Array(a),u=0,c=-1;function h(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(h);break;case"LineString":f(e.arcs);break;case"MultiLineString":case"Polygon":e.arcs.forEach(f);break;case"MultiPolygon":e.arcs.forEach(p)}}function d(e){e<0&&(e=~e),l[e]||(l[e]=1,++u)}function f(e){e.forEach(d)}function p(e){e.forEach(f)}function _(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(_)};break;case"LineString":t={type:"LineString",arcs:g(e.arcs)};break;case"MultiLineString":t={type:"MultiLineString",arcs:e.arcs.map(g)};break;case"Polygon":t={type:"Polygon",arcs:e.arcs.map(g)};break;case"MultiPolygon":t={type:"MultiPolygon",arcs:e.arcs.map(x)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function m(e){return e<0?~l[~e]:l[e]}function g(e){return e.map(m)}function x(e){return e.map(g)}for(i in n)h(n[i]);for(t=new Array(u);++s<a;)l[s]&&(l[s]=++c,t[c]=o[s]);for(i in n)r[i]=_(n[i]);return{type:"Topology",bbox:e.bbox,transform:e.transform,objects:r,arcs:t}},k=function(e,t){var i,n=e.objects,r={};function o(e){var t,i;switch(e.type){case"Polygon":t=(i=a(e.arcs))?{type:"Polygon",arcs:i}:{type:null};break;case"MultiPolygon":t=(i=e.arcs.map(a).filter(H)).length?{type:"MultiPolygon",arcs:i}:{type:null};break;case"GeometryCollection":t=(i=e.geometries.map(o).filter(q)).length?{type:"GeometryCollection",geometries:i}:{type:null};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function a(e){return e.length&&s(e[0])?[e[0]].concat(e.slice(1).filter(l)):null}function s(e){return t(e,!1)}function l(e){return t(e,!0)}for(i in null==t&&(t=W),n)r[i]=o(n[i]);return V({type:"Topology",bbox:e.bbox,transform:e.transform,objects:r,arcs:e.arcs})};function W(){return!0}function H(e){return e}function q(e){return null!=e.type}var j=function(e){var t,i=new Array(e.arcs.length),n=0;function r(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(r);break;case"Polygon":o(e.arcs);break;case"MultiPolygon":e.arcs.forEach(o)}}function o(e){for(var t=0,r=e.length;t<r;++t,++n)for(var o=e[t],a=0,s=o.length;a<s;++a){var l=o[a];l<0&&(l=~l);var u=i[l];null==u?i[l]=n:u!==n&&(i[l]=-1)}}for(t in e.objects)r(e.objects[t]);return function(e){for(var t,n=0,r=e.length;n<r;++n)if(-1===i[(t=e[n])<0?~t:t])return!0;return!1}};function Y(e){var t=e[0],i=e[1],n=e[2];return Math.abs((t[0]-n[0])*(i[1]-t[1])-(t[0]-i[0])*(n[1]-t[1]))/2}function X(e){for(var t,i=-1,n=e.length,r=e[n-1],o=0;++i<n;)t=r,r=e[i],o+=t[0]*r[1]-t[1]*r[0];return Math.abs(o)/2}var K=function(e,t,i){return t=null==t?Number.MIN_VALUE:+t,null==i&&(i=X),function(n,r){return i(o(e,{type:"Polygon",arcs:[n]}).geometry.coordinates[0],r)>=t}},Q=function(e,t,i){var n=j(e),r=K(e,t,i);return function(e,t){return n(e,t)||r(e,t)}};function Z(e,t){return e[1][2]-t[1][2]}var J=function(){var e={},t=[],i=0;function n(e,i){for(;i>0;){var n=(i+1>>1)-1,r=t[n];if(Z(e,r)>=0)break;t[r._=i]=r,t[e._=i=n]=e}}function r(e,n){for(;;){var r=n+1<<1,o=r-1,a=n,s=t[a];if(o<i&&Z(t[o],s)<0&&(s=t[a=o]),r<i&&Z(t[r],s)<0&&(s=t[a=r]),a===n)break;t[s._=n]=s,t[e._=n=a]=e}}return e.push=function(e){return n(t[e._=i]=e,i++),i},e.pop=function(){if(!(i<=0)){var e,n=t[0];return--i>0&&(e=t[i],r(t[e._=0]=e,0)),n}},e.remove=function(e){var o,a=e._;if(t[a]===e)return a!==--i&&(Z(o=t[i],e)<0?n:r)(t[o._=a]=o,a),a},e};function ee(e){return[e[0],e[1],0]}var te=function(e,t){var n=e.transform?i(e.transform):ee,r=J();null==t&&(t=Y);var o=e.arcs.map((function(e){var i,o,s,l=[],u=0;for(o=1,s=(e=e.map(n)).length-1;o<s;++o)(i=[e[o-1],e[o],e[o+1]])[1][2]=t(i),l.push(i),r.push(i);for(e[0][2]=e[s][2]=1/0,o=0,s=l.length;o<s;++o)(i=l[o]).previous=l[o-1],i.next=l[o+1];for(;i=r.pop();){var c=i.previous,h=i.next;i[1][2]<u?i[1][2]=u:u=i[1][2],c&&(c.next=h,c[2]=i[2],a(c)),h&&(h.previous=c,h[0]=i[0],a(h))}return e}));function a(e){r.remove(e),e[1][2]=t(e),r.push(e)}return{type:"Topology",bbox:e.bbox,objects:e.objects,arcs:o}},ie=function(e,t){var i=[];return e.arcs.forEach((function(e){e.forEach((function(e){isFinite(e[2])&&i.push(e[2])}))})),i.length&&ne(i.sort(re),t)};function ne(e,t){if(i=e.length){if((t=+t)<=0||i<2)return e[0];if(t>=1)return e[i-1];var i,n=(i-1)*t,r=Math.floor(n),o=e[r];return o+(e[r+1]-o)*(n-r)}}function re(e,t){return t-e}var oe=function(e,t){t=null==t?Number.MIN_VALUE:+t;var i=e.arcs.map((function(e){for(var i,n=-1,r=0,o=e.length,a=new Array(o);++n<o;)(i=e[n])[2]>=t&&(a[r++]=[i[0],i[1]]);return a.length=r,a}));return{type:"Topology",transform:e.transform,bbox:e.bbox,objects:e.objects,arcs:i}},ae=Math.PI,se=2*ae,le=ae/4,ue=ae/180,ce=Math.abs,he=Math.atan2,de=Math.cos,fe=Math.sin;function pe(e,t){for(var i,n,r=0,o=e.length,a=0,s=e[t?r++:o-1],l=s[0]*ue,u=s[1]*ue/2+le,c=de(u),h=fe(u);r<o;++r){i=l,l=(s=e[r])[0]*ue,u=s[1]*ue/2+le,n=c,c=de(u);var d=l-i,f=d>=0?1:-1,p=f*d,_=h*(h=fe(u)),m=n*c+_*de(p),g=_*f*fe(p);a+=he(g,m)}return a}function _e(e,t){var i=pe(e,!0);return t&&(i*=-1),2*(i<0?se+i:i)}function me(e){return 2*ce(pe(e,!1))}e.bbox=n,e.feature=o,e.mesh=u,e.meshArcs=c,e.merge=f,e.mergeArcs=p,e.neighbors=m,e.quantize=x,e.transform=i,e.untransform=g,e.topology=U,e.filter=k,e.filterAttached=j,e.filterAttachedWeight=Q,e.filterWeight=K,e.planarRingArea=X,e.planarTriangleArea=Y,e.presimplify=te,e.quantile=ie,e.simplify=oe,e.sphericalRingArea=_e,e.sphericalTriangleArea=me,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof exports&&typeof module<"u"?exports:e.topojson=e.topojson||{})}(ce$d);var ke$4=ce$d.topojson;function P$n(e){return o$1p.fromDegrees(e[0],e[1],e[2])}var A$r={"urn:ogc:def:crs:OGC:1.3:CRS84":P$n,"EPSG:4326":P$n,"urn:ogc:def:crs:EPSG::4326":P$n},J$h={},Q$l={},M$q=48,R$l,G$p=e$1U.ROYALBLUE,L$p=e$1U.YELLOW,O$j=2,U$n=e$1U.fromBytes(255,255,0,100),D$n=!1,Le$a={small:24,medium:48,large:64},Oe$9=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function Z$k(e,t){var i="";for(var n in e)if(e.hasOwnProperty(n)){if(n===t||-1!==Oe$9.indexOf(n))continue;var r=e[n];e$2b(r)&&(i+="object"==typeof r?"<tr><th>"+n+"</th><td>"+Z$k(r)+"</td></tr>":"<tr><th>"+n+"</th><td>"+r+"</td></tr>")}return i.length>0&&(i='<table class="supermap3d-infoBox-defaultTable"><tbody>'+i+"</tbody></table>"),i}function Ue$6(e,t,i){var n;return function(r,o){return e$2b(n)||(n=e(t,i)),n}}function $$j(e,t){return new n$V(Ue$6(Z$k,e,t),!0)}function B$k(e,t,i){var n=e.id;if(e$2b(n)&&"Feature"===e.type){for(var r=2,o=n;e$2b(t.getById(o));)o=n+"_"+r,r++;n=o}else n=e$1Q();var a=t.getOrCreateEntity(n),s=e.properties;if(e$2b(s)){a.properties=s;var l,u=s.title;if(e$2b(u))a.name=u,l="title";else{var c=Number.MAX_VALUE;for(var h in s)if(s.hasOwnProperty(h)&&s[h]){var d=h.toLowerCase();if(c>1&&"title"===d){c=1,l=h;break}c>2&&"name"===d?(c=2,l=h):c>3&&/title/i.test(h)?(c=3,l=h):c>4&&/name/i.test(h)&&(c=4,l=h)}e$2b(l)&&(a.name=s[l])}var f=s.description;null!==f&&(a.description=e$2b(f)?new e$1I(f):i(s,l))}return a}function F$k(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++)i[n]=t(e[n]);return i}var K$i={Feature:re$d,FeatureCollection:Be$9,GeometryCollection:ie$8,LineString:le$e,MultiLineString:ae$a,MultiPoint:oe$9,MultiPolygon:me$b,Point:ne$e,Polygon:ce$c,Topology:ue$a},ee$c={GeometryCollection:ie$8,LineString:le$e,MultiLineString:ae$a,MultiPoint:oe$9,MultiPolygon:me$b,Point:ne$e,Polygon:ce$c,Topology:ue$a};function re$d(e,t,i,n,r){if(null!==t.geometry){if(!e$2b(t.geometry))throw new t$14("feature.geometry is required.");var o=t.geometry.type,a=ee$c[o];if(!e$2b(a))throw new t$14("Unknown geometry type: "+o);a(e,t,t.geometry,n,r)}else B$k(t,e._entityCollection,r.describe)}function Be$9(e,t,i,n,r){for(var o=t.features,a=0,s=o.length;a<s;a++)re$d(e,o[a],void 0,n,r)}function ie$8(e,t,i,n,r){for(var o=i.geometries,a=0,s=o.length;a<s;a++){var l=o[a],u=l.type,c=ee$c[u];if(!e$2b(c))throw new t$14("Unknown geometry type: "+u);c(e,t,l,n,r)}}function te$9(e,t,i,n,r){var o,a=r.markerSymbol,s=r.markerColor,l=r.markerSize,u=t.properties;if(e$2b(u)){var c=u["marker-color"];e$2b(c)&&(s=e$1U.fromCssColorString(c)),l=u$_(Le$a[u["marker-size"]],l);var h=u["marker-symbol"];e$2b(h)&&(a=h)}o=e$2b(a)?1===a.length?e._pinBuilder.fromText(a.toUpperCase(),s,l):e._pinBuilder.fromMakiIconId(a,s,l):e._pinBuilder.fromColor(s,l);var d=new n$T;d.verticalOrigin=new e$1I(S$O.BOTTOM),2===n.length&&r.clampToGround&&(d.heightReference=k$P.CLAMP_TO_GROUND);var f=B$k(t,e._entityCollection,r.describe);f.billboard=d,f.position=new r$U(i(n));var p=o$1l(o).then((function(e){d.image=new e$1I(e)})).otherwise((function(){d.image=new e$1I(e._pinBuilder.fromColor(s,l))}));e._promises.push(p)}function ne$e(e,t,i,n,r){te$9(e,t,n,i.coordinates,r)}function oe$9(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)te$9(e,t,n,o[a],r)}function se$8(e,t,i,n,r){var o=r.strokeMaterialProperty,a=r.strokeWidthProperty,s=t.properties;if(e$2b(s)){var l=s["stroke-width"];e$2b(l)&&(a=new e$1I(l));var u,c=s.stroke;e$2b(c)&&(u=e$1U.fromCssColorString(c));var h=s["stroke-opacity"];e$2b(h)&&1!==h&&(e$2b(u)||(u=o.color.clone()),u.alpha=h),e$2b(u)&&(o=new t$Q(u))}var d=B$k(t,e._entityCollection,r.describe),f=new a$L;d.polyline=f,f.clampToGround=r.clampToGround,f.material=o,f.width=a,f.positions=new e$1I(F$k(n,i)),f.arcType=m$1f.RHUMB}function le$e(e,t,i,n,r){se$8(e,t,n,i.coordinates,r)}function ae$a(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)se$8(e,t,n,o[a],r)}function fe$7(e,t,i,n,r){if(0!==n.length&&0!==n[0].length){var o=r.strokeMaterialProperty.color,a=r.fillMaterialProperty,s=r.strokeWidthProperty,l=t.properties;if(e$2b(l)){var u=l["stroke-width"];e$2b(u)&&(s=new e$1I(u));var c,h=l.stroke;e$2b(h)&&(c=e$1U.fromCssColorString(h));var d=l["stroke-opacity"];e$2b(d)&&1!==d&&(e$2b(c)||(c=r.strokeMaterialProperty.color.clone()),c.alpha=d),e$2b(c)&&(o=new e$1I(c));var f,p=l.fill;e$2b(p)&&((f=e$1U.fromCssColorString(p)).alpha=a.color.alpha),e$2b(d=l["fill-opacity"])&&d!==a.color.alpha&&(e$2b(f)||(f=a.color.clone()),f.alpha=d),e$2b(f)&&(a=new t$Q(f))}var _=new l$Z;_.outline=new e$1I(!0),_.outlineColor=o,_.outlineWidth=s,_.material=a,_.arcType=m$1f.GEODESIC,_._fromDataSource=!0;for(var m=[],g=1,x=n.length;g<x;g++)m.push(new e$1J(F$k(n[g],i)));var v=n[0];_.hierarchy=new e$1I(new e$1J(F$k(v,i),m)),v[0].length>2?_.perPositionHeight=new e$1I(!0):r.clampToGround||(_.height=0);var y=B$k(t,e._entityCollection,r.describe);r.clampToGround&&(_.classificationType=_0x3b5200.TERRAIN),r.clampToS3M&&(_.classificationType=_0x3b5200.S3M_TILE),y.polygon=_}}function ce$c(e,t,i,n,r){fe$7(e,t,n,i.coordinates,r)}function me$b(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)fe$7(e,t,n,o[a],r)}function ue$a(e,t,i,n,r){for(var o in i.objects)if(i.objects.hasOwnProperty(o)){var a=ke$4.feature(i,i.objects[o]);(0,K$i[a.type])(e,a,a,n,r)}}function y$p(e){this._name=e,this._changed=new o$1h,this._error=new o$1h,this._isLoading=!1,this._loading=new o$1h,this._entityCollection=new r$v(this),this._promises=[],this._pinBuilder=new s$A,this._entityCluster=new a$r,this._credit=void 0,this._resourceCredits=[],this._visibleViewport=4095,this._swipeRegion=new e$29(0,0,1,1),this._swipeEnabled=!1}function pe$9(e,t,i,n){var r;e$2b(n)&&(r=f$O(n)),e$2b(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));var o=K$i[t.type];if(!e$2b(o))throw new t$14("Unsupported GeoJSON object type: "+t.type);var a=t.crs,s=null!==a?P$n:null;if(e$2b(a)){if(!e$2b(a.properties))throw new t$14("crs.properties is undefined.");var l=a.properties;if("name"===a.type){if(!e$2b(s=A$r[l.name]))throw new t$14("Unknown crs name: "+l.name)}else if("link"===a.type){var u=J$h[l.href];if(e$2b(u)||(u=Q$l[l.type]),!e$2b(u))throw new t$14("Unable to resolve crs link: "+JSON.stringify(l));s=u(l)}else{if("EPSG"!==a.type)throw new t$14("Unknown crs type: "+a.type);if(!e$2b(s=A$r["EPSG:"+l.code]))throw new t$14("Unknown crs EPSG code: "+l.code)}}return o$1l(s,(function(n){return e._entityCollection.removeAll(),null!==n&&o(e,t,t,n,i),o$1l.all(e._promises,(function(){return e._promises.length=0,o$A.setLoading(e,!1),e}))}))}function o$v(e,t){this.position=e,this.headingPitchRoll=t}y$p.load=function(e,t){return(new y$p).load(e,t)},Object.defineProperties(y$p,{markerSize:{get:function(){return M$q},set:function(e){M$q=e}},markerSymbol:{get:function(){return R$l},set:function(e){R$l=e}},markerColor:{get:function(){return G$p},set:function(e){G$p=e}},stroke:{get:function(){return L$p},set:function(e){L$p=e}},strokeWidth:{get:function(){return O$j},set:function(e){O$j=e}},fill:{get:function(){return U$n},set:function(e){U$n=e}},clampToGround:{get:function(){return D$n},set:function(e){D$n=e}},crsNames:{get:function(){return A$r}},crsLinkHrefs:{get:function(){return J$h}},crsLinkTypes:{get:function(){return Q$l}}}),Object.defineProperties(y$p.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2b(e))throw new t$16("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}},swipeRegion:{get:function(){return new f$18(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2b(e)){if(!(e instanceof f$18))throw new t$16("swipeRegion must be a instance of BoundingRectangle.");if(e$29.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion),e$2b(this._entityCluster._billboardCollection)&&(this._entityCluster._billboardCollection._swipeRegion=e$29.clone(this._swipeRegion,new e$29)),e$2b(this._primitives))for(var t=0;t<this._primitives._primitives.length;t++)this._primitives._primitives[t]instanceof y$S&&(this._primitives._primitives[t]._swipeRegion=e$29.clone(this._swipeRegion,new e$29));if(e$2b(this._groundPrimitives)){var i=this._groundPrimitives._collectionsArray;for(t=0;t<i.length;t++)if(i[t]instanceof o$x)for(var n=0;n<i[t]._primitives.length;n++)i[t]._primitives[n]._primitive._primitive._swipeRegion=e$29.clone(this._swipeRegion,new e$29)}}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){if(e!==this._swipeEnabled){if(e||e$29.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e,e$2b(this._entityCluster._billboardCollection)&&(this._entityCluster._billboardCollection._swipeEnabled=e),e$2b(this._primitives))for(var t=0;t<this._primitives._primitives.length;t++)this._primitives._primitives[t]instanceof y$S&&(this._primitives._primitives[t].swipeEnabled=e);if(e$2b(this._groundPrimitives)){var i=this._groundPrimitives._collectionsArray;for(t=0;t<i.length;t++)if(i[t]instanceof o$x)for(var n=0;n<i[t]._primitives.length;n++)i[t]._primitives[n]._primitive._primitive.swipeEnabled=e}}}}}),y$p.prototype.load=function(e,t){if(!e$2b(e))throw new t$16("data is required.");o$A.setLoading(this,!0);var i=(t=u$_(t,u$_.EMPTY_OBJECT)).credit;"string"==typeof i&&(i=new r$T(i)),this._credit=i;var n=e,r=t.sourceUri;if("string"==typeof e||e instanceof t$11){n=(e=t$11.createIfNeeded(e)).fetchJson(),r=u$_(r,e.getUrlComponent());var o=this._resourceCredits,a=e.credits;if(e$2b(a))for(var s=a.length,l=0;l<s;l++)o.push(a[l])}t={describe:u$_(t.describe,$$j),markerSize:u$_(t.markerSize,M$q),markerSymbol:u$_(t.markerSymbol,R$l),markerColor:u$_(t.markerColor,G$p),strokeWidthProperty:new e$1I(u$_(t.strokeWidth,O$j)),strokeMaterialProperty:new t$Q(u$_(t.stroke,L$p)),fillMaterialProperty:new t$Q(u$_(t.fill,U$n)),clampToGround:u$_(t.clampToGround,D$n),clampToS3M:u$_(t.clampToS3M,!1)};var u=this;return o$1l(n,(function(e){return pe$9(u,e,t,r)})).otherwise((function(e){return o$A.setLoading(u,!1),u._error.raiseEvent(u,e),console.log(e),o$1l.reject(e)}))},y$p.prototype.loadPoiJsonData=function(e,t){if(!e$2b(e))throw new t$16("data is required.");o$A.setLoading(this,!0);var i=(t=u$_(t,u$_.EMPTY_OBJECT)).sourceUri;return pe$9(this,e,t={describe:u$_(t.describe,$$j),markerSize:u$_(t.markerSize,M$q),markerSymbol:u$_(t.markerSymbol,R$l),markerColor:u$_(t.markerColor,G$p),strokeWidthProperty:new e$1I(u$_(t.strokeWidth,O$j)),strokeMaterialProperty:new t$Q(u$_(t.stroke,L$p)),fillMaterialProperty:new t$Q(u$_(t.fill,U$n))},i)},y$p.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},y$p.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport};var be$c={};!function(e,t){e.Autolinker=function(){function e(e,t){for(var i in t)t.hasOwnProperty(i)&&void 0===e[i]&&(e[i]=t[i]);return e}function t(e,t,i){var n;return e.length>t&&(null==i?(i="…",n=3):n=i.length,e=e.substring(0,t-n)+i),e}function i(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}function n(e,t){for(var i=e.length-1;i>=0;i--)!0===t(e[i])&&e.splice(i,1)}function r(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var i,n=[],r=0;i=t.exec(e);)n.push(e.substring(r,i.index)),n.push(i[0]),r=i.index+i[0].length;return n.push(e.substring(r)),n}function o(e){throw new Error("Unhandled case for value: '"+e+"'")}var a=function(){function e(e){void 0===e&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return e.prototype.setTagName=function(e){return this.tagName=e,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(e,t){return this.getAttrs()[e]=t,this},e.prototype.getAttr=function(e){return this.getAttrs()[e]},e.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(e){return this.setAttr("class",e)},e.prototype.addClass=function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,o=n?n.split(r):[],a=e.split(r);t=a.shift();)-1===i(o,t)&&o.push(t);return this.getAttrs().class=o.join(" "),this},e.prototype.removeClass=function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,o=n?n.split(r):[],a=e.split(r);o.length&&(t=a.shift());){var s=i(o,t);-1!==s&&o.splice(s,1)}return this.getAttrs().class=o.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},e.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},e.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i+'="'+e[i]+'"');return t.join(" ")},e}();function s(e,t,i){var n,r;null==i?(i="…",r=3,n=8):(r=i.length,n=i.length);var o=function(e){var t={},i=e,n=i.match(/^([a-z]+):\/\//i);return n&&(t.scheme=n[1],i=i.substr(n[0].length)),(n=i.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(t.host=n[1],i=i.substr(n[0].length)),(n=i.match(/^\/(.*?)(?=(\?|#|$))/i))&&(t.path=n[1],i=i.substr(n[0].length)),(n=i.match(/^\?(.*?)(?=(#|$))/i))&&(t.query=n[1],i=i.substr(n[0].length)),(n=i.match(/^#(.*?)$/i))&&(t.fragment=n[1]),t},a=function(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t},s=function(e,t){var n=t/2,r=Math.ceil(n),o=-1*Math.floor(n),a="";return o<0&&(a=e.substr(o)),e.substr(0,r)+i+a};if(e.length<=t)return e;var l=t-r,u=o(e);if(u.query){var c=u.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);c&&(u.query=u.query.substr(0,c[1].length),e=a(u))}if(e.length<=t||(u.host&&(u.host=u.host.replace(/^www\./,""),e=a(u)),e.length<=t))return e;var h="";if(u.host&&(h+=u.host),h.length>=l)return u.host.length==t?(u.host.substr(0,t-r)+i).substr(0,l+n):s(h,l).substr(0,l+n);var d="";if(u.path&&(d+="/"+u.path),u.query&&(d+="?"+u.query),d){if((h+d).length>=l)return(h+d).length==t?(h+d).substr(0,t):(h+s(d,l-h.length)).substr(0,l+n);h+=d}if(u.fragment){var f="#"+u.fragment;if((h+f).length>=l)return(h+f).length==t?(h+f).substr(0,t):(h+s(f,l-h.length)).substr(0,l+n);h+=f}if(u.scheme&&u.host){var p=u.scheme+"://";if((h+p).length<l)return(p+h).substr(0,t)}if(h.length<=t)return h;var _="";return l>0&&(_=h.substr(-1*Math.floor(l/2))),(h.substr(0,Math.ceil(l/2))+i+_).substr(0,l+n)}function l(e,t,i){if(e.length<=t)return e;var n,r;null==i?(i="…",n=8,r=3):(n=i.length,r=i.length);var o=t-r,a="";return o>0&&(a=e.substr(-1*Math.floor(o/2))),(e.substr(0,Math.ceil(o/2))+i+a).substr(0,o+n)}function u(e,i,n){return t(e,i,n)}var c=function(){function e(e){void 0===e&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return e.prototype.build=function(e){return new a({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},e.prototype.createAttrs=function(e){var t={href:e.getAnchorHref()},i=this.createCssClass(e);return i&&(t.class=i),this.newWindow&&(t.target="_blank",t.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(t.title=e.getAnchorHref()),t},e.prototype.createCssClass=function(e){var t=this.className;if(t){for(var i=[t],n=e.getCssClassSuffixes(),r=0,o=n.length;r<o;r++)i.push(t+"-"+n[r]);return i.join(" ")}return""},e.prototype.processAnchorText=function(e){return e=this.doTruncate(e)},e.prototype.doTruncate=function(e){var t=this.truncate;if(!t||!t.length)return e;var i=t.length,n=t.location;return"smart"===n?s(e,i):"middle"===n?l(e,i):u(e,i)},e}(),h=function(){function e(e){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(e){this.offset=e},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.getType()]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}(),d=function(e,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},d(e,t)};function f(e,t){function i(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var p=function(){return p=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},p.apply(this,arguments)},_=function(e){function t(t){var i=e.call(this,t)||this;return i.email="",i.email=t.email,i}return f(t,e),t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(h),m=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="",i.hashtag="",i.serviceName=t.serviceName,i.hashtag=t.hashtag,i}return f(t,e),t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var e=this.serviceName,t=this.hashtag;switch(e){case"twitter":case"facebook":case"instagram":return""+t;default:throw new Error("Unknown service name to point hashtag to: "+e)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t}(h),g=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.mention="",i.mention=t.mention,i.serviceName=t.serviceName,i}return f(t,e),t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":case"instagram":case"soundcloud":return""+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var t=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&t.push(i),t},t}(h),x=function(e){function t(t){var i=e.call(this,t)||this;return i.number="",i.plusSign=!1,i.number=t.number,i.plusSign=t.plusSign,i}return f(t,e),t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(h),v=function(e){function t(t){var i=e.call(this,t)||this;return i.url="",i.urlMatchType="scheme",i.protocolUrlMatch=!1,i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.schemePrefixRegex=/^(https?:\/\/)?/i,i.wwwPrefixRegex=/^(https?:\/\/)?(www\.)?/i,i.protocolRelativeRegex=/^\/\//,i.protocolPrepended=!1,i.urlMatchType=t.urlMatchType,i.url=t.url,i.protocolUrlMatch=t.protocolUrlMatch,i.protocolRelativeMatch=t.protocolRelativeMatch,i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return f(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var e=this.url;return!this.protocolRelativeMatch&&!this.protocolUrlMatch&&!this.protocolPrepended&&(e=this.url="http://"+e,this.protocolPrepended=!0),e},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},t.prototype.getAnchorText=function(){var e=this.getMatchedText();return this.protocolRelativeMatch&&(e=this.stripProtocolRelativePrefix(e)),this.stripPrefix.scheme&&(e=this.stripSchemePrefix(e)),this.stripPrefix.www&&(e=this.stripWwwPrefix(e)),this.stripTrailingSlash&&(e=this.removeTrailingSlash(e)),this.decodePercentEncoding&&(e=this.removePercentEncoding(e)),e},t.prototype.stripSchemePrefix=function(e){return e.replace(this.schemePrefixRegex,"")},t.prototype.stripWwwPrefix=function(e){return e.replace(this.wwwPrefixRegex,"$1")},t.prototype.stripProtocolRelativePrefix=function(e){return e.replace(this.protocolRelativeRegex,"")},t.prototype.removeTrailingSlash=function(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e},t.prototype.removePercentEncoding=function(e){var t=e.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(t)}catch{return t}},t}(h),y=function(){function e(e){this.__jsduckDummyDocProp=null,this.tagBuilder=e.tagBuilder}return e}(),$=/[A-Za-z]/,b=/[0-9]/,T=/\s/,C=/['"]/,S=/[\x00-\x1F\x7F]/,w=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,E=w+/\u00a9\u00ae\u2000-\u3300\ud83c\ud000-\udfff\ud83d\ud000-\udfff\ud83e\ud000-\udfff/.source+/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,P=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,A=E+P,L=E+P,M="(?:["+P+"]{1,3}\\.){3}["+P+"]{1,3}",R="["+L+"](?:["+L+"\\-]{0,61}["+L+"])?",O=function(e){return"(?=("+R+"))\\"+e},I=function(e){return"(?:"+O(e)+"(?:\\."+O(e+1)+"){0,126}|"+M+")"},D=new RegExp("["+L+"]"),B=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|warman|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|グーグル|クラウド|ポイント|大众汽车|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ストア|セール|みんな|中文网|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.localPartCharRegex=new RegExp("["+L+"!#$%&'*+/=?^_`{|}~-]"),t.strictTldRegex=new RegExp("^"+B.source+"$"),t}return f(t,e),t.prototype.parseMatches=function(e){for(var t=this.tagBuilder,i=this.localPartCharRegex,n=this.strictTldRegex,r=[],a=e.length,s=new F,l={m:"a",a:"i",i:"l",l:"t",t:"o",o:":"},u=0,c=0,h=s;u<a;){var d=e.charAt(u);switch(c){case 0:f(d);break;case 1:m(e.charAt(u-1),d);break;case 2:g(d);break;case 3:x(d);break;case 4:v(d);break;case 5:y(d);break;case 6:$(d);break;case 7:b(d);break;default:o(c)}u++}return S(),r;function f(e){"m"===e?T(1):i.test(e)&&T()}function m(e,t){":"===e?i.test(t)?(c=2,h=new F(p({},h,{hasMailtoPrefix:!0}))):C():l[e]===t||(i.test(t)?c=2:"."===t?c=3:"@"===t?c=4:C())}function g(e){"."===e?c=3:"@"===e?c=4:i.test(e)||C()}function x(e){"."===e||"@"===e?C():i.test(e)?c=2:C()}function v(e){D.test(e)?c=5:C()}function y(e){"."===e?c=7:"-"===e?c=6:D.test(e)||S()}function $(e){"-"===e||"."===e?S():D.test(e)?c=5:S()}function b(e){"."===e||"-"===e?S():D.test(e)?(c=5,h=new F(p({},h,{hasDomainDot:!0}))):S()}function T(e){void 0===e&&(e=2),c=e,h=new F({idx:u})}function C(){c=0,h=s}function S(){if(h.hasDomainDot){var i=e.slice(h.idx,u);/[-.]$/.test(i)&&(i=i.slice(0,-1));var o=h.hasMailtoPrefix?i.slice(7):i;a(o)&&r.push(new _({tagBuilder:t,matchedText:i,offset:h.idx,email:o}))}function a(e){var t=(e.split(".").pop()||"").toLowerCase();return n.test(t)}C()}},t}(y),F=function(){function e(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.hasMailtoPrefix=!!e.hasMailtoPrefix,this.hasDomainDot=!!e.hasDomainDot}return e}(),U=function(){function e(){}return e.isValid=function(e,t){return!(t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(e,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,t)&&!this.isValidIpAddress(e)||this.containsMultipleDots(e))},e.isValidIpAddress=function(e){var t=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==e.match(t)},e.containsMultipleDots=function(e){var t=e;return this.hasFullProtocolRegex.test(e)&&(t=e.split("://")[1]),t.split("/")[0].indexOf("..")>-1},e.isValidUriScheme=function(e){var t=e.match(this.uriSchemeRegex),i=t&&t[0].toLowerCase();return"javascript:"!==i&&"vbscript:"!==i},e.urlMatchDoesNotHaveProtocolOrDot=function(e,t){return!(!e||t&&this.hasFullProtocolRegex.test(t)||-1!==e.indexOf("."))},e.urlMatchDoesNotHaveAtLeastOneWordChar=function(e,t){return!(!e||!t)&&!this.hasWordCharAfterProtocolRegex.test(e)},e.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,e.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,e.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+w+"]"),e.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,e}(),G=function(e){function t(t){var i=e.call(this,t)||this;return i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.matcherRegex=function(){var e=/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/,t=/(?:www\.)/,i=new RegExp("[/?#](?:["+L+"\\-+&@#/%=~_()|'$*\\[\\]?!:,.;✓]*["+L+"\\-+&@#/%=~_()|'$*\\[\\]✓])?");return new RegExp(["(?:","(",e.source,I(2),")","|","(","(//)?",t.source,I(6),")","|","(","(//)?",I(10)+"\\.",B.source,"(?![-"+A+"])",")",")","(?::[0-9]+)?","(?:"+i.source+")?"].join(""),"gi")}(),i.wordCharRegExp=new RegExp("["+L+"]"),i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.stripPrefix,r=this.stripTrailingSlash,o=this.decodePercentEncoding,a=this.tagBuilder,s=[],l=function(){var i=t[0],l=t[1],c=t[4],h=t[5],d=t[9],f=t.index,p=h||d,_=e.charAt(f-1);if(!U.isValid(i,l)||f>0&&"@"===_||f>0&&p&&u.wordCharRegExp.test(_))return"continue";if(/\?$/.test(i)&&(i=i.substr(0,i.length-1)),u.matchHasUnbalancedClosingParen(i))i=i.substr(0,i.length-1);else{var m=u.matchHasInvalidCharAfterTld(i,l);m>-1&&(i=i.substr(0,m))}var g=["http://","https://"].find((function(e){return!!l&&-1!==l.indexOf(e)}));if(g){var x=i.indexOf(g);i=i.substr(x),l=l.substr(x),f+=x}var y=l?"scheme":c?"www":"tld",$=!!l;s.push(new v({tagBuilder:a,matchedText:i,offset:f,urlMatchType:y,url:i,protocolUrlMatch:$,protocolRelativeMatch:!!p,stripPrefix:n,stripTrailingSlash:r,decodePercentEncoding:o}))},u=this;null!==(t=i.exec(e));)l();return s},t.prototype.matchHasUnbalancedClosingParen=function(e){var t,i=e.charAt(e.length-1);if(")"===i)t="(";else{if("]"!==i)return!1;t="["}for(var n=0,r=0,o=e.length-1;r<o;r++){var a=e.charAt(r);a===t?n++:a===i&&(n=Math.max(n-1,0))}return 0===n},t.prototype.matchHasInvalidCharAfterTld=function(e,t){if(!e)return-1;var i=0;t&&(i=e.indexOf(":"),e=e.slice(i));var n=new RegExp("^((.?//)?[-."+L+"]*[-"+L+"]\\.[-"+L+"]+)").exec(e);return null===n?-1:(i+=n[1].length,e=e.slice(n[1].length),/^[^-.A-Za-z0-9:\/?#]/.test(e)?i:-1)},t}(y),z=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegex=new RegExp("#[_"+L+"]{1,139}(?![_"+L+"])","g"),i.nonWordCharRegex=new RegExp("[^"+L+"]"),i.serviceName=t.serviceName,i}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.nonWordCharRegex,r=this.serviceName,o=this.tagBuilder,a=[];null!==(t=i.exec(e));){var s=t.index,l=e.charAt(s-1);if(0===s||n.test(l)){var u=t[0],c=t[0].slice(1);a.push(new m({tagBuilder:o,matchedText:u,offset:s,serviceName:r,hashtag:c}))}}return a},t}(y),V=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.matcherRegex=/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/g,t}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.tagBuilder,r=[];null!==(t=i.exec(e));){var o=t[0],a=o.replace(/[^0-9,;#]/g,""),s=!(!t[1]&&!t[2]),l=0==t.index?"":e.substr(t.index-1,1),u=e.substr(t.index+o.length,1),c=!l.match(/\d/)&&!u.match(/\d/);this.testMatch(t[3])&&this.testMatch(o)&&c&&r.push(new x({tagBuilder:n,matchedText:o,offset:t.index,number:a,plusSign:s}))}return r},t.prototype.testMatch=function(e){return/\D/.test(e)},t}(y),k=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegexes={twitter:new RegExp("@[_"+L+"]{1,50}(?![_"+L+"])","g"),instagram:new RegExp("@[_."+L+"]{1,30}(?![_"+L+"])","g"),soundcloud:new RegExp("@[-_."+L+"]{1,50}(?![-_"+L+"])","g")},i.nonWordCharRegex=new RegExp("[^"+L+"]"),i.serviceName=t.serviceName,i}return f(t,e),t.prototype.parseMatches=function(e){var t,i=this.serviceName,n=this.matcherRegexes[this.serviceName],r=this.nonWordCharRegex,o=this.tagBuilder,a=[];if(!n)return a;for(;null!==(t=n.exec(e));){var s=t.index,l=e.charAt(s-1);if(0===s||r.test(l)){var u=t[0].replace(/\.+$/g,""),c=u.slice(1);a.push(new g({tagBuilder:o,matchedText:u,offset:s,serviceName:i,mention:c}))}}return a},t}(y);function W(e,t){for(var i=t.onOpenTag,n=t.onCloseTag,r=t.onText,a=t.onComment,s=t.onDoctype,l=new H,u=0,c=e.length,h=0,d=0,f=l;u<c;){var _=e.charAt(u);switch(h){case 0:m(_);break;case 1:g(_);break;case 2:v(_);break;case 3:x(_);break;case 4:y(_);break;case 5:w(_);break;case 6:E(_);break;case 7:P(_);break;case 8:A(_);break;case 9:L(_);break;case 10:M(_);break;case 11:R(_);break;case 12:O(_);break;case 13:I();break;case 14:D(_);break;case 15:B(_);break;case 16:N(_);break;case 17:F(_);break;case 18:U(_);break;case 19:G(_);break;case 20:z(_);break;default:o(h)}u++}function m(e){"<"===e&&k()}function g(e){"!"===e?h=13:"/"===e?(h=2,f=new H(p({},f,{isClosing:!0}))):"<"===e?k():$.test(e)?(h=3,f=new H(p({},f,{isOpening:!0}))):(h=0,f=l)}function x(e){T.test(e)?(f=new H(p({},f,{name:j()})),h=4):"<"===e?k():"/"===e?(f=new H(p({},f,{name:j()})),h=12):">"===e?(f=new H(p({},f,{name:j()})),W()):!$.test(e)&&!b.test(e)&&":"!==e&&V()}function v(e){">"===e?V():$.test(e)?h=3:V()}function y(e){T.test(e)||("/"===e?h=12:">"===e?W():"<"===e?k():"="===e||C.test(e)||S.test(e)?V():h=5)}function w(e){T.test(e)?h=6:"/"===e?h=12:"="===e?h=7:">"===e?W():"<"===e?k():C.test(e)&&V()}function E(e){T.test(e)||("/"===e?h=12:"="===e?h=7:">"===e?W():"<"===e?k():C.test(e)?V():h=5)}function P(e){T.test(e)||('"'===e?h=8:"'"===e?h=9:/[>=`]/.test(e)?V():"<"===e?k():h=10)}function A(e){'"'===e&&(h=11)}function L(e){"'"===e&&(h=11)}function M(e){T.test(e)?h=4:">"===e?W():"<"===e&&k()}function R(e){T.test(e)?h=4:"/"===e?h=12:">"===e?W():"<"===e?k():(h=4,Y())}function O(e){">"===e?(f=new H(p({},f,{isClosing:!0})),W()):h=4}function I(t){"--"===e.substr(u,2)?(u+=2,f=new H(p({},f,{type:"comment"})),h=14):"DOCTYPE"===e.substr(u,7).toUpperCase()?(u+=7,f=new H(p({},f,{type:"doctype"})),h=20):V()}function D(e){"-"===e?h=15:">"===e?V():h=16}function B(e){"-"===e?h=18:">"===e?V():h=16}function N(e){"-"===e&&(h=17)}function F(e){h="-"===e?18:16}function U(e){">"===e?W():"!"===e?h=19:"-"===e||(h=16)}function G(e){"-"===e?h=17:">"===e?W():h=16}function z(e){">"===e?W():"<"===e&&k()}function V(){h=0,f=l}function k(){h=1,f=new H({idx:u})}function W(){var t=e.slice(d,f.idx);t&&r(t,d),"comment"===f.type?a(f.idx):"doctype"===f.type?s(f.idx):(f.isOpening&&i(f.name,f.idx),f.isClosing&&n(f.name,f.idx)),V(),d=u+1}function q(){var t=e.slice(d,u);r(t,d),d=u+1}function j(){var t=f.idx+(f.isClosing?2:1);return e.slice(t,u).toLowerCase()}function Y(){u--}d<u&&q()}var H=function(){function e(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.type=e.type||"tag",this.name=e.name||"",this.isOpening=!!e.isOpening,this.isClosing=!!e.isClosing}return e}(),q=function(){function t(e){void 0===e&&(e={}),this.version=t.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(e.urls),this.email="boolean"==typeof e.email?e.email:this.email,this.phone="boolean"==typeof e.phone?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow="boolean"==typeof e.newWindow?e.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(e.stripPrefix),this.stripTrailingSlash="boolean"==typeof e.stripTrailingSlash?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding="boolean"==typeof e.decodePercentEncoding?e.decodePercentEncoding:this.decodePercentEncoding;var i=this.mention;if(!1!==i&&"twitter"!==i&&"instagram"!==i&&"soundcloud"!==i)throw new Error("invalid `mention` cfg - see docs");var n=this.hashtag;if(!1!==n&&"twitter"!==n&&"facebook"!==n&&"instagram"!==n)throw new Error("invalid `hashtag` cfg - see docs");this.truncate=this.normalizeTruncateCfg(e.truncate),this.className=e.className||this.className,this.replaceFn=e.replaceFn||this.replaceFn,this.context=e.context||this}return t.link=function(e,i){return new t(i).link(e)},t.parse=function(e,i){return new t(i).parse(e)},t.prototype.normalizeUrlsCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{schemeMatches:e,wwwMatches:e,tldMatches:e}:{schemeMatches:"boolean"!=typeof e.schemeMatches||e.schemeMatches,wwwMatches:"boolean"!=typeof e.wwwMatches||e.wwwMatches,tldMatches:"boolean"!=typeof e.tldMatches||e.tldMatches}},t.prototype.normalizeStripPrefixCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{scheme:e,www:e}:{scheme:"boolean"!=typeof e.scheme||e.scheme,www:"boolean"!=typeof e.www||e.www}},t.prototype.normalizeTruncateCfg=function(t){return"number"==typeof t?{length:t,location:"end"}:e(t||{},{length:Number.POSITIVE_INFINITY,location:"end"})},t.prototype.parse=function(e){var t=this,i=["a","style","script"],n=0,o=[];return W(e,{onOpenTag:function(e){i.indexOf(e)>=0&&n++},onText:function(e,i){if(0===n){var a=r(e,/( | |<|<|>|>|"|"|')/gi),s=i;a.forEach((function(e,i){if(i%2==0){var n=t.parseText(e,s);o.push.apply(o,n)}s+=e.length}))}},onCloseTag:function(e){i.indexOf(e)>=0&&(n=Math.max(n-1,0))},onComment:function(e){},onDoctype:function(e){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},t.prototype.compactMatches=function(e){e.sort((function(e,t){return e.getOffset()-t.getOffset()}));for(var t=0;t<e.length-1;t++){var i=e[t],n=i.getOffset(),r=i.getMatchedText().length,o=n+r;if(t+1<e.length){if(e[t+1].getOffset()===n){var a=e[t+1].getMatchedText().length>r?t:t+1;e.splice(a,1);continue}e[t+1].getOffset()<o&&e.splice(t+1,1)}}return e},t.prototype.removeUnwantedMatches=function(e){return this.hashtag||n(e,(function(e){return"hashtag"===e.getType()})),this.email||n(e,(function(e){return"email"===e.getType()})),this.phone||n(e,(function(e){return"phone"===e.getType()})),this.mention||n(e,(function(e){return"mention"===e.getType()})),this.urls.schemeMatches||n(e,(function(e){return"url"===e.getType()&&"scheme"===e.getUrlMatchType()})),this.urls.wwwMatches||n(e,(function(e){return"url"===e.getType()&&"www"===e.getUrlMatchType()})),this.urls.tldMatches||n(e,(function(e){return"url"===e.getType()&&"tld"===e.getUrlMatchType()})),e},t.prototype.parseText=function(e,t){void 0===t&&(t=0),t=t||0;for(var i=this.getMatchers(),n=[],r=0,o=i.length;r<o;r++){for(var a=i[r].parseMatches(e),s=0,l=a.length;s<l;s++)a[s].setOffset(t+a[s].getOffset());n.push.apply(n,a)}return n},t.prototype.link=function(e){if(!e)return"";for(var t=this.parse(e),i=[],n=0,r=0,o=t.length;r<o;r++){var a=t[r];i.push(e.substring(n,a.getOffset())),i.push(this.createMatchReturnVal(a)),n=a.getOffset()+a.getMatchedText().length}return i.push(e.substring(n)),i.join("")},t.prototype.createMatchReturnVal=function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this.context,e)),"string"==typeof t?t:!1===t?e.getMatchedText():t instanceof a?t.toAnchorString():e.buildTag().toAnchorString()},t.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var e=this.getTagBuilder(),t=[new z({tagBuilder:e,serviceName:this.hashtag}),new N({tagBuilder:e}),new V({tagBuilder:e}),new k({tagBuilder:e,serviceName:this.mention}),new G({tagBuilder:e,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=t},t.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new c({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},t.version="3.11.0",t.AnchorTagBuilder=c,t.HtmlTag=a,t.matcher={Email:N,Hashtag:z,Matcher:y,Mention:k,Phone:V,Url:G},t.match={Email:_,Hashtag:m,Match:h,Mention:g,Phone:x,Url:v},t}();return q}()}(be$c);var zr=be$c.Autolinker;function o$u(e,t){this.position=e,this.headingPitchRange=t}function l$s(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new o$1h,this.tourEnd=new o$1h,this.entryStart=new o$1h,this.entryEnd=new o$1h,this._activeEntries=[]}function h$r(e){for(var t=e.pop();void 0!==t;t=e.pop())t.stop()}function f$q(e,t,i){var n=this.playlist[this.playlistIndex];if(n){var r=y$o.bind(this,e,t,i);if(this._activeEntries.push(n),this.entryStart.raiseEvent(n),n.blocking)n.play(r,e.scene.camera,t);else{var o=this;n.play((function(){o.entryEnd.raiseEvent(n);var e=o._activeEntries.indexOf(n);e>=0&&o._activeEntries.splice(e,1)})),r(e,t,i)}}else e$2b(i)&&i(!1)}function y$o(e,t,i,n){var r=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(r,n),n)i(n);else{var o=this._activeEntries.indexOf(r);o>=0&&this._activeEntries.splice(o,1),this.playlistIndex++,f$q.call(this,e,t,i)}}function a$m(e,t,i){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=i,this.flyToMode=t}function i$r(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}l$s.prototype.addPlaylistEntry=function(e){this.playlist.push(e)},l$s.prototype.play=function(e,t){this.tourStart.raiseEvent();var i=this;f$q.call(this,e,t,(function(e){i.playlistIndex=0,e||h$r(i._activeEntries),i.tourEnd.raiseEvent(e)}))},l$s.prototype.stop=function(){h$r(this._activeEntries)},a$m.prototype.play=function(e,t,i){if(this.activeCamera=t,e$2b(e)&&null!==e){var n=this;this.activeCallback=function(t){delete n.activeCallback,delete n.activeCamera,e(!e$2b(t)&&t)}}var r=this.getCameraOptions(i);if(this.view.headingPitchRoll)t.flyTo(r);else if(this.view.headingPitchRange){var o=new i$1c(this.view.position);t.flyToBoundingSphere(o,r)}},a$m.prototype.stop=function(){e$2b(this.activeCamera)&&this.activeCamera.cancelFlight(),e$2b(this.activeCallback)&&this.activeCallback(!0)},a$m.prototype.getCameraOptions=function(e){var t={duration:this.duration};return e$2b(this.activeCallback)&&(t.complete=this.activeCallback),"smooth"===this.flyToMode&&(t.easingFunction=m$W.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),e$2b(e)&&(t=p$19(t,e)),t},i$r.prototype.play=function(e){var t=this;this.activeCallback=e,this.timeout=setTimeout((function(){delete t.activeCallback,e(!1)}),1e3*this.duration)},i$r.prototype.stop=function(){clearTimeout(this.timeout),e$2b(this.activeCallback)&&this.activeCallback(!0)};var ir$1={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){var t=e.toLowerCase();return t=a$13(t),ir$1[t]}},xe$7;typeof DOMParser<"u"&&(xe$7=new DOMParser);var dt$4=new zr({stripPrefix:!1,email:!1,replaceFn:function(e){if(!e.protocolUrlMatch)return!1}}),ee$b=32,ar=2414016,nr=1,or=16093e3,lr=.1,sr$1=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],mr=["http://www.google.com/kml/ext/2.2"],pt$4=["http://www.w3.org/2005/Atom"],m$m={kml:sr$1,gx:mr,atom:pt$4,kmlgx:sr$1.concat(mr)},Ue$5={Document:Er$1,Folder:Ct$3,Placemark:Et$3,NetworkLink:At$2,GroundOverlay:Dt$2,PhotoOverlay:We$5,ScreenOverlay:We$5,Tour:Pt$2};function Q$k(e){this._dataSource=e,this._deferred=o$1l.defer(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}function vt$2(e){var t=e.slice(0,Math.min(4,e.size)),i=o$1l.defer(),n=new FileReader;return n.addEventListener("load",(function(){i.resolve(1347093252===new DataView(n.result).getUint32(0,!1))})),n.addEventListener("error",(function(){i.reject(n.error)})),n.readAsArrayBuffer(t),i.promise}function fr(e){var t=o$1l.defer(),i=new FileReader;return i.addEventListener("load",(function(){t.resolve(i.result)})),i.addEventListener("error",(function(){t.reject(i.error)})),i.readAsText(e),t.promise}function ur(e){var t,i,n,r={xsi:"http://www.w3.org/2001/XMLSchema-instance"};for(var o in r)r.hasOwnProperty(o)&&(n="xmlns:"+o+"=",RegExp("[< ]"+o+":").test(e)&&-1===e.indexOf(n)&&(e$2b(t)||(t=e.substr(0,e.indexOf("<kml")+4),i=e.substr(t.length)),t+=" "+n+'"'+r[o]+'"'));return e$2b(t)&&(e=t+i),e}function dr(e){for(var t,i,n,r=e.indexOf("xmlns:"),o=e.indexOf(">",r);-1!==r&&r<o;)t=e.slice(r,e.indexOf('"',r)),i=r,-1!==(r=e.indexOf(t,r+1))?(n=e.indexOf('"',e.indexOf('"',r)+1),r=(e=e.slice(0,r-1)+e.slice(n+1,e.length)).indexOf("xmlns:",i-1)):r=e.indexOf("xmlns:",i+1);return e}function ct$3(e,t,i){e.getData(new he$8.TextWriter,(function(e){e=dr(e=ur(e)),t.kml=xe$7.parseFromString(e,"application/xml"),i.resolve()}))}function Ae$9(e,t,i){var n=u$_(ir$1.detectFromFilename(e.filename),"application/octet-stream");e.getData(new he$8.Data64URIWriter(n),(function(n){t[e.filename]=n,i.resolve()}))}function pr(e,t,i,n){for(var r=n.keys,o=new h$16("."),a=e.querySelectorAll(t),s=0;s<a.length;s++){var l=a[s],u=new h$16(l.getAttribute(i)).resolve(o).toString(),c=r.indexOf(u);if(-1!==c){var h=r[c];l.setAttribute(i,n[h]),"a"===t&&null===l.getAttribute("download")&&l.setAttribute("download",h)}}}function vr(e,t,i,n){for(var r=e.querySelectorAll(t),o=0;o<r.length;o++){var a=r[o],s=we$6(a.getAttribute(i),n);a.setAttribute(i,s.url)}}function cr(e,t,i){var n=W$o(e,"id");n=e$2b(n)&&0!==n.length?n:e$1Q(),e$2b(i)&&(n=i+n);var r=t.getById(n);return e$2b(r)&&(n=e$1Q(),e$2b(i)&&(n=i+n)),e$2b((r=t.add(new h$V({id:n}))).kml)||(r.addProperty("kml"),r.kml=new Kt$1),r}function ve$8(e,t){return"absolute"===e||"relativeToGround"===e||"relativeToSeaFloor"===t}function fe$6(e,t){if(!e$2b(e))return o$1p.fromDegrees(0,0,0,t);var i=e.match(/[^\s,\n]+/g);if(!e$2b(i))return o$1p.fromDegrees(0,0,0,t);var n=parseFloat(i[0]),r=parseFloat(i[1]),o=parseFloat(i[2]);return n=isNaN(n)?0:n,r=isNaN(r)?0:r,o=isNaN(o)?0:o,o$1p.fromDegrees(n,r,o,t)}function Te$9(e,t){if(e$2b(e)){var i=e.textContent.match(/[^\s\n]+/g);if(e$2b(i)){for(var n=i.length,r=new Array(n),o=0,a=0;a<n;a++)r[o++]=fe$6(i[a],t);return r}}}function hr(e,t){if(e$2b(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function W$o(e,t){if(e$2b(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function y$n(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function gr(e,t,i){if(e$2b(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function H$u(e,t,i){if(!e$2b(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}function I$t(e,t,i){var n=y$n(e,t,i);if(e$2b(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function T$n(e,t,i){var n=y$n(e,t,i);if(e$2b(n))return n.textContent.trim()}function q$m(e,t,i){var n=y$n(e,t,i);if(e$2b(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function we$6(e,t,i){if(e$2b(e)){var n;if(e$2b(i)){var r=i[e=e.replace(/\\/g,"/")];if(e$2b(r))n=new t$11({url:r});else{var o=new h$16(t.getUrlComponent());e$2b(r=i[new h$16(e).resolve(o)])&&(n=new t$11({url:r}))}}return e$2b(n)||(n=e$2b(t)?t.getDerivedResource({url:e}):new t$11({url:e})),n}}Object.defineProperties(Q$k.prototype,{dataSource:{get:function(){return this._dataSource}}}),Q$k.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0},Q$k.prototype.addPromise=function(e){this._promises.push(e)},Q$k.prototype.wait=function(){var e=this._deferred;return this._used||e.resolve(),o$1l.join(e.promise,o$1l.all(this._promises))},Q$k.prototype.process=function(){var e=1===this._stack.length;return e&&(this._started=U$m._getTimestamp()),this._process(e)},Q$k.prototype._giveUpTime=function(){if(!this._timeoutSet){this._timeoutSet=!0,this._timeThreshold=50;var e=this;setTimeout((function(){e._timeoutSet=!1,e._started=U$m._getTimestamp(),e._process(!0)}),0)}},Q$k.prototype._nextNode=function(){var e=this._stack,t=e[e.length-1],i=t.index,n=t.nodes;if(i!==n.length)return++t.index,n[i]},Q$k.prototype._pop=function(){var e=this._stack;return e.pop(),0!==e.length||(this._deferred.resolve(),!1)},Q$k.prototype._process=function(e){for(var t=this.dataSource,i=this._stack[this._stack.length-1].processingData,n=this._nextNode();e$2b(n);){var r=Ue$5[n.localName];if(e$2b(r)&&(-1!==m$m.kml.indexOf(n.namespaceURI)||-1!==m$m.gx.indexOf(n.namespaceURI))&&(r(t,n,i,this),this._timeoutSet||U$m._getTimestamp()>this._started+this._timeThreshold))return void this._giveUpTime();n=this._nextNode()}this._pop()&&e&&this._process(!0)};var G$o={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function Fe$8(e,t){if(e$2b(e)&&!/^\s*$/gm.test(e)){"#"===e[0]&&(e=e.substring(1));var i=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,o=parseInt(e.substring(6,8),16)/255;return t?(o>0?(G$o.maximumRed=o,G$o.red=void 0):(G$o.maximumRed=void 0,G$o.red=0),r>0?(G$o.maximumGreen=r,G$o.green=void 0):(G$o.maximumGreen=void 0,G$o.green=0),n>0?(G$o.maximumBlue=n,G$o.blue=void 0):(G$o.maximumBlue=void 0,G$o.blue=0),G$o.alpha=i,e$1U.fromRandom(G$o)):new e$1U(o,r,n,i)}}function ne$d(e,t,i){var n=T$n(e,t,i);if(e$2b(n))return Fe$8(n,"random"===T$n(e,"colorMode",i))}function ht$2(e){var t=y$n(e,"TimeStamp",m$m.kmlgx),i=T$n(t,"when",m$m.kmlgx);if(e$2b(t)&&e$2b(i)&&0!==i.length){var n=a$15.fromIso8601(i),r=new c$z;return r.addInterval(new d$W({start:n,stop:o$H.MAXIMUM_VALUE})),r}}function gt$3(e){var t=y$n(e,"TimeSpan",m$m.kmlgx);if(e$2b(t)){var i,n=y$n(t,"begin",m$m.kmlgx),r=e$2b(n)?a$15.fromIso8601(n.textContent):void 0,o=y$n(t,"end",m$m.kmlgx),a=e$2b(o)?a$15.fromIso8601(o.textContent):void 0;if(e$2b(r)&&e$2b(a)){if(a$15.lessThan(a,r)){var s=r;r=a,a=s}(i=new c$z).addInterval(new d$W({start:r,stop:a}))}else e$2b(r)?(i=new c$z).addInterval(new d$W({start:r,stop:o$H.MAXIMUM_VALUE})):e$2b(a)&&(i=new c$z).addInterval(new d$W({start:o$H.MINIMUM_VALUE,stop:a}));return i}}function kr(){var e=new n$T;return e.width=ee$b,e.height=ee$b,e.scaleByDistance=new o$Y(ar,nr,or,lr),e.pixelOffsetScaleByDistance=new o$Y(ar,nr,or,lr),e}function Ve$7(){var e=new l$Z;return e.outline=!0,e.outlineColor=e$1U.WHITE,e}function _r(){var e=new n$O;return e.translucencyByDistance=new o$Y(3e6,1,5e6,0),e.distanceDisplayCondition=new r$Y(0,8e4),e.pixelOffset=new o$1o(17,0),e.horizontalOrigin=j$T.LEFT,e.font="16px sans-serif",e.style=R$Q.FILL_AND_OUTLINE,e}function xr$1(e,t,i,n,r){var o=T$n(e,"href",m$m.kml);if(e$2b(o)&&0!==o.length){var a=we$6(o,i,n);if(r){var s=T$n(e,"refreshMode",m$m.kml),l=T$n(e,"viewRefreshMode",m$m.kml);"onInterval"===s||"onExpire"===s?e$1$("kml-refreshMode-"+s,"KML - Unsupported Icon refreshMode: "+s):("onStop"===l||"onRegion"===l)&&e$1$("kml-refreshMode-"+l,"KML - Unsupported Icon viewRefreshMode: "+l);var u=u$_(T$n(e,"viewBoundScale",m$m.kml),1),c="onStop"===l?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",h=u$_(T$n(e,"viewFormat",m$m.kml),c),d=T$n(e,"httpQuery",m$m.kml);e$2b(h)&&a.setQueryParameters(m$1a(Le$9(h))),e$2b(d)&&a.setQueryParameters(m$1a(Le$9(d)));var f=t._ellipsoid;return He$4(a,t._camera,t._canvas,u,t._lastCameraView.bbox,f),a}return a}}function kt$2(e,t,i,n,r){var o=I$t(t,"scale",m$m.kml),a=I$t(t,"heading",m$m.kml),s=ne$d(t,"color",m$m.kml),l=y$n(t,"Icon",m$m.kml),u=xr$1(l,e,n,r,!1);e$2b(l)&&!e$2b(u)&&(u=!1);var c,h,d=I$t(l,"x",m$m.gx),f=I$t(l,"y",m$m.gx),p=I$t(l,"w",m$m.gx),_=I$t(l,"h",m$m.gx),m=y$n(t,"hotSpot",m$m.kml),g=hr(m,"x"),x=hr(m,"y"),v=W$o(m,"xunits"),y=W$o(m,"yunits"),$=i.billboard;e$2b($)||($=kr(),i.billboard=$),$.image=u,$.scale=o,$.color=s,(e$2b(d)||e$2b(f)||e$2b(p)||e$2b(_))&&($.imageSubRegion=new f$18(d,f,p,_)),e$2b(a)&&0!==a&&($.rotation=e$2a.toRadians(-a),$.alignedAxis=o$1p.UNIT_Z),o=u$_(o,1),e$2b(g)&&("pixels"===v?c=-g*o:"insetPixels"===v?c=(g-ee$b)*o:"fraction"===v&&(c=-g*ee$b*o),c+=.5*ee$b*o),e$2b(x)&&("pixels"===y?h=x*o:"insetPixels"===y?h=(-x+ee$b)*o:"fraction"===y&&(h=x*ee$b*o),h-=.5*ee$b*o),(e$2b(c)||e$2b(h))&&($.pixelOffset=new o$1o(c,h))}function Me$9(e,t,i,n,r){for(var o=0,a=t.childNodes.length;o<a;o++){var s=t.childNodes.item(o);if("IconStyle"===s.localName)kt$2(e,s,i,n,r);else if("LabelStyle"===s.localName){var l=i.label;e$2b(l)||(l=_r(),i.label=l),l.scale=u$_(I$t(s,"scale",m$m.kml),l.scale),l.fillColor=u$_(ne$d(s,"color",m$m.kml),l.fillColor),l.text=i.name}else if("LineStyle"===s.localName){var u=i.polyline;e$2b(u)||(u=new a$L,i.polyline=u),u.width=I$t(s,"width",m$m.kml),u.material=ne$d(s,"color",m$m.kml),e$2b(ne$d(s,"outerColor",m$m.gx))&&e$1$("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),e$2b(I$t(s,"outerWidth",m$m.gx))&&e$1$("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),e$2b(I$t(s,"physicalWidth",m$m.gx))&&e$1$("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),e$2b(q$m(s,"labelVisibility",m$m.gx))&&e$1$("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if("PolyStyle"===s.localName){var c=i.polygon;e$2b(c)||(c=Ve$7(),i.polygon=c),c.material=u$_(ne$d(s,"color",m$m.kml),c.material),c.fill=u$_(q$m(s,"fill",m$m.kml),c.fill),c.outline=u$_(q$m(s,"outline",m$m.kml),c.outline)}else if("BalloonStyle"===s.localName){var h=u$_(Fe$8(T$n(s,"bgColor",m$m.kml)),e$1U.WHITE),d=u$_(Fe$8(T$n(s,"textColor",m$m.kml)),e$1U.BLACK),f=T$n(s,"text",m$m.kml);i.addProperty("balloonStyle"),i.balloonStyle={bgColor:h,textColor:d,text:f}}else if("ListStyle"===s.localName){var p=T$n(s,"listItemType",m$m.kml);("radioFolder"===p||"checkOffOnly"===p)&&e$1$("kml-listStyle-"+p,"KML - Unsupported ListStyle with listItemType: "+p)}}}function _t$3(e,t,i,n,r){for(var o,a=new h$V,s=-1,l=t.childNodes,u=l.length,c=0;c<u;c++){var h=l[c];("Style"===h.localName||"StyleMap"===h.localName)&&(s=c)}if(-1!==s){var d=l[s];if("Style"===d.localName)Me$9(e,d,a,n,r);else for(var f=H$u(d,"Pair",m$m.kml),p=0;p<f.length;p++){var _=f[p],m=T$n(_,"key",m$m.kml);if("normal"===m){var g=T$n(_,"styleUrl",m$m.kml);if(e$2b(g))e$2b(o=i.getById(g))||(o=i.getById("#"+g)),e$2b(o)&&a.merge(o);else Me$9(e,y$n(_,"Style",m$m.kml),a,n,r)}else e$1$("kml-styleMap-"+m,"KML - Unsupported StyleMap key: "+m)}}var x=T$n(t,"styleUrl",m$m.kml);if(e$2b(x)){var v=x;if("#"!==x[0]&&-1!==x.indexOf("#")){var y=x.split("#"),$=y[0];v=n.getDerivedResource({url:$}).getUrlComponent()+"#"+y[1]}e$2b(o=i.getById(v))||(o=i.getById("#"+v)),e$2b(o)&&a.merge(o)}return a}function xt$3(e,t,i){return t.fetchXML().then((function(n){return Tr(e,n,i,t,!0)}))}function Tr(e,t,i,n,r,o){var a,s,l,u,c=gr(t,"Style",m$m.kml);if(e$2b(c)){var h=c.length;for(a=0;a<h;a++)e$2b(s=W$o(u=c[a],"id"))&&(s="#"+s,r&&e$2b(n)&&(s=n.getUrlComponent()+s),e$2b(i.getById(s))||(l=new h$V({id:s}),i.add(l),Me$9(e,u,l,n,o)))}var d=gr(t,"StyleMap",m$m.kml);if(e$2b(d)){var f=d.length;for(a=0;a<f;a++){var p=d[a];if(e$2b(s=W$o(p,"id")))for(var _=H$u(p,"Pair",m$m.kml),m=0;m<_.length;m++){var g=_[m],x=T$n(g,"key",m$m.kml);if("normal"===x){if(s="#"+s,r&&e$2b(n)&&(s=n.getUrlComponent()+s),!e$2b(i.getById(s))){l=i.getOrCreateEntity(s);var v=T$n(g,"styleUrl",m$m.kml);if(e$2b(v)){"#"!==v[0]&&(v="#"+v),r&&e$2b(n)&&(v=n.getUrlComponent()+v);var y=i.getById(v);e$2b(y)&&l.merge(y)}else Me$9(e,u=y$n(g,"Style",m$m.kml),l,n,o)}}else e$1$("kml-styleMap-"+x,"KML - Unsupported StyleMap key: "+x)}}}var $=[],b=t.getElementsByTagName("styleUrl"),T=b.length;for(a=0;a<T;a++){var C=b[a].textContent;if("#"!==C[0]){var S=C.split("#");if(2===S.length){var w=S[0],E=n.getDerivedResource({url:w});$.push(xt$3(e,E,i))}}}return $}function Be$8(e,t,i){var n=new a$p(e,t.id,["position"]),r=new i$s(t.position);t.polyline=e$2b(i.polyline)?i.polyline.clone():new a$L,t.polyline.positions=new n$n([n,r])}function wr$1(e,t){return!e$2b(e)&&!e$2b(t)||"clampToGround"===e?k$P.CLAMP_TO_GROUND:"relativeToGround"===e?k$P.RELATIVE_TO_GROUND:"absolute"===e?k$P.NONE:"clampToSeaFloor"===t?(e$1$("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),k$P.CLAMP_TO_GROUND):"relativeToSeaFloor"===t?(e$1$("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),k$P.RELATIVE_TO_GROUND):(e$2b(e)?e$1$("kml-altitudeMode-unknown","KML - Unknown <kml:altitudeMode>:"+e+", using <kml:altitudeMode>:CLAMP_TO_GROUND."):e$1$("kml-gx:altitudeMode-unknown","KML - Unknown <gx:altitudeMode>:"+t+", using <kml:altitudeMode>:CLAMP_TO_GROUND."),k$P.CLAMP_TO_GROUND)}function Mr$1(e,t,i){return"relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t?e:((e$2b(t)&&"clampToGround"!==t||e$2b(i)&&"clampToSeaFloor"!==i)&&e$1$("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+u$_(t,i)),new i$s(e))}function Tt$4(e,t,i,n){if(e$2b(e)){if("relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t)return e;(e$2b(t)&&"clampToGround"!==t||e$2b(i)&&"clampToSeaFloor"!==i)&&e$1$("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+u$_(t,i));for(var r=e.length,o=0;o<r;o++){var a=e[o];n.scaleToGeodeticSurface(a,a)}return e}}function be$b(e,t,i,n){var r=t.label;e$2b(r)||(r=e$2b(i.label)?i.label.clone():_r(),t.label=r),r.text=t.name;var o=t.billboard;e$2b(o)||(o=e$2b(i.billboard)?i.billboard.clone():kr(),t.billboard=o),e$2b(o.image)?o.image.getValue()||(o.image=void 0):o.image=e._pinBuilder.fromColor(e$1U.YELLOW,64);var a=1;e$2b(o.scale)&&(0!==(a=o.scale.getValue())?r.pixelOffset=new o$1o(16*a+1,-16):(r.pixelOffset=void 0,r.horizontalOrigin=void 0)),e$2b(n)&&e._clampToGround&&(o.heightReference=n,r.heightReference=n,r.pixelOffset=new o$1o(16*a+1,-16))}function br(e,t){var i=e.path;e$2b(i)||((i=new n$N).leadTime=0,e.path=i);var n=t.polyline;e$2b(n)&&(i.material=n.material,i.width=n.width)}function wt$3(e,t,i,n,r){var o=T$n(i,"coordinates",m$m.kml),a=T$n(i,"altitudeMode",m$m.kml),s=T$n(i,"altitudeMode",m$m.gx),l=q$m(i,"extrude",m$m.kml),u=fe$6(o,e._ellipsoid);return n.position=u,be$b(e,n,r,wr$1(a,s)),l&&ve$8(a,s)&&Be$8(t,n,r),!0}function Ir$1(e,t,i,n,r){var o=y$n(i,"coordinates",m$m.kml),a=T$n(i,"altitudeMode",m$m.kml),s=T$n(i,"altitudeMode",m$m.gx),l=q$m(i,"extrude",m$m.kml),u=q$m(i,"tessellate",m$m.kml),c=ve$8(a,s),h=I$t(i,"drawOrder",m$m.gx),d=e._ellipsoid,f=Te$9(o,d),p=r.polyline;if(c&&l){var _=new e$1j;n.wall=_,_.positions=f;var m=r.polygon;e$2b(m)&&(_.fill=m.fill,_.material=m.material),_.outline=!0,e$2b(p)?(_.outlineColor=e$2b(p.material)?p.material.color:e$1U.WHITE,_.outlineWidth=p.width):e$2b(m)&&(_.outlineColor=e$2b(m.material)?m.material.color:e$1U.WHITE)}else if(!e._clampToS3M&&!e._clampToGround||c)e$2b(h)&&e$1$("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),p=e$2b(p)?p.clone():new a$L,n.polyline=p,p.positions=Tt$4(f,a,s,d),(!u||c)&&(p.arcType=m$1f.NONE);else{e._clampToS3M&&(n.clampToS3M=!0,n.classificationType=_0x3b5200.S3M_TILE);var g=new a$L;e._clampToGround&&(g.clampToGround=!0,g.classificationType=e._classificationType),n.polyline=g,g.positions=f,e$2b(p)?(g.material=e$2b(p.material)?p.material.color.getValue(o$H.MINIMUM_VALUE):e$1U.WHITE,g.width=u$_(p.width,1)):(g.material=e$1U.WHITE,g.width=1),g.zIndex=h}return!0}function Mt$3(e,t,i,n,r){var o=y$n(i,"outerBoundaryIs",m$m.kml),a=y$n(o,"LinearRing",m$m.kml),s=y$n(a,"coordinates",m$m.kml),l=e._ellipsoid,u=Te$9(s,l),c=q$m(i,"extrude",m$m.kml),h=ve$8(T$n(i,"altitudeMode",m$m.kml),T$n(i,"altitudeMode",m$m.gx)),d=e$2b(r.polygon)?r.polygon.clone():Ve$7(),f=r.polyline;if(e$2b(f)&&(d.outlineColor=e$2b(f.material)?f.material.color:e$1U.WHITE,d.outlineWidth=f.width),n.polygon=d,h?(d.perPositionHeight=!0,d.extrudedHeight=c?0:void 0):!e._clampToGround&&!e._clampToS3M&&(d.height=0),e._clampToS3M&&(d.classificationType=_0x3b5200.S3M_TILE),e._clampToGround&&(d.classificationType=_0x3b5200.TERRAIN),e$2b(u)){for(var p=new e$1J(u),_=H$u(i,"innerBoundaryIs",m$m.kml),m=0;m<_.length;m++){a=H$u(_[m],"LinearRing",m$m.kml);for(var g=0;g<a.length;g++)e$2b(u=Te$9(s=y$n(a[g],"coordinates",m$m.kml),l))&&p.holes.push(new e$1J(u))}d.hierarchy=p}return!0}function bt$2(e,t,i,n,r){var o=T$n(i,"altitudeMode",m$m.kml),a=T$n(i,"altitudeMode",m$m.gx),s=H$u(i,"coord",m$m.gx),l=H$u(i,"angles",m$m.gx),u=H$u(i,"when",m$m.kml),c=q$m(i,"extrude",m$m.kml),h=ve$8(o,a),d=e._ellipsoid;l.length>0&&e$1$("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");for(var f=Math.min(s.length,u.length),p=[],_=[],m=0;m<f;m++){var g=fe$6(s[m].textContent,d);p.push(g),_.push(a$15.fromIso8601(u[m].textContent))}var x=new o$y;return x.addSamples(_,p),n.position=x,be$b(e,n,r,wr$1(o,a)),br(n,r),n.availability=new c$z,u.length>0&&n.availability.addInterval(new d$W({start:_[0],stop:_[_.length-1]})),h&&c&&Be$8(t,n,r),!0}function Lr(e,t,i,n,r,o,a,s,l){var u=e[0],c=e[e.length-1],h=new o$y;h.addSamples(e,t),i.intervals.addInterval(new d$W({start:u,stop:c,isStartIncluded:l,isStopIncluded:l,data:Mr$1(h,a,s)})),n.addInterval(new d$W({start:u,stop:c,isStartIncluded:l,isStopIncluded:l})),r.intervals.addInterval(new d$W({start:u,stop:c,isStartIncluded:l,isStopIncluded:l,data:o}))}function yr(e,t,i,n,r){for(var o,a,s,l=q$m(i,"interpolate",m$m.gx),u=H$u(i,"Track",m$m.gx),c=!1,h=new t$l,d=new c$z,f=new t$q,p=e._ellipsoid,_=0,m=u.length;_<m;_++){var g=u[_],x=H$u(g,"when",m$m.kml),v=H$u(g,"coord",m$m.gx),y=T$n(g,"altitudeMode",m$m.kml),$=T$n(g,"altitudeMode",m$m.gx),b=ve$8(y,$),T=q$m(g,"extrude",m$m.kml),C=Math.min(v.length,x.length),S=[];o=[];for(var w=0;w<C;w++){var E=fe$6(v[w].textContent,p);S.push(E),o.push(a$15.fromIso8601(x[w].textContent))}l&&(e$2b(a)&&Lr([a,o[0]],[s,S[0]],f,d,h,!1,"absolute",void 0,!1),a=o[C-1],s=S[S.length-1]),Lr(o,S,f,d,h,b&&T,y,$,!0),c=c||b&&T}return n.availability=d,n.position=f,be$b(e,n,r),br(n,r),c&&(Be$8(t,n,r),n.polyline.show=h),!0}var Cr={Point:wt$3,LineString:Ir$1,LinearRing:Ir$1,Polygon:Mt$3,Track:bt$2,MultiTrack:yr,MultiGeometry:It$3,Model:Gt$1},J$g;function It$3(e,t,i,n,r,o){for(var a=i.childNodes,s=!1,l=0,u=a.length;l<u;l++){var c=a.item(l),h=Cr[c.localName];if(e$2b(h)){var d=cr(c,t,o);d.parent=n,d.name=n.name,d.availability=n.availability,d.description=n.description,d.kml=n.kml,h(e,t,c,d,r)&&(s=!0)}}return s}function Lt$2(e,t){var i=y$n(e,"ExtendedData",m$m.kml);if(e$2b(i)){e$2b(y$n(i,"SchemaData",m$m.kml))&&e$1$("kml-schemaData","KML - SchemaData is unsupported"),e$2b(W$o(i,"xmlns:prefix"))&&e$1$("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");var n={},r=H$u(i,"Data",m$m.kml);if(e$2b(r))for(var o=r.length,a=0;a<o;a++){var s=r[a],l=W$o(s,"name");e$2b(l)&&(n[l]={displayName:T$n(s,"displayName",m$m.kml),value:T$n(s,"value",m$m.kml)})}t.kml.extendedData=n}}function yt$2(e,t,i,n,r){var o,a,s,l,u=t.kml,c=u.extendedData,h=T$n(e,"description",m$m.kml),d=u$_(t.balloonStyle,i.balloonStyle),f=e$1U.WHITE,p=e$1U.BLACK,_=h;if(e$2b(d)&&(f=u$_(d.bgColor,e$1U.WHITE),p=u$_(d.textColor,e$1U.BLACK),_=u$_(d.text,h)),e$2b(_)){if(_=(_=(_=(_=(_=(_=_.replace("$[name]",u$_(t.name,""))).replace("$[description]",u$_(h,""))).replace("$[address]",u$_(u.address,""))).replace("$[Snippet]",u$_(u.snippet,""))).replace("$[id]",t.id)).replace("$[geDirections]",""),e$2b(c)){var m=_.match(/\$\[.+?\]/g);if(null!==m)for(o=0;o<m.length;o++){var g=m[o],x=g.substr(2,g.length-3),v=/\/displayName$/.test(x);e$2b(l=c[x=x.replace(/\/displayName$/,"")])&&(l=v?l.displayName:l.value),e$2b(l)&&(_=_.replace(g,u$_(l,"")))}}}else if(e$2b(c)&&(s=Object.keys(c)).length>0){for(_='<table class="supermap3d-infoBox-defaultTable supermap3d-infoBox-defaultTable-lighter"><tbody>',o=0;o<s.length;o++)_+="<tr><th>"+u$_((l=c[a=s[o]]).displayName,a)+"</th><td>"+u$_(l.value,"")+"</td></tr>";_+="</tbody></table>"}if(e$2b(_)){_=dt$4.link(_),J$g.innerHTML=_;var y=J$g.querySelectorAll("a");for(o=0;o<y.length;o++)y[o].setAttribute("target","_blank");e$2b(n)&&n.keys.length>1&&(pr(J$g,"a","href",n),pr(J$g,"img","src",n)),vr(J$g,"a","href",r),vr(J$g,"img","src",r);var $='<div class="supermap3d-infoBox-description-lighter" style="';$+="overflow:auto;",$+="word-wrap:break-word;",$+="background-color:"+f.toCssColorString()+";",$+="color:"+p.toCssColorString()+";",$+='">',$+=J$g.innerHTML+"</div>",J$g.innerHTML="",t.description=$}}function Ie$6(e,t,i){var n=i.entityCollection,r=i.parentEntity,o=i.sourceResource,a=i.uriResolver,s=cr(t,n,i.context),l=s.kml,u=_t$3(e,t,i.styleCollection,o,a),c=T$n(t,"name",m$m.kml);s.name=c,s.parent=r;var h=gt$3(t);e$2b(h)||(h=ht$2(t)),s.availability=h,ze$5(s);var d=q$m(t,"visibility",m$m.kml);s.show=function e(t){return!t||t.show&&e(t.parent)}(r)&&u$_(d,!0);var f=y$n(t,"author",m$m.atom),p=l.author;p.name=T$n(f,"name",m$m.atom),p.uri=T$n(f,"uri",m$m.atom),p.email=T$n(f,"email",m$m.atom);var _=y$n(t,"link",m$m.atom),m=l.link;m.href=W$o(_,"href"),m.hreflang=W$o(_,"hreflang"),m.rel=W$o(_,"rel"),m.type=W$o(_,"type"),m.title=W$o(_,"title"),m.length=W$o(_,"length"),l.address=T$n(t,"address",m$m.kml),l.phoneNumber=T$n(t,"phoneNumber",m$m.kml),l.snippet=T$n(t,"Snippet",m$m.kml),Lt$2(t,s),yt$2(t,s,u,a,o);var g=e._ellipsoid;return Pr(t,s,g),Sr(t,s,g),e$2b(y$n(t,"Region",m$m.kml))&&e$1$("kml-region","KML - Placemark Regions are unsupported"),{entity:s,styleEntity:u}}function Er$1(e,t,i,n){n.addNodes(t.childNodes,i),n.process()}function Ct$3(e,t,i,n){var r=Ie$6(e,t,i),o=l$1g(i);o.parentEntity=r.entity,Er$1(e,t,o,n)}function Et$3(e,t,i,n){for(var r=Ie$6(e,t,i),o=r.entity,a=r.styleEntity,s=!1,l=t.childNodes,u=0,c=l.length;u<c&&!s;u++){var h=l.item(u),d=Cr[h.localName];e$2b(d)&&(d(e,i.entityCollection,h,o,a,o.id,i.sourceResource),s=!0)}s||(o.merge(a),be$b(e,o,a))}typeof document<"u"&&(J$g=document.createElement("div"));var St$1={FlyTo:Nt$3,Wait:Ot$2,SoundCue:Ke$3,AnimatedUpdate:Ke$3,TourControl:Ke$3};function Pt$2(e,t,i,n){var r=new l$s(T$n(t,"name",m$m.kml),W$o(t,"id")),o=y$n(t,"Playlist",m$m.gx);if(o)for(var a=e._ellipsoid,s=o.childNodes,l=0;l<s.length;l++){var u=s[l];if(u.localName){var c=St$1[u.localName];c?c(r,u,a):console.log("Unknown KML Tour playlist entry type "+u.localName)}}e$2b(e.kmlTours)||(e.kmlTours=[]),e.kmlTours.push(r)}function Ke$3(e,t){e$1$("KML Tour unsupported node "+t.localName)}function Ot$2(e,t){var i=I$t(t,"duration",m$m.gx);e.addPlaylistEntry(new i$r(i))}function Nt$3(e,t,i){var n=I$t(t,"duration",m$m.gx),r=T$n(t,"flyToMode",m$m.gx),o={kml:{}};Pr(t,o,i),Sr(t,o,i);var a=new a$m(n,r,o.kml.lookAt||o.kml.camera);e.addPlaylistEntry(a)}function Sr(e,t,i){var n=y$n(e,"Camera",m$m.kml);if(e$2b(n)){var r=u$_(I$t(n,"longitude",m$m.kml),0),o=u$_(I$t(n,"latitude",m$m.kml),0),a=u$_(I$t(n,"altitude",m$m.kml),0),s=u$_(I$t(n,"heading",m$m.kml),0),l=u$_(I$t(n,"tilt",m$m.kml),0),u=u$_(I$t(n,"roll",m$m.kml),0),c=o$1p.fromDegrees(r,o,a,i),h=i$15.fromDegrees(s,l-90,u);t.kml.camera=new o$v(c,h)}}function Pr(e,t,i){var n=y$n(e,"LookAt",m$m.kml);if(e$2b(n)){var r=u$_(I$t(n,"longitude",m$m.kml),0),o=u$_(I$t(n,"latitude",m$m.kml),0),a=u$_(I$t(n,"altitude",m$m.kml),0),s=I$t(n,"heading",m$m.kml),l=I$t(n,"tilt",m$m.kml),u=u$_(I$t(n,"range",m$m.kml),0);l=e$2a.toRadians(u$_(l,0));var c=new a$T(s=e$2a.toRadians(u$_(s,0)),l-e$2a.PI_OVER_TWO,u),h=o$1p.fromDegrees(r,o,a,i);t.kml.lookAt=new o$u(h,c)}}function Dt$2(e,t,i,n){var r,o=Ie$6(e,t,i).entity,a=!1,s=e._ellipsoid,l=Te$9(y$n(t,"LatLonQuad",m$m.gx),s),u=I$t(t,"drawOrder",m$m.kml);if(e$2b(l))(r=Ve$7()).hierarchy=new e$1J(l),r.zIndex=u,o.polygon=r,a=!0;else{(r=new n$L).zIndex=u,o.rectangle=r;var c=y$n(t,"LatLonBox",m$m.kml);if(e$2b(c)){var h=I$t(c,"west",m$m.kml),d=I$t(c,"south",m$m.kml),f=I$t(c,"east",m$m.kml),p=I$t(c,"north",m$m.kml);e$2b(h)&&(h=e$2a.negativePiToPi(e$2a.toRadians(h))),e$2b(d)&&(d=e$2a.clampToLatitudeRange(e$2a.toRadians(d))),e$2b(f)&&(f=e$2a.negativePiToPi(e$2a.toRadians(f))),e$2b(p)&&(p=e$2a.clampToLatitudeRange(e$2a.toRadians(p))),r.coordinates=new h$18(h,d,f,p);var _=I$t(c,"rotation",m$m.kml);if(e$2b(_)){var m=e$2a.toRadians(_);r.rotation=m,r.stRotation=m}}}var g=y$n(t,"Icon",m$m.kml),x=xr$1(g,e,i.sourceResource,i.uriResolver,!0);if(e$2b(x)){a&&e$1$("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");var v=I$t(g,"x",m$m.gx),y=I$t(g,"y",m$m.gx),$=I$t(g,"w",m$m.gx),b=I$t(g,"h",m$m.gx);(e$2b(v)||e$2b(y)||e$2b($)||e$2b(b))&&e$1$("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),r.material=x,r.material.color=ne$d(t,"color",m$m.kml),r.material.transparent=!0}else r.material=ne$d(t,"color",m$m.kml);var T=T$n(t,"altitudeMode",m$m.kml);e$2b(T)?"absolute"===T?(r.height=I$t(t,"altitude",m$m.kml),r.zIndex=void 0):"clampToGround"!==T&&e$1$("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+T):"relativeToSeaFloor"===(T=T$n(t,"altitudeMode",m$m.gx))?(e$1$("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),r.height=I$t(t,"altitude",m$m.kml),r.zIndex=void 0):"clampToSeaFloor"===T?e$1$("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):e$2b(T)&&e$1$("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+T)}function We$5(e,t,i,n){e._unsupportedNode.raiseEvent(e,i.parentEntity,t,i.entityCollection,i.styleCollection,i.sourceResource,i.uriResolver),e$1$("kml-unsupportedFeature-"+t.nodeName,"KML - Unsupported feature: "+t.nodeName)}var re$c={INTERVAL:0,EXPIRE:1,STOP:2};function Le$9(e){if(!e$2b(e)||0===e.length)return"";var t=e[0];return("&"===t||"?"===t)&&(e=e.substring(1)),e}var Rt$4=new h$18,ue$9=new a$18,Ge$4=new o$1o,Ut$2=new o$1p;function He$4(e,t,i,n,r,o){function a(e){return e<-e$2a.PI_OVER_TWO?-e$2a.PI_OVER_TWO:e>e$2a.PI_OVER_TWO?e$2a.PI_OVER_TWO:e}function s(e){return e>e$2a.PI?e-e$2a.TWO_PI:e<-e$2a.PI?e+e$2a.TWO_PI:e}var l=m$1b(e.queryParameters);if(l=l.replace(/%5B/g,"[").replace(/%5D/g,"]"),e$2b(t)&&t._mode!==C$13.MORPHING){var u,c;if(r=u$_(r,Rt$4),e$2b(i)&&(Ge$4.x=.5*i.clientWidth,Ge$4.y=.5*i.clientHeight,u=t.pickEllipsoid(Ge$4,o,Ut$2)),e$2b(u)?c=o.cartesianToCartographic(u,ue$9):(c=h$18.center(r,ue$9),u=o.cartographicToCartesian(c)),e$2b(n)&&!e$2a.equalsEpsilon(n,1,e$2a.EPSILON9)){var h=r.width*n*.5,d=r.height*n*.5;r=new h$18(s(c.longitude-h),a(c.latitude-d),s(c.longitude+h),a(c.latitude+d))}l=(l=(l=(l=l.replace("[bboxWest]",e$2a.toDegrees(r.west).toString())).replace("[bboxSouth]",e$2a.toDegrees(r.south).toString())).replace("[bboxEast]",e$2a.toDegrees(r.east).toString())).replace("[bboxNorth]",e$2a.toDegrees(r.north).toString());var f=e$2a.toDegrees(c.longitude).toString(),p=e$2a.toDegrees(c.latitude).toString();l=(l=(l=(l=(l=(l=(l=(l=l.replace("[lookatLon]",f)).replace("[lookatLat]",p)).replace("[lookatTilt]",e$2a.toDegrees(t.pitch).toString())).replace("[lookatHeading]",e$2a.toDegrees(t.heading).toString())).replace("[lookatRange]",o$1p.distance(t.positionWC,u))).replace("[lookatTerrainLon]",f)).replace("[lookatTerrainLat]",p)).replace("[lookatTerrainAlt]",c.height.toString()),o.cartesianToCartographic(t.positionWC,ue$9),l=(l=(l=l.replace("[cameraLon]",e$2a.toDegrees(ue$9.longitude).toString())).replace("[cameraLat]",e$2a.toDegrees(ue$9.latitude).toString())).replace("[cameraAlt]",e$2a.toDegrees(ue$9.height).toString());var _=t.frustum,m=_.aspectRatio,g="",x="";if(e$2b(m)){var v=e$2a.toDegrees(_.fov);m>1?(g=v,x=v/m):(x=v,g=v*m)}l=(l=l.replace("[horizFov]",g.toString())).replace("[vertFov]",x.toString())}else l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=l.replace("[bboxWest]","-180")).replace("[bboxSouth]","-90")).replace("[bboxEast]","180")).replace("[bboxNorth]","90")).replace("[lookatLon]","")).replace("[lookatLat]","")).replace("[lookatRange]","")).replace("[lookatTilt]","")).replace("[lookatHeading]","")).replace("[lookatTerrainLon]","")).replace("[lookatTerrainLat]","")).replace("[lookatTerrainAlt]","")).replace("[cameraLon]","")).replace("[cameraLat]","")).replace("[cameraAlt]","")).replace("[horizFov]","")).replace("[vertFov]","");e$2b(i)?l=(l=l.replace("[horizPixels]",i.clientWidth)).replace("[vertPixels]",i.clientHeight):l=(l=l.replace("[horizPixels]","")).replace("[vertPixels]",""),l=(l=(l=(l=(l=l.replace("[terrainEnabled]","1")).replace("[clientVersion]","1")).replace("[kmlVersion]","2.2")).replace("[clientName]","SuperMap3D")).replace("[language]","English"),e.setQueryParameters(m$1a(l))}function At$2(e,t,i,n){var r=Ie$6(e,t,i).entity,o=i.sourceResource,a=i.uriResolver,s=y$n(t,"Link",m$m.kml);if(e$2b(s)||(s=y$n(t,"Url",m$m.kml)),e$2b(s)){var l,u,c=T$n(s,"href",m$m.kml);if(e$2b(c)){var h=c;if(c=we$6(c,o,i.uriResolver),/^data:/.test(c.getUrlComponent()))/\.kmz/i.test(o.getUrlComponent())||(h=o.getDerivedResource({url:h}));else{h=c.clone(),l=T$n(s,"viewRefreshMode",m$m.kml),u=u$_(T$n(s,"viewBoundScale",m$m.kml),1);var d="onStop"===l?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",f=u$_(T$n(s,"viewFormat",m$m.kml),d),p=T$n(s,"httpQuery",m$m.kml);e$2b(f)&&c.setQueryParameters(m$1a(Le$9(f))),e$2b(p)&&c.setQueryParameters(m$1a(Le$9(p)));var _=e._ellipsoid;He$4(c,e._camera,e._canvas,u,e._lastCameraView.bbox,_)}var m={sourceUri:h,uriResolver:a,context:r.id},g=new r$v,x=qe$1(e,g,c,m).then((function(t){var i=e._entityCollection,n=g.values;i.suspendEvents();for(var o=0;o<n.length;o++){var a=n[o];e$2b(a.parent)||(a.parent=r,ze$5(a)),i.add(a)}i.resumeEvents();var h=T$n(s,"refreshMode",m$m.kml),d=u$_(I$t(s,"refreshInterval",m$m.kml),0);if("onInterval"===h&&d>0||"onExpire"===h||"onStop"===l){var f=y$n(t,"NetworkLinkControl",m$m.kml),p=e$2b(f),_=a$15.now(),m={id:e$1Q(),href:c,cookie:{},lastUpdated:_,updating:!1,entity:r,viewBoundScale:u,needsUpdate:!1,cameraUpdateTime:_},x=0;if(p&&(m.cookie=m$1a(u$_(T$n(f,"cookie",m$m.kml),"")),x=u$_(I$t(f,"minRefreshPeriod",m$m.kml),0)),"onInterval"===h)p&&(d=Math.max(x,d)),m.refreshMode=re$c.INTERVAL,m.time=d;else if("onExpire"===h){var v;if(p&&(v=T$n(f,"expires",m$m.kml)),e$2b(v))try{var y=a$15.fromIso8601(v),$=a$15.secondsDifference(y,_);$>0&&$<x&&a$15.addSeconds(_,x,y),m.refreshMode=re$c.EXPIRE,m.time=y}catch{e$1$("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else e$1$("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else e._camera?(m.refreshMode=re$c.STOP,m.time=u$_(I$t(s,"viewRefreshTime",m$m.kml),0)):e$1$("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires a camera be passed in when creating the KmlDataSource");e$2b(m.refreshMode)&&e._networkLinks.set(m.id,m)}else"onRegion"===l&&e$1$("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion")})).otherwise((function(t){e$1$("An error occured during loading "+c.url),e._error.raiseEvent(e,t)}));n.addPromise(x)}}}function Ft$3(e,t,i,n){var r=Ue$5[t.localName];return e$2b(r)?r(e,t,i,n):We$5(e,t,i)}function ye$7(e,t,i,n,r,o){t.removeAll();var a=i.documentElement,s=T$n("Document"===a.localName?a:y$n(a,"Document",m$m.kml),"name",m$m.kml);e$2b(s)||(s=f$O(n.getUrlComponent())),e$2b(e._name)||(e._name=s);var l=new U$m._DeferredLoading(e),u=new r$v(e);return o$1l.all(Tr(e,i,u,n,!1,r)).then((function(){var a=i.documentElement;if("kml"===a.localName)for(var s=a.childNodes,c=0;c<s.length;c++){var h=s[c];if(e$2b(Ue$5[h.localName])){a=h;break}}var d={parentEntity:void 0,entityCollection:t,styleCollection:u,sourceResource:n,uriResolver:r,context:o};return t.suspendEvents(),Ft$3(e,a,d,l),t.resumeEvents(),l.wait().then((function(){return i.documentElement}))}))}function Vt$3(e,t,i,n){var r=o$1l.defer();return he$8.createReader(new he$8.BlobReader(i),(function(i){i.getEntries((function(o){for(var a,s,l=[],u={},c=0;c<o.length;c++){var h=o[c];if(!h.directory){var d=o$1l.defer();l.push(d.promise),!/\.kml$/i.test(h.filename)||e$2b(a)&&/\//i.test(h.filename)?Ae$9(h,u,d):(e$2b(a)&&Ae$9(a,u,s),a=h,s=d)}}e$2b(a)&&ct$3(a,u,s),o$1l.all(l).then((function(){if(i.close(),e$2b(u.kml))return u.keys=Object.keys(u),ye$7(e,t,u.kml,n,u);r.reject(new t$14("KMZ file does not contain a KML document."))})).then(r.resolve).otherwise(r.reject)}))}),(function(e){r.reject(e)})),r.promise}function qe$1(e,t,i,n){var r=(n=u$_(n,u$_.EMPTY_OBJECT)).sourceUri,o=n.uriResolver,a=n.context,s=i;if("string"==typeof i||i instanceof t$11){s=(i=t$11.createIfNeeded(i)).fetchBlob(),r=u$_(r,i.clone());var l=e._resourceCredits,u=i.credits;if(e$2b(u))for(var c=u.length,h=0;h<c;h++)l.push(u[h])}else r=u$_(r,t$11.DEFAULT.clone());return r=t$11.createIfNeeded(r),o$1l(s).then((function(i){return i instanceof Blob?vt$2(i).then((function(n){return n?Vt$3(e,t,i,r):fr(i).then((function(i){var n,s;i=dr(i=ur(i));try{n=xe$7.parseFromString(i,"application/xml")}catch(e){s=e.toString()}if(e$2b(s)||n.body||"parsererror"===n.documentElement.tagName){var l=e$2b(s)?s:n.documentElement.firstChild.nodeValue;throw l||(l=n.body.innerText),new t$14(l)}return ye$7(e,t,n,r,o,a)}))})):ye$7(e,t,i,r,o,a)})).otherwise((function(t){return e._error.raiseEvent(e,t),console.log(t),o$1l.reject(t)}))}function U$m(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).camera,i=e.canvas;if(!e$2b(t))throw new t$16("options.camera is required.");if(!e$2b(i))throw new t$16("options.canvas is required.");this._changed=new o$1h,this._error=new o$1h,this._loading=new o$1h,this._refresh=new o$1h,this._unsupportedNode=new o$1h,this._clock=void 0,this._entityCollection=new r$v(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new s$A,this._networkLinks=new e$1N,this._entityCluster=new a$r,this._canvas=i,this._camera=t,this._lastCameraView={position:e$2b(t)?o$1p.clone(t.positionWC):void 0,direction:e$2b(t)?o$1p.clone(t.directionWC):void 0,up:e$2b(t)?o$1p.clone(t.upWC):void 0,bbox:e$2b(t)?t.computeViewRectangle():h$18.clone(h$18.MAX_VALUE)},this._ellipsoid=u$_(e.ellipsoid,t$13.WGS84),this._visibleViewport=4095;var n=e.credit;"string"==typeof n&&(n=new r$T(n)),this._credit=n,this._resourceCredits=[]}function ze$5(e){var t=e.parent;if(e$2b(t)){var i=t.availability;if(e$2b(i)){var n=e.availability;e$2b(n)?n.intersect(i):e.availability=i}}}function Bt$4(e,t,i,n,r){return function(o){if(n.contains(t.id)){var a=!1,s=y$n(o,"NetworkLinkControl",m$m.kml),l=0;if(e$2b(s)){if(e$2b(y$n(s,"Update",m$m.kml)))return e$1$("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,void n.remove(t.id);t.cookie=m$1a(u$_(T$n(s,"cookie",m$m.kml),"")),l=u$_(I$t(s,"minRefreshPeriod",m$m.kml),0)}var u=a$15.now(),c=t.refreshMode;if(c===re$c.INTERVAL)e$2b(s)&&(t.time=Math.max(l,t.time));else if(c===re$c.EXPIRE){var h;if(e$2b(s)&&(h=T$n(s,"expires",m$m.kml)),e$2b(h))try{var d=a$15.fromIso8601(h),f=a$15.secondsDifference(d,u);f>0&&f<l&&a$15.addSeconds(u,l,d),t.time=d}catch{e$1$("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),a=!0}else e$1$("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),a=!0}var p=t.entity,_=e._entityCollection,m=i.values;_.suspendEvents();var g,x=_.values.slice();for(g=0;g<x.length;++g){var v=x[g];v.parent===p&&(v.parent=void 0,E(v))}for(_.resumeEvents(),_.suspendEvents(),g=0;g<m.length;g++){var y=m[g];e$2b(y.parent)||(y.parent=p,ze$5(y)),_.add(y)}_.resumeEvents(),a?n.remove(t.id):t.lastUpdated=u;var $=_.computeAvailability(),b=$.start,T=$.stop,C=a$15.equals(b,o$H.MINIMUM_VALUE),S=a$15.equals(T,o$H.MAXIMUM_VALUE);if(!C||!S){var w=e._clock;(w.startTime!==b||w.stopTime!==T)&&(w.startTime=b,w.stopTime=T,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,r.getUrlComponent(!0))}function E(e){_.remove(e);for(var t=e._children,i=t.length,n=0;n<i;++n)E(t[n])}}}U$m.load=function(e,t){return new U$m(t=u$_(t,u$_.EMPTY_OBJECT)).load(e,t)},Object.defineProperties(U$m.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},s3mInstanceCollection:{get:function(){return this._s3mInstanceCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2b(e))throw new t$16("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),U$m.prototype.load=function(e,t){if(!e$2b(e))throw new t$16("data is required.");t=u$_(t,u$_.EMPTY_OBJECT),o$A.setLoading(this,!0);var i=this._name;this._name=void 0,this._clampToGround=u$_(t.clampToGround,!1),this._clampToS3M=u$_(t.clampToS3M,!1),this._classificationType=u$_(t.classificationType,_0x3b5200.TERRAIN);var n=this;return qe$1(this,this._entityCollection,e,t).then((function(){var e,t,r=n._entityCollection.computeAvailability(),o=r.start,a=r.stop,s=a$15.equals(o,o$H.MINIMUM_VALUE),l=a$15.equals(a,o$H.MAXIMUM_VALUE);s&&l||(s&&((t=new Date).setHours(0,0,0,0),o=a$15.fromDate(t)),l&&((t=new Date).setHours(24,0,0,0),a=a$15.fromDate(t)),(e=new e$y).startTime=o,e.stopTime=a,e.currentTime=a$15.clone(o),e.clockRange=tt$9.LOOP_STOP,e.clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER,e.multiplier=Math.round(Math.min(Math.max(a$15.secondsDifference(a,o)/60,1),31556900)));var u=!1;return e!==n._clock&&(n._clock=e,u=!0),i!==n._name&&(u=!0),u&&n._changed.raiseEvent(n),o$A.setLoading(n,!1),n})).otherwise((function(e){return o$A.setLoading(n,!1),n._error.raiseEvent(n,e),console.log(e),o$1l.reject(e)}))};var je$5=new e$1N;function Kt$1(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}function Wt$3(e,t,i,n){var r=(n=u$_(n,u$_.EMPTY_OBJECT)).sourceUri;return o$1l(fr(i)).then((function(i){var n,o;try{n=xe$7.parseFromString(i,"application/xml")}catch(e){o=e.toString()}if(e$2b(o)||n.body||"parsererror"===n.documentElement.tagName){var a=e$2b(o)?o:n.documentElement.firstChild.nodeValue;throw a||(a=n.body.innerText),new t$14(a)}return ye$7(e,t,n,r,void 0)}))}function Gt$1(e,t,i,n,r,o,a,s){var l,u=y$n(i,"Location",m$m.kml),c=T$n(i,"altitudeMode",m$m.kml),h=T$n(i,"altitudeMode",m$m.gx),d=y$n(i,"Orientation",m$m.kml),f=I$t(d,"heading",m$m.kml),p=I$t(d,"tilt",m$m.kml),_=I$t(d,"roll",m$m.kml),m=y$n(i,"Scale",m$m.kml),g=I$t(m,"x",m$m.kml),x=I$t(m,"y",m$m.kml),v=I$t(m,"z",m$m.kml),y=T$n(y$n(i,"Link",m$m.kml),"href",m$m.kml);if(e$2b(s)&&(l=s[y]),-1!==(y=we$6(y,a,s)).url.indexOf(".s3m")){e$2b(e._s3mInstanceCollection)||(e._s3mInstanceCollection=new _0x448857(e._camera._scene.context),e._camera._scene.primitives.add(e._s3mInstanceCollection));var $=fe$6(T$n(u,"longitude",m$m.kml)+","+T$n(u,"latitude",m$m.kml)+","+T$n(u,"altitude",m$m.kml)),b=-e$2a.toRadians(f),T=e$2a.toRadians(p),C=e$2a.toRadians(_);return e._s3mInstanceCollection.add(y.url,[{position:$,scale:new o$1p(g,x,v),hpr:new i$15(b,T,C)}]),!0}var S=y$n(u,"MultiTrack",m$m.gx);if(e$2b(S))r.billboard=new n$T({show:!1}),r.label=new n$O({show:!1}),yr(e,t,S,n,r),n.orientation=new e$v(n.position);else{$=fe$6(T$n(u,"longitude",m$m.kml)+","+T$n(u,"latitude",m$m.kml)+","+T$n(u,"altitude",m$m.kml));n.position=Mr$1(new r$U($),c,h);var w=m$17.headingPitchRollQuaternion($,i$15.fromDegrees(f,p,_));n.orientation=w}return n.model={uri:y.url,minimumPixelSize:16,maximumScale:16,scale:new o$1p(g,x,v),blob:l},!0}U$m.prototype.update=function(e){var t=this._networkLinks;if(0===t.length)return!0;var i=a$15.now(),n=this;function r(e){for(var t=e._children,i=t.length,n=0;n<i;++n){var o=t[n];je$5.set(o.id,o),r(o)}}je$5.removeAll();var o=!1,a=this._lastCameraView,s=this._camera;e$2b(s)&&!(s.positionWC.equalsEpsilon(a.position,e$2a.EPSILON7)&&s.directionWC.equalsEpsilon(a.direction,e$2a.EPSILON7)&&s.upWC.equalsEpsilon(a.up,e$2a.EPSILON7))&&(a.position=o$1p.clone(s.positionWC),a.direction=o$1p.clone(s.directionWC),a.up=o$1p.clone(s.upWC),a.bbox=s.computeViewRectangle(),o=!0);var l=new e$1N,u=!1;return t.values.forEach((function(e){var t=e.entity;if(!je$5.contains(t.id)){if(!e.updating){var s=!1;if(e.refreshMode===re$c.INTERVAL?a$15.secondsDifference(i,e.lastUpdated)>e.time&&(s=!0):e.refreshMode===re$c.EXPIRE?a$15.greaterThan(i,e.time)&&(s=!0):e.refreshMode===re$c.STOP&&(o&&(e.needsUpdate=!0,e.cameraUpdateTime=i),e.needsUpdate&&a$15.secondsDifference(i,e.cameraUpdateTime)>=e.time&&(s=!0)),s){r(t),e.updating=!0;var c=new r$v,h=e.href.clone();h.setQueryParameters(e.cookie);var d=u$_(n._ellipsoid,t$13.WGS84);He$4(h,n._camera,n._canvas,e.viewBoundScale,a.bbox,d),qe$1(n,c,h,{context:t.id}).then(Bt$4(n,e,c,l,h)).otherwise((function(t){var i="NetworkLink "+e.href+" refresh failed: "+t;console.log(i),n._error.raiseEvent(n,i)})),u=!0}}l.set(e.id,e)}})),u&&(this._networkLinks=l,this._changed.raiseEvent(this)),!0},U$m.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},U$m.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,e$2b(this._s3mInstanceCollection)&&this._s3mInstanceCollection.setVisibleInViewport(e,t)},U$m.importFile=function(e,t){return new U$m(t=u$_(t,u$_.EMPTY_OBJECT)).read(e,t)},U$m.prototype.read=function(e,t){if(!e$2b(e))throw new t$16("data is required.");o$A.setLoading(this,!0);var i=this._name;this._name=void 0,this._promises=[];var n=this;return Wt$3(this,this._entityCollection,e,t).then((function(){return o$1l.all(n._promises,(function(){var e,t,r=n._entityCollection.computeAvailability(),o=r.start,a=r.stop,s=a$15.equals(o,o$H.MINIMUM_VALUE),l=a$15.equals(a,o$H.MAXIMUM_VALUE);s&&l||(s&&((t=new Date).setHours(0,0,0,0),o=a$15.fromDate(t)),l&&((t=new Date).setHours(24,0,0,0),a=a$15.fromDate(t)),(e=new e$y).startTime=o,e.stopTime=a,e.currentTime=a$15.clone(o),e.clockRange=tt$9.LOOP_STOP,e.clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER,e.multiplier=Math.round(Math.min(Math.max(a$15.secondsDifference(a,o)/60,1),31556900)));var u=!1;return e!==n._clock&&(n._clock=e,u=!0),i!==n._name&&(u=!0),u&&n._changed.raiseEvent(n),o$A.setLoading(n,!1),n._promises=void 0,n}))})).otherwise((function(e){return o$A.setLoading(n,!1),n._error.raiseEvent(n,e),console.log(e),o$1l.reject(e)}))},U$m._DeferredLoading=Q$k,U$m._getTimestamp=Et$a;var a$l=e$1U.WHITE,h$q=e$1U.BLACK,s$j=1;function e$u(e){e=u$_(e,u$_.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth,this.vtime=3.14*Math.random(),this._bAsy=u$_(e.bAsy,!0),this._speedRatio=u$_(e.speedRatio,1)}function r$r(){t$16.throwInstantiationError()}Object.defineProperties(e$u.prototype,{isConstant:{get:function(){return r$Z.isConstant(this._color)&&r$Z.isConstant(this._outlineColor)&&r$Z.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$$("color"),outlineColor:C$$("outlineColor"),outlineWidth:C$$("outlineWidth")}),e$u.prototype.getType=function(e){return"PolylineDynamic"},e$u.prototype.getValue=function(e,t){return e$2b(t)||(t={}),t.color=r$Z.getValueOrClonedDefault(this._color,e,a$l,t.color),t.outlineColor=r$Z.getValueOrClonedDefault(this._outlineColor,e,h$q,t.outlineColor),t.outlineWidth=r$Z.getValueOrDefault(this._outlineWidth,e,s$j),t.bAsy=1==this._bAsy?1:0,t.v_time=618e-6*performance.now()-1.9788000000000001-this.vtime,t.v_time*=this._speedRatio,t},e$u.prototype.equals=function(e){return this===e||e instanceof e$u&&r$Z.equals(this._color,e._color)&&r$Z.equals(this._outlineColor,e._outlineColor)&&r$Z.equals(this._outlineWidth,e._outlineWidth)},r$r.prototype.update=t$16.throwInstantiationError,r$r.prototype.getBoundingSphere=t$16.throwInstantiationError,r$r.prototype.isDestroyed=t$16.throwInstantiationError,r$r.prototype.destroy=t$16.throwInstantiationError;var e$t={StopPause:"StopPause",StopAround:"StopAround"},A$q=Object.freeze(e$t);function e$s(e){this._duration=u$_(e.duration,10),this._waitTime=u$_(e.waitTime,0),this._point=e.point,this._heading=u$_(e.heading,0),this._tilt=u$_(e.tilt,0),this._stopName=e.stopName,this._speed=u$_(e.speed,0),this._stopPlayMode=e.stopPlayMode||A$q.StopPause,this._surroundDuration=u$_(e.surroundDuration,0),this._promise=void 0,this._index=u$_(e.index,0),this._nextStopIndex=void 0,this._preStopIndex=void 0,this._isConvert=u$_(e.isConvert,!0)}Object.defineProperties(e$s.prototype,{duration:{get:function(){return this._duration},set:function(e){e&&(this._duration=e)}},waitTime:{get:function(){return this._waitTime},set:function(e){e&&!this._isGenerated&&(this._waitTime=e)}},heading:{get:function(){return this._heading},set:function(e){e&&(this._heading=e)}},tilt:{get:function(){return this._tilt},set:function(e){e&&(this._tilt=e)}},stopName:{get:function(){return this._stopName},set:function(e){e&&(this._stopName=e)}},point:{get:function(){return this._point},set:function(e){this._point=e}},speed:{get:function(){return this._speed},set:function(e){e&&(this._speed=e)}},stopPlayMode:{get:function(){return this._stopPlayMode},set:function(e){e&&(this._stopPlayMode=e)}},surroundDuration:{get:function(){return this._surroundDuration},set:function(e){e&&(this._surroundDuration=e)}},index:{get:function(){return this._index}},promise:{get:function(){return this._promise},set:function(e){e&&(this._promise=e)}}});var e$r={Smoothly:0,Directly:1},v$p=Object.freeze(e$r),n$l={Playing:0,Pause:1,Stop:2,Wait:3},m$l;function l$r(e){var t=e.scene,i=e.routes;if(!t)throw new t$16("scene is required!");if(!i)throw new t$16("routes is required!");this._routes=i,this._scene=t,this._currentStopIndex=0,this._dynamicCurrentStopIndex=0,this._currentTween=void 0,this._stopArrived=new o$1h,this._playRate=1,this._flyStatus=n$l.Stop,this._turningMode=v$p.Smoothly,this._interpolationMode=j$13.NONE}function c$i(e,t,i){e._flyStatus=n$l.Playing;var n=e._scene.camera,r=e._routes.routes[0],o=r._catmullRomSpline,a=e._interpolationMode,s=r.isFlyLoop,l=r.isHeadingFree,u=r.isTiltFree,c=r.isAltitudeFree,h=u$_(r._stopCollection.get(t),r._stopCollection._array[t]);if(!h)return!0===s?(t=r._stopCollection._array[0].index,e$2b(o)&&(o._lastTimeIndex=0),e._dynamicCurrentStopIndex=t,e.currentStopIndex=t,void c$i(e,t)):void(e._flyStatus=n$l.Stop);if(t===e.currentStopIndex){var d=r.isAlongline&&e$2b(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};n.setView({destination:h.point,orientation:d,convert:h._isConvert}),t++,c$i(e,t)}else{if(h._bImmediately){d=r.isAlongline&&e$2b(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};return n.setView({destination:h.point,orientation:d,convert:h._isConvert}),void g$v(e,h,t)}var f=u$_(r._stopCollection.get(t-1),r._stopCollection.get(h._preStopIndex));e$2b(i)&&(f=i);var p,_=f.altitude<h.altitude?f.altitude:h.altitude;if(f.stopPlayMode===A$q.StopAround)p=f.surroundDuration;else{if(e$2b(i)){var m=o$1p.distance(i.point,h.point);f.duration=m/f.speed}p=f.duration}p/=e._playRate;d=r.isAlongline&&e$2b(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};var g=!1;if(e._turningMode===v$p.Directly&&e$2b(f.direction)){d={direction:f.direction,up:f.up};g=!0}n.flyTo({convert:h._isConvert,destination:h.point,orientation:d,maximumHeight:_,duration:p,headingFree:l,pitchFree:u,altitudeFree:c,directTurning:g,catmullRomSpline:o,preStopIndex:t-1,interpolationMode:a,easingFunction:m$W.LINEAR_NONE,complete:function(){g$v(e,h,t)}})}}function g$v(e,t,i){if(m$l&&clearTimeout(m$l),e._dynamicCurrentStopIndex=t._index,i=u$_(t._nextStopIndex,t._index+1),e._stopArrived.raiseEvent(t),t.promise)o$1l(t.promise,(function(){var n=t.waitTime;n>0?setTimeout((function(){c$i(e,i)}),1e3*n):c$i(e,i)}));else{var n=t.waitTime;n>0?(e._flyStatus=n$l.Wait,m$l=setTimeout((function(){e._flyStatus===n$l.Wait&&(e._flyStatus=n$l.Playing,c$i(e,i))}),1e3*n)):c$i(e,i)}}function f$p(e){e=e||{},this._stopCollection=new e$1N,this._isStopVisible=u$_(e.isStopVisible,!1),this._stopMarkCollection=[],this._isFlyLoop=u$_(e.isFlyLoop,!1),this._isLineVisible=u$_(e.isLineVisible,!1),this._lineEntity=void 0,this._routeName=u$_(e.routeName,""),this._speed=u$_(e.speed,50),this._isAlongline=u$_(e.isAlongline,!1),this._totalDuration=u$_(e.totalDuration,0),this._isHeadingFree=!this._isAlongline&&u$_(e.isHeadingFree,!1),this._isTiltFree=u$_(e.isTiltFree,!1),this._isAltitudeFree=u$_(e.isAltitudeFree,!1),this._entityCollection=e.entityCollection,this._catmullRomSpline=void 0,this._isCleared=!1,this._stopsInfo=u$_(e.stopsInfo,{}),this._removeIndex=[],this._addedStops=[]}function d$x(e){this._entityCollection=e,this._routes=[],this._ready=!1,this._readyPromise=o$1l.defer()}function p$i(e,t){for(var i=e,n=t.firstChild,r=n.namespaceURI,o=h$p(n,"route",r),a=0,s=o.length;a<s;a++){var l=o[a],u=h$p(l,"routestop",r),c=I$s(l,"speed"),h=O$i(l,"name"),d=l$q(l,"showroutestop"),f=l$q(l,"showrouteline"),p=l$q(l,"flycircle"),_=l$q(l,"alongline"),m=l$q(l,"headingfree"),g=l$q(l,"tiltfree"),x=l$q(l,"altitudefree"),v=new f$p({entityCollection:i._entityCollection,routeName:h,speed:c,isLineVisible:f,isFlyLoop:p,isStopVisible:d,isAlongline:_,isHeadingFree:m,isTiltFree:g,isAltitudeFree:x,stopsInfo:{stopNodes:u,namespace:r}});v.init(),i.addRoute(v),i._ready=!0}i._readyPromise.resolve()}function I$s(e,t){if(e$2b(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function O$i(e,t){if(e$2b(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function l$q(e,t){if(e$2b(e)){var i=e.getAttribute(t);if("false"===(i=i.toLowerCase()))return!1;if("true"===i)return!0}}function h$p(e,t,i){if(!e$2b(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}function o$t(){this.Name="",this.NumParts=0,this.NumPoints=0,this.Parts=[],this.Points=[],this.Description="",this.Color=new e$1U(1,1,1),this.Radius=.02}function z$n(e,t){this.a0=80,this.r=35.187*.001,e$2b(t)?(this.a0=e,this.r=t,this.m_sag=new d$w(e,t)):e$2b(e)&&(this.m_sag=new d$w(e)),this.enuCenters=[]}Object.defineProperties(l$r.prototype,{routes:{get:function(){return this._routes},set:function(e){e&&(this._routes=e)}},stopArrived:{get:function(){return this._stopArrived}},currentStopIndex:{get:function(){return e$2b(this._routes.routes[0]._stopCollection.get(this._currentStopIndex))||(this._dynamicCurrentStopIndex=this._currentStopIndex=this._routes.routes[0]._stopCollection._array[0].index),this._currentStopIndex},set:function(e){if(e$2b(e)&&1==this._routes.ready){var t=this._routes.routes[0].stopCollection.length-1;e=(e=e>t?t:e)<0?0:e,this._currentStopIndex=e}}},currentRoute:{get:function(){if(this._routes.ready)return this._routes.routes[0]}},readyPromise:{get:function(){return this._routes.readyPromise}},playRate:{get:function(){return this._playRate},set:function(e){if(e&&0!==e&&this._playRate!==e&&(this._playRate=e,this._flyStatus===n$l.Playing)){this._scene.camera.cancelFlight();var t=this._routes.routes[0].get(this._dynamicCurrentStopIndex),i=new e$s({});for(var n in t)i[n]=t[n];i.point=this._scene.camera._position,c$i(this,this._dynamicCurrentStopIndex+1,i)}}},turningMode:{get:function(){return this._turningMode},set:function(e){this._turningMode=e}},interpolationMode:{get:function(){return this._interpolationMode},set:function(e){this._interpolationMode=e}}}),l$r.prototype.play=function(){if(this.currentRoute&&this._flyStatus!==n$l.Playing)if(this._flyStatus===n$l.Pause||this._flyStatus===n$l.Wait)this._currentTween&&this._scene.camera._currentFlight?(this._currentTween.tweenjs.endPause(),this._flyStatus=n$l.Playing):c$i(this,this._dynamicCurrentStopIndex+1);else{if(this.currentStopIndex>=this._routes.routes[0].stopCollection[this._routes.routes[0].stopCollection.length-1].index)return void(this._flyStatus=n$l.Stop);c$i(this,this.currentStopIndex)}},l$r.prototype.pause=function(){this._flyStatus===n$l.Playing?(this._currentTween=this._scene.camera._currentFlight,this._currentTween&&this._currentTween.tweenjs&&this._currentTween.tweenjs.pause(),this._flyStatus=n$l.Pause):this._flyStatus===n$l.Wait&&(this._flyStatus=n$l.Pause)},l$r.prototype.stop=function(){this._currentTween=this._scene.tweens.get(0),this._currentTween&&this._flyStatus!==n$l.Stop?(this._currentTween.cancelTween(),this._flyStatus=n$l.Stop,this._currentTween=void 0):this._flyStatus===n$l.Wait&&(this._flyStatus=n$l.Stop),this._dynamicCurrentStopIndex=this._currentStopIndex},l$r.prototype.viewToStop=function(e){if(e&&this._flyStatus!==n$l.Playing){var t=this._scene.camera,i={heading:e.heading,pitch:e.tilt,roll:0};t.setView({destination:e.point,orientation:i,convert:e._isConvert}),this._dynamicCurrentStopIndex=e.index}},l$r.prototype.getAllRouteStops=function(){return this.currentRoute?this.currentRoute.stopCollection:[]},Object.defineProperties(f$p.prototype,{stopCollection:{get:function(){return this._stopCollection.values}},isStopVisible:{get:function(){return this._isStopVisible},set:function(e){e$2b(e)&&e!==this._isStopVisible&&(this._isStopVisible=e,this.setStopVisible())}},isFlyLoop:{get:function(){return this._isFlyLoop},set:function(e){e&&(this._isFlyLoop=e)}},isLineVisible:{get:function(){return this._isLineVisible},set:function(e){e$2b(e)&&e!==this._isLineVisible&&(this._isLineVisible=e,this.setLineVisible())}},lineEntity:{get:function(){return this._lineEntity},set:function(e){e$2b(e)&&(this._lineEntity=e)}},routeName:{get:function(){return this._routeName},set:function(e){e&&(this._routeName=e)}},speed:{get:function(){return this._speed},set:function(e){if(e&&e!=this._speed){this._speed=e;for(var t=this.speed,i=this.stopCollection,n=0,r=i.length;n<r-1;n++){var o=i[n];o.duration=Math.ceil(o.distanceToNext/t)}}}},stopCount:{get:function(){return this._stopCollection.length}},isAlongline:{get:function(){return this._isAlongline},set:function(e){e$2b(e)&&(this._isAlongline=e)}},totalDuration:{get:function(){return this._totalDuration}},isHeadingFree:{get:function(){return this._isHeadingFree},set:function(e){e$2b(e)&&(this._isHeadingFree=e)}},isTiltFree:{get:function(){return this._isTiltFree},set:function(e){e$2b(e)&&(this._isTiltFree=e)}},isAltitudeFree:{get:function(){return this._isAltitudeFree},set:function(e){e$2b(e)&&(this._isAltitudeFree=e)}}}),f$p.prototype.init=function(){var e=0,t=[0],i=[],n=this._stopsInfo.stopNodes,r=this._stopsInfo.namespace;n=e$2b(n)?n.concat(this._addedStops):this._addedStops;for(var o=0;o<n.length;o++)if(!(this._removeIndex.indexOf(o)>-1)){var a,s=n[o];if(s instanceof e$s){if(-1!==(a=s)._preStopIndex){var l=(S=this._stopCollection._array[a._preStopIndex]).point,u=o$1p.distance(l,a.point);S.distanceToNext=u}}else{var c=s$S.queryFirstNode(s,"camera",r),h=s$S.queryNumericValue(c,"longitude",r),d=s$S.queryNumericValue(c,"latitude",r),f=s$S.queryNumericValue(c,"altitude",r),p=s$S.queryNumericValue(c,"heading",r);p=e$2a.toRadians(p);var _=s$S.queryNumericValue(c,"tilt",r);_=e$2a.toRadians(_-90),s$S.queryStringValue(c,"altitudeMode",r);var m,g=s$S.queryStringAttribute(s,"name"),x=s$S.queryNumericAttribute(s,"speed",r),v=s$S.queryFirstNode(s,"setting",r),y=s$S.queryStringValue(v,"stopPlayMode",r),$=s$S.queryNumericValue(v,"pauseTime",r),b=s$S.queryNumericValue(v,"angularSpeed",r),T=s$S.queryFirstNode(v,"stopViews",r),C=!0;h>180||d>180?(m=new o$1p(h,d,f),C=!1):m=o$1p.fromDegrees(h,d,f),i.push(m);var S,w=this.stopCount;if(o>0&&w>0)if((S=this._stopCollection._array[this._stopCollection.length-1]).stopPlayMode!=A$q.StopAround){l=S.point,u=o$1p.distance(l,m);S.distanceToNext=u;var E,P=S.speed;E=0<P?P:this._speed,S.duration=u/E,S.speed=E,e+=S.duration,t.push(e)}(a=new e$s({index:o,point:m,heading:p,tilt:_,stopName:g,waitTime:$,speed:x,isConvert:C})).altitude=f}if(this._addStop(a),e$2b(S)&&(S._nextStopIndex=o,a._preStopIndex=S.index),y===A$q.StopAround&&T){var A=queryChildNodes(T,"view",r);if(2==A.length){var L=A[0],M=A[1],R=s$S.queryNumericAttribute(L,"heading",r),O=s$S.queryNumericAttribute(M,"heading",r);s$S.queryNumericAttribute(L,"tilt",r),s$S.queryNumericAttribute(M,"tilt",r),s$S.queryNumericAttribute(L,"altitude",r),s$S.queryNumericAttribute(M,"altitude",r);var I=s$S.queryStringAttribute(L,"direction",r);s$S.queryStringAttribute(M,"direction",r);var D,B="Clockwise"===I?1:-1;e$2a.equalsEpsilon(R,O,e$2a.EPSILON15)?D=360:((D=O-R)<0&&"Clockwise"===I?D+=360:D>0&&"Clockwise"!==I&&(D=360-D),D=Math.abs(D));var N=D/b;a.surroundDuration=N/3,a.stopPlayMode=A$q.StopAround;var F=e$2a.toRadians(R),U=e$2a.toRadians(R+B*D/3),G=e$2a.toRadians(R+B*D*2/3),z=e$2a.toRadians(O),V=new e$s({point:m,heading:F,tilt:_,stopName:g,waitTime:$,speed:x,surroundDuration:N/3,stopPlayMode:A$q.StopAround});V._bImmediately=!0,V._isGenerated=!0,this._addStop(V);var k=new e$s({point:m,heading:U,tilt:_,stopName:g,waitTime:0,speed:x,surroundDuration:N/3,stopPlayMode:A$q.StopAround});k._isGenerated=!0,this._addStop(k);var W=new e$s({point:m,heading:G,tilt:_,stopName:g,waitTime:0,speed:x,surroundDuration:N/3,stopPlayMode:A$q.StopAround});W._isGenerated=!0,this._addStop(W);var H=new e$s({point:m,heading:z,tilt:_,stopName:g,waitTime:$,speed:x});this._addStop(H),e+=N}}}for(var q=0;q<this.stopCount-1;q++){var j=this.stopCollection[q],Y=this.stopCollection[q+1],X=new o$1p(Y.point.x-j.point.x,Y.point.y-j.point.y,Y.point.z-j.point.z);X.equals(o$1p.ZERO)||(o$1p.normalize(X,X),j.direction=X,j.up=m$17.buildUp(j.point,X),this._isTiltFree&&(j.heading=m$17.getHeading(j.direction,j.up)-e$2a.PI))}if(this.stopCount>2){var K=this.stopCollection[this.stopCollection.length-1],Q=this.stopCollection[this.stopCollection.length-2];K.direction=Q.direction,K.up=Q.up,this._isTiltFree&&(K.heading=m$17.getHeading(K.direction,K.up)-e$2a.PI)}i.length>=2&&(this._catmullRomSpline=new c$K({times:t,points:i})),this.setStopVisible(),this._totalDuration=e},f$p.prototype._addStop=function(e){if(!e)throw new t$16("parameter stop is required!");if(!(e instanceof e$s))throw new t$16("parameter stop must be instanceof RouteStop!");if(this._stopCollection.set(e.index,e),e$2b(this._entityCollection)&&this._isStopVisible){var t=this._entityCollection.add({position:e.point,billboard:{image:n$15("Assets/Textures/maki/grepin.png"),scale:.5}});this._stopMarkCollection.push(t)}if(this._isCleared&&this._stopCollection.length>2)if(e$2b(this._catmullRomSpline)){var i=[].concat(this._catmullRomSpline.times),n=[].concat(this._catmullRomSpline.points),r=this._stopCollection.length>0?this._stopCollection._array[this._stopCollection.length-2]._duration:0,o=i.length>0?i[i.length-1]:0;i.push(o+r),n.push(e.point),this._catmullRomSpline=new c$K({times:i,points:n})}else{for(var a=[0],s=[this._stopCollection._array[0].point],l=0,u=1;u<this._stopCollection.length;u++){var c=this._stopCollection._array[u],h=this._stopCollection._array[u-1];s.push(c.point),l+=h.duration,a.push(l)}this._catmullRomSpline=new c$K({times:a,points:s})}return!0},f$p.prototype.addStop=function(e){if(!e)throw new t$16("parameter stop is required!");if(!(e instanceof e$s))throw new t$16("parameter stop must be instanceof RouteStop!");e._preStopIndex=this._stopsInfo.stopNodes.length+this._addedStops.length-1,e._index=e._preStopIndex+1,this._addedStops.push(e),this.clear(),this.init(),this.setLineVisible()},f$p.prototype.removeStop=function(e){this.clear(),-1===this._removeIndex.indexOf(e.index)&&this._removeIndex.push(e.index),this.init(),this.setLineVisible()},f$p.prototype.setLineVisible=function(){if(e$2b(this._entityCollection)){if(!e$2b(this._lineEntity)){for(var e=this.stopCollection,t=e.length,i=[];t--;)i.push(e[t].point);this._lineEntity=this._entityCollection.add({name:this.routeName,polyline:{positions:i,width:5}})}this._lineEntity.show=this._isLineVisible}},f$p.prototype.setStopVisible=function(){if(e$2b(this._entityCollection)){if(0===this._stopMarkCollection.length&&this._isStopVisible)for(var e=this.stopCollection,t=e.length;t--;){var i=e[t],n=this._entityCollection.add({position:i.point,billboard:{image:n$15("Assets/Textures/maki/grepin.png"),scale:.5}});this._stopMarkCollection.push(n)}for(var r=0,o=this._stopMarkCollection.length;r<o;r++){(n=this._stopMarkCollection[r]).show=this._isStopVisible}}},f$p.prototype.get=function(e){return void 0===this._stopCollection.get(e)?this.stopCollection[e]:this._stopCollection.get(e)},f$p.prototype.clear=function(){this._isCleared=!0;for(var e=0;e<this._stopMarkCollection.length;e++)this._entityCollection.remove(this._stopMarkCollection[e]);e$2b(this._lineEntity)&&(this._entityCollection.remove(this._lineEntity),this._lineEntity=void 0),this._stopCollection.removeAll(),e$2b(this._catmullRomSpline)&&(this._catmullRomSpline=void 0)},Object.defineProperties(d$x.prototype,{routes:{get:function(){return this._routes}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}}}),d$x.prototype.addRoute=function(e){if(e&&(this._routes.push(e),e.isLineVisible&&e$2b(this._entityCollection))){for(var t=e.stopCollection,i=t.length,n=[];i--;)n.push(t[i].point);e.lineEntity=this._entityCollection.add({name:e.routeName,polyline:{positions:n,width:5}})}},d$x.prototype.get=function(e){return this._routes[e]},d$x.prototype.fromFile=function(e){var t=this;o$1l(d$1f(e),(function(e){p$i(t,e)}),(function(){t._readyPromise.reject()}))},d$x.prototype.fromXML=function(e){if(!e$2b(e))throw new t$16("xml content is required to create routes!");var t=(new DOMParser).parseFromString(e,"text/xml");try{p$i(this,t)}catch(e){throw new t$16(e)}},o$t.prototype.Clone=function(){var e=new o$t;if(e.Name=this.Name,e.Description=this.Description,e.NumParts=this.NumParts,e.NumPoints=this.NumPoints,e.Color=this.Color,e.Radius=this.Radius,null!=this.Parts){for(var t=[],i=0;i<this.Parts.length;i++)t.push(this.Parts[i]);e.Parts=t}e.Points=[];for(i=0;i<this.NumPoints;i++)e.Points[i]=new o$1p,e.Points[i].x=this.Points[i].x,e.Points[i].y=this.Points[i].y,e.Points[i].z=this.Points[i].z;return e},o$t.prototype.ComputeBox=function(e,t){e=new o$1p(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),t=new o$1p(Number.MIN_VALUE,Number.MIN_VALUE,Number.MIN_VALUE);for(var i=0,n=this.Points.length;i<n;i++){var r=this.Points[i];e.x>r.x&&(e.x=r.x),e.y>r.y&&(e.y=r.y),e.z>r.z&&(e.z=r.z),t.x<r.x&&(t.x=r.x),t.y<r.y&&(t.y=r.y),t.z<r.z&&(t.z=r.z)}},z$n.enuCenter=void 0;var M$p={sh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-e))/2},arsh:function(e){return Math.log(e+Math.sqrt(e*e+1),Math.E)}};function N$g(e){return new o$1p(parseFloat(e.x)||0,parseFloat(e.y)||0,parseFloat(e.z)||0)}z$n.prototype.GetPowerline=function(e){if(!e instanceof o$t||null==e.Points||e.Points.Length<2)return null},z$n.prototype.gernerateCatenarylines=function(e){if(!(e.points instanceof Array&&e$2b(e.points[0].begin)&&e$2b(e.points[0].end)))throw new t$16("options.points is required and must like [{begin : 0, end : 1}, {begin : 1, end : 2}]");for(var t=[],i=u$_(e.imageUrl,""),n=u$_(e.imageRepeat,new o$1o(30,1)),r=u$_(e.imageTransparent,!1),o=u$_(e.volumeDisplayCondition,new o$1o(0,500)),a=u$_(e.lineDisplayCondition,new o$1o(500,5e4)),s=u$_(e.lineColor,e$1U.WHITE),l=0,u=e.points.length;l<u;l++){var c=e.points[l].begin,h=e.points[l].end;c=N$g(c),h=N$g(h);var d=this.InsertTwoPoints(c,h),f=[],p=null,_=o$1p.fromDegrees(d[0].x,d[0].y,d[0].z);if(0===this.enuCenters.length)this.enuCenters.push(_),p=this.enuCenters[0];else{for(var m=0;m<this.enuCenters.length;m++)if(o$1p.distance(this.enuCenters[m],_)<1e4){p=this.enuCenters[m];break}e$2b(p)||(p=_,this.enuCenters.push(_))}for(var g=0;g<d.length;g++){var x=o$1p.fromDegrees(d[g].x,d[g].y,d[g].z);f.push(x)}if(f.length>1){var v=new h$V({polylineVolume:new e$1k({positions:f,enuCenter:p,shape:U$l(this.r),material:new a$R({image:i,repeat:n,transparent:r}),distanceDisplayCondition:new r$Y(o.x,o.y)}),polyline:new a$L({positions:f,distanceDisplayCondition:new r$Y(a.x,a.y),width:2,material:s})});t.push(v)}}return t};var q$l={};function U$l(e){if(e$2b(q$l["_"+e]))return q$l["_"+e];for(var t=[],i=0;i<360;){var n=e$2a.toRadians(i);t.push(new o$1o(e*Math.cos(n),e*Math.sin(n))),i+=11.25}return q$l["_"+e]=t,t}function T$m(e,t,i,n){return.5*n-e/t*M$p.arsh(t*i/(2*e*M$p.sh(t*n/(2*e))))}function H$t(e,t,i){return e*e+t*t+i*i}function S$m(e,t,i){return Math.sqrt(H$t(e,t,i))}function J$f(e,t,i){var n=S$m(e,t,i);return new o$1p(e/n,t/n,i/n)}function O$h(e,t,i){e*=Math.PI/180,t*=Math.PI/180;var n=i*Math.cos(e);return new o$1p(n*Math.cos(t),n*Math.sin(t),i*Math.sin(e))}function D$m(e){new o$1p;return O$h(e.y,e.x,e.z+6378137)}function d$w(e,t){this.l=0,this.h=0,e$2b(t)?(this.a0=e,this.r=t,this.k=Q$j(e,t)):(this.k=e,this.a0=0,this.r=0)}function Q$j(e,t){return t*Math.pow(10,5)/(8*e)}function i$q(){this.init()}function i$p(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function i$o(e){e=parseFloat(e)||0,this.init(e)}function r$q(e,t){e=parseFloat(e)||0,t=parseFloat(t)||0,this._vertex=void 0,this._rotateOrigin=O$I.CENTER,this.init(e,t)}function i$n(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function i$m(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function t$j(){this.init()}function e$q(e){e=e||{},this.init(e)}function e$p(e){e=parseFloat(e)||0,this.init(e)}z$n.prototype.InsertTwoPoints=function(e,t){if(!(e instanceof o$1p&&t instanceof o$1p))throw new t$16("startPos and endPos must be Cartesian3!");if(e.x==t.x&&e.y==t.y&&e.z==t.z)return[new o$1p(e.x,e.y,e.z)];var i=D$m(e),n=D$m(t),r=o$1p.subtract(n,i,new o$1p),o=o$1p.magnitude(r),a=Math.max(Math.floor(o/10),2);a=a%2==0?a:a+1;var s=new Array(a+2),l=t.z-e.z,u=l/o,c=Math.sqrt(1-u*u)||1;T$m(this.a0,this.r,l,o*c);var h=o/(a+1);this.m_sag.l=o*c,this.m_sag.h=l;for(var d=0;d<=a+1;d++){var f=new o$1p((t.x-e.x)*d/(a+1),(t.y-e.y)*d/(a+1),(t.z-e.z)*d/(a+1));if(s[d]=new o$1p(e.x+f.x,e.y+f.y,e.z+f.z),0!=d||d!=this.segments+1){var p=h*d;this.m_sag.fx(p*c),s[d].z=s[d].z-this.m_sag.fx(p*c)}}return s},z$n.prototype.CalcPoint=function(e,t,i){var n=D$m(e),r=D$m(t),o=new o$1p(r.x-n.x,r.y-n.y,r.z-n.z),a=Math.sqrt(o.x*o.x+o.y*o.y+o.z*o.z),s=null,l=t.z-e.z,u=l/a,c=Math.sqrt(1-u*u);T$m(this.a0,this.r,l,a*c),this.m_sag.l=a*c,this.m_sag.h=l;var h=i/this.m_sag.l,d=new o$1p(t.x-e.x,t.y-e.y,t.z-e.z);o=new o$1p((d=J$f(d.x,d.y,d.z)).x*a*h,d.y*a*h,d.z*a*h);return(s=new o$1p(e.x+o.x,e.y+o.y,e.z+o.z)).z=s.z-this.m_sag.fx(i),s},d$w.prototype.fx=function(e){var t=8*Math.pow(10,-5)*this.k,i=this.Loa();return e*(this.h/this.l)+2/t*(M$p.sh(t*(2*i-e)/2)*M$p.sh(t*e/2))},d$w.prototype.Loa=function(){var e=8*Math.pow(10,-5)*this.k;return.5*this.l-1/e*M$p.arsh(this.h*e/2/M$p.sh(e*this.l/2))},i$q.prototype=new o$11,i$q.prototype.constructor=i$q,Object.defineProperties(i$q.prototype,{geoImagePath:{get:function(){return this.imagePath},set:function(e){"string"==typeof e&&(this.imagePath=e,this.billboard.image=e)}},geoWidth:{get:function(){return this.width},set:function(e){"number"==typeof e&&(this.width=e,this.billboard.width=e)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.billboard.height=e)}}}),i$q.prototype.init=function(){this.type=P$U.GEOBILLBOARD,this.height=100,this.width=100,this.imagePath="",this.billboard={image:"",width:100,height:100}},i$p.prototype=new o$11,i$p.prototype.constructor=i$p,Object.defineProperties(i$p.prototype,{geoLength:{get:function(){return this.length},set:function(e){"number"==typeof e&&(this.length=e,this.box.dimensions.x=e,this._isGeometryDirty=!0)}},geoWidth:{get:function(){return this.width},set:function(e){"number"==typeof e&&(this.width=e,this.box.dimensions.y=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.box.dimensions.z=e,this._isGeometryDirty=!0)}}}),i$p.prototype.init=function(e,t,i){this.type=P$U.GEOBOX,this.length=e,this.width=t,this.height=i,this.box={dimensions:new o$1p(e,t,i),vertexFormat:n$11.POSITION_NORMAL_AND_ST}},i$p.prototype.isValid=function(){return this.length>0&&this.width&&this.height>0},i$p.prototype._createGeometry=function(){let e=O$y.fromDimensions(this.box);this._geometry=O$y.createGeometry(e),this._isGeometryDirty=!1,this._vertexBuffer&&!this._vertexBuffer.isDestroyed()&&(this._vertexBuffer=this._vertexBuffer.destroy())},i$p.prototype.getCenter=function(){return new s$M(this.position.x,this.position.y,this.position.z+this.height/2)},i$p.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(24);t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,t[8]=4,t[9]=5,t[10]=5,t[11]=6,t[12]=6,t[13]=7,t[14]=7,t[15]=4,t[16]=1,t[17]=5,t[18]=2,t[19]=6,t[20]=0,t[21]=4,t[22]=3,t[23]=7;let i=t$Y.createIndexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),n=[];return n.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$12({context:e,attributes:n,indexBuffer:i})},i$o.prototype=new o$11,i$o.prototype.constructor=i$o,Object.defineProperties(i$o.prototype,{geoRadius:{get:function(){return this.radius},set:function(e){"number"==typeof e&&(this.radius=e,this.ellipse.semiMinorAxis=e,this.ellipse.semiMajorAxis=e)}}}),i$o.prototype.init=function(e){this.type=P$U.GEOCIRCLE3D,this.radius=e,this.ellipse={semiMinorAxis:e,semiMajorAxis:e}},i$o.prototype.isValid=function(){return this.radius>0},i$o.prototype.getCenter=function(){return new Point3D(this.position.x,this.position.y,this.position.z)},r$q.prototype=new o$11,r$q.prototype.constructor=r$q,Object.defineProperties(r$q.prototype,{geoBottomRadius:{get:function(){return this.bottomRadius},set:function(e){"number"==typeof e&&(this.bottomRadius=e,this.cylinder.bottomRadius=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.cylinder.length=e,this._isGeometryDirty=!0)}},rotateOrigin:{get:function(){return this._rotateOrigin},set:function(e){o$1q.typeOf.number("GeoCone rotateOrigin",e),this._rotateOrigin=e}}}),r$q.prototype.init=function(e,t){this.type=P$U.GEOCONE,this.height=t,this.bottomRadius=e,this.cylinder={length:t,topRadius:0,bottomRadius:e,vertexFormat:n$11.POSITION_NORMAL_AND_ST}},r$q.prototype.clone=function(){return new r$q(this.bottomRadius,this.height)},r$q.prototype._createGeometry=function(){var e=new l$Q(this.cylinder);this._geometry=l$Q.createGeometry(e),this._vertex=o$1p.fromDegrees(this.position.x,this.position.y,this.position.z+this.height/2),this._isGeometryDirty=!1},r$q.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(768),i=0;for(let e=0;e<256;e+=2)t[i++]=e,t[i++]=e+1,t[i++]=e,t[i++]=e+2,t[i++]=e+1,t[i++]=e+3;t[i-1]=1;let n=t$Y.createIndexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),r=[];return r.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$12({context:e,attributes:r,indexBuffer:n})},i$n.prototype=new o$11,i$n.prototype.constructor=i$n,Object.defineProperties(i$n.prototype,{geoTopRadius:{get:function(){return this.topRadius},set:function(e){"number"==typeof e&&(this.topRadius=e,this.cylinder.topRadius=e,this._isGeometryDirty=!0)}},geoBottomRadius:{get:function(){return this.bottomRadius},set:function(e){"number"==typeof e&&(this.bottomRadius=e,this.cylinder.bottomRadius=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.cylinder.length=e,this._isGeometryDirty=!0)}}}),i$n.prototype.init=function(e,t,i){this.type=P$U.GEOCYLINDER,this.height=i,this.topRadius=e,this.bottomRadius=t,this.cylinder={length:i,topRadius:e,bottomRadius:t,vertexFormat:n$11.POSITION_NORMAL_AND_ST}},i$n.prototype.clone=function(){return new i$n(this.topRadius,this.bottomRadius,this.height)},i$n.prototype._createGeometry=function(){var e=new l$Q(this.cylinder);this._geometry=l$Q.createGeometry(e),this._isGeometryDirty=!1},i$n.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(768),i=0;for(let e=0;e<256;e+=2)t[i++]=e,t[i++]=e+1,t[i++]=e,t[i++]=e+2,t[i++]=e+1,t[i++]=e+3;t[i-1]=1;let n=t$Y.createIndexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),r=[];return r.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$12({context:e,attributes:r,indexBuffer:n})},i$m.prototype=new o$11,i$m.prototype.constructor=i$m,Object.defineProperties(i$m.prototype,{geoXAxis:{get:function(){return this.xAxis},set:function(e){"number"==typeof e&&(this.xAxis=e,this.ellipsoid.radii.x=e,this._isGeometryDirty=!0)}},geoYAxis:{get:function(){return this.yAxis},set:function(e){"number"==typeof e&&(this.yAxis=e,this.ellipsoid.radii.z=e,this._isGeometryDirty=!0)}},geoZAxis:{get:function(){return this.zAxis},set:function(e){"number"==typeof e&&(this.zAxis=e,this.ellipsoid.radii.y=e,this._isGeometryDirty=!0)}}}),i$m.prototype.init=function(e,t,i){this.type=P$U.GEOELLIPSOID,this.xAxis=e,this.yAxis=t,this.zAxis=i,this.ellipsoid={radii:new o$1p(e,i,t),vertexFormat:n$11.POSITION_NORMAL_AND_ST}},i$m.prototype.isValid=function(){return this.xAxis>0&&this.yAxis&&this.zAxis>0},i$m.prototype.getCenter=function(){return new s$M(this.position.x,this.position.y,this.position.z+this.zAxis)},i$m.prototype._createGeometry=function(){var e=new b$P(this.ellipsoid);this._geometry=b$P.createGeometry(e),this._isGeometryDirty=!1},i$m.prototype.getOutlineVertexArray=function(e){this._getGeometry();let t=0,i=new Uint16Array(17956);for(let e=0;e<67;e++){var n=67*e;for(let e=0;e<66;e++)i[t++]=n+e,i[t++]=n+e+1}for(let e=0;e<67;e++)for(let n=0;n<65;n++)i[t++]=67+e+67*n,i[t++]=67+e+67*(n+1);let r=t$Y.createIndexBuffer({context:e,typedArray:i,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),o=[];return o.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$12({context:e,attributes:o,indexBuffer:r})},t$j.prototype=new o$11,t$j.prototype.constructor=t$j,t$j.prototype.parent=o$11.prototype,Object.defineProperties(t$j.prototype,{geoFilePath:{get:function(){return this.modelUrl},set:function(e){"string"==typeof e&&(this.modelUrl=e)}},geoModel:{get:function(){return this._geoModel},set:function(e){this._geoModel=e}}}),t$j.prototype.init=function(){this.modelUrl="",this._geoModel=void 0,this.type=P$U.GEOMODEL3D},e$q.prototype=new o$11,e$q.prototype.constructor=e$q,e$q.prototype.parent=o$11.prototype,Object.defineProperties(e$q.prototype,{X:{get:function(){return this.x},set:function(e){"number"==typeof e&&(this.x=e)}},Y:{get:function(){return this.y},set:function(e){"number"==typeof e&&(this.y=e)}},Z:{get:function(){return this.z},set:function(e){"number"==typeof e&&(this.z=e)}}}),e$q.prototype.init=function(e){this.x=u$_(e.x,0),this.y=u$_(e.y,0),this.z=u$_(e.z,0),this.type=P$U.GEOPOINT3D},e$p.prototype=new o$11,e$p.prototype.constructor=e$p,Object.defineProperties(e$p.prototype,{geoRadius:{get:function(){return this.radius},set:function(e){"number"==typeof e&&(this.radius=e,this.ellipsoid.radii.x=e,this.ellipsoid.radii.y=e,this.ellipsoid.radii.z=e,this.sphere.radius=e,this._isGeometryDirty=!0)}}}),e$p.prototype.init=function(e){this.type=P$U.GEOSPHERE,this.radius=e,this.ellipsoid={radii:new o$1p(e,e,e)},this.sphere={radius:e,vertexFormat:n$11.POSITION_NORMAL_AND_ST}},e$p.prototype.isValid=function(){return this.radius>0},e$p.prototype.getCenter=function(){return new s$M(this.position.x,this.position.y,this.position.z+this.radius)},e$p.prototype._createGeometry=function(){var e=new n$u(this.sphere);this._geometry=n$u.createGeometry(e),this._isGeometryDirty=!1},e$p.prototype.getOutlineVertexArray=function(e){this._getGeometry();let t=0,i=new Uint16Array(17956);for(let e=0;e<67;e++){var n=67*e;for(let e=0;e<66;e++)i[t++]=n+e,i[t++]=n+e+1}for(let e=0;e<67;e++)for(let n=0;n<65;n++)i[t++]=67+e+67*n,i[t++]=67+e+67*(n+1);let r=t$Y.createIndexBuffer({context:e,typedArray:i,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),o=[];return o.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$12({context:e,attributes:o,indexBuffer:r})};var xe$6=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function S$l(e,t){if(!e$2b(e)||!e$2b(t))throw new t$16("No viewer or box provided.");if(!e$2b(t.box))throw new t$16("Expected object to be a box.");this.handler=new g$J(e.scene.canvas),this.viewer=e,this.editEvt=new o$1h,this._distanceDisplayCondition=void 0,this._id=e$1Q(),re$b(this,t),te$8(this),this.activate()}function re$b(e,t){e.box=t,e.hpr=de$8(t),e.center=t.position.getValue(0),e.dimensions=t.box.dimensions.getValue(0),e._rotateCircleRadius=Math.max(Math.min(e.dimensions.x,e.dimensions.y)/7,.01),e._unifiedMoveBarLength=Math.max(Math.max(Math.max(e.dimensions.x,e.dimensions.y),e.dimensions.z)/6,.1),e._movePolygonDimension=e._rotateCircleRadius/2,e._moveBarXLength=e._unifiedMoveBarLength,e._moveBarYLength=e._unifiedMoveBarLength,e._moveBarZLength=e._unifiedMoveBarLength,e.isActive=!1,e._color=e$1U.WHITE.withAlpha(.1),e._lineColor=e$1U.fromCssColorString("rgba(250, 158, 62, 1)"),e._outlineColor=e$1U.fromCssColorString("rgba(1, 107, 185, 1)"),e._lineWidth=5,e._modelMatrix=m$17.headingPitchRollToFixedFrame(e.center,e.hpr),e._modelMatrixInverse=p$1d.inverse(e._modelMatrix,new p$1d),e._hoverColor=e$1U.RED,e._linesHover=[]}function de$8(e){if(!e$2b(e.orientation))return new i$15;var t=p$1e.fromQuaternion(e.orientation.getValue(0),new p$1e),i=p$1d.fromRotationTranslation(t,o$1p.ZERO,new p$1d),n=p$1d.inverse(m$17.eastNorthUpToFixedFrame(e.position.getValue(0)),new p$1d),r=p$1d.multiply(n,i,new p$1d),o=p$1d.getMatrix3(r,new p$1e);return i$15.fromQuaternion(n$13.fromRotationMatrix(o))}function te$8(e){var t=e;t.positions=be$a(t),t.polylines=new k$T({opaqueRS:d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}),modelMatrix:e._modelMatrix}),t.translucentPolylines=new k$T({translucentRS:d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}}),modelMatrix:e._modelMatrix}),t.translucentPolylines._canAlwaysPick=!0;for(var i=0;i<7;i++)t.polylines.add({id:"box-editor-prim"+i+e._id,width:t._lineWidth,positions:e.positions[i],material:r$X.fromType(r$X.ColorType,{color:t._lineColor})});for(i=0;i<7;i++)t.translucentPolylines.add({id:"box-editor-prim"+i+e._id,width:t._lineWidth,positions:e.positions[i],material:r$X.fromType(r$X.ColorType,{color:t._lineColor.withAlpha(.2)})});t.boundingBox=Be$7(t,"edit_box"),t.viewer.entities.add(t.boundingBox),t.viewer.scene.primitives.add(t.polylines),t.viewer.scene.primitives.add(t.translucentPolylines),t._polygon=new Z$j(t),t.viewer.scene.primitives.add(t._polygon)}function Z$j(e){this.editor=e,this.show=!0,this._color=e$1U.clone(e._lineColor),this._isCustomPolygon=!0}function ke$3(e,t,i){var n=new P$H({polygonHierarchy:{positions:e.positions[7]}}),r=P$H.createGeometry(n),o=p$1d.clone(e._modelMatrix);if(e.viewer.scene.mode===C$13.COLUMBUS_VIEW){var a=new n$1b,s=a.ellipsoid.cartesianToCartographic(e.center),l=a.project(s);p$1d.fromTranslation(l,o),p$1d.multiply(xe$6,o,o)}let u=[];var c=t$Y.createVertexBuffer({context:t,typedArray:S$12.createTypedArray(S$12.FLOAT,r.attributes.position.values),usage:A$19.STATIC_DRAW});u.push({index:0,vertexBuffer:c,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1,name:"aPosition"});var h=new c$12({context:t,attributes:u,indexBuffer:t$Y.createIndexBuffer({context:t,typedArray:r.indices,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})}),d=r$13.fromCache({name:"boxEditor",context:t,vertexShaderSource:"attribute vec4 aPosition;\nuniform vec4 uColor;\nuniform vec4 uPickColor;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n vColor = uColor;\n vPickColor = uPickColor;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",fragmentShaderSource:"varying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n gl_FragColor = vColor;\n}\n",attributeLocations:{aPosition:0}}),f=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:o,pass:Le$s.OPAQUE,owner:i});f.vertexArray=h,f.shaderProgram=d;var p={id:"box-editor-prim7"+e._id,primitive:i},_=t.createPickId(p);f.pickId="vPickColor",f.uniformMap={uColor:function(){return i._color},uPickColor:function(){return _.color}},f.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var m=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:o,pass:Le$s.OPAQUE+1,owner:i});m.vertexArray=h,m.shaderProgram=d;var g={id:"box-editor-prim7"+e._id,primitive:i},x=t.createPickId(g);m.pickId="vPickColor",m.uniformMap={uColor:function(){return i._color.withAlpha(.2)},uPickColor:function(){return x.color}},m.renderState=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),i._colorCommandAlpha=m,i._colorCommand=f}function be$a(e){var t=[];t.push([new o$1p(0,0,e.dimensions.z/2),new o$1p(0,0,e.dimensions.z/2+e._moveBarZLength)]),t.push([new o$1p(0,0,-e.dimensions.z/2),new o$1p(0,0,-e.dimensions.z/2-e._moveBarZLength)]),t.push([new o$1p(e.dimensions.x/2,0,0),new o$1p(e.dimensions.x/2+e._moveBarXLength,0,0)]),t.push([new o$1p(-e.dimensions.x/2,0,0),new o$1p(-e.dimensions.x/2-e._moveBarXLength,0,0)]),t.push([new o$1p(0,e.dimensions.y/2,0),new o$1p(0,e.dimensions.y/2+e._moveBarYLength,0)]),t.push([new o$1p(0,-e.dimensions.y/2,0),new o$1p(0,-e.dimensions.y/2-e._moveBarYLength,0)]);for(var i=Me$8(e._rotateCircleRadius,64),n=0;n<i.length;n++)i[n].z=e.dimensions.z/2;t.push(i);var r=e._movePolygonDimension;return t.push([new o$1p(r,r,.505*e.dimensions.z+.01),new o$1p(-r,r,.505*e.dimensions.z+.01),new o$1p(-r,-r,.505*e.dimensions.z+.01),new o$1p(r,-r,.505*e.dimensions.z+.01)]),t}function Me$8(e,t){var i=[];const n=2*Math.PI/t;for(var r=0;r<t+1;r++){var o=new o$1p,a=n*r;o.x=e*Math.sin(a),o.y=e*Math.cos(a),i.push(o)}return i}function Be$7(e,t){var i=m$17.headingPitchRollQuaternion(e.center,e.hpr);return new h$V({id:t+e._id,position:new n$V((function(){return e.center}),!1),orientation:new n$V((function(){return i}),!1),box:{material:e._color,outline:!0,outlineWidth:2,outlineColor:e._outlineColor,dimensions:new n$V((function(){return e.dimensions}),!1)}})}Object.defineProperties(S$l.prototype,{distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2b(e)&&!(e instanceof r$Y))throw new t$16("Expected BoxEditor.distanceDisplayCondition to be type of DistanceDisplayCondition!");this._distanceDisplayCondition=e}},color:{get:function(){return this._color},set:function(e){this._color=e,this.boundingBox.box.material=e}},hoverColor:{get:function(){return this._hoverColor},set:function(e){this._hoverColor=e}}}),Object.defineProperties(Z$j.prototype,{color:{get:function(){return this._color},set:function(e){this._color=e,this.dirty=!0}}}),Z$j.prototype.update=function(e){(!this._colorCommand||this.dirty)&&(ke$3(this.editor,e.context,this),this.dirty=!1);var t=this.editor;if(e$2b(t._distanceDisplayCondition)&&t.isActive){var i=t.viewer.scene.camera.positionWC;if(e.mode===C$13.COLUMBUS_VIEW&&(i=m$17.convertTo3DCartesian(i)),o$1p.distance(t.center,i)<t._distanceDisplayCondition.far){t._polygon.show=!0;for(var n=0;n<t.polylines._polylines.length;n++)t.polylines._polylines[n].show=!0,t.translucentPolylines._polylines[n].show=!0}else{t._polygon.show=!1;for(n=0;n<t.polylines._polylines.length;n++)t.polylines._polylines[n].show=!1,t.translucentPolylines._polylines[n].show=!1}}var r=e._fboState.frameBufferType;this.show&&r==Qe$c.NORMAL&&(e.commandList.push(this._colorCommand),e.commandList.push(this._colorCommandAlpha))},Z$j.prototype.destroy=function(e){};var X$f=new o$1p,ae$9=new i$1c,se$7=new o$1p,Te$8=new o$1o,Ie$5=new o$1o,Ee$a=new f$17,Oe$8=new o$1p,Re$7=new o$1p,Ae$8=new f$17,Se$7=new o$1p,Le$8=new o$1p,Ve$6=new o$1m(o$1p.UNIT_X,0);function ze$4(e,t){t.endPosition,e.currentPickObject;var i=+e.currentPickObject.id.slice(15,16),n=e.viewer.camera,r=o$1o.clone(t.startPosition,Te$8),o=o$1o.clone(t.endPosition,Ie$5),a=o$1p.clone(o$1p.ZERO,Oe$8),s=o$1p.UNIT_X;(0===i||1===i)&&(s=o$1p.UNIT_Y);var l=m$17.convertToColumbusCartesian(e.center);e$2b(l)&&(a.x=l.x,(0===i||1===i)&&(a.y=l.y));var u=o$1m.fromPointNormal(a,s,Ve$6),c=n.getPickRay(r,Ee$a),h=g$1h.rayPlane(c,u,Re$7),d=n.getPickRay(o,Ae$8),f=g$1h.rayPlane(d,u,Se$7),p=o$1p.subtract(h,f,Le$8),_=p.x;if(p.x=p.y,p.y=p.z,p.z=_,o$1p.magnitude(p)>e$2a.EPSILON6&&(f=m$17.convertTo3DCartesian(f),e.currentPickPos=f),0===i||1===i){var m=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p),g=(T=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).z-m.z,x=new o$1p(0,0,g/2);1===i&&(x=new o$1p(0,0,-(g=m.z-T.z)/2)),e.dimensions.z+=g,e.dimensions.z<=0&&(g=0,e.dimensions.z=0,x=new o$1p(0,0,0)),e.positions[0][0].z+=g/2,e.positions[0][1].z+=g/2,e.positions[1][0].z-=g/2,e.positions[1][1].z-=g/2;for(var v=e.positions[6],y=0;y<v.length;y++)v[y].z+=g/2;var $=e.positions[7];for(y=0;y<$.length;y++)$[y].z+=g/2;p$1d.multiplyByPoint(e._modelMatrix,x,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(2===i||3===i){m=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var b=(T=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).x-m.x;x=new o$1p(b/2,0,0);3===i&&(x=new o$1p(-(b=m.x-T.x)/2)),e.dimensions.x+=b,e.dimensions.x<0&&(e.dimensions.x=0,x=new o$1p(0,0,0),b=0),e.positions[2][0].x+=b/2,e.positions[2][1].x+=b/2,e.positions[3][0].x-=b/2,e.positions[3][1].x-=b/2,p$1d.multiplyByPoint(e._modelMatrix,x,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(4===i||5===i){e.viewer.camera.getPickRay(t.endPosition);m=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var T,C=(T=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).y-m.y;x=new o$1p(0,C/2,0);5===i&&(x=new o$1p(0,-(C=m.y-T.y)/2,0)),e.dimensions.y+=C,e.dimensions.y<0&&(e.dimensions.y=0,x=new o$1p(0,0,0),C=0),e.positions[4][0].y+=C/2,e.positions[4][1].y+=C/2,e.positions[5][0].y-=C/2,e.positions[5][1].y-=C/2,p$1d.multiplyByPoint(e._modelMatrix,x,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}}function Ue$4(e,t){var i=t.endPosition;e.currentPickObject;var n=+e.currentPickObject.id.slice(15,16);if(0===n||1===n){var r=e.viewer.scene.camera,o=r.getPickRay(i),a=o$1o.fromElements(i.x+5,i.y,new o$1o),s=r.getPickRay(a),l=o$1p.normalize(o$1p.cross(o.direction,s.direction,se$7),se$7),u=o$1m.fromPointNormal(r.positionWC,l),c=new f$17(o$1p.ZERO,e.currentPickPos);e.currentPickPos=g$1h.rayPlane(c,u);var h=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p),d=(y=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).z-h.z,f=new o$1p(0,0,d/2);1===n&&(f=new o$1p(0,0,-(d=h.z-y.z)/2)),e.dimensions.z+=d,e.dimensions.z<=0&&(d=0,e.dimensions.z=0,f=new o$1p(0,0,0)),e.positions[0][0].z+=d/2,e.positions[0][1].z+=d/2,e.positions[1][0].z-=d/2,e.positions[1][1].z-=d/2;for(var p=e.positions[6],_=0;_<p.length;_++)p[_].z+=d/2;var m=e.positions[7];for(_=0;_<m.length;_++)m[_].z+=d/2;p$1d.multiplyByPoint(e._modelMatrix,f,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(2===n||3===n){c=e.viewer.camera.getPickRay(t.endPosition);var g=i$1c.unpack([0,0,0,o$1p.distance(e.lastPickPos,o$1p.ZERO)],0,ae$9),x=g$1h.raySphere(c,g);e.currentPickPos=f$17.getPoint(c,x.start);h=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var v=(y=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).x-h.x;f=new o$1p(v/2,0,0);3===n&&(f=new o$1p(-(v=h.x-y.x)/2)),e.dimensions.x+=v,e.dimensions.x<0&&(e.dimensions.x=0,f=new o$1p(0,0,0),v=0),e.positions[2][0].x+=v/2,e.positions[2][1].x+=v/2,e.positions[3][0].x-=v/2,e.positions[3][1].x-=v/2,p$1d.multiplyByPoint(e._modelMatrix,f,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(4===n||5===n){c=e.viewer.camera.getPickRay(t.endPosition),g=i$1c.unpack([0,0,0,o$1p.distance(e.lastPickPos,o$1p.ZERO)],0,ae$9),x=g$1h.raySphere(c,g);e.currentPickPos=f$17.getPoint(c,x.start);h=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var y,$=(y=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).y-h.y;f=new o$1p(0,$/2,0);5===n&&(f=new o$1p(0,-($=h.y-y.y)/2,0)),e.dimensions.y+=$,e.dimensions.y<0&&(e.dimensions.y=0,f=new o$1p(0,0,0),$=0),e.positions[4][0].y+=$/2,e.positions[4][1].y+=$/2,e.positions[5][0].y-=$/2,e.positions[5][1].y-=$/2,p$1d.multiplyByPoint(e._modelMatrix,f,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}}function Ne$6(e,t){var i=p$1d.multiplyByPoint(e._modelMatrix,e.positions[0][0],new o$1p),n=m$17.convertToColumbusCartesian(i),r=m$17.convertToColumbusCartesian(e.lastPickPos);r.x=n.x;var o=o$1p.subtract(r,n,new o$1p);e.tangent=o$1p.cross(o$1p.UNIT_X,o,new o$1p);var a=t.endPosition;o$1p.clone(e.lastPickPos,X$f);var s=e.viewer.camera.getPickRay(a),l=o$1m.fromPointNormal(n,o$1p.UNIT_X),u=g$1h.rayPlane(s,l),c=o$1p.subtract(r,n,new o$1p),h=o$1p.subtract(u,n,new o$1p),d=o$1p.dot(o$1p.normalize(c,c),o$1p.normalize(h,h)),f=Math.acos(d);o$1p.cross(o$1p.UNIT_X,c,e.tangent);var p=o$1p.dot(e.tangent,o$1p.subtract(u,r,new o$1p));f*=p=p<0?1:-1,e.hpr.heading+=f;var _=m$17.headingPitchRollQuaternion(e.center,e.hpr);e.boundingBox.orientation=_;var m=m$17.convertTo3DCartesian(u);o$1p.clone(m,e.lastPickPos)}function je$4(e,t){var i=p$1d.multiplyByPoint(e._modelMatrix,e.positions[0][0],new o$1p),n=o$1p.subtract(e.lastPickPos,i,new o$1p);e.tangent=o$1p.cross(o$1p.UNIT_Z,n,new o$1p);var r=t.endPosition,o=o$1p.clone(e.lastPickPos,X$f),a=e.viewer.camera.getPickRay(r),s=new i$1c(o$1p.ZERO,o$1p.distance(o,o$1p.ZERO)),l=g$1h.raySphere(a,s);o=f$17.getPoint(a,l.start);var u=o$1p.subtract(e.lastPickPos,i,new o$1p),c=o$1p.subtract(o,i,new o$1p),h=o$1p.dot(o$1p.normalize(u,u),o$1p.normalize(c,c)),d=Math.acos(h);o$1p.cross(o$1p.UNIT_Z,u,e.tangent);var f=o$1p.dot(e.tangent,o$1p.subtract(o,e.lastPickPos,new o$1p));d*=f=f<0?1:-1,e.hpr.heading+=d;var p=m$17.headingPitchRollQuaternion(e.center,e.hpr);e.boundingBox.orientation=p,o$1p.clone(o,e.lastPickPos)}function We$4(e,t){var i=t.endPosition;o$1p.clone(e.lastPickPos,X$f);var n=e.viewer.camera.getPickRay(i),r=m$17.convertToColumbusCartesian(e.lastPickPos),o=o$1m.fromPointNormal(r,o$1p.UNIT_X),a=g$1h.rayPlane(n,o),s=a.y-r.y,l=a.z-r.z,u=m$17.convertToColumbusCartesian(e.center);u.y+=s,u.z+=l,e.center=m$17.convertTo3DCartesian(u);var c=m$17.convertTo3DCartesian(a);o$1p.clone(c,e.lastPickPos)}function He$3(e,t){var i=t.endPosition,n=o$1p.clone(e.lastPickPos,X$f),r=e.viewer.camera.getPickRay(i),o=new i$1c(o$1p.ZERO,o$1p.distance(n,o$1p.ZERO)),a=g$1h.raySphere(r,o),s=f$17.getPoint(r,a.start),l=p$1d.multiplyByPoint(e._modelMatrixInverse,n,new o$1p),u=p$1d.multiplyByPoint(e._modelMatrixInverse,s,new o$1p),c=new o$1p(u.x-l.x,u.y-l.y,0);p$1d.multiplyByPoint(e._modelMatrix,c,e.center),o$1p.clone(s,e.lastPickPos)}function Fe$7(e){for(var t=0;t<e._linesHover.length;t++){var i=e._linesHover[t];i._isCustomPolygon?i.color=e._lineColor:i.material.uniforms.color.alpha<1?i.material=r$X.fromType(r$X.ColorType,{color:e._lineColor.withAlpha(.2)}):i.material=r$X.fromType(r$X.ColorType,{color:e._lineColor})}e._linesHover.length=0,e.viewer.scene.pickAsync(e.viewer.scene.screenSpaceCameraController._aggregator._currentMousePosition).then((t=>{var i=e.currentPickObject=t;if(i&&"string"==typeof i.id&&i.id.indexOf("box-editor-prim")>-1&&i.id.indexOf(e._id)>-1){var n=i.primitive._index;if(e$2b(n)){var r=e.polylines.get(n),o=e.translucentPolylines.get(n);r.material=r$X.fromType(r$X.ColorType,{color:e._hoverColor}),o.material=r$X.fromType(r$X.ColorType,{color:e._hoverColor.withAlpha(.2)}),e._linesHover.push(r),e._linesHover.push(o)}else i.primitive.color=e._hoverColor,e._linesHover.push(i.primitive)}}))}S$l.prototype.destroy=function(){this.viewer.scene.screenSpaceCameraController.enableInputs=!0,this.deactivate(),this.clear(),this.handler.destroy(),i$10(this)},S$l.prototype.activate=function(){if(!this.isActive){this.isActive=!0;for(var e=0;e<this.polylines._polylines.length;e++)this.polylines._polylines[e].show=!0,this.translucentPolylines._polylines[e].show=!0;var t=this;t.boundingBox.show=!0,t._polygon.show=!0,t.handler.setInputAction((function(e){t.viewer.scene.pickPositionAsync(e.position).then((e=>{t.startPickPos=e,t._isOperate=!1,e$2b(t.startPickPos)&&t.currentPickObject&&"string"==typeof t.currentPickObject.id&&t.currentPickObject.id.slice(-36)===t._id&&"box-editor"===t.currentPickObject.id.slice(0,10)&&(t._isOperate=!0,t.lastPickPos=o$1p.clone(t.startPickPos,new o$1p),t.currentPickPos=o$1p.clone(t.startPickPos,new o$1p))}))}),G$I.LEFT_DOWN),t.handler.setInputAction((function(e){if(t._isOperate){t.viewer.scene.screenSpaceCameraController.enableInputs=!1;var i=+t.currentPickObject.id.slice(15,16);i>=0&&i<6?t.viewer.scene.mode===C$13.COLUMBUS_VIEW?ze$4(t,e):Ue$4(t,e):6===i?t.viewer.scene.mode===C$13.COLUMBUS_VIEW?Ne$6(t,e):je$4(t,e):7===i&&(t.viewer.scene.mode===C$13.COLUMBUS_VIEW?We$4(t,e):He$3(t,e)),t._polygon.dirty=!0,t._modelMatrix=m$17.headingPitchRollToFixedFrame(t.center,t.hpr),t._modelMatrixInverse=p$1d.inverse(t._modelMatrix,t._modelMatrixInverse),t.polylines.modelMatrix=t._modelMatrix,t.translucentPolylines.modelMatrix=t._modelMatrix,t.box.orientation=new n$V((function(e,i){return t.boundingBox.orientation.getValue(0)}),!1),t.box.position=new n$V((function(e,i){return t.boundingBox.position.getValue(0)}),!1),t.box.box.dimensions=new n$V((function(e,i){return t.boundingBox.box.dimensions.getValue(0)}),!1),t.editEvt.raiseEvent({position:t.boundingBox.position.getValue(0),dimensions:t.boundingBox.box.dimensions.getValue(0),orientation:t.boundingBox.orientation.getValue(0)})}else Fe$7(t)}),G$I.MOUSE_MOVE),t.handler.setInputAction((function(e){t._isOperate=!1,t.viewer.scene.screenSpaceCameraController.enableInputs=!0,t.currentPickObject=void 0}),G$I.LEFT_UP)}},S$l.prototype.deactivate=function(){if(this.isActive){this.isActive=!1,this.boundingBox.show=!1,this._polygon.show=!1;for(var e=0;e<this.polylines._polylines.length;e++)this.polylines._polylines[e].show=!1,this.translucentPolylines._polylines[e].show=!1;this.handler.removeInputAction(G$I.LEFT_CLICK),this.handler.removeInputAction(G$I.MOUSE_MOVE),this.handler.removeInputAction(G$I.RIGHT_CLICK)}},S$l.prototype.clear=function(){this.polylines.removeAll(),this.viewer.scene.primitives.remove(this.polylines),this.polylines=void 0,this.translucentPolylines.removeAll(),this.viewer.scene.primitives.remove(this.translucentPolylines),this.viewer.scene.primitives.remove(this._polygon),this._polygon=void 0,this.translucentPolylines=void 0,this.viewer.entities.remove(this.boundingBox)},S$l.prototype.setEditObject=function(e){if(this.isActive){if(o$1q.typeOf.object("editObject",e),!e$2b(e.box))throw new t$16("Expected editObject to be a box.");var t=this.boundingBox.orientation.getValue(0),i=this.boundingBox.position.getValue(0),n=this.boundingBox.box.dimensions.getValue(0);this.box.orientation=new n$V((function(){return t}),!1),this.box.position=new n$V((function(){return i}),!1),this.box.box.dimensions=new n$V((function(){return n}),!1),re$b(this,e),this.deactivate(),this.clear(),te$8(this),this.activate()}};var e$o={Space:0,Ground:1,S3mModel:2,Raster:3,Both:4},l$p=Object.freeze(e$o),e$n={Point:0,Line:1,Polygon:2,Marker:3,Box:4},_0x20cc4b=Object.freeze(e$n),e$m={POLYLINE:0,POLYGON:1,POLYGON_HOLE:2},C$q=Object.freeze(e$m),w$m=function(e,t,i){if(!e$2b(e)||!e$2b(t))throw new t$16("viewer and mode is required!");this.handler=new g$J(e.scene.canvas),this.viewer=e,this.mode=t,this._clampMode=u$_(i,l$p.Space),this.isDrawing=!1,this.active=!1,this._drawEvt=new o$1h,this._activeEvt=new o$1h,this._enableDepthTest=!0,this.movingEvt=new o$1h,this.positions=[],this._positions=[]};function ee$a(e,t){var i=t;if(i&&i.active){var n=i.viewer.scene;if(!n.pickPositionSupported)return void console.log("your browser not supported pickPosition!");n.pickPositionAsync(e.position).then((t=>{if(t)if(i.isDrawing){var n=new o$1o(e.position.x,e.position.y);switch(i.mode){case _0x20cc4b.Line:j$m(n,i,!0);break;case _0x20cc4b.Polygon:K$h(n,i,!0)}}else switch(i.isDrawing=!0,i.positions.length=0,i.positions.push(t.clone()),i.mode){case _0x20cc4b.Point:ie$7(t,i);break;case _0x20cc4b.Line:G$n(t,i);break;case _0x20cc4b.Polygon:te$7(t,i);break;case _0x20cc4b.Marker:oe$8(t,i)}i.mode===_0x20cc4b.Box&&re$a(t,i)}))}}function ie$7(e,t){var i=t;e$2b(i.points)?i.point.position=e:(i.points=new D$s({depthTestEnabled:!1}),i.point=i.points.add({position:e,pixelSize:10,color:e$1U.WHITE}),i.viewer.scene.primitives.add(i.points)),i.deactivate(),i.drawEvt.raiseEvent({object:i.point})}function G$n(e,t){var i=t;if(i._positions=[e,e],e$2b(i.polyline))i.polyline.show=!0;else{var n=i._clampMode>0,r=i._clampMode<l$p.S3mModel?_0x3b5200.TERRAIN:i._clampMode<l$p.Both?_0x3b5200.S3M_TILE:_0x3b5200.BOTH;i.polyline=i.viewer.entities.add({polyline:{positions:new n$V((function(){return e$2b(i.polygon)?i._positions.concat([i._positions[0]]):i._positions}),!1),width:3,material:e$1U.fromCssColorString("#51ff00"),clampToGround:n,classificationType:r}})}}function te$7(e,t){var i=t;if(i._positions=[e,e],G$n(e,t),e$2b(i.polygon))i.polygon.show=!0,i.polyline.show=!0,e$2b(i.rasterPolygon)&&i.viewer.scene.rasterVectorCollection.remove(i.rasterPolygon),e$2b(i.rasterPolylines)&&i.viewer.scene.rasterVectorCollection.remove(i.rasterPolylines);else{var n=l$p.Space===i._clampMode,r=i._clampMode<l$p.S3mModel?_0x3b5200.TERRAIN:i._clampMode<l$p.Both?_0x3b5200.S3M_TILE:_0x3b5200.BOTH;i.polygon=i.viewer.entities.add({polygon:{hierarchy:new n$V((function(){return{positions:i._positions,holes:[]}}),!1),material:e$1U.ORANGE.withAlpha(.5),perPositionHeight:n,classificationType:r},depthTestEnabled:i._enableDepthTest})}}function oe$8(e,t){var i=t;a$18.fromCartesian(e).height,e$2b(i.marker)?i.marker.position=e:(i.markers=new w$N,i.marker=i.markers.add({position:e,image:n$15("Assets/Textures/maki/grepin.png"),verticalOrigin:S$O.BOTTOM,scale:.5}),i.viewer.scene.primitives.add(i.markers)),i.deactivate(),i.drawEvt.raiseEvent({object:i.marker})}function re$a(e,t){e$2b(t.boxConfig)||(t.boxConfig={leftClickTimes:0,scratchPosition:new o$1p,length:0,width:0,height:0}),e$2b(t.boxes)||(t.boxes=[]);var i=t.boxConfig;if(0!==i.leftClickTimes||e$2b(e))if(i.leftClickTimes++,i.firstPoint=e,1===i.leftClickTimes)i.enu=m$17.eastNorthUpToFixedFrame(e),i.enuInverse=p$1d.inverse(i.enu,new p$1d),o$1p.clone(e,i.scratchPosition),t.box=i.entity=t.viewer.entities.add({position:new n$V((function(){return i.scratchPosition}),!1),box:{dimensions:new n$V((function(e,t){return(t=t||new o$1p(i.length,i.width,i.height)).x=i.length,t.y=i.width,t.z=i.height,t}),!1),material:e$1U.fromCssColorString("rgba(0, 160, 233, 0.5)"),outline:!0,outlineColor:e$1U.BLACK}}),t.boxes.push(t.box),i.box=i.entity.box;else if(2===i.leftClickTimes){var n=p$1d.multiplyByPoint(i.enuInverse,i.scratchPosition,new o$1p);o$1p.multiplyByScalar(n,2,n),i.secondPoint=p$1d.multiplyByPoint(i.enu,n,n)}}function ne$c(e,t){var i=t;if(i&&i.active&&i.isDrawing){var n=new o$1o(e.endPosition.x,e.endPosition.y);switch(i.mode){case _0x20cc4b.Line:j$m(n,i,!1);break;case _0x20cc4b.Polygon:K$h(n,i,!1);break;case _0x20cc4b.Box:le$d(n,i)}}i.movingEvt.raiseEvent(new o$1o(e.endPosition.x,e.endPosition.y))}function j$m(e,t,i){var n=t;n.viewer.scene.pickPositionAsync(e).then((e=>{if(e$2b(e)){var t=n._positions.length;1==i?(n._positions[t]=e,n.positions.push(e.clone())):n._positions[t-1]=e}}))}function K$h(e,t,i){var n=t;n.viewer.scene.pickPositionAsync(e).then((e=>{if(e$2b(e)){var t=n._positions.length;1==i?(n.positions.push(e.clone()),n._positions[t]=e):n._positions[t-1]=e}}))}Object.defineProperties(w$m.prototype,{drawEvt:{get:function(){return this._drawEvt}},activeEvt:{get:function(){return this._activeEvt}},clampMode:{get:function(){return this._clampMode},set:function(e){if(this._clampMode!==l$p.Raster&&e!==l$p.Raster){if(e$2b(e)&&e!=this._clampMode){if(this._clampMode=e,e$2b(this.polyline)&&e$2b(this.polyline.polyline)){var t=e!==l$p.Space,i=this._clampMode<l$p.S3mModel?_0x3b5200.TERRAIN:this._clampMode<l$p.Both?_0x3b5200.S3M_TILE:_0x3b5200.BOTH;this.polyline.polyline.clampToGround=t,this.polyline.polyline.classificationType=i}if(e$2b(this.polygon)){var n=l$p.Space===this._clampMode;i=this._clampMode<l$p.S3mModel?_0x3b5200.TERRAIN:this._clampMode<l$p.Both?_0x3b5200.S3M_TILE:_0x3b5200.BOTH;this.polygon.polygon.perPositionHeight=n,this.polygon.polygon.classificationType=i}}}else this._clampMode=l$p.Raster}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){this._enableDepthTest=e}}}),w$m.prototype.activate=function(){if(1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){ee$a(t,e)}),G$I.LEFT_CLICK),this.handler.setInputAction((function(t){ne$c(t,e)}),G$I.MOUSE_MOVE),this.handler.setInputAction((function(t){ce$b(t,e)}),G$I.RIGHT_CLICK),this.activeEvt.raiseEvent(!0)}},w$m.prototype.deactivate=function(){this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(G$I.LEFT_CLICK),this.handler.removeInputAction(G$I.MOUSE_MOVE),this.handler.removeInputAction(G$I.RIGHT_CLICK),this.activeEvt.raiseEvent(!1)},w$m.prototype.clear=function(){if(this.deactivate(),this.positions.length=0,this._positions.length=0,e$2b(this.rasterPolylines)&&(this.viewer.scene.rasterVectorCollection.remove(this.rasterPolylines),this.rasterPolylines=void 0),e$2b(this.rasterPolygon)&&(this.viewer.scene.rasterVectorCollection.remove(this.rasterPolygon),this.rasterPolygon=void 0),e$2b(this.polygon)&&(this.viewer.entities.remove(this.polygon),this.polygon=void 0),e$2b(this.polyline)&&(this.viewer.entities.remove(this.polyline),this.polyline=void 0),e$2b(this.points)&&(this.points.removeAll(),this.viewer.scene.primitives.remove(this.points),this.points=void 0),e$2b(this.markers)&&(this.viewer.scene.primitives.remove(this.markers),this.markers=void 0,e$2b(this.marker)&&(this.marker=void 0)),e$2b(this.corridor)&&this.viewer.entities.remove(this.corridor),e$2b(this.boxes)){for(var e=0,t=this.boxes.length;e<t;e++)this.viewer.entities.remove(this.boxes[e]);this.boxes=void 0,this.box=void 0,this.boxConfig=void 0}};var se$6=new o$1p,M$o=new o$1p,F$j=new o$1o,ae$8=new i$1c;function le$d(e,t,i){var n=t.boxConfig;if(e$2b(n))if(1==n.leftClickTimes)if(t.viewer.scene.mode===C$13.COLUMBUS_VIEW){var r=(v=t.viewer.scene.camera).getPickRay(e),o=m$17.convertToColumbusCartesian(n.firstPoint);e$2b(n.first)||(n.first=o$1p.clone(n.firstPoint));var a=o$1m.fromPointNormal(o,o$1p.UNIT_X);if(!e$2b(h=g$1h.rayPlane(r,a)))return;a$18.fromCartesian(n.firstPoint);var s=m$17.convertTo3DCartesian(h);n.second=o$1p.clone(s),s=a$18.fromCartesian(s);var l=Math.cos(s.latitude);n.ratio=l,s=a$18.toCartesian(s),h=m$17.convertToColumbusCartesian(s),n.scratchPosition=o$1p.midpoint(h,o,new o$1p),n.scratchPosition=m$17.convertTo3DCartesian(n.scratchPosition),n.length=Math.abs(h.y-o.y)*l,n.width=Math.abs(h.z-o.z),n.height=0}else{r=t.viewer.camera.getPickRay(e);var u=i$1c.unpack([0,0,0,o$1p.distance(n.firstPoint,o$1p.ZERO)],0,ae$8),c=g$1h.raySphere(r,u),h=f$17.getPoint(r,c.start),d=p$1d.multiplyByPoint(n.enuInverse,h,se$6);d.z=0,n.scratchPosition=p$1d.multiplyByPoint(n.enu,o$1p.divideByScalar(d,2,d),n.scratchPosition),p$1d.multiplyByPoint(n.enuInverse,n.scratchPosition,d),n.length=2*(d.x>0?d.x:-d.x),n.width=2*(d.y>0?d.y:-d.y),n.height=0}else if(n.leftClickTimes>1)if(t.viewer.scene.mode===C$13.COLUMBUS_VIEW){var f=(v=t.viewer.scene.camera).getPickRay(e),p=o$1o.fromElements(e.x+5,e.y,F$j),_=v.getPickRay(p),m=o$1p.normalize(o$1p.cross(f.direction,_.direction,M$o),M$o),g=(a=o$1m.fromPointNormal(v.positionWC,m),m$17.convertToColumbusCartesian(n.second));g.x=.1;r=new f$17(g,o$1p.UNIT_X);var x=g$1h.rayPlane(r,a);if(!e$2b(x))return;o=m$17.convertToColumbusCartesian(n.first);n.scratchPosition=o$1p.midpoint(o,x,new o$1p),n.scratchPosition=m$17.convertTo3DCartesian(n.scratchPosition),n.secondPoint=m$17.convertTo3DCartesian(x),n.height=Math.abs(o.x-x.x)}else{var v;f=(v=t.viewer.scene.camera).getPickRay(e),p=o$1o.fromElements(e.x+5,e.y,F$j),_=v.getPickRay(p),m=o$1p.normalize(o$1p.cross(f.direction,_.direction,M$o),M$o),a=o$1m.fromPointNormal(v.positionWC,m),r=new f$17(o$1p.ZERO,n.secondPoint);n.secondPoint=g$1h.rayPlane(r,a);var y=p$1d.multiplyByPoint(n.enuInverse,n.secondPoint,new o$1p);o$1p.divideByScalar(y,2,y),p$1d.multiplyByPoint(n.enu,y,n.scratchPosition),n.length=2*(y.x>0?y.x:-y.x),n.width=2*(y.y>0?y.y:-y.y),n.height=2*(y.z>0?y.z:-y.z)}}var L$o=0;function ce$b(e,t){var i=t;if(i&&i.active&&i.isDrawing){if(i.deactivate(),i.mode===_0x20cc4b.Box)return t.boxConfig=void 0,void i.drawEvt.raiseEvent({object:i.box,positions:i._positions});if(!e$2b(i.polyline))return;if(i._positions=i._positions.slice(0,i._positions.length-1),i.mode===_0x20cc4b.Polygon){if(i._positions.length<3)return void(i._positions.length=0);var n=[].concat(i._positions);if(i.polygon.positions=n,l$p.Raster===i._clampMode){i._positions.length=0,e$2b(i.polyline)&&(i.polyline.show=!1),e$2b(i.polygon)&&(i.polygon.show=!1);for(var r=[],o=0;o<n.length;o++)r.push(a$18.fromCartesian(n[o]));L$o+=1,i.rasterPolygon=L$o,i.viewer.scene.rasterVectorCollection.add({name:i.rasterPolygon,pickId:i.rasterPolygon,positions:r,fillColor:e$1U.ORANGE.withAlpha(.5),geometryType:C$q.POLYGON});var a=[];for(o=0;o<r.length;o++)a.push(r[o]);a.push(r[0]),i.rasterPolylines=L$o,i.viewer.scene.rasterVectorCollection.add({name:i.rasterPolylines,pickId:i.rasterPolylines,positions:a,lineColor:e$1U.fromCssColorString("#51ff00"),lineWidth:3,geometryType:C$q.POLYLINE}),i.drawEvt.raiseEvent({object:n,positions:i.positions})}else i.drawEvt.raiseEvent({object:i.polygon,positions:i.positions})}else i.mode===_0x20cc4b.Line&&(i.polyline.positions=i._positions,i.drawEvt.raiseEvent({object:i.polyline,positions:i.positions}))}}var w$l="referencePoint",I$r="referenceAddPoint",_$l=function(e,t){if(!e$2b(e)||!e$2b(t))throw new t$16("viewer and mode is required!");this.handler=new g$J(e.scene.canvas),this.viewer=e,this.active=!1,this.referencePointColor=e$1U.WHITE,this.editPointColor=e$1U.VIOLET,this.setEditObject(t),this._editZ=!1,this._changedEvt=new o$1h};function C$p(e,t){if(!e.scene.pickRasterData(t.position).isS3MTilesLayerSel)return e.scene.pickAsync(t.position).then((e=>{if(e$2b(e)){var t=u$_(e.id,e.primitive.id);if(t instanceof h$V)return Promise.resolve(t);if(e$2b(e.primitive))return Promise.resolve(e)}}))}function K$g(e,t){var i=t;i&&i.active&&C$p(i.viewer,e).then((e=>{if(e$2b(e)){var t=e.id;if(!e$2b(t))return;var n=t.split("_");2==n.length&&n[0]===w$l&&(i._editPointIndex=parseInt(n[1]),i._editPoint=e.primitive,i._editPoint.color=i.editPointColor,i.viewer.scene._screenSpaceCameraController.enableRotate=!1)}}))}function G$m(e,t){var i=t;i&&i.active&&i._editPoint&&(i._editPointIndex=-1,e$2b(i._editPoint)&&(i._editPoint.color=i.referencePointColor,i._editPoint=void 0),i.viewer.scene._screenSpaceCameraController.enableRotate=!0,i._changedEvt.raiseEvent(t._positions))}function N$f(e,t){var i=t;if(i&&i.active&&i._editPointIndex>-1&&i.viewer.scene._screenSpaceCameraController._aggregator._isDown[0]){var n,r=new o$1o(e.endPosition.x,e.endPosition.y),o=i._polyline,a=i._polygon,s=!0;if(e$2b(o)&&(s=o.clampToGround instanceof e$1I?o.clampToGround._value:o.clampToGround),e$2b(a)&&(s=!a.perPositionHeight),s)n=i.viewer.scene.pickPosition(r);else if(i._editZ){var l=i.viewer.camera.getPickRay(r),u=new o$1o(r.x+5,r.y),c=i.viewer.camera.getPickRay(u),h=new o$1p;h=o$1p.cross(l.direction,c.direction,h);var d=new o$1p;o$1p.normalize(h,d);var f=o$1m.fromPointNormal(i.viewer.camera.position,d),p=new f$17(o$1p.ZERO,i._editPoint.position);n=g$1h.rayPlane(p,f)}else{p=i.viewer.camera.getPickRay(r);var _=new i$1c(o$1p.ZERO,o$1p.distance(i._editPoint.position,o$1p.ZERO)),m=g$1h.raySphere(p,_);n=f$17.getPoint(p,m.start)}i._editPoint.position=n;var g=i._positions;g[i._editPointIndex]=n,e$2b(o)&&(o.positions=new n$V((function(){return g}),!1)),e$2b(a)&&(a.hierarchy=new n$V((function(){return{positions:g,holes:[]}}),!1)),i.refreshReferenceAddPoint()}}function q$k(e,t){var i=t;i&&i.active&&C$p(i.viewer,e).then((e=>{if(e$2b(e)){var t=e.id;if(!e$2b(t))return;var n=t.split("_");if(2==n.length&&n[0]===I$r){var r=parseInt(n[1]),o=i._addPositions[r];(u=i._positions).splice(r+1,0,o);var a=i._polyline;e$2b(a)&&(a.positions=new n$V((function(){return u}),!1));var s=i._polygon;if(e$2b(s)){var l=new n$V((function(){return u}),!1),u=s.hierarchy.getValue(0);Array.isArray(u)?s.hierarchy=l:s.hierarchy.positions=l}i.refreshReferencePoint(),i.refreshReferenceAddPoint()}}}))}function j$l(e,t){var i=t;i&&i.active&&C$p(i.viewer,e).then((e=>{if(e$2b(e)){var t=e.id;if(!e$2b(t))return;var n=t.split("_");if(2==n.length&&n[0]===w$l){var r=parseInt(n[1]),o=i._positions;o.splice(r,1);var a=i._polyline;e$2b(a)&&(a.positions=new n$V((function(){return o}),!1));var s=i._polygon;e$2b(s)&&(s.hierarchy=new n$V((function(){return o}),!1)),i.refreshReferencePoint(),i.refreshReferenceAddPoint()}}}))}Object.defineProperties(_$l.prototype,{isEditZ:{get:function(){return this._editZ},set:function(e){this._editZ=e}},changedEvt:{get:function(){return this._changedEvt}}}),_$l.prototype.setEditObject=function(e){if(e$2b(e._polygon)||e$2b(e._polyline)){if(this.clear(),this._editObject=e,this._polygon=e._polygon,e$2b(this._polygon)){var t=this._polygon.hierarchy.getValue(0);if(!Array.isArray(t)){if(!Array.isArray(t.positions))throw new t$16("positions is required!");t=t.positions}if(this._polygon.classificationType&&(this._polygon.classificationType===_0x3b5200.BOTH||this._polygon.classificationType===_0x3b5200.TERRAIN)||!e$2b(this._polygon.height)&&!e$2b(this._polygon.extrudedHeight)&&e$2b(this._polygon.perPositionHeight)&&!this._polygon.perPositionHeight.getValue()){for(var i=[],n=0;n<t.length;n++){var r=a$18.fromCartesian(t[n]);r.height=this.viewer.scene.globe.getHeight(r),i.push(a$18.toCartesian(r))}this._positions=i}else this._positions=t}this._polyline=e._polyline,e$2b(this._polyline)&&(this._positions=this._polyline.positions.getValue(0)),this._editPoints=this.viewer.scene.primitives.add(new w$N({depthTestEnable:!1}));for(n=0;n<this._positions.length;n++)this._editPoints.add({id:w$l+"_"+n,position:this._positions[n],image:n$15("Assets/Textures/vertex-edit.png")});this._editPointIndex=-1,this._editPoint=void 0,this._addPositions=[],this._addPoints=this.viewer.scene.primitives.add(new w$N({depthTestEnable:!1}));for(n=0;n<this._positions.length-1;n++){var o=new o$1p;o$1p.add(this._positions[n],this._positions[n+1],o),o$1p.multiplyByScalar(o,.5,o),this._addPositions.push(o)}if(e$2b(this._polygon)){o=new o$1p;o$1p.add(this._positions[0],this._positions[this._positions.length-1],o),o$1p.multiplyByScalar(o,.5,o),this._addPositions.push(o)}for(n=0;n<this._addPositions.length;n++)this._addPoints.add({id:I$r+"_"+n,position:this._addPositions[n],image:n$15("Assets/Textures/middle-edit.png")});this.activate()}},_$l.prototype.activate=function(){if(1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){K$g(t,e)}),G$I.LEFT_DOWN),this.handler.setInputAction((function(t){G$m(t,e)}),G$I.LEFT_UP),this.handler.setInputAction((function(t){N$f(t,e)}),G$I.MOUSE_MOVE),this.handler.setInputAction((function(t){q$k(t,e)}),G$I.LEFT_CLICK),this.handler.setInputAction((function(t){j$l(t,e)}),G$I.RIGHT_CLICK)}},_$l.prototype.deactivate=function(){this.active=!1,this.handler.removeInputAction(G$I.LEFT_DOWN),this.handler.removeInputAction(G$I.LEFT_UP),this.handler.removeInputAction(G$I.MOUSE_MOVE),this.handler.removeInputAction(G$I.LEFT_CLICK),this.handler.removeInputAction(G$I.RIGHT_CLICK)},_$l.prototype.clear=function(){this.deactivate(),e$2b(this._editPoints)&&this._editPoints.removeAll(),e$2b(this._editPointIndex)&&(this._editPointIndex=-1),e$2b(this._editPoint)&&(this._editPoint=void 0),e$2b(this._editObject)&&(this._editObject=void 0),e$2b(this._polygon)&&(this._polygon=void 0),e$2b(this._polyline)&&(this._polyline=void 0),e$2b(this._addPoints)&&this._addPoints.removeAll(),e$2b(this._addPositions)&&(this._addPositions.length=0),e$2b(this._positions)&&(this._positions=void 0)},_$l.prototype.refreshReferencePoint=function(){e$2b(this._editPoints)&&this._editPoints.removeAll(),this._editPoints=this.viewer.scene.primitives.add(new w$N({depthTestEnable:!1}));for(var e=0;e<this._positions.length;e++)this._editPoints.add({id:w$l+"_"+e,position:this._positions[e],image:n$15("Assets/Textures/vertex-edit.png")});e$2b(this._editPointIndex)&&(this._editPointIndex=-1),e$2b(this._editPoint)&&(this._editPoint=void 0)},_$l.prototype.refreshReferenceAddPoint=function(){e$2b(this._addPoints)&&this._addPoints.removeAll(),this._addPositions=[],this._addPoints=this.viewer.scene.primitives.add(new w$N({depthTestEnable:!1}));for(var e=0;e<this._positions.length-1;e++){var t=new o$1p;o$1p.add(this._positions[e],this._positions[e+1],t),o$1p.multiplyByScalar(t,.5,t),this._addPositions.push(t)}if(e$2b(this._polygon)){t=new o$1p;o$1p.add(this._positions[0],this._positions[this._positions.length-1],t),o$1p.multiplyByScalar(t,.5,t),this._addPositions.push(t)}for(e=0;e<this._addPositions.length;e++)this._addPoints.add({position:this._addPositions[e],id:I$r+"_"+e,image:n$15("Assets/Textures/middle-edit.png")})};var e$l={Distance:0,Area:1,DVH:2,DVHX:3},_0x91cd7b=Object.freeze(e$l),T$l=function(e,t,i,n){if(!e$2b(e)||!e$2b(t))throw new t$16("viewer and mode is required!");this.handler=new g$J(e.scene.canvas),this.viewer=e,this._clampMode=u$_(i,l$p.Space),this.mode=t,this.isDrawing=!1,this.active=!1,this.tmpEntities=[],this._areaLabel=void 0,this._disLabel=void 0,this._vLabel=void 0,this._hLabel=void 0,this._measureEvt=new o$1h,this._activeEvt=new o$1h,this._enableDepthTest=!1,this._labelBackgroundColor=e$1U.fromCssColorString("rgba(38, 38, 38, 0.85)"),this._labelPixelOffsetScaleByDistance=new o$Y(150,3,15e6,.5),this._labelPixelOffset=new o$1o(15,0),this._lineColor=e$1U.fromCssColorString("#51ff00"),this._fillColor=e$1U.ORANGE.withAlpha(.5),this._lineWidth=2,this._dblclickListener=void 0,this._showMeasureResult=u$_(n,!0),this._lineDisplayType=X$V.NON_OCCLUDED};function we$5(e,t){var i=t;if(i&&i.active){var n=i.viewer.scene;n.pickPositionAsync(e.position).then((t=>{!e$2b(t)&&n.mode===C$13.SCENE2D&&(t=n.camera.pickEllipsoid(e.position));var r=n.pickPointEnabled?u$_(o$1p.clone(n.pickPoint),t):t;if(r)if(i.isDrawing)if(i.mode==_0x91cd7b.DVH||i.mode==_0x91cd7b.DVHX)i.deactivate();else{var o=r;if(i&&i.active&&i.isDrawing&&e$2b(o))switch(i.mode){case _0x91cd7b.Distance:le$c(o,i);break;case _0x91cd7b.Area:ne$b(o,i);break;case _0x91cd7b.DVH:re$9(o,i)}Ce$5(r,i)}else switch(i.isDrawing=!0,i.mode){case _0x91cd7b.Distance:De$9(r,i);break;case _0x91cd7b.Area:Le$7(r,i);break;case _0x91cd7b.DVH:Me$7(r,i);break;case _0x91cd7b.DVHX:Se$6(r,i)}}))}}function be$9(e,t){var i=t,n=i.viewer.scene;n.pickPositionAsync(e.endPosition).then((t=>{!e$2b(t)&&n.mode===C$13.SCENE2D&&(t=n.camera.pickEllipsoid(e.endPosition));var r=n.pickPointEnabled?u$_(o$1p.clone(n.pickPoint),t):t;if(i&&i.active&&i.isDrawing&&e$2b(r))switch(i.mode){case _0x91cd7b.Distance:le$c(r,i);break;case _0x91cd7b.Area:ne$b(r,i);break;case _0x91cd7b.DVH:re$9(r,i)}}))}function Ee$9(e,t){var i=t;i.viewer.scene.pickPositionAsync(e.position).then((e=>{if(i&&i.active&&i.isDrawing){var n;if(i.deactivate(),e$2b(i.polyline)&&(i.mode===_0x91cd7b.Distance?(n=i._accumulationPositions,1===i.polyline.positions.length&&i.viewer.entities.remove(i.spEntity)):(i.mode===_0x91cd7b.Area?i.polyline.positions.push(i.polyline.positions[0]):i.polyline.positions=i.polyline.positions.slice(0,i.polyline.positions.length-1),1===i.polyline.positions.length&&i.viewer.entities.remove(i.spEntity),n=i.polyline.positions),i.viewer.entities.remove(i.epEntity),!e$2b(i.polygon))){i.polylinePositions=n,i._disLabel.position=n[n.length-1];var r=0;if(t._clampMode===l$p.Ground)r=Pe$5(i.viewer.scene,i._accumulationPositions);else for(var o=0,a=n.length-1;o<a;o++)r+=o$1p.distance(n[o],n[o+1]);i._disLabel.show=!0,i.measureEvt.raiseEvent({distance:r.toFixed(8),positions:n})}if(e$2b(i.polygon)){if(n.length<3){i._areaLabel.show=!1,i.viewer.entities.remove(i.spEntity);for(o=0,a=i.tmpEntities.length;o<a;o++)i.viewer.entities.remove(i.tmpEntities[o]);i.tmpEntities.length=0,i.viewer.entities.remove(i.epEntity),i.polyline.positions.length=0}if(i._areaLabel.show=!0,(i._clampMode==l$p.Ground||i._clampMode==l$p.S3mModel)&&(i.polyline.show=!0),i.polygonPositions=i.polyline.positions,i.polygon.show=!0,n.length>2){if(i._clampMode!==l$p.Ground)i._areaLabel.position=i.polyline.positions[i.polyline.positions.length-1];else{var s=i.tmpEntities[i.tmpEntities.length-1]._position._value;i._areaLabel.position=s}if(i._clampMode===l$p.Ground){var l=Oe$7(i.viewer.scene,i.polyline.positions);return void i.measureEvt.raiseEvent({area:l.toFixed(8),positions:n})}var u,c,h,d=A$1g.triangulate(n),f=d.length/3,p=0;for(o=0;o<f;o++)u=n[d[3*o]],c=n[d[3*o+1]],h=n[d[3*o+2]],b$w=o$1p.subtract(c,u,b$w),E$q=o$1p.subtract(h,u,E$q),C$o=o$1p.cross(b$w,E$q,C$o),p+=.5*o$1p.magnitude(C$o);i.measureEvt.raiseEvent({area:p.toFixed(8),positions:n})}}}}))}function Ce$5(e,t){var i=t;i.mode===_0x91cd7b.Distance?(i.polyline.positions.push(e),i._accumulationPositions.push(e)):(i.mode===_0x91cd7b.Area&&(i._accumulationArea=i._currentArea),i.polyline.positions.pop(),i.polyline.positions.push(e),i.polyline.positions.push(i.polyline.positions[0])),e$2b(i.polygon)&&(i.polygonPositions=i.polyline.positions),i.tmpEntities.push(i.viewer.entities.add({show:i._showMeasureResult,position:e,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}))}Object.defineProperties(T$l.prototype,{activeEvt:{get:function(){return this._activeEvt}},measureEvt:{get:function(){return this._measureEvt}},disLabel:{get:function(){return this._disLabel}},areaLabel:{get:function(){return this._areaLabel}},hLabel:{get:function(){return this._hLabel}},vLabel:{get:function(){return this._vLabel}},clampMode:{get:function(){return this._clampMode},set:function(e){e$2b(e)&&e!=this._clampMode&&(this._clampMode=e,e$2b(this.polygon)&&(e==l$p.Space?(this.polygon.polygon.perPositionHeight.setValue(!0),this.polygon.clampToS3M=!1):e==l$p.Ground?(this.polygon.polygon.perPositionHeight.setValue(!1),this.polygon.clampToS3M=!1):e==l$p.S3mModel&&(this.polygon.polygon.perPositionHeight.setValue(!1),this.polygon.clampToS3M=!0)),e$2b(this.polyline)&&(e==l$p.Ground?this.polyline._polyline.clampToGround=!0:this.polyline._polyline.clampToGround=!1))}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){console.warn("MeasureHandler.enableDepthTest is deprecated, use MeasureHandler.lineDisplayType instead."),o$1q.typeOf.bool("MeasureHandler.enableDepthTest",e),this._enableDepthTest=e,this._lineDisplayType=e?X$V.OCCLUDED:X$V.NON_OCCLUDED}},capturePointSize:{get:function(){return this.viewer._capturePointSize},set:function(e){this.viewer._capturePointSize=e}},capturePointColor:{get:function(){return this.viewer._capturePointColor},set:function(e){this.viewer._capturePointColor=e}},lineColor:{get:function(){return this._lineColor},set:function(e){this._lineColor=e}},fillColor:{get:function(){return this._fillColor},set:function(e){this._fillColor=e}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e}},lineDisplayType:{get:function(){return this._lineDisplayType},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("MeasureHandler.lineDisplayType",e,0),o$1q.typeOf.number.lessThanOrEquals("MeasureHandler.lineDisplayType",e,2),this._lineDisplayType=e,this.polylines&&(this.polylines.lineDisplayType=e)}}}),T$l.prototype.activate=function(){if(this.mode!==_0x91cd7b.DVH&&this.clear(),1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){we$5(t,e)}),G$I.LEFT_CLICK),this.handler.setInputAction((function(t){be$9(t,e)}),G$I.MOUSE_MOVE),this.handler.setInputAction((function(t){Ee$9(t,e)}),G$I.RIGHT_CLICK),this.activeEvt.raiseEvent(!0),this._dblclickListener=this.viewer.screenSpaceEventHandler.getInputAction(G$I.LEFT_DOUBLE_CLICK),this.viewer.screenSpaceEventHandler.removeInputAction(G$I.LEFT_DOUBLE_CLICK)}},T$l.prototype.deactivate=function(){!0===this.active&&this.activeEvt.raiseEvent(!1),this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(G$I.LEFT_CLICK),this.handler.removeInputAction(G$I.MOUSE_MOVE),this.handler.removeInputAction(G$I.RIGHT_CLICK),e$2b(this._dblclickListener)&&(this.viewer.screenSpaceEventHandler.setInputAction(this._dblclickListener,G$I.LEFT_DOUBLE_CLICK),this._dblclickListener=void 0)},T$l.prototype.clear=function(){this.deactivate();for(var e=0,t=this.tmpEntities.length;e<t;e++)this.viewer.entities.remove(this.tmpEntities[e]);if(this.tmpEntities.length=0,e$2b(this.polylines)&&(this.polylines.removeAll(),this.viewer.scene.primitives.remove(this.polylines),this.polylines=void 0),e$2b(this.spEntity)&&(this.viewer.entities.remove(this.spEntity),this.spEntity=void 0),e$2b(this.epEntity)&&(this.viewer.entities.remove(this.epEntity),this.epEntity=void 0),e$2b(this.fpEntity)&&(this.viewer.entities.remove(this.fpEntity),this.fpEntity=void 0),e$2b(this.labels))switch(this.mode){case _0x91cd7b.Distance:this.labels.remove(this._disLabel);break;case _0x91cd7b.Area:this.labels.remove(this._areaLabel);break;case _0x91cd7b.DVH:this.labels.removeAll()}e$2b(this.polygon)&&(this.viewer.entities.remove(this.polygon),this.polygon=void 0),e$2b(this.polyline)&&this.viewer.entities.remove(this.polyline)};var b$w=new o$1p,E$q=new o$1p,C$o=new o$1p;function ne$b(e,t){var i=t;if(e$2b(e)){i.endPoint=e;var n=i.polyline.positions,r=n.length;if(r>3?(n[r-2]=e,n.pop()):n[r-1]=e,r>2&&(e$2b(i._areaLabel)&&(i._areaLabel.show=!0),i.polygonPositions=n),i.polyline.positions=n,n.length>2){var o;if(i.epEntity.position=e,i._areaLabel.position=e,i._areaLabel.show=t._clampMode!==l$p.Ground,i.polyline.positions.push(i.polyline.positions[0]),t._clampMode===l$p.Ground)return;o=T$l.computeArea(n),i.measureEvt.raiseEvent({area:o.toFixed(8),positions:n})}}}function Le$7(e,t){var i=t;i.polygonPositions=[],i.polylineCoord=[e,e],i.tmpEntities.length=0;var n=i._enableDepthTest;i.polyline=i.viewer.entities.add({polyline:{positions:new n$V((function(){return i.polylineCoord}),!1),width:i._lineWidth,material:e$1U.fromCssColorString("#51ff00"),loop:!0,clampToGround:i._clampMode===l$p.Ground}}),i.polyline.positions=i.polylineCoord,i.spEntity=i.viewer.entities.add({position:e,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}});var r=i.viewer.scene.primitives.add(new g$U({depthTestEnable:!1}));i._areaLabel=r.add({position:e,font:"100 20px SimSun",fillColor:e$1U.WHITE,style:R$Q.FILL_AND_OUTLINE,showBackground:!0,outlineWidth:1,outlineColor:e$1U.BLUE,pixelOffset:i._labelPixelOffset,text:"",show:i._showMeasureResult,horizontalOrigin:j$T.LEFT});var o=i._clampMode,a=!1,s=!1;o==l$p.Space?a=!0:o==l$p.S3mModel&&(s=!0),i.polygon=i.viewer.entities.add({polygon:{hierarchy:new n$V((function(){return{positions:JSON.parse(JSON.stringify(i.polygonPositions)),holes:[]}}),!1),material:i._fillColor,perPositionHeight:a},clampToS3M:s,depthTestEnabled:n,show:!0}),i.labels=r,t._clampMode===l$p.Ground&&(i.polyline.show=!0),i._areaLabel.show=!1}function De$9(e,t){var i=t;i.polylinePositions=[e,e],i.polyline=i.viewer.entities.add({polyline:{positions:new n$V((function(){return i.polylinePositions}),!1),width:i._lineWidth,material:i._lineColor,clampToGround:t._clampMode===l$p.Ground}}),i.polyline.positions=i.polylinePositions,i.tmpEntities.length=0,i._accumulationPositions=[e],i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}});var n=i.viewer.scene.primitives.add(new g$U({depthTestEnable:!1}));i._disLabel=n.add({position:e,font:"100 20px SimSun",fillColor:e$1U.WHITE,style:R$Q.FILL_AND_OUTLINE,showBackground:!0,backgroundColor:i._labelBackgroundColor,outlineWidth:1,outlineColor:e$1U.BLUE,pixelOffset:i._labelPixelOffset,text:"",show:i._showMeasureResult,horizontalOrigin:j$T.LEFT}),i.labels=n}function le$c(e,t){var i=t;i.endPoint=e;var n=i.polyline.positions,r=n.length;i.polylinePositions=n,n[r-1]=e,i.polyline.positions=n,i.epEntity.position=e;var o=0,a=i._accumulationPositions.concat([e]);if(i.polyline._distance=o,i._disLabel.position=e,i._disLabel.show=t._clampMode!==l$p.Ground,t._clampMode!==l$p.Ground){for(var s=0,l=a.length-1;s<l;s++)o+=o$1p.distance(a[s],a[s+1]);i.measureEvt.raiseEvent({distance:o.toFixed(8),positions:a})}}function Me$7(e,t){var i=t;if(!e$2b(i.polylines)){var n=i._enableDepthTest;i.polylines=new k$T({opaqueRS:d$1m.fromCache({depthMask:n,depthTest:{enabled:n}}),lineDisplayType:i._lineDisplayType}),i.viewer.scene.primitives.add(i.polylines)}i.horizontalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$X.fromType(r$X.ColorType,{color:i._lineColor})}),i.verticalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$X.fromType(r$X.ColorType,{color:i._lineColor})}),i.dirPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$X.fromType(r$X.ColorType,{color:i._lineColor})}),i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}),i.fpEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}),i.tmpEntities.push(i.spEntity),i.tmpEntities.push(i.epEntity),i.tmpEntities.push(i.fpEntity),e$2b(i.labels)||(i.labels=i.viewer.scene.primitives.add(new g$U({depthTestEnable:!1}))),i._disLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:R$Q.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1U.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$T.LEFT}),i._vLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:R$Q.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1U.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$T.LEFT}),i._hLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:R$Q.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1U.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$T.LEFT});var r=new o$1p;o$1p.normalize(e,r),i.plane=o$1m.fromPointNormal(e,r),i.startPoint=e,i.startHeight=a$18.fromCartesian(e).height,i.normal=r;var o=new o$1p;o$1p.negate(r,o),i.negateNormal=o,i.spEntity.position=e}function Se$6(e,t){var i=t;if(!e$2b(i.polylines)){i.polylines=new k$T,i.verticalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$X.fromType(r$X.ColorType,{color:i._lineColor})}),i.startPoint=e,i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}}),i.fpEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1U.fromCssColorString("#ffe500")}});var n=i.viewer.scene.primitives.add(new g$U({depthTestEnable:!1}));i._vLabel=n.add({position:e,font:"500 16px sans-serif",style:R$Q.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1U.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$T.LEFT}),i.viewer.scene.primitives.add(i.polylines),i.labels=n}i.startPoint=e,i.spEntity.position=e}var Te$7=new o$1p;function re$9(e,t){var i=t;if(i.viewer.scene,e$2b(e)){i.endPoint=e;var n,r,o=a$18.fromCartesian(e).height;if(o>i.startHeight){var a=o$1p.normalize(e,Te$7);n=o$1m.fromPointNormal(e,a),r=new f$17(i.startPoint,a)}else n=i.plane,r=new f$17(e,i.normal);var s=g$1h.rayPlane(r,n);if(e$2b(s)||(r=new f$17(e,i.normal),s=g$1h.rayPlane(r,i.plane))){o>i.startHeight?(i.horizontalPolyline.positions=[e,s],i.verticalPolyline.positions=[i.startPoint,s]):(i.horizontalPolyline.positions=[i.startPoint,s],i.verticalPolyline.positions=[e,s]),i.dirPolyline.positions=[i.startPoint,e],i.epEntity.position=e,i.fpEntity.position=s;var l=o$1p.distance(i.startPoint,e).toFixed(8),u=o$1p.distance(i.startPoint,s).toFixed(8),c=o$1p.distance(e,s).toFixed(8);o>i.startHeight?(o$1p.lerp(i.startPoint,e,.5,i._disLabel.position),o$1p.lerp(i.startPoint,s,.5,i._vLabel.position),o$1p.lerp(e,s,.5,i._hLabel.position)):(o$1p.lerp(i.startPoint,e,.5,i._disLabel.position),o$1p.lerp(e,s,.5,i._vLabel.position),o$1p.lerp(i.startPoint,s,.5,i._hLabel.position),u=o$1p.distance(e,s).toFixed(8),c=o$1p.distance(i.startPoint,s).toFixed(8)),i.measureEvt.raiseEvent({distance:l,directionalPositions:i.dirPolyline.positions,verticalHeight:u,verticalPositions:i.verticalPolyline.positions,horizontalDistance:c,horizontalPositions:i.horizontalPolyline.positions,endHeight:o})}}}function Oe$7(e,t){for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=0;a<t.length;a++){var s=a$18.fromCartesian(t[a]);i=Math.min(s.longitude,i),n=Math.max(s.longitude,n),r=Math.min(s.latitude,r),o=Math.max(s.latitude,o)}for(var l=a$18.toCartesian(new a$18(i,r,0)),u=a$18.toCartesian(new a$18(n,o,0)),c=o$1p.angleBetween(l,u),h=z$_.fromPositions({positions:t,granularity:c/32}),d=z$_.createGeometry(h),f=0,p={},_=0;_<d.indices.length;_+=3){var m,g=d.indices[_];if(e$2b(p[g]))m=p[g];else{m=new o$1p(d.attributes.position.values[3*g],d.attributes.position.values[3*g+1],d.attributes.position.values[3*g+2]);var x=a$18.fromCartesian(m),v=e.globe.getHeight(x);if(!e$2b(v))continue;x=a$18.fromRadians(x.longitude,x.latitude,v),m=a$18.toCartesian(x),p[g]=o$1p.clone(m)}var y,$=d.indices[_+1];if(e$2b(p[$]))y=p[$];else{y=new o$1p(d.attributes.position.values[3*$],d.attributes.position.values[3*$+1],d.attributes.position.values[3*$+2]);var b=a$18.fromCartesian(y),T=e.globe.getHeight(b);if(!e$2b(T))continue;b=a$18.fromRadians(b.longitude,b.latitude,T),y=a$18.toCartesian(b),p[$]=o$1p.clone(y)}var C,S=d.indices[_+2];if(e$2b(p[S]))C=p[S];else{C=new o$1p(d.attributes.position.values[3*S],d.attributes.position.values[3*S+1],d.attributes.position.values[3*S+2]);var w=a$18.fromCartesian(C),E=e.globe.getHeight(w);if(!e$2b(E))continue;w=a$18.fromRadians(w.longitude,w.latitude,E),C=a$18.toCartesian(w),p[S]=o$1p.clone(C)}b$w=o$1p.subtract(y,m,b$w),E$q=o$1p.subtract(C,m,E$q),C$o=o$1p.cross(b$w,E$q,C$o),f+=.5*o$1p.magnitude(C$o)}return f}function Pe$5(e,t){for(var i=0,n=[],r=t.length-1,o=0;o<r;o++){var a=t[o],s=t[o+1],l=o$1p.angleBetween(a,s);if(!(l<e$2a.EPSILON10))for(var u=l/64,c=e$2a.chordLength(u,6378137),h=y$_.subdivideLine(a,s,c,n),d=o$1p.unpackArray(h),f=d.length-1,p=0;p<f;p++){var _=d[p],m=a$18.fromCartesian(_),g=e.globe.getHeight(m);m=a$18.fromRadians(m.longitude,m.latitude,g);var x=a$18.toCartesian(m),v=d[p+1];m=a$18.fromCartesian(v),g=e.globe.getHeight(m),m=a$18.fromRadians(m.longitude,m.latitude,g);var y=a$18.toCartesian(m);i+=o$1p.distance(x,y)}}return i}T$l.computeArea=function(e){for(var t,i,n,r=A$1g.triangulate(e),o=r.length/3,a=0,s=0;s<o;s++)t=e[r[3*s]],i=e[r[3*s+1]],n=e[r[3*s+2]],b$w=o$1p.subtract(i,t,b$w),E$q=o$1p.subtract(n,t,E$q),C$o=o$1p.cross(b$w,E$q,C$o),a+=.5*o$1p.magnitude(C$o);return a};var l$o={LINE_X:1,LINE_Y:2,LINE_Z:3,CIRCLE_X:4,CIRCLE_Y:5,CIRCLE_Z:6,SCALE_LINE_X:7,SCALE_LINE_Y:8,SCALE_LINE_Z:9,UNIFORM_SCALE:10},U$k={ENTITY:1,S3MINSTANCE:2},q$j=new o$1p,J$e=new o$1p,K$f=new o$1p,de$7=new o$1p,I$q=new o$1p;new p$1d;var Te$6=new o$1p,Y$f=new p$1e,me$a=new n$13,g$u=new p$1d,Re$6=new p$1d,Ae$7=new p$1d,be$8=new o$1p,Ze$5=new o$1p,Oe$6=new o$1p,Ue$3=new o$1p,S$k=new i$15,Ye$3=new p$1d;new o$1p;var $$i=new o$1p;function z$m(e,t){for(var i=e.attributes.position.values,n=0,r=i.length;n<r;n+=3)i[n+2]+=t}function De$8(e,t,i){var n=p$1d.getMatrix3(e,Y$f),r=n$13.fromRotationMatrix(n,me$a),o=p$1e.fromQuaternion(r,Y$f),a=p$1d.fromRotationTranslation(o,o$1p.ZERO,Ye$3),s=p$1d.inverse(t,g$u),l=p$1d.multiply(s,a,g$u),u=p$1d.getMatrix3(l,Y$f);return p$1d.fromRotationTranslation(u,o$1p.ZERO,i)}function ve$7(e,t){return p$1d.getMatrix3(e,Y$f),n$13.fromRotationMatrix(Y$f,t),t}function b$v(e,t,i,n){var r=e.getPickRay(t),o=o$1m.fromPointNormal(i,n);return g$1h.rayPlane(r,o)}function We$3(e,t,i){var n=[],r=t$Y.createVertexBuffer({context:e,typedArray:S$12.createTypedArray(S$12.FLOAT,i.attributes.position.values),usage:A$19.STATIC_DRAW});n.push({name:"aPosition",index:0,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var o=new c$12({context:e,attributes:n,indexBuffer:t$Y.createIndexBuffer({context:e,typedArray:i.indices,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})}),a=r$13.fromCache({name:"modelEditor",context:e,vertexShaderSource:"attribute vec4 aPosition;\nuniform vec4 uColor;\nuniform vec4 uPickColor;\nuniform float uScale;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n vColor = uColor;\n vPickColor = uPickColor;\n mat4 scaleMatrix;\n scaleMatrix[0] = vec4(uScale, 0.0, 0.0, 0.0);\n scaleMatrix[1] = vec4(0.0, uScale, 0.0, 0.0);\n scaleMatrix[2] = vec4(0.0, 0.0, uScale, 0.0);\n scaleMatrix[3] = vec4(0.0, 0.0, 0.0, 1.0);\n gl_Position = czm_modelViewProjection * scaleMatrix * vec4(aPosition.xyz, 1.0);\n}",fragmentShaderSource:"varying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n gl_FragColor = vColor;\n}\n",attributeLocations:{aPosition:0}}),s=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:t._modelMatrix,pass:Le$s.LOG_DEPTH_OVERLAY,owner:t});s.vertexArray=o,s.shaderProgram=a;var l={id:t._id,primitive:t},u=e.createPickId(l);s.pickId="vPickColor",s.uniformMap={uColor:function(){return t._uColor},uPickColor:function(){return u.color},uScale:function(){return t._scaleAdjusted}},s.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var c=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:t._modelMatrix,pass:Le$s.OPAQUE+2,owner:t});c.vertexArray=o,c.shaderProgram=a;var h={id:t._id+"#2",primitive:t},d=e.createPickId(h);c.pickId="vPickColor",c.uniformMap={uColor:function(){return t._uColor.withAlpha(.2)},uPickColor:function(){return d.color},uScale:function(){return t._scaleAdjusted}},c.renderState=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),t._commands.push(c),t._commands.push(s)}var Be$6=new n$13;function Xe$3(e,t){var i=t.modelMatrix,n=o$1p.negate(e._offset,K$f),r=p$1d.fromTranslation(n,Ae$7),o=m$17.eastNorthUpToFixedFrame(e._position,void 0,Re$6),a=De$8(i,o,g$u),s=ve$7(a,Be$6);p$1d.multiply(o,p$1d.multiply(a,r,a),g$u);var l=p$1d.getTranslation(g$u,Te$6);ke$2(e,l,ve$7(g$u,me$a),t.nonUniformScaleAddition,t.uniformScaleAddition,r),Fe$6(e,l,s,t.nonUniformScaleAddition,t.uniformScaleAddition)}function ke$2(e,t,i,n,r,o){if(e._modelType===U$k.ENTITY){e._model.model._offsetMatrix=o,e._model.position=t,e._model.orientation=i;var a=n;n||(a=o$1p.clone(o$1p.ZERO)),r&&(a.x+=r,a.y+=r,a.z+=r),e._model.model.scale||(e._model.model.scale=o$1p.clone(o$1p.UNIT_XYZ));var s=e._model.model.scale.getValue(0);s instanceof o$1p?(o$1p.add(a,s,a),e._model.model.scale=a):(a.x+=s,a.y+=s,a.z+=s,e._model.model.scale=a)}}function Fe$6(e,t,i,n,r){if(e._modelType===U$k.S3MINSTANCE){e._model.updatePosition(t);var o=i$15.fromQuaternion(i);e._model.updateRotation(o);var a=o$1p.clone(e._model.scale);e$2b(r)&&(a.x+=r,a.y+=r,a.z+=r),e$2b(n)&&o$1p.add(a,n,a),e._model.updateScale(a)}}function D$l(e,t){e.prototype.__proto__=Object.create(t.prototype),e.prototype.__proto__.constructor=e}function E$p(e){this._owner=e.owner,this._color=e$1U.clone(u$_(e.color,e$1U.WHITE)),this._hoverColor=e$1U.clone(u$_(e.hoverColor,e$1U.WHITE)),this._uColor=e$1U.clone(this._color),this._visible=u$_(e.visible,!0),this._scale=u$_(e.scale,o$1p.UNIT_XYZ),this._initTransition=u$_(e.transition,new o$1p),this._initHpr=u$_(e.headingPitchRoll,new i$15),this._initModelMatrix=p$1d.clone(p$1d.IDENTITY),this._initModelMatrixInverse=p$1d.clone(p$1d.IDENTITY),this._modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._id=u$_(e.id,e$1Q()),this._typeForModelEditor=u$_(e.type,-1),this._commands=[],this._geometries=[],this._updateMatrix(),this._setChangeEvt(),this._adjustAxisLength=void 0,this._scaleAdjusted=1}function je$3(e,t){return function(i){if(!(e$2b(i)&&i<.05)){var n=150*Ge$3(e,t._owner._model._position||t._owner._model._position._value);t._scaleAdjusted=Math.max(n/10,1),t._scaleAdjusted=t._scaleAdjusted>1e3?1:t._scaleAdjusted}}}function W$n(e){this._color=u$_(e.color,e$1U.WHITE),this._lineWidth=u$_(e.lineWidth,.02),this._lineLength=u$_(e.lineLength,5),this._arrowWidth=u$_(e.arrowWidth,.2),this._arrowLength=u$_(e.arrowLength,1),this._lineWidth=this._lineWidth*u$_(e.lineWidthScale,4),E$p.call(this,e)}function B$j(e){this._lineWidth=u$_(e.lineWidth,.02),this._lineLength=u$_(e.lineLength,10),this._headDimension=u$_(e.headDimension,.2),E$p.call(this,e)}function ee$9(e){this._dimensions=u$_(e.dimensions,.2),this._color=u$_(e.color,e$1U.WHITE),E$p.call(this,e)}function X$e(e){this._width=u$_(e.width,.02),this._radius=u$_(e.radius,7.5),this._width=this._width*u$_(e.lineWidthScale,4),E$p.call(this,e)}function k$k(e){this._dimensions=u$_(e.dimensions,.2),E$p.call(this,e)}function u$o(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.scene",e.scene),o$1q.typeOf.object("options.model",e.model);var t=e.model,i=t instanceof h$V;if(!i&&!(t instanceof _0x331f36))throw new t$16("Unsupported model type.");this._scene=e.scene,this._modelType=i?U$k.ENTITY:U$k.S3MINSTANCE,this._offset=u$_(e.offset,o$1p.ZERO),this._hoverColor=u$_(e.hoverColor,e$1U.WHITE),this._scale=u$_(e.scale,1),this._model=t,this._active=!1,this._hpr=void 0,this._handler=new g$J(this._scene.canvas),this._primitives=[],this._axesShow=p$19(e.axesShow,{translation:!0,rotation:!0,scale:!0}),this._lineWidthScale=u$_(e.lineWidthScale,4),this._modelType===U$k.ENTITY?(this._position=t.position.getValue(0),this._orientation=t.orientation?t.orientation.getValue(0):new n$13,this._calcHpr()):(this._position=t.position,this._hpr=i$15.clone(t.hpr)),this._fromEnu=m$17.eastNorthUpToFixedFrame(this._position),p$1d.multiplyByPoint(this._fromEnu,this._offset,this._position),this._modelMatrix=m$17.headingPitchRollToFixedFrame(this._position,this._hpr),this._modelMatrixInverse=p$1d.inverse(this._modelMatrix,new p$1d),!e$2b(this._changedEvt)&&(this._changedEvt=new o$1h),!e$2b(this._hoverChanged)&&(this._hoverChanged=new o$1h),this._axesCreated=!1;var n=this;this._changedEvt.addEventListener((function(e){Xe$3(n,e)}))}function Ge$3(e,t){var i=e.context._us,n=i._viewport,r=n.width,o=n.height,a=new o$1p;p$1d.multiplyByPoint(i._view,t,a);var s,l,u=i.frustumPlanes,c=u.x,h=u.y,d=u.z,f=u.w;if(e.mode===C$13.COLUMBUS_VIEW||i.orthographicIn3D){s=(f-d)/r,l=(c-h)/o}else{var p=-a.z,_=1/i.currentFrustum.x,m=c*_;l=2*p*m/o,s=2*p*(m=f*_)/r}return Math.max(s,l)}E$p.prototype._setChangeEvt=function(){var e=this;this._owner._changedEvt.addEventListener((function(t){p$1d.multiply(t.modelMatrix,e._initModelMatrix,e._modelMatrix)})),this._owner._hoverChanged.addEventListener((function(t){t===e._typeForModelEditor?e$1U.clone(e._hoverColor,e._uColor):e$1U.clone(e._color,e._uColor),t>=1&&t<=10&&t!==e._typeForModelEditor?e._color=e._color.withAlpha(.05,e._color):e._color=e._color.withAlpha(1,e._color)}))},E$p.prototype._createGeometry=function(){},E$p.prototype._updateMatrix=function(){p$1d.fromTranslationQuaternionRotationScale(this._initTransition,n$13.fromHeadingPitchRoll(this._initHpr),this._scale,this._initModelMatrix),p$1d.inverse(this._initModelMatrix,this._initModelMatrixInverse),p$1d.multiply(this._modelMatrix,this._initModelMatrix,this._modelMatrix)},E$p.prototype.update=function(e){if(e$2b(this._adjustAxisLength)||(this._adjustAxisLength=je$3(e,this),e.camera.changed.addEventListener(this._adjustAxisLength)),0===this._commands.length){this._createGeometry();for(var t=0,i=this._geometries.length;t<i;t++){var n=this._geometries[t];We$3(e.context,this,n)}}if(this._visible)for(t=0,i=this._commands.length;t<i;t++){var r=this._commands[t];e.commandList.push(r)}},E$p.prototype.destroy=function(){this._geometries.length=0;for(var e=0,t=this._commands.length;e<t;e++){var i=this._commands[e];i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy(),i.shaderProgram=i.shaderProgram&&!i.shaderProgram.isDestroyed()&&i.shaderProgram.destroy()}this._commands.length=0},W$n.prototype._createGeometry=function(){var e=l$Q.createGeometry(new l$Q({length:this._lineLength,topRadius:this._lineWidth,bottomRadius:this._lineWidth})),t=l$Q.createGeometry(new l$Q({length:this._arrowLength,topRadius:.01,bottomRadius:this._arrowWidth}));z$m(e,this._lineLength/2),z$m(t,this._lineLength),this._geometries.push(e),this._geometries.push(t)},D$l(W$n,E$p),B$j.prototype._createGeometry=function(){var e=l$Q.createGeometry(new l$Q({length:this._lineLength,topRadius:this._lineWidth,bottomRadius:this._lineWidth})),t=O$y.createGeometry(new O$y({minimum:new o$1p(-this._headDimension,-this._headDimension,-this._headDimension),maximum:new o$1p(this._headDimension,this._headDimension,this._headDimension),vertexFormat:n$11.POSITION_AND_NORMAL}));z$m(e,this._lineLength/2),z$m(t,this._lineLength),this._geometries.push(e),this._geometries.push(t)},D$l(B$j,E$p),ee$9.prototype._createGeometry=function(){var e=O$y.createGeometry(new O$y({minimum:new o$1p(-this._dimensions,-this._dimensions,-this._dimensions),maximum:new o$1p(this._dimensions,this._dimensions,this._dimensions),vertexFormat:n$11.POSITION_AND_NORMAL}));this._geometries.push(e)},D$l(ee$9,E$p),X$e.prototype._createGeometry=function(){var e=N$y.createGeometry(new N$y({polylinePositions:function(e){for(var t=[],i=0;i<=360;i+=3){var n=e$2a.toRadians(i),r=new o$1p(e*Math.cos(n),e*Math.sin(n),0);t.push(r)}return t}(this._radius),shapePositions:function(e){for(var t=[],i=0;i<=360;i+=10){var n=e$2a.toRadians(i);t.push(new o$1o(e*Math.cos(n),e*Math.sin(n)))}return t}(this._width),vertexFormat:n$11.POSITION_AND_NORMAL}));this._geometries.push(e)},D$l(X$e,E$p),k$k.prototype._createGeometry=function(){var e=this._dimensions,t=P$H.createGeometry(new P$H({polygonHierarchy:new e$1J([new o$1p(-e,e,0),new o$1p(-e,-e,0),new o$1p(e,-e,0),new o$1p(e,e,0)]),perPositionHeight:!0,vertexFormat:n$11.POSITION_AND_NORMAL}));this._geometries.push(t)},D$l(k$k,E$p),Object.defineProperties(u$o.prototype,{changedEvt:{get:function(){return this._changedEvt}}}),u$o.prototype.setEditObject=function(e){this._clearEditObject(),this.constructor({model:e,scene:this._scene,offset:this._offset,axesShow:this._axesShow}),this.activate()},u$o.prototype._clearEditObject=function(){for(var e=0;e<this._primitives.length;e++)this._scene.primitives.remove(this._primitives[e]),this._primitives[e]=void 0;this._primitives=[],this._handler.destroy()},u$o.prototype._calcHpr=function(){var e=p$1e.fromQuaternion(this._orientation,new p$1e),t=p$1d.fromRotationTranslation(e,o$1p.ZERO,new p$1d),i=p$1d.inverse(m$17.eastNorthUpToFixedFrame(this._position),new p$1d),n=p$1d.multiply(i,t,new p$1d),r=p$1d.getMatrix3(n,new p$1e);this._hpr=i$15.fromQuaternion(n$13.fromRotationMatrix(r))},u$o.prototype._createAxes=function(){this._axisX=new W$n({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,-90,0),color:e$1U.RED,hoverColor:this._hoverColor,type:l$o.LINE_X,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._axisY=new W$n({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,0,-90),color:e$1U.GREEN,hoverColor:this._hoverColor,type:l$o.LINE_Y,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._axisZ=new W$n({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,0,0),color:e$1U.BLUE,hoverColor:this._hoverColor,type:l$o.LINE_Z,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._scaleLineX=new B$j({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,-90,0),color:e$1U.RED,hoverColor:this._hoverColor,type:l$o.SCALE_LINE_X,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._scaleLineY=new B$j({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,0,-90),color:e$1U.GREEN,hoverColor:this._hoverColor,type:l$o.SCALE_LINE_Y,visible:this._axesShow.scale}),this._scaleLineZ=new B$j({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,0,0),color:e$1U.BLUE,hoverColor:this._hoverColor,type:l$o.SCALE_LINE_Z,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._axisCircleX=new X$e({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,-90,0),color:e$1U.RED,hoverColor:this._hoverColor,type:l$o.CIRCLE_X,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._axisCircleY=new X$e({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,0,-90),color:e$1U.GREEN,hoverColor:this._hoverColor,type:l$o.CIRCLE_Y,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._axisCircleZ=new X$e({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$15.fromDegrees(0,0,0),color:e$1U.BLUE,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._transitionPlaneX=new k$k({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.4,transition:new o$1p(0,.4,.4),headingPitchRoll:i$15.fromDegrees(0,-90,0),color:e$1U.RED,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z}),this._transitionPlaneY=new k$k({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.4,transition:new o$1p(.4,0,.4),headingPitchRoll:i$15.fromDegrees(0,0,90),color:e$1U.GREEN,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z}),this._transitionPlaneZ=new k$k({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.4,transition:new o$1p(.4,.4,0),headingPitchRoll:i$15.fromDegrees(0,0,0),color:e$1U.BLUE,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z}),this._uniformScale=new ee$9({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.2,transition:new o$1p(.2001,.2,.2),headingPitchRoll:i$15.fromDegrees(0,0,0),type:l$o.UNIFORM_SCALE,hoverColor:this._hoverColor,color:e$1U.ORANGE,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._primitives=[this._scaleLineX,this._scaleLineY,this._scaleLineZ,this._axisCircleX,this._axisCircleY,this._axisCircleZ,this._uniformScale,this._axisX,this._axisY,this._axisZ],this._scene.primitives.add(this._scaleLineX),this._scene.primitives.add(this._scaleLineY),this._scene.primitives.add(this._scaleLineZ),this._scene.primitives.add(this._axisCircleX),this._scene.primitives.add(this._axisCircleY),this._scene.primitives.add(this._axisCircleZ),this._scene.primitives.add(this._uniformScale),this._scene.primitives.add(this._axisX),this._scene.primitives.add(this._axisY),this._scene.primitives.add(this._axisZ)},u$o.prototype._initEvent=function(){var e=this._scene,t=this,i=this._handler;i.setInputAction((function(i){var n=t._pickObj;!n||!n.primitive||!n.primitive._typeForModelEditor||(t._isEdit=!0,t._pickObj=n,e.screenSpaceCameraController.enableInputs=!1)}),G$I.LEFT_DOWN),i.setInputAction((function(e){t._isEdit?(t._handleTransition(e),t._handleRotation(e),t._handleScale(e),t._handleUniformScale(e)):t._handleHover(e)}),G$I.MOUSE_MOVE),i.setInputAction((function(i){e.screenSpaceCameraController.enableInputs=!0,t._isEdit=!1,t._pickObj=void 0}),G$I.LEFT_UP)},u$o.prototype._handleTransition=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$o.LINE_X||t===l$o.LINE_Y||t===l$o.LINE_Z){var i,n;switch(t){case l$o.LINE_X:i=o$1p.UNIT_Z,n=o$1p.UNIT_Z;break;case l$o.LINE_Y:i=o$1p.UNIT_X,n=o$1p.UNIT_X;break;case l$o.LINE_Z:i=o$1p.UNIT_Y,n=o$1p.UNIT_Y}var r=this._scene,o=e.startPosition,a=e.endPosition,s=p$1d.multiplyByPoint(this._modelMatrix,i,q$j),l=p$1d.multiplyByPoint(this._modelMatrix,o$1p.ZERO,J$e);n=p$1d.multiplyByPoint(this._modelMatrix,n,$$i),o$1p.subtract(s,l,s);var u=o$1p.normalize(s,s),c=b$v(r.camera,o,n,u),h=b$v(r.camera,a,n,u),d=p$1d.multiplyByPoint(this._modelMatrixInverse,c,de$7),f=p$1d.multiplyByPoint(this._modelMatrixInverse,h,K$f);switch(t){case l$o.LINE_X:I$q.x=f.x-d.x;break;case l$o.LINE_Y:I$q.y=f.y-d.y;break;case l$o.LINE_Z:I$q.z=f.z-d.z}p$1d.multiply(this._modelMatrix,p$1d.fromTranslation(I$q,g$u),this._modelMatrix),this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,transitionAddtion:I$q}),p$1d.getTranslation(this._modelMatrix,this._position),o$1p.clone(o$1p.ZERO,I$q)}},u$o.prototype._handleRotation=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$o.CIRCLE_X||t===l$o.CIRCLE_Y||t===l$o.CIRCLE_Z){var i,n,r=this._scene,o=e.startPosition,a=e.endPosition,s=this._position;switch(t){case l$o.CIRCLE_X:i=o$1p.UNIT_X,n=o$1p.UNIT_Y;break;case l$o.CIRCLE_Y:i=o$1p.UNIT_Y,n=o$1p.UNIT_Z;break;case l$o.CIRCLE_Z:i=o$1p.UNIT_Z,n=o$1p.UNIT_X}var l=p$1d.multiplyByPoint(this._modelMatrix,i,q$j),u=p$1d.multiplyByPoint(this._modelMatrix,o$1p.ZERO,J$e);n=p$1d.multiplyByPoint(this._modelMatrix,n,$$i),o$1p.subtract(l,u,l);var c=o$1p.normalize(l,l),h=b$v(r.camera,a,n,c),d=b$v(r.camera,o,n,c),f=o$1p.subtract(h,s,Ze$5),p=o$1p.subtract(d,s,Oe$6),_=o$1p.dot(o$1p.normalize(f,f),o$1p.normalize(p,p)),m=Math.acos(_),g=o$1p.cross(l,f,be$8),x=o$1p.subtract(d,h,Ue$3),v=o$1p.dot(g,o$1p.normalize(x,x));switch(m*=v=v>0?1:-1,t){case l$o.CIRCLE_X:S$k.roll=-m;break;case l$o.CIRCLE_Y:S$k.pitch=m;break;case l$o.CIRCLE_Z:S$k.heading=m}p$1d.multiply(this._modelMatrix,p$1d.fromRotationTranslation(p$1e.fromHeadingPitchRoll(S$k),o$1p.ZERO,g$u),this._modelMatrix),p$1d.inverse(this._modelMatrix,this._modelMatrixInverse),this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,rotationAddtion:S$k}),S$k.heading=0,S$k.pitch=0,S$k.roll=0}},u$o.prototype._handleScale=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$o.SCALE_LINE_X||t===l$o.SCALE_LINE_Y||t===l$o.SCALE_LINE_Z){var i,n;switch(t){case l$o.SCALE_LINE_X:i=o$1p.UNIT_Z,n=o$1p.UNIT_Z;break;case l$o.SCALE_LINE_Y:i=o$1p.UNIT_X,n=o$1p.UNIT_X;break;case l$o.SCALE_LINE_Z:i=o$1p.UNIT_Y,n=o$1p.UNIT_Y}var r=this._scene,o=e.startPosition,a=e.endPosition,s=p$1d.multiplyByPoint(this._modelMatrix,i,q$j),l=p$1d.multiplyByPoint(this._modelMatrix,o$1p.ZERO,J$e);n=p$1d.multiplyByPoint(this._modelMatrix,n,$$i),o$1p.subtract(s,l,s);var u=o$1p.normalize(s,s),c=b$v(r.camera,o,n,u),h=b$v(r.camera,a,n,u),d=p$1d.multiplyByPoint(this._modelMatrixInverse,c,de$7),f=p$1d.multiplyByPoint(this._modelMatrixInverse,h,K$f);switch(t){case l$o.SCALE_LINE_X:I$q.x=f.x-d.x;break;case l$o.SCALE_LINE_Y:I$q.y=f.y-d.y;break;case l$o.SCALE_LINE_Z:I$q.z=f.z-d.z}this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,nonUniformScaleAddition:o$1p.clone(I$q)}),o$1p.clone(o$1p.ZERO,I$q)}},u$o.prototype._handleHover=function(e){this._scene.pickAsync(e.startPosition).then((e=>{if(this._pickObj=e,!e||!e.primitive||e.primitive._typeForModelEditor<1||e.primitive._typeForModelEditor>10)this._hoverChanged.raiseEvent(-1);else{var t=e.primitive._typeForModelEditor;this._hoverChanged.raiseEvent(t)}}))},u$o.prototype._handleUniformScale=function(e){if(this._pickObj.primitive._typeForModelEditor===l$o.UNIFORM_SCALE){this._scene;var t=e.startPosition,i=e.endPosition.x-t.x;this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,uniformScaleAddition:i/50})}},u$o.prototype.activate=function(){this._active||(this._axesCreated||(this._createAxes(),this._axesCreated=!0),this._initEvent(),this._active=!0)},u$o.prototype.deactivate=function(){if(this._active){this._disableEvent(),this._active=!1;for(var e=0,t=this._primitives.length;e<t;e++){this._primitives[e]._visible=!1}this._scene.screenSpaceCameraController.enableInputs=!0,this._isEdit=!1,this._pickObj=void 0}},u$o.prototype._disableEvent=function(){var e=this._handler;e.removeInputAction(G$I.LEFT_UP),e.removeInputAction(G$I.LEFT_DOWN),e.removeInputAction(G$I.MOUSE_MOVE)},u$o.prototype.destroy=function(){this.deactivate();for(var e=0,t=this._primitives.length;e<t;e++){this._primitives[e].destroy()}this._handler.destroy(),i$10(this)},u$o.prototype.isDestroyed=function(){return!1};var d$v=function(e){t$12("PointHandler","PointHandler is deprecated,please use DrawHandler.");var t=new w$m(e,_0x20cc4b.Point,l$p.Space);return t.drawCompletedEvent=t.drawEvt,t},l$n=function(e){t$12("PolygonHandler","PolygonHandler is deprecated,please use DrawHandler.");var t=new w$m(e,_0x20cc4b.Polygon,l$p.Space);return t.drawCompletedEvent=t.drawEvt,t},d$u=function(e){t$12("PolylineHandler","PolylineHandler is deprecated,please use DrawHandler.");var t=new w$m(e,_0x20cc4b.Line,l$p.Space);return t.drawCompletedEvent=t.drawEvt,t};function c$h(e,t){if(LicenseChecker.LICENSECHECKER.verify("DirectionalLight"),t=u$_(t,{}),o$1q.defined("PointLight Position",e),o$1p.equals(e,o$1p.ZERO))throw new t$16("directional light position equals zero");this._id=e$1Q(),this._position=o$1p.clone(e),this._positionCV=new o$1p,this._targetPosition=u$_(t.targetPosition,new o$1p),this._targetPositionCV=new o$1p,this._color=u$_(t.color,new e$1U(1,1,1,1)),this._intensity=u$_(t.intensity,1),this._direction=new o$1p,o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction),this._lightColor=e$1U.multiplyByScalar(this._color,this._intensity,new e$1U),this._directionEC=new o$1p,this._sceneMode=C$13.SCENE3D}function e$k(e){e=u$_(e,{}),this._id=e$1Q(),this._skyColor=u$_(e.skyColor,new e$1U(.7,.7,.7)),this._groundColor=u$_(e.groundColor,new e$1U(.2,.2,.2)),this._groundLightColor=new e$1U,this._skyLightColor=new e$1U,this._intensity=u$_(e.intensity,1),this._sceneMode=C$13.SCENE3D}function c$g(e,t){LicenseChecker.LICENSECHECKER.verify("PointLight"),t=u$_(t,{}),o$1q.defined("PointLight Position",e),this._id=e$1Q(),this._position=o$1p.clone(e),this._positionCV=new o$1p,this._positionEC=new o$1p,this._color=u$_(t.color,new e$1U(1,1,1,1)),this._intensity=u$_(t.intensity,2),this._cutoffDistance=u$_(t.cutoffDistance,10),this._decay=u$_(t.decay,1),this._lightColor=e$1U.multiplyByScalar(this._color,this._intensity,new e$1U),this._visibleInCullingVolume=1,this._sceneMode=C$13.SCENE3D}Object.defineProperties(c$h.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===C$13.SCENE3D?this._position:this._positionCV},set:function(e){o$1q.defined("directional light position",e),!o$1p.equals(e,this._targetPosition)&&(this._position=e,this._sceneMode===C$13.COLUMBUS_VIEW?(this._positionCV=m$17.convertToColumbusCartesian(this._position),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},targetPosition:{get:function(){return this._sceneMode===C$13.SCENE3D?this._targetPosition:this._targetPositionCV},set:function(e){o$1q.defined("directional light target position",e),!o$1p.equals(e,this._position)&&(this._targetPosition=e,this._sceneMode===C$13.COLUMBUS_VIEW?(this._targetPositionCV=m$17.convertToColumbusCartesian(this._targetPosition),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},color:{get:function(){return this._color},set:function(e){o$1q.defined("directional light color",e),this._color=e,e$1U.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){o$1q.typeOf.number("directional light intensity",e),this._intensity=e,e$1U.multiplyByScalar(this._color,this._intensity,this._lightColor)}},direction:{get:function(){return this._direction}},lightColor:{get:function(){return this._lightColor}},directionEC:{get:function(){return this._directionEC},set:function(e){o$1q.defined("directioinal light directionEC",e),this._directionEC=e}},lightType:{get:function(){return _0x1d9df9.DIRECTIONAL}},sceneMode:{get:function(){return this._sceneMode},set:function(e){if(o$1q.typeOf.number("spot light sceneMode",e),this._sceneMode!==e){if(this._sceneMode=e,this._sceneMode===C$13.COLUMBUS_VIEW){if(this._positionCV=m$17.convertToColumbusCartesian(this._position),this._targetPositionCV=m$17.convertToColumbusCartesian(this._targetPosition),o$1p.equals(this._positionCV,this._targetPositionCV))return;o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)}else o$1p.subtract(this._position,this._targetPosition,this._direction);o$1p.normalize(this._direction,this._direction)}}}}),Object.defineProperties(e$k.prototype,{id:{get:function(){return this._id}},lightType:{get:function(){return _0x1d9df9.HEMISPHERE}},skyColor:{get:function(){return e$1U.multiplyByScalar(this._skyColor,this._intensity,this._skyLightColor)},set:function(e){o$1q.defined("skyColor color",e),e$1U.clone(e,this._skyColor)}},groundColor:{get:function(){return e$1U.multiplyByScalar(this._groundColor,this._intensity,this._groundLightColor)},set:function(e){o$1q.defined("groundColor color",e),e$1U.clone(e,this._groundColor)}}}),Object.defineProperties(c$g.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===C$13.SCENE3D?this._position:this._positionCV},set:function(e){o$1q.defined("point light position",e),this._position=e,this._sceneMode===C$13.COLUMBUS_VIEW&&(this._positionCV=m$17.convertToColumbusCartesian(this._position))}},color:{get:function(){return this._color},set:function(e){o$1q.defined("point color color",e),this._color=e,e$1U.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){o$1q.typeOf.number("point light intensity",e),this._intensity=e,e$1U.multiplyByScalar(this._color,this._intensity,this._lightColor)}},cutoffDistance:{get:function(){return this._cutoffDistance},set:function(e){o$1q.typeOf.number("point light cutoffDistance",e),this._cutoffDistance=e}},decay:{get:function(){return this._decay},set:function(e){o$1q.typeOf.number("point light decay",e),this._decay=e}},lightColor:{get:function(){return this._lightColor}},positionEC:{get:function(){return this._positionEC},set:function(e){o$1q.defined("point light positionEC",e),this._positionEC=e}},lightType:{get:function(){return _0x1d9df9.POINT}},visibleInCullingVolume:{get:function(){return this._visibleInCullingVolume}},sceneMode:{get:function(){return this._sceneMode},set:function(e){o$1q.typeOf.number("point light sceneMode",e),this._sceneMode!==e&&(this._sceneMode=e,this._sceneMode===C$13.COLUMBUS_VIEW&&(this._positionCV=m$17.convertToColumbusCartesian(this._position)))}}});var h$o=new i$1c;function _$k(e,t,i){if(LicenseChecker.LICENSECHECKER.verify("SpotLight"),i=u$_(i,{}),o$1q.defined("SpotLight Position",e),o$1q.defined("SpotLight target position",t),o$1p.equals(e,t))throw new t$16("position equals targetPosition");this._id=e$1Q(),this._position=o$1p.clone(e),this._positionCV=new o$1p,this._targetPosition=o$1p.clone(t),this._targetPositionCV=new o$1p,this._color=u$_(i.color,new e$1U(1,1,1,1)),this._intensity=u$_(i.intensity,2),this._distance=u$_(i.distance,100),this._angle=u$_(i.angle,Math.PI/6),this._penumbra=u$_(i.penumbra,0),this._exponent=u$_(i.exponent,10),this._decay=u$_(i.decay,1),this._direction=new o$1p,this._directionEC=new o$1p,o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction),this._lightColor=e$1U.multiplyByScalar(this._color,this._intensity,new e$1U),this._angleCos=Math.cos(this._angle),this._penumbraCos=Math.cos(this._angle*(1-this._penumbra)),this._positionEC=new o$1p,this._visibleInCullingVolume=1,this._sceneMode=C$13.SCENE3D}c$g.prototype.computeVisiblityInCullingVolume=function(e){return h$o.radius=this._cutoffDistance,h$o.center=this.position,this._visibleInCullingVolume=e.computeVisibility(h$o)!==Ae$u.OUTSIDE?1:0,!!this._visibleInCullingVolume},Object.defineProperties(_$k.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===C$13.SCENE3D?this._position:this._positionCV},set:function(e){o$1q.defined("spot light position",e),!o$1p.equals(e,this._targetPosition)&&(this._position=e,this._sceneMode===C$13.COLUMBUS_VIEW?(this._positionCV=m$17.convertToColumbusCartesian(this._position),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},targetPosition:{get:function(){return this._sceneMode===C$13.SCENE3D?this._targetPosition:this._targetPositionCV},set:function(e){o$1q.defined("spot light target position",e),!o$1p.equals(e,this._position)&&(this._targetPosition=e,this._sceneMode===C$13.COLUMBUS_VIEW?(this._targetPositionCV=m$17.convertToColumbusCartesian(this._targetPosition),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},color:{get:function(){return this._color},set:function(e){o$1q.defined("spot color color",e),this._color=e,e$1U.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){o$1q.typeOf.number("spot light intensity",e),this._intensity=e,e$1U.multiplyByScalar(this._color,this._intensity,this._lightColor)}},distance:{get:function(){return this._distance},set:function(e){o$1q.typeOf.number("spot light istance",e),this._distance=e}},angle:{get:function(){return this._angle},set:function(e){o$1q.typeOf.number("spot light angle",e),this._angle=e,this._angleCos=Math.cos(this._angle)}},exponent:{get:function(){return this._exponent},set:function(e){o$1q.typeOf.number("spot light exponent",e),this._exponent=e}},decay:{get:function(){return this._decay},set:function(e){o$1q.typeOf.number("spot light decay",e),this._decay=e}},direction:{get:function(){return this._direction}},lightColor:{get:function(){return this._lightColor}},angleCos:{get:function(){return this._angleCos}},penumbra:{get:function(){return this._penumbra},set:function(e){o$1q.typeOf.number("spot light angle",e),this._penumbra=e,this._penumbraCos=Math.cos(this._angle*(1-this._penumbra))}},penumbraCos:{get:function(){return this._penumbraCos}},positionEC:{get:function(){return this._positionEC},set:function(e){o$1q.defined("spot light positionEC",e),this._positionEC=e}},directionEC:{get:function(){return this._directionEC}},lightType:{get:function(){return _0x1d9df9.SPOT}},visibleInCullingVolume:{get:function(){return this._visibleInCullingVolume}},sceneMode:{get:function(){return this._sceneMode},set:function(e){if(o$1q.typeOf.number("spot light sceneMode",e),this._sceneMode!==e){if(this._sceneMode=e,this._sceneMode===C$13.COLUMBUS_VIEW){if(this._positionCV=m$17.convertToColumbusCartesian(this._position),this._targetPositionCV=m$17.convertToColumbusCartesian(this._targetPosition),o$1p.equals(this._positionCV,this._targetPositionCV))return;o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)}else o$1p.subtract(this._position,this._targetPosition,this._direction);o$1p.normalize(this._direction,this._direction)}}}});var u$n=new i$1c;_$k.prototype.computeVisiblityInCullingVolume=function(e){return u$n.radius=this._distance,u$n.center=this.position,this._visibleInCullingVolume=e.computeVisibility(u$n)!==Ae$u.OUTSIDE?1:0,!!this._visibleInCullingVolume};var _0xe4a84=(_0x185bb3=!0,function(e,t){var i=_0x185bb3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x185bb3=!1,i}),_0x180a77=_0xe4a84(void 0,(function(){return _0x180a77.toString().search("(((.+)+)+)+$").toString().constructor(_0x180a77).search("(((.+)+)+)+$")})),_0x185bb3;function _0xdbdb64(e,t){return this.position=new o$1p,this.rotation=new o$1p,this.scale=new o$1p,this.isVisible=!0,this._worldMatrix=new p$1d,this._rotationQuaternion=new n$13,p$1d.clone(p$1d.IDENTITY,this._worldMatrix),this}function _0x31fbd2(e,t,i,n){var r=.5*i,o=.5*t,a=.5*e,s=Math.sin(r),l=Math.cos(r),u=Math.sin(o),c=Math.cos(o),h=Math.sin(a),d=Math.cos(a);return n.x=d*u*l+h*c*s,n.y=h*c*l-d*u*s,n.z=d*c*s-h*u*l,n.w=d*c*l+h*u*s,n}_0x180a77(),_0xdbdb64.prototype.setDirection=function(e,t,i,n){t=u$_(t,0),i=u$_(i,0),n=u$_(n,0);var r=-Math.atan2(e.z,e.x)+Math.PI/2,o=Math.sqrt(e.x*e.x+e.z*e.z),a=-Math.atan2(e.y,o);return this.rotation.x=a+i,this.rotation.y=r+t,this.rotation.z=n,this},_0xdbdb64.prototype.computeWorldMatrix=function(){_0x31fbd2(this.rotation.y,this.rotation.x,this.rotation.z,this._rotationQuaternion),p$1d.fromTranslationQuaternionRotationScale(this.position,this._rotationQuaternion,this.scale,this._worldMatrix)},_0xdbdb64.prototype.getWorldMatrix=function(){return this.computeWorldMatrix(),this._worldMatrix};var _0x523da7=(_0x3a0c1e=!0,function(e,t){var i=_0x3a0c1e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a0c1e=!1,i}),_0x3ff620=_0x523da7(void 0,(function(){return _0x3ff620.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ff620).search("(((.+)+)+)+$")})),_0x3a0c1e;function _0x142894(e,t,i,n,r,o){this.name=e,this.targetProperty=t,this.framePerSecond=i,this.dataType=n,this.loopMode=r,this.enableBlending=o,this._runtimeAnimations=new Array,this._events=new Array,this.blendingSpeed=.01,this._ranges={},this.targetPropertyPath=t.split("."),this.dataType=n,this.loopMode=void 0===r?_0x142894.ANIMATIONLOOPMODE_CYCLE:r}_0x3ff620(),_0x142894._PrepareAnimation=function(e,t,i,n,r,o,a,s){var l=void 0;if(!isNaN(parseFloat(r))&&isFinite(r)?l=_0x142894.ANIMATIONTYPE_FLOAT:r instanceof _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion?l=_0x142894.ANIMATIONTYPE_QUATERNION:r instanceof _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3?l=_0x142894.ANIMATIONTYPE_VECTOR3:r instanceof _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector2?l=_0x142894.ANIMATIONTYPE_VECTOR2:r instanceof _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color3?l=_0x142894.ANIMATIONTYPE_COLOR3:r instanceof _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color4?l=_0x142894.ANIMATIONTYPE_COLOR4:r instanceof _Maths_math_size__WEBPACK_IMPORTED_MODULE_8__.Size&&(l=_0x142894.ANIMATIONTYPE_SIZE),null==l)return null;var u=new _0x142894(e,t,i,l,a),c=[{frame:0,value:r},{frame:n,value:o}];return u.setKeys(c),void 0!==s&&u.setEasingFunction(s),u},_0x142894.CreateAnimation=function(e,t,i,n){var r=new _0x142894(e+"Animation",e,i,t,_0x142894.ANIMATIONLOOPMODE_CONSTANT);return r.setEasingFunction(n),r},_0x142894.CreateAndStartAnimation=function(e,t,i,n,r,o,a,s,l,u){var c=_0x142894._PrepareAnimation(e,i,n,r,o,a,s,l);return c?t.getScene().beginDirectAnimation(t,[c],0,r,1===c.loopMode,1,u):null},_0x142894.CreateAndStartHierarchyAnimation=function(e,t,i,n,r,o,a,s,l,u,c){var h=_0x142894._PrepareAnimation(e,n,r,o,a,s,l,u);return h?t.getScene().beginDirectHierarchyAnimation(t,i,[h],0,o,1===h.loopMode,1,c):null},_0x142894.CreateMergeAndStartAnimation=function(e,t,i,n,r,o,a,s,l,u){var c=_0x142894._PrepareAnimation(e,i,n,r,o,a,s,l);return c?(t.animations.push(c),t.getScene().beginAnimation(t,0,r,1===c.loopMode,1,u)):null},_0x142894.MakeAnimationAdditive=function(e,t,i,n,r){void 0===t&&(t=0),void 0===n&&(n=!1);var o=e;if(n&&((o=e.clone()).name=r||o.name),!o._keys.length)return o;t=t>=0?t:0;var a=0,s=o._keys[0],l=o._keys.length-1,u=o._keys[l],c={referenceValue:s.value,referencePosition:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[0],referenceQuaternion:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Quaternion[0],referenceScaling:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[1],keyPosition:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[2],keyQuaternion:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Quaternion[1],keyScaling:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[3]},h=!1,d=s.frame,f=u.frame;if(i){var p=o.getRange(i);p&&(d=p.from,f=p.to)}var _=s.frame===d,m=u.frame===f;if(1===o._keys.length){var g=o._getKeyValue(o._keys[0]);c.referenceValue=g.clone?g.clone():g,h=!0}else if(t<=s.frame){g=o._getKeyValue(s.value);c.referenceValue=g.clone?g.clone():g,h=!0}else if(t>=u.frame){g=o._getKeyValue(u.value);c.referenceValue=g.clone?g.clone():g,h=!0}for(var x=0;!h||!_||!m&&x<o._keys.length-1;){var v=o._keys[x],y=o._keys[x+1];if(!h&&t>=v.frame&&t<=y.frame){g=void 0;if(t===v.frame)g=o._getKeyValue(v.value);else if(t===y.frame)g=o._getKeyValue(y.value);else{var $={key:x,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};g=o._interpolate(t,$)}c.referenceValue=g.clone?g.clone():g,h=!0}if(!_&&d>=v.frame&&d<=y.frame){if(d===v.frame)a=x;else if(d===y.frame)a=x+1;else{$={key:x,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};var b={frame:d,value:(g=o._interpolate(d,$)).clone?g.clone():g};o._keys.splice(x+1,0,b),a=x+1}_=!0}if(!m&&f>=v.frame&&f<=y.frame){if(f===v.frame)l=x;else if(f===y.frame)l=x+1;else{$={key:x,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT},b={frame:f,value:(g=o._interpolate(f,$)).clone?g.clone():g};o._keys.splice(x+1,0,b),l=x+1}m=!0}x++}o.dataType===_0x142894.ANIMATIONTYPE_QUATERNION?c.referenceValue.normalize().conjugateInPlace():o.dataType===_0x142894.ANIMATIONTYPE_MATRIX&&(c.referenceValue.decompose(c.referenceScaling,c.referenceQuaternion,c.referencePosition),c.referenceQuaternion.normalize().conjugateInPlace());for(x=a;x<=l;x++){b=o._keys[x];if(!x||o.dataType===_0x142894.ANIMATIONTYPE_FLOAT||b.value!==s.value)switch(o.dataType){case _0x142894.ANIMATIONTYPE_MATRIX:b.value.decompose(c.keyScaling,c.keyQuaternion,c.keyPosition),c.keyPosition.subtractInPlace(c.referencePosition),c.keyScaling.divideInPlace(c.referenceScaling),c.referenceQuaternion.multiplyToRef(c.keyQuaternion,c.keyQuaternion),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.ComposeToRef(c.keyScaling,c.keyQuaternion,c.keyPosition,b.value);break;case _0x142894.ANIMATIONTYPE_QUATERNION:c.referenceValue.multiplyToRef(b.value,b.value);break;case _0x142894.ANIMATIONTYPE_VECTOR2:case _0x142894.ANIMATIONTYPE_VECTOR3:case _0x142894.ANIMATIONTYPE_COLOR3:case _0x142894.ANIMATIONTYPE_COLOR4:b.value.subtractToRef(c.referenceValue,b.value);break;case _0x142894.ANIMATIONTYPE_SIZE:b.value.width-=c.referenceValue.width,b.value.height-=c.referenceValue.height;break;default:b.value-=c.referenceValue}}return o},_0x142894.TransitionTo=function(e,t,i,n,r,o,a,s){if(void 0===s&&(s=null),a<=0)return i[e]=t,s&&s(),null;var l=r*(a/1e3);o.setKeys([{frame:0,value:i[e].clone?i[e].clone():i[e]},{frame:l,value:t}]),i.animations||(i.animations=[]),i.animations.push(o);var u=n.beginAnimation(i,0,l,!1);return u.onAnimationEnd=s,u},Object.defineProperty(_0x142894.prototype,"runtimeAnimations",{get:function(){return this._runtimeAnimations},enumerable:!1,configurable:!0}),Object.defineProperty(_0x142894.prototype,"hasRunningRuntimeAnimations",{get:function(){for(var e=0,t=this._runtimeAnimations;e<t.length;e++){if(!t[e].isStopped)return!0}return!1},enumerable:!1,configurable:!0}),_0x142894.prototype.toString=function(e){var t="Name: "+this.name+", property: "+this.targetProperty;if(t+=", datatype: "+["Float","Vector3","Quaternion","Matrix","Color3","Vector2"][this.dataType],t+=", nKeys: "+(this._keys?this._keys.length:"none"),t+=", nRanges: "+(this._ranges?Object.keys(this._ranges).length:"none"),e){t+=", Ranges: {";var i=!0;for(var n in this._ranges)i&&(t+=", ",i=!1),t+=n;t+="}"}return t},_0x142894.prototype.addEvent=function(e){this._events.push(e),this._events.sort((function(e,t){return e.frame-t.frame}))},_0x142894.prototype.removeEvents=function(e){for(var t=0;t<this._events.length;t++)this._events[t].frame===e&&(this._events.splice(t,1),t--)},_0x142894.prototype.getEvents=function(){return this._events},_0x142894.prototype.createRange=function(e,t,i){this._ranges[e]||(this._ranges[e]=new _animationRange__WEBPACK_IMPORTED_MODULE_6__.AnimationRange(e,t,i))},_0x142894.prototype.deleteRange=function(e,t){void 0===t&&(t=!0);var i=this._ranges[e];if(i){if(t)for(var n=i.from,r=i.to,o=this._keys.length-1;o>=0;o--)this._keys[o].frame>=n&&this._keys[o].frame<=r&&this._keys.splice(o,1);this._ranges[e]=null}},_0x142894.prototype.getRange=function(e){return this._ranges[e]},_0x142894.prototype.getKeys=function(){return this._keys},_0x142894.prototype.getHighestFrame=function(){for(var e=0,t=0,i=this._keys.length;t<i;t++)e<this._keys[t].frame&&(e=this._keys[t].frame);return e},_0x142894.prototype.getEasingFunction=function(){return this._easingFunction},_0x142894.prototype.setEasingFunction=function(e){this._easingFunction=e},_0x142894.prototype.floatInterpolateFunction=function(e,t,i){return _Maths_math_scalar__WEBPACK_IMPORTED_MODULE_2__.Scalar.Lerp(e,t,i)},_0x142894.prototype.floatInterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_scalar__WEBPACK_IMPORTED_MODULE_2__.Scalar.Hermite(e,t,i,n,r)},_0x142894.prototype.quaternionInterpolateFunction=function(e,t,i){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Slerp(e,t,i)},_0x142894.prototype.quaternionInterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Hermite(e,t,i,n,r).normalize()},_0x142894.prototype.vector3InterpolateFunction=function(e,t,i){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Lerp(e,t,i)},_0x142894.prototype.vector3InterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Hermite(e,t,i,n,r)},_0x142894.prototype.vector2InterpolateFunction=function(e,t,i){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector2.Lerp(e,t,i)},_0x142894.prototype.vector2InterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector2.Hermite(e,t,i,n,r)},_0x142894.prototype.sizeInterpolateFunction=function(e,t,i){return _Maths_math_size__WEBPACK_IMPORTED_MODULE_8__.Size.Lerp(e,t,i)},_0x142894.prototype.color3InterpolateFunction=function(e,t,i){return _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color3.Lerp(e,t,i)},_0x142894.prototype.color4InterpolateFunction=function(e,t,i){return _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color4.Lerp(e,t,i)},_0x142894.prototype._getKeyValue=function(e){return"function"==typeof e?e():e},_0x142894.prototype._interpolate=function(e,t){if(t.loopMode===_0x142894.ANIMATIONLOOPMODE_CONSTANT&&t.repeatCount>0)return t.highLimitValue.clone?t.highLimitValue.clone():t.highLimitValue;var i=this._keys;if(1===i.length)return this._getKeyValue(i[0].value);var n=t.key;if(i[n].frame>=e)for(;n-1>=0&&i[n].frame>=e;)n--;for(var r=n;r<i.length;r++){var o=i[r+1];if(o.frame>=e){t.key=r;var a=i[r],s=this._getKeyValue(a.value);if(a.interpolation===_animationKey__WEBPACK_IMPORTED_MODULE_5__.AnimationKeyInterpolation.STEP)return s;var l=this._getKeyValue(o.value),u=void 0!==a.outTangent&&void 0!==o.inTangent,c=o.frame-a.frame,h=(e-a.frame)/c,d=this.getEasingFunction();switch(null!=d&&(h=d.ease(h)),this.dataType){case _0x142894.ANIMATIONTYPE_FLOAT:var f=u?this.floatInterpolateFunctionWithTangents(s,a.outTangent*c,l,o.inTangent*c,h):this.floatInterpolateFunction(s,l,h);switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return f;case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return t.offsetValue*t.repeatCount+f}break;case _0x142894.ANIMATIONTYPE_QUATERNION:var p=u?this.quaternionInterpolateFunctionWithTangents(s,a.outTangent.scale(c),l,o.inTangent.scale(c),h):this.quaternionInterpolateFunction(s,l,h);switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return p;case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return p.addInPlace(t.offsetValue.scale(t.repeatCount))}return p;case _0x142894.ANIMATIONTYPE_VECTOR3:var _=u?this.vector3InterpolateFunctionWithTangents(s,a.outTangent.scale(c),l,o.inTangent.scale(c),h):this.vector3InterpolateFunction(s,l,h);switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return _;case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return _.add(t.offsetValue.scale(t.repeatCount))}case _0x142894.ANIMATIONTYPE_VECTOR2:var m=u?this.vector2InterpolateFunctionWithTangents(s,a.outTangent.scale(c),l,o.inTangent.scale(c),h):this.vector2InterpolateFunction(s,l,h);switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return m;case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return m.add(t.offsetValue.scale(t.repeatCount))}case _0x142894.ANIMATIONTYPE_SIZE:switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return this.sizeInterpolateFunction(s,l,h);case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return this.sizeInterpolateFunction(s,l,h).add(t.offsetValue.scale(t.repeatCount))}case _0x142894.ANIMATIONTYPE_COLOR3:switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return this.color3InterpolateFunction(s,l,h);case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return this.color3InterpolateFunction(s,l,h).add(t.offsetValue.scale(t.repeatCount))}case _0x142894.ANIMATIONTYPE_COLOR4:switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:return this.color4InterpolateFunction(s,l,h);case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return this.color4InterpolateFunction(s,l,h).add(t.offsetValue.scale(t.repeatCount))}case _0x142894.ANIMATIONTYPE_MATRIX:switch(t.loopMode){case _0x142894.ANIMATIONLOOPMODE_CYCLE:case _0x142894.ANIMATIONLOOPMODE_CONSTANT:if(_0x142894.AllowMatricesInterpolation)return this.matrixInterpolateFunction(s,l,h,t.workValue);case _0x142894.ANIMATIONLOOPMODE_RELATIVE:return s}}break}}return this._getKeyValue(i[i.length-1].value)},_0x142894.prototype.matrixInterpolateFunction=function(e,t,i,n){return _0x142894.AllowMatrixDecomposeForInterpolation?n?(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.DecomposeLerpToRef(e,t,i,n),n):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.DecomposeLerp(e,t,i):n?(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.LerpToRef(e,t,i,n),n):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.Lerp(e,t,i)},_0x142894.prototype.clone=function(){var e=new _0x142894(this.name,this.targetPropertyPath.join("."),this.framePerSecond,this.dataType,this.loopMode);if(e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed,this._keys&&e.setKeys(this._keys),this._ranges)for(var t in e._ranges={},this._ranges){var i=this._ranges[t];!i||(e._ranges[t]=i.clone())}return e},_0x142894.prototype.setKeys=function(e){this._keys=e.slice(0)},_0x142894.prototype.serialize=function(){var e={};e.name=this.name,e.property=this.targetProperty,e.framePerSecond=this.framePerSecond,e.dataType=this.dataType,e.loopBehavior=this.loopMode,e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed;var t=this.dataType;e.keys=[];for(var i=this.getKeys(),n=0;n<i.length;n++){var r=i[n],o={};switch(o.frame=r.frame,t){case _0x142894.ANIMATIONTYPE_FLOAT:o.values=[r.value],void 0!==r.inTangent&&o.values.push(r.inTangent),void 0!==r.outTangent&&(void 0===r.inTangent&&o.values.push(void 0),o.values.push(r.outTangent));break;case _0x142894.ANIMATIONTYPE_QUATERNION:case _0x142894.ANIMATIONTYPE_MATRIX:case _0x142894.ANIMATIONTYPE_VECTOR3:case _0x142894.ANIMATIONTYPE_COLOR3:case _0x142894.ANIMATIONTYPE_COLOR4:o.values=r.value.asArray(),null!=r.inTangent&&o.values.push(r.inTangent.asArray()),null!=r.outTangent&&(void 0===r.inTangent&&o.values.push(void 0),o.values.push(r.outTangent.asArray()))}e.keys.push(o)}for(var a in e.ranges=[],this._ranges){var s=this._ranges[a];if(s){var l={};l.name=a,l.from=s.from,l.to=s.to,e.ranges.push(l)}}return e},_0x142894._UniversalLerp=function(e,t,i){var n=e.constructor;return n.Lerp?n.Lerp(e,t,i):n.Slerp?n.Slerp(e,t,i):e.toFixed?e*(1-i)+i*t:t},_0x142894.Parse=function(e){var t,i,n=new _0x142894(e.name,e.property,e.framePerSecond,e.dataType,e.loopBehavior),r=e.dataType,o=[];for(e.enableBlending&&(n.enableBlending=e.enableBlending),e.blendingSpeed&&(n.blendingSpeed=e.blendingSpeed),i=0;i<e.keys.length;i++){var a,s,l=e.keys[i];switch(r){case _0x142894.ANIMATIONTYPE_FLOAT:t=l.values[0],l.values.length>=1&&(a=l.values[1]),l.values.length>=2&&(s=l.values[2]);break;case _0x142894.ANIMATIONTYPE_QUATERNION:if(t=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(l.values),l.values.length>=8){var u=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(l.values.slice(4,8));u.equals(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Zero())||(a=u)}if(l.values.length>=12){var c=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(l.values.slice(8,12));c.equals(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Zero())||(s=c)}break;case _0x142894.ANIMATIONTYPE_MATRIX:t=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.FromArray(l.values);break;case _0x142894.ANIMATIONTYPE_COLOR3:t=_Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color3.FromArray(l.values);break;case _0x142894.ANIMATIONTYPE_COLOR4:t=_Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color4.FromArray(l.values);break;case _0x142894.ANIMATIONTYPE_VECTOR3:default:t=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.FromArray(l.values)}var h={};h.frame=l.frame,h.value=t,null!=a&&(h.inTangent=a),null!=s&&(h.outTangent=s),o.push(h)}if(n.setKeys(o),e.ranges)for(i=0;i<e.ranges.length;i++)t=e.ranges[i],n.createRange(t.name,t.from,t.to);return n},_0x142894.AppendSerializedAnimations=function(e,t){_Misc_decorators__WEBPACK_IMPORTED_MODULE_3__.SerializationHelper.AppendSerializedAnimations(e,t)},_0x142894.ParseFromFileAsync=function(e,t){var i=this;return new Promise((function(n,r){var o=new _Misc_webRequest__WEBPACK_IMPORTED_MODULE_9__.WebRequest;o.addEventListener("readystatechange",(function(){if(4==o.readyState)if(200==o.status){var t=JSON.parse(o.responseText);if(t.length){for(var a=new Array,s=0,l=t;s<l.length;s++){var u=l[s];a.push(i.Parse(u))}n(a)}else{a=i.Parse(t);e&&(a.name=e),n(a)}}else r("Unable to load the animation")})),o.open("GET",t),o.send()}))},_0x142894.CreateFromSnippetAsync=function(e){var t=this;return new Promise((function(i,n){var r=new _Misc_webRequest__WEBPACK_IMPORTED_MODULE_9__.WebRequest;r.addEventListener("readystatechange",(function(){if(4==r.readyState)if(200==r.status){var o=JSON.parse(JSON.parse(r.responseText).jsonPayload);if(o.animations){for(var a=JSON.parse(o.animations),s=new Array,l=0,u=a;l<u.length;l++){var c=u[l];s.push(t.Parse(c))}i(s)}else{a=JSON.parse(o.animation);(s=t.Parse(a)).snippetId=e,i(s)}}else n("Unable to load the snippet "+e)})),r.open("GET",t.SnippetUrl+"/"+e.replace(/#/g,"/")),r.send()}))},_0x142894.AllowMatricesInterpolation=!1,_0x142894.AllowMatrixDecomposeForInterpolation=!0,_0x142894.SnippetUrl="",_0x142894.ANIMATIONTYPE_FLOAT=0,_0x142894.ANIMATIONTYPE_VECTOR3=1,_0x142894.ANIMATIONTYPE_QUATERNION=2,_0x142894.ANIMATIONTYPE_MATRIX=3,_0x142894.ANIMATIONTYPE_COLOR3=4,_0x142894.ANIMATIONTYPE_COLOR4=7,_0x142894.ANIMATIONTYPE_VECTOR2=5,_0x142894.ANIMATIONTYPE_SIZE=6,_0x142894.ANIMATIONLOOPMODE_RELATIVE=0,_0x142894.ANIMATIONLOOPMODE_CYCLE=1,_0x142894.ANIMATIONLOOPMODE_CONSTANT=2;var _0x39392f=(_0x267fbd=!0,function(e,t){var i=_0x267fbd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x267fbd=!1,i}),_0x2f757e=_0x39392f(void 0,(function(){return _0x2f757e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f757e).search("(((.+)+)+)+$")})),_0x267fbd;function _0x2c1e2b(){}_0x2f757e(),_0x2c1e2b.WithinEpsilon=function(e,t,i){void 0===i&&(i=1401298e-51);var n=e-t;return-i<=n&&n<=i},_0x2c1e2b.ToHex=function(e){var t=e.toString(16);return e<=15?("0"+t).toUpperCase():t.toUpperCase()},_0x2c1e2b.Sign=function(e){return 0===(e=+e)||isNaN(e)?e:e>0?1:-1},_0x2c1e2b.Clamp=function(e,t,i){return void 0===t&&(t=0),void 0===i&&(i=1),Math.min(i,Math.max(t,e))},_0x2c1e2b.Log2=function(e){return Math.log(e)*Math.LOG2E},_0x2c1e2b.Repeat=function(e,t){return e-Math.floor(e/t)*t},_0x2c1e2b.Normalize=function(e,t,i){return(e-t)/(i-t)},_0x2c1e2b.Denormalize=function(e,t,i){return e*(i-t)+t},_0x2c1e2b.DeltaAngle=function(e,t){var i=_0x2c1e2b.Repeat(t-e,360);return i>180&&(i-=360),i},_0x2c1e2b.PingPong=function(e,t){var i=_0x2c1e2b.Repeat(e,2*t);return t-Math.abs(i-t)},_0x2c1e2b.SmoothStep=function(e,t,i){var n=_0x2c1e2b.Clamp(i);return t*(n=-2*n*n*n+3*n*n)+e*(1-n)},_0x2c1e2b.MoveTowards=function(e,t,i){return Math.abs(t-e)<=i?t:e+_0x2c1e2b.Sign(t-e)*i},_0x2c1e2b.MoveTowardsAngle=function(e,t,i){var n=_0x2c1e2b.DeltaAngle(e,t),r=0;return-i<n&&n<i?r=t:(t=e+n,r=_0x2c1e2b.MoveTowards(e,t,i)),r},_0x2c1e2b.Lerp=function(e,t,i){return e+(t-e)*i},_0x2c1e2b.LerpAngle=function(e,t,i){var n=_0x2c1e2b.Repeat(t-e,360);return n>180&&(n-=360),e+n*_0x2c1e2b.Clamp(i)},_0x2c1e2b.InverseLerp=function(e,t,i){return e!=t?_0x2c1e2b.Clamp((i-e)/(t-e)):0},_0x2c1e2b.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o;return e*(2*a-3*o+1)+i*(-2*a+3*o)+t*(a-2*o+r)+n*(a-o)},_0x2c1e2b.RandomRange=function(e,t){return e===t?e:Math.random()*(t-e)+e},_0x2c1e2b.RangeToPercent=function(e,t,i){return(e-t)/(i-t)},_0x2c1e2b.PercentToRange=function(e,t,i){return(i-t)*e+t},_0x2c1e2b.NormalizeRadians=function(e){return e-=_0x2c1e2b.TwoPi*Math.floor((e+Math.PI)/_0x2c1e2b.TwoPi)},_0x2c1e2b.TwoPi=2*Math.PI;var _0x475e35=(_0x209660=!0,function(e,t){var i=_0x209660?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x209660=!1,i}),_0x58a92c=_0x475e35(void 0,(function(){return _0x58a92c.toString().search("(((.+)+)+)+$").toString().constructor(_0x58a92c).search("(((.+)+)+)+$")})),_0x209660;function _0x19aa0e(e,t,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=i}_0x58a92c();var _0x211ea0=new o$1p;_0x19aa0e.prototype.startDirectionFunction=function(e,t,i,n){_0x211ea0=p$1d.getTranslation(e,_0x211ea0);var r=new o$1p;o$1p.subtract(i.position,_0x211ea0,r),o$1p.normalize(r,r);var o=_0x2c1e2b.RandomRange(0,this.directionRandomizer),a=_0x2c1e2b.RandomRange(0,this.directionRandomizer),s=_0x2c1e2b.RandomRange(0,this.directionRandomizer);r.x+=o,r.y+=a,r.z+=s,o$1p.normalize(r,r),n?o$1p.clone(r,t):p$1d.multiplyByDirection(e,r,t)},_0x19aa0e.prototype.startPositionFunction=function(e,t,i,n){var r=this.radius-_0x2c1e2b.RandomRange(0,this.radius*this.radiusRange),o=_0x2c1e2b.RandomRange(0,1),a=_0x2c1e2b.RandomRange(0,2*Math.PI),s=Math.acos(2*o-1),l=r*Math.cos(a)*Math.sin(s),u=r*Math.cos(s),c=r*Math.sin(a)*Math.sin(s);if(n)return t.x=l,t.y=c,void(t.z=u);_0x211ea0.x=l,_0x211ea0.y=c,_0x211ea0.z=u,p$1d.multiplyByPoint(e,_0x211ea0,t)},_0x19aa0e.prototype.clone=function(){var e=new _0x19aa0e(this.radius,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x19aa0e.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer}},_0x19aa0e.prototype.getEffectDefines=function(e){e.push("SPHEREEMITTER")},_0x19aa0e.prototype.getClassName=function(){return"SphereParticleEmitter"},_0x19aa0e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},_0x19aa0e.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer};var _0x35f9b1=(_0x3faa38=!0,function(e,t){var i=_0x3faa38?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3faa38=!1,i}),_0x1910ca=_0x35f9b1(void 0,(function(){return _0x1910ca.toString().search("(((.+)+)+)+$").toString().constructor(_0x1910ca).search("(((.+)+)+)+$")})),_0x3faa38;function _0x18a488(e,t,i){void 0===e&&(e=1),void 0===t&&(t=new o$1p(0,1,0)),void 0===i&&(i=new o$1p(0,1,0)),this.radius=e,this.height=1,this.radiusRange=1,this.directionRandomizer=0;var n=this;return n.direction1=t,n.direction2=i,n}_0x1910ca();var _0x255d89=new o$1p;_0x18a488.prototype.startDirectionFunction=function(e,t,i){var n=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),r=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),o=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);_0x255d89.x=n,_0x255d89.y=o,_0x255d89.z=r,p$1d.multiplyByDirection(e,_0x255d89,t)},_0x18a488.prototype.startPositionFunction=function(e,t,i){var n=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),r=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),o=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);_0x255d89.x=n,_0x255d89.y=o,_0x255d89.z=r,p$1d.multiplyByPoint(e,_0x255d89,t)},_0x18a488.prototype.clone=function(){var e=new _0x18a488(this.radius,this.direction1,this.direction2);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x18a488.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.radiusRange=function(){return t.radiusRange},e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x18a488.prototype.getEffectDefines=function(e){e.push("SPHEREEMITTER"),e.push("DIRECTEDSPHEREEMITTER")},_0x18a488.prototype.getClassName=function(){return"SphereDirectedParticleEmitter"},_0x18a488.prototype.serialize=function(){var e=_super.prototype.serialize.call(this);return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},_0x18a488.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer,o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2)};var _0x1c742c=(_0x128659=!0,function(e,t){var i=_0x128659?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x128659=!1,i}),_0x1eb322=_0x1c742c(void 0,(function(){return _0x1eb322.toString().search("(((.+)+)+)+$").toString().constructor(_0x1eb322).search("(((.+)+)+)+$")})),_0x128659;function _0xf9ea81(e,t,i){void 0===e&&(e=1),void 0===t&&(t=Math.PI),void 0===i&&(i=0),this.directionRandomizer=i,this.radiusRange=1,this.heightRange=1,this.emitFromSpawnPointOnly=!1,this.angle=t,this.radius=e}_0x1eb322(),Object.defineProperty(_0xf9ea81.prototype,"radius",{get:function(){return this._radius},set:function(e){this._radius=e,this._buildHeight()},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf9ea81.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this._buildHeight()},enumerable:!1,configurable:!0}),_0xf9ea81.prototype._buildHeight=function(){0!==this._angle?this._height=this._radius/Math.tan(this._angle/2):this._height=1};var _0x71fe81=new o$1p;_0xf9ea81.prototype.startDirectionFunction=function(e,t,i,n){n?(o$1p.clone(i._localPositio,_0x71fe81),o$1p.normalize(_0x71fe81,_0x71fe81)):(_0x71fe81=p$1d.getTranslation(e,_0x71fe81),o$1p.subtract(i.position,_0x71fe81,_0x71fe81),0==!o$1p.magnitudeSquared(_0x71fe81)&&o$1p.normalize(_0x71fe81,_0x71fe81));var r=_0x2c1e2b.RandomRange(0,this.directionRandomizer),o=_0x2c1e2b.RandomRange(0,this.directionRandomizer),a=_0x2c1e2b.RandomRange(0,this.directionRandomizer);t.x=_0x71fe81.x+r,t.y=_0x71fe81.y+o,t.z=_0x71fe81.z+a,0==!o$1p.magnitudeSquared(t)&&o$1p.normalize(t,t)},_0xf9ea81.prototype.startPositionFunction=function(e,t,i,n){var r,o=_0x2c1e2b.RandomRange(0,2*Math.PI);this.emitFromSpawnPointOnly?r=1e-4:r=1-(r=_0x2c1e2b.RandomRange(0,this.heightRange))*r;var a=this._radius-_0x2c1e2b.RandomRange(0,this._radius*this.radiusRange),s=(a*=r)*Math.sin(o),l=a*Math.cos(o),u=r*this._height;if(n)return t.x=s,t.y=l,void(t.z=u);_0x71fe81.x=s,_0x71fe81.y=l,_0x71fe81.z=u,p$1d.multiplyByPoint(e,_0x71fe81,t)},_0xf9ea81.prototype.clone=function(){var e=new _0xf9ea81(this._radius,this._angle,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e};var _0x418902=new o$1o,_0x438c21=new o$1o;_0xf9ea81.prototype.applyToShader=function(e){var t=this;e.radius=function(){return _0x418902.x=t._radius,_0x418902.y=t.radiusRange,_0x418902},e.coneAngle=function(){return t._angle},e.height=function(){return _0x438c21.x=t._height,_0x438c21.y=t.heightRange,_0x438c21},e.directionRandomizer=function(){return t.directionRandomizer}},_0xf9ea81.prototype.getEffectDefines=function(e){e.push("CONEEMITTER"),this.emitFromSpawnPointOnly&&e.push("CONEEMITTERSPAWNPOINT")},_0xf9ea81.prototype.getClassName=function(){return"ConeParticleEmitter"},_0xf9ea81.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this._radius,e.angle=this._angle,e.directionRandomizer=this.directionRandomizer,e.radiusRange=this.radiusRange,e.heightRange=this.heightRange,e.emitFromSpawnPointOnly=this.emitFromSpawnPointOnly,e},_0xf9ea81.prototype.parse=function(e){this.radius=e.radius,this.angle=e.angle,this.directionRandomizer=e.directionRandomizer,this.radiusRange=void 0!==e.radiusRange?e.radiusRange:1,this.heightRange=void 0!==e.radiusRange?e.heightRange:1,this.emitFromSpawnPointOnly=void 0!==e.emitFromSpawnPointOnly&&e.emitFromSpawnPointOnly};var _0x141db2=(_0x488be1=!0,function(e,t){var i=_0x488be1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x488be1=!1,i}),_0x477154=_0x141db2(void 0,(function(){return _0x477154.toString().search("(((.+)+)+)+$").toString().constructor(_0x477154).search("(((.+)+)+)+$")})),_0x488be1;function _0x17a06c(e,t,i,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=0),this.radius=e,this.height=t,this.radiusRange=i,this.directionRandomizer=n}_0x477154();var _0x56849e=new o$1p;_0x17a06c.prototype.startDirectionFunction=function(e,t,i,n){_0x56849e=p$1d.getTranslation(e,_0x56849e);var r=new o$1p;o$1p.subtract(i.position,_0x56849e,r),o$1p.normalize(r,r);var o=_0x2c1e2b.RandomRange(-this.directionRandomizer/2,this.directionRandomizer/2),a=Math.atan2(r.x,r.z);a+=_0x2c1e2b.RandomRange(-Math.PI/2,Math.PI/2)*this.directionRandomizer,r.z=o,r.x=Math.sin(a),r.y=Math.cos(a),o$1p.normalize(r,r),n?o$1p.clone(r,t):p$1d.multiplyByDirection(e,r,t)},_0x17a06c.prototype.startPositionFunction=function(e,t,i,n){var r=_0x2c1e2b.RandomRange(-this.height/2,this.height/2),o=_0x2c1e2b.RandomRange(0,2*Math.PI),a=_0x2c1e2b.RandomRange((1-this.radiusRange)*(1-this.radiusRange),1),s=Math.sqrt(a)*this.radius,l=s*Math.cos(o),u=s*Math.sin(o);if(n)return t.x=l,t.y=r,void(t.z=u);_0x56849e.x=l,_0x56849e.y=r,_0x56849e.z=u,p$1d.multiplyByPoint(e,_0x56849e,t)},_0x17a06c.prototype.clone=function(){var e=new _0x17a06c(this.radius,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x17a06c.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.height=function(){return t.height},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer}},_0x17a06c.prototype.getEffectDefines=function(e){e.push("CYLINDEREMITTER")},_0x17a06c.prototype.getClassName=function(){return"CylinderParticleEmitter"},_0x17a06c.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.height=this.height,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},_0x17a06c.prototype.parse=function(e){this.radius=e.radius,this.height=e.height,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer};var _0x5d74dc=(_0x32ce7b=!0,function(e,t){var i=_0x32ce7b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x32ce7b=!1,i}),_0xc67336=_0x5d74dc(void 0,(function(){return _0xc67336.toString().search("(((.+)+)+)+$").toString().constructor(_0xc67336).search("(((.+)+)+)+$")})),_0x32ce7b;function _0x732f89(e,t,i,n,r){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=new o$1p(0,1,0)),void 0===r&&(r=new o$1p(0,1,0)),this.radius=e,this.height=t,this.radiusRange=i,this.directionRandomizer=0;var o=this;return o.direction1=n,o.direction2=r,o}_0xc67336();var _0x1178ce=new o$1p;_0x732f89.prototype.startDirectionFunction=function(e,t,i){var n=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),r=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),o=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);_0x1178ce.x=n,_0x1178ce.y=r,_0x1178ce.z=o,p$1d.multiplyByDirection(e,_0x1178ce,t)},_0x732f89.prototype.startPositionFunction=function(e,t,i){var n=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),r=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),o=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);_0x1178ce.x=n,_0x1178ce.y=o,_0x1178ce.z=r,p$1d.multiplyByPoint(e,_0x1178ce,t)},_0x732f89.prototype.clone=function(){var e=new _0x732f89(this.radius,this.height,this.radiusRange,this.direction1,this.direction2);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x732f89.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.height=function(){return t.height},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer},e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x732f89.prototype.getEffectDefines=function(e){e.push("CYLINDEREMITTER"),e.push("CYLINDEREMITDIRECTEDCYLINDEREMITTERTER")},_0x732f89.prototype.getClassName=function(){return"CylinderDirectedParticleEmitter"},_0x732f89.prototype.serialize=function(){var e=_super.prototype.serialize.call(this);return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},_0x732f89.prototype.parse=function(e){this.radius=e.radius,this.height=e.height,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer,o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2)};var _0x598a05=(_0x3f996f=!0,function(e,t){var i=_0x3f996f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f996f=!1,i}),_0x19ab5a=_0x598a05(void 0,(function(){return _0x19ab5a.toString().search("(((.+)+)+)+$").toString().constructor(_0x19ab5a).search("(((.+)+)+)+$")})),_0x3f996f;function _0x498a84(e,t,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=i}_0x19ab5a();var _0x4bb81d=new o$1p;_0x498a84.prototype.startDirectionFunction=function(e,t,i,n){_0x4bb81d=p$1d.getTranslation(e,_0x4bb81d);var r=new o$1p;o$1p.subtract(i.position,_0x4bb81d,r),o$1p.normalize(r,r);var o=_0x2c1e2b.RandomRange(0,this.directionRandomizer),a=_0x2c1e2b.RandomRange(0,this.directionRandomizer),s=_0x2c1e2b.RandomRange(0,this.directionRandomizer);r.x+=o,r.y+=a,r.z+=s,o$1p.normalize(r,r),n?o$1p.clone(r,t):p$1d.multiplyByDirection(e,r,t)},_0x498a84.prototype.startPositionFunction=function(e,t,i,n){var r=this.radius-_0x2c1e2b.RandomRange(0,this.radius*this.radiusRange),o=_0x2c1e2b.RandomRange(0,1),a=_0x2c1e2b.RandomRange(0,2*Math.PI),s=Math.acos(2*o-1),l=r*Math.cos(a)*Math.sin(s),u=r*Math.cos(s),c=r*Math.sin(a)*Math.sin(s);if(n)return t.x=l,t.y=c,void(t.z=Math.abs(u));_0x4bb81d.x=l,_0x4bb81d.y=c,_0x4bb81d.z=Math.abs(u),p$1d.multiplyByPoint(e,_0x4bb81d,t)},_0x498a84.prototype.clone=function(){var e=new _0x498a84(this.radius,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x498a84.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer}},_0x498a84.prototype.getEffectDefines=function(e){e.push("HEMISPHERICEMITTER")},_0x498a84.prototype.getClassName=function(){return"HemisphericParticleEmitter"},_0x498a84.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},_0x498a84.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer};var _0x2f2345=(_0x2de777=!0,function(e,t){var i=_0x2de777?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2de777=!1,i}),_0x43c2ae=_0x2f2345(void 0,(function(){return _0x43c2ae.toString().search("(((.+)+)+)+$").toString().constructor(_0x43c2ae).search("(((.+)+)+)+$")})),_0x2de777;function _0x21fe0a(){this.direction1=new o$1p(0,1,0),this.direction2=new o$1p(0,1,0)}_0x43c2ae();var _0x2b94ae=new o$1p;_0x21fe0a.prototype.startDirectionFunction=function(e,t,i,n){var r=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),o=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),a=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);if(n)return t.x=r,t.y=a,void(t.z=o);_0x2b94ae.x=r,_0x2b94ae.y=a,_0x2b94ae.z=o,p$1d.multiplyByDirection(e,_0x2b94ae,t)},_0x21fe0a.prototype.startPositionFunction=function(e,t,i,n){if(n)return t.x=0,t.y=0,void(t.z=0);p$1d.multiplyByPoint(e,o$1p.ZERO,t)},_0x21fe0a.prototype.clone=function(){var e=new _0x21fe0a;return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x21fe0a.prototype.applyToShader=function(e){var t=this;e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x21fe0a.prototype.getEffectDefines=function(e){e.push("POINTEMITTER")},_0x21fe0a.prototype.getClassName=function(){return"PointParticleEmitter"},_0x21fe0a.prototype.serialize=function(){var e={};e.type=this.getClassName();var t=[],i=[];return o$1p.pack(this.direction1,t,0),o$1p.pack(this.direction2,i,0),e.direction1=t,e.direction2=i,e},_0x21fe0a.prototype.parse=function(e){o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2)};var _0x508933=(_0x537436=!0,function(e,t){var i=_0x537436?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x537436=!1,i}),_0x16e32e=_0x508933(void 0,(function(){return _0x16e32e.toString().search("(((.+)+)+)+$").toString().constructor(_0x16e32e).search("(((.+)+)+)+$")})),_0x537436;function _0x419949(){this.direction1=new o$1p(0,1,0),this.direction2=new o$1p(0,1,0),this.minEmitBox=new o$1p(-.5,-.5,-.5),this.maxEmitBox=new o$1p(.5,.5,.5)}_0x16e32e();var _0x1f6721=new o$1p;_0x419949.prototype.startDirectionFunction=function(e,t,i,n){var r=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),o=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),a=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);if(n)return t.x=r,t.y=a,void(t.z=o);_0x1f6721.x=r,_0x1f6721.y=a,_0x1f6721.z=o,p$1d.multiplyByDirection(e,_0x1f6721,t)},_0x419949.prototype.startPositionFunction=function(e,t,i,n){var r=_0x2c1e2b.RandomRange(this.minEmitBox.x,this.maxEmitBox.x),o=_0x2c1e2b.RandomRange(this.minEmitBox.y,this.maxEmitBox.y),a=_0x2c1e2b.RandomRange(this.minEmitBox.z,this.maxEmitBox.z);if(n)return t.x=r,t.y=a,void(t.z=o);_0x1f6721.x=r,_0x1f6721.y=a,_0x1f6721.z=o,p$1d.multiplyByPoint(e,_0x1f6721,t)},_0x419949.prototype.clone=function(){var e=new _0x419949;return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x419949.prototype.applyToShader=function(e){var t=this;e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2},e.minEmitBox=function(){return t.minEmitBox},e.maxEmitBox=function(){return t.maxEmitBox}},_0x419949.prototype.getEffectDefines=function(e){e.push("BOXEMITTER")},_0x419949.prototype.getClassName=function(){return"BoxParticleEmitter"},_0x419949.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e.minEmitBox=this.minEmitBox.asArray(),e.maxEmitBox=this.maxEmitBox.asArray(),e},_0x419949.prototype.parse=function(e){o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2),o$1p.unpack(e.minEmitBox,0,this.minEmitBox),o$1p.unpack(e.maxEmitBox,0,this.maxEmitBox)};var _0x2307b7=(_0x54681e=!0,function(e,t){var i=_0x54681e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x54681e=!1,i}),_0x4ba4c3=_0x2307b7(void 0,(function(){return _0x4ba4c3.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ba4c3).search("(((.+)+)+)+$")})),_0x54681e;_0x4ba4c3();var _0x56747d={BILLBOARDMODE_Y:2,BILLBOARDMODE_ALL:7,BILLBOARDMODE_STRETCHED:8},_0x29b01c=Object.freeze(_0x56747d),_0x5f1b1e=(_0x276707=!0,function(e,t){var i=_0x276707?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x276707=!1,i}),_0x104b8b=_0x5f1b1e(void 0,(function(){return _0x104b8b.toString().search("(((.+)+)+)+$").toString().constructor(_0x104b8b).search("(((.+)+)+)+$")})),_0x276707;_0x104b8b();var _0xb610a9={BLENDMODE_ONEONE:0,BLENDMODE_STANDARD:1,BLENDMODE_ADD:2,BLENDMODE_MULTIPLY:3,BLENDMODE_MULTIPLYADD:4},_0x5f5957=Object.freeze(_0xb610a9),_0x429982=(_0x51dfc7=!0,function(e,t){var i=_0x51dfc7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51dfc7=!1,i}),_0xb32716=_0x429982(void 0,(function(){return _0xb32716.toString().search("(((.+)+)+)+$").toString().constructor(_0xb32716).search("(((.+)+)+)+$")})),_0x51dfc7;function _0x36dee7(e){this.animations=[],this.renderingGroupId=0,this.emitter=new o$1p(0,0,0),this.emitRate=10,this.manualEmitCount=-1,this.updateSpeed=.01,this.targetStopDuration=0,this.disposeOnStop=!1,this.minEmitPower=1,this.maxEmitPower=1,this.minLifeTime=1,this.maxLifeTime=1,this.minSize=1,this.maxSize=1,this.minScaleX=1,this.maxScaleX=1,this.minScaleY=1,this.maxScaleY=1,this.minInitialRotation=0,this.maxInitialRotation=0,this.minAngularSpeed=0,this.maxAngularSpeed=0,this.layerMask=268435455,this.customShader=null,this.preventAutoStart=!1,this.noiseStrength=new o$1p(10,10,10),this.onAnimationEnd=null,this.blendMode=_0x36dee7.BLENDMODE_ONEONE,this.forceDepthWrite=!1,this.preWarmCycles=0,this.preWarmStepOffset=1,this.spriteCellChangeSpeed=1,this.startSpriteCellID=0,this.endSpriteCellID=0,this.spriteCellWidth=0,this.spriteCellHeight=0,this.spriteRandomStartCell=!1,this.translationPivot=new o$1o(0,0),this.beginAnimationOnStart=!1,this.beginAnimationFrom=0,this.beginAnimationTo=60,this.beginAnimationLoop=!1,this.worldOffset=new o$1p(0,0,0),this.gravity=new o$1p(0,0,0),this._colorGradients=null,this._sizeGradients=null,this._lifeTimeGradients=null,this._angularSpeedGradients=null,this._velocityGradients=null,this._limitVelocityGradients=null,this._dragGradients=null,this._emitRateGradients=null,this._startSizeGradients=null,this._rampGradients=null,this._colorRemapGradients=null,this._alphaRemapGradients=null,this.startDelay=0,this.limitVelocityDamping=.4,this.color1=new e$1U(1,1,1,1),this.color2=new e$1U(1,1,1,1),this.colorDead=new e$1U(0,0,0,1),this.textureMask=new e$1U(1,1,1,1),this._isSubEmitter=!1,this.billboardMode=_0x29b01c.PARTICLES_BILLBOARDMODE_ALL,this._isBillboardBased=!0,this.id=e,this.name=e}_0xb32716(),Object.defineProperties(_0x36dee7.prototype,{noiseTexture:{get:function(){return this._noiseTexture},set:function(e){this._noiseTexture!==e&&(this._noiseTexture=e,this._reset())}},isAnimationSheetEnabled:{get:function(){return this._isAnimationSheetEnabled},set:function(e){this._isAnimationSheetEnabled!=e&&(this._isAnimationSheetEnabled=e,this._reset())}},direction1:{get:function(){return this.particleEmitterType.direction1?this.particleEmitterType.direction1:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.direction1&&(this.particleEmitterType.direction1=e)}},direction2:{get:function(){return this.particleEmitterType.direction2?this.particleEmitterType.direction2:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.direction2&&(this.particleEmitterType.direction2=e)}},minEmitBox:{get:function(){return this.particleEmitterType.minEmitBox?this.particleEmitterType.minEmitBox:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.minEmitBox&&(this.particleEmitterType.minEmitBox=e)}},maxEmitBox:{get:function(){return this.particleEmitterType.maxEmitBox?this.particleEmitterType.maxEmitBox:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.maxEmitBox&&(this.particleEmitterType.maxEmitBox=e)}},isBillboardBased:{get:function(){return this._isBillboardBased},set:function(e){this._isBillboardBased!==e&&(this._isBillboardBased=e,this._reset())}}}),_0x36dee7.prototype.getScene=function(){return this._scene},_0x36dee7.prototype._hasTargetStopDurationDependantGradient=function(){return this._startSizeGradients&&this._startSizeGradients.length>0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0},_0x36dee7.prototype.getDragGradients=function(){return this._dragGradients},_0x36dee7.prototype.getLimitVelocityGradients=function(){return this._limitVelocityGradients},_0x36dee7.prototype.getColorGradients=function(){return this._colorGradients},_0x36dee7.prototype.getSizeGradients=function(){return this._sizeGradients},_0x36dee7.prototype.getColorRemapGradients=function(){return this._colorRemapGradients},_0x36dee7.prototype.getAlphaRemapGradients=function(){return this._alphaRemapGradients},_0x36dee7.prototype.getLifeTimeGradients=function(){return this._lifeTimeGradients},_0x36dee7.prototype.getAngularSpeedGradients=function(){return this._angularSpeedGradients},_0x36dee7.prototype.getVelocityGradients=function(){return this._velocityGradients},_0x36dee7.prototype.getStartSizeGradients=function(){return this._startSizeGradients},_0x36dee7.prototype.getEmitRateGradients=function(){return this._emitRateGradients},_0x36dee7.prototype._reset=function(){},_0x36dee7.prototype._removeGradientAndTexture=function(e,t,i){if(!t)return this;for(var n=0,r=0,o=t;r<o.length;r++){if(o[r].gradient===e){t.splice(n,1);break}n++}return i&&i.dispose(),this},_0x36dee7.prototype.createPointEmitter=function(e,t){var i=new _0x21fe0a;return i.direction1=e,i.direction2=t,this.particleEmitterType=i,i},_0x36dee7.prototype.createHemisphericEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1);var i=new _0x498a84(e,t);return this.particleEmitterType=i,i},_0x36dee7.prototype.createSphereEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1);var i=new _0x19aa0e(e,t);return this.particleEmitterType=i,i},_0x36dee7.prototype.createDirectedSphereEmitter=function(e,t,i){void 0===e&&(e=1),void 0===t&&(t=new o$1p(0,0,1)),void 0===i&&(i=new o$1p(0,0,1));var n=new _0x18a488(e,t,i);return this.particleEmitterType=n,n},_0x36dee7.prototype.createCylinderEmitter=function(e,t,i,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=0);var r=new _0x17a06c(e,t,i,n);return this.particleEmitterType=r,r},_0x36dee7.prototype.createDirectedCylinderEmitter=function(e,t,i,n,r){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=new o$1p(0,0,1)),void 0===r&&(r=new o$1p(0,0,1));var o=new _0x732f89(e,t,i,n,r);return this.particleEmitterType=o,o},_0x36dee7.prototype.createConeEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=Math.PI/4);var i=new _0xf9ea81(e,t);return this.particleEmitterType=i,i},_0x36dee7.prototype.createBoxEmitter=function(e,t,i,n){var r=new _0x419949;return this.particleEmitterType=r,this.direction1=e,this.direction2=t,this.minEmitBox=i,this.maxEmitBox=n,r},_0x36dee7._setRenderState=function(e,t){var i={};switch(t){case _0x5f5957.BLENDMODE_ADD:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.SOURCE_ALPHA,functionSourceAlpha:l$14.ONE,functionDestinationRgb:l$14.ONE,functionDestinationAlpha:l$14.ONE}});break;case _0x5f5957.BLENDMODE_ONEONE:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.ONE,functionSourceAlpha:l$14.ONE,functionDestinationRgb:l$14.ONE,functionDestinationAlpha:l$14.ONE}});break;case _0x5f5957.BLENDMODE_STANDARD:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.SOURCE_ALPHA,functionSourceAlpha:l$14.ONE,functionDestinationRgb:l$14.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:l$14.ONE_MINUS_SOURCE_ALPHA}});break;case _0x5f5957.BLENDMODE_MULTIPLY:case _0x5f5957.BLENDMODE_MULTIPLYADD:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.DESTINATION_COLOR,functionSourceAlpha:l$14.ZERO,functionDestinationRgb:l$14.ONE,functionDestinationAlpha:l$14.ONE}})}e.renderState=i},_0x36dee7._Parse=function(e,t){var i;e.texture?((i=new Image).src=e.texture.url,i.onload=function(){e$2b(t.particleTexture)||(t.particleTexture=new t$V({context:t._context,source:this,pixelFormat:V$10.RGBA,flipY:!1})),t.particleTexture.name=e.texture.url}):e.textureName&&((i=new Image).src=e.textureName,i.onload=function(){e$2b(t.particleTexture)||(t.particleTexture=new t$V({context:t._context,source:this,pixelFormat:V$10.RGBA,flipY:!1})),t.particleTexture.name=e.textureName});if(e.emitterId||0===e.emitterId||void 0!==e.emitter){if(!e.emitterId){var n=new o$1p;n.x=e.emitter[0],n.y=e.emitter[2],n.z=e.emitter[1],t.emitter=n}}else t.emitter=new o$1p(0,0,0);if(t.isLocal=!1,void 0!==e.renderingGroupId&&(t.renderingGroupId=e.renderingGroupId),void 0!==e.isBillboardBased&&(t.isBillboardBased=e.isBillboardBased),void 0!==e.billboardMode&&(t.billboardMode=e.billboardMode),e.animations){for(var r=0;r<e.animations.length;r++){var o=e.animations[r];t.animations.push(_0x142894.Parse(o))}t.beginAnimationOnStart=e.beginAnimationOnStart,t.beginAnimationFrom=e.beginAnimationFrom,t.beginAnimationTo=e.beginAnimationTo,t.beginAnimationLoop=e.beginAnimationLoop}e.autoAnimate&&scene&&scene.beginAnimation(t,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),t.startDelay=0|e.startDelay,t.minAngularSpeed=e.minAngularSpeed,t.maxAngularSpeed=e.maxAngularSpeed,t.minSize=e.minSize,t.maxSize=e.maxSize,e.minScaleX&&(t.minScaleX=e.minScaleX,t.maxScaleX=e.maxScaleX,t.minScaleY=e.minScaleY,t.maxScaleY=e.maxScaleY),void 0!==e.preWarmCycles&&(t.preWarmCycles=e.preWarmCycles,t.preWarmStepOffset=e.preWarmStepOffset),void 0!==e.minInitialRotation&&(t.minInitialRotation=e.minInitialRotation,t.maxInitialRotation=e.maxInitialRotation),t.minLifeTime=e.minLifeTime,t.maxLifeTime=e.maxLifeTime,t.minEmitPower=e.minEmitPower,t.maxEmitPower=e.maxEmitPower,t.emitRate=e.emitRate;var a=new o$1p;if(a.x=e.gravity[0],a.y=e.gravity[2],a.z=e.gravity[1],t.gravity=a,e.noiseStrength){var s=new o$1p;s.x=e.noiseStrength[0],s.y=e.noiseStrength[2],s.z=e.noiseStrength[1],t.noiseStrength=s}var l,u=new e$1U,c=new e$1U,h=new e$1U;if(e$1U.unpack(e.color1,0,u),e$1U.unpack(e.color2,0,c),e$1U.unpack(e.colorDead,0,h),t.color1=u,t.color2=c,t.colorDead=h,t.updateSpeed=e.updateSpeed,t.targetStopDuration=e.targetStopDuration,t.blendMode=e.blendMode,e.colorGradients)for(var d=0,f=e.colorGradients;d<f.length;d++){var p=f[d],_=new e$1U;e$1U.unpack(p.color1,0,_);var m=void 0;p.color2&&(m=new e$1U,e$1U.unpack(p.color2,0,m)),t.addColorGradient(p.gradient,_,m)}if(e.rampGradients){for(var g=0,x=e.rampGradients;g<x.length;g++){var v=x[g],y=new e$1U;e$1U.unpack(v.color,0,y),t.addRampGradient(v.gradient,y)}t.useRampGradients=e.useRampGradients}if(e.colorRemapGradients)for(var $=0,b=e.colorRemapGradients;$<b.length;$++){var T=b[$];t.addColorRemapGradient(T.gradient,void 0!==T.factor1?T.factor1:T.factor,T.factor2)}if(e.alphaRemapGradients)for(var C=0,S=e.alphaRemapGradients;C<S.length;C++){var w=S[C];t.addAlphaRemapGradient(w.gradient,void 0!==w.factor1?w.factor1:w.factor,w.factor2)}if(e.sizeGradients)for(var E=0,P=e.sizeGradients;E<P.length;E++){var A=P[E];t.addSizeGradient(A.gradient,void 0!==A.factor1?A.factor1:A.factor,A.factor2)}if(e.angularSpeedGradients)for(var L=0,M=e.angularSpeedGradients;L<M.length;L++){var R=M[L];t.addAngularSpeedGradient(R.gradient,void 0!==R.factor1?R.factor1:R.factor,R.factor2)}if(e.velocityGradients)for(var O=0,I=e.velocityGradients;O<I.length;O++){var D=I[O];t.addVelocityGradient(D.gradient,void 0!==D.factor1?D.factor1:D.factor,D.factor2)}if(e.dragGradients)for(var B=0,N=e.dragGradients;B<N.length;B++){var F=N[B];t.addDragGradient(F.gradient,void 0!==F.factor1?F.factor1:F.factor,F.factor2)}if(e.emitRateGradients)for(var U=0,G=e.emitRateGradients;U<G.length;U++){var z=G[U];t.addEmitRateGradient(z.gradient,void 0!==z.factor1?z.factor1:z.factor,z.factor2)}if(e.startSizeGradients)for(var V=0,k=e.startSizeGradients;V<k.length;V++){var W=k[V];t.addStartSizeGradient(W.gradient,void 0!==W.factor1?W.factor1:W.factor,W.factor2)}if(e.lifeTimeGradients)for(var H=0,q=e.lifeTimeGradients;H<q.length;H++){var j=q[H];t.addLifeTimeGradient(j.gradient,void 0!==j.factor1?j.factor1:j.factor,j.factor2)}if(e.limitVelocityGradients){for(var Y=0,X=e.limitVelocityGradients;Y<X.length;Y++){var K=X[Y];t.addLimitVelocityGradient(K.gradient,void 0!==K.factor1?K.factor1:K.factor,K.factor2)}t.limitVelocityDamping=e.limitVelocityDamping}if(e.particleEmitterType){switch(e.particleEmitterType.type){case"SphereParticleEmitter":l=new _0x19aa0e;break;case"SphereDirectedParticleEmitter":l=new _0x18a488;break;case"ConeEmitter":case"ConeParticleEmitter":l=new _0xf9ea81;break;case"CylinderParticleEmitter":l=new _0x17a06c;break;case"CylinderDirectedParticleEmitter":l=new _0x732f89;break;case"HemisphericParticleEmitter":l=new _0x498a84;break;case"PointParticleEmitter":l=new _0x21fe0a;break;case"MeshParticleEmitter":l=new MeshParticleEmitter;break;default:l=new _0x419949}l.parse(e.particleEmitterType)}else(l=new _0x419949).parse(e,scene);t.particleEmitterType=l,t.startSpriteCellID=e.startSpriteCellID,t.endSpriteCellID=e.endSpriteCellID,t.spriteCellWidth=e.spriteCellWidth,t.spriteCellHeight=e.spriteCellHeight,t.spriteCellChangeSpeed=e.spriteCellChangeSpeed,t.spriteRandomStartCell=e.spriteRandomStartCell};var _0x10e10b=(_0x29e73b=!0,function(e,t){var i=_0x29e73b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29e73b=!1,i}),_0x1da133=_0x10e10b(void 0,(function(){return _0x1da133.toString().search("(((.+)+)+)+$").toString().constructor(_0x1da133).search("(((.+)+)+)+$")})),_0x29e73b;function _0x48c0c2(e,t){this.gradient=e,this.color=t}_0x1da133();var _0x3cc57e=(_0x50653f=!0,function(e,t){var i=_0x50653f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x50653f=!1,i}),_0x2fbf41=_0x3cc57e(void 0,(function(){return _0x2fbf41.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fbf41).search("(((.+)+)+)+$")})),_0x50653f;function _0x43ab59(e,t,i){this.gradient=e,this.color1=t,this.color2=i}_0x2fbf41(),_0x43ab59.prototype.getColorToRef=function(e){this.color2?e$1U.lerp(this.color1,this.color2,Math.random(),e):e$1U.clone(this.color1,e)};var _0x431c89=(_0x5d177e=!0,function(e,t){var i=_0x5d177e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d177e=!1,i}),_0x1e0654=_0x431c89(void 0,(function(){return _0x1e0654.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e0654).search("(((.+)+)+)+$")})),_0x5d177e;function _0x28226b(e,t,i){this.gradient=e,this.factor1=t,this.factor2=i}function g$t(e,t){if(t!==e._currentFramebuffer){var i;e._currentFramebuffer=t,typeof WebGLRenderingContext<"u"&&(i=[de$x.BACK]);var n=i;if(e$2b(t))t._bind(),n=t._getActiveColorAttachments();else{var r=e._gl;r.bindFramebuffer(r.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}function B$i(e,t,i,n){var r=e._currentRenderState,o=e._currentPassState,a=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,d$1m.partialApply(e._gl,r,t,o,i,a,i.viewport,n)}function u$m(e,t,i,n){var r=u$_(i._renderState,e._defaultRenderState);if(e$2b(t)&&r.depthTest&&r.depthTest.enabled&&!t.hasDepthAttachment)throw new t$16("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");g$t(e,t),B$i(e,r,n,!1)}function s$i(e){this._pointCount=e.pointCount,this._primitiveMode=e.primitiveMode,this._feedbackShaderProgram=e.feedbackShader,this._normalShaderProgram=e.normalShader,this._modelMatrix=e.modelMatrix,this._normalShaderUniformMap=e.normalShaderUniformMap,this._feedbackShaderUniformMap=e.feedbackShaderUniformMap,this._attributes=e.attributes,this._framebuffer=e.framebuffer,this._renderState=e.renderState,this._indices=e.indices,this._textureEffect=e.textureEffect,this._frameIdx=0,this._VBOs=new Array,this._VBOs[0]=new Array,this._VBOs[1]=new Array,this._indexBuffer=null,this._pass=Le$s.ANALYSIS,this._handle=void 0,this._gl=void 0,this.initialized=!1,this._drawEvent=new o$1h,this._uniformBuffers=[]}_0x1e0654(),_0x28226b.prototype.getFactor=function(){return void 0===this.factor2||this.factor2===this.factor1?this.factor1:this.factor1+(this.factor2-this.factor1)*Math.random()},s$i.prototype.beginDraw=function(e,t,i,n){u$m(e,t,i,n)},s$i.prototype.execute=function(e,t){var i=e._gl;if(this._gl=i,!this.initialized){for(var n=this._attributes.length,r=0;r<n;++r)this._addAttribute(e,this._attributes[r]);this._textureEffect&&this._createIndexBuffer(e),e$2b(this._handle)||(this._handle=i.createTransformFeedback()),this.initialized=!0}u$m(e,u$_(this._framebuffer,t.framebuffer),this,t),this._bindVBOToVertexAttribute(e),this._enableVertexAttribArray(e,!0),this._drawTransformFeedback(e),this._drawNormal(e,t),this._drawEvent.raiseEvent(e,t),this._enableVertexAttribArray(e,!1),this._frameIdx=1-this._frameIdx},s$i.prototype._drawNormal=function(e,t){var i=e._gl;this._normalShaderProgram._bind(),e._us.model=u$_(this._modelMatrix,p$1d.IDENTITY),this._normalShaderProgram._setUniforms(this._normalShaderUniformMap,e._us,e.validateShaderProgram,this),this._textureEffect?(i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,this._indexBuffer),i.drawElements(this._primitiveMode,this._indices.length,i.UNSIGNED_INT,0)):i.drawArrays(this._primitiveMode,0,this._pointCount)},s$i.prototype._drawTransformFeedback=function(e){var t=e._gl;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,this._handle),this._bindVBOToTransformFeedback(e,!0),this._feedbackShaderProgram._bind(),e._us.model=u$_(this._modelMatrix,p$1d.IDENTITY),this._feedbackShaderProgram._setUniforms(this._feedbackShaderUniformMap,e._us,e.validateShaderProgram,this),t.enable(t.RASTERIZER_DISCARD),t.beginTransformFeedback(this._primitiveMode),this._textureEffect?t.drawArrays(this._primitiveMode,0,4*this._pointCount):t.drawArrays(this._primitiveMode,0,this._pointCount),t.endTransformFeedback(),t.disable(t.RASTERIZER_DISCARD),this._bindVBOToTransformFeedback(e,!1)},s$i.prototype._enableVertexAttribArray=function(e,t){for(var i=e._gl,n=0;n<this._attributes.length;n++){var r=this._attributes[n].index;t?i.enableVertexAttribArray(r):i.disableVertexAttribArray(r)}},s$i.prototype._bindVBOToVertexAttribute=function(e){for(var t=e._gl,i=0;i<this._attributes.length;i++){var n=this._attributes[i],r=n.index,o=n.componentsPerAttribute;t.bindBuffer(t.ARRAY_BUFFER,this._VBOs[this._frameIdx][r]._getBuffer()),t.vertexAttribPointer(r,o,t.FLOAT,!1,0,0)}},s$i.prototype._bindVBOToTransformFeedback=function(e,t){for(var i=e._gl,n=0;n<this._attributes.length;n++){var r=this._attributes[n].index,o=t?this._VBOs[1-this._frameIdx][r]._getBuffer():null;i.bindBufferBase(i.TRANSFORM_FEEDBACK_BUFFER,r,o)}},s$i.prototype._addAttribute=function(e,t){var i=t.data,n=t.index;this._VBOs[0][n]=this._createVBO(e,i),this._VBOs[1][n]=this._createVBO(e,i)},s$i.prototype._createVBO=function(e,t){return new t$Y({context:e,bufferTarget:de$x.ARRAY_BUFFER,usage:de$x.DYNAMIC_DRAW,typedArray:t})},s$i.prototype._createIndexBuffer=function(e){var t=e._gl;this._indexBuffer=t.createBuffer(),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this._indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this._indices,t.STATIC_DRAW)},s$i.prototype.isDestroyed=function(){return!1},s$i.prototype.destroy=function(){e$2b(this._normalShaderProgram)&&(this._normalShaderProgram=this._normalShaderProgram&&this._normalShaderProgram.destroy()),e$2b(this._feedbackShaderProgram)&&(this._feedbackShaderProgram=this._feedbackShaderProgram&&this._feedbackShaderProgram.destroy());for(var e=0;e<this._attributes.length;e++){var t=this._attributes[e].index;this._VBOs[0][t].destroy(),this._VBOs[1][t].destroy()}return e$2b(this._indexBuffer)&&this._gl.deleteBuffer(this._indexBuffer),e$2b(this._handle)&&(this._handle=this._gl.deleteTransformFeedback(this._handle),this._handle=void 0),i$10(this)},Object.defineProperties(s$i.prototype,{pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e)}}});var _0x31663e="#version 300 es\n#define PI 3.14159\nuniform float currentCount;\nuniform float timeDelta;\nuniform float stopFactor;\n#ifndef LOCAL\nuniform mat4 emitterWM;\n#endif\nuniform vec2 lifeTime;\nuniform vec2 emitPower;\nuniform vec2 sizeRange;\nuniform vec4 scaleRange;\n#ifndef COLORGRADIENTS\nuniform vec4 color1;\nuniform vec4 color2;\n#endif\nuniform vec3 gravity;\nuniform sampler2D randomSampler;\nuniform sampler2D randomSampler2;\nuniform vec4 angleRange;\n#ifdef BOXEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\nuniform vec3 minEmitBox;\nuniform vec3 maxEmitBox;\n#endif\n#ifdef POINTEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#endif\n#ifdef HEMISPHERICEMITTER\nuniform float radius;\nuniform float radiusRange;\nuniform float directionRandomizer;\n#endif\n#ifdef SPHEREEMITTER\nuniform float radius;\nuniform float radiusRange;\n#ifdef DIRECTEDSPHEREEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#else\nuniform float directionRandomizer;\n#endif\n#endif\n#ifdef CYLINDEREMITTER\nuniform float radius;\nuniform float height;\nuniform float radiusRange;\n#ifdef DIRECTEDCYLINDEREMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#else\nuniform float directionRandomizer;\n#endif\n#endif\n#ifdef CONEEMITTER\nuniform vec2 radius;\nuniform float coneAngle;\nuniform vec2 height;\nuniform float directionRandomizer;\n#endif\nin vec3 position;\n#ifdef CUSTOMEMITTER\nin vec3 initialPosition;\n#endif\nin float age;\nin float life;\nin vec4 seed;\nin vec3 size;\n#ifndef COLORGRADIENTS\nin vec4 color;\n#endif\nin vec3 direction;\n#ifndef BILLBOARD\nin vec3 initialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nin float angle;\n#else\nin vec2 angle;\n#endif\n#ifdef ANIMATESHEET\nin float cellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nin float cellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nin vec3 noiseCoordinates1;\nin vec3 noiseCoordinates2;\n#endif\nout vec3 outPosition;\n#ifdef CUSTOMEMITTER\nout vec3 outInitialPosition;\n#endif\nout float outAge;\nout float outLife;\nout vec4 outSeed;\nout vec3 outSize;\n#ifndef COLORGRADIENTS\nout vec4 outColor;\n#endif\nout vec3 outDirection;\n#ifndef BILLBOARD\nout vec3 outInitialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nout float outAngle;\n#else\nout vec2 outAngle;\n#endif\n#ifdef ANIMATESHEET\nout float outCellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nout float outCellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nout vec3 outNoiseCoordinates1;\nout vec3 outNoiseCoordinates2;\n#endif\n#ifdef SIZEGRADIENTS\nuniform sampler2D sizeGradientSampler;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nuniform sampler2D angularSpeedGradientSampler;\n#endif\n#ifdef VELOCITYGRADIENTS\nuniform sampler2D velocityGradientSampler;\n#endif\n#ifdef LIMITVELOCITYGRADIENTS\nuniform sampler2D limitVelocityGradientSampler;\nuniform float limitVelocityDamping;\n#endif\n#ifdef DRAGGRADIENTS\nuniform sampler2D dragGradientSampler;\n#endif\n#ifdef NOISE\nuniform vec3 noiseStrength;\nuniform sampler2D noiseSampler;\n#endif\n#ifdef ANIMATESHEET\nuniform vec4 cellInfos;\n#endif\nvec3 getRandomVec3(float offset) {\nreturn texture(randomSampler2, vec2(float(gl_VertexID) * offset / currentCount, 0)).rgb;\n}\nvec4 getRandomVec4(float offset) {\nreturn texture(randomSampler, vec2(float(gl_VertexID) * offset / currentCount, 0));\n}\nvoid main() {\nfloat newAge = age + timeDelta;\nif (newAge >= life && stopFactor != 0.) {\nvec3 newPosition;\nvec3 newDirection;\nvec4 randoms = getRandomVec4(seed.x);\noutLife = lifeTime.x + (lifeTime.y - lifeTime.x) * randoms.r;\noutAge = newAge - life;\noutSeed = seed;\n#ifdef SIZEGRADIENTS\noutSize.x = texture(sizeGradientSampler, vec2(0, 0)).r;\n#else\noutSize.x = sizeRange.x + (sizeRange.y - sizeRange.x) * randoms.g;\n#endif\noutSize.y = scaleRange.x + (scaleRange.y - scaleRange.x) * randoms.b;\noutSize.z = scaleRange.z + (scaleRange.w - scaleRange.z) * randoms.a;\n#ifndef COLORGRADIENTS\noutColor = color1 + (color2 - color1) * randoms.b;\n#endif\n#ifndef ANGULARSPEEDGRADIENTS\noutAngle.y = angleRange.x + (angleRange.y - angleRange.x) * randoms.a;\noutAngle.x = angleRange.z + (angleRange.w - angleRange.z) * randoms.r;\n#else\noutAngle = angleRange.z + (angleRange.w - angleRange.z) * randoms.r;\n#endif\n#ifdef POINTEMITTER\nvec3 randoms2 = getRandomVec3(seed.y);\nvec3 randoms3 = getRandomVec3(seed.z);\nnewPosition = vec3(0, 0, 0);\nnewDirection = direction1 + (direction2 - direction1) * randoms3;\n#elif defined(BOXEMITTER)\nvec3 randoms2 = getRandomVec3(seed.y);\nvec3 randoms3 = getRandomVec3(seed.z);\nnewPosition = minEmitBox + (maxEmitBox - minEmitBox) * randoms2;\nnewDirection = direction1 + (direction2 - direction1) * randoms3;\n#elif defined(HEMISPHERICEMITTER)\nvec3 randoms2 = getRandomVec3(seed.y);\nvec3 randoms3 = getRandomVec3(seed.z);\nfloat phi = 2.0 * PI * randoms2.x;\nfloat theta = acos(2.0 * randoms2.y - 1.0);\nfloat randX = cos(phi) * sin(theta);\nfloat randY = sin(phi) * sin(theta);\nfloat randZ = cos(theta);\nnewPosition = (radius - (radius * radiusRange * randoms2.z)) * vec3(randX, abs(randY), randZ);\nnewDirection = newPosition + directionRandomizer * randoms3;\n#elif defined(SPHEREEMITTER)\nvec3 randoms2 = getRandomVec3(seed.y);\nvec3 randoms3 = getRandomVec3(seed.z);\nfloat phi = 2.0 * PI * randoms2.x;\nfloat theta = acos(2.0 * randoms2.y - 1.0);\nfloat randX = cos(phi) * sin(theta);\nfloat randY = cos(theta);\nfloat randZ = sin(phi) * sin(theta);\nnewPosition = (radius - (radius * radiusRange * randoms2.z)) * vec3(randX, randY, randZ);\n#ifdef DIRECTEDSPHEREEMITTER\nnewDirection = normalize(direction1 + (direction2 - direction1) * randoms3);\n#else\nnewDirection = normalize(newPosition + directionRandomizer * randoms3);\n#endif\n#elif defined(CYLINDEREMITTER)\nvec3 randoms2 = getRandomVec3(seed.y);\nvec3 randoms3 = getRandomVec3(seed.z);\nfloat zPos = (randoms2.x - 0.5)*height;\nfloat angle = randoms2.y * PI * 2.;\nfloat inverseRadiusRangeSquared = ((1.-radiusRange) * (1.-radiusRange));\nfloat positionRadius = radius*sqrt(inverseRadiusRangeSquared + (randoms2.z * (1.-inverseRadiusRangeSquared)));\nfloat xPos = positionRadius * cos(angle);\nfloat yPos = positionRadius * sin(angle);\nnewPosition = vec3(xPos, yPos, zPos);\n#ifdef DIRECTEDCYLINDEREMITTER\nnewDirection = direction1 + (direction2 - direction1) * randoms3;\n#else\nangle = angle + ((randoms3.x-0.5) * PI) * directionRandomizer;\nnewDirection = vec3(cos(angle), (randoms3.y-0.5) * directionRandomizer, sin(angle));\nnewDirection = normalize(newDirection);\n#endif\n#elif defined(CONEEMITTER)\nvec3 randoms2 = getRandomVec3(seed.y);\nfloat s = 2.0 * PI * randoms2.x;\n#ifdef CONEEMITTERSPAWNPOINT\nfloat h = 0.0001;\n#else\nfloat h = randoms2.y * height.y;\nh = 1. - h * h;\n#endif\nfloat lRadius = radius.x - radius.x * randoms2.z * radius.y;\nlRadius = lRadius * h;\nfloat randX = lRadius * sin(s);\nfloat randY = lRadius * cos(s);\nfloat randZ = h * height.x;\nnewPosition = vec3(randX, randY, randZ);\nif (abs(cos(coneAngle)) == 1.0) {\nnewDirection = vec3(0.0, 0.0, 1.0);\n} else {\nvec3 randoms3 = getRandomVec3(seed.z);\nnewDirection = normalize(newPosition + directionRandomizer * randoms3);\n}\n#elif defined(CUSTOMEMITTER)\nnewPosition = initialPosition;\noutInitialPosition = initialPosition;\n#else\nnewPosition = vec3(0., 0., 0.);\nnewDirection = 2.0 * (getRandomVec3(seed.w) - vec3(0.5, 0.5, 0.5));\n#endif\nfloat power = emitPower.x + (emitPower.y - emitPower.x) * randoms.a;\n#ifdef LOCAL\noutPosition = newPosition;\n#else\noutPosition = (emitterWM * vec4(newPosition, 1.)).xyz;\n#endif\n#ifdef CUSTOMEMITTER\noutDirection = direction;\n#ifndef BILLBOARD\noutInitialDirection = direction;\n#endif\n#else\n#ifdef LOCAL\nvec3 initial = newDirection;\n#else\nvec3 initial = (emitterWM * vec4(newDirection, 0.)).xyz;\n#endif\noutDirection = initial * power;\n#ifndef BILLBOARD\noutInitialDirection = initial;\n#endif\n#endif\n#ifdef ANIMATESHEET\noutCellIndex = cellInfos.x;\n#ifdef ANIMATESHEETRANDOMSTART\noutCellStartOffset = randoms.a * outLife;\n#endif\n#endif\n#ifdef NOISE\noutNoiseCoordinates1 = noiseCoordinates1;\noutNoiseCoordinates2 = noiseCoordinates2;\n#endif\n} else {\nfloat directionScale = timeDelta;\noutAge = newAge;\nfloat ageGradient = newAge / life;\n#ifdef VELOCITYGRADIENTS\ndirectionScale *= texture(velocityGradientSampler, vec2(ageGradient, 0)).r;\n#endif\n#ifdef DRAGGRADIENTS\ndirectionScale *= 1.0 - texture(dragGradientSampler, vec2(ageGradient, 0)).r;\n#endif\n#if defined(CUSTOMEMITTER)\noutPosition = position + (direction - position) * ageGradient;\noutInitialPosition = initialPosition;\n#else\noutPosition = position + direction * directionScale;\n#endif\noutLife = life;\noutSeed = seed;\n#ifndef COLORGRADIENTS\noutColor = color;\n#endif\n#ifdef SIZEGRADIENTS\noutSize.x = texture(sizeGradientSampler, vec2(ageGradient, 0)).r;\noutSize.yz = size.yz;\n#else\noutSize = size;\n#endif\n#ifndef BILLBOARD\noutInitialDirection = initialDirection;\n#endif\n#ifdef CUSTOMEMITTER\noutDirection = direction;\n#else\nvec3 updatedDirection = direction + gravity * timeDelta;\n#ifdef LIMITVELOCITYGRADIENTS\nfloat limitVelocity = texture(limitVelocityGradientSampler, vec2(ageGradient, 0)).r;\nfloat currentVelocity = length(updatedDirection);\nif (currentVelocity > limitVelocity) {\nupdatedDirection = updatedDirection * limitVelocityDamping;\n}\n#endif\noutDirection = updatedDirection;\n#ifdef NOISE\nfloat fetchedR = texture(noiseSampler, vec2(noiseCoordinates1.x, noiseCoordinates1.y) * vec2(0.5) + vec2(0.5)).r;\nfloat fetchedG = texture(noiseSampler, vec2(noiseCoordinates1.z, noiseCoordinates2.x) * vec2(0.5) + vec2(0.5)).r;\nfloat fetchedB = texture(noiseSampler, vec2(noiseCoordinates2.y, noiseCoordinates2.z) * vec2(0.5) + vec2(0.5)).r;\nvec3 force = vec3(2. * fetchedR - 1., 2. * fetchedG - 1., 2. * fetchedB - 1.) * noiseStrength;\noutDirection = outDirection + force * timeDelta;\noutNoiseCoordinates1 = noiseCoordinates1;\noutNoiseCoordinates2 = noiseCoordinates2;\n#endif\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nfloat angularSpeed = texture(angularSpeedGradientSampler, vec2(ageGradient, 0)).r;\noutAngle = angle + angularSpeed * timeDelta;\n#else\noutAngle = vec2(angle.x + angle.y * timeDelta, angle.y);\n#endif\n#ifdef ANIMATESHEET\nfloat offsetAge = outAge;\nfloat dist = cellInfos.y - cellInfos.x;\n#ifdef ANIMATESHEETRANDOMSTART\noutCellStartOffset = cellStartOffset;\noffsetAge += cellStartOffset;\n#else\nfloat cellStartOffset = 0.;\n#endif\nfloat ratio = 0.;\nif (cellInfos.w == 1.0) {\nratio = clamp(mod(cellStartOffset + cellInfos.z * offsetAge, life) / life, 0., 1.0);\n}\nelse {\nratio = clamp(cellStartOffset + cellInfos.z * offsetAge / life, 0., 1.0);\n}\noutCellIndex = float(int(cellInfos.x + ratio * dist));\n#endif\n}\n}\n",_0xdbe70b="#version 300 es\nvoid main() {\ndiscard;\n}\n",_0x3de8c9="precision highp float;\nuniform vec2 translationPivot;\nuniform vec3 worldOffset;\n#ifdef LOCAL\nuniform mat4 emitterWM;\n#endif\nattribute vec3 position;\nattribute float age;\nattribute float life;\nattribute vec3 size;\n#ifndef BILLBOARD\nattribute vec3 initialDirection;\n#endif\n#ifdef BILLBOARDSTRETCHED\nattribute vec3 direction;\n#endif\nattribute float angle;\n#ifdef ANIMATESHEET\nattribute float cellIndex;\n#endif\nattribute vec2 offset;\nattribute vec2 uv;\nvarying vec2 vUV;\nvarying vec4 vColor;\nvarying vec3 vPositionW;\n#ifdef COLORGRADIENTS\nuniform sampler2D colorGradientSampler;\n#else\nuniform vec4 colorDead;\nattribute vec4 color;\n#endif\n#ifdef ANIMATESHEET\nuniform vec3 sheetInfos;\n#endif\n#ifdef BILLBOARD\nuniform vec3 eyePosition;\n#endif\nvec3 rotate(vec3 yaxis, vec3 rotatedCorner) {\nvec3 xaxis = normalize(cross(vec3(0., 1.0, 0.), yaxis));\nvec3 zaxis = normalize(cross(yaxis, xaxis));\nvec3 row0 = vec3(xaxis.x, xaxis.y, xaxis.z);\nvec3 row1 = vec3(yaxis.x, yaxis.y, yaxis.z);\nvec3 row2 = vec3(zaxis.x, zaxis.y, zaxis.z);\nmat3 rotMatrix = mat3(row0, row1, row2);\nvec3 alignedCorner = rotMatrix * rotatedCorner;\n#ifdef LOCAL\nreturn ((emitterWM * vec4(position, 1.0)).xyz + worldOffset) + alignedCorner;\n#else\nreturn (position + worldOffset) + alignedCorner;\n#endif\n}\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera, vec3 rotatedCorner) {\nvec3 normalizedToCamera = normalize(toCamera);\nvec3 normalizedCrossDirToCamera = normalize(cross(normalize(direction), normalizedToCamera));\nvec3 crossProduct = normalize(cross(normalizedToCamera, normalizedCrossDirToCamera));\nvec3 row0 = vec3(normalizedCrossDirToCamera.x, normalizedCrossDirToCamera.y, normalizedCrossDirToCamera.z);\nvec3 row1 = vec3(crossProduct.x, crossProduct.y, crossProduct.z);\nvec3 row2 = vec3(normalizedToCamera.x, normalizedToCamera.y, normalizedToCamera.z);\nmat3 rotMatrix = mat3(row0, row1, row2);\nvec3 alignedCorner = rotMatrix * rotatedCorner;\n#ifdef LOCAL\nreturn ((emitterWM * vec4(position, 1.0)).xyz + worldOffset) + alignedCorner;\n#else\nreturn (position + worldOffset) + alignedCorner;\n#endif\n}\n#endif\nvoid main() {\n#ifdef ANIMATESHEET\nfloat rowOffset = floor(cellIndex / sheetInfos.z);\nfloat columnOffset = cellIndex - rowOffset * sheetInfos.z;\nvec2 uvScale = sheetInfos.xy;\nvec2 uvOffset = vec2(uv.x , 1.0 - uv.y);\nvUV = (uvOffset + vec2(columnOffset, rowOffset)) * uvScale;\n#else\nvUV = uv;\n#endif\nfloat ratio = age / life;\n#ifdef COLORGRADIENTS\nvColor = texture2D(colorGradientSampler, vec2(ratio, 0));\n#else\nvColor = color * vec4(1.0 - ratio) + colorDead * vec4(ratio);\n#endif\nvec2 cornerPos = (offset - translationPivot) * size.yz * size.x + translationPivot;\n#ifdef BILLBOARD\nvec4 rotatedCorner;\nrotatedCorner.w = 0.;\n#ifdef BILLBOARDY\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.z = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.y = 0.;\nvec3 yaxis = (position + worldOffset) - eyePosition;\nyaxis.y = 0.;\nvPositionW = rotate(normalize(yaxis), rotatedCorner.xyz);\nvec4 viewPosition = (czm_view * vec4(vPositionW, 1.0));\n#elif defined(BILLBOARDSTRETCHED)\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.z = 0.;\nvec3 toCamera = (position + worldOffset) - eyePosition;\nvPositionW = rotateAlign(toCamera, rotatedCorner.xyz);\nvec4 viewPosition = (czm_view * vec4(vPositionW, 1.0));\n#else\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.z = 0.;\n#ifdef LOCAL\nvec4 viewPosition = czm_modelView * vec4(((emitterWM * vec4(position, 1.0)).xyz + worldOffset), 1.0) + rotatedCorner;\n#else\nvec4 viewPosition = czm_modelView * vec4((position + worldOffset), 1.0) + rotatedCorner;\n#endif\nvPositionW = (czm_inverseView * viewPosition).xyz;\n#endif // BILLBOARDY\n#else\nvec3 rotatedCorner;\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.y = 0.;\nrotatedCorner.z = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nvec3 yaxis = normalize(initialDirection);\nvPositionW = rotate(yaxis, rotatedCorner);\nvec4 viewPosition = czm_view * vec4(vPositionW, 1.0);\n#endif // BILLBOARD\ngl_Position = czm_projection * viewPosition;\n}\n",_0x7d752a="precision highp float;\nuniform sampler2D diffuseSampler;\nvarying vec2 vUV;\nvarying vec4 vColor;\nvoid main() {\nvec4 textureColor = texture2D(diffuseSampler, vUV);\ngl_FragColor = textureColor * vColor;\n#ifdef BLENDMULTIPLYMODE\nfloat alpha = vColor.a * textureColor.a;\ngl_FragColor.rgb = gl_FragColor.rgb * alpha + vec3(1.0) * (1.0 - alpha);\n#endif\n}\n",_0x48ce9b=(_0x5b9f2f=!0,function(e,t){var i=_0x5b9f2f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b9f2f=!1,i}),_0x4ba278=_0x48ce9b(void 0,(function(){return _0x4ba278.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ba278).search("(((.+)+)+)+$")})),_0x5b9f2f;function _0x4ba997(){this.particlePositionGenerator=function(){},this.particleDestinationGenerator=function(){}}_0x4ba278(),_0x4ba997.prototype.startDirectionFunction=function(e,t,i,n){var r=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.TmpVectors.Vector3[0];if(this.particleDestinationGenerator){this.particleDestinationGenerator(-1,i,r);var o=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.TmpVectors.Vector3[1];r.subtractToRef(i.position,o),o.scaleToRef(1/i.lifeTime,r)}else r.set(0,0,0);n?t.copyFrom(r):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Vector3.TransformNormalToRef(r,e,t)},_0x4ba997.prototype.startPositionFunction=function(e,t,i,n){var r=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.TmpVectors.Vector3[0];this.particlePositionGenerator?this.particlePositionGenerator(-1,i,r):r.set(0,0,0),n?t.copyFrom(r):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Vector3.TransformCoordinatesToRef(r,e,t)},_0x4ba997.prototype.clone=function(){var e=new _0x4ba997;return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x4ba997.prototype.applyToShader=function(e){},_0x4ba997.prototype.getEffectDefines=function(e){e.push("CUSTOMEMITTER")},_0x4ba997.prototype.getClassName=function(){return"CustomParticleEmitter"},_0x4ba997.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e},_0x4ba997.prototype.parse=function(e){};var _0x54320b=(_0x40e9ba=!0,function(e,t){var i=_0x40e9ba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40e9ba=!1,i}),_0x2c4222=_0x54320b(void 0,(function(){return _0x2c4222.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c4222).search("(((.+)+)+)+$")})),_0x40e9ba;function _0xf6a90a(){}_0x2c4222(),_0xf6a90a.GetCurrentGradient=function(e,t,i){if(t[0].gradient>e)i(t[0],t[0],1);else{for(var n=0;n<t.length-1;n++){var r=t[n],o=t[n+1];if(e>=r.gradient&&e<=o.gradient)return void i(r,o,(e-r.gradient)/(o.gradient-r.gradient))}var a=t.length-1;i(t[a],t[a],1)}};var _0x27b750=(_0xd0e5e4=!0,function(e,t){var i=_0xd0e5e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd0e5e4=!1,i}),_0x40e152=_0x27b750(void 0,(function(){return _0x40e152.toString().search("(((.+)+)+)+$").toString().constructor(_0x40e152).search("(((.+)+)+)+$")})),_0xd0e5e4;function _0x326310(e,t,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=null);var o=_0x36dee7.call(this,e)||this;o._modelMatrx=p$1d.IDENTITY,o._context=i._context,o.layerMask=268435455,o._accumulatedCount=0,o._targetIndex=0,o._currentRenderId=-1,o._started=!1,o._stopped=!1,o._timeDelta=0,o._actualFrame=0,o._rawTextureWidth=256,o.forceDepthWrite=!1,o._preWarmDone=!1,o.isLocal=!1,e$2b(i)&&i.particleSystems.push(o),o._onBeforeDrawParticlesObservable=null,o._customEffect={0:r},o._capacity=u$_(t.capacity,5e4),o._activeCount=o._capacity,o._currentActiveCount=0,o._isAnimationSheetEnabled=n,o.particleEmitterType=new _0x419949;for(var a=u$_(t.randomTextureSize,512),s=[],l=0;l<a;++l)s.push(Math.random()),s.push(Math.random()),s.push(Math.random()),s.push(Math.random());o._randomTexture=new t$V({context:context,source:{width:a,height:1,arrayBufferView:new Float32Array(s)},flipY:!1,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),s=[];for(l=0;l<a;++l)s.push(Math.random()),s.push(Math.random()),s.push(Math.random()),s.push(Math.random());return o._randomTexture2=new t$V({context:context,source:{width:a,height:1,arrayBufferView:new Float32Array(s)},flipY:!1,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),o._randomTextureSize=a,o}function _0x38ef28(e,t,i){var n=e.attributeLocations,r=e.attributes,o=e.attIndex,a=e.offset,s=S$12.FLOAT,l=S$12.getSizeInBytes(s),u=e.attributesStrideSize*l;n[t]=o++,r.push({index:n[t],vertexBuffer:e.buffer,componentsPerAttribute:i,componentDatatype:s,normalize:!1,offsetInBytes:l*a,strideInBytes:u,instanceDivisor:e.instanceDivisor}),e.offset+=i,e.attributeLocations=n,e.attIndex=o,e.attributes=r}_0x40e152(),_0x326310.prototype=Object.create(_0x36dee7.prototype),_0x326310.prototype.constructor=_0x36dee7,Object.defineProperties(_0x326310.prototype,{IsSupported:{get:function(){return this._context.webgl2}},activeParticleCount:{get:function(){return this._activeCount},set:function(e){this._activeCount=Math.min(e,this._capacity)}},modelMatrix:{get:function(){return this._modelMatrx},set:function(e){this._modelMatrx!==e&&(this._modelMatrx=e)}}}),_0x326310.prototype.getCapacity=function(){return this._capacity},_0x326310.prototype.isStarted=function(){return this._started},_0x326310.prototype.isStopped=function(){return this._stopped},_0x326310.prototype.isStopping=function(){return!1},_0x326310.prototype.getActiveCount=function(){return this._currentActiveCount},_0x326310.prototype._hasTargetStopDurationDependantGradient=function(){return this._startSizeGradients&&this._startSizeGradients.length>0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0},_0x326310.prototype.start=function(e){var t=this;if(void 0===e&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set";e?setTimeout((function(){t.start(0)}),e):(this._started=!0,this._stopped=!1,this._preWarmDone=!1,this.beginAnimationOnStart&&this.animations&&this.animations.length>0&&this._scene&&this._scene.beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop))},_0x326310.prototype.stop=function(){this._stopped||(this._stopped=!0)},_0x326310.prototype.reset=function(){this._releaseBuffers(),this._releaseVAOs(),this._currentActiveCount=0,this._targetIndex=0},_0x326310.prototype.getClassName=function(){return"GPUParticleSystem"},_0x326310.prototype.getCustomEffect=function(e){var t;return void 0===e&&(e=0),null!==(t=this._customEffect[e])&&void 0!==t?t:this._customEffect[0]},_0x326310.prototype.setCustomEffect=function(e,t){void 0===t&&(t=0),this._customEffect[t]=e},_0x326310.prototype._removeGradientAndTexture=function(e,t,i){return _super.prototype._removeGradientAndTexture.call(this,e,t,i),this._releaseBuffers(),this},_0x326310.prototype.addColorGradient=function(e,t,i){this._colorGradients||(this._colorGradients=[]);var n=new _0x43ab59(e,t);return this._colorGradients.push(n),this._refreshColorGradient(!0),this._releaseBuffers(),this},_0x326310.prototype._refreshColorGradient=function(e){void 0===e&&(e=!1),this._colorGradients&&(e&&this._colorGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null))},_0x326310.prototype.forceRefreshGradients=function(){this._refreshColorGradient(),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture"),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture"),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture"),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture"),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture"),this.reset()},_0x326310.prototype.removeColorGradient=function(e){return this._removeGradientAndTexture(e,this._colorGradients,this._colorGradientsTexture),this._colorGradientsTexture=null,this},_0x326310.prototype._addFactorGradient=function(e,t,i){var n=new _0x28226b(t,i);e.push(n),this._releaseBuffers()},_0x326310.prototype.addSizeGradient=function(e,t){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture",!0),this._releaseBuffers(),this},_0x326310.prototype.removeSizeGradient=function(e){return this._removeGradientAndTexture(e,this._sizeGradients,this._sizeGradientsTexture),this._sizeGradientsTexture=null,this},_0x326310.prototype._refreshFactorGradient=function(e,t,i){if(void 0===i&&(i=!1),e){i&&e.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}));var n=this;n[t]&&(n[t].dispose(),n[t]=null)}},_0x326310.prototype.addAngularSpeedGradient=function(e,t){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture",!0),this._releaseBuffers(),this},_0x326310.prototype.removeAngularSpeedGradient=function(e){return this._removeGradientAndTexture(e,this._angularSpeedGradients,this._angularSpeedGradientsTexture),this._angularSpeedGradientsTexture=null,this},_0x326310.prototype.addVelocityGradient=function(e,t){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture",!0),this._releaseBuffers(),this},_0x326310.prototype.removeVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._velocityGradients,this._velocityGradientsTexture),this._velocityGradientsTexture=null,this},_0x326310.prototype.addLimitVelocityGradient=function(e,t){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture",!0),this._releaseBuffers(),this},_0x326310.prototype.removeLimitVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._limitVelocityGradients,this._limitVelocityGradientsTexture),this._limitVelocityGradientsTexture=null,this},_0x326310.prototype.addDragGradient=function(e,t){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture",!0),this._releaseBuffers(),this},_0x326310.prototype.removeDragGradient=function(e){return this._removeGradientAndTexture(e,this._dragGradients,this._dragGradientsTexture),this._dragGradientsTexture=null,this},_0x326310.prototype.addEmitRateGradient=function(e,t,i){return this},_0x326310.prototype.removeEmitRateGradient=function(e){return this},_0x326310.prototype.addStartSizeGradient=function(e,t,i){return this},_0x326310.prototype.removeStartSizeGradient=function(e){return this},_0x326310.prototype.addColorRemapGradient=function(e,t,i){return this},_0x326310.prototype.removeColorRemapGradient=function(){return this},_0x326310.prototype.addAlphaRemapGradient=function(e,t,i){return this},_0x326310.prototype.removeAlphaRemapGradient=function(){return this},_0x326310.prototype.addRampGradient=function(e,t){return this},_0x326310.prototype.removeRampGradient=function(){return this},_0x326310.prototype.getRampGradients=function(){return null},_0x326310.prototype.addLifeTimeGradient=function(e,t,i){return this},_0x326310.prototype.removeLifeTimeGradient=function(e){return this},_0x326310.prototype._reset=function(){this._releaseBuffers()},_0x326310.prototype._createUpdateVAO=function(e){var t={attributeLocations:{},attributes:[],attIndex:0,offset:0,attributesStrideSize:this._attributesStrideSize,buffer:e};return _0x38ef28(t,"position",3),this.particleEmitterType instanceof _0x4ba997&&_0x38ef28(t,"initialPosition",3),_0x38ef28(t,"age",1),_0x38ef28(t,"life",1),_0x38ef28(t,"seed",4),_0x38ef28(t,"size",3),this._colorGradientsTexture||_0x38ef28(t,"color",4),_0x38ef28(t,"direction",3),this._isBillboardBased||_0x38ef28(t,"initialDirection",3),this._angularSpeedGradientsTexture?_0x38ef28(t,"angle",1):_0x38ef28(t,"angle",2),this._isAnimationSheetEnabled&&(_0x38ef28(t,"cellIndex",1),this.spriteRandomStartCell&&_0x38ef28(t,"cellStartOffset",1)),this.noiseTexture&&(_0x38ef28(t,"noiseCoordinates1",3),_0x38ef28(t,"noiseCoordinates2",3)),this._updateAttributeLocations=t.attributeLocations,this._updateAttributes=t.attributes,new c$12({context:this._context,attributes:this._updateAttributes})},_0x326310.prototype._createRenderVAO=function(e,t){var i={attributeLocations:[],attributes:[],attIndex:0,offset:0,attributesStrideSize:4,buffer:t};_0x38ef28(i,"offset",2),_0x38ef28(i,"uv",2);var n={attributeLocations:i.attributeLocations,attributes:i.attributes,attIndex:i.attIndex,offset:0,attributesStrideSize:this._attributesStrideSize,buffer:e,instanceDivisor:1};return _0x38ef28(n,"position",3),this.particleEmitterType instanceof _0x4ba997&&(n.offset+=3),_0x38ef28(n,"age",1),_0x38ef28(n,"life",1),n.offset+=4,_0x38ef28(n,"size",3),this._colorGradientsTexture||_0x38ef28(n,"color",4),this.billboardMode===_0x29b01c.BILLBOARDMODE_STRETCHED?_0x38ef28(n,"direction",3):n.offset+=3,this._isBillboardBased||_0x38ef28(n,"initialDirection",3),this._angularSpeedGradientsTexture?_0x38ef28(n,"angle",1):_0x38ef28(n,"angle",2),this._isAnimationSheetEnabled&&(_0x38ef28(n,"cellIndex",1),this.spriteRandomStartCell&&_0x38ef28(n,"cellStartOffset",1)),this.noiseTexture&&(_0x38ef28(n,"noiseCoordinates1",3),_0x38ef28(n,"noiseCoordinates2",3)),this._renderAttributeLocations=n.attributeLocations,this._renderAttributes=n.attributes,new c$12({context:this._context,attributes:this._renderAttributes})};var _0x54f166=new o$1p;_0x326310.prototype._initialize=function(e){if(!e$2b(this._buffer0)||e){var t=new Array;this._attributesStrideSize=21,this._targetIndex=0,this.particleEmitterType instanceof _0x4ba997&&(this._attributesStrideSize+=3),this.isBillboardBased||(this._attributesStrideSize+=3),this._colorGradientsTexture&&(this._attributesStrideSize-=4),this._angularSpeedGradientsTexture&&(this._attributesStrideSize-=1),this._isAnimationSheetEnabled&&(this._attributesStrideSize+=1,this.spriteRandomStartCell&&(this._attributesStrideSize+=1)),this.noiseTexture&&(this._attributesStrideSize+=6);for(var i=this.particleEmitterType instanceof _0x4ba997,n=0;n<this._capacity;n++)t.push(0),t.push(0),t.push(0),i&&(this.particleEmitterType.particlePositionGenerator(n,null,_0x54f166),t.push(_0x54f166.x),t.push(_0x54f166.y),t.push(_0x54f166.z)),t.push(0),t.push(0),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(0),t.push(0),t.push(0),this._colorGradientsTexture||(t.push(0),t.push(0),t.push(0),t.push(0)),i?(this.particleEmitterType.particleDestinationGenerator(n,null,_0x54f166),t.push(_0x54f166.x),t.push(_0x54f166.y),t.push(_0x54f166.z)):(t.push(0),t.push(0),t.push(0)),this.isBillboardBased||(t.push(0),t.push(0),t.push(0)),t.push(0),this._angularSpeedGradientsTexture||t.push(0),this._isAnimationSheetEnabled&&(t.push(0),this.spriteRandomStartCell&&t.push(0)),this.noiseTexture&&(t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()));var r=new Float32Array(t),o=new Float32Array([.5,.5,1,1,-.5,.5,0,1,-.5,-.5,0,0,.5,-.5,1,0]);this._buffer0=t$Y.createVertexBuffer({context:this._context,typedArray:r,usage:A$19.STATIC_DRAW}),this._buffer1=t$Y.createVertexBuffer({context:this._context,typedArray:r,usage:A$19.STATIC_DRAW}),this._spriteBuffer=t$Y.createVertexBuffer({context:this._context,typedArray:o,usage:A$19.STATIC_DRAW}),this._updateVAO=[],this._updateVAO.push(this._createUpdateVAO(this._buffer0)),this._updateVAO.push(this._createUpdateVAO(this._buffer1)),this._renderVAO=[],this._renderVAO.push(this._createRenderVAO(this._buffer1,this._spriteBuffer)),this._renderVAO.push(this._createRenderVAO(this._buffer0,this._spriteBuffer)),this._sourceBuffer=this._buffer0,this._targetBuffer=this._buffer1}},_0x326310.prototype._recreateUpdateEffect=function(){var e=[];if(this.particleEmitterType&&this.particleEmitterType.getEffectDefines(e),this._isBillboardBased&&e.push("BILLBOARD"),this._colorGradientsTexture&&e.push("COLORGRADIENTS"),this._sizeGradientsTexture&&e.push("SIZEGRADIENTS"),this._angularSpeedGradientsTexture&&e.push("ANGULARSPEEDGRADIENTS"),this._velocityGradientsTexture&&e.push("VELOCITYGRADIENTS"),this._limitVelocityGradientsTexture&&e.push("LIMITVELOCITYGRADIENTS"),this._dragGradientsTexture&&e.push("DRAGGRADIENTS"),this.isAnimationSheetEnabled&&(e.push("ANIMATESHEET"),this.spriteRandomStartCell&&e.push("ANIMATESHEETRANDOMSTART")),this.noiseTexture&&e.push("NOISE"),this.isLocal&&e.push("LOCAL"),this._transformFeedbackVaryings=["outPosition"],this.particleEmitterType instanceof _0x4ba997&&this._transformFeedbackVaryings.push("outInitialPosition"),this._transformFeedbackVaryings.push("outAge"),this._transformFeedbackVaryings.push("outLife"),this._transformFeedbackVaryings.push("outSeed"),this._transformFeedbackVaryings.push("outSize"),this._colorGradientsTexture||this._transformFeedbackVaryings.push("outColor"),this._transformFeedbackVaryings.push("outDirection"),this._isBillboardBased||this._transformFeedbackVaryings.push("outInitialDirection"),this._transformFeedbackVaryings.push("outAngle"),this.isAnimationSheetEnabled&&(this._transformFeedbackVaryings.push("outCellIndex"),this.spriteRandomStartCell&&this._transformFeedbackVaryings.push("outCellStartOffset")),this.noiseTexture&&(this._transformFeedbackVaryings.push("outNoiseCoordinates1"),this._transformFeedbackVaryings.push("outNoiseCoordinates2")),!e$2b(this._updateSp)){this._updateDefines=e;var t,i,n=this._updateCommand;e$2b(n.shaderProgram)?(t=n.shaderProgram.vertexShaderSource.clone(),i=n.shaderProgram.fragmentShaderSource.clone()):(t=new s$U({name:"BabylonGpuUpdateParticlesVS",sources:[_0x31663e]}),i=new s$U({name:"BabylonGpuUpdateParticlesFS",sources:[_0xdbe70b]})),t.defines=e,i.defines=e,this._updateSp=this._updateSp&&this._updateSp.destroy(),this._updateSp=r$13.fromCache({context:this._context,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:this._updateAttributeLocations,transformFeedback:!0,transformFeedbackVaryings:this._transformFeedbackVaryings})}this._updateCommand.shaderProgram=this._updateSp},_0x326310.prototype._getEffect=function(){var e;return null!==(e=this.getCustomEffect())&&void 0!==e?e:this._renderEffect},_0x326310.prototype.fillDefines=function(e,t){if(this.blendMode===_0x5f5957.BLENDMODE_MULTIPLY&&e.push("BLENDMULTIPLYMODE"),this.isLocal&&e.push("LOCAL"),this._isBillboardBased)switch(e.push("BILLBOARD"),this.billboardMode){case _0x29b01c.BILLBOARDMODE_Y:e.push("BILLBOARDY");break;case _0x29b01c.BILLBOARDMODE_STRETCHED:e.push("BILLBOARDSTRETCHED");break;case _0x29b01c.BILLBOARDMODE_ALL:e.push("BILLBOARDMODE_ALL")}this._colorGradientsTexture&&e.push("COLORGRADIENTS"),this.isAnimationSheetEnabled&&e.push("ANIMATESHEET")},_0x326310.prototype._recreateRenderEffect=function(){var e=[];if(this.fillDefines(e),!e$2b(this._renderDefines)){this._renderDefines=e;var t,i,n=this._drawCommand;e$2b(n.shaderProgram)?(t=n.shaderProgram.vertexShaderSource.clone(),i=n.shaderProgram.fragmentShaderSource.clone()):(t=new s$U({name:"BabylonGpuRenderParticlesVS",sources:[_0x3de8c9]}),i=new s$U({name:"BabylonGpuRenderParticlesFS",sources:[_0x7d752a]})),t.defines=e,i.defines=e,this._renderSp=this._renderSp&&this._renderSp.destroy(),this._renderSp=r$13.fromCache({context:this._context,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:this._renderAttributeLocations})}this._drawCommand.shaderProgram=this._renderSp},_0x326310.prototype.animate=function(){this._timeDelta=this.updateSpeed,this._actualFrame+=this._timeDelta,this._stopped||this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()},_0x326310.prototype._createFactorGradientTexture=function(e,t){var i=this[t];if(e&&e.length&&!i){for(var n=new Float32Array(3*this._rawTextureWidth),r=0;r<this._rawTextureWidth;r++){var o=r/this._rawTextureWidth;_0xf6a90a.GetCurrentGradient(o,e,(function(e,t,i){n[3*r]=_0x2c1e2b.Lerp(e.factor1,t.factor1,i),n[3*r+1]=n[3*r],n[3*r+2]=n[3*r]}))}this[t]=new t$V({context:this._context,source:{width:this._rawTextureWidth,height:1,arrayBufferView:n},flipY:!1,pixelFormat:V$10.RGB,pixelDatatype:_$$.FLOAT,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})}},_0x326310.prototype._createSizeGradientTexture=function(){this._createFactorGradientTexture(this._sizeGradients,"_sizeGradientsTexture")},_0x326310.prototype._createAngularSpeedGradientTexture=function(){this._createFactorGradientTexture(this._angularSpeedGradients,"_angularSpeedGradientsTexture")},_0x326310.prototype._createVelocityGradientTexture=function(){this._createFactorGradientTexture(this._velocityGradients,"_velocityGradientsTexture")},_0x326310.prototype._createLimitVelocityGradientTexture=function(){this._createFactorGradientTexture(this._limitVelocityGradients,"_limitVelocityGradientsTexture")},_0x326310.prototype._createDragGradientTexture=function(){this._createFactorGradientTexture(this._dragGradients,"_dragGradientsTexture")};var _0x31f86f=new e$1U;_0x326310.prototype._createColorGradientTexture=function(){if(this._colorGradients&&this._colorGradients.length&&!this._colorGradientsTexture){for(var e=new Uint8Array(4*this._rawTextureWidth),t=_0x31f86f,i=0;i<this._rawTextureWidth;i++){var n=i/this._rawTextureWidth;_0xf6a90a.GetCurrentGradient(n,this._colorGradients,(function(n,r,o){e$1U.lerp(n.color1,r.color1,o,t),e[4*i]=255*t.red,e[4*i+1]=255*t.green,e[4*i+2]=255*t.blue,e[4*i+3]=255*t.alpha}))}this._colorGradientsTexture=new t$V({context:this._context,source:{width:this._rawTextureWidth,height:1,arrayBufferView:e},flipY:!1,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})}},_0x326310.prototype.update=function(e){e$2b(this._drawCommand)||this._createDrawCommand(),this.render(e)},_0x326310.prototype.render=function(e){if(!this._started)return 0;this._createColorGradientTexture(),this._createSizeGradientTexture(),this._createAngularSpeedGradientTexture(),this._createVelocityGradientTexture(),this._createLimitVelocityGradientTexture(),this._createDragGradientTexture(),this.animate(!0),this._initialize(!1),this._recreateUpdateEffect(),this._recreateRenderEffect();var t=this.emitRate*this._timeDelta;if(this._accumulatedCount+=t,this._accumulatedCount>1){var i=0|this._accumulatedCount;this._accumulatedCount-=i,this._currentActiveCount=Math.min(this._activeCount,this._currentActiveCount+i)}if(!this._currentActiveCount)return 0;this._transformFeedback.targetBuffer=this._targetBuffer,_0x36dee7._setRenderState(this._drawCommand,this.blendMode),this._updateCommand.vertexArray=this._updateVAO[this._targetIndex],this._updateCommand.vertexArray._numberOfVertices=this._currentActiveCount,this._drawCommand.vertexArray=this._renderVAO[this._targetIndex],this._drawCommand.instanceCount=this._currentActiveCount,e.commandList.push(this._updateCommand),e.commandList.push(this._drawCommand),this._targetIndex++,2===this._targetIndex&&(this._targetIndex=0);var n=this._sourceBuffer;return this._sourceBuffer=this._targetBuffer,this._targetBuffer=n,this._currentActiveCount},_0x326310.prototype.rebuild=function(){this._initialize(!0)},_0x326310.prototype._releaseBuffers=function(){},_0x326310.prototype._releaseVAOs=function(){if(this._updateVAO){for(var e=0;e<this._updateVAO.length;e++){(t=this._updateVAO[e]).isDestroyed()&&t.destroy()}this._updateVAO=[];for(e=0;e<this._renderVAO.length;e++){var t;(t=this._renderVAO[e]).isDestroyed()&&t.destroy()}this._renderVAO=[]}},_0x326310.prototype.isDestroyed=function(){return!1},_0x326310.prototype.destroy=function(){var e;e$2b(this._drawCommand)&&((e=this._drawCommand).shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.vertexArray=void 0,e.renderState=void 0,e.uniformMap=void 0,this._drawCommand=void 0);e$2b(this._updateCommand)&&((e=this._updateCommand).shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.vertexArray=void 0,e.renderState=void 0,e.uniformMap=void 0,this._updateCommand=void 0);this._transformFeedback&&(!this._transformFeedback.isDestroyed()&&this._transformFeedback.destroy(),this._transformFeedback=void 0),this._releaseBuffers(),this._releaseVAOs(),this._colorGradientsTexture&&(!this._colorGradientsTexture.isDestroyed()&&this._colorGradientsTexture.destroy(),this._colorGradientsTexture=null),this._sizeGradientsTexture&&(!this._sizeGradientsTexture.isDestroyed()&&this._sizeGradientsTexture.destroy(),this._sizeGradientsTexture=null),this._angularSpeedGradientsTexture&&(!this._angularSpeedGradientsTexture.isDestroyed()&&this._angularSpeedGradientsTexture.destroy(),this._angularSpeedGradientsTexture=null),this._velocityGradientsTexture&&(!this._velocityGradientsTexture.isDestroyed()&&this._velocityGradientsTexture.destroy(),this._velocityGradientsTexture=null),this._limitVelocityGradientsTexture&&(!this._limitVelocityGradientsTexture.isDestroyed()&&this._limitVelocityGradientsTexture.destroy(),this._limitVelocityGradientsTexture=null),this._dragGradientsTexture&&(!this._dragGradientsTexture.isDestroyed()&&this._dragGradientsTexture.destroy(),this._dragGradientsTexture=null),this._randomTexture&&(!this._randomTexture.isDestroyed()&&this._randomTexture.destroy(),this._randomTexture=null),this._randomTexture2&&(!this._randomTexture2.isDestroyed()&&this._randomTexture2.destroy(),this._randomTexture2=null),this.particleTexture&&(!this.particleTexture.isDestroyed()&&this.particleTexture.destroy(),this.particleTexture=null),this.noiseTexture&&(!this.noiseTexture.isDestroyed()&&this.noiseTexture.destroy(),this.noiseTexture=null)},_0x326310.prototype.clone=function(e,t){var i=this.serialize(),n=_0x326310.Parse(i,null,"");return n.name=e,void 0===t&&(t=this.emitter),n.emitter=t,n.noiseTexture=this.noiseTexture,n},_0x326310.prototype.serialize=function(e){void 0===e&&(e=!1);var t={};return ParticleSystem._Serialize(t,this,e),t.activeParticleCount=this.activeParticleCount,t.randomTextureSize=this._randomTextureSize,t},_0x326310.Parse=function(e,t,i,n){void 0===n&&(n=!1);var r=new _0x326310(e.name,{capacity:e.capacity,randomTextureSize:e.randomTextureSize},t,!1,null);return e.activeParticleCount&&(r.activeParticleCount=e.activeParticleCount),_0x36dee7._Parse(e,r,t,i),e.preventAutoStart&&(r.preventAutoStart=e.preventAutoStart),!n&&!r.preventAutoStart&&r.start(),r},_0x326310.fromJsonUrl=function(e,t){return t$11.createIfNeeded(e).fetchJson().then((function(e){return _0x326310.Parse(e,null,"",!1,t)}))};var _0x51abf8=new o$1o,_0x1d2ee7=new o$1o,_0x55fe0c=new o$1o,_0x54a610=new o$1p,_0x20667b=new o$1p,_0x2341c5=new e$29,_0x21a40c=new e$29,_0x31f86f=new e$1U;_0x326310.prototype._createUpdateUniformMap=function(){var e,t={},i=this;if(t.currentCount=function(){return i._currentActiveCount},t.timeDelta=function(){return i._timeDelta},t.stopFactor=function(){return i._stopped?0:1},t.randomSampler=function(){return e$2b(i._randomTexture)?i._randomTexture:i._context.defaultTexture},t.randomSampler2=function(){return e$2b(i._randomTexture2)?i._randomTexture2:i._context.defaultTexture},t.lifeTime=function(){return _0x51abf8.x=i.minLifeTime,_0x51abf8.y=i.maxLifeTime,_0x51abf8},t.emitPower=function(){return _0x1d2ee7.x=i.minEmitPower,_0x1d2ee7.y=i.maxEmitPower,_0x1d2ee7},t.color1=function(){return i.color1},t.color2=function(){return i.color2},t.sizeRange=function(){return _0x55fe0c.x=i.minSize,_0x55fe0c.y=i.maxSize,_0x55fe0c},t.scaleRange=function(){return _0x2341c5.x=i.minScaleX,_0x2341c5.y=i.maxScaleX,_0x2341c5.z=i.minScaleY,_0x2341c5.w=i.maxScaleY,_0x2341c5},t.angleRange=function(){return _0x21a40c.x=i.minAngularSpeed,_0x21a40c.y=i.maxAngularSpeed,_0x21a40c.z=i.minInitialRotation,_0x21a40c.w=i.maxInitialRotation,_0x21a40c},t.gravity=function(){return i.gravity},t.sizeGradientSampler=function(){return e$2b(i._sizeGradientsTexture)?i._sizeGradientsTexture:i._context.defaultTexture},t.angularSpeedGradientSampler=function(){return e$2b(i._angularSpeedGradientsTexture)?i._angularSpeedGradientsTexture:i._context.defaultTexture},t.velocityGradientSampler=function(){return e$2b(i._velocityGradientsTexture)?i._velocityGradientsTexture:i._context.defaultTexture},t.limitVelocityGradientSampler=function(){return e$2b(i._limitVelocityGradientsTexture)?i._limitVelocityGradientsTexture:i._context.defaultTexture},t.limitVelocityDamping=function(){return i.limitVelocityDamping},t.dragGradientSampler=function(){return e$2b(i._dragGradientsTexture)?i._dragGradientsTexture:i._context.defaultTexture},this.particleEmitterType&&this.particleEmitterType.applyToShader(t),t.cellInfos=function(){return _0x54a610.x=i.startSpriteCellID,_0x54a610.y=i.endSpriteCellID,_0x54a610.z=i.spriteCellChangeSpeed,_0x54a610},t.noiseSampler=function(){return e$2b(i.noiseTexture)?i.noiseTexture:i._context.defaultTexture},t.noiseStrength=function(){return i.noiseStrength},this.emitter.position){var n=this.emitter;e=n.getWorldMatrix()}else{var r=this.emitter;e=p$1d.fromTranslation(r)}t.emitterWM=function(){return e},this._updateUniformMap=t},_0x326310.prototype._createRenderUniformMap=function(){var e,t={},i=this;if(t.diffuseSampler=function(){return e$2b(i.particleTexture)?i.particleTexture:i._context.defaultTexture},t.translationPivot=function(){return i.translationPivot},t.worldOffset=function(){return i.worldOffset},this.emitter.position){var n=this.emitter;e=n.getWorldMatrix()}else{var r=this.emitter;e=p$1d.fromTranslation(r)}t.emitterWM=function(){return e},t.colorGradientSampler=function(){return e$2b(i._colorGradientsTexture)?i._colorGradientsTexture:i._context.defaultTexture},t.colorDead=function(){return i.colorDead},t.sheetInfos=function(){return _0x20667b.x=i.spriteCellWidth/baseSize.width,_0x20667b.y=i.spriteCellHeight/baseSize.height,_0x20667b.z=i.width/baseSize.spriteCellWidth,_0x20667b},this._renderUniformMap=t},_0x326310.prototype._createDrawCommand=function(){this._boundingVolume=new i$1c,this._createRenderUniformMap(),this._createUpdateUniformMap();var e=new i$_({primitiveType:W$18.TRIANGLE_FAN,modelMatrix:this._modelMatrx,boundingVolume:this._boundingVolume,pass:Le$s.OPAQUE,cull:!1});e.castShadows=!1,e.receiveShadows=!1,e.selectCastShadows=!1,e.uniformMap=this._renderUniformMap,this._drawCommand=e;var t=new i$_({primitiveType:W$18.POINTS,modelMatrix:this._modelMatrx,boundingVolume:this._boundingVolume,pass:Le$s.OPAQUE,cull:!1});t.castShadows=!1,t.receiveShadows=!1,t.selectCastShadows=!1,t.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,blending:!1}),t.uniformMap=this._updateUniformMap,this._updateCommand=t,this._transformFeedback=new s$i({context:this._context,primitiveType:W$18.POINTS}),this._updateCommand.transformFeedback=this._transformFeedback};var _0x134623=(_0x10ac7f=!0,function(e,t){var i=_0x10ac7f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x10ac7f=!1,i}),_0x5df2f4=_0x134623(void 0,(function(){return _0x5df2f4.toString().search("(((.+)+)+)+$").toString().constructor(_0x5df2f4).search("(((.+)+)+)+$")})),_0x10ac7f;function _0x15de7e(e){this.particleSystem=e,this.position=new o$1p(0,0,0),this.direction=new o$1p(0,0,0),this.color=new e$1U(0,0,0,0),this.colorStep=new e$1U(0,0,0,0),this.lifeTime=1,this.age=0,this.size=0,this.scale=new o$1o(1,1),this.angle=0,this.angularSpeed=0,this.cellIndex=0,this._attachedSubEmitters=null,this._currentColor1=new e$1U(0,0,0,0),this._currentColor2=new e$1U(0,0,0,0),this._currentSize1=0,this._currentSize2=0,this._currentAngularSpeed1=0,this._currentAngularSpeed2=0,this._currentVelocity1=0,this._currentVelocity2=0,this._currentLimitVelocity1=0,this._currentLimitVelocity2=0,this._currentDrag1=0,this._currentDrag2=0,this.id=_0x15de7e._Count++,this.particleSystem.isAnimationSheetEnabled&&this.updateCellInfoFromSystem()}_0x5df2f4(),_0x15de7e.prototype.updateCellInfoFromSystem=function(){this.cellIndex=this.particleSystem.startSpriteCellID},_0x15de7e.prototype.updateCellIndex=function(){var e=this.age,t=this.particleSystem.spriteCellChangeSpeed;this.particleSystem.spriteRandomStartCell&&(void 0===this._randomCellOffset&&(this._randomCellOffset=Math.random()*this.lifeTime),0===t?(t=1,e=this._randomCellOffset):e+=this._randomCellOffset);var i=this._initialEndSpriteCellID-this._initialStartSpriteCellID,n=_0x2c1e2b.Clamp(e*t%this.lifeTime/this.lifeTime);this.cellIndex=this._initialStartSpriteCellID+n*i|0};var _0x317e3c=new o$1p;_0x15de7e.prototype._inheritParticleInfoToSubEmitter=function(e){if(e.particleSystem.emitter.position){var t=e.particleSystem.emitter;if(o$1p.clone(this.position,t.position),e.inheritDirection){var i=_0x317e3c;o$1p.normalize(this.direction,i),t.setDirection(i,0,Math.PI/2)}}else{var n=e.particleSystem.emitter;o$1p.clone(this.position,n)}o$1p.multiplyByScalar(this.direction,e.inheritedVelocityAmount/2,_0x317e3c),o$1p.clone(_0x317e3c,e.particleSystem._inheritedVelocityOffset)},_0x15de7e.prototype._inheritParticleInfoToSubEmitters=function(){var e=this;this._attachedSubEmitters&&this._attachedSubEmitters.length>0&&this._attachedSubEmitters.forEach((function(t){e._inheritParticleInfoToSubEmitter(t)}))},_0x15de7e.prototype._reset=function(){this.age=0,this.id=_0x15de7e._Count++,this._currentColorGradient=null,this._currentSizeGradient=null,this._currentAngularSpeedGradient=null,this._currentVelocityGradient=null,this._currentLimitVelocityGradient=null,this._currentDragGradient=null,this.cellIndex=this.particleSystem.startSpriteCellID,this._randomCellOffset=void 0},_0x15de7e.prototype.copyTo=function(e){e.position=o$1p.clone(this.position,e.position),this._initialDirection?e._initialDirection=o$1p.clone(this._initialDirection,e._initialDirection):e._initialDirection=null,e.direction=o$1p.clone(this.direction,e.direction),this._localPosition&&(e._localPosition=o$1p.clone(this._localPosition,e._localPosition)),e.color=e$1U.clone(this.color,e.color),e.colorStep=e$1U.clone(this.colorStep,e.colorStep),e.lifeTime=this.lifeTime,e.age=this.age,e._randomCellOffset=this._randomCellOffset,e.size=this.size,e.scale=o$1o.clone(this.scale,e.scale),e.angle=this.angle,e.angularSpeed=this.angularSpeed,e.particleSystem=this.particleSystem,e.cellIndex=this.cellIndex,e.id=this.id,e._attachedSubEmitters=this._attachedSubEmitters,this._currentColorGradient&&(e._currentColorGradient=this._currentColorGradient,e._currentColor1=e$1U.clone(this._currentColor1,e._currentColor1),e._currentColor2=e$1U.clone(this._currentColor2,e._currentColor2)),this._currentSizeGradient&&(e._currentSizeGradient=this._currentSizeGradient,e._currentSize1=this._currentSize1,e._currentSize2=this._currentSize2),this._currentAngularSpeedGradient&&(e._currentAngularSpeedGradient=this._currentAngularSpeedGradient,e._currentAngularSpeed1=this._currentAngularSpeed1,e._currentAngularSpeed2=this._currentAngularSpeed2),this._currentVelocityGradient&&(e._currentVelocityGradient=this._currentVelocityGradient,e._currentVelocity1=this._currentVelocity1,e._currentVelocity2=this._currentVelocity2),this._currentLimitVelocityGradient&&(e._currentLimitVelocityGradient=this._currentLimitVelocityGradient,e._currentLimitVelocity1=this._currentLimitVelocity1,e._currentLimitVelocity2=this._currentLimitVelocity2),this._currentDragGradient&&(e._currentDragGradient=this._currentDragGradient,e._currentDrag1=this._currentDrag1,e._currentDrag2=this._currentDrag2),this.particleSystem.isAnimationSheetEnabled&&(e._initialStartSpriteCellID=this._initialStartSpriteCellID,e._initialEndSpriteCellID=this._initialEndSpriteCellID),this.particleSystem.useRampGradients&&(e.remapData&&this.remapData?e$29.clone(this.remapData,e.remapData):e.remapData=new e$29(0,0,0,0)),this._randomNoiseCoordinates1&&(e._randomNoiseCoordinates1=o$1p.clone(this._randomNoiseCoordinates1,e._randomNoiseCoordinates1),e._randomNoiseCoordinates2=o$1p.clone(this._randomNoiseCoordinates2,e._randomNoiseCoordinates2))},_0x15de7e._Count=0;var _0x464a98="attribute vec3 position;\nattribute vec4 color;\nattribute float angle;\nattribute vec2 size;\n#ifdef ANIMATESHEET\nattribute float cellIndex;\n#endif\n#ifndef BILLBOARD\nattribute vec3 direction;\n#endif\n#ifdef BILLBOARDSTRETCHED\nattribute vec3 direction;\n#endif\n#ifdef RAMPGRADIENT\nattribute vec4 remapData;\n#endif\nattribute vec2 offset;\nuniform vec2 translationPivot;\n#ifdef ANIMATESHEET\nuniform vec3 particlesInfos;\n#endif\nvarying vec2 vUV;\nvarying vec4 vColor;\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\n#endif\nvec3 rotate(vec3 yaxis, vec3 rotatedCorner) {\nvec3 xaxis = normalize(cross(vec3(0., 1.0, 0.), yaxis));\nvec3 zaxis = normalize(cross(yaxis, xaxis));\nvec3 row0 = vec3(xaxis.x, xaxis.y, xaxis.z);\nvec3 row1 = vec3(yaxis.x, yaxis.y, yaxis.z);\nvec3 row2 = vec3(zaxis.x, zaxis.y, zaxis.z);\nmat3 rotMatrix = mat3(row0, row1, row2);\nvec3 alignedCorner = rotMatrix * rotatedCorner;\nreturn position + alignedCorner;\n}\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera, vec3 rotatedCorner) {\nvec3 normalizedToCamera = normalize(toCamera);\nvec3 normalizedCrossDirToCamera = normalize(cross(normalize(direction), normalizedToCamera));\nvec3 crossProduct = normalize(cross(normalizedToCamera, normalizedCrossDirToCamera));\nvec3 row0 = vec3(normalizedCrossDirToCamera.x, normalizedCrossDirToCamera.y, normalizedCrossDirToCamera.z);\nvec3 row1 = vec3(crossProduct.x, crossProduct.y, crossProduct.z);\nvec3 row2 = vec3(normalizedToCamera.x, normalizedToCamera.y, normalizedToCamera.z);\nmat3 rotMatrix = mat3(row0, row1, row2);\nvec3 alignedCorner = rotMatrix * rotatedCorner;\nreturn position + alignedCorner;\n}\n#endif\nvoid main() {\nvec2 cornerPos = (vec2(offset.x - 0.5, offset.y - 0.5) - translationPivot) * size + translationPivot;\n#ifdef BILLBOARD\nvec3 rotatedCorner;\n#ifdef BILLBOARDY\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.z = 0.;\nvec3 oriViewPos = (czm_modelView * vec4(position, 1.0)).xyz;\nvec3 yaxis = oriViewPos;\nyaxis.y = 0.;\nvec3 vPositionCorner = rotate(normalize(yaxis), rotatedCorner);\nvec3 viewPos = (czm_modelView * vec4(vPositionCorner, 1.0)).xyz;\n#elif defined(BILLBOARDSTRETCHED)\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.z = 0.;\nvec3 oriViewPos = (czm_modelView * vec4(position, 1.0)).xyz;\nvec3 toCamera = oriViewPos;\nvec3 vPositionCorner = rotateAlign(toCamera, rotatedCorner);\nvec3 viewPos = (czm_modelView * vec4(vPositionCorner, 1.0)).xyz;\n#else\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.z = 0.;\nvec3 viewPos = (czm_modelView * vec4(position, 1.0)).xyz + rotatedCorner;\n#endif // BILLBOARDY\n#ifdef RAMPGRADIENT\nremapRanges = remapData;\n#endif\ngl_Position = czm_projection * vec4(viewPos, 1.0);\n#else\nvec3 rotatedCorner;\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.z = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.y = 0.;\nvec3 yaxis = normalize(direction);\nvec3 vPositionW = rotate(yaxis, rotatedCorner);\ngl_Position = czm_modelViewProjection * vec4(vPositionW, 1.0);\n#endif // BILLBOARD\nvColor = color;\n#ifdef ANIMATESHEET\nfloat rowOffset = floor(cellIndex * particlesInfos.z);\nfloat columnOffset = cellIndex - rowOffset / particlesInfos.z;\nvec2 uvScale = particlesInfos.xy;\nvec2 uvOffset = vec2(offset.x , 1.0 - offset.y);\nvUV = (uvOffset + vec2(columnOffset, rowOffset)) * uvScale;\n#else\nvUV = offset;\n#endif\n}\n",_0xd79fc7="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec2 vUV;\nvarying vec4 vColor;\nuniform vec4 textureMask;\nuniform sampler2D diffuseSampler;\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\nuniform sampler2D rampSampler;\n#endif\nvoid main() {\nvec4 textureColor = texture2D(diffuseSampler, vUV);\nvec4 baseColor = textureColor * vColor;\n#ifdef RAMPGRADIENT\nfloat alpha = baseColor.a;\nfloat remappedColorIndex = clamp((alpha - remapRanges.x) / remapRanges.y, 0.0, 1.0);\nvec4 rampColor = texture2D(rampSampler, vec2(1.0 - remappedColorIndex, 0.));\nbaseColor.rgb *= rampColor.rgb;\nfloat finalAlpha = baseColor.a;\nbaseColor.a = clamp((alpha * rampColor.a - remapRanges.z) / remapRanges.w, 0.0, 1.0);\n#endif\n#ifdef BLENDMULTIPLYMODE\nfloat sourceAlpha = vColor.a * textureColor.a;\nbaseColor.rgb = baseColor.rgb * sourceAlpha + vec3(1.0) * (1.0 - sourceAlpha);\n#endif\nbaseColor = czm_gammaCorrect(baseColor);\ngl_FragColor = baseColor;\n}\n",_0x2db8ae=(_0x137775=!0,function(e,t){var i=_0x137775?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x137775=!1,i}),_0x4635dc=_0x2db8ae(void 0,(function(){return _0x4635dc.toString().search("(((.+)+)+)+$").toString().constructor(_0x4635dc).search("(((.+)+)+)+$")})),_0x137775;function _0x40adc0(e){void 0===e&&(e=null),this._indices=null,this._positions=null,this._normals=null,this._storedNormal=new o$1p(0,0,0),this._mesh=null,this.direction1=new o$1p(0,1,0),this.direction2=new o$1p(0,1,0),this.useMeshNormalsForDirection=!0,this.mesh=e}_0x4635dc(),Object.defineProperty(_0x40adc0.prototype,"mesh",{get:function(){return this._mesh},set:function(e){this._mesh!==e&&(this._mesh=e,e?(this._indices=e.getIndices(),this._positions=e.getVerticesData(),this._normals=e.getVerticesData()):(this._indices=null,this._positions=null,this._normals=null))},enumerable:!1,configurable:!0});var _0x3efe85=new o$1p;_0x40adc0.prototype.startDirectionFunction=function(e,t,i,n){if(this.useMeshNormalsForDirection&&this._normals)p$1d.multiplyByDirection(e,this._storedNormal,t);else{var r=_0x2c1e2b.RandomRange(this.direction1.x,this.direction2.x),o=_0x2c1e2b.RandomRange(this.direction1.y,this.direction2.y),a=_0x2c1e2b.RandomRange(this.direction1.z,this.direction2.z);if(n)return t.x=r,t.y=o,void(t.z=a);_0x3efe85.x=r,_0x3efe85.y=o,_0x3efe85.z=a,p$1d.multiplyByDirection(e,_0x3efe85,t)}};var _0x5cf78f=new o$1p,_0x4a2825=new o$1p,_0x50a104=new o$1p,_0x2e7827=new o$1p;_0x40adc0.prototype.startPositionFunction=function(e,t,i,n){if(this._indices&&this._positions){var r=3*Math.random()*(this._indices.length/3)|0,o=Math.random(),a=Math.random()*(1-o),s=1-o-a,l=this._indices[r],u=this._indices[r+1],c=this._indices[r+2];o$1p.unpack(this._positions,3*l,_0x5cf78f),o$1p.unpack(this._positions,3*u,_0x4a2825),o$1p.unpack(this._positions,3*c,_0x50a104),_0x2e7827.x=o*_0x5cf78f.x+a*_0x4a2825.x+s*_0x50a104.x,_0x2e7827.y=o*_0x5cf78f.y+a*_0x4a2825.y+s*_0x50a104.y,_0x2e7827.z=o*_0x5cf78f.z+a*_0x4a2825.z+s*_0x50a104.z,n?o$1p.clone(_0x2e7827,t):p$1d.multiplyByPoint(e,_0x2e7827,t),this.useMeshNormalsForDirection&&this._normals&&(o$1p.unpack(this._normals,3*l,_0x5cf78f),o$1p.unpack(this._normals,3*u,_0x4a2825),o$1p.unpack(this._normals,3*c,_0x50a104),this._storedNormal.x=o*_0x5cf78f.x+a*_0x4a2825.x+s*_0x50a104.x,this._storedNormal.y=o*_0x5cf78f.y+a*_0x4a2825.y+s*_0x50a104.y,this._storedNormal.z=o*_0x5cf78f.z+a*_0x4a2825.z+s*_0x50a104.z)}},_0x40adc0.prototype.clone=function(){var e=new _0x40adc0(this.mesh);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x40adc0.prototype.applyToShader=function(e){var t=this;e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x40adc0.prototype.getEffectDefines=function(){},_0x40adc0.prototype.getClassName=function(){return"MeshParticleEmitter"},_0x40adc0.prototype.serialize=function(){var e,t={};return t.type=this.getClassName(),t.direction1=this.direction1.asArray(),t.direction2=this.direction2.asArray(),t.meshId=null===(e=this.mesh)||void 0===e?void 0:e.id,t.useMeshNormalsForDirection=this.useMeshNormalsForDirection,t},_0x40adc0.prototype.parse=function(e){o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2),e.meshId,this.useMeshNormalsForDirection=e.useMeshNormalsForDirection};var _0x27a235=(_0x4f8696=!0,function(e,t){var i=_0x4f8696?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f8696=!1,i}),_0x5c9b4c=_0x27a235(void 0,(function(){return _0x5c9b4c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c9b4c).search("(((.+)+)+)+$")})),_0x4f8696;_0x5c9b4c();var _0x46d900={ATTACHED:0,END:1},_0x536d2c=Object.freeze(_0x46d900),_0x2fb40c=(_0x481618=!0,function(e,t){var i=_0x481618?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x481618=!1,i}),_0x2dbf3b=_0x2fb40c(void 0,(function(){return _0x2dbf3b.toString().search("(((.+)+)+)+$").toString().constructor(_0x2dbf3b).search("(((.+)+)+)+$")})),_0x481618;function _0x1e1355(e){this.particleSystem=e,this.type=_0x536d2c.END,this.inheritDirection=!1,this.inheritedVelocityAmount=0,(!e.emitter||!e.emitter.dispose)&&(e.emitter=new _0xdbdb64("SubemitterSystemEmitter",e.getScene()))}_0x2dbf3b(),_0x1e1355.prototype.clone=function(){var e=this.particleSystem.emitter;e?e instanceof o$1p?e=e.clone():e instanceof _0xdbdb64&&((e=new _0xdbdb64).isVisible=!1):e=new o$1p;var t=new _0x1e1355(this.particleSystem.clone("",e));return t.particleSystem.name+="Clone",t.type=this.type,t.inheritDirection=this.inheritDirection,t.inheritedVelocityAmount=this.inheritedVelocityAmount,t.particleSystem._disposeEmitterOnDispose=!0,t.particleSystem.disposeOnStop=!0,t},_0x1e1355.prototype.serialize=function(){var e={};return e.type=this.type,e.inheritDirection=this.inheritDirection,e.inheritedVelocityAmount=this.inheritedVelocityAmount,e.particleSystem=this.particleSystem.serialize(),e},_0x1e1355._ParseParticleSystem=function(e,t,i){return _0x2fb622.Parse(e,t,i,!0)},_0x1e1355.Parse=function(e,t,i){var n=e.particleSystem,r=new _0x1e1355(_0x1e1355._ParseParticleSystem(n,t,i));return r.type=e.type,r.inheritDirection=e.inheritDirection,r.inheritedVelocityAmount=e.inheritedVelocityAmount,r.particleSystem._isSubEmitter=!0,r},_0x1e1355.prototype.destroy=function(){this.particleSystem.destroy()};var _0x351d40=(_0x7e4ac8=!0,function(e,t){var i=_0x7e4ac8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x7e4ac8=!1,i}),_0xa37f23=_0x351d40(void 0,(function(){return _0xa37f23.toString().search("(((.+)+)+)+$").toString().constructor(_0xa37f23).search("(((.+)+)+)+$")})),_0x7e4ac8;function _0x2fb622(e,t,i,n,r,o){void 0===n&&(n=null),void 0===r&&(r=!1),void 0===o&&(o=.01);var a=_0x36dee7.call(this,e)||this;return a._scene=i,a._context=i._context,a._modelMatrx=p$1d.IDENTITY,a._inheritedVelocityOffset=new o$1p,a._particles=new Array,a._stockParticles=new Array,a._newPartsExcess=0,a._scaledColorStep=new e$1U(0,0,0,0),a._colorDiff=new e$1U(0,0,0,0),a._scaledDirection=new o$1p(0,0,0),a._scaledGravity=new o$1p(0,0,0),a._currentRenderId=-1,a._useInstancing=!1,a._started=!1,a._stopped=!1,a._actualFrame=0,a._currentEmitRate1=0,a._currentEmitRate2=0,a._currentStartSize1=0,a._currentStartSize2=0,a._rawTextureWidth=256,a._useRampGradients=!1,a._disposeEmitterOnDispose=!1,a.isLocal=!1,a._onBeforeDrawParticlesObservable=null,a.recycleParticle=function(e){var t=a._particles.pop();t!==e&&t.copyTo(e),a._stockParticles.push(t)},a._createParticle=function(){var e;if(0!==a._stockParticles.length?(e=a._stockParticles.pop())._reset():e=new _0x15de7e(a),a._subEmitters&&a._subEmitters.length>0){var t=a._subEmitters[Math.floor(Math.random()*a._subEmitters.length)];e._attachedSubEmitters=[],t.forEach((function(t){if(t.type===_0x536d2c.ATTACHED){var i=t.clone();e._attachedSubEmitters.push(i),i.particleSystem.start()}}))}return e},a._emitFromParticle=function(e){if(a._subEmitters&&0!==a._subEmitters.length){var t=Math.floor(Math.random()*a._subEmitters.length);a._subEmitters[t].forEach((function(t){if(t.type===_0x536d2c.END){var i=t.clone();e._inheritParticleInfoToSubEmitter(i),i.particleSystem._rootParticleSystem=a,a.activeSubSystems.push(i.particleSystem),i.particleSystem.start()}}))}},a._capacity=t,a._epsilon=o,a._isAnimationSheetEnabled=r,e$2b(i)&&i.primitives.add(a),a._vertexArrayObject=null,a._customEffect={0:n},a._useInstancing=!0,a._createIndexBuffer(),a._createVertexBuffers(),a.particleEmitterType=new _0x419949,a.updateFunction=function(e){var t=null,i=null;a.noiseTexture&&(t=a.noiseTexture.getSize(),i=a.noiseTexture.getContent());for(var n,r=function(){n=e[o];var r=a._scaledUpdateSpeed,s=n.age;if(n.age+=r,n.age>n.lifeTime){var l=n.age-s;r=(n.lifeTime-s)*r/l,n.age=n.lifeTime}var u=n.age/n.lifeTime;a._colorGradients&&a._colorGradients.length>0?_0xf6a90a.GetCurrentGradient(u,a._colorGradients,(function(e,t,i){e!==n._currentColorGradient&&(e$1U.clone(n._currentColor2,n._currentColor1),t.getColorToRef(n._currentColor2),n._currentColorGradient=e),e$1U.lerp(n._currentColor1,n._currentColor2,i,n.color)})):(e$1U.multiplyByScalar(n.colorStep,r,a._scaledColorStep),e$1U.add(n.color,a._scaledColorStep,n.color),n.color.a<0&&(n.color.a=0)),a._angularSpeedGradients&&a._angularSpeedGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._angularSpeedGradients,(function(e,t,i){e!==n._currentAngularSpeedGradient&&(n._currentAngularSpeed1=n._currentAngularSpeed2,n._currentAngularSpeed2=t.getFactor(),n._currentAngularSpeedGradient=e),n.angularSpeed=_0x2c1e2b.Lerp(n._currentAngularSpeed1,n._currentAngularSpeed2,i)})),n.angle+=n.angularSpeed*r;var c=r;if(a._velocityGradients&&a._velocityGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._velocityGradients,(function(e,t,i){e!==n._currentVelocityGradient&&(n._currentVelocity1=n._currentVelocity2,n._currentVelocity2=t.getFactor(),n._currentVelocityGradient=e),c*=_0x2c1e2b.Lerp(n._currentVelocity1,n._currentVelocity2,i)})),o$1p.multiplyByScalar(n.direction,c,a._scaledDirection),a._limitVelocityGradients&&a._limitVelocityGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._limitVelocityGradients,(function(e,t,i){e!==n._currentLimitVelocityGradient&&(n._currentLimitVelocity1=n._currentLimitVelocity2,n._currentLimitVelocity2=t.getFactor(),n._currentLimitVelocityGradient=e);var r=_0x2c1e2b.Lerp(n._currentLimitVelocity1,n._currentLimitVelocity2,i);o$1p.magnitude(n.direction)>r&&o$1p.multiplyByScalar(n.direction,a.limitVelocityDamping,n.direction)})),a._dragGradients&&a._dragGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._dragGradients,(function(e,t,i){e!==n._currentDragGradient&&(n._currentDrag1=n._currentDrag2,n._currentDrag2=t.getFactor(),n._currentDragGradient=e);var r=_0x2c1e2b.Lerp(n._currentDrag1,n._currentDrag2,i);o$1p.multiplyByScalar(a._scaledDirection,1-r,a._scaledDirection)})),a.isLocal&&n._localPosition?(o$1p.add(n._localPosition,a._scaledDirection,n._localPosition),p$1d.multiplyByPoint(a._emitterWorldMatrix,n._localPosition,n.position)):o$1p.add(n.position,a._scaledDirection,n.position),i&&t&&n._randomNoiseCoordinates1){var h=a._fetchR(n._randomNoiseCoordinates1.x,n._randomNoiseCoordinates1.y,t.width,t.height,i),d=a._fetchR(n._randomNoiseCoordinates1.z,n._randomNoiseCoordinates2.x,t.width,t.height,i),f=a._fetchR(n._randomNoiseCoordinates2.y,n._randomNoiseCoordinates2.z,t.width,t.height,i),p=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Vector3[0],_=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Vector3[1];p.x=(2*h-1)*a.noiseStrength.x,p.y=(2*d-1)*a.noiseStrength.y,p.z=(2*f-1)*a.noiseStrength.z,o$1p.multiplyByScalar(p,r,_),o$1p.add(n.direction,_,n.direction)}if(o$1p.multiplyByScalar(a.gravity,r,a._scaledGravity),o$1p.add(n.direction,a._scaledGravity,n.direction),a._sizeGradients&&a._sizeGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._sizeGradients,(function(e,t,i){e!==n._currentSizeGradient&&(n._currentSize1=n._currentSize2,n._currentSize2=t.getFactor(),n._currentSizeGradient=e),n.size=_0x2c1e2b.Lerp(n._currentSize1,n._currentSize2,i)})),a._useRampGradients&&(a._colorRemapGradients&&a._colorRemapGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._colorRemapGradients,(function(e,t,i){var r=_0x2c1e2b.Lerp(e.factor1,t.factor1,i),o=_0x2c1e2b.Lerp(e.factor2,t.factor2,i);n.remapData.x=r,n.remapData.y=o-r})),a._alphaRemapGradients&&a._alphaRemapGradients.length>0&&_0xf6a90a.GetCurrentGradient(u,a._alphaRemapGradients,(function(e,t,i){var r=_0x2c1e2b.Lerp(e.factor1,t.factor1,i),o=_0x2c1e2b.Lerp(e.factor2,t.factor2,i);n.remapData.z=r,n.remapData.w=o-r}))),a._isAnimationSheetEnabled&&n.updateCellIndex(),n._inheritParticleInfoToSubEmitters(),n.age>=n.lifeTime)return a._emitFromParticle(n),n._attachedSubEmitters&&(n._attachedSubEmitters.forEach((function(e){e.particleSystem.disposeOnStop=!0,e.particleSystem.stop()})),n._attachedSubEmitters=null),a.recycleParticle(n),o--,"continue"},o=0;o<e.length;o++)r()},a}_0xa37f23(),_0x2fb622.prototype=Object.create(_0x36dee7.prototype),_0x2fb622.prototype.constructor=_0x36dee7,Object.defineProperties(_0x2fb622.prototype,{onDispose:{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}},useRampGradients:{get:function(){return this._useRampGradients},set:function(e){this._useRampGradients!==e&&(this._useRampGradients=e,this._resetEffect())}},particles:{get:function(){return this._particles}},modelMatrix:{get:function(){return this._modelMatrx},set:function(e){if(this._modelMatrx!==e&&(this._modelMatrx=e,this.subEmitters&&this.subEmitters.length))for(var t=0;t<this.subEmitters.length;t++)for(var i=0,n=this.subEmitters[t];i<n.length;i++){n[i].particleSystem.modelMatrix=e}}}}),_0x2fb622.prototype.getActiveCount=function(){return this._particles.length},_0x2fb622.prototype.getClassName=function(){return"ParticleSystem"},_0x2fb622.prototype.isStopping=function(){return this._stopped&&this.isAlive()},_0x2fb622.prototype.getCustomEffect=function(e){var t;return void 0===e&&(e=0),null!==(t=this._customEffect[e])&&void 0!==t?t:this._customEffect[0]},_0x2fb622.prototype.setCustomEffect=function(e,t){void 0===t&&(t=0),this._customEffect[t]=e},_0x2fb622.prototype._addFactorGradient=function(e,t,i,n){var r=new _0x28226b(t,i,n);e.push(r),e.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}))},_0x2fb622.prototype._removeFactorGradient=function(e,t){if(e)for(var i=0,n=0,r=e;n<r.length;n++){if(r[n].gradient===t){e.splice(i,1);break}i++}},_0x2fb622.prototype.addLifeTimeGradient=function(e,t,i){return this._lifeTimeGradients||(this._lifeTimeGradients=[]),this._addFactorGradient(this._lifeTimeGradients,e,t,i),this},_0x2fb622.prototype.removeLifeTimeGradient=function(e){return this._removeFactorGradient(this._lifeTimeGradients,e),this},_0x2fb622.prototype.addSizeGradient=function(e,t,i){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t,i),this},_0x2fb622.prototype.removeSizeGradient=function(e){return this._removeFactorGradient(this._sizeGradients,e),this},_0x2fb622.prototype.addColorRemapGradient=function(e,t,i){return this._colorRemapGradients||(this._colorRemapGradients=[]),this._addFactorGradient(this._colorRemapGradients,e,t,i),this},_0x2fb622.prototype.removeColorRemapGradient=function(e){return this._removeFactorGradient(this._colorRemapGradients,e),this},_0x2fb622.prototype.addAlphaRemapGradient=function(e,t,i){return this._alphaRemapGradients||(this._alphaRemapGradients=[]),this._addFactorGradient(this._alphaRemapGradients,e,t,i),this},_0x2fb622.prototype.removeAlphaRemapGradient=function(e){return this._removeFactorGradient(this._alphaRemapGradients,e),this},_0x2fb622.prototype.addAngularSpeedGradient=function(e,t,i){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t,i),this},_0x2fb622.prototype.removeAngularSpeedGradient=function(e){return this._removeFactorGradient(this._angularSpeedGradients,e),this},_0x2fb622.prototype.addVelocityGradient=function(e,t,i){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t,i),this},_0x2fb622.prototype.removeVelocityGradient=function(e){return this._removeFactorGradient(this._velocityGradients,e),this},_0x2fb622.prototype.addLimitVelocityGradient=function(e,t,i){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t,i),this},_0x2fb622.prototype.removeLimitVelocityGradient=function(e){return this._removeFactorGradient(this._limitVelocityGradients,e),this},_0x2fb622.prototype.addDragGradient=function(e,t,i){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t,i),this},_0x2fb622.prototype.removeDragGradient=function(e){return this._removeFactorGradient(this._dragGradients,e),this},_0x2fb622.prototype.addEmitRateGradient=function(e,t,i){return this._emitRateGradients||(this._emitRateGradients=[]),this._addFactorGradient(this._emitRateGradients,e,t,i),this},_0x2fb622.prototype.removeEmitRateGradient=function(e){return this._removeFactorGradient(this._emitRateGradients,e),this},_0x2fb622.prototype.addStartSizeGradient=function(e,t,i){return this._startSizeGradients||(this._startSizeGradients=[]),this._addFactorGradient(this._startSizeGradients,e,t,i),this},_0x2fb622.prototype.removeStartSizeGradient=function(e){return this._removeFactorGradient(this._startSizeGradients,e),this};var _0x24482b=new e$1U;_0x2fb622.prototype._createRampGradientTexture=function(){if(this._rampGradients&&this._rampGradients.length&&!this._rampGradientsTexture){for(var e=new Uint8Array(4*this._rawTextureWidth),t=_0x24482b,i=0;i<this._rawTextureWidth;i++){var n=i/this._rawTextureWidth;_0xf6a90a.GetCurrentGradient(n,this._rampGradients,(function(n,r,o){e$1U.lerp(n.color,r.color,o,t),e[4*i]=255*t.red,e[4*i+1]=255*t.green,e[4*i+2]=255*t.blue,e[4*i+3]=255}))}this._rampGradientsTexture=new t$V({context:this._context,width:this._rawTextureWidth,height:1,source:{arrayBufferView:e},pixelFormat:V$10.RGBA,flipY:!1})}},_0x2fb622.prototype.getRampGradients=function(){return this._rampGradients},_0x2fb622.prototype.forceRefreshGradients=function(){this._syncRampGradientTexture()},_0x2fb622.prototype._syncRampGradientTexture=function(){!this._rampGradients||(this._rampGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this._rampGradientsTexture&&(this._rampGradientsTexture.destroy(),this._rampGradientsTexture=null),this._createRampGradientTexture())},_0x2fb622.prototype.addRampGradient=function(e,t){this._rampGradients||(this._rampGradients=[]);var i=new _0x48c0c2(e,t);return this._rampGradients.push(i),this._syncRampGradientTexture(),this},_0x2fb622.prototype.removeRampGradient=function(e){return this._removeGradientAndTexture(e,this._rampGradients,this._rampGradientsTexture),this._rampGradientsTexture=null,this._rampGradients&&this._rampGradients.length>0&&this._createRampGradientTexture(),this},_0x2fb622.prototype.addColorGradient=function(e,t,i){this._colorGradients||(this._colorGradients=[]);var n=new _0x43ab59(e,t,i);return this._colorGradients.push(n),this._colorGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this},_0x2fb622.prototype.removeColorGradient=function(e){if(!this._colorGradients)return this;for(var t=0,i=0,n=this._colorGradients;i<n.length;i++){if(n[i].gradient===e){this._colorGradients.splice(t,1);break}t++}return this},_0x2fb622.prototype._fetchR=function(e,t,i,n,r){return r[4*(((e=.5*Math.abs(e)+.5)*i%i|0)+((t=.5*Math.abs(t)+.5)*n%n|0)*i)]/255},_0x2fb622.prototype._reset=function(){this._resetEffect()},_0x2fb622.prototype._resetEffect=function(){e$2b(this._drawCommand)&&(this._drawCommand.vertexArray=null),this._vertexArray&&!this._vertexArray.isDestroyed()&&this._vertexArray.destroy(),this._createIndexBuffer(),this._createVertexBuffers()},_0x2fb622.prototype._createVertexBuffers=function(){var e={},t=[],i=0;e.offset=i++;var n=new Float32Array([0,0,1,0,1,1,0,1]);this._spriteBuffer=t$Y.createVertexBuffer({context:this._context,typedArray:n,usage:A$19.STATIC_DRAW}),t.push({name:"offset",index:e.offset,vertexBuffer:this._spriteBuffer,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:2*S$12.getSizeInBytes(S$12.FLOAT),normalize:!1}),this._vertexBufferSize=10,this._isAnimationSheetEnabled&&(this._vertexBufferSize+=1),(!this._isBillboardBased||this.billboardMode===_0x29b01c.BILLBOARDMODE_STRETCHED)&&(this._vertexBufferSize+=3),this._useRampGradients&&(this._vertexBufferSize+=4),this._vertexData=new Float32Array(this._capacity*this._vertexBufferSize),this._vertexBuffer=t$Y.createVertexBuffer({context:this._context,sizeInBytes:this._vertexData.byteLength,usage:A$19.STATIC_DRAW});var r=S$12.getSizeInBytes(S$12.FLOAT),o=this._vertexBufferSize*r,a=0;e.position=i++,t.push({name:"position",index:e.position,vertexBuffer:this._vertexBuffer,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=3,e.color=i++,t.push({name:"color",index:e.color,vertexBuffer:this._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=4,e.angle=i++,t.push({name:"angle",index:e.angle,vertexBuffer:this._vertexBuffer,componentsPerAttribute:1,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=1,e.size=i++,t.push({name:"size",index:e.size,vertexBuffer:this._vertexBuffer,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=2,this._isAnimationSheetEnabled&&(e.cellIndex=i++,t.push({name:"cellIndex",index:e.cellIndex,vertexBuffer:this._vertexBuffer,componentsPerAttribute:1,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=1),(!this._isBillboardBased||this.billboardMode===_0x29b01c.BILLBOARDMODE_STRETCHED)&&(e.direction=i++,t.push({name:"direction",index:e.direction,vertexBuffer:this._vertexBuffer,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=3),this._useRampGradients&&(e.remapData=i++,t.push({name:"remapData",index:e.remapData,vertexBuffer:this._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=4),this._attributeLocations=e,this._attributes=t,this._vertexArray=new c$12({context:this._context,attributes:this._attributes,indexBuffer:this._indexBuffer})},_0x2fb622.prototype._createIndexBuffer=function(){var e=new Uint16Array(6),t=0;e[t++]=0,e[t++]=1,e[t++]=2,e[t++]=0,e[t++]=2,e[t++]=3,this._indexBuffer=t$Y.createIndexBuffer({context:this._context,typedArray:e,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})},_0x2fb622.prototype.getCapacity=function(){return this._capacity},_0x2fb622.prototype.isAlive=function(){return this._alive},_0x2fb622.prototype.isStarted=function(){return this._started},_0x2fb622.prototype._prepareSubEmitterInternalArray=function(){var e=this;this._subEmitters=new Array,this.subEmitters&&this.subEmitters.forEach((function(t){t instanceof _0x2fb622?e._subEmitters.push([new _0x1e1355(t)]):t instanceof _0x1e1355?e._subEmitters.push([t]):t instanceof Array&&e._subEmitters.push(t)}))},_0x2fb622.prototype.start=function(e){var t=this;if(void 0===e&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set";if(e)setTimeout((function(){t.start(0)}),e);else{if(this._prepareSubEmitterInternalArray(),this._started=!0,this._stopped=!1,this._actualFrame=0,this._subEmitters&&0!=this._subEmitters.length&&(this.activeSubSystems=new Array),this._emitRateGradients&&(this._emitRateGradients.length>0&&(this._currentEmitRateGradient=this._emitRateGradients[0],this._currentEmitRate1=this._currentEmitRateGradient.getFactor(),this._currentEmitRate2=this._currentEmitRate1),this._emitRateGradients.length>1&&(this._currentEmitRate2=this._emitRateGradients[1].getFactor())),this._startSizeGradients&&(this._startSizeGradients.length>0&&(this._currentStartSizeGradient=this._startSizeGradients[0],this._currentStartSize1=this._currentStartSizeGradient.getFactor(),this._currentStartSize2=this._currentStartSize1),this._startSizeGradients.length>1&&(this._currentStartSize2=this._startSizeGradients[1].getFactor())),this.preWarmCycles){e$2b(this.emitter)&&this.emitter instanceof _0xdbdb64&&this.emitter.computeWorldMatrix(!0);var i=this.noiseTexture;if(i&&i.onGeneratedObservable)i.onGeneratedObservable.addOnce((function(){setTimeout((function(){for(var e=0;e<t.preWarmCycles;e++)t.animate(!0),i.render()}))}));else for(var n=0;n<this.preWarmCycles;n++)this.animate(!0)}this.beginAnimationOnStart&&this.animations&&this.animations.length>0&&this._scene}},_0x2fb622.prototype.stop=function(e){void 0===e&&(e=!0),!this._stopped&&(this._stopped=!0,e&&this._stopSubEmitters())},_0x2fb622.prototype.reset=function(){this._stockParticles=[],this._particles=[]},_0x2fb622.prototype._appendParticleVertex=function(e,t,i,n){var r=e*this._vertexBufferSize;if(this._vertexData[r++]=t.position.x+this.worldOffset.x,this._vertexData[r++]=t.position.y+this.worldOffset.y,this._vertexData[r++]=t.position.z+this.worldOffset.z,this._vertexData[r++]=t.color.red,this._vertexData[r++]=t.color.green,this._vertexData[r++]=t.color.blue,this._vertexData[r++]=t.color.alpha,this._vertexData[r++]=t.angle,this._vertexData[r++]=t.scale.x*t.size,this._vertexData[r++]=t.scale.y*t.size,this._isAnimationSheetEnabled&&(this._vertexData[r++]=t.cellIndex),this._isBillboardBased)this.billboardMode===_0x29b01c.BILLBOARDMODE_STRETCHED&&(this._vertexData[r++]=t.direction.x,this._vertexData[r++]=t.direction.y,this._vertexData[r++]=t.direction.z);else if(t._initialDirection){var o=t._initialDirection;this.isLocal&&p$1d.multiplyByDirection(this._emitterWorldMatrix,o,o),0===o.x&&0===o.z&&(o.x=.001),this._vertexData[r++]=o.x,this._vertexData[r++]=o.y,this._vertexData[r++]=o.z}else{var a=t.direction;this.isLocal&&p$1d.multiplyByDirection(this._emitterWorldMatrix,a,a),0===a.x&&0===a.z&&(a.x=.001),this._vertexData[r++]=a.x,this._vertexData[r++]=a.y,this._vertexData[r++]=a.z}this._useRampGradients&&t.remapData&&(this._vertexData[r++]=t.remapData.x,this._vertexData[r++]=t.remapData.y,this._vertexData[r++]=t.remapData.z,this._vertexData[r++]=t.remapData.w),this._useInstancing||(this._isAnimationSheetEnabled&&(0===i?i=this._epsilon:1===i&&(i=1-this._epsilon),0===n?n=this._epsilon:1===n&&(n=1-this._epsilon)),this._vertexData[r++]=i,this._vertexData[r++]=n)},_0x2fb622.prototype._stopSubEmitters=function(){!this.activeSubSystems||(this.activeSubSystems.forEach((function(e){e.stop(!0)})),this.activeSubSystems=new Array)},_0x2fb622.prototype._removeFromRoot=function(){if(this._rootParticleSystem){var e=this._rootParticleSystem.activeSubSystems.indexOf(this);-1!==e&&this._rootParticleSystem.activeSubSystems.splice(e,1),this._rootParticleSystem=null}},_0x2fb622.prototype._update=function(e){var t=this;if(this._alive=this._particles.length>0,this.emitter.position){var i=this.emitter;this._emitterWorldMatrix=i.getWorldMatrix()}else{var n=this.emitter;this._emitterWorldMatrix=p$1d.fromTranslation(n,this._emitterWorldMatrix)}this.updateFunction(this._particles);for(var r,o,a=function(){if(s._particles.length===s._capacity)return"break";if(r=s._createParticle(),s._particles.push(r),s.targetStopDuration&&s._lifeTimeGradients&&s._lifeTimeGradients.length>0){var e=_0x2c1e2b.Clamp(s._actualFrame/s.targetStopDuration);_0xf6a90a.GetCurrentGradient(e,s._lifeTimeGradients,(function(t,i){var n=t,o=i,a=n.getFactor(),s=o.getFactor(),l=(e-n.gradient)/(o.gradient-n.gradient);r.lifeTime=_0x2c1e2b.Lerp(a,s,l)}))}else r.lifeTime=_0x2c1e2b.RandomRange(s.minLifeTime,s.maxLifeTime);var i=_0x2c1e2b.RandomRange(s.minEmitPower,s.maxEmitPower);if(s.startPositionFunction?s.startPositionFunction(s._emitterWorldMatrix,r.position,r,s.isLocal):s.particleEmitterType.startPositionFunction(s._emitterWorldMatrix,r.position,r,s.isLocal),s.isLocal&&(r._localPosition=o$1p.clone(r.position,r._localPosition),p$1d.multiplyByPoint(s._emitterWorldMatrix,r._localPosition,r.position)),s.startDirectionFunction?s.startDirectionFunction(s._emitterWorldMatrix,r.direction,r,s.isLocal):s.particleEmitterType.startDirectionFunction(s._emitterWorldMatrix,r.direction,r,s.isLocal),r._initialDirection=0===i?o$1p.clone(r.direction,r._initialDirection):null,o$1p.multiplyByScalar(r.direction,i,r.direction),s._sizeGradients&&0!==s._sizeGradients.length?(r._currentSizeGradient=s._sizeGradients[0],r._currentSize1=r._currentSizeGradient.getFactor(),r.size=r._currentSize1,s._sizeGradients.length>1?r._currentSize2=s._sizeGradients[1].getFactor():r._currentSize2=r._currentSize1):r.size=_0x2c1e2b.RandomRange(s.minSize,s.maxSize),r.scale.x=_0x2c1e2b.RandomRange(s.minScaleX,s.maxScaleX),r.scale.y=_0x2c1e2b.RandomRange(s.minScaleY,s.maxScaleY),s._startSizeGradients&&s._startSizeGradients[0]&&s.targetStopDuration){var n=s._actualFrame/s.targetStopDuration;_0xf6a90a.GetCurrentGradient(n,s._startSizeGradients,(function(e,i,n){e!==t._currentStartSizeGradient&&(t._currentStartSize1=t._currentStartSize2,t._currentStartSize2=i.getFactor(),t._currentStartSizeGradient=e);var o=_0x2c1e2b.Lerp(t._currentStartSize1,t._currentStartSize2,n);o$1p.multiplyByScalar(r.scale,o,r.scale)}))}s._angularSpeedGradients&&0!==s._angularSpeedGradients.length?(r._currentAngularSpeedGradient=s._angularSpeedGradients[0],r.angularSpeed=r._currentAngularSpeedGradient.getFactor(),r._currentAngularSpeed1=r.angularSpeed,s._angularSpeedGradients.length>1?r._currentAngularSpeed2=s._angularSpeedGradients[1].getFactor():r._currentAngularSpeed2=r._currentAngularSpeed1):r.angularSpeed=_0x2c1e2b.RandomRange(s.minAngularSpeed,s.maxAngularSpeed),r.angle=_0x2c1e2b.RandomRange(s.minInitialRotation,s.maxInitialRotation),s._velocityGradients&&s._velocityGradients.length>0&&(r._currentVelocityGradient=s._velocityGradients[0],r._currentVelocity1=r._currentVelocityGradient.getFactor(),s._velocityGradients.length>1?r._currentVelocity2=s._velocityGradients[1].getFactor():r._currentVelocity2=r._currentVelocity1),s._limitVelocityGradients&&s._limitVelocityGradients.length>0&&(r._currentLimitVelocityGradient=s._limitVelocityGradients[0],r._currentLimitVelocity1=r._currentLimitVelocityGradient.getFactor(),s._limitVelocityGradients.length>1?r._currentLimitVelocity2=s._limitVelocityGradients[1].getFactor():r._currentLimitVelocity2=r._currentLimitVelocity1),s._dragGradients&&s._dragGradients.length>0&&(r._currentDragGradient=s._dragGradients[0],r._currentDrag1=r._currentDragGradient.getFactor(),s._dragGradients.length>1?r._currentDrag2=s._dragGradients[1].getFactor():r._currentDrag2=r._currentDrag1),s._colorGradients&&0!==s._colorGradients.length?(r._currentColorGradient=s._colorGradients[0],r._currentColorGradient.getColorToRef(r.color),e$1U.clone(r.color,r._currentColor1),s._colorGradients.length>1?s._colorGradients[1].getColorToRef(r._currentColor2):e$1U.clone(r.color,r._currentColor2)):(o=_0x2c1e2b.RandomRange(0,1),e$1U.lerp(s.color1,s.color2,o,r.color),e$1U.subtract(s.colorDead,r.color,s._colorDiff),e$1U.multiplyByScalar(s._colorDiff,1/r.lifeTime,r.colorStep)),s._isAnimationSheetEnabled&&(r._initialStartSpriteCellID=s.startSpriteCellID,r._initialEndSpriteCellID=s.endSpriteCellID),o$1p.add(r.direction,s._inheritedVelocityOffset,r.direction),s._useRampGradients&&(r.remapData=new e$29(0,1,0,1)),s.noiseTexture&&(r._randomNoiseCoordinates1?(o$1p.unpack([Math.random(),Math.random(),Math.random()],0,r._randomNoiseCoordinates1),o$1p.unpack([Math.random(),Math.random(),Math.random()],0,r._randomNoiseCoordinates2)):(r._randomNoiseCoordinates1=new o$1p(Math.random(),Math.random(),Math.random()),r._randomNoiseCoordinates2=new o$1p(Math.random(),Math.random(),Math.random()))),r._inheritParticleInfoToSubEmitters()},s=this,l=0;l<e;l++){if("break"===a())break}},_0x2fb622.prototype.fillDefines=function(e,t){if(this._isAnimationSheetEnabled&&e.push("ANIMATESHEET"),t===_0x5f5957.BLENDMODE_MULTIPLY&&e.push("BLENDMULTIPLYMODE"),this._useRampGradients&&e.push("RAMPGRADIENT"),this._isBillboardBased)switch(e.push("BILLBOARD"),this.billboardMode){case _0x29b01c.BILLBOARDMODE_Y:e.push("BILLBOARDY");break;case _0x29b01c.BILLBOARDMODE_STRETCHED:e.push("BILLBOARDSTRETCHED");break;case _0x29b01c.BILLBOARDMODE_ALL:e.push("BILLBOARDMODE_ALL")}},_0x2fb622.prototype._getEffect=function(e){var t=this.getCustomEffect(e);if(t)return t;var i=[];this.fillDefines(i,e);var n=i.join("\n");if(this._cachedDefines!==n){this._cachedDefines=n;var r,o,a=this._drawCommand;e$2b(a.shaderProgram)?(r=a.shaderProgram.vertexShaderSource.clone(),o=a.shaderProgram.fragmentShaderSource.clone()):(r=new s$U({name:"BabylonParticlesVS",sources:[_0x464a98]}),o=new s$U({name:"BabylonParticlesFS",sources:[_0xd79fc7]})),r.defines=i,o.defines=i,this._sp=this._sp&&this._sp.destroy(),this._sp=r$13.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}this._drawCommand.shaderProgram=this._sp},_0x2fb622.prototype.update=function(e){LicenseChecker.LICENSECHECKER.verify("ParticleSystem"),this.animate(!1,e),this.render(e),this._stopped&&(this._alive||(this._started=!1,this.onAnimationEnd&&this.onAnimationEnd(),this.disposeOnStop&&this._scene&&this._scene.primitives.remove(this)))},_0x2fb622.prototype.animate=function(e,t){var i=this;if(void 0===e&&(e=!1),this._started){if(!e&&this._scene){if(!this.isReady()||this._currentRenderId===t.frameNumber)return;this._currentRenderId=t.frameNumber}var n;if(this._scaledUpdateSpeed=this.updateSpeed*(e?this.preWarmStepOffset:1),this.manualEmitCount>-1)n=this.manualEmitCount,this._newPartsExcess=0,this.manualEmitCount=0;else{var r=this.emitRate;if(this._emitRateGradients&&this._emitRateGradients.length>0&&this.targetStopDuration){var o=this._actualFrame/this.targetStopDuration;_0xf6a90a.GetCurrentGradient(o,this._emitRateGradients,(function(e,t,n){e!==i._currentEmitRateGradient&&(i._currentEmitRate1=i._currentEmitRate2,i._currentEmitRate2=t.getFactor(),i._currentEmitRateGradient=e),r=_0x2c1e2b.Lerp(i._currentEmitRate1,i._currentEmitRate2,n)}))}n=r*this._scaledUpdateSpeed>>0,this._newPartsExcess+=r*this._scaledUpdateSpeed-n}if(this._newPartsExcess>1&&(n+=this._newPartsExcess>>0,this._newPartsExcess-=this._newPartsExcess>>0),this._alive=!1,this._stopped?n=0:(this._actualFrame+=this._scaledUpdateSpeed,this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()),this._update(n),!e){for(var a=0,s=0;s<this._particles.length;s++){var l=this._particles[s];this._appendParticleVertices(a,l),a+=this._useInstancing?1:4}this._vertexBuffer&&this._vertexBuffer.copyFromArrayView(this._vertexData)}0===this.manualEmitCount&&this.disposeOnStop&&this.stop()}},_0x2fb622.prototype._appendParticleVertices=function(e,t){this._appendParticleVertex(e++,t,0,0),this._useInstancing||(this._appendParticleVertex(e++,t,1,0),this._appendParticleVertex(e++,t,1,1),this._appendParticleVertex(e++,t,0,1))},_0x2fb622.prototype.isReady=function(){return!!this.emitter},_0x2fb622.prototype._render=function(e,t){return e$2b(this._drawCommand)||this._createDrawCommand(),this._getEffect(e),this._drawCommand.vertexArray=this._vertexArray,this._drawCommand.instanceCount=this._capacity,_0x36dee7._setRenderState(this._drawCommand,e),this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.notifyObservers(effect),t.commandList.push(this._drawCommand),this._particles.length},_0x2fb622.prototype.render=function(e){if(!this._particles.length)return 0;this.forceDepthWrite;return this.blendMode===_0x5f5957.BLENDMODE_MULTIPLYADD?this._render(_0x5f5957.BLENDMODE_ADD,e):this._render(this.blendMode,e)},_0x2fb622.prototype.destroy=function(){if(e$2b(this._drawCommand)){var e=this._drawCommand;e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0,this._drawCommand=void 0}if(this.noiseTexture&&(!this.noiseTexture.isDestroyed()&&this.noiseTexture.destroy(),this.noiseTexture=null),this._rampGradientsTexture&&(!this._rampGradientsTexture.isDestroyed()&&this._rampGradientsTexture.destroy(),this._rampGradientsTexture=null),this._removeFromRoot(),this._subEmitters&&this._subEmitters.length){for(var t=0;t<this._subEmitters.length;t++)for(var i=0,n=this._subEmitters[t];i<n.length;i++){var r=n[i];r.hasOwnProperty("particleSystem")?r.particleSystem.destroy():r.dispose()}this._subEmitters=[],this.subEmitters=[]}this._disposeEmitterOnDispose&&this.emitter&&this.emitter.dispose&&this.emitter.dispose(!0),this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.clear(),this.reset()},_0x2fb622.prototype.clone=function(e,t){this._engine;var i=this.serialize(),n=_0x2fb622.Parse(i,this._scene||this._engine,"",!1,this._context);return n.name=e,n.customShader=null,n._customEffect={},void 0===t&&(t=this.emitter),this.noiseTexture&&(n.noiseTexture=this.noiseTexture.clone()),this.particleTexture&&(n.particleTexture=this.particleTexture),e$2b(this._modelMatrx)&&(n._modelMatrx=new p$1d,p$1d.clone(this._modelMatrx,n._modelMatrx)),n.emitter=t,this.preventAutoStart||n.start(),n},_0x2fb622.prototype.serialize=function(e){void 0===e&&(e=!1);var t={};_0x2fb622._Serialize(t,this,e);var i=[];if(e$1U.pack(this.textureMask,i),t.textureMask=i,t.customShader=this.customShader,t.preventAutoStart=this.preventAutoStart,this.subEmitters){t.subEmitters=[],this._subEmitters||this._prepareSubEmitterInternalArray();for(var n=0,r=this._subEmitters;n<r.length;n++){for(var o=[],a=0,s=r[n];a<s.length;a++){var l=s[a];o.push(l.serialize())}t.subEmitters.push(o)}}return t},_0x2fb622._Serialize=function(e,t,i){if(e.name=t.name,e.id=t.id,e.capacity=t.getCapacity(),t.emitter.position){var n=t.emitter;e.emitterId=n.id}else{var r=t.emitter,o=[];o$1p.pack(r,o),e.emitter=o}t.particleEmitterType&&(e.particleEmitterType=t.particleEmitterType.serialize()),t.particleTexture&&(i?e.texture=t.particleTexture.serialize():(e.textureName=t.particleTexture.name,e.invertY=!!t.particleTexture._flipY)),e.isLocal=t.isLocal,e.startDelay=t.startDelay,e.renderingGroupId=t.renderingGroupId,e.isBillboardBased=t.isBillboardBased,e.billboardMode=t.billboardMode,e.minAngularSpeed=t.minAngularSpeed,e.maxAngularSpeed=t.maxAngularSpeed,e.minSize=t.minSize,e.maxSize=t.maxSize,e.minScaleX=t.minScaleX,e.maxScaleX=t.maxScaleX,e.minScaleY=t.minScaleY,e.maxScaleY=t.maxScaleY,e.minEmitPower=t.minEmitPower,e.maxEmitPower=t.maxEmitPower,e.minLifeTime=t.minLifeTime,e.maxLifeTime=t.maxLifeTime,e.emitRate=t.emitRate;var a=[];o$1p.pack(t.gravity,a),e.gravity=a;var s=[];o$1p.pack(t.noiseStrength,s),e.noiseStrength=s;var l=[];e$1U.pack(t.color1,l),e.color1=l;var u=[];e$1U.pack(t.color2,u),e.color2=u;var c=[];e$1U.pack(t.colorDead,c),e.colorDead=c,e.updateSpeed=t.updateSpeed,e.targetStopDuration=t.targetStopDuration,e.blendMode=t.blendMode,e.preWarmCycles=t.preWarmCycles,e.preWarmStepOffset=t.preWarmStepOffset,e.minInitialRotation=t.minInitialRotation,e.maxInitialRotation=t.maxInitialRotation,e.startSpriteCellID=t.startSpriteCellID,e.endSpriteCellID=t.endSpriteCellID,e.spriteCellChangeSpeed=t.spriteCellChangeSpeed,e.spriteCellWidth=t.spriteCellWidth,e.spriteCellHeight=t.spriteCellHeight,e.spriteRandomStartCell=t.spriteRandomStartCell,e.isAnimationSheetEnabled=t.isAnimationSheetEnabled;var h=t.getColorGradients();if(h){e.colorGradients=[];for(var d=0,f=h;d<f.length;d++){var p=f[d];l=[];e$1U.pack(p.color1,l);var _={gradient:p.gradient,color1:l};if(p.color2){u=[];e$1U.pack(p.color2,u),_.color2=u}else{u=[];e$1U.pack(p.color1,u),_.color2=u}e.colorGradients.push(_)}}var m=t.getRampGradients();if(m){e.rampGradients=[];for(var g=0,x=m;g<x.length;g++){var v=x[g],y=[];e$1U.pack(v.color,y);_={gradient:v.gradient,color:y};e.rampGradients.push(_)}e.useRampGradients=t.useRampGradients}var $=t.getColorRemapGradients();if($){e.colorRemapGradients=[];for(var b=0,T=$;b<T.length;b++){var C=T[b];_={gradient:C.gradient,factor1:C.factor1};void 0!==C.factor2?_.factor2=C.factor2:_.factor2=C.factor1,e.colorRemapGradients.push(_)}}var S=t.getAlphaRemapGradients();if(S){e.alphaRemapGradients=[];for(var w=0,E=S;w<E.length;w++){var P=E[w];_={gradient:P.gradient,factor1:P.factor1};void 0!==P.factor2?_.factor2=P.factor2:_.factor2=P.factor1,e.alphaRemapGradients.push(_)}}var A=t.getSizeGradients();if(A){e.sizeGradients=[];for(var L=0,M=A;L<M.length;L++){var R=M[L];_={gradient:R.gradient,factor1:R.factor1};void 0!==R.factor2?_.factor2=R.factor2:_.factor2=R.factor1,e.sizeGradients.push(_)}}var O=t.getAngularSpeedGradients();if(O){e.angularSpeedGradients=[];for(var I=0,D=O;I<D.length;I++){var B=D[I];_={gradient:B.gradient,factor1:B.factor1};void 0!==B.factor2?_.factor2=B.factor2:_.factor2=B.factor1,e.angularSpeedGradients.push(_)}}var N=t.getVelocityGradients();if(N){e.velocityGradients=[];for(var F=0,U=N;F<U.length;F++){var G=U[F];_={gradient:G.gradient,factor1:G.factor1};void 0!==G.factor2?_.factor2=G.factor2:_.factor2=G.factor1,e.velocityGradients.push(_)}}var z=t.getDragGradients();if(z){e.dragGradients=[];for(var V=0,k=z;V<k.length;V++){var W=k[V];_={gradient:W.gradient,factor1:W.factor1};void 0!==W.factor2?_.factor2=W.factor2:_.factor2=W.factor1,e.dragGradients.push(_)}}var H=t.getEmitRateGradients();if(H){e.emitRateGradients=[];for(var q=0,j=H;q<j.length;q++){var Y=j[q];_={gradient:Y.gradient,factor1:Y.factor1};void 0!==Y.factor2?_.factor2=Y.factor2:_.factor2=Y.factor1,e.emitRateGradients.push(_)}}var X=t.getStartSizeGradients();if(X){e.startSizeGradients=[];for(var K=0,Q=X;K<Q.length;K++){var Z=Q[K];_={gradient:Z.gradient,factor1:Z.factor1};void 0!==Z.factor2?_.factor2=Z.factor2:_.factor2=Z.factor1,e.startSizeGradients.push(_)}}var J=t.getLifeTimeGradients();if(J){e.lifeTimeGradients=[];for(var ee=0,te=J;ee<te.length;ee++){var ie=te[ee];_={gradient:ie.gradient,factor1:ie.factor1};void 0!==ie.factor2?_.factor2=ie.factor2:_.factor2=ie.factor1,e.lifeTimeGradients.push(_)}}var ne=t.getLimitVelocityGradients();if(ne){e.limitVelocityGradients=[];for(var re=0,oe=ne;re<oe.length;re++){var ae=oe[re];_={gradient:ae.gradient,factor1:ae.factor1};void 0!==ae.factor2?_.factor2=ae.factor2:_.factor2=ae.factor1,e.limitVelocityGradients.push(_)}e.limitVelocityDamping=t.limitVelocityDamping}t.noiseTexture&&(e.noiseTexture=t.noiseTexture.serialize())},_0x2fb622.Parse=function(e,t,i,n){void 0===n&&(n=!1);var r=new _0x2fb622(e.name,e.capacity,t,null,e.isAnimationSheetEnabled,0);if(r.customShader=null,e.id&&(r.id=e.id),e.subEmitters){r.subEmitters=[];for(var o=0,a=e.subEmitters;o<a.length;o++){for(var s=[],l=0,u=a[o];l<u.length;l++){var c=u[l];s.push(_0x1e1355.Parse(c,t,i))}r.subEmitters.push(s)}}if(_0x36dee7._Parse(e,r,i),e.textureMask){var h=new e$1U;e$1U.unpack(e.textureMask,0,h),r.textureMask=h}return e.preventAutoStart&&(r.preventAutoStart=e.preventAutoStart),!n&&!r.preventAutoStart&&r.start(),r};var _0x14690c=new o$1p;function _0x5a120b(e){var t=e.maxAngularSpeed*e.maxLifeTime;let i=p$1d.multiply(e.modelMatrix,e._emitterWorldMatrix,new p$1d);i$1c.transform(new i$1c,i,e._boundingVolume),e._boundingVolume.radius=t+10}new e$29,_0x2fb622.prototype._createUniformMap=function(e){var t={},i=this;t.diffuseSampler=function(){return e$2b(i.particleTexture)?i.particleTexture:i._context.defaultTexture},t.particlesInfos=function(){var e=i._rawTextureWidth,t=i._rawTextureWidth;if(i.particleTexture)e=i.particleTexture.width,t=i.particleTexture.height;return _0x14690c.x=i.spriteCellWidth/e,_0x14690c.y=i.spriteCellHeight/t,_0x14690c.z=i.spriteCellWidth/e,_0x14690c},t.translationPivot=function(){return i.translationPivot},t.textureMask=function(){return i.textureMask},t.rampSampler=function(){return i._rampGradientsTexture},this._uniformMap=t},_0x2fb622.prototype._createDrawCommand=function(){this._boundingVolume=new i$1c,_0x5a120b(this);var e=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._modelMatrx,boundingVolume:this._boundingVolume,pass:Le$s.OPAQUE,cull:!1});e.castShadows=!1,e.receiveShadows=!1,e.selectCastShadows=!1,this._createUniformMap(),e.uniformMap=this._uniformMap,e.vertexArray=this._vertexArray,this._drawCommand=e};var _0x4f3b22=(_0x33883f=!0,function(e,t){var i=_0x33883f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33883f=!1,i}),_0x3f559a=_0x4f3b22(void 0,(function(){return _0x3f559a.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f559a).search("(((.+)+)+)+$")})),_0x33883f;function _0x279143(){this.systems=new Array,this._modelMatrx=new p$1d}_0x3f559a(),Object.defineProperties(_0x279143.prototype,{modelMatrix:{get:function(){return this._modelMatrx},set:function(e){if(this._modelMatrx!==e){this._modelMatrx=e;for(var t=0,i=this.systems;t<i.length;t++){i[t].modelMatrix=e}}}},emitterNode:{get:function(){return this._emitterNode}}}),_0x279143.prototype.setEmitterAsSphere=function(e,t,i){this._emitterNode&&this._emitterNode.dispose(),this._emitterCreationOptions={kind:"Sphere",options:e,renderingGroupId:t};var n=_Meshes_Builders_sphereBuilder__WEBPACK_IMPORTED_MODULE_1__.SphereBuilder.CreateSphere("emitterSphere",{diameter:e.diameter,segments:e.segments},i);n.renderingGroupId=t;var r=new _Materials_standardMaterial__WEBPACK_IMPORTED_MODULE_5__.StandardMaterial("emitterSphereMaterial",i);r.emissiveColor=e.color,n.material=r;for(var o=0,a=this.systems;o<a.length;o++){a[o].emitter=n}this._emitterNode=n},_0x279143.prototype.update=function(e){for(var t=0,i=this.systems;t<i.length;t++){i[t].update(e)}},_0x279143.prototype.start=function(e){for(var t=0,i=this.systems;t<i.length;t++){var n=i[t];e&&(n.emitter=e),n.start()}},_0x279143.prototype.dispose=function(){for(var e=0,t=this.systems;e<t.length;e++){t[e].dispose()}this.systems=[],this._emitterNode&&(this._emitterNode.dispose(),this._emitterNode=null)},_0x279143.prototype.serialize=function(e){void 0===e&&(e=!1);for(var t={systems:[]},i=0,n=this.systems;i<n.length;i++){var r=n[i];t.systems.push(r.serialize(e))}return this._emitterNode&&(t.emitter=this._emitterCreationOptions),t},_0x279143.Parse=function(e,t,i){for(var n=new _0x279143,r=this.BaseAssetsUrl+"/textures/",o=0,a=e.systems;o<a.length;o++){var s=a[o];e$2b(t.context.webgl2)&&t.context.webgl2&&e$2b(i)&&i?n.systems.push(_0x326310.Parse(s,t,r,!0)):n.systems.push(_0x2fb622.Parse(s,t,r,!0))}return n},_0x279143.BaseAssetsUrl="https://assets.babylonjs.com/particles";var _0x40cd23=(_0x333ea4=!0,function(e,t){var i=_0x333ea4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x333ea4=!1,i}),_0x433622=_0x40cd23(void 0,(function(){return _0x433622.toString().search("(((.+)+)+)+$").toString().constructor(_0x433622).search("(((.+)+)+)+$")})),_0x333ea4;function _0x42502(){}_0x433622(),_0x42502.fromJsonUrl=function(e,t,i){return t$11.createIfNeeded(e).fetchJson().then((function(e){return e$2b(e.systems)?_0x279143.Parse(e,t,i):e$2b(t.context.webgl2)&&t.context.webgl2&&e$2b(i)&&i?_0x326310.Parse(e,t,"",!1):_0x2fb622.Parse(e,t,"",!1)}))};var f$o="varying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\nvoid main()\n{\nczm_materialInput materialInput;\nvec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nmaterialInput.s = v_st.s;\nmaterialInput.st = v_st;\nmaterialInput.str = vec3(v_st, 0.0);\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);\nvec3 positionToEyeEC = -v_positionEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",d$t="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionMC = position3DHigh + position3DLow;\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";function t$i(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=u$_(e.translucent,!0),i=u$_(e.aboveGround,!1);this.material=e$2b(e.material)?e.material:r$X.fromType(r$X.ColorType),this.translucent=u$_(e.translucent,!0),this._vertexShaderSource=u$_(e.vertexShaderSource,d$t),this._fragmentShaderSource=u$_(e.fragmentShaderSource,f$o),this._renderState=a$S.getDefaultRenderState(t,!i,e.renderState),this._closed=!1,this._flat=u$_(e.flat,!1),this._faceForward=u$_(e.faceForward,i),this._aboveGround=i,this._name="EllipsoidSurfaceAppearance"}Object.defineProperties(t$i.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return t$i.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}},name:{get:function(){return this._name+"_"+this.material._id}}}),t$i.VERTEX_FORMAT=n$11.POSITION_AND_ST,t$i.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,t$i.prototype.isTranslucent=a$S.prototype.isTranslucent,t$i.prototype.getRenderState=a$S.prototype.getRenderState;var _0x100472=(_0x308045=!0,function(e,t){var i=_0x308045?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x308045=!1,i}),_0x2c223f=_0x100472(void 0,(function(){return _0x2c223f.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c223f).search("(((.+)+)+)+$")})),_0x308045;_0x2c223f();var _0x501f60={FIRE:0,FOUNTAIN:1,RAIN:2},v$o=Object.freeze(_0x501f60),n$k=new o$1o(1,1);function a$k(e){e=u$_(e,u$_.EMPTY_OBJECT),this.mass=u$_(e.mass,1),this.position=o$1p.clone(u$_(e.position,o$1p.ZERO)),this.velocity=o$1p.clone(u$_(e.velocity,o$1p.ZERO)),this.life=u$_(e.life,Number.MAX_VALUE),this.image=e.image,this.startColor=e$1U.clone(u$_(e.startColor,e$1U.WHITE)),this.endColor=e$1U.clone(u$_(e.endColor,e$1U.WHITE)),this.startScale=u$_(e.startScale,1),this.endScale=u$_(e.endScale,1),this.imageSize=o$1o.clone(u$_(e.imageSize,n$k)),this.rotationSpeed=u$_(e.rotationSpeed,0),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(a$k.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var o$s=new o$1p;function u$l(e,t,i,n){e=u$_(e,1),o$1q.typeOf.number.greaterThan("radius",e,0),this._radius=u$_(e,1),this._innerRadius=u$_(t,0),this._startAngle=u$_(i,0),this._endAngle=u$_(n,e$2a.TWO_PI)}function o$r(e){e=u$_(e,1),o$1q.typeOf.number.greaterThan("radius",e,0),this._radius=u$_(e,1),this.radius=this._radius}a$k.prototype.update=function(e,t){return o$1p.multiplyByScalar(this.velocity,e,o$s),o$1p.add(this.position,o$s,this.position),e$2b(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life},Object.defineProperties(u$l.prototype,{radius:{get:function(){return this._radius},set:function(e){o$1q.typeOf.number.greaterThan("value",e,0),this._radius=e}},innerRadius:{get:function(){return this._innerRadius},set:function(e){o$1q.typeOf.number.greaterThan("value",e,0),this._innerRadius=e}},startAngle:{get:function(){return this._startAngle},set:function(e){this._startAngle=e}},endAngle:{get:function(){return this._endAngle},set:function(e){this._endAngle=e}},type:{get:function(){return"Circle"}}}),u$l.prototype.emit=function(e){var t=this._startAngle,i=this._endAngle;t>i&&(t=this._endAngle,i=this._startAngle);var n=e$2a.randomBetween(t,i),r=e$2a.randomBetween(this._innerRadius,this._radius),o=r*Math.cos(n),a=r*Math.sin(n);e.position=o$1p.fromElements(o,a,0,e.position),e.velocity=o$1p.clone(o$1p.UNIT_Z,e.velocity)},Object.defineProperties(o$r.prototype,{radius:{get:function(){return this._radius},set:function(e){o$1q.typeOf.number.greaterThan("value",e,0),this._radius=e}},type:{get:function(){return"Sphere"}}}),o$r.prototype.emit=function(e){var t=e$2a.randomBetween(0,e$2a.TWO_PI),i=e$2a.randomBetween(0,e$2a.PI),n=e$2a.randomBetween(0,this._radius),r=n*Math.cos(t)*Math.sin(i),o=n*Math.sin(t)*Math.sin(i),a=n*Math.cos(i);e.position=o$1p.fromElements(r,o,a,e.position),e.velocity=o$1p.normalize(e.position,e.velocity)};var v$n=e$2a.toRadians(30);function n$j(e){this._angle=u$_(e,v$n)}Object.defineProperties(n$j.prototype,{angle:{get:function(){return this._angle},set:function(e){o$1q.typeOf.number("value",e),this._angle=e}}}),n$j.prototype.emit=function(e){var t=Math.tan(this._angle),i=e$2a.randomBetween(0,e$2a.TWO_PI),n=e$2a.randomBetween(0,t),r=n*Math.cos(i),o=n*Math.sin(i);e.velocity=o$1p.fromElements(r,o,1,e.velocity),o$1p.normalize(e.velocity,e.velocity),e.position=o$1p.clone(o$1p.ZERO,e.position)};var I$p=new o$1o(1,1);function g$s(e){e=u$_(e,u$_.EMPTY_OBJECT),this.show=u$_(e.show,!0),this.updateCallback=e.updateCallback,this.loop=u$_(e.loop,!0),this.image=u$_(e.image,void 0);var t=e.emitter;e$2b(t)||(t=new u$l(.5)),this._emitter=t,t.owner=this,this._bursts=e.bursts,this._modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._emitterModelMatrix=p$1d.clone(u$_(e.emitterModelMatrix,p$1d.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new p$1d,this._startColor=e$1U.clone(u$_(e.color,u$_(e.startColor,e$1U.WHITE))),this._endColor=e$1U.clone(u$_(e.color,u$_(e.endColor,e$1U.WHITE))),this._startScale=u$_(e.scale,u$_(e.startScale,1)),this._endScale=u$_(e.scale,u$_(e.endScale,1)),this._minRotationSpeed=u$_(e.minRotationSpeed,u$_(e.minimumRotationSpeed,0)),this._maxRotationSpeed=u$_(e.maxRotationSpeed,u$_(e.maximumRotationSpeed,0)),this._emissionRate=u$_(e.emissionRate,5),this._emissionRateByDistance=u$_(e.emissionRate,5),this._minimumSpeed=u$_(e.speed,u$_(e.minimumSpeed,1)),this._maximumSpeed=u$_(e.speed,u$_(e.maximumSpeed,1)),this._minimumParticleLife=u$_(e.particleLife,u$_(e.minimumParticleLife,5)),this._maximumParticleLife=u$_(e.particleLife,u$_(e.maximumParticleLife,5)),this._minimumMass=u$_(e.mass,u$_(e.minimumMass,1)),this._maximumMass=u$_(e.mass,u$_(e.maximumMass,1)),this._minimumImageSize=o$1o.clone(u$_(e.imageSize,u$_(e.minimumImageSize,I$p))),this._maximumImageSize=o$1o.clone(u$_(e.imageSize,u$_(e.maximumImageSize,I$p))),this._lifetime=u$_(e.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new o$1h,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0,this._sizeInMeters=u$_(e.sizeInMeters,u$_(e.sizeInMeters,!1)),this._boundingSphere=new i$1c(o$1p.ZERO,100),this.lodRangeScale=1,this._performance=u$_(e.performance,!0),this._type=u$_(e.type,v$o.FIRE)}function W$m(e){var t=e._emissionRate,i=e._maximumParticleLife,n=0,r=e._bursts;if(e$2b(r))for(var o=r.length,a=0;a<o;++a)n+=r[a].maximum;var s=e._billboardCollection,l=e.image,u=Math.ceil(t*i+n),c=e._particles,h=e._particlePool,d=e._emitter;e$2b(d.areaFactor)&&(u=Math.min(u,d.areaFactor));for(var f=Math.max(u-c.length-h.length,0),p=0;p<f;++p){var _=new a$k;_._billboard=s.add({image:l,sizeInMeters:e._sizeInMeters}),h.push(_)}e._particleEstimate=u}function j$k(e){var t=e._particlePool.pop();return e$2b(t)||(t=new a$k),t}function H$s(e,t){e._particlePool.push(t)}function Y$e(e){for(var t=e._particles,i=e._particlePool,n=e._billboardCollection,r=(t.length,i.length),o=e._particleEstimate,a=o;a<r;++a){var s=i[a];!e$2b(s)||n.remove(s._billboard)}i.length=o}function J$d(e){e$2b(e._billboard)&&(e._billboard.show=!1)}function w$k(e,t){var i=t._billboard;e$2b(i)||(i=t._billboard=e._billboardCollection.add({image:t.image,sizeInMeters:e._sizeInMeters})),i.width=t.imageSize.x,i.height=t.imageSize.y,i.position=t.position,i.show=!0;var n=e$2a.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),r=e$2a.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),o=e$2a.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),a=e$2a.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);i.color=new e$1U(n,r,o,a),i.scale=e$2a.lerp(t.startScale,t.endScale,t.normalizedAge),i.rotation=t.age*t.rotationSpeed}function X$d(e,t){t.startColor=e$1U.clone(e._startColor,t.startColor),t.endColor=e$1U.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=e$2a.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=e$2a.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=e$2a.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=e$2a.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t.rotationSpeed=e$2a.randomBetween(e._minRotationSpeed,e._maxRotationSpeed),t._normalizedAge=0,t._age=0;var i=e$2a.randomBetween(e._minimumSpeed,e._maximumSpeed);o$1p.multiplyByScalar(t.velocity,i,t.velocity),e._particles.push(t)}function K$e(e,t){if(e._isComplete)return 0;var i=(t=e$2a.mod(t,e._lifetime))*e._emissionRateByDistance,n=Math.floor(i);if(e._carryOver+=i-n,e._carryOver>1&&(n++,e._carryOver-=1),e$2b(e.bursts))for(var r=e.bursts.length,o=0;o<r;o++){var a=e.bursts[o],s=e._currentTime;e$2b(a)&&!a._complete&&s>a.time&&(n+=e$2a.randomBetween(a.minimum,a.maximum),a._complete=!0)}return n}Object.defineProperties(g$s.prototype,{emitter:{get:function(){return this._emitter},set:function(e){o$1q.defined("value",e),this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){o$1q.defined("value",e),this._matrixDirty=this._matrixDirty||!p$1d.equals(this._modelMatrix,e),p$1d.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){o$1q.defined("value",e),this._matrixDirty=this._matrixDirty||!p$1d.equals(this._emitterModelMatrix,e),p$1d.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){o$1q.defined("value",e),e$1U.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){o$1q.defined("value",e),e$1U.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumSpeed=e}},minimumRotationSpeed:{get:function(){return this._minRotationSpeed},set:function(e){this._minRotationSpeed=e}},maximumRotationSpeed:{get:function(){return this._maxRotationSpeed},set:function(e){this._maxRotationSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){o$1q.typeOf.object("value",e),o$1q.typeOf.number.greaterThanOrEquals("value.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){o$1q.typeOf.object("value",e),o$1q.typeOf.number.greaterThanOrEquals("value.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._maximumImageSize=e}},lifetime:{get:function(){return this._lifetime},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._lifetime=e}},type:{get:function(){return this._ParticleSystemType},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._ParticleSystemType=e,this.setParticleType(e)}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});var Z$i=new i$1c,P$m=new p$1d;function G$l(e,t){if(e$2b(e._emitter)&&"Polygon"==e._emitter.type)e._boundingSphere=e._emitter.boundingSphere;else{var i=e._maxVelocity*e._maximumParticleLife;P$m=p$1d.multiply(e.modelMatrix,e.emitterModelMatrix,P$m),i$1c.transform(Z$i,P$m,e._boundingSphere),e._boundingSphere.radius=i+10+e._emitter.radius}t.mode===C$13.COLUMBUS_VIEW&&s$Q.computeActualWgs84Position(t,e._boundingSphere.center,e._boundingSphere.center)}function Q$i(e,t){var i=t.camera.positionWC,n=o$1p.distance(i,e._boundingSphere.center)-e._boundingSphere.radius,r=0;n>1e3*e.lodRangeScale?r=0:n>200*e.lodRangeScale?(r=e._emissionRate/8,r=Math.max(2,r)):n>50*e.lodRangeScale?(r=e._emissionRate/2,r=Math.max(2,r)):r=e._emissionRate,e$2b(e._emitter.areaFactor)&&(r=Math.min(e._emitter.areaFactor,r)),e._emissionRateByDistance=r}var C$n=new o$1p;g$s.prototype.setParticleType=function(e){switch(e){case v$o.FIRE:this._emitter=new n$j(e$2a.toRadians(45)),this._emissionRate=150,this._particleSize=2,this._minimumParticleLife=1.5,this._maximumParticleLife=1.8,this._minimumSpeed=7,this._maximumSpeed=9,this._startScale=3,this._endScale=1.5,this._startColor=new e$1U(1,1,1,1),this._endColor=new e$1U(1,0,0,0),this._lifeTime=6,this._sizeInMeters=!0,this._performance=!0;break;case v$o.FOUNTAIN:this._emitter=new o$1o(1,1),this._emissionRate=40,this._particleSize=1,this._minimumParticleLife=6,this._maximumParticleLife=7,this._minimumSpeed=10,this._maximumSpeed=10,this._startScale=1,this._endScale=30,this._startColor=new e$1U(1,1,1,.6),this._endColor=new e$1U(.8,.86,1,.4),this._lifeTime=16,this._sizeInMeters=!0,this._performance=!0;break;case v$o.RAIN:this._emitter=new o$r(5e3),this._emissionRate=8e3,this._particleSize=30,this._minimumParticleLife=6,this._maximumParticleLife=6,this._minimumSpeed=0,this._maximumSpeed=0,this._startScale=1,this._endScale=1,this._startColor=new e$1U(1,1,1,.8),this._endColor=new e$1U(1,1,1,.8),this._lifeTime=10,this._sizeInMeters=!0,this._performance=!1}},g$s.prototype.update=function(e){if(LicenseChecker.LICENSECHECKER.verify("ParticleSystem"),this.show){e$2b(this._billboardCollection)||(this._billboardCollection=new w$N({particleSystem:this._performance,ignoreShow:!0})),this._updateParticlePool&&(W$m(this),this._updateParticlePool=!1);var t=e.cullingVolume;if(G$l(this,e),t.computeVisibility(this._boundingSphere)!=Ae$u.OUTSIDE){Q$i(this,e);var i=0;this._previousTime&&(i=a$15.secondsDifference(e.time,this._previousTime)),i<0&&(i=0),this._maxVelocity=0;var n,r,o=this._particles,a=this._emitter,s=this.updateCallback,l=o.length;for(n=0;n<l;++n)(r=o[n]).update(i,s)?(w$k(this,r),this._maxVelocity=Math.max(this._maxVelocity,o$1p.magnitude(r.velocity))):(J$d(r),H$s(this,r),o[n]=o[l-1],--n,--l);o.length=l;var u=K$e(this,i);if(u>0&&e$2b(a)){this._matrixDirty&&(this._combinedMatrix=p$1d.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);var c=this._combinedMatrix;for(n=0;n<u;n++)r=j$k(this),this._emitter.emit(r),"Polygon"!==this._emitter.type&&(o$1p.add(r.position,r.velocity,C$n),p$1d.multiplyByPoint(c,C$n,C$n),r.position=p$1d.multiplyByPoint(c,r.position,r.position),o$1p.subtract(C$n,r.position,r.velocity),o$1p.normalize(r.velocity,r.velocity)),X$d(this,r),w$k(this,r)}if(this._billboardCollection.update(e),this._previousTime=a$15.clone(e.time,this._previousTime),this._currentTime+=i,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=e$2a.mod(this._currentTime,this._lifetime),this.bursts){var h=this.bursts.length;for(n=0;n<h;n++)this.bursts[n]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%60==0&&Y$e(this)}}},g$s.prototype.isDestroyed=function(){return!1},g$s.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),i$10(this)};var y$m=new o$1p(1,1,1);function a$j(e){e=u$_(e,y$m),o$1q.defined("dimensions",e),o$1q.typeOf.number.greaterThanOrEquals("dimensions.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.y",e.y,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.z",e.z,0),this._dimensions=o$1p.clone(e)}Object.defineProperties(a$j.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number.greaterThanOrEquals("value.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("value.y",e.y,0),o$1q.typeOf.number.greaterThanOrEquals("value.z",e.z,0),o$1p.clone(e,this._dimensions)}}});var l$m=new o$1p;a$j.prototype.emit=function(e){var t=this._dimensions,i=o$1p.multiplyByScalar(t,.5,l$m),n=e$2a.randomBetween(-i.x,i.x),r=e$2a.randomBetween(-i.y,i.y),o=e$2a.randomBetween(-i.z,i.z);e.position=o$1p.fromElements(n,r,o,e.position),e.velocity=o$1p.normalize(e.position,e.velocity)};var _0x39572f=(_0x4593b4=!0,function(e,t){var i=_0x4593b4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4593b4=!1,i}),_0x5a8d5a=_0x39572f(void 0,(function(){return _0x5a8d5a.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a8d5a).search("(((.+)+)+)+$")})),_0x4593b4;_0x5a8d5a();var _0x40a7a7=function(e){e=e||{},this._scene=e.scene,this._name=e.name,this._layerConfigs=new e$1N,this._s3mLayers=new e$1N,this._s3mURLs=[],this._associatedFieldName=void 0,this._resetVisible=!1,this._associatedLayerIds=[],this._visible=u$_(e.isVisible,!0)};Object.defineProperties(_0x40a7a7.prototype,{size:{get:function(){return this._s3mLayers.length}},associatedField:{get:function(){return this._associatedFieldName},set:function(e){this._associatedFieldName=e}},visible:{get:function(){return this._visible},set:function(e){for(var t in this._visible=e,this._s3mLayers._hash){this._s3mLayers.get(t).visible=e}}}}),_0x40a7a7.prototype.getLayer=function(e){return this._s3mLayers._array[e]},_0x40a7a7.prototype.getSubLayer=function(e){var t,i=o$1l.defer();if(!e$2b(e))throw new t$16("name is required.");for(var n in this._layerConfigs._hash){var r=this._layerConfigs.get(n);if(r.name===e){if(r.ready){t=this._s3mLayers.get(n);break}t=this._scene.addS3MTilesLayerByScp(n+"?t=1",r,r.index,!0),r.ready=!0;break}}return e$2b(t)?o$1l(t,(function(e){i.resolve(e)})):i.resolve(),i.promise},_0x40a7a7.prototype.findByIndex=function(e){if(!e$2b(e))throw new t$16("index is required.");if(e>this._s3mLayers.length-1)throw new t$16("index is out of bounds.");return this._s3mLayers._array[e]},_0x40a7a7.prototype.releaseSelection=function(){},_0x40a7a7.prototype.remove=function(e,t){if(t=u$_(t,!0),!e$2b(e))return!1;var i,n;for(var r in this._s3mLayers._hash){var o=this._s3mLayers.get(r);if(o.name===e){i=r,n=o;break}}return e$2b(i)?(this._s3mLayers.remove(i),t&&n.destroy(),!0):void 0};var _0x578a9e=.25,_0x19b92b=64,_0x4a9693=2,_0x307ee6=6378137,_0xa1c82e=2*_0x307ee6*Math.PI*_0x578a9e/(_0x19b92b*_0x4a9693),_0x28208c=2;function _0x122f16(e,t,i){return _0xa1c82e/(1<<t)*e.context.drawingBufferHeight/(i*e.camera.frustum.sseDenominator)}_0x40a7a7.prototype.setSelection=function(e,t,i,n){for(var r=!1,o=this._s3mURLs.length-1;o>=0;o--)if(e$2b(this._s3mURLs[o])){var a=this._s3mLayers.get(this._s3mURLs[o]);!e$2b(a)||(a.id===i&&a.selectEnabled&&a.name===n?(a.setSelection(e,t),r=!0):a.releaseSelection())}return r},_0x40a7a7.prototype.releaseSelection=function(){for(var e=this._s3mURLs.length-1;e>=0;e--)if(e$2b(this._s3mURLs[e])){var t=this._s3mLayers.get(this._s3mURLs[e]);!e$2b(t)||t.releaseSelection()}},_0x40a7a7.prototype.getSelection=function(){for(var e=[],t=this._s3mURLs.length-1;t>=0;t--)if(e$2b(this._s3mURLs[t])){var i=this._s3mLayers.get(this._s3mURLs[t]);!e$2b(i)||(e=e.concat(i.getSelection()))}return e},_0x40a7a7.prototype.update=function(e,t,i,n){var r=this,o=this._layerConfigs;for(var a in o._hash)!function(a){var s=o.get(a),l=t.camera.positionWC,u=i$1c.fromRectangle3D(s.layerBounds),c=o$1p.distance(u.center,l);c>u.radius&&(c-=u.radius);for(var h=Math.max(s.layerBounds.width,s.layerBounds.height),d=0,f=Math.PI;f>h;)f*=.5,d++;var p=_0x122f16(t,d-=1,c)<_0x28208c;if(s.ready){var _=r._s3mLayers.get(a);if(!e$2b(_))return;p?(e$2b(_._flattenTexture)||e$2b(_._excavationTexture)?_.refresh():(r.remove(_._name,!0),s.ready=!1),r._resetVisible=!0):_.update(e,t,i,n)}else{if(!p)r._scene.addS3MTilesLayerByScp(a+"?t=1",s,s.index,!0).then((function(o){if(e$2b(o)){if(o.visible=r.visible,r._s3mLayers.set(a,o),e$2b(r._associatedFieldName)&&("attribute"===o._attributeExtentName?(o._queryFieldNames=[r._associatedFieldName],o._layerScheduler._indexedDBSetting.isAttributesSave=!0):o._layerScheduler._downloadAttributes(),o._layerScheduler._associatedFieldName=r._associatedFieldName),r._associatedLayerIds.length>0){for(var s=void 0,l=0;l<r._associatedLayerIds.length;l++)if(e$2b(s=r._associatedLayerIds[l].fineLayer)&&s===o.name){o._layerScheduler._isFineLayer=!0;break}o._layerScheduler._isFineLayer=!0}o.update(e,t,i,n)}})),s.ready=!0}}(a)},_0x40a7a7.prototype.render=function(e,t){for(var i=void 0,n={},r={},o=this._s3mURLs.length-1;o>=0;o--)if(e$2b(this._s3mURLs[o])){var a=this._s3mLayers.get(this._s3mURLs[o]);if(e$2b(a)){if(this._resetVisible){var s=[];for(var l in a._layerScheduler._attributes){e$2b(n[a._layerScheduler._attributes[l][this._associatedFieldName]])&&s.push(l)}if(a.setObjsVisible(s,!1),this._associatedLayerIds.length>0){var u,c=void 0;for(u=0;u<this._associatedLayerIds.length&&(!e$2b(c=this._associatedLayerIds[u].coarseLayer)||c!==a.name);u++)c=void 0;if(e$2b(c)){var h=[];for(var l in r){var d=this._associatedLayerIds[u].idMapping[l];e$2b(d)&&h.push(d)}a.setObjsVisible(h,!1)}}this._resetVisible=!1}if(a._fileType===d$15.OSGBFile&&e$2b(this._associatedFieldName)&&e$2b(i)){var f=e$2a.toDegrees(i.east),p=e$2a.toDegrees(i.north),_=e$2a.toDegrees(i.south),m=e$2a.toDegrees(i.west),g=[m,p,0,f,p,0,f,_,0,m,_,0,m,p,0];a.addFlattenRegion({position:g,name:"flatten"})}if(a.render(e,t),i=a._layerBounds,a._layerScheduler._objectIdChange){for(var x in a._layerScheduler._entityObjectId){var v=a._layerScheduler._entityObjectId[x];for(var l in v)n[v[l]]=l}for(var x in a._layerScheduler._entityModelId){v=a._layerScheduler._entityModelId[x];for(var l in v)r[l]=l}this._resetVisible=!0,a._layerScheduler._objectIdChange=!1}}}},_0x40a7a7.prototype.destroy=function(){for(var e=this._s3mURLs.length-1;e>=0;e--)if(e$2b(this._s3mURLs[e])){var t=this._s3mLayers.get(this._s3mURLs[e]);e$2b(t)&&t.destroy()}return i$10(this)};const g$r=1048576;var u$k=function(){this._layers=new e$1N,this._layerQueue=[],this._layerIndex=3,this._selectedLayer=void 0,this._clampLayerIndex=Number.MAX_VALUE,this._allTextOverlap=[],this._s3mLayerAddedIndex=0,this._processingTiles=[],this._replacementList=new h$P,this._replacementSentinel=this._replacementList.add(),this._maxMemory=2048,this._maxMemoryInBytes=this._maxMemory*g$r,this._cacheBytes=this._maxMemory*g$r};Object.defineProperties(u$k.prototype,{layerQueue:{get:function(){return this._layerQueue}}}),u$k.prototype._setCacheMemory=function(e){this._cacheBytes=e*g$r},u$k.prototype._setMaxMemory=function(e){this._maxMemory=e,this._maxMemoryInBytes=this._maxMemory*g$r};var N$e=function(e,t){return e.priority-t.priority},E$o=function(e,t){return e._disFromCamera-t._disFromCamera};function G$k(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];i._adjustedLodRangeScale=Math.min(1.02*i._adjustedLodRangeScale,1e4)}}function k$j(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];i._adjustedLodRangeScale=Math.max(i._adjustedLodRangeScale/1.02,i._lodRangeScale)}}function b$u(e,t,i){if((t=e$2a.clamp(t,0,e.length-1))===(i=e$2a.clamp(i,0,e.length-1)))return!1;var n=e[t];return e[t]=e[i],e[i]=n,!0}u$k.prototype._processTiles=function(e){const t=e.context;e.processingTiles.sort(E$o);const i=this._maxMemoryInBytes,n=i+.5*i,r=e.processingTiles;let o=!1;for(let t=0,i=r.length;t<i;t++){const i=r[t];o=i.transformResource(e,i.layer,n)}const a=this._layerQueue;t.memorySize<i?k$j(a):o&&r.length>0&&G$k(a),this._processingTiles.length=0},u$k.prototype.update=function(e,t,i,n){_0x4dad4e.update(e);var r=this._layerQueue,o=this._layerQueue.length;this._replacementList.splice(this._replacementList.tail,this._replacementSentinel),t.replacementList=this._replacementList,t.processingTiles=this._processingTiles;var a=0,s=[];for(a=0;a<o;a++){var l=r[a];if(e$2b(l)){if(t.multiViewportIndex>-1)if(!l.getVisibleInViewport(t.multiViewportIndex))continue;if(e$2b(n)&&!0===n){if(l._fileType!=d$15.ClampGroundRealtimeRasterCache){if(t.multiViewportIndex>-1&&!l.getVisibleInViewport(t.multiViewportIndex))continue;continue}s.push(l.id)}else if(l._fileType===d$15.ClampGroundRealtimeRasterCache)continue;var u=t._fboState.frameBufferType;if(u==Qe$c.NORMAL_AND_DEPTH){if(!e$2b(l._wireFrameType)||!l.isSilhouette())continue}else if(u==Qe$c.POSTEFFECT_FILTER){if(!e$2b(l.bloomEnable)||!l.bloomEnable)continue}else if(!(u!=Qe$c.CLAMP||e$2b(l._section)&&l._section))continue;l.update(e,t,i)}}ti$3.update(e.memorySize),t.requests.sort(N$e);for(var c=performance.now(),h=(a=0,t.requests.length);a<h;a++){var d=t.requests[a];if(d.owner.loadEntity(d.entity),performance.now()-c>5)break}return t.requests.length=0,this._processTiles(t),s},u$k.prototype.updateTextVisible=function(e,t){var i=this._layerQueue.length;if(0!==i){for(var n=0;n<i;n++){var r=this._layerQueue[n];if(r._fileType!==d$15.Text&&r._fileType!==d$15.IconPoint&&r._fileType!==d$15.OSGBCacheFile)return;_0x15f4db.addPotentialVisibiltyChangedLayer(r.name)}var o=t.camera._scene.overlapDisplayOptions,a=o&&o.allowIconWithTextDisplay,s=t.camera._scene._overlapDisplayedThreshold;_0x15f4db.meetVisible(this._allTextOverlap,s,a),_0x15f4db.setVisibiltyChangedToLayer(this,a),_0x15f4db.resetVisibleChangedQueue(),this._allTextOverlap=[]}},u$k.prototype._freeResource=function(e){for(var t=e.context,i=this._replacementList.head,n=this._cacheBytes;i!==this._replacementSentinel&&t.memorySize>n;){var r=i.item,o=r.layer;if(i=i.next,this._replacementList.remove(r._replacementNode),r._isRootTile&&o.residentRootTile)r._replacementNode=null;else{var a={geoSize:0,texSize:0};r.memoryUsageEx(a),ti$3._memGeometryRemoved(a.geoSize),r.destroy(e,!1)}}},u$k.prototype.endFrame=function(e){if(Se$d.GetUnusedSize()>0&&Se$d.DeleteUnusedTextures(),e.lightSource.hasChange()){var t=e.lightSource._changedLightList._hash;this.lightSourceChanged(t),e.lightSource.resetChange()}for(var i=this._layerQueue,n=this._layerQueue.length,r=performance.now(),o=0;o<n;o++){var a=i[o];if(a._isS3MBlock&&a._context._subTextureManager&&a._context._subTextureManager.processRequests(a),performance.now()-r>5)break}_0x46a73d.processTasks(),e.passes.offscreen||this._freeResource(e)},u$k.prototype.render=function(e,t){var i=this._layerQueue,n=this._layerQueue.length,r=0;for(r=0;r<n;r++){var o=i[r];if(e$2b(o)){if(t.multiViewportIndex>-1)if(!o.getVisibleInViewport(t.multiViewportIndex))continue;o.render(e,t)}}},u$k.prototype._setSelection=function(e){var t=e.primitive.id,i=e.id,n=e.skeletonId,r=this._layerQueue,o=this._layerQueue.length,a=0,s=void 0;for(a=0;a<o;a++){var l=r[a];l instanceof _0x40a7a7?l.setSelection(i,n,t,e.primitive.name)&&(s=l):l.id===t&&l.selectEnabled?(l.setSelection(i,n),s=l):l.releaseSelection()}s instanceof _0x40a7a7||this.setSelectedLayer(s)},u$k.prototype.releaseSelection=function(){var e=this._layerQueue,t=this._layerQueue.length,i=0;for(i=0;i<t;i++){var n=e[i];!e$2b(n)||n.releaseSelection()}this.setSelectedLayer(void 0)},u$k.prototype.find=function(e){if(!e$2b(e))throw new t$16("name is required.");var t=this._layers.get(e);if(!e$2b(t))for(var i=this._layerQueue,n=this._layerQueue.length,r=0;r<n;r++){var o=i[r];if(o instanceof _0x40a7a7)for(var a=i[r],s=0;s<a._s3mLayers._array.length;s++)if((o=a._s3mLayers._array[s]).name===e){t=o;break}}return t},u$k.prototype.findByIndex=function(e){if(!e$2b(e))throw new t$16("index is required.");if(e>this._layerQueue.length-1)throw new t$16("index is out of bounds.");return this._layerQueue[e]},u$k.prototype.add=function(e,t){if(!e$2b(e))throw new t$16("layer is required.");var i=e._name;if(!e$2b(i)||""==i)throw new t$16("name is required.");var n=this._layers;if(n.contains(i))throw new RuntimeError("An layer with name "+i+" already exists in this Scene.");e._id=this._layerIndex++;var r=this._layerQueue.length;n.set(i,e),t=u$_(t,r),e.index=t,this._layerQueue.push(e),this._layerQueue.sort((function(e,t){return e.index-t.index})),e._fileType===d$15.ClampObjectPolygon?this._clampLayerIndex=t:t>this._clampLayerIndex&&(e.receiveObjectClamp=!1)},u$k.prototype.remove=function(e,t){if(t=u$_(t,!0),!e$2b(e))return!1;var i=this.find(e);return!!i&&(!!this._layers.remove(e)&&(this._layerQueue.splice(this._layerQueue.indexOf(i),1),t&&i.destroy(),i._fileType===d$15.ClampObjectPolygon&&(this._clampLayerIndex=Number.MAX_VALUE),this._selectedLayer===i&&(this._selectedLayer=void 0),this._s3mLayerAddedIndex--,!0))},u$k.prototype.removeAll=function(e){if(e=u$_(e,!0)){var t=this._layerQueue,i=this._layerQueue.length,n=0;for(n=0;n<i;n++){var r=t[n];!e$2b(r)||r.destroy()}}this._layers.removeAll(),this._layerQueue.length=0,this._clampLayerIndex=Number.MAX_VALUE,this._selectedLayer=void 0,this._s3mLayerAddedIndex=0},u$k.prototype.pickFeatures=function(e,t){var i,n=t._context,r=n.pixels,o=e$1U.byteToRgba(r[0],r[1],r[2],r[3]),a=n.getObjectByPickId(o);if(e$2b(a)&&e$2b(a.primitive)&&a.primitive instanceof _0x22e933){var s=a.id;if(!e$2b((i=a.primitive).queryParameter)||!i.selectEnabled)return;var l=i.queryParameter,u=l.url+"/datasources/{datasourceName}/datasets/{datasetName}/features/{id}.jsonp?hasGeometry={hasGeometry}";if(e$2b(l.dataSetName))return u=u.replace("{datasourceName}",l.dataSourceName).replace("{datasetName}",l.dataSetName).replace("{id}",s).replace("{hasGeometry}",l.hasGeometry),e$2b(a$O.CREDENTIAL)&&(u=a$O.addToken(u)),d$V(u);if(1==l.isMerge&&e$2b(l.datasetList)){for(var c,h=0,d=l.datasetList.length;h<d;h++){var f=l.datasetList[h];if(s>=f.startID&&s<=f.endID){s=s-f.startID+1,c=f.datasetName;break}}if(e$2b(c))return u=u.replace("{datasourceName}",l.dataSourceName).replace("{datasetName}",c).replace("{id}",s).replace("{hasGeometry}",l.hasGeometry),e$2b(a$O.CREDENTIAL)&&(u=a$O.addToken(u)),d$V(u)}}},u$k.prototype.raise=function(e){if(e$2b(e)){var t=e.index;if(b$u(this._layerQueue,t,t+1)&&(e.index+=1),e._fileType===d$15.ClampGroundRealtimeRasterCache)for(var i=0;i<this._layerQueue.length;i++)this._layerQueue[i]._fileType===d$15.ClampGroundRealtimeRasterCache&&this._layerQueue[i]._layerScheduler.refreshRaster(this._layerQueue[i]._frameState)}},u$k.prototype.lower=function(e){if(e$2b(e)){var t=e.index;if(b$u(this._layerQueue,t,t-1)&&(e.index-=1),e._fileType===d$15.ClampGroundRealtimeRasterCache)for(var i=0;i<this._layerQueue.length;i++)this._layerQueue[i]._fileType===d$15.ClampGroundRealtimeRasterCache&&this._layerQueue[i]._layerScheduler.refreshRaster(this._layerQueue[i]._frameState)}},u$k.prototype.lowerToBottom=function(e){if(e$2b(e)){var t=e.index;this._layerQueue.splice(t,1),this._layerQueue.unshift(e),e.index=0;for(let i=1;i<=t;i++){(e=this._layers.get(this._layerQueue[i].name)).index+=1}}},u$k.prototype.raiseToTop=function(e){if(e$2b(e)){var t=e.index;this._layerQueue.splice(t,1),this._layerQueue.push(e),e.index=this._layerQueue.length-1;for(let i=t;i<this._layerQueue.length-1;i++){(e=this._layers.get(this._layerQueue[i].name)).index-=1}}},u$k.prototype.setSelectedLayer=function(e){this._selectedLayer=e},u$k.prototype.getSelectedLayer=function(){if(!e$2b(this._selectedLayer)||!this._selectedLayer.isDestroyed())return this._selectedLayer},u$k.prototype.lightSourceChanged=function(e){for(var t=0,i=this._layerQueue.length;t<i;t++)this._layerQueue[t]instanceof _0x22e933&&this._layerQueue[t].lightSourceChanged(e)},u$k.prototype.saveLocalCache=function(){for(var e=[],t=0,i=this._layerQueue.length;t<i;t++)this._layerQueue[t]instanceof _0x22e933&&this._layerQueue[t]._layerScheduler.saveLocalCache(e);if(e.length>0){var n={nameArray:e};_0x46a73d.indexTaskProcessor.scheduleTask(n,[])}};var _0x355f51=(_0x5bb442=!0,function(e,t){var i=_0x5bb442?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5bb442=!1,i}),_0x1187b6=_0x355f51(void 0,(function(){return _0x1187b6.toString().search("(((.+)+)+)+$").toString().constructor(_0x1187b6).search("(((.+)+)+)+$")})),_0x5bb442;_0x1187b6();var WebGLPlot$f=window.WebGLPlot=window.WebGLPlot||{};function _0x5a145c(){}WebGLPlot$f.defaultValue=u$_,WebGLPlot$f.defined=e$2b,WebGLPlot$f.Cartesian2=o$1o,WebGLPlot$f.Cartesian3=o$1p,WebGLPlot$f.WallGeometry=E$F,WebGLPlot$f.GeometryInstance=d$1o,WebGLPlot$f.PolylineVolumeGeometry=N$y,WebGLPlot$f.GroundPolylineGeometry=aa$4,WebGLPlot$f.PolylineGeometry=R$A,WebGLPlot$f.PolygonGeometry=z$_,WebGLPlot$f.Color=e$1U,WebGLPlot$f.ColorGeometryInstanceAttribute=o$16,WebGLPlot$f.PerInstanceColorAppearance=t$R,WebGLPlot$f.LabelStyle=R$Q,WebGLPlot$f.SceneTransforms=s$Q,WebGLPlot$f.HorizontalOrigin=j$T,WebGLPlot$f.SceneMode=C$13,WebGLPlot$f.Material=r$X,WebGLPlot$f.VertexFormat=n$11,WebGLPlot$f.CesiumMath=e$2a,WebGLPlot$f.HeadingPitchRoll=i$15,WebGLPlot$f.Ellipsoid=t$13,WebGLPlot$f.Transforms=m$17,WebGLPlot$f.EllipsoidGeodesic=E$1s,WebGLPlot$f.Cartographic=a$18,WebGLPlot$f.BillboardCollection=w$N,WebGLPlot$f.MaterialAppearance=t$w,WebGLPlot$f.LabelCollection=g$U,WebGLPlot$f.EllipsoidSurfaceAppearance=t$i,WebGLPlot$f.BoundingSphere=i$1c,WebGLPlot$f.Primitive=y$S,WebGLPlot$f.GroundPrimitive=d$14,WebGLPlot$f.RenderState=d$1m,WebGLPlot$f.PolylineCollection=k$T,WebGLPlot$f.GroundPolylinePrimitive=g$11,WebGLPlot$f.PolylineColorAppearance=e$1C,WebGLPlot$f.ClassificationType=_0x3b5200,WebGLPlot$f.Polyline=o$14,WebGLPlot$f.Event=o$1h,WebGLPlot$f.ScreenSpaceEventHandler=g$J,WebGLPlot$f.DeveloperError=t$16,WebGLPlot$f.clone=l$1g,WebGLPlot$f.when=o$1l,WebGLPlot$f.Check=o$1q,WebGLPlot$f.Request=r$1b,WebGLPlot$f.RequestErrorEvent=s$_,WebGLPlot$f.RequestScheduler=r$1a,WebGLPlot$f.RuntimeError=t$14,WebGLPlot$f.TrustedServers=u$X,WebGLPlot$f.ScreenSpaceEventType=G$I,WebGLPlot$f.buildModuleUrl=n$15,WebGLPlot$f.IntersectionTests=g$1h,WebGLPlot$f.Ray=f$17,WebGLPlot$f.Cartographic=a$18,WebGLPlot$f.BoxOutlineGeometry=o$17,WebGLPlot$f.Matrix3=p$1e,WebGLPlot$f.Matrix4=p$1d,WebGLPlot$f.AxisAlignedBoundingBox=e$26,WebGLPlot$f.createGuid=e$1Q,WebGLPlot$f.Entity=h$V,WebGLPlot$f.VerticalOrigin=S$O,WebGLPlot$f.Model=F$C,WebGLPlot$f.PolygonHierarchy=e$1J,WebGLPlot$f.AssociativeArray=e$1N,WebGLPlot$f.ModelUtility=s$v,WebGLPlot$f.KeyboardEventModifier=Aa$1,WebGLPlot$f.ParticleSystem=g$s,WebGLPlot$f.CircleEmitter=u$l,WebGLPlot$f.ConeEmitter=n$j,WebGLPlot$f.TranslationRotationScale=e$1X,WebGLPlot$f.BoxEmitter=a$j,WebGLPlot$f.Quaternion=n$13,WebGLPlot$f.JulianDate=a$15,WebGLPlot$f.Property=r$Z,WebGLPlot$f.S3MInstanceCollection=_0x448857,WebGLPlot$f.arrayFill=d$1s,WebGLPlot$f.ComponentDatatype=S$12,WebGLPlot$f.Geometry=I$1p,WebGLPlot$f.GeometryAttribute=o$1c,WebGLPlot$f.GeometryAttributes=a$_,WebGLPlot$f.GeometryOffsetAttribute=_0x58701d,WebGLPlot$f.IndexDatatype=ce$x,WebGLPlot$f.PrimitiveType=W$18,WebGLPlot$f.PolylinePipeline=m$V,WebGLPlot$f.ImageMaterialProperty=a$R,WebGLPlot$f.ColorMaterialProperty=t$Q,WebGLPlot$f.ShadowMode=W$W,WebGLPlot$f.ShowGeometryInstanceAttribute=e$1F,WebGLPlot$f.DistanceDisplayCondition=r$Y,WebGLPlot$f.DistanceDisplayConditionGeometryInstanceAttribute=t$B,WebGLPlot$f.MeasureHandler=T$l,WebGLPlot$f.MeasureMode=_0x91cd7b,WebGLPlot$f.DrawHandler=w$m,WebGLPlot$f.DrawMode=_0x20cc4b,WebGLPlot$f.Sightline=_0x23be36,WebGLPlot$f.ViewShed3D=_0x12cc1f,WebGLPlot$f.PrimitiveCollection=o$x,WebGLPlot$f.PolylineMaterialAppearance=r$W,WebGLPlot$f.ApproximateTerrainHeights=e$1E,WebGLPlot$f.destroyObject=i$10,WebGLPlot$f.OrientedBoundingBox=y$Z,WebGLPlot$f.Rectangle=h$18,WebGLPlot$f.ClassificationPrimitive=x$$,WebGLPlot$f.ShadowVolumeAppearance=y$R,WebGLPlot$f.ColorTable=i$S,WebGLPlot$f.HypsometricSettingEnum=k$Q,WebGLPlot$f.SlopeSetting=l$K,WebGLPlot$f.SlopeSettingEnum=_0x256766,WebGLPlot$f.CallbackProperty=n$V,WebGLPlot$f.S3MTilesLayer=_0x22e933,WebGLPlot$f.Layers=u$k,WebGLPlot$f.PlaneGeometry=f$K,WebGLPlot$f.ModelAnimationLoop=_0x157d80,WebGLPlot$f.NearFarScalar=o$Y,WebGLPlot$f.createPropertyDescriptor=C$$,WebGLPlot$f.CatmullRomSpline=c$K,WebGLPlot$f.GeometryPipeline=k$13,WebGLPlot$f.EllipseGeometry=Y$y,WebGLPlot$f.CylinderGeometry=l$Q;var _0x157c3b=(_0x53ed5c=!0,function(e,t){var i=_0x53ed5c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53ed5c=!1,i}),_0x2d8e22=_0x157c3b(void 0,(function(){return _0x2d8e22.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d8e22).search("(((.+)+)+)+$")})),_0x53ed5c;function _0x11ff81(e,t,i){this.x=WebGLPlot.defaultValue(e,0),this.y=WebGLPlot.defaultValue(t,0),this.z=WebGLPlot.defaultValue(i,0)}_0x2d8e22(),_0x11ff81.clone=function(e,t){if(WebGLPlot.defined(e))return WebGLPlot.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new _0x11ff81(e.x,e.y,e.z)},_0x11ff81.equals=function(e,t){return e===t||WebGLPlot.defined(e)&&WebGLPlot.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},_0x11ff81.prototype.clone=function(e){return _0x11ff81.clone(this,e)},_0x11ff81.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},_0x11ff81.prototype.equals=function(e){return _0x11ff81.equals(this,e)};var _0x39bed8=(_0xd56a3a=!0,function(e,t){var i=_0xd56a3a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd56a3a=!1,i}),_0x50896b=_0x39bed8(void 0,(function(){return _0x50896b.toString().search("(((.+)+)+)+$").toString().constructor(_0x50896b).search("(((.+)+)+)+$")})),_0xd56a3a;_0x50896b();var _0x3b6584={SYMBOL_UNKNOW:0,SYMBOL_DOT:1,SYMBOL_ALGO:2,SYMBOL_PICTURE:20,SYMBOL_POLYLINE:24,SYMBOL_RECTANGLE:26,SYMBOL_PARALLELOGRAM:28,SYMBOL_CIRCLE:29,SYMBOL_ELLIPSE:31,SYMBOL_ARBITRARYPOLYGON:32,SYMBOL_TEXT:34,SYMBOL_ARC:44,SYMBOL_PARALLELLINE:48,SYMBOL_TRAPEZOID:350,SYMBOL_POLYBEZIERCLOSED:360,SYMBOL_CHORD:370,SYMBOL_PIE:380,SYMBOL_KIDNEY:390,SYMBOL_BRACE:400,SYMBOL_REGULARPOLYGON:410,SYMBOL_POLYBEZIER:590,SYMBOL_RUNWAY:1013,SYMBOL_CURVEEIGHT:1014,SYMBOL_CONCENTRICCIRCLE:1019,SYMBOL_COMBINATIONALCIRCLE:1022,SYMBOL_NODECHAIN:1025,GROUPOBJECT:1e3,SYMBOL_CIRCLECHORD:3701,SYMBOL_CIRCLEPIE:3801,SYMBOL_CIRCLEARC:4401,SYMBOL_Model:99999,SYMBOL_POINT:99998},_0x18bc2f=Object.freeze(_0x3b6584),_0x978852=(_0x501def=!0,function(e,t){var i=_0x501def?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x501def=!1,i}),_0x3a4601=_0x978852(void 0,(function(){return _0x3a4601.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a4601).search("(((.+)+)+)+$")})),_0x501def;_0x3a4601();var _0x8fbb19={SURROUNDLINE_NONE:0,SURROUNDLINE_INNER:1,SURROUNDLINE_OUT:2,SURROUNDLINE_ALL:3},_0x26609d=Object.freeze(_0x8fbb19),_0x7b935f=(_0x59227f=!0,function(e,t){var i=_0x59227f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59227f=!1,i}),_0x25ae49=_0x7b935f(void 0,(function(){return _0x25ae49.toString().search("(((.+)+)+)+$").toString().constructor(_0x25ae49).search("(((.+)+)+)+$")})),_0x59227f;_0x25ae49();var _0x2354e4={None:0,Linear:1,Radial:2},_0x83f1a2=Object.freeze(_0x2354e4),_0x25d76f=(_0x70d266=!0,function(e,t){var i=_0x70d266?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x70d266=!1,i}),_0x39a6fc=_0x25d76f(void 0,(function(){return _0x39a6fc.toString().search("(((.+)+)+)+$").toString().constructor(_0x39a6fc).search("(((.+)+)+)+$")})),_0x70d266;_0x39a6fc();var _0x353f2e=void 0;class _0x47a70a{constructor(){this._layerAdded=new WebGLPlot$f.Event,this._layerDeleted=new WebGLPlot$f.Event,this._layerActived=new WebGLPlot$f.Event,this._layerEditableChanged=new WebGLPlot$f.Event,this._layerVisibleChanged=new WebGLPlot$f.Event,this._layerSelectedChanged=new WebGLPlot$f.Event,this._symbolAdded=new WebGLPlot$f.Event,this._symbolDeleted=new WebGLPlot$f.Event,this._symbolBeforeDeleted=new WebGLPlot$f.Event,this._symbolModified=new WebGLPlot$f.Event,this._symbolUpdated=new WebGLPlot$f.Event,this._symbolDestroyed=new WebGLPlot$f.Event,this._symbolSelected=new WebGLPlot$f.Event,this._symbolUnSelected=new WebGLPlot$f.Event,this._animationCreated=new WebGLPlot$f.Event,this._animationDeleted=new WebGLPlot$f.Event,this._animationModified=new WebGLPlot$f.Event,this._animationBegined=new WebGLPlot$f.Event,this._animationFinished=new WebGLPlot$f.Event,this._animationJsonEnd=new WebGLPlot$f.Event}static getInstance(){return _0x353f2e||(_0x353f2e=new _0x47a70a),_0x353f2e}}Object.defineProperties(_0x47a70a.prototype,{layerAdded:{get:function(){return this._layerAdded}},layerDeleted:{get:function(){return this._layerDeleted}},layerActived:{get:function(){return this._layerActived}},layerEditableChanged:{get:function(){return this._layerEditableChanged}},layerVisibleChanged:{get:function(){return this._layerVisibleChanged}},layerSelectedChanged:{get:function(){return this._layerSelectedChanged}},symbolAdded:{get:function(){return this._symbolAdded}},symbolBeforeDeleted:{get:function(){return this._symbolBeforeDeleted}},symbolDeleted:{get:function(){return this._symbolDeleted}},symbolModified:{get:function(){return this._symbolModified}},symbolUpdated:{get:function(){return this._symbolUpdated}},symbolDestroyed:{get:function(){return this._symbolDestroyed}},symbolSelected:{get:function(){return this._symbolSelected}},symbolUnSelected:{get:function(){return this._symbolUnSelected}},animationCreated:{get:function(){return this._animationCreated}},animationDeleted:{get:function(){return this._animationDeleted}},animationModified:{get:function(){return this._animationModified}},animationBegined:{get:function(){return this._animationBegined}},animationFinished:{get:function(){return this._animationFinished}},animationJsonEnd:{get:function(){return this._animationJsonEnd}}});var _0x12187b=(_0x1ea24b=!0,function(e,t){var i=_0x1ea24b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ea24b=!1,i}),_0x53fd83=_0x12187b(void 0,(function(){return _0x53fd83.toString().search("(((.+)+)+)+$").toString().constructor(_0x53fd83).search("(((.+)+)+)+$")})),_0x1ea24b;function _0x53d051(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._graphicObject=WebGLPlot.defaultValue(e.graphicObject,void 0),this._lineColor=WebGLPlot.defaultValue(e.lineColor,new WebGLPlot.Color(1,0,0,1)),this._lineWidth=WebGLPlot.defaultValue(e.lineWidth,3),this._fillBackColor=WebGLPlot.defaultValue(e.fillBackColor,new WebGLPlot.Color(1,0,0,1)),this._fillBackOpaque=WebGLPlot.defaultValue(e.fillBackOpaque,!1),this._fillGradientAngle=WebGLPlot.defaultValue(e.fillGradientAngle,0),this._fillGradientMode=WebGLPlot.defaultValue(e.fillGradientMode,_0x83f1a2.None),this._fillGradientOffsetRatioY=WebGLPlot.defaultValue(e.fillGradientOffsetRatioY,0),this._fillGradientOffsetRatioX=WebGLPlot.defaultValue(e.fillGradientOffsetRatioX,0),this._fillForeColor=WebGLPlot.defaultValue(e.fillForeColor,new WebGLPlot.Color(1,0,0,1)),this._fillSymbolID=WebGLPlot.defaultValue(e.fillSymbolID,1),this._fillOpaqueRate=WebGLPlot.defaultValue(e.fillOpaqueRate,70),this._surroundLineColor=WebGLPlot.defaultValue(e.surroundLineColor,WebGLPlot.Color.YELLOW),this._surroundLineType=WebGLPlot.defaultValue(e.surroundLineType,0),this._surroundLineWidth=WebGLPlot.defaultValue(e.surroundLineWidth,3),this._opacity=WebGLPlot.defaultValue(e.opacity,1)}_0x53fd83(),_0x53d051.prototype.clone=function(){var e=new _0x53d051;return e._graphicObject=this._graphicObject,e._lineColor=WebGLPlot.Color.clone(this._lineColor),e._lineWidth=JSON.parse(JSON.stringify(void 0!==this._lineWidth?this._lineWidth:3)),e._fillBackColor=WebGLPlot.Color.clone(this._fillBackColor),e._fillBackOpaque=JSON.parse(JSON.stringify(void 0!==this._fillBackOpaque&&this._fillBackOpaque)),e._fillGradientAngle=JSON.parse(JSON.stringify(void 0!==this._fillGradientAngle?this._fillGradientAngle:0)),e._fillGradientMode=JSON.parse(JSON.stringify(void 0!==this._fillGradientMode?this._fillGradientMode:_0x83f1a2.None)),e._fillGradientOffsetRatioY=JSON.parse(JSON.stringify(void 0!==this._fillGradientOffsetRatioY?this._fillGradientOffsetRatioY:0)),e._fillGradientOffsetRatioX=JSON.parse(JSON.stringify(void 0!==this._fillGradientOffsetRatioX?this._fillGradientOffsetRatioX:0)),e._fillForeColor=WebGLPlot.Color.clone(this._fillForeColor),e._fillSymbolID=JSON.parse(JSON.stringify(void 0!==this._fillSymbolID?this._fillSymbolID:1)),e._fillOpaqueRate=JSON.parse(JSON.stringify(void 0!==this._fillOpaqueRate?this._fillOpaqueRate:70)),e._surroundLineColor=WebGLPlot.Color.clone(this._surroundLineColor),e._surroundLineType=JSON.parse(JSON.stringify(void 0!==this._surroundLineType?this._surroundLineType:0)),e._surroundLineWidth=JSON.parse(JSON.stringify(void 0!==this._surroundLineWidth?this._surroundLineWidth:3)),e._opacity=JSON.parse(JSON.stringify(void 0!==this._opacity?this._opacity:1)),e},_0x53d051.prototype.update=function(){this._graphicObject&&(this._graphicObject._initialize=!1,this._graphicObject._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this._graphicObject))},Object.defineProperties(_0x53d051.prototype,{lineColor:{get:function(){return this._lineColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._lineColor))return;this._lineColor=e,this.update()}}},lineWidth:{get:function(){return this._lineWidth},set:function(e){e!==this._lineWidth&&(this._lineWidth=e,this._graphicObject._CorridorWidth=-1,this.update())}},fillBackColor:{get:function(){return this._fillBackColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._fillBackColor))return;this._fillBackColor=e,this.update()}}},fillForeColor:{get:function(){return this._fillForeColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._fillForeColor))return;this._fillForeColor=e,this.update()}}},fillBackOpaque:{get:function(){return this._fillBackOpaque},set:function(e){e!==this._fillBackOpaque&&(this._fillBackOpaque=e,this.update())}},fillGradientAngle:{get:function(){return this._fillGradientAngle},set:function(e){e!==this._fillGradientAngle&&(this._fillGradientAngle=e,this.update())}},fillGradientMode:{get:function(){return this._fillGradientMode},set:function(e){e!==this._fillGradientMode&&(this._fillGradientMode=e,this.update())}},fillGradientOffsetRatioY:{get:function(){return this._fillGradientOffsetRatioY},set:function(e){e===this._fillGradientOffsetRatioY||this._fillGradientOffsetRatioY<0||this._fillGradientOffsetRatioY>100||(this._fillGradientOffsetRatioY=e,this.update())}},fillGradientOffsetRatioX:{get:function(){return this._fillGradientOffsetRatioX},set:function(e){e===this._fillGradientOffsetRatioX||this._fillGradientOffsetRatioX<0||this._fillGradientOffsetRatioX>100||(this._fillGradientOffsetRatioX=e,this.update())}},fillSymbolID:{get:function(){return this._fillSymbolID},set:function(e){e!==this._fillSymbolID&&(this._fillSymbolID=e,this.update())}},fillOpaqueRate:{get:function(){return this._fillOpaqueRate},set:function(e){e===this._fillOpaqueRate||e>100||e<0||(this._fillOpaqueRate=e,this.update())}},surroundLineWidth:{get:function(){return this._surroundLineWidth},set:function(e){e!==this._surroundLineWidth&&(this._surroundLineWidth=e,this.update())}},surroundLineColor:{get:function(){return this._surroundLineColor},set:function(e){e!==this._surroundLineColor&&(this._surroundLineColor=e,this.update())}},opacity:{get:function(){return this._opacity},set:function(e){e!==this._opacity&&(this._opacity=e,this.update())}},surroundLineType:{get:function(){return this._surroundLineType},set:function(e){e!==this._surroundLineType&&(this._surroundLineType=e,this.update())}}});var _0x19a446=(_0x236add=!0,function(e,t){var i=_0x236add?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x236add=!1,i}),_0x495a1d=_0x19a446(void 0,(function(){return _0x495a1d.toString().search("(((.+)+)+)+$").toString().constructor(_0x495a1d).search("(((.+)+)+)+$")})),_0x236add;function _0x34d1aa(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._graphicObject=WebGLPlot.defaultValue(e.graphicObject,void 0),this._fontHeight=WebGLPlot.defaultValue(e.fontHeight,508/96),this._foreColor=WebGLPlot.defaultValue(e.foreColor,WebGLPlot.Color.WHITE),this._backColor=WebGLPlot.defaultValue(e.backColor,new WebGLPlot.Color(1,0,0,.3)),this._outline=WebGLPlot.defaultValue(e.outline,!0),this._fontName=WebGLPlot.defaultValue(e.fontName,WebGLPlot.plotI18n("SongTi")),this._italic=WebGLPlot.defaultValue(e.italic,!1),this._bold=WebGLPlot.defaultValue(e.bold,!0),this._align=WebGLPlot.defaultValue(e.align,0),this._italicAngle=WebGLPlot.defaultValue(e.italicAngle,0),this._shadow=WebGLPlot.defaultValue(e.shadow,!1),this._sizeFixed=WebGLPlot.defaultValue(e.sizeFixed,!0),this._underline=WebGLPlot.defaultValue(e.underline,!1),this._rotation=WebGLPlot.defaultValue(e.rotation,0),this._backOpaque=WebGLPlot.defaultValue(e.backOpaque,!1),this._strikeout=WebGLPlot.defaultValue(e.strikeout,!1),this._borderSpacingWidth=WebGLPlot.defaultValue(e.borderSpacingWidth,4),this._outlineWidth=WebGLPlot.defaultValue(e.outlineWidth,1),this._fontWidth=WebGLPlot.defaultValue(e.fontWidth,0),this._opaqueRate=WebGLPlot.defaultValue(e.opaqueRate,255),this._stringAlignment=WebGLPlot.defaultValue(e.stringAlignment,0),this._text3DScale=WebGLPlot.defaultValue(e.text3DScale,1),this._fontWeight=WebGLPlot.defaultValue(e.fontWeight,0),this._fontSize=WebGLPlot.defaultValue(e.fontSize,20),this._textBoxColor=WebGLPlot.defaultValue(e.textBoxColor,new WebGLPlot.Color(1,0,0,.3)),this._textBoxLineColor=WebGLPlot.defaultValue(e.textBoxLineColor,new WebGLPlot.Color(1,0,0,.8)),this._isShowTextBox=WebGLPlot.defaultValue(e.isShowTextBox,!1)}_0x495a1d(),_0x34d1aa.prototype.setTextRectColor=function(e,t){this._textBoxLineColor=WebGLPlot.Color.clone(e),this._textBoxColor=new WebGLPlot.Color(e.red,e.green,e.blue,.3),WebGLPlot.defined(t)&&t&&this.update()},_0x34d1aa.prototype.clone=function(){var e=new _0x34d1aa;return e._graphicObject=this._graphicObject,e._fontHeight=JSON.parse(JSON.stringify(void 0!==this._fontHeight?this._fontHeight:508/96)),e._foreColor=WebGLPlot.Color.clone(this._foreColor),e._backColor=WebGLPlot.Color.clone(this._backColor),e._outline=JSON.parse(JSON.stringify(void 0!==this._outline&&this._outline)),e._fontName=JSON.parse(JSON.stringify(void 0!==this._fontName?this._fontName:WebGLPlot.plotI18n("SongTi"))),e._italic=JSON.parse(JSON.stringify(void 0!==this._italic&&this._italic)),e._bold=JSON.parse(JSON.stringify(void 0===this._bold||this._bold)),e._align=JSON.parse(JSON.stringify(void 0!==this._align?this._align:0)),e._italicAngle=JSON.parse(JSON.stringify(void 0!==this._italicAngle?this._italicAngle:0)),e._shadow=JSON.parse(JSON.stringify(void 0!==this._shadow?this._shadow:0)),e._sizeFixed=JSON.parse(JSON.stringify(void 0!==this._sizeFixed&&this._sizeFixed)),e._underline=JSON.parse(JSON.stringify(void 0!==this._underline?this._underline:0)),e._rotation=JSON.parse(JSON.stringify(void 0!==this._rotation?this._rotation:0)),e._backOpaque=JSON.parse(JSON.stringify(void 0!==this._backOpaque?this._backOpaque:0)),e._strikeout=JSON.parse(JSON.stringify(void 0!==this._strikeout?this._strikeout:0)),e._borderSpacingWidth=JSON.parse(JSON.stringify(void 0!==this._borderSpacingWidth?this._borderSpacingWidth:4)),e._outlineWidth=JSON.parse(JSON.stringify(void 0!==this._outlineWidth?this._outlineWidth:1)),e._opaqueRate=JSON.parse(JSON.stringify(void 0!==this._opaqueRate?this._opaqueRate:255)),e._stringAlignment=JSON.parse(JSON.stringify(void 0!==this._stringAlignment?this._stringAlignment:0)),e._text3DScale=JSON.parse(JSON.stringify(void 0!==this._text3DScale?this._text3DScale:1)),e._fontWeight=JSON.parse(JSON.stringify(void 0!==this._fontWeight?this._fontWeight:0)),e._fontSize=JSON.parse(JSON.stringify(void 0!==this._fontSize?this._fontSize:20)),e._textBoxColor=WebGLPlot.Color.clone(this._textBoxColor),e._textBoxLineColor=WebGLPlot.Color.clone(this._textBoxLineColor),e._isShowTextBox=JSON.parse(JSON.stringify(void 0!==this._isShowTextBox&&this._isShowTextBox)),e},Object.defineProperties(_0x34d1aa.prototype,{fontHeight:{get:function(){return this._fontHeight},set:function(e){e!==this._fontHeight&&(this._fontHeight=e,this._fontSize=parseInt(96*e/25.4),this.update())}},foreColor:{get:function(){return this._foreColor},set:function(e){e===this._foreColor||!(e instanceof WebGLPlot.Color)||(this._foreColor=e,this.update())}},backColor:{get:function(){return this._backColor},set:function(e){e!==this._backColor&&(this._backColor=e,this.update())}},outline:{get:function(){return this._outline},set:function(e){e!==this._outline&&(this._outline=e,this.update())}},fontName:{get:function(){return this._fontName},set:function(e){e!==this._fontName&&(this._fontName=e,this.update())}},italic:{get:function(){return this._italic},set:function(e){e!==this._italic&&(this._italic=e,this.update())}},bold:{get:function(){return this._bold},set:function(e){e!==this._bold&&(this._bold=e,this.update())}},align:{get:function(){return this._align},set:function(e){e!==this._italic&&(this._align=e,this.update())}},italicAngle:{get:function(){return this._italicAngle},set:function(e){e!==this._italicAngle&&(this._italicAngle=e,this.update())}},shadow:{get:function(){return this._shadow},set:function(e){e!==this._shadow&&(this._shadow=e,this.update())}},sizeFixed:{get:function(){return this._sizeFixed},set:function(e){e!==this._sizeFixed&&(this._sizeFixed=e,this.update())}},underline:{get:function(){return this._underline},set:function(e){e!==this._underline&&(this._underline=e,this.update())}},backOpaque:{get:function(){return this._backOpaque},set:function(e){e!==this._backOpaque&&(this._backOpaque=e,this.update())}},strikeout:{get:function(){return this._strikeout},set:function(e){e!==this._strikeout&&(this._strikeout=e,this.update())}},borderSpacingWidth:{get:function(){return this._borderSpacingWidth},set:function(e){e!==this._borderSpacingWidth&&(this._borderSpacingWidth=e,this.update())}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){e!==this._outlineWidth&&(this._outlineWidth=e,this.update())}},fontWidth:{get:function(){return this._fontWidth},set:function(e){e!==this._fontWidth&&(this._fontWidth=e,this.update())}},opaqueRate:{get:function(){return this._opaqueRate},set:function(e){e!==this._opaqueRate&&(this._opaqueRate=e,this.update())}},stringAlignment:{get:function(){return this._stringAlignment},set:function(e){e!==this._stringAlignment&&(this._stringAlignment=e,this.update())}},text3DScale:{get:function(){return this._text3DScale},set:function(e){e!==this._text3DScale&&(this._text3DScale=e,this.update())}},fontWeight:{get:function(){return this._fontWeight},set:function(e){e!==this._fontWeight&&(this._fontWeight=e,this.update())}},fontSize:{get:function(){return this._fontSize},set:function(e){e!==this._fontSize&&(this._fontSize=e,this._fontHeight=25.4*e/96,this.update())}},textBoxColor:{get:function(){return this._textBoxColor},set:function(e){e!==this._textBoxColor&&(this._textBoxColor=e,this.update())}},textBoxLineColor:{get:function(){return this._textBoxLineColor},set:function(e){e!==this._textBoxLineColor&&(this._textBoxLineColor=e,this.update())}},isShowTextBox:{get:function(){return this._isShowTextBox},set:function(e){e!==this._isShowTextBox&&(this._isShowTextBox=e,this.update())}}}),_0x34d1aa.prototype.update=function(){this._graphicObject&&(this._graphicObject._initialize=!1,this._graphicObject._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this._graphicObject))};var _0x38cb4d=(_0x45cbfd=!0,function(e,t){var i=_0x45cbfd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45cbfd=!1,i}),_0x51c58b=_0x38cb4d(void 0,(function(){return _0x51c58b.toString().search("(((.+)+)+)+$").toString().constructor(_0x51c58b).search("(((.+)+)+)+$")})),_0x45cbfd;_0x51c58b();var _0x1fb934={LeftUp:0,LeftDown:1,RightUp:2,RightDown:3,Up:4,Down:5,Left:6,Right:7,Middle:8},_0x4c2bdd=Object.freeze(_0x1fb934),_0x4515fb=(_0x4c4679=!0,function(e,t){var i=_0x4c4679?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c4679=!1,i}),_0x265de0=_0x4515fb(void 0,(function(){return _0x265de0.toString().search("(((.+)+)+)+$").toString().constructor(_0x265de0).search("(((.+)+)+)+$")})),_0x4c4679;_0x265de0();var _0x490e97={Vector:0,Grid:1,Marker:2,Picture:3,Unkown:4},_0x4e5d29=Object.freeze(_0x490e97),_0x202964=(_0x3050a1=!0,function(e,t){var i=_0x3050a1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3050a1=!1,i}),_0x596b4b=_0x202964(void 0,(function(){return _0x596b4b.toString().search("(((.+)+)+)+$").toString().constructor(_0x596b4b).search("(((.+)+)+)+$")})),_0x3050a1;function _0x2d6822(){}_0x596b4b(),_0x2d6822.clearNextSamePts=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)&&this.equalFuzzy(e[i].z,e[i+1].z)?(e.splice(i,1),t--):i++;return e},_0x2d6822.clearNextSamePtsXY=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)?(e.splice(i,1),t--):i++;return e},_0x2d6822.clearSamePts=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)&&this.equalFuzzy(e[i].z,e[i+1].z)?(e.splice(i,1),t--):i++;return e},_0x2d6822.clearSamePtsXY=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)?(e.splice(i,1),t--):i++;return e},_0x2d6822.equalFuzzy=function(e,t,i){return WebGLPlot$f.defined(i)||(i=1e-31),Math.abs(e-t)<=i},_0x2d6822.distance=function(e,t){return WebGLPlot$f.defined(e)&&WebGLPlot$f.defined(t)?Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)):0},_0x2d6822.distance3D=function(e,t){return WebGLPlot$f.defined(e)&&WebGLPlot$f.defined(t)?Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)+(e.z-t.z)*(e.z-t.z)):0},_0x2d6822.isRight=function(e,t,i){var n=t,r=i,o=t,a=e;return(r.x-n.x)*(a.y-o.y)-(a.x-o.x)*(r.y-n.y)<0},_0x2d6822.isPloyClockwise=function(e){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),i=t.length;if(!(i<3)){var n=t[0].y*(t[i-1].x-t[1].x);t.push(t[0].clone());for(var r=1;r<i;++r)n+=t[r].y*(t[r-1].x-t[r+1].x);return!(n>0)}},_0x2d6822.parallel=function(e,t){var i=[];if(!WebGLPlot$f.defined(e)||e.length<2)return i;var n=!1;e.length>3&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y&&e[0].z===e[e.length-1].z&&(n=!0),n?(i[0]=this.findBisectorPoint(e[e.length-2],e[0],e[1],t),i[e.length-1]=i[0]):(i[0]=this.findPoint(e[0],e[1],t,90),i[e.length-1]=this.findPoint(e[e.length-1],e[e.length-2],-t,90));for(var r=e[0],o=e[1],a=e[1],s=1;s<e.length-1;++s)if(o=e[s],e[s]!==e[s-1]&&(r=e[s-1]),e[s]!==e[s+1]){a=e[s+1];var l=this.findBisectorPoint(r,o,a,t);this.isCross(r,i[s-1],o,l)&&(l=i[s-1]),i[s]=l}return i},_0x2d6822.isCross=function(e,t,i,n){var r=new _0x11ff81(0,0,0);return!(!this.intersectLineSegs(e,t,i,n,r)||r===e||r===t||r===i||r===n)},_0x2d6822.intersectLineSegs=function(e,t,i,n,r){if(this.equalFuzzy(e.x,t.x)&&this.equalFuzzy(e.y,t.y)&&this.equalFuzzy(e.z,t.z))return r.x=e.x,r.y=e.y,!1;if(this.equalFuzzy(i.x,n.x)&&this.equalFuzzy(i.y,n.y)&&this.equalFuzzy(i.z,n.z))return r.x=i.x,r.y=i.y,!1;var o=1e-16,a=0,s=0;if(a=e.x>t.x?e.x:t.x,s=e.x<t.x?e.x:t.x,i.x-a>o&&n.x-a>o||i.x-s<-1e-16&&n.x-s<-1e-16||(a=e.y>t.y?e.y:t.y,s=e.y<t.y?e.y:t.y,i.y-a>o&&n.y-a>o||i.y-s<-1e-16&&n.y-s<-1e-16))return!1;var l=t.x-e.x,u=t.y-e.y,c=n.x-i.x,h=n.y-i.y,d=e.x-i.x,f=e.y-i.y,p=l*h-c*u,_=p;if(Math.abs(l)>1e-31&&Math.abs(c)>1e-31&&(_/=l*c),Math.abs(_)<1e-31)return e===i?(r.x=e.x,r.y=e.y,!this.isSameQuadrant(e,t,i,n)):t===n?(r.x=t.x,r.y=t.y,!this.isSameQuadrant(e,t,i,n)):e===n?(r.x=e.x,r.y=e.y,this.isSameQuadrant(e,t,i,n)):t===i&&(r.x=t.x,r.y=t.y,this.isSameQuadrant(e,t,i,n));var m=(l*f-u*d)/p,g=(c*f-h*d)/p;return!(m<0&&(Math.abs(m*c)>o||Math.abs(m*h)>o)||m>1&&(Math.abs((m-1)*c)>o||Math.abs((m-1)*h)>o)||g<0&&(Math.abs(g*l)>o||Math.abs(g*u)>o)||g>1&&(Math.abs((g-1)*l)>o||Math.abs((g-1)*u)>o))&&(Math.abs(m)<1e-31?(r.x=i.x,r.y=i.y,!0):Math.abs(m-1)<1e-31?(r.x=n.x,r.y=n.y,!0):Math.abs(g)<1e-31?(r.x=e.x,r.y=e.y,!0):Math.abs(g-1)<1e-31?(r.x=t.x,r.y=t.y,!0):!(m<0&&(Math.abs(m*c)>o||Math.abs(m*h)>o)||m>1&&(Math.abs((m-1)*c)>o||Math.abs((m-1)*h)>o)||g<0&&(Math.abs(g*l)>o||Math.abs(g*u)>o)||g>1&&(Math.abs((g-1)*l)>o||Math.abs((g-1)*u)>o))&&(r.x=m*c+i.x,r.y=m*h+i.y,!0))},_0x2d6822.plumbLineLen=function(e,t,i){return this.distance(e,t)*Math.sin(this.innerAngle(t,e,i))},_0x2d6822.innerAngle=function(e,t,i){if(e===t||e===i)return 0;var n=this.distance(e,t),r=this.distance(e,i),o=this.distance(t,i),a=(n*n+r*r-o*o)/(2*n*r);return a>1&&this.equalFuzzy(a,1)?a=1:a<1&&this.equalFuzzy(a,-1)&&(a=-1),Math.acos(a)},_0x2d6822.isSameQuadrant=function(e,t,i,n){var r=(t.x-e.x)*(n.x-i.x),o=(t.y-e.y)*(n.y-i.y);return!(Math.abs(r)<1e-31&&Math.abs(o)<1e-31)&&((r>0||Math.abs(r)<1e-31)&&(o>0||Math.abs(o)<1e-31))},_0x2d6822.findPoint=function(e,t,i,n){if(e===t||Math.abs(i)<1e-31)return e;var r=this.radian(e,t)+n*Math.PI/180;return new _0x11ff81(e.x+i*Math.cos(r),e.y+i*Math.sin(r),e.z)},_0x2d6822.LinePnt=function(e,t,i){var n=_0x2d6822.distance(e,t);if(0===n)return e;var r=i/n;return _0x2d6822.FindPointOnLineByRatio(r,e,t)},_0x2d6822.FindPointOnLineByRatio=function(e,t,i){var n=new _0x11ff81(0,0,0);return n.x=t.x+(i.x-t.x)*e,n.y=t.y+(i.y-t.y)*e,n.z=t.z+(i.z-t.z)*e,n},_0x2d6822.getPolygonCenterPt=function(e){if(!e||null===e||0===e.length)return null;for(var t=0,i=0,n=0,r=0;r<e.length;r++)t+=e[r].x,i+=e[r].y,n+=e[r].z;return new _0x11ff81(t/e.length,i/e.length,n/e.length)},_0x2d6822.findBisectorPoint=function(e,t,i,n){var r=this.radian(t,e),o=(r+this.radian(t,i))/2,a=Math.cos(o-r+Math.PI/2),s=n;return this.isNear(a,.15)||(s=n/a),new _0x11ff81(t.x+s*Math.cos(o),t.y+s*Math.sin(o),t.z)},_0x2d6822.rotateAngle=function(e,t,i){var n=new _0x11ff81(0,0,0),r=t,o=Math.cos(r),a=Math.sin(r),s=i.x-e.x,l=i.y-e.y,u=i.z-e.z;return n.x=s*o-l*a+e.x,n.y=s*a+l*o+e.y,n.z=u*a+u*o+e.z,n},_0x2d6822.calcCirclePts=function(e,t,i){WebGLPlot$f.defined(i)||(i=72);for(var n=[],r=360/i,o=0;o<i-1;++o){var a=WebGLPlot$f.CesiumMath.toRadians(o*r);n.push(new _0x11ff81(t.x+e*Math.cos(a),t.y+e*Math.sin(a),t.z))}return n.push(n[0].clone()),n},_0x2d6822.circlePoint=function(e,t,i,n){return n*=Math.PI/180,new _0x11ff81(e.x+t*Math.cos(n),e.y+i*Math.sin(n),0)},_0x2d6822.generateBezierCtrlPts=function(e){var t=[],i=e.length;if(i<3)for(var n=0;n!=i;++n)t[n]=e[n].clone();else{var r=0;for(n=0;n<3*i-2;n+=3)"function"==typeof e[r].clone?t[n]=e[r].clone():t[n]=new _0x11ff81(e[r].x,e[r].y,e[r].z),t[n+1]=new _0x11ff81(0,0,e[r].z),t[n+2]=new _0x11ff81(0,0,e[r].z),r++;for(n=1;n<i-1;++n)this.generateTrianglePoints(8,3,e[n-1],e[n],e[n+1],t[3*n-1],t[3*n+1]);this.getTrapezoidPoints(.6,t[0],t[3],t[2],t[1]),this.getTrapezoidPoints(.6,t[3*i-3],t[3*i-6],t[3*i-5],t[3*i-4]),"function"==typeof e[i-1].clone?t[3*i-1]=t[3*i-2]=e[i-1].clone():t[3*i-1]=t[3*i-2]=new _0x11ff81(e[i-1].x,e[i-1].y,e[i-1].z)}return t},_0x2d6822.generateBezierPointsWithCtrlPts=function(e){var t=e.length,i=[];if(e.length<3)for(var n=0;n<t;++n)i[n]=e[n].clone();else{t/=3;for(n=0;n<3*t&&!(n+4>=3*t);n+=3){var r=e[n].x,o=e[n].y,a=e[n].z,s=e[n+1].x,l=e[n+1].y,u=e[n+1].z,c=e[n+2].x,h=e[n+2].y,d=e[n+2].z,f=e[n+3].x,p=e[n+3].y,_=e[n+3].z;if(this.equalFuzzy(r,s,1e-10)&&this.equalFuzzy(o,l,1e-10)&&this.equalFuzzy(c,f,1e-10)&&this.equalFuzzy(h,p,1e-10))i.push(new _0x11ff81(r,o,a)),i.push(new _0x11ff81(c,h,d));else for(var m=0;m<=1;m+=.03125){var g,x,v,y,$=m*m,b=$*m,T=new _0x11ff81((g=1-3*m+3*$-b)*r+(x=3*(m-2*$+b))*s+(v=3*($-b))*c+(y=b)*f,g*o+x*l+v*h+y*p,g*a+x*u+v*d+y*_);i.push(T)}}}return i},_0x2d6822.generateBeizerPointsNoCtrlPt=function(e){var t=_0x2d6822.generateBezierCtrlPts(e);return _0x2d6822.generateBezierPointsWithCtrlPts(t)},_0x2d6822.generateBezierPtsWithScalePts=function(e,t,i,n){var r=[],o=e.x,a=e.y,s=t.x,l=t.y,u=i.x,c=i.y,h=n.x,d=n.y;if(this.equalFuzzy(o,s,1e-10)&&this.equalFuzzy(a,l,1e-10)&&this.equalFuzzy(u,h,1e-10)&&this.equalFuzzy(c,d,1e-10))r.push(new _0x11ff81(o,a,0)),r.push(new _0x11ff81(u,c,0));else for(var f=0;f<=1;f+=.03125){var p,_,m,g,x=f*f,v=x*f,y=new _0x11ff81((p=1-3*f+3*x-v)*o+(_=3*(f-2*x+v))*s+(m=3*(x-v))*u+(g=v)*h,p*a+_*l+m*c+g*d,0);r.push(y)}return r},_0x2d6822.generateTrianglePoints=function(e,t,i,n,r,o,a){var s=i.x,l=i.y,u=i.z,c=n.x,h=n.y,d=n.z,f=r.x,p=r.y,_=r.z;this.getPointsByTriangle(e,t,s,l,u,c,h,d,f,p,_,o,a)},_0x2d6822.getPointsByTriangle=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=o+(l-i),p=a+(u-n),_=0,m=0;if(i==l)_=i,m=p;else if(n==u)_=f,m=n;else{var g=1*(u-n)/(l-i),x=n-i*g;m=g*(_=(p+f/g-x)/(g+1/g))+x}var v=Math.sqrt(1*(o-f)*(o-f)+1*(a-p)*(a-p)),y=Math.sqrt(1*(i-o)*(i-o)+1*(n-a)*(n-a)),$=Math.sqrt(1*(o-l)*(o-l)+1*(a-u)*(a-u)),b=0;f=_+(f-_)*(b=y+$?1+($-y)*e/($+y):1),p=m+(p-m)*b,0==v&&(v=1),h.x=o+(o-f)*y/(t*v),h.y=a+(a-p)*y/(t*v),h.z=r,d.x=o+(f-o)*$/(t*v),d.y=a+(p-a)*$/(t*v),d.z=c},_0x2d6822.getPtsByTriangle=function(e,t,i,n,r){var o=new _0x11ff81(0,0,0);new _0x11ff81(0,0,0);var a=0,s=0;return a=this.distance(r,i),s=this.distance(n,r),1==t&&(a*=2),2==t&&(s*=2),o.x=(a*n.x+s*i.x)/(a+s),o.y=(a*n.y+s*i.y)/(a+s),{pl:this.getWhichPtOfNormal(e,i,o,r),pr:this.getWhichPtOfNormal(e,n,o,r)}},_0x2d6822.getWhichPtOfNormal=function(e,t,i,n){new _0x11ff81(0,0,0),new _0x11ff81(0,0,0);var r=0;r=this.distance(n,t)/e;var o=this.getPointsOfNormal(r,i,n);return this.distance(t,o.pt4)>=(r=this.distance(t,o.pt3))?o.pt3:o.pt4},_0x2d6822.getTrapezoidPoints=function(e,t,i,n,r){var o=t.x,a=t.y,s=t.z,l=i.x,u=i.y,c=i.z,h=n.x,d=n.y,f=n.z;this.getPointsByTrapezoid(e,o,a,s,l,u,c,h,d,f,r)},_0x2d6822.getPointsByTrapezoid=function(e,t,i,n,r,o,a,s,l,u,c){var h=0,d=0,f=0,p=0;if(0===Math.abs(i-o))h=t+r-s,d=l;else if(0==Math.abs(t-r))h=s,d=i+o-l;else{var _=1*(i-o)/(t-r),m=l-_*s;d=_*(h=((o+i)/2+(t+r)/(2*_)-m)/(_+1/_))+m,h=2*h-s,d=2*d-l}var g=Math.sqrt(1*(t-r)*(t-r)+1*(i-o)*(i-o)),x=Math.sqrt(1*(t-h)*(t-h)+1*(i-d)*(i-d));return g>0?(f=t+(r-t)*x/g,p=i+(o-i)*x/g):(f=t,p=i),c.x=f+(h-f)*e,c.y=p+(d-p)*e,c.z=u,c},_0x2d6822.generateArcInfo=function(e,t,i){var n={};n.pntCenter=new _0x11ff81(0,0,0),n.dRadius=0,n.dStartAngle=0,n.dEndAngle=0;var r=t.x-e.x,o=t.y-e.y;if(Math.abs(r)<1e-31){var a={};(l={}).x=(t.x+e.x)/2,l.y=(t.y+e.y)/2,a.x=(t.x+i.x)/2,a.y=(t.y+i.y)/2;var s=0;Math.abs(i.x-t.x)>=1e-31&&(s=(i.y-t.y)/(i.x-t.x)),n.pntCenter.y=l.y,Math.abs(s)<1e-31?n.pntCenter.x=a.x:n.pntCenter.x=a.x-s*(l.y-a.y)}else{var l;a={};(l={}).x=(t.x+e.x)/2,l.y=(t.y+e.y)/2,a.x=(t.x+i.x)/2,a.y=(t.y+i.y)/2;var u=o/r,c=1;Math.abs(u)<1e-31?(n.pntCenter.x=l.x,Math.abs(i.x-t.x<1e-31)?n.pntCenter.y=a.y:n.pntCenter.y=-(i.x-t.x)/(i.y-t.y)*(n.pntCenter.x-a.x)+a.y):Math.abs(i.x-t.x)<1e-31?(n.pntCenter.y=a.y,n.pntCenter.x=-u*(n.pntCenter.y-l.y)+l.x):(c=(i.y-t.y)/(i.x-t.x),n.pntCenter.x=(u*c*(l.y-a.y)+c*l.x-u*a.x)/(c-u),n.pntCenter.y=(a.x-l.x+c*a.y-u*l.y)/(c-u))}var h=Math.atan2(e.y-n.pntCenter.y,e.x-n.pntCenter.x),d=Math.atan2(i.y-n.pntCenter.y,i.x-n.pntCenter.x);if(this.isCounterClockwise(e,t,i)){for(;h>=2*Math.PI;)h-=2*Math.PI;for(;h<0;)h+=2*Math.PI;for(;d>2*Math.PI;)d-=2*Math.PI;for(;d<h;)d+=2*Math.PI}else{for(;d>=2*Math.PI;)d-=2*Math.PI;for(;d<0;)d+=2*Math.PI;for(;h>2*Math.PI;)h-=2*Math.PI;for(;d>h;)h+=2*Math.PI;var f=h;h=d,d=f}return n.dRadius=Math.sqrt((n.pntCenter.x-e.x)*(n.pntCenter.x-e.x)+(n.pntCenter.y-e.y)*(n.pntCenter.y-e.y)),n.dEndAngle=180*d/Math.PI,n.dStartAngle=180*h/Math.PI,n},_0x2d6822.isCounterClockwise=function(e,t,i){return(i.x-t.x)*(e.y-t.y)-(e.x-t.x)*(i.y-t.y)>0},_0x2d6822.generateArcSpatialData=function(e,t,i,n,r,o,a){WebGLPlot$f.defined(a)||(a=36);var s=(o-r)/a,l=[];if(Math.abs(s)<1e-31)return l;for(;o<r;)o+=2*Math.PI;for(;o>r+2*Math.PI;)r+=2*Math.PI;var u=Math.cos(n)*t,c=Math.sin(n)*t,h=Math.cos(n)*i,d=Math.sin(n)*i,f=this.calcEllipseRadian(r,t,i),p=this.calcEllipseRadian(o,t,i);p-f<1e-31&&(p+=2*Math.PI);var _=Math.round(Math.abs((p-f)/s)+1);if(_<2)return l;for(var m=0;m<_-1;f+=s,m++){m===_-2&&(f=o);var g=e.x+u*Math.cos(f)-d*Math.sin(f),x=e.y+c*Math.cos(f)+h*Math.sin(f);l.push(new _0x11ff81(g,x,0))}return 0>l.length&&(l[l.length-1].x=e.x+u*Math.cos(p)-d*Math.sin(p),l[l.length-1].y=e.y+c*Math.cos(p)+h*Math.sin(p)),l},_0x2d6822.calcEllipseRadian=function(e,t,i){var n=e,r=t*Math.sin(e),o=i*Math.cos(e),a=Math.atan2(r,o);if(e>Math.PI)for(;n>Math.PI;)n-=2*Math.PI,a+=2*Math.PI;else if(e<-Math.PI)for(;n<-Math.PI;)n+=2*Math.PI,a-=2*Math.PI;return a},_0x2d6822.radian=function(e,t){var i=0,n=t.x-e.x,r=t.y-e.y;return(i=Math.atan2(r,n))<0&&(i+=2*Math.PI),i},_0x2d6822.intersectLines=function(e,t,i,n){var r={isIntersectLines:!1};if(e.x===t.x&&e.y===t.y||i.x===n.x&&i.y===n.y)return r;var o=t.x-e.x,a=t.y-e.y,s=n.x-i.x,l=n.y-i.y,u=o*l-s*a;if(this.isNear(u))return r;var c=(o*(e.y-i.y)-a*(e.x-i.x))/u,h=new _0x11ff81(0,0,0);return h.x=c*s+i.x,h.y=c*l+i.y,h.z=e.z,r.isIntersectLines=!0,r.intersectPoint=h,r},_0x2d6822.isNear=function(e,t){return t||(t=1e-31),e<t&&e>-t},_0x2d6822.calcKidneyShapePts=function(e){var t=[],i=[],n=e.length;if(0!==n){if(1===n)return void t.push(e[0]);if(2===n){var r=this.calcProtudeC3(e[0],e[1]);i.push(e[0]),i.push(e[1]),i.push(r)}else if(i.push(e[0]),i.push(e[1]),i.push(e[2]),(this.isSamePt(e[0],e[2])||this.isSamePt(e[1],e[2]))&&(t.push(e[0]),t.push(e[1])),this.isSamePt(e[0],e[1]))return t.push(e[0]),void t.push(e[2]);i=this.reNormalizeKidneyCtrlPoints(i);var o=new _0x11ff81(0,0,0),a=new _0x11ff81(0,0,0);o.x=.5*(i[0].x+i[1].x),o.y=.5*(i[0].y+i[1].y),a.x=o.x-.1*(i[2].x-o.x),a.y=o.y-.1*(i[2].y-o.y);var s=this.getPtsByTriangle(3,0,i[1],i[0],a);t.push(s.pr),t.push(a),t.push(s.pl);var l=this.getPtsByTriangle(4,2,i[2],i[0],i[1]);t.push(l.pr),t.push(i[1]),t.push(l.pl);var u=this.getPtsByTriangle(2,0,i[0],i[1],i[2]);t.push(u.pr),t.push(i[2]),t.push(u.pl);var c=this.getPtsByTriangle(4,1,i[1],i[2],i[0]);return t.push(c.pr),t.push(i[0]),t.push(c.pl),t}},_0x2d6822.generateKidneyShapePts=function(e){var t=[];if(2>e.length)return t;var i=this.calcKidneyShapePts(e);if(12!=i.length)return t;i.push(i[0]),i.push(i[1]),i.splice(0,1);for(var n=0;n<i.length-3;n+=3){var r;i.slice(n,n+4),r=this.generateBezierPtsWithScalePts(i[n],i[n+1],i[n+2],i[n+3]),t=t.concat(r)}return t},_0x2d6822.calcProtudeC3=function(e,t){var i,n=new _0x11ff81(0,0,0);return n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y),i=_0x2d6822.distance(t,e)/2.7,this.getPointsOfNormal(i,e,n).pt3},_0x2d6822.getPointsOfNormal=function(e,t,i){var n,r=new _0x11ff81(0,0,0),o=new _0x11ff81(0,0,0),a=new _0x11ff81(0,0,0);return 0==(n=this.distance(t,i))?(a.y=0,a.x=e):(a.x=e*(t.x-i.x)/n,a.y=e*(t.y-i.y)/n),r.x=-a.y+i.x,r.y=a.x+i.y,o.x=a.y+i.x,o.y=-a.x+i.y,{pt3:r,pt4:o}},_0x2d6822.isSamePt=function(e,t){return!!(this.equalFuzzy(e.x,t.x)&&this.equalFuzzy(e.y,t.y)&&this.equalFuzzy(e.z,t.z))},_0x2d6822.reNormalizeKidneyCtrlPoints=function(e){var t=[];t.push(new _0x11ff81(0,0,0)),t.push(new _0x11ff81(0,0,0)),t.push(new _0x11ff81(0,0,0));var i=e.length;if(!(i<2)){if(2==i)t[0]=e[0],t[1]=e[1],t[2]=this.calcProtudeC3(e[0],e[1]);else{var n,r,o,a=e[0],s=e[1],l=e[2];if(n=this.distance(s,a),r=this.distance(l,s),o=this.distance(a,l),r>=n&&r>=o){var u=a.clone();a=l.clone(),l=u.clone()}else if(o>=n&&o>=r){u=l.clone();l=s.clone(),s=u.clone()}if(!this.isRight(l,a,s)){u=a.clone();a=s.clone(),s=u.clone()}t[0]=a,t[1]=s,t[2]=l}return t}},_0x2d6822.pointIsRightToVerticle=function(e,t,i){var n=new WebGLPlot$f.Cartesian2(.5*(t.x+e.x),.5*(t.y+e.y)),r=new WebGLPlot$f.Cartesian2(t.x-e.x,t.y-e.y),o=new WebGLPlot$f.Cartesian2(i.x-n.x,i.y-n.y);return r.x*o.x+r.y*o.y>0},_0x2d6822.StringtoColor=function(e){if(e.length){var t;t=e.length<8?1:parseInt(e.slice(7,9),16)/255;var i=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255;return new WebGLPlot$f.Color(i,n,r,t)}return e},_0x2d6822.getPosition=function(e,t){if(WebGLPlot$f.defined(t)){var i=void 0,n=e.pickPosition(t);if(n){var r=WebGLPlot$f.Cartographic.fromCartesian(n);i=new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(r.longitude),WebGLPlot$f.CesiumMath.toDegrees(r.latitude),r.height<-1e4?0:r.height)}else if(n=e.camera.pickEllipsoid(t,e.globe.ellipsod)){r=WebGLPlot$f.Cartographic.fromCartesian(n);i=new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(r.longitude),WebGLPlot$f.CesiumMath.toDegrees(r.latitude),r.height)}return void 0===i||NaN===i.x||NaN===i.y||NaN===i.z?new WebGLPlot$f.Cartesian3:i}},_0x2d6822.getPosition2=function(e,t){if(!WebGLPlot$f.defined(t))return;let i=e.camera.pickEllipsoid(t,e.globe.ellipsod);var n=WebGLPlot$f.Cartographic.fromCartesian(i);const r=new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(n.longitude),WebGLPlot$f.CesiumMath.toDegrees(n.latitude),1);return void 0===r||NaN===r.x||NaN===r.y||NaN===r.z?new WebGLPlot$f.Cartesian3:r},_0x2d6822.getSurroundLinePts=function(e,t){var i=[],n=[];t*=_0x2d6822.innerOutlineDir(e);for(var r=0;r<e.length-1;r++){var o,a,s=[];if(!_0x2d6822.equalFuzzy(e[r].x,e[r+1].x)||!_0x2d6822.equalFuzzy(e[r].y,e[r+1].y)){s.push(e[r]),s.push(e[r+1]);var l=_0x2d6822.parallel(s,t);if(o=l[0],a=l[1],0!=i.length){var u=_0x2d6822.intersectLines(o,a,i[0],i[1]);if(u.isIntersectLines){var c=u.intersectPoint,h=_0x2d6822.distance(o,a);_0x2d6822.distance(c,a)>2*h||(n[n.length-1]=c),n.push(a)}else n.push(a)}else n.push(o),n.push(a);(i=[]).push(n[n.length-2]),i.push(n[n.length-1])}}if(e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y&&e[0].z===e[e.length-1].z&&1<n.length){var d=_0x2d6822.intersectLines(n[0],n[1],n[n.length-2],n[n.length-1]);if(d.isIntersectLines){var f=d.intersectPoint;n[n.length-1]=f,n[0]=f}}return n},_0x2d6822.innerOutlineDir=function(e){function t(e,t){function i(e){var t=Math.atan2(e.y,e.x);return t<0&&(t+=2*Math.PI),t}var n=i(t)-i(e);return n<-Math.PI&&(n+=2*Math.PI),n>Math.PI&&(n-=2*Math.PI),n}if((e=_0x2d6822.clearNextSamePts(e)).length<3)return 1;for(var i=0,n={x:0,y:0},r={x:0,y:0},o=2;o<e.length;o++)r.x=e[o].x-e[o-1].x,r.y=e[o].y-e[o-1].y,n.x=e[o-1].x-e[o-2].x,n.y=e[o-1].y-e[o-2].y,i+=t(n,r);return r.x=e[1].x-e[0].x,r.y=e[1].y-e[0].y,n.x=e[0].x-e[e.length-1].x,n.y=e[0].y-e[e.length-1].y,(i+=t(n,r))>=0?-1:1},_0x2d6822.isSpecialHeightSymbol=function(e,t){if(22===e)switch(t){case 1001:case 1002:case 1003:case 1004:case 1006:case 1007:case 1009:case 1011:return!0}return 50308===t||26400===t},_0x2d6822.isCanFill=function(e){if(!WebGLPlot$f.defined(e)||_0x18bc2f.SYMBOL_ALGO!==e.symbolType)return!1;switch(e.code){case 1001:case 1002:case 1003:case 1004:case 1006:case 1011:case 25200:return!0}return!1},_0x2d6822.isSymbolCellCanFill=function(e){return _0x18bc2f.SYMBOL_CHORD===e.type||_0x18bc2f.SYMBOL_ARBITRARYPOLYGON===e.type||_0x18bc2f.SYMBOL_POLYBEZIERCLOSED===e.type||_0x18bc2f.SYMBOL_PIE===e.type||_0x18bc2f.SYMBOL_CIRCLE===e.type||_0x18bc2f.SYMBOL_RECTANGLE===e.type||_0x18bc2f.SYMBOL_PARALLELOGRAM===e.type||_0x18bc2f.SYMBOL_ELLIPSE===e.type||_0x18bc2f.SYMBOL_TRAPEZOID===e.type||_0x18bc2f.SYMBOL_KIDNEY===e.type||_0x18bc2f.SYMBOL_REGULARPOLYGON===e.type||_0x18bc2f.SYMBOL_COMBINATIONALCIRCLE===e.type||_0x18bc2f.SYMBOL_CIRCLECHORD===e.type||_0x18bc2f.SYMBOL_CIRCLEPIE===e.type},_0x2d6822.getSpaceDistance=function(e,t){var i=WebGLPlot$f.Cartesian3.fromDegrees(e.x,e.y,e.z),n=WebGLPlot$f.Cartesian3.fromDegrees(t.x,t.y,t.z),r=WebGLPlot$f.Cartographic.fromCartesian(i),o=WebGLPlot$f.Cartographic.fromCartesian(n),a=new WebGLPlot$f.EllipsoidGeodesic;return a.setEndPoints(r,o),a.surfaceDistance},_0x2d6822.getSpaceDistanceByCartesian=function(e,t){var i=WebGLPlot$f.Cartographic.fromCartesian(e),n=WebGLPlot$f.Cartographic.fromCartesian(t),r=new WebGLPlot$f.EllipsoidGeodesic;return r.setEndPoints(i,n),r.surfaceDistance},_0x2d6822.intersectionOfRectByPointslopeline=function(e,t,i){var n=new WebGLPlot$f.Cartesian2,r=new WebGLPlot$f.Cartesian2;if(-1==t)n.x=e.x,n.y=i.bottom,r.x=e.x,r.y=i.top;else if(0==t)n.x=i.left,n.y=e.y,r.x=i.right,r.y=e.y;else{var o=0,a=[];if((l=t*((u=i.left)-e.x)+e.y)>i.bottom&&l<i.top&&(a[2*o]=u,a[2*o+1]=l,o++),(l=t*((u=i.right)-e.x)+e.y)>i.bottom&&l<i.top&&(a[2*o]=u,a[2*o+1]=l,o++),o<2){var s=-1/t;l=i.bottom,(u=e.x-s*(l-e.y))>i.left&&u<i.right&&(a[2*o]=u,a[2*o+1]=l,o++)}if(o<2){s=-1/t;var l=i.top,u=e.x-s*(l-e.y);o<2&&u>i.left&&u<i.right&&(a[2*o]=u,a[2*o+1]=l,o++)}n.x=a[0],n.y=a[1],r.x=a[2],r.y=a[3]}return[n,r]},_0x2d6822.ptIsInPolygon=function(e,t){if(!e||0===e.length)return!1;for(var i=0,n=e.length,r=0;r<n;r++){var o=e[r],a=e[(r+1)%n];if(o.y!==a.y){var s=o.y<a.y?o.y:a.y,l=o.y>a.y?o.y:a.y;if(!(t.y<s||t.y>l))(t.y-o.y)*(a.x-o.x)/(a.y-o.y)+o.x>t.x&&i++}}return i%2==1},_0x2d6822.pixelDisToRealDis=function(e,t,i){var n=WebGLPlot$f.Cartesian3.fromDegrees(t.x,t.y,t.z),r=WebGLPlot$f.SceneTransforms.wgs84ToWindowCoordinates(e,n);if(!WebGLPlot$f.defined(r))return 0;var o=new WebGLPlot$f.Cartesian2(r.x+i,r.y),a=_0x2d6822.getPosition(e,r),s=_0x2d6822.getPosition(e,o);return _0x2d6822.distance(a,s)},_0x2d6822.computeMatrix=function(e,t,i){var n=WebGLPlot$f.Cartesian3.fromDegrees(e.x,e.y,e.z),r=new WebGLPlot$f.HeadingPitchRoll,o=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west");i||(i=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot$f.Ellipsoid.WGS84,o));var a=Math.PI/180;return r.pitch=a*t.x,r.roll=a*t.y,r.heading=a*t.z,WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot$f.Ellipsoid.WGS84,o,i),i},_0x2d6822.computeMatrix2=function(e,t,i){var n=new WebGLPlot$f.HeadingPitchRoll,r=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west");i||(i=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(e,n,WebGLPlot$f.Ellipsoid.WGS84,r));var o=Math.PI/180;return n.pitch=o*t.x,n.roll=o*t.y,n.heading=o*t.z,WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(e,n,WebGLPlot$f.Ellipsoid.WGS84,r,i),i},_0x2d6822.Cross=function(e,t){return e.x*t.y-e.y*t.x},_0x2d6822.IsClockwise=function(e){for(var t=0,i=0,n=1,r=2;i<e.length;i++,n++,r++){n>=e.length&&(n-=e.length),r>=e.length&&(r-=e.length);var o=new WebGLPlot$f.Cartesian2(e[n].x-e[i].x,e[n].y-e[i].y),a=new WebGLPlot$f.Cartesian2(e[r].x-e[n].x,e[r].y-e[n].y);_0x2d6822.Cross(o,a)>=0?t++:t--}return t>=0},_0x2d6822.Resolve=function(e){var t=[];if(e.length<3)return null;for(var i=_0x2d6822.IsClockwise(e),n=[],r=0;r<e.length;r++){var o={point:e[r],index:r,isConvex:!1,isSeparable:!1};i?n.push(o):n.unshift(o)}for(var a=[],s=0;s<n.length;s++)_0x2d6822.UpdatePointStatus(n[s],n,s),n[s].isSeparable&&a.unshift({Value:n[s],Array:n,ArrayIndex:s});for(;n.length>=3;){if(0===a.length)return null;var l=a[0];a.shift();var u={Array:l.Array,ArrayIndex:WebGLPlot$f.defined(l.Array[l.ArrayIndex-1])?l.ArrayIndex-1:l.Array.length-1},c={Array:l.Array,ArrayIndex:WebGLPlot$f.defined(l.Array[l.ArrayIndex+1])?l.ArrayIndex+1:0},h=WebGLPlot$f.defined(l.Array[l.ArrayIndex])?l.Array[l.ArrayIndex]:l.Array[0],d=u.Array[u.ArrayIndex],f=c.Array[c.ArrayIndex];if(n.splice(l.ArrayIndex,1),t.push(h.index),t.push(d.index),t.push(f.index),d.isSeparable){if(_0x2d6822.UpdatePointStatus(d,u.Array,u.ArrayIndex),!d.isSeparable){var p=a.indexOf(u);a.splice(p,1)}}else _0x2d6822.UpdatePointStatus(d,u.Array,u.ArrayIndex),d.isSeparable&&a.unshift(u);if(f.isSeparable){if(_0x2d6822.UpdatePointStatus(f,c.Array,c.ArrayIndex),!f.isSeparable){p=a.indexOf(c);a.splice(p,1)}}else _0x2d6822.UpdatePointStatus(f,c.Array,c.ArrayIndex),f.isSeparable&&a.unshift(c)}return t},_0x2d6822.UpdatePointStatus=function(e,t,i){var n=WebGLPlot$f.defined(t[i-1])?t[i-1]:t[t.length-1],r=WebGLPlot$f.defined(t[i+1])?t[i+1]:t[0];if(!e.isConvex){var o=new WebGLPlot$f.Cartesian2,a=new WebGLPlot$f.Cartesian2;if(!(_0x2d6822.Cross(WebGLPlot$f.Cartesian2.subtract(e.point,n.point,o),WebGLPlot$f.Cartesian2.subtract(r.point,e.point,a))>=0))return void(e.isSeparable=!1);e.isConvex=!0}for(var s=0;s<t.length;s++)if(!WebGLPlot$f.Cartesian2.equals(t[s].point,e.point)&&!WebGLPlot$f.Cartesian2.equals(t[s].point,n.point)&&!WebGLPlot$f.Cartesian2.equals(t[s].point,r.point)&&_0x2d6822.TestInTriangle(t[s].point,e.point,n.point,r.point))return void(e.isSeparable=!1);e.isSeparable=!0},_0x2d6822.TestInTriangle=function(e,t,i,n){var r=new WebGLPlot$f.Cartesian2,o=new WebGLPlot$f.Cartesian2,a=new WebGLPlot$f.Cartesian2,s=new WebGLPlot$f.Cartesian2,l=new WebGLPlot$f.Cartesian2;WebGLPlot$f.Cartesian2.subtract(i,t,r),WebGLPlot$f.Cartesian2.subtract(n,t,o),WebGLPlot$f.Cartesian2.subtract(n,i,a),WebGLPlot$f.Cartesian2.subtract(e,t,s);var u=_0x2d6822.Cross(r,o)>=0;return u^_0x2d6822.Cross(r,s)<0&&_0x2d6822.Cross(a,r)>0^_0x2d6822.Cross(a,WebGLPlot$f.Cartesian2.subtract(e,i,l))>=0&&u^_0x2d6822.Cross(o,s)>=0},_0x2d6822.screenSpaceCameraController=function(e,t){if(e){var i=e.screenSpaceCameraController;2===e.mode?i.enableTranslate=t:3===e.mode&&(i.enableRotate=t),e.camera.update(e.mode),i.update()}},_0x2d6822.pixelDisToRealDisInMeters=function(e,t){var i=e.camera,n=new WebGLPlot$f.Cartesian2(e._canvas.clientWidth/2,e._canvas.clientHeight/2),r=new WebGLPlot$f.Cartesian2(n.x+t.x,n.y),o=new WebGLPlot$f.Cartesian2(n.x,n.y+t.y),a=i.getPickRay(n),s=i.getPickRay(r),l=i.getPickRay(o),u=e.globe.pick(a,e),c=e.globe.pick(s,e),h=e.globe.pick(l,e),d=WebGLPlot$f.Cartesian3.distance(u,c),f=WebGLPlot$f.Cartesian3.distance(u,h);return new WebGLPlot$f.Cartesian2(d,f)},_0x2d6822.pixelHeightToRealHeight=function(e,t,i){var n=e.camera,r=new WebGLPlot$f.Cartesian2(t.x,t.y+1),o=n.getPickRay(t),a=n.getPickRay(r),s=e.globe.pick(o,e),l=e.globe.pick(a,e),u=.3*WebGLPlot$f.Cartesian3.distance(s,l);return(t.y-i.y)*u},_0x2d6822.getPlotLayers=function(e){var t=null;if(WebGLPlot$f.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot$f.PlotLayers)t=e.plotLayers;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot$f.defined(r)&&r instanceof WebGLPlot$f.PlotLayers){t=r;break}}return t};var _0x21dec1=new WebGLPlot$f.Cartesian3,_0x302661=new WebGLPlot$f.Cartesian3;_0x2d6822.getModelMinAndMaxCorner=function(e){for(var t=e.gltf,i=t.nodes,n=t.meshes,r=t.scenes[t.scene].nodes,o=r.length,a=[],s=new WebGLPlot$f.Cartesian3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),l=new WebGLPlot$f.Cartesian3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),u=0;u<o;++u){var c=i[r[u]];for(c._transformToRoot=WebGLPlot$f.ModelUtility.getTransform(c),a.push(c);a.length>0;){var h=(c=a.pop())._transformToRoot,d=c.mesh;if(WebGLPlot$f.defined(d))for(var f=n[d].primitives,p=f.length,_=0;_<p;++_)if(f[_].attributes&&f[_].attributes.POSITION){var m=f[_].attributes.POSITION;if(WebGLPlot$f.defined(m)){var g=WebGLPlot$f.ModelUtility.getAccessorMinMax(t,m);if(WebGLPlot$f.defined(g.min)&&WebGLPlot$f.defined(g.max)){var x=WebGLPlot$f.Cartesian3.fromArray(g.min,0,_0x21dec1),v=WebGLPlot$f.Cartesian3.fromArray(g.max,0,_0x302661);WebGLPlot$f.Matrix4.multiplyByPoint(h,x,x),WebGLPlot$f.Matrix4.multiplyByPoint(h,v,v),WebGLPlot$f.Cartesian3.minimumByComponent(s,x,s),WebGLPlot$f.Cartesian3.maximumByComponent(l,v,l)}}}var y=c.children;if(WebGLPlot$f.defined(y))for(var $=y.length,b=0;b<$;++b){var T=i[y[b]];T._transformToRoot=WebGLPlot$f.ModelUtility.getTransform(T),WebGLPlot$f.Matrix4.multiplyTransformation(h,T._transformToRoot,T._transformToRoot),a.push(T)}delete c._transformToRoot}}return{minCorner:s,maxCorner:l}},_0x2d6822.localPtsToCartesian=function(e,t,i){var n=new WebGLPlot$f.Cartesian3,r=new WebGLPlot$f.Cartesian3;return r=WebGLPlot$f.Cartesian3.multiplyByScalar(new WebGLPlot$f.Cartesian3(e.x,e.y,e.z),i,r),{position:n=WebGLPlot$f.Matrix4.multiplyByPoint(t,r,n),vector:r}},_0x2d6822.latLon2LocalPts=function(e){let t=[],i=[],n=WebGLPlot$f.Cartesian3.fromDegrees(e[0].x,e[0].y,e[0].z);if(i.push(new WebGLPlot$f.Cartesian3(0,0,0)),t.push(n),Array.isArray(e)){for(let r=1;r<e.length;r++){let o=WebGLPlot$f.Cartesian3.fromDegrees(e[r].x,e[r].y,e[r].z);const a=o.x-n.x,s=o.y-n.y,l=o.z-n.z;t.push(o),i.push(new WebGLPlot$f.Cartesian3(a,s,l))}var r=new WebGLPlot$f.HeadingPitchRoll,o=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west");const a=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot$f.Ellipsoid.WGS84,o);return console.log(t,"test"),{positions:i,modelMatrix:a}}},_0x2d6822.extend=function(e){var t,i,n,r;for(i=1,n=arguments.length;i<n;i++)for(t in r=arguments[i])e[t]=r[t];return e},_0x2d6822.isSymbolDot=function(e){switch(e){case _0x18bc2f.SYMBOL_DOT:case _0x18bc2f.SYMBOL_PICTURE:case _0x18bc2f.SYMBOL_POINT:case _0x18bc2f.SYMBOL_Model:return!0}return!1};var _0x50d63b=(_0x57e7fd=!0,function(e,t){var i=_0x57e7fd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57e7fd=!1,i}),_0x375ddd=_0x50d63b(void 0,(function(){return _0x375ddd.toString().search("(((.+)+)+)+$").toString().constructor(_0x375ddd).search("(((.+)+)+)+$")})),_0x57e7fd;function _0x3c9c12(e,t){this.scene=WebGLPlot.defaultValue(e,null),this.dotBillboards=new WebGLPlot.BillboardCollection,this._name=WebGLPlot.defaultValue(t,"PlotCollentionLayer"),this._waterPlanes=[],this._visibleViewport=0,this._valid=!0,this._visibility=!0,this._id=-1,this.bIsUpdateDepthTestDis=!1,this.setInterval(),this.PolygonFillInstances={},this.WallInstances={},this.Labels={},this.ploygonFillPrimitive=[],this.wallPrimitive=[],this.ploygonFillAppearance={},this.wallAppearance={},this.algoLabels=new WebGLPlot.LabelCollection,this.updatePrimitive=!1,this.createPolylineCollention(!0),this.GroundInstances={},this.groundPrimitive=null,this.dynamicScaneInstances={},this.dynamicScaneimitive=null,this._dotModelAndVectorPrimitives=new WebGLPlot.PrimitiveCollection,this.scene.primitives.add(this._dotModelAndVectorPrimitives)}function _0x14bbaf(e){if(WebGLPlot.defined(e)&&null!==e&&WebGLPlot.defined(this.scene)&&null!==this.scene){var t=e.position,i=e.width,n=e.height;if(WebGLPlot.defined(i)&&WebGLPlot.defined(n)){var r=new WebGLPlot.BoundingSphere(t,0),o=this.scene.camera.getPixelSize(r,this.scene.frameState.context.drawingBufferWidth,this.scene.frameState.context.drawingBufferHeight),a=i*o,s=n*o,l=Math.max(a,s)/3;r.radius=l,WebGLPlot.BoundingSphere.isOccluded(r,this.scene.frameState.occluder)?e.disableDepthTestDistance=0:e.disableDepthTestDistance=Number.POSITIVE_INFINITY}}}function _0x1bd677(e){var t=e.ForeRGBA;return e.isClampToGround&&(t+="_isClampToGround"),t}_0x375ddd(),_0x3c9c12.prototype.update=function(e,t,i,n){WebGLPlot.defined(this.dotBillboards)&&null!==this.dotBillboards&&this.dotBillboards.update(e,t),WebGLPlot.defined(this.polylineCollection)&&null!==this.polylineCollection&&this.polylineCollection.update(e);for(var r=0;r<this.ploygonFillPrimitive.length;r++)(this.ploygonFillPrimitive[r]instanceof WebGLPlot.GroundPrimitive||this.ploygonFillPrimitive[r]instanceof WebGLPlot.Primitive)&&this.ploygonFillPrimitive[r].update(e);for(var o=0;o<this.wallPrimitive.length;o++)this.wallPrimitive[o]instanceof WebGLPlot.Primitive&&this.wallPrimitive[o].update(e);null!==this.groundPrimitive&&this.groundPrimitive.update(e),this.dynamicScaneimitive&&this.dynamicScaneimitive.update(e),this.algoLabels.update(e)},_0x3c9c12.prototype.render=function(){if(this._valid&&this.updatePrimitive){for(var e=0;e<this.ploygonFillPrimitive.length;e++)this.ploygonFillPrimitive[e]=null;for(e=0;e<this.wallPrimitive.length;e++)this.wallPrimitive[e]=null;this.groundPrimitive&&(this.groundPrimitive=null),this.dynamicScaneimitive&&(this.dynamicScaneimitive=null),this.ploygonFillPrimitive=[],this.wallPrimitive=[],this.ploygonFillAppearance={},this.wallAppearance={};var t=[],i=[],n=[],r=[];for(var o in this.PolygonFillInstances)!this.PolygonFillInstances[o]||this.PolygonFillInstances[o].length<=0?(delete this.PolygonFillInstances[o],this.PolygonFillInstances[o]=null):t=t.concat(this.PolygonFillInstances[o]);for(var a in this.WallInstances)this.WallInstances[a].length<=0?delete this.WallInstances[a]:i=i.concat(this.WallInstances[a]);for(var s in this.GroundInstances)this.GroundInstances[s].length<=0?delete this.GroundInstances[s]:n=n.concat(this.GroundInstances[s]);for(var s in this.dynamicScaneInstances)this.dynamicScaneInstances[s].length<=0?delete this.dynamicScaneInstances[s]:r=r.concat(this.dynamicScaneInstances[s]);for(s=0;s<t.length;s++){var l=t[s];this.ploygonFillAppearance.hasOwnProperty(_0x1bd677(l))?this.ploygonFillAppearance[_0x1bd677(l)].push(l):this.ploygonFillAppearance[_0x1bd677(l)]=[l]}if(WebGLPlot.defined(this.ploygonFillAppearance)&&null!==this.ploygonFillAppearance)for(var e in this.ploygonFillAppearance){var u=this.createPolygonFillPrimitive(e,this.ploygonFillAppearance[e]);this.ploygonFillPrimitive.push(u)}for(var c=0;c<i.length;c++){var h=i[c];this.wallAppearance.hasOwnProperty(h.ForeRGBA)?this.wallAppearance[h.ForeRGBA].push(h):this.wallAppearance[h.ForeRGBA]=[h]}if(WebGLPlot.defined(this.wallAppearance)&&null!==this.wallAppearance)for(var d in this.wallAppearance){var f=this.createWallPrimitive(d,this.wallAppearance[d]);this.wallPrimitive.push(f)}n.length>0&&n[0]&&(this.groundPrimitive=new WebGLPlot.GroundPolylinePrimitive({geometryInstances:n,classificationType:WebGLPlot.ClassificationType.BOTH,clampToS3M:!0,show:!0,appearance:new WebGLPlot.PolylineColorAppearance}),this.groundPrimitive.SymbolType=_0x18bc2f.SYMBOL_ALGO),r.length>0&&r[0]&&(this.dynamicScaneimitive=new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.PerInstanceColorAppearance({flat:!0}),asynchronous:!1})),this.updatePrimitive=!1}},_0x3c9c12.prototype.createPolygonFillPrimitive=function(e,t){var i;i=e.includes("_isClampToGround")?WebGLPlot.Color.fromRgba(e.split("_")[0]):WebGLPlot.Color.fromRgba(e);var n,r=new WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),o=new WebGLPlot.EllipsoidSurfaceAppearance({material:r,aboveGround:!0});return(n=t[0]&&t[0].isClampToGround?new WebGLPlot.GroundPrimitive({geometryInstances:t,appearance:o,show:this._display,asynchronous:!0,classificationType:WebGLPlot.ClassificationType.BOTH}):new WebGLPlot.Primitive({geometryInstances:t,appearance:o,show:this._display,asynchronous:!1})).PolygonFillOrWall=!0,n.SymbolType=_0x18bc2f.SYMBOL_ALGO,n},_0x3c9c12.prototype.createWallPrimitive=function(e,t){var i=WebGLPlot.Color.fromRgba(e),n=WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),r=new WebGLPlot.MaterialAppearance({material:n,faceForward:!0}),o=new WebGLPlot.Primitive({geometryInstances:t,appearance:r,asynchronous:!1,compressVertices:!0,show:!0});return o.PolygonFillOrWall=!0,o.SymbolType=_0x18bc2f.SYMBOL_ALGO,o},_0x3c9c12.prototype.setInterval=function(){var e=this;setInterval((function(){if(WebGLPlot.defined(e.dotBillboards)&&e.dotBillboards.length>0&&e.bIsUpdateDepthTestDis)for(var t in e.dotBillboards._billboards)_0x14bbaf(t)}),100)},_0x3c9c12.prototype.releaseSelection=function(){this._valid},_0x3c9c12.prototype.createPolylineCollention=function(e){if(this.polylineCollection&&this.polylineCollection.destroy(),this.polylineCollection=new WebGLPlot.PolylineCollection({opaqueRS:WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}}),translucentRS:WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}})}),this.scene&&this.scene.plotLayers){let e=this.scene.plotLayers._layerQueue.length;for(let t=0;t<e;t++){let e=this.scene.plotLayers._layerQueue[t];if(WebGLPlot.defined(e)&&e){let t=e._geoGraphicObjects.length;for(let i=0;i<t;i++)e._geoGraphicObjects[i]._initialize=!1}}}};const _0x3385bb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4f9aad=_0x3385bb(void 0,(function(){return _0x4f9aad.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f9aad).search("(((.+)+)+)+$")}));_0x4f9aad();var _0x2a46cb=new Map;function _0x38860f(e){this.collentionLayer=new _0x3c9c12(e);var t=!1;if(WebGLPlot.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot.PlotLayers)e.plotLayers.collentionLayer=this.collentionLayer,t=!0;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot.defined(r)&&r instanceof WebGLPlot.PlotLayers){r.collentionLayer=this.collentionLayer,t=!0;break}}if(!t){var o=new WebGLPlot.PlotLayers;o.collentionLayer=this.collentionLayer,e.primitives.add(o),e.plotLayers=o}this.overLayerPolylineCollection=new WebGLPlot.PolylineCollection,e.primitives.add(this.overLayerPolylineCollection)}_0x38860f.getInstance=function(e){let t=_0x2a46cb.get(e._plottingID);return e&&!WebGLPlot.defined(t)&&(t=new _0x38860f(e),_0x2a46cb.set(e._plottingID,t)),t},_0x38860f.addBillboard=function(e,t){let i=_0x2a46cb.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.collentionLayer.dotBillboards.add(e)},_0x38860f.removeBillboard=function(e,t){let i=_0x2a46cb.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.collentionLayer.dotBillboards.remove(e)},_0x38860f.addDotModelAndVector=function(e,t){let i=_0x2a46cb.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.collentionLayer._dotModelAndVectorPrimitives.add(e)},_0x38860f.removeDotModelAndVector=function(e,t){let i=_0x2a46cb.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.collentionLayer._dotModelAndVectorPrimitives.removeAndDestroy(e)},_0x38860f.removeAllBillboard=function(e){let t=_0x2a46cb.get(e._plottingID);WebGLPlot.defined(t)&&null!==t&&t.collentionLayer.dotBillboards.removeAll()},_0x38860f.addAlgoPloyline=function(e,t,i){let n=_0x2a46cb.get(i._plottingID);if(null===e)return n.collentionLayer.polylineCollection.add(t);if(WebGLPlot.defined(n)&&null!==n){var r=n.collentionLayer.polylineCollection.add(t);return e.Polylines.push(r),r}},_0x38860f.removeAllAlgoPloyline=function(e,t){let i=_0x2a46cb.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i){for(var n in!e.Polylines&&e instanceof WebGLPlot.Polyline&&i.collentionLayer.polylineCollection.remove(e),e.Polylines)i.collentionLayer.polylineCollection.remove(e.Polylines[n]);e.Polylines=[]}},_0x38860f.addAlgoLabel=function(e,t,i){let n=_0x2a46cb.get(i._plottingID);if(WebGLPlot.defined(n)&&null!==n){var r=n.collentionLayer.algoLabels.add(t);return e.Labels.push(r),r}},_0x38860f.removeAllAlgoLabel=function(e,t){let i=_0x2a46cb.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i){for(var n in e.Labels)i.collentionLayer.algoLabels.remove(e.Labels[n]);e.Labels=[]}},_0x38860f.setUpdatePrimitive=function(e,t){let i=_0x2a46cb.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&(i.collentionLayer.updatePrimitive=e)},_0x38860f.setPolygonFillInstances=function(e,t,i){let n=_0x2a46cb.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.PolygonFillInstances[e]=t)},_0x38860f.setWallInstances=function(e,t,i){let n=_0x2a46cb.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.WallInstances[e]=t)},_0x38860f.setGroundInstances=function(e,t,i){let n=_0x2a46cb.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.GroundInstances[e]=t)},_0x38860f.setScaneInstances=function(e,t,i){let n=_0x2a46cb.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.dynamicScaneInstances[e]=t,n.collentionLayer.updatePrimitive=!0)},_0x38860f.setUseDepthTest=function(e,t){let i=_0x2a46cb.get(t._plottingID);var n=WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}});WebGLPlot.defined(i)&&null!==i&&(i.collentionLayer.polylineCollection._opaqueRS=n,i.collentionLayer.polylineCollection._translucentRS=n)},_0x38860f.removeAll=function(e){let t=_0x2a46cb.get(e._plottingID);WebGLPlot.defined(t)&&WebGLPlot.defined(t.collentionLayer)&&(t.collentionLayer.polylineCollection.removeAll(),t.collentionLayer.algoLabels.removeAll(),t.collentionLayer.dotBillboards.removeAll(),t.collentionLayer.WallInstances=[],t.collentionLayer.PolygonFillInstances=[],t.collentionLayer.updatePrimitive=[],t.collentionLayer.GroundInstances=[],t.collentionLayer.dynamicScaneInstances=[])},_0x38860f.addOverLayerPolyLine=function(e,t){let i=_0x2a46cb.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.overLayerPolylineCollection.add(e)},_0x38860f.removeOverLayerPolyLine=function(e,t){let i=_0x2a46cb.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.overLayerPolylineCollection.remove(e)};var _0x504be0=(_0x5ae031=!0,function(e,t){var i=_0x5ae031?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ae031=!1,i}),_0x158c65=_0x504be0(void 0,(function(){return _0x158c65.toString().search("(((.+)+)+)+$").toString().constructor(_0x158c65).search("(((.+)+)+)+$")})),_0x5ae031;_0x158c65();class _0x4157b2{constructor(e){this._visible=!1,this._isUsePlotVisible=WebGLPlot.defaultValue(e.isUsePlotVisible,!0),this._position=WebGLPlot.defaultValue(e.position,new _0x11ff81(0,0,0)),this._rotate=WebGLPlot.defaultValue(e.rotate,new _0x11ff81(0,0,0)),this._scale=WebGLPlot.defaultValue(e.scale,1),this._scene=e.scene,this._geoGraphicObject=e.geoGraphicObject}setIsUsePlotVisible(e){this._isUsePlotVisible=e}getIsUsePlotVisible(){return this._isUsePlotVisible}setScene(e){this._scene=e}setVisible(e){return!this._isUsePlotVisible&&(this._visible!==e&&(this._visible=e,e?this._addEffectToScene(this._options):this._removeEffectFromScene()),!0)}isVisible(){return this._visible}setGeoGraphicObject(e){this._geoGraphicObject=e}updateEffect(e){}_addEffectToScene(){}_removeEffectFromScene(){}destroy(){}toGeoJson(){return{}}fromGeoJson(e){}}var _0x58760a=(_0x3d9fad=!0,function(e,t){var i=_0x3d9fad?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3d9fad=!1,i}),_0x307ee8=_0x58760a(void 0,(function(){return _0x307ee8.toString().search("(((.+)+)+)+$").toString().constructor(_0x307ee8).search("(((.+)+)+)+$")})),_0x3d9fad;_0x307ee8();const _0x57454b=2;class _0x21fac2{constructor(e){null!=e&&(e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._libID=WebGLPlot$f.defaultValue(e.libID,-1),this._code=WebGLPlot$f.defaultValue(e.code,-1),this._localPoints=WebGLPlot$f.defaultValue(e.localPoints,[]),this._symbolName=WebGLPlot$f.defaultValue(e.symbolName,""),this._symbolType=_0x18bc2f.SYMBOL_UNKNOW,this._display=WebGLPlot$f.defaultValue(e.display,!0),this._id=WebGLPlot$f.createGuid(),this._showTipLength=WebGLPlot$f.defaultValue(e.showTipLength,100),this._markHalo=WebGLPlot$f.defaultValue(e.markHalo,!1),this._extendWallHeight=WebGLPlot$f.defaultValue(e.extendWallHeight,-1),this._isUseSymbolLibStyle=WebGLPlot$f.defaultValue(e.isUseSymbolLibStyle,!0),this._surroundRatioVal=WebGLPlot$f.defaultValue(e.surroundRatioVal,.002),this._isEdit=!1,this.isDrawing=WebGLPlot$f.defaultValue(e.isDrawing,!1),this._layer=WebGLPlot$f.defaultValue(e.layer,null),this._initialize=!1,this._primitive=[],this._symbolLibManager=WebGLPlot$f.getLibManager(this.layer._scene._plottingID),this._symbolStyle=WebGLPlot$f.defaultValue(e.symbolStyle,new _0x53d051({graphicObject:this})),this._symbolTextStyle=WebGLPlot$f.defaultValue(e.symbolTextStyle,new _0x34d1aa({graphicObject:this})),this._serverData=WebGLPlot$f.defaultValue(e.serverData,null),this._textContent=WebGLPlot$f.defaultValue(e.textContent,""),this.readStyleFromSymbolLib(),this._GeoJsonFeature=null,this._extendProperty=new WebGLPlot$f.createProperty,this._annotationArray=WebGLPlot$f.defaultValue(e.annotationArray,[]),this._wholeHeight=WebGLPlot$f.defaultValue(e.wholeHeight,0),this._disableDepthTestDistance=Number.MAX_VALUE,this._dotDepthTest=!0,this._initSymbolFinished=new WebGLPlot$f.Event,this._geoEffectArray=[],this._geoEntity=void 0)}readStyleFromSymbolLib(){var e=this._serverData;WebGLPlot$f.defined(e)&&this._isUseSymbolLibStyle?(this._symbolType=this._serverData.symbolType,this._symbolName=WebGLPlot$f.defaultValue(e.symbolName,""),this._middleMarkExist=WebGLPlot$f.defaultValue(e.middleMarkExist,!1),this._symbolStyle._lineColor=WebGLPlot$f.defaultValue(_0x1b9fe2(e.style.lineColor),this._symbolStyle.lineColor),this._symbolStyle._fillForeColor=WebGLPlot$f.defaultValue(_0x1b9fe2(e.style.fillForeColor),this._symbolStyle.fillForeColor)):this.setSymbolName(this._code)}setGeoEntityShowMode(e){switch((!WebGLPlot$f.defined(this.__dotPlotLibID)||!WebGLPlot$f.defined(this.__dotPlotCode))&&(this.__dotPlotLibID=0,this.__dotPlotCode=_0x18bc2f.SYMBOL_POINT),e){case _0x4e5d29.Marker:if(""===this.modelPath)return;this._libID=0,this._code=_0x18bc2f.SYMBOL_Model;break;case _0x4e5d29.Picture:if(""===this.picturePath)return;this._libID=0,this._code=_0x18bc2f.SYMBOL_PICTURE;break;case _0x4e5d29.Grid:case _0x4e5d29.Vector:if(this._libID=this.__dotPlotLibID,this._code=this.__dotPlotCode,0===this.__dotPlotLibID)this._code===_0x18bc2f.SYMBOL_POINT&&this.__initSymbolPointSymbolData();else{let t=this;const i=WebGLPlot$f.getLibManager(this.layer._scene._plottingID).getSymbolLibByLibId(this._libID);if(WebGLPlot$f.defined(i)){const n=i.getSymbolData(this._code);WebGLPlot$f.defined(n)?(this._serverData=n,this.readStyleFromSymbolLib(),this._getServerDataPrototype(n)):this.getServerData(this._libID,this._code,(function(){t.readStyleFromSymbolLib(),t._getServerDataPrototype(t._serverData),t._initialize=!1,t.showMode=e}))}else this.getServerData(this._libID,this._code,(function(){t.readStyleFromSymbolLib(),t._getServerDataPrototype(t._serverData),t._initialize=!1,t.showMode=e}))}}this.showMode===e&&(this._initialize=!1),this.showMode=e}getGeoEntityShowMode(){return this._showMode}setGeoEntity(e){this._geoEntity=e}getGeoEntity(){return this._geoEntity}createSymbol(){_0x18bc2f.SYMBOL_UNKNOW!==this._symbolType&&(_0x18bc2f.SYMBOL_DOT,this._symbolType,WebGLPlot$f.defined(this._symbol))}setSymbolName(e){switch(e){case _0x18bc2f.SYMBOL_POLYLINE:this._symbolName=WebGLPlot$f.plotI18n("polyLine");break;case _0x18bc2f.SYMBOL_RECTANGLE:this._symbolName=WebGLPlot$f.plotI18n("rectangle");break;case _0x18bc2f.SYMBOL_PARALLELOGRAM:this._symbolName=WebGLPlot$f.plotI18n("parallelogram");break;case _0x18bc2f.SYMBOL_CIRCLE:this._symbolName=WebGLPlot$f.plotI18n("circle");break;case _0x18bc2f.SYMBOL_ELLIPSE:this._symbolName=WebGLPlot$f.plotI18n("ellipse");break;case _0x18bc2f.SYMBOL_ARBITRARYPOLYGON:this._symbolName=WebGLPlot$f.plotI18n("polygon");break;case _0x18bc2f.SYMBOL_TEXT:this._symbolName=WebGLPlot$f.plotI18n("text");break;case _0x18bc2f.SYMBOL_ARC:this._symbolName=WebGLPlot$f.plotI18n("arc");break;case _0x18bc2f.SYMBOL_PARALLELLINE:this._symbolName=WebGLPlot$f.plotI18n("parallel");break;case _0x18bc2f.SYMBOL_TRAPEZOID:this._symbolName=WebGLPlot$f.plotI18n("trapezoid");break;case _0x18bc2f.SYMBOL_POLYBEZIERCLOSED:this._symbolName=WebGLPlot$f.plotI18n("closedBesselCurve");break;case _0x18bc2f.SYMBOL_CHORD:this._symbolName=WebGLPlot$f.plotI18n("chord");break;case _0x18bc2f.SYMBOL_PIE:this._symbolName=WebGLPlot$f.plotI18n("sector");break;case _0x18bc2f.SYMBOL_KIDNEY:this._symbolName=WebGLPlot$f.plotI18n("kidney");break;case _0x18bc2f.SYMBOL_BRACE:this._symbolName=WebGLPlot$f.plotI18n("brace");break;case _0x18bc2f.SYMBOL_REGULARPOLYGON:this._symbolName=WebGLPlot$f.plotI18n("regularPolygon");break;case _0x18bc2f.SYMBOL_POLYBEZIER:this._symbolName=WebGLPlot$f.plotI18n("bezier");break;case _0x18bc2f.SYMBOL_RUNWAY:this._symbolName=WebGLPlot$f.plotI18n("runway");break;case _0x18bc2f.SYMBOL_CURVEEIGHT:this._symbolName=WebGLPlot$f.plotI18n("curveEight");break;case _0x18bc2f.SYMBOL_CONCENTRICCIRCLE:this._symbolName=WebGLPlot$f.plotI18n("concentricCircle");break;case _0x18bc2f.SYMBOL_COMBINATIONALCIRCLE:this._symbolName=WebGLPlot$f.plotI18n("combinedCircle");break;case _0x18bc2f.SYMBOL_NODECHAIN:this._symbolName=WebGLPlot$f.plotI18n("nodeChain");break;case _0x18bc2f.SYMBOL_CIRCLECHORD:this._symbolName=WebGLPlot$f.plotI18n("chord");break;case _0x18bc2f.SYMBOL_CIRCLEPIE:this._symbolName=WebGLPlot$f.plotI18n("sector");break;case _0x18bc2f.SYMBOL_CIRCLEARC:this._symbolName=WebGLPlot$f.plotI18n("arc");break;case _0x18bc2f.SYMBOL_Model:this._symbolName=WebGLPlot$f.plotI18n("SYMBOL_Model");break;case _0x18bc2f.SYMBOL_POINT:this._symbolName=WebGLPlot$f.plotI18n("SYMBOL_POINT")}}setVisible(e){if(0!==this._primitive.length)for(var t=0;t<this._primitive.length;t++)this._primitive[t].show=e;WebGLPlot$f.defined(this._layer.selectedFeature)&&this.id===this._layer.selectedFeature.id&&!this.display&&this._layer._plottingEdit&&this._layer._plottingEdit.releaseSelection(!0),!this.billboard||this.showMode!==_0x4e5d29.Grid&&this.showMode!==_0x4e5d29.Picture?this._initialize=!1:this.billboard.show=e}getServerData(e,t,i){var n=this,r=WebGLPlot$f.getLibManager(this.layer._scene._plottingID);var o=WebGLPlot$f.getServerData(e,t,void 0,this._layer._scene._plottingID);!o||(o.getSymbolInfo.events.on({processCompleted:function(t){-1!==t.result.libID&&-1!==t.result.code&&(n._serverData=t.result,r.setSymbolData(e,t.result),i())},processFailed:function(){},scope:n}),o.getSymbolInfo.processAsync(o.getSymbolInfoParameters))}addGeoEffect(e){if(e instanceof _0x4157b2)return this._geoEffectArray.forEach((t=>{if(t.id===e.id)return this._geoEffectArray})),this._geoEffectArray.push(e),e.setGeoGraphicObject(this),this._geoEffectArray}getGeoEffectArray(){return this._geoEffectArray}getGeoEffectByID(e){if(!WebGLPlot$f.defined(e))return!1;for(let t=0;t<this._geoEffectArray.length;t++){const i=this._geoEffectArray[t];if(e===i.id)return i}}removeGeoEffectByIndex(e){return e>=0&&e<this._geoEffectArray.length&&(this._geoEffectArray[e].destroy(),this._geoEffectArray[e]=void 0,this._geoEffectArray.splice(e,1),!0)}removeGeoEffectByID(e){if(!WebGLPlot$f.defined(e))return!1;for(let t=0;t<this._geoEffectArray.length;t++){if(e===this._geoEffectArray[t].id)return this._geoEffectArray[t].destroy(),this._geoEffectArray[t]=void 0,this._geoEffectArray.splice(t,1),!0}return!1}removeAllGeoEffect(){this._geoEffectArray.forEach((e=>{e.destroy(),e=void 0})),this._geoEffectArray=[]}__setEffectParameter(e,t){WebGLPlot$f.defined(t)&&t>=0&&t<this._geoEffectArray.length?this._geoEffectArray[t].updateEffect(e):this._geoEffectArray.forEach((t=>{t.updateEffect(e)}))}mergeDefaultStyle(){var e=WebGLPlot$f.getDefaultStyle({libID:this._libID,code:this._code});if(e&&e.defaultFlag){var t=e.symbolStyle,i=e.symbolTextStyle,n=e.gridSymbolSize;this._symbolStyle=t.clone(),this._symbolStyle._graphicObject=this,this._symbolTextStyle=i.clone(),_0x18bc2f.SYMBOL_DOT===this.symbolType&&(-1!==e.lineSymbolID&&(this.lineSymbolID=e.lineSymbolID),-1!==e.gridLineWidth&&(this.gridLineWidth=e.gridLineWidth),n.x>0&&n.y>0&&(this.gridSymbolSize=e.gridSymbolSize.clone()),""!==e.modelPath&&(this.modelPath=e.modelPath))}}update(e,t,i,n){if(this._display&&0!==this._primitive.length)for(var r=0;r<this._primitive.length;r++)this._primitive[r].update(e)}initSymbol(){}getSymbolData(e){WebGLPlot$f.defined(e)||(e=!0);var t={};if(t.version=_0x57454b,t.hasOwnProperty("type")||(t.type="GRAPHICOBJECT"),t.hasOwnProperty("libID")||(t.libID=this._libID),t.hasOwnProperty("code")||(t.code=this._code),t.hasOwnProperty("dotPlotLibID")||(t.dotPlotLibID=this.__dotPlotLibID),t.hasOwnProperty("dotPlotCode")||(t.dotPlotCode=this.__dotPlotCode),t.hasOwnProperty("localePoints")||(t.localePoints=this.localPoints),t.hasOwnProperty("symbolName")||(t.symbolName=this.symbolName),t.hasOwnProperty("symbolType")||(t.symbolType=this.symbolType),t.hasOwnProperty("uuid")||(t.uuid=this.id),t.hasOwnProperty("isEdit")||(t.isEdit=!1),t.hasOwnProperty("scaleByMap")||(t.scaleByMap=!1),t.hasOwnProperty("wholeHeight")||(t.wholeHeight=this.wholeHeight),!t.hasOwnProperty("style")){var i=new Object;t.style=i,i.lineColor=_0x1a2b6f(this.symbolStyle.lineColor),i.fillSymbolID=this.symbolStyle._fillSymbolID,i.fillBackColor=_0x1a2b6f(this.symbolStyle._fillBackColor),i.fillForeColor=_0x1a2b6f(this.symbolStyle._fillForeColor),i.fillBackOpaque=this.symbolStyle._fillBackOpaque,i.fillGradientMode=this.symbolStyle._fillGradientMode,i.fillCenterOffsetX=this.symbolStyle.fillGradientOffsetRatioX,i.fillCenterOffsetY=this.symbolStyle.fillGradientOffsetRatioY,i.fillAngle=this.symbolStyle.fillGradientAngle,i.fillOpaqueRate=100-this.symbolStyle.fillOpaqueRate,i.lineWidth3D=this.symbolStyle.lineWidth,t.style.hasOwnProperty("display")||(this._display?i.display="display":i.display="none"),t.style=i}if(!t.hasOwnProperty("textStyle2D")){var n=new Object;n.fontHeight=25.4*this._symbolTextStyle.fontSize/96,n.foreColor=_0x1a2b6f(this._symbolTextStyle._foreColor),n.backColor=_0x1a2b6f(this._symbolTextStyle._backColor),n.outline=this._symbolTextStyle._outline,n.fontStrokeColor=_0x1a2b6f(this._symbolTextStyle._backColor),n.backOpaque=this.symbolTextStyle.isShowTextBox,n.fontBackgroundColor=_0x1a2b6f(this.symbolTextStyle.textBoxLineColor),n.fontName=this._symbolTextStyle._fontName,n.italic=this._symbolTextStyle._italic,n.bold=this._symbolTextStyle._bold,n.align=this._symbolTextStyle._align,n.italicAngle=this._symbolTextStyle._italicAngle,n.shadow=this._symbolTextStyle._shadow,n.sizeFixed=this._symbolTextStyle._sizeFixed,n.underline=this._symbolTextStyle._underline,n.rotation=this._symbolTextStyle._rotation,n.strikeout=this._symbolTextStyle._strikeout,n.borderSpacingWidth=this._symbolTextStyle._borderSpacingWidth,n.outlineWidth=25.4*this._symbolTextStyle._outlineWidth/96,n.fontWidth=this._symbolTextStyle._fontWidth,n.opaqueRate=this._symbolTextStyle._opaqueRate,n.stringAlignment=this._symbolTextStyle._stringAlignment,n.fontScale=this._symbolTextStyle._text3DScale,n.fontWeight=this._symbolTextStyle._fontWeight,t.textStyle2D=n}if(!t.hasOwnProperty("textStyle3D")){var r=new Object;r.foreColor=_0x1a2b6f(this.symbolTextStyle.foreColor),r.backColor=_0x1a2b6f(this.symbolTextStyle.backColor),r.outline=this.symbolTextStyle.outline,r.textBoxColor=this.symbolTextStyle.textBoxColor,r.textBoxLineColor=this.symbolTextStyle.textBoxLineColor,r.fontName=this.symbolTextStyle.fontName,r.italic=this.symbolTextStyle.italic,r.bold=this.symbolTextStyle.bold,r.align=this.symbolTextStyle.align,r.fontSize=this.symbolTextStyle.fontSize,r.isShowTextBox=this.symbolTextStyle.isShowTextBox,t.textStyle3D=r}if(t.hasOwnProperty("surroundLineColor")||(t.surroundLineColor=_0x1a2b6f(this.symbolStyle.surroundLineColor)),t.hasOwnProperty("surroundLineWidth2D")||(t.surroundLineWidth2D=.5),t.hasOwnProperty("surroundLineType")||(t.surroundLineType=this.symbolStyle.surroundLineType),_0x18bc2f.SYMBOL_DOT===this._symbolType||_0x18bc2f.SYMBOL_Model===this._symbolType||_0x18bc2f.SYMBOL_PICTURE===this._symbolType)t.hasOwnProperty("showMode")||(t.showMode=this.showMode),t.hasOwnProperty("scale3D")||(t.scale3D=this._scale),t.hasOwnProperty("rotate3D")||(t.rotate3D=this._rotate),t.hasOwnProperty("positionOffset")||(t.positionOffset=this._hasDragLine),t.hasOwnProperty("dragPoint")||(t.dragPoint=this.dragPoint),t.hasOwnProperty("symbolRank")||(t.symbolRank=this._symbolRank),t.hasOwnProperty("anchorPoint")||(t.anchorPoint=this.anchorPoint),t.hasOwnProperty("middleMarkBounds")||(t.middleMarkBounds=this.middleMarkBounds),t.hasOwnProperty("negativeImage")||(t.negativeImage=this._isNegativeImage),t.hasOwnProperty("symbolSize")||(t.symbolSize=this._symbolSize),t.hasOwnProperty("gridSymbolSize")||(t.gridSymbolSize=this._gridSymbolSize),t.hasOwnProperty("pictureSymbolSize")||(t.pictureSymbolSize=this._pictureSymbolSize),t.hasOwnProperty("picturePath")||(t.picturePath=this.picturePath),t.hasOwnProperty("modelPath")||(t.modelPath=this.modelPath),t.hasOwnProperty("modelScale")||(t.modelScale=this.modelScale),t.hasOwnProperty("modelRotate")||(t.modelRotate=this._modelRotate),t.hasOwnProperty("vectorScale")||(t.vectorScale=this.vectorScale),t.hasOwnProperty("middleMarkExist")||(t.middleMarkExist=this._isMiddleMarkExist),t.hasOwnProperty("middleMarkBounds")||(t.middleMarkBounds=this._middleMarkBounds),t.hasOwnProperty("vectorRotate")||(t.vectorRotate=this._vectorRotate),t.hasOwnProperty("vectorDefaultSize")||(t.vectorDefaultSize=this._vectorDefaultSize),t.hasOwnProperty("dotShowMode")||(t.dotShowMode=this._showMode),t.hasOwnProperty("innerCells")||(t.innerCells=this._innerCells),t.hasOwnProperty("surroundLineWidth3D")||(t.surroundlineWidth3D=this.surroundLineWidth),t.hasOwnProperty("middleMarkExist")||(t.middleMarkExist=this.middleMarkExist),t.hasOwnProperty("annotationPosition")||(t.annotationPosition=this._textPos),t.hasOwnProperty("gridSurroundLineWidth3D")||(t.gridSurroundLineWidth3D=this._gridSurroundLineWidth/4),t.hasOwnProperty("gridLineWidth")||(t.gridLineWidth3D=this._gridLineWidth/4),t.hasOwnProperty("symbolSizeInLib")||(t.symbolSizeInLib=this._symbolSizeInLib),t.hasOwnProperty("BloodVolumes")||(t.BloodVolumes=this.BloodVolumes),t.hasOwnProperty("bIsShowBloodVolume")||(t.bIsShowBloodVolume=this.bIsShowBloodVolume),t.hasOwnProperty("disableDepthTestDistance")||(t.disableDepthTestDistance=this._disableDepthTestDistance.toString()),t.hasOwnProperty("sizeInMeters")||(t.sizeInMeters=this.sizeInMeters),t.hasOwnProperty("symbolSizeInMeters")||(t.symbolSizeInMeters=this.symbolSizeInMeters),t.hasOwnProperty("alwaysHasMiddelText")||(t.alwaysHasMiddelText=this.alwaysHasMiddelText),t.style.hasOwnProperty("lineSymbolID")||(t.style.lineSymbolID=this._lineSymbolID);else{if(t.hasOwnProperty("surroundLineWidth3D")||(t.surroundlineWidth3D=this._symbolStyle._surroundLineWidth),t.hasOwnProperty("updateSubSize")||(t.updateSubSize=this._updateSubSize),t.hasOwnProperty("subSymbolSize")||(t.subSymbolSize=this._subSymbolSize),!t.hasOwnProperty("subSymbols")&&(t.subSymbols=[],this._subSymbols))for(var o=0;o<this._subSymbols.length;++o)t.subSymbols.push(this._subSymbols[o]);t.hasOwnProperty("scaleValues")||(t.scaleValues=this._scaleValues),t.hasOwnProperty("subSymbolScaleValue")||(t.subSymbolScaleValue=this._subSymbolScaleValue),t.hasOwnProperty("extendWallOpacity")||(t.wallOpaqueRate=100-this.extendWallOpacity),!t.hasOwnProperty("isClampToGround")&&WebGLPlot$f.defined(this.isClampToGround)&&(t.isClampToGround=this.isClampToGround),!t.hasOwnProperty("arrowHeadType")&&WebGLPlot$f.defined(this.arrowHeadType)&&(t.arrowHeadType=this.arrowHeadType),!t.hasOwnProperty("arrowBodyType")&&WebGLPlot$f.defined(this.arrowBodyType)&&(t.arrowBodyType=this.arrowBodyType),!t.hasOwnProperty("arrowTailType")&&WebGLPlot$f.defined(this.arrowTailType)&&(t.arrowTailType=this.arrowTailType),t.style.hasOwnProperty("extendWallHeight")||(t.style.extendHeight=this._extendWallHeight)}return(this._symbolType!==_0x18bc2f.SYMBOL_DOT||this._symbolType!==_0x18bc2f.SYMBOL_TEXT)&&(t._CenterPosition=this._CenterPosition),t.hasOwnProperty("textContent")||(t.textContent=this._textContent),t.hasOwnProperty("markHalo")||(t.markHalo=this._markHalo),t.hasOwnProperty("showTipLength")||(t.showTipLength=this._showTipLength),t.hasOwnProperty("extendProperty")||(t.extendProperty=this.extendProperty),t.hasOwnProperty("annotationArray")||(t.annotationArray=this.annotationArray),null!==this._GeoJsonFeature?(_0x5a4c87(this._GeoJsonFeature,t),this._GeoJsonFeature):t}toGeoJson(){var e=this.getSymbolData();return WebGLPlot$f.toJSON(e)}getMinEditPts(){return WebGLPlot$f.defined(this)?_0x2d6822.isSymbolDot(this._symbolType)?1:this.getMinEditPts():0}getMaxEditPts(){return WebGLPlot$f.defined(this)?_0x2d6822.isSymbolDot(this._symbolType)?1:this.getMaxEditPts():0}drawAnnotationArray(){if(this._annotationArray.length>0)for(var e=0;e<this._annotationArray.length;e++){var t=null,i=this._annotationArray[e];if(""!==i._textContent&&i){var n=i._textStyle,r=i._textContent,o=new WebGLPlot$f.Color(n._foreColor.red,n._foreColor.green,n._foreColor.blue,n._foreColor.alpha),a=n._fontSize+"px "+n._fontName;0!==i._localPoint.x&&0!==i._localPoint.y?t=i._localPoint:(t=this._localPoints[0].clone(),i._localPoint=t),t=WebGLPlot$f.Cartesian3.fromDegrees(t.x,t.y,t.z);var s={style:n._outline?WebGLPlot$f.LabelStyle.FILL_AND_OUTLINE:WebGLPlot$f.LabelStyle.FILL,outlineColor:n._outlineColor,outlineWidth:n._outlineWidth,position:t,text:r,font:a,fillColor:o,horizontalOrigin:WebGLPlot$f.HorizontalOrigin.CENTER,id:this._id};(s=_0x38860f.addAlgoLabel(this,s,this._layer._scene)).SymbolType=_0x18bc2f.SYMBOL_TEXT}}}clearAllAnnotationArray(){this.annotationArray=[]}setAnnotationArray(e,t,i){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t)||!WebGLPlot$f.defined(i)||this.annotationArray.length<=0)return!1;var n=this.annotationArray[e];switch(t){case"textContent":n.textContent=i;break;case"localPoint":n.localPoint=i;break;case"fontName":n._textStyle.fontName=i;break;case"foreColor":n._textStyle.foreColor=i;break;case"fontSize":n._textStyle.fontSize=i;break;case"outlineWidth":n._textStyle.outlineWidth=i;break;case"outlineColor":n._textStyle.outlineColor=i;break;case"outline":n._textStyle.outline=i}return this._initialize=!1,!0}releaseSelection(){this.layer&&this.layer._plottingEdit&&this.layer._plottingEdit.unSelection(!0)}_destroy(){}_destroyBase(){}}function _0x5a4c87(e,t){for(var i in t)"style"===i||"textStyle2D"===i||"textStyle3D"===i||(e[i]=t[i]);var n=new Object;for(var i in t.style)n[i]=t.style[i];e.style=n;var r=new Object;for(var i in t.textStyle2D)r[i]=t.textStyle2D[i];e.textStyle2D=r;var o=new Object;for(var i in t.textStyle3D)o[i]=t.textStyle3D[i];e.textStyle3D=o}function _0x1b9fe2(e){var t=new WebGLPlot$f.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,t}function _0x1a2b6f(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}Object.defineProperties(_0x21fac2.prototype,{libID:{get:function(){return this._libID},set:function(e){if(e===this._libID||"number"!=typeof e)return!1;this._libID=e}},code:{get:function(){return this._code},set:function(e){if(e===this._code||"number"!=typeof e)return!1;this._code=e}},symbolName:{get:function(){return this._symbolName},set:function(e){if(e===this._symbolName)return!1;this._symbolName=e}},symbolType:{get:function(){return this._symbolType}},id:{get:function(){return this._id},set:function(e){e!==this._id&&(this._id=e)}},localPoints:{get:function(){return this._localPoints},set:function(e){e===this._localPoints||!Array.isArray(e)||(this.__setEffectParameter({point:e[0]}),this._localPoints=e,_0x2d6822.isSymbolDot(this.symbolType)&&WebGLPlot$f.defined(this.billboard)?this.billboard.position=WebGLPlot$f.Cartesian3.fromDegrees(e[0].x,e[0].y,e[0].z):this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this),this._layer&&this._layer._isEditable&&this._layer._plottingEdit&&this._layer._plottingEdit._graphicObject&&this._layer._plottingEdit._graphicObject.id===this.id&&this._layer._plottingEdit.drawSymbolExtend(this))}},layer:{get:function(){return this._layer}},isEdit:{get:function(){return this._isEdit},set:function(e){e===this._isEdit||e.constructor!==Boolean||(this._isEdit=e,this._initialize=!1)}},middleMarkExist:{get:function(){return this._middleMarkExist}},symbolStyle:{get:function(){return this._symbolStyle},set:function(e){e===this._symbolStyle||"number"!=typeof e||(this._symbolStyle=e,this._initialize=!1)}},symbolTextStyle:{get:function(){return this._symbolTextStyle},set:function(e){e===this._symbolTextStyle||"number"!=typeof e||(this._symbolTextStyle=e,this._initialize=!1)}},markHalo:{get:function(){return this._markHalo},set:function(e){e===this._markHalo||e.constructor!==Boolean||(this._markHalo=e,this._initialize=!1)}},showTipLength:{get:function(){return this._showTipLength},set:function(e){e===this._showTipLength||"number"!=typeof e||(this._showTipLength=e,this._initialize=!1)}},display:{get:function(){return this._display},set:function(e){e===this._display||e.constructor!==Boolean||(this._display=e,this.setVisible(e),this.__setEffectParameter({visible:e}))}},symbol:{get:function(){return this}},extendProperty:{get:function(){return this._extendProperty}},annotationArray:{get:function(){return this._annotationArray},set:function(e){if(e===this._annotationArray||!Array.isArray(e))return null;var t=this._layer._plottingEdit.CtrlPosition._ctrlPoints;if(this._annotationArray=e,WebGLPlot$f.defined(e.length)&&0===e.length){if(WebGLPlot$f.defined(this._layer._plottingEdit))for(var i=0;i<t.length;i++){var n=t.get(i);WebGLPlot$f.defined(n.annotationIndex)&&(n.show=!1)}}else if(WebGLPlot$f.defined(e.length)&&0!==e.length){const i=this._layer._scene.camera._positionCartographic.height;if(this._isEdit&&WebGLPlot$f.defined(this._layer._plottingEdit)){for(var r=0;r<t.length;r++)WebGLPlot$f.defined(t.get(r).annotationIndex)&&(t.get(r).show=!1,t.remove(t.get(r)));for(var o=0;o<e.length;o++){var a=e[o];if(0===a._localPoint.x&&0===a._localPoint.y){const e=1.141e-8*i*(o+1);let t=this._localPoints[0].clone();t.x+=e,a._localPoint=t}this._layer._plottingEdit.addAnnotationArrayPositionPt(a,o)}}}this._initialize=!1}},wholeHeight:{get:function(){return this._wholeHeight},set:function(e){e===this._wholeHeight||"number"!=typeof e||(this._wholeHeight=e,this._initialize=!1)}},dotDepthTest:{get:function(){return this._dotDepthTest},set:function(e){e===this._dotDepthTest||e.constructor!==Boolean||(this._disableDepthTestDistance=e?Number.MAX_VALUE:Number.MIN_VALUE,this._dotDepthTest=e,this._initialize=!1)}},textContent:{get:function(){return this._textContent},set:function(e){e!==this._textContent&&(this._textContent=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}}});var _0x2b9fd7=(_0x11f0d0=!0,function(e,t){var i=_0x11f0d0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x11f0d0=!1,i}),_0xa4d6be=_0x2b9fd7(void 0,(function(){return _0xa4d6be.toString().search("(((.+)+)+)+$").toString().constructor(_0xa4d6be).search("(((.+)+)+)+$")})),_0x11f0d0;function _0x3a6b26(e,t){this.subObjects=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._id=void 0===t?WebGLPlot.createGuid():t,this._initialize=!0,this.subFeatures=[],this.symbolName="GroupObject",this._isEdit=!1,this.libID=0,this.code=_0x18bc2f.GROUPOBJECT,this.symbolType=_0x18bc2f.GROUPOBJECT,this.addComponents(this.subObjects),this._GeoJsonFeature=null,this._centerPt3D=new _0x11ff81}_0xa4d6be(),_0x3a6b26.prototype.addComponents=function(e){for(var t in e)e[t]&&(e[t]instanceof _0x21fac2||e[t]instanceof _0x3a6b26)&&this.subFeatures.push(e[t].clone());this._initialize=!1},_0x3a6b26.prototype.unGroupObject=function(e){for(var t in this.subObjects)this.subObjects[t]._initialize=!1;return this.subObjects},_0x3a6b26.prototype.setOffset=function(e,t){var i=e.z-this.getBounds().min_Z;for(var n in this.subFeatures){if(t)for(var r=0;r<this.subFeatures[n]._localPoints.length;r++)this.subFeatures[n]._localPoints[r].z+=i;else for(r=0;r<this.subFeatures[n]._localPoints.length;r++){var o=this.subFeatures[n]._localPoints[r];this.subFeatures[n]._localPoints[r]=new _0x11ff81(o.x+e.x,o.y+e.y,o.z+e.z)}this.subFeatures[n]._initialize=!1}},_0x3a6b26.prototype.clone=function(){return new _0x3a6b26(this.subFeatures)},_0x3a6b26.prototype.update=function(e,t,i,n){if(0!==this.subFeatures.length)for(var r=this.getSubObjectsFromFeatures(this.subFeatures),o=0;o<r.length;o++)r[o].update(e,t,i,n)},_0x3a6b26.prototype.initSymbol=function(){if(0!==this.subFeatures.length)for(var e=this.getSubObjectsFromFeatures(this.subFeatures),t=0;t<e.length;t++)e[t].initSymbol();this._initialize=!0},_0x3a6b26.prototype.getFeatureByUuid=function(e){var t=this.getSubObjectsFromFeatures(this.subFeatures);for(var i in t)if(t[i]._id===e)return!0;return!1},_0x3a6b26.prototype.getBounds=function(){var e=[],t=[],i=[],n=0,r=0;for(var o in this.subFeatures){var a=this.subFeatures[o];if(a.symbolType===_0x18bc2f.SYMBOL_DOT||a.symbolType===_0x18bc2f.SYMBOL_TEXT){a.showMode===_0x4e5d29.Marker?n=a._model._initialRadius*a._model.scale:a.showMode===_0x4e5d29.Vector&&(n=a._dotVector.vectorHeight);var s=a.localPoints[0];e.push(s.x),t.push(s.y),i.push(s.z),r=s.z+n}else if(a.symbolType===_0x18bc2f.GROUPOBJECT){var l=a.getBounds();e.push(l.max_X),t.push(l.max_Y),i.push(l.max_Z),e.push(l.min_X),t.push(l.min_Y),i.push(l.min_Z)}else{var u=a.computeBounds();for(var c in a.localPoints){var h=a.localPoints[c];e.push(h.x),t.push(h.y),i.push(h.z)}e.push(u.maxX),t.push(u.maxY),e.push(u.minX),t.push(u.minY)}}var d=Math.max.apply({},e),f=Math.max.apply({},t),p=Math.max.apply({},i);return{max_X:d,max_Y:f,max_Z:p=p>r?p:r,min_X:Math.min.apply({},e),min_Y:Math.min.apply({},t),min_Z:Math.min.apply({},i),modelRadius:n}},_0x3a6b26.prototype.getSubObjectsFromFeatures=function(e){var t=[];for(var i in e)e[i]instanceof _0x3a6b26?t=t.concat(this.getSubObjectsFromFeatures(e[i].subFeatures)):t.push(e[i]);return t},_0x3a6b26.prototype.getSymbolData=function(){if(null===this._GeoJsonFeature){var e={version:2,libID:0,code:1e3,type:"GRAPHICOBJECT"};for(var t in e.uuid=this._id,e.symbolName=this.symbolName,e.symbolType=this.symbolType,e.geometries=[],this.subFeatures)e.geometries.push(this.subFeatures[t].getSymbolData());return e}return this._GeoJsonFeature},_0x3a6b26.prototype._destroy=function(){for(var e in this.subFeatures)this.subFeatures[e]._destroy(),this.subFeatures[e]=null;this.subFeatures=[]};var _0xb2e33e=(_0x1e7d1a=!0,function(e,t){var i=_0x1e7d1a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e7d1a=!1,i}),_0xd16c68=_0xb2e33e(void 0,(function(){return _0xd16c68.toString().search("(((.+)+)+)+$").toString().constructor(_0xd16c68).search("(((.+)+)+)+$")})),_0x1e7d1a;_0xd16c68();var _0x67b2cd={UNKNOWN:0,PLAYING:1,PAUSE:2,STOP:3,RESET:4},_0x5140b5=Object.freeze(_0x67b2cd),_0x326aef=(_0x142337=!0,function(e,t){var i=_0x142337?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x142337=!1,i}),_0x10a2ba=_0x326aef(void 0,(function(){return _0x10a2ba.toString().search("(((.+)+)+)+$").toString().constructor(_0x10a2ba).search("(((.+)+)+)+$")})),_0x142337;_0x10a2ba();var _0x2b4314={ANIMATION_UNKNOWN:-1,ANIMATION_WAY:0,ANIMATION_BLINK:1,ANIMATION_ATTRIBUTE:2,ANIMATION_SHOW:3,ANIMATION_ROTATE:4,ANIMATION_SCALE:5,ANIMATION_GROW:6,ANIMATION_HIDE_EXP:12,ANIMATION_REDUCE_EXP:13,ANIMATION_MOVEIN_EXP:14,ANIMATION_MOVEOUT_EXP:15,ANIMATION_ZOOMIN_EXP:16,ANIMATION_ZOOMOUT_EXP:17,ANIMATION_CURVE_EXP:18,ANIMATION_BROKENLINE_EXP:19,ANIMATION_GROW_EXP:20,ANIMATION_WAY_EXP:21,ANIMATION_BLINK_EXP:22,ANIMATION_SHOW_EXP:23,ANIMATION_MOVEVIEW_EXP:24,ANIMATION_WAY_GROUP:25},_0x304306=Object.freeze(_0x2b4314),_0x154918=(_0xe8a5d1=!0,function(e,t){var i=_0xe8a5d1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe8a5d1=!1,i}),_0xf4f675=_0x154918(void 0,(function(){return _0xf4f675.toString().search("(((.+)+)+)+$").toString().constructor(_0xf4f675).search("(((.+)+)+)+$")})),_0xe8a5d1;_0xf4f675();var WebGLPlot$e=window.WebGLPlot=window.WebGLPlot||{};function _0x18cb5a(e,t){if(e&&!(t.points.length<2)){this.plottingLayer=WebGLPlot$e.defaultValue(e,null),this.libID=WebGLPlot$e.defaultValue(t.libID,0),this.code=WebGLPlot$e.defaultValue(t.code,99999),this.url=WebGLPlot$e.defaultValue(t.url,""),this.startTime=WebGLPlot$e.defaultValue(t.startTime,0),this.duration=WebGLPlot$e.defaultValue(t.duration,5),this.lineColor=WebGLPlot$e.defaultValue(t.lineColor,new WebGLPlot$e.Color(1,0,0,1)),this.lineWidth=WebGLPlot$e.defaultValue(t.lineWidth,1),this.linePtsCount=WebGLPlot$e.defaultValue(t.linePtsCount,100),this.pathType=WebGLPlot$e.defaultValue(t.pathType,0),this.isShowPathLine=WebGLPlot$e.defaultValue(t.isShowPathLine,!1),this.isTangentDirection=WebGLPlot$e.defaultValue(t.isTangentDirection,!0),this.PathPts=t.points;var i=this;if(0===this.libID&&99999===this.code){var n={libID:this.libID,code:this.code,url:this.url,points:this.PathPts};e.createModelAndPicture(n,(function(e){e.feature&&(i.geo=e.feature)}))}else e.createSymbol(t.libID,t.code,t.points,(function(e){e.feature&&(i.geo=e.feature,i.geo.modelPath=t.url,i.geo.showMode=_0x4e5d29.Marker)}));this._updatePathLinePts=[],this.Polylines=[],this.createPathLine()}}_0x18cb5a.prototype.setPathLineisVisible=function(e){this.isShowPathLine=e},_0x18cb5a.prototype.getPathLineisVisible=function(){return this.isShowPathLine},_0x18cb5a.prototype.setTangentDirection=function(e){this.isTangentDirection=e},_0x18cb5a.prototype.getTangentDirection=function(){return this.isTangentDirection},_0x18cb5a.prototype.play=function(){var e=new Date;this._animationState===_0x5140b5.PAUSE?this._innerStartTime+=e.getTime()/1e3-this._pauseTime:this._innerStartTime=e.getTime()/1e3,this._updatePathLinePts=[],this._lastExecute=!1,this._animationState=_0x5140b5.PLAYING},_0x18cb5a.prototype.pause=function(){if(this._animationState===_0x5140b5.PLAYING){this._animationState=_0x5140b5.PAUSE;var e=new Date;this._pauseTime=e.getTime()/1e3}},_0x18cb5a.prototype.stop=function(){this._animationState=_0x5140b5.STOP},_0x18cb5a.prototype.execute=function(){if(!this.geo||!this.canExecute())return!1;this.polyline&&(this.polyline.show=this.isShowPathLine);var e=this._ratio,t=new Object;if(!((t=this._findPos(e,this._shapePoints,t))&&t.pt instanceof _0x11ff81))return!1;this.geo.localPoints[0]=this.PtsToSpherical(t.pt);var i=t.index;if(this.isTangentDirection){t.angle;var n=this.modifyAnimationFollowPath(this._shapePoints,i,t.pt),r=57.29577951308232,o=this.geo.showMode;_0x4e5d29.Marker===o?this.geo._modelRotate=new _0x11ff81(n.x*r,n.y*r,n.z*r):_0x4e5d29.Vector===o&&(this.geo._vectorRotate=n)}return this.geo._initialize=!1,!0},_0x18cb5a.prototype.updatePathLine=function(e){this._updatePathLinePts.length>=this.linePtsCount&&this._updatePathLinePts.splice(0,1),this._updatePathLinePts.push(e);var t=WebGLPlot$e.Material.fromType(WebGLPlot$e.Material.ColorType,{color:this.lineColor});this.polyline&&(this.polyline.positions=this._updatePathLinePts,this.polyline.width=this.lineWidth,this.polyline._material=t)},_0x18cb5a.prototype.createPathLine=function(){this.computerPathLinePts();var e=WebGLPlot$e.Material.fromType(WebGLPlot$e.Material.ColorType,{color:this.lineColor});if(!this.polyline){var t={width:this.lineWidth,positions:this._shapePoints,material:e,id:this.geo.id+"_PathLine"};this.polyline=_0x38860f.addAlgoPloyline(this,t,this.plottingLayer._scene),this.polyline&&(this.polyline.show=!1)}},_0x18cb5a.prototype.computerPathLinePts=function(){if(0===this.pathType)this._shapePoints=this.PathPts;else{var e=_0x2d6822.generateBezierCtrlPts(this.PathPts);this._shapePoints=_0x2d6822.generateBezierPointsWithCtrlPts(e)}for(var t=[],i=0;i<this._shapePoints.length;i++){var n=this._shapePoints[i];t.push(n.x),t.push(n.y),t.push(n.z)}this._shapePoints=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(t),this._pathLineLength=0;for(var r=1;r<this._shapePoints.length;r++)this._pathLineLength+=_0x2d6822.distance3D(this._shapePoints[r-1],this._shapePoints[r])},_0x18cb5a.prototype.canExecute=function(){if(this._animationState!==_0x5140b5.PLAYING)return!1;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this.startTime>e)return!1;var t=this.getRatioByTime();return!(t>1&&this._lastExecute||t<0)},_0x18cb5a.prototype.getRatioByTime=function(){if(this._animationState!==_0x5140b5.PLAYING)return 0;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this.startTime>e)return 0;var t=(e-this._innerStartTime-this.startTime)/this.duration;return t>=1&&!this._lastExecute?this._repeat?(this._innerStartTime=(new Date).getTime()/1e3,t=0,this._lastExecute=!1,this._animationState=_0x5140b5.PLAYING):(t=1,this._lastExecute=!0,this._animationState=_0x5140b5.STOP):t<0&&(t=0),this._ratio=t,t},_0x18cb5a.prototype._findPos=function(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLineLength)).result)return!1;var n=i.pt;return this.isTangentDirection&&(i.angle=_0x2d6822.radian(n,t[i.index])/Math.PI*180),i},_0x18cb5a.prototype.getPtsIndexByDistance=function(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x2d6822.distance(e[o],e[o+1]))>=t){var a=_0x2d6822.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x11ff81(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n},_0x18cb5a.prototype.modifyAnimationFollowPath=function(e,t,i){if(this.isTangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot$e.Cartesian3;u=WebGLPlot$e.Cartesian3.subtract(l[0],a,u),u=WebGLPlot$e.Cartesian3.normalize(u,u);var c=new WebGLPlot$e.Cartesian3;c=WebGLPlot$e.Cartesian3.subtract(s,a,c),c=WebGLPlot$e.Cartesian3.normalize(c,c);var h=new WebGLPlot$e.Cartesian3;h=WebGLPlot$e.Cartesian3.cross(c,u,h),h=WebGLPlot$e.Cartesian3.normalize(h,h);var d=new WebGLPlot$e.Cartesian3;d=WebGLPlot$e.Cartesian3.cross(h,c,d),d=WebGLPlot$e.Cartesian3.normalize(d,d),c=new WebGLPlot$e.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot$e.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot$e.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),h=WebGLPlot$e.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),c=WebGLPlot$e.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),d=WebGLPlot$e.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot$e.Cartesian3(p,_,m)}},_0x18cb5a.prototype.FromAngleAxis=function(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x11ff81(r*i.x,r*i.y,r*i.z),s=new _0x11ff81;s=WebGLPlot$e.Cartesian3.cross(a,e,s);var l=new _0x11ff81;l=WebGLPlot$e.Cartesian3.cross(a,s,l);var u=new _0x11ff81(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x11ff81(2*l.x,2*l.y,2*l.z);return new _0x11ff81(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)},_0x18cb5a.prototype.ToEulerAnglesXYZ=function(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x11ff81(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x11ff81((n=0)-Math.atan2(t.x,t.y),r,n):new _0x11ff81(Math.atan2(t.x,t.y)-(n=0),r,n)},_0x18cb5a.prototype.PtsToSpherical=function(e){var t=this.plottingLayer._scene.globe.ellipsoid,i=new WebGLPlot$e.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot$e.CesiumMath.toDegrees(n.latitude);return new _0x11ff81(WebGLPlot$e.CesiumMath.toDegrees(n.longitude),r,n.height)};var _0x3c74ee=(_0x425058=!0,function(e,t){var i=_0x425058?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x425058=!1,i}),_0x33edc8=_0x3c74ee(void 0,(function(){return _0x33edc8.toString().search("(((.+)+)+)+$").toString().constructor(_0x33edc8).search("(((.+)+)+)+$")})),_0x425058;_0x33edc8();var WebGLPlot$d=window.WebGLPlot=window.WebGLPlot||{};class _0x4381c6 extends _0x21fac2{constructor(e){super(e=WebGLPlot$d.defaultValue(e,WebGLPlot$d.defaultValue.EMPTY_OBJECT)),this._scalePoints=WebGLPlot$d.defaultValue(e.scalePoints,[]),this._scaleValues=WebGLPlot$d.defaultValue(e.scaleValues,[]),this._subSymbols=WebGLPlot$d.defaultValue(e.subSymbols,[]),this._isPixelLine=WebGLPlot$d.defaultValue(e.isPixelLine,!0),this._layer=WebGLPlot$d.defaultValue(e.layer,null),this._isEdit=WebGLPlot$d.defaultValue(e.isEdit,!0),this._extendWallOpacity=WebGLPlot$d.defaultValue(e.extendWallOpacity,.7),this._wholeHeight=0,this._isScalePtModify=!1,this._modifyScalePtParams=null,this._symbolAlgo=null,this._updateSubSize=!0,this._subSymbolSize=0,this._isAnimationFeature=!1,this._subSymbolScaleValue=.1,this.sceneMode=WebGLPlot$d.SceneMode.SCENE3D,this.fillCanvas=document.createElement("canvas"),this.mergeDefaultStyle(),this._isClampToGround=!1,this.Polylines=[],this.PolygonFillInstances=[],this.WallInstances=[],this.GroundLineInstances=[],this._SubSymbolDefaultPixelSize=20}initSymbol(){if((!this._initialize||this.sceneMode!==this._layer._scene.mode)&&(this._initialize=!0,WebGLPlot$d.defined(this._layer)&&WebGLPlot$d.defined(this._layer._scene)&&(this.sceneMode=this._layer._scene.mode),this._clearCells(),this._display&&this._layer.visibility&&(null===this._symbolAlgo&&(this._symbolAlgo=WebGLPlot$d.createAlgo({libID:this.libID,code:this.code}),this._subSymbols.length>0&&this._subSymbols.symbolData?this._symbolAlgo.subSymbols=this._subSymbols:this.createSubSymbolData()),WebGLPlot$d.defined(this._symbolAlgo)))){this.__setArrowType();var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.localPoints);if(e=_0x2d6822.clearNextSamePts(e),!(this.symbolType!==_0x18bc2f.SYMBOL_TEXT&&e.length<2)){var t,i=this.localPoints.length;this._dHeight=0;for(var n=[],r=0;r<i;r++)0===r?this._dHeight=this.localPoints[0].z:this._dHeight<this.localPoints[r].z&&(this._dHeight=this.localPoints[r].z),0!==this._wholeHeight&&(this.localPoints[r].z=this._wholeHeight,this._dHeight=this._wholeHeight),n.push(new _0x11ff81(this.localPoints[r].x,this.localPoints[r].y,this.localPoints[r].z));if(this._symbolAlgo.controlPoints=n,this.setAlgoDefaultValue(),this._scalePoints=[],this._symbolAlgo.scaleValues.length<=this._scaleValues.length&&(this._symbolAlgo.scaleValues=this._scaleValues),this._symbolAlgo.style={color:this.symbolStyle.lineColor},WebGLPlot$d.defined(this._symbolAlgo.subSymbolScaleValue)?this._subSymbolScaleValue=this._symbolAlgo.subSymbolScaleValue:this._symbolAlgo.subSymbolScaleValue=this._subSymbolScaleValue,this._isScalePtModify){var o=this._modifyScalePtParams.index,a=this._modifyScalePtParams.position;a.isScalePoint=!0,this._symbolAlgo.isEdit=!0,this._symbolAlgo.modifyPoint(o,a),t=this._symbolAlgo.components}else this._updateSubSize&&!this._isAnimationFeature?(this._symbolAlgo.subSymbolDefaultPixelSize=this._SubSymbolDefaultPixelSize,this._symbolAlgo.subSymbolSize=this.pixelDisToRealDis(this._symbolAlgo.controlPoints[0],this._symbolAlgo.subSymbolDefaultPixelSize),this._subSymbolSize=this._symbolAlgo.subSymbolSize,this._updateSubSize=!1,this.createSubSymbolData()):this._symbolAlgo.subSymbolSize=this._subSymbolSize,this._isAnimationFeature&&(this._symbolAlgo.isEdit=!0,this._symbolAlgo.subSymbolScaleValue=this._subSymbolScaleValue),this._symbolAlgo.isEdit=this._isEdit,this._symbolAlgo.calculateParts(),t=this._symbolAlgo.components;if(this._scalePoints=this._symbolAlgo.scalePoints,this._scaleValues=this._symbolAlgo.scaleValues,this._subSymbols=this._symbolAlgo.subSymbols,WebGLPlot$d.defined(t)){var s=[];if(s=Array.isArray(t)?t:[t],0===this.libID&&this.code===_0x18bc2f.SYMBOL_COMBINATIONALCIRCLE)for(let e=0;e<s.length;e++){const t=s[e];if(t&&t.type===_0x18bc2f.SYMBOL_ARBITRARYPOLYGON){s.splice(e,1);break}}this.createGeometryInstances(s,this._dHeight),this._pushCollentionInstances(this.id),_0x38860f.setUpdatePrimitive(!0,this._layer._scene),this._initSymbolFinished.raiseEvent(this)}}}}getMinEditPts(){return WebGLPlot$d.defined(this._symbolAlgo)?this._symbolAlgo.minEditPts:0}getMaxEditPts(){return WebGLPlot$d.defined(this._symbolAlgo)?this._symbolAlgo.maxEditPts:0}getSymbolName(){return WebGLPlot$d.defined(this._symbolAlgo)&&0!==this._symbolAlgo.symbolName.length?this._symbolAlgo.symbolName:""}createGeometryInstances(e,t){var i=this.isAllPointsHaveZ(e),n=[],r=this.computeBounds(e);let o=[];for(var a=0;a<e.length;a++){var s=e[a];Array.isArray(s.positionPoints)||(s.positionPoints=[s.positionPoints]);var l=s.positionPoints;if(s.shapePts&&(l=s.shapePts),!WebGLPlot$d.defined(l))return n;if(0===this.libID&&34===this.code&&(this._symbolAlgo.maxEditPts=1,this._symbolAlgo.minEditPts=1,l=[s.positionPoints[0]]),l.length>1){_0x2d6822.isSymbolCellCanFill(s)&&l.push(l[0]);for(var u=[],c=[],h=[],d=0;d<l.length;d++){var f=l[d];isNaN(f.x)||isNaN(f.y)||((isNaN(f.z)||void 0===f.z)&&(f.z=0),WebGLPlot$d.defined(this._layer)&&WebGLPlot$d.defined(this._layer._scene)&&this._layer._scene.mode===WebGLPlot$d.SceneMode.SCENE2D&&(t=0,f.z=0),i&&0!==this.libID||48===this.code||24===this.code||32===this.code?c.push(new _0x11ff81(f.x,f.y,f.z)):(f=new _0x11ff81(f.x,f.y,t),c.push(new _0x11ff81(f.x,f.y,t))),u.push(WebGLPlot$d.Cartesian3.fromDegrees(f.x,f.y,f.z)),h.push(f.z))}if(u=this.interPolation(u),0===this.libID&&this.code===_0x18bc2f.SYMBOL_COMBINATIONALCIRCLE&&29!==s.type&&o.push(u),0===this.libID&&this.code===_0x18bc2f.SYMBOL_CONCENTRICCIRCLE){if(29===s.type&&o.unshift(u),0===s.style.strokeWidth&&s.style.lineWidthLimit)continue}else if(this.createFillGeometry(s,u),0===s.style.strokeWidth&&s.style.lineWidthLimit){this._symbolStyle._fillSymbolID||this.generateFillGeometry(u,void 0);continue}var p=this._symbolStyle._surroundLineType;if(s.style&&s.style.surroundLineLimit){p===_0x26609d.SURROUNDLINE_NONE&&(p=s.style.surroundLineType);for(var _=this.generateSurroundLineGeometry(c,u,r,s.style,p),m=0;m<_.length;m++)_[m]&&n.push(_[m])}else if(_0x26609d.SURROUNDLINE_NONE!==this._symbolStyle._surroundLineType)for(_=this.generateSurroundLineGeometry(c,u,r,this._symbolStyle,p),m=0;m<_.length;m++)_[m]&&n.push(_[m]);var g=this._symbolStyle._lineWidth,x=null;s.style.lineColorLimit?(x=_0x2d6822.StringtoColor(s.style.color)).alpha=s.style.strokeOpacity:(x=this._symbolStyle._lineColor).alpha=this._symbolStyle._opacity,this._layer.selectedFeature&&this._id===this._layer.selectedFeature.id&&!this._layer.isEditable&&(x=new WebGLPlot$d.Color(0,0,1,1));var v=WebGLPlot$d.getDefaultStyle({libID:this.libID,code:this.code});v.color&&((x=_0x2d6822.StringtoColor(v.color)).alpha=this._symbolStyle._opacity);var y=this.createLineGeometry(u,g,x);if(null!==y&&n.push(y),this._extendWallHeight>0&&u.length>1){x=this._symbolStyle._lineColor;x=WebGLPlot$d.Color.fromAlpha(x,this._extendWallOpacity),this.createExtendWall(u,x,h)}}else 1===l.length&&34===s.type&&this.addTextContent(s,t);this.drawAnnotationArray()}return o.length>0&1!==this._symbolStyle._fillSymbolID&&this.generateFillGeometry(o,void 0,!0),n}computeBounds(e){var t=0,i=0,n=180,r=180,o=!1;WebGLPlot$d.defined(e)||(e=this._symbolAlgo.components,o=!0);for(var a=0;a<e.length;a++){var s=e[a];if(0!==s.style.weight){Array.isArray(s.positionPoints)||(s.positionPoints=[s.positionPoints]);var l=void 0;if(0===this.libID&&1014!==this.code&&1022!==this.code&&_0x18bc2f.SYMBOL_CIRCLE===s.type){let e=WebGLPlot$d.Cartesian3.fromDegrees(s.positionPoints[0].x,s.positionPoints[0].y,s.positionPoints[0].z),t=WebGLPlot$d.Cartesian3.fromDegrees(s.positionPoints[1].x,s.positionPoints[1].y,s.positionPoints[1].z);var u=WebGLPlot$d.Transforms.eastNorthUpToFixedFrame(e);const i=WebGLPlot$d.Cartesian3.distance(e,t);for(var c=_0x2d6822.calcCirclePts(i,new WebGLPlot$d.Cartesian3(0,0,0),72),h=[],d=0;d<c.length;d++){var f=new WebGLPlot$d.Cartesian3,p=new WebGLPlot$d.Cartesian3;f=WebGLPlot$d.Cartesian3.multiplyByScalar(new WebGLPlot$d.Cartesian3(c[d].x,c[d].y,0),1,f),p=WebGLPlot$d.Matrix4.multiplyByPoint(u,f,p);var _=WebGLPlot$d.Cartographic.fromCartesian(p);const e=WebGLPlot$d.CesiumMath.toDegrees(_.longitude),t=WebGLPlot$d.CesiumMath.toDegrees(_.latitude);h.push(new WebGLPlot$d.Cartesian3(e,t,0))}l=h,s.shapePts=h}else l=WebGLPlot$d.getSpatialData(s.type,s.positionPoints),s.shapePts=l;if(WebGLPlot$d.defined(l))for(var m=0;m<l.length;++m)l[m].x<n&&(n=l[m].x),l[m].y<r&&(r=l[m].y),l[m].x>t&&(t=l[m].x),l[m].y>i&&(i=l[m].y)}}this._CenterPosition=new _0x11ff81((t+n)/2,(r+i)/2,0);var g=t-n,x=i-r;return o?{x:n+g/2,y:r,z:0,maxX:t,maxY:i,minX:n,minY:r}:g>=x?g:x}generateSurroundLineGeometry(e,t,i,n,r){var o,a,s,l=[],u=[],c=[],h=this.symbolStyle.surroundLineColor;switch(h=WebGLPlot$d.Color.fromAlpha(h,this.symbolStyle.opacity),n.surroundLineLimit&&(r=n.surroundLineType,n.lineColorLimit&&((!n.surroundLineColor||""===n.surroundLineColor)&&(n.surroundLineColor="#ffff00"),(h=_0x249384(n.surroundLineColor)).alpha=n.surroundLineColorOpacity)),r){case _0x26609d.SURROUNDLINE_ALL:a=this._symbolStyle._surroundLineWidth/2+this._symbolStyle._lineWidth/2,this._isPixelLine&&(a=this._surroundRatioVal*i),s=_0x2d6822.getSurroundLinePts(e,a);for(var d=0;d<s.length;++d)u.push(new WebGLPlot$d.Cartesian3.fromDegrees(s[d].x,s[d].y,s[d].z));a=-a;for(var f=(s=_0x2d6822.getSurroundLinePts(e,a)).length-1;f>=0;--f)c.push(new WebGLPlot$d.Cartesian3.fromDegrees(s[f].x,s[f].y,s[f].z));o=this._symbolStyle._surroundLineWidth;break;case _0x26609d.SURROUNDLINE_INNER:case _0x26609d.SURROUNDLINE_OUT:a=this._symbolStyle._surroundLineWidth/2+this._symbolStyle._lineWidth/2,this._isPixelLine&&(a=this._surroundRatioVal*i),r===_0x26609d.SURROUNDLINE_INNER&&(a=-a),s=_0x2d6822.getSurroundLinePts(e,a);for(d=0;d<s.length;++d)u.push(new WebGLPlot$d.Cartesian3.fromDegrees(s[d].x,s[d].y,s[d].z));o=this._symbolStyle._surroundLineWidth}return u.length<2||(u=this.interPolation(u),l.push(this.createLineGeometry(u,o,h,!0)),c.length>=2&&(c=this.interPolation(c),l.push(this.createLineGeometry(c,o,h,!0)))),l}createFillGeometry(e,t){if(!e.style.fillLimit||e.style.fill){if((e.style.fillLimit&&e.style.fill||0===e.style.fillStyle&&e.style.fillLimit)&&_0x2d6822.isSymbolCellCanFill(e))return void this.generateFillGeometry(t,e.style);if(1!==this.symbolStyle.fillSymbolID&&(_0x2d6822.isCanFill(this)||_0x2d6822.isSymbolCellCanFill(e)))return void this.generateFillGeometry(t,void 0);if(WebGLPlot$d.defined(e.style.fillSymbolID)&&0===e.style.fillSymbolID)return void this.generateFillGeometry(t,e.style)}}generateFillGeometry(e,t,i){var n,r,o=void 0;if(i){let t=0;for(let i=1;i<e.length;i++)e[i].length>e[t].length&&(t=i);let i=WebGLPlot$d.clonePoints(e[t]);e.splice(t,1);let n=[];for(let t=0;t<e.length;t++){let i=e[t];n.push(new WebGLPlot$d.PolygonHierarchy(i))}let r=new WebGLPlot$d.PolygonHierarchy(i,n);o=new WebGLPlot$d.PolygonGeometry({polygonHierarchy:r,perPositionHeight:!0})}else o=WebGLPlot$d.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0});if(WebGLPlot$d.defined(t)&&t.fillLimit?n=WebGLPlot$d.defined(t.fillColor)&&t.fillColorLimit?_0x2d6822.StringtoColor(t.fillColor):t.color&&t.fillColorLimit?WebGLPlot$d.Color.clone(_0x2d6822.StringtoColor(t.color)):WebGLPlot$d.Color.clone(this._symbolStyle._lineColor):(n=WebGLPlot$d.Color.clone(this._symbolStyle._fillForeColor)).alpha=1-this._symbolStyle._fillOpaqueRate/100,this._layer.selectedFeature&&this._id===this._layer.selectedFeature.id&&!this._layer.isEditable&&(n=new WebGLPlot$d.Color(0,0,1,1)),null!==(r=this.isClampToGround?o:WebGLPlot$d.PolygonGeometry.createGeometry(o))&&WebGLPlot$d.defined(r)){var a=new WebGLPlot$d.GeometryInstance({geometry:r,id:this.id,attributes:{color:WebGLPlot$d.ColorGeometryInstanceAttribute.fromColor(n)}});a.ForeRGBA=n.toRgba(),a.BackRGBA=this._symbolStyle._fillBackColor.toRgba(),a.isClampToGround=this.isClampToGround,a._isAnimationFeature=this._isAnimationFeature,this.PolygonFillInstances.push(a)}}createFillCanvas(){var e=this.fillCanvas.width=100,t=this.fillCanvas.height=100;this._ctx=this.fillCanvas.getContext("2d");var i=null;switch(this._symbolStyle._fillGradientMode){case 1:i=this._ctx.createLinearGradient(0,0,e,t);break;case 2:var n=e/2,r=t/2,o=e/4,a=2*o;i=this._ctx.createRadialGradient(n,r,o,n,r,a)}return i.addColorStop(0,this._symbolStyle._fillForeColor.toCssColorString()),i.addColorStop(1,this._symbolStyle._fillBackColor.toCssColorString()),this._ctx.fillStyle=i,this._ctx.fillRect(0,0,100,100),this.fillCanvas}isAllPointsHaveZ(e){for(var t=!0,i=0;i<e.length;i++)for(var n=e[i],r=0;r<n.positionPoints.length;r++){if(void 0===n.positionPoints[r].z){t=!1;break}}return t}createSubSymbolData(){0===this._subSymbols.length&&this._symbolAlgo&&(this._subSymbols=JSON.parse(JSON.stringify(this._symbolAlgo.subSymbols)));for(var e=0;e<this._subSymbols.length;e++)this.getServerData(this._subSymbols[e],e)}getServerData(e,t,i){var n=this,r=WebGLPlot$d.getLibManager(this._layer._scene._plottingID).getSymbolData(e.libID,e.code);if(WebGLPlot$d.defined(r)&&null!==r){var o=[];if(!WebGLPlot$d.defined(r.innerCells))return;for(var a=0;a<r.innerCells.length;a++)r.innerCells[a].surroundLineFlag||o.push(r.innerCells[a]);return r.innerCells=o,e.symbolData=r,n._symbolAlgo.subSymbols[t]=e,n._initialize=!1,i&&i(),!0}var s=WebGLPlot$d.getServerData(e.libID,e.code,void 0,this._layer._scene._plottingID);!s||(s.getSymbolInfo.events.on({processCompleted:function(r){var o=r.result,a=[];if(WebGLPlot$d.defined(o.innerCells)){for(var s=0;s<o.innerCells.length;s++)o.innerCells[s].surroundLineFlag||a.push(o.innerCells[s]);return o.innerCells=a,e.symbolData=o,n._symbolAlgo.subSymbols[t]=e,n._initialize=!1,i&&i(),!0}},processFailed:function(e){},scope:this}),s.getSymbolInfo.processAsync(s.getSymbolInfoParameters))}pixelDisToRealDis(e,t){if(void 0===e)return 0;var i=this._layer._scene,n=WebGLPlot$d.Cartesian3.fromDegrees(e.x,e.y,e.z),r=WebGLPlot$d.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(!WebGLPlot$d.defined(r))return.001;var o=new WebGLPlot$d.Cartesian2(r.x,r.y+t),a=_0x2d6822.getPosition2(i,r),s=_0x2d6822.getPosition2(i,o);return _0x2d6822.distance(a,s)}setAlgoDefaultValue(){if(this._updateSubSize&&0===this._symbolAlgo.libID&&1019===this._symbolAlgo.code&&(this._symbolAlgo.startAngle=0,this._symbolAlgo.endAngle=360),0===this._symbolAlgo.libID&&1022===this._symbolAlgo.code){WebGLPlot$d.defined(this._symbolAlgo.radius)||(this._symbolAlgo.radius=[]);var e=this.localPoints;if(this._symbolAlgo.radius.length<e.length){var t=this.pixelDisToRealDis(e[0],this._symbolAlgo.defaultRadius);this._symbolAlgo.radius.push(t)}}}addTextContent(e,t){if(WebGLPlot$d.defined(e.textContent)&&null!==e.textContent){0===e.textContent.length&&(!WebGLPlot$d.defined(this.textContent)||0===this.textContent.length)&&(this.textContent="AaBb"),0!==e.textContent.length&&(this.textContent=e.textContent);var i=this.textContent,n=WebGLPlot$d.Cartesian3.fromDegrees(e.positionPoints[0].x,e.positionPoints[0].y,t),r=this._symbolTextStyle,o=new WebGLPlot$d.Color(r._foreColor.red,r._foreColor.green,r._foreColor.blue,r._foreColor.alpha);this._isSelected&&(o=new WebGLPlot$d.Color(0,1,0,1));var a,s=r._fontSize+"px "+r._fontName;0===this.libID&&34===this.code?a={style:r.outline?WebGLPlot$d.LabelStyle.FILL_AND_OUTLINE:WebGLPlot$d.LabelStyle.FILL,outlineColor:r._backColor,outlineWidth:r.outlineWidth,position:n,text:i,font:s,fillColor:o,horizontalOrigin:WebGLPlot$d.HorizontalOrigin.CENTER,id:this._id}:(WebGLPlot$d.defined(e.style.fontColorLimit)&&WebGLPlot$d.defined(e.style.fontColor)&&e.style.fontColorLimit&&(o=_0x249384(e.style.fontColor)),a={position:n,text:i,font:s,fillColor:o,horizontalOrigin:WebGLPlot$d.HorizontalOrigin.CENTER}),(a=_0x38860f.addAlgoLabel(this,a,this._layer._scene)).SymbolType=_0x18bc2f.SYMBOL_TEXT}}createExtendWall(e,t,i){var n=[],r=[];if(i.length===e.length)for(let e=0;e<i.length;e++){var o=i[e]-this._extendWallHeight;n.push(o),0===this._dHeight?r.push(.1):r=void 0}else for(var a=0;a<e.length;a++){(o=WebGLPlot$d.Cartographic.fromCartesian(e[a]).height-this._extendWallHeight)<0&&(o=0),n.push(o),0===this._dHeight?r.push(.1):r=void 0}var s=new WebGLPlot$d.WallGeometry({positions:e,minimumHeights:n,maximumHeights:r}),l=WebGLPlot$d.WallGeometry.createGeometry(s);if(WebGLPlot$d.defined(l)){var u=WebGLPlot$d.ColorGeometryInstanceAttribute.fromColor({alpha:0,red:1,green:1,blue:0}),c=new WebGLPlot$d.GeometryInstance({geometry:l,attributes:{color:u},id:this.id});c.ForeRGBA=t.toRgba(),c._isAnimationFeature=this._isAnimationFeature,this.WallInstances.push(c)}}setSubSymbols(e,t){if(0===this._symbolAlgo.subSymbols.length&&0===this.libID&&1025!==this.code||e===this._subSymbols[t])return!1;{this._initialize=!1;let i=this;return this.getServerData(e,t,(function(){_0x47a70a.getInstance().symbolModified.raiseEvent(i)})),!0}}createLineGeometry(e,t,i,n){if(this.isClampToGround&&!this.isDrawing)return this.createGroundPolylineGeometry(e,t,i,n),null;var r=void 0;if(this._isPixelLine){var o={width:t,positions:e,material:WebGLPlot$d.Material.fromType(WebGLPlot$d.Material.ColorType,{color:i}),id:this.id};return(o=_0x38860f.addAlgoPloyline(this,o,this._layer._scene)).SymbolType=_0x18bc2f.SYMBOL_ALGO,o}var a=new WebGLPlot$d.PolylineVolumeGeometry({polylinePositions:e,shapePositions:[new WebGLPlot$d.Cartesian2(-.5*t,-.5*t),new WebGLPlot$d.Cartesian2(.5*t,-.5*t),new WebGLPlot$d.Cartesian2(.5*t,.5*t),new WebGLPlot$d.Cartesian2(-.5*t,.5*t)],cornerType:2});if(r=WebGLPlot$d.PolylineVolumeGeometry.createGeometry(a),!WebGLPlot$d.defined(r))return null;var s=new WebGLPlot$d.GeometryInstance({geometry:r,id:this.id,attributes:{color:i}});return n&&(s.bIsSurroundLine=!0),s}createGroundPolylineGeometry(e,t,i,n){var r=new WebGLPlot$d.GroundPolylineGeometry({vertexFormat:WebGLPlot$d.VertexFormat.POSITION_ONLY,positions:e,width:t}),o=new WebGLPlot$d.GeometryInstance({geometry:r,attributes:{color:WebGLPlot$d.ColorGeometryInstanceAttribute.fromColor(i)},id:this._id});n&&(o.bIsSurroundLine=!0),o._isAnimationFeature=this._isAnimationFeature,this.GroundLineInstances.push(o)}_destroy(){_0x47a70a.getInstance().symbolDestroyed.raiseEvent(this.id),this._clearCells(),_0x38860f.setUpdatePrimitive(!0,this._layer._scene)}_clearCells(){_0x38860f.removeAllAlgoPloyline(this,this._layer._scene),_0x38860f.removeAllAlgoLabel(this,this._layer._scene),this.PolygonFillInstances=[],this.WallInstances=[],this.GroundLineInstances=[],this._pushCollentionInstances(this.id)}_pushCollentionInstances(e){this.PolygonFillInstances.length>0?_0x38860f.setPolygonFillInstances(e,this.PolygonFillInstances,this._layer._scene):_0x38860f.setPolygonFillInstances(e,[],this._layer._scene),this.WallInstances.length>0?_0x38860f.setWallInstances(e,this.WallInstances,this._layer._scene):_0x38860f.setWallInstances(e,[],this._layer._scene),this.GroundLineInstances.length>0?_0x38860f.setGroundInstances(e,this.GroundLineInstances,this._layer._scene):_0x38860f.setGroundInstances(e,[],this._layer._scene)}clone(){var e=new _0x4381c6({layer:this._layer,libID:this._libID,code:this._code,localPoints:this.localPoints,serverData:this._serverData});return e._libID=JSON.parse(JSON.stringify(this._libID)),e._code=JSON.parse(JSON.stringify(this._code)),e._symbolName=JSON.parse(JSON.stringify(this._symbolName)),e._symbolType=JSON.parse(JSON.stringify(this._symbolType)),e._display=JSON.parse(JSON.stringify(this._display)),e._id=JSON.parse(JSON.stringify(this._id)),e._initialize=JSON.parse(JSON.stringify(!1)),e._isEdit=JSON.parse(JSON.stringify(this._isEdit)),e._isUseSymbolLibStyle=JSON.parse(JSON.stringify(this._isUseSymbolLibStyle)),e._markHalo=JSON.parse(JSON.stringify(this._markHalo)),e._localPoints=WebGLPlot$d.clonePoints(this.localPoints),e._symbolStyle=this._symbolStyle.clone(),e._symbolTextStyle=this._symbolTextStyle.clone(),e._serverData=JSON.parse(JSON.stringify(this._serverData)),e._extendProperty=JSON.parse(JSON.stringify(this._extendProperty)),e._annotationArray=JSON.parse(JSON.stringify(this._annotationArray)),e._extendWallHeight=JSON.parse(JSON.stringify(this._extendWallHeight)),e._wholeHeight=JSON.parse(JSON.stringify(this._wholeHeight)),e._scaleValues=JSON.parse(JSON.stringify(this._scaleValues)),e._subSymbolSize=JSON.parse(JSON.stringify(this._subSymbolSize)),e._subSymbols=JSON.parse(JSON.stringify(this._subSymbols)),e._isUpdateSubSymbolSize=JSON.parse(JSON.stringify(this._updateSubSize)),e._isAnimationFeature=JSON.parse(JSON.stringify(this._isAnimationFeature)),e._subSymbolScaleValue=JSON.parse(JSON.stringify(this._subSymbolScaleValue)),e._extendWallOpacity=JSON.parse(JSON.stringify(this._extendWallOpacity)),e.isClampToGround=JSON.parse(JSON.stringify(this.isClampToGround)),e}interPolation(e){var t=[];for(let n=0;n<e.length;n++){const r=e[n];var i=WebGLPlot$d.Cartographic.fromCartesian(r);t.push(i.height+1)}return WebGLPlot$d.PolylinePipeline.generateCartesianArc({positions:e,height:t,minDistance:WebGLPlot$d.defaultValue(WebGLPlot$d.Plotting._AlgoSymoblPipelineDisMin,1e4)}).push(e[e.length-1]),e}__setArrowType(){this._symbolAlgo&&(WebGLPlot$d.defined(this._arrowHeadType)&&(this._symbolAlgo.arrowHeadType=this._arrowHeadType),WebGLPlot$d.defined(this._arrowBodyType)&&(this._symbolAlgo.arrowBodyType=this._arrowBodyType),WebGLPlot$d.defined(this._arrowTailType)&&(this._symbolAlgo.arrowTailType=this._arrowTailType))}}function _0x249384(e){if(!e||""===e)return new WebGLPlot$d.Color(1,0,0);var t=parseInt(e.slice(1,3),16)/255,i=parseInt(e.slice(3,5),16)/255,n=parseInt(e.slice(5,7),16)/255;return new WebGLPlot$d.Color(t,i,n)}Object.defineProperties(_0x4381c6.prototype,{subSymbols:{get:function(){return this._subSymbols},set:function(e){e===this._subSymbols||!Array.isArray(e)||(this._subSymbols=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},ispixelLine:{get:function(){return this._ispixelLine},set:function(e){e===this._ispixelLine||e.constructor!==Boolean||(this._ispixelLine=e,this._initialize=!1)}},surroundRatioVal:{get:function(){return this._surroundRatioVal},set:function(e){e===this._surroundRatioVal||"number"!=typeof e||(this._surroundRatioVal=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},extendWallHeight:{get:function(){return this._extendWallHeight},set:function(e){e===this._extendWallHeight||"number"!=typeof e||(this._extendWallHeight=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},extendWallOpacity:{get:function(){return Math.round(100*(1-this._extendWallOpacity))},set:function(e){this.extendWallOpacity==e||"number"!=typeof e||(this._extendWallOpacity=1-e/100,this._initialize=!1)}},isClampToGround:{get:function(){return this._isClampToGround},set:function(e){e!==this._isClampToGround&&(this._isClampToGround=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},arrowHeadType:{get:function(){return this._arrowHeadType},set:function(e){"number"==typeof e&&(this._arrowHeadType=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},arrowBodyType:{get:function(){return this._arrowBodyType},set:function(e){"number"==typeof e&&(this._arrowBodyType=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},arrowTailType:{get:function(){return this._arrowTailType},set:function(e){"number"==typeof e&&(this._arrowTailType=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}}});var _0x4db37b=(_0x4349d2=!0,function(e,t){var i=_0x4349d2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4349d2=!1,i}),_0x251291=_0x4db37b(void 0,(function(){return _0x251291.toString().search("(((.+)+)+)+$").toString().constructor(_0x251291).search("(((.+)+)+)+$")})),_0x4349d2;function _0x526be0(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.symbolType=WebGLPlot.defaultValue(e.symbolType,_0x18bc2f.SYMBOL_UNKNOW),this.points=WebGLPlot.defaultValue(e.points,[]),this.lineColorLimit=WebGLPlot.defaultValue(e.lineColorLimit,!1),this.lineColor=WebGLPlot.defaultValue(e.lineColor,WebGLPlot.Color.RED),this.lineTypeLimit=WebGLPlot.defaultValue(e.lineTypeLimit,!1),this.lineWidthLimit=WebGLPlot.defaultValue(e.lineWidthLimit,!1),this.lineWidth=WebGLPlot.defaultValue(e.lineWidth,-1),this.fillLimit=WebGLPlot.defaultValue(e.fillLimit,!1),this.fillStyle=WebGLPlot.defaultValue(e.fillStyle,!1),this.fillColorLimit=WebGLPlot.defaultValue(e.fillColorLimit,!1),this.fillColor=WebGLPlot.defaultValue(e.fillColor,new WebGLPlot.Color(1,0,0,.8)),this.fontColorLimit=WebGLPlot.defaultValue(e.fontColorLimit,!1),this.textContent=WebGLPlot.defaultValue(e.textContent,""),this.textStyle=WebGLPlot.defaultValue(e.textContent,void 0),this.textAngle=WebGLPlot.defaultValue(e.textAngle,0),this.textBounds=WebGLPlot.defaultValue(e.textBounds,void 0)}_0x251291();var _0x151f52=(_0x5f0aaa=!0,function(e,t){var i=_0x5f0aaa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f0aaa=!1,i}),_0x705acd=_0x151f52(void 0,(function(){return _0x705acd.toString().search("(((.+)+)+)+$").toString().constructor(_0x705acd).search("(((.+)+)+)+$")})),_0x5f0aaa;function _0x3b1257(){this._code=_0x18bc2f.SYMBOL_ARC,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_ARC,this._symbolName=WebGLPlot.plotI18n("arc"),this._minEditPts=3,this._maxEditPts=3}_0x705acd(),_0x3b1257.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(2==t.length&&_0x2d6822.isSamePt(t[0],t[1])||t.length<this._minEditPts)return null;var i=_0x2d6822.generateArcInfo(t[0],t[1],t[2]);i.dStartAngle*=Math.PI/180,i.dEndAngle*=Math.PI/180;var n,r=_0x2d6822.generateArcSpatialData(i.pntCenter,i.dRadius,i.dRadius,0,i.dStartAngle,i.dEndAngle);return 0!==r.length&&(n=new _0x526be0({points:r,symbolType:_0x18bc2f.SYMBOL_POLYLINE})),n},_0x3b1257.prototype.getMinEditPts=function(){return this._minEditPts},_0x3b1257.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x3b1257.prototype.getSymbolName=function(){return this._symbolName};var _0x396ddc=(_0x4eaed6=!0,function(e,t){var i=_0x4eaed6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4eaed6=!1,i}),_0x7205cd=_0x396ddc(void 0,(function(){return _0x7205cd.toString().search("(((.+)+)+)+$").toString().constructor(_0x7205cd).search("(((.+)+)+)+$")})),_0x4eaed6;function _0x2ad880(){this._code=_0x18bc2f.SYMBOL_POLYBEZIER,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_POLYBEZIER,this._symbolName=WebGLPlot.plotI18n("bezier"),this._minEditPts=2,this._maxEditPts=9999}_0x7205cd(),_0x2ad880.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(t);return SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),new _0x526be0({points:i,symbolType:_0x18bc2f.SYMBOL_POLYLINE})},_0x2ad880.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x2ad880.prototype.getMinEditPts=function(){return this._minEditPts},_0x2ad880.prototype.getSymbolName=function(){return this._symbolName};var _0x368315=(_0x4227f0=!0,function(e,t){var i=_0x4227f0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4227f0=!1,i}),_0x195a36=_0x368315(void 0,(function(){return _0x195a36.toString().search("(((.+)+)+)+$").toString().constructor(_0x195a36).search("(((.+)+)+)+$")})),_0x4227f0;function _0x2ebfea(){this._code=_0x18bc2f.SYMBOL_ELLIPSE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_ELLIPSE,this._symbolName=WebGLPlot.plotI18n("ellipse"),this._maxEditPts=3,this._minEditPts=3}_0x195a36(),_0x2ebfea.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x2ebfea.prototype.getMinEditPts=function(){return this._minEditPts},_0x2ebfea.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t,i,n,r=e.points;if(r.length<this._minEditPts)return null;t=_0x2d6822.distance(r[0],r[2]),i=_0x2d6822.distance(r[0],r[1]),n=_0x2d6822.radian(r[0],r[1]);var o=2*Math.PI,a=_0x2d6822.generateArcSpatialData(r[0],i,t,n,0,o);return a.push[a[0].clone()],new _0x526be0({symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,points:a})},_0x2ebfea.prototype.getSymbolName=function(){return this._symbolName};var _0xbfd9a5=(_0xe5ebf4=!0,function(e,t){var i=_0xe5ebf4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe5ebf4=!1,i}),_0x17a89d=_0xbfd9a5(void 0,(function(){return _0x17a89d.toString().search("(((.+)+)+)+$").toString().constructor(_0x17a89d).search("(((.+)+)+)+$")})),_0xe5ebf4;function _0x3a50ed(){this._code=_0x18bc2f.SYMBOL_PARALLELOGRAM,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_PARALLELOGRAM,this._symbolName=WebGLPlot.plotI18n("parallel"),this._maxEditPts=3,this._minEditPts=3}_0x17a89d(),_0x3a50ed.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;t.length>this._maxEditPts&&t.splice(3,t.length-3);for(var i=t[0].x+(t[2].x-t[1].x),n=t[0].y+(t[2].y-t[1].y),r=new WebGLPlot.Cartesian3(i,n,0),o=[],a=0;a<t.length;++a)o.push(t[a].clone());return o.push(r),o.push(o[0].clone()),new _0x526be0({symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,points:o})},_0x3a50ed.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x3a50ed.prototype.getMinEditPts=function(){return this._minEditPts},_0x3a50ed.prototype.getSymbolName=function(){return this._symbolName};var _0x12e14c=(_0x1e93d7=!0,function(e,t){var i=_0x1e93d7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e93d7=!1,i}),_0x4f02c9=_0x12e14c(void 0,(function(){return _0x4f02c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f02c9).search("(((.+)+)+)+$")})),_0x1e93d7;function _0x26b28c(){this._code=_0x18bc2f.SYMBOL_RECTANGLE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_RECTANGLE,this._symbolName=WebGLPlot.plotI18n("rectangle"),this._minEditPts=2,this._maxEditPts=2}_0x4f02c9(),_0x26b28c.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i=new WebGLPlot.Cartesian2(t[0].x,t[0].y),n=new WebGLPlot.Cartesian2(t[1].x,t[1].y),r=i.clone();return new _0x526be0({points:[r,new WebGLPlot.Cartesian2(n.x,i.y),n.clone(),new WebGLPlot.Cartesian2(i.x,n.y),r.clone()],symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON})},_0x26b28c.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x26b28c.prototype.getMinEditPts=function(){return this._minEditPts},_0x26b28c.prototype.getSymbolName=function(){return this._symbolName};var _0x1d157a=(_0x2a1c92=!0,function(e,t){var i=_0x2a1c92?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a1c92=!1,i}),_0x2d2849=_0x1d157a(void 0,(function(){return _0x2d2849.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d2849).search("(((.+)+)+)+$")})),_0x2a1c92;function _0x5538dd(){this._code=_0x18bc2f.SYMBOL_CIRCLE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_CIRCLE,this._symbolName=WebGLPlot.plotI18n("circle"),this._minEditPts=2,this._maxEditPts=2}_0x2d2849(),_0x5538dd.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(null===t||t.length<this._minEditPts)return null;t.length>this._maxEditPts&&t.splice(2,t.length-this._maxEditPts);var i=_0x2d6822.distance(t[0],t[1]),n=_0x2d6822.calcCirclePts(i,t[0]);return new _0x526be0({symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,points:n})},_0x5538dd.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5538dd.prototype.getMinEditPts=function(){return this._minEditPts},_0x5538dd.prototype.getSymbolName=function(){return this._symbolName};var _0x203042=(_0x496944=!0,function(e,t){var i=_0x496944?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x496944=!1,i}),_0x5b7796=_0x203042(void 0,(function(){return _0x5b7796.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b7796).search("(((.+)+)+)+$")})),_0x496944;function _0x56bfc5(){this._code=_0x18bc2f.SYMBOL_CHORD,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_CHORD,this._symbolName=WebGLPlot.plotI18n("chord"),this._maxEditPts=3,this._minEditPts=3}_0x5b7796(),_0x56bfc5.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x56bfc5.prototype.getMinEditPts=function(){return this._minEditPts},_0x56bfc5.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(2==t.length&&_0x2d6822.isSamePt(t[0],t[1])||t.length<this._minEditPts)return null;var i=_0x2d6822.generateArcInfo(t[0],t[1],t[2]);i.dStartAngle*=Math.PI/180,i.dEndAngle*=Math.PI/180;var n=_0x2d6822.generateArcSpatialData(i.pntCenter,i.dRadius,i.dRadius,0,i.dStartAngle,i.dEndAngle);return n.push(n[0].clone()),new _0x526be0({points:n,symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON})},_0x56bfc5.prototype.getSymbolName=function(){return this._symbolName};var _0x2a988f=(_0x1b0ef8=!0,function(e,t){var i=_0x1b0ef8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b0ef8=!1,i}),_0x1d3128=_0x2a988f(void 0,(function(){return _0x1d3128.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d3128).search("(((.+)+)+)+$")})),_0x1b0ef8;_0x1d3128();var _0x28db24={TOP:4,BOTTOM:5,LEFT:6,RIGHT:7},_0x3dc8e2=Object.freeze(_0x28db24),_0x268d99=(_0x4d8e86=!0,function(e,t){var i=_0x4d8e86?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d8e86=!1,i}),_0x555773=_0x268d99(void 0,(function(){return _0x555773.toString().search("(((.+)+)+)+$").toString().constructor(_0x555773).search("(((.+)+)+)+$")})),_0x4d8e86;function _0xb27609(e,t,i,n){n=n||{},this.volume=e>1?1:e,this.position=t,(void 0===this.position||null===this.position)&&(this.position=_0x3dc8e2.TOP),this.offsetX=n.offsetX?n.offsetX:0,this.offsetY=n.offsetY?n.offsetY:0,this.width=n.width?n.width:40,this.height=n.height?n.height:8,null!==i&&WebGLPlot.defined(i)?this.style=i:(this.style={},this.style.fillColor=new WebGLPlot.Color(0,1,0),this.style.frameColor=new WebGLPlot.Color(0,0,0)),this.bounds=null}_0x555773(),_0xb27609.clone=function(e){var t=new _0xb27609(e.volume,e.position,null,null);return t.offsetX=e.offsetX,t.offsetY=e.offsetY,t.width=e.width,t.height=e.height,t.bounds=e.bounds,t.style=e.style,t};var _0x5b0a52=(_0x5bf698=!0,function(e,t){var i=_0x5bf698?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5bf698=!1,i}),_0xccedcd=_0x5b0a52(void 0,(function(){return _0xccedcd.toString().search("(((.+)+)+)+$").toString().constructor(_0xccedcd).search("(((.+)+)+)+$")})),_0x5bf698;_0xccedcd();const _0x319a80=8;function _0x22f580(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._symbolSize=WebGLPlot.defaultValue(e.symbolDot._gridSymbolSize,void 0),this._xOffset=0,this._anchorPoint=WebGLPlot.defaultValue(e.symbolDot._anchorPoint,void 0),this._canvas=void 0,this._surroundLineType=void 0,this._isFirst=!0,this.returnisflag=!1,this._OffsetText_Down=0,this.initCanvas(),this._symbolDot._oldSymbolSize=this._symbolDot._symbolSizeInLib,this._dotGridScale=this._symbolDot.scale,this._OffSetY=0,this.TopOffSet=0,this._textContentLength=0}function _0x348bd4(e,t){for(var i=[],n=t,r=0;r<n.length;r++)for(var o=0;o<n[r].points.length;o++){var a=n[r].points[o];i.push(a.x)}var s=Math.min.apply({},i),l=(Math.max.apply({},i)+s)/2;Math.abs(s/e._dotGridScale)<_0x319a80&&(l=0,e.returnisflag=!0);for(r=0;r<n.length;r++)for(o=0;o<n[r].points.length;o++){(a=n[r].points[o]).x=2*l-a.x,n[r].points[o]=a}return n}function _0x3f50b3(e){return null===e||typeof e>"u"||""===e||e.match(/^[ ]+$/)}Object.defineProperties(_0x22f580.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x22f580.prototype.drawDotSymbolGraphic=function(e){if(!WebGLPlot.defined(this._symbolDot))return null;if(this._OffsetText_Down=0,this.DEFAULTLINEWIDTH=this._symbolDot._billboardBoundsLineWidth,null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent&&(this._textContentLength=this._ctx.measureText(this._symbolDot._textContent).width),this.symbolDot.BloodVolumes.length>1){for(var t=[],i=0;i<this.symbolDot.BloodVolumes.length;i++)t.push(_0xb27609.clone(this.symbolDot.BloodVolumes[i]));this.symbolDot.BloodVolumes=t}this.fontSize=0!==this._textContentLength?this._symbolDot._symbolTextStyle._fontSize:0,this.isForVector=e;var n=this.transformPoints();this.computeImageBounds(n),this.drawPicture(n);var r=this._canvas.toDataURL("image/png");return this._xOffset=0,r},_0x22f580.prototype.transformPoints=function(){this.computerScale();for(var e=[],t=[],i=this._symbolDot._canvasSymbolData,n=[],r=0;r<i.length;r++){(a=i[r]).surroundLineFlag&&0===this.symbolDot.symbolStyle.surroundLineType||n.push(a)}for(var o=0;o<n.length;o++){for(var a=n[o],s=[],l=0;l<a.positionPoints.length;l++)s.push(new WebGLPlot.Cartesian3(a.positionPoints[l].x,a.positionPoints[l].y,0));var u={points:s,cell:a,style:a.style,type:a.type,flag:a.surroundLineFlag};t.push(this.computePts(u))}var c=this.getMax_Y(t);for(o=0;o<t.length;o++){a=t[o];var h=[];for(l=0;l<a.points.length;l++){var d=new WebGLPlot.Cartesian2(a.points[l].x,a.points[l].y);d.y=(-d.y+c)*this._dotGridScale,d.x*=this._dotGridScale,h.push(d)}u={points:h,cell:a,style:a.style,type:a.type,flag:a.surroundLineFlag};e.push(u)}return this._symbolDot._isMiddleMarkExist&&this._symbolDot._middleMarkBounds&&(this._middleMarkBounds={},this._middleMarkBounds.x=this._symbolDot._middleMarkBounds.left*this._dotGridScale,this._middleMarkBounds.y=(-this._symbolDot._middleMarkBounds.top+c)*this._dotGridScale,this._middleMarkBounds.width=this._symbolDot._middleMarkBounds.right-this._symbolDot._middleMarkBounds.left,this._middleMarkBounds.height=this._symbolDot._middleMarkBounds.top-this._symbolDot._middleMarkBounds.bottom,this._middleMarkBounds.width*=this._dotGridScale,this._middleMarkBounds.height*=this._dotGridScale),this._symbolDot._isNegativeImage&&(e=_0x348bd4(this,e)),e},_0x22f580.prototype.computeImageBounds=function(e){this.symbolCellsBounds=this.getSymbolCellsBounds(e),this.selectedRectBounds=this.getSelectedRectBounds(this.symbolCellsBounds),this.bloodVolumeOffset=this.getBloodVolumeBounds(this.selectedRectBounds),this.textBounds=this.getContentTexBounds(this.selectedRectBounds,this.bloodVolumeOffset);var t=this.bloodVolumeOffset.LeftOffset>this.bloodVolumeOffset.RightOffset?2*this.bloodVolumeOffset.LeftOffset:2*this.bloodVolumeOffset.RightOffset,i=this.bloodVolumeOffset.DownOffset+this.bloodVolumeOffset.UpOffset,n=2*this.textBounds.LRoffset,r=Math.abs(this.textBounds.UDoffset),o=this.textBounds.UDoffset>0?this.textBounds.UDoffset:0;this.textBounds.UDoffset<0&&this.bloodVolumeOffset.DownOffset>=r?this._symbolDot._textPos!==_0x4c2bdd.Down&&(r=0):this.textBounds.UDoffset<0&&this.bloodVolumeOffset.DownOffset<r&&(i=r+this.bloodVolumeOffset.UpOffset);var a,s=0;Math.abs(this.symbolCellsBounds.x/this._dotGridScale)<_0x319a80||this.returnisflag?(this.returnisflag=!0,s=this.selectedRectBounds.width):s=this.selectedRectBounds.width/2+2*this.DEFAULTLINEWIDTH,a=this.selectedRectBounds.height;var l=this.selectedRectBounds.width+s+t+n;l=l>this.textBounds.width?l:this.textBounds.width;var u=a+i+r+2*this.DEFAULTLINEWIDTH;this.setCanvasSize(l,u),this.symbolLROffset=l/2,this.symbolUDOffset=this.bloodVolumeOffset.UpOffset+o,this.offsetSymbolBounds(e)},_0x22f580.prototype.getSymbolCellsBounds=function(e){if(e.length<=0)return{x:0,y:0,width:0,height:0};for(var t=[],i=[],n=0;n<e.length;n++)for(var r=e[n].points,o=0;o<r.length;o++)t.push(r[o].x),i.push(r[o].y);var a=Math.max.apply({},t),s=Math.max.apply({},i),l=Math.min.apply({},t),u=Math.min.apply({},i),c=a-l;return a<=0&&(c=Math.abs(l)-Math.abs(a)),{x:l,y:u,width:c,height:s-u}},_0x22f580.prototype.getSelectedRectBounds=function(e){return{x:e.x-this.DEFAULTLINEWIDTH,y:e.y-this.DEFAULTLINEWIDTH,width:e.width+2*this.DEFAULTLINEWIDTH,height:e.height+2*this.DEFAULTLINEWIDTH}},_0x22f580.prototype.getBloodVolumeBounds=function(e){for(var t=0,i=0,n=0,r=0,o=0,a=0,s=0,l=0,u=0,c=0;c<this.symbolDot.BloodVolumes.length;c++){e.x>0&&(l=e.width/2+e.x),u=e.height/2+e.y;var h=this.symbolDot.BloodVolumes[c];if(!(h instanceof _0xb27609))return{UpOffset:t,DownOffset:i,LeftOffset:n,RightOffset:r};switch(h.width>e.width&&(o=e.width),h.position){case _0x3dc8e2.TOP:a=l-h.width/2,s=e.y-h.height-t,h.bounds={x:a,y:s,width:o,height:h.height},t+=h.height+this.DEFAULTLINEWIDTH;break;case _0x3dc8e2.BOTTOM:a=l-h.width/2,s=e.y+e.height+h.height+i,h.bounds={x:a,y:s,width:o,height:h.height},i+=h.height+this.DEFAULTLINEWIDTH,this._OffsetText_Down=i;break;case _0x3dc8e2.LEFT:a=e.x-h.height-n,s=u-h.width/2,h.bounds={x:a,y:s,width:h.height,height:o},n+=h.height+this.DEFAULTLINEWIDTH;break;case _0x3dc8e2.RIGHT:a=e.x+e.width+r,s=u-h.width/2,h.bounds={x:a,y:s,width:h.height,height:o},r+=h.height+this.DEFAULTLINEWIDTH;break;default:a=l-h.width/2,s=e.y-h.height-t,h.bounds={x:a,y:s,width:o,height:h.height},t+=h.height+this.DEFAULTLINEWIDTH}}return{UpOffset:t,DownOffset:i,LeftOffset:n,RightOffset:r}},_0x22f580.prototype.getContentTexBounds=function(e,t){var i=0,n=0,r=0,o=0,a=0,s=0;if(null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent){this.setCanvasTextFont();var l=this._ctx.measureText(this._symbolDot._textContent).width,u=this._symbolDot._textPos;switch(this._symbolDot._showMode!==_0x4e5d29.Grid&&(u=_0x4c2bdd.Up),u){case _0x4c2bdd.Left:i=e.x-t.LeftOffset,n=e.height/2+e.y;break;case _0x4c2bdd.Right:i=e.x+e.width+t.RightOffset,n=e.height/2+e.y;break;case _0x4c2bdd.LeftUp:i=e.x-t.LeftOffset,n=e.y-this.fontSize/2,s=this.fontSize;break;case _0x4c2bdd.RightUp:i=e.x+e.width+t.RightOffset,n=e.y-this.fontSize/2,s=this.fontSize;break;case _0x4c2bdd.LeftDown:i=e.x-t.LeftOffset,n=e.y+e.height+this.fontSize/2,s=-this.fontSize,this._OffsetText_Down=this._OffsetText_Down>this.fontSize?this._OffsetText_Down:2*this.fontSize;break;case _0x4c2bdd.RightDown:i=e.x+e.width+t.RightOffset,n=e.y+e.height+this.fontSize/2,s=-this.fontSize,this._OffsetText_Down=this._OffsetText_Down>this.fontSize?this._OffsetText_Down:2*this.fontSize;break;case _0x4c2bdd.Up:i=e.x<0?0:e.width/2+e.x,n=e.y-t.UpOffset-this.fontSize/2,s=this.fontSize;break;case _0x4c2bdd.Down:i=e.x<0?0:e.width/2+e.x,n=e.y+e.height+this.fontSize/2+t.DownOffset,s=-this.fontSize,this._OffsetText_Down=2*this.fontSize;case _0x4c2bdd.Middle:}r=l,o=this.fontSize,a=l}return{x:i,y:n,width:r,height:o,UDoffset:s,LRoffset:a}},_0x22f580.prototype.offsetSymbolBounds=function(e){for(var t=0;t<e.length;t++)for(var i=0;i<e[t].points.length;i++){var n=e[t].points[i];let r=e[t].cell.style.lineWidth;n.x+=this.symbolLROffset,n.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH-r/2,e[t].points[i]=n}this.selectedRectBounds.x+=this.symbolLROffset,this.selectedRectBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH,this._symbolDot._isMiddleMarkExist&&(this._symbolDot._textPos===_0x4c2bdd.Middle||this._symbolDot._alwaysHasMiddelText)&&(this._middleMarkBounds.x+=this.symbolLROffset,this._middleMarkBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH),this.textBounds.x+=this.symbolLROffset,this._symbolDot._isNegativeImage&&this.returnisflag&&(4===this._symbolDot._textPos||5===this._symbolDot._textPos)?this.textBounds.x-=this.symbolCellsBounds.width/2:this.returnisflag&&(4===this._symbolDot._textPos||5===this._symbolDot._textPos)&&(this.textBounds.x=this.symbolLROffset+this.symbolCellsBounds.width/2),this.textBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH;for(var r=0;r<this.symbolDot.BloodVolumes.length;r++){var o=this.symbolDot.BloodVolumes[r];o instanceof _0xb27609&&(this._symbolDot._isNegativeImage&&this.returnisflag&&(4===o.position||5===o.position)?o.bounds.x+=this.symbolLROffset-this.selectedRectBounds.width/2:!this.returnisflag||4!==o.position&&5!==o.position?o.bounds.x+=this.symbolLROffset:o.bounds.x+=this.symbolLROffset+this.selectedRectBounds.width/2,o.bounds.y+=this.symbolUDOffset)}},_0x22f580.prototype.setCanvasSize=function(e,t){this._canvas.setAttribute("width",e),this._canvas.setAttribute("height",t)},_0x22f580.prototype.drawPolyline=function(e){var t=e.points,i=e.cell.style;this._ctx.beginPath(),this._ctx.moveTo(t[0].x,t[0].y);for(var n=1,r=t.length;n<r;n++)this._ctx.lineTo(t[n].x,t[n].y);this._ctx.globalAlpha=i.globalAlpha,this._ctx.setLineDash(i.dashArray),this._ctx.strokeStyle=i.lineColor,this._ctx.lineWidth=i.lineWidth,this._ctx.stroke()},_0x22f580.prototype.drawPolygon=function(e){var t=e.points,i=e.cell.style;this._ctx.beginPath();var n=t[0].x,r=t[0].y,o=r,a=r,s=n,l=n;this._ctx.moveTo(n,r);for(var u=1;u<t.length;u++){var c=t[u].x,h=t[u].y;this._ctx.lineTo(c,h),h<o&&(o=h),h>a&&(a=h),c>l&&(l=c),c<s&&(s=c)}if(this._ctx.lineTo(t[0].x,t[0].y),0===i.fill){if(i.hasShade){var d={mode:this._symbolDot._symbolStyle._fillGradientMode,style:i,maximum:{minX:s,minY:o,maxX:l,maxY:a}},f=this.drawGradient(d);this._ctx.fillStyle=f}else this._ctx.fillStyle=i.fillStyle;this._ctx.fill()}this._ctx.globalAlpha=i.globalAlpha,this._ctx.setLineDash(i.dashArray),this._ctx.strokeStyle=i.lineColor,this._ctx.lineWidth=i.lineWidth,this._ctx.closePath(),this._ctx.stroke()},_0x22f580.prototype.drawGradient=function(e){var t,i=e.style;const n=(100-this._symbolDot._symbolStyle.fillGradientOffsetRatioX)/100,r=(100-this._symbolDot._symbolStyle.fillGradientOffsetRatioY)/100;var o=e.maximum.minX,a=e.maximum.maxX*n,s=e.maximum.minY,l=e.maximum.maxY*r;switch(e.mode){case 1:t=this._ctx.createLinearGradient(o,s,a,l);break;case 2:var u=a-o,c=l-s,h=o+u/2,d=s+c/2,f=u>c?u/4:c/4,p=2*f;t=this._ctx.createRadialGradient(h,d,f,h,d,p)}return t.addColorStop(0,i.fillForeColor),t.addColorStop(1,i.fillBackColor),t},_0x22f580.prototype.drawText=function(e){if(!(e.points[0].x<0||e.points[0].y<0)){var t=e.cell.cell.textContent,i=e.cell.cell.textStyle,n=i.fontScale,r=i.fontName,o=i.fontHeight*n*.7*this._dotGridScale;if(!(o<4)){i.bold?this._ctx.font="bold "+o+"px "+r:i.italic?this._ctx.font="italic "+o+"px "+r:this._ctx.font=o+"px "+r,this._ctx.textAlign="center";var a=i.align;("TOPLEFT"===a||"TOPCENTER"===a||"TOPRIGHT"===a)&&(this._ctx.textBaseline="middle"),this._ctx.textBaseline="middle",this._ctx.fillStyle=i.foreColor.toCssColorString(),this._ctx.fillText(t,e.points[0].x,e.points[0].y+this._OffSetY)}}},_0x22f580.prototype.computePts=function(e){var t=e.cell,i=null;_0x18bc2f.SYMBOL_RECTANGLE===t.type?(i=(new _0x26b28c).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_ELLIPSE===t.type?(i=(new _0x2ebfea).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_CIRCLE===t.type?(i=(new _0x5538dd).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_POLYBEZIER===t.type?(i=(new _0x2ad880).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_ARC===t.type?(i=(new _0x3b1257).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_PARALLELOGRAM===t.type?(i=(new _0x3a50ed).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_PIE===t.type?(i=SuperMapAlgoPlot.Primitives.sector(e.points),e.points=i):_0x18bc2f.SYMBOL_KIDNEY===t.type?e.points=SuperMapAlgoPlot.Primitives.getSpatialData(SuperMapAlgoPlot.SymbolType.KIDNEY,e.points):_0x18bc2f.SYMBOL_TRAPEZOID===t.type?(i=(new SymbolTrapezoid).calculateParts(e),e.points=i.points):_0x18bc2f.SYMBOL_CHORD===t.type&&(i=(new _0x56bfc5).calculateParts(e),e.points=i.points);return e},_0x22f580.prototype.drawPicture=function(e,t){if(WebGLPlot.defined(t)&&t){if(this.drawBloodVolume(),_0x4e5d29.Vector===this._symbolDot._showMode&&this._symbolDot._textPos===_0x4c2bdd.Middle)return;this.drawtextContent()}else{for(var i=0;i<e.length;i++){var n=e[i],r=n.cell;this.isForVector?_0x18bc2f.SYMBOL_TEXT===r.type&&this.drawText(n):_0x18bc2f.SYMBOL_POLYLINE===r.type||_0x18bc2f.SYMBOL_POLYBEZIER===r.type||_0x18bc2f.SYMBOL_ARC===r.type?this.drawPolyline(n):_0x18bc2f.SYMBOL_TEXT===r.type?this.drawText(n):this.drawPolygon(n)}this._symbolDot._showMode===_0x4e5d29.Grid&&(null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent&&this.drawtextContent(),this.drawBloodVolume(),WebGLPlot.defined(this._symbolDot._layer.selectedFeature)&&!this.isForVector&&this._symbolDot._isSelected&&this.drawBoundingRect())}},_0x22f580.prototype.drawtextContent=function(){var e=null,t=this._symbolDot._textPos;this._symbolDot._showMode!==_0x4e5d29.Grid&&(t=_0x4c2bdd.Up),t===_0x4c2bdd.Left?e={textAlign:"right",textBaseline:"middle"}:t===_0x4c2bdd.Right?e={textAlign:"left",textBaseline:"middle"}:t===_0x4c2bdd.Up?(e={textAlign:"center",textBaseline:"middle"},this.returnisflag&&(e.x=(this._canvas.width+this._symbolWidth)/2)):t===_0x4c2bdd.Down||t===_0x4c2bdd.Middle?e={textAlign:"center",textBaseline:"middle"}:t===_0x4c2bdd.LeftUp||t===_0x4c2bdd.LeftDown?e={textAlign:"right",textBaseline:"middle"}:(t===_0x4c2bdd.RightUp||t===_0x4c2bdd.RightDown)&&(e={textAlign:"left",textBaseline:"middle"}),this.drawText2(e)},_0x22f580.prototype.drawText2=function(e){if(e){var t=this._symbolDot._textContent,i=this._symbolDot._symbolTextStyle;this.setCanvasTextFont(),this._ctx.textAlign=e.textAlign,this._ctx.textBaseline=e.textBaseline;var n=0,r=0;if(this._middleMarkBounds&&(n=this._middleMarkBounds.x+this._middleMarkBounds.width/2,r=this._middleMarkBounds.y+this._middleMarkBounds.height/2),i._outline){this._ctx.setLineDash([]);var o=this._ctx.lineWidth;this._ctx.lineWidth=i.outlineWidth;var a=i._backColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x4c2bdd.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.strokeStyle=a,this._ctx.strokeText(t,n,r,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x4c2bdd.Middle&&(this._ctx.strokeStyle=a,this._ctx.strokeText(t,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.strokeStyle=a,this._ctx.strokeText(t,n,r,this._middleMarkBounds.width)),this._ctx.lineWidth=o}var s=i.foreColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x4c2bdd.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.fillStyle=s,this._ctx.fillText(t,n,r,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x4c2bdd.Middle&&(this.drawTextBoundsRect(i),this._ctx.fillStyle=s,this._ctx.fillText(t,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.fillStyle=s,this._ctx.fillText(t,n,r,this._middleMarkBounds.width))}},_0x22f580.prototype.drawTextBoundsRect=function(e){if(e.isShowTextBox){let t,i=this.textBounds.y-e.fontSize/2,n=this.textBounds.width,r=this.textBounds.height;switch(this._ctx.textAlign){case"center":t=this.textBounds.x-this.textBounds.width/2;break;case"right":t=this.textBounds.x-this.textBounds.width;break;case"left":t=this.textBounds.x}this._ctx.fillStyle=e.textBoxColor.toCssColorString(),this._ctx.fillRect(t,i,n,r),this._ctx.beginPath(),this._ctx.lineWidth="2",this._ctx.strokeStyle=e.textBoxLineColor.toCssColorString(),this._ctx.rect(t,i,n-1,r),this._ctx.stroke()}},_0x22f580.prototype.drawBoundingRect=function(){var e=this.selectedRectBounds.x+this.DEFAULTLINEWIDTH/2,t=this.selectedRectBounds.y+this.DEFAULTLINEWIDTH/2,i=this.selectedRectBounds.width-1.5*this.DEFAULTLINEWIDTH,n=this.selectedRectBounds.height-2*this.DEFAULTLINEWIDTH;this._ctx.beginPath(),this._ctx.rect(e,t,i,n),this._ctx.strokeStyle=this._symbolDot._billboardBoundsColor.toCssColorString(),this._ctx.lineWidth=this.DEFAULTLINEWIDTH,this._ctx.setLineDash([]),this._ctx.closePath(),this._ctx.stroke()},_0x22f580.prototype.drawBloodVolume=function(){if(this._symbolDot.bIsShowBloodVolume)for(var e=0;e<this.symbolDot.BloodVolumes.length;e++){var t=this.symbolDot.BloodVolumes[e];if(!t.bounds)return;var i=t.bounds,n=t.position,r=0,o=0,a=0,s=0;switch((this._symbolDot._showMode===_0x4e5d29.Marker||this._symbolDot._showMode===_0x4e5d29.Vector)&&(n=_0x3dc8e2.TOP),n){case _0x3dc8e2.TOP:case _0x3dc8e2.BOTTOM:r=t.width,o=t.height,a=t.width*t.volume,s=t.height;break;case _0x3dc8e2.LEFT:case _0x3dc8e2.RIGHT:r=t.height,o=t.width,a=t.height,s=t.width*t.volume}this._ctx.beginPath();var l=t.style.fillColor,u=t.style.frameColor,c=new WebGLPlot.Color(l.red,l.green,l.blue,this._symbolDot._symbolStyle._opacity),h=new WebGLPlot.Color(u.red,u.green,u.blue,this._symbolDot._symbolStyle._opacity);this._ctx.fillStyle=c.toCssColorString(),this._ctx.fillRect(i.x,i.y,a,s),this._ctx.lineWidth=.5,this._ctx.strokeStyle=h.toCssColorString(),this._ctx.rect(i.x,i.y,r,o),this._ctx.stroke(),this._ctx.closePath()}},_0x22f580.prototype.initCanvas=function(){WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas")),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._ctx.scale(this._dotGridScale,this._dotGridScale)},_0x22f580.prototype.setCanvasTextFont=function(){var e=this._symbolDot._symbolTextStyle,t=e.fontName,i=e._fontSize;e.bold?this._ctx.font="bold "+i+"px "+t:e.italic?this._ctx.font="italic "+i+"px "+t:this._ctx.font=i+"px "+t},_0x22f580.prototype.getMax_Y=function(e){for(var t=[],i=0;i<e.length;i++)for(var n=e[i],r=0;r<n.points.length;r++)t.push(n.points[r].y);return Math.max.apply({},t)},_0x22f580.prototype.computerScale=function(){var e=1;this._symbolSize=new WebGLPlot.Cartesian2(this._symbolDot._gridSymbolSize.x,this._symbolDot._gridSymbolSize.y);var t=this._symbolDot._symbolSizeInLib;if(t.x>0&&t.y>0){var i=this._symbolSize.x/t.x,n=this._symbolSize.y/t.y;e=i>n?i:n}this._dotGridScale=this._symbolDot._scale*e},_0x22f580.prototype.bIsChangHeight=function(){return this.symbolMoveToDown=!1,this.symbolMoveToUp=!1,this.symbolMoveToLR=!1,(0!==this._symbolDot._textContent.length||!_0x3f50b3(this._symbolDot._textContent))&&(this._symbolDot._textPos===_0x4c2bdd.Down||this._symbolDot._textPos===_0x4c2bdd.RightDown||this._symbolDot._textPos===_0x4c2bdd.LeftDown?(this.symbolMoveToUp=!0,!0):this._symbolDot._textPos===_0x4c2bdd.Up||this._symbolDot._textPos===_0x4c2bdd.RightUp||this._symbolDot._textPos===_0x4c2bdd.LeftUp?(this.symbolMoveToDown=!0,!0):((this._symbolDot._textPos===_0x4c2bdd.Left||this._symbolDot._textPos===_0x4c2bdd.Right)&&(this.symbolMoveToLR=!0),!1))},_0x22f580.prototype.drawDotModelTextAndBloodVolume=function(){this.getModelTextAndBloodVolumeBounds(),this.drawPicture([],!0);var e=this._canvas.toDataURL("image/png");return this._xOffset=0,e},_0x22f580.prototype.getModelTextAndBloodVolumeBounds=function(){var e=0,t=0;this._symbolDot._textContent.length>0&&(this.fontSize=this._symbolDot._symbolTextStyle._fontSize,this.setCanvasTextFont(),e=this._ctx.measureText(this._symbolDot._textContent).width,t+=this.fontSize);for(var i=0;i<this.symbolDot.BloodVolumes.length;i++){e=(r=this.symbolDot.BloodVolumes[i]).width>e?r.width:e,t+=r.height+this.DEFAULTLINEWIDTH}this.textBounds={x:e/2,y:this.fontSize/2,width:this._ctx.measureText(this._symbolDot._textContent).width,height:this.fontSize},this.setCanvasSize(e,t);var n=t;for(i=0;i<this.symbolDot.BloodVolumes.length;i++){var r,o=(e-(r=this.symbolDot.BloodVolumes[i]).width)/2;n-=r.height+this.DEFAULTLINEWIDTH,r.bounds={x:o,y:n,width:r.width,height:r.height}}};var _0x5324a7=(_0x367a85=!0,function(e,t){var i=_0x367a85?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x367a85=!1,i}),_0x1f7e8f=_0x5324a7(void 0,(function(){return _0x1f7e8f.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f7e8f).search("(((.+)+)+)+$")})),_0x367a85;function _0x404870(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._display=e._display,this.modelMatrix=_0x2d6822.computeMatrix(this._symbolDot.localPoints[0],this._symbolDot._vectorRotate),this._primitives=[]}_0x1f7e8f(),Object.defineProperties(_0x404870.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x404870.prototype.drawDotSymbolVector=function(){if(!WebGLPlot.defined(this._symbolDot))return;if(this._primitives=[],-1===this._symbolDot.vectorDefaultSize){var e=this._symbolDot._layer._scene,t=e.camera.position,i=WebGLPlot.Cartesian3.fromDegrees(this._symbolDot.localPoints[0].x,this._symbolDot.localPoints[0].y,this._symbolDot.localPoints[0].z),n=_0x2d6822.getSpaceDistanceByCartesian(t,i);if(this._symbolDot.vectorDefaultSize=n/1e3,2===e.mode){var r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(e,i),o=new WebGLPlot.Cartesian2(r.x+10,r.y),a=_0x2d6822.getPosition(e,o),s=WebGLPlot.Cartesian3.fromDegrees(a.x,a.y,a.z),l=_0x2d6822.getSpaceDistanceByCartesian(i,s);this._symbolDot.vectorDefaultSize=l/10}}var u=new WebGLPlot.Cartesian3(this._symbolDot.vectorRotate.x,this._symbolDot.vectorRotate.y,this._symbolDot.vectorRotate.z);0!==u.y&&0===u.x&&(u.x=1),this.modelMatrix=_0x2d6822.computeMatrix(this._symbolDot.localPoints[0],u,this.modelMatrix);var c=this.createGeometryInstances(),h=new WebGLPlot.PolylineColorAppearance({translucent:!0});let d=new WebGLPlot.Primitive({geometryInstances:c,appearance:h,asynchronous:!1,compressVertices:!0,show:this._symbolDot._display});return this._primitives.push(d),this._primitives},_0x404870.prototype.createGeometryInstances=function(){var e,t,i,n=this._symbolDot._innerCells,r=[],o=[],a=[],s=[],l=[],u=[];this.isHasTextCell=!1;for(var c=0;c<n.length;c++){var h,d=n[c];if(!d.surroundLineFlag||0!==this._symbolDot.symbolStyle.surroundLineType){if(h=this._symbolDot._dotGrid.computePts({cell:d,points:d.positionPoints}).points,_0x18bc2f.SYMBOL_POLYLINE!==d.type&&_0x18bc2f.SYMBOL_POLYBEZIER!==d.type&&_0x18bc2f.SYMBOL_ARC!==d.type&&_0x18bc2f.SYMBOL_TEXT!==d.type&&h.push(h[0]),_0x18bc2f.SYMBOL_TEXT===d.type){this.isHasTextCell=!0;continue}for(var f=[],p=0;p<h.length;p++){var _=new WebGLPlot.Cartesian2(h[p].x,h[p].y),m=this.localPtsToCartesian(_,this.modelMatrix);f.push(new WebGLPlot.Cartesian3(m.position.x,m.position.y,m.position.z)),s.push(h[p].x),l.push(h[p].y),a.push(m.vector.y),o.push(m.vector.z),d.surroundLineFlag||u.push(m.position)}var g=this._symbolDot.gridLineWidth,x=new WebGLPlot.PolylineGeometry({positions:f,VertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY,width:g}),v=WebGLPlot.PolylineGeometry.createGeometry(x);if(WebGLPlot.defined(v)){e=d.surroundLineFlag&&0!==this._symbolDot.symbolStyle.surroundLineType?this._symbolDot.symbolStyle.surroundLineColor:this._symbolDot.symbolStyle.lineColor,n[c].lineColorLimit&&(i=n[c].style.lineColor,e=new WebGLPlot.Color(i.red/255,i.green/255,i.blue/255,i.alpha/255)),n[c].fillLimit&&!d.surroundLineFlag&&(n[c].fillColorLimit?(i=n[c].style.fillForeColor,t=new WebGLPlot.Color(i.red/255,i.green/255,i.blue/255,i.alpha/255)):t=e,this.createFillGeomtery(h,f,t,this._symbolDot.id)),(d.type!==_0x18bc2f.SYMBOL_POLYLINE||d.type!==_0x18bc2f.SYMBOL_POLYLINE||d.type!==_0x18bc2f.SYMBOL_POLYLINE||d.type!==_0x18bc2f.SYMBOL_TEXT)&&0===this._symbolDot._symbolStyle._fillSymbolID&&!d.surroundLineFlag&&((t=this._symbolDot._symbolStyle.fillForeColor).alpha=1-this._symbolDot._symbolStyle.fillOpaqueRate/100,this.createFillGeomtery(h,f,t,this._symbolDot.id)),e=WebGLPlot.Color.fromAlpha(e,this._symbolDot._symbolStyle.opacity);var y=new WebGLPlot.GeometryInstance({geometry:v,id:this._symbolDot.id,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(e)}});r.push(y)}}}var $=Math.max.apply({},o),b=Math.min.apply({},o),T=Math.max.apply({},a),C=Math.min.apply({},a);return C<0&&(T-=C),b<0&&($-=b),this.vectorHeight=$>T?$:T,0!==this._symbolDot.vectorRotate.y||0!==this._symbolDot.vectorRotate.x?this.createTextCell2(u):this.createTextCell(s,l),r},_0x404870.prototype.createFillGeomtery=function(e,t,i,n){var r=[],o=[],a=_0x2d6822.Resolve(e);if(!a||a.length<3)return null;for(var s=0;s<a.length;s+=3){o[0]=t[a[s]],o[1]=t[a[s+1]],o[2]=t[a[s+2]];var l=this.createTrigonFillGeomterys(o,i,n);l&&r.push(l)}if(0===r.length)return null;var u=new WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),c=new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.MaterialAppearance({material:u,aboveGround:!0}),show:this._display,asynchronous:!1});c.plottingLayer=this._symbolDot._layer,this._primitives.push(c)},_0x404870.prototype.createTrigonFillGeomterys=function(e,t,i){var n=new WebGLPlot.PolygonHierarchy(e,[]),r=new WebGLPlot.PolygonGeometry({polygonHierarchy:n,perPositionHeight:!0}),o=WebGLPlot.PolygonGeometry.createGeometry(r);return o?new WebGLPlot.GeometryInstance({geometry:o,id:i}):null},_0x404870.prototype.getTextBoundPts=function(e,t,i){var n=[],r=[],o=Math.max.apply({},e),a=Math.min.apply({},e),s=Math.max.apply({},t),l=Math.min.apply({},t),u=(l<0?s-l:s)*(this._symbolDot.vectorScale*this._symbolDot.vectorDefaultSize);r.push(new WebGLPlot.Cartesian2(a,l)),r.push(new WebGLPlot.Cartesian2(o,l));var c=0;this._symbolDot._isMiddleMarkExist&&!i&&(c=l>0?l/s:l/(s-l));for(var h=[],d=[],f=0;f<r.length;f++){var p=r[f],_=this.localPtsToCartesian(p,this.modelMatrix).position;n.push(new WebGLPlot.Cartesian3(_.x,_.y,_.z)),h.push(this._symbolDot.localPoints[0].z+u),d.push(this._symbolDot.localPoints[0].z+u*c)}return{potions:n,maxExtendWallHeight:h,minExtendWallHeight:d}},_0x404870.prototype.localPtsToCartesian=function(e,t){var i=new WebGLPlot.Cartesian3,n=new WebGLPlot.Cartesian3,r=this._symbolDot.vectorScale*this._symbolDot.vectorDefaultSize;return n=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1,-e.x,e.y),r,n),{position:i=WebGLPlot.Matrix4.multiplyByPoint(t,n,i),vector:n}},_0x404870.prototype.createTextGeometry=function(e,t,i){var n=this.getTextBoundPts(e,t,i),r=new WebGLPlot.WallGeometry({positions:n.potions,maximumHeights:n.maxExtendWallHeight,minimumHeights:n.minExtendWallHeight}),o=WebGLPlot.WallGeometry.createGeometry(r);return o?new WebGLPlot.GeometryInstance({geometry:o,id:this._symbolDot.id}):null},_0x404870.prototype.createTextCell=function(e,t){if(this.isHasTextCell){var i=this._symbolDot._dotGrid.drawDotSymbolGraphic(!0),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=this.createTextGeometry(e,t,!0),o=new WebGLPlot.Primitive({geometryInstances:[r],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});o.plottingLayer=this._symbolDot._layer,this._primitives.push(o)}},_0x404870.prototype.createTextCell2=function(e){if(this.isHasTextCell){var t=this.createPolygon(e),i=this._symbolDot._dotGrid.drawDotSymbolGraphic(!0),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=new WebGLPlot.Primitive({geometryInstances:[t],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});r.plottingLayer=this._symbolDot._layer,this._primitives.push(r)}},_0x404870.prototype.createMiddleText=function(e){var t=[],i=[],n=[],r=[];t.push(new WebGLPlot.Cartesian2(e.left,e.top)),t.push(new WebGLPlot.Cartesian2(e.left,e.bottom)),t.push(new WebGLPlot.Cartesian2(e.right,e.bottom)),t.push(new WebGLPlot.Cartesian2(e.right,e.top)),t.push(new WebGLPlot.Cartesian2(e.left,e.top));for(var o=e.right-e.left,a=e.top-e.bottom,s=new WebGLPlot.Cartesian2(o/2,a/2),l=0;l<t.length;l++)i.push(t[l].x),n.push(t[l].y),r.push(this.localPtsToCartesian(t[l],this.modelMatrix).position);WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas")),this._canvas.setAttribute("width",o),this._canvas.setAttribute("height",a),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);var u=this._symbolDot._textContent,c=this._symbolDot._symbolTextStyle,h=c.fontName,d=c._fontSize;c.bold?this._ctx.font="bold "+d+"px "+h:c.italic?this._ctx.font="italic "+d+"px "+h:this._ctx.font=d+"px "+h,this._ctx.textAlign="center",this._ctx.textBaseline="middle",c._outline?(this._ctx.strokeStyle=this._symbolDot.colorToString(c._outlineColor),this._ctx.strokeText(u,s.x,s.y,o)):(this._ctx.fillStyle=this._symbolDot.colorToString(c.foreColor),this._ctx.fillText(u,s.x,s.y,o)),0!==this._symbolDot.vectorRotate.y||0!==this._symbolDot.vectorRotate.x?this.createTextContent2(r):this.createTextContent(i,n)},_0x404870.prototype.createTextContent2=function(e){var t=this.createPolygon(e),i=this._canvas.toDataURL("image/png"),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=new WebGLPlot.Primitive({geometryInstances:[t],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});r.plottingLayer=this._symbolDot._layer,this._primitives.push(r)},_0x404870.prototype.createTextContent=function(e,t){var i=this.createTextGeometry(e,t,!1),n=this._canvas.toDataURL("image/png"),r=new WebGLPlot.Material.fromType("Image",{image:n}),o=new WebGLPlot.Primitive({geometryInstances:[i],appearance:new WebGLPlot.MaterialAppearance({material:r}),show:this._display,asynchronous:!1});o.plottingLayer=this._symbolDot._layer,this._primitives.push(o)},_0x404870.prototype.createPolygon=function(e){var t=WebGLPlot.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0}),i=WebGLPlot.PolygonGeometry.createGeometry(t);return new WebGLPlot.GeometryInstance({geometry:i,id:this.id})};var _0x57a831=(_0x3b8174=!0,function(e,t){var i=_0x3b8174?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b8174=!1,i}),_0x184fed=_0x57a831(void 0,(function(){return _0x184fed.toString().search("(((.+)+)+)+$").toString().constructor(_0x184fed).search("(((.+)+)+)+$")})),_0x3b8174;function _0x54378e(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._picturePath=WebGLPlot.defaultValue(e.symbolDot._picturePath,""),this._canvas=void 0,this.initCanvas()}_0x184fed(),Object.defineProperties(_0x54378e.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x54378e.prototype.drawDotSymbolPicture=function(e){var t=this._symbolDot._billboardBoundsLineWidth,i=this._symbolDot.pictureSymbolSize.x*this._symbolDot.scale,n=this._symbolDot.pictureSymbolSize.y*this._symbolDot.scale,r=this._symbolDot.pictureSymbolSize.x*this._symbolDot.scale,o=this._symbolDot.pictureSymbolSize.y*this._symbolDot.scale,a=0;if(this.textBounds={x:0,y:0,width:0,height:0},this._symbolDot._textContent&&""!==this._symbolDot._textContent){a=this._symbolDot._symbolTextStyle._fontSize,this.setCanvasTextFont();let e=this._ctx.measureText(this._symbolDot._textContent).width;i=e>i?e:i,this.textBounds={x:i/2,y:a/2,width:e,height:a}}this._canvas.setAttribute("width",i+2*t),this._canvas.setAttribute("height",n+2*t+a),this._symbolDot._textContent&&""!==this._symbolDot._textContent&&this.drawText();var s=(this._canvas.width-r)/2;return this._ctx.drawImage(e,s,a,r,o),this._symbolDot._isSelected&&this.drawBoundingRect(t),this._canvas.toDataURL("image/png")},_0x54378e.prototype.drawText=function(){var e=this._symbolDot._textContent,t=this._symbolDot._symbolTextStyle;this.setCanvasTextFont(),this._ctx.textAlign="center",this._ctx.textBaseline="middle";var i=0,n=0;if(this._middleMarkBounds&&(i=this._middleMarkBounds.x+this._middleMarkBounds.width/2,n=this._middleMarkBounds.y+this._middleMarkBounds.height/2),t._outline){this._ctx.setLineDash([]);var r=this._ctx.lineWidth;this._ctx.lineWidth=t.outlineWidth;var o=t._outlineColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x4c2bdd.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.strokeStyle=o,this._ctx.strokeText(e,i,n,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x4c2bdd.Middle&&(this._ctx.strokeStyle=o,this._ctx.strokeText(e,this.textBounds.x,this.textBounds.y)),this._ctx.lineWidth=r}var a=t.foreColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x4c2bdd.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.fillStyle=a,this._ctx.fillText(e,i,n,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x4c2bdd.Middle&&(this.drawTextBoundsRect(t),this._ctx.fillStyle=a,this._ctx.fillText(e,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.fillStyle=a,this._ctx.fillText(e,i,n,this._middleMarkBounds.width))},_0x54378e.prototype.drawTextBoundsRect=function(e){if(e.isShowBackColor){let t,i=this.textBounds.y-e.fontSize/2,n=this.textBounds.width,r=this.textBounds.height;switch(this._ctx.textAlign){case"center":t=this.textBounds.x-this.textBounds.width/2;break;case"right":t=this.textBounds.x-this.textBounds.width;break;case"left":t=this.textBounds.x}this._ctx.fillStyle=WebGLPlot.Color.fromCssColorString(e.backColor),this._ctx.fillRect(t,i,n,r)}},_0x54378e.prototype.setCanvasTextFont=function(){var e=this._symbolDot._symbolTextStyle,t=e.fontName,i=e._fontSize;e.bold?this._ctx.font="bold "+i+"px "+t:e.italic?this._ctx.font="italic "+i+"px "+t:this._ctx.font=i+"px "+t},_0x54378e.prototype.drawBoundingRect=function(e){this._ctx.beginPath(),this._ctx.moveTo(e/2,e/2+this.textBounds.height),this._ctx.lineTo(e/2,this._canvas.height-e/2),this._ctx.lineTo(this._canvas.width-e/2,this._canvas.height-e/2),this._ctx.lineTo(this._canvas.width-e/2,e/2+this.textBounds.height),this._ctx.lineTo(e/2,e/2+this.textBounds.height),this._ctx.strokeStyle=this._symbolDot._billboardBoundsColor.toCssColorString(),this._ctx.lineWidth=e,this._ctx.closePath(),this._ctx.stroke()},_0x54378e.prototype.initCanvas=function(){WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas"),this._canvas.width=this._symbolDot.pictureSymbolSize.x,this._canvas.height=this._symbolDot.pictureSymbolSizey),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height)};var _0x4fe35f=(_0x20c16d=!0,function(e,t){var i=_0x20c16d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x20c16d=!1,i}),_0x479fea=_0x4fe35f(void 0,(function(){return _0x479fea.toString().search("(((.+)+)+)+$").toString().constructor(_0x479fea).search("(((.+)+)+)+$")})),_0x20c16d;_0x479fea();class _0x25259d extends _0x21fac2{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),WebGLPlot.defined(e.serverData)?this._getServerDataPrototype(e.serverData):(this._anchorPoint=WebGLPlot.defaultValue(e.anchorPoint,new WebGLPlot.Cartesian2(0,0)),this._gridSymbolSize=WebGLPlot.defaultValue(e.gridSymbolSize,new WebGLPlot.Cartesian2(0,0)),this._symbolSizeInLib=WebGLPlot.defaultValue(e.symbolSizeInLib,new WebGLPlot.Cartesian2(-1,-1)),this._symbolRanks=WebGLPlot.defaultValue(e.symbolRanks,[]),this._middleMarkBounds=WebGLPlot.defaultValue(e.middleMarkBounds,null),this._symbolSize=WebGLPlot.defaultValue(e.symbolSize,new WebGLPlot.Cartesian2(-1,-1)),this._innerCells=[]),this._scale=WebGLPlot.defaultValue(e.scale,.8),this._rotate=WebGLPlot.defaultValue(e.rotate,new _0x11ff81(0,0,0)),this._modelScale=WebGLPlot.defaultValue(e.modelScale,new _0x11ff81(1,1,1)),this._modelRotate=WebGLPlot.defaultValue(e.modelRotate,new _0x11ff81(0,0,0)),this._vectorRotate=WebGLPlot.defaultValue(e.vectorRotate,new _0x11ff81(0,0,0)),this._vectorScale=WebGLPlot.defaultValue(e.vectorScale,1),this._vectorDefaultSize=WebGLPlot.defaultValue(e.vectorDefaultSize,-1),this._gridLineWidth=WebGLPlot.defaultValue(e.gridLineWidth,3),this._gridSurroundLineWidth=WebGLPlot.defaultValue(e.gridSurroundLineWidth,3),this._pictureSymbolSize=WebGLPlot.defaultValue(e.pictureSymbolSize,new WebGLPlot.Cartesian2(64,64)),this._picturePath=WebGLPlot.defaultValue(e.picturePath,""),this._showMode=WebGLPlot.defaultValue(e.showMode,_0x4e5d29.Grid),this._isNegativeImage=WebGLPlot.defaultValue(e.isNegativeImage,!1),this._symbolRank=WebGLPlot.defaultValue(e.symbolRank,0),this._lineSymbolID=WebGLPlot.defaultValue(e.lineSymbolID,0),this._modelPath=WebGLPlot.defaultValue(e.modelPath,""),this._textPos=WebGLPlot.defaultValue(e.textPos,_0x4c2bdd.Up),this._hasDragLine=WebGLPlot.defaultValue(e.hasDragLine,!1),this._dragPoint=WebGLPlot.defaultValue(e.dragPoint,new _0x11ff81(-1,-1,-1)),this._textContent=WebGLPlot.defaultValue(e.textContent,""),this._canvasEle=null,this._prepicturePath=null,this._canvasSymbolData=[],this._imageResult=null,this._isFlagSymbol=!1,this._dotGrid=null,this._dotPicture=null,this._dotVector=null,this._sizeInMeters=!1,this._alwaysHasMiddelText=!1,this._bill=null,this._modelColor=new WebGLPlot.Color(1,1,1,1),this.billboard=null,this.mergeDefaultStyle(),this.bIsShowBloodVolume=WebGLPlot.defaultValue(e.bIsShowBloodVolume,!0),this.BloodVolumes=WebGLPlot.defaultValue(e.bloodVolumes,[]),this._isMiddleMarkExist=null!==this._serverData&&this._serverData.middleMarkExist,this._middleMarkBounds=null!==this._serverData&&this._serverData.middleMarkBounds,this._symbolSizeInMeters=new WebGLPlot.Cartesian2(-1,-1),this._symbolPictureSizeInMeters=new WebGLPlot.Cartesian2(-1,-1),this._BillboardScale=1,this._billboardBoundsColor=new WebGLPlot.Color(1,1,0,1),this._billboardBoundsLineWidth=3,this._modelAnimationPlay=WebGLPlot.defaultValue(e.modelAnimationPlay,!0),this._modelAnimationLoop=WebGLPlot.defaultValue(e.modelAnimationLoop,WebGLPlot.ModelAnimationLoop.REPEAT),this._modelAnimationMultiplier=WebGLPlot.defaultValue(e.modelAnimationMultiplier,1),this._modelAnimationReverse=WebGLPlot.defaultValue(e.modelAnimationReverse,!1),this.__initSymbolPointSymbolData(),this._vectorPrimitives=[]}initSymbol(e){if((!this._initialize||e)&&!(this.localPoints.length<=0||0!==this.libID&&this._innerCells.length<=0)){this._initialize=!0,this.computerBillboardScaleInMeters(),_0x38860f.removeAllAlgoLabel(this,this._layer._scene),this.__resetBillboard(),this._canvasSymbolData=[],0!==this._wholeHeight&&(this.localPoints[0].z=this._wholeHeight);var t=this.localPoints[0],i=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z);switch(null===this._dotGrid&&(this._dotGrid=new _0x22f580({symbolDot:this})),this._showMode){case _0x4e5d29.Grid:case _0x4e5d29.Picture:this._createPicture(i,e);break;case _0x4e5d29.Marker:this._createModel(i);break;case _0x4e5d29.Vector:this._createVector()}this.addTextContent(t),this.drawAnnotationArray(),_0x4e5d29.Picture!==this._showMode&&this.updateEditCtrl(e),this._initSymbolFinished.raiseEvent(this)}}createBillboard(e,t){return{id:this.id,show:this.display,position:e,image:t,pixelOffset:new WebGLPlot.Cartesian2(0,this._dotGrid._OffsetText_Down),horizontalOrigin:WebGLPlot.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot.VerticalOrigin.BOTTOM,disableDepthTestDistance:this.disableDepthTestDistance,color:WebGLPlot.Color.WHITE.withAlpha(this._symbolStyle._opacity),sizeInMeters:this._sizeInMeters,scale:this._BillboardScale}}computerBillboardScaleInMeters(){if(this._sizeInMeters&&-1===this._symbolSizeInMeters.x&&-1===this._symbolSizeInMeters.y&&this.showMode===_0x4e5d29.Grid)this._symbolSizeInMeters=_0x2d6822.pixelDisToRealDisInMeters(this._layer._scene,this._gridSymbolSize),this._BillboardScale=this._symbolSizeInMeters.x/this._gridSymbolSize.x;else if(this._sizeInMeters&&(-1!==this._symbolSizeInMeters.x||-1!==this._symbolSizeInMeters.y)&&this.showMode===_0x4e5d29.Grid){var e=this._symbolSizeInMeters.x/this._gridSymbolSize.x;this._symbolSizeInMeters.y=e*this._gridSymbolSize.y,this._BillboardScale=e}if(this._sizeInMeters&&-1===this._symbolPictureSizeInMeters.x&&-1===this._symbolPictureSizeInMeters.y&&this.showMode===_0x4e5d29.Picture)this._symbolPictureSizeInMeters=_0x2d6822.pixelDisToRealDisInMeters(this._layer._scene,this._pictureSymbolSize),this._BillboardScale=this._symbolPictureSizeInMeters.x/this._pictureSymbolSize.x;else if(this._sizeInMeters&&(-1!==this._symbolPictureSizeInMeters.x||-1!==this._symbolPictureSizeInMeters.y)&&this.showMode===_0x4e5d29.Picture){e=this._symbolPictureSizeInMeters.x/this._pictureSymbolSize.x;this._symbolPictureSizeInMeters.y=e*this._pictureSymbolSize.y,this._BillboardScale=e}}__resetBillboard(){WebGLPlot.defined(this.billboard)&&(_0x38860f.removeBillboard(this.billboard,this._layer._scene),this.billboard=void 0)}updateEditCtrl(e){if(!e&&WebGLPlot.defined(this._layer.selectedFeature)&&this.id===this._layer.selectedFeature.id&&this.display){var t=this;WebGLPlot.defined(this._model)&&this._model.readyPromise.then((function(e){_0x4e5d29.Marker===t._showMode&&t._layer._plottingEdit.drawModelEditObject(!0)})),WebGLPlot.defined(this.s3mInstance)&&this.s3mInstance._boundingSphere&&(_0x4e5d29.Marker,t._showMode),this.display,(_0x4e5d29.Grid===t._showMode||_0x4e5d29.Picture===t._showMode)&&this._layer._plottingEdit.createCtrlPoints(this),_0x4e5d29.Vector===t._showMode&&t._layer._plottingEdit.drawVectorEditObject(!0),_0x4e5d29.Marker===t._showMode&&this._layer._plottingEdit.CtrlPosition.removeAll()}}copyStyle(){for(var e=0;e<this._innerCells.length;e++){var t=this._innerCells[e],i=this.copySymbolStyle(t,this._symbolStyle);let n=null;t.textStyle?n=this.copySymbolTextStyle(t.textStyle):t.textStyle2D&&(n=this.copySymbolTextStyle(t.textStyle2D)),this._canvasSymbolData.push({positionPoints:t.positionPoints,surroundLineFlag:t.surroundLineFlag,style:i,type:t.type,textStyle:n,textContent:t.textContent})}}copySymbolTextStyle(e){let t=e.backColor;!(e.backColor instanceof WebGLPlot.Color)&&e.backColor.alpha>1?e.backColor=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha):e.backColor=new WebGLPlot.Color(t.red,t.green,t.blue,t.alpha);let i=e.foreColor;return!(e.foreColor instanceof WebGLPlot.Color)&&e.foreColor.alpha>1?e.foreColor=WebGLPlot.Color.fromBytes(i.red,i.green,i.blue,i.alpha):e.foreColor=new WebGLPlot.Color(i.red,i.green,i.blue,i.alpha),e}copySymbolStyle(e,t){var i={};if(e.surroundLineFlag)i.lineColor=t.surroundLineColor.toCssColorString(),i.lineWidth=this._gridSurroundLineWidth,i.dashArray=[];else{i.lineWidth=this._gridLineWidth;var n=t.lineColor;i.lineColor=n.toCssColorString();var r=WebGLPlot.Color.clone(t.fillForeColor);if(r.alpha=1-t.fillOpaqueRate/100,i.fillStyle=r.toCssColorString(),i.hasShade=!1,0!==t.fillGradientMode&&(i.hasShade=!0,t.fillForeColor.alpha=1-t.fillOpaqueRate/100,t.fillBackColor.alpha=1-t.fillOpaqueRate/100,i.fillForeColor=t.fillForeColor.toCssColorString(),i.fillBackColor=t.fillBackColor.toCssColorString()),i.fill=t.fillSymbolID,i.dashArray=_0xde8c3(this._lineSymbolID),e.lineColorLimit){let t=e.style.lineColor;n=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha),i.lineColor=n.toCssColorString()}if(e.lineTypeLimit&&(i.lineTypeLimit=!0),e.fillColorLimit){let t=e.style.fillForeColor;var o=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha);o.alpha=e.style.fillOpaqueRate/100,i.fillStyle=o.toCssColorString()}if(e.fillLimit&&(i.fill=e.style.fillSymbolID,i.fillLimit=!0,!e.fillColorLimit)){var a=WebGLPlot.Color.clone(n);a.alpha=e.style.fillOpaqueRate/100,i.fillStyle=a.toCssColorString()}}return i.markerSize=e.style.markerSize,i.globalAlpha=t.opacity,i}setShowMode(e){this._showMode=e}getShowMode(){return this._showMode}setScale(e){if(_0x4e5d29.Vector==this._showMode)this._scale=e;else{if(_0x4e5d29.Marker!=this._showMode)return;this._modelScale=new _0x11ff81(e,e,e)}}getScale(){return _0x4e5d29.Vector==this._showMode?this._scale:_0x4e5d29.Marker==this._showMode?this._modelScale:new _0x11ff81(1,1,1)}setRotate(e){if(_0x4e5d29.Vector==this._showMode)this._rotate=e;else{if(_0x4e5d29.Marker!=this._showMode)return;this._modelRotate=e}}getRotate(){return _0x4e5d29.Vector==this._showMode?this._rotate:_0x4e5d29.Marker==this._showMode?this._modelRotate:void 0}setSymbolSize(e){if(_0x4e5d29.Grid===this._showMode){var t=e,i=this._gridSymbolSize;if(i.x!==e.x&&i.y===e.y)t.y=i.y*e.x/i.x;else if(i.x===e.x&&i.y!==e.y)t.x=i.x*e.y/i.y;else if(i.x!==e.x&&i.y!==e.y){var n=e.x/i.x,r=e.y/i.y,o=r>n?r:n;t.x=o*i.x,t.y=o*i.y}this._gridSymbolSize=t}}getSymbolSize(){if(_0x4e5d29.Grid==this._showMode)return this._gridSymbolSize}getPicturePath(){return this._picturePath}setPicturePath(e){return 0!==e.length&&(this._picturePath=e,!0)}getSymbolName(){return this.symbolName}setModelRotate(e,t,i){if("number"==typeof e&&"number"==typeof t&&"number"==typeof i){var n=new _0x11ff81(e,t,i);this.modelRotate=n}}setVectorRotate(e,t,i){var n=new _0x11ff81(e,t,i);this.vectorRotate=n}addTextContent(e){var t=this;if(WebGLPlot.defined(t._textContent)){var i=t._textContent;if(_0x4e5d29.Marker===t._showMode&&(WebGLPlot.defined(i)&&0!==i.length&&!_0x475556(i)||this.bIsShowBloodVolume))t._model&&t._model.readyPromise.then((function(i){_0x19af91(e,i,t)}));else if(_0x4e5d29.Vector===t._showMode&&(WebGLPlot.defined(i)&&0!==i.length&&!_0x475556(i)||this.bIsShowBloodVolume)){var n=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z+this._dotVector.vectorHeight);(t.bIsShowBloodVolume&&t.BloodVolumes.length>0||!_0x475556(t._textContent))&&(t._imageResult=t._dotGrid.drawDotModelTextAndBloodVolume(),t.billboard=_0x38860f.addBillboard(t.createBillboard(n,t._imageResult),this._layer._scene),t._layer.updatePrimitive=!0)}}}addBloodVolume(e){e instanceof _0xb27609&&(this.BloodVolumes.push(e),this._initialize=!1)}_destroy(){_0x47a70a.getInstance().symbolDestroyed.raiseEvent(this.id),WebGLPlot.defined(this.billboard)&&null!==this.billboard&&(_0x38860f.removeBillboard(this.billboard,this._layer._scene),this.billboard._destroy(),this.billboard=null),this.__removeDotModelAndVector(),WebGLPlot.defined(this._geoEntity)&&(this._geoEntity.destroy(),this._geoEntity=void 0),this.removeAllGeoEffect()}_createModel(e){var t=new WebGLPlot.HeadingPitchRoll,i=Math.PI/180;t.pitch=i*this._modelRotate.x,t.roll=i*this._modelRotate.y,t.heading=i*this._modelRotate.z;var n=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("north","west"),r=WebGLPlot.Transforms.headingPitchRollToFixedFrame(e,t,WebGLPlot.Ellipsoid.WGS84,n);if(this.s3mInstance&&this.s3mInstance.modelPath===this._modelPath)this.s3mInstance.updatePosition(e),this.s3mInstance.updateColor(this._modelColor),this.s3mInstance.updateScale(new Cesium.Cartesian3(this._modelScale.x,this._modelScale.x,this._modelScale.x)),this.s3mInstance.updateRotation(t),this.s3mInstance.visible=this._display;else if(void 0===this._model||this._model.basePath!==this._modelPath||this._initializeModel){this._initializeModel=!1;let i=this.modelPath.split(".");const n=i[i.length-1];switch(n){case"s3m":case"s3mb":{let i={position:e,hpr:t,scale:new Cesium.Cartesian3(this._modelScale.x,this._modelScale.x,this._modelScale.x),color:WebGLPlot.Color.clone(this._modelColor),id:this.id,visible:this._display};if(!WebGLPlot.s3mInstanceColc)throw new WebGLPlot.DeveloperError("S3MInstanceCollection is required.");WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).add(this._modelPath,i),this.s3mInstance=WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).getInstance(this._modelPath,this.id),this.s3mInstance.SymbolType=_0x18bc2f.SYMBOL_DOT,this.s3mInstance.modelPath=this._modelPath;break}case"gltf":case"glb":case"s3mz":{const e={url:this._modelPath,modelMatrix:r,scale:this.modelScale,id:this.id,show:this._display,color:this._modelColor};if("gltf"==n||"glb"==n)this._model=WebGLPlot.Model.fromGltf(e),_0x18c6d6(this);else if("s3mz"==n){let t=this;if(i=this.modelPath.split("iserver"),i.length>1){let n=i[0]+"iserver/services/MGISDataSystemServer/rest/domainComponents/MGISDataQueryImpl/deCodeModelResult.json?";n+="arg0="+this.modelPath;let r=_0x1f38a9();r.open("GET",encodeURI(n),!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),r.onreadystatechange=function(){if(4===r.readyState&&200===r.status){var i=r.responseText;let n=JSON.parse(i);WebGLPlot.defined(n)&&WebGLPlot.defined(n.supermap)&&(e.gltfJson=n.supermap,t._model=WebGLPlot.Model.fromJson(e),_0x18c6d6(t)),r.onreadystatechange=function(){},r=null}},r.send()}}break}}}else this._model.modelMatrix=r,this._model.scale=this._modelScale.x,this._model.show=this._display,this._model.color=this._modelColor}_createPicture(e,t){if(_0x4e5d29.Grid===this._showMode||_0x475556(this._picturePath)){if(!WebGLPlot.defined(this._innerCells)||0===this._innerCells.length)return;this.copyStyle(),this._showMode=_0x4e5d29.Grid,this._imageResult=this._dotGrid.drawDotSymbolGraphic(),null===this._dotGrid&&(this._dotGrid=new _0x22f580({symbolDot:this})),this.billboard=_0x38860f.addBillboard(this.createBillboard(e,this._imageResult),this._layer._scene),this.billboard.SymbolType=_0x18bc2f.SYMBOL_DOT}else{var i=this;null===this._dotPicture&&(this._dotPicture=new _0x54378e({symbolDot:this}));var n=new Image;n.src=this._picturePath,n.setAttribute("crossOrigin","Anonymous"),n.onload=function(){i._imagePicture=i._dotPicture.drawDotSymbolPicture(n),i.__resetBillboard(),i.billboard=_0x38860f.addBillboard(i.createBillboard(e,i._imagePicture),i._layer._scene),i.billboard.SymbolType=_0x18bc2f.SYMBOL_DOT,i.updateEditCtrl(t)}}}_createVector(){if(null===this._dotVector&&(this._dotVector=new _0x404870({symbolDot:this})),WebGLPlot.defined(this._innerCells)&&0!==this._innerCells.length){this.copyStyle(),this.__removeDotModelAndVector();var e=this._dotVector.drawDotSymbolVector();for(let t=0;t<e.length;t++){let i=_0x38860f.addDotModelAndVector(e[t],this._layer._scene);i.plottingLayer=this._layer,i.SymbolType=_0x18bc2f.SYMBOL_DOT,this._vectorPrimitives.push(i)}this._middleMarkBounds&&this._isMiddleMarkExist&&this._textPos===_0x4c2bdd.Middle&&this._dotVector.createMiddleText(this._middleMarkBounds)}}clone(){var e=new _0x25259d({layer:this._layer,libID:this._libID,code:this._code,localPoints:this._localPoints,serverData:this._serverData});e._libID=JSON.parse(JSON.stringify(this._libID)),e._code=JSON.parse(JSON.stringify(this._code)),e._symbolName=JSON.parse(JSON.stringify(this._symbolName)),e._symbolType=JSON.parse(JSON.stringify(this._symbolType)),e._display=JSON.parse(JSON.stringify(this._display)),e._id=JSON.parse(JSON.stringify(this._id)),e._initialize=JSON.parse(JSON.stringify(!1)),e._isEdit=JSON.parse(JSON.stringify(this._isEdit)),e._isUseSymbolLibStyle=JSON.parse(JSON.stringify(this._isUseSymbolLibStyle)),e._markHalo=JSON.parse(JSON.stringify(this._markHalo)),e._localPoints=WebGLPlot.clonePoints(this.localPoints),e._symbolStyle=this._symbolStyle.clone(),e._symbolTextStyle=this._symbolTextStyle.clone(),e._serverData=JSON.parse(JSON.stringify(this._serverData)),e._extendProperty=JSON.parse(JSON.stringify(this._extendProperty)),e._annotationArray=JSON.parse(JSON.stringify(this._annotationArray)),e._wholeHeight=JSON.parse(JSON.stringify(this._wholeHeight)),e._showMode=JSON.parse(JSON.stringify(this._showMode)),e._scale=JSON.parse(JSON.stringify(this._scale)),e._rotate=JSON.parse(JSON.stringify(this._rotate)),e._modelScale=JSON.parse(JSON.stringify(this._modelScale)),e._modelRotate=this._modelRotate.clone(),e._middleMarkBounds=JSON.parse(JSON.stringify(this._middleMarkBounds)),e._isMiddleMarkExist=JSON.parse(JSON.stringify(this._isMiddleMarkExist)),e._vectorScale=JSON.parse(JSON.stringify(this._vectorScale)),e._vectorDefaultSize=JSON.parse(JSON.stringify(this._vectorDefaultSize)),e._vectorRotate=JSON.parse(JSON.stringify(this._vectorRotate)),e._pictureSymbolSize=JSON.parse(JSON.stringify(this._pictureSymbolSize)),e._picturePath=JSON.parse(JSON.stringify(this._picturePath)),e._isNegativeImage=JSON.parse(JSON.stringify(this._isNegativeImage)),e.symbolRank=JSON.parse(JSON.stringify(this._symbolRank)),e._lineSymbolID=JSON.parse(JSON.stringify(this._lineSymbolID)),e._modelPath=JSON.parse(JSON.stringify(this._modelPath)),e._textPos=JSON.parse(JSON.stringify(this._textPos)),e._gridSymbolSize=JSON.parse(JSON.stringify(this._gridSymbolSize)),e._symbolSize=JSON.parse(JSON.stringify(this._symbolSize)),e._hasDragLine=JSON.parse(JSON.stringify(this._hasDragLine)),e._dragPoint=JSON.parse(JSON.stringify(this._dragPoint)),e._textContent=JSON.parse(JSON.stringify(this._textContent)),e._gridSurroundLineWidth=JSON.parse(JSON.stringify(this._gridSurroundLineWidth)),e._gridLineWidth=JSON.parse(JSON.stringify(this._gridLineWidth)),e._innerCells=this._innerCells,e._symbolSizeInLib=JSON.parse(JSON.stringify(this._symbolSizeInLib)),e.bIsShowBloodVolume=JSON.parse(JSON.stringify(this.bIsShowBloodVolume)),e._disableDepthTestDistance=this._disableDepthTestDistance,e._alwaysHasMiddelText=JSON.parse(JSON.stringify(this._alwaysHasMiddelText));for(var t=0;t<this.BloodVolumes.length;t++)e.BloodVolumes.push(_0xb27609.clone(this.BloodVolumes[t]));return e._sizeInMeters=JSON.parse(JSON.stringify(this._sizeInMeters)),e._symbolSizeInMeters=JSON.parse(JSON.stringify(this._symbolSizeInMeters)),e._symbolPictureSizeInMeters=JSON.parse(JSON.stringify(this._symbolPictureSizeInMeters)),e._geoEffectArray=[],this._geoEffectArray.forEach((t=>{e._geoEffectArray.push(t.clone())})),WebGLPlot.defined(this._geoEntity)&&(e._geoEntity=this._geoEntity.clone(e)),e}_getServerDataPrototype(e){this._anchorPoint=WebGLPlot.defaultValue(e.anchorPoint,new WebGLPlot.Cartesian2(0,0)),this._gridSymbolSize=WebGLPlot.defaultValue(new WebGLPlot.Cartesian2(e.symbolSize.x,e.symbolSize.y),new WebGLPlot.Cartesian2(-1,-1)),this._symbolSizeInLib=WebGLPlot.defined(e.symbolSizeInLib)?new WebGLPlot.Cartesian2(e.symbolSizeInLib.x,e.symbolSizeInLib.y):new WebGLPlot.Cartesian2(this._gridSymbolSize.x,this._gridSymbolSize.y),this._symbolRanks=WebGLPlot.defaultValue(e.symbolRanks,[]),this._middleMarkBounds=WebGLPlot.defaultValue(e.middleMarkBounds,null),this._symbolSize=WebGLPlot.defaultValue(e.symbolSize,new WebGLPlot.Cartesian2(-1,-1)),this._innerCells=WebGLPlot.defaultValue(e.innerCells,[])}__removeDotModelAndVector(){if(this.s3mInstance&&WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID)&&(WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).removeInstance(this.s3mInstance.modelPath,this.id),this.s3mInstance=void 0),this._model&&(_0x38860f.removeDotModelAndVector(this._model,this._layer._scene),this._model=void 0),this._vectorPrimitives.length>0){for(let e=0;e<this._vectorPrimitives.length;e++){let t=this._vectorPrimitives[e];_0x38860f.removeDotModelAndVector(t,this._layer._scene),t=void 0}this._vectorPrimitives=[]}}__initSymbolPointSymbolData(){_0x5aa3d5(this)}}function _0x475556(e){return!("string"==typeof e&&e.length>0)}function _0xde8c3(e){var t;if(!WebGLPlot.defined(e)||""===e)return t=[];switch(e){case 0:t=[];break;case 1:t=[20,5];break;case 2:t=[2,2];break;case 3:t=[10,2,2,2];break;case 4:t=[10,2,2,2,2,2]}return t}function _0x19af91(e,t,i){var n=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(t._minCorner.z,t._minCorner.x,t._minCorner.y),t.scale,new WebGLPlot.Cartesian3),r=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(t._maxCorner.z,t._maxCorner.x,t._maxCorner.y),t.scale,new WebGLPlot.Cartesian3),o=n.z<=0?r.z:r.z-n.z,a=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z+o);(i.bIsShowBloodVolume&&i.BloodVolumes.length>0||!_0x475556(i._textContent))&&(i._imageResult=i._dotGrid.drawDotModelTextAndBloodVolume(),i.billboard=_0x38860f.addBillboard(i.createBillboard(a,i._imageResult),i._layer._scene),i._layer.updatePrimitive=!0)}function _0x18c6d6(e){e._model=_0x38860f.addDotModelAndVector(e._model,e._layer._scene),e._model.SymbolType=_0x18bc2f.SYMBOL_DOT,e._modelAnimationPlay&&e._model.readyPromise.then((function(t){t.activeAnimations.addAll({loop:e._modelAnimationLoop,multiplier:e._modelAnimationMultiplier,reverse:e._modelAnimationReverse})}))}function _0x1f38a9(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}function _0x5aa3d5(e){if(!e||e._code!==_0x18bc2f.SYMBOL_POINT)return;let t={fillBackColor:{red:255,green:0,blue:0,alpha:255},fillBackOpaque:!0,fillForeColor:{red:255,green:255,blue:0,alpha:255},fillGradientAngle:0,fillGradientMode:"NONE",fillGradientOffsetRatioX:0,fillGradientOffsetRatioY:0,fillOpaqueRate:100,fillSymbolID:0,lineColor:{red:255,green:255,blue:0,alpha:255},lineSymbolID:0,lineWidth:.5,markerAngle:0,markerHeight:0,markerSize:2.4,markerSymbolID:0,markerWidth:0},i={align:"MIDDLECENTER",backColor:{red:0,green:0,blue:0,alpha:255},backOpaque:!1,bold:!1,borderSpacingWidth:4,fontHeight:7,fontName:WebGLPlot.plotI18n("SongTi"),fontScale:1,fontWeight:0,fontWidth:0,foreColor:{red:0,green:0,blue:0,alpha:255},italic:!1,italicAngle:0,opaqueRate:100,outline:!1,outlineWidth:1,rotation:0,shadow:!1,sizeFixed:!0,strikeout:!1,stringAlignment:"LEFT",underline:!1};var n={fillColorLimit:!1,fillLimit:!0,fontColorLimit:!1,lineColorLimit:!1,lineTypeLimit:!1,lineWidthLimit:!1,polybezierClose:!1,positionPoints:[{x:.1,y:8},{x:8.2,y:8},{x:.1,y:16.1}],style:t,surroundLineColor:new WebGLPlot.Color(255,255,0,255),surroundLineFlag:!1,surroundLineLimit:!1,surroundLineType:0,surroundLineWidth:1,textContent:"",textStyle:i,type:31},r={fillColorLimit:!1,fillLimit:!0,fontColorLimit:!1,lineColorLimit:!1,lineTypeLimit:!1,lineWidthLimit:!1,polybezierClose:!1,positionPoints:[{x:2.571235,y:8},{x:10.671235,y:8},{x:2.571235,y:16.1}],style:t,surroundLineColor:new WebGLPlot.Color(255,255,0,255),surroundLineFlag:!0,surroundLineLimit:!1,surroundLineType:0,surroundLineWidth:1,textContent:"",textStyle:i,type:31};e._gridSymbolSize={x:32,y:32},e._anchorPoint={x:.1,y:8},e._symbolSizeInLib={x:32,y:32},e._innerCells=[n,r]}Object.defineProperties(_0x25259d.prototype,{middleMarkBounds:{get:function(){return this._middleMarkBounds},set:function(e){e!==this._middleMarkBounds&&(this._middleMarkBounds=e,this._initialize=!1)}},modelAnimationPlay:{get:function(){return this._modelAnimationPlay},set:function(e){e!==this._modelAnimationPlay&&(this._modelAnimationPlay=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationLoop:{get:function(){return this._modelAnimationLoop},set:function(e){e===this._modelAnimationLoop||!(e instanceof WebGLPlot.ModelAnimationLoop)||(this._modelAnimationLoop=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationMultiplier:{get:function(){return this._modelAnimationMultiplier},set:function(e){e!==this._modelAnimationMultiplier&&(this._modelAnimationMultiplier=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationReverse:{get:function(){return this._modelAnimationReverse},set:function(e){e!==this._modelAnimationReverse&&(this._modelAnimationReverse=e,this._initialize=!1,this._initializeModel=!0)}},symbolSize:{get:function(){return this._symbolSize},set:function(e){e===this._symbolSize||!(e instanceof WebGLPlot.Cartesian2)||(this._symbolSize=e,this._initialize=!1)}},anchorPoint:{get:function(){return this._anchorPoint},set:function(e){e===this._anchorPoint||!(e instanceof WebGLPlot.Cartesian2)||(this._anchorPoint=e,this._initialize=!1)}},scale:{get:function(){return this._scale},set:function(e){if(!(e===this._scale||"number"!=typeof e||e<=0))if(this.billboard){if(this.billboard.scale=this.billboard.scale/this._scale*e,this._scale=e,this.showMode===_0x4e5d29.Grid){var t=this._dotGrid.transformPoints();this._dotGrid.computeImageBounds(t)}this.updateEditCtrl(!1)}else this._scale=e,this._initialize=!1}},rotate:{get:function(){return this._rotate},set:function(e){e===this._rotate||!(e instanceof _0x11ff81)||(this._rotate=e,this._initialize=!1,this.__setEffectParameter({rotate:this._rotate}))}},modelScale:{get:function(){return this._modelScale.x},set:function(e){e===this._modelScale.x||"number"!=typeof e||e<0||(this.__setEffectParameter({scale:e}),this._modelScale.x=e,this._initialize=!1)}},modelRotate:{get:function(){return this._modelRotate},set:function(e){e===this._modelRotate||!(e instanceof _0x11ff81)||(this._modelRotate=e,this._initialize=!1,this.__setEffectParameter({rotate:e}))}},modelColor:{get:function(){return this._modelColor},set:function(e){e instanceof WebGLPlot.Color&&(this._modelColor=e,this._initialize=!1)}},vectorRotate:{get:function(){return this._vectorRotate},set:function(e){e===this._vectorRotate||!(e instanceof _0x11ff81)||(this._vectorRotate=e,this.__setEffectParameter({rotate:e}),this._initialize=!1)}},vectorScale:{get:function(){return this._vectorScale},set:function(e){e===this._vectorScale||"number"!=typeof e||(this._vectorScale=e,this.__setEffectParameter({scale:e}),this._initialize=!1)}},vectorDefaultSize:{get:function(){return this._vectorDefaultSize},set:function(e){e===this._vectorDefaultSize||"number"!=typeof e||(this._vectorDefaultSize=e,this._initialize=!1)}},gridLineWidth:{get:function(){return this._gridLineWidth},set:function(e){e===this._gridLineWidth||"number"!=typeof e||(this._gridLineWidth=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},gridSurroundLineWidth:{get:function(){return this._gridSurroundLineWidth},set:function(e){e===this._gridSurroundLineWidth||"number"!=typeof e||(this._gridSurroundLineWidth=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},gridSymbolSize:{get:function(){return this._gridSymbolSize},set:function(e){if(!(e instanceof WebGLPlot.Cartesian2))return!1;var t=new WebGLPlot.Cartesian2(e.x,e.y);if(t.x<=0||t.y<=0)return!1;-1===this._gridSymbolSize.x&&-1===this._gridSymbolSize.y?t=this._symbolSizeInLib:-1===this._symbolSizeInLib.x&&-1===this._symbolSizeInLib.y&&(this._symbolSizeInLib=t.clone());var i=this._gridSymbolSize,n=this._symbolSizeInLib,r=t.x/n.x,o=t.y/n.y,a=n.x/n.y;t.x!==i.x&&t.y!==i.y?r>o?t.y=t.x/a:t.x=t.y*a:t.x!==i.x&&t.y===i.y?t.y=t.x/a:t.x===i.x&&t.y!==i.y&&(t.x=t.y*a),this._gridSymbolSize=t,this._initialize=!1}},pictureSymbolSize:{get:function(){return this._pictureSymbolSize},set:function(e){if(!(e instanceof WebGLPlot.Cartesian2))return!1;this._pictureSymbolSize=e,this._initialize=!1}},showMode:{get:function(){return this._showMode},set:function(e){e===this._showMode||"number"!=typeof e||e<0||e>3||(this._showMode=e,WebGLPlot.defined(this._layer)&&WebGLPlot.defined(this._layer._plottingEdit)&&(_0x4e5d29.Grid!=e||_0x4e5d29.Picture!=e)&&this._layer._plottingEdit._ctrlPoints.removeAll(),this.__resetBillboard(),this.__removeDotModelAndVector(),this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},isNegativeImage:{get:function(){return this._isNegativeImage},set:function(e){e===this._isNegativeImage||e.constructor!==Boolean||(this._isNegativeImage=e,WebGLPlot.defined(this._layer)&&WebGLPlot.defined(this._layer._plottingEdit)&&this._layer._plottingEdit.drawSymbolExtend(this),this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},symbolRank:{get:function(){return this._symbolRank},set:function(e){var t=this;if(e!==this._symbolRank&&"number"==typeof e){t._symbolRank=e;var i=WebGLPlot.getLibManager(this.layer._scene._plottingID).serverUrl,n=WebGLPlot.getServerData(this._libID,this._code,i,this._layer._scene._plottingID);if(n){var r=n.getSymbolInfo;r.events.on({processCompleted:function(e){t._innerCells=e.result.innerCells,t._initialize=!1,_0x47a70a.getInstance().symbolModified.raiseEvent(t)},processFailed:function(e){},scope:this});var o=n.getSymbolInfoParameters;o.symbolRank=e,o.surroundLineType=1,r.processAsync(o)}}}},symbolRanks:{get:function(){return this._symbolRanks}},lineSymbolID:{get:function(){return this._lineSymbolID},set:function(e){e===this._lineSymbolID||"number"!=typeof e||(this._lineSymbolID=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},modelPath:{get:function(){return this._modelPath},set:function(e){e!==this._modelPath&&(this._modelPath=e,this.__removeDotModelAndVector(),this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},textPos:{get:function(){return this._textPos},set:function(e){e===this._textPos||!this._middleMarkExist&&e===_0x4c2bdd.Middle||(this._textPos=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},hasDragLine:{get:function(){return this._hasDragLine},set:function(e){e===this._hasDragLine||e.constructor!==Boolean||(this._hasDragLine=e,this._initialize=!1)}},dragPoint:{get:function(){return this._dragPoint},set:function(e){e===this._dragPoint||!(e instanceof _0x11ff81)||(this._dragPoint=e,this._initialize=!1)}},picturePath:{get:function(){return this._picturePath},set:function(e){e!==this._picturePath&&(this._picturePath=e,this._initialize=!1,this._isAnimationFeature||_0x47a70a.getInstance().symbolModified.raiseEvent(this))}},scalePoints:{get:function(){return this._scalePoints},set:function(e){e===this._scalePoints||!(e instanceof _0x11ff81)||(this._scalePoints=e,this._initialize=!1)}},scaleValues:{get:function(){return this._scaleValues},set:function(e){e===this._scaleValues||!Array.isArray(e)||(this._scaleValues=e,this._initialize=!1)}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){e===this._sizeInMeters||_0x4e5d29.Grid!==this.showMode&&_0x4e5d29.Picture!==this.showMode||(this._sizeInMeters=e,this._initialize=!1,e||(this._BillboardScale=1))}},alwaysHasMiddelText:{get:function(){return this._alwaysHasMiddelText},set:function(e){e!==this._alwaysHasMiddelText&&(this._alwaysHasMiddelText=e,this._initialize=!1)}},symbolSizeInMeters:{get:function(){return this._symbolSizeInMeters},set:function(e){if(e!==this._symbolSizeInMeters&&e instanceof WebGLPlot.Cartesian2){if(this._symbolSizeInMeters=e,this.sizeInMeters){var t=this._symbolSizeInMeters.x/this._gridSymbolSize.x;this._symbolSizeInMeters.y=t*this._gridSymbolSize.y,this._BillboardScale=t}this._initialize=!1}}},symbolPictureSizeInMeters:{get:function(){return this._symbolPictureSizeInMeters},set:function(e){if(e!==this._symbolPictureSizeInMeters&&e instanceof WebGLPlot.Cartesian2){if(this._symbolPictureSizeInMeters=e,this.sizeInMeters){var t=this._symbolPictureSizeInMeters.x/this._gridSymbolSize.x;this._symbolPictureSizeInMeters.y=t*this._gridSymbolSize.y,this._BillboardScale=t}this._initialize=!1}}},billboardBoundsColor:{get:function(){return this._billboardBoundsColor},set:function(e){e instanceof WebGLPlot.Color&&(this._billboardBoundsColor=e,this._initialize=!1)}},billboardBoundsLineWidth:{get:function(){return this._billboardBoundsLineWidth},set:function(e){e===this._billboardBoundsLineWidth||"number"!=typeof e||(this._billboardBoundsLineWidth=e,this._initialize=!1)}}});var _0x408279=(_0x2fe7d4=!0,function(e,t){var i=_0x2fe7d4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2fe7d4=!1,i}),_0x22b302=_0x408279(void 0,(function(){return _0x22b302.toString().search("(((.+)+)+)+$").toString().constructor(_0x22b302).search("(((.+)+)+)+$")})),_0x2fe7d4;function _0xebe7e9(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._textContent=WebGLPlot.defaultValue(e.textContent,""),this._localPoint=WebGLPlot.defaultValue(e.localPoint,new WebGLPlot.Cartesian3(0,0,0)),this._textStyle=WebGLPlot.defaultValue(e.textStyle,new _0x34d1aa)}_0x22b302(),Object.defineProperties(_0xebe7e9.prototype,{textContent:{get:function(){return this._textContent},set:function(e){e&&"string"==typeof e&&(this._textContent=e)}},localPoint:{get:function(){return this._localPoint},set:function(e){(e instanceof _0x11ff81||e instanceof WebGLPlot.Cartesian3)&&(this._localPoint=e)}},textStyle:{get:function(){return this._textStyle}},fontName:{get:function(){return this._textStyle._fontName}},foreColor:{get:function(){return this._textStyle._foreColor}},fontSize:{get:function(){return this._textStyle._fontSize}},outlineWidth:{get:function(){return this._textStyle._outlineWidth}},outlineColor:{get:function(){return this._textStyle._outlineColor}},outline:{get:function(){return this._textStyle._outline}}});var _0x180a44=(_0x33f8d1=!0,function(e,t){var i=_0x33f8d1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33f8d1=!1,i}),_0x31725f=_0x180a44(void 0,(function(){return _0x31725f.toString().search("(((.+)+)+)+$").toString().constructor(_0x31725f).search("(((.+)+)+)+$")})),_0x33f8d1;_0x31725f();var WebGLPlot$c=window.WebGLPlot=window.WebGLPlot||{};function _0x267b40(e,t){var i=t;if(!i)throw new WebGLPlot$c.DeveloperError("name is required to create PlottingLayer");this._waterPlanes=[],this._visibleViewport=0,this._scene=e,this._valid=!0,this._bIsUseDepthTest=!1,this._visibility=!0,this._geoGraphicObjects=[],this._isLocked=!1,this._isEditable=!0,this._isSelected=!0,this.updatePrimitive=!1,this._selectedFeature=void 0,this._name=i,this._id=-1,this._symbolAddedEvent=new WebGLPlot$c.Event,this._objsVisibleMap={}}function _0x39a17e(e){var t=new WebGLPlot$c.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,WebGLPlot$c.defined(e.red)||(t.red=1),WebGLPlot$c.defined(e.green)||(t.green=1),WebGLPlot$c.defined(e.blue)||(t.blue=1),WebGLPlot$c.defined(e.alpha)||(t.alpha=1),t}function _0x5cc39e(e,t,i){var n=parseInt(t.symbolType);if(e._symbolType=n,e._symbolName=t.symbolName,e.__dotPlotLibID=t.dotPlotLibID,e.__dotPlotCode=t.dotPlotCode,""!==t.uuid&&WebGLPlot$c.defined(t.uuid)?e._id=t.uuid:e._id=WebGLPlot$c.createGuid(),e._isEdit=!0,e._wholeHeight=WebGLPlot$c.defined(t.wholeHeight)?t.wholeHeight:0,e._display=!0,"none"===t.style.display&&(e._display=!1),t.localePoints){let i=[];for(let e=0;e<t.localePoints.length;e++){const n=t.localePoints[e];i.push(new _0x11ff81(parseFloat(n.x),parseFloat(n.y),n.z?parseFloat(n.z):0))}e._localPoints=i}if(e._surroundRatioVal=WebGLPlot$c.defined(t.surroundRatioVal)?t.surroundRatioVal:.002,t.surroundLineColor&&(e._symbolStyle._surroundLineColor=_0x39a17e(t.surroundLineColor)),e._textContent=t.textContent,e._symbolStyle._surroundLineType=t.surroundLineType,e._symbolStyle._surroundLineWidth=WebGLPlot$c.defined(t.surroundlineWidth3D)?t.surroundlineWidth3D:3,e._symbolStyle._lineColor=_0x39a17e(t.style.lineColor),e._symbolStyle._opacity=e._symbolStyle.lineColor.alpha,e._symbolStyle._fillSymbolID=t.style.fillSymbolID,e._symbolStyle._fillForeColor=_0x39a17e(t.style.fillForeColor),e._symbolStyle._fillBackColor=_0x39a17e(t.style.fillBackColor),e._symbolStyle._fillGradientMode=t.style.fillGradientMode,e._symbolStyle._fillBackOpaque=t.style.fillBackOpaque,e._symbolStyle._fillGradientAngle=t.style.fillGradientAngle,e._symbolStyle._fillOpaqueRate=100-t.style.fillOpaqueRate,e._symbolStyle._fillGradientOffsetRatioX=t.style.fillGradientOffsetRatioX,e._symbolStyle._fillGradientOffsetRatioY=t.style.fillGradientOffsetRatioY,e._symbolStyle._lineWidth=WebGLPlot$c.defined(t.style.lineWidth3D)?t.style.lineWidth3D:3,t.hasOwnProperty("extendProperty")&&(e._extendProperty=t.extendProperty),t.hasOwnProperty("annotationArray"))for(var r=t.annotationArray,o=0;o<r.length;o++)e._annotationArray.push(new _0xebe7e9({textContent:r[o]._textContent,localPoint:r[o]._localPoint,textStyle:r[o]._textStyle}));if(t.textStyle2D){e._symbolTextStyle._italicAngle=t.textStyle2D.italicAngle,e._symbolTextStyle._shadow=t.textStyle2D.shadow,e._symbolTextStyle._sizeFixed=t.textStyle2D.sizeFixed,e._symbolTextStyle._underline=t.textStyle2D.underline,e._symbolTextStyle._rotation=t.textStyle2D.rotation,e._symbolTextStyle._bold=t.textStyle2D.bold,e._symbolTextStyle._align=t.textStyle2D.align,e._symbolTextStyle._italic=t.textStyle2D.italic,e._symbolTextStyle._strikeout=t.textStyle2D.strikeout,e._symbolTextStyle._fontName=t.textStyle2D.fontName,e._symbolTextStyle._outline=t.textStyle2D.outline,e._symbolTextStyle._borderSpacingWidth=t.textStyle2D.borderSpacingWidth,e._symbolTextStyle._outlineWidth=96*t.textStyle2D.outlineWidth/25.4,e._symbolTextStyle._fontWidth=t.textStyle2D.fontWidth,e._symbolTextStyle._opaqueRate=t.textStyle2D.opaqueRate,e._symbolTextStyle._stringAlignment=t.textStyle2D.stringAlignment,e._symbolTextStyle._fontScale=t.textStyle2D.fontScale,e._symbolTextStyle._fontWeight=t.textStyle2D.fontWeight,e._symbolTextStyle._foreColor=_0x39a17e(t.textStyle2D.foreColor),WebGLPlot$c.defined(t.textStyle2D.fontStrokeColor)?e._symbolTextStyle._backColor=_0x39a17e(t.textStyle2D.fontStrokeColor):WebGLPlot$c.defined(t.textStyle2D.backColor)&&(e._symbolTextStyle._backColor=_0x39a17e(t.textStyle2D.backColor)),e._symbolTextStyle._fontHeight=t.textStyle2D.fontHeight,e._symbolTextStyle._fontSize=parseInt(96*t.textStyle2D.fontHeight/25.4);let i=WebGLPlot$c.defined(t.textStyle2D.fontBackgroundColor)?_0x39a17e(t.textStyle2D.fontBackgroundColor):new WebGLPlot$c.Color(1,0,0,.3);e._symbolTextStyle.setTextRectColor(i),e._symbolTextStyle._isShowTextBox=!!WebGLPlot$c.defined(t.textStyle2D.backOpaque)&&t.textStyle2D.backOpaque}if(t.textStyle3D,_0x18bc2f.SYMBOL_DOT===n||_0x18bc2f.SYMBOL_Model===n||_0x18bc2f.SYMBOL_PICTURE===n){if(t.anchorPoint&&(e._anchorPoint=new WebGLPlot$c.Cartesian2(t.anchorPoint.x,t.anchorPoint.y)),t.symbolSize&&-1!==t.symbolSize.x&&-1!==t.symbolSize.y&&(e._symbolSize=new WebGLPlot$c.Cartesian2(t.symbolSize.x,t.symbolSize.y)),t.gridSymbolSize&&-1!==t.gridSymbolSize.x&&-1!==t.gridSymbolSize.y?e._gridSymbolSize=new WebGLPlot$c.Cartesian2(t.gridSymbolSize.x,t.gridSymbolSize.y):t.symbolSizeInLib&&(e._gridSymbolSize=new WebGLPlot$c.Cartesian2(t.symbolSizeInLib.x,t.symbolSizeInLib.y)),t.pictureSymbolSize&&-1!==t.pictureSymbolSize.x&&-1!==t.pictureSymbolSize.y&&(e._pictureSymbolSize=new WebGLPlot$c.Cartesian2(t.pictureSymbolSize.x,t.pictureSymbolSize.y)),t.scale3D&&(WebGLPlot$c.defined(t.scale3D.x)?e._scale=t.scale3D.x:e._scale=t.scale3D),t.rotate2D?e._rotate=new _0x11ff81(t.rotate2D.x,t.rotate2D.y,t.rotate2D.z):e._rotate=new _0x11ff81(1,1,1),t.innerCells?e._innerCells=t.innerCells:_0x4ea4b3(t.libID,t.code,e,i),t.symbolRanks&&(e._symbolRanks=t.symbolRanks),WebGLPlot$c.defined(t.picturePath)&&(e._picturePath=t.picturePath),WebGLPlot$c.defined(t.modelPath)&&(e._modelPath=t.modelPath),t.modelScale&&(e._modelScale.x=t.modelScale),t.modelRotate&&(e._modelRotate=new _0x11ff81(t.modelRotate.x,t.modelRotate.y,t.modelRotate.z)),t.vectorScale&&(e._vectorScale=t.vectorScale),t.vectorRotate&&(e._vectorRotate=new _0x11ff81(t.vectorRotate.x,t.vectorRotate.y,t.vectorRotate.z)),t.vectorDefaultSize&&(e._vectorDefaultSize=t.vectorDefaultSize),WebGLPlot$c.defined(t.middleMarkExist)&&(e._isMiddleMarkExist=t.middleMarkExist),WebGLPlot$c.defined(t.middleMarkBounds)&&(e._middleMarkBounds=t.middleMarkBounds),t.symbolSizeInLib?e._symbolSizeInLib=t.symbolSizeInLib:WebGLPlot$c.defined(t.mpWidth)&&WebGLPlot$c.defined(t.mpHeight)&&(e._symbolSizeInLib=new WebGLPlot$c.Cartesian2(t.mpWidth,t.mpHeight)),t.BloodVolumes)for(o=0;o<t.BloodVolumes.length;o++)e.BloodVolumes.push(_0xb27609.clone(t.BloodVolumes[o]));t.bIsShowBloodVolume&&(e.bIsShowBloodVolume=t.bIsShowBloodVolume),WebGLPlot$c.defined(t.disableDepthTestDistance)&&("5e-324"!==t.disableDepthTestDistance?e._disableDepthTestDistance=Number.MAX_VALUE:e._disableDepthTestDistance=Number.MIN_VALUE),WebGLPlot$c.defined(t.sizeInMeters)&&(e._sizeInMeters=t.sizeInMeters),WebGLPlot$c.defined(t.symbolSizeInMeters)&&(e._symbolSizeInMeters=new WebGLPlot$c.Cartesian2(t.symbolSizeInMeters.x,t.symbolSizeInMeters.y)),WebGLPlot$c.defined(t.alwaysHasMiddelText)&&(e._alwaysHasMiddelText=t.alwaysHasMiddelText),e._isNegativeImage=t.negativeImage,e._gridLineWidth=WebGLPlot$c.defined(t.gridLineWidth3D)?4*t.gridLineWidth3D:3,e._gridSurroundLineWidth=WebGLPlot$c.defined(t.gridSurroundLineWidth3D)?4*t.gridSurroundLineWidth3D:3,e._symbolRank=t.symbolRank,e._lineSymbolID=t.style.lineSymbolID,e._middleMarkExist=t.middleMarkExist,e._textPos=WebGLPlot$c.defined(t.annotationPosition)?t.annotationPosition:0,e._showMode=WebGLPlot$c.defined(t.dotShowMode)?t.dotShowMode:_0x4e5d29.Grid}else t.subSymbols&&(e._subSymbols=t.subSymbols),t.scaleValues&&(e._scaleValues=t.scaleValues),WebGLPlot$c.defined(t.style.extendHeight)&&(e._extendWallHeight=t.style.extendHeight),WebGLPlot$c.defined(t.wallOpaqueRate)&&(t.wallOpaqueRate>1&&t.wallOpaqueRate<100?e._extendWallOpacity=(100-t.wallOpaqueRate)/100:t.wallOpaqueRate<=1&&(e._extendWallOpacity=t.wallOpaqueRate)),t.subSymbolSize&&e._updateSubSize?e._updateSubSize=!1:e._updateSubSize=!0,e._subSymbolSize=t.subSymbolSize?t.subSymbolSize:0,WebGLPlot$c.defined(t.subSymbolScaleValue)&&(e._subSymbolScaleValue=t.subSymbolScaleValue),t.hasOwnProperty("isClampToGround")&&(e._isClampToGround=t.isClampToGround),t.hasOwnProperty("arrowHeadType")&&(e._arrowHeadType=t.arrowHeadType),t.hasOwnProperty("arrowBodyType")&&(e._arrowBodyType=t.arrowBodyType),t.hasOwnProperty("arrowTailType")&&(e._arrowTailType=t.arrowTailType);return e}function _0x4ea4b3(e,t,i,n){var r=WebGLPlot$c.getServerData(e,t,void 0,n);!r||(r.getSymbolInfo.events.on({processCompleted:function(e){return i._innerCells=e.result.innerCells,i._getServerDataPrototype&&i._getServerDataPrototype(e.result),i._initialize=!1,!0},processFailed:function(){},scope:self}),r.getSymbolInfo.processAsync(r.getSymbolInfoParameters))}function _0x5995dc(e,t){!e||(e.lineColor&&(t.symbolStyle.lineColor=e.lineColor),e.lineWidth&&(t.symbolType===_0x18bc2f.SYMBOL_DOT?t.gridLineWidth=e.lineWidth:t.symbolStyle.lineWidth=e.lineWidth),e.textContent&&(t.textContent=e.textContent),e.fontSize&&(t.symbolTextStyle.fontSize=e.fontSize),e.fontColor&&(t.symbolTextStyle.foreColor=e.fontColor))}_0x267b40.prototype.createSymbol=function(e,t,i,n,r){if(!Array.isArray(i)||i.length<=0||void 0===WebGLPlot$c.getLibManager(this._scene._plottingID))throw new WebGLPlot$c.DeveloperError("PlottingLayer createSymbol points or Plotting is needed!!!");if(this.isEditable){if(0===e&&(t===_0x18bc2f.SYMBOL_PICTURE||t===_0x18bc2f.SYMBOL_Model)&&WebGLPlot$c.defined(n)&&"function"!=typeof n&&WebGLPlot$c.defined(n.url))return n.libID=e,n.code=t,n.points=i,void this.createModelAndPicture(n,r);"function"==typeof n&&!WebGLPlot$c.defined(r)&&(r=n);for(var o=this,a=[],s=WebGLPlot$c.getLibManager(this._scene._plottingID),l=0;l<i.length;l++)a.push(i[l].clone());var u=null,c=null;if(!s.useServerData){var h=s.localSymbolLibData[e][t];return u=o.createGraphicObject(o,a,h),_0x5995dc(n,u),"function"==typeof r&&r({feature:u}),!0}if(0===(c=WebGLPlot$c.getServerData(e,t,void 0,this._scene._plottingID)))return u=_0x2d6822.isSymbolDot(t)?new _0x25259d({layer:this,libID:e,code:t,localPoints:a}):new _0x4381c6({layer:this,libID:e,code:t,localPoints:a}),_0x5995dc(n,u),u._symbolType=t,this._pushGeoGraphicObjectArray(u),"function"==typeof r&&r({feature:u}),!0;if(null!==c){var d=s.getSymbolData(e,t);if(WebGLPlot$c.defined(d)&&null!==d)return u=o.createGraphicObject(o,a,d),_0x5995dc(n,u),"function"==typeof r&&r({feature:u}),!0;c.getSymbolInfo.events.on({processCompleted:function(t){var i=t.result;return-1!==i.libID&&-1!==i.code&&(s.setSymbolData(e,t.result),u=o.createGraphicObject(o,a,i),_0x5995dc(n,u),"function"==typeof r&&r({feature:u}),!0)},processFailed:function(e){return r(e)},scope:this}),c.getSymbolInfo.processAsync(c.getSymbolInfoParameters)}}},_0x267b40.prototype.createModelAndPicture=function(e,t){if(!this.isEditable||0!==e.libID||e.code!==_0x18bc2f.SYMBOL_Model&&e.code!==_0x18bc2f.SYMBOL_PICTURE)return;if(null===WebGLPlot$c.getLibManager(this._scene._plottingID))throw new WebGLPlot$c.DeveloperError("Plotting is needed initialize to get SymbolLibManager");for(var i=[],n=0;n<e.points.length;n++)i.push(e.points[n].clone());var r=null;let o=WebGLPlot$c.defined(e.modelScale)?e.modelScale:1;var a={layer:this,libID:e.libID,code:e.code,localPoints:i,modelScale:new _0x11ff81(o,o,o),pictureSymbolSize:e.pictureSymbolSize};r=new _0x25259d(a),e.code===_0x18bc2f.SYMBOL_Model?(r._showMode=_0x4e5d29.Marker,r._modelPath=e.url,r._symbolType=_0x18bc2f.SYMBOL_Model):e.code===_0x18bc2f.SYMBOL_PICTURE&&(r._showMode=_0x4e5d29.Picture,r._picturePath=e.url,r._symbolType=_0x18bc2f.SYMBOL_PICTURE),_0x5995dc(e,r),WebGLPlot$c.defined(r)&&null!==r&&this._pushGeoGraphicObjectArray(r),"function"==typeof t&&t({feature:r})},_0x267b40.prototype.createGraphicObject=function(e,t,i){var n=null;return i.symbolType===_0x18bc2f.SYMBOL_DOT?n=new _0x25259d({layer:e,libID:i.libID,code:i.code,localPoints:t,serverData:i}):i.symbolType!==_0x18bc2f.SYMBOL_DOT&&i.symbolType!==_0x18bc2f.SYMBOL_UNKNOW&&(n=new _0x4381c6({layer:e,libID:i.libID,code:i.code,localPoints:t,serverData:i})),WebGLPlot$c.defined(n)&&null!==n&&e._pushGeoGraphicObjectArray(n),n},_0x267b40.prototype.update=function(e,t,i,n){if(this._valid)for(var r=0;r<this._geoGraphicObjects.length;r++)(this._geoGraphicObjects[r]instanceof _0x25259d||this._geoGraphicObjects[r]instanceof _0x4381c6||this._geoGraphicObjects[r]instanceof _0x3a6b26)&&(this.visibility?this._geoGraphicObjects[r].update(e,t,i,n):this._geoGraphicObjects[r].setVisible(this.visibility))},_0x267b40.prototype.render=function(e,t){if(this._valid){for(var i=0;i<this._geoGraphicObjects.length;i++)!1===this._geoGraphicObjects[i]._initialize&&(this.updatePrimitive=!0),(this._geoGraphicObjects[i]instanceof _0x25259d||this._geoGraphicObjects[i]instanceof _0x4381c6||this._geoGraphicObjects[i]instanceof _0x3a6b26)&&this._geoGraphicObjects[i].initSymbol();this.updatePrimitive&&(_0x38860f.setUpdatePrimitive(!0,this._scene),this.updatePrimitive=!1)}},_0x267b40.prototype.setVisibleByID=function(e,t){!this._valid||!1===this._visibility||(this._geoGraphicObjects[e].display=t)},_0x267b40.prototype.setColorByID=function(e,t){if(this._valid&&!1!==this._visibility){if(t instanceof Array)return t=new WebGLPlot$c.Color(t[0],t[1],t[2],t[3]),void this._geoGraphicObjects[e].setColor(t);this._geoGraphicObjects[e].setColor(t)}},_0x267b40.prototype.resetColor=function(){this._valid},_0x267b40.prototype.getFeatureByUuid=function(e){if(!this._valid)return null;for(var t=0;t<this._geoGraphicObjects.length;++t){if(e===this._geoGraphicObjects[t].id)return this._geoGraphicObjects[t];if(this._geoGraphicObjects[t]instanceof _0x3a6b26&&this._geoGraphicObjects[t].getFeatureByUuid(e))return this._geoGraphicObjects[t]}},_0x267b40.prototype.findFeatureByUuid=function(e){if(!this._valid||""===e||!WebGLPlot$c.defined(e))return null;for(var t=0;t<this._geoGraphicObjects.length;++t)if(e===this._geoGraphicObjects[t].id)return{feature:this._geoGraphicObjects[t],index:t};return null},_0x267b40.prototype.addFeature=function(e){var t=e.id;if(!WebGLPlot$c.defined(t))return!1;for(var i=0;i<this._geoGraphicObjects.length;++i)if(t===this._geoGraphicObjects[i].id)return!1;return e._layer=this,this._pushGeoGraphicObjectArray(e),!0},_0x267b40.prototype.setSelectedFeature=function(e){if(this._valid&&this.isSelected)for(var t=0;t<this._geoGraphicObjects;++t)if(e===this._geoGraphicObjects[t]){this._selectedFeature=this._geoGraphicObjects[t],WebGLPlot$c.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature);break}},_0x267b40.prototype.setSelectedFeatureByIndex=function(e){!this._valid||!this.isSelected||WebGLPlot$c.defined(this._geoGraphicObjects[e])&&(this._selectedFeature=this._geoGraphicObjects[e],WebGLPlot$c.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature))},_0x267b40.prototype.setSelectedFeatureByID=function(e){if(this._valid&&this.isSelected)for(var t=0;t<this._geoGraphicObjects.length;++t)if(e===this._geoGraphicObjects[t]._id){this._selectedFeature=this._geoGraphicObjects[t],WebGLPlot$c.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature);break}},_0x267b40.prototype.releaseSelection=function(){!this._valid||((WebGLPlot$c.defined(this._selectedFeature)||null!==this._selectedFeature)&&(this._selectedFeature=void 0),WebGLPlot$c.defined(this._plottingEdit)&&this._plottingEdit.unSelection(!0))},_0x267b40.prototype.removeGeoGraphicObject=function(e,t){if(WebGLPlot$c.defined(e)&&0!==this._geoGraphicObjects.length&&this.isEditable)for(var i=0;i<this._geoGraphicObjects.length;i++)if(this._geoGraphicObjects[i].id===e.id||this._geoGraphicObjects[i]instanceof _0x3a6b26&&this._geoGraphicObjects[i].getFeatureByUuid(e.id)){let e=this._geoGraphicObjects[i].id,n=this.name;if(_0x47a70a.getInstance().symbolBeforeDeleted.raiseEvent([e],n),this._geoGraphicObjects[i]._destroy(),this._geoGraphicObjects[i]=null,this._geoGraphicObjects.splice(i,1),t&&_0x47a70a.getInstance().symbolDeleted.raiseEvent([e],n),WebGLPlot$c.defined(this._plottingEdit))this._plottingEdit.releaseSelection(),this._plottingEdit.RemoveFeatureEvent.raiseEvent();return!0}},_0x267b40.prototype.removeAll=function(e){this._removeAll(!1,e)},_0x267b40.prototype._removeAll=function(e,t){if(!(e||0!==this._geoGraphicObjects.length&&this.isEditable))return;let i=[];for(var n=0;n<this._geoGraphicObjects.length;n++)i.push(this._geoGraphicObjects[n].id);_0x47a70a.getInstance().symbolBeforeDeleted.raiseEvent(i,this.name);for(n=0;n<this._geoGraphicObjects.length;n++)this._geoGraphicObjects[n]._destroy();(t&&_0x47a70a.getInstance().symbolDeleted.raiseEvent(i,this.name),WebGLPlot$c.defined(this._plottingEdit))&&(this._plottingEdit.releaseSelection(),this._plottingEdit.RemoveFeatureEvent.raiseEvent());this._geoGraphicObjects=[]},_0x267b40.prototype.destroy=function(e){this._plottingEdit&&(this._plottingEdit.releaseSelection(),this._plottingEdit._plottingLayer=null);let t=[];for(let e=0;e<this._geoGraphicObjects.length;e++){let i=this._geoGraphicObjects[e];t.push(i.id)}_0x47a70a.getInstance().symbolBeforeDeleted.raiseEvent(t,this.name);for(let e=0;e<this._geoGraphicObjects.length;e++){let t=this._geoGraphicObjects[e];t._destroy(),t=void 0}e&&_0x47a70a.getInstance().symbolDeleted.raiseEvent(t,this.name),this._geoGraphicObjects=[],this._selectedFeature=null,this._name=null,this._projectName=null,this._waterPlanes=null,this._scene=null},_0x267b40.prototype.delete=function(){this.removeAll(),_0x2d6822.getPlotLayers(this._scene).remove(this.name,!0)},_0x267b40.prototype.removeFeatureByUuId=function(e,t){for(var i=0;i<this._geoGraphicObjects.length;++i)e===this._geoGraphicObjects[i].id&&this.removeGeoGraphicObject(this._geoGraphicObjects[i],t)},_0x267b40.prototype.setUseDepthTest=function(e){this._bIsUseDepthTest=e,_0x38860f.setUseDepthTest(e,this._scene)},_0x267b40.prototype.createGroupObject=function(e){if(!e||e.length<=1||!this.isEditable)return null;for(var t=0;t<e.length;t++)if(!WebGLPlot$c.defined(e[t])||null===this.findFeatureByUuid(e[t].id))return null;for(t=0;t<e.length;t++)this.removeGeoGraphicObject(e[t]);var i=new _0x3a6b26(e);return this._pushGeoGraphicObjectArray(i,!1),i},_0x267b40.prototype.getFeaturesFromGroupObject=function(e){var t=[];for(var i in e.subObjects)e.subObjects[i]instanceof _0x3a6b26?t=t.concat(this.getFeaturesFromGroupObject(e.subObjects[i])):t.push(e.subObjects[i]);return t},_0x267b40.prototype.unGroupObject=function(e){if(!(e instanceof _0x3a6b26&&this.isEditable))return!1;var t=e.unGroupObject();return this.removeGeoGraphicObject(e),this._geoGraphicObjects=this._geoGraphicObjects.concat(t),!0},_0x267b40.prototype.geoJsonToGeoGraphicObject=function(e,t){var i=this.findFeatureByUuid(e.uuid);i&&this.removeGeoGraphicObject(i.feature);var n=null;if(_0x18bc2f.GROUPOBJECT===parseInt(e.symbolType)){n=new _0x3a6b26(this.createGroupObjectByGeoJson(e),e.uuid)}else n=this.createSymbolByGeoJson(n,e);this._pushGeoGraphicObjectArray(n,!0),n._GeoJsonFeature=e,"function"==typeof t&&t({feature:n})},_0x267b40.prototype.createGroupObjectByGeoJson=function(e){var t=[];if(!this.isEditable)return t;var i=null,n=e.geometries;for(var r in n){if(_0x18bc2f.GROUPOBJECT===parseInt(n[r].symbolType))i=new _0x3a6b26(this.createGroupObjectByGeoJson(n[r]),n[r].id);else i=this.createSymbolByGeoJson(i,n[r]);t.push(i)}return t},_0x267b40.prototype.createSymbolByGeoJson=function(e,t){for(var i=parseInt(t.libID),n=parseInt(t.code),r=[],o=t.localePoints,a=0;a<o.length;++a){var s=o[a],l=parseFloat(s.x),u=parseFloat(s.y),c=WebGLPlot$c.defined(s.z)?parseFloat(s.z):0;r.push(new _0x11ff81(l,u,c))}return _0x5cc39e(e=parseInt(t.symbolType)===_0x18bc2f.SYMBOL_DOT||parseInt(t.symbolType)===_0x18bc2f.SYMBOL_Model||parseInt(t.symbolType)===_0x18bc2f.SYMBOL_PICTURE?new _0x25259d({layer:this,libID:i,code:n,localPoints:r,symbolSizeInLib:t.symbolSize}):new _0x4381c6({layer:this,libID:i,code:n,localPoints:r}),t,this._scene._plottingID),e},_0x267b40.prototype.setCustomClipBox=function(e){},_0x267b40.prototype.clearCustomClipBox=function(){},_0x267b40.prototype._pushGeoGraphicObjectArray=function(e,t){void 0===t&&(t=!0),e instanceof _0x21fac2&&(this._geoGraphicObjects.push(e),t&&(this._symbolAddedEvent.raiseEvent(e),_0x47a70a.getInstance().symbolAdded.raiseEvent(e,this.name)))},_0x267b40.prototype.updateGeoGraphicObjectByGeoJson=function(e){if(WebGLPlot$c.defined(e)&&WebGLPlot$c.defined(e.uuid)){let t=this.getFeatureByUuid(e.uuid);if(WebGLPlot$c.defined(t))return _0x5cc39e(t,e,this._scene._plottingID),t._initialize=!1,_0x47a70a.getInstance().symbolUpdated.raiseEvent(t),t}return null},Object.defineProperties(_0x267b40.prototype,{id:{get:function(){return this._id}},visibility:{get:function(){return this._visibility},set:function(e){if(this._visibility!==e){for(var t in this._visibility=e,this._geoGraphicObjects)if(this._geoGraphicObjects[t]instanceof _0x25259d||this._geoGraphicObjects[t]instanceof _0x4381c6||this._geoGraphicObjects[t]instanceof _0x3a6b26){if(!this._geoGraphicObjects[t].display)continue;this._geoGraphicObjects[t].setVisible(e)}!e&&this._plottingEdit&&this._plottingEdit.releaseSelection(),_0x47a70a.getInstance().layerVisibleChanged.raiseEvent(this.name,e)}}},name:{get:function(){return this._name},set:function(e){e!==this._name&&(this._name=e)}},geoGraphicObjects:{get:function(){return this._geoGraphicObjects}},selectedFeature:{get:function(){return this._selectedFeature}},isEditable:{get:function(){return this._isEditable},set:function(e){e!==this._isEditable&&(this._isEditable=e,!e&&this._plottingEdit?this._plottingEdit.releaseSelection():e&&this._plottingEdit&&this.selectedFeature&&this._plottingEdit.DoSelectObjectEdit(this.selectedFeature),_0x47a70a.getInstance().layerEditableChanged.raiseEvent(this.name,e))}},isSelected:{get:function(){return this._isSelected},set:function(e){e!==this._isSelected&&(this._isSelected=e,e?this._plottingEdit.activate():(this._plottingEdit.deactivate(),this.releaseSelection()),_0x47a70a.getInstance().layerSelectedChanged.raiseEvent(this.name,e))}},isLocked:{get:function(){return this._isLocked},set:function(e){e!==this._isLocked&&(this._isLocked=e,_0x47a70a.getInstance().layerActived.raiseEvent(this.name,e))}},symbolAddedEvent:{get:function(){return this._symbolAddedEvent}}}),_0x267b40.prototype.getSelection=function(){return[]};const _0x3851f2=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x12baa7=_0x3851f2(void 0,(function(){return _0x12baa7.toString().search("(((.+)+)+)+$").toString().constructor(_0x12baa7).search("(((.+)+)+)+$")}));_0x12baa7();var _0x5291a3=function(){this._layers=new WebGLPlot.AssociativeArray,this._layerQueue=[],this._layerIndex=3,this._selectedLayer=void 0,this.collentionLayer=void 0,this.goAnimationLayer=void 0};Object.defineProperties(_0x5291a3.prototype,{layerQueue:{get:function(){return this._layerQueue}}}),_0x5291a3.prototype.prePassesUpdate=function(e){this.render(e,null)},_0x5291a3.prototype.update=function(e,t,i,n){var r=this._layerQueue,o=this._layerQueue.length,a=0;for(a=0;a<o;a++){var s=r[a];!WebGLPlot.defined(s)||s.update(e,t,i)}WebGLPlot.defined(this.collentionLayer)&&this.collentionLayer.update(e,t,i),WebGLPlot.defined(this.goAnimationLayer)&&this.goAnimationLayer.update(e,t,i)},_0x5291a3.prototype.render=function(e,t){var i=this._layerQueue,n=this._layerQueue.length,r=0;for(r=0;r<n;r++){var o=i[r];!WebGLPlot.defined(o)||o.render(t,e)}WebGLPlot.defined(this.collentionLayer)&&this.collentionLayer.render(t,e),WebGLPlot.defined(this.goAnimationLayer)&&this.goAnimationLayer.render(t,e)},_0x5291a3.prototype.releaseSelection=function(){var e=this._layerQueue,t=this._layerQueue.length,i=0;for(i=0;i<t;i++){var n=e[i];!WebGLPlot.defined(n)||n.releaseSelection()}},_0x5291a3.prototype.find=function(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("name is required.");return this._layers.get(e)},_0x5291a3.prototype.findByIndex=function(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("index is required.");if(e>this._layerQueue.length-1)throw new WebGLPlot.DeveloperError("index is out of bounds.");return this._layerQueue[e]},_0x5291a3.prototype.add=function(e,t){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("layer is required.");var i=e._name;if(!WebGLPlot.defined(i)||""==i)throw new WebGLPlot.DeveloperError("name is required.");var n=this._layers;if(n.contains(i))throw new WebGLPlot.RuntimeError("An layer with name "+i+" already exists in this Scene.");e._id=this._layerIndex++;var r=this._layerQueue.length;n.set(i,e),t=WebGLPlot.defaultValue(t,r),e.index=t,this._layerQueue.push(e),this._layerQueue.sort((function(e,t){return e.index-t.index})),_0x47a70a.getInstance().layerAdded.raiseEvent(i)},_0x5291a3.prototype.remove=function(e,t){if(t=WebGLPlot.defaultValue(t,!0),!WebGLPlot.defined(e))return!1;var i=this.find(e);return!!i&&(!!this._layers.remove(e)&&(this._layerQueue.splice(this._layerQueue.indexOf(i),1),t&&(i.destroy(),i=void 0),_0x47a70a.getInstance().layerDeleted.raiseEvent(e),!0))},_0x5291a3.prototype.removeAll=function(e){let t=[];e=WebGLPlot.defaultValue(e,!0);for(let i=0;i<this._layerQueue.length;i++){let n=this._layerQueue[i];t.push(n.name),e&&(n.destroy(),n=void 0)}this._layers.removeAll(),this._layerQueue.length=0,_0x47a70a.getInstance().layerDeleted.raiseEvent(t)},_0x5291a3.prototype.setSelectedLayer=function(e){this._selectedLayer=e},_0x5291a3.prototype.getSelectedLayer=function(){return this._selectedLayer},_0x5291a3.prototype.getPlottingLayerByName=function(e){for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];if(i instanceof _0x267b40&&e===i.name)return i}return null},_0x5291a3.prototype.getPlottingLayerIsActived=function(){for(let e=0;e<this._layerQueue.length;e++){let t=this._layerQueue[e];if(t instanceof _0x267b40&&!t.isLocked)return t}return null},_0x5291a3.prototype.setPlottingLayerIsActived=function(e,t,i){let n=!1;if(!e||""===e)return n;for(let r=0;r<this._layerQueue.length;r++){let o=this._layerQueue[r];if(o instanceof _0x267b40&&o.name===e){o.isLocked=!1,t&&t.setPlottingLayer(o),i&&i.setPlottingLayer(o),n=!0;break}}if(n)for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];i instanceof _0x267b40&&i.name!==e&&(i._isLocked=!0)}return n},_0x5291a3.prototype.getAllPlottingLayers=function(){let e=[];for(let t=0;t<this._layerQueue.length;t++)this._layerQueue[t]instanceof _0x267b40&&e.push(this._layerQueue[t]);return e},_0x5291a3.prototype.getFeatrueByUuID=function(e){for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];if(i instanceof _0x267b40){let t=i.getFeatureByUuid(e);if(WebGLPlot.defined(t))return t}}return null},WebGLPlot.PlotLayers=_0x5291a3;var _0x13d7b9=(_0xd4c61b=!0,function(e,t){var i=_0xd4c61b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd4c61b=!1,i}),_0x4618ec=_0x13d7b9(void 0,(function(){return _0x4618ec.toString().search("(((.+)+)+)+$").toString().constructor(_0x4618ec).search("(((.+)+)+)+$")})),_0xd4c61b;_0x4618ec();class _0x32c2d4{constructor(e,t){e&&(this.key=e),t&&(this.value=t),this.CLASS_NAME="SuperMap.Plot.Property"}setKey(e){this.key=e}getKey(){return this.key}setValue(e){this.value=e}getValue(){return this.value}destroy(){this.key=null,this.value=null}clone(){return new Property(this.key,this.value)}}var _0x49f70f=(_0x39630a=!0,function(e,t){var i=_0x39630a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39630a=!1,i}),_0x5d7d06=_0x49f70f(void 0,(function(){return _0x5d7d06.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d7d06).search("(((.+)+)+)+$")})),_0x39630a;function _0x3ff6b7(e,t){this._name=e,this._features=[],this._valid=!0,this._scene=t,this._waterPlanes=[],this._visibleViewport=0,this.visibility=!0}_0x5d7d06(),_0x3ff6b7.prototype.destroy=function(){this._valid=null,this._waterPlanes=null,this._visibleViewport=null,this._features=null,this._name=null},_0x3ff6b7.prototype.addFeatures=function(e){Array.isArray(e)||(e=[e]),this._features=this._features.concat(e)},_0x3ff6b7.prototype.update=function(e,t,i,n){if(this._valid)for(var r=0;r<this._features.length;r++)!1===this._features[r]._initialize&&(this.updatePrimitive=!0),(this._features[r]instanceof _0x25259d||this._features[r]instanceof _0x4381c6)&&this._features[r].update(e,t,i,n)},_0x3ff6b7.prototype.render=function(){for(var e=0;e<this._features.length;e++)!1===this._features[e]._initialize&&(this.updatePrimitive=!0),(this._features[e]instanceof _0x25259d||this._features[e]instanceof _0x4381c6)&&this._features[e].initSymbol();this.updatePrimitive&&(_0x38860f.setUpdatePrimitive(!0,this._scene),this.updatePrimitive=!1)},_0x3ff6b7.prototype.removeFeatures=function(e){if(WebGLPlot.defined(e)&&0!==this._features.length){for(var t=[],i=0;i<this._features.length;i++){if(this._features[i]===e){1===this._features[i].symbolType&&this._features[i]._destroy();continue}t.push(this._features[i])}this._features=t}},_0x3ff6b7.prototype.releaseSelection=function(){},_0x3ff6b7.prototype.setCustomClipBox=function(e){},_0x3ff6b7.prototype.clearCustomClipBox=function(){},Object.defineProperties(_0x3ff6b7.prototype,{id:{get:function(){return this._id}}});var _0xed3fb3=(_0x288f3c=!0,function(e,t){var i=_0x288f3c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x288f3c=!1,i}),_0x29f578=_0xed3fb3(void 0,(function(){return _0x29f578.toString().search("(((.+)+)+)+$").toString().constructor(_0x29f578).search("(((.+)+)+)+$")})),_0x288f3c;_0x29f578();var _0x43e58a={PLAYFROMNOW:0,PLAYSAMELASTONE:1,PLAYAFTERLASTONE:2,UNKNOWN:3},_0x28a0bd=Object.freeze(_0x43e58a),_0x20f77b=(_0x2cce96=!0,function(e,t){var i=_0x2cce96?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2cce96=!1,i}),_0x4adade=_0x20f77b(void 0,(function(){return _0x4adade.toString().search("(((.+)+)+)+$").toString().constructor(_0x4adade).search("(((.+)+)+)+$")})),_0x2cce96;_0x4adade();class _0x2688ba{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._startTime=WebGLPlot$f.defaultValue(e.startTime,0),this._duration=WebGLPlot$f.defaultValue(e.duration,5),this._repeat=WebGLPlot$f.defaultValue(e.repeat,!1),this._name=WebGLPlot$f.defaultValue(e.name,""),this._animationState=WebGLPlot$f.defaultValue(e.animationState,_0x5140b5.UNKNOWN),this._goFeature=WebGLPlot$f.defaultValue(e.goFeature,null),this._animationGOFeature=WebGLPlot$f.defaultValue(e.animationGOFeature,null),this._innerStartTime=WebGLPlot$f.defaultValue(e.innerStartTime,0),this._lastExecute=WebGLPlot$f.defaultValue(e.lastExecute,!1),this._pauseTime=WebGLPlot$f.defaultValue(e.pauseTime,0),this._ratio=WebGLPlot$f.defaultValue(e.ratio,0),this._symbolTexts=WebGLPlot$f.defaultValue(e.symbolTexts,""),this._animationManager=null,this._animationFinish=new WebGLPlot$f.Event,this._animationBegin=new WebGLPlot$f.Event,this._isSendBegin=!0,this._playSpeed=1,this.__playPastRatio=0,this._groupIndex=WebGLPlot$f.defaultValue(e.groupIndex,void 0),this._animationPlayType=WebGLPlot$f.defaultValue(e.animationPlayType,_0x28a0bd.UNKNOWN),this.delayTime=0}destroy(){this.showAnimationFeature(!1),this.removeAnimationFeature(),this._goFeature=null,this._animationGOFeature._destroy(),this._animationGOFeature=null,this._name="",this.goFeatureLocalPts=[],this._symbolTexts="",this._animationState=_0x5140b5.UNKNOWN,this._pathFeature&&(_0x38860f.removeAllAlgoPloyline(this._pathFeature,this._scene),this._pathFeature._destroy(),this._pathFeature=null),this.dynamicScane&&(this.dynamicScane.removeScaneCylinder(),this.dynamicScane=void 0)}setGOFeature(e,t){if(null==t||null===t.layer||null===e._goAnimationLayer)return!1;this._animationManager=e,this._goFeature=t;var i=this.createAnimationGOFeature(this._goFeature);return null!==this._animationGOFeature&&(i||(this._animationGOFeature._layer=e._goAnimationLayer,e._goAnimationLayer.addFeatures(this._animationGOFeature)),this.showAnimationFeature(!1),(_0x304306.ANIMATION_GROW===this.getGOAnimationType()||_0x304306.ANIMATION_GROW_EXP===this.getGOAnimationType()||_0x304306.ANIMATION_REDUCE_EXP==this.getGOAnimationType())&&(this.goFeatureLocalPts=WebGLPlot$f.clonePoints(this._goFeature._localPoints)),!0)}play(){WebGLPlot$f.defined(this._animationGrowEXP_isFirstExecute)&&(this._animationGrowEXP_isFirstExecute=!0);let e=new Date;if(this.__playSpeedTime=e.getTime()/1e3,this.__playTime=e.getTime()/1e3,this._animationState===_0x5140b5.PAUSE){const t=e.getTime()/1e3-this._pauseTime;this._innerStartTime+=t}else this._innerStartTime=e.getTime()/1e3,WebGLPlot$f.defined(this._goFeature)&&this._goFeature.releaseSelection(),this.showAnimationFeature(!0),this.__playPastRatio=0;this._lastExecute=!1,this._animationState=_0x5140b5.PLAYING}stop(){this._animationState=_0x5140b5.STOP}pause(){if(this._animationState===_0x5140b5.PLAYING){this._animationState=_0x5140b5.PAUSE;var e=new Date;this._pauseTime=e.getTime()/1e3}}reset(){this._animationState=_0x5140b5.RESET,this.showAnimationFeature(!1)}createAnimationGOFeature(e){for(var t=0;t<this._animationManager.goAnimations.length;t++){var i=this._animationManager.goAnimations[t];if(i._goFeature.id===e.id)return this._animationGOFeature=i._animationGOFeature,this._animationGOFeature}return this._animationGOFeature=e.clone(),this._animationGOFeature._id+=this._name,this._animationGOFeature._isEdit=!0,this._animationGOFeature._valid=!1,this._animationGOFeature._isAnimationFeature=!0,null}canExecute(){if(this._animationState!==_0x5140b5.PLAYING)return!1;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this._startTime>e)return!1;var t=this.getRatioByTime();return!(t>1&&this._lastExecute||t<0)}getRatioByTime(){if(this._animationState!==_0x5140b5.PLAYING)return 0;let e=this.__computePlayRatio();return e>=1&&!this._lastExecute?(this._repeat?(e=0,this._lastExecute=!1,this._animationState=_0x5140b5.PLAYING,this._innerStartTime=(new Date).getTime()/1e3,this.__playTime=(new Date).getTime()/1e3):(e=1,this._lastExecute=!0,this._isSendBegin=!0,this._animationState=_0x5140b5.STOP,this._animationFinish.raiseEvent(this.name),_0x47a70a.getInstance().animationFinished.raiseEvent(this.name)),this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=0):this._isSendBegin&&(this._animationBegin.raiseEvent(this.name),_0x47a70a.getInstance().animationBegined.raiseEvent(this.name),this._isSendBegin=!1),e<0&&(e=0,this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=0),this._ratio=e,e}showAnimationFeature(e){null!==this._animationGOFeature&&null!==this._animationGOFeature._symbolStyle&&(this.resetAnimationFeature(e),this._animationGOFeature.display=e),null!==this._goFeature&&null!==this._goFeature._symbolStyle&&(this._goFeature.display=!e,this._goFeature._initialize=!1),e&&(this._isSendBegin=!0)}resetAnimationFeature(e){this._animationGOFeature._symbolStyle=this._goFeature._symbolStyle.clone(),this._animationGOFeature._localPoints=this._goFeature._localPoints,this._animationGOFeature._initialize=!1}setAnimationName(e){return!this._animationManager.findGOAnimationByName(e)&&(this._name=e,!0)}__setPlayRatioState(){this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=this._ratio}__computePlayRatio(){let e=0;const t=(new Date).getTime()/1e3,i=this._duration/this.playSpeed;return e=this.__playTime===this.__playSpeedTime?(t-this._innerStartTime-this._startTime)/i:(t-this.__playSpeedTime)/i,e+=this.__playPastRatio,this._innerStartTime+this._startTime>=t||e<0?0:e}removeAnimationFeature(){if(null!==this._animationGOFeature){var e=this._animationManager.goAnimations,t=!1;if(null!==e)for(var i=0;i<e.length;i++){var n=e[i];if(n!==this&&n._animationGOFeature===this._animationGOFeature){t=!0;break}}t||this._animationManager._goAnimationLayer.removeFeatures(this._animationGOFeature)}}getBaseJSONData(){var e={};return this.goFeature&&(e.goLayerUuid=this.goFeature.id),e.name=this.name,e.startTime=this.startTime,e.duration=this.duration,e.repeat=this.repeat,e.playtype=this.animationPlayType,e}fromBaseJSONData(e){this.startTime=e.startTime,this.duration=e.duration,this.repeat=e.repeat,this.animationPlayType=e.playtype}_serverColorToColor(e){var t=new WebGLPlot$f.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,t}_colorFormat(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}setStartTime(e){e<0&&(e=0),this.delayTime=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData())}getStartTime(){return this._animationManager.getAnimationDelayTime()}}Object.defineProperties(_0x2688ba.prototype,{startTime:{get:function(){return this._startTime},set:function(e){e!==this._startTime&&(this._startTime=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},repeat:{get:function(){return this._repeat},set:function(e){e!==this._repeat&&(this._repeat=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},duration:{get:function(){return this._duration},set:function(e){if(e!==this._duration){this._duration=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData())}}},name:{get:function(){return this._name},set:function(e){e!==this._name&&(this._name=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},groupName:{get:function(){return this._groupName},set:function(e){e!==this._groupName&&(this._groupName=e)}},animationState:{get:function(){return this._animationState},set:function(e){e!==this._animationState&&(this._animationState=e)}},goFeature:{get:function(){return this._goFeature},set:function(e){e!==this._goFeature&&(this._goFeature=e)}},animationGOFeature:{get:function(){return this._animationGOFeature},set:function(e){e!==this._animationGOFeature&&(this._animationGOFeature=e)}},innerStartTime:{get:function(){return this._innerStartTime},set:function(e){e!==this._innerStartTime&&(this._innerStartTime=e)}},lastExecute:{get:function(){return this._lastExecute},set:function(e){e!==this._lastExecute&&(this._lastExecute=e)}},pauseTime:{get:function(){return this._pauseTime},set:function(e){e!==this._pauseTime&&(this._pauseTime=e)}},ratio:{get:function(){return this._ratio},set:function(e){e!==this._ratio&&(this._ratio=e)}},symbolTexts:{get:function(){return this._symbolTexts},set:function(e){e!==this._symbolTexts&&(this._symbolTexts=e)}},animationBegin:{get:function(){return this._animationBegin}},animationFinish:{get:function(){return this._animationFinish}},playSpeed:{get:function(){return this._playSpeed},set:function(e){e!==this._playSpeed&&(this.__setPlayRatioState(),this._playSpeed=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},fastForwardTime:{set:function(e){if(e<0)return;let t=e/this._duration;t>1&&(t=1),this.__playPastRatio+=t,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData())}},rewindTime:{set:function(e){if(e<0)return;let t=-e/this._duration;t>0&&(t=0),this.__playPastRatio+=t,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData())}},animationPlayType:{get:function(){return this._animationPlayType},set:function(e){if(e!==this._animationPlayType){this._animationPlayType=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData())}}}});var _0x192577=(_0x4bbebc=!0,function(e,t){var i=_0x4bbebc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4bbebc=!1,i}),_0x1048c9=_0x192577(void 0,(function(){return _0x1048c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x1048c9).search("(((.+)+)+)+$")})),_0x4bbebc;_0x1048c9();var _0x1ed027={Blink_Frequency:0,Blink_Number:1},_0x448062=Object.freeze(_0x1ed027),_0x397a54=(_0x4dec18=!0,function(e,t){var i=_0x4dec18?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4dec18=!1,i}),_0x5c27ae=_0x397a54(void 0,(function(){return _0x5c27ae.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c27ae).search("(((.+)+)+)+$")})),_0x4dec18;_0x5c27ae();var _0x4e17ee={Replace_NoColor:0,Replace_Color:1},_0x41970a=Object.freeze(_0x4e17ee),_0x2829dc=(_0x288a37=!0,function(e,t){var i=_0x288a37?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x288a37=!1,i}),_0x47c34d=_0x2829dc(void 0,(function(){return _0x47c34d.toString().search("(((.+)+)+)+$").toString().constructor(_0x47c34d).search("(((.+)+)+)+$")})),_0x288a37;_0x47c34d();class _0x306baa extends _0x2688ba{constructor(e){super(e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT)),this._blinkInterval=WebGLPlot$f.defaultValue(e.blinkInterval,500),this._blinkStyle=WebGLPlot$f.defaultValue(e.blinkStyle,_0x448062.Blink_Frequency),this._blinkNumber=WebGLPlot$f.defaultValue(e.blinkNumber,0),this._replaceStyle=WebGLPlot$f.defaultValue(e.replaceStyle,_0x41970a.Replace_NoColor),this._startColor=WebGLPlot$f.defaultValue(e.startColor,new WebGLPlot$f.Color(0,0,1,1)),this._endColor=WebGLPlot$f.defaultValue(e.endColor,new WebGLPlot$f.Color(1,0,0,1))}getGOAnimationType(){return _0x304306.ANIMATION_BLINK}execute(){if(!this.canExecute())return!1===this._goFeature._display&&!1===this._animationGOFeature._display&&(this._animationGOFeature._display=!0,!0);this._goFeature.display&&(this._goFeature.display=!1);var e=(new Date).getTime()/1e3,t=this._blinkInterval/1e3;return this._blinkStyle===_0x448062.Blink_Number&&(t=this._blinkInterval=this._duration/this._blinkNumber),(e-this._innerStartTime)%t<=t/2?this._replaceStyle===_0x41970a.Replace_Color?this.setColor(this._startColor):this._animationGOFeature.display=!1:(this._animationGOFeature.display=!0,this._replaceStyle===_0x41970a.Replace_Color&&this.setColor(this._endColor)),this._lastExecute&&(this._replaceStyle===_0x41970a.Replace_Color&&(this._animationGOFeature._symbolStyle._lineColor=this._endColor),this._animationGOFeature._display=!0,this._animationGOFeature._initialize=!1),!0}getRatioByTime(){if(this._animationState!==_0x5140b5.PLAYING)return 0;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this._startTime>e)return 0;var t=(e-this._innerStartTime-this._startTime)/this._duration;return t>=1&&!this._lastExecute?this._repeat?(this._innerStartTime=(new Date).getTime()/1e3,t=0,this._lastExecute=!1,this._animationState=_0x5140b5.PLAYING):(t=1,this._lastExecute=!0,this._animationState=_0x5140b5.STOP):t<0&&(t=0),this._ratio=t,t}setColor(e){this._animationGOFeature._symbolStyle._lineColor!==e&&(this._animationGOFeature._symbolStyle._lineColor=e,this._animationGOFeature._symbolTextStyle.setTextRectColor(e),this._animationGOFeature._initialize=!1)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.blinkStyle=this.blinkStyle,e.blinkInterval=this.blinkInterval,e.blinkNumber=this.blinkNumber,e.replaceStyle=this.replaceStyle,e.startColor=this._colorFormat(this.startColor),e.endColor=this._colorFormat(this.endColor),e}fromJSONData(e){this.fromBaseJSONData(e),this.blinkStyle=e.blinkStyle,this.blinkInterval=e.blinkInterval,this.blinkNumber=e.blinkNumber,this.replaceStyle=e.replaceStyle,this.startColor=this._serverColorToColor(e.startColor),this.endColor=this._serverColorToColor(e.endColor)}}Object.defineProperties(_0x306baa.prototype,{blinkInterval:{get:function(){return this._blinkInterval},set:function(e){e!=this._blinkInterval&&(this._blinkInterval=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},blinkStyle:{get:function(){return this._blinkStyle},set:function(e){e!=this._blinkStyle&&(this._blinkStyle=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},blinkNumber:{get:function(){return this._blinkNumber},set:function(e){e!=this._blinkNumber&&(this._blinkNumber=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},replaceStyle:{get:function(){return this._replaceStyle},set:function(e){e!=this._replaceStyle&&(this._replaceStyle=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startColor:{get:function(){return this._startColor},set:function(e){e==this._startColor||!(e instanceof WebGLPlot$f.Color)||(this._startColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endColor:{get:function(){return this._endColor},set:function(e){e==this._endColor||!(e instanceof WebGLPlot$f.Color)||(this._endColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x53caac=(_0x345c90=!0,function(e,t){var i=_0x345c90?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x345c90=!1,i}),_0x336c92=_0x53caac(void 0,(function(){return _0x336c92.toString().search("(((.+)+)+)+$").toString().constructor(_0x336c92).search("(((.+)+)+)+$")})),_0x345c90;_0x336c92();class _0x43b269 extends _0x2688ba{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._showEffect=WebGLPlot.defaultValue(e.showEffect,!1),this._finalDisplay=WebGLPlot.defaultValue(e.finalDisplay,!1)}getGOAnimationType(){return _0x304306.ANIMATION_SHOW}execute(){if(!this.canExecute())return!1;var e=this._ratio;return this._showEffect&&this._animationGOFeature.showMode!==_0x4e5d29.Marker?this.executeHaveEffect(e):this.executeNoEffect(e),!0}executeNoEffect(e){this._animationGOFeature.display=1-e<.01?this._finalDisplay:!this._finalDisplay}executeHaveEffect(e){this._finalDisplay||(e=1-e);var t;t=e>1?1:e,this._animationGOFeature.display||(this._animationGOFeature.display=!0),this._animationGOFeature.showMode===_0x4e5d29.Grid||this._animationGOFeature.showMode===_0x4e5d29.Picture?this._animationGOFeature.billboard.color=new WebGLPlot.Color(1,1,1,t):(this._animationGOFeature._symbolStyle._opacity=t,this._goFeature._symbolStyle.fillOpaqueRate<=100*(1-e)&&(this._animationGOFeature._symbolStyle.fillOpaqueRate=100*(1-e)),WebGLPlot.defined(this._goFeature._extendWallOpacity)&&this._goFeature._extendWallOpacity>=e&&(this._animationGOFeature._extendWallOpacity=e),null!==this._animationGOFeature._labels&&(this._animationGOFeature._symbolTextStyle._foreColor.alpha=t),this._animationGOFeature._initialize=!1)}resetAnimationFeature(e){this._animationGOFeature._symbolStyle.fillOpaqueRate=this._goFeature._symbolStyle.fillOpaqueRate,this._animationGOFeature._extendWallOpacity=this._goFeature._extendWallOpacity,_0x2688ba.prototype.resetAnimationFeature.call(this,e)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.showEffect=this.showEffect,e.finalDisplay=this.finalDisplay,e}fromJSONData(e){this.fromBaseJSONData(e),this.showEffect=e.showEffect,this.finalDisplay=e.finalDisplay}}Object.defineProperties(_0x43b269.prototype,{showEffect:{get:function(){return this._showEffect},set:function(e){e!=this._showEffect&&(this._showEffect=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},finalDisplay:{get:function(){return this._finalDisplay},set:function(e){e!=this._finalDisplay&&(this._finalDisplay=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x2e7c63=(_0xb28cb9=!0,function(e,t){var i=_0xb28cb9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb28cb9=!1,i}),_0x571ac9=_0x2e7c63(void 0,(function(){return _0x571ac9.toString().search("(((.+)+)+)+$").toString().constructor(_0x571ac9).search("(((.+)+)+)+$")})),_0xb28cb9;_0x571ac9();var _0x3e2f53={POLYLINE:0,CURVE:1},_0x59cef0=Object.freeze(_0x3e2f53),_0x3637c0=(_0x40f476=!0,function(e,t){var i=_0x40f476?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40f476=!1,i}),_0x38dab4=_0x3637c0(void 0,(function(){return _0x38dab4.toString().search("(((.+)+)+)+$").toString().constructor(_0x38dab4).search("(((.+)+)+)+$")})),_0x40f476;_0x38dab4();var _0x2d7530={computePositions:function(e,t,i,n,r){var o,a=e,s=n+n,l=new Float64Array(3*(r?2*s:s)),u=0,c=0,h=r?3*s:0,d=r?3*(s+n):3*n;for(o=0;o<n;o++){var f=o/n*WebGLPlot.CesiumMath.TWO_PI,p=Math.cos(f),_=Math.sin(f),m=p*i,g=_*i,x=p*t,v=_*t;l[c+h]=m,l[c+h+1]=0,l[c+h+2]=g,l[c+d]=x,l[c+d+1]=a,l[c+d+2]=v,c+=3,r&&(l[u++]=m,l[u++]=0,l[u++]=g,l[u++]=x,l[u++]=a,l[u++]=v)}return l}},_0x5e446a=(_0x4c9c2a=!0,function(e,t){var i=_0x4c9c2a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c9c2a=!1,i}),_0x33a6b0=_0x5e446a(void 0,(function(){return _0x33a6b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x33a6b0).search("(((.+)+)+)+$")})),_0x4c9c2a;_0x33a6b0();var _0x8a3d6=new WebGLPlot.Cartesian2,_0xd5c6f8=new WebGLPlot.Cartesian3,_0x46c0f7=new WebGLPlot.Cartesian3,_0x3120c1=new WebGLPlot.Cartesian3,_0x49e5ad=new WebGLPlot.Cartesian3;function _0x5f15a4(e){var t=(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),o=WebGLPlot.defaultValue(e.slices,128);if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("options.length must be defined.");if(!WebGLPlot.defined(i))throw new WebGLPlot.DeveloperError("options.topRadius must be defined.");if(!WebGLPlot.defined(n))throw new WebGLPlot.DeveloperError("options.bottomRadius must be defined.");if(o<3)throw new WebGLPlot.DeveloperError("options.slices must be greater than or equal to 3.");if(WebGLPlot.defined(e.offsetAttribute)&&e.offsetAttribute===WebGLPlot.GeometryOffsetAttribute.TOP)throw new WebGLPlot.DeveloperError("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");if(!WebGLPlot.defined(e.scene))throw new WebGLPlot.DeveloperError("scene must be defined");if(!WebGLPlot.defined(e.id)||""===e.id)throw new WebGLPlot.DeveloperError("id must be defined");this._length=t,this._topRadius=i,this._bottomRadius=n,this._vertexFormat=WebGLPlot.VertexFormat.clone(r),this._slices=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPlotCylinderGeometry",this.scene=e.scene,this.rotate=WebGLPlot.defaultValue(e.rotate,new _0x11ff81(0,0,0)),this.offsetRotate=WebGLPlot.defaultValue(e.offsetRotate,new _0x11ff81(0,0,0)),this.point=WebGLPlot.defaultValue(e.point,new _0x11ff81(0,0,0)),this.id=e.id,this.cylinderColor=WebGLPlot.defaultValue(e.color,new WebGLPlot.Color(1,0,0,.4)),this.show=WebGLPlot.defaultValue(e.show,!0),this.add2Scene()}_0x5f15a4.prototype.add2Scene=function(){this.ScaneCylinderGeometry=_0x5f15a4.createGeometry(this);var e=WebGLPlot.CesiumMath.toRadians(this.rotate.z+this.offsetRotate.z),t=WebGLPlot.CesiumMath.toRadians(this.rotate.y+this.offsetRotate.y),i=WebGLPlot.CesiumMath.toRadians(this.rotate.x+this.offsetRotate.x),n=new WebGLPlot.HeadingPitchRoll(e,t,i);const r=WebGLPlot.Cartesian3.fromDegrees(this.point.x,this.point.y,this.point.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,n);var a=new WebGLPlot.GeometryInstance({geometry:this.ScaneCylinderGeometry,modelMatrix:o,id:this.id});let s=new WebGLPlot.Primitive({geometryInstances:a,appearance:new Cesium.EllipsoidSurfaceAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this.cylinderColor})}),asynchronous:!1,show:this.show});this.CylinderPrimitive=this.scene.primitives.add(s)},_0x5f15a4.prototype.remove=function(){this.CylinderPrimitive&&(this.scene.primitives.removeAndDestroy(this.CylinderPrimitive),this.CylinderPrimitive=void 0)},_0x5f15a4.prototype.update=function(e){var t=WebGLPlot.defaultValue(e.point,new _0x11ff81(0,0,0)),i=WebGLPlot.defaultValue(e.rotate,new _0x11ff81(0,0,0));if(this.CylinderPrimitive){this.remove();var n=WebGLPlot.CesiumMath.toRadians(i.z+this.offsetRotate.z),r=WebGLPlot.CesiumMath.toRadians(i.y+this.offsetRotate.y),o=WebGLPlot.CesiumMath.toRadians(i.x+this.offsetRotate.x),a=new WebGLPlot.HeadingPitchRoll(n,r,o);const e=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z),l=WebGLPlot.Transforms.headingPitchRollToFixedFrame(e,a);var s=new WebGLPlot.GeometryInstance({geometry:this.ScaneCylinderGeometry,modelMatrix:l,id:this.id});let u=new WebGLPlot.Primitive({geometryInstances:s,appearance:new Cesium.EllipsoidSurfaceAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this.cylinderColor})}),asynchronous:!1,show:this.show});this.CylinderPrimitive=this.scene.primitives.add(u)}},_0x5f15a4.prototype.setVisible=function(e){this.CylinderPrimitive&&(this.show=e,this.CylinderPrimitive.show=e)},_0x5f15a4.prototype.setColor=function(e){this.CylinderPrimitive&&e instanceof WebGLPlot.Color&&(this.cylinderColor=e,this.CylinderPrimitive.appearance.material=WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:e}))},_0x5f15a4.packedLength=WebGLPlot.VertexFormat.packedLength+5,_0x5f15a4.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.VertexFormat.pack(e._vertexFormat,t,i),i+=WebGLPlot.VertexFormat.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x18338e=new WebGLPlot.VertexFormat,_0x36af21={vertexFormat:_0x18338e,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0},_0x3a30a1;_0x5f15a4.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.VertexFormat.unpack(e,t,_0x18338e);t+=WebGLPlot.VertexFormat.packedLength;var r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return WebGLPlot.defined(i)?(i._vertexFormat=WebGLPlot.VertexFormat.clone(n,i._vertexFormat),i._length=r,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._offsetAttribute=-1===l?void 0:l,i):(_0x36af21.length=r,_0x36af21.topRadius=o,_0x36af21.bottomRadius=a,_0x36af21.slices=s,_0x36af21.offsetAttribute=-1===l?void 0:l,new _0x5f15a4(_0x36af21))},_0x5f15a4.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._vertexFormat,o=e._slices;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=o+o,l=o+s,u=s+s,c=_0x2d7530.computePositions(t,i,n,o,!0),h=r.st?new Float32Array(2*u):void 0,d=r.normal?new Float32Array(3*u):void 0,f=r.tangent?new Float32Array(3*u):void 0,p=r.bitangent?new Float32Array(3*u):void 0,_=r.normal||r.tangent||r.bitangent;if(_){var m=r.tangent||r.bitangent,g=0,x=0,v=0,y=Math.atan2(n-i,t),$=_0xd5c6f8;$.z=Math.sin(y);var b=Math.cos(y),T=_0x3120c1,C=_0x46c0f7;for(a=0;a<o;a++){var S=a/o*WebGLPlot.CesiumMath.TWO_PI,w=b*Math.cos(S),E=b*Math.sin(S);_&&($.x=w,$.y=E,m&&(T=WebGLPlot.Cartesian3.normalize(WebGLPlot.Cartesian3.cross(WebGLPlot.Cartesian3.UNIT_Z,$,T),T)),r.normal&&(d[g++]=$.x,d[g++]=$.y,d[g++]=$.z,d[g++]=$.x,d[g++]=$.y,d[g++]=$.z),r.tangent&&(f[x++]=T.x,f[x++]=T.y,f[x++]=T.z,f[x++]=T.x,f[x++]=T.y,f[x++]=T.z),r.bitangent&&(C=WebGLPlot.Cartesian3.normalize(WebGLPlot.Cartesian3.cross($,T,C),C),p[v++]=C.x,p[v++]=C.y,p[v++]=C.z,p[v++]=C.x,p[v++]=C.y,p[v++]=C.z))}for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=-1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[v++]=0,p[v++]=-1,p[v++]=0);for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[v++]=0,p[v++]=1,p[v++]=0)}var P=12*o-12,A=WebGLPlot.IndexDatatype.createTypedArray(u,P),L=0,M=0;for(a=0;a<o-1;a++)A[L++]=M,A[L++]=M+2,A[L++]=M+3,A[L++]=M,A[L++]=M+3,A[L++]=M+1,M+=2;for(A[L++]=s-2,A[L++]=0,A[L++]=1,A[L++]=s-2,A[L++]=1,A[L++]=s-1,a=1;a<o-1;a++)A[L++]=s+a+1,A[L++]=s+a,A[L++]=s;for(a=1;a<o-1;a++)A[L++]=l,A[L++]=l+a,A[L++]=l+a+1;var R=0;if(r.st){var O=Math.max(i,n);for(a=0;a<u;a++){var I=WebGLPlot.Cartesian3.fromArray(c,3*a,_0x49e5ad);h[R++]=(I.x+O)/(2*O),h[R++]=(I.y+O)/(2*O)}}var D=new WebGLPlot.GeometryAttributes;r.position&&(D.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c})),r.normal&&(D.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.tangent&&(D.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:f})),r.bitangent&&(D.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),r.st&&(D.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:h})),_0x8a3d6.x=.5*t,_0x8a3d6.y=Math.max(n,i);var B=new WebGLPlot.BoundingSphere(WebGLPlot.Cartesian3.ZERO,WebGLPlot.Cartesian2.magnitude(_0x8a3d6));if(WebGLPlot.defined(e._offsetAttribute)){t=c.length;var N=new Uint8Array(t/3),F=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(N,F),D.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:N})}return new WebGLPlot.Geometry({attributes:D,indices:A,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:B,offsetAttribute:e._offsetAttribute})}},_0x5f15a4.getUnitCylinder=function(){return WebGLPlot.defined(_0x3a30a1)||(_0x3a30a1=_0x5f15a4.createGeometry(new _0x5f15a4({topRadius:1,bottomRadius:1,length:1,vertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY}))),_0x3a30a1};const _0x5c198a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x384d7c=_0x5c198a(void 0,(function(){return _0x384d7c.toString().search("(((.+)+)+)+$").toString().constructor(_0x384d7c).search("(((.+)+)+)+$")}));function _0x4c5a2b(e){this.lineWidth=1,this.lineColor=new WebGLPlot.Color(1,0,0,1),this._scaneRegion_ShapePts=[],this.id=e.id,this.scene=e.scene}_0x384d7c(),_0x4c5a2b.prototype.createScaneCylinder=function(e){if(this.ScaneCylinder)return!1;this.point=WebGLPlot.defaultValue(e.point,new _0x11ff81(0,0,0));var t=WebGLPlot.defaultValue(e.length,100),i=WebGLPlot.defaultValue(e.radius,30),n=WebGLPlot.defaultValue(e.rotate,new _0x11ff81(0,0,0)),r=WebGLPlot.defaultValue(e.offsetRotate,new _0x11ff81(0,0,0));let o=WebGLPlot.defaultValue(e.color,new WebGLPlot.Color(1,0,0,.4));var a=WebGLPlot.defaultValue(e.showScane,!1);return this.ScaneCylinder=new _0x5f15a4({length:t,topRadius:i,bottomRadius:0,scene:this.scene,point:this.point,rotate:n,offsetRotate:r,id:this.id,show:a,color:o}),!0},_0x4c5a2b.prototype.updateScaneCylinder=function(e){this.ScaneCylinder&&this.ScaneCylinder.update(e)},_0x4c5a2b.prototype.setScaneCylinderColor=function(e){this.ScaneCylinder&&e instanceof WebGLPlot.Color&&this.ScaneCylinder.setColor(e)},_0x4c5a2b.prototype.setScaneCylinderVisible=function(e){this.ScaneCylinder&&this.ScaneCylinder.setVisible(e)},_0x4c5a2b.prototype.removeScaneCylinder=function(){this.ScaneCylinder&&(this.ScaneCylinder.remove(),this.ScaneCylinder=void 0)},_0x4c5a2b.prototype.scaneCylinder2JSONData=function(e){return this.ScaneCylinder&&(e.scaneCylinder_length=this.ScaneCylinder._length,e.scaneCylinder_radius=this.ScaneCylinder._topRadius,e.scaneCylinder_point=this.ScaneCylinder.point,e.scaneCylinder_show=this.ScaneCylinder.show,e.scaneCylinder_cylinderColor=this.ScaneCylinder.cylinderColor,e.scaneCylinder_rotate=this.ScaneCylinder.rotate,e.scaneCylinder_offsetRotate=this.ScaneCylinder.offsetRotate,e.scaneCylinder_id=this.ScaneCylinder.id),e},_0x4c5a2b.prototype.scaneCylinderFromJSONData=function(e){if(this.ScaneCylinder=void 0,e){let t=e.scaneCylinder_length,i=e.scaneCylinder_radius,n=e.scaneCylinder_rotate,r=e.scaneCylinder_offsetRotate;this.point=e.scaneCylinder_point,this.id=e.scaneCylinder_id;let o=e.scaneCylinder_cylinderColor,a=e.scaneCylinder_show;this.ScaneCylinder=new _0x5f15a4({length:t,topRadius:i,bottomRadius:0,scene:this.scene,point:this.point,rotate:n,offsetRotate:r,id:this.id,show:a,color:o})}};var _0x5c8a3f=(_0x27f2cf=!0,function(e,t){var i=_0x27f2cf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27f2cf=!1,i}),_0x438782=_0x5c8a3f(void 0,(function(){return _0x438782.toString().search("(((.+)+)+)+$").toString().constructor(_0x438782).search("(((.+)+)+)+$")})),_0x27f2cf;_0x438782();var _0x12833f={EAST:0,WEST:1,SOUTH:2,NORTH:3,EAST_NORTH:4,WEST_NORTH:5,EAST_SOUTH:6,WEST_SOUTH:7,UP:8},_0x178a11=Object.freeze(_0x12833f),_0x51504e=(_0x5b5498=!0,function(e,t){var i=_0x5b5498?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b5498=!1,i}),_0xcfd1e=_0x51504e(void 0,(function(){return _0xcfd1e.toString().search("(((.+)+)+)+$").toString().constructor(_0xcfd1e).search("(((.+)+)+)+$")})),_0x5b5498;_0xcfd1e();class _0x381298 extends _0x2688ba{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._showPath=WebGLPlot.defaultValue(e.showPath,!1),this._tangentDirection=WebGLPlot.defaultValue(e.tangentDirection,!1),this._pathWidth=WebGLPlot.defaultValue(e.pathWidth,.5),this._pathColor=WebGLPlot.defaultValue(e.pathColor,new WebGLPlot.Color(1,0,0,1)),this._currentPt=WebGLPlot.defaultValue(e.currentPt,null),this._pathType=WebGLPlot.defaultValue(e.pathType,_0x59cef0.POLYLINE),this._wayPoints=WebGLPlot.defaultValue(e.wayPoints,[]),this._shapePoints=WebGLPlot.defaultValue(e.shapePoints,[]),this._pathFeature=WebGLPlot.defaultValue(e.pathFeature,null),this._pathLength=WebGLPlot.defaultValue(e.pathLength,0),this.dynamicScane=void 0,this._showScane=!0,this._scaneColor=new WebGLPlot.Color(1,0,0,.4),this._rotateOffset=new _0x11ff81(0,0,0)}execute(){if(!_0x2d6822.isSymbolDot(this._animationGOFeature._symbolType))return null!==this._pathFeature&&0!==this._pathFeature._positions.length&&(this._pathFeature.show=!1),!1;if(!this.canExecute())return!1;this._showPath&&this._pathFeature&&!this._pathFeature._show&&(this._pathFeature.show=!0);var e=this._ratio,t=new Object;t=this._findPos(e,this._shapePoints,t),this._animationGOFeature.localPoints=[this.PtsToSpherical(t.pt)];var i=t.index;if(this._tangentDirection){t.angle;var n=this.modifyAnimationFollowPath(this._shapePoints,i,t.pt),r=57.29577951308232,o=this._animationGOFeature._showMode,a=new _0x11ff81(n.x*r,n.y*r,n.z*r);(0!==this.rotateOffset.x||0!==this.rotateOffset.y||0!==this.rotateOffset.z)&&(a.x+=this.rotateOffset.x,a.y+=this.rotateOffset.y,a.z+=this.rotateOffset.z),_0x4e5d29.Marker===o?this._animationGOFeature._modelRotate=a:_0x4e5d29.Vector===o&&(this._animationGOFeature.vectorRotate=n),this.updateScane(this.PtsToSpherical(t.pt),a)}return this.updateCameraFollow(e),!0}modifyAnimationFollowPath(e,t,i){if(this._tangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot.Cartesian3;u=WebGLPlot.Cartesian3.subtract(l[0],a,u),u=WebGLPlot.Cartesian3.normalize(u,u);var c=new WebGLPlot.Cartesian3;c=WebGLPlot.Cartesian3.subtract(s,a,c),c=WebGLPlot.Cartesian3.normalize(c,c);var h=new WebGLPlot.Cartesian3;h=WebGLPlot.Cartesian3.cross(c,u,h),h=WebGLPlot.Cartesian3.normalize(h,h);var d=new WebGLPlot.Cartesian3;d=WebGLPlot.Cartesian3.cross(h,c,d),d=WebGLPlot.Cartesian3.normalize(d,d),c=new WebGLPlot.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),h=WebGLPlot.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),c=WebGLPlot.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),d=WebGLPlot.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot.Cartesian3(p,_,m)}}FromAngleAxis(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x11ff81(r*i.x,r*i.y,r*i.z),s=new _0x11ff81;s=WebGLPlot.Cartesian3.cross(a,e,s);var l=new _0x11ff81;l=WebGLPlot.Cartesian3.cross(a,s,l);var u=new _0x11ff81(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x11ff81(2*l.x,2*l.y,2*l.z);return new _0x11ff81(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)}ToEulerAnglesXYZ(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x11ff81(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x11ff81((n=0)-Math.atan2(t.x,t.y),r,n):new _0x11ff81(Math.atan2(t.x,t.y)-(n=0),r,n)}resetAnimationFeature(e){if(_0x2688ba.prototype.resetAnimationFeature.call(this,e),this._animationGOFeature._rotate=this._goFeature._rotate,this._animationGOFeature._modelRotate=this._goFeature._modelRotate,this._animationGOFeature.vectorRotate=this._goFeature.vectorRotate,this.wayPoints.length>=2){var t=[this.wayPoints[0].clone()];this._animationGOFeature.localPoints=t}else{t=[this._goFeature.localPoints[0].clone()];this._animationGOFeature.localPoints=t}e&&(null===this._pathFeature||0===this._pathFeature._positions.length||null===this._shapePoints)&&(this._makePath(),this._pathColor,this._pathWidth),null!==this._pathFeature&&(this._pathFeature.show=!1),void 0===this.dynamicScane?this.dynamicScane=new _0x4c5a2b({id:this._animationGOFeature.id,scene:this._animationManager._scene}):(this.showScane=e,this.updateScane(this._animationGOFeature._localPoints[0],this._animationGOFeature._rotate))}_makePath(){if(null===this._wayPoints||2>this._wayPoints.length)return!1;null===this._pathFeature&&(this.compuetWayPos(),this._pathFeature=_0x38860f.addAlgoPloyline(null,this.createPathLine(this._shapePoints),this._animationManager._scene)),this._pathLength=0;for(var e=1;e<this._shapePoints.length;e++)this._pathLength+=_0x2d6822.distance(this._shapePoints[e-1],this._shapePoints[e]);return this._pathFeature}_findPos(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLength)).result)return!1;var n=i.pt;return this._tangentDirection&&(i.angle=_0x2d6822.radian(n,t[i.index])/Math.PI*180),i}PtsToSpherical(e){var t=this._animationManager._scene.globe.ellipsoid,i=new WebGLPlot.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot.CesiumMath.toDegrees(n.latitude);return new _0x11ff81(WebGLPlot.CesiumMath.toDegrees(n.longitude),r,n.height)}getGOAnimationType(){return _0x304306.ANIMATION_WAY}setShowPath(e){this._showPath=e}setWayPoints(e){if(!e||!Array.isArray(e)||2>e.length)return!1;this._wayPoints=[],this._wayPoints=e,null!==this._pathFeature&&(this.compuetWayPos(),this._pathFeature.positions=this._shapePoints)}getWayPoints(){return this._wayPoints}getCurrentPt(){return this._currentPt}setPathColor(e){!e||(this._pathColor=e,this.pathFeature&&null!==this.pathFeature&&(this.pathFeature.options.color=this.pathColor,this.pathFeature.setStyle(this.pathFeature.options)))}getPathColor(){return this._pathColor}setPathWidth(e){!e||(this.pathWidth=e,this._pathFeature&&null!==this.pathWidth&&(this._pathFeature.width=this.pathWidth))}getPathWidth(){return this._pathWidth}setPathType(e){null!=e&&this.pathType!==e&&(this.pathType=e,null!==this.pathFeature&&(this.pathFeature.destroy(),this.pathFeature=null))}getPathType(){return this._pathType}generateBeizerPointsNoCtrlPt(e){return _0x2d6822.generateBeizerPointsNoCtrlPt(e)}createPathLine(e){return this._pathWidth<=0&&(this._pathWidth=.5),{width:this._pathWidth,positions:e,material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this._pathColor}),id:this._animationGOFeature._id+"_Path",show:!1}}getPtsIndexByDistance(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x2d6822.distance(e[o],e[o+1]))>=t){var a=_0x2d6822.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x11ff81(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n}compuetWayPos(){this._pathType===_0x59cef0.POLYLINE?this._shapePoints=this._wayPoints:this._shapePoints=this.generateBeizerPointsNoCtrlPt(this._wayPoints);for(var e=[],t=0;t<this._shapePoints.length;t++){var i=this._shapePoints[t];e.push(i.x),e.push(i.y),e.push(i.z)}this._shapePoints=WebGLPlot.Cartesian3.fromDegreesArrayHeights(e)}getJSONData(){var e=this.getBaseJSONData();e.type=this.getGOAnimationType(),e.showPath=this.showPath,e.tangentDirection=this.tangentDirection,e.pathType=this.pathType,e.pathWidth=this.pathWidth,e.pathColor=this._colorFormat(this.pathColor),e.wayPoints=[];for(var t=0;t<this.wayPoints.length;t++)e.wayPoints.push({x:this.wayPoints[t].x,y:this.wayPoints[t].y,z:this.wayPoints[t].z});return this.dynamicScane&&(e=this.dynamicScane.scaneCylinder2JSONData(e)),e}fromJSONData(e){this.fromBaseJSONData(e),this.showPath=e.showPath,this.tangentDirection=e.tangentDirection,this.pathType=e.pathType,this.pathWidth=e.pathWidth,this.pathColor=this._serverColorToColor(e.pathColor);for(var t=[],i=0;i<e.wayPoints.length;i++)t.push(new _0x11ff81(e.wayPoints[i].x,e.wayPoints[i].y,e.wayPoints[i].z));this.dynamicScane&&e.scaneCylinder_id&&this.dynamicScane.scaneCylinderFromJSONData(e),this.setWayPoints(t)}createScane(e){e.showScane=this.showScane,e.point=this._animationGOFeature._localPoints[0].clone(),e.color?this.scaneColor=e.color:e.color=this.scaneColor,e.id=this._animationGOFeature.id,this.dynamicScane.createScaneCylinder(e)}updateScane(e,t){if(this.dynamicScane){var i={point:e,rotate:t};this.dynamicScane.updateScaneCylinder(i)}}setScaneVisible(e){this.dynamicScane&&this.dynamicScane.setScaneCylinderVisible(e)}setScaneColor(e){this.dynamicScane&&this.dynamicScane.setScaneCylinderColor(e)}removeScane(){this.dynamicScane&&this.dynamicScane.removeScaneCylinder()}setCameraFollow(e,t,i,n){if(this.isFollow=e,this._wayPoints.length<=0||!this.isFollow)return!1;null===this._pathFeature&&this._shapePoints.length<=0&&(this._makePath(),this._pathFeature.show=!1);const r=Math.PI/180,o=n/i,a=-Math.asin(o);let s=null;switch(this.CameraOrientation=null,t){case _0x178a11.EAST:s=new Cesium.Cartesian3(0,-1,o),this.CameraOrientation={heading:-90*r,pitch:a,roll:0};break;case _0x178a11.WEST:s=new Cesium.Cartesian3(0,1,o),this.CameraOrientation={heading:90*r,pitch:a,roll:0};break;case _0x178a11.SOUTH:s=new Cesium.Cartesian3(-1,0,o),this.CameraOrientation={heading:0,pitch:a,roll:0};break;case _0x178a11.NORTH:s=new Cesium.Cartesian3(1,0,o),this.CameraOrientation={heading:180*r,pitch:a,roll:0};break;case _0x178a11.EAST_NORTH:s=new Cesium.Cartesian3(1,-1,o),this.CameraOrientation={heading:225*r,pitch:a,roll:0};break;case _0x178a11.WEST_NORTH:s=new Cesium.Cartesian3(1,1,o),this.CameraOrientation={heading:135*r,pitch:a,roll:0};break;case _0x178a11.EAST_SOUTH:s=new Cesium.Cartesian3(-1,-1,o),this.CameraOrientation={heading:-45*r,pitch:a,roll:0};break;case _0x178a11.WEST_SOUTH:s=new Cesium.Cartesian3(-1,1,o),this.CameraOrientation={heading:45*r,pitch:a,roll:0};break;case _0x178a11.UP:s=new Cesium.Cartesian3(0,0,1),this.CameraOrientation={heading:0*r,pitch:-Math.PI/2,roll:0}}const l=this._shapePoints[0],u=_0x2d6822.computeMatrix2(l,new Cesium.Cartesian3(0,0,0));let c=_0x2d6822.localPtsToCartesian(s,u,i).position,h=new _0x11ff81(c.x-l.x,c.y-l.y,c.z-l.z);this.followShapePoints=[];for(let e=0;e<this._shapePoints.length;e++){const t=this._shapePoints[e];this.followShapePoints.push(new _0x11ff81(t.x+h.x,t.y+h.y,t.z+h.z))}}updateCameraFollow(e){if(!this.isFollow)return;let t=new Object,i=this._findPos(e,this.followShapePoints,t).pt;this._animationManager._scene.camera.setView({destination:i,orientation:this.CameraOrientation})}}Object.defineProperties(_0x381298.prototype,{showPath:{get:function(){return this._showPath},set:function(e){e!=this._showPath&&(this._showPath=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},tangentDirection:{get:function(){return this._tangentDirection},set:function(e){e!=this._tangentDirection&&(this._tangentDirection=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathType:{get:function(){return this._pathType},set:function(e){e!=this._pathType&&(this._pathType=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathWidth:{get:function(){return this._pathWidth},set:function(e){e==this._pathWidth||e<=0||(this._pathWidth=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathColor:{get:function(){return this._pathColor},set:function(e){e==this._pathColor||!(e instanceof WebGLPlot.Color)||(this._pathColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},wayPoints:{get:function(){return this._wayPoints},set:function(e){e!==this._wayPoints&&(this._wayPoints=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},showScane:{get:function(){return this._showScane},set:function(e){e!=this._showScane&&(this._showScane=e,this.dynamicScane&&this.dynamicScane.setScaneCylinderVisible(e),_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},scaneColor:{get:function(){return this._scaneColor},set:function(e){e!=this._scaneColor&&(this._scaneColor=e,this.dynamicScane&&this.dynamicScane.setScaneCylinderColor(e),_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},rotateOffset:{get:function(){return this._rotateOffset},set:function(e){e!=this._rotateOffset&&(this._rotateOffset=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x37a83a=(_0x19c762=!0,function(e,t){var i=_0x19c762?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19c762=!1,i}),_0x4b8415=_0x37a83a(void 0,(function(){return _0x4b8415.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b8415).search("(((.+)+)+)+$")})),_0x19c762;_0x4b8415();class _0x1c2b25 extends _0x2688ba{constructor(e){super(e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT)),this._showPath=WebGLPlot$f.defaultValue(e.showPath,!1),this._tangentDirection=WebGLPlot$f.defaultValue(e.tangentDirection,!1),this._pathWidth=WebGLPlot$f.defaultValue(e.pathWidth,.5),this._pathColor=WebGLPlot$f.defaultValue(e.pathColor,new WebGLPlot$f.Color(1,0,0,1)),this._currentPt=WebGLPlot$f.defaultValue(e.currentPt,null),this._pathType=WebGLPlot$f.defaultValue(e.pathType,_0x59cef0.POLYLINE),this._wayPoints=WebGLPlot$f.defaultValue(e.wayPoints,[]),this.shapePointsArray=WebGLPlot$f.defaultValue(e.shapePoints,[]),this._pathFeature=WebGLPlot$f.defaultValue(e.pathFeature,null),this._pathLength=WebGLPlot$f.defaultValue(e.pathLength,0),this._scane_ShapePts=[],this.showScane=!0,this._rotateOffset=new _0x11ff81(0,0,0)}execute(){if(!this.canExecute())return!1;if(this._showPath&&this._pathFeature&&!this._pathFeature._show&&(this._pathFeature.show=!0),this.animationGOFeatures.length>0)for(let e=0;e<this.animationGOFeatures.length;e++){const t=this.shapePointsArray[e];this.execute2(this.animationGOFeatures[e],t)}}execute2(e,t){if(!_0x2d6822.isSymbolDot(e._symbolType))return!1;var i=this._ratio,n=new Object;n=this._findPos(i,t,n),e.localPoints=[this.PtsToSpherical(n.pt)];var r=n.index;if(this._tangentDirection){n.angle;var o=this.modifyAnimationFollowPath(t,r,n.pt),a=57.29577951308232,s=e._showMode,l=new _0x11ff81(o.x*a,o.y*a,o.z*a);_0x4e5d29.Marker===s?e._modelRotate=l:_0x4e5d29.Vector===s&&(e.vectorRotate=o)}return this.updateCameraFollow(i),!0}modifyAnimationFollowPath(e,t,i){if(this._tangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot$f.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot$f.Cartesian3;u=WebGLPlot$f.Cartesian3.subtract(l[0],a,u),u=WebGLPlot$f.Cartesian3.normalize(u,u);var c=new WebGLPlot$f.Cartesian3;c=WebGLPlot$f.Cartesian3.subtract(s,a,c),c=WebGLPlot$f.Cartesian3.normalize(c,c);var h=new WebGLPlot$f.Cartesian3;h=WebGLPlot$f.Cartesian3.cross(c,u,h),h=WebGLPlot$f.Cartesian3.normalize(h,h);var d=new WebGLPlot$f.Cartesian3;d=WebGLPlot$f.Cartesian3.cross(h,c,d),d=WebGLPlot$f.Cartesian3.normalize(d,d),c=new WebGLPlot$f.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot$f.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot$f.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot$f.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot$f.Cartesian3(1,0,0)),h=WebGLPlot$f.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot$f.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot$f.Cartesian3(1,0,0)),c=WebGLPlot$f.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot$f.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot$f.Cartesian3(1,0,0)),d=WebGLPlot$f.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot$f.Cartesian3(p,_,m)}}FromAngleAxis(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x11ff81(r*i.x,r*i.y,r*i.z),s=new _0x11ff81;s=WebGLPlot$f.Cartesian3.cross(a,e,s);var l=new _0x11ff81;l=WebGLPlot$f.Cartesian3.cross(a,s,l);var u=new _0x11ff81(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x11ff81(2*l.x,2*l.y,2*l.z);return new _0x11ff81(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)}ToEulerAnglesXYZ(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x11ff81(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x11ff81((n=0)-Math.atan2(t.x,t.y),r,n):new _0x11ff81(Math.atan2(t.x,t.y)-(n=0),r,n)}_makePath(){if(null===this._wayPoints||2>this._wayPoints.length)return!1;null===this._pathFeature&&(this.compuetWayPos(),this._pathFeature=_0x38860f.addAlgoPloyline(null,this.createPathLine(this.shapePointsArray[0]))),this._pathLength=0;for(var e=1;e<this.shapePointsArray[0].length;e++)this._pathLength+=_0x2d6822.distance(this.shapePointsArray[0][e-1],this.shapePointsArray[0][e]);return this._pathFeature}_findPos(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLength)).result)return!1;var n=i.pt;return this._tangentDirection&&(i.angle=_0x2d6822.radian(n,t[i.index])/Math.PI*180),i}PtsToSpherical(e){var t=_0x1713d3.getInstance({scene:this._scene})._scene.globe.ellipsoid,i=new WebGLPlot$f.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot$f.CesiumMath.toDegrees(n.latitude);return new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(n.longitude),r,n.height)}getGOAnimationType(){return _0x304306.ANIMATION_WAY}setShowPath(e){this._showPath=e}setWayPoints(e){if(!e||!Array.isArray(e)||2>e.length)return!1;this._wayPoints=[],this._wayPoints=e,null!==this._pathFeature&&(this.compuetWayPos(),this._pathFeature._positions=this.shapePointsArray[0])}getWayPoints(){return this._wayPoints}getCurrentPt(){return this._currentPt}setPathColor(e){!e||(this._pathColor=e,this.pathFeature&&null!==this.pathFeature&&(this.pathFeature.options.color=this.pathColor,this.pathFeature.setStyle(this.pathFeature.options)))}getPathColor(){return this._pathColor}setPathWidth(e){!e||(this.pathWidth=e,this.pathFeature&&null!==this.pathWidth&&(this.pathFeature.options.weight=this.pathWidth,this.pathFeature.setStyle(this.pathFeature.options)))}getPathWidth(){return this._pathWidth}setPathType(e){null!=e&&this.pathType!==e&&(this.pathType=e,null!==this.pathFeature&&(this.pathFeature.destroy(),this.pathFeature=null))}getPathType(){return this._pathType}generateBeizerPointsNoCtrlPt(e){return _0x2d6822.generateBeizerPointsNoCtrlPt(e)}createPathLine(e){return this._pathWidth<=0&&(this._pathWidth=.5),{width:this._pathWidth,positions:e,material:WebGLPlot$f.Material.fromType(WebGLPlot$f.Material.ColorType,{color:this._pathColor}),id:this.animationGOFeatures[0]._id+"_Path",show:!1}}getPtsIndexByDistance(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x2d6822.distance(e[o],e[o+1]))>=t){var a=_0x2d6822.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x11ff81(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n}compuetWayPos(){let e=[];e=this._pathType===_0x59cef0.POLYLINE?this._wayPoints:this.generateBeizerPointsNoCtrlPt(this._wayPoints),this.shapePointsArray=[];for(let r=0;r<this.offsetPt.length;r++){const o=this.offsetPt[r];for(var t=[],i=0;i<e.length;i++){var n=e[i];t.push(n.x+o.x),t.push(n.y+o.y),t.push(n.z+o.z)}this.shapePointsArray.push(WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(t))}}getJSONData(){var e=this.getBaseJSONData();e.type=this.getGOAnimationType(),e.showPath=this.showPath,e.tangentDirection=this.tangentDirection,e.pathType=this.pathType,e.pathWidth=this.pathWidth,e.pathColor=this._colorFormat(this.pathColor),e.wayPoints=[];for(var t=0;t<this.wayPoints.length;t++)e.wayPoints.push({x:this.wayPoints[t].x,y:this.wayPoints[t].y,z:this.wayPoints[t].z});return e}fromJSONData(e){this.fromBaseJSONData(e),this.showPath=e.showPath,this.tangentDirection=e.tangentDirection,this.pathType=e.pathType,this.pathWidth=e.pathWidth,this.pathColor=this._serverColorToColor(e.pathColor);for(var t=[],i=0;i<e.wayPoints.length;i++)t.push(new _0x11ff81(e.wayPoints[i].x,e.wayPoints[i].y,e.wayPoints[i].z));this.setWayPoints(t)}createScane(e){e.showScane=this.showScane,this.dynamicScane.createScaneCone(e)}updateScane(e,t){var i={point:e,rotate:t,showScane:this.showScane};this.dynamicScane.updateScaneCone(i)}setGOFeatures(e,t){if(void 0===t||t.length<=0||null===e._goAnimationLayer)return!1;this._animationManager=e,this._goFeatures=t;const i=t[0].localPoints[0].clone();return this.offsetPt=[],this.animationGOFeatures=[],t.map((t=>{const n=t.localPoints[0].clone(),r=new _0x11ff81(n.x-i.x,n.y-i.y,n.z-i.z);this.offsetPt.push(r);let o=this.createAnimationGOFeature(t);o._layer=e._goAnimationLayer,this.animationGOFeatures.push(o)})),!(this.animationGOFeatures.length<=0)&&(e._goAnimationLayer.addFeatures(this.animationGOFeatures),this.showAnimationFeature(!1),!0)}createAnimationGOFeature(e){for(var t=0;t<this._animationManager._goAnimations.length;t++){var i=this._animationManager._goAnimations[t];if(i._goFeature.id===e.id)return i._animationGOFeature}let n=e.clone();return n._id+=this._name,n._isEdit=!0,n._valid=!1,n._isAnimationFeature=!0,n}showAnimationFeature(e){this.resetAnimationFeature(e)}resetAnimationFeature(e){if(this.animationGOFeatures.length>0&&this._goFeatures.length>0)for(let i=0;i<this._goFeatures.length;i++){let n=this._goFeatures[i];n.display=!e,n._initialize=!1;let r=this.animationGOFeatures[i];r.display=e,r._initialize=!1,r._rotate=n._rotate,r._modelRotate=n._modelRotate,r.vectorRotate=n.vectorRotate;var t=n._localPoints[0].clone();r._localPoints=[t]}e&&(null===this._pathFeature||0===this._pathFeature._positions.length||0===this.shapePointsArray.length)&&(this._makePath(),this._pathColor,this._pathWidth),null!==this._pathFeature&&(this._pathFeature.show=!1)}setCameraFollow(e,t,i,n){if(this.isFollow=e,this._wayPoints.length<=0||!this.isFollow)return!1;null===this._pathFeature&&this.shapePointsArray[0].length<=0&&(this._makePath(),this._pathFeature.show=!1);const r=Math.PI/180,o=n/i,a=-Math.asin(o);let s=null;switch(this.CameraOrientation=null,t){case _0x178a11.EAST:s=new Cesium.Cartesian3(0,-1,o),this.CameraOrientation={heading:-90*r,pitch:a,roll:0};break;case _0x178a11.WEST:s=new Cesium.Cartesian3(0,1,o),this.CameraOrientation={heading:90*r,pitch:a,roll:0};break;case _0x178a11.SOUTH:s=new Cesium.Cartesian3(-1,0,o),this.CameraOrientation={heading:0,pitch:a,roll:0};break;case _0x178a11.NORTH:s=new Cesium.Cartesian3(1,0,o),this.CameraOrientation={heading:180*r,pitch:a,roll:0};break;case _0x178a11.EAST_NORTH:s=new Cesium.Cartesian3(1,-1,o),this.CameraOrientation={heading:225*r,pitch:a,roll:0};break;case _0x178a11.WEST_NORTH:s=new Cesium.Cartesian3(1,1,o),this.CameraOrientation={heading:135*r,pitch:a,roll:0};break;case _0x178a11.EAST_SOUTH:s=new Cesium.Cartesian3(-1,-1,o),this.CameraOrientation={heading:-45*r,pitch:a,roll:0};break;case _0x178a11.WEST_SOUTH:s=new Cesium.Cartesian3(-1,1,o),this.CameraOrientation={heading:45*r,pitch:a,roll:0};break;case _0x178a11.UP:s=new Cesium.Cartesian3(0,0,1),this.CameraOrientation={heading:0*r,pitch:-Math.PI/2,roll:0}}const l=this.shapePointsArray[0][0],u=_0x2d6822.computeMatrix2(l,new Cesium.Cartesian3(0,0,0));let c=_0x2d6822.localPtsToCartesian(s,u,i).position,h=new _0x11ff81(c.x-l.x,c.y-l.y,c.z-l.z);this.followShapePoints=[];for(let e=0;e<this.shapePointsArray[0].length;e++){const t=this.shapePointsArray[0][e];this.followShapePoints.push(new _0x11ff81(t.x+h.x,t.y+h.y,t.z+h.z))}}updateCameraFollow(e){if(!this.isFollow)return;let t=new Object,i=this._findPos(e,this.followShapePoints,t).pt;this._animationManager._scene.camera.setView({destination:i,orientation:this.CameraOrientation})}}Object.defineProperties(_0x1c2b25.prototype,{showPath:{get:function(){return this._showPath},set:function(e){e!=this._showPath&&(this._showPath=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},tangentDirection:{get:function(){return this._tangentDirection},set:function(e){e!=this._tangentDirection&&(this._tangentDirection=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathType:{get:function(){return this._pathType},set:function(e){e!=this._pathType&&(this._pathType=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathWidth:{get:function(){return this._pathWidth},set:function(e){e==this._pathWidth||e<=0||(this._pathWidth=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathColor:{get:function(){return this._pathColor},set:function(e){e!=this._pathColor&&(this._pathColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},wayPoints:{get:function(){return this._wayPoints},set:function(e){e!==this._wayPoints&&(this._wayPoints=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},showScane:{get:function(){return this._showScane},set:function(e){e!=this._showScane&&(this._showScane=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},rotateOffset:{get:function(){return this._rotateOffset},set:function(e){e!=this._rotateOffset&&(this._rotateOffset=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x4ec9aa=(_0xcef365=!0,function(e,t){var i=_0xcef365?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xcef365=!1,i}),_0x4c758d=_0x4ec9aa(void 0,(function(){return _0x4c758d.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c758d).search("(((.+)+)+)+$")})),_0xcef365;_0x4c758d();class _0x45edd9 extends _0x2688ba{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._lineColorAnimation=WebGLPlot.defaultValue(e.lineColorAnimation,!1),this._startLineColor=WebGLPlot.defaultValue(e.startLineColor,new WebGLPlot.Color(1,0,0,1)),this._endLineColor=WebGLPlot.defaultValue(e.endLineColor,new WebGLPlot.Color(0,0,1,1)),this._lineWidthAnimation=WebGLPlot.defaultValue(e.lineWidthAnimation,!1),this._startLineWidth=WebGLPlot.defaultValue(e.startLineWidth,0),this._endLineWidth=WebGLPlot.defaultValue(e.endLineWidth,5),this._surroundLineColorAnimation=WebGLPlot.defaultValue(e.surroundLineColorAnimation,!1),this._startSurroundLineColor=WebGLPlot.defaultValue(e.startSurroundLineColor,new WebGLPlot.Color(1,1,0,1)),this._endSurroundLineColor=WebGLPlot.defaultValue(e.endSurroundLineColor,new WebGLPlot.Color(0,1,1,1)),this._surroundLineWidthAnimation=WebGLPlot.defaultValue(e.surroundLineWidthAnimation,!1),this._startSurroundLineWidth=WebGLPlot.defaultValue(e.startSurroundLineWidth,0),this._endSurroundLineWidth=WebGLPlot.defaultValue(e.endtSurroundLineWidth,1)}getGOAnimationType(){return _0x304306.ANIMATION_ATTRIBUTE}execute(){if(!this.canExecute())return!1;var e=this.ratio,t=this.executeLineColorAnimation(e),i=this.executeLineWidthAnimation(e),n=this.executeSurroundLineColorAnimation(e),r=this.executeSurroundLineWidthAnimation(e);return!!(t||i||n||r)&&(this._animationGOFeature._initialize=!1,!0)}executeLineColorAnimation(e){if(!this._lineColorAnimation)return!1;var t=this.startLineColor,i=this.endLineColor,n=t.red+(i.red-t.red)*e,r=t.green+(i.green-t.green)*e,o=t.blue+(i.blue-t.blue)*e,a=t.alpha+(i.alpha-t.alpha)*e;return this._animationGOFeature._symbolStyle._lineColor=new WebGLPlot.Color(n,r,o,a),!0}executeLineWidthAnimation(e){return!!this.lineWidthAnimation&&(_0x18bc2f.SYMBOL_DOT===this._animationGOFeature.symbolType?(this._animationGOFeature.gridLineWidth=this.startLineWidth+(this.endLineWidth-this.startLineWidth)*e,!0):_0x18bc2f.SYMBOL_ALGO===this._animationGOFeature.symbolType?(this._animationGOFeature._symbolStyle._lineWidth=this.startLineWidth+(this.endLineWidth-this.startLineWidth)*e,!0):void 0)}executeSurroundLineColorAnimation(e){if(!this.surroundLineColorAnimation)return!1;var t=this.startSurroundLineColor,i=this.endSurroundLineColor,n=t.red+(i.red-t.red)*e,r=t.green+(i.green-t.green)*e,o=t.blue+(i.blue-t.blue)*e,a=t.alpha+(i.alpha-t.alpha)*e;return this._animationGOFeature._symbolStyle._surroundLineColor=new WebGLPlot.Color(n,r,o,a),!0}executeSurroundLineWidthAnimation(e){return!!this.surroundLineWidthAnimation&&(_0x18bc2f.SYMBOL_DOT===this._animationGOFeature.symbolType?(this._animationGOFeature._gridSurroundLineWidth=this.startSurroundLineWidth+(this.endSurroundLineWidth-this.startSurroundLineWidth)*e,!0):_0x18bc2f.SYMBOL_ALGO===this._animationGOFeature.symbolType?(this._animationGOFeature._symbolStyle._surroundLineWidth=this.startSurroundLineWidth+(this.endSurroundLineWidth-this.startSurroundLineWidth)*e,!0):void 0)}resetAnimationFeature(e){e&&(this.lineWidthAnimation&&(this._animationGOFeature.gridLineWidth=this._goFeature.gridLineWidth),this.lineColorAnimation&&(this._animationGOFeature._symbolStyle._lineColor=this._goFeature._symbolStyle._lineColor),this.surroundLineWidthAnimation&&(this._animationGOFeature._gridSurroundLineWidth=this._goFeature._gridSurroundLineWidth),this.surroundLineColorAnimation&&(this._animationGOFeature._symbolStyle._surroundLineColor=this._goFeature._symbolStyle._surroundLineColor))}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.lineColorAnimation=this.lineColorAnimation,e.startLineColor=this._colorFormat(this.startLineColor),e.endLineColor=this._colorFormat(this.endLineColor),e.lineWidthAnimation=this.lineWidthAnimation,e.startLineWidth=this.startLineWidth,e.endLineWidth=this.endLineWidth,e.surroundLineColorAnimation=this.surroundLineColorAnimation,e.startSurroundLineColor=this._colorFormat(this.startSurroundLineColor),e.endSurroundLineColor=this._colorFormat(this.endSurroundLineColor),e.surroundLineWidthAnimation=this.surroundLineWidthAnimation,e.startSurroundLineWidth=this.startSurroundLineWidth,e.endSurroundLineWidth=this.endSurroundLineWidth,e}fromJSONData(e){this.fromBaseJSONData(e),this.lineColorAnimation=e.lineColorAnimation,this.startLineColor=this._serverColorToColor(e.startLineColor),this.endLineColor=this._serverColorToColor(e.endLineColor),this.lineWidthAnimation=e.lineWidthAnimation,this.startLineWidth=e.startLineWidth,this.endLineWidth=e.endLineWidth,this.surroundLineColorAnimation=e.surroundLineColorAnimation,this.startSurroundLineColor=this._serverColorToColor(e.startSurroundLineColor),this.endSurroundLineColor=this._serverColorToColor(e.endSurroundLineColor),this.surroundLineWidthAnimation=e.surroundLineWidthAnimation,this.startSurroundLineWidth=e.startSurroundLineWidth,this.endSurroundLineWidth=e.endSurroundLineWidth}}Object.defineProperties(_0x45edd9.prototype,{lineColorAnimation:{get:function(){return this._lineColorAnimation},set:function(e){e!==this._lineColorAnimation&&(this._lineColorAnimation=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startLineColor:{get:function(){return this._startLineColor},set:function(e){e!==this._startLineColor&&(this._startLineColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endLineColor:{get:function(){return this._endLineColor},set:function(e){e!==this._endLineColor&&(this._endLineColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},lineWidthAnimation:{get:function(){return this._lineWidthAnimation},set:function(e){e!==this._lineWidthAnimation&&(this._lineWidthAnimation=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startLineWidth:{get:function(){return this._startLineWidth},set:function(e){e!==this._startLineWidth&&(this._startLineWidth=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endLineWidth:{get:function(){return this._endLineWidth},set:function(e){e!=this._endLineWidth&&(this._endLineWidth=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},surroundLineColorAnimation:{get:function(){return this._surroundLineColorAnimation},set:function(e){e!=this._surroundLineColorAnimation&&(this._surroundLineColorAnimation=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startSurroundLineColor:{get:function(){return this._startSurroundLineColor},set:function(e){e!=this._startSurroundLineColor&&(this._startSurroundLineColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endSurroundLineColor:{get:function(){return this._endSurroundLineColor},set:function(e){e!=this._endSurroundLineColor&&(this._endSurroundLineColor=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},surroundLineWidthAnimation:{get:function(){return this._surroundLineWidthAnimation},set:function(e){e!=this._surroundLineWidthAnimation&&(this._surroundLineWidthAnimation=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startSurroundLineWidth:{get:function(){return this._startSurroundLineWidth},set:function(e){e!=this._startSurroundLineWidth&&(this._startSurroundLineWidth=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endSurroundLineWidth:{get:function(){return this._endSurroundLineWidth},set:function(e){e!=this._endSurroundLineWidth&&(this._endSurroundLineWidth=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x1f91d1=(_0x49eb53=!0,function(e,t){var i=_0x49eb53?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49eb53=!1,i}),_0x5ecf65=_0x1f91d1(void 0,(function(){return _0x5ecf65.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ecf65).search("(((.+)+)+)+$")})),_0x49eb53;_0x5ecf65();var _0x2a584b={ClockWise:0,AntiClockWise:1},_0x36b304=Object.freeze(_0x2a584b),_0x5ef7f8=(_0x1a44d0=!0,function(e,t){var i=_0x1a44d0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a44d0=!1,i}),_0x122207=_0x5ef7f8(void 0,(function(){return _0x122207.toString().search("(((.+)+)+)+$").toString().constructor(_0x122207).search("(((.+)+)+)+$")})),_0x1a44d0;_0x122207();class _0x1b6a94 extends _0x2688ba{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._rotateDirection=WebGLPlot.defaultValue(e.rotateDirection,_0x36b304.ClockWise),this._startAngle=WebGLPlot.defaultValue(e.startAngle,new _0x11ff81(0,0,0)),this._endAngle=WebGLPlot.defaultValue(e.endAngle,new _0x11ff81(0,0,0))}getGOAnimationType(){return _0x304306.ANIMATION_ROTATE}execute(){if(this._animationGOFeature.symbolType!==_0x18bc2f.SYMBOL_DOT||!this.canExecute())return!1;var e=this._ratio,t=this.getCurrentAngle(this.startAngle.x,this.endAngle.x,e),i=this.getCurrentAngle(this.startAngle.y,this.endAngle.y,e),n=this.getCurrentAngle(this.startAngle.z,this.endAngle.z,e),r=this._animationGOFeature._showMode;return _0x4e5d29.Vector===r?this._animationGOFeature.vectorRotate=new _0x11ff81(t,i,n):_0x4e5d29.Marker===r&&(this._animationGOFeature._modelRotate=new _0x11ff81(t,i,n)),this._animationGOFeature._initialize=!1,!0}getCurrentAngle(e,t,i){var n=0,r=t-e,o=parseInt(Math.abs(r/360));if(e!==t)if(this._rotateDirection===_0x36b304.ClockWise)r<0&&(r+=360*(2*o+1)),n=e+r*i;else{var a=0;n=e+(360-(r=0===(a=r<0?r+360*(o+1):r-360*o)?360*o:360-a+360*o)*i)}return n}resetAnimationFeature(e){this._animationGOFeature._rotate=this._goFeature._rotate,this._animationGOFeature._modelRotate=this._goFeature._modelRotate,this._animationGOFeature.vectorRotate=this._goFeature.vectorRotate,GOAnimation.prototype.resetAnimationFeature.call(this,e)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.rotateDirection=this.rotateDirection,e.startAngle=this.startAngle,e.endAngle=this.endAngle,e}fromJSONData(e){this.fromBaseJSONData(e),this.rotateDirection=e.rotateDirection,this.startAngle=e.startAngle,this.endAngle=e.endAngle}}Object.defineProperties(_0x1b6a94.prototype,{rotateDirection:{get:function(){return this._rotateDirection},set:function(e){e!=this._rotateDirection&&(this._rotateDirection=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startAngle:{get:function(){return this._startAngle},set:function(e){e!=this._startAngle&&(this._startAngle=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endAngle:{get:function(){return this._endAngle},set:function(e){e!=this._endAngle&&(this._endAngle=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x341a1e=(_0x469846=!0,function(e,t){var i=_0x469846?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x469846=!1,i}),_0xc10956=_0x341a1e(void 0,(function(){return _0xc10956.toString().search("(((.+)+)+)+$").toString().constructor(_0xc10956).search("(((.+)+)+)+$")})),_0x469846;_0xc10956();class _0x1c88c7 extends _0x2688ba{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._startScale=WebGLPlot.defaultValue(e.startScale,0),this._endScale=WebGLPlot.defaultValue(e.endScale,1),this._lastScale=WebGLPlot.defaultValue(e.lastScale,null)}getGOAnimationType(){return _0x304306.ANIMATION_SCALE}execute(){if(this._animationGOFeature._symbolType!==_0x18bc2f.SYMBOL_DOT||!this.canExecute())return!1;this._lastScale=this._animationGOFeature._scale,_0x4e5d29.Marker===this._animationGOFeature.showMode&&(this._lastScale=this._animationGOFeature._modelScale.x),_0x4e5d29.Vector===this._animationGOFeature.showMode&&(this._lastScale=this._animationGOFeature._vectorScale);var e=this._startScale;0===e&&(e=.1);var t=this._endScale;if(0===t&&(t=.1),this._animationGOFeature.sizeInMeters)this._animationGOFeature.billboard.scale=this._animationGOFeature._BillboardScale*(e+this.ratio*(t-e));else{var i=this.goFeature._scale*(e+this.ratio*(t-e));_0x4e5d29.Picture===this._animationGOFeature.showMode||_0x4e5d29.Grid===this._animationGOFeature.showMode?this._animationGOFeature.scale=i:_0x4e5d29.Marker===this._animationGOFeature.showMode?(i=this.goFeature._modelScale.x*(e+this.ratio*(t-e)),this._animationGOFeature._modelScale.x=i,this._animationGOFeature._initialize=!1):_0x4e5d29.Vector===this._animationGOFeature.showMode&&(i=this.goFeature._vectorScale*(e+this.ratio*(t-e)),this._animationGOFeature._vectorScale=i,this._animationGOFeature._initialize=!1)}return!0}resetAnimationFeature(e){this._lastScale=null,this._animationGOFeature.scale=this.goFeature.scale,_0x2688ba.prototype.resetAnimationFeature.call(this,e)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.startScale=this.startScale,e.endScale=this.endScale,e}fromJSONData(e){this.fromBaseJSONData(e),this.startScale=e.startScale,this.endScale=e.endScale}}Object.defineProperties(_0x1c88c7.prototype,{startScale:{get:function(){return this._startScale},set:function(e){e!=this._startScale&&(this._startScale=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endScale:{get:function(){return this._endScale},set:function(e){e!=this._endScale&&(this._endScale=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},lastScale:{get:function(){return this._lastScale},set:function(e){e!=this._lastScale&&(this._lastScale=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0xe61bf8=(_0x1c3197=!0,function(e,t){var i=_0x1c3197?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c3197=!1,i}),_0x155cf9=_0xe61bf8(void 0,(function(){return _0x155cf9.toString().search("(((.+)+)+)+$").toString().constructor(_0x155cf9).search("(((.+)+)+)+$")})),_0x1c3197;_0x155cf9();class _0x4a4ca0 extends _0x2688ba{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._startScale=WebGLPlot.defaultValue(e.startScale,0),this._endScale=WebGLPlot.defaultValue(e.endScale,1),this._timeSpace=WebGLPlot.defaultValue(e.timeSpace,50),this._lastDrawTime=WebGLPlot.defaultValue(e.lastDrawTime,0),this._lineLength=WebGLPlot.defaultValue(e.lineLength,0),this._controlPoints=WebGLPlot.defaultValue(e.controlPoints,[]),this.m_arrPts3D=[],this.goFeatureLocalPts=[]}getGOAnimationType(){return _0x304306.ANIMATION_GROW}execute(){if(this._animationGOFeature._localPoints.length<2){var e=this.goFeatureLocalPts;if(e.length<2)return!1;this._animationGOFeature._localPoints=e}if(!this.canExecute())return!1;var t=(new Date).getTime();if(this._lastDrawTime>0&&t-this._timeSpace<this._lastDrawTime)return!1;var i=this._startScale+this._ratio*(this._endScale-this._startScale);return i>=1&&(i=1),this._lastDrawTime=t,this._executeAnimation(i)}_executeAnimation(e){var t=!1,i=this._goFeature._code,n=this._goFeature._libID;if(0===this.m_arrPts3D.length&&(this.m_arrPts3D=WebGLPlot.clonePoints(this.goFeatureLocalPts)),0===n)switch(i){case _0x18bc2f.SYMBOL_KIDNEY:case _0x18bc2f.SYMBOL_POLYBEZIERCLOSED:case _0x18bc2f.SYMBOL_PARALLELOGRAM:case _0x18bc2f.SYMBOL_TRAPEZOID:case _0x18bc2f.SYMBOL_CIRCLECHORD:t=this._execute_Kidney(e);break;case _0x18bc2f.SYMBOL_CIRCLE:t=this._execute_Circle(e);break;case _0x18bc2f.SYMBOL_RECTANGLE:t=this._execute_Rect(e);break;case _0x18bc2f.SYMBOL_REGULARPOLYGON:t=this._execute_RegularPloygon(e);break;case _0x18bc2f.SYMBOL_ELLIPSE:t=this._execute_Ellipse(e);break;case _0x18bc2f.SYMBOL_ARBITRARYPOLYGON:t=this._execute_ArbitraryPolygon(e);break;case _0x18bc2f.SYMBOL_PARALLELLINE:t=this._execute_ParallelLine(e);break;case _0x18bc2f.SYMBOL_POLYBEZIER:t=this._execute_Polybezier(e);break;case _0x18bc2f.SYMBOL_PIE:case _0x18bc2f.SYMBOL_CHORD:case _0x18bc2f.SYMBOL_ARC:return!1;case _0x18bc2f.SYMBOL_CURVEEIGHT:t=this._execute_CurveEight(e);break;default:t=this._execute_Generalization(e)}else if(22===n)switch(i){case 1004:case 2004:case 1010:t=this._execute_1004(e);break;case 1006:case 2006:t=this._execute_1006(e);break;case 1002:case 2002:t=this._execute_1002(e);break;case 32:case 3211:t=this._execute_ArbitraryPolygon(e);break;case 390:case 3911:t=this._execute_Kidney(e);break;default:t=this._execute_Generalization(e)}else if(100===n)if(25200===i)t=this._execute_1004(e);else t=this._execute_Generalization(e);else if(421===n)switch(i){case 311:t=this._execute_1004(e);break;case 317:t=this._execute_1006(e);break;default:t=this._execute_Generalization(e)}else if(123===n)switch(i){case 60310:case 6031001:t=this._execute_1004(e);break;default:t=this._execute_Generalization(e)}else t=this._execute_Generalization(e);return t}_execute_Generalization(e){0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,this._lineLength=WebGLPlot.polylineDistance(this._controlPoints));for(var t=[],i=WebGLPlot.clonePoints(this._controlPoints),n=this._findPos(this._lineLength*e,i),r=0;r<=n.pos;r++)t.push(i[r]);return t.push(n.pts),WebGLPlot.isAccessServer(this._animationGOFeature._libID,this._animationGOFeature._code)&&this._animationGOFeature.getMinEditPts()>t.length?(this._executeAndRatioIsZero(),!0):(this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(t),this._animationGOFeature._initialize=!1,!0)}_findPos(e,t){var i,n=0,r=0;for(i=1;i<t.length&&!(n+(r=_0x2d6822.distance(t[i-1],t[i]))>=e);i++)n+=r;var o=new Object;if(i<t.length)var a=_0x2d6822.LinePnt(t[i-1],t[i],e-n);else a=t[i-1];return o.pos=i-1,o.pts=a,o}_execute_1004(e){if(0===this._lineLength){this._controlPoints=this.m_arrPts3D;var t=new _0x11ff81((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2);this._lineLength+=_0x2d6822.distance(t,this._controlPoints[2]);for(var i=3;i<this._controlPoints.length;i++)this._lineLength+=_0x2d6822.distance(this._controlPoints[i-1],this._controlPoints[i])}if(0===e)return this._executeAndRatioIsZero(),!0;var n=[],r=[];t=new _0x11ff81((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2);r.push(t);for(i=2;i<this._controlPoints.length;i++)r.push(this._controlPoints[i].clone());n.push(this._controlPoints[0]),n.push(this._controlPoints[1]);for(var o=this._findPos(this._lineLength*e,r),a=1;a<=o.pos;a++)n.push(r[a]);return n.push(o.pts),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(n),this._animationGOFeature._initialize=!1,!0}_execute_1006(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D,this._animationGOFeature.m_bIsAnimation=!0),0===e)return this._executeAndRatioIsZero(),!0;var t=this.OperateCtrlPts(this._controlPoints);if(4!==t.length)return!1;for(var i=[],n=0;n<t.length;n++){var r=WebGLPlot.Cartesian3.fromDegrees(t[n].x,t[n].y,t[n].z);i.push(r)}var o=i[0],a=i[1],s=i[2],l=i[3],u=_0x2d6822.distance(o,l),c=_0x2d6822.distance(a,s),h=_0x2d6822.LinePnt(o,l,u*e),d=_0x2d6822.LinePnt(a,s,c*e),f=[];return f.push(this.PtsToSpherical(o)),f.push(this.PtsToSpherical(a)),f.push(this.PtsToSpherical(d)),f.push(this.PtsToSpherical(h)),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(f),this._animationGOFeature._initialize=!1,!0}PtsToSpherical(e){var t=_0x1713d3.getInstance({scene:this._scene})._scene.globe.ellipsoid,i=new WebGLPlot.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot.CesiumMath.toDegrees(n.latitude);return new _0x11ff81(WebGLPlot.CesiumMath.toDegrees(n.longitude),r,n.height)}_execute_1002(e){if(0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,this._lineLength=WebGLPlot.polylineDistance(this._controlPoints)),0===e)return this._executeAndRatioIsZero(),!0;var t=this._controlPoints.length,i=Math.ceil(t/3),n=t%3==0?3:t%3;1===n&&(i-=1,n=3,this._controlPoints.pop());var r,o=[];if(3===n)for(var a=1;a<i+1;a++){var s=3*a,l=this._controlPoints[s-3],u=this._controlPoints[s-2],c=this._controlPoints[s-1];if((f=(d=_0x2d6822.distance(l,u))+_0x2d6822.distance(u,c))*e>=d)r=_0x2d6822.LinePnt(u,c,f*e-d),o.push(l),o.push(u),o.push(r);else{r=_0x2d6822.LinePnt(l,u,f*e);var h=_0x2d6822.LinePnt(l,u,d*e);o.push(l),o.push(h),o.push(r)}}else{for(a=1;a<i;a++){var d;s=3*a,l=this._controlPoints[s-3],u=this._controlPoints[s-2],c=this._controlPoints[s-1];if((f=(d=_0x2d6822.distance(l,u))+_0x2d6822.distance(u,c))*e>=d)r=_0x2d6822.LinePnt(u,c,f*e-d),o.push(l),o.push(u),o.push(r);else{r=_0x2d6822.LinePnt(l,u,f*e);h=_0x2d6822.LinePnt(l,u,d*e);o.push(l),o.push(h),o.push(r)}}l=this._controlPoints[t-2],u=this._controlPoints[t-1];var f=_0x2d6822.distance(l,u);r=_0x2d6822.LinePnt(l,u,f*e),o.push(l),o.push(r)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(o),this._animationGOFeature._initialize=!1,!0}_execute_Rect(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=new _0x11ff81((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2),i=Math.abs(this._controlPoints[0].x-this._controlPoints[1].x)/2*e,n=Math.abs(this._controlPoints[0].y-this._controlPoints[1].y)/2*e,r=new _0x11ff81(t.x-i,t.y+n,t.z),o=new _0x11ff81(t.x+i,t.y-n,t.z);return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=[r,o],this._animationGOFeature._initialize=!1,!0}_execute_Circle(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=e*_0x2d6822.distance(this._controlPoints[0],this._controlPoints[1]);if(1===e)this._animationGOFeature._localPoints=[this._controlPoints[0],this._controlPoints[1]];else{var i=new _0x11ff81(this._controlPoints[0].x+t,this._controlPoints[0].y,this._controlPoints[0].z);this._animationGOFeature._localPoints=[this._controlPoints[0],i]}return this._animationGOFeature._initialize=!1,!0}_execute_Kidney(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D),0===e)return this._executeAndRatioIsZero(),!0;var t=[],i=this._controlPoints.length,n=_0x2d6822.getPolygonCenterPt(this._controlPoints);if(null===n)return this._executeAndRatioIsZero(),!0;for(var r=0;r<i;r++){var o=_0x2d6822.distance(n,this._controlPoints[r]),a=o*e;if(a>o)return!1;var s=_0x2d6822.LinePnt(n,this._controlPoints[r],a);t.push(s)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(t),this._animationGOFeature._initialize=!1,!0}_execute_RegularPloygon(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D),this._controlPoints=_0x2d6822.clearNextSamePts(this._controlPoints),0===e)return this._executeAndRatioIsZero(),!0;var t=this._controlPoints.length,i=_0x2d6822.distance(this._controlPoints[0],this._controlPoints[t-1]),n=i*e,r=[];if(n>=i)r=this._controlPoints;else{var o=_0x2d6822.LinePnt(this._controlPoints[0],this._controlPoints[t-1],n);r.push(this._controlPoints[0]);for(var a=1;a<t-1;a++)r.push(this._controlPoints[a]);r.push(o)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(r),this._animationGOFeature._initialize=!1,!0}_execute_Ellipse(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=_0x2d6822.FindPointOnLineByRatio(e,this._controlPoints[0],this._controlPoints[1]),i=_0x2d6822.FindPointOnLineByRatio(e,this._controlPoints[0],this._controlPoints[2]);return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=[this._controlPoints[0],t,i],this._animationGOFeature._initialize=!1,!0}_execute_ArbitraryPolygon(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=this._controlPoints.length,i=_0x2d6822.getPolygonCenterPt(this._controlPoints);if(null===i)return this._executeAndRatioIsZero(),!0;for(var n=[],r=0;r<t;r++){var o=_0x2d6822.distance(i,this._controlPoints[r])*e,a=_0x2d6822.LinePnt(i,this._controlPoints[r],o);n.push(a)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(n),this._animationGOFeature._initialize=!1,!0}_execute_ParallelLine(e){if(0===this._lineLength){this._controlPoints=this.m_arrPts3D;for(var t=2;t<this._controlPoints.length;t++)this._lineLength+=_0x2d6822.distance(this._controlPoints[t-1],this._controlPoints[t])}var i=[],n=[];for(t=1;t<this._controlPoints.length;t++)n.push(this._controlPoints[t]);var r=this._findPos(this._lineLength*e,n);i.push(this._controlPoints[0]);for(t=0;t<=r.pos;t++)i.push(n[t]);return i.push(r.pts),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(i),this._animationGOFeature._initialize=!1,!0}_execute_Polybezier(e){var t=[];if(0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,t=_0x2d6822.generateBeizerPointsNoCtrlPt(this._controlPoints),this._lineLength+=WebGLPlot.polylineDistance(t)),e>=1)return this._animationGOFeature._symbolAlgo=null,this._animationGOFeature.code=590,this._animationGOFeature._localPoints=this._goFeature._localPoints,this._animationGOFeature._initialize=!1,!0;this._animationGOFeature._symbolAlgo=null,this._animationGOFeature.code=24;for(var i=[],n=0;n<this._controlPoints.length;n++)i.push(this._controlPoints[n].z);var r=Math.max.apply({},i),o=[];t=_0x2d6822.generateBeizerPointsNoCtrlPt(this._controlPoints);var a=this._findPos(this._lineLength*e,t);for(n=0;n<=a.pos;n++)o.push(new _0x11ff81(t[n].x,t[n].y,r));return o.push(new _0x11ff81(a.pts.x,a.pts.y,r)),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(o),this._animationGOFeature._initialize=!1,!0}_execute_CurveEight(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);for(var t=_0x2d6822.getPolygonCenterPt(this._controlPoints),i=[],n=0;n<this._controlPoints.length;n++){var r=_0x2d6822.distance(t,this._controlPoints[n])*e,o=_0x2d6822.LinePnt(t,this._controlPoints[n],r);i.push(o)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(i),this._animationGOFeature._initialize=!1,!0}_executeAndRatioIsZero(){this._animationGOFeature._localPoints=[]}resetAnimationFeature(e){if(_0x2688ba.prototype.resetAnimationFeature.call(this,e),this._lineLength=0,this._controlPoints=[],this.m_arrPts3D=[],this._animationGOFeature._localPoints=[],this._animationGOFeature.code=this._goFeature.code,this.goFeatureLocalPts.length>=2)for(var t=0;t<this.goFeatureLocalPts.length;t++)this._animationGOFeature._localPoints.push(this.goFeatureLocalPts[t].clone())}OperateCtrlPts(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i].clone());var n=t.length;if(3==n){var r=new _0x11ff81;(r=_0x2d6822.getPointsByTrapezoid(1,t[0].x,t[0].y,t[1].x,t[1].y,t[2].x,t[2].y,r)).z=t[2].z,t.push(r)}if(n>4&&t.splice(4,n-4),_0x2d6822.isRight(t[2],t[0],t[1])){var o=t[0].clone();t[0]=t[1].clone(),t[1]=o}if(!_0x2d6822.pointIsRightToVerticle(t[0],t[1],t[2])){o=t[2].clone();t[2]=t[3].clone(),t[3]=o}return t}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.startScale=this.startScale,e.endScale=this.endScale,e}fromJSONData(e){this.fromBaseJSONData(e),this.startScale=e.startScale,this.endScale=e.endScale}}Object.defineProperties(_0x4a4ca0.prototype,{startScale:{get:function(){return this._startScale},set:function(e){e!=this._startScale&&(this._startScale=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endScale:{get:function(){return this._endScale},set:function(e){e!=this._endScale&&(e>=1&&(e=1),this._endScale=e,_0x47a70a.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});const _0x2109aa=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x19f03c=_0x2109aa(void 0,(function(){return _0x19f03c.toString().search("(((.+)+)+)+$").toString().constructor(_0x19f03c).search("(((.+)+)+)+$")}));_0x19f03c();class _0xa4850 extends _0x4a4ca0{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,1),e.endScale=WebGLPlot.defaultValue(e.endScale,0);const t=e.startScale;e.startScale<e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_REDUCE_EXP}}var _0x1efc67=(_0x48c062=!0,function(e,t){var i=_0x48c062?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x48c062=!1,i}),_0x594716=_0x1efc67(void 0,(function(){return _0x594716.toString().search("(((.+)+)+)+$").toString().constructor(_0x594716).search("(((.+)+)+)+$")})),_0x48c062;_0x594716();class _0x27e0a8 extends _0x4a4ca0{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,0),e.endScale=WebGLPlot.defaultValue(e.endScale,1);const t=e.startScale;e.startScale>e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e),this._animationGrowEXP_isFirstExecute=!0}getGOAnimationType(){return _0x304306.ANIMATION_GROW_EXP}showAnimationFeature(e){null!==this._animationGOFeature&&null!==this._animationGOFeature._symbolStyle&&(this.resetAnimationFeature(e),this._animationGOFeature.display=!1),null!==this._goFeature&&null!==this._goFeature._symbolStyle&&(this._goFeature.display=!e,this._goFeature._initialize=!1),e&&(this._isSendBegin=!0)}execute(){if(this._animationGOFeature._localPoints.length<2){var e=this.goFeatureLocalPts;if(e.length<2)return!1;this._animationGOFeature._localPoints=e}if(!this.canExecute())return!1;this._animationGrowEXP_isFirstExecute&&(this._animationGOFeature.display=!0,this._animationGrowEXP_isFirstExecute=!1);var t=(new Date).getTime();if(this._lastDrawTime>0&&t-this._timeSpace<this._lastDrawTime)return!1;var i=this._startScale+this._ratio*(this._endScale-this._startScale);return i>=1&&(i=1),this._lastDrawTime=t,this._executeAnimation(i)}}var _0x57f22=(_0x11336f=!0,function(e,t){var i=_0x11336f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x11336f=!1,i}),_0x1a6071=_0x57f22(void 0,(function(){return _0x1a6071.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a6071).search("(((.+)+)+)+$")})),_0x11336f;_0x1a6071();class _0x448584 extends _0x43b269{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!0,e.showEffect=!0,e.duration=WebGLPlot.defaultValue(e.duration,3),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_MOVEIN_EXP}}var _0x215478=(_0x2a6291=!0,function(e,t){var i=_0x2a6291?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a6291=!1,i}),_0x5a285c=_0x215478(void 0,(function(){return _0x5a285c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a285c).search("(((.+)+)+)+$")})),_0x2a6291;_0x5a285c();class _0x365699 extends _0x43b269{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!1,e.showEffect=!0,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_MOVEOUT_EXP}}var _0x207b23=(_0xc83fb9=!0,function(e,t){var i=_0xc83fb9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc83fb9=!1,i}),_0x3f6a39=_0x207b23(void 0,(function(){return _0x3f6a39.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f6a39).search("(((.+)+)+)+$")})),_0xc83fb9;_0x3f6a39();class _0x4c816f extends _0x43b269{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!1,e.showEffect=!1,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_HIDE_EXP}}var _0x1ce01a=(_0x1b4f03=!0,function(e,t){var i=_0x1b4f03?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b4f03=!1,i}),_0x1575a0=_0x1ce01a(void 0,(function(){return _0x1575a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1575a0).search("(((.+)+)+)+$")})),_0x1b4f03;_0x1575a0();class _0x33f59e extends _0x43b269{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!0,e.showEffect=!1,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_SHOW_EXP}}var _0x52e52d=(_0x2a055f=!0,function(e,t){var i=_0x2a055f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a055f=!1,i}),_0x4b9c68=_0x52e52d(void 0,(function(){return _0x4b9c68.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b9c68).search("(((.+)+)+)+$")})),_0x2a055f;_0x4b9c68();class _0x426167 extends _0x381298{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x59cef0.POLYLINE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_BROKENLINE_EXP}}var _0x4954e3=(_0xc0176c=!0,function(e,t){var i=_0xc0176c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc0176c=!1,i}),_0x4680f3=_0x4954e3(void 0,(function(){return _0x4680f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x4680f3).search("(((.+)+)+)+$")})),_0xc0176c;_0x4680f3();class _0x2c9321 extends _0x381298{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x59cef0.CURVE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_CURVE_EXP}}const _0x467843=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x297814=_0x467843(void 0,(function(){return _0x297814.toString().search("(((.+)+)+)+$").toString().constructor(_0x297814).search("(((.+)+)+)+$")}));_0x297814();class _0x4f5528 extends _0x381298{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x59cef0.POLYLINE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_WAY_EXP}}Object.defineProperties(_0x4f5528.prototype,{wayPoints:{get:function(){return this._wayPoints},set:function(e){if(e instanceof _0x4381c6){let t=[];for(let i=0;i<e._symbolAlgo.components.length;i++){const n=e._symbolAlgo.components[i];t=t.concat(n.shapePts)}this._wayPoints=t}}}});var _0x1dbb12=(_0x4a680d=!0,function(e,t){var i=_0x4a680d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a680d=!1,i}),_0xdf760b=_0x1dbb12(void 0,(function(){return _0xdf760b.toString().search("(((.+)+)+)+$").toString().constructor(_0xdf760b).search("(((.+)+)+)+$")})),_0x4a680d;_0xdf760b();class _0x19c7e4 extends _0x306baa{constructor(e){(e=WebGLPlot.defaultValue(e,{})).duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_BLINK_EXP}}const _0x21ecf1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5a4ce7=_0x21ecf1(void 0,(function(){return _0x5a4ce7.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a4ce7).search("(((.+)+)+)+$")}));_0x5a4ce7();class _0x440bb3 extends _0x1c88c7{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,0),e.endScale=WebGLPlot.defaultValue(e.endScale,1);const t=e.startScale;e.startScale>e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_ZOOMIN_EXP}}const _0x396f4f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4e0283=_0x396f4f(void 0,(function(){return _0x4e0283.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e0283).search("(((.+)+)+)+$")}));_0x4e0283();class _0x443e7e extends _0x1c88c7{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,1),e.endScale=WebGLPlot.defaultValue(e.endScale,0);const t=e.startScale;e.startScale<e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x28a0bd.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x304306.ANIMATION_ZOOMOUT_EXP}}var _0x5f1e73=(_0x43c5c2=!0,function(e,t){var i=_0x43c5c2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43c5c2=!1,i}),_0x826355=_0x5f1e73(void 0,(function(){return _0x826355.toString().search("(((.+)+)+)+$").toString().constructor(_0x826355).search("(((.+)+)+)+$")})),_0x43c5c2;_0x826355();class GOAnimationManagerBase{constructor(e){this.goAnimations=[],this.curPlayGroup=0}preView(){if(0!==this.goAnimations.length)for(var e=this.getAllGroups(),t=0;t<e.length;t++){var i=e[t];for(let e=0;e<i.length;e++)i[e].play()}}play(e){if(0!==this.goAnimations.length){void 0!==e&&(this.curPlayGroup=this.getAnimationGroupByName(e).index),this.isPlay()&&this.curPlayGroup--;var t=this.getAllGroups();this.curPlayGroup>t.length-1&&(this.curPlayGroup=0);for(var i=t[this.curPlayGroup],n=0;n<i.length;n++){i[n].play()}this.curPlayGroup++}}stop(){if(0!==this.goAnimations.length){for(var e=0;e<this.goAnimations.length;e++)this.goAnimations[e].stop();this.curPlayGroup=0}}pause(){if(0!==this.goAnimations.length){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x5140b5.PLAYING?(e=!0,this.goAnimations[t].pause()):this.goAnimations[t].stop();e&&this.curPlayGroup>0&&this.curPlayGroup--}}reset(){if(0!==this.goAnimations.length){for(var e=0;e<this.goAnimations.length;e++)this.goAnimations[e].reset();this.curPlayGroup=0}}isPlay(){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x5140b5.PLAYING&&(e=!0);return e}isPause(){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x5140b5.PAUSE&&(e=!0);return e}getAnimationTimeLength(e,t){var i=!1,n=0,r=0;for(let u=e-1;u>=0;u--){var o=t[u],a=o.startTime+o.duration;if(a>r&&(r=a),o.animationPlayType===_0x28a0bd.PLAYAFTERLASTONE){i=!0;for(let e=u-1;e>=0;e--){var s=t[e],l=s.startTime+s.duration;l>n&&(n=l)}}}return{isExist:i,length1:n,length2:r}}getAllGroups(){var e=[];for(let n=0;n<this.goAnimations.length;n++){var t=this.goAnimations[n];if(t.animationPlayType===_0x28a0bd.PLAYFROMNOW||0===n){var i=[];i.push(t),e.push(i)}else e[e.length-1].push(t)}return e}getAnimationGroup(e){var t=null,i=0,n=this.getAllGroups();for(let o=0;o<n.length;o++){var r=n[o];for(let n=0;n<r.length;n++)if(r[n].name===e.name){t=r,i=o;break}}return{index:i,group:t}}getAnimationGroupByName(e){var t=null,i=0,n=this.getAllGroups();for(let o=0;o<n.length;o++){var r=n[o];for(let n=0;n<r.length;n++)if(r[n].name===e){t=r,i=o;break}}return{index:i,group:t}}changeAnimationTime(e){if(!e||!this.getAnimationGroup(e).group)return!1;var t=this.getAnimationGroup(e).group;this.getAnimationGroup(e).index;var i=t.indexOf(e);if(e.animationPlayType===_0x28a0bd.PLAYFROMNOW)e.startTime=e.delayTime;else if(e.animationPlayType===_0x28a0bd.PLAYSAMELASTONE||e.animationPlayType===_0x28a0bd.UNKNOWN)(n=this.getAnimationTimeLength(i,t)).isExist?e.startTime=n.length1+e.delayTime:e.startTime=e.delayTime;else if(e.animationPlayType===_0x28a0bd.PLAYAFTERLASTONE){var n=this.getAnimationTimeLength(i,t);e.startTime=n.length2+e.delayTime}}moveAnimation(e,t){if(!(t<0||t>this.goAnimations.length)){var i=this.goAnimations.indexOf(e);if(i!==t){this.goAnimations=this.move(i,t);for(var n=0;n<this.goAnimations.length;n++){e=this.goAnimations[n];this.changeAnimationTime(e)}}}}move(e,t){var i=[].concat(this.goAnimations);return i.splice(t,0,i.splice(e,1)[0]),i}getAnimationDelayTime(e){if(!e||!this.getAnimationGroup(e).group)return!1;var t=0,i=this.getAnimationGroup(e).group;this.getAnimationGroup(e).index;var n=i.indexOf(e);if(e.animationPlayType===_0x28a0bd.PLAYFROMNOW||0===n)t=e.startTime;else if(e.animationPlayType===_0x28a0bd.PLAYAFTERLASTONE){var r=this.getAnimationTimeLength(n,i);t=e.startTime-r.length2}else if(e.animationPlayType===_0x28a0bd.PLAYSAMELASTONE||e.animationPlayType===_0x28a0bd.UNKNOW){var o=-1;for(let e=n;e>=0;e--){if(i[e].animationPlayType===_0x28a0bd.PLAYAFTERLASTONE){o=e;break}}if(-1===o)t=e.startTime;else{r=this.getAnimationTimeLength(o,i);t=e.startTime-r.length2}}return t}}var _0x1f469f=(_0x41711=!0,function(e,t){var i=_0x41711?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41711=!1,i}),_0x2f4371=_0x1f469f(void 0,(function(){return _0x2f4371.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f4371).search("(((.+)+)+)+$")})),_0x41711;_0x2f4371();const _0x46d265=new Map;class _0x1713d3 extends GOAnimationManagerBase{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._serverUrl=WebGLPlot.defaultValue(e.serverUrl,""),this._scene=WebGLPlot.defaultValue(e.scene,null),this._openEvoFileCompleted=new WebGLPlot.Event,this._openEvoFileFailed=new WebGLPlot.Event,this._saveEvoFileCompleted=new WebGLPlot.Event,this._saveEvoFileFailed=new WebGLPlot.Event,this.setScene(this._scene),this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},e.options&&e.options.serviceParams&&_0x2d6822.extend(this.options,e.options)}static getInstance(e){let t;return e.scene&&(t=_0x46d265.get(e.scene._plottingID)),WebGLPlot.defined(e)&&!WebGLPlot.defined(t)&&(t=new _0x1713d3(e),_0x46d265.set(e.scene._plottingID,t)),t}createGOAnimation(e,t,i,n=!0,r=_0x28a0bd.UNKNOWN){if(e===_0x304306.ANIMATION_WAY_GROUP){Array.isArray(i)||(i=[i]);for(let e=0;e<i.length;e++)if(!_0x2d6822.isSymbolDot(i[e]._symbolType))return null;return(o=this.createGOAnimationByType(e,t)).setGOFeatures(this,i)?(this.goAnimations.push(o),r!==_0x28a0bd.UNKNOWN&&(o._animationPlayType=r),o):null}return WebGLPlot.defined(i)&&this.isCanCreateAnimation(e,i.symbolType)?null===(o=this.createGOAnimationByType(e,t))||null==i||i.symbolType===_0x18bc2f.GROUPOBJECT||null===i||!WebGLPlot.defined(i)||0===i._libID&&i._code===_0x18bc2f.SYMBOL_TEXT?null:o.setGOFeature(this,i)?(this.goAnimations.push(o),r!==_0x28a0bd.UNKNOWN&&(o._animationPlayType=r),n&&_0x47a70a.getInstance().animationCreated.raiseEvent(o),o):null:null;var o}setScene(e){this._goAnimationLayer=new _0x3ff6b7("animation",e);var t=!1;if(WebGLPlot.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot.PlotLayers)e.plotLayers.goAnimationLayer=this._goAnimationLayer,t=!0;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot.defined(r)&&r instanceof WebGLPlot.PlotLayers){r.goAnimationLayer=this._goAnimationLayer,t=!0;break}}if(!t){var o=new WebGLPlot.PlotLayers;o.goAnimationLayer=this._goAnimationLayer,e.primitives.add(o),e.plotLayers=o}}createGOAnimationByType(e,t){if(null===t||""===t||null===this._goAnimationLayer||null!==this.findGOAnimationByName(t))return null;var i=null;switch(e){case _0x304306.ANIMATION_WAY:i=new _0x381298;break;case _0x304306.ANIMATION_BLINK:i=new _0x306baa;break;case _0x304306.ANIMATION_ATTRIBUTE:i=new _0x45edd9;break;case _0x304306.ANIMATION_SHOW:i=new _0x43b269;break;case _0x304306.ANIMATION_ROTATE:i=new _0x1b6a94;break;case _0x304306.ANIMATION_SCALE:i=new _0x1c88c7;break;case _0x304306.ANIMATION_GROW:i=new _0x4a4ca0;break;case _0x304306.ANIMATION_WAY_GROUP:i=new _0x1c2b25;break;case _0x304306.ANIMATION_REDUCE_EXP:i=new _0xa4850;break;case _0x304306.ANIMATION_GROW_EXP:i=new _0x27e0a8;break;case _0x304306.ANIMATION_MOVEIN_EXP:i=new _0x448584;break;case _0x304306.ANIMATION_MOVEOUT_EXP:i=new _0x365699;break;case _0x304306.ANIMATION_HIDE_EXP:i=new _0x4c816f;break;case _0x304306.ANIMATION_SHOW_EXP:i=new _0x33f59e;break;case _0x304306.ANIMATION_BROKENLINE_EXP:i=new _0x426167;break;case _0x304306.ANIMATION_CURVE_EXP:i=new _0x2c9321;break;case _0x304306.ANIMATION_WAY_EXP:i=new _0x4f5528;break;case _0x304306.ANIMATION_BLINK_EXP:i=new _0x19c7e4;break;case _0x304306.ANIMATION_ZOOMIN_EXP:i=new _0x440bb3;break;case _0x304306.ANIMATION_ZOOMOUT_EXP:i=new _0x443e7e;break;default:return null}return null!==i&&(i._name=t,i._scene=this._scene),i}findGOAnimationByName(e){if(null===this.goAnimations||null===e||""===e)return null;for(var t=null,i=0;i<this.goAnimations.length;i++)if(this.goAnimations[i].name===e){t=this.goAnimations[i];break}return t}findGOAnimationByFeature(e){var t=[];if(0===this.goAnimations.length||null===e||!WebGLPlot.defined(e))return t;for(var i=this.goAnimations.length,n=0;n<i;n++)if(this.goAnimations[n]._goFeature._id===e._id){var r=this.goAnimations[n];t.push(r)}return t}findGOAnimationsByUuid(e){if(0===this.goAnimations.length||"undefined"===e||null===e)return[];var t=this.getFeatureByID(e);return this.findGOAnimationByFeature(t)}execute(){if(0===this.goAnimations.length)return!1;for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].execute()&&(e=!0);return e}removeGOAnimationByName(e){if(0===this.goAnimations.length||null===e||""===e)return!1;var t=this.findGOAnimationByName(e);return this.removeGOAnimation(t)}removeGOAnimationByFeature(e){if(0===this.goAnimations.length||null===e||!WebGLPlot.defined(e))return!1;let t=[];for(var i=[],n=this.goAnimations.length,r=0;r<n;r++){var o=this.goAnimations[r];if(o._goFeature&&o._goFeature._id!==e._id)i.push(o);else if(o._goFeature&&o._goFeature._id===e._id){for(var a=this.getAnimationGroup(o).group,s=this.getAnimationGroup(o).index+1;s<a.length;s++)this.changeAnimationTime(a[s]);t.push(o.name),o.destroy()}}return this.goAnimations=i,_0x47a70a.getInstance().animationDeleted.raiseEvent(t),!0}removeGOAnimation(e,t){if(0===this.goAnimations.length||null===e)return!1;void 0===t&&(t=!0);let i=e.name;for(var n=0;n<this.goAnimations.length;n++)if(this.goAnimations[n]===e){e.reset();var r=this.getAnimationGroup(e).group,o=this.getAnimationGroup(e).index;if(e.destroy(),e=null,this.goAnimations.splice(n,1),r.splice(o,1),null!==r){for(var a=o+1;a<r.length;a++){var s=r[a];this.changeAnimationTime(s)}break}}return t&&_0x47a70a.getInstance().animationDeleted.raiseEvent([i]),!0}removeAllGOAnimation(){if(0===this.goAnimations.length)return;let e=[];for(var t=0;t<this.goAnimations.length;t++)e.push(this.goAnimations[t].name),this.removeGOAnimation(this.goAnimations[t],!1);_0x47a70a.getInstance().animationDeleted.raiseEvent(e),this.goAnimations=[]}getPlottingLayers(){for(var e=[],t=this._scene,i=_0x2d6822.getPlotLayers(t),n=0;n<i._layerQueue.length;++n){var r=i.findByIndex(n);r instanceof _0x267b40&&e.push(r)}return e}getFeatureByID(e){for(var t=this.getPlottingLayers(),i=0;i<t.length;i++){var n=t[i].getFeatureByUuid(e);if(n)return n}}getAllAnimations(){return this.goAnimations}releaseSelection(){for(var e=this.getPlottingLayers(),t=0;t<e.length;t++)null!=e[t]._plottingEdit&&e[t]._plottingEdit.releaseSelection()}getJSONData(){for(var e={animations:[]},t=0;t<this.goAnimations.length;t++)e.animations.push(this.goAnimations[t].getJSONData());return e}fromJSONData(e){let t=0;if(e.AnimationGroups)for(var i=0,n=0;n<e.AnimationGroups.length;n++){for(var r=e.AnimationGroups[n],o=0,a=0;a<r.Animations.length;a++){var s=r.Animations[a],l=s.startTime+s.duration;o=l>o?l:o}this.Analysis(r.Animations,i),i+=o,t+=r.Animations.length}else t=e.animations.length,this.Analysis(e.animations,0);_0x47a70a.getInstance().animationJsonEnd.raiseEvent({animationNumber:t})}Analysis(e,t){for(var i=0;i<e.length;i++){var n=e[i],r="";n.goLayerUuid?r=n.goLayerUuid:n.goFeatureUuid&&(r=n.goFeatureUuid);var o=this.getFeatureByID(r),a=n.name,s=n.type,l=n.playType;if(o&&a&&-1!==s){var u=this.createGOAnimation(s,a,o,l);null!==u&&(n.startTime+=t,u.fromJSONData(n))}}}saveEvoFile(e,t){var i=this;function n(e){var t,n;e?i._saveEvoFileCompleted.raiseEvent(n):i._saveEvoFileFailed.raiseEvent(t)}var r=WebGLPlot.smlFileService(i._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="POST",o.sitData=this.getJSONData(),o.smlFileName=e,o.isCover=t,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}}openEvoFileOnServer(e){var t=this;var i=WebGLPlot.smlFileService(this._serverUrl,this.options.serviceParams);if(i){var n=i.editSmlFileParams;n.method="GET",n.smlFileName=e,i.smlFileService.editSMLFile(n,(function(e){var i;e.result&&e.result.succeed?(i=e.result,t.fromJSONData(i),t._openEvoFileCompleted.raiseEvent()):t._openEvoFileFailed.raiseEvent()}),this)}}buildUrl(e){var t=this._serverUrl,i=t.substr(t.length-1,1);return t+="/"===i?"smlInfos/":"/smlInfos/",t+=e+".json"}isCanCreateAnimation(e,t){return!(t===_0x18bc2f.SYMBOL_DOT&&e===_0x304306.ANIMATION_GROW||t===_0x18bc2f.SYMBOL_ALGO&&e===_0x304306.ANIMATION_SCALE)}}var _0x443c5f=(_0x36cb9a=!0,function(e,t){var i=_0x36cb9a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x36cb9a=!1,i}),_0x13af00=_0x443c5f(void 0,(function(){return _0x13af00.toString().search("(((.+)+)+)+$").toString().constructor(_0x13af00).search("(((.+)+)+)+$")})),_0x36cb9a;function _0x57693f(){}_0x13af00(),_0x57693f.extend=function(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},_0x57693f.copy=function(e,t){var i;if(e=e||{},t)for(var n in e)typeof(i=t[n])<"u"&&(e[n]=i)},_0x57693f.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"==typeof e[t]&&e[t]instanceof Array){for(var i in e[t])e[t][i].destroy&&e[t][i].destroy();e[t].length=0}else"object"==typeof e[t]&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},_0x57693f.getElement=function(){for(var e=[],t=0,i=arguments.length;t<i;t++){var n=arguments[t];if("string"==typeof n&&(n=document.getElementById(n)),1===arguments.length)return n;e.push(n)}return e},_0x57693f.isElement=function(e){return!(!e||1!==e.nodeType)},_0x57693f.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},_0x57693f.removeItem=function(e,t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1);return e},_0x57693f.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},_0x57693f.modifyDOMElement=function(e,t,i,n,r,o,a,s){t&&(e.id=t),i&&(e.style.left=i.x+"px",e.style.top=i.y+"px"),n&&(e.style.width=n.w+"px",e.style.height=n.h+"px"),r&&(e.style.position=r),o&&(e.style.border=o),a&&(e.style.overflow=a),parseFloat(s)>=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},_0x57693f.applyDefaults=function(e,t){e=e||{};var i="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!i&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!i&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},_0x57693f.getParameterString=function(e){var t=[];for(var i in e){var n=e[i];if(null!=n&&"function"!=typeof n){var r;if("object"==typeof n&&n.constructor===Array){for(var o,a=[],s=0,l=n.length;s<l;s++)o=n[s],a.push(encodeURIComponent(o??""));r=a.join(",")}else r=encodeURIComponent(n);t.push(encodeURIComponent(i)+"="+r)}}return t.join("&")},_0x57693f.urlAppend=function(e,t){var i=e;if(t){var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i},_0x57693f.DEFAULT_PRECISION=14,_0x57693f.toFloat=function(e,t){return null==t&&(t=_0x57693f.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},_0x57693f.rad=function(e){return e*Math.PI/180},_0x57693f.lastSeqID=0,_0x57693f.createUniqueID=function(e){return null==e&&(e="id_"),_0x57693f.lastSeqID+=1,e+_0x57693f.lastSeqID},_0x57693f.Browser=function(){var e,t="",i="",n="pc",r=navigator.userAgent.toLowerCase();return r.indexOf("msie")>-1||r.indexOf("trident")>-1&&r.indexOf("rv")>-1?(t="msie",e=r.match(/msie ([\d.]+)/)||r.match(/rv:([\d.]+)/)):r.indexOf("chrome")>-1?(t="chrome",e=r.match(/chrome\/([\d.]+)/)):r.indexOf("firefox")>-1?(t="firefox",e=r.match(/firefox\/([\d.]+)/)):r.indexOf("opera")>-1?(t="opera",e=r.match(/version\/([\d.]+)/)):r.indexOf("safari")>-1&&(t="safari",e=r.match(/version\/([\d.]+)/)),i=e?e[1]:"",r.indexOf("ipad")>-1||r.indexOf("ipod")>-1||r.indexOf("iphone")>-1?n="apple":r.indexOf("android")>-1&&(i=(e=r.match(/version\/([\d.]+)/))?e[1]:"",n="android"),{name:t,version:i,device:n}},_0x57693f.getBrowser=function(){var e,t="",i="",n="pc",r=navigator.userAgent.toLowerCase();return r.indexOf("msie")>-1||r.indexOf("trident")>-1&&r.indexOf("rv")>-1?(t="msie",e=r.match(/msie ([\d.]+)/)||r.match(/rv:([\d.]+)/)):r.indexOf("chrome")>-1?(t="chrome",e=r.match(/chrome\/([\d.]+)/)):r.indexOf("firefox")>-1?(t="firefox",e=r.match(/firefox\/([\d.]+)/)):r.indexOf("opera")>-1?(t="opera",e=r.match(/version\/([\d.]+)/)):r.indexOf("safari")>-1&&(t="safari",e=r.match(/version\/([\d.]+)/)),i=e?e[1]:"",r.indexOf("ipad")>-1||r.indexOf("ipod")>-1||r.indexOf("iphone")>-1?n="apple":r.indexOf("android")>-1&&(i=(e=r.match(/version\/([\d.]+)/))?e[1]:"",n="android"),{name:t,version:i,device:n}},_0x57693f.isSupportCanvas=function(){var e=!0,t=_0x57693f.getBrowser();return document.createElement("canvas").getContext?("firefox"===t.name&&parseFloat(t.version)<5&&(e=!1),"safari"===t.name&&parseFloat(t.version)<4&&(e=!1),"opera"===t.name&&parseFloat(t.version)<10&&(e=!1),"msie"===t.name&&parseFloat(t.version)<9&&(e=!1)):e=!1,e},_0x57693f.supportCanvas=function(){return _0x57693f.isSupportCanvas},_0x57693f.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l},_0x57693f.calculateDpi=function(e,t,i,n,r){if(e&&t&&i){var o,a=1e4,s=e.getWidth(),l=e.getHeight(),u=t.w,c=t.h;if(r=r||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){let e=s/u,t=l/c;o=254/(e>t?e:t)/i/(2*Math.PI*r/360)/a}else{o=254/(s/u)/i/a}return o}},_0x57693f.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var i=[],n=0,r=t.length;n<r;n++)i.push(_0x57693f.toJSON(t[n]));return"["+i.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){let e=[];for(let i=0,n=t.length;i<n;i++)e.push(_0x57693f.toJSON(t[i]));return"["+e.join(",")+"]"}let e=[];for(let i in t)"function"!=typeof t[i]&&"CLASS_NAME"!==i&&"parent"!==i&&e.push("'"+i+"':"+_0x57693f.toJSON(t[i]));return e.length>0?"{"+e.join(",")+"}":"{}"}return t.toString()}},_0x57693f.getScaleFromResolutionDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r:-1},_0x57693f.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},_0x57693f.copyAttributes=function(e,t){if(e=e||{},t)for(var i in t){var n=t[i];void 0!==n&&"CLASS_NAME"!==i&&"function"!=typeof n&&(e[i]=n)}return e},_0x57693f.copyAttributesWithClip=function(e,t,i){if(e=e||{},t)for(var n in t){var r=!1;if(i&&i.length)for(var o=0,a=i.length;o<a;o++)if(n===i[o]){r=!0;break}if(!0!==r){var s=t[n];void 0!==s&&"CLASS_NAME"!==n&&"function"!=typeof s&&(e[n]=s)}}return e},_0x57693f.cloneObject=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date){let t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.slice(0);if(e instanceof Object){let i={};for(var t in e)e.hasOwnProperty(t)&&(i[t]=_0x57693f.cloneObject(e[t]));return i}throw new Error("Unable to copy obj! Its type isn't supported.")},_0x57693f.getTextBounds=function(e,t,i){document.body.appendChild(i),i.style.width="auto",i.style.height="auto",e.fontSize&&(i.style.fontSize=e.fontSize),e.fontFamily&&(i.style.fontFamily=e.fontFamily),e.fontWeight&&(i.style.fontWeight=e.fontWeight),i.style.position="relative",i.style.visibility="hidden",i.style.display="inline-block",i.innerHTML=t;var n=i.clientWidth,r=i.clientHeight;return document.body.removeChild(i),{textWidth:n,textHeight:r}},_0x57693f.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=Util.toJSON(e[t]));var i=encodeURIComponent(e[t]);this.queryValues.push(i)}},issue:function(e){for(var t=this,i=t.getUid(),n=e.url,r=[],o=new Promise((function(e){t.supermap_callbacks[i]=function(n){delete t.supermap_callbacks[i],e(n)}})),a=n,s=0,l=t.queryKeys?t.queryKeys.length:0,u=0;u<l;u++)if(a.length+t.queryKeys[u].length+2>=t.limitLength){if(0==s)return!1;r.push(a),a=n,s=0,u--}else if(a.length+t.queryKeys[u].length+2+t.queryValues[u].length>t.limitLength)for(var c=t.queryValues[u];c.length>0;){var h=t.limitLength-a.length-t.queryKeys[u].length-2;a.indexOf("?")>-1?a+="&":a+="?";var d=c.substring(0,h);"%"===d.substring(h-1,h)?(h-=1,d=c.substring(0,h)):"%"===d.substring(h-2,h-1)&&(h-=2,d=c.substring(0,h)),a+=t.queryKeys[u]+"="+d,c=c.substring(h),d.length>0&&(r.push(a),a=n,s=0)}else s++,a.indexOf("?")>-1?a+="&":a+="?",a+=t.queryKeys[u]+"="+t.queryValues[u];return r.push(a),t.send(r,"Util.RequestJSONPPromise.supermap_callbacks["+i+"]",e&&e.proxy),o},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,i){var n=e.length;if(n>0)for(var r=(new Date).getTime(),o=0;o<n;o++){var a=e[o];a.indexOf("?")>-1?a+="&":a+="?",a+="sectionCount="+n,a+="§ionIndex="+o,a+="&jsonpUserID="+r,i&&(a=decodeURIComponent(a),a=i+encodeURIComponent(a)),fetchJsonp(a,{jsonpCallbackFunction:t,timeout:3e4})}},GET:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings(e.params),t.issue(e)},POST:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)},PUT:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)},DELETE:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)}},_0x57693f.urlPathAppend=function(e,t){let i=e;if(!t)return i;0===t.indexOf("/")&&(t=t.substring(1));const n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),i=""+n[0]+t+(n.length>1?"?"+n[1]:""),i};var _0x4f2fe2={observers:!1,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(e){return e.target||e.srcElement},isSingleTouch:function(e){return e.touches&&1===e.touches.length},isMultiTouch:function(e){return e.touches&&e.touches.length>1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var i=_0x4f2fe2.element(e);i.parentNode&&(!i.tagName||i.tagName.toUpperCase()!=t.toUpperCase());)i=i.parentNode;return i},observe:function(e,t,i,n){var r,o=(r=!0,function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}),a=o(this,(function(){return a.toString().search("(((.+)+)+)+$").toString().constructor(a).search("(((.+)+)+)+$")}));a();var s=_0x57693f.getElement(e);if(n=n||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||s.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!s._eventCacheID){var l="eventCacheID_";s.id&&(l=s.id+"_"+l),s._eventCacheID=_0x57693f.createUniqueID(l)}var u=s._eventCacheID;this.observers[u]||(this.observers[u]=[]),this.observers[u].push({element:s,name:t,observer:i,useCapture:n}),s.addEventListener?s.addEventListener(t,i,n):s.attachEvent&&s.attachEvent("on"+t,i)},stopObservingElement:function(e){var t=_0x57693f.getElement(e)._eventCacheID;this._removeElementObservers(_0x4f2fe2.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var i=e[t],n=new Array(i.element,i.name,i.observer,i.useCapture);_0x4f2fe2.stopObserving.apply(this,n)}},stopObserving:function(e,t,i,n){n=n||!1;var r=_0x57693f.getElement(e),o=r._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||r.detachEvent)&&(t="keydown");var a=!1,s=_0x4f2fe2.observers[o];if(s)for(var l=0;!a&&l<s.length;){var u=s[l];if(u.name===t&&u.observer===i&&u.useCapture===n){s.splice(l,1),0==s.length&&delete _0x4f2fe2.observers[o],a=!0;break}l++}return a&&(r.removeEventListener?r.removeEventListener(t,i,n):r&&r.detachEvent&&r.detachEvent("on"+t,i)),a},unloadCache:function(){if(_0x4f2fe2&&_0x4f2fe2.observers){for(var e in _0x4f2fe2.observers){var t=_0x4f2fe2.observers[e];_0x4f2fe2._removeElementObservers.apply(this,[t])}_0x4f2fe2.observers=!1}},CLASS_NAME:"SuperMap.PlotEvent"};_0x4f2fe2.observe(window,"unload",_0x4f2fe2.unloadCache,!1);var _0x26bdcc=(_0xfb7a6c=!0,function(e,t){var i=_0xfb7a6c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xfb7a6c=!1,i}),_0x1bca5b=_0x26bdcc(void 0,(function(){return _0x1bca5b.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bca5b).search("(((.+)+)+)+$")})),_0xfb7a6c;_0x1bca5b();class _0x3d7456{constructor(e,t,i,n,r){if(this.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"],this.listeners={},this.object=e,this.element=null,this.eventTypes=[],this.eventHandler=null,this.fallThrough=n,this.includeXY=!1,this.extensions={},this.extensionCount={},this.clearMouseListener=null,this.extend(this,r),null!=i)for(var o=0,a=i.length;o<a;o++)this.addEventType(i[o]);null!=t&&this.attachToElement(t),this.CLASS_NAME="SuperMap.Events"}destroy(){for(var e in this.extensions)"boolean"!=typeof this.extensions[e]&&this.extensions[e].destroy();this.extensions=null,this.element&&(_0x4f2fe2.stopObservingElement(this.element),this.element.hasScrollEvent&&_0x4f2fe2.stopObserving(window,"scroll",this.clearMouseListener)),this.element=null,this.listeners=null,this.object=null,this.eventTypes=null,this.fallThrough=null,this.eventHandler=null}addEventType(e){this.listeners[e]||(this.eventTypes.push(e),this.listeners[e]=[])}attachToElement(e){this.element?_0x4f2fe2.stopObservingElement(this.element):(this.eventHandler=FunctionExt.bindAsEventListener(this.handleBrowserEvent,this),this.clearMouseListener=FunctionExt.bind(this.clearMouseCache,this)),this.element=e;for(var t=0,i=this.BROWSER_EVENTS.length;t<i;t++){var n=this.BROWSER_EVENTS[t];this.addEventType(n),_0x4f2fe2.observe(e,n,this.eventHandler)}_0x4f2fe2.observe(e,"dragstart",_0x4f2fe2.stop)}on(e){for(var t in e)"scope"!==t&&void 0!==e[t]&&this.register(t,e.scope,e[t])}register(e,t,i,n){if(e in _0x3d7456&&!this.extensions[e]&&(this.extensions[e]=new _0x3d7456[e](this)),null!=i&&-1!==_0x57693f.indexOf(this.eventTypes,e)){null==t&&(t=this.object);var r=this.listeners[e];r||(r=[],this.listeners[e]=r,this.extensionCount[e]=0);var o={obj:t,func:i};n?(r.splice(this.extensionCount[e],0,o),"object"===Events_typeof(n)&&n.extension&&this.extensionCount[e]++):r.push(o)}}registerPriority(e,t,i){this.register(e,t,i,!0)}un(e){for(var t in e)"scope"!==t&&void 0!==e.type&&this.unregister(t,e.scope,e[t])}unregister(e,t,i){null==t&&(t=this.object);var n=this.listeners[e];if(null!=n)for(var r=0,o=n.length;r<o;r++)if(n[r].obj===t&&n[r].func===i){n.splice(r,1);break}}remove(e){null!=this.listeners[e]&&(this.listeners[e]=[])}triggerEvent(e,t){var i=this.listeners[e];if(i&&0!=i.length){null==t&&(t={}),t.object=this.object,t.element=this.element,t.type||(t.type=e);for(var n,r=0,o=(i=i.slice()).length;r<o;r++){var a=i[r];if(null!=(n=a.func.apply(a.obj,[t]))&&!1===n)break}return this.fallThrough||_0x4f2fe2.stop(t,!0),n}}handleBrowserEvent(e){var t=e.type,i=this.listeners[t];if(i&&0!=i.length){var n=e.touches;if(n&&n[0]){for(var r,o=0,a=0,s=n.length,l=0;l<s;++l)o+=(r=n[l]).clientX,a+=r.clientY;e.clientX=o/s,e.clientY=a/s}this.includeXY&&(e.xy=this.getMousePosition(e)),this.triggerEvent(t,e)}}clearMouseCache(){this.element.scrolls=null,this.element.lefttop=null;var e=document.body;e&&(0==e.scrollTop&&0==e.scrollLeft||!navigator.userAgent.match(/iPhone/i))&&(this.element.offsets=null)}getMousePosition(e){if(this.includeXY?this.element.hasScrollEvent||(_0x4f2fe2.observe(window,"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0):this.clearMouseCache(),!this.element.scrolls){var t=_0x57693f.getViewportElement();this.element.scrolls=[t.scrollLeft,t.scrollTop]}return this.element.lefttop||(this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0]),this.element.offsets||(this.element.offsets=_0x57693f.pagePosition(this.element)),new Pixel(e.clientX+this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],e.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1])}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x3797bf=(_0x1e6a04=!0,function(e,t){var i=_0x1e6a04?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e6a04=!1,i}),_0x5c6301=_0x3797bf(void 0,(function(){return _0x5c6301.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c6301).search("(((.+)+)+)+$")})),_0x1e6a04;_0x5c6301();class _0x5ab2f6{constructor(e,t){this.value=e||"",this.name=t||"token",this.CLASS_NAME="SuperMap.PlotCredential"}getUrlParameters(){return this.name+"="+this.value}getValue(){return this.value}destroy(){this.value=null,this.name=null}}var _0x4f9d21=(_0x5cbbd6=!0,function(e,t){var i=_0x5cbbd6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5cbbd6=!1,i}),_0x247dbb=_0x4f9d21(void 0,(function(){return _0x247dbb.toString().search("(((.+)+)+)+$").toString().constructor(_0x247dbb).search("(((.+)+)+)+$")})),_0x5cbbd6;_0x247dbb();var _0x139385={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function _0x1aa4fb(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function _0x9fbd10(e){try{delete window[e]}catch{window[e]=void 0}}function _0x37c86e(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}var _0x4c2451=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=e,n=t.timeout||_0x139385.timeout,r=t.jsonpCallback||_0x139385.jsonpCallback,o=void 0;return new Promise((function(a,s){var l=t.jsonpCallbackFunction||_0x1aa4fb(),u=r+"_"+l;window[l]=function(e){a({ok:!0,json:function(){return Promise.resolve(e)}}),o&&clearTimeout(o),_0x37c86e(u),_0x9fbd10(l)},i+=-1===i.indexOf("?")?"?":"&";var c=document.createElement("script");c.setAttribute("src",""+i+r+"="+l),t.charset&&c.setAttribute("charset",t.charset),c.id=u,document.getElementsByTagName("head")[0].appendChild(c),o=setTimeout((function(){s(new Error("JSONP request to "+e+" timed out")),_0x9fbd10(l),_0x37c86e(u),window[l]=function(){_0x9fbd10(l)}}),n),c.onerror=function(){s(new Error("JSONP request to "+e+" failed")),_0x9fbd10(l),_0x37c86e(u),o&&clearTimeout(o)}}))},_0x8a4f6d=(_0x1f4c2b=!0,function(e,t){var i=_0x1f4c2b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f4c2b=!1,i}),_0x58a0ed=_0x8a4f6d(void 0,(function(){return _0x58a0ed.toString().search("(((.+)+)+)+$").toString().constructor(_0x58a0ed).search("(((.+)+)+)+$")})),_0x1f4c2b;_0x58a0ed();const _0x35228f=window.fetch;window.setCORS=function(e){window.CORS=e};var isCORS=window.isCORS=function(){return null!=window.CORS?window.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest};window.setRequestTimeout=function(e){return window.RequestTimeout=e};var getRequestTimeout=window.getRequestTimeout=function(){return window.RequestTimeout||45e3},_0x363434={commit:function(e,t,i,n){switch(e=e&&e.toUpperCase()){case"GET":default:return this.get(t,i,n);case"POST":return this.post(t,i,n);case"PUT":return this.put(t,i,n);case"DELETE":return this.delete(t,i,n)}},supportDirectRequest:function(e,t){return!!_0x57693f.isInTheSameDomain(e)||(null!=t.crossOrigin?t.crossOrigin:isCORS()||t.proxy)},get:function(e,t,i){i=i||{};if(e=_0x57693f.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){var n={url:e=e.replace(".json",".jsonp"),data:t};return _0x57693f.RequestJSONPPromise.GET(n)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")-1),t,i):this._fetch(e,t,i,"GET")},delete:function(e,t,i){i=i||{};var n="DELETE";if(e=_0x57693f.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=DELETE",data:t};return _0x57693f.RequestJSONPPromise.DELETE(r)}return this.urlIsLong(e)?this._postSimulatie(n,e.substring(0,e.indexOf("?")-1),t,i):this._fetch(e,t,i,n)},post:function(e,t,i){if(i=i||{},!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=POST",data:t};return _0x57693f.RequestJSONPPromise.POST(n)}return this._fetch(this._processUrl(e,i),t,i,"POST")},put:function(e,t,i){if(i=i||{},e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=PUT",data:t};return _0x57693f.RequestJSONPPromise.PUT(n)}return this._fetch(e,t,i,"PUT")},urlIsLong:function(e){for(var t=0,i=null,n=0,r=e.length;n<r;n++)(i=e.charCodeAt(n))<127?t++:128<=i&&i<=2047?t+=2:2048<=i&&i<=65535&&(t+=3);return!(t<2e3)},_postSimulatie:function(e,t,i,n){var r=t.indexOf("?")>-1?"&":"?";return t+=r+"_method="+e,"string"!=typeof i&&(i=JSON.stringify(i)),this.post(t,i,n)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var i=e.split("?");2===i.length&&(e=i[0]+".json?"+i[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,i,n){return(i=i||{}).headers=i.headers||{},!i.headers["Content-Type"]&&!FormData.prototype.isPrototypeOf(t)&&(i.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),i.timeout?this._timeout(i.timeout,_0x35228f(e,{method:n,headers:i.headers,body:"PUT"===n||"POST"===n?t:void 0,credentials:this._getWithCredentials(i),mode:"cors",timeout:getRequestTimeout()}).then((function(e){return e}))):_0x35228f(e,{method:n,body:"PUT"===n||"POST"===n?t:void 0,headers:i.headers,credentials:this._getWithCredentials(i),mode:"cors",timeout:getRequestTimeout()}).then((function(e){return e}))},_getWithCredentials:function(e){return!0===e.withCredentials?"include":!1===e.withCredentials?"omit":"same-origin"},_fetchJsonp:function(e,t){return t=t||{},_0x4c2451()(e,{method:"GET",timeout:t.timeout}).then((function(e){return e}))},_timeout:function(e,t){return new Promise((function(i,n){setTimeout((function(){n(new Error("timeout"))}),e),t.then(i,n)}))},_getParameterString:function(e){var t=[];for(var i in e){var n,r=e[i];if(null!=r&&"function"!=typeof r)n=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(i)+"="+n)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}},_0x334c9a=(_0x1991b8=!0,function(e,t){var i=_0x1991b8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1991b8=!1,i}),_0x5e2691=_0x334c9a(void 0,(function(){return _0x5e2691.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e2691).search("(((.+)+)+)+$")})),_0x1991b8;function _0x1d93f7(){}_0x5e2691(),_0x1d93f7.bind=function(e,t){var i=Array.prototype.slice.apply(arguments,[2]);return function(){var n=i.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,n)}},_0x1d93f7.bindAsEventListener=function(e,t){return function(i){return e.call(t,i||window.event)}},_0x1d93f7.False=function(){return!1},_0x1d93f7.True=function(){return!0},_0x1d93f7.Void=function(){};var _0x41c393=(_0x100775=!0,function(e,t){var i=_0x100775?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x100775=!1,i}),_0x5dae2a=_0x41c393(void 0,(function(){return _0x5dae2a.toString().search("(((.+)+)+)+$").toString().constructor(_0x5dae2a).search("(((.+)+)+)+$")})),_0x100775;_0x5dae2a();class _0x398ff2{constructor(e){this.data=null,this.keepData=!1,_0x57693f.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format"}destroy(){}read(e){}write(e){}}var _0x276a38=(_0x10f0e9=!0,function(e,t){var i=_0x10f0e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x10f0e9=!1,i}),_0x4d83ca=_0x276a38(void 0,(function(){return _0x4d83ca.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d83ca).search("(((.+)+)+)+$")})),_0x10f0e9;_0x4d83ca();class _0x3ca704 extends _0x398ff2{constructor(e){super(e),this.indent=" ",this.space=" ",this.newline="\n",this.level=0,this.pretty=!1,this.nativeJSON=!(!window.JSON||"function"!=typeof JSON.parse||"function"!=typeof JSON.stringify),this.CLASS_NAME="SuperMap.Format.JSON",this.serialize={object:function(e){if(null==e)return"null";if(e.constructor===Date)return this.serialize.date.apply(this,[e]);if(e.constructor===Array)return this.serialize.array.apply(this,[e]);var t=["{"];this.level+=1;var i,n,r,o=!1;for(i in e)e.hasOwnProperty(i)&&(n=this.write.apply(this,[i,this.pretty]),r=this.write.apply(this,[e[i],this.pretty]),null!=n&&null!=r&&(o&&t.push(","),t.push(this.writeNewline(),this.writeIndent(),n,":",this.writeSpace(),r),o=!0));return this.level-=1,t.push(this.writeNewline(),this.writeIndent(),"}"),t.join("")},array:function(e){var t,i=["["];this.level+=1;for(var n=0,r=e.length;n<r;++n)null!=(t=this.write.apply(this,[e[n],this.pretty]))&&(n>0&&i.push(","),i.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,i.push(this.writeNewline(),this.writeIndent(),"]"),i.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,(function(e,i){var n=t[i];return n||(n=i.charCodeAt(),"\\u00"+Math.floor(n/16).toString(16)+(n%16).toString(16))}))+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}}}read(e,t){var i;if(this.nativeJSON)try{i=JSON.parse(e,t)}catch{}return this.keepData&&(this.data=i),i}write(e,t){this.pretty=!!t;var i=null,n=typeof e;if(this.serialize[n])try{i=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[n].apply(this,[e])}catch{}return i}writeIndent(){var e=[];if(this.pretty)for(var t=0;t<this.level;++t)e.push(this.indent);return e.join("")}writeNewline(){return this.pretty?this.newline:""}writeSpace(){return this.pretty?this.space:""}}var _0x47ccf7=(_0x34679f=!0,function(e,t){var i=_0x34679f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x34679f=!1,i}),_0xb36e6f=_0x47ccf7(void 0,(function(){return _0xb36e6f.toString().search("(((.+)+)+)+$").toString().constructor(_0xb36e6f).search("(((.+)+)+)+$")})),_0x34679f;_0xb36e6f();class _0xd9c3dd{constructor(e,t){var i=this;this.EVENT_TYPES=["processCompleted","processFailed"],this.events=null,this.eventListeners=null,this.url=null,this.urls=null,this.proxy=null,this.index=null,this.length=null,this.options=null,this.totalTimes=null,this.POLLING_TIMES=3,this._processSuccess=null,this._processFailed=null,this.isInTheSameDomain=null,this.withCredentials=!1,Array.isArray(e)?(i.urls=e,i.length=e.length,i.totalTimes=i.length,1===i.length?i.url=e[0]:(i.index=parseInt(Math.random()*i.length),i.url=e[i.index])):(i.totalTimes=1,i.url=e),Array.isArray(e)&&!i.isServiceSupportPolling()&&(i.url=e[0],i.totalTimes=1),t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,this.extend(this,t),i.isInTheSameDomain=this.isInTheSameDomainFnc(i.url),i.events=new _0x3d7456(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){var e=this;_0x57693f.isArray(e.urls)&&(e.urls=null,e.index=null,e.length=null,e.totalTimes=null),e.url=null,e.options=null,e._processSuccess=null,e._processFailed=null,e.isInTheSameDomain=null,e.EVENT_TYPES=null,e.events&&(e.events.destroy(),e.events=null),e.eventListeners&&(e.eventListeners=null)}request(e){var t=this;e.url=e.url||t.url,e.proxy=e.proxy||t.proxy,e.withCredentials=null!=e.withCredentials?e.withCredentials:t.withCredentials,e.crossOrigin=null!=e.crossOrigin?e.crossOrigin:t.crossOrigin,e.headers=e.headers||t.headers,e.isInTheSameDomain=t.isInTheSameDomain,e.url=this.appendCredential(e.url),t.calculatePollingTimes(),t._processSuccess=e.success,t._processFailed=e.failure,e.scope=t,e.success=t.getUrlCompleted,e.failure=t.getUrlFailed,t.options=e,t._commit(t.options)}getUrlCompleted(e){this._processSuccess(e)}getUrlFailed(e){var t=this;t.totalTimes>0?(t.totalTimes--,t.ajaxPolling()):t._processFailed(e)}ajaxPolling(){var e=this,t=e.options.url,i=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(i,i.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=this.isInTheSameDomainFnc(t),e._commit(e.options)}calculatePollingTimes(){var e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.times<e.totalTimes&&(e.totalTimes=e.times):e.totalTimes>e.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}isServiceSupportPolling(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}serviceProcessCompleted(e){e=_0x57693f.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){var t=(e=_0x57693f.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){if("POST"===e.method||"PUT"===e.method||"PATCH"===e.method)if(e.params&&(e.url=_0x57693f.urlAppend(e.url,_0x57693f.getParameterString(e.params||{}))),"object"==typeof e.data)try{e.params=_0x57693f.toJSON(e.data)}catch{console.log("不是json对象")}else e.params=e.data;_0x363434.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then((function(e){return e.text?e.text():e.json?e.json():e})).then((function(e){var t=e;return"string"==typeof e&&(t=(new _0x3ca704).read(e)),(!t||t.error||t.code>=300&&304!==t.code)&&(t=t&&t.error?{error:t.error}:{error:t}),t})).catch((function(e){return{error:e}})).then((function(t){t.error?(e.scope?_0x1d93f7.bind(e.failure,e.scope):e.failure)(t):(t.succeed=null==t.succeed||t.succeed,(e.scope?_0x1d93f7.bind(e.success,e.scope):e.success)(t))}))}isInTheSameDomainFnc(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}appendCredential(e){var t=e,i=this.getToken(e),n=i?new _0x5ab2f6(i,"token"):null;return n||(n=(i=this.getKey(e))?new _0x5ab2f6(i,"key"):null),n&&(t=this.urlAppend(t,n.getUrlParameters())),t}getToken(e){if(e){this.tokens=this.tokens||{};var t=this._getTokenStorageKey(e);return this.tokens[t]}}_getTokenStorageKey(e){var t=e.match(/(.*?):\/\/([^\/]+)/i);return t?t[0]:e}getKey(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;return this.keys[t]}_getUrlRestString(e){if(!e)return e;var t=e.match(/(http|https):\/\/(.*\/rest)/i);return t?t[0]:e}urlAppend(e,t){var i=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i}}var _0x1a2376=(_0x5a5fb7=!0,function(e,t){var i=_0x5a5fb7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a5fb7=!1,i}),_0x2aeeac=_0x1a2376(void 0,(function(){return _0x2aeeac.toString().search("(((.+)+)+)+$").toString().constructor(_0x2aeeac).search("(((.+)+)+)+$")})),_0x5a5fb7;_0x2aeeac();class _0x1393d7 extends _0xd9c3dd{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.PlotCommonServiceBase"}destroy(){super.destroy()}_commit(e){("POST"===e.method||"PUT"===e.method)&&(e.params&&(e.url=SuperMap.Util.urlAppend(e.url,SuperMap.Util.getParameterString(e.params||{}))),e.params=e.data),_0x363434.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then((function(e){return e.text()})).then((function(t){var i=(new _0x3ca704).read(t);(i||(i={error:t}),i.error)?(e.scope?_0x1d93f7.bind(e.failure,e.scope):e.failure)(i.error):(i.succeed=null==i.succeed||i.succeed,(e.scope?_0x1d93f7.bind(e.success,e.scope):e.success)(i))}))}}var _0xad4461=(_0x1b8362=!0,function(e,t){var i=_0x1b8362?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b8362=!1,i}),_0x2c7e7e=_0xad4461(void 0,(function(){return _0x2c7e7e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c7e7e).search("(((.+)+)+)+$")})),_0x1b8362;_0x2c7e7e();class _0x5ad32f extends _0x1393d7{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"symbolLibs.json?":"/symbolLibs.json?",this.CLASS_NAME="SuperMap.GetLibIDsService"}destroy(){super.destroy()}processAsync(){var e=this;e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x6d00eb=(_0x45038f=!0,function(e,t){var i=_0x45038f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45038f=!1,i}),_0x2a004e=_0x6d00eb(void 0,(function(){return _0x2a004e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a004e).search("(((.+)+)+)+$")})),_0x45038f;_0x2a004e();class GetLibInfoService extends _0x1393d7{constructor(e,t){super(e,t),(t=t||{})&&_0x57693f.extend(this,t);var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"symbolLibs/":"/symbolLibs/",this.CLASS_NAME="SuperMap.GetLibInfoService"}destroy(){super.destroy()}processAsync(e){var t=this;e&&null!==e.libID&&(t.libID=e.libID),t.url+=t.libID,t.url+=".json",t.request({method:"GET",data:null,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}var _0x46ae46=(_0x2d8b7f=!0,function(e,t){var i=_0x2d8b7f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d8b7f=!1,i}),_0x1cdd2c=_0x46ae46(void 0,(function(){return _0x1cdd2c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cdd2c).search("(((.+)+)+)+$")})),_0x2d8b7f;function _0xdf8675(e,t){this.options=t,this.url=e}_0x1cdd2c(),_0xdf8675.prototype.getLibIDs=function(e,t){var i=this;return t||(t=i),new _0x5ad32f(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync(),i},_0xdf8675.prototype.getLibInfo=function(e,t,i){var n=this;return i||(i=n),new GetLibInfoService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n};const _0x48a002=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1001fe=_0x48a002(void 0,(function(){return _0x1001fe.toString().search("(((.+)+)+)+$").toString().constructor(_0x1001fe).search("(((.+)+)+)+$")}));function _0x570598(e){e=e||{},this.libID=e.libID,this.code=e.code,this.inputPoints=e.inputPoints?e.inputPoints:null,this.symbolRank=e.symbolRank?e.symbolRank:0,this.negativeImage=!!e.negativeImage&&e.negativeImage,this.surroundLineType=e.surroundLineType?e.surroundLineType:0,this.subSymbols=e.subSymbols?e.subSymbols:null,this.scaleValues=e.scaleValues?e.scaleValues:null,this.scalePoints=e.scalePoints?e.scalePoints:null,this.newScalePoint=e.newScalePoint?e.newScalePoint:null,this.newScalePointIndex=e.newScalePointIndex?e.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}_0x1001fe(),_0x570598.prototype.destroy=function(){var e=this;e.libID=null,e.code=null,e.inputPoints=null,e.symbolRank=null,e.negativeImage=null,e.surroundLineType=null,e.subSymbols=null,e.scaleValues=null,e.scalePoints=null,e.newScalePoint=null,e.newScalePointIndex=null},_0x570598.toUrlParameters=function(e){if(e&&null!==e.libID&&null!==e.code){var t="libID="+encodeURIComponent(e.libID)+"&code="+encodeURIComponent(e.code);if(e.inputPoints&&null!==e.inputPoints&&0!==e.inputPoints.length){let i="[";for(let t=0;t<e.inputPoints.length;t++)t===e.inputPoints.length-1?i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"}]":i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"},";t+="&inputPoints="+encodeURIComponent(i)}if(e.scalePoints&&null!==e.scalePoints&&0!==e.scalePoints.length){let i="[";for(let t=0;t<e.scalePoints.length;t++)t===e.scalePoints.length-1?i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"}]":i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"},";t+="&scalePoints="+encodeURIComponent(i)}if(e.scaleValues&&null!==e.scaleValues&&0!==e.scaleValues.length){let i="[";for(let t=0;t<e.scaleValues.length;t++)t===e.scaleValues.length-1?i+=e.scaleValues[t]+"]":i+=e.scaleValues[t]+",";t+="&scaleValues="+encodeURIComponent(i)}if(e.subSymbols&&null!==e.subSymbols&&0!==e.subSymbols.length){let i="[";for(let t=0;t<e.subSymbols.length;t++)t===e.subSymbols.length-1?i+=e.subSymbols[t].code+"]":i+=e.subSymbols[t].code+",";t+="&subSymbols="+encodeURIComponent(i)}return e.newScalePoint&&null!==e.newScalePoint&&(t+="&newScalePoint="+encodeURIComponent('{"x":'+e.newScalePoint.x+', "y":'+e.newScalePoint.y+"}")),e.newScalePointIndex&&null!==e.newScalePointIndex&&(t+="&newScalePointIndex="+encodeURIComponent(e.newScalePointIndex)),e.symbolRank&&null!==e.symbolRank&&(t+="&symbolRank="+encodeURIComponent(e.symbolRank)),e.negativeImage&&null!==e.negativeImage&&(t+="&negativeImage="+encodeURIComponent(e.negativeImage)),e.surroundLineType&&null!==e.surroundLineType&&(t+="&surroundLineType="+encodeURIComponent(e.surroundLineType)),t}};var _0x4db32f=(_0x49f9f6=!0,function(e,t){var i=_0x49f9f6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49f9f6=!1,i}),_0x258540=_0x4db32f(void 0,(function(){return _0x258540.toString().search("(((.+)+)+)+$").toString().constructor(_0x258540).search("(((.+)+)+)+$")})),_0x49f9f6;function _0x4657e6(e){this.cachecompleted=new WebGLPlot.Event,this.cachedSymbolList={},this.needCacheList=[],this.symbolNames=null,this.symbolLibData=null,this.plottingID=e.plottingID,this.cachedSymbolOK=!1,e&&_0x57693f.extend(this,e),e&&e.url&&e.libID?(this.url=e.url,this.libID=e.libID):e&&e.symbolLibData&&(this.symbolLibData=e.symbolLibData,this.libID=this.symbolLibData.libID,this.initNeedCacheList())}_0x258540(),_0x4657e6.prototype.initNeedCacheList=function(){if(!this.symbolLibData||!this.symbolLibData.rootSymbolLibNode)return!1;this.initNeedCacheListForNode(this.symbolLibData.rootSymbolLibNode)},_0x4657e6.prototype.initNeedCacheListForNode=function(e,t){for(var i=0;i<e.childNodeCount;i++)"SYMBOL_GROUP"===e.childNodes[i].symbolNodeType?this.initNeedCacheListForNode(e.childNodes[i]):"SYMBOL_NODE"===e.childNodes[i].symbolNodeType&&this.needCacheList.push(e.childNodes[i].symbolCode)},_0x4657e6.prototype.destroy=function(){this.url=null,this.libID=null,this.symbolLibData=null},_0x4657e6.prototype.cachedSymbols=function(){var e=this;if(0!==this.needCacheList.length){for(var t=this.needCacheList.slice(),i=0,n=t.length;i<n;i++){var r=new _0x570598;r.libID=this.libID,r.code=t[i];var o=WebGLPlot.getServerData(this.libID,t[i],void 0,this.plottingID);if(!o)return;o.getSymbolInfo.events.on({processCompleted:a,processFailed:a,scope:e}),o.getSymbolInfo.processAsync(o.getSymbolInfoParameters)}this.cachedSymbolOK=!0}else this.cachecompleted.raiseEvent({success:!0});function a(t){t.result.succeed&&(e.cacheSymbolData(t.result),0===e.needCacheList.length&&e.cachecompleted.raiseEvent({success:!0}))}},_0x4657e6.prototype.cacheSymbolData=function(e){var t=_0x57693f.indexOf(this.needCacheList,e.code);-1!==t&&(this.cachedSymbolList[e.code]=SuperMapAlgoPlot.PlottingUtil.cloneObject(e),this.needCacheList.splice(t,1))},_0x4657e6.prototype.getClassFication=function(){return null===this.symbolLibData?null:this.symbolLibData.classFication},_0x4657e6.prototype.getCreateTime=function(){return null===this.symbolLibData?null:this.symbolLibData.createTime},_0x4657e6.prototype.getCreator=function(){return null===this.symbolLibData?null:this.symbolLibData.creator},_0x4657e6.prototype.getModifyTime=function(){return null===this.symbolLibData?null:this.symbolLibData.modifyTime},_0x4657e6.prototype.getRootSymbolIconUrl=function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolIconUrl},_0x4657e6.prototype.getRootSymbolInfo=function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolLibNode},_0x4657e6.prototype.getSymbolCount=function(){return null===this.symbolLibData?null:this.symbolLibData.symbolCount},_0x4657e6.prototype.getSymbolData=function(e){var t=null;return this.cachedSymbolList.hasOwnProperty(e)&&(t=SuperMapAlgoPlot.PlottingUtil.cloneObject(this.cachedSymbolList[e])),t},_0x4657e6.prototype.setSymbolData=function(e){this.cacheSymbolData(e)},_0x4657e6.prototype.getSymbolLibID=function(){return this.libID},_0x4657e6.prototype.getSymbolLibName=function(){return null===this.symbolLibData?null:this.symbolLibData.symbolLibName},_0x4657e6.prototype.getSymbolName=function(e){return null===this.symbolLibData?"":(null===this.symbolNames&&(this.symbolNames={},this.getSymbolNameFromList(this.symbolLibData.rootSymbolLibNode)),this.symbolNames[e])},_0x4657e6.prototype.getVersion=function(){return null===this.symbolLibData?null:this.symbolLibData.version},_0x4657e6.prototype.querySymbolbyKey=function(e){return this.querySymbol(e,this.getRootSymbolInfo(),this.getRootSymbolIconUrl())},_0x4657e6.prototype.querySymbol=function(e,t,i){var n=[];if("SYMBOL_GROUP"===t.symbolNodeType)for(var r=0;r<t.childNodes.length;r++)for(var o=i+"/"+t.symbolName,a=this.querySymbol(e,t.childNodes[r],o),s=0;s<a.length;s++)n.push(a[s]);else(e===t.symbolCode.toString()||-1!==t.symbolName.indexOf(e))&&(t.icon=i+"/"+t.symbolCode+".png",n.push(t));return n};var _0x2e1e36=(_0x1fee71=!0,function(e,t){var i=_0x1fee71?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fee71=!1,i}),_0x15de47=_0x2e1e36(void 0,(function(){return _0x15de47.toString().search("(((.+)+)+)+$").toString().constructor(_0x15de47).search("(((.+)+)+)+$")})),_0x1fee71;_0x15de47();class _0x23d9b2{constructor(e){e=e||{},this.libID=e.libID,this.CLASS_NAME="SuperMap.GetLibInfoParameter"}destroy(){this.libID=null}}var _0x4c34a5=(_0x295cd3=!0,function(e,t){var i=_0x295cd3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x295cd3=!1,i}),_0x496b4d=_0x4c34a5(void 0,(function(){return _0x496b4d.toString().search("(((.+)+)+)+$").toString().constructor(_0x496b4d).search("(((.+)+)+)+$")})),_0x295cd3;_0x496b4d();var _0x903beb=new Map;function _0x298073(e,t){if(this.useServerData=!0,(!WebGLPlot.defined(e)||0===e.length)&&this.useServerData)throw new WebGLPlot.DeveloperError("url is required to initialize SymbolLibManager");this.url=e,this.libIDs=null,this.symbolLibs=[],this.symbolLibJsons=[],this.isInializeOK=!1,this.initializecompleted=new WebGLPlot.Event,this.cachecompleted=new WebGLPlot.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},t&&t.serviceParams&&_0x57693f.extend(this.options,t),(!this.useServerData||!e||0===e.length)&&this.loadLocalLib()}_0x298073.getInstance=function(e,t,i){let n=_0x903beb.get(i);return!WebGLPlot.defined(n)&&WebGLPlot.defined(i)&&(n=new _0x298073(e,t),n.plottingID=i,_0x903beb.set(i,n)),n},_0x298073.prototype.loadLocalLib=function(e){var t="js/plotPanelControl/LocalLib.json";WebGLPlot.defined(e)&&""!==e&&(t=e);var i=this;if(void 0===$.getJSON())throw new WebGLPlot.DeveloperError("jQuery is needed");$.getJSON(t,(function(e){(!WebGLPlot.defined(i.localSymbolLibData)||null===i.localSymbolLibData)&&(i.localSymbolLibData={}),i.localSymbolLibData[e.libID]=e}))},_0x298073.prototype.initialize=function(e,t){this.url=e,null===this.libIDs&&(this.libIDs=[]),null===this.symbolLibs&&(this.symbolLibs=[]),null===this.symbolLibJsons&&(this.symbolLibJsons=[]),t&&_0x57693f.extend(this,t)},_0x298073.prototype.destroy=function(){this.url=null,this.libIDs=[],this.symbolLibs=[],this.symbolLibJsons=[],this.isInializeOK=!1,this.isInitialize=!1,this.localSymbolLibData={}},_0x298073.prototype.initializeAsync=function(e){this.isInitializeOK()?this.initializecompleted.raiseEvent({success:!0,libIDs:this.libIDs}):this.isInitialize||(this.isInitialize=!0,new _0xdf8675(this.url,this.options.serviceParams).getLibIDs((function(t){if(!t.result||!t.result.succeed)throw _0x298073.prototype.libIDs=[],new WebGLPlot.DeveloperError("Plotting Server is required to initialize SymbolLibManager");if(null!==this.libIDs&&0!==this.libIDs.length)for(var i=0;i<this.libIDs.length;i++){for(var n=!1,r=0;r<t.result.length;r++)if(this.libIDs[i]===t.result[r]){n=!0;break}!1===n&&this.libIDs.slice(i,1)}else this.libIDs=t.result;WebGLPlot.defined(e)||(e=!1),this.initializeSymbolLib(e)}),this))},_0x298073.prototype.initializeSymbolLib=function(e){let t=this;for(var i=this.libIDs.slice(),n=0,r=this.libIDs.length;n<r;n++){let r=this.libIDs[n];var o=new _0x23d9b2;o.libID=r,new _0xdf8675(this.url,this.options.serviceParams).getLibInfo(o,(function(n){if(n.result.succeed){var o=_0x57693f.indexOf(i,n.result.libID);if(-1!==o){i.splice(o,1);var a=t.getSymbolLibByLibId(r);WebGLPlot.defined(a)||(t.symbolLibJsons.push(n.result),(a=new _0x4657e6({symbolLibData:n.result,plottingID:t.plottingID})).url=t.url,t.symbolLibs.push(a)),e&&a.cachedSymbols()}0===i.length&&(t.isInializeOK=!0,t.initializecompleted.raiseEvent({success:!0,libIDs:t.libIDs}))}}),this)}},_0x298073.prototype.findSymbolByCode=function(e){for(var t=[],i=0;i<this.libIDs.length;i++)for(var n=this.getSymbolLibByLibId(this.libIDs[i]).querySymbolbyKey(e.toString()),r=0;r<n.length;r++)t.push(n[r]);return t},_0x298073.prototype.findSymbolByName=function(e){for(var t=[],i=0;i<this.libIDs.length;i++)for(var n=this.getSymbolLibByLibId(this.libIDs[i]).querySymbolbyKey(e),r=0;r<n.length;r++)t.push(n[r]);return t},_0x298073.prototype.getSymbolLibByIndex=function(e){return e>=this.libIDs.length?null:this.symbolLibs[e]},_0x298073.prototype.getSymbolLibByLibId=function(e){for(var t=0;t<this.symbolLibs.length;t++)if(e===this.symbolLibs[t].libID)return this.symbolLibs[t];return null},_0x298073.prototype.getSymbolLibID=function(e){return e>=this.libIDs.length?-1:this.libIDs[e]},_0x298073.prototype.getSymbolLibJSONInfo=function(e){return e>=this.libIDs.length?null:this.symbolLibJsons[e]},_0x298073.prototype.getSymbolLibNumber=function(){return this.libIDs.length},_0x298073.prototype.getSymbolName=function(e,t){var i=this.getSymbolLibByLibId(e);return null===i?"":i.getSymbolName(t)},_0x298073.prototype.getSymbolData=function(e,t){var i=this.getSymbolLibByLibId(e);return null===i?null:i.getSymbolData(t)},_0x298073.prototype.setSymbolData=function(e,t){var i=this.getSymbolLibByLibId(e);if(null!==i&&WebGLPlot.defined(t)&&null!==t)i&&i.setSymbolData(t);else{var n=new _0x23d9b2;n.libID=e;let r=this;new _0xdf8675(this.url,this.options.serviceParams).getLibInfo(n,(function(e){e.result.succeed&&-1!==e.result.libID&&(r.symbolLibJsons.push(e.result),(i=new _0x4657e6({symbolLibData:e.result,plottingID:r.plottingID})).url=r.url,i.setSymbolData(t),r.symbolLibs.push(i))}),this)}},_0x298073.prototype.isInitializeOK=function(){return this.isInializeOK},_0x298073.prototype.cacheSymbolLib=function(e){var t=this,i=this.getSymbolLibByLibId(e);i.cachecompleted.addEventListener((function(e){t.cachecompleted.raiseEvent({success:!0})})),null!==i&&i.cachedSymbols()};var _0x3f7fab=(_0x401c35=!0,function(e,t){var i=_0x401c35?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x401c35=!1,i}),_0x4ae965=_0x3f7fab(void 0,(function(){return _0x4ae965.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ae965).search("(((.+)+)+)+$")})),_0x401c35;_0x4ae965();var WebGLPlot$b=window.WebGLPlot=window.WebGLPlot||{};function _0x39fbca(e,t,i){try{SuperMapAlgoPlot}catch{throw new WebGLPlot$b.DeveloperError("need include Build/Cesium/ThirdParty/Workers/PlotAlgo/PlotAlgoInclude.js ")}this._plottingID="PlottingID"+WebGLPlot$b.createGuid(),_0x39fbca.serverUrl=e,this._scene=t,t._plottingID=this._plottingID,i&&i.serviceParams&&_0x2d6822.extend(this.options,i),this._symbolLibManager=_0x298073.getInstance(e,void 0,this._plottingID),this._sitDataManager=WebGLPlot$b.SitDataManager.getInstance({scene:this._scene,serverUrl:e,options:this.options}),this._animationManager=_0x1713d3.getInstance({serverUrl:e,scene:this._scene,options:this.options}),_0x39fbca.defaultStyle=new WebGLPlot$b.DefaultStyle,WebGLPlot$b.S3MInstanceCollection&&(this.s3mInstanceColc=new WebGLPlot$b.S3MInstanceCollection(t._context),t.primitives.add(this.s3mInstanceColc),WebGLPlot$b.s3mInstanceColc.set(this._plottingID,this.s3mInstanceColc)),_0x39fbca._AlgoSymoblPipelineDisMin=1e4,this._plotCollentionManager=_0x38860f.getInstance(t)}_0x39fbca.g_Plotting=_0x39fbca.g_Plotting||new Map,WebGLPlot$b.s3mInstanceColc=WebGLPlot$b.s3mInstanceColc||new Map,_0x39fbca.prototype.destroy=function(){this._scene.layers.remove("animation",!0),this._sitDataManager=null,this._animationManager=null,this._scene=null,_0x39fbca.g_Plotting.clear()},_0x39fbca.getInstance=function(e,t,i){let n=_0x39fbca.g_Plotting.get(t._plottingID);return WebGLPlot$b.defined(e)&&WebGLPlot$b.defined(t)&&!WebGLPlot$b.defined(n)&&(n=new _0x39fbca(e,t,i),_0x39fbca.g_Plotting.set(n._plottingID,n)),n},_0x39fbca.prototype.getSitDataManager=function(){return this._sitDataManager},_0x39fbca.prototype.getSymbolLibManager=function(){return this._symbolLibManager},_0x39fbca.prototype.getGOAnimationManager=function(){return this._animationManager},_0x39fbca.prototype.getServerUrl=function(){return _0x39fbca.serverUrl},_0x39fbca.prototype.getDefaultStyle=function(){return _0x39fbca.defaultStyle},_0x39fbca.prototype.setAlgoUseDepthTest=function(e){this._plotCollentionManager&&this._plotCollentionManager.collentionLayer.createPolylineCollention(e)},_0x39fbca.prototype.getAlgoUseDepthTest=function(){return!!this._plotCollentionManager&&this._plotCollentionManager.collentionLayer.polylineCollection._opaqueRS.depthMask},_0x39fbca.prototype.getS3MCollection=function(){return this.s3mInstanceColc},WebGLPlot$b.Plotting=_0x39fbca;const E$n=64;function d$s(e,t,i){i<2&&(i=2),this._initialWorldSize=t,this._maxDepth=i,this._octreeNodes=b$t(e,t,i,0),this._allObjects=[]}function v$m(e){return e$2b(e._boundingSphere)?e._boundingSphere:e._orientedBoundingBox}function b$t(e,t,i,n){var r=t/4,o=t/2,a=new Array([8]);let s=o$1p.add(e,new o$1p(-r,r,-r),new o$1p);a[0]=new h$n(s,o,i,n);let l=o$1p.add(e,new o$1p(r,r,-r),new o$1p);a[1]=new h$n(l,o,i,n);let u=o$1p.add(e,new o$1p(-r,r,r),new o$1p);a[2]=new h$n(u,o,i,n);let c=o$1p.add(e,new o$1p(r,r,r),new o$1p);a[3]=new h$n(c,o,i,n);let h=o$1p.add(e,new o$1p(-r,-r,-r),new o$1p);a[4]=new h$n(h,o,i,n);let d=o$1p.add(e,new o$1p(r,-r,-r),new o$1p);a[5]=new h$n(d,o,i,n);let f=o$1p.add(e,new o$1p(-r,-r,r),new o$1p);a[6]=new h$n(f,o,i,n);let p=o$1p.add(e,new o$1p(r,-r,r),new o$1p);return a[7]=new h$n(p,o,i,n),a}function I$o(e){var t=[];let i={};for(let n of e){let e=n._fileName;i[e]||(t.push(n),i[e]=1)}return t}function h$n(e,t,i,n){this._center=u$_(e,1),this._baseSize=u$_(t,1),this._depth=u$_(n,0),this._maxDepth=u$_(i,2),this._bound=new e$26(z$l(this._center,this._baseSize),x$o(this._center,this._baseSize),this._center),this._objects=[],this._children=[]}function z$l(e,t){return new o$1p(e.x-.5*t,e.y-.5*t,e.z-.5*t)}function x$o(e,t){return new o$1p(e.x+.5*t,e.y+.5*t,e.z+.5*t)}function T$k(e,t,i){let n=e.x;n=n>i.x?i.x:n,n=n<t.x?t.x:n;let r=e.y;r=r>i.y?i.y:r,r=r<t.y?t.y:r;let o=e.z;return o=o>i.z?i.z:o,o=o<t.z?t.z:o,new o$1p(n,r,o)}function V$h(e,t){let i=e.x-t.x,n=e.y-t.y,r=e.z-t.z;return i*i+n*n+r*r}function B$h(e,t){let i=t;e$2b(t.radius)||(i=new i$1c,i$1c.fromOrientedBoundingBox(t,i));var n=new o$1p;return n=T$k(i.center,e.minimum,e.maximum),V$h(i.center,n)<=i.radius*i.radius}d$s.prototype.debugObjectCounts=function(){var e=new Set;for(let t=0;t<this._octreeNodes.length;t++)this._octreeNodes[t].debugobjects(e);console.log(e.size)},d$s.prototype.addEntity=function(e){var t=v$m(e),i=!1;for(let r=0;r<this._octreeNodes.length;r++){var n=this._octreeNodes[r];i|=n.addNode(e,t)}i&&this._allObjects.push(e)},d$s.prototype.removeEntity=function(e){if(null==e)return!1;var t=!1,i=this._allObjects(e);i>-1&&(this._allObjects.splice(i,1),t=!0);for(let t=0;t<this._octreeNodes.length;t++){var n=this._octreeNodes[t];n.remove(e)}return t},d$s.prototype.getWithinFrustum=function(e){var t=[];const i=e.planes;for(let e=0,r=i.length;e<r;++e){var n=o$1m.fromCartesian4(i[e],void 0);t.push(n)}var r=[];for(let e=0;e<this._octreeNodes.length;e++){var o=this._octreeNodes[e];o.select(t,r)}return r=I$o(r)},d$s.prototype.setObjectsVisible=function(e){var t=[];const i=e.planes;for(let e=0,r=i.length;e<r;++e){var n=o$1m.fromCartesian4(i[e],void 0);t.push(n)}for(let e=0;e<this._octreeNodes.length;e++){var r=this._octreeNodes[e];r.setVisible(t,Ae$u.INTERSECTING)}},h$n.prototype.innerSplit=function(){this._children=b$t(this._center,this._baseSize,this._maxDepth,this._depth+1);for(var e=0;e<8;e++){this._children[e].addObjects(this._objects)}this._objects=[]},h$n.prototype.addNode=function(e,t){if(this._children.length>0){for(var i=!1,n=0;n<this._children.length;n++){i|=this._children[n].addNode(e,t)}return i}var r=!1;return B$h(this._bound,t)&&2*t.radius<=this._baseSize&&(this._objects.push(e),r=!0),this._depth<this._maxDepth&&this._objects.length>E$n&&this.innerSplit(),r},h$n.prototype.addObjects=function(e){for(let n=0;n<e.length;n++){var t=e[n],i=v$m(t);this.addNode(t,i)}},h$n.prototype.remove=function(e){if(this._children.length>0)for(var t=0;t<this._children.length;t++){this._children[t].remove(e)}let i=!1;var n=this._objects.indexOf(e);return n>-1&&(this._objects.splice(n,1),i=!0),i},h$n.prototype.select=function(e,t){if(this.computeVisibility(e)!==Ae$u.OUTSIDE){if(this._children.length>0){for(let n=0;n<this._children.length;n++){var i=this._children[n];i.select(e,t)}return}for(var n=0;n<this._objects.length;n++){var r=this._objects[n];r.isVisible=!0,e$2b(r._parentPagelod)&&(r._parentPagelod._isVisible=!0),t.push(r)}}},h$n.prototype.setVisible=function(e,t){var i=t;if(t===Ae$u.OUTSIDE)for(var n=0;n<this._objects.length;n++){(r=this._objects[n])._isVisible=!1}else{t===Ae$u.INTERSECTING&&(i=this.computeVisibility(e));for(n=0;n<this._objects.length;n++){var r;(r=this._objects[n])._isVisible=!0,e$2b(r._parentPagelod)&&(r._parentPagelod._isVisible=!0)}}if(this._children.length>0)for(let t=0;t<8;t++)this._children[t].setVisible(e,i)},h$n.prototype.bestFitChild=function(e){return(e.x<=this._center.x?0:1)+(e.y>=this._center.y?0:4)+(e.z<=this._center.z?0:2)},h$n.prototype.computeVisibility=function(e){const t=e;var i=!1;for(let e=0,n=t.length;e<n;++e){const n=this._bound.intersectPlane(t[e]);if(n===Ae$u.OUTSIDE)return Ae$u.OUTSIDE;n===Ae$u.INTERSECTING&&(i=!0)}return i?Ae$u.INTERSECTING:Ae$u.INSIDE},h$n.prototype.debugobjects=function(e){for(let t=0;t<this._objects.length;t++)e.add(this._objects[t]._fileName);for(let t=0;t<this._children.length;t++)this._children[t].debugobjects(e)};var x$n="uniform sampler2D u_floatTexture;\nvoid main()\n{\nfloat actual = texture2D(u_floatTexture, vec2(0.5, 0.5)).r;\nfloat expected = 123456.0;\ngl_FragColor = vec4(abs(actual - expected), 0.0, 0.0, 1.0);\n}\n";function f$n(e){this._context=e}var i$l,R$k=new i$_({primitiveType:W$18.TRIANGLES}),D$k=new t$X({color:new e$1U(0,0,0,0)});function M$n(e,t){return new t$W({context:e,colorTextures:[t],destroyAttachments:!1})}function Q$h(e,t,i){return r$13.fromCache({name:t,context:e,vertexShaderSource:ot$7,fragmentShaderSource:i,attributeLocations:{position:0,textureCoordinates:1}})}function F$i(e,t){return(!e$2b(i$l)||i$l.viewport.width!==e||i$l.viewport.height!==t)&&(i$l=d$1m.fromCache({viewport:new f$18(0,0,e,t)})),i$l}function r$p(e){if(!e.floatingPointTexture)return!1;var t=new f$n(e),i=new t$V({context:e,width:1,height:1,pixelFormat:V$10.RGBA}),n=new t$V({context:e,width:1,height:1,pixelFormat:V$10.RGBA,pixelDatatype:r$p._getFloatPixelType(),source:{width:1,height:1,arrayBufferView:r$p._getArray([123456,0,0,0])}}),r=new t$W({context:e,colorTextures:[i],destroyAttachments:!1}),o={framebuffer:r,x:0,y:0,width:1,height:1},a=!1,s=new t$I({name:"CheckFloatTexturePrecision",fragmentShaderSource:x$n,outputTexture:i,uniformMap:{u_floatTexture:function(){return n}},persists:!1,postExecute:function(){var t=e.readPixels(o);a=0===t[0]}});return s.execute(t),t.destroy(),r.destroy(),a}function t$h(e){this._renderTexture=new s$L(e),this._renderTexture._pixelDatatype=_$$.UNSIGNED_BYTE,this._context=e,this._isUpdate=!0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0};var t=e._gl,i=e$2b(e._currentFramebuffer)?e._currentFramebuffer._framebuffer:null;e.webgpu||t.bindFramebuffer(t.FRAMEBUFFER,i)}function a$i(e){this._context=e,this._frameBuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._upSampleWidth=Math.max(Math.pow(2,Math.ceil(Math.log(e.drawingBufferWidth)/Math.log(10))),8),this._upSampleHeight=Math.max(Math.pow(2,Math.ceil(Math.log(e.drawingBufferHeight)/Math.log(10))),8),this._upSampleViewport=new f$18(0,0,this._upSampleWidth,this._upSampleHeight)}f$n.prototype.execute=function(e){if(o$1q.defined("computeCommand",e),e$2b(e.preExecute)&&e.preExecute(e),!e$2b(e.fragmentShaderSource)&&!e$2b(e.shaderProgram))throw new t$16("computeCommand.fragmentShaderSource or computeCommand.shaderProgram is required.");o$1q.defined("computeCommand.outputTexture",e.outputTexture);var t=e.outputTexture,i=t.width,n=t.height,r=this._context,o=e$2b(e.vertexArray)?e.vertexArray:r.getViewportQuadVertexArray(),a=e$2b(e.shaderProgram)?e.shaderProgram:Q$h(r,e.name,e.fragmentShaderSource),s=M$n(r,t),l=u$_(e.renderState,F$i(i,n)),u=e.uniformMap;if(e.clear){var c=D$k;c.framebuffer=s,c.renderState=l,c.execute(r)}var h=R$k;h.vertexArray=o,h.count=void 0,h.renderState=l,h.shaderProgram=a,h.uniformMap=u,h.framebuffer=s,h.execute(r),s.destroy(),e.persists||(a.destroy(),e$2b(e.vertexArray)&&o.destroy()),e$2b(e.postExecute)&&e.postExecute(t)},f$n.prototype.isDestroyed=function(){return!1},f$n.prototype.destroy=function(){return i$10(this)},r$p._getFloatPixelType=function(){return _$$.FLOAT},r$p._getArray=function(e){return new Float32Array(e)},Object.defineProperties(t$h.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 32},set:function(e){}},frameBufferType:{get:function(){return Qe$c.CLAMP}}}),t$h.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},t$h.prototype.end=function(e){this._isUpdate=!0},t$h.prototype.update=function(e,t){},t$h.prototype.isDestroyed=function(){return!1},t$h.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)};var Q$g=new e$29,U$j=new e$29(1,1/255,1/65025,1/16581375);function C$m(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function v$l(e){e._frameBuffer=e._frameBuffer&&!e._frameBuffer.isDestroyed()&&e._frameBuffer.destroy()}function Y$d(e,t){e._depthTexture=new t$V({context:t,width:e._upSampleWidth,height:e._upSampleHeight,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE})}function q$i(e,t){C$m(e),v$l(e),Y$d(e,t),e._frameBuffer=new t$W({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function J$c(e,t){(!e$2b(e._frameBuffer)||!e$2b(e._depthTexture))&&q$i(e,t)}function K$d(e,t,i){if(!e$2b(e._copyDepthCommand)){e._copyDepthCommand=t.createViewportQuadCommand("uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = czm_packDepth(texture2D(u_texture, v_textureCoordinates).r);\n}\n",{renderState:d$1m.fromCache({viewport:e._upSampleViewport}),uniformMap:{u_texture:function(){return e._textureToCopy}},owner:e})}e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._frameBuffer,e$2b(e._clearCommand)||(e._clearCommand=new t$X({color:new e$1U(0,0,0,1),stencil:0,depth:1,owner:e})),e._clearCommand.framebuffer=e._frameBuffer}a$i.prototype.end=function(e,t,i){for(var n,r=e._context,o=r.drawingBufferWidth,a=r.drawingBufferHeight,s=this._upSampleWidth,l=this._upSampleHeight,u=Math.max(s,l),c=u*u,h=Math.floor(t/o*s),d=Math.floor(i/a*l),f=0,p=0,_=0,m=-1,g=this._frameBuffer,x=r.readPixels({x:0,y:0,width:s,height:l,framebuffer:g}),v=0,y=0;y<c;++y){if(-h<=f&&f<=h&&-d<=p&&p<=d){var $=4*((d-p)*s+f+h);if(n=e$29.unpack(x,$,Q$g),e$29.divideByScalar(n,255,n),(v=e$29.dot(n,U$j))>0&&v<1)break}if(f===p||f<0&&-f===p||f>0&&f===1-p){var b=_;_=-m,m=b}f+=_,p+=m}if(v>0&&v<1&&e._frustumCommandsList.length>0){var T=e._frustumCommandsList[0];e._context.uniformState.updateFrustum(T);var C=new o$1o(t,i);return s$Q.drawingBufferToWgs84Coordinates(e,C,v,new o$1p)}},a$i.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},a$i.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},a$i.prototype.clear=function(e,t){this._clearCommand.execute(e,t)},a$i.prototype.update=function(e,t){J$c(this,e),K$d(this,e,t)},a$i.prototype.isDestroyed=function(){return!1},a$i.prototype.destroy=function(){return C$m(this),v$l(this),this._copyDepthCommand.shaderProgram=e$2b(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy(),i$10(this)};var D$j="attribute aPosition : vec4<f32>;\nattribute textureCoordinates : vec2<f32>;\nvarying v_textureCoordinates : vec2<f32>;\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs { \n gl_Position = aPosition;\n v_textureCoordinates = textureCoordinates;\n}\n";function h$m(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}function T$j(e){const t=Object.keys(e).sort();return JSON.stringify(e,t)}function _$j(e,t){for(var i=t.derivedKeywords,n=i.length,r=0;r<n;++r){var o=i[r]+t.keyword;_$j(e,e._shaders[o])}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}function r$o(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}function i$k(e){e=u$_(e,u$_.EMPTY_OBJECT),this.color=e$2b(e.color)?e$1U.clone(e.color):e$1U.WHITE,this.intensity=u$_(e.intensity,2)}Object.defineProperties(h$m.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}}),h$m.prototype.replaceShaderProgram=function(e){return e$2b(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)},h$m.prototype.getShaderProgram=function(e){var t=e.vertexShaderSource,i=e.fragmentShaderSource,n=e.attributeLocations,r=e.varyings,o=e.bufferMode,a=u$_(e.useWGSL,!1);"string"==typeof t?t=new s$U({sources:[t],useWGSL:a}):!0===t.useWGSL&&(a=!0),"string"==typeof i?i=new s$U({sources:[i],useWGSL:a}):!0===i.useWGSL&&(a=!0);const s=t.getCacheKey(this._context),l=i.getCacheKey(this._context),u=e$2b(n)?T$j(n):"",c=`${s}:${l}:${u}`,h=this._getShaderProgramName(e,u,t,i);var d;if(e$2b(this._shaders[c]))d=this._shaders[c],delete this._shadersToRelease[c];else{const s=t.createCombinedVertexShader(this._context),l=i.createCombinedFragmentShader(this._context);var f=this._context,p=new(f.webgpu?m$Z:g$18)({context:f,gl:f._gl,logShaderCompilation:f.logShaderCompilation,debugShaders:f.debugShaders,vertexShaderSource:t,vertexShaderText:s,fragmentShaderSource:i,fragmentShaderText:l,attributeLocations:n,transformFeedbackVaryings:e.transformFeedbackVaryings,varyings:r,bufferMode:o,name:h,useWGSL:a});d={cache:this,shaderProgram:p,keyword:c,derivedKeywords:[],count:0},p._cachedShader=d,this._shaders[c]=d,++this._numberOfShaders}return++d.count,d.shaderProgram},h$m.prototype._getShaderProgramName=function(e,t,i,n){if(e$2b(e.name))return e.name;return`${i._getKeyForShaderProgramName()}:${n._getKeyForShaderProgramName()}:${t}`},h$m.prototype.replaceDerivedShaderProgram=function(e,t,i){var n=e._cachedShader,r=t+n.keyword,o=this._shaders[r];if(e$2b(o)){_$j(this,o);var a=n.derivedKeywords.indexOf(t);a>-1&&n.derivedKeywords.splice(a,1)}return this.createDerivedShaderProgram(e,t,i)},h$m.prototype.getDerivedShaderProgram=function(e,t){var i=t+e._cachedShader.keyword,n=this._shaders[i];if(e$2b(n))return n.shaderProgram},h$m.prototype.createDerivedShaderProgram=function(e,t,i){var n=e._cachedShader,r=t+n.keyword,o=i.vertexShaderSource,a=i.fragmentShaderSource,s=i.attributeLocations,l=i.varyings,u=i.bufferMode;"string"==typeof o&&(o=new s$U({sources:[o]})),"string"==typeof a&&(a=new s$U({sources:[a]}));var c=this._context,h=o.createCombinedVertexShader(c),d=a.createCombinedFragmentShader(c),f=new(c.webgpu?m$Z:g$18)({context:c,gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:o,vertexShaderText:h,fragmentShaderSource:a,fragmentShaderText:d,attributeLocations:s,transformFeedbackVaryings:i.transformFeedbackVaryings,varyings:l,bufferMode:u,name:e.name+t,useWGSL:o.useWGSL}),p={cache:this,shaderProgram:f,keyword:r,derivedKeywords:[],count:0};return n.derivedKeywords.push(t),f._cachedShader=p,this._shaders[r]=p,f},h$m.prototype.destroyReleasedShaderPrograms=function(){var e=this._shadersToRelease;for(var t in e)if(e.hasOwnProperty(t)){_$j(this,e[t]),--this._numberOfShaders}this._shadersToRelease={}},h$m.prototype.releaseShaderProgram=function(e){if(e$2b(e)){var t=e._cachedShader;t&&0==--t.count&&(this._shadersToRelease[t.keyword]=t)}},h$m.prototype.isDestroyed=function(){return!1},h$m.prototype.destroy=function(){var e=this._shaders;for(var t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return i$10(this)},Object.defineProperties(r$o.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}}),r$o.prototype.getTexture=function(e){var t=this._textures[e];if(e$2b(t))return delete this._texturesToRelease[e],++t.count,t.texture},r$o.prototype.addTexture=function(e,t){var i={texture:t,count:1};t.finalDestroy=t.destroy;var n=this;t.destroy=function(){0==--i.count&&(n._texturesToRelease[e]=i)},this._textures[e]=i,++this._numberOfTextures},r$o.prototype.destroyReleasedTextures=function(){var e=this._texturesToRelease;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];delete this._textures[t],i.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}},r$o.prototype.isDestroyed=function(){return!1},r$o.prototype.destroy=function(){var e=this._textures;for(var t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return i$10(this)};const _0x55b84b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x470ce1=_0x55b84b(void 0,(function(){return _0x470ce1.toString().search("(((.+)+)+)+$").toString().constructor(_0x470ce1).search("(((.+)+)+)+$")}));function _0x3de36a(e){var t=_0x3e2f69.call(this)||this;t._name=_0x27131a.LIGHT,t._uniformState=e,t._lightGridTableTexture=void 0,t._globalLightListTexture=void 0}_0x470ce1();const _0x562fca="uLightGridTexture",_0x43e94a="uGlobalLightListTexture";_0x3e2f69&&(_0x3de36a.__proto__=_0x3e2f69),_0x3de36a.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x3de36a.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x3de36a.prototype,{lightGridTexture:{get:function(){return this._lightGridTableTexture},set:function(e){this._lightGridTableTexture=e,this._isTextureDirty=!0}},globalLightListTexture:{get:function(){return this._globalLightListTexture},set:function(e){this._globalLightListTexture=e,this._isTextureDirty=!0}}}),_0x3de36a.prototype._initUBOStruct=function(){this._ubo.addUniform("uPointLightPositionEC",3,s$I.MaxPointLightCount),this._ubo.addUniform("uPointLightColor",3,s$I.MaxPointLightCount),this._ubo.addUniform("uPointLightDistanceAndDecay",4,s$I.MaxPointLightCount),this._ubo.addUniform("uSpotLightColorAndExponent",4,s$I.MaxSpotLightCount),this._ubo.addUniform("uSpotLightPositionEC",3,s$I.MaxSpotLightCount),this._ubo.addUniform("uSpotLightDirectionEC",3,s$I.MaxSpotLightCount),this._ubo.addUniform("uSpotLightDistanceDecayCosPenumbra",4,s$I.MaxSpotLightCount),this._ubo.addUniform("uDirectionalLightDirectionEC",3,s$I.MaxDirectionLightCount),this._ubo.addUniform("uDirectionalLightDirection",3,s$I.MaxDirectionLightCount),this._ubo.addUniform("uDirectionalLightColor",3,s$I.MaxDirectionLightCount),this._ubo.addUniform("uAmbientLightColor",4),this._ubo.addUniform("uSunLightColor",4),this._ubo.addUniform("uSunDirectionEC",3),this._ubo.addUniform("uSkyColor",3),this._ubo.addUniform("uGroundColor",3),this._ubo.addUniform("uSunLightON",1),this._ubo.addUniform("uPointLightCount",1),this._ubo.addUniform("uSpotLightCount",1),this._ubo.addUniform("uDirLightCount",1)},_0x3de36a.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):e.webgpu&&(this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1)),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},new o$1o;const _0x5a3073=new o$1o,_0x303028=new e$29;_0x3de36a.prototype.update=function(e){const t=e.context,i=e.lightSource;if(!t.webgpu&&!t.webgl2)return void this._initUniformMap(t,i);e$2b(this._ubo)||this._initUBO(t);const n=this._ubo;var r=i.ambientLightColor,o=i.sunLightColor;n.updateFloat4("uAmbientLightColor",r.red,r.green,r.blue,r.alpha),n.updateFloat4("uSunLightColor",o.red,o.green,o.blue,o.alpha),n.updateFloat("uSunLightON",i.sunLightON),_0x3e2f69.writeCartesian3ToUBO("uSunDirectionEC",this._ubo,this._uniformState.sunDirectionEC);let a=i.directionalLight.values,s=a.length;if(s=Math.min(s,s$I.MaxDirectionLightCount),s>0){const e=[],t=[],i=[];for(let n=0;n<s;n++){const r=a[n],o=r.lightColor;o$1p.pack(r.directionEC,e,3*n),o$1p.pack(r.direction,t,3*n),_0x5a3073.x=o.red,_0x5a3073.y=o.green,_0x5a3073.z=o.blue,o$1p.pack(_0x5a3073,i,3*n)}n.updateInt("uDirLightCount",s),n.updateFloatArray("uDirectionalLightDirectionEC",e),n.updateFloatArray("uDirectionalLightDirection",t),n.updateFloatArray("uDirectionalLightColor",i)}if(a=i._visibleLightList[_0x1d9df9.POINT].values,s=a.length,s=Math.min(s,s$I.MaxPointLightCount),s>0){const e=[],t=[],i=[];for(let n=0;n<s;n++){const r=a[n],o=r.lightColor;o$1p.pack(r.positionEC,e,3*n),_0x5a3073.x=o.red,_0x5a3073.y=o.green,_0x5a3073.z=o.blue,o$1p.pack(_0x5a3073,t,3*n),_0x303028.x=r.cutoffDistance,_0x303028.y=r.decay,_0x303028.z=0,_0x303028.w=0,e$29.pack(_0x303028,i,4*n)}n.updateInt("uPointLightCount",s),n.updateFloatArray("uPointLightPositionEC",e),n.updateFloatArray("uPointLightColor",t),n.updateFloatArray("uPointLightDistanceAndDecay",i)}if(a=i._visibleLightList[_0x1d9df9.SPOT].values,s=a.length,s=Math.min(s,s$I.MaxSpotLightCount),s>0){const e=[],t=[],i=[],r=[];for(let n=0;n<s;n++){const o=a[n],s=o.lightColor;o$1p.pack(o.positionEC,e,3*n),_0x303028.x=s.red,_0x303028.y=s.green,_0x303028.z=s.blue,_0x303028.w=o.exponent,e$29.pack(_0x303028,t,4*n),o$1p.pack(o.directionEC,i,3*n),_0x303028.x=o.distance,_0x303028.y=o.decay,_0x303028.z=o.angleCos,_0x303028.w=o.penumbraCos,e$29.pack(_0x303028,r,4*n)}n.updateInt("uSpotLightCount",s),n.updateFloatArray("uSpotLightPositionEC",e),n.updateFloatArray("uSpotLightColorAndExponent",t),n.updateFloatArray("uSpotLightDirectionEC",i),n.updateFloatArray("uSpotLightDistanceDecayCosPenumbra",r)}if(a=i._lightList[_0x1d9df9.HEMISPHERE].values,s=a.length,s>0){const e=a[0],t=e.skyColor,i=e.groundColor;n.updateFloat3("uSkyColor",t.red,t.green,t.blue),n.updateFloat3("uGroundColor",i.red,i.green,i.blue)}this._ubo.update(),this._isValueDirty=!1},_0x3de36a.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),this._setTextureToEffect(e,this._lightGridTableTexture,_0x562fca),this._setTextureToEffect(e,this._globalLightListTexture,_0x43e94a)},_0x3de36a.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x3de36a.prototype._initUniformMap=function(e,t){if(!e$2b(this._uniformMap)){var i=this._uniformState,n={uAmbientLightColor:function(){return t.ambientLightColor},uSunLightColor:function(){return t.sunLightColor},uSunLightON:function(){return t.sunLightON}};n.uSunLightON=function(){return t.sunLightON},n.uSunDirectionEC=function(){return i.sunDirectionEC},n.uDirLightCount=function(){let e=t.directionalLight.values.length;return Math.min(e,s$I.MaxDirectionLightCount)},n.uDirectionalLightDirectionEC=function(){let e=t.directionalLight.values,i=e.length;i=Math.min(i,s$I.MaxDirectionLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.directionEC,n,3*t)}return n},n.uDirectionalLightDirection=function(){let e=t.directionalLight.values,i=e.length;i=Math.min(i,s$I.MaxDirectionLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.direction,n,3*t)}return n},n.uDirectionalLightColor=function(){let e=t.directionalLight.values,i=e.length;i=Math.min(i,s$I.MaxDirectionLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t].lightColor;_0x5a3073.x=i.red,_0x5a3073.y=i.green,_0x5a3073.z=i.blue,o$1p.pack(_0x5a3073,n,3*t)}return n},n.uPointLightCount=function(){let e=t._visibleLightList[_0x1d9df9.POINT].values.length;return Math.min(e,s$I.MaxPointLightCount)},n.uPointLightPositionEC=function(){const e=t._visibleLightList[_0x1d9df9.POINT].values;let i=e.length;i=Math.min(i,s$I.MaxPointLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.positionEC,n,3*t)}return n},n.uPointLightColor=function(){const e=t._visibleLightList[_0x1d9df9.POINT].values;let i=e.length;i=Math.min(i,s$I.MaxPointLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t].lightColor;_0x5a3073.x=i.red,_0x5a3073.y=i.green,_0x5a3073.z=i.blue,o$1p.pack(_0x5a3073,n,3*t)}return n},n.uPointLightDistanceAndDecay=function(){const e=t._visibleLightList[_0x1d9df9.POINT].values;let i=e.length;i=Math.min(i,s$I.MaxPointLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];_0x303028.x=i.cutoffDistance,_0x303028.y=i.decay,_0x303028.z=0,_0x303028.w=0,e$29.pack(_0x303028,n,4*t)}return n},n.uSpotLightCount=function(){let e=t._visibleLightList[_0x1d9df9.SPOT].values.length;return Math.min(e,s$I.MaxSpotLightCount)},n.uSpotLightPositionEC=function(){const e=t._visibleLightList[_0x1d9df9.SPOT].values;let i=e.length;i=Math.min(i,s$I.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.positionEC,n,3*t)}return n},n.uSpotLightColorAndExponent=function(){const e=t._visibleLightList[_0x1d9df9.SPOT].values;let i=e.length;i=Math.min(i,s$I.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t],r=i.lightColor;_0x303028.x=r.red,_0x303028.y=r.green,_0x303028.z=r.blue,_0x303028.w=i.exponent,e$29.pack(_0x303028,n,4*t)}return n},n.uSpotLightDirectionEC=function(){const e=t._visibleLightList[_0x1d9df9.SPOT].values;let i=e.length;i=Math.min(i,s$I.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.directionEC,n,3*t)}return n},n.uSpotLightDistanceDecayCosPenumbra=function(){const e=t._visibleLightList[_0x1d9df9.SPOT].values;let i=e.length;i=Math.min(i,s$I.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];_0x303028.x=i.distance,_0x303028.y=i.decay,_0x303028.z=i.angleCos,_0x303028.w=i.penumbraCos,e$29.pack(_0x303028,n,4*t)}return n},n.uSkyColor=function(){const e=t._lightList[_0x1d9df9.HEMISPHERE].values;return e.length>0?e[0].skyColor:Color.WHITE},n.uGroundColor=function(){const e=t._lightList[_0x1d9df9.HEMISPHERE].values;return e.length>0?e[0].groundColor:Color.WHITE},this._uniformMap=n}},_0x3de36a.prototype.isDestroyed=function(){return!1},_0x3de36a.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};var _0x5ed29b=(_0x176e7b=!0,function(e,t){var i=_0x176e7b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x176e7b=!1,i}),_0x38aba2=_0x5ed29b(void 0,(function(){return _0x38aba2.toString().search("(((.+)+)+)+$").toString().constructor(_0x38aba2).search("(((.+)+)+)+$")})),_0x176e7b;_0x38aba2();const _0x1440ff="uBrdfLut",_0x523ae7="uSpecularEnvironmentMaps",_0x130209="uEnvironmentMap",_0x20ca3f="uHdrEnvMap";function _0x4116a0(e){var t=_0x3e2f69.call(this)||this;t._name=_0x27131a.SCENE,t._brdfLutTexture=void 0,t._specularEnvironmentMaps=void 0,t._environmentMap=void 0,t._hdrEnvMap=void 0,t._uniformState=e}function P$l(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new f$18,this._viewportCartesian4=new e$29,this._viewportDirty=!1,this._viewportOrthographicMatrix=p$1d.clone(p$1d.IDENTITY),this._viewportTransformation=p$1d.clone(p$1d.IDENTITY),this._model=p$1d.clone(p$1d.IDENTITY),this._view=p$1d.clone(p$1d.IDENTITY),this._inverseView=p$1d.clone(p$1d.IDENTITY),this._projection=p$1d.clone(p$1d.IDENTITY),this._infiniteProjection=p$1d.clone(p$1d.IDENTITY),this._entireFrustum=new o$1o,this._currentFrustum=new o$1o,this._frustumPlanes=new e$29,this._frameState=void 0,this._temeToPseudoFixed=p$1e.clone(p$1d.IDENTITY),this._view3DDirty=!0,this._view3D=new p$1d,this._inverseView3DDirty=!0,this._inverseView3D=new p$1d,this._inverseModelDirty=!0,this._inverseModel=new p$1d,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new p$1e,this._viewRotation=new p$1e,this._inverseViewRotation=new p$1e,this._viewRotation3D=new p$1e,this._inverseViewRotation3D=new p$1e,this._inverseProjectionDirty=!0,this._inverseProjection=new p$1d,this._modelViewDirty=!0,this._modelView=new p$1d,this._modelView3DDirty=!0,this._modelView3D=new p$1d,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new p$1d,this._inverseModelViewDirty=!0,this._inverseModelView=new p$1d,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new p$1d,this._viewProjectionDirty=!0,this._viewProjection=new p$1d,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new p$1d,this._modelViewProjectionDirty=!0,this._modelViewProjection=new p$1d,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new p$1d,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new p$1d,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new p$1d,this._mvpViewPortDirty=!0,this._mvpViewPort=new p$1d,this._normalDirty=!0,this._normal=new p$1e,this._normal3DDirty=!0,this._normal3D=new p$1e,this._inverseNormalDirty=!0,this._inverseNormal=new p$1e,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new p$1e,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new i$11,this._encodedOriginCameraPositionMC=new i$11,this._cameraPosition=new o$1p,this._sunPositionWC=new o$1p,this._sunPositionColumbusView=new o$1p,this._sunDirectionWC=new o$1p,this._sunDirectionEC=new o$1p,this._sunColor=new o$1p,this._moonDirectionEC=new o$1p,this._lightDirectionWC=new o$1p,this._lightDirectionEC=new o$1p,this._lightColor=new o$1p,this._lightColorHdr=new o$1p,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._cameraDirection=new o$1p,this._cameraRight=new o$1p,this._cameraUp=new o$1p,this._frustum2DWidth=0,this._eyeHeight2D=new o$1o,this._resolutionScale=1,this._pixelRatio=1,this._eyeHeight=0,this._orthographicIn3D=!1,this._backgroundColor=new e$1U,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsDimensions=new o$1o,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._invertClassificationColor=void 0,this._imagerySplitPosition=new o$1o,this._globeSplitPosition=new o$1o,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0,this._globeDepthTextureDim=new o$1o,this._silverLightingAtmosphere=void 0,this._hdrEnvMap=void 0,this._toneMappingExposure=1,this._envMapIntensity=1,this._sceneUBO=new _0x4116a0(this),this._lightUBO=new _0x3de36a(this),this._relativeOrigin=new o$1p,this.useRelativeOrigin=!0}function Q$f(e,t){p$1d.clone(t,e._view),p$1d.getRotation(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0,e._mvpViewPortDirty=!0}function X$c(e,t){p$1d.clone(t,e._inverseView),p$1d.getRotation(t,e._inverseViewRotation)}function $$h(e){var t=e._frameState;if(e$2b(t)&&t.TAAEnable&&"normal"===t._fboState.name){var i=e._projection;i[8]+=t.jitter.x,i[9]+=t.jitter.y}}function S$j(e,t){p$1d.clone(t,e._projection),$$h(e),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._mvpViewPortDirty=!0}function ii(e,t){p$1d.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}function ei(e,t){o$1p.clone(t.positionWC,e._cameraPosition),o$1p.clone(t.directionWC,e._cameraDirection),o$1p.clone(t.rightWC,e._cameraRight),o$1p.clone(t.upWC,e._cameraUp);const i=t.positionCartographic;e$2b(i)?e._eyeHeight=i.height:e._eyeHeight=-e._ellipsoid.maximumRadius,e._encodedCameraPositionMCDirty=!0}_0x3e2f69&&(_0x4116a0.__proto__=_0x3e2f69),_0x4116a0.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x4116a0.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x4116a0.prototype,{}),_0x4116a0.prototype._initUBOStruct=function(){this._ubo.addUniform("uView",16),this._ubo.addUniform("uProjection",16),this._ubo.addUniform("uViewProjection",16),this._ubo.addUniform("uInverseView",16),this._ubo.addUniform("uInverseProjection",16),this._ubo.addUniform("uInverseViewProjection",16),this._ubo.addUniform("uViewportTransformation",16),this._ubo.addUniform("uViewRotation",9),this._ubo.addUniform("uInverseViewRotation",9),this._ubo.addUniform("uTemeToPseudoFixed",9),this._ubo.addUniform("uViewport",4),this._ubo.addUniform("uFrustumPlanes",4),this._ubo.addUniform("uRelativeOrigin",3),this._ubo.addUniform("uCurrentFrustum",2),this._ubo.addUniform("uFarDepthFromNearPlusOne",1),this._ubo.addUniform("uLog2FarDepthFromNearPlusOne",1),this._ubo.addUniform("uOneOverLog2FarDepthFromNearPlusOne",1),this._ubo.addUniform("uFrameNumber",1),this._ubo.addUniform("uPixelRatio",1),this._ubo.addUniform("uResolutionScale",1),this._ubo.addUniform("uGamma",1),this._ubo.addUniform("uToneMappingExposure",1),this._ubo.addUniform("uEnvMapIntensity",1),this._ubo.addUniform("uSpecularEnvironmentMapSize",2),this._ubo.addUniform("uSpecularEnvironmentMapsMaximumLOD",1),this._ubo.addUniform("uSphericalHarmonicCoefficients",3,9)},_0x4116a0.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):e.webgpu&&(this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1)),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x4116a0.prototype.update=function(e,t){if(e.webgpu||e.webgl2){if(e$2b(this._ubo)||this._initUBO(e),_0x3e2f69.writeCartesian4ToUBO("uViewport",this._ubo,t.viewportCartesian4),_0x3e2f69.writeMatrix4ToUBO("uView",this._ubo,t.view),_0x3e2f69.writeMatrix3ToUBO("uViewRotation",this._ubo,t.viewRotation),_0x3e2f69.writeMatrix4ToUBO("uInverseView",this._ubo,t.inverseView),_0x3e2f69.writeMatrix3ToUBO("uInverseViewRotation",this._ubo,t.inverseViewRotation),_0x3e2f69.writeMatrix4ToUBO("uProjection",this._ubo,t.projection),_0x3e2f69.writeMatrix4ToUBO("uInverseProjection",this._ubo,t.inverseProjection),_0x3e2f69.writeMatrix4ToUBO("uViewProjection",this._ubo,t.viewProjection),_0x3e2f69.writeMatrix4ToUBO("uInverseViewProjection",this._ubo,t.inverseViewProjection),_0x3e2f69.writeMatrix4ToUBO("uViewportTransformation",this._ubo,t.viewportTransformation),_0x3e2f69.writeCartesian2ToUBO("uCurrentFrustum",this._ubo,t.currentFrustum),_0x3e2f69.writeCartesian4ToUBO("uFrustumPlanes",this._ubo,t.frustumPlanes),_0x3e2f69.writeCartesian3ToUBO("uRelativeOrigin",this._ubo,t.relativeOrigin),this._ubo.updateFloat("uFarDepthFromNearPlusOne",t.farDepthFromNearPlusOne),this._ubo.updateFloat("uLog2FarDepthFromNearPlusOne",t.log2FarDepthFromNearPlusOne),this._ubo.updateFloat("uOneOverLog2FarDepthFromNearPlusOne",t.oneOverLog2FarDepthFromNearPlusOne),this._ubo.updateFloat("uFrameNumber",t.frameState.frameNumber),_0x3e2f69.writeMatrix3ToUBO("uTemeToPseudoFixed",this._ubo,t.temeToPseudoFixedMatrix),this._ubo.updateFloat("uPixelRatio",t.pixelRatio),this._ubo.updateFloat("uResolutionScale",t.resolutionScale),this._ubo.updateFloat("uGamma",t.gamma),this._ubo.updateFloat("uToneMappingExposure",t.toneMappingExposure),this._ubo.updateFloat("uEnvMapIntensity",t.envMapIntensity),t.specularEnvironmentMapsDimensions&&this._ubo.updateFloat2("uSpecularEnvironmentMapSize",t.specularEnvironmentMapsDimensions.x,t.specularEnvironmentMapsDimensions.y),t.specularEnvironmentMapsMaximumLOD&&this._ubo.updateFloat("uSpecularEnvironmentMapsMaximumLOD",t.specularEnvironmentMapsMaximumLOD),t.sphericalHarmonicCoefficients){for(var i=[],n=0;n<t.sphericalHarmonicCoefficients.length;n++){var r=t.sphericalHarmonicCoefficients[n];o$1p.pack(r,i,3*n)}this._ubo.updateFloatArray("uSphericalHarmonicCoefficients",i)}this._ubo.update(),this._brdfLutTexture=t.brdfLut,this._specularEnvironmentMaps=t.specularEnvironmentMaps,this._environmentMap=t.environmentMap,this._hdrEnvMap=t.hdrEnvMap}},_0x4116a0.prototype._initUniformMap=function(e){if(!e.webgl2&&!e.webgpu){var t=this._uniformState;this._uniformMap={},this._uniformMap.uView=function(){return t.view},this._uniformMap.uProjection=function(){return t.projection},this._uniformMap.uViewProjection=function(){return t.viewProjection},this._uniformMap.uInverseView=function(){return t.inverseView},this._uniformMap.uInverseProjection=function(){return t.inverseProjection},this._uniformMap.uInverseViewProjection=function(){return t.inverseViewProjection},this._uniformMap.uViewportTransformation=function(){return t.viewportTransformation},this._uniformMap.uViewRotation=function(){return t.viewRotation},this._uniformMap.uInverseViewRotation=function(){return t.inverseViewRotation},this._uniformMap.uTemeToPseudoFixed=function(){return t.temeToPseudoFixedMatrix},this._uniformMap.uViewport=function(){return t.viewportCartesian4},this._uniformMap.uFrustumPlanes=function(){return t.frustumPlanes},this._uniformMap.uRelativeOrigin=function(){return t.relativeOrigin},this._uniformMap.uCurrentFrustum=function(){return t.currentFrustum},this._uniformMap.uFarDepthFromNearPlusOne=function(){return t.farDepthFromNearPlusOne},this._uniformMap.uLog2FarDepthFromNearPlusOne=function(){return t.log2FarDepthFromNearPlusOne},this._uniformMap.uOneOverLog2FarDepthFromNearPlusOne=function(){return t.oneOverLog2FarDepthFromNearPlusOne},this._uniformMap.uFrameNumber=function(){return t.frameNumber},this._uniformMap.uPixelRatio=function(){return t.pixelRatio},this._uniformMap.uResolutionScale=function(){return t.resolutionScale},this._uniformMap.uGamma=function(){return t.gamma},this._uniformMap.uToneMappingExposure=function(){return t.toneMappingExposure},this._uniformMap.uEnvMapIntensity=function(){return t.envMapIntensity},this._uniformMap.uSpecularEnvironmentMapSize=function(){return t.specularEnvironmentMapsDimensions},this._uniformMap.uSpecularEnvironmentMapsMaximumLOD=function(){return t.specularEnvironmentMapsMaximumLOD},this._uniformMap.uSphericalHarmonicCoefficients=function(){return t.sphericalHarmonicCoefficients}}},_0x4116a0.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),this._setTextureToEffect(e,this._brdfLutTexture,_0x1440ff),this._setTextureToEffect(e,this._specularEnvironmentMaps,_0x523ae7),this._setTextureToEffect(e,this._environmentMap,_0x130209),this._setTextureToEffect(e,this._hdrEnvMap,_0x20ca3f)},_0x4116a0.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x4116a0.prototype.isDestroyed=function(){return!1},_0x4116a0.prototype.destroy=function(){return this._ubo.dispose(),destroyObject(this)},Object.defineProperties(P$l.prototype,{eyeHeight:{get:function(){return this._eyeHeight}},toneMappingExposure:{get:function(){return this._toneMappingExposure}},envMapIntensity:{get:function(){return this._envMapIntensity}},frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!f$18.equals(e,this._viewport)){f$18.clone(e,this._viewport);var t=this._viewport,i=this._viewportCartesian4;i.x=t.x,i.y=t.y,i.z=t.width,i.w=t.height,this._viewportDirty=!0,this._mvpViewPortDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return Y$c(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return Y$c(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){p$1d.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0,this._mvpViewPortDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,p$1d.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){var e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,p$1d.getRotation(this.inverseModel,e),p$1e.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return N$d(this),this._view3D}},viewRotation:{get:function(){return N$d(this),this._viewRotation}},viewRotation3D:{get:function(){return N$d(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return G$j(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return G$j(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return si(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return li$1(this),this._modelView}},modelView3D:{get:function(){return hi$1(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return pi$2(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return ci$2(this),this._inverseModelView}},inverseModelView3D:{get:function(){return _i$2(this),this._inverseModelView3D}},viewProjection:{get:function(){return ai(this),this._viewProjection}},inverseViewProjection:{get:function(){return ui$1(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return di$1(this),this._modelViewProjection}},mvpViewPort:{get:function(){return vi$2(this),this._mvpViewPort}},inverseModelViewProjection:{get:function(){return Di$2(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return wi$2(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return gi$2(this),this._modelViewInfiniteProjection}},normal:{get:function(){return mi(this),this._normal}},normal3D:{get:function(){return yi$2(this),this._normal3D}},inverseNormal:{get:function(){return Pi$2(this),this._inverseNormal}},inverseNormal3D:{get:function(){return fi$1(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},sunColor:{get:function(){return this._sunColor}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return k$i(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return k$i(this),this._encodedCameraPositionMC.low}},encodedOriginCameraPositionMCHigh:{get:function(){return q$h(this),this._encodedOriginCameraPositionMC.high}},encodedOriginCameraPositionMCLow:{get:function(){return q$h(this),this._encodedOriginCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},resolutionScale:{get:function(){return this._resolutionScale}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsDimensions:{get:function(){return this._specularEnvironmentMapsDimensions}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},imagerySplitPosition:{get:function(){return this._imagerySplitPosition}},globeSplitPosition:{get:function(){return this._globeSplitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},globeDepthTextureDim:{get:function(){return this._globeDepthTextureDim}},sceneUBO:{get:function(){return this._sceneUBO}},relativeOrigin:{get:function(){return this._relativeOrigin}},hdrEnvMap:{get:function(){return this._hdrEnvMap}}});var j$j=new p$1e,ti=new a$18;function ni(e,t){e$2b(m$17.computeIcrfToFixedMatrix(t.time,j$j))||(j$j=m$17.computeTemeToPseudoFixedMatrix(t.time,j$j));var i=F$H.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);p$1e.multiplyByVector(j$j,i,i),o$1p.normalize(i,e._sunDirectionWC),i=p$1e.multiplyByVector(e.viewRotation3D,i,e._sunDirectionEC),o$1p.normalize(i,i),i=F$H.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),p$1e.multiplyByVector(j$j,i,i),p$1e.multiplyByVector(e.viewRotation3D,i,i),o$1p.normalize(i,i);var n=t.mapProjection,r=n.ellipsoid.cartesianToCartographic(e._sunPositionWC,ti);n.project(r,e._sunPositionColumbusView)}new o$1p;var V$g=new p$1d,M$m=new p$1d,A$p=new o$1p;P$l.prototype.updateCamera=function(e,t){var i=e.positionCartographic.height,n=e.positionWC,r=o$1p.distance(n,t.relativeOrigin),o=e$2b(this._frameState)&&this._frameState._fboState.enabled;t.enableRelativeOrigin&&!o&&i<1e4&&r>2e4&&(t.relativeOrigin=n),o$1p.clone(t.relativeOrigin,this._relativeOrigin),o$1p.subtract(n,t.relativeOrigin,A$p),p$1d.clone(e.inverseViewMatrix,M$m),p$1d.setTranslation(M$m,A$p,M$m),p$1d.inverse(M$m,V$g),e.bReflect&&(p$1d.multiply(V$g,e._reflectMatrix,V$g),p$1d.inverse(V$g,M$m),e.frustum.currentViewMatrix=p$1d.clone(V$g,e.frustum.currentViewMatrix)),Q$f(this,V$g),X$c(this,M$m),ei(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==C$13.SCENE2D&&e.frustum instanceof a$V,this._sceneUBO.update(t,this)},P$l.prototype.updateFrustum=function(e){S$j(this,e.projectionMatrix),e$2b(e.infiniteProjectionMatrix)&&ii(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=e$2a.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne,e$2b(e._offCenterFrustum)&&(e=e._offCenterFrustum),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right,e$2b(this._frameState)&&this._sceneUBO.update(this._frameState.context,this)},P$l.prototype.updatePass=function(e){this._pass=e};var U$i=new o$1p;P$l.prototype.updateLightSource=function(e){if(e$2b(e)){var t=e.pointLight.values,i=e.spotLight.values,n=e.directionalLight.values,r=e.hemisphereLight.values,o=e._visibleLightList[_0x1d9df9.POINT],a=e._visibleLightList[_0x1d9df9.SPOT];o.removeAll(),a.removeAll();var s,l,u,c,h,d=[];for(s=0,l=t.length;s<l;s++){(c=t[s]).sceneMode=this._frameState.mode;var f=o$1p.subtract(c.position,this._relativeOrigin,U$i);p$1d.multiplyByPoint(this._view,f,c._positionEC),(h=o$1p.distance(this._frameState.camera.positionWC,c.position))<e.visibleDistanceMax&&d.push([h,c])}for(d.length>e._visibleCountAllowed&&(d.sort((function(e,t){return e[0]-t[0]})),d=d.slice(0,e._visibleCountAllowed)),u=0;u<d.length;u++)c=d[u][1],o.set(c.id,c);for(d=[],s=0,l=i.length;s<l;s++){(c=i[s]).sceneMode=this._frameState.mode;f=o$1p.subtract(c.position,this._relativeOrigin,U$i);p$1d.multiplyByPoint(this._view,f,c._positionEC),p$1e.multiplyByVector(this.viewRotation,c.direction,c._directionEC),o$1p.normalize(c._directionEC,c._directionEC),h=o$1p.distance(this._frameState.camera.positionWC,c.position),c.computeVisiblityInCullingVolume(this._frameState.cullingVolume)&&h<e.visibleDistanceMax&&d.push([h,c])}for(d.length>e._visibleCountAllowed&&(d.sort((function(e,t){return e[0]-t[0]})),d=d.slice(0,e._visibleCountAllowed)),u=0;u<d.length;u++)c=d[u][1],a.set(c.id,c);for(s=0,l=n.length;s<l;s++)(c=n[s]).sceneMode=this._frameState.mode,p$1e.multiplyByVector(this.viewRotation,c.direction,c._directionEC),o$1p.normalize(c._directionEC,c._directionEC);o.length!==e._visiblePointLightCount&&(e._changedLightList.set(_0x1d9df9.POINT,{count:o.length,type:_0x1d9df9.POINT}),e._visiblePointLightCount=o.length),a.length!==e._visibleSpotLightCount&&(e._changedLightList.set(_0x1d9df9.SPOT,{count:a.length,type:_0x1d9df9.SPOT}),e._visibleSpotLightCount=a.length),n.length!==e._visibleDirectionalLightCount&&(e._changedLightList.set(_0x1d9df9.DIRECTIONAL,{count:n.length,type:_0x1d9df9.DIRECTIONAL}),e._visibleDirectionalLightCount=n.length),r.length!==e._visibleHemisphereLightCount&&(e._changedLightList.set(_0x1d9df9.HEMISPHERE,{count:r.length,type:_0x1d9df9.HEMISPHERE}),e._visibleHemisphereLightCount=r.length),e.combineUniformValue()}};var oi=[],ri=new i$k;function Y$c(e){if(e._viewportDirty){var t=e._viewport;p$1d.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),p$1d.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1,e._mvpViewPortDirty=!0}}function si(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode===C$13.SCENE2D||e._mode===C$13.MORPHING||e._orthographicIn3D?p$1d.clone(p$1d.ZERO,e._inverseProjection):p$1d.inverse(e._projection,e._inverseProjection))}P$l.prototype.update=function(e){this._frameState=e,this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,e.context._canvas,this._resolutionScale=e.pixelRatio,this._pixelRatio=e.pixelRatio;var t=e.camera;this.updateCamera(t,e.context),e.mode===C$13.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=.5*this._frustum2DWidth,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),ni(this,e);var i=u$_(e.light,ri);i instanceof i$k?(this._lightDirectionWC=o$1p.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=o$1p.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=o$1p.normalize(o$1p.negate(i.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=p$1e.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));var n=i.color,r=o$1p.fromElements(n.red,n.green,n.blue,this._lightColorHdr);r=o$1p.multiplyByScalar(r,i.intensity,r);var o=o$1p.maximumComponent(r);o>1?o$1p.divideByScalar(r,o,this._lightColor):o$1p.clone(r,this._lightColor),this._sunColor=o$1p.clone(e.sunColor,this._sunColor);var a=e.brdfLutGenerator;e$2b(a)&&a.update(e);var s=e$2b(a)?a.colorTexture:void 0;this._brdfLut=s,this._environmentMap=u$_(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=u$_(e.sphericalHarmonicCoefficients,oi),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,this._hdrEnvMap=e.hdrEnvMap,this._toneMappingExposure=e.toneMappingExposure,this._envMapIntensity=e.envMapIntensity,e$2b(this._specularEnvironmentMaps)&&o$1o.clone(this._specularEnvironmentMaps.dimensions,this._specularEnvironmentMapsDimensions),this._fogDensity=e.fog.density,this._invertClassificationColor=e.invertClassificationColor,this._temeToPseudoFixed=m$17.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._imagerySplitPosition.x=e.imagerySplitPosition.x*e.context.drawingBufferWidth,this._imagerySplitPosition.y=e.imagerySplitPosition.y*e.context.drawingBufferHeight,this._globeSplitPosition.x=e.globeSplitPosition.x*e.context.drawingBufferWidth,this._globeSplitPosition.y=e.globeSplitPosition.y*e.context.drawingBufferHeight;var l,u=t.frustum.fov,c=this._viewport;l=c.height>c.width?2*Math.tan(.5*u)/c.height:2*Math.tan(.5*u)/c.width,this._geometricToleranceOverMeter=l*e.maximumScreenSpaceError,e$1U.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1),this.updateLightSource(e.lightSource),e$2b(this.globeDepthTexture)&&(this._globeDepthTextureDim.x=this.globeDepthTexture.width,this._globeDepthTextureDim.y=this.globeDepthTexture.height),this._sceneUBO.update(e.context,this),this._lightUBO.update(e)};var E$m=new o$1p;function li$1(e){if(e._modelViewDirty){e._modelViewDirty=!1;var t=p$1d.getTranslation(e._model,E$m);e.useRelativeOrigin&&!o$1p.equals(t,o$1p.ZERO)&&(o$1p.subtract(t,e._relativeOrigin,E$m),p$1d.setTranslation(e._model,E$m,e._model)),p$1d.multiplyTransformation(e._view,e._model,e._modelView)}}function hi$1(e){if(e._modelView3DDirty){e._modelView3DDirty=!1;var t=p$1d.getTranslation(e._model,E$m);e.useRelativeOrigin&&!o$1p.equals(t,o$1p.ZERO)&&(o$1p.subtract(t,e._relativeOrigin,E$m),p$1d.setTranslation(e._model,E$m,e._model)),p$1d.multiplyTransformation(e.view3D,e._model,e._modelView3D)}}function ci$2(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,p$1d.inverse(e.modelView,e._inverseModelView))}function _i$2(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,p$1d.inverse(e.modelView3D,e._inverseModelView3D))}function ai(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,p$1d.multiply(e._projection,e._view,e._viewProjection))}function ui$1(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,p$1d.inverse(e.viewProjection,e._inverseViewProjection))}function di$1(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,p$1d.multiply(e._projection,e.modelView,e._modelViewProjection),e._mvpViewPortDirty=!0)}function vi$2(e){e._mvpViewPortDirty&&(p$1d.multiply(e.viewportTransformation,e.modelViewProjection,e._mvpViewPort),e._mvpViewPortDirty=!1)}function pi$2(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;var t=e.modelView,i=e._modelViewRelativeToEye;i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=0,i[13]=0,i[14]=0,i[15]=t[15]}}function Di$2(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,p$1d.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function wi$2(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,p$1d.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function gi$2(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,p$1d.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function mi(e){if(e._normalDirty){e._normalDirty=!1;var t=e._normal;p$1d.getRotation(e.inverseModelView,t),p$1e.transpose(t,t)}}function yi$2(e){if(e._normal3DDirty){e._normal3DDirty=!1;var t=e._normal3D;p$1d.getRotation(e.inverseModelView3D,t),p$1e.transpose(t,t)}}function Pi$2(e){e._inverseNormalDirty&&(e._inverseNormalDirty=!1,p$1d.getRotation(e.inverseModelView,e._inverseNormal))}function fi$1(e){e._inverseNormal3DDirty&&(e._inverseNormal3DDirty=!1,p$1d.getRotation(e.inverseModelView3D,e._inverseNormal3D))}var b$s=new o$1p;function k$i(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,p$1d.multiplyByPoint(e.inverseModel,e._cameraPosition,b$s),i$11.fromCartesian(b$s,e._encodedCameraPositionMC))}function q$h(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,p$1d.multiplyByPoint(e.inverseModel,e._cameraPosition,b$s),i$11.fromCartesian(b$s,e._encodedOriginCameraPositionMC))}new o$1p;var Ci$2=new o$1p,Vi$2=new o$1p,Mi$2=new o$1p,Ei$2=new o$1p,Ti$2=new a$18,ji$1=new o$1p,xi$2=new p$1d;function Oi$2(e,t,i,n,r,o,a,s){var l=Ci$2;l.x=e.y,l.y=e.z,l.z=e.x;var u=Vi$2;u.x=i.y,u.y=i.z,u.z=i.x;var c=Mi$2;c.x=n.y,c.y=n.z,c.z=n.x;var h=Ei$2;h.x=t.y,h.y=t.z,h.z=t.x,o===C$13.SCENE2D&&(l.z=.5*r);var d=a.unproject(l,Ti$2);d.longitude=e$2a.clamp(d.longitude,-Math.PI,Math.PI),d.latitude=e$2a.clamp(d.latitude,-e$2a.PI_OVER_TWO,e$2a.PI_OVER_TWO);var f=a.ellipsoid,p=f.cartographicToCartesian(d,ji$1),_=m$17.eastNorthUpToFixedFrame(p,f,xi$2);return p$1d.multiplyByPointAsVector(_,u,u),p$1d.multiplyByPointAsVector(_,c,c),p$1d.multiplyByPointAsVector(_,h,h),e$2b(s)||(s=new p$1d),s[0]=u.x,s[1]=c.x,s[2]=-h.x,s[3]=0,s[4]=u.y,s[5]=c.y,s[6]=-h.y,s[7]=0,s[8]=u.z,s[9]=c.z,s[10]=-h.z,s[11]=0,s[12]=-o$1p.dot(u,p),s[13]=-o$1p.dot(c,p),s[14]=o$1p.dot(h,p),s[15]=1,s}function N$d(e){e._view3DDirty&&(e._mode===C$13.SCENE3D?p$1d.clone(e._view,e._view3D):Oi$2(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),p$1d.getRotation(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function G$j(e){e._inverseView3DDirty&&(p$1d.inverseTransformation(e.view3D,e._inverseView3D),p$1d.getRotation(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}function i$j(e){if(this._renderTexture=new s$L(e),this._renderTexture._generateMipmap=!0,this._context=e,this.waterNormalMapUrl=n$15("Assets/Textures/waterNormalsSmall.jpg"),this._waterNormalMapUrl=void 0,this._waterNormalMap=void 0,this._reflectPlane=new o$1m(o$1p.UNIT_Z,6378137),this._isUpdate=!0,this._distinctQuality=5,this._environmentVisible={isSunVisible:!0,isMoonVisible:!0,isSkyAtmosphereVisible:!0,isSkyBoxVisible:!0,isGlobalVisible:!1,isObjectVisible:!0},this.waterNormalMapUrl!==this._waterNormalMapUrl){var t=this.waterNormalMapUrl;if(this._waterNormalMapUrl=t,e$2b(t)){var i=this;o$1l(t$T(t),(function(n){if(t===i.waterNormalMapUrl){var r=new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.LINEAR_MIPMAP_LINEAR,magnificationFilter:rt$i.LINEAR});i._waterNormalMap=i._waterNormalMap&&i._waterNormalMap.destroy(),i._waterNormalMap=new t$V({context:e,source:n,sampler:r}),i._waterNormalMap.generateMipmap()}}))}else this._waterNormalMap=this._waterNormalMap&&this._waterNormalMap.destroy()}}function s$h(e){this._renderTexture=new s$L(e),this._renderTexture._pixelDatatype=_$$.UNSIGNED_BYTE,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0}}function t$g(e){this._renderTexture=new s$L(e),this._renderTexture._pixelDatatype=_$$.FLOAT,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0}}function t$f(e){this._renderTexture=new s$L(e),this._renderTexture._passState.blendingEnabled=!1,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0}}Object.defineProperties(i$j.prototype,{distinctQuality:{set:function(e){this._distinctQuality=e},get:function(){return this._distinctQuality}},renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return Qe$c.REFLECT}}}),i$j.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=e.camera,n=t.drawingBufferWidth,r=t.drawingBufferHeight,o=this._reflectPlane;return this._renderTexture._passState.viewport.width=n,this._renderTexture._passState.viewport.height=r,i.enableReflection(o),this._oriUseLogDepth=e.useLogDepth,e.useLogDepth=!1,this._renderTexture._passState},i$j.prototype.end=function(e){(e.camera.disableReflection(),e.useLogDepth=this._oriUseLogDepth,this._context.webgl2)&&this._renderTexture._fb.getColorTexture(0).generateMipmap()},i$j.prototype.update=function(e,t){},i$j.prototype.isDestroyed=function(){return!1},i$j.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)},Object.defineProperties(s$h.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 8},set:function(e){}},frameBufferType:{get:function(){return Qe$c.NORMAL_AND_DEPTH}}}),s$h.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},s$h.prototype.end=function(e){var t=this._context.readPixels({x:e.x,y:e.y,width:e.width,height:e.height,framebuffer:this._renderTexture._fb}),i=new e$29(t[0]/255,t[1]/255,t[2]/255,t[3]/255);if(0!==i.w){var n=o$1p.divideByScalar(i,i.w,new o$1p);return o$1p.subtract(o$1p.multiplyByScalar(n,2,new o$1p),new o$1p(1,1,1),n),o$1p.normalize(n,n),n}},s$h.prototype.endAsync=function(e){return this._context.readPixelsAsync({x:e.x,y:e.y,width:e.width,height:e.height,framebuffer:this._renderTexture._fb}).then((e=>{var t=new e$29(e[0]/255,e[1]/255,e[2]/255,e[3]/255);if(0===t.w)return Promise.resolve(void 0);var i=o$1p.divideByScalar(t,t.w,new o$1p);return o$1p.subtract(o$1p.multiplyByScalar(i,2,new o$1p),new o$1p(1,1,1),i),o$1p.normalize(i,i),Promise.resolve(i)})).catch((e=>(console.log("Context.readPixels failed."),Promise.resolve(void 0))))},s$h.prototype.update=function(e,t){},s$h.prototype.isDestroyed=function(){return!1},s$h.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)},Object.defineProperties(t$g.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 16},set:function(e){}},frameBufferType:{get:function(){return Qe$c.POSTEFFECT_FILTER}}}),t$g.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},t$g.prototype.end=function(e){},t$g.prototype.update=function(e,t){},t$g.prototype.isDestroyed=function(){return!1},t$g.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)},Object.defineProperties(t$f.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return Qe$c.PICKRECT}}}),t$f.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this.beginFunc&&this.beginFunc.call(this),this._renderTexture._passState},t$f.prototype.end=function(e){},t$f.prototype.update=function(e,t){},t$f.prototype.isDestroyed=function(){return!1},t$f.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$10(this)};var J$b=1073741824;function i$i(e,t){o$1q.defined("canvas",e),this._canvas=e;var i=t&&t.monitorTable||{};this._rows=i.rows||1,this._cols=i.cols||1,this._curRow=i.curRow||0,this._curCol=i.curCol||0;var n=3840,r=1080;e$2b(t)&&(n=u$_(t.maxDrawingBufferWidth,n),r=u$_(t.maxDrawingBufferHeight,r)),e.maxWidth=n,e.maxHeight=r,(t=u$_(t=l$1g(t,!0),{})).allowTextureFilterAnisotropic=u$_(t.allowTextureFilterAnisotropic,!0),this._id=e$1Q(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new h$m(this),this._textureCache=new r$o,this._clearColor=new e$1U(0,0,0,0),this._clearDepth=1,this._clearStencil=0;var o=new P$l,a=new n$Z(this),s=d$1m.fromCache();this._defaultPassState=a,this._defaultRenderState=s,this._defaultTexture=void 0,this._defaultCubeMap=void 0,this._defaultTransparentTexture=void 0,this._us=o,this._currentRenderState=s,this._currentPassState=a,this._currentViewport=void 0,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(var l=0;l<e$1T._maximumVertexAttributes;l++)this._vertexAttribDivisors.push(0);this._pickObjects={},this._nextPickColor=new Uint32Array(1),this._pickIdObjects={},this.options=t,this.cache={},this._pickPosition=new Float64Array(3),this._pickPositionHeight=0,this.pixels=new Uint8Array(4),this.shaderPreprocess=!0,this.numNormalAndDepthObject=0,this.numPostEffectFilterObject=0,this.numClampClipPlaneLayer=0,this._sharedEDL=this.createSharedEDLFrameBuffer(),this.memorySize=0,this.memoryThreshold=4,this.currentWarnFrameNumber=-99999,this._relativeOrigin=new o$1p,this._enableRelativeOrigin=!0,this._trangleCount=0,this._quadVpShaderSource=new s$U({name:"ViewportQuadVS",sources:[ot$7]})}var $$g={};Object.defineProperties(i$i.prototype,{id:{get:function(){return this._id}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},defaultTexture:{get:function(){return void 0===this._defaultTexture&&(this._defaultTexture=new t$V({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultTransparentTexture:{get:function(){return void 0===this._defaultTransparentTexture&&(this._defaultTransparentTexture=new t$V({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0,0])},flipY:!1})),this._defaultTransparentTexture}},defaultCubeMap:{get:function(){if(void 0===this._defaultCubeMap){var e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new e$1M({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})}return this._defaultCubeMap}},defaultFramebuffer:{get:function(){return $$g}},memoryThresholdValue:{get:function(){return this.memoryThreshold*J$b}},relativeOrigin:{set:function(e){this._relativeOrigin.x=Math.floor(e.x),this._relativeOrigin.y=Math.floor(e.y),this._relativeOrigin.z=Math.floor(e.z)},get:function(){return this._relativeOrigin}},enableRelativeOrigin:{get:function(){return this._enableRelativeOrigin}}}),typeof WebGLRenderingContext<"u"&&de$x.BACK,i$i.prototype.clear=function(e,t){},i$i.prototype.draw=function(e,t,i,n){},i$i.prototype.endFrame=function(){},i$i.prototype.readPixels=function(e){};const viewportQuadAttributeLocations={aPosition:0,textureCoordinates:1};function d$r(e,t,i){this._pickObjects=e,this.key=t,this.color=i}var h$l,c$f;i$i.prototype.getViewportQuadVertexArray=function(){var e=this.cache.viewportQuad_vertexArray;if(!e$2b(e)){var t=new I$1p({attributes:{aPosition:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:W$18.TRIANGLES});e=c$12.fromGeometry({context:this,geometry:t,attributeLocations:viewportQuadAttributeLocations,bufferUsage:A$19.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e},i$i.prototype.createViewportQuadCommand=function(e,t){var i=this._quadVpShaderSource;return e$2b(t)&&e$2b(t.useWGSL)&&t.useWGSL&&(i=D$j),this.createCustomViewportQuadCommand(i,e,t)},i$i.prototype.createCustomViewportQuadCommand=function(e,t,i){return i=u$_(i,u$_.EMPTY_OBJECT),new i$_({vertexArray:this.getViewportQuadVertexArray(),primitiveType:W$18.TRIANGLES,renderState:i.renderState,shaderProgram:r$13.fromCache({name:i.shaderProgramName,useWGSL:i.useWGSL,context:this,vertexShaderSource:e,fragmentShaderSource:t,attributeLocations:viewportQuadAttributeLocations}),uniformMap:i.uniformMap,owner:i.owner,framebuffer:i.framebuffer,pass:i.pass})},i$i.prototype.createReflectFramebuffer=function(){return new i$j(this)},i$i.prototype.createNormalFramebuffer=function(){return new s$h(this)},i$i.prototype.createPostEffectFilterlFramebuffer=function(){return new t$g(this)},i$i.prototype.createClampFramebuffer=function(){return new t$h(this)},i$i.prototype.createClosedDepthFramebuffer=function(){return new a$i(this)},i$i.prototype.createPickRectFramebuffer=function(){return new t$f(this)},i$i.prototype.createSharedEDLFrameBuffer=function(){return new _0x3cffe6},i$i.prototype.getObjectByPickColor=function(e){return o$1q.defined("pickColor",e),this._pickObjects[e.toRgba()]},i$i.prototype.getObjectByPickId=function(e){return o$1q.defined("pickId",e),this._pickObjects[e]},i$i.prototype.getAllPickObjects=function(){return this._pickObjects},i$i.prototype.getPickIdByKey=function(e){return this._pickIdObjects[e]},Object.defineProperties(d$r.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}}),d$r.prototype.destroy=function(){delete this._pickObjects[this.key]},i$i.prototype.createPickId=function(e){o$1q.defined("object",e),++this._nextPickColor[0];var t=this._nextPickColor[0];if(0===t)throw new t$14("Out of unique Pick IDs.");return this._pickObjects[t]=e,new d$r(this._pickObjects,t,e$1U.fromRgba(t))},i$i.prototype.createBillboardPointIndexBuffer=function(){if(!h$l){var e=new Uint16Array(6),t=0;e[t++]=0,e[t++]=1,e[t++]=2,e[t++]=0,e[t++]=2,e[t++]=3,(h$l=t$Y.createIndexBuffer({context:this,typedArray:e,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})).vertexArrayDestroyable=!1}return h$l},i$i.prototype.createBillboardOffsetVertexBuffer=function(){if(!c$f){var e=new Float32Array([-.5,-.5,.5,-.5,.5,.5,-.5,.5]);(c$f=t$Y.createVertexBuffer({context:this,typedArray:e,usage:A$19.STATIC_DRAW})).vertexArrayDestroyable=!1}return c$f},i$i.prototype.isDestroyed=function(){return!1},i$i.prototype.destroy=function(){var e=this.cache;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];e$2b(i.destroy)&&i.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),this._defaultTransparentTexture=this._defaultTransparentTexture&&this._defaultTransparentTexture.destroy(),i$10(this)};var S$i={NONE:0,BEGIN:1,READING:2},I$n,c$e,tt$5,rt$7,et$6;function C$l(e){this._scene=e,this._startPoint=void 0,this._endPoint=void 0,this._maxHeight=100,this._farDistance=500,this._showBound=!0,this._fbo=void 0,this._readyPromise=o$1l.defer(),this._hintBoundColor=new e$1U(0,1,1,.1),this._hintBoundOutlineColor=new e$1U(1,0,0,1),this._colorCommand=void 0,this._outlineCommand=void 0,this._update=!1,this._name="",this._frameState=void 0,this._visibleViewport=4095,this._buffers=new e$1N,this._readPixelState=S$i.NONE}function k$h(e){e$2b(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),e$2b(e._outlineCommand)&&(e._outlineCommand.vertexArray=e._outlineCommand.vertexArray&&e._outlineCommand.vertexArray.destroy(),e._outlineCommand.shaderProgram=e._outlineCommand.shaderProgram&&e._outlineCommand.shaderProgram.destroy(),e._outlineCommand=void 0)}function pt$3(e){var t=e._scene.camera,i=o$1p.subtract(e._endPoint,e._startPoint,new o$1p),n=o$1p.midpoint(e._startPoint,e._endPoint,new o$1p);o$1p.normalize(i,i);var r=o$1p.normalize(n,new o$1p),o=o$1p.cross(r,i,new o$1p);o$1p.normalize(o,o),o$1p.cross(i,o,r),o$1p.normalize(r,r);var a=o$1p.multiplyByScalar(r,e._maxHeight/2,new o$1p),s=new o$1p;o$1p.clone(n,s),o$1p.add(s,a,s);var l=o$1p.distance(e._endPoint,e._startPoint),u=1,c=0;e._readPixelState=S$i.NONE;var h=e._maxHeight;l*e._scene.context.drawingBufferHeight/e._scene.context.drawingBufferWidth<e._maxHeight&&(h=l*e._scene.context.drawingBufferHeight/e._scene.context.drawingBufferWidth,u=Math.ceil(e._maxHeight/h)),e$2b(e._fbo)||(e._fbo=new t$F(e._scene.context),e._fbo.environmentVisible.isObjectVisible=!0,e._fbo.environmentVisible.isOnlyS3MObjectVisible=!0,e._fbo._useHeight=!1,e._scene.frameState._framebufferList[e._name]=e._fbo,e._frameState=e._scene._frameState),e._buffers.removeAll(),e._fbo._isUpdate=!0,e._fbo._beginFunc=function(i){if(e._readPixelState!==S$i.READING){e._readPixelState=S$i.BEGIN,e._readyPromise=o$1l.defer(),I$n=o$1p.clone(t.position),c$e=o$1p.clone(t.direction),tt$5=o$1p.clone(t.up),rt$7=t.frustum.clone(new o$15),et$6=i.useLogDepth,i.useLogDepth=!1,o$1p.clone(n,s),a=o$1p.multiplyByScalar(r,h/2+h*c,new o$1p),o$1p.add(s,a,s),t.setView({destination:s,orientation:{direction:o,up:r}});var l=new a$V,u=o$1p.distance(e._endPoint,e._startPoint);l.width=u,l.near=.01,l.far=e._farDistance,l.aspectRatio=i.context.drawingBufferWidth/i.context.drawingBufferHeight,t.frustum=l,i.context.uniformState.updateFrustum(l)}},e._fbo._endFunc=function(i){if(e._readPixelState!==S$i.READING){t.frustum=rt$7,t.setView({destination:I$n,orientation:{direction:c$e,up:tt$5}}),i.context.uniformState.updateFrustum(t.frustum),i.useLogDepth=et$6;var n=e._scene._context;n.readPixelsAsync({x:0,y:0,width:n.drawingBufferWidth,height:n.drawingBufferHeight,framebuffer:e._fbo._renderTexture._fb}).then((t=>{if(e._readPixelState=S$i.NONE,e._buffers.set(c,t),c++,0==--u){for(var r=new Uint8Array(t.length*e._buffers.length),o=0;o<e._buffers.length;o++)r.set(e._buffers.get(o),t.length*o);var a=document.createElement("canvas");a.height=n.drawingBufferHeight*e._buffers.length,a.width=n.drawingBufferWidth;var s=a.getContext("2d"),l=s.createImageData(a.width,a.height);l.data.set(r),s.putImageData(l,0,0);for(var d=o$1p.distance(e._endPoint,e._startPoint)/e._maxHeight,f=i.context.drawingBufferWidth/d,p=s.getImageData(0,0,a.width,a.height),_=e._maxHeight/h-Math.floor(e._maxHeight/h),m=(1-_)*p.height/e._buffers.length,g=0;g<p.height/2;++g)for(var x=0;x<p.width;++x){var v=4*g*p.width+4*x,y=4*(p.height-g)*p.width+4*x,$=p.data[v],b=p.data[v+1],T=p.data[v+2],C=p.data[v+3];p.data[v]=p.data[y],p.data[v+1]=p.data[y+1],p.data[v+2]=p.data[y+2],p.data[v+3]=p.data[y+3],p.data[y]=$,p.data[y+1]=b,p.data[y+2]=T,p.data[y+3]=C,1===e._buffers.length&&g<p.height/2-f/2&&(p.data[v]=0,p.data[v+1]=0,p.data[v+2]=0,p.data[v+3]=0),e._buffers.length>1&&_>0&&g<m&&(p.data[v]=0,p.data[v+1]=0,p.data[v+2]=0,p.data[v+3]=0)}s.clearRect(0,0,p.width,p.height),s.putImageData(p,0,0);var S=a.toDataURL();e._readyPromise.resolve(S),e._fbo._isUpdate=!1}})),e._readPixelState=S$i.READING}}}function ft$2(e){if(e._showBound){var t=e._scene._context,i=o$1p.subtract(e._endPoint,e._startPoint,new o$1p),n=o$1p.midpoint(e._startPoint,e._endPoint,new o$1p);o$1p.normalize(i,i);var r=o$1p.normalize(n,new o$1p),o=o$1p.multiplyByScalar(r,e._maxHeight,new o$1p),a=o$1p.cross(r,i,new o$1p);o$1p.normalize(a,a);var s=o$1p.multiplyByScalar(a,e._farDistance,new o$1p),l=new o$1p;o$1p.add(e._startPoint,s,l);var u=new o$1p;o$1p.add(e._endPoint,s,u);var c=new o$1p;o$1p.add(e._startPoint,o,c);var h=new o$1p;o$1p.add(e._endPoint,o,h);var d=new o$1p;o$1p.add(u,o,d);var f=new o$1p;o$1p.add(l,o,f);var p=m$17.eastNorthUpToFixedFrame(e._startPoint),_=p$1d.inverse(p,new p$1d);e._colorCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:p,pass:Le$s.OPAQUE,owner:e});for(var m=[e._startPoint,e._endPoint,u,l,c,h,d,f],g=S$12.createTypedArray(S$12.FLOAT,24),x=0;x<m.length;x++){var v=p$1d.multiplyByPoint(_,m[x],new o$1p);g[3*x]=v.x,g[3*x+1]=v.y,g[3*x+2]=v.z}var y=t$Y.createVertexBuffer({context:t,typedArray:g,usage:A$19.STATIC_DRAW}),$=new s$U({name:"FacadeVp",sources:["attribute vec4 aPosition;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n"]}),b=new s$U({name:"FacadeFp",sources:["uniform vec4 uColor;\nvoid main(){\n gl_FragColor = uColor;\n}\n"]}),T=r$13.fromCache({context:t,vertexShaderSource:$,fragmentShaderSource:b,attributeLocations:{aPosition:0}}),C=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),S=[];S.push({name:"aPosition",index:0,vertexBuffer:y,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var w=S$12.createTypedArray(S$12.UNSIGNED_SHORT,36);w[0]=0,w[1]=1,w[2]=2,w[3]=0,w[4]=2,w[5]=3,w[6]=4,w[7]=5,w[8]=6,w[9]=4,w[10]=6,w[11]=7,w[12]=0,w[13]=1,w[14]=5,w[15]=0,w[16]=5,w[17]=4,w[18]=3,w[19]=2,w[20]=6,w[21]=3,w[22]=6,w[23]=7,w[24]=3,w[25]=0,w[26]=4,w[27]=3,w[28]=4,w[29]=7,w[30]=1,w[31]=2,w[32]=6,w[33]=1,w[34]=6,w[35]=5;var E=S$12.createTypedArray(S$12.UNSIGNED_SHORT,24);E[0]=0,E[1]=1,E[2]=1,E[3]=2,E[4]=2,E[5]=3,E[6]=3,E[7]=0,E[8]=4,E[9]=5,E[10]=5,E[11]=6,E[12]=6,E[13]=7,E[14]=7,E[15]=4,E[16]=0,E[17]=4,E[18]=1,E[19]=5,E[20]=2,E[21]=6,E[22]=3,E[23]=7;var P=new c$12({context:t,attributes:S,indexBuffer:t$Y.createIndexBuffer({context:t,typedArray:w,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})});e._colorCommand.vertexArray=P,e._colorCommand.shaderProgram=T,e._colorCommand.renderState=C,e._colorCommand.uniformMap={uColor:function(){return e._hintBoundColor}},e._outlineCommand=new i$_({primitiveType:W$18.LINES,modelMatrix:p,pass:Le$s.OPAQUE,owner:e}),e._outlineCommand.shaderProgram=T;var A=new c$12({context:t,attributes:S,indexBuffer:t$Y.createIndexBuffer({context:t,typedArray:E,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})});e._outlineCommand.vertexArray=A,e._outlineCommand.renderState=C,e._outlineCommand.uniformMap={uColor:function(){return e._hintBoundOutlineColor}}}}function f$m(e){const t=(e=u$_(e,u$_.EMPTY_OBJECT)).context,i=e.width,n=e.height;o$1q.defined("options.context",t),o$1q.defined("options.width",i),o$1q.defined("options.height",n),this._width=i,this._height=n;const r=e.colorRenderbuffers,o=e.colorTextures;if(e$2b(r)!==e$2b(o))throw new t$16("Both color renderbuffer and texture attachments must be provided.");const a=e.depthStencilRenderbuffer,s=e.depthStencilTexture;if(e$2b(a)!==e$2b(s))throw new t$16("Both depth-stencil renderbuffer and texture attachments must be provided.");this._renderFramebuffer=new t$W({context:t,colorRenderbuffers:r,depthStencilRenderbuffer:a,destroyAttachments:e.destroyAttachments}),this._colorFramebuffer=new t$W({context:t,colorTextures:o,depthStencilTexture:s,destroyAttachments:e.destroyAttachments})}function s$g(e){if(e=u$_(e,u$_.EMPTY_OBJECT),this._numSamples=u$_(e.numSamples,1),this._colorAttachmentsLength=u$_(e.colorAttachmentsLength,1),this._color=u$_(e.color,!0),this._depth=u$_(e.depth,!1),this._depthStencil=u$_(e.depthStencil,!1),this._supportsDepthTexture=u$_(e.supportsDepthTexture,!1),!this._color&&!this._depth&&!this._depthStencil)throw new t$16("Must enable at least one type of framebuffer attachment.");if(this._depth&&this._depthStencil)throw new t$16("Cannot have both a depth and depth-stencil attachment.");this._createColorAttachments=u$_(e.createColorAttachments,!0),this._createDepthAttachments=u$_(e.createDepthAttachments,!0),this._pixelDatatype=e.pixelDatatype,this._pixelFormat=e.pixelFormat,this._width=void 0,this._height=void 0,this._framebuffer=void 0,this._multisampleFramebuffer=void 0,this._colorTextures=void 0,this._color&&(this._colorTextures=new Array(this._colorAttachmentsLength),this._colorRenderbuffers=new Array(this._colorAttachmentsLength)),this._colorRenderbuffer=void 0,this._depthStencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthRenderbuffer=void 0,this._depthTexture=void 0,this._attachmentsDirty=!1}function d$q(e,t){if(o$1q.defined("context",e),!(e$2b(t)&&e$2b(t.positiveX)&&e$2b(t.negativeX)&&e$2b(t.positiveY)&&e$2b(t.negativeY)&&e$2b(t.positiveZ)&&e$2b(t.negativeZ)))throw new t$16("urls is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");var i=[t$11.createIfNeeded(t.positiveX).fetchImage(),t$11.createIfNeeded(t.negativeX).fetchImage(),t$11.createIfNeeded(t.positiveY).fetchImage(),t$11.createIfNeeded(t.negativeY).fetchImage(),t$11.createIfNeeded(t.positiveZ).fetchImage(),t$11.createIfNeeded(t.negativeZ).fetchImage()];return o$1l.all(i,(function(t){return new e$1M({context:e,source:{positiveX:t[0],negativeX:t[1],positiveY:t[2],negativeY:t[3],positiveZ:t[4],negativeZ:t[5]}})}))}Object.defineProperties(C$l.prototype,{readyPromise:{get:function(){return this._readyPromise}},farDistance:{get:function(){return this._farDistance},set:function(e){this._farDistance=e,this._update=!0}},maxHeight:{get:function(){return this._maxHeight},set:function(e){this._maxHeight=e,this._update=!0}},startPoint:{get:function(){return this._startPoint},set:function(e){this._startPoint=e,this._update=!0}},endPoint:{get:function(){return this._endPoint},set:function(e){this._endPoint=e,this._update=!0}}}),C$l.prototype.clear=function(){this._startPoint=void 0,this._endPoint=void 0,k$h(this)},C$l.prototype.setVisibleInViewport=function(e){if(e>8)throw new DeveloperError("the index is 0~8");this._visibleViewport=1<<e},C$l.prototype.getVisibleInViewport=function(e){if(e>8)throw new DeveloperError("the index is 0~8");return 1<<e&this._visibleViewport},C$l.prototype.destroy=function(){return this.clear(),e$2b(this._frameState)&&(e$2b(this._fbo)&&delete this._frameState._framebufferList[this._name],this._frameState=void 0),this._fbo=this._fbo&&this._fbo.destroy(),this._scene._analyst3D.remove(this._name,!0),i$10(this)},C$l.prototype.update=function(e,t,i){!e$2b(this._startPoint)||!e$2b(this._endPoint)||(this._update&&(k$h(this),pt$3(this),ft$2(this),this._update=!1),this._showBound&&e$2b(this._colorCommand)&&e$2b(this._outlineCommand)&&!t.passes.pick&&(i.push(this._colorCommand),i.push(this._outlineCommand)))},C$l.prototype.setBoundByPoints=function(e,t){this._startPoint=e,this._endPoint=t,this._update=!0},C$l.prototype.build=function(){""===this._name&&(this._name="facade"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},f$m.prototype.getRenderFramebuffer=function(){return this._renderFramebuffer},f$m.prototype.getColorFramebuffer=function(){return this._colorFramebuffer},f$m.prototype.blitFramebuffers=function(e,t){this._renderFramebuffer.bindRead(),this._colorFramebuffer.bindDraw();const i=e._gl;let n=0;this._colorFramebuffer._colorTextures.length>0&&(n|=i.COLOR_BUFFER_BIT),e$2b(this._colorFramebuffer.depthStencilTexture)&&(n|=i.DEPTH_BUFFER_BIT|(t?i.STENCIL_BUFFER_BIT:0)),i.blitFramebuffer(0,0,this._width,this._height,0,0,this._width,this._height,n,i.NEAREST),i.bindFramebuffer(i.READ_FRAMEBUFFER,null),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,null)},f$m.prototype.isDestroyed=function(){return!1},f$m.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),i$10(this)},Object.defineProperties(s$g.prototype,{framebuffer:{get:function(){return this._numSamples>1?this._multisampleFramebuffer.getRenderFramebuffer():this._framebuffer}},numSamples:{get:function(){return this._numSamples}},status:{get:function(){return this.framebuffer.status}}}),s$g.prototype.isDirty=function(e,t,i,n,r){i=u$_(i,1);const o=this._width!==e||this._height!==t,a=this._numSamples!==i,s=e$2b(n)&&this._pixelDatatype!==n||e$2b(r)&&this._pixelFormat!==r,l=e$2b(1===i?this._framebuffer:this._multisampleFramebuffer);return this._attachmentsDirty||o||a||s||!l||this._color&&!e$2b(this._colorTextures[0])},s$g.prototype.update=function(e,t,i,n,r,o){if(!e$2b(t)||!e$2b(i))throw new t$16("width and height must be defined.");if(n=e.msaa?u$_(n,1):1,r=u$_(r,this._color?u$_(this._pixelDatatype,_$$.UNSIGNED_BYTE):void 0),o=u$_(o,this._color?u$_(this._pixelFormat,V$10.RGBA):void 0),this.isDirty(t,i,n,r,o)){if(this.destroy(),this._width=t,this._height=i,this._numSamples=n,this._pixelDatatype=r,this._pixelFormat=o,this._attachmentsDirty=!1,this._color&&this._createColorAttachments)for(let n=0;n<this._colorAttachmentsLength;++n)if(this._colorTextures[n]=new t$V({context:e,width:t,height:i,pixelFormat:o,pixelDatatype:r,sampler:e$1P.NEAREST}),this._numSamples>1){const o=M$13.getColorFormat(r);this._colorRenderbuffers[n]=new r$$({context:e,width:t,height:i,format:o,numSamples:this._numSamples})}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new t$V({context:e,width:t,height:i,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8,sampler:e$1P.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new r$$({context:e,width:t,height:i,format:M$13.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new r$$({context:e,width:t,height:i,format:M$13.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new t$V({context:e,width:t,height:i,pixelFormat:V$10.DEPTH_COMPONENT,pixelDatatype:_$$.UNSIGNED_INT,sampler:e$1P.NEAREST}):this._depthRenderbuffer=new r$$({context:e,width:t,height:i,format:M$13.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new f$m({context:e,width:this._width,height:this._height,colorTextures:this._colorTextures,colorRenderbuffers:this._colorRenderbuffers,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}):this._framebuffer=new t$W({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}},s$g.prototype.getColorTexture=function(e){if((e=u$_(e,0))>=this._colorAttachmentsLength)throw new t$16("index must be smaller than total number of color attachments.");return this._colorTextures[e]},s$g.prototype.setColorTexture=function(e,t){if(t=u$_(t,0),this._createColorAttachments)throw new t$16("createColorAttachments must be false if setColorTexture is called.");if(t>=this._colorAttachmentsLength)throw new t$16("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e},s$g.prototype.getColorRenderbuffer=function(e){if((e=u$_(e,0))>=this._colorAttachmentsLength)throw new t$16("index must be smaller than total number of color attachments.");return this._colorRenderbuffers[e]},s$g.prototype.setColorRenderbuffer=function(e,t){if(t=u$_(t,0),this._createColorAttachments)throw new t$16("createColorAttachments must be false if setColorRenderbuffer is called.");if(t>=this._colorAttachmentsLength)throw new t$16("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e},s$g.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer},s$g.prototype.setDepthRenderbuffer=function(e){if(this._createDepthAttachments)throw new t$16("createDepthAttachments must be false if setDepthRenderbuffer is called.");this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e},s$g.prototype.getDepthTexture=function(){return this._depthTexture},s$g.prototype.setDepthTexture=function(e){if(this._createDepthAttachments)throw new t$16("createDepthAttachments must be false if setDepthTexture is called.");this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e},s$g.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer},s$g.prototype.setDepthStencilRenderbuffer=function(e){if(this._createDepthAttachments)throw new t$16("createDepthAttachments must be false if setDepthStencilRenderbuffer is called.");this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e},s$g.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture},s$g.prototype.setDepthStencilTexture=function(e){if(this._createDepthAttachments)throw new t$16("createDepthAttachments must be false if setDepthStencilTexture is called.");this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e},s$g.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)},s$g.prototype.clear=function(e,t,i){const n=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,i),t.framebuffer=n},s$g.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()},s$g.prototype.destroy=function(){if(this._color){let e;const t=this._colorTextures.length;for(e=0;e<t;++e){const t=this._colorTextures[e];this._createColorAttachments&&e$2b(t)&&!t.isDestroyed()&&(this._colorTextures[e].destroy(),this._colorTextures[e]=void 0),e$2b(t)&&t.isDestroyed()&&(this._colorTextures[e]=void 0);const i=this._colorRenderbuffers[e];this._createColorAttachments&&e$2b(i)&&!i.isDestroyed()&&(this._colorRenderbuffers[e].destroy(),this._colorRenderbuffers[e]=void 0),e$2b(i)&&i.isDestroyed()&&(this._colorRenderbuffers[e]=void 0)}}this._depthStencil&&(this._createDepthAttachments&&(this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()),e$2b(this._depthStencilTexture)&&this._depthStencilTexture.isDestroyed()&&(this._depthStencilTexture=void 0),e$2b(this._depthStencilRenderbuffer)&&this._depthStencilRenderbuffer.isDestroyed()&&(this._depthStencilRenderbuffer=void 0)),this._depth&&(this._createDepthAttachments&&(this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy()),e$2b(this._depthTexture)&&this._depthTexture.isDestroyed()&&(this._depthTexture=void 0),e$2b(this._depthRenderbuffer)&&this._depthRenderbuffer.isDestroyed()&&(this._depthRenderbuffer=void 0)),this.destroyFramebuffer()};class U$h{constructor(){}parse(e){const t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},i=function(e,t,i){t=t||1024;let n=e.pos,r=-1,o=0,a="",s=String.fromCharCode.apply(null,new Uint16Array(e.subarray(n,n+128)));for(;0>(r=s.indexOf("\n"))&&o<t&&n<e.byteLength;)a+=s,o+=s.length,n+=128,s+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(n,n+128)));return-1<r&&(!1!==i&&(e.pos+=o+r+1),a+s.slice(0,r))};const n=function(){const e=new ArrayBuffer(4),t=new Float32Array(e),i=new Uint32Array(e),n=new Uint32Array(512),r=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(n[e]=0,n[256|e]=32768,r[e]=24,r[256|e]=24):t<-14?(n[e]=1024>>-t-14,n[256|e]=1024>>-t-14|32768,r[e]=-t-1,r[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,r[e]=13,r[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,r[e]=24,r[256|e]=24):(n[e]=31744,n[256|e]=64512,r[e]=13,r[256|e]=13)}const o=new Uint32Array(2048),a=new Uint32Array(64),s=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,i=0;for(;0==(8388608&t);)t<<=1,i-=8388608;t&=-8388609,i+=947912704,o[e]=t|i}for(let e=1024;e<2048;++e)o[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)a[e]=e<<23;a[31]=1199570944,a[32]=2147483648;for(let e=33;e<63;++e)a[e]=2147483648+(e-32<<23);a[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(s[e]=1024);return{floatView:t,uint32View:i,baseTable:n,shiftTable:r,mantissaTable:o,exponentTable:a,offsetTable:s}}();function r(e){Math.abs(e)>65504&&console.warn("rgbe : toHalfFloat(): Value out of range."),e=function(e,t,i){return Math.max(t,Math.min(i,e))}(e,-65504,65504),n.floatView[0]=e;const t=n.uint32View[0],i=t>>23&511;return n.baseTable[i]+((8388607&t)>>n.shiftTable[i])}const o=function(e,t,i,n){const o=e[t+3],a=Math.pow(2,o-128)/255;i[n+0]=r(Math.min(e[t+0]*a,65504)),i[n+1]=r(Math.min(e[t+1]*a,65504)),i[n+2]=r(Math.min(e[t+2]*a,65504)),i[n+3]=r(1)},a=new Uint8Array(e);a.pos=0;const s=function(e){const n=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,r=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,o=/^\s*FORMAT=(\S+)\s*$/,a=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,s={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let l,u;if(e.pos>=e.byteLength||!(l=i(e)))return t(1,"no header found");if(!(u=l.match(/^#\?(\S+)/)))return t(3,"bad initial token");for(s.valid|=1,s.programtype=u[1],s.string+=l+"\n";l=i(e),!1!==l;)if(s.string+=l+"\n","#"!==l.charAt(0)){if((u=l.match(n))&&(s.gamma=parseFloat(u[1])),(u=l.match(r))&&(s.exposure=parseFloat(u[1])),(u=l.match(o))&&(s.valid|=2,s.format=u[1]),(u=l.match(a))&&(s.valid|=4,s.height=parseInt(u[1],10),s.width=parseInt(u[2],10)),2&s.valid&&4&s.valid)break}else s.comments+=l+"\n";return 2&s.valid?4&s.valid?s:t(3,"missing image size specifier"):t(3,"missing format specifier")}(a);if(-1!==s){const e=s.width,i=s.height,n=function(e,i,n){const r=i;if(r<8||r>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(r!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");const o=new Uint8Array(4*i*n);if(!o.length)return t(4,"unable to allocate buffer space");let a=0,s=0;const l=4*r,u=new Uint8Array(4),c=new Uint8Array(l);let h=n;for(;h>0&&s<e.byteLength;){if(s+4>e.byteLength)return t(1);if(u[0]=e[s++],u[1]=e[s++],u[2]=e[s++],u[3]=e[s++],2!=u[0]||2!=u[1]||(u[2]<<8|u[3])!=r)return t(3,"bad rgbe scanline format");let i,n=0;for(;n<l&&s<e.byteLength;){i=e[s++];const r=i>128;if(r&&(i-=128),0===i||n+i>l)return t(3,"bad scanline data");if(r){const t=e[s++];for(let e=0;e<i;e++)c[n++]=t}else c.set(e.subarray(s,s+i),n),n+=i,s+=i}const d=r;for(let e=0;e<d;e++){let t=0;o[a]=c[e+t],t+=r,o[a+1]=c[e+t],t+=r,o[a+2]=c[e+t],t+=r,o[a+3]=c[e+t],a+=4}h--}return o}(a.subarray(a.pos),e,i);if(-1!==n){let t;const r=n.length/4,a=new Uint16Array(4*r);for(let e=0;e<r;e++)o(n,4*e,a,4*e);return t=a,{width:e,height:i,data:t,header:s.string,gamma:s.gamma,exposure:s.exposure}}}return null}}function b$r(e,t){if(o$1q.defined("context",e),!e$2b(t))throw new t$16("urls is required and must have the url of image.");this._context=e,this._size=0,this._cubeVs=void 0,this._cubeUniformMap=void 0,this._cubeRenderState=void 0,this._inputTexture=void 0,this._cubeMap=void 0,this._sourceData=void 0,this._loading=!1,this._url=t,this._rgbeLoader=new U$h,this._inputTexture=void 0,this._ready=!1,this._position=o$1p.fromDegrees(113,23,1),this._modelMatrix=m$17.eastNorthUpToFixedFrame(this._position)}function xe$5(e){let t=[],i=[],n=0;function r(e,r,o,a,s,l,u,c,h,d,f){const p=l/h,_=u/d,m=l/2,g=u/2,x=c/2,v=h+1,y=d+1;let $=0;const b=new o$1p;for(let i=0;i<y;i++){const n=i*_-g;for(let i=0;i<v;i++){const l=i*p-m;b[e]=l*a,b[r]=n*s,b[o]=x,t.push(b.x,b.y,b.z),b[e]=0,b[r]=0,b[o]=c>0?1:-1,$+=1}}for(let e=0;e<d;e++)for(let t=0;t<h;t++){const r=n+t+v*e,o=n+t+v*(e+1),a=n+(t+1)+v*(e+1),s=n+(t+1)+v*e;i.push(r,o,s),i.push(o,a,s)}n+=$}r("z","y","x",-1,-1,1,1,1,1,1),r("z","y","x",1,-1,1,1,-1,1,1),r("x","z","y",1,1,1,1,1,1,1),r("x","z","y",1,-1,1,1,-1,1,1),r("x","y","z",1,-1,1,1,1,1,1),r("x","y","z",-1,-1,1,1,-1,1,1);let o=new Uint16Array(i),a=new Float32Array(t),s=new I$1p({attributes:{position:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:a})},indices:o,primitiveType:W$18.TRIANGLES,boundingSphere:i$1c.fromVertices(a)});return c$12.fromGeometry({context:e,geometry:s,attributeLocations:{position:0},bufferUsage:A$19.STATIC_DRAW})}function ye$6(e){return r$13.fromCache({context:e,vertexShaderSource:"\n precision mediump float;\n precision mediump int;\n\n attribute vec3 position;\n uniform mat4 projectionMat4;\n\n varying vec3 vWorldDirection;\n\n void main() {\n vWorldDirection = normalize(position);\n gl_Position = czm_modelViewProjection * vec4(position, 1.0);\n }\n ",fragmentShaderSource:"\n precision mediump float;\n precision mediump int;\n\n varying vec3 vWorldDirection;\n uniform sampler2D tEquirect;\n\n #define RECIPROCAL_PI 0.3183098861837907\n #define RECIPROCAL_PI2 0.15915494309189535\n\n vec2 equirectUv( in vec3 dir ) {\n // dir is assumed to be unit length\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n }\n\n void main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n }\n",attributeLocations:{position:0}})}function ge$9(e,t){let i=t;const n=e.context;i._cubeVs=xe$5(n),i._cubeSp=ye$6(n),i._cubeUniformMap={tEquirect:function(){return i._inputTexture}},i._cubeRenderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},viewport:new f$18(0,0,i._size,i._size)}),i._cubeMap=new e$1M({context:n,width:i._size,height:i._size,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,flipY:!0});let r=p$1d.getRotation(i._modelMatrix,new p$1e),o=p$1e.getColumn(r,0,new o$1p),a=p$1e.getColumn(r,1,new o$1p),s=p$1e.getColumn(r,2,new o$1p),l=o$1p.multiplyByScalar(s,-1,new o$1p),u=o$1p.multiplyByScalar(a,-1,new o$1p),c=o$1p.multiplyByScalar(o,-1,new o$1p),h=new v$K(e.camera._scene);h.frustum.near=.1,h.frustum.aspectRatio=1,h.frustum.fov=90*e$2a.RADIANS_PER_DEGREE,i._projectionMat4=p$1d.clone(h.frustum.projectionMatrix,i._projectionMat4);let d=[o,l,a,c,s,u],f=[s,a,s,s,a,s],p=[i._cubeMap.positiveX,i._cubeMap.positiveY,i._cubeMap.positiveZ,i._cubeMap.negativeX,i._cubeMap.negativeY,i._cubeMap.negativeZ];for(let t=0;t<6;t++){let r=new t$W({context:n,colorTextures:[p[t]]}),o=new i$_({vertexArray:i._cubeVs,shaderProgram:i._cubeSp,uniformMap:i._cubeUniformMap,pass:Le$s.OPAQUE,primitiveType:W$18.TRIANGLES,renderState:i._cubeRenderState,modelMatrix:i._modelMatrix,cull:!1,owner:i,framebuffer:r,pickOnly:!0});h.setView({destination:i._position,orientation:{direction:d[t],up:f[t]}}),e.context.uniformState.updateCamera(h,e.context);let a=new n$Z(e.context);e.context.draw(o,a)}}Object.defineProperties(b$r.prototype,{cubeMap:{get:function(){return this._cubeMap}},ready:{get:function(){return this._ready}}});let be$7=/(\.hdr$)/i,ve$6=/(\.jpg$)/i;function t$e(){}function E$l(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).context,i=e.width,n=e.height,r=e.depth,o=e.mipmapLevels,a=e.is3D,s=u$_(e.pixelFormat,V$10.RGBA),l=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE),u=s,c=V$10.isCompressedFormat(u);if(s===V$10.DEPTH_STENCIL?u=de$x.DEPTH24_STENCIL8:s===V$10.DEPTH_COMPONENT&&(l===_$$.UNSIGNED_SHORT?u=de$x.DEPTH_COMPONENT16:l===_$$.UNSIGNED_INT&&(u=de$x.DEPTH_COMPONENT24)),l===_$$.FLOAT)switch(s){case V$10.RGBA:u=de$x.RGBA32F;break;case V$10.RGB:u=de$x.RGB32F;break;case V$10.RG:u=de$x.RG32F;break;case V$10.RED:u=de$x.R32F}else if(l===_$$.HALF_FLOAT)switch(s){case V$10.RGBA:u=de$x.RGBA16F;break;case V$10.RGB:u=de$x.RGB16F;break;case V$10.RG:u=de$x.RG16F;break;case V$10.RED:u=de$x.R16F}if(!e$2b(i)||!e$2b(n))throw new t$16("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(o$1q.typeOf.number.greaterThan("width",i,0),i>e$1T.maximumTextureSize)throw new t$16("Width must be less than or equal to the maximum texture size ("+e$1T.maximumTextureSize+"). Check maximumTextureSize.");if(o$1q.typeOf.number.greaterThan("height",n,0),n>e$1T.maximumTextureSize)throw new t$16("Height must be less than or equal to the maximum texture size ("+e$1T.maximumTextureSize+"). Check maximumTextureSize.");if(!V$10.validate(s))throw new t$16("Invalid options.pixelFormat.");if(!c&&!_$$.validate(l))throw new t$16("Invalid options.pixelDatatype.");if(s===V$10.DEPTH_COMPONENT&&l!==_$$.UNSIGNED_SHORT&&l!==_$$.UNSIGNED_INT)throw new t$16("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(s===V$10.DEPTH_STENCIL&&l!==_$$.UNSIGNED_INT_24_8)throw new t$16("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(l===_$$.FLOAT&&!t.floatingPointTexture)throw new t$16("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(l===_$$.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$16("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(V$10.isDepthFormat(s)&&!t.depthTexture)throw new t$16("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.");if(c){if(V$10.isDXTFormat(u)&&!t.s3tc)throw new t$16("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(V$10.isPVRTCFormat(u)&&!t.pvrtc)throw new t$16("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(V$10.isETC1Format(u)&&!t.etc1)throw new t$16("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.")}var h,d=e.preMultiplyAlpha||s===V$10.RGB||s===V$10.LUMINANCE,f=u$_(e.flipY,!0),p=t._gl,_=a?p.TEXTURE_3D:p.TEXTURE_2D_ARRAY,m=p.createTexture();p.activeTexture(p.TEXTURE0),p.bindTexture(_,m),p.texStorage3D(_,o,u,i,n,r),p.bindTexture(_,null),h=c?V$10.compressedTextureSizeInBytes(s,i,n,r):V$10.textureSizeInBytes(s,l,i,n,r),this._id=e$1Q(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=_,this._texture=m,this._pixelFormat=s,this._internalFormat=u,this._pixelDatatype=l,this._width=i,this._height=n,this._depth=r,this._dimensions=new o$1p(i,n,r),this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0,this.ignoreWEBGL2=!1,this._isCompressed=c,this.sampler=e$2b(e.sampler)?e.sampler:new e$1P,t.memorySize+=h}function L$n(e,t,i,n){if(!e$2a.isPowerOfTwo(i)||!e$2a.isPowerOfTwo(n))return!1;for(var r=e.length,o=i,a=n,s=0;;){if(s+=V$10.compressedTextureSizeInBytes(t,o,a),a>>=1,0==(o>>=1)&&0==a)break;o=Math.max(o,1),a=Math.max(a,1)}return s==r}function b$q(e,t,i){switch(e){case V$10.RGB_DXT1:case V$10.RGB_ETC1:return(t+3>>2)*(i+3>>2)*8;case V$10.RGBA_DXT5:return(t+3>>2)*(i+3>>2)*16;case V$10.RGB_PVRTC_4BPPV1:case V$10.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case V$10.RGB_PVRTC_2BPPV1:case V$10.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case de$x.RGB565:return t*i*2;case V$10.RGBA:return t*i*4;case V$10.LUMINANCE_ALPHA:return t*i*2;default:return 0}}function f$l(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).context,i=e.width,n=e.height,r=e.depth,o=e.mipmapLevels,a=e.is3D,s=u$_(e.pixelFormat,V$10.RGBA),l=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE),u=s,c=V$10.isCompressedFormat(u);if(s===V$10.DEPTH_STENCIL?u=de$x.DEPTH24_STENCIL8:s===V$10.DEPTH_COMPONENT&&(l===_$$.UNSIGNED_SHORT?u=de$x.DEPTH_COMPONENT16:l===_$$.UNSIGNED_INT&&(u=de$x.DEPTH_COMPONENT24)),l===_$$.FLOAT)switch(s){case V$10.RGBA:u=de$x.RGBA32F;break;case V$10.RGB:u=de$x.RGB32F;break;case V$10.RG:u=de$x.RG32F;break;case V$10.RED:u=de$x.R32F}else if(l===_$$.HALF_FLOAT)switch(s){case V$10.RGBA:u=de$x.RGBA16F;break;case V$10.RGB:u=de$x.RGB16F;break;case V$10.RG:u=de$x.RG16F;break;case V$10.RED:u=de$x.R16F}if(!e$2b(i)||!e$2b(n))throw new t$16("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(o$1q.typeOf.number.greaterThan("width",i,0),i>e$1T.maximumTextureSize)throw new t$16("Width must be less than or equal to the maximum texture size ("+e$1T.maximumTextureSize+"). Check maximumTextureSize.");if(o$1q.typeOf.number.greaterThan("height",n,0),n>e$1T.maximumTextureSize)throw new t$16("Height must be less than or equal to the maximum texture size ("+e$1T.maximumTextureSize+"). Check maximumTextureSize.");if(!V$10.validate(s))throw new t$16("Invalid options.pixelFormat.");if(!c&&!_$$.validate(l))throw new t$16("Invalid options.pixelDatatype.");if(s===V$10.DEPTH_COMPONENT&&l!==_$$.UNSIGNED_SHORT&&l!==_$$.UNSIGNED_INT)throw new t$16("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(s===V$10.DEPTH_STENCIL&&l!==_$$.UNSIGNED_INT_24_8)throw new t$16("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(l===_$$.FLOAT&&!t.floatingPointTexture)throw new t$16("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(l===_$$.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$16("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(V$10.isDepthFormat(s)&&!t.depthTexture)throw new t$16("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.");if(c){if(V$10.isDXTFormat(u)&&!t.s3tc)throw new t$16("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(V$10.isPVRTCFormat(u)&&!t.pvrtc)throw new t$16("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(V$10.isETC1Format(u)&&!t.etc1)throw new t$16("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.")}var h,d=e.preMultiplyAlpha||s===V$10.RGB||s===V$10.LUMINANCE,f=u$_(e.flipY,!0),p=t._gl,_=a?p.TEXTURE_3D:p.TEXTURE_2D_ARRAY,m=p.createTexture();p.activeTexture(p.TEXTURE0),p.bindTexture(_,m),p.texStorage3D(_,o,u,i,n,r),p.bindTexture(_,null),h=c?V$10.compressedTextureSizeInBytes(s,i,n,r):V$10.textureSizeInBytes(s,l,i,n,r),this._id=e$1Q(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=_,this._texture=m,this._pixelFormat=s,this._internalFormat=u,this._pixelDatatype=l,this._width=i,this._height=n,this._depth=r,this._dimensions=new o$1p(i,n,r),this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0,this.ignoreWEBGL2=!1,this._isCompressed=c,this.sampler=e$2b(e.sampler)?e.sampler:new e$1P,t.memorySize+=h}function C$k(e,t,i,n){if(!e$2a.isPowerOfTwo(i)||!e$2a.isPowerOfTwo(n))return!1;for(var r=e.length,o=i,a=n,s=0;;){if(s+=V$10.compressedTextureSizeInBytes(t,o,a),a>>=1,0==(o>>=1)&&0==a)break;o=Math.max(o,1),a=Math.max(a,1)}return s==r}function L$m(e,t,i){switch(e){case V$10.RGB_DXT1:case V$10.RGB_ETC1:return(t+3>>2)*(i+3>>2)*8;case V$10.RGBA_DXT5:return(t+3>>2)*(i+3>>2)*16;case V$10.RGB_PVRTC_4BPPV1:case V$10.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case V$10.RGB_PVRTC_2BPPV1:case V$10.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case de$x.RGB565:return t*i*2;case V$10.RGBA:return t*i*4;case V$10.LUMINANCE_ALPHA:return t*i*2;default:return 0}}function e$j(e){(e=u$_(e,u$_.EMPTY_OBJECT)).context.webgpu?this._inner=new f$l(e):this._inner=new E$l(e)}b$r.prototype.update=function(e){if(!e$2b(this._sourceData)&&!this._loading){let e=t$11.createIfNeeded(this._url);be$7.test(this._url)?e.fetchArrayBuffer().then((e=>{this._sourceData=this._rgbeLoader.parse(e)})).otherwise((e=>{this._loading=!1})):ve$6.test(this._url)&&e.fetchImage().then((e=>{this._sourceData=e})).otherwise((e=>{this._loading=!1})),this._loading=!0}if(e$2b(this._sourceData)){if(!e$2b(this._inputTexture)){let t=this._sourceData.data?{arrayBufferView:this._sourceData.data,width:this._sourceData.width,height:this._sourceData.height}:this._sourceData;this._inputTexture=new t$V({context:e.context,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,flipY:!0,source:t}),this._size=Math.min(this._sourceData.width,this._sourceData.height)}this._ready||(ge$9(e,this),this._ready=!0)}},b$r.prototype.isDestroyed=function(){return!1},b$r.prototype.destroy=function(){return this._inputTexture=this._inputTexture&&this._inputTexture.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),destroyObject(this)},t$e.drawSimplePolyline=function(e,t){var i,n=t.canvasPostions,r=u$_(t.lineWidth,1),o=u$_(t.lineColor,e$1U.WHITE),a=n.length;for(e.lineWidth=r,e.strokeStyle=o.toCssColorString(),e.beginPath(),e.moveTo(n[0].x,n[0].y),i=1;i<a;i++)e.lineTo(n[i].x,n[i].y);e.stroke()},t$e.drawPolygon=function(e,t){var i,n=t.canvasPostions,r=u$_(t.lineWidth,1),o=u$_(t.lineColor,e$1U.WHITE),a=u$_(t.fillColor,e$1U.RED),s=n.length;for(e.lineWidth=r,e.strokeStyle=o.toCssColorString(),e.fillStyle=a.toCssColorString(),e.beginPath(),e.moveTo(n[0].x,n[0].y),i=1;i<s;i++)e.lineTo(n[i].x,n[i].y);e.closePath(),e.stroke(),e.fill()},Object.defineProperties(t$e.prototype,{}),t$e.prototype.destroy=function(){return i$10(this)},Object.defineProperties(E$l.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$h.NEAREST_MIPMAP_NEAREST||t===tt$h.NEAREST_MIPMAP_LINEAR||t===tt$h.LINEAR_MIPMAP_NEAREST||t===tt$h.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;const a=this._pixelFormat;(o===_$$.FLOAT&&!r.textureFloatLinear||o===_$$.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$h.NEAREST_MIPMAP_NEAREST:tt$h.NEAREST,i=rt$i.NEAREST),r.webgl2&&V$10.isDepthFormat(a)&&(t=tt$h.NEAREST,i=rt$i.NEAREST);var s=r._gl,l=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(l,this._texture),s.texParameteri(l,s.TEXTURE_MIN_FILTER,t),s.texParameteri(l,s.TEXTURE_MAG_FILTER,i),s.texParameteri(l,s.TEXTURE_WRAP_S,e.wrapS),s.texParameteri(l,s.TEXTURE_WRAP_T,e.wrapT),e$2b(this._textureFilterAnisotropic)&&s.texParameteri(l,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),s.bindTexture(l,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),E$l.prototype.setDataBufferWithMipmap=function(e,t){var i=this._context._gl;i.activeTexture(i.TEXTURE0),i.bindTexture(this._textureTarget,this._texture);var n=this._width,r=this._height,o=L$n(t,this._internalFormat,n,r),a=0,s=0;do{var l,u=b$q(this._internalFormat,n,r);l=this._internalFormat==V$10.RGBA&&this._pixelDatatype===_$$.FLOAT?new Float32Array(t.buffer,t.byteOffset+a,u):new Uint8Array(t.buffer,t.byteOffset+a,u),this._isCompressed?i.compressedTexSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,l):i.texSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,this._pixelDatatype,l),n=Math.max(n>>1,1),r=Math.max(r>>1,1),a+=u}while(a<t.length&&o);i.bindTexture(this._textureTarget,null)},E$l.prototype.generateMipmap=function(e){if(e=u$_(e,I$1e.DONT_CARE),this._width>1&&!e$2a.isPowerOfTwo(this._width))throw new t$16("width must be a power of two to call generateMipmap().");if(this._height>1&&!e$2a.isPowerOfTwo(this._height))throw new t$16("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},E$l.prototype.isDestroyed=function(){return!1},E$l.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,i$10(this)},f$l.create=function(e){return new Texture(e)},Object.defineProperties(f$l.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$h.NEAREST_MIPMAP_NEAREST||t===tt$h.NEAREST_MIPMAP_LINEAR||t===tt$h.LINEAR_MIPMAP_NEAREST||t===tt$h.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;(o===_$$.FLOAT&&!r.textureFloatLinear||o===_$$.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$h.NEAREST_MIPMAP_NEAREST:tt$h.NEAREST,i=rt$i.NEAREST);var a=r._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.texParameteri(s,a.TEXTURE_MIN_FILTER,t),a.texParameteri(s,a.TEXTURE_MAG_FILTER,i),a.texParameteri(s,a.TEXTURE_WRAP_S,e.wrapS),a.texParameteri(s,a.TEXTURE_WRAP_T,e.wrapT),e$2b(this._textureFilterAnisotropic)&&a.texParameteri(s,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),a.bindTexture(s,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),f$l.prototype.setDataBufferWithMipmap=function(e,t){var i=this._context._gl;i.activeTexture(i.TEXTURE0),i.bindTexture(this._textureTarget,this._texture);var n=this._width,r=this._height,o=C$k(t,this._internalFormat,n,r),a=0,s=0;do{var l,u=L$m(this._internalFormat,n,r);l=this._internalFormat==V$10.RGBA&&this._pixelDatatype===_$$.FLOAT?new Float32Array(t.buffer,t.byteOffset+a,u):new Uint8Array(t.buffer,t.byteOffset+a,u),this._isCompressed?i.compressedTexSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,l):i.texSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,this._pixelDatatype,l),n=Math.max(n>>1,1),r=Math.max(r>>1,1),a+=u}while(a<t.length&&o);i.bindTexture(this._textureTarget,null)},f$l.prototype.generateMipmap=function(e){if(e=u$_(e,I$1e.DONT_CARE),this._width>1&&!e$2a.isPowerOfTwo(this._width))throw new t$16("width must be a power of two to call generateMipmap().");if(this._height>1&&!e$2a.isPowerOfTwo(this._height))throw new t$16("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},f$l.prototype.isDestroyed=function(){return!1},f$l.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,i$10(this)},e$j.create=function(e){return new Texture(e)},Object.defineProperties(e$j.prototype,{id:{set:function(e){this._inner.id=e},get:function(){return this._inner.id}},sampler:{get:function(){return this._inner.sampler},set:function(e){this._inner.sampler=e}},pixelFormat:{get:function(){return this._inner.pixelFormat}},pixelDatatype:{get:function(){return this._inner.pixelDatatype}},dimensions:{get:function(){return this._inner.dimensions}},preMultiplyAlpha:{get:function(){return this._inner.preMultiplyAlpha}},flipY:{get:function(){return this._inner.flipY}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},_target:{get:function(){return this._inner._target}}}),e$j.prototype.setDataBufferWithMipmap=function(e,t){this._inner.setDataBufferWithMipmap(e,t)},e$j.prototype.generateMipmap=function(e){this._inner.generateMipmap(e)},e$j.prototype.isDestroyed=function(){return!1},e$j.prototype.destroy=function(){return this._inner.destroy(),i$10(this)};var _0x3d7cb4=(_0xa6f4f7=!0,function(e,t){var i=_0xa6f4f7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa6f4f7=!1,i}),_0x5c6176=_0x3d7cb4(void 0,(function(){return _0x5c6176.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c6176).search("(((.+)+)+)+$")})),_0xa6f4f7;function _0x41e390(){}function _0x391f55(e){var t={},i=e.vertexAttributes;for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n].index);return t}function _0x13fe64(e,t,i){var n=t.context,r=u$_(i,e.shaderProgram),o=r.fragmentShaderSource.clone(),a=[];o.sources=o.sources.map((function(e){e=ShaderSource.replaceMain(e,"czm_Debug_main");for(var t,i=/gl_FragData\[(\d+)\]/g;null!==(t=i.exec(e));)-1===a.indexOf(t[1])&&a.push(t[1]);return e}));var s,l=a.length,u="void main() \n{ \n czm_Debug_main(); \n";if(t.debugShowCommands){e$2b(e._debugColor)||(e._debugColor=e$1U.fromRandom());var c=e._debugColor;if(l>0)for(s=0;s<l;++s)u+=" gl_FragData["+a[s]+"].rgb *= vec3("+c.red+", "+c.green+", "+c.blue+"); \n";else u+=" gl_FragColor.rgb *= vec3("+c.red+", "+c.green+", "+c.blue+"); \n"}if(t.debugShowFrustums){var h=1&e.debugOverlappingFrustums?"1.0":"0.0",d=2&e.debugOverlappingFrustums?"1.0":"0.0",f=4&e.debugOverlappingFrustums?"1.0":"0.0";if(l>0)for(s=0;s<l;++s)u+=" gl_FragData["+a[s]+"].rgb *= vec3("+h+", "+d+", "+f+"); \n";else u+=" gl_FragColor.rgb *= vec3("+h+", "+d+", "+f+"); \n"}u+="}",o.sources.push(u);var p=_0x391f55(r);return r$13.fromCache({context:n,vertexShaderSource:r.vertexShaderSource,fragmentShaderSource:o,attributeLocations:p})}_0x5c6176(),_0x41e390.debugShowBoundingVolume=function(e,t,i,n){var r=t._frameState,o=r.context,a=e.boundingVolume;e$2b(t._debugVolume)&&t._debugVolume.destroy();var s,l=o$1p.clone(a.center);if(r.mode!==SceneMode.SCENE3D){l=p$1d.multiplyByPoint(_0x23166d,l,l);var u=r.mapProjection,c=u.unproject(l);l=u.ellipsoid.cartographicToCartesian(c)}if(e$2b(a.radius)){var h=a.radius;s=GeometryPipeline.toWireframe(EllipsoidGeometry.createGeometry(new EllipsoidGeometry({radii:new o$1p(h,h,h),vertexFormat:PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Primitive({geometryInstances:new GeometryInstance({geometry:s,modelMatrix:p$1d.fromTranslation(l),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)}}),appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1}),asynchronous:!1})}else{var d=a.halfAxes;s=GeometryPipeline.toWireframe(BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new o$1p(2,2,2),vertexFormat:PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Primitive({geometryInstances:new GeometryInstance({geometry:s,modelMatrix:p$1d.fromRotationTranslation(d,l,new p$1d),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)}}),appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1}),asynchronous:!1})}var f,p=r.commandList,_=r.commandList=[];(t._debugVolume.update(r),e=_[0],r.useLogDepth)&&(e=DerivedCommand.createLogDepthCommand(e,o).command);e$2b(n)&&(f=i.framebuffer,i.framebuffer=n),e.execute(o,i),e$2b(f)&&(i.framebuffer=f),r.commandList=p},_0x41e390.executeDebugCommand=function(e,t,i){var n=i$_.shallowClone(e);n.shaderProgram=_0x13fe64(e,t),n.execute(t.context,i),n.shaderProgram.destroy()};var _0x23166d=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);_0x23166d=p$1d.inverseTransformation(_0x23166d,_0x23166d),_0x41e390.prototype.isDestroyed=function(){return!1},_0x41e390.prototype.destroy=function(){};var _0x455703=(_0x141da9=!0,function(e,t){var i=_0x141da9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x141da9=!1,i}),_0x244d60=_0x455703(void 0,(function(){return _0x244d60.toString().search("(((.+)+)+)+$").toString().constructor(_0x244d60).search("(((.+)+)+)+$")})),_0x141da9;function _0x3cc8e0(){this.lightCount=new Uint16Array(_0x1d9df9.MAX_FORWARD_PLUS_LIGHTS),this.objCount=new Uint16Array(2)}_0x244d60(),Object.defineProperties(_0x3cc8e0.prototype,{width:{get:function(){return this._width}},height:{get:function(){return this._height}},zEnd:{get:function(){return this._zEnd}}}),_0x3cc8e0.prototype.reset=function(){for(var e=0,t=this.lightCount.length;e<t;e++)this.lightCount[e]=0;for(e=0,t=this.objCount.length;e<t;e++)this.objCount[e]=0};var _0x1a36d1=(_0x472869=!0,function(e,t){var i=_0x472869?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x472869=!1,i}),_0x34867b=_0x1a36d1(void 0,(function(){return _0x34867b.toString().search("(((.+)+)+)+$").toString().constructor(_0x34867b).search("(((.+)+)+)+$")})),_0x472869;_0x34867b();const _0x105495=4;function _0x4681ea(){this.globalLightBatchTable=null,this.gridBatchTable=null}function _0x40e0e7(){this.camera=null,this.lastPos=new o$1p,this.lastRot=new o$1p,this.reflection=!1,this.aspectRatio=1,this.visibilityMask=null,this.shadowNode=null,this.lastFrame=0,this.currentBufIdx=-1,this.gridBuffers=null}function _0x25bdb2(e,t,i){this.width=u$_(e,0),this.height=u$_(t,0),this.zEnd=u$_(i,0)}function _0x205de2(e,t,i,n,r,o,a){this._scene=a,this._cachedGrid=[],this._currentLightList=[],this._forwardPlusNumFloat4PerLight=_0x105495,this._globalLightBatchTableStep=new e$29,this._globalLightBatchTableDimensions=new o$1o,this._lastTotalLightCount=-1,this._scene=a,this._width=e,this._height=t,this._numSlices=i,this._lightsPerCell=n+3,this._minDistance=r,this._maxDistance=o,this._tableSize=this._width*this._height*this._lightsPerCell,this._invMaxDistance=1/this._maxDistance;var s=e,l=t;this._resolutionAtSlice=[];for(var u=0;u<i;++u)this._resolutionAtSlice.push(new _0x25bdb2(s,l,this.getDepthAtSlice(u+1))),s*=2,l*=2;this._resolutionAtSlice[i-1].zEnd=99999999999999;var c=-(1-(1<<(i<<1)))/3*e*t;this._lightCountInCell=[];for(u=0;u<c;u++)this._lightCountInCell.push(new _0x3cc8e0);this.initLightGridBatchTable()}Object.defineProperties(_0x205de2.prototype,{});var _0x480071=new o$1o;_0x205de2.prototype.getGlobalLightTableSize=function(e){var t=Math.floor(1024/_0x105495),i=e,n=Math.min(i,t),r=_0x105495*n,o=Math.ceil(i/n);return o=e$2a.nextPowerOfTwo(o),_0x480071.x=r,_0x480071.y=o,_0x480071},_0x205de2.prototype.initGlobalLightTable=function(e){var t=1/e.x,i=.5*t,n=1/e.y,r=.5*n;this._globalLightBatchTableDimensions=new o$1o(e.x,e.y),this._globalLightBatchTableStep=new e$29(t,i,n,r)};var _0x8a6b6b=new p$1e;function _0x136a83(e,t){return e.lightType!=t.lightType?e.lightType<t.lightType:e.distanceToCamera<t.distanceToCamera}_0x205de2.prototype.fillGlobalLightListBuffer=function(e,t,i){if(this._currentLightList.length){var n=e.viewMatrix;p$1d.getRotation(n,_0x8a6b6b);for(var r=0,o=0,a=this._currentLightList.length;o<a;o++){var s=this._currentLightList[o];s.lightType==_0x1d9df9.POINT?(i[r++]=s.positionEC.x,i[r++]=s.positionEC.y,i[r++]=s.positionEC.z,i[r++]=s.lightType,i[r++]=s.lightColor.red,i[r++]=s.lightColor.green,i[r++]=s.lightColor.blue,i[r++]=0,i[r++]=s.cutoffDistance,i[r++]=s.decay,i[r++]=0,i[r++]=0,r+=4):s.lightType==_0x1d9df9.SPOT&&(i[r++]=s.positionEC.x,i[r++]=s.positionEC.y,i[r++]=s.positionEC.z,i[r++]=s.lightType,i[r++]=s.directionEC.x,i[r++]=s.directionEC.y,i[r++]=s.directionEC.z,i[r++]=0,i[r++]=s.lightColor.red,i[r++]=s.lightColor.green,i[r++]=s.lightColor.blue,i[r++]=s.exponent,i[r++]=s.distance,i[r++]=s.decay,i[r++]=s.angleCos,i[r++]=s.penumbraCos)}t.copyFrom({width:this._globalLightBatchTableDimensions.x,height:this._globalLightBatchTableDimensions.y,arrayBufferView:i},0,0)}},_0x205de2.prototype.getCachedGridFor=function(e){for(var t=this._scene._frameState.frameNumber,i=0;i<this._cachedGrid.length;i++){var n=this._cachedGrid[i];if(n.camera==e&&n.reflection==e.bReflect&&Math.abs(n.aspectRatio-e.frustum.aspectRatio)<e$2a.EPSILON7){var r=n.lastFrame==t;return n.lastFrame=t,r?(!o$1p.equals(n.lastPos,e.position)||!o$1p.equals(n.lastRot,e.direction))&&(n.currentBufIdx++,n.currentBufIdx>=n.gridBuffers.length&&n.gridBuffers.push(new _0x4681ea),r=!1):n.currentBufIdx=0,o$1p.clone(e.position,n.lastPos),o$1p.clone(e.direction,n.lastRot),{upToDate:r,cacheGrid:n}}}var o=new _0x40e0e7;return o.camera=e,o$1p.clone(e.position,o.lastPos),o$1p.clone(e.direction,o.lastRot),o.reflection=e.bReflect,o.aspectRatio=e.frustum.aspectRatio,o.lastFrame=t,o.currentBufIdx=0,o.gridBuffers=[new _0x4681ea],this._cachedGrid.push(o),{upToDate:!1,cacheGrid:o}},_0x205de2.prototype.deleteOldGridBuffers=function(){for(var e=this._scene._frameState.frameNumber,t=this._cachedGrid.length,i=0;i<t;){var n=this._cachedGrid[i];if(n.lastFrame+3<e){for(var r=0;r<n.gridBuffers.length;r++){var o=n.gridBuffers[r];o.gridBatchTable&&(o.gridBatchTable.destroy(),o.gridBatchTable=null),o.globalLightBatchTable&&(o.globalLightBatchTable.destroy(),o.globalLightBatchTable=null)}var a=this._cachedGrid[this._cachedGrid.length-1];this._cachedGrid[i]=a,this._cachedGrid.pop(),i++,t=this._cachedGrid.length}else i++}},_0x205de2.prototype.initParamterForLightUBO=function(e){e.addUniform("uLightGridTextureStep",4),e.addUniform("uLightGridTextureDimension",2),e.addUniform("uGlobalLightTextureStep",4),e.addUniform("uGlobalLightTextureDimension",2),e.addUniform("uLightMinDistance",1),e.addUniform("uLightInvMaxDistance",1),e.addUniform("uLightGridNumSilces",1),e.addUniform("uLightGridTableSize",1),e.addUniform("uF3dViewportOffset",4),e.addUniform("uF3dGridHWW",4,this._numSlices)},_0x205de2.prototype.fillLightUBO=function(e){var t=this._lightGridBatchTableStep,i=this._lightGridBatchTableDimensions;e.updateFloat4("uLightGridTextureStep",t.x,t.y,t.z,t.w),e.updateFloat2("uLightGridTextureDimension",i.x,i.y),t=this._globalLightBatchTableStep,i=this._globalLightBatchTableDimensions,e.updateFloat4("uGlobalLightTextureStep",t.x,t.y,t.z,t.w),e.updateFloat2("uGlobalLightTextureDimension",i.x,i.y),e.updateFloat("uLightMinDistance",this._minDistance),e.updateFloat("uLightInvMaxDistance",this._invMaxDistance),e.updateFloat("uLightGridNumSilces",this._numSlices-1),e.updateFloat("uLightGridTableSize",this._tableSize);var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;e.updateFloat4("uF3dViewportOffset",0,0,0,0);for(var o=new Float32Array(4*this._numSlices),a=0,s=0;s<this._numSlices;++s)o[a++]=this._resolutionAtSlice[s].width/n,o[a++]=this._resolutionAtSlice[s].height/r,o[a++]=this._resolutionAtSlice[s].width*this._lightsPerCell,o[a++]=s<1?this._lightsPerCell:r;e.updateFloatArray("uF3dGridHWW",o)},_0x205de2.prototype.createLightUniformMap=function(e){var t=this;(e={}).uLightGridTextureStep=function(){return t._lightGridBatchTableStep},e.uLightGridTextureDimension=function(){return t._lightGridBatchTableDimensions},e.uGlobalLightTextureStep=function(){return t._globalLightBatchTableStep},e.uGlobalLightTextureDimension=function(){return t._globalLightBatchTableDimensions},e.uLightMinDistance=function(){return t._minDistance},e.uLightInvMaxDistance=function(){return t._invMaxDistance},e.uLightGridNumSilces=function(){return t._numSlices-1},e.uLightGridTableSize=function(){return t._tableSize};for(var i=this._scene._context.drawingBufferWidth,n=this._scene._context.drawingBufferHeight,r=[],o=0;o<this._numSlices;++o){var a=new e$29;a.x=this._resolutionAtSlice[o].width/i,a.y=this._resolutionAtSlice[o].height/n,a.z=this._resolutionAtSlice[o].width*this._lightsPerCell,a.w=o<1?this._lightsPerCell:n,r.push(a)}return e.uF3dGridHWW=function(){return r},e.uLightGridTexture=function(){return e$2b(t._ubo.lightGridTexture)?t._ubo.lightGridTexture:t._scene._context.defaultTexture},e.uGlobalLightListTexture=function(){return e$2b(t._ubo.globalLightListTexture)?t._ubo.globalLightListTexture:t._scene._context.defaultTexture},e},_0x205de2.prototype.initLightGridBatchTable=function(){var e=Math.floor(1024/this._lightsPerCell),t=-(1-(1<<(this._numSlices<<1)))/3*this._width*this._height,i=Math.min(t,e),n=this._lightsPerCell*i,r=Math.ceil(t/i),o=1/n,a=.5*o,s=1/(r=e$2a.nextPowerOfTwo(r)),l=.5*s;this._lightGridBatchTableDimensions=new o$1o(n,r),this._lightGridBatchTableStep=new e$29(o,a,s,l)},_0x205de2.prototype.getDepthAtSlice=function(e){return-(e/(this._numSlices-1)*this._maxDistance-this._minDistance)},_0x205de2.prototype.getSliceAtDepth=function(e){var t=e$2a.clamp((-e+this._minDistance)*this._invMaxDistance,0,1);return Math.floor(t*(this._numSlices-1))},_0x205de2.prototype.projectionSpaceToGridSpace=function(e,t){var i=this._resolutionAtSlice[t],n=e$2a.clamp(e.x,0,1)*i.width,r=e$2a.clamp(e.y,0,1)*i.height;return{outX:Math.min(Math.floor(n),i.width-1),outY:Math.min(Math.floor(r),i.height-1)}};var _0x17cda4=new e$29,_0x37b81e=new Float32Array(256),_0x332b1d,_0x286f70,_0x13c530=[new o$1p,new o$1p],_0xf70ded=[new o$1p,new o$1p],_0x2e2d10=new o$1p,_0x1f624b=new o$1p,_0x486655=new o$1o,_0x38a894=new o$1o,_0x96cda3=[new e$29,new e$29],_0x160f55=[new e$29,new e$29],_0x18fae7=new p$1d,_0x2b626f=new e$26;_0x205de2.prototype.collectLights=function(){var e=this._scene,t=e._frameState.passes,i=this._scene.context;if(this._ubo.textureDirty=!1,!t.pick&&!t.depth){var n,r=e.camera,o=this.getCachedGridFor(r);if(!o.upToDate){n=o.cacheGrid;var a=e._frameState.lightSource,s=a.pointLight.length+a.spotLight.length;if(0==s&&s==this._lastTotalLightCount)return;this._lastTotalLightCount=s,this._currentLightList=[];for(var l=a._visibleLightList[_0x1d9df9.POINT].values,u=a._visibleLightList[_0x1d9df9.SPOT].values,c=0;c<l.length;c++)this._currentLightList.push(l[c]);for(c=0;c<u.length;c++)this._currentLightList.push(u[c]);var h=this._currentLightList.length;m$H(this._currentLightList,_0x136a83);var d=n.gridBuffers[n.currentBufIdx];if(!d.gridBatchTable){var f=-(1-(1<<(this._numSlices<<1)))/3;_0x286f70=new Float32Array(this._lightGridBatchTableDimensions.x*this._lightGridBatchTableDimensions.y),d.gridBatchTable=new t$V({context:i,pixelFormat:i.webgpu?V$10.RED:V$10.LUMINANCE,pixelDatatype:_$$.FLOAT,width:this._lightGridBatchTableDimensions.x,height:this._lightGridBatchTableDimensions.y,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),flipY:!1}),this._ubo.lightGridTexture=d.gridBatchTable}var p=Math.max(h,this._lightsPerCell-3),_=this.getGlobalLightTableSize(p);(!d.globalLightBatchTable||d.globalLightBatchTable.height<_.y)&&(d.globalLightBatchTable&&(d.globalLightBatchTable.destroy(),d.globalLightBatchTable=null),this.initGlobalLightTable(_),_0x332b1d=new Float32Array(this._globalLightBatchTableDimensions.x*this._globalLightBatchTableDimensions.y*4),d.globalLightBatchTable=new t$V({context:i,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT,width:this._globalLightBatchTableDimensions.x,height:this._globalLightBatchTableDimensions.y,sampler:new e$1P({minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),flipY:!1}),this._ubo.globalLightListTexture=d.globalLightBatchTable),this.fillGlobalLightListBuffer(r,d.globalLightBatchTable,_0x332b1d),this._lightCountInCell.map((function(e){e.reset()}));var m=r.viewMatrix,g=r.frustum.projectionMatrix,x=r.frustum.near,v=r.frustum.far;0==v&&(v=99999999999999);for(c=0;c<this._numSlices-1;++c)_0x17cda4.x=0,_0x17cda4.y=0,_0x17cda4.z=e$2a.clamp(this._resolutionAtSlice[c].zEnd,-v,-x),_0x17cda4.w=1,p$1d.multiplyByVector(g,_0x17cda4,_0x17cda4),_0x37b81e[c]=_0x17cda4.z/_0x17cda4.w;_0x37b81e[this._numSlices-1]=1;for(c=0;c<h;++c){var y=this._currentLightList[c],$=p$1d.IDENTITY;p$1d.multiply(m,$,_0x18fae7),e$26.transform(y.aabb,_0x18fae7,_0x2b626f);var b=_0x2b626f.minimum,T=_0x2b626f.maximum,C=b.z;b.z=T.z,T.z=C,b.z=e$2a.clamp(b.z,-v,-x),T.z=e$2a.clamp(T.z,-v,-x),_0x96cda3[0].x=b.x,_0x96cda3[0].y=b.y,_0x96cda3[0].z=b.z,_0x96cda3[0].w=1,_0x96cda3[1].x=b.x,_0x96cda3[1].y=b.y,_0x96cda3[1].z=b.z,_0x96cda3[1].w=1,_0x160f55[0].x=T.x,_0x160f55[0].y=T.y,_0x160f55[0].z=T.z,_0x160f55[0].w=1,_0x160f55[1].x=T.x,_0x160f55[1].y=T.y,_0x160f55[1].z=T.z,_0x160f55[1].w=1,_0x160f55[0].z=b.z,_0x96cda3[1].z=T.z;for(var S=0;S<2;++S){p$1d.multiplyByVector(g,_0x96cda3[S],_0x96cda3[S]),p$1d.multiplyByVector(g,_0x160f55[S],_0x160f55[S]);var w=1/_0x96cda3[S].w,E=1/_0x160f55[S].w;_0x13c530[S].x=_0x96cda3[S].x*w*.5+.5,_0x13c530[S].y=_0x96cda3[S].y*w*.5+.5,_0x13c530[S].z=_0x96cda3[S].z*w,_0xf70ded[S].x=_0x160f55[S].x*E*.5+.5,_0xf70ded[S].y=_0x160f55[S].y*E*.5+.5,_0xf70ded[S].z=_0x160f55[S].z*E}var P=_0x13c530[0].z,A=_0x13c530[1].z,L=this.getSliceAtDepth(b.z),M=this.getSliceAtDepth(T.z),R=1/(A-P),O=[],I=[];O.push(_0x13c530[0]),I.push(_0xf70ded[0]);for(var D=(f=-(1-(1<<(L<<1)))/3)*this._tableSize,B=f*this._width*this._height,N=y.lightType,F=L;F<=M;++F){var U=(Math.min(A,_0x37b81e[F])-P)*R;o$1p.lerp(_0x13c530[0],_0x13c530[1],U,_0x2e2d10),o$1p.lerp(_0xf70ded[0],_0xf70ded[1],U,_0x1f624b),O.push(_0x2e2d10),I.push(_0x1f624b),_0x486655.x=Math.min(O[0].x,O[1].x),_0x486655.y=Math.min(O[0].y,O[1].y),_0x38a894.x=Math.max(I[0].x,I[1].x),_0x38a894.y=Math.max(I[0].y,I[1].y);var G,z,V,k,W=this.projectionSpaceToGridSpace(_0x486655,F);G=W.outX,z=W.outY,V=(W=this.projectionSpaceToGridSpace(_0x38a894,F)).outX,k=W.outY;for(var H=this._resolutionAtSlice[F],q=z;q<=k;++q)for(var j=G;j<=V;++j){var Y=this._lightCountInCell[B+q*H.width+j];if(Y.lightCount[0]<this._lightsPerCell-3){var X=D+(q*H.width+j)*this._lightsPerCell+(Y.lightCount[0]+3);_0x286f70[X]=c*this._forwardPlusNumFloat4PerLight,++Y.lightCount[0],++Y.lightCount[N]}}o$1p.clone(O[1],O[0]),o$1p.clone(I[1],I[0]),D+=H.width*H.height*this._lightsPerCell,B+=H.width*H.height}}var K=this._lightsPerCell,Q=0;for(c=0;c<this._lightCountInCell.length;c++){var Z=this._lightCountInCell[c],J=Z.lightCount[_0x1d9df9.POINT];_0x286f70[Q+0]=J,J+=Z.lightCount[_0x1d9df9.SPOT],_0x286f70[Q+1]=J,Q+=K}d.gridBatchTable.copyFrom({width:this._lightGridBatchTableDimensions.x,height:this._lightGridBatchTableDimensions.y,arrayBufferView:_0x286f70},0,0),this.deleteOldGridBuffers()}}},_0x205de2.prototype.isDestroyed=function(){return!1},_0x205de2.prototype.destroy=function(){return i$10(this)};var _0x4d1430=(_0x164615=!0,function(e,t){var i=_0x164615?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x164615=!1,i}),_0x7b172a=_0x4d1430(void 0,(function(){return _0x7b172a.toString().search("(((.+)+)+)+$").toString().constructor(_0x7b172a).search("(((.+)+)+)+$")})),_0x164615;function _0x4e6a4d(e){this._context=e,this._enabled=!1;var t=e.colorBufferFloat&&e.depthTexture;this._support=e.drawBuffers&&t,this._fbo=void 0,this._positionTexture=void 0,this._normalTexture=void 0,this._reflectivityTexture=void 0,this._depthStencilTexture=void 0,this._mrtClearCommand=new t$X({color:new e$1U(0,0,0,0),owner:this})}function _0x172f18(e){e._positionTexture=e._positionTexture&&!e._positionTexture.isDestroyed()&&e._positionTexture.destroy(),e._normalTexture=e._normalTexture&&!e._normalTexture.isDestroyed()&&e._normalTexture.destroy(),e._reflectivityTexture=e._reflectivityTexture&&!e._reflectivityTexture.isDestroyed()&&e._reflectivityTexture.destroy()}_0x7b172a(),Object.defineProperties(_0x4e6a4d.prototype,{enable:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(e||this._releaseResource()),this._enable=e}},support:{get:function(){return this._support}},positionTexture:{get:function(){return this._positionTexture}},normalTexture:{get:function(){return this._normalTexture}},reflectivityTexture:{get:function(){return this._reflectivityTexture}},framebuffer:{get:function(){return this._fbo}}}),_0x4e6a4d.prototype.update=function(e){this._depthStencilTexture=e.depthStencilTexture;var t=this._depthStencilTexture.width,i=this._depthStencilTexture.height,n=this._positionTexture;(!e$2b(n)||n.width!==t||n.height!==i)&&(this._releaseResource(),this._createResource(t,i))},_0x4e6a4d.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._fbo,this._mrtClearCommand.execute(e,t),t.framebuffer=n},_0x4e6a4d.prototype._createResource=function(e,t){var i=this._context;this._positionTexture=new t$V({context:i,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,width:e,height:t,flipY:!1}),this._normalTexture=new t$V({context:i,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,width:e,height:t,flipY:!1}),this._reflectivityTexture=new t$V({context:i,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,width:e,height:t,flipY:!1}),this._fbo=new t$W({context:i,colorTextures:[this._positionTexture,this._normalTexture,this._reflectivityTexture],depthStencilTexture:this._depthStencilTexture,destroyAttachments:!1})},_0x4e6a4d.prototype.getPrepassShaderProgram=function(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"PREPASS");if(!e$2b(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();o.defines=e$2b(o.defines)?o.defines.slice(0):[],o.defines.push("PREPASS"),i=e.shaderCache.createDerivedShaderProgram(t,"PREPASS",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i},_0x4e6a4d.prototype._releaseResource=function(){this._fbo=this._fbo&&!this._fbo.isDestroyed()&&this._fbo.destroy(),_0x172f18(this)},_0x4e6a4d.prototype.destroy=function(){this._releaseResource()};var j$i="uniform sampler2D colorTexture;\nuniform sampler2D colorTexture2;\nuniform vec2 center;\nuniform float radius;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color0 = texture2D(colorTexture, v_textureCoordinates);\nvec4 color1 = texture2D(colorTexture2, v_textureCoordinates);\nfloat x = length(gl_FragCoord.xy - center) / radius;\nfloat t = smoothstep(0.5, 0.8, x);\ngl_FragColor = mix(color0 + color1, color1, t);\n}\n",E$k="uniform sampler2D colorTexture;\nuniform float avgLuminance;\nuniform float threshold;\nuniform float offset;\nvarying vec2 v_textureCoordinates;\nfloat key(float avg)\n{\nfloat guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));\nreturn max(0.0, guess) + 0.1;\n}\nvoid main()\n{\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\nvec3 xyz = czm_RGBToXYZ(color.rgb);\nfloat luminance = xyz.r;\nfloat scaledLum = key(avgLuminance) * luminance / avgLuminance;\nfloat brightLum = max(scaledLum - threshold, 0.0);\nfloat brightness = brightLum / (offset + brightLum);\nxyz.r = brightness;\ngl_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);\n}\n",ie$6="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(colorTexture, v_textureCoordinates);\n}\n",e$i={NEAREST:0,LINEAR:1};function p$h(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).fragmentShader,i=u$_(e.textureScale,1),n=u$_(e.pixelFormat,V$10.RGBA),r=e.prepassRenderer;if(o$1q.typeOf.string("options.fragmentShader",t),o$1q.typeOf.number.greaterThan("options.textureScale",i,0),o$1q.typeOf.number.lessThanOrEquals("options.textureScale",i,1),!V$10.isColorFormat(n))throw new t$16("options.pixelFormat must be a color format.");this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=i,this._forcePowerOfTwo=u$_(e.forcePowerOfTwo,!1),this._sampleMode=u$_(e.sampleMode,e$i.NEAREST),this._blendingState=e.blendingState,this._pixelFormat=n,this._pixelDatatype=u$_(e.pixelDatatype,_$$.UNSIGNED_BYTE),this._clearColor=u$_(e.clearColor,e$1U.BLACK),this._useWGSL=u$_(e.useWGSL,!1),this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._prepassRenderer=r,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0;var o=new n$Z;o.scissorTest={enabled:!0,rectangle:e$2b(e.scissorRectangle)?f$18.clone(e.scissorRectangle):new f$18},this._passState=o,this._ready=!1;var a=e.name;e$2b(a)||(a=e$1Q()),this._name=a,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(p$h.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(e$2b(this._textureCache)){var e=this._textureCache.getFramebuffer(this._name);if(e$2b(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var z$k=/uniform\s+sampler2D\s+depthTexture/g;function H$r(e,t,i){var n=t[i];return("string"==typeof n||n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof HTMLVideoElement||n instanceof ImageData)&&e._dirtyUniforms.push(i),{get:function(){return t[i]},set:function(n){var r=t[i];t[i]=n;var o=e._actualUniforms,a=o[i];e$2b(a)&&a!==r&&a instanceof t$V&&!e$2b(e._textureCache.getStageByName(i))&&(e._texturesToRelease.push(a),delete o[i],delete o[i+"Dimensions"]),r instanceof t$V&&e._texturesToRelease.push(r),"string"==typeof n||n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof HTMLVideoElement||n instanceof ImageData?e._dirtyUniforms.push(i):o[i]=n}}}function V$f(e,t){return function(){var i=e._actualUniforms[t];return"function"==typeof i?i():i}}function W$l(e,t){return function(){var i=e[t]();if(e$2b(i))return i.dimensions}}function k$g(e){if(!e$2b(e._uniformMap)){var t={},i={},n=e._uniforms,r=e._actualUniforms;for(var o in n)if(n.hasOwnProperty(o)){"function"!=typeof n[o]?(t[o]=V$f(e,o),i[o]=H$r(e,n,o)):(t[o]=n[o],i[o]=n[o]),r[o]=n[o];var a=t[o]();("string"==typeof a||a instanceof t$V||a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement)&&(t[o+"Dimensions"]=W$l(t,o))}e._uniforms={},Object.defineProperties(e._uniforms,i),e._uniformMap=p$19(t,{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions},depthTexture:function(){return e._depthTexture},depthTextureDimensions:function(){return e._depthTexture.dimensions},czm_idTexture:function(){return e._idTexture},czm_selectedIdTexture:function(){return e._selectedIdTexture},czm_selectedIdTextureStep:function(){return 1/e._selectedIdTexture.width},reflectivitySampler:function(){return e._prepassRenderer.reflectivityTexture},normalSampler:function(){return e._prepassRenderer.normalTexture},positionSampler:function(){return e._prepassRenderer.positionTexture}})}}function Y$b(e,t){if(!e$2b(e._command)||e._logDepthChanged||e._selectedDirty){var i=e._fragmentShader;if(e$2b(e._selectedIdTexture))i="#define CZM_SELECTED_FEATURE \nuniform sampler2D czm_idTexture; \nuniform sampler2D czm_selectedIdTexture; \nuniform float czm_selectedIdTextureStep; \nvarying vec2 v_textureCoordinates; \nbool czm_selected(vec2 offset) \n{ \n bool selected = false;\n vec4 id = texture2D(czm_idTexture, v_textureCoordinates + offset); \n for (int i = 0; i < "+e._selectedIdTexture.width+"; ++i) \n { \n vec4 selectedId = texture2D(czm_selectedIdTexture, vec2(float(i) * czm_selectedIdTextureStep, 0.5)); \n if (all(equal(id, selectedId))) \n { \n return true; \n } \n } \n return false; \n} \n\nbool czm_selected() \n{ \n return czm_selected(vec2(0.0)); \n} \n\n"+(i=i.replace(/varying\s+vec2\s+v_textureCoordinates;/g,""));var n=new s$U({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[i],useWGSL:e._useWGSL});e._command=t.createViewportQuadCommand(n,{uniformMap:e._uniformMap,owner:e,shaderProgramName:e._name,useWGSL:e._useWGSL})}}function q$g(e){var t,i;e._sampleMode===e$i.LINEAR?(t=tt$h.LINEAR,i=rt$i.LINEAR):(t=tt$h.NEAREST,i=rt$i.NEAREST);var n=e._sampler;(!e$2b(n)||n.minificationFilter!==t||n.magnificationFilter!==i)&&(e._sampler=new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:t,magnificationFilter:i}))}function j$h(e,t){return function(i){e._texturesToCreate.push({name:t,source:i})}}function J$a(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function K$c(e,t){var i,n,r,o=e._texturesToRelease,a=o.length;for(i=0;i<a;++i)n=(n=o[i])&&n.destroy();o.length=0;var s=e._texturesToCreate;for(a=s.length,i=0;i<a;++i){var l=s[i];r=l.name;var u=l.source;e._actualUniforms[r]=new t$V({context:t,source:u})}s.length=0;var c=e._dirtyUniforms;if(0!==c.length||e$2b(e._texturePromise)){if(0!==c.length&&!e$2b(e._texturePromise)){a=c.length;var h=e._uniforms,d=[];for(i=0;i<a;++i){var f=h[r=c[i]];if(e$2b(e._textureCache.getStageByName(f)))e._actualUniforms[r]=J$a(e,f);else if("string"==typeof f){var p=new t$11({url:f});d.push(p.fetchImage().then(j$h(e,r)))}else e._texturesToCreate.push({name:r,source:f})}c.length=0,d.length>0?(e._ready=!1,e._texturePromise=o$1l.all(d).then((function(){e._ready=!0,e._texturePromise=void 0}))):e._ready=!0}}else e._ready=!0}function I$m(e){e$2b(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();var t=e._textureCache;if(e$2b(t)){var i=e._uniforms,n=e._actualUniforms;for(var r in n)n.hasOwnProperty(r)&&n[r]instanceof t$V&&(e$2b(t.getStageByName(i[r]))||n[r].destroy(),e._dirtyUniforms.push(r))}}function Q$e(e){var t=e$2b(e._selected)?e._selected.length:0,i=e$2b(e._parentSelected)?e._parentSelected:0,n=e._selected!==e._selectedShadow||t!==e._selectedLength;if(n=n||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength,e$2b(e._selected)&&e$2b(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):e$2b(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!n&&e$2b(e._combinedSelected)){if(!e$2b(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var r=0;r<t;++r)if(e._combinedSelected[r]!==e._combinedSelectedShadow[r])return!0}return n}function Z$h(e,t){if(e._selectedDirty){e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;var i=e._combinedSelected;if(e$2b(i)){var n,r,o=0,a=i.length;for(n=0;n<a;++n)e$2b((r=i[n]).pickIds)?o+=r.pickIds.length:e$2b(r.pickId)&&++o;if(0===a||0===o){var s=new Uint8Array(4);return s[0]=255,s[1]=255,s[2]=255,s[3]=255,void(e._selectedIdTexture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,source:{arrayBufferView:s,width:1,height:1},sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}))}var l,u=0,c=new Uint8Array(4*o);for(n=0;n<a;++n)if(e$2b((r=i[n]).pickIds))for(var h=r.pickIds,d=h.length,f=0;f<d;++f)l=h[f].color,c[u]=e$1U.floatToByte(l.red),c[u+1]=e$1U.floatToByte(l.green),c[u+2]=e$1U.floatToByte(l.blue),c[u+3]=e$1U.floatToByte(l.alpha),u+=4;else e$2b(r.pickId)&&(l=r.pickId.color,c[u]=e$1U.floatToByte(l.red),c[u+1]=e$1U.floatToByte(l.green),c[u+2]=e$1U.floatToByte(l.blue),c[u+3]=e$1U.floatToByte(l.alpha),u+=4);e._selectedIdTexture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,source:{arrayBufferView:c,width:o,height:1},sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})}}}function s$f(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.defined("options.stages",e.stages),o$1q.typeOf.number.greaterThan("options.stages.length",e.stages.length,0),this._stages=e.stages,this._inputPreviousStageTexture=u$_(e.inputPreviousStageTexture,!0);var t=e.name;e$2b(t)||(t=e$1Q()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}function u$j(e){var t=e$2b(e._selected)?e._selected.length:0,i=e$2b(e._parentSelected)?e._parentSelected:0,n=e._selected!==e._selectedShadow||t!==e._selectedLength;if(n=n||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength,e$2b(e._selected)&&e$2b(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):e$2b(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!n&&e$2b(e._combinedSelected)){if(!e$2b(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var r=0;r<t;++r)if(e._combinedSelected[r]!==e._combinedSelectedShadow[r])return!0}return n}function g$q(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function m$k(e){for(;e$2b(e.length);)e=e.get(e.length-1);return e.name}function w$j(e,t,i,n,r){if(!n.enabled||!n._isSupported(t))return r;var o=i[n.name]={};e$2b(r)&&(o[m$k(e.getStageByName(r))]=!0);var a=n.uniforms;if(e$2b(a))for(var s=Object.getOwnPropertyNames(a),l=s.length,u=0;u<l;++u){var c=a[s[u]];if("string"==typeof c){var h=e.getStageByName(c);e$2b(h)&&(o[m$k(h)]=!0)}}return n.name}function v$k(e,t,i,n,r){if(e$2b(n.enabled)&&!n.enabled||e$2b(n._isSupported)&&!n._isSupported(t))return r;for(var o=r,a=!e$2b(n.inputPreviousStageTexture)||n.inputPreviousStageTexture,s=r,l=n.length,u=0;u<l;++u){var c=n.get(u);s=e$2b(c.length)?v$k(e,t,i,c,r):w$j(e,t,i,c,r),a&&(r=s)}var h,d;if(a)for(h=1;h<l;++h)e$2b(i[d=m$k(n.get(h))])||(i[d]={}),i[d][o]=!0;else for(h=1;h<l;++h)for(var f=i[d=m$k(n.get(h))],p=0;p<h;++p)f[m$k(n.get(p))]=!0;return s}function B$g(e,t){var i={};if(e$2b(e.ambientOcclusion)){var n=e._outline,r=e.ambientOcclusion,o=e.bloom,a=e._tonemapping,s=e.fxaa,l=e.fog,u=e.rain,c=e.snow,h=e.screenSpaceReflection,d=v$k(e,t,i,n,void 0);d=w$j(e,t,i,l,d),d=w$j(e,t,i,c,d),d=v$k(e,t,i,r,d=w$j(e,t,i,u,d)),d=v$k(e,t,i,o,d),d=v$k(e,t,i,e,d=w$j(e,t,i,a,d)),w$j(e,t,i,s,d=v$k(e,t,i,h,d))}else v$k(e,t,i,e,void 0);return i}function E$j(e,t,i){var n,r,o=e._collection.getStageByName(t),a=o._textureScale,s=o._forcePowerOfTwo,l=o._pixelFormat,u=o._pixelDatatype,c=o._clearColor,h=e._framebuffers,d=h.length;for(n=0;n<d;++n)if(a===(r=h[n]).textureScale&&s===r.forcePowerOfTwo&&l===r.pixelFormat&&u===r.pixelDatatype&&e$1U.equals(c,r.clearColor)){for(var f=r.stages,p=f.length,_=!1,m=0;m<p;++m)if(i[f[m]]){_=!0;break}if(!_)break}return e$2b(r)&&n<d?(r.stages.push(t),r):(r={textureScale:a,forcePowerOfTwo:s,pixelFormat:l,pixelDatatype:u,clearColor:c,stages:[t],buffer:void 0,clear:void 0},h.push(r),r)}function M$l(e,t){var i=B$g(e._collection,t);for(var n in i)i.hasOwnProperty(n)&&(e._stageNameToFramebuffer[n]=E$j(e,n,i[n]))}function y$l(e){for(var t=e._framebuffers,i=t.length,n=0;n<i;++n){var r=t[n];r.buffer=r.buffer&&r.buffer.destroy(),r.buffer=void 0}}function R$j(e,t){for(var i=e._width,n=e._height,r=e._framebuffers,o=r.length,a=0;a<o;++a){var s=r[a],l=s.textureScale,u=Math.ceil(i*l),c=Math.ceil(n*l),h=Math.min(u,c);s.forcePowerOfTwo&&(e$2a.isPowerOfTwo(h)||(h=e$2a.nextPowerOfTwo(h)),u=h,c=h),s.buffer=new t$W({context:t,colorTextures:[new t$V({context:t,width:u,height:c,pixelFormat:s.pixelFormat,pixelDatatype:s.pixelDatatype})]}),s.clear=new t$X({color:s.clearColor,framebuffer:s.buffer})}}function n$i(){this._colorTexture=void 0,this._idTexture=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._framebuffer=void 0,this._idFramebuffer=void 0,this._idClearColor=new e$1U(0,0,0,0),this._useHdr=void 0,this._clearCommand=new t$X({color:new e$1U(0,0,0,0),depth:1,owner:this})}function S$h(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._idFramebuffer=e._idFramebuffer&&e._idFramebuffer.destroy(),e._colorTexture=e._colorTexture&&e._colorTexture.destroy(),e._idTexture=e._idTexture&&e._idTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&e._depthStencilRenderbuffer.destroy(),e._depthStencilIdTexture=e._depthStencilIdTexture&&e._depthStencilIdTexture.destroy(),e._depthStencilIdRenderbuffer=e._depthStencilIdRenderbuffer&&e._depthStencilIdRenderbuffer.destroy(),e._framebuffer=void 0,e._idFramebuffer=void 0,e._colorTexture=void 0,e._idTexture=void 0,e._depthStencilTexture=void 0,e._depthStencilRenderbuffer=void 0,e._depthStencilIdTexture=void 0,e._depthStencilIdRenderbuffer=void 0}function s$e(){this._sceneFramebuffer=new n$i,this._stMatrix3=p$1e.clone(p$1e.IDENTITY),this._isMultiViewport=!1;var e=.125,t=new Array(6);t[0]=new p$h({name:"SunPostProcessStage0",fragmentShader:ie$6,textureScale:e,forcePowerOfTwo:!0,sampleMode:e$i.LINEAR});var i=t[1]=new p$h({name:"SunPostProcessStage1",fragmentShader:E$k,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),n=this;this._delta=1,this._sigma=2,this._blurStep=new o$1o,t[2]=new p$h({name:"SunPostProcessStage2",fragmentShader:y$M,uniforms:{step:function(){return n._blurStep.x=n._blurStep.y=1/i.outputTexture.width,n._blurStep},delta:function(){return n._delta},sigma:function(){return n._sigma},direction:0},textureScale:e,forcePowerOfTwo:!0}),t[3]=new p$h({name:"SunPostProcessStage3",fragmentShader:y$M,uniforms:{step:function(){return n._blurStep.x=n._blurStep.y=1/i.outputTexture.width,n._blurStep},delta:function(){return n._delta},sigma:function(){return n._sigma},direction:1},textureScale:e,forcePowerOfTwo:!0}),t[4]=new p$h({name:"SunPostProcessStage4",fragmentShader:ie$6,sampleMode:e$i.LINEAR}),this._uCenter=new o$1o,this._uRadius=void 0,t[5]=new p$h({name:"SunPostProcessStage5",fragmentShader:j$i,uniforms:{center:function(){return n._uCenter},radius:function(){return n._uRadius},colorTexture2:function(){return n._sceneFramebuffer.getFramebuffer().getColorTexture(0)}}}),this._stages=new s$f({stages:t});for(var r=new g$q(this),o=t.length,a=0;a<o;++a)t[a]._textureCache=r;this._textureCache=r,this.length=t.length}p$h.prototype._isSupported=function(e){return!z$k.test(this._fragmentShader)||e.depthTexture},p$h.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&I$m(this),this._enabled=this.enabled,this._enabled&&(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=Q$e(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=e$2b(this._selected)?this._selected.length:0,this._parentSelectedLength=e$2b(this._parentSelected)?this._parentSelected.length:0,Z$h(this,e),k$g(this),K$c(this,e),Y$b(this,e),q$g(this),this._selectedDirty=!1,this._ready)){var i=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=i,e$2b(i)){var n,r=i.getColorTexture(0);(r.width!==e.drawingBufferWidth||r.height!==e.drawingBufferHeight||e$2b(this._blendingState))&&((!e$2b(n=this._renderState)||r.width!==n.viewport.width||r.height!==n.viewport.height)&&(this._renderState=d$1m.fromCache({viewport:new f$18(0,0,r.width,r.height),blending:this._blendingState}))),this._command.renderState=n}}},p$h.prototype.execute=function(e,t,i,n){if(e$2b(this._command)&&e$2b(this._command.framebuffer)&&this._ready&&this._enabled){this._colorTexture=t,this._depthTexture=i,this._idTexture=n,e$1P.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.ignoreWEBGL2=!0,this._colorTexture.sampler=this._sampler);var r=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;e$2b(r)&&(r.context=e),this._command.execute(e,r)}},p$h.prototype.isDestroyed=function(){return!1},p$h.prototype.destroy=function(){return I$m(this),i$10(this)},Object.defineProperties(s$f.prototype,{ready:{get:function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)if(!e[i].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){for(var t=this._stages,i=t.length,n=0;n<i;++n)t[n].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}}),s$f.prototype._isSupported=function(e){for(var t=this._stages,i=t.length,n=0;n<i;++n)if(!t[n]._isSupported(e))return!1;return!0},s$f.prototype.get=function(e){return o$1q.typeOf.number.greaterThanOrEquals("index",e,0),o$1q.typeOf.number.lessThan("index",e,this.length),this._stages[e]},s$f.prototype.update=function(e,t){this._selectedDirty=u$j(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=e$2b(this._selected)?this._selected.length:0,this._parentSelectedLength=e$2b(this._parentSelected)?this._parentSelected.length:0;for(var i=this._stages,n=i.length,r=0;r<n;++r){var o=i[r];this._selectedDirty&&(o.parentSelected=this._combinedSelected),o.update(e,t)}},s$f.prototype.isDestroyed=function(){return!1},s$f.prototype.destroy=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)e[i].destroy();return i$10(this)},g$q.prototype.updateDependencies=function(){this._updateDependencies=!0},g$q.prototype.update=function(e){var t=this._collection,i=this._updateDependencies,n=e$2b(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),r=e$2b(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),o=e$2b(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),a=e$2b(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),s=e$2b(t.screenSpaceReflection)&&t.screenSpaceReflection.enabled,l=e$2b(t.outline)&&t.outline.enabled,u=e$2b(t.snow)&&t.snow.enabled,c=!e$2b(t._activeStages)||t._activeStages.length>0||n||r||o||a||s||l||u;if((i||!c&&this._framebuffers.length>0)&&(y$l(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),i||c){0===this._framebuffers.length&&M$l(this,e);var h=e.drawingBufferWidth,d=e.drawingBufferHeight,f=this._width!==h||this._height!==d;!i&&!f||(this._width=h,this._height=d,this._updateDependencies=!1,y$l(this),R$j(this,e))}},g$q.prototype.clear=function(e){for(var t=this._framebuffers,i=t.length,n=0;n<i;++n)t[n].clear.execute(e)},g$q.prototype.getStageByName=function(e){return this._collection.getStageByName(e)},g$q.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)},g$q.prototype.getFramebuffer=function(e){var t=this._stageNameToFramebuffer[e];if(e$2b(t))return t.buffer},g$q.prototype.isDestroyed=function(){return!1},g$q.prototype.destroy=function(){return y$l(this),i$10(this)},n$i.prototype.update=function(e,t,i){var n=t.width,r=t.height,o=this._colorTexture;if(!e$2b(o)||o.width!==n||o.height!==r||i!==this._useHdr){S$h(this),this._useHdr=i;var a=i?e.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT:_$$.UNSIGNED_BYTE;this._colorTexture=new t$V({context:e,width:n,height:r,pixelFormat:V$10.RGBA,pixelDatatype:a,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),this._idTexture=new t$V({context:e,width:n,height:r,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),e.depthTexture?(this._depthStencilTexture=new t$V({context:e,width:n,height:r,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),this._depthStencilIdTexture=new t$V({context:e,width:n,height:r,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})):(this._depthStencilRenderbuffer=new r$$({context:e,width:n,height:r,format:M$13.DEPTH_STENCIL}),this._depthStencilIdRenderbuffer=new r$$({context:e,width:n,height:r,format:M$13.DEPTH_STENCIL})),this._framebuffer=new t$W({context:e,colorTextures:[this._colorTexture],depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}),this._idFramebuffer=new t$W({context:e,colorTextures:[this._idTexture],depthStencilTexture:this._depthStencilIdTexture,depthStencilRenderbuffer:this._depthStencilIdRenderbuffer,destroyAttachments:!1})}},n$i.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._framebuffer,e$1U.clone(i,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=this._idFramebuffer,e$1U.clone(this._idClearColor,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=n},n$i.prototype.getFramebuffer=function(){return this._framebuffer},n$i.prototype.getIdFramebuffer=function(){return this._idFramebuffer},n$i.prototype.isDestroyed=function(){return!1},n$i.prototype.destroy=function(){return S$h(this),i$10(this)},s$e.prototype.get=function(e){return this._stages.get(e)},s$e.prototype.getStageByName=function(e){for(var t=this._stages.length,i=0;i<t;++i){var n=this._stages.get(i);if(n.name===e)return n}};var z$j=new e$29,F$h=new o$1o,H$q=new o$1o,B$f=new p$1d;function Y$a(e,t,i){var n=t.uniformState,r=n.sunPositionWC,o=n.view,a=n.viewProjection,s=n.projection,l=p$1d.computeViewportTransformation(i,0,1,B$f),u=p$1d.multiplyByPoint(o,r,z$j),c=m$17.pointToGLWindowCoordinates(a,l,r,F$h);u.x+=e$2a.SOLAR_RADIUS;var h=m$17.pointToGLWindowCoordinates(s,l,u,u),d=30*o$1o.magnitude(o$1o.subtract(h,c,h))*2,f=H$q;f.x=d,f.y=d,e._uCenter=o$1o.clone(c,e._uCenter),e._uRadius=.15*Math.max(f.x,f.y);var p=t.drawingBufferWidth,_=t.drawingBufferHeight,m=e._stages.get(0),g=m.outputTexture.width,x=m.outputTexture.height,v=new f$18;v.width=g,v.height=x,l=p$1d.computeViewportTransformation(v,0,1,B$f),c=m$17.pointToGLWindowCoordinates(a,l,r,F$h),f.x*=g/p,f.y*=x/_}s$e.prototype.clear=function(e,t,i){this._sceneFramebuffer.clear(e,t,i),this._textureCache.clear(e)},s$e.prototype.update=function(e){var t=e.context,i=e.viewport,n=this._sceneFramebuffer;n.update(t,i);var r=n.getFramebuffer();return this._textureCache.update(t),this._stages.update(t,!1),Y$a(this,t,i),r},s$e.prototype.execute=function(e){var t=this._sceneFramebuffer.getFramebuffer().getColorTexture(0),i=this._stages,n=i.length;i.get(0).execute(e,t);for(var r=1;r<n;++r)i.get(r).execute(e,i.get(r-1).outputTexture)};const Q$d=new p$1e(1,0,-.5,0,1,-.5,0,0,1);s$e.prototype.copy=function(e,t,i){if(e$2b(i)&&e$2b(i.viewport)){this._isMultiViewport=!0;var n=i.viewport,r=e.drawingBufferWidth,o=e.drawingBufferHeight,a=[n.width/r,0,(n.x+.5*n.width)/r,0,n.height/o,(n.y+.5*n.height)/o,0,0,1];p$1e.fromRowMajorArray(a,this._stMatrix3),p$1e.multiply(this._stMatrix3,Q$d,this._stMatrix3)}if(!e$2b(this._copyColorCommand)){var s=this;const t="\n uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n uniform mat3 stMatrix3;\n void main(){\n vec3 st = stMatrix3 * vec3(v_textureCoordinates, 1.0);\n gl_FragColor = texture2D(colorTexture, st.xy);\n }\n ";this._copyColorCommand=e.createViewportQuadCommand(t,{uniformMap:{colorTexture:function(){return s._stages.get(s._stages.length-1).outputTexture},stMatrix3:function(){return s._isMultiViewport?s._stMatrix3:p$1e.IDENTITY}},owner:this,shaderProgramName:"CustomPassThrough"})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e,i),this._isMultiViewport=!1},s$e.prototype.isDestroyed=function(){return!1},s$e.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),i$10(this)};var I$l={NONE:0,HORIZONTAL:1,VERTICAL:2,QUAD:3,TRIPLE:4,VerticalTrisection:5,FIVE_DIVISIONS:6,SIX_DIVISIONS:7,SEVEN_DIVISIONS:8,EIGHT_DIVISIONS:9,NINE_DIVISIONS:10},B$e=Object.freeze(I$l),_0x5addc2=(_0x4d8b9d=!0,function(e,t){var i=_0x4d8b9d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d8b9d=!1,i}),_0xac112f=_0x5addc2(void 0,(function(){return _0xac112f.toString().search("(((.+)+)+)+$").toString().constructor(_0xac112f).search("(((.+)+)+)+$")})),_0x4d8b9d;_0xac112f();var _0x4f516a={BeforeExecuteCommands:0,BeforeExecuteCommandsForOnePass:1,PostExecuteCommandsForOnePass:2},k$f=Object.freeze(_0x4f516a),_0x2cbb8c=(_0x5e6745=!0,function(e,t){var i=_0x5e6745?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e6745=!1,i}),_0x3fa33e=_0x2cbb8c(void 0,(function(){return _0x3fa33e.toString().search("(((.+)+)+)+$").toString().constructor(_0x3fa33e).search("(((.+)+)+)+$")})),_0x5e6745;function _0x485985(e){this._scene=e,this._prepassRenderer=new _0x4e6a4d(e.context),this._clearColorCommand=new t$X({color:new e$1U,stencil:0,owner:this}),this._depthClearCommand=new t$X({depth:1,owner:this}),this._stencilClearCommand=new t$X({stencil:0}),this._classificationStencilClearCommand=new t$X({stencil:0,renderState:d$1m.fromCache({stencilMask:u$N.CLASSIFICATION_MASK})}),this._beforeExecuteCommandsEvent=new o$1h,this._beforeExecuteCommandsForOnePass=new o$1h,this._postExecuteCommandsForOnePass=new o$1h}_0x3fa33e(),Object.defineProperties(_0x485985.prototype,{}),_0x485985.prototype.executeCommands=function(e){var t=this._scene,i=t.camera,n=t.context;n.uniformState.updateCamera(i,n),this._beforeExecuteCommandsEvent.raiseEvent(this);var r=_0xa2141a(i);this.executeCommandsForEnvironment(e,r);var o=t._environmentState,a=t._frameState.passes;o.usePrepass&&!a.pick&&!a.depth&&!a.fbo&&(a.prepass=!0,this.executeCommandsForeground(e,r),a.prepass=!1),this.executeCommandsForeground(e,r)},_0x485985.prototype.executeCommandsForeground=function(e,t){var i=this._scene,n=i._frameState.passes,r=i._environmentState,o=i._view,a=i._environmentVisible,s=i.camera,l=i.context,u=l.uniformState,c=r.clearGlobeDepth,h=this._depthClearCommand,d=this._clearColorCommand,f=this._stencilClearCommand,p=s.position.z,_=o.frustumCommandsList,m=_.length;0===m&&e$2b(o.globeDepth)&&r.useGlobeDepthFramebuffer&&o.globeDepth.executeCopyDepth(l,e);for(var g=0;g<m;++g){var x=m-g-1,v=_[x];i.mode===C$13.SCENE2D?(s.position.z=p-v.near+1,t.far=Math.max(1,v.far-v.near),t.near=1,u.update(i.frameState),u.updateFrustum(t)):((!n.fbo||!l.depthTexture)&&(t.near=0!==x?v.near*i.opaqueFrustumNearOffset:v.near,t.far=v.far),i.logarithmicDepthBuffer&&s._positionCartographic.height>1e5&&t.near<10&&(t.near*=1e4),u.updateFrustum(t));var y=i.debugShowGlobeDepth?_0x33387c(i,x):o.globeDepth;if(i.debugShowGlobeDepth&&e$2b(y)&&r.useGlobeDepthFramebuffer&&(y.update(l,e,o.viewport,i._msaaSamples,i._hdr),y.clear(l,e,this._clearColorCommand.color),e.framebuffer=y.framebuffer),h.execute(l,e),n.depth&&!l.depthTexture&&d.execute(l,e),l.stencilBuffer&&f.execute(l,e),this.executeCommandsForGlobe(e,y,v),this.executeCommandsFor3DTiles(e,y,v),a.isObjectVisible){for(var $=Le$s.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW+1,b=Le$s.Particle,T=$;T<=b;++T)!this.isPassVisible(T,t)||(length=v.indices[T],this.isUpdateGlobeDepthBeforPassRender(T,length)&&e$2b(y)&&r.useGlobeDepthFramebuffer&&y.executeUpdateDepth(l,e,c),this.executeCommandsForPass(e,v,T),this.isUpdateGlobeDepthPostPassRender(T,length)&&e$2b(y)&&r.useGlobeDepthFramebuffer&&y.executeUpdateDepth(l,e,c));this.executeCommandsForTransparent(t,x,e,y,v),this.executeCommandsForPass(e,v,Le$s.ANALYSIS)}_0x56b7ff(i,e,x)}},_0x485985.prototype.isPassVisible=function(e,t){var i=this._scene,n=i._environmentVisible,r=i._frameState.passes,o=r.pick,a=r.depth,s=r.normal;switch(e){case Le$s.ProjectionImage:return!o&&!a;case Le$s.TRANSLUCENT:return o&&s||!n.isOnlyS3MObjectVisible||"sqResultTexture"===frameState._fboState.name;case Le$s.ClampObject:return!t.reflect;case Le$s.Label_Billboard:return n.isBillboardVisible&&!(o&&a);default:return!n.isOnlyS3MObjectVisible||!(e<Le$s.S3MTiles&&e>Le$s.S3MTilesClampObjectColor)}},_0x485985.prototype.isUpdateGlobeDepthBeforPassRender=function(e,t){switch(e){case Le$s.ProjectionImage:case Le$s.S3MTilesClampObjectColor:return t>0;default:return!1}},_0x485985.prototype.isUpdateGlobeDepthPostPassRender=function(e,t){switch(e){case Le$s.OPAQUE:return!0;case Le$s.NonClampObject:return t>0;default:return!1}},_0x485985.prototype.executeCommandsForGlobe=function(e,t,i){var n=this._scene,r=n.context;const o=r.uniformState;if(!n._environmentVisible.isGlobalVisible)return;var a=n._environmentState,s=a.clearGlobeDepth,l=a.useDepthPlane,u=this._depthClearCommand,c=n._depthPlane;const h=n._globeTranslucencyState,d=h.translucent,f=n._view.globeTranslucencyFramebuffer;if(d?h.executeGlobeCommands(i,_0x1a01b5,f,n,e):this.executeCommandsForPass(e,i,Le$s.GLOBE),e$2b(t)&&a.useGlobeDepthFramebuffer&&t.executeCopyDepth(r,e),!a.renderTranslucentDepthForPick){o.updatePass(Le$s.TERRAIN_CLASSIFICATION);var p=i.commands[Le$s.TERRAIN_CLASSIFICATION],_=i.indices[Le$s.TERRAIN_CLASSIFICATION];if(d)h.executeGlobeClassificationCommands(i,_0x1a01b5,f,n,e);else for(let t=0;t<_;++t)_0x1a01b5(p[t],n,r,e)}s&&(u.execute(r,e),l&&c.execute(r,e))},_0x485985.prototype.executeCommandsFor3DTiles=function(e,t,i){var n=this._scene,r=n.context,o=n._frameState.passes.pick,a=n._environmentState,s=(r=n.context,a.clearGlobeDepth),l=this._stencilClearCommand,u=0;if(!a.useInvertClassification||o)this.executeCommandsForPass(e,i,Le$s.CESIUM_3D_TILE),(u=i.indices[Le$s.CESIUM_3D_TILE])>0&&(e$2b(t)&&a.useGlobeDepthFramebuffer&&(t.prepareColorTextures(r,s),t.executeUpdateDepth(r,e,s)),this.executeCommandsForPass(e,i,Le$s.CESIUM_3D_TILE_CLASSIFICATION));else{n._invertClassification.clear(r,e);var c=e.framebuffer;e.framebuffer=n._invertClassification._fbo,this.executeCommandsForPass(e,i,Le$s.CESIUM_3D_TILE),e$2b(t)&&a.useGlobeDepthFramebuffer&&t.executeUpdateDepth(r,e,s),this.executeCommandsForPass(e,i,Le$s.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),e.framebuffer=c,n._invertClassification.executeClassified(r,e),1===n.frameState.invertClassificationColor.alpha&&n._invertClassification.executeUnclassified(r,e),u>0&&r.stencilBuffer&&clearClassificationStencil.execute(r,e),this.executeCommandsForPass(e,i,Le$s.CESIUM_3D_TILE_CLASSIFICATION)}u>0&&r.stencilBuffer&&l.execute(r,e)},_0x485985.prototype.executeCommandsForTransparent=function(e,t,i,n,r){var o,a=this._scene,s=a.context.uniformState,l=a._frameState,u=a._environmentVisible,c=a._environmentState,h=(a.context,a._frameState.passes),d=h.pick,f=_0x56123a(a);if(0!==t&&a.mode!==C$13.SCENE2D&&(e.near=r.near,s.updateFrustum(e)),!d&&c.useInvertClassification&&a.frameState.invertClassificationColor.alpha<1&&(o=a._invertClassification),h.pick&&h.normal||!u.isOnlyS3MObjectVisible||"sqResultTexture"===l._fboState.name){s.updatePass(Le$s.TRANSLUCENT);var p=r.commands[Le$s.TRANSLUCENT];p.length=r.indices[Le$s.TRANSLUCENT],"sqResultTexture"===l._fboState.name&&(p=p.filter((function(e){return"sqResultTexture"===e.owner}))),this._beforeExecuteCommandsForOnePass.raiseEvent(Le$s.TRANSLUCENT,this),f(a,_0x1a01b5,i,p,o),this._postExecuteCommandsForOnePass.raiseEvent(Le$s.TRANSLUCENT,this)}},_0x485985.prototype.executeCommandsForPass=function(e,t,i){this._beforeExecuteCommandsForOnePass.raiseEvent(i,this);var n=this._scene,r=n.context;r.uniformState.updatePass(i);for(var o=t.commands[i],a=t.indices[i],s=0;s<a;++s)_0x1a01b5(o[s],n,r,e);this._postExecuteCommandsForOnePass.raiseEvent(i,this)},_0x485985.prototype.updateAndExecuteCommands=function(e,t){var i=this._scene,n=i._context,r=n.uniformState,o=e.viewport;o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight;var a=i._frameState,s=a.camera,l=a.mode,u=(h=a.passes).pick;if(i._useWebVR&&l!==C$13.SCENE2D)_0x4843a3(i,e,t,this);else if(a._fboState.enabled||i._multiViewportMode===B$e.NONE)this.updateAndClearFramebuffers(e,t),l!==C$13.SCENE2D||i._mapMode2D===Rr$2.ROTATE?this.executeCommandsInViewport(!0,e):this.execute2DViewportCommands(e);else{this.updateAndClearFramebuffers(e,t);for(var c=0;c<i._multiViewportInfo.length;c++)if(!u||i._frameState.multiViewportIndex===c){u=(h=i._frameState.passes).pick;var h,d=h.fbo,f=i._environmentState.useWebVR;i._environmentState.isSunVisible&&i.sunBloom&&!f&&!d&&(e.framebuffer=i._sunPostProcess._sceneFramebuffer.getFramebuffer());var p=i._multiViewportInfo[c];o.x=n.drawingBufferWidth*p.x,o.y=n.drawingBufferHeight*p.y,o.width=n.drawingBufferWidth*p.width,o.height=n.drawingBufferHeight*p.height,s.frustum.aspectRatio=o.width/o.height,u&&(o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight),r.update(a),i._frameState.multiViewportIndex=c,a.cullingVolume=a.camera.frustum.computeCullingVolume(a.camera.positionWC,a.camera.directionWC,a.camera.upWC),this.executeCommandsInViewport(0==c||u,e),n.webgpu&&n.engine.flushFramebuffer()}}},_0x485985.prototype.updateAndExecuteCommandsForPostEffect=function(e,t){var i=this._scene._context,n=e.viewport;n.x=0,n.y=0,n.width=i.drawingBufferWidth,n.height=i.drawingBufferHeight;var r=t,o=this._clearColorCommand;e$1U.clone(r,o.color),o.execute(i,e),this.executeCommandsInViewport(!0,e)},_0x485985.prototype.executeOverlayCommands=function(e){var t=this._scene,i=t.context.uniformState;i.updatePass(Le$s.OVERLAY);var n=t.context,r=t._frameState,o=t._view.viewport;if(o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight,e.viewport=f$18.clone(o,e.viewport),t._multiViewportMode===B$e.NONE)_0x104cb8(this,t,e);else{for(var a=0;a<t._multiViewportInfo.length;a++)if(!r.passes.pick||t._frameState.multiViewportIndex===a){r.multiViewportIndex=a;var s=t._multiViewportInfo[a];o.x=n.drawingBufferWidth*s.x,o.y=n.drawingBufferHeight*s.y,o.width=n.drawingBufferWidth*s.width,o.height=n.drawingBufferHeight*s.height,r.camera.frustum.aspectRatio=o.width/o.height,r.passes.pick&&(o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight),e.viewport=f$18.clone(o),i.update(r),_0x104cb8(this,t,e)}o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight,e.viewport=f$18.clone(o)}};var _0x425b5f=new f$18;function _0x104cb8(e,t,i){var n=t.context,r=t._frameState.passes,o=t._view.globeDepth,a=t._environmentState,s=a.renderTranslucentDepthForPick,l=t._logDepthOverlayCommandList,u=l.length;if(u>0)for(var c=0;c<u;++c){var h=l[c];(r=t._frameState.passes).pick||r.depth?_0x1a01b5(l[c],t,n,i):(h=h.derivedCommands.logDepth.command).execute(n,i)}u=(l=t._overlayCommandList).length;for(c=0;c<u;++c){h=l[c];(r=t._frameState.passes).pick||r.depth?_0x1a01b5(l[c],t,n,i):h.execute(n,i)}if(!r.fbo&&n.depthTexture&&t.useDepthPicking&&(a.useGlobeDepthFramebuffer||s)){var d=s?i.framebuffer.depthStencilTexture:o.depthStencilTexture;e$2b(d)||(d=o.depthStencilTexture);var f=t._picking.getPickDepth(t,0);f.update(n,d),f.executeCopyDepth(n,i)}if((u=(l=t._overlayAgainstDepthCommandList).length)>0){e._depthClearCommand.execute(t._context,i);for(c=0;c<u;++c)if(t.frameState.passes.pick){(h=t._hdr&&t.logarithmicDepthBuffer?l[c].derivedCommands.logDepth.command.derivedCommands.picking.pickCommand:l[c].derivedCommands.picking.pickCommand).execute(t._context,i)}else l[c].execute(n,i)}}_0x485985.prototype.resolveFramebuffers=function(e){var t=this._scene,i=t._context,n=t._frameState,r=t._environmentState,o=t._view;const a=o.globeDepth;e$2b(a)&&a.prepareColorTextures(i);var s=t.voxelGridPostRender,l=t.particlePostRender,u=t.particleTrailsPostRenderer,c=n.passes.pick,h=r.useOIT,d=e$2b(s)&&s.enable,f=r.useGlobeDepthFramebuffer,p=r.usePostProcess;r.usePostEffect,n._fboState.frameBufferType,Qe$c.NORMAL_AND_DEPTH;var _=r.originalFramebuffer,m=f?o.globeDepth.framebufferWithTexture:void 0,g=o.sceneFramebuffer.getFramebuffer(),x=o.sceneFramebuffer.getIdFramebuffer();if(e$2b(u)&&!c&&u.execute(i,e),e$2b(s)){if(e.framebuffer=p?g:_,h){var v=s.getOutputFramebuffer();e$2b(v)&&(e.framebuffer=v,o.oit.setOpaqueTexture(v.getColorTexture(0)))}s.execute(i,e)}if(h&&(e.framebuffer=p?g:_,o.oit.execute(i,e)),e$2b(l)&&l.execute(i,e),p){var y=g;f&&!h&&!d&&(y=m),t.compositor.outputFbo=y;var $=t.postProcessStages,b=y.getColorTexture(0),T=x.getColorTexture(0),C=u$_(m,g).depthStencilTexture;$.execute(i,b,C,T),$.copy(i,_,n.useLogDepth),t.compositor.outputFbo=void 0}!h&&!p&&f&&(e.framebuffer=_,f$18.clone(e.viewport,_0x425b5f),e.viewport.x=0,e.viewport.y=0,e.viewport.width=i.drawingBufferWidth,e.viewport.height=i.drawingBufferHeight,o.globeDepth.executeCopyColor(i,e),f$18.clone(_0x425b5f,e.viewport));var S=n.useLogDepth;t.debugShowGlobeDepth&&f&&_0x33387c(t,t.debugShowDepthFrustum-1).executeDebugGlobeDepth(i,e,S);t.debugShowPickDepth&&f&&t._picking.getPickDepth(t,t.debugShowDepthFrustum-1).executeDebugPickDepth(i,e,S)},_0x485985.prototype.updateShadowMaps=function(){var e=this._scene,t=e._frameState,i=t.shadowMaps,n=i.length,r=n>0&&!t.passes.pick&&e.mode===C$13.SCENE3D;if(r!==t.shadowState.shadowsEnabled&&(++t.shadowState.lastDirtyTime,t.shadowState.shadowsEnabled=r),t.shadowState.lightShadowsEnabled=!1,r){for(var o=0;o<n;++o)if(i[o]!==t.shadowState.shadowMaps[o]){++t.shadowState.lastDirtyTime;break}t.shadowState.shadowMaps.length=0,t.shadowState.lightShadowMaps.length=0;for(var a=0;a<n;++a){var s=i[a];s.update(t),t.shadowState.shadowMaps.push(s),s.fromLightSource&&(t.shadowState.lightShadowMaps.push(s),t.shadowState.lightShadowsEnabled=!0),s.dirty&&(++t.shadowState.lastDirtyTime,s.dirty=!1)}}},_0x485985.prototype.updateAndRenderPrimitives=function(e){var t=this._scene,i=t._frameState,n=t._context,r=i.commandList;t._groundPrimitives.update(i),t._primitives.update(i),_0x180a9c(t),e&&this.updateShadowMaps();var o=t.layers.update(n,i,r,!0);if(i.rasterLayerIds=o,t._globe){for(var a in t._vectorTileSource._hash){(s=t._vectorTileSource.get(a))instanceof I$10&&s.resetVisible()}t._globe.render(i)}for(var a in i.rasterLayerIds=void 0,t.layers.update(n,i,r),t.layers.updateTextVisible(n,i),t._analyst3D.update(n,i,r),t._vectorTileMaps.update(n,i,r),t._plotLayers.update(i,n,r),t._vectorTileSource._hash){var s;(s=t._vectorTileSource.get(a)).update(n,i,r)}},_0x485985.prototype.updateAndClearFramebuffers=function(e,t){var i=this._scene,n=i._context,r=i._frameState,o=i._environmentState,a=i._view,s=i._frameState.passes,l=s.pick,u=s.fbo,c=o.useWebVR;o.originalFramebuffer=e.framebuffer,e$2b(i.sun)&&i.sunBloom!==i._sunBloom?(i.sunBloom&&!c?i._sunPostProcess=new s$e:e$2b(i._sunPostProcess)&&(i._sunPostProcess=i._sunPostProcess.destroy()),i._sunBloom=i.sunBloom):!e$2b(i.sun)&&e$2b(i._sunPostProcess)&&(i._sunPostProcess=i._sunPostProcess.destroy(),i._sunBloom=!1);var h=this._clearColorCommand;e$1U.clone(t,h.color),h.execute(n,e);var d=o.useGlobeDepthFramebuffer=(i._enableCompositor||l)&&e$2b(a.globeDepth);d&&(a.globeDepth.update(n,e,a.viewport,i._msaaSamples,i._hdr||i._pickPointEnabled),a.globeDepth.clear(n,e,t));var f=a.oit,p=o.useOIT=i._enableCompositor&&!u&&!l&&e$2b(f)&&f.isSupported();p&&(f.update(n,e,a.globeDepth.framebufferWithTexture,i._msaaSamples,i._hdr||i._pickPointEnabled),f.clear(n,e,t),o.useOIT=f.isSupported()),e$2b(i.voxelGridPostRender)&&n.depthTexture&&(i.voxelGridPostRender.update(r,a.globeDepth.framebufferWithTexture,i._hdr),i.voxelGridPostRender.clear(n,e)),e$2b(i.particlePostRender)&&(i.particlePostRender.update(r,i._hdr),i.particlePostRender.clear(n,e)),e$2b(i.particleTrailsPostRenderer)&&!l&&_0x3fd0ff(i,e);var _=i.postProcessStages,m=_.screenSpaceReflection;if((o.usePrepass=m.enabled)&&!l){var g=this._prepassRenderer;g.update(a.globeDepth.framebufferWithTexture),g.clear(n,e,t)}var x,v=o.usePostProcess=i._enableCompositor&&!u&&!l&&(i._hdr||_.length>0||_.ambientOcclusion.enabled||_.fxaa.enabled||_.bloom.enabled||_.smaa.enabled);(o.usePostProcessSelected=!1,v)&&(a.sceneFramebuffer.update(n,a.viewport,i._hdr),a.sceneFramebuffer.clear(n,e,t),_.update(n,r.useLogDepth,i._hdr,i),_.clear(n),v=o.usePostProcess=_.ready,o.usePostProcessSelected=v&&_.hasSelected,(o.usePostEffect=e$2b(i.compositor)&&i.compositor.isEnable())&&(i.compositor.update(n,e,i,r),i.compositor.clear(n,t),_.compositor=i.compositor));if(o.isSunVisible&&i.sunBloom&&!c&&!u?(e.framebuffer=i._sunPostProcess.update(e),i._sunPostProcess.clear(n,e,t)):d?r._fboState.frameBufferType!==Qe$c.CLAMP&&(e.framebuffer=a.globeDepth.framebuffer):v&&(e.framebuffer=a.sceneFramebuffer.getFramebuffer()),e$2b(e.framebuffer)&&h.execute(n,e),o.useInvertClassification=!l&&e$2b(e.framebuffer)&&i.invertClassification)if(1===i.frameState.invertClassificationColor.alpha&&o.useGlobeDepthFramebuffer&&(x=a.globeDepth.framebuffer),e$2b(x)||n.depthTexture){if(i._invertClassification.previousFramebuffer=x,i._invertClassification.update(n),i._invertClassification.clear(n,e),i.frameState.invertClassificationColor.alpha<1&&p){var y=i._invertClassification.unclassifiedCommand,$=y.derivedCommands;$.oit=f.createDerivedCommands(y,n,$.oit)}}else o.useInvertClassification=!1;i._globeTranslucencyState.translucent&&a.globeTranslucencyFramebuffer.updateAndClear(i._hdr,a.viewport,n,e)};var _0x1532f9=new a$18(Math.PI,e$2a.PI_OVER_TWO),_0x2cd88c=new o$1p,_0x22cd48=new o$1p,_0x12c9d0=new p$1d,_0x26d0c3=new p$1d,_0x38e62a=new o$1p,_0x20feff=new o$1p,_0xdfcc9d=new f$18;function _0x56b7ff(e,t,i){if(!e._frameState.passes.fbo){var n=e.context,r=e._environmentState,o=e._view.globeDepth;if(n.depthTexture&&e.useDepthPicking&&r.useGlobeDepthFramebuffer){if(s=e$2b(t.framebuffer)&&e$2b(t.framebuffer.depthStencilTexture)?t.framebuffer.depthStencilTexture:o.depthStencilTexture,!e$2b(s))return;(a=e._picking.getPickDepth(e,i)).update(n,s),a.executeCopyDepth(n,t)}else if(e$2b(t.framebuffer)&&e$2b(t.framebuffer.getColorTexture(0))){var a,s=t.framebuffer.getColorTexture(0);(a=e._picking.getPickDepth(e,i)).update(n,s),a.executeCopyDepth(n,t)}}}function _0x1a01b5(e,t,i,n){var r=t._frameState,o=r.passes;if(e.debugShowBoundingVolume&&e$2b(e.boundingVolume)&&_0x41e390.debugShowBoundingVolume(e,t,n,debugFramebuffer),r.useLogDepth&&e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command),!o.pick&&t._hdr&&e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),!o.pick&&t.maskEnabled&&e$2b(e.derivedCommands)&&e$2b(e.derivedCommands.mask)&&(e=e.derivedCommands.mask.command),o.pick&&o.normal){if(!e$2b(e.derivedCommands))return;(e=e.derivedCommands.normal.command).execute(i,n)}else{if(o.prepass){if(!e$2b(e.derivedCommands)||!e$2b(e.derivedCommands.prepass))return;return(e=e.derivedCommands.prepass.command).framebuffer=t._renderPipeline._prepassRenderer.framebuffer,void e.execute(i,n)}if(o.pick||o.depth){if(!e$2b(e.derivedCommands))return;if(o.pick&&!o.depth&&e$2b(e.derivedCommands.picking))return void(e=e.derivedCommands.picking.pickCommand).execute(i,n);if(o.depth&&e$2b(e.derivedCommands.depth)){if(e.pass===Le$s.ANALYSIS||!e.renderState.depthTest.enabled)return;return void(e=e.derivedCommands.depth.depthOnlyCommand).execute(i,n)}}t.debugShowCommands||t.debugShowFrustums?_0x41e390.executeDebugCommand(e,t,n):r.shadowState.lightShadowsEnabled&&e.receiveShadows&&e$2b(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(i,n):e.execute(i,n)}}function _0xd5fd9a(e,t,i,n){var r=t._frameState,o=e.derivedCommands;!e$2b(o)||(r.useLogDepth&&e$2b(o.logDepth)&&(e=o.logDepth.command),e$2b((o=e.derivedCommands).picking)?(e=o.picking.pickCommand).execute(i,n):e$2b(o.depth)&&(e=o.depth.depthOnlyCommand).execute(i,n))}function _0x2e7e4a(e,t,i){return t.boundingVolume.distanceSquaredTo(i)-e.boundingVolume.distanceSquaredTo(i)}function _0x36ac6e(e,t,i){return e.boundingVolume.distanceSquaredTo(i)-t.boundingVolume.distanceSquaredTo(i)+e$2a.EPSILON12}function _0x357cfb(e,t,i,n,r){var o=e.context;m$H(n,_0x2e7e4a,e.camera.positionWC),e$2b(r)&&t(r.unclassifiedCommand,e,o,i);for(var a=n.length,s=0;s<a;++s)t(n[s],e,o,i)}function _0x245171(e,t,i,n,r){var o=e.context;m$H(n,_0x36ac6e,e.camera.positionWC),e$2b(r)&&t(r.unclassifiedCommand,e,o,i);for(var a=n.length,s=e.frameState.passes,l=0;l<a;++l)s.pick&&!e$2b(n[l].pickId)&&!s.depth||t(n[l],e,o,i)}function _0x56123a(e){var t,i=e._frameState.passes,n=e.context,r=e._environmentState,o=e._view;return r.useOIT?(e$2b(e._executeOITFunction)||(e._executeOITFunction=function(e,t,i,r,a){o.globeDepth.prepareColorTextures(n),o.oit.executeCommands(e,t,i,r,a)}),t=e._executeOITFunction):t=i.render?_0x357cfb:_0x245171,t}function _0x4657fb(e,t,i){for(var n=i.shadowMapCullingVolume,r=i.isPointLight,o=i.passes,a=o.length,s=t.length,l=0;l<s;++l){var u=t[l];if(e.updateDerivedCommands(u),u.castShadows&&(u.pass===Le$s.GLOBE||u.pass===Le$s.CESIUM_3D_TILE||u.pass>=Le$s.S3MTiles&&u.pass<=Le$s.TRANSLUCENT)&&e.isVisible(u,n))if(r)for(var c=0;c<a;++c)o[c].commandList.push(u);else if(1===a)o[0].commandList.push(u);else for(var h=!1,d=a-1;d>=0;--d){var f=o[d].cullingVolume;if(e.isVisible(u,f))o[d].commandList.push(u),h=!0;else if(h)break}}}function _0x9c02b6(e){var t=e.frameState,i=t.shadowState.shadowMaps,n=i.length;if(t.shadowState.shadowsEnabled)for(var r=e.context,o=r.uniformState,a=0;a<n;++a){var s=i[a];if(!s.outOfView){var l,u=s.passes,c=u.length;for(l=0;l<c;++l)u[l].commandList.length=0;for(_0x4657fb(e,e.frameState.commandList,s),l=0;l<c;++l){var h=s.passes[l];h.camera._scene=e,o.updateCamera(h.camera,r),s.updatePass(r,l);for(var d=h.commandList.length,f=0;f<d;++f){var p=h.commandList[f];o.updatePass(p.pass),_0x1a01b5(p.derivedCommands.shadows.castCommands[a],e,r,h.passState)}r.webgpu&&r.engine.flushFramebuffer()}}}}function _0x1128c1(e){e.context.uniformState.updatePass(Le$s.COMPUTE);var t=e._environmentState.sunComputeCommand;e$2b(t)&&t.execute(e._computeEngine);for(var i=e._computeCommandList,n=i.length,r=0;r<n;++r)i[r].execute(e._computeEngine)}_0x485985.prototype.execute2DViewportCommands=function(e){var t=this._scene,i=t.context,n=t.frameState,r=t.camera,o=e.viewport,a=f$18.clone(o,_0xdfcc9d);e.viewport=a;var s=_0x1532f9,l=_0x2cd88c;t.mapProjection.project(s,l);var u=o$1p.clone(r.position,_0x22cd48),c=p$1d.clone(r.transform,_0x26d0c3),h=r.frustum.clone();r._setTransform(p$1d.IDENTITY);var d=p$1d.computeViewportTransformation(a,0,1,_0x12c9d0),f=r.frustum.projectionMatrix,p=r.positionWC.y,_=o$1p.fromElements(e$2a.sign(p)*l.x-p,0,-r.positionWC.x,_0x38e62a),m=m$17.pointToGLWindowCoordinates(f,d,_,_0x20feff);m.x=Math.floor(m.x);var g=a.x,x=a.width;if(0===p||m.x<=g||m.x>=g+x)this.executeCommandsInViewport(!0,e);else if(Math.abs(g+.5*x-m.x)<1)a.width=m.x-a.x,r.position.x*=e$2a.sign(r.position.x),r.frustum.right=0,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!0,e),a.x=m.x,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=0,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!1,e);else if(m.x>g+.5*x){a.width=m.x-g;var v=r.frustum.right;r.frustum.right=l.x-p,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!0,e),a.x=m.x,a.width=g+x-m.x,r.position.x=-r.position.x,r.frustum.left=-r.frustum.right,r.frustum.right=v-2*r.frustum.right,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!1,e)}else{a.x=m.x,a.width=g+x-m.x;var y=r.frustum.left;r.frustum.left=-l.x-p,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!0,e),a.x=g,a.width=m.x-g,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=y-2*r.frustum.left,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!1,e)}r._setTransform(c),o$1p.clone(u,r.position),r.frustum=h.clone(),e.viewport=o},_0x485985.prototype.executeCommandsInViewport=function(e,t,i){var n=this._scene,r=n._environmentState,o=n._view,a=r.renderTranslucentDepthForPick;!e&&!a&&(n.frameState.commandList.length=0),(!a||n._frameState.multiViewportIndex>-1)&&this.updateAndRenderPrimitives(e),o.createPotentiallyVisibleSet(n),e&&(e$2b(i)&&this.updateAndClearFramebuffers(t,i),a||(_0x1128c1(n),_0x9c02b6(n))),this.executeCommands(t)},_0x485985.prototype.executeIdCommands=function(e,t,i){var n=this._scene,r=n._view,o=n._environmentState,a=o.clearGlobeDepth,s=o.useDepthPlane,l=this._depthClearCommand,u=n._depthPlane,c=n.context,h=c.uniformState,d=e.framebuffer;e.framebuffer=r.sceneFramebuffer.getIdFramebuffer(),t.near=0!==index?i.near*n.opaqueFrustumNearOffset:i.near,t.far=i.far,h.updateFrustum(t),h.updatePass(Le$s.GLOBE);var f=i.commands[Le$s.GLOBE],p=i.indices[Le$s.GLOBE];for(j=0;j<p;++j)_0xd5fd9a(f[j],n,c,e);for(a&&(l.framebuffer=e.framebuffer,l.execute(c,e),l.framebuffer=void 0),a&&s&&u.execute(c,e),h.updatePass(Le$s.CESIUM_3D_TILE),f=i.commands[Le$s.CESIUM_3D_TILE],p=i.indices[Le$s.CESIUM_3D_TILE],j=0;j<p;++j)_0xd5fd9a(f[j],n,c,e);for(h.updatePass(Le$s.OPAQUE),f=i.commands[Le$s.OPAQUE],p=i.indices[Le$s.OPAQUE],j=0;j<p;++j)_0xd5fd9a(f[j],n,c,e);for(h.updatePass(Le$s.TRANSLUCENT),f=i.commands[Le$s.TRANSLUCENT],p=i.indices[Le$s.TRANSLUCENT],j=0;j<p;++j)_0xd5fd9a(f[j],n,c,e);e.framebuffer=d},_0x485985.prototype.executeCommandsForEnvironment=function(e,t){var i=this._scene,n=i.camera,r=i.context,o=r.uniformState,a=i._frameState.passes;if(!a.pick){t.near=n.frustum.near,t.far=n.frustum.far;var s=t.reflect;t.reflect=!1,o.updateFrustum(t);var l=i._environmentState,u=i._environmentVisible,c=l.skyBoxCommand,h=l.useWebVR,d=i._view;if(o.updatePass(Le$s.ENVIRONMENT),e$2b(c)&&u.isSkyBoxVisible&&_0x1a01b5(c,i,r,e),l.isSkyAtmosphereVisible&&u.isSkyAtmosphereVisible&&_0x1a01b5(l.skyAtmosphereCommand,i,r,e),l.isUnderGlobeVisible&&u.isUnderGlobeVisible&&l.underGlobeCommand.execute(r,e),l.isSunVisible&&u.isSunVisible&&!a.fbo&&(l.sunDrawCommand.execute(r,e),i.sunBloom&&!h)){var f;f=l.useGlobeDepthFramebuffer?d.globeDepth.framebuffer:l.usePostProcess?d.sceneFramebuffer.getFramebuffer():l.originalFramebuffer;var p=i._multiViewportMode!==B$e.NONE;i._sunPostProcess.execute(r),i._sunPostProcess.copy(r,f,p?e:void 0),e.framebuffer=f}l.isMoonVisible&&u.isMoonVisible&&l.moonCommand.execute(r,e),t.reflect=s}};var _0x445c70=new o$15,_0x17ab3f=new l$11,_0x8a404=new a$V,_0x4931bc=new l$12;function _0xa2141a(e){return e$2b(e.frustum.fov)?e.frustum.clone(_0x445c70):e$2b(e.frustum.infiniteProjectionMatrix)?e.frustum.clone(_0x17ab3f):e$2b(e.frustum.width)?e.frustum.clone(_0x8a404):e.frustum.clone(_0x4931bc)}function _0x3fd0ff(e,t){for(var i=e._context,n=e._frameState,r=e._view.camera,o=0,a=e._layers.layerQueue.length;o<a;o++){var s=e._layers.layerQueue[o];if("FieldLayer3D"===s._type)(c=s._particleVelocityFieldEffect)._showParticleTrails&&e$2b(c._lastParticleStateTexture)&&(c.clearLastParticleStateTexture(r,e._hdr,i,t),e.particleTrailsPostRenderer._particleStateTexture=c._lastParticleStateTexture,e.particleTrailsPostRenderer.update(n))}for(var l=0,u=e._primitives.length;l<u;l++){var c,h=e._primitives._primitives[l];if("FieldLayer3D"==h.type)(c=h._particleVelocityFieldEffect)._showParticleTrails&&e$2b(c._lastParticleStateTexture)&&(c.clearLastParticleStateTexture(r,e._hdr,i,t),e.particleTrailsPostRenderer._particleStateTexture=c._lastParticleStateTexture,e.particleTrailsPostRenderer.update(n))}}function _0x180a9c(e){var t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new p$U({camera:e.camera,updateOnChange:!1}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),e$2b(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function _0x33387c(e,t){var i=e._view.debugGlobeDepths,n=i[t];return!e$2b(n)&&e.context.depthTexture&&(n=new GlobeDepth,i[t]=n),n}function _0x4843a3(e,t,i,n){var r=e._view,o=r.camera,a=e._environmentState.renderTranslucentDepthForPick;n.updateAndClearFramebuffers(t,i),a||n.updateAndRenderPrimitives(e),r.createPotentiallyVisibleSet(e),a||(_0x1128c1(e),_0x9c02b6(e));var s=t.viewport;s.x=0,s.y=0,s.width=.5*s.width;var l=v$K.clone(o,e._cameraVR);l.frustum=o.frustum;var u=o.frustum.near,c=u*u$_(e.focalLength,5),h=u$_(e.eyeSeparation,c/30),d=o$1p.multiplyByScalar(l.right,.5*h,new o$1p(0,0,0));o.frustum.aspectRatio=s.width/s.height;var f=.5*h*u/c;o$1p.add(l.position,d,o.position),o.frustum.xOffset=f,n.executeCommands(t),s.x=s.width,o$1p.subtract(l.position,d,o.position),o.frustum.xOffset=-f,n.executeCommands(t),v$K.clone(l,o)}_0x485985.prototype._listenerTypeToEvent=function(e){var t=null;switch(e){case k$f.BeforeExecuteCommands:t=this._beforeExecuteCommandsEvent;break;case k$f.BeforeExecuteCommandsForOnePass:t=this._beforeExecuteCommandsForOnePass;break;case k$f.PostExecuteCommandsForOnePass:t=this._postExecuteCommandsForOnePass}return t},_0x485985.prototype.addEventListener=function(e,t,i){this._listenerTypeToEvent(e).addEventListener(t,i)},_0x485985.prototype.removeEventListener=function(e,t,i){this._listenerTypeToEvent(e).removeEventListener(t,i)},_0x485985.prototype.isDestroyed=function(){return!1},_0x485985.prototype.destroy=function(){return i$10(this)};var _0x46fa0f=(_0x5ec05a=!0,function(e,t){var i=_0x5ec05a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ec05a=!1,i}),_0xe634f6=_0x46fa0f(void 0,(function(){return _0xe634f6.toString().search("(((.+)+)+)+$").toString().constructor(_0xe634f6).search("(((.+)+)+)+$")})),_0x5ec05a;function _0x408f08(){}_0xe634f6(),_0x408f08.maxVBOSize=0;var _0x5552fd=0,_0x5842d5=0,_0x14430d=1048576,_0x2fc42d={},_0x10f6e1=new e$1N;_0x408f08.createVertexBuffer=function(e,t){var i;if(e$2b(_0x2fc42d[e.id])){i=_0x2fc42d[e.id];for(var n,r=t.byteLength,o=Object.keys(i._hash),a=!1,s=0,l=o.length;s<l;s++)if((n=Number(o[s]))>=r&&n<r+1024){a=!0;break}var u;if(a){var c=i.get(n);(u=c.pop()).isCached=!1,u.copyFromArrayView(t,0),_0x5552fd-=n,c.length<1&&i.remove(n)}return u}},_0x408f08.createIndexBuffer=function(e,t){var i;if(e$2b(_0x10f6e1[e.id])){i=_0x10f6e1[e.id];for(var n,r=t.byteLength,o=Object.keys(i._hash),a=!1,s=0,l=o.length;s<l;s++)if((n=Number(o[s]))===r){a=!0;break}var u;if(a){var c=i.get(n);(u=c.pop()).isCached=!1,u.copyFromArrayView(t,0),_0x5842d5-=n,c.length<1&&i.remove(n)}return u}},_0x408f08.deleteBuffer=function(e){if(e$2b(_0x2fc42d[e.id])){var t,i,n,r,o=_0x2fc42d[e.id],a=_0x14430d*_0x408f08.maxVBOSize*.9;if(_0x5552fd>a*_0x14430d){var s=a*_0x14430d;for(i=(t=Object.keys(o._hash)).length,n=0;n<i&&_0x5552fd>s;){r=t[n];for(var l=o.get(r);l.length&&_0x5552fd>s;){l.pop().destroy(),_0x5552fd-=r}l.length<1&&o.remove(r),++n}}if(e$2b(_0x10f6e1[e.id])){var u=_0x10f6e1[e.id],c=_0x14430d*_0x408f08.maxVBOSize*.1;if(_0x5842d5>c*_0x14430d){var h=c*_0x14430d;for(i=(t=Object.keys(u._hash)).length,n=0;n<i&&_0x5842d5>h;){r=t[n];for(var d=u.get(r);d.length&&_0x5842d5>h;){d.pop().destroy(),_0x5842d5-=r}d.length<1&&u.remove(r),++n}}}}},_0x408f08.deleteVertexArray=function(e,t){var i,n;e$2b(_0x2fc42d[e.id])||(_0x2fc42d[e.id]=new e$1N),i=_0x2fc42d[e.id];for(var r=t._attributes,o=.9*_0x408f08.maxVBOSize,a=0;a<r.length;++a){var s=r[a].vertexBuffer;if(!(_0x5552fd>=o||s.isCached||s.vertexArrayDestroyable)){var l=s.sizeInBytes;i.contains(l)?i.get(l).push(s):i.set(l,[s]),s.isCached=!0,_0x5552fd+=l}}e$2b(_0x10f6e1[e.id])||(_0x10f6e1[e.id]=new e$1N),n=_0x10f6e1[e.id];var u=t._indexBuffer;return.1*_0x408f08.maxVBOSize>_0x5842d5&&e$2b(u)&&!u.isCached&&!u.vertexArrayDestroyable&&(n.contains(u.sizeInBytes)?n.get(u.sizeInBytes).push(u):n.set(u.sizeInBytes,[u]),u.isCached=!0,_0x5842d5+=u.sizeInBytes),t.destroy()};var _0x332748=(_0x30bcef=!0,function(e,t){var i=_0x30bcef?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30bcef=!1,i}),_0x4f9ca0=_0x332748(void 0,(function(){return _0x4f9ca0.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f9ca0).search("(((.+)+)+)+$")})),_0x30bcef;function _0x2b82d9(e){this._longitude=u$_(e.longitude,0),this._latitude=u$_(e.latitude,0),this._altitude=u$_(e.altitude,0),this._scale=u$_(e.scale,new o$1p(1,1,1)),this._color=u$_(e.color,e$1U.WHITE),this._heading=u$_(e.heading,Math.PI/2),this._pitch=u$_(e.pitch,0),this._roll=u$_(e.roll,0),this._startDirection=u$_(e.startDirection,0),this._offset=u$_(e.offset,new o$1p),this._timeStamp=u$_(e.timeStamp,-1),this._id=u$_(e.id,e$1Q()),this._description=e.description,this._lockOrientation=u$_(e.lockOrientation,!1)}_0x4f9ca0(),Object.defineProperties(_0x2b82d9.prototype,{longitude:{get:function(){return this._longitude},set:function(e){this._longitude=e}},latitude:{get:function(){return this._latitude},set:function(e){this._latitude=e}},altitude:{get:function(){return this._altitude},set:function(e){this._altitude=e}},scale:{get:function(){return this._scale},set:function(e){this._scale=e}},color:{get:function(){return this._color},set:function(e){this._color=e}},heading:{get:function(){return this._heading},set:function(e){this._heading=e}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e}},roll:{get:function(){return this._roll},set:function(e){this._roll=e}},startDirection:{get:function(){return this._startDirection},set:function(e){this._startDirection=e}},offset:{get:function(){return this._offset},set:function(e){this._offset=e}},timeStamp:{get:function(){return this._timeStamp},set:function(e){this._timeStamp=e}},id:{get:function(){return this._id},set:function(e){this._id=e}},description:{get:function(){return this._description},set:function(e){this._description=e}},lockOrientation:{get:function(){return this._lockOrientation},set:function(e){this._lockOrientation=e}}}),_0x2b82d9.clone=function(e){return new _0x2b82d9({longitude:e._longitude,latitude:e._latitude,altitude:e._altitude,scale:e._scale,color:e._color,heading:e._heading,pitch:e._pitch,roll:e._roll,startDirection:e._startDirection,offset:e._offset,lockOrientation:e._lockOrientation})};var _0x550a58=(_0x44029e=!0,function(e,t){var i=_0x44029e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x44029e=!1,i}),_0x50afb7=_0x550a58(void 0,(function(){return _0x50afb7.toString().search("(((.+)+)+)+$").toString().constructor(_0x50afb7).search("(((.+)+)+)+$")})),_0x44029e;_0x50afb7();var _0x46b7bc="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TEXTURE\nattribute vec4 aTexCoord0;\n#endif\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\nattribute vec4 aPreHxyzLx;\nattribute vec4 aPreLyzNextHxy;\nattribute vec4 aNextHzLxyz;\nattribute vec4 aPreOrientation;\nattribute vec4 aNextOrientation;\nattribute vec4 aColorAndPickColor;\nattribute vec3 aPreHpr;\nattribute vec3 aNextHpr;\nattribute vec3 aScale;\n#include <SceneUboDecl>\nuniform vec3 uOffset;\nuniform mat4 uGeoMatrix;\nuniform float uInterval;\nuniform float uFilterMode;\nuniform float uMaxVisibleDistance;\nuniform float uFilterPixel;\nuniform float uRadius;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying vec3 vNormalEC;\nvarying mat4 vModelMatrix;\n\nvec4 vertexColor = vec4(1.0);\nvec4 quaternionfromAxisAngle(vec3 axis, float angle)\n{\n float halfAngle = angle * 0.5;\n float s = sin(halfAngle);\n vec3 fromAxis = normalize(axis);\n return vec4(fromAxis * s, cos(halfAngle));\n}\nvec4 quaternionMultiply(vec4 left, vec4 right)\n{\n float x = left.w * right.x + left.x * right.w + left.y * right.z - left.z * right.y;\n float y = left.w * right.y - left.x * right.z + left.y * right.w + left.z * right.x;\n float z = left.w * right.z + left.x * right.y - left.y * right.x + left.z * right.w;\n float w = left.w * right.w - left.x * right.x - left.y * right.y - left.z * right.z;\n return vec4(x, y, z, w);\n}\nmat4 rotationFromQuaternion(vec4 q)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvec4 lerp(vec4 start, vec4 end, float t)\n{\n vec4 tmp = end * t;\n vec4 result = start * (1.0 - t);\n return result + tmp;\n}\nvec4 slerp(vec4 start, vec4 end, float t)\n{\n float adot = dot(start, end);\n vec4 r = end;\n if(adot < 0.0){\n adot = -adot;\n r = end * -1.0;\n }\n if(1.0 - adot < 0.000001){\n return mix(start, r, t);\n }\n float theta = acos(adot);\n float angle = (1.0 - t) * theta;\n vec4 scaledP = start * sin(angle);\n vec4 scaledR = r * (sin(t * theta));\n vec4 result = scaledP + scaledR;\n return result * (1.0 / sin(theta));\n}\nfloat filterTest(vec3 rte, float radius)\n{\n if(uFilterMode > 0.0)\n {\n float distance = length(rte);\n float theta = czm_piOverFour * 0.5;\n float screenPix = max(czm_globeDepthTextureDim.x, czm_globeDepthTextureDim.y) * 0.5;\n float lamat = screenPix / tan(theta);\n return lamat * radius / distance > uFilterPixel ? 1.0 : 0.0;\n }\n return length(rte) < uMaxVisibleDistance ? 1.0 : 0.0;\n}\n\nvec4 translateRelativeToEye(vec3 high,vec3 low) {\n vec3 highDifference = high - czm_encodedOriginCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedOriginCameraPositionMCLow;\n return vec4(highDifference + lowDifference, 1.0);\n}\n\nvoid main()\n{\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n vec3 prePosHigh = aPreHxyzLx.xyz;\n vec3 prePosLow = vec3(aPreHxyzLx.w, aPreLyzNextHxy.xy);\n vec3 nextPosHigh = vec3(aPreLyzNextHxy.zw, aNextHzLxyz.x);\n vec3 nextPosLow = aNextHzLxyz.yzw;\n#ifdef TEXTURE\n vTexCoord = aTexCoord0.xy;\n#endif\n vec4 vertexPos = aPosition - vec4(uOffset.xyz,0.0);\n //vertexPos.xyz *= aScale;\n vec4 positionMC = uGeoMatrix * vertexPos;\n vec4 preRte = translateRelativeToEye(prePosHigh,prePosLow);\n vec4 nextRte = translateRelativeToEye(nextPosHigh,nextPosLow);\n vec4 rte = mix(preRte, nextRte, uInterval);\n float show = filterTest(rte.xyz, uRadius * aScale.x);\n vec3 hpr = mix(aPreHpr, aNextHpr, uInterval);\n vec4 rollQuaternion = quaternionfromAxisAngle(vec3(1.0, 0.0, 0.0), hpr.z);\n vec4 pitchQuaternion = quaternionfromAxisAngle(vec3(0.0, 1.0, 0.0), -hpr.y);\n vec4 headingQuaternion = quaternionfromAxisAngle(vec3(0.0, 0.0, 1.0), -hpr.x);\n vec4 q = quaternionMultiply(rollQuaternion, pitchQuaternion);\n q = quaternionMultiply(headingQuaternion, q);\n mat4 rotationMat = rotationFromQuaternion(q);\n vec4 orientation = slerp(aPreOrientation, aNextOrientation, uInterval);\n mat3 velocityMat = mat3(rotationFromQuaternion(orientation));\n mat3 rotationMatrix = velocityMat * mat3(rotationMat);\n mat4 scaleMatrix = mat4(aScale.x, 0, 0, 0, 0, aScale.y, 0, 0, 0, 0, aScale.z, 0, 0, 0, 0, 1);\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMatrix[0], 0.0);\n worldMatrix[1] = vec4(rotationMatrix[1], 0.0);\n worldMatrix[2] = vec4(rotationMatrix[2], 0.0);\n worldMatrix[3] = vec4(rte.xyz, 1.0);\n mat4 modelMatrix = worldMatrix * scaleMatrix;\n vModelMatrix = modelMatrix * uGeoMatrix;\n vertexPos = modelMatrix * positionMC;\n vertexPos.w = 1.0;\n vPositionMC.xyz = rotationMatrix * positionMC.xyz;\n vPositionMC.w = 0.0;\n vPositionEC = (czm_modelViewRelativeToEye * vec4(vPositionMC.xyz, 1.0)).xyz;\n gl_Position = show * czm_modelViewProjectionRelativeToEye * vertexPos;\n vec4 color, pickColor;\n color.xy = czm_decompressTextureCoordinates(aColorAndPickColor.x);\n color.zw = czm_decompressTextureCoordinates(aColorAndPickColor.y);\n pickColor.xy = czm_decompressTextureCoordinates(aColorAndPickColor.z);\n pickColor.zw = czm_decompressTextureCoordinates(aColorAndPickColor.w);\n vColor = vertexColor * color;\n#ifdef HAS_NORMAL\n if(length(aNormal) > 0.8)\n {\n vec3 normal = rotationMatrix * aNormal;\n mat4 realModelViewMatrix4 = czm_view * vModelMatrix;\n realModelViewMatrix4 = czm_inverseMatrix(realModelViewMatrix4);\n mat3 realModelViewMatrix3 = mat3(realModelViewMatrix4);\n realModelViewMatrix3 = czm_transpose(realModelViewMatrix3);\n vNormalEC = normalize(realModelViewMatrix3 * aNormal);\n vPositionMC.w = 1.0;\n }\n#endif\n vPickColor = pickColor;\n}",_0x407996=(_0x5cc700=!0,function(e,t){var i=_0x5cc700?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5cc700=!1,i}),_0x495901=_0x407996(void 0,(function(){return _0x495901.toString().search("(((.+)+)+)+$").toString().constructor(_0x495901).search("(((.+)+)+)+$")})),_0x5cc700;_0x495901();var _0x484b3b=34,_0x1083e3=new e$1U(.7,.7,1,1),_0x12dfba={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,READY:4,FAILED:5};function _0x75f8b5(e,t){LicenseChecker.LICENSECHECKER.verify("DynamicLayer3D"),o$1q.defined("context",e),o$1q.defined("context",t),Array.isArray(t)||(t=[t]),this._context=e,this._gl=e._gl,this._updateInterval=1e3,this._xmlParser=new s$S,this._visible=!0,this._type=bt$5.INSTANCED_LAYER,this._group={};for(var i=0,n=t.length;i<n;i++){var r=t[i];o$1q.typeOf.string("url",r),this._group[r]={url:r,ready:!1,visible:!0,pickEnable:!0,cullEnabled:!1,polygonOffset:{enabled:!1,factor:0,units:0},cullFace:G$17.BACK,loadState:_0x12dfba.UNLOAD,buffer:void 0,offset:new o$1p,radius:0,instanceCount:0,stateList:new e$1N,instanceList:new e$1N,removedList:new e$1N,renderEntities:[],boundingSphere:new i$1c,beginTime:-1,interval:0}}this._maxVisibleAltitude=Number.MAX_VALUE,this._maxVisibleDistance=Number.MAX_VALUE,this._filterMode=_0x2056d1.DISTANCE_FROM_EYE_POINT,this._filterPixel=0,this._enableLocalOffset=!0,this._visibleViewport=4095,null!==e.s3tc?this._supportCompressType=1:null!==e.pvrtc?this._supportCompressType=2:null!==e.etc1&&(this._supportCompressType=3),this._shadowType=_0x381f49.NONE,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:new o$1p,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}}}function _0x390edd(e){return e._shadowType==_0x381f49.SELECTION||e._shadowType==_0x381f49.ALL}function _0x5dcc75(e){e._times.length>3&&(e._times.splice(0,1),e._values.splice(0,e._packedLength))}function _0x5073bd(e,t,i){for(var n=0;n<e._times.length;n++){var r=a$15.addSeconds(t,n*i,new a$15);e._times[n]=r}}function _0x553650(e,t){for(var i=a$15.now(),n=0,r=e.stateList.length;n<r;n++){var o=e.stateList.values[n];_0x5073bd(o.position._property,i,t),_0x5073bd(o.heading,i,t),_0x5073bd(o.pitch,i,t),_0x5073bd(o.roll,i,t),_0x5073bd(o.scale,i,t),_0x5073bd(o.color,i,t)}}function _0x5102e5(e){var t={};return e$2b(e.a_position)&&(t.aPosition=e.a_position.index),e$2b(e.a_normal)&&(t.aNormal=e.a_normal.index),e$2b(e.a_vertexColor)&&(t.aColor=e.a_vertexColor.index),e$2b(e.a_texcoord_0)&&(t.aTexCoord0=e.a_texcoord_0.index),e$2b(e.a_texcoord0)&&(t.aTexCoord0=e.a_texcoord0.index),t}function _0x3d3dd5(e,t,i,n){var r=t.buffer;if(!e$2b(r)){var o=0===t.instanceCount?1:t.instanceCount,a=4*_0x484b3b*o;(r=t$Y.createVertexBuffer({context:e,sizeInBytes:a,usage:A$19.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,t.buffer=r}_0x147b34(r,i,n,Object.keys(i).length)}Object.defineProperties(_0x75f8b5.prototype,{updateInterval:{get:function(){return this._updateInterval},set:function(e){this._updateInterval=e}},group:{get:function(){return this._group}},visible:{get:function(){return this._visible},set:function(e){this._visible=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){!e$2b(e)||(this._maxVisibleAltitude=e)}},type:{get:function(){return this._type}},enableLocalOffset:{get:function(){return this._enableLocalOffset},set:function(e){this._enableLocalOffset=e}},maxVisibleDistance:{get:function(){return this._maxVisibleDistance},set:function(e){o$1q.typeOf.number("maxVisibleDistance",e),this._maxVisibleDistance=e}},filterMode:{get:function(){return this._filterMode},set:function(e){o$1q.typeOf.number("filterMode",e),this._filterMode=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){o$1q.typeOf.number("filterPixel",e),this._filterPixel=e}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}}}),_0x75f8b5.prototype.setPolygonOffset=function(e,t,i){o$1q.typeOf.string("dynamicLayer setPolygonoffset url",e),o$1q.typeOf.number("dynamicLayer setPolygonoffset factor",t),o$1q.typeOf.number("dynamicLayer setPolygonoffset units",i);var n=this._group[e];if(e$2b(n)&&(n.polygonOffset.factor!==t||n.polygonOffset.units!==i)&&(n.polygonOffset={enabled:!0,factor:u$_(t,0),units:u$_(i,0)},n.ready))for(var r=0,o=n.renderEntities.length;r<o;r++){var a=n.renderEntities[r].command,s=d$1m.getState(a.renderState);s.polygonOffset={enabled:!0,factor:u$_(t,0),units:u$_(i,0)},a.renderState=d$1m.fromCache(s)}},_0x75f8b5.prototype.update=function(e){if((LicenseChecker.LICENSECHECKER.verify("DynamicLayer3D"),this._visible)&&e._fboState.frameBufferType!==Qe$c.NORMAL_AND_DEPTH){var t=!0;if(e.multiViewportIndex>-1)t=this.getVisibleInViewport(e.multiViewportIndex);this._frameState=e,this._picking=e.passes.pick;var i=e.camera.positionCartographic.height<this._maxVisibleAltitude;for(var n in this._group)if(this._group.hasOwnProperty(n)){var r=this._group[n];if(r.ready){if(!r.visible||(this._picking||(_0x552ce8(e,this,r),_0x767c58(r,e)),r.instanceCount<1)||!i||!t)continue;for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s.meshUBO.update(this._context),s.materialUBO.update(this._context);var l=s.command;l.instanceCount=r.instanceCount,l.boundingVolume=r.boundingSphere,e.commandList.push(l)}}else _0x21c36f(e,this,n)}}},_0x75f8b5.prototype.setCullEnabled=function(e,t){o$1q.typeOf.string("dynamicLayer setCullEnabled url",e),t=u$_(t,G$17.BACK);var i=this._group[e];if(e$2b(i)&&(!i.cullEnabled||i.cullFace!==t)&&(i.cullEnabled=!0,i.cullFace=t,i.ready))for(var n=0,r=i.renderEntities.length;n<r;n++){var o=i.renderEntities[n].command,a=d$1m.getState(o.renderState);a.cull.enabled=!0,a.cull.face=t,o.renderState=d$1m.fromCache(a)}},_0x75f8b5.prototype.getCullEnabled=function(e){o$1q.typeOf.string("dynamicLayer getCullEnabled url",e);var t=this._group[e];if(e$2b(t))return t.cullEnabled},_0x75f8b5.prototype.clear=function(e,t){t$12("DynamicLayer3D.prototype.clear","clear() will be deprecated, please use clearState()"),this.clearState(e,t)},_0x75f8b5.prototype.clearAll=function(){t$12("DynamicLayer3D.prototype.clearAll","clearAll() will be deprecated, please use clearAllState()"),this.clearAllState()},_0x75f8b5.prototype.clearAllState=function(){for(var e in this._group)this._group.hasOwnProperty(e)&&(this._group[e].stateList.removeAll(),this._group[e].instanceList.removeAll(),_0x2f5575(this,this._group[e]))},_0x75f8b5.prototype.clearState=function(e,t){o$1q.typeOf.string("dynamicLayer3D.clear url",e),o$1q.defined("dynamicLayer3D.clear ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(e$2b(i)){var n=i.stateList,r=i.instanceList;if(e$2b(n)&&e$2b(r)){for(var o,a=0,s=t.length;a<s;a++)o=t[a],n.contains(o)&&n.remove(o),r.contains(o)&&r.remove(o);_0x2f5575(this,i)}}},_0x75f8b5.prototype.deleteObjects=function(e,t){o$1q.typeOf.string("dynamicLayer3D.delete url",e),o$1q.defined("dynamicLayer3D.delete ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(e$2b(i)){var n=i.instanceList,r=i.removedList,o=i.stateList;if(e$2b(n)&&e$2b(r)&&e$2b(o)){for(var a,s=0,l=t.length;s<l;s++)a=t[s],o.remove(a),n.contains(a)&&(n.remove(a),r.set(a,!0));_0x2f5575(this,i)}}},_0x75f8b5.prototype.deleteAllObjects=function(){for(var e in this._group)if(this._group.hasOwnProperty(e)){for(var t=this._group[e],i=t.instanceList,n=Object.keys(i._hash),r=n.length;r--;)t.removedList.set(n[r],!0);i.removeAll(),t.stateList.removeAll(),_0x2f5575(this,t)}},_0x75f8b5.prototype._updateShadow=function(e){var t=_0x390edd(e),i=e._group;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s.command.castShadows=t,s.command.receiveShadows=t}}},_0x75f8b5.prototype.setVisibleByUrl=function(e,t){var i=this._group[e];e$2b(i)&&(i.visible=t)},_0x75f8b5.prototype.setPickEnable=function(e,t){this._group[e].pickEnable=t},_0x75f8b5.prototype.updateObjectWithModel=function(e,t){if(o$1q.typeOf.string("url",e),Array.isArray(t)){var i=this._group[e];if(e$2b(i)){e$2b(i.stateList)||(i.stateList=new e$1N);for(var n,r=0,o=t.length;r<o;r++)if((n=t[r])instanceof _0x2b82d9){var a=n.id;if(i.removedList.contains(a))continue;var s=i.stateList.get(a);e$2b(s)||(i.offset=o$1p.clone(n.offset,i.offset),i.stateList.set(a,{position:new o$y,scale:new g$x(o$1p),heading:new g$x(Number),pitch:new g$x(Number),roll:new g$x(Number),color:new g$x(e$1U),offset:n.offset,description:n.description,lockOrientation:n.lockOrientation,id:a}),(s=i.stateList.get(a)).position.setInterpolationOptions({interpolationDegree:10}),s.position.backwardExtrapolationType=_0x346789.HOLD,s.position.forwardExtrapolationType=_0x346789.HOLD,s.scale.backwardExtrapolationType=_0x346789.HOLD,s.scale.forwardExtrapolationType=_0x346789.HOLD,s.heading.backwardExtrapolationType=_0x346789.HOLD,s.heading.forwardExtrapolationType=_0x346789.HOLD,s.pitch.backwardExtrapolationType=_0x346789.HOLD,s.pitch.forwardExtrapolationType=_0x346789.HOLD,s.roll.backwardExtrapolationType=_0x346789.HOLD,s.roll.forwardExtrapolationType=_0x346789.HOLD,s.color.backwardExtrapolationType=_0x346789.HOLD,s.color.forwardExtrapolationType=_0x346789.HOLD,s.startDirection=n.startDirection);var l=a$15.now(),u=o$1p.fromDegrees(n.longitude,n.latitude,n.altitude);_0x5dcc75(s.position._property),_0x5dcc75(s.heading),_0x5dcc75(s.pitch),_0x5dcc75(s.roll),_0x5dcc75(s.scale),_0x5dcc75(s.color),s.position.addSample(l,u),s.heading.addSample(l,n.heading),s.pitch.addSample(l,n.pitch),s.roll.addSample(l,n.roll),s.scale.addSample(l,n.scale),s.color.addSample(l,n.color),s.lockOrientation=n.lockOrientation}}}},_0x75f8b5.prototype.setUnSelected=function(){var e=this._group;if(e$2b(e))for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];if(!e$2b(i.instanceList)||i.instanceCount<1||!i.pickEnable)continue;for(var n=i.instanceList,r=0;r<n.length;r++){var o=n.values[r];e$2b(o)&&o.setUnSelected()}}},_0x75f8b5.prototype.getVisibleInViewport=function(e){return!(e>8)&&1<<e&this._visibleViewport},_0x75f8b5.prototype.setVisibleInViewport=function(e,t){e>8||(this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport)};var _0x195f0c=new e$29(1,1,1,1);function _0x5d04ef(e,t,i){i.localMatrix=i.modelMatrix.clone();var n=i.uniformMap,r={uInterval:function(){return e.interval},uAmbientColor:function(){return _0x195f0c},uDiffuseColor:function(){return _0x195f0c},uSpecularColor:function(){return _0x195f0c},uShininess:function(){return 1},uPicking:function(){return t._picking},uGeoMatrix:function(){return i.localMatrix},uFilterMode:function(){return t.filterMode},uMaxVisibleDistance:function(){return t.maxVisibleDistance},uFilterPixel:function(){return t.filterPixel},uRadius:function(){return i.boundingVolume.radius},uOffset:function(){return e.offset}};return e$2b(n.u_baseColorTexture)?r.uTexture=n.u_baseColorTexture:e$2b(n.u_diffuse)&&(r.uTexture=n.u_diffuse),e$2b(n.u_specular)&&(r.uSpecularColor=n.u_specular),e$2b(n.u_shininess)&&(r.uShininess=n.u_shininess),r}function _0x767c58(e,t){if(e$2b(e.model)){e.boundingSphere=e.boundingSphere.clone(),e.model.updateAnimation(t);for(var i=e.model._nodeCommands,n=i.length,r=0;r<n;++r){var o=i[r].command;o.localMatrix=o.modelMatrix,o.modelMatrix=p$1d.IDENTITY.clone()}}}function _0x42891b(e,t){for(var i=t._context,n=e.model._nodeCommands,r=n.length,o=[],a=0;a<r;++a){var s=n[a].command;t._shadowType==_0x381f49.ALL||t._shadowType==_0x381f49.SELECTION?(s.castShadows=!0,s.receiveShadows=!0):(s.castShadows=!1,s.receiveShadows=!1),s.pickId="vPickColor",s.instanceCount=e.instanceCount,s.pass=Le$s.S3MTiles+2,s.renderState=_0x262914(e);var l=s.vertexArray,u=l._attributes,c=l.indexBuffer;if(u.length<9){var h=_0x5102e5(s.shaderProgram.vertexAttributes);_0x3d3dd5(i,e,h,u),s.vertexArray=new c$12({context:i,attributes:u,indexBuffer:c})}var d=new s$U({name:"DynamicLayerVertex",sources:[_0x46b7bc]}),f=new s$U({name:"S3ModelFP",sources:[_0x451393]});e$2b(h.aColor)&&d.defines.push("VertexColor"),e$2b(h.aNormal)&&(d.defines.push(Y$H.HAS_NORMAL),f.defines.push(Y$H.HAS_NORMAL)),e$2b(h.aTexCoord0)&&(d.defines.push("TEXTURE"),f.defines.push("TEXTURE"));const r=t._frameState.lightSource;if(e$2b(r))f.defines.push("MAX_POINT_LIGHT_COUNT "+s$I.MaxPointLightCount),f.defines.push("MAX_SPOT_LIGHT_COUNT "+s$I.MaxSpotLightCount),f.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$I.MaxDirectionLightCount),r.directionalLight.length>0&&f.defines.push(Y$H.HAS_DIR_LIGHTS),r._visibleLightList[_0x1d9df9.POINT].length>0&&f.defines.push(Y$H.HAS_POINT_LIGHTS),r._visibleLightList[_0x1d9df9.SPOT].length>0&&f.defines.push(Y$H.HAS_SPOT_LIGHTS),r.hemisphereLight.length>0&&f.defines.push(Y$H.HAS_HEMISPHERE_LIGHTS);s.shaderProgram=r$13.fromCache({context:i,vertexShaderSource:d,fragmentShaderSource:f,attributeLocations:h});var p=_0x5d04ef(e,t,s);p=p$19(p,t._frameState.lightSource.createUniformMap()),s.uniformMap=p,s.modelMatrix=p$1d.IDENTITY.clone(),e.renderEntities.push({command:s,attributes:u,indexBuffer:c}),o.push(s.boundingVolume)}var _=new i$1c;i$1c.fromBoundingSpheres(o,_),e.oriBoundingSphere=_}function _0x21c36f(e,t,i){var n=t._group[i],r=n.loadState;if(i.indexOf(".gltf")>0||i.indexOf(".glb")>0)_0x12dfba.UNLOAD==r&&(e$2b(n.model)||(n.model=F$C.fromGltf({url:i,incrementallyLoadTextures:!1})),n.model.update(e),n.model.ready&&(n.ready=!0,n.loadState=_0x12dfba.READY,_0x553650(n,t.updateInterval/1e3),_0x42891b(n,t),n.model.activeAnimations.addAll({loop:_0x157d80.REPEAT})));else{var o=i.indexOf(".s3mb")>-1;if(_0x12dfba.UNLOAD==r){var a=o$N(i,(function(e){return o$10(e)}));e$2b(a)?(n.loadState=_0x12dfba.LOADING,a.then((function(e){n.loadState=_0x12dfba.LOADED,n.contentBuffer=e}),(function(e){e$2b(e)?n.loadState=_0x12dfba.FAILED:n.loadState=_0x12dfba.UNLOAD}))):n.loadState=_0x12dfba.UNLOAD}_0x12dfba.LOADED===r&&(o?_0x2aca63(t,n):_0x93dec5(t,n))}}function _0x552ce8(e,t,i){if(!(i.stateList.length<1)){var n=t._context,r=!1;i.beginTime<0&&(r=!0,i.beginTime=window.performance.now());var o=Et$a()-i.beginTime,a=t._updateInterval;if(i.interval=o/a,i.interval=e$2a.clamp(i.interval,0,1),r||o>=a){i.interval=0;var s=a$15.now();o=a$15.addSeconds(s,-t._updateInterval/1e3,new a$15);i.beginTime=window.performance.now();for(var l,u=i.stateList,c=[],h=0;h<u.length;h++){var d=u.values[h];l=d.id;var f=i.instanceList.get(l);if(i.removedList.contains(l))return;e$2b(f)||(i.instanceList.set(l,new _0x40158e(n,d,i,l)),f=i.instanceList.get(l)),f.update(e,d,o,c)}if(c.length>0){var p=i$1c.fromBoundingSpheres(c,new i$1c);i$1c.clone(p,i.boundingSphere)}i.instanceCount=c.length,_0x2f5575(t,i)}}}function _0x2f5575(e,t){var i=t.instanceCount;if(!(i<1)){var n=_0x484b3b*i,r=t.buffer,o=e._context,a=S$12.getSizeInBytes(S$12.FLOAT);if(r.sizeInBytes/(a*_0x484b3b)<i){t.buffer&&t.buffer.destroy(),(r=t$Y.createVertexBuffer({context:o,sizeInBytes:n*a,usage:A$19.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,t.buffer=r;for(var s=0,l=t.renderEntities.length;s<l;s++){var u=t.renderEntities[s],c=u.command;if(e$2b(c)){c.vertexArray.isDestroyed()||c.vertexArray.destroy();for(var h=0;h<u.attributes.length;h++){var d=u.attributes[h];e$2b(d.instanceDivisor)&&d.instanceDivisor>0&&(d.vertexBuffer=t.buffer)}c.vertexArray=new c$12({context:o,attributes:u.attributes,indexBuffer:u.indexBuffer})}}}var f=new Float32Array(n),p=t.instanceList,_=0;for(s=0,l=p.length;s<l;s++){var m=p.values[s];if(e$2b(m)&&m._ready){m._index=_;var g=i$11.fromCartesian(m._prePosition),x=g.high,v=g.low,y=i$11.fromCartesian(m._nextPosition),$=y.high,b=y.low,T=m._preOrientation,C=m._nextOrientation,S=m._pickColor,w=m._color,E=m._scale,P=m._preHpr,A=m._nextHpr,L=new e$1U;L.red=t$10.compressTextureCoordinates({x:w.red,y:w.green}),L.green=t$10.compressTextureCoordinates({x:w.blue,y:w.alpha}),L.blue=t$10.compressTextureCoordinates({x:S.red,y:S.green}),L.alpha=t$10.compressTextureCoordinates({x:S.blue,y:S.alpha}),_0x5194c2(f,_,x,v,$,b,T,C,L,P,A,E),_++}}r.copyFromArrayView(f,0)}}function _0x5194c2(e,t,i,n,r,o,a,s,l,u,c,h){var d=0;e[(t*=_0x484b3b)+d++]=i.x,e[t+d++]=i.y,e[t+d++]=i.z,e[t+d++]=n.x,e[t+d++]=n.y,e[t+d++]=n.z,e[t+d++]=r.x,e[t+d++]=r.y,e[t+d++]=r.z,e[t+d++]=o.x,e[t+d++]=o.y,e[t+d++]=o.z,e[t+d++]=a.x,e[t+d++]=a.y,e[t+d++]=a.z,e[t+d++]=a.w,e[t+d++]=s.x,e[t+d++]=s.y,e[t+d++]=s.z,e[t+d++]=s.w,e[t+d++]=l.red,e[t+d++]=l.green,e[t+d++]=l.blue,e[t+d++]=l.alpha,e[t+d++]=u.heading,e[t+d++]=u.pitch,e[t+d++]=u.roll,e[t+d++]=c.heading,e[t+d++]=c.pitch,e[t+d++]=c.roll,e[t+d++]=h.x,e[t+d++]=h.y,e[t+d++]=h.z}var _0x16620d=new n$13,_0x1000d7=new o$1p;function _0x40158e(e,t,i,n){this.type=bt$5.INSTANCED_OBJECT,this._ownerGroup=i,this._id=n,this._index=-1,this._description=t.description;var r=t.position.getValue(0);e$2b(r)||(r=new o$1p),this._scale=o$1p.clone(t.scale.getValue(0));var o=o$1p.maximumComponent(this._scale);this._offset=t.offset,this._lockOrientation=t.lockOrientation,this._preOrientation=new n$13,this._nextOrientation=new n$13,this._orientation=void 0,this._velocityOrientation=new e$v(t.position);var a=m$17.headingPitchRollToFixedFrame(r,new i$15(t.startDirection,0,0),t$13.WGS84,m$17.eastNorthUpToFixedFrame,new p$1d),s=p$1d.getRotation(a,new p$1e),l=n$13.fromRotationMatrix(s);n$13.clone(l,this._preOrientation),n$13.clone(this._preOrientation,this._nextOrientation);var u=o$1p.multiplyByScalar(this._offset,o,new o$1p);this._prePosition=p$1d.multiplyByPoint(a,u,new o$1p),this._nextPosition=o$1p.clone(this._prePosition);var c=t.heading.getValue(0),h=t.pitch.getValue(0),d=t.roll.getValue(0);this._preHpr=new i$15(c,h,d),this._nextHpr=i$15.clone(this._preHpr),this._dynamicColor=t.color.getValue(0);var f=i.oriBoundingSphere.radius*o;this._boundingSphere=new i$1c(this._prePosition,f);var p={id:n,primitive:this},_=e.createPickId(p);this._pickColor=_.color,this._selColor=new e$1U,this._color=e$1U.multiply(this._dynamicColor,this._selColor,new e$1U),this._isSelected=!1,this._ready=!1}function _0x93dec5(e,t){var i=t.contentBuffer;if(e$2b(i)){var n={buffer:i,supportCompressType:e._supportCompressType},r=_0x46a73d.S3MTaskProcessor.scheduleTask(n,[i]);e$2b(r)?(t.contentBuffer=void 0,t._loadState=_0x12dfba.PARSING,r.then((function(i){if(i.result){e._gl;for(var n=e._xmlParser.read(i.xmlDoc).firstChild,r=n.namespaceURI,o=s$S.queryFirstNode(n,"Material3Ds",r),a=s$S.queryChildNodes(o,"material",r),s={},l=e._context,u=0,c=a.length;u<c;u++){var h=a[u],d=s$S.queryStringValue(h,"name",r),f=new _0x21d1b1({});s[d]=f;var p=s$S.queryFirstNode(h,"Ambient",r),_=s$S.queryNumericValue(p,"AmbientR",r),m=s$S.queryNumericValue(p,"AmbientG",r),g=s$S.queryNumericValue(p,"AmbientB",r),x=s$S.queryNumericValue(p,"AmbientA",r);f._ambientColor=new e$1U(_,m,g,x);var v=s$S.queryFirstNode(h,"Diffuse",r);_=s$S.queryNumericValue(v,"DiffuseR",r),m=s$S.queryNumericValue(v,"DiffuseG",r),g=s$S.queryNumericValue(v,"DiffuseB",r),x=s$S.queryNumericValue(v,"DiffuseA",r),f._diffuseColor=new e$1U(_,m,g,x);var y=s$S.queryFirstNode(h,"Specular",r);_=s$S.queryNumericValue(y,"SpecularR",r),m=s$S.queryNumericValue(y,"SpecularG",r),g=s$S.queryNumericValue(y,"SpecularB",r),x=s$S.queryNumericValue(y,"SpecularA",r),f._specularColor=new e$1U(_,m,g,x);var $=s$S.queryNumericValue(h,"Shininess",r);f._shininess=$,s$S.queryFirstNode(h,"TransparentSorting",r),f._bTransparentSorting=s$S.queryBooleanValue(h,"TransparentSorting",r);var b=s$S.queryFirstNode(h,"texture",r),T=s$S.queryStringValue(b,"name",r),C=s$S.queryFirstNode(b,"AddressMode",r),S=s$S.queryStringValue(C,"u",r),w=s$S.queryStringValue(C,"v",r);S="TAM_WRAP"===S?q$19.REPEAT:q$19.CLAMP_TO_EDGE,w="TAM_WRAP"===w?q$19.REPEAT:q$19.CLAMP_TO_EDGE;var E=i.texturePackage[T];if(e$2b(E)){var P=Se$d.CreateTexture(T,l,E.width,E.height,E.nFormat,E.compressType,E.imageBuffer,!1,S,w);f._textures.push(P),0===E.compressType&&(e._supportCompressType=0)}}var A=s$S.queryFirstNode(n,"PageLods",r),L=s$S.queryNodes(A,"Geode",r);for(u=0,c=L.length;u<c;u++){for(var M=L[u],R=s$S.queryStringValue(M,"GeoDeModMatrix",r).split(","),O=0;O<16;O++)R[O]=parseFloat(R[O]);if(R=p$1d.unpack(R,0),t.enableOffset){var I=p$1d.fromTranslation(new o$1p(0,0,-690));R=p$1d.multiplyTransformation(R,I,new p$1d)}for(var D=s$S.queryNodes(M,"GeoName",r),B=[],N=0,F=D.length;N<F;N++){var U=D[N].textContent.trim();B.push(U)}for(var G=[],z=new i$1c,V=0;V<B.length;V++){var k=_0x4c228b(H=(W=i.geoPackage[B[V]]).vertexPackage,R);G.push(k)}G.length>0&&(i$1c.fromBoundingSpheres(G,z),t.oriBoundingSphere=z,G.length=0);for(F=0;F<B.length;F++){var W,H=(W=i.geoPackage[B[F]]).vertexPackage,q=W.arrIndexPackage,j={};for(var Y in q){var X=q[Y];if(e$2b(X)){f=s[d=X.materialCode];j[d]=f}}e.enableLocalOffset||(R=p$1d.IDENTITY),_0x6322c6(e,t,H,q,z,j,R)}t.boundingSphere=i$1c.clone(z)}t.ready=!0,t.loadState=_0x12dfba.READY,_0x553650(t,e.updateInterval/1e3)}else t._loadState=_0x12dfba.UNLOAD}))):t._loadState=_0x12dfba.LOADED}else t._loadState=_0x12dfba.FAILED}function _0x2aca63(e,t){var i=t.contentBuffer;if(e$2b(i)){if(_0x46a73d.init||_0x46a73d.initWebAssembly(),_0x46a73d.taskProcessorReady){var n=_0x46a73d.S3MBTaskProcessor.scheduleTask({buffer:i,supportCompressType:e._supportCompressType},[i]);if(!e$2b(n))return void(t._loadState=_0x12dfba.LOADED);t.contentBuffer=void 0,t._loadState=_0x12dfba.PARSING,n.then((function(i){if(i.result){for(var n=e._context,r={},o=0,a=i.matrials.material.length;o<a;o++){var s=i.matrials.material[o].material,l=s.id,u=new _0x21d1b1({});r[l]=u,u.createCommonParamter(s),u.createPBRParamter(s);for(var c=s.textureunitstates,h=0;h<c.length;h++){var d=c[h].textureunitstate,f=d.id,p=0===d.addressmode.u?q$19.REPEAT:q$19.CLAMP_TO_EDGE,_=0===d.addressmode.v?q$19.REPEAT:q$19.CLAMP_TO_EDGE;u._texMatrix=p$1d.unpack(d.texmodmatrix);var m=i.texturePackage[f];if(e$2b(m)&&m.width>0&&m.height>0&&m.imageBuffer.length>0){var g=Se$d.CreateTexture(f,n,m.width,m.height,m.nFormat,m.compressType,m.imageBuffer,!1,p,_),x=f.indexOf("PBRMaterialParam")>-1,v=u._emissiveTextureIndex===h,y=u._normalTextureIndex===h,$=u._metallicRoughnessTextureIndex===h,b=u._occlusionTextureIndex===h;x?(u._usePBRTextureBatch=!0,u.pbrParamTexture=g):v?u.emissiveTexture=g:y?u.normalTexture=g:$?u.metallicRoughnessTexture=g:b?u.occlusionTexture=g:u._textures.push(g),0===m.compressType&&(e._supportCompressType=0)}}}var T=i.groupNode.pageLods;if(e$2b(T))for(o=0,a=T.length;o<a;o++){for(var C=T[o].geodes[0],S=C.matrix,w=0;w<16;w++)S[w]=parseFloat(S[w]);if(S=p$1d.unpack(S,0),t.enableOffset){var E=p$1d.fromTranslation(new o$1p(0,0,-690));S=p$1d.multiplyTransformation(S,E,new p$1d)}for(var P=C.skeletonNames,A=[],L=0,M=P.length;L<M;L++){var R=P[L].trim();A.push(R)}var O=[],I=new i$1c;for(h=0;h<A.length;h++){var D=_0x4c228b(N=(B=i.geoPackage[A[h]]).vertexPackage,S);O.push(D)}O.length>0&&(i$1c.fromBoundingSpheres(O,I),t.oriBoundingSphere=I,O.length=0);for(L=0,M=A.length;L<M;L++){R=A[L];var B,N=(B=i.geoPackage[R]).vertexPackage,F=B.arrIndexPackage,U=F[0];if(e$2b(U)){var G={};u=r[l=U.materialCode];G[l]=u,e.enableLocalOffset||(S=p$1d.IDENTITY),_0x6322c6(e,t,N,F,I,G,S)}}t.boundingSphere=i$1c.clone(I)}t.ready=!0,t.loadState=_0x12dfba.READY,_0x553650(t,e.updateInterval/1e3)}else t._loadState=_0x12dfba.UNLOAD}))}}else t._loadState=_0x12dfba.FAILED}function _0x4c228b(e,t){for(var i=[],n=new i$1c,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1c.fromPoints(i,n),i.length=0,i$1c.transform(n,t,n),n}function _0x262914(e){return d$1m.fromCache({cull:{enabled:e.cullEnabled,face:e.cullFace},polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND})}function _0x5af9d1(e,t,i){for(var n=i.vertexAttributes,r=0,o=n.length;r<o;r++){var a=n[r];!e$2b(a.typedArray)||(a.vertexBuffer=t$Y.createVertexBuffer({context:t,typedArray:a.typedArray,usage:A$19.STATIC_DRAW}),a.vertexBuffer.vertexArrayDestroyable=!1,a.typedArray=null,delete a.typedArray)}var s=i.attrLocation,l=Object.keys(s).length,u=e.buffer;if(!e$2b(u)){var c=0===e.instanceCount?1:e.instanceCount,h=4*_0x484b3b*c;(u=t$Y.createVertexBuffer({context:t,sizeInBytes:h,usage:A$19.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,e.buffer=u}for(var d in _0x147b34(u,s,n,l),s){n[l=s[d]].name=d}return{attributes:n,attrLocation:s}}function _0x147b34(e,t,i,n){var r=n,o=0,a=S$12.getSizeInBytes(S$12.FLOAT);t.aPreHxyzLx=r++,i.push({index:t.aPreHxyzLx,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=4*a,t.aPreLyzNextHxy=r++,i.push({index:t.aPreLyzNextHxy,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=4*a,t.aNextHzLxyz=r++,i.push({index:t.aNextHzLxyz,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=4*a,t.aPreOrientation=r++,i.push({index:t.aPreOrientation,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=4*a,t.aNextOrientation=r++,i.push({index:t.aNextOrientation,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=4*a,t.aColorAndPickColor=r++,i.push({index:t.aColorAndPickColor,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=4*a,t.aPreHpr=r++,i.push({index:t.aPreHpr,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=3*a,t.aNextHpr=r++,i.push({index:t.aNextHpr,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=3*a,t.aScale=r++,i.push({index:t.aScale,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x484b3b,instanceDivisor:1}),o+=3*a}function _0x6322c6(e,t,i,n,r,o,a){var s=e._context,l=_0x5af9d1(t,s,i),u=l.attributes,c=l.attrLocation,h=Le$s.S3MTiles+2,d=_0x262914(t),f=i.verticesCount,p=n[0];if(!e$2b(p))return;var _=ce$x.UNSIGNED_SHORT;(1===p.indexType||f>=e$2a.SIXTY_FOUR_KILOBYTES)&&s.elementIndexUint&&(_=ce$x.UNSIGNED_INT);var m=t$Y.createIndexBuffer({context:s,typedArray:p.indicesTypedArray,usage:A$19.STATIC_DRAW,indexDatatype:_});m.vertexArrayDestroyable=!1;var g=o[p.materialCode]||_0x21d1b1.Default,x=new i$_({primitiveType:W$18.TRIANGLES,boundingVolume:r,pass:h,owner:e});e._shadowType===_0x381f49.ALL||e._shadowType===_0x381f49.SELECTION?(x.castShadows=!0,x.receiveShadows=!0):(x.castShadows=!1,x.receiveShadows=!1),x.pickId="vPickColor",x.instanceCount=t.instanceCount,x.vertexArray=new c$12({context:s,attributes:u,indexBuffer:m});var v=new s$U({name:"DynamicLayerVertex",sources:[_0x46b7bc]}),y=new s$U({name:"S3ModelFP",sources:[_0x451393]}),$=e$2b(c.aTexCoord0)&&g._textures.length>0;0===e._supportCompressType&&y.defines.push("FLIP_Y"),e$2b(c.aColor)&&v.defines.push("VertexColor"),e$2b(c.aNormal)&&(v.defines.push(Y$H.HAS_NORMAL),y.defines.push(Y$H.HAS_NORMAL)),$&&(v.defines.push("TEXTURE"),y.defines.push("TEXTURE"));const b=e._frameState.lightSource;e$2b(b)&&(y.defines.push("MAX_POINT_LIGHT_COUNT "+s$I.MaxPointLightCount),y.defines.push("MAX_SPOT_LIGHT_COUNT "+s$I.MaxSpotLightCount),y.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$I.MaxDirectionLightCount),b.directionalLight.length>0&&y.defines.push(Y$H.HAS_DIR_LIGHTS),b._visibleLightList[_0x1d9df9.POINT].length>0&&y.defines.push(Y$H.HAS_POINT_LIGHTS),b._visibleLightList[_0x1d9df9.SPOT].length>0&&y.defines.push(Y$H.HAS_SPOT_LIGHTS),b.hemisphereLight.length>0&&y.defines.push(Y$H.HAS_HEMISPHERE_LIGHTS));var T=t.url;(g._usePBR||e$2b(e._PBRMaterialParams[T])&&e._PBRMaterialParams[T].roughness>0)&&(y.defines.push(Y$H.BRDF),(g.baseColorTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T].baseColorTextureIndex>-1&&e$2b(e._PBRMaterialParams[T].baseTexture))&&y.defines.push(Y$H.HAS_BASE_TEXTURE),(g.uNormalTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T].normalTextureIndex>-1&&e$2b(e._PBRMaterialParams[T].normalTexture))&&y.defines.push(Y$H.HAS_NORMAL_TEXTURE),(g.emissiveTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T].emissionTextureIndex>-1)&&y.defines.push(Y$H.HAS_EMISSIVE_TEXTURE),(g.metallicRoughnessTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T]._metallicRoughnessTextureIndex>-1)&&y.defines.push(Y$H.HAS_MetallicRoughness_TEXTURE),(g.occlusionTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T]._occlusionTextureIndex>-1)&&y.defines.push(Y$H.HAS_OCCLUSION_TEXTURE),(e$2b(e._frameState.specularEnvironmentMaps)||e$2b(e._frameState.hdrEnvMap))&&(y.defines.push(Y$H.IBL),e$2b(e._frameState.specularEnvironmentMaps)&&y.defines.push(Y$H.KtxEnvMap)),e$2b(g._alphaMode)&&g._alphaMode===_0x5f0e97.MASK&&y.defines.push(Y$H.MASK)),g.appendPBRMacroToShader(v,y),x.shaderProgram=r$13.fromCache({context:s,vertexShaderSource:v,fragmentShaderSource:y,attributeLocations:c});var C=g._diffuseColor,S=g._diffuseColor,w=g._specularColor,E=g._shininess,P=e$2b(c.aNormal),A=r.radius,L={uTexture:function(){return g._textures[0]},uInterval:function(){return t.interval},uAmbientColor:function(){return C},uDiffuseColor:function(){return S},uSpecularColor:function(){return w},uShininess:function(){return E},uPicking:function(){return e._picking},uHasNormal:function(){return P},uGeoMatrix:function(){return a},uFilterMode:function(){return e.filterMode},uMaxVisibleDistance:function(){return e.maxVisibleDistance},uFilterPixel:function(){return e.filterPixel},uRadius:function(){return A},uOffset:function(){return t.offset},uBaseColorFactor:function(){return e$2b(g._baseColor)?g._baseColor:e._PBRMaterialParams[T].baseColorFactor},uBaseColorTextureIndex:function(){return g._baseColorTextureIndex>-1?g._baseColorTextureIndex:e._PBRMaterialParams[T].baseColorTextureIndex},uMetallicFactor:function(){return e$2b(g._metallicFactor)?g._metallicFactor:e._PBRMaterialParams[T].metallic},uRoughnessFactor:function(){return e$2b(g._roughnessFactor)?g._roughnessFactor:e._PBRMaterialParams[T].roughness},uEmissiveFactor:function(){return e$2b(g._emissiveFactor)?g._emissiveFactor:e._PBRMaterialParams[T].emissionFactor},uEmissionTexture:function(){return e$2b(g.emissiveTexture)&&g._emissiveTextureIndex>-1?g.emissiveTexture:e._PBRMaterialParams[T].emissiveTexture},uEmissiveUVOffsetAndTiling:function(){var e=g._emissiveTextureMotion,t=new e$29,i=performance.now()/1e3;if(e._offsetPeriod>0){var n=i%e._offsetPeriod;t.x=n*e._offsetSpeedU,t.y=n*e._offsetSpeedV}else t.x=0,t.y=0;if(e._tilingPeriod>0){var r=i%e._tilingPeriod;t.z=1+r*e._tilingSpeedU,t.w=1+r*e._tilingSpeedV}else t.z=1,t.w=1;return t},uBaseTexture:function(){return e$2b(g.baseColorTexture)&&g._baseColorTextureIndex>-1?g.baseColorTexture:e._PBRMaterialParams[T].baseTexture},uNormalTexture:function(){return e$2b(g.normalTexture)&&g._normalTextureIndex>-1?g.normalTexture:e._PBRMaterialParams[T].normalTexture},uMetallicRoughnessTexture:function(){return e$2b(g.metallicRoughnessTexture)&&g._metallicRoughnessTextureIndex>-1?g.metallicRoughnessTexture:e._PBRMaterialParams[T].metallicRoughnessTexture},uOcclusionTexture:function(){return e$2b(g.occlusionTexture)&&g._occlusionTextureIndex>-1?g.occlusionTexture:e._PBRMaterialParams[T].occlusionTexture}};L=p$19(L,g.createPBRUniformMap()),L=p$19(L,e._frameState.lightSource.createUniformMap()),x.uniformMap=L,x.renderState=d;var M={command:x,attributes:u,indexBuffer:m};M._layer=e;var R=new _0x4db383(M),O=new _0xfa6ee5(M,g,e);M.meshUBO=R,M.materialUBO=O,x.addUniformBuffer(s.uniformState._sceneUBO),x.addUniformBuffer(s.uniformState._lightUBO),x.addUniformBuffer(R),x.addUniformBuffer(O),t.renderEntities.push(M)}_0x40158e.prototype.setSelected=function(){var e=this._index;if(e$2b(e)&&this._ownerGroup.pickEnable&&!(e<0)&&(o$1q.typeOf.number.greaterThanOrEquals("offset",e,0),!e$1U.equals(this._selColor,_0x1083e3))){this._selColor=e$1U.clone(_0x1083e3),this._color=e$1U.multiply(this._selColor,this._dynamicColor,this._color);var t=new e$1U;t.red=t$10.compressTextureCoordinates({x:this._color.red,y:this._color.green}),t.green=t$10.compressTextureCoordinates({x:this._color.blue,y:this._color.alpha}),t.blue=t$10.compressTextureCoordinates({x:this._pickColor.red,y:this._pickColor.green}),t.alpha=t$10.compressTextureCoordinates({x:this._pickColor.blue,y:this._pickColor.alpha});var i=this._ownerGroup.renderEntities;if(e$2b(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n].command,a=o.shaderProgram.vertexAttributes.aColorAndPickColor.index,s=o.vertexArray.getAttribute(a),l=e*s.strideInBytes+s.offsetInBytes,u=S$12.createTypedArray(s.componentDatatype,s.componentsPerAttribute);u[0]=t.red,u[1]=t.green,u[2]=t.blue,u[3]=t.alpha,s.vertexBuffer.copyFromArrayView(u,l)}this._isSelected=!0}}},_0x40158e.prototype.setUnSelected=function(){var e=this._index;if(e$2b(e)&&this._ownerGroup.pickEnable&&!(e<0)&&this._isSelected){this._isSelected=!1,this._selColor=e$1U.WHITE,this._color=e$1U.clone(this._dynamicColor);var t=new e$1U;t.red=t$10.compressTextureCoordinates({x:this._color.red,y:this._color.green}),t.green=t$10.compressTextureCoordinates({x:this._color.blue,y:this._color.alpha}),t.blue=t$10.compressTextureCoordinates({x:this._pickColor.red,y:this._pickColor.green}),t.alpha=t$10.compressTextureCoordinates({x:this._pickColor.blue,y:this._pickColor.alpha});var i=this._ownerGroup.renderEntities;if(e$2b(i)&&!(i.length<1))for(var n=0,r=i.length;n<r;n++){var o=i[n].command,a=o.shaderProgram.vertexAttributes.aColorAndPickColor.index,s=o.vertexArray.getAttribute(a),l=e*s.strideInBytes+s.offsetInBytes,u=S$12.createTypedArray(s.componentDatatype,s.componentsPerAttribute);u[0]=t.red,u[1]=t.green,u[2]=t.blue,u[3]=t.alpha,s.vertexBuffer.copyFromArrayView(u,l)}}},_0x40158e.prototype.update=function(e,t,i,n){var r=t.position,o=r$Z.getValueOrUndefined(r,i,_0x1000d7);if(e$2b(o)){var a=o$1p.equalsEpsilon(o,this._nextPosition,e$2a.EPSILON8)||o$1p.distance(o,this._nextPosition)<.5;this._scale=o$1p.clone(t.scale.getValue(i),this._scale);var s=o$1p.maximumComponent(t.scale.getValue(i)),l=o$1p.multiplyByScalar(this._offset,s,new o$1p),u=m$17.headingPitchRollToFixedFrame(o,new i$15,t$13.WGS84,m$17.eastNorthUpToFixedFrame,new p$1d);if(this._prePosition=o$1p.clone(this._nextPosition,this._prePosition),p$1d.multiplyByPoint(u,l,this._nextPosition),i$15.clone(this._nextHpr,this._preHpr),this._nextHpr.heading=t.heading.getValue(i),this._nextHpr.pitch=t.pitch.getValue(i),this._nextHpr.roll=t.roll.getValue(i),this._lockOrientation=t.lockOrientation,n$13.clone(this._nextOrientation,this._preOrientation),!this._lockOrientation)if(e$2b(h=a?void 0:r$Z.getValueOrUndefined(this._velocityOrientation,i,_0x16620d)))this._orientation=n$13.clone(h),n$13.clone(this._orientation,this._nextOrientation);else if(e$2b(this._orientation))n$13.clone(this._orientation,this._nextOrientation);else{var c=p$1d.getRotation(u,new p$1e);n$13.fromRotationMatrix(c,this._nextOrientation);u=m$17.headingPitchRollToFixedFrame(o,new i$15(t.startDirection,0,0),t$13.WGS84,m$17.eastNorthUpToFixedFrame,new p$1d),c=p$1d.getRotation(u,new p$1e);var h=n$13.fromRotationMatrix(c);this._preOrientation=h,this._nextOrientation=h}var d=t.color.getValue(i);this._dynamicColor=e$1U.clone(d),this._color=e$1U.multiply(this._dynamicColor,this._selColor,this._color),o$1p.clone(this._nextPosition,this._boundingSphere.center),this._boundingSphere.radius=this._ownerGroup.oriBoundingSphere.radius*s;var f=e.cullingVolume.computeVisibility(this._boundingSphere)!==Ae$u.OUTSIDE;f&&n.push(this._boundingSphere),this._ready=f}else this._ready=!1},_0x75f8b5.prototype.isDestroyed=function(){return!1},_0x75f8b5.prototype.destroy=function(){for(var e in this._group){var t=this._group[e];if(t.ready){for(var i=0,n=t.renderEntities.length;i<n;i++){var r=t.renderEntities[i].command;r.vertexArray=r.vertexArray&&!r.vertexArray.isDestroyed()&&r.vertexArray.destroy(),r.shaderProgram=r.shaderProgram&&r.shaderProgram.destroy()}t.renderEntities.length=0,e$2b(t.stateList)&&t.stateList.removeAll()}}return this._group=void 0,i$10(this)};var _0x1d23d6=(_0x4a71af=!0,function(e,t){var i=_0x4a71af?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a71af=!1,i}),_0x4ee301=_0x1d23d6(void 0,(function(){return _0x4ee301.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ee301).search("(((.+)+)+)+$")})),_0x4a71af;_0x4ee301();var _0x5e4746={UnLoad:0,Loading:1,Loaded:2,Parsing:3,Ready:4,LoadedFailed:5,ParseFailed:6},_0x49d3c9=Object.freeze(_0x5e4746),_0x2aff60=(_0xca592a=!0,function(e,t){var i=_0xca592a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xca592a=!1,i}),_0x8107d9=_0x2aff60(void 0,(function(){return _0x8107d9.toString().search("(((.+)+)+)+$").toString().constructor(_0x8107d9).search("(((.+)+)+)+$")})),_0xca592a;function _0x4c199e(e){this.url=e,this._isGlTF=!0,this.model=void 0,this.state=_0x49d3c9.UnLoad,this.ready=!1}_0x8107d9(),_0x4c199e.prototype.isDestroyed=function(){return!1},_0x4c199e.prototype.destroy=function(){return e$2b(this.model)&&!this.model.isDestroyed()&&this.model.destroy(),i$10(this)};var _0x54536e=(_0x4e96b0=!0,function(e,t){var i=_0x4e96b0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e96b0=!1,i}),_0xc9b12c=_0x54536e(void 0,(function(){return _0xc9b12c.toString().search("(((.+)+)+)+$").toString().constructor(_0xc9b12c).search("(((.+)+)+)+$")})),_0x4e96b0;function _0x5bf1b0(){}_0xc9b12c(),_0x5bf1b0.load=function(e,t){if(e$2b(t.model)||(t.model=F$C.fromGltf({url:t.url,incrementallyLoadTextures:!1})),t.model.update(e._frameState),t.model.ready){t.state=_0x49d3c9.Ready,t.ready=!0;for(var i=e._skeletonTileMap.get(t.url),n=0,r=i.length;n<r;n++)i[n].dirty=!0}},_0x5bf1b0.parse=function(e,t){};var _0x520666=(_0x3966d9=!0,function(e,t){var i=_0x3966d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3966d9=!1,i}),_0x35f067=_0x520666(void 0,(function(){return _0x35f067.toString().search("(((.+)+)+)+$").toString().constructor(_0x35f067).search("(((.+)+)+)+$")})),_0x3966d9;function _0x588b14(e,t,i,n){this.url=t,this.id=n,this.index=-1,this.type=bt$5.INSTANCED_OBJECT,this.position=o$1p.clone(i.position),this.geoPosition=a$18.fromCartesian(this.position),this.offset=u$_(i.offset,new o$1p(0,0,0)),this.color=u$_(i.color,new e$1U),this.scale=u$_(i.scale,new o$1p(1,1,1));var r=u$_(i.hpr,new i$15);this.hpr=r,this.quaternion=n$13.fromHeadingPitchRoll(r),this.feature=u$_(i.feature,u$_.EMPTY_OBJECT),this.isSelected=!1,this.selectedColor=new e$1U,this.preColor=e$1U.clone(this.color),this.tile=void 0,this.instanceInfo=void 0,this.layer=void 0;var o={id:n,primitive:this},a=e.createPickId(o).color,s=new e$1U;s.x=e$1U.floatToByte(a.red),s.y=e$1U.floatToByte(a.green),s.z=e$1U.floatToByte(a.blue),s.w=e$1U.floatToByte(a.alpha),this.pickColor=s}_0x35f067(),_0x588b14.prototype.setSelected=function(){if(e$2b(this.layer)&&this.layer.pickEnable){var e=this.index;if(e$2b(e)&&!(e<0)&&!e$1U.equals(this.color,this.selectedColor)){this.color=e$1U.clone(this.selectedColor,new e$1U);var t=e$1U.multiply(this.color,this.preColor,new e$1U),i=this.instanceInfo;if(e$2b(i)&&e$2b(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aColor2];if(e$2b(r)){var o=e*r.strideInBytes+r.offsetInBytes,a=S$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=t.red,a[1]=t.green,a[2]=t.blue,a[3]=t.alpha,i.instanceBuffer.copyFromArrayView(a,o),this.isSelected=!0}}}}},_0x588b14.prototype.setUnSelected=function(){var e=this.index;if(e$2b(e)&&!(e<0)&&this.isSelected){this.isSelected=!1,this.color=e$1U.clone(this.preColor,this.color);var t=this.instanceInfo;if(e$2b(t)&&e$2b(t.instanceBuffer)){var i=t.attributeLocation,n=t.attributes[i.aColor2];if(e$2b(n)){var r=e*n.strideInBytes+n.offsetInBytes,o=S$12.createTypedArray(n.componentDatatype,n.componentsPerAttribute);o[0]=this.preColor.red,o[1]=this.preColor.green,o[2]=this.preColor.blue,o[3]=this.preColor.alpha,t.instanceBuffer.copyFromArrayView(o,r)}}}},_0x588b14.prototype.updateOffsetPosition=function(e){if(e$2b(e)){var t=this.index;this.offset=o$1p.clone(e,this.offset);var i=this.instanceInfo;if(e$2b(i)&&e$2b(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aOffsetPosition];if(e$2b(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.offset.x,a[1]=this.offset.y,a[2]=this.offset.z,i.instanceBuffer.copyFromArrayView(a,o)}}}},_0x588b14.prototype.updatePosition=function(e){if(e$2b(e)){var t=this.index;if(this.position=o$1p.clone(e,this.position),this.geoPosition=a$18.fromCartesian(this.position),e$2b(this.tile)&&e$2b(this.tile.inverseTransform)){this.offset=p$1d.multiplyByPoint(this.tile.inverseTransform,this.position,this.offset);var i=this.instanceInfo;if(e$2b(i)&&e$2b(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aOffsetPosition];if(e$2b(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.offset.x,a[1]=this.offset.y,a[2]=this.offset.z,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x588b14.prototype.updateRotation=function(e){if(e$2b(e)){var t=this.index;if(!i$15.equals(this.hpr,e)){this.hpr=i$15.clone(e,this.hpr),this.quaternion=n$13.fromHeadingPitchRoll(e,this.quaternion);var i=this.instanceInfo;if(e$2b(i)&&e$2b(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aQuaternion];if(e$2b(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.quaternion.x,a[1]=this.quaternion.y,a[2]=this.quaternion.z,a[3]=this.quaternion.w,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x588b14.prototype.updateColor=function(e){if(e$2b(e)){var t=this.index;if(!e$1U.equals(this.color,e)){this.color=e$1U.clone(e,this.color),this.preColor=e$1U.clone(e,this.preColor);var i=this.instanceInfo;if(e$2b(i)&&e$2b(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aColor2];if(e$2b(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.color.red,a[1]=this.color.green,a[2]=this.color.blue,a[3]=this.color.alpha,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x588b14.prototype.updateScale=function(e){if(e$2b(e)){var t=this.index;if(!o$1p.equals(this.scale,e)){o$1p.clone(e,this.scale);var i=this.instanceInfo;if(e$2b(i)&&e$2b(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aScale];if(e$2b(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$12.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=e.x,a[1]=e.y,a[2]=e.z,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x588b14.prototype.updateModelMatrix=function(e){var t=p$1d.getScale(e,new o$1p);this.updateScale(t);var i=p$1d.setScale(e,new o$1p(1,1,1),new p$1d),n=p$1d.getRotation(i,new p$1e);n$13.fromRotationMatrix(n,this.quaternion);var r=i$15.fromQuaternion(this.quaternion,new i$15);this.updateRotation(r);var o=p$1d.getTranslation(e,new o$1p);o$1p.add(this.offset,o,this.offset),this.updateOffsetPosition(this.offset)},_0x588b14.prototype.write=function(e,t){var i=this.offset,n=this.quaternion,r=this.scale,o=this.color,a=this.pickColor,s=0;e[t+s++]=i.x,e[t+s++]=i.y,e[t+s++]=i.z,e[t+s++]=n.x,e[t+s++]=n.y,e[t+s++]=n.z,e[t+s++]=n.w,e[t+s++]=r.x,e[t+s++]=r.y,e[t+s++]=r.z,e[t+s++]=o.red,e[t+s++]=o.green,e[t+s++]=o.blue,e[t+s++]=o.alpha,e[t+s++]=a.x,e[t+s++]=a.y,e[t+s++]=a.z,e[t+s++]=a.w},_0x588b14.prototype.isDestroyed=function(){return!1},_0x588b14.prototype.destroy=function(){i$10(this)};var _0x3c59bb=(_0x55dd83=!0,function(e,t){var i=_0x55dd83?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55dd83=!1,i}),_0x39c890=_0x3c59bb(void 0,(function(){return _0x39c890.toString().search("(((.+)+)+)+$").toString().constructor(_0x39c890).search("(((.+)+)+)+$")})),_0x55dd83;function _0x377331(e,t){this.url=e,this.stride=t,this.instances=[],this.instanceBuffer=void 0,this.attributes=void 0,this.attributeLocation=void 0,this.inverseTransform=void 0,this.dirty=!1}function _0x16517a(e,t){for(var i=e.length,n=new Float32Array(i*t),r=0;r<i;r++){var o=e[r];o.index=r;var a=r*t;o.write(n,a)}return n}function _0x5450ac(e,t,i){var n=_0x16517a(t,i),r=t$Y.createVertexBuffer({context:e,typedArray:n,usage:A$19.STATIC_DRAW});return r.vertexArrayDestroyable=!1,r}function _0x1e5b7a(e,t){var i=S$12.getSizeInBytes(S$12.FLOAT),n=0,r=[],o=0,a={};return a.aOffsetPosition=o++,r.push({name:"aOffsetPosition",index:a.aOffsetPosition,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:n,strideInBytes:i*t,instanceDivisor:1}),n+=3,a.aQuaternion=o++,r.push({name:"aQuaternion",index:a.aQuaternion,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,a.aScale=o++,r.push({name:"aScale",index:a.aScale,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=3,a.aColor2=o++,r.push({name:"aColor2",index:a.aColor2,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,a.aPickColor=o++,r.push({name:"aPickColor",index:a.aPickColor,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,{attributes:r,attributeLocation:a}}_0x39c890(),_0x377331.prototype.getHeightRange=function(){for(var e=Number.MAX_VALUE,t=Number.MIN_VALUE,i=this.instances.length,n=0;n<i;n++){var r=this.instances[n];e=Math.min(e,r.geoPosition.height),t=Math.max(t,r.geoPosition.height)}return{minHeight:e,maxHeight:t}},_0x377331.prototype.update=function(e){if(e$2b(this.instanceBuffer)&&(this.instanceBuffer=this.instanceBuffer.destroy()),this.instances.length>0)if(this.instanceBuffer=_0x5450ac(e,this.instances,this.stride),e$2b(this.attributes))for(var t=0,i=this.attributes.length;t<i;t++){this.attributes[t].vertexBuffer=this.instanceBuffer}else{var n=_0x1e5b7a(this.instanceBuffer,this.stride);this.attributes=n.attributes,this.attributeLocation=n.attributeLocation}this.dirty=!1},_0x377331.prototype.isDestroyed=function(){return!1},_0x377331.prototype.destroy=function(){this.instanceBuffer=this.instanceBuffer&&!this.instanceBuffer.isDestroyed()&&this.instanceBuffer.destroy(),this.instances=null,this.attributes=null,this.attributeLocation=null,this.inverseTransform=null,i$10(this)};var _0x7beab5=(_0x4a257c=!0,function(e,t){var i=_0x4a257c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a257c=!1,i}),_0x162e6f=_0x7beab5(void 0,(function(){return _0x162e6f.toString().search("(((.+)+)+)+$").toString().constructor(_0x162e6f).search("(((.+)+)+)+$")})),_0x4a257c;_0x162e6f();var _0x1525ff="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\nattribute vec4 aTexCoord0;\n#ifdef VertexColor\n #ifdef WEBGPU\n attribute uvec4 aColor;\n #else\n attribute vec4 aColor;\n #endif\n#endif\nattribute vec3 aOffsetPosition;\nattribute vec4 aQuaternion;\nattribute vec3 aScale;\nattribute vec4 aColor2;\nattribute vec4 aPickColor;\n#ifdef LocalTransform\nattribute vec4 aLocalTranslation;\nattribute vec4 aLocalQuaternion;\n#endif\nuniform mat4 uGeoMat;\n\n#ifdef COMPRESS_VERTEX\n uniform float gltf_u_dec_position_normConstant;\n uniform vec3 gltf_u_dec_position_min;\n#endif\n#ifdef COMPRESS_NORMAL\n uniform float gltf_u_dec_normal_rangeConstant;\n#endif\n#ifdef COMPRESS_TEXCOORD\n uniform float gltf_u_dec_texcoord_0_normConstant;\n uniform vec2 gltf_u_dec_texcoord_0_min;\n#endif\n\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec3 vNormalEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying mat4 vModelMatrix;\nmat4 transfromFromQuaternion(vec4 q, vec4 translation)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, translation.x, translation.y, translation.z, 1.0);\n}\n\n#ifdef COMPRESS_VERTEX\n vec3 gltf_decoded_POSITION(vec4 position) {\n return gltf_u_dec_position_min + position.xyz * gltf_u_dec_position_normConstant;\n }\n#endif\n#ifdef COMPRESS_TEXCOORD\n vec2 gltf_decoded_TEXCOORD_0(vec2 texcoord){\n return gltf_u_dec_texcoord_0_min + texcoord * gltf_u_dec_texcoord_0_normConstant;\n }\n#endif\n\nvoid main()\n{\n vec4 vertexPos = vec4(aPosition.xyz, 1.0);\n #ifdef COMPRESS_VERTEX\n vec3 compressPosition = gltf_decoded_POSITION(aPosition);\n vertexPos = vec4(compressPosition.xyz, 1.0);\n #endif\n \n vec4 positionMC = uGeoMat * vertexPos;\n vTexCoord = aTexCoord0.xy;\n #ifdef COMPRESS_TEXCOORD\n vTexCoord = gltf_decoded_TEXCOORD_0(aTexCoord0.xy);\n #endif\n mat3 rotationMat = mat3(transfromFromQuaternion(aQuaternion, vec4(0.0)));\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMat[0], 0.0);\n worldMatrix[1] = vec4(rotationMat[1], 0.0);\n worldMatrix[2] = vec4(rotationMat[2], 0.0);\n worldMatrix[3] = vec4(aOffsetPosition, 1.0);\n mat4 scaleMatrix;\n vec3 scale = aScale.xyz;\n scaleMatrix[0] = vec4(scale.x,0,0,0.0);\n scaleMatrix[1] = vec4(0,scale.y,0,0.0);\n scaleMatrix[2] = vec4(0,0,scale.z,0.0);\n scaleMatrix[3] = vec4(0,0,0,1.0);\n mat4 modelMatrix = worldMatrix;\n#ifdef LocalTransform\n mat4 localTransformMat = transfromFromQuaternion(aLocalQuaternion, aLocalTranslation);\n modelMatrix *= localTransformMat;\n#endif\n modelMatrix *= scaleMatrix;\n mat3 rotationMatrix = mat3(modelMatrix);\n vModelMatrix = modelMatrix * uGeoMat;\n positionMC = modelMatrix * vec4(positionMC.xyz, 1.0);\n positionMC.w = 1.0;\n gl_Position = czm_modelViewProjection * positionMC;\n vPositionMC.xyz = positionMC.xyz;\n vPositionMC.w = 0.0;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = aColor / 255.0;\n #endif\n#endif\n vColor = vertexColor * aColor2;\n vPickColor = aPickColor / 255.0;\n#ifdef HAS_NORMAL\n vec3 vertexNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n vertexNormal = czm_octDecode(aNormal.xy, gltf_u_dec_normal_rangeConstant).zxy;\n #endif\n if(length(vertexNormal) > 0.8)\n {\n vec3 normal = rotationMatrix * vertexNormal;\n mat4 realModelViewMatrix4 = czm_modelView * vModelMatrix;\n realModelViewMatrix4 = czm_inverseMatrix(realModelViewMatrix4);\n mat3 realModelViewMatrix3 = mat3(realModelViewMatrix4);\n realModelViewMatrix3 = czm_transpose(realModelViewMatrix3);\n vNormalEC = realModelViewMatrix3 * vertexNormal;\n vPositionMC.w = 1.0;\n vPositionEC = (czm_modelView * vPositionMC).xyz;\n }\n#endif\n}\n",_0x28fee2=(_0x4e57f2=!0,function(e,t){var i=_0x4e57f2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e57f2=!1,i}),_0x777d28=_0x28fee2(void 0,(function(){return _0x777d28.toString().search("(((.+)+)+)+$").toString().constructor(_0x777d28).search("(((.+)+)+)+$")})),_0x4e57f2;function _0x4f9ecb(e){this.ready=!1,this.state=_0x49d3c9.UnLoad,this.url=e,this.subSkeletons=[]}function _0xcd441e(e,t){this.attributes=void 0,this.attributeLocation=void 0,this.indexBuffer=void 0,this.sp=void 0,this.colorCommand=void 0,this.boundingVolume=void 0,this._materialUBO=new _0xfa6ee5(this,t,e)}function _0x339419(e,t,i){var n=ce$x.UNSIGNED_SHORT;(1===t.indexType||i>=e$2a.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(n=ce$x.UNSIGNED_INT);var r=t$Y.createIndexBuffer({context:e,typedArray:t.indicesTypedArray,usage:A$19.STATIC_DRAW,indexDatatype:n});return r.vertexArrayDestroyable=!1,r}function _0x4bfa26(e,t){for(var i=t.vertexAttributes,n=0,r=i.length;n<r;n++){var o=i[n];!e$2b(o.typedArray)||(o.vertexBuffer=t$Y.createVertexBuffer({context:e,typedArray:o.typedArray,usage:A$19.STATIC_DRAW}),o.vertexBuffer.vertexArrayDestroyable=!1,o.typedArray=null,delete o.typedArray)}return i}function _0x3e5f3f(e,t,i){var n=t.hasTexture,r=t.hasNormal,o=t.hasVertexColor,a=t.flipY,s=t.attributeLocation,l=new s$U({name:"S3MInstanceCollectionVertex",sources:[_0x1525ff]}),u=new s$U({name:"S3ModelFP",sources:[_0x451393]});a&&u.defines.push("FLIP_Y"),n&&u.defines.push("TEXTURE"),r&&(l.defines.push(Y$H.HAS_NORMAL),u.defines.push(Y$H.HAS_NORMAL)),o&&l.defines.push("VertexColor");const c=e._frameState.lightSource;e$2b(c)&&(u.defines.push("MAX_POINT_LIGHT_COUNT "+s$I.MaxPointLightCount),u.defines.push("MAX_SPOT_LIGHT_COUNT "+s$I.MaxSpotLightCount),u.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$I.MaxDirectionLightCount),c.directionalLight.length>0&&u.defines.push(Y$H.HAS_DIR_LIGHTS),c._visibleLightList[_0x1d9df9.POINT].length>0&&u.defines.push(Y$H.HAS_POINT_LIGHTS),c._visibleLightList[_0x1d9df9.SPOT].length>0&&u.defines.push(Y$H.HAS_SPOT_LIGHTS),c.hemisphereLight.length>0&&u.defines.push(Y$H.HAS_HEMISPHERE_LIGHTS));return i._usePBR&&(u.defines.push(Y$H.BRDF),i.baseColorTexture&&u.defines.push(Y$H.HAS_BASE_TEXTURE),i.uNormalTexture&&u.defines.push(Y$H.HAS_NORMAL_TEXTURE),i.emissiveTexture&&u.defines.push(Y$H.HAS_EMISSIVE_TEXTURE),i.metallicRoughnessTexture&&u.defines.push(Y$H.HAS_MetallicRoughness_TEXTURE),i.occlusionTexture&&u.defines.push(Y$H.HAS_OCCLUSION_TEXTURE),(e$2b(e._frameState.specularEnvironmentMaps)||e$2b(e._frameState.hdrEnvMap))&&(u.defines.push(Y$H.IBL),e$2b(e._frameState.specularEnvironmentMaps)&&u.defines.push(Y$H.KtxEnvMap)),e$2b(i._alphaMode)&&i._alphaMode===_0x5f0e97.MASK&&u.defines.push(Y$H.MASK)),r$13.fromCache({context:e._context,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:s})}function _0x7d70b7(e,t,i,n){var r=new i$_({primitiveType:W$18.TRIANGLES,boundingVolume:n,modelMatrix:t,pass:i._bTransparentSorting?Le$s.TRANSLUCENT:Le$s.OPAQUE,cull:!0});e._shadowType===_0x381f49.ALL||e._shadowType===_0x381f49.SELECTION?(r.castShadows=!0,r.receiveShadows=!0):(r.castShadows=!1,r.receiveShadows=!1),r.pickId="vPickColor";var o=i._textures[0],a={uTexture:function(){return o},uGeoMat:function(){return t}};return i._usePBR&&(a.uBaseTexture=function(){return e$2b(i._baseColorTextureIndex)&&i._baseColorTextureIndex>-1?i.baseColorTexture:e._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture},a.uNormalTexture=function(){return e$2b(i._normalTextureIndex)&&i._normalTextureIndex>-1?i.normalTexture?i.normalTexture:i._textures[i._normalTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.normalTexture},a.uEmissionTexture=function(){if(e$2b(i.emissiveTexture))return i.emissiveTexture;var t=i._emissiveTextureIndex;return t>-1&&e$2b(i._textures[t])?i._textures[t]:e._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},a.uMetallicRoughnessTexture=function(){return e$2b(i._metallicRoughnessTextureIndex)&&i._metallicRoughnessTextureIndex>-1?e$2b(i.metallicRoughnessTexture)?i.metallicRoughnessTexture:i._textures[i._metallicRoughnessTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},a.uOcclusionTexture=function(){return e$2b(i._occlusionTextureIndex)&&i._occlusionTextureIndex>-1?i.occlusionTexture?i.occlusionTexture:e$2b(i._textures[i._occlusionTextureIndex])?i._textures[i._occlusionTextureIndex]:e._context.defaultTexture:e._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},i._usePBRTextureBatch&&(a.uPBRTexture=function(){return i.pbrParamTexture})),r.uniformMap=a,r.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),r}_0x777d28(),_0xcd441e.prototype.isDestroyed=function(){return!1},_0xcd441e.prototype.destroy=function(){this.sp=this.sp&&!this.sp.isDestroyed()&&this.sp.destroy(),this.indexBuffer=this.indexBuffer&&!this.indexBuffer.isDestroyed()&&this.indexBuffer.destroy();for(var e=0,t=this.attributes.length;e<t;e++)this.attributes[e].vertexBuffer.destroy();return this.attributes.length=0,this.colorCommand=void 0,i$10(this)},_0x4f9ecb.prototype.updateShaderProgram=function(e,t){e.context;for(let e=0,i=this.subSkeletons.length;e<i;e++){const i=this.subSkeletons[e];!e$2b(i.colorCommand)||!e$2b(i.sp)||!i.material._usePBR||(i.sp=i.sp.destroy(),i.sp=_0x3e5f3f(t,{hasTexture:e$2b(i.attributeLocation.aTexCoord0)&&i.material._textures.length>0,hasNormal:e$2b(i.attributeLocation.aNormal),hasVertexColor:e$2b(i.attributeLocation.aColor),flipY:0===t._supportCompressType,attributeLocation:i.attributeLocation},i.material),i.colorCommand.shaderProgram=i.sp)}},_0x4f9ecb.prototype.createSubSkeleton=function(e,t,i,n,r,o){var a=e._context,s=new _0xcd441e(e,i,n);s._materialUBO.update(a),s.attributes=_0x4bfa26(a,n),s.indexBuffer=_0x339419(a,r,n.verticesCount),s.attributeLocation=n.attrLocation,s.material=i,s.sp=_0x3e5f3f(e,{hasTexture:e$2b(s.attributeLocation.aTexCoord0)&&i._textures.length>0,hasNormal:e$2b(s.attributeLocation.aNormal),hasVertexColor:e$2b(s.attributeLocation.aColor),flipY:0===e._supportCompressType,attributeLocation:s.attributeLocation},i),s.colorCommand=_0x7d70b7(e,t,i,o);const l=a.uniformState;s.colorCommand.addUniformBuffer(l._sceneUBO),s.colorCommand.addUniformBuffer(l._lightUBO),s.colorCommand.addUniformBuffer(s._materialUBO),s.boundingVolume=i$1c.clone(o),this.subSkeletons.push(s)},_0x4f9ecb.prototype.isDestroyed=function(){return!1},_0x4f9ecb.prototype.destroy=function(){for(var e=0,t=this.subSkeletons.length;e<t;e++)this.subSkeletons[e].destroy();i$10(this)};var _0x35240d=(_0x587a79=!0,function(e,t){var i=_0x587a79?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x587a79=!1,i}),_0x563756=_0x35240d(void 0,(function(){return _0x563756.toString().search("(((.+)+)+)+$").toString().constructor(_0x563756).search("(((.+)+)+)+$")})),_0x587a79;function _0xbc2054(e,t,i){this.tileX=e,this.tileY=t,this.level=i,this.rectangle=void 0,this.boundingVolume=void 0,this.transform=void 0,this.inverseTransform=void 0,this.tileBoundingRegion=void 0,this.distanceToCamera=0,this.instanceGroup=new e$1N,this.skeletonGroup=new e$1N,this.commandGroup=new e$1N,this.dirty=!1}function _0x354f2e(e,t){var i={},n=0;for(var r in e)e.hasOwnProperty(r)&&(i[r]=e[r],++n);for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]+n);return i}function _0x4d5f0c(e,t){for(var i=e.length,n=e.slice(0),r=0,o=t.length;r<o;r++)t[r].index=i+r,n.push(t[r]);return n}function _0x15dac0(e,t,i,n){var r=n.instances[0],o=o$1p.maximumComponent(r.scale);e$2b(l=e.commandGroup.get(n.url))||(l=new Array(t.subSkeletons.length),e.commandGroup.set(n.url,l));for(var a=0,s=t.subSkeletons.length;a<s;a++){var l,u=t.subSkeletons[a],c=(l=e.commandGroup.get(n.url))[a];e$2b(c)||((c=i$_.shallowClone(u.colorCommand)).modelMatrix=p$1d.clone(u.colorCommand.modelMatrix),c._relativeModelMatrix=p$1d.clone(u.colorCommand._relativeModelMatrix),l[a]=c),e$2b(c.vertexArray)&&!c.vertexArray.isDestroyed()&&c.vertexArray.destroy();var h=_0x4d5f0c(u.attributes,n.attributes),d=_0x354f2e(u.attributeLocation,n.attributeLocation);for(var f in d){h[d[f]].name=f}c.vertexArray=new c$12({context:i,attributes:h,indexBuffer:u.indexBuffer}),c.shaderProgram=r$13.fromCache({context:i,shaderProgram:u.sp,vertexShaderSource:u.sp.vertexShaderSource,fragmentShaderSource:u.sp.fragmentShaderSource,attributeLocations:d}),p$1d.clone(e.transform,c.modelMatrix),c.instanceCount=n.instances.length,c.radius=u.boundingVolume.radius*o,c.boundingVolume=e.boundingVolume}}function _0x2b221f(e,t,i,n){var r=e.layer,o=t.model._nodeCommands,a=o.length,s=t.model._dequantizeInShader,l=n.instances[0],u=o$1p.maximumComponent(l.scale),c=e.commandGroup.get(n.url);e$2b(c)||(c=new Array(a),e.commandGroup.set(n.url,c));for(var h=0;h<a;++h){var d=o[h],f=i$_.shallowClone(d.command);c[h]=f,f._isGltfCommand=!0,f.castShadows=!1,f.receiveShadows=!1,f.pickId="vPickColor",f.instanceCount=n.instances.length,f.pass=Le$s.OPAQUE,f.cull=!1;var p=_0x4435a6(f.shaderProgram.vertexAttributes);i.webgpu&&_0x1aa413(f.vertexArray),p=_0x354f2e(p,n.attributeLocation);var _=f.vertexArray._inner,m=_._attributes,g=_.indexBuffer;m=_0x4d5f0c(m,n.attributes),f.vertexArray=new c$12({context:i,attributes:m,indexBuffer:g});var x=new s$U({name:"InstanceTilesLayerVS",sources:[_0x1525ff]}),v=new s$U({name:"S3ModelFP",sources:[_0x451393]});v.defines.push("BRDF"),e$2b(r._frameState.specularEnvironmentMaps)&&v.defines.push(Y$H.IBL);const t=r._frameState.lightSource;if(e$2b(t))v.defines.push("MAX_POINT_LIGHT_COUNT "+s$I.MaxPointLightCount),v.defines.push("MAX_SPOT_LIGHT_COUNT "+s$I.MaxSpotLightCount),v.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$I.MaxDirectionLightCount),t.directionalLight.length>0&&v.defines.push(Y$H.HAS_DIR_LIGHTS),t._visibleLightList[_0x1d9df9.POINT].length>0&&v.defines.push(Y$H.HAS_POINT_LIGHTS),t._visibleLightList[_0x1d9df9.SPOT].length>0&&v.defines.push(Y$H.HAS_SPOT_LIGHTS),t.hemisphereLight.length>0&&v.defines.push(Y$H.HAS_HEMISPHERE_LIGHTS);e$2b(p.aColor)&&x.defines.push("VertexColor"),e$2b(p.aNormal)&&(x.defines.push(Y$H.HAS_NORMAL),v.defines.push(Y$H.HAS_NORMAL)),e$2b(p.aTexCoord0)&&(e$2b(f.uniformMap.u_baseColorTexture)||e$2b(f.uniformMap.u_diffuse))&&(x.defines.push("TEXTURE"),v.defines.push("TEXTURE")),s&&(x.defines.push(Y$H.COMPRESS_VERTEX),e$2b(p.aTexCoord0)&&x.defines.push(Y$H.COMPRESS_TEXCOORD),e$2b(p.aNormal)&&x.defines.push(Y$H.COMPRESS_NORMAL)),e$2b(f.uniformMap.u_metallicRoughnessTexture)&&v.defines.push("HAS_MetallicRoughness_TEXTURE"),e$2b(f.uniformMap.u_normalTexture)&&v.defines.push("HAS_NORMAL_TEXTURE"),e$2b(f.uniformMap.u_emissiveTexture)&&v.defines.push("HAS_EMISSIVE_TEXTURE"),e$2b(f.uniformMap.u_occlusionTexture)&&v.defines.push("HAS_OCCLUSION_TEXTURE"),f.shaderProgram=r$13.fromCache({context:i,vertexShaderSource:x,fragmentShaderSource:v,attributeLocations:p});var y=f.uniformMap;const a=new _0x21d1b1;a._usePBR=!0,a._baseColor=new e$29(1,1,1,1),a._emissiveFactor=new o$1p,a._roughnessFactor=1,a._metallicFactor=0,e$2b(y.u_baseColorFactor)&&(a._baseColor=y.u_baseColorFactor()),e$2b(y.u_emissiveFactor)&&(a._emissiveFactor=y.u_emissiveFactor()),e$2b(y.u_roughnessFactor)&&(a._roughnessFactor=y.u_roughnessFactor()),e$2b(y.u_metallicFactor)&&(a._metallicFactor=y.u_metallicFactor());const l=new _0xfa6ee5({},a,r),b=i.uniformState;l.update(i),f.addUniformBuffer(b._sceneUBO),f.addUniformBuffer(b._lightUBO),f.addUniformBuffer(l);var $={uGeoMat:function(e){return function(){return c[e].localMatrix}}(h)};e$2b(y.u_baseColorTexture)?$.uTexture=y.u_baseColorTexture:e$2b(y.u_diffuse)&&($.uTexture=y.u_diffuse),e$2b(y.u_metallicRoughnessTexture)&&($.uMetallicRoughnessTexture=y.u_metallicRoughnessTexture),e$2b(y.u_normalTexture)&&($.uNormalTexture=y.u_normalTexture),e$2b(y.u_emissiveTexture)&&($.uEmissionTexture=y.u_emissiveTexture),e$2b(y.u_occlusionTexture)&&($.uOcclusionTexture=y.u_occlusionTexture),$=p$19($,y),f.uniformMap=$,f.localMatrix=p$1d.IDENTITY.clone(),f._transformMatrix=p$1d.IDENTITY.clone(),f.modelMatrix=p$1d.clone(p$1d.IDENTITY,new p$1d),f.radius=f.boundingVolume.radius*u,f.boundingVolume=y$Z.clone(e.boundingVolume,new y$Z)}}function _0x4435a6(e){var t={};return e$2b(e.a_position)&&(t.aPosition=e.a_position.index),e$2b(e.a_normal)&&(t.aNormal=e.a_normal.index),e$2b(e.a_vertexColor)&&(t.aColor=e.a_vertexColor.index),e$2b(e.a_texcoord_0)&&(t.aTexCoord0=e.a_texcoord_0.index),e$2b(e.a_texcoord0)&&(t.aTexCoord0=e.a_texcoord0.index),t}function _0x1aa413(e){var t=e._inner._babylonVertexBuffers;e$2b(t.a_position)&&(t.aPosition=t.a_position),e$2b(t.a_normal)&&(t.aNormal=t.a_normal),e$2b(t.a_vertexColor)&&(t.aColor=t.a_vertexColor),e$2b(t.a_texcoord_0)&&(t.aTexCoord0=t.a_texcoord_0),e$2b(t.a_texcoord1)&&(t.aTexCoord1=t.a_texcoord1);for(var i=0;i<e._inner._attributes.length;i++){var n=e._inner._attributes[i].name;"a_position"==n&&(e._inner._attributes[i].name="aPosition"),"a_normal"==n&&(e._inner._attributes[i].name="aNormal"),"a_vertexColor"==n&&(e._inner._attributes[i].name="aColor"),"a_texcoord_0"==n&&(e._inner._attributes[i].name="aTexCoord0"),"a_texcoord1"==n&&(e._inner._attributes[i].name="aTexCoord1")}}_0x563756(),_0xbc2054.prototype.updateDrawCommand=function(e,t){var i=this.skeletonGroup.get(t.url);e$2b(i)&&i.ready&&(!e$2b(t.instances[0])||(i._isGlTF?(i.transformed=!0,_0x2b221f(this,i,e,t),i.model.activeAnimations.addAll({loop:_0x157d80.REPEAT})):_0x15dac0(this,i,e,t)))},new e$29(1,1,1,1),_0xbc2054.prototype.updateBoundingVolume=function(e,t){this.boundingVolume=y$Z.fromRectangle(this.rectangle,e,t)},_0xbc2054.prototype.remove=function(e){var t=this.instanceGroup.get(e);e$2b(t)&&(t.destroy(),this.instanceGroup.remove(e)),this.skeletonGroup.remove(e);var i=this.commandGroup.get(e);if(e$2b(i)){for(var n=0,r=i.length;n<r;n++){var o=i[n];o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy()}this.commandGroup.remove(e)}},_0xbc2054.prototype.updateShaderProgram=function(){for(var e in this.instanceGroup._hash)if(this.instanceGroup._hash.hasOwnProperty(e)){var t=this.instanceGroup.get(e),i=this.skeletonGroup.get(t.url),n=this.commandGroup.get(t.url);if(!e$2b(n))continue;for(var r=0,o=i.subSkeletons.length;r<o;r++){var a=i.subSkeletons[r];if(e$2b(a.material)&&a.material._usePBR)n[r].shaderProgram=a.sp}}},_0xbc2054.prototype.update=function(e){this.dirty=!1;var t=Number.MAX_VALUE,i=Number.MIN_VALUE;for(var n in this.instanceGroup._hash)if(this.instanceGroup._hash.hasOwnProperty(n)){var r=this.instanceGroup.get(n);r.dirty&&r.update(e);var o=r.getHeightRange();t=Math.min(t,o.minHeight),i=Math.max(i,o.maxHeight),this.updateDrawCommand(e,r)}this.updateBoundingVolume(t,i)},_0xbc2054.prototype.isDestroyed=function(){return!1},_0xbc2054.prototype.destroy=function(){var e,t,i,n;for(e=0,t=this.instanceGroup.length;e<t;e++){this.instanceGroup.values[e].destroy()}for(this.instanceGroup.removeAll(),this.skeletonGroup.removeAll(),e=0,t=this.commandGroup.length;e<t;e++){var r=this.commandGroup.values[e];for(i=0,n=r.length;i<n;i++){var o=r[i];o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy()}}this.commandGroup.removeAll(),i$10(this)};var _0x156053=(_0x1a3c38=!0,function(e,t){var i=_0x1a3c38?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a3c38=!1,i}),_0x12f717=_0x156053(void 0,(function(){return _0x12f717.toString().search("(((.+)+)+)+$").toString().constructor(_0x12f717).search("(((.+)+)+)+$")})),_0x1a3c38;function _0x1c7703(){}function _0x4f873a(e,t){for(var i=[],n=new i$1c,r=new o$1p,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1c.fromPoints(i,n),i.length=0,i$1c.transform(n,t,n),n}_0x12f717(),_0x1c7703.load=function(e,t){var i=t$11.fetchArrayBuffer({url:t.url});e$2b(i)||(t.state=_0x49d3c9.UnLoad),t.state=_0x49d3c9.Loading,i.then((function(e){t.state=_0x49d3c9.Loaded,t.skeletonBuffer=e}),(function(e){t.state=_0x49d3c9.Failed}))},_0x1c7703.parse=function(e,t){if(_0x46a73d.init||_0x46a73d.initWebAssembly(),_0x46a73d.taskProcessorReady){var i=_0x46a73d.S3MBTaskProcessor.scheduleTask({buffer:t.skeletonBuffer,supportCompressType:e._supportCompressType},[t.skeletonBuffer]);if(!e$2b(i))return void(t.state=_0x49d3c9.Loaded);t.skeletonBuffer=void 0,t.state=_0x49d3c9.Parsing,i.then((function(i){if(i.result){for(var n=e._context,r={},o=0,a=i.matrials.material.length;o<a;o++){var s=i.matrials.material[o].material,l=s.id,u=new _0x21d1b1({});r[l]=u,u.createCommonParamter(s),u.createPBRParamter(s);for(var c=s.textureunitstates,h=0;h<c.length;h++){var d=c[h].textureunitstate,f=d.id,p=0===d.addressmode.u?q$19.REPEAT:q$19.CLAMP_TO_EDGE,_=0===d.addressmode.v?q$19.REPEAT:q$19.CLAMP_TO_EDGE;u._texMatrix=p$1d.unpack(d.texmodmatrix);var m=i.texturePackage[f];if(e$2b(m)){var g=Se$d.CreateTexture(f,n,m.width,m.height,m.nFormat,m.compressType,m.imageBuffer,!1,p,_);u._textures.push(g),0===m.compressType&&(e._supportCompressType=0)}}}var x=i.groupNode.pageLods;if(e$2b(x))for(o=0,a=x.length;o<a;o++){for(var v=x[o].geodes[0],y=v.matrix,$=0;$<16;$++)y[$]=parseFloat(y[$]);y=p$1d.unpack(y,0);for(var b=v.skeletonNames,T=[],C=0,S=b.length;C<S;C++){var w=b[C].trim();T.push(w);var E=i.geoPackage[w],P=E.vertexPackage,A=_0x4f873a(P,y),L=E.arrIndexPackage[0];if(e$2b(L)){u=r[l=L.materialCode];t.createSubSkeleton(e,y,u,P,L,A)}}}t.ready=!0,t.state=_0x49d3c9.Ready;var M=e._skeletonTileMap.get(t.url);for(o=0,a=M.length;o<a;o++)M[o].dirty=!0;e._skeletonTileMap.remove(t.url)}else t.state=_0x49d3c9.Failed})).otherwise((function(e){console.log(e)}))}};var _0x2f87e1=(_0x461105=!0,function(e,t){var i=_0x461105?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x461105=!1,i}),_0x3f6519=_0x2f87e1(void 0,(function(){return _0x3f6519.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f6519).search("(((.+)+)+)+$")})),_0x461105;function _0x5ba273(){}_0x3f6519();var _0x33fae4=new s$S;function _0x2434d4(e,t){for(var i=[],n=new i$1c,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1c.fromPoints(i,n),i.length=0,i$1c.transform(n,t,n),n}_0x5ba273.load=function(e,t){var i=t$11.fetchArrayBuffer({url:t.url});e$2b(i)||(t.state=_0x49d3c9.UnLoad),t.state=_0x49d3c9.Loading,i.then((function(e){t.state=_0x49d3c9.Loaded,t.skeletonBuffer=e}),(function(e){t.state=_0x49d3c9.Failed}))},_0x5ba273.parse=function(e,t){var i=_0x46a73d.S3MTaskProcessor.scheduleTask({buffer:t.skeletonBuffer,supportCompressType:e._supportCompressType},[t.skeletonBuffer]);e$2b(i)?(t.skeletonBuffer=void 0,t.state=_0x49d3c9.Parsing,i.then((function(i){if(i.result){e._gl;for(var n=e._context,r=_0x33fae4.read(i.xmlDoc).firstChild,o=r.namespaceURI,a=s$S.queryFirstNode(r,"Material3Ds",o),s=s$S.queryChildNodes(a,"material",o),l={},u=0,c=s.length;u<c;u++){var h=s[u],d=s$S.queryStringValue(h,"name",o),f=new _0x21d1b1({});l[d]=f;var p=s$S.queryFirstNode(h,"Ambient",o),_=s$S.queryNumericValue(p,"AmbientR",o),m=s$S.queryNumericValue(p,"AmbientG",o),g=s$S.queryNumericValue(p,"AmbientB",o),x=s$S.queryNumericValue(p,"AmbientA",o);f._ambientColor=new e$1U(_,m,g,x);var v=s$S.queryFirstNode(h,"Diffuse",o);_=s$S.queryNumericValue(v,"DiffuseR",o),m=s$S.queryNumericValue(v,"DiffuseG",o),g=s$S.queryNumericValue(v,"DiffuseB",o),x=s$S.queryNumericValue(v,"DiffuseA",o),f._diffuseColor=new e$1U(_,m,g,x);var y=s$S.queryFirstNode(h,"Specular",o);_=s$S.queryNumericValue(y,"SpecularR",o),m=s$S.queryNumericValue(y,"SpecularG",o),g=s$S.queryNumericValue(y,"SpecularB",o),x=s$S.queryNumericValue(y,"SpecularA",o),f._specularColor=new e$1U(_,m,g,x);var $=s$S.queryNumericValue(h,"Shininess",o);f._shininess=$,s$S.queryFirstNode(h,"TransparentSorting",o),f._bTransparentSorting=s$S.queryBooleanValue(h,"TransparentSorting",o)||f._diffuseColor.alpha<1;var b=s$S.queryFirstNode(h,"texture",o),T=s$S.queryStringValue(b,"name",o),C=s$S.queryFirstNode(b,"AddressMode",o),S=s$S.queryStringValue(C,"u",o),w=s$S.queryStringValue(C,"v",o);S="TAM_WRAP"===S?q$19.REPEAT:q$19.CLAMP_TO_EDGE,w="TAM_WRAP"===w?q$19.REPEAT:q$19.CLAMP_TO_EDGE;var E=i.texturePackage[T];if(e$2b(E)){var P=Se$d.CreateTexture(T,n,E.width,E.height,E.nFormat,E.compressType,E.imageBuffer,!1,S,w);f._textures.push(P),0===E.compressType&&(e._supportCompressType=0)}}var A=s$S.queryFirstNode(r,"PageLods",o),L=s$S.queryNodes(A,"Geode",o);for(u=0,c=L.length;u<c;u++){for(var M=L[u],R=s$S.queryStringValue(M,"GeoDeModMatrix",o).split(","),O=0;O<16;O++)R[O]=parseFloat(R[O]);R=p$1d.unpack(R,0);for(var I=s$S.queryNodes(M,"GeoName",o),D=[],B=0,N=I.length;B<N;B++){var F=I[B].textContent.trim();D.push(F);var U=i.geoPackage[F],G=_0x2434d4(z=U.vertexPackage,R),z=U.vertexPackage,V=U.arrIndexPackage[0];if(e$2b(V)){f=l[d=V.materialCode];t.createSubSkeleton(e,R,f,z,V,G)}}}t.ready=!0,t.state=_0x49d3c9.Ready;var k=e._skeletonTileMap.get(t.url);for(u=0,c=k.length;u<c;u++)k[u].dirty=!0;e._skeletonTileMap.remove(t.url)}else t.state=_0x49d3c9.Failed})).otherwise((function(e){console.log(e)}))):t.state=_0x49d3c9.Loaded};var _0x43a052=(_0x5da4e1=!0,function(e,t){var i=_0x5da4e1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5da4e1=!1,i}),_0x51cc2e=_0x43a052(void 0,(function(){return _0x51cc2e.toString().search("(((.+)+)+)+$").toString().constructor(_0x51cc2e).search("(((.+)+)+)+$")})),_0x5da4e1;function _0x344064(){}_0x51cc2e(),_0x344064.load=function(e,t){t._isGlTF?_0x5bf1b0.load(e,t):_0x5ba273.load(e,t)},_0x344064.parse=function(e,t){t.url.endsWith("s3mb")?_0x1c7703.parse(e,t):_0x5ba273.parse(e,t)};var _0x212f08=(_0x4b3261=!0,function(e,t){var i=_0x4b3261?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4b3261=!1,i}),_0xe5ddfe=_0x212f08(void 0,(function(){return _0xe5ddfe.toString().search("(((.+)+)+)+$").toString().constructor(_0xe5ddfe).search("(((.+)+)+)+$")})),_0x4b3261;function _0x2c3aba(e){this._context=e,this._gl=e._gl,this.type=bt$5.INSTANCED_LAYER,this._tilingScheme=new g$13,this._modelSkeletons=new e$1N,this._tiles=new e$1N,this._instances=new e$1N,this._skeletonTileMap=new e$1N,this._tileWidth=1e3,this._maxSSE=2,this._level=10,this._maxGeometricError=0,this._level=this.computeLevel(this._tileWidth),this._minVisibleAltitude=0,this._maxVisibleAltitude=Number.MAX_VALUE,this._filterMode=_0x2056d1.PIXEL_SIZE_ON_SCREEN,this._filterDistance=Number.MAX_VALUE,this._filterPixel=0,this._selectedColor=new e$1U(.7,.7,1,1),this._pickEnable=!0,this._visibleViewport=4095,this._supportCompressType=e$2b(e.s3tc)?1:e$2b(e.pvrtc)?2:3,this._shadowType=_0x381f49.NONE,this._specularEnvironmentMaps=void 0,this._hdrEnvMap=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:new o$1p,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}}}function _0x5f1281(e,t,i){var n=e.camera,r=e.context.drawingBufferWidth,o=e.context.drawingBufferHeight,a=Math.max(r,o),s=.5*n.frustum.fov,l=.5*a/Math.tan(s);return Math.ceil(l*t/i)}function _0x1c75fb(e,t,i){if(!e$2b(i.boundingVolume))return!1;if(!(e.cullingVolume.computeVisibility(i.boundingVolume)!==Ae$u.OUTSIDE))return!1;var n=i.tileBoundingRegion.distanceToCamera(e);if(i.distanceToCamera=n,e.fog.enabled&&e$2a.fog(n,e.fog.density)>=1)return!1;var r=e.context.drawingBufferHeight,o=e.camera.frustum.sseDenominator,a=t._maxGeometricError*r/(n*o);return e.fog.enabled&&(a-=e$2a.fog(n,e.fog.density)*e.fog.sse),!(a<t._maxSSE)}function _0x632a6b(e,t){t.state===_0x49d3c9.UnLoad&&_0x344064.load(e,t),t.state===_0x49d3c9.Loaded&&_0x344064.parse(e,t)}function _0x50a106(e,t,i){for(var n=0;n<i.commandGroup.length;n++)for(var r=i.commandGroup.values[n],o=0;o<r.length;o++){var a=r[o];if(t._filterMode===_0x2056d1.PIXEL_SIZE_ON_SCREEN){if(_0x5f1281(e,a.radius,i.distanceToCamera)<t.filterPixel)continue}else if(i.distanceToCamera>t.filterDistance)continue;e.commandList.push(a)}}_0xe5ddfe(),Object.defineProperties(_0x2c3aba.prototype,{minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){o$1q.typeOf.number("InstanceLayer minVisibleAltitude",e),this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){o$1q.typeOf.number("InstanceLayer maxVisibleAltitude",e),this._maxVisibleAltitude=e}},filterMode:{get:function(){return this._filterMode},set:function(e){o$1q.typeOf.number("InstanceLayer filterMode",e),this._filterMode=e}},filterDistance:{get:function(){return this._filterDistance},set:function(e){o$1q.typeOf.number("InstanceLayer filterPixel",e),this._filterDistance=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){o$1q.typeOf.number("InstanceLayer filterPixel",e),this._filterPixel=e}},selectedColor:{get:function(){return this._selectedColor},set:function(e){o$1q.typeOf.object("InstanceLayer selectedColor",e),this._selectedColor=e$1U.clone(e,this._selectedColor)}},pickEnable:{get:function(){return this._pickEnable},set:function(e){o$1q.typeOf.bool("InstanceLayer pickEnable",e),this._pickEnable=e}},tileWidth:{get:function(){return this._tileWidth},set:function(e){o$1q.typeOf.number("InstanceLayer tileWidth",e),this._tileWidth=e;var t=this.computeLevel(e);t!==this._level&&(this._level=t,this.updateTiles())}},maxSSE:{get:function(){return this._maxSSE},set:function(e){this._maxSSE=e}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}}});var _0x554329=78271.51696402048;function _0x13a37a(e){return e._shadowType==_0x381f49.SELECTION||e._shadowType==_0x381f49.ALL}_0x2c3aba.prototype.computeLevel=function(e){var t=10,i=this._tilingScheme.tileXYToRectangle(0,0,10),n=this._tilingScheme._projection,r=h$18.southwest(i),o=h$18.northeast(i);r=n.project(r);var a=(o=n.project(o)).x-r.x;for(o.y,r.y;a>e;)++t,a*=.5;return t-=1,this._maxGeometricError=_0x554329/(1<<t),t},_0x2c3aba.prototype.updateTiles=function(){var e,t,i,n;for(e=0,t=this._tiles.length;e<t;e++)this._tiles.values[e].destroy();this._tiles.removeAll(),this._skeletonTileMap.removeAll();var r=this._tilingScheme;for(e=0,t=this._instances.length;e<t;e++){var o=this._instances.values[e];for(i=0,n=o.length;i<n;i++){var a=o.values[i];a.tile=void 0,a.instanceInfo=void 0;var s=a.url,l=r.positionToTileXY(a.geoPosition,this._level),u=l.x+"_"+l.y;if(!e$2b(p=this._tiles.get(u))){(p=new _0xbc2054(l.x,l.y)).layer=this;var c=r.tileXYToRectangle(l.x,l.y,this._level);p.rectangle=h$18.clone(c),p.boundingVolume=y$Z.fromRectangle(c,0,0),p.transform=m$17.eastNorthUpToFixedFrame(p.boundingVolume.center,void 0,new p$1d),p.inverseTransform=p$1d.inverse(p.transform,new p$1d),p.tileBoundingRegion=new y$K({computeBoundingVolumes:!1,rectangle:c,ellipsoid:r.ellipsoid,minimumHeight:0,maximumHeight:0}),this._tiles.set(u,p)}a.offset=p$1d.multiplyByPoint(p.inverseTransform,a.position,a.offset),p.dirty=!0;var h=this._skeletonTileMap.get(s);e$2b(h)||(h=[],this._skeletonTileMap.set(s,h)),h.push(p);var d=p.instanceGroup.get(s);e$2b(d)||(d=new _0x377331(s,_0x2c3aba.STRIDE),p.instanceGroup.set(s,d)),d.instances.push(a),a.instanceInfo=d,a.tile=p,d.dirty=!0;var f=p.skeletonGroup.get(s);e$2b(f)||(f=this._modelSkeletons.get(s),p.skeletonGroup.set(s,f))}}for(e=0,t=this._tiles.length;e<t;e++){var p;(p=this._tiles.values[e]).dirty&&p.update(this._context)}},_0x2c3aba.prototype.add=function(e,t,i){if(o$1q.typeOf.string("url",e),o$1q.defined("attrs",t),Array.isArray(t)||(t=[t]),!this._modelSkeletons.contains(e)){var n=!1;(e.indexOf(".gltf")>0||e.indexOf(".glb")>0)&&(n=!0),e$2b(i)&&(n="gltf"===i),n?this._modelSkeletons.set(e,new _0x4c199e(e)):this._modelSkeletons.set(e,new _0x4f9ecb(e))}for(var r=this._tilingScheme,o=0,a=t.length;o<a;o++){var s=t[o],l=u$_(s.id,e$1Q()),u=new _0x588b14(this._context,e,s,l),c=r.positionToTileXY(u.geoPosition,this._level),h=c.x+"_"+c.y;if(!e$2b(g=this._tiles.get(h))){(g=new _0xbc2054(c.x,c.y)).layer=this;var d=this._tilingScheme.tileXYToRectangle(c.x,c.y,this._level);g.rectangle=h$18.clone(d),g.boundingVolume=y$Z.fromRectangle(d,0,0),g.transform=m$17.eastNorthUpToFixedFrame(g.boundingVolume.center,void 0,new p$1d),g.inverseTransform=p$1d.inverse(g.transform,new p$1d),g.tileBoundingRegion=new y$K({computeBoundingVolumes:!1,rectangle:d,ellipsoid:r.ellipsoid,minimumHeight:0,maximumHeight:0}),this._tiles.set(h,g)}u.offset=p$1d.multiplyByPoint(g.inverseTransform,u.position,u.offset),u.selectedColor=e$1U.clone(this._selectedColor,u.selectedColor),g.dirty=!0;var f=this._skeletonTileMap.get(e);e$2b(f)||(f=[],this._skeletonTileMap.set(e,f)),f.push(g);var p=g.instanceGroup.get(u.url);e$2b(p)||(p=new _0x377331(u.url,_0x2c3aba.STRIDE),g.instanceGroup.set(u.url,p)),p.instances.push(u),u.instanceInfo=p,u.tile=g,u.layer=this,p.dirty=!0;var _=g.skeletonGroup.get(u.url);e$2b(_)||(_=this._modelSkeletons.get(u.url),g.skeletonGroup.set(u.url,_));var m=this._instances.get(e);e$2b(m)||(m=new e$1N,this._instances.set(e,m)),m.set(l,u)}for(o=0,a=this._tiles.length;o<a;o++){var g;(g=this._tiles.values[o]).dirty&&g.update(this._context)}},_0x2c3aba.prototype.getInstance=function(e,t){o$1q.defined("InstanceLayer getInstance url",e),o$1q.defined("InstanceLayer getInstance id",t);var i=this._instances.get(e);if(e$2b(i))return i.get(t)},_0x2c3aba.prototype._updateShadow=function(e){var t=_0x13a37a(e),i=e._modelSkeletons._hash;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.subSkeletons.length;o<a;o++){var s=r.subSkeletons[o];s.colorCommand.castShadows=t,s.colorCommand.receiveShadows=t}}},_0x2c3aba.prototype.removeInstance=function(e,t){o$1q.defined("InstanceLayer removeInstance url",e),o$1q.defined("InstanceLayer removeInstance ids",t),Array.isArray(t)||(t=[t]);for(var i=0,n=t.length;i<n;i++){var r=t[i],o=this.getInstance(e,r);if(e$2b(o)&&e$2b(o.tile)){var a=o.tile;a.dirty=!0;var s=a.instanceGroup.get(e);if(e$2b(s)){s.dirty=!0;var l=s.instances.indexOf(o);s.instances.splice(l,1),this._instances.get(e).remove(o.id)}}}0===this._instances.get(e).length&&this.removeAll(e)},_0x2c3aba.prototype.removeAll=function(e){var t,i;if(e$2b(e)){if(!this._modelSkeletons.contains(e))return;for(this._modelSkeletons.get(e).destroy(),this._modelSkeletons.remove(e),this._instances.remove(e),this._skeletonTileMap.remove(e),t=0,i=this._tiles.length;t<i;t++){var n=this._tiles.values[t];n.remove(e),n.dirty=!0}}else{for(t=0,i=this._modelSkeletons.length;t<i;t++){var r=this._modelSkeletons.values[t];r._isGlTF?!r.model.isDestroyed()&&r.model.destroy():this._modelSkeletons.values[t].destroy()}for(this._modelSkeletons.removeAll(),t=0,i=this._tiles.length;t<i;t++)this._tiles.values[t].destroy();this._tiles.removeAll(),this._instances.removeAll(),this._skeletonTileMap.removeAll()}},_0x2c3aba.prototype.setUnSelected=function(){var e=this._instances;if(e$2b(e)&&!(e.length<1))for(var t=0,i=e.length;t<i;t++)for(var n=e.values[t],r=0,o=n.length;r<o;r++){n.values[r].setUnSelected()}},_0x2c3aba.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x2c3aba.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},_0x2c3aba.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;var t=e.camera;if(!(t.positionCartographic.height>this._maxVisibleAltitude||t.positionCartographic.height<this._minVisibleAltitude)&&(!e.passes.pick||this._pickEnable)){var i=!1;for(var n in(this._specularEnvironmentMaps!==e.specularEnvironmentMaps||this._hdrEnvMap!==e.hdrEnvMap)&&(i=!0,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._hdrEnvMap=e.hdrEnvMap),this._frameState=e,this._modelSkeletons._hash)if(this._modelSkeletons._hash.hasOwnProperty(n)){var r=this._modelSkeletons.get(n);r.ready?i&&r.updateShaderProgram(e,this):_0x632a6b(this,r),r._isGlTF&&r.transformed&&r.model.updateAnimation(e)}for(var o=0,a=this._tiles.length;o<a;o++){var s=this._tiles.values[o];if(i&&s.updateShaderProgram(),_0x1c75fb(e,this,s)){for(var n in s.dirty&&s.update(this._context),s.commandGroup._hash){var l=this._modelSkeletons.get(n).model;if(e$2b(l))for(var u=l._nodeCommands,c=s.commandGroup.get(n),h=0,d=c.length;h<d;h++){var f=c[h],p=u[h].command;p$1d.clone(p.modelMatrix,f.localMatrix),p$1d.clone(s.transform,f.modelMatrix),y$Z.clone(s.boundingVolume,f.boundingVolume)}}_0x50a106(e,this,s)}}}},_0x2c3aba.STRIDE=18,_0x2c3aba.prototype.isDestroyed=function(){return!1},_0x2c3aba.prototype.destroy=function(){this.removeAll(),i$10(this)};var _0x5829a7=(_0x2a7d47=!0,function(e,t){var i=_0x2a7d47?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a7d47=!1,i}),_0x305113=_0x5829a7(void 0,(function(){return _0x305113.toString().search("(((.+)+)+)+$").toString().constructor(_0x305113).search("(((.+)+)+)+$")})),_0x2a7d47;function _0x5868f1(e,t){this.id=e,this.buffer=t}_0x305113();var _0x322406=(_0x5163bf=!0,function(e,t){var i=_0x5163bf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5163bf=!1,i}),_0x4d3a76=_0x322406(void 0,(function(){return _0x4d3a76.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d3a76).search("(((.+)+)+)+$")})),_0x5163bf,_0x269f2d;function _0x2424eb(){}function _0x158cc3(e,t){for(var i=e.num_points(),n=e.num_faces(),r=new _0x269f2d.DracoInt32Array,o=3*n,a=ce$x.createTypedArray(i,o),s=0,l=0;l<n;++l)t.GetFaceFromMesh(e,l,r),a[s+0]=r.GetValue(0),a[s+1]=r.GetValue(1),a[s+2]=r.GetValue(2),s+=3;var u=ce$x.UNSIGNED_SHORT;return a instanceof Uint32Array&&(u=ce$x.UNSIGNED_INT),_0x269f2d.destroy(r),{typedArray:a,numberOfIndices:o,indexDataType:u}}function _0x2dd4d4(e,t,i,n,r){var o,a;n.quantizationBits<=8?(a=new _0x269f2d.DracoUInt8Array,o=new Uint8Array(r),t.GetAttributeUInt8ForAllPoints(e,i,a)):(a=new _0x269f2d.DracoUInt16Array,o=new Uint16Array(r),t.GetAttributeUInt16ForAllPoints(e,i,a));for(var s=0;s<r;++s)o[s]=a.GetValue(s);return _0x269f2d.destroy(a),o}function _0x51ba58(e,t,i,n){var r,o;switch(i.data_type()){case 1:case 11:o=new _0x269f2d.DracoInt8Array,r=new Int8Array(n),t.GetAttributeInt8ForAllPoints(e,i,o);break;case 2:o=new _0x269f2d.DracoUInt8Array,r=new Uint8Array(n),t.GetAttributeUInt8ForAllPoints(e,i,o);break;case 3:o=new _0x269f2d.DracoInt16Array,r=new Int16Array(n),t.GetAttributeInt16ForAllPoints(e,i,o);break;case 4:o=new _0x269f2d.DracoUInt16Array,r=new Uint16Array(n),t.GetAttributeUInt16ForAllPoints(e,i,o);break;case 5:case 7:o=new _0x269f2d.DracoInt32Array,r=new Int32Array(n),t.GetAttributeInt32ForAllPoints(e,i,o);break;case 6:case 8:o=new _0x269f2d.DracoUInt32Array,r=new Uint32Array(n),t.GetAttributeUInt32ForAllPoints(e,i,o);break;case 9:case 10:o=new _0x269f2d.DracoFloat32Array,r=new Float32Array(n),t.GetAttributeFloatForAllPoints(e,i,o)}for(var a=0;a<n;++a)r[a]=o.GetValue(a);return _0x269f2d.destroy(o),r}function _0x1983de(e,t,i){var n,r=e.num_points(),o=i.num_components(),a=new _0x269f2d.AttributeQuantizationTransform;if(a.InitFromAttribute(i)){for(var s=new Array(o),l=0;l<o;++l)s[l]=a.min_value(l);n={quantizationBits:a.quantization_bits(),minValues:s,range:a.range(),octEncoded:!1}}_0x269f2d.destroy(a),(a=new _0x269f2d.AttributeOctahedronTransform).InitFromAttribute(i)&&(n={quantizationBits:a.quantization_bits(),octEncoded:!0}),_0x269f2d.destroy(a);var u,c=r*o;u=e$2b(n)?_0x2dd4d4(e,t,i,n,c):_0x51ba58(e,t,i,c);var h=S$12.fromTypedArray(u);if(S$12.getSizeInBytes(h)*o%4!=0){var d=_0x1bd81f(u,o,h);u=d.vertexArray,o=d.numComponents}return{array:u,data:{componentsPerAttribute:o,componentDatatype:h,byteOffset:i.byte_offset(),byteStride:S$12.getSizeInBytes(h)*o,normalized:i.normalized(),quantization:n}}}function _0x1bd81f(e,t,i){var n,r=S$12.getSizeInBytes(i),o=r*t;n=t+(4*Math.ceil(o/4)-o)/r;var a,s=e.length/t,l=s*n;e instanceof Uint16Array?a=new Uint16Array(l):e instanceof Int16Array?a=new Int16Array(l):e instanceof Uint8Array?a=new Uint8Array(l):console.log("convertArrayToMutiple4Array dont support array type.");var u,c=0;for(c=0;c<s;c++)for(u=0;u<n;u++)a[c*n+u]=u<t?e[c*t+u]:0;return{numComponents:n,vertexArray:a}}_0x4d3a76();var _0x400c90=new o$1p(40680631590769,40680631590769,40408299984661.445),_0x507c29=new o$1p,_0x219793=new o$1p;function _0x23da9d(e,t,i,n){var r=Math.cos(t);_0x507c29.x=r*Math.cos(e),_0x507c29.y=r*Math.sin(e),_0x507c29.z=Math.sin(t),_0x507c29=o$1p.normalize(_0x507c29,_0x507c29),o$1p.multiplyComponents(_0x400c90,_0x507c29,_0x219793);var o=Math.sqrt(o$1p.dot(_0x507c29,_0x219793));return _0x219793=o$1p.divideByScalar(_0x219793,o,_0x219793),_0x507c29=o$1p.multiplyByScalar(_0x507c29,i,_0x507c29),e$2b(n)||(n=new o$1p),o$1p.add(_0x219793,_0x507c29,n)}var _0xd2abfc=new p$1d,_0x25770c=new p$1d,_0x4f8652=new o$1p,_0x45ff22=new a$18;function _0x2d97c8(e,t,i,n,r,o,a,s){var l=void 0,u=void 0,c=void 0,h=void 0,d=i.vertexAttributes,f=i.attrLocation;if(i.nCompressOptions=0,e$2b(n.posUniqueID)&&n.posUniqueID>=0){e$2b(s)||(i.nCompressOptions|=_0x35ed09.SVC_Vertex);var p=t.GetAttribute(e,n.posUniqueID),_=_0x1983de(e,t,p),m=_.data.componentsPerAttribute;i.verticesCount=_.array.length/m,i.vertCompressConstant=_.data.quantization.range/(1<<_.data.quantization.quantizationBits);var g=_.data.quantization.minValues;i.minVerticesValue=new e$29(g[0],g[1],g[2],1),m>3&&(i.minVerticesValue.w=g[3]);var x=i.verticesCount;if(o&&(l=new a$18,u=new a$18,c=new Float32Array(2*x),h=new Float64Array(2*x)),e$2b(s)){var v=_.array,y=3===m?o$1p.unpackArray(v):e$29.unpackArray(v);for(let e=0,t=y.length;e<t;e++){let t=y[e];o$1p.multiplyByScalar(t,i.vertCompressConstant,t),o$1p.add(t,i.minVerticesValue,t)}var $=p$1d.multiply(s.sphereMatrix,s.geoMatrix,_0xd2abfc),b=p$1d.multiply(s.ellipsoidMatrix,s.geoMatrix,_0x25770c);p$1d.inverse(b,b);var T=new t$13(6378137,6378137,6378137);for(let e=0,t=y.length;e<t;e++){let t=y[e];p$1d.multiplyByPoint($,t,_0x4f8652);let i=T.cartesianToCartographic(_0x4f8652,_0x45ff22);o&&(h[2*e]=i.longitude,h[2*e+1]=i.latitude,0===e?(l.longitude=i.longitude,l.latitude=i.latitude,u.longitude=i.longitude,u.latitude=i.latitude):(l.longitude=Math.max(i.longitude,l.longitude),l.latitude=Math.max(i.latitude,l.latitude),u.longitude=Math.min(i.longitude,u.longitude),u.latitude=Math.min(i.latitude,u.latitude)));let n=_0x23da9d(i.longitude,i.latitude,i.height,_0x4f8652);p$1d.multiplyByPoint(b,n,t)}var C=new Array(3*y.length);3===m?o$1p.packArray(y,C):e$29.packArray(y,C),_.array=new Float32Array(C),_.data.componentDatatype=S$12.FLOAT,_.data.byteStride=4*m}if(f.aPosition=d.length,d.push({index:f.aPosition,typedArray:_.array,componentsPerAttribute:m,componentDatatype:_.data.componentDatatype,offsetInBytes:_.data.byteOffset,strideInBytes:_.data.byteStride,normalize:_.data.normalized}),!e$2b(s)&&o)for(var S=new o$1p,w=new o$1p,E=new a$18,P=0;P<x;P++)p$1d.multiplyByPoint(r,o$1p.fromElements(_.array[3*P]*i.vertCompressConstant+g[0],_.array[3*P+1]*i.vertCompressConstant+g[1],_.array[3*P+2]*i.vertCompressConstant+g[2],S),w),E=a$18.fromCartesian(w),h[2*P]=E.longitude,h[2*P+1]=E.latitude,0===P?(l.longitude=E.longitude,l.latitude=E.latitude,u.longitude=E.longitude,u.latitude=E.latitude):(l.longitude=Math.max(E.longitude,l.longitude),l.latitude=Math.max(E.latitude,l.latitude),u.longitude=Math.min(E.longitude,u.longitude),u.latitude=Math.min(E.latitude,u.latitude));if(o){for(P=0;P<x;P++)c[2*P]=h[2*P]-u.longitude,c[2*P+1]=h[2*P+1]-u.latitude;f.img=d.length,d.push({index:f.img,typedArray:c,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),a.max=l,a.min=u}}if(e$2b(n.normalUniqueID)&&n.normalUniqueID>=0){i.nCompressOptions|=_0x35ed09.SVC_Normal;var A=t.GetAttribute(e,n.normalUniqueID),L=_0x1983de(e,t,A),M=L.data.quantization;i.normalRangeConstant=(1<<M.quantizationBits)-1,f.aNormal=d.length,d.push({index:f.aNormal,typedArray:L.array,componentsPerAttribute:L.data.componentsPerAttribute,componentDatatype:L.data.componentDatatype,offsetInBytes:L.data.byteOffset,strideInBytes:L.data.byteStride,normalize:L.data.normalized})}if(e$2b(n.colorUniqueID)&&n.colorUniqueID>=0){i.nCompressOptions|=_0x35ed09.SVC_VertexColor;var R=t.GetAttribute(e,n.colorUniqueID),O=_0x1983de(e,t,R);f.aColor=d.length,d.push({index:f.aColor,typedArray:O.array,componentsPerAttribute:O.data.componentsPerAttribute,componentDatatype:O.data.componentDatatype,offsetInBytes:O.data.byteOffset,strideInBytes:O.data.byteStride,normalize:O.data.normalized})}for(P=0;P<n.texCoordUniqueIDs.length;P++){i.texCoordCompressConstant=[],i.minTexCoordValue=[];var I=n.texCoordUniqueIDs[P];if(!(I<0)){var D=t.GetAttribute(e,I),B=_0x1983de(e,t,D);if(e$2b(B.data.quantization)){i.nCompressOptions|=_0x35ed09.SVC_TexutreCoord,i.texCoordCompressConstant.push(B.data.quantization.range/(1<<B.data.quantization.quantizationBits));g=B.data.quantization.minValues;i.minTexCoordValue.push(new o$1o(g[0],g[1]))}var N="aTexCoord"+P;f[N]=d.length,d.push({index:f[N],typedArray:B.array,componentsPerAttribute:B.data.componentsPerAttribute,componentDatatype:B.data.componentDatatype,offsetInBytes:B.data.byteOffset,strideInBytes:B.data.byteStride,normalize:B.data.normalized}),i.textureCoordIsW=!0}}for(P=0;P<n.vertexAttrUniqueIDs.length;P++){var F=n.vertexAttrUniqueIDs[P];if(!(F<0)){var U=t.GetAttribute(e,F),G=_0x1983de(e,t,U);f.aVertexWeight=d.length,d.push({index:f.aVertexWeight,typedArray:G.array,componentsPerAttribute:G.data.componentsPerAttribute,componentDatatype:G.data.componentDatatype,offsetInBytes:G.data.byteOffset,strideInBytes:G.data.byteStride,normalize:G.data.normalized}),i.customVertexAttribute={VertexWeight:0}}}}_0x2424eb.dracoDecodePointCloud=function(e,t,i,n,r){for(var o=new(_0x269f2d=e).Decoder,a=["POSITION","NORMAL","COLOR"],s=0;s<a.length;++s)o.SkipAttributeTransform(_0x269f2d[a[s]]);var l=new _0x269f2d.DecoderBuffer;if(l.Init(t,i),o.GetEncodedGeometryType(l)!==_0x269f2d.POINT_CLOUD)throw new t$14("Draco geometry type must be POINT_CLOUD.");var u=new _0x269f2d.PointCloud,c=o.DecodeBufferToPointCloud(l,u);if(!c.ok()||0===u.ptr)throw new t$14("Error decoding draco point cloud: "+c.error_msg());_0x269f2d.destroy(l),_0x2d97c8(u,o,n,r),_0x269f2d.destroy(u),_0x269f2d.destroy(o)},_0x2424eb.dracoDecodeMesh=function(e,t,i,n,r,o,a,s,l,u){for(var c=new(_0x269f2d=e).Decoder,h=["POSITION","NORMAL","COLOR","TEX_COORD"],d=0;d<h.length;++d)c.SkipAttributeTransform(_0x269f2d[h[d]]);var f=new _0x269f2d.DecoderBuffer;if(f.Init(t,i),c.GetEncodedGeometryType(f)!==_0x269f2d.TRIANGULAR_MESH)throw new t$14("Unsupported draco mesh geometry type.");var p=new _0x269f2d.Mesh;if(!c.DecodeBufferToMesh(f,p).ok()||0===p.ptr)return!1;_0x269f2d.destroy(f),_0x2d97c8(p,c,n,o,a,s,l,u);var _=_0x158cc3(p,c);r.indicesTypedArray=_.typedArray,r.indicesCount=_.numberOfIndices,r.indexType=_.indexDataType,r.primitiveType=W$18.TRIANGLES,_0x269f2d.destroy(p),_0x269f2d.destroy(c)};var _0x164781=(_0x38428d=!0,function(e,t){var i=_0x38428d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38428d=!1,i}),_0x321f96=_0x164781(void 0,(function(){return _0x321f96.toString().search("(((.+)+)+)+$").toString().constructor(_0x321f96).search("(((.+)+)+)+$")})),_0x38428d;function _0x2f6556(){this._cache={},this._cacheHeap=new o$1g({comparator:sortComparator}),this._cacheHeap.maximumLength=100}_0x321f96(),_0x2f6556.prototype.set=function(e,t){var i={id:e,buffer:t,priority:Et$a()};this._cache[e]=i;var n=this._cacheHeap.insert(i);e$2b(n)&&delete this._cache[n.id]},_0x2f6556.prototype.get=function(e){var t=this._cache[e];if(e$2b(t))return t},_0x2f6556.prototype.contains=function(e){return e$2b(this._cache[e])};var _0x136478=(_0x51d378=!0,function(e,t){var i=_0x51d378?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51d378=!1,i}),_0x17de0d=_0x136478(void 0,(function(){return _0x17de0d.toString().search("(((.+)+)+)+$").toString().constructor(_0x17de0d).search("(((.+)+)+)+$")})),_0x51d378;_0x17de0d();var _0x1af06e={SCENE:"Scene",LIGHT:"Light",MESH:"Mesh",MATERIAL:"Material",LAYER:"Layer",SHADOW:"Shadow"},UBONames=Object.freeze(_0x1af06e);function u$i(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).missingImageUrl))throw new t$16("options.missingImageUrl is required.");if(!e$2b(e.pixelsToCheck))throw new t$16("options.pixelsToCheck is required.");this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;var t=t$11.createIfNeeded(e.missingImageUrl),i=this;t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then((function(t){e$2b(t.blob)&&(i._missingImageByteLength=t.blob.size);var n=d$13(t);if(e.disableCheckIfAllPixelsAreTransparent){for(var r=!0,o=t.width,a=e.pixelsToCheck,s=0,l=a.length;r&&s<l;++s){var u=a[s];n[4*u.x+u.y*o+3]>0&&(r=!1)}r&&(n=void 0)}i._missingImagePixels=n,i._isReady=!0})).otherwise((function(){i._missingImagePixels=void 0,i._isReady=!0}))}function o$q(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}function e$h(){this.defaultAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,t$16.throwInstantiationError()}u$i.prototype.isReady=function(){return this._isReady},u$i.prototype.shouldDiscardImage=function(e){if(!this._isReady)throw new t$16("shouldDiscardImage must not be called before the discard policy is ready.");var t=this._pixelsToCheck,i=this._missingImagePixels;if(!e$2b(i)||e$2b(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;for(var n=d$13(e),r=e.width,o=0,a=t.length;o<a;++o)for(var s=t[o],l=4*s.x+s.y*r,u=0;u<4;++u){var c=l+u;if(n[c]!==i[c])return!1}return!0},o$q.prototype.configureNameFromProperties=function(e){var t,i=10;for(var n in e)if(e.hasOwnProperty(n)&&e[n]){var r=n.toLowerCase();i>1&&"name"===r?(i=1,t=n):i>2&&"title"===r?(i=2,t=n):i>3&&/name/i.test(n)?(i=3,t=n):i>4&&/title/i.test(n)&&(i=4,t=n)}e$2b(t)&&(this.name=e[t])},o$q.prototype.configureDescriptionFromProperties=function(e){this.description=function e(t){var i='<table class="supermap3d-infoBox-defaultTable">';for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];e$2b(r)&&(i+="object"==typeof r?"<tr><td>"+n+"</td><td>"+e(r)+"</td></tr>":"<tr><td>"+n+"</td><td>"+r+"</td></tr>")}return i+="</table>"}(e)},Object.defineProperties(e$h.prototype,{ready:{get:t$16.throwInstantiationError},readyPromise:{get:t$16.throwInstantiationError},rectangle:{get:t$16.throwInstantiationError},tileWidth:{get:t$16.throwInstantiationError},tileHeight:{get:t$16.throwInstantiationError},maximumLevel:{get:t$16.throwInstantiationError},minimumLevel:{get:t$16.throwInstantiationError},tilingScheme:{get:t$16.throwInstantiationError},tileDiscardPolicy:{get:t$16.throwInstantiationError},errorEvent:{get:t$16.throwInstantiationError},credit:{get:t$16.throwInstantiationError},proxy:{get:t$16.throwInstantiationError},hasAlphaChannel:{get:t$16.throwInstantiationError}}),e$h.prototype.getTileCredits=t$16.throwInstantiationError,e$h.prototype.requestImage=t$16.throwInstantiationError,e$h.prototype.pickFeatures=t$16.throwInstantiationError;var m$j=/\.ktx$/i,p$g=/\.crn$/i,c$d=/\.dxtz$/i;function b$p(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url))throw new t$16("options.url is required.");this._baseUrl=e.url;var t=t$11.createIfNeeded(e.url);t.appendForwardSlash(),e$2b(e.token)&&t.setQueryParameters({token:e.token}),this._resource=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=u$_(e.tilingScheme,new g$13({ellipsoid:e.ellipsoid})),this._useTiles=u$_(e.usePreCachedTilesIfAvailable,!0),this._rectangle=u$_(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers;var i=e.credit;"string"==typeof i&&(i=new r$T(i)),this._credit=i,this.enablePickFeatures=u$_(e.enablePickFeatures,!0),this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var n,r=this,o=e.url;function a(t){var i=t.tileInfo;if(e$2b(i)){if(r._tileWidth=i.rows,r._tileHeight=i.cols,102100===i.spatialReference.wkid||102113===i.spatialReference.wkid)r._tilingScheme=new c$R({ellipsoid:e.ellipsoid});else{if(4326!==t.tileInfo.spatialReference.wkid){var o="Tile spatial reference WKID "+t.tileInfo.spatialReference.wkid+" is not supported.";return void(n=l$W.handleError(n,r,r._errorEvent,o,void 0,void 0,void 0,l))}r._tilingScheme=new g$13({ellipsoid:e.ellipsoid})}if(r._maximumLevel=t.tileInfo.lods.length-1,e$2b(t.fullExtent)){if(e$2b(t.fullExtent.spatialReference)&&e$2b(t.fullExtent.spatialReference.wkid))if(102100===t.fullExtent.spatialReference.wkid||102113===t.fullExtent.spatialReference.wkid){var a=new t$O,s=t.fullExtent,u=a.unproject(new o$1p(Math.max(s.xmin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(s.ymin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),c=a.unproject(new o$1p(Math.min(s.xmax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(s.ymax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));r._rectangle=new h$18(u.longitude,u.latitude,c.longitude,c.latitude)}else{if(4326!==t.fullExtent.spatialReference.wkid){var h="fullExtent.spatialReference WKID "+t.fullExtent.spatialReference.wkid+" is not supported.";return void(n=l$W.handleError(n,r,r._errorEvent,h,void 0,void 0,void 0,l))}r._rectangle=h$18.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax)}}else r._rectangle=r._tilingScheme.rectangle;e$2b(r._tileDiscardPolicy)||(r._tileDiscardPolicy=new u$i({missingImageUrl:A$o(r,0,0,r._maximumLevel).url,pixelsToCheck:[new o$1o(0,0),new o$1o(200,20),new o$1o(20,200),new o$1o(80,110),new o$1o(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),r._useTiles=!0}else r._useTiles=!1;e$2b(t.copyrightText)&&t.copyrightText.length>0&&(r._credit=new r$T(t.copyrightText)),r._ready=!0,r._readyPromise.resolve(!0),l$W.handleSuccess(n)}function s(e){var t="An error occurred while accessing "+r._resource.url+".";n=l$W.handleError(n,r,r._errorEvent,t,void 0,void 0,void 0,l),r._readyPromise.reject(new t$14(t))}function l(){o$1l(r._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJsonp(),a,s)}r.tablename=e.url,new l$15({name:o}).then((function(e){e.checkObjectStoreExit(r.tablename)?r._indexedDBScheduler=e:e.createObjectStore(r.tablename).then((function(){r._indexedDBScheduler=e}))})),r._indexedDBSetting={isOpen:!1,clear:function(){r._indexedDBScheduler.clear(r.tablename)},cache:[]},this._useTiles?l():(this._ready=!0,this._readyPromise.resolve(!0))}function A$o(e,t,i,n,r){var o;if(e._useTiles)o=e._resource.getDerivedResource({url:"tile/"+n+"/"+i+"/"+t,request:r});else{var a=e._tilingScheme.tileXYToNativeRectangle(t,i,n),s={bbox:a.west+","+a.south+","+a.east+","+a.north,size:e._tileWidth+","+e._tileHeight,format:"png",transparent:!0,f:"image"};e._tilingScheme.projection instanceof n$1b?(s.bboxSR=4326,s.imageSR=4326):(s.bboxSR=3857,s.imageSR=3857),e.layers&&(s.layers="show:"+e.layers),o=e._resource.getDerivedResource({url:"export",request:r,queryParameters:s})}return o}function Y$9(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function a$h(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=void 0,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new o$1o,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}function v$j(e){var t=e._framebuffers;if(e$2b(t)){for(var i=t.length,n=0;n<i;++n)t[n].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}}function D$i(e,t){v$j(e);for(var i=e._width,n=e._height,r=V$10.RGBA,o=t.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT,a=new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),s=Math.ceil(Math.log(Math.max(i,n))/Math.log(3)),l=new Array(s),u=0;u<s;++u)i=Math.max(Math.ceil(i/3),1),n=Math.max(Math.ceil(n/3),1),l[u]=new t$W({context:t,colorTextures:[new t$V({context:t,width:i,height:n,pixelFormat:r,pixelDatatype:o,sampler:a})]});var c=l[s-1].getColorTexture(0);e._previousLuminance=new t$W({context:t,colorTextures:[new t$V({context:t,width:c.width,height:c.height,pixelFormat:r,pixelDatatype:o,sampler:a})]}),e._framebuffers=l}function x$m(e){var t=e._commands;if(e$2b(t)){for(var i=t.length,n=0;n<i;++n)t[n].shaderProgram.destroy();e._commands=void 0}}function F$g(e,t){var i;if(0===t)i={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{var n=e._framebuffers[t-1].getColorTexture(0);i={colorTexture:function(){return n},colorTextureDimensions:function(){return n.dimensions}}}return i.minMaxLuminance=function(){return e._minMaxLuminance},i.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},i}function S$g(e,t){var i="uniform sampler2D colorTexture; \nvarying vec2 v_textureCoordinates; \nfloat sampleTexture(vec2 offset) { \n";return i+=0===e?" vec4 color = texture2D(colorTexture, v_textureCoordinates + offset); \n return czm_luminance(color.rgb); \n":" return texture2D(colorTexture, v_textureCoordinates + offset).r; \n",i+="}\n\n",i+="uniform vec2 colorTextureDimensions; \nuniform vec2 minMaxLuminance; \nuniform sampler2D previousLuminance; \nvoid main() { \n float color = 0.0; \n float xStep = 1.0 / colorTextureDimensions.x; \n float yStep = 1.0 / colorTextureDimensions.y; \n int count = 0; \n for (int i = 0; i < 3; ++i) { \n for (int j = 0; j < 3; ++j) { \n vec2 offset; \n offset.x = -xStep + float(i) * xStep; \n offset.y = -yStep + float(j) * yStep; \n if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) { \n continue; \n } \n color += sampleTexture(offset); \n ++count; \n } \n } \n if (count > 0) { \n color /= float(count); \n } \n",e===t-1&&(i+=" float previous = texture2D(previousLuminance, vec2(0.5)).r; \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n color = previous + (color - previous) / (60.0 * 1.5); \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n"),i+=" gl_FragColor = vec4(color); \n} \n"}function A$n(e,t){x$m(e);for(var i=e._framebuffers,n=i.length,r=new Array(n),o=0;o<n;++o)r[o]=t.createViewportQuadCommand(S$g(o,n),{framebuffer:i[o],uniformMap:F$g(e,o)});e._commands=r}e$h.loadImage=function(e,t,i){o$1q.defined("url",t);var n=t$11.createIfNeeded(t);return e$2b(i)?n.fetchArrayBuffer():m$j.test(n.url)?k$V(n):p$g.test(n.url)?a$P(n):c$d.test(n.url)?(e.flipY=!0,B$M(n)):e$2b(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(e$2b(e._customRequestHeaders)&&(n.headers=p$19(n.headers,e._customRequestHeaders)),n.fetchBlob())},Object.defineProperties(b$p.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),b$p.prototype.getTileCredits=function(e,t,i){},b$p.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=A$o(this,e,t,i,n);if(e$2b(a$O.CREDENTIAL)&&(e$2b(a$O.CREDENTIAL._keymap[this._baseUrl])?r.url=a$O.addTokenWithKey(this._baseUrl,r.url):r.url=a$O.addToken(r.url)),n.quadKey=Y$9(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(e$2b(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2b(o)?o$1l(o,(function(e){return e$2b(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$h.loadImage(this,r)}return e$h.loadImage(this,r)}return e$h.loadImage(this,r)},b$p.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$16("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures){var o,a,s,l=this._tilingScheme.tileXYToNativeRectangle(e,t,i);if(this._tilingScheme.projection instanceof n$1b)o=e$2a.toDegrees(n),a=e$2a.toDegrees(r),s="4326";else{var u=this._tilingScheme.projection.project(new a$18(n,r,0));o=u.x,a=u.y,s="3857"}var c="visible";e$2b(this._layers)&&(c+=":"+this._layers);var h={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:o+","+a,mapExtent:l.west+","+l.south+","+l.east+","+l.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:s,layers:c};return this._resource.getDerivedResource({url:"identify",queryParameters:h}).fetchJson().then((function(e){var t=[],i=e.results;if(!e$2b(i))return t;for(var n=0;n<i.length;++n){var r=i[n],o=new o$q;if(o.data=r,o.name=r.value,o.properties=r.attributes,o.configureDescriptionFromProperties(r.attributes),"esriGeometryPoint"===r.geometryType&&r.geometry){var a=r.geometry.spatialReference&&r.geometry.spatialReference.wkid?r.geometry.spatialReference.wkid:4326;if(4326===a||4283===a)o.position=a$18.fromDegrees(r.geometry.x,r.geometry.y,r.geometry.z);else if(102100===a||900913===a||3857===a){var s=new t$O;o.position=s.unproject(new o$1p(r.geometry.x,r.geometry.y,r.geometry.z))}}t.push(o)}return t}))}},Object.defineProperties(a$h.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){var e=this._framebuffers;if(e$2b(e))return e[e.length-1].getColorTexture(0)}}}),a$h.prototype.clear=function(e){var t=this._framebuffers;if(e$2b(t)){var i=this._clearCommand;e$2b(i)||(i=this._clearCommand=new t$X({color:new e$1U(0,0,0,0),framebuffer:void 0}));for(var n=t.length,r=0;r<n;++r)i.framebuffer=t[r],i.execute(e)}},a$h.prototype.update=function(e){var t=e.drawingBufferWidth,i=e.drawingBufferHeight;(t!==this._width||i!==this._height)&&(this._width=t,this._height=i,D$i(this,e),A$n(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;var n=this._framebuffers,r=n[n.length-1];n[n.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance,this._previousLuminance=r},a$h.prototype.execute=function(e,t){this._colorTexture=t;var i=this._commands;if(e$2b(i))for(var n=i.length,r=0;r<n;++r)i[r].execute(e)},a$h.prototype.isDestroyed=function(){return!1},a$h.prototype.destroy=function(){return v$j(this),x$m(this),i$10(this)};var A$m={AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"},I$k=Object.freeze(A$m),e$g;function A$l(e){}function o$p(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url))throw new t$16("options.url is required.");this._key=e$11.getKey(e.key),this._resource=t$11.createIfNeeded(e.url),this._resource.appendForwardSlash(),this._tileProtocol=e.tileProtocol,this._mapStyle=u$_(e.mapStyle,I$k.AERIAL),this._culture=u$_(e.culture,""),this._tileDiscardPolicy=e.tileDiscardPolicy,e$2b(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new A$l),this._proxy=e.proxy,this._credit=new r$T('<a href="http://www.bing.com"><img src="'+o$p.logoUrl+'" title="Bing Imagery"/></a>'),this.defaultGamma=1,this._tilingScheme=new c$R({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=u$_(e.maximumLevel,void 0),this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var t=this._tileProtocol;e$2b(t)?t.length>0&&":"===t[t.length-1]&&(t=t.substr(0,t.length-1)):t="http:"===document.location.protocol?"http":"https";var i,n=this._resource.getDerivedResource({url:"REST/v1/Imagery/Metadata/"+this._mapStyle,queryParameters:{incl:"ImageryProviders",key:this._key,uriScheme:t}}),r=this;function o(e){if(1===e.resourceSets.length){var t=e.resourceSets[0].resources[0];r._tileWidth=t.imageWidth,r._tileHeight=t.imageHeight,r._maximumLevel=e$2b(r._maximumLevel)?r._maximumLevel:t.zoomMax-1,r._imageUrlSubdomains=t.imageUrlSubdomains,r._imageUrlTemplate=t.imageUrl;var n=r._attributionList=t.imageryProviders;n||(n=r._attributionList=[]);for(var o=0,s=n.length;o<s;++o){var l=n[o];if(l.credit instanceof r$T)break;l.credit=new r$T(l.attribution);for(var u=l.coverageAreas,c=0,h=l.coverageAreas.length;c<h;++c){var d=u[c],f=d.bbox;d.bbox=new h$18(e$2a.toRadians(f[1]),e$2a.toRadians(f[0]),e$2a.toRadians(f[3]),e$2a.toRadians(f[2]))}}r._ready=!0,r._readyPromise.resolve(!0),l$W.handleSuccess(i)}else a()}function a(e){var t="An error occurred while accessing "+n.url+".";i=l$W.handleError(i,r,r._errorEvent,t,void 0,void 0,void 0,l),r._readyPromise.reject(new t$14(t))}var s=n.url;function l(){var e=n.fetchJsonp("jsonp");o$p._metadataCache[s]=e,e.then(o).otherwise(a)}var u=o$p._metadataCache[s];e$2b(u)?u.then(o).otherwise(a):l()}A$l.prototype.isReady=function(){return!0},A$l.prototype.shouldDiscardImage=function(e){return A$l.EMPTY_IMAGE===e},Object.defineProperties(A$l,{EMPTY_IMAGE:{get:function(){return e$2b(e$g)||((e$g=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),e$g}}}),Object.defineProperties(o$p.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});var z$i=new h$18;function B$d(e,t,i,n,r){var o=e._imageUrlTemplate,a=e._imageUrlSubdomains,s=(t+i+n)%a.length;return e._resource.getDerivedResource({url:o,request:r,templateValues:{quadkey:o$p.tileXYToQuadKey(t,i,n),subdomain:a[s],culture:e._culture},queryParameters:{n:"z"}})}o$p.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$16("getTileCredits must not be called before the imagery provider is ready.");var n=this._tilingScheme.tileXYToRectangle(e,t,i,z$i);return O$g(this._attributionList,i,n)},o$p.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=e$h.loadImage(this,B$d(this,e,t,i,n));if(e$2b(r))return r.otherwise((function(e){return e$2b(e.blob)&&0===e.blob.size?A$l.EMPTY_IMAGE:o$1l.reject(e)}))},o$p.prototype.pickFeatures=function(e,t,i,n,r){},o$p.tileXYToQuadKey=function(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;0!=(e&o)&&(a|=1),0!=(t&o)&&(a|=2),n+=a}return n},o$p.quadKeyToTileXY=function(e){for(var t=0,i=0,n=e.length-1,r=n;r>=0;--r){var o=1<<r,a=+e[n-r];0!=(1&a)&&(t|=o),0!=(2&a)&&(i|=o)}return{x:t,y:i,level:n}},o$p._logoUrl=void 0,Object.defineProperties(o$p,{logoUrl:{get:function(){return e$2b(o$p._logoUrl)||(o$p._logoUrl=n$15("Assets/Images/bing_maps_credit.png")),o$p._logoUrl},set:function(e){o$1q.defined("value",e),o$p._logoUrl=e}}});var K$b=new h$18;function O$g(e,t,i){++t;for(var n=[],r=0,o=e.length;r<o;++r){for(var a=e[r],s=a.coverageAreas,l=!1,u=0,c=a.coverageAreas.length;!l&&u<c;++u){var h=s[u];if(t>=h.zoomMin&&t<=h.zoomMax)e$2b(h$18.intersection(i,h.bbox,K$b))&&(l=!0)}l&&n.push(a.credit)}return n}o$p._metadataCache={};var $$f="uniform sampler2D u_MainTex;\nuniform vec2 u_MainTex_TexelSize;\nuniform float u_Threshold;\nuniform float u_Params;\nvarying vec2 v_textureCoordinates;\nconst vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);\n#define inline\nvec4 DownsampleBox13Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\nvec4 A = texture2D(samplerTex, uv + texelSize * vec2(-1.0, -1.0));\nvec4 B = texture2D(samplerTex, uv + texelSize * vec2( 0.0, -1.0));\nvec4 C = texture2D(samplerTex, uv + texelSize * vec2( 1.0, -1.0));\nvec4 D = texture2D(samplerTex, uv + texelSize * vec2(-0.5, -0.5));\nvec4 E = texture2D(samplerTex, uv + texelSize * vec2( 0.5, -0.5));\nvec4 F = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 0.0));\nvec4 G = texture2D(samplerTex, uv );\nvec4 H = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 0.0));\nvec4 I = texture2D(samplerTex, uv + texelSize * vec2(-0.5, 0.5));\nvec4 J = texture2D(samplerTex, uv + texelSize * vec2( 0.5, 0.5));\nvec4 K = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 1.0));\nvec4 L = texture2D(samplerTex, uv + texelSize * vec2( 0.0, 1.0));\nvec4 M = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 1.0));\nvec2 div = (1.0 / 4.0) * vec2(0.5, 0.125);\nvec4 o = (D + E + I + J) * div.x;\no += (A + B + G + F) * div.y;\no += (B + C + H + G) * div.y;\no += (F + G + L + K) * div.y;\no += (G + H + M + L) * div.y;\nreturn o;\n}\nvec4 QuadraticThreshold(vec4 color, float threshold, vec3 curve)\n{\nfloat br = max(max(color.r, color.g), color.b);\nfloat rq = clamp(br - curve.x, 0.0, curve.y);\nrq = curve.z * rq * rq;\ncolor *= max(rq, br - threshold) / max(br, 1.0e-4);\nreturn color;\n}\nvec4 Prefilter(vec4 color, vec2 uv)\n{\nfloat br = max(max(color.r, color.g), color.b);\nif(br < u_Threshold)\n{\ncolor = vec4(0.0);\n}\nreturn color;\n}\nvec4 SafeHDR(vec4 c)\n{\nreturn min(c, 65504.0);\n}\nvoid main()\n{\nvec4 color = DownsampleBox13Tap(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy);\ngl_FragColor = Prefilter(SafeHDR(color), v_textureCoordinates);\n}\n",tt$4="uniform sampler2D u_MainTex;\nuniform vec2 u_MainTex_TexelSize;\nvarying vec2 v_textureCoordinates;\n#define inline\nvec4 DownsampleBox13Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\nvec4 A = texture2D(samplerTex, uv + texelSize * vec2(-1.0, -1.0));\nvec4 B = texture2D(samplerTex, uv + texelSize * vec2( 0.0, -1.0));\nvec4 C = texture2D(samplerTex, uv + texelSize * vec2( 1.0, -1.0));\nvec4 D = texture2D(samplerTex, uv + texelSize * vec2(-0.5, -0.5));\nvec4 E = texture2D(samplerTex, uv + texelSize * vec2( 0.5, -0.5));\nvec4 F = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 0.0));\nvec4 G = texture2D(samplerTex, uv );\nvec4 H = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 0.0));\nvec4 I = texture2D(samplerTex, uv + texelSize * vec2(-0.5, 0.5));\nvec4 J = texture2D(samplerTex, uv + texelSize * vec2( 0.5, 0.5));\nvec4 K = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 1.0));\nvec4 L = texture2D(samplerTex, uv + texelSize * vec2( 0.0, 1.0));\nvec4 M = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 1.0));\nvec2 div = (1.0 / 4.0) * vec2(0.5, 0.125);\nvec4 o = (D + E + I + J) * div.x;\no += (A + B + G + F) * div.y;\no += (B + C + H + G) * div.y;\no += (F + G + L + K) * div.y;\no += (G + H + M + L) * div.y;\nreturn o;\n}\n#define inline\nvec4 DownsampleBox4Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\nvec4 d = texelSize.xyxy * vec4(-1.0, -1.0, 1.0, 1.0);\nvec4 s;\ns = texture2D(samplerTex, uv + d.xy);\ns += texture2D(samplerTex, uv + d.zy);\ns += texture2D(samplerTex, uv + d.xw);\ns += texture2D(samplerTex, uv + d.zw);\nreturn s * (1.0 / 4.0);\n}\nvoid main()\n{\nvec4 color = DownsampleBox13Tap(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy);\ngl_FragColor = color;\n}\n",et$5="uniform sampler2D u_MainTex;\nuniform sampler2D u_BloomTex;\nuniform vec2 u_MainTex_TexelSize;\nuniform float u_SampleScale;\nvarying vec2 v_textureCoordinates;\nvec4 Combine(vec4 bloom, vec2 uv)\n{\nvec4 color = texture2D(u_BloomTex, uv);\nreturn bloom + color;\n}\n#define inline\nvec4 UpsampleTent(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\nvec4 d = texelSize.xyxy * vec4(1.0, 1.0, -1.0, 0.0) * sampleScale;\nvec4 s;\ns = texture2D(samplerTex, uv - d.xy);\ns += texture2D(samplerTex, uv - d.wy) * 2.0;\ns += texture2D(samplerTex, uv - d.zy);\ns += texture2D(samplerTex, uv + d.zw) * 2.0;\ns += texture2D(samplerTex, uv ) * 4.0;\ns += texture2D(samplerTex, uv + d.xw) * 2.0;\ns += texture2D(samplerTex, uv + d.zy);\ns += texture2D(samplerTex, uv + d.wy) * 2.0;\ns += texture2D(samplerTex, uv + d.xy);\nreturn s * (1.0 / 16.0);\n}\nvec4 UpsampleBox(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\nvec4 d = texelSize.xyxy * vec4(-1.0, -1.0, 1.0, 1.0) * (sampleScale * 0.5);\nvec4 s;\ns = texture2D(samplerTex, uv + d.xy);\ns += texture2D(samplerTex, uv + d.zy);\ns += texture2D(samplerTex, uv + d.xw);\ns += texture2D(samplerTex, uv + d.zw);\nreturn s * (1.0 / 4.0);\n}\nvoid main()\n{\nvec4 bloom = UpsampleTent(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy, vec4(u_SampleScale));\ngl_FragColor = Combine(bloom, v_textureCoordinates);\n}\n",E$i=16;function e$f(){this._fbo=void 0,this._downSamplePassState=new n$Z,this._upSamplePassState=new n$Z,this._show=!1,this._context=void 0,this.anamorphicRatio=0,this.diffusion=7,this._iterations=0,this._sampleScale=1,this._dirtTileOffset=new e$29(1,1,0,0),this._shaderSettings=new o$1p,this._bloomColor=new o$1p(1,1,1),this._threshold=0,this._softKnee=.5,this._clamp=65472,this._params=1,this._intensity=1.34,this._dirtIntensity=0,this._dirtTexUrl=n$15("Assets/Textures/NoiseAndGrain.png"),this._dirtTexture=void 0,this._lastUpFBO=void 0,this._Pyramid=[];for(var e=0;e<E$i;e++){this._Pyramid.push({})}this._clearCommand=new t$X({color:new e$1U})}Object.defineProperties(e$f.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(e$2b(this._owner)&&this._owner.bloomShowChange(e),this._show=e)}},bloomIntensity:{get:function(){return this._intensity},set:function(e){this._intensity=e}},bloomDirtTexIntensity:{get:function(){return this._dirtIntensity},set:function(e){this._dirtIntensity=e}},threshold:{get:function(){return this._threshold},set:function(e){this._threshold=e}}}),e$f.prototype.clear=function(e,t){for(var i=0;i<this._iterations;i++){var n=this._clearCommand;n.framebuffer=this._Pyramid[i].downSampleFBO,e$1U.clone(u$_(t,e$1U.BLACK),n.color),n.execute(e),n.framebuffer=this._Pyramid[i].upSampleFBO,e$1U.clone(u$_(t,e$1U.BLACK),n.color),n.execute(e)}};var h$k=new o$1o;e$f.prototype.execute=function(e,t){var i=this,n=this._fbo;e$2b(this._context)&&this._context.numPostEffectFilterObject>0&&(n=this._scene._postEffectFilterFramebuffer.renderTexture._fb);for(var r=0;r<this._iterations;r++){var o=this._Pyramid[r].downCommand;h$k.x=1/n.getColorTexture(0).width,h$k.y=1/n.getColorTexture(0).height,o.uniformMap.u_MainTex=function(){return n.getColorTexture(0)},o.uniformMap.u_MainTex_TexelSize=function(){return h$k},o.uniformMap.u_Threshold=function(){return i._threshold},o.uniformMap.u_Params=function(){return i._params},o.execute(e,this._downSamplePassState),n=this._Pyramid[r].downSampleFBO}var a=this._Pyramid[this._iterations-1].downSampleFBO;for(r=this._iterations-2;r>=0;r--){var s=this._Pyramid[r].downSampleFBO,l=this._Pyramid[r].upSampleFBO,u=this._Pyramid[r].upCommand;h$k.x=1/a.getColorTexture(0).width,h$k.y=1/a.getColorTexture(0).height,u.uniformMap.u_BloomTex=function(){return s.getColorTexture(0)},u.uniformMap.u_MainTex=function(){return a.getColorTexture(0)},u.uniformMap.u_MainTex_TexelSize=function(){return h$k},u.uniformMap.u_SampleScale=function(){return i._sampleScale},u.execute(e,this._downSamplePassState),a=l}this._lastUpFBO=a};var rt$6=new f$18;e$f.prototype.update=function(e,t,i){this._context=t.context,this._downSamplePassState.context=t.context,this._upSamplePassState.context=t.context,this._scene=i;var n=e.drawingBufferWidth,r=e.drawingBufferHeight,o=this;e$2b(this._dirtTexture)||o$1l(t$T(o._dirtTexUrl),(function(t){o._dirtTexture=new t$V({context:e,source:t,pixelFormat:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE})}));var a=e$2a.clamp(this.anamorphicRatio,-1,1),s=a<0?-a:0,l=a>0?a:0,u=Math.floor(n/(2-s)),c=Math.floor(r/(2-l)),h=Math.max(u,c),d=Math.log(h)/Math.log(2)+Math.min(this.diffusion,10)-10,f=Math.floor(d),p=e$2a.clamp(f,1,E$i),_=!1;p!=this._iterations&&(this._iterations=p,_=!0),this._sampleScale=.5+d-f;var m=1;e$2b(this._dirtTexture)&&(m=this._dirtTexture.width/this._dirtTexture.height);var g=e.drawingBufferWidth/e.drawingBufferHeight;m>g?(this._dirtTileOffset.x=g/m,this._dirtTileOffset.z=.5*(1-this._dirtTileOffset.x)):g>m&&(this._dirtTileOffset.y=m/g,this._dirtTileOffset.w=.5*(1-this._dirtTileOffset.y));var x=Math.exp(this._intensity/10*.6931471805599453)-1;this._shaderSettings.x=this._sampleScale,this._shaderSettings.y=x,this._shaderSettings.z=this._dirtIntensity;var v=this._Pyramid[0].downSampleFBO,y=e$2b(v)&&v.getColorTexture(0)||void 0;if(!e$2b(y)||y.width!==u||y.height!==c||_){this.destroyFBO();for(var $=0;$<this._iterations;$++){var b,T={};b=0==$?e.createViewportQuadCommand($$f,{shaderProgramName:"BloomPrefilter",uniformMap:T,owner:this}):e.createViewportQuadCommand(tt$4,{shaderProgramName:"BloomDownsample",uniformMap:T,owner:this});var C=e.createViewportQuadCommand(et$5,{shaderProgramName:"BloomUpsample",uniformMap:T,owner:this});this._Pyramid[$].downCommand=b,this._Pyramid[$].upCommand=C;var S=rt$6;S.width=u,S.height=c;var w=d$1m.fromCache({viewport:S});b.renderState=w,C.renderState=w;var E=e.colorBufferHalfFloat?_$$.HALF_FLOAT:_$$.FLOAT,P=new t$W({context:e,colorTextures:[new t$V({context:e,width:u,height:c,pixelDatatype:E})]}),A=new t$W({context:e,colorTextures:[new t$V({context:e,width:u,height:c,pixelDatatype:E})]});this._Pyramid[$].downSampleFBO=P,this._Pyramid[$].upSampleFBO=A,b.framebuffer=P,C.framebuffer=A,u/=2,u=Math.max(u,1),c=Math.max(c/2,1)}}},e$f.prototype.gammaToLinearSpace=function(e){return e*(e*(.305306011*e+.682171111)+.012522878)},e$f.prototype.setInputFBO=function(e){this._fbo=e},e$f.prototype.getBloomTexture=function(){return this._lastUpFBO.getColorTexture(0)},e$f.prototype.getBloomDirtTexture=function(){return e$2b(this._dirtTexture)?this._dirtTexture:this._context.defaultTexture},e$f.prototype.getBloomTextureTexelSize=function(){return h$k.x=1/this._lastUpFBO.getColorTexture(0).width,h$k.y=1/this._lastUpFBO.getColorTexture(0).height,h$k},e$f.prototype.getDirtTileOffset=function(){return this._dirtTileOffset},e$f.prototype.getBloomSettings=function(){return this._shaderSettings},e$f.prototype.getBloomColor=function(){return this._bloomColor},e$f.prototype.isDestroyed=function(){return!1},e$f.prototype.destroyFBO=function(){for(var e=0;e<this._iterations;e++)if(e$2b(this._Pyramid[e].downSampleFBO)){var t=this._Pyramid[e].downSampleFBO,i=this._Pyramid[e].upSampleFBO;t.destroy(),i.destroy()}},e$f.prototype.destroy=function(){this.destroyFBO();for(var e=0;e<this._iterations;e++){var t=this._Pyramid[e].downCommand,i=this._Pyramid[e].upCommand;t.shaderProgram.destroy(),i.shaderProgram.destroy()}return i$10(this)};var w$i="varying vec2 v_textureCoordinates;\nconst float M_PI = 3.141592653589793;\nfloat vdcRadicalInverse(int i)\n{\nfloat r;\nfloat base = 2.0;\nfloat value = 0.0;\nfloat invBase = 1.0 / base;\nfloat invBi = invBase;\nfor (int x = 0; x < 100; x++)\n{\nif (i <= 0)\n{\nbreak;\n}\nr = mod(float(i), base);\nvalue += r * invBi;\ninvBi *= invBase;\ni = int(float(i) * invBase);\n}\nreturn value;\n}\nvec2 hammersley2D(int i, int N)\n{\nreturn vec2(float(i) / float(N), vdcRadicalInverse(i));\n}\nvec3 importanceSampleGGX(vec2 xi, float roughness, vec3 N)\n{\nfloat a = roughness * roughness;\nfloat phi = 2.0 * M_PI * xi.x;\nfloat cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\nfloat sinTheta = sqrt(1.0 - cosTheta * cosTheta);\nvec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\nvec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\nvec3 tangentX = normalize(cross(upVector, N));\nvec3 tangentY = cross(N, tangentX);\nreturn tangentX * H.x + tangentY * H.y + N * H.z;\n}\nfloat G1_Smith(float NdotV, float k)\n{\nreturn NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat G_Smith(float roughness, float NdotV, float NdotL)\n{\nfloat k = roughness * roughness / 2.0;\nreturn G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\nvec2 integrateBrdf(float roughness, float NdotV)\n{\nvec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\nfloat A = 0.0;\nfloat B = 0.0;\nconst int NumSamples = 1024;\nfor (int i = 0; i < NumSamples; i++)\n{\nvec2 xi = hammersley2D(i, NumSamples);\nvec3 H = importanceSampleGGX(xi, roughness, vec3(0.0, 0.0, 1.0));\nvec3 L = 2.0 * dot(V, H) * H - V;\nfloat NdotL = clamp(L.z, 0.0, 1.0);\nfloat NdotH = clamp(H.z, 0.0, 1.0);\nfloat VdotH = clamp(dot(V, H), 0.0, 1.0);\nif (NdotL > 0.0)\n{\nfloat G = G_Smith(roughness, NdotV, NdotL);\nfloat G_Vis = G * VdotH / (NdotH * NdotV);\nfloat Fc = pow(1.0 - VdotH, 5.0);\nA += (1.0 - Fc) * G_Vis;\nB += Fc * G_Vis;\n}\n}\nreturn vec2(A, B) / float(NumSamples);\n}\nvoid main()\n{\ngl_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n",x$l="varying v_textureCoordinates : vec2<f32>;\nconst M_PI = 3.141592653589793;\n\nfn vdcRadicalInverse(inputI : i32) -> f32\n{\n var i = inputI;\n var r : f32;\n var base = 2.0;\n var value = 0.0;\n var invBase = 1.0 / base;\n var invBi = invBase;\n for (var x = 0; x < 100; x++)\n {\n if (i <= 0)\n {\n break;\n }\n r = (f32(i) - (base * floor((f32(i) / base))));\n //r = mod(f32(i), base);\n value += r * invBi;\n invBi *= invBase;\n i = i32(f32(i) * invBase);\n }\n return value;\n}\n\nfn hammersley2D(i : i32, N : i32) -> vec2<f32>\n{\n return vec2(f32(i) / f32(N), vdcRadicalInverse(i));\n}\n\nfn importanceSampleGGX(xi : vec2<f32>, roughness : f32, N : vec3<f32>) -> vec3<f32>\n{\n var a = roughness * roughness;\n var phi = 2.0 * M_PI * xi.x;\n var cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\n var sinTheta = sqrt(1.0 - cosTheta * cosTheta);\n var H = vec3<f32>(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\n var upVector : vec3<f32>;\n if(abs(N.z) < 0.999){\n upVector = vec3<f32>(0.0, 0.0, 1.0);\n }\n else{\n upVector = vec3<f32>(1.0, 0.0, 0.0);\n }\n var tangentX = normalize(cross(upVector, N));\n var tangentY = cross(N, tangentX);\n return tangentX * H.x + tangentY * H.y + N * H.z;\n}\n\nfn G1_Smith(NdotV : f32, k : f32) -> f32\n{\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\nfn G_Smith(roughness : f32, NdotV : f32, NdotL : f32) -> f32\n{\n var k = roughness * roughness / 2.0;\n return G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\n\nfn integrateBrdf(roughness : f32, NdotV : f32) -> vec2<f32>\n{\n var V = vec3<f32>(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\n var A = 0.0;\n var B = 0.0;\n const NumSamples = 1024;\n for (var i = 0; i < NumSamples; i++)\n {\n var xi = hammersley2D(i, NumSamples);\n var H = importanceSampleGGX(xi, roughness, vec3<f32>(0.0, 0.0, 1.0));\n var L = 2.0 * dot(V, H) * H - V;\n var NdotL = clamp(L.z, 0.0, 1.0);\n var NdotH = clamp(H.z, 0.0, 1.0);\n var VdotH = clamp(dot(V, H), 0.0, 1.0);\n if (NdotL > 0.0)\n {\n var G = G_Smith(roughness, NdotV, NdotL);\n var G_Vis = G * VdotH / (NdotH * NdotV);\n var Fc = pow(1.0 - VdotH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n return vec2<f32>(A, B) / f32(NumSamples);\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n gl_FragColor = vec4<f32>(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n";function t$d(){this._framebuffer=void 0,this._colorTexture=void 0,this._drawCommand=void 0}function b$o(e,t){var i=e._framebuffer,n=t.webgpu?x$l:w$i,r=t.createViewportQuadCommand(n,{framebuffer:i,renderState:d$1m.fromCache({viewport:new f$18(0,0,256,256)}),shaderProgramName:"BrdfLut",useWGSL:t.webgpu});e._drawCommand=r}function y$k(e,t){var i=new t$V({context:t,width:256,height:256,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})});e._colorTexture=i;var n=new t$W({context:t,colorTextures:[i],destroyAttachments:!1});e._framebuffer=n}Object.defineProperties(t$d.prototype,{colorTexture:{get:function(){return this._colorTexture}}}),t$d.prototype.update=function(e){if(!e$2b(this._colorTexture)){var t=e.context;y$k(this,t),b$o(this,t),this._drawCommand.execute(t),this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}},t$d.prototype.isDestroyed=function(){return!1},t$d.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),i$10(this)};var e$e={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4},Q$c=Object.freeze(e$e);function d$p(e,t){var i=e;return e$2b(t)&&(i+="+"+t),i}function S$f(e,t){o$1o.clone(e.distance.startPosition,t.distance.startPosition),o$1o.clone(e.distance.endPosition,t.distance.endPosition),o$1o.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),o$1o.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function A$k(e,t,i){var n=d$p(Q$c.PINCH,t),r=e._update,o=e._isDown,a=e._eventStartPosition,s=e._pressTime,l=e._releaseTime;r[n]=!0,o[n]=!1,a[n]=new o$1o;var u=e._movement[n];e$2b(u)||(u=e._movement[n]={}),u.distance={startPosition:new o$1o,endPosition:new o$1o},u.angleAndHeight={startPosition:new o$1o,endPosition:new o$1o},u.prevAngle=0,e._eventHandler.setInputAction((function(t){e._buttonsDown++,o[n]=!0,s[n]=new Date,o$1o.lerp(t.position1,t.position2,.5,a[n])}),G$I.PINCH_START,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),o[n]=!1,l[n]=new Date}),G$I.PINCH_END,t),e._eventHandler.setInputAction((function(e){if(o[n]){r[n]?(S$f(e,u),r[n]=!1,u.prevAngle=u.angleAndHeight.startPosition.x):(o$1o.clone(e.distance.endPosition,u.distance.endPosition),o$1o.clone(e.angleAndHeight.endPosition,u.angleAndHeight.endPosition));for(var t=u.angleAndHeight.endPosition.x,a=u.prevAngle,s=2*Math.PI;t>=a+Math.PI;)t-=s;for(;t<a-Math.PI;)t+=s;u.angleAndHeight.endPosition.x=-t*i.clientWidth/12,u.angleAndHeight.startPosition.x=-a*i.clientWidth/12}}),G$I.PINCH_MOVE,t)}function M$k(e,t){var i=d$p(Q$c.WHEEL,t),n=e._update;n[i]=!0;var r=e._movement[i];e$2b(r)||(r=e._movement[i]={}),r.startPosition=new o$1o,r.endPosition=new o$1o,e._eventHandler.setInputAction((function(e){var t=15*e$2a.toRadians(e);n[i]?(o$1o.clone(o$1o.ZERO,r.startPosition),r.endPosition.x=0,r.endPosition.y=t,n[i]=!1):r.endPosition.y=r.endPosition.y+t}),G$I.WHEEL,t)}function H$p(e,t,i){var n=d$p(i,t),r=e._isDown,o=e._eventStartPosition,a=e._pressTime,s=e._releaseTime;r[n]=!1,o[n]=new o$1o;var l,u,c=e._lastMovement[n];e$2b(c)||(c=e._lastMovement[n]={startPosition:new o$1o,endPosition:new o$1o,valid:!1}),i===Q$c.LEFT_DRAG?(l=G$I.LEFT_DOWN,u=G$I.LEFT_UP):i===Q$c.RIGHT_DRAG?(l=G$I.RIGHT_DOWN,u=G$I.RIGHT_UP):i===Q$c.MIDDLE_DRAG&&(l=G$I.MIDDLE_DOWN,u=G$I.MIDDLE_UP),e._eventHandler.setInputAction((function(t){e._buttonsDown++,c.valid=!1,r[n]=!0,a[n]=new Date,o$1o.clone(t.position,o[n])}),l,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[n]=!1,s[n]=new Date}),u,t)}function T$i(e,t){o$1o.clone(e.startPosition,t.startPosition),o$1o.clone(e.endPosition,t.endPosition)}function y$j(e,t){var i=e._update,n=e._movement,r=e._lastMovement,o=e._isDown;for(var a in Q$c)if(Q$c.hasOwnProperty(a)){var s=Q$c[a];if(e$2b(s)){var l=d$p(s,t);i[l]=!0,e$2b(e._lastMovement[l])||(e._lastMovement[l]={startPosition:new o$1o,endPosition:new o$1o,valid:!1}),e$2b(e._movement[l])||(e._movement[l]={startPosition:new o$1o,endPosition:new o$1o})}}e._eventHandler.setInputAction((function(a){for(var s in Q$c)if(Q$c.hasOwnProperty(s)){var l=Q$c[s];if(e$2b(l)){var u=d$p(l,t);o[u]&&(i[u]?(T$i(n[u],r[u]),r[u].valid=!0,T$i(a,n[u]),i[u]=!1):o$1o.clone(a.endPosition,n[u].endPosition))}}o$1o.clone(a.endPosition,e._currentMousePosition)}),G$I.MOUSE_MOVE,t)}function L$l(e){switch(e){case"W".charCodeAt(0):return"moveForward";case"S".charCodeAt(0):return"moveBackward";case"D".charCodeAt(0):return"moveRight";case"A".charCodeAt(0):return"moveLeft";default:return}}function G$i(e){document.addEventListener("keydown",(function(t){var i=L$l(t.keyCode);typeof i<"u"&&(e._flags[i]=!0)}),!1)}function W$k(e){document.addEventListener("keyup",(function(t){var i=L$l(t.keyCode);typeof i<"u"&&(e._flags[i]=!1)}),!1)}function l$l(e){if(!e$2b(e))throw new t$16("canvas is required.");for(var t in this._eventHandler=new g$J(e,!0),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new o$1o,M$k(this,void 0),A$k(this,void 0,e),H$p(this,void 0,Q$c.LEFT_DRAG),H$p(this,void 0,Q$c.RIGHT_DRAG),H$p(this,void 0,Q$c.MIDDLE_DRAG),y$j(this,void 0),Aa$1)if(Aa$1.hasOwnProperty(t)){var i=Aa$1[t];e$2b(i)&&(M$k(this,i),A$k(this,i,e),H$p(this,i,Q$c.LEFT_DRAG),H$p(this,i,Q$c.RIGHT_DRAG),H$p(this,i,Q$c.MIDDLE_DRAG),y$j(this,i))}this._flags={looking:!1,moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1},G$i(this),W$k(this)}function r$n(e,t,i,n,r){this.featurePropertiesDirty=!1}function a$g(e){o$1q.typeOf.object("options",e),o$1q.typeOf.number("options.pass",e.pass),this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}function h$j(){}Object.defineProperties(l$l.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){var e=!(this._update[d$p(Q$c.WHEEL)]&&this._update[d$p(Q$c.WHEEL,Aa$1.SHIFT)]&&this._update[d$p(Q$c.WHEEL,Aa$1.CTRL)]&&this._update[d$p(Q$c.WHEEL,Aa$1.ALT)]);return this._buttonsDown>0||e}}}),l$l.prototype.isMoving=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=d$p(e,t);return!this._update[i]},l$l.prototype.getMovement=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=d$p(e,t);return this._movement[i]},l$l.prototype.getLastMovement=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=d$p(e,t),n=this._lastMovement[i];if(n.valid)return n},l$l.prototype.isButtonDown=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=d$p(e,t);return this._isDown[i]},l$l.prototype.getStartMousePosition=function(e,t){if(!e$2b(e))throw new t$16("type is required.");if(e===Q$c.WHEEL)return this._currentMousePosition;var i=d$p(e,t);return this._eventStartPosition[i]},l$l.prototype.getButtonPressTime=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=d$p(e,t);return this._pressTime[i]},l$l.prototype.getButtonReleaseTime=function(e,t){if(!e$2b(e))throw new t$16("type is required.");var i=d$p(e,t);return this._releaseTime[i]},l$l.prototype.reset=function(){for(var e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)},l$l.prototype.isDestroyed=function(){return!1},l$l.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),i$10(this)},Object.defineProperties(r$n.prototype,{featuresLength:{get:function(){t$16.throwInstantiationError()}},pointsLength:{get:function(){t$16.throwInstantiationError()}},trianglesLength:{get:function(){t$16.throwInstantiationError()}},geometryByteLength:{get:function(){t$16.throwInstantiationError()}},texturesByteLength:{get:function(){t$16.throwInstantiationError()}},batchTableByteLength:{get:function(){t$16.throwInstantiationError()}},innerContents:{get:function(){t$16.throwInstantiationError()}},readyPromise:{get:function(){t$16.throwInstantiationError()}},tileset:{get:function(){t$16.throwInstantiationError()}},tile:{get:function(){t$16.throwInstantiationError()}},url:{get:function(){t$16.throwInstantiationError()}},batchTable:{get:function(){t$16.throwInstantiationError()}}}),r$n.prototype.hasProperty=function(e,t){t$16.throwInstantiationError()},r$n.prototype.getFeature=function(e){t$16.throwInstantiationError()},r$n.prototype.applyDebugSettings=function(e,t){t$16.throwInstantiationError()},r$n.prototype.applyStyle=function(e){t$16.throwInstantiationError()},r$n.prototype.update=function(e,t){t$16.throwInstantiationError()},r$n.prototype.isDestroyed=function(){t$16.throwInstantiationError()},r$n.prototype.destroy=function(){t$16.throwInstantiationError()};var o$o={stack:new r$R,stackMaximumLength:0};function d$o(e){return e._visible&&e._inRequestVolume}function m$i(e){return e.hasEmptyContent||e.hasTilesetContent}function v$i(e){return!m$i(e)&&e.contentUnloaded}function T$h(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:(t.hasEmptyContent,!0))}function g$p(e,t,i,n){for(var r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];s.updateVisibility(n),d$o(s)&&i.push(s)}}function y$i(e,t){(v$i(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function C$j(e,t){e._cache.touch(t)}function x$k(e){++e.statistics.visited}function _$i(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==Ae$u.OUTSIDE&&e._selectedTiles.push(t)}function u$h(e,t){this._conditionsExpression=l$1g(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,g$o(this,t)}function l$k(e,t){this.condition=e,this.expression=t}function g$o(e,t){var i=[],n=e._conditions;if(e$2b(n)){for(var r=n.length,o=0;o<r;++o){var a=n[o],s=String(a[0]),l=String(a[1]);i.push(new l$k(new L$E(s,t),new L$E(l,t)))}e._runtimeConditions=i}}function d$n(e){var t;(this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._pbrMaterialIndex=void 0,this._meta=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,"string"==typeof e||e instanceof t$11)?t=t$11.createIfNeeded(e).fetchJson(e):t=o$1l.resolve(e);var i=this;this._readyPromise=t.then((function(e){return m$h(i,e),i}))}function m$h(e,t){t=u$_(l$1g(t,!0),e._style),e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin,e.pbrMaterialIndex=t.pbrMaterialIndex;var i={};if(e$2b(t.meta)){var n=t.defines,r=u$_(t.meta,u$_.EMPTY_OBJECT);for(var o in r)r.hasOwnProperty(o)&&(i[o]=new L$E(r[o],n))}e._meta=i,e._ready=!0}function n$h(e,t){var i=u$_(e._style,u$_.EMPTY_OBJECT).defines;if(e$2b(t))return"boolean"==typeof t||"number"==typeof t?new L$E(String(t)):"string"==typeof t?new L$E(t,i):e$2b(t.conditions)?new u$h(t,i):t}function r$m(e){if(e$2b(e))return e$2b(e.expression)?e.expression:e$2b(e.conditionsExpression)?l$1g(e.conditionsExpression,!0):e}function D$h(e){if(!e$2b((e=u$_(e,{})).url))throw new t$16("options.url is required.");this._baseUrl=e.url;var t=t$11.createIfNeeded(e.url);if(t.appendForwardSlash(),e$2b(e.token))t.setQueryParameters({token:e.token});else if(e$2b(a$O.CREDENTIAL))if(e$2b(a$O.CREDENTIAL._keymap[this._baseUrl])){var i=a$O.CREDENTIAL._keymap[this._baseUrl].type,n=a$O.CREDENTIAL._keymap[this._baseUrl].value,r='{"tokenName": "value"}'.replace("tokenName",i).replace("value",n),o=JSON.parse(r);t.setQueryParameters(o)}else{(r={})[a$O.CREDENTIAL.name]=a$O.CREDENTIAL.value,t.setQueryParameters(r)}this._resource=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=u$_(e.tilingScheme,new m$L({ellipsoid:e.ellipsoid})),this._tilingSchemeCustomized=e$2b(e.tilingScheme),this._useTiles=u$_(e.usePreCachedTilesIfAvailable,!0),this._rectangle=u$_(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers,this._zoomOffset=e.zoomOffset,this._coordUnit="DEGREE",this._beginLevel=u$_(e.beginLevel,0);var a=e.credit;"string"==typeof a&&(a=new r$T(a)),this._credit=a,this.enablePickFeatures=u$_(e.enablePickFeatures,!0),this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var s,l=this,u=e.url;function c(t){l._tilingScheme instanceof m$L&&"esriMeters"===t.units&&(l._coordUnit="METER");var i=t.tileInfo;if(l.wkid=t.spatialReference.wkid,l._tilingSchemeCustomized&&l._tilingScheme instanceof m$L&&e$2b(i)&&(l._tilingScheme=new m$L({tileInfo:{origin:{x:i.origin.x,y:i.origin.y},cols:i.cols,rows:i.rows},resolutions:i.lods.map((function(e){return e.resolution})),dataBounds:{west:t.fullExtent.xmin,south:t.fullExtent.ymin,east:t.fullExtent.xmax,north:t.fullExtent.ymax}})),e$2b(i)){if(l._tileWidth=i.rows,l._tileHeight=i.cols,!l._tilingSchemeCustomized||!e$2b(l.wkid))if(102100===i.spatialReference.wkid||102113===i.spatialReference.wkid)l._tilingScheme=new c$R({ellipsoid:e.ellipsoid});else if(4326===t.tileInfo.spatialReference.wkid)l._tilingScheme=new m$L({ellipsoid:e.ellipsoid});else if(4490===t.tileInfo.spatialReference.wkid){if(e$2b(e.suggest)&&e.suggest){var n=Math.ceil((t.fullExtent.xmax-t.fullExtent.xmin)/(t.tileInfo.lods[0].resolution*t.tileInfo.cols)),r=Math.ceil((t.fullExtent.ymax-t.fullExtent.ymin)/(t.tileInfo.lods[0].resolution*t.tileInfo.rows));l._tilingScheme=new m$L({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo,rectangle:new h$18(e$2a.toRadians(t.fullExtent.xmin),e$2a.toRadians(t.fullExtent.ymin),e$2a.toRadians(t.fullExtent.xmax),e$2a.toRadians(t.fullExtent.ymax)),origin:new o$1o(e$2a.toRadians(t.tileInfo.origin.x),e$2a.toRadians(t.tileInfo.origin.y)),numberOfLevelZeroTilesX:n,numberOfLevelZeroTilesY:r}),l._tilingScheme._suggest=!0}else l._tilingScheme=new m$L({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo});l._tilingScheme._beginLevel=l._beginLevel}else{var o=[];if(e$2b(i.lods))for(var a=0;a<i.lods.length;a++)o.push(i.lods[a].resolution);l._tilingScheme=new m$L({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo,origin:new o$1o(t.tileInfo.origin.x,t.tileInfo.origin.y),dataBounds:new h$18(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax),resolutions:o}),l._rectangle=new h$18(t.fullExtent.xmin/6378137,t.fullExtent.ymin/6378137,t.fullExtent.xmax/6378137,t.fullExtent.ymax/6378137)}if(l._zoomOffset?l._maximumLevel=20:l._maximumLevel=t.tileInfo.lods.length-1,e$2b(l._tilingScheme._resolutions)&&(l._minimumLevel=l._tilingScheme._beginLevel,l._maximumLevel=l._minimumLevel+l._tilingScheme._resolutions.length-1),e$2b(t.fullExtent)){if(e$2b(t.fullExtent.spatialReference)&&e$2b(t.fullExtent.spatialReference.wkid))if(102100===t.fullExtent.spatialReference.wkid||102113===t.fullExtent.spatialReference.wkid){var u=new t$O,c=t.fullExtent,h=u.unproject(new o$1p(Math.max(c.xmin,-l._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(c.ymin,-l._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),f=u.unproject(new o$1p(Math.min(c.xmax,l._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(c.ymax,l._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));l._rectangle=new h$18(h.longitude,h.latitude,f.longitude,f.latitude)}else{if(4326!==t.fullExtent.spatialReference.wkid&&4490!==t.fullExtent.spatialReference.wkid){var p="fullExtent.spatialReference WKID "+t.fullExtent.spatialReference.wkid+" is not supported.";return void(s=l$W.handleError(s,l,l._errorEvent,p,void 0,void 0,void 0,d))}l._rectangle=h$18.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax)}}else l._rectangle=l._tilingScheme.rectangle;e$2b(l._tileDiscardPolicy)||(l._tileDiscardPolicy=new u$i({missingImageUrl:W$j(l,0,0,l._maximumLevel).url,pixelsToCheck:[new o$1o(0,0),new o$1o(200,20),new o$1o(20,200),new o$1o(80,110),new o$1o(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),l._useTiles=!0}else l._useTiles=!1;e$2b(t.copyrightText)&&t.copyrightText.length>0&&(l._credit=new r$T(t.copyrightText)),l._ready=!0,l._readyPromise.resolve(!0),l$W.handleSuccess(s)}function h(e){var t="An error occurred while accessing "+l._resource.url+".";s=l$W.handleError(s,l,l._errorEvent,t,void 0,void 0,void 0,d),l._readyPromise.reject(new t$14(t))}function d(){o$1l(l._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJson(),c,h)}l.tablename=e.url,new l$15({name:u}).then((function(e){e.checkObjectStoreExit(l.tablename)?l._indexedDBScheduler=e:e.createObjectStore(l.tablename).then((function(){l._indexedDBScheduler=e}))})),l._indexedDBSetting={isOpen:!1,clear:function(){l._indexedDBScheduler.clear(l.tablename)},cache:[]},this._useTiles?d():(this._ready=!0,this._readyPromise.resolve(!0))}function W$j(e,t,i,n,r){var o;if(e$2b(e._tilingScheme._resolutions)&&(n-=e._tilingScheme._beginLevel),e._useTiles)e.zoomOffset&&(n-=parseInt(e.zoomOffset)),o=e._resource.getDerivedResource({url:"tile/"+n+"/"+i+"/"+t,request:r});else{var a=e._tilingScheme.tileXYToNativeRectangle(t,i,n);if("METER"===e._coordUnit){var s=e._tilingScheme._projection._semimajorAxis;a.west=s*e$2a.toRadians(a.west),a.south=s*e$2a.toRadians(a.south),a.east=s*e$2a.toRadians(a.east),a.north=s*e$2a.toRadians(a.north)}var l={bbox:a.west+","+a.south+","+a.east+","+a.north,size:e._tileWidth+","+e._tileHeight,format:"png",transparent:!0,f:"image"};e.wkid&&(l.imageSR=l.bboxSR=e.wkid),e.layers&&(l.layers="show:"+e.layers),e.layerDefs&&(l.layerDefs=e.layerDefs),e.time&&(l.time=e.time),o=e._resource.getDerivedResource({url:"export",request:r,queryParameters:l})}return o||null}function Z$g(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function t$c(e){LicenseChecker.LICENSECHECKER.verify("CloudBox"),this._angle=0,this._url=e.url,this._scene=void 0,this._ellipsoidGeometry=new b$P({radii:new o$1p(6578137,6578137,6578137),vertexFormat:t$i.vertexFormat}),this._cloudBall=new y$S({geometryInstances:new d$1o({geometry:this._ellipsoidGeometry,attributes:{distanceDisplayCondition:new t$B(2e6,Number.MAX_VALUE)}}),appearance:new t$i({material:new r$X({fabric:{type:"Image",uniforms:{image:this._url,color:new e$1U(1,1,1,.99)}}}),aboveGround:!0})}),this._originalModelMatrix=p$1d.clone(this._cloudBall.modelMatrix)}function o$n(e){this._show=!1,this._brightness=1,this._contrast=1,this._saturation=1,this._hue=0,this.context=e}h$j.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e._hasMixedContent=!1;var i=!0,n=e.root;if(n.updateVisibility(t),!d$o(n))return i;var r=o$o.stack;for(r.push(e.root);r.length>0;){o$o.stackMaximumLength=Math.max(o$o.stackMaximumLength,r.length);var o=r.pop(),a=o.refine===f$D.ADD,s=o.refine===f$D.REPLACE,l=T$h(e,o);l&&g$p(e,o,r,t),(a||s&&!l)&&(y$i(e,o),_$i(e,o,t),!m$i(o)&&!o.contentAvailable&&(i=!1)),x$k(e),C$j(e,o)}return o$o.stack.trim(o$o.stackMaximumLength),i},Object.defineProperties(u$h.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}}),u$h.prototype.evaluate=function(e,t){var i=this._runtimeConditions;if(e$2b(i))for(var n=i.length,r=0;r<n;++r){var o=i[r];if(o.condition.evaluate(e))return o.expression.evaluate(e,t)}},u$h.prototype.evaluateColor=function(e,t){var i=this._runtimeConditions;if(e$2b(i))for(var n=i.length,r=0;r<n;++r){var o=i[r];if(o.condition.evaluate(e))return o.expression.evaluateColor(e,t)}},u$h.prototype.getShaderFunction=function(e,t,i,n){var r=this._runtimeConditions;if(e$2b(r)&&0!==r.length){for(var o="",a=r.length,s=0;s<a;++s){var l=r[s];o+=" "+(0===s?"if":"else if")+" ("+l.condition.getShaderExpression(t,i)+") \n { \n return "+l.expression.getShaderExpression(t,i)+"; \n } \n"}return o=n+" "+e+"() \n{ \n"+o+" return "+n+"(1.0); \n} \n"}},Object.defineProperties(d$n.prototype,{style:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._style}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},show:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._show},set:function(e){this._show=n$h(this,e),this._style.show=r$m(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._color},set:function(e){this._color=n$h(this,e),this._style.color=r$m(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointSize},set:function(e){this._pointSize=n$h(this,e),this._style.pointSize=r$m(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointOutlineColor},set:function(e){this._pointOutlineColor=n$h(this,e),this._style.pointOutlineColor=r$m(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=n$h(this,e),this._style.pointOutlineWidth=r$m(this._pointOutlineWidth)}},labelColor:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelColor},set:function(e){this._labelColor=n$h(this,e),this._style.labelColor=r$m(this._labelColor)}},labelOutlineColor:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelOutlineColor},set:function(e){this._labelOutlineColor=n$h(this,e),this._style.labelOutlineColor=r$m(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=n$h(this,e),this._style.labelOutlineWidth=r$m(this._labelOutlineWidth)}},font:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._font},set:function(e){this._font=n$h(this,e),this._style.font=r$m(this._font)}},labelStyle:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelStyle},set:function(e){this._labelStyle=n$h(this,e),this._style.labelStyle=r$m(this._labelStyle)}},labelText:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelText},set:function(e){this._labelText=n$h(this,e),this._style.labelText=r$m(this._labelText)}},backgroundColor:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundColor},set:function(e){this._backgroundColor=n$h(this,e),this._style.backgroundColor=r$m(this._backgroundColor)}},backgroundPadding:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundPadding},set:function(e){this._backgroundPadding=n$h(this,e),this._style.backgroundPadding=r$m(this._backgroundPadding)}},backgroundEnabled:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundEnabled},set:function(e){this._backgroundEnabled=n$h(this,e),this._style.backgroundEnabled=r$m(this._backgroundEnabled)}},scaleByDistance:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._scaleByDistance},set:function(e){this._scaleByDistance=n$h(this,e),this._style.scaleByDistance=r$m(this._scaleByDistance)}},translucencyByDistance:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._translucencyByDistance},set:function(e){this._translucencyByDistance=n$h(this,e),this._style.translucencyByDistance=r$m(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=n$h(this,e),this._style.distanceDisplayCondition=r$m(this._distanceDisplayCondition)}},heightOffset:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._heightOffset},set:function(e){this._heightOffset=n$h(this,e),this._style.heightOffset=r$m(this._heightOffset)}},anchorLineEnabled:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=n$h(this,e),this._style.anchorLineEnabled=r$m(this._anchorLineEnabled)}},anchorLineColor:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._anchorLineColor},set:function(e){this._anchorLineColor=n$h(this,e),this._style.anchorLineColor=r$m(this._anchorLineColor)}},image:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._image},set:function(e){this._image=n$h(this,e),this._style.image=r$m(this._image)}},disableDepthTestDistance:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=n$h(this,e),this._style.disableDepthTestDistance=r$m(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._horizontalOrigin},set:function(e){this._horizontalOrigin=n$h(this,e),this._style.horizontalOrigin=r$m(this._horizontalOrigin)}},verticalOrigin:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._verticalOrigin},set:function(e){this._verticalOrigin=n$h(this,e),this._style.verticalOrigin=r$m(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=n$h(this,e),this._style.labelHorizontalOrigin=r$m(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=n$h(this,e),this._style.labelVerticalOrigin=r$m(this._labelVerticalOrigin)}},pbrMaterialIndex:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pbrMaterialIndex},set:function(e){this._pbrMaterialIndex=n$h(this,e),this._style.pbrMaterialIndex=r$m(this._pbrMaterialIndex)}},meta:{get:function(){if(!this._ready)throw new t$16("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._meta},set:function(e){this._meta=e}}}),d$n.prototype.getColorShaderFunction=function(e,t,i){return this._colorShaderFunctionReady?(i.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,this._colorShaderFunction=e$2b(this.color)?this.color.getShaderFunction(e,t,i,"vec4"):void 0,this._colorShaderTranslucent=i.translucent,this._colorShaderFunction)},d$n.prototype.getShowShaderFunction=function(e,t,i){return this._showShaderFunctionReady||(this._showShaderFunctionReady=!0,this._showShaderFunction=e$2b(this.show)?this.show.getShaderFunction(e,t,i,"bool"):void 0),this._showShaderFunction},d$n.prototype.getPointSizeShaderFunction=function(e,t,i){return this._pointSizeShaderFunctionReady||(this._pointSizeShaderFunctionReady=!0,this._pointSizeShaderFunction=e$2b(this.pointSize)?this.pointSize.getShaderFunction(e,t,i,"float"):void 0),this._pointSizeShaderFunction},Object.defineProperties(D$h.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return e$2b(this._minimumLevel)?this._minimumLevel:0}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}},zoomOffset:{get:function(){return this._zoomOffset}}}),D$h.prototype.getTileCredits=function(e,t,i){},D$h.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=W$j(this,e,t,i,n);if(n.quadKey=Z$g(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(e$2b(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2b(o)?o$1l(o,(function(e){return e$2b(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$h.loadImage(this,r)}return e$h.loadImage(this,r)}return e$h.loadImage(this,r)},D$h.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$16("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures){var o,a,s,l=this._tilingScheme.tileXYToNativeRectangle(e,t,i);if(this._tilingScheme.projection instanceof n$1b)o=e$2a.toDegrees(n),a=e$2a.toDegrees(r),s="4326";else{var u=this._tilingScheme.projection.project(new a$18(n,r,0));o=u.x,a=u.y,s="3857"}var c="visible";e$2b(this._layers)&&(c+=":"+this._layers);var h={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:o+","+a,mapExtent:l.west+","+l.south+","+l.east+","+l.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:s,layers:c};return this._resource.getDerivedResource({url:"identify",queryParameters:h}).fetchJson().then((function(e){var t=[],i=e.results;if(!e$2b(i))return t;for(var n=0;n<i.length;++n){var r=i[n],o=new o$q;if(o.data=r,o.name=r.value,o.properties=r.attributes,o.configureDescriptionFromProperties(r.attributes),"esriGeometryPoint"===r.geometryType&&r.geometry){var a=r.geometry.spatialReference&&r.geometry.spatialReference.wkid?r.geometry.spatialReference.wkid:4326;if(4326===a||4283===a)o.position=a$18.fromDegrees(r.geometry.x,r.geometry.y,r.geometry.z);else if(102100===a||900913===a||3857===a){var s=new t$O;o.position=s.unproject(new o$1p(r.geometry.x,r.geometry.y,r.geometry.z))}}t.push(o)}return t}))}},Object.defineProperties(t$c.prototype,{url:{get:function(){return this._url},set:function(e){this._url!==e&&(this._cloudBall.appearance.material.uniforms.image=e,this._url=e)}}}),t$c.prototype.update=function(e){LicenseChecker.LICENSECHECKER.verify("CloudBox"),this._scene=e.camera._scene,e$2b(this._cloudBall)&&!this._scene.primitives.contains(this._cloudBall)&&this._scene.primitives.add(this._cloudBall),e.mode===C$13.SCENE3D&&this.animation(),e.mode===C$13.COLUMBUS_VIEW&&(this._cloudBall.modelMatrix=p$1d.clone(this._originalModelMatrix))},t$c.prototype.animation=function(){this._angle+=.05,this._angle=this._angle%360;var e=e$2a.toRadians(this._angle);e=-e;var t=p$1e.fromRotationZ(e);p$1d.multiplyByMatrix3(this._originalModelMatrix,t,this._cloudBall.modelMatrix)},t$c.prototype.isDestroyed=function(){return!1},t$c.prototype.remove=function(){if(this._scene.primitives.contains(this._cloudBall)){var e=this._scene._primitives._primitives.indexOf(this._cloudBall);-1!==e&&(this._scene._primitives._primitives.splice(e,1),delete this._cloudBall._external._composites[this._scene._primitives._guid])}},t$c.prototype.destroy=function(){this.remove(),this._cloudBall=void 0},Object.defineProperties(o$n.prototype,{show:{get:function(){return this._show},set:function(e){this.context._colorBufferFloat||this.context._colorBufferHalfFloat?e!==this._show&&(e$2b(this._owner)&&this._owner.colorCorrectionShowChange(e),this._show=e):console.warn("Color correction is not currently supported on the mobile.")}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness=e}},contrast:{get:function(){return this._contrast},set:function(e){this._contrast=e}},saturation:{get:function(){return this._saturation},set:function(e){this._saturation=e}},hue:{get:function(){return this._hue},set:function(e){this._hue=e}}}),o$n.prototype.isDestroyed=function(){return!1},o$n.prototype.destroy=function(){return i$10(this)};var v$h="uniform sampler2D u_texture0;\n#ifdef BLOOM\nuniform vec2 u_BloomTex_TexelSize;\nuniform vec4 u_Bloom_DirtTileOffset;\nuniform vec3 u_Bloom_Settings;\nuniform vec3 u_Bloom_Color;\nuniform sampler2D u_BloomTexture;\nuniform sampler2D u_Bloom_DirtTex;\n#endif\n#ifdef COLOR_CORRECTION\nuniform float u_brightness;\nuniform float u_contrast;\nuniform float u_saturation;\nuniform float u_hue;\n#endif\n#ifdef SSAO\nuniform sampler2D u_AmbientOcclusionTexture;\n#endif\n#ifdef TONEMAPPING\nuniform float u_exposure;\nuniform float u_toneMappingWhitePoint;\n#endif\nvarying vec2 v_textureCoordinates;\n#define inline\nvec4 UpsampleTent(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\nvec4 d = texelSize.xyxy * vec4(1.0, 1.0, -1.0, 0.0) * sampleScale;\nvec4 s;\ns = texture2D(samplerTex, uv - d.xy);\ns += texture2D(samplerTex, uv - d.wy) * 2.0;\ns += texture2D(samplerTex, uv - d.zy);\ns += texture2D(samplerTex, uv + d.zw) * 2.0;\ns += texture2D(samplerTex, uv ) * 4.0;\ns += texture2D(samplerTex, uv + d.xw) * 2.0;\ns += texture2D(samplerTex, uv + d.zy);\ns += texture2D(samplerTex, uv + d.wy) * 2.0;\ns += texture2D(samplerTex, uv + d.xy);\nreturn s * (1.0 / 16.0);\n}\n#ifdef TONEMAPPING\nvec3 ACESTonemapping(vec3 inputColor)\n{\nreturn clamp((inputColor * (2.51 * inputColor + 0.03)) / (inputColor * (2.43 * inputColor + 0.59) + 0.14), 0.0, 1.0);\n}\nvec3 FilmicTonemappingFunction(vec3 x)\n{\nfloat A = 0.22;\nfloat B = 0.3;\nfloat C = 0.1;\nfloat D = 0.2;\nfloat E = 0.01;\nfloat F = 0.3;\nreturn ((x * (A * x + C * B) + D * E) / (x * (A * x + B) + D * F)) - E / F;\n}\nvec3 FilmicTonemapping(vec3 x)\n{\nvec3 WHITE = vec3(u_toneMappingWhitePoint);\nreturn FilmicTonemappingFunction(1.6 * x) / FilmicTonemappingFunction(WHITE);\n}\nvec3 inverseGamma(vec3 color)\n{\nreturn pow(color, vec3(1.0 / 2.2));\n}\nvec3 sRGBToLinear(vec3 value)\n{\nreturn vec3(mix(pow(value.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), value.rgb * 0.0773993808, vec3(lessThanEqual(value.rgb, vec3(0.04045)))));\n}\nvec3 linearTosRGB(vec3 value)\n{\nreturn vec3(mix(pow(value.rgb, vec3(0.41666)) * 1.055 - vec3(0.055), value.rgb * 12.92, vec3(lessThanEqual(value.rgb, vec3(0.0031308)))));\n}\n#endif\nvoid main()\n{\nvec4 color0 = texture2D(u_texture0, v_textureCoordinates);\ngl_FragColor = color0;\n#ifdef BLOOM\nvec4 bloom = UpsampleTent(u_BloomTexture, v_textureCoordinates, u_BloomTex_TexelSize.xy, vec4(u_Bloom_Settings.x));\nvec4 dirt = vec4(texture2D(u_Bloom_DirtTex, v_textureCoordinates * u_Bloom_DirtTileOffset.xy + u_Bloom_DirtTileOffset.zw).rgb, 0.0);\nbloom *= u_Bloom_Settings.y;\ndirt *= u_Bloom_Settings.z;\ngl_FragColor += bloom * vec4(u_Bloom_Color, 1.0);\ngl_FragColor += dirt * bloom;\n#endif\n#ifdef SSAO\nvec3 ao = texture2D(u_AmbientOcclusionTexture, v_textureCoordinates).rgb;\ngl_FragColor.rgb *= ao;\n#endif\n#ifdef TONEMAPPING\nvec3 linearColor = sRGBToLinear(gl_FragColor.rgb);\nvec3 toneMappingColor = ACESTonemapping(linearColor * u_exposure);\ngl_FragColor.rgb = linearTosRGB(toneMappingColor);\n#endif\n#ifdef COLOR_CORRECTION\ngl_FragColor.rgb = mix(vec3(0.0), gl_FragColor.rgb, u_brightness);\ngl_FragColor.rgb = mix(vec3(0.5), gl_FragColor.rgb, u_contrast);\ngl_FragColor.rgb = czm_hue(gl_FragColor.rgb, u_hue);\ngl_FragColor.rgb = czm_saturation(gl_FragColor.rgb, u_saturation);\n#endif\n}\n",I$j="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",b$n="uniform float focalDistance;\nuniform float focalRange;\nuniform float focalLength;\nuniform float fstop;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\nvec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\nviewPos /= viewPos.w;\nfloat dist = abs(viewPos.z);\nfloat aperture = focalLength / fstop;\nfloat coc;\nfloat uppper = focalDistance + focalRange;\nfloat lower = focalDistance - focalRange;\nif (dist <= uppper && dist >= lower)\n{\ncoc = 0.5;\ncoc = coc * 0.5 + 0.5;\n}\nelse\n{\nfloat focalAdjusted = dist > uppper ? uppper : lower;\ncoc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\ncoc = clamp(coc, 0.0, 2.0) / 2.00001;\nif (dist < lower)\n{\ncoc = -coc;\n}\ncoc = coc * 0.5 + 0.5;\n}\ngl_FragColor = czm_packDepth(coc);\n}\n",x$j="uniform sampler2D u_texture;\nuniform sampler2D coc;\nvarying vec2 v_textureCoordinates;\nuniform float blurRadius;\nuniform vec2 textureSize;\nuniform vec2 poissonKernel[16];\nconst float percent = 0.01;\nfloat nrand(in vec2 n)\n{\nreturn fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\nvoid main()\n{\nvec2 offset = blurRadius / textureSize;\nfloat rnd = 6.28318 * nrand(v_textureCoordinates + 0.07 * percent );\nfloat cosa = cos(rnd);\nfloat sina = sin(rnd);\nvec4 basis = vec4(cosa, -sina, sina, cosa);\noffset *= abs(czm_unpackDepth(texture2D(coc, v_textureCoordinates)) * 2.0 - 1.0);\nvec4 color = vec4(0.0);\nfloat weightSum = 0.0;\nfor (int i = 0; i < 16; i++)\n{\nvec2 ofs = poissonKernel[i];\nofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\nvec2 uv = v_textureCoordinates + ofs * offset;\nvec4 texel = texture2D(u_texture, uv);\nfloat w = 1.0;\nfloat fCoc = czm_unpackDepth(texture2D(coc, uv)) * 2.0 - 1.0;\nw *= abs(fCoc);\ntexel.rgb *= texel.a;\ncolor += texel * w;\nweightSum += w;\n}\ncolor /= weightSum;\ncolor.rgb /= (color.a + 0.0001);\ngl_FragColor = color;\n}\n",S$e="uniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D coc;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 blurredColor = texture2D(blurred, v_textureCoordinates);\nvec4 originalColor = texture2D(original, v_textureCoordinates);\nfloat fCoc = czm_unpackDepth(texture2D(coc, v_textureCoordinates));\nfCoc = abs(fCoc * 2.0 - 1.0);\nfloat weight = smoothstep(0.0, 1.0, fCoc);\ngl_FragColor = mix(originalColor, blurredColor, weight);\n}\n";function n$g(){this._cocFBO=void 0,this._blurFBO=void 0,this._compositeBlurFBO=void 0,this._cocCommand=void 0,this._blurCommand=void 0,this._compositeCommand=void 0,this._upSamplePassState=new n$Z,this._scene=void 0,this._show=!1,this._useLogDepth=!0,this._focalDistance=50,this._focalRange=20,this._focalLength=30,this._fstop=2.8,this._blurRadius=10,this._textureSize=new o$1o(512,512),this._poissonKernel=T$g(),this._dofBlurKernel=[],this._dofBlurKernelSize=16;for(var e=0;e<this._dofBlurKernelSize;e++)this._dofBlurKernel.push(this._poissonKernel[e])}Object.defineProperties(n$g.prototype,{show:{get:function(){return this._show},set:function(e){this._show=e}},focalDistance:{get:function(){return this._focalDistance},set:function(e){this._focalDistance=e}},focalRange:{get:function(){return this._focalRange},set:function(e){this._focalRange=e}},fStop:{get:function(){return this._fstop},set:function(e){this._fstop=e}},blurRadius:{get:function(){return this._blurRadius},set:function(e){this._blurRadius=e}}}),n$g.prototype.execute=function(e){this._cocCommand.execute(e,this._upSamplePassState),this._blurCommand.execute(e,this._upSamplePassState),this._compositeCommand.execute(e,this._upSamplePassState)};var y$h=new f$18;function P$k(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function v$g(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function T$g(){var e=[];return e.push(new o$1o(0,0)),e.push(new o$1o(-.321585265978,-.154972575841)),e.push(new o$1o(.458126042375,.188473391593)),e.push(new o$1o(.842080129861,.527766490688)),e.push(new o$1o(.147304551086,-.659453822776)),e.push(new o$1o(-.331943915203,-.940619700594)),e.push(new o$1o(.0479226680259,.54812163202)),e.push(new o$1o(.701581552186,-.709825561388)),e.push(new o$1o(-.295436780218,.940589268233)),e.push(new o$1o(-.901489676764,.237713156085)),e.push(new o$1o(.973570876096,-.109899459384)),e.push(new o$1o(-.866792314779,-.451805525005)),e.push(new o$1o(.330975007087,.800048655954)),e.push(new o$1o(-.344275183665,.381779221166)),e.push(new o$1o(-.386139432542,-.437418421534)),e.push(new o$1o(-.576478634965,-.0148463392551)),e.push(new o$1o(.385798197415,-.262426961053)),e.push(new o$1o(-.666302061145,.682427250835)),e.push(new o$1o(-.628010632582,-.732836215494)),e.push(new o$1o(.10163141741,-.987658134403)),e.push(new o$1o(.711995289051,-.320024291314)),e.push(new o$1o(.0296005138058,.950296523438)),e.push(new o$1o(.0130612307608,-.351024443122)),e.push(new o$1o(-.879596633704,-.10478487883)),e.push(new o$1o(.435712737232,.504254490347)),e.push(new o$1o(.779203817497,.206477676721)),e.push(new o$1o(.388264289969,-.896736162545)),e.push(new o$1o(-.153106280781,-.629203242522)),e.push(new o$1o(-.245517550697,.657969239148)),e.push(new o$1o(.126830499058,.26862328493)),e.push(new o$1o(-.634888119007,-.302301223431)),e.push(new o$1o(.617074219636,.779817204925)),e}n$g.prototype.update=function(e,t,i,n){var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight;this._scene=i,e$2b(this._cocCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),e$2b(this._cocCommand)||this.createCommand(e);var a=this._blurFBO,s=e$2b(a)&&a.getColorTexture(0)||void 0;if(!e$2b(s)||this._textureSize.x!==r||this._textureSize.y!==o){this._textureSize.x=r,this._textureSize.y=o,this.createFBO(r,o,e);var l=y$h;l.width=r,l.height=o;var u=d$1m.fromCache({viewport:l});this._cocCommand.renderState=u,this._blurCommand.renderState=u,this._compositeCommand.renderState=u}this._upSamplePassState.context=e},n$g.prototype.createFBO=function(e,t,i){this._cocFBO=this._cocFBO&&this._cocFBO.destroy(),this._blurFBO=this._blurFBO&&this._blurFBO.destroy(),this._compositeBlurFBO=this._compositeBlurFBO&&this._compositeBlurFBO.destroy(),this._cocFBO=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t})]}),this._blurFBO=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t,pixelFormat:V$10.RGBA,pixelDatatype:i.webgpu?_$$.UNSIGNED_BYTE:_$$.FLOAT})]}),this._compositeBlurFBO=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t})]}),e$2b(this._cocCommand)&&e$2b(this._blurCommand)&&e$2b(this._compositeCommand)&&(this._cocCommand.framebuffer=this._cocFBO,this._blurCommand.framebuffer=this._blurFBO,this._compositeCommand.framebuffer=this._compositeBlurFBO)},n$g.prototype.createCommand=function(e){var t={},i=new s$U({name:"DOFCoc",sources:[b$n]});this._useLogDepth&&i.defines.push("LOG_DEPTH"),this._cocCommand=e.createViewportQuadCommand(i,{shaderProgramName:"DepthOfFieldCoc",uniformMap:t,owner:this}),this._blurCommand=e.createViewportQuadCommand(x$j,{shaderProgramName:"DepthOfFieldBlur",uniformMap:t,owner:this}),this._compositeCommand=e.createViewportQuadCommand(S$e,{shaderProgramName:"DepthOfFieldComposite",uniformMap:t,owner:this}),this.createUniformMap()},n$g.prototype.createUniformMap=function(){if(e$2b(this._cocCommand)&&e$2b(this._blurCommand)&&e$2b(this._compositeCommand)){var e=this;this._cocCommand.uniformMap.focalDistance=function(){return e._focalDistance},this._cocCommand.uniformMap.focalRange=function(){return e._focalRange},this._cocCommand.uniformMap.focalLength=function(){return e._focalLength},this._cocCommand.uniformMap.fstop=function(){return e._fstop},this._blurCommand.uniformMap.u_texture=function(){return e._fbo.getColorTexture(0)},this._blurCommand.uniformMap.coc=function(){return e._cocFBO.getColorTexture(0)},this._blurCommand.uniformMap.blurRadius=function(){return e._blurRadius},this._blurCommand.uniformMap.textureSize=function(){return e._textureSize},this._blurCommand.uniformMap.poissonKernel=function(){return e._dofBlurKernel},this._compositeCommand.uniformMap.original=function(){return e._fbo.getColorTexture(0)},this._compositeCommand.uniformMap.blurred=function(){return e._blurFBO.getColorTexture(0)},this._compositeCommand.uniformMap.coc=function(){return e._cocFBO.getColorTexture(0)}}},n$g.prototype.setInputFBO=function(e){this._fbo=e},n$g.prototype.getDOFTexture=function(){return this._compositeBlurFBO.getColorTexture(0)},n$g.prototype.isDestroyed=function(){return!1},n$g.prototype.destroy=function(){return this._cocFBO=this._cocFBO&&this._cocFBO.destroy(),this._blurFBO=this._blurFBO&&this._blurFBO.destroy(),this._compositeBlurFBO=this._compositeBlurFBO&&this._compositeBlurFBO.destroy(),this._cocCommand=this._cocCommand&&this._cocCommand.shaderProgram&&this._cocCommand.shaderProgram.destroy(),this._blurCommand=this._blurCommand&&this._blurCommand.shaderProgram&&this._blurCommand.shaderProgram.destroy(),this._compositeCommand=this._compositeCommand&&this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy(),i$10(this)},n$g.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2b(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?P$k(n,t):v$g(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}};var z$h="uniform sampler2D randomTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\nvarying vec2 v_textureCoordinates;\nvec4 clipToEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\nposEC = posEC / posEC.w;\nreturn posEC;\n}\nfloat getDepth(in vec4 depth)\n{\nfloat z_window = czm_unpackDepth(depth);\nfloat n_range = czm_depthRange.near;\nfloat f_range = czm_depthRange.far;\nreturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\nvec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\nvec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\nvec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\nvec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\nvec3 up = posInCamera.xyz - posInCameraUp.xyz;\nvec3 down = posInCameraDown.xyz - posInCamera.xyz;\nvec3 left = posInCamera.xyz - posInCameraLeft.xyz;\nvec3 right = posInCameraRight.xyz - posInCamera.xyz;\nvec3 DX = length(left) < length(right) ? left : right;\nvec3 DY = length(up) < length(down) ? up : down;\nreturn normalize(cross(DY, DX));\n}\nvoid main(void)\n{\nfloat depth = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\nvec4 posInCamera = clipToEye(v_textureCoordinates, depth);\nif (posInCamera.z > frustumLength)\n{\ngl_FragColor = vec4(1.0);\nreturn;\n}\nvec2 pixelSize = 1.0 / czm_viewport.zw;\nfloat depthU = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates- vec2(0.0, pixelSize.y)));\nfloat depthD = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates+ vec2(0.0, pixelSize.y)));\nfloat depthL = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates- vec2(pixelSize.x, 0.0)));\nfloat depthR = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates+ vec2(pixelSize.x, 0.0)));\nvec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\nfloat ao = 0.0;\nvec2 sampleDirection = vec2(1.0, 0.0);\nfloat gapAngle = 90.0 * czm_radiansPerDegree;\nfloat randomVal = getDepth(texture2D(randomTexture, v_textureCoordinates));\nfloat inverseViewportWidth = 1.0 / czm_viewport.z;\nfloat inverseViewportHeight = 1.0 / czm_viewport.w;\nfor (int i = 0; i < 4; i++)\n{\nfloat newGapAngle = gapAngle * (float(i) + randomVal);\nfloat cosVal = cos(newGapAngle);\nfloat sinVal = sin(newGapAngle);\nvec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\nfloat localAO = 0.0;\nfloat localStepSize = stepSize;\nfor (int j = 0; j < 6; j++)\n{\nvec2 directionWithStep = vec2(rotatedSampleDirection.x * localStepSize * inverseViewportWidth, rotatedSampleDirection.y * localStepSize * inverseViewportHeight);\nvec2 newCoords = directionWithStep + v_textureCoordinates;\nif(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n{\nbreak;\n}\nfloat stepDepthInfo = getDepth(texture2D(czm_globeDepthTexture, newCoords));\nvec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\nvec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\nfloat len = length(diffVec);\nif (len > lengthCap)\n{\nbreak;\n}\nfloat dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\nfloat weight = len / lengthCap;\nweight = 1.0 - weight * weight;\nif (dotVal < bias)\n{\ndotVal = 0.0;\n}\nlocalAO = max(localAO, dotVal * weight);\nlocalStepSize += stepSize;\n}\nao += localAO;\n}\nao /= 4.0;\nao = 1.0 - clamp(ao, 0.0, 1.0);\nao = pow(ao, intensity);\ngl_FragColor = vec4(vec3(ao), 1.0);\n}\n",F$f="uniform float u_delta;\nuniform float u_sigma;\nuniform float direction;\nuniform sampler2D u_texture;\nuniform vec2 u_step;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec2 st = v_textureCoordinates;\nvec2 dir = vec2(1.0 - direction, direction);\nvec2 off = u_step * dir;\nvec3 g;\ng.x = 1.0 / (sqrt(czm_twoPi) * u_sigma);\ng.y = exp((-0.5 * u_delta * u_delta) / (u_sigma * u_sigma));\ng.z = g.y * g.y;\nvec4 result = texture2D(u_texture, st) * g.x;\nfor (int i = 1; i < 8; ++i)\n{\ng.xy *= g.yz;\nvec2 offset = float(i) * dir * u_step;\nresult += texture2D(u_texture, st - offset) * g.x;\nresult += texture2D(u_texture, st + offset) * g.x;\n}\ngl_FragColor = result;\n}\n";function a$f(){this._fbo=void 0,this._scene=void 0,this._downSampleFBO1=void 0,this._downSampleFBO2=void 0,this._clearFBO1Command=void 0,this._clearFBO2Command=void 0,this._ambientOcclusionGenerateCommand=void 0,this._blurXCommand=void 0,this._blurYCommand=void 0,this._downSamplePassState=new n$Z,this._upSamplePassState=new n$Z,this._blurStep=new o$1o,this._intensity=3,this._bias=.1,this._lengthCap=.26,this._stepSize=1.95,this._frustumLength=1e3,this._randomTexture=void 0,this._show=!1,this._useLogDepth=!0,this._context=void 0}Object.defineProperties(a$f.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(e$2b(this._owner)&&this._owner.ssaoShowChange(e),this._show=e)}},intensity:{get:function(){return this._intensity},set:function(e){this._intensity=e}},lengthCap:{get:function(){return this._lengthCap},set:function(e){this._lengthCap=e}},bias:{get:function(){return this._bias},set:function(e){this._bias=e}},stepSize:{get:function(){return this._stepSize},set:function(e){this._stepSize=e}},frustumLength:{get:function(){return this._frustumLength},set:function(e){this._frustumLength=e}}}),a$f.prototype.clear=function(e,t){var i=this._clearFBO1Command;e$1U.clone(u$_(t,e$1U.BLACK),i.color),i.execute(e),i=this._clearFBO2Command,e$1U.clone(u$_(t,e$1U.BLACK),i.color),i.execute(e)},a$f.prototype.isPrepared=function(){return e$2b(this._scene)&&this._scene._pickDepths.length>0},a$f.prototype.execute=function(e,t){this._ambientOcclusionGenerateCommand.execute(e,this._downSamplePassState),this._blurXCommand.execute(e,this._downSamplePassState),this._blurYCommand.execute(e,this._downSamplePassState)},a$f.prototype.createRandomTexture=function(e){for(var t=196608,i=new Uint8Array(t),n=0;n<t;n+=3)i[n]=Math.floor(255*Math.random());this._randomTexture=new t$V({context:e,pixelFormat:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE,source:{arrayBufferView:i,width:256,height:256},sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})},new f$18;var k$e=new f$18;function H$o(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function N$c(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}a$f.prototype.update=function(e,t,i,n){this._scene=i,this._context=t.context;var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight,a=this;if(e$2b(this._randomTexture)||this.createRandomTexture(e),e$2b(this._ambientOcclusionGenerateCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),!e$2b(this._ambientOcclusionGenerateCommand)){this._clearFBO1Command=new t$X({color:new e$1U}),this._clearFBO2Command=new t$X({color:new e$1U});var s={randomTexture:function(){return a._randomTexture},intensity:function(){return a._intensity},bias:function(){return a._bias},lengthCap:function(){return a._lengthCap},stepSize:function(){return a._stepSize},frustumLength:function(){return a._frustumLength}},l=new s$U({name:"ambientOcclusion",sources:[z$h]});this._useLogDepth&&l.defines.push("LOG_DEPTH"),this._ambientOcclusionGenerateCommand=e.createViewportQuadCommand(l,{uniformMap:s,owner:this}),s={direction:function(){return 0}},this._blurXCommand=e.createViewportQuadCommand(F$f,{uniformMap:s,owner:this}),s={direction:function(){return 1}},this._blurYCommand=e.createViewportQuadCommand(F$f,{uniformMap:s,owner:this})}var u=Math.pow(2,Math.ceil(Math.log(r)/Math.log(2))-2),c=Math.pow(2,Math.ceil(Math.log(o)/Math.log(2))-2),h=Math.max(1,u,c),d=k$e;d.width=h,d.height=h;var f=this._downSampleFBO1,p=e$2b(f)&&f.getColorTexture(0)||void 0;if(!e$2b(p)||p.width!==h||p.height!==h){this._downSampleFBO1=this._downSampleFBO1&&this._downSampleFBO1.destroy(),this._downSampleFBO2=this._downSampleFBO2&&this._downSampleFBO2.destroy(),this._blurStep.x=this._blurStep.y=2/h;this._downSampleFBO1=new t$W({context:e,colorTextures:[new t$V({context:e,width:h,height:h})]}),this._downSampleFBO2=new t$W({context:e,colorTextures:[new t$V({context:e,width:h,height:h})]}),this._clearFBO1Command.framebuffer=this._downSampleFBO1,this._clearFBO2Command.framebuffer=this._downSampleFBO2,this._ambientOcclusionGenerateCommand.framebuffer=this._downSampleFBO1,this._blurXCommand.framebuffer=this._downSampleFBO2,this._blurYCommand.framebuffer=this._downSampleFBO1;var _=d$1m.fromCache({viewport:d});this._ambientOcclusionGenerateCommand.uniformMap.depthTexture=function(){return a._scene._pickDepths.length>0&&e$2b(a._scene._pickDepths[0]._depthTexture)?a._scene._pickDepths[0]._depthTexture:a._context.defaultTexture},this._ambientOcclusionGenerateCommand.renderState=_,this._blurXCommand.uniformMap.u_texture=function(){return a._downSampleFBO1.getColorTexture(0)},this._blurXCommand.uniformMap.u_step=function(){return a._blurStep},this._blurXCommand.uniformMap.u_delta=function(){return 1},this._blurXCommand.uniformMap.u_sigma=function(){return 2},this._blurXCommand.renderState=_,this._blurYCommand.uniformMap.u_texture=function(){return a._downSampleFBO2.getColorTexture(0)},this._blurYCommand.uniformMap.u_step=function(){return a._blurStep},this._blurYCommand.uniformMap.u_delta=function(){return 1},this._blurYCommand.uniformMap.u_sigma=function(){return 2},this._blurYCommand.renderState=_}this._downSamplePassState.context=e,this._upSamplePassState.context=e},a$f.prototype.setInputFBO=function(e){this._fbo=e},a$f.prototype.getAmbientOcclusionTexture=function(){return this._downSampleFBO1.getColorTexture(0)},a$f.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2b(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?H$o(n,t):N$c(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}},a$f.prototype.isDestroyed=function(){return!1},a$f.prototype.destroy=function(){return this._downSampleFBO1=this._downSampleFBO1&&this._downSampleFBO1.destroy(),this._downSampleFBO2=this._downSampleFBO2&&this._downSampleFBO2.destroy(),this._ambientOcclusionGenerateCommand=this._ambientOcclusionGenerateCommand&&this._ambientOcclusionGenerateCommand.shaderProgram&&this._ambientOcclusionGenerateCommand.shaderProgram.destroy(),this._blurXCommand=this._blurXCommand&&this._blurXCommand.shaderProgram&&this._blurXCommand.shaderProgram.destroy(),this._blurYCommand=this._blurYCommand&&this._blurYCommand.shaderProgram&&this._blurYCommand.shaderProgram.destroy(),i$10(this)};var k$d="uniform sampler2D u_colorTexture;\nuniform sampler2D u_appendTexture;\nuniform vec4 u_scanViewCenterArr[COUNT];\nuniform vec4 u_scanViewPlaneArr[COUNT];\nuniform float u_radiusArr[COUNT];\nuniform vec3 u_scanLineDirArr[COUNT];\nuniform vec3 u_scanLineMoveViewDirArr[COUNT];\nuniform vec3 u_scanLinePtArr[COUNT];\nuniform float u_lineWidth;\nuniform vec4 u_ScanColor;\nvarying vec2 v_textureCoordinates;\nvec3 pointProjectPlane(vec3 planeNormal, vec3 pointOnPlane, vec3 point1)\n{\nvec3 v01 = point1 - pointOnPlane;\nv01 = normalize(v01);\nvec3 normalizeVector = normalize(planeNormal);\nif (v01 == normalizeVector)\n{\nreturn pointOnPlane;\n}\nfloat d = (planeNormal.x * (point1.x - pointOnPlane.x) + planeNormal.y * (point1.y - pointOnPlane.y) + planeNormal.z * (point1.z - pointOnPlane.z)) / dot(planeNormal, planeNormal);\nvec3 res;\nres = point1 - planeNormal * d;\nreturn res;\n}\nfloat distancePointToLine(vec3 ptOnLine, vec3 vectorLine, vec3 testPt)\n{\nvec3 v = vectorLine;\nvec3 w = testPt - ptOnLine;\nfloat c1 = dot(w, v);\nfloat c2 = dot(v, v);\nfloat b = c1 / c2;\nvec3 Pb = ptOnLine + b * v;\nreturn length(testPt - Pb);\n}\nvoid main()\n{\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n#ifdef LOG_DEPTH\nfloat scale = logDepthOrDepth;\n#else\nfloat scale = pow(logDepthOrDepth * 0.5 + 0.5, 8.0);\n#endif\nvec4 sceneColor = texture2D(u_colorTexture, v_textureCoordinates);\nfloat useSceneColor = 0.0;\n#if defined(WEBGL2) || defined(WEBGPU)\nif(scale < 0.000001)\n{\nuseSceneColor = 1.0;\n}\n#else\nif(scale > 0.999999)\n{\nuseSceneColor = 1.0;\n}\n#endif\nvec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\nviewPos /= viewPos.w;\nvec4 scanColor = vec4(1.0);\nfloat scanValue = 0.0;\nvec4 appendColor = vec4(0.0);\nfor(int i = 0;i < COUNT;i++)\n{\nvec3 scanViewPlane = u_scanViewPlaneArr[i].xyz;\nvec3 scanViewCenter = u_scanViewCenterArr[i].xyz;\nfloat radius = u_radiusArr[i];\nvec3 scanLinePt = u_scanLinePtArr[i];\nvec3 scanLineDir = u_scanLineDirArr[i];\nvec3 scanLineMoveViewDir = u_scanLineMoveViewDirArr[i];\nfloat lineWidth = u_lineWidth;\nvec3 prjOnPlane = pointProjectPlane(scanViewPlane, scanViewCenter, viewPos.xyz);\nvec2 appendTexCoord = vec2(0.0);\n#ifdef CIRCLE\nvec3 relativePos = prjOnPlane - scanViewCenter;\nfloat dis = length(relativePos);\n#ifdef APPEND_TEXTURE\nif(dis < radius)\n{\nvec3 zAxis = scanViewPlane;\nvec3 temp = vec3(1.0, 0.0, 0.0);\nvec3 xAxis = normalize(cross(temp, zAxis));\nvec3 yAxis = normalize(cross(zAxis, xAxis));\nfloat cosTheta = dot(normalize(relativePos), xAxis);\nfloat cosTheta2 = dot(normalize(relativePos), yAxis);\nappendTexCoord.x = (dis * cosTheta / radius + 1.0) * 0.5;\nappendTexCoord.y = (dis * cosTheta2 / radius + 1.0) * 0.5;\n}\nappendColor += texture2D(u_appendTexture, appendTexCoord);\nappendColor.rgb = appendColor.rgb * u_ScanColor.rgb;\n#else\nif(dis < radius)\n{\nfloat f = 1.0 - abs(radius - dis) / radius;\nf = pow(f, 8.0);\nscanValue = f;\nscanColor *= u_ScanColor;\n}\n#endif\n#else\n#ifdef APPEND_TEXTURE\nvec3 relativePos = prjOnPlane - scanLinePt;\nfloat cosTheta = dot(scanLineDir, normalize(relativePos));\nfloat cosTheta2 = dot(scanLineMoveViewDir, normalize(relativePos));\nfloat disToLineCenter = length(relativePos);\nappendTexCoord.x = (disToLineCenter * cosTheta / lineWidth + 1.0) * 0.5;\nappendTexCoord.y = (disToLineCenter * cosTheta2 / lineWidth + 1.0) * 0.5;\nappendColor += texture2D(u_appendTexture, appendTexCoord);\nappendColor.rgb = appendColor.rgb * u_ScanColor.rgb;\n#else\nfloat disToLine = distancePointToLine(scanLinePt, scanLineDir, prjOnPlane);\nif(disToLine < lineWidth)\n{\nfloat f = abs(lineWidth - disToLine) / lineWidth;\nf = pow(f, 8.0);\nscanValue += f;\nscanColor = u_ScanColor;\n}\n#endif\n#endif\n}\n#ifdef APPEND_TEXTURE\ngl_FragColor.rgb = sceneColor.rgb + appendColor.rgb * scanColor.rgb;\n#else\ngl_FragColor = mix(sceneColor, scanColor, scanValue);\n#endif\ngl_FragColor = mix(gl_FragColor, sceneColor, useSceneColor);\n}\n",e$d={CIRCLE:{programDefines:"CIRCLE"},LINE:{programDefines:"LINE"}},A$j=Object.freeze(e$d);function h$i(){this._fbo=void 0,this._inputFbo=void 0,this._scanCommand=void 0,this._upSamplePassState=new n$Z,this._scene=void 0,this._mode=A$j.LINE,this._scanViewCenterArr=[],this._scanPlaneArr=[],this._scanCenterArr=[],this._scanLineMoveDirArr=[],this._scanLineMoveViewDirArr=[],this._scanLineDirArr=[],this._scanLinePtArr=[],this._radiusArr=[],this._lineWidth=1e3,this._color=new e$1U(1,1,1,1),this._period=1e3,this._speed=1e3,this._show=!1,this._appendTexUrl=void 0,this._appendTexture=void 0,this._textureChanged=!1,this._useLogDepth=!0}Object.defineProperties(h$i.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(e$2b(this._owner)&&this._owner.scanShowChange(e),this._show=e)}},mode:{get:function(){return this._mode},set:function(e){this.changeProgramDefine(!1,this._mode.programDefines),this._mode=e,this.changeProgramDefine(!0,this._mode.programDefines)}},color:{get:function(){return this._color},set:function(e){this._color=e}},count:{get:function(){return this._scanCenterArr.length}},centerPostion:{get:function(){var e=this._scanCenterArr.length;return this._scanCenterArr[e-1]},set:function(e){this._scanCenterArr[0]=e,0===this._scanLineMoveDirArr.length&&(this._scanViewCenterArr[0]=new o$1p,this.computeDefaultMoveDir(0))}},period:{get:function(){return this._period/1e3},set:function(e){this._period=1e3*e}},speed:{get:function(){return this._speed},set:function(e){this._speed=e}},lineMoveDirection:{get:function(){var e=this._scanLineMoveDirArr.length;return this._scanLineMoveDirArr[e-1]},set:function(e){var t=this._scanLineMoveDirArr.length,i=o$1p.normalize(e,new o$1p);this._scanLineMoveDirArr[t-1]=i}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e}},textureUrl:{get:function(){return this._appendTexUrl},set:function(e){this._textureChanged=!0,this._appendTexUrl=e,(!e$2b(e)||""===e)&&this.changeProgramDefine(!1,"APPEND_TEXTURE")}}}),h$i.prototype.isPrepared=function(){return e$2b(this._scene)&&this._scene._pickDepths.length>0},h$i.prototype.execute=function(e){this._scanCommand.execute(e,this._upSamplePassState)};var G$h=new f$18,x$i=new e$29(0,0,0,1),v$f=new e$29(0,0,0,1),o$m=new e$29,d$m=new e$29,_$h=new o$1p,H$n=new o$1m(new o$1p(0,0,1),10);function j$g(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function Q$b(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}h$i.prototype.computeDefaultMoveDir=function(e){var t=new o$1p,i=this._scanCenterArr[e];t=o$1p.cross(new o$1p(0,0,1),i,t),t=o$1p.normalize(t,t),this._scanLineMoveDirArr[e]=t},h$i.prototype.computeScanPlane=function(e,t){var i=this._scanCenterArr[t],n=this._scanViewCenterArr[t],r=this._scanPlaneArr[t];e$2b(r)||(r=this._scanPlaneArr[t]=new e$29);var o=e._frameState.camera;e.mode===C$13.SCENE2D&&(v$f.x=i.x,v$f.y=i.y,v$f.z=i.z-1e3),x$i=p$1d.multiplyByVector(o.viewMatrix,v$f,x$i),d$m=e$29.subtract(n,x$i,d$m),_$h.x=d$m.x,_$h.y=d$m.y,_$h.z=d$m.z,_$h=o$1p.normalize(_$h,_$h);var a=o$1m.fromPointNormal(new o$1p(n.x,n.y,n.z),_$h,H$n);r.x=a.normal.x,r.y=a.normal.y,r.z=a.normal.z,r.w=a.distance},h$i.prototype.updateScanParameters=function(e){for(var t=e._frameState.camera,i=0,n=this._scanCenterArr.length;i<n;i++){var r=this._scanCenterArr[i];o$m.x=r.x,o$m.y=r.y,o$m.z=r.z,o$m.w=1,p$1d.multiplyByVector(t.viewMatrix,o$m,this._scanViewCenterArr[i]),this.computeScanPlane(e,i);var o=performance.now()%this._period;0==o&&(o=this._period);var a=this._speed*o/1e3;this._mode===A$j.CIRCLE?this._radiusArr[i]=a:this._mode===A$j.LINE&&(this.computeScanLineDir(e,i),this.computeScanLinePt(e,a,i))}},h$i.prototype.computeScanLineDir=function(e,t){var i=e._frameState.camera,n=this._scanLineDirArr[t];e$2b(n)||(n=this._scanLineDirArr[t]=new o$1p);var r=this._scanLineMoveDirArr[t];e$2b(r)||(r=this._scanLineMoveDirArr[t]=new o$1p);var o=this._scanCenterArr[t],a=this._scanViewCenterArr[t];n=e.mode===C$13.SCENE2D?o$1p.cross(r,new o$1p(0,0,1),n):o$1p.cross(r,o,n),o$1p.normalize(n,n);var s=new o$1p;s=o$1p.multiplyByScalar(n,10,s),s=o$1p.add(o,s,s),o$m.x=s.x,o$m.y=s.y,o$m.z=s.z,o$m.w=1,o$m=p$1d.multiplyByVector(i.viewMatrix,o$m,o$m),n.x=o$m.x-a.x,n.y=o$m.y-a.y,n.z=o$m.z-a.z,o$1p.normalize(n,n)},h$i.prototype.computeScanLinePt=function(e,t,i){var n=e._frameState.camera,r=this._scanLinePtArr[i];e$2b(r)||(r=this._scanLinePtArr[i]=new o$1p);var o=this._scanLineMoveDirArr[i],a=this._scanCenterArr[i],s=this._scanViewCenterArr[i],l=this._scanLineMoveViewDirArr[i];e$2b(l)||(l=this._scanLineMoveViewDirArr[i]=new o$1p),r=o$1p.multiplyByScalar(o,t,r),r=o$1p.add(a,r,r),o$m.x=r.x,o$m.y=r.y,o$m.z=r.z,o$m.w=1,o$m=p$1d.multiplyByVector(n.viewMatrix,o$m,o$m),r.x=o$m.x,r.y=o$m.y,r.z=o$m.z,l.x=o$m.x-s.x,l.y=o$m.y-s.y,l.z=o$m.z-s.z,o$1p.normalize(l,l)},h$i.prototype.update=function(e,t,i,n){this._context=t.context;var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight;this._scene=i,this.updateScanParameters(i);var a=this;if(this._textureChanged&&(e$2b(this._appendTexUrl)&&""!==this._appendTexUrl&&o$1l(t$T(a._appendTexUrl),(function(t){e$2b(a._appendTexture)&&a._appendTexture.destroy(),a._appendTexture=new t$V({context:e,source:t,pixelFormat:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE}),a.changeProgramDefine(!0,"APPEND_TEXTURE")})),this._textureChanged=!1),e$2b(this._scanCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),!e$2b(this._scanCommand)){var s=new s$U({name:"Scan",sources:[k$d]});s.defines.push(this._mode.programDefines),s.defines.push("COUNT "+this._scanCenterArr.length),n&&s.defines.push("LOG_DEPTH"),this._scanCommand=e.createViewportQuadCommand(s,{shaderProgramName:"scanEffect",uniformMap:{},owner:this}),this._scanCommand.uniformMap.u_depthTex=function(){return a._scene._pickDepths[0]._depthTexture},this._scanCommand.uniformMap.u_colorTexture=function(){return a._inputFbo.getColorTexture(0)},this._scanCommand.uniformMap.u_appendTexture=function(){return e$2b(a._appendTexture)?a._appendTexture:a._context.defaultTexture},this._scanCommand.uniformMap.u_scanViewCenterArr=function(){return a._scanViewCenterArr},this._scanCommand.uniformMap.u_radiusArr=function(){return a._radiusArr},this._scanCommand.uniformMap.u_scanViewPlaneArr=function(){return a._scanPlaneArr},this._scanCommand.uniformMap.u_scanLineDirArr=function(){return a._scanLineDirArr},this._scanCommand.uniformMap.u_scanLineMoveViewDirArr=function(){return a._scanLineMoveViewDirArr},this._scanCommand.uniformMap.u_scanLinePtArr=function(){return a._scanLinePtArr},this._scanCommand.uniformMap.u_lineWidth=function(){return a._lineWidth},this._scanCommand.uniformMap.u_ScanColor=function(){return a._color}}var l=this._fbo,u=e$2b(l)&&l.getColorTexture(0)||void 0;if(!e$2b(u)||u.width!==r||u.height!==o){this._fbo=this._fbo&&this._fbo.destroy(),this._fbo=new t$W({context:e,colorTextures:[new t$V({context:e,width:r,height:o})]}),this._scanCommand.framebuffer=this._fbo;var c=G$h;c.width=r,c.height=o;var h=d$1m.fromCache({viewport:c});this._scanCommand.renderState=h}this._upSamplePassState.context=e},h$i.prototype.setInputFBO=function(e){this._inputFbo=e},h$i.prototype.getScanTexture=function(){return this._fbo.getColorTexture(0)},h$i.prototype.getScanFBO=function(){return this._fbo},h$i.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2b(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?j$g(n,t):Q$b(n,t),i.shaderProgram.destroy(),i.shaderProgram=r$13.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}},h$i.prototype.add=function(e){if(e$2b(e))return 0===this._scanCenterArr.length?void(this.centerPosition=o$1p.clone(e)):(this.changeProgramDefine(!1,"COUNT "+this._scanCenterArr.length),this._scanCenterArr.push(e),this._scanViewCenterArr.push(new o$1p),this.changeProgramDefine(!0,"COUNT "+this._scanCenterArr.length),this.computeDefaultMoveDir(this._scanCenterArr.length-1),this._scanCenterArr.length-1)},h$i.prototype.remove=function(e){e>=this._scanCenterArr.length||1===this._scanCenterArr.length||(this.changeProgramDefine(!1,"COUNT "+this._scanCenterArr.length),this._scanCenterArr.splice(e,1),this._scanViewCenterArr.splice(e,1),this._scanLineMoveDirArr.splice(e,1),this.changeProgramDefine(!0,"COUNT "+this._scanCenterArr.length))},h$i.prototype.isDestroyed=function(){return!1},h$i.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._scanCommand=this._scanCommand&&this._scanCommand.shaderProgram&&this._scanCommand.shaderProgram.destroy(),e$2b(this._appendTexture)&&(this._appendTexture.destroy(),this._appendTexture=null),i$10(this)};var I$i="#define AA_SAMPLES 9\n#define AA_CLAMP 1\n#define AA_CLIP 0\n#define SHARPEN 1\nuniform sampler2D u_currentTexture;\nuniform sampler2D u_historyTexture;\nuniform mat4 u_transformMatrix;\nuniform vec2 u_jitter;\nuniform float u_sampleSpatialWeight[AA_SAMPLES];\nuniform vec2 u_offsets3x3[AA_SAMPLES];\nvarying vec2 v_textureCoordinates;\nvec3 RGB2YCoCgR(vec3 rgbColor){\nfloat Y = dot(rgbColor, vec3(1.0, 2.0, 1.0));\nfloat Co = dot(rgbColor, vec3(2.0, 0.0, -2.0));\nfloat Cg = dot(rgbColor, vec3(-1.0, 2.0, -1.0));\nvec3 YCoCgRColor = vec3(Y, Co, Cg);\nreturn YCoCgRColor;\n}\nvec3 YCoCgR2RGB(vec3 YCoCgRColor){\nfloat Y = YCoCgRColor.x * 0.25;\nfloat Co = YCoCgRColor.y * 0.25;\nfloat Cg = YCoCgRColor.z * 0.25;\nfloat R = Y + Co - Cg;\nfloat G = Y + Cg;\nfloat B = Y - Co - Cg;\nvec3 rgbColor = vec3(R, G, B);\nreturn rgbColor;\n}\nfloat Luminance(vec3 color){\nreturn color.r;\n}\nvec3 ToneMap(vec3 color){\nreturn color / (1.0 + Luminance(color));\n}\nvec3 UnToneMap(vec3 color){\nreturn color / (1.0 - Luminance(color));\n}\nvec3 GetNeighorhoodSamp(vec2 offset, vec2 uv){\nfloat fx = offset.x;\nfloat fy = offset.y;\nvec2 sampleOffset = vec2(fx / czm_viewport.z, fy / czm_viewport.w);\nvec2 sampleUV = uv + sampleOffset;\nsampleUV = clamp(sampleUV, 0.0, 1.0);\nvec3 neighorhoodSamp = texture2D(u_currentTexture, sampleUV).rgb;\nneighorhoodSamp = max(neighorhoodSamp, 0.0);\nneighorhoodSamp = ToneMap(neighorhoodSamp);\nneighorhoodSamp = RGB2YCoCgR(neighorhoodSamp);\nreturn neighorhoodSamp;\n}\nfloat HdrWeightY(float Color){\nfloat exposure = 1.0;\nreturn 1.0 / (Color * exposure + 4.0);\n}\nfloat GetSceneColorLuma4(vec3 SceneColor){\nreturn SceneColor.x;\n}\nfloat GetSceneColorHdrWeight(vec3 SceneColor)\n{\nreturn HdrWeightY(SceneColor.x);\n}\nvec2 WeightedLerpFactors(float WeightA, float WeightB, float Blend)\n{\nfloat BlendA = (1.0 - Blend) * WeightA;\nfloat BlendB = Blend * WeightB;\nfloat RcpBlend = 1.0 / (BlendA + BlendB);\nBlendA *= RcpBlend;\nBlendB *= RcpBlend;\nreturn vec2(BlendA, BlendB);\n}\nvoid ComputeNeighborhoodBoundingbox(in vec3 Neighbors[AA_SAMPLES], out vec3 OutNeighborMin, out vec3 OutNeighborMax)\n{\nvec3 NeighborMin;\nvec3 NeighborMax;\nNeighborMin = min( min(Neighbors[1], Neighbors[3]), Neighbors[4] );\nNeighborMin = min( min(NeighborMin, Neighbors[5]), Neighbors[7] );\nNeighborMax = max( max(Neighbors[1], Neighbors[3]), Neighbors[4] );\nNeighborMax = max( max(NeighborMax, Neighbors[5]), Neighbors[7] );\nvec3 NeighborMinPlus = NeighborMin;\nvec3 NeighborMaxPlus = NeighborMax;\nNeighborMin = min( min(NeighborMin, Neighbors[0]), Neighbors[2] );\nNeighborMin = min( min(NeighborMin, Neighbors[6]), Neighbors[8] );\nNeighborMax = max( max(NeighborMax, Neighbors[0]), Neighbors[2] );\nNeighborMax = max( max(NeighborMax, Neighbors[6]), Neighbors[8] );\nOutNeighborMin = NeighborMin;\nOutNeighborMax = NeighborMax;\n}\nfloat IntersectAABB(vec3 Dir, vec3 Org, vec3 Box){\nvec3 RcpDir = vec3(1.0 / Dir.x, 1.0 / Dir.y, 1.0 / Dir.z);\nvec3 TNeg = ( Box - Org) * RcpDir;\nvec3 TPos = ((-Box) - Org) * RcpDir;\nreturn max(max(min(TNeg.x, TPos.x), min(TNeg.y, TPos.y)), min(TNeg.z, TPos.z));\n}\nfloat HistoryClip(vec3 History, vec3 Filtered, vec3 NeighborMin, vec3 NeighborMax){\n#if 0\nvec3 Min = min(Filtered, min(NeighborMin, NeighborMax));\nvec3 Max = max(Filtered, max(NeighborMin, NeighborMax));\nvec3 Avg2 = Max + Min;\nvec3 Dir = Filtered - History;\nvec3 Org = History - Avg2 * 0.5;\nvec3 Scale = Max - Avg2 * 0.5;\nreturn clamp(IntersectAABB(Dir, Org, Scale), 0.0, 1.0);\n#else\nvec3 BoxMin = NeighborMin;\nvec3 BoxMax = NeighborMax;\nvec3 RayOrigin = History;\nvec3 RayDir = Filtered - History;\nRayDir = all(lessThanEqual(abs(RayDir), vec3(1.0/65536.0))) ? vec3(1.0/65536.0) : RayDir;\nvec3 InvRayDir = vec3( 1.0 / RayDir.x, 1.0 / RayDir.y, 1.0 / RayDir.z );\nvec3 MinIntersect = (BoxMin - RayOrigin) * InvRayDir;\nvec3 MaxIntersect = (BoxMax - RayOrigin) * InvRayDir;\nvec3 EnterIntersect = min( MinIntersect, MaxIntersect );\nreturn max( max(EnterIntersect.x, EnterIntersect.y), EnterIntersect.z );\n#endif\n}\nvec3 ClampHistory(vec3 Filtered, vec3 History, vec3 NeighborMin, vec3 NeighborMax)\n{\n#if !AA_CLAMP\nreturn History;\n#elif AA_CLIP\nvec3 TargetColor = Filtered;\nvec3 HistoryColor = History;\nfloat ClipBlend = HistoryClip( HistoryColor.rgb, TargetColor.rgb, NeighborMin.rgb, NeighborMax.rgb );\nClipBlend = clamp( ClipBlend, 0.0, 1.0 );\nHistoryColor = mix( HistoryColor, TargetColor, ClipBlend );\nreturn HistoryColor;\n#else //!AA_CLIP\nHistory = clamp(History, NeighborMin, NeighborMax);\nreturn History;\n#endif\n}\nvec3 FilterCurrentFrameInputSamples(in vec2 uv, inout vec3 neighborhood[AA_SAMPLES]){\nfor(int i = 0; i < AA_SAMPLES; i++){\nneighborhood[i] = GetNeighorhoodSamp(u_offsets3x3[i], uv);\n}\nfloat totalWeight = 0.0;\nvec3 sum = vec3(0.0);\nfor(int i = 0; i < AA_SAMPLES; i++){\nfloat neighborhoodHdrWeight = GetSceneColorHdrWeight(neighborhood[i]);\nfloat neighborhoodFinalWeight = neighborhoodHdrWeight * u_sampleSpatialWeight[i];\ntotalWeight += neighborhoodFinalWeight;\nsum += neighborhood[i] * neighborhoodFinalWeight;\n}\nvec3 filtered = sum / totalWeight;\nreturn filtered;\n}\nvoid main()\n{\nfloat HistoryBlur = 0.0;\nvec2 jitteredUV = v_textureCoordinates + u_jitter;\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\nvec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\nviewPos /= viewPos.w;\nvec4 histroyUV = u_transformMatrix * viewPos;\nhistroyUV = histroyUV / histroyUV.w;\nhistroyUV.xy = histroyUV.xy * 0.5 + 0.5;\nhistroyUV.xy = histroyUV.xy + u_jitter;\nvec3 prevColor = texture2D(u_historyTexture, histroyUV.xy).rgb;\nprevColor = ToneMap(prevColor);\nprevColor = RGB2YCoCgR(prevColor);\nvec3 neighborhood[AA_SAMPLES];\nvec3 filtered = FilterCurrentFrameInputSamples(jitteredUV, neighborhood);\nvec3 NeighborMin;\nvec3 NeighborMax;\nComputeNeighborhoodBoundingbox(neighborhood, NeighborMin, NeighborMax);\nfloat LumaMin = GetSceneColorLuma4(NeighborMin);\nfloat LumaMax = GetSceneColorLuma4(NeighborMax);\nfloat LumaHistory = GetSceneColorLuma4(prevColor);\nprevColor = ClampHistory(filtered, prevColor, NeighborMin, NeighborMax);\nfloat BlendFinal = 0.04;\nfloat FilterWeight = GetSceneColorHdrWeight(filtered);\nfloat HistoryWeight = GetSceneColorHdrWeight(prevColor);\nvec2 Weights = WeightedLerpFactors(HistoryWeight, FilterWeight, BlendFinal);\nvec3 color = prevColor * Weights.x + filtered * Weights.y;\ncolor = YCoCgR2RGB(color);\ncolor = UnToneMap(color);\ngl_FragColor.rgb = color;\ngl_FragColor.a = 1.0;\n}\n",C$i=8,D$g=[0,-.5,.5,-3/4,1/4,-1/4,3/4,-7/8],W$i=[-1/3,1/3,-7/9,-1/9,5/9,-5/9,1/9,7/9],g$n=[new o$1o(-1,-1),new o$1o(0,-1),new o$1o(1,-1),new o$1o(-1,0),new o$1o(0,0),new o$1o(1,0),new o$1o(-1,1),new o$1o(0,1),new o$1o(1,1)];function a$e(){this._compositeCommand=void 0,this._histroyFBO=[],this._upSamplePassState=new n$Z,this._show=!1,this._fbo=void 0,this._fboIndex=0,this._uniformState=void 0,this._prevViewProjectionMatrx=new p$1d,this._transformMatrix=new p$1d,this._frameIndex=0,this._jitterPixel=new o$1o,this._jitterUVOffset=new o$1o,this._sampleWeights=[],this._plusWeights=[]}Object.defineProperties(a$e.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e)}}}),a$e.prototype.execute=function(e,t){!e$2b(e.uniformState)||!e$2b(e.uniformState.globeDepthTexture)||(this._compositeCommand.framebuffer=this._histroyFBO[this._fboIndex],this._compositeCommand.execute(e,this._upSamplePassState),this._frameIndex++,this._frameIndex===C$i&&(this._frameIndex=0))};var L$k=new f$18;a$e.prototype.update=function(e,t,i,n){var r=n.useLogDepth,o=(e=t.context).uniformState;this._uniformState=o,o.viewProjection.clone(this._prevViewProjectionMatrx);var a=e.drawingBufferWidth,s=e.drawingBufferHeight;this._scene=i,e$2b(this._compositeCommand)&&r!==this._useLogDepth&&(this._useLogDepth=r,this.changeProgramDefine(r,"LOG_DEPTH")),e$2b(this._compositeCommand)||this.createCommand(e);var l=!1;if(0==this._histroyFBO.length)l=!0;else{var u=this._histroyFBO[0],c=e$2b(u)&&u.getColorTexture(0)||void 0;(!e$2b(c)||c.width!==a||c.height!==s)&&(l=!0)}if(l){this.createFBO(a,s,e);var h=L$k;h.width=a,h.height=s;var d=d$1m.fromCache({viewport:h});this._compositeCommand.renderState=d}this._upSamplePassState.context=e,this._fboIndex=(this._fboIndex+1)%2,n.jitterIndex=this._frameIndex,V$e(this,n,a,s),U$g(this)};var l$j=new o$1o;function V$e(e,t,i,n){var r=e._frameIndex%C$i,o=D$g[r],a=W$i[r],s=.47,l=Math.exp(-.565866908103214),u=2*Math.PI*a,c=s*Math.sqrt(-2*Math.log((1-o)*l+o)),h=c*Math.cos(u),d=c*Math.sin(u);e._jitterPixel.x=h,e._jitterPixel.y=d;var f=e._jitterPixel.x/i,p=e._jitterPixel.y/n;l$j.x=f,l$j.y=p,t.jitter=l$j,e._jitterUVOffset.x=-f/2,e._jitterUVOffset.y=-p/2}function U$g(e){var t,i,n=[],r=[],o=0;for(i=0;i<9;i++){var a=g$n[i].x-e._jitterPixel.x,s=g$n[i].y-e._jitterPixel.y;n[i]=Math.exp(-2.29*(a*a+s*s)),o+=n[i]}for(r[0]=n[1],r[1]=n[3],r[2]=n[4],r[3]=n[5],r[4]=n[7],t=n[1]+n[3]+n[4]+n[5]+n[7],i=0;i<9;i++)n[i]=n[i]/o;for(i=0;i<5;i++)r[i]=r[i]/t;e._sampleWeights=n,e._plusWeights=r}function H$m(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function R$i(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}a$e.prototype.createFBO=function(e,t,i){var n,r=_$$.FLOAT;for(n=0;n<this._histroyFBO.length;n++)this._histroyFBO[n].destroy();for(this._histroyFBO=[],n=0;n<2;n++){var o=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t,pixelDatatype:r})]});this._histroyFBO.push(o)}},a$e.prototype.createCommand=function(e){var t=new s$U({name:"TAAComposite",sources:[I$i]});this._useLogDepth&&t.defines.push("LOG_DEPTH"),this._compositeCommand=e.createViewportQuadCommand(t,{uniformMap:{},owner:this}),this.createUniformMap()},a$e.prototype.createUniformMap=function(){if(e$2b(this._compositeCommand)){var e=this;this._compositeCommand.uniformMap.u_currentTexture=function(){return e._fbo.getColorTexture(0)},this._compositeCommand.uniformMap.u_historyTexture=function(){var t=(e._fboIndex+1)%2;return e._histroyFBO[t].getColorTexture(0)},this._compositeCommand.uniformMap.u_transformMatrix=function(){var t=e._uniformState.inverseView3D;return p$1d.multiply(e._prevViewProjectionMatrx,t,e._transformMatrix),e._transformMatrix},this._compositeCommand.uniformMap.u_jitter=function(){return e._jitterUVOffset},this._compositeCommand.uniformMap.u_sampleSpatialWeight=function(){return e._sampleWeights},this._compositeCommand.uniformMap.u_offsets3x3=function(){return g$n}}},a$e.prototype.setInputFBO=function(e){this._fbo=e},a$e.prototype.getTAATexture=function(){return this._histroyFBO[this._fboIndex].getColorTexture(0)},a$e.prototype.getOutputFBO=function(){return this._histroyFBO[this._fboIndex]},a$e.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2b(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?H$m(n,t):R$i(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n})}},a$e.prototype.isDestroyed=function(){return!1},a$e.prototype.destroy=function(){for(var e=0;e<this._histroyFBO.length;e++)this._histroyFBO[e].destroy();return this._compositeCommand=this._compositeCommand&&this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy(),i$10(this)};var u$g={BLOOM:"BLOOM",COLOR_CORRECTION:"COLOR_CORRECTION",SCAN:"SCAN",SSAO:"SSAO",TONEMAPPING:"TONEMAPPING",ACES_TONEMAPPING:"ACES_TONEMAPPING",FILMIC_TONEMAPPING:"FILMIC_TONEMAPPING"};function o$l(e){this._fbo=void 0,this._blendCommand=void 0,this._fullScreenCommand=void 0,this._upSamplePassState=new n$Z,this.bloomEffect=void 0,this.colorCorrection=void 0,this.context=e,this.show=!1,this.bloomEffect=new e$f,this.colorCorrection=new o$n(e),this.depthOfFieldEffect=new n$g,this.SSAOEffect=new a$f,this.scanEffect=new h$i,this.temporalAA=new a$e,this.bloomEffect._owner=this,this.colorCorrection._owner=this,this.scanEffect._owner=this,this.SSAOEffect._owner=this,this.exposure=1,this.toneMappingWhitePoint=11.2,this._toneMappingEnabled=!1,this.inputTexture=void 0,this._outputFbo=void 0}Object.defineProperties(o$l.prototype,{toneMappingEnabled:{get:function(){return this._toneMappingEnabled},set:function(e){e!==this._toneMappingEnabled&&(this.toneMappingEnabledChange(e),this._toneMappingEnabled=e)}},outputFbo:{get:function(){return this._outputFbo},set:function(e){this._outputFbo=e}}}),o$l.prototype.isEnable=function(){return this.isTAAEnable()||this.isBloomEnable()||this.isColorCorrectionEnable()||this.isDOFEnable()||this.isScanEnable()||this.isSSAOEnable()||this._toneMappingEnabled},o$l.prototype.isBloomEnable=function(){return e$2b(this.bloomEffect)&&this.bloomEffect.show},o$l.prototype.isColorCorrectionEnable=function(){return e$2b(this.colorCorrection)&&this.colorCorrection.show},o$l.prototype.isDOFEnable=function(){return e$2b(this.depthOfFieldEffect)&&this.depthOfFieldEffect.show},o$l.prototype.isSSAOEnable=function(){return e$2b(this.SSAOEffect)&&this.SSAOEffect.show},o$l.prototype.isScanEnable=function(){return e$2b(this.scanEffect)&&this.scanEffect.show},o$l.prototype.isTAAEnable=function(){return e$2b(this.temporalAA)&&this.temporalAA.show},o$l.prototype.clear=function(e,t){this.isBloomEnable()&&this.bloomEffect.clear(e,t)},o$l.prototype.copy=function(e,t){this.inputTexture=t,this._fullScreenCommand.framebuffer=this._fbo,this._fullScreenCommand.execute(e),this.inputTexture=void 0},o$l.prototype.execute=function(e,t){this.isTAAEnable()&&this.temporalAA.execute(e),this.isDOFEnable()&&this.depthOfFieldEffect.execute(e),this.isScanEnable()&&this.scanEffect.execute(e),this.isBloomEnable()&&this.bloomEffect.execute(e,t),this.isSSAOEnable()&&this.SSAOEffect.execute(e,t),this.isEnable()&&(this._fullScreenCommand.framebuffer=t,this._blendCommand.framebuffer=t,this._fullScreenCommand.execute(e),this._blendCommand.execute(e,this._upSamplePassState))};var j$f=new f$18;function k$c(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function z$g(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function a$d(e,t){var i,n=t.terrainProvider,r=t.mapProjection,o=r.ellipsoid,a=t.camera.getRectangleCameraCoordinates(e);return i=t.mode===C$13.SCENE3D?o.cartesianToCartographic(a):r.unproject(a),e$2b(n)?n.readyPromise.then((function(){if(!e$2b(n.availability)||t.mode===C$13.SCENE2D)return i;var r=[h$18.center(e),h$18.southeast(e),h$18.southwest(e),h$18.northeast(e),h$18.northwest(e)];return a$d._sampleTerrainMostDetailed(n,r).then((function(e){var t=e.reduce((function(e,t){return Math.max(t.height,e)}),-Number.MAX_VALUE),n=i;return n.height+=isNaN(t)?0:t,n}))})):o$1l.resolve(i)}o$l.prototype.update=function(e,t,i,n){var r=n.useLogDepth;this.isTAAEnable()&&this.temporalAA.update(e,t,i,n),this.isDOFEnable()&&this.depthOfFieldEffect.update(e,t,i,r),this.isScanEnable()&&this.scanEffect.update(e,t,i,r),this.isBloomEnable()&&this.bloomEffect.update(e,t,i),this.isSSAOEnable()&&this.SSAOEffect.update(e,t,i,r);var o=(e=t.context).drawingBufferWidth,a=e.drawingBufferHeight;if(!e$2b(this._blendCommand)){var s=new s$U({name:"CompositorFP",sources:[v$h]});this.isScanEnable()&&s.defines.push(u$g.SCAN),this.isBloomEnable()&&s.defines.push(u$g.BLOOM),this.isColorCorrectionEnable()&&s.defines.push(u$g.COLOR_CORRECTION),this.isSSAOEnable()&&s.defines.push(u$g.SSAO),this._toneMappingEnabled&&s.defines.push(u$g.TONEMAPPING);var l={};this._blendCommand=e.createViewportQuadCommand(s,{shaderProgramName:"compositorBlend",uniformMap:l,owner:this}),l={},this._fullScreenCommand=e.createViewportQuadCommand(I$j,{shaderProgramName:"compositorFullScreen",uniformMap:l,owner:this})}var u=this._fbo,c=e$2b(u)&&u.getColorTexture(0)||void 0;if(!e$2b(c)||c.width!==o||c.height!==a){u=u&&u.destroy();var h=[new t$V({context:e,width:o,height:a,pixelDatatype:e.colorBufferHalfFloat?_$$.HALF_FLOAT:_$$.FLOAT})];u=e.depthTexture?this._fbo=new t$W({context:e,colorTextures:h,depthTexture:new t$V({context:e,width:o,height:a,pixelFormat:V$10.DEPTH_COMPONENT,pixelDatatype:_$$.UNSIGNED_SHORT})}):this._fbo=new t$W({context:e,colorTextures:h,depthRenderbuffer:new r$$({context:e,format:M$13.DEPTH_COMPONENT16})});var d=j$f;d.width=o,d.height=a;var f=d$1m.fromCache({viewport:d}),p=this;this._blendCommand.uniformMap.u_texture0=function(){return p.isTAAEnable()?p.temporalAA.getTAATexture():p.isDOFEnable()?p.depthOfFieldEffect.getDOFTexture():p.isScanEnable()?p.scanEffect.getScanTexture():u.getColorTexture(0)},this._blendCommand.uniformMap.u_ScanColor=function(){return p.scanEffect.color},this._blendCommand.uniformMap.u_BloomTexture=function(){return p.bloomEffect.getBloomTexture()},this._blendCommand.uniformMap.u_Bloom_DirtTex=function(){return p.bloomEffect.getBloomDirtTexture()},this._blendCommand.uniformMap.u_BloomTex_TexelSize=function(){return p.bloomEffect.getBloomTextureTexelSize()},this._blendCommand.uniformMap.u_Bloom_DirtTileOffset=function(){return p.bloomEffect.getDirtTileOffset()},this._blendCommand.uniformMap.u_Bloom_Settings=function(){return p.bloomEffect.getBloomSettings()},this._blendCommand.uniformMap.u_Bloom_Color=function(){return p.bloomEffect.getBloomColor()},this._blendCommand.uniformMap.u_AmbientOcclusionTexture=function(){return p.SSAOEffect.getAmbientOcclusionTexture()},this._blendCommand.uniformMap.u_brightness=function(){return p.colorCorrection.brightness},this._blendCommand.uniformMap.u_contrast=function(){return p.colorCorrection.contrast},this._blendCommand.uniformMap.u_saturation=function(){return p.colorCorrection.saturation},this._blendCommand.uniformMap.u_hue=function(){return p.colorCorrection.hue},this._blendCommand.uniformMap.u_exposure=function(){return p.exposure},this._blendCommand.uniformMap.u_toneMappingWhitePoint=function(){return p.toneMappingWhitePoint},this._blendCommand.renderState=f,this._fullScreenCommand.uniformMap.u_texture=function(){return u$_(p.inputTexture,u.getColorTexture(0))},this._fullScreenCommand.renderState=f}return this.temporalAA.setInputFBO(u),this.isTAAEnable()&&(u=this.temporalAA.getOutputFBO()),this.depthOfFieldEffect.setInputFBO(u),this.SSAOEffect.setInputFBO(u),this.bloomEffect.setInputFBO(u),this.scanEffect.setInputFBO(u),this._upSamplePassState.context=e,this._fbo},o$l.prototype.getColorFramebuffer=function(){return this._fbo},o$l.prototype.isDestroyed=function(){return!1},o$l.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._blendCommand=this._blendCommand&&this._blendCommand.shaderProgram&&this._blendCommand.shaderProgram.destroy(),this._fullScreenCommand=this._fullScreenCommand&&this._fullScreenCommand.shaderProgram&&this._fullScreenCommand.shaderProgram.destroy(),e$2b(this.bloomEffect)&&(this.bloomEffect.destroy(),this.bloomEffect=null),e$2b(this.colorCorrection)&&(this.colorCorrection.destroy(),this.colorCorrection=null),e$2b(this.SSAOEffect)&&(this.SSAOEffect.destroy(),this.SSAOEffect=null),e$2b(this.DepthOfFieldEffect)&&(this.DepthOfFieldEffect.destroy(),this.DepthOfFieldEffect=null),e$2b(this.ScanEffect)&&(this.ScanEffect.destroy(),this.ScanEffect=null),e$2b(this.temporalAA)&&(this.temporalAA.destroy(),this.temporalAA=null),i$10(this)},o$l.prototype.scanShowChange=function(e){this.changeProgramDefine(e,u$g.SCAN)},o$l.prototype.bloomShowChange=function(e){this.changeProgramDefine(e,u$g.BLOOM)},o$l.prototype.colorCorrectionShowChange=function(e){this.changeProgramDefine(e,u$g.COLOR_CORRECTION)},o$l.prototype.ssaoShowChange=function(e){this.changeProgramDefine(e,u$g.SSAO)},o$l.prototype.toneMappingEnabledChange=function(e){this.changeProgramDefine(e,u$g.TONEMAPPING)},o$l.prototype.changeProgramDefine=function(e,t){var i=this._blendCommand;if(e$2b(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?k$c(n,t):z$g(n,t),i.shaderProgram.destroy(),i.shaderProgram=r$13.fromCache({context:this.context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}},a$d._sampleTerrainMostDetailed=y$B;var e$c={DESIGN:0,NORMAL:1},vi$1=Object.freeze(e$c),W$h=/{[^}]+}/g,X$b={x:Q$a,y:ee$8,z:ie$5,s:ne$a,reverseX:$$e,reverseY:te$6,reverseZ:re$8,westDegrees:ae$7,southDegrees:oe$7,eastDegrees:ue$8,northDegrees:se$5,westProjected:ce$a,southProjected:le$b,eastProjected:he$7,northProjected:de$6,width:fe$5,height:me$9},J$9=p$19(X$b,{i:ge$8,j:ve$5,reverseI:_e$6,reverseJ:ye$5,longitudeDegrees:we$4,latitudeDegrees:pe$8,longitudeProjected:Te$5,latitudeProjected:Se$5,format:De$7});function _$g(e){if(!e$2b(e))throw new t$16("options is required.");if(!o$1l.isPromise(e)&&!e$2b(e.url))throw new t$16("options is required.");this._errorEvent=new o$1h,this._resource=void 0,this._urlSchemeZeroPadding=void 0,this._pickFeaturesResource=void 0,this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._minimumLevel=void 0,this._tilingScheme=void 0,this._rectangle=void 0,this._tileDiscardPolicy=void 0,this._credit=void 0,this._hasAlphaChannel=void 0,this._readyPromise=void 0,this._tags=void 0,this._pickFeaturesTags=void 0,this.enablePickFeatures=!0,this.reinitialize(e)}function K$a(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(_$g.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this.ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this.ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this.ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this.ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){if(!this.ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this.ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this.ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return e$2b(this._resource)}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){if(!this.ready)throw new t$16("credit must not be called before the imagery provider is ready.");return this._credit}},hasAlphaChannel:{get:function(){if(!this.ready)throw new t$16("hasAlphaChannel must not be called before the imagery provider is ready.");return this._hasAlphaChannel}}}),_$g.prototype.reinitialize=function(e){var t=this;t._readyPromise=o$1l(e).then((function(i){if(!e$2b(i))throw new t$16("options is required.");if(!e$2b(i.url))throw new t$16("options.url is required.");t._baseUrl=e.baseUrl;var n=i.customTags,r=p$19(X$b,n),o=p$19(J$9,n),a=t$11.createIfNeeded(i.url),s=t$11.createIfNeeded(i.pickFeaturesUrl);t.enablePickFeatures=u$_(i.enablePickFeatures,t.enablePickFeatures),t._urlSchemeZeroPadding=u$_(i.urlSchemeZeroPadding,t.urlSchemeZeroPadding),t._tileDiscardPolicy=i.tileDiscardPolicy,t._getFeatureInfoFormats=i.getFeatureInfoFormats,t._subdomains=i.subdomains,Array.isArray(t._subdomains)?t._subdomains=t._subdomains.slice():e$2b(t._subdomains)&&t._subdomains.length>0?t._subdomains=t._subdomains.split(""):t._subdomains=["a","b","c"],t._tileWidth=u$_(i.tileWidth,256),t._tileHeight=u$_(i.tileHeight,256),t._minimumLevel=u$_(i.minimumLevel,0),t._maximumLevel=i.maximumLevel,t._tilingScheme=u$_(i.tilingScheme,new c$R({ellipsoid:i.ellipsoid})),t._rectangle=u$_(i.rectangle,t._tilingScheme.rectangle),t._rectangle=h$18.intersection(t._rectangle,t._tilingScheme.rectangle),t._hasAlphaChannel=u$_(i.hasAlphaChannel,!0);var l=i.credit;"string"==typeof l&&(l=new r$T(l)),t._credit=l,t._resource=a,t._tags=r,t._pickFeaturesResource=s,t._pickFeaturesTags=o;var u=i.url;return t.tablename=i.url,new l$15({name:u}).then((function(e){e.checkObjectStoreExit(t.tablename)?t._indexedDBScheduler=e:e.createObjectStore(t.tablename).then((function(){t._indexedDBScheduler=e}))})),t._indexedDBSetting={isOpen:!1,clear:function(){t._indexedDBScheduler.clear(t.tablename)},cache:[]},!0}))},_$g.prototype.getTileCredits=function(e,t,i){if(!this.ready)throw new t$16("getTileCredits must not be called before the imagery provider is ready.")},_$g.prototype.requestImage=function(e,t,i,n){if(!this.ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=M$j(this,e,t,i,n);if(e$2b(a$O.CREDENTIAL)&&(e$2b(a$O.CREDENTIAL._keymap[this._baseUrl])?r.url=a$O.addTokenWithKey(this._baseUrl,r.url):r.url=a$O.addToken(r.url)),e$2b(this._customRequestHeaders)&&(r.headers=p$19(r.headers,this._customRequestHeaders)),n.quadKey=K$a(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(e$2b(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2b(o)?o$1l(o,(function(e){return e$2b(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$h.loadImage(this,r)}return e$h.loadImage(this,r)}return e$h.loadImage(this,r)},_$g.prototype.pickFeatures=function(e,t,i,n,r){if(!this.ready)throw new t$16("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures&&e$2b(this._pickFeaturesResource)&&0!==this._getFeatureInfoFormats.length){var o=0,a=this;return function l(){if(o>=a._getFeatureInfoFormats.length)return o$1l([]);var u=a._getFeatureInfoFormats[o],c=G$g(a,e,t,i,n,r,u.format);return++o,"json"===u.type?c.fetchJson().then(u.callback).otherwise(l):"xml"===u.type?c.fetchXML().then(u.callback).otherwise(l):"text"===u.type||"html"===u.type?c.fetchText().then(u.callback).otherwise(l):c.fetch({responseType:u.format}).then(s.bind(void 0,u)).otherwise(l)}()}function s(e,t){return e.callback(t)}};var P$j=!1,f$k=new h$18,F$e=!1,p$f=new h$18;function M$j(e,t,i,n,r){P$j=!1,F$e=!1;var o=e._resource,a=o.getUrlComponent(!0),s=e._tags,l={},u=a.match(W$h);return e$2b(u)&&u.forEach((function(r){var o=r.substring(1,r.length-1);e$2b(s[o])&&(l[o]=s[o](e,t,i,n))})),o.getDerivedResource({request:r,templateValues:l})}var E$h=!1,y$g=new o$1o,Z$f=!1;function G$g(e,t,i,n,r,o,a){P$j=!1,F$e=!1,E$h=!1,Z$f=!1;var s=e._pickFeaturesResource,l=s.getUrlComponent(!0),u=e._pickFeaturesTags,c={},h=l.match(W$h);return e$2b(h)&&h.forEach((function(s){var l=s.substring(1,s.length-1);e$2b(u[l])&&(c[l]=u[l](e,t,i,n,r,o,a))})),s.getDerivedResource({templateValues:c})}function b$m(e,t,i){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){var n=e.urlSchemeZeroPadding[t];if("string"==typeof n){var r=n.length;r>1&&(i=i.length>=r?i:new Array(r-i.toString().length+1).join("0")+i)}}return i}function Q$a(e,t,i,n){return b$m(e,"{x}",t)}function $$e(e,t,i,n){var r=e.tilingScheme.getNumberOfXTilesAtLevel(n)-t-1;return b$m(e,"{reverseX}",r)}function ee$8(e,t,i,n){return b$m(e,"{y}",i)}function te$6(e,t,i,n){var r=e.tilingScheme.getNumberOfYTilesAtLevel(n)-i-1;return b$m(e,"{reverseY}",r)}function re$8(e,t,i,n){var r=e.maximumLevel;return b$m(e,"{reverseZ}",e$2b(r)&&n<r?r-n-1:n)}function ie$5(e,t,i,n){return b$m(e,"{z}",n)}function ne$a(e,t,i,n){var r=(t+i+n)%e._subdomains.length;return e._subdomains[r]}function j$e(e,t,i,n){P$j||(e.tilingScheme.tileXYToRectangle(t,i,n,f$k),f$k.west=e$2a.toDegrees(f$k.west),f$k.south=e$2a.toDegrees(f$k.south),f$k.east=e$2a.toDegrees(f$k.east),f$k.north=e$2a.toDegrees(f$k.north),P$j=!0)}function ae$7(e,t,i,n){return j$e(e,t,i,n),f$k.west}function oe$7(e,t,i,n){return j$e(e,t,i,n),f$k.south}function ue$8(e,t,i,n){return j$e(e,t,i,n),f$k.east}function se$5(e,t,i,n){return j$e(e,t,i,n),f$k.north}function k$b(e,t,i,n){F$e||(e.tilingScheme.tileXYToNativeRectangle(t,i,n,p$f),F$e=!0)}function ce$a(e,t,i,n){return k$b(e,t,i,n),p$f.west}function le$b(e,t,i,n){return k$b(e,t,i,n),p$f.south}function he$7(e,t,i,n){return k$b(e,t,i,n),p$f.east}function de$6(e,t,i,n){return k$b(e,t,i,n),p$f.north}function fe$5(e,t,i,n){return e.tileWidth}function me$9(e,t,i,n){return e.tileHeight}function ge$8(e,t,i,n,r,o,a){return I$h(e,t,i,n,r,o),y$g.x}function ve$5(e,t,i,n,r,o,a){return I$h(e,t,i,n,r,o),y$g.y}function _e$6(e,t,i,n,r,o,a){return I$h(e,t,i,n,r,o),e.tileWidth-y$g.x-1}function ye$5(e,t,i,n,r,o,a){return I$h(e,t,i,n,r,o),e.tileHeight-y$g.y-1}var be$6=new h$18,w$h=new o$1p;function I$h(e,t,i,n,r,o,a){if(!E$h){A$i(e,t,i,n,r,o);var s=w$h,l=e.tilingScheme.tileXYToNativeRectangle(t,i,n,be$6);y$g.x=e.tileWidth*(s.x-l.west)/l.width|0,y$g.y=e.tileHeight*(l.north-s.y)/l.height|0,E$h=!0}}function we$4(e,t,i,n,r,o,a){return e$2a.toDegrees(r)}function pe$8(e,t,i,n,r,o,a){return e$2a.toDegrees(o)}function Te$5(e,t,i,n,r,o,a){return A$i(e,t,i,n,r,o),w$h.x}function Se$5(e,t,i,n,r,o,a){return A$i(e,t,i,n,r,o),w$h.y}var xe$4=new a$18;function A$i(e,t,i,n,r,o,a){if(!Z$f){if(e.tilingScheme instanceof c$R){var s=xe$4;s.longitude=r,s.latitude=o,e.tilingScheme.projection.project(s,w$h)}else w$h.x=e$2a.toDegrees(r),w$h.y=e$2a.toDegrees(o);Z$f=!0}}function De$7(e,t,i,n,r,o,a){return a}var y$f=new r$T("MapQuest, Open Street Map and contributors, CC-BY-SA");function L$j(e){e=u$_(e,{});var t=u$_(e.url,"https://a.tile.openstreetmap.org/");t=n$18(t),t+="{z}/{x}/{y}."+u$_(e.fileExtension,"png");var i=t$11.createIfNeeded(t),n=new c$R({ellipsoid:e.ellipsoid}),r=u$_(e.minimumLevel,0),o=e.maximumLevel,a=u$_(e.rectangle,n.rectangle),s=n.positionToTileXY(h$18.southwest(a),r),l=n.positionToTileXY(h$18.northeast(a),r),u=(Math.abs(l.x-s.x)+1)*(Math.abs(l.y-s.y)+1);if(u>4)throw new t$16("The rectangle and minimumLevel indicate that there are "+u+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");var c=u$_(e.credit,y$f);return"string"==typeof c&&(c=new r$T(c)),new _$g({url:i,credit:c,tilingScheme:n,tileWidth:256,tileHeight:256,minimumLevel:r,maximumLevel:o,rectangle:a})}function y$e(e){var t=[],i=(e=u$_(e,u$_.EMPTY_OBJECT)).geometry;if(!e$2b(i))throw new t$16("options.geometry is required.");(!e$2b(i.attributes)||!e$2b(i.primitiveType))&&(i=i.constructor.createGeometry(i));var n=i.attributes,r=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),o=u$_(e.length,1e4);if(e$2b(n.normal)&&t.push(new d$1o({geometry:k$13.createLineSegmentsForVectors(i,"normal",o),attributes:{color:new o$16(1,0,0,1)},modelMatrix:r})),e$2b(n.tangent)&&t.push(new d$1o({geometry:k$13.createLineSegmentsForVectors(i,"tangent",o),attributes:{color:new o$16(0,1,0,1)},modelMatrix:r})),e$2b(n.bitangent)&&t.push(new d$1o({geometry:k$13.createLineSegmentsForVectors(i,"bitangent",o),attributes:{color:new o$16(0,0,1,1)},modelMatrix:r})),t.length>0)return new y$S({asynchronous:!1,geometryInstances:t,appearance:new t$R({flat:!0,translucent:!1})})}function te$5(e){if(!e$2b((e=u$_(e,{})).url))throw new t$16("options.url is required.");var t,i,n,r=o$1l.defer(),o=new _$g(r.promise);function a(a){for(var s,u,c,h=/tileformat/i,d=/tileset/i,f=/tilesets/i,p=/boundingbox/i,_=[],m=a.childNodes[0].childNodes,g=0;g<m.length;g++)if(h.test(m.item(g).nodeName))s=m.item(g);else if(f.test(m.item(g).nodeName)){c=m.item(g);for(var x=m.item(g).childNodes,v=0;v<x.length;v++)d.test(x.item(v).nodeName)&&_.push(x.item(v))}else p.test(m.item(g).nodeName)&&(u=m.item(g));var y;if(!e$2b(c)||!e$2b(u))return y="Unable to find expected tilesets or bbox attributes in "+n.url+".",void((t=l$W.handleError(t,o,o.errorEvent,y,void 0,void 0,void 0,l)).retry||r.reject(new t$14(y)));var $=u$_(e.fileExtension,s.getAttribute("extension")),b=u$_(e.tileWidth,parseInt(s.getAttribute("width"),10)),T=u$_(e.tileHeight,parseInt(s.getAttribute("height"),10)),C=u$_(e.minimumLevel,parseInt(_[0].getAttribute("order"),10)),S=u$_(e.maximumLevel,parseInt(_[_.length-1].getAttribute("order"),10)),w=c.getAttribute("profile"),E=e.tilingScheme;if(!e$2b(E))if("geodetic"===w||"global-geodetic"===w)E=new g$13({ellipsoid:e.ellipsoid});else{if("mercator"!==w&&"global-mercator"!==w)return y=n.url+"specifies an unsupported profile attribute, "+w+".",void((t=l$W.handleError(t,o,o.errorEvent,y,void 0,void 0,void 0,l)).retry||r.reject(new t$14(y)));E=new c$R({ellipsoid:e.ellipsoid})}var P=h$18.clone(e.rectangle);if(!e$2b(P)){var A,L,M,R;u$_(e.flipXY,!1)?(M=new o$1o(parseFloat(u.getAttribute("miny")),parseFloat(u.getAttribute("minx"))),R=new o$1o(parseFloat(u.getAttribute("maxy")),parseFloat(u.getAttribute("maxx")))):(M=new o$1o(parseFloat(u.getAttribute("minx")),parseFloat(u.getAttribute("miny"))),R=new o$1o(parseFloat(u.getAttribute("maxx")),parseFloat(u.getAttribute("maxy"))));var O="geodetic"===w||"mercator"===w;if(E.projection instanceof n$1b||O)A=a$18.fromDegrees(M.x,M.y),L=a$18.fromDegrees(R.x,R.y);else{var I=E.projection;A=I.unproject(M),L=I.unproject(R)}P=new h$18(A.longitude,A.latitude,L.longitude,L.latitude)}P.west<E.rectangle.west&&(P.west=E.rectangle.west),P.east>E.rectangle.east&&(P.east=E.rectangle.east),P.south<E.rectangle.south&&(P.south=E.rectangle.south),P.north>E.rectangle.north&&(P.north=E.rectangle.north);var D=E.positionToTileXY(h$18.southwest(P),C),B=E.positionToTileXY(h$18.northeast(P),C);(Math.abs(B.x-D.x)+1)*(Math.abs(B.y-D.y)+1)>4&&(C=0);var N=i.getDerivedResource({url:"{z}/{x}/{reverseY}."+$});r.resolve({url:N,tilingScheme:E,rectangle:P,tileWidth:b,tileHeight:T,minimumLevel:C,maximumLevel:S,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit})}function s(t){var n=u$_(e.fileExtension,"png"),o=u$_(e.tileWidth,256),a=u$_(e.tileHeight,256),s=u$_(e.minimumLevel,0),l=e.maximumLevel,u=e$2b(e.tilingScheme)?e.tilingScheme:new c$R({ellipsoid:e.ellipsoid}),c=u$_(e.rectangle,u.rectangle),h=i.getDerivedResource({url:"{z}/{x}/{reverseY}."+n});r.resolve({url:h,tilingScheme:u,rectangle:c,tileWidth:o,tileHeight:a,minimumLevel:s,maximumLevel:l,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit})}function l(){n.fetchXML().then(a).otherwise(s)}return o$1l(e.url).then((function(e){(i=t$11.createIfNeeded(e)).appendForwardSlash(),n=i.getDerivedResource({url:"tilemapresource.xml"}),l()})).otherwise((function(e){r.reject(e)})),o}function g$m(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url))throw new t$16("options.url is required.");var t=o$1l.defer();_$g.call(this,t.promise),this._tmsResource=void 0,this._xmlResource=void 0,this._options=e,this._deferred=t,this._metadataError=void 0,this._metadataSuccess=this._metadataSuccess.bind(this),this._metadataFailure=this._metadataFailure.bind(this),this._requestMetadata=this._requestMetadata.bind(this);var i,n=this;o$1l(e.url).then((function(e){(i=t$11.createIfNeeded(e)).appendForwardSlash(),n._tmsResource=i,n._xmlResource=i.getDerivedResource({url:"tilemapresource.xml"}),n._requestMetadata()})).otherwise((function(e){t.reject(e)}))}function n$f(e){if(!e$2b((e=u$_(e,{})).url))throw new t$16("options.url is required.");if(!e$2b(e.channel))throw new t$16("options.channel is required.");var t=e.url,i=u$_(e.path,"/default_map"),n=t$11.createIfNeeded(t).getDerivedResource({url:"/"===i[0]?i.substring(1):i});n.appendForwardSlash(),this._resource=n,this._url=t,this._path=i,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new r$T('<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="'+n$f.logoUrl+'" title="Google Imagery"/></a>'),this.defaultGamma=1.9,this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var r,o=n.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),a=this;function s(t){var i,n;try{i=JSON.parse(t)}catch{i=JSON.parse(t.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}for(var o,s=0;s<i.layers.length;s++)if(i.layers[s].id===a._channel){o=i.layers[s];break}if(!e$2b(o))throw n="Could not find layer with channel (id) of "+a._channel+".",r=l$W.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$14(n);if(!e$2b(o.version))throw n="Could not find a version in channel (id) "+a._channel+".",r=l$W.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$14(n);if(a._version=o.version,e$2b(i.projection)&&"flat"===i.projection)a._tilingScheme=new g$13({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new h$18(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:e.ellipsoid});else{if(e$2b(i.projection)&&"mercator"!==i.projection)throw n="Unsupported projection "+i.projection+".",r=l$W.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$14(n);a._tilingScheme=new c$R({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid})}a._ready=!0,a._readyPromise.resolve(!0),l$W.handleSuccess(r)}function l(e){var t="An error occurred while accessing "+o.url+".";r=l$W.handleError(r,a,a._errorEvent,t,void 0,void 0,void 0,u),a._readyPromise.reject(new t$14(t))}function u(){o$1l(o.fetchText(),s,l)}u()}e$2b(Object.create)&&(g$m.prototype=Object.create(_$g.prototype),g$m.prototype.constructor=g$m),g$m.prototype._requestMetadata=function(){this._xmlResource.fetchXML().then(this._metadataSuccess).otherwise(this._metadataFailure)},g$m.prototype._metadataSuccess=function(e){for(var t,i,n,r=/tileformat/i,o=/tileset/i,a=/tilesets/i,s=/boundingbox/i,l=[],u=this._xmlResource,c=this._metadataError,h=this._deferred,d=this._requestMetadata,f=e.childNodes[0].childNodes,p=0;p<f.length;p++)if(r.test(f.item(p).nodeName))t=f.item(p);else if(a.test(f.item(p).nodeName)){n=f.item(p);for(var _=f.item(p).childNodes,m=0;m<_.length;m++)o.test(_.item(m).nodeName)&&l.push(_.item(m))}else s.test(f.item(p).nodeName)&&(i=f.item(p));var g;if(!e$2b(n)||!e$2b(i))return g="Unable to find expected tilesets or bbox attributes in "+u.url+".",(c=l$W.handleError(c,this,this.errorEvent,g,void 0,void 0,void 0,d)).retry||h.reject(new t$14(g)),void(this._metadataError=c);var x=this._options,v=u$_(x.fileExtension,t.getAttribute("extension")),y=u$_(x.tileWidth,parseInt(t.getAttribute("width"),10)),$=u$_(x.tileHeight,parseInt(t.getAttribute("height"),10)),b=u$_(x.minimumLevel,parseInt(l[0].getAttribute("order"),10)),T=u$_(x.maximumLevel,parseInt(l[l.length-1].getAttribute("order"),10)),C=n.getAttribute("profile"),S=x.tilingScheme;if(!e$2b(S))if("geodetic"===C||"global-geodetic"===C)S=new g$13({ellipsoid:x.ellipsoid});else{if("mercator"!==C&&"global-mercator"!==C)return g=u.url+"specifies an unsupported profile attribute, "+C+".",(c=l$W.handleError(c,this,this.errorEvent,g,void 0,void 0,void 0,d)).retry||h.reject(new t$14(g)),void(this._metadataError=c);S=new c$R({ellipsoid:x.ellipsoid})}var w=h$18.clone(x.rectangle);if(!e$2b(w)){var E,P,A,L;u$_(x.flipXY,!1)?(A=new o$1o(parseFloat(i.getAttribute("miny")),parseFloat(i.getAttribute("minx"))),L=new o$1o(parseFloat(i.getAttribute("maxy")),parseFloat(i.getAttribute("maxx")))):(A=new o$1o(parseFloat(i.getAttribute("minx")),parseFloat(i.getAttribute("miny"))),L=new o$1o(parseFloat(i.getAttribute("maxx")),parseFloat(i.getAttribute("maxy"))));var M="geodetic"===C||"mercator"===C;if(S.projection instanceof n$1b||M)E=a$18.fromDegrees(A.x,A.y),P=a$18.fromDegrees(L.x,L.y);else{var R=S.projection;E=R.unproject(A),P=R.unproject(L)}w=new h$18(E.longitude,E.latitude,P.longitude,P.latitude)}w.west<S.rectangle.west&&(w.west=S.rectangle.west),w.east>S.rectangle.east&&(w.east=S.rectangle.east),w.south<S.rectangle.south&&(w.south=S.rectangle.south),w.north>S.rectangle.north&&(w.north=S.rectangle.north);var O=S.positionToTileXY(h$18.southwest(w),b),I=S.positionToTileXY(h$18.northeast(w),b);(Math.abs(I.x-O.x)+1)*(Math.abs(I.y-O.y)+1)>4&&(b=0);var D=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+v});h.resolve({url:D,tilingScheme:S,rectangle:w,tileWidth:y,tileHeight:$,minimumLevel:b,maximumLevel:T,tileDiscardPolicy:x.tileDiscardPolicy,credit:x.credit})},g$m.prototype._metadataFailure=function(e){var t=this._options,i=u$_(t.fileExtension,"png"),n=u$_(t.tileWidth,256),r=u$_(t.tileHeight,256),o=u$_(t.minimumLevel,0),a=t.maximumLevel,s=e$2b(t.tilingScheme)?t.tilingScheme:new c$R({ellipsoid:t.ellipsoid}),l=u$_(t.rectangle,s.rectangle),u=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+i});this._deferred.resolve({url:u,tilingScheme:s,rectangle:l,tileWidth:n,tileHeight:r,minimumLevel:o,maximumLevel:a,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit})},Object.defineProperties(n$f.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},version:{get:function(){if(!this._ready)throw new t$16("version must not be called before the imagery provider is ready.");return this._version}},requestType:{get:function(){if(!this._ready)throw new t$16("requestType must not be called before the imagery provider is ready.");return this._requestType}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),n$f.prototype.getTileCredits=function(e,t,i){},n$f.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=this._resource.getDerivedResource({url:"query",request:n,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:i+1}});return e$h.loadImage(this,r)},n$f.prototype.pickFeatures=function(e,t,i,n,r){},n$f._logoUrl=void 0,Object.defineProperties(n$f,{logoUrl:{get:function(){return e$2b(n$f._logoUrl)||(n$f._logoUrl=n$15("Assets/Images/google_earth_credit.png")),n$f._logoUrl},set:function(e){o$1q.defined("value",e),n$f._logoUrl=e}}});var p$e=/\/$/,g$l=new r$T('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function m$g(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).mapId;if(!e$2b(t))throw new t$16("options.mapId is required.");var i=t$11.createIfNeeded(u$_(e.url,"https://{s}.tiles.mapbox.com/v4/")),n=e$T.getAccessToken(e.accessToken);this._mapId=t,this._accessToken=n,this._accessTokenErrorCredit=r$T.clone(e$T.getErrorCredit(e.accessToken));var r=u$_(e.format,"png");/\./.test(r)||(r="."+r),this._format=r;var o,a=i.getUrlComponent();p$e.test(a)||(a+="/"),a+=t+"/{z}/{x}/{y}"+this._format,i.url=a,i.setQueryParameters({access_token:n}),e$2b(e.credit)?"string"==typeof(o=e.credit)&&(o=new r$T(o)):o=g$l,this._resource=i,this._imageryProvider=new _$g({url:i,credit:o,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function u$f(e){if(!e$2b((e=u$_(e,{})).url))throw new t$16("options.url is required.");var t=t$11.createIfNeeded(e.url),i=new g$13({rectangle:u$_(e.rectangle,h$18.MAX_VALUE),numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=i,this._resource=t,this._image=void 0,this._texture=void 0,this._tileWidth=0,this._tileHeight=0,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var n=e.credit;"string"==typeof n&&(n=new r$T(n)),this._credit=n;var r,o=this;function a(e){o._image=e,o._tileWidth=e.width,o._tileHeight=e.height,o._ready=!0,o._readyPromise.resolve(!0),l$W.handleSuccess(o._errorEvent)}function s(e){var i="Failed to load image "+t.url+".";r=l$W.handleError(r,o,o._errorEvent,i,0,0,0,l,e),o._readyPromise.reject(new t$14(i))}function l(){o$1l(t.fetchImage(),a,s)}l()}function R$h(e,t,i){if(!e$2b(e))throw new t$16("type is required.");if(this.type=e,!e$2b(t))if("json"===e)t="application/json";else if("xml"===e)t="text/xml";else if("html"===e)t="text/html";else{if("text"!==e)throw new t$16('format is required when type is not "json", "xml", "html", or "text".');t="text/plain"}if(this.format=t,!e$2b(i))if("json"===e)i=L$i;else if("xml"===e)i=M$i;else if("html"===e)i=S$d;else{if("text"!==e)throw new t$16('callback is required when type is not "json", "xml", "html", or "text".');i=S$d}this.callback=i}function L$i(e){for(var t=[],i=e.features,n=0;n<i.length;++n){var r=i[n],o=new o$q;if(o.data=r,o.properties=r.properties,o.configureNameFromProperties(r.properties),o.configureDescriptionFromProperties(r.properties),e$2b(r.geometry)&&"Point"===r.geometry.type){var a=r.geometry.coordinates[0],s=r.geometry.coordinates[1];o.position=a$18.fromDegrees(a,s)}t.push(o)}return t}Object.defineProperties(m$g.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),m$g.prototype.getTileCredits=function(e,t,i){if(e$2b(this._accessTokenErrorCredit))return[this._accessTokenErrorCredit]},m$g.prototype.requestImage=function(e,t,i,n){return this._imageryProvider.requestImage(e,t,i,n)},m$g.prototype.pickFeatures=function(e,t,i,n,r){return this._imageryProvider.pickFeatures(e,t,i,n,r)},m$g._defaultCredit=g$l,Object.defineProperties(u$f.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return 0}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.")}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),u$f.prototype.getTileCredits=function(e,t,i){},u$f.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");return this._image},u$f.prototype.pickFeatures=function(e,t,i,n,r){};var d$l="http://www.mapinfo.com/mxp",D$f="http://www.esri.com/wms",P$i="http://www.opengis.net/wfs",C$h="http://www.opengis.net/gml";function M$i(e){var t=e.documentElement;if("MultiFeatureCollection"===t.localName&&t.namespaceURI===d$l)return B$c(e);if("FeatureInfoResponse"===t.localName&&t.namespaceURI===D$f)return x$h(e);if("FeatureCollection"===t.localName&&t.namespaceURI===P$i)return j$d(e);if("ServiceExceptionReport"===t.localName)throw new t$14((new XMLSerializer).serializeToString(t));return"msGMLOutput"===t.localName?O$f(e):X$a(e)}function B$c(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(d$l,"Feature"),n=0;n<i.length;++n){for(var r=i[n],o={},a=r.getElementsByTagNameNS(d$l,"Val"),s=0;s<a.length;++s){var l=a[s];if(l.hasAttribute("ref")){var u=l.getAttribute("ref"),c=l.textContent.trim();o[u]=c}}var h=new o$q;h.data=r,h.properties=o,h.configureNameFromProperties(o),h.configureDescriptionFromProperties(o),t.push(h)}return t}function x$h(e){var t,i=e.documentElement,n=[],r=i.getElementsByTagNameNS("*","FIELDS");if(r.length>0)for(var o=0;o<r.length;++o){var a=r[o];t={};for(var s=a.attributes,l=0;l<s.length;++l){var u=s[l];t[u.name]=u.value}n.push(p$d(a,t))}else for(var c=i.getElementsByTagNameNS("*","FeatureInfo"),h=0;h<c.length;++h){var d=c[h];t={};for(var f=d.childNodes,p=0;p<f.length;++p){var _=f[p];_.nodeType===Node.ELEMENT_NODE&&(t[_.localName]=_.textContent)}n.push(p$d(d,t))}return n}function j$d(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(C$h,"featureMember"),n=0;n<i.length;++n){var r=i[n],o={};E$g(r,o),t.push(p$d(r,o))}return t}function O$f(e){for(var t,i=[],n=e.documentElement.childNodes,r=0;r<n.length;r++)if(n[r].nodeType===Node.ELEMENT_NODE){t=n[r];break}if(!e$2b(t))throw new t$14("Unable to find first child of the feature info xml document");for(var o=t.childNodes,a=0;a<o.length;++a){var s=o[a];if(s.nodeType===Node.ELEMENT_NODE){var l={};E$g(s,l),i.push(p$d(s,l))}}return i}function E$g(e,t){for(var i=!0,n=0;n<e.childNodes.length;++n){var r=e.childNodes[n];r.nodeType===Node.ELEMENT_NODE&&(i=!1),"Point"!==r.localName&&"LineString"!==r.localName&&"Polygon"!==r.localName&&"boundedBy"!==r.localName&&r.hasChildNodes()&&E$g(r,t)&&(t[r.localName]=r.textContent)}return i}function p$d(e,t){var i=new o$q;return i.data=e,i.properties=t,i.configureNameFromProperties(t),i.configureDescriptionFromProperties(t),i}function X$a(e){var t=(new XMLSerializer).serializeToString(e),i=document.createElement("div"),n=document.createElement("pre");n.textContent=t,i.appendChild(n);var r=new o$q;return r.data=e,r.description=i.innerHTML,[r]}var z$f=/<body>\s*<\/body>/im,G$f=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,U$f=/<title>([\s\S]*)<\/title>/im;function S$d(e){if(!z$f.test(e)&&!G$f.test(e)){var t,i=U$f.exec(e);i&&i.length>1&&(t=i[1]);var n=new o$q;return n.name=t,n.description=e,n.data=e,[n]}}const j$c=[3034,3035,3042,3043,3044],w$g=[4471,4559];function m$f(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url))throw new t$16("options.url is required.");if(!e$2b(e.layers))throw new t$16("options.layers is required.");if(e$2b(e.times)&&!e$2b(e.clock))throw new t$16("options.times was specified, so options.clock is required.");this._baseUrl=e.url;var t=t$11.createIfNeeded(e.url),i=t.clone();t.setQueryParameters(m$f.DefaultParameters,!0),i.setQueryParameters(m$f.GetFeatureInfoDefaultParameters,!0),e$2b(e.parameters)&&t.setQueryParameters(v$e(e.parameters)),e$2b(e.getFeatureInfoParameters)&&i.setQueryParameters(v$e(e.getFeatureInfoParameters));var n=this;n._indexedDBSetting={isOpen:!1,clear:function(){n._indexedDBScheduler.clear(n.tablename)},cache:[]},this._reload=void 0,e$2b(e.times)&&(this._timeDynamicImagery=new f$P({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,r,o){return g$k(n,e,t,i,r,o)},reloadFunction:function(){e$2b(n._reload)&&n._reload()}}));var r={};if(r.layers=e.layers,r.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",r.width="{width}",r.height="{height}",parseFloat(t.queryParameters.version)>=1.3){r.crs=u$_(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof t$O?"EPSG:3857":"CRS:84");const t=r.crs.split(":");if("EPSG"===t[0]&&2===t.length){const e=Number(t[1]);(e>=4e3&&e<5e3&&!w$g.includes(e)||j$c.includes(e))&&(r.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else r.srs=u$_(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof t$O?"EPSG:3857":"EPSG:4326");e.tilingScheme instanceof c$R&&e.tilingScheme.projection instanceof n$1b&&(r.srs="EPSG:0"),t.setQueryParameters(r,!0),i.setQueryParameters(r,!0);var o={query_layers:e.layers,x:"{i}",y:"{j}",info_format:"{format}"};i.setQueryParameters(o,!0),this._resource=t,this._pickFeaturesResource=i,this._layers=e.layers,this._tileProvider=new _$g({url:t,pickFeaturesUrl:i,tilingScheme:u$_(e.tilingScheme,new g$13({ellipsoid:e.ellipsoid})),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:u$_(e.getFeatureInfoFormats,m$f.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures,baseUrl:this._baseUrl}),this._tileProvider._indexedDBSetting=this._indexedDBSetting,this._customRequestHeaders=e.customRequestHeaders,this._tileProvider._customRequestHeaders=e.customRequestHeaders,this._tilingScheme=this._tileProvider._tilingScheme,this._readyPromise=this._tileProvider._readyPromise}function g$k(e,t,i,n,r,o){var a=e$2b(o)?o.data:void 0,s=e._tileProvider;return e$2b(a)&&s._resource.setQueryParameters(a),s.requestImage(t,i,n,r)}function x$g(e,t,i,n,r,o,a){var s=e$2b(a)?a.data:void 0,l=e._tileProvider;return e$2b(s)&&l._pickFeaturesResource.setQueryParameters(s),l.pickFeatures(t,i,n,r,o)}function v$e(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i.toLowerCase()]=e[i]);return t}function a$c(e){return function(t){return new e(t)}}Object.defineProperties(m$f.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},ready:{get:function(){return this._tileProvider.ready}},readyPromise:{get:function(){return this._tileProvider.readyPromise}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}}}),m$f.prototype.getTileCredits=function(e,t,i){return this._tileProvider.getTileCredits(e,t,i)},m$f.prototype.requestImage=function(e,t,i,n){var r,o,a=this._timeDynamicImagery;return e$2b(a)&&(o=a.currentInterval,r=a.getFromCache(e,t,i,n)),e$2b(r)||(r=g$k(this,e,t,i,n,o)),e$2b(r)&&e$2b(a)&&a.checkApproachingInterval(e,t,i,n),r},m$f.prototype.pickFeatures=function(e,t,i,n,r){var o=this._timeDynamicImagery;return x$g(this,e,t,i,n,r,e$2b(o)?o.currentInterval:void 0)},m$f.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"}),m$f.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"}),m$f.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new R$h("json","application/json")),Object.freeze(new R$h("xml","text/xml")),Object.freeze(new R$h("text","text/html"))]);var A$h={ARCGIS_MAPSERVER:a$c(b$p),BING:a$c(o$p),GOOGLE_EARTH:a$c(n$f),MAPBOX:a$c(m$g),SINGLE_TILE:a$c(u$f),TMS:a$c(g$m),URL_TEMPLATE:a$c(_$g),WMS:a$c(m$f),WMTS:a$c(v$E)};function o$k(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).assetId;o$1q.typeOf.number("options.assetId",t),this.defaultAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._ready=!1,this._tileCredits=void 0,this._errorEvent=new o$1h;var i=this,n=n$y._createEndpointResource(t,e),r=e.assetId.toString()+e.accessToken+e.server,o=o$k._endpointCache[r];e$2b(o)||(o=n.fetchJson(),o$k._endpointCache[r]=o),this._readyPromise=o.then((function(e){if("IMAGERY"!==e.type)return o$1l.reject(new t$14("SuperMap3D ion asset "+t+" is not an imagery asset."));var r,o=e.externalType;if(e$2b(o)){var a=A$h[o];if(!e$2b(a))return o$1l.reject(new t$14("Unrecognized SuperMap3D ion imagery type: "+o));r=a(e.options)}else r=new g$m({url:new n$y(e,n)});return i._tileCredits=n$y.getCreditsFromEndpoint(e,n),r.errorEvent.addEventListener((function(e){e.provider=i,i._errorEvent.raiseEvent(e)})),i._imageryProvider=r,r.readyPromise.then((function(){return i._ready=!0,!0}))}))}Object.defineProperties(o$k.prototype,{ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._imageryProvider.rectangle}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._imageryProvider.tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this._ready)throw new t$16("credit must not be called before the imagery provider is ready.");return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){if(!this._ready)throw new t$16("hasAlphaChannel must not be called before the imagery provider is ready.");return this._imageryProvider.hasAlphaChannel}}}),o$k.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$16("getTileCredits must not be called before the imagery provider is ready.");var n=this._imageryProvider.getTileCredits(e,t,i);return e$2b(n)?this._tileCredits.concat(n):this._tileCredits},o$k.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");return this._imageryProvider.requestImage(e,t,i,n)},o$k.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$16("pickFeatures must not be called before the imagery provider is ready.");return this._imageryProvider.pickFeatures(e,t,i,n,r)},o$k._endpointCache={};var e$b={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4},n$e=Object.freeze(e$b);function o$j(e){return e=u$_(e,u$_.EMPTY_OBJECT),new o$k({assetId:u$_(e.style,n$e.AERIAL)})}var L$h=576,A$g=100,g$j="#ffffff",_$f="#48b";function I$g(e,t){for(var i=e.length,n=0;n<i;n++){var r=e[n];if(r$T.equals(r,t))return!0}return!1}function O$e(e){var t=e._previousCredit,i=e._currentCredit;r$T.equals(i,t)||(e$2b(t)&&e._CreditContainer.removeChild(t.element),e$2b(i)&&e._CreditContainer.appendChild(i.element),e._previousCredit=i)}var k$a="supermap3d-credit-delimiter",v$d;function E$f(e){var t=document.createElement("span");return t.textContent=e,t.className=k$a,t}function N$b(e,t){if(e$2b(t)){var i=document.createElement(t);i._creditId=e._creditId,i.appendChild(e),e=i}return e}function F$d(e,t,i,n){for(var r=e.childNodes,o=-1,a=0;a<t.length;++a){var s=t[a];if(e$2b(s)){if(o=a,e$2b(i)&&(o*=2,a>0)){var l=o-1;if(r.length<=l)e.appendChild(E$f(i));else{var u=r[l];u.className!==k$a&&e.replaceChild(E$f(i),u)}}var c=s.element;if(r.length<=o)e.appendChild(N$b(c,n));else{var h=r[o];h._creditId!==s._id&&e.replaceChild(N$b(c,n),h)}}}for(++o;o<r.length;)e.removeChild(r[o])}function q$f(e){var t=e._lightboxCredits,i=e.viewport.clientWidth,n=e.viewport.clientHeight;i!==e._lastViewportWidth&&(i<L$h?(t.className="supermap3d-credit-lightbox supermap3d-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="supermap3d-credit-lightbox supermap3d-credit-lightbox-expanded",t.style.marginTop=Math.floor(.5*(n-t.clientHeight))+"px"),e._lastViewportWidth=i),i>=L$h&&n!==e._lastViewportHeight&&(t.style.marginTop=Math.floor(.5*(n-t.clientHeight))+"px",e._lastViewportHeight=n)}function a$b(e,t){var i=e+" {";for(var n in t)t.hasOwnProperty(n)&&(i+=n+": "+t[n]+"; ");return i+=" }\n"}function S$c(){var e="";e+=a$b(".supermap3d-credit-lightbox-overlay",{display:"none","z-index":"1",position:"absolute",top:"0",left:"0",width:"100%",height:"100%","background-color":"rgba(80, 80, 80, 0.8)"}),e+=a$b(".supermap3d-credit-lightbox",{"background-color":"#303336",color:g$j,position:"relative","min-height":A$g+"px",margin:"auto"}),e+=a$b(".supermap3d-credit-lightbox > ul > li a, .supermap3d-credit-lightbox > ul > li a:visited",{color:g$j}),e+=a$b(".supermap3d-credit-lightbox > ul > li a:hover",{color:_$f}),e+=a$b(".supermap3d-credit-lightbox.supermap3d-credit-lightbox-expanded",{border:"1px solid #444","border-radius":"5px","max-width":"370px"}),e+=a$b(".supermap3d-credit-lightbox.supermap3d-credit-lightbox-mobile",{height:"100%",width:"100%"}),e+=a$b(".supermap3d-credit-lightbox-title",{padding:"20px 20px 0 20px"}),e+=a$b(".supermap3d-credit-lightbox-close",{"font-size":"18pt",cursor:"pointer",position:"absolute",top:"0",right:"6px",color:g$j}),e+=a$b(".supermap3d-credit-lightbox-close:hover",{color:_$f}),e+=a$b(".supermap3d-credit-lightbox > ul",{margin:"0",padding:"12px 20px 12px 40px","font-size":"13px"}),e+=a$b(".supermap3d-credit-lightbox > ul > li",{"padding-bottom":"6px"}),e+=a$b(".supermap3d-credit-lightbox > ul > li *",{padding:"0",margin:"0"}),e+=a$b(".supermap3d-credit-expand-link",{"padding-left":"5px",cursor:"pointer","text-decoration":"underline",color:g$j}),e+=a$b(".supermap3d-credit-expand-link:hover",{color:_$f}),e+=a$b(".supermap3d-credit-text",{color:g$j}),e+=a$b(".supermap3d-credit-textContainer *, .supermap3d-credit-logoContainer *",{display:"inline"});var t=document.head,i=document.createElement("style");i.innerHTML=e,t.insertBefore(i,t.firstChild)}function r$l(e,t,i){o$1q.defined("container",e);var n=this;i=u$_(i,document.body);var r=document.createElement("div");r.className="supermap3d-credit-lightbox-overlay",i.appendChild(r);var o=document.createElement("div");function a(e){o.contains(e.target)||n.hideLightbox()}o.className="supermap3d-credit-lightbox",r.appendChild(o),r.addEventListener("click",a,!1);var s=document.createElement("div");s.className="supermap3d-credit-lightbox-title",s.textContent="Data provided by:",o.appendChild(s);var l=document.createElement("a");l.onclick=this.hideLightbox.bind(this),l.innerHTML="×",l.className="supermap3d-credit-lightbox-close",o.appendChild(l);var u=document.createElement("ul");o.appendChild(u);var c=document.createElement("div");c.className="supermap3d-credit-logoContainer",c.style.display="inline",e.appendChild(c);var h=document.createElement("div");h.className="supermap3d-credit-textContainer",h.style.display="inline",e.appendChild(h);var d=document.createElement("a");d.className="supermap3d-credit-expand-link",d.onclick=this.showLightbox.bind(this),d.textContent="Data attribution",e.appendChild(d),S$c();var f=r$T.clone(r$l.credit);this._delimiter=u$_(t," • "),this._screenContainer=h,this._CreditContainer=c,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=o,this._creditList=u,this._lightbox=r,this._hideLightbox=a,this._expandLink=d,this._expanded=!1,this._defaultCredits=[],this._credit=f,this._previousCredit=void 0,this._currentcredit=f,this._currentFrameCredits={screenCredits:new e$1N,lightboxCredits:new e$1N},this._defaultCredit=void 0,this.viewport=i,this.container=e}function H$l(){if(!e$2b(v$d)){var e=n$15("Assets/Images/logo.png");v$d=new r$T('<a href="http://www.supermap.com" target="_blank"><img src="'+e+'" title="SuperMap"/></a>',!0)}return r$l._CreditInitialized||(r$l._credit=v$d,r$l._CreditInitialized=!0),v$d}function r$k(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._sceneDepthBuffer=void 0,this._cameraDepthBuffer=void 0,this._boundingSphere=new i$1c,this._qureyRegion=[],this._waterHeight=0,this._polygonTexture=null,this._damBreakPosition=[0,0,0],this._frameState=void 0,this._update=!0,this._name="",this._sceneName="",this._cameraName="",this._checking=!1}function h$h(e){e$2b(e._polygonTexture)&&(e._polygonTexture=e._polygonTexture&&e._polygonTexture.destroy(),e._polygonTexture=null)}function i$h(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).attributeName,i=e.perInstanceAttribute;if(!e$2b(t))throw new t$16("options.attributeName is required.");e$2b(i)||(i=!1);var n,r=u$_(e.glslDatatype,"vec3"),o="v_"+t;if("normal"===t||"tangent"===t||"bitangent"===t)n="vec4 getColor() { return vec4(("+o+" + vec3(1.0)) * 0.5, 1.0); }\n";else switch("st"===t&&(r="vec2"),r){case"float":n="vec4 getColor() { return vec4(vec3("+o+"), 1.0); }\n";break;case"vec2":n="vec4 getColor() { return vec4("+o+", 0.0, 1.0); }\n";break;case"vec3":n="vec4 getColor() { return vec4("+o+", 1.0); }\n";break;case"vec4":n="vec4 getColor() { return "+o+"; }\n";break;default:throw new t$16("options.glslDatatype must be float, vec2, vec3, or vec4.")}var a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n"+(i?"":"attribute "+r+" "+t+";\n")+"varying "+r+" "+o+";\nvoid main()\n{\nvec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);\n"+(i?o+" = czm_batchTable_"+t+"(batchId);\n":o+" = "+t+";\n")+"gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}",s="varying "+r+" "+o+";\n"+n+"\nvoid main()\n{\ngl_FragColor = getColor();\n}";this.material=void 0,this.translucent=u$_(e.translucent,!1),this._vertexShaderSource=u$_(e.vertexShaderSource,a),this._fragmentShaderSource=u$_(e.fragmentShaderSource,s),this._renderState=a$S.getDefaultRenderState(!1,!1,e.renderState),this._closed=u$_(e.closed,!1),this._attributeName=t,this._glslDatatype=r}function s$d(e){e=u$_(e,u$_.EMPTY_OBJECT),this.length=u$_(e.length,1e7),this._length=void 0,this.width=u$_(e.width,2),this._width=void 0,this.show=u$_(e.show,!0),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=new p$1d,this.id=e.id,this._id=void 0,this._primitive=void 0}r$l.prototype.addCredit=function(e){if(o$1q.defined("credit",e),e._isIon)return e$2b(this._defaultCredit)||(this._defaultCredit=r$T.clone(H$l())),void(this._currentCredit=this._defaultCredit);e.showOnScreen?this._currentFrameCredits.screenCredits.set(e.id,e):this._currentFrameCredits.lightboxCredits.set(e.id,e)},r$l.prototype.addDefaultCredit=function(e){o$1q.defined("credit",e);var t=this._defaultCredits;I$g(t,e)||t.push(e)},r$l.prototype.removeDefaultCredit=function(e){o$1q.defined("credit",e);var t=this._defaultCredits,i=t.indexOf(e);-1!==i&&t.splice(i,1)},r$l.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0},r$l.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1},r$l.prototype.update=function(){this._expanded&&q$f(this)},r$l.prototype.beginFrame=function(){var e=this._currentFrameCredits,t=e.screenCredits;t.removeAll();for(var i=this._defaultCredits,n=0;n<i.length;++n){var r=i[n];t.set(r.id,r)}e.lightboxCredits.removeAll(),r$T.equals(r$l.credit,this._credit)||(this._credit=r$T.clone(r$l.credit)),this._currentCredit=this._credit},r$l.prototype.endFrame=function(){var e=this._currentFrameCredits.screenCredits.values;F$d(this._screenContainer,e,this._delimiter,void 0);var t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",F$d(this._creditList,t,void 0,"li"),O$e(this)},r$l.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._CreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),i$10(this)},r$l.prototype.isDestroyed=function(){return!1},r$l._credit=void 0,r$l._CreditInitialized=!1,Object.defineProperties(r$l,{credit:{get:function(){return H$l(),r$l._credit},set:function(e){r$l._credit=e,r$l._CreditInitialized=!0}}}),Object.defineProperties(r$k.prototype,{damBreakPosition:{get:function(){return this._damBreakPosition},set:function(e){this._damBreakPosition=e,this._update=!0}},waterHeight:{get:function(){return this._waterHeight},set:function(e){this._waterHeight=e,this._update=!0}}}),r$k.prototype.destroy=function(){return h$h(this),i$10(this)},r$k.prototype.build=function(){""!==this._name||this._checking||(this._name="damBreakAnalysis"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},r$k.prototype.qureyRegion=function(e){if(!e$2b(e)||!e$2b(e.position))throw new t$16("the options is required");this._qureyRegion=e.position,this._update=!0},r$k.prototype.setTerrainBlock=function(e){},r$k.prototype.update=function(e,t,i){if("water"!==t._fboState.name&&!t.passes.pick){if(t._fboState.enabled&&(t._fboState.name===this._sceneName||t._fboState.name===this._cameraName))return void(t._fboState.name===this._sceneName&&e$2b(this._stencilCommand)&&i.push(this._stencilCommand));var n=t.camera;n.bReflect||(p$1d.multiply(this._viewProjMatrix,n.inverseViewMatrix,this._renderTextureMatrix),this._update&&(this._frameState=t,e$2b(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new s$T(e),this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),this._update=!1,h$h(this),updateCamera(this,e,t),updateViewShed(this,e,t)),e$2b(this._cameraDepthBuffer.framebuffer)&&i.push(correct))}},Object.defineProperties(i$h.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}}),i$h.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,i$h.prototype.isTranslucent=a$S.prototype.isTranslucent,i$h.prototype.getRenderState=a$S.prototype.getRenderState,s$d.prototype.update=function(e){if(this.show){if(!e$2b(this._primitive)||!p$1d.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=p$1d.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,e$2b(this._primitive)&&this._primitive.destroy(),0===this.modelMatrix[12]&&0===this.modelMatrix[13]&&0===this.modelMatrix[14]&&(this.modelMatrix[14]=.01);var t=new d$1o({geometry:new R$A({positions:[o$1p.ZERO,o$1p.UNIT_X],width:this.width,vertexFormat:e$1C.VERTEX_FORMAT,colors:[e$1U.RED,e$1U.RED],arcType:m$1f.NONE}),modelMatrix:p$1d.multiplyByUniformScale(this.modelMatrix,this.length,new p$1d),id:this.id,pickPrimitive:this}),i=new d$1o({geometry:new R$A({positions:[o$1p.ZERO,o$1p.UNIT_Y],width:this.width,vertexFormat:e$1C.VERTEX_FORMAT,colors:[e$1U.GREEN,e$1U.GREEN],arcType:m$1f.NONE}),modelMatrix:p$1d.multiplyByUniformScale(this.modelMatrix,this.length,new p$1d),id:this.id,pickPrimitive:this}),n=new d$1o({geometry:new R$A({positions:[o$1p.ZERO,o$1p.UNIT_Z],width:this.width,vertexFormat:e$1C.VERTEX_FORMAT,colors:[e$1U.BLUE,e$1U.BLUE],arcType:m$1f.NONE}),modelMatrix:p$1d.multiplyByUniformScale(this.modelMatrix,this.length,new p$1d),id:this.id,pickPrimitive:this});this._primitive=new y$S({geometryInstances:[t,i,n],appearance:new e$1C,asynchronous:!1})}this._primitive.update(e)}},s$d.prototype.isDestroyed=function(){return!1},s$d.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$10(this)};var N$a="varying vec4 positionEC;\nvoid main()\n{\nvec3 direction = normalize(positionEC.xyz);\nczm_ray ray = czm_ray(vec3(0.0), direction);\nvec3 ellipsoid_center = czm_view[3].xyz;\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\nif (!czm_isEmpty(intersection))\n{\ngl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n}\nelse\n{\ndiscard;\n}\nczm_writeLogDepth();\n}\n",V$d="attribute vec4 position;\nvarying vec4 positionEC;\nvoid main()\n{\npositionEC = czm_modelView * position;\ngl_Position = czm_projection * positionEC;\nczm_vertexLogDepth();\n}\n";function c$c(){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1}var f$j=s$Y.supportsTypedArrays()?new Float32Array(12):[],L$g=new o$1p,P$h=new o$1p,C$g=new o$1p,n$d=new o$1p;function Q$9(e,t){var i=e.radii,n=t.camera.positionWC,r=o$1p.multiplyComponents(e.oneOverRadii,n,L$g),o=o$1p.magnitude(r),a=o$1p.normalize(r,P$h),s=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,r,C$g),C$g),l=o$1p.normalize(o$1p.cross(a,s,n$d),n$d),u=Math.sqrt(o$1p.magnitudeSquared(r)-1),c=o$1p.multiplyByScalar(a,1/o,L$g),h=u/o,d=o$1p.multiplyByScalar(s,h,P$h),f=o$1p.multiplyByScalar(l,h,C$g),p=o$1p.add(c,f,n$d);o$1p.subtract(p,d,p),o$1p.multiplyComponents(i,p,p),o$1p.pack(p,f$j,0);var _=o$1p.subtract(c,f,n$d);o$1p.subtract(_,d,_),o$1p.multiplyComponents(i,_,_),o$1p.pack(_,f$j,3);var m=o$1p.add(c,f,n$d);o$1p.add(m,d,m),o$1p.multiplyComponents(i,m,m),o$1p.pack(m,f$j,6);var g=o$1p.subtract(c,f,n$d);return o$1p.add(g,d,g),o$1p.multiplyComponents(i,g,g),o$1p.pack(g,f$j,9),f$j}function l$i(){}c$c.prototype.update=function(e){if(this._mode=e.mode,e.mode===C$13.SCENE3D){var t=e.context,i=e.mapProjection.ellipsoid,n=e.useLogDepth;if(e$2b(this._command)||(this._rs=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new i$_({renderState:this._rs,boundingVolume:new i$1c(o$1p.ZERO,i.maximumRadius),pass:Le$s.OPAQUE,owner:this})),!e$2b(this._sp)||this._useLogDepth!==n){this._useLogDepth=n;var r=new s$U({name:"DepthPlaneVS",sources:[V$d]}),o=new s$U({name:"DepthPlaneFS",sources:[N$a]});if(n){o.sources.push("#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),o.defines.push("LOG_DEPTH"),r.defines.push("LOG_DEPTH")}this._sp=r$13.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}var a=Q$9(i,e);if(e$2b(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(a);else{var s=new I$1p({attributes:{position:new o$1c({componentDatatype:S$12.FLOAT,componentsPerAttribute:3,values:a})},indices:[0,1,2,2,1,3],primitiveType:W$18.TRIANGLES});this._va=c$12.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:A$19.DYNAMIC_DRAW}),this._command.vertexArray=this._va}}},c$c.prototype.execute=function(e,t){this._mode===C$13.SCENE3D&&this._command.execute(e,t)},c$c.prototype.isDestroyed=function(){return!1},c$c.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var b$l=/\bgl_FragDepthEXT\b/,z$e=/\bdiscard\b/;function T$f(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(!e$2b(i)){var n=t._attributeLocations,r=t.fragmentShaderSource,o=!1;r.useWGSL&&(o=!0);var a=!1,s=r.sources,l=s.length;for(f=0;f<l;++f)if(b$l.test(s[f])||z$e.test(s[f])){a=!0;break}var u=!1,c=r.defines;for(l=c.length,f=0;f<l;++f)if("LOG_DEPTH"===c[f]){u=!0;break}if(e.depthTexture){var h=o?k$Y:"";a||u?!a&&u&&(r=new s$U({defines:["LOG_DEPTH"],sources:[o?"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n gl_FragColor = vec4<f32>(1.0f); \n czm_writeLogDepth(v_depthFromNearPlusOne); \n} \n":"#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\nvoid main() \n{ \n gl_FragColor = vec4(1.0); \n czm_writeLogDepth(); \n} \n"],preSources:[h],useWGSL:o})):r=new s$U({sources:[o?"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n gl_FragColor = vec4<f32>(1.0f); \n} \n":"void main() \n{ \n gl_FragColor = vec4(1.0); \n} \n"],preSources:[h],useWGSL:o})}else if(a||u)if(!a&&u)r=new s$U({defines:["LOG_DEPTH"],sources:["#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\nvoid main() \n{ \n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n czm_writeLogDepth(); \n} \n"]});else{l=s.length;for(var d=new Array(l+1),f=0;f<l;++f)d[f]=s$U.replaceMain(s[f],"pick_depth_old_main");var p="void main() \n{ \n pick_depth_old_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = "+(u?"czm_packDepth(gl_FragDepthEXT)":"czm_packDepth(gl_FragCoord.z)")+";\n} \n";d[l]=p;for(var _=[],m=0;m<c.length;m++){var g=r.defines[m];_.push(g)}r=new s$U({sources:d,defines:_})}else r=new s$U({sources:["void main() \n{ \n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n} \n"]});i=e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function E$e(e,t,i){var n=e._depthOnlyRenderStateCache,r=n[t.id];if(!e$2b(r)){var o=d$1m.getState(t);o.depthMask=!0,e._context.depthTexture&&(o.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),e$2b(i)&&(o.viewport=void 0),r=d$1m.fromCache(o),n[t.id]=r}return r}l$i.createDepthOnlyDerivedCommand=function(e,t,i,n){var r,o;return e$2b(n)||(n={}),e$2b(n.depthOnlyCommand)&&(r=n.depthOnlyCommand.shaderProgram,o=n.depthOnlyCommand.renderState),n.depthOnlyCommand=i$_.shallowClone(t,n.depthOnlyCommand),e$2b(r)&&n.shaderProgramId===t.shaderProgram.id?(n.depthOnlyCommand.shaderProgram=r,n.depthOnlyCommand.renderState=o):(n.depthOnlyCommand.shaderProgram=T$f(i,t.shaderProgram),n.depthOnlyCommand.renderState=E$e(e,t.renderState,n.depthOnlyCommand._pointCloudEyeDomeLighting),n.shaderProgramId=t.shaderProgram.id),n.depthOnlyCommand._pointCloudEyeDomeLighting&&(n.depthOnlyCommand.framebuffer=void 0),n};var I$f=/\s+czm_writeLogDepth\(|\s+writeLogDepth\(/,u$e=/\s+czm_vertexLogDepth\(|\s+vertexLogDepth\(/,R$g=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;function w$f(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!e$2b(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone(),a=!1;o.useWGSL&&(a=!0),r.defines=e$2b(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),o.defines=e$2b(o.defines)?o.defines.slice(0):[],o.defines.push("LOG_DEPTH");var s,l,u=!1,c=r.sources,h=c.length;for(s=0;s<h;++s)if(u$e.test(c[s])){u=!0;break}if(!u){for(s=0;s<h;++s)c[s]=s$U.replaceMain(c[s],"czm_log_depth_main",a);l=a?"#include <SceneUboDecl> \n@vertex \nfn main(input : VertexInputs) -> FragmentInputs \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n":"\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n",c.push(l)}var d=!0;for(u=!1,h=(c=o.sources).length,s=0;s<h;++s)I$f.test(c[s])&&(u=!0),R$g.test(c[s])&&(d=!1);var f="";if(d&&!e.webgpu&&(f+="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),!u){for(s=0;s<h;s++)c[s]=s$U.replaceMain(c[s],"czm_log_depth_main",a);f+=a?"@fragment \nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(v_depthFromNearPlusOne); \n} \n":"\nvoid main() \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(); \n} \n"}c.push(f),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n,transformFeedbackVaryings:t._transformFeedbackVaryings})}return i}function H$k(e,t,i){var n=e.shaderCache.getDerivedShaderProgram(t,"pick");if(!e$2b(n)){var r=t._attributeLocations,o=t.fragmentShaderSource,a=!1;o.useWGSL&&(a=!0);var s,l=o.sources,u=l.length,c="";if(a){c="@fragment \nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a < Layer.uTransparentFilter) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n",s=new Array(u+1);for(var h=0;h<u;++h)s[h]=s$U.replaceMain(l[h],"czm_non_pick_main",a);s[u]=c}else{c="vSecondColor"===i?"void main() \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a < uTransparentFilter) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n":"void main() \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n",s=new Array(u+1);for(h=0;h<u;++h)s[h]=s$U.replaceMain(l[h],"czm_non_pick_main");s[u]=c}o=new s$U({sources:s,preSources:o.preSources,defines:o.defines,useWGSL:a}),n=e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:r})}return n}function X$9(e,t){var i=e._pickRenderStateCache,n=i[t.id];if(!e$2b(n)){var r=d$1m.getState(t);r.blending.enabled=!1,r.depthMask=!0,n=d$1m.fromCache(r),i[t.id]=n}return n}function N$9(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(!e$2b(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();r.defines=e$2b(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),o.defines=e$2b(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),i=e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n,transformFeedbackVaryings:t._transformFeedbackVaryings})}return i}function M$h(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"NORMAL");if(!e$2b(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();o.defines=e$2b(o.defines)?o.defines.slice(0):[],o.defines.push("NORMAL"),i=e.shaderCache.createDerivedShaderProgram(t,"NORMAL",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i}function A$f(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"mask");if(!e$2b(i)){var n=t._attributeLocations,r=t.fragmentShaderSource,o=!1;r.useWGSL&&(o=!0);var a,s=r.sources,l=s.length;for(a=0;a<l&&(!b$l.test(s[a])&&!z$e.test(s[a]));++a);var u=r.defines;for(l=u.length,a=0;a<l&&"LOG_DEPTH"!==u[a];++a);var c=o?k$Y:"";r=new s$U({defines:["LOG_DEPTH"],sources:[o?["#include <SceneUboDecl>","varying vColor : vec4<f32>;","varying fSelected : f32;","@fragment","fn main(input : FragmentInputs) -> FragmentOutputs {"," if(vColor.a < 0.1 || fSelected < 0.1){discard;}","\tgl_FragColor = vec4<f32>(0.0, 0.0, 1.0, 1.0);"," czm_writeLogDepth(v_depthFromNearPlusOne);","}"].join("\n"):["#ifdef GL_EXT_frag_depth","#extension GL_EXT_frag_depth : enable","#endif","varying vec4 vColor;","varying vec2 fSelected;","void main() {"," if(vColor.a < 0.1 || fSelected.x < 0.1){discard;}","\tfloat depth = czm_unpackDepth(texture2D(czm_nonSelDepthTexture, gl_FragCoord.xy / czm_viewport.zw));"," depth = czm_reverseLogDepth(depth);"," vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);"," if(-positionEC.z > 10000.0){discard;}"," float near = czm_currentFrustum.x;"," float far = czm_currentFrustum.y;"," float viewZ = -( near * far ) / ( ( far - near ) * depth - far );"," float depthTest = (-positionEC.z > viewZ) && (depth > 0.00001) ? 1.0 : 0.0;","\tgl_FragColor = vec4(0.0, depthTest, 1.0, 1.0);"," czm_writeLogDepth();","}"].join("\n")],preSources:[c],useWGSL:o}),i=e.shaderCache.createDerivedShaderProgram(t,"mask",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function h$g(e){if(!e$2b(e))throw new t$16("scene is required.");this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;var t=this;function i(e){var i=e.alpha;if(!e$2b(i))return t._alpha=void 0,t._beta=void 0,void(t._gamma=void 0);t._alpha=e$2a.toRadians(i),t._beta=e$2a.toRadians(e.beta),t._gamma=e$2a.toRadians(e.gamma)}window.addEventListener("deviceorientation",i,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",i,!1)}}l$i.createLogDepthCommand=function(e,t,i){var n;return e$2b(i)||(i={}),e$2b(i.command)&&(n=i.command.shaderProgram),i.command=i$_.shallowClone(e,i.command),e$2b(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=w$f(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},l$i.createPickDerivedCommand=function(e,t,i,n){var r,o;return e$2b(n)||(n={}),e$2b(n.pickCommand)&&(r=n.pickCommand.shaderProgram,o=n.pickCommand.renderState),n.pickCommand=i$_.shallowClone(t,n.pickCommand),e$2b(r)&&n.shaderProgramId===t.shaderProgram.id?(n.pickCommand.shaderProgram=r,n.pickCommand.renderState=o):(n.pickCommand.shaderProgram=H$k(i,t.shaderProgram,t.pickId),n.pickCommand.renderState=X$9(e,t.renderState),n.shaderProgramId=t.shaderProgram.id),e.pickPointEnabled&&t.pass===Le$s.S3MTiles&&(n.pickCommand.primitiveType=W$18.POINTS),n},l$i.createHdrCommand=function(e,t,i){var n;return e$2b(i)||(i={}),e$2b(i.command)&&(n=i.command.shaderProgram),i.command=i$_.shallowClone(e,i.command),e$2b(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=N$9(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},l$i.createPrepassDerivedCommand=function(e,t,i,n){var r;return e$2b(n)||(n={}),e$2b(n.command)&&(r=n.command.shaderProgram),n.command=i$_.shallowClone(t,n.command),e$2b(r)&&n.shaderProgramId===t.shaderProgram.id?n.command.shaderProgram=r:(n.command.shaderProgram=e._renderPipeline._prepassRenderer.getPrepassShaderProgram(i,t.shaderProgram),n.shaderProgramId=t.shaderProgram.id),n},l$i.createNormalDerivedCommand=function(e,t,i){var n;return e$2b(i)||(i={}),e$2b(i.command)&&(n=i.command.shaderProgram),i.command=i$_.shallowClone(e,i.command),e$2b(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=M$h(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},l$i.createMaskCommand=function(e,t,i){var n;return e$2b(i)||(i={}),e$2b(i.command)&&(n=i.command.shaderProgram),i.command=i$_.shallowClone(e,i.command),e$2b(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=A$f(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i};var b$k=new n$13,f$i=new n$13,A$e=new p$1e;function w$e(e,t,i,n){var r=e.direction,o=e.right,a=e.up,s=n$13.fromAxisAngle(r,i,f$i),l=n$13.fromAxisAngle(o,n,b$k),u=n$13.multiply(l,s,l),c=n$13.fromAxisAngle(a,t,f$i);n$13.multiply(c,u,u);var h=p$1e.fromQuaternion(u,A$e);p$1e.multiplyByVector(h,o,o),p$1e.multiplyByVector(h,a,a),p$1e.multiplyByVector(h,r,r)}function r$j(e){this.blobSize=u$_(e,0)}h$g.prototype.update=function(){if(e$2b(this._alpha)){e$2b(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);var e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,i=this._lastGamma-this._gamma;w$e(this._scene.camera,-e,t,i),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma}},h$g.prototype.isDestroyed=function(){return!1},h$g.prototype.destroy=function(){return this._removeListener(),i$10(this)},r$j.prototype.isReady=function(){return!0},new e$29,r$j.prototype.shouldDiscardImage=function(e){return e.blob.size===this.blobSize};var I$e="#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#endif\nuniform vec3 u_radii;\nuniform vec3 u_oneOverEllipsoidRadiiSquared;\nvarying vec3 v_positionEC;\nvec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)\n{\nvec3 positionEC = czm_pointAlongRay(ray, intersection);\nvec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;\nvec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));\nvec3 sphericalNormal = normalize(positionMC / u_radii);\nvec3 normalMC = geodeticNormal * side;\nvec3 normalEC = normalize(czm_normal * normalMC);\nvec2 st = czm_ellipsoidWgs84TextureCoordinates(sphericalNormal);\nvec3 positionToEyeEC = -positionEC;\nczm_materialInput materialInput;\nmaterialInput.s = st.s;\nmaterialInput.st = st;\nmaterialInput.str = (positionMC + u_radii) / u_radii;\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\nreturn czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}\nvoid main()\n{\nfloat maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;\nvec3 direction = normalize(v_positionEC);\nvec3 ellipsoidCenter = czm_modelView[3].xyz;\nfloat t1 = -1.0;\nfloat t2 = -1.0;\nfloat b = -2.0 * dot(direction, ellipsoidCenter);\nfloat c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;\nfloat discriminant = b * b - 4.0 * c;\nif (discriminant >= 0.0) {\nt1 = (-b - sqrt(discriminant)) * 0.5;\nt2 = (-b + sqrt(discriminant)) * 0.5;\n}\nif (t1 < 0.0 && t2 < 0.0) {\ndiscard;\n}\nfloat t = min(t1, t2);\nif (t < 0.0) {\nt = 0.0;\n}\nczm_ray ray = czm_ray(t * direction, direction);\nvec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);\nif (czm_isEmpty(intersection))\n{\ndiscard;\n}\nvec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);\nvec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);\ngl_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);\ngl_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);\n#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\nt = (intersection.start != 0.0) ? intersection.start : intersection.stop;\nvec3 positionEC = czm_pointAlongRay(ray, t);\nvec4 positionCC = czm_projection * vec4(positionEC, 1.0);\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + positionCC.w);\n#else\nfloat z = positionCC.z / positionCC.w;\nfloat n = czm_depthRange.near;\nfloat f = czm_depthRange.far;\ngl_FragDepthEXT = (z * (f - n) + f + n) * 0.5;\n#endif\n#endif\n#endif\n}\n",O$d="attribute vec3 position;\nuniform vec3 u_radii;\nvarying vec3 v_positionEC;\nvoid main()\n{\nvec4 p = vec4(u_radii * position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\ngl_Position = czm_modelViewProjection * p;\ngl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);\nczm_vertexLogDepth();\n}\n",S$b={position:0};function p$c(e){e=u$_(e,u$_.EMPTY_OBJECT),this.center=o$1p.clone(u$_(e.center,o$1p.ZERO)),this._center=new o$1p,this.radii=o$1p.clone(e.radii),this._radii=new o$1p,this._oneOverEllipsoidRadiiSquared=new o$1p,this._boundingSphere=new i$1c,this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=new p$1d,this._computedModelMatrix=new p$1d,this.show=u$_(e.show,!0),this.material=u$_(e.material,r$X.fromType(r$X.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.onlySunLighting=u$_(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=u$_(e.depthTestEnabled,!0),this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new i$_({owner:u$_(e._owner,this)}),this._pickCommand=new i$_({owner:u$_(e._owner,this),pickOnly:!0});var t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function q$e(e){var t=e.cache.ellipsoidPrimitive_vertexArray;if(e$2b(t))return t;var i=O$y.createGeometry(O$y.fromDimensions({dimensions:new o$1p(2,2,2),vertexFormat:n$11.POSITION_ONLY}));return t=c$12.fromGeometry({context:e,geometry:i,attributeLocations:S$b,bufferUsage:A$19.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}var C$f="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n";p$c.prototype.update=function(e){if(this.show&&e.mode===C$13.SCENE3D&&e$2b(this.center)&&e$2b(this.radii)){if(!e$2b(this.material))throw new t$16("this.material must be defined.");var t=e.context,i=this.material.isTranslucent(),n=this._translucent!==i;(!e$2b(this._rs)||n)&&(this._translucent=i,this._rs=d$1m.fromCache({cull:{enabled:!0,face:G$17.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!i&&t.fragmentDepth,blending:i?Ee$r.ALPHA_BLEND:void 0})),e$2b(this._va)||(this._va=q$e(t));var r=!1,o=this.radii;if(!o$1p.equals(this._radii,o)){o$1p.clone(o,this._radii);var a=this._oneOverEllipsoidRadiiSquared;a.x=1/(o.x*o.x),a.y=1/(o.y*o.y),a.z=1/(o.z*o.z),r=!0}(!p$1d.equals(this.modelMatrix,this._modelMatrix)||!o$1p.equals(this.center,this._center))&&(p$1d.clone(this.modelMatrix,this._modelMatrix),o$1p.clone(this.center,this._center),p$1d.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),r=!0),r&&(o$1p.clone(o$1p.ZERO,this._boundingSphere.center),this._boundingSphere.radius=o$1p.maximumComponent(o),i$1c.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));var s=this._material!==this.material;this._material=this.material,this._material.update(t);var l=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;var u=e.useLogDepth,c=this._useLogDepth!==u;this._useLogDepth=u;var h,d,f=this._colorCommand;(s||l||n||c)&&(h=new s$U({name:"EllipsoidVS",sources:[O$d]}),d=new s$U({name:"EllipsoidFS",sources:[this.material.shaderSource,I$e]}),this.onlySunLighting&&d.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&d.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),d.defines.push("LOG_DEPTH"),d.sources.push(C$f)),this._sp=r$13.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:S$b}),f.vertexArray=this._va,f.renderState=this._rs,f.shaderProgram=this._sp,f.uniformMap=p$19(this._uniforms,this.material._uniforms),f.executeInClosestFrustum=i);var p=e.commandList,_=e.passes;if(_.render&&(f.boundingVolume=this._boundingSphere,f.debugShowBoundingVolume=this.debugShowBoundingVolume,f.modelMatrix=this._computedModelMatrix,f.pass=i?Le$s.TRANSLUCENT:Le$s.OPAQUE,p.push(f)),_.pick){var m=this._pickCommand;(!e$2b(this._pickId)||this._id!==this.id)&&(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(s||l||!e$2b(this._pickSP)||c)&&(h=new s$U({sources:[O$d]}),d=new s$U({sources:[this.material.shaderSource,I$e],pickColorQualifier:"uniform"}),this.onlySunLighting&&d.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&d.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),d.defines.push("LOG_DEPTH"),d.sources.push(C$f)),this._pickSP=r$13.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:S$b}),m.vertexArray=this._va,m.renderState=this._rs,m.shaderProgram=this._pickSP,m.uniformMap=p$19(p$19(this._uniforms,this._pickUniforms),this.material._uniforms),m.executeInClosestFrustum=i),m.boundingVolume=this._boundingSphere,m.modelMatrix=this._computedModelMatrix,m.pass=i?Le$s.TRANSLUCENT:Le$s.OPAQUE,p.push(m)}}},p$c.prototype.isDestroyed=function(){return!1},p$c.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),i$10(this)};var te$4="layout(location=0) in vec3 pos;\nlayout(location=2) in vec2 lonLat;\nlayout(location=3) in vec2 life;\nlayout(location=4) in vec2 texCoord;\nuniform float pointSize;\nuniform float uFieldTextureSize;\nuniform float uMaxFilterValue;\nuniform float uMinFilterValue;\nuniform vec4 particleColor;\nuniform sampler2D velocityTexture;\nuniform sampler2D colorTable;\nuniform float uHasColorTable;\nuniform float uCeil;\nuniform float uFloor;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 lonlatRange;\nout vec4 velocityColor;\nout vec2 outTexCoord;\nfloat computerOnePixelLength(vec3 inPos)\n{\nvec4 viewPos = czm_view * vec4(inPos, 1.0);\nvec4 winPos = czm_projection * viewPos;\nfloat dwidth = czm_metersPerPixel(viewPos);\nwinPos.x = winPos.x - 2.0 * dwidth;\nvec4 newViewPos = czm_inverseProjection * winPos;\nreturn length(viewPos - newViewPos);\n}\nvec4 computePos(vec3 v3Normal, vec3 inPos)\n{\nvec4 viewPos = czm_view * vec4(inPos, 1.0);\n#ifdef SIZEFIXED\nviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength(inPos) * uFieldTextureSize;\n#else\nviewPos.xyz = viewPos.xyz + v3Normal * uFieldTextureSize;\n#endif\nviewPos.xyz = viewPos.xyz * 0.9;\nreturn czm_projection * viewPos;\n}\nvoid main()\n{\nvec3 relativeOriginPos = pos - czm_relativeOrigin;\nvec2 lonLatTexCoord;\n#ifdef TEXTUREEFFECT\nlonLatTexCoord.x = (lonLat.x + czm_pi) / czm_twoPi;\nlonLatTexCoord.y = (lonLat.y + czm_piOverTwo) / czm_pi;\n#else\nlonLatTexCoord.x = (lonLat.x - lonlatRange.x) / (lonlatRange.z - lonlatRange.x);\nlonLatTexCoord.y = (lonLat.y - lonlatRange.y) / (lonlatRange.w - lonlatRange.y);\n#endif\nvec2 velocity = texture(velocityTexture, lonLatTexCoord).xy;\nfloat velocitySize = length(velocity);\nfloat threshold = abs(uCeil - uFloor);\nfloat contourRate = (velocitySize - uFloor) / threshold;\nfloat finalCoord = clamp(contourRate, 0.0, 1.0);\nvelocityColor = mix(particleColor, texture(colorTable, vec2(0.0, finalCoord)).rgba, uHasColorTable);\noutTexCoord= texCoord;\nvec3 upAxis = normalize(relativeOriginPos);\nvec3 eastAxis = cross(vec3(0.0, 0.0, 1.0), upAxis);\neastAxis = normalize(eastAxis);\nvec3 northAxis = cross(upAxis, eastAxis);\nnorthAxis = normalize(northAxis);\n#ifdef FILTER\nif(velocitySize > uMaxFilterValue || velocitySize < uMinFilterValue){\nvelocityColor.a = 0.0;\n}\n#endif\n#ifdef TEXTUREEFFECT\nvec3 nestPos = relativeOriginPos + northAxis * velocity.y * deltaTime * velocityScale + eastAxis * velocity.x * deltaTime * velocityScale;\nvec4 nextPrjPos = czm_viewProjection * vec4(nestPos, 1.0);\nvec4 curPrjPos = czm_viewProjection * vec4(relativeOriginPos, 1.0);\nvec2 direction = normalize(nextPrjPos.xy - curPrjPos.xy);\nfloat cosx = dot(direction, vec2(1.0, 0.0));\nfloat cosy = dot(direction, vec2(0.0, 1.0));\nfloat sinx = sqrt(1.0- cosx*cosx);\nfloat cosYBiggerThan0 = sign(cosy);\nmat2 mat = mat2(cosx, sinx * cosYBiggerThan0, -sinx * cosYBiggerThan0, cosx);\nvec2 realNormal = mat * texCoord.xy;\ngl_Position = computePos(vec3(realNormal.xy, 0.0), relativeOriginPos);\n#else\ngl_PointSize = pointSize;\ngl_Position = czm_viewProjection * vec4(relativeOriginPos, 1);\n#endif\n}\n",re$7="layout(location=0) in vec3 pos;\nlayout(location=3) in vec2 texCoord;\nuniform float pointSize;\nuniform float uFieldTextureSize;\nuniform float uMaxFilterValue;\nuniform float uMinFilterValue;\nuniform vec4 particleColor;\nuniform sampler2D velocityTexture;\nuniform sampler2D colorTable;\nuniform float uHasColorTable;\nuniform float uCeil;\nuniform float uFloor;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 uXYBounds;\nuniform vec2 uZBounds;\nuniform float uTextureDepth;\nout vec4 velocityColor;\nout vec2 outTexCoord;\nfloat computerOnePixelLength()\n{\nvec4 viewPos = czm_modelView * vec4(pos, 1.0);\nvec4 winPos = czm_projection * viewPos;\nfloat dwidth = czm_metersPerPixel(viewPos);\nwinPos.x = winPos.x - 2.0 * dwidth;\nvec4 newViewPos = czm_inverseProjection * winPos;\nreturn length(viewPos - newViewPos);\n}\nvec4 computePos(vec3 v3Normal)\n{\nvec4 viewPos = czm_modelView * vec4(pos, 1.0);\n#ifdef SIZEFIXED\nviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength() * uFieldTextureSize;\n#else\nviewPos.xyz = viewPos.xyz + v3Normal * uFieldTextureSize;\n#endif\nviewPos.xyz = viewPos.xyz * 0.9;\nreturn czm_projection * viewPos;\n}\nvoid main()\n{\nvec2 velocityTexCoord;\nvelocityTexCoord.x = (pos.x - uXYBounds.x) / (uXYBounds.z - uXYBounds.x);\nvelocityTexCoord.y = (pos.y - uXYBounds.y) / (uXYBounds.w - uXYBounds.y);\nfloat texCoordZ = pos.z / (uZBounds.y - uZBounds.x);\nfloat texCoordStep = 1.0 / uTextureDepth;\nfloat timesZ = floor(texCoordZ / texCoordStep);\nvelocityTexCoord.x /= uTextureDepth;\nvelocityTexCoord.x += texCoordStep * timesZ;\nvec3 velocity = texture(velocityTexture, velocityTexCoord).xyz;\nfloat velocitySize = length(velocity);\nfloat threshold = abs(uCeil - uFloor);\nfloat contourRate = (velocitySize - uFloor) / threshold;\nfloat finalCoord = clamp(contourRate, 0.0, 1.0);\nvelocityColor = mix(particleColor, texture(colorTable, vec2(0.0, finalCoord)).rgba, uHasColorTable);\noutTexCoord= texCoord;\n#ifdef FILTER\nif(velocitySize > uMaxFilterValue || velocitySize < uMinFilterValue)\n{\nvelocityColor.a = 0.0;\n}\n#endif\nif(pos.x > uXYBounds.z || pos.x < uXYBounds.x || pos.y > uXYBounds.w || pos.y < uXYBounds.y || pos.z < uZBounds.x || pos.z > uZBounds.y)\n{\nvelocityColor.a = 0.0;\n}\n#ifdef TEXTUREEFFECT\nvec3 nextPos = pos.xyz + velocity.xyz * deltaTime * velocityScale;\nvec4 nextPrjPos = czm_modelViewProjection * vec4(nextPos, 1.0);\nvec4 curPrjPos = czm_modelViewProjection * vec4(pos, 1.0);\nvec2 direction = normalize(nextPrjPos.xy - curPrjPos.xy);\nfloat cosx = dot(direction, vec2(1.0, 0.0));\nfloat cosy = dot(direction, vec2(0.0, 1.0));\nfloat sinx = sqrt(1.0- cosx*cosx);\nfloat cosYBiggerThan0 = sign(cosy);\nmat2 mat = mat2(cosx, sinx * cosYBiggerThan0, -sinx * cosYBiggerThan0, cosx);\nvec2 realNormal = mat * texCoord.xy;\ngl_Position = computePos(vec3(realNormal.xy, 0.0));\n#else\ngl_PointSize = pointSize;\ngl_Position = czm_modelViewProjection * vec4(pos, 1);\n#endif\n}\n",ie$4="precision mediump float;\nin vec4 velocityColor;\nin vec2 outTexCoord;\nout vec4 FragColor;\nuniform sampler2D uFieldTexture;\nvoid main()\n{\nFragColor = velocityColor;\n#ifdef TEXTUREEFFECT\nFragColor = texture(uFieldTexture, outTexCoord) * velocityColor;\n#endif\n}\n",ae$6="precision highp float;\nlayout(location=0) in vec3 pos;\nlayout(location=1) in vec3 oriPos;\nlayout(location=2) in vec2 lonLat;\nlayout(location=3) in vec2 life;\nout vec3 tf_pos;\nout vec3 tf_oriPos;\nout vec2 tf_lonLat;\nout vec2 tf_life;\nuniform sampler2D velocityTexture;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec2 velocityTexRes;\nuniform vec4 lonlatRange;\nfloat fastAtan2(float y, float x)\n{\nfloat ax = abs(x);\nfloat ay = abs(y);\nfloat a = min(ax, ay) / (max(ax, ay) + 1e-18);\nfloat r = ((-0.0464964749 * a * a + 0.15931422) * a * a - 0.327622764) * a * a * a + a;\nif(ay > ax){\nr = 1.57079637 - r;\n}\nif(x < 0.0){\nr = 3.14159274 - r;\n}\nif(y < 0.0){\nr = -r;\n}\nreturn r;\n}\nvec3 ComputeLatLonFromPos(vec3 pos)\n{\nfloat rho = sqrt(pos.x * pos.x + pos.y * pos.y + pos.z * pos.z);\nif (rho < 0.00001)\n{\nreturn vec3(0.0);\n}\nfloat longitude = fastAtan2(pos.y, pos.x);\nfloat latitude = asin(pos.z / rho);\nreturn vec3(longitude,latitude,rho);\n}\nvec2 lookup_wind(const vec2 uv)\n{\nvec2 px = 1.0 / velocityTexRes;\nvec2 vc = (floor(uv * velocityTexRes)) * px;\nvec2 f = fract(uv * velocityTexRes);\nvec2 tl = texture(velocityTexture, vc).rg;\nvec2 tr = texture(velocityTexture, vc + vec2(px.x, 0)).rg;\nvec2 bl = texture(velocityTexture, vc + vec2(0, px.y)).rg;\nvec2 br = texture(velocityTexture, vc + px).rg;\nreturn mix(mix(tl, tr, f.x), mix(bl, br, f.x), f.y);\n}\nvoid main()\n{\nvec2 lonLatTexCoord;\n#ifdef TEXTUREEFFECT\nlonLatTexCoord.x = (lonLat.x + czm_pi) / czm_twoPi;\nlonLatTexCoord.y = (lonLat.y + czm_piOverTwo) / czm_pi;\n#else\nlonLatTexCoord.x = (lonLat.x - lonlatRange.x) / (lonlatRange.z - lonlatRange.x);\nlonLatTexCoord.y = (lonLat.y - lonlatRange.y) / (lonlatRange.w - lonlatRange.y);\n#endif\nvec2 velocity = lookup_wind(lonLatTexCoord);\nvec3 upAxis = normalize(pos);\nvec3 eastAxis = cross(vec3(0.0, 0.0, 1.0), upAxis);\neastAxis = normalize(eastAxis);\nvec3 northAxis = cross(upAxis, eastAxis);\nnorthAxis = normalize(northAxis);\nif(life.x > life.y)\n{\ntf_pos = oriPos;\ntf_life.x = 0.0;\ntf_life.y = life.y;\n}\nelse\n{\ntf_pos = pos + northAxis * velocity.y * deltaTime * velocityScale + eastAxis * velocity.x * deltaTime * velocityScale;\ntf_life.x += life.x + deltaTime;\ntf_life.y = life.y;\n}\ntf_oriPos = oriPos;\ntf_lonLat = ComputeLatLonFromPos(tf_pos).xy;\n#ifndef TEXTUREEFFECT\nvec2 s = step(lonlatRange.xy, tf_lonLat);\nvec2 t = step(tf_lonLat, lonlatRange.zw);\nif (s.x * s.y * t.x * t.y < 1.0) {\ntf_life.x = life.y + 1.0;\n}\n#endif\n}\n",oe$6="precision highp float;\nlayout(location=0) in vec3 pos;\nlayout(location=1) in vec3 oriPos;\nlayout(location=2) in vec2 life;\nout vec3 tf_pos;\nout vec3 tf_oriPos;\nout vec2 tf_life;\nuniform sampler2D velocityTexture;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 uXYBounds;\nuniform vec2 uZBounds;\nuniform float uTextureDepth;\nvoid main()\n{\nvec2 velocityTexCoord;\nvelocityTexCoord.x = (pos.x - uXYBounds.x) / (uXYBounds.z - uXYBounds.x);\nvelocityTexCoord.y = (pos.y - uXYBounds.y) / (uXYBounds.w - uXYBounds.y);\nfloat texCoordZ = pos.z / (uZBounds.y - uZBounds.x);\nfloat texCoordStep = 1.0 / uTextureDepth;\nfloat timesZ = floor(texCoordZ / texCoordStep);\nvelocityTexCoord.x /= uTextureDepth;\nvelocityTexCoord.x += texCoordStep * timesZ;\nvec3 velocity = texture(velocityTexture, velocityTexCoord).xyz;\nif(life.x > life.y)\n{\ntf_pos = oriPos;\ntf_life.x = 0.0;\ntf_life.y = life.y;\n}\nelse\n{\ntf_pos.xyz = pos.xyz + velocity.xyz * deltaTime * velocityScale;\ntf_life.x += life.x + deltaTime;\ntf_life.y = life.y;\n}\ntf_oriPos = oriPos;\n}\n",ne$9="precision highp float;\nout vec4 FragColor;\nvoid main() {}\n",le$a="uniform sampler2D u_lastColorTexture;\nuniform sampler2D u_colorTexture;\nuniform float u_opacity;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color = texture2D(u_colorTexture, v_textureCoordinates);\nvec4 lastColor = texture2D(u_lastColorTexture, v_textureCoordinates);\nvec4 outColor = color*color.a + lastColor * (1.0 - color.a);\nfloat alpha = outColor.a * u_opacity;\ngl_FragColor = vec4(outColor.rgb, alpha < 0.1 ? 0.0 : alpha);\n}\n";function P$g(e){if(!e._webgl2)throw new t$16("webgl2 is not supported.");this._context=e,this._show=!0,this._filter=!1,this._MaxFilterValue=Number.MAX_VALUE,this._MinFilterValue=Number.MIN_VALUE,this._paricleCountPerDegree=1,this._lifeRange=[5e3,1e4],this._particleColor=new e$1U(1,1,0,1),this._particleSize=5,this._velocityScale=1,this._velocityTexRes=new o$1o(0,0),this._velocityField=void 0,this._dictColorTable=void 0,this._floor=0,this._ceil=10,this._hasColorTable=0,this._hypsometricTexture=void 0,this._dataBounds=h$18.MAX_VALUE,this._zBounds=new o$1o(0,1),this._transformFeedback=void 0,this._normalShaderProgram=void 0,this._feedbackShaderProgram=void 0,this._currentTime=0,this._deltaTime=0,this._transformFeedbackInitialized=!1,this._fieldInitialized=!1,this._fieldDataIndices=void 0,this._textureEffect=!1,this._textureEffectUrl=n$15("Assets/Textures/arrow.png"),this._fieldTexture=void 0,this._fieldTextureSize=30,this._sizeFixed=!0,this._sceneMode=C$13.SCENE3D,this._showParticleTrails=!0,this._fadeOpacity=.98,this._curParticleStateTexture=void 0,this._lastParticleStateTexture=void 0,this._tmpParticleStateTexture=void 0,this._curParticleTextureBuffer=void 0,this._lastParticleTextureBuffer=void 0,this._tmpParticleTextureBuffer=void 0,this._clearCommand=void 0,this._copyColorCommand=void 0,this._copyLastColorCommand=void 0,this._hdrEnable=!1}var de$5=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);Object.defineProperties(P$g.prototype,{fieldTextureSize:{get:function(){return this._fieldTextureSize},set:function(e){this._fieldTextureSize=e}},sizeFixed:{get:function(){return this._sizeFixed},set:function(e){this._sizeFixed=e,this._transformFeedbackInitialized=!1}},textureEffect:{get:function(){return this._textureEffect},set:function(e){this._textureEffect=e,this._transformFeedbackInitialized=!1}},textureEffectUrl:{get:function(){return this._textureEffectUrl},set:function(e){this._textureEffectUrl=e,this._fieldTexture=void 0}},show:{get:function(){return this._show},set:function(e){this._show=e}},filter:{get:function(){return this._filter},set:function(e){this._filter=e,this._transformFeedbackInitialized=!1}},MaxFilterValue:{get:function(){return this._MaxFilterValue},set:function(e){this._MaxFilterValue=e}},MinFilterValue:{get:function(){return this._MinFilterValue},set:function(e){this._MinFilterValue=e}},paricleCountPerDegree:{get:function(){return this._paricleCountPerDegree},set:function(e){this._paricleCountPerDegree=e,this._transformFeedbackInitialized=!1}},particleLifeRange:{get:function(){return this._lifeRange},set:function(e){this._lifeRange=e,this._transformFeedbackInitialized=!1}},particleColor:{get:function(){return this._particleColor},set:function(e){this._particleColor=e}},particleSize:{get:function(){return this._particleSize},set:function(e){this._particleSize=e}},velocityScale:{get:function(){return this._velocityScale},set:function(e){this._velocityScale=e}},colorTable:{get:function(){return this._dictColorTable},set:function(e){if(!e$2b(e))return e$2b(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),void(this._hasColorTable=0);this._dictColorTable=i$S.clone(e,this._dictColorTable);var t=this._dictColorTable.count();if(t<1)this._hasColorTable=0;else{e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:this._context,width:1024,height:64,pixelFormat:V$10.RGBA})),e$2b(this._dictColorTable)&&(this._dictColorTable.generateBuffer(),e$2b(this._hypsometricTexture)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._dictColorTable._imageBuffer}));var i=0,n=0,r=this._dictColorTable.getItem(0);e$2b(r)&&e$2b(r.altitude)&&(i=parseFloat(r.altitude)),e$2b(r=this._dictColorTable.getItem(t-1))&&e$2b(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n),this._hasColorTable=1}}}}),P$g.prototype.update=function(e){if(this._show&&e$2b(this._velocityField)){if(this._sceneMode!==e.camera._mode&&(this._sceneMode=e.camera._mode,this._transformFeedbackInitialized=!1),this._textureEffect&&e$2b(this._textureEffectUrl)&&!e$2b(this._fieldTexture)){var t=this;o$1l(t$T(this._textureEffectUrl),(function(e){t._fieldTexture=new t$V({context:t._context,source:e,sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT})}),t._transformFeedbackInitialized=!1}))}this._fieldInitialized||(this._createVectorFieldTexture(this._context,this._velocityField),this._fieldInitialized=!0),this._transformFeedbackInitialized||(this._createTransformFeedback(this._context,e),this._transformFeedbackInitialized=!0),e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:this._context,width:1,height:1024,pixelFormat:V$10.RGBA}));var i=(new Date).getTime(),n=i-this._currentTime;this._currentTime=i,this._deltaTime=n,e$2b(this._transformFeedback)&&e.commandList.push(this._transformFeedback)}},P$g.prototype._setVelocityField=function(e){this._velocityField=e,this._fieldInitialized=!1},P$g.prototype._setDataBounds=function(e){this._dataBounds=e,this._transformFeedbackInitialized=!1},P$g.prototype._setZBounds=function(e){this._zBounds=e,this._transformFeedbackInitialized=!1};var ce$9=/\s+czm_writeLogDepth\(/,_e$5=/\s+czm_vertexLogDepth\(/,me$8=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;function pe$7(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!e$2b(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();r.defines=e$2b(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),o.defines=e$2b(o.defines)?o.defines.slice(0):[],o.defines.push("LOG_DEPTH");var a,s=!1,l=r.sources,u=l.length;for(a=0;a<u;++a)if(_e$5.test(l[a])){s=!0;break}if(!s){for(a=0;a<u;++a)l[a]=s$U.replaceMain(l[a],"czm_log_depth_main");"\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n",l.push("\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n")}for(s=!1,u=(l=o.sources).length,a=0;a<u;++a)ce$9.test(l[a])&&(s=!0),me$8.test(l[a]);var c="";if(!s){for(a=0;a<u;a++)l[a]=s$U.replaceMain(l[a],"czm_log_depth_main");c+="\nvoid main() \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(); \n} \n"}l.push(c),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i}P$g.prototype._createTransformFeedback=function(e,t){e$2b(this._transformFeedback)&&this._transformFeedback.destroy();var i,n,r=[];this._sceneMode!==C$13.SCENE3D?(i=new s$U({sources:[oe$6]}),n=new s$U({sources:[re$7]}),r=["tf_pos","tf_oriPos","tf_life"]):(i=new s$U({sources:[ae$6]}),n=new s$U({sources:[te$4]}),r=["tf_pos","tf_oriPos","tf_lonLat","tf_life"]);var o,a=new s$U({sources:[ie$4]});this._textureEffect&&(i.defines.push("TEXTUREEFFECT"),n.defines.push("TEXTUREEFFECT"),a.defines.push("TEXTUREEFFECT")),this._filter&&n.defines.push("FILTER"),this._sizeFixed&&n.defines.push("SIZEFIXED"),this._normalShaderProgram=r$13.fromCache({context:e,vertexShaderSource:n,fragmentShaderSource:a}),t.useLogDepth&&(this._normalShaderProgram=pe$7(e,this._normalShaderProgram)),this._feedbackShaderProgram=r$13.fromCache({context:e,vertexShaderSource:i,fragmentShaderSource:ne$9,transformFeedbackVaryings:r,bufferMode:de$x.SEPARATE_ATTRIBS}),o=this._textureEffect?this._sceneMode!==C$13.SCENE3D?this._createLocalTextureVertexAttributes():this._createGlobalTextureVertexAttributes():this._sceneMode!==C$13.SCENE3D?this._createLocalVertexAttributes():this._createGlobalVertexAttributes();var s=this._createFeedbackShaderUniformMap(),l=this._createNormalShaderUniformMap(),u=d$1m.fromCache({depthTest:{enabled:!0},depthMask:!1,blending:Ee$r.ALPHA_BLEND}),c=this._computeTotalParticleCount();this._transformFeedback=new s$i({pointCount:c,indices:this._fieldDataIndices,textureEffect:this._textureEffect,attributes:o,primitiveMode:this._textureEffect?de$x.TRIANGLES:de$x.POINTS,renderState:u,feedbackShader:this._feedbackShaderProgram,normalShader:this._normalShaderProgram,normalShaderUniformMap:l,feedbackShaderUniformMap:s,modelMatrix:this._sceneMode===C$13.SCENE3D?p$1d.IDENTITY:de$5,fadeOpacity:this._fadeOpacity}),this._transformFeedback._drawEvent.addEventListener(this.drawParticleTrails,this)},P$g.prototype._createGlobalVertexAttributes=function(){var e,t,i,n,r,o,a,s,l;e=e$2a.toDegrees(this._dataBounds.width),t=e$2a.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x,n=e$2a.toDegrees(this._dataBounds.west),r=e$2a.toDegrees(this._dataBounds.south),o=this._zBounds.x;for(var u=(a=Math.ceil(this._paricleCountPerDegree*e))*(s=Math.ceil(this._paricleCountPerDegree*t))*(l=Math.ceil(this._paricleCountPerDegree*i)),c=new Float32Array(3*u),h=new Float32Array(3*u),d=new Float32Array(2*u),f=new Float32Array(2*u),p=0,_=0;_<s;_++)for(var m=0;m<a;m++)for(var g=0;g<l;g++,p++){var x=n+m*(e/a),v=r+_*(t/s),y=o+g*(i/l),$=new o$1p.fromDegrees(x,v,y);c[3*p]=$.x,c[3*p+1]=$.y,c[3*p+2]=$.z,h[3*p]=$.x,h[3*p+1]=$.y,h[3*p+2]=$.z,d[2*p]=e$2a.toRadians(x),d[2*p+1]=e$2a.toRadians(v);var b=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];f[2*p]=0,f[2*p+1]=b}this.lonlatRange=new e$29(d[0],d[1],d[d.length-2],d[d.length-1]);var T=[];return T.push({index:0,componentsPerAttribute:3,data:c}),T.push({index:1,componentsPerAttribute:3,data:h}),T.push({index:2,componentsPerAttribute:2,data:d}),T.push({index:3,componentsPerAttribute:2,data:f}),T},P$g.prototype._createLocalVertexAttributes=function(){var e,t,i,n,r,o,a,s,l;e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x,n=this._dataBounds.west,r=this._dataBounds.south,o=this._zBounds.x;for(var u=(a=Math.ceil(this._paricleCountPerDegree*e))*(s=Math.ceil(this._paricleCountPerDegree*t))*(l=Math.ceil(this._paricleCountPerDegree*i)),c=new Float32Array(3*u),h=new Float32Array(3*u),d=new Float32Array(2*u),f=0,p=0;p<s;p++)for(var _=0;_<a;_++)for(var m=0;m<l;m++,f++){var g=n+_*(e/(a-1)),x=r+p*(t/(s-1)),v=o+m*(i/l);c[3*f]=g,c[3*f+1]=x,c[3*f+2]=v,h[3*f]=g,h[3*f+1]=x,h[3*f+2]=v;var y=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];d[2*f]=0,d[2*f+1]=y}var $=[];return $.push({index:0,componentsPerAttribute:3,data:c}),$.push({index:1,componentsPerAttribute:3,data:h}),$.push({index:2,componentsPerAttribute:2,data:d}),$},P$g.prototype._createGlobalTextureVertexAttributes=function(){for(var e=e$2a.toDegrees(this._dataBounds.width),t=e$2a.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x,n=e$2a.toDegrees(this._dataBounds.west),r=e$2a.toDegrees(this._dataBounds.south),o=this._zBounds.x,a=Math.ceil(this._paricleCountPerDegree*t),s=Math.ceil(this._paricleCountPerDegree*e),l=Math.ceil(this._paricleCountPerDegree*i),u=a*s*l*4,c=new Uint32Array(u/4*6),h=new Float32Array(2*u),d=new Float32Array(3*u),f=new Float32Array(3*u),p=new Float32Array(2*u),_=new Float32Array(2*u),m=0,g=0;g<a;g++)for(var x=0;x<s;x++)for(var v=0;v<l;v++,m++){for(var y=n+x*(e/(s-1)),$=r+g*(t/(a-1)),b=o+v*(i/l),T=new o$1p.fromDegrees(y,$,b),C=0;C<12;C+=3)d[12*m+C]=T.x,d[12*m+C+1]=T.y,d[12*m+ +C+2]=T.z;for(C=0;C<12;C+=3)f[12*m+C]=T.x,f[12*m+C+1]=T.y,f[12*m+ +C+2]=T.z;for(C=0;C<8;C+=2)p[8*m+C]=e$2a.toRadians(y),p[8*m+C+1]=e$2a.toRadians($);var S=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];_[8*m]=0,_[8*m+1]=S,_[8*m+2]=0,_[8*m+3]=S,_[8*m+4]=0,_[8*m+5]=S,_[8*m+6]=0,_[8*m+7]=S}for(x=0;x<c.length;x++)c[6*x]=4*x,c[6*x+1]=4*x+1,c[6*x+2]=4*x+2,c[6*x+3]=4*x,c[6*x+4]=4*x+2,c[6*x+5]=4*x+3;this._fieldDataIndices=c;for(m=0,v=0;v<h.length;v+=8,m++)h[8*m]=0,h[8*m+1]=0,h[8*m+2]=0,h[8*m+3]=1,h[8*m+4]=1,h[8*m+5]=1,h[8*m+6]=1,h[8*m+7]=0;var w=[];return w.push({index:0,componentsPerAttribute:3,data:d}),w.push({index:1,componentsPerAttribute:3,data:f}),w.push({index:2,componentsPerAttribute:2,data:p}),w.push({index:3,componentsPerAttribute:2,data:_}),w.push({index:4,componentsPerAttribute:2,data:h}),w},P$g.prototype._createLocalTextureVertexAttributes=function(){for(var e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x,n=this._dataBounds.west,r=this._dataBounds.south,o=this._zBounds.x,a=Math.ceil(this._paricleCountPerDegree*e),s=Math.ceil(this._paricleCountPerDegree*t),l=Math.ceil(this._paricleCountPerDegree*i),u=s*a*l*4,c=new Uint32Array(u/4*6),h=new Float32Array(2*u),d=new Float32Array(3*u),f=new Float32Array(3*u),p=new Float32Array(2*u),_=0,m=0;m<s;m++)for(var g=0;g<a;g++)for(var x=0;x<l;x++,_++){for(var v=n+g*(e/(a-1)),y=r+m*(t/(s-1)),$=o+x*(i/l),b=0;b<12;b+=3)d[12*_+b]=v,d[12*_+b+1]=y,d[12*_+ +b+2]=$;for(b=0;b<12;b+=3)f[12*_+b]=v,f[12*_+b+1]=y,f[12*_+ +b+2]=$;var T=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];p[8*_]=0,p[8*_+1]=T,p[8*_+2]=0,p[8*_+3]=T,p[8*_+4]=0,p[8*_+5]=T,p[8*_+6]=0,p[8*_+7]=T}for(g=0;g<c.length;g++)c[6*g]=4*g,c[6*g+1]=4*g+1,c[6*g+2]=4*g+2,c[6*g+3]=4*g,c[6*g+4]=4*g+2,c[6*g+5]=4*g+3;this._fieldDataIndices=c;for(_=0,x=0;x<h.length;x+=8,_++)h[8*_]=0,h[8*_+1]=0,h[8*_+2]=0,h[8*_+3]=1,h[8*_+4]=1,h[8*_+5]=1,h[8*_+6]=1,h[8*_+7]=0;var C=[];return C.push({index:0,componentsPerAttribute:3,data:d}),C.push({index:1,componentsPerAttribute:3,data:f}),C.push({index:2,componentsPerAttribute:2,data:p}),C.push({index:3,componentsPerAttribute:2,data:h}),C},P$g.prototype._computeTotalParticleCount=function(){if(this._sceneMode!==C$13.SCENE3D){var e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x;return Math.ceil(this._paricleCountPerDegree*e)*Math.ceil(this._paricleCountPerDegree*t)*Math.ceil(this._paricleCountPerDegree*i)}e=e$2a.toDegrees(this._dataBounds.width),t=e$2a.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x;return Math.ceil(this._paricleCountPerDegree*e)*Math.ceil(this._paricleCountPerDegree*t)*Math.ceil(this._paricleCountPerDegree*i)};var B$b=new e$29;function i$g(e){o$1q.defined("context",e),this._context=e,this._fieldData=void 0,this._NetCDFData=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._layerBounds=h$18.MAX_VALUE,this._visible=!0,this._type="FieldLayer3D",this._particleVelocityFieldEffect=new P$g(e)}P$g.prototype._createFeedbackShaderUniformMap=function(){var e=this;return{velocityTexture:function(){return e._vectorFieldTexture},velocityScale:function(){return e._velocityScale},velocityTexRes:function(){return e._velocityTexRes},deltaTime:function(){return e._deltaTime},uXYBounds:function(){return B$b.x=e._dataBounds.west,B$b.y=e._dataBounds.south,B$b.z=e._dataBounds.east,B$b.w=e._dataBounds.north,B$b},uZBounds:function(){return e._zBounds},uTextureDepth:function(){return e._texZDepth},lonlatRange:function(){return e.lonlatRange}}},P$g.prototype._createNormalShaderUniformMap=function(){var e=this;return{particleColor:function(){return e._particleColor},pointSize:function(){return e._particleSize},uMaxFilterValue:function(){return e._MaxFilterValue},uMinFilterValue:function(){return e._MinFilterValue},uFieldTexture:function(){return e$2b(e._fieldTexture)?e._fieldTexture:new t$V({context:e._context,width:1,height:1})},uFieldTextureSize:function(){return e._fieldTextureSize},velocityTexture:function(){return e._vectorFieldTexture},colorTable:function(){return e._hypsometricTexture},lonlatRange:function(){return e.lonlatRange},uFloor:function(){return e._floor},uCeil:function(){return e._ceiling},uHasColorTable:function(){return e._hasColorTable},velocityScale:function(){return e._velocityScale},deltaTime:function(){return e._deltaTime},uXYBounds:function(){return B$b.x=e._dataBounds.west,B$b.y=e._dataBounds.south,B$b.z=e._dataBounds.east,B$b.w=e._dataBounds.north,B$b},uZBounds:function(){return e._zBounds},uTextureDepth:function(){return e._texZDepth}}},P$g.prototype._createVectorFieldTexture=function(e,t){e$2b(this._vectorFieldTexture)&&this._vectorFieldTexture.destroy();var i,n=0,r=0;if(t instanceof Array&&(n=(i=this._createCanvasFromDataMatrix(t)).width,r=i.height,!i))return!1;this._velocityTexRes.x=n,this._velocityTexRes.y=r,this._vectorFieldTexture=new t$V({context:e,width:n,height:r,pixelFormat:V$10.RGB,pixelDatatype:_$$.FLOAT}),this._vectorFieldTexture.copyFrom({width:n,height:r,arrayBufferView:i.imageData})},P$g.prototype._createCanvasFromDataMatrix=function(e){var t=e.length;if(!(e[0]instanceof Array))return null;var i,n,r,o,a,s,l,u=e[0].length;if(!(e[0][0]instanceof Array))return null;if(e[0][0][0]instanceof Array){var c=u,h=t,d=e[0][0].length;for(this._texZDepth=d,s=new Float32Array(h*c*d*3),o=0,i=0;i<c;i++)for(n=0;n<d;n++)for(r=0;r<h;r++){var f=null==(l=e[r][i][n]).x?l[0]:l.x,p=null==l.y?l[1]:l.y,_=null==l.z?l[2]:l.z;s[o++]=f,s[o++]=p,s[o++]=_}a={height:c,width:d*h,imageData:s}}else{for(s=new Float32Array(t*u*3),o=0,n=0;n<t;n++)for(i=0;i<u;i++){var m=null==(l=e[n][i]).x?l[0]:l.x,g=null==l.y?l[1]:l.y;s[o++]=m,s[o++]=g,s[o++]=0}a={height:t,width:u,imageData:s}}return a},P$g.prototype.createParticleTrailsResources=function(e,t){if(this._showParticleTrails&&(!e$2b(this._lastParticleStateTexture)||this._lastParticleStateTexture.width!==e.drawingBufferWidth||this._lastParticleStateTexture.height!==e.drawingBufferHeight)){e$2b(this._lastParticleStateTexture)&&(this._lastParticleStateTexture.width!==e.drawingBufferWidth||this._lastParticleStateTexture.height!==e.drawingBufferHeight)&&this.destroyParticleTrailsResources();var i=_$$.UNSIGNED_BYTE;this._hdrEnable&&(i=_$$.FLOAT),this._curParticleStateTexture=new t$V({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:V$10.RGBA}),this._lastParticleStateTexture=new t$V({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:V$10.RGBA}),this._tmpParticleStateTexture=new t$V({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:V$10.RGBA});var n=u$_(this._transformFeedback._framebuffer,t.framebuffer);this._curParticleTextureBuffer=new t$W({context:e,colorTextures:[this._curParticleStateTexture],depthStencilTexture:n.depthStencilTexture,destroyAttachments:!1}),this._lastParticleTextureBuffer=new t$W({context:e,colorTextures:[this._lastParticleStateTexture],destroyAttachments:!1}),this._tmpParticleTextureBuffer=new t$W({context:e,colorTextures:[this._tmpParticleStateTexture],destroyAttachments:!1}),this._clearCommand=new t$X({color:new e$1U(0,0,0,0),renderState:d$1m.fromCache()});var r=this._lastParticleStateTexture,o=this._tmpParticleTextureBuffer;this._copyLastColorCommand=e.createViewportQuadCommand(ie$6,{uniformMap:{colorTexture:function(){return r}},framebuffer:o});var a=this._tmpParticleStateTexture,s=this._curParticleStateTexture,l=this._lastParticleTextureBuffer,u=this._fadeOpacity;this._copyColorCommand=e.createViewportQuadCommand(le$a,{uniformMap:{u_lastColorTexture:function(){return a},u_colorTexture:function(){return s},u_opacity:function(){return u}},framebuffer:l})}},P$g.prototype.destroyParticleTrailsResources=function(){e$2b(this._curParticleStateTexture)&&(this._curParticleStateTexture.destroy(),this._curParticleStateTexture=void 0),e$2b(this._lastParticleStateTexture)&&(this._lastParticleStateTexture.destroy(),this._lastParticleStateTexture=void 0),e$2b(this._tmpParticleStateTexture)&&(this._tmpParticleStateTexture.destroy(),this._tmpParticleStateTexture=void 0),e$2b(this._curParticleTextureBuffer)&&(this._curParticleTextureBuffer.destroy(),this._curParticleTextureBuffer=void 0),e$2b(this._lastParticleTextureBuffer)&&(this._lastParticleTextureBuffer.destroy(),this._lastParticleTextureBuffer=void 0),e$2b(this._tmpParticleTextureBuffer)&&(this._tmpParticleTextureBuffer.destroy(),this._tmpParticleTextureBuffer=void 0),this._clearCommand=void 0,this._copyColorCommand=void 0,this._copyLastColorCommand=void 0},P$g.prototype.drawParticleTrails=function(e,t){!this._showParticleTrails||(this.createParticleTrailsResources(e,t),e$2b(this._copyLastColorCommand)&&this._copyLastColorCommand.execute(e,t),e$2b(this._copyColorCommand)&&this._copyColorCommand.execute(e,t),this._clearCommand.framebuffer=this._curParticleTextureBuffer,this._clearCommand.execute(e,t),this._transformFeedback.beginDraw(e,this._curParticleTextureBuffer,this._transformFeedback,t),this._transformFeedback._drawNormal(e,t))},P$g.prototype.clearLastParticleStateTexture=function(e,t,i,n){if(e$2b(t)&&this._hdrEnable!==t)return this._hdrEnable=t,this.destroyParticleTrailsResources(),void this.createParticleTrailsResources(t,i,n);!e._stateChanged||this.clearLastParticleBuffer(i,n)},P$g.prototype.clearLastParticleBuffer=function(e,t){this._clearCommand.framebuffer=this._lastParticleTextureBuffer,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._curParticleTextureBuffer,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._tmpParticleTextureBuffer,this._clearCommand.execute(e,t)},P$g.prototype.isDestroyed=function(){return!1},P$g.prototype.destroy=function(){return e$2b(this._vectorFieldTexture)&&(this._vectorFieldTexture.destroy(),this._vectorFieldTexture=void 0),e$2b(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),e$2b(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),e$2b(this._transformFeedback)&&(this._transformFeedback.destroy(),this._transformFeedback=void 0),e$2b(this._fieldTexture)&&(this._fieldTexture.destroy(),this._fieldTexture=void 0),this.destroyParticleTrailsResources(),i$10(this)},Object.defineProperties(i$g.prototype,{visible:{get:function(){return this._visible},set:function(e){this._visible=e}},type:{get:function(){return this._type}},fieldData:{get:function(){return this._fieldData},set:function(e){this._fieldData=e,e$2b(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setVelocityField(e)}},NetCDFData:{get:function(){return this._NetCDFData},set:function(e){if(!e$2b(e.longitude)||!e$2b(e.latitude))throw new t$16("coordinates are required.");if(!e$2b(e.uwnd)||!e$2b(e.vwnd))throw new t$16("uwnd or vwnd is required.");if(e.timeOrder=u$_(e.timeOrder,0),e$2b(this._NetCDFBuffer)){for(var t=this._NetCDFBuffer,i=t.getDataVariable(e.longitude),n=t.getDataVariable(e.latitude),r=t.getDataVariable(e.uwnd),o=t.getDataVariable(e.vwnd),a=0,s=[],l=0;l<n.length;l++){s[l]=[];for(var u=0;u<i.length;u++,a++){var c=n.length*i.length*e.timeOrder;s[l][u]=[r[a+c],o[a+c]]}}this._NetCDFData=s,e$2b(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setVelocityField(s)}}},NetCDFInfo:{get:function(){return this._NetCDFInfo},set:function(e){this._NetCDFInfo=e}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e,e$2b(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setDataBounds(e)}},zBounds:{get:function(){return this._zBounds},set:function(e){this._zBounds=e,e$2b(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setZBounds(e)}},particleVelocityFieldEffect:{get:function(){return this._particleVelocityFieldEffect}}}),i$g.prototype.update=function(e){this._visible?e$2b(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect.update(e):e$2b(this._particleVelocityFieldEffect)&&e$2b(this._particleVelocityFieldEffect._transformFeedback)&&this._particleVelocityFieldEffect.clearLastParticleBuffer(this._context,e)},i$g.prototype.isDestroyed=function(){return!1},i$g.prototype.destroy=function(){return e$2b(this._particleVelocityFieldEffect)&&(this._particleVelocityFieldEffect.destroy(),this._particleVelocityFieldEffect=void 0),i$10(this)};var ge$7="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nuniform float uWaterHeight;\nvarying vec2 vNoiseCoord;\nvarying vec3 vProjectionCoord;\nvarying vec3 vEyeDir;\nvarying vec3 vNormal;\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvec4 depthClampFarPlane(vec4 clipPos)\n{\nfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\nclipPos.z = min(clipPos.z, clipPos.w);\nreturn clipPos;\n}\nvoid initialWaterParam(vec4 oPos)\n{\nfloat uTimeVal = 0.05;\nfloat uScale = 80.0;\nfloat uScroll = 1.0;\nfloat uNoise = 1.0;\nvec2 uBumpSpeed = vec2(3.0 -3.0);\nmat4 scalemat = mat4(0.5, 0.0, 0.0, 0.0,\n0.0, 0.5, 0.0, 0.0,\n0.0, 0.0, 0.5, 0.0,\n0.5, 0.5, 0.5, 1.0);\nvec4 proj = scalemat * oPos;\nvProjectionCoord = proj.xyw;\nvNoiseCoord.xy = aTexCoord0.xy * uScale + uBumpSpeed * uTimeVal;\nvec4 cameraPos = czm_inverseModel * vec4(czm_cameraPositionWC, 1.0);\nvEyeDir = aPosition.xyz - cameraPos.xyz;\nvNormal = vec3(0.0,0.0,1.0);\n}\nvoid main()\n{\nvec4 newPos = vec4(aPosition.xyz, 1.0);\nnewPos.z = newPos.z + uWaterHeight;\nvec4 pos = czm_modelViewProjection * newPos;\ngl_Position = depthClampFarPlane(pos);\nvTexCoord = aTexCoord0.xy;\ninitialWaterParam(pos);\nclip_vertex = czm_modelView * newPos;\n}\n",ce$8="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uPolygonTexture;\nuniform sampler2D uReflectMap;\nuniform sampler2D uNoiseMap;\nvarying vec2 vNoiseCoord;\nvarying vec3 vProjectionCoord;\nvarying vec3 vEyeDir;\nvarying vec3 vNormal;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvec4 AdjSaturation(in vec4 inputColor, in float saturation)\n{\nvec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721);\nvec3 intensity = vec3(dot(inputColor.rgb, lumCoeff));\nvec3 tempColor = mix(intensity, inputColor.rgb, saturation);\nreturn vec4(tempColor, 1.0);\n}\nvec4 GetWaterColor()\n{\nvec4 uTintColour = vec4(0,0.05,0.05,1);\nvec4 uWaterColour = vec4(0.1804,0.2706,0.3294,1);\nfloat uNoiseScale = 0.05;\nfloat uMinFresnel = 0.3;\nfloat uMaxFresnel = 0.7;\nfloat uFresnelPower = 1.8;\nfloat uWaterBrightness = 0.95;\nvec2 final = vProjectionCoord.xy / vProjectionCoord.z;\nvec3 noiseNormal = (texture2D(uNoiseMap, (vNoiseCoord.xy / 5.0)).rgb - 0.5).rbg * uNoiseScale;\nfinal += noiseNormal.xz;\nfloat realMinFresnel, realMaxFresnel;\nif(uMinFresnel < uMaxFresnel)\n{\nrealMinFresnel = uMinFresnel;\nrealMaxFresnel = uMaxFresnel;\n}\nelse\n{\nrealMinFresnel = uMaxFresnel;\nrealMaxFresnel = uMinFresnel;\n}\nfloat fresnelBias = realMinFresnel;\nfloat fresnelScale = (realMaxFresnel - realMinFresnel) / 1.0;\nfloat fresnel = fresnelBias + fresnelScale * pow(1.0 + dot(normalize(vEyeDir), vNormal), uFresnelPower);\nfresnel = clamp(fresnel, 0.05, 0.95);\nvec4 reflectionColour = texture2D(uReflectMap, final);\nvec4 refractionColour = reflectionColour + uTintColour;\nvec4 resultColour = mix(uWaterColour, reflectionColour, fresnel);\nresultColour = AdjSaturation(resultColour, 1.0);\nresultColour = resultColour * uWaterBrightness;\nresultColour.a = uWaterColour.a;\nreturn resultColour;\n}\nvoid main()\n{\n#if defined(GL_EXT_frag_depth) || defined(WEBGL2)\ngl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\nvec2 texCoord = vTexCoord.xy;\nvec4 waterColor = GetWaterColor();\nvec4 texHeight = texture2D(uPolygonTexture, texCoord.xy);\nif(texHeight.x < 0.5)\n{\ndiscard;\n}\nelse\n{\ngl_FragColor = waterColor;\n}\n}\n",fe$4="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uHeightTexture;\nuniform sampler2D uAssisTexture;\nuniform float uWaterHeight;\nuniform float uTextureWidth;\nuniform float uTextureHeight;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvoid main()\n{\nfloat dStepX = 1.0 / uTextureWidth;\nfloat dStepY = 1.0 / uTextureHeight;\nvec2 texCoord = vTexCoord;\nvec4 texHeight = texture2D(uHeightTexture, texCoord);\nif(texHeight.r > uWaterHeight || texHeight.r < -90000.0)\n{\ngl_FragColor = vec4(0.0,0.0,0.0,1.0);\nreturn;\n}\nvec4 texCenter = texture2D(uAssisTexture, texCoord);\nif(texCenter.x > 0.5)\n{\ngl_FragColor = vec4(1.0,0.0,0.0,1.0);\nreturn;\n}\nvec4 texRight = texture2D(uAssisTexture, vec2(dStepX + texCoord.x, texCoord.y));\nvec4 texTop = texture2D(uAssisTexture, vec2( texCoord.x, dStepY + texCoord.y));\nvec4 texLeft = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y));\nvec4 texBottom = texture2D(uAssisTexture, vec2(texCoord.x, texCoord.y - dStepY));\nvec4 texLeftBottom = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y - dStepY));\nvec4 texRightBottom = texture2D(uAssisTexture, vec2(texCoord.x + dStepX, texCoord.y - dStepY));\nvec4 texLeftTop = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y + dStepY));\nvec4 texRightTop = texture2D(uAssisTexture, vec2(texCoord.x + dStepX, texCoord.y + dStepY));\nif(texCenter.x < 0.5 && texRight.x < 0.5 && texTop.x < 0.5 && texLeft.x < 0.5 && texBottom.x < 0.5 && texLeftBottom.x < 0.5 && texRightBottom.x < 0.5 && texLeftTop.x < 0.5 && texRightTop.x < 0.5)\n{\ndiscard;\n}\ngl_FragColor = vec4(1.0,0.0,0.0,1.0);\n}\n",e$a={Clamp:0,Absolute:1},K$9=Object.freeze(e$a);function I$d(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._floodCommand=void 0,this._boundingSphere=new i$1c,this._qureyRegion=[],this._waterHeight=0,this._polygonTexture=null,this._floodPosition=[0,0,0],this._worldMatrix=p$1d.IDENTITY.clone(),this._bound=[],this._terrainBlock=void 0,this._terrainBlockURL="",this._points=[],this._datasetInfo=void 0,this._frameState=void 0,this._updateFlagTexture=!1,this._updateHeightTexture=!1,this._name="",this._sceneName="",this._initialize=!1,this._waterMode=K$9.Clamp,this._assistTexture=null,this._heightTexture=null,this._flagCommand=void 0,this._regionGeometry=null,this._textureWidth=1024,this._textureHeight=1024,this._loaded=!1,this._layer=null}function Z$e(e){e$2b(e._floodCommand)&&(e._floodCommand.vertexArray=e._floodCommand.vertexArray&&e._floodCommand.vertexArray.destroy(),e._floodCommand.shaderProgram=e._floodCommand.shaderProgram&&e._floodCommand.shaderProgram.destroy(),e._floodCommand=void 0),e$2b(e._flagCommand)&&(e._flagCommand.vertexArray=e._flagCommand.vertexArray&&e._flagCommand.vertexArray.destroy(),e._flagCommand.shaderProgram=e._flagCommand.shaderProgram&&e._flagCommand.shaderProgram.destroy(),e._flagCommand=void 0)}function z$d(e){e$2b(e._polygonTexture)&&(e._polygonTexture=e._polygonTexture&&e._polygonTexture.destroy(),e._polygonTexture=null),e$2b(e._assistTexture)&&(e._assistTexture=e._assistTexture&&e._assistTexture.destroy(),e._assistTexture=null),e$2b(e._heightTexture)&&(e._heightTexture=e._heightTexture&&e._heightTexture.destroy(),e._heightTexture=null)}function $$d(e){if(null!==e._polygonTexture&&null!==e._assistTexture){var t=e._textureWidth,i=e._textureHeight,n=0,r=0;if(e._layer==e._scene.globe){var o=(e._bound[2]-e._bound[0])/t,a=(e._bound[3]-e._bound[1])/i,s=e._floodPosition;n=Math.floor((s.x-e._bound[0])/o),r=Math.floor((s.y-e._bound[1])/a)}else{var l=e._regionGeometry.rect,u=(o=(l.z-l.x)/t,a=(l.w-l.y)/i,s=o$1p.fromDegrees(e._floodPosition.x,e._floodPosition.y,0),new p$1d);p$1d.inverse(e._worldMatrix,u),p$1d.multiplyByPoint(u,s,s),n=Math.floor((s.x-l.x)/o),r=Math.floor((s.y-l.y)/a)}var c=new Uint8Array(t*i*4);c[4*(r*t+n)]=255,e._polygonTexture.copyFrom({width:t,height:i,arrayBufferView:c});var h=new Uint8Array(t*i*4);h[4*(r*t+n)]=255,e._assistTexture.copyFrom({width:t,height:i,arrayBufferView:h})}}function we$3(e,t,i){e._initialize||(l$h(e),e._regionGeometry=ie$3(e),ue$7(e,t),Ee$8(e,t),ne$8(e,t,e._regionGeometry,e._polygonTexture),D$e(e,e._terrainBlockURL,e._bound),e._initialize=!0),e._updateHeightTexture&&e._loaded&&null!=e._terrainBlock&&null!=e._datasetInfo&&re$6(e),e._updateFlagTexture&&te$3(e,t),e$2b(e._floodCommand)&&null!=e._terrainBlock&&null!=e._datasetInfo&&i.push(e._floodCommand)}function be$5(e,t){e._initialize||(e._initialize=!0,l$h(e),e._regionGeometry=ie$3(e),ue$7(e,t),Be$5(e),ne$8(e,t,e._regionGeometry,e._polygonTexture),D$e(e,e._terrainBlockURL,e._bound)),e._updateHeightTexture&&e._loaded&&null!=e._terrainBlock&&null!=e._datasetInfo&&re$6(e),e._updateFlagTexture&&te$3(e,t)}function l$h(e){Re$5(e);var t=e._bound[0],i=e._bound[1],n=e._bound[2],r=e._bound[3],o=o$1p.fromDegrees(.5*(n+t),.5*(r+i),0),a=new i$15(0,0,0);m$17.headingPitchRollToFixedFrame(o,a,t$13.WGS84,m$17.eastNorthUpToFixedFrame,e._worldMatrix)}function Re$5(e){if(0!==e._points.length){for(var t=Number.MAX_VALUE,i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=-Number.MAX_VALUE,o=0;o<e._points.length;o++)t=Math.min(e._points[o].x,t),i=Math.min(e._points[o].y,i),n=Math.max(e._points[o].x,n),r=Math.max(e._points[o].y,r);e._bound.length=0,e._bound.push(t),e._bound.push(i),e._bound.push(n),e._bound.push(r)}}function Ee$8(e,t){if(0!=e._points.length){var i=e._points.length,n=S$12.createTypedArray(S$12.FLOAT,3*i),r=S$12.createTypedArray(S$12.FLOAT,2*i),o=new p$1d;p$1d.inverse(e._worldMatrix,o);for(var a=[],s=0;s<e._qureyRegion.length/3;s++)a[3*s]=e._qureyRegion[3*s],a[3*s+1]=e._qureyRegion[3*s+1],a[3*s+2]=e._qureyRegion[3*s+2];var l=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(a)}}),u=z$_.createGeometry(l);f$X.updateGeometry(u,a,o),e._boundingSphere=u.boundingSphere;for(s=0;s<u.attributes.position.values.length/3;s++)n[3*s]=u.attributes.position.values[3*s],n[3*s+1]=u.attributes.position.values[3*s+1],n[3*s+2]=u.attributes.position.values[3*s+2],r[2*s]=u.attributes.st.values[2*s],r[2*s+1]=u.attributes.st.values[2*s+1];var c=null,h=ce$x.UNSIGNED_SHORT;i<65535?c=S$12.createTypedArray(S$12.UNSIGNED_SHORT,u.indices.length):(c=S$12.createTypedArray(S$12.UNSIGNED_INT,u.indices.length),h=ce$x.UNSIGNED_INT);for(s=0;s<u.indices.length;s++)c[s]=u.indices[s];Se$4(e,t,n,r,c,h)}}function Se$4(e,t,i,n,r,o){Z$e(e);var a=t$Y.createVertexBuffer({context:t,typedArray:i,usage:A$19.STATIC_DRAW}),s=t$Y.createVertexBuffer({context:t,typedArray:n,usage:A$19.STATIC_DRAW}),l=[],u={aPosition:0,aTexCoord0:1};l.push({index:u.aPosition,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),l.push({index:u.aTexCoord0,vertexBuffer:s,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var c=t$Y.createIndexBuffer({context:t,typedArray:r,usage:A$19.STATIC_DRAW,indexDatatype:o});e._floodCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$s.ANALYSIS,owner:e,cull:!0}),e._floodCommand.vertexArray=new c$12({context:t,attributes:l,indexBuffer:c});var h=new s$U({sources:[ge$7]});e._floodCommand.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:ce$8,attributeLocations:u}),e._floodCommand.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0}}),e._floodCommand.uniformMap={uWaterHeight:function(){return e._waterHeight},uPolygonTexture:function(){return e._polygonTexture},uReflectMap:function(){return e._frameState._framebufferList.water.renderTexture._fb.getColorTexture(0)},uNoiseMap:function(){return e._frameState._framebufferList.water._waterNormalMap}}}function D$e(e,t,i){""!=t&&4==i.length&&d$1f(t+".xml").then((function(n){var r=n.getElementsByTagName("leftBottom"),o=r[0].children[0].textContent,a=r[0].children[1].textContent,s=n.getElementsByTagName("rightTop"),l=s[0].children[0].textContent,u=s[0].children[1].textContent,c=n.getElementsByTagName("height")[0].textContent,h=n.getElementsByTagName("width")[0].textContent;e._datasetInfo={width:h,height:c,left:o,right:l,top:u,bottom:a,xRatio:(l-o)/h,yRatio:(u-a)/c};for(var d=[],f=0;f<e._datasetInfo.width;f++){for(var p=[],_=0;_<e._datasetInfo.height;_++)p.push(-99999);d.push(p)}ee$7(e,t,i,d)}))}function ee$7(e,t,i,n){u$Q(t+'/gridValues.json?bounds={"leftBottom":{"x":'+i[0]+',"y":'+i[1]+'},"rightTop":{"x":'+i[2]+',"y":'+i[3]+"}}").then((function(t){for(var i=t.values,r=0;r<i.length;r++)for(var o=i[r],a=0,s=o.length;a<s;a++){var l=o[a];n[l.column][l.row]=l.value}e._terrainBlock=n;var u=(e._floodPosition.x-e._datasetInfo.left)/e._datasetInfo.xRatio,c=(e._datasetInfo.top-e._floodPosition.y)/e._datasetInfo.yRatio;u=Math.ceil(u),c=Math.ceil(c),n[u][c]>-9e4&&(e._loaded=!0),e._updateHeightTexture=!0}),(function(r){if(400==r.statusCode)for(var o=0;o<2;o++)for(var a=(i[2]-i[0])/2,s=i[0]+a*o,l=s+a,u=0;u<2;u++){var c=(i[3]-i[1])/2,h=i[1]+c*u,d=h+c,f=[];f[0]=s,f[1]=h,f[2]=l,f[3]=d,ee$7(e,t,f,n)}}))}function te$3(e,t){if(null!=e._terrainBlock&&null!=e._datasetInfo){e._flagCommand.execute(t);var i=t.readPixels({x:0,y:0,width:e._textureWidth,height:e._textureHeight,framebuffer:e._flagCommand.framebuffer});e._assistTexture.copyFrom({width:e._textureWidth,height:e._textureHeight,arrayBufferView:i})}}function re$6(e,t){if(null!=e._terrainBlock&&null!=e._datasetInfo){var i=new Float32Array(e._textureWidth*e._textureHeight);if(e._layer==e._scene.globe)for(var n=(e._bound[2]-e._bound[0])/e._textureWidth,r=(e._bound[3]-e._bound[1])/e._textureHeight,o=0;o<e._textureWidth;o++)for(var a=e._bound[0]+n*o,s=0;s<e._textureHeight;s++){-99999!=(f=q$d(e,a,e._bound[1]+r*s))&&(i[s*e._textureWidth+o]=f,e._minHeight=Math.min(f,e._minHeight))}else{var l=e._regionGeometry.rect,u=(l.z-l.x)/e._textureWidth,c=(l.w-l.y)/e._textureHeight;for(o=0;o<e._textureWidth;o++){var h=l.x+u*o;for(s=0;s<e._textureHeight;s++){var d=new o$1p(h,l.y+c*s,0);p$1d.multiplyByPoint(e._worldMatrix,d,d);var f,p=SuperMap3D.Cartographic.fromCartesian(d);-99999!=(f=q$d(e,SuperMap3D.Math.toDegrees(p.longitude),SuperMap3D.Math.toDegrees(p.latitude)))&&(i[s*e._textureWidth+o]=f,e._minHeight=Math.min(f,e._minHeight))}}}e._heightTexture.copyFrom({width:e._textureWidth,height:e._textureHeight,arrayBufferView:i}),e._updateFlagTexture=!0,e._updateHeightTexture=!1}}function q$d(e,t,i){if(t<e._datasetInfo.left||t>e._datasetInfo.right||i<e._datasetInfo.bottom||i>e._datasetInfo.top)return-99999;var n=(t-e._datasetInfo.left)/e._datasetInfo.xRatio,r=(e._datasetInfo.top-i)/e._datasetInfo.yRatio;return n=Math.ceil(n),r=Math.ceil(r),e._terrainBlock[n][r]}function ue$7(e,t){var i=e._textureWidth,n=e._textureHeight;z$d(e),null===e._polygonTexture&&(e._polygonTexture=new t$V({context:t,width:e._textureWidth,height:e._textureHeight,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),flipY:!1})),null===e._assistTexture&&(e._assistTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),flipY:!1})),$$d(e),null===e._heightTexture&&(e._heightTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.LUMINANCE,pixelDatatype:_$$.FLOAT,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR}),flipY:!1}))}function ie$3(e,t){for(var i=[],n=0;n<e._qureyRegion.length/3;n++)i[3*n]=e._qureyRegion[3*n],i[3*n+1]=e._qureyRegion[3*n+1],i[3*n+2]=e._qureyRegion[3*n+2];var r=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),o=0,a=z$_.createGeometry(r),s=a.attributes.position.values;S$12.createTypedArray(S$12.FLOAT,s.length);var l=S$12.createTypedArray(S$12.FLOAT,s.length/3*2),u=new e$29(e._bound[0]*e$2a.RADIANS_PER_DEGREE,e._bound[1]*e$2a.RADIANS_PER_DEGREE,e._bound[2]*e$2a.RADIANS_PER_DEGREE,e._bound[3]*e$2a.RADIANS_PER_DEGREE);if(e._layer==e._scene.globe){var c=e._bound[2]-e._bound[0],h=e._bound[3]-e._bound[1];for(n=0;n<s.length;n+=3){var d=new o$1p(s[n],s[n+1],s[n+2]),f=SuperMap3D.Cartographic.fromCartesian(d),p=SuperMap3D.Math.toDegrees(f.longitude),_=SuperMap3D.Math.toDegrees(f.latitude);l[o++]=(p-e._bound[0])/c,l[o++]=(_-e._bound[1])/h}var m=new p$1d;p$1d.inverse(e._worldMatrix,m),f$X.updateGeometry(a,i,m)}else{m=new p$1d;p$1d.inverse(e._worldMatrix,m),f$X.updateGeometry(a,i,m);for(c=(u=f$X.updateGeoBounds(a)).z-u.x,h=u.w-u.y,n=0;n<s.length;n+=3)l[o++]=(s[n]-u.x)/c,l[o++]=(s[n+1]-u.y)/h}return{vertices:a.attributes.position.values,texcoords:l,indices:a.indices,rect:u}}function ne$8(e,t,i,n){if(e$2b(i)){var r=new i$_({primitiveType:W$18.TRIANGLES}),o=t$Y.createVertexBuffer({context:t,typedArray:i.vertices,usage:A$19.STATIC_DRAW}),a=t$Y.createVertexBuffer({context:t,typedArray:i.texcoords,usage:A$19.STATIC_DRAW}),s=[],l={aPosition:0,aTexCoord0:1};s.push({index:l.aPosition,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({index:l.aTexCoord0,vertexBuffer:a,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var u=t$Y.createIndexBuffer({context:t,typedArray:i.indices,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});r.vertexArray=new c$12({context:t,attributes:s,indexBuffer:u});var c=new s$U({sources:["attribute vec4 position;\nattribute vec4 aTexCoord0;\nvarying vec2 vTexCoord;\nvoid main()\n{\n vTexCoord = vec2(aTexCoord0.xy);\n vec2 vPos = aTexCoord0.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos, 0.1, 1.0);\n}\n"]}),h=new s$U({sources:[fe$4]});r.shaderProgram=r$13.fromCache({context:t,vertexShaderSource:c,fragmentShaderSource:h,attributeLocations:l}),r.framebuffer=new t$W({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=d$1m.fromCache({cull:{enabled:!1}}),r.uniformMap={uTextureWidth:function(){return e._textureWidth},uTextureHeight:function(){return e._textureHeight},uWaterHeight:function(){return e._waterHeight},uHeightTexture:function(){return e._heightTexture},uAssisTexture:function(){return e._assistTexture}},e._flagCommand=r}}function _e$4(e){e._loaded=!1,e._initialize=!1,e._updateFlagTexture=!1,e._updateHeightTexture=!1}function Be$5(e){var t=new e$29(e._bound[0]*e$2a.RADIANS_PER_DEGREE,e._bound[1]*e$2a.RADIANS_PER_DEGREE,e._bound[2]*e$2a.RADIANS_PER_DEGREE,e._bound[3]*e$2a.RADIANS_PER_DEGREE);e._layer!==e._scene.globe&&(t=e._regionGeometry.rect),e._layer._setFloodTexture(e._polygonTexture,t,e._worldMatrix)}function Ie$4(e){e._layer._removeFloodTexture()}function g$i(){this.enabled=!0,this.density=2e-4,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}Object.defineProperties(I$d.prototype,{floodPosition:{get:function(){return this._floodPosition},set:function(e){this._floodPosition=e,this._updateFlagTexture=!0,$$d(this)}},waterHeight:{get:function(){return this._waterHeight},set:function(e){this._waterHeight=e,this._updateFlagTexture=!0,$$d(this)}},waterMode:{get:function(){return this._waterMode},set:function(e){this._waterMode=e,this._updateFlagTexture=!0}},layer:{get:function(){return this._layer},set:function(e){this._layer=e,Z$e(this),z$d(this),_e$4(this)}}}),I$d.prototype.destroy=function(){return this._scene._analyst3D.remove(this._name,!0),null!==this._scene&&this._waterMode===K$9.Clamp&&Ie$4(this),Z$e(this),z$d(this),i$10(this)},I$d.prototype.build=function(){""===this._name&&(this._name="floodAnalysis3D"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},I$d.prototype.qureyRegion=function(e){if(!e$2b(e)||!e$2b(e.position))throw new t$16("the options is required");this._qureyRegion=e.position,this._points.length=0;for(var t=this._qureyRegion.length/3,i=0;i<t;i++){var n=new o$1p(this._qureyRegion[3*i],this._qureyRegion[3*i+1],this._qureyRegion[3*i+2]);this._points.push(n)}_e$4(this)},I$d.prototype.terrainURL=function(e){this._terrainBlockURL=e},I$d.prototype.update=function(e,t,i){this._frameState=t,this._textureWidth=e.drawingBufferWidth,this._textureHeight=e.drawingBufferHeight,this._waterMode===K$9.Absolute?we$3(this,e,i):be$5(this,e)};for(var l$g=[359.393,800.749,1275.6501,2151.1192,3141.7763,4777.5198,6281.2493,12364.307,15900.765,49889.0549,78026.8259,99260.7344,120036.3873,151011.0158,156091.1953,203849.3112,274866.9803,319916.3149,493552.0528,628733.5874],t$b=[2e-5,2e-4,1e-4,7e-5,5e-5,4e-5,3e-5,19e-6,1e-5,85e-7,62e-7,58e-7,53e-7,52e-7,51e-7,42e-7,4e-6,34e-7,26e-7,22e-7],v$c=0;v$c<t$b.length;++v$c)t$b[v$c]*=1e6;for(var b$j=t$b[1],u$d=t$b[t$b.length-1],d$k=0;d$k<t$b.length;++d$k)t$b[d$k]=(t$b[d$k]-u$d)/(b$j-u$d);var r$i=0;function x$f(e){var t,i=l$g,n=i.length;if(e<i[0])return r$i=0;if(e>i[n-1])return r$i=n-2;if(e>=i[r$i]){if(r$i+1<n&&e<i[r$i+1])return r$i;if(r$i+2<n&&e<i[r$i+2])return++r$i}else if(r$i-1>=0&&e>=i[r$i-1])return--r$i;for(t=0;t<n-2&&!(e>=i[t]&&e<i[t+1]);++t);return r$i=t}var B$a=new o$1p;function i$f(e){if(!e$2b(e)||!e$2b(e.scene))throw new t$16("options.scene is required.");this._scene=e.scene,this.samplingWindow=u$_(e.samplingWindow,i$f.defaultSettings.samplingWindow),this.quietPeriod=u$_(e.quietPeriod,i$f.defaultSettings.quietPeriod),this.warmupPeriod=u$_(e.warmupPeriod,i$f.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=u$_(e.minimumFrameRateDuringWarmup,i$f.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=u$_(e.minimumFrameRateAfterWarmup,i$f.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new o$1h,this._nominalFrameRate=new o$1h,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;var t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener((function(e,i){l$f(t)})),this._hiddenPropertyName=void 0!==document.hidden?"hidden":void 0!==document.mozHidden?"mozHidden":void 0!==document.msHidden?"msHidden":void 0!==document.webkitHidden?"webkitHidden":void 0;var i=void 0!==document.hidden?"visibilitychange":void 0!==document.mozHidden?"mozvisibilitychange":void 0!==document.msHidden?"msvisibilitychange":void 0!==document.webkitHidden?"webkitvisibilitychange":void 0;function n(){o$i(t)}this._visibilityChangeRemoveListener=void 0,e$2b(i)&&(document.addEventListener(i,n,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(i,n,!1)})}function l$f(e,t){if(!(e._pauseCount>0)){var i=Et$a();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=i+e.quietPeriod/h$17.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/h$17.SECONDS_PER_MILLISECOND;else if(i>=e._quietPeriodEndTime){e._frameTimes.push(i);var n=i-e.samplingWindow/h$17.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=n){for(;e._frameTimes.length>=2&&e._frameTimes[1]<n;)e._frameTimes.shift();var r=(i-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/r,r>1e3/(i>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup)?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}}function o$i(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}function h$f(e,t,i){this.context=e,this.commandList=[],this.commandListRealtimeRaster=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=C$13.SCENE3D,this.morphTime=C$13.getMorphTime(C$13.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=i,this.mapProjection=void 0,this.camera=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,depth:!1,postProcess:!1,offscreen:!1,asynchronous:!1,fbo:!1,normal:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,density:void 0,sse:void 0,minimumBrightness:void 0},this.terrainExaggeration=1,this._framebufferList=[],this.shadowState={shadowsEnabled:!0,lightShadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.imagerySplitPosition=new o$1o,this.globeSplitPosition=new o$1o,this.frustumSplits=[],this.backgroundColor=void 0,this.sunColor=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this._fboState={name:"normal",enabled:!1,frameBufferType:Qe$c.NORMAL},this.useType=0,this.frustumIndex=0,this.multiViewportIndex=-1,this.globeBottomLevel=0,this.minTerrainHeight=0,this.maxTerrainHeight=0,this.TAAEnable=!1,this.rasterLineWidth=1,this.pickIDColor=new e$1U,this.tilesetPassState=void 0,this.requests=[],this.rasterPerFrame=!1,this.pbrMaterialsArr=[]}function i$e(e,t){this.near=u$_(e,0),this.far=u$_(t,0);for(var i=Le$s.NUMBER_OF_PASSES,n=new Array(i),r=new Array(i),o=0;o<i;++o)n[o]=[],r[o]=0;this.commands=n,this.indices=r}g$i.prototype.update=function(e){if(e.fog.enabled=this.enabled){var t=e.camera,i=t.positionCartographic;if(e.context.webgpu){if(e.mode!==C$13.SCENE3D)return void(e.fog.enabled=!1)}else if(!e$2b(i)||i.height>8e5||e.mode!==C$13.SCENE3D)return void(e.fog.enabled=!1);var n=i.height,r=x$f(n),o=e$2a.clamp((n-l$g[r])/(l$g[r+1]-l$g[r]),0,1),a=e$2a.lerp(t$b[r],t$b[r+1],o),s=1e6*this.density;a=a*(s-s/b$j*u$d)*1e-6;var l=o$1p.normalize(t.positionWC,B$a);a*=1-Math.abs(o$1p.dot(t.directionWC,l)),e.fog.density=a,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness}},i$f.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8},i$f.fromScene=function(e){if(!e$2b(e))throw new t$16("scene is required.");return(!e$2b(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new i$f({scene:e})),e._frameRateMonitor},Object.defineProperties(i$f.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}}),i$f.prototype.pause=function(){++this._pauseCount,1===this._pauseCount&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)},i$f.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)},i$f.prototype.isDestroyed=function(){return!1},i$f.prototype.destroy=function(){return this._preUpdateRemoveListener(),e$2b(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),i$10(this)};var De$6="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform vec4 u_initialColor;\nuniform float uParentMixDirection;\nuniform vec3 u_sunLightColor;\nuniform vec3 u_ambientLightColor;\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#ifdef WEBGPU\nuniform TileUBO {\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_dayTextureTranslationAndScale[16];\nuniform vec4 u_dayTextureSize[16];\nuniform vec4 u_dayTextureTexCoordsRectangle[16];\nuniform bool u_dayTextureUseWebMercatorT[16];\nuniform bool u_dayTextureFlipY[16];\nuniform vec4 u_normalTextureTranslationAndScale;\nuniform vec4 uTileBounds;\nuniform vec4 u_tileRectangle;\nuniform vec3 u_center3D;\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\nuniform float u_useNormalTexture;\n};\n#else\nuniform vec4 uTileBounds;\n#if TEXTURE_UNITS > 0\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform vec4 u_dayTextureSize[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\nuniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n#endif\nuniform vec4 u_normalTextureTranslationAndScale;\nuniform float u_useNormalTexture;\n#endif\n#if GRIDTEXTURE_UNITS > 0\nuniform sampler2D u_gridTextures[GRIDTEXTURE_UNITS];\nuniform bool u_gridTextureUseWebMercatorT[GRIDTEXTURE_UNITS];\nuniform vec4 u_gridTextureTexCoordsRectangle[GRIDTEXTURE_UNITS];\n#endif\n#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n#endif\n#ifdef SHOW_OCEAN_WAVES\nuniform sampler2D u_oceanNormalMap;\n#endif\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nuniform vec2 u_lightingFadeDistance;\n#endif\n#ifdef TILE_LIMIT_RECTANGLE\nuniform vec4 u_cartographicLimitRectangle;\n#endif\n#ifdef GROUND_ATMOSPHERE\nuniform vec2 u_nightFadeDistance;\n#endif\n#ifdef TRANSLUCENT\nuniform vec4 u_frontFaceAlphaByDistance;\nuniform vec4 u_backFaceAlphaByDistance;\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nuniform sampler2D u_clippingPlanes;\nuniform mat4 u_clippingPlanesMatrix;\nuniform vec4 u_clippingPlanesEdgeStyle;\n#endif\n#if defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nuniform float u_minimumBrightness;\n#endif\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift;\n#endif\nuniform sampler2D u_normalTexture;\nvarying vec3 vertNorm;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n#ifdef SHOW_REFLECTIVE_OCEAN\n#include <globeOcean>\n#endif\n#ifdef APPLY_MATERIAL\nvarying float v_height;\nvarying float v_slope;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nvarying float v_distance;\nvarying vec3 v_fogRayleighColor;\nvarying vec3 v_fogMieColor;\n#endif\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nfloat interpolateByDistance(vec4 nearFarScalar, float distance)\n{\nfloat startDistance = nearFarScalar.x;\nfloat startValue = nearFarScalar.y;\nfloat endDistance = nearFarScalar.z;\nfloat endValue = nearFarScalar.w;\nfloat t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\nreturn mix(startValue, endValue, t);\n}\n#endif\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)\n{\nreturn sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\n}\n#endif\nvarying float v_height2;\n#if defined(Excavate_Region) || defined(Excavate_Outer) || defined(Apply_ImageryClip) || (defined(SLOPE_ANALYSIS) && defined(SlopeRegion)) || defined(HYPSOMETRIC_REGION)\nuniform sampler2D uModifyRasterTexture;\n#endif\n#include <globeAnalysis>\nvec3 colorCorrect(vec3 rgb) {\n#ifdef COLOR_CORRECT\nvec3 hsb = czm_RGBToHSB(rgb);\nhsb.x += u_hsbShift.x;\nhsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0);\nhsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0;\nrgb = czm_HSBToRGB(hsb);\n#endif\nreturn rgb;\n}\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);\nvec4 sRGBToLinear( in vec4 value ) {\n#ifndef HDR\nreturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n#else\nreturn value;\n#endif\n}\nvec4 LinearTosRGB( in vec4 value ) {\n#ifndef HDR\nreturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n#else\nreturn value;\n#endif\n}\nvec3 getNormalFromNormalTexture(){\nvec2 normalTextureTranslation = u_normalTextureTranslationAndScale.xy;\nvec2 normalTextureScale = u_normalTextureTranslationAndScale.zw;\nvec2 normalTextureCoordinates = v_textureCoordinates.xy * normalTextureScale + normalTextureTranslation;\nvec3 normalTC = texture2D(u_normalTexture, normalTextureCoordinates.xy).xyz;\nnormalTC = (normalTC - 0.5) * 2.0;\nreturn normalTC;\n}\nvec3 tranformNormalFromTagentToEC(vec3 normalInTagent){\nvec3 zAxis = normalize(vertNorm);\nvec3 xAxis = normalize(vec3(-vertNorm.y, vertNorm.x, 0));\nvec3 yAxis = normalize(cross(zAxis, xAxis));\nmat3 matrix = mat3(xAxis, yAxis, zAxis);\nreturn czm_normal3D * matrix * normalInTagent;\n}\nvec4 lightShading(vec3 normalEC, vec4 color){\nfloat diffuseIntensity = clamp(czm_getLambertDiffuse(czm_sunDirectionEC, normalize(normalEC)) * 0.9 + 0.3, 0.0, 1.0);\nreturn vec4(color.rgb * u_sunLightColor.rgb * diffuseIntensity + u_ambientLightColor.rgb * 0.25, color.a);\n}\nvoid main()\n{\n#ifdef APPLY_GLOBESPLIT\nvec2 splitPosition = czm_globeSplitPosition;\nif (u_GlobeSplitDirection.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\ndiscard;\n}\nelse if (u_GlobeSplitDirection.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\ndiscard;\n}\nif(u_GlobeSplitDirection.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\ndiscard;\n}\nelse if(u_GlobeSplitDirection.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\ndiscard;\n}\n#endif\n#ifdef APPLY_GLOBESWIPE\nif (gl_FragCoord.x < u_GlobeSwipeRegion.x || gl_FragCoord.y > u_GlobeSwipeRegion.y) {\ndiscard;\n}\nelse if (gl_FragCoord.x > u_GlobeSwipeRegion.z || gl_FragCoord.y < u_GlobeSwipeRegion.w) {\ndiscard;\n}\n#endif\n#ifdef Excavate_Region\nif(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w > 0.5)\n{\ndiscard;\n}\n#endif\n#ifdef Excavate_Outer\nif(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n{\ndiscard;\n}\n#endif\n#ifdef TILE_LIMIT_RECTANGLE\nif (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||\nv_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)\n{\ndiscard;\n}\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nfloat clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);\n#endif\nvec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0));\n#ifdef SHOW_TILE_BOUNDARIES\nif (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||\nv_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))\n{\ncolor = vec4(1.0, 0.0, 0.0, 1.0);\n}\n#endif\n#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)\nvec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0));\nvec3 normalEC = czm_normal3D * normalMC;\n#endif\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nfloat cameraDist;\nif (czm_sceneMode == czm_sceneMode2D)\n{\ncameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;\n}\nelse if (czm_sceneMode == czm_sceneModeColumbusView)\n{\ncameraDist = -czm_view[3].z;\n}\nelse\n{\ncameraDist = length(czm_view[3]);\n}\nfloat fadeOutDist = u_lightingFadeDistance.x;\nfloat fadeInDist = u_lightingFadeDistance.y;\nif (czm_sceneMode != czm_sceneMode3D) {\nvec3 radii = czm_getWgs84EllipsoidEC().radii;\nfloat maxRadii = max(radii.x, max(radii.y, radii.z));\nfadeOutDist -= maxRadii;\nfadeInDist -= maxRadii;\n}\nfloat fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#else\nfloat fade = 0.0;\n#endif\n#ifdef SHOW_REFLECTIVE_OCEAN\ncolor = getOceanColor(color, v_positionEC, v_positionMC, normalEC, normalMC, fade);\n#endif\n#ifdef APPLY_MATERIAL\nczm_materialInput materialInput;\nmaterialInput.st = v_textureCoordinates.st;\nmaterialInput.normalEC = normalize(v_normalEC);\nmaterialInput.slope = v_slope;\nmaterialInput.height = v_height;\nczm_material material = czm_getMaterial(materialInput);\ncolor.xyz = mix(color.xyz, material.diffuse, material.alpha);\n#endif\nvec3 realNormal = vec3(0.0, 0.0, 1.0);\nif(u_useNormalTexture > 0.5) {\nrealNormal = getNormalFromNormalTexture();\n}\n#ifdef ENABLE_LIGHTING\nvec4 finalColor;\nvec3 lightingNormalEC;\n#ifdef ENABLE_VERTEX_LIGHTING\nlightingNormalEC = v_normalEC;\n#else\nif(u_useNormalTexture > 0.5) {\nlightingNormalEC = tranformNormalFromTagentToEC(realNormal);\n}\nelse {\nlightingNormalEC = normalEC;\n}\n#endif\nfinalColor = lightShading(lightingNormalEC, color);\n#else\nvec4 finalColor = color;\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nvec4 clippingPlanesEdgeColor = vec4(1.0);\nclippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;\nfloat clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;\nif (clipDistance < clippingPlanesEdgeWidth)\n{\nfinalColor = clippingPlanesEdgeColor;\n}\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvec3 fogColor = colorCorrect(v_fogMieColor) + finalColor.rgb * colorCorrect(v_fogRayleighColor);\n#ifndef HDR\nconst float fExposure = 2.0;\nfogColor = vec3(1.0) - exp(-fExposure * fogColor);\n#endif\n#endif\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)\nvec3 atmosphereLightDirection = czm_sunDirectionWC;\n#else\nvec3 atmosphereLightDirection = czm_lightDirectionWC;\n#endif\n#ifdef FOG\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nfloat darken = clamp(dot(normalize(czm_viewerPositionECEF), atmosphereLightDirection), u_minimumBrightness, 1.0);\nfogColor *= darken;\n#endif\n#ifdef HDR\nconst float modifier = 0.15;\nfinalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor, modifier), finalColor.a);\n#else\nfinalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor), finalColor.a);\n#endif\n#endif\n#ifdef HYPSOMETRIC_ANALYSIS\nfinalColor = getHypsometricAnalysisColor(finalColor, v_textureCoordinates.xy);\n#endif\n#ifdef SLOPE_ANALYSIS\nfinalColor = getSlopeAnalysisColor(finalColor, v_textureCoordinates.xy, realNormal);\n#endif\n#ifdef GROUND_ATMOSPHERE\nif (czm_sceneMode != czm_sceneMode3D)\n{\ngl_FragColor = finalColor;\n#ifdef Height_Map\ngl_FragColor = czm_packValue(v_height2);\n#endif\nreturn;\n}\n#if defined(PER_FRAGMENT_GROUND_ATMOSPHERE) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))\nfloat mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);\nvec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);\nxy *= czm_viewport.zw * mpp * 0.5;\nvec3 direction = normalize(vec3(xy, -czm_currentFrustum.x));\nczm_ray ray = czm_ray(vec3(0.0), direction);\nvec3 ellipsoid_center = czm_view[3].xyz;\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\nvec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);\nellipsoidPosition = (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;\nAtmosphereColor atmosColor = computeGroundAtmosphereFromSpace(ellipsoidPosition, true, atmosphereLightDirection);\nvec3 groundAtmosphereColor = colorCorrect(atmosColor.mie) + finalColor.rgb * colorCorrect(atmosColor.rayleigh);\n#ifndef HDR\ngroundAtmosphereColor = vec3(1.0) - exp(-fExposure * groundAtmosphereColor);\n#endif\nfadeInDist = u_nightFadeDistance.x;\nfadeOutDist = u_nightFadeDistance.y;\nfloat sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#ifdef HDR\nsunlitAtmosphereIntensity = max(sunlitAtmosphereIntensity * sunlitAtmosphereIntensity, 0.03);\n#endif\ngroundAtmosphereColor = mix(groundAtmosphereColor, fogColor, sunlitAtmosphereIntensity);\n#else\nvec3 groundAtmosphereColor = fogColor;\n#endif\n#ifdef HDR\ngroundAtmosphereColor = czm_saturation(groundAtmosphereColor, 1.6);\n#endif\nfinalColor = vec4(mix(finalColor.rgb, groundAtmosphereColor, fade), finalColor.a);\n#endif\n#ifdef TRANSLUCENT\nvec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;\nfinalColor.a *= interpolateByDistance(alphaByDistance, v_distance);\n#endif\nif (finalColor.a == 0.0) {\ndiscard;\n}\ngl_FragColor = finalColor;\n#ifdef Height_Map\ngl_FragColor = czm_packValue(v_height2);\n#endif\n#ifdef FLOOD_ANALYSIS\ngl_FragColor = getFloodAnalysisColor(gl_FragColor, v_textureCoordinates);\n#endif\n}\n",Ne$5="#ifdef QUANTIZATION_BITS12\nattribute vec4 compressed0;\nattribute float compressed1;\n#else\nattribute vec4 position3DAndHeight;\nattribute vec4 textureCoordAndEncodedNormals;\n#ifdef WEBGPU\nuniform TileUBO {\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_dayTextureTranslationAndScale[16];\nuniform vec4 u_dayTextureSize[16];\nuniform vec4 u_dayTextureTexCoordsRectangle[16];\nuniform bool u_dayTextureUseWebMercatorT[16];\nuniform bool u_dayTextureFlipY[16];\nuniform vec4 u_normalTextureTranslationAndScale;\nuniform vec4 uTileBounds;\nuniform vec4 u_tileRectangle;\nuniform vec3 u_center3D;\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\nuniform float u_useNormalTexture;\n};\n#else\nuniform vec3 u_center3D;\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_normalTextureTranslationAndScale;\nuniform float u_useNormalTexture;\nuniform vec4 u_tileRectangle;\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\n#endif\n#endif\nvarying float v_height2;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n#ifdef APPLY_MATERIAL\nvarying float v_slope;\nvarying float v_height;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(TRANSLUCENT)\nvarying float v_distance;\nvarying vec3 v_fogMieColor;\nvarying vec3 v_fogRayleighColor;\n#endif\nvarying vec3 vertNorm;\n#ifdef BRDF\nuniform sampler2D u_normalTexture;\n#endif\n#ifdef SLOPE_ANALYSIS\nuniform float uTopLevel;\nuniform float uLevel;\nvarying vec2 texCoordRotate;\n#endif\n#ifdef APPLY_MODIFY\nuniform sampler2D uModifyRasterTexture;\n#endif\nvarying vec4 clip_vertex;\nvec4 getPosition(vec3 position, float height, vec2 textureCoordinates);\nfloat get2DYPositionFraction(vec2 textureCoordinates);\nvec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn u_modifiedModelViewProjection * vec4(position, 1.0);\n}\nfloat get2DMercatorYPositionFraction(vec2 textureCoordinates)\n{\nconst float maxTileWidth = 0.003068;\nfloat positionFraction = textureCoordinates.y;\nfloat southLatitude = u_southAndNorthLatitude.x;\nfloat northLatitude = u_southAndNorthLatitude.y;\nif (northLatitude - southLatitude > maxTileWidth)\n{\nfloat southMercatorY = u_southMercatorYAndOneOverHeight.x;\nfloat oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;\nfloat currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);\ncurrentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);\npositionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);\n}\nreturn positionFraction;\n}\nfloat get2DGeographicYPositionFraction(vec2 textureCoordinates)\n{\nreturn textureCoordinates.y;\n}\nvec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)\n{\nfloat yPositionFraction = get2DYPositionFraction(textureCoordinates);\nvec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\nreturn u_modifiedModelViewProjection * rtcPosition2D;\n}\nvec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn getPositionPlanarEarth(position, 0.0, textureCoordinates);\n}\nvec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn getPositionPlanarEarth(position, height, textureCoordinates);\n}\nvec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)\n{\nvec3 position3DWC = position + u_center3D;\nfloat yPositionFraction = get2DYPositionFraction(textureCoordinates);\nvec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\nvec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);\nreturn czm_modelViewProjection * morphPosition;\n}\n#ifdef QUANTIZATION_BITS12\nuniform vec2 u_minMaxHeight;\nuniform mat4 u_scaleAndBias;\n#endif\nvoid main()\n{\n#ifdef QUANTIZATION_BITS12\nvec2 xy = czm_decompressTextureCoordinates(compressed0.x);\nvec2 zh = czm_decompressTextureCoordinates(compressed0.y);\nvec3 position = vec3(xy, zh.x);\nfloat height = zh.y;\nvec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);\nheight = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;\nv_height2 = height;\nposition = (u_scaleAndBias * vec4(position, 1.0)).xyz;\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\nfloat encodedNormal = compressed1;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\nfloat encodedNormal = 0.0;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = compressed0.w;\n#else\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = 0.0;\n#endif\n#else\nvec3 position = position3DAndHeight.xyz;\nfloat height = position3DAndHeight.w;\nv_height2 = height;\nvec2 textureCoordinates = textureCoordAndEncodedNormals.xy;\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = textureCoordAndEncodedNormals.z;\nfloat encodedNormal = textureCoordAndEncodedNormals.w;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = textureCoordAndEncodedNormals.z;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = textureCoordAndEncodedNormals.z;\nfloat encodedNormal = 0.0;\n#else\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = 0.0;\n#endif\n#endif\nvec3 position3DWC = position + u_center3D;\ngl_Position = getPosition(position, height, textureCoordinates);\n#ifdef APPLY_MODIFY\nvec4 packHeight = texture2D(uModifyRasterTexture, textureCoordinates);\nif(packHeight.w > 0.5)\n{\nvec3 modifyPosition = normalize(position3DWC);\ngl_Position = getPosition(modifyPosition - u_center3D, height, textureCoordinates);\n}\n#endif\n#ifdef WEBGPU\ngl_Position.y *= yFactor__;\n#endif\nv_textureCoordinates = vec3(textureCoordinates, webMercatorT);\n#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\nv_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\nv_positionMC = position3DWC;\nvec3 normalMC = czm_octDecode(encodedNormal);\nv_normalMC = normalMC;\nv_normalEC = czm_normal3D * v_normalMC;\n#elif defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(GENERATE_POSITION) || defined(HDR)\nv_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\nv_positionMC = position3DWC;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(TRANSLUCENT)\nAtmosphereColor atmosFogColor = computeGroundAtmosphereFromSpace(position3DWC, false, vec3(0.0));\nv_fogMieColor = atmosFogColor.mie;\nv_fogRayleighColor = atmosFogColor.rayleigh;\nv_distance = length((czm_modelView3D * vec4(position3DWC - czm_relativeOrigin, 1.0)).xyz);\n#endif\n#ifdef APPLY_MATERIAL\nvec3 finalNormal = normalMC;\nvec3 ellipsoidNormal = normalize(position3DWC.xyz);\nv_slope = abs(dot(ellipsoidNormal, finalNormal));\nv_height = height;\n#endif\nclip_vertex = czm_inverseProjection * gl_Position;\nif(u_useNormalTexture > 0.5){\nv_positionEC = (u_modifiedModelView * vec4(position.xyz, 1.0)).xyz;\nvertNorm = normalize(position3DWC);\n#ifdef BRDF\nvec2 normalTextureTranslation = u_normalTextureTranslationAndScale.xy;\nvec2 normalTextureScale = u_normalTextureTranslationAndScale.zw;\nvec2 normalTextureCoordinates = v_textureCoordinates.xy * normalTextureScale + normalTextureTranslation;\nvec3 realNormal = texture2D(u_normalTexture, normalTextureCoordinates.xy).xyz;\nrealNormal = (realNormal - 0.5) * 2.0;\nvec3 zAxis = normalize(vertNorm);\nvec3 xAxis = normalize(vec3(-vertNorm.y, vertNorm.x, 0));\nvec3 yAxis = normalize(cross(zAxis, xAxis));\nmat3 matrix = mat3(xAxis, yAxis, zAxis);\nvec3 vNormal = czm_normal3D * matrix * realNormal;\nv_normalEC = normalize(vNormal);\n#endif\n}\n#ifdef SLOPE_ANALYSIS\nfloat levelSpan = min(uLevel - uTopLevel, 2.0);\nfloat arrowTextureScale = pow(2.0,levelSpan);\ntexCoordRotate = v_textureCoordinates.xy * arrowTextureScale;\n#endif\n}\n",le$9="const float fInnerRadius = 6378137.0;\nconst float fOuterRadius = 6378137.0 * 1.025;\nconst float fOuterRadius2 = fOuterRadius * fOuterRadius;\nconst float Kr = 0.0025;\nconst float Km = 0.0015;\nconst float ESun = 15.0;\nconst float fKrESun = Kr * ESun;\nconst float fKmESun = Km * ESun;\nconst float fKr4PI = Kr * 4.0 * czm_pi;\nconst float fKm4PI = Km * 4.0 * czm_pi;\nconst float fScale = 1.0 / (fOuterRadius - fInnerRadius);\nconst float fScaleDepth = 0.25;\nconst float fScaleOverScaleDepth = fScale / fScaleDepth;\nstruct AtmosphereColor\n{\nvec3 mie;\nvec3 rayleigh;\n};\nconst int nSamples = 2;\nconst float fSamples = 2.0;\nfloat scale(float fCos)\n{\nfloat x = 1.0 - fCos;\nreturn fScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\nAtmosphereColor computeGroundAtmosphereFromSpace(vec3 v3Pos, bool dynamicLighting, vec3 lightDirectionWC)\n{\nvec3 v3InvWavelength = vec3(1.0 / pow(0.650, 4.0), 1.0 / pow(0.570, 4.0), 1.0 / pow(0.475, 4.0));\nvec3 v3Ray = v3Pos - czm_viewerPositionECEF;\nfloat fFar = length(v3Ray);\nv3Ray /= fFar;\nfloat fCameraHeight = length(czm_viewerPositionECEF);\nfloat fCameraHeight2 = fCameraHeight * fCameraHeight;\nfloat B = 2.0 * length(czm_viewerPositionECEF) * dot(normalize(czm_viewerPositionECEF), v3Ray);\nfloat C = fCameraHeight2 - fOuterRadius2;\nfloat fDet = max(0.0, B*B - 4.0 * C);\nfloat fNear = 0.5 * (-B - sqrt(fDet));\nvec3 v3Start = czm_viewerPositionECEF + v3Ray * fNear;\nfFar -= fNear;\nfloat fDepth = exp((fInnerRadius - fOuterRadius) / fScaleDepth);\nfloat fLightAngle = czm_branchFreeTernary(dynamicLighting, dot(lightDirectionWC, v3Pos) / length(v3Pos), 1.0);\nfloat fCameraAngle = dot(-v3Ray, v3Pos) / length(v3Pos);\nfloat fCameraScale = scale(fCameraAngle);\nfloat fLightScale = scale(fLightAngle);\nfloat fCameraOffset = fDepth*fCameraScale;\nfloat fTemp = (fLightScale + fCameraScale);\nfloat fSampleLength = fFar / fSamples;\nfloat fScaledLength = fSampleLength * fScale;\nvec3 v3SampleRay = v3Ray * fSampleLength;\nvec3 v3SamplePoint = v3Start + v3SampleRay * 0.5;\nvec3 v3FrontColor = vec3(0.0);\nvec3 v3Attenuate = vec3(0.0);\nfor(int i=0; i<nSamples; i++)\n{\nfloat fHeight = length(v3SamplePoint);\nfloat fDepth = exp(fScaleOverScaleDepth * (fInnerRadius - fHeight));\nfloat fScatter = fDepth*fTemp - fCameraOffset;\nv3Attenuate = exp(-fScatter * (v3InvWavelength * fKr4PI + fKm4PI));\nv3FrontColor += v3Attenuate * (fDepth * fScaledLength);\nv3SamplePoint += v3SampleRay;\n}\nAtmosphereColor color;\ncolor.mie = v3FrontColor * (v3InvWavelength * fKrESun + fKmESun);\ncolor.rayleigh = v3Attenuate;\nreturn color;\n}\n";function Ee$7(e,t,i,n,r,o,a,s){this.numberOfDayTextures=e,this.flags=t,this.material=i,this.shaderProgram=n,this.clippingShaderState=r,this.mvtTextureObj=o,this.numberOfGridTextures=a,this.gridUpdate=s}function H$j(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function Pe$4(e){var t;switch(e){case C$13.SCENE3D:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }";break;case C$13.SCENE2D:case C$13.COLUMBUS_VIEW:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }";break;case C$13.MORPHING:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }"}return t}function Le$6(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}function he$6(e,t){if(!e$2b(e)||!e$2b(t))return!1;if(e===t)return!0;if(e.length!=t.length)return!1;for(var i=e.length,n=0;n<i;n++)if(e[n].textureIndex!==t[n].textureIndex||e[n].selectColor!==t[n].selectColor)return!1;return!0}H$j.prototype.getShaderProgram=function(e){var t=e.frameState,i=e.surfaceTile,n=e.numberOfDayTextures,r=e.applyBrightness,o=e.applyContrast,a=e.applyHue,s=e.applySaturation,l=e.applyGamma,u=e.applyAlpha,c=e.applySplit,h=e.applySwipe,d=e.applyGlobeSwipe,f=e.showReflectiveOcean,p=e.showOceanWaves,_=e.enableLighting,m=e.dynamicAtmosphereLighting,g=e.dynamicAtmosphereLightingFromSun,x=e.showGroundAtmosphere,v=e.perFragmentGroundAtmosphere,y=e.hasVertexNormals,$=e.hasRoughness,b=e.useWebMercatorProjection,T=e.enableFog,C=e.enableClippingPlanes,S=e.clippingPlanes,w=e.clippedByBoundaries,E=e.hasImageryLayerCutout,P=e.colorCorrect,A=e.isHeight,L=e.isColor,M=e.hasNormalMap,R=e.hasHypsometricSetting,O=e.hasFlood,I=e.hasSlopeAnalysis,D=e.applyGlobeSplit;e.highlightFillTile,e.colorToAlpha;var B=e.mvtTextureObj,N=e.numberOfGridTextures,F=e.gridUpdate,U=e.applyPolygonOffset,G=e.applyModify,z=e.applyExtract,V=e.excavationRegion,k=e.excavationOuter,W=e.applyImageryClip,H=e.hasHypsometricRegion,q=e.applySlopeRegion;const j=e.translucent;var Y=0,X="",K=i.renderedMesh.encoding;K.quantization===me$p.BITS12&&(Y=1,X="QUANTIZATION_BITS12");var Q=0;e$2b(i.terrainData)&&i.terrainData._createdByUpsampling&&(Q=1);var Z=0,J="";w&&(Z=1,J="TILE_LIMIT_RECTANGLE");var ee=0,te="";E&&(ee=1,te="APPLY_IMAGERY_CUTOUT");var ie=t.mode,ne=ie|r<<2|o<<3|a<<4|s<<5|l<<6|u<<7|f<<8|p<<9|_<<10|x<<11|v<<12|y<<13|b<<14|T<<15|Y<<16|c<<17|C<<18|Q<<19|Z<<20|ee<<21|P<<22|A<<23|L<<24|M<<25|I<<26|D<<27|G<<28|V<<29|k<<30|$<<31;ne=ne+"_"+(D|R<<1|h<<2|d<<3|U<<4|O<<5|W<<6|H<<7|q<<8|j<<9);var re=0;e$2b(S)&&S.length>0&&(re=C?S.clippingPlanesState:0);var oe=i.surfaceShader;if(e$2b(oe)&&oe.numberOfDayTextures===n&&oe.flags===ne&&oe.material===this.material&&oe.clippingShaderState===re&&he$6(oe.mvtTextureObj,B)&&oe.numberOfGridTextures===N&&oe.gridUpdate===F)return oe.shaderProgram;var ae=this._shadersByTexturesFlags[n+N];if(e$2b(ae)||(ae=this._shadersByTexturesFlags[n+N]={}),!e$2b(oe=ae[ne])||oe.material!==this.material||oe.clippingShaderState!==re||!he$6(oe.mvtTextureObj,B)||F||oe.numberOfGridTextures!=N){var se=this.baseVertexShaderSource.clone(),le=this.baseFragmentShaderSource.clone();0!==re&&le.sources.unshift(f$G(S,t.context)),se.defines.push(X,""),le.defines.push("TEXTURE_UNITS "+n,J,te),le.defines.push("GRIDTEXTURE_UNITS "+N,J,te),r&&le.defines.push("APPLY_BRIGHTNESS"),o&&le.defines.push("APPLY_CONTRAST"),a&&le.defines.push("APPLY_HUE"),s&&le.defines.push("APPLY_SATURATION"),l&&le.defines.push("APPLY_GAMMA"),u&&le.defines.push("APPLY_ALPHA"),f&&(le.defines.push("SHOW_REFLECTIVE_OCEAN"),se.defines.push("SHOW_REFLECTIVE_OCEAN")),p&&le.defines.push("SHOW_OCEAN_WAVES"),U&&le.defines.push("POLYGON_OFFSET"),_&&(se.defines.push("ENABLE_LIGHTING"),le.defines.push("ENABLE_LIGHTING"),y?(se.defines.push("ENABLE_VERTEX_LIGHTING"),le.defines.push("ENABLE_VERTEX_LIGHTING")):(se.defines.push("ENABLE_DAYNIGHT_SHADING"),le.defines.push("ENABLE_DAYNIGHT_SHADING"))),($&&M||_&&y)&&(se.defines.push(Y$H.BRDF),le.defines.push(Y$H.BRDF),e$2b(t.specularEnvironmentMaps)&&le.defines.push(Y$H.IBL)),m&&(le.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),g&&le.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN")),x&&(se.defines.push("GROUND_ATMOSPHERE"),le.defines.push("GROUND_ATMOSPHERE"),!t.context.webgpu&&v&&le.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE")),se.defines.push("INCLUDE_WEB_MERCATOR_Y"),le.defines.push("INCLUDE_WEB_MERCATOR_Y"),T&&(se.defines.push("FOG"),le.defines.push("FOG")),c&&le.defines.push("APPLY_SPLIT"),h&&le.defines.push("APPLY_SWIPE"),D&&le.defines.push("APPLY_GLOBESPLIT"),d&&le.defines.push("APPLY_GLOBESWIPE"),C&&le.defines.push("ENABLE_CLIPPING_PLANES"),P&&le.defines.push("COLOR_CORRECT"),A&&(se.defines.push("Height_Map"),le.defines.push("Height_Map")),L&&se.defines.push("Color_Map"),G&&!z&&se.defines.push("APPLY_MODIFY"),V&&le.defines.push("Excavate_Region"),k&&le.defines.push("Excavate_Outer"),W&&le.defines.push("Apply_ImageryClip"),R&&le.defines.push("HYPSOMETRIC_ANALYSIS"),H&&le.defines.push("HYPSOMETRIC_REGION"),O&&(le.defines.push("FLOOD_ANALYSIS"),se.defines.push("FLOOD_ANALYSIS")),I&&M&&(le.defines.push("SLOPE_ANALYSIS"),se.defines.push("SLOPE_ANALYSIS")),I&&q&&M&&le.defines.push("SlopeRegion"),j&&(se.defines.push("TRANSLUCENT"),le.defines.push("TRANSLUCENT"));var ue="vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\n vec4 color = initialColor;\n";ue+=" vec2 realTextureCoord;\n vec4 currentTextureColor;\n",E&&(ue+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(var ce=0;ce<n;++ce)ue+="realTextureCoord = computeTextureCoord(\n",ue+="u_dayTextureUseWebMercatorT["+ce+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTranslationAndScale["+ce+"],\nu_dayTextureSize["+ce+"],\nu_dayTextureFlipY["+ce+"]);\ncurrentTextureColor = texture2D(u_dayTextures["+ce+"], realTextureCoord);\n\n",ue+=E?"cutoutAndColorResult = u_dayTextureCutoutRectangles["+ce+"];\ntexelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\ncutoutAndColorResult = czm_sampleAndBlend(\n":"color = czm_sampleAndBlend(\n",ue+=" currentTextureColor,\n color,\n u_dayTextureUseWebMercatorT["+ce+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+ce+"],\n u_transparentBackColor["+ce+"],\n u_imageryClipEnable["+ce+"],\n "+(u?"u_dayTextureAlpha["+ce+"]":"1.0")+",\n "+(r?"u_dayTextureBrightness["+ce+"]":"0.0")+",\n "+(o?"u_dayTextureContrast["+ce+"]":"0.0")+",\n "+(a?"u_dayTextureHue["+ce+"]":"0.0")+",\n "+(s?"u_dayTextureSaturation["+ce+"]":"0.0")+",\n "+(l?"u_dayTextureOneOverGamma["+ce+"]":"0.0")+",\n "+(c?"u_dayTextureSplit["+ce+"]":"vec2(0.0,0.0)")+",\n "+(h?"u_dayTextureSwipeRegion["+ce+"]":"vec4(0.0,0.0,0.0,0.0)")+"\n);\n",E&&(ue+="color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n");for(ce=0;ce<N;++ce)ue+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+ce+"],\n u_gridTextureUseWebMercatorT["+ce+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_gridTextureTexCoordsRectangle["+ce+"],\n u_gridTextureTranslationAndScale["+ce+"]);\n";ue+=" return color;\n}",le.sources.push(ue),se.sources.push(Pe$4(ie)),se.sources.push(Le$6(b)),se.name="globeVS"+ie,le.name="globeFS"+ie;var he=r$13.fromCache({context:t.context,vertexShaderSource:se,fragmentShaderSource:le,attributeLocations:K.getAttributeLocations()});oe=ae[ne]=new Ee$7(n,ne,this.material,he,re,B,N,F)}return i.surfaceShader=oe,oe.shaderProgram},H$j.prototype.destroy=function(){var e,t,i=this._shadersByTexturesFlags;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];if(!e$2b(r))continue;for(e in r)r.hasOwnProperty(e)&&(e$2b(t=r[e])&&t.shaderProgram.destroy())}return i$10(this)};var E$d={FAILED:0,UNLOADED:1,TRANSITIONING:2,RECEIVED:3,TEXTURE_LODED:4,READY:5,UPDATE:6},_$e=Object.freeze(E$d);function n$c(e,t,i,n,r){if(this.gridLayer=e,this.x=t,this.y=i,this.level=n,this.request=void 0,0!==n){var o=t/2|0,a=i/2|0,s=n-1;this.parent=e._getGridFromCache(o,a,s)}(this.state=_$e.UNLOADED,this.gridBuffer=void 0,this.gridUrl=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!e$2b(r)&&e.gridProvider.ready)&&(r=e.gridProvider.tilingScheme.tileXYToRectangle(t,i,n));this.rectangle=r,this.needUpdate=!1}function d$j(e,t,i){this.readyGrid=void 0,this.loadingGrid=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i}function p$b(e,t){this._gridProvider=e,t=u$_(t,{}),this._context=t.context,this._show=!0,this.show=!0,this._rectangle=u$_(t.rectangle,h$18.MAX_VALUE),this._gridCache=[],e$2b(t.maxCategory)?this._MaxCategory=t.maxCategory:e.ready?this._MaxCategory=e.maxCategory:this._isNeedUpdate=!0,this._isNeedUpdate=!1,this._isUpdate=!0,e$2b(t.minCategory)?this._MinCategory=t.minCategory:e.ready?this._MinCategory=e.minCategory:this._isNeedUpdate=!0,this._hypsometricSetting=void 0,e$2b(t.hypsometricSetting)&&D$d(this,t),this._filterMode=k$Q.FilterMode.LINEAR}function b$i(e,t,i,n,r){var o=n+1,a=e._gridProvider;if(e$2b(a)&&!(a.maxLevel<o))for(var s=Object.keys(e._gridCache),l=0;l<2;l++)for(var u=2*t+l,c=0;c<2;c++){var h=2*i+c,d=w$d(u,h,o);for(l=0;l<s.length;l++)if(d==s[l]){var f=e._gridCache[d];if(R$f(f,r)){var p=b$i(e,u,h,o);return e$2b(p)&&p.state==_$e.READY?p:f.state==_$e.READY?f:void 0}}}}function R$f(e,t){return!!e$2b(e)&&h$18.contains(e.rectangle,t)}n$c.prototype.addReference=function(){++this.referenceCount},n$c.prototype.releaseReference=function(){return--this.referenceCount,0===this.referenceCount?(this.gridLayer._removeGridFromCache(this),e$2b(this.parent)&&this.parent.releaseReference(),e$2b(this.girlBuffer)&&e$2b(this.girlBuffer.destroy)&&this.girlBuffer.destroy(),e$2b(this.texture)&&this.texture.destroy(),e$2b(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),i$10(this),0):this.referenceCount},n$c.prototype._processStateMachine=function(e,t,i){return this.state===_$e.UNLOADED&&!i&&(this.state=_$e.TRANSITIONING,this.gridLayer._requestGridTile(this)),(this.state===_$e.RECEIVED||this.state===_$e.UPDATE)&&(this.state=_$e.TRANSITIONING,this.gridLayer._createTexture(e.context,this)),!0},d$j.prototype.freeResources=function(){e$2b(this.readyImagery)&&this.readyImagery.releaseReference(),e$2b(this.loadingImagery)&&this.loadingImagery.releaseReference()},d$j.prototype._processStateMachine=function(e,t,i){var n=this.loadingGrid;if(null==n){if(!e$2b(this.readyGrid)||this.readyGrid.state!=_$e.UPDATE)return!1;this.loadingGrid=this.readyGrid,this.readyGrid=void 0,n=this.loadingGrid}var r=n.gridLayer;return n._processStateMachine(t,!this.useWebMercatorT,i),n.state===_$e.READY&&(e$2b(this.readyGrid)&&this.readyGrid.releaseReference(),this.readyGrid=this.loadingGrid,this.loadingGrid=void 0,this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this),!0)},Object.defineProperties(p$b.prototype,{gridProvider:{get:function(){return this._gridProvider}},rectangle:{get:function(){return this._rectangle}},dataMaxValue:{get:function(){if(!this._isNeedUpdate)return this._MaxCategory;if(!this._gridProvider.ready)throw new DeveloperError("dataMaxValue must not be called before the grid provider is ready");this._MaxCategory=this._gridProvider.maxCategory,this._isNeedUpdate=!1}},dataMinValue:{get:function(){if(!this._isNeedUpdate)return this._MinCategory;if(!this._gridProvider.ready)throw new DeveloperError("dataMinValue must not be called before the grid provider is ready");this._MinCategory=this._gridProvider.minCategory,this._isNeedUpdate=!1}},hypsometricSetting:{get:function(){return{hypsometricSetting:this._hypsometricSetting,analysisMode:this._hypAnalysisMode}},set:function(e){D$d(this,e),this._isUpdate=!0}}}),p$b.prototype.destroy=function(){return i$10(this)},p$b.prototype.cancelReprojections=function(){},p$b.prototype.queueReprojectionCommands=function(e){},p$b.prototype.getViewableRectangle=function(){var e=this._gridProvider,t=this._rectangle;return e.readyPromise.then((function(){return h$18.intersection(e.rectangle,t)}))},p$b.prototype._getGridFromCache=function(e,t,i,n){var r=w$d(e,t,i),o=(this._gridCache.length,this._gridCache[r]);return e$2b(o)||(o=new n$c(this,e,t,i,n),this._gridCache[r]=o),o.addReference(),o},p$b.prototype.getGridValue=function(e){for(var t=Object.values(this._gridCache),i=void 0,n=0;n<t.length;n++){var r=t[n];if(r.state==_$e.READY)if(R$f(r,e)){var o=b$i(this,r.x,r.y,r.level,e);i=e$2b(o)?o:r;break}}if(!e$2b(i))return-1;var a=(e.longitude-i.rectangle.west)/i.rectangle.width,s=(i.rectangle.north-e.latitude)/i.rectangle.height;a=Math.max(Math.floor(a*this._gridProvider.cellWidth),0),s=Math.max(Math.floor(s*this._gridProvider.cellHeight),0);var l=i.gridBuffer;return G$e(this._gridProvider,l,a,s,this._filterMode)},p$b.prototype._removeGridFromCache=function(e){var t=w$d(e.x,e.y,e.level);delete this._gridCache[t]},p$b.prototype._requestGridTile=function(e){var t=this._gridProvider;function i(t){if(!e$2b(t))return n();e.gridBuffer=t,e.state=_$e.RECEIVED}function n(){if(e.request.state===W$1c.CANCELLED)return e.gridBuffer=void 0,e.state=_$e.UNLOADED,void(e.request=void 0);e.state=_$e.FAILED,e.request=void 0}!function(){var r=new r$1b({throttle:!1,throttleByServer:!0,type:V$15.TERRAIN});e.request=r;var o=t._requestGridTile(e.x,e.y,e.level,r);e$2b(o)?(e.state=_$e.RECEIVING,o$1l(o,i,n)):(e.state=_$e.UNLOADED,e.request=void 0)}()},p$b.prototype._createTexture=function(e,t){var i=this._gridProvider,n=t.gridBuffer;if(null==n||null==i||!i.ready)return!1;this._isNeedUpdate&&this._gridProvider.ready&&(this._MinCategory=this._gridProvider.minCategory,this._MaxCategory=this._gridProvider.maxCategory,this._isNeedUpdate=!1),this._context=e,null==this._hypsometricSetting&&Q$8(this),null==t.texture&&(t.texture=new t$V({context:this._context,width:i.cellWidth,height:i.cellHeight,pixelFormat:V$10.RGBA,flipY:!1}));for(var r=i.cellWidth*i.cellHeight,o=new Uint8Array(4*r),a=0;a<i.cellHeight;a++)for(var s=0;s<i.cellWidth;s++){var l=(i.cellHeight-1-a)*i.cellWidth+s,u=G$e(i,n,s,a,this._filterMode);if(u<this._hypsometricSetting.MinVisibleValue||u>this._hypsometricSetting.MaxVisibleValue||u<this._hypsometricSetting.ColorTableMinKey||u>this._hypsometricSetting.ColorTableMaxKey)o[4*l+0]=0,o[4*l+1]=0,o[4*l+2]=0,o[4*l+3]=0;else{var c=this._hypsometricSetting.ColorTable.getColor(u);if(!e$2b(c)){o[4*l+0]=0,o[4*l+1]=0,o[4*l+2]=0,o[4*l+3]=0;continue}o[4*l+0]=255*c.red,o[4*l+1]=255*c.green,o[4*l+2]=255*c.blue,o[4*l+3]=255*c.alpha}}t.texture.copyFrom({width:i.cellWidth,height:i.cellHeight,arrayBufferView:o}),t.state=_$e.READY};var E$c=new h$18,J$8=new h$18,M$g=new h$18,A$d=new h$18;function Z$d(e,t,i,n,r,o){var a,s=t.rectangle.width/512,l=t.rectangle.height/512,u=e.tilingScheme,c=h$18.clone(t.rectangle,A$d),h=u.tileXYToRectangle(i.northwestTileCoordinates.x,i.northwestTileCoordinates.y,o),d=h$18.intersection(h,n,M$g);return r?(u.rectangleToNativeRectangle(c,c),u.rectangleToNativeRectangle(h,h),u.rectangleToNativeRectangle(d,d),u.rectangleToNativeRectangle(n,n),a=u.tileXYToNativeRectangle.bind(u),s=c.width/512,l=c.height/512):a=u.tileXYToRectangle.bind(u),{veryCloseX:s,veryCloseY:l,terrainRectangle:c,gridRectangle:h,clippedGridRectangle:d,gridTileXYToRectangle:a}}function z$c(e,t,i,n,r,o,a,s){var l,u,c=0,h=1;Math.abs(i.clippedGridRectangle.west-i.terrainRectangle.west)>=i.veryCloseX&&(c=Math.min(1,(i.clippedGridRectangle.west-i.terrainRectangle.west)/i.terrainRectangle.width)),Math.abs(i.clippedGridRectangle.north-i.terrainRectangle.north)>=i.veryCloseY&&(h=Math.max(0,(i.clippedGridRectangle.north-i.terrainRectangle.south)/i.terrainRectangle.height));for(var d=h,f=n.northwestTileCoordinates.x;f<=n.southeastTileCoordinates.x;f++)if(l=c,i.gridRectangle=i.gridTileXYToRectangle(f,n.northwestTileCoordinates.y,o),i.clippedGridRectangle=h$18.simpleIntersection(i.gridRectangle,r,M$g),e$2b(i.clippedGridRectangle)){c=Math.min(1,(i.clippedGridRectangle.east-i.terrainRectangle.west)/i.terrainRectangle.width),f===n.southeastTileCoordinates.x&&Math.abs(i.clippedGridRectangle.east-i.terrainRectangle.east)<i.veryCloseX&&(c=1),h=d;for(var p=n.northwestTileCoordinates.y;p<=n.southeastTileCoordinates.y;p++)if(u=h,i.gridRectangle=i.gridTileXYToRectangle(f,p,o),i.clippedGridRectangle=h$18.simpleIntersection(i.gridRectangle,r,M$g),e$2b(i.clippedGridRectangle)){h=Math.max(0,(i.clippedGridRectangle.south-i.terrainRectangle.south)/i.terrainRectangle.height),p===n.southeastTileCoordinates.y&&Math.abs(i.clippedGridRectangle.south-i.terrainRectangle.south)<i.veryCloseY&&(h=0);var _=new e$29(l,h,c,u),m=e._getGridFromCache(f,p,o);t.gridImagery.splice(s,0,new d$j(m,_,a)),++s}}}function D$d(e,t){if(e$2b(t)&&e$2b(t.hypsometricSetting))e$2b(e._hypsometricSetting)&&e._hypsometricSetting.destroy(),e._hypsometricSetting=t.hypsometricSetting,e._hypsometricSetting._emissionTextureChanged=!0,e._filterMode=e._hypsometricSetting.filterMode,e$2b(e._hypsometricSetting.ColorTable)&&e._hypsometricSetting.ColorTable.generateBuffer();else if(e$2b(e._hypsometricSetting._hypsometricSetting))return e._hypsometricSetting.destroy(),void(e._hypsometricSetting=void 0);$$c(e)}function Q$8(e){if(e._isNeedUpdate&&e._gridProvider.ready&&(e._MinCategory=e._gridProvider.minCategory,e._MaxCategory=e._gridProvider.maxCategory,e._isNeedUpdate=!1),null==e._hypsometricSetting){var t=new i$S;e._hypsometricSetting=new u$M,e._hypsometricSetting.MaxVisibleValue=0;for(var i=[e$1U.fromCssColorString("#AAF0E9"),e$1U.fromCssColorString("#B0F2D3"),e$1U.fromCssColorString("#B0F4BC"),e$1U.fromCssColorString("#BFF8B2"),e$1U.fromCssColorString("#DAFBB2"),e$1U.fromCssColorString("#EDF9AD"),e$1U.fromCssColorString("#DCEC91"),e$1U.fromCssColorString("#A0D567"),e$1U.fromCssColorString("#60BD42"),e$1U.fromCssColorString("#2CA432"),e$1U.fromCssColorString("#148E35"),e$1U.fromCssColorString("#20853D"),e$1U.fromCssColorString("#559037"),e$1U.fromCssColorString("#819D2F"),e$1U.fromCssColorString("#ABA826"),e$1U.fromCssColorString("#D7B117"),e$1U.fromCssColorString("#EBA509"),e$1U.fromCssColorString("#E18302"),e$1U.fromCssColorString("#CB5902"),e$1U.fromCssColorString("#C53602"),e$1U.fromCssColorString("#9D1901"),e$1U.fromCssColorString("#820C01"),e$1U.fromCssColorString("#760F03"),e$1U.fromCssColorString("#721906"),e$1U.fromCssColorString("#702007"),e$1U.fromCssColorString("#6E280A"),e$1U.fromCssColorString("#6A2D0C"),e$1U.fromCssColorString("#733C1B"),e$1U.fromCssColorString("#815032"),e$1U.fromCssColorString("#8E664D"),e$1U.fromCssColorString("#997C6C"),e$1U.fromCssColorString("#A69992")],n=(e._MaxCategory-e._MinCategory)/31,r=0;r<32;r++)t.insert(e._MinCategory+n*r,i[r]);e._hypsometricSetting.ColorTable=t,e._hypsometricSetting.DisplayMode=k$Q.DisplayMode.FACE_AND_LINE,e._hypsometricSetting.Opacity=.618,e._hypsometricSetting.ColorTableMaxKey=e._MaxCategory,e._hypsometricSetting.ColorTableMinKey=e._MinCategory,e._hypsometricSetting.MaxVisibleValue=e._MaxCategory,e._hypsometricSetting.MinVisibleValue=e._MinCategory,e._hypsometricSetting.ColorTable.generateBuffer()}}function w$d(e,t,i){return JSON.stringify([e,t,i])}function $$c(e){for(var t=Object.values(e._gridCache),i=0;i<t.length;i++){var n=t[i];n.state==_$e.READY&&(n.state=_$e.UPDATE,n.needUpdate=!0)}}function P$f(e,t,i,n){var r=0;i.south>0?r=i.south:i.north<0&&(r=i.north);var o=e._gridProvider,a=I$c(e,1*t.getLevelMaximumGeometricError(n),r,e$2b(o.resolution)?o.resolution:1,t.tilingScheme._tileWidth);a=Math.max(0,a);var s=o.maxLevel;if(a>s&&(a=s),e$2b(o.minLevel)){var l=o.minLevel;a<l&&(a=l)}return a}function I$c(e,t,i,n,r){var o=e._gridProvider,a=o.tilingScheme,s=a.ellipsoid,l=o.tilingScheme.projection instanceof n$1b?1:Math.cos(i),u=a.rectangle,c=s.maximumRadius*u.width*l/(o.cellWidth*a.getNumberOfXTilesAtLevel(0)/n)/t*(o.cellWidth/r),h=Math.log(c)/Math.log(2);return 0|Math.round(h)}function L$f(e,t,i,n){var r=e.tilingScheme,o=r.positionToTileXY(h$18.northwest(t),i),a=r.positionToTileXY(h$18.southeast(t),i),s=n.width/512,l=n.height/512,u=r.tileXYToRectangle(o.x,o.y,i);Math.abs(u.south-n.north)<l&&o.y<a.y&&++o.y,Math.abs(u.east-n.west)<s&&o.x<a.x&&++o.x;var c=r.tileXYToRectangle(a.x,a.y,i);return Math.abs(c.north-n.south)<l&&a.y>o.y&&--a.y,Math.abs(c.west-n.east)<s&&a.x>o.x&&--a.x,{northwestTileCoordinates:o,southeastTileCoordinates:a}}function G$e(e,t,i,n,r){if(!e$2b(e))throw new DeveloperError("getValue must not be called before the grid provider is ready");if(r==k$Q.FilterMode.NEAREST)return t[n*e.cellWidth+i];for(var o=0,a=0,s=0;s<2;s++)for(var l=0;l<2;l++){var u=i+s;u=Math.min(u,e.cellWidth-1);var c=n+l;o+=t[(c=Math.min(c,e.cellHeight-1))*e.cellWidth+u],a++}return a<=0?-99999:o/=a}function n$b(){this._layers=[],this.layerAdded=new o$1h,this.layerRemoved=new o$1h,this.layerMoved=new o$1h,this.layerShownOrHidden=new o$1h,this.layerUpdate=new o$1h}function g$h(e,t){if(!e$2b(t))throw new t$16("layer is required.");var i=e.indexOf(t);if(-1===i)throw new t$16("layer is not in this collection.");return i}function b$h(e,t,i){var n=e._layers;if((t=e$2a.clamp(t,0,n.length-1))!==(i=e$2a.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t)}}p$b.prototype._createTileImagerySkeletons=function(e,t,i){var n=e.data,r=this._gridProvider;if(!this.show||!r.ready)return!1;e$2b(i)||(i=n.gridImagery.length);var o=r.tilingScheme.projection instanceof t$O&&e.rectangle.north<t$O.MaximumLatitude&&e.rectangle.south>-t$O.MaximumLatitude,a=h$18.intersection(r.rectangle,this._rectangle,E$c),s=h$18.intersection(e.rectangle,a,J$8);if(null==s)return!1;var l=P$f(this,t,s,e.level),u=L$f(r,s,l,e.rectangle);return e.rectangle.width,e.rectangle.height,z$c(this,n,Z$d(r,e,u,a,o,l),u,a,l,o,i),!0},p$b.prototype._calculateTextureTranslationAndScale=function(e,t){var i=t.readyGrid.rectangle,n=e.rectangle;if(t.useWebMercatorT){var r=t.girdLayer.gridProvider.tilingScheme;i=r.rectangleToNativeRectangle(i,E$c),n=r.rectangleToNativeRectangle(n,A$d)}var o=n.width,a=n.height,s=o/i.width,l=a/i.height;return new e$29(s*(n.west-i.west)/o,l*(n.south-i.south)/a,s,l)},Object.defineProperties(n$b.prototype,{length:{get:function(){return this._layers.length}}}),n$b.prototype.add=function(e,t){var i=e$2b(t);if(!e$2b(e))throw new t$16("layer is required.");if(i){if(t<0)throw new t$16("index must be greater than or equal to zero.");if(t>this._layers.length)throw new t$16("index must be less than or equal to the number of layers.")}i?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t)},n$b.prototype.addImageryProvider=function(e,t){if(!e$2b(e))throw new t$16("imageryProvider is required.");var i=new h$Q(e);return i._imageryLayers=this,this.add(i,t),i},n$b.prototype.addVectorTileProvider=function(e,t){if(!e$2b(e))throw new t$16("imageryProvider is required.");var i=new h$Q(e,{minimumTerrainLevel:e.minimumTerrainLevel,maximumTerrainLevel:e.maximumTerrainLevel,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter});return this.add(i,t),i},n$b.prototype.addGridProvider=function(e,t){if(!e$2b(e))throw new t$16("gridProvider is required.");var i=new p$b(e);return this.add(i,t),i},n$b.prototype.remove=function(e,t,i){t=u$_(t,!0);i=u$_(i,!1);var n=this._layers.indexOf(e);return-1!==n&&(e._imageryProvider&&e._imageryProvider instanceof I$10&&!i?void 0:(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0))},n$b.prototype.removeAll=function(e){e=u$_(e,!0);for(var t=this._layers,i=0,n=t.length;i<n;i++){var r=t[i];this.layerRemoved.raiseEvent(r,i),e&&r.destroy()}this._layers=[]},n$b.prototype.contains=function(e){return-1!==this.indexOf(e)},n$b.prototype.indexOf=function(e){return this._layers.indexOf(e)},n$b.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.","index");return this._layers[e]},n$b.prototype.raise=function(e){var t=g$h(this._layers,e);b$h(this,t,t+1)},n$b.prototype.lower=function(e){var t=g$h(this._layers,e);b$h(this,t,t-1)},n$b.prototype.raiseToTop=function(e){var t=g$h(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},n$b.prototype.lowerToBottom=function(e){var t=g$h(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var H$i=new h$18;function r$h(e,t){this._terrainProvider=e}function o$h(){this._layers=[],this.layerAdded=new o$1h,this.layerRemoved=new o$1h,this.layerMoved=new o$1h,this.layerShownOrHidden=new o$1h,this._globe=void 0}function f$h(e,t){if(!e$2b(t))throw new t$16("layer is required.");var i=e.indexOf(t);if(-1===i)throw new t$16("layer is not in this collection.");return i}function p$a(e,t,i){var n=e._layers;if((t=e$2a.clamp(t,0,n.length-1))!==(i=e$2a.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t)}}function e$9(e){this._ellipsoid=new s$G(e.ellipsoid,o$1p.ZERO)}function h$e(e){if(!e$2b(e))throw new t$16("options is required.");if(!e$2b(e.x))throw new t$16("options.x is required.");if(!e$2b(e.y))throw new t$16("options.y is required.");if(e.x<0||e.y<0)throw new t$16("options.x and options.y must be greater than or equal to zero.");if(!e$2b(e.level))throw new t$16("options.level is required and must be greater than or equal to zero.");if(!e$2b(e.tilingScheme))throw new t$16("options.tilingScheme is required.");this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=D$J.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=re$z.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0,this._rasterTextureSize=void 0,this._rasterFBO=void 0,this._rasterTexture=void 0,this._rasterized=!1,this._clearCommand=new t$X({color:new e$1U(0,0,0,0),depth:1}),this._2DRasterized=!1,this._2DRasterTexture=void 0,this._mvtLoaded=!1,this._clipRasterTexture=void 0,this._clipRasterFbo=void 0,this._clipRegionsCount=0,this._clipRegionRasterized=!1,this.isModified=!1,0===this._level?this.showInvalid=!1:this.showInvalid=e.parent.showInvalid,this.zoomLevel=-1,this._renderThisFrame=!1,this._useParentImage=!1}function I$b(e){e$2b(e)&&e.freeResources()}n$b.prototype.pickImageryLayerFeatures=function(e,t){var i=t.globe.pick(e,t);if(e$2b(i)){for(var n,r=t.globe.ellipsoid.cartesianToCartographic(i),o=t.globe._surface._tilesToRender,a=0;!e$2b(n)&&a<o.length;++a){var s=o[a];h$18.contains(s.rectangle,r)&&(n=s)}if(e$2b(n)){for(var l=n.data.imagery,u=[],c=[],h=l.length-1;h>=0;--h){var d=l[h],f=d.readyImagery;if(e$2b(f)){var p=f.imageryLayer.imageryProvider;if(e$2b(p.pickFeatures)&&h$18.contains(f.rectangle,r)){var _=H$i,m=1/1024;if(_.west=e$2a.lerp(n.rectangle.west,n.rectangle.east,d.textureCoordinateRectangle.x-m),_.east=e$2a.lerp(n.rectangle.west,n.rectangle.east,d.textureCoordinateRectangle.z+m),_.south=e$2a.lerp(n.rectangle.south,n.rectangle.north,d.textureCoordinateRectangle.y-m),_.north=e$2a.lerp(n.rectangle.south,n.rectangle.north,d.textureCoordinateRectangle.w+m),h$18.contains(_,r)){var g=p.pickFeatures(f.x,f.y,f.level,r.longitude,r.latitude);!e$2b(g)||(u.push(g),c.push(f.imageryLayer))}}}}if(0!==u.length)return o$1l.all(u,(function(e){for(var t=[],i=0;i<e.length;++i){var n=e[i],o=c[i];if(e$2b(n)&&n.length>0)for(var a=0;a<n.length;++a){var s=n[a];s.imageryLayer=o,e$2b(s.position)||(s.position=r),t.push(s)}}return t}))}}},n$b.prototype.queueReprojectionCommands=function(e){for(var t=this._layers,i=0,n=t.length;i<n;++i)t[i].queueReprojectionCommands(e)},n$b.prototype.cancelReprojections=function(){for(var e=this._layers,t=0,i=e.length;t<i;++t)e[t].cancelReprojections()},n$b.prototype.isDestroyed=function(){return!1},n$b.prototype.destroy=function(){return this.removeAll(!0),i$10(this)},n$b.prototype._update=function(){var e,t,i,n,r=!0,o=this._layers;for(i=0,n=o.length;i<n;++i)(t=o[i])._layerIndex=i,e$2b(t._imageryProvider)&&(t._imageryProvider._id=t._layerIndex),t.show?(t._isBaseLayer=r,r=!1):t._isBaseLayer=!1,t.show!==t._show&&(e$2b(t._show)&&(e$2b(e)||(e=[]),e.push(t)),t._show=t.show),e$2b(t.gridProvider)&&t._isUpdate&&this.layerUpdate.raiseEvent(t,t._layerIndex);if(e$2b(e))for(i=0,n=e.length;i<n;++i)t=e[i],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},n$b.prototype._maxDetailLevelOffset=function(){for(var e=0,t=this._layers,i=0,n=t.length;i<n;++i){var r=t[i]._detailLevelOffset;t[i].featherEdgesEnabled&&r<1&&(r=1),e=Math.max(r,e)}return e},n$b.prototype.saveLocalCache=function(){for(var e=0,t=this._layers.length;e<t;e++)this._layers[e]instanceof h$Q&&this._layers[e].saveLocalCache()},Object.defineProperties(r$h.prototype,{terrainProvider:{get:function(){return this._terrainProvider}}}),r$h.prototype.isDestroyed=function(){return!1},r$h.prototype.destroy=function(){return i$10(this)},Object.defineProperties(o$h.prototype,{length:{get:function(){return this._layers.length}}}),o$h.prototype.add=function(e,t){var i=e$2b(t);if(!e$2b(e))throw new t$16("layer is required.");if(i){if(t<0)throw new t$16("index must be greater than or equal to zero.");if(t>this._layers.length)throw new t$16("index must be less than or equal to the number of layers.")}i?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),e$2b(this._globe)&&e$2b(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerAdded.raiseEvent(e,t)},o$h.prototype.addTerrainProvider=function(e,t){if(!e$2b(e))throw new t$16("terrainProvider is required.");var i=new r$h(e);return this.add(i,t),e$2b(this._globe)&&e$2b(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),i},o$h.prototype.remove=function(e,t){t=u$_(t,!0);var i=this._layers.indexOf(e);return-1!==i&&(this._layers.splice(i,1),this._update(),this.layerRemoved.raiseEvent(e,i),t&&e.destroy(),e$2b(this._globe)&&e$2b(this._globe._surface)&&(0===this._layers.length&&(this._globe.terrainProvider=new t$A({ellipsoid:this._globe.ellipsoid})),this._globe._surface.invalidateAllTiles()),!0)},o$h.prototype.removeAll=function(e){e=u$_(e,!0);for(var t=this._layers,i=0,n=t.length;i<n;i++){var r=t[i];this.layerRemoved.raiseEvent(r,i),e&&r.destroy()}e$2b(this._globe)&&e$2b(this._globe._surface)&&(this._globe.terrainProvider=new t$A({ellipsoid:this._globe.ellipsoid}),this._globe._surface.invalidateAllTiles()),this._layers=[]},o$h.prototype.contains=function(e){return-1!==this.indexOf(e)},o$h.prototype.indexOf=function(e){return this._layers.indexOf(e)},o$h.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.","index");return this._layers[e]},o$h.prototype.raise=function(e){var t=f$h(this._layers,e);p$a(this,t,t+1),e$2b(this._globe)&&e$2b(this._globe._surface)&&this._globe._surface.invalidateAllTiles()},o$h.prototype.lower=function(e){var t=f$h(this._layers,e);p$a(this,t,t-1),e$2b(this._globe)&&e$2b(this._globe._surface)&&this._globe._surface.invalidateAllTiles()},o$h.prototype.raiseToTop=function(e){var t=f$h(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),e$2b(this._globe)&&e$2b(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},o$h.prototype.lowerToBottom=function(e){var t=f$h(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),e$2b(this._globe)&&e$2b(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerMoved.raiseEvent(e,0,t))},o$h.prototype.isDestroyed=function(){return!1},o$h.prototype.destroy=function(){return this.removeAll(!0),i$10(this)},o$h.prototype._update=function(){var e,t,i,n,r=!0,o=this._layers;for(i=0,n=o.length;i<n;++i)(t=o[i])._layerIndex=i,e$2b(t._terrainProvider)&&(t._terrainProvider._id=t._layerIndex),t.show?(t._isBaseLayer=r,r=!1):t._isBaseLayer=!1,t.show!==t._show&&(e$2b(t._show)&&(e$2b(e)||(e=[]),e.push(t)),t._show=t.show);if(e$2b(e))for(i=0,n=e.length;i<n;++i)t=e[i],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},Object.defineProperties(e$9.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),h$e.createLevelZeroTiles=function(e){if(!e$2b(e))throw new t$16("tilingScheme is required.");for(var t=e.getNumberOfXTilesAtLevel(0),i=e.getNumberOfYTilesAtLevel(0),n=new Array(t*i),r=0,o=0;o<i;++o)for(var a=0;a<t;++a)n[r++]=new h$e({tilingScheme:e,x:a,y:o,level:0});return n},h$e.prototype._updateCustomData=function(e,t,i){var n,r,o,a=this.customData;if(e$2b(t)&&e$2b(i)){for(a=a.filter((function(e){return-1===i.indexOf(e)})),this._customData=a,o=this._rectangle,n=0;n<t.length;++n)r=t[n],h$18.contains(o,r.positionCartographic)&&a.push(r);this._frameUpdated=e}else{var s=this._parent;if(e$2b(s)&&this._frameUpdated!==s._frameUpdated){a.length=0,o=this._rectangle;var l=s.customData;for(n=0;n<l.length;++n)r=l[n],h$18.contains(o,r.positionCartographic)&&a.push(r);this._frameUpdated=s._frameUpdated}}},Object.defineProperties(h$e.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return e$2b(this._southwestChild)||(this._southwestChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return e$2b(this._southeastChild)||(this._southeastChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return e$2b(this._northwestChild)||(this._northwestChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return e$2b(this._northeastChild)||(this._northeastChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<re$z.DONE}},eligibleForUnloading:{get:function(){var e=!0;return e$2b(this.data)&&(e$2b(e=this.data.eligibleForUnloading)||(e=!0)),e}}}),h$e.prototype.findLevelZeroTile=function(e,t,i){var n=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=n:t>=n&&(t-=n),!(i<0||i>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter((function(e){return e.x===t&&e.y===i}))[0]},h$e.prototype.findTileToWest=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;var i=t.findTileToWest(e);return void 0!==i?t.southwestChild===this?i.southeastChild:i.northeastChild:void 0},h$e.prototype.findTileToEast=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;var i=t.findTileToEast(e);return void 0!==i?t.southeastChild===this?i.southwestChild:i.northwestChild:void 0},h$e.prototype.findTileToSouth=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;var i=t.findTileToSouth(e);return void 0!==i?t.southwestChild===this?i.northwestChild:i.northeastChild:void 0},h$e.prototype.findTileToNorth=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;var i=t.findTileToNorth(e);return void 0!==i?t.northwestChild===this?i.southwestChild:i.southeastChild:void 0},h$e.prototype.freeResources=function(){this.state=re$z.START,this.renderable=!1,this.upsampledFromParent=!1,e$2b(this.data)&&e$2b(this.data.freeResources)&&this.data.freeResources(),I$b(this._southwestChild),this._southwestChild=void 0,I$b(this._southeastChild),this._southeastChild=void 0,I$b(this._northwestChild),this._northwestChild=void 0,I$b(this._northeastChild),this._northeastChild=void 0,this._rasterTexture=this._rasterTexture&&!this._rasterTexture.isDestroyed()&&this._rasterTexture.destroy(),this._rasterFBO=this._rasterFBO&&!this._rasterFBO.isDestroyed()&&this._rasterFBO.destroy(),this._rasterFBO=void 0,this._rasterized=!1,this._2DRasterTexture=this._2DRasterTexture&&!this._2DRasterTexture.isDestroyed()&&this._2DRasterTexture.destroy(),this._2DRasterized=!1,this._mvtLoaded=!1,this._clipRasterTexture=this._clipRasterTexture&&!this._clipRasterTexture.isDestroyed()&&this._clipRasterTexture.destroy(),this._clipRasterFbo=this._clipRasterFbo&&!this._clipRasterFbo.isDestroyed()&&this._clipRasterFbo.destroy(),this._clipRegionsCount=0,this._clipRegionRasterized=!1,this.isModified=!1};var Y$8=new h$18,m$e=new f$18;h$e.prototype.createRealtimeRasterFBO=function(e){this._rasterTexture=new t$V({context:e.context,width:this._rasterTextureSize,height:this._rasterTextureSize,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}),this._rasterFBO=new t$W({context:e.context,colorTextures:[this._rasterTexture],destroyAttachments:!1})};var H$h=new p$1d;function Z$c(e,t){var i=f$18.clone(t.context.uniformState._viewport),n=e$2a.toDegrees(e._rectangle.west),r=e$2a.toDegrees(e._rectangle.east),o=e$2a.toDegrees(e._rectangle.north),a=e$2a.toDegrees(e._rectangle.south),s=t.camera,l=s.frustum.clipPlane,u=s.heading,c=s.pitch,h=s.roll,d=new o$1p;1===t._fboState.frameBufferType&&s.disableReflection(),o$1p.clone(s._positionWC,d),p$1d.clone(s.transform,H$h),s._setTransform(p$1d.IDENTITY);var f=new a$V({width:r-n,aspectRatio:1,near:1,far:100}),p=new o$1p(.5*(n+r),.5*(o+a),50),_=new o$1p(0,0,-1),m=new o$1p(0,1,0);r=o$1p.cross(_,m,new o$1p);return p$1d.computeView(p,_,m,r,t.context.uniformState.view),t.context.uniformState.updateFrustum(f),{position:d,viewport:i,waterPlane:l,heading:u,pitch:c,roll:h}}function C$e(e){if(!e$2b(e)||!e$2b(e.tileProvider))throw new t$16("options.tileProvider is required.");if(e$2b(e.tileProvider.quadtree))throw new t$16("A QuadtreeTileProvider can only be used with a single QuadtreePrimitive");this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};var t=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new i$L,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=u$_(e.maximumScreenSpaceError,2),this.tileCacheSize=u$_(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!0,this._occluders=new e$9({ellipsoid:t}),this._tileLoadProgressEvent=new o$1h,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0,this._tilesToRenderOld=[],this._levelZeroTilesOld=[],this._zeroTileReady=!1,this._freeAllBakTiles=!1,this._visible=!0,this._delicateImagerylength=16}function Ce$4(e){if(e._zeroTileReady){e._tilesToRenderOld.length=0;for(var t=e._levelZeroTilesOld,i=0;i<t.length;++i){for(var n=t[i],r=n.customData,o=r.length,a=0;a<o;++a){var s=r[a];s.level=0,e._addHeightCallbacks.push(s)}n.freeResources()}e._levelZeroTilesOld.length=0}}function be$4(e){var t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,le$8(e);var i=e._levelZeroTiles;if(e$2b(i))if(e._zeroTileReady){e._tilesToRenderOld.length=0;for(var n=0;n<i.length;++n){for(var r=i[n].customData,o=r.length,a=0;a<o;++a){var s=r[a];s.level=0,e._addHeightCallbacks.push(s)}i[n].freeResources()}}else e._tilesToRenderOld=e._tilesToRender.slice(0),e._levelZeroTilesOld=e._levelZeroTiles.slice(0);e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}function le$8(e){var t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}function Pe$3(e,t){var i=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;(i!==e._lastTileLoadQueueLength||e._tilesInvalidated)&&(t.afterRender.push(o$1h.prototype.raiseEvent.bind(e._tileLoadProgressEvent,i)),e._lastTileLoadQueueLength=i);var n=e._debug;n.enableDebugOutput&&!n.suspendLodUpdate&&(n.maxDepth=e._tilesToRender.reduce((function(e,t){return Math.max(e,t.level)}),-1),n.tilesRendered=e._tilesToRender.length,(n.tilesVisited!==n.lastTilesVisited||n.tilesRendered!==n.lastTilesRendered||n.tilesCulled!==n.lastTilesCulled||n.maxDepth!==n.lastMaxDepth||n.tilesWaitingForChildren!==n.lastTilesWaitingForChildren||n.maxDepthVisited!==n.lastMaxDepthVisited)&&(console.log("Visited "+n.tilesVisited+", Rendered: "+n.tilesRendered+", Culled: "+n.tilesCulled+", Max Depth Rendered: "+n.maxDepth+", Max Depth Visited: "+n.maxDepthVisited+", Waiting for children: "+n.tilesWaitingForChildren),n.lastTilesVisited=n.tilesVisited,n.lastTilesRendered=n.tilesRendered,n.lastTilesCulled=n.tilesCulled,n.lastMaxDepth=n.maxDepth,n.lastTilesWaitingForChildren=n.tilesWaitingForChildren,n.lastMaxDepthVisited=n.maxDepthVisited))}h$e.prototype.resetCamera=function(e,t){var i=e.camera;1===e._fboState.frameBufferType&&t.waterPlane&&i.enableReflection(t.waterPlane),i._setTransform(H$h),i.setView({destination:t.position,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},convert:!1}),e.context.uniformState.update(e),e.context.uniformState.updateFrustum(i.frustum),e.context.uniformState.viewport=t.viewport},h$e.prototype.realtimeRasterVectors=function(e,t){if(!(this.level<2||(e.rasterPerFrame&&e.camera.zoomLevel!==this.zoomLevel&&(this._rasterized=!1),this._rasterized))){this.zoomLevel=e.camera.zoomLevel;var i=0;2===this._level&&(i=1),t._rasterCurrentFBOIdx=i,this._rasterTextureSize=t._rasterTextureSizes[i],this._rasterized=!0,m$e.width=this._rasterTextureSize,m$e.height=this._rasterTextureSize;for(var n=e.commandListRealtimeRaster,r=[],o=[],a=0;a<n.length;a++){var s=!1;if(e$2b(n[a]._globeIndex))if(this._level>=n[a]._globeIndex.level){var l=Math.pow(2,this._level-n[a]._globeIndex.level),u=Math.floor(this.y/l),c=Math.floor(this.x/l);u===n[a]._globeIndex.row&&c===n[a]._globeIndex.col&&(s=!0)}else{l=Math.pow(2,n[a]._globeIndex.level-this._level),u=Math.floor(n[a]._globeIndex.row/l),c=Math.floor(n[a]._globeIndex.col/l);u===this.y&&c===this.x&&(s=!0)}else{var h,d=new h$18((h=n[a]._boundingVolume instanceof i$1c?n[a]._boundingVolume:i$1c.fromOrientedBoundingBox(n[a]._boundingVolume)).center.x-h.radius,h.center.y-h.radius,h.center.x+h.radius,h.center.y+h.radius);d.west=e$2a.toRadians(d.west),d.north=e$2a.toRadians(d.north),d.east=e$2a.toRadians(d.east),d.south=e$2a.toRadians(d.south),e$2b(h$18.intersection(d,this._rectangle,Y$8))&&(s=!0)}s&&(n[a]._primitiveType===W$18.TRIANGLES?r.push(n[a]):o.push(n[a]))}if(0===r.length&&0===o.length)return void(e$2b(this._rasterFBO)&&(this._clearCommand.framebuffer=this._rasterFBO,this._clearCommand.execute(e.context)));e$2b(this._rasterTexture)||this.createRealtimeRasterFBO(e);var f=!1,p=t._rasterLineFBOs[i],_=t._rasterAAFBOs[i];e.rasterLineWidth>1&&o.length>0&&(f=!0,this._clearCommand.framebuffer=p,this._clearCommand.execute(e.context)),this._clearCommand.framebuffer=_,this._clearCommand.execute(e.context),this._clearCommand.framebuffer=this._rasterFBO,this._clearCommand.execute(e.context);var m=Z$c(this,e),g={},x={};for(a=0;a<r.length;a++){e$2b(g[v=r[a].layerId])?g[v].push(r[a]):g[v]=[r[a]]}for(a=0;a<o.length;a++){var v;e$2b(x[v=o[a].layerId])?x[v].push(o[a]):x[v]=[o[a]]}if(e$2b(e.rasterLayerIds))for(var y=0;y<e.rasterLayerIds.length;y++){var $=e.rasterLayerIds[y],b=g[$],T=x[$];if(e$2b(b))for(a=0;a<b.length;a++)e$2b(b[a].shaderProgram)&&(b[a].renderState=d$1m.fromCache({viewport:m$e,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),b[a].framebuffer=_,b[a].execute(e.context));if(e$2b(T))for(a=0;a<T.length;a++)e$2b(T[a].shaderProgram)&&(T[a].renderState=d$1m.fromCache({viewport:m$e}),T[a].framebuffer=f?p:_,T[a].execute(e.context))}e.context.webgpu&&e.context.engine.flushFramebuffer(),this.resetCamera(e,m),f&&(t._lineExpandCommand.framebuffer=_,t._lineExpandCommand.renderState=d$1m.fromCache({viewport:m$e}),t._lineExpandCommand.execute(e.context)),t._lineFXAACommand.framebuffer=this._rasterFBO,t._lineFXAACommand.renderState=d$1m.fromCache({viewport:m$e}),t._lineFXAACommand.execute(e.context)}},h$e.prototype.renderVectorBy2DCanvas=function(e,t){var i=e.rasterVectorCollection,n=i.bounds;if(e$2b(n)){var r=!1;if(e$2b(h$18.intersection(n,this._rectangle,Y$8))&&(r=!0),r&&!this._2DRasterized){this._2DRasterized=!0,e$2b(this._2DRasterTexture)||(this._2DRasterTexture=new t$V({context:e.context,width:i.canvasWidth,height:i.canvasHeight,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}));var o=i.draw(this._rectangle);this._2DRasterTexture.copyFrom(o),this._2DRasterTexture.textureAlpha=i.alpha}}},h$e.prototype.rasterClipRegion=function(e,t){if(!(e._fboState.name.indexOf("_excavationGlobeHeight")>-1||this._level<2)){var i=[].concat(t._excavateRegions.values).concat(t._modifyRegions.values).concat(t._imageryClipRegions.values).concat(t._extractRegions.values);e$2b(t._slopeRegion)&&i.push(t._slopeRegion),e$2b(t._hypsometricRegion)&&i.push(t._hypsometricRegion);var n=i.length;if(!(n<1||e.camera.frustum instanceof a$V||this._clipRegionsCount===n)){e$2b(this._clipRasterFbo)||(this._clipRasterTexture=new t$V({context:e.context,width:256,height:256,pixelFormat:V$10.RGBA}),this._clipRasterFbo=new t$W({context:e.context,colorTextures:[this._clipRasterTexture],destroyAttachments:!1})),this._clearCommand.framebuffer=this._clipRasterFbo,this._clearCommand.execute(e.context),m$e.width=256,m$e.height=256;for(var r=Z$c(this,e),o=!1,a=0;a<n;a++){var s=i[a];if(e$2b(h$18.intersection(s.rectangle,this._rectangle))){var l=s.command;!e$2b(s.command)||(o=!0,l.renderState=d$1m.fromCache({viewport:m$e,cull:{enabled:!1}}),l.framebuffer=this._clipRasterFbo,l.execute(e.context))}}if(this.resetCamera(e,r),(o=o||t.clippingType===R$J.KeepInside)&&(this._clipRegionsCount=n),this._clipRegionRasterized=o,o){var u=this._level+" "+this._x+" "+this._y;t._clipRasterTilesMap[u]=this}}}},h$e.prototype.setRasterValidTerrainCamera=function(e,t){var i=f$18.clone(t.context.uniformState._viewport),n=t.camera;o$1p.clone(n.position,oldPosition),o$1p.clone(n.direction,oldDirection),o$1p.clone(n.up,oldUp),n.setView({destination:new o$1p(16383.5,16383.5,5e4),orientation:{direction:new o$1p(0,0,-1),up:new o$1p(0,1,0)},convert:!1});var r=new a$V({width:32767,aspectRatio:1,near:1,far:1e5});return t.context.uniformState.update(t),t.context.uniformState.updateFrustum(r),{position:oldPosition,direction:oldDirection,upDirection:oldUp,viewport:i}},h$e.prototype.setShowInvalid=function(e){this.showInvalid!==e&&(this.showInvalid=e,e$2b(this.data)&&this.data.setShowInvalid(e))},Object.defineProperties(C$e.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}}),C$e.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0,this._zeroTileReady=!1},C$e.prototype.forEachLoadedTile=function(e){for(var t=this._tileReplacementQueue.head;e$2b(t);)t.state!==re$z.START&&e(t),t=t.replacementNext},C$e.prototype.forEachRenderedTile=function(e){for(var t=this._tilesToRender,i=0,n=t.length;i<n;++i)e(t[i])},C$e.prototype.updateHeight=function(e,t,i){var n=this,r={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t,scene:i,removeFunc:function(){for(var e=n._addHeightCallbacks,t=e.length,i=0;i<t;++i)if(e[i]===r){e.splice(i,1);break}n._removeHeightCallbacks.push(r)}};return n._addHeightCallbacks.push(r),r.removeFunc},C$e.prototype.update=function(e){e$2b(this._tileProvider.update)&&this._tileProvider.update(e)},C$e.prototype.beginFrame=function(e){!e.passes.render||(this._tilesInvalidated&&(be$4(this),this._tilesInvalidated=!1),this._freeAllBakTiles&&(Ce$4(this),this._freeAllBakTiles=!1),this._tileProvider.initialize(e),le$8(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())},C$e.prototype.render=function(e){var t=e.passes,i=this._tileProvider;t.render&&(i.beginUpdate(e),ye$4(this,e),Ve$5(this,e),i.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&i.updateForPick(e)},C$e.prototype.showInvalid=function(e){var t,i,n,r=[];for(t=0,i=this._levelZeroTiles.length;t<i;++t)r.push(this._levelZeroTiles[t]);for(;n=r.pop();)n.setShowInvalid(e),e$2b(n._southeastChild)&&r.push(n._southeastChild),e$2b(n._southwestChild)&&r.push(n._southwestChild),e$2b(n._northeastChild)&&r.push(n._northeastChild),e$2b(n._northwestChild)&&r.push(n._northwestChild)},C$e.prototype.endFrame=function(e){if(e.passes.render&&e.mode!==C$13.MORPHING){if(e.camera._scene._mvtVisibleControl)for(var t=e.camera._scene._mvtVisibleLevel,i=this._tileReplacementQueue.head;e$2b(i);){if(!1===i._mvtLoaded&&i._level>e.camera._endLevel-t&&e$2b(i.data)&&e$2b(i.data.imagery))for(var n=i.data.imagery,r=0;r<n.length;r++)if(e$2b(n[r].loadingImagery)){n[r].loadingImagery.imageryLayer._imageryProvider instanceof I$10&&(i._mvtLoaded=n[r].processStateMachine(i,e))}i=i.replacementNext}!0===this.tileProvider.terrainProvider._needRefresh&&(this.invalidateAllTiles(),this.tileProvider.terrainProvider._needRefresh=!1),we$2(this,e),Ae$6(this,e),Pe$3(this,e)}},C$e.prototype.isDestroyed=function(){return!1},C$e.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var w$c,ae$5=new a$18;function me$7(e,t){var i=h$18.center(e.rectangle,ae$5),n=i.longitude-w$c.longitude,r=i.latitude-w$c.latitude,o=(i=h$18.center(t.rectangle,ae$5)).longitude-w$c.longitude,a=i.latitude-w$c.latitude;return n*n+r*r-(o*o+a*a)}var pe$6=new o$1p,O$c=[];function Ee$6(e,t,i){if(t>5){for(var n=[],r=0;r<e.length;++r)e[r].level===t&&n.push(e[r]);if(n.length<i)for(r=0;r<n.length;++r)n[r]._useParentImage=!0}}function ye$4(e,t){var i=e._debug;if(!i.suspendLodUpdate){var n=e._tilesToRender;n.length=0;for(var r=e._tileReplacementQueue.head;r!==e._tileReplacementQueue.tail;)r._renderThisFrame=!1,r._useParentImage=!1,r=r.replacementNext;var o,a=e._tileProvider;if(!e$2b(e._levelZeroTiles)){if(!a.ready)return;var s=a.tilingScheme;e._levelZeroTiles=h$e.createLevelZeroTiles(s);var l=e._levelZeroTiles.length;if(O$c.length<l)for(O$c=new Array(l),o=0;o<l;++o)void 0===O$c[o]&&(O$c[o]=new H$g)}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;var u=e._levelZeroTiles,c=u.length>1?e._occluders:void 0;w$c=t.camera.positionCartographic,u.sort(me$7);var h,d=e._addHeightCallbacks,f=e._removeHeightCallbacks,p=t.frameNumber;if(d.length>0||f.length>0){for(o=0,h=u.length;o<h;++o)(r=u[o])._updateCustomData(p,d,f);d.length=0,f.length=0}var _=t.camera;e._cameraPositionCartographic=_.positionCartographic;var m=p$1d.getTranslation(_.transform,pe$6);for(e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(m,e._cameraReferenceFrameOriginCartographic),o=0,h=u.length;o<h;++o)r=u[o],e._tileReplacementQueue.markTileRendered(r),r.renderable?R$e(e,r,a,t,c,!1,O$c[o]):(P$e(e,e._tileLoadQueueHigh,r,t),++i.tilesWaitingForChildren);for(var g=0,x=22,v=0;v<n.length;++v)g=Math.max(n[v].level,g),x=Math.min(n[v].level,x);t.camera._endLevel=g,g-x>3&&Ee$6(n,g,e._delicateImagerylength),e._zeroTileReady||(e._tilesToRenderOld.length>0?n.length>2&&(e._zeroTileReady=!0,e._freeAllBakTiles=!0):e._zeroTileReady=!0),e._lastSelectionFrameNumber=p}}function P$e(e,t,i,n){!i.needsLoading||(void 0!==e.tileProvider.computeTileLoadPriority&&(i._loadPriority=e.tileProvider.computeTileLoadPriority(i,n)),t.push(i))}function H$g(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function ne$7(){this.southwest=new H$g,this.southeast=new H$g,this.northwest=new H$g,this.northeast=new H$g}ne$7.prototype.combine=function(e){var t=this.southwest,i=this.southeast,n=this.northwest,r=this.northeast;e.allAreRenderable=t.allAreRenderable&&i.allAreRenderable&&n.allAreRenderable&&r.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||r.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+i.notYetRenderableCount+n.notYetRenderableCount+r.notYetRenderableCount};for(var U$e=new Array(30),G$d=0;G$d<U$e.length;++G$d)U$e[G$d]=new ne$7;function De$5(e,t,i,n,r){var o=e._debug;++o.tilesVisited,e._tileReplacementQueue.markTileRendered(i),i._updateCustomData(t.frameNumber),i.level>o.maxDepthVisited&&(o.maxDepthVisited=i.level);var a=Ne$4(e,t,i)<e.maximumScreenSpaceError;if(e._tileProvider._terrainProvider._enablePrjArea&&a){var s=i._level+2,l=4*i._x,u=4*i._y;for(let t=0;t<e._tilesToRender.length;t++){const i=e._tilesToRender[t];if(i._level==s&&(i._x==l-1&&i._y==u||i._x==l&&i._y==u-1||i._x==l+3&&i._y==u-1||i._x==l+4&&i._y==u||i._x==l+4&&i._y==u+3||i._x==l+3&&i._y==u+4||i._x==l&&i._y==u+4||i._x==l-1&&i._y==u+3)){a=!1;break}}}var c=i.southwestChild,h=i.southeastChild,d=i.northwestChild,f=i.northeastChild,p=e._lastSelectionFrameNumber,_=i._lastSelectionResultFrame===p?i._lastSelectionResult:D$J.NONE,m=e.tileProvider;if(a||n){var g=D$J.originalResult(_)===D$J.RENDERED,x=D$J.originalResult(_)===D$J.CULLED||_===D$J.NONE,v=i.state===re$z.DONE,y=g||x||v;if(y||e$2b(m.canRenderWithoutLosingDetail)&&(y=m.canRenderWithoutLosingDetail(i)),y)return a&&P$e(e,e._tileLoadQueueMedium,i,t),B$9(e,i),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$J.RENDERED,r.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.RENDERED,void(r.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));n=!0,a&&P$e(e,e._tileLoadQueueHigh,i,t)}if(m.canRefine(i)){if(c.upsampledFromParent&&h.upsampledFromParent&&d.upsampledFromParent&&f.upsampledFromParent)return B$9(e,i),P$e(e,e._tileLoadQueueMedium,i,t),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(h),e._tileReplacementQueue.markTileRendered(d),e._tileReplacementQueue.markTileRendered(f),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$J.RENDERED,r.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.RENDERED,void(r.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.REFINED;var $=e._tilesToRender.length,b=e._tileLoadQueueLow.length,T=e._tileLoadQueueMedium.length,C=e._tileLoadQueueHigh.length,S=e._tileToUpdateHeights.length;if(Fe$5(e,c,h,d,f,t,n,r),$!==e._tilesToRender.length){var w=r.allAreRenderable,E=r.anyWereRenderedLastFrame,P=r.notYetRenderableCount,A=!1;if(!w&&!E){for(var L=e._tilesToRender,M=$;M<L.length;++M)for(var R=L[M];void 0!==R&&R._lastSelectionResult!==D$J.KICKED&&R!==i;)R._lastSelectionResult=D$J.kick(R._lastSelectionResult),R=R.parent;e._tilesToRender.length=$,e._tileToUpdateHeights.length=S,B$9(e,i),i._lastSelectionResult=D$J.RENDERED;var O=_===D$J.RENDERED;!O&&P>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=b,e._tileLoadQueueMedium.length=T,e._tileLoadQueueHigh.length=C,P$e(e,e._tileLoadQueueMedium,i,t),r.notYetRenderableCount=i.renderable?0:1,A=!0),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=O,O||e._tileToUpdateHeights.push(i),++o.tilesWaitingForChildren}e.preloadAncestors&&!A&&P$e(e,e._tileLoadQueueLow,i,t)}}else i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.RENDERED,B$9(e,i),P$e(e,e._tileLoadQueueHigh,i,t),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$J.RENDERED,r.notYetRenderableCount=i.renderable?0:1}function Fe$5(e,t,i,n,r,o,a,s){if(!(t.level>=U$e.length)){var l=o.camera.positionCartographic,u=e._tileProvider,c=e._occluders,h=U$e[t.level],d=h.southwest,f=h.southeast,p=h.northwest,_=h.northeast;l.longitude<t.rectangle.east?l.latitude<t.rectangle.north?(R$e(e,t,u,o,c,a,d),R$e(e,i,u,o,c,a,f),R$e(e,n,u,o,c,a,p),R$e(e,r,u,o,c,a,_)):(R$e(e,n,u,o,c,a,p),R$e(e,t,u,o,c,a,d),R$e(e,r,u,o,c,a,_),R$e(e,i,u,o,c,a,f)):l.latitude<t.rectangle.north?(R$e(e,i,u,o,c,a,f),R$e(e,t,u,o,c,a,d),R$e(e,r,u,o,c,a,_),R$e(e,n,u,o,c,a,p)):(R$e(e,r,u,o,c,a,_),R$e(e,n,u,o,c,a,p),R$e(e,i,u,o,c,a,f),R$e(e,t,u,o,c,a,d)),h.combine(s)}}function Qe$3(e,t){var i=t.rectangle;return e$2b(e._cameraPositionCartographic)&&h$18.contains(i,e._cameraPositionCartographic)||e$2b(e._cameraReferenceFrameOriginCartographic)&&h$18.contains(i,e._cameraReferenceFrameOriginCartographic)}function R$e(e,t,i,n,r,o,a){if(i.computeTileVisibility(t,n,r)!==fe$n.NONE)return De$5(e,n,t,o,a);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),a.allAreRenderable=!0,a.anyWereRenderedLastFrame=!1,a.notYetRenderableCount=0,Qe$3(e,t)){(!e$2b(t.data)||!e$2b(t.data.vertexArray))&&P$e(e,e._tileLoadQueueMedium,t,n);var s=e._lastSelectionFrameNumber,l=t._lastSelectionResultFrame===s?t._lastSelectionResult:D$J.NONE;l!==D$J.CULLED_BUT_NEEDED&&l!==D$J.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=D$J.CULLED_BUT_NEEDED}else e.preloadSiblings||0===t.level?(P$e(e,e._tileLoadQueueLow,t,n),t._lastSelectionResult=D$J.CULLED):t._lastSelectionResult=D$J.CULLED;t._lastSelectionResultFrame=n.frameNumber}function Ne$4(e,t,i){if(t.mode===C$13.SCENE2D||t.camera.frustum instanceof a$V||t.camera.frustum instanceof l$12)return xe$3(e,t,i);if(i.isModified&&i.level>18)return 0;var n,r=i._distance;if(e._tileProvider._terrainProvider._enablePrjArea){var o=i.data.tileBoundingRegion._orientedBoundingBox.calculateBoxArea(t.camera.positionWC,t.mode,r,t.camera.frustum.sseDenominator,t.context.drawingBufferHeight,-1,t.context.uniformState.mvpViewPort,t.mapProjection);n=Math.sqrt(o/e$2a.PI_OVER_FOUR)/288}else{n=e._tileProvider.getLevelMaximumGeometricError(i.level)*t.context.drawingBufferHeight/(r*t.camera.frustum.sseDenominator)}return 0==e._tileProvider._terrainProvider._enablePrjArea&&t.fog.enabled&&(n-=e$2a.fog(r,t.fog.density)*t.fog.sse),n}function xe$3(e,t,i){var n=t.camera.frustum;e$2b(n._offCenterFrustum)&&(n=n._offCenterFrustum);var r=t.context,o=r.drawingBufferWidth,a=r.drawingBufferHeight,s=e._tileProvider.getLevelMaximumGeometricError(i.level)/(Math.max(n.top-n.bottom,n.right-n.left)/Math.max(o,a));return t.fog.enabled&&t.mode!==C$13.SCENE2D&&(s-=e$2a.fog(i._distance,t.fog.density)*t.fog.sse),s}function B$9(e,t){t._renderThisFrame=!0,e._tilesToRender.push(t)}function we$2(e,t){var i=e._tileLoadQueueHigh,n=e._tileLoadQueueMedium,r=e._tileLoadQueueLow;if(0!==i.length||0!==n.length||0!==r.length){e._tileReplacementQueue.trimTiles(e.tileCacheSize,e.tileCacheSizeForMVT);var o=Et$a()+e._loadQueueTimeSlice,a=e._tileProvider,s=q$c(e,t,a,o,i,!1);s=q$c(e,t,a,o,n,s),q$c(e,t,a,o,r,s)}}function Oe$5(e,t){return e._loadPriority-t._loadPriority}function q$c(e,t,i,n,r,o){void 0!==i.computeTileLoadPriority&&r.sort(Oe$5);for(var a=0,s=r.length;a<s&&(Et$a()<n||!o);++a){var l=r[a];e._tileReplacementQueue.markTileRendered(l),i.loadTile(t,l),o=!0}return o}var Q$7=new f$17,K$8=new a$18,D$c=new o$1p,He$2=[];function Ae$6(e,t){if(!e.tileProvider.ready)return;const i=He$2;i.length=0;const n=e._tileToUpdateHeights,r=Et$a()+e._updateHeightsTimeSlice,o=t.mode,a=t.mapProjection,s=e.tileProvider.tilingScheme.ellipsoid;let l;for(;n.length>0;){const t=n[0];if(!e$2b(t.data)||!e$2b(t.data.mesh)){const r=t._lastSelectionResultFrame===e._lastSelectionFrameNumber?t._lastSelectionResult:D$J.NONE;(r===D$J.RENDERED||r===D$J.CULLED_BUT_NEEDED)&&i.push(t),n.shift(),e._lastTileIndex=0;continue}const u=t.customData,c=u.length;let h=!1;for(l=e._lastTileIndex;l<c;++l){const e=u[l],i=t.data.terrainData;if(e$2b(i)&&i.wasCreatedByUpsampling(),t.level>e.level){if(e$2b(e.positionOnEllipsoidSurface)||(e.positionOnEllipsoidSurface=o$1p.fromRadians(e.positionCartographic.longitude,e.positionCartographic.latitude,0,s)),o===C$13.SCENE3D){const i=s.geodeticSurfaceNormal(e.positionOnEllipsoidSurface,Q$7.direction);if(!e$2b(s.getSurfaceNormalIntersectionWithZAxis(e.positionOnEllipsoidSurface,11500,Q$7.origin))){let n=0;e$2b(t.data.tileBoundingRegion)&&(n=t.data.tileBoundingRegion.minimumHeight);const r=Math.min(n,-11500),o=o$1p.multiplyByScalar(i,Math.abs(r)+1,D$c);o$1p.subtract(e.positionOnEllipsoidSurface,o,Q$7.origin)}}else a$18.clone(e.positionCartographic,K$8),K$8.height=-11500,a.project(K$8,D$c),o$1p.fromElements(D$c.z,D$c.x,D$c.y,D$c),o$1p.clone(D$c,Q$7.origin),o$1p.clone(o$1p.UNIT_X,Q$7.direction);const i=t.data.pick(Q$7,o,a,!1,D$c);e$2b(i)&&(e$2b(e.callback)&&e.callback(i),e.level=t.level)}if(Et$a()>=r){h=!0;break}}if(h){e._lastTileIndex=l;break}e._lastTileIndex=0,n.shift()}for(l=0;l<i.length;l++)n.push(i[l])}function Ve$5(e,t){for(var i=e._tileProvider,n=e._zeroTileReady?e._tilesToRender:e._tilesToRenderOld,r=0,o=n.length;r<o;++r){var a=n[r];i.showTileThisFrame(a,t)}}function p$9(e){this._bounds=void 0;var t=512;this._canvas=document.createElement("canvas"),this._canvas.height=t,this._canvas.width=t,this._pickCanvas=document.createElement("canvas"),this._pickCanvas.height=t,this._pickCanvas.width=t,this._polygons=new e$1N,this._polygonHoles=new e$1N,this._polylines=new e$1N,this._quadtreePrimitive=e,this._alpha=1}Object.defineProperties(p$9.prototype,{bounds:{get:function(){return this._bounds}},canvasWidth:{get:function(){return this._canvas.width}},canvasHeight:{get:function(){return this._canvas.height}},alpha:{get:function(){return this._alpha},set:function(e){this._alpha=e}}});var T$e=new h$18;function f$g(e,t){if(e$2b(t)){var i=e._rectangle;e$2b(h$18.intersection(t,i,T$e))&&(e._2DRasterized=!1),e$2b(e._southwestChild)&&f$g(e._southwestChild,t),e$2b(e._southeastChild)&&f$g(e._southeastChild,t),e$2b(e._northwestChild)&&f$g(e._northwestChild,t),e$2b(e._northeastChild)&&f$g(e._northeastChild,t)}}function Z$b(e){var t,i,n=e._polygons,r=n.values.length;for(t=0;t<r;t++)i=n.values[t].bounds,e$2b(e._bounds)?e._bounds=h$18.union(i,e._bounds):e._bounds=i;for(r=(n=e._polygonHoles).values.length,t=0;t<r;t++)i=n.values[t].bounds,e$2b(e._bounds)?e._bounds=h$18.union(i,e._bounds):e._bounds=i;for(r=(n=e._polylines).values.length,t=0;t<r;t++)i=n.values[t].bounds,e$2b(e._bounds)?e._bounds=h$18.union(i,e._bounds):e._bounds=i}function x$e(e,t,i,n){for(var r=e.length,o=[],a=i/t.width,s=n/t.height,l=0;l<r;l++){var u=e[l],c=new o$1o;c.x=(u.longitude-t.west)*a,c.y=(t.north-u.latitude)*s,c.x=Math.floor(c.x+.5),c.y=Math.floor(c.y+.5),o.push(c)}return o}function O$b(e,t,i,n,r,o){var a,s=t.values.length;for(a=0;a<s;a++){var l=t.values[a];if(e$2b(h$18.intersection(l.bounds,i,T$e))){var u;u=e$2b(l.selected)&&l.selected?e$1U.BLUE:o?new e$1U(0,0,0,1):l.fillColor;var c=x$e(l.positions,i,n,r);t$e.drawPolygon(e,{canvasPostions:c,fillColor:u,lineColor:l.lineColor,lineWidth:l.lineWidth})}}}function M$f(e,t,i,n,r){var o,a=t.values.length;for(o=0;o<a;o++){var s=t.values[o];if(e$2b(h$18.intersection(s.bounds,i,T$e))){var l=x$e(s.positions,i,n,r);t$e.drawSimplePolyline(e,{canvasPostions:l,lineColor:s.lineColor,lineWidth:s.lineWidth})}}}function W$g(e,t){var i=Math.floor(e/65536),n=e-65536*i,r=Math.floor(n/256),o=n-256*r,a=1;return e$2b(t)&&(a=t/256),new e$1U(o/256,r/256,i/256,a)}p$9.prototype.add=function(e){var t=e.name,i=e.positions,n=new h$18,r=u$_(e.geometryType,C$q.POLYGON),o=u$_(e.pickId,0);h$18.fromCartographicArray(i,n);var a={pickId:o,positions:i,bounds:n,fillColor:e.fillColor,lineColor:e.lineColor,lineWidth:e.lineWidth};r==C$q.POLYLINE?this._polylines.set(t,a):r==C$q.POLYGON?this._polygons.set(t,a):r==C$q.POLYGON_HOLE&&this._polygonHoles.set(t,a),Z$b(this),f$g(this._quadtreePrimitive._levelZeroTiles[0],n),f$g(this._quadtreePrimitive._levelZeroTiles[1],n)},p$9.prototype.remove=function(e){var t;if(this._polygons.contains(e)){var i=this._polygons.get(e);e$2b(i)&&(t=i.bounds),this._polygons.remove(e)}if(this._polygonHoles.contains(e)){var n=this._polygonHoles.get(e);e$2b(n)&&(t=n.bounds),this._polygonHoles.remove(e)}if(this._polylines.contains(e)){var r=this._polylines.get(e);e$2b(r)&&(t=r.bounds),this._polylines.remove(e)}f$g(this._quadtreePrimitive._levelZeroTiles[0],t),f$g(this._quadtreePrimitive._levelZeroTiles[1],t)},p$9.prototype.removeAll=function(){this._polylines.removeAll(),this._polygons.removeAll(),this._polygonHoles.removeAll(),f$g(this._quadtreePrimitive._levelZeroTiles[0],this._bounds),f$g(this._quadtreePrimitive._levelZeroTiles[1],this._bounds)},p$9.prototype.draw=function(e){var t=this._canvas.getContext("2d");return t.clearRect(0,0,this._canvas.width,this._canvas.height),O$b(t,this._polygons,e,this._canvas.width,this._canvas.height,!1),O$b(t,this._polygonHoles,e,this._canvas.width,this._canvas.height,!0),M$f(t,this._polylines,e,this._canvas.width,this._canvas.height),this._canvas};var c$b=new h$18;function i$d(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=h$18.clone(h$18.MAX_VALUE)}function h$d(e){var t=new t$A({ellipsoid:e=u$_(e,t$13.WGS84)}),i=new n$b,n=new o$h;this._ellipsoid=e,this._imageryLayerCollection=i,this._terrainLayerCollection=n,this._surfaceShaderSet=new H$j,this._material=void 0,this._surface=new C$e({tileProvider:new A$S({terrainProvider:t,imageryLayers:i,terrainLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainLayerCollection._globe=this,this._rasterVectorCollection=new p$9(this._surface),this._terrainProvider=t,this._defaultTerrainProvider=t,this._terrainProviderChanged=new o$1h,K$7(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new t$11({url:n$15("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.tileCacheSizeForMVT=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!0,this.fillHighlightColor=void 0,this.enableLighting=!1,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!0,this.lightingFadeOutDistance=1e7,this.lightingFadeInDistance=2e7,this.nightFadeOutDistance=1e7,this.nightFadeInDistance=5e7,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!0,this.shadows=W$W.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this._globeAlpha=1,this._splitDirection=new o$1o(0,0),this._sceneMode=C$13.SCENE3D,this.clippingType=R$J.KeepOutside,this.showExcavationSide=!0,this._scene=void 0,this._excavationNormalTextureUrl=n$15("Assets/Textures/excavationregion_top_Normal.jpg"),this._excavationSideNormalTextureUrl=n$15("Assets/Textures/excavationregion_side_Normal.jpg"),this._floodFlagTexture=void 0,this._floodRect=new e$29,this._translucency=new i$d}function K$7(e){var t=[],i=e$2b(e._material)&&(e._material.shaderSource.match(/slope/)||e._material.shaderSource.match("normalEC")),n=[le$9];!e$2b(e._material)||i&&!e._terrainProvider.requestVertexNormals?e._surface._tileProvider.uniformMap=void 0:(n.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.uniformMap=e._material._uniforms),n.push(De$6),e._surfaceShaderSet.baseVertexShaderSource=new s$U({sources:[le$9,Ne$5],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new s$U({sources:n,defines:t}),e._surfaceShaderSet.material=e._material}function Ze$4(e){return function(t,i){return i$1c.distanceSquaredTo(t.pickBoundingSphere,e)-i$1c.distanceSquaredTo(i.pickBoundingSphere,e)}}p$9.prototype.getPickID=function(e){var t,i=this._polygons,n=i.values.length,r=[],o=0;for(t=0;t<n;t++){var a=i.values[t].bounds;h$18.contains(a,e)&&(0==o?h$18.clone(a,c$b):c$b=h$18.union(a,c$b),o++,r.push(i.values[t]))}if(0==o)return-1;var s=this._pickCanvas.getContext("2d");for(n=r.length,t=0;t<n;t++){var l=r[t],u=x$e(l.positions,c$b,this._pickCanvas.width,this._pickCanvas.height),c=W$g(l.pickId);t$e.drawPolygon(s,{canvasPostions:u,fillColor:c,lineColor:c})}var h=(e.longitude-c$b.west)/c$b.width*this._pickCanvas.width,d=(c$b.north-e.latitude)/c$b.height*this._pickCanvas.height;h=Math.floor(h+.5);var f=4*((d=Math.floor(d+.5))*this._pickCanvas.width+h),p=s.getImageData(0,0,this._pickCanvas.width,this._pickCanvas.height),_=p.data[f],m=p.data[f+1],g=p.data[f+2];return p.data[f+3],_+256*m+256*g*256},p$9.prototype.setSelection=function(e){var t,i=this._polygons,n=i.values.length,r=0,o=!1;for(t=0;t<n;t++){var a=i.values[t],s=a.pickId,l=a.bounds;o=!1,s===e?(a.selected=!0,o=!0):(e$2b(a.selected)&&a.selected&&(o=!0),a.selected=!1),o&&(0==r?h$18.clone(l,c$b):c$b=h$18.union(l,c$b),r++)}f$g(this._quadtreePrimitive._levelZeroTiles[0],c$b),f$g(this._quadtreePrimitive._levelZeroTiles[1],c$b)},p$9.prototype.isDestroyed=function(){return!1},p$9.prototype.destroy=function(){return i$10(this)},Object.defineProperties(i$d.prototype,{enabled:{get:function(){return this._enabled},set:function(e){o$1q.typeOf.bool("enabled",e),this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("frontFaceAlpha",e,0),o$1q.typeOf.number.lessThanOrEquals("frontFaceAlpha",e,1),this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){if(e$2b(e)&&e.far<e.near)throw new t$16("far distance must be greater than near distance.");this._frontFaceAlphaByDistance=o$Y.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("backFaceAlpha",e,0),o$1q.typeOf.number.lessThanOrEquals("backFaceAlpha",e,1),this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){if(e$2b(e)&&e.far<e.near)throw new t$16("far distance must be greater than near distance.");this._backFaceAlphaByDistance=o$Y.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){e$2b(e)||(e=h$18.clone(h$18.MAX_VALUE)),h$18.clone(e,this._rectangle)}}}),new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Object.defineProperties(h$d.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},terrainLayers:{get:function(){return this._terrainLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tileLoadedEvent:{get:function(){return this._surface.tileProvider.tileLoadedEvent}},tilesLoaded:{get:function(){return!e$2b(this._surface)||this._surface.tileProvider.ready&&0===this._surface._tileLoadQueueHigh.length&&0===this._surface._tileLoadQueueMedium.length&&0===this._surface._tileLoadQueueLow.length}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){e$2b(e)||(e=h$18.clone(h$18.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),e$2b(this._material)&&K$7(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,K$7(this))}},globeAlpha:{get:function(){return this._globeAlpha},set:function(e){e$2b(e)&&e>=0&&e<=1&&(this._globeAlpha=e,this._translucency.enabled=e<1,this._translucency.frontFaceAlpha=e,this._translucency.backFaceAlpha=e,this._surface.tileProvider.globeAlpha=e)}},cullEnabled:{get:function(){return this._surface._tileProvider._cullEnabled},set:function(e){if(o$1q.typeOf.bool("cullEnabled",e),e$2b(e)&&(this._surface._tileProvider._cullEnabled=e,e$2b(this._surface._tileProvider._renderState))){var t=d$1m.getState(this._surface._tileProvider._renderState);t.cull.enabled=e,this._surface._tileProvider._renderState=d$1m.fromCache(t)}}},HypsometricSetting:{get:function(){return{hypsometricSetting:this._surface._tileProvider._hypsometricSetting,analysisMode:this._surface._tileProvider._hypAnalysisMode,altitudeMode:this._surface._tileProvider._style3D._altitudeMode}},set:function(e){if(this.removeRasterRegions(),this._surface._tileProvider._bUseHypColorTable=!1,this._surface._tileProvider._hypsometricRegionUpdate=!0,e$2b(this._surface._tileProvider._hypsometricRegion)&&(e$2b(this._surface._tileProvider._hypsometricRegion.command)&&(this._surface._tileProvider._hypsometricRegion.command.vertexArray.destroy(),this._surface._tileProvider._hypsometricRegion.command.shaderProgram.destroy()),this._surface._tileProvider._hypsometricRegion=null),e$2b(e)&&e$2b(e.hypsometricSetting)){if(this._surface._tileProvider._hypAnalysisMode=e.analysisMode||this._surface._tileProvider._hypAnalysisMode,this._surface._tileProvider._hypsometricSetting=u$M.clone(e.hypsometricSetting,this._surface._tileProvider._hypsometricSetting),this._surface._tileProvider._hypsometricSetting.ColorTable.generateBuffer(),e$2b(this._surface._tileProvider._hypsometricTexture)&&this._surface._tileProvider._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._surface._tileProvider._hypsometricSetting.ColorTable._imageBuffer}),this._surface._tileProvider._hypAnalysisMode!=k$Q.AnalysisRegionMode.ARM_NONE&&(this._surface._tileProvider._bUseHypColorTable=!0),this._surface._tileProvider._hypsometricSetting.UpdatePolygonRegion&&this._surface._tileProvider._hypAnalysisMode==k$Q.AnalysisRegionMode.ARM_REGION&&this._surface._tileProvider._hypsometricSetting.CoverageArea.length>0){var t=this._surface._tileProvider._hypsometricSetting.CoverageArea,i=o$1p.fromDegreesArrayHeights(t),n=h$18.fromCartesianArray(i),r=z$_.createGeometry(new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(t)}}));this._surface._tileProvider._hypsometricRegion={rectangle:n,worldGeometry:r,modelMatrix:p$1d.fromTranslation(new o$1p(t[0],t[1],0),new p$1d),command:void 0}}}else e$2b(this._surface._tileProvider._hypsometricSetting)&&(this._surface._tileProvider._hypsometricSetting.destroy(),this._surface._tileProvider._hypsometricSetting=void 0)}},SlopeSetting:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Globe_SlopeSetting"),{slopeSetting:this._surface._tileProvider._slopeSetting,analysisMode:this._surface._tileProvider._slopeAnalysisMode,altitudeMode:this._surface._tileProvider._style3D._altitudeMode}},set:function(e){if(LicenseChecker.LICENSECHECKER.verify("Globe_SlopeSetting"),this.removeRasterRegions(),this._surface._tileProvider._bUseSlopeColorTable=!1,this._surface._tileProvider._slopeRegionUpdate=!0,e$2b(this._surface._tileProvider._slopeRegion)&&(e$2b(this._surface._tileProvider._slopeRegion.command)&&(this._surface._tileProvider._slopeRegion.command.vertexArray.destroy(),this._surface._tileProvider._slopeRegion.command.shaderProgram.destroy()),this._surface._tileProvider._slopeRegion=null),e$2b(e)&&e$2b(e.slopeSetting)){if(this._surface._tileProvider._slopeAnalysisMode=e.analysisMode,this._surface._tileProvider._slopeSetting=l$K.clone(e.slopeSetting,this._surface._tileProvider._slopeSetting),this._surface._tileProvider._slopeSetting.ColorTable.generateBuffer(),e$2b(this._surface._tileProvider._slopeColorTexture)&&this._surface._tileProvider._slopeColorTexture.copyFrom({width:1024,height:64,arrayBufferView:this._surface._tileProvider._slopeSetting.ColorTable._imageBuffer}),this._surface._tileProvider._slopeAnalysisMode!=k$Q.AnalysisRegionMode.ARM_NONE&&(this._surface._tileProvider._bUseSlopeColorTable=!0),this._surface._tileProvider._slopeSetting.UpdatePolygonRegion&&this._surface._tileProvider._slopeAnalysisMode==k$Q.AnalysisRegionMode.ARM_REGION&&this._surface._tileProvider._slopeSetting.CoverageArea.length>0){var t=this._surface._tileProvider._slopeSetting.CoverageArea,i=o$1p.fromDegreesArrayHeights(t),n=h$18.fromCartesianArray(i),r=z$_.createGeometry(new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(t)}}));this._surface._tileProvider._slopeRegion={rectangle:n,worldGeometry:r,modelMatrix:p$1d.fromTranslation(new o$1p(t[0],t[1],0),new p$1d),command:void 0}}}else e$2b(this._surface._tileProvider._slopeSetting)&&(this._surface._tileProvider._slopeSetting.destroy(),this._surface._tileProvider._slopeSetting=void 0)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){o$1o.clone(e,this._splitDirection),o$1o.clone(e,this._surface._tileProvider._splitDirection)}},swipeRegion:{get:function(){var e=this._surface._tileProvider._swipeRegion;return new f$18(e.x,e.y,e.z-e.x,e.w-e.y)},set:function(e){if(e$2b(e)){if(!(e instanceof f$18))throw new t$16("swipeRegion must be a instance of BoundingRectangle.");e$29.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._surface._tileProvider._swipeRegion)}}},swipeEnabled:{get:function(){return this._surface._tileProvider._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?this.splitDirection=new o$1o(0,0):e$29.fromElements(0,0,1,1,this._surface._tileProvider._swipeRegion),this._surface._tileProvider._swipeEnabled=e)}},imageryLodTolerance:{get:function(){return this._surface._delicateImagerylength},set:function(e){"number"==typeof e&&(this._surface._delicateImagerylength=e)}},excavationSideTextureUrl:{get:function(){return this._surface.tileProvider._excavationSideTextureUrl},set:function(e){this._surface.tileProvider._excavationSideTextureUrl=e}},excavationBottomTextureUrl:{get:function(){return this._surface.tileProvider._excavationBottomTextureUrl},set:function(e){this._surface.tileProvider._excavationBottomTextureUrl=e}},translucency:{get:function(){return this._translucency}}});var Qe$2=[],Ye$2={start:0,stop:0};h$d.prototype.pickWorldCoordinates=function(e,t,i){if(!e$2b(e))throw new t$16("ray is required");if(!e$2b(t))throw new t$16("scene is required");var n=t.mode,r=t.mapProjection,o=Qe$2;o.length=0;var a,s,l,u=this._surface._tilesToRender,c=u.length;for(s=0;s<c;++s){var h=(a=u[s]).data;if(e$2b(h)){var d=h.pickBoundingSphere;if(n!==C$13.SCENE3D)h.pickBoundingSphere=d=i$1c.fromRectangleWithHeights2D(a.rectangle,r,h.tileBoundingRegion.minimumHeight,h.tileBoundingRegion.maximumHeight,d),o$1p.fromElements(d.center.z,d.center.x,d.center.y,d.center);else{if(!e$2b(h.renderedMesh))continue;i$1c.clone(h.renderedMesh.boundingSphere3D,d)}e$2b(g$1h.raySphere(e,d,Ye$2))&&o.push(h)}}for(o.sort(Ze$4(e.origin)),c=o.length,s=0;s<c&&!e$2b(l=o[s].pick(e,t.mode,t.mapProjection,!0,i));++s);return l};var J$7=new o$1p,$$b=new o$1p,ee$6=new o$1p;h$d.prototype.computeSurfaceArea=function(e,t,i){var n,r=e._polygonHierarchy.positions;if(!e$2b(i)){for(var o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0;u<r.length;u++){var c=a$18.fromCartesian(r[u]);o=Math.min(c.longitude,o),a=Math.max(c.longitude,a),s=Math.min(c.latitude,s),l=Math.max(c.latitude,l)}var h=a$18.toCartesian(new a$18(o,s,0)),d=a$18.toCartesian(new a$18(a,l,0));n=o$1p.angleBetween(h,d)}for(var f=z$_.fromPositions({positions:r,granularity:e$2b(i)?i:n/32}),p=z$_.createGeometry(f),_=0,m={},g=0;g<p.indices.length;g+=3){var x,v,y,$=p.indices[g];if(e$2b(m[$]))x=m[$];else{x=new o$1p(p.attributes.position.values[3*$],p.attributes.position.values[3*$+1],p.attributes.position.values[3*$+2]);var b=a$18.fromCartesian(x),T=this.getHeight(b);if(!e$2b(T))continue;b=a$18.fromRadians(b.longitude,b.latitude,T),x=a$18.toCartesian(b,t),m[$]=o$1p.clone(x)}var C=p.indices[g+1];if(e$2b(m[C]))v=m[C];else{v=new o$1p(p.attributes.position.values[3*C],p.attributes.position.values[3*C+1],p.attributes.position.values[3*C+2]);var S=a$18.fromCartesian(v),w=this.getHeight(S);if(!e$2b(w))continue;S=a$18.fromRadians(S.longitude,S.latitude,w),v=a$18.toCartesian(S,t),m[C]=o$1p.clone(v)}var E=p.indices[g+2];if(e$2b(m[E]))y=m[E];else{y=new o$1p(p.attributes.position.values[3*E],p.attributes.position.values[3*E+1],p.attributes.position.values[3*E+2]);var P=a$18.fromCartesian(y),A=this.getHeight(P);if(!e$2b(A))continue;P=a$18.fromRadians(P.longitude,P.latitude,A),y=a$18.toCartesian(P,t),m[E]=o$1p.clone(y)}J$7=o$1p.subtract(v,x,J$7),$$b=o$1p.subtract(y,x,$$b),ee$6=o$1p.cross(J$7,$$b,ee$6),_+=.5*o$1p.magnitude(ee$6)}return _},h$d.prototype.getVisibleTiles=function(){for(var e=[],t=this._surface._tilesToRender,i=0;i<t.length;i++)e.push({x:t[i].x,y:t[i].y,level:t[i].level});return e},h$d.prototype.computeSurfaceDistance=function(e,t){for(var i=e._positions,n=0,r=[],o=i.length-1,a=0;a<o;a++)for(var s=i[a],l=i[a+1],u=o$1p.angleBetween(s,l)/64,c=e$2a.chordLength(u,6378137),h=y$_.subdivideLine(s,l,c,r),d=o$1p.unpackArray(h),f=d.length-1,p=0;p<f;p++){var _=d[p],m=a$18.fromCartesian(_),g=this.getHeight(m);if(e$2b(g)){m=a$18.fromRadians(m.longitude,m.latitude,g);var x=a$18.toCartesian(m),v=d[p+1];if(m=a$18.fromCartesian(v),e$2b(g=this.getHeight(m))){m=a$18.fromRadians(m.longitude,m.latitude,g);var y=a$18.toCartesian(m);n+=o$1p.distance(x,y)}}}return n};var Ke$2=new a$18;h$d.prototype.pick=function(e,t,i){if(this.show){if(e$2b(i=this.pickWorldCoordinates(e,t,i))&&t.mode!==C$13.SCENE3D){i=o$1p.fromElements(i.y,i.z,i.x,i);var n=t.mapProjection.unproject(i,Ke$2);i=t.globe.ellipsoid.cartographicToCartesian(n,i)}return i}};var Je$2=new o$1p,ue$6=new o$1p,$e$2=new a$18,er=new f$17;function F$c(e,t){return h$18.contains(e.rectangle,t)?e:void 0}function me$6(e){for(var t=Number.MAX_VALUE,i=-Number.MAX_VALUE,n=2,r=e.length;n<r;n+=3){var o=e[n];t=Math.min(t,o),i=Math.max(i,o)}return{min:t,max:i}}function rr(e,t,i){var n=h$18.center(t,new o$1p);n.height=i,n=a$18.toCartesian(n);var r=o$1p.distance(e[0],e[1])/90,o=[];for(let t=0;t<e.length;t++){var a=new o$1p,s=o$1p.subtract(e[t],n,new o$1p);o$1p.normalize(s,s),o$1p.multiplyComponents(s,new o$1p(r,r,r),a),o$1p.subtract(e[t],a,a);var l=a$18.fromCartesian(a),u=e$2a.toDegrees(l.longitude),c=e$2a.toDegrees(l.latitude);o.push(u),o.push(c),o.push(l.height)}return o}function tr$1(e,t){var i=e.mapProjection,n=i.ellipsoid,r=new o$1p,o=new a$18;return n.cartesianToCartographic(t,o),i.project(o,r),o$1p.fromElements(r.z,r.x,r.y)}function he$5(e,t){if(!e$2b(t._surface)||!e$2b(t._surface._tileProvider))return!1;var i=t._surface._tileProvider;if(e$2b(t._slopeSetting)&&i._modifyRegions.values.length>0)return!1;var n=t._surface._levelZeroTiles;if(!e$2b(n))return!1;var r,o,a=n.length;for(o=0;o<a&&(r=n[o],!h$18.contains(r.rectangle,e));++o);if(o>=a)return!1;for(;r._lastSelectionResult===D$J.REFINED;)r=F$c(r.southwestChild,e)||F$c(r.southeastChild,e)||F$c(r.northwestChild,e)||r.northeastChild;for(var s=r.data,l=s.normalTexture,u=s.terrainData.normalTexture;!(u||(r=r.parent,u=r.data.terrainData.normalTexture,l=r.data.normalTexture,r.level<10)););if(!e$2b(u)||!e$2b(l))return!1;var c=parseInt((e.longitude-r.rectangle.west)/(r.rectangle.east-r.rectangle.west)*l.width)+parseInt((r.rectangle.north-e.latitude)/(r.rectangle.north-r.rectangle.south)*l.height)*l.width,h=new o$1p;return h.x=2*(u[3*c]/255-.5),h.y=2*(u[3*c+1]/255-.5),h.z=2*(u[3*c+2]/255-.5),o$1p.normalize(h,h),h}function a$a(){this._colorTexture=void 0,this._depthStencilTexture=void 0,this._globeDepthTexture=void 0,this._tempGlobeDepthTexture=void 0,this._tempCopyDepthTexture=void 0,this._colorRenderBuffer=void 0,this._depthStencilRenderbuffer=void 0,this._copyDepthFramebuffer=void 0,this._tempCopyDepthFramebuffer=void 0,this._updateDepthFramebuffer=void 0,this._framebufferWithTexture=void 0,this._framebufferWithRenderbuffer=void 0,this._isMSAA=!1,this._clearColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._viewport=new f$18,this._rs=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useLogDepth=void 0,this._useHdr=void 0,this._debugGlobeDepthViewportCommand=void 0,this._numSamples=1}function O$a(e,t,i,n){if(!e$2b(e._debugGlobeDepthViewportCommand)||n!==e._useLogDepth){var r=new s$U({defines:[n?"LOG_DEPTH":""],sources:["uniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float z_window = czm_unpackDepth(texture2D(u_depthTexture, v_textureCoordinates));\n z_window = czm_reverseLogDepth(z_window); \n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]});e._debugGlobeDepthViewportCommand=t.createViewportQuadCommand(r,{shaderProgramName:"debugGlobeDepth",uniformMap:{u_depthTexture:function(){return e._globeDepthTexture}},owner:e}),e._useLogDepth=n}e._debugGlobeDepthViewportCommand.execute(t,i)}function M$e(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&!e._depthStencilTexture.isDestroyed()&&e._depthStencilTexture.destroy(),e._globeDepthTexture=e._globeDepthTexture&&!e._globeDepthTexture.isDestroyed()&&e._globeDepthTexture.destroy()}function U$d(e){e._colorRenderBuffer=e._colorRenderBuffer&&!e._colorRenderBuffer.isDestroyed()&&e._colorRenderBuffer.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&!e._depthStencilRenderbuffer.isDestroyed()&&e._depthStencilRenderbuffer.destroy()}function N$8(e){e._framebufferWithTexture=e._framebufferWithTexture&&!e._framebufferWithTexture.isDestroyed()&&e._framebufferWithTexture.destroy(),e._framebufferWithRenderbuffer=e._framebufferWithRenderbuffer&&!e._framebufferWithRenderbuffer.isDestroyed()&&e._framebufferWithRenderbuffer.destroy(),e._copyDepthFramebuffer=e._copyDepthFramebuffer&&!e._copyDepthFramebuffer.isDestroyed()&&e._copyDepthFramebuffer.destroy()}function l$e(e){e._tempCopyDepthFramebuffer=e._tempCopyDepthFramebuffer&&!e._tempCopyDepthFramebuffer.isDestroyed()&&e._tempCopyDepthFramebuffer.destroy(),e._updateDepthFramebuffer=e._updateDepthFramebuffer&&!e._updateDepthFramebuffer.isDestroyed()&&e._updateDepthFramebuffer.destroy(),e._tempGlobeDepthTexture=e._tempGlobeDepthTexture&&!e._tempGlobeDepthTexture.isDestroyed()&&e._tempGlobeDepthTexture.destroy()}function W$f(e,t,i,n,r){e._tempGlobeDepthTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}),e._tempCopyDepthFramebuffer=new t$W({context:t,colorTextures:[e._tempGlobeDepthTexture],destroyAttachments:!1}),r.framebuffer.depthStencilTexture,e._isMSAA&&e._depthStencilTexture,e._updateDepthFramebuffer=new t$W({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}function z$b(e,t,i,n,r,o){var a=o?t.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT:_$$.UNSIGNED_BYTE;e._colorTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:a,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST}),samples:r}),e._depthStencilTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8,samples:r}),e._globeDepthTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})}function I$a(e,t,i,n,r,o){if(!e._isMSAA)return;var a=o?t.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT:_$$.UNSIGNED_BYTE;const s=M$13.getColorFormat(a);e._colorRenderBuffer=new r$$({context:t,width:i,height:n,pixelDatatype:a,format:s,samples:r}),e._depthStencilRenderbuffer=new r$$({context:t,width:i,height:n,format:M$13.DEPTH_STENCIL,samples:r})}function V$c(e,t){e._isMSAA&&(e._framebufferWithRenderbuffer=new t$W({context:t,colorRenderbuffers:[e._colorRenderBuffer],depthStencilRenderbuffer:e._depthStencilRenderbuffer,destroyAttachments:!1})),e._framebufferWithTexture=new t$W({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._copyDepthFramebuffer=new t$W({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}function H$f(e,t,i,n,r,o){!t.webgpu&&r>1&&(e._isMSAA=!0);var a=e._colorTexture,s=!e$2b(a)||a.width!==i||a.height!==n||o!==e._useHdr||r!==e._numSamples;(!e$2b(e._framebufferWithTexture)||s)&&(M$e(e),N$8(e),z$b(e,t,i,n,r,o),I$a(e,t,i,n,r,o),V$c(e,t))}function w$b(e,t,i,n,r){e._viewport.width=i,e._viewport.height=n;var o=!f$18.equals(e._viewport,r.viewport),a=o!==e._useScissorTest;e._useScissorTest=o,f$18.equals(e._scissorRectangle,r.viewport)||(e._scissorRectangle=f$18.clone(r.viewport,e._scissorRectangle),a=!0),(!e$2b(e._rs)||!f$18.equals(e._viewport,e._rs.viewport)||a)&&(e._rs=d$1m.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsUpdate=d$1m.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!1,frontFunction:m$X.EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.KEEP},backFunction:m$X.NEVER,reference:u$N.CESIUM_3D_TILE_MASK,mask:u$N.CESIUM_3D_TILE_MASK}})),e$2b(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(t.webgpu?C$14:v$O,{shaderProgramName:"copyDepthGlobeDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e._depthStencilTexture}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer,e._copyDepthCommand.renderState=e._rs,e$2b(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(ie$6,{shaderProgramName:"copyColorGlobeDepth",uniformMap:{colorTexture:function(){return e._colorTexture}},owner:e})),e$2b(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(t.webgpu?C$14:v$O,{shaderProgramName:"tempCopyDepthGlobeDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer,e._tempCopyDepthCommand.renderState=e._rs,e$2b(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(ie$6,{shaderProgramName:"updateDepthGlobeDepth",uniformMap:{colorTexture:function(){return e._tempGlobeDepthTexture}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer,e._updateDepthCommand.renderState=e._rsUpdate,e$2b(e._clearColorCommand)||(e._clearColorCommand=new t$X({color:new e$1U(0,0,0,0),stencil:0,owner:e})),e._isMSAA?e._clearColorCommand.framebuffer=e._framebufferWithRenderbuffer:e._clearColorCommand.framebuffer=e._framebufferWithTexture}function p$8(){this._framebuffer=new s$g({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new s$g,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new f$18,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}function C$d(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function S$a(e,t,i,n,r){const o=r?t.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT:_$$.UNSIGNED_BYTE;e._framebuffer.update(t,i,n,1,o),e._packedDepthFramebuffer.update(t,i,n)}function k$9(e,t,i,n,r){e._viewport.width=i,e._viewport.height=n;const o=!f$18.equals(e._viewport,r.viewport);let a=o!==e._useScissorTest;e._useScissorTest=o,f$18.equals(e._scissorRectangle,r.viewport)||(e._scissorRectangle=f$18.clone(r.viewport,e._scissorRectangle),a=!0),(!e$2b(e._renderState)||!f$18.equals(e._viewport,e._renderState.viewport)||a)&&(e._renderState=d$1m.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),e$2b(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(t.webgpu?C$14:v$O,{shaderProgramName:"globeTranslucency_packedDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),e$2b(e._clearCommand)||(e._clearCommand=new t$X({color:new e$1U(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer.framebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e.classificationFramebuffer,e._clearCommand.renderState=e._renderState}h$d.prototype.getHeight=function(e){if(!e$2b(e))throw new t$16("cartographic is required");var t=this._surface._levelZeroTiles;if(e$2b(t)){var i,n,r=t.length;for(n=0;n<r&&(i=t[n],!h$18.contains(i.rectangle,e));++n);if(!(n>=r)){for(;i._lastSelectionResult===D$J.REFINED;)i=F$c(i.southwestChild,e)||F$c(i.southeastChild,e)||F$c(i.northwestChild,e)||i.northeastChild;if(e$2b(i.data)&&e$2b(i.data.renderedMesh)){var o=this._surface._tileProvider.tilingScheme.ellipsoid,a=o$1p.fromRadians(e.longitude,e.latitude,0,o,Je$2),s=er,l=o.geodeticSurfaceNormal(a,s.direction);if(!e$2b(o.getSurfaceNormalIntersectionWithZAxis(a,11500,s.origin))){var u=Math.min(u$_(i.data.minimumHeight,0),-11500),c=o$1p.multiplyByScalar(l,Math.abs(u)+1,ue$6);o$1p.subtract(a,c,s.origin)}if(e$2b(i.data.terrainData)&&i.data.terrainData instanceof p$O)return i.data.terrainData.interpolateHeight(i.rectangle,e.longitude,e.latitude);var h=i.data.pick(s,void 0,void 0,!1,ue$6);if(e$2b(h))return o.cartesianToCartographic(h,$e$2).height}}}},h$d.prototype.update=function(e){!this.show||(e.passes.render&&this._surface.update(e),e.rasterVectorCollection=this._rasterVectorCollection,this.computeGlobeBottomLevel(e))},h$d.prototype.computeGlobeBottomLevel=function(e){for(var t=e.camera.frustum.fov,i=512/Math.tan(.5*t),n=e.camera.position,r=new a$18.fromCartesian(n),o=new o$1p.fromRadians(r.longitude,r.latitude,0),a=i/o$1p.distance(n,o),s=0,l=0;l<22;l++){var u=1<<l,c=Math.PI/u,h=o$1p.fromRadians(r.longitude+.5*c,r.latitude+.5*c),d=o$1p.fromRadians(r.longitude+.5*c,r.latitude-.5*c),f=o$1p.fromRadians(r.longitude-.5*c,r.latitude-.5*c),p=o$1p.fromRadians(r.longitude-.5*c,r.latitude+.5*c),_=o$1p.distance(h,d),m=o$1p.distance(d,f),g=o$1p.distance(f,p),x=o$1p.distance(p,h);if(Math.max(Math.max(Math.max(_,m),g),x)/8*a<32||21==l){s=l;break}}e.globeBottomLevel=s},h$d.prototype.beginFrame=function(e){var t=this._surface,i=t.tileProvider,n=this.terrainProvider,r=this.showWaterEffect&&n.ready&&n.hasWaterMask;if(this._sceneMode=e.mode,r&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;var o=this._oceanNormalMapResource,a=o.url;if(e$2b(a)){var s=this;o$1l(o.fetchImage(),(function(t){a===s._oceanNormalMapResource.url&&(s._oceanNormalMap=s._oceanNormalMap&&s._oceanNormalMap.destroy(),s._oceanNormalMap=new t$V({context:e.context,source:t}))}))}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}var l=e.passes,u=e.mode;l.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,t.tileCacheSizeForMVT=this.tileCacheSizeForMVT,t.loadingDescendantLimit=this.loadingDescendantLimit,t.preloadAncestors=this.preloadAncestors,t.preloadSiblings=this.preloadSiblings,i.terrainProvider=this.terrainProvider,i.lightingFadeOutDistance=this.lightingFadeOutDistance,i.lightingFadeInDistance=this.lightingFadeInDistance,i.nightFadeOutDistance=this.nightFadeOutDistance,i.nightFadeInDistance=this.nightFadeInDistance,i.zoomedOutOceanSpecularIntensity=u===C$13.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,i.hasWaterMask=r,i.oceanNormalMap=this._oceanNormalMap,i.enableLighting=this.enableLighting,i.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,i.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,i.showGroundAtmosphere=this.showGroundAtmosphere,i.shadows=this.shadows,i.hueShift=this.atmosphereHueShift,i.saturationShift=this.atmosphereSaturationShift,i.brightnessShift=this.atmosphereBrightnessShift,i.fillHighlightColor=this.fillHighlightColor,i.showSkirts=this.showSkirts,i.backFaceCulling=this.backFaceCulling,i.clippingType=this.clippingType,i.showExcavationSide=this.showExcavationSide,i.excavationNormalTextureUrl=this._excavationNormalTextureUrl,i.excavationSideNormalTextureUrl=this._excavationSideNormalTextureUrl,t.beginFrame(e))},h$d.prototype.render=function(e){if(this.show){e$2b(this._material)&&this._material.update(e.context);var t=this._surface,i=e.passes;i.render&&t.render(e),i.pick&&t.render(e)}},h$d.prototype.endFrame=function(e){!this.show||e.passes.render&&this._surface.endFrame(e)},h$d.prototype.isDestroyed=function(){return!1},h$d.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),i$10(this)},h$d.prototype.addModifyRegion=function(e){var t=e.name,i=e.position;if(!e$2b(t)||!e$2b(i))return!1;var n=this._surface._tileProvider;if(n._modifyRegions.contains(t))return!1;var r=me$6(i),o=r.min,a=r.max,s=o$1p.fromDegreesArrayHeights(i),l=z$_.createGeometry(new z$_({polygonHierarchy:{positions:s},extrudedHeight:Math.min(-1e3,o),perPositionHeight:!0})),u=z$_.createGeometry(new z$_({polygonHierarchy:{positions:s},perPositionHeight:!0})),c=h$18.fromCartesianArray(s),h={geometry:l,worldGeometry:u,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),rectangle:c,minimumHeight:Math.min(-1e3,o),maximumHeight:a,command:void 0};return n._modifyRegions.set(t,h),n._modifyRegionUpdate=!0,!0},h$d.prototype.removeModifyRegion=function(e){var t=this._surface._tileProvider,i=t._modifyRegions;if(i.contains(e)){var n=i.get(e);e$2b(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),n.command=void 0,t._modifyRegions.remove(e),t._modifyRegionUpdate=!0}},h$d.prototype.removeAllModifyRegion=function(){for(var e=this._surface._tileProvider,t=Object.keys(e._modifyRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeModifyRegion(r)}e._modifyRegions.removeAll()},h$d.prototype.addExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(!e$2b(t)||!e$2b(i)||!e$2b(n))return!1;var r=this._surface._tileProvider;if(r._excavateRegions.contains(t))return!1;var o=i.length;i.length/3%2!=0&&(i.push(i[o-1-2]),i.push(i[o-1-1]),i.push(i[o-1]));for(var a=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),s=Number.MAX_VALUE,l=0,u=i.length;l<u;l+=3)s=Math.min(s,i[l+2]);var c=z$_.createGeometry(a),h=z$_.createGeometry(a),d=z$_.createGeometry(a),f=o$1p.fromDegreesArrayHeights(i),p={rectangle:h$18.fromCartesianArray(f),geometry:c,worldGeometry:h,colorGeometry:d,positions:i,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),command:void 0,name:t,height:s-n};return r._excavateRegions.set(t,p),r._excavateRegionUpdate=!0,r._excavateTransparent=u$_(e.transparent,!0),r._excavateTextureWrap=u$_(e.textureWrap,q$19.REPEAT),r._excavateExtendHeight=n,!0},h$d.prototype.removeExcavationRegion=function(e){var t=this._surface._tileProvider,i=t._excavateRegions;if(i.contains(e)){t._removeExcavationCommands(e);var n=i.get(e);e$2b(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),e$2b(n.removeListenerFunc)&&n.removeListenerFunc(),n.command=void 0,i.remove(e),0===i.length&&(t._onceExcavateRegionsEmpty=!0),t._excavateRegionUpdate=!0}},h$d.prototype.removeAllExcavationRegion=function(){var e=this._surface._tileProvider;e._removeAllExcavationCommands();for(var t=Object.keys(e._excavateRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeExcavationRegion(r)}e._excavateRegions.removeAll()},h$d.prototype.addExtractRegion=function(e){var t=e.name,i=e.position,n=e.height,r=u$_(e.extractHeight,100),o=u$_(e.granularity,1);if(!e$2b(t)||!e$2b(i)||!e$2b(n))return!1;var a=this._surface._tileProvider;if(a._extractRegions.contains(t))return!1;var s=1,l=[],u=o$1p.fromDegreesArrayHeights(i);let c=[...u,u[0]];for(let e=1;e<c.length;e++){s+=o$1p.distance(c[e-1],c[e]),l.push(s)}var h=i.length;i.length/3%2!=0&&(i.push(i[h-1-2]),i.push(i[h-1-1]),i.push(i[h-1]));var d=me$6(i),f=d.min,p=d.max;p+=r;var _=o$1p.fromDegreesArrayHeights(i),m=h$18.fromCartesianArray(_),g=Math.PI/Math.pow(2,11);g=g/64*o;var x=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)},granularity:g});i=rr(_,m,p);var v=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),y={rectangle:m,geometry:z$_.createGeometry(v),geometry_extract:z$_.createGeometry(x),colorGeometry:z$_.createGeometry(v),worldGeometry:z$_.createGeometry(v),positions:i,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),command:void 0,name:t,height:f-n,minimumHeight:Math.min(0,f),maximumHeight:p,sideLengths:l,round:s};return a._extractRegions.set(t,y),a._extractRegionsUpdate=!0,a._extractTransparent=u$_(e.transparent,!0),a._extractTextureWrap=u$_(e.textureWrap,q$19.REPEAT),a._extractExtendHeight=r,a._excavateTransparent=u$_(e.transparent,!0),a._excavateTextureWrap=u$_(e.textureWrap,q$19.REPEAT),!0},h$d.prototype.removeExtractRegion=function(e){var t=this._surface._tileProvider,i=t._extractRegions;if(i.contains(e)){t._removeExtractCommands(e);var n=i.get(e);e$2b(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),n.command=void 0,i.remove(e),0===i.length&&(t._onceExcavateRegionsEmpty=!0),t._extractRegionsUpdate=!0,n.command=void 0,t._modifyRegions.remove(e),t._modifyRegionUpdate=!0,t._extractExtendHeight=void 0}},h$d.prototype.removeAllExtractRegion=function(){var e=this._surface._tileProvider;e._removeAllExtractCommands();for(var t=Object.keys(e._extractRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeExtractRegion(r)}e._extractRegions.removeAll(),e._extractExtendHeight=void 0},h$d.prototype.addImageryClipRegions=function(e){var t=e.name,i=e.position;if(e$2b(t)&&e$2b(i)&&e$2b(e.layers)){var n=this._surface._tileProvider;if(n._imageryClipRegions.contains(t))return!1;for(var r=new z$_({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),o=z$_.createGeometry(r),a=z$_.createGeometry(r),s=o$1p.fromDegreesArrayHeights(i),l={rectangle:h$18.fromCartesianArray(s),geometry:o,worldGeometry:a,positions:i,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),command:void 0,name:t},u=0,c=e.layers.length;u<c;u++)e.layers[u].enableImageryClip=!0;n._imageryClipRegions.set(t,l),n._imageryClipRegionUpate=!0}},h$d.prototype.removeImageryClipRegion=function(e,t){var i=this._surface._tileProvider,n=i._imageryClipRegions;if(n.contains(e)){var r=n.get(e);if(e$2b(r.command)&&(r.command.vertexArray=r.command.vertexArray&&!r.command.vertexArray.isDestroyed()&&r.command.vertexArray.destroy(),r.command.shaderProgram=r.command.shaderProgram&&!r.command.shaderProgram.isDestroyed()&&r.command.shaderProgram.destroy()),r.command=void 0,n.remove(e),0===n.length){for(var o=0,a=t.length;o<a;o++)t[o].enableImageryClip=!1;i._onceImageryClipRegionsEmpty=!0}i._imageryClipRegionUpate=!0}},h$d.prototype.clearCustomClipBox=function(){this.clippingPlanes=void 0},h$d.prototype.setCustomClipBox=function(e){if(!(e.dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$16("globe box clip, position and dimensions is required!");if(e.dimensions){var t,i=e.position,n=new i$15(e$2b(e.heading)?e.heading:0,e$2b(e.pitch)?e.pitch:0,e$2b(e.roll)?e.roll:0);if(this._sceneMode===C$13.SCENE3D)t=m$17.headingPitchRollToFixedFrame(i,n,t$13.WGS84,m$17.eastNorthUpToFixedFrame,new p$1d);else{var r=tr$1(this._scene,i);t=p$1d.setTranslation(p$1d.clone(p$1d.IDENTITY),r,new p$1d)}var o=-.5*e.dimensions.x,a=-.5*e.dimensions.y,s=-.5*e.dimensions.z;e$2b(e.clipLineColor)?e.clipLineColor:e$1U.WHITE;var l=[new a$I(new o$1p(1,0,0),o),new a$I(new o$1p(-1,0,0),o),new a$I(new o$1p(0,1,0),a),new a$I(new o$1p(0,-1,0),a),new a$I(new o$1p(0,0,1),s),new a$I(new o$1p(0,0,-1),s)]}else{l=[];for(var u=0;u<e.planePos.length;u++){var c=e.planePos[u],h=e.planeNormal[u],d=-o$1p.dot(h,c);l.push(new a$I(h,d))}}return this.clippingPlanes=new h$K({modelMatrix:t,planes:l,edgeWidth:1,edgeColor:e$1U.WHITE,unionClippingRegions:!e$2b(e.dimensions),enabled:!0}),!0},h$d.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._surface._tileProvider._polygonOffset.enabled=!0,o$1o.fromElements(e,t,this._surface._tileProvider._polygonOffset.value)):(this._surface._tileProvider._polygonOffset.enabled=!1,o$1o.fromElements(0,0,this._surface._tileProvider._polygonOffset.value))},h$d.prototype.hasTerrainAnalysis=function(){if(!e$2b(this._surface)||!e$2b(this._surface._tileProvider))return!1;var e=this._surface._tileProvider;return!!(e$2b(e._excavateRegions)&&e._excavateRegions.values.length>0||e$2b(e._modifyRegions)&&e._modifyRegions.values.length>0||e$2b(e._hypsometricSetting)&&e._hypsometricSetting.CoverageArea.length>0||e$2b(e._slopeSetting)&&e._slopeSetting.CoverageArea.length>0)},h$d.prototype.getSlopeValue=function(e){var t=he$5(e,this);return t?Math.acos(Math.abs(t.z))*e$2a.DEGREES_PER_RADIAN:0},h$d.prototype.getSlopeDirectionValue=function(e){var t=he$5(e,this);if(!t)return 0;t.z=0;var i=o$1p.angleBetween(t,o$1p.UNIT_Y);return i=i/e$2a.PI*180,i=o$1p.dot(t,o$1p.UNIT_X)<0?360-i:i},h$d.prototype.setPBRMaterialFromJSON=function(e){if(LicenseChecker.LICENSECHECKER.verify("Globe_setPBRMaterial"),this._surface.tileProvider._pbrParameter===je$g.NONE){var t=this;u$Q(e).then((function(e){var i=e.material,n=i.pbrMetallicRoughness;i.textureunitstates,t._surface.tileProvider._PBRMaterialParams.baseColorFactor=e$2b(n.baseColor)?e$29.fromElements(n.baseColor.x,n.baseColor.y,n.baseColor.z,n.baseColor.w):t._surface.tileProvider._PBRMaterialParams.baseColorFactor,t._surface.tileProvider._PBRMaterialParams.baseColorTextureIndex=e$2b(n.baseColorTextureIndex)?n.baseColorTextureIndex:t._surface.tileProvider._PBRMaterialParams.baseColorTextureIndex,t._surface.tileProvider._PBRMaterialParams.emissionFactor=e$2b(n.emissiveFactor)?o$1p.fromElements(n.emissiveFactor.x,n.emissiveFactor.y,n.emissiveFactor.z):t._surface.tileProvider._PBRMaterialParams.emissionFactor,t._surface.tileProvider._PBRMaterialParams.emissionTextureIndex=e$2b(n.emissiveTextureIndex)?n.emissiveTextureIndex:-1,t._surface.tileProvider._PBRMaterialParams.metallic=e$2b(n.metallicFactor)?n.metallicFactor:t._surface.tileProvider._PBRMaterialParams.metallic,t._surface.tileProvider._PBRMaterialParams.roughness=e$2b(n.roughnessFactor)?n.roughnessFactor:t._surface.tileProvider._PBRMaterialParams.roughness,t._surface.tileProvider._PBRMaterialParams.occlusionTextureIndex=e$2b(n.occlusionTextureIndex)?n.occlusionTextureIndex:-1,t._surface.tileProvider._PBRMaterialParams.normalTextureIndex=e$2b(n.normalTextureIndex)?n.normalTextureIndex:-1}))}},h$d.prototype.removePBRMaterial=function(){this._surface.tileProvider._PBRMaterialParams={metallic:0,roughness:0,baseColorFactor:new e$29(1,1,1,1),baseColorTextureIndex:-1,emissionFactor:o$1p.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1}},h$d.prototype._setFloodTexture=function(e,t){this._floodFlagTexture=e,this._floodRect=t},h$d.prototype._removeFloodTexture=function(){this._floodFlagTexture=void 0,this._floodRect=void 0},h$d.prototype.removeRasterRegions=function(){var e=this._surface._tileProvider,t=e._clipRasterTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1}e._clipRasterTilesMap={}},Object.defineProperties(a$a.prototype,{framebuffer:{get:function(){return this._isMSAA?this._framebufferWithRenderbuffer:this._framebufferWithTexture}},framebufferWithTexture:{get:function(){return this._framebufferWithTexture}},depthStencilTexture:{get:function(){return this._depthStencilTexture}}}),a$a.prototype.executeDebugGlobeDepth=function(e,t,i){O$a(this,e,t,i)},a$a.prototype.update=function(e,t,i,n,r){var o=i.width,a=i.height;H$f(this,e,o,a,n,r),w$b(this,e,o,a,t),e.uniformState.globeDepthTexture=void 0,this._numSamples=n,this._useHdr=r},a$a.prototype.executeCopyDepth=function(e,t){e$2b(this._copyDepthCommand)&&(this.prepareColorTextures(e,!1),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture)},a$a.prototype.executeUpdateDepth=function(e,t,i){var n=t.framebuffer.depthStencilTexture;if(!e$2b(n)||!i&&n===this._depthStencilTexture)if(this._isMSAA&&i){if(e$2b(this._updateDepthCommand)){if(!e$2b(this._updateDepthFramebuffer)||this._updateDepthFramebuffer.getColorTexture(0)!==this._globeDepthTexture){r=this._globeDepthTexture.width,o=this._globeDepthTexture.height;l$e(this),W$f(this,e,r,o,t),w$b(this,e,r,o,t)}this.prepareColorTextures(e,!1),this._tempCopyDepthTexture=this._depthStencilTexture,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture}}else e$2b(this._copyDepthCommand)&&(this.prepareColorTextures(e,!1),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture);else if(e$2b(this._updateDepthCommand)){if(!e$2b(this._updateDepthFramebuffer)||this._updateDepthFramebuffer.getColorTexture(0)!==this._globeDepthTexture){var r=this._globeDepthTexture.width,o=this._globeDepthTexture.height;l$e(this),W$f(this,e,r,o,t),w$b(this,e,r,o,t)}this._tempCopyDepthTexture=n,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture}},a$a.prototype.executeCopyColor=function(e,t){e$2b(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)},a$a.prototype.prepareColorTextures=function(e,t){this._numSamples>1&&t$W.blitFramebuffers(e,this._framebufferWithRenderbuffer,this._framebufferWithTexture,t)},a$a.prototype.clear=function(e,t,i){var n=this._clearColorCommand;e$2b(n)&&(e$1U.clone(i,n.color),n.execute(e,t))},a$a.prototype.isDestroyed=function(){return!1},a$a.prototype.destroy=function(){M$e(this),U$d(this),N$8(this),l$e(this),e$2b(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),e$2b(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy());var e=this._debugGlobeDepthViewportCommand;return e$2b(e)&&(e.shaderProgram=e.shaderProgram.destroy()),i$10(this)},Object.defineProperties(p$8.prototype,{classificationTexture:{get:function(){return this._framebuffer.getColorTexture()}},classificationFramebuffer:{get:function(){return this._framebuffer.framebuffer}},packedDepthFramebuffer:{get:function(){return this._packedDepthFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._framebuffer.getDepthStencilTexture()}},depthStencilRenderbuffer:{get:function(){return this._framebuffer.getDepthStencilRenderbuffer()}},packedDepthTexture:{get:function(){return this._packedDepthFramebuffer.getColorTexture()}}}),p$8.prototype.updateAndClear=function(e,t,i,n){const r=t.width,o=t.height;S$a(this,i,r,o,e),k$9(this,i,r,o,n),this._useHdr=e},p$8.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)},p$8.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture},p$8.prototype.isDestroyed=function(){return!1},p$8.prototype.destroy=function(){return C$d(this),i$10(this)};const u$c={OPAQUE_FRONT_FACE:0,OPAQUE_BACK_FACE:1,DEPTH_ONLY_FRONT_FACE:2,DEPTH_ONLY_BACK_FACE:3,DEPTH_ONLY_FRONT_AND_BACK_FACE:4,TRANSLUCENT_FRONT_FACE:5,TRANSLUCENT_BACK_FACE:6,TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:7,TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:8,PICK_FRONT_FACE:9,PICK_BACK_FACE:10,DERIVED_COMMANDS_MAXIMUM_LENGTH:11},p$7=u$c.DERIVED_COMMANDS_MAXIMUM_LENGTH,q$b=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function F$b(){this._frontFaceAlphaByDistance=new o$Y(0,1,0,1),this._backFaceAlphaByDistance=new o$Y(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=h$18.clone(h$18.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(p$7),this._derivedBlendCommandTypes=new Array(p$7),this._derivedPickCommandTypes=new Array(p$7),this._derivedCommandTypesToUpdate=new Array(p$7),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}function z$a(e,t,i,n){return e?e$2b(i)?(o$Y.clone(i,n),n.nearValue*=t,n.farValue*=t,n):(n.nearValue=t,n.farValue=t,n):(n.nearValue=1,n.farValue=1,n)}function Y$7(e,t,i){return e&&(i.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function se$4(e,t){const i=e._frontFaceTranslucent,n=e._backFaceTranslucent;return i&&(t.cameraUnderground||n)}function le$7(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function ue$5(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function me$5(e,t,i){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!i.depthTestAgainstTerrain&&t.mode!==C$13.SCENE2D&&t.context.depthTexture}function fe$3(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function he$4(e,t){e._derivedCommandsLength=U$c(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=U$c(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=U$c(e,t,!1,!0,e._derivedPickCommandTypes);let i,n=0;for(i=0;i<e._derivedCommandsLength;++i)n|=1<<e._derivedCommandTypes[i];for(i=0;i<e._derivedBlendCommandsLength;++i)n|=1<<e._derivedBlendCommandTypes[i];for(i=0;i<e._derivedPickCommandsLength;++i)n|=1<<e._derivedPickCommandTypes[i];let r=0;for(i=0;i<p$7;++i)(n&1<<i)>0&&(e._derivedCommandTypesToUpdate[r++]=i);e._derivedCommandsToUpdateLength=r;const o=n!==e._derivedCommandKey;e._derivedCommandKey=n,e._derivedCommandsDirty=o,!e$2b(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=Se$3())}function U$c(e,t,i,n,r){let o=0;const a=e._frontFaceTranslucent,s=e._backFaceTranslucent;if(!a)return o;const l=t.cameraUnderground,u=e._requiresManualDepthTest,c=n?u$c.PICK_FRONT_FACE:u?u$c.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:u$c.TRANSLUCENT_FRONT_FACE,h=n?u$c.PICK_BACK_FACE:u?u$c.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:u$c.TRANSLUCENT_BACK_FACE;return t.mode===C$13.SCENE2D?(r[o++]=u$c.DEPTH_ONLY_FRONT_FACE,r[o++]=c,o):(s?(i||(r[o++]=u$c.DEPTH_ONLY_FRONT_AND_BACK_FACE),l?(r[o++]=c,r[o++]=h):(r[o++]=h,r[o++]=c)):l?(i||(r[o++]=u$c.DEPTH_ONLY_BACK_FACE),r[o++]=u$c.OPAQUE_FRONT_FACE,r[o++]=h):(i||(r[o++]=u$c.DEPTH_ONLY_FRONT_FACE),r[o++]=u$c.OPAQUE_BACK_FACE,r[o++]=c),o)}function h$c(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}function Q$6(e,t){return e.indexOf(t)>-1}function _e$3(e,t){h$c(e.defines,"TRANSLUCENT"),h$c(t.defines,"TRANSLUCENT")}function Te$4(e,t){h$c(e.defines,"GROUND_ATMOSPHERE"),h$c(t.defines,"GROUND_ATMOSPHERE"),h$c(e.defines,"FOG"),h$c(t.defines,"FOG"),h$c(e.defines,"TRANSLUCENT"),h$c(t.defines,"TRANSLUCENT")}function M$d(e,t){if(Q$6(t.defines,"TILE_LIMIT_RECTANGLE")||Q$6(t.defines,"ENABLE_CLIPPING_PLANES"))return;t.sources=["void main() \n{ \n gl_FragColor = vec4(1.0); \n} \n"]}function B$8(e,t){const i=t.sources,n=i.length;for(let e=0;e<n;++e)i[e]=s$U.replaceMain(i[e],"czm_globe_translucency_main");i.push("\n\nuniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n#ifdef MANUAL_DEPTH_TEST \n float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st)); \n if (logDepthOrDepth != 0.0) \n { \n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); \n float depthEC = eyeCoordinate.z / eyeCoordinate.w; \n if (v_positionEC.z < depthEC) \n { \n discard; \n } \n } \n#endif \n czm_globe_translucency_main(); \n vec4 classificationColor = texture(u_classificationTexture, st); \n if (classificationColor.a > 0.0) \n { \n // Reverse premultiplication process to get the correct composited result of the classification primitives \n classificationColor.rgb /= classificationColor.a; \n } \n gl_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + gl_FragColor * (1.0 - classificationColor.a); \n} \n")}function X$8(e,t){B$8(e,t),h$c(e.defines,"GROUND_ATMOSPHERE"),h$c(t.defines,"GROUND_ATMOSPHERE"),h$c(e.defines,"FOG"),h$c(t.defines,"FOG")}function Ce$3(e,t){B$8(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function ge$6(e,t){X$8(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function j$b(e,t){t.sources=["uniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n vec4 pickColor = texture(u_classificationTexture, st); \n if (pickColor == vec4(0.0)) \n { \n discard; \n } \n gl_FragColor = pickColor; \n} \n"]}function pe$5(e,t,i,n,r,o){if(!e$2b(r))return t;if(!n&&e$2b(i))return i;let a=e.shaderCache.getDerivedShaderProgram(t,o);if(!e$2b(a)){const i=t._attributeLocations,n=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();n.defines=e$2b(n.defines)?n.defines.slice(0):[],s.defines=e$2b(s.defines)?s.defines.slice(0):[],r(n,s),a=e.shaderCache.createDerivedShaderProgram(t,o,{vertexShaderSource:n,fragmentShaderSource:s,attributeLocations:i})}return a}function Fe$4(e){e.cull.face=G$17.BACK,e.cull.enabled=!0}function Ae$5(e){e.cull.face=G$17.FRONT,e.cull.enabled=!0}function De$4(e){e.cull.face=G$17.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function Ee$5(e){e.cull.face=G$17.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function ye$3(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function J$6(e){e.cull.face=G$17.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=Ee$r.ALPHA_BLEND}function W$e(e){e.cull.face=G$17.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=Ee$r.ALPHA_BLEND}function ve$4(e){e.cull.face=G$17.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function Ne$3(e){e.cull.face=G$17.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function Oe$4(e,t,i,n,r){if(!e$2b(n))return e;if(!i&&e$2b(t))return t;let o=r[e.id];if(!e$2b(o)){const t=d$1m.getState(e);n(t),o=d$1m.fromCache(t),r[e.id]=o}return o}function E$b(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function be$3(e,t,i,n,r){return e$2b(r)?!n&&e$2b(i)?i:p$19(t,r(e),!1):t}function _$d(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function Se$3(){return[new _$d({pass:Le$s.GLOBE,pickOnly:!1,getShaderProgramFunction:_e$3,getRenderStateFunction:Fe$4,getUniformMapFunction:void 0}),new _$d({pass:Le$s.GLOBE,pickOnly:!1,getShaderProgramFunction:Te$4,getRenderStateFunction:Ae$5,getUniformMapFunction:void 0}),new _$d({pass:Le$s.GLOBE,pickOnly:!1,getShaderProgramFunction:M$d,getRenderStateFunction:De$4,getUniformMapFunction:void 0}),new _$d({pass:Le$s.GLOBE,pickOnly:!1,getShaderProgramFunction:M$d,getRenderStateFunction:Ee$5,getUniformMapFunction:void 0}),new _$d({pass:Le$s.GLOBE,pickOnly:!1,getShaderProgramFunction:M$d,getRenderStateFunction:ye$3,getUniformMapFunction:void 0}),new _$d({pass:Le$s.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:B$8,getRenderStateFunction:J$6,getUniformMapFunction:E$b}),new _$d({pass:Le$s.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:X$8,getRenderStateFunction:W$e,getUniformMapFunction:E$b}),new _$d({pass:Le$s.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Ce$3,getRenderStateFunction:J$6,getUniformMapFunction:E$b}),new _$d({pass:Le$s.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:ge$6,getRenderStateFunction:W$e,getUniformMapFunction:E$b}),new _$d({pass:Le$s.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:j$b,getRenderStateFunction:ve$4,getUniformMapFunction:E$b}),new _$d({pass:Le$s.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:j$b,getRenderStateFunction:Ne$3,getUniformMapFunction:E$b})]}Object.defineProperties(F$b.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}}),F$b.prototype.update=function(e){const t=e.globe;if(!e$2b(t)||!t.show)return this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,void(this._useDepthPlane=!1);this._frontFaceAlphaByDistance=z$a(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=z$a(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=Y$7(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=Y$7(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=me$5(this,e,t),this._sunVisibleThroughGlobe=se$4(this,e),this._environmentVisible=le$7(this,e),this._useDepthPlane=ue$5(this,e),this._numberOfTextureUniforms=fe$3(this),this._rectangle=h$18.clone(t.translucency.rectangle,this._rectangle),he$4(this,e)};const Z$a=new Array(p$7),$$a=new Array(p$7);function Pe$2(e,t,i,n,r,o,a){let s=t.derivedCommands.globeTranslucency;const l=e._derivedCommandsDirty;if(t.dirty||!e$2b(s)||l){t.dirty=!1,e$2b(s)||(s={},t.derivedCommands.globeTranslucency=s);const l=a.frameNumber,u=u$_(s.uniformMapDirtyFrame,0),c=u$_(s.shaderProgramDirtyFrame,0),h=u$_(s.renderStateDirtyFrame,0),d=s.uniformMap!==t.uniformMap,f=s.shaderProgramId!==t.shaderProgram.id,p=s.renderStateId!==t.renderState.id;d&&(s.uniformMapDirtyFrame=l),f&&(s.shaderProgramDirtyFrame=l),p&&(s.renderStateDirtyFrame=l),s.uniformMap=t.uniformMap,s.shaderProgramId=t.shaderProgram.id,s.renderStateId=t.renderState.id;for(let _=0;_<i;++_){const i=o[_],m=n[_],g=r[_];let x,v,y,$=s[g];e$2b($)?(x=$.uniformMap,v=$.shaderProgram,y=$.renderState):(x=void 0,v=void 0,y=void 0),$=i$_.shallowClone(t,$),s[g]=$;const b=u$_($.derivedCommands.uniformMapDirtyFrame,0),T=u$_($.derivedCommands.shaderProgramDirtyFrame,0),C=u$_($.derivedCommands.renderStateDirtyFrame,0),S=d||b<u,w=f||T<c,E=p||C<h;S&&($.derivedCommands.uniformMapDirtyFrame=l),w&&($.derivedCommands.shaderProgramDirtyFrame=l),E&&($.derivedCommands.renderStateDirtyFrame=l),$.derivedCommands.type=m,$.pass=i.pass,$.pickOnly=i.pickOnly,$.uniformMap=be$3(e,t.uniformMap,x,S,i.getUniformMapFunction),$.shaderProgram=pe$5(a.context,t.shaderProgram,v,w,i.getShaderProgramFunction,g),$.renderState=Oe$4(t.renderState,y,E,i.getRenderStateFunction,i.renderStateCache)}}}function ee$5(e,t,i,n,r,o,a){for(let s=0;s<t;++s){const t=e[s],l=t.derivedCommands.type;(!e$2b(a)||a.indexOf(l)>-1)&&i(t,n,r,o)}}function ne$6(e,t,i,n,r,o){for(let a=0;a<t;++a)i(e[a],n,r,o)}F$b.prototype.updateDerivedCommands=function(e,t){const i=this._derivedCommandTypesToUpdate,n=this._derivedCommandsToUpdateLength;if(0!==n){for(let e=0;e<n;++e)$$a[e]=this._derivedCommandPacks[i[e]],Z$a[e]=q$b[i[e]];Pe$2(this,e,n,i,Z$a,$$a,t)}},F$b.prototype.pushDerivedCommands=function(e,t,i){const n=i.passes.pick;if(n&&t)return;let r=this._derivedCommandTypes,o=this._derivedCommandsLength;if(n?(r=this._derivedPickCommandTypes,o=this._derivedPickCommandsLength):t&&(r=this._derivedBlendCommandTypes,o=this._derivedBlendCommandsLength),0===o)return void i.commandList.push(e);const a=e.derivedCommands.globeTranslucency;for(let e=0;e<o;++e){const t=q$b[r[e]];i.commandList.push(a[t])}};const Le$5=[u$c.OPAQUE_FRONT_FACE,u$c.OPAQUE_BACK_FACE],Re$4=[u$c.DEPTH_ONLY_FRONT_FACE,u$c.DEPTH_ONLY_BACK_FACE,u$c.DEPTH_ONLY_FRONT_AND_BACK_FACE];function v$b(){this._image=new Image}function h$b(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).url)&&!e$2b(e.metadata))throw new t$16("options.url or options.metadata is required.");var t;if(e$2b(e.metadata))t=e.metadata;else{var i=t$11.createIfNeeded(e.url);t=new c$F(i)}this._metadata=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new g$13({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new h$18(-e$2a.PI,-e$2a.PI,e$2a.PI,e$2a.PI),ellipsoid:e.ellipsoid});var n=e.credit;"string"==typeof n&&(n=new r$T(n)),this._credit=n,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,e$2b(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new v$b),this._errorEvent=new o$1h,this._ready=!1;var r,o=this;this._readyPromise=t.readyPromise.then((function(e){if(!t.imageryPresent){var i=new t$14("The server "+t.url+" doesn't have imagery");return r=l$W.handleError(r,o,o._errorEvent,i.message,void 0,void 0,void 0,i),o$1l.reject(i)}return l$W.handleSuccess(r),o._ready=e,e})).otherwise((function(e){return r=l$W.handleError(r,o,o._errorEvent,e.message,void 0,void 0,void 0,e),o$1l.reject(e)}))}function j$a(e,t,i,n,r,o){var a=c$F.tileXYToQuadKey(i,n,r),s=t.imageryVersion;return s=e$2b(s)&&s>0?s:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1-0"+a+"-i."+s.toString(),request:o})}function x$d(e){var t="JFIF";if(e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3))return"image/jpeg";var i="PNG";return e[1]===i.charCodeAt(0)&&e[2]===i.charCodeAt(1)&&e[3]===i.charCodeAt(2)?"image/png":void 0}function F$a(e){for(var t=R$B.Reader.create(e),i=t.len,n={};t.pos<i;){var r=t.uint32();switch(r>>>3){case 1:n.imageType=t.uint32();break;case 2:n.imageData=t.bytes();break;case 3:n.alphaType=t.uint32();break;case 4:n.imageAlpha=t.bytes();break;case 5:var o=n.copyrightIds;if(e$2b(o)||(o=n.copyrightIds=[]),2==(7&r))for(var a=t.uint32()+t.pos;t.pos<a;)o.push(t.uint32());else o.push(t.uint32());break;default:t.skipType(7&r)}}var s=n.imageType;if(e$2b(s))switch(s){case 0:n.imageType="image/jpeg";break;case 4:n.imageType="image/png";break;default:throw new t$14("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}var l=n.alphaType;return e$2b(l)&&0!==l&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete n.alphaType,delete n.imageAlpha),n}F$b.prototype.executeGlobeCommands=function(e,t,i,n,r){const o=n.context,a=e.commands[Le$s.GLOBE],s=e.indices[Le$s.GLOBE];0!==s&&(this._globeTranslucencyFramebuffer=i,i.clearClassification(o,r),ee$5(a,s,t,n,o,r,Le$5))},F$b.prototype.executeGlobeClassificationCommands=function(e,t,i,n,r){const o=n.context,a=e.commands[Le$s.GLOBE],s=e.indices[Le$s.GLOBE],l=e.commands[Le$s.TERRAIN_CLASSIFICATION],u=e.indices[Le$s.TERRAIN_CLASSIFICATION];if(0===s||0===u)return;const c=this._frontFaceTranslucent,h=this._backFaceTranslucent;if((!c||!h)&&ne$6(l,u,t,n,o,r),!c&&!h)return;this._globeTranslucencyFramebuffer=i;const d=o.uniformState.globeDepthTexture,f=r.framebuffer;if(r.framebuffer=i.classificationFramebuffer,ee$5(a,s,t,n,o,r,Re$4),o.depthTexture){const e=i.packDepth(o,r);o.uniformState.globeDepthTexture=e}ne$6(l,u,t,n,o,r),o.uniformState.globeDepthTexture=d,r.framebuffer=f},v$b.prototype.isReady=function(){return!0},v$b.prototype.shouldDiscardImage=function(e){return e===this._image},Object.defineProperties(h$b.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$16("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}}),h$b.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$16("getTileCredits must not be called before the imagery provider is ready.");var n=this._metadata,r=n.getTileInformation(e,t,i);if(e$2b(r)){var o=n.providers[r.imageryProvider];if(e$2b(o))return[o]}},h$b.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=this._tileDiscardPolicy._image,o=this._metadata,a=c$F.tileXYToQuadKey(e,t,i),s=o.getTileInformation(e,t,i);if(!e$2b(s)){if(o.isValid(a)){var l=new r$1b({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction});return void o.populateSubtree(e,t,i,l)}return r}if(!s.hasImagery())return r;var u=j$a(this,s,e,t,i,n).fetchArrayBuffer();return e$2b(u)?u.then((function(e){f$L(o.key,e);var t,i=new Uint8Array(e),n=o.protoImagery;if((!e$2b(n)||!n)&&(t=x$d(i)),!e$2b(t)&&(!e$2b(n)||n)){var a=F$a(i);t=a.imageType,i=a.imageData}return e$2b(t)&&e$2b(i)?w$Q({uint8Array:i,format:t,flipY:!0}):r})):void 0},h$b.prototype.pickFeatures=function(e,t,i,n,r){};var f$f=new e$1U(1,1,1,.4),m$d=new e$1U(0,1,0,.05),v$a=new e$1U(0,.5,0,.2);function o$g(e){e=u$_(e,u$_.EMPTY_OBJECT),this._tilingScheme=e$2b(e.tilingScheme)?e.tilingScheme:new g$13({ellipsoid:e.ellipsoid}),this._cells=u$_(e.cells,8),this._color=u$_(e.color,f$f),this._glowColor=u$_(e.glowColor,m$d),this._glowWidth=u$_(e.glowWidth,6),this._backgroundColor=u$_(e.backgroundColor,v$a),this._errorEvent=new o$1h,this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._canvasSize=u$_(e.canvasSize,256),this._canvas=this._createGridCanvas(),this._readyPromise=o$1l.resolve(!0)}Object.defineProperties(o$g.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),o$g.prototype._drawGrid=function(e){for(var t=this._canvasSize,i=0;i<=this._cells;++i){var n=1+i/this._cells*(t-1);e.moveTo(n,0),e.lineTo(n,t),e.moveTo(0,n),e.lineTo(t,n)}e.stroke()},o$g.prototype._createGridCanvas=function(){var e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;var t=this._canvasSize,i=e.getContext("2d"),n=this._backgroundColor.toCssColorString();i.fillStyle=n,i.fillRect(0,0,t,t);var r=this._glowColor.toCssColorString();i.strokeStyle=r,i.lineWidth=this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i),i.lineWidth=.5*this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i);var o=this._color.toCssColorString();return i.strokeStyle=o,i.lineWidth=2,i.strokeRect(0,0,t,t),i.lineWidth=1,this._drawGrid(i),e},o$g.prototype.getTileCredits=function(e,t,i){},o$g.prototype.requestImage=function(e,t,i,n){return this._canvas},o$g.prototype.pickFeatures=function(e,t,i,n,r){};var y$d={None:0,Attribute:1,Slope:2,Aspect:3};function w$a(e){e=u$_(e,{}),this._url=e.url+"/",this._useConfigFile=u$_(e.useConfigFile,!0),this._compressType="NONE",this._tilingScheme=void 0,this._rectangle=void 0,this._levels=[],this._maxCategory=90,this._minCategory=0,this._dataType=y$d.NONE;var t=e.credit;"string"==typeof t&&(t=new Credit(t)),this._credit=t,this._ready=!1,this._readyPromise=o$1l.defer();var i,n=u$_(e.ellipsoid,t$13.WGS84),r=this;function o(e){r._compressType=e.getElementsByTagName("sml:CompressType")[0].textContent;var t=e.getElementsByTagName("sml:Type")[0].textContent;"Slope"==t?r._dataType=y$d.Slope:"Aspect"==t?r._dataType=y$d.Aspect:"Attribute"==t&&(r._dataType=y$d.Attribute),r._cellWidth=parseInt(e.getElementsByTagName("sml:CellWidth")[0].textContent),r._cellHeight=parseInt(e.getElementsByTagName("sml:CellHeight")[0].textContent),r._maxCategory=parseInt(e.getElementsByTagName("sml:MaxHeight")[0].textContent),r._minCategory=parseInt(e.getElementsByTagName("sml:MinHeight")[0].textContent),r._tilingScheme=new g$13({ellipsoid:n}),r._tilingScheme.isSct=!0;var i=e.getElementsByTagName("sml:Bounds")[0],o=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Left")[0].textContent)),a=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Bottom")[0].textContent)),s=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Right")[0].textContent)),l=e$2a.toRadians(parseFloat(i.getElementsByTagName("sml:Top")[0].textContent));r._rectangle=new h$18(o,a,s,l);for(var u=e.getElementsByTagName("sml:Levels")[0].getElementsByTagName("sml:Level"),c=0;c<u.length;++c){var h=u[c];r._levels.push(parseInt(h.textContent))}r._ready=!0,r._readyPromise.resolve(!0)}function a(e){var t=u$_(e,"An error occurred while accessing "+r._url+".");i=TileProviderError.handleError(i,r,r._errorEvent,t,void 0,void 0,void 0,s),r._readyPromise.reject(new RuntimeError(t))}function s(){if(!e$2b(e.rectangle)||!e$2b(e.levels))throw new t$16("options.rectangles,options.levels is required.");r._compressType=u$_(e.compressType,"ZIP"),r._attType=y$d.SLOPE,r._cellWidth=u$_(e._cellWidth,32),r._cellHeight=u$_(e._cellHeight,32),r._maxCategory=u$_(e.maxCategory,90),r._minCategory=u$_(e.minCategory,0),r._tilingScheme=new g$13({ellipsoid:n}),r._rectangle=e.rectangle,r._levels=e.levels}this._useConfigFile?o$1l(d$1f(r._url+"config"),o,a):s(),this._styleEngine=new e$1r}Object.defineProperties(w$a.prototype,{url:{get:function(){return this._url}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$16("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},cellWidth:{get:function(){return this._cellWidth}},cellHeight:{get:function(){return this._cellHeight}},minLevel:{get:function(){return this._levels.length>0?Math.min(this._levels[0],this._levels[this._levels.length-1]):-1}},maxLevel:{get:function(){return this._levels.length>0?Math.max(this._levels[0],this._levels[this._levels.length-1]):-1}},minCategory:{get:function(){if(!this._ready)throw new t$16("minCategory must not be called before the grid provider is ready");return this._minCategory}},maxCategory:{get:function(){if(!this._ready)throw new t$16("maxCategory must not be called before the grid provider is ready");return this._maxCategory}}}),w$a.prototype.getTileCredits=function(e,t,i){};var W$d=new h$18;function R$d(e,t){var n,r;if(2===(n="ZIP"===e._compressType?nt$9.inflate(t).buffer:t[i]).byteLength/(e._cellWidth*e._cellHeight)){var o=new Int16Array(n,0,e._cellWidth*e._cellHeight);r=[];for(var a=0;a<o.length;a++)r.push(parseFloat(o[a]))}else r=new Float32Array(n,0,e._cellWidth*e._cellHeight);return r}function o$f(e){e=u$_(e,{}),this._height=this._width=u$_(e.quality,2048);var t=u$_(e.intensityRange,new o$1o(0,1));this._minIntensity=t.x,this._maxIntensity=t.y,this._context=e.context,this._bounds=e.bounds,this._fbIntensity=void 0,this._intensityCommand=void 0,this._heatMapCommand=void 0,this._sp=void 0,this._va=void 0,this._vertexSize=8,this._maxPointCount=1e4,this._pointCount=0,this._bufferIndex=0,this._vertexBufferData=new Float32Array(this._maxPointCount*this._vertexSize*6),this._vertexBufferViews=[];for(var i=this._maxPointCount,n=0;n<i;n++)this._vertexBufferViews.push(new Float32Array(this._vertexBufferData.buffer,0,n*this._vertexSize*6));this._clearCommand=new t$X({color:new e$1U(0,0,0,0)}),this._data=void 0,this._dataIndex=0,this._fbHeatMap=x$c(this._context,this._width,this._height,_$$.UNSIGNED_BYTE),this._clearCommand.framebuffer=this._fbHeatMap,this._clearCommand.execute(this._context),this._maxPerFrameDrawCount=5e3}function x$c(e,t,i,n){return new t$W({context:e,colorTextures:[new t$V({context:e,width:t,height:i,pixelDatatype:n})]})}function R$c(e,t){if(!e$2b(t._sp)){var i=new s$U({sources:[["attribute vec4 aPosition;","attribute vec4 aIntensity;","varying vec2 vOff;","varying vec2 vDim;","varying float vIntensity;","uniform vec4 uBounds;","void main()","{","vDim = abs(aPosition.zw);","vOff = aPosition.zw;","vec2 pos = aPosition.xy + aPosition.zw;","vIntensity = aIntensity.x;","gl_Position = vec4(((pos - uBounds.xy) / uBounds.zw) * 2.0 - 1.0, 0.0, 1.0);","}"].join("\n")]}),n=new s$U({sources:[["varying vec2 vOff;","varying vec2 vDim;","varying float vIntensity;","void main()","{","float falloff = (1.0 - smoothstep(0.0, 1.0, length(vOff/vDim)));","float intensity = falloff*vIntensity;","gl_FragColor = vec4(intensity);","}"].join("\n")]});t._sp=r$13.fromCache({context:e,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:{aPosition:0,aIntensity:1}})}}function T$d(e,t){if(!e$2b(t._va)){var i=t._vertexBufferViews[t._pointCount],n=t$Y.createVertexBuffer({context:e,typedArray:i,usage:A$19.STREAM_DRAW}),r=[{index:0,vertexBuffer:n,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:32,normalize:!1},{index:1,vertexBuffer:n,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,offsetInBytes:16,strideInBytes:32,normalize:!1}];t._va=new c$12({context:e,attributes:r})}}function S$9(e,t){var i=new i$_({primitiveType:W$18.TRIANGLES,count:6*t._pointCount});T$d(e,t),R$c(e,t),i.vertexArray=t._va,i.shaderProgram=t._sp,i.renderState=d$1m.fromCache({depthTest:{enabled:!1},viewport:new f$18(0,0,t._width,t._height),blending:{enabled:!0,functionDestinationRgb:de$x.ONE,functionDestinationAlpha:de$x.ONE}});var n=new e$29(t.bounds.x,t.bounds.y,t.bounds.width,t.bounds.height);return i.uniformMap={uBounds:function(){return n}},i.framebuffer=t._fbIntensity,i}function V$b(e,t){var i=["uniform sampler2D uIntensityTexture;","varying vec2 v_textureCoordinates;","float linstep(float low, float high, float value) {","return clamp((value-low)/(high-low), 0.0, 1.0);","}","float fade(float low, float high, float value){","float mid = (low+high)*0.5;","float range = (high-low)*0.5;","float x = 1.0 - clamp(abs(mid-value)/range, 0.0, 1.0);","return smoothstep(0.0, 1.0, x);","}","vec3 getColor(float intensity){","vec3 blue = vec3(0.0, 0.0, 1.0);","vec3 cyan = vec3(0.0, 1.0, 1.0);","vec3 green = vec3(0.0, 1.0, 0.0);","vec3 yellow = vec3(1.0, 1.0, 0.0);","vec3 red = vec3(1.0, 0.0, 0.0);","vec3 color = fade(-0.25, 0.25, intensity)*blue + fade(0.0, 0.5, intensity)*cyan + fade(0.25, 0.75, intensity)*green + fade(0.5, 1.0, intensity)*yellow + smoothstep(0.75, 1.0, intensity)*red;","return color;","}","vec4 alphaFun(vec3 color, float intensity){","float alpha = smoothstep(0.0, 1.0, intensity);","return vec4(color*alpha, alpha);","}","void main(){","float intensity = smoothstep(0.0, 1.0, texture2D(uIntensityTexture, v_textureCoordinates).r);","vec3 color = getColor(intensity);","gl_FragColor = alphaFun(color, intensity);","}"].join("\n"),n=e.createViewportQuadCommand(i,{uniformMap:{uIntensityTexture:function(){return t._fbIntensity.getColorTexture(0)}},renderState:d$1m.fromCache({viewport:new f$18(0,0,t._width,t._height),blending:{enabled:!0,functionDestinationRgb:de$x.ONE,functionDestinationAlpha:de$x.ONE}}),owner:t});return n.framebuffer=t._fbHeatMap,n}function H$e(e){if(e$2b(e._va)){var t=e._va.getAttribute(0).vertexBuffer,i=t._getBuffer(),n=t._gl;n.bindBuffer(de$x.ARRAY_BUFFER,i),n.bufferData(de$x.ARRAY_BUFFER,e._vertexBufferViews[e._pointCount],A$19.STREAM_DRAW),n.bindBuffer(de$x.ARRAY_BUFFER,null)}}function t$a(){this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._texture=void 0,this._classifiedTexture=void 0,this._depthStencilTexture=void 0,this._fbo=void 0,this._fboClassified=void 0,this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new t$X({color:new e$1U(0,0,0,0),owner:this}),this._clearCommand=new t$X({color:new e$1U(0,0,0,0),depth:1,stencil:0});var e=this;this._uniformMap={colorTexture:function(){return e._texture},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._classifiedTexture}}}w$a.prototype._requestGridTile=function(e,t,i,n){if(!this.ready)throw new t$16("requestTileGrid must not be called before ready returns true.");var r=[],o=this._tilingScheme.tileXYToRectangle(e,t,i),a=this;if(this._levels[this._levels.length-1],e$2b(h$18.intersection(this._rectangle,o,W$d))){var s=this._levels[0],l=i;if(l<=this._levels[this._levels.length-1]&&l>=s){var u=i+"_"+e+"_"+t,c=a._url+"data/index/"+t+"/"+e+".bil?level="+l,h=o$10(c);e$2b(h)&&(h.id=u,h.url=c,r.push(h))}}return o$1l.all(r,(function(e){for(var t=0;t<e.length;t++){return R$d(a,e[t])}}),(function(e){return o$1l.reject(e)}))},Object.defineProperties(o$f.prototype,{texture:{get:function(){return this._fbHeatMap.getColorTexture(0)}},bounds:{set:function(e){this._bounds=e},get:function(){return this._bounds}},maxPerFrameDrawCount:{set:function(e){this._maxPerFrameDrawCount=e},get:function(){return this._maxPerFrameDrawCount}}}),o$f.prototype.addVertex=function(e,t,i,n,r){this._vertexBufferData[this._bufferIndex++]=e,this._vertexBufferData[this._bufferIndex++]=t,this._vertexBufferData[this._bufferIndex++]=i,this._vertexBufferData[this._bufferIndex++]=n,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r},o$f.prototype.addPoint=function(e,t,i,n){this._pointCount>=this._maxPointCount-1&&this.draw(this._context),n=u$_(n,50),i=u$_(i,.2);var r=.5*n;this.addVertex(e,t,-r,-r,i),this.addVertex(e,t,+r,-r,i),this.addVertex(e,t,-r,+r,i),this.addVertex(e,t,-r,+r,i),this.addVertex(e,t,+r,-r,i),this.addVertex(e,t,+r,+r,i),this._pointCount++},o$f.prototype.setData=function(e){this._data=e},o$f.prototype.drawIntensity=function(e){e$2b(this._fbIntensity)||(this._fbIntensity=x$c(e,this._width,this._height,_$$.HALF_FLOAT)),e$2b(this._intensityCommand)||(this._intensityCommand=S$9(e,this)),this._intensityCommand.count=6*this._pointCount,H$e(this),this._intensityCommand.execute(e)},o$f.prototype.drawHeatMap=function(e){this._clearCommand.framebuffer=this._fbHeatMap,this._clearCommand.execute(e),e$2b(this._heatMapCommand)||(this._heatMapCommand=V$b(e,this)),this._heatMapCommand.execute(e)},o$f.prototype.draw=function(e){this.drawIntensity(e),this.drawHeatMap(e),this._bufferIndex=0,this._pointCount=0},o$f.prototype.update=function(e){if(this._context=e.context,e$2b(this._data)){for(var t=Math.min(this._data.length,this._dataIndex+this._maxPerFrameDrawCount),i=.002*this._bounds.width,n=this._dataIndex;n<t;n++){var r=this._data[n];r.x,r.y;var o=u$_(r.intensity,.1);o=(o-this._minIntensity)/this._maxIntensity,this.addPoint(r.x,r.y,o,i)}this._dataIndex=t,this._dataIndex>=this._data.length&&(this._data=void 0,this._dataIndex=0)}this._pointCount<1||this.draw(e.context)},o$f.prototype.destroy=function(){return this._fbIntensity=this._fbIntensity&&this._fbIntensity.destroy(),this._fbHeatMap=this._fbHeatMap&&this._fbHeatMap.destroy(),this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy(),this._vertexBufferData=void 0,this._vertexBufferViews=void 0,this._data=void 0,i$10(this)},Object.defineProperties(t$a.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}}),t$a.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var I$9={depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$X.EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.KEEP},backFunction:m$X.NEVER,reference:0,mask:u$N.CLASSIFICATION_MASK},blending:Ee$r.ALPHA_BLEND},L$e={depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$X.NOT_EQUAL,frontOperation:{fail:n$Y.KEEP,zFail:n$Y.KEEP,zPass:n$Y.KEEP},backFunction:m$X.NEVER,reference:0,mask:u$N.CLASSIFICATION_MASK},blending:Ee$r.ALPHA_BLEND},N$7={depthMask:!0,depthTest:{enabled:!0},stencilTest:u$N.setCesium3DTileBit(),stencilMask:u$N.CESIUM_3D_TILE_MASK,blending:Ee$r.ALPHA_BLEND},M$c="#extension GL_EXT_frag_depth : enable\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform sampler2D classifiedTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n bool isClassified = all(equal(texture2D(classifiedTexture, v_textureCoordinates), vec4(0.0)));\n#ifdef UNCLASSIFIED\n vec4 highlightColor = czm_invertClassificationColor;\n if (isClassified)\n {\n discard;\n }\n#else\n vec4 highlightColor = vec4(1.0);\n if (!isClassified)\n {\n discard;\n }\n#endif\n gl_FragColor = color * highlightColor;\n gl_FragDepthEXT = texture2D(depthTexture, v_textureCoordinates).r;\n}\n",U$b="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n#ifdef UNCLASSIFIED\n gl_FragColor = color * czm_invertClassificationColor;\n#else\n gl_FragColor = color;\n#endif\n}\n";function n$a(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}function o$e(e){if(e$2b(e)&&e.length!==i$Q.NUMBER_OF_JOB_TYPES)throw new t$16("A budget must be specified for each job type; budgets.length should equal JobType.NUMBER_OF_JOB_TYPES.");var t=new Array(i$Q.NUMBER_OF_JOB_TYPES);t[i$Q.TEXTURE]=new n$a(e$2b(e)?e[i$Q.TEXTURE]:10),t[i$Q.PROGRAM]=new n$a(e$2b(e)?e[i$Q.PROGRAM]:10),t[i$Q.BUFFER]=new n$a(e$2b(e)?e[i$Q.BUFFER]:30);var i,n=t.length,r=0;for(i=0;i<n;++i)r+=t[i].total;var o=new Array(n);for(i=0;i<n;++i)o[i]=!1;this._totalBudget=r,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=o}function r$g(){}t$a.prototype.update=function(e){var t=this._texture,i=!e$2b(t)||this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;var n,r,o=e.drawingBufferWidth,a=e.drawingBufferHeight,s=!e$2b(t)||t.width!==o||t.height!==a;((s||i)&&(this._texture=this._texture&&this._texture.destroy(),this._classifiedTexture=this._classifiedTexture&&this._classifiedTexture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._texture=new t$V({context:e,width:o,height:a,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}),e$2b(this._previousFramebuffer)||(this._classifiedTexture=new t$V({context:e,width:o,height:a,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}),this._depthStencilTexture=new t$V({context:e,width:o,height:a,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8}))),!e$2b(this._fbo)||s||i)&&(this._fbo=this._fbo&&this._fbo.destroy(),this._fboClassified=this._fboClassified&&this._fboClassified.destroy(),e$2b(this._previousFramebuffer)?(n=this._previousFramebuffer.depthStencilTexture,r=this._previousFramebuffer.depthStencilRenderbuffer):n=this._depthStencilTexture,this._fbo=new t$W({context:e,colorTextures:[this._texture],depthStencilTexture:n,depthStencilRenderbuffer:r,destroyAttachments:!1}),e$2b(this._previousFramebuffer)||(this._fboClassified=new t$W({context:e,colorTextures:[this._classifiedTexture],depthStencilTexture:n,destroyAttachments:!1})));if(e$2b(this._rsUnclassified)||(this._rsUnclassified=d$1m.fromCache(I$9),this._rsClassified=d$1m.fromCache(L$e),this._rsDefault=d$1m.fromCache(N$7)),!e$2b(this._unclassifiedCommand)||i){e$2b(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());var l=e$2b(this._previousFramebuffer)?U$b:M$c,u=new s$U({defines:["UNCLASSIFIED"],sources:[l]}),c=new s$U({sources:[l]});this._unclassifiedCommand=e.createViewportQuadCommand(u,{renderState:e$2b(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(c,{renderState:e$2b(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),e$2b(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),e$2b(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(ie$6,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}},t$a.prototype.clear=function(e,t){var i=t.framebuffer;e$2b(this._previousFramebuffer)?(t.framebuffer=this._fbo,this._clearColorCommand.execute(e,t)):(t.framebuffer=this._fbo,this._clearCommand.execute(e,t),t.framebuffer=this._fboClassified,this._clearCommand.execute(e,t)),t.framebuffer=i},t$a.prototype.executeClassified=function(e,t){if(!e$2b(this._previousFramebuffer)){var i=t.framebuffer;t.framebuffer=this._fboClassified,this._translucentCommand.execute(e,t),t.framebuffer=i}this._classifiedCommand.execute(e,t)},t$a.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)},t$a.prototype.isDestroyed=function(){return!1},t$a.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._texture=this._texture&&this._texture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),e$2b(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),i$10(this)},Object.defineProperties(n$a.prototype,{total:{get:function(){return this._total}}}),o$e.getTimestamp=Et$a,Object.defineProperties(o$e.prototype,{totalBudget:{get:function(){return this._totalBudget}}}),o$e.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget},o$e.prototype.resetBudgets=function(){for(var e=this._budgets,t=e.length,i=0;i<t;++i){var n=e[i];n.starvedLastFrame=n.starvedThisFrame,n.starvedThisFrame=!1,n.usedThisFrame=0,n.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0},o$e.prototype.execute=function(e,t){var i,n=this._budgets,r=n[t],o=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&o)return r.starvedThisFrame=!0,!1;if(r.usedThisFrame+r.stolenFromMeThisFrame>=r.total){var a,s=n.length;for(a=0;a<s&&(!((i=n[a]).usedThisFrame+i.stolenFromMeThisFrame<i.total)||i.starvedLastFrame);++a);if(a===s&&o)return!1;o&&(r.starvedThisFrame=!0)}var l=o$e.getTimestamp();e.execute();var u=o$e.getTimestamp()-l;return this._totalUsedThisFrame+=u,i?i.stolenFromMeThisFrame+=u:r.usedThisFrame+=u,this._executedThisFrame[t]=!0,!0},Object.defineProperties(r$g.prototype,{color:{get:t$16.throwInstantiationError},intensity:{get:t$16.throwInstantiationError}});var e$8={SUN_LIGHT:0,LIGHT_GROUP1:1},Ze$3=Object.freeze(e$8),p$6=/\/$/,d$i=new r$T('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function o$d(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).styleId;if(!e$2b(t))throw new t$16("options.styleId is required.");var i=t$11.createIfNeeded(u$_(e.url,"https://api.mapbox.com/styles/v1/")),n=e$T.getAccessToken(e.accessToken);this._styleId=t,this._accessToken=n,this._accessTokenErrorCredit=r$T.clone(e$T.getErrorCredit(e.accessToken));var r=u$_(e.tilesize,512);this._tilesize=r;var o=u$_(e.username,"mapbox");this._username=o;var a,s=e$2b(e.scaleFactor)?"@2x":"",l=i.getUrlComponent();p$6.test(l)||(l+="/"),l+=this._username+"/"+t+"/tiles/"+this._tilesize+"/{z}/{x}/{y}"+s,i.url=l,i.setQueryParameters({access_token:n}),e$2b(e.credit)?"string"==typeof(a=e.credit)&&(a=new r$T(a)):a=d$i,this._resource=i,this._imageryProvider=new _$g({url:i,credit:a,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function n$9(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).textureUrl;e$2b(t)||(t=n$15("Assets/Textures/moonSmall.jpg")),this.show=u$_(e.show,!0),this.textureUrl=t,this._ellipsoid=u$_(e.ellipsoid,t$13.MOON),this.onlySunLighting=u$_(e.onlySunLighting,!0),this._ellipsoidPrimitive=new p$c({radii:this.ellipsoid.radii,material:r$X.fromType(r$X.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new h$I}function x$b(){}function y$c(e,t,i,n,r,o,a){var s=e.xDimName,l=e.yDimName,u=e.zDimName,c=e.timeDimName,h=e.dimensions,d=e.dimensionIndices,f=e.buffer,p=h[d[t]];if(0==p.size&&t<d.length-1)y$c(e,t+1,i,n,r,o,a);else for(var _=p.name===s,m=p.name===l,g=p.name===u,x=e$2b(c)&&p.name===c,v=0;v<p.size;v++)if(_?i=v:m?n=v:g?r=v:x&&(o=v),t==d.length-1){var y=f.readFloat32();a.maxValue=Math.max(a.maxValue,y),a.minValue=Math.min(a.minValue,y);var $=r*e.xDimSize*e.yDimSize+n*e.xDimSize+i;a.array[o][$]=y}else y$c(e,t+1,i,n,r,o,a)}function E$a(e,t,i,n){var r=t.offset;t.size,t.type;var o=t.dimensions,a=e.recordDimension;n.seek(r),e.buffer=n,e.dimensions=i,e.dimensionIndices=o;var s=e.xDimName,l=e.yDimName,u=e.zDimName,c=e.timeDimName;e.xDimSize=0,e.yDimSize=0,e.zDimSize=0;for(var h=1,d=0;d<i.length;d++)i[d].name==s?e.xDimSize=i[d].size:i[d].name==l?e.yDimSize=i[d].size:i[d].name==u?e.zDimSize=i[d].size:e$2b(c)&&i[d].name==c&&(h=i[d].size);a.length>0&&(h=a.length,e.timeDimName=null);var f={array:[]},p=0;for(p=0;p<h;p++)f.array[p]=[];if(f.maxValue=Number.MIN_VALUE,f.minValue=Number.MAX_VALUE,f.xDimSize=e.xDimSize,f.yDimSize=e.yDimSize,f.zDimSize=e.zDimSize,f.timeDimSize=h,a.length>0)for(p=0;p<h;p++)n.seek(r+a.recordStep*p),y$c(e,0,0,0,0,p,f);else y$c(e,0,0,0,0,0,f);return f}function e$7(e){}Object.defineProperties(o$d.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),o$d.prototype.getTileCredits=function(e,t,i){if(e$2b(this._accessTokenErrorCredit))return[this._accessTokenErrorCredit]},o$d.prototype.requestImage=function(e,t,i,n){return this._imageryProvider.requestImage(e,t,i,n)},o$d.prototype.pickFeatures=function(e,t,i,n,r){return this._imageryProvider.pickFeatures(e,t,i,n,r)},o$d._defaultCredit=d$i,Object.defineProperties(n$9.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),new p$1e,new p$1e,new o$1p,n$9.prototype.update=function(e){},n$9.prototype.isDestroyed=function(){return!1},n$9.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),i$10(this)},x$b.loadData=function(e,t){var i=e.header,n=e.buffer,r=i.dimensions;i.globalAttributes;var o=i.variables;t.recordDimension=i.recordDimension;for(var a=0,s=0;s<o.length;s++)if(o[s].name==t.variableName){a=s;break}return E$a(t,o[a],r,n)},e$7.prototype.isReady=function(){return!0},e$7.prototype.shouldDiscardImage=function(e){return!1};var y$b="#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\nuniform vec4 u_bgColor;\nuniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nif (texture2D(u_depthTexture, v_textureCoordinates).r < 1.0)\n{\n#ifdef MRT\ngl_FragData[0] = u_bgColor;\ngl_FragData[1] = vec4(u_bgColor.a);\n#else\ngl_FragColor = u_bgColor;\n#endif\nreturn;\n}\ndiscard;\n}\n",L$d="\nuniform u_bgColor : vec4<f32>;\n\nvar u_depthTexture : texture_depth_2d;\nvar u_depthTextureSampler : sampler;\n\nvarying v_textureCoordinates : vec2<f32>;\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n if (textureSample(u_depthTexture, u_depthTextureSampler, v_textureCoordinates) >= 1.0)\n {\n discard;\n }\n gl_FragData0 = uniforms.u_bgColor;\n gl_FragData1 = vec4(uniforms.u_bgColor.a);\n}\n",N$6="uniform sampler2D u_opaque;\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 opaque = texture2D(u_opaque, v_textureCoordinates);\nvec4 accum = texture2D(u_accumulation, v_textureCoordinates);\nfloat r = texture2D(u_revealage, v_textureCoordinates).r;\n#ifdef MRT\nvec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n#else\nvec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);\n#endif\ngl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\nif (opaque != czm_backgroundColor)\n{\ngl_FragColor.a = 1.0;\n}\n}\n";function C$c(e){this._numSamples=1,this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;var t=e.colorBufferFloat&&e.depthTexture&&e.floatBlend;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._useWebGPU=e.webgpu,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=void 0,this._alphaFBO=void 0,this._adjustTranslucentFBO=void 0,this._adjustAlphaFBO=void 0,this._opaqueClearCommand=new t$X({color:new e$1U(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new t$X({color:new e$1U(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new t$X({color:new e$1U(0,0,0,0),owner:this}),this._alphaClearCommand=new t$X({color:new e$1U(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new f$18,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function P$d(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function x$a(e){e._translucentFBO=e._translucentFBO&&!e._translucentFBO.isDestroyed()&&e._translucentFBO.destroy(),e._alphaFBO=e._alphaFBO&&!e._alphaFBO.isDestroyed()&&e._alphaFBO.destroy(),e._adjustTranslucentFBO=e._adjustTranslucentFBO&&!e._adjustTranslucentFBO.isDestroyed()&&e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO=e._adjustAlphaFBO&&!e._adjustAlphaFBO.isDestroyed()&&e._adjustAlphaFBO.destroy()}function z$9(e){P$d(e),x$a(e)}function I$8(e,t,i,n){P$d(e),e._accumulationTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:t.webgpu?_$$.HALF_FLOAT:_$$.FLOAT});var r=new Float32Array(i*n*4);e._revealageTexture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:t.webgpu?_$$.HALF_FLOAT:_$$.FLOAT,source:{arrayBufferView:r,width:i,height:n},flipY:!1})}function W$c(e,t){x$a(e);var i=de$x.FRAMEBUFFER_COMPLETE,n=!0;if(e._translucentMRTSupport&&(e._translucentFBO=new t$W({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new t$W({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1}),(e._translucentFBO.status!==i||e._adjustTranslucentFBO.status!==i)&&(x$a(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO=new t$W({context:t,colorTextures:[e._accumulationTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._alphaFBO=new t$W({context:t,colorTextures:[e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new t$W({context:t,colorTextures:[e._accumulationTexture],destroyAttachments:!1}),e._adjustAlphaFBO=new t$W({context:t,colorTextures:[e._revealageTexture],destroyAttachments:!1});var r=e._translucentFBO.status===i,o=e._alphaFBO.status===i,a=e._adjustTranslucentFBO.status===i,s=e._adjustAlphaFBO.status===i;(!r||!o||!a||!s)&&(z$9(e),e._translucentMultipassSupport=!1,n=!1)}return n}C$c.prototype.update=function(e,t,i,n,r){if(!this.isSupported())return;this._opaqueFBO=i,this._opaqueTexture=i.getColorTexture(0),this._depthStencilTexture=i.depthStencilTexture;var o=this._opaqueTexture.width,a=this._opaqueTexture.height,s=this._accumulationTexture,l=!e$2b(s)||s.width!==o||s.height!==a||n!==this._useHDR;const u=this._numSamples!==r;if((l||u)&&(this._numSamples=r,I$8(this,e,o,a)),e$2b(this._translucentFBO)&&!l&&!u||W$c(this,e)){this._useHDR=n;var c,h,d=this;e$2b(this._compositeCommand)||(c=new s$U({sources:[N$6]}),this._translucentMRTSupport&&c.defines.push("MRT"),h={u_opaque:function(){return d._opaqueTexture},u_accumulation:function(){return d._accumulationTexture},u_revealage:function(){return d._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(c,{shaderProgramName:"CompositeOITFS",uniformMap:h,owner:this})),e$2b(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(c=new s$U({defines:["MRT"],sources:[e.webgpu?L$d:y$b],useWGSL:e.webgpu}),h={u_bgColor:function(){return d._translucentMRTClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(c,{shaderProgramName:"AdjustTranslucentOIT",useWGSL:e.webgpu,uniformMap:h,owner:this})):this._translucentMultipassSupport&&(c=new s$U({sources:[y$b]}),h={u_bgColor:function(){return d._translucentMultipassClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(c,{uniformMap:h,owner:this}),h={u_bgColor:function(){return d._alphaClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(c,{uniformMap:h,owner:this}))),this._viewport.width=o,this._viewport.height=a;var f=!f$18.equals(this._viewport,t.viewport),p=f!==this._useScissorTest;this._useScissorTest=f,f$18.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=f$18.clone(t.viewport,this._scissorRectangle),p=!0),(!e$2b(this._rs)||!f$18.equals(this._viewport,this._rs.viewport)||p)&&(this._rs=d$1m.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),e$2b(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),e$2b(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)}};var G$c={enabled:!0,color:new e$1U(0,0,0,0),equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.ONE,functionDestinationRgb:l$14.ONE,functionSourceAlpha:l$14.ZERO,functionDestinationAlpha:l$14.ONE_MINUS_SOURCE_ALPHA},H$d={enabled:!0,color:new e$1U(0,0,0,0),equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.ONE,functionDestinationRgb:l$14.ONE,functionSourceAlpha:l$14.ONE,functionDestinationAlpha:l$14.ONE},U$a={enabled:!0,color:new e$1U(0,0,0,0),equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.ZERO,functionDestinationRgb:l$14.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:l$14.ZERO,functionDestinationAlpha:l$14.ONE_MINUS_SOURCE_ALPHA};function R$b(e,t,i,n){var r=i[n.id];if(!e$2b(r)){var o=d$1m.getState(n);o.depthMask=!1,o.blending=t,r=d$1m.fromCache(o),i[n.id]=r}return r}function V$a(e,t,i){return R$b(t,G$c,e._translucentRenderStateCache,i)}function Q$5(e,t,i){return R$b(t,H$d,e._translucentRenderStateCache,i)}function Z$9(e,t,i){return R$b(t,U$a,e._alphaRenderStateCache,i)}var X$7=" vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n",Y$6=" var Ci : vec3<f32> = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n var ai = czm_gl_FragColor.a;\n var wzi = czm_alphaWeight(ai);\n gl_FragData0 = vec4<f32>(Ci * wzi, ai);\n gl_FragData1 = vec4<f32>(ai * wzi);\n",k$8=" vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragColor = vec4(Ci, ai) * wzi;\n",J$5=" float ai = czm_gl_FragColor.a;\n gl_FragColor = vec4(ai);\n";function D$b(e,t,i,n){var r=e.shaderCache.getDerivedShaderProgram(t,i);if(!e$2b(r)){var o=t._attributeLocations,a=t.fragmentShaderSource.clone(),s=a.useWGSL;if(a.sources=a.sources.map((function(e){return e=(e=(e=(e=s$U.replaceMain(e,"czm_translucent_main",s)).replace(/gl_FragColor/g,"czm_gl_FragColor")).replace(/\bdiscard\b/g,"czm_discard = true")).replace(/czm_phong/g,"czm_translucentPhong")})),s)a.sources.splice(0,0,"var<private> czm_gl_FragColor : vec4<f32>;\nvar<private> czm_discard : bool = false;\n"),a.sources.push("@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n"+n+"}\n");else{var l="";e.webgpu&&(l="#ifdef WEBGPU \n layout(location = 0) out vec4 glFragData[2]; \n#endif \n"),a.sources.splice(0,0,(-1!==n.indexOf("gl_FragData")?"#extension GL_EXT_draw_buffers : enable \n"+l:"")+"vec4 czm_gl_FragColor;\nbool czm_discard = false;\n"),a.sources.push("void main()\n{\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n"+n+"}\n")}r=e.shaderCache.createDerivedShaderProgram(t,i,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:o})}return r}function K$6(e,t){return D$b(e,t,"translucentMRT",t.fragmentShaderSource.useWGSL?Y$6:X$7)}function $$9(e,t){return D$b(e,t,"translucentMultipass",k$8)}function ee$4(e,t){return D$b(e,t,"alphaMultipass",J$5)}function ae$4(e,t,i,n,r,o){var a,s,l=t.context,u=t.frameState.useLogDepth,c=t._hdr,h=n.framebuffer,d=r.length,f=t.frameState.shadowState.lightShadowsEnabled;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(l,n),n.framebuffer=e._adjustAlphaFBO,e._adjustAlphaCommand.execute(l,n);var p=e._opaqueFBO;for(n.framebuffer=e._translucentFBO,s=0;s<d;++s)a=r[s],a=u?a.derivedCommands.logDepth.command:a,a=c?a.derivedCommands.hdr.command:a,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.translucentCommand:a.derivedCommands.oit.translucentCommand,t,l,n,p);for(e$2b(o)&&(a=o.unclassifiedCommand,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.translucentCommand:a.derivedCommands.oit.translucentCommand,t,l,n,p)),n.framebuffer=e._alphaFBO,s=0;s<d;++s)a=r[s],a=u?a.derivedCommands.logDepth.command:a,a=c?a.derivedCommands.hdr.command:a,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.alphaCommand:a.derivedCommands.oit.alphaCommand,t,l,n,p);e$2b(o)&&(a=o.unclassifiedCommand,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.alphaCommand:a.derivedCommands.oit.alphaCommand,t,l,n,p)),n.framebuffer=h}function re$5(e,t,i,n,r,o){var a=t.context,s=t.frameState.useLogDepth,l=t._hdr,u=n.framebuffer,c=r.length,h=t.frameState.shadowState.lightShadowsEnabled;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(a,n);var d=e._opaqueFBO;n.framebuffer=e._translucentFBO;for(var f,p=0;p<c;++p)f=r[p],f=s?f.derivedCommands.logDepth.command:f,f=l?f.derivedCommands.hdr.command:f,i(h&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,t,a,n,d);e$2b(o)&&(f=o.unclassifiedCommand,i(h&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,t,a,n,d)),n.framebuffer=u}C$c.prototype.createDerivedCommands=function(e,t,i){var n,r,o,a,s,l;(e$2b(i)||(i={}),this._translucentMRTSupport)?(e$2b(i.translucentCommand)&&(n=i.translucentCommand.shaderProgram,r=i.translucentCommand.renderState),i.translucentCommand=i$_.shallowClone(e,i.translucentCommand),e$2b(n)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=n,i.translucentCommand.renderState=r):(i.translucentCommand.shaderProgram=K$6(t,e.shaderProgram),i.translucentCommand.renderState=V$a(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id)):(e$2b(i.translucentCommand)&&(o=i.translucentCommand.shaderProgram,a=i.translucentCommand.renderState,s=i.alphaCommand.shaderProgram,l=i.alphaCommand.renderState),i.translucentCommand=i$_.shallowClone(e,i.translucentCommand),i.alphaCommand=i$_.shallowClone(e,i.alphaCommand),e$2b(o)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=o,i.translucentCommand.renderState=a,i.alphaCommand.shaderProgram=s,i.alphaCommand.renderState=l):(i.translucentCommand.shaderProgram=$$9(t,e.shaderProgram),i.translucentCommand.renderState=Q$5(this,t,e.renderState),i.alphaCommand.shaderProgram=ee$4(t,e.shaderProgram),i.alphaCommand.renderState=Z$9(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id));return i},C$c.prototype.executeCommands=function(e,t,i,n,r){this._translucentMRTSupport?re$5(this,e,t,i,n,r):ae$4(this,e,t,i,n,r)},C$c.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)},C$c.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._opaqueFBO,e$1U.clone(i,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO,this._alphaClearCommand.execute(e,t)),t.framebuffer=n},C$c.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport},C$c.prototype.setOpaqueTexture=function(e){this._opaqueTexture=e},C$c.prototype.isDestroyed=function(){return!1},C$c.prototype.destroy=function(){return z$9(this),e$2b(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),e$2b(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),e$2b(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),i$10(this)};var x$9=new r$T("MapQuest, Open Street Map and contributors, CC-BY-SA");function a$9(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=t$11.createIfNeeded(u$_(e.url,"https://a.tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+="{z}/{x}/{y}."+u$_(e.fileExtension,"png");var i=new c$R({ellipsoid:e.ellipsoid}),n=u$_(e.minimumLevel,0),r=e.maximumLevel,o=u$_(e.rectangle,i.rectangle),a=i.positionToTileXY(h$18.southwest(o),n),s=i.positionToTileXY(h$18.northeast(o),n),l=(Math.abs(s.x-a.x)+1)*(Math.abs(s.y-a.y)+1);if(l>4)throw new t$16("The rectangle and minimumLevel indicate that there are "+l+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");var u=u$_(e.credit,x$9);"string"==typeof u&&(u=new r$T(u)),_$g.call(this,{url:t,credit:u,tilingScheme:i,tileWidth:256,tileHeight:256,minimumLevel:n,maximumLevel:r,rectangle:o})}function m$c(e){e=u$_(e,u$_.EMPTY_OBJECT),this.time=u$_(e.time,0),this.minimum=u$_(e.minimum,0),this.maximum=u$_(e.maximum,50),this._complete=!1}function e$6(e){throw new t$16("This type should not be instantiated directly. Instead, use BoxEmitter, CircleEmitter, ConeEmitter or SphereEmitter.")}e$2b(Object.create)&&(a$9.prototype=Object.create(_$g.prototype),a$9.prototype.constructor=a$9),Object.defineProperties(m$c.prototype,{complete:{get:function(){return this._complete}}}),e$6.prototype.emit=function(e){t$16.throwInstantiationError()};var N$5="uniform sampler2D u_colorTexture;\nuniform sampler2D u_transitionAndCountTexture;\nvarying vec2 v_textureCoordinates;\nfloat erf(float x){\nif (abs(x) > 2.629639){\nreturn sign(x);\n}\nelse {\nfloat z = 0.289226 * x * x - 1.0;\nreturn ((((((0.0145688 * z - 0.0348595) * z + 0.0503913) * z - 0.0897001) * z + 0.156097) * z - 0.249431) * z + 0.533201) * x;\n}\n}\nfloat VDMTransmission(vec2 transition, float depth){\nfloat variance = max(transition.y - transition.x * transition.x, 0.0);\nreturn clamp(0.5 * (1.0 + erf((depth - transition.x) / sqrt(variance * 2.0))), 0.0, 1.0);\n}\nvoid main()\n{\nvec4 color = texture2D(u_colorTexture, v_textureCoordinates);\nif(color.a < 0.01){\ndiscard;\n}\nfloat scene_depth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\nif(scene_depth > 0.0){\nvec3 transitionAndCount = texture2D(u_transitionAndCountTexture, v_textureCoordinates).xyz;\nfloat count = transitionAndCount.z;\nvec2 transition = transitionAndCount.xy;\ntransition /= count;\nfloat vdmAlpha = VDMTransmission(transition, scene_depth);\ncolor.a = min(color.a, vdmAlpha);\n}\ngl_FragColor = color;\n}\n";function u$b(){this._colorFBO=void 0,this._transitionFBO=void 0,this._colorTexture=void 0,this._transitionTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._passType=Le$s.OPAQUE,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},this.quality=.25,this.enable=!1,this._useLogDepth=!1,this._particleSp=void 0,this._useHdr=!1,this.useHdr=this._useHdr}var G$b={enabled:!0,color:new e$1U(0,0,0,0),equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.SOURCE_ALPHA,functionDestinationRgb:l$14.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:l$14.ONE,functionDestinationAlpha:l$14.ONE},f$e=new f$18;function q$a(e,t){var i=e[t.id];if(!e$2b(i)||i.viewport.width!=f$e.width||i.viewport.height!=f$e.height){var n=d$1m.getState(t);n.viewport=f$e,i=d$1m.fromCache(n),e[t.id]=i}return i}function S$8(){return new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}function y$a(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._transitionTexture=e._transitionTexture&&!e._transitionTexture.isDestroyed()&&e._transitionTexture.destroy(),e._colorFBO=e._colorFBO&&!e._colorFBO.isDestroyed()&&e._colorFBO.destroy(),e._transitionFBO=e._transitionFBO&&!e._transitionFBO.isDestroyed()&&e._transitionFBO.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}function U$9(e,t){var i=e._screenWidth,n=e._screenHeight;e._colorTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,sampler:S$8()}),e._transitionTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT,sampler:S$8()}),e._colorFBO=new t$W({context:t,colorTextures:[e._colorTexture],destroyAttachments:!1}),e._transitionFBO=new t$W({context:t,colorTextures:[e._transitionTexture],destroyAttachments:!1})}function I$7(e,t){var i=[];e._useLogDepth&&i.push("LOG_DEPTH");var n=new s$U({sources:[N$5],defines:i}),r={u_colorTexture:function(){return e._colorTexture},u_transitionAndCountTexture:function(){return e._transitionTexture}},o=d$1m.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:G$b});e._drawCommand=t.createViewportQuadCommand(n,{uniformMap:r,renderState:o,pass:e._passType,owner:e}),e._clearCommand=new t$X({color:new e$1U(0,0,0,0),depth:1,renderState:d$1m.fromCache(),pass:e._passType,owner:e})}function V$9(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._colorTexture,o=!1,a=e$2b(r)&&(r.width!==i||r.height!==n);return(!e$2b(r)||a)&&(y$a(e),U$9(e,t),I$7(e,t),o=!0),o}function D$a(e){return e.drawBuffers&&e.fragmentDepth}function r$f(){this._drawCommand=void 0,this.enable=!1,this._particleStateTexture=void 0,this._initialized=!1}function a$8(e){e._drawCommand=void 0,e._clearCommand=void 0}function h$a(e,t){var i=new s$U({sources:[ie$6]}),n={colorTexture:function(){return e._particleStateTexture}},r=d$1m.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Ee$r.ALPHA_BLEND});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:e._passType,owner:e})}function c$a(e,t){var i=!1;return e._initialized||(a$8(e),h$a(e,t),i=!0,e._initialized=!0),i}function d$h(e){return e.drawBuffers&&e.fragmentDepth}function i$c(e){if("string"==typeof e){var t=document.getElementById(e);if(null===t)throw new t$16('Element with id "'+e+'" does not exist in the document.');e=t}return e}function o$c(e){var t=i$c((e=u$_(e,u$_.EMPTY_OBJECT)).container);if(!e$2b(t))throw new t$16("container is required");this._container=t;var i=document.createElement("div");i.className="supermap3d-performanceDisplay";var n=document.createElement("div");n.className="supermap3d-performanceDisplay-fps",this._fpsText=document.createTextNode(""),n.appendChild(this._fpsText);var r=document.createElement("div");r.className="supermap3d-performanceDisplay-ms",this._msText=document.createTextNode(""),r.appendChild(this._msText),i.appendChild(r),i.appendChild(n),this._container.appendChild(i),this._lastFpsSampleTime=Et$a(),this._lastMsSampleTime=Et$a(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;var o=document.createElement("div");o.className="supermap3d-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),o.appendChild(this._throttledText),i.appendChild(o);var a=document.createElement("div");a.className="supermap3d-performanceDisplay-ms",this._trangleCountText=document.createTextNode(""),a.appendChild(this._trangleCountText),i.appendChild(a)}u$b.isSupported=D$a,u$b.prototype.update=function(e,t){if(D$a(e.context)&&this.enable){var i=e.context;this._screenWidth=Math.floor(i.drawingBufferWidth*this.quality),this._screenHeight=Math.floor(i.drawingBufferHeight*this.quality),f$e.width=this._screenWidth,f$e.height=this._screenHeight,this._useLogDepth=e.useLogDepth,this._useHdr=t,V$9(this,i)}},u$b.prototype.execute=function(e,t){!e$2b(this._drawCommand)||!this.enable||!e$2b(e.uniformState)||!e$2b(e.uniformState.globeDepthTexture)||this._drawCommand.execute(e,t)},u$b.prototype.executeCommand=function(e,t,i,n,r){if(0!=r){var o,a,s=e.context,l=e.frameState.useLogDepth,u=e._hdr,c=i.framebuffer;for(i.framebuffer=this._colorFBO,a=0;a<r;++a)o=n[a],o=l?o.derivedCommands.logDepth.command:o,t(o=u?o.derivedCommands.hdr.command:o,e,s,i);for(i.framebuffer=this._transitionFBO,a=0;a<r;++a){if(o=n[a],o=l?o.derivedCommands.logDepth.command:o,o=u?o.derivedCommands.hdr.command:o,!e$2b(this._particleSp)||this._useHdr!==this.useHdr){this.useHdr=this._useHdr;var h=o.shaderProgram.fragmentShaderSource.clone(),d=o.shaderProgram.vertexShaderSource.clone();h.defines.push("PARTICLESYSTEM"),this._particleSp=r$13.fromCache({context:s,vertexShaderSource:d,fragmentShaderSource:h})}var f=o.shaderProgram;o._shaderProgram=this._particleSp,t(o,e,s,i),o._shaderProgram=f}i.framebuffer=c}},u$b.prototype.clear=function(e,t){!e$2b(this._clearCommand)||!this.enable||(this._clearCommand.framebuffer=this._colorFBO,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._transitionFBO,this._clearCommand.execute(e,t))},u$b.prototype.createDerivedCommands=function(e){!e$2b(e)||(this.enable=!0,e$2b(this._colorFBO)&&(e.renderState=q$a(this._renderStateCache,e.renderState)))},u$b.prototype.isDestroyed=function(){return!1},u$b.prototype.destroy=function(){return y$a(this),i$10(this)},r$f.isSupported=d$h,r$f.prototype.update=function(e){if(this.enable=!0,d$h(e.context)&&this.enable)c$a(this,e.context)},r$f.prototype.execute=function(e,t){!e$2b(this._drawCommand)||!this.enable||!e$2b(e.uniformState)||!e$2b(e.uniformState.globeDepthTexture)||this._drawCommand.execute(e,t)},r$f.prototype.isDestroyed=function(){return!1},r$f.prototype.destroy=function(){return a$8(this),i$10(this)},Object.defineProperties(o$c.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(this._throttledText.nodeValue=e?"(throttled)":"",this._throttled=e)}},trangleCount:{set:function(e){this._trangleCount!==e&&(this._trangleCount=e,this._trangleCountText.nodeValue=e)}}}),o$c.prototype.update=function(e){var t=Et$a(),i=u$_(e,!0);this._fpsFrameCount++;var n=t-this._lastFpsSampleTime;if(n>1e3){var r="N/A";i&&(r=1e3*this._fpsFrameCount/n|0),this._fpsText.nodeValue=r+" FPS",this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;var o=t-this._lastMsSampleTime;if(o>200){var a="N/A";i&&(a=(o/this._msFrameCount).toFixed(2)),this._msText.nodeValue=a+" MS",this._lastMsSampleTime=t,this._msFrameCount=0}},o$c.prototype.destroy=function(){return i$10(this)};var P$c="varying v_textureCoordinates : vec2<f32>;\nvar u_depthTexture : texture_depth_multisampled_2d;\nvar u_depthTextureSampler : sampler;\nfn packDepth(depth : f32) -> vec4<f32> {\n var enc : vec4<f32> = (vec4<f32>(1.0, 255.0, 65025.0, 16581375.0) * depth);\n enc = fract(enc);\n enc = (enc - (vec4<f32>(enc.y, enc.z, enc.w, enc.w) * vec4<f32>(0.003921569, 0.003921569, 0.003921569, 0.0)));\n return enc;\n}\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var sampleCount = i32(textureNumSamples(u_depthTexture));\n var sampleCoord = vec2<i32>(v_textureCoordinates * vec2<f32>(textureDimensions(u_depthTexture)));\n var accumValue : f32;\n for(var i = 0i; i < sampleCount; i += 1i){\n accumValue += textureLoad(u_depthTexture, sampleCoord, i);\n }\n var depth = accumValue / f32(sampleCount);\n gl_FragColor = packDepth(depth);\n}\n";function f$d(){this._framebuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._useLogDepth=void 0,this._debugPickDepthViewportCommand=void 0}function w$9(e,t,i,n){if(!e$2b(e._debugPickDepthViewportCommand)||n!==e._useLogDepth){var r=new s$U({defines:[n?"LOG_DEPTH":""],sources:["uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float z_window = czm_unpackDepth(texture2D(u_texture, v_textureCoordinates));\n z_window = czm_reverseLogDepth(z_window); \n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]});e._debugPickDepthViewportCommand=t.createViewportQuadCommand(r,{shaderProgramName:"spDebugPickDepth",uniformMap:{u_texture:function(){return e._depthTexture}},owner:e}),e._useLogDepth=n}e._debugPickDepthViewportCommand.execute(t,i)}function s$c(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function h$9(e){e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy()}function b$g(e,t,i,n){e._depthTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE})}function T$c(e,t,i,n){s$c(e),h$9(e),b$g(e,t,i,n),e._framebuffer=new t$W({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function D$9(e,t,i){var n=i.width,r=i.height,o=e._depthTexture,a=!e$2b(o)||o.width!==n||o.height!==r;(!e$2b(e._framebuffer)||a)&&T$c(e,t,n,r)}function S$7(e,t,i){if(t.depthTexture){if(!e$2b(e._copyDepthCommand)){var n=t.webgpu?i._inner._samples>1?P$c:C$14:v$O;e._copyDepthCommand=t.createViewportQuadCommand(n,{shaderProgramName:"spCopyDepthPickDepth",useWGSL:t.webgpu,renderState:d$1m.fromCache(),uniformMap:{u_depthTexture:function(){return e._textureToCopy}},owner:e})}}else if(!e$2b(e._copyDepthCommand)){n="uniform sampler2D u_depthStencilTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = texture2D(u_depthStencilTexture, v_textureCoordinates).rgba;\n}\n";e._copyDepthCommand=t.createViewportQuadCommand(n,{shaderProgramName:"spCopyDepthPickDepth",renderState:d$1m.fromCache(),uniformMap:{u_depthStencilTexture:function(){return e._textureToCopy}},owner:e})}e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._framebuffer}f$d.prototype.executeDebugPickDepth=function(e,t,i){w$9(this,e,t,i)},f$d.prototype.update=function(e,t){D$9(this,e,t),S$7(this,e,t)},new e$29;var z$8=new e$29(1,1/255,1/65025,1/16581375);function _$c(e){var t=[];e$29.unpackArray(e,t);for(var i=Number.POSITIVE_INFINITY,n=0;n<t.length;n++){var r=t[n];e$29.divideByScalar(r,255,r),i=Math.min(i,e$29.dot(r,z$8))}return i}function s$b(){this._depthStencilTexture=void 0,this._colorTexture=void 0,this._framebuffer=void 0,this._passState=void 0}function l$d(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy(),e._colorTexture=e._colorTexture&&e._colorTexture.destroy()}function w$8(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight;t.depthTexture?(e._depthStencilTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8}),e._colorTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE}),e._framebuffer=new t$W({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1})):(e._depthStencilTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE}),e._framebuffer=new t$W({context:t,colorTextures:[e._depthStencilTexture],depthStencilRenderbuffer:new r$$({context:t,width:i,height:n,format:M$13.DEPTH_STENCIL}),destroyAttachments:!1}));var r=new n$Z(t);r.blendingEnabled=!1,r.scissorTest={enabled:!0,rectangle:new f$18},r.viewport=new f$18,e._passState=r}function f$c(e){var t=new n$Z(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new f$18},t.viewport=new f$18,this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}function w$7(e,t,i,n){for(var r=Math.max(e,t),o=r*r,a=Math.floor(.5*e),s=Math.floor(.5*t),l=0,u=0,c=0,h=-1,d=0;d<o;++d){if(-a<=l&&l<=a&&-s<=u&&u<=s){var f=4*((s-u)*e+l+a),p=e$1U.byteToRgba(n[f],n[f+1],n[f+2],n[f+3]),_=i.getObjectByPickId(p);if(e$2b(_))return _}if(l===u||l<0&&-l===u||l>0&&l===1-u){var m=c;c=-h,h=m}l+=c,u+=h}}function a$7(e){var t=new n$Z(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new f$18},t.viewport=new f$18,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isOnlyS3MObjectVisible:!0,isUnderGlobeVisible:!1},this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}function L$c(e,t,i){var n,r,o=e.context,a=[],s=t.frustum.near,l=t.frustum.far,u=e.logarithmicDepthBuffer?e.logarithmicDepthFarToNearRatio:e.farToNearRatio;Y$5(s,l,u,Math.ceil(Math.log(l/s)/Math.log(u)),e.logarithmicDepthBuffer,a,!1,void 0),o.depthTexture&&(n=new a$a),e._useOIT&&o.depthTexture&&(r=new C$c(o));var c=new n$Z(o);c.viewport=f$18.clone(i),this.camera=t,this._cameraClone=v$K.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=i,this.passState=c,this.pickFramebuffer=new f$c(o),this.pickPointFramebuffer=new a$7(o),this.pickDepthFramebuffer=new s$b,this.sceneFramebuffer=new n$i,this.normalFramebuffer=new s$h(o),this.globeDepth=n,this.globeTranslucencyFramebuffer=new p$8,this.oit=r,this.pickDepths=[],this.debugGlobeDepths=[],this.frustumCommandsList=a,this.debugFrustumStatistics=void 0,this.updateFrustums=!1}f$d.prototype.getDepth=function(e,t,i,n){var r=1;return e$2b(n)&&(r+=n),t-=Math.floor(.5*r),i-=Math.floor(.5*r),_$c(e.readPixels({x:t,y:i,width:r,height:r,framebuffer:this._framebuffer}))},f$d.prototype.getDepthPromise=function(e,t,i,n){var r=1;return e$2b(n)&&(r+=n),t-=Math.floor(.5*r),i-=Math.floor(.5*r),e.readPixelsAsync({x:t,y:i,width:r,height:r,framebuffer:this._framebuffer}).then((e=>{var t=_$c(e);return Promise.resolve(t)})).catch((e=>(console.log("PickDepth.prototype.getDepth readPixelsAsync failed."),Promise.resolve(void 0))))},f$d.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},f$d.prototype.isDestroyed=function(){return!1},f$d.prototype.destroy=function(){return s$c(this),h$9(this),this._copyDepthCommand.shaderProgram=e$2b(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy(),i$10(this)},s$b.prototype.update=function(e,t,i){var n=i.width,r=i.height;(!e$2b(this._framebuffer)||n!==this._depthStencilTexture.width||r!==this._depthStencilTexture.height)&&(l$d(this),w$8(this,e));var o=this._framebuffer,a=this._passState;return a.framebuffer=o,a.viewport.width=n,a.viewport.height=r,a.scissorTest.rectangle.x=t.x,a.scissorTest.rectangle.y=r-t.y,a.scissorTest.rectangle.width=1,a.scissorTest.rectangle.height=1,a},s$b.prototype.isDestroyed=function(){return!1},s$b.prototype.destroy=function(){return l$d(this),i$10(this)},f$c.prototype.begin=function(e,t,i){var n=this._context,r=t.width,o=t.height;return f$18.clone(e,this._passState.scissorTest.rectangle),this._passState.scissorTest.enabled=!i,(!e$2b(this._fb)||this._width!==r||this._height!==o)&&(this._width=r,this._height=o,this._fb=this._fb&&this._fb.destroy(),this._fb=new t$W({context:n,colorTextures:[new t$V({context:n,width:r,height:o})],depthStencilTexture:new t$V({context:n,width:r,height:o,pixelFormat:V$10.DEPTH_STENCIL,pixelDatatype:_$$.UNSIGNED_INT_24_8})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=r,this._passState.viewport.height=o,this._passState},f$c.prototype.endAsync=function(e){var t=u$_(e.width,1),i=u$_(e.height,1),n=this._context;return n.readPixelsAsync({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb}).then((e=>(n.pixels=e,Promise.resolve(w$7(t,i,n,e))))).catch((e=>(console.log("Context.readPixels failed."),Promise.resolve(void 0))))},f$c.prototype.end=function(e){var t=u$_(e.width,1),i=u$_(e.height,1),n=this._context,r=n.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb});return n.pixels=r,w$7(t,i,n,r)},f$c.prototype.isDestroyed=function(){return!1},f$c.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),i$10(this)},a$7.prototype.begin=function(e,t){var i=this._context,n=t.width,r=t.height;return f$18.clone(e,this._passState.scissorTest.rectangle),(!e$2b(this._fb)||this._width!==n||this._height!==r)&&(this._width=n,this._height=r,this._fb=this._fb&&this._fb.destroy(),this._fb=new t$W({context:i,colorTextures:[new t$V({context:i,width:n,height:r,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT})],depthStencilRenderbuffer:new r$$({context:i,width:n,height:r,format:M$13.DEPTH_STENCIL})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=n,this._passState.viewport.height=r,this._passState},a$7.prototype.end=function(e){var t=u$_(e.width,1),i=u$_(e.height,1),n=this._context,r=n.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb});n.pixels=r;for(var o=Math.max(t,i),a=o*o,s=Math.floor(.5*t),l=Math.floor(.5*i),u=0,c=0,h=0,d=-1,f=0;f<a;++f){if(-s<=u&&u<=s&&-l<=c&&c<=l){var p=4*((l-c)*t+u+s),_=new e$29(r[p],r[p+1],r[p+2],1);if(_.z<-e$2a.EPSILON10)return _}if(u===c||u<0&&-u===c||u>0&&u===1-c){var m=h;h=-d,d=m}u+=h,c+=d}},a$7.prototype.isDestroyed=function(){return!1},a$7.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),i$10(this)};var z$7=new o$1p,W$b=new o$1p;function vt$1(e,t){var i=Math.max(Math.abs(e.x),Math.abs(t.x)),n=Math.max(Math.abs(e.y),Math.abs(t.y)),r=Math.max(Math.abs(e.z),Math.abs(t.z));return Math.max(Math.max(i,n),r)}function dt$3(e,t,i){var n=1/Math.max(1,vt$1(e.position,t.position));return o$1p.multiplyByScalar(e.position,n,z$7),o$1p.multiplyByScalar(t.position,n,W$b),o$1p.equalsEpsilon(z$7,W$b,i)&&o$1p.equalsEpsilon(e.direction,t.direction,i)&&o$1p.equalsEpsilon(e.up,t.up,i)&&o$1p.equalsEpsilon(e.right,t.right,i)&&p$1d.equalsEpsilon(e.transform,t.transform,i)&&e.frustum.equalsEpsilon(t.frustum,i)}function Y$5(e,t,i,n,r,o,a,s){o.length=n;for(var l=0;l<n;++l){var u,c;a?(u=Math.min(t-s,e+l*s),c=Math.min(t,u+s)):(c=i*(u=Math.max(e,Math.pow(i,l)*e)),r||(c=Math.min(t,c)));var h=o[l];e$2b(h)?(h.near=u,h.far=c):h=o[l]=new i$e(u,c)}}function bt$1(e,t,i,n){e.debugShowFrustums&&(i.debugOverlappingFrustums=0);for(var r=t.frustumCommandsList,o=r.length,a=0;a<o;++a){var s=r[a],l=s.near,u=s.far;if(!(n.start>u)){if(n.stop<l)break;var c=i.pass,h=s.indices[c]++;if(s.commands[c][h]=i,e.debugShowFrustums&&(i.debugOverlappingFrustums|=1<<a),i.executeInClosestFrustum)break}}if(e.debugShowFrustums){var d=t.debugFrustumStatistics.commandsInFrustums;d[i.debugOverlappingFrustums]=e$2b(d[i.debugOverlappingFrustums])?d[i.debugOverlappingFrustums]+1:1,++t.debugFrustumStatistics.totalCommands}e.updateDerivedCommands(i)}L$c.prototype.checkForCameraUpdates=function(e){var t=this.camera,i=this._cameraClone;return dt$3(t,i,e$2a.EPSILON6)?(this._cameraStartFired&&Et$a()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=Et$a(),v$K.clone(t,i),!0)};var H$c=new i$W,o$b=new o$1n;L$c.prototype.createPotentiallyVisibleSet=function(e){var t=e.frameState,i=t.camera,n=i.directionWC,r=i.positionWC,o=e._computeCommandList,a=e._overlayCommandList,s=e._logDepthOverlayCommandList,l=e._overlayAgainstDepthCommandList,u=t.commandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});for(var c=this.frustumCommandsList,h=c.length,d=Le$s.NUMBER_OF_PASSES,f=0;f<h;++f)for(var p=0;p<d;++p)c[f].indices[p]=0;o.length=0,a.length=0,s.length=0,l.length=0;for(var _=Number.MAX_VALUE,m=-Number.MAX_VALUE,g=!1,x=t.shadowState.shadowsEnabled,v=Number.MAX_VALUE,y=-Number.MAX_VALUE,$=Number.MAX_VALUE,b=t.mode===C$13.SCENE3D?t.occluder:void 0,T=t.cullingVolume,C=H$c.planes,S=0;S<5;++S)C[S]=T.planes[S];T=H$c;for(var w=u.length,E=0;E<w;++E){var P=u[E];if(e.terrainProvider.isShowGlobe||!0!==P.invalid){var A=P.pass;if(A===Le$s.COMPUTE)o.push(P);else if(A===Le$s.LOG_DEPTH_OVERLAY)s.push(P),e.updateDerivedCommands(P);else if(A===Le$s.OVERLAY)a.push(P),e.updateDerivedCommands(P);else if(A===Le$s.OVERLAY_AGAINST_DEPTH)l.push(P),e.updateDerivedCommands(P);else{var L=P.boundingVolume;if(e$2b(L)){if(!e.isVisible(P,T,b))continue;if(o$b=L.computePlaneDistances(r,n,o$b),_=Math.min(_,o$b.start),m=Math.max(m,o$b.stop),x&&P.receiveShadows&&o$b.start<C$Y.MAXIMUM_DISTANCE&&!(A===Le$s.GLOBE&&o$b.start<-100&&o$b.stop>100)){var M=o$b.stop-o$b.start;A!==Le$s.GLOBE&&o$b.start<100&&($=Math.min($,M));var R=Math.max(o$b.start,C$Y.NEAR_PLANE);v=Math.min(v,R),y=Math.max(y,o$b.stop)}}else o$b.start=i.frustum.near,o$b.stop=i.frustum.far,g=!(P instanceof t$X);bt$1(e,this,P,o$b)}}}g?(_=i.frustum.near,m=i.frustum.far):(_=Math.min(Math.max(_,i.frustum.near),i.frustum.far),_=t.useLogDepth?_:Math.max(_,1),m=Math.max(Math.min(m,i.frustum.far),_),x&&(v=Math.min(Math.max(v,i.frustum.near),i.frustum.far),y=Math.max(Math.min(y,i.frustum.far),v+1))),x&&!t.passes.pick&&(t.shadowState.nearPlane=Math.max(v,.1),t.shadowState.farPlane=y,t.shadowState.closestObjectSize=$);var O,I=e.mode===C$13.SCENE2D,D=t.useLogDepth,B=D?e.logarithmicDepthFarToNearRatio:e.farToNearRatio;!t.useLogDepth&&t.context.depthTexture&&(t.passes.fbo||t._isDepth||e.compositor.isScanEnable())&&(B=e.logarithmicDepthFarToNearRatio,_=Math.max(_,1)),I?(m=Math.min(m,i.position.z+e.nearToFarDistance2D),_=Math.min(_,m),O=Math.ceil(Math.max(1,m-_)/e.nearToFarDistance2D)):O=Math.ceil(Math.log(m/_)/Math.log(B)),(this.updateFrustums||_!==Number.MAX_VALUE&&(O!==h||0!==c.length&&(_<c[0].near||m>c[h-1].far&&(D||!e$2a.equalsEpsilon(m,c[h-1].far,e$2a.EPSILON8)))))&&(this.updateFrustums=!1,Y$5(_,m,B,O,D,c,I,e.nearToFarDistance2D),this.createPotentiallyVisibleSet(e));var N=t.frustumSplits;N.length=O+1;for(var F=0;F<O;++F)N[F]=c[F].near,F===O-1&&(N[F+1]=c[F].far)},L$c.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickPointFramebuffer=this.pickPointFramebuffer&&this.pickPointFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.normalFramebuffer=this.normalFramebuffer&&this.normalFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy(),this.globeTranslucencyFramebuffer=this.globeTranslucencyFramebuffer&&this.globeTranslucencyFramebuffer.destroy();var e,t,i=this.pickDepths,n=this.debugGlobeDepths;for(t=i.length,e=0;e<t;++e)i[e].destroy();for(t=n.length,e=0;e<t;++e)n[e].destroy()};var J$4=.1,wt$2=new a$g({pass:ue$d.MOST_DETAILED_PRELOAD}),yt$1=new a$g({pass:ue$d.MOST_DETAILED_PICK}),b$f=new a$g({pass:ue$d.PICK});function d$g(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;var t=new f$18(0,0,1,1),i=new v$K(e);i.frustum=new a$V({width:J$4,aspectRatio:1,near:.1}),this._pickOffscreenView=new L$c(e,i,t)}d$g.prototype.update=function(){this._pickPositionCacheDirty=!0},d$g.prototype.getPickDepth=function(e,t){var i=e.view.pickDepths,n=i[t];return e$2b(n)||(n=new f$d,i[t]=n),n};var kt$1=new l$12,Ct$2=new o$1p,M$b=new o$1p,Pt$1=new o$1o,Dt$1=new p$1d;function St(e,t,i,n,r){var o=e.camera,a=o.frustum;e$2b(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2*(t.x-r.x)/r.width-1;s*=.5*(a.right-a.left);var l=2*(r.height-t.y-r.y)/r.height-1;l*=.5*(a.top-a.bottom);var u=p$1d.clone(o.transform,Dt$1);o._setTransform(p$1d.IDENTITY);var c=o$1p.clone(o.position,Ct$2);o$1p.multiplyByScalar(o.right,s,M$b),o$1p.add(M$b,c,c),o$1p.multiplyByScalar(o.up,l,M$b),o$1p.add(M$b,c,c),o._setTransform(u),e.mode===C$13.SCENE2D&&o$1p.fromElements(c.z,c.x,c.y,c);var h=a.getPixelDimensions(r.width,r.height,1,1,Pt$1),d=kt$1;return d.right=.5*h.x,d.left=-d.right,d.top=.5*h.y,d.bottom=-d.top,d.near=a.near,d.far=a.far,d.computeCullingVolume(c,o.directionWC,o.upWC)}var Ft$2=new l$11,Rt$3=new o$1o;function Ot$1(e,t,i,n,r){var o=e.camera,a=o.frustum,s=a.near,l=Math.tan(.5*a.fovy),u=a.aspectRatio*l,c=(2*(t.x-r.x)/r.width-1)*s*u,h=(2*(r.height-t.y-r.y)/r.height-1)*s*l,d=a.getPixelDimensions(r.width,r.height,1,1,Rt$3),f=d.x*i*.5,p=d.y*n*.5,_=Ft$2;return _.top=h+p,_.bottom=h-p,_.right=c+f,_.left=c-f,_.near=s,_.far=a.far,_.computeCullingVolume(o.positionWC,o.directionWC,o.upWC)}function Q$4(e,t,i,n,r){var o=e.camera.frustum;return o instanceof a$V||o instanceof l$12?St(e,t,i,n,r):Ot$1(e,t,i,n,r)}var R$a=3,V$8=3,P$b=new f$18(0,0,R$a,V$8),$$8=new o$1o,G$a=new e$1U(0,0,0,0);function Ht$1(e,t){var i=e.context,n=e.frameState,r=e.environmentState,o=e.defaultView;e.view=o;var a=o.viewport;a.x=0,a.y=0,a.width=i.drawingBufferWidth,a.height=i.drawingBufferHeight;var s=o.passState;s.viewport=f$18.clone(a,s.viewport),e.clearPasses(n.passes),n.passes.pick=!0,n.passes.depth=!0,n.cullingVolume=Q$4(e,t,1,1,a),n.tilesetPassState=b$f,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,s=o.pickDepthFramebuffer.update(i,t,a),e.updateAndExecuteCommands(s,G$a),e.resolveFramebuffers(s),i.endFrame()}d$g.prototype.pick=function(e,t,i,n){if(!e$2b(t))throw new t$16("windowPosition is undefined.");R$a=u$_(i,3),V$8=u$_(n,R$a);var r=e.context,o=r.uniformState,a=e.frameState,s=e.defaultView;e.view=s;var l=s.viewport;l.x=0,l.y=0,l.width=r.drawingBufferWidth,l.height=r.drawingBufferHeight;var u=s.passState;u.viewport=f$18.clone(l,u.viewport);var c=s$Q.transformWindowToDrawingBuffer(e,t,$$8);e.jobScheduler.disableThisFrame(),e.updateFrameState(),a.cullingVolume=Q$4(e,c,R$a,V$8,l),a.invertClassification=!1,a.passes.pick=!0,a.tilesetPassState=b$f,o.update(a),e.updateEnvironment(),P$b.x=c.x-.5*(R$a-1),P$b.y=e.drawingBufferHeight-c.y-.5*(V$8-1),P$b.width=R$a,P$b.height=V$8,u=s.pickFramebuffer.begin(P$b,s.viewport),e.updateAndExecuteCommands(u,G$a),e.resolveFramebuffers(u);var h=s.pickFramebuffer.end(P$b);return r.endFrame(),h};var xt$2=new o$15,_t$2=new l$11,Vt$2=new a$V,Mt$2=new l$12;d$g.prototype.pickPositionWorldCoordinates=function(e,t,i){if(e.useDepthPicking){if(!e$2b(t))throw new t$16("windowPosition is undefined.");if(!e.context.depthTexture)throw new t$16("Picking from the depth buffer is not supported. Check pickPositionSupported.");var n=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n))return o$1p.clone(this._pickPositionCache[n],i);var r=e.frameState,o=e.context,a=o.uniformState,s=e.defaultView;e.view=s;var l=s$Q.transformWindowToDrawingBuffer(e,t,$$8);e.pickTranslucentDepth?Ht$1(e,l):(e.updateFrameState(),a.update(r),e.updateEnvironment()),l.y=e.drawingBufferHeight-l.y;var u,c=e.camera;u=e$2b(c.frustum.fov)?c.frustum.clone(xt$2):e$2b(c.frustum.infiniteProjectionMatrix)?c.frustum.clone(_t$2):e$2b(c.frustum.width)?c.frustum.clone(Vt$2):c.frustum.clone(Mt$2);for(var h=s.frustumCommandsList,d=h.length,f=0;f<d;++f){var p=this.getPickDepth(e,f).getDepth(o,l.x,l.y);if(p>0&&p<1){var _,m=h[f];return e.mode===C$13.SCENE2D?(_=c.position.z,c.position.z=_-m.near+1,u.far=Math.max(1,m.far-m.near),u.near=1,a.update(r),a.updateFrustum(u)):(u.near=m.near*(0!==f?e.opaqueFrustumNearOffset:1),u.far=m.far,a.updateFrustum(u)),i=s$Q.drawingBufferToWgs84Coordinates(e,l,p,i),e.mode===C$13.SCENE2D&&(c.position.z=_,a.update(r)),this._pickPositionCache[n]=o$1p.clone(i),i}}this._pickPositionCache[n]=void 0}};var Nt$2=new a$18;function j$9(e,t){var i,n,r=[],o=[],a=[],s=[];e$2b(e)||(e=Number.MAX_VALUE);for(var l=t();e$2b(l);){var u=l.object,c=l.position,h=l.exclude;if(e$2b(c)&&!e$2b(u)){r.push(l);break}if(!e$2b(u)||!e$2b(u.primitive)||!h&&(r.push(l),0>=--e))break;var d=u.primitive,f=!1;"function"==typeof d.getGeometryInstanceAttributes&&e$2b(u.id)&&(e$2b(n=d.getGeometryInstanceAttributes(u.id))&&e$2b(n.show)&&(f=!0,n.show=e$1F.toValue(!1,n.show),a.push(n))),u instanceof e$L&&(f=!0,u.show=!1,s.push(u)),f||(d.show=!1,o.push(d)),l=t()}for(i=0;i<o.length;++i)o[i].show=!0;for(i=0;i<a.length;++i)(n=a[i]).show=e$1F.toValue(!0,n.show);for(i=0;i<s.length;++i)s[i].show=!0;return r}d$g.prototype.pickPosition=function(e,t,i){if(e$2b(i=this.pickPositionWorldCoordinates(e,t,i))&&e.mode!==C$13.SCENE3D){o$1p.fromElements(i.y,i.z,i.x,i);var n=e.mapProjection,r=n.ellipsoid,o=n.unproject(i,Nt$2);r.cartographicToCartesian(o,i)}return i},d$g.prototype.drillPick=function(e,t,i,n,r){var o=this,a=j$9(i,(function(){var i=o.pick(e,t,n,r);if(e$2b(i))return{object:i,position:void 0,exclude:!1}}));return a.map((function(e){return e.object}))};var tt$3=new o$1p,Wt$2=new o$1p;function Et$2(e,t,i){this.ray=e,this.width=t,this.tilesets=i,this.ready=!1,this.deferred=o$1l.defer(),this.promise=this.deferred.promise}function rt$5(e,t,i,n){var r=t.direction,o=o$1p.mostOrthogonalAxis(r,tt$3),a=o$1p.cross(r,o,tt$3),s=o$1p.cross(r,a,Wt$2);return n.position=t.origin,n.direction=r,n.up=s,n.right=a,n.frustum.width=u$_(i,J$4),n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC)}function Tt$3(e,t,i){var n=t.frameState,r=i.ray,o=i.width,a=i.tilesets,s=e._pickOffscreenView.camera,l=rt$5(e,r,o,s),u=wt$2;u.camera=s,u.cullingVolume=l;for(var c=!0,h=a.length,d=0;d<h;++d){var f=a[d];f.show&&t.primitives.contains(f)&&(f.updateForPass(n,u),c=c&&u.ready)}return c&&i.deferred.resolve(),c}function et$4(e,t,i){for(var n=e.length,r=0;r<n;++r){var o=e.get(r);o.show&&(e$2b(o.isCesium3DTileset)?(!e$2b(t)||-1===t.indexOf(o))&&i.push(o):o instanceof o$x&&et$4(o,t,i))}}function N$4(e,t,i,n,r,o){var a=[];if(et$4(t.primitives,n,a),0===a.length)return o$1l.resolve(o());var s=new Et$2(i,r,a);return e._mostDetailedRayPicks.push(s),s.promise.then((function(){return o()}))}function At$1(e,t){return!(!e$2b(e)||!e$2b(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function It$2(e,t,i,n,r,o,a){var s=t.context,l=s.uniformState,u=t.frameState,c=e._pickOffscreenView;t.view=c,rt$5(e,i,r,c.camera),P$b=f$18.clone(c.viewport,P$b);var h=c.pickFramebuffer.begin(P$b,c.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),u.invertClassification=!1,u.passes.pick=!0,u.passes.offscreen=!0,c.updateFrustums=!0,u.tilesetPassState=a?yt$1:b$f,l.update(u),t.updateEnvironment(),t.updateAndExecuteCommands(h,G$a),t.resolveFramebuffers(h);var d,f=c.pickFramebuffer.end(s);if(t.context.depthTexture)for(var p=c.frustumCommandsList.length,_=0;_<p;++_){var m=e.getPickDepth(t,_).getDepth(s,0,0);if(m>0&&m<1){var g=c.frustumCommandsList[_],x=g.near*(0!==_?t.opaqueFrustumNearOffset:1),v=x+m*(g.far-x);d=f$17.getPoint(i,v);break}}if(t.view=t.defaultView,s.endFrame(),e$2b(f)||e$2b(d))return{object:f,position:d,exclude:!e$2b(d)&&o||At$1(f,n)}}function it$3(e,t,i,n,r,o,a,s){return j$9(n,(function(){return It$2(e,t,i,r,o,a,s)}))}function O$9(e,t,i,n,r,o,a){var s=it$3(e,t,i,1,n,r,o,a);if(s.length>0)return s[0]}function at$5(e,t,i,n,r,o,a,s){return it$3(e,t,i,n,r,o,a,s)}function W$a(e,t){var i=o$1l.defer();return t.then((function(t){var n=e.postRender.addEventListener((function(){i.resolve(t),n()}));e.requestRender()})).otherwise((function(e){i.reject(e)})),i.promise}d$g.prototype.updateMostDetailedRayPicks=function(e){for(var t=this._mostDetailedRayPicks,i=0;i<t.length;++i)Tt$3(this,e,t[i])&&t.splice(i--,1)},d$g.prototype.pickFromRay=function(e,t,i,n){if(o$1q.defined("ray",t),e.mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");return O$9(this,e,t,i,n,!1,!1)},d$g.prototype.drillPickFromRay=function(e,t,i,n,r){if(o$1q.defined("ray",t),e.mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");return at$5(this,e,t,i,n,r,!1,!1)},d$g.prototype.pickFromRayMostDetailed=function(e,t,i,n){if(o$1q.defined("ray",t),e.mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");var r=this;return t=f$17.clone(t),i=e$2b(i)?i.slice():i,W$a(e,N$4(r,e,t,i,n,(function(){return O$9(r,e,t,i,n,!1,!0)})))},d$g.prototype.drillPickFromRayMostDetailed=function(e,t,i,n,r){if(o$1q.defined("ray",t),e.mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");var o=this;return t=f$17.clone(t),n=e$2b(n)?n.slice():n,W$a(e,N$4(o,e,t,n,r,(function(){return at$5(o,e,t,i,n,r,!1,!0)})))};var Bt$3=new o$1p,Lt$1=new o$1p,zt$1=new f$17,ot$3=new a$18;function K$5(e,t){var i=e.globe,n=e$2b(i)?i.ellipsoid:e.mapProjection.ellipsoid,r=e$1E._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,Lt$1),a=a$18.toCartesian(t,n,Bt$3),s=zt$1;s.origin=a,s.direction=o;var l=new f$17;return f$17.getPoint(s,r,l.origin),o$1p.negate(o,l.direction),l}function nt$4(e,t){var i=e.globe,n=e$2b(i)?i.ellipsoid:e.mapProjection.ellipsoid;return K$5(e,a$18.fromCartesian(t,n,ot$3))}function ft$1(e,t){var i=e.globe,n=e$2b(i)?i.ellipsoid:e.mapProjection.ellipsoid;return a$18.fromCartesian(t,n,ot$3).height}function qt$2(e,t,i,n,r){var o=K$5(t,i);return N$4(e,t,o,n,r,(function(){var i=O$9(e,t,o,n,r,!0,!0);if(e$2b(i))return ft$1(t,i.position)}))}function bt(e,t,i,n,r,o){var a=nt$4(t,i);return N$4(e,t,a,n,r,(function(){var i=O$9(e,t,a,n,r,!0,!0);if(e$2b(i))return o$1p.clone(i.position,o)}))}function M$a(e){if(this._positions=u$_(e,[new o$1p,new o$1p,new o$1p]),this.boundingSphere=i$1c.fromPoints(e),e$2b(e)){var t=z$_.fromPositions({positions:e,perPositionHeight:!0});this._geometry=z$_.createGeometry(t),this._triangleArrayByWeight=S$6(this)}this._density=1}d$g.prototype.sampleHeight=function(e,t,i,n){if(o$1q.defined("position",t),e.mode!==C$13.SCENE3D)throw new t$16("sampleHeight is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new t$16("sampleHeight requires depth texture support. Check sampleHeightSupported.");var r=O$9(this,e,K$5(e,t),i,n,!0,!1);if(e$2b(r))return ft$1(e,r.position)},d$g.prototype.clampToHeight=function(e,t,i,n,r){if(o$1q.defined("cartesian",t),e.mode!==C$13.SCENE3D)throw new t$16("clampToHeight is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new t$16("clampToHeight requires depth texture support. Check clampToHeightSupported.");var o=O$9(this,e,nt$4(e,t),i,n,!0,!1);if(e$2b(o))return o$1p.clone(o.position,r)},d$g.prototype.sampleHeightMostDetailed=function(e,t,i,n){if(o$1q.defined("positions",t),e.mode!==C$13.SCENE3D)throw new t$16("sampleHeightMostDetailed is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new t$16("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");i=e$2b(i)?i.slice():i;for(var r=t.length,o=new Array(r),a=0;a<r;++a)o[a]=qt$2(this,e,t[a],i,n);return W$a(e,o$1l.all(o).then((function(e){for(var i=e.length,n=0;n<i;++n)t[n].height=e[n];return t})))},d$g.prototype.clampToHeightMostDetailed=function(e,t,i,n){if(o$1q.defined("cartesians",t),e.mode!==C$13.SCENE3D)throw new t$16("clampToHeightMostDetailed is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new t$16("clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported.");i=e$2b(i)?i.slice():i;for(var r=t.length,o=new Array(r),a=0;a<r;++a)o[a]=bt(this,e,t[a],i,n,t[a]);return W$a(e,o$1l.all(o).then((function(e){for(var i=e.length,n=0;n<i;++n)t[n]=e[n];return t})))},d$g.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()},Object.defineProperties(M$a.prototype,{type:{get:function(){return"Polygon"}},positions:{get:function(){return this._positions},set:function(e){if(e$2b(e)){this._positions=e;var t=z$_.fromPositions({positions:this._positions,perPositionHeight:!0});this._geometry=z$_.createGeometry(t),this._triangleArrayByWeight=S$6(this),this.boundingSphere=i$1c.fromPoints(e),e$2b(this.owner)&&(this.owner._updateParticlePool=!0)}}},density:{set:function(e){e!==this._density&&(this._density=e,e$2b(this.owner)&&(this.owner._updateParticlePool=!0))},get:function(){return this._density}},areaFactor:{get:function(){return this._density*this._area/100|0}}});var l$c=new o$1p,_$b=new o$1p,x$8=new o$1p;function S$6(e){var t,i,n=e._geometry,r=n.indices,o=r.length/3,a=n.attributes.position.values,s=[],l=0;for(t=0;t<o;t++){var u=r[3*t],c=r[3*t+1],h=r[3*t+2];l$c.x=a[3*u],l$c.y=a[3*u+1],l$c.z=a[3*u+2],_$b.x=a[3*c],_$b.y=a[3*c+1],_$b.z=a[3*c+2],x$8.x=a[3*h],x$8.y=a[3*h+1],x$8.z=a[3*h+2];var d=j$8(l$c,_$b,x$8);l+=d,s.push(d)}e._area=l;var f=Math.max(100,10*o),p=[];for(t=0;t<o;t++){var _=Math.floor(s[t]/l*f);for(_=Math.max(1,_),i=0;i<_;i++)p.push(t)}return p}var b$e=new o$1p,W$9=new o$1p,z$6=new o$1p;function j$8(e,t,i){return b$e=o$1p.subtract(t,e,b$e),W$9=o$1p.subtract(i,e,W$9),z$6=o$1p.cross(b$e,W$9,z$6),.5*o$1p.magnitude(z$6)}function C$b(e,t,i,n,r){return(1-Math.sqrt(e))*i+Math.sqrt(e)*(1-t)*n+Math.sqrt(e)*t*r}M$a.prototype.emit=function(e){if(e$2b(this._geometry)){var t=Math.floor(e$2a.randomBetween(0,this._triangleArrayByWeight.length)),i=this._triangleArrayByWeight[t],n=this._geometry.indices[3*i],r=this._geometry.indices[3*i+1],o=this._geometry.indices[3*i+2],a=this._geometry.attributes.position.values,s=a[3*n],l=a[3*n+1],u=a[3*n+2],c=a[3*r],h=a[3*r+1],d=a[3*r+2],f=a[3*o],p=a[3*o+1],_=a[3*o+2],m=e$2a.randomBetween(0,1),g=e$2a.randomBetween(0,1),x=C$b(m,g,s,c,f),v=C$b(m,g,l,h,p),y=C$b(m,g,u,d,_);e.position=o$1p.fromElements(x,v,y,e.position),e.velocity=o$1p.normalize(e.position,e.velocity)}};var b$d="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\ncolor /= texture2D(autoExposure, vec2(0.5)).r;\n#endif\nfloat g = 0.985;\nfloat a = 0.065;\nfloat b = 0.0001;\nfloat c = 0.433;\nfloat d = 0.238;\ncolor = (color * (color + a) - b) / (color * (g * color + c) + d);\ncolor = clamp(color, 0.0, 1.0);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",A$c="uniform sampler2D randomTexture;\nuniform sampler2D depthTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\nvarying vec2 v_textureCoordinates;\nvec4 clipToEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\nposEC = posEC / posEC.w;\nreturn posEC;\n}\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\nvec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\nvec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\nvec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\nvec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\nvec3 up = posInCamera.xyz - posInCameraUp.xyz;\nvec3 down = posInCameraDown.xyz - posInCamera.xyz;\nvec3 left = posInCamera.xyz - posInCameraLeft.xyz;\nvec3 right = posInCameraRight.xyz - posInCamera.xyz;\nvec3 DX = length(left) < length(right) ? left : right;\nvec3 DY = length(up) < length(down) ? up : down;\nreturn normalize(cross(DY, DX));\n}\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\nvec4 posInCamera = clipToEye(v_textureCoordinates, depth);\nif (posInCamera.z > frustumLength)\n{\ngl_FragColor = vec4(1.0);\nreturn;\n}\nvec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\nfloat depthU = czm_readDepth(depthTexture, v_textureCoordinates - vec2(0.0, pixelSize.y));\nfloat depthD = czm_readDepth(depthTexture, v_textureCoordinates + vec2(0.0, pixelSize.y));\nfloat depthL = czm_readDepth(depthTexture, v_textureCoordinates - vec2(pixelSize.x, 0.0));\nfloat depthR = czm_readDepth(depthTexture, v_textureCoordinates + vec2(pixelSize.x, 0.0));\nvec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\nfloat ao = 0.0;\nvec2 sampleDirection = vec2(1.0, 0.0);\nfloat gapAngle = 90.0 * czm_radiansPerDegree;\nfloat randomVal = texture2D(randomTexture, v_textureCoordinates).x;\nfor (int i = 0; i < 4; i++)\n{\nfloat newGapAngle = gapAngle * (float(i) + randomVal);\nfloat cosVal = cos(newGapAngle);\nfloat sinVal = sin(newGapAngle);\nvec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\nfloat localAO = 0.0;\nfloat localStepSize = stepSize;\nfor (int j = 0; j < 6; j++)\n{\nvec2 newCoords = v_textureCoordinates + rotatedSampleDirection * localStepSize * pixelSize;\nif(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n{\nbreak;\n}\nfloat stepDepthInfo = czm_readDepth(depthTexture, newCoords);\nvec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\nvec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\nfloat len = length(diffVec);\nif (len > lengthCap)\n{\nbreak;\n}\nfloat dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\nfloat weight = len / lengthCap;\nweight = 1.0 - weight * weight;\nif (dotVal < bias)\n{\ndotVal = 0.0;\n}\nlocalAO = max(localAO, dotVal * weight);\nlocalStepSize += stepSize;\n}\nao += localAO;\n}\nao /= 4.0;\nao = 1.0 - clamp(ao, 0.0, 1.0);\nao = pow(ao, intensity);\ngl_FragColor = vec4(vec3(ao), 1.0);\n}\n",T$b="uniform sampler2D colorTexture;\nuniform sampler2D ambientOcclusionTexture;\nuniform bool ambientOcclusionOnly;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 color = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 ao = texture2D(ambientOcclusionTexture, v_textureCoordinates).rgb;\ngl_FragColor.rgb = ambientOcclusionOnly ? ao : ao * color;\n}\n",w$6="uniform sampler2D colorTexture;\nuniform float gradations;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n#ifdef CZM_SELECTED_FEATURE\nif (czm_selected()) {\ngl_FragColor = vec4(rgb, 1.0);\nreturn;\n}\n#endif\nfloat luminance = czm_luminance(rgb);\nfloat darkness = luminance * gradations;\ndarkness = (darkness - fract(darkness)) / gradations;\ngl_FragColor = vec4(vec3(darkness), 1.0);\n}\n",z$5="uniform sampler2D colorTexture;\nuniform sampler2D bloomTexture;\nuniform bool glowOnly;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\n#ifdef CZM_SELECTED_FEATURE\nif (czm_selected()) {\ngl_FragColor = color;\nreturn;\n}\n#endif\nvec4 bloom = texture2D(bloomTexture, v_textureCoordinates);\ngl_FragColor = glowOnly ? bloom : bloom + color;\n}\n",E$9="uniform sampler2D colorTexture;\nuniform float brightness;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 target = vec3(0.0);\ngl_FragColor = vec4(mix(target, rgb, brightness), 1.0);\n}\n",C$a="uniform sampler2D colorTexture;\nuniform float contrast;\nuniform float brightness;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 sceneColor = texture2D(colorTexture, v_textureCoordinates).xyz;\nsceneColor = czm_RGBToHSB(sceneColor);\nsceneColor.z += brightness;\nsceneColor = czm_HSBToRGB(sceneColor);\nfloat factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));\nsceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);\ngl_FragColor = vec4(sceneColor, 1.0);\n}\n",F$9="uniform sampler2D colorTexture;\nuniform sampler2D blurTexture;\nuniform sampler2D depthTexture;\nuniform float focalDistance;\nvarying vec2 v_textureCoordinates;\nvec4 toEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\nposInCamera = posInCamera / posInCamera.w;\nreturn posInCamera;\n}\nfloat computeDepthBlur(float depth)\n{\nfloat f;\nif (depth < focalDistance)\n{\nf = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);\n}\nelse\n{\nf = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);\nf = pow(f, 0.1);\n}\nf *= f;\nf = clamp(f, 0.0, 1.0);\nreturn pow(f, 0.5);\n}\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\nvec4 posInCamera = toEye(v_textureCoordinates, depth);\nfloat d = computeDepthBlur(-posInCamera.z);\ngl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), texture2D(blurTexture, v_textureCoordinates), d);\n}\n",R$9="uniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\ngl_FragColor = vec4(vec3(depth), 1.0);\n}\n",P$a="uniform sampler2D depthTexture;\nuniform float length;\nuniform vec4 color;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nfloat directions[3];\ndirections[0] = -1.0;\ndirections[1] = 0.0;\ndirections[2] = 1.0;\nfloat scalars[3];\nscalars[0] = 3.0;\nscalars[1] = 10.0;\nscalars[2] = 3.0;\nfloat padx = czm_pixelRatio / czm_viewport.z;\nfloat pady = czm_pixelRatio / czm_viewport.w;\n#ifdef CZM_SELECTED_FEATURE\nbool selected = false;\nfor (int i = 0; i < 3; ++i)\n{\nfloat dir = directions[i];\nselected = selected || czm_selected(vec2(-padx, dir * pady));\nselected = selected || czm_selected(vec2(padx, dir * pady));\nselected = selected || czm_selected(vec2(dir * padx, -pady));\nselected = selected || czm_selected(vec2(dir * padx, pady));\nif (selected)\n{\nbreak;\n}\n}\nif (!selected)\n{\ngl_FragColor = vec4(color.rgb, 0.0);\nreturn;\n}\n#endif\nfloat horizEdge = 0.0;\nfloat vertEdge = 0.0;\nfor (int i = 0; i < 3; ++i)\n{\nfloat dir = directions[i];\nfloat scale = scalars[i];\nhorizEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;\nhorizEdge += texture2D(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;\nvertEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;\nvertEdge += texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;\n}\nfloat len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);\ngl_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);\n}\n",O$8="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\nconst float A = 0.22;\nconst float B = 0.30;\nconst float C = 0.10;\nconst float D = 0.20;\nconst float E = 0.01;\nconst float F = 0.30;\nconst float white = 11.2;\nvec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;\nfloat w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;\nc = czm_inverseGamma(c / w);\ngl_FragColor = vec4(c, fragmentColor.a);\n}\n",D$8="varying vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nvoid main()\n{\nvec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\nvec4 color = FxaaPixelShader(\nv_textureCoordinates,\ncolorTexture,\nfxaaQualityRcpFrame,\nfxaaQualitySubpix,\nfxaaQualityEdgeThreshold,\nfxaaQualityEdgeThresholdMin);\nfloat alpha = texture2D(colorTexture, v_textureCoordinates).a;\ngl_FragColor = vec4(color.rgb, alpha);\n}\n",U$8="uniform sampler2D colorTexture;\nuniform sampler2D dirtTexture;\nuniform sampler2D starTexture;\nuniform vec2 dirtTextureDimensions;\nuniform float distortion;\nuniform float ghostDispersal;\nuniform float haloWidth;\nuniform float dirtAmount;\nuniform float earthRadius;\nuniform float intensity;\nvarying vec2 v_textureCoordinates;\n#define DISTANCE_TO_SPACE 6500000.0\nvec4 getNDCFromWC(vec3 WC, float earthRadius)\n{\nvec4 positionEC = czm_view * vec4(WC, 1.0);\npositionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);\nvec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\nreturn czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n}\nfloat isInEarth(vec2 texcoord, vec2 sceneSize)\n{\nvec2 NDC = texcoord * 2.0 - 1.0;\nvec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);\nvec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);\nNDC.xy -= earthPosSC.xy;\nfloat X = abs(NDC.x) * sceneSize.x;\nfloat Y = abs(NDC.y) * sceneSize.y;\nreturn clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));\n}\nvec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)\n{\nvec2 sceneSize = czm_viewport.zw;\nvec3 color;\nif(isSpace)\n{\ncolor.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture2D(tex, texcoord + direction * distortion.r).r;\ncolor.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture2D(tex, texcoord + direction * distortion.g).g;\ncolor.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture2D(tex, texcoord + direction * distortion.b).b;\n}\nelse\n{\ncolor.r = texture2D(tex, texcoord + direction * distortion.r).r;\ncolor.g = texture2D(tex, texcoord + direction * distortion.g).g;\ncolor.b = texture2D(tex, texcoord + direction * distortion.b).b;\n}\nreturn vec4(clamp(color, 0.0, 1.0), 0.0);\n}\nvoid main(void)\n{\nvec4 originalColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 rgb = originalColor.rgb;\nbool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;\nvec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);\nvec4 sunPositionEC = czm_view * sunPos;\nvec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);\nsunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);\nif(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))\n{\ngl_FragColor = originalColor;\nreturn;\n}\nvec2 texcoord = vec2(1.0) - v_textureCoordinates;\nvec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\nvec2 invPixelSize = 1.0 / pixelSize;\nvec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);\nvec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;\nvec3 direction = normalize(vec3(ghostVec, 0.0));\nvec4 result = vec4(0.0);\nvec4 ghost = vec4(0.0);\nfor (int i = 0; i < 4; ++i)\n{\nvec2 offset = fract(texcoord + ghostVec * float(i));\nghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);\n}\nresult += ghost;\nvec2 haloVec = normalize(ghostVec) * haloWidth;\nfloat weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\nweightForHalo = pow(1.0 - weightForHalo, 5.0);\nresult += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;\nvec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;\nif (dirtTexCoords.x > 1.0)\n{\ndirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);\n}\nif (dirtTexCoords.y > 1.0)\n{\ndirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);\n}\nresult += dirtAmount * texture2D(dirtTexture, dirtTexCoords);\nfloat camrot = czm_view[0].z + czm_view[1].y;\nfloat cosValue = cos(camrot);\nfloat sinValue = sin(camrot);\nmat3 rotation = mat3(\ncosValue, -sinValue, 0.0,\nsinValue, cosValue, 0.0,\n0.0, 0.0, 1.0\n);\nvec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);\nvec3 st2 = vec3((rotation * st1).xy, 1.0);\nvec3 st3 = st2 * 0.5 + vec3(0.5);\nvec2 lensStarTexcoord = st3.xy;\nfloat weightForLensFlare = length(vec3(sunPos.xy, 0.0));\nfloat oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);\nif (!isSpace)\n{\nresult *= oneMinusWeightForLensFlare * intensity * 0.2;\n}\nelse\n{\nresult *= oneMinusWeightForLensFlare * intensity;\nresult *= texture2D(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;\n}\nresult += texture2D(colorTexture, v_textureCoordinates);\ngl_FragColor = result;\n}\n",I$6="uniform sampler2D colorTexture;\nuniform vec3 white;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\ncolor = (color * (1.0 + color / white)) / (1.0 + color);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",X$6="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nfloat rand(vec2 co)\n{\nreturn fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);\n}\nvoid main(void)\n{\nfloat noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 green = vec3(0.0, 1.0, 0.0);\ngl_FragColor = vec4((noiseValue + rgb) * green, 1.0);\n}\n",Y$4="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\ncolor = color / (1.0 + color);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",M$9="uniform sampler2D colorTexture;\nuniform sampler2D silhouetteTexture;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec4 silhouetteColor = texture2D(silhouetteTexture, v_textureCoordinates);\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\ngl_FragColor = mix(color, silhouetteColor, silhouetteColor.a);\n}\n",G$9="uniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nuniform float scale;\nvoid main ()\n{\nvec4 oriColor = texture2D(colorTexture, v_textureCoordinates);\nvec4 fogColor = vec4(0.8, 0.8, 0.8, 0.5);\nfloat depth = texture2D(depthTexture, v_textureCoordinates).r;\nfloat f = (depth - 0.7) * min(1.0, max(scale, 0.0)) / 0.2;\ngl_FragColor = mix(oriColor, fogColor, clamp(f, 0.0, 1.0));\n}\n",j$7="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nuniform float speed;\nuniform float angle;\nfloat hash(float x){\nreturn fract(sin(x * 133.3) * 13.13);\n}\nvoid main(void){\nfloat time = czm_frameNumber / 60.0;\nvec2 resolution = czm_viewport.zw;\nvec2 uv = (gl_FragCoord.xy * 2.0 - resolution.xy) / min(resolution.x, resolution.y);\nvec3 c = vec3(0.6, 0.7, 0.8);\nfloat a = angle;\nfloat si = sin(a);\nfloat co = cos(a);\nuv *= mat2(co, -si, si, co);\nuv *= length(uv + vec2(0.0, 4.9)) * 0.3 + 1.0;\nfloat v = 1.0 - sin(hash(floor(uv.x * 100.0)) * 2.0);\nfloat b = clamp(abs(sin(speed * time * v + uv.y * (5.0 / (2.0 + v)))) - 0.95, 0.0, 1.0) * 20.0;\nc *= v * b;\ngl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c, 1.0), speed < 0.00001 ? 0.0 : 0.15);\n}\n",V$7="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nuniform int density;\nuniform float speed;\nuniform float angle;\nfloat snow(vec2 uv, float scale)\n{\nfloat time = czm_frameNumber / 60.0;\nfloat w = smoothstep(1.0 , 0.0, -uv.y * (scale / 10.0));\nif(w < 0.1) return 0.0;\nuv += time / scale;\nuv.y += time * cos(angle) * speed / scale;\nuv.x += sin(uv.y + time * sin(angle) * speed) / scale;\nuv *= scale;\nvec2 s = floor(uv);\nvec2 f = fract(uv);\nvec2 p;\nfloat k = 3.0;\nfloat d;\np = 0.5 + 0.35 * sin(11.0 * fract(sin((s + p + scale) * mat2(7, 3, 6, 5)) * 5.0)) - f;\nd = length(p);\nk = min(d, k);\nk = smoothstep(0.0, k, sin(f.x + f.y) * 0.01);\nreturn k * w * clamp(float(density) / 5.0, 1.0, 5.0);\n}\nvoid main(void){\nvec2 resolution = czm_viewport.zw;\nvec2 uv = (gl_FragCoord.xy * 2.0 - resolution.xy) / min(resolution.x, resolution.y);\nvec3 finalColor = vec3(0);\nfloat c = 0.0;\nfor (int i = 2; i < 5; i++) {\nif (density < i) {\nbreak;\n}\nc += snow(uv, float(i));\n}\nfor (int i = 6; i < 10; i+= 2) {\nif (density < i) {\nbreak;\n}\nc += snow(uv, float(i));\n}\nfor (int i = 15; i < 30; i+= 5) {\nif (density < i) {\nbreak;\n}\nc += snow(uv, float(i));\n}\nfinalColor = vec3(c);\nif(c > 0.8)\n{\nfinalColor = vec3(max(5.0, c));\n}\ngl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor, 1.0), 0.15);\n}\n",W$8="#define SMOOTH_STEPS 5\n#define REFLECTION_SAMPLES 64\n#define RIGHT_HANDED_SCENE\nuniform sampler2D colorTexture;\nuniform sampler2D reflectivitySampler;\nuniform sampler2D normalSampler;\nuniform sampler2D positionSampler;\nuniform float stepSize;\nuniform float strength;\nuniform float threshold;\nuniform float roughnessFactor;\nuniform float reflectionSpecularFalloffExponent;\nvarying vec2 v_textureCoordinates;\nstruct ReflectionInfo {\nvec3 color;\nvec4 coords;\n};\nvec3 fresnelSchlick(float cosTheta, vec3 F0)\n{\nreturn F0 + (1.0 - F0) * pow(1.0 - cosTheta, 5.0);\n}\nReflectionInfo smoothReflectionInfo(vec3 dir, vec3 hitCoord)\n{\nReflectionInfo info;\ninfo.color = vec3(0.0);\nvec4 projectedCoord;\nfloat sampledDepth;\nfor(int i = 0; i < SMOOTH_STEPS; i++)\n{\nprojectedCoord = czm_projection * vec4(hitCoord, 1.0);\nprojectedCoord.xy /= projectedCoord.w;\nprojectedCoord.xy = 0.5 * projectedCoord.xy + vec2(0.5);\nsampledDepth = (czm_view * texture2D(positionSampler, projectedCoord.xy)).z;\nfloat depth = sampledDepth - hitCoord.z;\ndir *= 0.5;\nif(depth > 0.0)\nhitCoord -= dir;\nelse\nhitCoord += dir;\ninfo.color += texture2D(colorTexture, projectedCoord.xy).rgb;\n}\nprojectedCoord = czm_projection * vec4(hitCoord, 1.0);\nprojectedCoord.xy /= projectedCoord.w;\nprojectedCoord.xy = 0.5 * projectedCoord.xy + vec2(0.5);\ninfo.coords = vec4(projectedCoord.xy, sampledDepth, 1.0);\ninfo.color += texture2D(colorTexture, projectedCoord.xy).rgb;\ninfo.color /= float(SMOOTH_STEPS + 1);\nreturn info;\n}\nReflectionInfo getReflectionInfo(vec3 dir, vec3 hitCoord)\n{\nvec3 endPos = hitCoord + dir;\nvec4 projetedEndPos = czm_projection * vec4(endPos, 1.0);\nprojetedEndPos/= projetedEndPos.w;\nprojetedEndPos.xyz = 0.5 * projetedEndPos.xyz + vec3(0.5);\nvec4 projectedStartPos = czm_projection * vec4(hitCoord, 1.0);\nprojectedStartPos /= projectedStartPos.w;\nprojectedStartPos.xyz = 0.5 * projectedStartPos.xyz + vec3(0.5);\nvec4 projectedDir = projetedEndPos - projectedStartPos;\nfloat step = 1.0 / length(projectedDir.xyz);\nReflectionInfo info;\nvec4 projectedCoord;\nfloat sampledDepth;\nfloat stepOffset = (v_textureCoordinates * czm_viewport.zw, 1.0) * step;\ndir *= stepOffset * stepSize;\nbool found = false;\nfor(int i = 0; i < REFLECTION_SAMPLES; i++)\n{\nhitCoord += dir;\nprojectedCoord = czm_projection * vec4(hitCoord, 1.0);\nprojectedCoord.xy /= projectedCoord.w;\nprojectedCoord.xy = 0.5 * projectedCoord.xy + vec2(0.5);\nsampledDepth = texture2D(positionSampler, projectedCoord.xy).z;\nfloat depth = sampledDepth - hitCoord.z;\n#ifdef RIGHT_HANDED_SCENE\ndepth *= -1.0;\n#endif\nvec3 curColor = texture2D(colorTexture, vec2(projectedCoord.x, projectedCoord.y)).rgb;\nvec4 curCoords = vec4(projectedCoord.xy, sampledDepth, 0.0);\nif(((depth - dir.z) < threshold) && depth <= 0.0 && !found)\n{\ninfo.color = curColor;\ninfo.coords = curCoords;\nfound = true;\n}\n}\nvec3 lastColor = texture2D(colorTexture, vec2(projectedCoord.x, projectedCoord.y)).rgb;\nvec4 lastCoords = vec4(projectedCoord.xy, sampledDepth, 0.0);\nif(!found){\ninfo.color = lastColor;\ninfo.coords = lastCoords;\n}\nreturn info;\n}\nvec3 hash(vec3 a)\n{\na = fract(a * 0.8);\na += dot(a, a.yxz + 19.19);\nreturn fract((a.xxy + a.yxx) * a.zyx);\n}\nvoid main(void){\nvec4 albedoFull = texture2D(colorTexture, v_textureCoordinates);\nvec3 albedo = albedoFull.rgb;\nfloat spec = texture2D(reflectivitySampler, v_textureCoordinates).r;\nfloat isSpecValid = 1.0;\nif (spec == 0.0) {\nisSpecValid = 0.0;\n}\nvec3 normal = (texture2D(normalSampler, v_textureCoordinates)).xyz;\nvec3 position = texture2D(positionSampler, v_textureCoordinates).xyz;\nvec3 reflected = normalize(reflect(normalize(position), normalize(normal)));\nfloat roughness = 1.0 - texture2D(reflectivitySampler, v_textureCoordinates).a;\nvec3 jitt = mix(vec3(0.0), hash(position), roughness) * roughnessFactor;\nReflectionInfo info = getReflectionInfo(jitt + reflected, position);\nvec2 dCoords = smoothstep(0.2, 0.6, abs(vec2(0.5, 0.5) - info.coords.xy));\nfloat screenEdgefactor = clamp(1.0 - (dCoords.x + dCoords.y), 0.0, 1.0);\nvec3 F0 = vec3(0.04);\nF0 = mix(F0, albedo, spec);\nvec3 fresnel = fresnelSchlick(max(dot(normalize(normal), normalize(position)), 0.0), F0);\n#ifdef RIGHT_HANDED_SCENE\nreflected.z *= -1.0;\n#endif\nfloat reflectionMultiplier = clamp(pow(spec * strength, reflectionSpecularFalloffExponent) * screenEdgefactor * reflected.z, 0.0, 0.9);\nfloat albedoMultiplier = 1.0 - reflectionMultiplier;\nvec3 SSR = info.color * fresnel;\ngl_FragColor = vec4((albedo * albedoMultiplier) + (SSR.xyz * reflectionMultiplier), 1.0);\n}\n",H$b="uniform sampler2D screenSpaceReflectionTexture;\nuniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec4 albedoFull = texture2D(colorTexture, v_textureCoordinates);\nvec3 albedo = albedoFull.rgb;\nvec4 SSR = texture2D(screenSpaceReflectionTexture, v_textureCoordinates);\nfloat reflectionMultiplier = SSR.a;\nfloat albedoMultiplier = 1.0 - reflectionMultiplier;\ngl_FragColor = vec4((albedo * albedoMultiplier) + (SSR.xyz * reflectionMultiplier), albedoFull.a);\n}\n",i$b={};function S$5(e){var t="#define USE_STEP_SIZE\n"+y$M,i=new p$h({name:e+"_x_direction",fragmentShader:t,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:e$i.LINEAR}),n=new p$h({name:e+"_y_direction",fragmentShader:t,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:e$i.LINEAR}),r={};return Object.defineProperties(r,{delta:{get:function(){return i.uniforms.delta},set:function(e){var t=i.uniforms,r=n.uniforms;t.delta=r.delta=e}},sigma:{get:function(){return i.uniforms.sigma},set:function(e){var t=i.uniforms,r=n.uniforms;t.sigma=r.sigma=e}},stepSize:{get:function(){return i.uniforms.stepSize},set:function(e){var t=i.uniforms,r=n.uniforms;t.stepSize=r.stepSize=e}}}),new s$f({name:e,stages:[i,n],uniforms:r})}function K$4(e){if(!e$2b(e))return i$b.createEdgeDetectionStage();for(var t=new s$f({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),i={},n="",r="",o=0;o<e.length;++o)n+="uniform sampler2D edgeTexture"+o+"; \n",r+=" vec4 edge"+o+" = texture2D(edgeTexture"+o+", v_textureCoordinates); \n if (edge"+o+".a > 0.0) \n { \n color = edge"+o+"; \n break; \n } \n",i["edgeTexture"+o]=e[o].name;return new s$f({name:"czm_edge_detection_composite",stages:[t,new p$h({name:"czm_edge_detection_combine",fragmentShader:n+"varying vec2 v_textureCoordinates; \nvoid main() { \n vec4 color = vec4(0.0); \n for (int i = 0; i < "+e.length+"; i++) \n { \n"+r+" } \n gl_FragColor = color; \n} \n",uniforms:i})]})}i$b.createBlurStage=function(){return S$5("czm_blur")},i$b.createDepthOfFieldStage=function(){var e=S$5("czm_depth_of_field_blur"),t=new p$h({name:"czm_depth_of_field_composite",fragmentShader:F$9,uniforms:{focalDistance:5,blurTexture:e.name}}),i={};return Object.defineProperties(i,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(e){t.uniforms.focalDistance=e}},delta:{get:function(){return e.uniforms.delta},set:function(t){e.uniforms.delta=t}},sigma:{get:function(){return e.uniforms.sigma},set:function(t){e.uniforms.sigma=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}}}),new s$f({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:i})},i$b.isDepthOfFieldSupported=function(e){return e.context.depthTexture},i$b.createEdgeDetectionStage=function(){return new p$h({name:"czm_edge_detection_"+e$1Q(),fragmentShader:P$a,uniforms:{length:.25,color:e$1U.clone(e$1U.BLACK)}})},i$b.isEdgeDetectionSupported=function(e){return e.context.depthTexture},i$b.createSilhouetteStage=function(e){var t=K$4(e);return new s$f({name:"czm_silhouette",stages:[t,new p$h({name:"czm_silhouette_color_edges",fragmentShader:M$9,uniforms:{silhouetteTexture:t.name}})],inputPreviousStageTexture:!1,uniforms:t.uniforms})},i$b.isSilhouetteSupported=function(e){return e.context.depthTexture},i$b.createBloomStage=function(){var e=new p$h({name:"czm_bloom_contrast_bias",fragmentShader:C$a,uniforms:{contrast:128,brightness:-.3}}),t=S$5("czm_bloom_blur"),i=new s$f({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),n=new p$h({name:"czm_bloom_generate_composite",fragmentShader:z$5,uniforms:{glowOnly:!1,bloomTexture:i.name}}),r={};return Object.defineProperties(r,{glowOnly:{get:function(){return n.uniforms.glowOnly},set:function(e){n.uniforms.glowOnly=e}},contrast:{get:function(){return e.uniforms.contrast},set:function(t){e.uniforms.contrast=t}},brightness:{get:function(){return e.uniforms.brightness},set:function(t){e.uniforms.brightness=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}}}),new s$f({name:"czm_bloom",stages:[i,n],inputPreviousStageTexture:!1,uniforms:r})},i$b.createAmbientOcclusionStage=function(){var e=new p$h({name:"czm_ambient_occlusion_generate",fragmentShader:A$c,uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=S$5("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;var i=new s$f({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),n=new p$h({name:"czm_ambient_occlusion_composite",fragmentShader:T$b,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:i.name}}),r={};return Object.defineProperties(r,{intensity:{get:function(){return e.uniforms.intensity},set:function(t){e.uniforms.intensity=t}},bias:{get:function(){return e.uniforms.bias},set:function(t){e.uniforms.bias=t}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(t){e.uniforms.lengthCap=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}},frustumLength:{get:function(){return e.uniforms.frustumLength},set:function(t){e.uniforms.frustumLength=t}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(t){e.uniforms.randomTexture=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},blurStepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}},ambientOcclusionOnly:{get:function(){return n.uniforms.ambientOcclusionOnly},set:function(e){n.uniforms.ambientOcclusionOnly=e}}}),new s$f({name:"czm_ambient_occlusion",stages:[i,n],inputPreviousStageTexture:!1,uniforms:r})},i$b.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var Z$8="#define FXAA_QUALITY_PRESET 39 \n#define FXAA_QUALITY_PS 12 \n#define FXAA_QUALITY_P0 1.0 \n#define FXAA_QUALITY_P1 1.0 \n#define FXAA_QUALITY_P2 1.0 \n#define FXAA_QUALITY_P3 1.0 \n#define FXAA_QUALITY_P4 1.0 \n#define FXAA_QUALITY_P5 1.5 \n#define FXAA_QUALITY_P6 2.0 \n#define FXAA_QUALITY_P7 2.0 \n#define FXAA_QUALITY_P8 2.0 \n#define FXAA_QUALITY_P9 2.0 \n#define FXAA_QUALITY_P10 4.0 \n#define FXAA_QUALITY_P11 8.0 \n"+k$I+"\n"+D$8,q$9=L$T;i$b.createFXAAStage=function(e){return new p$h({name:"czm_FXAA",fragmentShader:e.webgpu?q$9:Z$8,sampleMode:e$i.LINEAR})},i$b.createSnowStage=function(){return new p$h({name:"czm_SnowEffect",fragmentShader:V$7,uniforms:{density:5,angle:.1,speed:2},sampleMode:e$i.LINEAR})},i$b.createRainStage=function(){return new p$h({name:"czm_RainEffect",fragmentShader:j$7,uniforms:{speed:20,angle:-.4},sampleMode:e$i.LINEAR})},i$b.createFogStage=function(){return new p$h({name:"czm_FogEffect",fragmentShader:G$9,uniforms:{scale:1},sampleMode:e$i.LINEAR})},i$b.createAcesTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_aces",fragmentShader:t+=b$d,uniforms:{autoExposure:void 0}})},i$b.createFilmicTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_filmic",fragmentShader:t+=O$8,uniforms:{autoExposure:void 0}})},i$b.createReinhardTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_reinhard",fragmentShader:t+=Y$4,uniforms:{autoExposure:void 0}})},i$b.createModifiedReinhardTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_modified_reinhard",fragmentShader:t+=I$6,uniforms:{white:e$1U.WHITE,autoExposure:void 0}})},i$b.createAutoExposureStage=function(){return new a$h},i$b.createBlackAndWhiteStage=function(){return new p$h({name:"czm_black_and_white",fragmentShader:w$6,uniforms:{gradations:5}})},i$b.createBrightnessStage=function(){return new p$h({name:"czm_brightness",fragmentShader:E$9,uniforms:{brightness:.5}})},i$b.createNightVisionStage=function(){return new p$h({name:"czm_night_vision",fragmentShader:X$6})},i$b.createDepthViewStage=function(){return new p$h({name:"czm_depth_view",fragmentShader:R$9})},i$b.createLensFlareStage=function(){return new p$h({name:"czm_lens_flare",fragmentShader:U$8,uniforms:{dirtTexture:n$15("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:n$15("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,earthRadius:t$13.WGS84.maximumRadius}})},i$b.createOutlineStage=function(){var e=new p$h({name:"outline_copy",fragmentShader:ie$6}),t=new p$h({name:"outline_downSample",fragmentShader:["varying vec2 v_textureCoordinates;","void main()","{","gl_FragColor = texture2D(czm_maskTexture, v_textureCoordinates);","}"].join("\n"),textureScale:.5}),i=new p$h({name:"outline_edgeDetection",fragmentShader:["varying vec2 v_textureCoordinates;","uniform sampler2D colorTexture;","uniform vec2 colorTextureDimensions;","uniform vec3 visibleEdgeColor;","uniform vec3 hiddenEdgeColor;","void main() {","vec2 invSize = 1.0 / vec2(colorTextureDimensions.x, colorTextureDimensions.y);","vec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize);","vec4 c1 = texture2D( colorTexture, v_textureCoordinates + uvOffset.xy);","vec4 c2 = texture2D( colorTexture, v_textureCoordinates - uvOffset.xy);","vec4 c3 = texture2D( colorTexture, v_textureCoordinates + uvOffset.yw);","vec4 c4 = texture2D( colorTexture, v_textureCoordinates - uvOffset.yw);","float diff1 = (c1.r - c2.r)*0.5;","float diff2 = (c3.r - c4.r)*0.5;","float d = length( vec2(diff1, diff2) );","float a1 = min(c1.g, c2.g);","float a2 = min(c3.g, c4.g);","float visibilityFactor = min(a1, a2);","vec3 edgeColor = 1.0 - visibilityFactor > 0.001 ? visibleEdgeColor : hiddenEdgeColor;","gl_FragColor = vec4(edgeColor,1.0) * vec4(d);","}"].join("\n"),textureScale:.5,uniforms:{visibleEdgeColor:new e$1U(1,1,1),hiddenEdgeColor:new e$1U(.1,.04,.02)},sampleMode:e$i.LINEAR});i.visibleEdgeColor=new e$1U,i.hiddenEdgeColor=new e$1U;var n=["varying vec2 v_textureCoordinates;","uniform sampler2D colorTexture;","uniform vec2 colorTextureDimensions;","uniform vec2 direction;","uniform float kernelRadius;","float gaussianPdf(in float x, in float sigma) {","return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;","}","void main() {","vec2 invSize = 1.0 / colorTextureDimensions;","float weightSum = gaussianPdf(0.0, kernelRadius);","vec3 diffuseSum = texture2D( colorTexture, v_textureCoordinates).rgb * weightSum;","vec2 delta = direction * invSize * kernelRadius/float(4);","vec2 uvOffset = delta;","for( int i = 1; i <= 4; i ++ ) {","float w = gaussianPdf(uvOffset.x, kernelRadius);","vec3 sample1 = texture2D( colorTexture, v_textureCoordinates + uvOffset).rgb;","vec3 sample2 = texture2D( colorTexture, v_textureCoordinates - uvOffset).rgb;","diffuseSum += ((sample1 + sample2) * w);","weightSum += (2.0 * w);","uvOffset += delta;","}","gl_FragColor = vec4(diffuseSum/weightSum, 1.0);","}"].join("\n"),r=new p$h({name:"outline_blurHalf_X",fragmentShader:n,textureScale:.5,uniforms:{direction:{x:1,y:0},kernelRadius:1},sampleMode:e$i.LINEAR}),o=new p$h({name:"outline_blurHalf_Y",fragmentShader:n,textureScale:.5,uniforms:{direction:{x:0,y:1},kernelRadius:1},sampleMode:e$i.LINEAR}),a=new p$h({name:"outline_blurQuarter_X",fragmentShader:n,textureScale:.25,uniforms:{direction:{x:1,y:0},kernelRadius:4},sampleMode:e$i.LINEAR}),s=new p$h({name:"outline_blurQuarter_Y",fragmentShader:n,textureScale:.25,uniforms:{direction:{x:0,y:1},kernelRadius:4},sampleMode:e$i.LINEAR}),l=new p$h({name:"outline_overlayStage",fragmentShader:["varying vec2 v_textureCoordinates;","uniform sampler2D edgeTexture1;","uniform sampler2D edgeTexture2;","uniform float edgeStrength;","uniform float edgeGlow;","void main() {","vec4 edgeValue1 = texture2D(edgeTexture1, v_textureCoordinates);","vec4 edgeValue2 = texture2D(edgeTexture2, v_textureCoordinates);","vec4 maskColor = texture2D(czm_maskTexture, v_textureCoordinates);","vec4 edgeValue = edgeValue1 + edgeValue2 * edgeGlow;","vec4 finalColor = edgeStrength * maskColor.r * edgeValue;","gl_FragColor = finalColor;","}"].join("\n"),uniforms:{edgeStrength:3,edgeGlow:0,edgeTexture1:"outline_blurHalf_Y",edgeTexture2:"outline_blurQuarter_Y"},blendingState:Ee$r.ADDITIVE_BLEND,sampleMode:e$i.LINEAR}),u={};return Object.defineProperties(u,{visibleEdgeColor:{get:function(){return i.uniforms.visibleEdgeColor},set:function(e){i.uniforms.visibleEdgeColor=e$1U.clone(e)}},hiddenEdgeColor:{get:function(){return i.hiddenEdgeColor},set:function(e){i.uniforms.hiddenEdgeColor=e$1U.clone(e)}},edgeStrength:{get:function(){return l.uniforms.edgeStrength},set:function(e){l.uniforms.edgeStrength=e}},edgeGlow:{get:function(){return l.uniforms.edgeGlow},set:function(e){l.uniforms.edgeGlow=e}},edgeThickness:{get:function(){return r.uniforms.kernelRadius},set:function(e){r.uniforms.kernelRadius=e,o.uniforms.kernelRadius=e}}}),new s$f({name:"outline_overlay",stages:[e,t,i,r,o,a,s,l],inputPreviousStageTexture:!0,uniforms:u})},i$b.createScreenSpaceReflectionStage=function(e){var t=new p$h({name:"czm_Screen_Space_Reflection_Stage",fragmentShader:W$8,uniforms:{stepSize:1,strength:1,threshold:1.2,roughnessFactor:.2,reflectionSpecularFalloffExponent:3},sampleMode:e$i.LINEAR,prepassRenderer:e}),i=S$5("czm_Screen_Space_Reflection_blur");i.uniforms.stepSize=.35;var n=new s$f({name:"czm_Screen_Space_Reflection_Generate_blur",stages:[t,i]});new p$h({name:"czm_Screen_Space_Reflection_composite",fragmentShader:H$b,uniforms:{screenSpaceReflectionTexture:n.name},sampleMode:e$i.LINEAR,prepassRenderer:e});var r={};return Object.defineProperties(r,{stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}},strength:{get:function(){return t.uniforms.strength},set:function(e){t.uniforms.strength=e}},threshold:{get:function(){return t.uniforms.threshold},set:function(e){t.uniforms.threshold=e}},roughnessFactor:{get:function(){return t.uniforms.roughnessFactor},set:function(e){t.uniforms.roughnessFactor=e}},reflectionSpecularFalloffExponent:{get:function(){return t.uniforms.reflectionSpecularFalloffExponent},set:function(e){t.uniforms.reflectionSpecularFalloffExponent=e}}}),new s$f({name:"czm_Screen_Space_Reflection",stages:[t],inputPreviousStageTexture:!1,uniforms:r})};var I$5={REINHARD:0,MODIFIED_REINHARD:1,FILMIC:2,ACES:3,validate:function(e){return e===I$5.REINHARD||e===I$5.MODIFIED_REINHARD||e===I$5.FILMIC||e===I$5.ACES}},M$8=Object.freeze(I$5),T$a="precision highp float;\nprecision highp int;\nattribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvoid SMAAEdgeDetectionVS(vec2 texcoord) {\nfOffset[0] = texcoord.xyxy + u_resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );\nfOffset[1] = texcoord.xyxy + u_resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );\nfOffset[2] = texcoord.xyxy + u_resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 );\n}\nvoid main()\n{\ngl_Position = aPosition;\nv_textureCoordinates = textureCoordinates;\nSMAAEdgeDetectionVS(textureCoordinates);\n}\n",z$4="precision highp float;\nprecision highp int;\n#define SMAA_THRESHOLD 0.05\n#define SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR 2\n#define SMAA_USE_COLOR_EDGE_DETECTION 1\nuniform sampler2D inputColorTexture;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3]) {\nvec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );\nvec4 delta;\nvec3 C = texture2D( inputColorTexture, texcoord ).rgb;\nvec3 Cleft = texture2D( inputColorTexture, offset[0].xy ).rgb;\nvec3 t = abs( C - Cleft );\ndelta.x = max( max( t.r, t.g ), t.b );\nvec3 Ctop = texture2D( inputColorTexture, offset[0].zw ).rgb;\nt = abs( C - Ctop );\ndelta.y = max( max( t.r, t.g ), t.b );\nvec2 edges = step( threshold, delta.xy );\nvec3 Cright = texture2D( inputColorTexture, offset[1].xy ).rgb;\nvec3 Cbottom = texture2D( inputColorTexture, offset[1].zw ).rgb;\nvec3 Cleftleft = texture2D( inputColorTexture, offset[2].xy ).rgb;\nvec3 Ctoptop = texture2D( inputColorTexture, offset[2].zw ).rgb;\nif ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )\ndiscard;\nt = abs( C - Cright );\ndelta.z = max( max( t.r, t.g ), t.b );\nt = abs( C - Cbottom );\ndelta.w = max( max( t.r, t.g ), t.b );\nfloat maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );\nt = abs( C - Cleftleft );\ndelta.z = max( max( t.r, t.g ), t.b );\nt = abs( C - Ctoptop );\ndelta.w = max( max( t.r, t.g ), t.b );\nmaxDelta = max( max( maxDelta, delta.z ), delta.w );\nedges.xy *= step( maxDelta, float(SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR) * delta.xy );\nreturn vec4( edges, 0.0, 0.0 );\n}\nvoid main()\n{\ngl_FragColor = SMAAColorEdgeDetectionPS( v_textureCoordinates, fOffset);\n}\n",F$8="precision highp float;\nprecision highp int;\n#define SMAA_MAX_SEARCH_STEPS 8\nattribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvarying vec2 fPixCoord;\nvoid SMAABlendingWeightCalculationVS( vec2 texcoord ) {\nfPixCoord = texcoord / u_resolution;\nfOffset[ 0 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 );\nfOffset[ 1 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 );\nfOffset[ 2 ] = vec4( fOffset[ 0 ].xz, fOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * u_resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );\n}\nvoid main()\n{\ngl_Position = aPosition;\nv_textureCoordinates = textureCoordinates;\nSMAABlendingWeightCalculationVS( textureCoordinates );\n}\n",C$9="precision highp float;\nprecision highp int;\n#define SMAA_MAX_SEARCH_STEPS 8\n#define SMAA_AREATEX_MAX_DISTANCE 16\n#define SMAA_AREATEX_PIXEL_SIZE ( 1.0 / vec2( 160.0, 560.0 ) )\n#define SMAA_AREATEX_SUBTEX_SIZE ( 1.0 / 7.0 )\nuniform sampler2D tEdges;\nuniform sampler2D tArea;\nuniform sampler2D tSearch;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvarying vec2 fPixCoord;\nvec4 SMAASampleLevelZeroOffset(vec2 coord, ivec2 offset ){\nreturn texture2D( tEdges, coord + float( offset ) * u_resolution, 0.0 );\n}\nvec2 myRound( vec2 x ) {\nreturn sign( x ) * floor( abs( x ) + 0.5 );\n}\nfloat SMAASearchLength(vec2 e, float bias, float scale ) {\ne.r = bias + e.r * scale;\nreturn 255.0 * texture2D( tSearch, e, 0.0 ).r;\n}\nfloat SMAASearchXLeft(vec2 texcoord, float end ) {\nvec2 e = vec2( 0.0, 1.0 );\nbool found = false;\nfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\nvec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\nif(!found){\ntexcoord -= vec2( 2.0, 0.0 ) * u_resolution;\ne = pixel;\n}\nif(!found && ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 )){\nfound = true;\n}\n}\ntexcoord.x += 0.25 * u_resolution.x;\ntexcoord.x += u_resolution.x;\ntexcoord.x += 2.0 * u_resolution.x;\ntexcoord.x -= u_resolution.x * SMAASearchLength(e, 0.0, 0.5);\nreturn texcoord.x;\n}\nfloat SMAASearchXRight(vec2 texcoord, float end ) {\nvec2 e = vec2( 0.0, 1.0 );\nbool found = false;\nfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\nvec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\nif(!found){\ntexcoord += vec2( 2.0, 0.0 ) * u_resolution;\ne = pixel;\n}\nif (!found && ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) )\n{\nfound = true;\n}\n}\ntexcoord.x -= 0.25 * u_resolution.x;\ntexcoord.x -= u_resolution.x;\ntexcoord.x -= 2.0 * u_resolution.x;\ntexcoord.x += u_resolution.x * SMAASearchLength(e, 0.5, 0.5 );\nreturn texcoord.x;\n}\nfloat SMAASearchYUp(vec2 texcoord, float end ) {\nvec2 e = vec2( 1.0, 0.0 );\nbool found = false;\nfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\nvec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\nif(!found){\ntexcoord += vec2( 0.0, 2.0 ) * u_resolution;\ne = pixel;\n}\nif (!found && ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ){\nfound = true;\n}\n}\ntexcoord.y -= 0.25 * u_resolution.y;\ntexcoord.y -= u_resolution.y;\ntexcoord.y -= 2.0 * u_resolution.y;\ntexcoord.y += u_resolution.y * SMAASearchLength(e.gr, 0.0, 0.5 );\nreturn texcoord.y;\n}\nfloat SMAASearchYDown(vec2 texcoord, float end ) {\nvec2 e = vec2( 1.0, 0.0 );\nbool found = false;\nfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\nvec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\nif(!found){\ntexcoord -= vec2( 0.0, 2.0 ) * u_resolution;\ne = pixel;\n}\nif (!found && ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) {\nfound = true;\n}\n}\ntexcoord.y += 0.25 * u_resolution.y;\ntexcoord.y += u_resolution.y;\ntexcoord.y += 2.0 * u_resolution.y;\ntexcoord.y -= u_resolution.y * SMAASearchLength(e.gr, 0.5, 0.5 );\nreturn texcoord.y;\n}\nvec2 SMAAArea(vec2 dist, float e1, float e2, float offset ) {\nvec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * myRound( 4.0 * vec2( e1, e2 ) ) + dist;\ntexcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );\ntexcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;\nreturn texture2D( tArea, texcoord, 0.0 ).rg;\n}\nvec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], ivec4 subsampleIndices ) {\nvec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );\nvec2 e = texture2D( tEdges, texcoord ).rg;\nvec2 weightRG = vec2(0.0, 0.0);\nvec2 weightBA = vec2(0.0, 0.0);\n{\nvec2 d;\nvec2 coords;\ncoords.x = SMAASearchXLeft(offset[ 0 ].xy, offset[ 2 ].x );\ncoords.y = offset[ 1 ].y;\nd.x = coords.x;\nfloat e1 = texture2D( tEdges, coords, 0.0 ).r;\ncoords.x = SMAASearchXRight( offset[ 0 ].zw, offset[ 2 ].y );\nd.y = coords.x;\nd = d / u_resolution.x - pixcoord.x;\nvec2 sqrt_d = sqrt( abs( d ) );\ncoords.y -= 1.0 * u_resolution.y;\nfloat e2 = SMAASampleLevelZeroOffset( coords, ivec2( 1, 0 ) ).r;\nweightRG = SMAAArea(sqrt_d, e1, e2, float( subsampleIndices.y ) );\n}\n{\nvec2 d;\nvec2 coords;\ncoords.y = SMAASearchYUp(offset[ 1 ].xy, offset[ 2 ].z );\ncoords.x = offset[ 0 ].x;\nd.x = coords.y;\nfloat e1 = texture2D( tEdges, coords, 0.0 ).g;\ncoords.y = SMAASearchYDown(offset[ 1 ].zw, offset[ 2 ].w );\nd.y = coords.y;\nd = d / u_resolution.y - pixcoord.y;\nvec2 sqrt_d = sqrt( abs( d ) );\ncoords.y -= 1.0 * u_resolution.y;\nfloat e2 = SMAASampleLevelZeroOffset( coords, ivec2( 0, 1 ) ).g;\nweightBA = SMAAArea(sqrt_d, e1, e2, float( subsampleIndices.x ) );\n}\nif ( e.g > 0.0 ) {\nweights.rg = weightRG;\n}\nif ( e.r > 0.0 ) {\nweights.ba = weightBA;\n}\nreturn weights;\n}\nvoid main()\n{\ngl_FragColor = SMAABlendingWeightCalculationPS(v_textureCoordinates, fPixCoord, fOffset, ivec4(0.0));\n}\n",P$9="precision highp float;\nprecision highp int;\nattribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[2];\nvoid SMAANeighborhoodBlendingVS( vec2 texcoord ) {\nfOffset[ 0 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );\nfOffset[ 1 ] = texcoord.xyxy + u_resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );\n}\nvoid main()\n{\ngl_Position = aPosition;\nv_textureCoordinates = textureCoordinates;\nSMAANeighborhoodBlendingVS(textureCoordinates);\n}\n",W$7="precision highp float;\nprecision highp int;\n#define SMAA_DEBUG_SPLIT_VIEW 0\nuniform vec2 u_resolution;\nuniform sampler2D tBlendWeights;\nuniform sampler2D tColor;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[2];\nvec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 inOffset[ 2 ] ) {\nvec4 a;\na.xz = texture2D( tBlendWeights, texcoord ).xz;\na.y = texture2D( tBlendWeights, inOffset[ 1 ].zw ).g;\na.w = texture2D( tBlendWeights, inOffset[ 1 ].xy ).a;\nvec4 currentColor = texture2D( tColor, texcoord, 0.0 );\nvec2 offset;\noffset.x = a.a > a.b ? a.a : -a.b;\noffset.y = a.g > a.r ? -a.g : a.r;\nif ( abs( offset.x ) > abs( offset.y )) {\noffset.y = 0.0;\n} else {\noffset.x = 0.0;\n}\nvec4 C = currentColor;\ntexcoord += sign( offset ) * u_resolution;\nvec4 Cop = texture2D( tColor, texcoord, 0.0 );\nfloat s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );\nC.xyz = pow(C.xyz, vec3(2.2));\nCop.xyz = pow(Cop.xyz, vec3(2.2));\nvec4 mixed = mix(C, Cop, s);\nmixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));\nif ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {\nreturn currentColor;\n} else {\nreturn mixed;\n}\n}\nvoid main()\n{\ngl_FragColor = SMAANeighborhoodBlendingPS( v_textureCoordinates, fOffset);\n}\n";function i$a(){this._edgeDetectionCommand=void 0,this._weightCalculationCommand=void 0,this._neighborhoodBlendingCommand=void 0,this._upSamplePassState=new n$Z,this.enabled=!1,this.ready=!0,this._inputTexture=void 0,this._edgeDetectionFBO=void 0,this._weightFBO=void 0,this._blendingFBO=void 0,this._searchTexture=void 0,this._areaTexture=void 0,this._clearCommand=new t$X({color:new e$1U(0,0,0,0)}),this._resolution=new o$1o}function j$6(){return new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})}function H$a(){return new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}Object.defineProperties(i$a.prototype,{}),i$a.prototype.execute=function(e){var t=this._clearCommand;t.framebuffer=this._edgeDetectionFBO,t.execute(e),t.framebuffer=this._weightFBO,t.execute(e),t.framebuffer=this._blendingFBO,t.execute(e),this._edgeDetectionCommand.framebuffer=this._edgeDetectionFBO,this._edgeDetectionCommand.execute(e,this._upSamplePassState),this._weightCalculationCommand.framebuffer=this._weightFBO,this._weightCalculationCommand.execute(e,this._upSamplePassState),this._neighborhoodBlendingCommand.framebuffer=this._blendingFBO,this._neighborhoodBlendingCommand.execute(e,this._upSamplePassState)};var f$b=new f$18;i$a.prototype.update=function(e){if(this.enabled){this._context=e;var t=e.drawingBufferWidth,i=e.drawingBufferHeight;this._resolution.x=1/t,this._resolution.y=1/i;var n=this;if(!e$2b(this._searchTexture)){var r=new Image;r.src=this.getSearchTexture(),r.onload=function(){n._searchTexture=new t$V({context:e,source:this,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,flipY:!1,sampler:j$6()})}}if(!e$2b(this._areaTexture)){var o=new Image;o.src=this.getAreaTexture(),o.onload=function(){n._areaTexture=new t$V({context:e,source:this,pixelFormat:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE,flipY:!1,sampler:H$a()})}}e$2b(this._edgeDetectionCommand)||this.createCommand(e);var a=this._edgeDetectionFBO,s=e$2b(a)&&a.getColorTexture(0)||void 0;if(!e$2b(s)||s.width!==t||s.height!==i){this.createFBO(t,i,e),f$b.width=t,f$b.height=i;var l=d$1m.fromCache({viewport:f$b});this._edgeDetectionCommand.renderState=l,this._weightCalculationCommand.renderState=l,this._neighborhoodBlendingCommand.renderState=l}this._upSamplePassState.context=e}},i$a.prototype.createCommand=function(e){this._edgeDetectionCommand=e.createCustomViewportQuadCommand(T$a,z$4,{shaderProgramName:"SMAAEdgeDetection",uniformMap:{},owner:this});var t=new s$U({name:"blendingWeightCalculationFS",sources:[C$9]});e.webgl2&&t.defines.push("WEBGL2"),this._weightCalculationCommand=e.createCustomViewportQuadCommand(F$8,t,{shaderProgramName:"SMAABlendingWeightCalculation",uniformMap:{},owner:this}),this._neighborhoodBlendingCommand=e.createCustomViewportQuadCommand(P$9,W$7,{shaderProgramName:"SMAANeighborhoodBlending",uniformMap:{},owner:this}),this.createUniformMap()},i$a.prototype.createUniformMap=function(){if(e$2b(this._edgeDetectionCommand)){var e=this;this._edgeDetectionCommand.uniformMap.inputColorTexture=function(){return e._inputTexture},this._edgeDetectionCommand.uniformMap.u_resolution=function(){return e._resolution},this._weightCalculationCommand.uniformMap.tEdges=function(){return e._edgeDetectionFBO.getColorTexture(0)},this._weightCalculationCommand.uniformMap.tArea=function(){return e$2b(e._areaTexture)?e._areaTexture:e._context.defaultTexture},this._weightCalculationCommand.uniformMap.tSearch=function(){return e$2b(e._searchTexture)?e._searchTexture:e._context.defaultTexture},this._weightCalculationCommand.uniformMap.u_resolution=function(){return e._resolution},this._neighborhoodBlendingCommand.uniformMap.tColor=function(){return e._inputTexture},this._neighborhoodBlendingCommand.uniformMap.tBlendWeights=function(){return e._weightFBO.getColorTexture(0)},this._neighborhoodBlendingCommand.uniformMap.u_resolution=function(){return e._resolution}}},i$a.prototype.createFBO=function(e,t,i){e$2b(this._edgeDetectionFBO)||this.destroyFBO();var n=_$$.UNSIGNED_BYTE;this._edgeDetectionFBO=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:V$10.RGBA})]}),this._weightFBO=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:V$10.RGBA})]}),this._blendingFBO=new t$W({context:i,colorTextures:[new t$V({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:V$10.RGBA})]})},i$a.prototype.setInputTexture=function(e){this._inputTexture=e},i$a.prototype.getSMAATexture=function(){return this._blendingFBO.getColorTexture(0)},i$a.prototype.isDestroyed=function(){return!1},i$a.prototype.destroyFBO=function(){this._edgeDetectionFBO=this._edgeDetectionFBO&&!this._edgeDetectionFBO.isDestroyed()&&this._edgeDetectionFBO.destroy(),this._weightFBO=this._weightFBO&&!this._weightFBO.isDestroyed()&&this._weightFBO.destroy(),this._blendingFBO=this._blendingFBO&&!this._blendingFBO.isDestroyed()&&this._blendingFBO.destroy()},i$a.prototype.destroy=function(){return this.destroyFBO(),this._edgeDetectionCommand=this._edgeDetectionCommand&&this._edgeDetectionCommand.shaderProgram&&this._edgeDetectionCommand.shaderProgram.destroy(),this._weightCalculationCommand=this._weightCalculationCommand&&this._weightCalculationCommand.shaderProgram&&this._weightCalculationCommand.shaderProgram.destroy(),this._neighborhoodBlendingCommand=this._neighborhoodBlendingCommand&&this._neighborhoodBlendingCommand.shaderProgram&&this._neighborhoodBlendingCommand.shaderProgram.destroy(),i$10(this)},i$a.prototype.getAreaTexture=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAIAAACOVPcQAACBeklEQVR42u39W4xlWXrnh/3WWvuciIzMrKxrV8/0rWbY0+SQFKcb4owIkSIFCjY9AC1BT/LYBozRi+EX+cV+8IMsYAaCwRcBwjzMiw2jAWtgwC8WR5Q8mDFHZLNHTarZGrLJJllt1W2qKrsumZWZcTvn7L3W54e1vrXX3vuciLPPORFR1XE2EomorB0nVuz//r71re/y/1eMvb4Cb3N11xV/PP/2v4UBAwJG/7H8urx6/25/Gf8O5hypMQ0EEEQwAqLfoN/Z+97f/SW+/NvcgQk4sGBJK6H7N4PFVL+K+e0N11yNfkKvwUdwdlUAXPHHL38oa15f/i/46Ih6SuMSPmLAYAwyRKn7dfMGH97jaMFBYCJUgotIC2YAdu+LyW9vvubxAP8kAL8H/koAuOKP3+q6+xGnd5kdYCeECnGIJViwGJMAkQKfDvB3WZxjLKGh8VSCCzhwEWBpMc5/kBbjawT4HnwJfhr+pPBIu7uu+OOTo9vsmtQcniMBGkKFd4jDWMSCRUpLjJYNJkM+IRzQ+PQvIeAMTrBS2LEiaiR9b/5PuT6Ap/AcfAFO4Y3dA3DFH7/VS+M8k4baEAQfMI4QfbVDDGIRg7GKaIY52qAjTAgTvGBAPGIIghOCYAUrGFNgzA7Q3QhgCwfwAnwe5vDejgG44o/fbm1C5ZlYQvQDARPAIQGxCWBM+wWl37ZQESb4gImexGMDouhGLx1Cst0Saa4b4AqO4Hk4gxo+3DHAV/nx27p3JziPM2pVgoiia5MdEzCGULprIN7gEEeQ5IQxEBBBQnxhsDb5auGmAAYcHMA9eAAz8PBol8/xij9+C4Djlim4gJjWcwZBhCBgMIIYxGAVIkH3ZtcBuLdtRFMWsPGoY9rN+HoBji9VBYdwD2ZQg4cnO7OSq/z4rU5KKdwVbFAjNojCQzTlCLPFSxtamwh2jMUcEgg2Wm/6XgErIBhBckQtGN3CzbVacERgCnfgLswhnvqf7QyAq/z4rRZm1YglYE3affGITaZsdIe2FmMIpnOCap25I6jt2kCwCW0D1uAD9sZctNGXcQIHCkINDQgc78aCr+zjtw3BU/ijdpw3zhCwcaONwBvdeS2YZKkJNJsMPf2JKEvC28RXxxI0ASJyzQCjCEQrO4Q7sFArEzjZhaFc4cdv+/JFdKULM4px0DfUBI2hIsy06BqLhGTQEVdbfAIZXYMPesq6VoCHICzUyjwInO4Y411//LYLs6TDa9wvg2CC2rElgAnpTBziThxaL22MYhzfkghz6GAs2VHbbdM91VZu1MEEpupMMwKyVTb5ij9+u4VJG/5EgEMMmFF01cFai3isRbKbzb+YaU/MQbAm2XSMoUPAmvZzbuKYRIFApbtlrfFuUGd6vq2hXNnH78ZLh/iFhsQG3T4D1ib7k5CC6vY0DCbtrohgLEIClXiGtl10zc0CnEGIhhatLBva7NP58Tvw0qE8yWhARLQ8h4+AhQSP+I4F5xoU+VilGRJs6wnS7ruti/4KvAY/CfdgqjsMy4pf8fodQO8/gnuX3f/3xi3om1/h7THr+co3x93PP9+FBUfbNUjcjEmhcrkT+8K7ml7V10Jo05mpIEFy1NmCJWx9SIKKt+EjAL4Ez8EBVOB6havuT/rByPvHXK+9zUcfcbb254+9fydJknYnRr1oGfdaiAgpxu1Rx/Rek8KISftx3L+DfsLWAANn8Hvw0/AFeAGO9DFV3c6D+CcWbL8Dj9e7f+T1k8AZv/d7+PXWM/Z+VvdCrIvuAKO09RpEEQJM0Ci6+B4xhTWr4cZNOvhktabw0ta0rSJmqz3Yw5/AKXwenod7cAhTmBSPKf6JBdvH8IP17h95pXqw50/+BFnj88fev4NchyaK47OPhhtI8RFSvAfDSNh0Ck0p2gLxGkib5NJj/JWCr90EWQJvwBzO4AHcgztwAFN1evHPUVGwfXON+0debT1YeGON9Yy9/63X+OguiwmhIhQhD7l4sMqlG3D86Suc3qWZ4rWjI1X7u0Ytw6x3rIMeIOPDprfe2XzNgyj6PahhBjO4C3e6puDgXrdg+/5l948vF3bqwZetZ+z9Rx9zdIY5pInPK4Nk0t+l52xdK2B45Qd87nM8fsD5EfUhIcJcERw4RdqqH7Yde5V7m1vhNmtedkz6EDzUMF/2jJYWbC+4fzzA/Y+/8PPH3j9dcBAPIRP8JLXd5BpAu03aziOL3VVHZzz3CXWDPWd+SH2AnxIqQoTZpo9Ckc6HIrFbAbzNmlcg8Ag8NFDDAhbJvTBZXbC94P7t68EXfv6o+21gUtPETU7bbkLxvNKRFG2+KXzvtObonPP4rBvsgmaKj404DlshFole1Glfh02fE7bYR7dZ82oTewIBGn1Md6CG6YUF26X376oevOLzx95vhUmgblI6LBZwTCDY7vMq0op5WVXgsObOXJ+1x3qaBl9j1FeLxbhU9w1F+Wiba6s1X/TBz1LnUfuYDi4r2C69f1f14BWfP+p+W2GFKuC9phcELMYRRLur9DEZTUdEH+iEqWdaM7X4WOoPGI+ZYD2+wcQ+y+ioHUZ9dTDbArzxmi/bJI9BND0Ynd6lBdve/butBw8+f/T9D3ABa3AG8W3VPX4hBin+bj8dMMmSpp5pg7fJ6xrBFE2WQQEWnV8Qg3FbAWzYfM1rREEnmvkN2o1+acG2d/9u68GDzx91v3mAjb1zkpqT21OipPKO0b9TO5W0nTdOmAQm0TObts3aBKgwARtoPDiCT0gHgwnbArzxmtcLc08HgF1asN0C4Ms/fvD5I+7PhfqyXE/b7RbbrGyRQRT9ARZcwAUmgdoz0ehJ9Fn7QAhUjhDAQSw0bV3T3WbNa59jzmiP6GsWbGXDX2ytjy8+f9T97fiBPq9YeLdBmyuizZHaqXITnXiMUEEVcJ7K4j3BFPurtB4bixW8wTpweL8DC95szWMOqucFYGsWbGU7p3TxxxefP+r+oTVktxY0v5hbq3KiOKYnY8ddJVSBxuMMVffNbxwIOERShst73HZ78DZrHpmJmH3K6sGz0fe3UUj0eyRrSCGTTc+rjVNoGzNSv05srAxUBh8IhqChiQgVNIIBH3AVPnrsnXQZbLTm8ammv8eVXn/vWpaTem5IXRlt+U/LA21zhSb9cye6jcOfCnOwhIAYXAMVTUNV0QhVha9xjgA27ODJbLbmitt3tRN80lqG6N/khgot4ZVlOyO4WNg3OIMzhIZQpUEHieg2im6F91hB3I2tubql6BYNN9Hj5S7G0G2tahslBWKDnOiIvuAEDzakDQKDNFQT6gbn8E2y4BBubM230YIpBnDbMa+y3dx0n1S0BtuG62lCCXwcY0F72T1VRR3t2ONcsmDjbmzNt9RFs2LO2hQNyb022JisaI8rAWuw4HI3FuAIhZdOGIcdjLJvvObqlpqvWTJnnQbyi/1M9O8UxWhBs//H42I0q1Yb/XPGONzcmm+ri172mHKvZBpHkJaNJz6v9jxqiklDj3U4CA2ugpAaYMWqNXsdXbmJNd9egCnJEsphXNM+MnK3m0FCJ5S1kmJpa3DgPVbnQnPGWIDspW9ozbcO4K/9LkfaQO2KHuqlfFXSbdNzcEcwoqNEFE9zcIXu9/6n/ym/BC/C3aJLzEKPuYVlbFnfhZ8kcWxV3dbv4bKl28566wD+8C53aw49lTABp9PWbsB+knfc/Li3eVizf5vv/xmvnPKg5ihwKEwlrcHqucuVcVOxEv8aH37E3ZqpZypUulrHEtIWKUr+txHg+ojZDGlwnqmkGlzcVi1dLiNSJiHjfbRNOPwKpx9TVdTn3K05DBx4psIk4Ei8aCkJahRgffk4YnEXe07T4H2RR1u27E6wfQsBDofUgjFUFnwC2AiVtA+05J2zpiDK2Oa0c5fmAecN1iJzmpqFZxqYBCYhFTCsUNEmUnIcZ6aEA5rQVhEywG6w7HSW02XfOoBlQmjwulOFQAg66SvJblrTEX1YtJ3uG15T/BH1OfOQeuR8g/c0gdpT5fx2SKbs9EfHTKdM8A1GaJRHLVIwhcGyydZsbifAFVKl5EMKNU2Hryo+06BeTgqnxzYjThVySDikbtJPieco75lYfKAJOMEZBTjoITuWHXXZVhcUDIS2hpiXHV9Ku4u44bN5OYLDOkJo8w+xJSMbhBRHEdEs9JZUCkQrPMAvaHyLkxgkEHxiNkx/x2YB0mGsQ8EUWj/stW5YLhtS5SMu+/YBbNPDCkGTUybN8krRLBGPlZkVOA0j+a1+rkyQKWGaPHPLZOkJhioQYnVZ2hS3zVxMtgC46KuRwbJNd9nV2PHgb36F194ecf/Yeu2vAFe5nm/bRBFrnY4BauE8ERmZRFUn0k8hbftiVYSKMEme2dJCJSCGYAlNqh87bXOPdUkGy24P6d1ll21MBqqx48Fvv8ZHH8HZFY7j/uAq1xMJUFqCSUlJPmNbIiNsmwuMs/q9CMtsZsFO6SprzCS1Z7QL8xCQClEelpjTduDMsmWD8S1PT152BtvmIGvUeDA/yRn83u/x0/4qxoPHjx+PXY9pqX9bgMvh/Nz9kpP4pOe1/fYf3axUiMdHLlPpZCNjgtNFAhcHEDxTumNONhHrBduW+vOyY++70WWnPXj98eA4kOt/mj/5E05l9+O4o8ePx67HFqyC+qSSnyselqjZGaVK2TadbFLPWAQ4NBhHqDCCV7OTpo34AlSSylPtIdd2AJZlyzYQrDJ5lcWGNceD80CunPLGGzsfD+7wRb95NevJI5docQ3tgCyr5bGnyaPRlmwNsFELViOOx9loebGNq2moDOKpHLVP5al2cymWHbkfzGXL7kfRl44H9wZy33tvt+PB/Xnf93e+nh5ZlU18wCiRUa9m7kib9LYuOk+hudQNbxwm0AQqbfloimaB2lM5fChex+ylMwuTbfmXQtmWlenZljbdXTLuOxjI/fDDHY4Hjx8/Hrse0zXfPFxbUN1kKqSCCSk50m0Ajtx3ub9XHBKHXESb8iO6E+qGytF4nO0OG3SXzbJlhxBnKtKyl0NwybjvYCD30aMdjgePHz8eu56SVTBbgxJMliQ3Oauwg0QHxXE2Ez/EIReLdQj42Gzb4CLS0YJD9xUx7bsi0vJi5mUbW1QzL0h0PFk17rtiIPfJk52MB48fPx67npJJwyrBa2RCCQRTbGZSPCxTPOiND4G2pYyOQ4h4jINIJh5wFU1NFZt+IsZ59LSnDqBjZ2awbOku+yInunLcd8VA7rNnOxkPHj9+PGY9B0MWJJNozOJmlglvDMXDEozdhQWbgs/U6oBanGzLrdSNNnZFjOkmbi5bNt1lX7JLLhn3vXAg9/h4y/Hg8ePHI9dzQMEkWCgdRfYykYKnkP7D4rIujsujaKPBsB54vE2TS00ccvFY/Tth7JXeq1hz+qgVy04sAJawTsvOknHfCwdyT062HA8eP348Zj0vdoXF4pilKa2BROed+9fyw9rWRXeTFXESMOanvDZfJuJaSXouQdMdDJZtekZcLLvEeK04d8m474UDuaenW44Hjx8/Xns9YYqZpszGWB3AN/4VHw+k7WSFtJ3Qicuqb/NlVmgXWsxh570xg2UwxUw3WfO6B5nOuO8aA7lnZxuPB48fPx6znm1i4bsfcbaptF3zNT78eFPtwi1OaCNOqp1x3zUGcs/PN++AGD1+fMXrSVm2baTtPhPahbPhA71wIHd2bXzRa69nG+3CraTtPivahV/55tXWg8fyRY/9AdsY8VbSdp8V7cKrrgdfM//z6ILQFtJ2nxHtwmuoB4/kf74+gLeRtvvMaBdeSz34+vifx0YG20jbfTa0C6+tHrwe//NmOG0L8EbSdp8R7cLrrQe/996O+ai3ujQOskpTNULa7jOjXXj99eCd8lHvoFiwsbTdZ0a78PrrwTvlo966pLuRtB2fFe3Cm6oHP9kNH/W2FryxtN1nTLvwRurBO+Kj3pWXHidtx2dFu/Bm68Fb81HvykuPlrb7LGkX3mw9eGs+6h1Y8MbSdjegXcguQLjmevDpTQLMxtJ2N6NdyBZu9AbrwVvwUW+LbteULUpCdqm0HTelXbhNPe8G68Gb8lFvVfYfSNuxvrTdTWoXbozAzdaDZzfkorOj1oxVxlIMlpSIlpLrt8D4hrQL17z+c3h6hU/wv4Q/utps4+bm+6P/hIcf0JwQ5oQGPBL0eKPTYEXTW+eL/2DKn73J9BTXYANG57hz1cEMviVf/4tf5b/6C5pTQkMIWoAq7hTpOJjtAM4pxKu5vg5vXeUrtI09/Mo/5H+4z+Mp5xULh7cEm2QbRP2tFIKR7WM3fPf/jZ3SWCqLM2l4NxID5zB72HQXv3jj/8mLR5xXNA5v8EbFQEz7PpRfl1+MB/hlAN65qgDn3wTgH13hK7T59bmP+NIx1SHHU84nLOITt3iVz8mNO+lPrjGAnBFqmioNn1mTyk1ta47R6d4MrX7tjrnjYUpdUbv2rVr6YpVfsGG58AG8Ah9eyUN8CX4WfgV+G8LVWPDGb+Zd4cU584CtqSbMKxauxTg+dyn/LkVgA+IR8KHtejeFKRtTmLLpxN6mYVLjYxwXf5x2VofiZcp/lwKk4wGOpYDnoIZPdg/AAbwMfx0+ge9dgZvYjuqKe4HnGnykYo5TvJbG0Vj12JagRhwKa44H95ShkZa5RyLGGdfYvG7aw1TsF6iapPAS29mNS3NmsTQZCmgTzFwgL3upCTgtBTRwvGMAKrgLn4evwin8+afJRcff+8izUGUM63GOOuAs3tJkw7J4kyoNreqrpO6cYLQeFUd7TTpr5YOTLc9RUUogUOVJQ1GYJaFLAW0oTmKyYS46ZooP4S4EON3xQ5zC8/CX4CnM4c1PE8ApexpoYuzqlP3d4S3OJP8ZDK7cKWNaTlqmgDiiHwl1YsE41w1zT4iRTm3DBqxvOUsbMKKDa/EHxagtnta072ejc3DOIh5ojvh8l3tk1JF/AV6FU6jh3U8HwEazLgdCLYSQ+MYiAI2ltomkzttUb0gGHdSUUgsIYjTzLG3mObX4FBRaYtpDVNZrih9TgTeYOBxsEnN1gOCTM8Bsw/ieMc75w9kuAT6A+/AiHGvN/+Gn4KRkiuzpNNDYhDGFndWRpE6SVfm8U5bxnSgVV2jrg6JCKmneqey8VMFgq2+AM/i4L4RUbfSi27lNXZ7R7W9RTcq/q9fk4Xw3AMQd4I5ifAZz8FcVtm9SAom/dyN4lczJQW/kC42ZrHgcCoIf1oVMKkVItmMBi9cOeNHGLqOZk+QqQmrbc5YmYgxELUUN35z2iohstgfLIFmcMV7s4CFmI74L9+EFmGsi+tGnAOD4Yk9gIpo01Y4cA43BWGygMdr4YZekG3OBIUXXNukvJS8tqa06e+lSDCtnqqMFu6hWHXCF+WaYt64m9QBmNxi7Ioy7D+fa1yHw+FMAcPt7SysFLtoG4PXAk7JOA3aAxBRqUiAdU9Yp5lK3HLSRFtOim0sa8euEt08xvKjYjzeJ2GU7YawexrnKI9tmobInjFXCewpwriY9+RR4aaezFhMhGCppKwom0ChrgFlKzyPKkGlTW1YQrE9HJqu8hKGgMc6hVi5QRq0PZxNfrYNgE64utmRv6KKHRpxf6VDUaOvNP5jCEx5q185My/7RKz69UQu2im5k4/eownpxZxNLwiZ1AZTO2ZjWjkU9uaB2HFn6Q3u0JcsSx/qV9hTEApRzeBLDJQXxYmTnq7bdLa3+uqFrxLJ5w1TehnNHx5ECvCh2g2c3hHH5YsfdaSKddztfjQ6imKFGSyFwlLzxEGPp6r5IevVjk1AMx3wMqi1NxDVjLBiPs9tbsCkIY5we5/ML22zrCScFxnNtzsr9Wcc3CnD+pYO+4VXXiDE0oc/vQQ/fDK3oPESJMYXNmJa/DuloJZkcTpcYE8lIH8Dz8DJMiynNC86Mb2lNaaqP/+L7f2fcE/yP7/Lde8xfgSOdMxvOixZf/9p3+M4hT1+F+zApxg9XfUvYjc8qX2lfOOpK2gNRtB4flpFu9FTKCp2XJRgXnX6olp1zyYjTKJSkGmLE2NjUr1bxFM4AeAAHBUFIeSLqXR+NvH/M9fOnfHzOD2vCSyQJKzfgsCh+yi/Mmc35F2fUrw7miW33W9hBD1vpuUojFphIyvg7aTeoymDkIkeW3XLHmguMzbIAJejN6B5MDrhipE2y6SoFRO/AK/AcHHZHNIfiWrEe/C6cr3f/yOvrQKB+zMM55/GQdLDsR+ifr5Fiuu+/y+M78LzOE5dsNuXC3PYvYWd8NXvphLSkJIasrlD2/HOqQ+RjcRdjKTGWYhhVUm4yxlyiGPuMsZR7sMCHUBeTuNWA7if+ifXgc/hovftHXs/DV+Fvwe+f8shzMiMcweFgBly3//vwJfg5AN4450fn1Hd1Rm1aBLu22Dy3y3H2+OqMemkbGZ4jozcDjJf6596xOLpC0eMTHbKnxLxH27uZ/bMTGs2jOaMOY4m87CfQwF0dw53oa1k80JRuz/XgS+8fX3N9Af4qPIMfzKgCp4H5TDGe9GGeFPzSsZz80SlPTxXjgwJmC45njzgt2vbQ4b4OAdUK4/vWhO8d8v6EE8fMUsfakXbPpFJeLs2ubM/qdm/la3WP91uWhxXHjoWhyRUq2iJ/+5mA73zwIIo+LoZ/SgvIRjAd1IMvvn98PfgOvAJfhhm8scAKVWDuaRaK8aQ9f7vuPDH6Bj47ZXau7rqYJ66mTDwEDU6lLbCjCK0qTXyl5mnDoeNRxanj3FJbaksTk0faXxHxLrssgPkWB9LnA/MFleXcJozzjwsUvUG0X/QCve51qkMDXp9mtcyOy3rwBfdvVJK7D6/ACSzg3RoruIq5UDeESfEmVclDxnniU82vxMLtceD0hGZWzBNPMM/jSPne2OVatiTKUpY5vY7gc0LdUAWeWM5tH+O2I66AOWw9xT2BuyRVLGdoDHUsVRXOo/c+ZdRXvFfnxWyIV4upFLCl9eAL7h8Zv0QH8Ry8pA2cHzQpGesctVA37ZtklBTgHjyvdSeKY/RZw/kJMk0Y25cSNRWSigQtlULPTw+kzuJPeYEkXjQRpoGZobYsLF79pyd1dMRHInbgFTZqNLhDqiIsTNpoex2WLcy0/X6rHcdMMQvFSd5dWA++4P7xv89deACnmr36uGlL69bRCL6BSZsS6c0TU2TKK5gtWCzgAOOwQcurqk9j8whvziZSMLcq5hbuwBEsYjopUBkqw1yYBGpLA97SRElEmx5MCInBY5vgLk94iKqSWmhIGmkJ4Bi9m4L645J68LyY4wsFYBfUg5feP/6gWWm58IEmKQM89hq7KsZNaKtP5TxxrUZZVkNmMJtjbKrGxLNEbHPJxhqy7lAmbC32ZqeF6lTaknRWcYaFpfLUBh/rwaQycCCJmW15Kstv6jRHyJFry2C1ahkkIW0LO75s61+owxK1y3XqweX9m5YLM2DPFeOjn/iiqCKJ+yKXF8t5Yl/kNsqaSCryxPq5xWTFIaP8KSW0RYxqupaUf0RcTNSSdJZGcKYdYA6kdtrtmyBckfKXwqk0pHpUHlwWaffjNRBYFPUDWa8e3Lt/o0R0CdisKDM89cX0pvRHEfM8ca4t0s2Xx4kgo91MPQJ/0c9MQYq0co8MBh7bz1fio0UUHLR4aAIOvOmoYO6kwlEVODSSTliWtOtH6sPkrtctF9ZtJ9GIerBskvhdVS5cFNv9s1BU0AbdUgdK4FG+dRnjFmDTzniRMdZO1QhzMK355vigbdkpz9P6qjUGE5J2qAcXmwJ20cZUiAD0z+pGMx6xkzJkmEf40Hr4qZfVg2XzF9YOyoV5BjzVkUJngKf8lgNYwKECEHrCNDrWZzMlflS3yBhr/InyoUgBc/lKT4pxVrrC6g1YwcceK3BmNxZcAtz3j5EIpqguh9H6wc011YN75cKDLpFDxuwkrPQmUwW4KTbj9mZTwBwLq4aQMUZbHm1rylJ46dzR0dua2n3RYCWZsiHROeywyJGR7mXKlpryyCiouY56sFkBWEnkEB/raeh/Sw4162KeuAxMQpEkzy5alMY5wamMsWKKrtW2WpEWNnReZWONKWjrdsKZarpFjqCslq773PLmEhM448Pc3+FKr1+94vv/rfw4tEcu+lKTBe4kZSdijBrykwv9vbCMPcLQTygBjzVckSLPRVGslqdunwJ4oegtFOYb4SwxNgWLCmD7T9kVjTv5YDgpo0XBmN34Z/rEHp0sgyz7lngsrm4lvMm2Mr1zNOJYJ5cuxuQxwMGJq/TP5emlb8fsQBZviK4t8hFL+zbhtlpwaRSxQRWfeETjuauPsdGxsBVdO7nmP4xvzSoT29pRl7kGqz+k26B3Oy0YNV+SXbbQas1ctC/GarskRdFpKczVAF1ZXnLcpaMuzVe6lZ2g/1ndcvOVgRG3sdUAY1bKD6achijMPdMxV4muKVorSpiDHituH7rSTs7n/4y5DhRXo4FVBN4vO/zbAcxhENzGbHCzU/98Mcx5e7a31kWjw9FCe/zNeYyQjZsWb1uc7U33pN4Mji6hCLhivqfa9Ss6xLg031AgfesA/l99m9fgvnaF9JoE6bYKmkGNK3aPbHB96w3+DnxFm4hs0drLsk7U8kf/N/CvwQNtllna0rjq61sH8L80HAuvwH1tvBy2ChqWSCaYTaGN19sTvlfzFD6n+iKTbvtayfrfe9ueWh6GJFoxLdr7V72a5ZpvHcCPDzma0wTO4EgbLyedxstO81n57LYBOBzyfsOhUKsW1J1BB5vr/tz8RyqOFylQP9Tvst2JALsC5lsH8PyQ40DV4ANzYa4dedNiKNR1s+x2wwbR7q4/4cTxqEk4LWDebfisuo36JXLiWFjOtLrlNWh3K1rRS4xvHcDNlFnNmWBBAl5SWaL3oPOfnvbr5pdjVnEaeBJSYjuLEkyLLsWhKccadmOphZkOPgVdalj2QpSmfOsADhMWE2ZBu4+EEJI4wKTAuCoC4xwQbWXBltpxbjkXJtKxxabo9e7tyhlgb6gNlSbUpMh+l/FaqzVwewGu8BW1Zx7pTpQDJUjb8tsUTW6+GDXbMn3mLbXlXJiGdggxFAoUrtPS3wE4Nk02UZG2OOzlk7fRs7i95QCLo3E0jtrjnM7SR3uS1p4qtS2nJ5OwtQVHgOvArLBFijZUV9QtSl8dAY5d0E0hM0w3HS2DpIeB6m/A1+HfhJcGUq4sOxH+x3f5+VO+Ds9rYNI7zPXOYWPrtf8bYMx6fuOAX5jzNR0PdsuON+X1f7EERxMJJoU6GkTEWBvVolVlb5lh3tKCg6Wx1IbaMDdJ+9sUCc5KC46hKGCk3IVOS4TCqdBNfUs7Kd4iXf2RjnT/LLysJy3XDcHLh/vde3x8DoGvwgsa67vBk91G5Pe/HbOe7xwym0NXbtiuuDkGO2IJDh9oQvJ4cY4vdoqLDuoH9Zl2F/ofsekn8lkuhIlhQcffUtSjytFyp++p6NiE7Rqx/lodgKVoceEp/CP4FfjrquZaTtj2AvH5K/ywpn7M34K/SsoYDAdIN448I1/0/wveW289T1/lX5xBzc8N5IaHr0XMOQdHsIkDuJFifj20pBm5jzwUv9e2FhwRsvhAbalCIuIw3bhJihY3p6nTFFIZgiSYjfTf3aXuOjmeGn4bPoGvwl+CFzTRczBIuHBEeImHc37/lGfwZR0cXzVDOvaKfNHvwe+suZ771K/y/XcBlsoN996JpBhoE2toYxOznNEOS5TJc6Id5GEXLjrWo+LEWGNpPDU4WAwsIRROu+1vM+0oW37z/MBN9kqHnSArwPfgFJ7Cq/Ai3Ie7g7ncmI09v8sjzw9mzOAEXoIHxURueaAce5V80f/DOuuZwHM8vsMb5wBzOFWM7wymTXPAEvm4vcFpZ2ut0VZRjkiP2MlmLd6DIpbGSiHOjdnUHN90hRYmhTnmvhzp1iKDNj+b7t5hi79lWGwQ+HN9RsfFMy0FXbEwhfuczKgCbyxYwBmcFhhvo/7a44v+i3XWcwDP86PzpGQYdWh7csP5dBvZ1jNzdxC8pBGuxqSW5vw40nBpj5JhMwvOzN0RWqERHMr4Lv1kWX84xLR830G3j6yqZ1a8UstTlW+qJPOZ+sZ7xZPKTJLhiNOAFd6tk+jrTH31ncLOxid8+nzRb128HhUcru/y0Wn6iT254YPC6FtVSIMoW2sk727AhvTtrWKZTvgsmckfXYZWeNRXx/3YQ2OUxLDrbHtN11IwrgXT6c8dATDwLniYwxzO4RzuQqTKSC5gAofMZ1QBK3zQ4JWobFbcvJm87FK+6JXrKahLn54m3p+McXzzYtP8VF/QpJuh1OwieElEoI1pRxPS09FBrkq2tWCU59+HdhNtTIqKm8EBrw2RTOEDpG3IKo2Y7mFdLm3ZeVjYwVw11o/oznceMve4CgMfNym/utA/d/ILMR7gpXzRy9eDsgLcgbs8O2Va1L0zzIdwGGemTBuwROHeoMShkUc7P+ISY3KH5ZZeWqO8mFTxQYeXTNuzvvK5FGPdQfuu00DwYFY9dyhctEt+OJDdnucfpmyhzUJzfsJjr29l8S0bXBfwRS9ZT26tmMIdZucch5ZboMz3Nio3nIOsYHCGoDT4kUA9MiXEp9Xsui1S8th/kbWIrMBxDGLodWUQIWcvnXy+9M23xPiSMOiRPqM+YMXkUN3gXFrZJwXGzUaMpJfyRS9ZT0lPe8TpScuRlbMHeUmlaKDoNuy62iWNTWNFYjoxFzuJs8oR+RhRx7O4SVNSXpa0ZJQ0K1LAHDQ+D9IepkMXpcsq5EVCvClBUIzDhDoyKwDw1Lc59GbTeORivugw1IcuaEOaGWdNm+Ps5fQ7/tm0DjMegq3yM3vb5j12qUId5UZD2oxDSEWOZMSqFl/W+5oynWDa/aI04tJRQ2eTXusg86SQVu/nwSYwpW6wLjlqIzwLuxGIvoAvul0PS+ZNz0/akp/pniO/8JDnGyaCkzbhl6YcqmK/69prxPqtpx2+Km9al9sjL+rwMgHw4jE/C8/HQ3m1vBuL1fldbzd8mOueVJ92syqdEY4KJjSCde3mcRw2TA6szxedn+zwhZMps0XrqEsiUjnC1hw0TELC2Ek7uAAdzcheXv1BYLagspxpzSAoZZUsIzIq35MnFQ9DOrlNB30jq3L4pkhccKUAA8/ocvN1Rzx9QyOtERs4CVsJRK/DF71kPYrxYsGsm6RMh4cps5g1DOmM54Ly1ii0Hd3Y/BMk8VWFgBVmhqrkJCPBHAolwZaWzLR9Vb7bcWdX9NyUYE+uB2BKfuaeBUcjDljbYVY4DdtsVWvzRZdWnyUzDpjNl1Du3aloAjVJTNDpcIOVVhrHFF66lLfJL1zJr9PQ2nFJSBaKoDe+sAvLufZVHVzYh7W0h/c6AAZ+7Tvj6q9j68G/cTCS/3n1vLKHZwNi+P+pS0WkZNMBMUl+LDLuiE4omZy71r3UFMwNJV+VJ/GC5ixVUkBStsT4gGKh0Gm4Oy3qvq7Lbmq24nPdDuDR9deR11XzP4vFu3TYzfnIyiSVmgizUYGqkIXNdKTY9pgb9D2Ix5t0+NHkVzCdU03suWkkVZAoCONCn0T35gAeW38de43mf97sMOpSvj4aa1KYUm58USI7Wxxes03bAZdRzk6UtbzMaCQ6IxO0dy7X+XsjoD16hpsBeGz9dfzHj+R/Hp8nCxZRqkEDTaCKCSywjiaoMJ1TITE9eg7Jqnq8HL6gDwiZb0u0V0Rr/rmvqjxKuaLCX7ZWXTvAY+uvm3z8CP7nzVpngqrJpZKwWnCUjIviYVlirlGOzPLI3SMVyp/elvBUjjDkNhrtufFFErQ8pmdSlbK16toBHlt/HV8uHMX/vEGALkV3RJREiSlopxwdMXOZPLZ+ix+kAHpMKIk8UtE1ygtquttwxNhphrIZ1IBzjGF3IIGxGcBj6q8bHJBG8T9vdsoWrTFEuebEZuVxhhClH6P5Zo89OG9fwHNjtNQTpD0TG9PJLEYqvEY6Rlxy+ZZGfL0Aj62/bnQCXp//eeM4KzfQVJbgMQbUjlMFIm6TpcfWlZje7NBSV6IsEVmumWIbjiloUzQX9OzYdo8L1wjw2PrrpimONfmfNyzKklrgnEkSzT5QWYQW40YShyzqsRmMXbvVxKtGuYyMKaU1ugenLDm5Ily4iT14fP11Mx+xJv+zZ3MvnfdFqxU3a1W/FTB4m3Qfsyc1XUcdVhDeUDZXSFHHLQj/Y5jtC7ZqM0CXGwB4bP11i3LhOvzPGygYtiUBiwQV/4wFO0majijGsafHyRLu0yG6q35cL1rOpVxr2s5cM2jJYMCdc10Aj6q/blRpWJ//+dmm5psMl0KA2+AFRx9jMe2WbC4jQxnikd4DU8TwUjRVacgdlhmr3bpddzuJ9zXqr2xnxJfzP29RexdtjDVZqzkqa6PyvcojGrfkXiJ8SEtml/nYskicv0ivlxbqjemwUjMw5evdg8fUX9nOiC/lf94Q2i7MURk9nW1MSj5j8eAyV6y5CN2S6qbnw3vdA1Iwq+XOSCl663udN3IzLnrt+us25cI1+Z83SXQUldqQq0b5XOT17bGpLd6ssN1VMPf8c+jG8L3NeCnMdF+Ra3fRa9dft39/LuZ/3vwHoHrqGmQFafmiQw6eyzMxS05K4bL9uA+SKUQzCnSDkqOGokXyJvbgJ/BHI+qvY69//4rl20NsmK2ou2dTsyIALv/91/8n3P2Aao71WFGi8KKv1fRC5+J67Q/507/E/SOshqN5TsmYIjVt+kcjAx98iz/4SaojbIV1rexE7/C29HcYD/DX4a0rBOF5VTu7omsb11L/AWcVlcVZHSsqGuXLLp9ha8I//w3Mv+T4Ew7nTBsmgapoCrNFObIcN4pf/Ob/mrvHTGqqgAupL8qWjWPS9m/31jAe4DjA+4+uCoQoT/zOzlrNd3qd4SdphFxsUvYwGWbTWtISc3wNOWH+kHBMfc6kpmpwPgHWwqaSUG2ZWWheYOGQGaHB+eQ/kn6b3pOgLV+ODSn94wDvr8Bvb70/LLuiPPEr8OGVWfDmr45PZyccEmsVXZGe1pRNX9SU5+AVQkNTIVPCHF/jGmyDC9j4R9LfWcQvfiETmgMMUCMN1uNCakkweZsowdYobiMSlnKA93u7NzTXlSfe+SVbfnPQXmg9LpYAQxpwEtONyEyaueWM4FPjjyjG3uOaFmBTWDNgBXGEiQpsaWhnAqIijB07Dlsy3fUGeP989xbWkyf+FF2SNEtT1E0f4DYYVlxFlbaSMPIRMk/3iMU5pME2SIWJvjckciebkQuIRRyhUvkHg/iUljG5kzVog5hV7vIlCuBrmlhvgPfNHQM8lCf+FEGsYbMIBC0qC9a0uuy2wLXVbLBaP5kjHokCRxapkQyzI4QEcwgYHRZBp+XEFTqXFuNVzMtjXLJgX4gAid24Hjwc4N3dtVSe+NNiwTrzH4WVUOlDobUqr1FuAgYllc8pmzoVrELRHSIW8ViPxNy4xwjBpyR55I6J220qQTZYR4guvUICJiSpr9gFFle4RcF/OMB7BRiX8sSfhpNSO3lvEZCQfLUVTKT78Ek1LRLhWN+yLyTnp8qWUZ46b6vxdRGXfHVqx3eI75YaLa4iNNiK4NOW7wPW6lhbSOF9/M9qw8e/aoB3d156qTzxp8pXx5BKAsYSTOIIiPkp68GmTq7sZtvyzBQaRLNxIZ+paozHWoLFeExIhRBrWitHCAHrCF7/thhD8JhYz84wg93QRV88wLuLY8zF8sQ36qF1J455bOlgnELfshKVxYOXKVuKx0jaj22sczTQqPqtV/XDgpswmGTWWMSDw3ssyUunLLrVPGjYRsH5ggHeHSWiV8kT33ycFSfMgkoOK8apCye0J6VW6GOYvffgU9RWsukEi2kUV2nl4dOYUzRik9p7bcA4ggdJ53LxKcEe17B1R8eqAd7dOepV8sTXf5lhejoL85hUdhDdknPtKHFhljOT+bdq0hxbm35p2nc8+Ja1Iw+tJykgp0EWuAAZYwMVwac5KzYMslhvgHdHRrxKnvhTYcfKsxTxtTETkjHO7rr3zjoV25lAQHrqpV7bTiy2aXMmUhTBnKS91jhtR3GEoF0oLnWhWNnYgtcc4N0FxlcgT7yz3TgNIKkscx9jtV1ZKpWW+Ub1tc1eOv5ucdgpx+FJy9pgbLE7xDyXb/f+hLHVGeitHOi6A7ybo3sF8sS7w7cgdk0nJaOn3hLj3uyD0Zp5pazFIUXUpuTTU18d1EPkDoX8SkmWTnVIozEdbTcZjoqxhNHf1JrSS/AcvHjZ/SMHhL/7i5z+POsTUh/8BvNfYMTA8n+yU/MlTZxSJDRStqvEuLQKWwDctMTQogUDyQRoTQG5Kc6oQRE1yV1jCA7ri7jdZyK0sYTRjCR0Hnnd+y7nHxNgTULqw+8wj0mQKxpYvhjm9uSUxg+TTy7s2GtLUGcywhXSKZN275GsqlclX90J6bRI1aouxmgL7Q0Nen5ziM80SqMIo8cSOo+8XplT/5DHNWsSUr/6lLN/QQ3rDyzLruEW5enpf7KqZoShEduuSFOV7DLX7Ye+GmXb6/hnNNqKsVXuMDFpb9Y9eH3C6NGEzuOuI3gpMH/I6e+zDiH1fXi15t3vA1czsLws0TGEtmPEJdiiFPwlwKbgLHAFk4P6ZyPdymYYHGE0dutsChQBl2JcBFlrEkY/N5bQeXQ18gjunuMfMfsBlxJSx3niO485fwO4fGD5T/+3fPQqkneWVdwnw/3bMPkW9Wbqg+iC765Zk+xcT98ibKZc2EdgHcLoF8cSOo/Oc8fS+OyEULF4g4sJqXVcmfMfsc7A8v1/yfGXmL9I6Fn5pRwZhsPv0TxFNlAfZCvG+Oohi82UC5f/2IsJo0cTOm9YrDoKhFPEUr/LBYTUNht9zelHXDqwfPCIw4owp3mOcIQcLttWXFe3VZ/j5H3cIc0G6oPbCR+6Y2xF2EC5cGUm6wKC5tGEzhsWqw5hNidUiKX5gFWE1GXh4/Qplw4sVzOmx9QxU78g3EF6wnZlEN4FzJ1QPSLEZz1KfXC7vd8ssGdIbNUYpVx4UapyFUHzJoTOo1McSkeNn1M5MDQfs4qQuhhX5vQZFw8suwWTcyYTgioISk2YdmkhehG4PkE7w51inyAGGaU+uCXADabGzJR1fn3lwkty0asIo8cROm9Vy1g0yDxxtPvHDAmpu+PKnM8Ix1wwsGw91YJqhteaWgjYBmmQiebmSpwKKzE19hx7jkzSWOm66oPbzZ8Yj6kxVSpYjVAuvLzYMCRo3oTQecOOjjgi3NQ4l9K5/hOGhNTdcWVOTrlgYNkEXINbpCkBRyqhp+LdRB3g0OU6rMfW2HPCFFMV9nSp+uB2woepdbLBuJQyaw/ZFysXrlXwHxI0b0LovEkiOpXGA1Ijagf+KUNC6rKNa9bQnLFqYNkEnMc1uJrg2u64ELPBHpkgWbmwKpJoDhMwNbbGzAp7Yg31wS2T5rGtzit59PrKhesWG550CZpHEzpv2NGRaxlNjbMqpmEIzygJqQfjypycs2pg2cS2RY9r8HUqkqdEgKTWtWTKoRvOBPDYBltja2SO0RGjy9UHtxwRjA11ujbKF+ti5cIR9eCnxUg6owidtyoU5tK4NLji5Q3HCtiyF2IqLGYsHViOXTXOYxucDqG0HyttqYAKqYo3KTY1ekyDXRAm2AWh9JmsVh/ccg9WJ2E8YjG201sPq5ULxxX8n3XLXuMInbft2mk80rRGjCGctJ8/GFdmEQ9Ug4FlE1ll1Y7jtiraqm5Fe04VV8lvSVBL8hiPrfFVd8+7QH3Qbu2ipTVi8cvSGivc9cj8yvH11YMHdNSERtuOslM97feYFOPKzGcsI4zW0YGAbTAOaxCnxdfiYUmVWslxiIblCeAYr9VYR1gM7GmoPrilunSxxeT3DN/2eBQ9H11+nk1adn6VK71+5+Jfct4/el10/7KBZfNryUunWSCPxPECk1rdOv1WVSrQmpC+Tl46YD3ikQYcpunSQgzVB2VHFhxHVGKDgMEY5GLlQnP7FMDzw7IacAWnO6sBr12u+XanW2AO0wQ8pknnFhsL7KYIqhkEPmEXFkwaN5KQphbkUmG72wgw7WSm9RiL9QT925hkjiVIIhphFS9HKI6/8QAjlpXqg9W2C0apyaVDwKQwrwLY3j6ADR13ZyUNByQXHQu6RY09Hu6zMqXRaNZGS/KEJs0cJEe9VH1QdvBSJv9h09eiRmy0V2uJcqHcShcdvbSNg5fxkenkVprXM9rDVnX24/y9MVtncvbKY706anNl3ASll9a43UiacVquXGhvq4s2FP62NGKfQLIQYu9q1WmdMfmUrDGt8eDS0cXozH/fjmUH6Jruvm50hBDSaEU/2Ru2LEN/dl006TSc/g7tfJERxGMsgDUEr104pfWH9lQaN+M4KWQjwZbVc2rZVNHsyHal23wZtIs2JJqtIc/WLXXRFCpJkfE9jvWlfFbsNQ9pP5ZBS0zKh4R0aMFj1IjTcTnvi0Zz2rt7NdvQb2mgbju1plsH8MmbnEk7KbK0b+wC2iy3aX3szW8xeZvDwET6hWZYwqTXSSG+wMETKum0Dq/q+x62gt2ua2ppAo309TRk9TPazfV3qL9H8z7uhGqGqxNVg/FKx0HBl9OVUORn8Q8Jx9gFttGQUDr3tzcXX9xGgN0EpzN9mdZ3GATtPhL+CjxFDmkeEU6x56kqZRusLzALXVqkCN7zMEcqwjmywDQ6OhyUe0Xao1Qpyncrg6wKp9XfWDsaZplElvQ/b3sdweeghorwBDlHzgk1JmMc/wiERICVy2VJFdMjFuLQSp3S0W3+sngt2njwNgLssFGVQdJ0tu0KH4ky1LW4yrbkuaA6Iy9oz/qEMMXMMDWyIHhsAyFZc2peV9hc7kiKvfULxCl9iddfRK1f8kk9qvbdOoBtOg7ZkOZ5MsGrSHsokgLXUp9y88smniwWyuFSIRVmjplga3yD8Uij5QS1ZiM4U3Qw5QlSm2bXjFe6jzzBFtpg+/YBbLAWG7OPynNjlCw65fukGNdkJRf7yM1fOxVzbxOJVocFoYIaGwH22mIQkrvu1E2nGuebxIgW9U9TSiukPGU+Lt++c3DJPKhyhEEbXCQLUpae2exiKy6tMPe9mDRBFCEMTWrtwxN8qvuGnt6MoihKWS5NSyBhbH8StXoAz8PLOrRgLtOT/+4vcu+7vDLnqNvztOq7fmd8sMmY9Xzn1zj8Dq8+XVdu2Nv0IIySgEdQo3xVHps3Q5i3fLFsV4aiqzAiBhbgMDEd1uh8qZZ+lwhjkgokkOIv4xNJmyncdfUUzgB4oFMBtiu71Xumpz/P+cfUP+SlwFExwWW62r7b+LSPxqxn/gvMZ5z9C16t15UbNlq+jbGJtco7p8wbYlL4alSyfWdeuu0j7JA3JFNuVAwtst7F7FhWBbPFNKIUORndWtLraFLmMu7KFVDDOzqkeaiN33YAW/r76wR4XDN/yN1z7hejPau06EddkS/6XThfcz1fI/4K736fO48vlxt2PXJYFaeUkFS8U15XE3428xdtn2kc8GQlf1vkIaNRRnOMvLTWrZbElEHeLWi1o0dlKPAh1MVgbbVquPJ5+Cr8LU5/H/+I2QlHIU2ClXM9G8v7Rr7oc/hozfUUgsPnb3D+I+7WF8kNO92GY0SNvuxiE+2Bt8prVJTkzE64sfOstxuwfxUUoyk8VjcTlsqe2qITSFoSj6Epd4KsT6BZOWmtgE3hBfir8IzZDwgV4ZTZvD8VvPHERo8v+vL1DASHTz/i9OlKueHDjK5Rnx/JB1Vb1ioXdBra16dmt7dgik10yA/FwJSVY6XjA3oy4SqM2frqDPPSRMex9qs3XQtoWxMj7/Er8GWYsXgjaVz4OYumP2+9kbxvny/6kvWsEBw+fcb5bInc8APdhpOSs01tEqIkoiZjbAqKMruLbJYddHuHFRIyJcbdEdbl2sVLaySygunutBg96Y2/JjKRCdyHV+AEFtTvIpbKIXOamknYSiB6KV/0JetZITgcjjk5ZdaskBtWO86UF0ap6ozGXJk2WNiRUlCPFir66lzdm/SLSuK7EUdPz8f1z29Skq6F1fXg8+5UVR6bszncP4Tn4KUkkdJ8UFCY1zR1i8RmL/qQL3rlei4THG7OODlnKko4oI01kd3CaM08Ia18kC3GNoVaO9iDh+hWxSyTXFABXoau7Q6q9OxYg/OVEMw6jdbtSrJ9cBcewGmaZmg+bvkUnUUaGr+ZfnMH45Ivevl61hMcXsxYLFTu1hTm2zViCp7u0o5l+2PSUh9bDj6FgYypufBDhqK2+oXkiuHFHR3zfj+9PtA8oR0xnqX8qn+sx3bFODSbbF0X8EUvWQ8jBIcjo5bRmLOljDNtcqNtOe756h3l0VhKa9hDd2l1eqmsnh0MNMT/Cqnx6BInumhLT8luljzQ53RiJeA/0dxe5NK0o2fA1+GLXr6eNQWHNUOJssQaTRlGpLHKL9fD+IrQzTOMZS9fNQD4AnRNVxvTdjC+fJdcDDWQcyB00B0t9BDwTxXgaAfzDZ/DBXzRnfWMFRwuNqocOmX6OKNkY63h5n/fFcB28McVHqnXZVI27K0i4rDLNE9lDKV/rT+udVbD8dFFu2GGZ8mOt0kAXcoX3ZkIWVtw+MNf5NjR2FbivROHmhV1/pj2egv/fMGIOWTIWrV3Av8N9imV9IWml36H6cUjqEWNv9aNc+veb2sH46PRaHSuMBxvtW+twxctq0z+QsHhux8Q7rCY4Ct8lqsx7c6Sy0dl5T89rIeEuZKoVctIk1hNpfavER6yyH1Vvm3MbsUHy4ab4hWr/OZPcsRBphnaV65/ZcdYPNNwsjN/djlf9NqCw9U5ExCPcdhKxUgLSmfROpLp4WSUr8ojdwbncbvCf+a/YzRaEc6QOvXcGO256TXc5Lab9POvB+AWY7PigWYjzhifbovuunzRawsO24ZqQQAqguBtmpmPB7ysXJfyDDaV/aPGillgz1MdQg4u5MYaEtBNNHFjkRlSpd65lp4hd2AVPTfbV7FGpyIOfmNc/XVsPfg7vzaS/3nkvLL593ANLvMuRMGpQIhiF7kUEW9QDpAUbTWYBcbp4WpacHHY1aacqQyjGZS9HI3yCBT9kUZJhVOD+zUDvEH9ddR11fzPcTDQ5TlgB0KwqdXSavk9BC0pKp0WmcuowSw07VXmXC5guzSa4p0UvRw2lbDiYUx0ExJJRzWzi6Gm8cnEkfXXsdcG/M/jAJa0+bmCgdmQ9CYlNlSYZOKixmRsgiFxkrmW4l3KdFKv1DM8tk6WxPYJZhUUzcd8Kdtgrw/gkfXXDT7+avmfVak32qhtkg6NVdUS5wgkru1YzIkSduTW1FDwVWV3JQVJVuieTc0y4iDpFwc7/BvSalvKdQM8sv662cevz/+8sQVnjVAT0W2wLllw1JiMhJRxgDjCjLQsOzSFSgZqx7lAW1JW0e03yAD3asC+GD3NbQhbe+mN5GXH1F83KDOM4n/e5JIuH4NpdQARrFPBVptUNcjj4cVMcFSRTE2NpR1LEYbYMmfWpXgP9KejaPsLUhuvLCsVXznAG9dfx9SR1ud/3hZdCLHb1GMdPqRJgqDmm76mHbvOXDtiO2QPUcKo/TWkQ0i2JFXpBoo7vij1i1Lp3ADAo+qvG3V0rM//vFnnTE4hxd5Ka/Cor5YEdsLVJyKtDgVoHgtW11pWSjolPNMnrlrVj9Fv2Qn60twMwKPqr+N/wvr8z5tZcDsDrv06tkqyzESM85Ycv6XBWA2birlNCXrI6VbD2lx2L0vQO0QVTVVLH4SE67fgsfVXv8n7sz7/85Z7cMtbE6f088wSaR4kCkCm10s6pKbJhfqiUNGLq+0gLWC6eUAZFPnLjwqtKd8EwGvWX59t7iPW4X/eAN1svgRVSY990YZg06BD1ohLMtyFTI4pKTJsS9xREq9EOaPWiO2gpms7397x6nQJkbh+Fz2q/rqRROX6/M8bJrqlVW4l6JEptKeUFuMYUbtCQ7CIttpGc6MY93x1r1vgAnRXvY5cvwWPqb9uWQm+lP95QxdNMeWhOq1x0Db55C7GcUv2ZUuN6n8iKzsvOxibC//Yfs9Na8r2Rlz02vXXDT57FP/zJi66/EJSmsJKa8QxnoqW3VLQ+jZVUtJwJ8PNX1NQCwfNgdhhHD9on7PdRdrdGPF28rJr1F+3LBdeyv+8yYfLoMYet1vX4upNAjVvwOUWnlNXJXlkzk5Il6kqeoiL0C07qno+/CYBXq/+utlnsz7/Mzvy0tmI4zm4ag23PRN3t/CWryoUVJGm+5+K8RJ0V8Hc88/XHUX/HfiAq7t+BH+x6v8t438enWmdJwFA6ZINriLGKv/95f8lT9/FnyA1NMVEvQyaXuu+gz36f/DD73E4pwqpLcvm/o0Vle78n//+L/NPvoefp1pTJye6e4A/D082FERa5/opeH9zpvh13cNm19/4v/LDe5xMWTi8I0Ta0qKlK27AS/v3/r+/x/2GO9K2c7kVMonDpq7//jc5PKCxeNPpFVzaRr01wF8C4Pu76hXuX18H4LduTr79guuFD3n5BHfI+ZRFhY8w29TYhbbLi/bvBdqKE4fUgg1pBKnV3FEaCWOWyA+m3WpORZr/j+9TKJtW8yBTF2/ZEODI9/QavHkVdGFp/Pjn4Q+u5hXapsP5sOH+OXXA1LiKuqJxiMNbhTkbdJTCy4llEt6NnqRT4dhg1V3nbdrm6dYMecA1yTOL4PWTE9L5VzPFlLBCvlG58AhehnN4uHsAYinyJ+AZ/NkVvELbfOBUuOO5syBIEtiqHU1k9XeISX5bsimrkUUhnGDxourN8SgUsCZVtKyGbyGzHXdjOhsAvOAswSRyIBddRdEZWP6GZhNK/yjwew9ehBo+3jEADu7Ay2n8mDc+TS7awUHg0OMzR0LABhqLD4hJEh/BEGyBdGlSJoXYXtr+3HS4ijzVpgi0paWXtdruGTknXBz+11qT1Q2inxaTzQCO46P3lfLpyS4fou2PH/PupwZgCxNhGlj4IvUuWEsTkqMWm6i4xCSMc9N1RDQoCVcuGItJ/MRWefais+3synowi/dESgJjkilnWnBTGvRWmaw8oR15257t7CHmCf8HOn7cwI8+NQBXMBEmAa8PMRemrNCEhLGEhDQKcGZWS319BX9PFBEwGTbRBhLbDcaV3drFcDqk5kCTd2JF1Wp0HraqBx8U0wwBTnbpCadwBA/gTH/CDrcCs93LV8E0YlmmcyQRQnjBa8JESmGUfIjK/7fkaDJpmD2QptFNVJU1bbtIAjjWQizepOKptRjbzR9Kag6xZmMLLjHOtcLT3Tx9o/0EcTT1XN3E45u24AiwEypDJXihKjQxjLprEwcmRKclaDNZCVqr/V8mYWyFADbusiY5hvgFoU2vio49RgJLn5OsReRFN6tabeetiiy0V7KFHT3HyZLx491u95sn4K1QQSPKM9hNT0wMVvAWbzDSVdrKw4zRjZMyJIHkfq1VAVCDl/bUhNKlGq0zGr05+YAceXVPCttVk0oqjVwMPt+BBefx4yPtGVkUsqY3CHDPiCM5ngupUwCdbkpd8kbPrCWHhkmtIKLEetF2499eS1jZlIPGYnlcPXeM2KD9vLS0bW3ktYNqUllpKLn5ZrsxlIzxvDu5eHxzGLctkZLEY4PgSOg2IUVVcUONzUDBEpRaMoXNmUc0tFZrTZquiLyKxrSm3DvIW9Fil+AkhXu5PhEPx9mUNwqypDvZWdKlhIJQY7vn2OsnmBeOWnYZ0m1iwbbw1U60by5om47iHRV6fOgzjMf/DAZrlP40Z7syxpLK0lJ0gqaAK1c2KQKu7tabTXkLFz0sCftuwX++MyNeNn68k5Buq23YQhUh0SNTJa1ioQ0p4nUG2y0XilF1JqODqdImloPS4Bp111DEWT0jJjVv95uX9BBV7eB3bUWcu0acSVM23YZdd8R8UbQUxJ9wdu3oMuhdt929ME+mh6JXJ8di2RxbTi6TbrDquqV4aUKR2iwT6aZbyOwEXN3DUsWr8Hn4EhwNyHuXHh7/pdaUjtR7vnDh/d8c9xD/s5f501eQ1+CuDiCvGhk1AN/4Tf74RfxPwD3toLarR0zNtsnPzmS64KIRk861dMWCU8ArasG9T9H0ZBpsDGnjtAOM2+/LuIb2iIUGXNgl5ZmKD/Tw8TlaAuihaFP5yrw18v4x1898zIdP+DDAX1bM3GAMvPgRP/cJn3zCW013nrhHkrITyvYuwOUkcHuKlRSW5C6rzIdY4ppnF7J8aAJbQepgbJYBjCY9usGXDKQxq7RZfh9eg5d1UHMVATRaD/4BHK93/1iAgYZ/+jqPn8Dn4UExmWrpa3+ZOK6MvM3bjwfzxNWA2dhs8+51XHSPJiaAhGSpWevEs5xHLXcEGFXYiCONySH3fPWq93JIsBiSWvWyc3CAN+EcXoT7rCSANloPPoa31rt/5PUA/gp8Q/jDD3hyrjzlR8VkanfOvB1XPubt17vzxAfdSVbD1pzAnfgyF3ycadOTOTXhpEUoLC1HZyNGW3dtmjeXgr2r56JNmRwdNNWaQVBddd6rh4MhviEB9EFRD/7RGvePvCbwAL4Mx/D6M541hHO4D3e7g6PafdcZVw689z7NGTwo5om7A8sPhccT6qKcl9NJl9aM/9kX+e59Hh1yPqGuCCZxuITcsmNaJ5F7d0q6J3H48TO1/+M57085q2icdu2U+W36Ldllz9Agiv4YGljoEN908EzvDOrBF98/vtJwCC/BF2AG75xxEmjmMIcjxbjoaxqOK3/4hPOZzhMPBpYPG44CM0dTVm1LjLtUWWVz1Bcf8tEx0zs8O2A2YVHRxKYOiy/aOVoAaMu0i7ubu43njjmd4ibMHU1sIDHaQNKrZND/FZYdk54oCXetjq7E7IVl9eAL7t+oHnwXXtLx44czzoRFHBztYVwtH1d+NOMkupZ5MTM+gUmq90X+Bh9zjRlmaQ+m7YMqUL/veemcecAtOJ0yq1JnVlN27di2E0+Klp1tAJ4KRw1eMI7aJjsO3R8kPSI3fUFXnIOfdQe86sIIVtWDL7h//Ok6vj8vwDk08NEcI8zz7OhBy+WwalzZeZ4+0XniRfst9pAJqQHDGLzVQ2pheZnnv1OWhwO43/AgcvAEXEVVpa4db9sGvNK8wjaENHkfFQ4Ci5i7dqnQlPoLQrHXZDvO3BIXZbJOBrOaEbML6sFL798I4FhKihjHMsPjBUZYCMFr6nvaArxqXPn4lCa+cHfSa2cP27g3Z3ziYTRrcbQNGLQmGF3F3cBdzzzX7AILx0IB9rbwn9kx2G1FW3Inic+ZLIsVvKR8Zwfj0l1fkqo8LWY1M3IX14OX3r9RKTIO+d9XzAI8qRPGPn/4NC2n6o4rN8XJ82TOIvuVA8zLKUHRFgBCetlDZlqR1gLKjS39xoE7Bt8UvA6BxuEDjU3tFsEijgA+615tmZkXKqiEENrh41iLDDZNq4pKTWR3LZfnos81LOuNa15cD956vLMsJd1rqYp51gDUQqMYm2XsxnUhD2jg1DM7SeuJxxgrmpfISSXVIJIS5qJJSvJPEQ49DQTVIbYWJ9QWa/E2+c/oPK1drmC7WSfJRNKBO5Yjvcp7Gc3dmmI/Xh1kDTEuiSnWqQf37h+fTMhGnDf6dsS8SQfQWlqqwXXGlc/PEZ/SC5mtzIV0nAshlQdM/LvUtYutrEZ/Y+EAFtq1k28zQhOwLr1AIeANzhF8t9qzTdZf2qRKO6MWE9ohBYwibbOmrFtNmg3mcS+tB28xv2uKd/agYCvOP+GkSc+0lr7RXzyufL7QbkUpjLjEWFLqOIkAGu2B0tNlO9Eau2W1qcOUvVRgKzypKIQZ5KI3q0MLzqTNRYqiZOqmtqloIRlmkBHVpHmRYV6/HixbO6UC47KOFJnoMrVyr7wYz+SlW6GUaghYbY1I6kkxA2W1fSJokUdSh2LQ1GAimRGm0MT+uu57H5l7QgOWxERpO9moLRPgTtquWCfFlGlIjQaRly9odmzMOWY+IBO5tB4sW/0+VWGUh32qYk79EidWKrjWuiLpiVNGFWFRJVktyeXWmbgBBzVl8anPuXyNJlBJOlKLTgAbi/EYHVHxWiDaVR06GnHQNpJcWcK2jJtiCfG2sEHLzuI66sGrMK47nPIInPnu799935aOK2cvmvubrE38ZzZjrELCmXM2hM7UcpXD2oC3+ECVp7xtIuxptJ0jUr3sBmBS47TVxlvJ1Sqb/E0uLdvLj0lLr29ypdd/eMX3f6lrxGlKwKQxEGvw0qHbkbwrF3uHKwVENbIV2wZ13kNEF6zD+x24aLNMfDTCbDPnEikZFyTNttxWBXDaBuM8KtI2rmaMdUY7cXcUPstqTGvBGSrFWIpNMfbdea990bvAOC1YX0qbc6smDS1mPxSJoW4fwEXvjMmhlijDRq6qale6aJEuFGoppYDoBELQzLBuh/mZNx7jkinv0EtnUp50lO9hbNK57lZaMAWuWR5Yo9/kYwcYI0t4gWM47Umnl3YmpeBPqSyNp3K7s2DSAS/39KRuEN2bS4xvowV3dFRMx/VFcp2Yp8w2nTO9hCXtHG1kF1L4KlrJr2wKfyq77R7MKpFKzWlY9UkhYxyHWW6nBWPaudvEAl3CGcNpSXPZ6R9BbBtIl6cHL3gIBi+42CYXqCx1gfGWe7Ap0h3luyXdt1MKy4YUT9xSF01G16YEdWsouW9mgDHd3veyA97H+Ya47ZmEbqMY72oPztCGvK0onL44AvgC49saZKkWRz4veWljE1FHjbRJaWv6ZKKtl875h4CziFCZhG5rx7tefsl0aRT1bMHZjm8dwL/6u7wCRysaQblQoG5yAQN5zpatMNY/+yf8z+GLcH/Qn0iX2W2oEfXP4GvwQHuIL9AYGnaO3zqAX6946nkgqZNnUhx43DIdQtMFeOPrgy/y3Yd85HlJWwjLFkU3kFwq28xPnuPhMWeS+tDLV9Otllq7pQCf3uXJDN9wFDiUTgefHaiYbdfi3b3u8+iY6TnzhgehI1LTe8lcd7s1wJSzKbahCRxKKztTLXstGAiu3a6rPuQs5pk9TWAan5f0BZmGf7Ylxzzk/A7PAs4QPPPAHeFQ2hbFHszlgZuKZsJcUmbDC40sEU403cEjczstOEypa+YxevL4QBC8oRYqWdK6b7sK25tfE+oDZgtOQ2Jg8T41HGcBE6fTWHn4JtHcu9S7uYgU5KSCkl/mcnq+5/YBXOEr6lCUCwOTOM1taOI8mSxx1NsCXBEmLKbMAg5MkwbLmpBaFOPrNSlO2HnLiEqW3tHEwd8AeiQLmn+2gxjC3k6AxREqvKcJbTEzlpLiw4rNZK6oJdidbMMGX9FULKr0AkW+2qDEPBNNm5QAt2Ik2nftNWHetubosHLo2nG4vQA7GkcVCgVCgaDixHqo9UUn1A6OshapaNR/LPRYFV8siT1cCtJE0k/3WtaNSuUZYKPnsVIW0xXWnMUxq5+En4Kvw/MqQmVXnAXj9Z+9zM98zM/Agy7F/qqj2Nh67b8HjFnPP3iBn/tkpdzwEJX/whIcQUXOaikeliCRGUk7tiwF0rItwMEhjkZ309hikFoRAmLTpEXWuHS6y+am/KB/fM50aLEhGnSMwkpxzOov4H0AvgovwJ1iGzDLtJn/9BU+fAINfwUe6FHSLhu83viV/+/HrOePX+STT2B9uWGbrMHHLldRBlhS/CJQmcRxJFqZica01XixAZsYiH1uolZxLrR/SgxVIJjkpQP4PE9sE59LKLr7kltSBogS5tyszzH8Fvw8/AS8rNOg0xUS9fIaHwb+6et8Q/gyvKRjf5OusOzGx8evA/BP4IP11uN/grca5O0lcsPLJ5YjwI4QkJBOHa0WdMZYGxPbh2W2nR9v3WxEWqgp/G3+6VZbRLSAAZ3BhdhAaUL33VUSw9yjEsvbaQ9u4A/gGXwZXoEHOuU1GSj2chf+Mo+f8IcfcAxfIKVmyunRbYQVnoevwgfw3TXXcw++xNuP4fhyueEUNttEduRVaDttddoP0eSxLe2LENk6itYxlrxBNBYrNNKSQmeaLcm9c8UsaB5WyO6675yyQIAWSDpBVoA/gxmcwEvwoDv0m58UE7gHn+fJOa8/Ywan8EKRfjsopF83eCglX/Sfr7OeaRoQfvt1CGvIDccH5BCvw1sWIzRGC/66t0VTcLZQZtm6PlAasbOJ9iwWtUo7biktTSIPxnR24jxP1ZKaqq+2RcXM9OrBAm/AAs7hDJ5bNmGb+KIfwCs8a3jnjBrOFeMjHSCdbKr+2uOLfnOd9eiA8Hvvwwq54VbP2OqwkB48Ytc4YEOiH2vTXqodabfWEOzso4qxdbqD5L6tbtNPECqbhnA708DZH4QOJUXqScmUlks7Ot6FBuZw3n2mEbaUX7kDzxHOOQk8nKWMzAzu6ZZ8sOFw4RK+6PcuXo9tB4SbMz58ApfKDXf3szjNIIbGpD5TKTRxGkEMLjLl+K3wlWXBsCUxIDU+jbOiysESqAy1MGUJpXgwbTWzNOVEziIXZrJ+VIztl1PUBxTSo0dwn2bOmfDRPD3TRTGlfbCJvO9KvuhL1hMHhB9wPuPRLGHcdOWG2xc0U+5bQtAJT0nRTewXL1pgk2+rZAdeWmz3jxAqfNQQdzTlbF8uJ5ecEIWvTkevAHpwz7w78QujlD/Lr491bD8/1vhM2yrUQRrWXNQY4fGilfctMWYjL72UL/qS9eiA8EmN88nbNdour+PBbbAjOjIa4iBhfFg6rxeKdEGcL6p3EWR1Qq2Qkhs2DrnkRnmN9tG2EAqmgPw6hoL7Oza7B+3SCrR9tRftko+Lsf2F/mkTndN2LmzuMcKTuj/mX2+4Va3ki16+nnJY+S7MefpkidxwnV+4wkXH8TKnX0tsYzYp29DOOoSW1nf7nTh2akYiWmcJOuTidSaqESrTYpwjJJNVGQr+rLI7WsqerHW6Kp/oM2pKuV7T1QY9gjqlZp41/WfKpl56FV/0kvXQFRyeQ83xaTu5E8p5dNP3dUF34ihyI3GSpeCsywSh22ZJdWto9winhqifb7VRvgktxp13vyjrS0EjvrRfZ62uyqddSWaWYlwTPAtJZ2oZ3j/Sgi/mi+6vpzesfAcWNA0n8xVyw90GVFGuZjTXEQy+6GfLGLMLL523f5E0OmxVjDoOuRiH91RKU+vtoCtH7TgmvBLvtFXWLW15H9GTdVw8ow4IlRLeHECN9ym1e9K0I+Cbnhgv4Yu+aD2HaQJ80XDqOzSGAV4+4yCqBxrsJAX6ZTIoX36QnvzhhzzMfFW2dZVLOJfo0zbce5OvwXMFaZ81mOnlTVXpDZsQNuoYWveketKb5+6JOOsgX+NTm7H49fUTlx+WLuWL7qxnOFh4BxpmJx0p2gDzA/BUARuS6phR+pUsY7MMboAHx5xNsSVfVZcYSwqCKrqon7zM+8ecCkeS4nm3rINuaWvVNnMRI1IRpxTqx8PZUZ0Br/UEduo3B3hNvmgZfs9gQPj8vIOxd2kndir3awvJ6BLvoUuOfFWNYB0LR1OQJoUySKb9IlOBx74q1+ADC2G6rOdmFdJcD8BkfualA+BdjOOzP9uUhGUEX/TwhZsUduwRr8wNuXKurCixLBgpQI0mDbJr9dIqUuV+92ngkJZ7xduCk2yZKbfWrH1VBiTg9VdzsgRjW3CVXCvAwDd+c1z9dWw9+B+8MJL/eY15ZQ/HqvTwVdsZn5WQsgRRnMaWaecu3jFvMBEmgg+FJFZsnSl0zjB9OqPYaBD7qmoVyImFvzi41usesV0julaAR9dfR15Xzv9sEruRDyk1nb+QaLU67T885GTls6YgcY+UiMa25M/pwGrbCfzkvR3e0jjtuaFtnwuagHTSb5y7boBH119HXhvwP487jJLsLJ4XnUkHX5sLbS61dpiAXRoZSCrFJ+EjpeU3puVfitngYNo6PJrAigKktmwjyQdZpfq30mmtulaAx9Zfx15Xzv+cyeuiBFUs9zq8Kq+XB9a4PVvph3GV4E3y8HENJrN55H1X2p8VyqSKwVusJDKzXOZzplWdzBUFK9e+B4+uv468xvI/b5xtSAkBHQaPvtqWzllVvEOxPbuiE6+j2pvjcKsbvI7txnRErgfH7LdXqjq0IokKzga14GzQ23SSbCQvO6r+Or7SMIr/efOkkqSdMnj9mBx2DRsiY29Uj6+qK9ZrssCKaptR6HKURdwUYeUWA2kPzVKQO8ku2nU3Anhs/XWkBx3F/7wJtCTTTIKftthue1ty9xvNYLY/zo5KSbIuKbXpbEdSyeRyYdAIwKY2neyoc3+k1XUaufYga3T9daMUx/r8z1s10ITknIO0kuoMt+TB8jK0lpayqqjsJ2qtXAYwBU932zinimgmd6mTRDnQfr88q36NAI+tv24E8Pr8zxtasBqx0+xHH9HhlrwsxxNUfKOHQaZBITNf0uccj8GXiVmXAuPEAKSdN/4GLHhs/XWj92dN/uetNuBMnVR+XWDc25JLjo5Mg5IZIq226tmCsip2zZliL213YrTlL2hcFjpCduyim3M7/eB16q/blQsv5X/esDRbtJeabLIosWy3ycavwLhtxdWzbMmHiBTiVjJo6lCLjXZsi7p9PEPnsq6X6wd4bP11i0rD5fzPm/0A6brrIsllenZs0lCJlU4abakR59enZKrKe3BZihbTxlyZ2zl1+g0wvgmA166/bhwDrcn/7Ddz0eWZuJvfSESug6NzZsox3Z04FIxz0mUjMwVOOVTq1CQ0AhdbBGVdjG/CgsfUX7esJl3K/7ytWHRv683praW/8iDOCqWLLhpljDY1ZpzK75QiaZoOTpLKl60auHS/97oBXrv+umU9+FL+5+NtLFgjqVLCdbmj7pY5zPCPLOHNCwXGOcLquOhi8CmCWvbcuO73XmMUPab+ug3A6/A/78Bwe0bcS2+tgHn4J5pyS2WbOck0F51Vq3LcjhLvZ67p1ABbaL2H67bg78BfjKi/jr3+T/ABV3ilLmNXTI2SpvxWBtt6/Z//D0z/FXaGbSBgylzlsEGp+5//xrd4/ae4d8DUUjlslfIYS3t06HZpvfQtvv0N7AHWqtjP2pW08QD/FLy//da38vo8PNlKHf5y37Dxdfe/oj4kVIgFq3koLReSR76W/bx//n9k8jonZxzWTANVwEniDsg87sOSd/z7//PvMp3jQiptGVWFX2caezzAXwfgtzYUvbr0iozs32c3Uge7varH+CNE6cvEYmzbPZ9hMaYDdjK4V2iecf6EcEbdUDVUARda2KzO/JtCuDbNQB/iTeL0EG1JSO1jbXS+nLxtPMDPw1fh5+EPrgSEKE/8Gry5A73ui87AmxwdatyMEBCPNOCSKUeRZ2P6Myb5MRvgCHmA9ywsMifU+AYXcB6Xa5GibUC5TSyerxyh0j6QgLVpdyhfArRTTLqQjwe4HOD9s92D4Ap54odXAPBWLAwB02igG5Kkc+piN4lvODIFGAZgT+EO4Si1s7fjSR7vcQETUkRm9O+MXyo9OYhfe4xt9STQ2pcZRLayCV90b4D3jR0DYAfyxJ+eywg2IL7NTMXna7S/RpQ63JhWEM8U41ZyQGjwsVS0QBrEKLu8xwZsbi4wLcCT+OGidPIOCe1PiSc9Qt+go+vYqB7cG+B9d8cAD+WJPz0Am2gxXgU9IneOqDpAAXOsOltVuMzpdakJXrdPCzXiNVUpCeOos5cxnpQT39G+XVLhs1osQVvJKPZyNq8HDwd4d7pNDuWJPxVX7MSzqUDU6gfadKiNlUFTzLeFHHDlzO4kpa7aiKhBPGKwOqxsBAmYkOIpipyXcQSPlRTf+Tii0U3EJGaZsDER2qoB3h2hu0qe+NNwUooYU8y5mILbJe6OuX+2FTKy7bieTDAemaQyQ0CPthljSWO+xmFDIYiESjM5xKd6Ik5lvLq5GrQ3aCMLvmCA9wowLuWJb9xF59hVVP6O0CrBi3ZjZSNOvRy+I6klNVRJYRBaEzdN+imiUXQ8iVF8fsp+W4JXw7WISW7fDh7lptWkCwZ4d7QTXyBPfJMYK7SijjFppGnlIVJBJBYj7eUwtiP1IBXGI1XCsjNpbjENVpSAJ2hq2LTywEly3hUYazt31J8w2+aiLx3g3fohXixPfOMYm6zCGs9LVo9MoW3MCJE7R5u/WsOIjrqBoHUO0bJE9vxBpbhsd3+Nb4/vtPCZ4oZYCitNeYuC/8UDvDvy0qvkiW/cgqNqRyzqSZa/s0mqNGjtKOoTm14zZpUauiQgVfqtQiZjq7Q27JNaSK5ExRcrGCXO1FJYh6jR6CFqK7bZdQZ4t8g0rSlPfP1RdBtqaa9diqtzJkQ9duSryi2brQXbxDwbRUpFMBHjRj8+Nt7GDKgvph9okW7LX47gu0SpGnnFQ1S1lYldOsC7hYteR574ZuKs7Ei1lBsfdz7IZoxzzCVmmVqaSySzQbBVAWDek+N4jh9E/4VqZrJjPwiv9BC1XcvOWgO8275CVyBPvAtTVlDJfZkaZGU7NpqBogAj/xEHkeAuJihWYCxGN6e8+9JtSegFXF1TrhhLGP1fak3pebgPz192/8gB4d/6WT7+GdYnpH7hH/DJzzFiYPn/vjW0SgNpTNuPIZoAEZv8tlGw4+RLxy+ZjnKa5NdFoC7UaW0aduoYse6+bXg1DLg6UfRYwmhGEjqPvF75U558SANrElK/+MdpXvmqBpaXOa/MTZaa1DOcSiLaw9j0NNNst3c+63c7EKTpkvKHzu6bPbP0RkuHAVcbRY8ijP46MIbQeeT1mhA+5PV/inyDdQipf8LTvMXbwvoDy7IruDNVZKTfV4CTSRUYdybUCnGU7KUTDxLgCknqUm5aAW6/1p6eMsOYsphLzsHrE0Y/P5bQedx1F/4yPHnMB3/IOoTU9+BL8PhtjuFKBpZXnYNJxTuv+2XqolKR2UQgHhS5novuxVySJhBNRF3SoKK1XZbbXjVwWNyOjlqWJjrWJIy+P5bQedyldNScP+HZ61xKSK3jyrz+NiHG1hcOLL/+P+PDF2gOkekKGiNWKgJ+8Z/x8Iv4DdQHzcpZyF4v19I27w9/yPGDFQvmEpKtqv/TLiWMfn4sofMm9eAH8Ao0zzh7h4sJqYtxZd5/D7hkYPneDzl5idlzNHcIB0jVlQ+8ULzw/nc5/ojzl2juE0apD7LRnJxe04dMz2iOCFNtGFpTuXA5AhcTRo8mdN4kz30nVjEC4YTZQy4gpC7GlTlrePKhGsKKgeXpCYeO0MAd/GH7yKQUlXPLOasOH3FnSphjHuDvEu4gB8g66oNbtr6eMbFIA4fIBJkgayoXriw2XEDQPJrQeROAlY6aeYOcMf+IVYTU3XFlZufMHinGywaW3YLpObVBAsbjF4QJMsVUSayjk4voPsHJOQfPWDhCgDnmDl6XIRerD24HsGtw86RMHOLvVSHrKBdeVE26gKB5NKHzaIwLOmrqBWJYZDLhASG16c0Tn+CdRhWDgWXnqRZUTnPIHuMJTfLVpkoYy5CzylHVTGZMTwkGAo2HBlkQplrJX6U+uF1wZz2uwS1SQ12IqWaPuO4baZaEFBdukksJmkcTOm+YJSvoqPFzxFA/YUhIvWxcmSdPWTWwbAKVp6rxTtPFUZfKIwpzm4IoMfaYQLWgmlG5FME2gdBgm+J7J+rtS/XBbaVLsR7bpPQnpMFlo2doWaVceHk9+MkyguZNCJ1He+kuHTWyQAzNM5YSUg/GlTk9ZunAsg1qELVOhUSAK0LABIJHLKbqaEbHZLL1VA3VgqoiOKXYiS+HRyaEKgsfIqX64HYWbLRXy/qWoylIV9gudL1OWBNgBgTNmxA6b4txDT4gi3Ri7xFSLxtXpmmYnzAcWDZgY8d503LFogz5sbonDgkKcxGsWsE1OI+rcQtlgBBCSOKD1mtqYpIU8cTvBmAT0yZe+zUzeY92fYjTtGipXLhuR0ePoHk0ofNWBX+lo8Z7pAZDk8mEw5L7dVyZZoE/pTewbI6SNbiAL5xeygW4xPRuLCGbhcO4RIeTMFYHEJkYyEO9HmJfXMDEj/LaH781wHHZEtqSQ/69UnGpzH7LKIAZEDSPJnTesJTUa+rwTepI9dLJEawYV+ZkRn9g+QirD8vF8Mq0jFQ29js6kCS3E1+jZIhgPNanHdHFqFvPJLHqFwQqbIA4jhDxcNsOCCQLDomaL/dr5lyJaJU6FxPFjO3JOh3kVMcROo8u+C+jo05GjMF3P3/FuDLn5x2M04xXULPwaS6hBYki+MrMdZJSgPHlcB7nCR5bJ9Kr5ACUn9jk5kivdd8tk95SOGrtqu9lr2IhK65ZtEl7ZKrp7DrqwZfRUSN1el7+7NJxZbywOC8neNKTch5vsTEMNsoCCqHBCqIPRjIPkm0BjvFODGtto99rCl+d3wmHkW0FPdpZtC7MMcVtGFQjJLX5bdQ2+x9ypdc313uj8xlsrfuLgWXz1cRhZvJYX0iNVBRcVcmCXZs6aEf3RQF2WI/TcCbKmGU3IOoDJGDdDub0+hYckt6PlGu2BcxmhbTdj/klhccLGJMcqRjMJP1jW2ETqLSWJ/29MAoORluJ+6LPffBZbi5gqi5h6catQpmOT7/OFf5UorRpLzCqcMltBLhwd1are3kztrSzXO0LUbXRQcdLh/RdSZ+swRm819REDrtqzC4es6Gw4JCKlSnjYVpo0xeq33PrADbFLL3RuCmObVmPN+24kfa+AojDuM4umKe2QwCf6EN906HwjujaitDs5o0s1y+k3lgbT2W2i7FJdnwbLXhJUBq/9liTctSmFC/0OqUinb0QddTWamtjbHRFuWJJ6NpqZ8vO3fZJ37Db+2GkaPYLGHs7XTTdiFQJ68SkVJFVmY6McR5UycflNCsccHFaV9FNbR4NttLxw4pQ7wJd066Z0ohVbzihaxHVExd/ay04oxUKWt+AsdiQ9OUyZ2krzN19IZIwafSTFgIBnMV73ADj7V/K8u1MaY2sJp2HWm0f41tqwajEvdHWOJs510MaAqN4aoSiPCXtN2KSi46dUxHdaMquar82O1x5jqhDGvqmoE9LfxcY3zqA7/x3HA67r9ZG4O6Cuxu12/+TP+eLP+I+HErqDDCDVmBDO4larujNe7x8om2rMug0MX0rL1+IWwdwfR+p1TNTyNmVJ85ljWzbWuGv8/C7HD/izjkHNZNYlhZcUOKVzKFUxsxxN/kax+8zPWPSFKw80rJr9Tizyj3o1gEsdwgWGoxPezDdZ1TSENE1dLdNvuKL+I84nxKesZgxXVA1VA1OcL49dFlpFV5yJMhzyCmNQ+a4BqusPJ2bB+xo8V9u3x48VVIEPS/mc3DvAbXyoYr6VgDfh5do5hhHOCXMqBZUPhWYbWZECwVJljLgMUWOCB4MUuMaxGNUQDVI50TQ+S3kFgIcu2qKkNSHVoM0SHsgoZxP2d5HH8B9woOk4x5bPkKtAHucZsdykjxuIpbUrSILgrT8G7G5oCW+K0990o7E3T6AdW4TilH5kDjds+H64kS0mz24grtwlzDHBJqI8YJQExotPvoC4JBq0lEjjQkyBZ8oH2LnRsQ4Hu1QsgDTJbO8fQDnllitkxuVskoiKbRF9VwzMDvxHAdwB7mD9yCplhHFEyUWHx3WtwCbSMMTCUCcEmSGlg4gTXkHpZXWQ7kpznK3EmCHiXInqndkQjunG5kxTKEeGye7jWz9cyMR2mGiFQ15ENRBTbCp+Gh86vAyASdgmJq2MC6hoADQ3GosP0QHbnMHjyBQvQqfhy/BUbeHd5WY/G/9LK/8Ka8Jd7UFeNWEZvzPb458Dn8DGLOe3/wGL/4xP+HXlRt+M1PE2iLhR8t+lfgxsuh7AfO2AOf+owWhSZRYQbd622hbpKWKuU+XuvNzP0OseRDa+mObgDHJUSc/pKx31QdKffQ5OIJpt8GWjlgTwMc/w5MPCR/yl1XC2a2Yut54SvOtMev55Of45BOat9aWG27p2ZVORRvnEk1hqWMVUmqa7S2YtvlIpspuF1pt0syuZS2NV14mUidCSfzQzg+KqvIYCMljIx2YK2AO34fX4GWdu5xcIAb8MzTw+j/lyWM+Dw/gjs4GD6ehNgA48kX/AI7XXM/XAN4WHr+9ntywqoCakCqmKP0rmQrJJEErG2Upg1JObr01lKQy4jskWalKYfJ/EDLMpjNSHFEUAde2fltaDgmrNaWQ9+AAb8I5vKjz3L1n1LriB/BXkG/wwR9y/oRX4LlioHA4LzP2inzRx/DWmutRweFjeP3tNeSGlaE1Fde0OS11yOpmbIp2u/jF1n2RRZviJM0yBT3IZl2HWImKjQOxIyeU325b/qWyU9Moj1o07tS0G7qJDoGHg5m8yeCxMoEH8GU45tnrNM84D2l297DQ9t1YP7jki/7RmutRweEA77/HWXOh3HCxkRgldDQkAjNTMl2Iloc1qN5JfJeeTlyTRzxURTdn1Ixv2uKjs12AbdEWlBtmVdk2k7FFwj07PCZ9XAwW3dG+8xKzNFr4EnwBZpy9Qzhh3jDXebBpYcpuo4fQ44u+fD1dweEnHzI7v0xuuOALRUV8rXpFyfSTQYkhd7IHm07jpyhlkCmI0ALYqPTpUxXS+z4jgDj1Pflvmz5ecuItpIBxyTHpSTGWd9g1ApfD/bvwUhL4nT1EzqgX7cxfCcNmb3mPL/qi9SwTHJ49oj5ZLjccbTG3pRmlYi6JCG0mQrAt1+i2UXTZ2dv9IlQpN5naMYtviaXlTrFpoMsl3bOAFEa8sqPj2WCMrx3Yjx99qFwO59Aw/wgx+HlqNz8oZvA3exRDvuhL1jMQHPaOJ0+XyA3fp1OfM3qObEVdhxjvynxNMXQV4+GJyvOEFqeQBaIbbO7i63rpxCltdZShPFxkjM2FPVkn3TG+Rp9pO3l2RzFegGfxGDHIAh8SteR0C4HopXzRF61nheDw6TFN05Ebvq8M3VKKpGjjO6r7nhudTEGMtYM92HTDaR1FDMXJ1eThsbKfywyoWwrzRSXkc51flG3vIid62h29bIcFbTGhfV+faaB+ohj7dPN0C2e2lC96+XouFByen9AsunLDJZ9z7NExiUc0OuoYW6UZkIyx2YUR2z6/TiRjyKMx5GbbjLHvHuf7YmtKghf34LJfx63Yg8vrvN2zC7lY0x0tvKezo4HmGYDU+Gab6dFL+KI761lDcNifcjLrrr9LWZJctG1FfU1uwhoQE22ObjdfkSzY63CbU5hzs21WeTddH2BaL11Gi7lVdlxP1nkxqhnKhVY6knS3EPgVGg1JpN5cP/hivujOelhXcPj8HC/LyI6MkteVjlolBdMmF3a3DbsuAYhL44dxzthWSN065xxUd55Lmf0wRbOYOqH09/o9WbO2VtFdaMb4qBgtFJoT1SqoN8wPXMoXLb3p1PUEhxfnnLzGzBI0Ku7FxrKsNJj/8bn/H8fPIVOd3rfrklUB/DOeO+nkghgSPzrlPxluCMtOnDL4Yml6dK1r3vsgMxgtPOrMFUZbEUbTdIzii5beq72G4PD0DKnwjmBULUVFmy8t+k7fZ3pKc0Q4UC6jpVRqS9Umv8bxw35flZVOU1X7qkjnhZlsMbk24qQ6Hz7QcuL6sDC0iHHki96Uh2UdvmgZnjIvExy2TeJdMDZNSbdZyAHe/Yd1xsQhHiKzjh7GxQ4yqMPaywPkjMamvqrYpmO7Knad+ZQC5msCuAPWUoxrxVhrGv7a+KLXFhyONdTMrZ7ke23qiO40ZJUyzgYyX5XyL0mV7NiUzEs9mjtbMN0dERqwyAJpigad0B3/zRV7s4PIfXSu6YV/MK7+OrYe/JvfGMn/PHJe2fyUdtnFrKRNpXV0Y2559aWPt/G4BlvjTMtXlVIWCnNyA3YQBDmYIodFz41PvXPSa6rq9lWZawZ4dP115HXV/M/tnFkkrBOdzg6aP4pID+MZnTJ1SuuB6iZlyiox4HT2y3YBtkUKWooacBQUDTpjwaDt5poBHl1/HXltwP887lKKXxNUEyPqpGTyA699UqY/lt9yGdlUKra0fFWS+36iylVWrAyd7Uw0CZM0z7xKTOduznLIjG2Hx8cDPLb+OvK6Bv7n1DYci4CxUuRxrjBc0bb4vD3rN5Zz36ntLb83eVJIB8LiIzCmn6SMPjlX+yNlTjvIGjs+QzHPf60Aj62/jrzG8j9vYMFtm1VoRWCJdmw7z9N0t+c8cxZpPeK4aTRicS25QhrVtUp7U578chk4q04Wx4YoQSjFryUlpcQ1AbxZ/XVMknIU//OGl7Q6z9Zpxi0+3yFhSkjUDpnCIUhLWVX23KQ+L9vKvFKI0ZWFQgkDLvBoylrHNVmaw10zwCPrr5tlodfnf94EWnQ0lFRWy8pW9LbkLsyUVDc2NSTHGDtnD1uMtchjbCeb1mpxFP0YbcClhzdLu6lfO8Bj6q+bdT2sz/+8SZCV7VIxtt0DUn9L7r4cLYWDSXnseEpOGFuty0qbOVlS7NNzs5FOGJUqQpl2Q64/yBpZf90sxbE+//PGdZ02HSipCbmD6NItmQ4Lk5XUrGpDMkhbMm2ZVheNYV+VbUWTcv99+2NyX1VoafSuC+AN6q9bFIMv5X/eagNWXZxEa9JjlMwNWb00akGUkSoepp1/yRuuqHGbUn3UdBSTxBU6SEVklzWRUkPndVvw2PrrpjvxOvzPmwHc0hpmq82npi7GRro8dXp0KXnUQmhZbRL7NEVp1uuZmO45vuzKsHrktS3GLWXODVjw+vXXLYx4Hf7njRPd0i3aoAGX6W29GnaV5YdyDj9TFkakje7GHYzDoObfddHtOSpoi2SmzJHrB3hM/XUDDEbxP2/oosszcRlehWXUvzHv4TpBVktHqwenFo8uLVmy4DKLa5d3RtLrmrM3aMFr1183E4sewf+85VWeg1c5ag276NZrM9IJVNcmLEvDNaV62aq+14IAOGFsBt973Ra8Xv11YzXwNfmft7Jg2oS+XOyoC8/cwzi66Dhmgk38kUmP1CUiYWOX1bpD2zWXt2FCp7uq8703APAa9dfNdscR/M/bZLIyouVxqJfeWvG9Je+JVckHQ9+CI9NWxz+blX/KYYvO5n2tAP/vrlZ7+8/h9y+9qeB/Hnt967e5mevX10rALDWK//FaAT5MXdBXdP0C/BAes792c40H+AiAp1e1oH8HgH94g/Lttx1gp63op1eyoM/Bvw5/G/7xFbqJPcCXnmBiwDPb/YKO4FX4OjyCb289db2/Noqicw4i7N6TVtoz8tNwDH+8x/i6Ae7lmaQVENzJFb3Di/BFeAwz+Is9SjeQySpPqbLFlNmyz47z5a/AF+AYFvDmHqibSXTEzoT4Gc3OALaqAP4KPFUJ6n+1x+rGAM6Zd78bgJ0a8QN4GU614vxwD9e1Amy6CcskNrczLx1JIp6HE5UZD/DBHrFr2oNlgG4Odv226BodoryjGJ9q2T/AR3vQrsOCS0ctXZi3ruLlhpFDJYl4HmYtjQCP9rhdn4suySLKDt6wLcC52h8xPlcjju1fn+yhuw4LZsAGUuo2b4Fx2UwQu77uqRHXGtg92aN3tQCbFexc0uk93vhTXbct6y7MulLycoUljx8ngDMBg1tvJjAazpEmOtxlzclvj1vQf1Tx7QlPDpGpqgtdSKz/d9/hdy1vTfFHSmC9dGDZbLiezz7Ac801HirGZsWjydfZyPvHXL/Y8Mjzg8BxTZiuwKz4Eb8sBE9zznszmjvFwHKPIWUnwhqfVRcd4Ck0K6ate48m1oOfrX3/yOtvAsJ8zsPAM89sjnddmuLuDPjX9Bu/L7x7xpMzFk6nWtyQfPg278Gn4Aekz2ZgOmU9eJ37R14vwE/BL8G3aibCiWMWWDQ0ZtkPMnlcGeAu/Ag+8ZyecU5BPuy2ILD+sQqyZhAKmn7XZd+jIMTN9eBL7x95xVLSX4On8EcNlXDqmBlqS13jG4LpmGbkF/0CnOi3H8ETOIXzmnmtb0a16Tzxj1sUvQCBiXZGDtmB3KAefPH94xcUa/6vwRn80GOFyjEXFpba4A1e8KQfFF+259tx5XS4egYn8fQsLGrqGrHbztr+uByTahWuL1NUGbDpsnrwBfePPwHHIf9X4RnM4Z2ABWdxUBlqQ2PwhuDxoS0vvqB1JzS0P4h2nA/QgTrsJFn+Y3AOjs9JFC07CGWX1oNX3T/yHOzgDjwPn1PM3g9Jk9lZrMEpxnlPmBbjyo2+KFXRU52TJM/2ALcY57RUzjObbjqxVw++4P6RAOf58pcVsw9Daje3htriYrpDOonre3CudSe6bfkTEgHBHuDiyu5MCsc7BHhYDx7ePxLjqigXZsw+ijMHFhuwBmtoTPtOxOrTvYJDnC75dnUbhfwu/ZW9AgYd+peL68HD+0emKquiXHhWjJg/UrkJYzuiaL3E9aI/ytrCvAd4GcYZMCkSQxfUg3v3j8c4e90j5ZTPdvmJJGHnOCI2nHS8081X013pHuBlV1gB2MX1YNmWLHqqGN/TWmG0y6clJWthxNUl48q38Bi8vtMKyzzpFdSDhxZ5WBA5ZLt8Jv3895DduBlgbPYAj8C4B8hO68FDkoh5lydC4FiWvBOVqjYdqjiLv92t8yPDjrDaiHdUD15qkSURSGmXJwOMSxWAXYwr3zaAufJ66l+94vv3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/wHuD9tQd4f+0B3l97gPfXHuD9tQd4f+0B3l97gG8LwP8G/AL8O/A5OCq0Ys2KIdv/qOIXG/4mvFAMF16gZD+2Xvu/B8as5+8bfllWyg0zaNO5bfXj6vfhhwD86/Aq3NfRS9t9WPnhfnvCIw/CT8GLcFTMnpntdF/z9V+PWc/vWoIH+FL3Znv57PitcdGP4R/C34avw5fgRVUInCwbsn1yyA8C8zm/BH8NXoXnVE6wVPjdeCI38kX/3+Ct9dbz1pTmHFRu+Hm4O9Ch3clr99negxfwj+ER/DR8EV6B5+DuQOnTgUw5rnkY+FbNU3gNXh0o/JYTuWOvyBf9FvzX663HH/HejO8LwAl8Hl5YLTd8q7sqA3wbjuExfAFegQdwfyDoSkWY8swzEf6o4Qyewefg+cHNbqMQruSL/u/WWc+E5g7vnnEXgDmcDeSGb/F4cBcCgT+GGRzDU3hZYburAt9TEtHgbM6JoxJ+6NMzzTcf6c2bycv2+KK/f+l6LBzw5IwfqZJhA3M472pWT/ajKxnjv4AFnMEpnBTPND6s2J7qHbPAqcMK74T2mZ4VGB9uJA465It+/eL1WKhYOD7xHOkr1ajK7d0C4+ke4Hy9qXZwpgLr+Znm/uNFw8xQOSy8H9IzjUrd9+BIfenYaylf9FsXr8fBAadnPIEDna8IBcwlxnuA0/Wv6GAWPd7dDIKjMdSWueAsBj4M7TOd06qBbwDwKr7oleuxMOEcTuEZTHWvDYUO7aHqAe0Bbq+HEFRzOz7WVoTDQkVds7A4sIIxfCQdCefFRoIOF/NFL1mPab/nvOakSL/Q1aFtNpUb/nFOVX6gzyg/1nISyDfUhsokIzaBR9Kxm80s5mK+6P56il1jXic7nhQxsxSm3OwBHl4fFdLqi64nDQZvqE2at7cWAp/IVvrN6/BFL1mPhYrGMBfOi4PyjuSGf6wBBh7p/FZTghCNWGgMzlBbrNJoPJX2mW5mwZfyRffXo7OFi5pZcS4qZUrlViptrXtw+GQoyhDPS+ANjcGBNRiLCQDPZPMHuiZfdFpPSTcQwwKYdRNqpkjm7AFeeT0pJzALgo7g8YYGrMHS0iocy+YTm2vyRUvvpXCIpQ5pe666TJrcygnScUf/p0NDs/iAI/nqDHC8TmQT8x3NF91l76oDdQGwu61Z6E0ABv7uO1dbf/37Zlv+Zw/Pbh8f1s4Avur6657/+YYBvur6657/+YYBvur6657/+YYBvur6657/+aYBvuL6657/+VMA8FXWX/f8zzcN8BXXX/f8zzcNMFdbf93zP38KLPiK6697/uebtuArrr/u+Z9vGmCusP6653/+1FjwVdZf9/zPN7oHX339dc//fNMu+irrr3v+50+Bi+Zq6697/uebA/jz8Pudf9ht/fWv517J/XUzAP8C/BAeX9WCDrUpZ3/dEMBxgPcfbtTVvsYV5Yn32u03B3Ac4P3b8I+vxNBKeeL9dRMAlwO83959qGO78sT769oB7g3w/vGVYFzKE++v6wV4OMD7F7tckFkmT7y/rhHgpQO8b+4Y46XyxPvrugBeNcB7BRiX8sT767oAvmCA9woAHsoT76+rBJjLBnh3txOvkifeX1dswZcO8G6N7sXyxPvr6i340gHe3TnqVfLE++uKAb50gHcXLnrX8sR7gNdPRqwzwLu7Y/FO5Yn3AK9jXCMGeHdgxDuVJ75VAI8ljP7PAb3/RfjcZfePHBB+79dpfpH1CanN30d+mT1h9GqAxxJGM5LQeeQ1+Tb+EQJrElLb38VHQ94TRq900aMIo8cSOo+8Dp8QfsB8zpqE1NO3OI9Zrj1h9EV78PqE0WMJnUdeU6E+Jjyk/hbrEFIfeWbvId8H9oTRFwdZaxJGvziW0Hn0gqYB/wyZ0PwRlxJST+BOw9m77Amj14ii1yGM/txYQudN0qDzGe4EqfA/5GJCagsHcPaEPWH0esekSwmjRxM6b5JEcZ4ww50ilvAOFxBSx4yLW+A/YU8YvfY5+ALC6NGEzhtmyZoFZoarwBLeZxUhtY4rc3bKnjB6TKJjFUHzJoTOozF2YBpsjcyxDgzhQ1YRUse8+J4wenwmaylB82hC5w0zoRXUNXaRBmSMQUqiWSWkLsaVqc/ZE0aPTFUuJWgeTei8SfLZQeMxNaZSIzbII4aE1Nmr13P2hNHjc9E9guYNCZ032YlNwESMLcZiLQHkE4aE1BFg0yAR4z1h9AiAGRA0jyZ03tyIxWMajMPWBIsxYJCnlITU5ShiHYdZ94TR4wCmSxg9jtB5KyPGYzymAYexWEMwAPIsAdYdV6aObmNPGD0aYLoEzaMJnTc0Ygs+YDw0GAtqxBjkuP38bMRWCHn73xNGjz75P73WenCEJnhwyVe3AEe8TtKdJcYhBl97wuhNAObK66lvD/9J9NS75v17wuitAN5fe4D31x7g/bUHeH/tAd5fe4D3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/w/toDvAd4f/24ABzZ8o+KLsSLS+Pv/TqTb3P4hKlQrTGh+fbIBT0Axqznnb+L/V2mb3HkN5Mb/nEHeK7d4IcDld6lmDW/iH9E+AH1MdOw/Jlu2T1xNmY98sv4wHnD7D3uNHu54WUuOsBTbQuvBsPT/UfzNxGYzwkP8c+Yz3C+r/i6DcyRL/rZ+utRwWH5PmfvcvYEt9jLDS/bg0/B64DWKrQM8AL8FPwS9beQCe6EMKNZYJol37jBMy35otdaz0Bw2H/C2Smc7+WGB0HWDELBmOByA3r5QONo4V+DpzR/hFS4U8wMW1PXNB4TOqYz9urxRV++ntWCw/U59Ty9ebdWbrgfRS9AYKKN63ZokZVygr8GZ/gfIhZXIXPsAlNjPOLBby5c1eOLvmQ9lwkOy5x6QV1j5TYqpS05JtUgUHUp5toHGsVfn4NX4RnMCe+AxTpwmApTYxqMxwfCeJGjpXzRF61nbcHhUBPqWze9svwcHJ+S6NPscKrEjug78Dx8Lj3T8D4YxGIdxmJcwhi34fzZUr7olevZCw5vkOhoClq5zBPZAnygD/Tl9EzDh6kl3VhsHYcDEb+hCtJSvuiV69kLDm+WycrOTArHmB5/VYyP6jOVjwgGawk2zQOaTcc1L+aLXrKeveDwZqlKrw8U9Y1p66uK8dEzdYwBeUQAY7DbyYNezBfdWQ97weEtAKYQg2xJIkuveAT3dYeLGH+ShrWNwZgN0b2YL7qznr3g8JYAo5bQBziPjx7BPZ0d9RCQp4UZbnFdzBddor4XHN4KYMrB2qHFRIzzcLAHQZ5the5ovui94PCWAPefaYnxIdzRwdHCbuR4B+tbiy96Lzi8E4D7z7S0mEPd+eqO3cT53Z0Y8SV80XvB4Z0ADJi/f7X113f+7p7/+UYBvur6657/+YYBvur6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+VMA8FXWX/f8z58OgK+y/rrnf75RgLna+uue//lTA/CV1V/3/M837aKvvv6653++UQvmauuve/7nTwfAV1N/3fM/fzr24Cuuv+75nz8FFnxl9dc9//MOr/8/glixwRuUfM4AAAAASUVORK5CYII="},i$a.prototype.getSearchTexture=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII="};var q$8=[];function _$a(e){this._prepassRenderer=e._prepassRenderer;var t=i$b.createFXAAStage(e._scene.context),i=i$b.createAmbientOcclusionStage(),n=i$b.createBloomStage(),r=i$b.createOutlineStage(),o=i$b.createFogStage(),a=i$b.createRainStage(),s=i$b.createSnowStage(),l=i$b.createScreenSpaceReflectionStage(this._prepassRenderer);this._autoExposureEnabled=!1,this._autoExposure=i$b.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=M$8.ACES;var u=this._tonemapping;i.enabled=!1,n.enabled=!1,u.enabled=!1,o.enabled=!1,a.enabled=!1,s.enabled=!1,l.enabled=!1,t.enabled=!1;var c=new g$q(this),h={},d=q$8;for(d.push(t,i,n,u,r,o,s,a,l);d.length>0;){var f=d.pop();h[f.name]=f,f._textureCache=c;var p=f.length;if(e$2b(p))for(var _=0;_<p;++_)d.push(f.get(_))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;var m=this;i.uniforms.randomTexture=function(){return m._randomTexture},this._ao=i,this._bloom=n,this._fxaa=t,this._smaa=new i$a,this._smaa.enabled=!0,this._outline=r,this._fog=o,this._rain=a,this._snow=s,this._screenSpaceReflection=l,this._lastLength=void 0,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._smaaEnabled=void 0,this._ssrEnabled=void 0,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=h,this._textureCache=c}function U$7(e){if(e._stagesRemoved){e._stagesRemoved=!1;for(var t=[],i=e._stages,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._stages=t}}function y$9(e){for(;e$2b(e.length);)e=e.get(e.length-1);return e.outputTexture}function m$b(e,t,i,n,r){if(e$2b(e.execute))e.execute(t,i,n,r);else{var o,a=e.length;if(e.inputPreviousStageTexture)for(m$b(e.get(0),t,i,n,r),o=1;o<a;++o)m$b(e.get(o),t,y$9(e.get(o-1)),n,r);else for(o=0;o<a;++o)m$b(e.get(o),t,i,n,r)}}Object.defineProperties(_$a.prototype,{ready:{get:function(){for(var e=!1,t=this._stages,i=t.length-1;i>=0;--i){var n=t[i];e=e||n.ready&&n.enabled}var r=this._fxaa,o=this._smaa,a=this._ao,s=this._bloom,l=this._tonemapping,u=this._screenSpaceReflection;return e=(e=(e=(e=(e=(e=e||r.ready&&r.enabled)||o.ready&&o.enabled)||a.ready&&a.enabled)||s.ready&&s.enabled)||l.ready&&l.enabled)||u.ready&&u.enabled}},fxaa:{get:function(){return this._fxaa}},smaa:{get:function(){return this._smaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},outline:{get:function(){return this._outline}},rain:{get:function(){return this._rain}},snow:{get:function(){return this._snow}},screenSpaceReflection:{get:function(){return this._screenSpaceReflection}},fog:{get:function(){return this._fog}},length:{get:function(){return U$7(this),this._stages.length}},outputTexture:{get:function(){var e=this._smaa;if(e.enabled)return e.getSMAATexture();var t=this._fxaa;if(t.enabled&&t.ready)return this.getOutputTexture(t.name);for(var i=this._stages,n=i.length-1;n>=0;--n){var r=i[n];if(e$2b(r)&&r.ready&&r.enabled)return this.getOutputTexture(r.name)}var o=this._tonemapping;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);var a=this._screenSpaceReflection;if(a.screenSpaceReflection&&a.ready)return this.getOutputTexture(a.name);var s=this._bloom;if(s.enabled&&s.ready)return this.getOutputTexture(s.name);var l=this._ao;return l.enabled&&l.ready?this.getOutputTexture(l.name):void 0}},hasSelected:{get:function(){for(var e=l$R(this._stages);e.length>0;){var t=e.pop();if(e$2b(t)){if(e$2b(t.selected))return!0;var i=t.length;if(e$2b(i))for(var n=0;n<i;++n)e.push(t.get(n))}}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper!==e){if(!M$8.validate(e))throw new t$16("tonemapper was set to an invalid value.");e$2b(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());var t,i=this._autoExposureEnabled;switch(e){case M$8.REINHARD:t=i$b.createReinhardTonemappingStage(i);break;case M$8.MODIFIED_REINHARD:t=i$b.createModifiedReinhardTonemappingStage(i);break;case M$8.FILMIC:t=i$b.createFilmicTonemappingStage(i);break;default:t=i$b.createAcesTonemappingStage(i)}if(i){var n=this._autoExposure;t.uniforms.autoExposure=function(){return n.outputTexture}}this._tonemapper=e,this._tonemapping=t,e$2b(this._stageNames)&&(this._stageNames[t.name]=t,t._textureCache=this._textureCache),this._textureCacheDirty=!0}}}}),_$a.prototype.add=function(e){o$1q.typeOf.object("stage",e);var t=this._stageNames,i=q$8;for(i.push(e);i.length>0;){var n=i.pop();if(e$2b(t[n.name]))throw new t$16(n.name+" has already been added to the collection or does not have a unique name.");t[n.name]=n,n._textureCache=this._textureCache;var r=n.length;if(e$2b(r))for(var o=0;o<r;++o)i.push(n.get(o))}var a=this._stages;return e._index=a.length,a.push(e),this._textureCacheDirty=!0,e},_$a.prototype.remove=function(e){if(!this.contains(e))return!1;var t=this._stageNames,i=q$8;for(i.push(e);i.length>0;){var n=i.pop();delete t[n.name];var r=n.length;if(e$2b(r))for(var o=0;o<r;++o)i.push(n.get(o))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0},_$a.prototype.contains=function(e){return e$2b(e)&&e$2b(e._index)&&e._textureCache===this._textureCache},_$a.prototype.get=function(e){U$7(this);var t=this._stages,i=t.length;return o$1q.typeOf.number.greaterThanOrEquals("stages length",i,0),o$1q.typeOf.number.greaterThanOrEquals("index",e,0),o$1q.typeOf.number.lessThan("index",e,i),t[e]},_$a.prototype.removeAll=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)this.remove(e[i]);e.length=0},_$a.prototype.getStageByName=function(e){return this._stageNames[e]},new e$1U,new e$1U,_$a.prototype.update=function(e,t,i,n){U$7(this);var r=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=r;var a,s,l=this._stages,u=o.length=l.length,c=0;for(a=0;a<u;++a)(s=l[a]).ready&&s.enabled&&s._isSupported(e)&&(o[c++]=s);o.length=c;var h=c!==r.length;if(!h)for(a=0;a<c;++a)if(o[a]!==r[a]){h=!0;break}var d=this._ao,f=this._bloom,p=this._autoExposure,_=this._tonemapping,m=this._fxaa,g=this._smaa,x=this._outline,v=this._fog,y=this._rain,$=this._snow,b=this._screenSpaceReflection;_.enabled=i;var T=d.enabled&&d._isSupported(e),C=f.enabled&&f._isSupported(e),S=_.enabled&&_._isSupported(e),w=m.enabled&&m._isSupported(e),E=g.enabled,P=v.enabled,A=y.enabled,L=$.enabled,M=x.enabled,R=b.enabled;if((h||this._textureCacheDirty||c!==this._lastLength||T!==this._aoEnabled||P!==this._fogEnabled||A!==this._rainEnabled||L!==this._snowEnabled||C!==this._bloomEnabled||S!==this._tonemappingEnabled||w!==this._fxaaEnabled||E!==this._smaaEnabled||R!==this._ssrEnabled)&&(this._textureCache.updateDependencies(),this._lastLength=c,this._aoEnabled=T,this._fogEnabled=P,this._rainEnabled=A,this._snowEnabled=L,this._bloomEnabled=C,this._tonemappingEnabled=S,this._fxaaEnabled=w,this._smaaEnabled=E,this._ssrEnabled=R,this._textureCacheDirty=!1),e$2b(this._randomTexture)&&!T&&(this._randomTexture.destroy(),this._randomTexture=void 0),M){var O=n._layers.getSelectedLayer();e$2b(O)&&(O._selectColorType===Zr$2.SILHOUETTE_EDGE?x.uniforms.visibleEdgeColor=e$1U.clone(O._selectedLineColor):x.uniforms.visibleEdgeColor=e$1U.WHITE)}if(!e$2b(this._randomTexture)&&T){u=196608;var I=new Uint8Array(u);for(a=0;a<u;a+=3)I[a]=Math.floor(255*Math.random());this._randomTexture=new t$V({context:e,pixelFormat:V$10.RGB,pixelDatatype:_$$.UNSIGNED_BYTE,source:{arrayBufferView:I,width:256,height:256},sampler:new e$1P({wrapS:q$19.REPEAT,wrapT:q$19.REPEAT,minificationFilter:tt$h.NEAREST,magnificationFilter:rt$i.NEAREST})})}for(this._textureCache.update(e),m.update(e,t),g.update(e,t),d.update(e,t),f.update(e,t),_.update(e,t),x.update(e,t),v.update(e,t),y.update(e,t),$.update(e,t),b.update(e,t),this._autoExposureEnabled&&p.update(e,t),u=l.length,a=0;a<u;++a)l[a].update(e,t)},_$a.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)},_$a.prototype.getOutputTexture=function(e){var t=this.getStageByName(e);if(e$2b(t))return y$9(t)},_$a.prototype.execute=function(e,t,i,n){var r=this._activeStages,o=r.length,a=this._fxaa,s=this._smaa,l=this._ao,u=this._bloom,c=this._autoExposure,h=this._tonemapping,d=this._outline,f=this.compositor,p=this._fog,_=this._rain,m=this._snow,g=this._screenSpaceReflection,x=l.enabled&&l._isSupported(e),v=u.enabled&&u._isSupported(e),y=this._autoExposureEnabled,$=h.enabled&&h._isSupported(e),b=a.enabled&&a._isSupported(e),T=s.enabled,C=d.enabled,S=p.enabled,w=_.enabled,E=m.enabled,P=g.enabled;if(S||w||E||P||C||T||b||x||v||$||0!==o){var A=t;C&&d.ready&&e$2b(e.uniformState.maskTexture)&&(m$b(d,e,A,i,n),A=y$9(d)),e$2b(f)&&f.isEnable()&&(f.copy(e,A),f.execute(e,f.outputFbo),A=f.outputFbo.getColorTexture(0)),x&&l.ready&&(m$b(l,e,A,i,n),A=y$9(l)),v&&u.ready&&(m$b(u,e,A,i,n),A=y$9(u)),y&&c.ready&&m$b(c,e,A,i,n),$&&h.ready&&(m$b(h,e,A,i,n),A=y$9(h));var L=A;if(o>0){m$b(r[0],e,A,i,n);for(var M=1;M<o;++M)m$b(r[M],e,y$9(r[M-1]),i,n);L=y$9(r[o-1])}S&&(m$b(p,e,L,i,n),L=y$9(p)),P&&g.ready&&(m$b(g,e,L,i,n),L=y$9(g)),E&&(m$b(m,e,L,i,n),L=y$9(m)),w&&(m$b(_,e,L,i,n),L=y$9(_)),b&&a.ready&&m$b(a,e,L,i,n),T&&(s.setInputTexture(L),s.execute(e))}};var S$4=new f$18;function v$9(e){this._url=e,this._rgbeLoader=new U$h,this._sourceData=void 0,this._loading=!1,this._width=1,this._height=1,this._inputTexture=void 0,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._outputTexture=void 0,this._pingPongTexture=void 0,this._ready=!1}_$a.prototype.copy=function(e,t,i){if(e.webgpu?(S$4.x=0,S$4.y=0,S$4.width=e.drawingBufferWidth,S$4.height=e.drawingBufferHeight):(S$4.x=0,S$4.y=0,S$4.width=e.realDrawingBufferWidth,S$4.height=e.realDrawingBufferHeight,S$4.x+=-e._curCol/e._cols*e.realDrawingBufferWidth,S$4.y+=-(e._rows-e._curRow-1)/e._rows*e.realDrawingBufferHeight),!e$2b(this._copyColorCommand)){var n,r=this;i&&!e.webgpu&&e.fragmentDepth&&e.depthTexture&&!e.webglOptions.preserveDrawingBuffer?n=new s$U({sources:[n=["#extension GL_EXT_frag_depth : enable","#extension GL_OES_standard_derivatives : enable","uniform sampler2D colorTexture;","varying vec2 v_textureCoordinates;","void main()","{","float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));","gl_FragDepthEXT = logDepthOrDepth;","gl_FragColor = texture2D(colorTexture, v_textureCoordinates);","}"].join("\n")],defines:i?["LOG_DEPTH"]:[]}):n=ie$6,this._copyColorCommand=e.createViewportQuadCommand(n,{shaderProgramName:"postPorcessCopyColor",uniformMap:{colorTexture:function(){return r.outputTexture}},owner:this})}var o=d$1m.fromCache({viewport:S$4,depthTest:{enabled:!e.webglOptions.preserveDrawingBuffer&&!e.webgpu}});this._copyColorCommand.renderState=o,this._copyColorCommand.framebuffer=t,(e.fragmentDepth&&e$2b(e.uniformState.globeDepthTexture)||!e.fragmentDepth||!e.depthTexture)&&this._copyColorCommand.execute(e)},_$a.prototype.isDestroyed=function(){return!1},_$a.prototype.destroy=function(){return this._fxaa.destroy(),this._smaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),i$10(this)},Object.defineProperties(v$9.prototype,{ready:{get:function(){return this._ready}},texture:{get:function(){return this._outputTexture}}});const Y$3="\n precision mediump float;\n precision mediump int;\n\n attribute vec4 position;\n attribute vec2 uv;\n attribute float faceIndex;\n\n varying vec3 vOutputDirection;\n\n // RH coordinate system; PMREM face-indexing convention\n vec3 getDirection( vec2 uv, float face ) {\n\n uv = 2.0 * uv - 1.0;\n\n vec3 direction = vec3( uv, 1.0 );\n\n if ( face == 0.0 ) {\n\n direction = direction.zyx; // ( 1, v, u ) pos x\n\n } else if ( face == 1.0 ) {\n\n direction = direction.xzy;\n direction.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n } else if ( face == 2.0 ) {\n\n direction.x *= -1.0; // ( -u, v, 1 ) pos z\n\n } else if ( face == 3.0 ) {\n\n direction = direction.zyx;\n direction.xz *= -1.0; // ( -1, v, -u ) neg x\n\n } else if ( face == 4.0 ) {\n\n direction = direction.xzy;\n direction.xy *= -1.0; // ( -u, -1, v ) neg y\n\n } else if ( face == 5.0 ) {\n\n direction.z *= -1.0; // ( u, v, -1 ) neg z\n\n }\n\n return direction;\n\n }\n\n void main() {\n\n vOutputDirection = getDirection( uv, faceIndex );\n gl_Position = vec4( position.xyz, 1.0 );\n\n }\n",ie$2="\n precision mediump float;\n precision mediump int;\n\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n\n #define RECIPROCAL_PI 0.3183098861837907\n #define RECIPROCAL_PI2 0.15915494309189535\n\n vec2 equirectUv( in vec3 dir ) {\n\n // dir is assumed to be unit length\n \n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n \n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n \n return vec2( u, v );\n \n }\n\n void main() {\n\n vec3 outputDirection = normalize( vOutputDirection );\n vec2 uv = equirectUv( outputDirection );\n\n gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n }\n",oe$5="\n precision mediump float;\n precision mediump int;\n #extension GL_EXT_shader_texture_lod : enable\n #define ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\t#define n 20\n\t#define CUBEUV_TEXEL_WIDTH 0.0013020833333333333\n\t#define CUBEUV_TEXEL_HEIGHT 0.0009765625\n\t#define CUBEUV_MAX_MIP 8.0\n\t\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n uniform int samples;\n uniform float weights[ n ];\n uniform bool latitudinal;\n uniform float dTheta;\n uniform float mipInt;\n uniform vec3 poleAxis;\n\n float getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\t\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\t\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\n\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t}\n\n vec3 getSample( float theta, vec3 axis ) {\n\n float cosTheta = cos( theta );\n // Rodrigues' axis-angle rotation\n vec3 sampleDirection = vOutputDirection * cosTheta\n + cross( axis, vOutputDirection ) * sin( theta )\n + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n return bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n }\n\n void main() {\n\n vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n if ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n }\n\n axis = normalize( axis );\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n for ( int i = 1; i < n; i++ ) {\n\n if ( i >= samples ) {\n\n break;\n\n }\n\n float theta = dTheta * float( i );\n gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n }\n \n }\n",g$g=(1+Math.sqrt(5))/2,D$7=1/g$g,E$8=20,k$7=[new o$1p(1,1,1),new o$1p(-1,1,1),new o$1p(1,1,-1),new o$1p(-1,1,-1),new o$1p(0,g$g,D$7),new o$1p(0,g$g,-D$7),new o$1p(D$7,0,g$g),new o$1p(-D$7,0,g$g),new o$1p(g$g,D$7,0),new o$1p(-g$g,D$7,0)],A$b=4,J$3=[.125,.215,.35,.446,.526,.582];function ne$5(e,t){const i=[],n=[],r=[];let o=t;const a=t-A$b+1+J$3.length;for(let s=0;s<a;s++){const a=Math.pow(2,o);n.push(a);let l=1/a;s>t-A$b?l=J$3[s-t+A$b-1]:0===s&&(l=0),r.push(l);const u=1/(a-2),c=-u,h=1+u,d=[c,c,h,c,h,h,c,c,h,h,c,h],f=6,p=6,_=3,m=2,g=1,x=new Float32Array(_*p*f),v=new Float32Array(m*p*f),y=new Float32Array(g*p*f);for(let e=0;e<f;e++){const t=e%3*2/3-1,i=e>2?0:-1,n=[t,i,0,t+2/3,i,0,t+2/3,i+1,0,t,i,0,t+2/3,i+1,0,t,i+1,0];x.set(n,_*p*e),v.set(d,m*p*e);const r=[e,e,e,e,e,e];y.set(r,g*p*e)}const $=t$Y.createVertexBuffer({context:e,typedArray:x,usage:A$19.STATIC_DRAW}),b=t$Y.createVertexBuffer({context:e,typedArray:v,usage:A$19.STATIC_DRAW}),T=t$Y.createVertexBuffer({context:e,typedArray:y,usage:A$19.STATIC_DRAW}),C=new c$12({context:e,attributes:[{name:"position",index:0,vertexBuffer:$,componentsPerAttribute:3,componentDatatype:S$12.FLOAT},{name:"uv",index:1,vertexBuffer:b,componentsPerAttribute:2,componentDatatype:S$12.FLOAT},{name:"faceIndex",index:2,vertexBuffer:T,componentsPerAttribute:1,componentDatatype:S$12.FLOAT}]});i.push(C),o>A$b&&o--}return{lodPlanes:i,sizeLods:n,sigmas:r}}function re$4(e,t){const i=e.context,n=r$13.fromCache({context:i,vertexShaderSource:Y$3,fragmentShaderSource:ie$2,attributeLocations:{position:0,uv:1,faceIndex:2}}),r=t._lodPlanes[0],o={envMap:function(){return t._inputTexture}},a=new t$V({context:i,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,width:t._width,height:t._height}),s=new t$I({name:"Prefilter",vertexArray:r,shaderProgram:n,uniformMap:o,outputTexture:a,persists:!0,renderState:d$1m.fromCache({viewport:new f$18(0,0,3*t._cubeSize,2*t._cubeSize)}),owner:t});t._outputTexture=a,e.commandList.push(s)}v$9.prototype._halfBlur=function(e,t,i,n,r,o,a,s){const l=this._sizeLods[n]-1,u=isFinite(o)?Math.PI/(2*l):2*Math.PI/(2*E$8-1),c=o/u,h=isFinite(o)?1+Math.floor(3*c):E$8,d=[];let f=0;for(let e=0;e<E$8;++e){const t=e/c,i=Math.exp(-t*t/2);d.push(i),0===e?f+=i:e<h&&(f+=2*i)}for(let e=0;e<d.length;e++)d[e]=d[e]/f;const{_lodMax:p}=this,_=this._sizeLods[r],m=3*_*(r>p-A$b?r-p+A$b:0),g=4*(this._cubeSize-_),x=this._lodPlanes[r],v=this._blurSP,y={envMap:function(){return this.properties.envMap},samples:function(){return this.properties.samples},weights:function(){return this.properties.weights},latitudinal:function(){return this.properties.latitudinal},dTheta:function(){return this.properties.dTheta},mipInt:function(){return this.properties.mipInt},poleAxis:function(){return this.properties.poleAxis},properties:{envMap:null,samples:1,weights:new Float32Array(E$8),latitudinal:!1,dTheta:0,mipInt:0,poleAxis:new o$1p(0,1,0)}};y.properties.envMap=t,y.properties.samples=h,y.properties.weights=d,y.properties.latitudinal="latitudinal"===a,s&&(y.properties.poleAxis=s),y.properties.dTheta=u,y.properties.mipInt=p-n;const $=new t$I({name:"PrefilterHalfBlur",vertexArray:x,shaderProgram:v,uniformMap:y,outputTexture:i,persists:!0,renderState:d$1m.fromCache({viewport:new f$18(m,g,3*_,2*_)}),clear:!1,owner:this});e.commandList.push($)},v$9.prototype._blur=function(e,t,i,n,r,o){const a=this._pingPongTexture;this._halfBlur(e,t,a,i,n,r,"latitudinal",o),this._halfBlur(e,a,t,n,n,r,"longitudinal",o)},v$9.prototype.update=function(e){const t=e.context;e$2b(this._sourceData)||this._loading||(t$11.createIfNeeded(this._url).fetchArrayBuffer().then((e=>{this._sourceData=this._rgbeLoader.parse(e),this._loading=!1})).otherwise((e=>{this._loading=!1})),this._loading=!0);if(e$2b(this._sourceData)){if(!e$2b(this._inputTexture)){this._inputTexture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,flipY:!0,source:{arrayBufferView:this._sourceData.data,width:this._sourceData.width,height:this._sourceData.height}}),this._lodMax=Math.floor(Math.log2(this._inputTexture.width/4)),this._cubeSize=Math.pow(2,this._lodMax),this._width=3*Math.max(this._cubeSize,112),this._height=4*this._cubeSize;const{_lodMax:e}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=ne$5(t,e)),this._blurSP=r$13.fromCache({context:t,vertexShaderSource:Y$3,fragmentShaderSource:oe$5,attributeLocations:{position:0,uv:1,faceIndex:2}}),this._pingPongTexture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:_$$.HALF_FLOAT,width:this._width,height:this._height})}if(!this._ready){re$4(e,this);for(let t=1;t<this._lodPlanes.length;t++){const i=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),n=k$7[(t-1)%k$7.length];this._blur(e,this._outputTexture,t-1,t,i,n)}this._ready=!0}}},v$9.prototype.isDestroyed=function(){return!1},v$9.prototype.destroy=function(){return this._inputTexture=this._inputTexture&&this._inputTexture.destroy(),this._pingPongTexture=this._pingPongTexture&&this._pingPongTexture.destroy(),this._outputTexture=this._outputTexture&&this._outputTexture.destroy(),this._blurSP=this._blurSP&&this._blurSP.destroy(),i$10(this)};var d$f=2e4;function h$8(e){this._positionArray=e,this.type="PLANE",this.planeWidth=1,this.planeHeight=1,this._center=new o$1p,this.init(),this._volBounds=void 0}h$8.prototype.createVertices=function(e){var t=S$12.createTypedArray(S$12.FLOAT,12),i=0;return t[i++]=this._topPoint1.x-e.x,t[i++]=this._topPoint1.y-e.y,t[i++]=this._topPoint1.z-e.z,t[i++]=this._topPoint2.x-e.x,t[i++]=this._topPoint2.y-e.y,t[i++]=this._topPoint2.z-e.z,t[i++]=this._bottomPoint1.x-e.x,t[i++]=this._bottomPoint1.y-e.y,t[i++]=this._bottomPoint1.z-e.z,t[i++]=this._bottomPoint2.x-e.x,t[i++]=this._bottomPoint2.y-e.y,t[i++]=this._bottomPoint2.z-e.z,t},h$8.prototype.createTexCoords=function(){var e=S$12.createTypedArray(S$12.FLOAT,8);return e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=0,e[5]=1,e[6]=1,e[7]=1,e},h$8.prototype.createNormals=function(){return S$12.createTypedArray(S$12.FLOAT,12)},h$8.prototype.init=function(){this._topPoint1=this._positionArray[0],this._topPoint2=this._positionArray[1];var e=a$18.fromCartesian(this._positionArray[0]),t=a$18.fromCartesian(this._positionArray[1]),i=a$18.clone(e),n=a$18.clone(t);e.height+=.5*d$f,t.height+=.5*d$f,i.height-=d$f,n.height-=d$f,this._topPoint1=a$18.toCartesian(e),this._topPoint2=a$18.toCartesian(t),this._bottomPoint1=a$18.toCartesian(i),this._bottomPoint2=a$18.toCartesian(n),this.planeWidth=o$1p.distance(this._topPoint1,this._topPoint2),this.planeHeight=d$f;var r=[];r.push(this._topPoint1),r.push(this._topPoint2),r.push(this._bottomPoint1),r.push(this._bottomPoint2),this.boundingSphere=i$1c.fromPoints(r);var o=r.length,a=this;r.map((function(e){a._center.x+=e.x/o,a._center.y+=e.y/o,a._center.z+=e.z/o}));var s={};p$1d.fromRotationTranslation(p$1e.IDENTITY,this._center,s),this.modelMatrix=s},h$8.prototype.getVertexArray=function(e){var t=this.createVertices(this._center),i=t$Y.createVertexBuffer({context:e,typedArray:t,usage:A$19.STATIC_DRAW}),n=this.createNormals(this._center),r=t$Y.createVertexBuffer({context:e,typedArray:n,usage:A$19.STATIC_DRAW}),o=this.createTexCoords(),a=t$Y.createVertexBuffer({context:e,typedArray:o,usage:A$19.STATIC_DRAW}),s=[];if(s.push({name:"aPosition",index:0,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({name:"aNormal",index:1,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({name:"aTexCoord",index:2,vertexBuffer:a,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),e$2b(this._volBounds)){for(var l=S$12.createTypedArray(S$12.FLOAT,12),u=[this._topPoint1,this._topPoint2,this._bottomPoint1,this._bottomPoint2],c=0;c<4;c++){var h=a$18.fromCartesian(u[c]),d=e$2a.toDegrees(h.longitude),f=e$2a.toDegrees(h.latitude),p=h.height,_=(d-this._volBounds.left)/(this._volBounds.right-this._volBounds.left),m=(f-this._volBounds.bottom)/(this._volBounds.top-this._volBounds.bottom),g=(p-this._volBounds.minHeight)/(this._volBounds.maxHeight-this._volBounds.minHeight);l[3*c]=_,l[3*c+1]=m,l[3*c+2]=g}var x=t$Y.createVertexBuffer({context:e,typedArray:l,usage:A$19.STATIC_DRAW});s.push({index:3,vertexBuffer:x,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}var v=S$12.createTypedArray(S$12.UNSIGNED_SHORT,6);return v[0]=0,v[1]=1,v[2]=3,v[3]=0,v[4]=3,v[5]=2,new c$12({context:e,attributes:s,indexBuffer:t$Y.createIndexBuffer({context:e,typedArray:v,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})})},h$8.prototype.destroy=function(){return i$10(this)};var _0x27b395=(_0xddea8f=!0,function(e,t){var i=_0xddea8f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xddea8f=!1,i}),_0x203b9e=_0x27b395(void 0,(function(){return _0x203b9e.toString().search("(((.+)+)+)+$").toString().constructor(_0x203b9e).search("(((.+)+)+)+$")})),_0xddea8f;_0x203b9e();var V$6="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uClampIDTexture;\nuniform sampler2D uClampColorTexture;\nuniform sampler2D uModelTexture;\nuniform vec4 uModelTextureRect;\nuniform vec4 uModelColor;\nuniform vec3 uHasModelTextureAndPixelLength;\nuniform vec3 uModelTextureTiling;\nuniform vec4 uModelIDColor;\nuniform vec4 uProfilePickColor;\nuniform bool uPicking;\nuniform vec4 uHighLightColor;\nuniform float uUseOriModelTex;\nuniform float uClippingType;\nvarying vec2 v_texCoord;\nvarying float v_face;\n#ifdef Volume2\nvarying vec3 vecRotioCoord;\n#endif\nvoid main()\n{\nvec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\nvec4 idColor = texture2D(uClampIDTexture, texCoord) * 255.0;\nif((gl_FrontFacing && uClippingType < 1.5) || idColor.r != uModelIDColor.r || idColor.g != uModelIDColor.g || idColor.b != uModelIDColor.b)\n{\n discard;\n}\nif(uPicking){\n gl_FragColor = uProfilePickColor;\n return;\n}\nvec4 color = texture2D(uClampColorTexture, texCoord);\ntexCoord = mod(v_texCoord * uModelTextureTiling.xy, vec2(1.0));\n#ifdef GEOBOX\n if(v_face > -0.1 && v_face < 0.1)\n {\n texCoord = mod(v_texCoord * uModelTextureTiling.xy, vec2(1.0));\n }\n else if(v_face > 0.5)\n {\n texCoord = mod(v_texCoord * vec2(uModelTextureTiling.zy), vec2(1.0));\n }\n else if(v_face < -0.5)\n {\n texCoord = mod(v_texCoord * vec2(uModelTextureTiling.zx), vec2(1.0));\n }\n#endif\nvec2 pixelSize = uHasModelTextureAndPixelLength.yz;\ntexCoord = clamp(texCoord, pixelSize, 1.0 - pixelSize);\nvec2 modelTexCoord = uUseOriModelTex > 0.5 ? v_texCoord : mix(uModelTextureRect.xy, uModelTextureRect.zw, texCoord);\nvec4 texColor = texture2D(uModelTexture, modelTexCoord);\ngl_FragColor = uUseOriModelTex > 0.5 ? texColor * color * uHighLightColor : mix(uModelColor, texColor, uHasModelTextureAndPixelLength.x) * uHighLightColor * color;\n#ifdef Volume\n#ifdef Volume2\n if((vecRotioCoord.x < 1.0 && vecRotioCoord.x >0.0) && (vecRotioCoord.y < 1.0 && vecRotioCoord.y >0.0) && (vecRotioCoord.z < 1.0 && vecRotioCoord.z >0.0))\n {\n gl_FragColor = czm_getVolumeValue(vecRotioCoord);\n }\n#else\n float wValue = 0.0;\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, wValue);\n#endif\n#endif\n}";function f$a(e,t,i,n){this._scene=e._scene,this._attributeLocations={aPosition:0,aNormal:1,aTexCoord:2},this._geometry=n,this._drawCommandInClampTexture=null,this._drawCommandInScene=null,this._drawCommandNormal=null,this._drawCommandInScenePreModel={},this._clampFramebuffer=null,this._name="solidModelsProfile_"+e._name+"_"+t.toString(),this._textureAtlas=e._textureAtlas,this._modelInfo=i,this._picking=!1,this._owner=e,this._clippingType=R$J.KeepInside,this._volume=void 0,this._width=1,this._height=1,this._start=!1}f$a.prototype.createCommand=function(e){var t=p$1d.clone(this._geometry.modelMatrix),i=this._geometry.boundingSphere,n=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:t,pass:Le$s.OPAQUE,cull:!1,boundingVolume:i});n.vertexArray=this._geometry.getVertexArray(e);var r=new s$U({name:"ClipPlaneVp",sources:[R$K]}),o=new s$U({name:"SolidProfileFp",sources:[V$6]});r.defines.push("HAS_TEXTURECOORD"),this._geometry.type==P$U.GEOCYLINDER?(r.defines.push("GEOCYLINDER"),o.defines.push("GEOCYLINDER")):this._geometry.type==P$U.GEOBOX&&(r.defines.push("GEOBOX"),o.defines.push("GEOBOX")),e$2b(this._volume)&&(r.defines.push("Volume"),o.defines.push("Volume"),this._volume.hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(r.defines.push("Volume2"),o.defines.push("Volume2"))),p$1d.equals(t,p$1d.IDENTITY)&&r.defines.push("USE_RelativeOrigin"),n.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),n.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:{enabled:!0},blending:Ee$r.ALPHA_BLEND});for(var a in this._drawCommandInScene=n,this._modelInfo)this.copyCommandForSingleModel(a,this._modelInfo[a],this._drawCommandInScene,e);this.createCommandInClampTexture(n,e),this.createNormalCommand(this._drawCommandInClampTexture,e)};var C$8=new o$1p,g$f=new e$29,l$b=new o$1p,v$8=new o$1p,m$a=new e$1U;function L$b(e){e$2b(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}function r$e(){t$16.throwInstantiationError()}f$a.prototype.copyCommandForSingleModel=function(e,t,i,n){var r=i$_.shallowClone(i),o=this;r.uniformMap={uClampIDTexture:function(){var e=o._clampFramebuffer;return e$2b(e)?e.renderTexture._fb.getColorTexture(0):n.defaultTexture},uClampColorTexture:function(){var e=o._clampFramebuffer;return e$2b(e)&&2===e.renderTexture._fb.numberOfColorAttachments?e.renderTexture._fb.getColorTexture(1):n.defaultTexture},uModelColor:function(){return t.color},uHasModelTextureAndPixelLength:function(){if(v$8.x=t.textureAtlasID>=0?1:0,e$2b(o._textureAtlas)){var e=o._textureAtlas.texture.width,i=o._textureAtlas.texture.height,n=o._textureAtlas.textureCoordinates[t.textureAtlasID];if(e$2b(n)){var r=n.width*e,a=n.height*i;v$8.y=1/r,v$8.z=1/a}}return v$8},uUseOriModelTex:function(){return!e$2b(o._textureAtlas)&&e$2b(t.texture)},uModelTexture:function(){return e$2b(o._textureAtlas)?o._textureAtlas.texture:e$2b(t.texture)?t.texture:n.defaultTexture},uModelTextureRect:function(){if(e$2b(o._textureAtlas)){var e=o._textureAtlas.textureCoordinates[t.textureAtlasID];e$2b(e)&&(g$f.x=e.x,g$f.y=e.y,g$f.z=e.x+e.width,g$f.w=e.y+e.height)}return g$f},uModelTextureTiling:function(){return"PLANE"==o._geometry.type?(l$b.x=o._geometry.planeWidth/t.textureTilingU,l$b.y=o._geometry.planeHeight/t.textureTilingV):o._geometry.type==P$U.GEOCYLINDER?(l$b.x=2*Math.PI*o._geometry.geoTopRadius/t.textureTilingU,l$b.y=o._geometry.geoHeight/t.textureTilingV):o._geometry.type==P$U.GEOREGION3D?(l$b.x=o._geometry.width/t.textureTilingU,l$b.y=o._geometry.height/t.textureTilingV):o._geometry.type==P$U.GEOBOX&&(l$b.x=o._geometry.geoWidth/t.textureTilingU,l$b.y=o._geometry.geoHeight/t.textureTilingV,l$b.z=o._geometry.geoLength/t.textureTilingU),l$b},uClippingType:function(){return o._clippingType},uGeometryHeight:function(){return o._geometry.type==P$U.GEOCYLINDER?o._geometry.geoHeight:1},uModelIDColor:function(){return C$8.x=t.pickColor.x,C$8.y=t.pickColor.y,C$8.z=t.pickColor.z,C$8},uProfilePickColor:function(){return t.profilePickId.color},uPicking:function(){return o._picking},uHighLightColor:function(){var e=o._owner._selectedProfileIDs;if(0==e.length)m$a.red=1,m$a.green=1,m$a.blue=1;else{var i=!1;e.map((function(e){t.id==e&&(i=!0)})),i?(m$a.red=.7,m$a.green=.7,m$a.blue=1):(m$a.red=1,m$a.green=1,m$a.blue=1)}return m$a},uVolumeTexture:function(){return o._volume._volTexture},width:function(){return o._volume._volImageBuffer.nWidth},height:function(){return o._volume._volImageBuffer.nHeight},depth:function(){return o._volume._volImageBuffer.nDepth},sideBlockCount:function(){return o._volume._volImageBuffer.nSideBlockCount},blockLength:function(){return o._volume._volImageBuffer.nBlockLength},texLength:function(){return o._volume._volImageBuffer.nLength},uFilterMode:function(){var e=0;return e$2b(o._volume.hypsometricSetting)&&o._volume.hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST&&(e=1),e},uMixColorType:function(){return 0},uDataFloor:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMinKey:0},uDataCeil:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMaxKey:0},uVolumeType:function(){return e$2b(o._volume.hypsometricSetting)&&o._volume.hypsometricSetting.filterMode===k$Q.FilterMode.LINEAR?0:1},uHypOpacity:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.Opacity:1},uHypContourInterval:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.LineInterval:100},uHypLineColor:function(){var e=new e$29(0,1,1,1);return e$2b(o._volume.hypsometricSetting)&&(e.x=o._volume.hypsometricSetting.LineColor.red,e.y=o._volume.hypsometricSetting.LineColor.green,e.z=o._volume.hypsometricSetting.LineColor.blue,e.w=o._volume.hypsometricSetting.LineColor.alpha),e},uHypContourFillMode:function(){var e=1;if(e$2b(o._volume.hypsometricSetting))switch(o._volume.hypsometricSetting.DisplayMode){case k$Q.DisplayMode.NONE:e=0;break;case k$Q.DisplayMode.FACE:e=1;break;case k$Q.DisplayMode.LINE:e=2;break;case k$Q.DisplayMode.FACE_AND_LINE:e=3}return e},uHypFloor:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMaxKey:0},uHypMaxVisibleValue:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.MaxVisibleValue:0},uHypMinVisibleValue:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.MinVisibleValue:0},uNoValueColor:function(){return e$2b(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.noValueColor:e$1U.WHITE},uHypsometricVisible:function(){return 1},uHypHasAnalysisRegion:function(){return 0},uHypsometricRenderTexture:function(){return 0},uHypsometricTexture:function(){return o._volume._hypsometricTexture}},this._drawCommandInScenePreModel[e]=r},f$a.prototype.createCommandInClampTexture=function(e,t){var i=i$_.shallowClone(e);i.pass=Le$s.OPAQUE;var n={enabled:!1};this._geometry.type===P$U.GEOREGION3D&&this._clippingType===R$J.KeepOutside&&(n.enabled=!0,n.face=de$x.FRONT),i.renderState=d$1m.fromCache({cull:n,depthTest:{enabled:!0},depthMask:!0,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:_0x187e60.createReceiveClampObjectStencilTest(!0)}),i.uniformMap={uDiffuseColor:function(){return e$1U.WHITE}};var r=new s$U({name:"CommonNoLigthNoTextureVp",sources:[Ht$7]});p$1d.equals(e._modelMatrix,p$1d.IDENTITY)&&r.defines.push("USE_RelativeOrigin"),i.shaderProgram=r$13.fromCache({name:"ProfileRenderClampTexture",context:t,vertexShaderSource:r,fragmentShaderSource:Yt$8,attributeLocations:this._attributeLocations}),this._drawCommandInClampTexture=i},f$a.prototype.createNormalCommand=function(e){this._drawCommandNormal=i$_.shallowClone(e),this._drawCommandNormal.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,colorMask:{red:!0,green:!0,blue:!0,alpha:!0},stencilTest:!1})},f$a.prototype.createClampFrameBuffer=function(e,t){e$2b(this._clampFramebuffer)||(this._frameState=t,e$2b(t._framebufferList[this._name])?this._clampFramebuffer=t._framebufferList[this._name]:(this._clampFramebuffer=e.createClampFramebuffer(),this._clampFramebuffer.renderTexture.mrt=!0,this._clampFramebuffer.isUpdate=this._start,t._framebufferList[this._name]=this._clampFramebuffer))},f$a.prototype._build=function(){this._start=!0,this._clampFramebuffer&&(this._clampFramebuffer.isUpdate=!0)},f$a.prototype.update=function(e,t,i,n){this._picking=t.passes.pick,this._frameState=t;var r=e.drawingBufferWidth,o=e.drawingBufferHeight;if((this._width!==r||this._height!==o)&&(this._width=r,this._height=o,e$2b(this._clampFramebuffer)&&(this._clampFramebuffer.renderTexture._mrt=!1)),(!e$2b(this._drawCommandInScene)||this._geometry._isGeometryDirty)&&(this.createCommand(e,t),this.createClampFrameBuffer(e,t)),t._fboState.frameBufferType==Qe$c.CLAMP)t._fboState.name==this._name&&i.push(this._drawCommandInClampTexture);else for(var a in this._geometry.type==P$U.GEOCYLINDER&&(e.webgpu&&(this._drawCommandNormal.pass=Le$s.OPAQUE-1),i.push(this._drawCommandNormal)),this._drawCommandInScenePreModel){var s=this._modelInfo[a];if(!o$1p.equals(s.pickColor,o$1p.ZERO)){var l=this._drawCommandInScenePreModel[a];i.push(l)}}},f$a.prototype.destroy=function(){return L$b(this._drawCommandInClampTexture),this._drawCommandInClampTexture=void 0,L$b(this._drawCommandInScene),this._drawCommandInScene=void 0,this._drawCommandNormal=void 0,this._drawCommandInScenePreModel={},e$2b(this._clampFramebuffer)&&(this._clampFramebuffer.destroy(),this._frameState._framebufferList[this._name]=void 0),e$2b(this._geometry)&&(this._geometry=null),i$10(this)},r$e.computeDefaultLevelZeroMaximumGeometricError=function(e){return 2*e.ellipsoid.maximumRadius*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))},Object.defineProperties(r$e.prototype,{quadtree:{get:t$16.throwInstantiationError,set:t$16.throwInstantiationError},ready:{get:t$16.throwInstantiationError},tilingScheme:{get:t$16.throwInstantiationError},errorEvent:{get:t$16.throwInstantiationError}}),r$e.prototype.update=t$16.throwInstantiationError,r$e.prototype.beginUpdate=t$16.throwInstantiationError,r$e.prototype.endUpdate=t$16.throwInstantiationError,r$e.prototype.getLevelMaximumGeometricError=t$16.throwInstantiationError,r$e.prototype.loadTile=t$16.throwInstantiationError,r$e.prototype.computeTileVisibility=t$16.throwInstantiationError,r$e.prototype.showTileThisFrame=t$16.throwInstantiationError,r$e.prototype.computeDistanceToTile=t$16.throwInstantiationError,r$e.prototype.isDestroyed=t$16.throwInstantiationError,r$e.prototype.destroy=t$16.throwInstantiationError;var e$5={LOW:1024,MEDIUM:2048,HIGH:4096},Quality=Object.freeze(e$5);function R$8(e){o$1q.typeOf.object("scene",e),this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}R$8.prototype.completeMorph=function(){e$2b(this._completeMorph)&&this._completeMorph()},R$8.prototype.morphTo2D=function(e,t){e$2b(this._completeMorph)&&this._completeMorph();var i=this._scene;this._previousMode=i.mode,this._morphToOrthographic=i.camera.frustum instanceof a$V,this._previousMode!==C$13.SCENE2D&&this._previousMode!==C$13.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,C$13.SCENE2D,!0),i._mode=C$13.MORPHING,i.camera._setTransform(p$1d.IDENTITY),this._previousMode===C$13.COLUMBUS_VIEW?be$2(this,e):Ze$2(this,e,t),0===e&&e$2b(this._completeMorph)&&this._completeMorph())};var ce$7=new o$1p,ae$3=new o$1p,se$3=new o$1p,pe$4=new o$1p,ue$4=new o$1p,me$4=new o$1p,he$3=new o$1p,fe$2=new a$18,de$4=new p$1d,ve$3=new o$15,le$6=new a$V,_e$2={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};R$8.prototype.morphToColumbusView=function(e,t){e$2b(this._completeMorph)&&this._completeMorph();var i=this._scene;if(this._previousMode=i.mode,this._previousMode!==C$13.COLUMBUS_VIEW&&this._previousMode!==C$13.MORPHING){this._scene.morphStart.raiseEvent(this,this._previousMode,C$13.COLUMBUS_VIEW,!0),i.camera._setTransform(p$1d.IDENTITY);var n,r=ce$7,o=ae$3,a=se$3;if(e>0)r.x=0,r.y=-1,r.z=1,r=o$1p.multiplyByScalar(o$1p.normalize(r,r),5*t.maximumRadius,r),o$1p.negate(o$1p.normalize(r,o),o),o$1p.cross(o$1p.UNIT_X,o,a);else{var s=i.camera;if(this._previousMode===C$13.SCENE2D)o$1p.clone(s.position,r),r.z=s.frustum.right-s.frustum.left,o$1p.negate(o$1p.UNIT_Z,o),o$1p.clone(o$1p.UNIT_Y,a);else{o$1p.clone(s.positionWC,r),o$1p.clone(s.directionWC,o),o$1p.clone(s.upWC,a);var l=t.scaleToGeodeticSurface(r,he$3),u=m$17.eastNorthUpToFixedFrame(l,t,de$4);p$1d.inverseTransformation(u,u),i.mapProjection.project(t.cartesianToCartographic(r,fe$2),r),p$1d.multiplyByPointAsVector(u,o,o),p$1d.multiplyByPointAsVector(u,a,a)}}this._morphToOrthographic?((n=le$6).width=i.camera.frustum.right-i.camera.frustum.left,n.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight):((n=ve$3).aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,n.fov=e$2a.toRadians(60));var c=_e$2;c.position=r,c.direction=o,c.up=a,c.frustum=n;var h=Ye$1(c);V$5(this,h),this._previousMode===C$13.SCENE2D?Qe$1(this,e,c,h):(c.position2D=p$1d.multiplyByPoint(v$K.TRANSFORM_2D,r,pe$4),c.direction2D=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o,ue$4),c.up2D=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,a,me$4),i._mode=C$13.MORPHING,K$3(this,e,c,h)),0===e&&e$2b(this._completeMorph)&&this._completeMorph()}};var A$a={position:new o$1p,direction:new o$1p,up:new o$1p,frustum:void 0},G$8=new o$15;function V$5(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new g$J(e._scene.canvas);var i=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=i,e._morphHandler.setInputAction(i,G$I.LEFT_DOWN),e._morphHandler.setInputAction(i,G$I.MIDDLE_DOWN),e._morphHandler.setInputAction(i,G$I.RIGHT_DOWN),e._morphHandler.setInputAction(i,G$I.WHEEL)}}function P$8(e){for(var t=e._currentTweens,i=0;i<t.length;++i)t[i].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}R$8.prototype.morphTo3D=function(e,t){e$2b(this._completeMorph)&&this._completeMorph();var i=this._scene;if(this._previousMode=i.mode,this._previousMode!==C$13.SCENE3D&&this._previousMode!==C$13.MORPHING){if(this._scene.morphStart.raiseEvent(this,this._previousMode,C$13.SCENE3D,!0),i._mode=C$13.MORPHING,i.camera._setTransform(p$1d.IDENTITY),this._previousMode===C$13.SCENE2D)Se$2(this,e,t);else{var n;e>0?(n=A$a,o$1p.fromDegrees(0,0,5*t.maximumRadius,t,n.position),o$1p.negate(n.position,n.direction),o$1p.normalize(n.direction,n.direction),o$1p.clone(o$1p.UNIT_Z,n.up)):n=x$7(this,t);var r,o=i.camera;o.frustum instanceof a$V?r=o.frustum.clone():((r=G$8).aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,r.fov=e$2a.toRadians(60)),n.frustum=r;var a=ee$3(n);V$5(this,a),B$7(this,e,n,a)}0===e&&e$2b(this._completeMorph)&&this._completeMorph()}},R$8.prototype.isDestroyed=function(){return!1},R$8.prototype.destroy=function(){return P$8(this),i$10(this)};var Te$3=new a$18,De$3=new o$1p,ge$5=new p$1d;function x$7(e,t){var i=e._scene,n=i.camera,r=A$a,o=r.position,a=r.direction,s=r.up,l=i.mapProjection.unproject(n.position,Te$3);t.cartographicToCartesian(l,o);var u=t.scaleToGeodeticSurface(o,De$3),c=m$17.eastNorthUpToFixedFrame(u,t,ge$5);return p$1d.multiplyByPointAsVector(c,n.direction,a),p$1d.multiplyByPointAsVector(c,n.up,s),r}var we$1=new o$1p,Ce$2=new o$1p,Me$6=new o$1p,Ee$4=new o$1p,Re$3=new o$1p,Oe$3=new o$1p;function B$7(e,t,i,n){t*=.5;var r=e._scene,o=r.camera,a=o$1p.clone(o.position,we$1),s=o$1p.clone(o.direction,Ce$2),l=o$1p.clone(o.up,Me$6),u=p$1d.multiplyByPoint(v$K.TRANSFORM_2D_INVERSE,i.position,Ee$4),c=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D_INVERSE,i.direction,Re$3),h=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D_INVERSE,i.up,Oe$3);var d=r.tweens.add({duration:t,easingFunction:m$W.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$5(a,u,e.time,o.position),w$5(s,c,e.time,o.direction),w$5(l,h,e.time,o.up),o$1p.cross(o.direction,o.up,o.right),o$1p.normalize(o.right,o.right)},complete:function(){$$7(e,r,0,1,t,n)}});e._currentTweens.push(d)}var Ve$4=new a$V,L$a=new o$1p,Z$7=new o$1p,Q$3=new o$1p,H$9=new o$1p,Y$2=new o$1p,k$6=new o$1p;function Se$2(e,t,i){t/=3;var n,r,o=e._scene,a=o.camera;t>0?(n=A$a,o$1p.fromDegrees(0,0,5*i.maximumRadius,i,n.position),o$1p.negate(n.position,n.direction),o$1p.normalize(n.direction,n.direction),o$1p.clone(o$1p.UNIT_Z,n.up)):(a.position.z=a.frustum.right-a.frustum.left,n=x$7(e,i)),e._morphToOrthographic?((r=Ve$4).aspectRatio=o.drawingBufferWidth/o.drawingBufferHeight,r.width=a.frustum.right-a.frustum.left):((r=G$8).aspectRatio=o.drawingBufferWidth/o.drawingBufferHeight,r.fov=e$2a.toRadians(60)),n.frustum=r;var s,l=ee$3(n);V$5(e,l),s=e._morphToOrthographic?function(){B$7(e,t,n,l)}:function(){J$2(e,t,n,(function(){B$7(e,t,n,l)}))},t>0?(o._mode=C$13.SCENE2D,a.flyTo({duration:t,destination:o$1p.fromDegrees(0,0,5*i.maximumRadius,i,H$9),complete:function(){o._mode=C$13.MORPHING,s()}})):s()}function w$5(e,t,i,n){return o$1p.lerp(e,t,i,n)}function X$5(e,t,i,n,r){var o=e._scene,a=o.camera;if(!(a.frustum instanceof a$V)){var s=a.frustum.fov,l=.5*e$2a.RADIANS_PER_DEGREE,u=i.position.z*Math.tan(.5*s);a.frustum.far=u/Math.tan(.5*l)+1e7;var c=o.tweens.add({duration:t,easingFunction:m$W.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){a.frustum.fov=e$2a.lerp(s,l,e.time);var t=u/Math.tan(.5*a.frustum.fov);n(a,t)},complete:function(){a.frustum=i.frustum.clone(),r(e)}});e._currentTweens.push(c)}}var Ne$2=new o$1p,Pe$1=new o$1p,Ue$2=new o$1p,b$c=new o$1p,Ie$3=new o$1p,ye$2=new o$1p,Fe$3=new l$12,Ae$4=new f$17,Be$4=new o$1p,He$1={position:void 0,direction:void 0,up:void 0,frustum:void 0};function be$2(e,t){t*=.5;var i=e._scene,n=i.camera,r=o$1p.clone(n.position,Ne$2),o=o$1p.clone(n.direction,Pe$1),a=o$1p.clone(n.up,Ue$2),s=o$1p.negate(o$1p.UNIT_Z,Ie$3),l=o$1p.clone(o$1p.UNIT_Y,ye$2),u=b$c;if(t>0)o$1p.clone(o$1p.ZERO,b$c),u.z=5*i.mapProjection.ellipsoid.maximumRadius;else{o$1p.clone(r,b$c);var c=Ae$4;p$1d.multiplyByPoint(v$K.TRANSFORM_2D,r,c.origin),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o,c.direction);var h=i.globe;if(e$2b(h)){var d=h.pickWorldCoordinates(c,i,Be$4);e$2b(d)&&(p$1d.multiplyByPoint(v$K.TRANSFORM_2D_INVERSE,d,u),u.z+=o$1p.distance(r,u))}}var f=Fe$3;f.right=.5*u.z,f.left=-f.right,f.top=f.right*(i.drawingBufferHeight/i.drawingBufferWidth),f.bottom=-f.top;var p=He$1;p.position=u,p.direction=s,p.up=l,p.frustum=f;var _=te$2(p);function m(e,t){e.position.z=t}V$5(e,_);var g=i.tweens.add({duration:t,easingFunction:m$W.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$5(r,u,e.time,n.position),w$5(o,s,e.time,n.direction),w$5(a,l,e.time,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right),n._adjustOrthographicFrustum(!0)},complete:function(){X$5(e,t,p,m,_)}});e._currentTweens.push(g)}var q$7=new a$18,je$2={position:new o$1p,direction:new o$1p,up:new o$1p,position2D:new o$1p,direction2D:new o$1p,up2D:new o$1p,frustum:new l$12},ze$3={position:new o$1p,direction:new o$1p,up:new o$1p,frustum:void 0},We$2=new o$1p,Ge$2=new f$17,xe$2=new p$1d,Le$4=new o$1p;function Ze$2(e,t,i){t*=.5;var n=e._scene,r=n.camera,o=je$2;if(t>0)o$1p.clone(o$1p.ZERO,o.position),o.position.z=5*i.maximumRadius,o$1p.negate(o$1p.UNIT_Z,o.direction),o$1p.clone(o$1p.UNIT_Y,o.up);else{i.cartesianToCartographic(r.positionWC,q$7),n.mapProjection.project(q$7,o.position),o$1p.negate(o$1p.UNIT_Z,o.direction),o$1p.clone(o$1p.UNIT_Y,o.up);var a=Ge$2;o$1p.clone(o.position2D,a.origin);var s=o$1p.clone(r.directionWC,a.direction),l=i.scaleToGeodeticSurface(r.positionWC,Le$4),u=m$17.eastNorthUpToFixedFrame(l,i,xe$2);p$1d.inverseTransformation(u,u),p$1d.multiplyByPointAsVector(u,s,s),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,s,s);var c=n.globe;if(e$2b(c)){var h=c.pickWorldCoordinates(a,n,We$2);if(e$2b(h)){var d=o$1p.distance(o.position2D,h);h.x+=d,o$1p.clone(h,o.position2D)}}}function f(e,t){e.position.x=t}p$1d.multiplyByPoint(v$K.TRANSFORM_2D,o.position,o.position2D),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o.direction,o.direction2D),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o.up,o.up2D);var p=o.frustum;p.right=.5*o.position.z,p.left=-p.right,p.top=p.right*(n.drawingBufferHeight/n.drawingBufferWidth),p.bottom=-p.top;var _=ze$3;p$1d.multiplyByPoint(v$K.TRANSFORM_2D_INVERSE,o.position2D,_.position),o$1p.clone(o.direction,_.direction),o$1p.clone(o.up,_.up),_.frustum=p;var m=te$2(_);V$5(e,m),K$3(e,t,o,(function(){X$5(e,t,o,f,m)}))}function J$2(e,t,i,n){var r=e._scene,o=r.camera,a=o.frustum.right-o.frustum.left;o.frustum=i.frustum.clone();var s=o.frustum.fov,l=.5*e$2a.RADIANS_PER_DEGREE,u=a*Math.tan(.5*s);o.frustum.far=u/Math.tan(.5*l)+1e7,o.frustum.fov=l;var c=r.tweens.add({duration:t,easingFunction:m$W.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){o.frustum.fov=e$2a.lerp(l,s,e.time),o.position.z=u/Math.tan(.5*o.frustum.fov)},complete:function(){n(e)}});e._currentTweens.push(c)}function Qe$1(e,t,i,n){t*=.5;var r=e._scene,o=r.camera,a=o$1p.clone(i.position,H$9),s=o$1p.clone(i.direction,Y$2),l=o$1p.clone(i.up,k$6);function u(){o.frustum=i.frustum.clone();var u=o$1p.clone(o.position,L$a),c=o$1p.clone(o.direction,Z$7),h=o$1p.clone(o.up,Q$3);u.z=a.z;var d=r.tweens.add({duration:t,easingFunction:m$W.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$5(u,a,e.time,o.position),w$5(c,s,e.time,o.direction),w$5(h,l,e.time,o.up),o$1p.cross(o.direction,o.up,o.right),o$1p.normalize(o.right,o.right)},complete:function(){n(e)}});e._currentTweens.push(d)}r._mode=C$13.MORPHING,e._morphToOrthographic?u():J$2(e,0,i,u)}function K$3(e,t,i,n){var r=e._scene,o=r.camera,a=o$1p.clone(o.position,L$a),s=o$1p.clone(o.direction,Z$7),l=o$1p.clone(o.up,Q$3),u=o$1p.clone(i.position2D,H$9),c=o$1p.clone(i.direction2D,Y$2),h=o$1p.clone(i.up2D,k$6);var d=r.tweens.add({duration:t,easingFunction:m$W.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$5(a,u,e.time,o.position),w$5(s,c,e.time,o.direction),w$5(l,h,e.time,o.up),o$1p.cross(o.direction,o.up,o.right),o$1p.normalize(o.right,o.right),o._adjustOrthographicFrustum(!0)},complete:function(){$$7(e,r,1,0,t,n)}});e._currentTweens.push(d)}function $$7(e,t,i,n,r,o){var a={object:t,property:"morphTime",startValue:i,stopValue:n,duration:r,easingFunction:m$W.QUARTIC_OUT};e$2b(o)&&(a.complete=function(){o(e)});var s=t.tweens.addProperty(a);e._currentTweens.push(s)}function ee$3(e){return function(t){var i=t._scene;i._mode=C$13.SCENE3D,i.morphTime=C$13.getMorphTime(C$13.SCENE3D),P$8(t);var n=i.camera;(t._previousMode!==C$13.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,o$1p.clone(e.position,n.position),o$1p.clone(e.direction,n.direction),o$1p.clone(e.up,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right),n.frustum=e.frustum.clone());var r=n.frustum;i.frameState.useLogDepth&&(r.near=.1,r.far=1e10);var o=e$2b(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,C$13.SCENE3D,o)}}function te$2(e){return function(t){var i=t._scene;i._mode=C$13.SCENE2D,i.morphTime=C$13.getMorphTime(C$13.SCENE2D),P$8(t);var n=i.camera;o$1p.clone(e.position,n.position),n.position.z=2*i.mapProjection.ellipsoid.maximumRadius,o$1p.clone(e.direction,n.direction),o$1p.clone(e.up,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right),n.frustum=e.frustum.clone();var r=e$2b(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,C$13.SCENE2D,r)}}function Ye$1(e){return function(t){var i=t._scene;i._mode=C$13.COLUMBUS_VIEW,i.morphTime=C$13.getMorphTime(C$13.COLUMBUS_VIEW),P$8(t);var n=i.camera;(t._previousModeMode!==C$13.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,o$1p.clone(e.position,n.position),o$1p.clone(e.direction,n.direction),o$1p.clone(e.up,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right));var r=n.frustum;i.frameState.useLogDepth&&(r.near=.1,r.far=1e10);var o=e$2b(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,C$13.COLUMBUS_VIEW,o)}}function d$e(e,t,i,n,r,o,a,s,l,u){this._tweens=e,this._tweenjs=t,this._startObject=l$1g(i),this._stopObject=l$1g(n),this._duration=r,this._delay=o,this._easingFunction=a,this._update=s,this._complete=l,this.cancel=u,this.needsStart=!0}function s$a(){this._tweens=[]}function _a(e){if(!e$2b(e))throw new t$16("scene is required.");this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.enableWalk=!1,this.walkParameters={speed:1,height:2},this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.translateEventTypes=Q$c.LEFT_DRAG,this.zoomEventTypes=[Q$c.RIGHT_DRAG,Q$c.WHEEL,Q$c.PINCH],this.rotateEventTypes=Q$c.LEFT_DRAG,this.tiltEventTypes=[Q$c.MIDDLE_DRAG,Q$c.PINCH,{eventType:Q$c.LEFT_DRAG,modifier:Aa$1.CTRL},{eventType:Q$c.RIGHT_DRAG,modifier:Aa$1.CTRL}],this.lookEventTypes={eventType:Q$c.LEFT_DRAG,modifier:Aa$1.SHIFT},this.minimumPickingTerrainHeight=15e4,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumCollisionTerrainHeight=15e4,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=75e5,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this._enableIndoorColliDetection=!1,this.minimumDetectDistance=.5,this.minimumWalkingDetectDistance=2,this._scene=e,this._globe=void 0,this._ellipsoid=void 0,this._aggregator=new l$l(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new s$a,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new o$1o(-1,-1),this._tiltCenter=new o$1p,this._rotateMousePosition=new o$1o(-1,-1),this._rotateStartPosition=new o$1p,this._strafeStartPosition=new o$1p,this._zoomMouseStart=new o$1o(-1,-1),this._zoomWorldPosition=new o$1p,this._useZoomWorldPosition=!1,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._rotatingZoom=!1;var t=e.mapProjection;this._maxCoord=t.project(new a$18(Math.PI,e$2a.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=.618,this._minimumRotateRate=.5,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._cloneCamera=void 0,this._isAroundScreenCenter=!1,this.autoTiltHeight=0,this._controlMode=vi$1.NORMAL,this._enableFusion=!1,this.panOffset={x:0,y:0},this.zoomDirty=!1,this.panDirty=!1,this.minFov=e$2a.toRadians(20),this.maxFov=e$2a.toRadians(70)}Object.defineProperties(d$e.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}}),d$e.prototype.cancelTween=function(){this._tweens.remove(this)},Object.defineProperties(s$a.prototype,{length:{get:function(){return this._tweens.length}}}),s$a.prototype.add=function(e){if(!e$2b((e=u$_(e,u$_.EMPTY_OBJECT)).startObject)||!e$2b(e.stopObject))throw new t$16("options.startObject and options.stopObject are required.");if(!e$2b(e.duration)||e.duration<0)throw new t$16("options.duration is required and must be positive.");if(0===e.duration)return e$2b(e.complete)&&e.complete(),new d$e(this);var t=e.duration/h$17.SECONDS_PER_MILLISECOND,i=u$_(e.delay,0),n=i/h$17.SECONDS_PER_MILLISECOND,r=u$_(e.easingFunction,m$W.LINEAR_NONE),o=e.startObject,a=new f$V.Tween(o);a.to(l$1g(e.stopObject),t),a.delay(n),a.easing(r),e$2b(e.update)&&a.onUpdate((function(){e.update(o)})),a.onComplete(u$_(e.complete,null)),a.repeat(u$_(e._repeat,0));var s=new d$e(this,a,e.startObject,e.stopObject,e.duration,i,r,e.update,e.complete,e.cancel);return this._tweens.push(s),s},s$a.prototype.addProperty=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).object,i=e.property,n=e.startValue,r=e.stopValue;if(!e$2b(t)||!e$2b(e.property))throw new t$16("options.object and options.property are required.");if(!e$2b(t[i]))throw new t$16("options.object must have the specified property.");if(!e$2b(n)||!e$2b(r))throw new t$16("options.startValue and options.stopValue are required.");return this.add({startObject:{value:n},stopObject:{value:r},duration:u$_(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){t[i]=e.value},complete:e.complete,cancel:e.cancel,_repeat:e._repeat})},s$a.prototype.addAlpha=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).material;if(!e$2b(t))throw new t$16("options.material is required.");var i=[];for(var n in t.uniforms)t.uniforms.hasOwnProperty(n)&&e$2b(t.uniforms[n])&&e$2b(t.uniforms[n].alpha)&&i.push(n);if(0===i.length)throw new t$16("material has no properties with alpha components.");return this.add({startObject:{alpha:u$_(e.startValue,0)},stopObject:{alpha:u$_(e.stopValue,1)},duration:u$_(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){for(var n=i.length,r=0;r<n;++r)t.uniforms[i[r]].alpha=e.alpha},complete:e.complete,cancel:e.cancel})},s$a.prototype.addOffsetIncrement=function(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).material;if(!e$2b(t))throw new t$16("material is required.");if(!e$2b(t.uniforms.offset))throw new t$16("material.uniforms must have an offset property.");var i=t.uniforms;return this.addProperty({object:i,property:"offset",startValue:i.offset,stopValue:i.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})},s$a.prototype.remove=function(e){if(!e$2b(e))return!1;var t=this._tweens.indexOf(e);return-1!==t&&(e.tweenjs.stop(),e$2b(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0)},s$a.prototype.removeAll=function(){for(var e=this._tweens,t=0;t<e.length;++t){var i=e[t];i.tweenjs.stop(),e$2b(i.cancel)&&i.cancel()}e.length=0},s$a.prototype.contains=function(e){return e$2b(e)&&-1!==this._tweens.indexOf(e)},s$a.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return this._tweens[e]},s$a.prototype.update=function(e){var t=this._tweens,i=0;for(e=e$2b(e)?e/h$17.SECONDS_PER_MILLISECOND:Et$a();i<t.length;){var n=t[i],r=n.tweenjs;n.needsStart?(n.needsStart=!1,r.start(e)):r.update(e)?i++:(r.stop(),t.splice(i,1))}};var Za=0;function ne$4(e,t){if(e<0)return 0;var i=25*(1-t);return Math.exp(-i*e)}function re$3(e){return o$1o.equalsEpsilon(e.startPosition,e.endPosition,e$2a.EPSILON14)}Object.defineProperties(_a.prototype,{enableIndoorColliDetection:{get:function(){return this._enableIndoorColliDetection},set:function(e){this._enableIndoorColliDetection=e,this._scene.camera._enableIndoorColliDetection=e}},zoomFactor:{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e}},previousHeight:{set:function(e){Za=e}},controlMode:{get:function(){return this._controlMode},set:function(e){o$1q.typeOf.number.lessThanOrEquals("controlMode",e,1),o$1q.typeOf.number.greaterThanOrEquals("controlMode",e,0),this._controlMode=e}},enableFusion:{get:function(){return this._enableFusion},set:function(e){e!==this._enableFusion&&(this._enableFusion=e,this.panOffset={x:0,y:0})}}});var se$2=.4;function oe$4(e,t,i,n,r,o,a){let s=o[a];e$2b(s)||(s=o[a]={startPosition:new o$1o,endPosition:new o$1o,motion:new o$1o,inertiaEnabled:!0});const l=e.getButtonPressTime(t,i),u=e.getButtonReleaseTime(t,i),c=l&&u&&(u.getTime()-l.getTime())/1e3,h=new Date,d=u&&(h.getTime()-u.getTime())/1e3;if(l&&u&&c<se$2){const a=ne$4(d,n),l=e.getLastMovement(t,i);if(!e$2b(l)||re$3(l)||!s.inertiaEnabled||(s.motion.x=.5*(l.endPosition.x-l.startPosition.x),s.motion.y=.5*(l.endPosition.y-l.startPosition.y),s.startPosition=o$1o.clone(l.startPosition,s.startPosition),s.endPosition=o$1o.multiplyByScalar(s.motion,a,s.endPosition),s.endPosition=o$1o.add(s.startPosition,s.endPosition,s.endPosition),isNaN(s.endPosition.x)||isNaN(s.endPosition.y)||o$1o.distance(s.startPosition,s.endPosition)<.5))return;if(!e.isButtonDown(t,i)){r(o,e.getStartMousePosition(t,i),s)}}}function ve$2(e,t){if(e$2b(t)){let i=e[t];e$2b(i)&&(i.inertiaEnabled=!0);const n=e._inertiaDisablers[t];if(e$2b(n)){const t=n.length;for(let r=0;r<t;++r)i=e[n[r]],e$2b(i)&&(i.inertiaEnabled=!1)}}}var di=[];function b$b(e,t,i,n,r,o){if(e._scene.mode===C$13.COLUMBUS_VIEW&&e._controlMode===vi$1.DESIGN?e._isAroundScreenCenter=!0:e._isAroundScreenCenter=!1,e$2b(i)){var a=e._aggregator;e$2b(e.tiltEventTypes)&&!Array.isArray(e.tiltEventTypes)&&(e.tiltEventTypes=[e.tiltEventTypes]),Array.isArray(i)||(di[0]=i,i=di);for(var s=i.length,l=0;l<s;++l){var u=i[l],c=e$2b(u.eventType)?u.eventType:u,h=u.modifier,d=a.isMoving(c,h)&&a.getMovement(c,h),f=a.getStartMousePosition(c,h);if(e._isAroundScreenCenter){var p=e._scene.getViewport({x:10,y:10});f={x:p.width/2,y:p.height/2}}e.enableInputs&&t&&(d?(n(e,f,d),ve$2(e,o)):r<1&&"_lastInertiaTiltMovement"!=o&&"_lastInertiaZoomMovement"!=o?oe$4(a,c,h,r,n,e,o):("_lastInertiaZoomMovement"===o||"_lastInertiaTiltMovement"===o)&&a._isDown[c]&&(e._isAroundScreenCenter||(f=a.getStartMousePosition(c,void 0)),e._scene.mode===C$13.SCENE3D&&"_lastInertiaTiltMovement"===o&&e.tiltEventTypes.indexOf(c)>-1?n(e,f,a._lastMovement[c],!0):"_lastInertiaZoomMovement"==o&&a._lastMovement[c].valid&&n(e,f,a._lastMovement[c])))}}}var Ca=new f$17,me$3=new o$1p,de$3=new o$1o,fe$1=new o$1p,ue$3=new o$1o;new o$1p;var _e$1=new o$1p,he$2=new o$1p,ge$4=new o$1p,pe$3=new o$1p,ce$6=new o$1p,ye$1=new o$1p,we=new o$1p,Ce$1=new o$1p,le$5=new o$1p,Te$2=new o$1p,Pe=new o$1p,Re$2=new o$1p,Ee$3=new o$1p,Ie$2=new o$1p,q$6=new o$1p,fi=new o$1p,ui=new o$1p,Fa={orientation:new i$15};async function ha$1(e,t,i,n,r,o){var a=1;e$2b(o)&&(a=e$2a.clamp(Math.abs(o),.25,1));var s=e._scene,l=s.camera,u=s.mode;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(s.camera)),v$K.clone(e._scene.camera,e._cloneCamera),l=e._cloneCamera);var c=e.minimumZoomDistance*a,h=e.maximumZoomDistance,d=n*(r-c);d=e$2a.clamp(d,e._minimumZoomRate,e._maximumZoomRate);var f=(i.endPosition.y-i.startPosition.y)/e._scene.canvas.clientHeight,p=d*(f=Math.min(f,e.maximumMovementRatio));if(e$2b(e.thetaWindowRatio)&&Math.abs(f)<Math.abs(e.thetaWindowRatio))e.thetaWindowRatio=0;else if(e$2b(e.phiWindowRatio)&&Math.abs(f)<Math.abs(e.phiWindowRatio))e.phiWindowRatio=0;else if(!(e.enableIndoorColliDetection&&p>0&&Math.abs(r-c)<1||e.enableIndoorColliDetection&&p<0&&Math.abs(r-h)<1)){r-p<c?p=r-c-1:r-p>h&&(p=r-h);var _=Fa.orientation;if(_.heading=l.heading,_.pitch=l.pitch,_.roll=l.roll,l.frustum instanceof a$V)return void(Math.abs(p)>0&&(l.zoomIn(p),e.enableIndoorColliDetection&&$$6(e),l._adjustOrthographicFrustum()));var m=o$1o.equals(t,e._zoomMouseStart);e._isAroundScreenCenter&&(m=!1,e._useZoomWorldPosition=!1);var g,x,v=e._zoomingOnVector,y=e._rotatingZoom;if(!m&&!e._isAroundScreenCenter){if(e._zoomMouseStart=o$1o.clone(t,e._zoomMouseStart),e$2b(e._globe)&&u===C$13.SCENE2D)g=l.getPickRay(t,Ca).origin,g=o$1p.fromElements(g.y,g.z,g.x);else if(e$2b(e._globe)){var $=ea$2(e,t,me$3);$.then((e=>{g=e})),await $}e$2b(g)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=o$1p.clone(g,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,v=e._zoomingOnVector=!1,y=e._rotatingZoom=!1}if(!e._useZoomWorldPosition)return l.zoomIn(p),p<0&&(x=3),void(e.enableIndoorColliDetection&&$$6(e,x));var b=u===C$13.COLUMBUS_VIEW;if(l.positionCartographic.height<2e6&&(y=!0),!m||y){if(u===C$13.SCENE2D){var T=e._zoomWorldPosition,C=l.position;if(!o$1p.equals(T,C)&&l.positionCartographic.height<2*e._maxCoord.x){var S=l.position.x,w=o$1p.subtract(T,C,fe$1);o$1p.normalize(w,w);var E=o$1p.distance(T,C)*p/(.5*l.getMagnitude());l.move(w,.5*E),(l.position.x<0&&S>0||l.position.x>0&&S<0)&&(g=l.getPickRay(t,Ca).origin,e._zoomWorldPosition=o$1p.clone(g,e._zoomWorldPosition))}}else if(u===C$13.SCENE3D){var P=o$1p.normalize(l.position,pe$3);if(l.positionCartographic.height<3e3&&Math.abs(o$1p.dot(l.direction,P))<.6)b=!0;else{var A=s.canvas,L=ue$3;L.x=A.clientWidth/2,L.y=A.clientHeight/2;var M=void 0;if(e$2b(M)&&l.positionCartographic.height<1e6){var R=ye$1;o$1p.clone(l.position,R);var O=e._zoomWorldPosition,I=ce$6;if(I=o$1p.normalize(O,I),o$1p.dot(I,P)<0)return;var D=Ie$2,B=le$5;o$1p.clone(l.direction,B),o$1p.add(R,o$1p.multiplyByScalar(B,1e3,q$6),D);var N=Te$2,F=Pe;o$1p.subtract(O,R,N),o$1p.normalize(N,F);var U=o$1p.dot(P,F);if(U>=0)return void(e._zoomMouseStart.x=-1);var G=Math.acos(-U),z=o$1p.magnitude(R),V=o$1p.magnitude(O),k=z-p,W=o$1p.magnitude(N),H=Math.asin(e$2a.clamp(W/V*Math.sin(G),-1,1))-Math.asin(e$2a.clamp(k/V*Math.sin(G),-1,1))+G,q=we;o$1p.normalize(R,q);var j=Ce$1;j=o$1p.cross(F,q,j),j=o$1p.normalize(j,j),o$1p.normalize(o$1p.cross(q,j,q$6),B),o$1p.multiplyByScalar(o$1p.normalize(D,q$6),o$1p.magnitude(D)-p,D),o$1p.normalize(R,R),o$1p.multiplyByScalar(R,k,R);var Y=Re$2;o$1p.multiplyByScalar(o$1p.add(o$1p.multiplyByScalar(q,Math.cos(H)-1,fi),o$1p.multiplyByScalar(B,Math.sin(H),ui),q$6),k,Y),o$1p.add(R,Y,R),o$1p.normalize(D,q),o$1p.normalize(o$1p.cross(q,j,q$6),B);var X=Ee$3;return o$1p.multiplyByScalar(o$1p.add(o$1p.multiplyByScalar(q,Math.cos(H)-1,fi),o$1p.multiplyByScalar(B,Math.sin(H),ui),q$6),o$1p.magnitude(D),X),o$1p.add(D,X,D),o$1p.clone(R,l.position),o$1p.normalize(o$1p.subtract(D,R,q$6),l.direction),o$1p.clone(l.direction,l.direction),o$1p.cross(l.direction,l.up,l.right),o$1p.cross(l.right,l.direction,l.up),l.setView(Fa),void(e.enableIndoorColliDetection&&$$6(e))}if(e$2b(M)){var K=o$1p.normalize(M,_e$1),Q=o$1p.normalize(e._zoomWorldPosition,he$2),Z=o$1p.dot(Q,K);if(Z>0&&Z<1){var J=e$2a.acosClamped(Z),ee=o$1p.cross(Q,K,ge$4),te=p/(Math.abs(J)>e$2a.toRadians(20)?.75*l.positionCartographic.height:l.positionCartographic.height-p);l.rotate(ee,J*te)}}else b=!0}}e._rotatingZoom=!b}if(!m&&b||v){var ie=s$Q.wgs84ToWindowCoordinates(s,e._zoomWorldPosition,de$3),ne=(u!==C$13.COLUMBUS_VIEW&&o$1o.equals(t,e._zoomMouseStart)&&e$2b(ie)?l.getPickRay(ie,Ca):l.getPickRay(t,Ca)).direction;u===C$13.COLUMBUS_VIEW&&o$1p.fromElements(ne.y,ne.z,ne.x,ne),l.move(ne,p),e._zoomingOnVector=!0}else l.zoomIn(p);l.setView(Fa),e.enableIndoorColliDetection&&$$6(e)}}function xe$1(e,t,i,n,r,o){e._ellipsoid;var a=e._scene,s=a.camera;if(a.canvas,e._globe,e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(a.camera)),v$K.clone(a.camera,e._cloneCamera),s=e._cloneCamera),!(Math.abs(i.endPosition.y-i.startPosition.y)<1)){var l=i.endPosition.y-i.startPosition.y>0?1:-1;e._aggregator._isDown[1]&&(l=i.endPosition.y-t.y>0?.2:-.2,e._isAroundScreenCenter&&(l=i.endPosition.y-i.startPosition.y>0?.2:-.2));var u=e.maximumZoomDistance,c=l*n*7e-4*48;if(e$2b(o)){var h=o$1p.distance(s.position,o),d=1*e.minimumZoomDistance,f=n*(h-d);f=e$2a.clamp(f,e._minimumZoomRate,e._maximumZoomRate);var p=l/e._scene.canvas.clientHeight,_=f*(p=Math.min(p,e.maximumMovementRatio));if(e.enableIndoorColliDetection&&_>0&&Math.abs(h-d)<.1)return}if(!(r>u&&l<0)){o$1o.equals(t,e._zoomMouseStart)||(e._zoomMouseStart=o$1o.clone(t,e._zoomMouseStart)),e.zoomActive=!0,s.position;var m=r*c;if(!e$2b(o))return void s.zoomIn(m);var g=new o$1p;o$1p.subtract(o,s.position,g);var x=new o$1p;x=o$1p.clone(s.right,x);var v=o$1p.dot(g,x),y=new o$1p;y=o$1p.multiplyByScalar(x,v,y);var $=new o$1p;$=o$1p.subtract(g,y,$);var b=new o$1p;b=o$1p.normalize($,b),new o$1p,s.move(b,m);var T=new o$1p;T=o$1p.normalize(o,T);var C=o$1p.magnitude(o),S=xi$1;S.x=S.y=S.z=C;var w=t$13.fromCartesian3(S,Di$1),E=s.pickEllipsoid(t,w,Qa);if(e$2b(E)&&!isNaN(E.x)&&!isNaN(E.y)&&!isNaN(E.z)){E=o$1p.normalize(E,E);var P=o$1p.angleBetween(T,E);if(!e$2a.equalsEpsilon(P,0,e$2a.EPSILON10)){var A=new o$1p;A=o$1p.cross(T,E,A),s.rotate(A,P),e.enableIndoorColliDetection&&$$6(e,1)}}}}}var De$2=new f$17,Me$5=new f$17,Se$1=new o$1p;function ze$2(e,t,i){var n=e._scene.camera,r=n.getPickRay(i.startPosition,De$2).origin,o=n.getPickRay(i.endPosition,Me$5).origin,a=o$1p.subtract(r,o,Se$1),s=o$1p.magnitude(a);s>0&&(o$1p.normalize(a,a),n.move(a,s))}function _i$1(e,t,i){e$2b(i.distance)&&(i=i.distance);var n=e._scene.camera;ha$1(e,t,i,e._zoomFactor,n.getMagnitude())}var ke$1=new o$1o,be$1=new o$1o;function hi(e,t,i){if(e$2b(i.angleAndHeight))Ne$1(e,t,i.angleAndHeight);else{var n=e._scene,r=n.camera,o=n.canvas,a=o.clientWidth,s=o.clientHeight,l=ke$1;l.x=2/a*i.startPosition.x-1,l.y=2/s*(s-i.startPosition.y)-1,l=o$1o.normalize(l,l);var u=be$1;u.x=2/a*i.endPosition.x-1,u.y=2/s*(s-i.endPosition.y)-1,u=o$1o.normalize(u,u);var c=e$2a.acosClamped(l.x);l.y<0&&(c=e$2a.TWO_PI-c);var h=e$2a.acosClamped(u.x);u.y<0&&(h=e$2a.TWO_PI-h);var d=h-c;r.twistRight(d)}}function Ne$1(e,t,i){var n=e._rotateFactor*e._rotateRateRangeAdjustment;n>e._maximumRotateRate&&(n=e._maximumRotateRate),n<e._minimumRotateRate&&(n=e._minimumRotateRate);var r=e._scene,o=r.camera,a=r.canvas,s=(i.endPosition.x-i.startPosition.x)/a.clientWidth,l=n*(s=Math.min(s,e.maximumMovementRatio))*Math.PI*4;o.twistRight(l)}function Oe$2(e){var t=e._scene.mapMode2D===Rr$2.ROTATE;p$1d.equals(p$1d.IDENTITY,e._scene.camera.transform)?(b$b(e,e.enableTranslate,e.translateEventTypes,ze$2,e.inertiaTranslate,"_lastInertiaTranslateMovement"),b$b(e,e.enableZoom,e.zoomEventTypes,_i$1,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&b$b(e,e.enableRotate,e.tiltEventTypes,hi,e.inertiaSpin,"_lastInertiaTiltMovement")):(b$b(e,e.enableZoom,e.zoomEventTypes,_i$1,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&b$b(e,e.enableRotate,e.translateEventTypes,hi,e.inertiaSpin,"_lastInertiaSpinMovement"))}var gi$1=new f$17,We$1=new o$1p,la$1=new o$1p,ga=new o$1o;function pi$1(e,t){if(e._mode!==C$13.SCENE3D||e._multiViewportMode==B$e.NONE)return t;o$1o.clone(t,ga);for(var i=e._context,n=new f$18(t.x,i.drawingBufferHeight-t.y),r=new f$18,o=0;o<e._multiViewportInfo.length;o++){var a=e._multiViewportInfo[o];if(r.x=i.drawingBufferWidth*a.x,r.y=i.drawingBufferHeight*a.y,r.width=i.drawingBufferWidth*a.width,r.height=i.drawingBufferHeight*a.height,r.intersect(n)===Ae$u.INTERSECTING){var s=(n.x-r.x)/r.width,l=(n.y-r.y)/r.height;return ga.x=s*i.drawingBufferWidth,ga.y=i.drawingBufferHeight-l*i.drawingBufferHeight,ga}}return ga}function ea$2(e,t,i){var n=e._scene,r=e._globe,o=n.camera;return e$2b(r)&&n.pickPositionSupported?n.pickPositionWorldCoordinatesAsync(t,We$1,!0).then((a=>{var s,l=o.getPickRay(pi$1(e._scene,t),gi$1),u=r.pick(l,n,la$1);if((e$2b(a)?o$1p.distance(a,o.positionWC):Number.POSITIVE_INFINITY)<(e$2b(u)?o$1p.distance(u,o.positionWC):Number.POSITIVE_INFINITY))return Promise.resolve(o$1p.clone(a,i));if(e$2b(u))return Promise.resolve(o$1p.clone(u,i));if(n._environmentState.isUnderGlobeVisible&&o._positionCartographic.height<1&&e$2b(s=g$1h.rayEllipsoid(l,n._underGlobe.ellipsoid))){var c=s.start>0?s.start:s.stop;return c=Math.min(c,100),Promise.resolve(f$17.getPoint(l,c,i))}return Promise.resolve(void 0)})):Promise.resolve(void 0)}var Ve$3=new f$17,Ae$3=new f$17,ci$1=new o$1p,He=new o$1p,Ze$1=new o$1p,Fe$2=new o$1p,Be$3=new o$1m(o$1p.UNIT_X,0),Ue$1=new o$1o,Le$3=new o$1o;function Ba(e,t,i,n,r,o,a){var s=o$1m.fromPointNormal(o,a,Be$3),l=t.getPickRay(r.startPosition,Ve$3),u=g$1h.rayPlane(l,s,ci$1),c=t.getPickRay(n,Ae$3),h=g$1h.rayPlane(c,s,He);if(!e$2b(u)||!e$2b(h))return e._looking=!0,F$7(e,i,r),void o$1o.clone(i,e._translateMousePosition);var d=o$1p.subtract(u,h,Ze$1),f=d.x;d.x=d.y,d.y=d.z,d.z=f;var p=o$1p.magnitude(d);p>e$2a.EPSILON6&&(o$1p.normalize(d,d),t.move(d,p),e.enableIndoorColliDetection&&$$6(e))}function qe(e,t,i){if(o$1p.equals(t,e._translateMousePosition)||(e._looking=!1),o$1p.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking||e.enableWalk)F$7(e,t,i);else if(!e._strafing||e._isAroundScreenCenter){var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(n.camera)),v$K.clone(n.camera,e._cloneCamera),r=e._cloneCamera);var o=o$1o.clone(i.startPosition,Ue$1),a=o$1o.clone(i.endPosition,Le$3),s=o$1p.clone(o$1p.ZERO,Fe$2),l=o$1p.UNIT_X;r.position.z<e._minimumPickingTerrainHeight&&(n._context.webgpu||ea$2(e,o,ci$1).then((n=>{if(s.x>r.position.z&&e$2b(n)&&!e._isAroundScreenCenter)return o$1p.clone(n,e._strafeStartPosition),e._strafing=!0,Pa(e,t,i),void(e._strafeMousePosition=o$1o.clone(t,e._strafeMousePosition))}))),Ba(e,r,t,a,i,s,l)}else Pa(e,t,i)}var yi$1=new o$1o,Ua=new f$17,Ta=new o$1p,Ge$1=new o$1p,wi$1=new p$1d,Ye=new p$1d,Qe=new o$1p,Xe$2=new o$1m(o$1p.UNIT_X,0),La=new o$1p,qa=new a$18,Ci$1=new p$1d,Ke$1=new n$13,Je$1=new p$1e,$e$1=new o$1p;function je$1(e,t,i){if(e$2b(i.angleAndHeight)&&(i=i.angleAndHeight),(!o$1o.equals(t,e._tiltCenterMousePosition)||e._isAroundScreenCenter)&&(e._tiltCVOffMap=!1,e._looking=!1),e._looking)F$7(e,t,i);else{var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(n.camera)),v$K.clone(n.camera,e._cloneCamera),r=e._cloneCamera);var o=e._maxCoord,a=Math.abs(r.position.x)-o.x<0&&Math.abs(r.position.y)-o.y<0;(e._tiltCVOffMap||!a||r.position.z>e._minimumPickingTerrainHeight)&&(e._tiltCVOffMap=!0,li(e,t,i)),n._context.webgpu?Ri$1(e,t,i):n.pickPositionWorldCoordinatesAsync(t).then((n=>{e$2b(n)?Ri$1(e,t,i):(e._tiltCVOffMap=!0,li(e,t,i))})),e.enableIndoorColliDetection&&$$6(e)}}function li(e,t,i){var n=e._scene,r=n.camera,o=n.canvas,a=yi$1;a.x=o.clientWidth/2,a.y=o.clientHeight/2;var s,l=r.getPickRay(a,Ua),u=o$1p.UNIT_X,c=l.origin,h=l.direction,d=o$1p.dot(u,h);if(Math.abs(d)>e$2a.EPSILON6&&(s=-o$1p.dot(u,c)/d),!e$2b(s)||s<=0)return e._looking=!0,F$7(e,t,i),void o$1o.clone(t,e._tiltCenterMousePosition);var f=o$1p.multiplyByScalar(h,s,Ta);o$1p.add(c,f,f);var p=n.mapProjection,_=p.ellipsoid;o$1p.fromElements(f.y,f.z,f.x,f);var m=p.unproject(f,qa);_.cartographicToCartesian(m,f);var g=m$17.eastNorthUpToFixedFrame(f,_,wi$1),x=e._globe,v=e._ellipsoid;e._globe=void 0,e._ellipsoid=t$13.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var y=p$1d.clone(r.transform,Ci$1);r._setTransform(g),X$4(e,t,i,o$1p.UNIT_Z),r._setTransform(y),e._globe=x,e._ellipsoid=v;var $=v.maximumRadius;e._rotateFactor=1/$,e._rotateRateRangeAdjustment=$}function Ti$1(e,t,i,n,r){if(e$2b(i)){var o=e._scene,a=o.canvas,s=o.camera,l=yi$1;l.x=a.clientWidth/2,l.y=e._tiltCenterMousePosition.y;var u=s.getPickRay(l,Ua),c=o$1p.clone(o$1p.ZERO,Qe);c.x=i.x;var h=o$1m.fromPointNormal(c,t,Xe$2),d=g$1h.rayPlane(u,h,Ge$1),f=s._projection,p=f.ellipsoid;o$1p.fromElements(i.y,i.z,i.x,i);var _=f.unproject(i,qa);p.cartographicToCartesian(_,i);var m,g=m$17.eastNorthUpToFixedFrame(i,p,wi$1);e$2b(d)?(o$1p.fromElements(d.y,d.z,d.x,d),_=f.unproject(d,qa),p.cartographicToCartesian(_,d),m=m$17.eastNorthUpToFixedFrame(d,p,Ye)):m=g;var x=e._globe,v=e._ellipsoid;e._globe=void 0,e._ellipsoid=t$13.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var y=o$1p.UNIT_Z,$=p$1d.clone(s.transform,Ci$1);s._setTransform(g);var b=o$1p.cross(o$1p.UNIT_Z,o$1p.normalize(s.position,La),La),T=o$1p.dot(s.right,b);if(X$4(e,r,n,y,!1,!0),s._setTransform(m),T<0){n.startPosition.y>n.endPosition.y&&(y=void 0);var C=s.constrainedAxis;s.constrainedAxis=void 0,X$4(e,r,n,y,!0,!1),s.constrainedAxis=C}else X$4(e,r,n,y,!0,!1);if(e$2b(s.constrainedAxis)){var S=o$1p.cross(s.direction,s.constrainedAxis,$e$1);o$1p.equalsEpsilon(S,o$1p.ZERO,e$2a.EPSILON6)||(o$1p.dot(S,s.right)<0&&o$1p.negate(S,S),o$1p.cross(S,s.direction,s.up),o$1p.cross(s.direction,s.up,s.right),o$1p.normalize(s.up,s.up),o$1p.normalize(s.right,s.right))}s._setTransform($),e._globe=x,e._ellipsoid=v;var w=v.maximumRadius;e._rotateFactor=1/w,e._rotateRateRangeAdjustment=w;var E=o$1p.clone(s.positionWC,La);if(s._adjustHeightForTerrain(),!o$1p.equals(s.positionWC,E)){s._setTransform(m),s.worldToCameraCoordinatesPoint(E,E);var P=o$1p.magnitudeSquared(E);o$1p.magnitudeSquared(s.position)>P&&(o$1p.normalize(s.position,s.position),o$1p.multiplyByScalar(s.position,Math.sqrt(P),s.position));var A=o$1p.angleBetween(E,s.position),L=o$1p.cross(E,s.position,E);o$1p.normalize(L,L);var M=n$13.fromAxisAngle(L,A,Ke$1),R=p$1e.fromQuaternion(M,Je$1);p$1e.multiplyByVector(R,s.direction,s.direction),p$1e.multiplyByVector(R,s.up,s.up),o$1p.cross(s.direction,s.up,s.right),o$1p.cross(s.right,s.direction,s.up),s._setTransform($)}}}function Pi$1(e,t,i,n,r){var o=e._scene.camera;if(!e$2b(t)){var a,s=o.getPickRay(r,Ua),l=s.origin,u=s.direction,c=o$1p.dot(n,u);if(Math.abs(c)>e$2a.EPSILON6&&(a=-o$1p.dot(n,l)/c),!e$2b(a)||a<=0)return e._looking=!0,F$7(e,r,i),void o$1o.clone(r,e._tiltCenterMousePosition);t=o$1p.multiplyByScalar(u,a,Ta),o$1p.add(l,t,t)}if(o$1o.clone(r,e._tiltCenterMousePosition),e._isAroundScreenCenter){var h=new o$1p;o$1p.clone(t,h),e._tiltCenter=h}else o$1p.clone(t,e._tiltCenter)}function Ri$1(e,t,i){var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(n.camera)),r=e._cloneCamera);var o,a=o$1p.UNIT_X;o$1o.equals(t,e._tiltCenterMousePosition)&&!e._isAroundScreenCenter?o=o$1p.clone(e._tiltCenter,Ta):r.position.z<e._minimumPickingTerrainHeight?ea$2(e,t,Ta).then((n=>{Pi$1(e,o=n,i,a,t),Ti$1(e,a,o,i,t)})):Pi$1(e,o,i,a,t),Ti$1(e,a,o,i,t)}var at$4=new o$1o,it$2=new f$17,Ga=new o$1p;function Ei$1(e){var t=o$1p.UNIT_X,i=e.origin,n=e.direction;return-o$1p.dot(t,i)/o$1p.dot(t,n)}function et$3(e,t,i){e$2b(i.distance)&&(i=i.distance);var n=e._scene,r=n.camera,o=n.canvas,a=at$4;a.x=o.clientWidth/2,a.y=o.clientHeight/2;var s,l=r.getPickRay(a,it$2);if(r.position.z<e._minimumPickingTerrainHeight)ea$2(e,t,Ga).then((o=>{if(e$2b(o))n.pickPositionWorldCoordinatesAsync(t,Ga,!0).then((n=>{if(e$2b(n))s=o$1p.distance(l.origin,o);else{var a=r._projection.unproject(r.position),u=a$18.toCartesian(a);s=o$1p.distance(u,o)}Ea(e,i);var c=o$1p.normalize(r.position,Ra);ha$1(e,t,i,e._zoomFactor,s,o$1p.dot(c,r.direction))}));else{s=Ei$1(l),Ea(e,i);var a=o$1p.normalize(r.position,Ra);ha$1(e,t,i,e._zoomFactor,s,o$1p.dot(a,r.direction))}}));else{s=Ei$1(l),Ea(e,i);var u=o$1p.normalize(r.position,Ra);ha$1(e,t,i,e._zoomFactor,s,o$1p.dot(u,r.direction))}}function tt$2(e){var t=e._scene.camera;if(p$1d.equals(p$1d.IDENTITY,t.transform)){var i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),b$b(e,e.enableTilt,e.tiltEventTypes,je$1,e.inertiaSpin,"_lastInertiaTiltMovement"),b$b(e,e.enableTranslate,e.translateEventTypes,qe,e.inertiaTranslate,"_lastInertiaTranslateMovement"),b$b(e,e.enableZoom,e.zoomEventTypes,et$3,e.inertiaZoom,"_lastInertiaZoomMovement"),b$b(e,e.enableLook,e.lookEventTypes,F$7),!(e._aggregator.anyButtonDown||e$2b(e._lastInertiaZoomMovement)&&e._lastInertiaZoomMovement.active||e$2b(e._lastInertiaTranslateMovement)&&e._lastInertiaTranslateMovement.active||i.contains(e._tween))){var n=t.createCorrectPositionTween(e.bounceAnimationTime);e$2b(n)&&(e._tween=i.add(n))}i.update()}else b$b(e,e.enableRotate,e.rotateEventTypes,X$4,e.inertiaSpin,"_lastInertiaSpinMovement"),b$b(e,e.enableZoom,e.zoomEventTypes,zi$1,e.inertiaZoom,"_lastInertiaZoomMovement")}new f$17;var nt$3=new o$1m(o$1p.UNIT_X,0);new o$1p,new o$1p;var Ya=new o$1p;function Pa(e,t,i){var n=e._scene.camera,r=e._strafeStartPosition,o=e.operPlane;if(e$2b(r)&&e$2b(o)){t=i.startPosition;var a=o$1o.clone(i.endPosition,new o$1o);if(e.flipY){var s=a.y-t.y;a.y=t.y-s}var l=n.getPickRay(t,new f$17),u=n.getPickRay(a,new f$17),c=g$1h.rayPlane(l,o,new o$1p),h=g$1h.rayPlane(u,o,new o$1p);if(e$2b(c)&&e$2b(h)){var d=o$1p.normalize(c,new o$1p),f=o$1p.normalize(h,new o$1p),p=o$1p.angleBetween(d,f);if(0!=p){var _=o$1p.cross(d,f,new o$1p);n.rotate(_,p),n._adjustHeightForTerrain()}}}}var Ii$1=new o$1p,oa$1=new a$18,xi$1=new o$1p,Di$1=new t$13,rt$4=new o$1p;function Mi$1(e,t,i,n){var r=e._scene,o=r.camera,a=o$1p.magnitude(n);if(o$1p.magnitude(o.position)<a){o$1p.clone(n,e._strafeStartPosition);var s=new o$1p;e.flipY=!0,s=o$1p.add(o.direction,o.up,s),o$1p.normalize(s,s);var l=o$1m.fromPointNormal(n,s,nt$3);e.operPlane=l,e._strafing=!0,Pa(e,t,i)}else{var u=xi$1;u.x=u.y=u.z=a;var c=t$13.fromCartesian3(u,Di$1);e.operEllipsoid=c,!r.undergroundMode&&r.globe.show&&(e._limitObject=mt(e,c)),Xa(e,t,i,c),o$1p.clone(n,e._rotateStartPosition)}}function st$2(e,t,i){var n=e._scene,r=n.camera;if(p$1d.equals(r.transform,p$1d.IDENTITY)){var o=e._ellipsoid.geodeticSurfaceNormal(r.position,rt$4),a=e._ellipsoid.cartesianToCartographic(r.positionWC,oa$1).height,s=e._globe;if(o$1o.equals(t,e._rotateMousePosition))e._looking?F$7(e,t,i,o):e._rotating?X$4(e,t,i):e._strafing?Pa(e,t,i,e.operPlane):Xa(e,t,i,e.operEllipsoid);else{if(e._looking=!1,e._rotating=!1,e._strafing=!1,e.enableWalk)return e._limitObject=void 0,e._looking=!0,void F$7(e,t,i,o);e$2b(s)&&a<e._minimumPickingTerrainHeight?ea$2(e,t,Ya).then((o=>{if(!e$2b(o)){var a=new f$17(r.position,r.direction),l=s.pick(a,n,la$1);if(e$2b(l)){var u=s$Q.wgs84ToWindowCoordinates(n,l,new o$1p);ea$2(e,new o$1o(t.x,u.y+100),Ya).then((n=>{!e$2b(n)||Mi$1(e,t,i,n)}))}else if(!e$2b(o=r.pickEllipsoid(t,s.ellipsoid,Ya)))return}Mi$1(e,t,i,o)})):e$2b(r.pickEllipsoid(i.startPosition,e._ellipsoid,Ii$1))?(e._limitObject=void 0,Xa(e,t,i,e._ellipsoid),o$1p.clone(Ii$1,e._rotateStartPosition)):a>e._minimumTrackBallHeight?(e._limitObject=void 0,e._rotating=!0,X$4(e,t,i)):(e._limitObject=void 0,e._looking=!0,F$7(e,t,i,o)),o$1o.clone(t,e._rotateMousePosition)}}else X$4(e,t,i)}function X$4(e,t,i,n,r,o){r=u$_(r,!1),o=u$_(o,!1);var a=e._scene,s=a.camera;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(a.camera)),s=e._cloneCamera);var l=a.canvas,u=s.constrainedAxis;e$2b(n)&&(s.constrainedAxis=n);var c=o$1p.magnitude(s.position),h=e._rotateFactor*(c-e._rotateRateRangeAdjustment);h>e._maximumRotateRate&&(h=e._maximumRotateRate),h<e._minimumRotateRate&&(h=e._minimumRotateRate);var d=(i.startPosition.x-i.endPosition.x)/l.clientWidth,f=(i.startPosition.y-i.endPosition.y)/l.clientHeight;d=Math.min(d,e.maximumMovementRatio),f=Math.min(f,e.maximumMovementRatio);var p=Math.abs(d)<Math.abs(f),_=h*d*Math.PI*2,m=h*f*Math.PI;if("ontouchstart"in window&&(m*=2),e.deltaTheta=-m,e.thetaWindowRatio=f,e.phiWindowRatio=d,!r&&!p&&s.rotateRight(_),!o&&p){var g=Math.abs(s.pitch-m),x=s.positionCartographic.height,v=e.minimumZoomDistance+1;if(!(g>-e$2a.PI_OVER_TWO&&g<e$2a.PI_OVER_TWO)||x<v&&m<0)return void(s.constrainedAxis=u);s.rotate(s.right,m)}s.constrainedAxis=u}var Qa=e$29.clone(e$29.UNIT_W),Si$1=e$29.clone(e$29.UNIT_W);new o$1p,new o$1p,new o$1p,new o$1p;var ot$2=new o$1o,vt=new o$1o;function mt(e,t){var i=e._scene,n=i.camera,r=i.globe,o=.5*Math.PI,a=new f$17(n.position,n.direction),s=r.pick(a,i,la$1);if(e$2b(s)){var l=o$1p.subtract(n.position,s,new o$1p);o=o$1p.angleBetween(s,l)}var u=e$2a.toDegrees(o);o=e$2a.toRadians(82-u);var c=n$13.fromAxisAngle(n.right,o,Oi$1),h=p$1e.fromQuaternion(c,Ia),d=new o$1p;p$1e.multiplyByVector(h,n.direction,d),o$1p.normalize(d,d);var f=new o$1p;n$13.multiplyByVec(c,n.direction,f),o$1p.normalize(f,f);var p=new f$17(n.position,d),_=g$1h.rayEllipsoid(p,t);if(e$2b(_)){var m=_.start>0?_.start:_.stop,g=f$17.getPoint(p,m,new o$1p),x=new o$1o;if(e$2b(g)){s$Q.wgs84ToWindowCoordinates(i,g,x);var v=new o$1o(x.x,x.y-2),y=n.getPickRay(v,gi$1),$=g$1h.rayEllipsoid(y,t);if(e$2b($)){var b=$.start>0?$.start:$.stop,T=f$17.getPoint(y,b,new o$1p);if(e$2b(T))return{angle:.5*o$1p.angleBetween(T,g),division:x.y}}}}}function dt$2(e,t,i,n,r,o,a){var s=e._scene,l=s.camera,u=e._limitObject.division,c=e._limitObject.angle;if(t.y<u){var h=c,d=(n.y-i.y)*h*.5,f=(n.x-i.x)*h*.2,p=n$13.fromAxisAngle(l.right,d,new n$13);n$13.normalize(p,p);var _=p$1e.fromQuaternion(p,Ia);p$1e.multiplyByVector(_,r,o);var m=n$13.fromAxisAngle(l.direction,f,new n$13);n$13.normalize(m,m);var g=p$1e.fromQuaternion(m,Ia);return p$1e.multiplyByVector(g,o,o),!0}if(i.y>u&&n.y>u)return!1;if(i.y<u&&n.y>u)return!!e$2b(e._lastPosition)&&(r=l.pickEllipsoid(e._lastPosition,a),!0);var x=new o$1p,v=0;if(i.y<u&&n.y<u){v=(n.y-i.y)*c;var y=e$2b(e._lastPosition)?e._lastPosition:i;l.pickEllipsoid(y,a,r),x=o$1p.clone(r)}else if(i.y>u&&n.y<u){var $=new o$1o;$.y=u,$.x=($.y-i.y)/(n.y-i.y)*(n.x-i.x)+i.x,x=l.pickEllipsoid($,a),v=(n.y-$.y)*c}var b=new o$1p,T=n$13.fromAxisAngle(l.right,v,Oi$1),C=p$1e.fromQuaternion(T,Ia);p$1e.multiplyByVector(C,x,b);var S=new o$1o;s$Q.wgs84ToWindowCoordinates(s,b,S);var w=new o$1o(n.x,S.y),E=l.pickEllipsoid(w,a);return o$1p.clone(E,o),e._lastPosition=o$1o.clone(w),!0}function Xa(e,t,i,n){var r=e._scene,o=r.camera;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(r.camera)),v$K.clone(r.camera,e._cloneCamera),o=e._cloneCamera);var a=o$1o.clone(i.startPosition,ot$2),s=o$1o.clone(i.endPosition,vt),l=o.pickEllipsoid(a,n,Qa),u=o.pickEllipsoid(s,n,Si$1);if(!e$2b(l)||!e$2b(u)||isNaN(l.x)||isNaN(u.x)){var c=new f$17(o.position,o.direction),h=r.globe.pick(c,r,la$1);if(e$2b(h)){var d=s$Q.wgs84ToWindowCoordinates(r,h,new o$1p);if(!e$2b(d))return;var f=s.y-a.y,p=new o$1o(a.x,d.y),_=new o$1o(s.x,d.y+f);l=o.pickEllipsoid(p,n,Qa),u=o.pickEllipsoid(_,n,Si$1)}}if(e$2b(l)&&e$2b(u)&&!isNaN(l.x)&&!isNaN(u.x)&&(e$2b(e._limitObject)&&dt$2(e,t,a,s,l,u,n),e$2b(l)&&e$2b(u)&&!isNaN(l.x)&&!isNaN(u.x))){l=o.worldToCameraCoordinates(l,l),u=o.worldToCameraCoordinates(u,u);var m=o$1p.angleBetween(l,u),g=new o$1p;o$1p.cross(l,u,g),o$1p.magnitudeSquared(g)<1e-20&&(g=o$1p.cross(l,o$1p.UNIT_X,g),o$1p.magnitudeSquared(g)<1e-20&&(g=o$1p.cross(l,o$1p.UNIT_Y,g))),o$1p.normalize(g,g),o.rotate(g,m),e._enableFusion&&(e.panOffset.x+=i.endPosition.x-i.startPosition.x,e.panOffset.y+=i.endPosition.y-i.startPosition.y,e.panDirty=!0),e.enableIndoorColliDetection&&$$6(e),o._adjustHeightForTerrain()}}var Ra=new o$1p,ft=new a$18;function Ea(e,t){var i=e._scene,n=i.globe;if(!(e.autoTiltHeight<1)&&e$2b(n)){var r=i.camera,o=r.positionCartographic;if(o.height-n.getHeight(o)<e.autoTiltHeight){var a=t.endPosition.y-t.startPosition.y>0?1:-1,s=r.pitch+e$2a.toRadians(3)*a;s=Math.min(s,-.01),s=Math.max(s,.5*-Math.PI),r.setView({orientation:{heading:r.heading,pitch:s}})}}}function zi$1(e,t,i){var n=e._ellipsoid,r=e._scene,o=r.camera;if(e$2b(i.distance)&&(i=i.distance),e._enableFusion){var a=i.endPosition.y-i.startPosition.y;e.zoomDirty=!0;var s=e$2a.toRadians(1);a>=0?(o.frustum.fov-=s,o.frustum.fov<e.minFov&&(o.frustum.fov=e.minFov,e.zoomDirty=!1)):(o.frustum.fov+=s,o.frustum.fov>e.maxFov&&(o.frustum.fov=e.maxFov,e.zoomDirty=!1))}else{var l=n.cartesianToCartographic(o.position,ft).height;if(!(l<=e.minimumZoomHeight&&i.endPosition.y-i.startPosition.y>0||l>=e.maximumZoomHeight&&i.endPosition.y-i.startPosition.y<0)){var u=t;if(e.isAroundScreenCenter){var c=e._scene.getViewport({x:10,y:10});u={x:c.width/2,y:c.height/2}}ea$2(e,u,Ga).then((n=>{var a;if(a=e$2b(n)?o$1p.distance(o.position,n):l,"ontouchstart"in window){var s=o$1p.normalize(o.position,Ra);ha$1(e,t,i,e._zoomFactor,a,o$1p.dot(s,o.direction))}else xe$1(e,pi$1(r,t),i,e._zoomFactor,a,n);Ea(e,i),o._adjustHeightForTerrain()}))}}}var ut$4=new o$1o,ki$1=new f$17,pa=new o$1p;new o$1p;var bi$1=new p$1d;new p$1d;var Ni$1=new p$1d,Oi$1=new n$13,Ia=new p$1e,Wi$1=new a$18,Vi$1=new o$1p;function _t$1(e,t,i,n){var r=e._scene.camera;if(p$1d.equals(r.transform,p$1d.IDENTITY)){if(e$2b(i.angleAndHeight)&&(i=i.angleAndHeight),o$1o.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e.enableWalk||e._looking){var o=e._ellipsoid.geodeticSurfaceNormal(r.position,Vi$1);return void F$7(e,t,i,o)}var a=e._ellipsoid.cartesianToCartographic(r.position,Wi$1);e._tiltOnEllipsoid||a.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,gt$2(e,t,i,n)):pt$2(e,t,i,n)}}var ht$1=new a$18;function gt$2(e,t,i,n){var r=e._ellipsoid,o=e._scene,a=o.camera,s=.25*e.minimumZoomDistance,l=r.cartesianToCartographic(a.positionWC,ht$1).height;if(!(l-s-1<e$2a.EPSILON3&&i.endPosition.y-i.startPosition.y<0)){var u=o.canvas,c=ut$4;c.x=u.clientWidth/2,c.y=u.clientHeight/2;var h,d=a.getPickRay(c,ki$1),f=g$1h.rayEllipsoid(d,r);if(e$2b(f))h=f$17.getPoint(d,f.start,pa);else{if(!(l>e._minimumTrackBallHeight)){e._looking=!0;var p=e._ellipsoid.geodeticSurfaceNormal(a.position,Vi$1);return F$7(e,t,i,p),void o$1o.clone(t,e._tiltCenterMousePosition)}var _=g$1h.grazingAltitudeLocation(d,r);if(!e$2b(_))return;var m=r.cartesianToCartographic(_,Wi$1);m.height=0,h=r.cartographicToCartesian(m,pa)}if(o$1p.clone(h,e._tiltCenter),!n){var g=m$17.eastNorthUpToFixedFrame(h,r,bi$1),x=e._globe,v=e._ellipsoid;e._globe=void 0,e._ellipsoid=t$13.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var y=p$1d.clone(a.transform,Ni$1);a._setTransform(g),X$4(e,t,i,o$1p.UNIT_Z),a._setTransform(y),e._globe=x,e._ellipsoid=v;var $=v.maximumRadius;e._rotateFactor=1/$,e._rotateRateRangeAdjustment=$}}}var Ai$1=new o$1p;function $$6(e,t){var i=e._scene,n=i.camera,r=e._cloneCamera,o=n.position,a=r.position;if(!o$1p.equals(a,o)){var s=o$1p.subtract(a,o,Ai$1);o$1p.normalize(s,s);var l=i.collideDetection(s);if(e$2b(l)){i.mode===C$13.COLUMBUS_VIEW&&(l=o$1p.fromElements(l.y,l.z,l.x));var u=o$1p.distance(o,l);if(t=u$_(t,e.minimumDetectDistance),u<=o$1p.distance(o,a)||u<t)return}}v$K.clone(r,i.camera)}function Hi$1(e,t,i,n,r){var o=t._ellipsoid,a=t._scene.camera;if(!r){var s=m$17.eastNorthUpToFixedFrame(e,o,bi$1),l=t._globe,u=t._ellipsoid;t._globe=void 0,t._ellipsoid=t$13.UNIT_SPHERE,t._rotateFactor=1,t._rotateRateRangeAdjustment=1;var c=o$1p.UNIT_Z,h=p$1d.clone(a.transform,Ni$1);a._setTransform(s),X$4(t,n,i,c),a._setTransform(h),t._globe=l,t._ellipsoid=u;var d=u.maximumRadius;t._rotateFactor=1/d,t._rotateRateRangeAdjustment=d,t.enableIndoorColliDetection&&$$6(t,1),a._suspendTerrainAdjustment=!1,a._adjustHeightForTerrain()}}function pt$2(e,t,i,n){var r,o,a,s=e._ellipsoid,l=e._scene,u=l.camera;e.enableIndoorColliDetection&&(e$2b(e._cloneCamera)||(e._cloneCamera=v$K.clone(l.camera)),v$K.clone(l.camera,e._cloneCamera),u=e._cloneCamera),o$1o.equals(t,e._tiltCenterMousePosition)&&!e._isAroundScreenCenter?Hi$1(r=o$1p.clone(e._tiltCenter,pa),e,i,t,n):ea$2(e,t,pa).then((l=>{if(!e$2b(r=l)){if(o=u.getPickRay(t,ki$1),!e$2b(a=g$1h.rayEllipsoid(o,s)))return;r=f$17.getPoint(o,a.start,pa)}o$1o.clone(t,e._tiltCenterMousePosition),e._tiltCenter=o$1p.clone(r,e._tiltCenter),Hi$1(r,e,i,t,n)}))}var ct$2=new o$1o,yt=new o$1o,Ka=new f$17,Ja=new f$17,wt$1=new o$1p,Ct$1=new o$1p;function F$7(e,t,i,n){var r=e._scene.camera,o=ct$2;o.x=i.startPosition.x,o.y=0;var a=yt;a.x=i.endPosition.x,a.y=0;var s,l,u=r.getPickRay(o,Ka),c=r.getPickRay(a,Ja),h=0;r.frustum instanceof a$V?(s=u.origin,l=c.origin,o$1p.add(r.direction,s,s),o$1p.add(r.direction,l,l),o$1p.subtract(s,r.position,s),o$1p.subtract(l,r.position,l),o$1p.normalize(s,s),o$1p.normalize(l,l)):(s=u.direction,l=c.direction);var d=o$1p.dot(s,l);d<1&&(h=Math.acos(d)),h=i.startPosition.x>i.endPosition.x?-h:h;var f=e._horizontalRotationAxis;if(e$2b(n)?r.look(n,-h):e$2b(f)?r.look(f,-h):r.lookLeft(h),o.x=0,o.y=i.startPosition.y,a.x=0,a.y=i.endPosition.y,s=r.getPickRay(o,Ka).direction,l=r.getPickRay(a,Ja).direction,u=r.getPickRay(o,Ka),c=r.getPickRay(a,Ja),h=0,r.frustum instanceof a$V?(s=u.origin,l=c.origin,o$1p.add(r.direction,s,s),o$1p.add(r.direction,l,l),o$1p.subtract(s,r.position,s),o$1p.subtract(l,r.position,l),o$1p.normalize(s,s),o$1p.normalize(l,l)):(s=u.direction,l=c.direction),(d=o$1p.dot(s,l))<1&&(h=Math.acos(d)),h=i.startPosition.y>i.endPosition.y?-h:h,e$2b(n=u$_(n,f))){var p=r.direction,_=o$1p.negate(n,wt$1),m=o$1p.equalsEpsilon(p,n,e$2a.EPSILON2),g=o$1p.equalsEpsilon(p,_,e$2a.EPSILON2);if(m||g)(m&&h<0||g&&h>0)&&r.look(r.right,-h);else{d=o$1p.dot(p,n);var x=e$2a.acosClamped(d);h>0&&h>x&&(h=x-e$2a.EPSILON4),d=o$1p.dot(p,_),x=e$2a.acosClamped(d),h<0&&-h>x&&(h=-x+e$2a.EPSILON4);var v=o$1p.cross(n,p,Ct$1);r.look(v,h)}}else r.lookUp(h)}var M$7=new o$1p,Zi$1=new o$1p;function xa(e,t){var i=new f$14(t);M$7=o$1p.multiplyByScalar(e,.1,M$7),o$1p.add(t,M$7,M$7);var n=i.projectPointOntoPlane(M$7),r=i.projectPointOntoEllipsoid(n),o=i.projectPointOntoPlane(t),a=i.projectPointOntoEllipsoid(o),s=o$1p.subtract(r,a,Zi$1);return o$1p.normalize(s,s),s}function Da(e,t){var i=o$1m.ORIGIN_XY_PLANE;M$7=o$1p.multiplyByScalar(e,.1,M$7),o$1p.add(t,M$7,M$7);var n=o$1m.projectPointOntoPlane(i,M$7),r=o$1m.projectPointOntoPlane(i,t),o=o$1p.subtract(n,r,Zi$1);return o$1p.normalize(o,o),o}var $a=new f$17,oa$1=new a$18,q$6=new o$1p;function lt(e,t){var i=t.positionCartographic;oa$1.longitude=i.longitude,oa$1.latitude=i.latitude,oa$1.height=i.height>0?0:i.height-10,a$18.toCartesian(oa$1,void 0,q$6);var n=o$1p.subtract(q$6,t.position,q$6);o$1p.normalize(n,n),$a.origin=t.position,$a.direction=n;var r=e.pickFromRay($a);if(e$2b(r)&&e$2b(r.position)){var o=r.position;return a$18.fromCartesian(o,void 0,oa$1).height}}function Tt$2(e,t,i){var n=t.positionCartographic,r=lt(e,t);if(!e$2b(r)||Math.abs(n.height-r-i)<1)return t.position;n.height=r-Za>2?i+1.8:r+i,Za=n.height;var o=a$18.toCartesian(n);return e$2b(o)?o:t.position}var Ma=new o$1p,Sa=new o$1p;function Pt(e){var t=e._scene,i=t.camera,n=e._aggregator._flags,r=i.position,o=5*e.walkParameters.speed,a=e.walkParameters.height;n.moveForward&&za(e,xa(i.direction,r),o),n.moveBackward&&(Ma.x=-i.direction.x,Ma.y=-i.direction.y,Ma.z=-i.direction.z,za(e,xa(Ma,r),o)),n.moveLeft&&(Sa.x=-i.right.x,Sa.y=-i.right.y,Sa.z=-i.right.z,za(e,xa(Sa,r),.1*o)),n.moveRight&&za(e,xa(i.right,r),.1*o),i.position=Tt$2(t,i,a)}function za(e,t,i){var n=e._scene,r=n.camera.position;o$1p.multiplyByScalar(t,i,M$7),o$1p.add(r,M$7,M$7);var o=!0;if(!o$1p.equals(M$7,r)){var a=o$1p.subtract(M$7,r,Ai$1);o$1p.normalize(a,a);var s=n.collideDetection(a);if(e$2b(s))o$1p.distance(M$7,r)-o$1p.distance(r,s)>-e.minimumDetectDistance*Math.abs(i)&&(o=!1)}(o||!e.enableIndoorColliDetection)&&o$1p.clone(M$7,r)}function Rt$2(e){var t,i=e._scene.camera,n=e._aggregator._flags,r=i.position,o=5*e.walkParameters.speed;n.moveForward&&(t=Da(i.direction,r),i.move(t,o)),n.moveBackward&&(t=Da(i.direction,r),i.move(t,-o)),n.moveLeft&&(t=Da(i.right,r),i.move(t,-o)),n.moveRight&&(t=Da(i.right,r),i.move(t,o))}function Et$1(e){b$b(e,e.enableRotate,e.rotateEventTypes,st$2,e.inertiaSpin,"_lastInertiaSpinMovement"),b$b(e,e.enableZoom,e.zoomEventTypes,zi$1,e.inertiaZoom,"_lastInertiaZoomMovement"),b$b(e,e.enableTilt,e.tiltEventTypes,_t$1,e.inertiaSpin,"_lastInertiaTiltMovement"),b$b(e,e.enableLook,e.lookEventTypes,F$7)}_a.prototype.update=function(){p$1d.equals(this._scene.camera.transform,p$1d.IDENTITY)?(this._globe=this._scene.globe,this._ellipsoid=e$2b(this._globe)?this._globe.ellipsoid:this._scene.mapProjection.ellipsoid):(this._globe=void 0,this._ellipsoid=t$13.UNIT_SPHERE),this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight*this._scene.terrainExaggeration,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight*this._scene.terrainExaggeration,this._minimumTrackBallHeight=this.minimumTrackBallHeight*this._scene.terrainExaggeration;var e=this._ellipsoid.maximumRadius;this._rotateFactor=1/e,this._rotateRateRangeAdjustment=e;var t=this._scene.mode;t===C$13.SCENE2D?Oe$2(this):t===C$13.COLUMBUS_VIEW?(this._horizontalRotationAxis=o$1p.UNIT_Z,tt$2(this),this.enableWalk&&Rt$2(this)):t===C$13.SCENE3D&&(this._horizontalRotationAxis=void 0,Et$1(this),this.enableWalk&&Pt(this)),this._aggregator.reset()},_a.prototype.isDestroyed=function(){return!1},_a.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),i$10(this)};var k$5={},U$6=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function m$9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var E$7=8192,g$e=[],I$4=function(){function e(t,i){m$9(this,e),i=i||{},void 0===t&&(t=E$7),"number"==typeof t&&(t=new ArrayBuffer(t));var n=t.byteLength,r=i.offset?i.offset>>>0:0;t.buffer&&(n=t.byteLength-r,t=t.byteLength!==t.buffer.byteLength?t.buffer.slice(t.byteOffset+r,t.byteOffset+t.byteLength):r?t.buffer.slice(r):t.buffer),this.buffer=t,this.length=n,this.byteLength=n,this.byteOffset=0,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer),this._increment=n||E$7,this._mark=0}return U$6(e,[{key:"available",value:function(e){return void 0===e&&(e=1),this.offset+e<=this.length}},{key:"isLittleEndian",value:function(){return this.littleEndian}},{key:"setLittleEndian",value:function(){this.littleEndian=!0}},{key:"isBigEndian",value:function(){return!this.littleEndian}},{key:"setBigEndian",value:function(){this.littleEndian=!1}},{key:"skip",value:function(e){void 0===e&&(e=1),this.offset+=e}},{key:"seek",value:function(e){this.offset=e}},{key:"mark",value:function(){this._mark=this.offset}},{key:"reset",value:function(){this.offset=this._mark}},{key:"rewind",value:function(){this.offset=0}},{key:"ensureAvailable",value:function(e){if(void 0===e&&(e=1),!this.available(e)){var t=this._increment+this._increment;this._increment=t;var i=this.length+t,n=new Uint8Array(i);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=i,this._data=new DataView(this.buffer)}}},{key:"readBoolean",value:function(){return 0!==this.readUint8()}},{key:"readInt8",value:function(){return this._data.getInt8(this.offset++)}},{key:"readUint8",value:function(){return this._data.getUint8(this.offset++)}},{key:"readByte",value:function(){return this.readUint8()}},{key:"readBytes",value:function(e){void 0===e&&(e=1);for(var t=new Uint8Array(e),i=0;i<e;i++)t[i]=this.readByte();return t}},{key:"readInt16",value:function(){var e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}},{key:"readUint16",value:function(){var e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}},{key:"readInt32",value:function(){var e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readUint32",value:function(){var e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readFloat32",value:function(){var e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readFloat64",value:function(){var e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}},{key:"readChar",value:function(){return String.fromCharCode(this.readInt8())}},{key:"readChars",value:function(e){void 0===e&&(e=1),g$e.length=e;for(var t=0;t<e;t++)g$e[t]=this.readChar();return g$e.join("")}},{key:"writeBoolean",value:function(e){this.writeUint8(e?255:0)}},{key:"writeInt8",value:function(e){this.ensureAvailable(1),this._data.setInt8(this.offset++,e)}},{key:"writeUint8",value:function(e){this.ensureAvailable(1),this._data.setUint8(this.offset++,e)}},{key:"writeByte",value:function(e){this.writeUint8(e)}},{key:"writeBytes",value:function(e){this.ensureAvailable(e.length);for(var t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t])}},{key:"writeInt16",value:function(e){this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2}},{key:"writeUint16",value:function(e){this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2}},{key:"writeInt32",value:function(e){this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeUint32",value:function(e){this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeFloat32",value:function(e){this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeFloat64",value:function(e){this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8}},{key:"writeChar",value:function(e){this.writeUint8(e.charCodeAt(0))}},{key:"writeChars",value:function(e){for(var t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t))}},{key:"toArray",value:function(){return new Uint8Array(this.buffer,0,this.offset)}}]),e}(),s$9={};function A$9(e,t){if(e)throw new TypeError("Not a valid NetCDF v3.x file: "+t)}function b$a(e){e.offset%4!=0&&e.skip(4-e.offset%4)}function T$9(e){var t=e.readUint32(),i=e.readChars(t);return b$a(e),i}s$9.notNetcdf=A$9,s$9.padding=b$a,s$9.readName=T$9;var a$6={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6};function N$3(e){switch(Number(e)){case a$6.BYTE:return"byte";case a$6.CHAR:return"char";case a$6.SHORT:return"short";case a$6.INT:return"int";case a$6.FLOAT:return"float";case a$6.DOUBLE:return"double";default:return"undefined"}}function v$7(e,t){if(1!==e){for(var i=new Array(e),n=0;n<e;n++)i[n]=t();return i}return t()}function F$6(e,t,i){switch(t){case a$6.BYTE:return e.readBytes(i);case a$6.CHAR:return L$9(e.readChars(i));case a$6.SHORT:return v$7(i,e.readInt16.bind(e));case a$6.INT:return v$7(i,e.readInt32.bind(e));case a$6.FLOAT:return v$7(i,e.readFloat32.bind(e));case a$6.DOUBLE:return v$7(i,e.readFloat64.bind(e));default:return void A$9(!0,"non valid type "+t)}}function L$9(e){return 0===e.charCodeAt(e.length-1)?e.substring(0,e.length-1):e}var d$d=0,D$6=10,O$7=11,p$5=12;function R$7(e){var t={recordDimension:{length:e.readUint32()}},i=S$3(e);t.recordDimension.id=i.recordId,t.recordDimension.name=i.recordName,t.dimensions=i.dimensions,t.globalAttributes=B$6(e);var n=H$8(e,i.recordId);return t.variables=n.variables,t.recordDimension.recordStep=n.recordStep,t}function S$3(e){var t,i,n=e.readUint32();if(n===d$d)return s$9.notNetcdf(e.readUint32()!==d$d,"wrong empty tag for list of dimensions"),[];s$9.notNetcdf(n!==D$6,"wrong tag for list of dimensions");for(var r=e.readUint32(),o=new Array(r),a=0;a<r;a++){var s=s$9.readName(e),l=e.readUint32();0===l&&(t=a,i=s),o[a]={name:s,size:l}}return{dimensions:o,recordId:t,recordName:i}}function B$6(e){var t=e.readUint32();if(t===d$d)return s$9.notNetcdf(e.readUint32()!==d$d,"wrong empty tag for list of attributes"),[];s$9.notNetcdf(t!==p$5,"wrong tag for list of attributes");for(var i=e.readUint32(),n=new Array(i),r=0;r<i;r++){var o=s$9.readName(e),a=e.readUint32();s$9.notNetcdf(a<1||a>6,"non valid type "+a);var s=e.readUint32(),l=F$6(e,a,s);s$9.padding(e),n[r]={name:o,type:N$3(a),value:l}}return n}function H$8(e,t){var i=e.readUint32(),n=0;if(i===d$d)return s$9.notNetcdf(e.readUint32()!==d$d,"wrong empty tag for list of variables"),[];s$9.notNetcdf(i!==O$7,"wrong tag for list of variables");for(var r=e.readUint32(),o=new Array(r),a=0;a<r;a++){for(var s=s$9.readName(e),l=e.readUint32(),u=new Array(l),c=0;c<l;c++)u[c]=e.readUint32();var h=B$6(e),d=e.readUint32();s$9.notNetcdf(d<1&&d>6,"non valid type "+d);var f=e.readUint32(),p=e.readUint32();u[0]===t&&(n+=f),o[a]={name:s,dimensions:u,attributes:h,type:N$3(d),size:f,offset:p,record:u[0]===t}}return{variables:o,recordStep:n}}!function(){function e(t){m$9(this,e);var i=new I$4(t);i.setBigEndian(),s$9.notNetcdf("CDF"!==i.readChars(3),"should start with CDF");var n=i.readByte();s$9.notNetcdf(2===n,"64-bit offset format not supported yet"),s$9.notNetcdf(1!==n,"unknown version"),this.header=R$7(i),this.header.version=n,this.buffer=i}U$6(e,[{key:"getDataVariable",value:function(e){var t;return t="string"==typeof e?this.header.variables.find((function(t){return t.name===e})):e,s$9.notNetcdf(void 0===t,"variable not found"),this.buffer.seek(t.offset),t.record?data.record(this.buffer,t,this.header.recordDimension):data.nonRecord(this.buffer,t)}},{key:"version",get:function(){return 1===this.header.version?"classic format":"64-bit offset format"}},{key:"recordDimension",get:function(){return this.header.recordDimension}},{key:"dimensions",get:function(){return this.header.dimensions}},{key:"globalAttributes",get:function(){return this.header.globalAttributes}},{key:"variables",get:function(){return this.header.variables}}]),k$5.NetCDFReader=e}();var e$4={VolumeRendering:0,Slice:1,ContourValue:2},gt$1=Object.freeze(e$4),Ft$1="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nvarying vec4 vTexCoord;\nvarying vec4 vNearTexCoord;\n#ifdef HAS_LIGHT\nvarying vec4 vPositionMC;\n#endif\nuniform vec3 u_volumeBoxSize;\nuniform vec3 scale;\nuniform vec3 uOffset;\nvoid main()\n{\nvTexCoord = vec4(aTexCoord0.xyz, 1.0);\ngl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n",Rt$1="varying vec4 vTexCoord;\nvarying vec4 vNearTexCoord;\nuniform sampler2D u_colorTable;\nuniform vec4 u_minMaxValueAndFiltration;\nuniform vec3 u_maxVisibleTextureCoord;\nuniform vec3 u_minVisibleTextureCoord;\nuniform sampler2D u_opacityTexture;\nuniform sampler2D u_colorTexture;\nvec4 getColorForValue(float tValue)\n{\nfloat texCoord = tValue;\ntexCoord = clamp(texCoord, 0.0, 1.0);\nvec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\ntColor.a = texture2D(u_opacityTexture, vec2(texCoord, 0.5)).r;\nreturn tColor;\n}\nvec4 getSampleValue(vec3 pos)\n{\nif(vTexCoord.x > u_maxVisibleTextureCoord.x || vTexCoord.x < u_minVisibleTextureCoord.x\n|| vTexCoord.y > u_maxVisibleTextureCoord.y || vTexCoord.y < u_minVisibleTextureCoord.y\n|| vTexCoord.z > u_maxVisibleTextureCoord.z || vTexCoord.z < u_minVisibleTextureCoord.z)\n{\ndiscard;\n}\nfloat noValue;\nfloat value = czm_getVolumeValue(pos, noValue);\nvec4 color = getColorForValue(value);\nreturn color;\n}\nvoid main()\n{\nvec3 texcood = vTexCoord.xyz;\nif(uFilterMode > 0.5)\n{\ntexcood = vNearTexCoord.xyz;\n}\ngl_FragColor = getSampleValue(texcood);\ngl_FragColor = czm_gammaCorrect(gl_FragColor);\n}\n",_0x3e8eee=(_0x319485=!0,function(e,t){var i=_0x319485?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x319485=!1,i}),_0x8b3a3=_0x3e8eee(void 0,(function(){return _0x8b3a3.toString().search("(((.+)+)+)+$").toString().constructor(_0x8b3a3).search("(((.+)+)+)+$")})),_0x319485;_0x8b3a3();var Mt$1="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nvarying vec3 positionEC;\nvarying vec3 vTexCoord;\nvoid main()\n{\n positionEC = (czm_modelView * aPosition).xyz;\n vTexCoord = aTexCoord0.xyz;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",_0x193d54=(_0x126734=!0,function(e,t){var i=_0x126734?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x126734=!1,i}),_0x44fe4e=_0x193d54(void 0,(function(){return _0x44fe4e.toString().search("(((.+)+)+)+$").toString().constructor(_0x44fe4e).search("(((.+)+)+)+$")})),_0x126734;_0x44fe4e();var Nt$1="uniform vec3 u_camTexCoord;\nuniform vec4 u_minMaxValueAndFiltration;\n// opacity and color textures\nuniform sampler2D u_opacityTexture;\nuniform sampler2D u_colorTexture;\nuniform float u_sampleDistance;\nuniform vec4 u_gradientOpacityInfo;\n#ifdef CLIP_PLANE\nuniform vec4 u_clip_planes[6];\nuniform int u_clip_planes_count;\n#endif\n#ifdef APPLY_LIGHTING\n uniform vec3 uDiffuse;\n uniform vec3 uSpecular;\n uniform vec3 uAmbient;\n uniform float uShiness;\n#endif\n\nvarying vec3 positionEC;\nvarying vec3 vTexCoord;\n\nfloat realValueToScalarValue(float value){\n float minValue = u_minMaxValueAndFiltration.z;\n float maxValue = u_minMaxValueAndFiltration.w;\n return (value - minValue) / (maxValue - minValue);\n}\nfloat scalarValueToReaValue(float value){\n float minValue = u_minMaxValueAndFiltration.x;\n float maxValue = u_minMaxValueAndFiltration.y;\n return minValue + value * (maxValue - minValue);\n}\nfloat getTextureValue(vec3 pos)\n{\n float noValue;\n #ifdef MultiResolution\n float value = czm_getVolumeValueMultiResolution(pos, noValue);\n #else\n float value = czm_getVolumeValue(pos, noValue);\n #endif\n value = scalarValueToReaValue(value);\n return value;\n}\n\n// Given a normal compute the gradient opacity factors\nfloat computeGradientOpacityFactor(vec4 normal, float goscale, float goshift, float gomin, float gomax)\n{\n#ifdef GRADIENT_OPACITY\n return clamp(normal.a*goscale + goshift, gomin, gomax);\n#else\n return 1.0;\n#endif\n}\n\n// compute the normal and gradient magnitude for a position\nvec4 computeNormal(vec3 pos, float scalar, vec3 tstep)\n{\n vec4 result;\n result.x = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)) - scalar;\n result.y = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)) - scalar;\n result.z = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)) - scalar;\n // divide by spacing\n vec3 vSpacing = vec3(1.0);\n result.xyz /= vSpacing;\n result.w = length(result.xyz);\n // rotate to View Coords\n //result.xyz = result.x * vPlaneNormal0 + result.y * vPlaneNormal2 + result.z * vPlaneNormal4;\n if (result.w > 0.0)\n {\n result.xyz /= result.w;\n }\n return result;\n}\n\n#ifdef APPLY_LIGHTING\nvoid applyLighting(inout vec4 tColor, vec3 normal)\n{\n vec3 diffuse = uDiffuse;\n vec3 specular = uSpecular;\n vec3 ambient = uAmbient;\n float shiness = uShiness;\n vec3 normalEC = normalize(czm_normal * normal);\n float ndot = max( dot( normalEC, czm_sunDirectionEC ), 0.0 );\n ndot = ndot * 0.5 + 0.5;\n diffuse = diffuse * ndot;\n specular = specular * czm_getSpecular(czm_sunDirectionEC, normalize(-positionEC), normalEC, shiness);\n tColor.rgb = tColor.rgb*(diffuse + ambient) + specular;\n}\n#endif\n\nvec4 getColorForValue(vec3 posIS, vec3 stepIS, float tValue)\n{\n vec4 goFactor = vec4(1.0,1.0,1.0,1.0);\n#if defined(GRADIENT_OPACITY) || defined(APPLY_LIGHTING)\n vec4 normal0 = computeNormal(posIS, tValue, stepIS);\n#endif\n#ifdef GRADIENT_OPACITY\n float goscale = u_gradientOpacityInfo.z;\n float goshift = u_gradientOpacityInfo.w;\n float gomin = u_gradientOpacityInfo.x;\n float gomax = u_gradientOpacityInfo.y;\n goFactor.x = computeGradientOpacityFactor(normal0, goscale, goshift, gomin, gomax);\n#endif\n float texCoord = realValueToScalarValue(tValue);\n\ttexCoord = clamp(texCoord, 0.0, 1.0);\n vec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\n tColor.a = goFactor.x * texture2D(u_opacityTexture, vec2(texCoord, 0.5)).r;\n#ifdef APPLY_LIGHTING\n applyLighting(tColor, normal0.xyz);\n#endif\n return tColor;\n}\n\nvec4 applyBlend(vec3 posIS, vec3 endIS, vec3 stepIS, float texSampleDist)\n{\n float raySteps = 1.0 / texSampleDist;\n float jitter = 0.1;\n float stepsTraveled = jitter;\n // local vars for the loop\n vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n float tValue;\n vec4 tColor;\n // Perform initial step at the volume boundary\n // compute the scalar\n tValue = getTextureValue(posIS);\n // now map through opacity and color\n tColor = getColorForValue(posIS, stepIS, tValue);\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps);\n return tColor;\n }\n\n tColor.a = 1.0 - pow(1.0 - tColor.a, jitter);\n color = vec4(tColor.rgb * tColor.a, tColor.a);\n posIS += (jitter * stepIS);\n\n bool find = false;\n\n for (int i = 0; i < 5000 ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n // compute the scalar\n tValue = getTextureValue(posIS);\n // now map through opacity and color\n tColor = getColorForValue(posIS, stepIS, tValue);\n float mix = (1.0 - color.a);\n if(!find){\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n }\n stepsTraveled++;\n posIS += stepIS;\n if(posIS.x > 1.0 || posIS.x < 0.0 || posIS.y > 1.0 || posIS.y < 0.0 || posIS.z > 1.0 || posIS.z < 0.0){\n find = true;\n#ifndef WEBGPU\n break;\n#endif \n }\n if (color.a > 0.99) { \n color.a = 1.0;\n find = true;\n#ifndef WEBGPU\n break;\n#endif \n }\n }\n\n return vec4(color.rgb/color.a, color.a);\n}\n\nvec2 intersectBox(vec3 texel_zero, vec3 texel_dir_norm)\n{\n vec3 minV = vec3(0.0);\n vec3 maxV = vec3(1.0);\n float t1,t2;\n t1=(minV.x-texel_zero.x)/texel_dir_norm.x;\n t2=(maxV.x-texel_zero.x)/texel_dir_norm.x;\n float tminX=min(t1,t2);\n float tmaxX=max(t1,t2);\n t1=(minV.y-texel_zero.y)/texel_dir_norm.y;\n t2=(maxV.y-texel_zero.y)/texel_dir_norm.y;\n float tminY=min(t1,t2);\n float tmaxY=max(t1,t2);\n t1=(minV.z-texel_zero.z)/texel_dir_norm.z;\n t2=(maxV.z-texel_zero.z)/texel_dir_norm.z;\n float tminZ=min(t1,t2);\n float tmaxZ=max(t1,t2);\n float largest_tmin = max(max(tminX, tminY), max(tminX, tminZ));\n float smallest_tmax = min(min(tmaxX, tmaxY), min(tmaxX, tmaxZ));\n vec2 dists = vec2(largest_tmin,smallest_tmax);\n \n#ifdef CLIP_PLANE\n for(int i = 0; i < 6; i++){\n if(i == u_clip_planes_count){\n break;\n }\n float rayDirRatio = dot(texel_dir_norm, u_clip_planes[i].xyz);\n float equationResult = dot(texel_zero.xyz, u_clip_planes[i].xyz) + u_clip_planes[i].w;\n if (rayDirRatio == 0.0){\n if (equationResult < 0.0){\n dists.x = dists.y;\n }\n continue;\n }\n float result = -1.0 * equationResult / rayDirRatio;\n if (rayDirRatio < 0.0){\n dists.y = min(dists.y, result);\n }\n else {\n dists.x = max(dists.x, result);\n }\n }\n#endif\n return dists;\n}\nvoid main()\n{\n vec3 cameraDir = normalize(positionEC.xyz);\n vec3 localZero = u_camTexCoord;\n vec3 localOne = vTexCoord.xyz;\n vec3 texel_dir_norm = normalize(localOne.xyz - localZero.xyz);\n\n vec3 texel_zero = localZero.xyz;\n vec2 nearFar = intersectBox(texel_zero, texel_dir_norm);\n // 采样间隔受相机与物体之间的距离控制\n float texSampleDist = u_sampleDistance;\n vec3 texel_step = texSampleDist * texel_dir_norm;\n float tstep = length(texel_step);\n float tnear = max(nearFar.x, 0.0) + tstep;\n float tfar = nearFar.y - tstep;\n vec3 coord;\n if(tnear > tfar){\n discard;\n }\n else{\n coord = texel_zero + texel_dir_norm * tnear;\n }\n gl_FragColor = applyBlend(coord, texel_zero + texel_dir_norm * tfar, texel_step, texSampleDist);\n}",_0xe73feb=(_0x2e5f40=!0,function(e,t){var i=_0x2e5f40?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e5f40=!1,i}),_0x31346f=_0xe73feb(void 0,(function(){return _0x31346f.toString().search("(((.+)+)+)+$").toString().constructor(_0x31346f).search("(((.+)+)+)+$")})),_0x2e5f40;_0x31346f();var _0x377458=[[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,9,1,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,11,2,0,9,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,3,8,2,8,11,11,8,9,-1,-1,-1,-1,-1,-1,-1],[3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,8,0,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,2,10,1,10,9,9,10,8,-1,-1,-1,-1,-1,-1,-1],[3,1,11,10,3,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,11,0,11,8,8,11,10,-1,-1,-1,-1,-1,-1,-1],[3,0,9,3,9,10,10,9,11,-1,-1,-1,-1,-1,-1,-1],[9,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,7,4,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,9,1,4,1,7,7,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,7,4,3,4,0,1,11,2,-1,-1,-1,-1,-1,-1,-1],[9,11,2,9,2,0,8,7,4,-1,-1,-1,-1,-1,-1,-1],[2,9,11,2,7,9,2,3,7,7,4,9,-1,-1,-1,-1],[8,7,4,3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,7,4,10,4,2,2,4,0,-1,-1,-1,-1,-1,-1,-1],[9,1,0,8,7,4,2,10,3,-1,-1,-1,-1,-1,-1,-1],[4,10,7,9,10,4,9,2,10,9,1,2,-1,-1,-1,-1],[3,1,11,3,11,10,7,4,8,-1,-1,-1,-1,-1,-1,-1],[1,11,10,1,10,4,1,4,0,7,4,10,-1,-1,-1,-1],[4,8,7,9,10,0,9,11,10,10,3,0,-1,-1,-1,-1],[4,10,7,4,9,10,9,11,10,-1,-1,-1,-1,-1,-1,-1],[9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,4,5,1,0,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,4,5,8,5,3,3,5,1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,11,2,4,5,9,-1,-1,-1,-1,-1,-1,-1],[5,11,2,5,2,4,4,2,0,-1,-1,-1,-1,-1,-1,-1],[2,5,11,3,5,2,3,4,5,3,8,4,-1,-1,-1,-1],[9,4,5,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,0,10,8,4,5,9,-1,-1,-1,-1,-1,-1,-1],[0,4,5,0,5,1,2,10,3,-1,-1,-1,-1,-1,-1,-1],[2,5,1,2,8,5,2,10,8,4,5,8,-1,-1,-1,-1],[11,10,3,11,3,1,9,4,5,-1,-1,-1,-1,-1,-1,-1],[4,5,9,0,1,8,8,1,11,8,11,10,-1,-1,-1,-1],[5,0,4,5,10,0,5,11,10,10,3,0,-1,-1,-1,-1],[5,8,4,5,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1],[9,8,7,5,9,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,0,3,9,3,5,5,3,7,-1,-1,-1,-1,-1,-1,-1],[0,8,7,0,7,1,1,7,5,-1,-1,-1,-1,-1,-1,-1],[1,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,7,9,7,5,11,2,1,-1,-1,-1,-1,-1,-1,-1],[11,2,1,9,0,5,5,0,3,5,3,7,-1,-1,-1,-1],[8,2,0,8,5,2,8,7,5,11,2,5,-1,-1,-1,-1],[2,5,11,2,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1],[7,5,9,7,9,8,3,2,10,-1,-1,-1,-1,-1,-1,-1],[9,7,5,9,2,7,9,0,2,2,10,7,-1,-1,-1,-1],[2,10,3,0,8,1,1,8,7,1,7,5,-1,-1,-1,-1],[10,1,2,10,7,1,7,5,1,-1,-1,-1,-1,-1,-1,-1],[9,8,5,8,7,5,11,3,1,11,10,3,-1,-1,-1,-1],[5,0,7,5,9,0,7,0,10,1,11,0,10,0,11,-1],[10,0,11,10,3,0,11,0,5,8,7,0,5,0,7,-1],[10,5,11,7,5,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,1,0,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,1,8,9,5,6,11,-1,-1,-1,-1,-1,-1,-1],[1,5,6,2,1,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,5,6,1,6,2,3,8,0,-1,-1,-1,-1,-1,-1,-1],[9,5,6,9,6,0,0,6,2,-1,-1,-1,-1,-1,-1,-1],[5,8,9,5,2,8,5,6,2,3,8,2,-1,-1,-1,-1],[2,10,3,11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,8,0,10,0,2,11,5,6,-1,-1,-1,-1,-1,-1,-1],[0,9,1,2,10,3,5,6,11,-1,-1,-1,-1,-1,-1,-1],[5,6,11,1,2,9,9,2,10,9,10,8,-1,-1,-1,-1],[6,10,3,6,3,5,5,3,1,-1,-1,-1,-1,-1,-1,-1],[0,10,8,0,5,10,0,1,5,5,6,10,-1,-1,-1,-1],[3,6,10,0,6,3,0,5,6,0,9,5,-1,-1,-1,-1],[6,9,5,6,10,9,10,8,9,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,4,3,7,6,11,5,-1,-1,-1,-1,-1,-1,-1],[1,0,9,5,6,11,8,7,4,-1,-1,-1,-1,-1,-1,-1],[11,5,6,1,7,9,1,3,7,7,4,9,-1,-1,-1,-1],[6,2,1,6,1,5,4,8,7,-1,-1,-1,-1,-1,-1,-1],[1,5,2,5,6,2,3,4,0,3,7,4,-1,-1,-1,-1],[8,7,4,9,5,0,0,5,6,0,6,2,-1,-1,-1,-1],[7,9,3,7,4,9,3,9,2,5,6,9,2,9,6,-1],[3,2,10,7,4,8,11,5,6,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,2,7,4,0,2,2,10,7,-1,-1,-1,-1],[0,9,1,4,8,7,2,10,3,5,6,11,-1,-1,-1,-1],[9,1,2,9,2,10,9,10,4,7,4,10,5,6,11,-1],[8,7,4,3,5,10,3,1,5,5,6,10,-1,-1,-1,-1],[5,10,1,5,6,10,1,10,0,7,4,10,0,10,4,-1],[0,9,5,0,5,6,0,6,3,10,3,6,8,7,4,-1],[6,9,5,6,10,9,4,9,7,7,9,10,-1,-1,-1,-1],[11,9,4,6,11,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,6,11,4,11,9,0,3,8,-1,-1,-1,-1,-1,-1,-1],[11,1,0,11,0,6,6,0,4,-1,-1,-1,-1,-1,-1,-1],[8,1,3,8,6,1,8,4,6,6,11,1,-1,-1,-1,-1],[1,9,4,1,4,2,2,4,6,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,9,2,2,9,4,2,4,6,-1,-1,-1,-1],[0,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,2,3,8,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1],[11,9,4,11,4,6,10,3,2,-1,-1,-1,-1,-1,-1,-1],[0,2,8,2,10,8,4,11,9,4,6,11,-1,-1,-1,-1],[3,2,10,0,6,1,0,4,6,6,11,1,-1,-1,-1,-1],[6,1,4,6,11,1,4,1,8,2,10,1,8,1,10,-1],[9,4,6,9,6,3,9,3,1,10,3,6,-1,-1,-1,-1],[8,1,10,8,0,1,10,1,6,9,4,1,6,1,4,-1],[3,6,10,3,0,6,0,4,6,-1,-1,-1,-1,-1,-1,-1],[6,8,4,10,8,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,6,11,7,11,8,8,11,9,-1,-1,-1,-1,-1,-1,-1],[0,3,7,0,7,11,0,11,9,6,11,7,-1,-1,-1,-1],[11,7,6,1,7,11,1,8,7,1,0,8,-1,-1,-1,-1],[11,7,6,11,1,7,1,3,7,-1,-1,-1,-1,-1,-1,-1],[1,6,2,1,8,6,1,9,8,8,7,6,-1,-1,-1,-1],[2,9,6,2,1,9,6,9,7,0,3,9,7,9,3,-1],[7,0,8,7,6,0,6,2,0,-1,-1,-1,-1,-1,-1,-1],[7,2,3,6,2,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,10,3,11,8,6,11,9,8,8,7,6,-1,-1,-1,-1],[2,7,0,2,10,7,0,7,9,6,11,7,9,7,11,-1],[1,0,8,1,8,7,1,7,11,6,11,7,2,10,3,-1],[10,1,2,10,7,1,11,1,6,6,1,7,-1,-1,-1,-1],[8,6,9,8,7,6,9,6,1,10,3,6,1,6,3,-1],[0,1,9,10,7,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,0,8,7,6,0,3,0,10,10,0,6,-1,-1,-1,-1],[7,6,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,9,1,8,1,3,10,6,7,-1,-1,-1,-1,-1,-1,-1],[11,2,1,6,7,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,8,0,6,7,10,-1,-1,-1,-1,-1,-1,-1],[2,0,9,2,9,11,6,7,10,-1,-1,-1,-1,-1,-1,-1],[6,7,10,2,3,11,11,3,8,11,8,9,-1,-1,-1,-1],[7,3,2,6,7,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,8,0,7,0,6,6,0,2,-1,-1,-1,-1,-1,-1,-1],[2,6,7,2,7,3,0,9,1,-1,-1,-1,-1,-1,-1,-1],[1,2,6,1,6,8,1,8,9,8,6,7,-1,-1,-1,-1],[11,6,7,11,7,1,1,7,3,-1,-1,-1,-1,-1,-1,-1],[11,6,7,1,11,7,1,7,8,1,8,0,-1,-1,-1,-1],[0,7,3,0,11,7,0,9,11,6,7,11,-1,-1,-1,-1],[7,11,6,7,8,11,8,9,11,-1,-1,-1,-1,-1,-1,-1],[6,4,8,10,6,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,6,3,6,0,0,6,4,-1,-1,-1,-1,-1,-1,-1],[8,10,6,8,6,4,9,1,0,-1,-1,-1,-1,-1,-1,-1],[9,6,4,9,3,6,9,1,3,10,6,3,-1,-1,-1,-1],[6,4,8,6,8,10,2,1,11,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,10,0,0,10,6,0,6,4,-1,-1,-1,-1],[4,8,10,4,10,6,0,9,2,2,9,11,-1,-1,-1,-1],[11,3,9,11,2,3,9,3,4,10,6,3,4,3,6,-1],[8,3,2,8,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1],[0,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,4,3,2,6,4,4,8,3,-1,-1,-1,-1],[1,4,9,1,2,4,2,6,4,-1,-1,-1,-1,-1,-1,-1],[8,3,1,8,1,6,8,6,4,6,1,11,-1,-1,-1,-1],[11,0,1,11,6,0,6,4,0,-1,-1,-1,-1,-1,-1,-1],[4,3,6,4,8,3,6,3,11,0,9,3,11,3,9,-1],[11,4,9,6,4,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,5,9,7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,5,9,10,6,7,-1,-1,-1,-1,-1,-1,-1],[5,1,0,5,0,4,7,10,6,-1,-1,-1,-1,-1,-1,-1],[10,6,7,8,4,3,3,4,5,3,5,1,-1,-1,-1,-1],[9,4,5,11,2,1,7,10,6,-1,-1,-1,-1,-1,-1,-1],[6,7,10,1,11,2,0,3,8,4,5,9,-1,-1,-1,-1],[7,10,6,5,11,4,4,11,2,4,2,0,-1,-1,-1,-1],[3,8,4,3,4,5,3,5,2,11,2,5,10,6,7,-1],[7,3,2,7,2,6,5,9,4,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,6,8,0,2,6,6,7,8,-1,-1,-1,-1],[3,2,6,3,6,7,1,0,5,5,0,4,-1,-1,-1,-1],[6,8,2,6,7,8,2,8,1,4,5,8,1,8,5,-1],[9,4,5,11,6,1,1,6,7,1,7,3,-1,-1,-1,-1],[1,11,6,1,6,7,1,7,0,8,0,7,9,4,5,-1],[4,11,0,4,5,11,0,11,3,6,7,11,3,11,7,-1],[7,11,6,7,8,11,5,11,4,4,11,8,-1,-1,-1,-1],[6,5,9,6,9,10,10,9,8,-1,-1,-1,-1,-1,-1,-1],[3,10,6,0,3,6,0,6,5,0,5,9,-1,-1,-1,-1],[0,8,10,0,10,5,0,5,1,5,10,6,-1,-1,-1,-1],[6,3,10,6,5,3,5,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,10,5,9,8,10,10,6,5,-1,-1,-1,-1],[0,3,10,0,10,6,0,6,9,5,9,6,1,11,2,-1],[10,5,8,10,6,5,8,5,0,11,2,5,0,5,2,-1],[6,3,10,6,5,3,2,3,11,11,3,5,-1,-1,-1,-1],[5,9,8,5,8,2,5,2,6,3,2,8,-1,-1,-1,-1],[9,6,5,9,0,6,0,2,6,-1,-1,-1,-1,-1,-1,-1],[1,8,5,1,0,8,5,8,6,3,2,8,6,8,2,-1],[1,6,5,2,6,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,6,3,1,11,6,3,6,8,5,9,6,8,6,9,-1],[11,0,1,11,6,0,9,0,5,5,0,6,-1,-1,-1,-1],[0,8,3,5,11,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,6,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,7,10,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,10,5,7,8,0,3,-1,-1,-1,-1,-1,-1,-1],[5,7,10,5,10,11,1,0,9,-1,-1,-1,-1,-1,-1,-1],[11,5,7,11,7,10,9,1,8,8,1,3,-1,-1,-1,-1],[10,2,1,10,1,7,7,1,5,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,7,2,1,5,7,7,10,2,-1,-1,-1,-1],[9,5,7,9,7,2,9,2,0,2,7,10,-1,-1,-1,-1],[7,2,5,7,10,2,5,2,9,3,8,2,9,2,8,-1],[2,11,5,2,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1],[8,0,2,8,2,5,8,5,7,11,5,2,-1,-1,-1,-1],[9,1,0,5,3,11,5,7,3,3,2,11,-1,-1,-1,-1],[9,2,8,9,1,2,8,2,7,11,5,2,7,2,5,-1],[1,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,7,8,0,1,7,1,5,7,-1,-1,-1,-1,-1,-1,-1],[9,3,0,9,5,3,5,7,3,-1,-1,-1,-1,-1,-1,-1],[9,7,8,5,7,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[5,4,8,5,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1],[5,4,0,5,0,10,5,10,11,10,0,3,-1,-1,-1,-1],[0,9,1,8,11,4,8,10,11,11,5,4,-1,-1,-1,-1],[11,4,10,11,5,4,10,4,3,9,1,4,3,4,1,-1],[2,1,5,2,5,8,2,8,10,4,8,5,-1,-1,-1,-1],[0,10,4,0,3,10,4,10,5,2,1,10,5,10,1,-1],[0,5,2,0,9,5,2,5,10,4,8,5,10,5,8,-1],[9,5,4,2,3,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,11,5,3,2,5,3,5,4,3,4,8,-1,-1,-1,-1],[5,2,11,5,4,2,4,0,2,-1,-1,-1,-1,-1,-1,-1],[3,2,11,3,11,5,3,5,8,4,8,5,0,9,1,-1],[5,2,11,5,4,2,1,2,9,9,2,4,-1,-1,-1,-1],[8,5,4,8,3,5,3,1,5,-1,-1,-1,-1,-1,-1,-1],[0,5,4,1,5,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,5,4,8,3,5,9,5,0,0,5,3,-1,-1,-1,-1],[9,5,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,10,4,10,9,9,10,11,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,7,9,9,7,10,9,10,11,-1,-1,-1,-1],[1,10,11,1,4,10,1,0,4,7,10,4,-1,-1,-1,-1],[3,4,1,3,8,4,1,4,11,7,10,4,11,4,10,-1],[4,7,10,9,4,10,9,10,2,9,2,1,-1,-1,-1,-1],[9,4,7,9,7,10,9,10,1,2,1,10,0,3,8,-1],[10,4,7,10,2,4,2,0,4,-1,-1,-1,-1,-1,-1,-1],[10,4,7,10,2,4,8,4,3,3,4,2,-1,-1,-1,-1],[2,11,9,2,9,7,2,7,3,7,9,4,-1,-1,-1,-1],[9,7,11,9,4,7,11,7,2,8,0,7,2,7,0,-1],[3,11,7,3,2,11,7,11,4,1,0,11,4,11,0,-1],[1,2,11,8,4,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,7,3,1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,0,1,8,8,1,7,-1,-1,-1,-1],[4,3,0,7,3,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,10,11,9,-1,-1,-1,-1,-1,-1,-1],[0,11,1,0,8,11,8,10,11,-1,-1,-1,-1,-1,-1,-1],[3,11,1,10,11,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,10,2,1,9,10,9,8,10,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,1,9,2,2,9,10,-1,-1,-1,-1],[0,10,2,8,10,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,11,9,8,-1,-1,-1,-1,-1,-1,-1],[9,2,11,0,2,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,0,8,1,1,8,11,-1,-1,-1,-1],[1,2,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,8,3,9,8,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,8,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]],_0x4ff82e=[[0,1],[1,3],[2,3],[0,2],[4,5],[5,7],[6,7],[4,6],[0,4],[1,5],[2,6],[3,7]];function _0x37e5cc(e){return _0x377458[e]}function _0x595f8e(e){return _0x4ff82e[e]}var _0x5a8f1b={getCase:_0x37e5cc,getEdge:_0x595f8e},_0x2103cd=(_0x5d520b=!0,function(e,t){var i=_0x5d520b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d520b=!1,i}),_0x245b22=_0x2103cd(void 0,(function(){return _0x245b22.toString().search("(((.+)+)+)+$").toString().constructor(_0x245b22).search("(((.+)+)+)+$")})),_0x5d520b;function _0x3aace6(){this._ids=[],this._voxelScalars=[],this._voxelGradients=[],this._voxelPts=[],this._edgeMap={},this.computeNormals=!0,this.mergePoints=!1,this.contourValue=0}_0x245b22(),_0x3aace6.prototype.getVoxelScalars=function(e,t,i,n,r,o,a,s){var l=this._ids,u=this._voxelScalars;l[0]=i*n+t*r[0]+e,l[1]=l[0]+1,l[2]=l[0]+r[0],l[3]=l[2]+1,l[4]=l[0]+n,l[5]=l[4]+1,l[6]=l[4]+r[0],l[7]=l[6]+1;for(let e=0;e<8;++e)u[e]=s[l[e]]},_0x3aace6.prototype.getVoxelPoints=function(e,t,i,n,r,o){var a=this._voxelPts;a[0]=r[0]+e*o[0],a[1]=r[1]+t*o[1],a[2]=r[2]+i*o[2],a[3]=a[0]+o[0],a[4]=a[1],a[5]=a[2],a[6]=a[0],a[7]=a[1]+o[1],a[8]=a[2],a[9]=a[3],a[10]=a[7],a[11]=a[2],a[12]=a[0],a[13]=a[1],a[14]=a[2]+o[2],a[15]=a[3],a[16]=a[1],a[17]=a[14],a[18]=a[0],a[19]=a[7],a[20]=a[14],a[21]=a[3],a[22]=a[7],a[23]=a[14]},_0x3aace6.prototype.getPointGradient=function(e,t,i,n,r,o,a,s){let l,u;0===e?(l=a[e+1+t*n[0]+i*r],u=a[e+t*n[0]+i*r],s[0]=(u-l)/o[0]):e===n[0]-1?(l=a[e+t*n[0]+i*r],u=a[e-1+t*n[0]+i*r],s[0]=(u-l)/o[0]):(l=a[e+1+t*n[0]+i*r],u=a[e-1+t*n[0]+i*r],s[0]=.5*(u-l)/o[0]),0===t?(l=a[e+(t+1)*n[0]+i*r],u=a[e+t*n[0]+i*r],s[1]=(u-l)/o[1]):t===n[1]-1?(l=a[e+t*n[0]+i*r],u=a[e+(t-1)*n[0]+i*r],s[1]=(u-l)/o[1]):(l=a[e+(t+1)*n[0]+i*r],u=a[e+(t-1)*n[0]+i*r],s[1]=.5*(u-l)/o[1]),0===i?(l=a[e+t*n[0]+(i+1)*r],u=a[e+t*n[0]+i*r],s[2]=(u-l)/o[2]):i===n[2]-1?(l=a[e+t*n[0]+i*r],u=a[e+t*n[0]+(i-1)*r],s[2]=(u-l)/o[2]):(l=a[e+t*n[0]+(i+1)*r],u=a[e+t*n[0]+(i-1)*r],s[2]=.5*(u-l)/o[2])},_0x3aace6.prototype.getVoxelGradients=function(e,t,i,n,r,o,a){var s=this._voxelGradients,l=[];this.getPointGradient(e,t,i,n,r,o,a,l),s[0]=l[0],s[1]=l[1],s[2]=l[2],this.getPointGradient(e+1,t,i,n,r,o,a,l),s[3]=l[0],s[4]=l[1],s[5]=l[2],this.getPointGradient(e,t+1,i,n,r,o,a,l),s[6]=l[0],s[7]=l[1],s[8]=l[2],this.getPointGradient(e+1,t+1,i,n,r,o,a,l),s[9]=l[0],s[10]=l[1],s[11]=l[2],this.getPointGradient(e,t,i+1,n,r,o,a,l),s[12]=l[0],s[13]=l[1],s[14]=l[2],this.getPointGradient(e+1,t,i+1,n,r,o,a,l),s[15]=l[0],s[16]=l[1],s[17]=l[2],this.getPointGradient(e,t+1,i+1,n,r,o,a,l),s[18]=l[0],s[19]=l[1],s[20]=l[2],this.getPointGradient(e+1,t+1,i+1,n,r,o,a,l),s[21]=l[0],s[22]=l[1],s[23]=l[2]},_0x3aace6.prototype.produceTriangles=function(e,t,i,n,r,o,a,s,l,u,c,h){var d,f,p=[1,2,4,8,16,32,64,128],_=[0,1,3,2,4,5,7,6],m=[],g=[],x=[];this.getVoxelScalars(t,i,n,r,o,a,s,l);for(var v=0,y=0;y<8;y++)this._voxelScalars[_[y]]>=e&&(v|=p[y]);var $=_0x5a8f1b.getCase(v);if(!($[0]<0)){this.getVoxelPoints(t,i,n,o,a,s),this.computeNormals&&this.getVoxelGradients(t,i,n,o,r,s,l);var b=new o$1p;for(y=0;$[y]>=0;y+=3){c.push(3);for(var T=0;T<3;T++){var C=_0x5a8f1b.getEdge($[y+T]);if(d=void 0,this.mergePoints&&(x[0]=this._ids[C[0]],x[1]=this._ids[C[1]],x[0]>x[1]&&(f=x[0],x[0]=x[1],x[1]=f),d=this._edgeMap[x]),void 0===d){var S=(e-this._voxelScalars[C[0]])/(this._voxelScalars[C[1]]-this._voxelScalars[C[0]]),w=this._voxelPts.slice(3*C[0],3*(C[0]+1)),E=this._voxelPts.slice(3*C[1],3*(C[1]+1));if(m[0]=w[0]+S*(E[0]-w[0]),m[1]=w[1]+S*(E[1]-w[1]),m[2]=w[2]+S*(E[2]-w[2]),d=u.length/3,u.push(m[0],m[1],m[2]),this.computeNormals){var P=this._voxelGradients.slice(3*C[0],3*(C[0]+1)),A=this._voxelGradients.slice(3*C[1],3*(C[1]+1));g[0]=P[0]+S*(A[0]-P[0]),g[1]=P[1]+S*(A[1]-P[1]),g[2]=P[2]+S*(A[2]-P[2]),o$1p.unpack(g,0,b),o$1p.equals(o$1p.ZERO,b)||o$1p.normalize(b,b),h.push(b.x,b.y,b.z)}this.mergePoints&&(x[0]=this._ids[C[0]],x[1]=this._ids[C[1]],x[0]>x[1]&&(f=x[0],x[0]=x[1],x[1]=f),this._edgeMap[x]=d)}c.push(d)}}}},_0x3aace6.prototype.compute=function(e){for(var t=e.xDimSize,i=e.yDimSize,n=e.zDimSize,r=(e.timeDimSize,[0,0,0]),o=[1/t,1/i,1/n],a=[t,i,n],s=e.array[0],l=[],u=[],c=[],h=a[0]*a[1],d=0;d<a[2]-1;++d)for(var f=0;f<a[1]-1;++f)for(var p=0;p<a[0]-1;++p)this.produceTriangles(this.contourValue,p,f,d,h,a,r,o,s,l,u,c);return{pBuffer:l,tBuffer:u,nBuffer:c}};var Wt$1="attribute vec4 aPosition;\nattribute vec4 aNormal;\nvarying vec3 vNormal;\nvarying vec3 positionEC;\nvoid main()\n{\nvNormal = aNormal.xyz;\npositionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\ngl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n",Ut$1="varying vec3 vNormal;\nvarying vec3 positionEC;\nuniform float uContourValue;\nuniform sampler2D u_colorTexture;\n#ifdef APPLY_LIGHTING\nuniform vec3 uDiffuse;\nuniform vec3 uSpecular;\nuniform vec3 uAmbient;\nuniform float uShiness;\n#endif\nvec4 getColorForValue(float tValue)\n{\nfloat texCoord = tValue;\ntexCoord = clamp(texCoord, 0.0, 1.0);\nvec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\nreturn tColor;\n}\n#ifdef APPLY_LIGHTING\nvoid applyLighting(inout vec4 tColor, vec3 normal)\n{\nvec3 diffuse = uDiffuse;\nvec3 specular = uSpecular;\nvec3 ambient = uAmbient;\nfloat shiness = uShiness;\nvec3 normalEC = normalize(czm_normal * normal);\nfloat ndot = max( dot( normalEC, czm_sunDirectionEC ), 0.0 );\nndot = ndot * 0.5 + 0.5;\ndiffuse = diffuse * ndot;\nspecular = specular * czm_getSpecular(czm_sunDirectionEC, normalize(-positionEC), normalEC, shiness);\ntColor.rgb = tColor.rgb*(diffuse + ambient) + specular;\n}\n#endif\nvoid main()\n{\nvec4 color = getColorForValue(uContourValue);\n#ifdef APPLY_LIGHTING\napplyLighting(color, vNormal);\n#endif\ngl_FragColor = color;\n}\n";function Qt$1(e){for(var t=1;t<e;)t<<=1;return t}function qt$1(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function _$9(e,t){this._context=e,this._floor=0,this._ceil=1,this._dataBounds=h$18.MAX_VALUE,this._zBounds=new o$1o(0,1),this._nSideBlockCount=0,this._nBlockLength=0,this._nLength=0,this._nWidth=0,this._nHeight=0,this._nDepth=0,this._volTextures=[],this._dWidth=0,this._dHeight=0,this._dDepth=0,this._matLocalView=void 0,this._boundingSphere=void 0,this._timeDimension=1,this._timeIndex=0,this._xSliceCommand=void 0,this._ySliceCommand=void 0,this._zSliceCommand=void 0,this._initialized=!1,this._layer=t,this._attributeLocations={},this._visibleBoundingBox=new O$y({minimum:o$1p.ZERO,maximum:new o$1p(1,1,1)}),this.m_vScale=new o$1p(1,1,1),this._volumeBoxCommand=void 0,this.marchingCubes=new _0x3aace6,this.outlineCommand=void 0,this._mode=C$13.SCENE3D}function Jt(e,t){var i=[];return i.push("Volume"),e._timeDimension>1&&i.push("TIME_ORDER"),e$2b(t._hypsometricTexture)&&i.push("HAS_COLORTABLE"),t._useGradientOpacity&&i.push("GRADIENT_OPACITY"),t._clipPlanes.length>0&&i.push("CLIP_PLANE"),t.enableLighting&&i.push("APPLY_LIGHTING"),(0!=e._visibleBoundingBox._minimum.x||0!=e._visibleBoundingBox._minimum.y||0!=e._visibleBoundingBox._minimum.z||1!=e._visibleBoundingBox._maximum.x||1!=e._visibleBoundingBox._maximum.y||1!=e._visibleBoundingBox._maximum.z)&&i.push("TEXTURECOORD_CLIP"),i}Object.defineProperties(_$9.prototype,{maxValue:{get:function(){return this._ceil}},minValue:{get:function(){return this._floor}},visibleBoundingBox:{get:function(){return this._visibleBoundingBox},set:function(e){this._visibleBoundingBox=e}}}),_$9.prototype._encodeImageData=function(e,t,i,n){for(var r=this._nLength*this._nLength*4,o=new Array(r),a=i-t,s=t,l=0;l<e.zDimSize;l++)for(var u=parseInt(l/this._nSideBlockCount)*this._nBlockLength,c=l%this._nSideBlockCount*this._nBlockLength,h=0;h<this._nBlockLength-2;h++)for(var d=0;d<this._nBlockLength-2;d++){var f=Math.min(d,e.xDimSize-1),p=Math.min(h,e.yDimSize-1),_=l*e.yDimSize*e.xDimSize+(e.yDimSize-1-p)*e.xDimSize+f,m=n[_],g=new e$29(0,0,0,0);if(-9999!=m){m<t||m>i?m=s:s=m;var x=qt$1(m=(m-t)/a);g.x=x.x,g.y=x.y,g.z=x.z,g.w=1}var v=255*g.x,y=255*g.y,$=255*g.z,b=255*g.w;o[4*(_=(u+h)*this._nLength+c+d)]=parseInt(v),o[4*_+1]=parseInt(y),o[4*_+2]=parseInt($),o[4*_+3]=parseInt(b)}return new Uint8Array(o,0,r)},_$9.prototype._loadData=function(e,t){var i=x$b.loadData(e,t);this.output=i,this._timeDimension=i.timeDimSize,this._floor=i.minValue,this._ceil=i.maxValue,this._nWidth=i.xDimSize,this._nHeight=i.yDimSize,this._nDepth=i.zDimSize;var n=i.array;this._nSideBlockCount=Math.ceil(Math.sqrt(i.zDimSize)),this._nBlockLength=Math.max(i.xDimSize,i.yDimSize)+2,this._nLength=Qt$1(this._nBlockLength*this._nSideBlockCount-2);for(var r=[],o=0;o<this._timeDimension;o++)r.push(this._encodeImageData(i,i.minValue,i.maxValue,n[o]));return r},_$9.prototype._loadVolume=function(e,t){},_$9.prototype._loadTexture=function(e){var t=e.length,i=tt$h.LINEAR,n=rt$i.LINEAR;this._layer._filterMode===k$Q.FilterMode.NEAREST&&(i=tt$h.NEAREST,n=rt$i.NEAREST);for(var r=0;r<t;r++){var o=new t$V({context:this._context,width:this._nLength,height:this._nLength,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n})});o.copyFrom({width:this._nLength,height:this._nLength,arrayBufferView:e[r]}),this._volTextures.push(o)}},_$9.prototype._computePosition=function(){var e=this._mode,t=new o$1p(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);this._matLocalView=new p$1d,this._matInverseLocalView=new p$1d;var i=[];if(e===C$13.COLUMBUS_VIEW)this._vecCenter=new o$1p(t.z,t.x,t.y),p$1d.fromTranslation(this._vecCenter,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.south),i[1]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.south),i[2]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.north),i[3]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.north),i[4]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.south),i[5]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.south),i[6]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.north),i[7]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.north);else{this._vecCenter=o$1p.fromDegrees(t.x,t.y,t.z);var n=new i$15;m$17.headingPitchRollToFixedFrame(this._vecCenter,n,t$13.WGS84,m$17.eastNorthUpToFixedFrame,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.x),i[1]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.x),i[2]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.x),i[3]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.x),i[4]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.y),i[5]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.y),i[6]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.y),i[7]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.y)}this._dWidth=o$1p.distance(i[1],i[0]),this._dHeight=o$1p.distance(i[3],i[0]),this._dDepth=o$1p.distance(i[4],i[0]),this._boundingSphere=new i$1c,p$1d.multiplyByPoint(this._matLocalView,o$1p.ZERO,this._boundingSphere.center),this._boundingSphere.radius=.5*Math.sqrt(this._dWidth*this._dWidth+this._dHeight*this._dHeight+this._dDepth*this._dDepth)},_$9.prototype._createSliceCommand=function(){this._context;var e=this._mode===C$13.COLUMBUS_VIEW,t=this.GetRealBoundTop(),i=this.GetRealBoundBottom(),n=this.GetRealBoundRight(),r=this.GetRealBoundLeft();this._dWidth,this._dHeight;var o,a,s=this._layer._layerBounds.width,l=this._layer._layerBounds.height,u=this._layer._sliceCoordinate,c=Math.min(u.x,1),h=c*s,d=(c=Math.min(u.y,1))*l,f=n-r,p=t-i;e?o=a=5:(o=Math.ceil(this._dataBounds.north-this._dataBounds.south),a=Math.ceil(this._dataBounds.east-this._dataBounds.west));for(var _=a+1,m=o+1,g=(t-i)/o,x=(n-r)/a,v=_*m,y=2*_,$=2*m,b=new Float32Array(3*y),T=new Float32Array(3*y),C=new Float32Array(3*$),S=new Float32Array(3*$),w=new Float32Array(3*v),E=new Float32Array(3*v),P=this.GetRealTop(),A=this.GetRealBottom(),L=P-A,M=(c=Math.min(u.z,1))*L,R=0,O=new o$1p,I=A+M,D=(I-A)/L,B=0;B<m;B++)for(var N=i+B*g,F=0;F<_;F++){var U=r+F*x,G=e?new o$1p(I,U,N):o$1p.fromDegrees(U,N,I);p$1d.multiplyByPoint(this._matInverseLocalView,G,O),w[3*R]=O.x,w[3*R+1]=O.y,w[3*R+2]=O.z,E[3*R]=(U-r)/f,E[3*R+1]=(N-i)/p,E[3*R+2]=D,R++}R=0;var z=(t-d-i)/p;for(F=0;F<_;F++){U=r+F*x;var V=e?new o$1p(P,U,t-d):o$1p.fromDegrees(U,t-d,P);p$1d.multiplyByPoint(this._matInverseLocalView,V,O),b[6*R]=O.x,b[6*R+1]=O.y,b[6*R+2]=O.z,T[6*R]=(U-r)/f,T[6*R+1]=z,T[6*R+2]=1;var k=e?new o$1p(this._zBounds.x,U,t-d):o$1p.fromDegrees(U,t-d,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,k,O),b[6*R+3]=O.x,b[6*R+4]=O.y,b[6*R+5]=O.z,T[6*R+3]=(U-r)/f,T[6*R+4]=z,T[6*R+5]=0,R++}R=0;var W=h/f;for(B=0;B<m;B++){N=i+B*g;var H=e?new o$1p(P,r+h,N):o$1p.fromDegrees(r+h,N,P);p$1d.multiplyByPoint(this._matInverseLocalView,H,O),C[6*R]=O.x,C[6*R+1]=O.y,C[6*R+2]=O.z,S[6*R]=W,S[6*R+1]=(N-i)/p,S[6*R+2]=1;var q=e?new o$1p(this._zBounds.x,r+h,N):o$1p.fromDegrees(r+h,N,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,q,O),C[6*R+3]=O.x,C[6*R+4]=O.y,C[6*R+5]=O.z,S[6*R+3]=W,S[6*R+4]=(N-i)/p,S[6*R+5]=0,R++}for(var j=new Uint16Array(a*o*2*3),Y=0,X=0;X<o;X++)for(var K=0;K<a;K++){var Q=K+_*X,Z=K+_*(X+1),J=K+1+_*(X+1),ee=K+1+_*X;j[Y++]=Q,j[Y++]=Z,j[Y++]=ee,j[Y++]=Z,j[Y++]=J,j[Y++]=ee}for(var te=2*o*3,ie=new Uint16Array(2*a*3),ne=new Uint16Array(te),re=0,oe=0;oe<o;oe++){Q=X=2*oe,Z=X+1,J=X+2,ee=X+3;ne[re++]=Q,ne[re++]=J,ne[re++]=Z,ne[re++]=Z,ne[re++]=J,ne[re++]=ee}var ae=0;for(oe=0;oe<a;oe++){Q=K=2*oe,Z=K+1,J=K+2,ee=K+3;ie[ae++]=Q,ie[ae++]=J,ie[ae++]=Z,ie[ae++]=Z,ie[ae++]=J,ie[ae++]=ee}var se=t$Y.createVertexBuffer({context:this._context,typedArray:C,usage:A$19.STATIC_DRAW}),le=t$Y.createVertexBuffer({context:this._context,typedArray:S,usage:A$19.STATIC_DRAW}),ue=t$Y.createVertexBuffer({context:this._context,typedArray:b,usage:A$19.STATIC_DRAW}),ce=t$Y.createVertexBuffer({context:this._context,typedArray:T,usage:A$19.STATIC_DRAW}),he=t$Y.createVertexBuffer({context:this._context,typedArray:w,usage:A$19.STATIC_DRAW}),de=t$Y.createVertexBuffer({context:this._context,typedArray:E,usage:A$19.STATIC_DRAW}),fe=[],pe=[],_e=[],me=this._attributeLocations;me.aPosition=0,fe.push({name:"aPosition",index:me.aPosition,vertexBuffer:se,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),pe.push({name:"aPosition",index:me.aPosition,vertexBuffer:ue,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),_e.push({name:"aPosition",index:me.aPosition,vertexBuffer:he,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),me.aTexCoord0=1,fe.push({name:"aTexCoord0",index:me.aTexCoord0,vertexBuffer:le,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),pe.push({name:"aTexCoord0",index:me.aTexCoord0,vertexBuffer:ce,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),_e.push({name:"aTexCoord0",index:me.aTexCoord0,vertexBuffer:de,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var ge=t$Y.createIndexBuffer({context:this._context,typedArray:ne,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),xe=t$Y.createIndexBuffer({context:this._context,typedArray:ie,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),ve=t$Y.createIndexBuffer({context:this._context,typedArray:j,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),ye=new s$U({name:"VolumeRenderingVp",sources:[Ft$1]}),$e=new s$U({name:"VolumeRenderingFp",sources:[Rt$1]});ye.defines.push("Volume"),$e.defines.push("Volume"),this._timeDimension>1&&$e.defines.push("TIME_ORDER"),this._xSliceCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$s.OPAQUE,cull:!0}),this._ySliceCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$s.OPAQUE,cull:!0}),this._zSliceCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$s.OPAQUE,cull:!0}),this._xSliceCommand.vertexArray=new c$12({context:this._context,attributes:fe,indexBuffer:ge}),this._ySliceCommand.vertexArray=new c$12({context:this._context,attributes:pe,indexBuffer:xe}),this._zSliceCommand.vertexArray=new c$12({context:this._context,attributes:_e,indexBuffer:ve}),this._xSliceCommand.shaderProgram=r$13.fromCache({context:this._context,vertexShaderSource:ye,fragmentShaderSource:$e,attributeLocations:me}),this._ySliceCommand.shaderProgram=this._xSliceCommand.shaderProgram,this._zSliceCommand.shaderProgram=this._xSliceCommand.shaderProgram,this._xSliceCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:{enabled:!0}}),this._ySliceCommand.renderState=this._xSliceCommand.renderState,this._zSliceCommand.renderState=this._xSliceCommand.renderState},_$9.prototype._createContourCommand=function(e,t,i){var n=this._context,r=this._layer,o=e.length;if(!(o<3)){for(var a=new Float32Array(o),s=new Float32Array(i),l=this._dataBounds.west,u=this._dataBounds.south,c=this._zBounds.x,h=this._dataBounds.width,d=this._dataBounds.height,f=this._zBounds.y-this._zBounds.x,p=new o$1p,_=this._mode===C$13.COLUMBUS_VIEW,m=0;m<o;m+=3){var g=l+h*e[m],x=u+d*e[m+1],v=c+f*e[m+2],y=_?new o$1p(v,g,x):o$1p.fromDegrees(g,x,v);p$1d.multiplyByPoint(this._matInverseLocalView,y,p),a[m]=p.x,a[m+1]=p.y,a[m+2]=p.z}var $=t$Y.createVertexBuffer({context:this._context,typedArray:a,usage:A$19.STATIC_DRAW}),b=t$Y.createVertexBuffer({context:this._context,typedArray:s,usage:A$19.STATIC_DRAW}),T=[],C={aPosition:0};T.push({name:"aPosition",index:C.aPosition,vertexBuffer:$,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),C.aNormal=1,T.push({name:"aNormal",index:C.aNormal,vertexBuffer:b,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var S=new s$U({name:"VolumeContourVS",sources:[Wt$1]}),w=new s$U({name:"VolumeContourFS",sources:[Ut$1]});S.defines.push("Volume"),w.defines.push("Volume"),r.enableLighting&&w.defines.push("APPLY_LIGHTING"),this._contourCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$s.OPAQUE,count:o/3,cull:!0}),this._contourCommand.vertexArray=new c$12({context:this._context,attributes:T}),this._contourCommand.shaderProgram=r$13.fromCache({context:this._context,vertexShaderSource:S,fragmentShaderSource:w,attributeLocations:C}),this._contourCommand.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var E=this,P={u_colorTexture:function(){return e$2b(r._colorTexture)?r._colorTexture:n.defaultTexture},uVolumeTexture:function(){return E._volTextures[0]},width:function(){return E._nWidth},height:function(){return E._nHeight},depth:function(){return E._nDepth},sideBlockCount:function(){return E._nSideBlockCount},blockLength:function(){return E._nBlockLength},texLength:function(){return E._nLength},uFilterMode:function(){return r._filterMode},uContourValue:function(){return(r.contourValue-r.minValue)/(r.maxValue-r.minValue)},uDiffuse:function(){return r.material.diffuse},uAmbient:function(){return r.material.ambient},uSpecular:function(){return r.material.specular},uShiness:function(){return r.material.shiness}};this._contourCommand.uniformMap=P}},_$9.prototype.GetRealTop=function(){return this._zBounds.x+(this._zBounds.y-this._zBounds.x)*this._layer.scale.z},_$9.prototype.GetRealBottom=function(){return this._zBounds.x},_$9.prototype.GetRealBoundLeft=function(){return.5*(this._dataBounds.east+this._dataBounds.west)-.5*(this._dataBounds.east-this._dataBounds.west)*this._layer.scale.x},_$9.prototype.GetRealBoundRight=function(){return.5*(this._dataBounds.east+this._dataBounds.west)+.5*(this._dataBounds.east-this._dataBounds.west)*this._layer.scale.x},_$9.prototype.GetRealBoundTop=function(){return.5*(this._dataBounds.north+this._dataBounds.south)+.5*(this._dataBounds.north-this._dataBounds.south)*this._layer.scale.y},_$9.prototype.GetRealBoundBottom=function(){return.5*(this._dataBounds.north+this._dataBounds.south)-.5*(this._dataBounds.north-this._dataBounds.south)*this._layer.scale.y};var Xe$1=new o$1p;_$9.prototype._createVolumeBoxDrawCommand=function(e){this._context,new o$1p(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);var t,i,n=this._mode===C$13.COLUMBUS_VIEW,r=this.GetRealBoundTop(),o=this.GetRealBoundBottom(),a=this.GetRealBoundRight(),s=this.GetRealBoundLeft(),l=a-s,u=r-o;n?t=i=5:(t=Math.ceil(this._dataBounds.north-this._dataBounds.south),i=Math.ceil(this._dataBounds.east-this._dataBounds.west));for(var c=i+1,h=t+1,d=(r-o)/t,f=(a-s)/i,p=c*h,_=2*c,m=2*h,g=new Float32Array(3*_),x=new Float32Array(3*_),v=new Float32Array(3*_),y=new Float32Array(3*_),$=new Float32Array(3*m),b=new Float32Array(3*m),T=new Float32Array(3*m),C=new Float32Array(3*m),S=new Float32Array(3*p),w=new Float32Array(3*p),E=new Float32Array(3*p),P=new Float32Array(3*p),A=this.GetRealTop(),L=0,M=new o$1p,R=0;R<h;R++)for(var O=o+R*d,I=0;I<c;I++){var D=s+I*f,B=n?new o$1p(A,D,O):o$1p.fromDegrees(D,O,A);p$1d.multiplyByPoint(this._matInverseLocalView,B,M),S[3*L]=M.x,S[3*L+1]=M.y,S[3*L+2]=M.z,w[3*L]=(D-s)/l,w[3*L+1]=(O-o)/u,w[3*L+2]=1;var N=n?new o$1p(this._zBounds.x,D,O):o$1p.fromDegrees(D,O,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,N,M),E[3*L]=M.x,E[3*L+1]=M.y,E[3*L+2]=M.z,P[3*L]=(D-s)/l,P[3*L+1]=(O-o)/u,P[3*L+2]=0,L++}L=0;for(I=0;I<c;I++){D=s+I*f;var F=n?new o$1p(A,D,r):o$1p.fromDegrees(D,r,A);p$1d.multiplyByPoint(this._matInverseLocalView,F,M),g[6*L]=M.x,g[6*L+1]=M.y,g[6*L+2]=M.z,x[6*L]=(D-s)/l,x[6*L+1]=1,x[6*L+2]=1;var U=n?new o$1p(this._zBounds.x,D,r):o$1p.fromDegrees(D,r,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,U,M),g[6*L+3]=M.x,g[6*L+4]=M.y,g[6*L+5]=M.z,x[6*L+3]=(D-s)/l,x[6*L+4]=1,x[6*L+5]=0;var G=n?new o$1p(A,D,o):o$1p.fromDegrees(D,o,A);p$1d.multiplyByPoint(this._matInverseLocalView,G,M),v[6*L]=M.x,v[6*L+1]=M.y,v[6*L+2]=M.z,y[6*L]=(D-s)/l,y[6*L+1]=0,y[6*L+2]=1;var z=n?new o$1p(this._zBounds.x,D,o):o$1p.fromDegrees(D,o,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,z,M),v[6*L+3]=M.x,v[6*L+4]=M.y,v[6*L+5]=M.z,y[6*L+3]=(D-s)/l,y[6*L+4]=0,y[6*L+5]=0,L++}L=0;for(R=0;R<h;R++){O=o+R*d;var V=n?new o$1p(A,s,O):o$1p.fromDegrees(s,O,A);p$1d.multiplyByPoint(this._matInverseLocalView,V,M),$[6*L]=M.x,$[6*L+1]=M.y,$[6*L+2]=M.z,b[6*L]=0,b[6*L+1]=(O-o)/u,b[6*L+2]=1;var k=n?new o$1p(this._zBounds.x,s,O):o$1p.fromDegrees(s,O,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,k,M),$[6*L+3]=M.x,$[6*L+4]=M.y,$[6*L+5]=M.z,b[6*L+3]=0,b[6*L+4]=(O-o)/u,b[6*L+5]=0;var W=n?new o$1p(A,a,O):o$1p.fromDegrees(a,O,A);p$1d.multiplyByPoint(this._matInverseLocalView,W,M),T[6*L]=M.x,T[6*L+1]=M.y,T[6*L+2]=M.z,C[6*L]=1,C[6*L+1]=(O-o)/u,C[6*L+2]=1;var H=n?new o$1p(this._zBounds.x,a,O):o$1p.fromDegrees(a,O,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,H,M),T[6*L+3]=M.x,T[6*L+4]=M.y,T[6*L+5]=M.z,C[6*L+3]=1,C[6*L+4]=(O-o)/u,C[6*L+5]=0,L++}for(var q=i*t*2*3,j=new Uint16Array(q),Y=new Uint16Array(q),X=0,K=0,Q=0;Q<t;Q++)for(var Z=0;Z<i;Z++){var J=Z+c*Q,ee=Z+c*(Q+1),te=Z+1+c*(Q+1),ie=Z+1+c*Q;j[X++]=ie,j[X++]=ee,j[X++]=J,j[X++]=ie,j[X++]=te,j[X++]=ee,Y[K++]=J,Y[K++]=ee,Y[K++]=ie,Y[K++]=ee,Y[K++]=te,Y[K++]=ie}for(var ne=2*i*3,re=2*t*3,oe=new Uint16Array(ne),ae=new Uint16Array(ne),se=new Uint16Array(re),le=new Uint16Array(re),ue=0,ce=0,he=0;he<t;he++){J=Q=2*he,ee=Q+1,te=Q+2,ie=Q+3;se[ue++]=J,se[ue++]=te,se[ue++]=ee,se[ue++]=ee,se[ue++]=te,se[ue++]=ie,le[ce++]=ee,le[ce++]=te,le[ce++]=J,le[ce++]=ie,le[ce++]=te,le[ce++]=ee}var de=0,fe=0;for(he=0;he<i;he++){J=Z=2*he,ee=Z+1,te=Z+2,ie=Z+3;oe[de++]=J,oe[de++]=te,oe[de++]=ee,oe[de++]=ee,oe[de++]=te,oe[de++]=ie,ae[fe++]=ee,ae[fe++]=te,ae[fe++]=J,ae[fe++]=ie,ae[fe++]=te,ae[fe++]=ee}var pe=2*p+2*_+2*m,_e=new Float32Array(3*pe),me=new Float32Array(3*pe),ge=new Uint16Array(2*q+2*re+2*ne),xe=[],ve=[],ye=[];xe.push(g),xe.push(v),xe.push($),xe.push(T),xe.push(S),xe.push(E),ve.push(x),ve.push(y),ve.push(b),ve.push(C),ve.push(w),ve.push(P),ye.push(oe),ye.push(ae),ye.push(se),ye.push(le),ye.push(j),ye.push(Y);for(var $e=xe.length,be=0,Te=0,Ce=0,Se=0,we=0;we<$e;we++){for(var Ee=xe[we],Pe=ve[we],Ae=ye[we],Le=0;Le<Ee.length;Le++)_e[Te++]=Ee[Le],me[Ce++]=Pe[Le];for(Le=0;Le<Ae.length;Le++)ge[Se++]=Ae[Le]+be;be+=Ee.length/3}var Me=t$Y.createVertexBuffer({context:this._context,typedArray:_e,usage:A$19.STATIC_DRAW}),Re=t$Y.createVertexBuffer({context:this._context,typedArray:me,usage:A$19.STATIC_DRAW}),Oe=[],Ie={aPosition:0};Oe.push({name:"aPosition",index:Ie.aPosition,vertexBuffer:Me,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),Ie.aTexCoord0=1,Oe.push({name:"aTexCoord0",index:Ie.aTexCoord0,vertexBuffer:Re,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var De=t$Y.createIndexBuffer({context:this._context,typedArray:ge,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT}),Be=new s$U({name:"VolumeBoxVp",sources:[Mt$1]}),Ne=new s$U({name:"VolumeBoxFp",sources:[Nt$1]}),Fe=Jt(this,e);Be.defines=Fe,Ne.defines=Fe,this._volumeBoxCommand=new i$_({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$s.OPAQUE,cull:!0}),this._volumeBoxCommand.vertexArray=new c$12({context:this._context,attributes:Oe,indexBuffer:De}),this._volumeBoxCommand.shaderProgram=r$13.fromCache({context:this._context,vertexShaderSource:Be,fragmentShaderSource:Ne,attributeLocations:Ie}),this._volumeBoxCommand.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},depthMask:{enabled:!0},blending:Ee$r.ALPHA_BLEND})};for(var Ze=new o$1p,Me$4=new e$29,Ne=new e$29,Ie$1=[],pt$1=0;pt$1<6;pt$1++)Ie$1.push(new e$29);function xt$1(e,t){var i=!1,n=t.split(" ");if(n.length>1){var r=n[0],o=n[1];for(var a in e.defines)if(-1!==e.defines[a].indexOf(r))return void(e.defines[a]=r+" "+o)}else{for(var a in e.defines)if(e.defines[a]===t){i=!0;break}i||e.defines.push(t)}}function Bt$2(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function $$5(e){e$2b(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}function o$a(e,t){_$9.call(this,e,t),this._orientedBoundingBox=void 0,this._level=0,this._x=0,this._y=0,this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._isVisible=!1,this._disFromCamera=0,this._rangeList=256,this._isLessLodDis=!1,this._pix=0,this._s3mLoadState=N$P.UNLOAD,this._isRootTile=!1,this._rootTile=void 0,this._maxValue=void 0,this._minValue=void 0,this._multiTextures=[]}function G$7(e){for(var t=1;t<e;)t<<=1;return t}function H$7(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function q$5(e,t,i){var n=i.radius,r=i.center,o=o$1p.distance(e.positionWC,r);e._mode===C$13.SCENE2D&&(o=e.positionCartographic.height);var a=t.drawingBufferHeight,s=.5*e$2a.PI_OVER_FOUR,l=.5*a/Math.tan(s)*n/o;return Math.ceil(l)}_$9.prototype._createOutlineCommand=function(e){var t=new i$p(this._dWidth,this._dHeight,this._dDepth),i=(this._zBounds.y-this._zBounds.x)/2,n=o$1p.fromArray([0,0,i]),r=p$1d.fromTranslation(n),o=new p$1d;p$1d.multiply(this._matLocalView,r,o);var a=new i$_({primitiveType:W$18.LINES,modelMatrix:o,boundingVolume:this._boundingSphere,pass:Le$s.OPAQUE,cull:!0,owner:e});a.vertexArray=t.getOutlineVertexArray(this._context),a.shaderProgram=r$13.fromCache({name:"VoxelGridTileOutline",context:this._context,vertexShaderSource:Ht$7,fragmentShaderSource:Yt$8,attributeLocations:{aPosition:0}}),a.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0}}),e._outlineCommand=a,this._outlineCommand=a},_$9.prototype._createUniformMap=function(e){var t=this,i={width:function(){return t._nWidth},height:function(){return t._nHeight},depth:function(){return t._nDepth},sideBlockCount:function(){return t._nSideBlockCount},blockLength:function(){return t._nBlockLength},texLength:function(){return t._nLength},u_maxVisibleTextureCoord:function(){return t._visibleBoundingBox._maximum},u_minVisibleTextureCoord:function(){return t._visibleBoundingBox._minimum},u_minMaxValueAndFiltration:function(){return Me$4.x=t._floor,Me$4.y=t._ceil,Me$4.z=e._minFiltration,Me$4.w=e._maxFiltration,Me$4},uVolumeTexture:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return t._volTextures[i]},uNextVolumeTexture:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,t._volTextures[i]},uTimeRatio:function(){return e._timeRatio},u_colorTable:function(){return e$2b(e._hypsometricTexture)?e._hypsometricTexture:t._context.defaultTexture},u_volumeBoxSize:function(){return Ze.x=t._dWidth,Ze.y=t._dHeight,Ze.z=t._dDepth,Ze},uFilterMode:function(){return e._filterMode},u_opacityTexture:function(){return e$2b(e._opacityTexture)?e._opacityTexture:t._context.defaultTexture},u_colorTexture:function(){return e$2b(e._colorTexture)?e._colorTexture:t._context.defaultTexture},u_jitterTexture:function(){return e$2b(t._jitterTexture)?t._jitterTexture:t._context.defaultTexture},u_gradientOpacityInfo:function(){if(e._useGradientOpacity){var t=e._gradientOpacityMinOpacity,i=e._gradientOpacityMaxOpacity,n=[e._gradientOpacityMinValue,e._gradientOpacityMaxValue],r=(i-t)/(n[1]-n[0]),o=-n[0]*(i-t)/(n[1]-n[0])+t;Ne.x=t,Ne.y=i,Ne.z=r,Ne.w=o}return Ne},u_clip_planes:function(){for(var t=e._clipPlanes.length,i=0;i<t;i++)Ie$1[i].x=e._clipPlanes[i].normal.x,Ie$1[i].y=e._clipPlanes[i].normal.y,Ie$1[i].z=e._clipPlanes[i].normal.z,Ie$1[i].w=e._clipPlanes[i].distance;return Ie$1},u_clip_planes_count:function(){return e._clipPlanes.length},uDiffuse:function(){return e.material.diffuse},uAmbient:function(){return e.material.ambient},uSpecular:function(){return e.material.specular},uShiness:function(){return e.material.shiness}},n={uOffset:function(){return new o$1p(e._sliceCoordinate.x,0,0)}},r={uOffset:function(){return new o$1p(0,e._sliceCoordinate.y,0)}},o={uOffset:function(){return new o$1p(0,0,e._sliceCoordinate.z)}};if(e$2b(this._xSliceCommand)&&(this._xSliceCommand.uniformMap=p$19(i,n),this._ySliceCommand.uniformMap=p$19(i,r),this._zSliceCommand.uniformMap=p$19(i,o)),e$2b(this._volumeBoxCommand)){var a={u_camTexCoord:function(){var e,i,n=t.frameState.camera.positionCartographic;if(t._mode===C$13.COLUMBUS_VIEW){var r=a$18.toCartesian(n),o=m$17.convertToColumbusCartesian(r);i=o.y,e=o.z}else i=e$2a.toDegrees(n.longitude),e=e$2a.toDegrees(n.latitude);var a=n.height,s=t.GetRealTop()-t._zBounds.x,l=t.GetRealBoundLeft(),u=t.GetRealBoundRight(),c=t.GetRealBoundBottom(),h=t.GetRealBoundTop();return Xe$1.x=(i-l)/(u-l),Xe$1.y=(e-c)/(h-c),Xe$1.z=(a-t._zBounds.x)/s,Xe$1},u_sampleDistance:function(){return t._layer._sampleDistance||.005}};this._volumeBoxCommand.uniformMap=p$19(i,a)}if(e$2b(this._outlineCommand)){var s={uDiffuseColor:function(){return e._outlineColor}};this._outlineCommand.uniformMap=p$19(i,s)}},_$9.prototype._initJitterTexture=function(){if(!e$2b(this._jitterTexture)){for(var e=new Uint8Array(1024),t=0;t<1024;++t)e[t]=255*Math.random();this._jitterTexture=new t$V({context:this._context,width:32,height:32,pixelFormat:this._context.webgpu||this._context.webgl2?V$10.RED:V$10.LUMINANCE,pixelDatatype:_$$.UNSIGNED_BYTE,flipY:!1}),this._jitterTexture.copyFrom({width:32,height:32,arrayBufferView:e})}},_$9.prototype._initialize=function(e,t,i){if(this.frameState=t,this._mode=t.mode,this._initialized){for(var n=this._volTextures.length,r=0;r<n;r++)this._volTextures[r].destroy();this._volTextures=[],e$2b(this._volumeBoxCommand)&&($$5(this._volumeBoxCommand),this._volumeBoxCommand=void 0),e$2b(this._outlineCommand)&&($$5(this._outlineCommand),this._outlineCommand=void 0),this._initialized=!1}this._initJitterTexture(),this._loadTexture(i),this._computePosition(),this._createVolumeBoxDrawCommand(e),this._createOutlineCommand(e),this._createSliceCommand(),this._createUniformMap(e),this._initialized=!0},_$9.prototype.update=function(e,t){if(this._mode=t.mode,(e._scaleDirty||e._sliceCoordDirty)&&(e._scaleDirty&&($$5(this._volumeBoxCommand),this._volumeBoxCommand=void 0),$$5(this._xSliceCommand),this._xSliceCommand=void 0,$$5(this._ySliceCommand),this._ySliceCommand=void 0,$$5(this._zSliceCommand),this._zSliceCommand=void 0,$$5(this._outlineCommand),this._outlineCommand=void 0,this._createVolumeBoxDrawCommand(e),this._createOutlineCommand(e),this._createSliceCommand(),this._createUniformMap(e),e._scaleDirty=!1,e._sliceCoordDirty=!1),e._contourValueDirty){if($$5(this._contourCommand),this._contourCommand=void 0,this.marchingCubes.contourValue=e.contourValue,e$2b(this.output)){var i=this.marchingCubes.compute(this.output);this._createContourCommand(i.pBuffer,i.tBuffer,i.nBuffer)}e._contourValueDirty=!1}e._volumeRenderMode===gt$1.Slice?(e$2b(this._xSliceCommand)&&t.commandList.push(this._xSliceCommand),e$2b(this._ySliceCommand)&&t.commandList.push(this._ySliceCommand),e$2b(this._zSliceCommand)&&t.commandList.push(this._zSliceCommand)):e._volumeRenderMode===gt$1.VolumeRendering?(e$2b(this._volumeBoxCommand)&&e._fillStyle!==fr$2.WireFrame&&t.commandList.push(this._volumeBoxCommand),e$2b(this._outlineCommand)&&e._fillStyle!==fr$2.Fill&&t.commandList.push(this._outlineCommand)):e._volumeRenderMode===gt$1.ContourValue&&e$2b(this._contourCommand)&&t.commandList.push(this._contourCommand),this.updateTimeDimension(e)},_$9.prototype.updateTimeDimension=function(e){this._timeDimension>1?(e._timeIndexChange&&this._timeIndex++,this._timeIndex==this._timeDimension&&(this._timeIndex=0)):this._timeIndex=0},_$9.prototype._setDataBounds=function(e){this._dataBounds=e},_$9.prototype._useGradientOpacityChanged=function(e){e?this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"GRADIENT_OPACITY"):this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"GRADIENT_OPACITY")},_$9.prototype._enableLightingChange=function(e){e?(this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"APPLY_LIGHTING"),this._appendProgramDefineForCommand(this._contourCommand,!1,!0,"APPLY_LIGHTING")):(this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"APPLY_LIGHTING"),this._removeProgramDefineForCommand(this._contourCommand,!1,!0,"APPLY_LIGHTING"))},_$9.prototype._clipPlaneChanged=function(e){e._clipPlanes.length>0?this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"CLIP_PLANE"):this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"CLIP_PLANE")},_$9.prototype._setZBounds=function(e){this._zBounds=e},_$9.prototype._appendProgramDefineForCommand=function(e,t,i,n){if(e$2b(e)){var r=this._context,o=e.shaderProgram.fragmentShaderSource,a=e.shaderProgram.vertexShaderSource;t&&xt$1(a,n),i&&xt$1(o,n),e.shaderProgram.destroy(),e.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}},_$9.prototype._removeProgramDefineForCommand=function(e,t,i,n){if(e$2b(e)){var r=this._context,o=e.shaderProgram.fragmentShaderSource,a=e.shaderProgram.vertexShaderSource;t&&Bt$2(a,n),i&&Bt$2(o,n),e.shaderProgram.destroy(),e.shaderProgram=r$13.fromCache({context:r,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}},_$9.prototype.isDestroyed=function(){return!1},_$9.prototype.destroy=function(){for(var e=this._volTextures.length,t=0;t<e;t++)this._volTextures[t].destroy();return e$2b(this._volumeBoxCommand)&&($$5(this._volumeBoxCommand),this._volumeBoxCommand=void 0),e$2b(this._outlineCommand)&&($$5(this._outlineCommand),this._outlineCommand=void 0),e$2b(this._xSliceCommand)&&($$5(this._xSliceCommand),this._xSliceCommand=void 0),e$2b(this._ySliceCommand)&&($$5(this._ySliceCommand),this._ySliceCommand=void 0),e$2b(this._zSliceCommand)&&($$5(this._zSliceCommand),this._zSliceCommand=void 0),e$2b(this._contourCommand)&&($$5(this._contourCommand),this._contourCommand=void 0),e$2b(this._jitterTexture)&&this._jitterTexture.destroy(),this.output=void 0,this.marchingCubes=void 0,i$10(this)},o$a.prototype=new _$9,o$a.prototype.constructor=o$a,o$a.prototype.parent=_$9.prototype,Object.defineProperties(o$a.prototype,{}),o$a.prototype._encodeImageData=function(e,t,i,n){for(var r=this._nLength*this._nLength*4,o=new Array(r),a=i-t,s=t,l=0;l<e.zDimSize;l++)for(var u=parseInt(l/this._nSideBlockCount)*this._nBlockLength,c=l%this._nSideBlockCount*this._nBlockLength,h=-1;h<this._nBlockLength-1;h++)for(var d=-1;d<this._nBlockLength-1;d++){var f=Math.min(d,e.xValidSize-1),p=Math.min(h,e.yValidSize-1);f=Math.max(0,f),p=Math.max(0,p);var _=l*e.yDimSize*e.xDimSize+(e.yValidSize-1-p)*e.xDimSize+f;if(!(_<0)){var m=n[_],g=new e$29(0,0,0,0);if(-9999!=m){m<t||m>i?m=s:s=m;var x=H$7(m=(m-t)/a);g.x=x.x,g.y=x.y,g.z=x.z,g.w=1}var v=255*g.x,y=255*g.y,$=255*g.z,b=255*g.w;o[4*(_=(u+h)*this._nLength+c+d)]=parseInt(v),o[4*_+1]=parseInt(y),o[4*_+2]=parseInt($),o[4*_+3]=parseInt(b)}}return new Uint8Array(o,0,r)},o$a.prototype._loadVolume=function(e,t){this._maxValue=t.maxValue,this._minValue=t.minValue,this._timeDimension=t.time,this._ceil=t.maxValue,this._floor=t.minValue,this._nWidth=t.xValidSize,this._nHeight=t.yValidSize,this._nDepth=t.zValidSize;var i=e.slice(36,e.byteLength),n=4*t.xDimSize*t.yDimSize*t.zDimSize;this._nSideBlockCount=Math.ceil(Math.sqrt(t.zDimSize)),this._nBlockLength=Math.max(t.xDimSize,t.yDimSize)+2,this._nLength=G$7(this._nBlockLength*this._nSideBlockCount-2);t.xValidSize,t.yValidSize,t.zValidSize;for(var r=[],o=0;o<this._timeDimension;o++){var a=new Float32Array(i.slice(o*n,(o+1)*n));r.push(this._encodeImageData(t,t.minValue,t.maxValue,a))}return r},o$a.prototype.updateTimeDimension=function(e){this._isRootTile?this._timeDimension>1?(e._timeIndexChange&&this._timeIndex++,this._timeIndex==this._timeDimension&&(this._timeIndex=0)):this._timeIndex=0:this._timeIndex=this._rootTile._timeIndex},o$a.prototype._computePosition=function(){var e=this._mode,t=new o$1p(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);this._matLocalView=new p$1d,this._matInverseLocalView=new p$1d;var i=[];if(e===C$13.COLUMBUS_VIEW)this._vecCenter=new o$1p(t.z,t.x,t.y),p$1d.fromTranslation(this._vecCenter,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.south),i[1]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.south),i[2]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.north),i[3]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.north),i[4]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.south),i[5]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.south),i[6]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.north),i[7]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.north);else{this._vecCenter=o$1p.fromDegrees(t.x,t.y,t.z);var n=new i$15;m$17.headingPitchRollToFixedFrame(this._vecCenter,n,t$13.WGS84,m$17.eastNorthUpToFixedFrame,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.x),i[1]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.x),i[2]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.x),i[3]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.x),i[4]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.y),i[5]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.y),i[6]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.y),i[7]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.y)}this._dWidth=o$1p.distance(i[1],i[0]),this._dHeight=o$1p.distance(i[3],i[0]),this._dDepth=o$1p.distance(i[4],i[0]),this._orientedBoundingBox=y$Z.fromPoints(i,this._orientedBoundingBox),this._boundingSphere=new i$1c,p$1d.multiplyByPoint(this._matLocalView,o$1p.ZERO,this._boundingSphere.center),this._boundingSphere.radius=.5*Math.sqrt(this._dWidth*this._dWidth+this._dHeight*this._dHeight+this._dDepth*this._dDepth)},o$a.prototype.calcPixFromCam=function(e,t,i){if(this._boundingSphere){var n=e.positionWC,r=o$1p.clone(this._boundingSphere.center),o=o$1p.distance(r,n);e._mode==C$13.SCENE2D&&(o=e.positionCartographic.height),this._disFromCamera=o-this._boundingSphere.radius;var a;a=2*q$5(e,t,this._boundingSphere),this._isLessLodDis=a<=this._rangeList*i,this._pix=a}},o$a.prototype.load=function(e){var t,i,n=this._s3mLoadState,r=this;N$P.UNLOAD===n&&(r._s3mLoadState=N$P.LOADING,t=r._x<10?"000"+r._x:r._x<100?"00"+r._x:r._x<1e3?"0"+r._x:r._x,i=r._y<10?"000"+r._y:r._y<100?"00"+r._y:r._y<1e3?"0"+r._y:r._y,o$1l(o$10(e._url+"/"+r._level+"/"+i+"/"+t+"/"+i+"_"+t+".vol"),(function(e){r._s3mLoadState=N$P.LOADED,r._arrayBuffer=e})).otherwise((function(e){throw new DeveloperError("Not a valid NetCDF file!")})))};var C$7=new p$1d;o$a.prototype._createUniformMap=function(e){this.parent._createUniformMap.call(this,e);var t=this,i={uMultiResolutionPara1:function(){return e$2b(t._multiTextures[0])?t._multiTextures[0].multiResolutionPara:C$7},uMultiResolutionPara2:function(){return e$2b(t._multiTextures[1])?t._multiTextures[1].multiResolutionPara:C$7},uMultiResolutionPara3:function(){return e$2b(t._multiTextures[2])?t._multiTextures[2].multiResolutionPara:C$7},uVolumeTexture1:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return e$2b(t._multiTextures[0])?t._multiTextures[0]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture1:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,e$2b(t._multiTextures[0])?t._multiTextures[0]._volTextures[i]:t._volTextures[i]},uVolumeTexture2:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return e$2b(t._multiTextures[1])?t._multiTextures[1]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture2:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,e$2b(t._multiTextures[1])?t._multiTextures[1]._volTextures[i]:t._volTextures[i]},uVolumeTexture3:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return e$2b(t._multiTextures[2])?t._multiTextures[2]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture3:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,e$2b(t._multiTextures[2])?t._multiTextures[2]._volTextures[i]:t._volTextures[i]}};e$2b(this._xSliceCommand)&&(this._xSliceCommand.uniformMap=p$19(i,this._xSliceCommand.uniformMap),this._ySliceCommand.uniformMap=p$19(i,this._ySliceCommand.uniformMap),this._zSliceCommand.uniformMap=p$19(i,this._zSliceCommand.uniformMap)),e$2b(this._volumeBoxCommand)&&(this._volumeBoxCommand.uniformMap=p$19(i,this._volumeBoxCommand.uniformMap)),e$2b(this._outlineCommand)&&(this._outlineCommand.uniformMap=p$19(i,this._outlineCommand.uniformMap))},o$a.prototype._createShaderPreDefines=function(e,t){var i=this.parent._createShaderPreDefines.call(this,e,t);return i.push("MultiResolution"),i};var _0x3684a0=(_0x371d61=!0,function(e,t){var i=_0x371d61?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x371d61=!1,i}),_0x513b17=_0x3684a0(void 0,(function(){return _0x513b17.toString().search("(((.+)+)+)+$").toString().constructor(_0x513b17).search("(((.+)+)+)+$")})),_0x371d61;function _0x52c5cf(){this.model={clamping:!0,allowDuplicateScalars:!1,range:[0,0]},this.model.nodes=[]}_0x513b17(),_0x52c5cf.prototype.getSize=function(){return this.model.nodes.length},_0x52c5cf.prototype.getType=function(){var e,t=0,i=0;this.model.nodes.length>0&&(t=this.model.nodes[0].y);for(var n=1;n<this.model.nodes.length;n++){if((e=this.model.nodes[n].y)!==t)if(e>t)switch(i){case 0:case 1:i=1;break;default:i=3}else switch(i){case 0:case 2:i=2;break;default:i=3}if(t=e,3===i)break}switch(i){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:return"Varied"}},_0x52c5cf.prototype.getDataPointer=function(){var e=this.model.nodes.length;if(this.model.function=null,e>0){this.model.function=[];for(var t=0;t<e;t++)this.model.function[2*t]=this.model.nodes[t].x,this.model.function[2*t+1]=this.model.nodes[t].y}return this.model.function},_0x52c5cf.prototype.getFirstNonZeroValue=function(){if(0===this.model.nodes.length)return 0;for(var e=1,t=0;t<this.model.nodes.length;t++)if(0!==this.model.nodes[t].y){e=0;break}return e?Number.MAX_VALUE:t>0?this.model.nodes[t-1].x:this.model.clamping?-Number.MAX_VALUE:this.model.nodes[0].x},_0x52c5cf.prototype.getNodeValue=function(e,t){var i=this.model.nodes.length;return e<0||e>=i?-1:(t[0]=this.model.nodes[e].x,t[1]=this.model.nodes[e].y,t[2]=this.model.nodes[e].midpoint,t[3]=this.model.nodes[e].sharpness,1)},_0x52c5cf.prototype.setNodeValue=function(e,t){var i=this.model.nodes.length;if(e<0||e>=i)return-1;var n=this.model.nodes[e].x;return this.model.nodes[e].x=t[0],this.model.nodes[e].y=t[1],this.model.nodes[e].midpoint=t[2],this.model.nodes[e].sharpness=t[3],n!==t[0]?this.sortAndUpdateRange():this.modified(),1},_0x52c5cf.prototype.addPoint=function(e,t){this.addPointLong(e,t,.5,0)},_0x52c5cf.prototype.addPointLong=function(e,t,i,n){if(i<0||i>1||n<0||n>1)return-1;this.model.allowDuplicateScalars||this.removePoint(e);var r,o={x:e,y:t,midpoint:i,sharpness:n};for(this.model.nodes.push(o),this.sortAndUpdateRange(),r=0;r<this.model.nodes.length&&this.model.nodes[r].x!==e;r++);return r<this.model.nodes.length?r:-1},_0x52c5cf.prototype.setNodes=function(e){this.model.nodes!==e&&(this.model.nodes=e,this.sortAndUpdateRange())},_0x52c5cf.prototype.getRange=function(){return this.model.range},_0x52c5cf.prototype.updateRange=function(){var e=this.model.range.slice(),t=this.model.nodes.length;return t?(this.model.range[0]=this.model.nodes[0].x,this.model.range[1]=this.model.nodes[t-1].x):(this.model.range[0]=0,this.model.range[1]=0),(e[0]!==this.model.range[0]||e[1]!==this.model.range[1])&&(this.modified(),!0)},_0x52c5cf.prototype.sortAndUpdateRange=function(e){this.model.nodes.sort((function(e,t){return e.x-t.x})),this.updateRange()||this.modified()},_0x52c5cf.prototype.removePoint=function(e){var t;for(t=0;t<this.model.nodes.length&&this.model.nodes[t].x!==e;t++);if(t>=this.model.nodes.length)return-1;var i=t,n=!1;return this.model.nodes.splice(t,1),(0===t||t===this.model.nodes.length)&&(n=this.updateRange()),n||this.modified(),i},_0x52c5cf.prototype.removeAllPoints=function(){this.model.nodes=[],this.sortAndUpdateRange()},_0x52c5cf.prototype.addSegment=function(e,t,i,n){this.sortAndUpdateRange();for(var r=0;r<this.model.nodes.length;)this.model.nodes[r].x>=e&&this.model.nodes[r].x<=i?this.model.nodes.splice(r,1):r++;this.addPoint(e,t,.5,0),this.addPoint(i,n,.5,0)},_0x52c5cf.prototype.getValue=function(e){var t=[];return this.getTable(e,e,1,t),t[0]},_0x52c5cf.prototype.adjustRange=function(e){if(e.length<2)return 0;var t=this.getRange();t[0]<e[0]?this.addPoint(e[0],this.getValue(e[0])):this.addPoint(e[0],this.getValue(t[0])),t[1]>e[1]?this.addPoint(e[1],this.getValue(e[1])):this.addPoint(e[1],this.getValue(t[1])),this.sortAndUpdateRange();for(var i=0;i<this.model.nodes.length;)this.model.nodes[i].x>=e[0]&&this.model.nodes[i].x<=e[1]?this.model.nodes.splice(i,1):++i;return this.sortAndUpdateRange(),1},_0x52c5cf.prototype.estimateMinNumberOfSamples=function(e,t){var i=this.findMinimumXDistance();return Math.ceil((t-e)/i)},_0x52c5cf.prototype.findMinimumXDistance=function(){var e=this.model.nodes.length;if(e<2)return-1;for(var t=this.model.nodes[1].x-this.model.nodes[0].x,i=0;i<e-1;i++){var n=this.model.nodes[i+1].x-this.model.nodes[i].x;n<t&&(t=n)}return t},_0x52c5cf.prototype.getTable=function(e,t,i,n,r){e$2b(r)||(r=1);var o,a=0,s=this.model.nodes.length,l=0;0!==s&&(l=this.model.nodes[s-1].y);var u=0,c=0,h=0,d=0,f=0,p=0,_=0;for(o=0;o<i;o++){var m=r*o;for(u=i>1?e+o/(i-1)*(t-e):.5*(e+t);a<s&&u>this.model.nodes[a].x;)++a<s&&(c=this.model.nodes[a-1].x,h=this.model.nodes[a].x,d=this.model.nodes[a-1].y,f=this.model.nodes[a].y,p=this.model.nodes[a-1].midpoint,_=this.model.nodes[a-1].sharpness,p<1e-5&&(p=1e-5),p>.99999&&(p=.99999));if(a>=s)n[m]=this.model.clamping?l:0;else if(0===a)n[m]=this.model.clamping?this.model.nodes[0].y:0;else{var g=(u-c)/(h-c);if(g=g<p?.5*g/p:.5+.5*(g-p)/(1-p),_>.99){if(g<.5){n[m]=d;continue}n[m]=f;continue}if(_<.01){n[m]=(1-g)*d+g*f;continue}g<.5?g=.5*(2*g)**(1+10*_):g>.5&&(g=1-.5*(2*(1-g))**(1+10*_));var x=g*g,v=x*g,y=2*v-3*x+1,$=-2*v+3*x,b=v-2*x+g,T=v-x,C=(1-_)*(f-d);n[m]=y*d+$*f+b*C+T*C;var S=d<f?d:f,w=d>f?d:f;n[m]=n[m]<S?S:n[m],n[m]=n[m]>w?w:n[m]}}},_0x52c5cf.prototype.modified=function(){},_0x52c5cf.clone=function(e,t){if(e$2b(e)){var i;for(e$2b(t)||(t=new _0x52c5cf),i=0;i<e.model.nodes.length;i++){var n=e.model.nodes[i];t.model.nodes.push({x:n.x,y:n.y,midpoint:n.midpoint,sharpness:n.sharpness})}return t.sortAndUpdateRange(),t}};var _0x342a4a=(_0x1a9e07=!0,function(e,t){var i=_0x1a9e07?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a9e07=!1,i}),_0x2f8ec3=_0x342a4a(void 0,(function(){return _0x2f8ec3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f8ec3).search("(((.+)+)+)+$")})),_0x1a9e07;_0x2f8ec3();var _0x5da5e9={RGB:0,HSV:1,LAB:2,DIVERGING:3},_0x1e715d={LINEAR:0,LOG10:1};function _0x2aec26(e,t){var i=e[0],n=e[1],r=e[2],o=Math.sqrt(i*i+n*n+r*r),a=o>.001?Math.acos(i/o):0,s=a>.001?Math.atan2(r,n):0;t[0]=o,t[1]=a,t[2]=s}function _0x1371e7(e,t){var i=e[0],n=e[1],r=e[2];t[0]=i*Math.cos(n),t[1]=i*Math.sin(n)*Math.cos(r),t[2]=i*Math.sin(n)*Math.sin(r)}function _0x18d9b2(e,t){if(e[0]>=t-.1)return e[2];var i=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+i:e[2]-i}function _0x8741a4(e,t){var i=e-t;for(i<0&&(i=-i);i>=2*Math.PI;)i-=2*Math.PI;return i>Math.PI&&(i=2*Math.PI-i),i}function _0x5889b4(e,t,i,n){var r=[],o=[];_0x5c9f6b(t,r),_0x5c9f6b(i,o);var a=[],s=[];_0x2aec26(r,a),_0x2aec26(o,s);var l=e;if(a[1]>.05&&s[1]>.05&&_0x8741a4(a[2],s[2])>.33*Math.PI){var u=Math.max(a[0],s[0]);u=Math.max(88,u),e<.5?(s[0]=u,s[1]=0,s[2]=0,l*=2):(a[0]=u,a[1]=0,a[2]=0,l=2*l-1)}a[1]<.05&&s[1]>.05?a[2]=_0x18d9b2(s,a[0]):s[1]<.05&&a[1]>.05&&(s[2]=_0x18d9b2(a,s[0]));var c=[];c[0]=(1-l)*a[0]+l*s[0],c[1]=(1-l)*a[1]+l*s[1],c[2]=(1-l)*a[2]+l*s[2];var h=[];_0x1371e7(c,h),_0x57b93b(h,n)}function _0x40204d(){this.model={clamping:!0,colorSpace:_0x5da5e9.RGB,hSVWrap:!0,scale:_0x1e715d.LINEAR,nanColor:null,belowRangeColor:null,aboveRangeColor:null,useAboveRangeColor:!1,useBelowRangeColor:!1,allowDuplicateScalars:!1,table:null,tableSize:0,buildTime:null,nodes:null,discretize:!1,numberOfValues:256,range:[0,1],mappingRange:[0,1]},this.model.table=[],this.model.nodes=[],this.model.nanColor=[.5,0,0,1],this.model.belowRangeColor=[0,0,0,1],this.model.aboveRangeColor=[1,1,1,1],this.model.buildTime={}}function _0x5ea91d(e,t){var i,n,r=e[0],o=e[1],a=e[2],s=1/6,l=r,u=r;o>l?l=o:o<u&&(u=o),a>l?l=a:a<u&&(u=a);const c=l;(n=c>0?(l-u)/l:0)>0?(i=r===l?s*(o-a)/(l-u):o===l?1/3+s*(a-r)/(l-u):2/3+s*(r-o)/(l-u))<0&&(i+=1):i=0,t[0]=i,t[1]=n,t[2]=c}function _0x1bc1da(e,t){var i,n,r,o=e[0],a=e[1],s=e[2],l=1/3,u=1/6,c=2/3,h=5/6;o>u&&o<=l?(n=1,i=(l-o)/u,r=0):o>l&&o<=.5?(n=1,r=(o-l)/u,i=0):o>.5&&o<=c?(r=1,n=(c-o)/u,i=0):o>c&&o<=h?(r=1,i=(o-c)/u,n=0):o>h&&o<=1?(i=1,r=(1-o)/u,n=0):(i=1,n=o/u,r=0),i=a*i+(1-a),n=a*n+(1-a),r=a*r+(1-a),i*=s,n*=s,r*=s,t[0]=i,t[1]=n,t[2]=r}function _0x4049cb(e,t){var i=(e[0]+16)/116,n=e[1]/500+i,r=i-e[2]/200;i**3>.008856?i**=3:i=(i-16/116)/7.787,n**3>.008856?n**=3:n=(n-16/116)/7.787,r**3>.008856?r**=3:r=(r-16/116)/7.787;t[0]=.9505*n,t[1]=1*i,t[2]=1.089*r}function _0x4347d9(e,t){var i=e[0]/.9505,n=e[1]/1,r=e[2]/1.089;i>.008856?i**=1/3:i=7.787*i+16/116,n>.008856?n**=1/3:n=7.787*n+16/116,r>.008856?r**=1/3:r=7.787*r+16/116,t[0]=116*n-16,t[1]=500*(i-n),t[2]=200*(n-r)}function _0x2dd559(e,t){var i=e[0],n=e[1],r=e[2],o=3.2406*i+-1.5372*n+-.4986*r,a=-.9689*i+1.8758*n+.0415*r,s=.0557*i+-.204*n+1.057*r;o>.0031308?o=1.055*o**(1/2.4)-.055:o*=12.92,a>.0031308?a=1.055*a**(1/2.4)-.055:a*=12.92,s>.0031308?s=1.055*s**(1/2.4)-.055:s*=12.92;var l=o;l<a&&(l=a),l<s&&(l=s),l>1&&(o/=l,a/=l,s/=l),o<0&&(o=0),a<0&&(a=0),s<0&&(s=0),t[0]=o,t[1]=a,t[2]=s}function _0x322826(e,t){var i=e[0],n=e[1],r=e[2];i>.04045?i=((i+.055)/1.055)**2.4:i/=12.92,n>.04045?n=((n+.055)/1.055)**2.4:n/=12.92,r>.04045?r=((r+.055)/1.055)**2.4:r/=12.92,t[0]=.4124*i+.3576*n+.1805*r,t[1]=.2126*i+.7152*n+.0722*r,t[2]=.0193*i+.1192*n+.9505*r}function _0x5c9f6b(e,t){var i=[0,0,0];_0x322826(e,i),_0x4347d9(i,t)}function _0x57b93b(e,t){var i=[0,0,0];_0x4049cb(e,i),_0x2dd559(i,t)}function g$d(e){o$1q.defined("context",e),this._context=e,this._NetCDFData=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._dictColorTable=void 0,this._hasColorTable=0,this._hypsometricTexture=void 0,this._filterMode=k$Q.FilterMode.LINEAR,this._volumeRenderMode=gt$1.VolumeRendering,this._scale=new o$1p(1,1,1),this._scaleDirty=!1,this._sliceCoordDirty=!1,this._transparency=0,this._sliceCoordinate=new o$1p(.5,.5,.5),this._floor=Number.MAX_VALUE,this._ceil=Number.MIN_VALUE,this._maxFiltration=Number.MAX_VALUE,this._minFiltration=Number.MIN_VALUE,this._visible=!0,this._type="VoxelGridLayer3D",this._name=void 0,this._url=void 0,this._voxelGridTile=void 0,this._zBounds=void 0,this._layerBounds=void 0,this._version=1,this._width=0,this._height=0,this._depth=0,this._time=0,this._cellWidth=0,this._cellHeight=0,this._cellDepth=0,this._cellTime=0,this._levels=0,this._availableNode=void 0,this._volumeBuffer=void 0,this._multiTextures=[],this._textureLevelLoaded=!0,this._period=500,this._prevTime=0,this._timeRatio=0,this._timeIndexChange=!1,this._duration=1,this._startRender=!1,this._frameIndex=-1,this._useGradientOpacity=!1,this._gradientOpacityMinOpacity=0,this._gradientOpacityMaxOpacity=1,this._gradientOpacityMinValue=0,this._gradientOpacityMaxValue=1,this._clipPlanes=[],this._contourValue=0,this._contourValueDirty=!1,this._enableLighting=!1,this._material={diffuse:new e$1U(.9,.9,.9),specular:new e$1U(.2,.2,.2),ambient:new e$1U(.1,.1,.1),shiness:10},this._fillStyle=fr$2.Fill,this._outlineColor=new e$1U(1,1,1,1)}_0x40204d.clone=function(e,t){if(e$2b(e)){var i;for(e$2b(t)||(t=new _0x40204d),i=0;i<e.model.nodes.length;i++){var n=e.model.nodes[i];t.model.nodes.push({x:n.x,r:n.r,g:n.g,b:n.b,midpoint:n.midpoint,sharpness:n.sharpness})}return t.sortAndUpdateRange(),t.model.mappingRange[0]=e.model.mappingRange[0],t.model.mappingRange[1]=e.model.mappingRange[1],t}},_0x40204d.prototype.getSize=function(){return this.model.nodes.length},_0x40204d.prototype.addRGBPoint=function(e,t,i,n){this.addRGBPointLong(e,t,i,n,.5,0)},_0x40204d.prototype.addRGBPointLong=function(e,t,i,n,r,o){var a=u$_(r,.5),s=u$_(o,0);if(a<0||a>1||s<0||s>1)return-1;this.model.allowDuplicateScalars||this.removePoint(e);var l={x:e,r:t,g:i,b:n,midpoint:a,sharpness:s};this.model.nodes.push(l),this.sortAndUpdateRange();for(var u=0;u<this.model.nodes.length&&this.model.nodes[u].x!==e;u++);return u<this.model.nodes.length?u:-1},_0x40204d.prototype.addHSVPoint=function(e,t,i,n){this.addHSVPointLong(e,t,i,n,.5,0)},_0x40204d.prototype.addHSVPointLong=function(e,t,i,n,r,o){var a=u$_(r,.5),s=u$_(o,0),l=[];return _0x1bc1da([t,i,n],l),this.addRGBPoint(e,l[0],l[1],l[2],a,s)},_0x40204d.prototype.setNodes=function(e){this.model.nodes!==e&&(this.model.nodes=e,this.sortAndUpdateRange())},_0x40204d.prototype.sortAndUpdateRange=function(){this.model.nodes.sort((function(e,t){return e.x-t.x})),this.updateRange()||this.modified()},_0x40204d.prototype.getRange=function(){return this.model.mappingRange},_0x40204d.prototype.updateRange=function(){var e=[2];e[0]=this.model.mappingRange[0],e[1]=this.model.mappingRange[1];var t=this.model.nodes.length;return t?(this.model.mappingRange[0]=this.model.nodes[0].x,this.model.mappingRange[1]=this.model.nodes[t-1].x):(this.model.mappingRange[0]=0,this.model.mappingRange[1]=0),(e[0]!==this.model.mappingRange[0]||e[1]!==this.model.mappingRange[1])&&(this.modified(),!0)},_0x40204d.prototype.removePoint=function(e){for(var t=0;t<this.model.nodes.length&&this.model.nodes[t].x!==e;t++);var i=t;if(t>=this.model.nodes.length)return-1;var n=!1;return this.model.nodes.splice(t,1),(0===t||t===this.model.nodes.length)&&(n=this.updateRange()),n||this.modified(),i},_0x40204d.prototype.movePoint=function(e,t){if(e!==t){this.removePoint(t);for(var i=0;i<this.model.nodes.length;i++)if(this.model.nodes[i].x===e){this.model.nodes[i].x=t,this.sortAndUpdateRange();break}}},_0x40204d.prototype.removeAllPoints=function(){this.model.nodes=[],this.sortAndUpdateRange()},_0x40204d.prototype.addRGBSegment=function(e,t,i,n,r,o,a,s){this.sortAndUpdateRange();for(var l=0;l<this.model.nodes.length;)this.model.nodes[l].x>=e&&this.model.nodes[l].x<=r?this.model.nodes.splice(l,1):l++;this.addRGBPointLong(e,t,i,n,.5,0),this.addRGBPointLong(r,o,a,s,.5,0),this.modified()},_0x40204d.prototype.addHSVSegment=function(e,t,i,n,r,o,a,s){var l=[o,a,s],u=[],c=[];_0x1bc1da([t,i,n],u),_0x1bc1da(l,c),this.addRGBSegment(e,u[0],u[1],u[2],r,c[0],c[1],c[2])},_0x40204d.prototype.mapValue=function(e){var t=[];return this.getColor(e,t),[Math.floor(255*t[0]+.5),Math.floor(255*t[1]+.5),Math.floor(255*t[2]+.5),255]},_0x40204d.prototype.getColor=function(e,t){if(this.model.indexedLookup){var i=this.getSize(),n=this.getAnnotatedValueIndexInternal(e);if(n<0||0===i)this.getNanColor(t);else{var r=[];this.getNodeValue(n%i,r),t[0]=r.r,t[1]=r.g,t[2]=r.b}}else this.getTable(e,e,1,t)},_0x40204d.prototype.getRedValue=function(e){var t=[];return this.getColor(e,t),t[0]},_0x40204d.prototype.getGreenValue=function(e){var t=[];return this.getColor(e,t),t[1]},_0x40204d.prototype.getBlueValue=function(e){var t=[];return this.getColor(e,t),t[2]},_0x40204d.prototype.getTable=function(e,t,i,n){if(isNaN(e)||isNaN(t))for(var r=0;r<i;r++)n[3*r+0]=this.model.nanColor[0],n[3*r+1]=this.model.nanColor[1],n[3*r+2]=this.model.nanColor[2];else{var o=0,a=this.model.nodes.length,s=0,l=0,u=0;0!==a&&(s=this.model.nodes[a-1].r,l=this.model.nodes[a-1].g,u=this.model.nodes[a-1].b);var c=0,h=0,d=0,f=[0,0,0],p=[0,0,0],_=0,m=0,g=[],x=this.model.scale===_0x1e715d.LOG10;x&&(x=this.model.mappingRange[0]>0);var v=0,y=0,$=0;x&&(v=Math.log10(e),y=Math.log10(t));for(r=0;r<i;r++){var b=3*r;if(i>1?x?c=10**($=v+r/(i-1)*(y-v)):c=e+r/(i-1)*(t-e):x?c=10**($=.5*(v+y)):c=.5*(e+t),this.model.discretize){var T=this.model.mappingRange;if(c>=T[0]&&c<=T[1]){var C=this.model.numberOfValues,S=T[1]-T[0];if(C<=1)c=T[0]+S/2;else{var w=(c-T[0])/S,E=Math.floor(C*w);c=T[0]+E/(C-1)*S}}}for(;o<a&&c>this.model.nodes[o].x;)++o<a&&(h=this.model.nodes[o-1].x,d=this.model.nodes[o].x,x&&(h=Math.log10(h),d=Math.log10(d)),f[0]=this.model.nodes[o-1].r,p[0]=this.model.nodes[o].r,f[1]=this.model.nodes[o-1].g,p[1]=this.model.nodes[o].g,f[2]=this.model.nodes[o-1].b,p[2]=this.model.nodes[o].b,_=this.model.nodes[o-1].midpoint,m=this.model.nodes[o-1].sharpness,_<1e-5&&(_=1e-5),_>.99999&&(_=.99999));if(c>this.model.mappingRange[1])n[b]=0,n[b+1]=0,n[b+2]=0,this.model.clamping&&(this.getUseAboveRangeColor()?(n[b]=this.model.aboveRangeColor[0],n[b+1]=this.model.aboveRangeColor[1],n[b+2]=this.model.aboveRangeColor[2]):(n[b]=s,n[b+1]=l,n[b+2]=u));else if(c<this.model.mappingRange[0]||!Number.isFinite(c)&&c<0)n[b]=0,n[b+1]=0,n[b+2]=0,this.model.clamping&&(this.getUseBelowRangeColor()?(n[b]=this.model.belowRangeColor[0],n[b+1]=this.model.belowRangeColor[1],n[b+2]=this.model.belowRangeColor[2]):a>0&&(n[b]=this.model.nodes[0].r,n[b+1]=this.model.nodes[0].g,n[b+2]=this.model.nodes[0].b));else if(0===o&&(Math.abs(c-e)<1e-6||this.model.discretize))a>0?(n[b]=this.model.nodes[0].r,n[b+1]=this.model.nodes[0].g,n[b+2]=this.model.nodes[0].b):(n[b]=0,n[b+1]=0,n[b+2]=0);else{var P=0;if(P=(P=x?($-h)/(d-h):(c-h)/(d-h))<_?.5*P/_:.5+.5*(P-_)/(1-_),m>.99){if(P<.5){n[b]=f[0],n[b+1]=f[1],n[b+2]=f[2];continue}n[b]=p[0],n[b+1]=p[1],n[b+2]=p[2];continue}if(m<.01){if(this.model.colorSpace===_0x5da5e9.RGB)n[b]=(1-P)*f[0]+P*p[0],n[b+1]=(1-P)*f[1]+P*p[1],n[b+2]=(1-P)*f[2]+P*p[2];else if(this.model.colorSpace===_0x5da5e9.HSV){var A=[];_0x5ea91d(f,U=[]),_0x5ea91d(p,A),this.model.hSVWrap&&(U[0]-A[0]>.5||A[0]-U[0]>.5)&&(U[0]>A[0]?U[0]-=1:A[0]-=1),(G=[])[0]=(1-P)*U[0]+P*A[0],G[0]<0&&(G[0]+=1),G[1]=(1-P)*U[1]+P*A[1],G[2]=(1-P)*U[2]+P*A[2],_0x1bc1da(G,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else if(this.model.colorSpace===_0x5da5e9.LAB){var L=[];_0x5c9f6b(f,z=[]),_0x5c9f6b(p,L),(V=[])[0]=(1-P)*z[0]+P*L[0],V[1]=(1-P)*z[1]+P*L[1],V[2]=(1-P)*z[2]+P*L[2],_0x57b93b(V,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else this.model.colorSpace===_0x5da5e9.DIVERGING&&(_0x5889b4(P,f,p,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]);continue}P<.5?P=.5*(2*P)**(1+10*m):P>.5&&(P=1-.5*(2*(1-P))**(1+10*m));var M,R=P*P,O=R*P,I=2*O-3*R+1,D=-2*O+3*R,B=O-2*R+P,N=O-R;if(this.model.colorSpace===_0x5da5e9.RGB)for(var F=0;F<3;F++)M=(1-m)*(p[F]-f[F]),n[b+F]=I*f[F]+D*p[F]+B*M+N*M;else if(this.model.colorSpace===_0x5da5e9.HSV){var U;A=[];_0x5ea91d(f,U=[]),_0x5ea91d(p,A),this.model.hSVWrap&&(U[0]-A[0]>.5||A[0]-U[0]>.5)&&(U[0]>A[0]?U[0]-=1:A[0]-=1);var G=[];for(F=0;F<3;F++)M=(1-m)*(A[F]-U[F]),G[F]=I*U[F]+D*A[F]+B*M+N*M,0===F&&G[F]<0&&(G[F]+=1);_0x1bc1da(G,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else if(this.model.colorSpace===_0x5da5e9.LAB){var z;L=[];_0x5c9f6b(f,z=[]),_0x5c9f6b(p,L);var V=[];for(F=0;F<3;F++)M=(1-m)*(L[F]-z[F]),V[F]=I*z[F]+D*L[F]+B*M+N*M;_0x57b93b(V,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else this.model.colorSpace===_0x5da5e9.DIVERGING&&(_0x5889b4(P,f,p,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]);for(F=0;F<3;F++)n[b+F]=n[b+F]<0?0:n[b+F],n[b+F]=n[b+F]>1?1:n[b+F]}}}},_0x40204d.prototype.getUint8Table=function(e,t,i,n){if(n=u$_(n,!1),this.model.tableSize===i&&this.model.tableWithAlpha!==n)return this.model.table;if(0===this.model.nodes.length)return this.model.table;var r=n?4:3;(this.model.tableSize!==i||this.model.tableWithAlpha!==n)&&(this.model.table=new Uint8Array(i*r),this.model.tableSize=i,this.model.tableWithAlpha=n);var o=[];this.getTable(e,t,i,o);for(var a=0;a<i;a++)this.model.table[a*r+0]=Math.floor(255*o[3*a+0]+.5),this.model.table[a*r+1]=Math.floor(255*o[3*a+1]+.5),this.model.table[a*r+2]=Math.floor(255*o[3*a+2]+.5),n&&(this.model.table[a*r+3]=255);return this.model.buildTime.modified(),this.model.table},_0x40204d.prototype.buildFunctionFromTable=function(e,t,i,n){var r=0;this.removeAllPoints(),i>1&&(r=(t-e)/(i-1));for(var o=0;o<i;o++){var a={x:e+r*o,r:n[3*o],g:n[3*o+1],b:n[3*o+2],sharpness:0,midpoint:.5};this.model.nodes.push(a)}this.sortAndUpdateRange()},_0x40204d.prototype.getNodeValue=function(e,t){return e<0||e>=this.model.nodes.length?-1:(t[0]=this.model.nodes[e].x,t[1]=this.model.nodes[e].r,t[2]=this.model.nodes[e].g,t[3]=this.model.nodes[e].b,t[4]=this.model.nodes[e].midpoint,t[5]=this.model.nodes[e].sharpness,1)},_0x40204d.prototype.setNodeValue=function(e,t){if(e<0||e>=this.model.nodes.length)return-1;var i=this.model.nodes[e].x;return this.model.nodes[e].x=t[0],this.model.nodes[e].r=t[1],this.model.nodes[e].g=t[2],this.model.nodes[e].b=t[3],this.model.nodes[e].midpoint=t[4],this.model.nodes[e].sharpness=t[5],i!==t[0]?this.sortAndUpdateRange():this.modified(),1},_0x40204d.prototype.getNumberOfAvailableColors=function(){return this.model.indexedLookup&&this.getSize()?this.getSize():this.model.tableSize?this.model.tableSize:16777216},_0x40204d.prototype.getIndexedColor=function(e,t){var i=this.getSize();if(i>0&&e>=0){var n=[];this.getNodeValue(e%i,n);for(var r=0;r<3;++r)t[r]=n[r+1];t[3]=1}else this.getNanColor(t),t[3]=1},_0x40204d.prototype.fillFromDataPointer=function(e,t){if(!(e<=0)&&t){this.removeAllPoints();for(var i=0;i<e;i++)this.addRGBPoint(t[4*i],t[4*i+1],t[4*i+2],t[4*i+3])}},_0x40204d.prototype.setMappingRange=function(e,t){var i=[e,t],n=this.getRange();if((n[1]!==i[1]||n[0]!==i[0])&&i[1]!==i[0]){for(var r=(i[1]-i[0])/(n[1]-n[0]),o=i[0]-n[0]*r,a=0;a<this.model.nodes.length;++a)this.model.nodes[a].x=this.model.nodes[a].x*r+o;this.model.mappingRange[0]=i[0],this.model.mappingRange[1]=i[1],this.modified()}},_0x40204d.prototype.adjustRange=function(e){var t=this.getRange(),i=[];t[0]<e[0]?(this.getColor(e[0],i),this.addRGBPoint(e[0],i[0],i[1],i[2])):(this.getColor(t[0],i),this.addRGBPoint(e[0],i[0],i[1],i[2])),t[1]>e[1]?(this.getColor(e[1],i),this.addRGBPoint(e[1],i[0],i[1],i[2])):(this.getColor(t[1],i),this.addRGBPoint(e[1],i[0],i[1],i[2])),this.sortAndUpdateRange();for(var n=0;n<this.model.nodes.length;)this.model.nodes[n].x>=e[0]&&this.model.nodes[n].x<=e[1]?this.model.nodes.splice(n,1):++n;return 1},_0x40204d.prototype.estimateMinNumberOfSamples=function(e,t){var i=this.findMinimumXDistance();return Math.ceil((t-e)/i)},_0x40204d.prototype.findMinimumXDistance=function(){if(this.model.nodes.length<2)return-1;for(var e=Number.MAX_VALUE,t=0;t<this.model.nodes.length-1;t++){var i=this.model.nodes[t+1].x-this.model.nodes[t].x;i<e&&(e=i)}return e},_0x40204d.prototype.mapScalarsThroughTable=function(e,t,i,n){0!==this.getSize()&&(this.model.indexedLookup?this.mapDataIndexed(e,t,i,n):this.mapData(e,t,i,n))},_0x40204d.prototype.mapData=function(e,t,i,n){if(0!==this.getSize()){var r=Math.floor(255*this.getAlpha()+.5),o=e.getNumberOfTuples(),a=e.getNumberOfComponents(),s=t.getData(),l=e.getData(),u=[];if(i===ScalarMappingTarget.RGBA)for(var c=0;c<o;c++){var h=l[c*a+n];this.getColor(h,u),s[4*c]=Math.floor(255*u[0]+.5),s[4*c+1]=Math.floor(255*u[1]+.5),s[4*c+2]=Math.floor(255*u[2]+.5),s[4*c+3]=r}if(i===ScalarMappingTarget.RGB)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[3*c]=Math.floor(255*u[0]+.5),s[3*c+1]=Math.floor(255*u[1]+.5),s[3*c+2]=Math.floor(255*u[2]+.5)}if(i===ScalarMappingTarget.LUMINANCE)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[c]=Math.floor(76.5*u[0]+150.45*u[1]+28.05*u[2]+.5)}if(i===ScalarMappingTarget.LUMINANCE_ALPHA)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[2*c]=Math.floor(76.5*u[0]+150.45*u[1]+28.05*u[2]+.5),s[2*c+1]=r}}},_0x40204d.prototype.applyColorMap=function(e){if(e.ColorSpace&&(this.model.colorSpace=_0x5da5e9[e.ColorSpace.toUpperCase()],void 0===this.model.colorSpace&&(this.model.colorSpace=_0x5da5e9.RGB)),e.NanColor)for(this.model.nanColor=[].concat(e.NanColor);this.model.nanColor.length<4;)this.model.nanColor.push(1);if(e.RGBPoints){var t=e.RGBPoints.length;this.model.nodes=[];for(var i=0;i<t;i+=4)this.model.nodes.push({x:e.RGBPoints[i],r:e.RGBPoints[i+1],g:e.RGBPoints[i+2],b:e.RGBPoints[i+3],midpoint:.5,sharpness:0})}this.sortAndUpdateRange()},_0x40204d.prototype.modified=function(){},Object.defineProperties(g$d.prototype,{visible:{get:function(){return this._visible},set:function(e){this._visible=e}},type:{get:function(){return this._type}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e}},zBounds:{get:function(){return this._zBounds},set:function(e){this._zBounds=e}},name:{get:function(){return this._name}},NetCDFInfo:{get:function(){return this._NetCDFInfo}},maxFiltration:{get:function(){return this._maxFiltration},set:function(e){this._maxFiltration=e}},minFiltration:{get:function(){return this._minFiltration},set:function(e){this._minFiltration=e}},duration:{get:function(){return this._duration},set:function(e){o$1q.typeOf.number.greaterThan("duration",e,0),o$1q.typeOf.number.greaterThan("this._time",this._time,0),this._duration=e,this._period=1e3*this._duration/this._time}},opaqueRate:{get:function(){return this._transparency},set:function(e){this._transparency!==e&&(this._transparency=e)}},filterMode:{get:function(){return this._filterMode},set:function(e){this._filterMode!==e&&(this._filterMode=e)}},maxValue:{get:function(){return this._voxelGridTile.maxValue}},minValue:{get:function(){return this._voxelGridTile.minValue}},visibleBoundingBox:{get:function(){return this._voxelGridTile.visibleBoundingBox},set:function(e){this._voxelGridTile.visibleBoundingBox=e}},scale:{get:function(){return this._scale},set:function(e){o$1p.equals(e,this._scale)||(this._scale=o$1p.clone(e,this._scale),this._scaleDirty=!0)}},volumeRenderMode:{get:function(){return this._volumeRenderMode},set:function(e){this._volumeRenderMode=e}},sliceCoordinate:{get:function(){return this._sliceCoordinate},set:function(e){this._sliceCoordinate=e,this._sliceCoordDirty=!0}},frameIndex:{get:function(){return this._frameIndex},set:function(e){"number"!=typeof e||isNaN(e)||(this._frameIndex=e)}},colorTable:{get:function(){return this._dictColorTable},set:function(e){if(!e$2b(e))return e$2b(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),void(this._hasColorTable=0);this._dictColorTable=i$S.clone(e,this._dictColorTable),this._dictColorTable.count()<1?this._hasColorTable=0:(this._dictColorTable.generateBuffer(),e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:this._context,width:1024,height:64,pixelFormat:V$10.RGBA,flipY:!1})),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._dictColorTable._imageBuffer}),this._hasColorTable=1)}},colorTransferFunction:{get:function(){return this._colorTransferFunction},set:function(e){if(e$2b(e)){this._colorTransferFunction=_0x40204d.clone(e,this._colorTransferFunction);for(var t=1024,i=new Uint8Array(6144),n=new Float32Array(3*t),r=0;r<1;++r){var o=e.getRange();e.getTable(o[0],o[1],t,n,1);for(var a=0;a<3*t;++a)i[r*t*6+a]=255*n[a],i[r*t*6+a+3*t]=255*n[a]}e$2b(this._colorTexture)||(this._colorTexture=new t$V({context:this._context,width:t,height:2,pixelFormat:V$10.RGBA,pixelDatatype:_$$.UNSIGNED_BYTE,flipY:!1}));var s=new Uint8Array(8192);for(a=0;a<2048;a++)s[4*a]=i[3*a],s[4*a+1]=i[3*a+1],s[4*a+2]=i[3*a+2],s[4*a+3]=255;this._colorTexture.copyFrom({width:t,height:2,arrayBufferView:s})}else e$2b(this._colorTransferFunction)&&(this._colorTransferFunction.destroy(),this._colorTransferFunction=null)}},opacityTransferFunction:{get:function(){return this._opacityTransferFunction},set:function(e){if(e$2b(e)){this._opacityTransferFunction=_0x52c5cf.clone(e,this._opacityTransferFunction);for(var t=1024,i=new Float32Array(2048),n=new Float32Array(t),r=0;r<1;++r){var o=e.getRange();e.getTable(o[0],o[1],t,n,1);for(var a=0;a<t;++a)i[r*t*2+a]=1-(1-n[a]),i[r*t*2+a+t]=i[r*t*2+a]}e$2b(this._opacityTexture)||(this._opacityTexture=new t$V({context:this._context,width:t,height:2,pixelFormat:this._context.webgl2||this._context.webgpu?V$10.RED:V$10.LUMINANCE,pixelDatatype:_$$.FLOAT,flipY:!1})),this._opacityTexture.copyFrom({width:t,height:2,arrayBufferView:i})}else e$2b(this._opacityTransferFunction)&&(this._opacityTransferFunction.destroy(),this._opacityTransferFunction=null)}},useGradientOpacity:{get:function(){return this._useGradientOpacity},set:function(e){e$2b(this._voxelGridTile)&&e!=this._useGradientOpacity&&this._voxelGridTile._useGradientOpacityChanged(e),this._useGradientOpacity=e}},gradientOpacityMinOpacity:{get:function(){return this._gradientOpacityMinOpacity},set:function(e){this._gradientOpacityMinOpacity=e}},gradientOpacityMaxOpacity:{get:function(){return this._gradientOpacityMaxOpacity},set:function(e){this._gradientOpacityMaxOpacity=e}},gradientOpacityMinValue:{get:function(){return this._gradientOpacityMinValue},set:function(e){this._gradientOpacityMinValue=e}},gradientOpacityMaxValue:{get:function(){return this._gradientOpacityMaxValue},set:function(e){this._gradientOpacityMaxValue=e}},contourValue:{get:function(){return this._contourValue},set:function(e){e!==this._contourValue&&(this._contourValue=Math.min(e,this.maxValue),this._contourValue=Math.max(e,this.minValue),this._contourValueDirty=!0)}},enableLighting:{get:function(){return this._enableLighting},set:function(e){e!==this._enableLighting&&(this._enableLighting=e,this._voxelGridTile._enableLightingChange(e))}},material:{get:function(){return this._material}},outlineColor:{get:function(){return this._outlineColor},set:function(e){this._outlineColor=e}},fillStyle:{get:function(){return this._fillStyle},set:function(e){this._fillStyle=e}},sampleDistance:{set:function(e){this._sampleDistance!==e&&(this._sampleDistance=e)}}}),g$d.prototype.update=function(e,t){if(this._frameState=t,this._visible&&this._startRender){this._timeIndexChange=!1;var i=performance.now(),n=i-this._prevTime;this._timeRatio=n/this._period,n>this._period&&(this._prevTime=i,this._timeRatio=0,this._timeIndexChange=!0),e$2b(this._voxelGridTile)&&(this._voxelGridTile instanceof o$a&&this.updateMultiResolution(e,t),this._voxelGridTile.update(this,t))}},g$d.prototype.setIsMultiResolution=function(e){e$2b(this._voxelGridTile)||(e?(this._voxelGridTile=new o$a(this._context,this),this._voxelGridTile._isRootTile=!0):this._voxelGridTile=new _$9(this._context,this))};var Vt$1=new i$V("loadVol");g$d.prototype.updateMultiResolution=function(e,t){var i=t.camera,n=t.cullingVolume,r=e._gl,o=t.requests,a=this;if(this._voxelGridTile._isVisible=n.computeVisibility(this._voxelGridTile._orientedBoundingBox)!==Ae$u.OUTSIDE,this._voxelGridTile._isVisible){if(!this._voxelGridTile._initialized)return void o.push({entity:this._voxelGridTile,priority:0,owner:this});this._voxelGridTile.calcPixFromCam(i,r,1),this._updateQueue=[[this._voxelGridTile]];for(var s,l,u,c,h,d,f=[this._voxelGridTile],p=1;p<this._levels;p++){for(var _={},m=0;m<f.length;m++){if(!(b=f[m])._isLessLodDis){if(u=this._availableNode[p].resolution.x,c=this._availableNode[p].resolution.y,e$2b(b._southwestChild))_[JSON.stringify([b._southwestChild._x,b._southwestChild._y,b._southwestChild._level])]=b._southwestChild;else if(h=2*b._x,d=2*b._y+1,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._southwestChild=new o$a(this._context,this),b._southwestChild._mode=t.mode,b._southwestChild._level=b._level+1,b._southwestChild._x=h,b._southwestChild._y=d,b._southwestChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;var g=this._layerBounds.north-d*c*this._cellHeight;b._southwestChild._dataBounds=new h$18(b._dataBounds.west,g-l,b._dataBounds.west+s,g),b._southwestChild._computePosition(),b._southwestChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._southwestChild._x,b._southwestChild._y,b._southwestChild._level])]=b._southwestChild}if(e$2b(b._southeastChild))_[JSON.stringify([b._southeastChild._x,b._southeastChild._y,b._southeastChild._level])]=b._southeastChild;else if(h=2*b._x+1,d=2*b._y+1,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._southeastChild=new o$a(this._context,this),b._southeastChild._mode=t.mode,b._southeastChild._level=b._level+1,b._southeastChild._x=h,b._southeastChild._y=d,b._southeastChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;g=this._layerBounds.north-d*c*this._cellHeight;var x=this._layerBounds.west+h*u*this._cellWidth;b._southeastChild._dataBounds=new h$18(x,g-l,x+s,g),b._southeastChild._computePosition(),b._southeastChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._southeastChild._x,b._southeastChild._y,b._southeastChild._level])]=b._southeastChild}if(e$2b(b._northwestChild)?_[JSON.stringify([b._northwestChild._x,b._northwestChild._y,b._northwestChild._level])]=b._northwestChild:(h=2*b._x,d=2*b._y,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow&&(b._northwestChild=new o$a(this._context,this),b._northwestChild._mode=t.mode,b._northwestChild._level=b._level+1,b._northwestChild._x=h,b._northwestChild._y=d,b._northwestChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c,b._northwestChild._dataBounds=new h$18(b._dataBounds.west,b._dataBounds.north-l,b._dataBounds.west+s,b._dataBounds.north),b._northwestChild._computePosition(),b._northwestChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._northwestChild._x,b._northwestChild._y,b._northwestChild._level])]=b._northwestChild)),e$2b(b._northeastChild))_[JSON.stringify([b._northeastChild._x,b._northeastChild._y,b._northeastChild._level])]=b._northeastChild;else if(h=2*b._x+1,d=2*b._y,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._northeastChild=new o$a(this._context,this),b._northeastChild._mode=t.mode,b._northeastChild._level=b._level+1,b._northeastChild._x=h,b._northeastChild._y=d,b._northeastChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;x=this._layerBounds.west+h*u*this._cellWidth;b._northeastChild._dataBounds=new h$18(x,b._dataBounds.north-l,x+s,b._dataBounds.north),b._northeastChild._computePosition(),b._northeastChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._northeastChild._x,b._northeastChild._y,b._northeastChild._level])]=b._northeastChild}}}f=[];var v=0,y=void 0;for(var $ in _){var b;(b=_[$])._isVisible=n.computeVisibility(b._orientedBoundingBox)!==Ae$u.OUTSIDE,b._isVisible&&(b.calcPixFromCam(i,r,1),b._pix>v&&(v=b._pix,y=b))}if(v=0,e$2b(y)){var T=_[JSON.stringify([y._x-1,y._y,y._level])],C=_[JSON.stringify([y._x+1,y._y,y._level])],S=_[JSON.stringify([y._x,y._y-1,y._level])],w=_[JSON.stringify([y._x,y._y+1,y._level])],E=_[JSON.stringify([y._x+1,y._y-1,y._level])];e$2b(E)&&E._isVisible&&e$2b(C)&&e$2b(S)&&C._isVisible&&S._isVisible&&(v=E._pix+C._pix+S._pix,f=[S,E,y,C]);var P=_[JSON.stringify([y._x+1,y._y+1,y._level])];if(e$2b(P)&&P._isVisible&&e$2b(C)&&e$2b(w)&&C._isVisible&&w._isVisible)(L=P._pix+C._pix+w._pix)>v&&(v=L,f=[y,C,w,P]);var A=_[JSON.stringify([y._x-1,y._y+1,y._level])];if(e$2b(A)&&A._isVisible&&e$2b(T)&&e$2b(w)&&T._isVisible&&w._isVisible)(L=A._pix+T._pix+w._pix)>v&&(v=L,f=[T,y,A,w]);var L,M=_[JSON.stringify([y._x-1,y._y-1,y._level])];if(e$2b(M)&&M._isVisible&&e$2b(T)&&e$2b(S)&&T._isVisible&&S._isVisible)(L=M._pix+T._pix+S._pix)>v&&(v=L,f=[M,S,T,y]);0==f.length&&(e$2b(T)&&T._isVisible&&(v=T._pix,f=[T,y]),e$2b(C)&&C._isVisible&&C._pix>v&&(v=C._pix,f=[y,C]),e$2b(S)&&S._isVisible&&S._pix>v&&(v=S._pix,f=[S,y]),e$2b(w)&&w._isVisible&&w._pix>v&&(v=w._pix,f=[y,w]),0==f.length&&(f=[y]))}if(!(f.length>0))break;this._updateQueue.push(f);for(m=0;m<f.length;m++)f[m]._s3mLoadState===N$P.UNLOAD&&o.push({entity:f[m],priority:0,owner:this})}if(this._textureLevelLoaded){this._multiTextures.length>this._updateQueue.length-1&&(this._multiTextures.length=this._updateQueue.length-1);var R=void 0,O=void 0,I=void 0;for(p=1;p<this._updateQueue.length;p++){var D=this._updateQueue[p],B=D.length;if(0===B)break;var N=!0;for(m=0;m<D.length;m++)if(D[m]._s3mLoadState!=N$P.LOADED&&D[m]._s3mLoadState!=N$P.TRANSFORMED){N=!1;break}if(!N)break;if(this._multiTextures.length<p){var F;R={textureLevel:F={}},O=D,I=this._multiTextures.length;break}if(I=p-1,!e$2b(F=this._multiTextures[I])||D[0]._x<F.startCol||D[0]._y<F.startRow||D[B-1]._x>F.endCol||D[B-1]._y>F.endRow){R={textureLevel:{}},O=D;break}}if(e$2b(R)){R._cellWidth=this._cellWidth,R._cellHeight=this._cellHeight,R._cellDepth=this._cellDepth,R._availableNode=this._availableNode[O[0]._level],R._time=this._time,R._layerBounds=this._layerBounds,R._minFiltration=this._floor,R._maxFiltration=this._ceil;var U=[];for(p=0;p<O.length;p++){var G={_x:O[p]._x,_y:O[p]._y,_level:O[p]._level,_dataBounds:O[p]._dataBounds,_s3mLoadState:O[p]._s3mLoadState,_arrayBuffer:O[p]._arrayBuffer};U.push(G)}R.arrayWork=U;var z=Vt$1.scheduleTask(R);if(!e$2b(z))return;this._textureLevelLoaded=!1;a=this;o$1l(z,(function(e){var t;if(I<a._multiTextures.length){if(e$2b(!(t=a._multiTextures[I])._volTextures))t._volTextures=[];else{for(var i=t._volTextures.length,n=0;n<i;n++)t._volTextures[n].destroy();t._volTextures=[]}t.bounds=e.textureLevel.bounds,t.cellDepth=e.textureLevel.cellDepth,t.cellHeight=e.textureLevel.cellHeight,t.cellWidth=e.textureLevel.cellWidth,t.endCol=e.textureLevel.endCol,t.endRow=e.textureLevel.endRow,t.multiResolutionTranslation=e.textureLevel.multiResolutionTranslation,t.startCol=e.textureLevel.startCol,t.startRow=e.textureLevel.startRow,t.validHeight=e.textureLevel.validHeight,t.validWidth=e.textureLevel.validWidth,t.xSpan=e.textureLevel.xSpan,t._nBlockLength=e.textureLevel._nBlockLength,t._nLength=e.textureLevel._nLength,t._nSideBlockCount=e.textureLevel._nSideBlockCount}else e$2b(!(t=e.textureLevel)._volTextures)&&(t._volTextures=[]),a._multiTextures.push(t);t.multiResolutionPara=new p$1d(t.multiResolutionTranslation.x,0,t.validWidth,t._nLength,t.multiResolutionTranslation.y,0,t.validHeight,0,t.multiResolutionTranslation.z,0,t._nSideBlockCount,0,t.multiResolutionTranslation.w,0,t._nBlockLength,0);var r=tt$h.LINEAR,o=rt$i.LINEAR;a._filterMode===k$Q.FilterMode.NEAREST&&(r=tt$h.NEAREST,o=rt$i.NEAREST);for(i=e.imageDatas.length,n=0;n<i;n++){var s=new t$V({context:a._context,width:t._nLength,height:t._nLength,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:r,magnificationFilter:o})});s.copyFrom({width:t._nLength,height:t._nLength,arrayBufferView:e.imageDatas[n]}),t._volTextures.push(s)}a._textureLevelLoaded=!0;for(n=0;n<e.unzipTile.length;n++){var l=e.unzipTile[n].index,u=e.unzipTile[n].buffer;O[l]._arrayBuffer=u,O[l]._s3mLoadState=N$P.TRANSFORMED}for(n=0;n<O.length;n++)O[n]._s3mLoadState=N$P.TRANSFORMED}))}}var V=[];for(p=0;p<this._multiTextures.length;p++)V.push(this._multiTextures[p]);p=0;for(V.length>3&&(p=V.length-3),this._voxelGridTile._multiTextures=[];p<V.length;p++)this._voxelGridTile._multiTextures.push(V[p])}},g$d.prototype.loadEntity=function(e){e.load(this)},g$d.prototype.addClipPlane=function(e){this._clipPlanes.length>=6?console.log("at most 6 clipping planes can be specified"):(this._clipPlanes.push(e),e$2b(this._voxelGridTile)&&this._voxelGridTile._clipPlaneChanged(this))},g$d.prototype.removeAllClipPlanes=function(){var e=this._clipPlanes.length;this._clipPlanes.length=0,e$2b(this._voxelGridTile)&&e>0&&this._voxelGridTile._clipPlaneChanged(this)},g$d.prototype.removeClipPlane=function(e){e<0||e>=6||(this._clipPlanes.splice(e,1),e$2b(this._voxelGridTile)&&this._voxelGridTile._clipPlaneChanged(this))},g$d.prototype.getNumberOfClipPlanes=function(){return this._clipPlanes.length},g$d.prototype.startRender=function(e){if(this._startRender=!0,e$2b(this._voxelGridTile)){var t;if(this._voxelGridTile._setDataBounds(this._layerBounds),this._voxelGridTile._setZBounds(this._zBounds),e$2b(this._NetCDFBuffer))t=this._voxelGridTile._loadData(this._NetCDFBuffer,e),this._minFiltration==Number.MIN_VALUE&&(this._minFiltration=this._voxelGridTile._floor),this._maxFiltration==Number.MAX_VALUE&&(this._maxFiltration=this._voxelGridTile._ceil);else if(e$2b(this._volumeBuffer)){var i=this._cellWidth,n=this._cellHeight,r=this._availableNode[this._voxelGridTile._level];r.EndCol-1==this._voxelGridTile._x&&(i=r.Width-this._voxelGridTile._x*i),r.EndRow-1==this._voxelGridTile._y&&(n=r.Height-this._voxelGridTile._y*n),t=this._voxelGridTile._loadVolume(this._volumeBuffer,{maxValue:this._ceil,minValue:this._floor,time:this._time,xDimSize:this._cellWidth,yDimSize:this._cellHeight,zDimSize:this._cellDepth,xValidSize:i,yValidSize:n,zValidSize:this._cellDepth})}this._voxelGridTile._initialize(this,this._frameState,t)}},g$d.prototype.render=function(e,t){},g$d.prototype.releaseSelection=function(e,t){},g$d.prototype.isDestroyed=function(){return!1},g$d.prototype.destroy=function(){return e$2b(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),e$2b(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),e$2b(this._voxelGridTile)&&(this._voxelGridTile.destroy(),this._voxelGridTile=void 0),this._NetCDFInfo=void 0,this._NetCDFData=void 0,this._NetCDFBuffer=void 0,i$10(this)};var R$6="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\nuniform sampler2D u_opaque;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 opaque = texture2D(u_opaque, v_textureCoordinates);\nvec4 accum = texture2D(u_accumulation, v_textureCoordinates);\nfloat r = texture2D(u_revealage, v_textureCoordinates).r;\nvec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\ngl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\n}\n";function a$5(e){this._framebuffer=void 0,this._outputFramebuffer=void 0,this._accumulationTexture=void 0,this._revealageTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._passType=Le$s.OPAQUE,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},this.billboardQuality=.5,this.enable=!1}Object.defineProperties(a$5.prototype,{});var B$5={enabled:!0,color:new e$1U(0,0,0,0),equationRgb:b$19.ADD,equationAlpha:b$19.ADD,functionSourceRgb:l$14.ONE,functionDestinationRgb:l$14.ONE,functionSourceAlpha:l$14.ZERO,functionDestinationAlpha:l$14.ONE_MINUS_SOURCE_ALPHA},o$9=new f$18;function E$6(e,t){var i=e[t.id];if(!e$2b(i)||i.viewport.width!=o$9.width||i.viewport.height!=o$9.height){var n=d$1m.getState(t);n.depthMask=!1,n.blending=B$5,n.viewport=o$9,i=d$1m.fromCache(n),e[t.id]=i}return i}function T$8(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy(),e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy(),e._outputFramebuffer=e._outputFramebuffer&&!e._outputFramebuffer.isDestroyed()&&e._outputFramebuffer.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}function O$6(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._hdr?t.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT:_$$.UNSIGNED_BYTE;e._outputFramebuffer=new t$W({context:t,colorTextures:[new t$V({context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:V$10.RGBA,pixelDatatype:r})],destroyAttachments:!0}),e._accumulationTexture=new t$V({context:t,width:i,height:n,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT});var o=new Float32Array(i*n*4);e._revealageTexture=new t$V({context:t,pixelFormat:V$10.RGBA,pixelDatatype:_$$.FLOAT,source:{arrayBufferView:o,width:i,height:n},flipY:!1}),e._framebuffer=new t$W({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1})}function H$6(e,t){var i=new s$U({sources:[R$6]}),n={u_accumulation:function(){return e._accumulationTexture},u_revealage:function(){return e._revealageTexture},u_opaque:function(){return e._opaqueTexture}},r=d$1m.fromCache({});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:e._passType,owner:e}),e._clearCommand=new t$X({framebuffer:e._framebuffer,color:new e$1U(0,0,0,1),depth:1,renderState:d$1m.fromCache(),pass:e._passType,owner:e})}function M$6(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._accumulationTexture,o=!1,a=e$2b(r)&&(r.width!==i||r.height!==n);return(!e$2b(r)||a)&&(T$8(e),O$6(e,t),H$6(e,t),o=!0),o}function w$4(e){return e.drawBuffers&&e.fragmentDepth}function _$8(e){if(!e$2b(e.provider))throw new t$16("options.provder and options.viewer is required.");this._provider=e.provider,this._inner=e.layer,this._imagelayerCollection=e.imagelayerCollection,this._name=e.name,this._billboardCollection=new w$N({ignoreShow:!0,scene:e.scene}),this._imageIconBillboard={},this._textBillboard={},this._imageCanvas={},this.kmlLayer=new U$m({camera:e.scene.camera,canvas:e.scene.canvas}),this.kmlLayer.clustering.enabled=!0,this.kmlLayer.clustering.pixelRange=10,e$2b(e.viewer)&&e.viewer.dataSources.add(this.kmlLayer),this.kmlLayer.clustering.clusterEvent.addEventListener((function(e,t){if(e.length>0&&e[0].billboard){var i=e[0].billboard;t.billboard.position=e[0].position.getValue(0),t.billboard.image=i.image.getValue(),t.billboard.scale=i.scale.getValue(),t.billboard.heightReference=i.heightReference.getValue(),t.billboard.scaleByDistance=i.scaleByDistance.getValue(),t.billboard.pixelOffset=i.pixelOffset.getValue()}if(e.length>0&&e[0].label){var n=e[0].label;t.label.position=e[0].position.getValue(0),t.label.text=n.text.getValue(),t.label.font=n.font.getValue(),t.label.verticalOrigin=n.verticalOrigin.getValue(),t.label.horizontalOrigin=n.horizontalOrigin.getValue(),t.label.heightReference=n.heightReference.getValue(),t.label.pixelOffset=n.pixelOffset.getValue(),t.label.scaleByDistance=n.scaleByDistance.getValue(),e$2b(n.style)&&(t.label.style=n.style.getValue()),t.label.fillColor=n.fillColor.getValue()}}))}function E$5(e,t){return t.level-e.level}a$5.isSupported=w$4,a$5.prototype.getOutputFramebuffer=function(){return this._outputFramebuffer},a$5.prototype.update=function(e,t,i){if(w$4(e.context)&&this.enable){var n=e.context;this._screenWidth=Math.floor(n.drawingBufferWidth*this.billboardQuality),this._screenHeight=Math.floor(n.drawingBufferHeight*this.billboardQuality),o$9.width=this._screenWidth,o$9.height=this._screenHeight,this._opaqueTexture=t.getColorTexture(0),this._hdr=i,M$6(this,n)}},a$5.prototype.execute=function(e,t){!e$2b(this._drawCommand)||!this.enable||this._drawCommand.execute(e,t)},a$5.prototype.clear=function(e,t){!e$2b(this._clearCommand)||!this.enable||this._clearCommand.execute(e,t)},a$5.prototype.createDerivedCommands=function(e){!e$2b(e)||(this.enable=!0,e.framebuffer=this._framebuffer,e.renderState=E$6(this._renderStateCache,e.renderState))},a$5.prototype.isDestroyed=function(){return!1},a$5.prototype.destroy=function(){return T$8(this),i$10(this)},Object.defineProperties(_$8.prototype,{tileWidth:{get:function(){return this._provider._tileWidth}},tileHeight:{get:function(){return this._provider._tileHeight}},maximumLevel:{get:function(){return this._provider._ready?this._provider._maximumLevel:-1}},minimumLevel:{get:function(){return this._provider._ready?this._provider._minimumLevel:-1}},tilingScheme:{get:function(){return this._provider._tilingScheme}},rectangle:{get:function(){return this._provider._ready?this._provider._rectangle:null}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._provider._errorEvent}},ready:{get:function(){return this._provider._ready}},readyPromise:{get:function(){return this._provider.readyPromise}},hasAlphaChannel:{get:function(){return!0}},show:{get:function(){return this._inner.show},set:function(e){this._inner.show=e}},mapboxStyle:{get:function(){return this._provider.mapboxStyle},set:function(e){this._provider.mapboxStyle=e}},alpha:{get:function(){return this._inner.alpha},set:function(e){this._inner.alpha=e}},selectColor:{get:function(){return this._inner._selectColor},set:function(e){this._inner._selectColor=e}},name:{get:function(){return this._name},set:function(e){this._name=e}},pausing:{get:function(){return this._inner._pausing},set:function(e){this._inner._pausing=e,this._provider._pausing=e}},indexedDBSetting:{get:function(){return this._provider._indexedDBSetting},set:function(e){e$2b(e)&&"boolean"==typeof e.isOpen&&(this._provider._indexedDBSetting.isOpen=e.isOpen)}}});var b$9=new o$1o,T$7=new o$1p,d$c=new o$Y;function D$5(e){return Array.isArray(e)?"rgb("+e[0]+","+e[1]+","+e[2]+")":""}function y$8(e,t,i,n){var r=t.getGeometry().getFlatCoordinates(),o=r[0],a=r[1],s=i[0]*o+i[2]*a+i[4],l=i[1]*o+i[3]*a+i[5],u=s/e._canvasWidth,c=l/e._canvasWidth,h=n.west+n.width*u,d=n.south+n.height*(1-c);return o$1p.fromRadians(h,d,0,t$13.WGS84,T$7),T$7}function G$6(e){var t=e.getId();return t-=16777216*Math.floor(t/16777216)}_$8.prototype.createIconImageBillboard=function(e){if(e$2b(e.iconImageObjects))for(var t=e.rectangle,i=e.transform,n=0,r=e.iconImageObjects.length;n<r;n++){var o=e.iconImageObjects[n],a=o.feature,s=a.index;if(e$2b(this._imageIconBillboard[s])){var l=this._imageIconBillboard[s];e.level>l.level&&(l.position=y$8(this._provider,a,i,t),l.level=e.level)}else{var u,c=o.style.layout;if(e$2b(c)&&e$2b(c["icon-image"])){var h=c["icon-image"],d=u$_(c["icon-size"],1);if(e$2b(this._imageCanvas[h]))u=this._imageCanvas[h];else{var f=this._provider._subSpriteImage[h];if(!e$2b(f))continue;(u=document.createElement("canvas")).width=f.width,u.height=f.height,u.getContext("2d").putImageData(f,0,0),this._imageCanvas[h]=u}}b$9.x=0,b$9.y=-u.height/2,d$c.near=1500,d$c.nearValue=1.5,d$c.far=8e6,d$c.farValue=0;var p=this._billboardCollection.add({image:u,scale:d,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:k$P.CLAMP_TO_GROUND,pixelOffset:b$9,scaleByDistance:d$c,id:G$6(a)});p.position=y$8(this._provider,a,i,t),p.level=e.level,this._imageIconBillboard[s]=p}}},_$8.prototype.createTextBillboard=function(e){if(e$2b(e.textObjects))for(var t=e.rectangle,i=e.transform,n=0;n<e.textObjects.length;n++){var r=e.textObjects[n],o=r.feature,a=o.index;if(e$2b(this._textBillboard[a])){var s=this._textBillboard[a];e.level>s.level&&(s.position=y$8(this._provider,o,i,t),s.level=e.level)}else{var l=r.style,u=l.getText(),c=l.textSize,h=u.getText(),d=u.getFont(d),f=u.getTextAlign(),p=document.createElement("canvas"),_=p.getContext("2d"),m=c+"px "+d;_.font=m,_.textBaseline="top",_.textAlign=f;var g=_.measureText(h).width+2;p.width=g,p.height=c+1,_.font=m;var x=u.getFill(),v=u.getStroke();e$2b(v)&&(_.strokeStyle=D$5(v.getColor()),_.lineWidth=v.getWidth(),_.strokeText(h,0,c-3)),e$2b(x)&&(_.fillStyle=D$5(x.getColor()),_.fillText(h,0,c-3)),b$9.x=0,b$9.y=-p.height/2,d$c.near=1500,d$c.nearValue=2,d$c.far=1e6,d$c.farValue=0;var y=this._billboardCollection.add({image:p,imageId:h,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:k$P.CLAMP_TO_GROUND,pixelOffset:b$9,scaleByDistance:d$c,verticalOrigin:S$O.TOP,horizontalOrigin:j$T.LEFT});y.position=y$8(this._provider,o,i,t),y.level=e.level,this._textBillboard[a]=y}}},_$8.prototype.update=function(e,t){if(e$2b(this._billboardCollection)){var i=this._inner._imageryCache,n=[];for(var r in i)n.push(i[r]);n.sort(E$5);for(var o=0;o<n.length;o++){var a=n[o];!a.isMvtTexture||a.isRendered||(a.isRendered=!0)}this._billboardCollection.update(t)}},_$8.prototype.getProperty=function(e){return this._provider.getProperty(e)},_$8.prototype.refresh=function(){e$2b(this._billboardCollection)&&this._billboardCollection.removeAll();var e=this._inner._imageryCache;for(var t in e)e[t].isRendered=!1;this._imageIconBillboard={},this._textBillboard={},this._imagelayerCollection.remove(this._inner),this._inner=this._imagelayerCollection.addImageryProvider(this._provider)},_$8.prototype.isDestroyed=function(){return!1},_$8.prototype.destroy=function(){return this._imagelayerCollection.remove(this._inner),e$2b(this._billboardCollection)&&(this._billboardCollection.destroy(),this._billboardCollection=null),i$10(this)};var e$3={NONE:0,ByKeyboard:1},Ct=Object.freeze(e$3);function r$d(e){if(!e$2b(e))throw new t$16("scene are required.");this._scene=e,this._context=e._context,this._s3mInstanceCollection=new _0x448857(e._context),this._s3mInstanceCollection._profile=!0,this._s3mInstanceCollection.minVisibleAltitude=-9e3,e.primitives.add(this._s3mInstanceCollection),this._textureAtlas=null,this._profileRenders=[],this._spatialQueryList=[],this._section=!0,this._name="solidModelsProfile"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this),this._modelInfo={},this._dataIndex=0,this._selectedProfileIDs=[],this._clippingType=R$J.KeepInside,this._visibleViewport=4095;var t=this,i=0;this._modelCount=0,this._modelPosition=[],this._addedEvent=new o$1h,this._s3mInstanceCollection.addedEvent.addEventListener((function(){++i===t._modelCount&&t._addedEvent.raiseEvent({modelPosition:t._modelPosition})})),this._volume=void 0}function K$2(e,t){var i=t._group;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=i[n];if(!e$2b(o)||0===o.renderEntities.length)continue;var a=o.renderEntities[0];r.texture=a._texture}}function H$5(e){this.pickColor=new o$1p,this.id=u$_(e.id,0),e$2b(e.color)?this.color=e$1U.clone(e.color):this.color=e$1U.fromRandom({alpha:1}),this.textureAtlasID=-1,e$2b(e.textureMapParameter)?(this.textureTilingU=u$_(e.textureMapParameter.UTiling,1),this.textureTilingV=u$_(e.textureMapParameter.VTiling,1)):(this.textureTilingU=1,this.textureTilingV=1)}function S$2(e){return e===R$J.KeepOutside?j$X.Disjoint:j$X.Intersects}Object.defineProperties(r$d.prototype,{selectedModelIDs:{get:function(){return this._selectedProfileIDs}},clippingType:{get:function(){return this._clippingType},set:function(e){if(e!==this._clippingType){this._clippingType=e;for(var t=0;t<this._spatialQueryList.length;t++)this._spatialQueryList[t].positionMode=S$2(this._clippingType);for(t=0;t<this._profileRenders.length;t++)this._profileRenders[t]._clippingType=e}}},addedEvent:{get:function(){return this._addedEvent}},volume:{get:function(){return this._volume},set:function(e){this._volume=e,this._s3mInstanceCollection._volume=e}},mixColorType:{get:function(){return this._s3mInstanceCollection._mixColorType},set:function(e){this._s3mInstanceCollection._mixColorType!==e&&(this._s3mInstanceCollection._mixColorType=e)}}}),r$d.prototype.addProfileGeometry=function(e){if(e$2b(e)){var t=e;Array.isArray(e)&&(t=new h$8(e),e$2b(this._volume)&&(t._volBounds=this._volume._volBounds));var i=new f$a(this,this._profileRenders.length,this._modelInfo,t);i._clippingType=this._clippingType,e$2b(this._volume)&&(i._attributeLocations.aRatio=3,i._volume=this._volume),this._profileRenders.push(i)}},r$d.prototype.clearProfile=function(){this._profileRenders.map((function(e){e.destroy()})),this._profileRenders=[],this._s3mInstanceCollection._profile=!1,this._s3mInstanceCollection._spatialQueryEnable=!1,this._s3mInstanceCollection.clampToObject=!1},r$d.prototype.addProfilePlane=function(e){},r$d.prototype.addProfileCylinder=function(e){},r$d.prototype.setClipGeometry=function(e){if(e.geoType!==P$U.GEOREGION3D&&e.geoType!==P$U.GEOCYLINDER&&e.geoType!==P$U.GEOBOX&&e.geoType!==P$U.GEOMODEL3D&&!(e instanceof N$y))return!1;var t=new _0x4d0d03(this._scene);t.geometry=e,t.positionMode=S$2(this._clippingType),this._s3mInstanceCollection._profileMode=1,t._beQueryCollection=this._s3mInstanceCollection,this._s3mInstanceCollection._spatialQueryEnable=!0,t._profile=!0,0==this._spatialQueryList.length&&this._scene._renderPipeline.addEventListener(k$f.BeforeExecuteCommands,r$d.prototype._updateTextures,this),this._spatialQueryList.push(t)},r$d.prototype.addModels=function(e){var t=this;e.map((function(e){var i=new H$5(e),n={id:i.id,primitive:t};i.profilePickId=t._context.createPickId(n),t._modelInfo[e.model]=i,t.requestImage(e.model,e.texture),t.requestModel(e.model,e.color,e.id),t._modelCount++}))},r$d.prototype.requestImage=function(e,t){if(e$2b(t)){var i=this;e$2b(this._textureAtlas)||(this._textureAtlas=new v$I({context:this._scene._context})),this._textureAtlas.addImage(t,t).then((function(t){i._modelInfo[e].textureAtlasID=t}))}},r$d.prototype.requestModel=function(e,t,i){var n=u$_(i,(o=this)._dataIndex);if(e$2b(e)){var r=e.replace(/\?returnContent=.*$/,"");if(".json"===(r=r.substring(r.length-5).toLowerCase()))if(e.indexOf("spatialAnalysis-")>-1){var o=this;p$_({url:e,responseType:"arraybuffer",method:"POST",data:JSON.stringify({sourceDatasetFilter:{attributeFilter:""},isLonlat:!0,returnStream:!0}),headers:{"Content-type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then((function(i){var r=new DataView(i),a=0,s=r.getInt32(a,!0);a+=4;var l=a$K(new Uint8Array(i,a,s)),u=JSON.parse(l);a+=s;var c=r.getInt32(a,!0);a+=4;var h,d,f=[];for(h=0;h<c;h++)d=r.getInt32(a,!0),f.push(d),a+=4;var p=[];for(h=0;h<c;h++){if(0===(d=f[h]))p.push(null);else{var _=new Uint8Array(i,a,d);p.push(new Uint8Array(_).buffer)}a+=d}var m=u.geometries[0],g={};g.id=n,g.position=m.position,o._modelPosition.push(g),o._s3mInstanceCollection.add(e,{position:o$1p.fromDegrees(m.position.x,m.position.y,m.position.z),color:t,id:n,scale:new o$1p(m.scaleX,m.scaleY,m.scaleZ)},p[0],!1);var x=o._s3mInstanceCollection.getInstance(e,n),v=o._modelInfo[e].pickColor;v.x=x._pickColor.x,v.y=x._pickColor.y,v.z=x._pickColor.z,o._dataIndex++}))}else u$Q(e).then((function(i){if(null!=i.geometry){var r=new Uint8Array(i.geometry.model),a={};a.id=n,a.position=i.geometry.position,o._modelPosition.push(a),o._s3mInstanceCollection.add(e,{position:o$1p.fromDegrees(i.geometry.position.x,i.geometry.position.y,i.geometry.position.z),color:t,id:n,scale:new o$1p(i.geometry.scaleX,i.geometry.scaleY,i.geometry.scaleZ),hpr:i$15.fromDegrees(-i.geometry.rotationZ,i.geometry.rotationX,i.geometry.rotationY)},r.buffer);var s=o._s3mInstanceCollection.getInstance(e,n),l=o._modelInfo[e].pickColor;l.x=s._pickColor.x,l.y=s._pickColor.y,l.z=s._pickColor.z,o._dataIndex++}}));else o$10(e).then((function(i){var r=new DataView(i),a=0,s=r.getInt32(a,!0);a+=4;var l=a$K(new Uint8Array(i,a,s)),u=JSON.parse(l).geometry;if(null!=u){var c={};c.id=n,c.position=u.position,o._modelPosition.push(c),a+=s;var h=r.getInt32(a,!0);a+=4;var d,f,p=[];for(d=0;d<h;d++)f=r.getInt32(a,!0),p.push(f),a+=4;var _=[];for(d=0;d<h;d++){if(0===(f=p[d]))_.push(null);else{var m=new Uint8Array(i,a,f);_.push(new Uint8Array(m).buffer)}a+=f}o._s3mInstanceCollection.add(e,{position:o$1p.fromDegrees(u.position.x,u.position.y,u.position.z),color:t,id:n,scale:new o$1p(u.scaleX,u.scaleY,u.scaleZ),hpr:i$15.fromDegrees(-u.rotationZ,u.rotationX,u.rotationY)},_[0],!1);var g=o._s3mInstanceCollection.getInstance(e,n);o._modelInfo[e].color=g._color;var x=o._modelInfo[e].pickColor;x.x=g._pickColor.x,x.y=g._pickColor.y,x.z=g._pickColor.z,o._dataIndex++}}))}},r$d.prototype.build=function(){this._s3mInstanceCollection._profile=!0,this._s3mInstanceCollection.clampToObject=!0;for(var e=0;e<this._profileRenders.length;e++){this._profileRenders[e]._build()}},r$d.prototype.setSelected=function(e){this._selectedProfileIDs=[],this._selectedProfileIDs.push(e)},r$d.prototype.releaseSelection=function(){this._selectedProfileIDs=[]},r$d.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$16("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},r$d.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$16("the index is 0~8");return 1<<e&this._visibleViewport},r$d.prototype.clear=function(){for(var e in e$2b(this._textureAtlas)&&(this._textureAtlas.destroy(),this._textureAtlas=null),this._profileRenders.map((function(e){e.destroy()})),this._profileRenders=[],this._s3mInstanceCollection._spatialQueryEnable=!1,this._spatialQueryList.map((function(e){e.destroy()})),this._spatialQueryList=[],this._scene._renderPipeline.removeEventListener(k$f.BeforeExecuteCommands,r$d.prototype._updateTextures,this),this._modelInfo)this._s3mInstanceCollection.removeCollection(e);this._s3mInstanceCollection.clampToObject=!1,this._modelInfo={},this._dataIndex=0},r$d.prototype.destroy=function(){return this.clear(),this._scene._analyst3D.remove(this._name,!0),this._scene.primitives.remove(this._s3mInstanceCollection),this._s3mInstanceCollection.destroy(),i$10(this)},r$d.prototype.update=function(e,t,i){this._spatialQueryList.map((function(n){n.update(e,t,i)}));var n=this._s3mInstanceCollection.clampToObject;K$2(this._modelInfo,this._s3mInstanceCollection),this._profileRenders.map((function(r){r.update(e,t,i,n)}))},r$d.prototype._updateTextures=function(){var e=this._scene._frameState,t=this;this._spatialQueryList.map((function(i){i._updateTextures(t._context,e)}))};var h$7=81;function G$5(){this.powers=new Array(h$7)}var _$7=[[.0014,0,.0065],[.0022,1e-4,.0105],[.0042,1e-4,.0201],[.0076,2e-4,.0362],[.0143,4e-4,.0679],[.0232,6e-4,.1102],[.0435,.0012,.2074],[.0776,.0022,.3713],[.1344,.004,.6456],[.2148,.0073,1.0391],[.2839,.0116,1.3856],[.3285,.0168,1.623],[.3483,.023,1.7471],[.3481,.0298,1.7826],[.3362,.038,1.7721],[.3187,.048,1.7441],[.2908,.06,1.6692],[.2511,.0739,1.5281],[.1954,.091,1.2876],[.1421,.1126,1.0419],[.0956,.139,.813],[.058,.1693,.6162],[.032,.208,.4652],[.0147,.2586,.3533],[.0049,.323,.272],[.0024,.4073,.2123],[.0093,.503,.1582],[.0291,.6082,.1117],[.0633,.71,.0782],[.1096,.7932,.0573],[.1655,.862,.0422],[.2257,.9149,.0298],[.2904,.954,.0203],[.3597,.9803,.0134],[.4334,.995,.0087],[.5121,1,.0057],[.5945,.995,.0039],[.6784,.9786,.0027],[.7621,.952,.0021],[.8425,.9154,.0018],[.9163,.87,.0017],[.9786,.8163,.0014],[1.0263,.757,.0011],[1.0567,.6949,.001],[1.0622,.631,8e-4],[1.0456,.5668,6e-4],[1.0026,.503,3e-4],[.9384,.4412,2e-4],[.8544,.381,2e-4],[.7514,.321,1e-4],[.6424,.265,0],[.5419,.217,0],[.4479,.175,0],[.3608,.1382,0],[.2835,.107,0],[.2187,.0816,0],[.1649,.061,0],[.1212,.0446,0],[.0874,.032,0],[.0636,.0232,0],[.0468,.017,0],[.0329,.0119,0],[.0227,.0082,0],[.0158,.0057,0],[.0114,.0041,0],[.0081,.0029,0],[.0058,.0021,0],[.0041,.0015,0],[.0029,.001,0],[.002,7e-4,0],[.0014,5e-4,0],[.001,4e-4,0],[7e-4,2e-4,0],[5e-4,2e-4,0],[3e-4,1e-4,0],[2e-4,1e-4,0],[2e-4,1e-4,0],[1e-4,0,0],[1e-4,0,0],[1e-4,0,0],[0,0,0]];G$5.prototype.toXYZ=function(){for(var e=new o$1p(0,0,0),t=1;t<h$7;t++){var i=t+0;i>h$7-1&&(i=h$7-1),i<1&&(i=1),e.x+=this.powers[i]*_$7[t][0],e.y+=this.powers[i]*_$7[t][1],e.z+=this.powers[i]*_$7[t][2]}return e};var t0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,.003,.004,.006,.007,.009,.011,.014,.017,.021,.025,.03,.035,.04,.044,.048,.055,.063,.071,.075,.08,.085,.091,.12,.12,.12,.12,.12,.12,.12,.119,.12,.12,.12,.1,.09,.09,.085,.08,.075,.07,.07,.065,.06,.055,.05,.045,.04,.035,.028,.25,.023,.02,.018,.016,.012,.012,.012,.012,.01,.01,.01,.008,.007,.006,.005,.003,0],L$8=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.15,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0],n$8=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.075,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.016,.015,.014,.013,.0125,1.8,2.3,2.5,2.3,1.8,.061,.003,8e-4,1e-4,1e-5,1e-5,1e-4,3e-4,6e-4];G$5.prototype.applyAtmosphericTransmittance=function(e,t,i,n,r,o){var a=.04608*i-.04586,s=e$2a.toDegrees(e);if(s<90){var l=1;l=1/(t+.50572*Math.pow(96.07995-s,-1.6364));l*=1;l*=Math.exp(-n/8435);for(var u=1.003454/Math.sqrt(t*t+.006908),c=Math.log(.35),h=c*(1.459+c*(.1595+.4129*c)),d=c*(.0783+c*(-.3824-.5874*c)),f=1-.5*Math.exp((h+d/1.8)/1.8),p=1-.5*Math.exp((h+d*t)*t),_=0;_<h$7;_++){var m,g=.38+.005*_,x=Math.exp(-l/(Math.pow(g,4)*(115.6406-1.3366/(g*g))));m=g<.5?1.0274:1.206;var v=a*Math.pow(2*g,-m),y=Math.exp(-v*l),$=2.5*n$8[_]*l,b=Math.exp(-.2385*$/Math.pow(1+20.07*$,.45)),T=Math.exp(.35*-t0[_]*u),C=Math.exp(-1.41*L$8[_]*l/Math.pow(1+118.3*L$8[_]*l,.45)),S=Math.log(g/.4),w=.945*Math.exp(-.095*S*S),E=Math.exp(-w*v*l),P=Math.exp((w-1)*v*l),A=Math.exp(-1.8/(g*g*g*g)*(115.6406-1.3366/(g*g))),L=Math.exp(-.4293*n$8[_]*2.5/Math.pow(1+36.126*n$8[_]*2.5,.45)),M=Math.exp(-2.538*L$8[_]/Math.pow(1+212.94*L$8[_],.45)),R=Math.exp(-w*v*1.8),O=Math.exp((w-1)*v*1.8),I=x*y*b*T*C;r.powers[_]=this.powers[_]*I;var D=this.powers[_]*T*b*C*t*P,B=1;g<=.45&&(B=Math.pow(g+.55,1.8));var N=L*M*O*(.5*(1-A)+(1-f)*A*(1-R)),F=D*(1-Math.pow(x,.95))/2,U=D*Math.pow(x,1.5)*(1-E)*p,G=.3*(r.powers[_]*t+F+U)*N/(1-.3*N);o.powers[_]=(F+U+G)*B,o.powers[_]<0&&(o.powers[_]=0)}}else for(_=0;_<h$7;_++)r.powers[_]=0,o.powers[_]=0};var a$4=[[.3,.305,.31,.315,.32,.325,.33,.335,.34,.345,.35,.36,.37,.38,.39,.4,.41,.42,.43,.44,.45,.46,.47,.48,.49,.5,.51,.52,.53,.54,.55,.57,.593,.61,.63,.656,.6676,.69,.71,.718,.7244,.74,.7525,.7575,.7625,.7675,.78,.8,.816,.8237,.8315,.84,.86,.88,.905,.915,.925,.93,.937,.948,.965,.98,.9935,1.04,1.07,1.1,1.12,1.13,1.145,1.161,1.17,1.2,1.24,1.27,1.29,1.32,1.35,1.395,1.4425,1.4625,1.477,1.497,1.52,1.539,1.558,1.578,1.592,1.61,1.63,1.646,1.678,1.74,1.8,1.86,1.92,1.96,1.985,2.005,2.035,2.065,2.1,2.148,2.198,2.27,2.36,2.45,2.5,2.6,2.7,2.8,2.9,3,3.1,3.2,3.3,3.4,3.5,3.6,3.7,3.8,3.9,4],[535.9,558.3,622,692.7,715.1,832.9,961.9,931.9,900.6,911.3,975.5,975.9,1119.9,1103.8,1033.8,1479.1,1701.3,1740.4,1587.2,1837,2005,2043,1987,2027,1896,1909,1927,1831,1891,1898,1892,1840,1768,1728,1658,1524,1531,1420,1399,1374,1373,1298,1269,1245,1223,1205,1183,1148,1091,1062,1038,1022,998.7,947.2,893.2,868.2,829.7,830.3,814,786.9,768.3,767,757.6,688.1,640.7,606.2,585.9,570.2,564.1,544.2,533.4,501.6,477.5,442.7,440,416.8,391.4,358.9,327.5,317.5,307.3,300.4,292.8,275.5,272.1,259.3,246.9,244,243.5,234.8,220.5,190.8,171.1,144.5,135.7,123,123.8,113,108.5,97.5,92.4,82.4,74.6,68.3,63.8,49.5,48.5,38.6,36.6,32,28.1,24.8,22.1,19.6,17.5,15.7,14.1,12.7,11.5,10.4,9.5,8.6]],i$9=81,p$4=5;function o$8(){G$5.call(this);for(var e=a$4[1].length,t=1,i=.38,n=0;n<i$9;n++){for(var r=i+.001*p$4;t<e-1&&a$4[0][t]<=r;)t++;this.powers[n]=a$4[1][t],i+=.001*p$4}}function a$3(){}function u$a(e){var t,i=Math.log(e);return t=i<=-3.94?-2.86:i>=-1.44?i-.395:Math.pow(.405*i+1.6,2.18)-2.86,Math.exp(t)}function n$7(e){var t,i=Math.log(e);return t=i<=-2.6?-.72:i>=1.9?i-1.255:Math.pow(.249*i+.65,2.7)-.72,Math.exp(t)}o$8.prototype=Object.create(G$5.prototype),o$8.prototype.constructor=G$5,a$3.Ldmax=100,a$3.LsavgC=100,a$3.LsavgR=100,a$3.k=1,a$3.mR=1,a$3.mC=1,a$3.disableToneMapping=!1,a$3.setSceneLogAvg=function(e,t){e<0&&(e=0),t<0&&(t=0),a$3.LsavgR=e/.8,a$3.LsavgC=t/.8,a$3.computeScaleFactors()},a$3.durandMapperXYZ=function(e){var t=a$3.k,i=a$3.mR,n=a$3.Ldmax,r=a$3.mC,o=-.702*e.x+1.039*e.y+.433*e.z;o<0&&(o=0);var a=new o$1p(.3*o,.3*o,.4*o),s=o$1p.multiplyByScalar(e,(1-t)*r,new o$1p),l=o$1p.multiplyByScalar(a,t*i,new o$1p),u=o$1p.add(s,l,new o$1p);e=o$1p.multiplyByScalar(u,1/n,e)},a$3.computeScaleFactors=function(){var e,t,i;a$3.Ldmax=100,e=a$3.Ldmax,t=a$3.LsavgR,i=a$3.LsavgC;var n=n$7(e);a$3.mR=n/u$a(t),a$3.mC=n/n$7(i);a$3.k=(100-.25*t)/(100+t),a$3.k<0&&(a$3.k=0)};var P$7=new p$1e(2.37067,-.90004,-.470634,-.513885,1.4253,.0885814,.00529818,-.0146949,1.0094);function l$a(){this._oneOverGammaHosek=1/2.4,this._T=3,this._lastSunT=0,this._lastSunZenith=0,this._lastMoonT=0,this._lastMoonZenith=0,this._lastMoonPhase=0,this._ephemeris=void 0,this._perezBlend=0,this._isothermalEffect=0,this._sunAboveHorizon=!1,this._sunSpectrum=new o$8,this._sunTransmittedLuminance=void 0,this._sunScatteredLuminance=void 0,this._sunTransmittedLuminanceSeaLevel=void 0,this._sunScatteredLuminanceSeaLevel=void 0,this._lunarSpectrum=new o$8,this._moonTransmittedLuminance=void 0,this._moonScatteredLuminance=void 0,this._moonTransmittedLuminanceSeaLevel=void 0,this._moonScatteredLuminanceSeaLevel=void 0,this._maxSkylightLuminance=1,this._monochromeAmbient=!0,this._lightPollution=0,this._nightSkyScale=1,this._skyLight=new e$1U,this._twilightLuminance=[],k$4(this),this._lightingChanged=!1}function k$4(e){e._twilightLuminance={},e._twilightLuminance[5]=2200,e._twilightLuminance[4]=1800,e._twilightLuminance[3]=1400,e._twilightLuminance[2]=1200,e._twilightLuminance[1]=710,e._twilightLuminance[0]=400,e._twilightLuminance[-1]=190,e._twilightLuminance[-2]=77,e._twilightLuminance[-3]=28,e._twilightLuminance[-4]=9.4,e._twilightLuminance[-5]=2.9,e._twilightLuminance[-6]=.9,e._twilightLuminance[-7]=.3,e._twilightLuminance[-8]=.11,e._twilightLuminance[-9]=.047,e._twilightLuminance[-10]=.021,e._twilightLuminance[-11]=.0092,e._twilightLuminance[-12]=.0031,e._twilightLuminance[-13]=.0022,e._twilightLuminance[-14]=.0019,e._twilightLuminance[-15]=.0018,e._twilightLuminance[-16]=.0018;for(var t in e._twilightLuminance){var i=e._twilightLuminance[t];e._twilightLuminance[t]=i/Math.PI*.1}}var p$3=new o$1p;l$a.prototype.getToneMappedSkyLight=function(){return this._skyLight};var O$5=new o$1p;function e$2(){this.year=0,this.month=0,this.day=0,this.hours=0,this.minutes=0,this.seconds=0,this.observingDST=!0,this.zoneCorrection=8}function i$8(){this._latitude=0,this._longitude=0,this._altitude=0}function a$2(){this._time=void 0,this._lastTime=new e$2,this._lastLocation=new i$8,this._T=0,this._tuncorr=0,this._epochDays=0,this._sunEclipticLongitude=0,this._sunEcl=new o$1p,this._moonEcl=new o$1p,this._sunEq=new o$1p,this._moonEq=new o$1p,this._eclipticToEquatorial=new p$1e,this._equatorialToGeographic=new p$1e,this._sunGeo=new o$1p,this._moonGeo=new o$1p,this._sunHoriz=new o$1p,this._moonHoriz=new o$1p,this._eclipticToHorizon=new p$1e,this._equatorialToHorizon=new p$1e,this._geographicToEquatorial=new p$1e,this._horizonToEquatorial=new p$1e,this._horizonToGeographic=new p$1e,this._geographicToHorizon=new p$1e,this._horizonToEcliptic=new p$1e,this._moonPhase=void 0,this._moonPhaseAngle=void 0,this._moonDistance=void 0,this._precession=new p$1e,this._forceSunHoriz=!1,this._forceMoonHoriz=!1,this._geoZUp=!0,this._primeMeridianZ=!1}function m$8(e,t,i){var n=new o$1p;return n.x=e*Math.cos(i)*Math.cos(t),n.y=e*Math.sin(i)*Math.cos(t),n.z=e*Math.sin(t),n}function T$6(e){for(;e>2*Math.PI;)e-=2*Math.PI;for(;e<0;)e+=2*Math.PI;return e}function E$4(e){var t=new o$1p;return t.x=e.y,t.y=e.z,t.z=e.x,t}function z$3(e){var t=new o$1p;return t.x=e.z,t.y=e.x,t.z=e.y,t}function q$4(e){var t,i;if(e>e$2a.toRadians(85))t=0;else{if(i=Math.tan(e),e>=e$2a.toRadians(5))t=58.1/i-.07/Math.pow(i,3)+86e-6/Math.pow(i,5);else if(e>=e$2a.toRadians(-.575)){var n=e$2a.toDegrees(e);t=1735+n*(n*(103.4+n*(.711*n-12.79))-518.2)}else t=-20.774/i;t/=3600}return e+e$2a.toRadians(t)}l$a.prototype._computeSun=function(e){var t=this._ephemeris.getSunPositionHorizon(),i=(t=o$1p.normalize(t,O$5)).y;if(this._lastSunT!==this._T||this._lastSunZenith!==i){this._lastSunT=this._T,this._lastSunZenith=i;var n=e$2a.toDegrees(Math.asin(t.y));n+=0,this._perezBlend=n>1?0:n<0?1:1-n;var r=Math.acos(i)-e$2a.toRadians(0),o=e$2a.toRadians(1),a=new G$5,s=new G$5,l=new G$5,u=new G$5;if(.5*Math.PI-r>o){this._sunAboveHorizon=!0,this._sunSpectrum.applyAtmosphericTransmittance(r,i,this._T,e,a,s),this._sunTransmittedLuminance=a.toXYZ(),this._sunScatteredLuminance=s.toXYZ(),e<1e3?(this._sunTransmittedLuminanceSeaLevel=this._sunTransmittedLuminance,this._sunScatteredLuminanceSeaLevel=this._sunScatteredLuminance):(this._sunSpectrum.applyAtmosphericTransmittance(r,i,this._T,0,l,u),this._sunTransmittedLuminanceSeaLevel=l.toXYZ(),this._sunScatteredLuminanceSeaLevel=u.toXYZ());for(var c=r/(.5*Math.PI),h=0;h<6;h++)c*=c;this._sunScatteredLuminance.x*=1+0*c,this._sunScatteredLuminance.y*=1+0*c,this._sunScatteredLuminance.z*=1+0*c,this._sunScatteredLuminanceSeaLevel.x*=1+0*c,this._sunScatteredLuminanceSeaLevel.y*=1+0*c,this._sunScatteredLuminanceSeaLevel.z*=1+0*c}else{this._sunAboveHorizon=!1;var d=Math.floor(n),f=Math.ceil(n);c=n-d;e$2b(this._twilightLuminance[d])||(this._twilightLuminance[d]=0),e$2b(this._twilightLuminance[f])||(this._twilightLuminance[f]=0);var p=this._twilightLuminance[d],_=this._twilightLuminance[f];r=.5*Math.PI-o;this._sunSpectrum.applyAtmosphericTransmittance(r,Math.cos(r),this._T,e,a,s),this._sunTransmittedLuminance=a.toXYZ(),this._sunScatteredLuminance=s.toXYZ(),e<1e3?(this._sunTransmittedLuminanceSeaLevel=this._sunTransmittedLuminance,this._sunScatteredLuminanceSeaLevel=this._sunScatteredLuminance):(this._sunSpectrum.applyAtmosphericTransmittance(r,Math.cos(r),this._T,0,l,u),this._sunTransmittedLuminanceSeaLevel=l.toXYZ(),this._sunScatteredLuminanceSeaLevel=u.toXYZ());var m=(1-c)*p+c*_,g=.25,x=m/g*.25,v=m/g*.5;(c=-n/2)>1&&(c=1),c<0&&(c=0);var y=0*m*(c*=c)+(1-c);o$1p.multiplyByScalar(this._sunTransmittedLuminance,y,this._sunTransmittedLuminance),this._sunScatteredLuminance.x=x*c+this._sunScatteredLuminance.x*(1-c),this._sunScatteredLuminance.y=m*c+this._sunScatteredLuminance.y*(1-c),this._sunScatteredLuminance.z=v*c+this._sunScatteredLuminance.z*(1-c),y=0*m*c+(1-c),o$1p.multiplyByScalar(this._sunScatteredLuminanceSeaLevel,y,this._sunScatteredLuminanceSeaLevel),this._sunScatteredLuminanceSeaLevel.x=x*c+this._sunScatteredLuminanceSeaLevel.x*(1-c),this._sunScatteredLuminanceSeaLevel.y=m*c+this._sunScatteredLuminanceSeaLevel.y*(1-c),this._sunScatteredLuminanceSeaLevel.z=v*c+this._sunScatteredLuminanceSeaLevel.z*(1-c),this._sunScatteredLuminance.x*=1,this._sunScatteredLuminance.y*=1,this._sunScatteredLuminance.z*=1,this._sunScatteredLuminanceSeaLevel.x*=1,this._sunScatteredLuminanceSeaLevel.y*=1,this._sunScatteredLuminanceSeaLevel.z*=1}}},l$a.prototype._moonLuminance=function(){var e=this._ephemeris.getMoonPositionHorizon();o$1p.clone(e,p$3),o$1p.normalize(p$3,p$3);var t=e$2a.toDegrees(Math.asin(p$3.z)),i=1738100,n=1e3*this._ephemeris.getMoonDistanceKM(),r=.001,o=this._ephemeris.getMoonPhaseAngle();o<r&&(o=r);for(var a=Math.PI-o;a<0;)a+=2*Math.PI;a<r&&(a=r);var s=683*(.144*i*i/(3*n*n)*(.095*(1-Math.sin(o/2)*Math.tan(o/2)*Math.log(1/Math.tan(o/4)))+1905*(1-Math.sin(a/2)*Math.tan(a/2)*Math.log(1/Math.tan(a/4)))))/3.14;return s*=.001,t<0&&(s*=Math.exp(1.1247*t)),s},l$a.prototype._computeMoon=function(e){var t=this._ephemeris.getMoonPositionHorizon();o$1p.clone(t,p$3),o$1p.normalize(p$3,p$3);var i=p$3.z,n=Math.acos(i),r=this._ephemeris.getMoonPhase();if(this._lastMoonT!==this._T||this._lastMoonZenith!==n||this._lastMoonPhase!==r){this._lastMoonT=this._T,this._lastMoonZenith=n,this._lastMoonPhase=r,this._lightingChanged=!0;var o=new G$5,a=new G$5;this._lunarSpectrum.applyAtmosphericTransmittance(n,i,this._T,e,o,a);var s=this._moonLuminance();this._moonTransmittedLuminance=o$1p.multiplyByScalar(o.toXYZ(),s,new o$1p),this._moonScatteredLuminance=o$1p.multiplyByScalar(a.toXYZ(),s,new o$1p);var l=new G$5,u=new G$5;this._lunarSpectrum.applyAtmosphericTransmittance(n,i,this._T,0,l,u),this._moonTransmittedLuminance=o$1p.multiplyByScalar(o.toXYZ(),s,new o$1p),this._moonScatteredLuminance=o$1p.multiplyByScalar(a.toXYZ(),s,new o$1p),this._moonTransmittedLuminanceSeaLevel=o$1p.multiplyByScalar(l.toXYZ(),s,new o$1p),this._moonScatteredLuminanceSeaLevel=o$1p.multiplyByScalar(u.toXYZ(),s,new o$1p)}},l$a.prototype.getSunColor=function(){var e=o$1p.multiplyByScalar(this._sunTransmittedLuminance,1,new o$1p);a$3.durandMapperXYZ(e);var t=p$1e.multiplyByVector(P$7,e,new o$1p);return this._applyGamma(t),new e$1U(t.x,t.y,t.z)},l$a.prototype._updateZenith=function(e){var t=this._ephemeris.getSunPositionHorizon();o$1p.normalize(t,t),new o$1p(0,1,0);this._isothermalEffect=Math.exp(-e/8435),this._isothermalEffect<0&&(this._isothermalEffect=0),this._isothermalEffect>1&&(this._isothermalEffect=1)},l$a.prototype._nightSkyLuminance=function(){return 683*(this._lightPollution+2e-6+12e-8+3e-8+51e-9+9.1e-9+9.1e-10)/3.14*this._isothermalEffect*.001*this._nightSkyScale},l$a.prototype._applyGamma=function(e){var t=0;e.x<t&&(t=e.x),e.y<t&&(t=e.y),e.z<t&&(t=e.z),t=-t,e.x=e.x+t,e.y=e.y+t,e.z=e.z+t;var i=e.x;e.y>i&&(i=e.y),e.z>i&&(i=e.z),i>1&&(e.x/=i,e.y/=i,e.z/=i);var n=this._oneOverGammaHosek;e.x>0&&(e.x=Math.pow(e.x,n)),e.y>0&&(e.y=Math.pow(e.y,n)),e.z>0&&(e.z=Math.pow(e.z,n))},l$a.prototype._computeLogAvg=function(){var e,t,i=new o$1p;o$1p.add(this._sunScatteredLuminance,this._moonScatteredLuminance,i),o$1p.add(i,this._moonTransmittedLuminance,i),i.y+=1e3*this._nightSkyLuminance(),e=i.y,t=-.702*i.x+1.039*i.y+.433*i.z,a$3.setSceneLogAvg(t,e)},l$a.prototype._computeToneMappedSkyLight=function(){var e=o$1p.multiplyByScalar(this._sunScatteredLuminance,.5,new o$1p);e.y+=1e3*this._nightSkyLuminance();var t=o$1p.multiplyByScalar(this._moonScatteredLuminance,.5,new o$1p),i=o$1p.multiplyByScalar(this._sunScatteredLuminanceSeaLevel,.5,new o$1p);i.y+=1e3*this._nightSkyLuminance();var n=o$1p.multiplyByScalar(this._moonScatteredLuminanceSeaLevel,.5,new o$1p);a$3.durandMapperXYZ(e),a$3.durandMapperXYZ(t),a$3.durandMapperXYZ(i),a$3.durandMapperXYZ(n);var r=o$1p.add(e,t,new o$1p);r.x>this._maxSkylightLuminance&&(r.x=this._maxSkylightLuminance),r.y>this._maxSkylightLuminance&&(r.y=this._maxSkylightLuminance),r.z>this._maxSkylightLuminance&&(r.z=this._maxSkylightLuminance);var o=p$1e.multiplyByVector(P$7,r,new o$1p);this._monochromeAmbient&&(o.x=o.z=o.y),this._applyGamma(o),this._skyLight=new e$1U(o.x,o.y,o.z),(r=o$1p.add(i,n,r)).x>this._maxSkylightLuminance&&(r.x=this._maxSkylightLuminance),r.y>this._maxSkylightLuminance&&(r.y=this._maxSkylightLuminance),r.z>this._maxSkylightLuminance&&(r.z=this._maxSkylightLuminance),o=p$1e.multiplyByVector(P$7,r,new o$1p),this._monochromeAmbient&&(o.x=o.z=o.y),this._applyGamma(o),this._skyLightSeaLevel=new e$1U(o.x,o.y,o.z)},l$a.prototype.setEphemeris=function(e,t){this._ephemeris=e,this._lightingChanged=!1,this._computeSun(t),this._computeMoon(t),this._updateZenith(t),this._computeLogAvg(),this._computeToneMappedSkyLight()},e$2.prototype.setTimeZone=function(e){e>=-12&&e<=12&&(this.zoneCorrection=e)},e$2.prototype.getEpoch2000Centuries=function(e){var t,i,n,r,o=this.hours+(this.minutes+this.seconds/60)/60;this.observingDST&&(o-=1),o-=this.zoneCorrection,n=this.day+o/24,this.month<3?(t=this.year-1,i=this.month+12):(t=this.year,i=this.month),r=1720996.5-Math.floor(t/100)+Math.floor(t/400)+Math.floor(365.25*t)+Math.floor(30.6001*(i+1));var a=(r-=2451545)+n;return e&&(a+=65/60/60/24),a/=36525},e$2.prototype.getEpoch1990Days=function(e){var t,i,n,r,o=this.hours+(this.minutes+this.seconds/60)/60;this.observingDST&&(o-=1),o-=this.zoneCorrection,r=this.day+o/24,this.month<3?(t=this.year-1,i=this.month+12):(t=this.year,i=this.month),n=1720996.5-Math.floor(t/100)+Math.floor(t/400)+Math.floor(365.25*t)+Math.floor(30.6001*(i+1));var a=(n-=2447891.5)+r;return e&&(a+=65/60/60/24),a},e$2.prototype.clone=function(e){return e.year=this.year,e.month=this.month,e.day=this.day,e.hours=this.hours,e.minutes=this.minutes,e.seconds=this.seconds,e},Object.defineProperties(i$8.prototype,{longitude:{get:function(){return this._longitude},set:function(e){e>=-180&&e<=180&&(this._longitude=e)}},latitude:{get:function(){return this._latitude},set:function(e){e>=-90&&e<=90&&(this._latitude=e)}},altitude:{get:function(){return this._altitude},set:function(e){this._altitude=e}}}),i$8.prototype.clone=function(e){return e._latitude=this.latitude,e._longitude=this.longitude,e._altitude=this.altitude,e},a$2.prototype.getSunPositionGeographic=function(){return this._sunGeo},a$2.prototype.getSunPositionHorizon=function(){return this._sunHoriz},a$2.prototype.computeMoonPosition=function(){var e=this._T,t=6.23+628.3019*e,i=1.628+8433.4663*e,n=2.3554+8328.6911*e,r=5.1985+7771.3772*e,o=3.8104+8399.7091*e+.1098*Math.sin(n)+.0222*Math.sin(2*r-n)+.0115*Math.sin(2*r)+.0037*Math.sin(2*n)-.0032*Math.sin(t)-.002*Math.sin(2*i)+.001*Math.sin(2*r-2*n)+.001*Math.sin(2*r-t-n)+9e-4*Math.sin(2*r+n)+8e-4*Math.sin(2*r-t)+7e-4*Math.sin(n-t)-6e-4*Math.sin(r)-5e-4*Math.sin(t+n),a=.0895*Math.sin(i)+.0049*Math.sin(n+i)+.0048*Math.sin(n-i)+.003*Math.sin(2*r-i)+.001*Math.sin(2*r+i-n)+8e-4*Math.sin(2*r-i-n)+6e-4*Math.sin(2*r+i),s=1/(.016593+904e-6*Math.cos(n)+166e-6*Math.cos(2*r-n)+137e-6*Math.cos(2*r)+49e-6*Math.cos(2*n)+15e-6*Math.cos(2*r+n)+9e-6*Math.cos(2*r-t));this._moonEcl=m$8(s,a,o),this._moonEq=p$1e.multiplyByVector(this._eclipticToEquatorial,this._moonEcl,this._moonEq),this._moonGeo=p$1e.multiplyByVector(this._equatorialToGeographic,this._moonEq,this._moonGeo),this._moonHoriz=p$1e.multiplyByVector(this._eclipticToHorizon,this._moonEcl,new o$1p),this._moonDistance=6378.137*o$1p.distance(this._moonHoriz,new o$1p(1,0,0)),o=T$6(o),this._sunEclipticLongitude=T$6(this._sunEclipticLongitude),this._moonPhaseAngle=o-this._sunEclipticLongitude,this._moonPhaseAngle=T$6(this._moonPhaseAngle),this._moonPhase=.5*(1-Math.cos(this._moonPhaseAngle))};var u$9=new o$1p;function G$4(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=1,t[3]=0,t[6]=0,t[1]=0,t[4]=n,t[7]=i,t[2]=0,t[5]=-i,t[8]=n}function v$6(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=n,t[3]=0,t[6]=-i,t[1]=0,t[4]=1,t[7]=0,t[2]=i,t[5]=0,t[8]=n}function f$9(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=n,t[3]=i,t[6]=0,t[1]=-i,t[4]=n,t[7]=0,t[2]=0,t[5]=0,t[8]=1}a$2.prototype.computeSunPosition=function(){var e=this._T,t=6.24+628.302*e,i=4.895048+628.331951*e+(.033417-84e-6*e)*Math.sin(t)+351e-6*Math.sin(2*t),n=1.00014-(.016708-42e-6*e)*Math.cos(t)-141e-6*Math.cos(2*t);if(this._sunEclipticLongitude=i,this._sunEcl=m$8(n,0,i),this._sunEq=p$1e.multiplyByVector(this._eclipticToEquatorial,this._sunEcl,this._sunEq),u$9=p$1e.multiplyByVector(this._equatorialToGeographic,this._sunEq,u$9),this._geoZUp?(this._sunGeo.x=u$9.x,this._sunGeo.y=u$9.y,this._sunGeo.z=u$9.z):this._primeMeridianZ?(this._sunGeo.x=u$9.y,this._sunGeo.y=u$9.z,this._sunGeo.z=u$9.x):(this._sunGeo.x=u$9.x,this._sunGeo.y=u$9.z,this._sunGeo.z=-u$9.y),this._forceSunHoriz)this._sunHoriz.x=sin(forcedSunAzimuth)*cos(forcedSunAltitude),this._sunHoriz.z=-cos(forcedSunAzimuth)*cos(forcedSunAltitude),this._sunHoriz.y=sin(forcedSunAltitude),this._sunHoriz.Normalize(),this._geoZUp?this._sunGeo=horizonToGeographic*z$3(sunHoriz):this._sunGeo=E$4(horizonToGeographic*z$3(sunHoriz)),this._sunEcl=horizonToEcliptic*z$3(sunHoriz),this._sunEq=horizonToEquatorial*z$3(sunHoriz);else{var r=new o$1p;r=p$1e.multiplyByVector(this._eclipticToHorizon,this._sunEcl,r),this._sunHoriz=E$4(r)}var o=o$1p.normalize(this._sunHoriz,new o$1p),a=o$1p.distance(this._sunHoriz,o$1p.ZERO),s=Math.asin(o.y);s=q$4(s),this._sunHoriz.y=a*Math.sin(s)},a$2.prototype.getSunPositionHorizon=function(){return this._sunHoriz},a$2.prototype.getMoonPositionHorizon=function(){return this._moonHoriz},a$2.prototype.getMoonPhase=function(){return this._moonPhase},a$2.prototype.getMoonDistanceKM=function(){return this._moonDistance},a$2.prototype.getMoonPhaseAngle=function(){return this._moonPhaseAngle};var M$5=new p$1e,g$c=new p$1e,y$7=new p$1e;function n$6(){this._ambientColor=new e$1U,this._sunColor=new e$1U,this._sky=new l$a,this._ephemeris=new a$2,this._localTime=new e$2,this._location=new i$8,this._atmosphereHeight=1e5,this._renderError=new o$1h,this._basis3=new p$1e,this._invBasis3=new p$1e,this._upVector=new o$1p(0,0,1),this._rightVector=new o$1p(-1,0,0),this._sceneMode=C$13.SCENE3D}a$2.prototype.update=function(e,t){var i=!1;if(e!==this._lastTime&&(i=!0,this._lastTime=e.clone(this._lastTime)),t!==this._lastLocation&&(i=!0,this._lastLocation=t.clone(this._lastLocation)),i){var n=this._T=e.getEpoch2000Centuries(!0);this._tuncorr=e.getEpoch2000Centuries(!1),this._epochDays=e.getEpoch1990Days(!1),f$9(.01118*n,M$5),v$6(-.00972*n,g$c),f$9(.01118*n,y$7);var r=p$1e.multiply(M$5,g$c,new p$1e);this._precession=p$1e.multiply(r,y$7,this._precession);var o=4.894961+230121.675315*this._tuncorr,a=o+e$2a.toRadians(t.longitude),s=e$2a.toRadians(t.latitude),l=.409093-227e-6*this._T;v$6(s-Math.PI/2,g$c),f$9(-a,y$7),G$4(l,M$5),r=p$1e.multiply(g$c,y$7,r),p$1e.multiply(r,this._precession,this._equatorialToHorizon),p$1e.multiply(r,M$5,this._eclipticToHorizon),p$1e.clone(M$5,this._eclipticToEquatorial),f$9(-o,this._equatorialToGeographic),p$1e.transpose(this._equatorialToGeographic,this._geographicToEquatorial),p$1e.transpose(this._equatorialToHorizon,this._horizonToEquatorial),p$1e.multiply(this._equatorialToGeographic,this._horizonToEquatorial,this._horizonToGeographic),p$1e.multiply(this._equatorialToHorizon,this._geographicToEquatorial,this._geographicToHorizon),p$1e.inverse(this._eclipticToHorizon,this._horizonToEcliptic),this.computeSunPosition(),this.computeMoonPosition()}};var T$5=new e$1U(1,.96,.94,1);function u$8(e){var t=0;e.red<t&&(t=e.red),e.green<t&&(t=e.green),e.blue<t&&(t=e.blue),t=-t,e.red+=t,e.green+=t,e.blue+=t;var i=e.red;e.green>i&&(i=e.green),e.blue>i&&(i=e.blue),i>1&&(e.red/=i,e.green/=i,e.blue/=i),e.red<0&&(e.red=0),e.green<0&&(e.green=0),e.blue<0&&(e.blue=0),e.a<0&&(e.a=0)}n$6.prototype._interpolate=function(e,t){var i=(this._atmosphereHeight+.5*this._atmosphereHeight-this._location.altitude)/(.5*this._atmosphereHeight);return i>1&&(i=1),i<0&&(i=0),e$1U.lerp(e,t,i,new e$1U)},n$6.prototype.getAmbientColor=function(){var e=this._sky.getToneMappedSkyLight();return u$8(e),this._location.altitude>this._atmosphereHeight&&(e=this._interpolate(new e$1U(0,0,0,1),e)),e},n$6.prototype.getSunColor=function(){var e=this._sky.getSunColor();return u$8(e),this._location.altitude>this._atmosphereHeight&&(e=this._interpolate(T$5,e)),e},n$6.prototype.getSunPosition=function(){if(this._sceneMode==C$13.SCENE3D)return this.getSunPositionGeographic();var e=new o$1p;return e=o$1p.clone(this._ephemeris.getSunPositionHorizon(),e),o$1p.normalize(e,e),p$1e.multiplyByVector(this._basis3,e,e),e},n$6.prototype.getSunPositionGeographic=function(){return this._ephemeris.getSunPositionGeographic()},n$6.prototype._computeLocalTime=function(e){var t=a$15.toGregorianDate(e);this._localTime.year=t.year,this._localTime.month=t.month,this._localTime.day=t.day,this._localTime.hours=t.hour,this._localTime.minutes=t.minute,this._localTime.seconds=t.second,this._localTime.setTimeZone(0)},n$6.prototype.setLocation=function(e){this._location.longitude=e$2a.toDegrees(e.longitude),this._location.latitude=e$2a.toDegrees(e.latitude),this._location.altitude=e.height};var _$6=new o$1p,g$b=new o$1p,l$9=new o$1p,C$6;n$6.prototype.updateBasis=function(){this.getXYZ(_$6,g$b,l$9,this._upVector,this._rightVector,!0),this.getBases(this._basis3,this._invBasis3,_$6,g$b,l$9)},n$6.prototype.getXYZ=function(e,t,i,n,r){i=o$1p.cross(r,n,i),o$1p.normalize(i,i),e=o$1p.cross(n,i,e),o$1p.normalize(e,e),t=o$1p.cross(i,e,t),o$1p.normalize(t,t)},n$6.prototype.getBases=function(e,t,i,n,r){e[0]=i.x,e[3]=i.y,e[6]=i.z,e[1]=n.x,e[4]=n.y,e[7]=n.z,e[2]=r.x,e[5]=r.y,e[8]=r.z,t[0]=i.x,t[3]=n.x,t[6]=r.x,t[1]=i.y,t[4]=n.y,t[7]=r.y,t[2]=i.z,t[5]=n.z,t[8]=r.z},n$6.prototype.update=function(e,t){try{this._sceneMode=t,this._sceneMode==C$13.SCENE3D||this.updateBasis(),this.setLocation(e.camera.positionCartographic),this._computeLocalTime(e.time),this._ephemeris.update(this._localTime,this._location),this._sky.setEphemeris(this._ephemeris,this._location.altitude)}catch(e){this._renderError.raiseEvent(this,e)}};class F$5{constructor(e){this.context=e;const t=e._gl;this.maxBindingPoints=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS),this._uniformBuffers=new Array}createUniformBuffer(e){const t=this.context._gl,i=t.createBuffer();return t.bindBuffer(t.UNIFORM_BUFFER,i),e instanceof Float32Array?t.bufferData(t.UNIFORM_BUFFER,e,t.STATIC_DRAW):t.bufferData(t.UNIFORM_BUFFER,new Float32Array(e),t.STATIC_DRAW),t.bindBuffer(t.UNIFORM_BUFFER,null),i}updateUniformBuffer(e,t,i,n){const r=this.context._gl;r.bindBuffer(r.UNIFORM_BUFFER,e),void 0===i&&(i=0),void 0===n?t instanceof Float32Array?r.bufferSubData(r.UNIFORM_BUFFER,i,t):r.bufferSubData(r.UNIFORM_BUFFER,i,new Float32Array(t)):t instanceof Float32Array?r.bufferSubData(r.UNIFORM_BUFFER,0,t.subarray(i,i+n)):r.bufferSubData(r.UNIFORM_BUFFER,0,new Float32Array(t).subarray(i,i+n)),r.bindBuffer(r.UNIFORM_BUFFER,null)}bindUniformBufferBase(e,t,i){const n=this.context._gl;n.bindBufferBase(n.UNIFORM_BUFFER,t,e||null)}bindUniformBlock(e,t,i){const n=this.context._gl;var r=n.getUniformBlockIndex(e,t);4294967295!==r&&n.uniformBlockBinding(e,r,i)}_releaseBuffer(e){return this.context._gl.deleteBuffer(e),!0}}function ue$2(e,t){var i="WebGL Error: ";switch(t){case e.INVALID_ENUM:i+="INVALID_ENUM";break;case e.INVALID_VALUE:i+="INVALID_VALUE";break;case e.INVALID_OPERATION:i+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:i+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:i+="CONTEXT_LOST_WEBGL lost";break;default:i+="Unknown ("+t+")"}return i}function le$4(e,t,i,n){for(var r=ue$2(e,n)+": "+t.name+"(",o=0;o<i.length;++o)0!==o&&(r+=", "),r+=i[o];return r+=");"}function de$2(e,t,i){var n=e.getError();if(n!==e.NO_ERROR)throw new t$14(le$4(e,t,i,n))}function he$1(e,t,i){return{get:function(){var n=e[t];return i(e,"get: "+t,n),e[t]},set:function(n){e[t]=n,i(e,"set: "+t,n)}}}function ce$5(e,t){if(!e$2b(t))return e;function i(i){return function(){var n=i.apply(e,arguments);return t(e,i,arguments),n}}var n={};for(var r in e){var o=e[r];o instanceof Function?n[r]=i(o):Object.defineProperty(n,r,he$1(e,r,t))}return n}function u$7(e,t){for(var i=t.length,n=0;n<i;++n){var r=e.getExtension(t[n]);if(r)return r}}function g$a(e,t){var i=i$i.call(this,e,t)||this;if(typeof WebGLRenderingContext>"u")throw new t$14("The browser does not support WebGL.");var n=e.width*i._cols,r=e.height*i._rows;e.width=300,e.height=150,(t=u$_(t=l$1g(t,!0),{})).allowTextureFilterAnisotropic=u$_(t.allowTextureFilterAnisotropic,!0);var o=u$_(t.webgl,{});o.alpha=u$_(o.alpha,!1),o.stencil=u$_(o.stencil,!0),o.antialias=u$_(o.antialias,!0);var a,s=u$_(t.contextType,De$h.Webgl2)!==De$h.Webgl1&&typeof WebGL2RenderingContext<"u",l=!1,u=t.getWebGLStub;if(e$2b(u))a=u(e,o);else if(s&&(e$2b(a=e.getContext("webgl2",o)||e.getContext("experimental-webgl2",o)||void 0)&&(l=!0)),e$2b(a)||(a=e.getContext("webgl",o)||e.getContext("experimental-webgl",o)||void 0),!e$2b(a))throw new t$14("The browser supports WebGL, but initialization failed.");i.webglOptions=o,e.width=n,e.height=r,i._originalGLContext=a,i._gl=a,i._webgl2=l,i.validateFramebuffer=!1,i.validateShaderProgram=!1,i.logShaderCompilation=!1,i._throwOnWebGLError=!1;var c=a;i._stencilBits=c.getParameter(c.STENCIL_BITS),e$1T._maximumCombinedTextureImageUnits=c.getParameter(c.MAX_COMBINED_TEXTURE_IMAGE_UNITS),e$1T._maximumCubeMapSize=c.getParameter(c.MAX_CUBE_MAP_TEXTURE_SIZE),e$1T._maximumFragmentUniformVectors=c.getParameter(c.MAX_FRAGMENT_UNIFORM_VECTORS),e$1T._maximumTextureImageUnits=c.getParameter(c.MAX_TEXTURE_IMAGE_UNITS),e$1T._maximumRenderbufferSize=c.getParameter(c.MAX_RENDERBUFFER_SIZE),e$1T._maximumTextureSize=c.getParameter(c.MAX_TEXTURE_SIZE),e$1T._maximumVaryingVectors=c.getParameter(c.MAX_VARYING_VECTORS),e$1T._maximumVertexAttributes=c.getParameter(c.MAX_VERTEX_ATTRIBS),e$1T._maximumVertexTextureImageUnits=c.getParameter(c.MAX_VERTEX_TEXTURE_IMAGE_UNITS),e$1T._maximumVertexUniformVectors=c.getParameter(c.MAX_VERTEX_UNIFORM_VECTORS);var h=c.getParameter(c.ALIASED_LINE_WIDTH_RANGE);e$1T._minimumAliasedLineWidth=h[0],e$1T._maximumAliasedLineWidth=h[1];var d=c.getParameter(c.ALIASED_POINT_SIZE_RANGE);e$1T._minimumAliasedPointSize=d[0],e$1T._maximumAliasedPointSize=d[1];var f=c.getParameter(c.MAX_VIEWPORT_DIMS);e$1T._maximumViewportWidth=f[0],e$1T._maximumViewportHeight=f[1];var p=c.getShaderPrecisionFormat(c.FRAGMENT_SHADER,c.HIGH_FLOAT);e$1T._highpFloatSupported=0!==p.precision;var _=c.getShaderPrecisionFormat(c.FRAGMENT_SHADER,c.HIGH_INT);e$1T._highpIntSupported=0!==_.rangeMax,l&&(e$1T._uniformBufferOffsetAlignment=c.getParameter(c.UNIFORM_BUFFER_OFFSET_ALIGNMENT),e$1T._maxUniformBufferBinding=c.getParameter(c.MAX_UNIFORM_BUFFER_BINDINGS),e$1T._maxArrayTextureLayers=c.getParameter(c.MAX_ARRAY_TEXTURE_LAYERS)),i._antialias=c.getContextAttributes().antialias,i._standardDerivatives=l||!!u$7(c,["OES_standard_derivatives"]),i._blendMinmax=!!u$7(c,["EXT_blend_minmax"]),i._elementIndexUint=!!u$7(c,["OES_element_index_uint"]),i._depthTexture=!!u$7(c,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),i._fragDepth=l||!!u$7(c,["EXT_frag_depth"]),i._debugShaders=u$7(c,["WEBGL_debug_shaders"]);var m=u$7(c,["EXT_shader_texture_lod"]);i._textureFloat=!!u$7(c,["OES_texture_float"]),i._textureHalfFloat=!!u$7(c,["OES_texture_half_float"]),i._textureFloatLinear=!!u$7(c,["OES_texture_float_linear"]),i._textureHalfFloatLinear=!!u$7(c,["OES_texture_half_float_linear"]),i._sysShaderDefines=[],e$2b(i._fragDepth)&&i._fragDepth&&i._sysShaderDefines.push("GL_EXT_frag_depth"),e$2b(m)&&i._sysShaderDefines.push("GL_EXT_shader_texture_lod"),l?(i._sysShaderDefines.push("WEBGL2"),i._sysShaderDefines.push("OUTPUT_DECLARATION")):e$2b(i._standardDerivatives)&&i._standardDerivatives&&i._sysShaderDefines.push("GL_OES_standard_derivatives"),i._colorBufferFloat=!!u$7(c,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),i._floatBlend=!!u$7(c,["EXT_float_blend"]),i._colorBufferHalfFloat=!!u$7(c,["EXT_color_buffer_half_float"]),i._s3tc=!!u$7(c,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),i._pvrtc=!!u$7(c,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),i._etc1=!!u$7(c,["WEBGL_compressed_texture_etc1"]),i._astc=!!u$7(c,["WEBGL_compressed_texture_astc"]),i._etc=!!u$7(c,["WEBG_compressed_texture_etc"]),i._bc7=!!u$7(c,["EXT_texture_compression_bptc"]),f$S.setKTX2SupportedFormats(i._s3tc,i._pvrtc,i._astc,i._etc,i._etc1,i._bc7);var g,x,v,y,$,b,T,C,S,w,E=t.allowTextureFilterAnisotropic?u$7(c,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;if(i._textureFilterAnisotropic=E,e$1T._maximumTextureFilterAnisotropy=e$2b(E)?c.getParameter(E.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1,l){var P=i;g=function(){return P._gl.createVertexArray()},x=function(e){P._gl.bindVertexArray(e)},v=function(e){P._gl.deleteVertexArray(e)},y=function(e,t,i,n,r){c.drawElementsInstanced(e,t,i,n,r)},$=function(e,t,i,n){c.drawArraysInstanced(e,t,i,n)},b=function(e,t){c.vertexAttribDivisor(e,t)},T=function(e){c.drawBuffers(e)}}else e$2b(C=u$7(c,["OES_vertex_array_object"]))&&(g=function(){return C.createVertexArrayOES()},x=function(e){C.bindVertexArrayOES(e)},v=function(e){C.deleteVertexArrayOES(e)}),e$2b(S=u$7(c,["ANGLE_instanced_arrays"]))&&(y=function(e,t,i,n,r){S.drawElementsInstancedANGLE(e,t,i,n,r)},$=function(e,t,i,n){S.drawArraysInstancedANGLE(e,t,i,n)},b=function(e,t){S.vertexAttribDivisorANGLE(e,t)}),e$2b(w=u$7(c,["WEBGL_draw_buffers"]))&&(T=function(e){w.drawBuffersWEBGL(e)});i.glCreateVertexArray=g,i.glBindVertexArray=x,i.glDeleteVertexArray=v,i.glDrawElementsInstanced=y,i.glDrawArraysInstanced=$,i.glVertexAttribDivisor=b,i.glDrawBuffers=T,i._vertexArrayObject=!!C,i._instancedArrays=!!S,i._drawBuffers=!!w,e$1T._maximumDrawBuffers=i.drawBuffers?c.getParameter(de$x.MAX_DRAW_BUFFERS):1,e$1T._maximumColorAttachments=i.drawBuffers?c.getParameter(de$x.MAX_COLOR_ATTACHMENTS):1,e$1T._maximumSamples=i._webgl2?c.getParameter(c.MAX_SAMPLES):1,d$1m.apply(c,i._defaultRenderState,i._defaultPassState);const A=c.getExtension("WEBGL_debug_renderer_info");if(A){var L=c.getParameter(A.UNMASKED_RENDERER_WEBGL);ti$3._autoSetMaxMemory(L)}i._floatTexSixPlaces=r$p(i),l&&(i._uniformBufferEngine=new F$5(i))}function me$2(e){if(e.validateFramebuffer){var t=e._gl,i=t.checkFramebufferStatus(t.FRAMEBUFFER);if(i!==t.FRAMEBUFFER_COMPLETE){var n;switch(i){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:n="Framebuffer is not complete. Incomplete attachment: at least one attachment point with a renderbuffer or texture attached has its attached object no longer in existence or has an attached image with a width or height of zero, or the color attachment point has a non-color-renderable image attached, or the depth attachment point has a non-depth-renderable image attached, or the stencil attachment point has a non-stencil-renderable image attached. Color-renderable formats include GL_RGBA4, GL_RGB5_A1, and GL_RGB565. GL_DEPTH_COMPONENT16 is the only depth-renderable format. GL_STENCIL_INDEX8 is the only stencil-renderable format.";break;case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:n="Framebuffer is not complete. Incomplete dimensions: not all attached images have the same width and height.";break;case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:n="Framebuffer is not complete. Missing attachment: no images are attached to the framebuffer.";break;case t.FRAMEBUFFER_UNSUPPORTED:n="Framebuffer is not complete. Unsupported: the combination of internal formats of the attached images violates an implementation-dependent set of restrictions."}throw new t$16(n)}}}function Z$6(e,t,i,n){var r=e._currentRenderState,o=e._currentPassState,a=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,d$1m.partialApply(e._gl,r,t,o,i,a,i.viewport,n)}function X$3(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;var i=C$6;if(e$2b(t))t._bind(),me$2(e),i=t._getActiveColorAttachments();else{var n=e._gl;n.bindFramebuffer(n.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(i)}}i$i&&(g$a.__proto__=i$i),g$a.prototype=Object.create(i$i&&i$i.prototype),g$a.prototype.constructor=i$i,Object.defineProperties(g$a.prototype,{webgl2:{get:function(){return this._webgl2}},webgpu:{get:function(){return!1}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return this._stencilBits>=8}},antialias:{get:function(){return this._antialias}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},floatTextureSixPlaces:{get:function(){return this._floatTexSixPlaces}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},etc1:{get:function(){return this._etc1}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=ce$5(this._originalGLContext,e?de$2:void 0)}},drawingBufferHeight:{get:function(){return Math.floor(this._gl.drawingBufferHeight)}},drawingBufferWidth:{get:function(){return Math.floor(this._gl.drawingBufferWidth)}},realDrawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight*this._rows}},realDrawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth*this._cols}}}),typeof WebGLRenderingContext<"u"&&(C$6=[de$x.BACK]);var ge$3=new t$X;function Ee$2(e,t,i,n,r){if(e$2b(t)&&r.depthTest&&r.depthTest.enabled&&!t.hasDepthAttachment)throw new t$16("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");X$3(e,t),Z$6(e,r,i,!1),n._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,n.maximumTextureUnitIndex)}function pe$2(e,t,i,n){var r=t._primitiveType,o=t._vertexArray,a=t._offset,s=t._count,l=t.instanceCount;if(!W$18.validate(r))throw new t$16("drawCommand.primitiveType is required and must be valid.");if(o$1q.defined("drawCommand.vertexArray",o),o$1q.typeOf.number.greaterThanOrEquals("drawCommand.offset",a,0),e$2b(s)&&o$1q.typeOf.number.greaterThanOrEquals("drawCommand.count",s,0),o$1q.typeOf.number.greaterThanOrEquals("drawCommand.instanceCount",l,0),l>0&&!e.instancedArrays)throw new t$16("Instanced arrays extension is not supported");e._us.model=u$_(t._modelMatrix,p$1d.IDENTITY),e._us.useRelativeOrigin=t.useRelativeOrigin,i._setUniforms(n,e._us,e.validateShaderProgram,t),o._bind(),e$2b(t._transformFeedback)&&t._transformFeedback.begin();var u=o.indexBuffer;e$2b(u)?(a*=u.bytesPerIndex,s=u$_(s,u.numberOfIndices),0===l?(r===W$18.TRIANGLES&&(e._trangleCount+=s/3),e._gl.drawElements(r,s,u.indexDatatype,a)):(r===W$18.TRIANGLES&&(e._trangleCount+=s/3*l),e.glDrawElementsInstanced(r,s,u.indexDatatype,a,l))):(s=u$_(s,o.numberOfVertices),0===l?e._gl.drawArrays(r,a,s):e.glDrawArraysInstanced(r,a,s,l)),e$2b(t._transformFeedback)&&t._transformFeedback.end(),o._unBind()}g$a.prototype.clear=function(e,t){e=u$_(e,ge$3),t=u$_(t,this._defaultPassState);var i=this._gl,n=0,r=e.color,o=e.depth,a=e.stencil;e$2b(r)&&(e$1U.equals(this._clearColor,r)||(e$1U.clone(r,this._clearColor),i.clearColor(r.red,r.green,r.blue,r.alpha)),n|=i.COLOR_BUFFER_BIT),e$2b(o)&&(o!==this._clearDepth&&(this._clearDepth=o,i.clearDepth(o)),n|=i.DEPTH_BUFFER_BIT),e$2b(a)&&(a!==this._clearStencil&&(this._clearStencil=a,i.clearStencil(a)),n|=i.STENCIL_BUFFER_BIT),Z$6(this,u$_(e.renderState,this._defaultRenderState),t,!0),X$3(this,u$_(e.framebuffer,t.framebuffer)),i.clear(n)},g$a.prototype.draw=function(e,t,i,n){o$1q.defined("drawCommand",e),o$1q.defined("drawCommand.shaderProgram",e._shaderProgram),t=u$_(t,this._defaultPassState);var r=u$_(e._framebuffer,t.framebuffer),o=u$_(e._renderState,this._defaultRenderState);i=u$_(i,e._shaderProgram),n=u$_(n,e._uniformMap),Ee$2(this,r,t,i,o),pe$2(this,e,i,n)},g$a.prototype.endFrame=function(){var e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);var t=C$6;this.drawBuffers&&this.glDrawBuffers(t);var i=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(var n=0;n<i;++n)e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)},g$a.prototype.readPixels=function(e){var t=this._gl;e=u$_(e,u$_.EMPTY_OBJECT);var i=Math.max(u$_(e.x,0),0),n=Math.max(u$_(e.y,0),0),r=u$_(e.width,t.drawingBufferWidth),o=u$_(e.height,t.drawingBufferHeight),a=e.framebuffer;o$1q.typeOf.number.greaterThan("readState.width",r,0),o$1q.typeOf.number.greaterThan("readState.height",o,0);var s=_$$.UNSIGNED_BYTE;e$2b(a)&&a.numberOfColorAttachments>0&&(s=a.getColorTexture(0).pixelDatatype);var l=V$10.createTypedArray(V$10.RGBA,s,r,o);return X$3(this,a),t.readPixels(i,n,r,o,V$10.RGBA,s,l),l},g$a.prototype.readPixelsAsync=function(e){var t=this.readPixels(e);return Promise.resolve(t)},g$a.prototype.resize=function(){},g$a.prototype.isDestroyed=function(){return!1},g$a.prototype.destroy=function(){return i$i.prototype.destroy.call(this),i$10(this)};var _0x4ba59a=(_0x344892=!0,function(e,t){var i=_0x344892?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x344892=!1,i}),_0x13fcd7=_0x4ba59a(void 0,(function(){return _0x13fcd7.toString().search("(((.+)+)+)+$").toString().constructor(_0x13fcd7).search("(((.+)+)+)+$")})),_0x344892;_0x13fcd7();var A$8="\nattribute vec4 aPosition;\n//varying vec3 v_position;\n\nuniform Mesh {\n uniform mat4 uModelMatrix;\n};\n\nvoid main()\n{\n //v_position = aPosition.xyz + vec3(0.5);\n gl_Position = czm_viewProjection * uModelMatrix * vec4(aPosition.xyz, 1.0);\n czm_vertexLogDepth();\n}",_0x59817b=(_0x162ecd=!0,function(e,t){var i=_0x162ecd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x162ecd=!1,i}),_0x342139=_0x59817b(void 0,(function(){return _0x342139.toString().search("(((.+)+)+)+$").toString().constructor(_0x342139).search("(((.+)+)+)+$")})),_0x162ecd;_0x342139();var g$9="\n//varying vec3 v_position;\n\nvoid main()\n{\n gl_FragColor = vec4(1.0);\n czm_writeLogDepth();\n}";function t$9(e){this._context=e,this._showDebugOcclusionMesh=!0,this._prepareResources()}t$9.prototype.initDrawCommand=function(e){e.shaderProgram=this._shaderProgram,e.vertexArray=this._vertexArray,e.renderState=this._renderState},t$9.prototype._prepareResources=function(){for(var e=O$y.getUnitBox(),t=e.attributes.position.values,i=new Float32Array(t.length),n=0;n<t.length;n++)i[n]=t[n];var r=t$Y.createVertexBuffer({context:this._context,typedArray:i,usage:A$19.STATIC_DRAW}),o=[],a={aPosition:0};o.push({name:"aPosition",index:a.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$12.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var s=t$Y.createIndexBuffer({context:this._context,typedArray:e.indices,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});this._vertexArray=new c$12({context:this._context,attributes:o,indexBuffer:s});var l=new s$U({name:"OcclusionVp",sources:[A$8]});l.defines.push("LOG_DEPTH");var u=new s$U({name:"OcclusionFp",sources:[g$9]});u.defines.push("LOG_DEPTH"),this._shaderProgram=r$13.fromCache({name:"OcclusionMesh",context:this._context,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:a}),this._renderState=d$1m.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND,cull:{enabled:!0}})},t$9.prototype.dispose=function(){this._vertexArray&&!this._vertexArray.isDestroyed()&&this._vertexArray.destroy()};var _0x5dd3db=(_0x421768=!0,function(e,t){var i=_0x421768?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x421768=!1,i}),_0x3323af=_0x5dd3db(void 0,(function(){return _0x3323af.toString().search("(((.+)+)+)+$").toString().constructor(_0x3323af).search("(((.+)+)+)+$")})),_0x421768;_0x3323af(),_0xb82ccc.prototype.setAlphaConstants=function(e,t,i,n){this._alphaState.setAlphaBlendConstants(e,t,i,n)},_0xb82ccc.prototype.setAlphaMode=function(e,t){if(void 0===t&&(t=!1),this._alphaMode!==e){switch(e){case _0x354cf8.ALPHA_DISABLE:this._alphaState.alphaBlend=!1;break;case _0x354cf8.ALPHA_PREMULTIPLIED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_PREMULTIPLIED_PORTERDUFF:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_COMBINE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ADD:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_SUBTRACT:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ZERO,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_MULTIPLY:this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_COLOR,this._gl.ZERO,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_MAXIMIZED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_INTERPOLATE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.CONSTANT_COLOR,this._gl.ONE_MINUS_CONSTANT_COLOR,this._gl.CONSTANT_ALPHA,this._gl.ONE_MINUS_CONSTANT_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_SCREENMODE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ONEONE_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ALPHATOCOLOR:this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_ALPHA,this._gl.ONE,this._gl.ZERO,this._gl.ZERO),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_REVERSEONEMINUS:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE_MINUS_DST_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_SRC_DSTONEMINUSSRCALPHA:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ONEONE_ONEZERO:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ONE,this._gl.ZERO),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_EXCLUSION:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_LAYER_ACCUMULATE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0}!t&&(this.depthCullingState.depthMask=e===_0x354cf8.ALPHA_DISABLE),this._alphaMode=e}},_0xb82ccc.prototype.getAlphaMode=function(){return this._alphaMode},_0xb82ccc.prototype.setAlphaEquation=function(e){if(this._alphaEquation!==e){switch(e){case _0x354cf8.ALPHA_EQUATION_ADD:this._alphaState.setAlphaEquationParameters(_0x354cf8.GL_ALPHA_EQUATION_ADD,_0x354cf8.GL_ALPHA_EQUATION_ADD);break;case _0x354cf8.ALPHA_EQUATION_SUBSTRACT:this._alphaState.setAlphaEquationParameters(_0x354cf8.GL_ALPHA_EQUATION_SUBTRACT,_0x354cf8.GL_ALPHA_EQUATION_SUBTRACT);break;case _0x354cf8.ALPHA_EQUATION_REVERSE_SUBTRACT:this._alphaState.setAlphaEquationParameters(_0x354cf8.GL_ALPHA_EQUATION_REVERSE_SUBTRACT,_0x354cf8.GL_ALPHA_EQUATION_REVERSE_SUBTRACT);break;case _0x354cf8.ALPHA_EQUATION_MAX:this._alphaState.setAlphaEquationParameters(_0x354cf8.GL_ALPHA_EQUATION_MAX,_0x354cf8.GL_ALPHA_EQUATION_MAX);break;case _0x354cf8.ALPHA_EQUATION_MIN:this._alphaState.setAlphaEquationParameters(_0x354cf8.GL_ALPHA_EQUATION_MIN,_0x354cf8.GL_ALPHA_EQUATION_MIN);break;case _0x354cf8.ALPHA_EQUATION_DARKEN:this._alphaState.setAlphaEquationParameters(_0x354cf8.GL_ALPHA_EQUATION_MIN,_0x354cf8.GL_ALPHA_EQUATION_ADD)}this._alphaEquation=e}},_0xb82ccc.prototype.getAlphaEquation=function(){return this._alphaEquation};var _0x153e3c=(_0x2a39f2=!0,function(e,t){var i=_0x2a39f2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a39f2=!1,i}),_0x3c58d5=_0x153e3c(void 0,(function(){return _0x3c58d5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c58d5).search("(((.+)+)+)+$")})),_0x2a39f2;_0x3c58d5(),_0x58fcf.prototype.setAlphaMode=function(e,t){if(void 0===t&&(t=!1),this._alphaMode!==e||!(e===_0x354cf8.ALPHA_DISABLE&&!this._alphaState.alphaBlend||e!==_0x354cf8.ALPHA_DISABLE&&this._alphaState.alphaBlend)){switch(e){case _0x354cf8.ALPHA_DISABLE:this._alphaState.alphaBlend=!1;break;case _0x354cf8.ALPHA_PREMULTIPLIED:this._alphaState.setAlphaBlendFunctionParameters(1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_PREMULTIPLIED_PORTERDUFF:this._alphaState.setAlphaBlendFunctionParameters(1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_COMBINE:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(1,1,0,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ADD:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA,1,0,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_SUBTRACT:this._alphaState.setAlphaBlendFunctionParameters(0,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,1,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_MULTIPLY:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_DST_COLOR,0,1,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_MAXIMIZED:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,1,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_INTERPOLATE:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_CONSTANT_COLOR,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR,_0x354cf8.GL_ALPHA_FUNCTION_CONSTANT_ALPHA,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_SCREENMODE:this._alphaState.setAlphaBlendFunctionParameters(1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ONEONE_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(1,1,1,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ALPHATOCOLOR:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_DST_ALPHA,1,0,0),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_REVERSEONEMINUS:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_SRC_DSTONEMINUSSRCALPHA:this._alphaState.setAlphaBlendFunctionParameters(1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_ONEONE_ONEZERO:this._alphaState.setAlphaBlendFunctionParameters(1,1,1,0),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_EXCLUSION:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,0,1),this._alphaState.alphaBlend=!0;break;case _0x354cf8.ALPHA_LAYER_ACCUMULATE:this._alphaState.setAlphaBlendFunctionParameters(_0x354cf8.GL_ALPHA_FUNCTION_SRC_ALPHA,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,_0x354cf8.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0}!t&&(this.setDepthWrite(e===_0x402caf.ALPHA_DISABLE),this._cacheRenderPipeline.setDepthWriteEnabled(e===_0x402caf.ALPHA_DISABLE)),this._alphaMode=e,this._cacheRenderPipeline.setAlphaBlendEnabled(this._alphaState.alphaBlend),this._cacheRenderPipeline.setAlphaBlendFactors(this._alphaState._blendFunctionParameters,this._alphaState._blendEquationParameters)}},_0x58fcf.prototype.setAlphaEquation=function(e){_0x402caf.prototype.setAlphaEquation.call(this,e),this._cacheRenderPipeline.setAlphaBlendFactors(this._alphaState._blendFunctionParameters,this._alphaState._blendEquationParameters)};var _0x6a04e3=(_0x609f40=!0,function(e,t){var i=_0x609f40?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x609f40=!1,i}),_0x3c4ccc=_0x6a04e3(void 0,(function(){return _0x3c4ccc.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c4ccc).search("(((.+)+)+)+$")})),_0x609f40;_0x3c4ccc(),_0x58fcf.prototype._createDepthStencilCubeTexture=function(e,t){var i=new InternalTexture(this,InternalTextureSource.DepthStencil);i.isCube=!0;var n=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,samples:1},t);return i.format=n.generateStencil?_0x354cf8.TEXTUREFORMAT_DEPTH24_STENCIL8:_0x354cf8.TEXTUREFORMAT_DEPTH32_FLOAT,this._setupDepthStencilTexture(i,e,n.generateStencil,n.bilinearFiltering,n.comparisonFunction,n.samples),this._textureHelper.createGPUTextureForInternalTexture(i),this._internalTexturesCache.push(i),i},_0x58fcf.prototype.createCubeTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=this;return void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=null),void 0===l&&(l=!1),void 0===u&&(u=0),void 0===c&&(c=0),void 0===h&&(h=null),void 0===d&&(d=!1),this.createCubeTextureBase(e,t,i,!!n,r,o,a,s,l,u,c,h,null,(function(e,t){var i=t,o=i[0].width,s=o;f._setCubeMapTextureParams(e,!n),e.format=null!=a?a:-1;var l=f._textureHelper.createGPUTextureForInternalTexture(e,o,s);f._textureHelper.updateCubeTextures(i,l.underlyingResource,o,s,l.format,!1,!1,0,0),!n&&f._generateMipmaps(e,f._uploadEncoder),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),r&&r()}),!!d)},_0x58fcf.prototype._setCubeMapTextureParams=function(e,t,i){e.samplingMode=t?_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE:_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE,e._cachedWrapU=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,e._cachedWrapV=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,i&&(e._maxLodLevel=i)};var _0x40806d=(_0x55371f=!0,function(e,t){var i=_0x55371f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55371f=!1,i}),_0xf43843=_0x40806d(void 0,(function(){return _0xf43843.toString().search("(((.+)+)+)+$").toString().constructor(_0xf43843).search("(((.+)+)+)+$")})),_0x55371f;_0xf43843(),_0x58fcf.prototype._debugPushGroup=function(e,t){this._options.enableGPUDebugMarkers&&(0===t||1===t?(0===t?this._renderEncoder:this._renderTargetEncoder).pushDebugGroup(e):this._currentRenderPass?this._currentRenderPass.pushDebugGroup(e):this._pendingDebugCommands.push(["push",e]))},_0x58fcf.prototype._debugPopGroup=function(e){this._options.enableGPUDebugMarkers&&(0===e||1===e?(0===e?this._renderEncoder:this._renderTargetEncoder).popDebugGroup():this._currentRenderPass?this._currentRenderPass.popDebugGroup():this._pendingDebugCommands.push(["pop",null]))},_0x58fcf.prototype._debugInsertMarker=function(e,t){this._options.enableGPUDebugMarkers&&(0===t||1===t?(0===t?this._renderEncoder:this._renderTargetEncoder).insertDebugMarker(e):this._currentRenderPass?this._currentRenderPass.insertDebugMarker(e):this._pendingDebugCommands.push(["insert",e]))},_0x58fcf.prototype._debugFlushPendingCommands=function(){for(var e=0;e<this._pendingDebugCommands.length;++e){var t=this._pendingDebugCommands[e],i=t[0],n=t[1];switch(i){case"push":this._debugPushGroup(n);break;case"pop":this._debugPopGroup();break;case"insert":this._debugInsertMarker(n)}}this._pendingDebugCommands.length=0};var _0x4a05bf=(_0x19bdf5=!0,function(e,t){var i=_0x19bdf5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19bdf5=!1,i}),_0x2102a7=_0x4a05bf(void 0,(function(){return _0x2102a7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2102a7).search("(((.+)+)+)+$")})),_0x19bdf5;_0x2102a7(),_0x58fcf.prototype.updateDynamicIndexBuffer=function(e,t,i){void 0===i&&(i=0);var n,r=e;n=e.is32Bits?t instanceof Uint32Array?t:new Uint32Array(t):t instanceof Uint16Array?t:new Uint16Array(t),this._bufferManager.setSubData(r,i,n)},_0x58fcf.prototype.updateDynamicVertexBuffer=function(e,t,i,n){var r,o=e;void 0===i&&(i=0),void 0===n?n=(r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t).byteLength:r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t,this._bufferManager.setSubData(o,i,r,0,n)};var _0x1d189d=(_0x1b8b95=!0,function(e,t){var i=_0x1b8b95?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b8b95=!1,i}),_0x59aba7=_0x1d189d(void 0,(function(){return _0x59aba7.toString().search("(((.+)+)+)+$").toString().constructor(_0x59aba7).search("(((.+)+)+)+$")})),_0x1b8b95;_0x59aba7(),_0x58fcf.prototype.createDynamicTexture=function(e,t,i,n){var r=new InternalTexture(this,InternalTextureSource.Dynamic);return r.baseWidth=e,r.baseHeight=t,i&&(e=this.needPOTTextures?_0xb82ccc.GetExponentOfTwo(e,this._caps.maxTextureSize):e,t=this.needPOTTextures?_0xb82ccc.GetExponentOfTwo(t,this._caps.maxTextureSize):t),r.width=e,r.height=t,r.isReady=!1,r.generateMipMaps=i,r.samplingMode=n,this.updateTextureSamplingMode(n,r),this._internalTexturesCache.push(r),r},_0x58fcf.prototype.updateDynamicTexture=function(e,t,i,n,r,o,a){var s;if(void 0===n&&(n=!1),e){var l=t.width,u=t.height,c=e._hardwareTexture;!(null===(s=e._hardwareTexture)||void 0===s?void 0:s.underlyingResource)&&(c=this._textureHelper.createGPUTextureForInternalTexture(e,l,u)),this._textureHelper.updateTexture(t,e,l,u,e.depth,c.format,0,0,i,n,0,0,a),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder),e.isReady=!0}};var _0x480777=(_0x64722b=!0,function(e,t){var i=_0x64722b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x64722b=!1,i}),_0x3c285f=_0x480777(void 0,(function(){return _0x3c285f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c285f).search("(((.+)+)+)+$")})),_0x64722b;function _0x43c9ac(e){return _0x5e1b10.call(this,e)||this}_0x3c285f(),_0x5e1b10&&(_0x43c9ac.__proto__=_0x5e1b10),_0x43c9ac.prototype=Object.create(_0x5e1b10&&_0x5e1b10.prototype),_0x43c9ac.prototype.constructor=_0x5e1b10;var _0xf6567b=(_0x1fe00c=!0,function(e,t){var i=_0x1fe00c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fe00c=!1,i}),_0xeb9394=_0xf6567b(void 0,(function(){return _0xeb9394.toString().search("(((.+)+)+)+$").toString().constructor(_0xeb9394).search("(((.+)+)+)+$")})),_0x1fe00c;_0xeb9394(),_0x58fcf.prototype.createExternalTexture=function(e){return new _0x43c9ac(e)},_0x58fcf.prototype.setExternalTexture=function(e,t){t?this._setInternalTexture(e,t):this._currentMaterialContext.setTexture(e,null)};var _0x167142=(_0x89435=!0,function(e,t){var i=_0x89435?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x89435=!1,i}),_0x2ab31a=_0x167142(void 0,(function(){return _0x2ab31a.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ab31a).search("(((.+)+)+)+$")})),_0x89435;_0x2ab31a(),_0x58fcf.prototype.unBindMultiColorAttachmentFramebuffer=function(e,t,i){void 0===t&&(t=!1),i&&i();var n=e._attachments.length;this._currentRenderPass&&this._currentRenderPass!==this._mainRenderPassWrapper.renderPass&&this._endRenderTargetRenderPass();for(var r=0;r<n;r++){var o=e.textures[r];o.generateMipMaps&&!t&&!o.isCube&&this._generateMipmaps(o)}this._currentRenderTarget=null,this._mrtAttachments=[],this._cacheRenderPipeline.setMRT([]),this._cacheRenderPipeline.setMRTAttachments(this._mrtAttachments),this._currentRenderPass=this._mainRenderPassWrapper.renderPass,this._setDepthTextureFormat(this._mainRenderPassWrapper),this._setColorFormat(this._mainRenderPassWrapper)},_0x58fcf.prototype.createMultipleRenderTarget=function(e,t,i){var n,r=!1,o=!0,a=!1,s=!1,l=_0x354cf8.TEXTUREFORMAT_DEPTH16,u=1,c=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,h=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE,d=new Array,f=new Array,p=new Array,_=this._createHardwareRenderTargetWrapper(!0,!1,e);void 0!==t&&(r=void 0!==t.generateMipMaps&&t.generateMipMaps,o=void 0===t.generateDepthBuffer||t.generateDepthBuffer,a=void 0!==t.generateStencilBuffer&&t.generateStencilBuffer,s=void 0!==t.generateDepthTexture&&t.generateDepthTexture,u=t.textureCount||1,l=null!==(n=t.depthTextureFormat)&&void 0!==n?n:_0x354cf8.TEXTUREFORMAT_DEPTH16,t.types&&(d=t.types),t.samplingModes&&(f=t.samplingModes),t.useSRGBBuffers&&(p=t.useSRGBBuffers));var m=e.width||e,g=e.height||e,x=null;(o||a||s)&&(x=_.createDepthStencilTexture(0,!1,a,1,l));var v=[],y=[],$=[];_._generateDepthBuffer=o,_._generateStencilBuffer=a,_._attachments=y,_._defaultAttachments=$;for(var b=0;b<u;b++){var T=f[b]||h,C=d[b]||c,S=p[b]||false;C!==_0x354cf8.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?C===_0x354cf8.TEXTURETYPE_HALF_FLOAT&&!this._caps.textureHalfFloatLinearFiltering&&(T=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE):T=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,C===_0x354cf8.TEXTURETYPE_FLOAT&&!this._caps.textureFloat&&(C=_0x354cf8.TEXTURETYPE_UNSIGNED_INT,_Misc_logger__WEBPACK_IMPORTED_MODULE_1__.Logger.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type"));var w=new InternalTexture(this,InternalTextureSource.MultiRenderTarget);v.push(w),y.push(b+1),$.push(i?b+1:0===b?1:0),w.baseWidth=m,w.baseHeight=g,w.width=m,w.height=g,w.isReady=!0,w.samples=1,w.generateMipMaps=r,w.samplingMode=T,w.type=C,w._cachedWrapU=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,w._cachedWrapV=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,w._useSRGBBuffer=S,this._internalTexturesCache.push(w),this._textureHelper.createGPUTextureForInternalTexture(w)}return x&&(x.incrementReferences(),v.push(x),this._internalTexturesCache.push(x)),_.setTextures(v),_},_0x58fcf.prototype.updateMultipleRenderTargetTextureSampleCount=function(e,t){if(!e||!e.textures||e.textures[0].samples===t)return t;var i=e.textures.length;if(0===i)return 1;t=Math.min(t,this.getCaps().maxMSAASamples);for(var n=0;n<i;++n){var r=e.textures[n];this._textureHelper.createMSAATexture(r,t),r.samples=t}return e._depthStencilTexture&&e._depthStencilTexture!==e.textures[e.textures.length-1]&&(this._textureHelper.createMSAATexture(e._depthStencilTexture,t),e._depthStencilTexture.samples=t),t},_0x58fcf.prototype.bindAttachments=function(e){0!==e.length&&this._currentRenderTarget&&(this._mrtAttachments=e,this._currentRenderPass&&this._cacheRenderPipeline.setMRTAttachments(e))},_0x58fcf.prototype.buildTextureLayout=function(e){for(var t=[],i=0;i<e.length;i++)e[i]?t.push(i+1):t.push(0);return t},_0x58fcf.prototype.restoreSingleAttachment=function(){},_0x58fcf.prototype.restoreSingleAttachmentForRenderTarget=function(){};var _0x421850=(_0x4a42c2=!0,function(e,t){var i=_0x4a42c2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a42c2=!1,i}),_0x443a5e=_0x421850(void 0,(function(){return _0x443a5e.toString().search("(((.+)+)+)+$").toString().constructor(_0x443a5e).search("(((.+)+)+)+$")})),_0x4a42c2;_0x443a5e(),_0x58fcf.prototype.getGPUFrameTimeCounter=function(){return this._timestampQuery.gpuFrameTimeCounter},_0x58fcf.prototype.captureGPUFrameTime=function(e){this._timestampQuery.enable=e&&!!this._caps.timerQuery},_0x58fcf.prototype.createQuery=function(){return this._occlusionQuery.createQuery()},_0x58fcf.prototype.deleteQuery=function(e){return this._occlusionQuery.deleteQuery(e),this},_0x58fcf.prototype.isQueryResultAvailable=function(e){return this._occlusionQuery.isQueryResultAvailable(e)},_0x58fcf.prototype.getQueryResult=function(e){return this._occlusionQuery.getQueryResult(e)},_0x58fcf.prototype.getQueryResultFrameID=function(e){return this._occlusionQuery.getQueryResultFrameID()},_0x58fcf.prototype.beginOcclusionQuery=function(e,t){var i;return this.compatibilityMode?!!this._occlusionQuery.canBeginQuery&&(null===(i=this._currentRenderPass)||void 0===i||i.beginOcclusionQuery(t),!0):((0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget).addItem(new WebGPURenderItemBeginOcclusionQuery(t)),!0)},_0x58fcf.prototype.endOcclusionQuery=function(){var e;this.compatibilityMode?null===(e=this._currentRenderPass)||void 0===e||e.endOcclusionQuery():(0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget).addItem(new WebGPURenderItemEndOcclusionQuery);return this};var _0x218e61=(_0x31bd7c=!0,function(e,t){var i=_0x31bd7c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31bd7c=!1,i}),_0x4cd55f=_0x218e61(void 0,(function(){return _0x4cd55f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4cd55f).search("(((.+)+)+)+$")})),_0x31bd7c;function _0x131cdc(e,t,i,n){var r,o=1;n===_0x354cf8.TEXTURETYPE_FLOAT?r=new Float32Array(t*i*4):n===_0x354cf8.TEXTURETYPE_HALF_FLOAT?(r=new Uint16Array(t*i*4),o=15360):r=n===_0x354cf8.TEXTURETYPE_UNSIGNED_INTEGER?new Uint32Array(t*i*4):new Uint8Array(t*i*4);for(var a=0;a<t;a++)for(var s=0;s<i;s++){var l=3*(s*t+a),u=4*(s*t+a);r[u+0]=e[l+0],r[u+1]=e[l+1],r[u+2]=e[l+2],r[u+3]=o}return r}_0x4cd55f(),_0x58fcf.prototype.createRawTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d){void 0===s&&(s=null),void 0===l&&(l=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),void 0===u&&(u=0),void 0===c&&(c=!1),void 0===h&&(h=1),void 0===d&&(d=1);var f=new InternalTexture(this,InternalTextureSource.Raw);return f.baseWidth=t,f.baseHeight=i,f.width=t,f.height=i,f.format=n,f.generateMipMaps=r,f.mipmapCount=h,f.samples=d,f.samplingMode=a,f.invertY=o,f._compression=s,f.type=l,f._useSRGBBuffer=c,!this._doNotHandleContextLost&&(f._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(f,t,i,void 0,u),this.updateRawTexture(f,e,n,o,s,l,c),this._internalTexturesCache.push(f),f},_0x58fcf.prototype.updateRawTexture=function(e,t,i,n,r,o,a,s){if(void 0===r&&(r=null),void 0===o&&(o=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),void 0===s&&(s=0),e){if(!this._doNotHandleContextLost&&(e._bufferView=t,e.invertY=n,e._compression=r,e._useSRGBBuffer=a),t){var l=e._hardwareTexture;i===_0x354cf8.TEXTUREFORMAT_RGB&&(t=_0x131cdc(t,e.width,e.height,o));var u=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(u,e,e.width,e.height,e.depth,l.format,0,s,n,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0}},_0x58fcf.prototype.updateSubRawTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){if(void 0===r&&(r=null),void 0===o&&(o=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),void 0===h&&(h=0),e){if(!this._doNotHandleContextLost&&(e._bufferView=t,e.invertY=n,e._compression=r,e._useSRGBBuffer=a),t){var d=e._hardwareTexture;i===_0x354cf8.TEXTUREFORMAT_RGB&&(t=_0x131cdc(t,s,l,o));var f=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(f,e,s,l,e.depth,d.format,0,h,n,!1,u,c),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0}},_0x58fcf.prototype.createRawCubeTexture=function(e,t,i,n,r,o,a,s){void 0===s&&(s=null);var l=new InternalTexture(this,InternalTextureSource.CubeRaw);return n!==_0x354cf8.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?n!==_0x354cf8.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering?n!==_0x354cf8.TEXTURETYPE_FLOAT||this._caps.textureFloatRender?n===_0x354cf8.TEXTURETYPE_HALF_FLOAT&&!this._caps.colorBufferFloat&&(r=!1,_0x41154e.Warn("Render to half float textures is not supported. Mipmap generation forced to false.")):(r=!1,_0x41154e.Warn("Render to float textures is not supported. Mipmap generation forced to false.")):(r=!1,a=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,_0x41154e.Warn("Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")):(r=!1,a=_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,_0x41154e.Warn("Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")),l.isCube=!0,l.format=i===_0x354cf8.TEXTUREFORMAT_RGB?_0x354cf8.TEXTUREFORMAT_RGBA:i,l.type=n,l.generateMipMaps=r,l.width=t,l.height=t,l.samplingMode=a,!this._doNotHandleContextLost&&(l._bufferViewArray=e),l._cachedWrapU=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,l._cachedWrapV=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,this._textureHelper.createGPUTextureForInternalTexture(l),e&&this.updateRawCubeTexture(l,e,i,n,o,s),l},_0x58fcf.prototype.updateRawCubeTexture=function(e,t,i,n,r,o){void 0===o&&(o=null),e._bufferViewArray=t,e.invertY=r,e._compression=o;for(var a=e._hardwareTexture,s=i===_0x354cf8.TEXTUREFORMAT_RGB,l=[],u=0;u<t.length;++u){var c=t[u];s&&(c=_0x131cdc(t[u],e.width,e.height,n)),l.push(new Uint8Array(c.buffer,c.byteOffset,c.byteLength))}this._textureHelper.updateCubeTextures(l,a.underlyingResource,e.width,e.height,a.format,r,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder),e.isReady=!0},_0x58fcf.prototype.createRawCubeTextureFromUrl=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this;void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===h&&(h=!1);var f=this.createRawCubeTexture(null,i,n,r,!o,h,c,null);null==t||t._addPendingData(f),f.url=e,this._internalTexturesCache.push(f);return this._loadFile(e,(function(e){!function(e){var i=f.width,o=a(e);if(o){var u=[0,2,4,1,3,5];if(s)for(var c=n===_0x354cf8.TEXTUREFORMAT_RGB,p=s(o),_=f._hardwareTexture,m=[0,1,2,3,4,5],g=0;g<p.length;g++){for(var x=i>>g,v=[],y=0;y<6;y++){var $=p[g][m[y]];c&&($=_0x131cdc($,x,x,r)),v.push(new Uint8Array($.buffer,$.byteOffset,$.byteLength))}d._textureHelper.updateCubeTextures(v,_.underlyingResource,x,x,_.format,h,!1,0,0)}else{for(v=[],y=0;y<6;y++)v.push(o[u[y]]);d.updateRawCubeTexture(f,v,n,r,h)}f.isReady=!0,null==t||t._removePendingData(f),l&&l()}}(e)}),void 0,null==t?void 0:t.offlineProvider,!0,(function(e,i){null==t||t._removePendingData(f),u&&e&&u(e.status+" "+e.statusText,i)})),f},_0x58fcf.prototype.createRawTexture3D=function(e,t,i,n,r,o,a,s,l,u,c){void 0===l&&(l=null),void 0===u&&(u=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=0);var h=new InternalTexture(this,InternalTextureSource.Raw3D);return h.baseWidth=t,h.baseHeight=i,h.baseDepth=n,h.width=t,h.height=i,h.depth=n,h.format=r,h.type=u,h.generateMipMaps=o,h.samplingMode=s,h.is3D=!0,!this._doNotHandleContextLost&&(h._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(h,t,i,void 0,c),this.updateRawTexture3D(h,e,r,a,l,u),this._internalTexturesCache.push(h),h},_0x58fcf.prototype.updateRawTexture3D=function(e,t,i,n,r,o){if(void 0===r&&(r=null),void 0===o&&(o=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),!this._doNotHandleContextLost&&(e._bufferView=t,e.format=i,e.invertY=n,e._compression=r),t){var a=e._hardwareTexture;i===_0x354cf8.TEXTUREFORMAT_RGB&&(t=_0x131cdc(t,e.width,e.height,o));var s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(s,e,e.width,e.height,e.depth,a.format,0,0,n,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0},_0x58fcf.prototype.createRawTexture2DArray=function(e,t,i,n,r,o,a,s,l,u,c){void 0===l&&(l=null),void 0===u&&(u=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=0);var h=new InternalTexture(this,InternalTextureSource.Raw2DArray);return h.baseWidth=t,h.baseHeight=i,h.baseDepth=n,h.width=t,h.height=i,h.depth=n,h.format=r,h.type=u,h.generateMipMaps=o,h.samplingMode=s,h.is2DArray=!0,!this._doNotHandleContextLost&&(h._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(h,t,i,n,c),this.updateRawTexture2DArray(h,e,r,a,l,u),this._internalTexturesCache.push(h),h},_0x58fcf.prototype.updateRawTexture2DArray=function(e,t,i,n,r,o){if(void 0===r&&(r=null),void 0===o&&(o=_0x354cf8.TEXTURETYPE_UNSIGNED_INT),!this._doNotHandleContextLost&&(e._bufferView=t,e.format=i,e.invertY=n,e._compression=r),t){var a=e._hardwareTexture;i===_0x354cf8.TEXTUREFORMAT_RGB&&(t=_0x131cdc(t,e.width,e.height,o));var s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(s,e,e.width,e.height,e.depth,a.format,0,0,n,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0};var _0x53c271=(_0x43ce33=!0,function(e,t){var i=_0x43ce33?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43ce33=!1,i}),_0x1b2c38=_0x53c271(void 0,(function(){return _0x1b2c38.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b2c38).search("(((.+)+)+)+$")})),_0x43ce33;_0x1b2c38(),_0x58fcf.prototype._readTexturePixels=function(e,t,i,n,r,o,a,s,l,u){void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===l&&(l=0),void 0===u&&(u=0);var c=e._hardwareTexture;return a&&this.flushFramebuffer(),this._textureHelper.readPixels(c.underlyingResource,l,u,t,i,c.format,n,r,o,s)},_0x58fcf.prototype._readTexturePixelsSync=function(){throw"_readTexturePixelsSync is unsupported in WebGPU!"};var _0xeb5e84=(_0xaf157c=!0,function(e,t){var i=_0xaf157c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xaf157c=!1,i}),_0x225739=_0xeb5e84(void 0,(function(){return _0x225739.toString().search("(((.+)+)+)+$").toString().constructor(_0x225739).search("(((.+)+)+)+$")})),_0xaf157c;function _0x2081e5(){var e=_0x34d578.call(this,arguments)||this;return e}_0x225739(),_0x34d578&&(_0x2081e5.__proto__=_0x34d578),_0x2081e5.prototype=Object.create(_0x34d578&&_0x34d578.prototype),_0x2081e5.prototype.constructor=_0x34d578;var _0x8e9ac4=(_0x2a1d70=!0,function(e,t){var i=_0x2a1d70?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a1d70=!1,i}),_0x1df769=_0x8e9ac4(void 0,(function(){return _0x1df769.toString().search("(((.+)+)+)+$").toString().constructor(_0x1df769).search("(((.+)+)+)+$")})),_0x2a1d70;_0x1df769(),_0x58fcf.prototype._createHardwareRenderTargetWrapper=function(e,t,i){var n=new _0x2081e5(e,t,i,this);return this._renderTargetWrapperCache.push(n),n},_0x58fcf.prototype.createRenderTargetTexture=function(e,t){var i,n=this._createHardwareRenderTargetWrapper(!1,!1,e),r={};void 0!==t&&"object"==typeof t?(r.generateMipMaps=t.generateMipMaps,r.generateDepthBuffer=void 0===t.generateDepthBuffer||t.generateDepthBuffer,r.generateStencilBuffer=r.generateDepthBuffer&&t.generateStencilBuffer,r.samplingMode=void 0===t.samplingMode?_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,r.creationFlags=null!==(i=t.creationFlags)&&void 0!==i?i:0,r.noColorTarget=!!t.noColorTarget):(r.generateMipMaps=t,r.generateDepthBuffer=!0,r.generateStencilBuffer=!1,r.samplingMode=_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE,r.creationFlags=0,r.noColorTarget=!1);var o=r.noColorTarget?null:this._createInternalTexture(e,t,!0,InternalTextureSource.RenderTarget);return n._generateDepthBuffer=r.generateDepthBuffer,n._generateStencilBuffer=!!r.generateStencilBuffer,n.setTextures(o),(n._generateDepthBuffer||n._generateStencilBuffer)&&n.createDepthStencilTexture(0,void 0===r.samplingMode||r.samplingMode===_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE||r.samplingMode===_0x354cf8.TEXTURE_LINEAR_LINEAR||r.samplingMode===_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE||r.samplingMode===_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR||r.samplingMode===_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPNEAREST||r.samplingMode===_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPLINEAR||r.samplingMode===_0x354cf8.TEXTURE_NEAREST_LINEAR||r.samplingMode===_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST,n._generateStencilBuffer,n.samples),o&&(void 0!==t&&"object"==typeof t&&t.createMipMaps&&!r.generateMipMaps&&(o.generateMipMaps=!0),this._textureHelper.createGPUTextureForInternalTexture(o,void 0,void 0,void 0,r.creationFlags),void 0!==t&&"object"==typeof t&&t.createMipMaps&&!r.generateMipMaps&&(o.generateMipMaps=!1)),n},_0x58fcf.prototype._createDepthStencilTexture=function(e,t){var i=new InternalTexture(this,InternalTextureSource.DepthStencil),n=t.samples?t.samples:1,r=!t.generateStencil||t.generateStencil,o=!!t.bilinearFiltering&&t.bilinearFiltering,a=t.depthTextureFormat?t.depthTextureFormat:r?_0x354cf8.TEXTUREFORMAT_DEPTH24_STENCIL8:_0x354cf8.TEXTUREFORMAT_DEPTH32_FLOAT,s=t.comparisonFunction?t.comparisonFunction:0,l={};return l.comparisonFunction=s,l.generateStencil=r,l.bilinearFiltering=o,l.samples=n,l.depthTextureFormat=a,i.format=l.depthTextureFormat,this._setupDepthStencilTexture(i,e,l.generateStencil,l.bilinearFiltering,l.comparisonFunction,l.samples),this._textureHelper.createGPUTextureForInternalTexture(i),this._internalTexturesCache.push(i),i},_0x58fcf.prototype._setupDepthStencilTexture=function(e,t,i,n,r,o){void 0===o&&(o=1);var a=t.width||t,s=t.height||t,l=t.layers||0;e.baseWidth=a,e.baseHeight=s,e.width=a,e.height=s,e.is2DArray=l>0,e.depth=l,e.isReady=!0,e.samples=o,e.generateMipMaps=!1,e.samplingMode=n?_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE:_0x354cf8.TEXTURE_NEAREST_SAMPLINGMODE,e.type=_0x354cf8.TEXTURETYPE_FLOAT,e._comparisonFunction=r,e._cachedWrapU=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE,e._cachedWrapV=_0x354cf8.TEXTURE_CLAMP_ADDRESSMODE},_0x58fcf.prototype.updateRenderTargetTextureSampleCount=function(e,t){return e&&e.texture&&e.samples!==t?(t=Math.min(t,this.getCaps().maxMSAASamples),this._textureHelper.createMSAATexture(e.texture,t),e._depthStencilTexture&&(this._textureHelper.createMSAATexture(e._depthStencilTexture,t),e._depthStencilTexture.samples=t),e.texture.samples=t,t):t};var _0x5714a9=(_0x350f87=!0,function(e,t){var i=_0x350f87?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x350f87=!1,i}),_0x28556b=_0x5714a9(void 0,(function(){return _0x28556b.toString().search("(((.+)+)+)+$").toString().constructor(_0x28556b).search("(((.+)+)+)+$")})),_0x350f87;_0x28556b(),_0x58fcf.prototype.createRenderTargetCubeTexture=function(e,t){var i=this._createHardwareRenderTargetWrapper(!1,!0,e),n=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:_constants__WEBPACK_IMPORTED_MODULE_2__.Constants.TEXTURETYPE_UNSIGNED_INT,samplingMode:_constants__WEBPACK_IMPORTED_MODULE_2__.Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,format:_constants__WEBPACK_IMPORTED_MODULE_2__.Constants.TEXTUREFORMAT_RGBA,samples:1},t);n.generateStencilBuffer=n.generateDepthBuffer&&n.generateStencilBuffer,i._generateDepthBuffer=n.generateDepthBuffer,i._generateStencilBuffer=n.generateStencilBuffer;var r=new InternalTexture(this,InternalTextureSource.RenderTarget);return r.width=e,r.height=e,r.depth=0,r.isReady=!0,r.isCube=!0,r.samples=n.samples,r.generateMipMaps=n.generateMipMaps,r.samplingMode=n.samplingMode,r.type=n.type,r.format=n.format,this._internalTexturesCache.push(r),i.setTextures(r),(i._generateDepthBuffer||i._generateStencilBuffer)&&i.createDepthStencilTexture(0,void 0===n.samplingMode||n.samplingMode===_0x354cf8.TEXTURE_BILINEAR_SAMPLINGMODE||n.samplingMode===_0x354cf8.TEXTURE_LINEAR_LINEAR||n.samplingMode===_0x354cf8.TEXTURE_TRILINEAR_SAMPLINGMODE||n.samplingMode===_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPLINEAR||n.samplingMode===_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPNEAREST||n.samplingMode===_0x354cf8.TEXTURE_NEAREST_LINEAR_MIPLINEAR||n.samplingMode===_0x354cf8.TEXTURE_NEAREST_LINEAR||n.samplingMode===_0x354cf8.TEXTURE_LINEAR_LINEAR_MIPNEAREST,i._generateStencilBuffer,i.samples),t&&t.createMipMaps&&!n.generateMipMaps&&(r.generateMipMaps=!0),this._textureHelper.createGPUTextureForInternalTexture(r),t&&t.createMipMaps&&!n.generateMipMaps&&(r.generateMipMaps=!1),i};var _0x143307=(_0x3dee1e=!0,function(e,t){var i=_0x3dee1e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3dee1e=!1,i}),_0x4c8602=_0x143307(void 0,(function(){return _0x4c8602.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c8602).search("(((.+)+)+)+$")})),_0x3dee1e;_0x4c8602(),_0x58fcf.prototype.setTextureSampler=function(e,t){var i;null===(i=this._currentMaterialContext)||void 0===i||i.setSampler(e,t)};var _0x90dfbd=(_0x510759=!0,function(e,t){var i=_0x510759?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x510759=!1,i}),_0xa73a62=_0x90dfbd(void 0,(function(){return _0xa73a62.toString().search("(((.+)+)+)+$").toString().constructor(_0xa73a62).search("(((.+)+)+)+$")})),_0x510759;_0xa73a62(),_0x3a7b63.prototype.setStorageBuffer=function(e,t){this._engine.setStorageBuffer(e,t)},_0x58fcf.prototype.createStorageBuffer=function(e,t){return this._createBuffer(e,t|_0x354cf8.BUFFER_CREATIONFLAG_STORAGE)},_0x58fcf.prototype.updateStorageBuffer=function(e,t,i,n){var r,o=e;void 0===i&&(i=0),void 0===n?n=(r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t).byteLength:r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t,this._bufferManager.setSubData(o,i,r,0,n)},_0x58fcf.prototype.readFromStorageBuffer=function(e,t,i,n){var r=this;i=i||e.capacity;var o=this._bufferManager.createRawBuffer(i,_0x572d87.BufferUsage.MapRead|_0x572d87.BufferUsage.CopyDst);return this._renderTargetEncoder.copyBufferToBuffer(e.underlyingResource,null!=t?t:0,o,0,i),new Promise((function(e,t){r.onEndFrameObservable.addOnce((function(){o.mapAsync(_0x572d87.MapMode.Read,0,i).then((function(){var t=o.getMappedRange(0,i),a=n;if(void 0===a)(a=new Uint8Array(i)).set(new Uint8Array(t));else{var s=a.constructor;(a=new s(a.buffer)).set(new s(t))}o.unmap(),r._bufferManager.releaseBuffer(o),e(a)}),(function(e){return t(e)}))}))}))},_0x58fcf.prototype.setStorageBuffer=function(e,t){var i,n;null===(i=this._currentDrawContext)||void 0===i||i.setBuffer(e,null!==(n=null==t?void 0:t.getBuffer())&&void 0!==n?n:null)};var _0x1997c0=(_0x52faae=!0,function(e,t){var i=_0x52faae?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x52faae=!1,i}),_0x46abd2=_0x1997c0(void 0,(function(){return _0x46abd2.toString().search("(((.+)+)+)+$").toString().constructor(_0x46abd2).search("(((.+)+)+)+$")})),_0x52faae;_0x46abd2(),_0x58fcf.prototype.createUniformBuffer=function(e){var t;return t=e instanceof Array?new Float32Array(e):e,this._bufferManager.createBuffer(t,_0x572d87.BufferUsage.Uniform|_0x572d87.BufferUsage.CopyDst)},_0x58fcf.prototype.createDynamicUniformBuffer=function(e){return this.createUniformBuffer(e)},_0x58fcf.prototype.updateUniformBuffer=function(e,t,i,n){void 0===i&&(i=0);var r,o=e;void 0===n?n=(r=t instanceof Float32Array?t:new Float32Array(t)).byteLength:r=t instanceof Float32Array?t:new Float32Array(t),this._bufferManager.setSubData(o,i,r,0,n)},_0x58fcf.prototype.bindUniformBufferBase=function(e,t,i){this._currentDrawContext.setBuffer(i,e)},_0x58fcf.prototype.bindUniformBlock=function(){};var _0xf092a3=(_0x39aefe=!0,function(e,t){var i=_0x39aefe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39aefe=!1,i}),_0x398c23=_0xf092a3(void 0,(function(){return _0x398c23.toString().search("(((.+)+)+)+$").toString().constructor(_0x398c23).search("(((.+)+)+)+$")})),_0x39aefe;function _0x1a6f0d(e){return!(!e||void 0===e.underlyingResource)}function f$8(e,t,i){var n=i$i.call(this,e,t)||this;n._engine=i;var r=i.caps;n._drawBuffers=r.drawBuffersExtension,e$1T._maximumCombinedTextureImageUnits=r.maxCombinedTexturesImageUnits,e$1T._maximumCubeMapSize=u$_(r.maxCubemapTextureSize,8192),e$1T._maximumFragmentUniformVectors=r.maxFragmentUniformVectors,e$1T._maximumTextureImageUnits=u$_(r.maxTexturesImageUnits,16),e$1T._maximumRenderbufferSize=u$_(r.maxRenderTextureSize,4096),e$1T._maximumTextureSize=u$_(r.maxTextureSize,4096),e$1T._maximumVaryingVectors=u$_(r.maxVaryingVectors,16),e$1T._maximumVertexAttributes=u$_(r.maxVertexAttribs,16),e$1T._maximumVertexTextureImageUnits=u$_(r.maxVertexTextureImageUnits,16),e$1T._maximumVertexUniformVectors=u$_(r.maxVertexUniformVectors,256),e$1T._minimumAliasedLineWidth=1,e$1T._maximumAliasedLineWidth=1,e$1T._minimumAliasedPointSize=1,e$1T._maximumAliasedPointSize=1,e$1T._maximumViewportWidth=32767,e$1T._maximumViewportHeight=32767,e$1T._highpFloatSupported=r.highPrecisionShaderSupported,e$1T._highpIntSupported=r.highPrecisionShaderSupported,e$1T._maximumTextureFilterAnisotropy=r.maxAnisotropy,e$1T._maximumDrawBuffers=n.drawBuffers?16:1,e$1T._maximumColorAttachments=n.drawBuffers?16:1,e$1T._maximumSamples=r.maxMSAASamples,n._antialias=!0,n._standardDerivatives=r.standardDerivatives,n._blendMinmax=r.blendMinMax,n._elementIndexUint=!0,n._depthTexture=r.depthTextureExtension,n._fragDepth=r.fragmentDepthSupported,n._debugShaders=!1;var o=r.textureLOD;n._textureFloat=r.textureFloat,n._textureHalfFloat=r.textureHalfFloat,n._textureFloatLinear=r.textureFloatLinearFiltering,n._textureHalfFloatLinear=r.textureHalfFloatLinearFiltering,n._sysShaderDefines=[],e$2b(n._standardDerivatives)&&n._standardDerivatives&&n._sysShaderDefines.push("GL_OES_standard_derivatives"),e$2b(n._fragDepth)&&n._fragDepth&&n._sysShaderDefines.push("GL_EXT_frag_depth"),e$2b(o)&&n._sysShaderDefines.push("GL_EXT_shader_texture_lod"),n._sysShaderDefines.push("WEBGPU"),n._colorBufferFloat=r.colorBufferFloat,n._floatBlend=!0,n._colorBufferHalfFloat=r.textureHalfFloat,n._s3tc=r.s3tc,n._pvrtc=r.pvrtc,n._etc1=r.etc1,n._astc=r.astc,n._etc=r.etc1,n._bc7=r.bptc,f$S.setKTX2SupportedFormats(n._s3tc,n._pvrtc,n._astc,n._etc,n._etc1,n._bc7),n.webglOptions={},i.saveCompiledShaderInIndexDB=!1,p$1d.halfZRange=!0}function B$4(e,t,i,n,r,o,a){var s=e._currentRenderState,l=e._currentPassState,u=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,d$1m.partialApply(e._engine,s,t,l,i,u,i.viewport,n,r,o,a)}function b$8(e,t){t!==e._currentFramebuffer&&(e._currentFramebuffer=t,e$2b(t)?t._bind():e.engine.restoreDefaultFramebuffer())}_0x398c23(),_0x58fcf.prototype.updateVideoTexture=function(e,t,i){var n,r=this;if(e&&!e._isDisabled){void 0===this._videoTextureSupported&&(this._videoTextureSupported=!0);var o=e._hardwareTexture;!(null===(n=e._hardwareTexture)||void 0===n?void 0:n.underlyingResource)&&(o=this._textureHelper.createGPUTextureForInternalTexture(e)),_0x1a6f0d(t)?(this._textureHelper.copyVideoToTexture(t,e,o.format,!i),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder),e.isReady=!0):t&&this.createImageBitmap(t).then((function(t){r._textureHelper.updateTexture(t,e,e.width,e.height,e.depth,o.format,0,0,!i,!1,0,0),e.generateMipMaps&&r._generateMipmaps(e,r._uploadEncoder),e.isReady=!0})).catch((function(){e.isReady=!0}))}},i$i&&(f$8.__proto__=i$i),f$8.prototype=Object.create(i$i&&i$i.prototype),f$8.prototype.constructor=i$i,Object.defineProperties(f$8.prototype,{webgl2:{get:function(){return null}},webgpu:{get:function(){return!0}},engine:{get:function(){return this._engine}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return!0}},antialias:{get:function(){return this._antialias}},standardDerivatives:{get:function(){return!0}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},floatTextureSixPlaces:{get:function(){return!0}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},etc1:{get:function(){return this._etc1}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=wrapGL(this._originalGLContext,e?throwOnError:void 0)}},drawingBufferHeight:{get:function(){return this._engine.getRenderHeight(!0)}},drawingBufferWidth:{get:function(){return this._engine.getRenderWidth(!0)}},realDrawingBufferHeight:{get:function(){return this._engine.getRenderHeight(!0)}},realDrawingBufferWidth:{get:function(){return this._engine.getRenderWidth(!0)}}});var P$6=new t$X;function R$5(e,t,i,n,r){b$8(e,t);var o=e.drawingBufferWidth,a=e.drawingBufferHeight;e$2b(t)&&(o=t.textureSize.width,a=t.textureSize.height),B$4(e,r,i,!1,o,a,t),n._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,n.maximumTextureUnitIndex)}function A$7(e,t,i,n){var r=t._primitiveType,o=t._vertexArray,a=t._offset,s=t.instanceCount,l=e._engine;e._us.model=u$_(t._modelMatrix,p$1d.IDENTITY),e._us.useRelativeOrigin=t.useRelativeOrigin,i._setUniforms(n,e._us,e.validateShaderProgram,t),o._bind();var u=R$$.toFillMode(r),c=t.occlusionQueryID;const h=e._engine.currentRenderPassId;c&&(void 0===e._renderPassIdForOcclusionQuery&&(e._renderPassIdForOcclusionQuery=l.createRenderPassId("Render pass for occlusion query")),l.currentRenderPassId=e._renderPassIdForOcclusionQuery,l._getCurrentRenderPass(),l.beginOcclusionQuery(null,c));var d=o.indexBuffer;if(e$2b(d)){const i=t._count||d.numberOfIndices;e._trangleCount+=i/3,l.drawElementsType(u,a,i,s,t)}else{const e=t._count||o.numberOfVertices;l.drawArraysType(u,a,e,s,t)}c&&(l.endOcclusionQuery(),l.currentRenderPassId=h)}f$8.prototype.clear=function(e,t){e=u$_(e,P$6),t=u$_(t,this._defaultPassState);var i=e.color,n=e.depth,r=e.stencil,o=null;e$2b(i)&&((o={}).r=i.red,o.g=i.green,o.b=i.blue,o.a=i.alpha);var a=!1;e$2b(n)&&(n!==this._clearDepth&&(this._clearDepth=n),a=!0);var s=!1;e$2b(r)&&(r!==this._clearStencil&&(this._clearStencil=r),s=!0);var l=u$_(e.framebuffer,t.framebuffer);b$8(this,l);var u=this.drawingBufferWidth,c=this.drawingBufferHeight;B$4(this,u$_(e.renderState,this._defaultRenderState),t,!0,u,c,l);this._engine.clear(o,!0,a,s),this._engine.flushFramebuffer()},f$8.prototype.draw=function(e,t,i,n){t=u$_(t,this._defaultPassState);var r=u$_(e._framebuffer,t.framebuffer),o=u$_(e._renderState,this._defaultRenderState);i=u$_(i,e._shaderProgram),n=u$_(n,e._uniformMap),i._isReady()||i._createEffect(),e$2b(r)?e.setActiveFrameBufferID(r._inner.id):e.setActiveFrameBufferID(0),R$5(this,r,t,i,o),A$7(this,e,i,n)},f$8.prototype.endFrame=function(){this._engine.beginFrame(),this._engine.endFrame()};var g$8=new Array;f$8.prototype.readPixels=function(e){return console.log("webgpu use readPixelsAsync instead."),g$8[0]=0,g$8[1]=0,g$8[2]=0,g$8[3]=0,g$8},f$8.prototype.readPixelsAsync=function(e){e=u$_(e,u$_.EMPTY_OBJECT);var t=Math.max(u$_(e.x,0),0),i=Math.max(u$_(e.y,0),0),n=u$_(e.width,this.drawingBufferWidth),r=u$_(e.height,this.drawingBufferHeight),o=e.framebuffer;if(o$1q.typeOf.number.greaterThan("readState.width",n,0),o$1q.typeOf.number.greaterThan("readState.height",r,0),e$2b(o)){var a=o.getColorTexture(0)._inner.internalTexture._hardwareTexture;return this._engine.flushFramebuffer(),this._engine._textureHelper.readPixels(a.underlyingResource,t,i,n,r,a.format,0,0,null,!1)}return b$8(this,o),this._engine.readPixels(t,i,n,r)},f$8.prototype.resize=function(){this._engine.resize(!0)},f$8.prototype.isDestroyed=function(){return!1},f$8.prototype.destroy=function(){return i$i.prototype.destroy.call(this),i$10(this)};var ke=new r$T("MapQuest, SuperMap iServer Imagery"),Z$5=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652,.007089059829027304,.014178119658054609,.028356239316109217,.056712478632218434,.11342495726443687,.2684991452887374],ne$3=[1.690163571602655e-9,3.38026990562e-9,6.76053981124e-9,1.352107962249e-8,2.704215924497e-8,5.408431848995e-8,1.0816863697989e-7,2.1633727395979e-7,4.3267454791958e-7,8.6534909583916e-7,173069819167831e-20,346139638335662e-20,692279276671324e-20,1384558553342649e-20,2769117106685297e-20,5538234213370595e-20,.0001107646842674119,.0002215293685348238,.0004430587370696476,.0008861174741392952,.0017722349482785903,.0035444698965571807,.007088939793114361],H$4=function(e){if(!e$2b((e=u$_(e,{})).url))throw new t$16("options.url is required.");this._baseUrl=e.url;var t=(n=e.url).substring(0,n.indexOf("/datas"));this.tablename=n.substring(n.indexOf("datas/")+6,n.length);var i=this;new l$15({name:t+this.tablename}).then((function(e){e.checkObjectStoreExit(i.tablename)?i._indexedDBScheduler=e:e.createObjectStore(i.tablename).then((function(){i._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){i._indexedDBScheduler.clear(i.tablename)},cache:[]},this.isSci3D=!1,this.isTileMap=u$_(e.isTileMap,!1);var n=n$18(e.url);if(this._packingRequest=e.packingRequest,n.indexOf("rest/maps")>-1?(this.isTileMap=!0,this.layersID=e.layersID):n.indexOf("rest/realspace")>-1&&(this.isSci3D=!0),this._url=n,this._resource=t$11.createIfNeeded(n),this._resolution=e$2b(e.highResolution)?2:1,this._transparent=u$_(e.transparent,!0),this._name=e.name||"",this._urlTemplate=void 0,this._errorEvent=new o$1h,this._fileExtension="png",this._tileWidth=256,this._tileHeight=256,this._tileFormat=e.tileFormat||"png",this._scales=Z$5,this._rasterfunction=u$_(e.rasterfunction,void 0),this._regions=e.regions,this._cache=u$_(e._cache,!0),this._isBlock=!1,this._blockCache={},this._blockCacheQueue=new r$Q,this._blockCacheSize=100,this._blockScale=0,this._tileversion=u$_(e.tileversion,""),this._minimumLevel=u$_(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=void 0,this._tilingScheme=e.tilingScheme,this._subdomains=e.subdomains,e$2b(e.tilingScheme)&&e$2b(e.tilingScheme._scaleDenominators)){this._scales=[];for(var r=0;r<e.tilingScheme._scaleDenominators.length;r++)this._scales[r]=1/e.tilingScheme._scaleDenominators[r]}this._flipY=!1,this._tileDiscardPolicy=e.tileDiscardPolicy,this._fRatio=u$_(e.ratio,e$2a.DEGREES_PER_RADIAN/t$13.WGS84.maximumRadius),this._coordUnit="DEGREE",this._customRequestHeaders=e.customRequestHeaders;var o=u$_(e.credit,ke);this._cacheKey=u$_(e.cacheKey,""),this._cacheEnabled=u$_(e.cacheEnabled,!0),"string"==typeof o&&(o=new r$T(o)),this._credit=o,this._ready=!1,this._readyPromise=o$1l.defer();i=this;e$2b(this._subdomains)&&(n=n.replace(/({.*?})/g,(function(e,t){if(!e$2b(i._subdomains.length))throw new t$16("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?i._subdomains[0]:e}))),this._layerStatusParameters=u$_(e.layerStatusParameters,void 0),this._layerStatusParametersID=void 0;var a,s=!0;function l(){if(i.isTileMap){var e=n.slice(0,-1)+".json";e$2b(a$O.CREDENTIAL)&&(e=e$2b(a$O.CREDENTIAL._keymap[i._baseUrl])?a$O.addTokenWithKey(i._baseUrl,e):a$O.addToken(e)),LicenseChecker.LICENSECHECKER.getLicense(e).then((function(e){LicenseChecker.LICENSECHECKER.check(e)}));var t=u$Q(e,i.customRequestHeaders);o$1l.all([t,s]).then(c,h)}else{var r=n+"config";e$2b(a$O.CREDENTIAL)&&(r=e$2b(a$O.CREDENTIAL._keymap[i._baseUrl])?a$O.addTokenWithKey(i._baseUrl,r):a$O.addToken(r)),LicenseChecker.LICENSECHECKER.getLicense(r).then((function(e){LicenseChecker.LICENSECHECKER.check(e)})),o$1l.all([u$R(r,i._customRequestHeaders),s]).then(u,h)}}function u(t){var n=function(e){var t=(e=d.parseFromString(e,"application/xml")).childNodes[0],n="http://www.supermap.com/SuperMapCache/sci3d",r=u$_(Ke(t,"xmlns:sml"),n);P$5(t,"Version",r);var o=je(F$4(t,"StoreType",r),"BlockScale");"number"==typeof o&&(i._isBlock=!0,i._blockScale=o);for(var a=Ae$2(F$4(t,"Levels",r),"Level",r),s=[],l=0,u=a.length;l<u;l++)s.push(parseInt(a[l].textContent,10));var c=F$4(t,"Bounds",r),h=P$5(c,"Left",r),f=P$5(c,"Right",r),p=P$5(c,"Top",r),_=P$5(c,"Bottom",r),m=ue$1(t,"FileExtentName",r),g=P$5(t,"CellWidth",r),x=P$5(t,"CellHeight",r),v=ue$1(t,"CacheName",r);return i._name||(i._name=v||""),{left:h,right:f,top:p,bottom:_,fileExtentName:m,levels:s,imageSizeWidth:g,imageSizeHeight:x}}(t[0]);i._fileExtension=u$_(n.fileExtentName,"png"),i._tileWidth=u$_(n.imageSizeWidth,256),i._tileHeight=u$_(n.imageSizeHeight,256);var r=n.levels,o=r.length;i._minimumLevel=u$_(r[0],0),i._maximumLevel=u$_(i._maximumLevel,r[o-1]),e$2b(i._tilingScheme)||(i._tilingScheme=new g$13({ellipsoid:e.ellipsoid}));var a,s,l,u,c=i._tilingScheme;e$2b(i._rectangle)||e$2b(n.left)&&e$2b(n.right)&&e$2b(n.top)&&e$2b(n.bottom)&&(a=e$2a.toRadians(n.left),l=e$2a.toRadians(n.right),s=e$2a.toRadians(n.bottom),u=e$2a.toRadians(n.top),a>Math.PI&&(o$1p.globalOffset.x=Math.floor(a/Math.PI)*Math.PI,a-=o$1p.globalOffset.x,l-=o$1p.globalOffset.x,o$1p.globalOffset.x*=6378137),u>.5*Math.PI&&(o$1p.globalOffset.y=Math.floor((u+.5*Math.PI)/Math.PI)*Math.PI,u-=o$1p.globalOffset.y,s-=o$1p.globalOffset.y,o$1p.globalOffset.y*=6378137),i._rectangle=new h$18(a,s,l,u));i._rectangle.west<c.rectangle.west&&(i._rectangle.west=c.rectangle.west),i._rectangle.east>c.rectangle.east&&(i._rectangle.east=c.rectangle.east),i._rectangle.south<c.rectangle.south&&(i._rectangle.south=c.rectangle.south),i._rectangle.north>c.rectangle.north&&(i._rectangle.north=c.rectangle.north);var h=c.positionToTileXY(h$18.southwest(i._rectangle),i._minimumLevel),f=c.positionToTileXY(h$18.northeast(i._rectangle),i._minimumLevel);(Math.abs(f.x-h.x)+1)*(Math.abs(f.y-h.y)+1)>4&&(i._minimumLevel=0),i._tilingScheme=c,i._urlTemplate=i._url+"data/index/{y}/{x}.{fileExtension}?level={level}",i._ready=!0,i._readyPromise.resolve(!0)}function c(t){var n=t[0],r=n.prjCoordSys.coordUnit;i._coordUnit=r;var o=n.prjCoordSys.epsgCode,a=n.bounds,s=n.visibleScales;if(i.customScales=s&&s.length>0,"DEGREE"==r){var l=3857==o?85:90,u=i._resolution;if(i._tilingScheme=new g$13({numberOfLevelZeroTilesX:2*u,numberOfLevelZeroTilesY:u}),a.left=e$2a.clamp(a.left,-180,180),a.bottom=e$2a.clamp(a.bottom,-l,l),a.right=e$2a.clamp(a.right,-180,180),a.top=e$2a.clamp(a.top,-l,l),e$2a.equalsEpsilon(a.left,a.right,e$2a.EPSILON7)&&(a.right+=e$2a.EPSILON5),e$2a.equalsEpsilon(a.top,a.bottom,e$2a.EPSILON7)&&(a.top+=e$2a.EPSILON5),i._rectangle=h$18.fromDegrees(a.left,a.bottom,a.right,a.top),i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-180,"y":90}{tileversion}',(s=u$_(e.scales,s)).length>0){var c=[];for(var h=i.customScales?0:u;h<s.length;h++)c.push(1/s[h]);i._tilingScheme._scaleDenominators=c,n.dpi&&(i._tilingScheme._customDPI=new o$1o(n.dpi,n.dpi)),i._tilingScheme._rectangle=i._rectangle,i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":'+a.left+',"y":'+a.top+"}{tileversion}",i._maximumLevel=c.length}}else{var d=new o$1p(a.left,a.bottom,0);d.x>20037508.342789244&&(o$1p.globalOffset.x=20037508.342789244*Math.floor(d.x/20037508.342789244),d.x=d.x-o$1p.globalOffset.x),d.y>10018754.171394622&&(o$1p.globalOffset.y=20037508.342789244*Math.floor((d.y+10018754.171394622)/20037508.342789244),d.y=d.y-o$1p.globalOffset.y);var f=new o$1p(a.right,a.top,0);if(f.x=Math.min(20037508.342789244,f.x-o$1p.globalOffset.x),f.y=Math.min(20037508.342789244,f.y-o$1p.globalOffset.y),e$2b(i._tilingScheme)){c=[];if(i._tilingScheme._scaleDenominators)c=i._tilingScheme._scaleDenominators;else for(h=0;h<s.length;h++)c.push(1/s[h]);i._tilingScheme._scaleDenominators=c,n.dpi&&(i._tilingScheme._customDPI=new o$1o(n.dpi,n.dpi)),i._tilingScheme._rectangleNortheastInMeters=f,i._tilingScheme._rectangleSouthwestInMeters=d;var p=i._tilingScheme._projection.unproject(d),_=i._tilingScheme._projection.unproject(f);if(i._tilingScheme._rectangle=new h$18(p.longitude,p.latitude,_.longitude,_.latitude),s.length>0){var m=s[0];u=.0254/(n.dpi*m);i._tilingScheme._numberOfLevelZeroTilesX=Math.ceil((f.x-d.x)/u/n.viewer.width),i._tilingScheme._numberOfLevelZeroTilesY=Math.ceil((f.y-d.y)/u/n.viewer.height)}}else{var g,x,v=e$2b(n.prjCoordSys)&&(3857==n.prjCoordSys.epsgCode||e$2b(n.prjCoordSys.projection)&&("PRJ_SPHERE_MERCATOR"===n.prjCoordSys.projection.type||"PRJ_TRANSVERSE_MERCATOR"===n.prjCoordSys.projection.type)),y=v?new t$O:new n$1b;c=[];if(!v){for(h=0;h<s.length;h++)c.push(1/s[h]);if(s.length>0){n.viewBounds.rightTop,n.viewBounds.leftBottom;m=s[0],u=.0254/(n.dpi*m);g=Math.ceil((f.x-d.x)/u/n.viewer.width),x=Math.ceil((f.y-d.y)/u/n.viewer.height)}}!v&&s.length>0?i._tilingScheme=new c$R({numberOfLevelZeroTilesX:g,numberOfLevelZeroTilesY:x,projection:y,rectangleSouthwestInMeters:d,rectangleNortheastInMeters:f,customDPI:new o$1o(n.dpi,n.dpi),scaleDenominators:c}):i._tilingScheme=new c$R({projection:y})}p=i._tilingScheme._projection.unproject(d),_=i._tilingScheme._projection.unproject(f);i._rectangle=new h$18(p.longitude,p.latitude,_.longitude,_.latitude),!v&&(s.length>0||c.length>0)?i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":'+a.left+',"y":'+a.top+"}{tileversion}":i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-20037508.342789248 ,"y":20037508.342789095}{tileversion}'}if(e$2b(s)&&Array.isArray(s)&&s.length>1)if(i._tilingScheme.projection instanceof n$1b)i._scales=s,i._maximumLevel=s.length-1-i._resolution;else{var $=s[s.length-1];i._maximumLevel=Le$2(i,$),e$2b(n.prjCoordSys.name)&&n.prjCoordSys.name.indexOf("Beijing")>-1&&n.prjCoordSys.name.indexOf("1954")>-1&&(i._scales=ne$3)}else e$2b(i._maximumLevel)||(i._maximumLevel=i._scales.length-1);"GCS_Beijing_1954"===n.prjCoordSys.name&&(!e$2b(s)||0==s.length)&&(i._scales=ne$3),i._urlTemplate=i._urlTemplate.replace("{transparent}",i._transparent),i._urlTemplate=i._urlTemplate.replace("{_cache}",i._cache),e$2b(i._rasterfunction)&&(i._urlTemplate=i._urlTemplate+"&rasterfunction={rasterfunction}"),i.layersID&&(i._urlTemplate=i._urlTemplate+"&layersID="+i.layersID),e$2b(i._regions)&&(i._urlTemplate=i._urlTemplate+"®ions="+i._regions),i._rectangle||(i._rectangle=u$_(e.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._readyPromise.resolve(!0)}function h(e){var t="An error occurred while accessing "+i._url+".";a=l$W.handleError(a,i,i._errorEvent,t,void 0,void 0,void 0,l),i._readyPromise.reject(new t$14(t))}this._layerStatusParameters&&(s=le$3(this)),l();var d=new DOMParser};function le$3(e){var t=o$1l.defer(),i=new r$1b,n=e._url+"tempLayersSet.jsonp";return e$2b(a$O.CREDENTIAL)&&(n=a$O.addToken(n)),d$V(n,{parameters:{_method:"POST",requestEntity:null,sectionCount:1,sectionIndex:0,jsonpUserID:Date.now()}},i),i.deferred.then((function(i){for(var n=[],r=0;r<e._layerStatusParameters.length;r++){var o=e._layerStatusParameters[r];n.push({type:"UGC",name:o.layerName,visible:!!o.isVisible,displayFilter:o.displayFilter||""})}var a=e._url.slice(0,-1),s=a.lastIndexOf("/"),l=e._baseUrl+i.newResourceLocation.substring(i.newResourceLocation.indexOf("/tempLayersSet"));e$2b(a$O.CREDENTIAL)&&(l=a$O.addToken(l));var u=t$11.createIfNeeded(l),c=[{type:"UGC",visible:!0,subLayers:{layers:n},name:a.slice(s+1)}];u.put(JSON.stringify(c)).then((function(){e._layerStatusParametersID=i.newResourceID,t.resolve(e._layerStatusParametersID)})).otherwise((function(){t.resolve(void 0)}))})),t.promise}function Le$2(e,t){for(var i=e._scales.length;i--;)if(e._scales[i]<=t)return i}function $$4(e,t,i,n,r){var o;if(e.isTileMap){var a,s=""===e._tileversion?"":"&tileversion="+e._tileversion;if("DEGREE"===e._coordUnit)if(1===e.packingRequest)o=e._urlTemplate.replace("&x={x}&y={y}&scale={scale}","").replace("{tileversion}",s).replace("tileImage","tileImages").replace("&_cache=true","");else{let r=e.customScales?0:e.resolution;a=e._scales[n+r]||Z$5[n],o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{scale}",a.toString()).replace("{tileversion}",s)}else"METER"===e._coordUnit&&(1===e.packingRequest?o=e._urlTemplate.replace("&x={x}&y={y}&scale={scale}","").replace("{tileversion}",s).replace("tileImage","tileImages").replace("&_cache=true",""):(a=e._scales[n],o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{scale}",a.toString()).replace("{tileversion}",s)))}else o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{level}",n).replace("{fileExtension}",e._fileExtension);if(e$2b(e._subdomains)){var l=e._subdomains,u=l[(t+i+n)%l.length];o=o.replace(Oe$1,(function(e,t){return"{s}"===t?u:e}))}return e$2b(a$O.CREDENTIAL)&&(o=a$O.addToken(o)),o}function U$5(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}function se$1(e,t,i,n){var r=e._blockScale,o=Math.pow(2,r),a=Math.floor(t/o),s=t%o,l=Math.floor(i/o),u=i%o;return{x:a,y:l,url:$$4(e,a,l,n),col:s,row:u,level:n,blockSize:o}}Object.defineProperties(H$4.prototype,{url:{get:function(){return this._url}},name:{get:function(){return this._name},set:function(e){this._name=e}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}},tileWidth:{get:function(){if(!this._ready)throw new t$16("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$16("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},tileFormat:{get:function(){return this._tileFormat}},tileversion:{get:function(){return this._tileversion}},maximumLevel:{get:function(){if(!this._ready)throw new t$16("maximumLevel must not be called before the imagery provider is ready.");return 1===this.resolution?this._maximumLevel:this._maximumLevel-1}},minimumLevel:{get:function(){if(!this._ready)throw new t$16("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){if(!this._ready)throw new t$16("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$16("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},ratio:{get:function(){return this._fRatio},set:function(e){this._fRatio=e}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},resolution:{get:function(){return this._resolution}},flipY:{get:function(){return this._flipY},set:function(e){this._flipY=e}},packingRequest:{get:function(){return this._packingRequest}},isBlock:{get:function(){return this._isBlock}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2b(e)&&!e$2b(e.length))throw new t$16("Excepted SuperMapImageryProvider.subdomains to be type of Array.");this._subdomains=e}},layerStatusParameters:{get:function(){return this._layerStatusParameters}}}),H$4.prototype.setLayerStatusParameters=function(e){if(!e$2b(e))throw new t$16("Parameter is required.");if(!e$2b(e.length))throw new t$16("Expected parameter to be type of Array.");return this._layerStatusParameters=e,le$3(this)},H$4.prototype.getTileCredits=function(e,t,i){};var Oe$1=/({.*?})/g;H$4.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$16("requestImage must not be called before the imagery provider is ready.");var r=$$4(this,e,t,i);if(this.isSci3D){var o=1<<i;r=$$4(this,e+o$1p.globalOffset.x/(6378137*Math.PI)*o,t+o$1p.globalOffset.y/(6378137*Math.PI)*o,i)}e$2b(this._layerStatusParametersID)&&(r+="&layersID="+this._layerStatusParametersID),e$2b(a$O.CREDENTIAL)&&e$2b(a$O.CREDENTIAL._keymap[this._baseUrl])&&(r=a$O.addTokenWithKey(this._baseUrl,r));var a=this,s={};e$2b(this._rasterfunction)&&(s.rasterfunction=JSON.stringify(this._rasterfunction));var l=this._resource.getDerivedResource({url:r,request:n,templateValues:s});if(n.quadKey=U$5(e,t,i),this._packingRequest===X$N.QuadKey&&this._isBlock){n.type=V$15.BLOCKPACK,n.throttle=!0;var u=se$1(this,e,t,i);if(l.url=u.url,n.blockInfo=u,n.quadKey=U$5(u.x,u.y,u.level),n.providerName=this.url,e$2b(h=this.blockCache[n.quadKey]))return this.blockCacheQueue.touch(h),h.data}else if(this._packingRequest===X$N.QuadKey){if(n.type=V$15.PACK,this.isTileMap){var c=this._scales[i+this.resolution]||Z$5[i];n.quadKey=c+":"+e+":"+t}else n.quadKey=U$5(e,t,i);n.providerName=this.url,n.throttle=!0}else if(this._isBlock){n.type=V$15.BLOCK;var h;u=se$1(this,e,t,i);if(l.url=u.url,n.blockInfo=u,n.quadKey=U$5(u.x,u.y,u.level),n.providerName=this.url,e$2b(h=this.blockCache[n.quadKey])&&e$2b(h.data))return this.blockCacheQueue.touch(h),h.data;if(!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){var d,f=o$1l.defer();return e$2b(this._indexedDBScheduler)&&e$2b(d=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey))?(o$1l(d,(function(e){e$2b(e)?f.resolve(e):f.resolve("cacheError")}),(function(e){f.resolve("cacheError")})),f):p(a,l)}}if(!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable)return e$2b(this._indexedDBScheduler)&&e$2b(d=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey))?o$1l(d,(function(e){return e$2b(e)?e:"cacheError"}),(function(e){return"cacheError"})):p(a,l);function p(e,t){if(e._isBlock){var i=e.blockCache[n.quadKey];if(e$2b(i))return i.promise;var r=ce$4(e,t);return e$2b(r)?(i=new e$1b(e,n.quadKey),e.blockCache[n.quadKey]=i,i.promise=r,i.promise):void 0}return ce$4(e,t)}return p(a,l)};var Me$3=/\.ktx$/i,Be$2=/\.crn$/i,oe$3=/\.dxtz/i;function ce$4(e,t){o$1q.defined("url",t);var i=t$11.createIfNeeded(t);return e.isBlock||e.packingRequest===X$N.QuadKey?(oe$3.test(i.url)&&(e.flipY=!0),i.fetchArrayBuffer()):Me$3.test(i.url)?k$V(i):Be$2.test(i.url)?a$P(i):oe$3.test(i.url)?(e.flipY=!0,B$M(i)):e$2b(e.tileDiscardPolicy)?i.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(e$2b(e._customRequestHeaders)&&(i.headers=p$19(i.headers,e._customRequestHeaders)),e._cacheKey.length>0?i.fetchArrayBuffer():i.fetchBlob())}function je(e,t){if(e$2b(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function Ke(e,t){if(e$2b(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function F$4(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function Ae$2(e,t,i){if(e$2b(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function P$5(e,t,i){var n=F$4(e,t,i);if(e$2b(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function ue$1(e,t,i){var n=F$4(e,t,i);if(e$2b(n))return n.textContent.trim()}H$4.prototype.pickFeatures=function(){};var tr=function(e){var t,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,r=Math.ceil,o=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",l=1e14,u=14,c=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,f=1e9;function p(e){var t=0|e;return e>0||e===t?t:t-1}function _(e){for(var t,i,n=1,r=e.length,o=e[0]+"";n<r;){for(t=e[n++]+"",i=u-t.length;i--;t="0"+t);o+=t}for(r=o.length;48===o.charCodeAt(--r););return o.slice(0,r+1||1)}function m(e,t){var i,n,r=e.c,o=t.c,a=e.s,s=t.s,l=e.e,u=t.e;if(!a||!s)return null;if(i=r&&!r[0],n=o&&!o[0],i||n)return i?n?0:-s:a;if(a!=s)return a;if(i=a<0,n=l==u,!r||!o)return n?0:!r^i?1:-1;if(!n)return l>u^i?1:-1;for(s=(l=r.length)<(u=o.length)?l:u,a=0;a<s;a++)if(r[a]!=o[a])return r[a]>o[a]^i?1:-1;return l==u?0:l>u^i?1:-1}function g(e,t,i,n){if(e<t||e>i||e!==o(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<t||e>i?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function x(e){var t=e.c.length-1;return p(e.e/u)==t&&e.c[t]%2!=0}function v(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function y(e,t,i){var n,r;if(t<0){for(r=i+".";++t;r+=i);e=r+e}else if(++t>(n=e.length)){for(r=i,t-=n;--t;r+=i);e+=r}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}return t=function e(t){var $,b,T,C=N.prototype={constructor:N,toString:null,valueOf:null},S=new N(1),w=20,E=4,P=-7,A=21,L=-1e7,M=1e7,R=!1,O=1,I=0,D={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},B="0123456789abcdefghijklmnopqrstuvwxyz";function N(e,t){var n,r,a,l,h,d,f,p,_=this;if(!(_ instanceof N))return new N(e,t);if(null==t){if(e&&!0===e._isBigNumber)return _.s=e.s,void(!e.c||e.e>M?_.c=_.e=null:e.e<L?_.c=[_.e=0]:(_.e=e.e,_.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(_.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,h=e;h>=10;h/=10,l++);return void(l>M?_.c=_.e=null:(_.e=l,_.c=[e]))}p=String(e)}else{if(!i.test(p=String(e)))return T(_,p,d);_.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(l=p.indexOf("."))>-1&&(p=p.replace(".","")),(h=p.search(/e/i))>0?(l<0&&(l=h),l+=+p.slice(h+1),p=p.substring(0,h)):l<0&&(l=p.length)}else{if(g(t,2,B.length,"Base"),10==t)return z(_=new N(e),w+_.e+1,E);if(p=String(e),d="number"==typeof e){if(0*e!=0)return T(_,p,d,t);if(_.s=1/e<0?(p=p.slice(1),-1):1,N.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else _.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(n=B.slice(0,t),l=h=0,f=p.length;h<f;h++)if(n.indexOf(r=p.charAt(h))<0){if("."==r){if(h>l){l=f;continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,h=-1,l=0;continue}return T(_,String(e),d,t)}d=!1,(l=(p=b(p,t,10,_.s)).indexOf("."))>-1?p=p.replace(".",""):l=p.length}for(h=0;48===p.charCodeAt(h);h++);for(f=p.length;48===p.charCodeAt(--f););if(p=p.slice(h,++f)){if(f-=h,d&&N.DEBUG&&f>15&&(e>c||e!==o(e)))throw Error(s+_.s*e);if((l=l-h-1)>M)_.c=_.e=null;else if(l<L)_.c=[_.e=0];else{if(_.e=l,_.c=[],h=(l+1)%u,l<0&&(h+=u),h<f){for(h&&_.c.push(+p.slice(0,h)),f-=u;h<f;)_.c.push(+p.slice(h,h+=u));h=u-(p=p.slice(h)).length}else h-=f;for(;h--;p+="0");_.c.push(+p)}}else _.c=[_.e=0]}function F(e,t,i,n){var r,o,a,s,l;if(null==i?i=E:g(i,0,8),!e.c)return e.toString();if(r=e.c[0],a=e.e,null==t)l=_(e.c),l=1==n||2==n&&(a<=P||a>=A)?v(l,a):y(l,a,"0");else if(o=(e=z(new N(e),t,i)).e,s=(l=_(e.c)).length,1==n||2==n&&(t<=o||o<=P)){for(;s<t;l+="0",s++);l=v(l,o)}else if(t-=a,l=y(l,o,"0"),o+1>s){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-s)>0)for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&r?"-"+l:l}function U(e,t){for(var i,n=1,r=new N(e[0]);n<e.length;n++){if(!(i=new N(e[n])).s){r=i;break}t.call(r,i)&&(r=i)}return r}function G(e,t,i){for(var n=1,r=t.length;!t[--r];t.pop());for(r=t[0];r>=10;r/=10,n++);return(i=n+i*u-1)>M?e.c=e.e=null:i<L?e.c=[e.e=0]:(e.e=i,e.c=t),e}function z(e,t,i,n){var a,s,c,d,f,p,_,m=e.c,g=h;if(m){e:{for(a=1,d=m[0];d>=10;d/=10,a++);if((s=t-a)<0)s+=u,c=t,_=(f=m[p=0])/g[a-c-1]%10|0;else if((p=r((s+1)/u))>=m.length){if(!n)break e;for(;m.length<=p;m.push(0));f=_=0,a=1,c=(s%=u)-u+1}else{for(f=d=m[p],a=1;d>=10;d/=10,a++);_=(c=(s%=u)-u+a)<0?0:f/g[a-c-1]%10|0}if(n=n||t<0||null!=m[p+1]||(c<0?f:f%g[a-c-1]),n=i<4?(_||n)&&(0==i||i==(e.s<0?3:2)):_>5||5==_&&(4==i||n||6==i&&(s>0?c>0?f/g[a-c]:0:m[p-1])%10&1||i==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=g[(u-t%u)%u],e.e=-t||0):m[0]=e.e=0,e;if(0==s?(m.length=p,d=1,p--):(m.length=p+1,d=g[u-s],m[p]=c>0?o(f/g[a-c]%g[c])*d:0),n)for(;;){if(0==p){for(s=1,c=m[0];c>=10;c/=10,s++);for(c=m[0]+=d,d=1;c>=10;c/=10,d++);s!=d&&(e.e++,m[0]==l&&(m[0]=1));break}if(m[p]+=d,m[p]!=l)break;m[p--]=0,d=1}for(s=m.length;0===m[--s];m.pop());}e.e>M?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}function V(e){var t,i=e.e;return null===i?e.toString():(t=_(e.c),t=i<=P||i>=A?v(t,i):y(t,i,"0"),e.s<0?"-"+t:t)}return N.clone=e,N.ROUND_UP=0,N.ROUND_DOWN=1,N.ROUND_CEIL=2,N.ROUND_FLOOR=3,N.ROUND_HALF_UP=4,N.ROUND_HALF_DOWN=5,N.ROUND_HALF_EVEN=6,N.ROUND_HALF_CEIL=7,N.ROUND_HALF_FLOOR=8,N.EUCLID=9,N.config=N.set=function(e){var t,i;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(g(i=e[t],0,f,t),w=i),e.hasOwnProperty(t="ROUNDING_MODE")&&(g(i=e[t],0,8,t),E=i),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((i=e[t])&&i.pop?(g(i[0],-f,0,t),g(i[1],0,f,t),P=i[0],A=i[1]):(g(i,-f,f,t),P=-(A=i<0?-i:i))),e.hasOwnProperty(t="RANGE"))if((i=e[t])&&i.pop)g(i[0],-f,-1,t),g(i[1],1,f,t),L=i[0],M=i[1];else{if(g(i,-f,f,t),!i)throw Error(a+t+" cannot be zero: "+i);L=-(M=i<0?-i:i)}if(e.hasOwnProperty(t="CRYPTO")){if((i=e[t])!==!!i)throw Error(a+t+" not true or false: "+i);if(i){if(!(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes)))throw R=!i,Error(a+"crypto unavailable");R=i}else R=i}if(e.hasOwnProperty(t="MODULO_MODE")&&(g(i=e[t],0,9,t),O=i),e.hasOwnProperty(t="POW_PRECISION")&&(g(i=e[t],0,f,t),I=i),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(i=e[t]))throw Error(a+t+" not an object: "+i);D=i}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(i=e[t])||/^.$|[+-.\s]|(.).*\1/.test(i))throw Error(a+t+" invalid: "+i);B=i}}return{DECIMAL_PLACES:w,ROUNDING_MODE:E,EXPONENTIAL_AT:[P,A],RANGE:[L,M],CRYPTO:R,MODULO_MODE:O,POW_PRECISION:I,FORMAT:D,ALPHABET:B}},N.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!N.DEBUG)return!0;var t,i,n=e.c,r=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&r>=-f&&r<=f&&r===o(r)){if(0===n[0]){if(0===r&&1===n.length)return!0;break e}if((t=(r+1)%u)<1&&(t+=u),String(n[0]).length==t){for(t=0;t<n.length;t++)if((i=n[t])<0||i>=l||i!==o(i))break e;if(0!==i)return!0}}}else if(null===n&&null===r&&(null===s||1===s||-1===s))return!0;throw Error(a+"Invalid BigNumber: "+e)},N.maximum=N.max=function(){return U(arguments,C.lt)},N.minimum=N.min=function(){return U(arguments,C.gt)},N.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return o(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var i,n,s,l,c,d=0,p=[],_=new N(S);if(null==e?e=w:g(e,0,f),l=r(e/u),R)if(crypto.getRandomValues){for(i=crypto.getRandomValues(new Uint32Array(l*=2));d<l;)(c=131072*i[d]+(i[d+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),i[d]=n[0],i[d+1]=n[1]):(p.push(c%1e14),d+=2);d=l/2}else{if(!crypto.randomBytes)throw R=!1,Error(a+"crypto unavailable");for(i=crypto.randomBytes(l*=7);d<l;)(c=281474976710656*(31&i[d])+1099511627776*i[d+1]+4294967296*i[d+2]+16777216*i[d+3]+(i[d+4]<<16)+(i[d+5]<<8)+i[d+6])>=9e15?crypto.randomBytes(7).copy(i,d):(p.push(c%1e14),d+=7);d=l/7}if(!R)for(;d<l;)(c=t())<9e15&&(p[d++]=c%1e14);for(l=p[--d],e%=u,l&&e&&(c=h[u-e],p[d]=o(l/c)*c);0===p[d];p.pop(),d--);if(d<0)p=[s=0];else{for(s=-1;0===p[0];p.splice(0,1),s-=u);for(d=1,c=p[0];c>=10;c/=10,d++);d<u&&(s-=u-d)}return _.e=s,_.c=p,_}}(),N.sum=function(){for(var e=1,t=arguments,i=new N(t[0]);e<t.length;)i=i.plus(t[e++]);return i},b=function(){var e="0123456789";function t(e,t,i,n){for(var r,o,a=[0],s=0,l=e.length;s<l;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),r=0;r<a.length;r++)a[r]>i-1&&(null==a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/i|0,a[r]%=i)}return a.reverse()}return function(i,n,r,o,a){var s,l,u,c,h,d,f,p,m=i.indexOf("."),g=w,x=E;for(m>=0&&(c=I,I=0,i=i.replace(".",""),d=(p=new N(n)).pow(i.length-m),I=c,p.c=t(y(_(d.c),d.e,"0"),10,r,e),p.e=p.c.length),u=c=(f=t(i,n,r,a?(s=B,e):(s=e,B))).length;0==f[--c];f.pop());if(!f[0])return s.charAt(0);if(m<0?--u:(d.c=f,d.e=u,d.s=o,f=(d=$(d,p,g,x,r)).c,h=d.r,u=d.e),m=f[l=u+g+1],c=r/2,h=h||l<0||null!=f[l+1],h=x<4?(null!=m||h)&&(0==x||x==(d.s<0?3:2)):m>c||m==c&&(4==x||h||6==x&&1&f[l-1]||x==(d.s<0?8:7)),l<1||!f[0])i=h?y(s.charAt(1),-g,s.charAt(0)):s.charAt(0);else{if(f.length=l,h)for(--r;++f[--l]>r;)f[l]=0,l||(++u,f=[1].concat(f));for(c=f.length;!f[--c];);for(m=0,i="";m<=c;i+=s.charAt(f[m++]));i=y(i,u,s.charAt(0))}return i}}(),$=function(){function e(e,t,i){var n,r,o,a,s=0,l=e.length,u=t%d,c=t/d|0;for(e=e.slice();l--;)s=((r=u*(o=e[l]%d)+(n=c*o+(a=e[l]/d|0)*u)%d*d+s)/i|0)+(n/d|0)+c*a,e[l]=r%i;return s&&(e=[s].concat(e)),e}function t(e,t,i,n){var r,o;if(i!=n)o=i>n?1:-1;else for(r=o=0;r<i;r++)if(e[r]!=t[r]){o=e[r]>t[r]?1:-1;break}return o}function i(e,t,i,n){for(var r=0;i--;)e[i]-=r,r=e[i]<t[i]?1:0,e[i]=r*n+e[i]-t[i];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,r,a,s,c){var h,d,f,_,m,g,x,v,y,$,b,T,C,S,w,E,P,A=n.s==r.s?1:-1,L=n.c,M=r.c;if(!(L&&L[0]&&M&&M[0]))return new N(n.s&&r.s&&(L?!M||L[0]!=M[0]:M)?L&&0==L[0]||!M?0*A:A/0:NaN);for(y=(v=new N(A)).c=[],A=a+(d=n.e-r.e)+1,c||(c=l,d=p(n.e/u)-p(r.e/u),A=A/u|0),f=0;M[f]==(L[f]||0);f++);if(M[f]>(L[f]||0)&&d--,A<0)y.push(1),_=!0;else{for(S=L.length,E=M.length,f=0,A+=2,(m=o(c/(M[0]+1)))>1&&(M=e(M,m,c),L=e(L,m,c),E=M.length,S=L.length),C=E,b=($=L.slice(0,E)).length;b<E;$[b++]=0);P=M.slice(),P=[0].concat(P),w=M[0],M[1]>=c/2&&w++;do{if(m=0,(h=t(M,$,E,b))<0){if(T=$[0],E!=b&&(T=T*c+($[1]||0)),(m=o(T/w))>1)for(m>=c&&(m=c-1),x=(g=e(M,m,c)).length,b=$.length;1==t(g,$,x,b);)m--,i(g,E<x?P:M,x,c),x=g.length,h=1;else 0==m&&(h=m=1),x=(g=M.slice()).length;if(x<b&&(g=[0].concat(g)),i($,g,b,c),b=$.length,-1==h)for(;t(M,$,E,b)<1;)m++,i($,E<b?P:M,b,c),b=$.length}else 0===h&&(m++,$=[0]);y[f++]=m,$[0]?$[b++]=L[C]||0:($=[L[C]],b=1)}while((C++<S||null!=$[0])&&A--);_=null!=$[0],y[0]||y.splice(0,1)}if(c==l){for(f=1,A=y[0];A>=10;A/=10,f++);z(v,a+(v.e=f+d*u-1)+1,s,_)}else v.e=d,v.r=+_;return v}}(),T=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,i=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,r=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,s,l,u){var c,h=l?s:s.replace(r,"");if(n.test(h))o.s=isNaN(h)?null:h<0?-1:1;else{if(!l&&(h=h.replace(e,(function(e,t,i){return c="x"==(i=i.toLowerCase())?16:"b"==i?2:8,u&&u!=c?e:t})),u&&(c=u,h=h.replace(t,"$1").replace(i,"0.$1")),s!=h))return new N(h,c);if(N.DEBUG)throw Error(a+"Not a"+(u?" base "+u:"")+" number: "+s);o.s=null}o.c=o.e=null}}(),C.absoluteValue=C.abs=function(){var e=new N(this);return e.s<0&&(e.s=1),e},C.comparedTo=function(e,t){return m(this,new N(e,t))},C.decimalPlaces=C.dp=function(e,t){var i,n,r,o=this;if(null!=e)return g(e,0,f),null==t?t=E:g(t,0,8),z(new N(o),e+o.e+1,t);if(!(i=o.c))return null;if(n=((r=i.length-1)-p(this.e/u))*u,r=i[r])for(;r%10==0;r/=10,n--);return n<0&&(n=0),n},C.dividedBy=C.div=function(e,t){return $(this,new N(e,t),w,E)},C.dividedToIntegerBy=C.idiv=function(e,t){return $(this,new N(e,t),0,1)},C.exponentiatedBy=C.pow=function(e,t){var i,n,s,l,c,h,d,f,p=this;if((e=new N(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+V(e));if(null!=t&&(t=new N(t)),c=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return f=new N(Math.pow(+V(p),c?2-x(e):+V(e))),t?f.mod(t):f;if(h=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new N(NaN);(n=!h&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||c&&p.c[1]>=24e7:p.c[0]<8e13||c&&p.c[0]<=9999975e7)))return l=p.s<0&&x(e)?-0:0,p.e>-1&&(l=1/l),new N(h?1/l:l);I&&(l=r(I/u+2))}for(c?(i=new N(.5),h&&(e.s=1),d=x(e)):d=(s=Math.abs(+V(e)))%2,f=new N(S);;){if(d){if(!(f=f.times(p)).c)break;l?f.c.length>l&&(f.c.length=l):n&&(f=f.mod(t))}if(s){if(0===(s=o(s/2)))break;d=s%2}else if(z(e=e.times(i),e.e+1,1),e.e>14)d=x(e);else{if(0===(s=+V(e)))break;d=s%2}p=p.times(p),l?p.c&&p.c.length>l&&(p.c.length=l):n&&(p=p.mod(t))}return n?f:(h&&(f=S.div(f)),t?f.mod(t):l?z(f,I,E,undefined):f)},C.integerValue=function(e){var t=new N(this);return null==e?e=E:g(e,0,8),z(t,t.e+1,e)},C.isEqualTo=C.eq=function(e,t){return 0===m(this,new N(e,t))},C.isFinite=function(){return!!this.c},C.isGreaterThan=C.gt=function(e,t){return m(this,new N(e,t))>0},C.isGreaterThanOrEqualTo=C.gte=function(e,t){return 1===(t=m(this,new N(e,t)))||0===t},C.isInteger=function(){return!!this.c&&p(this.e/u)>this.c.length-2},C.isLessThan=C.lt=function(e,t){return m(this,new N(e,t))<0},C.isLessThanOrEqualTo=C.lte=function(e,t){return-1===(t=m(this,new N(e,t)))||0===t},C.isNaN=function(){return!this.s},C.isNegative=function(){return this.s<0},C.isPositive=function(){return this.s>0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.minus=function(e,t){var i,n,r,o,a=this,s=a.s;if(t=(e=new N(e,t)).s,!s||!t)return new N(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/u,h=e.e/u,d=a.c,f=e.c;if(!c||!h){if(!d||!f)return d?(e.s=-t,e):new N(f?a:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new N(d[0]?a:3==E?-0:0)}if(c=p(c),h=p(h),d=d.slice(),s=c-h){for((o=s<0)?(s=-s,r=d):(h=c,r=f),r.reverse(),t=s;t--;r.push(0));r.reverse()}else for(n=(o=(s=d.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(d[t]!=f[t]){o=d[t]<f[t];break}if(o&&(r=d,d=f,f=r,e.s=-e.s),(t=(n=f.length)-(i=d.length))>0)for(;t--;d[i++]=0);for(t=l-1;n>s;){if(d[--n]<f[n]){for(i=n;i&&!d[--i];d[i]=t);--d[i],d[n]+=l}d[n]-=f[n]}for(;0==d[0];d.splice(0,1),--h);return d[0]?G(e,d,h):(e.s=3==E?-1:1,e.c=[e.e=0],e)},C.modulo=C.mod=function(e,t){var i,n,r=this;return e=new N(e,t),!r.c||!e.s||e.c&&!e.c[0]?new N(NaN):!e.c||r.c&&!r.c[0]?new N(r):(9==O?(n=e.s,e.s=1,i=$(r,e,0,3),e.s=n,i.s*=n):i=$(r,e,0,O),!(e=r.minus(i.times(e))).c[0]&&1==O&&(e.s=r.s),e)},C.multipliedBy=C.times=function(e,t){var i,n,r,o,a,s,c,h,f,_,m,g,x,v,y,$=this,b=$.c,T=(e=new N(e,t)).c;if(!(b&&T&&b[0]&&T[0]))return!$.s||!e.s||b&&!b[0]&&!T||T&&!T[0]&&!b?e.c=e.e=e.s=null:(e.s*=$.s,b&&T?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=p($.e/u)+p(e.e/u),e.s*=$.s,(c=b.length)<(_=T.length)&&(x=b,b=T,T=x,r=c,c=_,_=r),r=c+_,x=[];r--;x.push(0));for(v=l,y=d,r=_;--r>=0;){for(i=0,m=T[r]%y,g=T[r]/y|0,o=r+(a=c);o>r;)i=((h=m*(h=b[--a]%y)+(s=g*h+(f=b[a]/y|0)*m)%y*y+x[o]+i)/v|0)+(s/y|0)+g*f,x[o--]=h%v;x[o]=i}return i?++n:x.splice(0,1),G(e,x,n)},C.negated=function(){var e=new N(this);return e.s=-e.s||null,e},C.plus=function(e,t){var i,n=this,r=n.s;if(t=(e=new N(e,t)).s,!r||!t)return new N(NaN);if(r!=t)return e.s=-t,n.minus(e);var o=n.e/u,a=e.e/u,s=n.c,c=e.c;if(!o||!a){if(!s||!c)return new N(r/0);if(!s[0]||!c[0])return c[0]?e:new N(s[0]?n:0*r)}if(o=p(o),a=p(a),s=s.slice(),r=o-a){for(r>0?(a=o,i=c):(r=-r,i=s),i.reverse();r--;i.push(0));i.reverse()}for((r=s.length)-(t=c.length)<0&&(i=c,c=s,s=i,t=r),r=0;t;)r=(s[--t]=s[t]+c[t]+r)/l|0,s[t]=l===s[t]?0:s[t]%l;return r&&(s=[r].concat(s),++a),G(e,s,a)},C.precision=C.sd=function(e,t){var i,n,r,o=this;if(null!=e&&e!==!!e)return g(e,1,f),null==t?t=E:g(t,0,8),z(new N(o),e,t);if(!(i=o.c))return null;if(n=(r=i.length-1)*u+1,r=i[r]){for(;r%10==0;r/=10,n--);for(r=i[0];r>=10;r/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},C.shiftedBy=function(e){return g(e,-c,c),this.times("1e"+e)},C.squareRoot=C.sqrt=function(){var e,t,i,n,r,o=this,a=o.c,s=o.s,l=o.e,u=w+4,c=new N("0.5");if(1!==s||!a||!a[0])return new N(!s||s<0&&(!a||a[0])?NaN:a?o:1/0);if(0==(s=Math.sqrt(+V(o)))||s==1/0?(((t=_(a)).length+l)%2==0&&(t+="0"),s=Math.sqrt(+t),l=p((l+1)/2)-(l<0||l%2),s==1/0?t="1e"+l:t=(t=s.toExponential()).slice(0,t.indexOf("e")+1)+l,i=new N(t)):i=new N(s+""),i.c[0])for((s=(l=i.e)+u)<3&&(s=0);;)if(r=i,i=c.times(r.plus($(o,r,u,1))),_(r.c).slice(0,s)===(t=_(i.c)).slice(0,s)){if(i.e<l&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(n||"4999"!=t)){(!+t||!+t.slice(1)&&"5"==t.charAt(0))&&(z(i,i.e+w+2,1),e=!i.times(i).eq(o));break}if(!n&&(z(r,r.e+w+2,0),r.times(r).eq(o))){i=r;break}u+=4,s+=4,n=1}return z(i,i.e+w+1,E,e)},C.toExponential=function(e,t){return null!=e&&(g(e,0,f),e++),F(this,e,t,1)},C.toFixed=function(e,t){return null!=e&&(g(e,0,f),e=e+this.e+1),F(this,e,t)},C.toFormat=function(e,t,i){var n,r=this;if(null==i)null!=e&&t&&"object"==typeof t?(i=t,t=null):e&&"object"==typeof e?(i=e,e=t=null):i=D;else if("object"!=typeof i)throw Error(a+"Argument not an object: "+i);if(n=r.toFixed(e,t),r.c){var o,s=n.split("."),l=+i.groupSize,u=+i.secondaryGroupSize,c=i.groupSeparator||"",h=s[0],d=s[1],f=r.s<0,p=f?h.slice(1):h,_=p.length;if(u&&(o=l,l=u,u=o,_-=o),l>0&&_>0){for(o=_%l||l,h=p.substr(0,o);o<_;o+=l)h+=c+p.substr(o,l);u>0&&(h+=c+p.slice(o)),f&&(h="-"+h)}n=d?h+(i.decimalSeparator||"")+((u=+i.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):d):h}return(i.prefix||"")+n+(i.suffix||"")},C.toFraction=function(e){var t,i,n,r,o,s,l,c,d,f,p,m,g=this,x=g.c;if(null!=e&&(!(l=new N(e)).isInteger()&&(l.c||1!==l.s)||l.lt(S)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+V(l));if(!x)return new N(g);for(t=new N(S),d=i=new N(S),n=c=new N(S),m=_(x),o=t.e=m.length-g.e-1,t.c[0]=h[(s=o%u)<0?u+s:s],e=!e||l.comparedTo(t)>0?o>0?t:d:l,s=M,M=1/0,l=new N(m),c.c[0]=0;f=$(l,t,0,1),1!=(r=i.plus(f.times(n))).comparedTo(e);)i=n,n=r,d=c.plus(f.times(r=d)),c=r,t=l.minus(f.times(r=t)),l=r;return r=$(e.minus(i),n,0,1),c=c.plus(r.times(d)),i=i.plus(r.times(n)),c.s=d.s=g.s,p=$(d,n,o*=2,E).minus(g).abs().comparedTo($(c,i,o,E).minus(g).abs())<1?[d,n]:[c,i],M=s,p},C.toNumber=function(){return+V(this)},C.toPrecision=function(e,t){return null!=e&&g(e,1,f),F(this,e,t,2)},C.toString=function(e){var t,i=this,n=i.s,r=i.e;return null===r?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=r<=P||r>=A?v(_(i.c),r):y(_(i.c),r,"0"):10===e?t=y(_((i=z(new N(i),w+r+1,E)).c),i.e,"0"):(g(e,2,B.length,"Base"),t=b(y(_(i.c),r,"0"),10,e,n,!0)),n<0&&i.c[0]&&(t="-"+t)),t},C.valueOf=C.toJSON=function(){return V(this)},C._isBigNumber=!0,n&&(C[Symbol.toStringTag]="BigNumber",C[Symbol.for("nodejs.util.inspect.custom")]=C.valueOf),null!=t&&N.set(t),N}(),t.default=t.BigNumber=t,"function"==typeof define&&define.amd?define((function(){return t})):typeof module<"u"&&module.exports?module.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t),t}(),ee$2={},Me$2={iServer:0,oss:1};function De$1(e,t){this.RSAAuthenticationStatus={},this._customRequestHeaders=e.customRequestHeaders,this._scene=t,this.camera=t.camera}function xr(e){var t={},i=e.firstChild,n=s$S.queryStringValue(i,"Version");t.version=n;var r=s$S.queryStringValue(i,"FileType");t.fileType=r;var o=s$S.queryFirstNode(i,"WaterEffect"),a=s$S.queryNumericValue(o,"AverageHeight");t.averageHeight=a;var s=s$S.queryNodes(o,"GpuProgramParameters");t.gpuProgramParameters=[];for(var l=0,u=s.length;l<u;l++){var c={gpuConstants:[],atuoConstants:[]},h=s[l],d=s$S.queryFirstNode(h,"GpuConstants");if(d)for(var f=s$S.queryNodes(d,"GpuConstantDefinition"),p=0,_=f.length;p<_;p++){var m={},g=f[p],x=s$S.queryNumericValue(g,"ConstType");m.constType=x;var v=s$S.queryNumericValue(g,"Index");m.index=v;var y=s$S.queryStringValue(g,"Name");m.name=y;var $=s$S.queryNumericValue(g,"ArraySize");m.arraySize=$;var b=s$S.queryNumericValue(g,"Multiple");m.multiple=b;var T=s$S.queryFirstNode(g,"ArrayFloat");if(m.arrayFloat=[],T)for(var C=s$S.queryNodes(T,"Float"),S=0;S<$;){var w=parseFloat(C[S].textContent);m.arrayFloat.push(w),S++}c.gpuConstants.push(m)}var E=s$S.queryFirstNode(h,"AutoConstants");if(E){var P=s$S.queryNodes(E,"AutoConstantEntry");for(p=0,_=P.length;p<_;p++){m={};var A=P[p],L=s$S.queryNumericValue(A,"ParamType");m.paramType=L;y=s$S.queryStringValue(A,"Name");m.name=y;var M=s$S.queryNumericValue(A,"PhysicalIndex");m.physicalIndex=M;var R=s$S.queryNumericValue(A,"ElementCount");m.elementCount=R;var O=s$S.queryNumericValue(A,"Data");m.data=O;var I=s$S.queryNumericValue(A,"FData");m.fData=I;var D=s$S.queryBooleanValue(A,"IsReal");m.isReal=D,c.atuoConstants.push(m)}}t.gpuProgramParameters.push(c)}return t}function Xr(e,t,i,n){var r=o$1l.defer(),o=e.toString()+"indexData.dat";if(e$2b(a$O.CREDENTIAL)&&(o=a$O.addToken(o)),i===Tr$3.KEY_VALUE){var a=m$1a(n.split("?")[1]),s={suffix:"dat"},l=m$1b(s=Object.assign(s,a),!0),u=n.match(/(\S*)\/config/);u.length>0&&(o=u[0]+"?"+l)}return o$1l(d$1f(o,t),(function(e){for(var t=new e$1N,i=e.firstChild,n=i.namespace,o=s$S.queryFirstNode(i,"FieldDefines",n),a=s$S.queryChildNodes(o,"FieldDefine",n),s=0;s<a.length;s++){var l=s$S.queryStringAttribute(a[s],"Name"),u=s$S.queryStringAttribute(a[s],"Type"),c=s$S.queryStringAttribute(a[s],"Size");t.set(l,{type:u,size:c})}r.resolve(t)}),(function(){r.reject()})),r.promise}function Kr(e,t,i,n){var r=o$1l.defer();if(e$2b(i)){var o,a=e.toString();if(n===Tr$3.KEY_VALUE){var s=m$1a(a.split("?")[1]),l={suffix:"attribute.json"},u=m$1b(l=Object.assign(l,s),!0),c=a.match(/(\S*)\/config/);c.length>0&&(o=c[0]+"?"+u)}else{var h=a.substring(0,a.indexOf("/realspace")+10);o=a+"attribute.json",e$2b(a$O.CREDENTIAL)&&(o=e$2b(a$O.CREDENTIAL._keymap[h])?a$O.addTokenWithKey(h,o):a$O.addToken(o))}o$1l(u$Q(o,t),(function(e){if(e.layerInfos){for(var t=e.layerInfos[0].fieldInfos,i=new e$1N,n=0;n<t.length;n++)i.set(t[n].name,{type:t[n].type,size:t[n].size});var o,a=void 0;if(e$2b(e.indexInfos)){o={},a={};n=0;for(var s=e.indexInfos.length;n<s;n++){var l=e.indexInfos[n],u=f$O(l.rootNodePath);o[u=u.replace(".s3mb","")]=l.indexInfo,a[l.rootNodePath.replace(".s3mb","")]=l.indexInfo}}r.resolve({fieldsInfo:i,indexInfoMap:o,indexInfoAttributeMap:a})}else r.reject()}),(function(){r.reject()}))}else r.reject();return r.promise}function Gr(e,t,i){if(e&&t){var n=e.firstChild;if(n){var r=n.namespaceURI,o=s$S.queryFirstNode(n,"AttachFiles",r);if(o){for(var a=s$S.queryNodes(o,"AttachFile",r),s=[],l=0,u=a.length;l<u;l++){var c=a[l].textContent;if(c.indexOf("water")>0){var h=t+c;s.push(d$1f(h,i))}}if(!s.length)return;var d=o$1l.defer();return o$1l.all(s,(function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];if(!r)break;var o=xr(r);t.push(o)}d.resolve(t)}),(function(){})),d.promise}}}}function Yr(e,t,i){if(e&&t){var n=e.extensions;if(e$2b(n)&&e$2b(n.attachFiles)){for(var r=n.attachFiles,o=[],a=0,s=r.length;a<s;a++){var l=r[a].attachFile;if(l.indexOf(".water")>0){var u=t+l;e$2b(a$O.CREDENTIAL)&&(u=a$O.addToken(u)),o.push(d$1f(u,i))}}if(o.length){var c=o$1l.defer();return o$1l.all(o,(function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];if(!r)break;var o=xr(r);t.push(o)}c.resolve(t)}),(function(){})),c.promise}}}}function Zr(e,t,i){var n=e.firstChild,r=n.namespace;if("Spatial3DModel"===n.localName){s$S.queryStringValue(n,"Asset",r),s$S.queryStringValue(n,"Version",r);var o=s$S.queryStringValue(n,"DataType",r);s$S.queryStringValue(n,"PyramidSplitType",r),s$S.queryStringValue(n,"LodType",r);var a=s$S.queryFirstNode(n,"Position",r),s=s$S.queryNumericValue(a,"X",r),l=s$S.queryNumericValue(a,"Y",r),u=s$S.queryNumericValue(a,"Z",r);if(e$2b(ie=s$S.queryFirstNode(n,"GeoBounds",r))){var c=s$S.queryNumericValue(ie,"Left",r),h=s$S.queryNumericValue(ie,"Top",r),d=s$S.queryNumericValue(ie,"Right",r),f=s$S.queryNumericValue(ie,"Bottom",r);Z=h$18.fromDegrees(c,f,d,h)}var p=s$S.queryFirstNode(n,"HeightRange",r),_=s$S.queryNumericValue(p,"Min",r),m=s$S.queryNumericValue(p,"Max",r),g=s$S.queryFirstNode(n,"CategoryRange",r),x=s$S.queryNumericValue(g,"MaxCategory",r),v=s$S.queryNumericValue(g,"MinCategory",r),y=s$S.queryFirstNode(n,"WDescript",r),$=s$S.queryFirstNode(y,"Range",r),b=s$S.queryNumericValue($,"Min",r),T=s$S.queryNumericValue($,"Max",r);x=x||T,v=v||b;var C=s$S.queryFirstNode(n,"Extensions",r),S=s$S.queryStringValue(C,"FileType",r);s$S.queryStringValue(C,"TileSplitType",r);var w=s$S.queryBooleanValue(C,"TextureSharing",r),E=s$S.queryBooleanValue(C,"TransparencyOptimization",r),P=s$S.queryStringValue(C,"VertexWeightMode",r),A=s$S.queryStringValue(C,"ProcessType",r),L={};(Ce=t.split("?")).length>1&&(L=m$1a(Ce[1]),t=Ce[0]);for(var M=new h$16(i===Me$2.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),R=[],O=/\\+/g,I=s$S.queryFirstNode(n,"Tiles",r),D=!1,B=0,N=(Se=s$S.queryNodes(I,"Tile",r)).length;B<N;B++){var F=Se[B],U=(Ie=s$S.queryStringValue(F,"Url",r)).lastIndexOf(".");".s3mbz"===Ie.substring(U,Ie.length)&&(D=!0);var G=i$1a(Ie=(Ie=Ie.replace(O,"/")).replace(/(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,"")),z=f$O(Ie);(De={}).relativePath=new h$16(G),De.name=z;var V=s$S.queryFirstNode(F,"Boundingbox",r);if(e$2b(V)){var k=s$S.queryFirstNode(V,"Min",r),W=s$S.queryFirstNode(V,"Max",r),H=s$S.queryNumericValue(k,"X",r),q=s$S.queryNumericValue(k,"Y",r),j=s$S.queryNumericValue(k,"Z",r),Y=s$S.queryNumericValue(W,"X",r),X=s$S.queryNumericValue(W,"Y",r),K=s$S.queryNumericValue(W,"Z",r),Q=new i$1c;i$1c.fromCornerPoints(new o$1p(H,q,j),new o$1p(Y,X,K),Q),De.bSphere=Q}R.push(De)}return{position:{lon:s,lat:l,height:u},fileType:S,maxInstensity:0,minInstensity:0,maxHeight:m,minHeight:_,maxCategory:x,minCategory:v,layerBounds:Z,baseUri:M,rootEntities:R,isTextureShare:w,urlArguments:L,isS3MB:!0,isS3MZ:D,processType:A,dataType:o,isTransparencyOptimization:E,vertexWeightMode:P}}S=s$S.queryStringValue(n,"FileType",r),w=s$S.queryBooleanValue(n,"TextureSharing",r),E=s$S.queryBooleanValue(n,"TransparencyOptimization",r),P=s$S.queryStringValue(n,"VertexWeightMode",r);var Z,J=s$S.queryFirstNode(n,"InstensityRange",r),ee=s$S.queryNumericValue(J,"MinInstensity",r),te=s$S.queryNumericValue(J,"MaxInstensity",r),ie=(p=s$S.queryFirstNode(n,"HeightRange",r),_=s$S.queryNumericValue(p,"MinHeight",r),m=s$S.queryNumericValue(p,"MaxHeight",r),g=s$S.queryFirstNode(n,"CategoryRange",r),x=s$S.queryNumericValue(g,"MaxCategory",r),v=s$S.queryNumericValue(g,"MinCategory",r),A=s$S.queryStringValue(n,"ProcessType",r),a=s$S.queryFirstNode(n,"Position",r),s=s$S.queryNumericValue(a,"X",r),l=s$S.queryNumericValue(a,"Y",r),u=s$S.queryNumericValue(a,"Z",r),s$S.queryFirstNode(n,"Bounds",r)),ne=s$S.queryFirstNode(n,"BoundingBox",r),re=s$S.queryStringValue(n,"IDFieldName",r),oe=s$S.queryStringValue(n,"AttributeExtentName",r);if(e$2b(ie)){c=s$S.queryNumericValue(ie,"Left",r),h=s$S.queryNumericValue(ie,"Top",r),d=s$S.queryNumericValue(ie,"Right",r),f=s$S.queryNumericValue(ie,"Bottom",r);Z=h$18.fromDegrees(c,f,d,h)}else if(e$2b(ne)){var ae=s$S.queryNumericValue(ne,"MinX",r),se=s$S.queryNumericValue(ne,"MinY",r);s$S.queryNumericValue(ne,"MinZ",r);var le=s$S.queryNumericValue(ne,"MaxX",r),ue=s$S.queryNumericValue(ne,"MaxY",r);s$S.queryNumericValue(ne,"MaxZ",r),ae=180*Math.abs(ae)/(6378137*Math.PI),se=180*Math.abs(se)/(6378137*Math.PI),le=180*Math.abs(le)/(6378137*Math.PI),ue=180*Math.abs(ue)/(6378137*Math.PI),Z=h$18.fromDegrees(s-ae,l-se,s+le,l+ue)}else Z=h$18.fromDegrees(s-1e-5,l-1e-5,s+1e-5,l+1e-5);var ce=void 0,he=s$S.queryNodes(n,"Vol",r);if(e$2b(he)&&he.length>0){var de=[],fe=[],pe=[],_e=[];for(B=0,N=he.length;B<N;B++){var me=he[B],ge=s$S.queryStringValue(me,"Name",r);de.push(ge);var xe=s$S.queryStringValue(me,"AttachFileExt",r);_e.push(xe);var ve=s$S.queryFirstNode(me,"VolumeValueRange",r);if(e$2b(ve)){var ye=s$S.queryNumericValue(ve,"MinValue",r),$e=s$S.queryNumericValue(ve,"MaxValue",r);fe.push($e),pe.push(ye)}}ce={bVolume:!0,strVolumeExts:_e,volNames:de,maxValues:fe,minValues:pe}}var be=s$S.queryFirstNode(n,"VolumeValueRange",r);if(e$2b(be)){ye=s$S.queryNumericValue(be,"MinValue",r),$e=s$S.queryNumericValue(be,"MaxValue",r);var Te=s$S.queryStringValue(n,"AttachFileExt",r);e$2b(ce)?(ce.volNames.push(""),ce.maxValues.push($e),ce.minValues.push(ye)):ce={bVolume:!0,strVolumeExts:[Te],volNames:[""],maxValues:[$e],minValues:[ye]}}var Ce;L={};(Ce=t.split("?")).length>1&&(L=m$1a(Ce[1]),t=Ce[0]);M=new h$16(i===Me$2.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),R=[],O=/\\+/g,I=s$S.queryFirstNode(n,"OSGFiles",r);var Se,we=!1;if((Se=s$S.queryNodes(I,"Files",r)).length>0)for(B=0,N=Se.length;B<N;B++){F=Se[B];(Ie=s$S.queryStringValue(F,"FileName",r)).endsWith(".osgb")&&(we=!0);G=i$1a(Ie=(Ie=Ie.replace(O,"/")).replace(/(\.s3m)|(\.osgb)/gi,"")),z=f$O(Ie);(De={}).relativePath=new h$16(G),De.name=z;var Ee=s$S.queryFirstNode(F,"BoundingSphere",r);if(e$2b(Ee)&&Ee.childNodes.length){var Pe=s$S.queryNumericValue(Ee,"CenterX",r),Ae=s$S.queryNumericValue(Ee,"CenterY",r),Le=s$S.queryNumericValue(Ee,"CenterZ",r),Me=s$S.queryNumericValue(Ee,"Radius",r),Re=new o$1p(Pe,Ae,Le);De.bSphere=new i$1c(Re,Me)}R.push(De)}else{var Oe=s$S.queryNodes(I,"FileName",r);for(B=0,N=Oe.length;B<N;B++){var Ie;(Ie=Oe[B].textContent).endsWith(".osgb")&&(we=!0);var De;G=i$1a(Ie=(Ie=Ie.replace(O,"/")).replace(/(\.s3m)|(\.osgb)/gi,"")),z=f$O(Ie);(De={}).relativePath=new h$16(G),De.name=z,R.push(De)}}var Be=void 0,Ne=s$S.queryFirstNode(n,"Levels",r);if(e$2b(Ne)){var Fe=s$S.queryNodes(Ne,"Level",r);e$2b(Fe)&&Fe.length>0&&(Be=parseInt(Fe[0].textContent))}return{position:{lon:s,lat:l,height:u},fileType:S,maxInstensity:te,minInstensity:ee,maxHeight:m,minHeight:_,maxCategory:x,minCategory:v,processType:A,layerBounds:Z,volumeObj:ce,baseUri:M,rootEntities:R,urlArguments:L,isTextureShare:w,isS3MB:!1,isOSGB:we,isTransparencyOptimization:E,vertexWeightMode:P,level:Be,idFieldName:re,attributeExtentName:oe}}function wr(e,t,i){e.asset,e.version;var n=e.dataType;e.pyramidSplitType,e.lodType;var r,o,a,s,l=e.position.x,u=e.position.y,c=e.position.z,h=e.position.units;if(e$2b(e.geoBounds)){var d=e.geoBounds.left,f=e.geoBounds.top,p=e.geoBounds.right,_=e.geoBounds.bottom;d>180||_>180||p>180||f>180?(d>20037508.342789244&&(d-=20037508.342789244*Math.floor(d/20037508.342789244)),p>20037508.342789244&&(p-=20037508.342789244*Math.floor(p/20037508.342789244)),f>10018754.171394622&&(f-=20037508.342789244*Math.floor((f+10018754.171394622)/20037508.342789244)),_>10018754.171394622&&(_-=20037508.342789244*Math.floor((_+10018754.171394622)/20037508.342789244)),V=new h$18(d/=6378137,_/=6378137,p/=6378137,f/=6378137)):V=h$18.fromDegrees(d,_,p,f)}if(e$2b(e.heightRange)&&(r=e.heightRange.min,o=e.heightRange.max),e$2b(e.wDescript)){var m=e.wDescript.range;a=m.min,s=m.max}else if(e$2b(e.vertexAttributeDescript))for(let t=0;t<e.vertexAttributeDescript.length;t++){var g=e.vertexAttributeDescript[t];if("VertexWeight"==g.category){a=g.range.min[0],s=g.range.max[0];break}}var x,v,y,$,b,T,C,S,w,E,P,A,L,M,R=e.extensions,O=!0,I=-1;if(R.hasOwnProperty("s3m:FileType")&&(x=R["s3m:FileType"]),R.hasOwnProperty("s3m:TileSplitType")&&R["s3m:TileSplitType"],R.hasOwnProperty("s3m:ProcessType")&&(T=R["s3m:ProcessType"]),R.hasOwnProperty("IDFieldName")&&(C=R.IDFieldName),R.hasOwnProperty("textureLOD")&&(O="TRUE"===R.textureLOD),R.hasOwnProperty("s3m:MaterialType")&&(w=R["s3m:MaterialType"]),R.hasOwnProperty("globeType")&&(A=R.globeType),R.hasOwnProperty("temporalCount")&&(I=parseInt(R.temporalCount)),R.hasOwnProperty("levels"))for(var D=0,B=R.levels.length;D<B;D++){L=R.levels[D].level;break}R.hasOwnProperty("sml:Level")&&(L=parseInt(R["sml:Level"])),R.hasOwnProperty("s3m:TextureSharing")&&(v="TRUE"===R["s3m:TextureSharing"]),R.hasOwnProperty("s3m:TransparencyOptimization")&&(y="TRUE"===R["s3m:TransparencyOptimization"]),R.hasOwnProperty("s3m:VertexCompressionType")&&($=R["s3m:VertexCompressionType"]),R.hasOwnProperty("s3m:VertexWeightMode")&&(b=R["s3m:VertexWeightMode"]),R.hasOwnProperty("s3m:AttributeExtentName")&&(S=R["s3m:AttributeExtentName"]),R.hasOwnProperty("associateMaterialUrl")&&(E=R.associateMaterialUrl),R.hasOwnProperty("hasAttributeIndex")&&(P="TRUE"==R.hasAttributeIndex),R.hasOwnProperty("historicalRecord")&&(M=R.historicalRecord);var N=[],F=new e$1N;if(R.hasOwnProperty("pointCloudLayers"))for(D=0,B=R.pointCloudLayers.length;D<B;D++){var U=R.pointCloudLayers[D].layerName;if(e$2b(U)){var G=R.pointCloudLayers[D].layerBounds;N.push(U),F.set(U,G)}else{var z=R.pointCloudLayers[D].layer,V=new h$18;F.set(z,V),N.push(z)}}var k=void 0,W=e.extensions.vol;if(e$2b(W)&&W.length>0)for(var H=[],q=[],j=[],Y=[],X=(D=0,W.length);D<X;D++){var K=W[D],Q=K.volName;H.push(Q);var Z=K.volType;Y.push(Z);var J=K.volRangeMin,ee=K.volRangeMax;q.push(ee),j.push(J),k={bVolume:!0,strVolumeExts:Y,volNames:H,maxValues:q,minValues:j}}var te=void 0,ie=e.extensions.map;if(e$2b(ie)&&ie.length>0){var ne=[],re=[];for(D=0,X=ie.length;D<X;D++){var oe=ie[D];Q=oe.mapName;ne.push(Q);Z=oe.dataType;re.push(Z),te={mapExts:re,mapNames:ne}}}var ae={},se=t.split("?");se.length>1&&(ae=m$1a(se[1]),t=se[0]);var le=new h$16(i===Me$2.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),ue=[],ce=/\\+/g,he=!1,de=!1,fe=!1,pe=e.tiles||e.rootTiles;for(D=0,B=pe.length;D<B;D++)if(e$2b(pe[D])){var _e=pe[D].url,me=_e.lastIndexOf("."),ge=_e.substring(me,_e.length);".s3mbz"===ge?he=!0:".s3mblock"===ge?de=!0:".osgb"===ge&&(fe=!0);var xe=i$1a(_e=(_e=_e.replace(ce,"/")).replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,"")),ve=f$O(_e),ye={};if(ye.relativePath=new h$16(xe),ye.name=ve,e$2b(pe[D].boundingbox))if(e$2b(pe[D].boundingbox.center))ye.obb=pe[D].boundingbox;else{var $e=pe[D].boundingbox.min.x,be=pe[D].boundingbox.min.y,Te=pe[D].boundingbox.min.z,Ce=pe[D].boundingbox.max.x,Se=pe[D].boundingbox.max.y,we=pe[D].boundingbox.max.z;ye.min=new o$1p($e,be,Te),ye.max=new o$1p(Ce,Se,we);var Ee=new i$1c;i$1c.fromCornerPoints(ye.min,ye.max,Ee),ye.bSphere=Ee}ue.push(ye)}return{position:{lon:l,lat:u,height:c,units:h},fileType:x,maxInstensity:0,minInstensity:0,maxHeight:o,minHeight:r,maxCategory:s,minCategory:a,layerBounds:V,volumeObj:k,maps:te,baseUri:le,rootEntities:ue,isTextureShare:v,urlArguments:ae,isS3MB:!0,isS3MZ:he,isS3MBlock:de,isOSGB:fe,dataType:n,isTransparencyOptimization:y,vertexCompressionType:$,vertexWeightMode:b,level:L,pointCloudLayerNames:N,processType:T,groupNameBounds:F,idFieldName:C,attributeExtentName:S,materialType:w,textureLod:O,associateMaterialUrl:E,globeType:A,temporalCount:I,hasAttributeIndex:P,historicalRecord:M}}function Mr(e,t,i,n,r,o,a){a=u$_(a,!1),o$1l(e,(function(e){if(n.fieldsInfo=e.fieldsInfo,n.indexInfoMap=e.indexInfoMap,n.indexInfoAttributeMap=e.indexInfoAttributeMap,e$2b(o.isFlyMode)&&!0===o.isFlyMode&&e$2b(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x22e933(n);a||t._layers.add(e,r),e$2b(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}),1e3)}});else{var s=new _0x22e933(n);a||t._layers.add(s,r),e$2b(t._clipRegions)&&s._setServerClipRegions(t._clipRegions,1),i.resolve(s)}}),(function(){if(!0===o.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x22e933(n);a||t._layers.add(e,r),e$2b(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}});else{var e=new _0x22e933(n);a||t._layers.add(e,r),e$2b(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}function ir(e,t,i,n,r,o,a,s){if(n.useWebsocket){var l=new i$V("websocketTaskProcessor");l.scheduleTask({data:"init",scpUrl:e});var u=e.substring(e.indexOf("datas")+6,e.indexOf("/data/path"))+".scp";l.scheduleTask({dataType:"json",data:"/"+u}).then((function(u){var c=wr(u,e,n.serverType);c.context=t.context,c.gl=t.context._gl,c.name=r,c.supportCompressType=t._supportCompressType,c.urlType=n.urlType,c.cullEnabled=n.cullEnabled,c.horizontalLine=n.horizontalLine,c.style3D=n.style3D,c.selectEnable=n.selectable,c.isVisible=n.isVisible,c.minVisibleAltitude=n.minVisibleAltitude,c.maxVisibleAltitude=n.maxVisibleAltitude,c.minVisibleDistance=n.minVisibleDistance,c.maxVisibleDistance=n.maxVisibleDistance,c.shadowType=n.shadowType,c.heading=n.heading,c.lodRangeScale=n.lodRangeScale,c.polygonOffset=n.polygonOffset,c.brightness=n.brightness,c.constrast=n.constrast,c.hue=n.hue,c.saturation=n.saturation,c.gamma=n.gamma,c.effect=n.effect,c.ignoreNormal=u$_(n.ignoreNormal,!1),c.groupName=u$_(n.groupName,""),c.cacheKey=u$_(n.cacheKey,""),c._isJson=!0,c.sceneMode=t.mode,c.scene=t,c.useMercatorProject=n.useMercatorProject,c.scpUrl=a,c.queryFieldNames=n.queryFieldNames,c.subdomainConfig=n.subdomainConfig,c.customRequestHeaders=n.customRequestHeaders,c.LoadingPriority=n.LoadingPriority,c.cullMode=n.cullMode;var h=new _0x22e933(c);h._wstTaskProcessor=l,s||t._layers.add(h,o),e$2b(t._clipRegions)&&h._setServerClipRegions(t._clipRegions,1),i.resolve(h)}))}else d$1f(e,n.customRequestHeaders).then((function(l){var u=Zr(l,e,n.serverType);u.context=t.context,u.gl=t.context._gl,u.name=r,u.supportCompressType=t._supportCompressType,u.urlType=n.urlType,u.cullEnabled=n.cullEnabled,u.horizontalLine=n.horizontalLine,u.style3D=n.style3D,u.selectEnable=n.selectable,u.isVisible=n.isVisible,u.minVisibleAltitude=n.minVisibleAltitude,u.maxVisibleAltitude=n.maxVisibleAltitude,u.minVisibleDistance=n.minVisibleDistance,u.maxVisibleDistance=n.maxVisibleDistance,u.shadowType=n.shadowType,u.heading=n.heading,u.lodRangeScale=n.lodRangeScale,u.polygonOffset=n.polygonOffset,u.brightness=n.brightness,u.constrast=n.constrast,u.hue=n.hue,u.saturation=n.saturation,u.gamma=n.gamma,u.effect=n.effect,u.ignoreNormal=u$_(n.ignoreNormal,!1),u.groupName=u$_(n.groupName,""),u.cacheKey=u$_(n.cacheKey,""),u.customRequestHeaders=n.customRequestHeaders,u.sceneMode=t.mode,u.loadVolumeData=u$_(n.loadVolumeData,!0),u.scene=t,u.useMercatorProject=n.useMercatorProject,u.scpUrl=a,u.queryFieldNames=n.queryFieldNames,u.subdomainConfig=n.subdomainConfig,u.useMercatorProject=n.useMercatorProject,u.cullMode=n.cullMode;var c=Xr(u.baseUri,n.customRequestHeaders,n.urlType,u.scpUrl);o$1l(Gr(l,u.baseUri,n.customRequestHeaders),(function(e){u.waterEffectSet=e,o$1l(c,(function(e){if(u.fieldsInfo=e,e$2b(n.isFlyMode)&&!0===n.isFlyMode&&e$2b(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x22e933(u);t._layers.add(e,o),i.resolve(e)}),1e3)}});else{var r=new _0x22e933(u);s||t._layers.add(r,o),e$2b(t._clipRegions)&&r._setServerClipRegions(t._clipRegions,1),i.resolve(r)}}),(function(){if(!0===n.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x22e933(u);t._layers.add(e,o),i.resolve(e)}});else{var e=new _0x22e933(u);s||t._layers.add(e,o),e$2b(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}),(function(){o$1l(c,(function(e){if(u.fieldsInfo=e,e$2b(n.isFlyMode)&&!0===n.isFlyMode&&e$2b(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x22e933(u);s||t._layers.add(e,o),i.resolve(e)}),1e3)}});else{var r=new _0x22e933(u);s||t._layers.add(r,o),e$2b(t._clipRegions)&&r._setServerClipRegions(t._clipRegions,1),i.resolve(r)}}),(function(){if(!0===n.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x22e933(u);t._layers.add(e,o),i.resolve(e)}});else{var e=new _0x22e933(u);s||t._layers.add(e,o),e$2b(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}))}),(function(l){u$Q(e,n.customRequestHeaders).then((function(l){var u=wr(l,e,n.serverType);u.context=t.context,u.gl=t.context._gl,u.name=r,u.supportCompressType=t._supportCompressType,u.urlType=n.urlType,u.cullEnabled=n.cullEnabled,u.horizontalLine=n.horizontalLine,u.style3D=n.style3D,u.selectEnable=n.selectable,u.isVisible=n.isVisible,u.minVisibleAltitude=n.minVisibleAltitude,u.maxVisibleAltitude=n.maxVisibleAltitude,u.minVisibleDistance=n.minVisibleDistance,u.maxVisibleDistance=n.maxVisibleDistance,u.shadowType=n.shadowType,u.heading=n.heading,u.lodRangeScale=n.lodRangeScale,u.polygonOffset=n.polygonOffset,u.brightness=n.brightness,u.constrast=n.constrast,u.hue=n.hue,u.saturation=n.saturation,u.gamma=n.gamma,u.effect=n.effect,u.ignoreNormal=u$_(n.ignoreNormal,!1),u.groupName=u$_(n.groupName,""),u.cacheKey=u$_(n.cacheKey,""),u._isJson=!0,u.sceneMode=t.mode,u.scene=t,u.useMercatorProject=n.useMercatorProject,u.scpUrl=a,u.queryFieldNames=n.queryFieldNames,u.subdomainConfig=n.subdomainConfig,u.customRequestHeaders=n.customRequestHeaders,u.useMercatorProject=n.useMercatorProject,u.cullMode=n.cullMode;var c=Kr(u.baseUri,n.customRequestHeaders,u.attributeExtentName,u.urlType);o$1l(Yr(l,u.baseUri,n.customRequestHeaders),(function(e){u.waterEffectSet=e,Mr(c,t,i,u,o,n,s)}),(function(){Mr(c,t,i,u,o,n,s)}))}),(function(e){i.reject("add s3m layer failed,"+e)}))})).otherwise((function(e){i.reject("add s3m layer failed,"+e)}))}function Er(e,t,i){var n=i&&i.lexicographical,r=i&&i.zeroExtend,o=e.split("."),a=t.split(".");function s(e){return(n?/^\d+[A-Za-z]*$/:/^\d+$/).test(e)}if(!o.every(s)||!a.every(s))return NaN;if(r){for(;o.length<a.length;)o.push("0");for(;a.length<o.length;)a.push("0")}n||(o=o.map(Number),a=a.map(Number));for(var l=0;l<o.length;++l){if(a.length==l)return 1;if(o[l]!=a[l])return o[l]>a[l]?1:-1}}function Ur(e,t,i){return u$Q(e,i).then((function(i){if(!(i.length<1)){var n=void 0;if(e$2b(t)){for(var r=0;r<i.length;r++){var o=i[r];if(o.name===t){n=o;break}}if(!e$2b(n))return void console.error("no named scene was found!")}else n=i[0];var a=new h$16(e);return a.path=new h$16(n.path).path,{name:n.name,path:a.toString()}}}))}function $r(e,t,i){var n=e+"/layers.json";return e$2b(a$O.CREDENTIAL)&&(n=e$2b(a$O.CREDENTIAL._keymap[i])?a$O.addTokenWithKey(i,n):a$O.addToken(n)),u$Q(n,t).then((function(e){for(var t={s3m:[],imagery:[],s3mGroup:[],terrain:void 0},i=0,n=e.length;i<n;i++){var r=e[i],o=r.layer3DType;"OSGBLayer"==o?t.s3m.push(r):"ImageFileLayer"==o?t.imagery.push(r):"TerrainFileLayer"==o?t.terrain=r:"OSGBGroup"==o&&t.s3mGroup.push(r)}return t}))}Object.defineProperties(De$1.prototype,{}),De$1.prototype.open=function(e,t,i){i=u$_(i,{});var n=/({.*?})/g;if(e.indexOf("?token")>-1&&e.indexOf("realspace")>-1){var r=new h$16(e),o=m$1a(r.query);r.query=void 0,e=r.toString();var a={};if(e$2b(i.subdomains))for(let t=0;t<i.subdomains.length;t++){var s=e.replace(/({.*?})/g,i.subdomains[t]);a={rooturl:s,type:"token",value:o.token},e$2b(a$O.CREDENTIAL)?s in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([a]):a$O.CREDENTIAL=new a$O([a])}else{if(n.test(e))throw new t$16("detected subdomain url scheme, but no subdomain provided.");a={rooturl:e,type:"token",value:o.token},e$2b(a$O.CREDENTIAL)?e in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([a]):a$O.CREDENTIAL=new a$O([a])}}if("realspace"!=e.slice(-9))throw new t$16("open scene url error!");i=u$_(i,{}),this.customRequestHeaders=u$_(this.customRequestHeaders,i.customRequestHeaders);var l=u$_(i.useMercatorProject,!1),u=u$_(i.autoSetView,!0),c=e,h=i.subdomains;if(e$2b(h))e=e.replace(n,(function(e,t){if(!e$2b(h.length))throw new t$16("detected subdomain url scheme, but no subdomain provided.");if("{s}"===t)return h[0]}));else if(n.test(e))throw new t$16("detected subdomain url scheme, but no subdomain provided.");var d=e+"/scenes.json";e$2b(a$O.CREDENTIAL)&&(d=e$2b(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,d):a$O.addToken(d));var f=this,p=this._scene,_=this.camera,m=o$1l.defer();return Ur(d,t,f._customRequestHeaders).then((function(t){if(e$2b(t)){var n=t.path.indexOf("?");-1!==n&&(t.path=t.path.substring(0,n));var r=t.path+".json";e$2b(a$O.CREDENTIAL)&&(r=e$2b(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,r):a$O.addToken(r)),ea$1(r,f._customRequestHeaders).then((function(t){try{var i,n;if(e$2b(t.clipRegions)){for(var r=[],o=0;o<t.clipRegions.length;o++){for(var a=[],s=0;s<t.clipRegions[o].points.length;s++)a.push(t.clipRegions[o].points[s].x),a.push(t.clipRegions[o].points[s].y),a.push(t.clipRegions[o].points[s].z||0);r.push(a)}p._clipRegions=r}n=-1!==e.indexOf("/iserver")?e.substring(0,e.indexOf("/iserver")+8)+"/_setup.json":e.substring(0,e.indexOf("/realspace")+10)+"/_setup.json",e$2b(a$O.CREDENTIAL)&&(n=e$2b(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,n):a$O.addToken(n)),"NONEARTHFLAT"===t.sceneType?u$Q(n,f._customRequestHeaders).then((function(e){if(p.mode=C$13.COLUMBUS_VIEW,!e$2b(e.systemUGOVersion)||Er("11.1.0.22305",e.systemUGOVersion)>0?t.camera.tilt-=Math.PI:t.camera.tilt-=Math.PI/2,i=new o$1p(t.camera.longitude,t.camera.latitude,t.camera.altitude),l){var n=(new t$O).unproject(i);i=p.camera._projection.project(n)}var r=i.x,o=i.y;r>20037508.342789244&&(r-=20037508.342789244*Math.floor(r/20037508.342789244)),o>10018754.171394622&&(o-=20037508.342789244*Math.floor((o+10018754.171394622)/20037508.342789244)),i.x=r,i.y=o,u&&_.setView({destination:i,orientation:{heading:t.camera.heading,pitch:t.camera.tilt,roll:0},convert:!1})})).otherwise((function(){if(p.mode=C$13.COLUMBUS_VIEW,t.camera.tilt-=Math.PI/2,i=new o$1p(t.camera.longitude,t.camera.latitude,t.camera.altitude),l){var e=(new t$O).unproject(i);i=p.camera._projection.project(e)}var n=i.x,r=i.y;n>20037508.342789244&&(n-=20037508.342789244*Math.floor(n/20037508.342789244)),r>10018754.171394622&&(r-=20037508.342789244*Math.floor((r+10018754.171394622)/20037508.342789244)),i.x=n,i.y=r,u&&_.setView({destination:i,orientation:{heading:t.camera.heading,pitch:t.camera.tilt,roll:0},convert:!1})})):(t.camera.tilt-=90,i=o$1p.fromDegrees(t.camera.longitude,t.camera.latitude,t.camera.altitude),u&&_.setView({destination:i,orientation:{heading:e$2a.toRadians(t.camera.heading),pitch:e$2a.toRadians(t.camera.tilt),roll:0},convert:!1}),u$Q(n,f._customRequestHeaders).then((function(e){if((!e$2b(e.systemUGOVersion)||Er("10.1.0.18325",e.systemUGOVersion)>0)&&-90!==t.camera.tilt){var n=new f$17(i,_.direction),r=g$1h.rayEllipsoid(n,t$13.WGS84);if(r){var o=o$1p.normalize(i,new o$1p);o$1p.negate(o,o);var a=new f$17(i,o),s=g$1h.rayEllipsoid(a,t$13.WGS84);if(s){var l=r.start>0?r.start:r.stop,u=f$17.getPoint(n,l,new o$1p),c=s.start>0?s.start:s.stop,h=f$17.getPoint(a,c,new o$1p),d=o$1p.cross(u,h,new o$1p),f=o$1p.angleBetween(u,h);_.rotate(d,-f)}}}})))}catch(e){m.reject("camera set view failed,"+e)}})).otherwise((function(e){m.reject("get scene config failed,"+e)})),$r(t.path,f._customRequestHeaders,e).then((function(n){for(var r=n.s3m,o=n.imagery,a=n.terrain,s=n.s3mGroup,u=t.path+"/layers/",d=[],_=r.length-1,g=_;g>=0;g--){var x=r[g],v=u+encodeURIComponent(x.name)+"/extendxml.xml";e$2b(a$O.CREDENTIAL)&&(v=e$2b(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,v):a$O.addToken(v)),function(t){t=p.layers._s3mLayerAddedIndex;var i=sr(v,f._customRequestHeaders).then((function(i){try{var n=e+"/datas/"+encodeURIComponent(i.name)+"/config";if(i.customRequestHeaders=f._customRequestHeaders,i.useMercatorProject=l,i.subdomainConfig={subdomains:h,urlScheme:c},!e$2b(i.groupName)||""===i.groupName)return f.addS3MTilesLayerByScp(n,i,t);var r=p.layers.find(i.groupName),o=!r;if(!r){var a={scene:p,name:i.groupName};r=new _0x40a7a7(a),p.layers.add(r)}if(i.index=t,i.ready=!1,r._layerConfigs.set(n,i),r._s3mURLs[t]=n,o)return r}catch(e){m.reject("add S3M layer"+i.name+" failed,"+e)}})).otherwise((function(e){m.reject("get S3M layer config failed,"+e+",layer name is "+x.name)}));p.layers._s3mLayerAddedIndex++,e$2b(i)&&d.push(i)}(_-g)}for(g=s.length-1;g>=0;g--){x=s[g],v=u+encodeURIComponent(x.name)+"/extendxml.xml";e$2b(a$O.CREDENTIAL)&&(v=e$2b(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,v):a$O.addToken(v)),function(t){var i=sr(v,f._customRequestHeaders).then((function(i){try{var n=e+"/datas/"+encodeURIComponent(i.name)+"/config";return f.addS3MGroupLayer(n,i,t)}catch(e){m.reject("add S3MGroup layer"+i.name+" failed,"+e)}})).otherwise((function(e){m.reject("get S3MGroup layer config failed,"+e+",layer name is "+x.name)}));d.push(i)}(s.length-1-g)}for(g=o.length-1;g>=0;g--){var y=c+"/datas/"+encodeURIComponent(o[g].name),$=new H$4({url:y,subdomains:h,customRequestHeaders:f._customRequestHeaders});try{var b=p.imageryLayers.addImageryProvider($);o[g].maxVisibleAltitude>0&&(b.maxHeight=o[g].maxVisibleAltitude,b.minHeight=o[g].minVisibleAltitude),d.push(b)}catch(e){m.reject("add imagery layer "+o[g].name+" failed,"+e)}}if(e$2b(a)){var T=c+"/datas/"+encodeURIComponent(a.name);try{p.terrainProvider=new ne$x({url:T,isSct:!0,subdomains:h,customRequestHeaders:f._customRequestHeaders,invisibility:u$_(i.invisibility,!1)}),d.push(p.terrainProvider)}catch(e){m.reject("add terrain layer "+a.name+" failed,"+e)}}o$1l.all(d,(function(e){for(var t=[],i=0;i<e.length;i++)e$2b(e[i])&&t.push(e[i]);m.resolve(t)}),(function(e){m.reject("add all layers failed,"+e)}))})).otherwise((function(e){m.reject("get layer list failed,"+e)}))}else m.reject("scene list response null!")})).otherwise((function(e){m.reject("get scene list failed,"+e)})),m.promise},De$1.prototype.addS3MTilesLayerByScp=function(e,t,i,n){t=u$_(t,{});var r=/({.*?})/g;if(e.indexOf("?token")>-1){var o=new h$16(e),a=m$1a(o.query);o.query=void 0,e=o.toString();var s={};if(e$2b(t.subdomains))for(let i=0;i<t.subdomains.length;i++){var l=e.replace(/({.*?})/g,t.subdomains[i]);s={rooturl:l,type:"token",value:a.token},e$2b(a$O.CREDENTIAL)?l in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([s]):a$O.CREDENTIAL=new a$O([s])}else{if(r.test(e))throw new t$16("detected subdomain url scheme, but no subdomain provided.");s={rooturl:e,type:"token",value:a.token},e$2b(a$O.CREDENTIAL)?e in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([s]):a$O.CREDENTIAL=new a$O([s])}}if(!e$2b(e))throw new t$16("add s3m tiles layer,url is required.");if(e$2b(t.subdomains))e=e.replace(r,(function(e,i){if(!e$2b(t.subdomains.length))throw new t$16("detected subdomain url scheme, but no subdomain provided.");if("{s}"===i)return t.subdomains[0]}));else if(r.test(e))throw new t$16("detected subdomain url scheme, but no subdomain provided.");t=t||{};var u=o$1l.defer();n=u$_(n,!1);var c,h,d=e,f=u$_(t.name,f$O(d)),p=this,_=this._scene;if((-1!==e.indexOf("ws://")||-1!==e.indexOf("wss://"))&&(t.useWebsocket=!0),t.useWebsocket)return ir(d,_,u,t,f,i,m,n),u.promise;(c=-1!==e.indexOf("aliyuncs")||-1!==e.indexOf("oss-cn")?Me$2.oss:Me$2.iServer)===Me$2.iServer&&(h=1===t.urlType?e+"&authentication=login":e.substring(0,e.indexOf("rest/realspace")+14));var m=e;return e$2b(a$O.CREDENTIAL)&&(d=e$2b(a$O.CREDENTIAL._keymap[d])?a$O.addTokenWithKey(d,d):a$O.addToken(d)),LicenseChecker.LICENSECHECKER.getLicense(d).then((function(e){LicenseChecker.LICENSECHECKER.check(e)})),c===Me$2.iServer?(t.serverType=Me$2.iServer,e$2b(this.RSAAuthenticationStatus[h])?(0===this.RSAAuthenticationStatus[h]&&(e$2b(ee$2[h])||(ee$2[h]={}),e$2b(ee$2[h][d])||(ee$2[h][d]={scene:_,deferred:u,options:t,layerName:f,index:i})),1===this.RSAAuthenticationStatus[h]&&ir(d,_,u,t,f,i,m,n),2===this.RSAAuthenticationStatus[h]&&u.reject("add s3m layer failed,"+d)):(this.RSAAuthenticationStatus[h]=0,ra$1(h,t.urlType,t.customRequestHeaders,d).then((function(){if(p.RSAAuthenticationStatus[h]=1,ir(d,_,u,t,f,i,m,n),e$2b(ee$2[h]))for(var e in ee$2[h]){var r=u$_(ee$2[h][e].options.groupName,n);ir(e,ee$2[h][e].scene,ee$2[h][e].deferred,ee$2[h][e].options,ee$2[h][e].layerName,ee$2[h][e].index,void 0,r),delete ee$2[h][e]}}),(function(e){p.RSAAuthenticationStatus[h]=2,delete ee$2[h],u.reject("add s3m layer failed,"+e.url)})).otherwise((function(e){p.RSAAuthenticationStatus[h]=2,delete ee$2[h],u.reject("add s3m layer failed,"&e.url)})))):(t.serverType=Me$2.oss,ir(d,_,u,t,f,i,m,n)),u.promise},De$1.prototype.addS3MGroupLayer=function(e,t,i){if(!e$2b(e))throw new t$16("add S3MGroup layer,url is required.");t=t||{};var n=e;e$2b(a$O.CREDENTIAL)&&(n=a$O.addToken(n));var r=u$_(t.name,f$O(n)),o=this,a=o$1l.defer();return u$Q(n).then((function(e){var t={name:r,url:n,layerBounds:e.geobounds,layers:e.layers,scene:o},a=new _0x40a7a7(t);o._layers.add(a,i)})).otherwise((function(e){a.reject("add S3MGroup layer failed,"+e)})),a.promise},De$1.prototype.addLayerService=function(e,t,i){if(!e$2b(e)||!e$2b(t)||!e$2b(i))throw new t$16("url and sceneName and layerName is required!");if("realspace"!=e.slice(-9))throw new t$16("open scene url error!");var n=this,r=e+"/scenes/"+encodeURIComponent(t)+"/layers/"+encodeURIComponent(i)+"/extendxml.xml";e$2b(a$O.CREDENTIAL)&&(r=a$O.addToken(r));var o=o$1l.defer();return sr(r,n._customRequestHeaders).then((function(t){try{var i=e+"/datas/"+encodeURIComponent(t.name)+"/config";t.customRequestHeaders=n._customRequestHeaders;var r=n.addS3MTilesLayerByScp(i,t);o.resolve(r)}catch(e){o.reject("add S3M layer"+t.name+" failed,"+e)}})).otherwise((function(e){o.reject("get S3M layer config failed,"+e+",layer name is "+i)})),o.promise};var Jr=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,Ir=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)\)$/i;function sr(e,t,i){return e$2b(i)||(i=o$1l.defer()),d$1f(e,t).then((function(n){try{var r=Qr(n);i.resolve(r)}catch{sr(e,t,i)}})).otherwise((function(){sr(e,t,i)})),i.promise}function Qr(e){if(!e$2b(e))throw new t$16("get s3m layer config failed,xml document undefined.");var t,i=e.firstChild,n=i.namespaceURI,r=s$S.queryStringValue(i,"LayerName",n),o=s$S.queryFirstNode(i,"GeoBounds",n);if(e$2b(o)){var a=s$S.queryNumericValue(o,"bottom",n),s=s$S.queryNumericValue(o,"left",n),l=s$S.queryNumericValue(o,"top",n),u=s$S.queryNumericValue(o,"right",n);s>180||a>180||u>180||l>180?(s>20037508.342789244&&(s-=20037508.342789244*Math.floor(s/20037508.342789244)),u>20037508.342789244&&(u-=20037508.342789244*Math.floor(u/20037508.342789244)),l>10018754.171394622&&(l-=20037508.342789244*Math.floor((l+10018754.171394622)/20037508.342789244)),a>10018754.171394622&&(a-=20037508.342789244*Math.floor((a+10018754.171394622)/20037508.342789244)),t=new h$18(s/=6378137,a/=6378137,u/=6378137,l/=6378137)):t=h$18.fromDegrees(s,a,u,l)}var c=s$S.queryFirstNode(i,"Options",n),h=s$S.queryStringValue(i,"WithinLayer3DGroup",n),d=s$S.queryBooleanValue(c,"Selectable",n),f=s$S.queryBooleanValue(c,"Visible",n),p=s$S.queryNumericValue(c,"VisibleAltitudeMin",n),_=s$S.queryNumericValue(c,"VisibleAltitudeMax",n);_=0==_?Number.MAX_VALUE:_;var m=s$S.queryNumericValue(c,"VisibleDistanceMin",n),g=s$S.queryNumericValue(c,"VisibleDistanceMax",n),x=s$S.queryStringValue(c,"ShadowType",n),v=0;"SELECTION"==x?v=1:"ALL"==x&&(v=2);var y=!1;"S3MB"==s$S.queryStringValue(i,"CacheFileType",n)&&(y=!0);var $=s$S.queryFirstNode(i,"Style",n);if(!e$2b($)){var b=s$S.queryFirstNode(i,"LayerStyle",n);if(e$2b(b)&&!e$2b($=s$S.queryFirstNode(b,"Style",n)))throw new t$16("get s3m layer config failed,extendxml.xml foamat error,layer name is "+r)}var T=s$S.queryNumericValue($,"LineWidth",n),C=s$S.queryStringValue($,"FillForeColor",n),S=Jr.exec(C),w=new e$1U;if(null!==S){var E=parseFloat(S[1]);E=189==E?255:E;var P=parseFloat(S[2]);P=235==P?255:P,w.red=e$2a.clamp(E/255,0,1),w.green=e$2a.clamp(P/255,0,1),w.blue=e$2a.clamp(parseFloat(S[3])%256/255,0,1),w.alpha=e$2a.clamp(parseFloat(S[3])%65536/256/255,0,1)}var A=s$S.queryFirstNode($,"Style3D",n),L=new e$1s;if(e$2b(A)){var M=s$S.queryStringValue(A,"Fill3DMode",n),R=fr$2.Fill;"FILL_LINE"==M?R=fr$2.WireFrame:"FILL_FACEANDLINE"==M&&(R=fr$2.Fill_And_WireFrame);var O=s$S.queryNumericValue(A,"PointSize",n),I=s$S.queryStringValue(A,"LineColor",n),D=(S=Ir.exec(I),new e$1U);null!==S&&(D.red=e$2a.clamp(parseFloat(S[1]),0,1),D.green=e$2a.clamp(parseFloat(S[2]),0,1),D.blue=e$2a.clamp(parseFloat(S[3]),0,1),D.alpha=e$2a.clamp(parseFloat(S[4]),0,1));var B=s$S.queryNumericValue($,"MarkerSize",n)||0;B*=2,O=Math.max(O,B);var N=s$S.queryStringValue(A,"ColorPoint",n);S=Ir.exec(N);var F=new e$1U;null!==S&&(F.red=e$2a.clamp(parseFloat(S[1]),0,1),F.green=e$2a.clamp(parseFloat(S[2]),0,1),F.blue=e$2a.clamp(parseFloat(S[3]),0,1),F.alpha=e$2a.clamp(parseFloat(S[4]),0,1));var U=s$S.queryNumericValue(A,"BottomAltitude",n);s$S.queryStringValue(A,"AltitudeMode",n);var G=s$S.queryStringValue(A,"BillboardMode",n),z=s$S.queryBooleanValue(A,"FixedPixelSize",n);G="AUTO_Z_AXIAL"==G?yr$1.FixedZ:"FIXED_ANGLE"==G?yr$1.FixedXYZ:yr$1.None;var V=e$2a.toRadians(s$S.queryNumericValue(A,"RotateX",n)),k=e$2a.toRadians(s$S.queryNumericValue(A,"RotateY",n)),W=e$2a.toRadians(s$S.queryNumericValue(A,"RotateZ",n));new i$15(V,k,W),L.fillForeColor=w,L.bottomAltitude=U,L.lineWidth=T,L.lineColor=D,L.pointSize=O,L.pointColor=F,L.fillStyle=R,L.billboardMode=G,L.fixedPixelSize=z}var H=void 0,q=s$S.queryFirstNode(i,"Effect",n);if(e$2b(q)){var j=s$S.queryStringValue(q,"EffectType",n);if("Region"===j){H=new _0x14c08b;var Y=s$S.queryNumericValue(q,"Type",n);H.setValue("RegionType",Y);var X=s$S.queryNumericValue(q,"ForeColor",n),K=e$1U.fromRgba(X);H.setValue("ForeColor",K);var Q=s$S.queryNumericValue(q,"BackColor",n),Z=e$1U.fromRgba(Q);H.setValue("BackColor",Z);var J=s$S.queryNumericValue(q,"WidthX",n);H.setValue("WidthX",J);var ee=s$S.queryNumericValue(q,"WidthY",n);H.setValue("WidthY",ee);var te=s$S.queryNumericValue(q,"OffsetX",n);H.setValue("OffsetX",te);var ie=s$S.queryNumericValue(q,"OffsetY",n);H.setValue("OffsetY",ie);var ne=s$S.queryNumericValue(q,"RepeatX",n);H.setValue("RepeatX",ne);var re=s$S.queryNumericValue(q,"RepeatY",n);H.setValue("RepeatY",re);var oe=s$S.queryNumericValue(q,"RotationAngle",n);H.setValue("RotationAngle",oe)}else if("Polyline"===j){H=new _0x2f60f9;Y=s$S.queryNumericValue(q,"Type",n);H.setValue("PolylineType",Y);var ae=s$S.queryNumericValue(q,"Color",n),se=e$1U.fromRgba(ae);H.setValue("Color",se);var le=s$S.queryNumericValue(q,"Width",n);H.setValue("Width",le);var ue=s$S.queryBooleanValue(q,"IsArrow",n);H.setValue("IsArrow",ue);var ce=s$S.queryNumericValue(q,"GapColor",n),he=e$1U.fromRgba(ce);H.setValue("GapColor",he);var de=s$S.queryNumericValue(q,"DashLength",n);H.setValue("DashLength",de);var fe=s$S.queryNumericValue(q,"DashPattern",n);H.setValue("DashPattern",fe);var pe=s$S.queryBooleanValue(q,"IsMove",n);H.setValue("IsMove",pe);var _e=s$S.queryNumericValue(q,"GlowPower",n);H.setValue("GlowPower",_e);var me=s$S.queryNumericValue(q,"OutlineColor",n),ge=e$1U.fromRgba(me);H.setValue("OutlineColor",ge);var xe=s$S.queryNumericValue(q,"OutlineWidth",n);H.setValue("OutlineWidth",xe)}}var ve=s$S.queryNumericValue(i,"LODRangeScale",n),ye=s$S.queryFirstNode(i,"PolygonOffset",n),$e=s$S.queryNumericValue(ye,"Constant",n),be=s$S.queryNumericValue(ye,"SlopeScale",n),Te=0!==$e&&0!==be,Ce=s$S.queryFirstNode(i,"ColorParams",n);return{name:r,groupName:h,layerBounds:t,isS3MB:y,style3D:L,selectEnable:d,isVisible:f,minVisibleAltitude:p,maxVisibleAltitude:_,minVisibleDistance:m,maxVisibleDistance:g,shadowType:v,heading:W,lodRangeScale:ve,polygonOffset:{enabled:Te,units:$e,factor:be},brightness:s$S.queryNumericValue(Ce,"Brightness",n),constrast:s$S.queryNumericValue(Ce,"Constrast",n),hue:s$S.queryNumericValue(Ce,"Hue",n),saturation:s$S.queryNumericValue(Ce,"Saturation",n),gamma:s$S.queryNumericValue(Ce,"Gamma",n),effect:H,cullMode:s$S.queryStringValue(i,"RenderCullMode",n)}}function ea$1(e,t){return u$Q(e,t).then((function(e){return e}))}function ra$1(e,t,i,n){var r,o,a=o$1l.defer();return 1===t?(r=e,o=e):(r=e+"/login.json",o=e+"/login.json"),e$2b(a$O.CREDENTIAL)&&(n=n.substring(0,n.indexOf("?")),e$2b(a$O.CREDENTIAL._keymap[n])?(r=a$O.addTokenWithKey(n,r),o=a$O.addTokenWithKey(n,o)):(r=a$O.addToken(r),o=a$O.addToken(o))),u$Q(r,i).then((function(t){var n=Number(t.jsessionID),r=aa$1(Number(t.random),397245148883021,0x8f461e7bf61d5),s={jsessionID:n.toString(),random:r.toString()},l=new XMLHttpRequest;if(u$X.contains(e)&&(l.withCredentials=!0),l.open("POST",o,!0),l.onreadystatechange=function(){if(4===l.readyState)if(200===l.status||201===l.status){var e={};try{e=JSON.parse(l.response)}catch{-1!==(l.response||l.responseText).toString().indexOf("isSucceed : true")&&(e.succeed=!0)}!0===e.succeed?a.resolve(!0):a.reject(!1)}else a.reject(!1)},e$2b(i))for(var u in i)i.hasOwnProperty(u)&&l.setRequestHeader(u,i[u]);l.send(JSON.stringify(s))}),(function(e){a.reject({status:!1,url:n})})).otherwise((function(){a.reject({status:!1,url:n})})),a.promise}function aa$1(e,t,i){for(var n=new tr(e),r=new tr(t),o=new tr(1),a=new tr(2),s=new tr(1);r.toNumber()>0;)0===r.mod(a).toNumber()?(r=r.dividedBy(a),n=n.multipliedBy(n).mod(i)):(r=r.minus(s),o=o.multipliedBy(n).mod(i));return o.toNumber()}De$1.prototype.isDestroyed=function(){return!1},De$1.prototype.destroy=function(){return i$10(this)};var Te$1=function(e){return function(){e.frameState.afterRender.push((function(){e.requestRender()}))}};function pi(e,t,i){this.ray=e,this.width=t,this.primitives=i,this.ready=!1,this.deferred=o$1l.defer(),this.promise=this.deferred.promise}function w$3(e){var t,i=(e=u$_(e,u$_.EMPTY_OBJECT)).canvas,n=e.contextOptions,r=e.creditContainer,o=e.creditViewport;if(!e$2b(i))throw new t$16("options and options.canvas are required.");t=e$2b(e.contextOptions)&&e.contextOptions.contextType===De$h.WebGPU?new f$8(i,n,e.engine):new g$a(i,n);var a=e$2b(r);a||((r=document.createElement("div")).style.position="absolute",r.style.bottom="0",r.style["text-shadow"]="0 0 2px #000000",r.style.color="#ffffff",r.style["font-size"]="10px",r.style["padding-right"]="5px",i.parentNode.appendChild(r)),e$2b(o)||(o=i.parentNode),this._id=e$1Q(),this._jobScheduler=new o$e,this._frameState=new h$f(t,new r$l(r,"_",o),this._jobScheduler),this._frameState.scene3DOnly=u$_(e.scene3DOnly,!1),this._removeCreditContainer=!a,this._creditContainer=r;var s=new n$Z(t);s.viewport=new f$18,s.viewport.x=0,s.viewport.y=0,s.viewport.width=t.drawingBufferWidth,s.viewport.height=t.drawingBufferHeight,this._passState=s,this._canvas=i,this._context=t,this._computeEngine=new f$n(t),this._globe=void 0,this._globeTranslucencyState=new F$b,this._globeHeight=void 0,this._cameraUnderground=!1,this._primitives=new o$x,this._groundPrimitives=new o$x,this._asyncRayPicks=[],this._logDepthBuffer=t.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new s$a,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._overlayAgainstDepthCommandList=[],this._logDepthOverlayCommandList=[],this._useOIT=u$_(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new c$c,this._clearColorCommand=new t$X({color:new e$1U,stencil:0,owner:this}),this._depthOnlyRenderStateCache={},this._pickRenderStateCache={},this._transitioner=new R$8(this),this._preUpdate=new o$1h,this._postUpdate=new o$1h,this._renderError=new o$1h,this._preRender=new o$1h,this._postRender=new o$1h,this._pickPositionCache={},this._pickPositionCacheDirty=!1,this._minimumDisableDepthTestDistance=0,this.frustumTolerance=0,this._msaaSamples=e.contextOptions?u$_(e.contextOptions.msaaLevel,1):1,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new o$1h,this.morphComplete=new o$1h,this.skyBox=void 0,this._cloudBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=e$1U.clone(e$1U.BLACK),this._mode=C$13.SCENE3D,this._mapProjection=e$2b(e.mapProjection)?e.mapProjection:new n$1b,this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e11,this.nearToFarDistance2D=175e4,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowGlobeDepth=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.fog=new g$i,this._sunCamera=new v$K(this),this.shadowMap=new C$Y({context:t,lightCamera:this._sunCamera,enabled:u$_(e.shadows,!1),pcss:u$_(e.pcss,!0),shadowQuality:u$_(e.shadowQuality,0)}),this._analysisShadowMap=void 0,this.invertClassification=!1,this.invertClassificationColor=e$1U.clone(e$1U.WHITE),this._actualInvertClassificationColor=e$1U.clone(this._invertClassificationColor),this._invertClassification=new t$a,this.focalLength=void 0,this.eyeSeparation=void 0,this._brdfLutGenerator=new t$d,this._terrainExaggeration=u$_(e.terrainExaggeration,1),this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new _a(this),this._mapMode2D=u$_(e.mapMode2D,Rr$2.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostEffect:!1,usePostProcessSelected:!1,useWebVR:!1,usePrepass:!1},this._environmentVisible={isSunVisible:!0,isMoonVisible:!0,isSkyAtmosphereVisible:!0,isSkyBoxVisible:!0,isGlobalVisible:!0,isObjectVisible:!0,isOnlyS3MObjectVisible:!1,isBillboardVisible:!0},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=u$_(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=u$_(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=r$1a.requestCompletedEvent.addEventListener(Te$1(this)),this._removeTaskProcessorListenerCallback=i$V.taskCompletedEvent.addEventListener(Te$1(this)),this._removeGlobeCallbacks=[];var l=new f$18(0,0,t.drawingBufferWidth,t.drawingBufferHeight),u=new v$K(this);this._logDepthBuffer&&(u.frustum.near=.1,u.frustum.far=1e10),this.preloadFlightCamera=new v$K(this),this.preloadFlightCullingVolume=void 0,this._picking=new d$g(this);var c=new f$18(0,0,1,1),h=new v$K(this);h.frustum=new a$V({width:.1,aspectRatio:1,near:.1}),this._view=new L$c(this,u,l),this._pickOffscreenView=new L$c(this,h,c),this.pickOffscreenDefaultWidth=.1,this._defaultView=new L$c(this,u,l),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this._sunColor=new o$1p(1.8,1.85,2),this._lightGroup=Ze$3.SUN_LIGHT,this._presetLightSource=[],this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentMapAtlas=void 0,this._supportCompressType=0,t.s3tc?this._supportCompressType=1:t.pvrtc?this._supportCompressType=2:t.etc1&&(this._supportCompressType=3),this._plotLayers=new _0x5291a3,this._layers=new u$k,ti$3._attachLayers(this._layers),this._undergroundMode=!1,this._undergroundDepth=1e4,this._analyst3D=new u$k,this._vectorTileMaps=new u$k,this._vectorTileSource=new e$1N,this._multiViewportMode=B$e.NONE,this._multiViewportInfo=[],this._renderPipeline=new _0x485985(this),this.postProcessStages=new _$a(this._renderPipeline),this._lightSource=new s$I(t),this.compositor=new o$l(t),kt(this,0,a$15.now()),W$6(this),this.initializeFrame(),this._pickPointEnabled=!1,this._pickPointInterval=200,this._pos=void 0,this._pickPointTolerance=3,this._pickTolerance=3,this._pickDepthTolerance=0,this._rasterPickTexture=void 0,this._rasterPickFBO=void 0,this.voxelGridPostRender=new a$5({}),this.particlePostRender=new u$b({}),this.particleTrailsPostRenderer=new r$f({}),this._pickResult={pickFrameNumber:-1,pickObject:void 0},this._walkingMode=Ct.NONE,this._pickRect=void 0,this._isUpdatePickCommand=!1,this._pickRectFramebuffer=void 0,this._mvtVisibleControl=!1,this._mvtVisibleLevel=0,this._maskEnabled=!1,this._enableCompositor=!0,this._overlapDisplayedThreshold=0,this._overlapDisplayOptions={allowIconWithTextDisplay:!0},this._pbrMaterlParameters=[],this._saveLocalCachePerformance=!0,this._toneMappingExposure=1,this._envMapIntensity=1,this._sceneConfigLoader=new De$1(e,this),this._silverLightingAtmosphere=new n$6,t.uniformState._silverLightingAtmosphere=this._silverLightingAtmosphere,t.uniformState._sceneUBO._initUniformMap(t),o$15.isNDCHalfZRange=t.webgpu,this._waterReflectionDistinctQuality=5}function ci(e,t){for(var i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;var n=[];e$2b(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(Te$1(e))),n.push(t.terrainProviderChanged.addEventListener(Te$1(e)))),e._removeGlobeCallbacks=n}function vi(e,t){e.enableVertexCapture(t)}function _i(e,t){e.disableVertexCapture(t)}function Dt(e,t,i){var n=e._frameState,r=e._context,o=e._view.oit,a=n.shadowState.lightShadowMaps,s=n.shadowState.lightShadowsEnabled,l=e._environmentState.usePrepass,u=t.derivedCommands;e$2b(t.pickId)&&(u.picking=l$i.createPickDerivedCommand(e,t,r,u.picking)),!t.pickOnly&&t.pass!==Le$s.TERRAIN_CLASSIFICATION&&t.pass!==Le$s.ClampObject&&(u.depth=l$i.createDepthOnlyDerivedCommand(e,t,r,u.depth)),n.passes.normal&&(u.normal=l$i.createNormalDerivedCommand(t,r)),u.originalCommand=t,e._hdr&&(u.hdr=l$i.createHdrCommand(t,r,u.hdr),u=(t=u.hdr.command).derivedCommands),l&&t.pass==Le$s.S3MTiles&&(u.prepass=l$i.createPrepassDerivedCommand(e,t,r,u.prepass)),s&&t.receiveShadows&&(u.shadows=C$Y.createReceiveDerivedCommand(a,t,i,r,u.shadows)),t.pass===Le$s.TRANSLUCENT&&e$2b(o)&&o.isSupported()&&(s&&t.receiveShadows?(u.oit=e$2b(u.oit)?u.oit:{},u.oit.shadows=o.createDerivedCommands(u.shadows.receiveCommand,r,u.oit.shadows)):u.oit=o.createDerivedCommands(t,r,u.oit)),t.pass===Le$s.Voxel_Billboard&&e$2b(e.voxelGridPostRender)&&e.voxelGridPostRender.createDerivedCommands(t),t.pass===Le$s.Particle&&e$2b(e.particlePostRender)&&e.particlePostRender.createDerivedCommands(t),e._maskEnabled&&(u.mask=l$i.createMaskCommand(t,r,u.mask))}Object.defineProperties(w$3.prototype,{waterReflectionDistinctQuality:{get:function(){return this._waterReflectionDistinctQuality},set:function(e){this._waterReflectionDistinctQuality=Math.min(Math.floor(e),5)}},toneMappingExposure:{get:function(){return this._toneMappingExposure},set:function(e){this._toneMappingExposure=e}},envMapIntensity:{get:function(){return this._envMapIntensity},set:function(e){this._envMapIntensity=e}},canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},maximumAliasedLineWidth:{get:function(){return e$1T.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return e$1T.maximumCubeMapSize}},pickPositionSupported:{get:function(){return!0}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return u$B.isSupported(this._context)}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,ci(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(e$2b(this.globe))return this.globe.imageryLayers}},terrainLayers:{get:function(){if(e$2b(this.globe))return this.globe.terrainLayers}},terrainProvider:{get:function(){if(e$2b(this.globe))return this.globe.terrainProvider},set:function(e){e$2b(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(e$2b(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},customRequestHeaders:{get:function(){return this._sceneConfigLoader._customRequestHeaders},set:function(e){this._sceneConfigLoader._customRequestHeaders=e}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){if(this.scene3DOnly&&e!==C$13.SCENE3D)throw new t$16("Only SceneMode.SCENE3D is valid when scene3DOnly is true.");if(e===C$13.SCENE2D)this.morphTo2D(0);else if(e===C$13.SCENE3D)this.morphTo3D(0);else{if(e!==C$13.COLUMBUS_VIEW)throw new t$16("value must be a valid SceneMode enumeration.");this.morphToColumbusView(0)}this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},terrainExaggeration:{get:function(){return this._terrainExaggeration},set:function(e){this._terrainExaggeration!==e&&e$2b(this.globe)&&this.globe._surface.invalidateAllTiles(),this._terrainExaggeration=e}},useWebVR:{get:function(){return this._useWebVR},set:function(e){if(this.camera.frustum instanceof a$V)throw new t$16("VR is unsupported with an orthographic projection.");this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new v$K(this),e$2b(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new h$g(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},imagerySplitPosition:{get:function(){return this._frameState.imagerySplitPosition},set:function(e){this._frameState.imagerySplitPosition=e}},globeSplitPosition:{get:function(){return this._frameState.globeSplitPosition},set:function(e){this._frameState.globeSplitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){if(!e$2b(e)||e<0)throw new t$16("minimumDisableDepthTestDistance must be greater than or equal to 0.0.");this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0,this._defaultView.updateFrustums=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){var t=this._context,i=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=i!==this._hdr,this._hdr=i}},highDynamicRangeSupported:{get:function(){var e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},sunColor:{get:function(){return this._sunColor},set:function(e){this._sunColor=e}},opaqueFrustumNearOffset:{get:function(){return this._frameState.useLogDepth?.9:.9999}},layers:{get:function(){return this._layers}},plotLayers:{get:function(){return this._plotLayers}},multiViewportMode:{get:function(){return this._multiViewportMode},set:function(e){switch(this._multiViewportInfo.length=0,e){case B$e.NONE:this._frameState.multiViewportIndex=-1;break;case B$e.HORIZONTAL:this._multiViewportInfo[0]=new f$18(0,0,.5,1),this._multiViewportInfo[1]=new f$18(.5,0,.5,1);break;case B$e.VERTICAL:this._multiViewportInfo[0]=new f$18(0,.5,1,.5),this._multiViewportInfo[1]=new f$18(0,0,1,.5);break;case B$e.QUAD:this._multiViewportInfo[0]=new f$18(0,.5,.5,.5),this._multiViewportInfo[1]=new f$18(.5,.5,.5,.5),this._multiViewportInfo[2]=new f$18(.5,0,.5,.5),this._multiViewportInfo[3]=new f$18(0,0,.5,.5);break;case B$e.TRIPLE:this._multiViewportInfo[2]=new f$18(0,.5,.5,.5),this._multiViewportInfo[1]=new f$18(.5,.5,.5,.5),this._multiViewportInfo[0]=new f$18(0,0,1,.5);break;case B$e.VerticalTrisection:this._multiViewportInfo[2]=new f$18(2/3,0,1/3,1),this._multiViewportInfo[1]=new f$18(1/3,0,1/3,1),this._multiViewportInfo[0]=new f$18(0,0,1/3,1);break;case B$e.FIVE_DIVISIONS:this._multiViewportInfo[4]=new f$18(0,0,.5,.5),this._multiViewportInfo[3]=new f$18(0,.5,.5,.5),this._multiViewportInfo[2]=new f$18(.5,0,.5,1/3),this._multiViewportInfo[1]=new f$18(.5,1/3,.5,1/3),this._multiViewportInfo[0]=new f$18(.5,2/3,.5,1/3);break;case B$e.SIX_DIVISIONS:this._multiViewportInfo[5]=new f$18(2/3,0,1/3,1/3),this._multiViewportInfo[4]=new f$18(2/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new f$18(2/3,2/3,1/3,1/3),this._multiViewportInfo[2]=new f$18(1/3,0,1/3,1/3),this._multiViewportInfo[1]=new f$18(0,0,1/3,1/3),this._multiViewportInfo[0]=new f$18(0,1/3,2/3,2/3);break;case B$e.SEVEN_DIVISIONS:this._multiViewportInfo[6]=new f$18(0,0,.3,.5),this._multiViewportInfo[5]=new f$18(.3,0,.4,1/3),this._multiViewportInfo[4]=new f$18(.7,0,.3,.5),this._multiViewportInfo[3]=new f$18(.7,.5,.3,.5),this._multiViewportInfo[2]=new f$18(.3,2/3,.4,1/3),this._multiViewportInfo[1]=new f$18(0,.5,.3,.5),this._multiViewportInfo[0]=new f$18(.3,1/3,.4,1/3);break;case B$e.EIGHT_DIVISIONS:this._multiViewportInfo[0]=new f$18(.5,0,.5,1/3),this._multiViewportInfo[1]=new f$18(0,0,.5,1/3),this._multiViewportInfo[2]=new f$18(2/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new f$18(1/3,1/3,1/3,1/3),this._multiViewportInfo[4]=new f$18(0,1/3,1/3,1/3),this._multiViewportInfo[5]=new f$18(2/3,2/3,1/3,1/3),this._multiViewportInfo[6]=new f$18(1/3,2/3,1/3,1/3),this._multiViewportInfo[7]=new f$18(0,2/3,1/3,1/3);break;case B$e.NINE_DIVISIONS:this._multiViewportInfo[8]=new f$18(2/3,0,1/3,1/3),this._multiViewportInfo[7]=new f$18(1/3,0,1/3,1/3),this._multiViewportInfo[6]=new f$18(0,0,1/3,1/3),this._multiViewportInfo[5]=new f$18(2/3,1/3,1/3,1/3),this._multiViewportInfo[4]=new f$18(1/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new f$18(0,1/3,1/3,1/3),this._multiViewportInfo[2]=new f$18(2/3,2/3,1/3,1/3),this._multiViewportInfo[1]=new f$18(1/3,2/3,1/3,1/3),this._multiViewportInfo[0]=new f$18(0,2/3,1/3,1/3);break;default:throw new t$16("the mode is error")}e!==B$e.NONE&&this._multiViewportMode===B$e.NONE?(this._frameState.creditDisplay.container.style.visibility="hidden",!e$2b(this._deviceOrientationCameraController)&&this._useWebVR&&(this._deviceOrientationCameraController=new h$g(this),this._aspectRatioVR=this._camera.frustum.aspectRatio)):e===B$e.NONE&&this._multiViewportMode!==B$e.NONE&&(this._frameState.creditDisplay.container.style.visibility="visible",this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this.drawingBufferWidth/this.drawingBufferHeight),this._multiViewportMode=e}},undergroundMode:{get:function(){return this._undergroundMode},set:function(e){e$2b(e)&&(this._undergroundMode=e)}},undergroundDepth:{get:function(){return this._undergroundDepth},set:function(e){this._undergroundDepth=e}},lightSource:{get:function(){return this._lightSource}},cloudBox:{get:function(){return this._cloudBox},set:function(e){e$2b(e)||e$2b(this._cloudBox)&&this.cloudBox.remove(),this._cloudBox=e}},enableOcclude:{get:function(){return this._enableOcclude},set:function(e){this._enableOcclude=e}},bloomEffect:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Scene_bloomEffect"),this.compositor.bloomEffect}},scanEffect:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Scene_scanEffect"),this.compositor.scanEffect}},depthOfFieldEffect:{get:function(){return this.compositor.depthOfFieldEffect}},ssaoEffect:{get:function(){return this.compositor.SSAOEffect}},colorCorrection:{get:function(){return this.compositor.colorCorrection}},hdrEnabled:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Scene_hdrEnabled"),this._hdr},set:function(e){LicenseChecker.LICENSECHECKER.verify("Scene_hdrEnabled");var t=this._context,i=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=i!==this._hdr,this._hdr=i}},toneMappingEnabled:{get:function(){return this.compositor.toneMappingEnabled},set:function(e){return this.compositor.toneMappingEnabled=e}},pickPoint:{get:function(){return this._pos}},pickPointEnabled:{get:function(){return this._pickPointEnabled},set:function(e){this._pickPointEnabled=e;for(var t=0;t<this._layers._layerQueue.length;t++){var i={};i.layer=this._layers._layerQueue[t],i.layer instanceof _0x22e933&&(e?i.layer.traverseRenderEntity(i,vi):i.layer.traverseRenderEntity(i,_i))}}},pickPointInterval:{get:function(){return this._pickPointInterval},set:function(e){this._pickPointInterval=e}},pickPointTolerance:{get:function(){return this._pickPointTolerance},set:function(e){this._pickPointTolerance=e}},pickDepthTolerance:{get:function(){return this._pickDepthTolerance},set:function(e){this._pickDepthTolerance=e}},rasterVectorCollection:{get:function(){return this.globe._rasterVectorCollection}},walkingMode:{get:function(){return this._walkingMode},set:function(e){if(e!==this._walkingMode){this._walkingMode=e;var t=this._screenSpaceCameraController;t.previousHeight=void 0,e===Ct.ByKeyboard?(t.enableWalk=!0,t.enableLook=!1,this.mode===C$13.SCENE3D?t.enableTranslate=!1:this.mode===C$13.COLUMBUS_VIEW&&(t.enableTranslate=!0)):(t.enableWalk=!1,t.enableTranslate=!0,t.enableZoom=!0,t.enableTilt=!0,t.enableLook=!0)}}},enableOutline:{get:function(){var e=this.layers.getSelectedLayer();return!(!e$2b(e)||e.getSelection().length<1)&&e.selectColorType===Zr$2.SILHOUETTE_EDGE}},maskEnabled:{get:function(){return this._maskEnabled}},lightGroup:{get:function(){return this._lightGroup},set:function(e){e!==this._lightGroup&&(this._lightGroup=e,Ci(this,e))}},enableCompositor:{get:function(){return this._enableCompositor},set:function(e){o$1q.typeOf.bool("Scene.enableCompositor",e),this._enableCompositor=e}},overlapDisplayedThreshold:{get:function(){return this._overlapDisplayedThreshold},set:function(e){o$1q.typeOf.number("Scene.clusterRange",e),this._overlapDisplayedThreshold=e}},overlapDisplayOptions:{get:function(){return this._overlapDisplayOptions},set:function(e){o$1q.typeOf.object("Scene.overlapDisplayOptions",e),this._overlapDisplayOptions=e}},cameraUnderground:{get:function(){return this._cameraUnderground}}}),w$3.prototype.setVectorTilesLayersControl=function(e,t){this._mvtVisibleControl=e,this._mvtVisibleLevel=t},w$3.prototype.getCompressedTextureFormatSupported=function(e){var t=this.context;return("WEBGL_compressed_texture_s3tc"===e||"s3tc"===e)&&t.s3tc||("WEBGL_compressed_texture_pvrtc"===e||"pvrtc"===e)&&t.pvrtc||("WEBGL_compressed_texture_etc1"===e||"etc1"===e)&&t.etc1},w$3.prototype.updateDerivedCommands=function(e){if(e$2b(e.derivedCommands)){var t=this._frameState,i=this._context,n=!1,r=t.shadowState.lastDirtyTime;e.lastDirtyTime!==r&&(e.lastDirtyTime=r,e.dirty=!0,n=!0);var o=t.useLogDepth,a=this._hdr,s=this._environmentState.usePrepass,l=t.passes.normal,u=this._maskEnabled,c=e.derivedCommands,h=e$2b(c.logDepth),d=e$2b(c.hdr),f=e$2b(c.normal),p=e$2b(c.mask),_=e$2b(c.prepass),m=e$2b(c.originalCommand),g=o&&!h,x=a&&!d,v=s&&!_,y=l&&!f,$=u&&!p,b=!(o&&a||m);if(e.dirty=e.dirty||this._logDepthBufferDirty||this._hdrDirty||this._maskEnabled||g||x||b||$||y||v,e.dirty){e.dirty=!1;var T=t.shadowState.shadowMaps;t.shadowState.shadowsEnabled&&e.castShadows&&(c.shadows=C$Y.createCastDerivedCommand(T,e,n,i,c.shadows)),(h||g)&&(c.logDepth=l$i.createLogDepthCommand(e,i,c.logDepth),Dt(this,c.logDepth.command,n)),(m||b)&&Dt(this,e,n)}}};var gi=new a$g({pass:ue$d.RENDER}),Je=new a$g({pass:ue$d.PRELOAD}),Xe=new a$g({pass:ue$d.PRELOAD_FLIGHT}),wi=new a$g({pass:ue$d.REQUEST_RENDER_MODE_DEFER_CHECK});new a$g({pass:ue$d.MOST_DETAILED_PRELOAD});var yi=new a$g({pass:ue$d.MOST_DETAILED_PICK}),$e=new a$g({pass:ue$d.PICK}),xt=new i$1c,et$2;function bi(e){var t=e.globe;if(e._mode===C$13.SCENE3D&&e$2b(t)&&t.show&&!e._cameraUnderground&&!e._globeTranslucencyState.translucent){var i=t.ellipsoid;return xt.radius=i.minimumRadius,et$2=d$U.fromBoundingSphere(xt,e.camera.positionWC,et$2)}}function tt$1(e){e.render=!1,e.pick=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1,e.asynchronous=!1,e.fbo=!1,e.normal=!1}function kt(e,t,i){var n=e._frameState;n.frameNumber=t,n.time=a$15.clone(i,n.time)}function Ci(e,t){for(var i=0;i<e._presetLightSource.length;i++)e.removeLightSource(e._presetLightSource[i]);if(e._presetLightSource.length=0,t===Ze$3.SUN_LIGHT)e.hdrEnabled=!1,e.sun.show=!0,e._lightSource.ambientLightColor=new e$1U(.76,.76,.76,1);else if(t===Ze$3.LIGHT_GROUP1){e.hdrEnabled=!1,e.sun.show=!1,e._lightSource.ambientLightColor=new e$1U(.5,.5,.5,1);var n=new c$h(new o$1p.fromDegrees(116.191153,40.147532,450),{targetPosition:new o$1p.fromDegrees(116.19106,40.147858,430),color:new e$1U(.9,.9,.9,1),intensity:.78});e.addLightSource(n),e._presetLightSource.push(n);var r=new c$h(new o$1p.fromDegrees(116.192153,40.147432,490),{targetPosition:new o$1p.fromDegrees(116.19106,40.147858,430),color:new e$1U(.9,.9,.9,1),intensity:.25});e.addLightSource(r),e._presetLightSource.push(r)}}function W$6(e){var t=e.camera,i=e._frameState;i.commandList.length=0,i.shadowMaps.length=0,i.brdfLutGenerator=e._brdfLutGenerator,i.environmentMap=e.skyBox&&e.skyBox._cubeMap,i.mode=e._mode,i.morphTime=e.morphTime,i.mapProjection=e.mapProjection,i.camera=t,i.cullingVolume=t.frustum.computeCullingVolume(t.positionWC,t.directionWC,t.upWC,e.frustumTolerance),i.cullingVolume.enableFusion=e$2b(e.context.curFusionViewMatrix),i.occluder=bi(e),i.terrainExaggeration=e._terrainExaggeration,i.minimumDisableDepthTestDistance=e._minimumDisableDepthTestDistance,i.invertClassification=e.invertClassification,i.useLogDepth=e._logDepthBuffer&&!(e.camera.frustum instanceof a$V||e.camera.frustum instanceof l$12),i.sunColor=e._sunColor,e._lightSource.sunLightON=e$2b(e.sun)&&e.sun.show,i.lightSource=e._lightSource,i.shadowDarkness=e.shadowMap.darkness,i.toneMappingExposure=e.toneMappingExposure,i.envMapIntensity=e.envMapIntensity,e$2b(e._specularEnvironmentMapAtlas)&&e._specularEnvironmentMapAtlas.ready?(i.specularEnvironmentMaps=e._specularEnvironmentMapAtlas.texture,i.specularEnvironmentMapsMaximumLOD=e._specularEnvironmentMapAtlas.maximumMipmapLevel):(i.specularEnvironmentMaps=void 0,i.specularEnvironmentMapsMaximumLOD=void 0),e$2b(e._pmremGenerator)&&e._pmremGenerator.ready?i.hdrEnvMap=e._pmremGenerator.texture:i.hdrEnvMap=void 0,i.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,e._actualInvertClassificationColor=e$1U.clone(e.invertClassificationColor,e._actualInvertClassificationColor),t$a.isTranslucencySupported(e._context)||(e._actualInvertClassificationColor.alpha=1),i.invertClassificationColor=e._actualInvertClassificationColor,e$2b(e.globe)?i.maximumScreenSpaceError=e.globe.maximumScreenSpaceError:i.maximumScreenSpaceError=2,tt$1(i.passes),i.tilesetPassState=void 0,i.pbrMaterialsArr=e._pbrMaterlParameters,e.context._trangleCount=0,i.cameraUnderground=e._cameraUnderground,i.globeTranslucencyState=e._globeTranslucencyState}w$3.prototype.updateFrameState=function(){return W$6(this)};var Vt=new i$W;w$3.prototype.isVisible=function(e,t,i){return e$2b(e)&&(!e$2b(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==Ae$u.OUTSIDE&&(!e$2b(i)||!(e.occlude&&!this._undergroundMode)||!e.boundingVolume.isOccluded(i)))};var Ee$1=new o$15,Fe$1=new l$11,Re$1=new a$V,Le$1=new l$12;w$3.prototype.updateAndExecuteCommands=function(e,t,i){this._renderPipeline.updateAndExecuteCommands(e,t)};var Si=/(\.hdr$)/i;function G$3(e){var t=e._frameState,i=e._view,n=e._environmentState,r=t.passes.render,o=t.passes.offscreen,a=e.skyAtmosphere,s=e.globe;const l=e._globeTranslucencyState;if(!r||e._mode!==C$13.SCENE2D&&i.camera.frustum instanceof a$V||!l.environmentVisible)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{e$2b(a)&&e$2b(s)&&(a.setDynamicAtmosphereColor(s.enableLighting),n.isReadyForAtmosphere=n.isReadyForAtmosphere||s._surface._tilesToRender.length>0),n.skyAtmosphereCommand=e$2b(a)?a.update(t):void 0,n.skyBoxCommand=e$2b(e.skyBox)?e.skyBox.update(t,e._hdr):void 0;var u=e$2b(e.sun)?e.sun.update(t,i.passState,e._hdr):void 0;n.sunDrawCommand=e$2b(u)?u.drawCommand:void 0,n.sunComputeCommand=e$2b(u)?u.computeCommand:void 0,n.moonCommand=e$2b(e.moon)?e.moon.update(t):void 0,e$2b(e.cloudBox)&&e.cloudBox.update(t)}var c=n.clearGlobeDepth=e$2b(s)&&(!s.depthTestAgainstTerrain||e.mode===C$13.SCENE2D);(n.useDepthPlane=c&&e.mode===C$13.SCENE3D&&l.useDepthPlane)&&e._depthPlane.update(t),n.renderTranslucentDepthForPick=!1,n.useWebVR=e._useWebVR&&e.mode!==C$13.SCENE2D&&!o;for(var h=t.mode!==C$13.SCENE3D||l.sunVisibleThroughGlobe?void 0:t.occluder,d=t.cullingVolume,f=Vt.planes,p=0;p<5;++p)f[p]=d.planes[p];d=Vt,n.isSkyAtmosphereVisible=e$2b(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=e.isVisible(n.sunDrawCommand,d,h),n.isMoonVisible=e.isVisible(n.moonCommand,d,h);var _=e.specularEnvironmentMaps,m=e._specularEnvironmentMapAtlas;e$2b(_)?Si.test(_)?e$2b(e._pmremGenerator)||(e._pmremGenerator=new v$9(_)):(!e$2b(m)||m.url!==_)&&(m=m&&m.destroy(),e._specularEnvironmentMapAtlas=new u$B(_)):e$2b(m)?(m.destroy(),e._specularEnvironmentMapAtlas=void 0):e$2b(e._pmremGenerator)&&(e._pmremGenerator=e._pmremGenerator.destroy()),e$2b(e._specularEnvironmentMapAtlas)&&e._specularEnvironmentMapAtlas.update(t),e$2b(e._pmremGenerator)&&e._pmremGenerator.update(t)}function Tt$1(e){for(var t=e._frameState.afterRender,i=0,n=t.length;i<n;++i)t[i](),e.requestRender();t.length=0}function Pi(e){const t=e._globe,i=e.camera.positionCartographic;if(e$2b(t)&&t.show&&e$2b(i))return t.getHeight(i)}function Di(e){const t=e.camera,i=e._mode,n=e.globe;e._screenSpaceCameraController;const r=t.positionCartographic;if(!e$2b(r))return!1;if(r.height<0)return!0;if(!e$2b(n)||!n.show||i===C$13.SCENE2D||i===C$13.MORPHING)return!1;const o=e._globeHeight;return e$2b(o)&&r.height<o}function xi(e,t){if(e.debugShowFramesPerSecond){if(!e$2b(e._performanceDisplay)){var i=document.createElement("div");i.className="supermap3d-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(i);var n=new o$c({container:i});e._performanceDisplay=n,e._performanceContainer=i}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.trangleCount=e.context._trangleCount,e._performanceDisplay.update(t)}else e$2b(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function ki(e){e._jobScheduler.resetBudgets();var t=e._frameState;e.primitives.prePassesUpdate(t),e$2b(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function Vi(e){var t=e._frameState;e.primitives.postPassesUpdate(t),r$1a.update()}function Ti(e){var t=e._frameState;e$2b(e.globe)&&e.globe.update(t),t.creditDisplay.update()}w$3.prototype.updateEnvironment=function(){return G$3(this)},w$3.prototype.resolveFramebuffers=function(e){this._renderPipeline.resolveFramebuffers(e)},w$3.prototype.initializeFrame=function(){1e4==this._shaderFrameCount++&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeight=Pi(this),this._cameraUnderground=Di(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),e$2b(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};var Ei=new e$1U,Et=0,rt$3=0;const Fi=50,Ft=100;function Ri(){var e=performance.now(),t=!1;return e-Et<Fi?++rt$3>Ft&&(t=!0):rt$3=0,Et=e,t}var Rt=!1,it$1=0;function Li(){return Rt?it$1++:it$1=0,it$1>Ft}function Bi(e){e._pickPositionCacheDirty=!0;var t=e.context,i=t.uniformState,n=e._frameState,r=e._defaultView;e._view=r,W$6(e),n.passes.render=!0,n.passes.postProcess=e.postProcessStages.hasSelected,n.tilesetPassState=gi;var o=u$_(e.backgroundColor,e$1U.BLACK);e._hdr&&((o=e$1U.clone(o,Ei)).red=Math.pow(o.red,e.gamma),o.green=Math.pow(o.green,e.gamma),o.blue=Math.pow(o.blue,e.gamma)),n.backgroundColor=o,n.creditDisplay.beginFrame(),e.fog.update(n),i.update(n);var a=e.shadowMap;e$2b(a)&&a.enabled&&(o$1p.negate(i.sunDirectionWC,e._sunCamera.direction),n.shadowMaps.push(a),e$2b(e._analysisShadowMap)&&n.shadowMaps.push(e._analysisShadowMap)),e._computeCommandList.length=0,e._logDepthOverlayCommandList.length=0,e._overlayCommandList.length=0,e._overlayAgainstDepthCommandList.length=0;var s=r.viewport;s.x=0,s.y=0,s.width=t.drawingBufferWidth,s.height=t.drawingBufferHeight;var l=r.passState;if(l.framebuffer=void 0,l.blendingEnabled=void 0,l.scissorTest=void 0,l.viewport=f$18.clone(s,l.viewport),e$2b(e.globe)&&e.globe.beginFrame(n),e$2b(e.terrainProvider)){var u=e.terrainProvider;e$2b(u._minHeight)&&e$2b(u._maxHeight)&&(n.minTerrainHeight=u._minHeight,n.maxTerrainHeight=u._maxHeight)}na(e),sa(e),ua(e),fa(e),st$1(e),ma(e),ut$3(e),G$3(e);var c=e._layers;n=e._frameState;c.render(t,n),e._plotLayers.render(n,t),e._renderPipeline.updateAndExecuteCommands(l,o),e._renderPipeline.resolveFramebuffers(l),l.framebuffer=void 0,e._renderPipeline.executeOverlayCommands(l),jt(e),e.layers.endFrame(n),e$2b(e.globe)&&(e.globe.endFrame(n),e.globe.tilesLoaded||(e._renderRequested=!0),e.camera._computeSensitivePosition()),Mi(e,n),e._lightSource.resetChange(),n.creditDisplay.endFrame(),t.endFrame(),(!e._saveLocalCachePerformance||Ri()&&Li())&&(e.layers.saveLocalCache(),e.imageryLayers.saveLocalCache(),e.terrainProvider instanceof ne$x&&e.terrainProvider.saveLocalCache())}function Mi(e,t){for(var i=e.layers._layerQueue.length,n=0;n<i;n++){var r=e.layers._layerQueue[n];e$2b(r._imageryLayer)&&e$2b(r._layerScheduler)&&r._layerScheduler.loadImagery(r,t)}}function re$2(e,t){try{t(e)}catch(t){if(e._renderError.raiseEvent(e,t),e.rethrowRenderErrors)throw t}}function Oi(e){return e._picking.updateMostDetailedRayPicks(e)}function Ni(e){var t=e._frameState;Je.camera=t.camera,Je.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,Je)}function Ii(e){e.primitives.updateForPass(e._frameState,wi)}w$3.prototype.render=function(e){if(this.terrainLayers._layers.length>0&&e$2b(this._globe)){var t=this.terrainLayers._layers.length-1;this._globe._terrainProvider=this._globe._terrainLayerCollection._layers[t]._terrainProvider}if(e$2b(this._globe._terrainProvider._visible)&&this._globe._surface._visible!==this._globe._terrainProvider._visible){var i=this._globe._terrainProvider._visible;this._globe._surface.showInvalid(!i),this._globe._surface._visible=i}e$2b(e)||(e=a$15.now());var n=this._frameState;n.newFrame=!1,this._jobScheduler.resetBudgets();var r=this._view.checkForCameraUpdates(this),o=!this.requestRenderMode||this._renderRequested||r||this._logDepthBufferDirty||this._hdrDirty||this.mode===C$13.MORPHING;if(!o&&e$2b(this.maximumRenderTimeChange)&&e$2b(this._lastRenderTime)){var a=Math.abs(a$15.secondsDifference(this._lastRenderTime,e));o=o||a>this.maximumRenderTimeChange}o&&(this._lastRenderTime=a$15.clone(e,this._lastRenderTime),this._renderRequested=!1,kt(this,e$2a.incrementWrap(n.frameNumber,15e6,1),e),n.newFrame=!0,this.mode===C$13.SCENE3D&&(this._silverLightingAtmosphere.update(n,this.mode),this._lightSource._enableAmbientLightColor||e$1U.clone(this._silverLightingAtmosphere.getAmbientColor(),this._lightSource._ambientLightColor),this._lightSource._enableSunLightColor||e$1U.clone(this._silverLightingAtmosphere.getSunColor(),this._lightSource._sunLightColor)));this._preUpdate.raiseEvent(this,e),re$2(this,Ti),re$2(this,ki),this.primitives.show&&(re$2(this,Oi),re$2(this,Ni),re$2(this,Zi),o||re$2(this,Ii)),this._postUpdate.raiseEvent(this,e),o&&(this._preRender.raiseEvent(this,e),re$2(this,Bi)),xi(this,o),re$2(this,Vi),Rt=0==r$1a.activeRequestLength,Tt$1(this),o&&this._postRender.raiseEvent(this,e),this._logDepthBufferDirty=!1,this._hdrDirty=!1},w$3.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)},w$3.prototype.requestRender=function(){this._renderRequested=!0},w$3.prototype.clampLineWidth=function(e){return Math.max(e$1T.minimumAliasedLineWidth,Math.min(e,e$1T.maximumAliasedLineWidth))};var Hi=new l$12,Ai=new o$1p,Be$1=new o$1p,Wi=new o$1o,Gi=new p$1d;function Ui(e,t,i,n,r){var o=e.camera,a=o.frustum;e$2b(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2*(t.x-r.x)/r.width-1;s*=.5*(a.right-a.left);var l=2*(r.height-t.y-r.y)/r.height-1;l*=.5*(a.top-a.bottom);var u=p$1d.clone(o.transform,Gi);o._setTransform(p$1d.IDENTITY);var c=o$1p.clone(o.position,Ai);o$1p.multiplyByScalar(o.right,s,Be$1),o$1p.add(Be$1,c,c),o$1p.multiplyByScalar(o.up,l,Be$1),o$1p.add(Be$1,c,c),o._setTransform(u),e.mode===C$13.SCENE2D&&o$1p.fromElements(c.z,c.x,c.y,c);var h=a.getPixelDimensions(r.width,r.height,1,1,Wi),d=Hi;return d.right=.5*h.x,d.left=-d.right,d.top=.5*h.y,d.bottom=-d.top,d.near=a.near,d.far=a.far,d.computeCullingVolume(c,o.directionWC,o.upWC)}var qi=new l$11,zi=new o$1o;function Qi(e,t,i,n,r){var o=e.camera,a=o.frustum,s=a.near,l=Math.tan(.5*a.fovy),u=a.aspectRatio*l,c=(2*(t.x-r.x)/r.width-1)*s*u,h=(2*(r.height-t.y-r.y)/r.height-1)*s*l,d=a.getPixelDimensions(r.width,r.height,1,1,zi),f=d.x*i*.5,p=d.y*n*.5,_=qi;return _.top=h+p,_.bottom=h-p,_.right=c+f,_.left=c-f,_.near=s,_.far=a.far,_.computeCullingVolume(o.positionWC,o.directionWC,o.upWC)}function pe$1(e,t,i,n,r){var o=e.camera.frustum;return o instanceof a$V||o instanceof l$12?Ui(e,t,i,n,r):Qi(e,t,i,n,r)}var N$2=3,I$3=3,F$3=new f$18(0,0,N$2,I$3),ie$1=new e$1U(0,0,0,0),ce$3=new o$1o,ve$1=new o$1p;function Lt(e,t,i,n,r){N$2=u$_(i,e._pickTolerance),I$3=u$_(n,N$2);var o=e._context,a=o.uniformState,s=e._frameState,l=e._defaultView;e._view=l;var u=l.viewport;u.x=0,u.y=0,u.width=o.drawingBufferWidth,u.height=o.drawingBufferHeight;var c=l.passState;c.viewport=f$18.clone(u,c.viewport);var h=s$Q.transformWindowToDrawingBuffer(e,t,ce$3);if(e._multiViewportMode!==B$e.NONE){var d=le$2(e,h);if(h.y=o.drawingBufferHeight-h.y,d>-1){s.multiViewportIndex=d;var f=e._multiViewportInfo[d];x$6.x=o.drawingBufferWidth*f.x,x$6.y=o.drawingBufferHeight*f.y,x$6.width=o.drawingBufferWidth*f.width,x$6.height=o.drawingBufferHeight*f.height;var p=(h.x-x$6.x)/x$6.width,_=(h.y-x$6.y)/x$6.height;h.x=p*o.drawingBufferWidth,h.y=(1-_)*o.drawingBufferHeight}}for(var m=l.frustumCommandsList.length,g=[],x=0;x<m;++x){var v=e._picking.getPickDepth(e,x).getDepthPromise(o,h.x,h.y);g.push(v)}Promise.all(g).then((t=>{for(var i=0;i<t.length;i++){var n=t[i];n>0&&n<1&&(ve$1=s$Q.drawingBufferToWgs84Coordinates(e,h,n,ve$1))}o._pickPosition[0]=ve$1.x,o._pickPosition[1]=ve$1.y,o._pickPosition[2]=ve$1.z;var r=a$18.fromCartesian(ve$1);e$2b(r)&&(o._pickPositionHeight=r.height)})),e._jobScheduler.disableThisFrame(),W$6(e),s.cullingVolume=pe$1(e,h,N$2,I$3,u),s.invertClassification=!1,s.passes.pick=!0,s.tilesetPassState=$e,a.update(s),G$3(e);var y=!1,$=e.particlePostRender,b=e.particleTrailsPostRenderer;($.enable||b.enable)&&(y=!0),F$3.x=e$2a.clamp(h.x-.5*(N$2-1),0,e.drawingBufferWidth-N$2),F$3.y=e$2a.clamp(e.drawingBufferHeight-h.y-.5*(I$3-1),0,e.drawingBufferHeight-I$3),F$3.width=N$2,F$3.height=I$3,c=l.pickFramebuffer.begin(F$3,l.viewport,y),e._renderPipeline.updateAndExecuteCommands(c,ie$1),e._renderPipeline.executeOverlayCommands(c),e._renderPipeline.resolveFramebuffers(c)}function Bt$1(e,t,i){for(var n=0,r=e._primitives.length;n<r;n++){var o=e._primitives._primitives[n];o.type==bt$5.INSTANCED_LAYER&&o.setUnSelected()}var a=e._analyst3D.layerQueue;for(n=0,r=a.length;n<r;n++){var s=a[n];s instanceof r$d&&s.releaseSelection()}if(e$2b(t)&&e$2b(t.primitive)&&(t.primitive.type===bt$5.INSTANCED_OBJECT||t.primitive instanceof r$d)&&t.primitive.setSelected(t.id),e$2b(t)&&e$2b(t.primitive)&&t.primitive instanceof _0x30a010){var l=t.id.split("_");2==l.length&&t.primitive.setPolygonOffset(l[1])}else{var u=e$2b(t)&&e$2b(t.primitive)&&t.primitive instanceof _0x22e933;u?(e._layers._setSelection(t),e$2b(t.primitive)&&!1===t.primitive.selectEnabled&&(t=void 0)):e._layers.releaseSelection()}var c={isS3MTilesLayerSel:!1,pickedObject:void 0};return e$2b(t)||(c=e.pickRasterData(i)),!u&&c.isS3MTilesLayerSel?(e._frameState.commandListRealtimeRaster.length=0,c.pickedObject):(e$2b(t)&&e$2b(t.collection)&&(e$2b(t.collection._isS3MTileLabels)&&t.collection._isS3MTileLabels||t.collection._isMVT)&&e$2b(t.collection.setSelection)&&t.collection.setSelection(t.id),e._pickResult.pickFrameNumber=e._frameState.frameNumber,e._pickResult.pickObject=t,e._pickResult.pickObject)}w$3.prototype.pick=function(e,t,i,n){if(!e$2b(e))throw new t$16("windowPosition is undefined.");if(!this.requestRenderMode&&Math.abs(this._frameState.frameNumber-this._pickResult.pickFrameNumber)<5&&!e$2b(n))return this._pickResult.pickObject;var r=this._defaultView,o=this._context;Lt(this,e,t,i);var a=r.pickFramebuffer.end(F$3);return o.endFrame(),Bt$1(this,a,e),a},w$3.prototype.pickAsync=function(e,t,i,n){if(!e$2b(e))throw new t$16("windowPosition is undefined.");if(!this.requestRenderMode&&Math.abs(this._frameState.frameNumber-this._pickResult.pickFrameNumber)<5&&!e$2b(n))return Promise.resolve(this._pickResult.pickObject);var r=this._defaultView;this._context,Lt(this,e,t,i);var o=this;return r.pickFramebuffer.endAsync(F$3).then((t=>(t=Bt$1(o,t,e),Promise.resolve(t))))};var ae$2=new h$18,Mt=new o$1p,Ot=new o$1p,Nt=new o$1p,Me$1=new o$1p,Ki=new o$1p(0,0,-1),ji=new o$1p(0,1,0),Yi=new f$18(0,0,1,1),K$1=new o$1o;function at$3(e,t){var i=e._context,n=e._frameState,r=e._environmentState,o=e.globe.depthTestAgainstTerrain;e.globe.depthTestAgainstTerrain=!0;var a=e._defaultView;e._view=a;var s=a.viewport;s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;var l=a.passState;l.viewport=f$18.clone(s,l.viewport),tt$1(n.passes),n.passes.pick=!0,n.passes.depth=!0,n.cullingVolume=pe$1(e,t,1,1,s),G$3(e),r.renderTranslucentDepthForPick=!0,l=a.pickDepthFramebuffer.update(i,t,s),e._renderPipeline.updateAndExecuteCommands(l,ie$1),e._renderPipeline.resolveFramebuffers(l),e.globe.depthTestAgainstTerrain=o,i.endFrame()}function le$2(e,t){if(e._mode===C$13.SCENE2D||e._multiViewportMode==B$e.NONE)return-1;for(var i=e._context,n=new f$18(t.x,i.drawingBufferHeight-t.y),r=new f$18,o=-1,a=0;a<e._multiViewportInfo.length;a++){var s=e._multiViewportInfo[a];if(r.x=i.drawingBufferWidth*s.x,r.y=i.drawingBufferHeight*s.y,r.width=i.drawingBufferWidth*s.width,r.height=i.drawingBufferHeight*s.height,r.intersect(n)===Ae$u.INTERSECTING){o=a;break}}return o}w$3.prototype.pickRasterData=function(e,t,i){if(!e$2b(e))throw new t$16("windowPosition is undefined.");var n=this._frameState,r=n.commandListRealtimeRaster;if(0===r.length)return{isS3MTilesLayerSel:!1,pickedObject:void 0};var o=this.pickPosition(e),a=a$18.fromCartesian(o),s=e$2a.toDegrees(a.longitude),l=e$2a.toDegrees(a.latitude);K$1.x=e.x,K$1.y=e.y+1;var u=this.pickPosition(K$1),c=a$18.fromCartesian(u),h=e$2a.toDegrees(c.latitude);K$1.x=e.x,K$1.y=e.y-1,u=this.pickPosition(K$1),c=a$18.fromCartesian(u);var d=e$2a.toDegrees(c.latitude);K$1.x=e.x-1,K$1.y=e.y,u=this.pickPosition(K$1),c=a$18.fromCartesian(u);var f=e$2a.toDegrees(c.longitude);K$1.x=e.x+1,K$1.y=e.y,u=this.pickPosition(K$1),c=a$18.fromCartesian(u);for(var p=e$2a.toDegrees(c.longitude),_=Math.abs(p-f),m=Math.abs(d-h),g=[],x=0;x<r.length;x++)ae$2.west=r[x]._boundingVolume.center.x-r[x]._boundingVolume.radius,ae$2.south=r[x]._boundingVolume.center.y-r[x]._boundingVolume.radius,ae$2.east=r[x]._boundingVolume.center.x+r[x]._boundingVolume.radius,ae$2.north=r[x]._boundingVolume.center.y+r[x]._boundingVolume.radius,s<ae$2.east&&s>ae$2.west&&l<ae$2.north&&l>ae$2.south&&g.push(r[x]);if(0===g.length)return{isS3MTilesLayerSel:!1,pickedObject:void 0};e$2b(this._rasterPickTexture)||(this._rasterPickTexture=new t$V({context:n.context,width:1,height:1,pixelFormat:V$10.RGBA,sampler:new e$1P({wrapS:q$19.CLAMP_TO_EDGE,wrapT:q$19.CLAMP_TO_EDGE,minificationFilter:tt$h.LINEAR,magnificationFilter:rt$i.LINEAR})}),this._rasterPickFBO=new t$W({context:n.context,colorTextures:[this._rasterPickTexture],destroyAttachments:!1}));var v=this._clearColorCommand.framebuffer;this._clearColorCommand.framebuffer=this._rasterPickFBO,this._clearColorCommand.execute(n.context);var y=n.camera;o$1p.clone(y.position,Mt),o$1p.clone(y.direction,Ot),o$1p.clone(y.up,Nt);var $=s-_,b=s+_,T=l+m,C=l-m;Me$1.x=.5*($+b),Me$1.y=.5*(T+C),Me$1.z=5,y.setView({destination:Me$1,orientation:{direction:Ki,up:ji},convert:!1});var S=new a$V({width:b-$,aspectRatio:1,near:1,far:10});n.context.uniformState.update(n),n.context.uniformState.updateFrustum(S);for(x=0;x<g.length;x++){g[x].renderState=d$1m.fromCache({viewport:Yi}),g[x].framebuffer=this._rasterPickFBO;var w=g[x].derivedCommands;w.picking=l$i.createPickDerivedCommand(this,g[x],n.context,w.picking),g[x].derivedCommands.picking.pickCommand.execute(n.context)}y.setView({destination:Mt,orientation:{direction:Ot,up:Nt},convert:!1}),n.context.uniformState.update(n),n.context.uniformState.updateFrustum(y.frustum);var E=n.context.readPixels({x:0,y:0,width:1,height:1,framebuffer:this._rasterPickFBO});n.context.pixels=E;var P=e$1U.byteToRgba(E[0],E[1],E[2],E[3]),A=n.context.getObjectByPickId(P),L=e$2b(A)&&e$2b(A.primitive)&&A.primitive instanceof _0x22e933;return L?this._layers._setSelection(A):this._layers.releaseSelection(),this._clearColorCommand.execute(n.context),this._clearColorCommand.framebuffer=v,{isS3MTilesLayerSel:L,pickedObject:A}},w$3.prototype.pickRasterData2D=function(e,t,i){var n=this.pickPosition(e),r=a$18.fromCartesian(n),o=this._frameState.rasterVectorCollection,a=o.getPickID(r);o.setSelection(a)},w$3.prototype.pointPick=function(e){if(!e$2b(e))throw new t$16("windowPosition is undefined.");var t=this._pickPointTolerance,i=t;N$2=u$_(t,3),I$3=u$_(i,N$2);var n=this._context,r=n.uniformState,o=this._frameState,a=this._defaultView;this._view=a;var s=a.viewport;s.x=0,s.y=0,s.width=n.drawingBufferWidth,s.height=n.drawingBufferHeight;var l=a.passState;l.viewport=f$18.clone(s,l.viewport);var u=s$Q.transformWindowToDrawingBuffer(this,e,m);if(this._multiViewportMode!==B$e.NONE){var c=le$2(this,u);if(u.y=n.drawingBufferHeight-u.y,c>-1){o.multiViewportIndex=c;var h=this._multiViewportInfo[c];x$6.x=n.drawingBufferWidth*h.x,x$6.y=n.drawingBufferHeight*h.y,x$6.width=n.drawingBufferWidth*h.width,x$6.height=n.drawingBufferHeight*h.height;var d=(u.x-x$6.x)/x$6.width,f=(u.y-x$6.y)/x$6.height;u.x=d*n.drawingBufferWidth,u.y=f*n.drawingBufferHeight,u.y=n.drawingBufferHeight-H$3.y}}this._jobScheduler.disableThisFrame(),W$6(this),o.cullingVolume=pe$1(this,u,N$2,I$3,s),o.invertClassification=!1,o.passes.pick=!0;var p=this._environmentVisible;this._environmentVisible=a.pickPointFramebuffer._environmentVisible,r.update(o),G$3(this),F$3.x=u.x-.5*(N$2-1),F$3.y=this.drawingBufferHeight-u.y-.5*(I$3-1),F$3.width=N$2,F$3.height=I$3,l=a.pickPointFramebuffer.begin(F$3,a.viewport),this._renderPipeline.updateAndExecuteCommands(l,ie$1),this._renderPipeline.resolveFramebuffers(l);var _=a.pickPointFramebuffer.end(F$3);if(n.endFrame(),this._environmentVisible=p,e$2b(_))if(_.z>-e$2a.EPSILON10)this._pos=void 0;else{var m=new e$29,g=o$1p.magnitude(_);p$1d.multiplyByVector(o.camera.inverseViewMatrix,_,m);var x=s$Q.wgs84ToWindowCoordinates(this,m,new o$1o),v=this.pickPosition(x,new o$1p);if(e$2b(v)&&!(g>o$1p.distance(v,o.camera.position)+5))return this._pos=new e$29,e$29.clone(m,this._pos),this._pos;this._pos=void 0}else this._pos=void 0},w$3.prototype.pickNormal=function(e){if(!e$2b(e))throw new t$16("windowPosition is undefined.");N$2=1,I$3=1;var t=this._context,i=t.uniformState,n=this._frameState,r=this._defaultView;this._view=r;var o=r.viewport;o.x=0,o.y=0,o.width=t.drawingBufferWidth,o.height=t.drawingBufferHeight;var a=r.passState;a.viewport=f$18.clone(o,a.viewport);var s=s$Q.transformWindowToDrawingBuffer(this,e,ce$3);if(this._multiViewportMode!==B$e.NONE){var l=le$2(this,s);if(s.y=t.drawingBufferHeight-s.y,l>-1){n.multiViewportIndex=l;var u=this._multiViewportInfo[l];x$6.x=t.drawingBufferWidth*u.x,x$6.y=t.drawingBufferHeight*u.y,x$6.width=t.drawingBufferWidth*u.width,x$6.height=t.drawingBufferHeight*u.height;var c=(s.x-x$6.x)/x$6.width,h=(s.y-x$6.y)/x$6.height;s.x=c*t.drawingBufferWidth,s.y=h*t.drawingBufferHeight,s.y=t.drawingBufferHeight-H$3.y}}this._jobScheduler.disableThisFrame(),W$6(this),n.cullingVolume=pe$1(this,s,N$2,I$3,o),n.invertClassification=!1,n.passes.pick=!0,n.passes.normal=!0;var d=this._environmentVisible;this._environmentVisible=r.normalFramebuffer._environmentVisible,i.update(n),G$3(this),F$3.x=s.x-.5*(N$2-1),F$3.y=this.drawingBufferHeight-s.y-.5*(I$3-1),F$3.width=N$2,F$3.height=I$3,a=r.normalFramebuffer.begin(F$3,r.viewport),this._renderPipeline.updateAndExecuteCommands(a,ie$1),this._renderPipeline.resolveFramebuffers(a);var f=r.normalFramebuffer.end(F$3);if(t.endFrame(),n.passes.pick=!1,n.passes.normal=!1,this._environmentVisible=d,e$2b(f))return f},w$3.prototype.pickNormalAsync=function(e){if(!e$2b(e))throw new t$16("windowPosition is undefined.");N$2=1,I$3=1;var t=this._context,i=t.uniformState,n=this._frameState,r=this._defaultView;this._view=r;var o=r.viewport;o.x=0,o.y=0,o.width=t.drawingBufferWidth,o.height=t.drawingBufferHeight;var a=r.passState;a.viewport=f$18.clone(o,a.viewport);var s=s$Q.transformWindowToDrawingBuffer(this,e,ce$3);if(this._multiViewportMode!==B$e.NONE){var l=le$2(this,s);if(s.y=t.drawingBufferHeight-s.y,l>-1){n.multiViewportIndex=l;var u=this._multiViewportInfo[l];x$6.x=t.drawingBufferWidth*u.x,x$6.y=t.drawingBufferHeight*u.y,x$6.width=t.drawingBufferWidth*u.width,x$6.height=t.drawingBufferHeight*u.height;var c=(s.x-x$6.x)/x$6.width,h=(s.y-x$6.y)/x$6.height;s.x=c*t.drawingBufferWidth,s.y=h*t.drawingBufferHeight,s.y=t.drawingBufferHeight-H$3.y}}this._jobScheduler.disableThisFrame(),W$6(this),n.cullingVolume=pe$1(this,s,N$2,I$3,o),n.invertClassification=!1,n.passes.pick=!0,n.passes.normal=!0;var d=this._environmentVisible;return this._environmentVisible=r.normalFramebuffer._environmentVisible,i.update(n),G$3(this),F$3.x=s.x-.5*(N$2-1),F$3.y=this.drawingBufferHeight-s.y-.5*(I$3-1),F$3.width=N$2,F$3.height=I$3,a=r.normalFramebuffer.begin(F$3,r.viewport),this._renderPipeline.updateAndExecuteCommands(a,ie$1),this._renderPipeline.resolveFramebuffers(a),r.normalFramebuffer.endAsync(F$3).then((e=>(t.endFrame(),n.passes.pick=!1,n.passes.normal=!1,this._environmentVisible=d,e$2b(e)?Promise.resolve(e):Promise.resolve(void 0))))};var x$6=new f$18,H$3=new o$1o,_e=new o$1o;function It$1(e,t,i,n){var r=e._multiViewportInfo[n];x$6.x=i.drawingBufferWidth*r.x,x$6.y=i.drawingBufferHeight*r.y,x$6.width=i.drawingBufferWidth*r.width,x$6.height=i.drawingBufferHeight*r.height;var o=(H$3.x-x$6.x)/x$6.width,a=(H$3.y-x$6.y)/x$6.height;H$3.x=o*i.drawingBufferWidth,H$3.y=a*i.drawingBufferHeight,_e.x=H$3.x,_e.y=i.drawingBufferHeight-H$3.y}w$3.prototype.pickPositionWorldCoordinates=function(e,t,i){if(this.useDepthPicking){if(!e$2b(e))throw new t$16("windowPosition is undefined.");var n=e.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n))return o$1p.clone(this._pickPositionCache[n],t);var r=this._frameState,o=this._context,a=o.uniformState,s=this._defaultView;this._view=s;var l=s$Q.transformWindowToDrawingBuffer(this,e,ce$3);if(o$1o.clone(l,_e),this.pickTranslucentDepth){if(this._multiViewportMode!==B$e.NONE){var u=le$2(this,l);o$1o.clone(l,H$3),H$3.y=o.drawingBufferHeight-H$3.y,u>-1&&(r.multiViewportIndex=u,It$1(this,r,o,u),W$6(this,r.frameNumber,r.time),r.tilesetPassState=$e)}at$3(this,_e)}else W$6(this,r.frameNumber,r.time),a.update(r),G$3(this);this._multiViewportMode!==B$e.NONE?l=H$3:l.y=this.drawingBufferHeight-l.y;var c,h=this.camera;c=e$2b(h.frustum.fov)?h.frustum.clone(Ee$1):e$2b(h.frustum.infiniteProjectionMatrix)?h.frustum.clone(Fe$1):e$2b(h.frustum.width)?h.frustum.clone(Re$1):h.frustum.clone(Le$1);for(var d=s.frustumCommandsList,f=d.length,p=0;p<f;++p){var _=this._picking.getPickDepth(this,p).getDepth(o,l.x,l.y,e$2b(i)&&i?this._pickDepthTolerance:0);if(_>0&&_<1){var m,g=d[p];return this.mode===C$13.SCENE2D?(m=h.position.z,h.position.z=m-g.near+1,c.far=Math.max(1,g.far-g.near),c.near=1,a.update(r),a.updateFrustum(c)):(c.near=g.near*(0!==p?this.opaqueFrustumNearOffset:1),c.far=g.far,a.updateFrustum(c)),t=s$Q.drawingBufferToWgs84Coordinates(this,l,_,t),this.mode===C$13.SCENE2D&&(h.position.z=m,a.update(r)),this._pickPositionCache[n]=o$1p.clone(t),t}}this._pickPositionCache[n]=void 0}},w$3.prototype.pickPositionWorldCoordinatesAsync=function(e,t,i){if(!this.useDepthPicking)return Promise.resolve(void 0);if(!e$2b(e))throw new t$16("windowPosition is undefined.");var n=e.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n)){var r=o$1p.clone(this._pickPositionCache[n],t);return Promise.resolve(r)}var o=this._frameState,a=this._context,s=a.uniformState,l=this._defaultView;this._view=l;var u=s$Q.transformWindowToDrawingBuffer(this,e,ce$3);if(o$1o.clone(u,_e),this.pickTranslucentDepth){if(this._multiViewportMode!==B$e.NONE){var c=le$2(this,u);o$1o.clone(u,H$3),H$3.y=a.drawingBufferHeight-H$3.y,c>-1&&(o.multiViewportIndex=c,It$1(this,o,a,c),W$6(this,o.frameNumber,o.time))}at$3(this,_e)}else W$6(this,o.frameNumber,o.time),s.update(o),G$3(this);this._multiViewportMode!==B$e.NONE?u=H$3:u.y=this.drawingBufferHeight-u.y;var h,d=this.camera;h=e$2b(d.frustum.fov)?d.frustum.clone(Ee$1):e$2b(d.frustum.infiniteProjectionMatrix)?d.frustum.clone(Fe$1):e$2b(d.frustum.width)?d.frustum.clone(Re$1):d.frustum.clone(Le$1);for(var f=l.frustumCommandsList,p=f.length,_=[],m=0;m<p;++m){var g=this._picking.getPickDepth(this,m).getDepthPromise(a,u.x,u.y,e$2b(i)&&i?this._pickDepthTolerance:0);_.push(g)}var x=this;return Promise.all(_).then((e=>{for(var i=0;i<e.length;i++){var r=e[i];if(!(r<=0||r>=1)){var a,l=f[i];return x.mode===C$13.SCENE2D?(a=d.position.z,d.position.z=a-l.near+1,h.far=Math.max(1,l.far-l.near),h.near=1,s.update(o),s.updateFrustum(h)):(h.near=l.near*(0!==i?x.opaqueFrustumNearOffset:1),h.far=l.far,s.updateFrustum(h)),t=s$Q.drawingBufferToWgs84Coordinates(x,u,r,t),x.mode===C$13.SCENE2D&&(d.position.z=a,s.update(o)),x._pickPositionCache[n]=o$1p.clone(t),Promise.resolve(t)}}return x._pickPositionCache[n]=void 0,Promise.resolve(void 0)}))};var Ht=new a$18;function At(e,t){var i,n,r=[],o=[],a=[],s=[],l=Object.create(null);e$2b(e)||(e=Number.MAX_VALUE);for(var u=t();e$2b(u);){var c=u.object,h=u.position,d=u.exclude;if(e$2b(h)&&!e$2b(c)){r.push(u);break}if(!e$2b(c)||!e$2b(c.primitive)||!d&&(r.push(u),0>=--e))break;var f=c.primitive,p=!1;if("function"==typeof f.getGeometryInstanceAttributes&&e$2b(c.id)&&(e$2b(n=f.getGeometryInstanceAttributes(c.id))&&e$2b(n.show)&&(p=!0,n.show=e$1F.toValue(!1,n.show),a.push(n))),c instanceof e$L&&(p=!0,c.show=!1,s.push(c)),f instanceof _0x22e933){p=!0,f.setOnlyObjsVisible([c.id],!1);var _=f.id;(l[_]=l[_]||{}).layer=f,(l[_].ids=l[_].ids||[]).push(c.id)}p||(f.show=!1,o.push(f)),u=t()}for(i=0;i<o.length;++i)o[i].show=!0,o[i]instanceof _0x331f36&&o[i].setSelected();for(var m in l){var g=l[m];g.layer.setOnlyObjsVisible(g.ids,!0)}for(i=0;i<a.length;++i)(n=a[i]).show=e$1F.toValue(!0,n.show);for(i=0;i<s.length;++i)s[i].show=!0;return r}function Zi(e){var t=e._frameState;t.camera.canPreloadFlight()&&(Xe.camera=e.preloadFlightCamera,Xe.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,Xe))}w$3.prototype.pickPosition=function(e,t){if(e$2b(t=this.pickPositionWorldCoordinates(e,t))&&this.mode!==C$13.SCENE3D){o$1p.fromElements(t.y,t.z,t.x,t);var i=this.mapProjection,n=i.ellipsoid,r=i.unproject(t,Ht);n.cartographicToCartesian(r,t)}return t},w$3.prototype.pickPositionAsync=function(e,t){var i=this;return this.pickPositionWorldCoordinatesAsync(e,t).then((e=>{if(e$2b(t=e)&&i.mode!==C$13.SCENE3D){o$1p.fromElements(t.y,t.z,t.x,t);var n=i.mapProjection,r=n.ellipsoid,o=n.unproject(t,Ht);r.cartographicToCartesian(o,t)}return Promise.resolve(t)}))},w$3.prototype.pickPosition2D=function(e,t){if(e$2b(t=this.pickPositionWorldCoordinates(e,t)))return e$2b(t)&&this.mode!==C$13.SCENE3D&&o$1p.fromElements(t.y,t.z,t.x,t),t.x+=o$1p.globalOffset.x,t.y+=o$1p.globalOffset.y,t.z+=o$1p.globalOffset.z,t},w$3.prototype.pickPosition2DAsync=function(e,t){var i=this;return this.pickPositionWorldCoordinatesAsync(e,t).then((e=>{if(e$2b(t=e))return e$2b(t)&&i.mode!==C$13.SCENE3D&&o$1p.fromElements(t.y,t.z,t.x,t),t.x+=o$1p.globalOffset.x,t.y+=o$1p.globalOffset.y,t.z+=o$1p.globalOffset.z,Promise.resolve(t)}))},w$3.prototype.pickTileCoordinate=function(e){function t(e,t){return h$18.contains(e.rectangle,t)?e:void 0}if(!e$2b(e))throw new t$16("windowPosition is required");var i=this.globe._surface._levelZeroTiles;if(e$2b(i)){var n,r;try{n=this.pickPosition(e,new o$1p),r=a$18.fromCartesian(n)}catch{return}for(var o=r.longitude,a=r.latitude,s=t(i[0],r)||t(i[1],r);s._lastSelectionResult===D$J.REFINED;)s=t(s.southwestChild,r)||t(s.southeastChild,r)||t(s.northwestChild,r)||s.northeastChild;var l=s.rectangle,u=(o-l.west)/l.width,c=(l.north-a)/l.height;return{x:s.x,y:s.y,level:s.level,xRatio:u,yRatio:c}}},w$3.prototype.drillPick=function(e,t,i,n){var r=this,o=At(t,(function(){var t=r.pick(e,i,n,!0);if(e$2b(t))return{object:t,position:void 0,exclude:!1}}));return o.map((function(e){return e.object}))};var Wt=new o$1p,Ji=new o$1p;function Gt(e,t,i,n){var r=t.direction,o=o$1p.mostOrthogonalAxis(r,Wt),a=o$1p.cross(r,o,Wt),s=o$1p.cross(r,a,Ji);n.position=t.origin,n.direction=r,n.up=s,n.right=a,n.frustum.width=u$_(i,e.pickOffscreenDefaultWidth)}function ot$1(e,t,i,n,r){for(var o=[],a=e.primitives,s=a.length,l=0;l<s;++l){var u=a.get(l);u instanceof p$u&&u.show&&(!e$2b(i)||-1===i.indexOf(u))&&o.push(u)}if(0===o.length)return o$1l.resolve(r());var c=new pi(t,n,o);return e._asyncRayPicks.push(c),c.promise.then((function(){return r()}))}function $i(e,t){return!(!e$2b(e)||!e$2b(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function ea(e,t,i,n,r,o,a){var s=e._context,l=s.uniformState,u=e._frameState,c=e._pickOffscreenView;e._view=c,Gt(e,t,n,c.camera),F$3=f$18.clone(c.viewport,F$3);var h=c.pickFramebuffer.begin(F$3,c.viewport);e._jobScheduler.disableThisFrame(),e$2b(e.camera.frustum.left)&&(u.cullingVolume=pe$1(e,{x:0,y:0},1,1,c.viewport)),W$6(e),u.invertClassification=!1,u.passes.pick=!0,u.passes.offscreen=!0,u.passes.asynchronous=o,c.updateFrustums=!0,u.tilesetPassState=a?yi:$e,l.update(u),G$3(e),e._renderPipeline.updateAndExecuteCommands(h,ie$1),e._renderPipeline.resolveFramebuffers(h);var d,f=c.pickFramebuffer.end(s);if(e._context.depthTexture)for(var p=c.frustumCommandsList.length,_=0;_<p;++_){var m=e._picking.getPickDepth(e,_).getDepth(s,0,0);if(m>0&&m<1){var g=c.frustumCommandsList[_],x=g.near*(0!==_?e.opaqueFrustumNearOffset:1),v=x+m*(g.far-x);d=f$17.getPoint(t,v);break}}if(e._view=e._defaultView,s.endFrame(),u.passes.pick=!1,u.passes.offscreen=!1,e$2b(f)||e$2b(d))return{object:f,position:d,exclude:!e$2b(d)&&r||$i(f,i)}}function Ut(e,t,i,n,r,o,a,s){return At(i,(function(){return ea(e,t,n,r,o,a,s)}))}function ge$2(e,t,i,n,r,o){var a=Ut(e,t,1,i,n,r,o,!1);if(a.length>0)return a[0]}function qt(e,t,i,n,r,o,a){return Ut(e,t,i,n,r,o,a,!0)}w$3.prototype.pickFromRay=function(e,t,i){if(o$1q.defined("ray",e),this._mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");return ge$2(this,e,t,i,!1,!1)},w$3.prototype.drillPickFromRay=function(e,t,i,n){if(o$1q.defined("ray",e),this._mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");return qt(this,e,t,i,n,!1,!1)},w$3.prototype.pickFromRayMostDetailed=function(e,t,i){if(o$1q.defined("ray",e),this._mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");var n=this;return e=f$17.clone(e),t=e$2b(t)?t.slice():t,ot$1(this,e,t,i,(function(){return ge$2(n,e,t,i,!1,!0)}))},w$3.prototype.drillPickFromRayMostDetailed=function(e,t,i,n){if(o$1q.defined("ray",e),this._mode!==C$13.SCENE3D)throw new t$16("Ray intersections are only supported in 3D mode.");var r=this;return e=f$17.clone(e),i=e$2b(i)?i.slice():i,ot$1(this,e,i,n,(function(){return qt(r,e,t,i,n,!1,!0)}))};var ta=new o$1p,ra=new o$1p,ia=new f$17,zt=new a$18;function nt$2(e,t){var i=e.globe,n=e$2b(i)?i.ellipsoid:e.mapProjection.ellipsoid,r=e$1E._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,ra),a=a$18.toCartesian(t,n,ta),s=ia;s.origin=a,s.direction=o;var l=new f$17;return f$17.getPoint(s,r,l.origin),o$1p.negate(o,l.direction),l}function Qt(e,t){var i=e.globe,n=e$2b(i)?i.ellipsoid:e.mapProjection.ellipsoid;return nt$2(e,a$18.fromCartesian(t,n,zt))}function Kt(e,t){var i=e.globe,n=e$2b(i)?i.ellipsoid:e.mapProjection.ellipsoid;return a$18.fromCartesian(t,n,zt).height}function aa(e,t,i,n){var r=nt$2(e,t);return ot$1(e,r,i,n,(function(){var t=ge$2(e,r,i,n,!0,!0);if(e$2b(t))return Kt(e,t.position)}))}w$3.prototype.sampleHeight=function(e,t,i){if(o$1q.defined("position",e),this._mode!==C$13.SCENE3D)throw new t$16("sampleHeight is only supported in 3D mode.");if(!this.sampleHeightSupported)throw new t$16("sampleHeight requires depth texture support. Check sampleHeightSupported.");var n=ge$2(this,nt$2(this,e),t,i,!0,!1);if(e$2b(n))return Kt(this,n.position)},w$3.prototype.clampToHeight=function(e,t,i,n){if(o$1q.defined("cartesian",e),this._mode!==C$13.SCENE3D)throw new t$16("sampleHeight is only supported in 3D mode.");if(!this.clampToHeightSupported)throw new t$16("clampToHeight requires depth texture support. Check clampToHeightSupported.");i instanceof o$1p&&(n=i,i=void 0,t$12("clampToHeight-parameter-change","clampToHeight now takes an optional width argument before the result argument in SuperMap3D. The previous function definition will no longer work in 1.56."));var r=ge$2(this,Qt(this,e),t,i,!0,!1);if(e$2b(r))return o$1p.clone(r.position,n)},w$3.prototype.sampleHeightMostDetailed=function(e,t,i){if(o$1q.defined("positions",e),this._mode!==C$13.SCENE3D)throw new t$16("sampleHeightMostDetailed is only supported in 3D mode.");if(!this.sampleHeightSupported)throw new t$16("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");t=e$2b(t)?t.slice():t;for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=aa(this,e[o],t,i);return o$1l.all(r).then((function(t){for(var i=t.length,n=0;n<i;++n)e[n].height=t[n];return e}))},w$3.prototype.clampToHeightMostDetailed=function(e,t,i){return this._picking.clampToHeightMostDetailed(this,e,t,i)},w$3.prototype.cartesianToCanvasCoordinates=function(e,t){return s$Q.wgs84ToWindowCoordinates(this,e,t)},w$3.prototype.completeMorph=function(){this._transitioner.completeMorph()},w$3.prototype.morphTo2D=function(e){var t,i=this.globe;t=e$2b(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=u$_(e,2),this._transitioner.morphTo2D(e,t)},w$3.prototype.morphToColumbusView=function(e){var t,i=this.globe;t=e$2b(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=u$_(e,2),this._transitioner.morphToColumbusView(e,t)},w$3.prototype.morphTo3D=function(e){var t,i=this.globe;t=e$2b(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=u$_(e,2),this._transitioner.morphTo3D(e,t)},w$3.prototype.getViewport=function(e){if(this._multiViewportMode!==B$e.NONE){var t=le$2(this,s$Q.transformWindowToDrawingBuffer(this,e,ce$3));if(t>-1){var i=this._context,n=new f$18,r=this._multiViewportInfo[t];return n.x=i.drawingBufferWidth*r.x,n.y=i.drawingBufferHeight*r.y,n.width=i.drawingBufferWidth*r.width,n.height=i.drawingBufferHeight*r.height,n}}return(n=new f$18).x=0,n.y=0,n.width=this._canvas.clientWidth,n.height=this._canvas.clientHeight,n},w$3.prototype.addS3MTilesLayerByScp=function(e,t,i,n){return this._sceneConfigLoader.addS3MTilesLayerByScp(e,t,i,n)},w$3.prototype.addS3MGroupLayer=function(e,t,i){return this._sceneConfigLoader.addS3MGroupLayer(e,t,i)},w$3.prototype.open=function(e,t,i){return this._sceneConfigLoader.open(e,t,i)},w$3.prototype.addVectorTilesLayer=function(e){return e.renderer="canvas",this.addVectorTilesMap(e)},w$3.prototype.getVectorTilesLayer=function(e){return this.getVectorTilesMap(e)},w$3.prototype.removeVectorTilesLayer=function(e){return this.removeVectorTilesMap(e)},w$3.prototype.addVectorTilesMap=function(e){if(!e$2b(e.url))throw new t$16("url is required!");var t=e.name||e$1Q();e.name=t;var i=this._vectorTileSource.get(t);if(e$2b(i))return this._vectorTileMaps.find(e.name);i=new I$10(this._context,e),this._vectorTileSource.set(t,i);var n=this.imageryLayers.addVectorTileProvider(i);i.innerLayer=n,e$2b(this._frameState.mvtLayerCount)?this._frameState.mvtLayerCount++:this._frameState.mvtLayerCount=1;var r=new i$O({provider:i,layer:i.innerLayer,imagelayerCollection:this.imageryLayers,scene:this,viewer:e.viewer,name:e.name||e$1Q(),layerConfig:e.layerConfig,swipeEnabled:u$_(e.swipeEnabled,!1),swipeRegion:u$_(e.swipeRegion,new f$18(0,0,1,1)),enableMorphing:e.enableMorphing,realtime:e.realtime,billboardMode:e.billboardMode,customRequestHeaders:e.customRequestHeaders,labelDepthTestEnabled:e.labelDepthTestEnabled,lineAntialiasing:e.lineAntialiasing});return e.isTdt&&(i._ready=!0,r._isTdt=!0),i.innerLayer.kmlLayer=r.kmlLayer,i._owner=r,this._vectorTileMaps.add(r),r},w$3.prototype.getVectorTilesMap=function(e){if(!e$2b(e))throw new t$16("name is required!");return this._vectorTileMaps.find(e)},w$3.prototype.removeVectorTilesMap=function(e){var t=this._vectorTileMaps.find(e);return!!e$2b(t)&&(this._removeCoverImageryLayer(t),this._vectorTileMaps.remove(e),this._vectorTileSource.remove(e),!0)},w$3.prototype._removeCoverImageryLayer=function(e){for(var t=0;t<this._layers.layerQueue.length;t++){var i=this._layers.layerQueue[t];i._imageryLayer===e&&i._removeCoverImageryLayer()}},w$3.prototype.addLayerService=function(e,t,i){return this._sceneConfigLoader.addLayerService(e,t,i)},w$3.prototype.addS3MInstanceCollection=function(e,t){var i=new S3MInstanceCollection({url:e,instanceAttrs:t,gl:this._context._gl,context:this._context});return this.primitives.add(i),i};var oa=new o$1p;function na(e){var t=e._context;t.uniformState;var i=e._frameState,n=i.camera,r=n.positionWC,o=i.cullingVolume,a=i.mode===C$13.SCENE3D?i.occluder:void 0;if(e$2b(e._reflectFramebuffer)||(e._reflectFramebuffer=t.createReflectFramebuffer(),i._framebufferList.water=e._reflectFramebuffer),e._reflectFramebuffer.distinctQuality=e._waterReflectionDistinctQuality,e.postProcessStages.screenSpaceReflection.enabled)e._reflectFramebuffer.isUpdate=!1;else{for(var s=6378137,l=0,u=0;u<e.layers._layerQueue.length;u++){var c=e.layers._layerQueue[u];if(e$2b(c._waterPlanes)){var h=c._waterPlanes;for(var d in h._hash){var f=h.get(d);if(!(o.computeVisibility(f.boundingVolume)==Ae$u.OUTSIDE||e$2b(a)&&f.boundingVolume.isOccluded(a)))(_=(_=e$2b(f.boundingVolume.radius)?o$1p.distance(f.boundingVolume.center,r)-f.boundingVolume.radius:Math.sqrt(y$Z.distanceSquaredTo(f.boundingVolume,r)))<.01?.01:_)<s&&(s=_,l=f.distance),e._reflectFramebuffer.isUpdate=!0}}}var p=e._analyst3D.layerQueue.length;for(u=0;u<p;u++){if(-1!=e._analyst3D.layerQueue[u]._name.search("floodAnalysis3D")){var _,m=e._analyst3D.layerQueue[u];(_=(_=o$1p.distance(m._boundingSphere.center,r)-m._boundingSphere.radius)<.01?.01:_)<s&&(s=_,l=m._waterHeight),e._reflectFramebuffer.isUpdate=!0}}if(!e._reflectFramebuffer.isUpdate||s>5e4)e._reflectFramebuffer.isUpdate=!1;else{if(e.mode==C$13.SCENE3D){l+=o$1p.magnitude(n.positionWC)-n.positionCartographic.height,e._reflectFramebuffer._reflectPlane.normal=o$1p.normalize(r,oa);var g=new o$1p;e._reflectFramebuffer._reflectPlane.normal.clone(g),o$1p.multiplyByScalar(g,l,g),o$1p.subtract(g,t._relativeOrigin,g),e._reflectFramebuffer._reflectPlane.distance=-o$1p.dot(g,e._reflectFramebuffer._reflectPlane.normal)}else e._reflectFramebuffer._reflectPlane.normal=o$1p.UNIT_X,e._reflectFramebuffer._reflectPlane.distance=-l;e._reflectFramebuffer.isUpdate=!0}}}function sa(e){var t=e._context;t.uniformState;var i=e._frameState;t.numNormalAndDepthObject>0?(e$2b(e._normalFramebuffer)||(e._normalFramebuffer=t.createNormalFramebuffer(),i._framebufferList.normalAndDepth=e._normalFramebuffer),e._normalFramebuffer.isUpdate=!0):e$2b(e._normalFramebuffer)&&(e._normalFramebuffer.isUpdate=!1)}function ua(e){var t=e._context;t.uniformState;var i=e._frameState;t.numPostEffectFilterObject>0?(e$2b(e._postEffectFilterFramebuffer)||(e._postEffectFilterFramebuffer=t.createPostEffectFilterlFramebuffer(),i._framebufferList.postEffectFilter=e._postEffectFilterFramebuffer),e._postEffectFilterFramebuffer.isUpdate=!0):e$2b(e._postEffectFilterFramebuffer)&&(e._postEffectFilterFramebuffer.isUpdate=!1)}function fa(e){var t=e._context;t.uniformState;var i=e._frameState;t.numClampClipPlaneLayer>0?(e$2b(e._clampFramebuffer)||(e._clampFramebuffer=t.createClampFramebuffer(),i._framebufferList.clampTexture=e._clampFramebuffer),e._clampFramebuffer.isUpdate=!0):e$2b(e._clampFramebuffer)&&(e._clampFramebuffer.isUpdate=!1)}function st$1(e){var t=e._context;t.uniformState;var i=e._frameState;e._isUpdatePickCommand?(e$2b(e._pickRectFramebuffer)||(e._pickRectFramebuffer=t.createPickRectFramebuffer(),i._framebufferList.pickRectTexture=e._pickRectFramebuffer,e._pickRectFramebuffer.beginFunc=function(){this._renderTexture._passState.scissorTest={enabled:!0,rectangle:{x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}}}),e._pickRectFramebuffer.isUpdate=!0,e._isUpdatePickCommand=!1):e$2b(e._pickRectFramebuffer)&&(e._pickRectFramebuffer.isUpdate=!1)}function jt(e){if(e$2b(e._pickRectFramebuffer)&&e._pickRectFramebuffer.isUpdate){for(var t=e._context,i=e._pickRectFramebuffer.renderTexture._width,n=e._pickRectFramebuffer.renderTexture._height,r=t.readPixels({framebuffer:e._pickRectFramebuffer.renderTexture._fb,x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}),o=[],a=[],s=[],l=e._layers.layerQueue,u=0;u<l.length;u++){s[g=Oe(_=l[u].id)]=u,o.push(g),a[g]=[]}r.length;for(var c=0;c<i;c++)for(var h=0;h<n;h++){var d=4*(h*i+c);if(0!==r[d]||0!==r[d+1]||0!==r[d+2]){var f=e$1U.byteToRgba(r[d],r[d+1],r[d+2],r[d+3]),p=t.getObjectByPickId(f);if(e$2b(p)){var _=p.primitive.id,m=p.id,g=Oe(_),x=o.indexOf(g);if(x>=0){var v=l[s[g]];if(0==a[g].length)(b=[]).push(m),a[g]=b;else(x=a[g].indexOf(m))<0&&a[g].push(m)}}}}for(var y=Object.keys(a),$=0;$<y.length;$++){var b;v=l[u=s[y[$]]];(b=a[y[$]]).length>0&&v.setSelection(b)}}}function la(e){if(!e$2b(e._pickRectFramebuffer)||!e._pickRectFramebuffer.isUpdate)return Promise.resolve();var t=e._context,i=e._pickRectFramebuffer.renderTexture._width,n=e._pickRectFramebuffer.renderTexture._height;return t.readPixelsAsync({framebuffer:e._pickRectFramebuffer.renderTexture._fb,x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}).then((r=>{for(var o=[],a=[],s=[],l=e._layers.layerQueue,u=0;u<l.length;u++){s[g=Oe(_=l[u].id)]=u,o.push(g),a[g]=[]}r.length;for(var c=0;c<i;c++)for(var h=0;h<n;h++){var d=4*(h*i+c);if(0!==r[d]||0!==r[d+1]||0!==r[d+2]){var f=e$1U.byteToRgba(r[d],r[d+1],r[d+2],r[d+3]),p=t.getObjectByPickId(f);if(e$2b(p)){var _=p.primitive.id,m=p.id,g=Oe(_),x=o.indexOf(g);if(x>=0){var v=l[s[g]];if(0==a[g].length)(b=[]).push(m),a[g]=b;else(x=a[g].indexOf(m))<0&&a[g].push(m)}}}}for(var y=Object.keys(a),$=0;$<y.length;$++){var b;v=l[u=s[y[$]]];(b=a[y[$]]).length>0&&v.setSelection(b)}return Promise.resolve()}))}function Oe(e){return"id_"+e}function ha(e,t,i){var n=e._context,r=e._frameState,o=t.begin(r),a=e._environmentVisible;e._environmentVisible=t.environmentVisible;var s=r.useType,l=r._isDepth;if(r.useType=t.useType,r._isDepth=!1,e._multiViewportMode!==B$e.NONE)for(var u=0;u<4;u++)if(1<<u&t._visibleViewport){r.multiViewportIndex=u;break}e._renderPipeline.updateAndExecuteCommandsForPostEffect(o,u$_(e.backgroundColor,e$1U.BLACK)),r.multiViewportIndex=-1,t.update(o,e._pickDepths),e._environmentState,r.commandList.length=0,n.endFrame(),t.end(r),r._isDepth=l,r.useType=s,e._environmentVisible=a}function ut$3(e){var t=e._context,i=t.uniformState,n=e._frameState,r=n.camera,o=n._framebufferList;n.passes.fbo=!0;var a=e.enableCompositor;for(var s in e.enableCompositor=!0,o){var l=o[s];if(e$2b(l)&&l.isUpdate&&(!l.isDestroyed||!l.isDestroyed())){var u=n.useType,c=n._isDepth,h=n._fboState.name,d=n._fboState.enabled,f=n._fboState.frameBufferType,p=e._sunCamera.direction;if(n._fboState.name=s,n._fboState.enabled=!0,n._fboState.frameBufferType=l.frameBufferType,l.frameBufferType===Qe$c.POSTEFFECT_FILTER)ha(e,l);else{var _=r.frustum.near;l.frameBufferType===Qe$c.REFLECT&&(r.frustum.near=1);var m=l.begin(n),g=e._environmentVisible;e._environmentVisible=l.environmentVisible,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.update(n);var x=e.shadowMap;e$2b(x)&&x.enabled&&o$1p.negate(i.sunDirectionWC,e._sunCamera.direction);var v=n.shadowState.nearPlane,y=n.shadowState.farPlane,$=n.shadowState.closestObjectSize;if(n.useType=l.useType,n._isDepth=(6&l.useType)>0||1&l.useType&&l.isManualDepth,e._multiViewportMode!==B$e.NONE)for(var b=0;b<4;b++)if(1<<b&l._visibleViewport){n.multiViewportIndex=b;break}G$3(e),e._renderPipeline.updateAndExecuteCommands(m,u$_(e.backgroundColor,e$1U.BLACK)),n.multiViewportIndex=-1;var T=e._environmentState;if(!t.webgpu&&e._msaaSamples>1&&T.useGlobeDepthFramebuffer){var C=e._view.globeDepth;l.update(t,m,C.framebufferWithTexture)}else l.update(t,m,m.framebuffer);n._fboState.frameBufferType!==Qe$c.CLAMP&&e._renderPipeline.resolveFramebuffers(m),n.commandList.length=0,t.endFrame(),Tt$1(e),l.end(n),e$2b(x)&&x.enabled&&-1!==n._fboState.name.indexOf("ShadowQueryPoints")&&(e._sunCamera.direction=p),"water"==n._fboState.name&&(r.frustum.near=_),e._environmentVisible=g,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.update(n),e$2b(x)&&x.enabled&&o$1p.negate(i.sunDirectionWC,e._sunCamera.direction),n.shadowState.nearPlane=v,n.shadowState.farPlane=y,n.shadowState.closestObjectSize=$}n._fboState.name=h,n._fboState.enabled=d,n._fboState.frameBufferType=f,n._isDepth=c,n.useType=u}}n.passes.fbo=!1,e.enableCompositor=a}function Yt(e,t){var i=e._context,n=i.uniformState,r=e._frameState,o=r.camera,a=e.shadowMap.enabled,s=r.shadowState.shadowsEnabled;r.passes.fbo=!0,e.shadowMap.enabled=!1,r.shadowState.shadowsEnabled=!1;var l=r.useType,u=r._isDepth,c=r._fboState.name,h=r._fboState.enabled,d=r._fboState.frameBufferType;r._fboState.enabled=!0,r._fboState.frameBufferType=t.frameBufferType;var f=t.begin(r),p=e._environmentVisible;e._environmentVisible=t.environmentVisible,r.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.update(r),r.useType=t.useType,r._isDepth=(6&t.useType)>0||1&t.useType&&t.isManualDepth,G$3(e),e._renderPipeline.updateAndExecuteCommands(f,u$_(e.backgroundColor,e$1U.BLACK));var _=e._environmentState;if(!i.webgpu&&e._msaaSamples>1&&_.useGlobeDepthFramebuffer){var m=e._view.globeDepth;t.update(i,f,m.framebufferWithTexture)}else t.update(i,f,f.framebuffer);e._renderPipeline.resolveFramebuffers(f),r.commandList.length=0,i.endFrame(),t.end(r),e._environmentVisible=p,r.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.update(r),r._fboState.name=c,r._fboState.enabled=h,r._fboState.frameBufferType=d,r._isDepth=u,r.useType=l,r.passes.fbo=!1,e.shadowMap.enabled=a,r.shadowState.shadowsEnabled=s}function ma(e){var t=e._context.uniformState;if(!e.enableOutline||e.camera._positionCartographic.height>2e3)return t.nonSelDepthTexture=void 0,void(t.maskTexture=void 0);var i=e.nonSelDepthbuffer;e$2b(i)||((i=e.nonSelDepthbuffer=new s$T(e.context)).environmentVisible.isObjectVisible=!0,i.environmentVisible.isGlobalVisible=!0,i.isUpdate=!0,i._beginFunc=function(t){t.passes.pick=!0,t.passes.depth=!0,e.layers.getSelectedLayer().selectedColor.alpha=0},i._endFunc=function(t){t.passes.pick=!1,t.passes.depth=!1,e.layers.getSelectedLayer().selectedColor.alpha=1}),Yt(e,i),t.nonSelDepthTexture=i.depthTexture;var n=e.selMaskBuffer;e$2b(n)||((n=e.selMaskBuffer=new t$F(e.context))._useHeight=!1,n.environmentVisible.isObjectVisible=!0,n.environmentVisible.isOnlyS3MObjectVisible=!0,n.environmentVisible.isGlobalVisible=!1,n.isUpdate=!0),e._maskEnabled=!0;var r=e.backgroundColor;e.backgroundColor=e$1U.clone(e$1U.WHITE),Yt(e,n),e.backgroundColor=r,e._maskEnabled=!1,t.maskTexture=n.renderTexture._fb.getColorTexture(0)}w$3.prototype.addFieldLayer=function(e){if(!e$2b(e))throw new t$16("url is required!");var t=this;if(e.indexOf(".nc")>-1){var i=o$1l.defer();return o$1l(o$10(e),(function(e){var n=new k$5(e),r=new i$g(t._context);r._NetCDFBuffer=n,r.NetCDFInfo=n.header,t._layers.add(r),i.resolve(r)})).otherwise((function(e){throw i.reject(e.message),new t$16("Not a valid NetCDF file!")})),i.promise}},w$3.prototype.addVoxelGridLayer=function(e,t){if(!e$2b(e))throw new t$16("url is required!");var i=this,n=o$1l.defer();return e.indexOf(".nc")>-1?(o$1l(o$10(e),(function(e){var r=new k$5.NetCDFReader(e),o=new g$d(i._context);o._NetCDFBuffer=r,o._NetCDFInfo=r.header,o._name=t,i._layers.add(o),n.resolve(o)})).otherwise((function(e){throw new t$16("Not a valid NetCDF file!")})),n.promise):(o$1l(u$R(e),(function(t){for(var r=(t=(new DOMParser).parseFromString(t,"application/xml")).childNodes[0],o=u$_(s$S.queryStringAttribute(r,"xmlns:sml"),"http://www.supermap.com/SuperMapCache/scvo"),a=s$S.queryNumericValue(r,"Version",o),s=s$S.queryStringValue(r,"CacheName",o),l=(s$S.queryStringValue(r,"StoreType",o),s$S.queryStringValue(r,"FileExtentName",o),s$S.queryStringValue(r,"Type",o),s$S.queryStringValue(r,"VolumeType",o),s$S.queryNumericValue(r,"Width",o)),u=s$S.queryNumericValue(r,"Height",o),c=s$S.queryNumericValue(r,"Depth",o),h=s$S.queryNumericValue(r,"Time",o),d=s$S.queryNumericValue(r,"CellWidth",o),f=s$S.queryNumericValue(r,"CellHeight",o),p=s$S.queryNumericValue(r,"CellDepth",o),_=s$S.queryNumericValue(r,"CellTime",o),m=s$S.queryFirstNode(r,"Bounds",o),g=s$S.queryNumericValue(m,"Left",o),x=s$S.queryNumericValue(m,"Right",o),v=s$S.queryNumericValue(m,"Top",o),y=s$S.queryNumericValue(m,"Bottom",o),$=s$S.queryNumericValue(r,"MaxAltitude",o),b=s$S.queryNumericValue(r,"MinAltitude",o),T=s$S.queryNumericValue(r,"MaxValue",o),C=s$S.queryNumericValue(r,"MinValue",o),S=s$S.queryNumericValue(r,"Levels",o),w=s$S.queryFirstNode(r,"Available",o),E=s$S.queryNodes(w,"TilesBounds",o),P=[],A=0,L=E.length;A<L;A++){var M=s$S.queryNumericAttribute(E[A],"level",o),R=s$S.queryNodes(E[A],"TileBounds",o),O=s$S.queryNumericValue(R[0],"StartCol",o),I=s$S.queryNumericValue(R[0],"StartRow",o),D=s$S.queryNumericValue(R[0],"EndCol",o),B=s$S.queryNumericValue(R[0],"EndRow",o);P[M]={StartCol:O,StartRow:I,EndCol:D,EndRow:B}}var N=new g$d(i._context);N.setIsMultiResolution(!0);var F=e.lastIndexOf("/");N._url=e.slice(0,F),N._name=s,N._version=a,N._width=l,N._height=u,N._zBounds=new o$1o(b,$),N._layerBounds=new h$18(g,y,x,v);var U=N._layerBounds.width/l,G=N._layerBounds.height/u;for(A=P.length-1;A>=0;A--)P[A].Width=l,P[A].Height=u,l=Math.floor(.5*l),u=Math.floor(.5*u),P[A].resolution=new o$1o(U,G),U*=2,G*=2;N._depth=c,N._time=h,N._levels=S,N._cellWidth=d,N._cellHeight=f,N._cellDepth=p,N._cellTime=_,N._maxFiltration=T,N._minFiltration=C,N._floor=C,N._ceil=T,N._availableNode=P,o$1l(o$10(N._url+"/0/0000/0000/0000_0000.vol"),(function(e){var t=e.slice(16,e.byteLength);N._volumeBuffer=nt$9.inflate(t).buffer,i._layers.add(N),n.resolve(N)})).otherwise((function(e){throw new t$16("Not load root file!")}))})).otherwise((function(e){throw new t$16("Not a valid SCVO file!")})),n.promise)},w$3.prototype.renderIds=function(e){var t=this._context,i=this._defaultView;this._view=i;var n=i.viewport;n.x=0,n.y=0,n.width=t.drawingBufferWidth,n.height=t.drawingBufferHeight,F$3.x=0,F$3.y=0,F$3.width=t.drawingBufferWidth,F$3.height=t.drawingBufferHeight;var r=t.uniformState,o=this._frameState;W$6(this),o.invertClassification=!1,o.passes.pick=!0,r.update(o);var a=i.pickFramebuffer.begin(F$3,n),s=this._environmentVisible.isGlobalVisible;this._environmentVisible.isGlobalVisible=!1,this._environmentVisible.isOnlyS3MObjectVisible=!0;var l=this.camera,u=o$1p.clone(l.position),c=l.heading,h=l.pitch,d=l.roll;this.camera.setView(e),G$3(this),this._renderPipeline.updateAndExecuteCommands(a,ie$1),this._renderPipeline.resolveFramebuffers(a),t.endFrame(),this._environmentVisible.isGlobalVisible=s,this._environmentVisible.isOnlyS3MObjectVisible=!1,l.setView({destination:u,orientation:{heading:c,pitch:h,roll:d}})},w$3.prototype.pickRect=function(e,t){var i=e$2a.clamp(this._context.drawingBufferHeight-e.y,0,this._context.drawingBufferHeight),n=e$2a.clamp(this._context.drawingBufferHeight-t.y,0,this._context.drawingBufferHeight),r=Math.min(e.x,t.x),o=Math.min(i,n),a=Math.max(e.x,t.x),s=Math.max(i,n),l=new e$29;l.x=r/this._context.drawingBufferWidth,l.y=o/this._context.drawingBufferHeight,l.z=a/this._context.drawingBufferWidth,l.w=s/this._context.drawingBufferHeight,this._isUpdatePickCommand=!0,this._pickRect=new e$29(r,o,a,s);for(var u=0,c=this._layers.layerQueue.length;u<c;u++){this._layers.layerQueue[u].selectBound=l}},w$3.prototype.getPickRectIDs=function(){for(var e=new e$1N,t=this._layers.layerQueue,i={},n=!1,r=0;r<t.length;r++){i[(_=t[r]).id]=Object.keys(_._objsVisibleMap),n=!!_._objsVisibleMap[i[_.id][0]]}for(var o=0;o<10;o++){this._isUpdatePickCommand=!0,this.initializeFrame(),this._renderForQuery();var a=!1;for(r=0;r<t.length;r++){var s=(_=t[r]).getSelection();if(!(s.length<=0)){if(e.contains(_.id)){var l;l=s.concat(e.get(_.id).ids),s=l}for(var u=[],c=(o=0,s.length);o<c;o++){var h=s[o],d=i[_.id].indexOf(h);(n&&d>-1||!n&&-1===d)&&u.push(h)}var f={layerName:_.name,layerIndex:r,ids:u};e.set(_.id,f),a=!0,_.releaseSelection(),_.setObjsVisible(s,!1)}}if(!a)break}var p=[];this._isUpdatePickCommand=!1;for(o=0;o<e.values.length;o++){var _;(_=t[e.values[o].layerIndex]).setObjsVisible([],!1),n||_.setOnlyObjsVisible(i[_.id],n);var m={layerName:e.values[o].layerName,ids:e.values[o].ids};p.push(m)}return p},w$3.prototype.getPickRectIDsAsync=function(){var e=new Promise(((e,t)=>{for(var i=new e$1N,n=this._layers.layerQueue,r={},o=!1,a=0;a<n.length;a++){var s=n[a];r[s.id]=Object.keys(s._objsVisibleMap),o=!!s._objsVisibleMap[r[s.id][0]]}for(var l=0,u=0;u<10;u++)this._isUpdatePickCommand=!0,this.initializeFrame(),this._renderForQueryAsync().then((()=>{l++;for(var t=0;t<n.length;t++){var a=(m=n[t]).getSelection();if(!(a.length<=0)){if(i.contains(m.id)){var s;s=a.concat(i.get(m.id).ids),a=s}for(var u=[],c=0,h=a.length;c<h;c++){var d=a[c],f=r[m.id].indexOf(d);(o&&f>-1||!o&&-1===f)&&u.push(d)}var p={layerName:m.name,layerIndex:t,ids:u};i.set(m.id,p),m.releaseSelection()}}if(10===l){var _=[];this._isUpdatePickCommand=!1;for(c=0;c<i.values.length;c++){var m=n[i.values[c].layerIndex];o||m.setOnlyObjsVisible(r[m.id],o);var g={layerName:i.values[c].layerName,ids:i.values[c].ids};_.push(g)}e(_)}}))}));return e},w$3.prototype._renderForQuery=function(){var e=this.context,t=e.uniformState,i=this._frameState,n=this._defaultView;this._view=n,W$6(this),i.passes.render=!0,i.passes.postProcess=this.postProcessStages.hasSelected,i.backgroundColor=u$_(this.backgroundColor,e$1U.BLACK),t.update(i);var r=n.viewport;r.x=0,r.y=0,r.width=e.drawingBufferWidth,r.height=e.drawingBufferHeight;var o=n.passState;o.framebuffer=void 0,o.blendingEnabled=void 0,o.scissorTest=void 0,o.viewport=f$18.clone(r,o.viewport),st$1(this),ut$3(this),G$3(this),this._renderPipeline.resolveFramebuffers(o),o.framebuffer=void 0,jt(this),e.endFrame()},w$3.prototype._renderForQueryAsync=function(){var e=this.context,t=e.uniformState,i=this._frameState,n=this._defaultView;this._view=n,W$6(this),i.passes.render=!0,i.passes.postProcess=this.postProcessStages.hasSelected,i.backgroundColor=u$_(this.backgroundColor,e$1U.BLACK),t.update(i);var r=n.viewport;r.x=0,r.y=0,r.width=e.drawingBufferWidth,r.height=e.drawingBufferHeight;var o=n.passState;return o.framebuffer=void 0,o.blendingEnabled=void 0,o.scissorTest=void 0,o.viewport=f$18.clone(r,o.viewport),st$1(this),ut$3(this),G$3(this),this._renderPipeline.resolveFramebuffers(o),o.framebuffer=void 0,la(this).then((()=>(e.endFrame(),Promise.resolve())))},w$3.prototype.getHeight=function(e,t){var i=this._context,n=i.uniformState,r=this._frameState;this._environmentState;var o=this._defaultView;this._view=o;var a=o.viewport;a.x=0,a.y=0,a.width=i.drawingBufferWidth,a.height=i.drawingBufferHeight;var s=new o$1o(.5*i.drawingBufferWidth,.5*i.drawingBufferHeight),l=o.passState;l.viewport=f$18.clone(a,l.viewport),tt$1(r.passes),r.passes.pick=!0,r.passes.depth=!0,G$3(this),l=o.pickDepthFramebuffer.update(i,s,a);var u,c=this.camera,h=o$1p.clone(c.positionWC),d=o$1p.clone(c.direction),f=o$1p.clone(c.up);c.setView({destination:o$1p.fromDegrees(e,t,9e3)}),this._renderPipeline.updateAndExecuteCommands(l,ie$1),this._renderPipeline.resolveFramebuffers(l),i.endFrame(),u=e$2b(c.frustum.fov)?c.frustum.clone(Ee$1):e$2b(c.frustum.infiniteProjectionMatrix)?c.frustum.clone(Fe$1):e$2b(c.frustum.width)?c.frustum.clone(Re$1):c.frustum.clone(Le$1);for(var p,_=o.frustumCommandsList,m=_.length,g=new o$1p,x=0;x<m;++x){var v=this._picking.getPickDepth(this,x).getDepth(i,s.x,s.y);if(v>0&&v<1){var y=_[x];u.near=y.near*(0!==x?this.opaqueFrustumNearOffset:1),u.far=y.far,n.updateFrustum(u),g=s$Q.drawingBufferToWgs84Coordinates(this,s,v,g),p=a$18.fromCartesian(g).height;break}}return c.setView({destination:h,orientation:{direction:d,up:f}}),p},w$3.prototype.addLightSource=function(e){LicenseChecker.LICENSECHECKER.verify("Scene_addLightSource"),e$2b(e)&&this._lightSource.addLightSource(e)},w$3.prototype.removeLightSource=function(e){!e$2b(e)||this._lightSource.removeLightSource(e)},w$3.prototype.outputSceneToFile=function(){var e=this,t=o$1l.defer(),i=!1;return this.postRender.addEventListener((function(){i||(i=!0,e.context.readPixelsAsync({}).then((i=>{var n=document.createElement("canvas");n.height=e.context.drawingBufferHeight,n.width=e.context.drawingBufferWidth;var r=n.getContext("2d"),o=r.createImageData(n.width,n.height);o.data.set(i),r.putImageData(o,0,0);var a=r.getImageData(0,0,n.width,n.height);if(e.context.webgpu)for(var s=0;s<a.height;++s)for(var l=0;l<a.width;++l){var u=s*a.width+l,c=a.data[4*u],h=a.data[4*u+2];a.data[4*u]=h,a.data[4*u+2]=c}else for(s=0;s<a.height/2;++s)for(l=0;l<a.width;++l){var d=4*s*a.width+4*l,f=4*(a.height-s)*a.width+4*l,p=(c=a.data[d],a.data[d+1]),_=(h=a.data[d+2],a.data[d+3]);a.data[d]=a.data[f],a.data[d+1]=a.data[f+1],a.data[d+2]=a.data[f+2],a.data[d+3]=a.data[f+3],a.data[f]=c,a.data[f+1]=p,a.data[f+2]=h,a.data[f+3]=_}r.clearRect(0,0,a.width,a.height),r.putImageData(a,0,0);var m=n.toDataURL();t.resolve(m)})))})),t.promise},w$3.prototype.collideDetection=function(e){if(this.mode===C$13.SCENE3D||this.mode===C$13.COLUMBUS_VIEW){var t=this._context,i=this._defaultView;this._view=i;var n=this.camera,r=t.uniformState,o=o$1p.clone(n.direction),a=o$1p.clone(n.up),s=o$1p.cross(e,n.right,new o$1p);n.setView({destination:n.position,orientation:{direction:e,up:s},convert:n._mode!==C$13.COLUMBUS_VIEW});var l,u=new o$1o(.5*t.drawingBufferWidth,.5*t.drawingBufferHeight);at$3(this,u),this.camera.setView({destination:this.camera.position,orientation:{direction:o,up:a},convert:n._mode!==C$13.COLUMBUS_VIEW}),l=e$2b(n.frustum.fov)?n.frustum.clone(Ee$1):e$2b(n.frustum.infiniteProjectionMatrix)?n.frustum.clone(Fe$1):e$2b(n.frustum.width)?n.frustum.clone(Re$1):n.frustum.clone(Le$1);for(var c=i.frustumCommandsList,h=c.length,d=new o$1p,f=0;f<h;++f){var p=this._picking.getPickDepth(this,f).getDepth(t,u.x,u.y);if(p>0&&p<1){var _=c[f];return l.near=_.near*(0!==f?this.opaqueFrustumNearOffset:1),l.far=_.far,r.updateFrustum(l),s$Q.drawingBufferToWgs84Coordinates(this,u,p,d)}}}},w$3.prototype.parsePBRFromJson=function(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(t$11.createIfNeeded(e[i]).fetchJson());var r=this;o$1l.all(t,(function(e){for(var t=0,i=e.length;t<i;t++){var n=e[t].material,o=new p$1d,a=n.pbrMetallicRoughness;n.textureunitstates,o[0]=a.roughnessFactor,o[1]=a.metallicFactor,o[2]=a.baseColor.x,o[3]=a.baseColor.y,o[4]=a.baseColor.z,o[5]=a.baseColor.w,r._pbrMaterlParameters.push(o)}}))},w$3.prototype.isDestroyed=function(){return!1},w$3.prototype.destroy=function(){this.layers.removeAll(),this.layers.endFrame(this._frameState),this._analyst3D.removeAll(),this._vectorTileMaps.removeAll(),this._plotLayers.removeAll(),this.compositor.destroy(),this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.cloudBox=this.cloudBox&&this.cloudBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),e$2b(this._reflectFramebuffer)&&(this._reflectFramebuffer.destroy(),this._frameState._framebufferList.water=void 0),e$2b(this._normalFramebuffer)&&(this._normalFramebuffer.destroy(),this._frameState._framebufferList.normalAndDepth=void 0),e$2b(this._postEffectFilterFramebuffer)&&(this._postEffectFilterFramebuffer.destroy(),this._frameState._framebufferList.postEffectFilter=void 0),e$2b(this._clampFramebuffer)&&(this._clampFramebuffer.destroy(),this._frameState._framebufferList.clampTexture=void 0),e$2b(this._pickRectFramebuffer)&&(this._pickRectFramebuffer.destroy(),this._frameState._framebufferList.pickRectTexture=void 0),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),e$2b(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(var e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,this._rasterPickTexture=this._rasterPickTexture&&!this._rasterPickTexture.isDestroyed()&&this._rasterPickTexture.destroy(),this._rasterPickFBO=this._rasterPickFBO&&!this._rasterPickFBO.isDestroyed()&&this._rasterPickFBO.destroy(),e$2b(this.voxelGridPostRender)&&this.voxelGridPostRender.destroy(),this.voxelGridPostRender=void 0,e$2b(this.particlePostRender)&&this.particlePostRender.destroy(),this.particlePostRender=void 0,e$2b(this.particleTrailsPostRenderer)&&this.particleTrailsPostRenderer.destroy(),this.particleTrailsPostRenderer=void 0,e$2b(this.nonSelDepthbuffer)&&this.nonSelDepthbuffer.destroy(),e$2b(this.selMaskBuffer)&&this.selMaskBuffer.destroy(),e$2b(this._renderPipeline)&&this._renderPipeline.destroy(),i$10(this)};var g$7="uniform vec3 u_radiiAndDynamicAtmosphereColor;\nuniform float u_atmosphereLightIntensity;\nuniform float u_atmosphereRayleighScaleHeight;\nuniform float u_atmosphereMieScaleHeight;\nuniform float u_atmosphereMieAnisotropy;\nuniform vec3 u_atmosphereRayleighCoefficient;\nuniform vec3 u_atmosphereMieCoefficient;\nconst float ATMOSPHERE_THICKNESS = 111e3;\nconst int PRIMARY_STEPS_MAX = 16;\nconst int LIGHT_STEPS_MAX = 4;\nfloat approximateTanh(float x) {\nfloat x2 = x * x;\nreturn max(-1.0, min(+1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));\n}\nvoid computeScattering(\nczm_ray primaryRay,\nfloat primaryRayLength,\nvec3 lightDirection,\nfloat atmosphereInnerRadius,\nout vec3 rayleighColor,\nout vec3 mieColor,\nout float opacity\n) {\nrayleighColor = vec3(0.0);\nmieColor = vec3(0.0);\nopacity = 0.0;\nfloat atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\nvec3 origin = vec3(0.0);\nczm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);\nif (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {\nreturn;\n}\nfloat x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);\nfloat w_stop_gt_lprl = 0.5 * (1.0 + approximateTanh(x));\nfloat start_0 = primaryRayAtmosphereIntersect.start;\nprimaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);\nprimaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));\nfloat x_o_a = start_0 - ATMOSPHERE_THICKNESS;\nfloat w_inside_atmosphere = 1.0 - 0.5 * (1.0 + approximateTanh(x_o_a));\nint PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0);\nint LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0);\nfloat rayPositionLength = primaryRayAtmosphereIntersect.start;\nfloat totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;\nfloat rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));\nfloat rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));\nvec3 rayleighAccumulation = vec3(0.0);\nvec3 mieAccumulation = vec3(0.0);\nvec2 opticalDepth = vec2(0.0);\nvec2 heightScale = vec2(u_atmosphereRayleighScaleHeight, u_atmosphereMieScaleHeight);\nfor (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {\nif (i >= PRIMARY_STEPS) {\nbreak;\n}\nvec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);\nfloat sampleHeight = length(samplePosition) - atmosphereInnerRadius;\nvec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;\nopticalDepth += sampleDensity;\nczm_ray lightRay = czm_ray(samplePosition, lightDirection);\nczm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);\nfloat lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);\nfloat lightPositionLength = 0.0;\nvec2 lightOpticalDepth = vec2(0.0);\nfor (int j = 0; j < LIGHT_STEPS_MAX; ++j) {\nif (j >= LIGHT_STEPS) {\nbreak;\n}\nvec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);\nfloat lightHeight = length(lightPosition) - atmosphereInnerRadius;\nlightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;\nlightPositionLength += lightStepLength;\n}\nvec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));\nrayleighAccumulation += sampleDensity.x * attenuation;\nmieAccumulation += sampleDensity.y * attenuation;\nrayPositionLength += (rayStepLength += rayStepLengthIncrease);\n}\nrayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation;\nmieColor = u_atmosphereMieCoefficient * mieAccumulation;\nopacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x))));\n}\nvec4 computeAtmosphereColor(\nvec3 positionWC,\nvec3 lightDirection,\nvec3 rayleighColor,\nvec3 mieColor,\nfloat opacity\n) {\nvec3 cameraToPositionWC = positionWC - czm_viewerPositionECEF;\nvec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\nfloat cosAngle = dot(cameraToPositionWCDirection, lightDirection);\nfloat cosAngleSq = cosAngle * cosAngle;\nfloat G = u_atmosphereMieAnisotropy;\nfloat GSq = G * G;\nfloat rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);\nfloat miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));\nvec3 rayleigh = rayleighPhase * rayleighColor;\nvec3 mie = miePhase * mieColor;\nvec3 color = (rayleigh + mie) * u_atmosphereLightIntensity;\nreturn vec4(color, opacity);\n}\n",x$5="float interpolateByDistance(vec4 nearFarScalar, float distance)\n{\nfloat startDistance = nearFarScalar.x;\nfloat startValue = nearFarScalar.y;\nfloat endDistance = nearFarScalar.z;\nfloat endValue = nearFarScalar.w;\nfloat t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\nreturn mix(startValue, endValue, t);\n}\nvec3 getLightDirection(vec3 positionWC)\n{\nfloat lightEnum = u_radiiAndDynamicAtmosphereColor.z;\nvec3 lightDirection =\npositionWC * float(lightEnum == 0.0) +\nczm_lightDirectionWC * float(lightEnum == 1.0) +\nczm_sunDirectionWC * float(lightEnum == 2.0);\nreturn normalize(lightDirection);\n}\nvoid computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity, out float underTranslucentGlobe)\n{\nfloat ellipsoidRadiiDifference = czm_ellipsoidRadii.x - czm_ellipsoidRadii.z;\nfloat distanceAdjustMin = czm_ellipsoidRadii.x / 4.0;\nfloat distanceAdjustMax = czm_ellipsoidRadii.x;\nfloat distanceAdjustModifier = ellipsoidRadiiDifference / 2.0;\nfloat distanceAdjust = distanceAdjustModifier * clamp((czm_eyeHeight - distanceAdjustMin) / (distanceAdjustMax - distanceAdjustMin), 0.0, 1.0);\nfloat radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust;\nfloat atmosphereInnerRadius = (length(czm_viewerPositionECEF) - czm_eyeHeight) - radiusAdjust;\nvec3 cameraToPositionWC = positionWC - czm_viewerPositionECEF;\nvec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\nczm_ray primaryRay = czm_ray(czm_viewerPositionECEF, cameraToPositionWCDirection);\nunderTranslucentGlobe = 0.0;\n#if defined(GLOBE_TRANSLUCENT)\nczm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust);\nif (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) {\nvec3 direction = normalize(positionWC);\nczm_ray ellipsoidRay = czm_ray(positionWC, -direction);\nczm_raySegment ellipsoidIntersection = czm_rayEllipsoidIntersectionInterval(ellipsoidRay, vec3(0.0), czm_ellipsoidInverseRadii);\nvec3 onEarth = positionWC - (direction * ellipsoidIntersection.start);\nfloat angle = dot(normalize(czm_viewerPositionECEF), normalize(onEarth));\nopacity = interpolateByDistance(vec4(0.0, 1.0, czm_ellipsoidRadii.x, 0.0), length(czm_viewerPositionECEF - onEarth));\nvec3 horizonColor = vec3(0.1, 0.2, 0.3);\nvec3 nearColor = vec3(0.0);\nrayleighColor = mix(nearColor, horizonColor, exp(-angle) * opacity);\nunderTranslucentGlobe = 1.0;\nreturn;\n}\n#endif\ncomputeScattering(\nprimaryRay,\nlength(cameraToPositionWC),\nlightDirection,\natmosphereInnerRadius,\nrayleighColor,\nmieColor,\nopacity\n);\nfloat cameraHeight = czm_eyeHeight + atmosphereInnerRadius;\nfloat atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\nopacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0);\nfloat nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;\nopacity *= pow(nightAlpha, 0.5);\n}\n",B$3="varying vec3 v_outerPositionWC;\nuniform vec3 u_hsbShift;\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\nvarying float v_opacity;\nvarying float v_translucent;\n#endif\nvoid main (void)\n{\nvec3 lightDirection = getLightDirection(v_outerPositionWC);\nvec3 mieColor;\nvec3 rayleighColor;\nfloat opacity;\nfloat translucent;\n#ifdef PER_FRAGMENT_ATMOSPHERE\ncomputeAtmosphereScattering(\nv_outerPositionWC,\nlightDirection,\nrayleighColor,\nmieColor,\nopacity,\ntranslucent\n);\n#else\nmieColor = v_mieColor;\nrayleighColor = v_rayleighColor;\nopacity = v_opacity;\ntranslucent = v_translucent;\n#endif\nvec4 color = computeAtmosphereColor(v_outerPositionWC, lightDirection, rayleighColor, mieColor, opacity);\n#ifndef HDR\ncolor.rgb = czm_acesTonemapping(color.rgb);\ncolor.rgb = czm_inverseGamma(color.rgb);\n#endif\n#ifdef COLOR_CORRECT\nvec3 hsb = czm_RGBToHSB(color.rgb);\nhsb.x += u_hsbShift.x;\nhsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0);\nhsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0;\ncolor.rgb = czm_HSBToRGB(hsb);\n#endif\nif (translucent == 0.0) {\ncolor.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime);\n}\ngl_FragColor = color;\n}\n",I$2="attribute vec4 position;\nvarying vec3 v_outerPositionWC;\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\nvarying float v_opacity;\nvarying float v_translucent;\n#endif\nvoid main(void)\n{\nvec4 positionWC = czm_model * position;\nvec3 lightDirection = getLightDirection(positionWC.xyz);\n#ifndef PER_FRAGMENT_ATMOSPHERE\ncomputeAtmosphereScattering(\npositionWC.xyz,\nlightDirection,\nv_rayleighColor,\nv_mieColor,\nv_opacity,\nv_translucent\n);\n#endif\nv_outerPositionWC = positionWC.xyz;\nvec4 realPosition = czm_model * position;\nrealPosition.xyz -= czm_relativeOrigin;\ngl_Position = czm_viewProjection * realPosition;\n}\n";function h$6(e){e=u$_(e,t$13.WGS84),this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;const t=o$1p.multiplyByScalar(e.radii,1.025,new o$1p);this._scaleMatrix=p$1d.fromScale(t),this._modelMatrix=new p$1d,this._command=new i$_({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new o$1p(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new o$1p(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new o$1p;const i=new o$1p;i.x=1.025*e.maximumRadius,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;const n=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return n._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return n._hueSaturationBrightness.x=n.hueShift,n._hueSaturationBrightness.y=n.saturationShift,n._hueSaturationBrightness.z=n.brightnessShift,n._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return n.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return n.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return n.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return n.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return n.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return n.atmosphereMieAnisotropy}}}Object.defineProperties(h$6.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),h$6.prototype.setDynamicAtmosphereColor=function(e,t){const i=e?t?2:1:0;this._radiiAndDynamicAtmosphereColor.z=i};const u$6=new p$1d;function V$4(e){return!(e$2a.equalsEpsilon(e.hueShift,0,e$2a.EPSILON7)&&e$2a.equalsEpsilon(e.saturationShift,0,e$2a.EPSILON7)&&e$2a.equalsEpsilon(e.brightnessShift,0,e$2a.EPSILON7))}h$6.prototype.update=function(e,t){if(!this.show)return;const i=e.mode;if(i!==C$13.SCENE3D&&i!==C$13.MORPHING||!e.passes.render)return;const n=p$1d.fromRotationTranslation(e.context.uniformState.inverseViewRotation,o$1p.ZERO,u$6),r=p$1d.multiplyTransformation(n,v$y.Y_UP_TO_Z_UP,u$6),o=p$1d.multiply(this._scaleMatrix,r,u$6);p$1d.clone(o,this._modelMatrix);const a=e.context,s=V$4(this),l=e.globeTranslucencyState.translucent,u=this.perFragmentAtmosphere||l||!e$2b(t)||!t.show,c=this._command;if(!e$2b(c.vertexArray)){const e=b$P.createGeometry(new b$P({radii:new o$1p(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:n$11.POSITION_ONLY}));this._attributeLocations=k$13.createAttributeLocations(e),c.vertexArray=c$12.fromGeometry({context:a,geometry:e,attributeLocations:this._attributeLocations,bufferUsage:A$19.STATIC_DRAW}),c.renderState=d$1m.fromCache({cull:{enabled:!0,face:G$17.FRONT},blending:Ee$r.ALPHA_BLEND,depthMask:!1})}const h=s|u<<2|l<<3;if(h!==this._flags){this._flags=h;const e=[];s&&e.push("COLOR_CORRECT"),u&&e.push("PER_FRAGMENT_ATMOSPHERE"),l&&e.push("GLOBE_TRANSLUCENT");const t=new s$U({name:"SkyAtmosphereVS",defines:e,sources:[g$7,x$5,I$2]}),i=new s$U({name:"SkyAtmosphereFS",defines:e,sources:[g$7,x$5,B$3]});this._spSkyAtmosphere=r$13.fromCache({context:a,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:this._attributeLocations}),c.shaderProgram=this._spSkyAtmosphere}return c},h$6.prototype.isDestroyed=function(){return!1},h$6.prototype.destroy=function(){const e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),i$10(this)};var J$1="uniform samplerCube u_cubeMap;\nuniform float u_alpha;\nvarying vec3 v_texCoord;\nvoid main()\n{\nvec4 color = textureCube(u_cubeMap, normalize(v_texCoord));\nfloat alpha = czm_sceneMode == czm_sceneModeColumbusView ? u_alpha : u_alpha * czm_morphTime;\ngl_FragColor = vec4(czm_gammaCorrect(color).rgb, alpha);\n}\n",$$3="attribute vec3 position;\nuniform mat3 u_rotateMatrix;\nvarying vec3 v_texCoord;\nvoid main()\n{\nif (czm_sceneMode == czm_sceneModeColumbusView) {\nvec3 worldPosition = czm_entireFrustum.y * position;\ngl_Position = czm_modelViewProjection * vec4(worldPosition, 1.0);\nvec3 texCoord = normalize(worldPosition);\nv_texCoord = texCoord.zxy;\n}\nelse{\nvec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\ngl_Position = czm_projection * vec4(p, 1.0);\nv_texCoord = position.xyz;\n}\n}\n";function h$5(e){LicenseChecker.LICENSECHECKER.verify("SkyBox"),this.sources=e.sources,this._sources=void 0,this.show=u$_(e.show,!0),this._command=new i$_({modelMatrix:p$1d.clone(p$1d.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0,this.alpha=1,this._uSpeed=0,this._vSpeed=0,this._wSpeed=0,this._horizontalRotationAngle=0,this._axisChanged=!0,this.imageUrl=e.imageUrl,this._imageUrl=void 0,this._PreprocessCubeMap=void 0}function oe$2(e){return!(0!==e._horizontalRotationAngle||0!==e._wSpeed||0!==e._uSpeed||0!==e._vSpeed)}Object.defineProperties(h$5.prototype,{USpeed:{get:function(){return this._uSpeed},set:function(e){o$1q.typeOf.number("SkyBox.uSpeed",e),this._uSpeed=e,this._axisChanged=!0}},VSpeed:{get:function(){return this._vSpeed},set:function(e){o$1q.typeOf.number("SkyBox.vSpeed",e),this._vSpeed=e,this._axisChanged=!0}},WSpeed:{get:function(){return this._wSpeed},set:function(e){o$1q.typeOf.number("SkyBox.wSpeed",e),this._wSpeed=e,this._axisChanged=!0}},horizontalRotationAngle:{get:function(){return this._horizontalRotationAngle},set:function(e){o$1q.typeOf.number("SkyBox.horizontalRotationAngle",e),this._horizontalRotationAngle=e,this._axisChanged=!0}}});var ae$1=new o$1p,S$1=new o$1p,w$2=new o$1p,C$5=new o$1p,ne$2=new o$1p(1,1,1),A$6=new n$13,d$b=new o$1p,P$4=0,R$4=p$1d.IDENTITY.clone(new p$1d);function t$8(){}h$5.prototype.update=function(e,t){oe$2(this)||LicenseChecker.LICENSECHECKER.verify("SkyBox");var i=this;if(this.show&&(e.mode===C$13.SCENE3D||e.mode===C$13.COLUMBUS_VIEW||e.mode===C$13.MORPHING)&&e.passes.render){var n=e.context;if(this._sources!==this.sources){this._sources=this.sources;var r=this.sources;if(!(e$2b(r.positiveX)&&e$2b(r.negativeX)&&e$2b(r.positiveY)&&e$2b(r.negativeY)&&e$2b(r.positiveZ)&&e$2b(r.negativeZ)))throw new t$16("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof r.positiveX!=typeof r.negativeX||typeof r.positiveX!=typeof r.positiveY||typeof r.positiveX!=typeof r.negativeY||typeof r.positiveX!=typeof r.positiveZ||typeof r.positiveX!=typeof r.negativeZ)throw new t$16("this.sources properties must all be the same type.");"string"==typeof r.positiveX?d$q(n,this._sources).then((function(e){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=e})):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new e$1M({context:n,source:r}))}this._imageUrl!==this.imageUrl&&!this._sources&&(this._imageUrl=this.imageUrl,this._PreprocessCubeMap=new b$r(n,this._imageUrl)),e$2b(this._PreprocessCubeMap)&&(this._PreprocessCubeMap.update(e),this._PreprocessCubeMap.ready&&(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=this._PreprocessCubeMap.cubeMap,this._PreprocessCubeMap=void 0));var o=this._command;if(e.mode===C$13.COLUMBUS_VIEW?o.modelMatrix=e.camera._actualInvTransform:o.modelMatrix=m$17.eastNorthUpToFixedFrame(e.camera._positionWC),o.removeAllFastBundleAndBindGroups(),this._axisChanged){var a=p$1d.multiplyByPoint(o.modelMatrix,o$1p.ZERO,ae$1),s=p$1d.multiplyByPoint(o.modelMatrix,o$1p.UNIT_X,S$1),l=p$1d.multiplyByPoint(o.modelMatrix,o$1p.UNIT_Y,w$2),u=p$1d.multiplyByPoint(o.modelMatrix,o$1p.UNIT_Z,C$5),c=o$1p.subtract(s,a,S$1),h=o$1p.subtract(l,a,w$2),d=o$1p.subtract(u,a,C$5),f=n$13.fromAxisAngle(c,this._uSpeed*performance.now()/1e5),p=n$13.fromAxisAngle(h,this._vSpeed*performance.now()/1e5),_=n$13.fromAxisAngle(d,this._wSpeed*performance.now()/1e5);this._horizontalRotationAngle&&(_=n$13.fromAxisAngle(d,this._horizontalRotationAngle));var m=n$13.multiply(f,n$13.multiply(p,_,A$6),A$6);d$b=n$13.computeAxis(m,d$b),P$4=Math.max(Math.max(Math.abs(this._uSpeed),Math.abs(this._vSpeed)),Math.abs(this._wSpeed)),this._axisChanged=!1}var g=p$1d.IDENTITY.clone(R$4);if(!o$1p.equals(d$b,o$1p.ZERO)&&!e.camera.bReflect){var x=P$4*performance.now()/1e5;this._horizontalRotationAngle&&(x=this._horizontalRotationAngle),g=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,n$13.fromAxisAngle(d$b,x),ne$2,R$4),p$1d.multiply(g,o.modelMatrix,o.modelMatrix)}if(!e$2b(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return i._cubeMap},u_rotateMatrix:function(){return p$1d.getRotation(o.modelMatrix,new p$1e)},u_alpha:function(){return i.alpha}};var v=O$y.createGeometry(O$y.fromDimensions({dimensions:new o$1p(2,2,2),vertexFormat:n$11.POSITION_ONLY})),y=this._attributeLocations=k$13.createAttributeLocations(v);o.vertexArray=c$12.fromGeometry({context:n,geometry:v,attributeLocations:y,bufferUsage:A$19.STATIC_DRAW}),o.renderState=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND})}if(!e$2b(o.shaderProgram)||this._useHdr!==t){var $=new s$U({defines:[t?"HDR":""],sources:[J$1]});o.shaderProgram=r$13.fromCache({name:"spSkyBox",context:n,vertexShaderSource:$$3,fragmentShaderSource:$,attributeLocations:this._attributeLocations}),this._useHdr=t}if(e$2b(this._cubeMap))return o}},h$5.prototype.isDestroyed=function(){return!1},h$5.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),i$10(this)},t$8.prototype.evaluate=function(e,t){t$16.throwInstantiationError()},t$8.prototype.evaluateColor=function(e,t){t$16.throwInstantiationError()},t$8.prototype.getShaderFunction=function(e,t,i,n){t$16.throwInstantiationError()};var rt$2="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color = texture2D(u_texture, v_textureCoordinates);\ngl_FragColor = czm_gammaCorrect(color);\n}\n",et$1="uniform float u_radiusTS;\nvarying vec2 v_textureCoordinates;\nvec2 rotate(vec2 p, vec2 direction)\n{\nreturn vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);\n}\nvec4 addBurst(vec2 position, vec2 direction, float lengthScalar)\n{\nvec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);\nfloat radius = length(rotatedPosition) * lengthScalar;\nfloat burst = 1.0 - smoothstep(0.0, 0.55, radius);\nreturn vec4(burst);\n}\nvoid main()\n{\nfloat lengthScalar = 2.0 / sqrt(2.0);\nvec2 position = v_textureCoordinates - vec2(0.5);\nfloat radius = length(position) * lengthScalar;\nfloat surface = step(radius, u_radiusTS);\nvec4 color = vec4(vec2(1.0), surface + 0.2, surface);\nfloat glow = 1.0 - smoothstep(0.0, 0.55, radius);\ncolor.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;\nvec4 burst = vec4(0.0);\nburst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar);\nburst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar);\nburst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar);\ncolor += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;\ngl_FragColor = clamp(color, vec4(0.0), vec4(1.0));\n}\n",it="attribute vec2 direction;\nuniform float u_size;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 position;\nif (czm_morphTime == 1.0)\n{\nposition = vec4(czm_sunPositionWC, 1.0);\n}\nelse\n{\nposition = vec4(czm_sunPositionColumbusView.zxy, 1.0);\n}\nvec4 positionEC = czm_view * position;\nvec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\nvec2 halfSize = vec2(u_size * 0.5);\nhalfSize *= ((direction * 2.0) - 1.0);\ngl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);\nv_textureCoordinates = direction;\n}\n",nt$1="attribute direction : vec2<f32>;\n\nuniform u_size : f32;\n\nvarying v_textureCoordinates : vec2<f32>;\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs { \n var position : vec4<f32>;\n if (uniforms.czm_morphTime == 1.0)\n {\n position = vec4<f32>(uniforms.czm_sunPositionWC, 1.0);\n }\n else\n {\n position = vec4<f32>(uniforms.czm_sunPositionColumbusView.zxy, 1.0);\n }\n \n var positionEC = uniforms.czm_view * position;\n var positionWC = czm_eyeToWindowCoordinates(positionEC);\n \n var halfSize = vec2<f32>(uniforms.u_size * 0.5);\n halfSize *= ((direction * 2.0) - 1.0);\n \n gl_Position = uniforms.czm_viewportOrthographic * vec4<f32>(positionWC.xy + halfSize, -positionWC.z, 1.0);\n \n v_textureCoordinates = direction;\n}\n",at$2="\nvar u_texture : texture_2d<f32>;\nvar u_textureSampler : sampler;\n\nvarying v_textureCoordinates : vec2<f32>;\n\nfn gammaCorrect(color : vec4<f32>) -> vec4<f32>\n{\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3(uniforms.czm_gamma));\n#endif\n return color;\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var color = textureSample(u_texture, u_textureSampler, v_textureCoordinates);\n gl_FragColor = gammaCorrect(color);\n}\n";function u$5(){this.show=!0,this._drawCommand=new i$_({primitiveType:W$18.TRIANGLES,boundingVolume:new i$1c,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new i$1c,this._boundingVolume2D=new i$1c,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;var e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(u$5.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var ut$2=new o$1o,st=new o$1o,dt$1=new e$29,s$8=new e$29;u$5.prototype.update=function(e,t,i){if(this.show){var n=e.mode;if(n!==C$13.SCENE2D&&n!==C$13.MORPHING&&e.passes.render){var r=e.context,o=t.viewport.width,a=t.viewport.height;if(!e$2b(this._texture)||o!==this._drawingBufferWidth||a!==this._drawingBufferHeight||this._glowFactorDirty||i!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=o,this._drawingBufferHeight=a,this._glowFactorDirty=!1,this._useHdr=i;var s=Math.max(o,a);s=Math.pow(2,Math.ceil(Math.log(s)/Math.log(2))-2),s=Math.max(1,s);var l=i?r.halfFloatingPointTexture?_$$.HALF_FLOAT:_$$.FLOAT:_$$.UNSIGNED_BYTE;this._texture=new t$V({context:r,width:s,height:s,pixelFormat:V$10.RGBA,pixelDatatype:l}),this._glowLengthTS=5*this._glowFactor,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;var u=this,c={u_radiusTS:function(){return u._radiusTS}},h=r$13.fromCache({name:"SunTextureSP",context:r,vertexShaderSource:ot$7,fragmentShaderSource:et$1,attributeLocations:{aPosition:0,textureCoordinates:1}});this._commands.computeCommand=new t$I({name:"Sun",shaderProgram:h,outputTexture:this._texture,uniformMap:c,persists:!1,owner:this,postExecute:function(){u._commands.computeCommand.shaderProgram._isReady()&&(u._commands.computeCommand=void 0)}})}var d=this._drawCommand;if(!e$2b(d.vertexArray)){var f={direction:0},p=new Float32Array(8);p[0]=0,p[1]=0,p[2]=255,p[3]=0,p[4]=255,p[5]=255,p[6]=0,p[7]=255;var _=t$Y.createVertexBuffer({context:r,typedArray:p,usage:A$19.STATIC_DRAW}),m=[{name:"direction",index:f.direction,vertexBuffer:_,componentsPerAttribute:2,normalize:!0,componentDatatype:S$12.FLOAT}],g=t$Y.createIndexBuffer({context:r,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT});d.vertexArray=new c$12({context:r,attributes:m,indexBuffer:g}),d.shaderProgram=r$13.fromCache({name:"spSun",context:r,vertexShaderSource:r.webgpu?nt$1:it,fragmentShaderSource:r.webgpu?at$2:rt$2,attributeLocations:f,useWGSL:r.webgpu}),d.renderState=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND}),d.uniformMap=this._uniformMap}var x=r.uniformState.sunPositionWC,v=r.uniformState.sunPositionColumbusView,y=this._boundingVolume,$=this._boundingVolume2D;o$1p.clone(x,y.center),$.center.x=v.z,$.center.y=v.x,$.center.z=v.y,y.radius=e$2a.SOLAR_RADIUS+e$2a.SOLAR_RADIUS*this._glowLengthTS,$.radius=y.radius,n===C$13.SCENE3D?i$1c.clone(y,d.boundingVolume):n===C$13.COLUMBUS_VIEW&&i$1c.clone($,d.boundingVolume);var b=s$Q.computeActualWgs84Position(e,x,s$8),T=o$1p.magnitude(o$1p.subtract(b,e.camera.position,s$8)),C=r.uniformState.projection,S=dt$1;S.x=0,S.y=0,S.z=-T,S.w=1;var w=p$1d.multiplyByVector(C,S,s$8),E=s$Q.clipToGLWindowCoordinates(t.viewport,w,ut$2);S.x=e$2a.SOLAR_RADIUS;var P=p$1d.multiplyByVector(C,S,s$8),A=s$Q.clipToGLWindowCoordinates(t.viewport,P,st);return this._size=o$1o.magnitude(o$1o.subtract(A,E,s$8)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands}}},u$5.prototype.isDestroyed=function(){return!1},u$5.prototype.destroy=function(){var e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),i$10(this)};var L$7=null;try{L$7=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function s$7(e,t,i){this.low=0|e,this.high=0|t,this.unsigned=!!i}function l$8(e){return!0===(e&&e.__isLong__)}s$7.prototype.__isLong__,Object.defineProperty(s$7.prototype,"__isLong__",{value:!0}),s$7.isLong=l$8;var M$4={},R$3={};function d$a(e,t){var i,n,r;return t?(r=0<=(e>>>=0)&&e<256)&&(n=R$3[e])?n:(i=e$1(e,(0|e)<0?-1:0,!0),r&&(R$3[e]=i),i):(r=-128<=(e|=0)&&e<128)&&(n=M$4[e])?n:(i=e$1(e,e<0?-1:0,!1),r&&(M$4[e]=i),i)}function v$5(e,t){if(isNaN(e))return t?U$4:q$3;if(t){if(e<0)return U$4;if(e>=Z$4)return H$2}else{if(e<=-P$3)return c$9;if(e+1>=P$3)return D$4}return e<0?v$5(-e,t).neg():e$1(e%T$4|0,e/T$4|0,t)}function e$1(e,t,i){return new s$7(e,t,i)}s$7.fromInt=d$a,s$7.fromNumber=v$5,s$7.fromBits=e$1;var x$4=Math.pow;function I$1(e,t,i){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return q$3;if("number"==typeof t?(i=t,t=!1):t=!!t,(i=i||10)<2||36<i)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return I$1(e.substring(1),t,i).neg();for(var r=v$5(x$4(i,8)),o=q$3,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),l=parseInt(e.substring(a,a+s),i);if(s<8){var u=v$5(x$4(i,s));o=o.mul(u).add(v$5(l))}else o=(o=o.mul(r)).add(v$5(l))}return o.unsigned=t,o}function O$4(e,t){return"number"==typeof e?v$5(e,t):"string"==typeof e?I$1(e,t):e$1(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}s$7.fromString=I$1,s$7.fromValue=O$4;var W$5=65536,C$4=1<<24,T$4=W$5*W$5,Z$4=T$4*T$4,P$3=Z$4/2,S=d$a(C$4),q$3=d$a(0);s$7.ZERO=q$3;var U$4=d$a(0,!0);s$7.UZERO=U$4;var b$7=d$a(1);s$7.ONE=b$7;var V$3=d$a(1,!0);s$7.UONE=V$3;var A$5=d$a(-1);s$7.NEG_ONE=A$5;var D$4=e$1(-1,2147483647,!1);s$7.MAX_VALUE=D$4;var H$2=e$1(-1,-1,!0);s$7.MAX_UNSIGNED_VALUE=H$2;var c$9=e$1(0,-2147483648,!1);s$7.MIN_VALUE=c$9;var h$4=s$7.prototype;h$4.toInt=function(){return this.unsigned?this.low>>>0:this.low},h$4.toNumber=function(){return this.unsigned?(this.high>>>0)*T$4+(this.low>>>0):this.high*T$4+(this.low>>>0)},h$4.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(c$9)){var t=v$5(e),i=this.div(t),n=i.mul(t).sub(this);return i.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var r=v$5(x$4(e,6),this.unsigned),o=this,a="";;){var s=o.div(r),l=(o.sub(s.mul(r)).toInt()>>>0).toString(e);if((o=s).isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},h$4.getHighBits=function(){return this.high},h$4.getHighBitsUnsigned=function(){return this.high>>>0},h$4.getLowBits=function(){return this.low},h$4.getLowBitsUnsigned=function(){return this.low>>>0},h$4.getNumBitsAbs=function(){if(this.isNegative())return this.eq(c$9)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},h$4.isZero=function(){return 0===this.high&&0===this.low},h$4.eqz=h$4.isZero,h$4.isNegative=function(){return!this.unsigned&&this.high<0},h$4.isPositive=function(){return this.unsigned||this.high>=0},h$4.isOdd=function(){return 1==(1&this.low)},h$4.isEven=function(){return 0==(1&this.low)},h$4.equals=function(e){return l$8(e)||(e=O$4(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},h$4.eq=h$4.equals,h$4.notEquals=function(e){return!this.eq(e)},h$4.neq=h$4.notEquals,h$4.ne=h$4.notEquals,h$4.lessThan=function(e){return this.comp(e)<0},h$4.lt=h$4.lessThan,h$4.lessThanOrEqual=function(e){return this.comp(e)<=0},h$4.lte=h$4.lessThanOrEqual,h$4.le=h$4.lessThanOrEqual,h$4.greaterThan=function(e){return this.comp(e)>0},h$4.gt=h$4.greaterThan,h$4.greaterThanOrEqual=function(e){return this.comp(e)>=0},h$4.gte=h$4.greaterThanOrEqual,h$4.ge=h$4.greaterThanOrEqual,h$4.compare=function(e){if(l$8(e)||(e=O$4(e)),this.eq(e))return 0;var t=this.isNegative(),i=e.isNegative();return t&&!i?-1:!t&&i?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},h$4.comp=h$4.compare,h$4.negate=function(){return!this.unsigned&&this.eq(c$9)?c$9:this.not().add(b$7)},h$4.neg=h$4.negate,h$4.add=function(e){l$8(e)||(e=O$4(e));var t=this.high>>>16,i=65535&this.high,n=this.low>>>16,r=65535&this.low,o=e.high>>>16,a=65535&e.high,s=e.low>>>16,l=0,u=0,c=0,h=0;return c+=(h+=r+(65535&e.low))>>>16,u+=(c+=n+s)>>>16,l+=(u+=i+a)>>>16,l+=t+o,e$1((c&=65535)<<16|(h&=65535),(l&=65535)<<16|(u&=65535),this.unsigned)},h$4.subtract=function(e){return l$8(e)||(e=O$4(e)),this.add(e.neg())},h$4.sub=h$4.subtract,h$4.multiply=function(e){if(this.isZero())return q$3;if(l$8(e)||(e=O$4(e)),L$7)return e$1(L$7.mul(this.low,this.high,e.low,e.high),L$7.get_high(),this.unsigned);if(e.isZero())return q$3;if(this.eq(c$9))return e.isOdd()?c$9:q$3;if(e.eq(c$9))return this.isOdd()?c$9:q$3;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(S)&&e.lt(S))return v$5(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,i=65535&this.high,n=this.low>>>16,r=65535&this.low,o=e.high>>>16,a=65535&e.high,s=e.low>>>16,l=65535&e.low,u=0,c=0,h=0,d=0;return h+=(d+=r*l)>>>16,c+=(h+=n*l)>>>16,h&=65535,c+=(h+=r*s)>>>16,u+=(c+=i*l)>>>16,c&=65535,u+=(c+=n*s)>>>16,c&=65535,u+=(c+=r*a)>>>16,u+=t*l+i*s+n*a+r*o,e$1((h&=65535)<<16|(d&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},h$4.mul=h$4.multiply,h$4.divide=function(e){if(l$8(e)||(e=O$4(e)),e.isZero())throw Error("division by zero");var t,i,n;if(L$7)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?e$1((this.unsigned?L$7.div_u:L$7.div_s)(this.low,this.high,e.low,e.high),L$7.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?U$4:q$3;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return U$4;if(e.gt(this.shru(1)))return V$3;n=U$4}else{if(this.eq(c$9))return e.eq(b$7)||e.eq(A$5)?c$9:e.eq(c$9)?b$7:(t=this.shr(1).div(e).shl(1)).eq(q$3)?e.isNegative()?b$7:A$5:(i=this.sub(e.mul(t)),n=t.add(i.div(e)));if(e.eq(c$9))return this.unsigned?U$4:q$3;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=q$3}for(i=this;i.gte(e);){t=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var r=Math.ceil(Math.log(t)/Math.LN2),o=r<=48?1:x$4(2,r-48),a=v$5(t),s=a.mul(e);s.isNegative()||s.gt(i);)s=(a=v$5(t-=o,this.unsigned)).mul(e);a.isZero()&&(a=b$7),n=n.add(a),i=i.sub(s)}return n},h$4.div=h$4.divide,h$4.modulo=function(e){return l$8(e)||(e=O$4(e)),L$7?e$1((this.unsigned?L$7.rem_u:L$7.rem_s)(this.low,this.high,e.low,e.high),L$7.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},h$4.mod=h$4.modulo,h$4.rem=h$4.modulo,h$4.not=function(){return e$1(~this.low,~this.high,this.unsigned)},h$4.and=function(e){return l$8(e)||(e=O$4(e)),e$1(this.low&e.low,this.high&e.high,this.unsigned)},h$4.or=function(e){return l$8(e)||(e=O$4(e)),e$1(this.low|e.low,this.high|e.high,this.unsigned)},h$4.xor=function(e){return l$8(e)||(e=O$4(e)),e$1(this.low^e.low,this.high^e.high,this.unsigned)},h$4.shiftLeft=function(e){return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$1(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):e$1(0,this.low<<e-32,this.unsigned)},h$4.shl=h$4.shiftLeft,h$4.shiftRight=function(e){return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$1(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):e$1(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},h$4.shr=h$4.shiftRight,h$4.shiftRightUnsigned=function(e){return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$1(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):e$1(32===e?this.high:this.high>>>e-32,0,this.unsigned)},h$4.shru=h$4.shiftRightUnsigned,h$4.shr_u=h$4.shiftRightUnsigned,h$4.rotateLeft=function(e){var t;return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?e$1(this.high,this.low,this.unsigned):e<32?(t=32-e,e$1(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),e$1(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},h$4.rotl=h$4.rotateLeft,h$4.rotateRight=function(e){var t;return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?e$1(this.high,this.low,this.unsigned):e<32?(t=32-e,e$1(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),e$1(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},h$4.rotr=h$4.rotateRight,h$4.toSigned=function(){return this.unsigned?e$1(this.low,this.high,!1):this},h$4.toUnsigned=function(){return this.unsigned?this:e$1(this.low,this.high,!0)},h$4.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},h$4.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},h$4.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},s$7.fromBytes=function(e,t,i){return i?s$7.fromBytesLE(e,t):s$7.fromBytesBE(e,t)},s$7.fromBytesLE=function(e,t){return new s$7(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},s$7.fromBytesBE=function(e,t){return new s$7(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var u$4=function(e,t,i){if(typeof e>"u"&&(e=u$4.DEFAULT_CAPACITY),typeof t>"u"&&(t=u$4.DEFAULT_ENDIAN),typeof i>"u"&&(i=u$4.DEFAULT_NOASSERT),!i){if((e|=0)<0)throw RangeError("Illegal capacity");t=!!t,i=!!i}this.buffer=0===e?x$3:new ArrayBuffer(e),this.view=0===e?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=e,this.littleEndian=t,this.noAssert=i};u$4.VERSION="5.0.1",u$4.LITTLE_ENDIAN=!0,u$4.BIG_ENDIAN=!1,u$4.DEFAULT_CAPACITY=16,u$4.DEFAULT_ENDIAN=u$4.BIG_ENDIAN,u$4.DEFAULT_NOASSERT=!1,u$4.Long=s$7||null;var l$7=u$4.prototype;l$7.__isByteBuffer__,Object.defineProperty(l$7,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var x$3=new ArrayBuffer(0),I=String.fromCharCode;function c$8(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function d$9(){var e=[],t=[];return function(){if(0===arguments.length)return t.join("")+I.apply(String,e);e.length+arguments.length>1024&&(t.push(I.apply(String,e)),e.length=0),Array.prototype.push.apply(e,arguments)}}function E$3(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)}function m$7(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_}u$4.accessor=function(){return Uint8Array},u$4.allocate=function(e,t,i){return new u$4(e,t,i)},u$4.concat=function(e,t,i,n){("boolean"==typeof t||"string"!=typeof t)&&(n=i,i=t,t=void 0);for(var r,o=0,a=0,s=e.length;a<s;++a)u$4.isByteBuffer(e[a])||(e[a]=u$4.wrap(e[a],t)),(r=e[a].limit-e[a].offset)>0&&(o+=r);if(0===o)return new u$4(0,i,n);var l,u=new u$4(o,i,n);for(a=0;a<s;)!((r=(l=e[a++]).limit-l.offset)<=0)&&(u.view.set(l.view.subarray(l.offset,l.limit),u.offset),u.offset+=r);return u.limit=u.offset,u.offset=0,u},u$4.isByteBuffer=function(e){return!0===(e&&e.__isByteBuffer__)},u$4.type=function(){return ArrayBuffer},u$4.wrap=function(e,t,i,n){if("string"!=typeof t&&(n=i,i=t,t=void 0),"string"==typeof e)switch(typeof t>"u"&&(t="utf8"),t){case"base64":return u$4.fromBase64(e,i);case"hex":return u$4.fromHex(e,i);case"binary":return u$4.fromBinary(e,i);case"utf8":return u$4.fromUTF8(e,i);case"debug":return u$4.fromDebug(e,i);default:throw Error("Unsupported encoding: "+t)}if(null===e||"object"!=typeof e)throw TypeError("Illegal buffer");var r;if(u$4.isByteBuffer(e))return(r=l$7.clone.call(e)).markedOffset=-1,r;if(e instanceof Uint8Array)r=new u$4(0,i,n),e.length>0&&(r.buffer=e.buffer,r.offset=e.byteOffset,r.limit=e.byteOffset+e.byteLength,r.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)r=new u$4(0,i,n),e.byteLength>0&&(r.buffer=e,r.offset=0,r.limit=e.byteLength,r.view=e.byteLength>0?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");(r=new u$4(e.length,i,n)).limit=e.length;for(var o=0;o<e.length;++o)r.view[o]=e[o]}return r},l$7.writeBitSet=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t,o=e.length,a=o>>3,s=0;for(t+=this.writeVarint32(o,t);a--;)n=1&!!e[s++]|(1&!!e[s++])<<1|(1&!!e[s++])<<2|(1&!!e[s++])<<3|(1&!!e[s++])<<4|(1&!!e[s++])<<5|(1&!!e[s++])<<6|(1&!!e[s++])<<7,this.writeByte(n,t++);if(s<o){var l=0;for(n=0;s<o;)n|=(1&!!e[s++])<<l++;this.writeByte(n,t++)}return i?(this.offset=t,this):t-r},l$7.readBitSet=function(e){var t=typeof e>"u";t&&(e=this.offset);var i,n=this.readVarint32(e),r=n.value,o=r>>3,a=0,s=[];for(e+=n.length;o--;)i=this.readByte(e++),s[a++]=!!(1&i),s[a++]=!!(2&i),s[a++]=!!(4&i),s[a++]=!!(8&i),s[a++]=!!(16&i),s[a++]=!!(32&i),s[a++]=!!(64&i),s[a++]=!!(128&i);if(a<r){var l=0;for(i=this.readByte(e++);a<r;)s[a++]=!!(i>>l++&1)}return t&&(this.offset=e),s},l$7.readBytes=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}var n=this.slice(t,t+e);return i&&(this.offset+=e),n},l$7.writeBytes=l$7.append,l$7.writeInt8=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=1,this.view[t]=e,i&&(this.offset+=1),this},l$7.writeByte=l$7.writeInt8,l$7.readInt8=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=this.view[e];return 128==(128&i)&&(i=-(255-i+1)),t&&(this.offset+=1),i},l$7.readByte=l$7.readInt8,l$7.writeUint8=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=1,this.view[t]=e,i&&(this.offset+=1),this},l$7.writeUInt8=l$7.writeUint8,l$7.readUint8=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=this.view[e];return t&&(this.offset+=1),i},l$7.readUInt8=l$7.readUint8,l$7.writeInt16=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),i&&(this.offset+=2),this},l$7.writeShort=l$7.writeInt16,l$7.readInt16=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e],i|=this.view[e+1]<<8):(i=this.view[e]<<8,i|=this.view[e+1]),32768==(32768&i)&&(i=-(65535-i+1)),t&&(this.offset+=2),i},l$7.readShort=l$7.readInt16,l$7.writeUint16=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),i&&(this.offset+=2),this},l$7.writeUInt16=l$7.writeUint16,l$7.readUint16=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e],i|=this.view[e+1]<<8):(i=this.view[e]<<8,i|=this.view[e+1]),t&&(this.offset+=2),i},l$7.readUInt16=l$7.readUint16,l$7.writeInt32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),i&&(this.offset+=4),this},l$7.writeInt=l$7.writeInt32,l$7.readInt32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0),i|=0,t&&(this.offset+=4),i},l$7.readInt=l$7.readInt32,l$7.writeUint32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),i&&(this.offset+=4),this},l$7.writeUInt32=l$7.writeUint32,l$7.readUint32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0),t&&(this.offset+=4),i},l$7.readUInt32=l$7.readUint32,s$7&&(l$7.writeInt64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s$7.fromNumber(e);else if("string"==typeof e)e=s$7.fromString(e);else if(!(e&&e instanceof s$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s$7.fromNumber(e):"string"==typeof e&&(e=s$7.fromString(e)),t+=8;var n=this.buffer.byteLength;t>n&&this.resize((n*=2)>t?n:t),t-=8;var r=e.low,o=e.high;return this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=o>>>24&255,this.view[t+2]=o>>>16&255,this.view[t+1]=o>>>8&255,this.view[t]=255&o):(this.view[t]=o>>>24&255,this.view[t+1]=o>>>16&255,this.view[t+2]=o>>>8&255,this.view[t+3]=255&o,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),i&&(this.offset+=8),this},l$7.writeLong=l$7.writeInt64,l$7.readInt64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=0,n=0;this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0);var r=new s$7(i,n,!1);return t&&(this.offset+=8),r},l$7.readLong=l$7.readInt64,l$7.writeUint64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s$7.fromNumber(e);else if("string"==typeof e)e=s$7.fromString(e);else if(!(e&&e instanceof s$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s$7.fromNumber(e):"string"==typeof e&&(e=s$7.fromString(e)),t+=8;var n=this.buffer.byteLength;t>n&&this.resize((n*=2)>t?n:t),t-=8;var r=e.low,o=e.high;return this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=o>>>24&255,this.view[t+2]=o>>>16&255,this.view[t+1]=o>>>8&255,this.view[t]=255&o):(this.view[t]=o>>>24&255,this.view[t+1]=o>>>16&255,this.view[t+2]=o>>>8&255,this.view[t+3]=255&o,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),i&&(this.offset+=8),this},l$7.writeUInt64=l$7.writeUint64,l$7.readUint64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=0,n=0;this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0);var r=new s$7(i,n,!0);return t&&(this.offset+=8),r},l$7.readUInt64=l$7.readUint64),l$7.writeFloat32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,m$7(this.view,e,t,this.littleEndian,23,4),i&&(this.offset+=4),this},l$7.writeFloat=l$7.writeFloat32,l$7.readFloat32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=E$3(this.view,e,this.littleEndian,23,4);return t&&(this.offset+=4),i},l$7.readFloat=l$7.readFloat32,l$7.writeFloat64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=8,m$7(this.view,e,t,this.littleEndian,52,8),i&&(this.offset+=8),this},l$7.writeDouble=l$7.writeFloat64,l$7.readFloat64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=E$3(this.view,e,this.littleEndian,52,8);return t&&(this.offset+=8),i},l$7.readDouble=l$7.readFloat64,u$4.MAX_VARINT32_BYTES=5,u$4.calculateVarint32=function(e){return(e>>>=0)<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},u$4.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},u$4.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},l$7.writeVarint32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=u$4.calculateVarint32(e);t+=r;var o=this.buffer.byteLength;for(t>o&&this.resize((o*=2)>t?o:t),t-=r,e>>>=0;e>=128;)n=127&e|128,this.view[t++]=n,e>>>=7;return this.view[t++]=e,i?(this.offset=t,this):r},l$7.writeVarint32ZigZag=function(e,t){return this.writeVarint32(u$4.zigZagEncode32(e),t)},l$7.readVarint32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,n=0,r=0;do{if(!this.noAssert&&e>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}i=this.view[e++],n<5&&(r|=(127&i)<<7*n),++n}while(0!=(128&i));return r|=0,t?(this.offset=e,r):{value:r,length:n}},l$7.readVarint32ZigZag=function(e){var t=this.readVarint32(e);return"object"==typeof t?t.value=u$4.zigZagDecode32(t.value):t=u$4.zigZagDecode32(t),t},s$7&&(u$4.MAX_VARINT64_BYTES=10,u$4.calculateVarint64=function(e){"number"==typeof e?e=s$7.fromNumber(e):"string"==typeof e&&(e=s$7.fromString(e));var t=e.toInt()>>>0,i=e.shiftRightUnsigned(28).toInt()>>>0,n=e.shiftRightUnsigned(56).toInt()>>>0;return 0==n?0==i?t<16384?t<128?1:2:t<1<<21?3:4:i<16384?i<128?5:6:i<1<<21?7:8:n<128?9:10},u$4.zigZagEncode64=function(e){return"number"==typeof e?e=s$7.fromNumber(e,!1):"string"==typeof e?e=s$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},u$4.zigZagDecode64=function(e){return"number"==typeof e?e=s$7.fromNumber(e,!1):"string"==typeof e?e=s$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(s$7.ONE).toSigned().negate()).toSigned()},l$7.writeVarint64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s$7.fromNumber(e);else if("string"==typeof e)e=s$7.fromString(e);else if(!(e&&e instanceof s$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s$7.fromNumber(e,!1):"string"==typeof e?e=s$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned());var n=u$4.calculateVarint64(e),r=e.toInt()>>>0,o=e.shiftRightUnsigned(28).toInt()>>>0,a=e.shiftRightUnsigned(56).toInt()>>>0;t+=n;var s=this.buffer.byteLength;switch(t>s&&this.resize((s*=2)>t?s:t),t-=n,n){case 10:this.view[t+9]=a>>>7&1;case 9:this.view[t+8]=9!==n?128|a:127&a;case 8:this.view[t+7]=8!==n?o>>>21|128:o>>>21&127;case 7:this.view[t+6]=7!==n?o>>>14|128:o>>>14&127;case 6:this.view[t+5]=6!==n?o>>>7|128:o>>>7&127;case 5:this.view[t+4]=5!==n?128|o:127&o;case 4:this.view[t+3]=4!==n?r>>>21|128:r>>>21&127;case 3:this.view[t+2]=3!==n?r>>>14|128:r>>>14&127;case 2:this.view[t+1]=2!==n?r>>>7|128:r>>>7&127;case 1:this.view[t]=1!==n?128|r:127&r}return i?(this.offset+=n,this):n},l$7.writeVarint64ZigZag=function(e,t){return this.writeVarint64(u$4.zigZagEncode64(e),t)},l$7.readVarint64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=e,n=0,r=0,o=0,a=0;if(n=127&(a=this.view[e++]),128&a&&(n|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&typeof a>"u")&&(n|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&typeof a>"u")&&(n|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&typeof a>"u")&&(r=127&(a=this.view[e++]),(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&typeof a>"u")&&(o=127&(a=this.view[e++]),(128&a||this.noAssert&&typeof a>"u")&&(o|=(127&(a=this.view[e++]))<<7,128&a||this.noAssert&&typeof a>"u"))))))))))throw Error("Buffer overrun");var s=s$7.fromBits(n|r<<28,r>>>4|o<<24,!1);return t?(this.offset=e,s):{value:s,length:e-i}},l$7.readVarint64ZigZag=function(e){var t=this.readVarint64(e);return t&&t.value instanceof s$7?t.value=u$4.zigZagDecode64(t.value):t=u$4.zigZagDecode64(t),t}),l$7.writeCString=function(e,t){var i=typeof t>"u";i&&(t=this.offset);var n,r=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(n=0;n<r;++n)if(0===e.charCodeAt(n))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}r=b$6.calculateUTF16asUTF8(c$8(e))[1],t+=r+1;var o=this.buffer.byteLength;return t>o&&this.resize((o*=2)>t?o:t),t-=r+1,b$6.encodeUTF16toUTF8(c$8(e),function(e){this.view[t++]=e}.bind(this)),this.view[t++]=0,i?(this.offset=t,this):r},l$7.readCString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,n=e,r=-1;return b$6.decodeUTF8toUTF16(function(){if(0===r)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return 0===(r=this.view[e++])?null:r}.bind(this),i=d$9(),!0),t?(this.offset=e,i()):{string:i(),length:e-n}},l$7.writeIString=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t;n=b$6.calculateUTF16asUTF8(c$8(e),this.noAssert)[1],t+=4+n;var o=this.buffer.byteLength;if(t>o&&this.resize((o*=2)>t?o:t),t-=4+n,this.littleEndian?(this.view[t+3]=n>>>24&255,this.view[t+2]=n>>>16&255,this.view[t+1]=n>>>8&255,this.view[t]=255&n):(this.view[t]=n>>>24&255,this.view[t+1]=n>>>16&255,this.view[t+2]=n>>>8&255,this.view[t+3]=255&n),t+=4,b$6.encodeUTF16toUTF8(c$8(e),function(e){this.view[t++]=e}.bind(this)),t!==r+4+n)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+n));return i?(this.offset=t,this):t-r},l$7.readIString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=e,n=this.readUint32(e),r=this.readUTF8String(n,u$4.METRICS_BYTES,e+=4);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-i}},u$4.METRICS_CHARS="c",u$4.METRICS_BYTES="b",l$7.writeUTF8String=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t;n=b$6.calculateUTF16asUTF8(c$8(e))[1],t+=n;var o=this.buffer.byteLength;return t>o&&this.resize((o*=2)>t?o:t),t-=n,b$6.encodeUTF16toUTF8(c$8(e),function(e){this.view[t++]=e}.bind(this)),i?(this.offset=t,this):t-r},l$7.writeString=l$7.writeUTF8String,u$4.calculateUTF8Chars=function(e){return b$6.calculateUTF16asUTF8(c$8(e))[0]},u$4.calculateUTF8Bytes=function(e){return b$6.calculateUTF16asUTF8(c$8(e))[1]},u$4.calculateString=u$4.calculateUTF8Bytes,l$7.readUTF8String=function(e,t,i){"number"==typeof t&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),typeof t>"u"&&(t=u$4.METRICS_CHARS),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var r,o=0,a=i;if(t===u$4.METRICS_CHARS){if(r=d$9(),b$6.decodeUTF8(function(){return o<e&&i<this.limit?this.view[i++]:null}.bind(this),(function(e){++o,b$6.UTF8toUTF16(e,r)})),o!==e)throw RangeError("Illegal range: Truncated data, "+o+" == "+e);return n?(this.offset=i,r()):{string:r(),length:i-a}}if(t===u$4.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+"+e+") <= "+this.buffer.byteLength)}var s=i+e;if(b$6.decodeUTF8toUTF16(function(){return i<s?this.view[i++]:null}.bind(this),r=d$9(),this.noAssert),i!==s)throw RangeError("Illegal range: Truncated data, "+i+" == "+s);return n?(this.offset=i,r()):{string:r(),length:i-a}}throw TypeError("Unsupported metrics: "+t)},l$7.readString=l$7.readUTF8String,l$7.writeVString=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r,o=t;n=b$6.calculateUTF16asUTF8(c$8(e),this.noAssert)[1],r=u$4.calculateVarint32(n),t+=r+n;var a=this.buffer.byteLength;if(t>a&&this.resize((a*=2)>t?a:t),t-=r+n,t+=this.writeVarint32(n,t),b$6.encodeUTF16toUTF8(c$8(e),function(e){this.view[t++]=e}.bind(this)),t!==o+n+r)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+n+r));return i?(this.offset=t,this):t-o},l$7.readVString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=e,n=this.readVarint32(e),r=this.readUTF8String(n.value,u$4.METRICS_BYTES,e+=n.length);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-i}},l$7.append=function(e,t,i){("number"==typeof t||"string"!=typeof t)&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}e instanceof u$4||(e=u$4.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;i+=r;var o=this.buffer.byteLength;return i>o&&this.resize((o*=2)>i?o:i),i-=r,this.view.set(e.view.subarray(e.offset,e.limit),i),e.offset+=r,n&&(this.offset+=r),this},l$7.appendTo=function(e,t){return e.append(this,t),this},l$7.assert=function(e){return this.noAssert=!e,this},l$7.capacity=function(){return this.buffer.byteLength},l$7.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},l$7.clone=function(e){var t=new u$4(0,this.littleEndian,this.noAssert);return e?(t.buffer=new ArrayBuffer(this.buffer.byteLength),t.view=new Uint8Array(t.buffer)):(t.buffer=this.buffer,t.view=this.view),t.offset=this.offset,t.markedOffset=this.markedOffset,t.limit=this.limit,t},l$7.compact=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var i=t-e;if(0===i)return this.buffer=x$3,this.view=null,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(i),r=new Uint8Array(n);return r.set(this.view.subarray(e,t)),this.buffer=n,this.view=r,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=i,this},l$7.copy=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(e===t)return new u$4(0,this.littleEndian,this.noAssert);var i=t-e,n=new u$4(i,this.littleEndian,this.noAssert);return n.offset=0,n.limit=i,n.markedOffset>=0&&(n.markedOffset-=e),this.copyTo(n,0,e,t),n},l$7.copyTo=function(e,t,i,n){var r,o;if(!this.noAssert&&!u$4.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(t=(o=typeof t>"u")?e.offset:0|t,i=(r=typeof i>"u")?this.offset:0|i,n=typeof n>"u"?this.limit:0|n,t<0||t>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+t+" <= "+e.buffer.byteLength);if(i<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+i+" <= "+this.buffer.byteLength);var a=n-i;return 0===a?e:(e.ensureCapacity(t+a),e.view.set(this.view.subarray(i,n),t),r&&(this.offset+=a),o&&(e.offset+=a),this)},l$7.ensureCapacity=function(e){var t=this.buffer.byteLength;return t<e?this.resize((t*=2)>e?t:e):this},l$7.fill=function(e,t,i){var n=typeof t>"u";if(n&&(t=this.offset),"string"==typeof e&&e.length>0&&(e=e.charCodeAt(0)),typeof t>"u"&&(t=this.offset),typeof i>"u"&&(i=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(t>=i)return this;for(;t<i;)this.view[t++]=e;return n&&(this.offset=t),this},l$7.flip=function(){return this.limit=this.offset,this.offset=0,this},l$7.mark=function(e){if(e=typeof e>"u"?this.offset:e,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},l$7.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},l$7.LE=function(e){return this.littleEndian=!(typeof e<"u")||!!e,this},l$7.BE=function(e){return this.littleEndian=typeof e<"u"&&!e,this},l$7.prepend=function(e,t,i){("number"==typeof t||"string"!=typeof t)&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}e instanceof u$4||(e=u$4.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;var o=r-i;if(o>0){var a=new ArrayBuffer(this.buffer.byteLength+o),s=new Uint8Array(a);s.set(this.view.subarray(i,this.buffer.byteLength),r),this.buffer=a,this.view=s,this.offset+=o,this.markedOffset>=0&&(this.markedOffset+=o),this.limit+=o,i+=o}else new Uint8Array(this.buffer);return this.view.set(e.view.subarray(e.offset,e.limit),i-r),e.offset=e.limit,n&&(this.offset-=r),this},l$7.prependTo=function(e,t){return e.prepend(this,t),this},l$7.printDebug=function(e){"function"!=typeof e&&(e=console.log.bind(console)),e(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},l$7.remaining=function(){return this.limit-this.offset},l$7.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},l$7.resize=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal capacity: "+e+" (not an integer)");if((e|=0)<0)throw RangeError("Illegal capacity: 0 <= "+e)}if(this.buffer.byteLength<e){var t=new ArrayBuffer(e),i=new Uint8Array(t);i.set(this.view),this.buffer=t,this.view=i}return this},l$7.reverse=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t||Array.prototype.reverse.call(this.view.subarray(e,t)),this},l$7.skip=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},l$7.slice=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i=this.clone();return i.offset=e,i.limit=t,i},l$7.toBuffer=function(e){var t=this.offset,i=this.limit;if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal limit: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(!e&&0===t&&i===this.buffer.byteLength)return this.buffer;if(t===i)return x$3;var n=new ArrayBuffer(i-t);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(t,i),0),n},l$7.toArrayBuffer=l$7.toBuffer,l$7.toString=function(e,t,i){if(typeof e>"u")return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof e&&(i=t=e="utf8"),e){case"utf8":return this.toUTF8(t,i);case"base64":return this.toBase64(t,i);case"hex":return this.toHex(t,i);case"binary":return this.toBinary(t,i);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var T$3=function(){for(var e={},t=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],i=[],n=0,r=t.length;n<r;++n)i[t[n]]=n;return e.encode=function(e,i){for(var n,r;null!==(n=e());)i(t[n>>2&63]),r=(3&n)<<4,null!==(n=e())?(i(t[63&((r|=n>>4&15)|n>>4&15)]),r=(15&n)<<2,null!==(n=e())?(i(t[63&(r|n>>6&3)]),i(t[63&n])):(i(t[63&r]),i(61))):(i(t[63&r]),i(61),i(61))},e.decode=function(e,t){var n,r,o;function a(e){throw Error("Illegal character code: "+e)}for(;null!==(n=e());)if(typeof(r=i[n])>"u"&&a(n),null!==(n=e())&&(typeof(o=i[n])>"u"&&a(n),t(r<<2>>>0|(48&o)>>4),null!==(n=e()))){if(typeof(r=i[n])>"u"){if(61===n)break;a(n)}if(t((15&o)<<4>>>0|(60&r)>>2),null!==(n=e())){if(typeof(o=i[n])>"u"){if(61===n)break;a(n)}t((3&r)<<6>>>0|o)}}},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},e}();l$7.toBase64=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity||e>t)throw RangeError("begin, end");var i;return T$3.encode(function(){return e<t?this.view[e++]:null}.bind(this),i=d$9()),i()},u$4.fromBase64=function(e,t){if("string"!=typeof e)throw TypeError("str");var i=new u$4(e.length/4*3,t),n=0;return T$3.decode(c$8(e),(function(e){i.view[n++]=e})),i.limit=n,i},u$4.btoa=function(e){return u$4.fromBinary(e).toBase64()},u$4.atob=function(e){return u$4.fromBase64(e).toBinary()},l$7.toBinary=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity()||e>t)throw RangeError("begin, end");if(e===t)return"";for(var i=[],n=[];e<t;)i.push(this.view[e++]),i.length>=1024&&(n.push(String.fromCharCode.apply(String,i)),i=[]);return n.join("")+String.fromCharCode.apply(String,i)},u$4.fromBinary=function(e,t){if("string"!=typeof e)throw TypeError("str");for(var i,n=0,r=e.length,o=new u$4(r,t);n<r;){if((i=e.charCodeAt(n))>255)throw RangeError("illegal char code: "+i);o.view[n++]=i}return o.limit=r,o},l$7.toDebug=function(e){for(var t,i=-1,n=this.buffer.byteLength,r="",o="",a="";i<n;){if(-1!==i&&(r+=(t=this.view[i])<16?"0"+t.toString(16).toUpperCase():t.toString(16).toUpperCase(),e&&(o+=t>32&&t<127?String.fromCharCode(t):".")),++i,e&&i>0&&i%16==0&&i!==n){for(;r.length<51;)r+=" ";a+=r+o+"\n",r=o=""}i===this.offset&&i===this.limit?r+=i===this.markedOffset?"!":"|":i===this.offset?r+=i===this.markedOffset?"[":"<":i===this.limit?r+=i===this.markedOffset?"]":">":r+=i===this.markedOffset?"'":e||0!==i&&i!==n?" ":""}if(e&&" "!==r){for(;r.length<51;)r+=" ";a+=r+o+"\n"}return e?a:r},u$4.fromDebug=function(e,t,i){for(var n,r,o=e.length,a=new u$4((o+1)/3|0,t,i),s=0,l=0,u=!1,c=!1,h=!1,d=!1,f=!1;s<o;){switch(n=e.charAt(s++)){case"!":if(!i){if(c||h||d){f=!0;break}c=h=d=!0}a.offset=a.markedOffset=a.limit=l,u=!1;break;case"|":if(!i){if(c||d){f=!0;break}c=d=!0}a.offset=a.limit=l,u=!1;break;case"[":if(!i){if(c||h){f=!0;break}c=h=!0}a.offset=a.markedOffset=l,u=!1;break;case"<":if(!i){if(c){f=!0;break}c=!0}a.offset=l,u=!1;break;case"]":if(!i){if(d||h){f=!0;break}d=h=!0}a.limit=a.markedOffset=l,u=!1;break;case">":if(!i){if(d){f=!0;break}d=!0}a.limit=l,u=!1;break;case"'":if(!i){if(h){f=!0;break}h=!0}a.markedOffset=l,u=!1;break;case" ":u=!1;break;default:if(!i&&u){f=!0;break}if(r=parseInt(n+e.charAt(s++),16),!i&&(isNaN(r)||r<0||r>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[l++]=r,u=!0}if(f)throw TypeError("Illegal str: Invalid symbol at "+s)}if(!i){if(!c||!d)throw TypeError("Illegal str: Missing offset or limit");if(l<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+l+" < "+o)}return a},l$7.toHex=function(e,t){if(e=typeof e>"u"?this.offset:e,t=typeof t>"u"?this.limit:t,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var i,n=new Array(t-e);e<t;)(i=this.view[e++])<16?n.push("0",i.toString(16)):n.push(i.toString(16));return n.join("")},u$4.fromHex=function(e,t,i){if(!i){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if(e.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var n,r=e.length,o=new u$4(r/2|0,t),a=0,s=0;a<r;a+=2){if(n=parseInt(e.substring(a,a+2),16),!i&&(!isFinite(n)||n<0||n>255))throw TypeError("Illegal str: Contains non-hex characters");o.view[s++]=n}return o.limit=s,o};var b$6=function(){var e={MAX_CODEPOINT:1114111,encodeUTF8:function(e,t){var i=null;for("number"==typeof e&&(i=e,e=function(){return null});null!==i||null!==(i=e());)i<128?t(127&i):i<2048?(t(i>>6&31|192),t(63&i|128)):i<65536?(t(i>>12&15|224),t(i>>6&63|128),t(63&i|128)):(t(i>>18&7|240),t(i>>12&63|128),t(i>>6&63|128),t(63&i|128)),i=null},decodeUTF8:function(e,t){for(var i,n,r,o,a=function(e){e=e.slice(0,e.indexOf(null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(i=e());)if(0==(128&i))t(i);else if(192==(224&i))null===(n=e())&&a([i,n]),t((31&i)<<6|63&n);else if(224==(240&i))(null===(n=e())||null===(r=e()))&&a([i,n,r]),t((15&i)<<12|(63&n)<<6|63&r);else{if(240!=(248&i))throw RangeError("Illegal starting byte: "+i);(null===(n=e())||null===(r=e())||null===(o=e()))&&a([i,n,r,o]),t((7&i)<<18|(63&n)<<12|(63&r)<<6|63&o)}},UTF16toUTF8:function(e,t){for(var i,n=null;null!==(i=null!==n?n:e());)i>=55296&&i<=57343&&null!==(n=e())&&n>=56320&&n<=57343?(t(1024*(i-55296)+n-56320+65536),n=null):t(i);null!==n&&t(n)},UTF8toUTF16:function(e,t){var i=null;for("number"==typeof e&&(i=e,e=function(){return null});null!==i||null!==(i=e());)i<=65535?t(i):(t(55296+((i-=65536)>>10)),t(i%1024+56320)),i=null},encodeUTF16toUTF8:function(t,i){e.UTF16toUTF8(t,(function(t){e.encodeUTF8(t,i)}))},decodeUTF8toUTF16:function(t,i){e.decodeUTF8(t,(function(t){e.UTF8toUTF16(t,i)}))},calculateCodePoint:function(e){return e<128?1:e<2048?2:e<65536?3:4},calculateUTF8:function(e){for(var t,i=0;null!==(t=e());)i+=t<128?1:t<2048?2:t<65536?3:4;return i},calculateUTF16asUTF8:function(t){var i=0,n=0;return e.UTF16toUTF8(t,(function(e){++i,n+=e<128?1:e<2048?2:e<65536?3:4})),[i,n]}};return e}();l$7.toUTF8=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i;try{b$6.decodeUTF8toUTF16(function(){return e<t?this.view[e++]:null}.bind(this),i=d$9())}catch{if(e!==t)throw RangeError("Illegal range: Truncated data, "+e+" != "+t)}return i()},u$4.fromUTF8=function(e,t,i){if(!i&&"string"!=typeof e)throw TypeError("Illegal str: Not a string");var n=new u$4(b$6.calculateUTF16asUTF8(c$8(e),!0)[1],t,i),r=0;return b$6.encodeUTF16toUTF8(c$8(e),(function(e){n.view[r++]=e})),n.limit=r,n};var f$7={};function h$3(e){e=u$_(e,u$_.EMPTY_OBJECT),this.proxy=e.proxy,this.viewer=e.viewer,this.url=e.url,this.metadata=u$_(e.metadata,{boundBox:{minX:-180,minY:-90,maxX:180,maxY:90},minLevel:1,maxLevel:20}),this.roadMetadata=e.roadMetadata,this.roadUrl=e.roadUrl,this.labelGraphics=e.labelGraphics?e.labelGraphics:{},this.billboardGraphics=e.billboardGraphics?e.billboardGraphics:{},this.aotuCollide=u$_(e.aotuCollide,!0),this.collisionPadding=e.collisionPadding?e.collisionPadding:[3,5,3,5],this.serverFirstStyle=u$_(e.serverFirstStyle,!0),this.subdomains=e.subdomains,Array.isArray(this.subdomains)?this.subdomains=this.subdomains.slice():e$2b(this.subdomains)&&0<this.subdomains.length?this.subdomains=this.subdomains.split(""):this.subdomains=["t0","t1","t2","t3","t4","t5","t6","t7"],this.token=e.token,this.depthTestOptimization=u$_(e.depthTestOptimization,!1),this.dTOElevation=u$_(e.dTOElevation,2e4),this.dTOPitch=u$_(e.dTOPitch,-1.22),this.tileCache=[],this.labelCache=[],this._isInitial=!1,this._latelyGrid=[],this._latelyRefreshStamp=0,this._latelyCollisionStamp=0;var t=e$1Q();this._UUID="TDT_WTFS_LABEL_"+t,this._UUIDRoad="TDT_WTFS_LABEL_ROAD_"+t,this._isDTP=!1,this.viewer.camera.percentageChanged=.18,this.bindEvent()}function G$2(e,t){return t.minX>=e.minX&&t.minX<=e.maxX&&t.minY>=e.minY&&t.minY<=e.maxY||t.maxX>=e.minX&&t.maxX<=e.maxX&&t.maxY>=e.minY&&t.maxY<=e.maxY||t.minX>=e.minX&&t.minX<=e.maxX&&t.maxY>=e.minY&&t.maxY<=e.maxY||t.maxX>=e.minX&&t.maxX<=e.maxX&&t.minY>=e.minY&&t.minY<=e.maxY}function F$2(e){return e.coord.x}function q$2(e){return e.coord.y}function A$4(e){return{x:e.anno.collisionBox.x,y:e.anno.collisionBox.y,width:e.anno.collisionBox.width,height:e.anno.collisionBox.height}}function V$2(e,t,i,n,r,o,a,s){a.anno;var l=s,u={x:i,y:n,width:r-i,height:o-n},c=l.x,h=l.y,d=u.x,f=u.y;return!(c>d+u.width||c+l.width<d||h+l.height<f||h>f+u.height)}f$7.ByteBuffer=u$4,f$7.Long=u$4.Long||null,f$7.VERSION="5.0.3",f$7.WIRE_TYPES={},f$7.WIRE_TYPES.VARINT=0,f$7.WIRE_TYPES.BITS64=1,f$7.WIRE_TYPES.LDELIM=2,f$7.WIRE_TYPES.STARTGROUP=3,f$7.WIRE_TYPES.ENDGROUP=4,f$7.WIRE_TYPES.BITS32=5,f$7.PACKABLE_WIRE_TYPES=[f$7.WIRE_TYPES.VARINT,f$7.WIRE_TYPES.BITS64,f$7.WIRE_TYPES.BITS32],f$7.TYPES={int32:{name:"int32",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},uint32:{name:"uint32",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},sint32:{name:"sint32",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},int64:{name:"int64",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:f$7.Long?f$7.Long.ZERO:void 0},uint64:{name:"uint64",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:f$7.Long?f$7.Long.UZERO:void 0},sint64:{name:"sint64",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:f$7.Long?f$7.Long.ZERO:void 0},bool:{name:"bool",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:!1},double:{name:"double",wireType:f$7.WIRE_TYPES.BITS64,defaultValue:0},string:{name:"string",wireType:f$7.WIRE_TYPES.LDELIM,defaultValue:""},bytes:{name:"bytes",wireType:f$7.WIRE_TYPES.LDELIM,defaultValue:null},fixed32:{name:"fixed32",wireType:f$7.WIRE_TYPES.BITS32,defaultValue:0},sfixed32:{name:"sfixed32",wireType:f$7.WIRE_TYPES.BITS32,defaultValue:0},fixed64:{name:"fixed64",wireType:f$7.WIRE_TYPES.BITS64,defaultValue:f$7.Long?f$7.Long.UZERO:void 0},sfixed64:{name:"sfixed64",wireType:f$7.WIRE_TYPES.BITS64,defaultValue:f$7.Long?f$7.Long.ZERO:void 0},float:{name:"float",wireType:f$7.WIRE_TYPES.BITS32,defaultValue:0},enum:{name:"enum",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},message:{name:"message",wireType:f$7.WIRE_TYPES.LDELIM,defaultValue:null},group:{name:"group",wireType:f$7.WIRE_TYPES.STARTGROUP,defaultValue:null}},f$7.MAP_KEY_TYPES=[f$7.TYPES.int32,f$7.TYPES.sint32,f$7.TYPES.sfixed32,f$7.TYPES.uint32,f$7.TYPES.fixed32,f$7.TYPES.int64,f$7.TYPES.sint64,f$7.TYPES.sfixed64,f$7.TYPES.uint64,f$7.TYPES.fixed64,f$7.TYPES.bool,f$7.TYPES.string,f$7.TYPES.bytes],f$7.ID_MIN=1,f$7.ID_MAX=536870911,f$7.convertFieldsToCamelCase=!1,f$7.populateAccessors=!0,f$7.populateDefaults=!0,f$7.Util=function(){var e={};return e.IS_NODE="object"==typeof process&&process+""=="[object process]"&&!process.browser,e.XHR=function(){for(var e=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],t=null,i=0;i<e.length;i++){try{t=e[i]()}catch{continue}break}if(!t)throw Error("XMLHttpRequest is not supported");return t},e.fetch=function(t,i){if(i&&"function"!=typeof i&&(i=null),e.IS_NODE){var n=require("fs");if(i)n.readFile(t,(function(e,t){i(e?null:""+t)}));else try{return n.readFileSync(t)}catch{return null}}else{var r=e.XHR();if(r.open("GET",t,!!i),r.setRequestHeader("Accept","text/plain"),"function"==typeof r.overrideMimeType&&r.overrideMimeType("text/plain"),!i)return r.send(null),200==r.status||0==r.status&&"string"==typeof r.responseText?r.responseText:null;if(r.onreadystatechange=function(){4==r.readyState&&(200==r.status||0==r.status&&"string"==typeof r.responseText?i(r.responseText):i(null))},4==r.readyState)return;r.send(null)}},e.toCamelCase=function(e){return e.replace(/_([a-zA-Z])/g,(function(e,t){return t.toUpperCase()}))},e}(),f$7.Lang={DELIM:/[\s\{\}=;:\[\],'"\(\)<>]/g,RULE:/^(?:required|optional|repeated|map)$/,TYPE:/^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,NAME:/^[a-zA-Z_][a-zA-Z_0-9]*$/,TYPEDEF:/^[a-zA-Z][a-zA-Z_0-9]*$/,TYPEREF:/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,FQTYPEREF:/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/,NUMBER:/^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,NUMBER_DEC:/^(?:[1-9][0-9]*|0)$/,NUMBER_HEX:/^0[xX][0-9a-fA-F]+$/,NUMBER_OCT:/^0[0-7]+$/,NUMBER_FLT:/^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,BOOL:/^(?:true|false)$/i,ID:/^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,NEGID:/^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,WHITESPACE:/\s/,STRING:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,STRING_DQ:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,STRING_SQ:/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},f$7.DotProto=function(e,t){var i={},n=function(e){this.source=e+"",this.index=0,this.line=1,this.stack=[],this._stringOpen=null},r=n.prototype;r._readString=function(){var e='"'===this._stringOpen?t.STRING_DQ:t.STRING_SQ;e.lastIndex=this.index-1;var i=e.exec(this.source);if(!i)throw Error("unterminated string");return this.index=e.lastIndex,this.stack.push(this._stringOpen),this._stringOpen=null,i[1]},r.next=function(){if(this.stack.length>0)return this.stack.shift();if(this.index>=this.source.length)return null;if(null!==this._stringOpen)return this._readString();var e,i,n;do{for(e=!1;t.WHITESPACE.test(n=this.source.charAt(this.index));)if("\n"===n&&++this.line,++this.index===this.source.length)return null;if("/"===this.source.charAt(this.index))if(++this.index,"/"===this.source.charAt(this.index)){for(;"\n"!==this.source.charAt(++this.index);)if(this.index==this.source.length)return null;++this.index,++this.line,e=!0}else{if("*"!==(n=this.source.charAt(this.index)))return"/";do{if("\n"===n&&++this.line,++this.index===this.source.length)return null;i=n,n=this.source.charAt(this.index)}while("*"!==i||"/"!==n);++this.index,e=!0}}while(e);if(this.index===this.source.length)return null;var r=this.index;if(t.DELIM.lastIndex=0,!t.DELIM.test(this.source.charAt(r++)))for(;r<this.source.length&&!t.DELIM.test(this.source.charAt(r));)++r;var o=this.source.substring(this.index,this.index=r);return('"'===o||"'"===o)&&(this._stringOpen=o),o},r.peek=function(){if(0===this.stack.length){var e=this.next();if(null===e)return null;this.stack.push(e)}return this.stack[0]},r.skip=function(e){var t=this.next();if(t!==e)throw Error("illegal '"+t+"', '"+e+"' expected")},r.omit=function(e){return this.peek()===e&&(this.next(),!0)},r.toString=function(){return"Tokenizer ("+this.index+"/"+this.source.length+" at line "+this.line+")"},i.Tokenizer=n;var o=function(e){this.tn=new n(e),this.proto3=!1},a=o.prototype;function s(e,i){var n=-1,r=1;if("-"==e.charAt(0)&&(r=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))n=parseInt(e);else if(t.NUMBER_HEX.test(e))n=parseInt(e.substring(2),16);else{if(!t.NUMBER_OCT.test(e))throw Error("illegal id value: "+(r<0?"-":"")+e);n=parseInt(e.substring(1),8)}if(n=r*n|0,!i&&n<0)throw Error("illegal id value: "+(r<0?"-":"")+e);return n}function l(e){var i=1;if("-"==e.charAt(0)&&(i=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))return i*parseInt(e,10);if(t.NUMBER_HEX.test(e))return i*parseInt(e.substring(2),16);if(t.NUMBER_OCT.test(e))return i*parseInt(e.substring(1),8);if("inf"===e)return i*(1/0);if("nan"===e)return NaN;if(t.NUMBER_FLT.test(e))return i*parseFloat(e);throw Error("illegal number value: "+(i<0?"-":"")+e)}function u(e,t,i){typeof e[t]>"u"?e[t]=i:(Array.isArray(e[t])||(e[t]=[e[t]]),e[t].push(i))}return a.parse=function(){var e,i,n={name:"[ROOT]",package:null,messages:[],enums:[],imports:[],options:{},services:[]},r=!0;try{for(;e=this.tn.next();)switch(e){case"package":if(!r||null!==n.package)throw Error("unexpected 'package'");if(e=this.tn.next(),!t.TYPEREF.test(e))throw Error("illegal package name: "+e);this.tn.skip(";"),n.package=e;break;case"import":if(!r)throw Error("unexpected 'import'");("public"===(e=this.tn.peek())||(i="weak"===e))&&this.tn.next(),e=this._readString(),this.tn.skip(";"),i||n.imports.push(e);break;case"syntax":if(!r)throw Error("unexpected 'syntax'");this.tn.skip("="),"proto3"===(n.syntax=this._readString())&&(this.proto3=!0),this.tn.skip(";");break;case"message":this._parseMessage(n,null),r=!1;break;case"enum":this._parseEnum(n),r=!1;break;case"option":this._parseOption(n);break;case"service":this._parseService(n);break;case"extend":this._parseExtend(n);break;default:throw Error("unexpected '"+e+"'")}}catch(e){throw e.message="Parse error at line "+this.tn.line+": "+e.message,e}return delete n.name,n},o.parse=function(e){return new o(e).parse()},a._readString=function(){var e,t,i="";do{if("'"!==(t=this.tn.next())&&'"'!==t)throw Error("illegal string delimiter: "+t);i+=this.tn.next(),this.tn.skip(t),e=this.tn.peek()}while('"'===e||'"'===e);return i},a._readValue=function(e){var i=this.tn.peek();if('"'===i||"'"===i)return this._readString();if(this.tn.next(),t.NUMBER.test(i))return l(i);if(t.BOOL.test(i))return"true"===i.toLowerCase();if(e&&t.TYPEREF.test(i))return i;throw Error("illegal value: "+i)},a._parseOption=function(e,i){var n=this.tn.next(),r=!1;if("("===n&&(r=!0,n=this.tn.next()),!t.TYPEREF.test(n))throw Error("illegal option name: "+n);var o=n;r&&(this.tn.skip(")"),o="("+o+")",n=this.tn.peek(),t.FQTYPEREF.test(n)&&(o+=n,this.tn.next())),this.tn.skip("="),this._parseOptionValue(e,o),i||this.tn.skip(";")},a._parseOptionValue=function(e,i){var n=this.tn.peek();if("{"!==n)u(e.options,i,this._readValue(!0));else for(this.tn.skip("{");"}"!==(n=this.tn.next());){if(!t.NAME.test(n))throw Error("illegal option name: "+i+"."+n);this.tn.omit(":")?u(e.options,i+"."+n,this._readValue(!0)):this._parseOptionValue(e,i+"."+n)}},a._parseService=function(e){var i=this.tn.next();if(!t.NAME.test(i))throw Error("illegal service name at line "+this.tn.line+": "+i);var n={name:i,rpc:{},options:{}};for(this.tn.skip("{");"}"!==(i=this.tn.next());)if("option"===i)this._parseOption(n);else{if("rpc"!==i)throw Error("illegal service token: "+i);this._parseServiceRPC(n)}this.tn.omit(";"),e.services.push(n)},a._parseServiceRPC=function(e){var i="rpc",n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal rpc service method name: "+n);var r=n,o={request:null,response:null,request_stream:!1,response_stream:!1,options:{}};if(this.tn.skip("("),"stream"===(n=this.tn.next()).toLowerCase()&&(o.request_stream=!0,n=this.tn.next()),!t.TYPEREF.test(n))throw Error("illegal rpc service request type: "+n);if(o.request=n,this.tn.skip(")"),"returns"!==(n=this.tn.next()).toLowerCase())throw Error("illegal rpc service request type delimiter: "+n);if(this.tn.skip("("),"stream"===(n=this.tn.next()).toLowerCase()&&(o.response_stream=!0,n=this.tn.next()),o.response=n,this.tn.skip(")"),"{"===(n=this.tn.peek())){for(this.tn.next();"}"!==(n=this.tn.next());){if("option"!==n)throw Error("illegal rpc service token: "+n);this._parseOption(o)}this.tn.omit(";")}else this.tn.skip(";");typeof e[i]>"u"&&(e[i]={}),e[i][r]=o},a._parseMessage=function(e,i){var n=!!i,r=this.tn.next(),o={name:"",fields:[],enums:[],messages:[],options:{},services:[],oneofs:{}};if(!t.NAME.test(r))throw Error("illegal "+(n?"group":"message")+" name: "+r);for(o.name=r,n&&(this.tn.skip("="),i.id=s(this.tn.next()),o.isGroup=!0),"["===(r=this.tn.peek())&&i&&this._parseFieldOptions(i),this.tn.skip("{");"}"!==(r=this.tn.next());)if(t.RULE.test(r))this._parseMessageField(o,r);else if("oneof"===r)this._parseMessageOneOf(o);else if("enum"===r)this._parseEnum(o);else if("message"===r)this._parseMessage(o);else if("option"===r)this._parseOption(o);else if("service"===r)this._parseService(o);else if("extensions"===r)o.hasOwnProperty("extensions")?o.extensions=o.extensions.concat(this._parseExtensionRanges()):o.extensions=this._parseExtensionRanges();else if("reserved"===r)this._parseIgnored();else if("extend"===r)this._parseExtend(o);else{if(!t.TYPEREF.test(r))throw Error("illegal message token: "+r);if(!this.proto3)throw Error("illegal field rule: "+r);this._parseMessageField(o,"optional",r)}return this.tn.omit(";"),e.messages.push(o),o},a._parseIgnored=function(){for(;";"!==this.tn.peek();)this.tn.next();this.tn.skip(";")},a._parseMessageField=function(e,i,n){if(!t.RULE.test(i))throw Error("illegal message field rule: "+i);var r,o={rule:i,type:"",name:"",options:{},id:0};if("map"===i){if(n)throw Error("illegal type: "+n);if(this.tn.skip("<"),r=this.tn.next(),!t.TYPE.test(r)&&!t.TYPEREF.test(r))throw Error("illegal message field type: "+r);if(o.keytype=r,this.tn.skip(","),r=this.tn.next(),!t.TYPE.test(r)&&!t.TYPEREF.test(r))throw Error("illegal message field: "+r);if(o.type=r,this.tn.skip(">"),r=this.tn.next(),!t.NAME.test(r))throw Error("illegal message field name: "+r);o.name=r,this.tn.skip("="),o.id=s(this.tn.next()),"["===(r=this.tn.peek())&&this._parseFieldOptions(o),this.tn.skip(";")}else if("group"===(n=typeof n<"u"?n:this.tn.next())){var a=this._parseMessage(e,o);if(!/^[A-Z]/.test(a.name))throw Error("illegal group name: "+a.name);o.type=a.name,o.name=a.name.toLowerCase(),this.tn.omit(";")}else{if(!t.TYPE.test(n)&&!t.TYPEREF.test(n))throw Error("illegal message field type: "+n);if(o.type=n,r=this.tn.next(),!t.NAME.test(r))throw Error("illegal message field name: "+r);o.name=r,this.tn.skip("="),o.id=s(this.tn.next()),"["===(r=this.tn.peek())&&this._parseFieldOptions(o),this.tn.skip(";")}return e.fields.push(o),o},a._parseMessageOneOf=function(e){var i=this.tn.next();if(!t.NAME.test(i))throw Error("illegal oneof name: "+i);var n,r=i,o=[];for(this.tn.skip("{");"}"!==(i=this.tn.next());)(n=this._parseMessageField(e,"optional",i)).oneof=r,o.push(n.id);this.tn.omit(";"),e.oneofs[r]=o},a._parseFieldOptions=function(e){this.tn.skip("[");for(var t=!0;"]"!==this.tn.peek();)t||this.tn.skip(","),this._parseOption(e,!0),t=!1;this.tn.next()},a._parseEnum=function(e){var i={name:"",values:[],options:{}},n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal name: "+n);for(i.name=n,this.tn.skip("{");"}"!==(n=this.tn.next());)if("option"===n)this._parseOption(i);else{if(!t.NAME.test(n))throw Error("illegal name: "+n);this.tn.skip("=");var r={name:n,id:s(this.tn.next(),!0)};"["===(n=this.tn.peek())&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),i.values.push(r)}this.tn.omit(";"),e.enums.push(i)},a._parseExtensionRanges=function(){var t,i,n,r=[];do{for(i=[];;){switch(t=this.tn.next()){case"min":n=e.ID_MIN;break;case"max":n=e.ID_MAX;break;default:n=l(t)}if(i.push(n),2===i.length)break;if("to"!==this.tn.peek()){i.push(n);break}this.tn.next()}r.push(i)}while(this.tn.omit(","));return this.tn.skip(";"),r},a._parseExtend=function(e){var i=this.tn.next();if(!t.TYPEREF.test(i))throw Error("illegal extend reference: "+i);var n={ref:i,fields:[]};for(this.tn.skip("{");"}"!==(i=this.tn.next());)if(t.RULE.test(i))this._parseMessageField(n,i);else{if(!t.TYPEREF.test(i))throw Error("illegal extend token: "+i);if(!this.proto3)throw Error("illegal field rule: "+i);this._parseMessageField(n,"optional",i)}return this.tn.omit(";"),e.messages.push(n),n},a.toString=function(){return"Parser at line "+this.tn.line},i.Parser=o,i}(f$7,f$7.Lang),f$7.Reflect=function(e){var t={},i=function(e,t,i){this.builder=e,this.parent=t,this.name=i,this.className},n=i.prototype;n.fqn=function(){for(var e=this.name,t=this;;){if(null==(t=t.parent))break;e=t.name+"."+e}return e},n.toString=function(e){return(e?this.className+" ":"")+this.fqn()},n.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},t.T=i;var r=function(e,t,n,r,o){i.call(this,e,t,n),this.className="Namespace",this.children=[],this.options=r||{},this.syntax=o||"proto2"},o=r.prototype=Object.create(i.prototype);o.getChildren=function(e){if(null==(e=e||null))return this.children.slice();for(var t=[],i=0,n=this.children.length;i<n;++i)this.children[i]instanceof e&&t.push(this.children[i]);return t},o.addChild=function(e){var t;if(t=this.getChild(e.name))if(t instanceof u.Field&&t.name!==t.originalName&&null===this.getChild(t.originalName))t.name=t.originalName;else{if(!(e instanceof u.Field&&e.name!==e.originalName&&null===this.getChild(e.originalName)))throw Error("Duplicate name in namespace "+this.toString(!0)+": "+e.name);e.name=e.originalName}this.children.push(e)},o.getChild=function(e){for(var t="number"==typeof e?"id":"name",i=0,n=this.children.length;i<n;++i)if(this.children[i][t]===e)return this.children[i];return null},o.resolve=function(e,i){var n,r="string"==typeof e?e.split("."):e,o=this,a=0;if(""===r[a]){for(;null!==o.parent;)o=o.parent;a++}do{do{if(!(o instanceof t.Namespace)){o=null;break}if(!(n=o.getChild(r[a]))||!(n instanceof t.T)||i&&!(n instanceof t.Namespace)){o=null;break}o=n,a++}while(a<r.length);if(null!=o)break;if(null!==this.parent)return this.parent.resolve(e,i)}while(null!=o);return o},o.qn=function(e){var i=[],n=e;do{i.unshift(n.name),n=n.parent}while(null!==n);for(var r=1;r<=i.length;r++){var o=i.slice(i.length-r);if(e===this.resolve(o,e instanceof t.Namespace))return o.join(".")}return e.fqn()},o.build=function(){for(var e,t={},i=this.children,n=0,o=i.length;n<o;++n)(e=i[n])instanceof r&&(t[e.name]=e.build());return Object.defineProperty&&Object.defineProperty(t,"$options",{value:this.buildOpt()}),t},o.buildOpt=function(){for(var e={},t=Object.keys(this.options),i=0,n=t.length;i<n;++i){var r=t[i],o=this.options[t[i]];e[r]=o}return e},o.getOption=function(e){return typeof e>"u"?this.options:typeof this.options[e]<"u"?this.options[e]:null},t.Namespace=r;var a=function(t,i,n,r,o){if(this.type=t,this.resolvedType=i,this.isMapKey=n,this.syntax=r,this.name=o,n&&e.MAP_KEY_TYPES.indexOf(t)<0)throw Error("Invalid map key type: "+t.name)},s=a.prototype;function l(t,i){if(t&&"number"==typeof t.low&&"number"==typeof t.high&&"boolean"==typeof t.unsigned&&t.low==t.low&&t.high==t.high)return new e.Long(t.low,t.high,typeof i>"u"?t.unsigned:i);if("string"==typeof t)return e.Long.fromString(t,i||!1,10);if("number"==typeof t)return e.Long.fromNumber(t,i||!1);throw Error("not convertible to Long")}a.defaultFieldValue=function(t){if("string"==typeof t&&(t=e.TYPES[t]),typeof t.defaultValue>"u")throw Error("default value for type "+t.name+" is not supported");return t==e.TYPES.bytes?new u$4(0):t.defaultValue},s.toString=function(){return(this.name||"")+(this.isMapKey?"map":"value")+" element"},s.verifyValue=function(t){var i=this;function n(e,t){throw Error("Illegal value for "+i.toString(!0)+" of type "+i.type.name+": "+e+" ("+t+")")}switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),t>4294967295?0|t:t;case e.TYPES.uint32:case e.TYPES.fixed32:return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),t<0?t>>>0:t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:if(e.Long)try{return l(t,!1)}catch(e){n(typeof t,e.message)}else n(typeof t,"requires Long.js");case e.TYPES.uint64:case e.TYPES.fixed64:if(e.Long)try{return l(t,!0)}catch(e){n(typeof t,e.message)}else n(typeof t,"requires Long.js");case e.TYPES.bool:return"boolean"!=typeof t&&n(typeof t,"not a boolean"),t;case e.TYPES.float:case e.TYPES.double:return"number"!=typeof t&&n(typeof t,"not a number"),t;case e.TYPES.string:return"string"!=typeof t&&!(t&&t instanceof String)&&n(typeof t,"not a string"),""+t;case e.TYPES.bytes:return u$4.isByteBuffer(t)?t:u$4.wrap(t,"base64");case e.TYPES.enum:var r=this.resolvedType.getChildren(e.Reflect.Enum.Value);for(a=0;a<r.length;a++){if(r[a].name==t)return r[a].id;if(r[a].id==t)return r[a].id}if("proto3"===this.syntax)return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),(t>4294967295||t<0)&&n(typeof t,"not in range for uint32"),t;n(t,"not a valid enum value");case e.TYPES.group:case e.TYPES.message:if((!t||"object"!=typeof t)&&n(typeof t,"object expected"),t instanceof this.resolvedType.clazz)return t;if(t instanceof e.Builder.Message){var o={};for(var a in t)t.hasOwnProperty(a)&&(o[a]=t[a]);t=o}return new this.resolvedType.clazz(t)}throw Error("[INTERNAL] Illegal value for "+this.toString(!0)+": "+t+" (undefined type "+this.type+")")},s.calculateLength=function(t,i){if(null===i)return 0;var n;switch(this.type){case e.TYPES.int32:return i<0?u$4.calculateVarint64(i):u$4.calculateVarint32(i);case e.TYPES.uint32:return u$4.calculateVarint32(i);case e.TYPES.sint32:return u$4.calculateVarint32(u$4.zigZagEncode32(i));case e.TYPES.fixed32:case e.TYPES.sfixed32:case e.TYPES.float:return 4;case e.TYPES.int64:case e.TYPES.uint64:return u$4.calculateVarint64(i);case e.TYPES.sint64:return u$4.calculateVarint64(u$4.zigZagEncode64(i));case e.TYPES.fixed64:case e.TYPES.sfixed64:return 8;case e.TYPES.bool:return 1;case e.TYPES.enum:return u$4.calculateVarint32(i);case e.TYPES.double:return 8;case e.TYPES.string:return n=u$4.calculateUTF8Bytes(i),u$4.calculateVarint32(n)+n;case e.TYPES.bytes:if(i.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+i.remaining()+" bytes remaining");return u$4.calculateVarint32(i.remaining())+i.remaining();case e.TYPES.message:return n=this.resolvedType.calculate(i),u$4.calculateVarint32(n)+n;case e.TYPES.group:return(n=this.resolvedType.calculate(i))+u$4.calculateVarint32(t<<3|e.WIRE_TYPES.ENDGROUP)}throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+i+" (unknown type)")},s.encodeValue=function(t,i,n){if(null===i)return n;switch(this.type){case e.TYPES.int32:i<0?n.writeVarint64(i):n.writeVarint32(i);break;case e.TYPES.uint32:n.writeVarint32(i);break;case e.TYPES.sint32:n.writeVarint32ZigZag(i);break;case e.TYPES.fixed32:n.writeUint32(i);break;case e.TYPES.sfixed32:n.writeInt32(i);break;case e.TYPES.int64:case e.TYPES.uint64:n.writeVarint64(i);break;case e.TYPES.sint64:n.writeVarint64ZigZag(i);break;case e.TYPES.fixed64:n.writeUint64(i);break;case e.TYPES.sfixed64:n.writeInt64(i);break;case e.TYPES.bool:"string"==typeof i?n.writeVarint32("false"===i.toLowerCase()?0:!!i):n.writeVarint32(i?1:0);break;case e.TYPES.enum:n.writeVarint32(i);break;case e.TYPES.float:n.writeFloat32(i);break;case e.TYPES.double:n.writeFloat64(i);break;case e.TYPES.string:n.writeVString(i);break;case e.TYPES.bytes:if(i.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+i.remaining()+" bytes remaining");var r=i.offset;n.writeVarint32(i.remaining()),n.append(i),i.offset=r;break;case e.TYPES.message:var o=(new u$4).LE();this.resolvedType.encode(i,o),n.writeVarint32(o.offset),n.append(o.flip());break;case e.TYPES.group:this.resolvedType.encode(i,n),n.writeVarint32(t<<3|e.WIRE_TYPES.ENDGROUP);break;default:throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+i+" (unknown type)")}return n},s.decode=function(t,i,n){if(i!=this.type.wireType)throw Error("Unexpected wire type for element");var r,o;switch(this.type){case e.TYPES.int32:return 0|t.readVarint32();case e.TYPES.uint32:return t.readVarint32()>>>0;case e.TYPES.sint32:return 0|t.readVarint32ZigZag();case e.TYPES.fixed32:return t.readUint32()>>>0;case e.TYPES.sfixed32:return 0|t.readInt32();case e.TYPES.int64:return t.readVarint64();case e.TYPES.uint64:return t.readVarint64().toUnsigned();case e.TYPES.sint64:return t.readVarint64ZigZag();case e.TYPES.fixed64:return t.readUint64();case e.TYPES.sfixed64:return t.readInt64();case e.TYPES.bool:return!!t.readVarint32();case e.TYPES.enum:return t.readVarint32();case e.TYPES.float:return t.readFloat();case e.TYPES.double:return t.readDouble();case e.TYPES.string:return t.readVString();case e.TYPES.bytes:if(o=t.readVarint32(),t.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+t.remaining());return(r=t.clone()).limit=r.offset+o,t.offset+=o,r;case e.TYPES.message:return o=t.readVarint32(),this.resolvedType.decode(t,o);case e.TYPES.group:return this.resolvedType.decode(t,-1,n)}throw Error("[INTERNAL] Illegal decode type")},s.valueFromString=function(t){if(!this.isMapKey)throw Error("valueFromString() called on non-map-key element");switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return this.verifyValue(parseInt(t));case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return this.verifyValue(t);case e.TYPES.bool:return"true"===t;case e.TYPES.string:return this.verifyValue(t);case e.TYPES.bytes:return u$4.fromBinary(t)}},s.valueToString=function(t){if(!this.isMapKey)throw Error("valueToString() called on non-map-key element");return this.type===e.TYPES.bytes?t.toString("binary"):t.toString()},t.Element=a;var u=function(e,t,i,n,o,a){r.call(this,e,t,i,n,a),this.className="Message",this.extensions=void 0,this.clazz=null,this.isGroup=!!o,this._fields=null,this._fieldsById=null,this._fieldsByName=null},c=u.prototype=Object.create(r.prototype);function h(t,i){var n=i.readVarint32(),r=7&n,o=n>>>3;switch(r){case e.WIRE_TYPES.VARINT:do{n=i.readUint8()}while(128==(128&n));break;case e.WIRE_TYPES.BITS64:i.offset+=8;break;case e.WIRE_TYPES.LDELIM:n=i.readVarint32(),i.offset+=n;break;case e.WIRE_TYPES.STARTGROUP:h(o,i);break;case e.WIRE_TYPES.ENDGROUP:if(o===t)return!1;throw Error("Illegal GROUPEND after unknown group: "+o+" ("+t+" expected)");case e.WIRE_TYPES.BITS32:i.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+t+": "+r)}return!0}c.build=function(t){if(this.clazz&&!t)return this.clazz;var i=function(e,t){var i=t.getChildren(e.Reflect.Message.Field),n=t.getChildren(e.Reflect.Message.OneOf),r=function(o,a){e.Builder.Message.call(this);for(var s=0,l=n.length;s<l;++s)this[n[s].name]=null;for(s=0,l=i.length;s<l;++s){var u=i[s];this[u.name]=u.repeated?[]:u.map?new e.Map(u):null,(u.required||"proto3"===t.syntax)&&null!==u.defaultValue&&(this[u.name]=u.defaultValue)}var c;if(arguments.length>0)if(1!==arguments.length||null===o||"object"!=typeof o||!("function"!=typeof o.encode||o instanceof r)||Array.isArray(o)||o instanceof e.Map||u$4.isByteBuffer(o)||o instanceof ArrayBuffer||e.Long&&o instanceof e.Long)for(s=0,l=arguments.length;s<l;++s)typeof(c=arguments[s])<"u"&&this.$set(i[s].name,c);else this.$set(o)},o=r.prototype=Object.create(e.Builder.Message.prototype);o.add=function(i,n,r){var o=t._fieldsByName[i];if(!r){if(!o)throw Error(this+"#"+i+" is undefined");if(!(o instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+o.toString(!0));if(!o.repeated)throw Error(this+"#"+i+" is not a repeated field");n=o.verifyValue(n,!0)}return null===this[i]&&(this[i]=[]),this[i].push(n),this},o.$add=o.add,o.set=function(i,n,r){if(i&&"object"==typeof i){for(var o in r=n,i)i.hasOwnProperty(o)&&typeof(n=i[o])<"u"&&void 0===t._oneofsByName[o]&&this.$set(o,n,r);return this}var a=t._fieldsByName[i];if(r)this[i]=n;else{if(!a)throw Error(this+"#"+i+" is not a field: undefined");if(!(a instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+a.toString(!0));this[a.name]=n=a.verifyValue(n)}if(a&&a.oneof){var s=this[a.oneof.name];null!==n?(null!==s&&s!==a.name&&(this[s]=null),this[a.oneof.name]=a.name):s===i&&(this[a.oneof.name]=null)}return this},o.$set=o.set,o.get=function(i,n){if(n)return this[i];var r=t._fieldsByName[i];if(!(r&&r instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: undefined");if(!(r instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+r.toString(!0));return this[r.name]},o.$get=o.get;for(var a=0;a<i.length;a++){var s=i[a];s instanceof e.Reflect.Message.ExtensionField||t.builder.options.populateAccessors&&function(e){var i=e.originalName.replace(/(_[a-zA-Z])/g,(function(e){return e.toUpperCase().replace("_","")}));i=i.substring(0,1).toUpperCase()+i.substring(1);var n=e.originalName.replace(/([A-Z])/g,(function(e){return"_"+e})),r=function(t,i){return this[e.name]=i?t:e.verifyValue(t),this},a=function(){return this[e.name]};null===t.getChild("set"+i)&&(o["set"+i]=r),null===t.getChild("set_"+n)&&(o["set_"+n]=r),null===t.getChild("get"+i)&&(o["get"+i]=a),null===t.getChild("get_"+n)&&(o["get_"+n]=a)}(s)}function l(t,i,n,r){if(null===t||"object"!=typeof t){if(r&&r instanceof e.Reflect.Enum){var o=e.Reflect.Enum.getName(r.object,t);if(null!==o)return o}return t}if(u$4.isByteBuffer(t))return i?t.toBase64():t.toBuffer();if(e.Long.isLong(t))return n?t.toString():e.Long.fromValue(t);var a;if(Array.isArray(t))return a=[],t.forEach((function(e,t){a[t]=l(e,i,n,r)})),a;if(a={},t instanceof e.Map){for(var s=t.entries(),u=s.next();!u.done;u=s.next())a[t.keyElem.valueToString(u.value[0])]=l(u.value[1],i,n,t.valueElem.resolvedType);return a}var c=t.$type,h=void 0;for(var d in t)t.hasOwnProperty(d)&&(c&&(h=c.getChild(d))?a[d]=l(t[d],i,n,h.resolvedType):a[d]=l(t[d],i,n));return a}return o.encode=function(e,i){"boolean"==typeof e&&(i=e,e=void 0);var n=!1;e||(e=new u$4,n=!0);var r=e.littleEndian;try{return t.encode(this,e.LE(),i),(n?e.flip():e).LE(r)}catch(t){throw e.LE(r),t}},r.encode=function(e,t,i){return new r(e).encode(t,i)},o.calculate=function(){return t.calculate(this)},o.encodeDelimited=function(e,i){var n=!1;e||(e=new u$4,n=!0);var r=(new u$4).LE();return t.encode(this,r,i).flip(),e.writeVarint32(r.remaining()),e.append(r),n?e.flip():e},o.encodeAB=function(){try{return this.encode().toArrayBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toArrayBuffer()),e}},o.toArrayBuffer=o.encodeAB,o.encodeNB=function(){try{return this.encode().toBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBuffer()),e}},o.toBuffer=o.encodeNB,o.encode64=function(){try{return this.encode().toBase64()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBase64()),e}},o.toBase64=o.encode64,o.encodeHex=function(){try{return this.encode().toHex()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toHex()),e}},o.toHex=o.encodeHex,o.toRaw=function(e,t){return l(this,!!e,!!t,this.$type)},o.encodeJSON=function(){return JSON.stringify(l(this,!0,!0,this.$type))},r.decode=function(e,i,n){"string"==typeof i&&(n=i,i=-1),"string"==typeof e?e=u$4.wrap(e,n||"base64"):u$4.isByteBuffer(e)||(e=u$4.wrap(e));var r=e.littleEndian;try{var o=t.decode(e.LE(),i);return e.LE(r),o}catch(t){throw e.LE(r),t}},r.decodeDelimited=function(e,i){if("string"==typeof e?e=u$4.wrap(e,i||"base64"):u$4.isByteBuffer(e)||(e=u$4.wrap(e)),e.remaining()<1)return null;var n=e.offset,r=e.readVarint32();if(e.remaining()<r)return e.offset=n,null;try{var o=t.decode(e.slice(e.offset,e.offset+r).LE());return e.offset+=r,o}catch(t){throw e.offset+=r,t}},r.decode64=function(e){return r.decode(e,"base64")},r.decodeHex=function(e){return r.decode(e,"hex")},r.decodeJSON=function(e){return new r(JSON.parse(e))},o.toString=function(){return t.toString()},Object.defineProperty&&(Object.defineProperty(r,"$options",{value:t.buildOpt()}),Object.defineProperty(o,"$options",{value:r.$options}),Object.defineProperty(r,"$type",{value:t}),Object.defineProperty(o,"$type",{value:t})),r}(e,this);this._fields=[],this._fieldsById={},this._fieldsByName={},this._oneofsByName={};for(var n,r=0,o=this.children.length;r<o;r++)if((n=this.children[r])instanceof _||n instanceof u||n instanceof x){if(i.hasOwnProperty(n.name))throw Error("Illegal reflect child of "+this.toString(!0)+": "+n.toString(!0)+" cannot override static property '"+n.name+"'");i[n.name]=n.build()}else if(n instanceof u.Field)n.build(),this._fields.push(n),this._fieldsById[n.id]=n,this._fieldsByName[n.name]=n;else if(n instanceof u.OneOf)this._oneofsByName[n.name]=n;else if(!(n instanceof u.OneOf||n instanceof g))throw Error("Illegal reflect child of "+this.toString(!0)+": "+this.children[r].toString(!0));return this.clazz=i},c.encode=function(e,t,i){for(var n,r,o=null,a=0,s=this._fields.length;a<s;++a)r=e[(n=this._fields[a]).name],n.required&&null===r?null===o&&(o=n):n.encode(i?r:n.verifyValue(r),t,e);if(null!==o){var l=Error("Missing at least one required field for "+this.toString(!0)+": "+o);throw l.encoded=t,l}return t},c.calculate=function(e){for(var t,i,n=0,r=0,o=this._fields.length;r<o;++r){if(i=e[(t=this._fields[r]).name],t.required&&null===i)throw Error("Missing at least one required field for "+this.toString(!0)+": "+t);n+=t.calculate(i,e)}return n},c.decode=function(t,i,n){"number"!=typeof i&&(i=-1);for(var r,o,a,s,l=t.offset,u=new this.clazz;t.offset<l+i||-1===i&&t.remaining()>0;){if(a=(r=t.readVarint32())>>>3,(o=7&r)===e.WIRE_TYPES.ENDGROUP){if(a!==n)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+a+" ("+(n?n+" expected":"not a group")+")");break}if(s=this._fieldsById[a]){if(s.repeated&&!s.options.packed)u[s.name].push(s.decode(o,t));else if(s.map){var c=s.decode(o,t);u[s.name].set(c[0],c[1])}else if(u[s.name]=s.decode(o,t),s.oneof){var d=u[s.oneof.name];null!==d&&d!==s.name&&(u[d]=null),u[s.oneof.name]=s.name}}else switch(o){case e.WIRE_TYPES.VARINT:t.readVarint32();break;case e.WIRE_TYPES.BITS32:t.offset+=4;break;case e.WIRE_TYPES.BITS64:t.offset+=8;break;case e.WIRE_TYPES.LDELIM:var f=t.readVarint32();t.offset+=f;break;case e.WIRE_TYPES.STARTGROUP:for(;h(a,t););break;default:throw Error("Illegal wire type for unknown field "+a+" in "+this.toString(!0)+"#decode: "+o)}}for(var p=0,_=this._fields.length;p<_;++p)if(null===u[(s=this._fields[p]).name])if("proto3"===this.syntax)u[s.name]=s.defaultValue;else{if(s.required){var m=Error("Missing at least one required field for "+this.toString(!0)+": "+s.name);throw m.decoded=u,m}e.populateDefaults&&null!==s.defaultValue&&(u[s.name]=s.defaultValue)}return u},t.Message=u;var d=function(t,n,r,o,a,s,l,c,h,d){i.call(this,t,n,s),this.className="Message.Field",this.required="required"===r,this.repeated="repeated"===r,this.map="map"===r,this.keyType=o||null,this.type=a,this.resolvedType=null,this.id=l,this.options=c||{},this.defaultValue=null,this.oneof=h||null,this.syntax=d||"proto2",this.originalName=this.name,this.element=null,this.keyElement=null,this.builder.options.convertFieldsToCamelCase&&!(this instanceof u.ExtensionField)&&(this.name=e.Util.toCamelCase(this.name))},f=d.prototype=Object.create(i.prototype);f.build=function(){this.element=new a(this.type,this.resolvedType,!1,this.syntax,this.name),this.map&&(this.keyElement=new a(this.keyType,void 0,!0,this.syntax,this.name)),"proto3"!==this.syntax||this.repeated||this.map?typeof this.options.default<"u"&&(this.defaultValue=this.verifyValue(this.options.default)):this.defaultValue=a.defaultFieldValue(this.type)},f.verifyValue=function(t,i){i=i||!1;var n,r=this;function o(e,t){throw Error("Illegal value for "+r.toString(!0)+" of type "+r.type.name+": "+e+" ("+t+")")}if(null===t)return this.required&&o(typeof t,"required"),"proto3"===this.syntax&&this.type!==e.TYPES.message&&o(typeof t,"proto3 field without field presence cannot be null"),null;if(this.repeated&&!i){Array.isArray(t)||(t=[t]);var a=[];for(n=0;n<t.length;n++)a.push(this.element.verifyValue(t[n]));return a}return this.map&&!i?t instanceof e.Map?t:(t instanceof Object||o(typeof t,"expected ProtoBuf.Map or raw object for map field"),new e.Map(this,t)):(!this.repeated&&Array.isArray(t)&&o(typeof t,"no array expected"),this.element.verifyValue(t))},f.hasWirePresence=function(t,i){if("proto3"!==this.syntax)return null!==t;if(this.oneof&&i[this.oneof.name]===this.name)return!0;switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return 0!==t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return 0!==t.low||0!==t.high;case e.TYPES.bool:return t;case e.TYPES.float:case e.TYPES.double:return 0!==t;case e.TYPES.string:return t.length>0;case e.TYPES.bytes:return t.remaining()>0;case e.TYPES.enum:return 0!==t;case e.TYPES.message:return null!==t;default:return!0}},f.encode=function(t,i,n){if(null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===t||this.repeated&&0==t.length)return i;try{var r;if(this.repeated)if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){i.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),i.ensureCapacity(i.offset+=1);var o=i.offset;for(r=0;r<t.length;r++)this.element.encodeValue(this.id,t[r],i);var a=i.offset-o,s=u$4.calculateVarint32(a);if(s>1){var l=i.slice(o,i.offset);o+=s-1,i.offset=o,i.append(l)}i.writeVarint32(a,o-s)}else for(r=0;r<t.length;r++)i.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,t[r],i);else this.map?t.forEach((function(t,n,r){var o=u$4.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,n)+u$4.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,t);i.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),i.writeVarint32(o),i.writeVarint32(8|this.keyType.wireType),this.keyElement.encodeValue(1,n,i),i.writeVarint32(16|this.type.wireType),this.element.encodeValue(2,t,i)}),this):this.hasWirePresence(t,n)&&(i.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,t,i))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+t+" ("+e+")")}return i},f.calculate=function(t,i){if(t=this.verifyValue(t),null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===t||this.repeated&&0==t.length)return 0;var n=0;try{var r,o;if(this.repeated)if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){for(n+=u$4.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),o=0,r=0;r<t.length;r++)o+=this.element.calculateLength(this.id,t[r]);n+=u$4.calculateVarint32(o),n+=o}else for(r=0;r<t.length;r++)n+=u$4.calculateVarint32(this.id<<3|this.type.wireType),n+=this.element.calculateLength(this.id,t[r]);else this.map?t.forEach((function(t,i,r){var o=u$4.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,i)+u$4.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,t);n+=u$4.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),n+=u$4.calculateVarint32(o),n+=o}),this):this.hasWirePresence(t,i)&&(n+=u$4.calculateVarint32(this.id<<3|this.type.wireType),n+=this.element.calculateLength(this.id,t))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+t+" ("+e+")")}return n},f.decode=function(t,i,n){var r,o;if(!(!this.map&&t==this.type.wireType||!n&&this.repeated&&this.options.packed&&t==e.WIRE_TYPES.LDELIM||this.map&&t==e.WIRE_TYPES.LDELIM))throw Error("Illegal wire type for field "+this.toString(!0)+": "+t+" ("+this.type.wireType+" expected)");if(t==e.WIRE_TYPES.LDELIM&&this.repeated&&this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0&&!n){o=i.readVarint32(),o=i.offset+o;for(var s=[];i.offset<o;)s.push(this.decode(this.type.wireType,i,!0));return s}if(this.map){var l=a.defaultFieldValue(this.keyType);if(r=a.defaultFieldValue(this.type),o=i.readVarint32(),i.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+i.remaining());var u=i.clone();for(u.limit=u.offset+o,i.offset+=o;u.remaining()>0;){var c=u.readVarint32();t=7&c;var h=c>>>3;if(1===h)l=this.keyElement.decode(u,t,h);else{if(2!==h)throw Error("Unexpected tag in map field key/value submessage");r=this.element.decode(u,t,h)}}return[l,r]}return this.element.decode(i,t,this.id)},t.Message.Field=d;var p=function(e,t,i,n,r,o,a){d.call(this,e,t,i,null,n,r,o,a),this.extension};p.prototype=Object.create(d.prototype),t.Message.ExtensionField=p;t.Message.OneOf=function(e,t,n){i.call(this,e,t,n),this.fields=[]};var _=function(e,t,i,n,o){r.call(this,e,t,i,n,o),this.className="Enum",this.object=null};_.getName=function(e,t){for(var i,n=Object.keys(e),r=0;r<n.length;++r)if(e[i=n[r]]===t)return i;return null},(_.prototype=Object.create(r.prototype)).build=function(t){if(this.object&&!t)return this.object;for(var i=new e.Builder.Enum,n=this.getChildren(_.Value),r=0,o=n.length;r<o;++r)i[n[r].name]=n[r].id;return Object.defineProperty&&Object.defineProperty(i,"$options",{value:this.buildOpt(),enumerable:!1}),this.object=i},t.Enum=_;var m=function(e,t,n,r){i.call(this,e,t,n),this.className="Enum.Value",this.id=r};m.prototype=Object.create(i.prototype),t.Enum.Value=m;var g=function(e,t,n,r){i.call(this,e,t,n),this.field=r};g.prototype=Object.create(i.prototype),t.Extension=g;var x=function(e,t,i,n){r.call(this,e,t,i,n),this.className="Service",this.clazz=null};(x.prototype=Object.create(r.prototype)).build=function(t){return this.clazz&&!t?this.clazz:this.clazz=function(e,t){for(var i=function(t){e.Builder.Service.call(this),this.rpcImpl=t||function(e,t,i){setTimeout(i.bind(this,Error("Not implemented")),0)}},n=i.prototype=Object.create(e.Builder.Service.prototype),r=t.getChildren(e.Reflect.Service.RPCMethod),o=0;o<r.length;o++)!function(e){n[e.name]=function(i,n){try{try{i=e.resolvedRequestType.clazz.decode(u$4.wrap(i))}catch(e){if(!(e instanceof TypeError))throw e}if(null===i||"object"!=typeof i)throw Error("Illegal arguments");i instanceof e.resolvedRequestType.clazz||(i=new e.resolvedRequestType.clazz(i)),this.rpcImpl(e.fqn(),i,(function(i,r){if(i)n(i);else{null===r&&(r="");try{r=e.resolvedResponseType.clazz.decode(r)}catch{}r&&r instanceof e.resolvedResponseType.clazz?n(null,r):n(Error("Illegal response type received in service method "+t.name+"#"+e.name))}}))}catch(e){setTimeout(n.bind(this,e),0)}},i[e.name]=function(t,n,r){new i(t)[e.name](n,r)},Object.defineProperty&&(Object.defineProperty(i[e.name],"$options",{value:e.buildOpt()}),Object.defineProperty(n[e.name],"$options",{value:i[e.name].$options}))}(r[o]);return Object.defineProperty&&(Object.defineProperty(i,"$options",{value:t.buildOpt()}),Object.defineProperty(n,"$options",{value:i.$options}),Object.defineProperty(i,"$type",{value:t}),Object.defineProperty(n,"$type",{value:t})),i}(e,this)},t.Service=x;var v=function(e,t,n,r){i.call(this,e,t,n),this.className="Service.Method",this.options=r||{}};(v.prototype=Object.create(i.prototype)).buildOpt=o.buildOpt,t.Service.Method=v;var y=function(e,t,i,n,r,o,a,s){v.call(this,e,t,i,s),this.className="Service.RPCMethod",this.requestName=n,this.responseName=r,this.requestStream=o,this.responseStream=a,this.resolvedRequestType=null,this.resolvedResponseType=null};return y.prototype=Object.create(v.prototype),t.Service.RPCMethod=y,t}(f$7),f$7.Builder=function(e,t,i){var n=function(e){this.ns=new i.Namespace(this,null,""),this.ptr=this.ns,this.resolved=!1,this.result=null,this.files={},this.importRoot=null,this.options=e||{}},r=n.prototype;function o(e){e.messages&&e.messages.forEach((function(t){t.syntax=e.syntax,o(t)})),e.enums&&e.enums.forEach((function(t){t.syntax=e.syntax}))}return n.isMessage=function(e){return!("string"!=typeof e.name||typeof e.values<"u"||typeof e.rpc<"u")},n.isMessageField=function(e){return!("string"!=typeof e.rule||"string"!=typeof e.name||"string"!=typeof e.type||typeof e.id>"u")},n.isEnum=function(e){return!("string"!=typeof e.name||typeof e.values>"u"||!Array.isArray(e.values)||0===e.values.length)},n.isService=function(e){return!("string"!=typeof e.name||"object"!=typeof e.rpc||!e.rpc)},n.isExtend=function(e){return"string"==typeof e.ref},r.reset=function(){return this.ptr=this.ns,this},r.define=function(e){if("string"!=typeof e||!t.TYPEREF.test(e))throw Error("illegal namespace: "+e);return e.split(".").forEach((function(e){var t=this.ptr.getChild(e);null===t&&this.ptr.addChild(t=new i.Namespace(this,this.ptr,e)),this.ptr=t}),this),this},r.create=function(t){if(!t)return this;if(Array.isArray(t)){if(0===t.length)return this;t=t.slice()}else t=[t];for(var r=[t];r.length>0;){if(t=r.pop(),!Array.isArray(t))throw Error("not a valid namespace: "+JSON.stringify(t));for(;t.length>0;){var o=t.shift();if(n.isMessage(o)){var a=new i.Message(this,this.ptr,o.name,o.options,o.isGroup,o.syntax),s={};o.oneofs&&Object.keys(o.oneofs).forEach((function(e){a.addChild(s[e]=new i.Message.OneOf(this,a,e))}),this),o.fields&&o.fields.forEach((function(e){if(null!==a.getChild(0|e.id))throw Error("duplicate or invalid field id in "+a.name+": "+e.id);if(e.options&&"object"!=typeof e.options)throw Error("illegal field options in "+a.name+"#"+e.name);var t=null;if("string"==typeof e.oneof&&!(t=s[e.oneof]))throw Error("illegal oneof in "+a.name+"#"+e.name+": "+e.oneof);e=new i.Message.Field(this,a,e.rule,e.keytype,e.type,e.name,e.id,e.options,t,o.syntax),t&&t.fields.push(e),a.addChild(e)}),this);var l=[];if(o.enums&&o.enums.forEach((function(e){l.push(e)})),o.messages&&o.messages.forEach((function(e){l.push(e)})),o.services&&o.services.forEach((function(e){l.push(e)})),o.extensions&&("number"==typeof o.extensions[0]?a.extensions=[o.extensions]:a.extensions=o.extensions),this.ptr.addChild(a),l.length>0){r.push(t),t=l,l=null,this.ptr=a,a=null;continue}l=null}else if(n.isEnum(o))a=new i.Enum(this,this.ptr,o.name,o.options,o.syntax),o.values.forEach((function(e){a.addChild(new i.Enum.Value(this,a,e.name,e.id))}),this),this.ptr.addChild(a);else if(n.isService(o))a=new i.Service(this,this.ptr,o.name,o.options),Object.keys(o.rpc).forEach((function(e){var t=o.rpc[e];a.addChild(new i.Service.RPCMethod(this,a,e,t.request,t.response,!!t.request_stream,!!t.response_stream,t.options))}),this),this.ptr.addChild(a);else{if(!n.isExtend(o))throw Error("not a valid definition: "+JSON.stringify(o));if(a=this.ptr.resolve(o.ref,!0))o.fields.forEach((function(t){if(null!==a.getChild(0|t.id))throw Error("duplicate extended field id in "+a.name+": "+t.id);if(a.extensions){var n=!1;if(a.extensions.forEach((function(e){t.id>=e[0]&&t.id<=e[1]&&(n=!0)})),!n)throw Error("illegal extended field id in "+a.name+": "+t.id+" (not within valid ranges)")}var r=t.name;this.options.convertFieldsToCamelCase&&(r=e.Util.toCamelCase(r));var o=new i.Message.ExtensionField(this,a,t.rule,t.type,this.ptr.fqn()+"."+r,t.id,t.options),s=new i.Extension(this,this.ptr,t.name,o);o.extension=s,this.ptr.addChild(s),a.addChild(o)}),this);else if(!/\.?google\.protobuf\./.test(o.ref))throw Error("extended message "+o.ref+" is not defined")}o=null,a=null}t=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},r.import=function(t,i){var n="/";if("string"==typeof i){if(e.Util.IS_NODE&&(i=require("path").resolve(i)),!0===this.files[i])return this.reset();this.files[i]=!0}else if("object"==typeof i){var r,a=i.root;if(e.Util.IS_NODE&&(a=require("path").resolve(a)),(a.indexOf("\\")>=0||i.file.indexOf("\\")>=0)&&(n="\\"),r=e.Util.IS_NODE?require("path").join(a,i.file):a+n+i.file,!0===this.files[r])return this.reset();this.files[r]=!0}if(t.imports&&t.imports.length>0){var s,l=!1;"object"==typeof i?(this.importRoot=i.root,l=!0,s=this.importRoot,i=i.file,(s.indexOf("\\")>=0||i.indexOf("\\")>=0)&&(n="\\")):"string"==typeof i?this.importRoot?s=this.importRoot:i.indexOf("/")>=0?""===(s=i.replace(/\/[^\/]*$/,""))&&(s="/"):i.indexOf("\\")>=0?(s=i.replace(/\\[^\\]*$/,""),n="\\"):s=".":s=null;for(var u=0;u<t.imports.length;u++)if("string"==typeof t.imports[u]){if(!s)throw Error("cannot determine import root");var c=t.imports[u];if("google/protobuf/descriptor.proto"===c||(c=e.Util.IS_NODE?require("path").join(s,c):s+n+c,!0===this.files[c]))continue;/\.proto$/i.test(c)&&!e.DotProto&&(c=c.replace(/\.proto$/,".json"));var h=e.Util.fetch(c);if(null===h)throw Error("failed to import '"+c+"' in '"+i+"': file not found");/\.json$/i.test(c)?this.import(JSON.parse(h+""),c):this.import(e.DotProto.Parser.parse(h),c)}else i?/\.(\w+)$/.test(i)?this.import(t.imports[u],i.replace(/^(.+)\.(\w+)$/,(function(e,t,i){return t+"_import"+u+"."+i}))):this.import(t.imports[u],i+"_import"+u):this.import(t.imports[u]);l&&(this.importRoot=null)}t.package&&this.define(t.package),t.syntax&&o(t);var d=this.ptr;return t.options&&Object.keys(t.options).forEach((function(e){d.options[e]=t.options[e]})),t.messages&&(this.create(t.messages),this.ptr=d),t.enums&&(this.create(t.enums),this.ptr=d),t.services&&(this.create(t.services),this.ptr=d),t.extends&&this.create(t.extends),this.reset()},r.resolveAll=function(){var n;if(null==this.ptr||"object"==typeof this.ptr.type)return this;if(this.ptr instanceof i.Namespace)this.ptr.children.forEach((function(e){this.ptr=e,this.resolveAll()}),this);else if(this.ptr instanceof i.Message.Field){if(t.TYPE.test(this.ptr.type))this.ptr.type=e.TYPES[this.ptr.type];else{if(!t.TYPEREF.test(this.ptr.type))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(!(n=(this.ptr instanceof i.Message.ExtensionField?this.ptr.extension.parent:this.ptr.parent).resolve(this.ptr.type,!0)))throw Error("unresolvable type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(this.ptr.resolvedType=n,n instanceof i.Enum){if(this.ptr.type=e.TYPES.enum,"proto3"===this.ptr.syntax&&"proto3"!==n.syntax)throw Error("proto3 message cannot reference proto2 enum")}else{if(!(n instanceof i.Message))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);this.ptr.type=n.isGroup?e.TYPES.group:e.TYPES.message}}if(this.ptr.map){if(!t.TYPE.test(this.ptr.keyType))throw Error("illegal key type for map field in "+this.ptr.toString(!0)+": "+this.ptr.keyType);this.ptr.keyType=e.TYPES[this.ptr.keyType]}"proto3"===this.ptr.syntax&&this.ptr.repeated&&void 0===this.ptr.options.packed&&-1!==e.PACKABLE_WIRE_TYPES.indexOf(this.ptr.type.wireType)&&(this.ptr.options.packed=!0)}else if(this.ptr instanceof e.Reflect.Service.Method){if(!(this.ptr instanceof e.Reflect.Service.RPCMethod))throw Error("illegal service type in "+this.ptr.toString(!0));if(!((n=this.ptr.parent.resolve(this.ptr.requestName,!0))&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.requestName);if(this.ptr.resolvedRequestType=n,!((n=this.ptr.parent.resolve(this.ptr.responseName,!0))&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.responseName);this.ptr.resolvedResponseType=n}else if(!(this.ptr instanceof e.Reflect.Message.OneOf||this.ptr instanceof e.Reflect.Extension||this.ptr instanceof e.Reflect.Enum.Value))throw Error("illegal object in namespace: "+typeof this.ptr+": "+this.ptr);return this.reset()},r.build=function(e){if(this.reset(),this.resolved||(this.resolveAll(),this.resolved=!0,this.result=null),null===this.result&&(this.result=this.ns.build()),!e)return this.result;for(var t="string"==typeof e?e.split("."):e,i=this.result,n=0;n<t.length;n++){if(!i[t[n]]){i=null;break}i=i[t[n]]}return i},r.lookup=function(e,t){return e?this.ns.resolve(e,t):this.ns},r.toString=function(){return"Builder"},n.Message=function(){},n.Enum=function(){},n.Service=function(){},n}(f$7,f$7.Lang,f$7.Reflect),f$7.Map=function(e,t){var i=function(e,i){if(!e.map)throw Error("field is not a map");if(this.field=e,this.keyElem=new t.Element(e.keyType,null,!0,e.syntax),this.valueElem=new t.Element(e.type,e.resolvedType,!1,e.syntax),this.map={},Object.defineProperty(this,"size",{get:function(){return Object.keys(this.map).length}}),i)for(var n=Object.keys(i),r=0;r<n.length;r++){var o=this.keyElem.valueFromString(n[r]),a=this.valueElem.verifyValue(i[n[r]]);this.map[this.keyElem.valueToString(o)]={key:o,value:a}}},n=i.prototype;function r(e){var t=0;return{next:function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}}return n.clear=function(){this.map={}},n.delete=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e)),i=t in this.map;return delete this.map[t],i},n.entries=function(){for(var e,t=[],i=Object.keys(this.map),n=0;n<i.length;n++)t.push([(e=this.map[i[n]]).key,e.value]);return r(t)},n.keys=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].key);return r(e)},n.values=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].value);return r(e)},n.forEach=function(e,t){for(var i,n=Object.keys(this.map),r=0;r<n.length;r++)e.call(t,(i=this.map[n[r]]).value,i.key,this)},n.set=function(e,t){var i=this.keyElem.verifyValue(e),n=this.valueElem.verifyValue(t);return this.map[this.keyElem.valueToString(i)]={key:i,value:n},this},n.get=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e));if(t in this.map)return this.map[t].value},n.has=function(e){return this.keyElem.valueToString(this.keyElem.verifyValue(e))in this.map},i}(0,f$7.Reflect),f$7.loadProto=function(e,t,i){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(i=t,t=void 0),f$7.loadJson(f$7.DotProto.Parser.parse(e),t,i)},f$7.protoFromString=f$7.loadProto,f$7.loadProtoFile=function(e,t,i){if(t&&"object"==typeof t?(i=t,t=null):(!t||"function"!=typeof t)&&(t=null),t)return f$7.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,(function(n){if(null!==n)try{t(null,f$7.loadProto(n,i,e))}catch(e){t(e)}else t(Error("Failed to fetch file"))}));var n=f$7.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===n?null:f$7.loadProto(n,i,e)},f$7.protoFromFile=f$7.loadProtoFile,f$7.newBuilder=function(e){return typeof(e=e||{}).convertFieldsToCamelCase>"u"&&(e.convertFieldsToCamelCase=f$7.convertFieldsToCamelCase),typeof e.populateAccessors>"u"&&(e.populateAccessors=f$7.populateAccessors),new f$7.Builder(e)},f$7.loadJson=function(e,t,i){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(i=t,t=null),(!t||"object"!=typeof t)&&(t=f$7.newBuilder()),"string"==typeof e&&(e=JSON.parse(e)),t.import(e,i),t.resolveAll(),t},f$7.loadJsonFile=function(e,t,i){if(t&&"object"==typeof t?(i=t,t=null):(!t||"function"!=typeof t)&&(t=null),t)return f$7.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,(function(n){if(null!==n)try{t(null,f$7.loadJson(JSON.parse(n),i,e))}catch(e){t(e)}else t(Error("Failed to fetch file"))}));var n=f$7.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===n?null:f$7.loadJson(JSON.parse(n),i,e)},h$3.prototype.getCacheTile=function(e,t,i,n){for(var r=0;r<this.tileCache.length;r++)if(this.tileCache[r].x===e&&this.tileCache[r].y===t&&this.tileCache[r].z===i&&this.tileCache[r].t===n)return this.tileCache[r];return null},h$3.prototype.addCacheTile=function(e){this.tileCache.length>999&&this.tileCache.splice(0,500),this.removeCacheTile(e.x,e.y,e.z,e.t),this.tileCache.push(e)},h$3.prototype.removeCacheTile=function(e,t,i,n){for(var r=0;r<this.tileCache.length;r++)if(this.tileCache[r].x===e&&this.tileCache[r].y===t&&this.tileCache[r].z===i&&this.tileCache[r].t===n){this.tileCache.splice(r,1);break}},h$3.prototype.getCacheLabel=function(e){for(var t=0;t<this.labelCache.length;t++)if(this.labelCache[t].name===this._UUID&&this.labelCache[t].oid===e)return this.labelCache[t];return null},h$3.prototype.addCacheLabel=function(e){this.labelCache.length>999&&this.labelCache.splice(0,250),this.removeCacheLabel(e.oid),e.timestamp=(new Date).getTime(),this.labelCache.push(e)},h$3.prototype.removeCacheLabel=function(e){for(var t=0;t<this.labelCache.length;t++)if(this.labelCache[t].name===this._UUID&&this.labelCache[t].oid===e){this.labelCache.splice(t,1);break}},h$3.prototype.getTileUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.url+"/GetTiles?lxys={z},{x},{y}"+(this.token?"&tk="+this.token:"")},h$3.prototype.getIcoUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.url+"/GetIcon?id={id}"+(this.token?"&tk="+this.token:"")},h$3.prototype.getRoadTileUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.roadUrl},h$3.prototype._cluster=function(e){if(!(e$2b(e)&&e<.05)){var t=this;clearTimeout(this._timer);var i=this.viewer.scene.globe._surface;if(i._tilesToRender.length<8||0<i._tileLoadQueueHigh.length)this._timer=setTimeout((function(){t._cluster()}),100);else{var n=this.getTilesToRender();if(this.compareArray(n,this._latelyGrid))return;this._queueCall(n),t.delaySynchronous()}}},h$3.prototype._changed=function(e){if(!(e$2b(e)&&e<.05)){var t=(new Date).getTime(),i=t-this._latelyRefreshStamp,n=t-this._latelyCollisionStamp;if(i>300&&this._cluster(),n>150&&this.aotuCollide&&this.collisionDetection(),this.depthTestOptimization){var r=this.viewer.scene,o=r.globe,a=r.camera,s=a.positionCartographic.height,l=a.pitch,u=this.dTOElevation,c=this.dTOPitch;this._isDTP=o.depthTestAgainstTerrain=s<u&&c<l}}},h$3.prototype._queueCall=function(e){var t=this;t._latelyGrid=e,t._latelyRefreshStamp=(new Date).getTime(),e.forEach((function(e,i,n){if(t.metadata&&G$2(t.metadata.boundBox,e.boundBox)){if(t.metadata.minLevel>e.level+1||t.metadata.maxLevel<e.level+1)return;var r=t.getCacheTile(e.x,e.y,e.level+1,0);if(r)t.addLabelAndIco(r);else{var o=t.getTileUrl().replace("{z}",e.level+1).replace("{y}",e.y).replace("{x}",e.x).replace("{s}",t.subdomains[(e.x+e.y+e.level)%t.subdomains.length]);(a=new XMLHttpRequest).open("GET",o,!0),a.responseType="arraybuffer",a.onload=function(){if(!(a.status<200||300<=a.status)){var e=t.CutString(a.response);if(e)(i=H$1(e)).x=this.tile.x,i.y=this.tile.y,i.z=this.tile.z,i.t=0,t.addCacheTile(i),t.addLabelAndIco(i);else{var i={x:this.tile.x,y:this.tile.y,z:this.tile.z,t:0};t.addCacheTile(i),t.delaySynchronous()}}},a.onerror=function(e){console.error(e)},a.send(),a.tile={x:e.x,y:e.y,z:e.level+1}}}if(t.roadMetadata&&G$2(t.roadMetadata.boundBox,e.boundBox)){if(t.roadMetadata.minLevel>e.level+1||t.roadMetadata.maxLevel<e.level+1)return;if(b=t.getCacheTile(e.x,e.y,e.level+1,1))t.addLabelAndIco(b);else{var a,s=t.getRoadTileUrl().replace("{z}",e.level+1).replace("{y}",e.y).replace("{x}",e.x);(a=new XMLHttpRequest).open("GET",s,!0),a.responseType="json",a.onload=function(){if(!(a.status<200||300<=a.status)){var e=a.response;if(e){var i={pois:e.map((function(e,t,i){return{oid:e.LabelPoint.X+"_"+e.LabelPoint.Y,name:e.Feature.properties.Name,coordinate:[e.LabelPoint.X,e.LabelPoint.Y,e.LabelPoint.Z?e.LabelPoint.Z:0]}})),x:this.tile.x,y:this.tile.y,z:this.tile.z,t:1};t.addCacheTile(i),t.addLabelAndIco(i)}else i={x:this.tile.x,y:this.tile.y,z:this.tile.z,t:1};t.addCacheTile(i),t.delaySynchronous()}},a.onerror=function(e){console.error(e)},a.send(),a.tile={x:e.x,y:e.y,z:e.level+1}}}}))},h$3.prototype.getTilesToRender=function(){var e=this.viewer.scene.globe._surface._tilesToRender.map((function(e){return{x:e.x,y:e.y,level:e.level,boundBox:{minX:e$2a.toDegrees(e.rectangle.west),minY:e$2a.toDegrees(e.rectangle.south),maxX:e$2a.toDegrees(e.rectangle.east),maxY:e$2a.toDegrees(e.rectangle.north)}}})).sort((function(e,t){return t.level-e.level}));return e},h$3.prototype.addLabelAndIco=function(e){if(e.pois)for(var t=0;t<e.pois.length;t++){var i=this.getCacheLabel(e.pois[t].oid);i=i||this.createLabel(e.pois[t],e),this.addCacheLabel(i)}this.delaySynchronous()},h$3.prototype.delaySynchronous=function(){var e=this;clearTimeout(this._timer2),e._timer2=setTimeout((function(){e.synchronousLabel()}),100)},h$3.prototype.synchronousLabel=function(){for(var e=0;e<this.labelCache.length;e++)this.labelCache[e].timestamp>=this._latelyRefreshStamp&&!this.viewer.entities.contains(this.labelCache[e])&&(this._isInitial&&this.aotuCollide&&(this.labelCache[e].show=!1),this.viewer.entities.add(this.labelCache[e]));if(!this._isInitial){for(e=0;e<this.viewer.entities.values.length;e++)!this.viewer.entities.values[e].name||this.viewer.entities.values[e].name!==this._UUID&&this.viewer.entities.values[e].name!==this._UUIDRoad||this.viewer.entities.values[e].timestamp<this._latelyRefreshStamp&&(this.viewer.entities.remove(this.viewer.entities.values[e]),e--);this.aotuCollide&&this.collisionDetection()}},h$3.prototype.createLabel=function(e,t){if(e$2b(e)){var i={show:!0,position:o$1p.fromDegrees(e.coordinate[0],e.coordinate[1],e.coordinate[2]),label:{text:e.name}};this.serverFirstStyle?(i.label.font=e.fontSize+"px "+t.stringTable[e.fontNameIndex],i.label.style=R$Q.FILL_AND_OUTLINE,i.label.scale=u$_(e.scale,1),i.label.showBackground=u$_(e.showBackground,!1),i.label.backgroundColor=e.backgroundColor,i.label.backgroundPadding=e.backgroundPadding,i.label.pixelOffset=u$_(e.pixelOffset,new o$1o(0,0)),i.label.eyeOffset=e.eyeOffset,i.label.horizontalOrigin=e.horizontalOrigin,i.label.verticalOrigin=e.verticalOrigin,i.label.heightReference=k$P.NONE,i.label.fillColor=e$1U.fromCssColorString(this.HexadecimalConversion(e.fontColor)),i.label.outlineColor=e$1U.fromCssColorString(this.HexadecimalConversion(e.shiningColor)),i.label.outlineWidth=e.shiningSize,i.label.translucencyByDistance=void 0,i.label.pixelOffsetScaleByDistance=void 0,i.label.scaleByDistance=void 0,i.label.distanceDisplayCondition=void 0,i.label.disableDepthTestDistance=Number.POSITIVE_INFINITY):(i.label.font=this.labelGraphics.font,i.label.style=this.labelGraphics.style,i.label.scale=this.labelGraphics.scale,i.label.showBackground=this.labelGraphics.showBackground,i.label.backgroundColor=this.labelGraphics.backgroundColor,i.label.backgroundPadding=this.labelGraphics.backgroundPadding,i.label.pixelOffset=this.labelGraphics.pixelOffset,i.label.eyeOffset=this.labelGraphics.eyeOffset,i.label.horizontalOrigin=this.labelGraphics.horizontalOrigin,i.label.verticalOrigin=this.labelGraphics.verticalOrigin,i.label.heightReference=this.labelGraphics.heightReference,i.label.fillColor=this.labelGraphics.fillColor,i.label.outlineColor=this.labelGraphics.outlineColor,i.label.outlineWidth=this.labelGraphics.outlineWidth,i.label.translucencyByDistance=void 0,i.label.pixelOffsetScaleByDistance=void 0,i.label.scaleByDistance=this.labelGraphics.scaleByDistance,i.label.distanceDisplayCondition=void 0,i.label.disableDepthTestDistance=Number.POSITIVE_INFINITY);var n=new h$V(i);return n.name=t.t?this._UUIDRoad:this._UUID,n.oid=e.oid,n.priority=e.priority?e.priority:0,n.xyz=t.x+"_"+t.y+"_"+(t.z-1),n}},h$3.prototype.collisionDetection=function(){var e=this.viewer.scene._view.viewport,t=e.x,i=e.x+e.width,n=e.y,r=e.y+e.height,o=[],a=this,s=this.viewer.entities.values;s.sort((function(e,t){return e.priority-t.priority})),s.map((function(e){if(e.name&&(e.name===a._UUID||e.name===a._UUIDRoad)){var s=s$Q.wgs84ToDrawingBufferCoordinates(a.viewer.scene,e.position.getValue(0));if(e$2b(s)){e._screenSpacePosition=s;var l=a.getLabelReact({point:s,entity:e});e.collisionBox=l,s.x>=t&&s.x<=i&&s.y>=n&&s.y<=r?(e.show=!0,o.push({anno:e,clustered:!0,coord:s})):e.show=!1}else e.show=!1}}));for(var l=O$B(o,F$2,q$2,64,Int32Array),u=o.length,c=0;c<u;c++){for(var h=o[c],d=h.anno.collisionBox,f=l.intersect(d.x,d.y,d.x+d.width,d.y+d.height,o,A$4,V$2),p=f.length,_=0,m=0;m<p;m++){var g=f[m],x=o[g];c!==g&&!x.clustered&&++_}_<1?h.clustered=!1:h.anno.show=!1}},h$3.prototype.bindEvent=function(){this.viewer.scene.camera.moveEnd.addEventListener(this._cluster,this),this.viewer.scene.camera.changed.addEventListener(this._changed,this);this.viewer.scene.terrainProvider.readyPromise.then(this._cluster.bind(this))},h$3.prototype.unbindEvent=function(){this.viewer.scene.camera.moveEnd.removeEventListener(this._cluster,this),this.viewer.scene.camera.changed.removeEventListener(this._changed,this)},h$3.prototype.activate=function(){this._latelyGrid=[],this._cluster()},h$3.prototype.destroy=function(){for(var e=0;e<this.viewer.entities.values.length;e++)!this.viewer.entities.values[e].name||this.viewer.entities.values[e].name!==this._UUID&&this.viewer.entities.values[e].name!==this._UUIDRoad||(this.viewer.entities.remove(this.viewer.entities.values[e]),e--);this.viewer.camera.percentageChanged=.5,this.unbindEvent(),this.handler=this.handler&&this.handler.destroy(),this.proxy=void 0,this.viewer=void 0,this.url=void 0,this.labelGraphics=void 0,this.billboardGraphics=void 0,this.aotuCollide=void 0,this.collisionPadding=void 0,this.tileCache=void 0,this.labelCache=void 0,this._latelyGrid=void 0,this._latelyRefreshStamp=void 0,this._roadTileset=void 0},h$3.prototype.compareArray=function(e,t){for(var i=!1,n=0;n<e.length;n++){for(var r=!1,o=0;o<t.length;o++)if(e[n].x===t[o].x&&e[n].y===t[o].y&&e[n].level===t[o].level){r=!0;break}if(!r){i=!0;break}}return!i},h$3.prototype.getLabelReact=function(e){var t=parseInt(e.entity.label.font);t=t>0?t:15;for(var i=e.entity.label.text.getValue(0).split("\n"),n=0,r=i.length,o=0;o<i.length;o++){var a=M$3(i[o])/2;n<a&&(n=a)}var s=e.entity.billboard?e.entity.billboard.width.getValue(0)*e.entity.billboard.scale.getValue(0):1,l=e.entity.billboard?e.entity.billboard.height.getValue(0)*e.entity.billboard.scale.getValue(0):1,u=e.entity.label.pixelOffset,c=u.getValue(0).x;c<0&&(c=0);var h=u.getValue(0).y;return h<0&&(h=0),{x:(e.point?e.point.x:-999)-s/2-this.collisionPadding[3],y:(e.point?e.point.y:-999)-l/2-this.collisionPadding[0],width:t*e.entity.label.scale.getValue(0)*n+c+s+this.collisionPadding[1],height:t*e.entity.label.scale.getValue(0)*(r+.5*(r-1))+h+l/2+this.collisionPadding[2]}},h$3.prototype.CutString=function(e){if(!e)return"";var t=e.byteLength;return t<=28?"":e.slice(19,t-9)},h$3.prototype.HexadecimalConversion=function(e){if(4278190080===e)return"#000000";var t=4278190080|parseInt(-Number(e));if(e="",(t=t.toString(16).substring(1)).length<6)for(var i=6-t.length,n=0;n<i;n++)e+="0";return"#"+e+t},h$3.prototype.getLabelVisibility=function(e){if(!e)return!1;var t=this.viewer.canvas.getBoundingClientRect();return!(e.x<-10||e.x>t.right+10||e.y<-10||e.y>t.bottom+10)};var M$3=function(e){for(var t=0,i=0;i<e.length;i++)null!=e.charAt(i).match(/[^\x00-\xff]/gi)?t+=2:t+=1;return t},H$1=function(e){var t={stringTable:[],pois:[],enumGeometryType:[{ePoint:0},{eMultiLineString:1},{ePolygon:2}],enumZCoordType:[{eCloseGround:0},{eCloseSeaSurface:1},{eRelativelyGround:2},{eAbsolute:3}]},i=function(){if(!f$7)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return f$7.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;} ;message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Interate = 5;optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI.proto").build("GEOPOI").PBPOITile}(),n=function(){if(!f$7)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return f$7.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;};enum enumZCoordType {eCloseGround = 0;eCloseSeaSurface = 1;eRelativelyGround = 2;eAbsolute = 3;};message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Interate = 5;optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];optional enumZCoordType ZCoordType = 16 [default = eAbsolute];};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI2.proto").build("GEOPOI").PBPOITile}(),r=function(){if(!f$7)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return f$7.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;};enum enumZCoordType {eCloseGround = 0;eCloseSeaSurface = 1;eRelativelyGround = 2;eAbsolute = 3;};message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Priority = 5;repeated int32 Interates =6 [packed=true];optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];optional enumZCoordType ZCoordType = 16 [default = eAbsolute];optional int32 FontStyle=17;optional int32 ShiningSize=18;};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI3.proto").build("GEOPOI").PBPOITile}();t.pois.length=0;var o,a=e;try{o=r.decode(a)}catch{console.log("message")}if(!o)try{results=n.decode(a)}catch{console.log("message"),results=i.decode(a)}t.version=parseInt(o.Version.toString()),t.titleKey=parseInt(o.TileKey.toString()),t.stringTable=[];for(var s=o.StringTable.s.length,l=0;l<s;l++)t.stringTable.push(o.StringTable.s[l].toString());return o.POIS.forEach((function(e){var i={};i.oid=parseInt(e.OID.toString())+"_"+t.titleKey,i.name=e.Name.toString(),i.symbolID=parseInt(e.SymbolID.toString()),i.displayHeight=e.DisplayHeight,i.shiningColor=e.ShiningColor,i.fontNameIndex=e.FontNameIndex,i.fontSize=e.FontSize,i.fontColor=e.FontColor,e.ZCoordType&&(i.zCoordType=e.ZCoordType),i.geometryType=e.GeometryType,i.coordinate=e.Coordinates,i.priority=void 0===e.Priority?null:e.Priority,i.interates=void 0===e.Interates?null:e.Interates,i.fontStyle=void 0===e.FontStyle?null:e.FontStyle,i.shiningSize=void 0===e.ShiningSize?null:e.ShiningSize,t.pois.push(i)})),t},_$5={IMG_W:"img_w",IMG_C:"img_c",CIA_W:"cia_w",CIA_C:"cia_c",VEC_W:"vec_w",VEC_C:"vec_c",TER_W:"ter_w",TER_C:"ter_c",CVA_W:"cva_w",CVA_C:"cva_c",CTA_W:"cta_w",CTA_C:"cta_c",IBO_W:"ibo_w",IBO_C:"ibo_c",EIA_W:"eia_w",EIA_C:"eia_c",EVA_W:"eva_w",EVA_C:"eva_c"},t$7=Object.freeze(_$5);function f$6(e){e=u$_(e,{}),this._mapStyle=u$_(e.mapStyle,t$7.IMG_W),this._url=u$_(e.url,_$4[this._mapStyle]),this._token=e.token,this._layer=u$_(e.layer,r$c[this._mapStyle]),this._style=u$_(e.style,"default"),this._tileMatrixSetID=u$_(e.tileMatrixSetID,a$1[this._mapStyle]),this._tileMatrixLabels=u$_(e.tileMatrixLabels,i$7[this._mapStyle]),this._format=u$_(e.format,n$5[this._mapStyle]),this._epsgCode=s$6[this._mapStyle],this._tilingScheme=u$_(e.tilingScheme,new c$R({})),"4490"==this._epsgCode&&(this._tilingScheme=new g$13),this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._minimumLevel=u$_(e.minimumLevel,0),this._maximumLevel=u$_(e.maximumLevel,i$7[this._mapStyle].length),this._rectangle=u$_(e.rectangle,this._tilingScheme.rectangle),this._readyPromise=o$1l.resolve(!0),this._errorEvent=new o$1h;var t=e.credit;this._credit="string"==typeof t?new r$T(t):t,this._subdomains=u$_(e.subdomains,["t0","t1","t2","t3","t4","t5","t6","t7"]),this._tileDiscardPolicy=e.tileDiscardPolicy;var i=this,n=this._url;i.tablename=this._url,new l$15({name:n}).then((function(e){e.checkObjectStoreExit(i.tablename)?i._indexedDBScheduler=e:e.createObjectStore(i.tablename).then((function(){i._indexedDBScheduler=e}))})),i._indexedDBSetting={isOpen:!1,clear:function(){i._indexedDBScheduler.clear(i.tablename)},cache:[]}}function B$2(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$P(t,o)?i$P(e,o)&&(a|=1):(a|=2,i$P(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(f$6.prototype,{url:{get:function(){return this._url}},mapStyle:{get:function(){return this._mapStyle}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}}}),f$6.prototype.requestImage=function(e,t,i,n){var r=D$3(this,e,t,i),o=B$2(e,t,i);if(n.quadKey=o,!0===this._indexedDBSetting.isOpen&&n.cacheEnable){if(e$2b(this._indexedDBScheduler)){var a=this._indexedDBScheduler.getElementFromDB(this.tablename,o);return e$2b(a)?o$1l(a,(function(e){return e$2b(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$h.loadImage(this,r)}return e$h.loadImage(this,r)}return e$h.loadImage(this,r)};var L$6=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function D$3(e,t,i,n){"900913"==e._epsgCode&&(n-=1);var r=e._tileMatrixLabels,o=e$2b(r)?r[n]:n.toString(),a=e._subdomains,s=e._url.replace("[subdomain]",a[(t+i+n)%a.length]),l=new h$16(s),u=m$1a(u$_(l.query,""));(u=p$19(L$6,u)).tilematrix=o,u.layer=e._layer,u.style=e._style,u.tilerow=i,u.tilecol=t,u.tilematrixset=e._tileMatrixSetID,u.format=e._format,l.query=m$1b(u),s=l.toString();var c=e._proxy;return e$2b(c)&&(s=c.getURL(s)),e$2b(e._token)&&(s+="&tk="+e._token),s}f$6.prototype.pickFeatures=function(){};var _$4={};_$4[t$7.IMG_W]="https://[subdomain].tianditu.gov.cn/img_w/wmts",_$4[t$7.IMG_C]="https://[subdomain].tianditu.gov.cn/img_c/wmts",_$4[t$7.CIA_W]="https://[subdomain].tianditu.gov.cn/cia_w/wmts",_$4[t$7.CIA_C]="https://[subdomain].tianditu.gov.cn/cia_c/wmts",_$4[t$7.VEC_W]="https://[subdomain].tianditu.gov.cn/vec_w/wmts",_$4[t$7.VEC_C]="https://[subdomain].tianditu.gov.cn/vec_c/wmts",_$4[t$7.TER_W]="https://[subdomain].tianditu.gov.cn/ter_w/wmts",_$4[t$7.TER_C]="https://[subdomain].tianditu.gov.cn/ter_c/wmts",_$4[t$7.CVA_W]="https://[subdomain].tianditu.gov.cn/cva_w/wmts",_$4[t$7.CVA_C]="https://[subdomain].tianditu.gov.cn/cva_c/wmts",_$4[t$7.CTA_W]="https://[subdomain].tianditu.gov.cn/cta_w/wmts",_$4[t$7.CTA_C]="https://[subdomain].tianditu.gov.cn/cta_c/wmts",_$4[t$7.EIA_W]="https://[subdomain].tianditu.gov.cn/eia_w/wmts",_$4[t$7.EIA_C]="https://[subdomain].tianditu.gov.cn/eia_c/wmts",_$4[t$7.EVA_W]="https://[subdomain].tianditu.gov.cn/eva_w/wmts",_$4[t$7.EVA_C]="https://[subdomain].tianditu.gov.cn/eva_c/wmts",_$4[t$7.IBO_W]="https://[subdomain].tianditu.gov.cn/ibo_w/wmts",_$4[t$7.IBO_C]="https://[subdomain].tianditu.gov.cn/ibo_c/wmts";var r$c={};r$c[t$7.IMG_W]="img",r$c[t$7.IMG_C]="img",r$c[t$7.IBO_W]="ibo",r$c[t$7.IBO_C]="ibo",r$c[t$7.CIA_W]="cia",r$c[t$7.CIA_C]="cia",r$c[t$7.VEC_W]="vec",r$c[t$7.VEC_C]="vec",r$c[t$7.TER_W]="ter",r$c[t$7.TER_C]="ter",r$c[t$7.CVA_W]="cva",r$c[t$7.CVA_C]="cva",r$c[t$7.CTA_W]="cta",r$c[t$7.CTA_C]="cta",r$c[t$7.EIA_W]="eia",r$c[t$7.EIA_C]="eia",r$c[t$7.EVA_W]="eva",r$c[t$7.EVA_C]="eva";var a$1={};a$1[t$7.IMG_W]="w",a$1[t$7.IMG_C]="c",a$1[t$7.IBO_W]="w",a$1[t$7.IBO_C]="c",a$1[t$7.CIA_W]="w",a$1[t$7.CIA_C]="c",a$1[t$7.VEC_W]="w",a$1[t$7.VEC_C]="c",a$1[t$7.TER_W]="w",a$1[t$7.TER_C]="c",a$1[t$7.CVA_W]="w",a$1[t$7.CVA_C]="c",a$1[t$7.CTA_W]="w",a$1[t$7.CTA_C]="c",a$1[t$7.EIA_W]="w",a$1[t$7.EIA_C]="c",a$1[t$7.EVA_W]="w",a$1[t$7.EVA_C]="c";var n$5={};n$5[t$7.IMG_W]="tiles",n$5[t$7.IMG_C]="tiles",n$5[t$7.IBO_W]="tiles",n$5[t$7.IBO_C]="tiles",n$5[t$7.CIA_W]="tiles",n$5[t$7.CIA_C]="tiles",n$5[t$7.VEC_W]="tiles",n$5[t$7.VEC_C]="tiles",n$5[t$7.TER_W]="tiles",n$5[t$7.TER_C]="tiles",n$5[t$7.CVA_W]="tiles",n$5[t$7.CVA_C]="tiles",n$5[t$7.CTA_W]="tiles",n$5[t$7.CTA_C]="tiles",n$5[t$7.EIA_W]="tiles",n$5[t$7.EIA_C]="tiles",n$5[t$7.EVA_W]="tiles",n$5[t$7.EVA_C]="tiles";var s$6={};s$6[t$7.IMG_W]="900913",s$6[t$7.IMG_C]="4490",s$6[t$7.IBO_W]="900913",s$6[t$7.IBO_C]="4490",s$6[t$7.CIA_W]="900913",s$6[t$7.CIA_C]="4490",s$6[t$7.VEC_W]="900913",s$6[t$7.VEC_C]="4490",s$6[t$7.TER_W]="900913",s$6[t$7.TER_C]="4490",s$6[t$7.CVA_W]="900913",s$6[t$7.CVA_C]="4490",s$6[t$7.CTA_W]="900913",s$6[t$7.CTA_C]="4490",s$6[t$7.EIA_W]="900913",s$6[t$7.EIA_C]="4490",s$6[t$7.EVA_W]="900913",s$6[t$7.EVA_C]="4490";var i$7={};function d$8(e){if(!e$2b(e)||!e$2b(e.token))throw new t$16("options.token is required.");this._urls=["https://t0.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t1.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t2.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t3.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t4.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t5.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t6.tianditu.gov.cn/mapservice/swdx?T=elv_c","https://t7.tianditu.gov.cn/mapservice/swdx?T=elv_c"];for(var t=0;t<this._urls.length;t++)this._urls[t]+="&tk="+e.token;this._dataType=u$_(e.dataType,"int"),this._errorEvent=new o$1h,this._ready=!0,this._readyPromise=o$1l.resolve(!0),this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0};var i=e.credit;"string"==typeof i&&(i=new r$T(i)),this._credit=i;var n=u$_(e.ellipsoid,t$13.WGS84);this._tilingScheme=new g$13({ellipsoid:n}),this._heightmapWidth=64,this._heightmapHeight=64,this._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(n,Math.min(this._heightmapWidth,this._heightmapHeight),this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._minimumLevel=u$_(e.minimumLevel,5),this._maximumLevel=u$_(e.maximumLevel,25),this._hasWaterMask=!1,this._hasVertexNormals=!1}function B$1(e,t){return(t=e$2b(t)?t:new r$1b({url:e})).requestFunction=function(){var t=new XMLHttpRequest;t.open("get",e,!0),t.responseType="arraybuffer",t.async=!1,t.send(null);var i=o$1l.defer();return t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status&&e$2b(t.response)){for(var e=new DataView(t.response),n=e.byteLength,r=new Uint8Array(n),o=0;o<n;o++)r[o]=e.getUint8(o,!0);if(n>1e3){var a=nt$9.inflate(r).buffer;e$2b(a)?i.resolve(new Uint8Array(a)):i.reject(!1)}else i.reject(!1)}else(t.status>=400||0===t.status)&&i.reject(!1)},i.promise},r$1a.request(t)}function o$7(){}function n$4(e){e=u$_(e,u$_.EMPTY_OBJECT),this._tilingScheme=e$2b(e.tilingScheme)?e.tilingScheme:new g$13({ellipsoid:e.ellipsoid}),this._color=u$_(e.color,e$1U.YELLOW),this._errorEvent=new o$1h,this._tileWidth=u$_(e.tileWidth,256),this._tileHeight=u$_(e.tileHeight,256),this._readyPromise=o$1l.resolve(!0)}function r$b(e){t$16.throwInstantiationError()}i$7[t$7.IMG_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.IMG_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.IBO_W]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.IBO_C]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.CIA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.CIA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.VEC_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.VEC_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.TER_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],i$7[t$7.TER_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],i$7[t$7.CVA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.CVA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.CTA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.CTA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.EIA_W]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.EIA_C]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.EVA_W]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.EVA_C]=["1","2","3","4","5","6","7","8","9","10"],Object.defineProperties(d$8.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),d$8.prototype.requestTileGeometry=function(e,t,i,n){if(i<this._maximumLevel&&i>=this._minimumLevel){var r=this._urls[(e+t+i)%this._urls.length],o=-1===r.indexOf("?")?"?":"&",a=B$1(r+o+"x="+e+"&y="+t+"&l="+(i+1));if(!e$2b(a))return;var s=this;return o$1l(a,(function(e){var t=s.transformBuffer(e);return e$2b(t)?new T$J({buffer:t,width:s._heightmapWidth,height:s._heightmapHeight,childTileMask:void 0,structure:s._terrainDataStructure}):new T$J({buffer:s.getvHeightBuffer(),width:s._heightmapWidth,height:s._heightmapHeight,childTileMask:void 0,structure:s._terrainDataStructure})}))}if(i<this._minimumLevel)return new T$J({buffer:this.getvHeightBuffer(),width:this._heightmapWidth,height:this._heightmapHeight,childTileMask:void 0,structure:this._terrainDataStructure})},d$8.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},d$8.prototype.getTileDataAvailable=function(e,t,i){return i<25},d$8.prototype.getvHeightBuffer=function(){var e=this._vHeightBuffer;if(!e$2b(e)){e=this._vHeightBuffer=new Uint8ClampedArray(this._heightmapWidth*this._heightmapHeight*4);for(var t=this._heightmapWidth*this._heightmapHeight*4,i=0;i<t;)e[i++]=15,e[i++]=66,e[i++]=64,e[i++]=255}return e},d$8.prototype.transformBuffer=function(e){var t=2;"int"===this._dataType?t=2:"float"===this._dataType&&(t=4);var i,n,r,o,a,s,l,u=new ArrayBuffer(t),c=new DataView(u),h=this._heightmapWidth,d=this._heightmapHeight,f=new Uint8Array(h*d*4);for(i=0;i<d;i++)for(n=0;n<h;n++){r=parseInt(149*i/(d-1)),o=parseInt(149*n/(h-1)),4===t?(a=t*(150*r+o),c.setInt8(0,e[a]),c.setInt8(0,e[a+1]),c.setInt8(0,e[a+2]),c.setInt8(0,e[a+3]),l=c.getFloat32(0,!0)):l=e[a=t*(150*r+o)]+256*e[a+1],(l>1e4||l<-2e3)&&(l=0);var p=(l+1e3)/.001;f[s=4*(i*h+n)]=p/65536,f[s+1]=(p-256*f[s]*256)/256,f[s+2]=p-256*f[s]*256-256*f[s+1],f[s+3]=256}return f},o$7.prototype.boundingVolume=void 0,o$7.prototype.boundingSphere=void 0,o$7.prototype.distanceToCamera=function(e){t$16.throwInstantiationError()},o$7.prototype.intersectPlane=function(e){t$16.throwInstantiationError()},o$7.prototype.createDebugVolume=function(e){t$16.throwInstantiationError()},Object.defineProperties(n$4.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),n$4.prototype.getTileCredits=function(e,t,i){},n$4.prototype.requestImage=function(e,t,i,n){var r=document.createElement("canvas");r.width=256,r.height=256;var o=r.getContext("2d"),a=this._color.toCssColorString();return o.strokeStyle=a,o.lineWidth=2,o.strokeRect(1,1,255,255),o.font="bold 25px Arial",o.textAlign="center",o.fillStyle=a,o.fillText("L: "+i,124,86),o.fillText("X: "+e,124,136),o.fillText("Y: "+t,124,186),r},n$4.prototype.pickFeatures=function(e,t,i,n,r){},r$b.prototype.isReady=t$16.throwInstantiationError,r$b.prototype.shouldDiscardImage=t$16.throwInstantiationError;var e={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},TileState=Object.freeze(e);function g$6(e){e=u$_(e,u$_.EMPTY_OBJECT),o$1q.typeOf.object("options.clock",e.clock),o$1q.typeOf.object("options.intervals",e.intervals),this.show=u$_(e.show,!0),this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this.shadows=u$_(e.shadows,W$W.ENABLED),this.maximumMemoryUsage=u$_(e.maximumMemoryUsage,256),this.shading=new o$Z(e.shading),this.style=e.style,this.frameFailed=new o$1h,this.frameChanged=new o$1h,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new m$U,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._readyPromise=o$1l.defer(),this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=d$1s(new Array(5),0),this._runningAverage=0}function W$4(e){return"uniform vec4 czm_pickColor;\n"+e}function X$2(e){return function(t){return p$19(t,{czm_pickColor:function(){return e._pickId.color}})}}function Z$3(){return"czm_pickColor"}Object.defineProperties(g$6.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){h$K.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(e$2b(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}},readyPromise:{get:function(){return this._readyPromise.promise}}}),g$6.prototype.makeStyleDirty=function(){this._styleDirty=!0},g$6.prototype._getAverageLoadTime=function(){return 0===this._runningLength?.05:this._runningAverage};var $$2=new a$15;function k$3(e){var t=e._clock,i=t.canAnimate&&t.shouldAnimate,n=t.multiplier;return i?n:0}function p$2(e,t){return e._intervals.indexOf(t.start)}function ee$1(e,t){var i=e._intervals,n=e._clock,r=k$3(e);if(0!==r){var o=e._getAverageLoadTime(),a=a$15.addSeconds(n.currentTime,o*r,$$2),s=i.indexOf(a);return s===p$2(e,t)&&(r>=0?++s:--s),i.get(s)}}function ie(e){var t=e._intervals,i=e._clock.currentTime,n=t.indexOf(i);return t.get(n)}function ne$1(e,t,i){var n=k$3(e),r=p$2(e,t),o=p$2(e,i);return n>=0?r>=o:r<=o}function re$1(e,t){return function(i){var n=e$2b(i.message)?i.message:i.toString();e.frameFailed.numberOfListeners>0?e.frameFailed.raiseEvent({uri:t,message:n}):(console.log("A frame failed to load: "+t),console.log("Error: "+n))}}function te$1(e,t,i){var n=p$2(e,t),r=e._frames,o=r[n];if(!e$2b(o)){var a=t.data.transform,s=e$2b(a)?p$1d.fromArray(a):void 0,l=t.data.uri;o={pointCloud:void 0,transform:s,timestamp:Et$a(),sequential:!0,ready:!1,touchedFrameNumber:i.frameNumber},r[n]=o,t$11.fetchArrayBuffer({url:l}).then((function(t){return o.pointCloud=new ie$g({arrayBuffer:t,cull:!0,fragmentShaderLoaded:W$4,uniformMapLoaded:X$2(e),pickIdLoaded:Z$3}),o.pointCloud.readyPromise})).otherwise(re$1(e,l))}return o}function ae(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function se(e,t,i,n){t.touchedFrameNumber<n.frameNumber-1&&(t.sequential=!1);var r=t.pointCloud;if(e$2b(r)&&!t.ready){var o=n.commandList,a=o.length;if(A$3(e,t,i,n),r.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=r.geometryByteLength,o.length=a,t.sequential))ae(e,(Et$a()-t.timestamp)/1e3)}t.touchedFrameNumber=n.frameNumber}var oe$1=new p$1d;function le$1(e,t){var i=e.shading;return e$2b(i)&&e$2b(i.baseResolution)?i.baseResolution:e$2b(t.boundingSphere)?e$2a.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function ue(e){var t=e.shading;return e$2b(t)&&e$2b(t.maximumAttenuation)?t.maximumAttenuation:10}var de$1=new o$Z;function A$3(e,t,i,n){var r=u$_(e.shading,de$1),o=t.pointCloud,a=u$_(t.transform,p$1d.IDENTITY);o.modelMatrix=p$1d.multiplyTransformation(e.modelMatrix,a,oe$1),o.style=e.style,o.time=i.timeSinceLoad,o.shadows=e.shadows,o.clippingPlanes=e._clippingPlanes,o.isClipped=i.isClipped,o.attenuation=r.attenuation,o.backFaceCulling=r.backFaceCulling,o.normalShading=r.normalShading,o.geometricError=le$1(e,o),o.geometricErrorScale=r.geometricErrorScale,o.maximumAttenuation=ue(e),o.update(n),t.touchedFrameNumber=n.frameNumber}function L$5(e,t,i,n){se(e,te$1(e,t,n),i,n)}function me$1(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function T$2(e,t){for(var i=e._frames,n=i.length,r=0;r<n;++r){var o=i[r];if(e$2b(o)&&(!e$2b(t)||t(o))){var a=o.pointCloud;o.ready&&(e._totalMemoryUsageInBytes-=a.geometryByteLength),e$2b(a)&&a.destroy(),o===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),i[r]=void 0}}}function ce$2(e,t){var i=p$2(e,t),n=e._frames[i];if(e$2b(n)&&n.ready)return n}function E$2(e,t,i,n,r){return!!e$2b(i)&&(!!i.ready||(L$5(e,t,n,r),i.ready))}function fe(e,t,i,n,r){var o,a,s=e._intervals,l=e._frames,u=p$2(e,i),c=p$2(e,t);if(u>=c){for(o=u;o>=c;--o)if(E$2(e,a=s.get(o),l[o],n,r))return a}else for(o=u;o<=c;++o)if(E$2(e,a=s.get(o),l[o],n,r))return a;return t}function ge$1(e,t,i){for(var n=e._frames,r=n.length,o=0;o<r;++o){var a=n[o];e$2b(a)&&e$2b(a.pointCloud)&&(a.pointCloud.clippingPlanesDirty=t,a.pointCloud.styleDirty=i)}}var y$6={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};function t$6(e,t){this._show=u$_(t,!0),this._command=new i$_({owner:this}),this._radius=6378137-e,this._ellipsoid=t$13.fromCartesian3(new o$1p(this._radius,this._radius,this._radius)),this._baseColor=new e$1U(0,0,0,1)}g$6.prototype.update=function(e){if(e.mode!==C$13.MORPHING&&this.show){e$2b(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),e$2b(this._loadTimestamp)||(this._loadTimestamp=a$15.clone(e.time));var t=Math.max(1e3*a$15.secondsDifference(e.time,this._loadTimestamp),0),i=this._clippingPlanes,n=0,r=!1,o=e$2b(i)&&i.enabled;o&&(i.update(e),n=i.clippingPlanesState),this._clippingPlanesState!==n&&(this._clippingPlanesState=n,r=!0);var a=this._styleDirty;this._styleDirty=!1,(r||a)&&ge$1(this,r,a),y$6.timeSinceLoad=t,y$6.isClipped=o;var s=this.shading,l=this._pointCloudEyeDomeLighting,u=e.commandList,c=u.length,h=this._previousInterval,d=this._nextInterval,f=ie(this);if(e$2b(f)){var p=!1,_=k$3(this),m=0===_;_!==this._clockMultiplier&&(p=!0,this._clockMultiplier=_),(!e$2b(h)||m)&&(h=f),(!e$2b(d)||p||ne$1(this,f,d))&&(d=ee$1(this,f));var g=ce$2(this,h=fe(this,h,f,y$6,e));e$2b(g)||(L$5(this,h,y$6,e),g=this._lastRenderedFrame),e$2b(g)&&A$3(this,g,y$6,e),e$2b(d)&&L$5(this,d,y$6,e);var x=this;e$2b(g)&&!e$2b(this._lastRenderedFrame)&&e.afterRender.push((function(){x._readyPromise.resolve(x)})),e$2b(g)&&g!==this._lastRenderedFrame&&x.frameChanged.numberOfListeners>0&&e.afterRender.push((function(){x.frameChanged.raiseEvent(x)})),this._previousInterval=h,this._nextInterval=d,this._lastRenderedFrame=g,this._totalMemoryUsageInBytes>1024*this.maximumMemoryUsage*1024&&T$2(this,me$1(e));var v=u.length-c;e$2b(s)&&s.attenuation&&s.eyeDomeLighting&&v>0&&l.update(e,c,s)}}},g$6.prototype.isDestroyed=function(){return!1},g$6.prototype.destroy=function(){return T$2(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),i$10(this)},Object.defineProperties(t$6.prototype,{show:{get:function(){return this._show},set:function(e){o$1q.defined("UnderGlobe show",e),this._show=e}},radius:{get:function(){return this._radius},set:function(e){if(o$1q.defined("UnderGlobe radius",e),this._radius!==e){var t=this._command;e$2b(t)&&(t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),this._ellipsoid=t$13.fromCartesian3(new o$1p(this._radius,this._radius,this._radius))}this._radius=e}},ellipsoid:{get:function(){return this._ellipsoid}},baseColor:{get:function(){return this._baseColor},set:function(e){o$1q.defined("UnderGlobe baseColor",e),this._baseColor=e}}});var O$3="attribute vec4 position;\nvoid main(void)\n{\ngl_Position = czm_modelViewProjection * vec4(position.xyz - czm_relativeOrigin, 1.0);\n}",U$3="uniform vec4 uBaseColor;\nvoid main (void)\n{\ngl_FragColor = uBaseColor;\n}";t$6.prototype.update=function(e){var t=e.camera.positionCartographic.height;if(this._show&&e.passes.render&&!(t>1e4)){var i=e.mode;if(i===C$13.SCENE3D||i===C$13.MORPHING){var n=this._command,r=this;if(!e$2b(n.vertexArray)){var o=e.context,a=b$P.createGeometry(new b$P({radii:new o$1p(this._radius,this._radius,this._radius),slicePartitions:256,stackPartitions:256,vertexFormat:n$11.POSITION_ONLY})),s=k$13.createAttributeLocations(a);n.vertexArray=c$12.fromGeometry({context:o,geometry:a,attributeLocations:s,bufferUsage:A$19.STATIC_DRAW}),n.renderState=d$1m.fromCache({cull:{enabled:!0}}),n.uniformMap={uBaseColor:function(){return r._baseColor}};var l=new s$U({sources:[O$3]}),u=new s$U({sources:[U$3]});n.shaderProgram=r$13.fromCache({context:o,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:s})}return n}}},t$6.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),i$10(this)};var _$3="varying vec2 v_textureCoordinates;\nvoid main()\n{\nczm_materialInput materialInput;\nmaterialInput.s = v_textureCoordinates.s;\nmaterialInput.st = v_textureCoordinates;\nmaterialInput.str = vec3(v_textureCoordinates, 0.0);\nmaterialInput.normalEC = vec3(0.0, 0.0, -1.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n}\n";function o$6(e,t){this.show=!0,e$2b(e)||(e=new f$18),this.rectangle=f$18.clone(e),e$2b(t)||(t=r$X.fromType(r$X.ColorType,{color:new e$1U(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}function A$2(e){this._url=e.url,this._hypsometricTexture=void 0,this.hypsometricSetting=e.hypsometricSetting,this._ready=!1,this._volBounds=void 0,this._volImageBuffer=void 0,this._volTexture=void 0,this._dataBuffer=void 0,this.loadData(this._url)}function pt(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a=r[o],s=4*o;if(a<0||a>1)e[s+0]=255,e[s+1]=255,e[s+2]=255,e[s+3]=255;else{a=a*(t._ceiling-t._floor)+t._floor,i&&(a=Math.round(a));var l=t._dictColorTable.getColor(a);e[s+0]=255*l.red,e[s+1]=255*l.green,e[s+2]=255*l.blue,e[s+3]=255*l.alpha}}return new Uint8Array(e.buffer,0,e.length)}function gt(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function ut$1(e){for(var t=e.length/4,i=new Float32Array(e.buffer,e.byteOffset,t),n=0;n<i.length;n++){var r,o,a,s,l=i[n],u=4*n,c=new e$29(0,0,0,0);if(l>=0&&l<=1){l<e$2a.EPSILON9?l=e$2a.EPSILON9:1-l<e$2a.EPSILON9&&(l=1-e$2a.EPSILON9);var h=gt(l);c.x=h.x,c.y=h.y,c.z=h.z,c.w=1}r=255*c.x,o=255*c.y,a=255*c.z,s=255*c.w,e[u+0]=parseInt(r),e[u+1]=parseInt(o),e[u+2]=parseInt(a),e[u+3]=parseInt(s)}return new Uint8Array(e.buffer,0,e.length)}o$6.prototype.update=function(e){if(this.show){if(!e$2b(this.material))throw new t$16("this.material must be defined.");if(!e$2b(this.rectangle))throw new t$16("this.rectangle must be defined.");var t=this._rs;if((!e$2b(t)||!f$18.equals(t.viewport,this.rectangle))&&(this._rs=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render){var i=e.context;if(this._material!==this.material||!e$2b(this._overlayCommand)){this._material=this.material,e$2b(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();var n=new s$U({sources:[this._material.shaderSource,_$3]});this._overlayCommand=i.createViewportQuadCommand(n,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Le$s.OVERLAY}this._material.update(i),this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}}},o$6.prototype.isDestroyed=function(){return!1},o$6.prototype.destroy=function(){return e$2b(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),i$10(this)},Object.defineProperties(A$2.prototype,{hypsometricSetting:{get:function(){return this._hypsometricSetting},set:function(e){this._hypsometricSetting=e}}});var d$7=-9999,ct$1=new DOMParser;function _t(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t)return a}}A$2.prototype.loadData=function(e){var t=this;t._ready=!1;var i=u$R(e+"/config");!e$2b(i)||i.then((function(i){var n=_t((i=ct$1.parseFromString(i,"application/xml")).childNodes[0],"sml:Bounds").textContent.split("\n"),r=Number(n[1]),o=Number(n[2]),a=Number(n[3]),s=Number(n[4]),l='/data/index/1/1.stream?bounds={"leftBottom":{"x":xLeft,"y":yBottom},"rightTop":{"x":xRight,"y":yTop}}';l=l.replace("xLeft",r).replace("yBottom",s).replace("xRight",a).replace("yTop",o);var u=o$10(e+l);!e$2b(u)||u.then((function(e){var i=new Uint8Array(e,8),n=nt$9.inflate(i).buffer,r=new Float64Array(n,0,1),o=new Uint32Array(n,48,1);if(0===r[0]||3200===o[0]||3201===o[0]){var a=0;0===r[0]&&(a=8);var s=new Float64Array(n,a,6),l={left:s[0],top:s[1],right:s[2],bottom:s[3],minHeight:s[4]<s[5]?s[4]:s[5],maxHeight:s[4]>s[5]?s[4]:s[5]},u=new Uint32Array(n,48+a,7),c=u[0],h=u[1],d=u[2],f=u[3],p=u[4],_=u[5],m=u[6],g=new Uint8Array(n,76+a,f*f*4),x=new Float32Array(n,76+a,f*f),v=!1;Math.abs(t._hypsometricSetting._ceiling-Math.round(t._hypsometricSetting._ceiling))<e$2a.EPSILON6&&Math.abs(t._hypsometricSetting._floor-Math.round(t._hypsometricSetting._floor))<e$2a.EPSILON6&&(v=!0),t._dataBuffer=new Float32Array(p*_*m);for(var y=0;y<m;y++)for(var $=Math.floor(y/h),b=y%h,T=0;T<_;T++)for(var C=d*$+T,S=0;S<p;S++){var w=C*f+(d*b+S);if(x[w]<0||x[w]>1)t._dataBuffer[y*_*p+T*p+S]=d$7;else{var E=x[w]*(t._hypsometricSetting._ceiling-t._hypsometricSetting._floor)+t._hypsometricSetting._floor;v&&(E=Math.round(E)),t._dataBuffer[y*_*p+T*p+S]=E}}t._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST?pt(g,t.hypsometricSetting,v):ut$1(g);var P={nFormat:c,nSideBlockCount:h,nBlockLength:d,nLength:f,nWidth:p,nHeight:_,nDepth:m,imageArray:g};t._volBounds=l,t._volImageBuffer=P,t._ready=!0}e=null})).otherwise((function(e){}))})).otherwise((function(e){}))},A$2.prototype.loadTexture=function(e){if(!e$2b(this._volTexture)){var t=tt$h.NEAREST,i=rt$i.NEAREST;if(this._hypsometricSetting.filterMode!==k$Q.FilterMode.NEAREST)t=tt$h.LINEAR,i=rt$i.LINEAR;this._volTexture=new t$V({context:e,width:this._volImageBuffer.nLength,height:this._volImageBuffer.nLength,pixelFormat:V$10.RGBA,flipY:!1,sampler:new e$1P({minificationFilter:t,magnificationFilter:i})}),this._volTexture.copyFrom({width:this._volImageBuffer.nLength,height:this._volImageBuffer.nLength,arrayBufferView:this._volImageBuffer.imageArray}),this._volImageBuffer.imageArray=null}e$2b(this._hypsometricTexture)||(this._hypsometricTexture=new t$V({context:e,width:1024,height:64,pixelFormat:V$10.RGBA,flipY:!1}),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer}))},A$2.prototype.getPixel=function(e,t,i){var n=i*this._volImageBuffer.nWidth*this._volImageBuffer.nHeight+t*this._volImageBuffer.nWidth+e;return this._dataBuffer[n]},A$2.prototype.getValue=function(e){var t=SuperMap3D.Cartographic.fromCartesian(e),i=SuperMap3D.Math.toDegrees(t.longitude),n=SuperMap3D.Math.toDegrees(t.latitude),r=t.height,o=(i-this._volBounds.left)/(this._volBounds.right-this._volBounds.left);if(!(o>1||o<0)){var a=(n-this._volBounds.bottom)/(this._volBounds.top-this._volBounds.bottom);if(!(a>1||a<0)){var s=(r-this._volBounds.minHeight)/(this._volBounds.maxHeight-this._volBounds.minHeight);if(!(s>1||s<0)){var l=o*this._volImageBuffer.nWidth-.5,u=a*this._volImageBuffer.nHeight-.5,c=s*(this._volImageBuffer.nDepth-1),h=Math.floor(l),d=Math.ceil(l),f=Math.floor(u),p=Math.ceil(u),_=Math.floor(c),m=Math.ceil(c);if(h=e$2a.clamp(h,0,this._volImageBuffer.nWidth-1),d=e$2a.clamp(d,0,this._volImageBuffer.nWidth-1),f=e$2a.clamp(f,0,this._volImageBuffer.nHeight-1),p=e$2a.clamp(p,0,this._volImageBuffer.nHeight-1),_=e$2a.clamp(_,0,this._volImageBuffer.nDepth-1),m=e$2a.clamp(m,0,this._volImageBuffer.nDepth-1),this._hypsometricSetting.filterMode===k$Q.FilterMode.NEAREST)return l=l-h>.5?d:h,u=u-f>.5?p:f,c=c-_>.5?m:_,M=this.getPixel(l,u,c);var g=this.getPixel(h,f,_),x=this.getPixel(d,f,_);g==d$7&&(g=0),x==d$7&&(x=0);var v=g;h!=d&&(v=x*(l-h)+g*(d-l));var y=this.getPixel(h,p,_),$=this.getPixel(d,p,_);y==d$7&&(y=0),$==d$7&&($=0);var b=y;h!=d&&(b=$*(l-h)+y*(d-l));var T=b;if(f!=p)T=b*(u-f)+v*(p-u);var C=this.getPixel(h,f,m),S=this.getPixel(d,f,m);C==d$7&&(C=0),S==d$7&&(S=0);var w=C;h!=d&&(w=S*(l-h)+C*(d-l));var E=this.getPixel(h,p,m),P=this.getPixel(d,p,m);E==d$7&&(E=0),P==d$7&&(P=0);var A=E;h!=d&&(A=P*(l-h)+E*(d-l));var L=A;if(f!=p)L=A*(u-f)+w*(p-u);var M=L;if(_!=m)M=L*(c-_)+T*(m-c);return M}}}};var ve="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nuniform vec4 u_tileRangeAndImageSize;\nattribute vec4 volTexCoord;\nvarying vec4 v_volTexCoord;\nvarying vec2 v_textureCoordinates;\nfloat getGlobeDepth(vec4 positionEC){\nvec4 posWC = czm_eyeToWindowCoordinates(positionEC);\nfloat globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\nif (globeDepth == 0.0){\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction)\n{\nvec2 halfSize = imageSize * scale * czm_resolutionScale * 0.5;\nhalfSize *= ((direction * 2.0) - 1.0);\npositionEC.xy += halfSize;\nreturn positionEC;\n}\nvoid main()\n{\nvec3 positionHigh = positionHighAndScale.xyz;\nvec3 positionLow = positionLowAndRotation.xyz;\nfloat scale = positionHighAndScale.w;\nvec2 textureCoordinates = direction;\nvec2 imageSize = u_tileRangeAndImageSize.zw;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\nfloat depthsilon = 10.0;\nfloat globeDepth = getGlobeDepth(positionEC);\nif (globeDepth != 0.0 && positionEC.z + depthsilon < globeDepth)\n{\npositionEC.xyz = vec3(0.0);\n}\nelse{\npositionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction);\n}\ngl_Position = czm_projection * positionEC;\nv_textureCoordinates = textureCoordinates;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth();\n#endif\nv_volTexCoord = volTexCoord;\nvec2 halfSize = imageSize * scale * czm_resolutionScale * 0.5 / u_tileRangeAndImageSize.xy;\nhalfSize *= ((direction * 2.0) - 1.0);\nv_volTexCoord.xy += halfSize;\n}\n",pe="#extension GL_EXT_draw_buffers : enable\nuniform sampler2D u_atlas;\nuniform vec4 u_voxelGridLayerColor;\nuniform sampler2D u_colorTable;\nuniform vec4 u_minMaxValueAndFiltration;\nuniform vec3 u_maxVisibleTextureCoord;\nuniform vec3 u_minVisibleTextureCoord;\nvarying vec4 v_volTexCoord;\nvarying vec2 v_textureCoordinates;\nbool getSampleValueForVolume(float volumeValue, out vec4 colorFromColorTable)\n{\nfloat minValue = u_minMaxValueAndFiltration.x;\nfloat maxValue = u_minMaxValueAndFiltration.y;\nfloat minFiltration = u_minMaxValueAndFiltration.z;\nfloat maxFiltration = u_minMaxValueAndFiltration.w;\ncolorFromColorTable = vec4(1.0);\nfloat realValue = minValue + volumeValue * (maxValue - minValue);\nif(realValue > maxFiltration || realValue < minFiltration)\n{\nreturn false;\n}\n#ifdef HAS_COLORTABLE\ncolorFromColorTable = texture2D(u_colorTable, vec2(0.0, 1.0 - realValue)).rgba;\n#endif\nreturn true;\n}\nvoid main()\n{\nvec4 color = texture2D(u_atlas, v_textureCoordinates);\ncolor = czm_gammaCorrect(color);\nif (color.a < 0.005)\n{\ndiscard;\n}\n#ifdef TEXTURECOORD_CLIP\nif(v_volTexCoord.x > u_maxVisibleTextureCoord.x || v_volTexCoord.x < u_minVisibleTextureCoord.x\n|| v_volTexCoord.y > u_maxVisibleTextureCoord.y || v_volTexCoord.y < u_minVisibleTextureCoord.y\n|| v_volTexCoord.z > u_maxVisibleTextureCoord.z || v_volTexCoord.z < u_minVisibleTextureCoord.z)\n{\ndiscard;\n}\n#endif\nvec4 volumeColor = vec4(1.0);\nfloat noValue;\nfloat volumeValue = czm_getVolumeValue(v_volTexCoord.xyz, noValue);\nvec4 colorFromColorTable = vec4(1.0);\nif(!getSampleValueForVolume(volumeValue, colorFromColorTable))\n{\ndiscard;\n}\n#ifdef HAS_COLORTABLE\nvolumeColor = colorFromColorTable;\n#else\nfloat power = volumeValue * 40.0 - 30.0;\nvec3 hdrColor = u_voxelGridLayerColor.rgb * pow(2.0, power);\nvolumeColor.rgb = hdrColor;\n#endif\ncolor.rgb *= volumeColor.rgb;\nczm_writeLogDepth();\n#ifdef OIT\nvec3 Ci = color.rgb * color.a;\nfloat ai = color.a;\nfloat wzi = czm_alphaWeight(ai);\ngl_FragData[0] = vec4(Ci * wzi, ai);\ngl_FragData[1] = vec4(ai * wzi);\n#else\ngl_FragColor = color;\n#endif\n}\n",me=n$I.POSITION_INDEX,ee=n$I.NUMBER_OF_PROPERTIES,m$6,Ae$1={positionHighAndScale:0,positionLowAndRotation:1,volTexCoord:3},ge={direction:0,positionHighAndScale:1,positionLowAndRotation:2,volTexCoord:3},z$2;function c$7(e){e=u$_(e,u$_.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(ee),this._maxScale=1,this._allSizedInMeters=!0,this._baseVolume=new i$1c,this._baseVolumeWC=new i$1c,this._baseVolume2D=new i$1c,this._boundingVolume=new i$1c,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=p$1d.clone(u$_(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$_(e.debugShowBoundingVolume,!1),this.volumeShaderPredefine=u$_(e.volumeShaderPredefine,[]),this._volumeShaderPredefine=void 0,this._mode=C$13.SCENE3D,this._highlightColor=e$1U.clone(e$1U.WHITE);var t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture}};var i=this._scene;e$2b(i)&&e$2b(i.terrainProviderChanged)&&(this._removeCallbackFunc=i.terrainProviderChanged.addEventListener((function(){for(var e=this._billboards,t=e.length,i=0;i<t;++i)e[i]._updateClamping()}),this)),this.transparent=u$_(e.OIT,!0),this._transparent=void 0,this._postRender=e.postRender}function te(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function W$3(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;for(var t=[],i=e._billboards,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._billboards=t}}function ye(e){var t=e.cache.billboardCollection_indexBufferBatched;if(e$2b(t))return t;for(var i=new Uint16Array(98298),n=0,r=0;n<98298;n+=6,r+=4)i[n]=r,i[n+1]=r+1,i[n+2]=r+2,i[n+3]=r+0,i[n+4]=r+2,i[n+5]=r+3;return(t=t$Y.createIndexBuffer({context:e,typedArray:i,usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=t,t}function Te(e){var t=e.cache.billboardCollection_indexBufferInstanced;return e$2b(t)||((t=t$Y.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$19.STATIC_DRAW,indexDatatype:ce$x.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function Ie(e){var t=e.cache.billboardCollection_vertexBufferInstanced;return e$2b(t)||((t=t$Y.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:A$19.STATIC_DRAW})).vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}function Se(e,t,i,n){var r=[{index:m$6.positionHighAndScale,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:A$19.STATIC_DRAW},{index:m$6.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:A$19.STATIC_DRAW},{index:m$6.volTexCoord,componentsPerAttribute:4,componentDatatype:S$12.FLOAT,usage:A$19.STATIC_DRAW}];return i&&r.push({index:m$6.direction,componentsPerAttribute:2,componentDatatype:S$12.FLOAT,vertexBuffer:Ie(e)}),e$2b(n)&&r.push({index:m$6.a_batchId,componentsPerAttribute:1,componentDatatyps:S$12.FLOAT,bufferUsage:A$19.STATIC_DRAW}),new v$F(e,r,i?t:4*t,i)}Object.defineProperties(c$7.prototype,{length:{get:function(){return W$3(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}}}),c$7.prototype.add=function(e){var t=new n$I(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t},c$7.prototype.remove=function(e){return!!this.contains(e)&&(this._billboards[e._index]=null,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},c$7.prototype.removeAll=function(){te(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},c$7.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},c$7.prototype.contains=function(e){return e$2b(e)&&e._billboardCollection===this},c$7.prototype.get=function(e){if(!e$2b(e))throw new t$16("index is required.");return W$3(this),this._billboards[e]};var H=new i$11;function re(e,t,i,n,r){var o,a=n[m$6.positionHighAndScale],s=n[m$6.positionLowAndRotation],l=r._getActualPosition();e._mode===C$13.SCENE3D&&(i$1c.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),i$11.fromCartesian(l,H);var u=r.scale,c=r.rotation;0!==c&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,u);var h=H.high,d=H.low;e._instanced?(a(o=r._index,h.x,h.y,h.z,u),s(o,d.x,d.y,d.z,c)):(a((o=4*r._index)+0,h.x,h.y,h.z,u),a(o+1,h.x,h.y,h.z,u),a(o+2,h.x,h.y,h.z,u),a(o+3,h.x,h.y,h.z,u),s(o+0,d.x,d.y,d.z,c),s(o+1,d.x,d.y,d.z,c),s(o+2,d.x,d.y,d.z,c),s(o+3,d.x,d.y,d.z,c))}function De(e,t,i,n,r){var o,a=n[m$6.volTexCoord],s=0,l=0,u=0;e$2b(r._volTexCoord)&&(s=r._volTexCoord.x,l=r._volTexCoord.y,u=r._volTexCoord.z),e._instanced?a(o=r._index,s,l,u,0):(a((o=4*r._index)+0,s,l,u,0),a(o+1,s,l,u,0),a(o+2,s,l,u,0),a(o+3,s,l,u,0))}function be(e,t,i,n,r){re(e,t,i,n,r),De(e,t,i,n,r)}function G$1(e,t,i,n,r,o){var a;n.mode===C$13.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=n$I._computeActualPosition(u,c,n,r);e$2b(h)&&(u._setActualPosition(h),o?s.push(h):i$1c.expand(a,h,a))}o&&i$1c.fromPoints(s,a)}function Ce(e,t){var i=t.mode,n=e._billboards,r=e._billboardsToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==C$13.SCENE3D&&!p$1d.equals(o,e.modelMatrix)?(e._mode=i,p$1d.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===C$13.SCENE3D||i===C$13.SCENE2D||i===C$13.COLUMBUS_VIEW)&&G$1(e,n,n.length,t,o,!0)):i===C$13.MORPHING?G$1(e,n,n.length,t,o,!0):(i===C$13.SCENE2D||i===C$13.COLUMBUS_VIEW)&&G$1(e,r,e._billboardsToUpdateIndex,t,o,!1)}function Ve$2(e){var t=e._volumeShaderPredefine,i=e.volumeShaderPredefine;if(!e$2b(t)||t.length!==i.length)return!0;for(var n=0;n<i.length;n++)if(t[n]!=i[n])return!0;return!1}var Ee=[],Module;c$7.prototype.update=function(e){W$3(this);var t=this._billboards,i=t.length,n=e.context;this._instanced=n.instancedArrays,m$6=this._instanced?ge:Ae$1,z$2=this._instanced?Te:ye;var r=this._textureAtlas;if(!e$2b(r)){r=this._textureAtlas=new v$I({context:n});for(var o=0;o<i;++o)t[o]._loadImage()}var a=r.textureCoordinates;if(0!==a.length){Ce(this,e),i=(t=this._billboards).length;var s=this._billboardsToUpdate,l=this._billboardsToUpdateIndex,u=this._propertiesChanged,c=r.guid,h=this._createVertexArray||this._textureAtlasGUID!==c;this._textureAtlasGUID=c;var d,f=e.passes;if(f.pick,h){this._createVertexArray=!1;for(var p=0;p<ee;++p)u[p]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),i>0){this._vaf=Se(n,i,this._instanced,this._batchTable),d=this._vaf.writers;for(var _=0;_<i;++_){var m=this._billboards[_];m._dirty=!1,be(this,n,a,d,m)}this._vaf.commit(z$2(n))}this._billboardsToUpdateIndex=0}else if(l>0){var g=Ee;g.length=0,u[me]&&g.push(re);var x=g.length;if(d=this._vaf.writers,l/i>.1){for(var v=0;v<l;++v){var y=s[v];y._dirty=!1;for(var $=0;$<x;++$)g[$](this,n,a,d,y)}this._vaf.commit(z$2(n))}else{for(var b=0;b<l;++b){var T=s[b];T._dirty=!1;for(var C=0;C<x;++C)g[C](this,n,a,d,T);this._instanced?this._vaf.subCommit(T._index,1):this._vaf.subCommit(4*T._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(l>1.5*i&&(s.length=i),e$2b(this._vaf)&&e$2b(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,i$1c.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var S,w=p$1d.IDENTITY;e.mode===C$13.SCENE3D?(w=this.modelMatrix,S=i$1c.clone(this._baseVolumeWC,this._boundingVolume)):S=i$1c.clone(this._baseVolume2D,this._boundingVolume);var E=this._transparent!==this.transparent;this._transparent=this.transparent;var P,A,L=Ve$2(this);if(this._volumeShaderPredefine=this.volumeShaderPredefine,E&&(this._rsTranslucent=d$1m.fromCache({depthTest:{enabled:!1,func:de$x.LESS},depthMask:!this._transparent,blending:Ee$r.ALPHA_BLEND})),E||L)P=new s$U({defines:this._volumeShaderPredefine,sources:[ve]}),this._instanced&&P.defines.push("INSTANCED"),A=new s$U({defines:this._volumeShaderPredefine,sources:[pe]}),this._transparent&&A.defines.push("OIT"),this._sp=r$13.replaceCache({context:n,shaderProgram:this._sp,vertexShaderSource:P,fragmentShaderSource:A,attributeLocations:m$6});var M=e.commandList;if(f.render||f.pick){var R=this._colorCommands,O=this._vaf.va,I=O.length,D=this._uniforms;R.length=I;for(var B=0;B<I;++B){var N=R[B];e$2b(N)||(N=R[B]=new i$_),N.pass=Le$s.Voxel_Billboard,N.boundingVolume=S,N.modelMatrix=w,N.count=O[B].indicesCount,N.shaderProgram=this._sp,N.uniformMap=D,N.vertexArray=O[B].va,N.renderState=this._rsTranslucent,N.debugShowBoundingVolume=this.debugShowBoundingVolume,this._instanced&&(N.count=6,N.instanceCount=i),M.push(N)}}}}},c$7.prototype.isDestroyed=function(){return!1},c$7.prototype.destroy=function(){return e$2b(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),te(this._billboards),i$10(this)},Module||(Module=(typeof Module<"u"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1,nodeFS,nodePath;if(Module.ENVIRONMENT)if("WEB"===Module.ENVIRONMENT)ENVIRONMENT_IS_WEB=!0;else if("WORKER"===Module.ENVIRONMENT)ENVIRONMENT_IS_WORKER=!0;else if("NODE"===Module.ENVIRONMENT)ENVIRONMENT_IS_NODE=!0;else{if("SHELL"!==Module.ENVIRONMENT)throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");ENVIRONMENT_IS_SHELL=!0}else ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"function"==typeof require&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE)Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn),Module.read=function(e,t){nodeFS||(nodeFS=require("fs")),nodePath||(nodePath=require("path")),e=nodePath.normalize(e);var i=nodeFS.readFileSync(e);return t?i:i.toString()},Module.readBinary=function(e){var t=Module.read(e,!0);return t.buffer||(t=new Uint8Array(t)),assert(t.buffer),t},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),process.on("uncaughtException",(function(e){if(!(e instanceof ExitStatus))throw e})),Module.inspect=function(){return"[Emscripten Module object]"};else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<"u"&&(Module.printErr=printErr),typeof read<"u"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(e){if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));var t=read(e,"binary");return assert("object"==typeof t),t},typeof scriptArgs<"u"?Module.arguments=scriptArgs:typeof arguments<"u"&&(Module.arguments=arguments),"function"==typeof quit&&(Module.quit=function(e,t){quit(e)});else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw"Unknown runtime environment. Where are we?";if(Module.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),Module.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},typeof arguments<"u"&&(Module.arguments=arguments),typeof console<"u")Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<"u"?function(e){dump(e)}:function(e){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>"u"&&(Module.setWindowTitle=function(e){document.title=e})}function globalEval(e){eval.call(null,e)}for(var key in!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(e,t){throw t}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[],moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(e){return tempRet0=e,e},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(e){STACKTOP=e},getNativeTypeSize:function(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":case"float":return 4;case"i64":case"double":return 8;default:if("*"===e[e.length-1])return Runtime.QUANTUM_SIZE;if("i"===e[0]){var t=parseInt(e.substr(1));return assert(t%8==0),t/8}return 0}},getNativeFieldSize:function(e){return Math.max(Runtime.getNativeTypeSize(e),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(e,t){return"double"===t||"i64"===t?7&e&&(assert(4==(7&e)),e+=4):assert(0==(3&e)),e},getAlignSize:function(e,t,i){return i||"i64"!=e&&"double"!=e?e?Math.min(t||(e?Runtime.getNativeFieldSize(e):0),Runtime.QUANTUM_SIZE):Math.min(t,8):8},dynCall:function(e,t,i){return i&&i.length?Module["dynCall_"+e].apply(null,[t].concat(i)):Module["dynCall_"+e].call(null,t)},functionPointers:[],addFunction:function(e){for(var t=0;t<Runtime.functionPointers.length;t++)if(!Runtime.functionPointers[t])return Runtime.functionPointers[t]=e,2*(1+t);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},removeFunction:function(e){Runtime.functionPointers[(e-2)/2]=null},warnOnce:function(e){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[e]||(Runtime.warnOnce.shown[e]=1,Module.printErr(e))},funcWrappers:{},getFuncWrapper:function(e,t){assert(t),Runtime.funcWrappers[t]||(Runtime.funcWrappers[t]={});var i=Runtime.funcWrappers[t];return i[e]||(1===t.length?i[e]=function(){return Runtime.dynCall(t,e)}:2===t.length?i[e]=function(i){return Runtime.dynCall(t,e,[i])}:i[e]=function(){return Runtime.dynCall(t,e,Array.prototype.slice.call(arguments))}),i[e]},getCompilerSetting:function(e){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},stackAlloc:function(e){var t=STACKTOP;return STACKTOP=(STACKTOP=STACKTOP+e|0)+15&-16,t},staticAlloc:function(e){var t=STATICTOP;return STATICTOP=(STATICTOP=STATICTOP+e|0)+15&-16,t},dynamicAlloc:function(e){var t=HEAP32[DYNAMICTOP_PTR>>2],i=-16&(t+e+15|0);if((HEAP32[DYNAMICTOP_PTR>>2]=i,i>=TOTAL_MEMORY)&&!enlargeMemory())return HEAP32[DYNAMICTOP_PTR>>2]=t,0;return t},alignMemory:function(e,t){return e=Math.ceil(e/(t||16))*(t||16)},makeBigInt:function(e,t,i){return i?+(e>>>0)+4294967296*+(t>>>0):+(e>>>0)+4294967296*+(0|t)},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,cwrap,ccall;function assert(e,t){e||abort("Assertion failed: "+t)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(e){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}function setValue(e,t,i,n){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":HEAP8[e>>0]=t;break;case"i16":HEAP16[e>>1]=t;break;case"i32":HEAP32[e>>2]=t;break;case"i64":tempI64=[t>>>0,(tempDouble=t,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=t;break;case"double":HEAPF64[e>>3]=t;break;default:abort("invalid type for setValue: "+i)}}function getValue(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return HEAP8[e>>0];case"i16":return HEAP16[e>>1];case"i32":case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];default:abort("invalid type for setValue: "+t)}return null}(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(e){var t=Runtime.stackAlloc(e.length);return writeArrayToMemory(e,t),t},stringToC:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);stringToUTF8(e,t=Runtime.stackAlloc(i),i)}return t}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,t,i,n,r){var o=getCFunc(e),a=[],s=0;if(n)for(var l=0;l<n.length;l++){var u=toC[i[l]];u?(0===s&&(s=Runtime.stackSave()),a[l]=u(n[l])):a[l]=n[l]}var c=o.apply(null,a);if("string"===t&&(c=Pointer_stringify(c)),0!==s){if(r&&r.async)return void EmterpreterAsync.asyncFinalizers.push((function(){Runtime.stackRestore(s)}));Runtime.stackRestore(s)}return c};var sourceRegex=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(e){var t=e.toString().match(sourceRegex).slice(1);return{arguments:t[0],body:t[1],returnValue:t[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource)for(var e in JSsource={},JSfuncs)JSfuncs.hasOwnProperty(e)&&(JSsource[e]=parseJSFunc(JSfuncs[e]))}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every((function(e){return"number"===e})),numericRet="string"!==returnType;if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map((function(e,t){return"$"+t})),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if("number"!==type){var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";",funcstr+=convertCode.body+";",funcstr+=arg+"=("+convertCode.returnValue+");"}}}var cfuncname=parseJSFunc((function(){return cfunc})).returnValue;if(funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");",!numericRet){var strgfy=parseJSFunc((function(){return Pointer_stringify})).returnValue;funcstr+="ret = "+strgfy+"(ret);"}return numericArgs||(ensureJSsource(),funcstr+=JSsource.stackRestore.body.replace("()","(stack)")+";"),funcstr+="return ret})",eval(funcstr)}})(),Module.ccall=ccall,Module.cwrap=cwrap,Module.setValue=setValue,Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;function allocate(e,t,i,n){var r,o;"number"==typeof e?(r=!0,o=e):(r=!1,o=e.length);var a,s="string"==typeof t?t:null;if(a=i==ALLOC_NONE?n:["function"==typeof _malloc?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][void 0===i?ALLOC_STATIC:i](Math.max(o,s?1:t.length)),r){var l;n=a;for(assert(0==(3&a)),l=a+(-4&o);n<l;n+=4)HEAP32[n>>2]=0;for(l=a+o;n<l;)HEAP8[n++>>0]=0;return a}if("i8"===s)return e.subarray||e.slice?HEAPU8.set(e,a):HEAPU8.set(new Uint8Array(e),a),a;for(var u,c,h,d=0;d<o;){var f=e[d];("function"==typeof f&&(f=Runtime.getFunctionIndex(f)),0!==(u=s||t[d]))?("i64"==u&&(u="i32"),setValue(a+d,f,u),h!==u&&(c=Runtime.getNativeTypeSize(u),h=u),d+=c):d++}return a}function getMemory(e){return staticSealed?runtimeInitialized?_malloc(e):Runtime.dynamicAlloc(e):Runtime.staticAlloc(e)}function Pointer_stringify(e,t){if(0===t||!e)return"";for(var i,n=0,r=0;n|=i=HEAPU8[e+r>>0],(0!=i||t)&&(r++,!t||r!=t););t||(t=r);var o="";if(n<128){for(var a,s=1024;t>0;)a=String.fromCharCode.apply(String,HEAPU8.subarray(e,e+Math.min(t,s))),o=o?o+a:a,e+=s,t-=s;return o}return Module.UTF8ToString(e)}function AsciiToString(e){for(var t="";;){var i=HEAP8[e++>>0];if(!i)return t;t+=String.fromCharCode(i)}}function stringToAscii(e,t){return writeAsciiToMemory(e,t,!1)}Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE,Module.allocate=allocate,Module.getMemory=getMemory,Module.Pointer_stringify=Pointer_stringify,Module.AsciiToString=AsciiToString,Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(e,t){for(var i=t;e[i];)++i;if(i-t>16&&e.subarray&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,i));for(var n,r,o,a,s,l="";;){if(!(n=e[t++]))return l;if(128&n)if(r=63&e[t++],192!=(224&n))if(o=63&e[t++],224==(240&n)?n=(15&n)<<12|r<<6|o:(a=63&e[t++],240==(248&n)?n=(7&n)<<18|r<<12|o<<6|a:(s=63&e[t++],248==(252&n)?n=(3&n)<<24|r<<18|o<<12|a<<6|s:n=(1&n)<<30|r<<24|o<<18|a<<12|s<<6|63&e[t++])),n<65536)l+=String.fromCharCode(n);else{var u=n-65536;l+=String.fromCharCode(55296|u>>10,56320|1023&u)}else l+=String.fromCharCode((31&n)<<6|r);else l+=String.fromCharCode(n)}}function UTF8ToString(e){return UTF8ArrayToString(HEAPU8,e)}function stringToUTF8Array(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else if(s<=2097151){if(i+3>=o)break;t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}else if(s<=67108863){if(i+4>=o)break;t[i++]=248|s>>24,t[i++]=128|s>>18&63,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+5>=o)break;t[i++]=252|s>>30,t[i++]=128|s>>24&63,t[i++]=128|s>>18&63,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r}function stringToUTF8(e,t,i){return stringToUTF8Array(e,HEAPU8,t,i)}function lengthBytesUTF8(e){for(var t=0,i=0;i<e.length;++i){var n=e.charCodeAt(i);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++i)),n<=127?++t:t+=n<=2047?2:n<=65535?3:n<=2097151?4:n<=67108863?5:6}return t}function demangle(e){var t=Module.___cxa_demangle||Module.__cxa_demangle;if(t){try{var i=e.substr(1),n=lengthBytesUTF8(i)+1,r=_malloc(n);stringToUTF8(i,r,n);var o=_malloc(4),a=t(r,0,0,o);if(0===getValue(o,"i32")&&a)return Pointer_stringify(a)}catch{}finally{r&&_free(r),o&&_free(o),a&&_free(a)}return e}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function demangleAll(e){return e.replace(/__Z[\w\d_]+/g,(function(e){var t=demangle(e);return e===t?e:e+" ["+t+"]"}))}function jsStackTrace(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function stackTrace(){var e=jsStackTrace();return Module.extraStackTrace&&(e+="\n"+Module.extraStackTrace()),demangleAll(e)}Module.UTF8ArrayToString=UTF8ArrayToString,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8Array=stringToUTF8Array,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,typeof TextDecoder<"u"&&new TextDecoder("utf-16le"),Module.stackTrace=stackTrace;var WASM_PAGE_SIZE=65536,ASMJS_PAGE_SIZE=16777216,MIN_TOTAL_MEMORY=16777216,HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR,byteLength;function alignUp(e,t){return e%t>0&&(e+=t-e%t),e}function updateGlobalBuffer(e){Module.buffer=buffer=e}function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){var e=Module.usingWasm?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE,t=2147483648-e;if(HEAP32[DYNAMICTOP_PTR>>2]>t)return!1;var i=TOTAL_MEMORY;for(TOTAL_MEMORY=Math.max(TOTAL_MEMORY,MIN_TOTAL_MEMORY);TOTAL_MEMORY<HEAP32[DYNAMICTOP_PTR>>2];)TOTAL_MEMORY=TOTAL_MEMORY<=536870912?alignUp(2*TOTAL_MEMORY,e):Math.min(alignUp((3*TOTAL_MEMORY+2147483648)/4,e),t);var n=Module.reallocBuffer(TOTAL_MEMORY);return n&&n.byteLength==TOTAL_MEMORY?(updateGlobalBuffer(n),updateGlobalBufferViews(),!0):(TOTAL_MEMORY=i,!1)}STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1,Module.reallocBuffer||(Module.reallocBuffer=function(e){var t;try{if(ArrayBuffer.transfer)t=ArrayBuffer.transfer(buffer,e);else{var i=HEAP8;t=new ArrayBuffer(e),new Int8Array(t).set(i)}}catch{return!1}return!!_emscripten_replace_memory(t)&&t});try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get),byteLength(new ArrayBuffer(4))}catch(d){byteLength=function(e){return e.byteLength}}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216;function getTotalMemory(){return TOTAL_MEMORY}if(TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),buffer=Module.buffer?Module.buffer:new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews(),HEAP32[0]=1668509029,HEAP16[1]=25459,115!==HEAPU8[2]||99!==HEAPU8[3])throw"Runtime error: expected the system to be little-endian!";function callRuntimeCallbacks(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?Module.dynCall_v(i):Module.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}}Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__)}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPreMain(e){__ATMAIN__.unshift(e)}function addOnExit(e){__ATEXIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}function intArrayFromString(e,t,i){var n=i>0?i:lengthBytesUTF8(e)+1,r=new Array(n),o=stringToUTF8Array(e,r,0,r.length);return t&&(r.length=o),r}function intArrayToString(e){for(var t=[],i=0;i<e.length;i++){var n=e[i];n>255&&(n&=255),t.push(String.fromCharCode(n))}return t.join("")}function writeStringToMemory(e,t,i){var n,r;Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!"),i&&(r=t+lengthBytesUTF8(e),n=HEAP8[r]),stringToUTF8(e,t,1/0),i&&(HEAP8[r]=n)}function writeArrayToMemory(e,t){HEAP8.set(e,t)}function writeAsciiToMemory(e,t,i){for(var n=0;n<e.length;++n)HEAP8[t++>>0]=e.charCodeAt(n);i||(HEAP8[t>>0]=0)}Module.addOnPreRun=addOnPreRun,Module.addOnInit=addOnInit,Module.addOnPreMain=addOnPreMain,Module.addOnExit=addOnExit,Module.addOnPostRun=addOnPostRun,Module.intArrayFromString=intArrayFromString,Module.intArrayToString=intArrayToString,Module.writeStringToMemory=writeStringToMemory,Module.writeArrayToMemory=writeArrayToMemory,Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||-5!==Math.imul(4294967295,5))&&(Math.imul=function(e,t){var i=65535&e,n=65535&t;return i*n+((e>>>16)*n+i*(t>>>16)<<16)|0}),Math.imul=Math.imul,Math.clz32||(Math.clz32=function(e){e>>>=0;for(var t=0;t<32;t++)if(e&1<<31-t)return t;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_min=Math.min,runDependencies=0,dependenciesFulfilled=null;function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={},STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+6192,__ATINIT__.push(),allocate([228,2,0,0,81,16,0,0,12,3,0,0,177,16,0,0,32,0,0,0,0,0,0,0,12,3,0,0,94,16,0,0,48,0,0,0,0,0,0,0,228,2,0,0,127,16,0,0,12,3,0,0,140,16,0,0,16,0,0,0,0,0,0,0,12,3,0,0,183,17,0,0,32,0,0,0,0,0,0,0,12,3,0,0,147,17,0,0,72,0,0,0,0,0,0,0,108,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,32,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,1,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,40,20,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,16,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,56,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,37,115,40,37,117,41,58,32,65,115,115,101,114,116,105,111,110,32,102,97,105,108,117,114,101,58,32,34,37,115,34,10,0,109,95,115,105,122,101,32,60,61,32,109,95,99,97,112,97,99,105,116,121,0,46,47,105,110,99,92,99,114,110,95,100,101,99,111,109,112,46,104,0,109,105,110,95,110,101,119,95,99,97,112,97,99,105,116,121,32,60,32,40,48,120,55,70,70,70,48,48,48,48,85,32,47,32,101,108,101,109,101,110,116,95,115,105,122,101,41,0,110,101,119,95,99,97,112,97,99,105,116,121,32,38,38,32,40,110,101,119,95,99,97,112,97,99,105,116,121,32,62,32,109,95,99,97,112,97,99,105,116,121,41,0,110,117,109,95,99,111,100,101,115,91,99,93,0,115,111,114,116,101,100,95,112,111,115,32,60,32,116,111,116,97,108,95,117,115,101,100,95,115,121,109,115,0,112,67,111,100,101,115,105,122,101,115,91,115,121,109,95,105,110,100,101,120,93,32,61,61,32,99,111,100,101,115,105,122,101,0,116,32,60,32,40,49,85,32,60,60,32,116,97,98,108,101,95,98,105,116,115,41,0,109,95,108,111,111,107,117,112,91,116,93,32,61,61,32,99,85,73,78,84,51,50,95,77,65,88,0,99,114,110,100,95,109,97,108,108,111,99,58,32,115,105,122,101,32,116,111,111,32,98,105,103,0,99,114,110,100,95,109,97,108,108,111,99,58,32,111,117,116,32,111,102,32,109,101,109,111,114,121,0,40,40,117,105,110,116,51,50,41,112,95,110,101,119,32,38,32,40,67,82,78,68,95,77,73,78,95,65,76,76,79,67,95,65,76,73,71,78,77,69,78,84,32,45,32,49,41,41,32,61,61,32,48,0,99,114,110,100,95,114,101,97,108,108,111,99,58,32,98,97,100,32,112,116,114,0,99,114,110,100,95,102,114,101,101,58,32,98,97,100,32,112,116,114,0,102,97,108,115,101,0,40,116,111,116,97,108,95,115,121,109,115,32,62,61,32,49,41,32,38,38,32,40,116,111,116,97,108,95,115,121,109,115,32,60,61,32,112,114,101,102,105,120,95,99,111,100,105,110,103,58,58,99,77,97,120,83,117,112,112,111,114,116,101,100,83,121,109,115,41,0,17,18,19,20,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,16,48,0,110,117,109,95,98,105,116,115,32,60,61,32,51,50,85,0,109,95,98,105,116,95,99,111,117,110,116,32,60,61,32,99,66,105,116,66,117,102,83,105,122,101,0,116,32,33,61,32,99,85,73,78,84,51,50,95,77,65,88,0,109,111,100,101,108,46,109,95,99,111,100,101,95,115,105,122,101,115,91,115,121,109,93,32,61,61,32,108,101,110,0,0,2,3,1,0,2,3,4,5,6,7,1,40,108,101,110,32,62,61,32,49,41,32,38,38,32,40,108,101,110,32,60,61,32,99,77,97,120,69,120,112,101,99,116,101,100,67,111,100,101,83,105,122,101,41,0,105,32,60,32,109,95,115,105,122,101,0,110,101,120,116,95,108,101,118,101,108,95,111,102,115,32,62,32,99,117,114,95,108,101,118,101,108,95,111,102,115,0,1,2,2,3,3,3,3,4,0,0,0,0,0,0,1,1,0,1,0,1,0,0,1,2,1,2,0,0,0,1,0,2,1,0,2,0,0,1,2,3,110,117,109,32,38,38,32,40,110,117,109,32,61,61,32,126,110,117,109,95,99,104,101,99,107,41,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,83,116,57,101,120,99,101,112,116,105,111,110,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,83,116,57,116,121,112,101,95,105,110,102,111,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;function _abort(){Module.abort()}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}STATICTOP+=16;var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function(e){if(!e||EXCEPTIONS.infos[e])return e;for(var t in EXCEPTIONS.infos){if(EXCEPTIONS.infos[t].adjusted===e)return t}return e},addRef:function(e){e&&EXCEPTIONS.infos[e].refcount++},decRef:function(e){if(e){var t=EXCEPTIONS.infos[e];assert(t.refcount>0),t.refcount--,0===t.refcount&&!t.rethrown&&(t.destructor&&Module.dynCall_vi(t.destructor,e),delete EXCEPTIONS.infos[e],___cxa_free_exception(e))}},clearRef:function(e){e&&(EXCEPTIONS.infos[e].refcount=0)}};function ___cxa_begin_catch(e){var t=EXCEPTIONS.infos[e];return t&&!t.caught&&(t.caught=!0,__ZSt18uncaught_exceptionv.uncaught_exception--),t&&(t.rethrown=!1),EXCEPTIONS.caught.push(e),EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(e)),e}function _pthread_once(e,t){_pthread_once.seen||(_pthread_once.seen={}),!(e in _pthread_once.seen)&&(Module.dynCall_v(t),_pthread_once.seen[e]=1)}function _emscripten_memcpy_big(e,t,i){return HEAPU8.set(HEAPU8.subarray(t,t+i),e),e}var SYSCALLS={varargs:0,get:function(e){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(){return Pointer_stringify(SYSCALLS.get())},get64:function(){var e=SYSCALLS.get(),t=SYSCALLS.get();return assert(e>=0?0===t:-1===t),e},getZero:function(){assert(0===SYSCALLS.get())}};function ___syscall6(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.getStreamFromFD();return FS.close(i),0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC),PTHREAD_SPECIFIC={};function _pthread_getspecific(e){return PTHREAD_SPECIFIC[e]||0}function ___setErrNo(e){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=e),e}var PTHREAD_SPECIFIC_NEXT_KEY=1,ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _pthread_key_create(e,t){return 0==e?ERRNO_CODES.EINVAL:(HEAP32[e>>2]=PTHREAD_SPECIFIC_NEXT_KEY,PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0,PTHREAD_SPECIFIC_NEXT_KEY++,0)}function ___resumeException(e){throw EXCEPTIONS.last||(EXCEPTIONS.last=e),e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var e=EXCEPTIONS.last;if(!e)return Runtime.setTempRet0(0),0;var t=EXCEPTIONS.infos[e],i=t.type;if(!i)return Runtime.setTempRet0(0),0|e;var n=Array.prototype.slice.call(arguments);Module.___cxa_is_pointer_type(i),___cxa_find_matching_catch.buffer||(___cxa_find_matching_catch.buffer=_malloc(4)),HEAP32[___cxa_find_matching_catch.buffer>>2]=e,e=___cxa_find_matching_catch.buffer;for(var r=0;r<n.length;r++)if(n[r]&&Module.___cxa_can_catch(n[r],i,e))return e=HEAP32[e>>2],t.adjusted=e,Runtime.setTempRet0(n[r]),0|e;return e=HEAP32[e>>2],Runtime.setTempRet0(i),0|e}function ___gxx_personality_v0(){}function _pthread_setspecific(e,t){return e in PTHREAD_SPECIFIC?(PTHREAD_SPECIFIC[e]=t,0):ERRNO_CODES.EINVAL}function ___syscall140(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.getStreamFromFD(),n=(SYSCALLS.get(),SYSCALLS.get()),r=SYSCALLS.get(),o=SYSCALLS.get(),a=n;return FS.llseek(i,a,o),HEAP32[r>>2]=i.position,i.getdents&&0===a&&0===o&&(i.getdents=null),0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function ___syscall146(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.get(),n=SYSCALLS.get(),r=SYSCALLS.get(),o=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(e,t){var i=___syscall146.buffers[e];assert(i),0===t||10===t?((1===e?Module.print:Module.printErr)(UTF8ArrayToString(i,0)),i.length=0):i.push(t)});for(var a=0;a<r;a++){for(var s=HEAP32[n+8*a>>2],l=HEAP32[n+(8*a+4)>>2],u=0;u<l;u++)___syscall146.printChar(i,HEAPU8[s+u]);o+=l}return o}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function ___syscall54(e,t){SYSCALLS.varargs=t;try{return 0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function invoke_iiii(e,t,i,n){try{return Module.dynCall_iiii(e,t,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiiii(e,t,i,n,r,o){try{Module.dynCall_viiiii(e,t,i,n,r,o)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_vi(e,t){try{Module.dynCall_vi(e,t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_ii(e,t){try{return Module.dynCall_ii(e,t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viii(e,t,i,n){try{Module.dynCall_viii(e,t,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_v(e){try{Module.dynCall_v(e)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiiiii(e,t,i,n,r,o,a){try{Module.dynCall_viiiiii(e,t,i,n,r,o,a)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiii(e,t,i,n,r){try{Module.dynCall_viiii(e,t,i,n,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}__ATEXIT__.push((function(){var e=Module._fflush;e&&e(0);var t=___syscall146.printChar;if(t){var i=___syscall146.buffers;i[1].length&&t(1,10),i[2].length&&t(2,10)}})),DYNAMICTOP_PTR=allocate(1,"i32",ALLOC_STATIC),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX),HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE,staticSealed=!0,Module.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:1/0,byteLength:byteLength},Module.asmLibraryArg={abort:abort,assert:assert,enlargeMemory:enlargeMemory,getTotalMemory:getTotalMemory,abortOnCannotGrowMemory:abortOnCannotGrowMemory,invoke_iiii:invoke_iiii,invoke_viiiii:invoke_viiiii,invoke_vi:invoke_vi,invoke_ii:invoke_ii,invoke_viii:invoke_viii,invoke_v:invoke_v,invoke_viiiiii:invoke_viiiiii,invoke_viiii:invoke_viiii,_pthread_getspecific:_pthread_getspecific,___syscall54:___syscall54,_pthread_setspecific:_pthread_setspecific,___gxx_personality_v0:___gxx_personality_v0,___syscall6:___syscall6,___setErrNo:___setErrNo,_abort:_abort,___cxa_begin_catch:___cxa_begin_catch,_pthread_once:_pthread_once,_emscripten_memcpy_big:_emscripten_memcpy_big,_pthread_key_create:_pthread_key_create,___syscall140:___syscall140,___resumeException:___resumeException,___cxa_find_matching_catch:___cxa_find_matching_catch,___syscall146:___syscall146,__ZSt18uncaught_exceptionv:__ZSt18uncaught_exceptionv,DYNAMICTOP_PTR:DYNAMICTOP_PTR,tempDoublePtr:tempDoublePtr,ABORT:ABORT,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX,cttz_i8:cttz_i8};var asm=function(e,t,i){var n=e.Int8Array,r=new n(i),o=e.Int16Array,a=new o(i),s=e.Int32Array,l=new s(i),u=e.Uint8Array,c=new u(i),h=e.Uint16Array,d=new h(i),f=e.Uint32Array;new f(i);var p=e.Float32Array;new p(i);var _=e.Float64Array,m=new _(i),g=e.byteLength,x=0|t.DYNAMICTOP_PTR,v=0|t.tempDoublePtr;t.ABORT;var y=0|t.STACKTOP;t.STACK_MAX;var $=0|t.cttz_i8;e.NaN,e.Infinity;var b=0;e.Math.floor,e.Math.abs,e.Math.sqrt,e.Math.pow,e.Math.cos,e.Math.sin,e.Math.tan,e.Math.acos,e.Math.asin,e.Math.atan,e.Math.atan2,e.Math.exp,e.Math.log,e.Math.ceil;var T=e.Math.imul;e.Math.min,e.Math.max;var C=e.Math.clz32,S=t.abort;t.assert;var w=t.enlargeMemory,E=t.getTotalMemory,P=t.abortOnCannotGrowMemory;t.invoke_iiii,t.invoke_viiiii,t.invoke_vi,t.invoke_ii,t.invoke_viii,t.invoke_v,t.invoke_viiiiii,t.invoke_viiii;var A=t._pthread_getspecific,L=t.___syscall54,M=t._pthread_setspecific;t.___gxx_personality_v0;var R=t.___syscall6,O=t.___setErrNo,I=t._abort;t.___cxa_begin_catch;var D=t._pthread_once,B=t._emscripten_memcpy_big,N=t._pthread_key_create,F=t.___syscall140;t.___resumeException,t.___cxa_find_matching_catch;var U=t.___syscall146;function G(e){e|=0;var t,i=0,n=0,r=0,o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,v=0,$=0,b=0,T=0;t=y,y=y+16|0,p=t;do{if(e>>>0<245){if(e=(h=e>>>0<11?16:e+11&-8)>>>3,3&(n=(f=0|l[1144])>>>e)|0)return r=0|l[(n=(e=4616+((i=(1&n^1)+e|0)<<1<<2)|0)+8|0)>>2],(0|e)==(0|(a=0|l[(o=r+8|0)>>2]))?l[1144]=f&~(1<<i):(l[a+12>>2]=e,l[n>>2]=a),T=i<<3,l[r+4>>2]=3|T,l[(T=r+T+4|0)>>2]=1|l[T>>2],y=t,0|(T=o);if(h>>>0>(d=0|l[1146])>>>0){if(0|n)return i=((i=n<<e&((i=2<<e)|0-i))&0-i)-1|0,o=0|l[(e=(i=4616+((r=((n=(i>>>=s=i>>>12&16)>>>5&8)|s|(o=(i>>>=n)>>>2&4)|(e=(i>>>=o)>>>1&2)|(r=(i>>>=e)>>>1&1))+(i>>>r)|0)<<1<<2)|0)+8|0)>>2],(0|i)==(0|(n=0|l[(s=o+8|0)>>2]))?(e=f&~(1<<r),l[1144]=e):(l[n+12>>2]=i,l[e>>2]=n,e=f),a=(r<<3)-h|0,l[o+4>>2]=3|h,l[(r=o+h|0)+4>>2]=1|a,l[r+a>>2]=a,0|d&&(o=0|l[1149],n=4616+((i=d>>>3)<<1<<2)|0,e&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=o,l[i+12>>2]=o,l[o+8>>2]=i,l[o+12>>2]=n),l[1146]=a,l[1149]=r,y=t,0|(T=s);if(u=0|l[1145]){if(n=(u&0-u)-1|0,e=0|l[4880+(((a=(n>>>=s=n>>>12&16)>>>5&8)|s|(c=(n>>>=a)>>>2&4)|(r=(n>>>=c)>>>1&2)|(e=(n>>>=r)>>>1&1))+(n>>>e)<<2)>>2],n=(-8&l[e+4>>2])-h|0,r=0|l[e+16+((0==(0|l[e+16>>2])&1)<<2)>>2]){do{n=(c=(s=(-8&l[r+4>>2])-h|0)>>>0<n>>>0)?s:n,e=c?r:e,r=0|l[r+16+((0==(0|l[r+16>>2])&1)<<2)>>2]}while(0!=(0|r));c=e,a=n}else c=e,a=n;if(c>>>0<(s=c+h|0)>>>0){o=0|l[c+24>>2],i=0|l[c+12>>2];do{if((0|i)==(0|c)){if(!(i=0|l[(e=c+20|0)>>2])&&!(i=0|l[(e=c+16|0)>>2])){n=0;break}for(;;)if(0|(r=0|l[(n=i+20|0)>>2]))i=r,e=n;else{if(!(r=0|l[(n=i+16|0)>>2]))break;i=r,e=n}l[e>>2]=0,n=i}else n=0|l[c+8>>2],l[n+12>>2]=i,l[i+8>>2]=n,n=i}while(0);do{if(0|o){if(i=0|l[c+28>>2],(0|c)==(0|l[(e=4880+(i<<2)|0)>>2])){if(l[e>>2]=n,!n){l[1145]=u&~(1<<i);break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|c)&1)<<2)>>2]=n,!n)break;l[n+24>>2]=o,0|(i=0|l[c+16>>2])&&(l[n+16>>2]=i,l[i+24>>2]=n),0|(i=0|l[c+20>>2])&&(l[n+20>>2]=i,l[i+24>>2]=n)}}while(0);return a>>>0<16?(T=a+h|0,l[c+4>>2]=3|T,l[(T=c+T+4|0)>>2]=1|l[T>>2]):(l[c+4>>2]=3|h,l[s+4>>2]=1|a,l[s+a>>2]=a,0|d&&(r=0|l[1149],n=4616+((i=d>>>3)<<1<<2)|0,f&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=f|i,i=n,e=n+8|0),l[e>>2]=r,l[i+12>>2]=r,l[r+8>>2]=i,l[r+12>>2]=n),l[1146]=a,l[1149]=s),y=t,0|(T=c+8|0)}f=h}else f=h}else f=h}else if(e>>>0<=4294967231)if(h=-8&(e=e+11|0),c=0|l[1145]){r=0-h|0,(e>>>=8)?h>>>0>16777215?u=31:u=h>>>((u=14-((d=((b=e<<(f=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|f|(u=((b<<=d)+245760|0)>>>16&2))+(b<<u>>>15)|0)+7|0)&1|u<<1:u=0,n=0|l[4880+(u<<2)>>2];e:do{if(n)for(e=0,s=h<<(31==(0|u)?0:25-(u>>>1)|0),a=0;;){if((o=(-8&l[n+4>>2])-h|0)>>>0<r>>>0){if(!o){e=n,r=0,o=n,b=61;break e}e=n,r=o}if(a=0==(0|(o=0|l[n+20>>2]))|(0|o)==(0|(n=0|l[n+16+(s>>>31<<2)>>2]))?a:o,o=0==(0|n)){n=a,b=57;break}s<<=1&(1^o)}else n=0,e=0,b=57}while(0);if(57==(0|b)){if(0==(0|n)&0==(0|e)){if(!(e=c&((e=2<<u)|0-e))){f=h;break}f=(e&0-e)-1|0,e=0,n=0|l[4880+(((a=(f>>>=s=f>>>12&16)>>>5&8)|s|(u=(f>>>=a)>>>2&4)|(d=(f>>>=u)>>>1&2)|(n=(f>>>=d)>>>1&1))+(f>>>n)<<2)>>2]}n?(o=n,b=61):(u=e,s=r)}if(61==(0|b))for(;;){if(b=0,n=(f=(n=(-8&l[o+4>>2])-h|0)>>>0<r>>>0)?n:r,e=f?o:e,!(o=0|l[o+16+((0==(0|l[o+16>>2])&1)<<2)>>2])){u=e,s=n;break}r=n,b=61}if(0!=(0|u)&&s>>>0<((0|l[1146])-h|0)>>>0){if(u>>>0>=(a=u+h|0)>>>0)return y=t,0|(T=0);o=0|l[u+24>>2],i=0|l[u+12>>2];do{if((0|i)==(0|u)){if(!(i=0|l[(e=u+20|0)>>2])&&!(i=0|l[(e=u+16|0)>>2])){i=0;break}for(;;)if(0|(r=0|l[(n=i+20|0)>>2]))i=r,e=n;else{if(!(r=0|l[(n=i+16|0)>>2]))break;i=r,e=n}l[e>>2]=0}else T=0|l[u+8>>2],l[T+12>>2]=i,l[i+8>>2]=T}while(0);do{if(o){if(e=0|l[u+28>>2],(0|u)==(0|l[(n=4880+(e<<2)|0)>>2])){if(l[n>>2]=i,!i){r=c&~(1<<e),l[1145]=r;break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|u)&1)<<2)>>2]=i,!i){r=c;break}l[i+24>>2]=o,0|(e=0|l[u+16>>2])&&(l[i+16>>2]=e,l[e+24>>2]=i),(e=0|l[u+20>>2])&&(l[i+20>>2]=e,l[e+24>>2]=i),r=c}else r=c}while(0);do{if(s>>>0>=16){if(l[u+4>>2]=3|h,l[a+4>>2]=1|s,l[a+s>>2]=s,i=s>>>3,s>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=a,l[i+12>>2]=a,l[a+8>>2]=i,l[a+12>>2]=n;break}if((i=s>>>8)?s>>>0>16777215?i=31:i=s>>>((i=14-(($=((T=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(i=((T<<=$)+245760|0)>>>16&2))+(T<<i>>>15)|0)+7|0)&1|i<<1:i=0,n=4880+(i<<2)|0,l[a+28>>2]=i,l[(e=a+16|0)+4>>2]=0,l[e>>2]=0,!(r&(e=1<<i))){l[1145]=r|e,l[n>>2]=a,l[a+24>>2]=n,l[a+12>>2]=a,l[a+8>>2]=a;break}for(e=s<<(31==(0|i)?0:25-(i>>>1)|0),n=0|l[n>>2];;){if((-8&l[n+4>>2]|0)==(0|s)){b=97;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=96;break}e<<=1,n=i}if(96==(0|b)){l[r>>2]=a,l[a+24>>2]=n,l[a+12>>2]=a,l[a+8>>2]=a;break}if(97==(0|b)){T=0|l[(b=n+8|0)>>2],l[T+12>>2]=a,l[b>>2]=a,l[a+8>>2]=T,l[a+12>>2]=n,l[a+24>>2]=0;break}}else T=s+h|0,l[u+4>>2]=3|T,l[(T=u+T+4|0)>>2]=1|l[T>>2]}while(0);return y=t,0|(T=u+8|0)}f=h}else f=h;else f=-1}while(0);if((n=0|l[1146])>>>0>=f>>>0)return i=n-f|0,e=0|l[1149],i>>>0>15?(T=e+f|0,l[1149]=T,l[1146]=i,l[T+4>>2]=1|i,l[T+i>>2]=i,l[e+4>>2]=3|f):(l[1146]=0,l[1149]=0,l[e+4>>2]=3|n,l[(T=e+n+4|0)>>2]=1|l[T>>2]),y=t,0|(T=e+8|0);if((s=0|l[1147])>>>0>f>>>0)return $=s-f|0,l[1147]=$,b=(T=0|l[1150])+f|0,l[1150]=b,l[b+4>>2]=1|$,l[T+4>>2]=3|f,y=t,0|(T=T+8|0);if(0|l[1262]?e=0|l[1264]:(l[1264]=4096,l[1263]=4096,l[1265]=-1,l[1266]=-1,l[1267]=0,l[1255]=0,e=-16&p^1431655768,l[p>>2]=e,l[1262]=e,e=4096),u=f+48|0,(h=(a=e+(c=f+47|0)|0)&(o=0-e|0))>>>0<=f>>>0||0|(e=0|l[1254])&&(p=(d=0|l[1252])+h|0)>>>0<=d>>>0|p>>>0>e>>>0)return y=t,0|(T=0);e:do{if(4&l[1255])i=0,b=133;else{n=0|l[1150];t:do{if(n){for(r=5024;!((e=0|l[r>>2])>>>0<=n>>>0&&(g=r+4|0,(e+(0|l[g>>2])|0)>>>0>n>>>0));){if(!(e=0|l[r+8>>2])){b=118;break t}r=e}if((i=a-s&o)>>>0<2147483647)if((0|(e=0|Se(0|i)))==((0|l[r>>2])+(0|l[g>>2])|0)){if(-1!=(0|e)){s=i,a=e,b=135;break e}}else r=e,b=126;else i=0}else b=118}while(0);do{if(118==(0|b))if(-1!=(0|(n=0|Se(0)))&&(i=n,m=(i=(0==((m=(_=0|l[1263])+-1|0)&i|0)?0:(m+i&0-_)-i|0)+h|0)+(_=0|l[1252])|0,i>>>0>f>>>0&i>>>0<2147483647)){if(0|(g=0|l[1254])&&m>>>0<=_>>>0|m>>>0>g>>>0){i=0;break}if((0|(e=0|Se(0|i)))==(0|n)){s=i,a=n,b=135;break e}r=e,b=126}else i=0}while(0);do{if(126==(0|b)){if(n=0-i|0,!(u>>>0>i>>>0&i>>>0<2147483647&-1!=(0|r))){if(-1==(0|r)){i=0;break}s=i,a=r,b=135;break e}if((e=c-i+(e=0|l[1264])&0-e)>>>0>=2147483647){s=i,a=r,b=135;break e}if(-1==(0|Se(0|e))){Se(0|n),i=0;break}s=e+i|0,a=r,b=135;break e}}while(0);l[1255]=4|l[1255],b=133}}while(0);if(133==(0|b)&&h>>>0<2147483647&&!(-1==(0|($=0|Se(0|h)))|1^(v=(x=(g=0|Se(0))-$|0)>>>0>(f+40|0)>>>0)|$>>>0<g>>>0&-1!=(0|$)&-1!=(0|g)^1)&&(s=v?x:i,a=$,b=135),135==(0|b)){i=(0|l[1252])+s|0,l[1252]=i,i>>>0>(0|l[1253])>>>0&&(l[1253]=i),c=0|l[1150];do{if(c){for(i=5024;;){if((0|a)==((e=0|l[i>>2])+(r=0|l[(n=i+4|0)>>2])|0)){b=145;break}if(!(o=0|l[i+8>>2]))break;i=o}if(145==(0|b)&&0==(8&l[i+12>>2]|0)&&c>>>0<a>>>0&c>>>0>=e>>>0){l[n>>2]=r+s,b=c+(T=0==(7&(T=c+8|0)|0)?0:0-T&7)|0,T=(0|l[1147])+(s-T)|0,l[1150]=b,l[1147]=T,l[b+4>>2]=1|T,l[b+T+4>>2]=40,l[1151]=l[1266];break}for(a>>>0<(0|l[1148])>>>0&&(l[1148]=a),n=a+s|0,i=5024;;){if((0|l[i>>2])==(0|n)){b=153;break}if(!(e=0|l[i+8>>2]))break;i=e}if(153==(0|b)&&0==(8&l[i+12>>2]|0)){l[i>>2]=a,l[(d=i+4|0)>>2]=(0|l[d>>2])+s,h=(d=a+(0==(7&(d=a+8|0)|0)?0:0-d&7)|0)+f|0,u=(i=n+(0==(7&(i=n+8|0)|0)?0:0-i&7)|0)-d-f|0,l[d+4>>2]=3|f;do{if((0|i)!=(0|c)){if((0|i)==(0|l[1149])){T=(0|l[1146])+u|0,l[1146]=T,l[1149]=h,l[h+4>>2]=1|T,l[h+T>>2]=T;break}if(1==(3&(e=0|l[i+4>>2])|0)){s=-8&e,r=e>>>3;e:do{if(e>>>0<256){if(e=0|l[i+8>>2],(0|(n=0|l[i+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<r);break}l[e+12>>2]=n,l[n+8>>2]=e;break}a=0|l[i+24>>2],e=0|l[i+12>>2];do{if((0|e)==(0|i)){if(!(e=0|l[(n=(r=i+16|0)+4|0)>>2])){if(!(e=0|l[r>>2])){e=0;break}n=r}for(;;)if(0|(o=0|l[(r=e+20|0)>>2]))e=o,n=r;else{if(!(o=0|l[(r=e+16|0)>>2]))break;e=o,n=r}l[n>>2]=0}else T=0|l[i+8>>2],l[T+12>>2]=e,l[e+8>>2]=T}while(0);if(!a)break;r=4880+((n=0|l[i+28>>2])<<2)|0;do{if((0|i)==(0|l[r>>2])){if(l[r>>2]=e,0|e)break;l[1145]=l[1145]&~(1<<n);break e}if(l[a+16+(((0|l[a+16>>2])!=(0|i)&1)<<2)>>2]=e,!e)break e}while(0);if(l[e+24>>2]=a,0|(r=0|l[(n=i+16|0)>>2])&&(l[e+16>>2]=r,l[r+24>>2]=e),!(n=0|l[n+4>>2]))break;l[e+20>>2]=n,l[n+24>>2]=e}while(0);i=i+s|0,o=s+u|0}else o=u;if(l[(i=i+4|0)>>2]=-2&l[i>>2],l[h+4>>2]=1|o,l[h+o>>2]=o,i=o>>>3,o>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=h,l[i+12>>2]=h,l[h+8>>2]=i,l[h+12>>2]=n;break}i=o>>>8;do{if(i){if(o>>>0>16777215){i=31;break}i=o>>>((i=14-(($=((T=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(i=((T<<=$)+245760|0)>>>16&2))+(T<<i>>>15)|0)+7|0)&1|i<<1}else i=0}while(0);if(r=4880+(i<<2)|0,l[h+28>>2]=i,l[(e=h+16|0)+4>>2]=0,l[e>>2]=0,!((e=0|l[1145])&(n=1<<i))){l[1145]=e|n,l[r>>2]=h,l[h+24>>2]=r,l[h+12>>2]=h,l[h+8>>2]=h;break}for(e=o<<(31==(0|i)?0:25-(i>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|o)){b=194;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=193;break}e<<=1,n=i}if(193==(0|b)){l[r>>2]=h,l[h+24>>2]=n,l[h+12>>2]=h,l[h+8>>2]=h;break}if(194==(0|b)){T=0|l[(b=n+8|0)>>2],l[T+12>>2]=h,l[b>>2]=h,l[h+8>>2]=T,l[h+12>>2]=n,l[h+24>>2]=0;break}}else T=(0|l[1147])+u|0,l[1147]=T,l[1150]=h,l[h+4>>2]=1|T}while(0);return y=t,0|(T=d+8|0)}for(i=5024;!((e=0|l[i>>2])>>>0<=c>>>0&&(T=e+(0|l[i+4>>2])|0,T>>>0>c>>>0));)i=0|l[i+8>>2];i=(e=(e=(o=T+-47|0)+(0==(7&(e=o+8|0)|0)?0:0-e&7)|0)>>>0<(o=c+16|0)>>>0?c:e)+8|0,b=a+(n=0==(7&(n=a+8|0)|0)?0:0-n&7)|0,n=s+-40-n|0,l[1150]=b,l[1147]=n,l[b+4>>2]=1|n,l[b+n+4>>2]=40,l[1151]=l[1266],l[(n=e+4|0)>>2]=27,l[i>>2]=l[1256],l[i+4>>2]=l[1257],l[i+8>>2]=l[1258],l[i+12>>2]=l[1259],l[1256]=a,l[1257]=s,l[1259]=0,l[1258]=i,i=e+24|0;do{b=i,l[(i=i+4|0)>>2]=7}while((b+8|0)>>>0<T>>>0);if((0|e)!=(0|c)){if(a=e-c|0,l[n>>2]=-2&l[n>>2],l[c+4>>2]=1|a,l[e>>2]=a,i=a>>>3,a>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=c,l[i+12>>2]=c,l[c+8>>2]=i,l[c+12>>2]=n;break}if((i=a>>>8)?a>>>0>16777215?n=31:n=a>>>((n=14-(($=((T=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(n=((T<<=$)+245760|0)>>>16&2))+(T<<n>>>15)|0)+7|0)&1|n<<1:n=0,r=4880+(n<<2)|0,l[c+28>>2]=n,l[c+20>>2]=0,l[o>>2]=0,!((i=0|l[1145])&(e=1<<n))){l[1145]=i|e,l[r>>2]=c,l[c+24>>2]=r,l[c+12>>2]=c,l[c+8>>2]=c;break}for(e=a<<(31==(0|n)?0:25-(n>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|a)){b=216;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=215;break}e<<=1,n=i}if(215==(0|b)){l[r>>2]=c,l[c+24>>2]=n,l[c+12>>2]=c,l[c+8>>2]=c;break}if(216==(0|b)){T=0|l[(b=n+8|0)>>2],l[T+12>>2]=c,l[b>>2]=c,l[c+8>>2]=T,l[c+12>>2]=n,l[c+24>>2]=0;break}}}else{0==(0|(T=0|l[1148]))|a>>>0<T>>>0&&(l[1148]=a),l[1256]=a,l[1257]=s,l[1259]=0,l[1153]=l[1262],l[1152]=-1,i=0;do{l[(T=4616+(i<<1<<2)|0)+12>>2]=T,l[T+8>>2]=T,i=i+1|0}while(32!=(0|i));b=a+(T=0==(7&(T=a+8|0)|0)?0:0-T&7)|0,T=s+-40-T|0,l[1150]=b,l[1147]=T,l[b+4>>2]=1|T,l[b+T+4>>2]=40,l[1151]=l[1266]}}while(0);if((i=0|l[1147])>>>0>f>>>0)return $=i-f|0,l[1147]=$,b=(T=0|l[1150])+f|0,l[1150]=b,l[b+4>>2]=1|$,l[T+4>>2]=3|f,y=t,0|(T=T+8|0)}return T=0|tt(),l[T>>2]=12,y=t,0|(T=0)}function z(e,t,i,n,o,a){e|=0,t=+t,i|=0,n|=0,o|=0,a|=0;var s,u=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,v=0,$=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,I=0;s=y,y=y+560|0,d=s+8|0,O=I=s+524|0,f=s+512|0,l[($=s)>>2]=0,R=f+12|0,Fe(t),(0|b)<0?(t=-t,L=1,A=2087):(L=0!=(2049&o|0)&1,A=0==(2048&o|0)?0==(1&o|0)?2088:2093:2090),Fe(t),M=2146435072&b;do{if(M>>>0<2146435072|2146435072==(0|M)&!1){if((u=0!=(g=2*+et(t,$)))&&(l[$>>2]=(0|l[$>>2])-1),97==(0|(S=32|a))){m=0==(0|(x=32&a))?A:A+9|0,_=2|L,u=12-n|0;do{if(!(n>>>0>11|0==(0|u))){t=8;do{u=u+-1|0,t*=16}while(0!=(0|u));if(45==(0|r[m>>0])){t=-(t+(-g-t));break}t=g+t-t;break}t=g}while(0);(0|(u=0|xe(u=(0|(h=0|l[$>>2]))<0?0-h|0:h,((0|u)<0)<<31>>31,R)))==(0|R)&&(r[(u=f+11|0)>>0]=48),r[u+-1>>0]=43+(h>>31&2),r[(p=u+-2|0)>>0]=a+15,f=(0|n)<1,d=0==(8&o|0),u=I;do{M=~~t,h=u+1|0,r[u>>0]=c[2122+M>>0]|x,t=16*(t-+(0|M)),1!=(h-O|0)||d&f&0==t?u=h:(r[h>>0]=46,u=u+2|0)}while(0!=t);M=u-O|0,be(e,32,i,u=(O=R-p|0)+_+(R=0!=(0|n)&(M+-2|0)<(0|n)?n+2|0:M)|0,o),Ve(e,m,_),be(e,48,i,u,65536^o),Ve(e,I,M),be(e,48,R-M|0,0,0),Ve(e,p,O),be(e,32,i,u,8192^o);break}h=(0|n)<0?6:n,u?(u=(0|l[$>>2])-28|0,l[$>>2]=u,t=268435456*g):(t=g,u=0|l[$>>2]),d=M=(0|u)<0?d:d+288|0;do{E=~~t>>>0,l[d>>2]=E,d=d+4|0,t=1e9*(t-+(E>>>0))}while(0!=t);if((0|u)>0)for(f=M,_=d;;){if(p=(0|u)<29?u:29,(u=_+-4|0)>>>0>=f>>>0){d=0;do{C=0|Me(0|(w=0|Ue(0|(w=0|Ie(0|l[u>>2],0,0|p)),0|b,0|d,0)),0|(E=b),1e9,0),l[u>>2]=C,d=0|je(0|w,0|E,1e9,0),u=u+-4|0}while(u>>>0>=f>>>0);d&&(l[(f=f+-4|0)>>2]=d)}for(d=_;!(d>>>0<=f>>>0)&&!(0|l[(u=d+-4|0)>>2]);)d=u;if(u=(0|l[$>>2])-p|0,l[$>>2]=u,!((0|u)>0))break;_=d}else f=M;if((0|u)<0){n=1+((h+25|0)/9|0)|0,v=102==(0|S);do{if(x=(0|(x=0-u|0))<9?x:9,f>>>0<d>>>0){p=(1<<x)-1|0,_=1e9>>>x,m=0,u=f;do{E=0|l[u>>2],l[u>>2]=(E>>>x)+m,m=0|T(E&p,_),u=u+4|0}while(u>>>0<d>>>0);u=0==(0|l[f>>2])?f+4|0:f,m?(l[d>>2]=m,f=u,u=d+4|0):(f=u,u=d)}else f=0==(0|l[f>>2])?f+4|0:f,u=d;d=(u-(d=v?M:f)>>2|0)>(0|n)?d+(n<<2)|0:u,u=(0|l[$>>2])+x|0,l[$>>2]=u}while((0|u)<0);u=f,n=d}else u=f,n=d;if(E=M,u>>>0<n>>>0){if(d=9*(E-u>>2)|0,(p=0|l[u>>2])>>>0>=10){f=10;do{f=10*f|0,d=d+1|0}while(p>>>0>=f>>>0)}}else d=0;if((0|(f=h-(102!=(0|S)?d:0)+(((C=0!=(0|h))&(v=103==(0|S)))<<31>>31)|0))<((9*(n-E>>2)|0)-9|0)){if(x=M+4+(((0|(f=f+9216|0))/9|0)-1024<<2)|0,(0|(f=1+((0|f)%9|0)|0))<9){p=10;do{p=10*p|0,f=f+1|0}while(9!=(0|f))}else p=10;if((f=(x+4|0)==(0|n))&0==(0|(m=((_=0|l[x>>2])>>>0)%(p>>>0)|0)))f=x;else if(g=0==(1&((_>>>0)/(p>>>0)|0)|0)?9007199254740992:9007199254740994,t=m>>>0<(w=(0|p)/2|0)>>>0?.5:f&(0|m)==(0|w)?1:1.5,L&&(t=(w=45==(0|r[A>>0]))?-t:t,g=w?-g:g),f=_-m|0,l[x>>2]=f,g+t!=g){if(w=f+p|0,l[x>>2]=w,w>>>0>999999999)for(d=x;f=d+-4|0,l[d>>2]=0,f>>>0<u>>>0&&(l[(u=u+-4|0)>>2]=0),w=1+(0|l[f>>2])|0,l[f>>2]=w,w>>>0>999999999;)d=f;else f=x;if(d=9*(E-u>>2)|0,(_=0|l[u>>2])>>>0>=10){p=10;do{p=10*p|0,d=d+1|0}while(_>>>0>=p>>>0)}}else f=x;f=n>>>0>(f=f+4|0)>>>0?f:n,w=u}else f=n,w=u;for(S=f;;){if(S>>>0<=w>>>0){$=0;break}if(0|l[(u=S+-4|0)>>2]){$=1;break}S=u}n=0-d|0;do{if(v){if((0|(u=(1&(1^C))+h|0))>(0|d)&(0|d)>-5?(p=a+-1|0,h=u+-1-d|0):(p=a+-2|0,h=u+-1|0),!(u=8&o)){if($&&0!=(0|(P=0|l[S+-4>>2])))if((P>>>0)%10|0)f=0;else{f=0,u=10;do{u=10*u|0,f=f+1|0}while(!(0|(P>>>0)%(u>>>0)))}else f=9;if(u=(9*(S-E>>2)|0)-9|0,102==(32|p)){h=(0|h)<(0|(x=(0|(x=u-f|0))>0?x:0))?h:x,x=0;break}h=(0|h)<(0|(x=(0|(x=u+d-f|0))>0?x:0))?h:x,x=0;break}x=u}else p=a,x=8&o}while(0);if(_=0!=(0|(v=h|x))&1,m=102==(32|p))C=0,u=(0|d)>0?d:0;else{if(((f=R)-(u=0|xe(u=(0|d)<0?n:d,((0|u)<0)<<31>>31,R))|0)<2)do{r[(u=u+-1|0)>>0]=48}while((f-u|0)<2);r[u+-1>>0]=43+(d>>31&2),r[(u=u+-2|0)>>0]=p,C=u,u=f-u|0}if(be(e,32,i,u=L+1+h+_+u|0,o),Ve(e,A,L),be(e,48,i,u,65536^o),m){_=x=I+9|0,m=I+8|0,f=p=w>>>0>M>>>0?M:w;do{if(d=0|xe(0|l[f>>2],0,x),(0|f)==(0|p))(0|d)==(0|x)&&(r[m>>0]=48,d=m);else if(d>>>0>I>>>0){de(0|I,48,d-O|0);do{d=d+-1|0}while(d>>>0>I>>>0)}Ve(e,d,_-d|0),f=f+4|0}while(f>>>0<=M>>>0);if(0|v&&Ve(e,2138,1),f>>>0<S>>>0&(0|h)>0)for(;;){if((d=0|xe(0|l[f>>2],0,x))>>>0>I>>>0){de(0|I,48,d-O|0);do{d=d+-1|0}while(d>>>0>I>>>0)}if(Ve(e,d,(0|h)<9?h:9),d=h+-9|0,!((f=f+4|0)>>>0<S>>>0&(0|h)>9)){h=d;break}h=d}be(e,48,h+9|0,9,0)}else{if(v=$?S:w+4|0,(0|h)>-1){x=0==(0|x),n=$=I+9|0,_=0-O|0,m=I+8|0,p=w;do{(0|(d=0|xe(0|l[p>>2],0,$)))==(0|$)&&(r[m>>0]=48,d=m);do{if((0|p)==(0|w)){if(f=d+1|0,Ve(e,d,1),x&(0|h)<1){d=f;break}Ve(e,2138,1),d=f}else{if(d>>>0<=I>>>0)break;de(0|I,48,d+_|0);do{d=d+-1|0}while(d>>>0>I>>>0)}}while(0);Ve(e,d,(0|h)>(0|(O=n-d|0))?O:h),h=h-O|0,p=p+4|0}while(p>>>0<v>>>0&(0|h)>-1)}be(e,48,h+18|0,18,0),Ve(e,C,R-C|0)}be(e,32,i,u,8192^o)}else I=0!=(32&a|0),be(e,32,i,u=L+3|0,-65537&o),Ve(e,A,L),Ve(e,t!=t|!1?I?2114:2118:I?2106:2110,3),be(e,32,i,u,8192^o)}while(0);return y=s,0|((0|u)<(0|i)?i:u)}function V(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0,o|=0;var s,u,c,h,d,f,p,_,g,x=0,v=0,$=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0;g=y,y=y+64|0,f=g,O=g+24|0,p=g+8|0,_=g+20|0,l[(d=g+16|0)>>2]=t,s=0!=(0|e),c=u=O+40|0,O=O+39|0,h=p+4|0,v=0,x=0,S=0;e:for(;;){do{if((0|x)>-1){if((0|v)>(2147483647-x|0)){x=0|tt(),l[x>>2]=75,x=-1;break}x=v+x|0;break}}while(0);if(!((v=0|r[t>>0])<<24>>24)){R=87;break}$=t;t:for(;;){switch(v<<24>>24){case 37:v=$,R=9;break t;case 0:v=$;break t}M=$+1|0,l[d>>2]=M,v=0|r[M>>0],$=M}t:do{if(9==(0|R))for(;;){if(R=0,37!=(0|r[$+1>>0]))break t;if(v=v+1|0,$=$+2|0,l[d>>2]=$,37!=(0|r[$>>0]))break;R=9}}while(0);if(v=v-t|0,s&&Ve(e,t,v),0|v)t=$;else{(v=(0|r[(T=$+1|0)>>0])-48|0)>>>0<10?(L=(M=36==(0|r[$+2>>0]))?v:-1,S=M?1:S,T=M?$+3|0:T):L=-1,l[d>>2]=T,$=((v=0|r[T>>0])<<24>>24)-32|0;t:do{if($>>>0<32)for(C=0,w=v;;){if(!(75913&(v=1<<$))){v=w;break t}if(C|=v,T=T+1|0,l[d>>2]=T,($=((v=0|r[T>>0])<<24>>24)-32|0)>>>0>=32)break;w=v}else C=0}while(0);if(v<<24>>24==42){if((v=(0|r[($=T+1|0)>>0])-48|0)>>>0<10&&36==(0|r[T+2>>0]))l[o+(v<<2)>>2]=10,v=0|l[n+((0|r[$>>0])-48<<3)>>2],S=1,T=T+3|0;else{if(0|S){x=-1;break}s?(S=3+(0|l[i>>2])&-4,v=0|l[S>>2],l[i>>2]=S+4,S=0,T=$):(v=0,S=0,T=$)}l[d>>2]=T,v=(M=(0|v)<0)?0-v|0:v,C=M?8192|C:C}else{if((0|(v=0|we(d)))<0){x=-1;break}T=0|l[d>>2]}do{if(46==(0|r[T>>0])){if(42!=(0|r[T+1>>0])){l[d>>2]=T+1,$=0|we(d),T=0|l[d>>2];break}if(($=(0|r[(w=T+2|0)>>0])-48|0)>>>0<10&&36==(0|r[T+3>>0])){l[o+($<<2)>>2]=10,$=0|l[n+((0|r[w>>0])-48<<3)>>2],T=T+4|0,l[d>>2]=T;break}if(0|S){x=-1;break e}s?(M=3+(0|l[i>>2])&-4,$=0|l[M>>2],l[i>>2]=M+4):$=0,l[d>>2]=w,T=w}else $=-1}while(0);for(A=0;;){if(((0|r[T>>0])-65|0)>>>0>57){x=-1;break e}if(M=T+1|0,l[d>>2]=M,!(((E=255&(w=0|r[(0|r[T>>0])-65+(1606+(58*A|0))>>0]))+-1|0)>>>0<8))break;A=E,T=M}if(!(w<<24>>24)){x=-1;break}P=(0|L)>-1;do{if(w<<24>>24==19){if(P){x=-1;break e}R=49}else{if(P){l[o+(L<<2)>>2]=E,L=0|l[(P=n+(L<<3)|0)+4>>2],l[(R=f)>>2]=l[P>>2],l[R+4>>2]=L,R=49;break}if(!s){x=0;break e}K(f,E,i)}}while(0);if(49!=(0|R)||(R=0,s)){T=0!=(0|A)&3==(15&(T=0|r[T>>0])|0)?-33&T:T,P=-65537&C,L=0==(8192&C|0)?C:P;t:do{switch(0|T){case 110:switch((255&A)<<24>>24){case 0:case 1:case 6:l[l[f>>2]>>2]=x,v=0,t=M;continue e;case 2:case 7:v=0|l[f>>2],l[v>>2]=x,l[v+4>>2]=((0|x)<0)<<31>>31,v=0,t=M;continue e;case 3:a[l[f>>2]>>1]=x,v=0,t=M;continue e;case 4:r[l[f>>2]>>0]=x,v=0,t=M;continue e;default:v=0,t=M;continue e}case 112:T=120,$=$>>>0>8?$:8,t=8|L,R=61;break;case 88:case 120:t=L,R=61;break;case 111:C=0,w=2070,$=0==(8&L|0)|(0|$)>(0|(P=c-(E=0|Le(t=0|l[(T=f)>>2],T=0|l[T+4>>2],u))|0))?$:P+1|0,P=L,R=67;break;case 105:case 100:if(t=0|l[(T=f)>>2],(0|(T=0|l[T+4>>2]))<0){t=0|Ne(0,0,0|t,0|T),T=b,l[(C=f)>>2]=t,l[C+4>>2]=T,C=1,w=2070,R=66;break t}C=0!=(2049&L|0)&1,w=0==(2048&L|0)?0==(1&L|0)?2070:2072:2071,R=66;break t;case 117:C=0,w=2070,t=0|l[(T=f)>>2],T=0|l[T+4>>2],R=66;break;case 99:r[O>>0]=l[f>>2],t=O,C=0,w=2070,E=u,T=1,$=P;break;case 109:T=0|tt(),T=0|ke(0|l[T>>2]),R=71;break;case 115:T=0|(T=0|l[f>>2])?T:2080,R=71;break;case 67:l[p>>2]=l[f>>2],l[h>>2]=0,l[f>>2]=p,E=-1,T=p,R=75;break;case 83:t=0|l[f>>2],$?(E=$,T=t,R=75):(be(e,32,v,0,L),t=0,R=84);break;case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:v=0|z(e,+m[f>>3],v,$,L,T),t=M;continue e;default:C=0,w=2070,E=u,T=$,$=L}}while(0);t:do{if(61==(0|R))L=f,A=0|l[L>>2],L=0|l[L+4>>2],E=0|Ee(A,L,u,32&T),w=0==(8&t|0)|0==(0|A)&0==(0|L),C=w?0:2,w=w?2070:2070+(T>>4)|0,P=t,t=A,T=L,R=67;else if(66==(0|R))E=0|xe(t,T,u),P=L,R=67;else if(71==(0|R))R=0,L=0|se(T,0,$),A=0==(0|L),t=T,C=0,w=2070,E=A?T+$|0:L,T=A?$:L-T|0,$=P;else if(75==(0|R)){for(R=0,w=T,t=0,$=0;(C=0|l[w>>2])&&!((0|($=0|We(_,C)))<0|$>>>0>(E-t|0)>>>0)&&E>>>0>(t=$+t|0)>>>0;)w=w+4|0;if((0|$)<0){x=-1;break e}if(be(e,32,v,t,L),t)for(C=0;;){if(!($=0|l[T>>2])){R=84;break t}if((0|(C=($=0|We(_,$))+C|0))>(0|t)){R=84;break t}if(Ve(e,_,$),C>>>0>=t>>>0){R=84;break}T=T+4|0}else t=0,R=84}}while(0);if(67==(0|R))R=0,L=0!=(0|$)|(T=0!=(0|t)|0!=(0|T)),T=c-E+(1&(1^T))|0,t=L?E:u,E=u,T=L?(0|$)>(0|T)?$:T:$,$=(0|$)>-1?-65537&P:P;else if(84==(0|R)){R=0,be(e,32,v,t,8192^L),v=(0|v)>(0|t)?v:t,t=M;continue}be(e,32,v=(0|v)<(0|(L=(P=(0|T)<(0|(A=E-t|0))?A:T)+C|0))?L:v,L,$),Ve(e,w,C),be(e,48,v,L,65536^$),be(e,48,P,A,0),Ve(e,t,A),be(e,32,v,L,8192^$),t=M}else v=0,t=M}}e:do{if(87==(0|R)&&!e)if(S){for(x=1;t=0|l[o+(x<<2)>>2];)if(K(n+(x<<3)|0,t,i),(0|(x=x+1|0))>=10){x=1;break e}for(;;){if(0|l[o+(x<<2)>>2]){x=-1;break e}if((0|(x=x+1|0))>=10){x=1;break}}}else x=0}while(0);return y=g,0|x}function k(e,t){t|=0;var i,n,o,a,s,u,h,d,f,p,_,m,g,x,v,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0;if(v=y,y=y+704|0,g=v+144|0,m=v+128|0,_=v+112|0,p=v+96|0,f=v+80|0,d=v+64|0,h=v+48|0,x=v+32|0,i=v+16|0,w=v,o=v+184|0,L=v+160|0,a=0|function(e,t){e|=0;var i=0,n=0,r=0,o=0,a=0,s=0,u=0,h=0;if(h=y,y=y+528|0,a=h,o=h+16|0,!(t|=0))return y=h,0|(u=0);if(t>>>0<=16)return u=0|ae(e,t),y=h,0|u;if(s=0|ae(e,t+-16|0),(0|(t=0|l[(u=e+20|0)>>2]))<16){n=e+4|0,r=e+8|0,i=e+16|0;do{(0|(e=0|l[n>>2]))==(0|l[r>>2])?e=0:(l[n>>2]=e+1,e=0|c[e>>0]),t=t+8|0,l[u>>2]=t,(0|t)>=33&&(l[a>>2]=866,l[a+4>>2]=3208,l[a+8>>2]=1366,Oe(o,812,a),$e(o),t=0|l[u>>2]),e=e<<32-t|l[i>>2],l[i>>2]=e}while((0|t)<16)}else i=e=e+16|0,e=0|l[e>>2];return l[i>>2]=e<<16,l[u>>2]=t+-16,y=h,0|(u=e>>>16|s<<16)}(e|=0,14),!a)return function(e){var t=0,i=0,n=0,o=0,a=0,s=0;if(s=y,y=y+544|0,a=s+16|0,n=s,o=s+32|0,l[(e|=0)>>2]=0,0|(i=0|l[(t=e+4|0)>>2])&&(7&i?(l[n>>2]=866,l[n+4>>2]=2506,l[n+8>>2]=1232,Oe(o,812,n),$e(o)):_e(i,0,0,1,0),l[t>>2]=0,l[e+8>>2]=0,l[e+12>>2]=0),r[e+16>>0]=0,!(t=0|l[(e=e+20|0)>>2]))return void(y=s);re(t),7&t?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1232,Oe(o,812,a),$e(o)):_e(t,0,0,1,0),l[e>>2]=0,y=s}(t),y=v,0|(L=1);if(s=t+4|0,(0|($=0|l[(u=t+8|0)>>2]))!=(0|a)){if($>>>0<=a>>>0){do{if((0|l[t+12>>2])>>>0<a>>>0){if(0|Q(s,a,($+1|0)==(0|a),1,0)){$=0|l[u>>2];break}return r[t+16>>0]=1,y=v,0|(L=0)}}while(0);de((0|l[s>>2])+$|0,0,a-$|0)}l[u>>2]=a}if(de(0|l[s>>2],0,0|a),(0|($=0|l[(n=e+20|0)>>2]))<5){C=e+4|0,S=e+8|0,T=e+16|0;do{(0|(b=0|l[C>>2]))==(0|l[S>>2])?b=0:(l[C>>2]=b+1,b=0|c[b>>0]),$=$+8|0,l[n>>2]=$,(0|$)>=33&&(l[w>>2]=866,l[w+4>>2]=3208,l[w+8>>2]=1366,Oe(o,812,w),$e(o),$=0|l[n>>2]),b=b<<32-$|l[T>>2],l[T>>2]=b}while((0|$)<5)}else T=b=e+16|0,b=0|l[b>>2];if(P=b>>>27,l[T>>2]=b<<5,l[n>>2]=$+-5,(P+-1|0)>>>0>20)return y=v,0|(L=0);l[L+20>>2]=0,l[L>>2]=0,l[L+4>>2]=0,l[L+8>>2]=0,l[L+12>>2]=0,r[L+16>>0]=0,$=L+4|0,b=L+8|0;e:do{if(0|Q($,21,0,1,0)){C=0|l[b>>2],de((E=0|l[$>>2])+C|0,0,21-C|0),l[b>>2]=21,C=e+4|0,S=e+8|0,w=e+16|0,T=0;do{if((0|($=0|l[n>>2]))<3)do{(0|(b=0|l[C>>2]))==(0|l[S>>2])?b=0:(l[C>>2]=b+1,b=0|c[b>>0]),$=$+8|0,l[n>>2]=$,(0|$)>=33&&(l[i>>2]=866,l[i+4>>2]=3208,l[i+8>>2]=1366,Oe(o,812,i),$e(o),$=0|l[n>>2]),b=b<<32-$|l[w>>2],l[w>>2]=b}while((0|$)<3);else b=0|l[w>>2];l[w>>2]=b<<3,l[n>>2]=$+-3,r[E+(0|c[1327+T>>0])>>0]=b>>>29,T=T+1|0}while((0|T)!=(0|P));if(0|ne(L)){w=e+4|0,E=e+8|0,P=e+16|0,$=0;t:do{S=a-$|0,T=0|Y(e,L);i:do{if(T>>>0<17)(0|l[u>>2])>>>0<=$>>>0&&(l[x>>2]=866,l[x+4>>2]=910,l[x+8>>2]=1497,Oe(o,812,x),$e(o)),r[(0|l[s>>2])+$>>0]=T,$=$+1|0;else switch(0|T){case 17:if((0|(b=0|l[n>>2]))<3)do{(0|(T=0|l[w>>2]))==(0|l[E>>2])?T=0:(l[w>>2]=T+1,T=0|c[T>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[h>>2]=866,l[h+4>>2]=3208,l[h+8>>2]=1366,Oe(o,812,h),$e(o),b=0|l[n>>2]),T=T<<32-b|l[P>>2],l[P>>2]=T}while((0|b)<3);else T=0|l[P>>2];if(l[P>>2]=T<<3,l[n>>2]=b+-3,b=(T=3+(T>>>29)|0)>>>0>S>>>0){$=0;break e}$=(b?0:T)+$|0;break i;case 18:if((0|(b=0|l[n>>2]))<7)do{(0|(T=0|l[w>>2]))==(0|l[E>>2])?T=0:(l[w>>2]=T+1,T=0|c[T>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[d>>2]=866,l[d+4>>2]=3208,l[d+8>>2]=1366,Oe(o,812,d),$e(o),b=0|l[n>>2]),T=T<<32-b|l[P>>2],l[P>>2]=T}while((0|b)<7);else T=0|l[P>>2];if(l[P>>2]=T<<7,l[n>>2]=b+-7,b=(T=11+(T>>>25)|0)>>>0>S>>>0){$=0;break e}$=(b?0:T)+$|0;break i;default:if((T+-19|0)>>>0>=2){A=81;break t}if(b=0|l[n>>2],19==(0|T)){if((0|b)<2)for(T=b;(0|(b=0|l[w>>2]))==(0|l[E>>2])?C=0:(l[w>>2]=b+1,C=0|c[b>>0]),b=T+8|0,l[n>>2]=b,(0|b)>=33&&(l[f>>2]=866,l[f+4>>2]=3208,l[f+8>>2]=1366,Oe(o,812,f),$e(o),b=0|l[n>>2]),T=C<<32-b|l[P>>2],l[P>>2]=T,(0|b)<2;)T=b;else T=0|l[P>>2];l[P>>2]=T<<2,T>>>=30,C=3,b=b+-2|0}else{if((0|b)<6)do{(0|(T=0|l[w>>2]))==(0|l[E>>2])?T=0:(l[w>>2]=T+1,T=0|c[T>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[p>>2]=866,l[p+4>>2]=3208,l[p+8>>2]=1366,Oe(o,812,p),$e(o),b=0|l[n>>2]),T=T<<32-b|l[P>>2],l[P>>2]=T}while((0|b)<6);else T=0|l[P>>2];l[P>>2]=T<<6,T>>>=26,C=7,b=b+-6|0}if(l[n>>2]=b,0==(0|$)|(T=T+C|0)>>>0>S>>>0){$=0;break e}if(b=$+-1|0,(0|l[u>>2])>>>0<=b>>>0&&(l[_>>2]=866,l[_+4>>2]=910,l[_+8>>2]=1497,Oe(o,812,_),$e(o)),!((C=0|r[(0|l[s>>2])+b>>0])<<24>>24)){$=0;break e}if($>>>0>=(b=T+$|0)>>>0)break i;do{(0|l[u>>2])>>>0<=$>>>0&&(l[m>>2]=866,l[m+4>>2]=910,l[m+8>>2]=1497,Oe(o,812,m),$e(o)),r[(0|l[s>>2])+$>>0]=C,$=$+1|0}while((0|$)!=(0|b));$=b}}while(0)}while(a>>>0>$>>>0);if(81==(0|A)){l[g>>2]=866,l[g+4>>2]=3149,l[g+8>>2]=1348,Oe(o,812,g),$e(o),$=0;break}$=(0|a)==(0|$)?0|ne(t):0}else $=0}else r[L+16>>0]=1,$=0}while(0);return ce(L),y=v,0|(L=$)}function W(e,t,i,n){i|=0;var o,s,u,h,f,p,_=0,m=0,g=0,x=0,v=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,I=0,D=0,B=0,N=0;if(p=y,y=y+880|0,B=p+144|0,f=p+128|0,h=p+112|0,u=p+96|0,I=p+80|0,A=p+64|0,E=p+48|0,P=p+32|0,T=p+16|0,b=p,o=p+360|0,s=p+296|0,N=p+224|0,w=p+156|0,0==(0|(t|=0))|(n|=0)>>>0>11)return y=p,0|(N=0);l[(e|=0)>>2]=t,m=(_=N)+68|0;do{l[_>>2]=0,_=_+4|0}while((0|_)<(0|m));_=0;do{m=N+((255&(D=0|r[i+_>>0]))<<2)|0,D<<24>>24&&(l[m>>2]=1+(0|l[m>>2])),_=_+1|0}while((0|_)!=(0|t));for(m=0,g=0,x=0,v=-1,$=1;(_=0|l[N+($<<2)>>2])?(l[s+((C=$+-1|0)<<2)>>2]=m,m=_+m|0,D=16-$|0,l[e+28+(C<<2)>>2]=1+(m+-1<<D|(1<<D)-1),l[e+96+(C<<2)>>2]=g,l[w+($<<2)>>2]=g,C=_+g|0,x=x>>>0>$>>>0?x:$,v=v>>>0<$>>>0?v:$):(l[e+28+($+-1<<2)>>2]=0,C=g),17!=(0|($=$+1|0));)m<<=1,g=C;l[e+4>>2]=C,m=e+172|0;do{if(C>>>0>(0|l[m>>2])>>>0){(_=C+-1|0)&C?(_|=_>>>16,_|=_>>>8,_|=_>>>4,_=(_=1+((_|=_>>>2)>>>1|_)|0)>>>0>t>>>0?t:_):_=C,l[m>>2]=_,_=0|l[(g=e+176|0)>>2];do{if(0|_){if(D=0|l[_+-4>>2],_=_+-8|0,0!=(0|D)&&(0|D)==(0|~l[_>>2])||(l[b>>2]=866,l[b+4>>2]=651,l[b+8>>2]=1579,Oe(o,812,b),$e(o)),7&_){l[T>>2]=866,l[T+4>>2]=2506,l[T+8>>2]=1232,Oe(o,812,T),$e(o);break}_e(_,0,0,1,0);break}}while(0);if(m=0|he(8+((_=0|(_=0|l[m>>2])?_:1)<<1)|0,0)){l[m+4>>2]=_,l[m>>2]=~_,l[g>>2]=m+8,S=24;break}l[g>>2]=0,n=0;break}S=24}while(0);e:do{if(24==(0|S)){r[(D=e+24|0)>>0]=v,r[e+25>>0]=x,g=e+176|0,m=0;do{_=255&(O=0|r[i+m>>0]),O<<24>>24&&(0|l[N+(_<<2)>>2]||(l[P>>2]=866,l[P+4>>2]=2276,l[P+8>>2]=977,Oe(o,812,P),$e(o)),_=0|l[(O=w+(_<<2)|0)>>2],l[O>>2]=_+1,_>>>0>=C>>>0&&(l[E>>2]=866,l[E+4>>2]=2280,l[E+8>>2]=990,Oe(o,812,E),$e(o)),a[(0|l[g>>2])+(_<<1)>>1]=m),m=m+1|0}while((0|m)!=(0|t));if(R=(0|c[D>>0])>>>0<n>>>0?n:0,l[(O=e+8|0)>>2]=R,M=0!=(0|R)){L=1<<R,_=e+164|0;do{if(L>>>0>(0|l[_>>2])>>>0){l[_>>2]=L,_=0|l[(g=e+168|0)>>2];do{if(0|_){if(P=0|l[_+-4>>2],_=_+-8|0,0!=(0|P)&&(0|P)==(0|~l[_>>2])||(l[A>>2]=866,l[A+4>>2]=651,l[A+8>>2]=1579,Oe(o,812,A),$e(o)),7&_){l[I>>2]=866,l[I+4>>2]=2506,l[I+8>>2]=1232,Oe(o,812,I),$e(o);break}_e(_,0,0,1,0);break}}while(0);if(m=0|he((_=L<<2)+8|0,0)){I=m+8|0,l[m+4>>2]=L,l[m>>2]=~L,l[g>>2]=I,m=I;break}l[g>>2]=0,n=0;break e}_=L<<2,g=m=e+168|0,m=0|l[m>>2]}while(0);de(0|m,-1,0|_),E=e+176|0,w=1;do{if(0|l[N+(w<<2)>>2]&&(A=1<<(P=R-w|0),m=0|l[s+((_=w+-1|0)<<2)>>2],_>>>0>=16&&(l[u>>2]=866,l[u+4>>2]=1960,l[u+8>>2]=1453,Oe(o,812,u),$e(o)),m>>>0<=(t=0==(0|(t=0|l[e+28+(_<<2)>>2]))?-1:(t+-1|0)>>>(16-w|0))>>>0)){C=(0|l[e+96+(_<<2)>>2])-m|0,S=w<<16;do{_=0|d[(0|l[E>>2])+(C+m<<1)>>1],(0|c[i+_>>0])!=(0|w)&&(l[h>>2]=866,l[h+4>>2]=2322,l[h+8>>2]=1019,Oe(o,812,h),$e(o)),T=m<<P,$=_|S,v=0;do{(b=v+T|0)>>>0>=L>>>0&&(l[f>>2]=866,l[f+4>>2]=2328,l[f+8>>2]=1053,Oe(o,812,f),$e(o)),_=0|l[g>>2],-1!=(0|l[_+(b<<2)>>2])&&(l[B>>2]=866,l[B+4>>2]=2330,l[B+8>>2]=1076,Oe(o,812,B),$e(o),_=0|l[g>>2]),l[_+(b<<2)>>2]=$,v=v+1|0}while(v>>>0<A>>>0);m=m+1|0}while(m>>>0<=t>>>0)}w=w+1|0}while(R>>>0>=w>>>0)}l[(_=e+96|0)>>2]=(0|l[_>>2])-(0|l[s>>2]),l[(_=e+100|0)>>2]=(0|l[_>>2])-(0|l[s+4>>2]),l[(_=e+104|0)>>2]=(0|l[_>>2])-(0|l[s+8>>2]),l[(_=e+108|0)>>2]=(0|l[_>>2])-(0|l[s+12>>2]),l[(_=e+112|0)>>2]=(0|l[_>>2])-(0|l[s+16>>2]),l[(_=e+116|0)>>2]=(0|l[_>>2])-(0|l[s+20>>2]),l[(_=e+120|0)>>2]=(0|l[_>>2])-(0|l[s+24>>2]),l[(_=e+124|0)>>2]=(0|l[_>>2])-(0|l[s+28>>2]),l[(_=e+128|0)>>2]=(0|l[_>>2])-(0|l[s+32>>2]),l[(_=e+132|0)>>2]=(0|l[_>>2])-(0|l[s+36>>2]),l[(_=e+136|0)>>2]=(0|l[_>>2])-(0|l[s+40>>2]),l[(_=e+140|0)>>2]=(0|l[_>>2])-(0|l[s+44>>2]),l[(_=e+144|0)>>2]=(0|l[_>>2])-(0|l[s+48>>2]),l[(_=e+148|0)>>2]=(0|l[_>>2])-(0|l[s+52>>2]),l[(_=e+152|0)>>2]=(0|l[_>>2])-(0|l[s+56>>2]),l[(_=e+156|0)>>2]=(0|l[_>>2])-(0|l[s+60>>2]),l[(_=e+16|0)>>2]=0,l[(m=e+20|0)>>2]=c[D>>0];t:do{if(M){do{if(!n)break t;B=n,n=n+-1|0}while(!(0|l[N+(B<<2)>>2]));if(l[_>>2]=l[e+28+(n<<2)>>2],n=R+1|0,l[m>>2]=n,n>>>0<=x>>>0){for(;!(0|l[N+(n<<2)>>2]);)if((n=n+1|0)>>>0>x>>>0)break t;l[m>>2]=n}}}while(0);l[e+92>>2]=-1,l[e+160>>2]=1048575,l[e+12>>2]=32-(0|l[O>>2]),n=1}}while(0);return y=p,0|(N=n)}function H(e){var t=0,i=0,n=0,r=0,o=0,a=0,s=0,u=0;if(e|=0){i=e+-8|0,r=0|l[1148],u=i+(t=-8&(e=0|l[e+-4>>2]))|0;do{if(1&e)s=i,a=i;else{if(n=0|l[i>>2],!(3&e)||(o=n+t|0,(a=i+(0-n)|0)>>>0<r>>>0))return;if((0|a)==(0|l[1149])){if(3!=(3&(t=0|l[(e=u+4|0)>>2])|0)){s=a,t=o;break}return l[1146]=o,l[e>>2]=-2&t,l[a+4>>2]=1|o,void(l[a+o>>2]=o)}if(i=n>>>3,n>>>0<256){if(e=0|l[a+8>>2],(0|(t=0|l[a+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<i),s=a,t=o;break}l[e+12>>2]=t,l[t+8>>2]=e,s=a,t=o;break}r=0|l[a+24>>2],e=0|l[a+12>>2];do{if((0|e)==(0|a)){if(!(e=0|l[(t=(i=a+16|0)+4|0)>>2])){if(!(e=0|l[i>>2])){e=0;break}t=i}for(;;)if(0|(n=0|l[(i=e+20|0)>>2]))e=n,t=i;else{if(!(n=0|l[(i=e+16|0)>>2]))break;e=n,t=i}l[t>>2]=0}else s=0|l[a+8>>2],l[s+12>>2]=e,l[e+8>>2]=s}while(0);if(r){if(t=0|l[a+28>>2],(0|a)==(0|l[(i=4880+(t<<2)|0)>>2])){if(l[i>>2]=e,!e){l[1145]=l[1145]&~(1<<t),s=a,t=o;break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|a)&1)<<2)>>2]=e,!e){s=a,t=o;break}l[e+24>>2]=r,0|(i=0|l[(t=a+16|0)>>2])&&(l[e+16>>2]=i,l[i+24>>2]=e),(t=0|l[t+4>>2])?(l[e+20>>2]=t,l[t+24>>2]=e,s=a,t=o):(s=a,t=o)}else s=a,t=o}}while(0);if(!(a>>>0>=u>>>0)&&1&(n=0|l[(e=u+4|0)>>2])){if(2&n)l[e>>2]=-2&n,l[s+4>>2]=1|t,l[a+t>>2]=t,r=t;else{if(e=0|l[1149],(0|u)==(0|l[1150])){if(u=(0|l[1147])+t|0,l[1147]=u,l[1150]=s,l[s+4>>2]=1|u,(0|s)!=(0|e))return;return l[1149]=0,void(l[1146]=0)}if((0|u)==(0|e))return u=(0|l[1146])+t|0,l[1146]=u,l[1149]=a,l[s+4>>2]=1|u,void(l[a+u>>2]=u);r=(-8&n)+t|0,i=n>>>3;do{if(n>>>0<256){if(t=0|l[u+8>>2],(0|(e=0|l[u+12>>2]))==(0|t)){l[1144]=l[1144]&~(1<<i);break}l[t+12>>2]=e,l[e+8>>2]=t;break}o=0|l[u+24>>2],e=0|l[u+12>>2];do{if((0|e)==(0|u)){if(!(e=0|l[(t=(i=u+16|0)+4|0)>>2])){if(!(e=0|l[i>>2])){i=0;break}t=i}for(;;)if(0|(n=0|l[(i=e+20|0)>>2]))e=n,t=i;else{if(!(n=0|l[(i=e+16|0)>>2]))break;e=n,t=i}l[t>>2]=0,i=e}else i=0|l[u+8>>2],l[i+12>>2]=e,l[e+8>>2]=i,i=e}while(0);if(0|o){if(e=0|l[u+28>>2],(0|u)==(0|l[(t=4880+(e<<2)|0)>>2])){if(l[t>>2]=i,!i){l[1145]=l[1145]&~(1<<e);break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|u)&1)<<2)>>2]=i,!i)break;l[i+24>>2]=o,0|(t=0|l[(e=u+16|0)>>2])&&(l[i+16>>2]=t,l[t+24>>2]=i),0|(e=0|l[e+4>>2])&&(l[i+20>>2]=e,l[e+24>>2]=i)}}while(0);if(l[s+4>>2]=1|r,l[a+r>>2]=r,(0|s)==(0|l[1149]))return void(l[1146]=r)}if(e=r>>>3,r>>>0<256)return i=4616+(e<<1<<2)|0,(t=0|l[1144])&(e=1<<e)?e=0|l[(t=i+8|0)>>2]:(l[1144]=t|e,e=i,t=i+8|0),l[t>>2]=s,l[e+12>>2]=s,l[s+8>>2]=e,void(l[s+12>>2]=i);(e=r>>>8)?r>>>0>16777215?e=31:e=r>>>((e=14-((o=((u=e<<(a=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(e=((u<<=o)+245760|0)>>>16&2))+(u<<e>>>15)|0)+7|0)&1|e<<1:e=0,n=4880+(e<<2)|0,l[s+28>>2]=e,l[s+20>>2]=0,l[s+16>>2]=0,t=0|l[1145],i=1<<e;do{if(t&i){for(t=r<<(31==(0|e)?0:25-(e>>>1)|0),i=0|l[n>>2];;){if((-8&l[i+4>>2]|0)==(0|r)){e=73;break}if(!(e=0|l[(n=i+16+(t>>>31<<2)|0)>>2])){e=72;break}t<<=1,i=e}if(72==(0|e)){l[n>>2]=s,l[s+24>>2]=i,l[s+12>>2]=s,l[s+8>>2]=s;break}if(73==(0|e)){u=0|l[(a=i+8|0)>>2],l[u+12>>2]=s,l[a>>2]=s,l[s+8>>2]=u,l[s+12>>2]=i,l[s+24>>2]=0;break}}else l[1145]=t|i,l[n>>2]=s,l[s+24>>2]=n,l[s+12>>2]=s,l[s+8>>2]=s}while(0);if(u=(0|l[1152])-1|0,l[1152]=u,u)return;for(e=5032;e=0|l[e>>2];)e=e+8|0;l[1152]=-1}}}function q(e,t){var i=0,n=0,r=0,o=0,a=0,s=0,u=0;u=(e|=0)+(t|=0)|0,i=0|l[e+4>>2];do{if(1&i)s=e,i=t;else{if(n=0|l[e>>2],!(3&i))return;if(a=n+t|0,(0|(o=e+(0-n)|0))==(0|l[1149])){if(3!=(3&(i=0|l[(e=u+4|0)>>2])|0)){s=o,i=a;break}return l[1146]=a,l[e>>2]=-2&i,l[o+4>>2]=1|a,void(l[o+a>>2]=a)}if(t=n>>>3,n>>>0<256){if(e=0|l[o+8>>2],(0|(i=0|l[o+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<t),s=o,i=a;break}l[e+12>>2]=i,l[i+8>>2]=e,s=o,i=a;break}r=0|l[o+24>>2],e=0|l[o+12>>2];do{if((0|e)==(0|o)){if(!(e=0|l[(i=(t=o+16|0)+4|0)>>2])){if(!(e=0|l[t>>2])){e=0;break}i=t}for(;;)if(0|(n=0|l[(t=e+20|0)>>2]))e=n,i=t;else{if(!(n=0|l[(t=e+16|0)>>2]))break;e=n,i=t}l[i>>2]=0}else s=0|l[o+8>>2],l[s+12>>2]=e,l[e+8>>2]=s}while(0);if(r){if(i=0|l[o+28>>2],(0|o)==(0|l[(t=4880+(i<<2)|0)>>2])){if(l[t>>2]=e,!e){l[1145]=l[1145]&~(1<<i),s=o,i=a;break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|o)&1)<<2)>>2]=e,!e){s=o,i=a;break}l[e+24>>2]=r,0|(t=0|l[(i=o+16|0)>>2])&&(l[e+16>>2]=t,l[t+24>>2]=e),(i=0|l[i+4>>2])?(l[e+20>>2]=i,l[i+24>>2]=e,s=o,i=a):(s=o,i=a)}else s=o,i=a}}while(0);if(2&(n=0|l[(e=u+4|0)>>2]))l[e>>2]=-2&n,l[s+4>>2]=1|i,l[s+i>>2]=i;else{if(e=0|l[1149],(0|u)==(0|l[1150])){if(u=(0|l[1147])+i|0,l[1147]=u,l[1150]=s,l[s+4>>2]=1|u,(0|s)!=(0|e))return;return l[1149]=0,void(l[1146]=0)}if((0|u)==(0|e))return u=(0|l[1146])+i|0,l[1146]=u,l[1149]=s,l[s+4>>2]=1|u,void(l[s+u>>2]=u);o=(-8&n)+i|0,t=n>>>3;do{if(n>>>0<256){if(i=0|l[u+8>>2],(0|(e=0|l[u+12>>2]))==(0|i)){l[1144]=l[1144]&~(1<<t);break}l[i+12>>2]=e,l[e+8>>2]=i;break}r=0|l[u+24>>2],e=0|l[u+12>>2];do{if((0|e)==(0|u)){if(!(e=0|l[(i=(t=u+16|0)+4|0)>>2])){if(!(e=0|l[t>>2])){t=0;break}i=t}for(;;)if(0|(n=0|l[(t=e+20|0)>>2]))e=n,i=t;else{if(!(n=0|l[(t=e+16|0)>>2]))break;e=n,i=t}l[i>>2]=0,t=e}else t=0|l[u+8>>2],l[t+12>>2]=e,l[e+8>>2]=t,t=e}while(0);if(0|r){if(e=0|l[u+28>>2],(0|u)==(0|l[(i=4880+(e<<2)|0)>>2])){if(l[i>>2]=t,!t){l[1145]=l[1145]&~(1<<e);break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|u)&1)<<2)>>2]=t,!t)break;l[t+24>>2]=r,0|(i=0|l[(e=u+16|0)>>2])&&(l[t+16>>2]=i,l[i+24>>2]=t),0|(e=0|l[e+4>>2])&&(l[t+20>>2]=e,l[e+24>>2]=t)}}while(0);if(l[s+4>>2]=1|o,l[s+o>>2]=o,(0|s)==(0|l[1149]))return void(l[1146]=o);i=o}if(e=i>>>3,i>>>0<256)return t=4616+(e<<1<<2)|0,(i=0|l[1144])&(e=1<<e)?e=0|l[(i=t+8|0)>>2]:(l[1144]=i|e,e=t,i=t+8|0),l[i>>2]=s,l[e+12>>2]=s,l[s+8>>2]=e,void(l[s+12>>2]=t);if((e=i>>>8)?i>>>0>16777215?e=31:e=i>>>((e=14-((o=((u=e<<(a=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(e=((u<<=o)+245760|0)>>>16&2))+(u<<e>>>15)|0)+7|0)&1|e<<1:e=0,r=4880+(e<<2)|0,l[s+28>>2]=e,l[s+20>>2]=0,l[s+16>>2]=0,!((t=0|l[1145])&(n=1<<e)))return l[1145]=t|n,l[r>>2]=s,l[s+24>>2]=r,l[s+12>>2]=s,void(l[s+8>>2]=s);for(t=i<<(31==(0|e)?0:25-(e>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|i)){e=69;break}if(!(e=0|l[(r=n+16+(t>>>31<<2)|0)>>2])){e=68;break}t<<=1,n=e}return 68==(0|e)?(l[r>>2]=s,l[s+24>>2]=n,l[s+12>>2]=s,void(l[s+8>>2]=s)):69==(0|e)?(u=0|l[(a=n+8|0)>>2],l[u+12>>2]=s,l[a>>2]=s,l[s+8>>2]=u,l[s+12>>2]=n,void(l[s+24>>2]=0)):void 0}function j(e,t,i,n,r){r|=0;var o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0,_=0;if(h=e|=0,a=i|=0,s=f=n|=0,!(c=u=t|=0))return o=0!=(0|r),s?o?(l[r>>2]=0|e,l[r+4>>2]=0&t,b=f=0,0|(r=0)):(b=f=0,0|(r=0)):(o&&(l[r>>2]=(h>>>0)%(a>>>0),l[r+4>>2]=0),b=f=0,0|(r=(h>>>0)/(a>>>0)>>>0));o=0==(0|s);do{if(a){if(!o){if((o=(0|C(0|s))-(0|C(0|c))|0)>>>0<=31){a=d=o+1|0,e=h>>>(d>>>0)&(t=o-31>>31)|c<<(s=31-o|0),t&=c>>>(d>>>0),o=0,s=h<<s;break}return r?(l[r>>2]=0|e,l[r+4>>2]=u|0&t,b=f=0,0|(r=0)):(b=f=0,0|(r=0))}if((o=a-1|0)&a|0){a=s=33+(0|C(0|a))-(0|C(0|c))|0,e=(d=32-s|0)-1>>31&c>>>((p=s-32|0)>>>0)|(c<<d|h>>>(s>>>0))&(t=p>>31),t&=c>>>(s>>>0),o=h<<(_=64-s|0)&(u=d>>31),s=(c<<_|h>>>(p>>>0))&u|h<<d&s-33>>31;break}return 0|r&&(l[r>>2]=o&h,l[r+4>>2]=0),1==(0|a)?(b=p=u|0&t,0|(_=0|e)):(_=0|Pe(0|a),b=p=c>>>(_>>>0)|0,0|(_=c<<32-_|h>>>(_>>>0)|0))}if(o)return 0|r&&(l[r>>2]=(c>>>0)%(a>>>0),l[r+4>>2]=0),b=p=0,0|(_=(c>>>0)/(a>>>0)>>>0);if(!h)return 0|r&&(l[r>>2]=0,l[r+4>>2]=(c>>>0)%(s>>>0)),b=p=0,0|(_=(c>>>0)/(s>>>0)>>>0);if(!((o=s-1|0)&s))return 0|r&&(l[r>>2]=0|e,l[r+4>>2]=o&c|0&t),p=0,_=c>>>((0|Pe(0|s))>>>0),b=p,0|_;if((o=(0|C(0|s))-(0|C(0|c))|0)>>>0<=30){a=t=o+1|0,e=c<<(s=31-o|0)|h>>>(t>>>0),t=c>>>(t>>>0),o=0,s=h<<s;break}return r?(l[r>>2]=0|e,l[r+4>>2]=u|0&t,b=p=0,0|(_=0)):(b=p=0,0|(_=0))}while(0);if(a){c=0|Ue(0|(d=0|i),0|(h=f|0&n),-1,-1),i=b,u=s,s=0;do{n=u,u=o>>>31|u<<1,o=s|o<<1,Ne(0|c,0|i,0|(n=e<<1|n>>>31|0),0|(f=e>>>31|t<<1|0)),s=1&(p=(_=b)>>31|((0|_)<0?-1:0)<<1),e=0|Ne(0|n,0|f,p&d|0,(((0|_)<0?-1:0)>>31|((0|_)<0?-1:0)<<1)&h|0),t=b,a=a-1|0}while(0!=(0|a));c=u,u=0}else c=s,u=0,s=0;return a=0,0|r&&(l[r>>2]=e,l[r+4>>2]=t),b=p=(0|o)>>>31|(c|a)<<1|0&(a<<1|o>>>31)|u,0|(_=-2&(o<<1|0)|s)}function Y(e,t){e|=0;var i,n,r,o,a,s,u,h,f=0,p=0,_=0,m=0,g=0,x=0;h=y,y=y+576|0,r=h+48|0,a=h+32|0,o=h+16|0,n=h,u=h+64|0,s=0|l[(t|=0)+20>>2],(0|(i=0|l[(x=e+20|0)>>2]))<24?(p=(f=0|l[(g=e+4|0)>>2])>>>0<(_=0|l[e+8>>2])>>>0,(0|i)<16?(p?(m=(0|c[f>>0])<<8,f=f+1|0):m=0,f>>>0<_>>>0?(_=0|c[f>>0],f=f+1|0):_=0,l[g>>2]=f,l[x>>2]=i+16,p=16,f=_|m):(p?(l[g>>2]=f+1,f=0|c[f>>0]):f=0,l[x>>2]=i+8,p=24),_=l[(g=e+16|0)>>2]|f<<p-i,l[g>>2]=_):(g=_=e+16|0,_=0|l[_>>2]),m=1+(_>>>16)|0;do{if(!(m>>>0<=(0|l[s+16>>2])>>>0)){for(p=0|l[s+20>>2];m>>>0>(0|l[s+28+((f=p+-1|0)<<2)>>2])>>>0;)p=p+1|0;if((f=(_>>>(32-p|0))+(0|l[s+96+(f<<2)>>2])|0)>>>0<(0|l[t>>2])>>>0){f=0|d[(0|l[s+176>>2])+(f<<1)>>1];break}return l[r>>2]=866,l[r+4>>2]=3275,l[r+8>>2]=1348,Oe(u,812,r),$e(u),y=h,0|(x=0)}-1==(0|(p=0|l[(0|l[s+168>>2])+(_>>>(32-(0|l[s+8>>2])|0)<<2)>>2]))&&(l[n>>2]=866,l[n+4>>2]=3253,l[n+8>>2]=1393,Oe(u,812,n),$e(u)),f=65535&p,p>>>=16,(0|l[t+8>>2])>>>0<=f>>>0&&(l[o>>2]=866,l[o+4>>2]=909,l[o+8>>2]=1497,Oe(u,812,o),$e(u)),(0|c[(0|l[t+4>>2])+f>>0])!=(0|p)&&(l[a>>2]=866,l[a+4>>2]=3257,l[a+8>>2]=1410,Oe(u,812,a),$e(u))}while(0);return l[g>>2]=l[g>>2]<<p,l[x>>2]=(0|l[x>>2])-p,y=h,0|(x=f)}function X(e){var t,i,n,o,a,s=0,u=0,c=0;if(a=y,y=y+576|0,c=a+48|0,n=a+32|0,i=a+16|0,t=a,o=a+64|0,l[(e|=0)>>2]=0,0|(u=0|l[(s=e+284|0)>>2])&&(7&u?(l[t>>2]=866,l[t+4>>2]=2506,l[t+8>>2]=1232,Oe(o,812,t),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+288>>2]=0,l[e+292>>2]=0),r[e+296>>0]=0,0|(u=0|l[(s=e+268|0)>>2])&&(7&u?(l[i>>2]=866,l[i+4>>2]=2506,l[i+8>>2]=1232,Oe(o,812,i),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+272>>2]=0,l[e+276>>2]=0),r[e+280>>0]=0,0|(u=0|l[(s=e+252|0)>>2])&&(7&u?(l[n>>2]=866,l[n+4>>2]=2506,l[n+8>>2]=1232,Oe(o,812,n),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+256>>2]=0,l[e+260>>2]=0),r[e+264>>0]=0,!(u=0|l[(s=e+236|0)>>2]))return r[(c=e+248|0)>>0]=0,ce(c=e+212|0),ce(c=e+188|0),ce(c=e+164|0),ce(c=e+140|0),ce(c=e+116|0),void(y=a);7&u?(l[c>>2]=866,l[c+4>>2]=2506,l[c+8>>2]=1232,Oe(o,812,c),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+240>>2]=0,l[e+244>>2]=0,r[(c=e+248|0)>>0]=0,ce(c=e+212|0),ce(c=e+188|0),ce(c=e+164|0),ce(c=e+140|0),ce(c=e+116|0),y=a}function K(e,t,i){e|=0,t|=0,i|=0;var n=0,r=0,o=0;e:do{if(t>>>0<=20){switch(0|t){case 9:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[e>>2]=t;break e;case 10:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[(n=e)>>2]=t,l[n+4>>2]=((0|t)<0)<<31>>31;break e;case 11:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[(n=e)>>2]=t,l[n+4>>2]=0;break e;case 12:n=7+(0|l[i>>2])&-8,r=0|l[(t=n)>>2],t=0|l[t+4>>2],l[i>>2]=n+8,l[(n=e)>>2]=r,l[n+4>>2]=t;break e;case 13:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,n=(65535&n)<<16>>16,l[(r=e)>>2]=n,l[r+4>>2]=((0|n)<0)<<31>>31;break e;case 14:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,l[(r=e)>>2]=65535&n,l[r+4>>2]=0;break e;case 15:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,n=(255&n)<<24>>24,l[(r=e)>>2]=n,l[r+4>>2]=((0|n)<0)<<31>>31;break e;case 16:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,l[(r=e)>>2]=255&n,l[r+4>>2]=0;break e;case 17:case 18:r=7+(0|l[i>>2])&-8,o=+m[r>>3],l[i>>2]=r+8,m[e>>3]=o;break e;default:break e}}}while(0)}function Q(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0;var o,a,s,u,c,h,d=0,f=0,p=0,_=0;if(h=y,y=y+576|0,u=h+48|0,o=h+32|0,f=h+16|0,d=h,s=h+64|0,c=h+60|0,_=(e|=0)+8|0,(0|l[(a=e+4|0)>>2])>>>0>(0|l[_>>2])>>>0&&(l[d>>2]=866,l[d+4>>2]=2123,l[d+8>>2]=845,Oe(s,812,d),$e(s)),(2147418112/(n>>>0)|0)>>>0<=t>>>0&&(l[f>>2]=866,l[f+4>>2]=2124,l[f+8>>2]=885,Oe(s,812,f),$e(s)),(d=0|l[_>>2])>>>0>=t>>>0)return y=h,0|(_=1);if(i&&0!=((p=t+-1|0)&t|0)?(t=p>>>16|p,t|=t>>>8,t|=t>>>4,(t=1+((t|=t>>>2)>>>1|t)|0)?i=9:(t=0,i=10)):i=9,9==(0|i)&&t>>>0<=d>>>0&&(i=10),10==(0|i)&&(l[o>>2]=866,l[o+4>>2]=2133,l[o+8>>2]=933,Oe(s,812,o),$e(s)),p=0|T(t,n),r)if(f=0|he(p,c)){ct[0&r](f,0|l[e>>2],0|l[a>>2]),d=0|l[e>>2];do{if(0|d){if(7&d){l[u>>2]=866,l[u+4>>2]=2506,l[u+8>>2]=1232,Oe(s,812,u),$e(s);break}_e(d,0,0,1,0);break}}while(0);l[e>>2]=f,i=20}else t=0;else d=0|function(e,t,i,n){t|=0,i|=0,n|=0;var r=0,o=0,a=0,s=0,u=0,c=0;return c=y,y=y+560|0,u=c+32|0,o=c+16|0,r=c,a=c+48|0,s=c+44|0,7&(e|=0)|0?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1210,Oe(a,812,r),$e(a),y=c,0|(u=0)):t>>>0>2147418112?(l[o>>2]=866,l[o+4>>2]=2506,l[o+8>>2]=1103,Oe(a,812,o),$e(a),y=c,0|(u=0)):(l[s>>2]=t,e=0|_e(e,t,s,n,0),0|i&&(l[i>>2]=l[s>>2]),7&e|0&&(l[u>>2]=866,l[u+4>>2]=2558,l[u+8>>2]=1156,Oe(a,812,u),$e(a)),y=c,0|(u=e))}(0|l[e>>2],p,c,1),d?(l[e>>2]=d,i=20):t=0;return 20==(0|i)&&((d=0|l[c>>2])>>>0>p>>>0&&(t=(d>>>0)/(n>>>0)|0),l[_>>2]=t,t=1),y=h,0|(_=t)}function Z(e,t,i,n,o,a,s){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0;var u=0,h=0,f=0,p=0;if(p=0|l[(e|=0)+88>>2],h=(((h=(c[p+12>>0]<<8|c[p+13>>0])>>>s)>>>0>1?h:1)+3|0)>>>2,f=(((f=(c[p+14>>0]<<8|c[p+15>>0])>>>s)>>>0>1?f:1)+3|0)>>>2,s=0|r[(p=p+18|0)>>0],s=0|T(h,s<<24>>24==0|s<<24>>24==9?8:16),a){if(!(0==(3&a|0)&s>>>0<=a>>>0))return 0|(o=0);s=a}if((0|T(s,f))>>>0>o>>>0||(a=(h+1|0)>>>1,u=(f+1|0)>>>1,!i))return 0|(o=0);switch(l[e+92>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,0|r[p>>0]){case 0:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,d,f,p,_,m,g,x,v,$,b,C,S,w,E,P,A,L,M,R,O,I,D,B,N,F,U,G,z,V,k,W,H=0,q=0,j=0,X=0,K=0,Q=0,Z=0,J=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0;if(W=y,y=y+656|0,V=W+112|0,G=W+96|0,U=W+80|0,F=W+64|0,N=W+48|0,k=W+32|0,z=W+16|0,B=W,I=W+144|0,D=W+128|0,w=0|l[(S=240+(e|=0)|0)>>2],P=0|l[(E=e+256|0)>>2],A=255&(se=0|r[17+(0|l[e+88>>2])>>0]),!(se<<24>>24))return y=W,1;M=0==(0|u),O=(R=s+-1|0)<<4,se=u+-1|0,g=0!=(1&a|0),x=n<<1,v=e+92|0,$=e+116|0,b=e+140|0,C=e+236|0,m=0!=(1&o|0),_=e+188|0,h=e+252|0,d=1+(L=n>>>2)|0,f=L+2|0,p=L+3|0,ae=0,a=0,i=0,o=1;do{if(!M)for(re=0|l[t+(ae<<2)>>2],oe=0;;){if(q=0==(0|(ie=1&oe)),te=(ie<<5^32)-16|0,ie=(ie<<1^2)-1|0,ne=g&(e=(0|oe)==(0|se)),(0|(H=q?0:R))!=(0|(ee=q?s:-1)))for(J=g&e^1,Z=q?re:re+O|0;;){1==(0|o)&&(o=512|Y(v,$)),Q=7&o,o>>>=3,q=0|c[1539+Q>>0],e=0;do{i=(K=(X=(j=(0|Y(v,b))+i|0)-w|0)>>31)&j|X&~K,(0|l[S>>2])>>>0<=i>>>0&&(l[B>>2]=866,l[B+4>>2]=910,l[B+8>>2]=1497,Oe(I,812,B),$e(I)),l[D+(e<<2)>>2]=l[(0|l[C>>2])+(i<<2)>>2],e=e+1|0}while(e>>>0<q>>>0);if(ne|(K=m&(0|H)==(0|R))){X=0;do{e=Z+(0|T(X,n))|0,j=0==(0|X)|J,q=X<<1,a=(a=(le=(ue=(0|Y(v,_))+a|0)-P|0)>>31)&ue|le&~a;do{if(K){if(!j){a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a;break}l[e>>2]=l[D+((0|c[1547+(Q<<2)+q>>0])<<2)>>2],(0|l[E>>2])>>>0<=a>>>0&&(l[G>>2]=866,l[G+4>>2]=910,l[G+8>>2]=1497,Oe(I,812,G),$e(I)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2],a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a}else j&&(l[e>>2]=l[D+((0|c[1547+(Q<<2)+q>>0])<<2)>>2],(0|l[E>>2])>>>0<=a>>>0&&(l[U>>2]=866,l[U+4>>2]=910,l[U+8>>2]=1497,Oe(I,812,U),$e(I)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2]),e=e+8|0,a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a,j&&(l[e>>2]=l[D+((0|c[1547+(Q<<2)+(1|q)>>0])<<2)>>2],(0|l[E>>2])>>>0<=a>>>0&&(l[V>>2]=866,l[V+4>>2]=910,l[V+8>>2]=1497,Oe(I,812,V),$e(I)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2])}while(0);X=X+1|0}while(2!=(0|X))}else l[Z>>2]=l[D+((0|c[1547+(Q<<2)>>0])<<2)>>2],a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[z>>2]=866,l[z+4>>2]=910,l[z+8>>2]=1497,Oe(I,812,z),$e(I)),l[Z+4>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[Z+8>>2]=l[D+((0|c[1547+(Q<<2)+1>>0])<<2)>>2],a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[k>>2]=866,l[k+4>>2]=910,l[k+8>>2]=1497,Oe(I,812,k),$e(I)),l[Z+12>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[Z+(L<<2)>>2]=l[D+((0|c[1547+(Q<<2)+2>>0])<<2)>>2],a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[N>>2]=866,l[N+4>>2]=910,l[N+8>>2]=1497,Oe(I,812,N),$e(I)),l[Z+(d<<2)>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[Z+(f<<2)>>2]=l[D+((0|c[1547+(Q<<2)+3>>0])<<2)>>2],a=(a=(ue=(le=(0|Y(v,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[F>>2]=866,l[F+4>>2]=910,l[F+8>>2]=1497,Oe(I,812,F),$e(I)),l[Z+(p<<2)>>2]=l[(0|l[h>>2])+(a<<2)>>2];if((0|(H=ie+H|0))==(0|ee))break;Z=Z+te|0}if((0|(oe=oe+1|0))==(0|u))break;re=re+x|0}ae=ae+1|0}while((0|ae)!=(0|A));return y=W,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 4:case 6:case 5:case 3:case 2:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,g,x,v,$,b,T,C,S,w,E,P,A,L,M,R,O,I,D,B,N,F,U,G,z,V,k,W,H,q,j,X=0,K=0,Q=0,Z=0,J=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0,ce=0,he=0,de=0,fe=0,pe=0,_e=0,me=0;if(j=y,y=y+640|0,W=j+80|0,k=j+64|0,V=j+48|0,q=j+32|0,H=j+16|0,z=j,U=j+128|0,G=j+112|0,g=j+96|0,v=0|l[(x=240+(e|=0)|0)>>2],b=0|l[($=e+256|0)>>2],C=0|l[(T=e+272|0)>>2],me=0|l[e+88>>2],S=(0|c[me+63>>0])<<8|0|c[me+64>>0],w=255&(me=0|r[me+17>>0]),!(me<<24>>24))return y=j,1;E=0==(0|u),A=(P=s+-1|0)<<5,L=u+-1|0,M=n<<1,R=e+92|0,O=e+116|0,I=e+164|0,D=e+268|0,B=e+140|0,N=e+236|0,F=e+212|0,me=e+188|0,m=0==(1&o|0),_=0==(1&a|0),f=e+288|0,p=e+284|0,h=e+252|0,_e=0,e=0,a=0,o=0,i=0,X=1;do{if(!E)for(fe=0|l[t+(_e<<2)>>2],pe=0;;){if(Q=0==(0|(de=1&pe)),he=(de<<6^64)-32|0,de=(de<<1^2)-1|0,(0|(K=Q?0:P))!=(0|(ue=Q?s:-1)))for(ce=_|(0|pe)!=(0|L),le=Q?fe:fe+A|0;;){1==(0|X)&&(X=512|Y(R,O)),se=7&X,X>>>=3,Z=0|c[1539+se>>0],Q=0;do{a=(ae=(oe=(re=(0|Y(R,I))+a|0)-C|0)>>31)&re|oe&~ae,(0|l[T>>2])>>>0<=a>>>0&&(l[z>>2]=866,l[z+4>>2]=910,l[z+8>>2]=1497,Oe(U,812,z),$e(U)),l[g+(Q<<2)>>2]=d[(0|l[D>>2])+(a<<1)>>1],Q=Q+1|0}while(Q>>>0<Z>>>0);Q=0;do{i=(ae=(oe=(re=(0|Y(R,B))+i|0)-v|0)>>31)&re|oe&~ae,(0|l[x>>2])>>>0<=i>>>0&&(l[H>>2]=866,l[H+4>>2]=910,l[H+8>>2]=1497,Oe(U,812,H),$e(U)),l[G+(Q<<2)>>2]=l[(0|l[N>>2])+(i<<2)>>2],Q=Q+1|0}while(Q>>>0<Z>>>0);for(ae=m|(0|K)!=(0|P),re=0,oe=le;;){if(te=ce|0==(0|re),ie=re<<1,ae)for(J=0,ee=oe;e=(e=(Z=(ne=(0|Y(R,F))+e|0)-S|0)>>31)&ne|Z&~e,o=(o=(ne=(Z=(0|Y(R,me))+o|0)-b|0)>>31)&Z|ne&~o,te&&(Q=0|c[J+ie+(1547+(se<<2))>>0],Z=3*e|0,(0|l[f>>2])>>>0<=Z>>>0&&(l[q>>2]=866,l[q+4>>2]=910,l[q+8>>2]=1497,Oe(U,812,q),$e(U)),ne=(0|l[p>>2])+(Z<<1)|0,l[ee>>2]=(0|d[ne>>1])<<16|l[g+(Q<<2)>>2],l[ee+4>>2]=(0|d[ne+4>>1])<<16|0|d[ne+2>>1],l[ee+8>>2]=l[G+(Q<<2)>>2],(0|l[$>>2])>>>0<=o>>>0&&(l[V>>2]=866,l[V+4>>2]=910,l[V+8>>2]=1497,Oe(U,812,V),$e(U)),l[ee+12>>2]=l[(0|l[h>>2])+(o<<2)>>2]),2!=(0|(J=J+1|0));)ee=ee+16|0;else for(ne=1^te,te=1547+(se<<2)+ie|0,J=0,ee=oe;e=(e=(Z=(ie=(0|Y(R,F))+e|0)-S|0)>>31)&ie|Z&~e,o=(o=(ie=(Z=(0|Y(R,me))+o|0)-b|0)>>31)&Z|ie&~o,0!=(0|J)|ne||(Q=0|c[te>>0],Z=3*e|0,(0|l[f>>2])>>>0<=Z>>>0&&(l[k>>2]=866,l[k+4>>2]=910,l[k+8>>2]=1497,Oe(U,812,k),$e(U)),ie=(0|l[p>>2])+(Z<<1)|0,l[ee>>2]=(0|d[ie>>1])<<16|l[g+(Q<<2)>>2],l[ee+4>>2]=(0|d[ie+4>>1])<<16|0|d[ie+2>>1],l[ee+8>>2]=l[G+(Q<<2)>>2],(0|l[$>>2])>>>0<=o>>>0&&(l[W>>2]=866,l[W+4>>2]=910,l[W+8>>2]=1497,Oe(U,812,W),$e(U)),l[ee+12>>2]=l[(0|l[h>>2])+(o<<2)>>2]),2!=(0|(J=J+1|0));)ee=ee+16|0;if(2==(0|(re=re+1|0)))break;oe=oe+n|0}if((0|(K=de+K|0))==(0|ue))break;le=le+he|0}if((0|(pe=pe+1|0))==(0|u))break;fe=fe+M|0}_e=_e+1|0}while((0|_e)!=(0|w));return y=j,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 9:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,g,x,v,$,b,T,C,S,w,E,P,A,L,M,R,O,I,D,B,N=0,F=0,U=0,G=0,z=0,V=0,k=0,W=0,H=0,q=0,j=0,X=0,K=0,Q=0,Z=0,J=0,ee=0,te=0;if(B=y,y=y+592|0,O=B+48|0,D=B+32|0,I=B+16|0,R=B,L=B+80|0,M=B+64|0,g=0|l[(m=272+(e|=0)|0)>>2],te=0|l[e+88>>2],x=(0|c[te+63>>0])<<8|0|c[te+64>>0],v=255&(te=0|r[te+17>>0]),!(te<<24>>24))return y=B,1;$=0==(0|u),T=(b=s+-1|0)<<4,C=u+-1|0,S=n<<1,w=e+92|0,E=e+116|0,P=e+164|0,A=e+268|0,te=e+212|0,_=0==(1&o|0),p=0==(1&a|0),f=e+288|0,h=e+284|0,ee=0,o=0,i=0,a=1;do{if(!$)for(Z=0|l[t+(ee<<2)>>2],J=0;;){if(N=0==(0|(Q=1&J)),K=(Q<<5^32)-16|0,Q=(Q<<1^2)-1|0,(0|(e=N?0:b))!=(0|(j=N?s:-1)))for(X=p|(0|J)!=(0|C),q=N?Z:Z+T|0;;){1==(0|a)&&(a=512|Y(w,E)),H=7&a,a>>>=3,F=0|c[1539+H>>0],N=0;do{i=(W=(k=(V=(0|Y(w,P))+i|0)-g|0)>>31)&V|k&~W,(0|l[m>>2])>>>0<=i>>>0&&(l[R>>2]=866,l[R+4>>2]=910,l[R+8>>2]=1497,Oe(L,812,R),$e(L)),l[M+(N<<2)>>2]=d[(0|l[A>>2])+(i<<1)>>1],N=N+1|0}while(N>>>0<F>>>0);for(W=_|(0|e)!=(0|b),V=0,k=q;z=X|0==(0|V),F=V<<1,G=(G=(U=(N=(0|Y(w,te))+o|0)-x|0)>>31)&N|U&~G,W?(z&&(o=0|c[1547+(H<<2)+F>>0],N=3*G|0,(0|l[f>>2])>>>0<=N>>>0&&(l[I>>2]=866,l[I+4>>2]=910,l[I+8>>2]=1497,Oe(L,812,I),$e(L)),U=(0|l[h>>2])+(N<<1)|0,l[k>>2]=(0|d[U>>1])<<16|l[M+(o<<2)>>2],l[k+4>>2]=(0|d[U+4>>1])<<16|0|d[U+2>>1]),U=k+8|0,o=(o=(G=(N=(0|Y(w,te))+G|0)-x|0)>>31)&N|G&~o,z&&(N=0|c[1547+(H<<2)+(1|F)>>0],F=3*o|0,(0|l[f>>2])>>>0<=F>>>0&&(l[O>>2]=866,l[O+4>>2]=910,l[O+8>>2]=1497,Oe(L,812,O),$e(L)),z=(0|l[h>>2])+(F<<1)|0,l[U>>2]=(0|d[z>>1])<<16|l[M+(N<<2)>>2],l[k+12>>2]=(0|d[z+4>>1])<<16|0|d[z+2>>1])):(z&&(o=0|c[1547+(H<<2)+F>>0],N=3*G|0,(0|l[f>>2])>>>0<=N>>>0&&(l[D>>2]=866,l[D+4>>2]=910,l[D+8>>2]=1497,Oe(L,812,D),$e(L)),z=(0|l[h>>2])+(N<<1)|0,l[k>>2]=(0|d[z>>1])<<16|l[M+(o<<2)>>2],l[k+4>>2]=(0|d[z+4>>1])<<16|0|d[z+2>>1]),o=(o=(z=(G=(0|Y(w,te))+G|0)-x|0)>>31)&G|z&~o),2!=(0|(V=V+1|0));)k=k+n|0;if((0|(e=Q+e|0))==(0|j))break;q=q+K|0}if((0|(J=J+1|0))==(0|u))break;Z=Z+S|0}ee=ee+1|0}while((0|ee)!=(0|v));return y=B,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 8:case 7:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,g,x,v,$,b,T,C,S,w,E,P,A,L,M,R,O,I,D,B,N,F,U,G=0,z=0,V=0,k=0,W=0,H=0,q=0,j=0,X=0,K=0,Q=0,Z=0,J=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0,ce=0,he=0;if(U=y,y=y+640|0,B=U+80|0,D=U+64|0,I=U+48|0,F=U+32|0,N=U+16|0,O=U,M=U+128|0,R=U+112|0,m=U+96|0,x=0|l[(g=272+(e|=0)|0)>>2],he=0|l[e+88>>2],v=(0|c[he+63>>0])<<8|0|c[he+64>>0],$=255&(he=0|r[he+17>>0]),!(he<<24>>24))return y=U,1;b=0==(0|u),C=(T=s+-1|0)<<5,S=u+-1|0,w=n<<1,E=e+92|0,P=e+116|0,A=e+164|0,L=e+268|0,he=e+212|0,_=0==(1&o|0),p=0==(1&a|0),f=e+288|0,h=e+284|0,ce=0,e=0,a=0,o=0,i=0,G=1;do{if(!b)for(le=0|l[t+(ce<<2)>>2],ue=0;;){if(V=0==(0|(se=1&ue)),ae=(se<<6^64)-32|0,se=(se<<1^2)-1|0,(0|(z=V?0:T))!=(0|(re=V?s:-1)))for(oe=p|(0|ue)!=(0|S),ne=V?le:le+C|0;;){1==(0|G)&&(G=512|Y(E,P)),ie=7&G,G>>>=3,k=0|c[1539+ie>>0],V=0;do{i=(te=(ee=(J=(0|Y(E,A))+i|0)-x|0)>>31)&J|ee&~te,(0|l[g>>2])>>>0<=i>>>0&&(l[O>>2]=866,l[O+4>>2]=910,l[O+8>>2]=1497,Oe(M,812,O),$e(M)),l[R+(V<<2)>>2]=d[(0|l[L>>2])+(i<<1)>>1],V=V+1|0}while(V>>>0<k>>>0);V=0;do{a=(te=(ee=(J=(0|Y(E,A))+a|0)-x|0)>>31)&J|ee&~te,(0|l[g>>2])>>>0<=a>>>0&&(l[N>>2]=866,l[N+4>>2]=910,l[N+8>>2]=1497,Oe(M,812,N),$e(M)),l[m+(V<<2)>>2]=d[(0|l[L>>2])+(a<<1)>>1],V=V+1|0}while(V>>>0<k>>>0);for(te=_|(0|z)!=(0|T),J=0,ee=ne;;){if(K=oe|0==(0|J),Q=J<<1,te)for(j=0,X=ee;o=(o=(q=(Z=(0|Y(E,he))+o|0)-v|0)>>31)&Z|q&~o,e=(e=(Z=(q=(0|Y(E,he))+e|0)-v|0)>>31)&q|Z&~e,K&&(q=0|c[j+Q+(1547+(ie<<2))>>0],k=3*o|0,(V=0|l[f>>2])>>>0<=k>>>0&&(l[F>>2]=866,l[F+4>>2]=910,l[F+8>>2]=1497,Oe(M,812,F),$e(M),V=0|l[f>>2]),k=(W=0|l[h>>2])+(k<<1)|0,V>>>0>(H=3*e|0)>>>0?V=W:(l[I>>2]=866,l[I+4>>2]=910,l[I+8>>2]=1497,Oe(M,812,I),$e(M),V=0|l[h>>2]),Z=V+(H<<1)|0,l[X>>2]=(0|d[k>>1])<<16|l[R+(q<<2)>>2],l[X+4>>2]=(0|d[k+4>>1])<<16|0|d[k+2>>1],l[X+8>>2]=(0|d[Z>>1])<<16|l[m+(q<<2)>>2],l[X+12>>2]=(0|d[Z+4>>1])<<16|0|d[Z+2>>1]),2!=(0|(j=j+1|0));)X=X+16|0;else for(Z=1^K,K=1547+(ie<<2)+Q|0,j=0,X=ee;o=(o=(q=(Q=(0|Y(E,he))+o|0)-v|0)>>31)&Q|q&~o,e=(e=(Q=(q=(0|Y(E,he))+e|0)-v|0)>>31)&q|Q&~e,0!=(0|j)|Z||(q=0|c[K>>0],k=3*o|0,(V=0|l[f>>2])>>>0<=k>>>0&&(l[D>>2]=866,l[D+4>>2]=910,l[D+8>>2]=1497,Oe(M,812,D),$e(M),V=0|l[f>>2]),k=(W=0|l[h>>2])+(k<<1)|0,V>>>0>(H=3*e|0)>>>0?V=W:(l[B>>2]=866,l[B+4>>2]=910,l[B+8>>2]=1497,Oe(M,812,B),$e(M),V=0|l[h>>2]),Q=V+(H<<1)|0,l[X>>2]=(0|d[k>>1])<<16|l[R+(q<<2)>>2],l[X+4>>2]=(0|d[k+4>>1])<<16|0|d[k+2>>1],l[X+8>>2]=(0|d[Q>>1])<<16|l[m+(q<<2)>>2],l[X+12>>2]=(0|d[Q+4>>1])<<16|0|d[Q+2>>1]),2!=(0|(j=j+1|0));)X=X+16|0;if(2==(0|(J=J+1|0)))break;ee=ee+n|0}if((0|(z=se+z|0))==(0|re))break;ne=ne+ae|0}if((0|(ue=ue+1|0))==(0|u))break;le=le+w|0}ce=ce+1|0}while((0|ce)!=(0|$));return y=U,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;default:return 0|(o=0)}return 0|(o=1)}function J(e,t,i){e|=0,t|=0;var n,o,a=0;if((0|(i|=0))>=8192)return 0|B(0|e,0|t,0|i);if(o=0|e,n=e+i|0,(3&e)==(3&t)){for(;3&e;){if(!i)return 0|o;r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0,i=i-1|0}for(a=(i=-4&n|0)-64|0;(0|e)<=(0|a);)l[e>>2]=l[t>>2],l[e+4>>2]=l[t+4>>2],l[e+8>>2]=l[t+8>>2],l[e+12>>2]=l[t+12>>2],l[e+16>>2]=l[t+16>>2],l[e+20>>2]=l[t+20>>2],l[e+24>>2]=l[t+24>>2],l[e+28>>2]=l[t+28>>2],l[e+32>>2]=l[t+32>>2],l[e+36>>2]=l[t+36>>2],l[e+40>>2]=l[t+40>>2],l[e+44>>2]=l[t+44>>2],l[e+48>>2]=l[t+48>>2],l[e+52>>2]=l[t+52>>2],l[e+56>>2]=l[t+56>>2],l[e+60>>2]=l[t+60>>2],e=e+64|0,t=t+64|0;for(;(0|e)<(0|i);)l[e>>2]=l[t>>2],e=e+4|0,t=t+4|0}else for(i=n-4|0;(0|e)<(0|i);)r[e>>0]=0|r[t>>0],r[e+1>>0]=0|r[t+1>>0],r[e+2>>0]=0|r[t+2>>0],r[e+3>>0]=0|r[t+3>>0],e=e+4|0,t=t+4|0;for(;(0|e)<(0|n);)r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0;return 0|o}function ee(e,t,i){t|=0,i|=0;var n,r,o,a,s,u=0,c=0,h=0,d=0,f=0,p=0;s=y,y=y+48|0,a=s+16|0,h=s,c=s+32|0,u=0|l[(r=(e|=0)+28|0)>>2],l[c>>2]=u,u=(0|l[(o=e+20|0)>>2])-u|0,l[c+4>>2]=u,l[c+8>>2]=t,l[c+12>>2]=i,u=u+i|0,n=e+60|0,l[h>>2]=l[n>>2],l[h+4>>2]=c,l[h+8>>2]=2,h=0|Ge(0|U(146,0|h));e:do{if((0|u)!=(0|h)){for(t=2;!((0|h)<0);)if(u=u-h|0,t=((f=h>>>0>(p=0|l[c+4>>2])>>>0)<<31>>31)+t|0,p=h-(f?p:0)|0,l[(c=f?c+8|0:c)>>2]=(0|l[c>>2])+p,l[(f=c+4|0)>>2]=(0|l[f>>2])-p,l[a>>2]=l[n>>2],l[a+4>>2]=c,l[a+8>>2]=t,(0|u)==(0|(h=0|Ge(0|U(146,0|a))))){d=3;break e}l[e+16>>2]=0,l[r>>2]=0,l[o>>2]=0,l[e>>2]=32|l[e>>2],i=2==(0|t)?0:i-(0|l[c+4>>2])|0}else d=3}while(0);return 3==(0|d)&&(p=0|l[e+44>>2],l[e+16>>2]=p+(0|l[e+48>>2]),l[r>>2]=p,l[o>>2]=p),y=s,0|i}function te(e,t,i){e|=0,t|=0,i|=0;var n,o,a,s,u,c=0,h=0,d=0,f=0,p=0,_=0,m=0;u=y,y=y+224|0,n=u+120|0,a=u,s=u+136|0,h=(c=o=u+80|0)+40|0;do{l[c>>2]=0,c=c+4|0}while((0|c)<(0|h));return l[n>>2]=l[i>>2],(0|V(0,t,n,a,o))<0?i=-1:(l[e+76>>2],m=32&(i=0|l[e>>2]),(0|r[e+74>>0])<1&&(l[e>>2]=-33&i),0|l[(c=e+48|0)>>2]?i=0|V(e,t,n,a,o):(d=0|l[(h=e+44|0)>>2],l[h>>2]=s,l[(f=e+28|0)>>2]=s,l[(p=e+20|0)>>2]=s,l[c>>2]=80,l[(_=e+16|0)>>2]=s+80,i=0|V(e,t,n,a,o),d&&(at[7&l[e+36>>2]](e,0,0),i=0==(0|l[p>>2])?-1:i,l[h>>2]=d,l[c>>2]=0,l[_>>2]=0,l[f>>2]=0,l[p>>2]=0)),c=0|l[e>>2],l[e>>2]=c|m,i=0==(32&c|0)?i:-1),y=u,0|i}function ie(e,t,i,n){t|=0,i|=0,n|=0;var o,s,u,c,h,d,f,p=0,_=0;f=y,y=y+64|0,h=f,_=0|l[(e|=0)>>2],d=e+(0|l[_+-8>>2])|0,_=0|l[_+-4>>2],l[h>>2]=i,l[h+4>>2]=e,l[h+8>>2]=t,l[h+12>>2]=n,t=h+20|0,n=h+24|0,o=h+28|0,s=h+32|0,u=h+40|0,c=(p=e=h+16|0)+36|0;do{l[p>>2]=0,p=p+4|0}while((0|p)<(0|c));a[e+36>>1]=0,r[e+38>>0]=0;e:do{if(0|He(_,i))l[h+48>>2]=1,dt[3&l[20+(0|l[_>>2])>>2]](_,h,d,d,1,0),e=1==(0|l[n>>2])?d:0;else{switch(st[3&l[24+(0|l[_>>2])>>2]](_,h,d,1,0),0|l[h+36>>2]){case 0:e=1==(0|l[u>>2])&1==(0|l[o>>2])&1==(0|l[s>>2])?0|l[t>>2]:0;break e;case 1:break;default:e=0;break e}if(1!=(0|l[n>>2])&&!(0==(0|l[u>>2])&1==(0|l[o>>2])&1==(0|l[s>>2]))){e=0;break}e=0|l[e>>2]}}while(0);return y=f,0|e}function ne(e){var t,i=0,n=0,r=0,o=0,a=0,s=0,u=0;if(t=y,y=y+544|0,s=t+16|0,i=t,o=t+32|0,((n=0|l[(a=(e|=0)+8|0)>>2])+-1|0)>>>0>=8192&&(l[i>>2]=866,l[i+4>>2]=3006,l[i+8>>2]=1257,Oe(o,812,i),$e(o)),l[e>>2]=n,(i=0|l[(r=e+20|0)>>2])?u=n:((i=0|he(180,0))?(l[(u=i+164|0)>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0):i=0,l[r>>2]=i,u=0|l[e>>2]),0|l[a>>2]?s=u:(l[s>>2]=866,l[s+4>>2]=910,l[s+8>>2]=1497,Oe(o,812,s),$e(o),s=0|l[e>>2]),o=0|l[e+4>>2],!(s>>>0>16))return e=0|W(i,u,o,e=0),y=t,0|e;for(n=s,r=0;a=r+1|0,n>>>0>3;)n>>>=1,r=a;return e=0|W(i,u,o,e=255&((e=r+2+(32!=(0|a)&1<<a>>>0<s>>>0&1)|0)>>>0<11?e:11)),y=t,0|e}function re(e){var t,i,n,r,o,a,s=0,u=0;a=y,y=y+576|0,r=a+48|0,o=a+32|0,i=a+16|0,t=a,n=a+64|0,s=0|l[(e|=0)+168>>2];do{if(0|s){if(u=0|l[s+-4>>2],s=s+-8|0,0!=(0|u)&&(0|u)==(0|~l[s>>2])||(l[t>>2]=866,l[t+4>>2]=651,l[t+8>>2]=1579,Oe(n,812,t),$e(n)),7&s){l[i>>2]=866,l[i+4>>2]=2506,l[i+8>>2]=1232,Oe(n,812,i),$e(n);break}_e(s,0,0,1,0);break}}while(0);if(s=0|l[e+176>>2])return u=0|l[s+-4>>2],s=s+-8|0,0!=(0|u)&&(0|u)==(0|~l[s>>2])||(l[o>>2]=866,l[o+4>>2]=651,l[o+8>>2]=1579,Oe(n,812,o),$e(n)),7&s?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1232,Oe(n,812,r),$e(n),void(y=a)):(_e(s,0,0,1,0),void(y=a));y=a}function oe(e,t,i){var n=0;return!(0!=(0|(e|=0))&(t|=0)>>>0>73&0!=(0|(i|=0)))||40!=(0|l[i>>2])||18552!=((0|c[e>>0])<<8|0|c[e+1>>0]|0)||((0|c[e+2>>0])<<8|0|c[e+3>>0])>>>0<74||((0|c[e+7>>0])<<16|(0|c[e+6>>0])<<24|(0|c[e+8>>0])<<8|0|c[e+9>>0])>>>0>t>>>0?0|(i=0):(l[i+4>>2]=(0|c[e+12>>0])<<8|0|c[e+13>>0],l[i+8>>2]=(0|c[e+14>>0])<<8|0|c[e+15>>0],l[i+12>>2]=c[e+16>>0],l[i+16>>2]=c[e+17>>0],t=e+18|0,l[(n=i+32|0)>>2]=c[t>>0],l[n+4>>2]=0,t=0|r[t>>0],l[i+20>>2]=t<<24>>24==0|t<<24>>24==9?8:16,l[i+24>>2]=(0|c[e+26>>0])<<16|(0|c[e+25>>0])<<24|(0|c[e+27>>0])<<8|0|c[e+28>>0],l[i+28>>2]=(0|c[e+30>>0])<<16|(0|c[e+29>>0])<<24|(0|c[e+31>>0])<<8|0|c[e+32>>0],0|(i=1))}function ae(e,t){e|=0;var i,n,r,o=0,a=0,s=0,u=0,h=0;if(r=y,y=y+544|0,h=r+16|0,o=r,u=r+32|0,(t|=0)>>>0>=33&&(l[o>>2]=866,l[o+4>>2]=3199,l[o+8>>2]=1350,Oe(u,812,o),$e(u)),(0|(o=0|l[(n=e+20|0)>>2]))>=(0|t))return s=a=e+16|0,u=o,h=(a=0|l[a>>2])>>>(h=32-t|0),a<<=t,l[s>>2]=a,t=u-t|0,l[n>>2]=t,y=r,0|h;a=e+4|0,s=e+8|0,i=e+16|0;do{(0|(e=0|l[a>>2]))==(0|l[s>>2])?e=0:(l[a>>2]=e+1,e=0|c[e>>0]),o=o+8|0,l[n>>2]=o,(0|o)>=33&&(l[h>>2]=866,l[h+4>>2]=3208,l[h+8>>2]=1366,Oe(u,812,h),$e(u),o=0|l[n>>2]),e=e<<32-o|l[i>>2],l[i>>2]=e}while((0|o)<(0|t));return h=e>>>(h=32-t|0),u=e<<t,l[i>>2]=u,t=o-t|0,l[n>>2]=t,y=r,0|h}function se(e,t,i){e|=0;var n=0,o=0,a=0,s=0;a=255&(t|=0),n=0!=(0|(i|=0));e:do{if(n&0!=(3&e|0))for(o=255&t;;){if((0|r[e>>0])==o<<24>>24){s=6;break e}if(!((n=0!=(0|(i=i+-1|0)))&0!=(3&(e=e+1|0)|0))){s=5;break}}else s=5}while(0);5==(0|s)&&(n?s=6:i=0);e:do{if(6==(0|s)&&(o=255&t,(0|r[e>>0])!=o<<24>>24)){n=0|T(a,16843009);t:do{if(i>>>0>3){for(;!((-2139062144&(a=l[e>>2]^n)^-2139062144)&a+-16843009|0);)if(e=e+4|0,(i=i+-4|0)>>>0<=3){s=11;break t}}else s=11}while(0);if(11==(0|s)&&!i){i=0;break}for(;;){if((0|r[e>>0])==o<<24>>24)break e;if(e=e+1|0,!(i=i+-1|0)){i=0;break}}}}while(0);return 0|(0|i?e:0)}function le(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0;var o,a,s,u=0,h=0,d=0;return s=y,y=y+528|0,d=s,h=s+16|0,o=0|l[(e|=0)+88>>2],a=(0|c[o+70+(r<<2)+1>>0])<<16|(0|c[o+70+(r<<2)>>0])<<24|(0|c[o+70+(r<<2)+2>>0])<<8|0|c[o+70+(r<<2)+3>>0],(u=(u=r+1|0)>>>0<(0|c[o+16>>0])>>>0?(0|c[o+70+(u<<2)+1>>0])<<16|(0|c[o+70+(u<<2)>>0])<<24|(0|c[o+70+(u<<2)+2>>0])<<8|0|c[o+70+(u<<2)+3>>0]:0|l[e+8>>2])>>>0>a>>>0?(d=0|Z(e,h=(h=0|l[(h=e+4|0)>>2])+a|0,d=u-a|0,t,i,n,r),y=s,0|d):(l[d>>2]=866,l[d+4>>2]=3694,l[d+8>>2]=1508,Oe(h,812,d),$e(h),d=0|Z(e,h=(h=0|l[(h=e+4|0)>>2])+a|0,d=u-a|0,t,i,n,r),y=s,0|d)}function ue(e,t,i){e|=0,t|=0;var n=0,o=0,a=0,s=0,u=0;(o=0|l[(n=(i|=0)+16|0)>>2])?a=5:0|Te(i)?n=0:(o=0|l[n>>2],a=5);e:do{if(5==(0|a)){if(n=s=0|l[(u=i+20|0)>>2],(o-s|0)>>>0<t>>>0){n=0|at[7&l[i+36>>2]](i,e,t);break}t:do{if((0|r[i+75>>0])>-1){for(s=t;;){if(!s){a=0,o=e;break t}if(10==(0|r[e+(o=s+-1|0)>>0]))break;s=o}if((n=0|at[7&l[i+36>>2]](i,e,s))>>>0<s>>>0)break e;a=s,o=e+s|0,t=t-s|0,n=0|l[u>>2]}else a=0,o=e}while(0);J(0|n,0|o,0|t),l[u>>2]=(0|l[u>>2])+t,n=a+t|0}}while(0);return 0|n}function ce(e){var t,i,n=0,o=0,a=0;i=y,y=y+544|0,a=i+16|0,o=i,t=i+32|0,n=0|l[(e|=0)+20>>2];do{if(0|n){if(re(n),7&n){l[o>>2]=866,l[o+4>>2]=2506,l[o+8>>2]=1232,Oe(t,812,o),$e(t);break}_e(n,0,0,1,0);break}}while(0);if(!(o=0|l[(n=e+4|0)>>2]))return r[(a=e+16|0)>>0]=0,void(y=i);7&o?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1232,Oe(t,812,a),$e(t)):_e(o,0,0,1,0),l[n>>2]=0,l[e+8>>2]=0,l[e+12>>2]=0,r[(a=e+16|0)>>0]=0,y=i}function he(e,t){t|=0;var i,n,r,o,a=0,s=0,u=0;return o=y,y=y+560|0,u=o+32|0,r=o+16|0,a=o,n=o+48|0,i=o+44|0,(s=0|(s=(e|=0)+3&-4)?s:4)>>>0>2147418112?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1103,Oe(n,812,a),$e(n),y=o,0|(u=0)):(l[i>>2]=s,e=0|_e(0,s,i,1,0),a=0|l[i>>2],0|t&&(l[t>>2]=a),0==(0|e)|a>>>0<s>>>0?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1129,Oe(n,812,r),$e(n),e=0):7&e&&(l[u>>2]=866,l[u+4>>2]=2533,l[u+8>>2]=1156,Oe(n,812,u),$e(n)),y=o,0|(u=e))}function de(e,t,i){t|=0;var n,o=0,a=0,s=0;if(n=(e|=0)+(i|=0)|0,t&=255,(0|i)>=67){for(;3&e;)r[e>>0]=t,e=e+1|0;for(a=(o=-4&n|0)-64|0,s=t|t<<8|t<<16|t<<24;(0|e)<=(0|a);)l[e>>2]=s,l[e+4>>2]=s,l[e+8>>2]=s,l[e+12>>2]=s,l[e+16>>2]=s,l[e+20>>2]=s,l[e+24>>2]=s,l[e+28>>2]=s,l[e+32>>2]=s,l[e+36>>2]=s,l[e+40>>2]=s,l[e+44>>2]=s,l[e+48>>2]=s,l[e+52>>2]=s,l[e+56>>2]=s,l[e+60>>2]=s,e=e+64|0;for(;(0|e)<(0|o);)l[e>>2]=s,e=e+4|0}for(;(0|e)<(0|n);)r[e>>0]=t,e=e+1|0;return n-i|0}function fe(e,t,i,n,o){e|=0,i|=0,n|=0,o|=0;var a=0,s=0,u=0,c=0;r[(t|=0)+53>>0]=1;do{if((0|l[t+4>>2])==(0|n)){if(r[t+52>>0]=1,u=t+54|0,c=t+48|0,s=t+24|0,e=t+36|0,!(a=0|l[(n=t+16|0)>>2])){if(l[n>>2]=i,l[s>>2]=o,l[e>>2]=1,!(1==(0|l[c>>2])&1==(0|o)))break;r[u>>0]=1;break}if((0|a)!=(0|i)){l[e>>2]=1+(0|l[e>>2]),r[u>>0]=1;break}2==(0|(e=0|l[s>>2]))&&(l[s>>2]=o,e=o),1==(0|l[c>>2])&1==(0|e)&&(r[u>>0]=1)}}while(0)}function pe(e,t){e|=0;var i,n,o,a=0,s=0,u=0,h=0;o=y,y=y+16|0,n=255&(t|=0),r[(i=o)>>0]=n,(u=0|l[(s=e+16|0)>>2])?h=4:0|Te(e)?a=-1:(u=0|l[s>>2],h=4);do{if(4==(0|h)){if((s=0|l[(h=e+20|0)>>2])>>>0<u>>>0&&(0|(a=255&t))!=(0|r[e+75>>0])){l[h>>2]=s+1,r[s>>0]=n;break}a=1==(0|at[7&l[e+36>>2]](e,i,1))?0|c[i>>0]:-1}}while(0);return y=o,0|a}function _e(e,t,i,n,r){e|=0,t|=0,i|=0,n|=0,r|=0;do{if(e){if(!t){if(H(e),!i){t=0;break}l[i>>2]=0,t=0;break}n?e=0==(0|(t=0|ve(e,t)))?e:t:t=0,i&&(r=0|Re(e),l[i>>2]=r)}else t=0|G(t),i&&(e=t?0|Re(t):0,l[i>>2]=e)}while(0);return 0|t}function me(e,t){e=+e,t|=0;var i,n,r=0;switch(m[v>>3]=e,2047&(n=0|De(0|(r=0|l[v>>2]),0|(i=0|l[v+4>>2]),52))){case 0:0!=e?(e=+me(0x10000000000000000*e,t),r=(0|l[t>>2])-64|0):r=0,l[t>>2]=r;break;case 2047:break;default:l[t>>2]=(2047&n)-1022,l[v>>2]=r,l[v+4>>2]=-2146435073&i|1071644672,e=+m[v>>3]}return+e}function ge(e,t){e|=0,t|=0;var i=0,n=0;for(n=0;;){if((0|c[2140+n>>0])==(0|e)){e=2;break}if(87==(0|(i=n+1|0))){i=2228,n=87,e=5;break}n=i}if(2==(0|e)&&(n?(i=2228,e=5):i=2228),5==(0|e))for(;;){do{e=i,i=i+1|0}while(0!=(0|r[e>>0]));if(!(n=n+-1|0))break;e=5}return 0|function(e,t){return 0|function(e,t){return e|=0,t=(t|=0)?0|function(e,t,i){t|=0,i|=0;var n,o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0;n=1794895138+(0|l[(e|=0)>>2])|0,s=0|qe(0|l[e+8>>2],n),o=0|qe(0|l[e+12>>2],n),a=0|qe(0|l[e+16>>2],n);e:do{if(s>>>0<t>>>2>>>0&&(p=t-(s<<2)|0,o>>>0<p>>>0&a>>>0<p>>>0)&&0==(3&(a|o)|0)){for(p=o>>>2,f=a>>>2,d=0;;){if(o=0|qe(0|l[e+((a=(u=(h=d+(c=s>>>1)|0)<<1)+p|0)<<2)>>2],n),!((a=0|qe(0|l[e+(a+1<<2)>>2],n))>>>0<t>>>0&o>>>0<(t-a|0)>>>0)){o=0;break e}if(0|r[e+(a+o)>>0]){o=0;break e}if(!(o=0|Ce(i,e+a|0)))break;if(o=(0|o)<0,1==(0|s)){o=0;break e}d=o?d:h,s=o?c:s-c|0}a=0|qe(0|l[e+((o=u+f|0)<<2)>>2],n),o=(o=0|qe(0|l[e+(o+1<<2)>>2],n))>>>0<t>>>0&a>>>0<(t-o|0)>>>0&&0==(0|r[e+(o+a)>>0])?e+o|0:0}else o=0}while(0);return 0|o}(0|l[t>>2],0|l[t+4>>2],e):0,0|(0|t?t:e)}(e|=0,t|=0)}(i,0|l[t+20>>2])}function xe(e,t,i){i|=0;var n=0;if((t|=0)>>>0>0|0==(0|t)&(e|=0)>>>0>4294967295){for(;n=0|Me(0|e,0|t,10,0),r[(i=i+-1|0)>>0]=255&n|48,n=e,e=0|je(0|e,0|t,10,0),t>>>0>9|9==(0|t)&n>>>0>4294967295;)t=b;t=e}else t=e;if(t)for(;r[(i=i+-1|0)>>0]=48|(t>>>0)%10,!(t>>>0<10);)t=(t>>>0)/10|0;return 0|i}function ve(e,t){t|=0;var i=0,n=0;return(e|=0)?t>>>0>4294967231?(t=0|tt(),l[t>>2]=12,0|(t=0)):(i=0|function(e,t){t|=0;var i,n=0,r=0,o=0,a=0,s=0,u=0,c=0,h=0,d=0;if(i=(e|=0)+(n=-8&(h=0|l[(d=e+4|0)>>2]))|0,!(3&h))return t>>>0<256?0|(e=0):(n>>>0>=(t+4|0)>>>0&&(n-t|0)>>>0<=l[1264]<<1>>>0||(e=0),0|e);if(n>>>0>=t>>>0)return(n=n-t|0)>>>0<=15||(c=e+t|0,l[d>>2]=1&h|t|2,l[c+4>>2]=3|n,l[(d=c+n+4|0)>>2]=1|l[d>>2],q(c,n)),0|e;if((0|i)==(0|l[1150]))return n=(c=(0|l[1147])+n|0)-t|0,r=e+t|0,c>>>0<=t>>>0?0|(e=0):(l[d>>2]=1&h|t|2,l[r+4>>2]=1|n,l[1150]=r,l[1147]=n,0|e);if((0|i)==(0|l[1149]))return(o=(0|l[1146])+n|0)>>>0<t>>>0?0|(e=0):(r=1&h,(n=o-t|0)>>>0>15?(c=(h=e+t|0)+n|0,l[d>>2]=r|t|2,l[h+4>>2]=1|n,l[c>>2]=n,l[(r=c+4|0)>>2]=-2&l[r>>2],r=h):(l[d>>2]=r|o|2,l[(r=e+o+4|0)>>2]=1|l[r>>2],r=0,n=0),l[1146]=n,l[1149]=r,0|e);if(2&(r=0|l[i+4>>2])|0||(u=(-8&r)+n|0)>>>0<t>>>0)return 0;c=u-t|0,o=r>>>3;do{if(r>>>0<256){if(r=0|l[i+8>>2],(0|(n=0|l[i+12>>2]))==(0|r)){l[1144]=l[1144]&~(1<<o);break}l[r+12>>2]=n,l[n+8>>2]=r;break}s=0|l[i+24>>2],n=0|l[i+12>>2];do{if((0|n)==(0|i)){if(n=0|l[(r=4+(o=i+16|0)|0)>>2])a=r;else{if(!(n=0|l[o>>2])){o=0;break}a=o}for(;;)if(0|(r=0|l[(o=n+20|0)>>2]))n=r,a=o;else{if(!(o=0|l[(r=n+16|0)>>2]))break;n=o,a=r}l[a>>2]=0,o=n}else o=0|l[i+8>>2],l[o+12>>2]=n,l[n+8>>2]=o,o=n}while(0);if(0|s){if(n=0|l[i+28>>2],(0|i)==(0|l[(r=4880+(n<<2)|0)>>2])){if(l[r>>2]=o,!o){l[1145]=l[1145]&~(1<<n);break}}else if(l[s+16+(((0|l[s+16>>2])!=(0|i)&1)<<2)>>2]=o,!o)break;l[o+24>>2]=s,0|(r=0|l[(n=i+16|0)>>2])&&(l[o+16>>2]=r,l[r+24>>2]=o),0|(n=0|l[n+4>>2])&&(l[o+20>>2]=n,l[n+24>>2]=o)}}while(0);return n=1&h,c>>>0<16?(l[d>>2]=u|n|2,l[(d=e+u+4|0)>>2]=1|l[d>>2],0|e):(h=e+t|0,l[d>>2]=n|t|2,l[h+4>>2]=3|c,l[(d=h+c+4|0)>>2]=1|l[d>>2],q(h,c),0|e)}(e+-8|0,t>>>0<11?16:t+11&-8),0|i?0|(t=i+8|0):(i=0|G(t))?(J(0|i,0|e,0|((n=(-8&(n=0|l[e+-4>>2]))-(0==(3&n|0)?8:4)|0)>>>0<t>>>0?n:t)),H(e),0|(t=i)):0|(t=0)):0|(t=0|G(t))}function ye(e,t,i,n){e|=0,i|=0,n|=0;var o,a,s;o=0|l[(e=(t|=0)+16|0)>>2],a=t+36|0,s=t+24|0;do{if(o){if((0|o)!=(0|i)){l[a>>2]=1+(0|l[a>>2]),l[s>>2]=2,r[t+54>>0]=1;break}2==(0|l[s>>2])&&(l[s>>2]=n)}else l[e>>2]=i,l[s>>2]=n,l[a>>2]=1}while(0)}function $e(e){e|=0;var t,i=0,n=0;t=0|l[119],l[t+76>>2];do{if((0|ze(e,t))<0)e=1;else{if(10!=(0|r[t+75>>0])&&(n=0|l[(i=t+20|0)>>2])>>>0<(0|l[t+16>>2])>>>0){l[i>>2]=n+1,r[n>>0]=10,e=0;break}e=(0|pe(t,10))<0}}while(0);return e<<31>>31|0}function be(e,t,i,n,r){e|=0,t|=0;var o,a;if(a=y,y=y+256|0,o=a,(0|(i|=0))>(0|(n|=0))&0==(73728&(r|=0)|0)){if(de(0|o,0|t,0|((r=i-n|0)>>>0<256?r:256)),r>>>0>255){t=i-n|0;do{Ve(e,o,256),r=r+-256|0}while(r>>>0>255);r=255&t}Ve(e,o,r)}y=a}function Te(e){var t=0,i=0;return i=0|r[(t=(e|=0)+74|0)>>0],r[t>>0]=i+255|i,8&(t=0|l[e>>2])?(l[e>>2]=32|t,e=-1):(l[e+8>>2]=0,l[e+4>>2]=0,i=0|l[e+44>>2],l[e+28>>2]=i,l[e+20>>2]=i,l[e+16>>2]=i+(0|l[e+48>>2]),e=0),0|e}function Ce(e,t){t|=0;var i=0,n=0;if(i=0|r[(e|=0)>>0],n=0|r[t>>0],i<<24>>24==0||i<<24>>24!=n<<24>>24)e=n;else{do{t=t+1|0,i=0|r[(e=e+1|0)>>0],n=0|r[t>>0]}while(i<<24>>24!=0&&i<<24>>24==n<<24>>24);e=n}return(255&i)-(255&e)|0}function Se(e){var t,i;return(0|(i=(e|=0)+15&-16|0))>0&(0|(e=(t=0|l[x>>2])+i|0))<(0|t)|(0|e)<0?(P(),O(12),-1):(l[x>>2]=e,(0|e)>(0|E())&&0==(0|w())?(l[x>>2]=t,O(12),-1):0|t)}function we(e){var t=0,i=0,n=0;if(i=0|l[(e|=0)>>2],(n=(0|r[i>>0])-48|0)>>>0<10){t=0;do{t=n+(10*t|0)|0,i=i+1|0,l[e>>2]=i,n=(0|r[i>>0])-48|0}while(n>>>0<10)}else t=0;return 0|t}function Ee(e,t,i,n){if(i|=0,n|=0,!(0==(0|(e|=0))&0==(0|(t|=0))))do{r[(i=i+-1|0)>>0]=0|c[2122+(15&e)>>0]|n,e=0|De(0|e,0|t,4),t=b}while(!(0==(0|e)&0==(0|t)));return 0|i}function Pe(e){var t=0;return(0|(t=0|r[$+(255&(e|=0))>>0]))<8?0|t:(0|(t=0|r[$+(e>>8&255)>>0]))<8?t+8|0:(0|(t=0|r[$+(e>>16&255)>>0]))<8?t+16|0:24+(0|r[$+(e>>>24)>>0])|0}function Ae(e,t,i,n){i|=0,n|=0;var r=0;(0|l[(t|=0)+4>>2])==(0|i)&&1!=(0|l[(r=t+28|0)>>2])&&(l[r>>2]=n)}function Le(e,t,i){if(i|=0,!(0==(0|(e|=0))&0==(0|(t|=0))))do{r[(i=i+-1|0)>>0]=7&e|48,e=0|De(0|e,0|t,3),t=b}while(!(0==(0|e)&0==(0|t)));return 0|i}function Me(e,t,i,n){var r,o;return o=y,y=y+16|0,j(e|=0,t|=0,i|=0,n|=0,r=0|o),y=o,b=0|l[r+4>>2],0|l[r>>2]}function Re(e){var t=0;return(e|=0)?0|(1==(0|(e=3&(t=0|l[e+-4>>2])))?0:(-8&t)-(0==(0|e)?8:4)|0):0}function Oe(e,t,i){e|=0,t|=0,i|=0;var n,o;return n=y,y=y+16|0,l[(o=n)>>2]=i,i=0|function(e,t,i){return 0|function(e,t,i,n){e|=0,t|=0,i|=0,n|=0;var o,a,s=0,u=0,c=0,h=0,d=0;a=y,y=y+128|0,s=a+124|0,c=604,o=(u=d=a)+124|0;do{l[u>>2]=l[c>>2],u=u+4|0,c=c+4|0}while((0|u)<(0|o));return(t+-1|0)>>>0>2147483646?t?(t=0|tt(),l[t>>2]=75,t=-1):(e=s,t=1,h=4):h=4,4==(0|h)&&(h=t>>>0>(h=-2-e|0)>>>0?h:t,l[d+48>>2]=h,l[(s=d+20|0)>>2]=e,l[d+44>>2]=e,t=e+h|0,l[(e=d+16|0)>>2]=t,l[d+28>>2]=t,t=0|te(d,i,n),h&&(d=0|l[s>>2],r[d+(((0|d)==(0|l[e>>2]))<<31>>31)>>0]=0)),y=a,0|t}(e|=0,2147483647,t|=0,i|=0)}(e,t,o),y=n,0|i}function Ie(e,t,i){return e|=0,t|=0,(0|(i|=0))<32?(b=t<<i|(e&(1<<i)-1<<32-i)>>>32-i,e<<i):(b=e<<i-32,0)}function De(e,t,i){return e|=0,t|=0,(0|(i|=0))<32?(b=t>>>i,e>>>i|(t&(1<<i)-1)<<32-i):(b=0,t>>>i-32|0)}function Be(e,t){e|=0,t|=0;var i;i=y,y=y+16|0,l[i>>2]=t,te(t=0|l[26],e,i),function(e,t){var i,n=0,o=0,a=0,s=0;i=255&(e|=0),n=255&e,l[76+(t|=0)>>2],s=3;do{if(3==(0|s)){if((0|n)!=(0|r[t+75>>0])&&(a=0|l[(o=t+20|0)>>2])>>>0<(0|l[t+16>>2])>>>0){l[o>>2]=a+1,r[a>>0]=i;break}n=0|pe(t,e)}}while(0)}(10,t),I()}function Ne(e,t,i,n){return b=n=(t|=0)-(n|=0)-((i|=0)>>>0>(e|=0)>>>0|0)>>>0,0|e-i>>>0}function Fe(e){e=+e;var t;return m[v>>3]=e,t=0|l[v>>2],b=0|l[v+4>>2],0|t}function Ue(e,t,i,n){return b=(t|=0)+(n|=0)+((i=(e|=0)+(i|=0)>>>0)>>>0<e>>>0|0)>>>0,0|i}function Ge(e){var t=0;return(e|=0)>>>0>4294963200&&(t=0|tt(),l[t>>2]=0-e,e=-1),0|e}function ze(e,t){t|=0;var i;return i=0|function(e){var t,i=0,n=0;t=e|=0;e:do{if(3&t)for(i=t;;){if(!(0|r[e>>0])){e=i;break e}if(!(3&(i=e=e+1|0))){n=4;break}}else n=4}while(0);if(4==(0|n)){for(;!((-2139062144&(i=0|l[e>>2])^-2139062144)&i+-16843009);)e=e+4|0;if((255&i)<<24>>24)do{e=e+1|0}while(0!=(0|r[e>>0]))}return e-t|0}(e|=0),((0|function(e,t,i,n){var r;return e|=0,n|=0,r=0|T(i|=0,t|=0),i=0==(0|t)?0:i,(0|(e=(l[n+76>>2],0|ue(e,r,n))))!=(0|r)&&(i=(e>>>0)/(t>>>0)|0),0|i}(e,1,i,t))!=(0|i))<<31>>31|0}function Ve(e,t,i){t|=0,i|=0,32&l[(e|=0)>>2]||ue(t,i,e)}function ke(e){e|=0;var t;return t=188+(0|it())|0,0|ge(e,0|l[t>>2])}function We(e,t){return t|=0,e=(e|=0)?0|function(e,t,i){e|=0,t|=0,i|=0;do{if(e){if(t>>>0<128){r[e>>0]=t,e=1;break}if(i=188+(0|it())|0,!(0|l[l[i>>2]>>2])){if(57216==(-128&t|0)){r[e>>0]=t,e=1;break}e=0|tt(),l[e>>2]=84,e=-1;break}if(t>>>0<2048){r[e>>0]=t>>>6|192,r[e+1>>0]=63&t|128,e=2;break}if(t>>>0<55296|57344==(-8192&t|0)){r[e>>0]=t>>>12|224,r[e+1>>0]=t>>>6&63|128,r[e+2>>0]=63&t|128,e=3;break}if((t+-65536|0)>>>0<1048576){r[e>>0]=t>>>18|240,r[e+1>>0]=t>>>12&63|128,r[e+2>>0]=t>>>6&63|128,r[e+3>>0]=63&t|128,e=4;break}e=0|tt(),l[e>>2]=84,e=-1;break}e=1}while(0);return 0|e}(e,t,0):0,0|e}function He(e,t,i){return(0|(e|=0))==(0|(t|=0))|0}function qe(e,t){t|=0;var i;return i=0|Ye(0|(e|=0)),0|(0==(0|t)?e:i)}function je(e,t,i,n){return 0|j(e|=0,t|=0,i|=0,n|=0,0)}function Ye(e){return(255&(e|=0))<<24|(e>>8&255)<<16|(e>>16&255)<<8|e>>>24|0}function Xe(e,t,i,n,r,o){S(6)}function Ke(e,t,i,n,r){S(1)}function Qe(e){(function(e){H(e|=0)})(e|=0)}function Ze(e,t,i,n){S(7)}function Je(e,t,i){return S(0),0}function et(e,t){return+ +me(e=+e,t|=0)}function tt(){return 64+(0|it())|0}function it(){return 232}function nt(e){}function rt(e){S(2)}function ot(){S(5)}t.__ZSt18uncaught_exceptionv;var at=[Je,ee,function(e,t,i){var n,r,o;return e|=0,t|=0,i|=0,r=y,y=y+32|0,n=r+20|0,l[(o=r)>>2]=l[e+60>>2],l[o+4>>2]=0,l[o+8>>2]=t,l[o+12>>2]=n,l[o+16>>2]=i,(0|Ge(0|F(140,0|o)))<0?(l[n>>2]=-1,e=-1):e=0|l[n>>2],y=r,0|e},function(e,t,i){t|=0,i|=0;var n,o=0;return n=y,y=y+32|0,o=n,l[(e|=0)+36>>2]=1,0==(64&l[e>>2]|0)&&(l[o>>2]=l[e+60>>2],l[o+4>>2]=21523,l[o+8>>2]=n+16,0|L(54,0|o))&&(r[e+75>>0]=-1),o=0|ee(e,t,i),y=n,0|o},function(e,t,i){var n,r;return t|=0,i|=0,J(0|(r=0|l[(n=(e|=0)+20|0)>>2]),0|t,0|(e=(e=(0|l[e+16>>2])-r|0)>>>0>i>>>0?i:e)),l[n>>2]=(0|l[n>>2])+e,0|i},function(e,t,i){i|=0;var n,r,o=0,a=0;if(r=y,y=y+64|0,n=r,0|He(e|=0,t|=0))t=1;else if(0!=(0|t)&&0!=(0|(a=0|ie(t,32,16,0)))){o=(t=n+4|0)+52|0;do{l[t>>2]=0,t=t+4|0}while((0|t)<(0|o));l[n>>2]=a,l[n+8>>2]=e,l[n+12>>2]=-1,l[n+48>>2]=1,ft[3&l[28+(0|l[a>>2])>>2]](a,n,0|l[i>>2],1),1==(0|l[n+24>>2])?(l[i>>2]=l[n+16>>2],t=1):t=0}else t=0;return y=r,0|t},Je,Je],st=[Ke,function(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0;var a=0;do{if(0|He(e,0|l[t+8>>2]))Ae(0,t,i,n);else if(0|He(e,0|l[t>>2])){if(e=t+32|0,(0|l[t+16>>2])!=(0|i)&&(0|l[(a=t+20|0)>>2])!=(0|i)){l[e>>2]=n,l[a>>2]=i,l[(n=t+40|0)>>2]=1+(0|l[n>>2]),1==(0|l[t+36>>2])&&2==(0|l[t+24>>2])&&(r[t+54>>0]=1),l[t+44>>2]=4;break}1==(0|n)&&(l[e>>2]=1)}}while(0)},function(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0,o|=0;var a=0,s=0,u=0,c=0;do{if(0|He(e,0|l[t+8>>2]))Ae(0,t,i,n);else{if(a=e+8|0,!(0|He(e,0|l[t>>2]))){u=0|l[a>>2],st[3&l[24+(0|l[u>>2])>>2]](u,t,i,n,o);break}if(e=t+32|0,(0|l[t+16>>2])!=(0|i)&&(0|l[(s=t+20|0)>>2])!=(0|i)){if(l[e>>2]=n,4==(0|l[(n=t+44|0)>>2]))break;r[(e=t+52|0)>>0]=0,r[(c=t+53|0)>>0]=0,a=0|l[a>>2],dt[3&l[20+(0|l[a>>2])>>2]](a,t,i,i,1,o),0|r[c>>0]?0|r[e>>0]?e=3:(e=3,u=11):(e=4,u=11),11==(0|u)&&(l[s>>2]=i,l[(c=t+40|0)>>2]=1+(0|l[c>>2]),1==(0|l[t+36>>2])&&2==(0|l[t+24>>2])&&(r[t+54>>0]=1)),l[n>>2]=e;break}1==(0|n)&&(l[e>>2]=1)}}while(0)},Ke],lt=[rt,nt,Qe,nt,nt,Qe,function(e){var t;t=y,y=y+16|0,H(e|=0),0|M(0|l[1285],0)?Be(4406,t):y=t},rt],ut=[function(e){return S(3),0},function(e){var t,i;return t=y,y=y+16|0,i=t,e=0|function(e){return 0|(e|=0)}(0|l[(e|=0)+60>>2]),l[i>>2]=e,e=0|Ge(0|R(6,0|i)),y=t,0|e}],ct=[function(e,t,i){S(4)}],ht=[ot,function(){var e,t,i,n=0,r=0,o=0,a=0,s=0;a=y,y=y+48|0,i=a+32|0,e=a+24|0,s=a+16|0,t=a,a=a+36|0,n=0|function(){var e=0,t=0;if(e=y,y=y+16|0,!(0|D(5136,2)))return t=0|A(0|l[1285]),y=e,0|t;Be(4307,e);return 0}(),0|n&&0|(o=0|l[n>>2])&&(1126902528==(-256&(r=0|l[(n=o+48|0)>>2])|0)&1129074247==(0|(n=0|l[n+4>>2]))||(l[e>>2]=4168,Be(4118,e)),n=1126902529==(0|r)&1129074247==(0|n)?0|l[o+44>>2]:o+80|0,l[a>>2]=n,o=0|l[o>>2],n=0|l[o+4>>2],0|at[7&l[16+(0|l[2])>>2]](8,o,a)?(s=0|l[a>>2],s=0|ut[1&l[8+(0|l[s>>2])>>2]](s),l[t>>2]=4168,l[t+4>>2]=n,l[t+8>>2]=s,Be(4032,t)):(l[s>>2]=4168,l[s+4>>2]=n,Be(4077,s))),Be(4156,i)},function(){var e;e=y,y=y+16|0,0|N(5140,6)?Be(4356,e):y=e},ot],dt=[Xe,function(e,t,i,n,r,o){i|=0,n|=0,r|=0,0|He(e|=0,0|l[(t|=0)+8>>2])&&fe(0,t,i,n,r)},function(e,t,i,n,r,o){i|=0,n|=0,r|=0,o|=0,0|He(e|=0,0|l[(t|=0)+8>>2])?fe(0,t,i,n,r):(e=0|l[e+8>>2],dt[3&l[20+(0|l[e>>2])>>2]](e,t,i,n,r,o))},Xe],ft=[Ze,function(e,t,i,n){i|=0,n|=0,0|He(e|=0,0|l[(t|=0)+8>>2])&&ye(0,t,i,n)},function(e,t,i,n){i|=0,n|=0,0|He(e|=0,0|l[(t|=0)+8>>2])?ye(0,t,i,n):(e=0|l[e+8>>2],ft[3&l[28+(0|l[e>>2])>>2]](e,t,i,n))},Ze];return{stackSave:function(){return 0|y},_i64Subtract:Ne,_crn_get_bytes_per_block:function(e,t){e|=0,t|=0;var i,n,r,o=0;switch(r=y,y=y+576|0,n=r+40|0,i=r+56|0,l[(o=r)>>2]=40,oe(e,t,o),e=0|l[(t=o+32|0)+4>>2],0|l[t>>2]){case 0:case 9:case 10:if(!e)return y=r,0|(o=8);e=14;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:e=e?14:13;break;default:e=14}return 13==(0|e)?(y=r,0|(o=16)):14==(0|e)?(l[n>>2]=866,l[n+4>>2]=2672,l[n+8>>2]=1251,Oe(i,812,n),$e(i),y=r,0|(o=0)):0},setThrew:function(e,t){},dynCall_viii:function(e,t,i,n){t|=0,i|=0,n|=0,ct[0&(e|=0)](0|t,0|i,0|n)},_bitshift64Lshr:De,_bitshift64Shl:Ie,dynCall_viiii:function(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0,ft[3&(e|=0)](0|t,0|i,0|n,0|r)},setTempRet0:function(e){b=e|=0},_crn_decompress:function(e,t,i,n,o,s){e|=0,t|=0,i|=0,n|=0,o|=0,s|=0;var u,h,d,f,p=0,_=0,m=0,g=0,x=0;switch(f=y,y=y+592|0,d=f+56|0,m=f+40|0,u=f+72|0,h=f+68|0,l[(x=f)>>2]=40,oe(e,t,x),p=(0|l[x+4>>2])>>>o,_=(0|l[x+8>>2])>>>o,n=0|l[(x=x+32|0)+4>>2],0|l[x>>2]){case 0:case 9:case 10:n?g=14:x=8;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:g=n?14:13;break;default:g=14}13==(0|g)?x=16:14==(0|g)&&(l[m>>2]=866,l[m+4>>2]=2672,l[m+8>>2]=1251,Oe(u,812,m),$e(u),x=0),l[h>>2]=i,g=0|function(e,t){var i=0,n=0,o=0,s=0,u=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0;if(m=y,y=y+528|0,p=m,h=m+16|0,0==(0|(e|=0))|(t|=0)>>>0<62||!(d=0|he(300,0)))return y=m,0|(g=0);l[d>>2]=519686845,l[d+4>>2]=0,l[d+8>>2]=0,f=d+88|0,i=d+136|0,n=d+160|0,o=d+184|0,s=d+208|0,u=d+232|0,l[(_=d+252|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,l[(_=d+268|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,l[(_=d+284|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,g=(_=f)+44|0;do{l[_>>2]=0,_=_+4|0}while((0|_)<(0|g));return r[f+44>>0]=0,l[i>>2]=0,l[i+4>>2]=0,l[i+8>>2]=0,l[i+12>>2]=0,l[i+16>>2]=0,r[i+20>>0]=0,l[n>>2]=0,l[n+4>>2]=0,l[n+8>>2]=0,l[n+12>>2]=0,l[n+16>>2]=0,r[n+20>>0]=0,l[o>>2]=0,l[o+4>>2]=0,l[o+8>>2]=0,l[o+12>>2]=0,l[o+16>>2]=0,r[o+20>>0]=0,l[s>>2]=0,l[s+4>>2]=0,l[s+8>>2]=0,l[s+12>>2]=0,l[s+16>>2]=0,r[s+20>>0]=0,l[u>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0,r[u+16>>0]=0,0|function(e,t,i){e|=0;var n=0,o=0;return!(0==(0|(t|=0))|(i|=0)>>>0<74)&&18552==((0|c[t>>0])<<8|0|c[t+1>>0]|0)&&((0|c[t+2>>0])<<8|0|c[t+3>>0])>>>0>=74&&((0|c[t+7>>0])<<16|(0|c[t+6>>0])<<24|(0|c[t+8>>0])<<8|0|c[t+9>>0])>>>0<=i>>>0?(l[(n=e+88|0)>>2]=t,l[e+4>>2]=t,l[e+8>>2]=i,0|function(e){var t=0,i=0,n=0,r=0;if(r=92+(e|=0)|0,i=0|l[(n=e+88|0)>>2],t=(0|l[e+4>>2])+((0|c[i+68>>0])<<8|(0|c[i+67>>0])<<16|0|c[i+69>>0])|0,!((i=(0|c[i+65>>0])<<8|0|c[i+66>>0])&&(l[r>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,0|k(r,e+116|0))))return 0|(r=0);t=0|l[n>>2];do{if((0|c[t+39>>0])<<8|0|c[t+40>>0]){if(!(0|k(r,e+140|0)))return 0|(r=0);if(0|k(r,e+188|0)){t=0|l[n>>2];break}return 0|(r=0)}if(!((0|c[t+55>>0])<<8|0|c[t+56>>0]))return 0|(r=0)}while(0);return!((0|c[t+55>>0])<<8|0|c[t+56>>0]|0)||0|k(r,e+164|0)&&0|k(r,e+212|0)?0|(r=1):0|(r=0)}(e)?(t=0|l[n>>2],(0|c[t+39>>0])<<8|0|c[t+40>>0]?0|function(e){var t=0,i=0,n=0,o=0,a=0,s=0,u=0,h=0,d=0,f=0,p=0,_=0,m=0;if(m=y,y=y+576|0,s=m,o=m+64|0,_=m+16|0,t=0|l[(n=88+(e|=0)|0)>>2],p=(0|c[t+39>>0])<<8|0|c[t+40>>0],d=e+236|0,(0|(i=0|l[(a=e+240|0)>>2]))!=(0|p)){if(i>>>0<=p>>>0){do{if((0|l[e+244>>2])>>>0<p>>>0){if(0|Q(d,p,(i+1|0)==(0|p),4,0)){t=0|l[a>>2];break}return r[e+248>>0]=1,y=m,0|(_=0)}t=i}while(0);de((0|l[d>>2])+(t<<2)|0,0,p-t<<2|0),t=0|l[n>>2]}l[a>>2]=p}if(f=e+92|0,i=(0|l[e+4>>2])+((0|c[t+34>>0])<<8|(0|c[t+33>>0])<<16|0|c[t+35>>0])|0,!(t=(0|c[t+37>>0])<<8|(0|c[t+36>>0])<<16|0|c[t+38>>0]))return y=m,0|(_=0);if(l[f>>2]=i,l[e+96>>2]=i,l[e+104>>2]=t,l[e+100>>2]=i+t,l[e+108>>2]=0,l[e+112>>2]=0,u=_+20|0,l[_>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,l[_+12>>2]=0,r[_+16>>0]=0,h=_+24|0,l[_+44>>2]=0,l[u>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0,l[u+16>>2]=0,r[u+20>>0]=0,0|k(f,_)&&0|k(f,h))if(0|l[a>>2]||(l[s>>2]=866,l[s+4>>2]=910,l[s+8>>2]=1497,Oe(o,812,s),$e(o)),p)for(s=0,u=0,i=0|l[d>>2],n=0,e=0,t=0,o=0,a=0;;){if(s=(0|Y(f,_))+s&31,a=(0|Y(f,h))+a&63,o=(0|Y(f,_))+o&31,t=(0|Y(f,_))+t|0,e=(0|Y(f,h))+e&63,n=(0|Y(f,_))+n&31,l[i>>2]=a<<5|s<<11|o|t<<27|e<<21|n<<16,(u=u+1|0)>>>0>=p>>>0){t=1;break}i=i+4|0,t&=31}else t=1;else t=0;return ce(_+24|0),ce(_),y=m,0|(_=t)}(e)&&0|function(e){var t,i,n,o,a,s,u=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,v=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,I=0,D=0,B=0,N=0,F=0,U=0,G=0,z=0,V=0,W=0;if(s=y,y=y+1008|0,_=s,p=s+496|0,A=s+472|0,n=s+276|0,o=s+80|0,a=s+16|0,h=0|l[88+(e|=0)>>2],t=(0|c[h+47>>0])<<8|0|c[h+48>>0],i=e+92|0,u=(0|l[e+4>>2])+((0|c[h+42>>0])<<8|(0|c[h+41>>0])<<16|0|c[h+43>>0])|0,!(h=(0|c[h+45>>0])<<8|(0|c[h+44>>0])<<16|0|c[h+46>>0]))return y=s,0;if(l[i>>2]=u,l[e+96>>2]=u,l[e+104>>2]=h,l[e+100>>2]=u+h,l[e+108>>2]=0,l[e+112>>2]=0,l[A+20>>2]=0,l[A>>2]=0,l[A+4>>2]=0,l[A+8>>2]=0,l[A+12>>2]=0,r[A+16>>0]=0,0|k(i,A)){for(u=0,h=-3,d=-3;l[n+(u<<2)>>2]=d,l[o+(u<<2)>>2]=h,f=(0|d)>2,49!=(0|(u=u+1|0));)h=(1&f)+h|0,d=f?-3:d+1|0;h=(u=a)+64|0;do{l[u>>2]=0,u=u+4|0}while((0|u)<(0|h));d=e+252|0,u=0|l[(h=e+256|0)>>2];e:do{if((0|u)==(0|t))m=13;else{if(u>>>0<=t>>>0){do{if((0|l[e+260>>2])>>>0<t>>>0){if(0|Q(d,t,(u+1|0)==(0|t),4,0)){u=0|l[h>>2];break}r[e+264>>0]=1,u=0;break e}}while(0);de((0|l[d>>2])+(u<<2)|0,0,t-u<<2|0)}l[h>>2]=t,m=13}}while(0);do{if(13==(0|m)){if(!t){l[_>>2]=866,l[_+4>>2]=910,l[_+8>>2]=1497,Oe(p,812,_),$e(p),u=1;break}for(e=a+4|0,p=a+8|0,_=a+12|0,m=a+16|0,g=a+20|0,x=a+24|0,v=a+28|0,$=a+32|0,b=a+36|0,T=a+40|0,C=a+44|0,S=a+48|0,w=a+52|0,E=a+56|0,P=a+60|0,f=0,u=0|l[d>>2],h=0|l[e>>2],d=0|l[a>>2];V=0|Y(i,A),d=d+(0|l[n+(V<<2)>>2])&3,h=h+(0|l[o+(V<<2)>>2])&3,V=0|Y(i,A),W=(0|l[p>>2])+(0|l[n+(V<<2)>>2])&3,l[p>>2]=W,V=(0|l[_>>2])+(0|l[o+(V<<2)>>2])&3,l[_>>2]=V,G=0|Y(i,A),z=(0|l[m>>2])+(0|l[n+(G<<2)>>2])&3,l[m>>2]=z,G=(0|l[g>>2])+(0|l[o+(G<<2)>>2])&3,l[g>>2]=G,F=0|Y(i,A),U=(0|l[x>>2])+(0|l[n+(F<<2)>>2])&3,l[x>>2]=U,F=(0|l[v>>2])+(0|l[o+(F<<2)>>2])&3,l[v>>2]=F,B=0|Y(i,A),N=(0|l[$>>2])+(0|l[n+(B<<2)>>2])&3,l[$>>2]=N,B=(0|l[b>>2])+(0|l[o+(B<<2)>>2])&3,l[b>>2]=B,I=0|Y(i,A),D=(0|l[T>>2])+(0|l[n+(I<<2)>>2])&3,l[T>>2]=D,I=(0|l[C>>2])+(0|l[o+(I<<2)>>2])&3,l[C>>2]=I,R=0|Y(i,A),O=(0|l[S>>2])+(0|l[n+(R<<2)>>2])&3,l[S>>2]=O,R=(0|l[w>>2])+(0|l[o+(R<<2)>>2])&3,l[w>>2]=R,L=0|Y(i,A),M=(0|l[E>>2])+(0|l[n+(L<<2)>>2])&3,l[E>>2]=M,L=(0|l[P>>2])+(0|l[o+(L<<2)>>2])&3,l[P>>2]=L,l[u>>2]=(0|c[1441+h>>0])<<2|0|c[1441+d>>0]|(0|c[1441+W>>0])<<4|(0|c[1441+V>>0])<<6|(0|c[1441+z>>0])<<8|(0|c[1441+G>>0])<<10|(0|c[1441+U>>0])<<12|(0|c[1441+F>>0])<<14|(0|c[1441+N>>0])<<16|(0|c[1441+B>>0])<<18|(0|c[1441+D>>0])<<20|(0|c[1441+I>>0])<<22|(0|c[1441+O>>0])<<24|(0|c[1441+R>>0])<<26|(0|c[1441+M>>0])<<28|(0|c[1441+L>>0])<<30,!((f=f+1|0)>>>0>=t>>>0);)u=u+4|0;l[a>>2]=d,l[e>>2]=h,u=1}}while(0)}else u=0;return ce(A),y=s,0|u}(e)&&(t=0|l[n>>2],o=11):o=11,11!=(0|o)||(0|c[t+55>>0])<<8|0|c[t+56>>0]&&!(0|function(e){var t=0,i=0,n=0,o=0,s=0,u=0,h=0,d=0,f=0;if(f=y,y=y+560|0,o=f,n=f+40|0,d=f+16|0,i=0|l[88+(e|=0)>>2],u=(0|c[i+55>>0])<<8|0|c[i+56>>0],h=e+92|0,t=(0|l[e+4>>2])+((0|c[i+50>>0])<<8|(0|c[i+49>>0])<<16|0|c[i+51>>0])|0,!(i=(0|c[i+53>>0])<<8|(0|c[i+52>>0])<<16|0|c[i+54>>0]))return y=f,0|(d=0);l[h>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,l[d+20>>2]=0,l[d>>2]=0,l[d+4>>2]=0,l[d+8>>2]=0,l[d+12>>2]=0,r[d+16>>0]=0;e:do{if(0|k(h,d)){if(s=e+268|0,(0|(t=0|l[(i=e+272|0)>>2]))!=(0|u)){if(t>>>0<=u>>>0){do{if((0|l[e+276>>2])>>>0<u>>>0){if(0|Q(s,u,(t+1|0)==(0|u),2,0)){t=0|l[i>>2];break}r[e+280>>0]=1,t=0;break e}}while(0);de((0|l[s>>2])+(t<<1)|0,0,u-t<<1|0)}l[i>>2]=u}if(!u){l[o>>2]=866,l[o+4>>2]=910,l[o+8>>2]=1497,Oe(n,812,o),$e(n),t=1;break}for(i=0,e=0,n=0,t=0|l[s>>2];;){if(n=(s=0|Y(h,d))+n&255,e=(0|Y(h,d))+e&255,a[t>>1]=e<<8|n,(i=i+1|0)>>>0>=u>>>0){t=1;break}t=t+2|0}}else t=0}while(0);return ce(d),y=f,0|(d=t)}(e)&&0|function(e){var t,i,n,o,s,u,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,v=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,I=0,D=0,B=0,N=0,F=0,U=0,G=0,z=0,V=0,W=0,H=0,q=0,j=0;if(u=y,y=y+2416|0,m=u,_=u+1904|0,H=u+1880|0,n=u+980|0,o=u+80|0,s=u+16|0,d=0|l[88+(e|=0)>>2],t=(0|c[d+63>>0])<<8|0|c[d+64>>0],i=e+92|0,h=(0|l[e+4>>2])+((0|c[d+58>>0])<<8|(0|c[d+57>>0])<<16|0|c[d+59>>0])|0,!(d=(0|c[d+61>>0])<<8|(0|c[d+60>>0])<<16|0|c[d+62>>0]))return y=u,0;if(l[i>>2]=h,l[e+96>>2]=h,l[e+104>>2]=d,l[e+100>>2]=h+d,l[e+108>>2]=0,l[e+112>>2]=0,l[H+20>>2]=0,l[H>>2]=0,l[H+4>>2]=0,l[H+8>>2]=0,l[H+12>>2]=0,r[H+16>>0]=0,0|k(i,H)){for(h=0,d=-7,f=-7;l[n+(h<<2)>>2]=f,l[o+(h<<2)>>2]=d,p=(0|f)>6,225!=(0|(h=h+1|0));)d=(1&p)+d|0,f=p?-7:f+1|0;d=(h=s)+64|0;do{l[h>>2]=0,h=h+4|0}while((0|h)<(0|d));p=e+284|0,d=3*t|0,h=0|l[(f=e+288|0)>>2];e:do{if((0|h)==(0|d))g=13;else{if(h>>>0<=d>>>0){do{if((0|l[e+292>>2])>>>0<d>>>0){if(0|Q(p,d,(h+1|0)==(0|d),2,0)){h=0|l[f>>2];break}r[e+296>>0]=1,h=0;break e}}while(0);de((0|l[p>>2])+(h<<1)|0,0,d-h<<1|0)}l[f>>2]=d,g=13}}while(0);do{if(13==(0|g)){if(!t){l[m>>2]=866,l[m+4>>2]=910,l[m+8>>2]=1497,Oe(_,812,m),$e(_),h=1;break}for(A=s+4|0,L=s+8|0,M=s+12|0,R=s+16|0,O=s+20|0,I=s+24|0,D=s+28|0,B=s+32|0,N=s+36|0,F=s+40|0,U=s+44|0,G=s+48|0,z=s+52|0,V=s+56|0,W=s+60|0,P=0,h=0|l[p>>2],d=0|l[s>>2],f=0|l[A>>2],p=0|l[L>>2],e=0|l[M>>2],_=0|l[R>>2],m=0|l[O>>2],g=0|l[I>>2],x=0|l[D>>2],v=0|l[B>>2],$=0|l[N>>2],b=0|l[F>>2],T=0|l[U>>2],C=0,S=0,w=0,E=0;j=0|Y(i,H),d=d+(0|l[n+(j<<2)>>2])&7,f=f+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),p=p+(0|l[n+(j<<2)>>2])&7,e=e+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),_=_+(0|l[n+(j<<2)>>2])&7,m=m+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),g=g+(0|l[n+(j<<2)>>2])&7,x=x+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),v=v+(0|l[n+(j<<2)>>2])&7,$=$+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),b=b+(0|l[n+(j<<2)>>2])&7,T=T+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),C=C+(0|l[n+(j<<2)>>2])&7,S=S+(0|l[o+(j<<2)>>2])&7,j=0|Y(i,H),w=w+(0|l[n+(j<<2)>>2])&7,E=E+(0|l[o+(j<<2)>>2])&7,j=0|c[1445+m>>0],a[h>>1]=(0|c[1445+f>>0])<<3|0|c[1445+d>>0]|(0|c[1445+p>>0])<<6|(0|c[1445+e>>0])<<9|(0|c[1445+_>>0])<<12|j<<15,q=0|c[1445+b>>0],a[h+2>>1]=(0|c[1445+g>>0])<<2|j>>>1|(0|c[1445+x>>0])<<5|(0|c[1445+v>>0])<<8|(0|c[1445+$>>0])<<11|q<<14,a[h+4>>1]=(0|c[1445+T>>0])<<1|q>>>2|(0|c[1445+C>>0])<<4|(0|c[1445+S>>0])<<7|(0|c[1445+w>>0])<<10|(0|c[1445+E>>0])<<13,!((P=P+1|0)>>>0>=t>>>0);)h=h+6|0;l[s>>2]=d,l[A>>2]=f,l[L>>2]=p,l[M>>2]=e,l[R>>2]=_,l[O>>2]=m,l[I>>2]=g,l[D>>2]=x,l[B>>2]=v,l[N>>2]=$,l[F>>2]=b,l[U>>2]=T,l[G>>2]=C,l[z>>2]=S,l[V>>2]=w,l[W>>2]=E,h=1}}while(0)}else h=0;return ce(H),y=u,0|h}(e))?0|(o=0):0|(o=1)):0|(o=0)):(l[e+88>>2]=0,0|(o=0))}(d,e,t)?(y=m,0|(g=d)):(X(d),7&d?(l[p>>2]=866,l[p+4>>2]=2506,l[p+8>>2]=1232,Oe(h,812,p),$e(h),y=m,0|(g=0)):(_e(d,0,0,1,0),y=m,0|(g=0)))}(e,t),t=s+o|0;do{if(t>>>0>o>>>0){if(!g){for(n=i;n=n+(0|T(0|T((p+3|0)>>>2,x),(_+3|0)>>>2))|0,(0|(o=o+1|0))!=(0|t);)_>>>=1,p>>>=1;l[h>>2]=n;break}for(e=_,n=i;_=0|T((p+3|0)>>>2,x),!(o>>>0>15|(m=0|T(_,(e+3|0)>>>2))>>>0<8)&&519686845==(0|l[g>>2])&&(le(g,h,m,_,o),n=0|l[h>>2]),n=n+m|0,l[h>>2]=n,(0|(o=o+1|0))!=(0|t);)e>>>=1,p>>>=1}}while(0);if(g){if(519686845==(0|l[g>>2]))return X(g),7&g?(l[d>>2]=866,l[d+4>>2]=2506,l[d+8>>2]=1232,Oe(u,812,d),$e(u),void(y=f)):(_e(g,0,0,1,0),void(y=f));y=f}else y=f},_memset:de,_sbrk:Se,_memcpy:J,stackAlloc:function(e){var t;return t=y,y=(y=y+(e|=0)|0)+15&-16,0|t},_crn_get_height:function(e,t){var i,n;return e|=0,t|=0,n=y,y=y+48|0,l[(i=n)>>2]=40,oe(e,t,i),y=n,0|l[i+8>>2]},dynCall_vi:function(e,t){t|=0,lt[7&(e|=0)](0|t)},getTempRet0:function(){return 0|b},_crn_get_levels:function(e,t){var i,n;return e|=0,t|=0,n=y,y=y+48|0,l[(i=n)>>2]=40,oe(e,t,i),y=n,0|l[i+12>>2]},_crn_get_uncompressed_size:function(e,t,i){e|=0,t|=0,i|=0;var n,r,o,a,s=0,u=0;switch(a=y,y=y+576|0,o=a+40|0,r=a+56|0,l[(u=a)>>2]=40,oe(e,t,u),n=(3+((0|l[u+4>>2])>>>i)|0)>>>2,t=(3+((0|l[u+8>>2])>>>i)|0)>>>2,e=0|l[(i=u+32|0)+4>>2],0|l[i>>2]){case 0:case 9:case 10:e?s=14:e=8;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:s=e?14:13;break;default:s=14}return 13==(0|s)?e=16:14==(0|s)&&(l[o>>2]=866,l[o+4>>2]=2672,l[o+8>>2]=1251,Oe(r,812,o),$e(r),e=0),u=0|T(0|T(t,n),e),y=a,0|u},_i64Add:Ue,dynCall_iiii:function(e,t,i,n){return t|=0,i|=0,n|=0,0|at[7&(e|=0)](0|t,0|i,0|n)},_emscripten_get_global_libc:function(){return 5072},dynCall_ii:function(e,t){return t|=0,0|ut[1&(e|=0)](0|t)},___udivdi3:je,_llvm_bswap_i32:Ye,dynCall_viiiii:function(e,t,i,n,r,o){t|=0,i|=0,n|=0,r|=0,o|=0,st[3&(e|=0)](0|t,0|i,0|n,0|r,0|o)},___cxa_can_catch:function(e,t,i){var n,r;return e|=0,t|=0,i|=0,r=y,y=y+16|0,l[(n=r)>>2]=l[i>>2],(e=0|at[7&l[16+(0|l[e>>2])>>2]](e,t,n))&&(l[i>>2]=l[n>>2]),y=r,1&e|0},_free:H,runPostSets:function(){},dynCall_viiiiii:function(e,t,i,n,r,o,a){t|=0,i|=0,n|=0,r|=0,o|=0,a|=0,dt[3&(e|=0)](0|t,0|i,0|n,0|r,0|o,0|a)},establishStackSpace:function(e,t){y=e|=0},___uremdi3:Me,___cxa_is_pointer_type:function(e){return 1&(e=(e|=0)?0!=(0|ie(e,32,88,0)):0)|0},stackRestore:function(e){y=e|=0},_malloc:G,_emscripten_replace_memory:function(e){return!(16777215&g(e)||g(e)<=16777215||g(e)>2147483648)&&(r=new n(e),a=new o(e),l=new s(e),c=new u(e),d=new h(e),new f(e),new p(e),m=new _(e),i=e,!0)},dynCall_v:function(e){ht[3&(e|=0)]()},_crn_get_width:function(e,t){var i,n;return e|=0,t|=0,n=y,y=y+48|0,l[(i=n)>>2]=40,oe(e,t,i),y=n,0|l[i+4>>2]},_crn_get_dxt_format:function(e,t){var i,n;return e|=0,t|=0,n=y,y=y+48|0,l[(i=n)>>2]=40,oe(e,t,i),y=n,0|l[i+32>>2]}}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer);Module.stackSave=asm.stackSave,Module.getTempRet0=asm.getTempRet0,Module._memset=asm._memset,Module.setThrew=asm.setThrew,Module._bitshift64Lshr=asm._bitshift64Lshr,Module._bitshift64Shl=asm._bitshift64Shl,Module.setTempRet0=asm.setTempRet0,Module._crn_decompress=asm._crn_decompress,Module._crn_get_bytes_per_block=asm._crn_get_bytes_per_block,Module._sbrk=asm._sbrk,Module._memcpy=asm._memcpy,Module.stackAlloc=asm.stackAlloc,Module._crn_get_height=asm._crn_get_height,Module._i64Subtract=asm._i64Subtract,Module._crn_get_levels=asm._crn_get_levels,Module._crn_get_uncompressed_size=asm._crn_get_uncompressed_size,Module._i64Add=asm._i64Add,Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,Module.___udivdi3=asm.___udivdi3,Module._llvm_bswap_i32=asm._llvm_bswap_i32,Module.___cxa_can_catch=asm.___cxa_can_catch;var _free=Module._free=asm._free;Module.runPostSets=asm.runPostSets,Module.establishStackSpace=asm.establishStackSpace,Module.___uremdi3=asm.___uremdi3,Module.___cxa_is_pointer_type=asm.___cxa_is_pointer_type,Module.stackRestore=asm.stackRestore;var _malloc=Module._malloc=asm._malloc,_emscripten_replace_memory=Module._emscripten_replace_memory=asm._emscripten_replace_memory,initialStackTop;function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function run(e){function t(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(e),postRun()))}e=e||Module.arguments,runDependencies>0||(preRun(),runDependencies>0)||Module.calledRun||(Module.setStatus?(Module.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module.setStatus("")}),1),t()}),1)):t())}function exit(e,t){t&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(e)),ENVIRONMENT_IS_NODE&&process.exit(e),Module.quit(e,new ExitStatus(e)))}Module._crn_get_width=asm._crn_get_width,Module._crn_get_dxt_format=asm._crn_get_dxt_format,Module.dynCall_iiii=asm.dynCall_iiii,Module.dynCall_viiiii=asm.dynCall_viiiii,Module.dynCall_vi=asm.dynCall_vi,Module.dynCall_ii=asm.dynCall_ii,Module.dynCall_viii=asm.dynCall_viii,Module.dynCall_v=asm.dynCall_v,Module.dynCall_viiiiii=asm.dynCall_viiiiii,Module.dynCall_viiii=asm.dynCall_viiii,Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm,ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus,dependenciesFulfilled=function e(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=e)},Module.callMain=Module.callMain=function(e){e=e||[],ensureInitRuntime();var t=e.length+1;function i(){for(var e=0;e<3;e++)n.push(0)}var n=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];i();for(var r=0;r<t-1;r+=1)n.push(allocate(intArrayFromString(e[r]),"i8",ALLOC_NORMAL)),i();n.push(0),n=allocate(n,"i32",ALLOC_NORMAL);try{exit(Module._main(t,n,0),!0)}catch(e){if(e instanceof ExitStatus)return;if("SimulateInfiniteLoop"==e)return void(Module.noExitRuntime=!0);var o=e;e&&"object"==typeof e&&e.stack&&(o=[e,e.stack]),Module.printErr("exception thrown: "+o),Module.quit(1,e)}},Module.run=Module.run=run,Module.exit=Module.exit=exit;var abortDecorators=[];function abort(e){Module.onAbort&&Module.onAbort(e),void 0!==e?(Module.print(e),Module.printErr(e),e=JSON.stringify(e)):e="",ABORT=!0;var t="abort("+e+") at "+stackTrace()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw abortDecorators&&abortDecorators.forEach((function(i){t=i(t,e)})),t}if(Module.abort=Module.abort=abort,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),Module.noExitRuntime=!0,run();var Module$1=Module,G;typeof ko<"u"&&(G=ko),function(e){var t=this||(0,eval)("this"),i=t.document,n=t.navigator,r=t.jQuery,o=t.JSON;r||typeof jQuery>"u"||(r=jQuery),function(a,s){function l(e,t){return(null===e||typeof e in _)&&e===t}function u(t,i){var n;return function(){n||(n=p.a.setTimeout((function(){n=e,t()}),i))}}function c(e,t){var i;return function(){clearTimeout(i),i=p.a.setTimeout(e,t)}}function h(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function d(e,t){null!==t&&t.s&&t.s()}function f(e,t){var i=this.qd,n=i[y];n.ra||(this.Qb&&this.mb[t]?(i.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):n.I[t]||i.uc(t,e,n.J?{da:e}:i.$c(e)),e.Ja&&e.gd())}var p=typeof a<"u"?a:{};p.b=function(e,t){for(var i=e.split("."),n=p,r=0;r<i.length-1;r++)n=n[i[r]];n[i[i.length-1]]=t},p.L=function(e,t,i){e[t]=i},p.version="3.5.1",p.b("version",p.version),p.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},p.a=function(){function a(e,t){for(var i in e)c.call(e,i)&&t(i,e[i])}function s(e,t){if(t)for(var i in t)c.call(t,i)&&(e[i]=t[i]);return e}function l(e,t){return e.__proto__=t,e}function u(e,t,i,n){var r=e[t].match(v)||[];p.a.D(i.match(v),(function(e){p.a.Na(r,e,n)})),e[t]=r.join(" ")}var c=Object.prototype.hasOwnProperty,h={__proto__:[]}instanceof Array,d="function"==typeof Symbol,f={},_={};f[n&&/Firefox\/2/i.test(n.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],f.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),a(f,(function(e,t){if(t.length)for(var i=0,n=t.length;i<n;i++)_[t[i]]=e}));var m,g={propertychange:!0},x=i&&function(){for(var t=3,n=i.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e",r[0];);return 4<t?t:e}(),v=/\S+/g;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(e,t,i){for(var n=0,r=e.length;n<r;n++)t.call(i,e[n],n,e)},A:"function"==typeof Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t)}:function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},Lb:function(t,i,n){for(var r=0,o=t.length;r<o;r++)if(i.call(n,t[r],r,t))return t[r];return e},Pa:function(e,t){var i=p.a.A(e,t);0<i?e.splice(i,1):0===i&&e.shift()},wc:function(e){var t=[];return e&&p.a.D(e,(function(e){0>p.a.A(t,e)&&t.push(e)})),t},Mb:function(e,t,i){var n=[];if(e)for(var r=0,o=e.length;r<o;r++)n.push(t.call(i,e[r],r));return n},jb:function(e,t,i){var n=[];if(e)for(var r=0,o=e.length;r<o;r++)t.call(i,e[r],r)&&n.push(e[r]);return n},Nb:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var i=0,n=t.length;i<n;i++)e.push(t[i]);return e},Na:function(e,t,i){var n=p.a.A(p.a.bc(e),t);0>n?i&&e.push(t):i||e.splice(n,1)},Ba:h,extend:s,setPrototypeOf:l,Ab:h?l:s,P:a,Ga:function(e,t,i){if(!e)return e;var n,r={};for(n in e)c.call(e,n)&&(r[n]=t.call(i,e[n],n,e));return r},Tb:function(e){for(;e.firstChild;)p.removeNode(e.firstChild)},Yb:function(e){for(var t=((e=p.a.la(e))[0]&&e[0].ownerDocument||i).createElement("div"),n=0,r=e.length;n<r;n++)t.appendChild(p.oa(e[n]));return t},Ca:function(e,t){for(var i=0,n=e.length,r=[];i<n;i++){var o=e[i].cloneNode(!0);r.push(t?p.oa(o):o)}return r},va:function(e,t){if(p.a.Tb(e),t)for(var i=0,n=t.length;i<n;i++)e.appendChild(t[i])},Xc:function(e,t){var i=e.nodeType?[e]:e;if(0<i.length){for(var n=i[0],r=n.parentNode,o=0,a=t.length;o<a;o++)r.insertBefore(t[o],n);for(o=0,a=i.length;o<a;o++)p.removeNode(i[o])}},Ua:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.splice(0,1);for(;1<e.length&&e[e.length-1].parentNode!==t;)e.length--;if(1<e.length){var i=e[0],n=e[e.length-1];for(e.length=0;i!==n;)e.push(i),i=i.nextSibling;e.push(n)}}return e},Zc:function(e,t){7>x?e.setAttribute("selected",t):e.selected=t},Db:function(t){return null===t||t===e?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},vd:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(1!==e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Sb:function(e){return p.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!p.a.Lb(e,p.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return p.onError?function(){try{return e.apply(this,arguments)}catch(e){throw p.onError&&p.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(p.a.Ac(e),t)},Gc:function(e){setTimeout((function(){throw p.onError&&p.onError(e),e}),0)},B:function(e,t,i){var n=p.a.Ac(i);if(i=g[t],p.options.useOnlyNativeEvents||i||!r)if(i||"function"!=typeof e.addEventListener){if(!(typeof e.attachEvent<"u"))throw Error("Browser doesn't support addEventListener or attachEvent");var o=function(t){n.call(e,t)},a="on"+t;e.attachEvent(a,o),p.a.K.za(e,(function(){e.detachEvent(a,o)}))}else e.addEventListener(t,n,!1);else m||(m="function"==typeof r(e).on?"on":"bind"),r(e)[m](t,n)},Fb:function(e,n){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var o;if(o=!("input"!==p.a.R(e)||!e.type||"click"!=n.toLowerCase()||"checkbox"!=(o=e.type)&&"radio"!=o),p.options.useOnlyNativeEvents||!r||o)if("function"==typeof i.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(o=i.createEvent(_[n]||"HTMLEvents")).initEvent(n,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(o)}else if(o&&e.click)e.click();else{if(!(typeof e.fireEvent<"u"))throw Error("Browser doesn't support triggering events");e.fireEvent("on"+n)}else r(e).trigger(n)},f:function(e){return p.O(e)?e():e},bc:function(e){return p.O(e)?e.v():e},Eb:function(e,t,i){var n;t&&("object"==typeof e.classList?(n=e.classList[i?"add":"remove"],p.a.D(t.match(v),(function(t){n.call(e.classList,t)}))):"string"==typeof e.className.baseVal?u(e.className,"baseVal",t,i):u(e,"className",t,i))},Bb:function(t,i){var n=p.a.f(i);(null===n||n===e)&&(n="");var r=p.h.firstChild(t);!r||3!=r.nodeType||p.h.nextSibling(r)?p.h.va(t,[t.ownerDocument.createTextNode(n)]):r.data=n,p.a.Ad(t)},Yc:function(e,t){if(e.name=t,7>=x)try{var n=e.name.replace(/[&<>'"]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}));e.mergeAttributes(i.createElement("<input name='"+n+"'/>"),!1)}catch{}},Ad:function(e){9<=x&&(e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom)},wd:function(e){if(x){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=p.a.f(e),t=p.a.f(t);for(var i=[],n=e;n<=t;n++)i.push(n);return i},la:function(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(e[i]);return t},Da:function(e){return d?Symbol(e):e},Zd:6===x,$d:7===x,W:x,Lc:function(e,t){for(var i=p.a.la(e.getElementsByTagName("input")).concat(p.a.la(e.getElementsByTagName("textarea"))),n="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},r=[],o=i.length-1;0<=o;o--)n(i[o])&&r.push(i[o]);return r},Nd:function(e){return"string"==typeof e&&(e=p.a.Db(e))?o&&o.parse?o.parse(e):new Function("return "+e)():null},hc:function(e,t,i){if(!o||!o.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js.");return o.stringify(p.a.f(e),t,i)},Od:function(e,t,n){var r=(n=n||{}).params||{},o=n.includeFields||this.Jc,s=e;if("object"==typeof e&&"form"===p.a.R(e)){s=e.action;for(var l=o.length-1;0<=l;l--)for(var u=p.a.Lc(e,o[l]),c=u.length-1;0<=c;c--)r[u[c].name]=u[c].value}t=p.a.f(t);var h=i.createElement("form");for(var d in h.style.display="none",h.action=s,h.method="post",t)(e=i.createElement("input")).type="hidden",e.name=d,e.value=p.a.hc(p.a.f(t[d])),h.appendChild(e);a(r,(function(e,t){var n=i.createElement("input");n.type="hidden",n.name=e,n.value=t,h.appendChild(n)})),i.body.appendChild(h),n.submitter?n.submitter(h):h.submit(),setTimeout((function(){h.parentNode.removeChild(h)}),0)}}}(),p.b("utils",p.a),p.b("utils.arrayForEach",p.a.D),p.b("utils.arrayFirst",p.a.Lb),p.b("utils.arrayFilter",p.a.jb),p.b("utils.arrayGetDistinctValues",p.a.wc),p.b("utils.arrayIndexOf",p.a.A),p.b("utils.arrayMap",p.a.Mb),p.b("utils.arrayPushAll",p.a.Nb),p.b("utils.arrayRemoveItem",p.a.Pa),p.b("utils.cloneNodes",p.a.Ca),p.b("utils.createSymbolOrString",p.a.Da),p.b("utils.extend",p.a.extend),p.b("utils.fieldsIncludedWithJsonPost",p.a.Jc),p.b("utils.getFormFields",p.a.Lc),p.b("utils.objectMap",p.a.Ga),p.b("utils.peekObservable",p.a.bc),p.b("utils.postJson",p.a.Od),p.b("utils.parseJson",p.a.Nd),p.b("utils.registerEventHandler",p.a.B),p.b("utils.stringifyJson",p.a.hc),p.b("utils.range",p.a.Pd),p.b("utils.toggleDomNodeCssClass",p.a.Eb),p.b("utils.triggerEvent",p.a.Fb),p.b("utils.unwrapObservable",p.a.f),p.b("utils.objectForEach",p.a.P),p.b("utils.addOrRemoveItem",p.a.Na),p.b("utils.setTextContent",p.a.Bb),p.b("unwrap",p.a.f),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(1===arguments.length)return function(){return t.apply(e,arguments)};var i=Array.prototype.slice.call(arguments,1);return function(){var n=i.slice(0);return n.push.apply(n,arguments),t.apply(e,n)}}),p.a.g=new function(){var t,i,n=0,r="__ko__"+(new Date).getTime(),o={};return p.a.W?(t=function(t,i){var a=t[r];if(!a||"null"===a||!o[a]){if(!i)return e;a=t[r]="ko"+n++,o[a]={}}return o[a]},i=function(e){var t=e[r];return!!t&&(delete o[t],e[r]=null,!0)}):(t=function(e,t){var i=e[r];return!i&&t&&(i=e[r]={}),i},i=function(e){return!!e[r]&&(delete e[r],!0)}),{get:function(e,i){var n=t(e,!1);return n&&n[i]},set:function(i,n,r){(i=t(i,r!==e))&&(i[n]=r)},Ub:function(e,i,n){return(e=t(e,!0))[i]||(e[i]=n)},clear:i,Z:function(){return n+++r}}},p.b("utils.domData",p.a.g),p.b("utils.domData.clear",p.a.g.clear),p.a.K=new function(){function t(t,i){var n=p.a.g.get(t,o);return n===e&&i&&(n=[],p.a.g.set(t,o,n)),n}function i(e){if(i=t(e,!1))for(var i=i.slice(0),r=0;r<i.length;r++)i[r](e);p.a.g.clear(e),p.a.K.cleanExternalData(e),s[e.nodeType]&&n(e.childNodes,!0)}function n(e,t){for(var n,r=[],o=0;o<e.length;o++)if((!t||8===e[o].nodeType)&&(i(r[r.length]=n=e[o]),e[o]!==n))for(;o--&&-1==p.a.A(r,e[o]););}var o=p.a.g.Z(),a={1:!0,8:!0,9:!0},s={1:!0,9:!0};return{za:function(e,i){if("function"!=typeof i)throw Error("Callback must be a function");t(e,!0).push(i)},yb:function(i,n){var r=t(i,!1);r&&(p.a.Pa(r,n),0==r.length&&p.a.g.set(i,o,e))},oa:function(e){return p.u.G((function(){a[e.nodeType]&&(i(e),s[e.nodeType]&&n(e.getElementsByTagName("*")))})),e},removeNode:function(e){p.oa(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){r&&"function"==typeof r.cleanData&&r.cleanData([e])}}},p.oa=p.a.K.oa,p.removeNode=p.a.K.removeNode,p.b("cleanNode",p.oa),p.b("removeNode",p.removeNode),p.b("utils.domNodeDisposal",p.a.K),p.b("utils.domNodeDisposal.addDisposeCallback",p.a.K.za),p.b("utils.domNodeDisposal.removeDisposeCallback",p.a.K.yb),function(){var n=[0,"",""],o=[1,"<table>","</table>"],a=[3,"<table><tbody><tr>","</tr></tbody></table>"],s=[1,"<select multiple='multiple'>","</select>"],l={thead:o,tbody:o,tfoot:o,tr:[2,"<table><tbody>","</tbody></table>"],td:a,th:a,option:s,optgroup:s},u=8>=p.a.W;p.a.ua=function(e,o){var a;if(r){if(r.parseHTML)a=r.parseHTML(e,o)||[];else if((a=r.clean([e],o))&&a[0]){for(var s=a[0];s.parentNode&&11!==s.parentNode.nodeType;)s=s.parentNode;s.parentNode&&s.parentNode.removeChild(s)}}else{(a=o)||(a=i),s=a.parentWindow||a.defaultView||t;var c,h=p.a.Db(e).toLowerCase(),d=a.createElement("div");for(c=(h=h.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&l[h[1]]||n,h=c[0],c="ignored<div>"+c[1]+e+c[2]+"</div>","function"==typeof s.innerShiv?d.appendChild(s.innerShiv(c)):(u&&a.body.appendChild(d),d.innerHTML=c,u&&d.parentNode.removeChild(d));h--;)d=d.lastChild;a=p.a.la(d.lastChild.childNodes)}return a},p.a.Md=function(e,t){var i=p.a.ua(e,t);return i.length&&i[0].parentElement||p.a.Yb(i)},p.a.fc=function(t,i){if(p.a.Tb(t),null!==(i=p.a.f(i))&&i!==e)if("string"!=typeof i&&(i=i.toString()),r)r(t).html(i);else for(var n=p.a.ua(i,t.ownerDocument),o=0;o<n.length;o++)t.appendChild(n[o])}}(),p.b("utils.parseHtmlFragment",p.a.ua),p.b("utils.setHtml",p.a.fc),p.aa=function(){function t(e,i){if(e)if(8==e.nodeType)null!=(n=p.aa.Uc(e.nodeValue))&&i.push({ud:e,Kd:n});else if(1==e.nodeType)for(var n=0,r=e.childNodes,o=r.length;n<o;n++)t(r[n],i)}var i={};return{Xb:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var t=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return i[t]=e,"\x3c!--[ko_memo:"+t+"]--\x3e"},bd:function(t,n){var r=i[t];if(r===e)throw Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized.");try{return r.apply(null,n||[]),!0}finally{delete i[t]}},cd:function(e,i){var n=[];t(e,n);for(var r=0,o=n.length;r<o;r++){var a=n[r].ud,s=[a];i&&p.a.Nb(s,i),p.aa.bd(n[r].Kd,s),a.nodeValue="",a.parentNode&&a.parentNode.removeChild(a)}},Uc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),p.b("memoization",p.aa),p.b("memoization.memoize",p.aa.Xb),p.b("memoization.unmemoize",p.aa.bd),p.b("memoization.parseMemoText",p.aa.Uc),p.b("memoization.unmemoizeDomNodeAndDescendants",p.aa.cd),p.na=function(){function e(){if(a)for(var e,t=a,i=0;l<a;)if(e=o[l++]){if(l>t){if(5e3<=++i){l=a,p.a.Gc(Error("'Too much recursion' after processing "+i+" task groups."));break}t=a}try{e()}catch(e){p.a.Gc(e)}}}function n(){e(),l=a=o.length=0}var r,o=[],a=0,s=1,l=0;return r=t.MutationObserver?function(e){var t=i.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(n):i&&"onreadystatechange"in i.createElement("script")?function(e){var t=i.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,i.documentElement.removeChild(t),t=null,e()},i.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},{scheduler:r,zb:function(e){return a||p.na.scheduler(n),o[a++]=e,s++},cancel:function(e){(e-=s-a)>=l&&e<a&&(o[e]=null)},resetForTesting:function(){var e=a-l;return l=a=o.length=0,e},Sd:e}}(),p.b("tasks",p.na),p.b("tasks.schedule",p.na.zb),p.b("tasks.runEarly",p.na.Sd),p.Ta={throttle:function(e,t){e.throttleEvaluation=t;var i=null;return p.$({read:e,write:function(n){clearTimeout(i),i=p.a.setTimeout((function(){e(n)}),t)}})},rateLimit:function(e,t){var i,n,r;"number"==typeof t?i=t:(i=t.timeout,n=t.method),e.Hb=!1,r="function"==typeof n?n:"notifyWhenChangesStop"==n?c:u,e.ub((function(e){return r(e,i,t)}))},deferred:function(t,i){if(!0!==i)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");t.Hb||(t.Hb=!0,t.ub((function(i){var n,r=!1;return function(){if(!r){p.na.cancel(n),n=p.na.zb(i);try{r=!0,t.notifySubscribers(e,"dirty")}finally{r=!1}}}})))},notify:function(e,t){e.equalityComparer="always"==t?null:l}};var _={undefined:1,boolean:1,number:1,string:1};p.b("extenders",p.Ta),p.ic=function(e,t,i){this.da=e,this.lc=t,this.mc=i,this.Ib=!1,this.fb=this.Jb=null,p.L(this,"dispose",this.s),p.L(this,"disposeWhenNodeIsRemoved",this.l)},p.ic.prototype.s=function(){this.Ib||(this.fb&&p.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},p.ic.prototype.l=function(e){this.Jb=e,p.a.K.za(e,this.fb=this.s.bind(this))},p.T=function(){p.a.Ab(this,m),m.qb(this)};var m={qb:function(e){e.U={change:[]},e.sc=1},subscribe:function(e,t,i){var n=this;i=i||"change";var r=new p.ic(n,t?e.bind(t):e,(function(){p.a.Pa(n.U[i],r),n.hb&&n.hb(i)}));return n.Qa&&n.Qa(i),n.U[i]||(n.U[i]=[]),n.U[i].push(r),r},notifySubscribers:function(e,t){if("change"===(t=t||"change")&&this.Gb(),this.Wa(t)){var i="change"===t&&this.ed||this.U[t].slice(0);try{p.u.xc();for(var n,r=0;n=i[r];++r)n.Ib||n.lc(e)}finally{p.u.end()}}},ob:function(){return this.sc},Dd:function(e){return this.ob()!==e},Gb:function(){++this.sc},ub:function(e){var t,i,n,r,o,a=this,s=p.O(a);a.gb||(a.gb=a.notifySubscribers,a.notifySubscribers=h);var l=e((function(){a.Ja=!1,s&&r===a&&(r=a.nc?a.nc():a());var e=i||o&&a.sb(n,r);o=i=t=!1,e&&a.gb(n=r)}));a.qc=function(e,i){i&&a.Ja||(o=!i),a.ed=a.U.change.slice(0),a.Ja=t=!0,r=e,l()},a.pc=function(e){t||(n=e,a.gb(e,"beforeChange"))},a.rc=function(){o=!0},a.gd=function(){a.sb(n,a.v(!0))&&(i=!0)}},Wa:function(e){return this.U[e]&&this.U[e].length},Bd:function(e){if(e)return this.U[e]&&this.U[e].length||0;var t=0;return p.a.P(this.U,(function(e,i){"dirty"!==e&&(t+=i.length)})),t},sb:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},toString:function(){return"[object Object]"},extend:function(e){var t=this;return e&&p.a.P(e,(function(e,i){var n=p.Ta[e];"function"==typeof n&&(t=n(t,i)||t)})),t}};p.L(m,"init",m.qb),p.L(m,"subscribe",m.subscribe),p.L(m,"extend",m.extend),p.L(m,"getSubscriptionsCount",m.Bd),p.a.Ba&&p.a.setPrototypeOf(m,Function.prototype),p.T.fn=m,p.Qc=function(e){return null!=e&&"function"==typeof e.subscribe&&"function"==typeof e.notifySubscribers},p.b("subscribable",p.T),p.b("isSubscribable",p.Qc),p.S=p.u=function(){function e(e){n.push(i),i=e}function t(){i=n.pop()}var i,n=[],r=0;return{xc:e,end:t,cc:function(e){if(i){if(!p.Qc(e))throw Error("Only subscribable things can act as dependencies");i.od.call(i.pd,e,e.fd||(e.fd=++r))}},G:function(i,n,r){try{return e(),i.apply(n,r||[])}finally{t()}},qa:function(){if(i)return i.o.qa()},Va:function(){if(i)return i.o.Va()},Ya:function(){if(i)return i.Ya},o:function(){if(i)return i.o}}}(),p.b("computedContext",p.S),p.b("computedContext.getDependenciesCount",p.S.qa),p.b("computedContext.getDependencies",p.S.Va),p.b("computedContext.isInitial",p.S.Ya),p.b("computedContext.registerDependency",p.S.cc),p.b("ignoreDependencies",p.Yd=p.u.G);var g=p.a.Da("_latestValue");p.ta=function(e){function t(){return 0<arguments.length?(t.sb(t[g],arguments[0])&&(t.ya(),t[g]=arguments[0],t.xa()),this):(p.u.cc(t),t[g])}return t[g]=e,p.a.Ba||p.a.extend(t,p.T.fn),p.T.fn.qb(t),p.a.Ab(t,x),p.options.deferUpdates&&p.Ta.deferred(t,!0),t};var x={equalityComparer:l,v:function(){return this[g]},xa:function(){this.notifySubscribers(this[g],"spectate"),this.notifySubscribers(this[g])},ya:function(){this.notifySubscribers(this[g],"beforeChange")}};p.a.Ba&&p.a.setPrototypeOf(x,p.T.fn);var v=p.ta.Ma="__ko_proto__";x[v]=p.ta,p.O=function(e){if((e="function"==typeof e&&e[v])&&e!==x[v]&&e!==p.o.fn[v])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e},p.Za=function(e){return"function"==typeof e&&(e[v]===x[v]||e[v]===p.o.fn[v]&&e.Nc)},p.b("observable",p.ta),p.b("isObservable",p.O),p.b("isWriteableObservable",p.Za),p.b("isWritableObservable",p.Za),p.b("observable.fn",x),p.L(x,"peek",x.v),p.L(x,"valueHasMutated",x.xa),p.L(x,"valueWillMutate",x.ya),p.Ha=function(e){if("object"!=typeof(e=e||[])||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=p.ta(e),p.a.Ab(e,p.Ha.fn),e.extend({trackArrayChanges:!0})},p.Ha.fn={remove:function(e){for(var t=this.v(),i=[],n="function"!=typeof e||p.O(e)?function(t){return t===e}:e,r=0;r<t.length;r++){var o=t[r];if(n(o)){if(0===i.length&&this.ya(),t[r]!==o)throw Error("Array modified during remove; cannot remove item");i.push(o),t.splice(r,1),r--}}return i.length&&this.xa(),i},removeAll:function(t){if(t===e){var i=this.v(),n=i.slice(0);return this.ya(),i.splice(0,i.length),this.xa(),n}return t?this.remove((function(e){return 0<=p.a.A(t,e)})):[]},destroy:function(e){var t=this.v(),i="function"!=typeof e||p.O(e)?function(t){return t===e}:e;this.ya();for(var n=t.length-1;0<=n;n--){var r=t[n];i(r)&&(r._destroy=!0)}this.xa()},destroyAll:function(t){return t===e?this.destroy((function(){return!0})):t?this.destroy((function(e){return 0<=p.a.A(t,e)})):[]},indexOf:function(e){var t=this();return p.a.A(t,e)},replace:function(e,t){var i=this.indexOf(e);0<=i&&(this.ya(),this.v()[i]=t,this.xa())},sorted:function(e){var t=this().slice(0);return e?t.sort(e):t.sort()},reversed:function(){return this().slice(0).reverse()}},p.a.Ba&&p.a.setPrototypeOf(p.Ha.fn,p.ta.fn),p.a.D("pop push reverse shift sort splice unshift".split(" "),(function(e){p.Ha.fn[e]=function(){var t=this.v();this.ya(),this.zc(t,e,arguments);var i=t[e].apply(t,arguments);return this.xa(),i===t?this:i}})),p.a.D(["slice"],(function(e){p.Ha.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}})),p.Pc=function(e){return p.O(e)&&"function"==typeof e.remove&&"function"==typeof e.push},p.b("observableArray",p.Ha),p.b("isObservableArray",p.Pc),p.Ta.trackArrayChanges=function(t,i){function n(){function e(){if(u){var e,i=[].concat(t.v()||[]);t.Wa("arrayChange")&&((!l||1<u)&&(l=p.a.Pb(a,i,t.Ob)),e=l),a=i,l=null,u=0,e&&e.length&&t.notifySubscribers(e,"arrayChange")}}s?e():(s=!0,o=t.subscribe((function(){++u}),null,"spectate"),a=[].concat(t.v()||[]),l=null,r=t.subscribe(e))}if(t.Ob={},i&&"object"==typeof i&&p.a.extend(t.Ob,i),t.Ob.sparse=!0,!t.zc){var r,o,a,s=!1,l=null,u=0,c=t.Qa,h=t.hb;t.Qa=function(e){c&&c.call(t,e),"arrayChange"===e&&n()},t.hb=function(i){h&&h.call(t,i),"arrayChange"!==i||t.Wa("arrayChange")||(r&&r.s(),o&&o.s(),o=r=null,s=!1,a=e)},t.zc=function(e,t,i){function n(e,t,i){return r[r.length]={status:e,value:t,index:i}}if(s&&!u){var r=[],o=e.length,a=i.length,c=0;switch(t){case"push":c=o;case"unshift":for(t=0;t<a;t++)n("added",i[t],c+t);break;case"pop":c=o-1;case"shift":o&&n("deleted",e[c],c);break;case"splice":t=Math.min(Math.max(0,0>i[0]?o+i[0]:i[0]),o),o=1===a?o:Math.min(t+(i[1]||0),o),a=t+a-2,c=Math.max(o,a);for(var h=[],d=[],f=2;t<c;++t,++f)t<o&&d.push(n("deleted",e[t],t)),t<a&&h.push(n("added",i[f],t));p.a.Kc(d,h);break;default:return}l=r}}}};var y=p.a.Da("_state");p.o=p.$=function(t,i,n){function r(){if(0<arguments.length){if("function"!=typeof o)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return o.apply(a.nb,arguments),this}return a.ra||p.u.cc(r),(a.ka||a.J&&r.Xa())&&r.ha(),a.X}if("object"==typeof t?n=t:(n=n||{},t&&(n.read=t)),"function"!=typeof n.read)throw Error("Pass a function that returns the value of the ko.computed");var o=n.write,a={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:n.read,nb:i||n.owner,l:n.disposeWhenNodeIsRemoved||n.l||null,Sa:n.disposeWhen||n.Sa,Rb:null,I:{},V:0,Ic:null};return r[y]=a,r.Nc="function"==typeof o,p.a.Ba||p.a.extend(r,p.T.fn),p.T.fn.qb(r),p.a.Ab(r,$),n.pure?(a.wb=!0,a.J=!0,p.a.extend(r,b)):n.deferEvaluation&&p.a.extend(r,T),p.options.deferUpdates&&p.Ta.deferred(r,!0),a.l&&(a.jc=!0,a.l.nodeType||(a.l=null)),a.J||n.deferEvaluation||r.ha(),a.l&&r.ja()&&p.a.K.za(a.l,a.Rb=function(){r.s()}),r};var $={equalityComparer:l,qa:function(){return this[y].V},Va:function(){var e=[];return p.a.P(this[y].I,(function(t,i){e[i.Ka]=i.da})),e},Vb:function(e){if(!this[y].V)return!1;var t=this.Va();return-1!==p.a.A(t,e)||!!p.a.Lb(t,(function(t){return t.Vb&&t.Vb(e)}))},uc:function(e,t,i){if(this[y].wb&&t===this)throw Error("A 'pure' computed must not be called recursively");this[y].I[e]=i,i.Ka=this[y].V++,i.La=t.ob()},Xa:function(){var e,t,i=this[y].I;for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)&&(t=i[e],this.Ia&&t.da.Ja||t.da.Dd(t.La)))return!0},Jd:function(){this.Ia&&!this[y].rb&&this.Ia(!1)},ja:function(){var e=this[y];return e.ka||0<e.V},Rd:function(){this.Ja?this[y].ka&&(this[y].sa=!0):this.Hc()},$c:function(e){if(e.Hb){var t=e.subscribe(this.Jd,this,"dirty"),i=e.subscribe(this.Rd,this);return{da:e,s:function(){t.s(),i.s()}}}return e.subscribe(this.Hc,this)},Hc:function(){var e=this,t=e.throttleEvaluation;t&&0<=t?(clearTimeout(this[y].Ic),this[y].Ic=p.a.setTimeout((function(){e.ha(!0)}),t)):e.Ia?e.Ia(!0):e.ha(!0)},ha:function(e){var t=this[y],i=t.Sa,n=!1;if(!t.rb&&!t.ra){if(t.l&&!p.a.Sb(t.l)||i&&i()){if(!t.jc)return void this.s()}else t.jc=!1;t.rb=!0;try{n=this.zd(e)}finally{t.rb=!1}return n}},zd:function(t){var i=this[y],n=!1,r=i.wb?e:!i.V;n={qd:this,mb:i.I,Qb:i.V},p.u.xc({pd:n,od:f,o:this,Ya:r}),i.I={},i.V=0;var o=this.yd(i,n);return i.V?n=this.sb(i.X,o):(this.s(),n=!0),n&&(i.J?this.Gb():this.notifySubscribers(i.X,"beforeChange"),i.X=o,this.notifySubscribers(i.X,"spectate"),!i.J&&t&&this.notifySubscribers(i.X),this.rc&&this.rc()),r&&this.notifySubscribers(i.X,"awake"),n},yd:function(e,t){try{var i=e.Wc;return e.nb?i.call(e.nb):i()}finally{p.u.end(),t.Qb&&!e.J&&p.a.P(t.mb,d),e.sa=e.ka=!1}},v:function(e){var t=this[y];return(t.ka&&(e||!t.V)||t.J&&this.Xa())&&this.ha(),t.X},ub:function(e){p.T.fn.ub.call(this,e),this.nc=function(){return this[y].J||(this[y].sa?this.ha():this[y].ka=!1),this[y].X},this.Ia=function(e){this.pc(this[y].X),this[y].ka=!0,e&&(this[y].sa=!0),this.qc(this,!e)}},s:function(){var t=this[y];!t.J&&t.I&&p.a.P(t.I,(function(e,t){t.s&&t.s()})),t.l&&t.Rb&&p.a.K.yb(t.l,t.Rb),t.I=e,t.V=0,t.ra=!0,t.sa=!1,t.ka=!1,t.J=!1,t.l=e,t.Sa=e,t.Wc=e,this.Nc||(t.nb=e)}},b={Qa:function(e){var t=this,i=t[y];if(!i.ra&&i.J&&"change"==e){if(i.J=!1,i.sa||t.Xa())i.I=null,i.V=0,t.ha()&&t.Gb();else{var n=[];p.a.P(i.I,(function(e,t){n[t.Ka]=e})),p.a.D(n,(function(e,n){var r=i.I[e],o=t.$c(r.da);o.Ka=n,o.La=r.La,i.I[e]=o})),t.Xa()&&t.ha()&&t.Gb()}i.ra||t.notifySubscribers(i.X,"awake")}},hb:function(t){var i=this[y];i.ra||"change"!=t||this.Wa("change")||(p.a.P(i.I,(function(e,t){t.s&&(i.I[e]={da:t.da,Ka:t.Ka,La:t.La},t.s())})),i.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var e=this[y];return e.J&&(e.sa||this.Xa())&&this.ha(),p.T.fn.ob.call(this)}},T={Qa:function(e){"change"!=e&&"beforeChange"!=e||this.v()}};p.a.Ba&&p.a.setPrototypeOf($,p.T.fn);var C=p.ta.Ma;$[C]=p.o,p.Oc=function(e){return"function"==typeof e&&e[C]===$[C]},p.Fd=function(e){return p.Oc(e)&&e[y]&&e[y].wb},p.b("computed",p.o),p.b("dependentObservable",p.o),p.b("isComputed",p.Oc),p.b("isPureComputed",p.Fd),p.b("computed.fn",$),p.L($,"peek",$.v),p.L($,"dispose",$.s),p.L($,"isActive",$.ja),p.L($,"getDependenciesCount",$.qa),p.L($,"getDependencies",$.Va),p.xb=function(e,t){return"function"==typeof e?p.o(e,t,{pure:!0}):((e=p.a.extend({},e)).pure=!0,p.o(e,t))},p.b("pureComputed",p.xb),function(){function t(r,o,a){if(a=a||new n,"object"!=typeof(r=o(r))||null===r||r===e||r instanceof RegExp||r instanceof Date||r instanceof String||r instanceof Number||r instanceof Boolean)return r;var s=r instanceof Array?[]:{};return a.save(r,s),i(r,(function(i){var n=o(r[i]);switch(typeof n){case"boolean":case"number":case"string":case"function":s[i]=n;break;case"object":case"undefined":var l=a.get(n);s[i]=l!==e?l:t(n,o,a)}})),s}function i(e,t){if(e instanceof Array){for(var i=0;i<e.length;i++)t(i);"function"==typeof e.toJSON&&t("toJSON")}else for(i in e)t(i)}function n(){this.keys=[],this.values=[]}p.ad=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return t(e,(function(e){for(var t=0;p.O(e)&&10>t;t++)e=e();return e}))},p.toJSON=function(e,t,i){return e=p.ad(e),p.a.hc(e,t,i)},n.prototype={constructor:n,save:function(e,t){var i=p.a.A(this.keys,e);0<=i?this.values[i]=t:(this.keys.push(e),this.values.push(t))},get:function(t){return 0<=(t=p.a.A(this.keys,t))?this.values[t]:e}}}(),p.b("toJS",p.ad),p.b("toJSON",p.toJSON),p.Wd=function(e,t,i){function n(t){var n=p.xb(e,i).extend({ma:"always"}),r=n.subscribe((function(e){e&&(r.s(),t(e))}));return n.notifySubscribers(n.v()),r}return"function"!=typeof Promise||t?n(t.bind(i)):new Promise(n)},p.b("when",p.Wd),p.w={M:function(t){switch(p.a.R(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?p.a.g.get(t,p.c.options.$b):7>=p.a.W?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?p.w.M(t.options[t.selectedIndex]):e;default:return t.value}},cb:function(t,i,n){switch(p.a.R(t)){case"option":"string"==typeof i?(p.a.g.set(t,p.c.options.$b,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i):(p.a.g.set(t,p.c.options.$b,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:"");break;case"select":(""===i||null===i)&&(i=e);for(var r,o=-1,a=0,s=t.options.length;a<s;++a)if((r=p.w.M(t.options[a]))==i||""===r&&i===e){o=a;break}(n||0<=o||i===e&&1<t.size)&&(t.selectedIndex=o,6===p.a.W&&p.a.setTimeout((function(){t.selectedIndex=o}),0));break;default:(null===i||i===e)&&(i=""),t.value=i}}},p.b("selectExtensions",p.w),p.b("selectExtensions.readValue",p.w.M),p.b("selectExtensions.writeValue",p.w.cb),p.m=function(){function e(e){123===(e=p.a.Db(e)).charCodeAt(0)&&(e=e.slice(1,-1));var t,i=[],a=(e+="\n,").match(n),s=[],l=0;if(1<a.length){for(var u,c=0;u=a[c];++c){var h=u.charCodeAt(0);if(44===h){if(0>=l){i.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=l=0,s=[];continue}}else if(58===h){if(!l&&!t&&1===s.length){t=s.pop();continue}}else{if(47===h&&1<u.length&&(47===u.charCodeAt(1)||42===u.charCodeAt(1)))continue;47===h&&c&&1<u.length?(h=a[c-1].match(r))&&!o[h[0]]&&(a=(e=e.substr(e.indexOf(u)+1)).match(n),c=-1,u="/"):40===h||123===h||91===h?++l:41===h||125===h||93===h?--l:t||s.length||34!==h&&39!==h||(u=u.slice(1,-1))}s.push(u)}if(0<l)throw Error("Unbalanced parentheses, braces, or brackets")}return i}var t=["true","false","null","undefined"],i=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,n=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),r=/[\])"'A-Za-z0-9_$]+$/,o={in:1,return:1,typeof:1},a={};return{Ra:[],wa:a,ac:e,vb:function(n,r){function o(e,n){var r;if(!c){var h=p.getBindingHandler(e);if(h&&h.preprocess&&!(n=h.preprocess(n,e,o)))return;(h=a[e])&&(r=n,0<=p.a.A(t,r)?r=!1:(h=r.match(i),r=null!==h&&(h[1]?"Object("+h[1]+")"+h[2]:r)),h=r),h&&l.push("'"+("string"==typeof a[e]?a[e]:e)+"':function(_z){"+r+"=_z}")}u&&(n="function(){return "+n+" }"),s.push("'"+e+"':"+n)}var s=[],l=[],u=(r=r||{}).valueAccessors,c=r.bindingParams,h="string"==typeof n?e(n):n;return p.a.D(h,(function(e){o(e.key||e.unknown,e.value)})),l.length&&o("_ko_property_writers","{"+l.join(",")+" }"),s.join(",")},Id:function(e,t){for(var i=0;i<e.length;i++)if(e[i].key==t)return!0;return!1},eb:function(e,t,i,n,r){e&&p.O(e)?!p.Za(e)||r&&e.v()===n||e(n):(e=t.get("_ko_property_writers"))&&e[i]&&e[i](n)}}}(),p.b("expressionRewriting",p.m),p.b("expressionRewriting.bindingRewriteValidators",p.m.Ra),p.b("expressionRewriting.parseObjectLiteral",p.m.ac),p.b("expressionRewriting.preProcessBindings",p.m.vb),p.b("expressionRewriting._twoWayBindings",p.m.wa),p.b("jsonExpressionRewriting",p.m),p.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",p.m.vb),function(){function e(e){return 8==e.nodeType&&a.test(o?e.text:e.nodeValue)}function t(e){return 8==e.nodeType&&s.test(o?e.text:e.nodeValue)}function n(i,n){for(var r=i,o=1,a=[];r=r.nextSibling;){if(t(r)&&(p.a.g.set(r,u,!0),0==--o))return a;a.push(r),e(r)&&o++}if(!n)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function r(e,t){var i=n(e,t);return i?0<i.length?i[i.length-1].nextSibling:e.nextSibling:null}var o=i&&"\x3c!--test--\x3e"===i.createComment("test").text,a=o?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,s=o?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0},u="__ko_matchedEndComment__";p.h={ea:{},childNodes:function(t){return e(t)?n(t):t.childNodes},Ea:function(t){if(e(t))for(var i=0,n=(t=p.h.childNodes(t)).length;i<n;i++)p.removeNode(t[i]);else p.a.Tb(t)},va:function(t,i){if(e(t)){p.h.Ea(t);for(var n=t.nextSibling,r=0,o=i.length;r<o;r++)n.parentNode.insertBefore(i[r],n)}else p.a.va(t,i)},Vc:function(t,i){var n;e(t)?(n=t.nextSibling,t=t.parentNode):n=t.firstChild,n?i!==n&&t.insertBefore(i,n):t.appendChild(i)},Wb:function(t,i,n){n?(n=n.nextSibling,e(t)&&(t=t.parentNode),n?i!==n&&t.insertBefore(i,n):t.appendChild(i)):p.h.Vc(t,i)},firstChild:function(i){if(e(i))return!i.nextSibling||t(i.nextSibling)?null:i.nextSibling;if(i.firstChild&&t(i.firstChild))throw Error("Found invalid end comment, as the first child of "+i);return i.firstChild},nextSibling:function(i){if(e(i)&&(i=r(i)),i.nextSibling&&t(i.nextSibling)){var n=i.nextSibling;if(t(n)&&!p.a.g.get(n,u))throw Error("Found end comment without a matching opening comment, as child of "+i);return null}return i.nextSibling},Cd:e,Vd:function(e){return(e=(o?e.text:e.nodeValue).match(a))?e[1]:null},Sc:function(i){if(l[p.a.R(i)]){var n=i.firstChild;if(n)do{if(1===n.nodeType){var o,a=null;if(o=n.firstChild)do{if(a)a.push(o);else if(e(o)){var s=r(o,!0);s?o=s:a=[o]}else t(o)&&(a=[o])}while(o=o.nextSibling);if(o=a)for(a=n.nextSibling,s=0;s<o.length;s++)a?i.insertBefore(o[s],a):i.appendChild(o[s])}}while(n=n.nextSibling)}}}}(),p.b("virtualElements",p.h),p.b("virtualElements.allowedBindings",p.h.ea),p.b("virtualElements.emptyNode",p.h.Ea),p.b("virtualElements.insertAfter",p.h.Wb),p.b("virtualElements.prepend",p.h.Vc),p.b("virtualElements.setDomNodeChildren",p.h.va),p.ga=function(){this.nd={}},p.a.extend(p.ga.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||p.j.getComponentNameForNode(e);case 8:return p.h.Cd(e);default:return!1}},getBindings:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e):null;return p.j.tc(i,e,t,!1)},getBindingAccessors:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e,{valueAccessors:!0}):null;return p.j.tc(i,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return p.h.Vd(e);default:return null}},parseBindingsString:function(e,t,i,n){try{var r,o=this.nd,a=e+(n&&n.valueAccessors||"");if(!(r=o[a])){var s,l="with($context){with($data||{}){return{"+p.m.vb(e,n)+"}}}";s=new Function("$context","$element",l),r=o[a]=s}return r(t,i)}catch(t){throw t.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+t.message,t}}}),p.ga.instance=new p.ga,p.b("bindingProvider",p.ga),function(){function n(e){var t=(e=p.a.g.get(e,b))&&e.N;t&&(e.N=null,t.Tc())}function o(e,t,i){this.node=e,this.yc=t,this.kb=[],this.H=!1,t.N||p.a.K.za(e,n),i&&i.N&&(i.N.kb.push(e),this.Kb=i)}function a(e){return function(){return e}}function s(e){return e()}function l(e){return p.a.Ga(p.u.G(e),(function(t,i){return function(){return e()[i]}}))}function u(e,t,i){return"function"==typeof e?l(e.bind(null,t,i)):p.a.Ga(e,a)}function c(e,t){return l(this.getBindings.bind(this,e,t))}function h(e,t){var i=p.h.firstChild(t);if(i){var n,r=p.ga.instance,o=r.preprocessNode;if(o){for(;n=i;)i=p.h.nextSibling(n),o.call(r,n);i=p.h.firstChild(t)}for(;n=i;)i=p.h.nextSibling(n),d(e,n)}p.i.ma(t,p.i.H)}function d(e,t){var i=e,n=1===t.nodeType;n&&p.h.Sc(t),(n||p.ga.instance.nodeHasBindings(t))&&(i=_(t,null,e).bindingContextForDescendants),i&&!y[p.a.R(t)]&&h(i,t)}function f(e){var t=[],i={},n=[];return p.a.P(e,(function r(o){if(!i[o]){var a=p.getBindingHandler(o);a&&(a.after&&(n.push(o),p.a.D(a.after,(function(t){if(e[t]){if(-1!==p.a.A(n,t))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+n.join(", "));r(t)}})),n.length--),t.push({key:o,Mc:a})),i[o]=!0}})),t}function _(t,i,n){var r,o=p.a.g.Ub(t,b,{}),a=o.hd;if(!i){if(a)throw Error("You cannot apply bindings multiple times to the same element.");o.hd=!0}if(a||(o.context=n),o.Zb||(o.Zb={}),i&&"function"!=typeof i)r=i;else{var l=p.ga.instance,u=l.getBindingAccessors||c,h=p.$((function(){return(r=i?i(n,t):u.call(l,t,n))&&(n[g]&&n[g](),n[v]&&n[v]()),r}),null,{l:t});r&&h.ja()||(h=null)}var d,_=n;if(r){var m=function(){return p.a.Ga(h?h():r,s)},x=h?function(e){return function(){return s(h()[e])}}:function(e){return r[e]};m.get=function(e){return r[e]&&s(x(e))},m.has=function(e){return e in r},p.i.H in r&&p.i.subscribe(t,p.i.H,(function(){var e=(0,r[p.i.H])();if(e){var i=p.h.childNodes(t);i.length&&e(i,p.Ec(i[0]))}})),p.i.pa in r&&(_=p.i.Cb(t,n),p.i.subscribe(t,p.i.pa,(function(){var e=(0,r[p.i.pa])();e&&p.h.firstChild(t)&&e(t)}))),o=f(r),p.a.D(o,(function(i){var n=i.Mc.init,o=i.Mc.update,a=i.key;if(8===t.nodeType&&!p.h.ea[a])throw Error("The binding '"+a+"' cannot be used with virtual elements");try{"function"==typeof n&&p.u.G((function(){var i=n(t,x(a),m,_.$data,_);if(i&&i.controlsDescendantBindings){if(d!==e)throw Error("Multiple bindings ("+d+" and "+a+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");d=a}})),"function"==typeof o&&p.$((function(){o(t,x(a),m,_.$data,_)}),null,{l:t})}catch(e){throw e.message='Unable to process binding "'+a+": "+r[a]+'"\nMessage: '+e.message,e}}))}return{shouldBindDescendants:o=d===e,bindingContextForDescendants:o&&_}}function m(t,i){return t&&t instanceof p.fa?t:new p.fa(t,e,e,i)}var g=p.a.Da("_subscribable"),x=p.a.Da("_ancestorBindingInfo"),v=p.a.Da("_dataDependency");p.c={};var y={script:!0,textarea:!0,template:!0};p.getBindingHandler=function(e){return p.c[e]};var $={};p.fa=function(t,i,n,r,o){function a(){var e=h?c():c,t=p.a.f(e);return i?(p.a.extend(l,i),x in i&&(l[x]=i[x])):(l.$parents=[],l.$root=t,l.ko=p),l[g]=s,u?t=l.$data:(l.$rawData=e,l.$data=t),n&&(l[n]=t),r&&r(l,i,t),i&&i[g]&&!p.S.o().Vb(i[g])&&i[g](),d&&(l[v]=d),l.$data}var s,l=this,u=t===$,c=u?e:t,h="function"==typeof c&&!p.O(c),d=o&&o.dataDependency;o&&o.exportDependencies?a():((s=p.xb(a)).v(),s.ja()?s.equalityComparer=null:l[g]=e)},p.fa.prototype.createChildContext=function(e,t,i,n){if(!n&&t&&"object"==typeof t&&(t=(n=t).as,i=n.extend),t&&n&&n.noChildContext){var r="function"==typeof e&&!p.O(e);return new p.fa($,this,null,(function(n){i&&i(n),n[t]=r?e():e}),n)}return new p.fa(e,this,t,(function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),i&&i(e)}),n)},p.fa.prototype.extend=function(e,t){return new p.fa($,this,null,(function(t){p.a.extend(t,"function"==typeof e?e(t):e)}),t)};var b=p.a.g.Z();o.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},o.prototype.sd=function(e){p.a.Pa(this.kb,e),!this.kb.length&&this.H&&this.Cc()},o.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,p.a.K.yb(this.node,n),p.i.ma(this.node,p.i.pa),this.Tc())},p.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(e,t,i,n,r){var o=p.a.g.Ub(e,b,{});return o.Fa||(o.Fa=new p.T),r&&r.notifyImmediately&&o.Zb[t]&&p.u.G(i,n,[e]),o.Fa.subscribe(i,n,t)},ma:function(t,i){var n=p.a.g.get(t,b);if(n&&(n.Zb[i]=!0,n.Fa&&n.Fa.notifySubscribers(t,i),i==p.i.H))if(n.N)n.N.Cc();else if(n.N===e&&n.Fa&&n.Fa.Wa(p.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")},Cb:function(e,t){var i=p.a.g.Ub(e,b,{});return i.N||(i.N=new o(e,i,t[x])),t[x]==i?t:t.extend((function(e){e[x]=i}))}},p.Td=function(e){return(e=p.a.g.get(e,b))&&e.context},p.ib=function(e,t,i){return 1===e.nodeType&&p.h.Sc(e),_(e,t,m(i))},p.ld=function(e,t,i){return i=m(i),p.ib(e,u(t,i,e),i)},p.Oa=function(e,t){1!==t.nodeType&&8!==t.nodeType||h(m(e),t)},p.vc=function(e,n,o){if(!r&&t.jQuery&&(r=t.jQuery),2>arguments.length){if(!(n=i.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!n||1!==n.nodeType&&8!==n.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");d(m(e,o),n)},p.Dc=function(t){return!t||1!==t.nodeType&&8!==t.nodeType?e:p.Td(t)},p.Ec=function(t){return(t=p.Dc(t))?t.$data:e},p.b("bindingHandlers",p.c),p.b("bindingEvent",p.i),p.b("bindingEvent.subscribe",p.i.subscribe),p.b("bindingEvent.startPossiblyAsyncContentBinding",p.i.Cb),p.b("applyBindings",p.vc),p.b("applyBindingsToDescendants",p.Oa),p.b("applyBindingAccessorsToNode",p.ib),p.b("applyBindingsToNode",p.ld),p.b("contextFor",p.Dc),p.b("dataFor",p.Ec)}(),function(e){function t(t,n){var a,s=Object.prototype.hasOwnProperty.call(r,t)?r[t]:e;s?s.subscribe(n):((s=r[t]=new p.T).subscribe(n),i(t,(function(e,i){var n=!(!i||!i.synchronous);o[t]={definition:e,Gd:n},delete r[t],a||n?s.notifySubscribers(e):p.na.zb((function(){s.notifySubscribers(e)}))})),a=!0)}function i(e,t){n("getConfig",[e],(function(i){i?n("loadComponent",[e,i],(function(e){t(e,i)})):t(null,null)}))}function n(t,i,r,o){o||(o=p.j.loaders.slice(0));var a=o.shift();if(a){var s=a[t];if(s){var l=!1;if(s.apply(a,i.concat((function(e){l?r(null):null!==e?r(e):n(t,i,r,o)})))!==e&&(l=!0,!a.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else n(t,i,r,o)}else r(null)}var r={},o={};p.j={get:function(i,n){var r=Object.prototype.hasOwnProperty.call(o,i)?o[i]:e;r?r.Gd?p.u.G((function(){n(r.definition)})):p.na.zb((function(){n(r.definition)})):t(i,n)},Bc:function(e){delete o[e]},oc:n},p.j.loaders=[],p.b("components",p.j),p.b("components.get",p.j.get),p.b("components.clearCachedDefinition",p.j.Bc)}(),function(){function e(e,t,i,n){function r(){0==--s&&n(o)}var o={},s=2,l=i.template;i=i.viewModel,l?a(t,l,(function(t){p.j.oc("loadTemplate",[e,t],(function(e){o.template=e,r()}))})):r(),i?a(t,i,(function(t){p.j.oc("loadViewModel",[e,t],(function(e){o[c]=e,r()}))})):r()}function n(e,t,i){if("function"==typeof t)i((function(e){return new t(e)}));else if("function"==typeof t[c])i(t[c]);else if("instance"in t){var r=t.instance;i((function(){return r}))}else"viewModel"in t?n(e,t.viewModel,i):e("Unknown viewModel value: "+t)}function r(e){switch(p.a.R(e)){case"script":return p.a.ua(e.text);case"textarea":return p.a.ua(e.value);case"template":if(o(e.content))return p.a.Ca(e.content.childNodes)}return p.a.Ca(e.childNodes)}function o(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function a(e,i,n){"string"==typeof i.require?s||t.require?(s||t.require)([i.require],(function(e){e&&"object"==typeof e&&e.Xd&&e.default&&(e=e.default),n(e)})):e("Uses require, but no AMD loader is present"):n(i)}function l(e){return function(t){throw Error("Component '"+e+"': "+t)}}var u={};p.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(p.j.tb(e))throw Error("Component "+e+" is already registered");u[e]=t},p.j.tb=function(e){return Object.prototype.hasOwnProperty.call(u,e)},p.j.unregister=function(e){delete u[e],p.j.Bc(e)},p.j.Fc={getConfig:function(e,t){t(p.j.tb(e)?u[e]:null)},loadComponent:function(t,i,n){var r=l(t);a(r,i,(function(i){e(t,r,i,n)}))},loadTemplate:function(e,n,a){if(e=l(e),"string"==typeof n)a(p.a.ua(n));else if(n instanceof Array)a(n);else if(o(n))a(p.a.la(n.childNodes));else if(n.element)if(n=n.element,t.HTMLElement?n instanceof HTMLElement:n&&n.tagName&&1===n.nodeType)a(r(n));else if("string"==typeof n){var s=i.getElementById(n);s?a(r(s)):e("Cannot find element with ID "+n)}else e("Unknown element type: "+n);else e("Unknown template value: "+n)},loadViewModel:function(e,t,i){n(l(e),t,i)}};var c="createViewModel";p.b("components.register",p.j.register),p.b("components.isRegistered",p.j.tb),p.b("components.unregister",p.j.unregister),p.b("components.defaultLoader",p.j.Fc),p.j.loaders.push(p.j.Fc),p.j.dd=u}(),function(){function e(e,i){if(n=e.getAttribute("params")){var n=t.parseBindingsString(n,i,e,{valueAccessors:!0,bindingParams:!0}),r=(n=p.a.Ga(n,(function(t){return p.o(t,null,{l:e})})),p.a.Ga(n,(function(t){var i=t.v();return t.ja()?p.o({read:function(){return p.a.f(t())},write:p.Za(i)&&function(e){t()(e)},l:e}):i})));return Object.prototype.hasOwnProperty.call(r,"$raw")||(r.$raw=n),r}return{$raw:{}}}p.j.getComponentNameForNode=function(e){var t=p.a.R(e);if(p.j.tb(t)&&(-1!=t.indexOf("-")||""+e=="[object HTMLUnknownElement]"||8>=p.a.W&&e.tagName===t))return t},p.j.tc=function(t,i,n,r){if(1===i.nodeType){var o=p.j.getComponentNameForNode(i);if(o){if((t=t||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var a={name:o,params:e(i,n)};t.component=r?function(){return a}:a}}return t};var t=new p.ga;9>p.a.W&&(p.j.register=function(e){return function(t){return e.apply(this,arguments)}}(p.j.register),i.createDocumentFragment=function(e){return function(){var t=e();return p.j.dd,t}}(i.createDocumentFragment))}(),function(){function e(e,t,i){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=p.a.Ca(t),p.h.va(i,e)}function t(e,t,i){var n=e.createViewModel;return n?n.call(e,t,i):t}var i=0;p.c.component={init:function(n,r,o,a,s){function l(){var e=u&&u.dispose;"function"==typeof e&&e.call(u),h&&h.s(),c=u=h=null}var u,c,h,d=p.a.la(p.h.childNodes(n));return p.h.Ea(n),p.a.K.za(n,l),p.o((function(){var o,a,f=p.a.f(r());if("string"==typeof f?o=f:(o=p.a.f(f.name),a=p.a.f(f.params)),!o)throw Error("No component name specified");var _=p.i.Cb(n,s),m=c=++i;p.j.get(o,(function(i){if(c===m){if(l(),!i)throw Error("Unknown component '"+o+"'");e(o,i,n);var r=t(i,a,{element:n,templateNodes:d});i=_.createChildContext(r,{extend:function(e){e.$component=r,e.$componentTemplateNodes=d}}),r&&r.koDescendantsComplete&&(h=p.i.subscribe(n,p.i.pa,r.koDescendantsComplete,r)),u=r,p.Oa(i,n)}}))}),null,{l:n}),{controlsDescendantBindings:!0}}},p.h.ea.component=!0}();var S={class:"className",for:"htmlFor"};p.c.attr={update:function(t,i){var n=p.a.f(i())||{};p.a.P(n,(function(i,n){n=p.a.f(n);var r=i.indexOf(":"),o=(r="lookupNamespaceURI"in t&&0<r&&t.lookupNamespaceURI(i.substr(0,r)),!1===n||null===n||n===e);o?r?t.removeAttributeNS(r,i):t.removeAttribute(i):n=n.toString(),8>=p.a.W&&i in S?(i=S[i],o?t.removeAttribute(i):t[i]=n):o||(r?t.setAttributeNS(r,i,n):t.setAttribute(i,n)),"name"===i&&p.a.Yc(t,o?"":n)}))}},p.c.checked={after:["value","attr"],init:function(t,i,n){function r(){var r=t.checked,o=a();if(!p.S.Ya()&&(r||!l&&!p.S.qa())){var u=p.u.G(i);if(c){var d=h?u.v():u,_=f;f=o,_!==o?r&&(p.a.Na(d,o,!0),p.a.Na(d,_,!1)):p.a.Na(d,o,r),h&&p.Za(u)&&u(d)}else s&&(o===e?o=r:r||(o=e)),p.m.eb(u,n,"checked",o,!0)}}function o(){var n=p.a.f(i()),r=a();c?(t.checked=0<=p.a.A(n,r),f=r):t.checked=s&&r===e?!!n:a()===n}var a=p.xb((function(){return n.has("checkedValue")?p.a.f(n.get("checkedValue")):d?n.has("value")?p.a.f(n.get("value")):t.value:void 0})),s="checkbox"==t.type,l="radio"==t.type;if(s||l){var u=i(),c=s&&p.a.f(u)instanceof Array,h=!(c&&u.push&&u.splice),d=l||c,f=c?a():e;l&&!t.name&&p.c.uniqueName.init(t,(function(){return!0})),p.o(r,null,{l:t}),p.a.B(t,"click",r),p.o(o,null,{l:t}),u=e}}},p.m.wa.checked=!0,p.c.checkedValue={update:function(e,t){e.value=p.a.f(t())}},p.c.class={update:function(e,t){var i=p.a.Db(p.a.f(t()));p.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=i,p.a.Eb(e,i,!0)}},p.c.css={update:function(e,t){var i=p.a.f(t());null!==i&&"object"==typeof i?p.a.P(i,(function(t,i){i=p.a.f(i),p.a.Eb(e,t,i)})):p.c.class.update(e,t)}},p.c.enable={update:function(e,t){var i=p.a.f(t());i&&e.disabled?e.removeAttribute("disabled"):i||e.disabled||(e.disabled=!0)}},p.c.disable={update:function(e,t){p.c.enable.update(e,(function(){return!p.a.f(t())}))}},p.c.event={init:function(e,t,i,n,r){var o=t()||{};p.a.P(o,(function(o){"string"==typeof o&&p.a.B(e,o,(function(e){var a,s=t()[o];if(s){try{var l=p.a.la(arguments);n=r.$data,l.unshift(n),a=s.apply(n,l)}finally{!0!==a&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===i.get(o+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}}))}))}},p.c.foreach={Rc:function(e){return function(){var t=e(),i=p.a.bc(t);return i&&"number"!=typeof i.length?(p.a.f(t),{foreach:i.data,as:i.as,noChildContext:i.noChildContext,includeDestroyed:i.includeDestroyed,afterAdd:i.afterAdd,beforeRemove:i.beforeRemove,afterRender:i.afterRender,beforeMove:i.beforeMove,afterMove:i.afterMove,templateEngine:p.ba.Ma}):{foreach:t,templateEngine:p.ba.Ma}}},init:function(e,t){return p.c.template.init(e,p.c.foreach.Rc(t))},update:function(e,t,i,n,r){return p.c.template.update(e,p.c.foreach.Rc(t),i,n,r)}},p.m.Ra.foreach=!1,p.h.ea.foreach=!0,p.c.hasfocus={init:function(e,t,i){function n(n){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var o;try{o=r.activeElement}catch{o=r.body}n=o===e}r=t(),p.m.eb(r,i,"hasfocus",n,!0),e.__ko_hasfocusLastValue=n,e.__ko_hasfocusUpdating=!1}var r=n.bind(null,!0),o=n.bind(null,!1);p.a.B(e,"focus",r),p.a.B(e,"focusin",r),p.a.B(e,"blur",o),p.a.B(e,"focusout",o),e.__ko_hasfocusLastValue=!1},update:function(e,t){var i=!!p.a.f(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===i||(i?e.focus():e.blur(),!i&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),p.u.G(p.a.Fb,null,[e,i?"focusin":"focusout"]))}},p.m.wa.hasfocus=!0,p.c.hasFocus=p.c.hasfocus,p.m.wa.hasFocus="hasfocus",p.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){p.a.fc(e,t())}},function(){function e(e,t,i){p.c[e]={init:function(e,n,r,o,a){var s,l,u,c,h,d={};if(t){o=r.get("as");var f=r.get("noChildContext");d={as:o,noChildContext:f,exportDependencies:h=!(o&&f)}}return c=(u="render"==r.get("completeOn"))||r.has(p.i.pa),p.o((function(){var r,o=p.a.f(n()),f=!i!=!o,_=!l;(h||f!==s)&&(c&&(a=p.i.Cb(e,a)),f&&((!t||h)&&(d.dataDependency=p.S.o()),r=t?a.createChildContext("function"==typeof o?o:n,d):p.S.qa()?a.extend(null,d):a),_&&p.S.qa()&&(l=p.a.Ca(p.h.childNodes(e),!0)),f?(_||p.h.va(e,p.a.Ca(l)),p.Oa(r,e)):(p.h.Ea(e),u||p.i.ma(e,p.i.H)),s=f)}),null,{l:e}),{controlsDescendantBindings:!0}}},p.m.Ra[e]=!1,p.h.ea[e]=!0}e("if"),e("ifnot",!1,!0),e("with",!0)}(),p.c.let={init:function(e,t,i,n,r){return t=r.extend(t),p.Oa(t,e),{controlsDescendantBindings:!0}}},p.h.ea.let=!0;var w={};p.c.options={init:function(e){if("select"!==p.a.R(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,n){function r(){return p.a.jb(t.options,(function(e){return e.selected}))}function o(e,t,i){var n=typeof t;return"function"==n?t(e):"string"==n?e[t]:i}function a(e,i){if(_&&c)p.i.ma(t,p.i.H);else if(f.length){var n=0<=p.a.A(f,p.w.M(i[0]));p.a.Zc(i[0],n),_&&!n&&p.u.G(p.a.Fb,null,[t,"change"])}}var s=t.multiple,l=0!=t.length&&s?t.scrollTop:null,u=p.a.f(i()),c=n.get("valueAllowUnset")&&n.has("value"),h=n.get("optionsIncludeDestroyed");i={};var d,f=[];c||(s?f=p.a.Mb(r(),p.w.M):0<=t.selectedIndex&&f.push(p.w.M(t.options[t.selectedIndex]))),u&&(typeof u.length>"u"&&(u=[u]),d=p.a.jb(u,(function(t){return h||t===e||null===t||!p.a.f(t._destroy)})),n.has("optionsCaption")&&null!==(u=p.a.f(n.get("optionsCaption")))&&u!==e&&d.unshift(w));var _=!1;i.beforeRemove=function(e){t.removeChild(e)},u=a,n.has("optionsAfterRender")&&"function"==typeof n.get("optionsAfterRender")&&(u=function(t,i){a(0,i),p.u.G(n.get("optionsAfterRender"),null,[i[0],t!==w?t:e])}),p.a.ec(t,d,(function(i,r,a){return a.length&&(f=!c&&a[0].selected?[p.w.M(a[0])]:[],_=!0),r=t.ownerDocument.createElement("option"),i===w?(p.a.Bb(r,n.get("optionsCaption")),p.w.cb(r,e)):(a=o(i,n.get("optionsValue"),i),p.w.cb(r,p.a.f(a)),i=o(i,n.get("optionsText"),a),p.a.Bb(r,i)),[r]}),i,u),c||(s?f.length&&r().length<f.length:f.length&&0<=t.selectedIndex?p.w.M(t.options[t.selectedIndex])!==f[0]:f.length||0<=t.selectedIndex)&&p.u.G(p.a.Fb,null,[t,"change"]),(c||p.S.Ya())&&p.i.ma(t,p.i.H),p.a.wd(t),l&&20<Math.abs(l-t.scrollTop)&&(t.scrollTop=l)}},p.c.options.$b=p.a.g.Z(),p.c.selectedOptions={init:function(e,t,i){function n(){var n=t(),r=[];p.a.D(e.getElementsByTagName("option"),(function(e){e.selected&&r.push(p.w.M(e))})),p.m.eb(n,i,"selectedOptions",r)}function r(){var i=p.a.f(t()),n=e.scrollTop;i&&"number"==typeof i.length&&p.a.D(e.getElementsByTagName("option"),(function(e){var t=0<=p.a.A(i,p.w.M(e));e.selected!=t&&p.a.Zc(e,t)})),e.scrollTop=n}if("select"!=p.a.R(e))throw Error("selectedOptions binding applies only to SELECT elements");var o;p.i.subscribe(e,p.i.H,(function(){o?n():(p.a.B(e,"change",n),o=p.o(r,null,{l:e}))}),null,{notifyImmediately:!0})},update:function(){}},p.m.wa.selectedOptions=!0,p.c.style={update:function(t,i){var n=p.a.f(i()||{});p.a.P(n,(function(i,n){if((null===(n=p.a.f(n))||n===e||!1===n)&&(n=""),r)r(t).css(i,n);else if(/^--/.test(i))t.style.setProperty(i,n);else{i=i.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));var o=t.style[i];t.style[i]=n,n===o||t.style[i]!=o||isNaN(n)||(t.style[i]=n+"px")}}))}},p.c.submit={init:function(e,t,i,n,r){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");p.a.B(e,"submit",(function(i){var n,o=t();try{n=o.call(r.$data,e)}finally{!0!==n&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}}))}},p.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){p.a.Bb(e,t())}},p.h.ea.text=!0,function(){if(t&&t.navigator){var i,n,r,o,a,s=function(e){if(e)return parseFloat(e[1])},l=t.navigator.userAgent;(i=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(a=s(l.match(/Edge\/([^ ]+)$/)))||s(l.match(/Chrome\/([^ ]+)/))||(n=s(l.match(/Version\/([^ ]+) Safari/)))||(r=s(l.match(/Firefox\/([^ ]+)/)))||(o=p.a.W||s(l.match(/MSIE ([^ ]+)/)))||(o=s(l.match(/rv:([^ )]+)/)))}if(8<=o&&10>o)var u=p.a.g.Z(),c=p.a.g.Z(),h=function(e){var t=this.activeElement;(t=t&&p.a.g.get(t,c))&&t(e)},d=function(e,t){var i=e.ownerDocument;p.a.g.get(i,u)||(p.a.g.set(i,u,!0),p.a.B(i,"selectionchange",h)),p.a.g.set(e,c,t)};p.c.textInput={init:function(t,s,l){function u(e,i){p.a.B(t,e,i)}function c(){var i=p.a.f(s());(null===i||i===e)&&(i=""),m!==e&&i===m?p.a.setTimeout(c,4):t.value!==i&&(v=!0,t.value=i,v=!1,g=t.value)}function h(){_||(m=t.value,_=p.a.setTimeout(f,4))}function f(){clearTimeout(_),m=_=e;var i=t.value;g!==i&&(g=i,p.m.eb(s(),l,"textInput",i))}var _,m,g=t.value,x=9==p.a.W?h:f,v=!1;o&&u("keypress",f),11>o&&u("propertychange",(function(e){v||"value"!==e.propertyName||x()})),8==o&&(u("keyup",f),u("keydown",f)),d&&(d(t,x),u("dragend",h)),(!o||9<=o)&&u("input",x),5>n&&"textarea"===p.a.R(t)?(u("keydown",h),u("paste",h),u("cut",h)):11>i?u("keydown",h):4>r?(u("DOMAutoComplete",f),u("dragdrop",f),u("drop",f)):a&&"number"===t.type&&u("keydown",h),u("change",f),u("blur",f),p.o(c,null,{l:t})}},p.m.wa.textInput=!0,p.c.textinput={preprocess:function(e,t,i){i("textInput",e)}}}(),p.c.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++p.c.uniqueName.rd;p.a.Yc(e,i)}}},p.c.uniqueName.rd=0,p.c.using={init:function(e,t,i,n,r){var o;return i.has("as")&&(o={as:i.get("as"),noChildContext:i.get("noChildContext")}),t=r.createChildContext(t,o),p.Oa(t,e),{controlsDescendantBindings:!0}}},p.h.ea.using=!0,p.c.value={init:function(t,i,n){var r=p.a.R(t),o="input"==r;if(!o||"checkbox"!=t.type&&"radio"!=t.type){var a=[],s=n.get("valueUpdate"),l=!1,u=null;s&&(a="string"==typeof s?[s]:p.a.wc(s),p.a.Pa(a,"change"));var c,h,d=function(){u=null,l=!1;var e=i(),r=p.w.M(t);p.m.eb(e,n,"value",r)};!p.a.W||!o||"text"!=t.type||"off"==t.autocomplete||t.form&&"off"==t.form.autocomplete||-1!=p.a.A(a,"propertychange")||(p.a.B(t,"propertychange",(function(){l=!0})),p.a.B(t,"focus",(function(){l=!1})),p.a.B(t,"blur",(function(){l&&d()}))),p.a.D(a,(function(e){var i=d;p.a.Ud(e,"after")&&(i=function(){u=p.w.M(t),p.a.setTimeout(d,0)},e=e.substring(5)),p.a.B(t,e,i)})),c=o&&"file"==t.type?function(){var n=p.a.f(i());null===n||n===e||""===n?t.value="":p.u.G(d)}:function(){var o=p.a.f(i()),a=p.w.M(t);null!==u&&o===u?p.a.setTimeout(c,0):(o!==a||a===e)&&("select"===r?(a=n.get("valueAllowUnset"),p.w.cb(t,o,a),a||o===p.w.M(t)||p.u.G(d)):p.w.cb(t,o))},"select"===r?p.i.subscribe(t,p.i.H,(function(){h?n.get("valueAllowUnset")?c():d():(p.a.B(t,"change",d),h=p.o(c,null,{l:t}))}),null,{notifyImmediately:!0}):(p.a.B(t,"change",d),p.o(c,null,{l:t}))}else p.ib(t,{checkedValue:i})},update:function(){}},p.m.wa.value=!0,p.c.visible={update:function(e,t){var i=p.a.f(t()),n="none"!=e.style.display;i&&!n?e.style.display="":!i&&n&&(e.style.display="none")}},p.c.hidden={update:function(e,t){p.c.visible.update(e,(function(){return!p.a.f(t())}))}},function(e){p.c[e]={init:function(t,i,n,r,o){return p.c.event.init.call(this,t,(function(){var t={};return t[e]=i(),t}),n,r,o)}}}("click"),p.ca=function(){},p.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},p.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},p.ca.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){var n=(t=t||i).getElementById(e);if(!n)throw Error("Cannot find template with ID "+e);return new p.C.F(n)}if(1==e.nodeType||8==e.nodeType)return new p.C.ia(e);throw Error("Unknown template type: "+e)},p.ca.prototype.renderTemplate=function(e,t,i,n){return e=this.makeTemplateSource(e,n),this.renderTemplateSource(e,t,i,n)},p.ca.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},p.ca.prototype.rewriteTemplate=function(e,t,i){t=t((e=this.makeTemplateSource(e,i)).text()),e.text(t),e.data("isRewritten",!0)},p.b("templateEngine",p.ca),p.kc=function(){function e(e,t,i,n){e=p.m.ac(e);for(var r=p.m.Ra,o=0;o<e.length;o++){var a=e[o].key;if(Object.prototype.hasOwnProperty.call(r,a)){var s=r[a];if("function"==typeof s){if(a=s(e[o].value))throw Error(a)}else if(!s)throw Error("This template engine does not support the '"+a+"' binding within its templates")}}return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+p.m.vb(e,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",n.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(e,t,i){t.isTemplateRewritten(e,i)||t.rewriteTemplate(e,(function(e){return p.kc.Ld(e,t)}),i)},Ld:function(n,r){return n.replace(t,(function(t,i,n,o,a){return e(a,i,n,r)})).replace(i,(function(t,i){return e(i,"\x3c!-- ko --\x3e","#comment",r)}))},md:function(e,t){return p.aa.Xb((function(i,n){var r=i.nextSibling;r&&r.nodeName.toLowerCase()===t&&p.ib(r,e,n)}))}}}(),p.b("__tr_ambtns",p.kc.md),function(){p.C={},p.C.F=function(e){if(this.F=e){var t=p.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},p.C.F.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[e];var t=arguments[0];"innerHTML"===e?p.a.fc(this.F,t):this.F[e]=t};var t=p.a.g.Z()+"_";p.C.F.prototype.data=function(e){if(1===arguments.length)return p.a.g.get(this.F,t+e);p.a.g.set(this.F,t+e,arguments[1])};var i=p.a.g.Z();p.C.F.prototype.nodes=function(){var t=this.F;if(0==arguments.length){var n=p.a.g.get(t,i)||{},r=n.lb||(3===this.ab?t.content:4===this.ab?t:e);if(!r||n.jd){var o=this.text();o&&o!==n.bb&&(r=p.a.Md(o,t.ownerDocument),p.a.g.set(t,i,{lb:r,bb:o,jd:!0}))}return r}n=arguments[0],this.ab!==e&&this.text(""),p.a.g.set(t,i,{lb:n})},p.C.ia=function(e){this.F=e},p.C.ia.prototype=new p.C.F,p.C.ia.prototype.constructor=p.C.ia,p.C.ia.prototype.text=function(){if(0==arguments.length){var t=p.a.g.get(this.F,i)||{};return t.bb===e&&t.lb&&(t.bb=t.lb.innerHTML),t.bb}p.a.g.set(this.F,i,{bb:arguments[0]})},p.b("templateSources",p.C),p.b("templateSources.domElement",p.C.F),p.b("templateSources.anonymousTemplate",p.C.ia)}(),function(){function t(e,t,i){var n;for(t=p.h.nextSibling(t);e&&(n=e)!==t;)i(n,e=p.h.nextSibling(n))}function i(e,i){if(e.length){var n=e[0],r=e[e.length-1],o=n.parentNode,a=p.ga.instance,s=a.preprocessNode;if(s){if(t(n,r,(function(e,t){var i=e.previousSibling,o=s.call(a,e);o&&(e===n&&(n=o[0]||t),e===r&&(r=o[o.length-1]||i))})),e.length=0,!n)return;n===r?e.push(n):(e.push(n,r),p.a.Ua(e,o))}t(n,r,(function(e){1!==e.nodeType&&8!==e.nodeType||p.vc(i,e)})),t(n,r,(function(e){1!==e.nodeType&&8!==e.nodeType||p.aa.cd(e,[i])})),p.a.Ua(e,o)}}function n(e){return e.nodeType?e:0<e.length?e[0]:null}function r(e,t,r,o,s){s=s||{};var l=(e&&n(e)||r||{}).ownerDocument,u=s.templateEngine||a;if(p.kc.xd(r,u,l),"number"!=typeof(r=u.renderTemplate(r,o,s,l)).length||0<r.length&&"number"!=typeof r[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(l=!1,t){case"replaceChildren":p.h.va(e,r),l=!0;break;case"replaceNode":p.a.Xc(e,r),l=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t)}return l&&(i(r,o),s.afterRender&&p.u.G(s.afterRender,null,[r,o[s.as||"$data"]]),"replaceChildren"==t&&p.i.ma(e,p.i.H)),r}function o(e,t,i){return p.O(e)?e():"function"==typeof e?e(t,i):e}var a;p.gc=function(t){if(t!=e&&!(t instanceof p.ca))throw Error("templateEngine must inherit from ko.templateEngine");a=t},p.dc=function(t,i,s,l,u){if(((s=s||{}).templateEngine||a)==e)throw Error("Set a template engine before calling renderTemplate");if(u=u||"replaceChildren",l){var c=n(l);return p.$((function(){var e=i&&i instanceof p.fa?i:new p.fa(i,null,null,null,{exportDependencies:!0}),a=o(t,e.$data,e);e=r(l,u,a,e,s),"replaceNode"==u&&(c=n(l=e))}),null,{Sa:function(){return!c||!p.a.Sb(c)},l:c&&"replaceNode"==u?c.parentNode:c})}return p.aa.Xb((function(e){p.dc(t,i,s,e,"replaceNode")}))},p.Qd=function(t,n,a,s,l){function u(e,t){p.u.G(p.a.ec,null,[s,e,h,a,c,t]),p.i.ma(s,p.i.H)}function c(e,t){i(t,d),a.afterRender&&a.afterRender(t,e),d=null}function h(e,i){d=l.createChildContext(e,{as:f,noChildContext:a.noChildContext,extend:function(e){e.$index=i,f&&(e[f+"Index"]=i)}});var n=o(t,e,d);return r(s,"ignoreTargetNode",n,d,a)}var d,f=a.as,_=!1===a.includeDestroyed||p.options.foreachHidesDestroyed&&!a.includeDestroyed;if(_||a.beforeRemove||!p.Pc(n))return p.$((function(){var t=p.a.f(n)||[];typeof t.length>"u"&&(t=[t]),_&&(t=p.a.jb(t,(function(t){return t===e||null===t||!p.a.f(t._destroy)}))),u(t)}),null,{l:s});u(n.v());var m=n.subscribe((function(e){u(n(),e)}),null,"arrayChange");return m.l(s),m};var s=p.a.g.Z(),l=p.a.g.Z();p.c.template={init:function(e,t){var i=p.a.f(t());if("string"==typeof i||"name"in i)p.h.Ea(e);else if("nodes"in i){if(i=i.nodes||[],p.O(i))throw Error('The "nodes" option must be a plain, non-observable array.');var n=i[0]&&i[0].parentNode;n&&p.a.g.get(n,l)||(n=p.a.Yb(i),p.a.g.set(n,l,!0)),new p.C.ia(e).nodes(n)}else{if(!(0<(i=p.h.childNodes(e)).length))throw Error("Anonymous template defined, but no template content was provided");n=p.a.Yb(i),new p.C.ia(e).nodes(n)}return{controlsDescendantBindings:!0}},update:function(t,i,n,r,o){var a=i();n=!0,r=null,"string"==typeof(i=p.a.f(a))?i={}:(a="name"in i?i.name:t,"if"in i&&(n=p.a.f(i.if)),n&&"ifnot"in i&&(n=!p.a.f(i.ifnot)),n&&!a&&(n=!1)),"foreach"in i?r=p.Qd(a,n&&i.foreach||[],i,t,o):n?(n=o,"data"in i&&(n=o.createChildContext(i.data,{as:i.as,noChildContext:i.noChildContext,exportDependencies:!0})),r=p.dc(a,n,i,t)):p.h.Ea(t),o=r,(i=p.a.g.get(t,s))&&"function"==typeof i.s&&i.s(),p.a.g.set(t,s,!o||o.ja&&!o.ja()?e:o)}},p.m.Ra.template=function(e){return 1==(e=p.m.ac(e)).length&&e[0].unknown||p.m.Id(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"},p.h.ea.template=!0}(),p.b("setTemplateEngine",p.gc),p.b("renderTemplate",p.dc),p.a.Kc=function(e,t,i){var n,r,o,a,s;if(e.length&&t.length)for(n=r=0;(!i||n<i)&&(a=e[r]);++r){for(o=0;s=t[o];++o)if(a.value===s.value){a.moved=s.index,s.moved=a.index,t.splice(o,1),n=o=0;break}n+=o}},p.a.Pb=function(){function e(e,t,i,n,r){var o,a,s,l,u,c=Math.min,h=Math.max,d=[],f=e.length,_=t.length,m=_-f||1,g=f+_+1;for(o=0;o<=f;o++)for(l=s,d.push(s=[]),u=c(_,o+m),a=h(0,o-1);a<=u;a++)s[a]=a?o?e[o-1]===t[a-1]?l[a-1]:c(l[a]||g,s[a-1]||g)+1:a+1:o+1;for(c=[],h=[],m=[],o=f,a=_;o||a;)_=d[o][a]-1,a&&_===d[o][a-1]?h.push(c[c.length]={status:i,value:t[--a],index:a}):o&&_===d[o-1][a]?m.push(c[c.length]={status:n,value:e[--o],index:o}):(--a,--o,r.sparse||c.push({status:"retained",value:t[a]}));return p.a.Kc(m,h,!r.dontLimitMoves&&10*f),c.reverse()}return function(t,i,n){return n="boolean"==typeof n?{dontLimitMoves:n}:n||{},i=i||[],(t=t||[]).length<i.length?e(t,i,"added","deleted",n):e(i,t,"deleted","added",n)}}(),p.b("utils.compareArrays",p.a.Pb),function(){function t(t,i,n,r,o){var a=[],s=p.$((function(){var e=i(n,o,p.a.Ua(a,t))||[];0<a.length&&(p.a.Xc(a,e),r&&p.u.G(r,null,[n,e,o])),a.length=0,p.a.Nb(a,e)}),null,{l:t,Sa:function(){return!p.a.kd(a)}});return{Y:a,$:s.ja()?s:e}}var i=p.a.g.Z(),n=p.a.g.Z();p.a.ec=function(r,o,a,s,l,u){function c(e){f={Aa:e,pb:p.ta(b++)},y.push(f),v||E.push(f)}function h(e){f=x[e],b!==f.pb.v()&&w.push(f),f.pb(b++),p.a.Ua(f.Y,r),y.push(f)}function d(e,t){if(e)for(var i=0,n=t.length;i<n;i++)p.a.D(t[i].Y,(function(n){e(n,i,t[i].Aa)}))}typeof(o=o||[]).length>"u"&&(o=[o]),s=s||{};var f,_,m,g,x=p.a.g.get(r,i),v=!x,y=[],$=0,b=0,T=[],C=[],S=[],w=[],E=[],P=0;if(v)p.a.D(o,c);else{if(!u||x&&x._countWaitingForRemove){var A=p.a.Mb(x,(function(e){return e.Aa}));u=p.a.Pb(A,o,{dontLimitMoves:s.dontLimitMoves,sparse:!0})}var L,M,R;for(A=0;L=u[A];A++)switch(M=L.moved,R=L.index,L.status){case"deleted":for(;$<R;)h($++);M===e&&((f=x[$]).$&&(f.$.s(),f.$=e),p.a.Ua(f.Y,r).length&&(s.beforeRemove&&(y.push(f),P++,f.Aa===n?f=null:S.push(f)),f&&T.push.apply(T,f.Y))),$++;break;case"added":for(;b<R;)h($++);M!==e?(C.push(y.length),h(M)):c(L.value)}for(;b<o.length;)h($++);y._countWaitingForRemove=P}p.a.g.set(r,i,y),d(s.beforeMove,w),p.a.D(T,s.beforeRemove?p.oa:p.removeNode);try{g=r.ownerDocument.activeElement}catch{}if(C.length)for(;(A=C.shift())!=e;){for(f=y[A],_=e;A;)if((m=y[--A].Y)&&m.length){_=m[m.length-1];break}for(o=0;$=f.Y[o];_=$,o++)p.h.Wb(r,$,_)}for(A=0;f=y[A];A++){for(f.Y||p.a.extend(f,t(r,a,f.Aa,l,f.pb)),o=0;$=f.Y[o];_=$,o++)p.h.Wb(r,$,_);!f.Ed&&l&&(l(f.Aa,f.Y,f.pb),f.Ed=!0,_=f.Y[f.Y.length-1])}for(g&&r.ownerDocument.activeElement!=g&&g.focus(),d(s.beforeRemove,S),A=0;A<S.length;++A)S[A].Aa=n;d(s.afterMove,w),d(s.afterAdd,E)}}(),p.b("utils.setDomNodeChildrenFromArrayMapping",p.a.ec),p.ba=function(){this.allowTemplateRewriting=!1},p.ba.prototype=new p.ca,p.ba.prototype.constructor=p.ba,p.ba.prototype.renderTemplateSource=function(e,t,i,n){return(t=9>p.a.W||!e.nodes?null:e.nodes())?p.a.la(t.cloneNode(!0).childNodes):(e=e.text(),p.a.ua(e,n))},p.ba.Ma=new p.ba,p.gc(p.ba.Ma),p.b("nativeTemplateEngine",p.ba),function(){p.$a=function(){var e=this.Hd=function(){if(!r||!r.tmpl)return 0;try{if(0<=r.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch{}return 1}();this.renderTemplateSource=function(t,n,o,a){if(a=a||i,o=o||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=t.data("precompiled");return s||(s=t.text()||"",s=r.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),t.data("precompiled",s)),t=[n.$data],n=r.extend({koBindingContext:n},o.templateOptions),(n=r.tmpl(s,t,n)).appendTo(a.createElement("div")),r.fragments={},n},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){i.write("<script type='text/html' id='"+e+"'>"+t+"<\/script>")},0<e&&(r.tmpl.tag.ko_code={open:"__.push($1 || '');"},r.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},p.$a.prototype=new p.ca,p.$a.prototype.constructor=p.$a;var e=new p.$a;0<e.Hd&&p.gc(e),p.b("jqueryTmplTemplateEngine",p.$a)}()}(t.ko={})}();var ce$1=ko;typeof window<"u"?(ko=window.ko,typeof G<"u"?window.ko=G:delete window.ko):(ko=global.ko,typeof G<"u"?global.ko=G:delete global.ko);var s$5="__knockoutObservables",o$5="__knockoutSubscribable";function f$5(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var i=this,n=c$6(e,!0);return(t=t||Object.getOwnPropertyNames(e)).forEach((function(t){if(t!==s$5&&t!==o$5&&!(t in n)){var r=e[t],o=r instanceof Array,a=i.isObservable(r)?r:o?i.observableArray(r):i.observable(r);Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:a,set:i.isWriteableObservable(a)?a:void 0}),n[t]=a,o&&d$6(i,a)}})),e}function c$6(e,t){var i=e[s$5];return!i&&t&&(i={},Object.defineProperty(e,s$5,{value:i})),i}function v$4(e,t,i){var n={owner:e,deferEvaluation:!0};if("function"==typeof i)n.read=i;else{if("value"in i)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof i.get)throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');n.read=i.get,n.write=i.set}return e[t]=this.computed(n),f$5.call(this,e,[t]),e}function d$6(e,t){var i=null;e.computed((function(){i&&(i.dispose(),i=null);var n=t();n instanceof Array&&(i=h$2(e,t,n))}))}function h$2(e,t,i){return y$5(e,i).subscribe(t)}function y$5(e,t){var i=t[o$5];if(!i){i=new e.subscribable,Object.defineProperty(t,o$5,{value:i});var n={};p$1(t,i,n),A$1(e,t,i,n)}return i}function p$1(e,t,i){["pop","push","reverse","shift","sort","splice","unshift"].forEach((function(n){var r=e[n];e[n]=function(){var e=r.apply(this,arguments);return!0!==i.pause&&t.notifySubscribers(this),e}}))}function A$1(e,t,i,n){["remove","removeAll","destroy","destroyAll","replace"].forEach((function(r){Object.defineProperty(t,r,{enumerable:!1,value:function(){var o;n.pause=!0;try{o=e.observableArray.fn[r].apply(e.observableArray(t),arguments)}finally{n.pause=!1}return i.notifySubscribers(t),o}})}))}function b$5(e,t){if(!e)return null;var i=c$6(e,!1);return i&&i[t]||null}function g$5(e,t){var i=b$5(e,t);i&&i.valueHasMutated()}function w$1(e){e.track=f$5,e.getObservable=b$5,e.valueHasMutated=g$5,e.defineProperty=v$4}var t$5={attachToKo:w$1},d$5="http://www.w3.org/2000/svg",v$3="supermap3d-svgPath-svg",g$4={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,i){var n=document.createElementNS(d$5,"svg:svg");n.setAttribute("class",v$3);var r=document.createElementNS(d$5,"path");return n.appendChild(r),e.virtualElements.setDomNodeChildren(t,[n]),e.computed({read:function(){var t=e.unwrap(i());r.setAttribute("d",e.unwrap(t.path));var o=e.unwrap(t.width),a=e.unwrap(t.height);n.setAttribute("width",o),n.setAttribute("height",a),n.setAttribute("viewBox","0 0 "+o+" "+a),t.css&&n.setAttribute("class",v$3+" "+e.unwrap(t.css))},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}};t$5.attachToKo(ce$1),g$4.register(ce$1);var j$5={};!function(){var e=function(){var e={defaultNoDataValue:-34027999387901484e22,decode:function(o,a){var s=(a=a||{}).encodedMaskData||null===a.encodedMaskData,l=r(o,a.inputOffset||0,s),u=null!==a.noDataValue?a.noDataValue:e.defaultNoDataValue,c=t(l,a.pixelType||Float32Array,a.encodedMaskData,u,a.returnMask),h={width:l.width,height:l.height,pixelData:c.resultPixels,minValue:c.minValue,maxValue:l.pixels.maxValue,noDataValue:u};return c.resultMask&&(h.maskData=c.resultMask),a.returnEncodedMask&&l.mask&&(h.encodedMaskData=l.mask.bitset?l.mask.bitset:null),a.returnFileInfo&&(h.fileInfo=i(l),a.computeUsedBitDepths&&(h.fileInfo.bitDepths=n(l))),h}},t=function(e,t,i,n,r){var a,s,l,u=0,c=e.pixels.numBlocksX,h=e.pixels.numBlocksY,d=Math.floor(e.width/c),f=Math.floor(e.height/h),p=2*e.maxZError,_=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),s=new t(e.width*e.height),r&&i&&(l=new Uint8Array(e.width*e.height));for(var m,g,x=new Float32Array(d*f),v=0;v<=h;v++){var y=v!==h?f:e.height%h;if(0!==y)for(var $=0;$<=c;$++){var b=$!==c?d:e.width%c;if(0!==b){var T,C,S,w,E=v*e.width*f+$*d,P=e.width-b,A=e.pixels.blocks[u];if(A.encoding<2?(0===A.encoding?T=A.rawData:(o(A.stuffedData,A.bitsPerPixel,A.numValidPixels,A.offset,p,x,e.pixels.maxValue),T=x),C=0):S=2===A.encoding?0:A.offset,i)for(g=0;g<y;g++){for(7&E&&(w=i[E>>3],w<<=7&E),m=0;m<b;m++)7&E||(w=i[E>>3]),128&w?(l&&(l[E]=1),_=_>(a=A.encoding<2?T[C++]:S)?a:_,s[E++]=a):(l&&(l[E]=0),s[E++]=n),w<<=1;E+=P}else if(A.encoding<2)for(g=0;g<y;g++){for(m=0;m<b;m++)_=_>(a=T[C++])?a:_,s[E++]=a;E+=P}else for(_=_>S?S:_,g=0;g<y;g++){for(m=0;m<b;m++)s[E++]=S;E+=P}if(1===A.encoding&&C!==A.numValidPixels)throw"Block and Mask do not match";u++}}}return{resultPixels:s,resultMask:l,minValue:_}},i=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},n=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,i={},n=0;n<t;n++){var r=e.pixels.blocks[n];0===r.encoding?i.float32=!0:1===r.encoding?i[r.bitsPerPixel]=!0:i[0]=!0}return Object.keys(i)},r=function(e,t,i){var n={},r=new Uint8Array(e,t,10);if(n.fileIdentifierString=String.fromCharCode.apply(null,r),"CntZImage"!==n.fileIdentifierString.trim())throw"Unexpected file identifier string: "+n.fileIdentifierString;t+=10;var o=new DataView(e,t,24);if(n.fileVersion=o.getInt32(0,!0),n.imageType=o.getInt32(4,!0),n.height=o.getUint32(8,!0),n.width=o.getUint32(12,!0),n.maxZError=o.getFloat64(16,!0),t+=24,!i)if(o=new DataView(e,t,16),n.mask={},n.mask.numBlocksY=o.getUint32(0,!0),n.mask.numBlocksX=o.getUint32(4,!0),n.mask.numBytes=o.getUint32(8,!0),n.mask.maxValue=o.getFloat32(12,!0),t+=16,n.mask.numBytes>0){var a=new Uint8Array(Math.ceil(n.width*n.height/8)),s=(o=new DataView(e,t,n.mask.numBytes)).getInt16(0,!0),l=2,u=0;do{if(s>0)for(;s--;)a[u++]=o.getUint8(l++);else{var c=o.getUint8(l++);for(s=-s;s--;)a[u++]=c}s=o.getInt16(l,!0),l+=2}while(l<n.mask.numBytes);if(-32768!==s||u<a.length)throw"Unexpected end of mask RLE encoding";n.mask.bitset=a,t+=n.mask.numBytes}else 0==(n.mask.numBytes|n.mask.numBlocksY|n.mask.maxValue)&&(n.mask.bitset=new Uint8Array(Math.ceil(n.width*n.height/8)));o=new DataView(e,t,16),n.pixels={},n.pixels.numBlocksY=o.getUint32(0,!0),n.pixels.numBlocksX=o.getUint32(4,!0),n.pixels.numBytes=o.getUint32(8,!0),n.pixels.maxValue=o.getFloat32(12,!0),t+=16;var h=n.pixels.numBlocksX,d=n.pixels.numBlocksY,f=h+(n.width%h>0?1:0),p=d+(n.height%d>0?1:0);n.pixels.blocks=new Array(f*p);for(var _=0,m=0;m<p;m++)for(var g=0;g<f;g++){var x=0,v=e.byteLength-t;o=new DataView(e,t,Math.min(10,v));var y={};n.pixels.blocks[_++]=y;var $=o.getUint8(0);if(x++,y.encoding=63&$,y.encoding>3)throw"Invalid block encoding ("+y.encoding+")";if(2!==y.encoding){if(0!==$&&2!==$){if($>>=6,y.offsetType=$,2===$)y.offset=o.getInt8(1),x++;else if(1===$)y.offset=o.getInt16(1,!0),x+=2;else{if(0!==$)throw"Invalid block offset type";y.offset=o.getFloat32(1,!0),x+=4}if(1===y.encoding)if($=o.getUint8(x),x++,y.bitsPerPixel=63&$,$>>=6,y.numValidPixelsType=$,2===$)y.numValidPixels=o.getUint8(x),x++;else if(1===$)y.numValidPixels=o.getUint16(x,!0),x+=2;else{if(0!==$)throw"Invalid valid pixel count type";y.numValidPixels=o.getUint32(x,!0),x+=4}}var b;if(t+=x,3!==y.encoding)if(0===y.encoding){var T=(n.pixels.numBytes-1)/4;if(T!==Math.floor(T))throw"uncompressed block has invalid length";b=new ArrayBuffer(4*T),new Uint8Array(b).set(new Uint8Array(e,t,4*T));var C=new Float32Array(b);y.rawData=C,t+=4*T}else if(1===y.encoding){var S=Math.ceil(y.numValidPixels*y.bitsPerPixel/8),w=Math.ceil(S/4);b=new ArrayBuffer(4*w),new Uint8Array(b).set(new Uint8Array(e,t,S)),y.stuffedData=new Uint32Array(b),t+=S}}else t++}return n.eofOffset=t,n},o=function(e,t,i,n,r,o,a){var s,l,u,c=(1<<t)-1,h=0,d=0,f=Math.ceil((a-n)/r),p=4*e.length-Math.ceil(t*i/8);for(e[e.length-1]<<=8*p,s=0;s<i;s++){if(0===d&&(u=e[h++],d=32),d>=t)l=u>>>d-t&c,d-=t;else{var _=t-d;l=(u&c)<<_&c,l+=(u=e[h++])>>>(d=32-_)}o[s]=l<f?n+l*r:a}return o};return e}(),t=function(){var e=function(e,t,i,n,r,o,a,s){var l,u,c,h,d,f=(1<<i)-1,p=0,_=0,m=4*e.length-Math.ceil(i*n/8);if(e[e.length-1]<<=8*m,r)for(l=0;l<n;l++)0===_&&(c=e[p++],_=32),_>=i?(u=c>>>_-i&f,_-=i):(u=(c&f)<<(h=i-_)&f,u+=(c=e[p++])>>>(_=32-h)),t[l]=r[u];else for(d=Math.ceil((s-o)/a),l=0;l<n;l++)0===_&&(c=e[p++],_=32),_>=i?(u=c>>>_-i&f,_-=i):(u=(c&f)<<(h=i-_)&f,u+=(c=e[p++])>>>(_=32-h)),t[l]=u<d?o+u*a:s},t=function(e,t,i,n,r,o){var a,s=(1<<t)-1,l=0,u=0,c=0,h=0,d=0,f=[],p=4*e.length-Math.ceil(t*i/8);e[e.length-1]<<=8*p;var _=Math.ceil((o-n)/r);for(u=0;u<i;u++)0===h&&(a=e[l++],h=32),h>=t?(d=a>>>h-t&s,h-=t):(d=(a&s)<<(c=t-h)&s,d+=(a=e[l++])>>>(h=32-c)),f[u]=d<_?n+d*r:o;return f.unshift(n),f},i=function(e,t,i,n,r,o,a,s){var l,u,c,h,d=(1<<i)-1,f=0,p=0,_=0;if(r)for(l=0;l<n;l++)0===p&&(c=e[f++],p=32,_=0),p>=i?(u=c>>>_&d,p-=i,_+=i):(u=c>>>_&d,p=32-(h=i-p),u|=((c=e[f++])&(1<<h)-1)<<i-h,_=h),t[l]=r[u];else{var m=Math.ceil((s-o)/a);for(l=0;l<n;l++)0===p&&(c=e[f++],p=32,_=0),p>=i?(u=c>>>_&d,p-=i,_+=i):(u=c>>>_&d,p=32-(h=i-p),u|=((c=e[f++])&(1<<h)-1)<<i-h,_=h),t[l]=u<m?o+u*a:s}return t},n=function(e,t,i,n,r,o){var a,s=(1<<t)-1,l=0,u=0,c=0,h=0,d=0,f=0,p=[],_=Math.ceil((o-n)/r);for(u=0;u<i;u++)0===h&&(a=e[l++],h=32,f=0),h>=t?(d=a>>>f&s,h-=t,f+=t):(d=a>>>f&s,h=32-(c=t-h),d|=((a=e[l++])&(1<<c)-1)<<t-c,f=c),p[u]=d<_?n+d*r:o;return p.unshift(n),p},r=function(e,t,i,n){var r,o,a,s,l=(1<<i)-1,u=0,c=0,h=4*e.length-Math.ceil(i*n/8);for(e[e.length-1]<<=8*h,r=0;r<n;r++)0===c&&(a=e[u++],c=32),c>=i?(o=a>>>c-i&l,c-=i):(o=(a&l)<<(s=i-c)&l,o+=(a=e[u++])>>>(c=32-s)),t[r]=o;return t},o=function(e,t,i,n){var r,o,a,s,l=(1<<i)-1,u=0,c=0,h=0;for(r=0;r<n;r++)0===c&&(a=e[u++],c=32,h=0),c>=i?(o=a>>>h&l,c-=i,h+=i):(o=a>>>h&l,c=32-(s=i-c),o|=((a=e[u++])&(1<<s)-1)<<i-s,h=s),t[r]=o;return t},a={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,i=65535,n=e.length,r=Math.floor(n/2),o=0;r;){var a=r>=359?359:r;r-=a;do{t+=e[o++]<<8,i+=t+=e[o++]}while(--a);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&n&&(i+=t+=e[o]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,n=new Uint8Array(e,i,6),r={};if(r.fileIdentifierString=String.fromCharCode.apply(null,n),0!==r.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+r.fileIdentifierString;i+=6;var o,a=new DataView(e,i,8),s=a.getInt32(0,!0);if(r.fileVersion=s,i+=4,s>=3&&(r.checksum=a.getUint32(4,!0),i+=4),a=new DataView(e,i,12),r.height=a.getUint32(0,!0),r.width=a.getUint32(4,!0),i+=8,s>=4?(r.numDims=a.getUint32(8,!0),i+=4):r.numDims=1,a=new DataView(e,i,40),r.numValidPixel=a.getUint32(0,!0),r.microBlockSize=a.getInt32(4,!0),r.blobSize=a.getInt32(8,!0),r.imageType=a.getInt32(12,!0),r.maxZError=a.getFloat64(16,!0),r.zMin=a.getFloat64(24,!0),r.zMax=a.getFloat64(32,!0),i+=40,t.headerInfo=r,t.ptr=i,s>=3&&(o=s>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-o,r.blobSize-14))!==r.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,n=this.getDataTypeArray(i.imageType),r=i.numDims*this.getDataTypeSize(i.imageType),o=this.readSubArray(e,t.ptr,n,r),a=this.readSubArray(e,t.ptr+r,n,r);t.ptr+=2*r;var s,l=!0;for(s=0;s<i.numDims;s++)if(o[s]!==a[s]){l=!1;break}return i.minValues=o,i.maxValues=a,l},readSubArray:function(e,t,i,n){var r;if(i===Uint8Array)r=new Uint8Array(e,t,n);else{var o=new ArrayBuffer(n);new Uint8Array(o).set(new Uint8Array(e,t,n)),r=new i(o)}return r},readMask:function(e,t){var i,n,r=t.ptr,o=t.headerInfo,a=o.width*o.height,s=o.numValidPixel,l=new DataView(e,r,4),u={};if(u.numBytes=l.getUint32(0,!0),r+=4,(0===s||a===s)&&0!==u.numBytes)throw"invalid mask";if(0===s)i=new Uint8Array(Math.ceil(a/8)),u.bitset=i,n=new Uint8Array(a),t.pixels.resultMask=n,r+=u.numBytes;else if(u.numBytes>0){i=new Uint8Array(Math.ceil(a/8));var c=(l=new DataView(e,r,u.numBytes)).getInt16(0,!0),h=2,d=0,f=0;do{if(c>0)for(;c--;)i[d++]=l.getUint8(h++);else for(f=l.getUint8(h++),c=-c;c--;)i[d++]=f;c=l.getInt16(h,!0),h+=2}while(h<u.numBytes);if(-32768!==c||d<i.length)throw"Unexpected end of mask RLE encoding";n=new Uint8Array(a);var p=0,_=0;for(_=0;_<a;_++)7&_?(p=i[_>>3],p<<=7&_):p=i[_>>3],128&p&&(n[_]=1);t.pixels.resultMask=n,u.bitset=i,r+=u.numBytes}return t.ptr=r,t.mask=u,!0},readDataOneSweep:function(e,t,i){var n,r=t.ptr,o=t.headerInfo,s=o.numDims,l=o.width*o.height,u=o.imageType,c=o.numValidPixel*a.getDataTypeSize(u)*s,h=t.pixels.resultMask;if(i===Uint8Array)n=new Uint8Array(e,r,c);else{var d=new ArrayBuffer(c);new Uint8Array(d).set(new Uint8Array(e,r,c)),n=new i(d)}if(n.length===l*s)t.pixels.resultPixels=n;else{t.pixels.resultPixels=new i(l*s);var f=0,p=0,_=0,m=0;if(s>1)for(_=0;_<s;_++)for(m=_*l,p=0;p<l;p++)h[p]&&(t.pixels.resultPixels[m+p]=n[f++]);else for(p=0;p<l;p++)h[p]&&(t.pixels.resultPixels[p]=n[f++])}return r+=c,t.ptr=r,!0},readHuffmanTree:function(e,t){var i=this.HUFFMAN_LUT_BITS_MAX,n=new DataView(e,t.ptr,16);if(t.ptr+=16,n.getInt32(0,!0)<2)throw"unsupported Huffman version";var r=n.getInt32(4,!0),o=n.getInt32(8,!0),l=n.getInt32(12,!0);if(o>=l)return!1;var u=new Uint32Array(l-o);a.decodeBits(e,t,u);var c,h,d,f,p=[];for(c=o;c<l;c++)p[h=c-(c<r?0:r)]={first:u[c-o],second:null};var _=e.byteLength-t.ptr,m=Math.ceil(_/4),g=new ArrayBuffer(4*m);new Uint8Array(g).set(new Uint8Array(e,t.ptr,_));var x,v=new Uint32Array(g),y=0,$=0;for(x=v[0],c=o;c<l;c++)(f=p[h=c-(c<r?0:r)].first)>0&&(p[h].second=x<<y>>>32-f,32-y>=f?32===(y+=f)&&(y=0,x=v[++$]):(y+=f-32,x=v[++$],p[h].second|=x>>>32-y));var b=0,T=0,C=new s;for(c=0;c<p.length;c++)void 0!==p[c]&&(b=Math.max(b,p[c].first));T=b>=i?i:b,b>=30&&console.log("WARning, large NUM LUT BITS IS "+b);var S,w,E,P,A,L=[];for(c=o;c<l;c++)if((f=p[h=c-(c<r?0:r)].first)>0)if(S=[f,h],f<=T)for(w=p[h].second<<T-f,E=1<<T-f,d=0;d<E;d++)L[w|d]=S;else for(w=p[h].second,A=C,P=f-1;P>=0;P--)w>>>P&1?(A.right||(A.right=new s),A=A.right):(A.left||(A.left=new s),A=A.left),0===P&&!A.val&&(A.val=S[1]);return{decodeLut:L,numBitsLUTQick:T,numBitsLUT:b,tree:C,stuffedData:v,srcPtr:$,bitPos:y}},readHuffman:function(e,t,i){var n,r,o,a,s,l,u,c,h,d=t.headerInfo,f=d.numDims,p=t.headerInfo.height,_=t.headerInfo.width,m=_*p,g=this.readHuffmanTree(e,t),x=g.decodeLut,v=g.tree,y=g.stuffedData,$=g.srcPtr,b=g.bitPos,T=g.numBitsLUTQick,C=g.numBitsLUT,S=0===t.headerInfo.imageType?128:0,w=t.pixels.resultMask,E=0;b>0&&($++,b=0);var P,A=y[$],L=1===t.encodeMode,M=new i(m*f),R=M;for(P=0;P<d.numDims;P++){if(f>1&&(R=new i(M.buffer,m*P,m),E=0),t.headerInfo.numValidPixel===_*p)for(c=0,l=0;l<p;l++)for(u=0;u<_;u++,c++){if(r=0,s=a=A<<b>>>32-T,32-b<T&&(s=a|=y[$+1]>>>64-b-T),x[s])r=x[s][1],b+=x[s][0];else for(s=a=A<<b>>>32-C,32-b<C&&(s=a|=y[$+1]>>>64-b-C),n=v,h=0;h<C;h++)if(!(n=a>>>C-h-1&1?n.right:n.left).left&&!n.right){r=n.val,b=b+h+1;break}b>=32&&(b-=32,A=y[++$]),o=r-S,L?(o+=u>0?E:l>0?R[c-_]:E,o&=255,R[c]=o,E=o):R[c]=o}else for(c=0,l=0;l<p;l++)for(u=0;u<_;u++,c++)if(w[c]){if(r=0,s=a=A<<b>>>32-T,32-b<T&&(s=a|=y[$+1]>>>64-b-T),x[s])r=x[s][1],b+=x[s][0];else for(s=a=A<<b>>>32-C,32-b<C&&(s=a|=y[$+1]>>>64-b-C),n=v,h=0;h<C;h++)if(!(n=a>>>C-h-1&1?n.right:n.left).left&&!n.right){r=n.val,b=b+h+1;break}b>=32&&(b-=32,A=y[++$]),o=r-S,L?(u>0&&w[c-1]?o+=E:l>0&&w[c-_]?o+=R[c-_]:o+=E,o&=255,R[c]=o,E=o):R[c]=o}t.ptr=t.ptr+4*($+1)+(b>0?4:0)}t.pixels.resultPixels=M},decodeBits:function(a,s,l,u,c){var h=s.headerInfo,d=h.fileVersion,f=0,p=a.byteLength-s.ptr>=5?5:a.byteLength-s.ptr,_=new DataView(a,s.ptr,p),m=_.getUint8(0);f++;var g=m>>6,x=0===g?4:3-g,v=(32&m)>0,y=31&m,$=0;if(1===x)$=_.getUint8(f),f++;else if(2===x)$=_.getUint16(f,!0),f+=2;else{if(4!==x)throw"Invalid valid pixel count type";$=_.getUint32(f,!0),f+=4}var b,T,C,S,w,E,P,A,L,M=2*h.maxZError,R=h.numDims>1?h.maxValues[c]:h.zMax;if(v){for(s.counter.lut++,A=_.getUint8(f),f++,S=Math.ceil((A-1)*y/8),w=Math.ceil(S/4),T=new ArrayBuffer(4*w),C=new Uint8Array(T),s.ptr+=f,C.set(new Uint8Array(a,s.ptr,S)),P=new Uint32Array(T),s.ptr+=S,L=0;A-1>>>L;)L++;S=Math.ceil($*L/8),w=Math.ceil(S/4),T=new ArrayBuffer(4*w),(C=new Uint8Array(T)).set(new Uint8Array(a,s.ptr,S)),b=new Uint32Array(T),s.ptr+=S,E=d>=3?n(P,y,A-1,u,M,R):t(P,y,A-1,u,M,R),d>=3?i(b,l,L,$,E):e(b,l,L,$,E)}else s.counter.bitstuffer++,L=y,s.ptr+=f,L>0&&(S=Math.ceil($*L/8),w=Math.ceil(S/4),T=new ArrayBuffer(4*w),(C=new Uint8Array(T)).set(new Uint8Array(a,s.ptr,S)),b=new Uint32Array(T),s.ptr+=S,d>=3?null===u?o(b,l,L,$):i(b,l,L,$,!1,u,M,R):null===u?r(b,l,L,$):e(b,l,L,$,!1,u,M,R))},readTiles:function(e,t,i){var n=t.headerInfo,r=n.width,o=n.height,s=n.microBlockSize,l=n.imageType,u=a.getDataTypeSize(l),c=Math.ceil(r/s),h=Math.ceil(o/s);t.pixels.numBlocksY=h,t.pixels.numBlocksX=c,t.pixels.ptr=0;var d,f,p,_,m,g,x,v,y=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,I=0,D=new i(s*s),B=o%s||s,N=r%s||s,F=n.numDims,U=t.pixels.resultMask,G=t.pixels.resultPixels;for(b=0;b<h;b++)for(C=b!==h-1?s:B,T=0;T<c;T++)for(A=b*r*s+T*s,L=r-(S=T!==c-1?s:N),v=0;v<F;v++){if(F>1&&(G=new i(t.pixels.resultPixels.buffer,r*o*v*u,r*o)),w=e.byteLength-t.ptr,f={},I=0,I++,P=(E=(d=new DataView(e,t.ptr,Math.min(10,w))).getUint8(0))>>6&255,(E>>2&15)!==(T*s>>3&15))throw"integrity issue";if((m=3&E)>3)throw t.ptr+=I,"Invalid block encoding ("+m+")";if(2!==m)if(0===m){if(t.counter.uncompressed++,t.ptr+=I,M=(M=C*S*u)<(R=e.byteLength-t.ptr)?M:R,p=new ArrayBuffer(M%u==0?M:M+u-M%u),new Uint8Array(p).set(new Uint8Array(e,t.ptr,M)),_=new i(p),O=0,U)for(y=0;y<C;y++){for($=0;$<S;$++)U[A]&&(G[A]=_[O++]),A++;A+=L}else for(y=0;y<C;y++){for($=0;$<S;$++)G[A++]=_[O++];A+=L}t.ptr+=O*u}else if(g=a.getDataTypeUsed(l,P),x=a.getOnePixel(f,I,g,d),I+=a.getDataTypeSize(g),3===m)if(t.ptr+=I,t.counter.constantoffset++,U)for(y=0;y<C;y++){for($=0;$<S;$++)U[A]&&(G[A]=x),A++;A+=L}else for(y=0;y<C;y++){for($=0;$<S;$++)G[A++]=x;A+=L}else if(t.ptr+=I,a.decodeBits(e,t,D,x,v),I=0,U)for(y=0;y<C;y++){for($=0;$<S;$++)U[A]&&(G[A]=D[I++]),A++;A+=L}else for(y=0;y<C;y++){for($=0;$<S;$++)G[A++]=D[I++];A+=L}else t.counter.constant++,t.ptr+=I}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:a.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t=e.headerInfo.zMax,i=e.headerInfo.numDims,n=e.headerInfo.height*e.headerInfo.width,r=n*i,o=0,a=0,s=0,l=e.pixels.resultMask;if(l)if(i>1)for(o=0;o<i;o++)for(s=o*n,a=0;a<n;a++)l[a]&&(e.pixels.resultPixels[s+a]=t);else for(a=0;a<n;a++)l[a]&&(e.pixels.resultPixels[a]=t);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(t);else for(a=0;a<r;a++)e.pixels.resultPixels[a]=t},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:default:t=Float32Array;break;case 7:t=Float64Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:default:t="F32";break;case 7:t="F64"}return t},isValidPixelValue:function(e,t){if(null===t)return!1;var i;switch(e){case 0:i=t>=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,n){var r=0;switch(i){case 0:r=n.getInt8(t);break;case 1:r=n.getUint8(t);break;case 2:r=n.getInt16(t,!0);break;case 3:r=n.getUint16(t,!0);break;case 4:r=n.getInt32(t,!0);break;case 5:r=n.getUInt32(t,!0);break;case 6:r=n.getFloat32(t,!0);break;case 7:r=n.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return r}},s=function(e,t,i){this.val=e,this.left=t,this.right=i},l={decode:function(e,t){var i=(t=t||{}).noDataValue,n=0,r={};if(r.ptr=t.inputOffset||0,r.pixels={},a.readHeaderInfo(e,r)){var o=r.headerInfo,s=o.fileVersion,l=a.getDataTypeArray(o.imageType);a.readMask(e,r),o.numValidPixel!==o.width*o.height&&!r.pixels.resultMask&&(r.pixels.resultMask=t.maskData);var u,c=o.width*o.height;if(r.pixels.resultPixels=new l(c*o.numDims),r.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==o.numValidPixel)if(o.zMax===o.zMin)a.constructConstantSurface(r);else if(s>=4&&a.checkMinMaxRanges(e,r))a.constructConstantSurface(r);else{var h=new DataView(e,r.ptr,2),d=h.getUint8(0);if(r.ptr++,d)a.readDataOneSweep(e,r,l);else if(s>1&&o.imageType<=1&&Math.abs(o.maxZError-.5)<1e-5){var f=h.getUint8(1);if(r.ptr++,r.encodeMode=f,f>2||s<4&&f>1)throw"Invalid Huffman flag "+f;f?a.readHuffman(e,r,l):a.readTiles(e,r,l)}else a.readTiles(e,r,l)}r.eofOffset=r.ptr,t.inputOffset?(u=r.headerInfo.blobSize+t.inputOffset-r.ptr,Math.abs(u)>=1&&(r.eofOffset=t.inputOffset+r.headerInfo.blobSize)):(u=r.headerInfo.blobSize-r.ptr,Math.abs(u)>=1&&(r.eofOffset=r.headerInfo.blobSize));var p={width:o.width,height:o.height,pixelData:r.pixels.resultPixels,minValue:o.zMin,maxValue:o.zMax,validPixelCount:o.numValidPixel,dimCount:o.numDims,dimStats:{minValues:o.minValues,maxValues:o.maxValues},maskData:r.pixels.resultMask};if(r.pixels.resultMask&&a.isValidPixelValue(o.imageType,i)){var _=r.pixels.resultMask;for(n=0;n<c;n++)_[n]||(p.pixelData[n]=i);p.noDataValue=i}return r.noDataValue=i,t.returnFileInfo&&(p.fileInfo=a.formatFileInfo(r)),p}},getBandCount:function(e){for(var t=0,i=0,n={ptr:0,pixels:{}};i<e.byteLength-58;)a.readHeaderInfo(e,n),i+=n.headerInfo.blobSize,t++,n.ptr=i;return t}};return l}(),i=function(){var e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]}(),n={decode:function(n,r){if(!i)throw"Big endian system is not supported.";var o,a,s,l,u,c=(r=r||{}).inputOffset||0,h=new Uint8Array(n,c,10),d=String.fromCharCode.apply(null,h);if("CntZImage"===d.trim())o=e,a=1;else{if("Lerc2"!==d.substring(0,5))throw"Unexpected file identifier string: "+d;o=t,a=2}for(var f,p,_,m=0,g=n.byteLength-10,x=[],v={width:0,height:0,pixels:[],pixelType:r.pixelType,mask:null,statistics:[]};c<g;){var y=o.decode(n,{inputOffset:c,encodedMaskData:f,maskData:_,returnMask:0===m,returnEncodedMask:0===m,returnFileInfo:!0,pixelType:r.pixelType||null,noDataValue:r.noDataValue||null});c=y.fileInfo.eofOffset,0===m&&(f=y.encodedMaskData,_=y.maskData,v.width=y.width,v.height=y.height,v.dimCount=y.dimCount||1,v.pixelType=y.pixelType||y.fileInfo.pixelType,v.mask=y.maskData),a>1&&y.fileInfo.mask&&y.fileInfo.mask.numBytes>0&&x.push(y.maskData),m++,v.pixels.push(y.pixelData),v.statistics.push({minValue:y.minValue,maxValue:y.maxValue,noDataValue:y.noDataValue,dimStats:y.dimStats})}if(a>1&&x.length>1){for(u=v.width*v.height,v.bandMasks=x,(_=new Uint8Array(u)).set(x[0]),s=1;s<x.length;s++)for(p=x[s],l=0;l<u;l++)_[l]=_[l]&p[l];v.maskData=_}return v}};j$5.Lerc=n}();var LercDecode=j$5.Lerc,V$1=function(){var e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if("object"!=typeof WebAssembly)return{supported:!1};var i="B9h79tEBBBE8fV9gBB9gVUUUUUEU9gIUUUB9gEUEU9gIUUUEUIKQBEEEDDDILLLVE9wEEEVIEBEOWEUEC+Q/IEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBEy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBDe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBIl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBLk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBOL79iv9rBRQ+x8yQDBK/qMEZU8jJJJJBCJ/EB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rADZ1JJJBHWCJ/ABAD9uC/wfBgGOCJDAOCJD6eHdAICEFHLCBHQDNINAQAE9PMEAdAEAQ9rAQAdFAE6eHKDNDNADtMBAKCSFGOC9wgHXAOCL4CIFCD4HMAWCJDFHpCBHSALHZINDNARAZ9rAM9PMBCBHLXIKAZAMFHLDNAXtMBCBHhCBHIINDNARAL9rCk9PMBCBHLXVKAWCJ/CBFAIFHODNDNDNDNDNAZAICO4FrBBAhCOg4CIgpLBEDIBKAO9CB83IBAOCWF9CB83IBXIKAOALrBLALrBBGoCO4GaAaCIsGae86BBAOCEFALCLFAaFGarBBAoCL4CIgGcAcCIsGce86BBAOCDFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCIFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCLFAaAoFGarBBALrBEGoCO4GcAcCIsGce86BBAOCVFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCOFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCRFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCWFAaAoFGarBBALrBDGoCO4GcAcCIsGce86BBAOCdFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCQFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCKFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCXFAaAoFGorBBALrBIGLCO4GaAaCIsGae86BBAOCMFAoAaFGorBBALCL4CIgGaAaCIsGae86BBAOCpFAoAaFGorBBALCD4CIgGaAaCIsGae86BBAOCSFAoAaFGOrBBALCIgGLALCIsGLe86BBAOALFHLXDKAOALrBWALrBBGoCL4GaAaCSsGae86BBAOCEFALCWFAaFGarBBAoCSgGoAoCSsGoe86BBAOCDFAaAoFGorBBALrBEGaCL4GcAcCSsGce86BBAOCIFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCLFAoAaFGorBBALrBDGaCL4GcAcCSsGce86BBAOCVFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCOFAoAaFGorBBALrBIGaCL4GcAcCSsGce86BBAOCRFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCWFAoAaFGorBBALrBLGaCL4GcAcCSsGce86BBAOCdFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCQFAoAaFGorBBALrBVGaCL4GcAcCSsGce86BBAOCKFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCXFAoAaFGorBBALrBOGaCL4GcAcCSsGce86BBAOCMFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCpFAoAaFGorBBALrBRGLCL4GaAaCSsGae86BBAOCSFAoAaFGOrBBALCSgGLALCSsGLe86BBAOALFHLXEKAOAL8pBB83BBAOCWFALCWF8pBB83BBALCZFHLKAhCDFHhAICZFGIAX6MBKKDNALMBCBHLXIKDNAKtMBAWASFrBBHhCBHOApHIINAIAWCJ/CBFAOFrBBGZCE4CBAZCEg9r7AhFGh86BBAIADFHIAOCEFGOAK9HMBKKApCEFHpALHZASCEFGSAD9HMBKKABAQAD2FAWCJDFAKAD2Z1JJJB8aAWAWCJDFAKCUFAD2FADZ1JJJB8aKAKCBALeAQFHQALMBKC9+HOXEKCBC99ARAL9rADCAADCA0eseHOKAVCJ/EBF8kJJJJBAOK+OoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJEZ+JJJJB8aAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK+lVOEUE99DUD99EUD99DNDNADCL9HMBAEtMEINDNDNjBBBzjBBB+/ABCDFGD8sBB+yAB8sBBGI+yGL+L+TABCEFGV8sBBGO+yGR+L+TGWjBBBB9gGdeAWjBB/+9CAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI86BBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD86BBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD86BBABCLFHBAECUFGEMBXDKKAEtMBINDNDNjBBBzjBBB+/ABCLFGD8uEB+yAB8uEBGI+yGL+L+TABCDFGV8uEBGO+yGR+L+TGWjBBBB9gGdeAWjB/+fsAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI87EBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD87EBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD87EBABCWFHBAECUFGEMBKKK/SILIUI99IUE99DNAEtMBCBHIABHLINDNDNj/zL81zALCOF8uEBGVCIv+y+VGOAL8uEB+ynGRjB/+fsnjBBBzjBBB+/ARjBBBB9gemGW+LjBBB9P9dtMBAW+oHdXEKCJJJJ94HdKALCLF8uEBHQALCDF8uEBHKABAVCEFCIgAIvCETFAd87EBDNDNAOAK+ynGWjB/+fsnjBBBzjBBB+/AWjBBBB9gemGX+LjBBB9P9dtMBAX+oHKXEKCJJJJ94HKKABAVCDFCIgAIvCETFAK87EBDNDNAOAQ+ynGOjB/+fsnjBBBzjBBB+/AOjBBBB9gemGX+LjBBB9P9dtMBAX+oHQXEKCJJJJ94HQKABAVCUFCIgAIvCETFAQ87EBDNDNjBBJzARARn+TAWAWn+TAOAOn+TGRjBBBBARjBBBB9ge+RjB/+fsnjBBBzmGR+LjBBB9P9dtMBAR+oHQXEKCJJJJ94HQKABAVCIgAIvCETFAQ87EBALCWFHLAICLFHIAECUFGEMBKKK6BDNADCD4AE2GEtMBINABABYDBGDCWTCW91+yADCk91ClTCJJJ/8IF++nuDBABCLFHBAECUFGEMBKKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABKKKEBCJWKLZ9kBB";WebAssembly.validate(e)&&(i="B9h79tEBBBE5V9gBB9gVUUUUUEU9gIUUUB9gDUUB9gEUEUIMXBBEBEEDIDIDLLVE9wEEEVIEBEOWEUEC+Q/aEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBDy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBLe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBOk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBWl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBQL79iv9rBKQ/j6XLBZIK9+EVU8jJJJJBCZ9rHBCBHEINCBHDCBHIINABCWFADFAICJUAEAD4CEgGLe86BBAIALFHIADCEFGDCW9HMBKAEC+Q+YJJBFAI86BBAECITC+Q1JJBFAB8pIW83IBAECEFGECJD9HMBKK1HLSUD97EUO978jJJJJBCJ/KB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rAD/8QBBCJ/ABAD9uC/wfBgGOCJDAOCJD6eHWAICEFHOCBHdDNINAdAE9PMEAWAEAd9rAdAWFAE6eHQDNDNADtMBAQCSFGLC9wgGKCI2HXAKCETHMALCL4CIFCD4HpCBHSINAOHZCBHhDNINDNARAZ9rAp9PMBCBHOXVKAVCJ/CBFAhAK2FHoAZApFHOCBHIDNAKC/AB6MBARAO9rC/gB6MBCBHLINAoALFHIDNDNDNDNDNAZALCO4FrBBGaCIgpLBEDIBKAICBPhPKLBXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLBAOCZFHOKDNDNDNDNDNAaCD4CIgpLBEDIBKAICBPhPKLZXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLZAOCZFHOKDNDNDNDNDNAaCL4CIgpLBEDIBKAICBPhPKLAXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLAAOCZFHOKDNDNDNDNDNAaCO4pLBEDIBKAICBPhPKL8wXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCLFAlPqBFAaC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCWFAlPqBFAaC+Q+YJJBFrBBFHOXEKAIAOPBBBPKL8wAOCZFHOKALC/ABFHIALCJEFAK0MEAIHLARAO9rC/fB0MBKKDNAIAK9PMBAICI4HLINDNARAO9rCk9PMBCBHOXRKAoAIFHaDNDNDNDNDNAZAICO4FrBBALCOg4CIgpLBEDIBKAaCBPhPKLBXIKAaAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAaAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAaAOPBBBPKLBAOCZFHOKALCDFHLAICZFGIAK6MBKKDNAOtMBAOHZAhCEFGhCLsMDXEKKCBHOXIKDNAKtMBAVCJDFASFHIAVASFPBDBHlCBHaINAIAVCJ/CBFAaFGLPBLBGxCEP9tAxCEPSGcP9OP9hP9RGxALAKFPBLBGkCEP9tAkAcP9OP9hP9RGkPMBZEhDoIaLcVxOqRlGyALAMFPBLBG8aCEP9tA8aAcP9OP9hP9RG8aALAXFPBLBGeCEP9tAeAcP9OP9hP9RGePMBZEhDoIaLcVxOqRlG3PMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIAlP9uGlPeBbDBAIADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAyA3PMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWkdyQ8aKeX3M5p8eS8fGxA8aAePMWkdyQ8aKeX3M5p8eS8fGkPMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFHIAaCZFGaAK6MBKKASCLFGSAD6MBKKABAdAD2FAVCJDFAQAD2/8QBBAVAVCJDFAQCUFAD2FAD/8QBBKAQCBAOeAdFHdAOMBKC9+HOXEKCBC99ARAO9rADCAADCA0eseHOKAVCJ/KBF8kJJJJBAOKWBZ+BJJJBK+KoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJE/8KBAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK/xVDIUO978jJJJJBCA9rGI8kJJJJBDNDNADCL9HMBDNAEC98gGLtMBABHDCBHVINADADPBBBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKBBADCZFHDAVCLFGVAL6MBKKALAE9PMEAIAECIgGVCDTGDvCBCZAD9r/8KBAIABALCDTFGLAD/8QBBDNAVtMBAIAIPBLBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKLBKALAIAD/8QBBXEKABAEC98gGDZ+HJJJBADAE9PMBAIAECIgGLCITGVFCBCAAV9r/8KBAIABADCITFGDAV/8QBBAIALZ+HJJJBADAIAV/8QBBKAICAF8kJJJJBK+yIDDUR97DNAEtMBCBHDINABCZFGIAIPBBBGLCBPhGVCJJ98P3ECJJ98P3IGOP9OABPBBBGRALPMLVORXMpScxql358e8fCffEPhP9OP/6EARALPMBEDIWdQKZhoaky8aeGLCZP+sEP/6EGWP/gEALCZP+rECZP+sEP/6EGdP/gEP/kEP/lEGLjB/+fsPaAdALAVP+2EGVAdCJJJJ94PhGQP9OP9RP/kEGdAdP/mEALALP/mEAWAVAWAQP9OP9RP/kEGLALP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGVP/kECZP+rEAdAWP/mEAVP/kECffIPhP9OP9QGdALAWP/mEAVP/kECUPSCBPlDCBPlICBPlOCBPlRCBPlQCBPlKCBPlpCBPlSP9OGLPMWdkyQK8aeXM35pS8e8fP9QPKBBABARAOP9OAdALPMBEZhDIoaLVcxORqlP9QPKBBABCAFHBADCLFGDAE6MBKKK94EIU8jJJJJBCA9rGI8kJJJJBABAEC98gGLZ+JJJJBDNALAE9PMBAIAECIgGVCITGEFCBCAAE9r/8KBAIABALCITFGBAE/8QBBAIAVZ+JJJJBABAIAE/8QBBKAICAF8kJJJJBK/hILDUE97EUV978jJJJJBCZ9rHDDNAEtMBCBHIINADABPBBBGLABCZFGVPBBBGOPMLVORXMpScxql358e8fGRCZP+sEGWCLP+rEPKLBABjBBJzPaj/zL81zPaAWCIPhP9QP/6EP/nEGWALAOPMBEDIWdQKZhoaky8aeGLCZP+rECZP+sEP/6EP/mEGOAOP/mEAWALCZP+sEP/6EP/mEGdAdP/mEAWARCZP+rECZP+sEP/6EP/mEGRARP/mEP/kEP/kEP/lECBPhP+4EP/jEjB/+fsPaGWP/mEjBBN0PaGLP/kECffIPhGQP9OAdAWP/mEALP/kECZP+rEP9QGdARAWP/mEALP/kECZP+rEAOAWP/mEALP/kEAQP9OP9QGWPMBEZhDIoaLVcxORqlGLP5BADPBLBPeB+t+J83IBABCWFALP5EADPBLBPeE+t+J83IBAVAdAWPMWdkyQK8aeXM35pS8e8fGWP5BADPBLBPeD+t+J83IBABCkFAWP5EADPBLBPeI+t+J83IBABCAFHBAICLFGIAE6MBKKK/3EDIUE978jJJJJBC/AB9rHIDNADCD4AE2GLC98gGVtMBCBHDABHEINAEAEPBBBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKBBAECZFHEADCLFGDAV6MBKKDNAVAL9PMBAIALCIgGDCDTGEvCBC/ABAE9r/8KBAIABAVCDTFGVAE/8QBBDNADtMBAIAIPBLBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKLBKAVAIAE/8QBBKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIKKKEBCJWKLZ9tBB");var n,r=WebAssembly.instantiate(function(e){for(var i=new Uint8Array(e.length),n=0;n<e.length;++n){var r=e.charCodeAt(n);i[n]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}var o=0;for(n=0;n<e.length;++n)i[o++]=i[n]<60?t[i[n]]:64*(i[n]-60)+i[++n];return i.buffer.slice(0,o)}(i),{}).then((function(e){(n=e.instance).exports.__wasm_call_ctors()}));function o(e,t,i,r,o,a){var s=n.exports.sbrk,l=i+3&-4,u=s(l*r),c=s(o.length),h=new Uint8Array(n.exports.memory.buffer);h.set(o,c);var d=e(u,i,r,c,o.length);if(0==d&&a&&a(u,l,r),t.set(h.subarray(u,u+i*r)),s(u-s(0)),0!=d)throw new Error("Malformed buffer data: "+d)}var a={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},s={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return{ready:r,supported:!0,decodeVertexBuffer:function(e,t,i,r,s){o(n.exports.meshopt_decodeVertexBuffer,e,t,i,r,n.exports[a[s]])},decodeIndexBuffer:function(e,t,i,r){o(n.exports.meshopt_decodeIndexBuffer,e,t,i,r)},decodeIndexSequence:function(e,t,i,r){o(n.exports.meshopt_decodeIndexSequence,e,t,i,r)},decodeGltfBuffer:function(e,t,i,r,l,u){o(n.exports[s[l]],e,t,i,r,n.exports[a[u]])}}}(),C$3={};!function(e,t){e.NoSleep=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=i(1),a=o.webm,s=o.mp4,l=typeof navigator<"u"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,u=function(){function e(){var t=this;r(this,e),l?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("muted",""),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",a),this._addSourceToVideo(this.noSleepVideo,"mp4",s),this.noSleepVideo.addEventListener("loadedmetadata",(function(){t.noSleepVideo.duration<=1?t.noSleepVideo.setAttribute("loop",""):t.noSleepVideo.addEventListener("timeupdate",(function(){t.noSleepVideo.currentTime>.5&&(t.noSleepVideo.currentTime=Math.random())}))})))}return n(e,[{key:"_addSourceToVideo",value:function(e,t,i){var n=document.createElement("source");n.src=i,n.type="video/"+t,e.appendChild(n)}},{key:"enable",value:function(){l?(this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n .\n "),this.noSleepTimer=window.setInterval((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3)):this.noSleepVideo.play()}},{key:"disable",value:function(){l?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),e}();e.exports=u},function(e,t,i){e.exports={webm:"data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA=",mp4:"data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}}])}(C$3);var b$4=C$3.NoSleep;function t$4(){}t$4.array={},t$4.array.binarySearch=function(e,t,i){for(var n,r,o=i||t$4.array.numberSafeCompareFunction,a=0,s=e.length,l=!1;a<s;)(r=+o(e[n=a+(s-a>>1)],t))<0?a=n+1:(s=n,l=!r);return l?a:~a},t$4.array.numberSafeCompareFunction=function(e,t){return e>t?1:e<t?-1:0},t$4.array.includes=function(e,t){return e.indexOf(t)>=0},t$4.array.linearFindNearest=function(e,t,i){var n,r=e.length;if(e[0]<=t)return 0;if(t<=e[r-1])return r-1;if(i>0){for(n=1;n<r;++n)if(e[n]<t)return n-1}else if(i<0){for(n=1;n<r;++n)if(e[n]<=t)return n}else for(n=1;n<r;++n){if(e[n]==t)return n;if(e[n]<t)return e[n-1]-t<t-e[n]?n-1:n}return r-1},t$4.array.reverseSubArray=function(e,t,i){for(;t<i;){var n=e[t];e[t]=e[i],e[i]=n,++t,--i}},t$4.array.extend=function(e,t){var i,n=Array.isArray(t)?t:[t],r=n.length;for(i=0;i<r;i++)e[e.length]=n[i]},t$4.array.remove=function(e,t){var i=e.indexOf(t),n=i>-1;return n&&e.splice(i,1),n},t$4.array.find=function(e,t){for(var i,n=e.length>>>0,r=0;r<n;r++)if(t(i=e[r],r,e))return i;return null},t$4.array.equals=function(e,t){var i=e.length;if(i!==t.length)return!1;for(var n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0},t$4.array.stableSort=function(e,t){var i,n=e.length,r=Array(e.length);for(i=0;i<n;i++)r[i]={index:i,value:e[i]};for(r.sort((function(e,i){return t(e.value,i.value)||e.index-i.index})),i=0;i<e.length;i++)e[i]=r[i].value},t$4.array.findIndex=function(e,t){var i,n=!e.every((function(n,r){return i=r,!t(n,r,e)}));return n?i:-1},t$4.array.isSorted=function(e,t,i){var n=t||t$4.array.numberSafeCompareFunction;return e.every((function(t,r){if(0===r)return!0;var o=n(e[r-1],t);return!(o>0||i&&0===o)}))},t$4.ASSUME_TOUCH=!1,t$4.DEFAULT_MAX_ZOOM=42,t$4.DEFAULT_MIN_ZOOM=0,t$4.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD=.5,t$4.DEFAULT_TILE_SIZE=256,t$4.DEFAULT_WMS_VERSION="1.3.0",t$4.ENABLE_CANVAS=!0,t$4.ENABLE_PROJ4JS=!0,t$4.ENABLE_RASTER_REPROJECTION=!0,t$4.ENABLE_WEBGL=!0,t$4.DEBUG_WEBGL=!0,t$4.INITIAL_ATLAS_SIZE=256,t$4.MAX_ATLAS_SIZE=-1,t$4.MOUSEWHEELZOOM_MAXDELTA=1,t$4.OVERVIEWMAP_MAX_RATIO=.75,t$4.OVERVIEWMAP_MIN_RATIO=.1,t$4.RASTER_REPROJECTION_MAX_SOURCE_TILES=100,t$4.RASTER_REPROJECTION_MAX_SUBDIVISION=10,t$4.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH=.25,t$4.SIMPLIFY_TOLERANCE=.5,t$4.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK=1024,t$4.VERSION="",t$4.inherits=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},t$4.nullFunction=function(){},t$4.getUid=function(e){return e.ol_uid||(e.ol_uid=++t$4.uidCounter_)},t$4.asserts={},t$4.asserts.assert=function(e,t){},t$4.has={};var U$2=typeof navigator<"u"?navigator.userAgent.toLowerCase():"";function r$a(e){e$2b(e)||(e=new u$I),this._clock=e,this._eventHelper=new n$x,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=ce$1.observable(a$15.now()),this.systemTime.equalityComparer=a$15.equals,this.startTime=ce$1.observable(e.startTime),this.startTime.equalityComparer=a$15.equals,this.startTime.subscribe((function(t){e.startTime=t,this.synchronize()}),this),this.stopTime=ce$1.observable(e.stopTime),this.stopTime.equalityComparer=a$15.equals,this.stopTime.subscribe((function(t){e.stopTime=t,this.synchronize()}),this),this.currentTime=ce$1.observable(e.currentTime),this.currentTime.equalityComparer=a$15.equals,this.currentTime.subscribe((function(t){e.currentTime=t,this.synchronize()}),this),this.multiplier=ce$1.observable(e.multiplier),this.multiplier.subscribe((function(t){e.multiplier=t,this.synchronize()}),this),this.clockStep=ce$1.observable(e.clockStep),this.clockStep.subscribe((function(t){e.clockStep=t,this.synchronize()}),this),this.clockRange=ce$1.observable(e.clockRange),this.clockRange.subscribe((function(t){e.clockRange=t,this.synchronize()}),this),this.canAnimate=ce$1.observable(e.canAnimate),this.canAnimate.subscribe((function(t){e.canAnimate=t,this.synchronize()}),this),this.shouldAnimate=ce$1.observable(e.shouldAnimate),this.shouldAnimate.subscribe((function(t){e.shouldAnimate=t,this.synchronize()}),this),ce$1.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}function t$3(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,t$16.throwInstantiationError()}function s$4(e,t){if(!e$2b(e))throw new t$16("func is required.");t=u$_(t,!0);var i=new o$1h,n=new o$1h;function r(){if(!r.canExecute)throw new t$16("Cannot execute command, canExecute is false.");var t,o={args:arguments,cancel:!1};return i.raiseEvent(o),o.cancel||(t=e.apply(null,arguments),n.raiseEvent(t)),t}return r.canExecute=t,ce$1.track(r,["canExecute"]),Object.defineProperties(r,{beforeExecute:{value:i},afterExecute:{value:n}}),r}t$4.has.FIREFOX=-1!==U$2.indexOf("firefox"),t$4.has.SAFARI=-1!==U$2.indexOf("safari")&&-1==U$2.indexOf("chrom"),t$4.has.WEBKIT=-1!==U$2.indexOf("webkit")&&-1==U$2.indexOf("edge"),t$4.has.MAC=-1!==U$2.indexOf("macintosh"),t$4.has.DEVICE_PIXEL_RATIO=1,t$4.has.CANVAS_LINE_DASH=!0,t$4.structs={},t$4.CollectionEventType={ADD:"add",REMOVE:"remove"},t$4.ObjectEventType={PROPERTYCHANGE:"propertychange"},t$4.events={},t$4.events.bindListener_=function(e){var t=function(t){var i=e.listener,n=e.bindTo||e.target;return e.callOnce&&t$4.events.unlistenByKey(e),i.call(n,t)};return e.boundListener=t,t},t$4.events.findListener_=function(e,t,i,n){for(var r,o=0,a=e.length;o<a;++o)if((r=e[o]).listener===t&&r.bindTo===i)return n&&(r.deleteIndex=o),r},t$4.events.getListeners=function(e,t){var i=e.ol_lm;return i?i[t]:void 0},t$4.events.getListenerMap_=function(e){var t=e.ol_lm;return t||(t=e.ol_lm={}),t},t$4.events.removeListeners_=function(e,t){var i=t$4.events.getListeners(e,t);if(i){for(var n=0,r=i.length;n<r;++n)e.removeEventListener(t,i[n].boundListener),t$4.obj.clear(i[n]);i.length=0;var o=e.ol_lm;o&&(delete o[t],0===Object.keys(o).length&&delete e.ol_lm)}},t$4.events.listen=function(e,t,i,n,r){var o=t$4.events.getListenerMap_(e),a=o[t];a||(a=o[t]=[]);var s=t$4.events.findListener_(a,i,n,!1);return s?r||(s.callOnce=!1):(s={bindTo:n,callOnce:!!r,listener:i,target:e,type:t},e.addEventListener(t,t$4.events.bindListener_(s)),a.push(s)),s},t$4.events.listenOnce=function(e,t,i,n){return t$4.events.listen(e,t,i,n,!0)},t$4.events.unlisten=function(e,t,i,n){var r=t$4.events.getListeners(e,t);if(r){var o=t$4.events.findListener_(r,i,n,!0);o&&t$4.events.unlistenByKey(o)}},t$4.events.unlistenByKey=function(e){if(e&&e.target){e.target.removeEventListener(e.type,e.boundListener);var t=t$4.events.getListeners(e.target,e.type);if(t){var i="deleteIndex"in e?e.deleteIndex:t.indexOf(e);-1!==i&&t.splice(i,1),0===t.length&&t$4.events.removeListeners_(e.target,e.type)}t$4.obj.clear(e)}},t$4.events.unlistenAll=function(e){var t=t$4.events.getListenerMap_(e);for(var i in t)t$4.events.removeListeners_(e,i)},t$4.Disposable=function(){},t$4.Disposable.prototype.disposed_=!1,t$4.Disposable.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())},t$4.Disposable.prototype.disposeInternal=t$4.nullFunction,t$4.events.Event={},t$4.events.Event=function(e){this.propagationStopped,this.type=e,this.target=null},t$4.events.Event.prototype.preventDefault=t$4.events.Event.prototype.stopPropagation=function(){this.propagationStopped=!0},t$4.events.Event.stopPropagation=function(e){e.stopPropagation()},t$4.events.Event.preventDefault=function(e){e.preventDefault()},t$4.events.EventTarget={},t$4.events.EventTarget=function(){t$4.Disposable.call(this),this.pendingRemovals_={},this.dispatching_={},this.listeners_={}},t$4.inherits(t$4.events.EventTarget,t$4.Disposable),t$4.events.EventTarget.prototype.addEventListener=function(e,t){var i=this.listeners_[e];i||(i=this.listeners_[e]=[]),-1===i.indexOf(t)&&i.push(t)},t$4.events.EventTarget.prototype.dispatchEvent=function(e){var t="string"==typeof e?new t$4.events.Event(e):e,i=t.type;t.target=this;var n,r=this.listeners_[i];if(r){i in this.dispatching_||(this.dispatching_[i]=0,this.pendingRemovals_[i]=0),++this.dispatching_[i];for(var o=0,a=r.length;o<a;++o)if(!1===r[o].call(this,t)||t.propagationStopped){n=!1;break}if(--this.dispatching_[i],0===this.dispatching_[i]){var s=this.pendingRemovals_[i];for(delete this.pendingRemovals_[i];s--;)this.removeEventListener(i,t$4.nullFunction);delete this.dispatching_[i]}return n}},t$4.events.EventTarget.prototype.disposeInternal=function(){t$4.events.unlistenAll(this)},t$4.events.EventTarget.prototype.getListeners=function(e){return this.listeners_[e]},t$4.events.EventTarget.prototype.hasListener=function(e){return e?e in this.listeners_:Object.keys(this.listeners_).length>0},t$4.events.EventTarget.prototype.removeEventListener=function(e,t){var i=this.listeners_[e];if(i){var n=i.indexOf(t);e in this.pendingRemovals_?(i[n]=t$4.nullFunction,++this.pendingRemovals_[e]):(i.splice(n,1),0===i.length&&delete this.listeners_[e])}},t$4.events.EventType={CHANGE:"change",CLEAR:"clear",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",ERROR:"error",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",MOUSEDOWN:"mousedown",MOUSEMOVE:"mousemove",MOUSEOUT:"mouseout",MOUSEUP:"mouseup",MOUSEWHEEL:"mousewheel",MSPOINTERDOWN:"MSPointerDown",RESIZE:"resize",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",WHEEL:"wheel"},t$4.Observable=function(){this.revision_=0},t$4.inherits(t$4.Observable,t$4.events.EventTarget),t$4.Observable.unByKey=function(e){if(Array.isArray(e))for(var t=0,i=e.length;t<i;++t)t$4.events.unlistenByKey(e[t]);else t$4.events.unlistenByKey(e)},t$4.Observable.prototype.changed=function(){++this.revision_},t$4.Observable.prototype.dispatchEvent,t$4.Observable.prototype.getRevision=function(){return this.revision_},t$4.Observable.prototype.on=function(e,t,i){if(Array.isArray(e)){for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=t$4.events.listen(this,e[o],t,i);return r}return t$4.events.listen(this,e,t,i)},t$4.Observable.prototype.once=function(e,t,i){if(Array.isArray(e)){for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=t$4.events.listenOnce(this,e[o],t,i);return r}return t$4.events.listenOnce(this,e,t,i)},t$4.Observable.prototype.un=function(e,t,i){if(Array.isArray(e))for(var n=0,r=e.length;n<r;++n)t$4.events.unlisten(this,e[n],t,i);else t$4.events.unlisten(this,e,t,i)},t$4.uidCounter_=0,t$4.Object=function(e){t$4.Observable.call(this),t$4.getUid(this),this.values_={},void 0!==e&&this.setProperties(e)},t$4.inherits(t$4.Object,t$4.Observable),t$4.Object.changeEventTypeCache_={},t$4.Object.getChangeEventType=function(e){return t$4.Object.changeEventTypeCache_.hasOwnProperty(e)?t$4.Object.changeEventTypeCache_[e]:t$4.Object.changeEventTypeCache_[e]="change:"+e},t$4.Object.prototype.get=function(e){var t;return this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t},t$4.Object.prototype.getKeys=function(){return Object.keys(this.values_)},t$4.Object.prototype.getProperties=function(){return t$4.obj.assign({},this.values_)},t$4.Object.prototype.notify=function(e,t){},t$4.Object.prototype.set=function(e,t,i){if(i)this.values_[e]=t;else{var n=this.values_[e];this.values_[e]=t,n!==t&&this.notify(e,n)}},t$4.Object.prototype.setProperties=function(e,t){var i;for(i in e)this.set(i,e[i],t)},t$4.Object.prototype.unset=function(e,t){if(e in this.values_){var i=this.values_[e];delete this.values_[e],t||this.notify(e,i)}},t$4.Object.Event=function(e,t,i){t$4.events.Event.call(this,e),this.key=t,this.oldValue=i},t$4.inherits(t$4.Object.Event,t$4.events.Event),t$4.functions={},t$4.functions.TRUE=function(){return!0},t$4.functions.FALSE=function(){return!1},t$4.math={},t$4.math.clamp=function(e,t,i){return Math.min(Math.max(e,t),i)},t$4.math.cosh=function(){var e;return e="cosh"in Math?Math.cosh:function(e){var t=Math.exp(e);return(t+1/t)/2},e}(),t$4.math.roundUpToPowerOfTwo=function(e){return t$4.asserts.assert(0<e,29),Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},t$4.math.squaredSegmentDistance=function(e,t,i,n,r,o){var a=r-i,s=o-n;if(0!==a||0!==s){var l=((e-i)*a+(t-n)*s)/(a*a+s*s);l>1?(i=r,n=o):l>0&&(i+=a*l,n+=s*l)}return t$4.math.squaredDistance(e,t,i,n)},t$4.math.squaredDistance=function(e,t,i,n){var r=i-e,o=n-t;return r*r+o*o},t$4.math.solveLinearSystem=function(e){for(var t=e.length,i=0;i<t;i++){for(var n=i,r=Math.abs(e[i][i]),o=i+1;o<t;o++){var a=Math.abs(e[o][i]);a>r&&(r=a,n=o)}if(0===r)return null;var s=e[n];e[n]=e[i],e[i]=s;for(var l=i+1;l<t;l++)for(var u=-e[l][i]/e[i][i],c=i;c<t+1;c++)i==c?e[l][c]=0:e[l][c]+=u*e[i][c]}for(var h=new Array(t),d=t-1;d>=0;d--){h[d]=e[d][t]/e[d][d];for(var f=d-1;f>=0;f--)e[f][t]-=e[f][d]*h[d]}return h},t$4.math.toDegrees=function(e){return 180*e/Math.PI},t$4.math.toRadians=function(e){return e*Math.PI/180},t$4.math.modulo=function(e,t){var i=e%t;return i*t<0?i+t:i},t$4.math.lerp=function(e,t,i){return e+i*(t-e)},t$4.ImageState={IDLE:0,LOADING:1,LOADED:2,ERROR:3},t$4.color={},t$4.color.HEX_COLOR_RE_=/^#(?:[0-9a-f]{3,4}){1,2}$/i,t$4.color.NAMED_COLOR_RE_=/^([a-z]*)$/i,t$4.color.asArray=function(e){return Array.isArray(e)?e:t$4.color.fromString(e)},t$4.color.asString=function(e){return"string"==typeof e?e:t$4.color.toString(e)},t$4.color.fromNamed=function(e){var t=document.createElement("div");t.style.color=e,document.body.appendChild(t);var i=getComputedStyle(t).color;return document.body.removeChild(t),i},t$4.color.fromString=function(){var e={},t=0;return function(i){var n;if(e.hasOwnProperty(i))n=e[i];else{if(t>=1024){var r,o=0;for(r in e)0==(3&o++)&&(delete e[r],--t)}n=t$4.color.fromStringInternal_(i),e[i]=n,++t}return n}}(),t$4.color.fromStringInternal_=function(e){var t,i,n,r,o,a;if(t$4.color.NAMED_COLOR_RE_.exec(e)&&(e=t$4.color.fromNamed(e)),t$4.color.HEX_COLOR_RE_.exec(e)){var s,l=e.length-1;s=l<=4?1:2;var u=4===l||8===l;t=parseInt(e.substr(1+0*s,s),16),i=parseInt(e.substr(1+1*s,s),16),n=parseInt(e.substr(1+2*s,s),16),r=u?parseInt(e.substr(1+3*s,s),16):255,1==s&&(t=(t<<4)+t,i=(i<<4)+i,n=(n<<4)+n,u&&(r=(r<<4)+r)),o=[t,i,n,r/255]}else 0==e.indexOf("rgba(")?(a=e.slice(5,-1).split(",").map(Number),o=t$4.color.normalize(a)):0==e.indexOf("rgb(")?((a=e.slice(4,-1).split(",").map(Number)).push(1),o=t$4.color.normalize(a)):t$4.asserts.assert(!1,14);return o},t$4.color.normalize=function(e,t){var i=t||[];return i[0]=t$4.math.clamp(e[0]+.5|0,0,255),i[1]=t$4.math.clamp(e[1]+.5|0,0,255),i[2]=t$4.math.clamp(e[2]+.5|0,0,255),i[3]=t$4.math.clamp(e[3],0,1),i},t$4.color.toString=function(e){var t=e[0];t!=(0|t)&&(t=t+.5|0);var i=e[1];i!=(0|i)&&(i=i+.5|0);var n=e[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+t+","+i+","+n+","+(void 0===e[3]?1:e[3])+")"},t$4.colorlike={},t$4.colorlike.asColorLike=function(e){return t$4.colorlike.isColorLike(e)?e:t$4.color.asString(e)},t$4.colorlike.isColorLike=function(e){return"string"==typeof e||e instanceof CanvasPattern||e instanceof CanvasGradient},t$4.css={},t$4.css.CLASS_HIDDEN="ol-hidden",t$4.css.CLASS_SELECTABLE="ol-selectable",t$4.css.CLASS_UNSELECTABLE="ol-unselectable",t$4.css.CLASS_UNSUPPORTED="ol-unsupported",t$4.css.CLASS_CONTROL="ol-control",t$4.css.getFontFamilies=function(){var e,t={};return function(i){if(e||(e=document.createElement("div").style),!(i in t)){e.font=i;var n=e.fontFamily;if(e.font="",!n)return null;t[i]=n.split(/,\s?/)}return t[i]}}(),t$4.dom={},t$4.dom.createCanvasContext2D=function(e,t){return(e&&t?new OffscreenCanvas(e,t):new OffscreenCanvas(1,1)).getContext("2d")},t$4.dom.outerWidth=function(e){var t=e.offsetWidth,i=getComputedStyle(e);return t+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)},t$4.dom.outerHeight=function(e){var t=e.offsetHeight,i=getComputedStyle(e);return t+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)},t$4.dom.replaceNode=function(e,t){var i=t.parentNode;i&&i.replaceChild(e,t)},t$4.dom.removeNode=function(e){return e&&e.parentNode?e.parentNode.removeChild(e):null},t$4.dom.removeChildren=function(e){for(;e.lastChild;)e.removeChild(e.lastChild)},t$4.extent={},t$4.extent.Corner={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},t$4.extent.Relationship={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16},t$4.extent.boundingExtent=function(e){for(var t=t$4.extent.createEmpty(),i=0,n=e.length;i<n;++i)t$4.extent.extendCoordinate(t,e[i]);return t},t$4.extent.boundingExtentXYs_=function(e,t,i){var n=Math.min.apply(null,e),r=Math.min.apply(null,t),o=Math.max.apply(null,e),a=Math.max.apply(null,t);return t$4.extent.createOrUpdate(n,r,o,a,i)},t$4.extent.buffer=function(e,t,i){return i?(i[0]=e[0]-t,i[1]=e[1]-t,i[2]=e[2]+t,i[3]=e[3]+t,i):[e[0]-t,e[1]-t,e[2]+t,e[3]+t]},t$4.extent.clone=function(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e.slice()},t$4.extent.closestSquaredDistanceXY=function(e,t,i){var n,r;return(n=t<e[0]?e[0]-t:e[2]<t?t-e[2]:0)*n+(r=i<e[1]?e[1]-i:e[3]<i?i-e[3]:0)*r},t$4.extent.containsCoordinate=function(e,t){return t$4.extent.containsXY(e,t[0],t[1])},t$4.extent.containsExtent=function(e,t){return e[0]<=t[0]&&t[2]<=e[2]&&e[1]<=t[1]&&t[3]<=e[3]},t$4.extent.containsXY=function(e,t,i){return e[0]<=t&&t<=e[2]&&e[1]<=i&&i<=e[3]},t$4.extent.coordinateRelationship=function(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t$4.extent.Relationship.UNKNOWN;return a<i?l|=t$4.extent.Relationship.LEFT:a>r&&(l|=t$4.extent.Relationship.RIGHT),s<n?l|=t$4.extent.Relationship.BELOW:s>o&&(l|=t$4.extent.Relationship.ABOVE),l===t$4.extent.Relationship.UNKNOWN&&(l=t$4.extent.Relationship.INTERSECTING),l},t$4.extent.createEmpty=function(){return[1/0,1/0,-1/0,-1/0]},t$4.extent.createOrUpdate=function(e,t,i,n,r){return r?(r[0]=e,r[1]=t,r[2]=i,r[3]=n,r):[e,t,i,n]},t$4.extent.createOrUpdateEmpty=function(e){return t$4.extent.createOrUpdate(1/0,1/0,-1/0,-1/0,e)},t$4.extent.createOrUpdateFromCoordinate=function(e,t){var i=e[0],n=e[1];return t$4.extent.createOrUpdate(i,n,i,n,t)},t$4.extent.createOrUpdateFromCoordinates=function(e,t){var i=t$4.extent.createOrUpdateEmpty(t);return t$4.extent.extendCoordinates(i,e)},t$4.extent.createOrUpdateFromFlatCoordinates=function(e,t,i,n,r){var o=t$4.extent.createOrUpdateEmpty(r);return t$4.extent.extendFlatCoordinates(o,e,t,i,n)},t$4.extent.createOrUpdateFromRings=function(e,t){var i=t$4.extent.createOrUpdateEmpty(t);return t$4.extent.extendRings(i,e)},t$4.extent.equals=function(e,t){return e[0]==t[0]&&e[2]==t[2]&&e[1]==t[1]&&e[3]==t[3]},t$4.extent.extend=function(e,t){return t[0]<e[0]&&(e[0]=t[0]),t[2]>e[2]&&(e[2]=t[2]),t[1]<e[1]&&(e[1]=t[1]),t[3]>e[3]&&(e[3]=t[3]),e},t$4.extent.extendCoordinate=function(e,t){t[0]<e[0]&&(e[0]=t[0]),t[0]>e[2]&&(e[2]=t[0]),t[1]<e[1]&&(e[1]=t[1]),t[1]>e[3]&&(e[3]=t[1])},t$4.extent.extendCoordinates=function(e,t){var i,n;for(i=0,n=t.length;i<n;++i)t$4.extent.extendCoordinate(e,t[i]);return e},t$4.extent.extendFlatCoordinates=function(e,t,i,n,r){for(;i<n;i+=r)t$4.extent.extendXY(e,t[i],t[i+1]);return e},t$4.extent.extendRings=function(e,t){var i,n;for(i=0,n=t.length;i<n;++i)t$4.extent.extendCoordinates(e,t[i]);return e},t$4.extent.extendXY=function(e,t,i){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],i),e[2]=Math.max(e[2],t),e[3]=Math.max(e[3],i)},t$4.extent.forEachCorner=function(e,t,i){var n;return!!((n=t.call(i,t$4.extent.getBottomLeft(e)))||(n=t.call(i,t$4.extent.getBottomRight(e)),n)||(n=t.call(i,t$4.extent.getTopRight(e)),n)||(n=t.call(i,t$4.extent.getTopLeft(e)),n))&&n},t$4.extent.getArea=function(e){var t=0;return t$4.extent.isEmpty(e)||(t=t$4.extent.getWidth(e)*t$4.extent.getHeight(e)),t},t$4.extent.getBottomLeft=function(e){return[e[0],e[1]]},t$4.extent.getBottomRight=function(e){return[e[2],e[1]]},t$4.extent.getCenter=function(e){return[(e[0]+e[2])/2,(e[1]+e[3])/2]},t$4.extent.getCorner=function(e,t){var i;return t===t$4.extent.Corner.BOTTOM_LEFT?i=t$4.extent.getBottomLeft(e):t===t$4.extent.Corner.BOTTOM_RIGHT?i=t$4.extent.getBottomRight(e):t===t$4.extent.Corner.TOP_LEFT?i=t$4.extent.getTopLeft(e):t===t$4.extent.Corner.TOP_RIGHT?i=t$4.extent.getTopRight(e):t$4.asserts.assert(!1,13),i},t$4.extent.getEnlargedArea=function(e,t){var i=Math.min(e[0],t[0]),n=Math.min(e[1],t[1]);return(Math.max(e[2],t[2])-i)*(Math.max(e[3],t[3])-n)},t$4.extent.getForViewAndSize=function(e,t,i,n,r){var o=t*n[0]/2,a=t*n[1]/2,s=Math.cos(i),l=Math.sin(i),u=o*s,c=o*l,h=a*s,d=a*l,f=e[0],p=e[1],_=f-u+d,m=f-u-d,g=f+u-d,x=f+u+d,v=p-c-h,y=p-c+h,$=p+c+h,b=p+c-h;return t$4.extent.createOrUpdate(Math.min(_,m,g,x),Math.min(v,y,$,b),Math.max(_,m,g,x),Math.max(v,y,$,b),r)},t$4.extent.getHeight=function(e){return e[3]-e[1]},t$4.extent.getIntersectionArea=function(e,t){var i=t$4.extent.getIntersection(e,t);return t$4.extent.getArea(i)},t$4.extent.getIntersection=function(e,t,i){var n=i||t$4.extent.createEmpty();return t$4.extent.intersects(e,t)&&(e[0]>t[0]?n[0]=e[0]:n[0]=t[0],e[1]>t[1]?n[1]=e[1]:n[1]=t[1],e[2]<t[2]?n[2]=e[2]:n[2]=t[2],e[3]<t[3]?n[3]=e[3]:n[3]=t[3]),n},t$4.extent.getMargin=function(e){return t$4.extent.getWidth(e)+t$4.extent.getHeight(e)},t$4.extent.getSize=function(e){return[e[2]-e[0],e[3]-e[1]]},t$4.extent.getTopLeft=function(e){return[e[0],e[3]]},t$4.extent.getTopRight=function(e){return[e[2],e[3]]},t$4.extent.getWidth=function(e){return e[2]-e[0]},t$4.extent.intersects=function(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]},t$4.extent.isEmpty=function(e){return e[2]<e[0]||e[3]<e[1]},t$4.extent.returnOrUpdate=function(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e},t$4.extent.scaleFromCenter=function(e,t){var i=(e[2]-e[0])/2*(t-1),n=(e[3]-e[1])/2*(t-1);e[0]-=i,e[2]+=i,e[1]-=n,e[3]+=n},t$4.extent.intersectsSegment=function(e,t,i){var n=!1,r=t$4.extent.coordinateRelationship(e,t),o=t$4.extent.coordinateRelationship(e,i);if(r===t$4.extent.Relationship.INTERSECTING||o===t$4.extent.Relationship.INTERSECTING)n=!0;else{var a,s,l=e[0],u=e[1],c=e[2],h=e[3],d=t[0],f=t[1],p=i[0],_=i[1],m=(_-f)/(p-d);!!(o&t$4.extent.Relationship.ABOVE)&&!(r&t$4.extent.Relationship.ABOVE)&&(n=(a=p-(_-h)/m)>=l&&a<=c),!n&&!!(o&t$4.extent.Relationship.RIGHT)&&!(r&t$4.extent.Relationship.RIGHT)&&(n=(s=_-(p-c)*m)>=u&&s<=h),!n&&!!(o&t$4.extent.Relationship.BELOW)&&!(r&t$4.extent.Relationship.BELOW)&&(n=(a=p-(_-u)/m)>=l&&a<=c),!n&&o&t$4.extent.Relationship.LEFT&&!(r&t$4.extent.Relationship.LEFT)&&(n=(s=_-(p-l)*m)>=u&&s<=h)}return n},t$4.extent.applyTransform=function(e,t,i){var n=[e[0],e[1],e[0],e[3],e[2],e[1],e[2],e[3]];t(n,n,2);var r=[n[0],n[2],n[4],n[6]],o=[n[1],n[3],n[5],n[7]];return t$4.extent.boundingExtentXYs_(r,o,i)},t$4.obj={},t$4.obj.assign="function"==typeof Object.assign?Object.assign:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(e),n=1,r=arguments.length;n<r;++n){var o=arguments[n];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(i[a]=o[a])}return i},t$4.obj.clear=function(e){for(var t in e)delete e[t]},t$4.obj.getValues=function(e){var t=[];for(var i in e)t.push(e[i]);return t},t$4.obj.isEmpty=function(e){var t;for(t in e)return!1;return!t},t$4.transform={},t$4.transform.tmp_=new Array(6),t$4.transform.create=function(){return[1,0,0,1,0,0]},t$4.transform.reset=function(e){return t$4.transform.set(e,1,0,0,1,0,0)},t$4.transform.multiply=function(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],u=t[1],c=t[2],h=t[3],d=t[4],f=t[5];return e[0]=i*l+r*u,e[1]=n*l+o*u,e[2]=i*c+r*h,e[3]=n*c+o*h,e[4]=i*d+r*f+a,e[5]=n*d+o*f+s,e},t$4.transform.set=function(e,t,i,n,r,o,a){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e},t$4.transform.setFromArray=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},t$4.transform.apply=function(e,t){var i=t[0],n=t[1];return t[0]=e[0]*i+e[2]*n+e[4],t[1]=e[1]*i+e[3]*n+e[5],t},t$4.transform.rotate=function(e,t){var i=Math.cos(t),n=Math.sin(t);return t$4.transform.multiply(e,t$4.transform.set(t$4.transform.tmp_,i,n,-n,i,0,0))},t$4.transform.scale=function(e,t,i){return t$4.transform.multiply(e,t$4.transform.set(t$4.transform.tmp_,t,0,0,i,0,0))},t$4.transform.translate=function(e,t,i){return t$4.transform.multiply(e,t$4.transform.set(t$4.transform.tmp_,1,0,0,1,t,i))},t$4.transform.compose=function(e,t,i,n,r,o,a,s){var l=Math.sin(o),u=Math.cos(o);return e[0]=n*u,e[1]=r*l,e[2]=-n*l,e[3]=r*u,e[4]=a*n*u-s*n*l+t,e[5]=a*r*l+s*r*u+i,e},t$4.transform.invert=function(e){var t=t$4.transform.determinant(e),i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5];return e[0]=o/t,e[1]=-n/t,e[2]=-r/t,e[3]=i/t,e[4]=(r*s-o*a)/t,e[5]=-(i*s-n*a)/t,e},t$4.transform.determinant=function(e){return e[0]*e[3]-e[1]*e[2]},t$4.geom={},t$4.geom.flat={},t$4.geom.flat.center={},t$4.geom.flat.reverse={},t$4.geom.flat.orient={},t$4.geom.flat.transform={},t$4.geom.flat.transform.transform2D=function(e,t,i,n,r,o){var a,s=o||[],l=0;for(a=t;a<i;a+=n){var u=e[a],c=e[a+1];s[l++]=r[0]*u+r[2]*c+r[4],s[l++]=r[1]*u+r[3]*c+r[5]}return o&&s.length!=l&&(s.length=l),s},t$4.geom.flat.transform.rotate=function(e,t,i,n,r,o,a){for(var s=a||[],l=Math.cos(r),u=Math.sin(r),c=o[0],h=o[1],d=0,f=t;f<i;f+=n){var p=e[f]-c,_=e[f+1]-h;s[d++]=c+p*l-_*u,s[d++]=h+p*u+_*l;for(var m=f+2;m<f+n;++m)s[d++]=e[m]}return a&&s.length!=d&&(s.length=d),s},t$4.geom.flat.transform.scale=function(e,t,i,n,r,o,a,s){for(var l=s||[],u=a[0],c=a[1],h=0,d=t;d<i;d+=n){var f=e[d]-u,p=e[d+1]-c;l[h++]=u+r*f,l[h++]=c+o*p;for(var _=d+2;_<d+n;++_)l[h++]=e[_]}return s&&l.length!=h&&(l.length=h),l},t$4.geom.GeometryLayout={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"},t$4.geom.flat.reverse.coordinates=function(e,t,i,n){for(;t<i-n;){var r;for(r=0;r<n;++r){var o=e[t+r];e[t+r]=e[i-n+r],e[i-n+r]=o}t+=n,i-=n}},t$4.geom.flat.orient.linearRingIsClockwise=function(e,t,i,n){for(var r=0,o=e[i-n],a=e[i-n+1];t<i;t+=n){var s=e[t],l=e[t+1];r+=(s-o)*(l+a),o=s,a=l}return r>0},t$4.geom.flat.orient.linearRingsAreOriented=function(e,t,i,n,r){var o,a,s=void 0!==r&&r;for(o=0,a=i.length;o<a;++o){var l=i[o],u=t$4.geom.flat.orient.linearRingIsClockwise(e,t,l,n);if(0===o){if(s&&u||!s&&!u)return!1}else if(s&&!u||!s&&u)return!1;t=l}return!0},t$4.geom.flat.orient.linearRingssAreOriented=function(e,t,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o)if(!t$4.geom.flat.orient.linearRingsAreOriented(e,t,i[o],n,r))return!1;return!0},t$4.geom.flat.orient.orientLinearRings=function(e,t,i,n,r){var o,a,s=void 0!==r&&r;for(o=0,a=i.length;o<a;++o){var l=i[o],u=t$4.geom.flat.orient.linearRingIsClockwise(e,t,l,n);(0===o?s&&u||!s&&!u:s&&!u||!s&&u)&&t$4.geom.flat.reverse.coordinates(e,t,l,n),t=l}return t},t$4.geom.flat.orient.orientLinearRingss=function(e,t,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o)t=t$4.geom.flat.orient.orientLinearRings(e,t,i[o],n,r);return t},t$4.geom.flat.simplify={},t$4.geom.flat.simplify.lineString=function(e,t,i,n,r,o,a){var s=void 0!==a?a:[];return o||(i=t$4.geom.flat.simplify.radialDistance(e,t,i,n,r,s,0),e=s,t=0,n=2),s.length=t$4.geom.flat.simplify.douglasPeucker(e,t,i,n,r,s,0),s},t$4.geom.flat.simplify.douglasPeucker=function(e,t,i,n,r,o,a){var s=(i-t)/n;if(s<3){for(;t<i;t+=n)o[a++]=e[t],o[a++]=e[t+1];return a}var l=new Array(s);l[0]=1,l[s-1]=1;for(var u,c=[t,i-n],h=0;c.length>0;){var d=c.pop(),f=c.pop(),p=0,_=e[f],m=e[f+1],g=e[d],x=e[d+1];for(u=f+n;u<d;u+=n){var v=e[u],y=e[u+1],$=t$4.math.squaredSegmentDistance(v,y,_,m,g,x);$>p&&(h=u,p=$)}p>r&&(l[(h-t)/n]=1,f+n<h&&c.push(f,h),h+n<d&&c.push(h,d))}for(u=0;u<s;++u)l[u]&&(o[a++]=e[t+u*n],o[a++]=e[t+u*n+1]);return a},t$4.geom.flat.simplify.douglasPeuckers=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l];a=t$4.geom.flat.simplify.douglasPeucker(e,t,c,n,r,o,a),s.push(a),t=c}return a},t$4.geom.flat.simplify.douglasPeuckerss=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l],h=[];a=t$4.geom.flat.simplify.douglasPeuckers(e,t,c,n,r,o,a,h),s.push(h),t=c[c.length-1]}return a},t$4.geom.flat.simplify.radialDistance=function(e,t,i,n,r,o,a){if(i<=t+n){for(;t<i;t+=n)o[a++]=e[t],o[a++]=e[t+1];return a}var s=e[t],l=e[t+1];o[a++]=s,o[a++]=l;var u=s,c=l;for(t+=n;t<i;t+=n)u=e[t],c=e[t+1],t$4.math.squaredDistance(s,l,u,c)>r&&(o[a++]=u,o[a++]=c,s=u,l=c);return(u!=s||c!=l)&&(o[a++]=u,o[a++]=c),a},t$4.geom.flat.simplify.snap=function(e,t){return t*Math.round(e/t)},t$4.geom.flat.simplify.quantize=function(e,t,i,n,r,o,a){if(t==i)return a;var s,l,u=t$4.geom.flat.simplify.snap(e[t],r),c=t$4.geom.flat.simplify.snap(e[t+1],r);t+=n,o[a++]=u,o[a++]=c;do{if(s=t$4.geom.flat.simplify.snap(e[t],r),l=t$4.geom.flat.simplify.snap(e[t+1],r),(t+=n)==i)return o[a++]=s,o[a++]=l,a}while(s==u&&l==c);for(;t<i;){var h,d;if(h=t$4.geom.flat.simplify.snap(e[t],r),d=t$4.geom.flat.simplify.snap(e[t+1],r),t+=n,h!=s||d!=l){var f=s-u,p=l-c,_=h-u,m=d-c;if(f*m==p*_&&(f<0&&_<f||f==_||f>0&&_>f)&&(p<0&&m<p||p==m||p>0&&m>p)){s=h,l=d;continue}o[a++]=s,o[a++]=l,u=s,c=l,s=h,l=d}}return o[a++]=s,o[a++]=l,a},t$4.geom.flat.simplify.quantizes=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l];a=t$4.geom.flat.simplify.quantize(e,t,c,n,r,o,a),s.push(a),t=c}return a},t$4.geom.flat.simplify.quantizess=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l],h=[];a=t$4.geom.flat.simplify.quantizes(e,t,c,n,r,o,a,h),s.push(h),t=c[c.length-1]}return a},t$4.geom.GeometryType={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},t$4.geom.Geometry=function(){t$4.Object.call(this),this.extent_=t$4.extent.createEmpty(),this.extentRevision_=-1,this.simplifiedGeometryCache={},this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.tmpTransform_=t$4.transform.create()},t$4.inherits(t$4.geom.Geometry,t$4.Object),t$4.geom.Geometry.prototype.clone=function(){},t$4.geom.Geometry.prototype.closestPointXY=function(e,t,i,n){},t$4.geom.Geometry.prototype.getClosestPoint=function(e,t){var i=t||[NaN,NaN];return this.closestPointXY(e[0],e[1],i,1/0),i},t$4.geom.Geometry.prototype.intersectsCoordinate=function(e){return this.containsXY(e[0],e[1])},t$4.geom.Geometry.prototype.computeExtent=function(e){},t$4.geom.Geometry.prototype.containsXY=t$4.functions.FALSE,t$4.geom.Geometry.prototype.getExtent=function(e){return this.extentRevision_!=this.getRevision()&&(this.extent_=this.computeExtent(this.extent_),this.extentRevision_=this.getRevision()),t$4.extent.returnOrUpdate(this.extent_,e)},t$4.geom.Geometry.prototype.rotate=function(e,t){},t$4.geom.Geometry.prototype.scale=function(e,t,i){},t$4.geom.Geometry.prototype.simplify=function(e){return this.getSimplifiedGeometry(e*e)},t$4.geom.Geometry.prototype.getSimplifiedGeometry=function(e){},t$4.geom.Geometry.prototype.getType=function(){},t$4.geom.Geometry.prototype.applyTransform=function(e){},t$4.geom.Geometry.prototype.intersectsExtent=function(e){},t$4.geom.Geometry.prototype.translate=function(e,t){},t$4.geom.Geometry.prototype.transform=function(e,t){var i=this.tmpTransform_,n=(e=t$4.proj.get(e)).getUnits()==t$4.proj.Units.TILE_PIXELS?function(n,r,o){var a=e.getExtent(),s=e.getWorldExtent(),l=t$4.extent.getHeight(s)/t$4.extent.getHeight(a);return t$4.transform.compose(i,s[0],s[3],l,-l,0,0,0),t$4.geom.flat.transform.transform2D(n,0,n.length,o,i,r),t$4.proj.getTransform(e,t)(n,r,o)}:t$4.proj.getTransform(e,t);return this.applyTransform(n),this},t$4.geom.SimpleGeometry=function(){t$4.geom.Geometry.call(this),this.layout=t$4.geom.GeometryLayout.XY,this.stride=2,this.flatCoordinates=null},t$4.inherits(t$4.geom.SimpleGeometry,t$4.geom.Geometry),t$4.geom.SimpleGeometry.getLayoutForStride_=function(e){var t;return 2==e?t=t$4.geom.GeometryLayout.XY:3==e?t=t$4.geom.GeometryLayout.XYZ:4==e&&(t=t$4.geom.GeometryLayout.XYZM),t},t$4.geom.SimpleGeometry.getStrideForLayout=function(e){var t;return e==t$4.geom.GeometryLayout.XY?t=2:e==t$4.geom.GeometryLayout.XYZ||e==t$4.geom.GeometryLayout.XYM?t=3:e==t$4.geom.GeometryLayout.XYZM&&(t=4),t},t$4.geom.SimpleGeometry.prototype.containsXY=t$4.functions.FALSE,t$4.geom.SimpleGeometry.prototype.computeExtent=function(e){return t$4.extent.createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t$4.geom.SimpleGeometry.prototype.getCoordinates=function(){},t$4.geom.SimpleGeometry.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},t$4.geom.SimpleGeometry.prototype.getFlatCoordinates=function(){return this.flatCoordinates},t$4.geom.SimpleGeometry.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},t$4.geom.SimpleGeometry.prototype.getLayout=function(){return this.layout},t$4.geom.SimpleGeometry.prototype.getSimplifiedGeometry=function(e){if(this.simplifiedGeometryRevision!=this.getRevision()&&(t$4.obj.clear(this.simplifiedGeometryCache),this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var t=e.toString();if(this.simplifiedGeometryCache.hasOwnProperty(t))return this.simplifiedGeometryCache[t];var i=this.getSimplifiedGeometryInternal(e);return i.getFlatCoordinates().length<this.flatCoordinates.length?(this.simplifiedGeometryCache[t]=i,i):(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)},t$4.geom.SimpleGeometry.prototype.getSimplifiedGeometryInternal=function(e){return this},t$4.geom.SimpleGeometry.prototype.getStride=function(){return this.stride},t$4.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal=function(e,t){this.stride=t$4.geom.SimpleGeometry.getStrideForLayout(e),this.layout=e,this.flatCoordinates=t},t$4.geom.SimpleGeometry.prototype.setCoordinates=function(e,t){},t$4.geom.SimpleGeometry.prototype.setLayout=function(e,t,i){var n;if(e)n=t$4.geom.SimpleGeometry.getStrideForLayout(e);else{var r;for(r=0;r<i;++r){if(0===t.length)return this.layout=t$4.geom.GeometryLayout.XY,void(this.stride=2);t=t[0]}n=t.length,e=t$4.geom.SimpleGeometry.getLayoutForStride_(n)}this.layout=e,this.stride=n},t$4.geom.SimpleGeometry.prototype.applyTransform=function(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},t$4.geom.SimpleGeometry.prototype.rotate=function(e,t){var i=this.getFlatCoordinates();if(i){var n=this.getStride();t$4.geom.flat.transform.rotate(i,0,i.length,n,e,t,i),this.changed()}},t$4.geom.SimpleGeometry.prototype.scale=function(e,t,i){var n=t;void 0===n&&(n=e);var r=i;r||(r=t$4.extent.getCenter(this.getExtent()));var o=this.getFlatCoordinates();if(o){var a=this.getStride();t$4.geom.flat.transform.scale(o,0,o.length,a,e,n,r,o),this.changed()}},t$4.geom.SimpleGeometry.prototype.translate=function(e,t){var i=this.getFlatCoordinates();if(i){var n=this.getStride();t$4.geom.flat.transform.translate(i,0,i.length,n,e,t,i),this.changed()}},t$4.geom.SimpleGeometry.transform2D=function(e,t,i){var n=e.getFlatCoordinates();if(n){var r=e.getStride();return t$4.geom.flat.transform.transform2D(n,0,n.length,r,t,i)}return null},t$4.geom.Polygon=function(e,t){t$4.geom.SimpleGeometry.call(this),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.Polygon,t$4.geom.SimpleGeometry),t$4.geom.Polygon.prototype.appendLinearRing=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},t$4.geom.Polygon.prototype.clone=function(){var e=new t$4.geom.Polygon(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice()),e},t$4.geom.Polygon.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,i,n))},t$4.geom.Polygon.prototype.containsXY=function(e,t){return t$4.geom.flat.contains.linearRingsContainsXY(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)},t$4.geom.Polygon.prototype.getArea=function(){return t$4.geom.flat.area.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},t$4.geom.Polygon.prototype.getCoordinates=function(e){var t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),t$4.geom.flat.orient.orientLinearRings(t,0,this.ends_,this.stride,e)):t=this.flatCoordinates,t$4.geom.flat.inflate.coordinatess(t,0,this.ends_,this.stride)},t$4.geom.Polygon.prototype.getEnds=function(){return this.ends_},t$4.geom.Polygon.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var e=t$4.extent.getCenter(this.getExtent());this.flatInteriorPoint_=t$4.geom.flat.interiorpoint.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},t$4.geom.Polygon.prototype.getInteriorPoint=function(){return new t$4.geom.Point(this.getFlatInteriorPoint(),t$4.geom.GeometryLayout.XYM)},t$4.geom.Polygon.prototype.getLinearRingCount=function(){return this.ends_.length},t$4.geom.Polygon.prototype.getLinearRing=function(e){if(e<0||this.ends_.length<=e)return null;var t=new t$4.geom.LinearRing(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e])),t},t$4.geom.Polygon.prototype.getLinearRings=function(){var e,t,i=this.layout,n=this.flatCoordinates,r=this.ends_,o=[],a=0;for(e=0,t=r.length;e<t;++e){var s=r[e],l=new t$4.geom.LinearRing(null);l.setFlatCoordinates(i,n.slice(a,s)),o.push(l),a=s}return o},t$4.geom.Polygon.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;t$4.geom.flat.orient.linearRingsAreOriented(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=t$4.geom.flat.orient.orientLinearRings(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t$4.geom.Polygon.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$4.geom.flat.simplify.quantizes(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,i);var n=new t$4.geom.Polygon(null);return n.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t,i),n},t$4.geom.Polygon.prototype.getType=function(){return t$4.geom.GeometryType.POLYGON},t$4.geom.Polygon.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)},t$4.geom.Polygon.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$4.geom.flat.deflate.coordinatess(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1]}else this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null,this.ends_)},t$4.geom.Polygon.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.ends_=i},t$4.geom.Polygon.circular=function(e,t,i,n){var r,o=n||32,a=[];for(r=0;r<o;++r)t$4.array.extend(a,e.offset(t,i,2*Math.PI*r/o));a.push(a[0],a[1]);var s=new t$4.geom.Polygon(null);return s.setFlatCoordinates(t$4.geom.GeometryLayout.XY,a,[a.length]),s},t$4.geom.Polygon.fromExtent=function(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=[t,i,t,r,n,r,n,i,t,i],a=new t$4.geom.Polygon(null);return a.setFlatCoordinates(t$4.geom.GeometryLayout.XY,o,[o.length]),a},t$4.geom.Polygon.fromCircle=function(e,t,i){for(var n=t||32,r=e.getStride(),o=e.getLayout(),a=new t$4.geom.Polygon(null,o),s=r*(n+1),l=new Array(s),u=0;u<s;u++)l[u]=0;var c=[l.length];return a.setFlatCoordinates(o,l,c),t$4.geom.Polygon.makeRegular(a,e.getCenter(),e.getRadius(),i),a},t$4.geom.Polygon.makeRegular=function(e,t,i,n){for(var r,o,a=e.getFlatCoordinates(),s=e.getLayout(),l=e.getStride(),u=e.getEnds(),c=a.length/l-1,h=n||0,d=0;d<=c;++d)o=d*l,r=h+2*t$4.math.modulo(d,c)*Math.PI/c,a[o]=t[0]+i*Math.cos(r),a[o+1]=t[1]+i*Math.sin(r);e.setFlatCoordinates(s,a,u)},t$4.geom.LineString=function(e,t){t$4.geom.SimpleGeometry.call(this),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.LineString,t$4.geom.SimpleGeometry),t$4.geom.LineString.prototype.appendCoordinate=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()},t$4.geom.LineString.prototype.clone=function(){var e=new t$4.geom.LineString(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$4.geom.LineString.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getMaxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,i,n))},t$4.geom.LineString.prototype.forEachSegment=function(e,t){return t$4.geom.flat.segments.forEach(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t)},t$4.geom.LineString.prototype.getCoordinateAtM=function(e,t){if(this.layout!=t$4.geom.GeometryLayout.XYM&&this.layout!=t$4.geom.GeometryLayout.XYZM)return null;var i=void 0!==t&&t;return t$4.geom.flat.interpolate.lineStringCoordinateAtM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,i)},t$4.geom.LineString.prototype.getCoordinates=function(){return t$4.geom.flat.inflate.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$4.geom.LineString.prototype.getCoordinateAt=function(e,t){return t$4.geom.flat.interpolate.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t)},t$4.geom.LineString.prototype.getLength=function(){return t$4.geom.flat.length.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$4.geom.LineString.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},t$4.geom.LineString.prototype.getSimplifiedGeometryInternal=function(e){var t=[];t.length=t$4.geom.flat.simplify.douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0);var i=new t$4.geom.LineString(null);return i.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t),i},t$4.geom.LineString.prototype.getType=function(){return t$4.geom.GeometryType.LINE_STRING},t$4.geom.LineString.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t$4.geom.LineString.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$4.geom.flat.deflate.coordinates(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null)},t$4.geom.LineString.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$4.geom.Point=function(e,t){t$4.geom.SimpleGeometry.call(this),this.setCoordinates(e,t)},t$4.inherits(t$4.geom.Point,t$4.geom.SimpleGeometry),t$4.geom.Point.prototype.clone=function(){var e=new t$4.geom.Point(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$4.geom.Point.prototype.closestPointXY=function(e,t,i,n){var r=this.flatCoordinates,o=t$4.math.squaredDistance(e,t,r[0],r[1]);if(o<n){var a,s=this.stride;for(a=0;a<s;++a)i[a]=r[a];return i.length=s,o}return n},t$4.geom.Point.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},t$4.geom.Point.prototype.computeExtent=function(e){return t$4.extent.createOrUpdateFromCoordinate(this.flatCoordinates,e)},t$4.geom.Point.prototype.getType=function(){return t$4.geom.GeometryType.POINT},t$4.geom.Point.prototype.intersectsExtent=function(e){return t$4.extent.containsXY(e,this.flatCoordinates[0],this.flatCoordinates[1])},t$4.geom.Point.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$4.geom.flat.deflate.coordinate(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null)},t$4.geom.Point.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$4.geom.MultiLineString=function(e,t){t$4.geom.SimpleGeometry.call(this),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.MultiLineString,t$4.geom.SimpleGeometry),t$4.geom.MultiLineString.prototype.appendLineString=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates().slice()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},t$4.geom.MultiLineString.prototype.clone=function(){var e=new t$4.geom.MultiLineString(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice()),e},t$4.geom.MultiLineString.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,i,n))},t$4.geom.MultiLineString.prototype.getCoordinateAtM=function(e,t,i){if(this.layout!=t$4.geom.GeometryLayout.XYM&&this.layout!=t$4.geom.GeometryLayout.XYZM||0===this.flatCoordinates.length)return null;var n=void 0!==t&&t,r=void 0!==i&&i;return t$4.geom.flat.interpolate.lineStringsCoordinateAtM(this.flatCoordinates,0,this.ends_,this.stride,e,n,r)},t$4.geom.MultiLineString.prototype.getCoordinates=function(){return t$4.geom.flat.inflate.coordinatess(this.flatCoordinates,0,this.ends_,this.stride)},t$4.geom.MultiLineString.prototype.getEnds=function(){return this.ends_},t$4.geom.MultiLineString.prototype.getLineString=function(e){if(e<0||this.ends_.length<=e)return null;var t=new t$4.geom.LineString(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e])),t},t$4.geom.MultiLineString.prototype.getLineStrings=function(){var e,t,i=this.flatCoordinates,n=this.ends_,r=this.layout,o=[],a=0;for(e=0,t=n.length;e<t;++e){var s=n[e],l=new t$4.geom.LineString(null);l.setFlatCoordinates(r,i.slice(a,s)),o.push(l),a=s}return o},t$4.geom.MultiLineString.prototype.getFlatMidpoints=function(){var e,t,i=[],n=this.flatCoordinates,r=0,o=this.ends_,a=this.stride;for(e=0,t=o.length;e<t;++e){var s=o[e],l=t$4.geom.flat.interpolate.lineString(n,r,s,a,.5);t$4.array.extend(i,l),r=s}return i},t$4.geom.MultiLineString.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$4.geom.flat.simplify.douglasPeuckers(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,i);var n=new t$4.geom.MultiLineString(null);return n.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t,i),n},t$4.geom.MultiLineString.prototype.getType=function(){return t$4.geom.GeometryType.MULTI_LINE_STRING},t$4.geom.MultiLineString.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.lineStrings(this.flatCoordinates,0,this.ends_,this.stride,e)},t$4.geom.MultiLineString.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$4.geom.flat.deflate.coordinatess(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}else this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null,this.ends_)},t$4.geom.MultiLineString.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.ends_=i,this.changed()},t$4.geom.MultiLineString.prototype.setLineStrings=function(e){var t,i,n=this.getLayout(),r=[],o=[];for(t=0,i=e.length;t<i;++t){var a=e[t];0===t&&(n=a.getLayout()),t$4.array.extend(r,a.getFlatCoordinates()),o.push(r.length)}this.setFlatCoordinates(n,r,o)},t$4.geom.MultiPoint=function(e,t){t$4.geom.SimpleGeometry.call(this),this.setCoordinates(e,t)},t$4.inherits(t$4.geom.MultiPoint,t$4.geom.SimpleGeometry),t$4.geom.MultiPoint.prototype.appendPoint=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()},t$4.geom.MultiPoint.prototype.clone=function(){var e=new t$4.geom.MultiPoint(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$4.geom.MultiPoint.prototype.closestPointXY=function(e,t,i,n){if(n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t))return n;var r,o,a,s=this.flatCoordinates,l=this.stride;for(r=0,o=s.length;r<o;r+=l){var u=t$4.math.squaredDistance(e,t,s[r],s[r+1]);if(u<n){for(n=u,a=0;a<l;++a)i[a]=s[r+a];i.length=l}}return n},t$4.geom.MultiPoint.prototype.getCoordinates=function(){return t$4.geom.flat.inflate.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$4.geom.MultiPoint.prototype.getPoint=function(e){var t=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;if(e<0||t<=e)return null;var i=new t$4.geom.Point(null);return i.setFlatCoordinates(this.layout,this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride)),i},t$4.geom.MultiPoint.prototype.getPoints=function(){var e,t,i=this.flatCoordinates,n=this.layout,r=this.stride,o=[];for(e=0,t=i.length;e<t;e+=r){var a=new t$4.geom.Point(null);a.setFlatCoordinates(n,i.slice(e,e+r)),o.push(a)}return o},t$4.geom.MultiPoint.prototype.getType=function(){return t$4.geom.GeometryType.MULTI_POINT},t$4.geom.MultiPoint.prototype.intersectsExtent=function(e){var t,i,n,r,o=this.flatCoordinates,a=this.stride;for(t=0,i=o.length;t<i;t+=a)if(n=o[t],r=o[t+1],t$4.extent.containsXY(e,n,r))return!0;return!1},t$4.geom.MultiPoint.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$4.geom.flat.deflate.coordinates(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null)},t$4.geom.MultiPoint.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$4.geom.flat.center.linearRingss={},t$4.geom.flat.center.linearRingss=function(e,t,i,n){var r,o,a=[],s=t$4.extent.createEmpty();for(r=0,o=i.length;r<o;++r){var l=i[r];s=t$4.extent.createOrUpdateFromFlatCoordinates(e,t,l[0],n),a.push((s[0]+s[2])/2,(s[1]+s[3])/2),t=l[l.length-1]}return a},t$4.geom.MultiPolygon=function(e,t){t$4.geom.SimpleGeometry.call(this),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.MultiPolygon,t$4.geom.SimpleGeometry),t$4.geom.MultiPolygon.prototype.appendPolygon=function(e){var t;if(this.flatCoordinates){var i,n,r=this.flatCoordinates.length;for(t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates()),i=0,n=(t=e.getEnds().slice()).length;i<n;++i)t[i]+=r}else this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();this.endss_.push(t),this.changed()},t$4.geom.MultiPolygon.prototype.clone=function(){for(var e=new t$4.geom.MultiPolygon(null),t=this.endss_.length,i=new Array(t),n=0;n<t;++n)i[n]=this.endss_[n].slice();return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),i),e},t$4.geom.MultiPolygon.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getssMaxSquaredDelta(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getssClosestPoint(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,t,i,n))},t$4.geom.MultiPolygon.prototype.containsXY=function(e,t){return t$4.geom.flat.contains.linearRingssContainsXY(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)},t$4.geom.MultiPolygon.prototype.getArea=function(){return t$4.geom.flat.area.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},t$4.geom.MultiPolygon.prototype.getCoordinates=function(e){var t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),t$4.geom.flat.orient.orientLinearRingss(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,t$4.geom.flat.inflate.coordinatesss(t,0,this.endss_,this.stride)},t$4.geom.MultiPolygon.prototype.getEndss=function(){return this.endss_},t$4.geom.MultiPolygon.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var e=t$4.geom.flat.center.linearRingss(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=t$4.geom.flat.interiorpoint.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},t$4.geom.MultiPolygon.prototype.getInteriorPoints=function(){var e=new t$4.geom.MultiPoint(null);return e.setFlatCoordinates(t$4.geom.GeometryLayout.XYM,this.getFlatInteriorPoints().slice()),e},t$4.geom.MultiPolygon.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;t$4.geom.flat.orient.linearRingssAreOriented(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=t$4.geom.flat.orient.orientLinearRingss(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t$4.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$4.geom.flat.simplify.quantizess(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,i);var n=new t$4.geom.MultiPolygon(null);return n.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t,i),n},t$4.geom.MultiPolygon.prototype.getPolygon=function(e){if(e<0||this.endss_.length<=e)return null;var t;if(0===e)t=0;else{var i=this.endss_[e-1];t=i[i.length-1]}var n,r,o=this.endss_[e].slice(),a=o[o.length-1];if(0!==t)for(n=0,r=o.length;n<r;++n)o[n]-=t;var s=new t$4.geom.Polygon(null);return s.setFlatCoordinates(this.layout,this.flatCoordinates.slice(t,a),o),s},t$4.geom.MultiPolygon.prototype.getPolygons=function(){var e,t,i,n,r=this.layout,o=this.flatCoordinates,a=this.endss_,s=[],l=0;for(e=0,t=a.length;e<t;++e){var u=a[e].slice(),c=u[u.length-1];if(0!==l)for(i=0,n=u.length;i<n;++i)u[i]-=l;var h=new t$4.geom.Polygon(null);h.setFlatCoordinates(r,o.slice(l,c),u),s.push(h),l=c}return s},t$4.geom.MultiPolygon.prototype.getType=function(){return t$4.geom.GeometryType.MULTI_POLYGON},t$4.geom.MultiPolygon.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)},t$4.geom.MultiPolygon.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$4.geom.flat.deflate.coordinatesss(this.flatCoordinates,0,e,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{var n=i[i.length-1];this.flatCoordinates.length=0===n.length?0:n[n.length-1]}this.changed()}else this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null,this.endss_)},t$4.geom.MultiPolygon.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.endss_=i,this.changed()},t$4.geom.MultiPolygon.prototype.setPolygons=function(e){var t,i,n,r=this.getLayout(),o=[],a=[];for(t=0,i=e.length;t<i;++t){var s=e[t];0===t&&(r=s.getLayout());var l,u,c=o.length;for(l=0,u=(n=s.getEnds()).length;l<u;++l)n[l]+=c;t$4.array.extend(o,s.getFlatCoordinates()),a.push(n)}this.setFlatCoordinates(r,o,a)},t$4.Feature=function(e){if(t$4.Object.call(this),this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,void 0!==e)if(e instanceof t$4.geom.Geometry||!e){var t=e;this.setGeometry(t)}else{var i=e;this.setProperties(i)}},t$4.inherits(t$4.Feature,t$4.Object),t$4.Feature.prototype.clone=function(){var e=new t$4.Feature(this.getProperties());e.setGeometryName(this.getGeometryName());var t=this.getGeometry();t&&e.setGeometry(t.clone());var i=this.getStyle();return i&&e.setStyle(i),e},t$4.Feature.prototype.getGeometry=function(){return this.get(this.geometryName_)},t$4.Feature.prototype.getId=function(){return this.id_},t$4.Feature.prototype.getGeometryName=function(){return this.geometryName_},t$4.Feature.prototype.getStyle=function(){return this.style_},t$4.Feature.prototype.getStyleFunction=function(){return this.styleFunction_},t$4.Feature.prototype.handleGeometryChange_=function(){this.changed()},t$4.Feature.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(t$4.events.unlistenByKey(this.geometryChangeKey_),this.geometryChangeKey_=null);var e=this.getGeometry();e&&(this.geometryChangeKey_=t$4.events.listen(e,t$4.events.EventType.CHANGE,this.handleGeometryChange_,this)),this.changed()},t$4.Feature.prototype.setGeometry=function(e){this.set(this.geometryName_,e)},t$4.Feature.prototype.setStyle=function(e){this.style_=e,this.styleFunction_=e?t$4.Feature.createStyleFunction(e):void 0,this.changed()},t$4.Feature.prototype.setId=function(e){this.id_=e,this.changed()},t$4.Feature.prototype.setGeometryName=function(e){t$4.events.unlisten(this,t$4.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this),this.geometryName_=e,t$4.events.listen(this,t$4.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this),this.handleGeometryChanged_()},t$4.Feature.createStyleFunction=function(e){var t,i;"function"==typeof e?t=2==e.length?function(t){return e(this,t)}:e:(Array.isArray(e)?i=e:(t$4.asserts.assert(e instanceof t$4.style.Style,41),i=[e]),t=function(){return i});return t},t$4.format={},t$4.format.Feature=function(){this.defaultDataProjection=null,this.defaultFeatureProjection=null},t$4.format.Feature.prototype.getReadOptions=function(e,t){var i;return t&&(i={dataProjection:t.dataProjection?t.dataProjection:this.readProjection(e),featureProjection:t.featureProjection}),this.adaptOptions(i)},t$4.format.Feature.prototype.adaptOptions=function(e){return t$4.obj.assign({dataProjection:this.defaultDataProjection,featureProjection:this.defaultFeatureProjection},e)},t$4.format.Feature.prototype.getLastExtent=function(){return null},t$4.format.Feature.prototype.getType=function(){},t$4.format.Feature.prototype.readFeature=function(e,t){},t$4.format.Feature.prototype.readFeatures=function(e,t){},t$4.format.Feature.prototype.readGeometry=function(e,t){},t$4.format.Feature.prototype.readProjection=function(e){},t$4.format.Feature.prototype.writeFeature=function(e,t){},t$4.format.Feature.prototype.writeFeatures=function(e,t){},t$4.format.Feature.prototype.writeGeometry=function(e,t){},t$4.format.Feature.transformWithOptions=function(e,t,i){var n;if(n=e,t&&i&&void 0!==i.decimals){var r=Math.pow(10,i.decimals);n===e&&(n=n.clone()),n.applyTransform((function(e){for(var t=0,i=e.length;t<i;++t)e[t]=Math.round(e[t]*r)/r;return e}))}return n},t$4.format.MVT=function(e){t$4.format.Feature.call(this);var t=e||{};this.featureClass_=t.featureClass?t.featureClass:t$4.render.Feature,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.extent_=null},t$4.inherits(t$4.format.MVT,t$4.format.Feature),t$4.format.MVT.pbfReaders_={layers:function(e,t,i){if(3===e){var n={keys:[],values:[],features:[]},r=i.readVarint()+i.pos;i.readFields(t$4.format.MVT.pbfReaders_.layer,n,r),n.length=n.features.length,n.length&&(t[n.name]=n)}},layer:function(e,t,i){if(15===e)t.version=i.readVarint();else if(1===e)t.name=i.readString();else if(5===e)t.extent=i.readVarint();else if(2===e)t.features.push(i.pos);else if(3===e)t.keys.push(i.readString());else if(4===e){for(var n=null,r=i.readVarint()+i.pos;i.pos<r;)n=1===(e=i.readVarint()>>3)?i.readString():2===e?i.readFloat():3===e?i.readDouble():4===e?i.readVarint64():5===e?i.readVarint():6===e?i.readSVarint():7===e?i.readBoolean():null;t.values.push(n)}},feature:function(e,t,i){if(1==e)t.id=i.readVarint();else if(2==e)for(var n=i.readVarint()+i.pos;i.pos<n;){var r=t.layer.keys[i.readVarint()],o=t.layer.values[i.readVarint()];t.properties[r]=o}else 3==e?t.type=i.readVarint():4==e&&(t.geometry=i.pos)}},t$4.format.MVT.readRawFeature_=function(e,t,i){e.pos=t.features[i];var n=e.readVarint()+e.pos,r={layer:t,type:0,properties:{}};return e.readFields(t$4.format.MVT.pbfReaders_.feature,r,n),r},t$4.format.MVT.readRawGeometry_=function(e,t,i,n){e.pos=t.geometry;for(var r=e.readVarint()+e.pos,o=1,a=0,s=0,l=0,u=0,c=0;e.pos<r;){if(!a){var h=e.readVarint();o=7&h,a=h>>3}a--,1===o||2===o?(s+=e.readSVarint(),l+=e.readSVarint(),1===o&&u>c&&(n.push(u),c=u),i.push(s,l),u+=2):7===o?u>c&&(i.push(i[c],i[c+1]),u+=2):t$4.asserts.assert(!1,59)}u>c&&(n.push(u),c=u)},t$4.format.MVT.getGeometryType_=function(e,t){var i;return 1===e?i=1===t?t$4.geom.GeometryType.POINT:t$4.geom.GeometryType.MULTI_POINT:2===e?i=1===t?t$4.geom.GeometryType.LINE_STRING:t$4.geom.GeometryType.MULTI_LINE_STRING:3===e&&(i=t$4.geom.GeometryType.POLYGON),i},t$4.format.MVT.prototype.createFeature_=function(e,t,i){var n=t.type;if(0===n)return null;var r,o=t.id,a=t.properties;a[this.layerName_]=t.layer.name;var s=[],l=[];t$4.format.MVT.readRawGeometry_(e,t,s,l);var u,c=t$4.format.MVT.getGeometryType_(n,l.length);if(c==t$4.geom.GeometryType.POLYGON){for(var h=[],d=0,f=0,p=0,_=l.length;p<_;++p){var m=l[p];t$4.geom.flat.orient.linearRingIsClockwise(s,d,m,2)||(h.push(l.slice(f,p+1)),f=p+1),d=m}h.length>1?(l=h,u=new t$4.geom.MultiPolygon(null)):u=new t$4.geom.Polygon(null)}else u=c===t$4.geom.GeometryType.POINT?new t$4.geom.Point(null):c===t$4.geom.GeometryType.LINE_STRING?new t$4.geom.LineString(null):c===t$4.geom.GeometryType.POLYGON?new t$4.geom.Polygon(null):c===t$4.geom.GeometryType.MULTI_POINT?new t$4.geom.MultiPoint(null):c===t$4.geom.GeometryType.MULTI_LINE_STRING?new t$4.geom.MultiLineString(null):null;u.setFlatCoordinates(t$4.geom.GeometryLayout.XY,s,l),r=new this.featureClass_,this.geometryName_&&r.setGeometryName(this.geometryName_);var g=t$4.format.Feature.transformWithOptions(u,!1,this.adaptOptions(i));return r.setGeometry(g),r.setId(o),r.setProperties(a),r},t$4.format.MVT.prototype.readFeatures=function(e,t){var i,n=this.layers_,r=new h$U(e),o=r.readFields(t$4.format.MVT.pbfReaders_.layers,{}),a=[];for(var s in o)if(!n||-1!=n.indexOf(s)){if(void 0!==t){var l=t.needSourceLayerNames;if(void 0!==l&&void 0===l[s])continue}for(var u,c=0,h=(i=o[s]).length;c<h;++c)u=t$4.format.MVT.readRawFeature_(r,i,c),a.push(this.createFeature_(r,u));this.extent_=i?[0,0,i.extent,i.extent]:null}return a},t$4.style={},t$4.style.IconImageCache=function(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32},t$4.style.IconImageCache.getKey=function(e,t,i){return t+":"+e+":"+(i?t$4.color.asString(i):"null")},t$4.style.IconImageCache.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t$4.style.IconImageCache.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){var e,t,i=0;for(e in this.cache_)t=this.cache_[e],0==(3&i++)&&!t.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}},t$4.style.IconImageCache.prototype.get=function(e,t,i){var n=t$4.style.IconImageCache.getKey(e,t,i);return n in this.cache_?this.cache_[n]:null},t$4.style.IconImageCache.prototype.set=function(e,t,i,n){var r=t$4.style.IconImageCache.getKey(e,t,i);this.cache_[r]=n,++this.cacheSize_},t$4.style.IconImageCache.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},t$4.style.iconImageCache=new t$4.style.IconImageCache,t$4.style.Image=function(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.snapToPixel_=e.snapToPixel},t$4.style.Image.prototype.getOpacity=function(){return this.opacity_},t$4.style.Image.prototype.getRotateWithView=function(){return this.rotateWithView_},t$4.style.Image.prototype.getRotation=function(){return this.rotation_},t$4.style.Image.prototype.getScale=function(){return this.scale_},t$4.style.Image.prototype.getSnapToPixel=function(){return this.snapToPixel_},t$4.style.Image.prototype.getAnchor=function(){},t$4.style.Image.prototype.getImage=function(e){},t$4.style.Image.prototype.getHitDetectionImage=function(e){},t$4.style.Image.prototype.getImageState=function(){},t$4.style.Image.prototype.getImageSize=function(){},t$4.style.Image.prototype.getHitDetectionImageSize=function(){},t$4.style.Image.prototype.getOrigin=function(){},t$4.style.Image.prototype.getSize=function(){},t$4.style.Image.prototype.setOpacity=function(e){this.opacity_=e},t$4.style.Image.prototype.setRotateWithView=function(e){this.rotateWithView_=e},t$4.style.Image.prototype.setRotation=function(e){this.rotation_=e},t$4.style.Image.prototype.setScale=function(e){this.scale_=e},t$4.style.Image.prototype.setSnapToPixel=function(e){this.snapToPixel_=e},t$4.style.Image.prototype.listenImageChange=function(e,t){},t$4.style.Image.prototype.load=function(){},t$4.style.Image.prototype.unlistenImageChange=function(e,t){},t$4.style.RegularShape=function(e){this.checksums_=null,this.canvas_=null,this.hitDetectionCanvas_=null,this.fill_=void 0!==e.fill?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=void 0!==e.radius?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=void 0!==e.angle?e.angle:0,this.stroke_=void 0!==e.stroke?e.stroke:null,this.anchor_=null,this.size_=null,this.imageSize_=null,this.hitDetectionImageSize_=null,this.atlasManager_=e.atlasManager,this.render_(this.atlasManager_);var t=void 0===e.snapToPixel||e.snapToPixel,i=void 0!==e.rotateWithView&&e.rotateWithView;t$4.style.Image.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:1,snapToPixel:t})},t$4.inherits(t$4.style.RegularShape,t$4.style.Image),t$4.style.RegularShape.prototype.clone=function(){var e=new t$4.style.RegularShape({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),snapToPixel:this.getSnapToPixel(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),atlasManager:this.atlasManager_});return e.setOpacity(this.getOpacity()),e.setScale(this.getScale()),e},t$4.style.RegularShape.prototype.getAnchor=function(){return this.anchor_},t$4.style.RegularShape.prototype.getAngle=function(){return this.angle_},t$4.style.RegularShape.prototype.getFill=function(){return this.fill_},t$4.style.RegularShape.prototype.getHitDetectionImage=function(e){return this.hitDetectionCanvas_},t$4.style.RegularShape.prototype.getImage=function(e){return this.canvas_},t$4.style.RegularShape.prototype.getImageSize=function(){return this.imageSize_},t$4.style.RegularShape.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},t$4.style.RegularShape.prototype.getImageState=function(){return t$4.ImageState.LOADED},t$4.style.RegularShape.prototype.getOrigin=function(){return this.origin_},t$4.style.RegularShape.prototype.getPoints=function(){return this.points_},t$4.style.RegularShape.prototype.getRadius=function(){return this.radius_},t$4.style.RegularShape.prototype.getRadius2=function(){return this.radius2_},t$4.style.RegularShape.prototype.getSize=function(){return this.size_},t$4.style.RegularShape.prototype.getStroke=function(){return this.stroke_},t$4.style.RegularShape.prototype.listenImageChange=function(e,t){},t$4.style.RegularShape.prototype.load=function(){},t$4.style.RegularShape.prototype.unlistenImageChange=function(e,t){},t$4.style.RegularShape.prototype.render_=function(e){var t,i,n="",r="",o=0,a=null,s=0,l=0;this.stroke_&&(null===(i=this.stroke_.getColor())&&(i=t$4.render.canvas.defaultStrokeStyle),i=t$4.colorlike.asColorLike(i),void 0===(l=this.stroke_.getWidth())&&(l=t$4.render.canvas.defaultLineWidth),a=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset(),t$4.has.CANVAS_LINE_DASH||(a=null,s=0),void 0===(r=this.stroke_.getLineJoin())&&(r=t$4.render.canvas.defaultLineJoin),void 0===(n=this.stroke_.getLineCap())&&(n=t$4.render.canvas.defaultLineCap),void 0===(o=this.stroke_.getMiterLimit())&&(o=t$4.render.canvas.defaultMiterLimit));var u=2*(this.radius_+l)+1,c={strokeStyle:i,strokeWidth:l,size:u,lineCap:n,lineDash:a,lineDashOffset:s,lineJoin:r,miterLimit:o};if(void 0===e){var h=t$4.dom.createCanvasContext2D(u,u);this.canvas_=h.canvas,t=u=this.canvas_.width,this.draw_(c,h,0,0),this.createHitDetectionCanvas_(c)}else{u=Math.round(u);var d,f=!this.fill_;f&&(d=this.drawHitDetectionCanvas_.bind(this,c));var p=this.getChecksum(),_=e.add(p,u,u,this.draw_.bind(this,c),d);this.canvas_=_.image,this.origin_=[_.offsetX,_.offsetY],t=_.image.width,f?(this.hitDetectionCanvas_=_.hitImage,this.hitDetectionImageSize_=[_.hitImage.width,_.hitImage.height]):(this.hitDetectionCanvas_=this.canvas_,this.hitDetectionImageSize_=[t,t])}this.anchor_=[u/2,u/2],this.size_=[u,u],this.imageSize_=[t,t]},t$4.style.RegularShape.prototype.draw_=function(e,t,i,n){var r,o,a;t.setTransform(1,0,0,1,0,0),t.translate(i,n),t.beginPath();var s=this.points_;if(s===1/0)t.arc(e.size/2,e.size/2,this.radius_,0,2*Math.PI,!0);else{var l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(s*=2),r=0;r<=s;r++)o=2*r*Math.PI/s-Math.PI/2+this.angle_,a=r%2==0?this.radius_:l,t.lineTo(e.size/2+a*Math.cos(o),e.size/2+a*Math.sin(o))}if(this.fill_){var u=this.fill_.getColor();null===u&&(u=t$4.render.canvas.defaultFillStyle),t.fillStyle=t$4.colorlike.asColorLike(u),t.fill()}this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke()),t.closePath()},t$4.style.RegularShape.prototype.createHitDetectionCanvas_=function(e){if(this.hitDetectionImageSize_=[e.size,e.size],this.fill_)this.hitDetectionCanvas_=this.canvas_;else{var t=t$4.dom.createCanvasContext2D(e.size,e.size);this.hitDetectionCanvas_=t.canvas,this.drawHitDetectionCanvas_(e,t,0,0)}},t$4.style.RegularShape.prototype.drawHitDetectionCanvas_=function(e,t,i,n){t.setTransform(1,0,0,1,0,0),t.translate(i,n),t.beginPath();var r=this.points_;if(r===1/0)t.arc(e.size/2,e.size/2,this.radius_,0,2*Math.PI,!0);else{var o,a,s,l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(r*=2),o=0;o<=r;o++)s=2*o*Math.PI/r-Math.PI/2+this.angle_,a=o%2==0?this.radius_:l,t.lineTo(e.size/2+a*Math.cos(s),e.size/2+a*Math.sin(s))}t.fillStyle=t$4.render.canvas.defaultFillStyle,t.fill(),this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.stroke()),t.closePath()},t$4.style.RegularShape.prototype.getChecksum=function(){var e=this.stroke_?this.stroke_.getChecksum():"-",t=this.fill_?this.fill_.getChecksum():"-";if(!this.checksums_||e!=this.checksums_[1]||t!=this.checksums_[2]||this.radius_!=this.checksums_[3]||this.radius2_!=this.checksums_[4]||this.angle_!=this.checksums_[5]||this.points_!=this.checksums_[6]){var i="r"+e+t+(void 0!==this.radius_?this.radius_.toString():"-")+(void 0!==this.radius2_?this.radius2_.toString():"-")+(void 0!==this.angle_?this.angle_.toString():"-")+(void 0!==this.points_?this.points_.toString():"-");this.checksums_=[i,e,t,this.radius_,this.radius2_,this.angle_,this.points_]}return this.checksums_[0]},t$4.style.Circle=function(e){var t=e||{};t$4.style.RegularShape.call(this,{points:1/0,fill:t.fill,radius:t.radius,snapToPixel:t.snapToPixel,stroke:t.stroke,atlasManager:t.atlasManager})},t$4.inherits(t$4.style.Circle,t$4.style.RegularShape),t$4.style.Circle.prototype.clone=function(){var e=new t$4.style.Circle({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),snapToPixel:this.getSnapToPixel(),atlasManager:this.atlasManager_});return e.setOpacity(this.getOpacity()),e.setScale(this.getScale()),e},t$4.style.Circle.prototype.setRadius=function(e){this.radius_=e,this.render_(this.atlasManager_)},t$4.style.Fill=function(e){var t=e||{};this.color_=void 0!==t.color?t.color:null,this.checksum_=void 0},t$4.style.Fill.prototype.clone=function(){var e=this.getColor();return new t$4.style.Fill({color:e&&e.slice?e.slice():e||void 0})},t$4.style.Fill.prototype.getColor=function(){return this.color_},t$4.style.Fill.prototype.setColor=function(e){this.color_=e,this.checksum_=void 0},t$4.style.Fill.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.color_ instanceof CanvasPattern||this.color_ instanceof CanvasGradient?this.checksum_=t$4.getUid(this.color_).toString():this.checksum_="f"+(this.color_?t$4.color.asString(this.color_):"-")),this.checksum_},t$4.style.Stroke=function(e){var t=e||{};this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width,this.checksum_=void 0},t$4.style.Stroke.prototype.clone=function(){var e=this.getColor();return new t$4.style.Stroke({color:e&&e.slice?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t$4.style.Stroke.prototype.getColor=function(){return this.color_},t$4.style.Stroke.prototype.getLineCap=function(){return this.lineCap_},t$4.style.Stroke.prototype.getLineDash=function(){return this.lineDash_},t$4.style.Stroke.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t$4.style.Stroke.prototype.getLineJoin=function(){return this.lineJoin_},t$4.style.Stroke.prototype.getMiterLimit=function(){return this.miterLimit_},t$4.style.Stroke.prototype.getWidth=function(){return this.width_},t$4.style.Stroke.prototype.setColor=function(e){this.color_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineCap=function(e){this.lineCap_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineDash=function(e){this.lineDash_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineDashOffset=function(e){this.lineDashOffset_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineJoin=function(e){this.lineJoin_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setMiterLimit=function(e){this.miterLimit_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setWidth=function(e){this.width_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.checksum_="s",this.color_?"string"==typeof this.color_?this.checksum_+=this.color_:this.checksum_+=t$4.getUid(this.color_).toString():this.checksum_+="-",this.checksum_+=","+(void 0!==this.lineCap_?this.lineCap_.toString():"-")+","+(this.lineDash_?this.lineDash_.toString():"-")+","+(void 0!==this.lineDashOffset_?this.lineDashOffset_:"-")+","+(void 0!==this.lineJoin_?this.lineJoin_:"-")+","+(void 0!==this.miterLimit_?this.miterLimit_.toString():"-")+","+(void 0!==this.width_?this.width_.toString():"-")),this.checksum_},t$4.style.IconAnchorUnits={FRACTION:"fraction",PIXELS:"pixels"},t$4.style.IconImage=function(e,t,i,n,r,o){t$4.events.EventTarget.call(this),this.hitDetectionImage_=null,this.image_=e||new Image,null!==n&&(this.image_.crossOrigin=n),this.canvas_=o?document.createElement("CANVAS"):null,this.color_=o,this.imageListenerKeys_=null,this.imageState_=r,this.size_=i,this.src_=t,this.tainting_=!1,this.imageState_==t$4.ImageState.LOADED&&this.determineTainting_()},t$4.inherits(t$4.style.IconImage,t$4.events.EventTarget),t$4.style.IconImage.get=function(e,t,i,n,r,o){var a=t$4.style.iconImageCache,s=a.get(t,n,o);return s||(s=new t$4.style.IconImage(e,t,i,n,r,o),a.set(t,n,o,s)),s},t$4.style.IconImage.prototype.determineTainting_=function(){var e=t$4.dom.createCanvasContext2D(1,1);try{e.drawImage(this.image_,0,0),e.getImageData(0,0,1,1)}catch{this.tainting_=!0}},t$4.style.IconImage.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(t$4.events.EventType.CHANGE)},t$4.style.IconImage.prototype.handleImageError_=function(){this.imageState_=t$4.ImageState.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},t$4.style.IconImage.prototype.handleImageLoad_=function(){this.imageState_=t$4.ImageState.LOADED,this.size_&&(this.image_.width=this.size_[0],this.image_.height=this.size_[1]),this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.determineTainting_(),this.replaceColor_(),this.dispatchChangeEvent_()},t$4.style.IconImage.prototype.getImage=function(e){return this.canvas_?this.canvas_:this.image_},t$4.style.IconImage.prototype.getImageState=function(){return this.imageState_},t$4.style.IconImage.prototype.getHitDetectionImage=function(e){if(!this.hitDetectionImage_)if(this.tainting_){var t=this.size_[0],i=this.size_[1],n=t$4.dom.createCanvasContext2D(t,i);n.fillRect(0,0,t,i),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},t$4.style.IconImage.prototype.getSize=function(){return this.size_},t$4.style.IconImage.prototype.getSrc=function(){return this.src_},t$4.style.IconImage.prototype.load=function(){if(this.imageState_==t$4.ImageState.IDLE){this.imageState_=t$4.ImageState.LOADING,this.imageListenerKeys_=[t$4.events.listenOnce(this.image_,t$4.events.EventType.ERROR,this.handleImageError_,this),t$4.events.listenOnce(this.image_,t$4.events.EventType.LOAD,this.handleImageLoad_,this)];try{this.image_.src=this.src_}catch{this.handleImageError_()}}},t$4.style.IconImage.prototype.replaceColor_=function(){if(!this.tainting_&&null!==this.color_){this.canvas_.width=this.image_.width,this.canvas_.height=this.image_.height;var e=this.canvas_.getContext("2d");e.drawImage(this.image_,0,0);for(var t=e.getImageData(0,0,this.image_.width,this.image_.height),i=t.data,n=this.color_[0]/255,r=this.color_[1]/255,o=this.color_[2]/255,a=0,s=i.length;a<s;a+=4)i[a]*=n,i[a+1]*=r,i[a+2]*=o;e.putImageData(t,0,0)}},t$4.style.IconImage.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(t$4.events.unlistenByKey),this.imageListenerKeys_=null},t$4.style.IconOrigin={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},t$4.style.Icon=function(e){var t=e||{};this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:t$4.style.IconOrigin.TOP_LEFT,this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:t$4.style.IconAnchorUnits.FRACTION,this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:t$4.style.IconAnchorUnits.FRACTION,this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;var i=void 0!==t.img?t.img:null,n=void 0!==t.imgSize?t.imgSize:null,r=t.src;(void 0===r||0===r.length)&&i&&(r=i.src||t$4.getUid(i).toString());var o=void 0!==t.src?t$4.ImageState.IDLE:t$4.ImageState.LOADED;this.color_=void 0!==t.color?t$4.color.asArray(t.color):null,this.iconImage_=t$4.style.IconImage.get(i,r,n,this.crossOrigin_,o,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:t$4.style.IconOrigin.TOP_LEFT,this.origin_=null,this.size_=void 0!==t.size?t.size:null;var a=void 0!==t.opacity?t.opacity:1,s=void 0!==t.rotateWithView&&t.rotateWithView,l=void 0!==t.rotation?t.rotation:0,u=void 0!==t.scale?t.scale:1,c=void 0===t.snapToPixel||t.snapToPixel;t$4.style.Image.call(this,{opacity:a,rotation:l,scale:u,snapToPixel:c,rotateWithView:s})},t$4.inherits(t$4.style.Icon,t$4.style.Image),t$4.style.Icon.prototype.clone=function(){return new t$4.style.Icon({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:this.getScale(),snapToPixel:this.getSnapToPixel(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},t$4.style.Icon.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var e=this.anchor_,t=this.getSize();if(this.anchorXUnits_==t$4.style.IconAnchorUnits.FRACTION||this.anchorYUnits_==t$4.style.IconAnchorUnits.FRACTION){if(!t)return null;e=this.anchor_.slice(),this.anchorXUnits_==t$4.style.IconAnchorUnits.FRACTION&&(e[0]*=t[0]),this.anchorYUnits_==t$4.style.IconAnchorUnits.FRACTION&&(e[1]*=t[1])}if(this.anchorOrigin_!=t$4.style.IconOrigin.TOP_LEFT){if(!t)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_==t$4.style.IconOrigin.TOP_RIGHT||this.anchorOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[0]=-e[0]+t[0]),(this.anchorOrigin_==t$4.style.IconOrigin.BOTTOM_LEFT||this.anchorOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[1]=-e[1]+t[1])}return this.normalizedAnchor_=e,this.normalizedAnchor_},t$4.style.Icon.prototype.getColor=function(){return this.color_},t$4.style.Icon.prototype.getImage=function(e){return this.iconImage_.getImage(e)},t$4.style.Icon.prototype.getImageSize=function(){return this.iconImage_.getSize()},t$4.style.Icon.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},t$4.style.Icon.prototype.getImageState=function(){return this.iconImage_.getImageState()},t$4.style.Icon.prototype.getHitDetectionImage=function(e){return this.iconImage_.getHitDetectionImage(e)},t$4.style.Icon.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var e=this.offset_;if(this.offsetOrigin_!=t$4.style.IconOrigin.TOP_LEFT){var t=this.getSize(),i=this.iconImage_.getSize();if(!t||!i)return null;e=e.slice(),(this.offsetOrigin_==t$4.style.IconOrigin.TOP_RIGHT||this.offsetOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[0]=i[0]-t[0]-e[0]),(this.offsetOrigin_==t$4.style.IconOrigin.BOTTOM_LEFT||this.offsetOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[1]=i[1]-t[1]-e[1])}return this.origin_=e,this.origin_},t$4.style.Icon.prototype.getSrc=function(){return this.iconImage_.getSrc()},t$4.style.Icon.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},t$4.style.Icon.prototype.listenImageChange=function(e,t){return t$4.events.listen(this.iconImage_,t$4.events.EventType.CHANGE,e,t)},t$4.style.Icon.prototype.load=function(){this.iconImage_.load()},t$4.style.Icon.prototype.unlistenImageChange=function(e,t){t$4.events.unlisten(this.iconImage_,t$4.events.EventType.CHANGE,e,t)},t$4.style.Text=function(e){var t=e||{};this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.text_=t.text,this.textAlign_=t.textAlign,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new t$4.style.Fill({color:t$4.style.Text.DEFAULT_FILL_COLOR_}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:t$4.style.TextPlacement.POINT;var i=void 0===t.overflow?t.exceedLength:t.overflow;this.overflow_=void 0!==i&&i,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding},t$4.style.Text.DEFAULT_FILL_COLOR_="#333",t$4.style.Text.prototype.clone=function(){return new t$4.style.Text({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:this.getScale(),text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY()})},t$4.style.Text.prototype.getOverflow=function(){return this.overflow_},t$4.style.Text.prototype.getFont=function(){return this.font_},t$4.style.Text.prototype.getMaxAngle=function(){return this.maxAngle_},t$4.style.Text.prototype.getPlacement=function(){return this.placement_},t$4.style.Text.prototype.getOffsetX=function(){return this.offsetX_},t$4.style.Text.prototype.getOffsetY=function(){return this.offsetY_},t$4.style.Text.prototype.getFill=function(){return this.fill_},t$4.style.Text.prototype.getRotateWithView=function(){return this.rotateWithView_},t$4.style.Text.prototype.getRotation=function(){return this.rotation_},t$4.style.Text.prototype.getScale=function(){return this.scale_},t$4.style.Text.prototype.getStroke=function(){return this.stroke_},t$4.style.Text.prototype.getText=function(){return this.text_},t$4.style.Text.prototype.getTextAlign=function(){return this.textAlign_},t$4.style.Text.prototype.getTextBaseline=function(){return this.textBaseline_},t$4.style.Text.prototype.getBackgroundFill=function(){return this.backgroundFill_},t$4.style.Text.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t$4.style.Text.prototype.getPadding=function(){return this.padding_},t$4.style.Text.prototype.setOverflow=function(e){this.overflow_=e},t$4.style.Text.prototype.setFont=function(e){this.font_=e},t$4.style.Text.prototype.setMaxAngle=function(e){this.maxAngle_=e},t$4.style.Text.prototype.setOffsetX=function(e){this.offsetX_=e},t$4.style.Text.prototype.setOffsetY=function(e){this.offsetY_=e},t$4.style.Text.prototype.setPlacement=function(e){this.placement_=e},t$4.style.Text.prototype.setFill=function(e){this.fill_=e},t$4.style.Text.prototype.setRotation=function(e){this.rotation_=e},t$4.style.Text.prototype.setScale=function(e){this.scale_=e},t$4.style.Text.prototype.setStroke=function(e){this.stroke_=e},t$4.style.Text.prototype.setText=function(e){this.text_=e},t$4.style.Text.prototype.setTextAlign=function(e){this.textAlign_=e},t$4.style.Text.prototype.setTextBaseline=function(e){this.textBaseline_=e},t$4.style.Text.prototype.setBackgroundFill=function(e){this.backgroundFill_=e},t$4.style.Text.prototype.setBackgroundStroke=function(e){this.backgroundStroke_=e},t$4.style.Text.prototype.setPadding=function(e){this.padding_=e},t$4.style.Style=function(e){var t=e||{};this.geometry_=null,this.geometryFunction_=t$4.style.Style.defaultGeometryFunction,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex},t$4.style.Style.prototype.clone=function(){var e=this.getGeometry();return e&&e.clone&&(e=e.clone()),new t$4.style.Style({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t$4.style.Style.prototype.getRenderer=function(){return this.renderer_},t$4.style.Style.prototype.setRenderer=function(e){this.renderer_=e},t$4.style.Style.prototype.getGeometry=function(){return this.geometry_},t$4.style.Style.prototype.getGeometryFunction=function(){return this.geometryFunction_},t$4.style.Style.prototype.getFill=function(){return this.fill_},t$4.style.Style.prototype.setFill=function(e){this.fill_=e},t$4.style.Style.prototype.getImage=function(){return this.image_},t$4.style.Style.prototype.setImage=function(e){this.image_=e},t$4.style.Style.prototype.getStroke=function(){return this.stroke_},t$4.style.Style.prototype.setStroke=function(e){this.stroke_=e},t$4.style.Style.prototype.getText=function(){return this.text_},t$4.style.Style.prototype.setText=function(e){this.text_=e},t$4.style.Style.prototype.getZIndex=function(){return this.zIndex_},t$4.style.Style.prototype.setGeometry=function(e){"function"==typeof e?this.geometryFunction_=e:"string"==typeof e?this.geometryFunction_=function(t){return t.get(e)}:e?void 0!==e&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=t$4.style.Style.defaultGeometryFunction,this.geometry_=e},t$4.style.Style.prototype.setZIndex=function(e){this.zIndex_=e},t$4.style.Style.createFunction=function(e){var t,i;"function"==typeof e?t=e:(Array.isArray(e)?i=e:(t$4.asserts.assert(e instanceof t$4.style.Style,41),i=[e]),t=function(){return i});return t},t$4.style.Style.default_=null,t$4.style.Style.defaultFunction=function(e,t){if(!t$4.style.Style.default_){var i=new t$4.style.Fill({color:"rgba(255,255,255,0.4)"}),n=new t$4.style.Stroke({color:"#3399CC",width:1.25});t$4.style.Style.default_=[new t$4.style.Style({image:new t$4.style.Circle({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return t$4.style.Style.default_},t$4.style.Style.createDefaultEditing=function(){var e={},t=[255,255,255,1],i=[0,153,255,1];return e[t$4.geom.GeometryType.POLYGON]=[new t$4.style.Style({fill:new t$4.style.Fill({color:[255,255,255,.5]})})],e[t$4.geom.GeometryType.MULTI_POLYGON]=e[t$4.geom.GeometryType.POLYGON],e[t$4.geom.GeometryType.LINE_STRING]=[new t$4.style.Style({stroke:new t$4.style.Stroke({color:t,width:5})}),new t$4.style.Style({stroke:new t$4.style.Stroke({color:i,width:3})})],e[t$4.geom.GeometryType.MULTI_LINE_STRING]=e[t$4.geom.GeometryType.LINE_STRING],e[t$4.geom.GeometryType.CIRCLE]=e[t$4.geom.GeometryType.POLYGON].concat(e[t$4.geom.GeometryType.LINE_STRING]),e[t$4.geom.GeometryType.POINT]=[new t$4.style.Style({image:new t$4.style.Circle({radius:6,fill:new t$4.style.Fill({color:i}),stroke:new t$4.style.Stroke({color:t,width:1.5})}),zIndex:1/0})],e[t$4.geom.GeometryType.MULTI_POINT]=e[t$4.geom.GeometryType.POINT],e[t$4.geom.GeometryType.GEOMETRY_COLLECTION]=e[t$4.geom.GeometryType.POLYGON].concat(e[t$4.geom.GeometryType.LINE_STRING],e[t$4.geom.GeometryType.POINT]),e},t$4.style.Style.defaultGeometryFunction=function(e){return e.getGeometry()},t$4.ext={},t$4.ext.rbush=function(){},function(){!function(e){var t=n,i=n;function n(e,t,i,n,o){r(e,t,i||0,n||e.length-1,o||a)}function r(e,t,i,n,a){for(;n>i;){if(n-i>600){var s=n-i+1,l=t-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);r(e,t,Math.max(i,Math.floor(t-l*c/s+h)),Math.min(n,Math.floor(t+(s-l)*c/s+h)),a)}var d=e[t],f=i,p=n;for(o(e,i,t),a(e[n],d)>0&&o(e,i,n);f<p;){for(o(e,f,p),f++,p--;a(e[f],d)<0;)f++;for(;a(e[p],d)>0;)p--}0===a(e[i],d)?o(e,i,p):o(e,++p,n),p<=t&&(i=p+1),t<=p&&(n=p-1)}}function o(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function a(e,t){return e<t?-1:e>t?1:0}t.default=i;var s=l;function l(e,t){if(!(this instanceof l))return new l(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function u(e,t,i){if(!i)return t.indexOf(e);for(var n=0;n<t.length;n++)if(i(e,t[n]))return n;return-1}function c(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,n,r){r||(r=$(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=t;a<i;a++)o=e.children[a],d(r,e.leaf?n(o):o);return r}function d(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function f(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function _(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function x(e,t){var i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}function v(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function $(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(e,i,n,r,o){for(var a,s=[i,n];s.length;)!((n=s.pop())-(i=s.pop())<=r)&&(a=i+Math.ceil((n-i)/r/2)*r,t(e,a,i,n,o),s.push(i,a,a,n))}l.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,i=[],n=this.toBBox;if(!y(e,t))return i;for(var r,o,a,s,l=[];t;){for(r=0,o=t.children.length;r<o;r++)a=t.children[r],y(e,s=t.leaf?n(a):a)&&(t.leaf?i.push(a):v(e,s)?this._all(a,i):l.push(a));t=l.pop()}return i},collides:function(e){var t=this.data,i=this.toBBox;if(!y(e,t))return!1;for(var n,r,o,a,s=[];t;){for(n=0,r=t.children.length;n<r;n++)if(o=t.children[n],y(e,a=t.leaf?i(o):o)){if(t.leaf||v(e,a))return!0;s.push(o)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=$([]),this},remove:function(e,t){if(!e)return this;for(var i,n,r,o,a=this.data,s=this.toBBox(e),l=[],c=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=c.pop(),o=!0),a.leaf&&-1!==(r=u(e,a.children,t)))return a.children.splice(r,1),l.push(a),this._condense(l),this;o||a.leaf||!v(a,s)?n?(i++,a=n.children[i],o=!1):a=null:(l.push(a),c.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:f,compareMinY:p,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},_build:function(e,t,i,n){var r,o=i-t+1,a=this._maxEntries;if(o<=a)return c(r=$(e.slice(t,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=$([])).leaf=!1,r.height=n;var s,l,u,h,d=Math.ceil(o/a),f=d*Math.ceil(Math.sqrt(a));for(b(e,t,i,f,this.compareMinX),s=t;s<=i;s+=f)for(b(e,s,u=Math.min(s+f-1,i),d,this.compareMinY),l=s;l<=u;l+=d)h=Math.min(l+d-1,u),r.children.push(this._build(e,l,h,n-1));return c(r,this.toBBox),r},_chooseSubtree:function(e,t,i,n){for(var r,o,a,s,l,u,c,h;n.push(t),!t.leaf&&n.length-1!==i;){for(c=h=1/0,r=0,o=t.children.length;r<o;r++)l=_(a=t.children[r]),(u=g(e,a)-l)<h?(h=u,c=l<c?l:c,s=a):u===h&&l<c&&(c=l,s=a);t=s||t.children[0]}return t},_insert:function(e,t,i){var n=this.toBBox,r=i?e:n(e),o=[],a=this._chooseSubtree(r,this.data,t,o);for(a.children.push(e),d(a,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},_split:function(e,t){var i=e[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=$(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,c(i,this.toBBox),c(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(e,t){this.data=$([e,t]),this.data.height=e.height+1,this.data.leaf=!1,c(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,i){var n,r,o,a,s,l,u,c;for(l=u=1/0,n=t;n<=i-t;n++)a=x(r=h(e,0,n,this.toBBox),o=h(e,n,i,this.toBBox)),s=_(r)+_(o),a<l?(l=a,c=n,u=s<u?s:u):a===l&&s<u&&(u=s,c=n);return c},_chooseSplitAxis:function(e,t,i){var n=e.leaf?this.compareMinX:f,r=e.leaf?this.compareMinY:p;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)},_allDistMargin:function(e,t,i,n){e.children.sort(n);var r,o,a=this.toBBox,s=h(e,0,t,a),l=h(e,i-t,i,a),u=m(s)+m(l);for(r=t;r<i-t;r++)o=e.children[r],d(s,e.leaf?a(o):o),u+=m(s);for(r=i-t-1;r>=t;r--)o=e.children[r],d(l,e.leaf?a(o):o),u+=m(l);return u},_adjustParentBBoxes:function(e,t,i){for(var n=i;n>=0;n--)d(t[n],e)},_condense:function(e){for(var t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children).splice(t.indexOf(e[i]),1):this.clear():c(e[i],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}},e.default=s}(this.rbush=this.rbush||{})}.call(t$4.ext),t$4.ext.rbush=t$4.ext.rbush.default,t$4.render={},t$4.render.VectorContext=function(){},t$4.render.VectorContext.prototype.drawCustom=function(e,t,i){},t$4.render.VectorContext.prototype.drawGeometry=function(e){},t$4.render.VectorContext.prototype.setStyle=function(e){},t$4.render.VectorContext.prototype.drawCircle=function(e,t){},t$4.render.VectorContext.prototype.drawFeature=function(e,t){},t$4.render.VectorContext.prototype.drawGeometryCollection=function(e,t){},t$4.render.VectorContext.prototype.drawLineString=function(e,t){},t$4.render.VectorContext.prototype.drawMultiLineString=function(e,t){},t$4.render.VectorContext.prototype.drawMultiPoint=function(e,t){},t$4.render.VectorContext.prototype.drawMultiPolygon=function(e,t){},t$4.render.VectorContext.prototype.drawPoint=function(e,t){},t$4.render.VectorContext.prototype.drawPolygon=function(e,t){},t$4.render.VectorContext.prototype.drawText=function(e,t){},t$4.render.VectorContext.prototype.setFillStrokeStyle=function(e,t){},t$4.render.VectorContext.prototype.setImageStyle=function(e,t){},t$4.render.VectorContext.prototype.setTextStyle=function(e,t){},t$4.render.ReplayGroup={},t$4.render.ReplayGroup=function(){},t$4.render.ReplayGroup.prototype.getReplay=function(e,t){},t$4.render.ReplayGroup.prototype.isEmpty=function(){},t$4.render.ReplayType={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"},t$4.geom.flat.length={},t$4.geom.flat.length.lineString=function(e,t,i,n){var r,o=e[t],a=e[t+1],s=0;for(r=t+n;r<i;r+=n){var l=e[r],u=e[r+1];s+=Math.sqrt((l-o)*(l-o)+(u-a)*(u-a)),o=l,a=u}return s},t$4.geom.flat.length.linearRing=function(e,t,i,n){var r=t$4.geom.flat.length.lineString(e,t,i,n),o=e[i-n]-e[t],a=e[i-n+1]-e[t+1];return r+=Math.sqrt(o*o+a*a)},t$4.geom.flat.textpath={},t$4.geom.flat.textpath.lineString=function(e,t,i,n,r,o,a,s){for(var l,u,c,h=[],d=e[t]>e[i-n],f=r.length,p=e[t],_=e[t+1],m=e[t+=n],g=e[t+1],x=0,v=Math.sqrt(Math.pow(m-p,2)+Math.pow(g-_,2)),y="",$=0,b=0;b<f;++b){u=d?f-b-1:b;var T=r.charAt(u),C=o(y=d?T+y:y+T)-$;$+=C;for(var S=a+C/2;t<i-n&&x+v<S;)p=m,_=g,m=e[t+=n],g=e[t+1],x+=v,v=Math.sqrt(Math.pow(m-p,2)+Math.pow(g-_,2));var w=S-x,E=Math.atan2(g-_,m-p);if(d&&(E+=E>0?-Math.PI:Math.PI),void 0!==c){var P=E-c;if(P+=P>Math.PI?-2*Math.PI:P<-Math.PI?2*Math.PI:0,Math.abs(P)>s)return null}var A=w/v,L=t$4.math.lerp(p,m,A),M=t$4.math.lerp(_,g,A);c==E?(d&&(l[0]=L,l[1]=M,l[2]=C/2),l[4]=y):($=C,l=[L,M,C/2,E,y=T],d?h.unshift(l):h.push(l),c=E),a+=C}return h},t$4.structs.LRUCache=function(e){t$4.events.EventTarget.call(this),this.highWaterMark=void 0!==e?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t$4.inherits(t$4.structs.LRUCache,t$4.events.EventTarget),t$4.structs.LRUCache.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark},t$4.structs.LRUCache.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null,this.dispatchEvent(t$4.events.EventType.CLEAR)},t$4.structs.LRUCache.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},t$4.structs.LRUCache.prototype.forEach=function(e,t){for(var i=this.oldest_;i;)e.call(t,i.value_,i.key_,this),i=i.newer},t$4.structs.LRUCache.prototype.get=function(e){var t=this.entries_[e];return t$4.asserts.assert(void 0!==t,15),t===this.newest_||(t===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(t.newer.older=t.older,t.older.newer=t.newer),t.newer=null,t.older=this.newest_,this.newest_.newer=t,this.newest_=t),t.value_},t$4.structs.LRUCache.prototype.remove=function(e){var t=this.entries_[e];return t$4.asserts.assert(void 0!==t,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_},t$4.structs.LRUCache.prototype.getCount=function(){return this.count_},t$4.structs.LRUCache.prototype.getKeys=function(){var e,t=new Array(this.count_),i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t},t$4.structs.LRUCache.prototype.getValues=function(){var e,t=new Array(this.count_),i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t},t$4.structs.LRUCache.prototype.peekLast=function(){return this.oldest_.value_},t$4.structs.LRUCache.prototype.peekLastKey=function(){return this.oldest_.key_},t$4.structs.LRUCache.prototype.peekFirstKey=function(){return this.newest_.key_},t$4.structs.LRUCache.prototype.pop=function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_},t$4.structs.LRUCache.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},t$4.structs.LRUCache.prototype.set=function(e,t){t$4.asserts.assert(!(e in this.entries_),16);var i={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_},t$4.structs.LRUCache.prototype.prune=function(){for(;this.canExpireCache();)this.pop()},t$4.render.canvas={},t$4.render.canvas.defaultFont="10px sans-serif",t$4.render.canvas.defaultFillStyle=[0,0,0,1],t$4.render.canvas.defaultLineCap="round",t$4.render.canvas.defaultLineDash=[],t$4.render.canvas.defaultLineDashOffset=0,t$4.render.canvas.defaultLineJoin="round",t$4.render.canvas.defaultMiterLimit=10,t$4.render.canvas.defaultStrokeStyle=[0,0,0,1],t$4.render.canvas.defaultTextAlign="center",t$4.render.canvas.defaultTextBaseline="middle",t$4.render.canvas.defaultPadding=[0,0,0,0],t$4.render.canvas.defaultLineWidth=1,t$4.render.canvas.labelCache=new t$4.structs.LRUCache,t$4.render.canvas.checkedFonts_={},t$4.render.canvas.measureContext_=null,t$4.render.canvas.textHeights_={},t$4.render.canvas.checkFont=function(){var e,t,i=t$4.render.canvas.checkedFonts_,n=t$4.render.canvas.labelCache,r="wmytzilWMYTZIL@#/&?$%10";function o(e){var i=t$4.render.canvas.getMeasureContext();i.font="32px monospace",t=i.measureText(r).width;var n=!0;"monospace"!=e&&(i.font="32px "+e+",monospace",n=i.measureText(r).width!=t);return n}function a(){var t=!0;for(var r in i)i[r]<60&&(o(r)?(i[r]=60,t$4.obj.clear(t$4.render.canvas.textHeights_),t$4.render.canvas.measureContext_=null,n.clear()):(++i[r],t=!1));t&&(window.clearInterval(e),e=void 0)}return function(t){var n=t$4.css.getFontFamilies(t);if(n)for(var r=0,s=n.length;r<s;++r){var l=n[r];l in i||(i[l]=60,o(l)||(i[l]=0,void 0===e&&(e=window.setInterval(a,32))))}}}(),t$4.render.canvas.getMeasureContext=function(){var e=t$4.render.canvas.measureContext_;return e||(e=t$4.render.canvas.measureContext_=t$4.dom.createCanvasContext2D(1,1)),e},t$4.render.canvas.measureTextHeight=function(){var e=t$4.render.canvas.textHeights_;return function(t){var i=e[t];return null==i&&(i=e[t]=19),i}}(),t$4.render.canvas.measureTextWidth=function(e,t){var i=t$4.render.canvas.getMeasureContext();return e!=i.font&&(i.font=e),i.measureText(t).width},t$4.render.canvas.rotateAtOffset=function(e,t,i,n){0!==t&&(e.translate(i,n),e.rotate(t),e.translate(-i,-n))},t$4.render.canvas.resetTransform_=t$4.transform.create(),t$4.render.canvas.drawImage=function(e,t,i,n,r,o,a,s,l,u,c){var h;1!=i&&(h=e.globalAlpha,e.globalAlpha=h*i),t&&e.setTransform.apply(e,t),e.drawImage(n,r,o,a,s,l,u,a*c,s*c),h&&(e.globalAlpha=h),t&&e.setTransform.apply(e,t$4.render.canvas.resetTransform_)},t$4.render.canvas.Instruction={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},t$4.render.replay={},t$4.render.replay.ORDER=[t$4.render.ReplayType.POLYGON,t$4.render.ReplayType.CIRCLE,t$4.render.ReplayType.LINE_STRING,t$4.render.ReplayType.IMAGE,t$4.render.ReplayType.TEXT,t$4.render.ReplayType.DEFAULT],t$4.render.replay.TEXT_ALIGN={},t$4.render.replay.TEXT_ALIGN.left=0,t$4.render.replay.TEXT_ALIGN.end=0,t$4.render.replay.TEXT_ALIGN.center=.5,t$4.render.replay.TEXT_ALIGN.right=1,t$4.render.replay.TEXT_ALIGN.start=1,t$4.render.replay.TEXT_ALIGN.top=0,t$4.render.replay.TEXT_ALIGN.middle=.5,t$4.render.replay.TEXT_ALIGN.hanging=.2,t$4.render.replay.TEXT_ALIGN.alphabetic=.8,t$4.render.replay.TEXT_ALIGN.ideographic=.8,t$4.render.replay.TEXT_ALIGN.bottom=1,t$4.render.canvas.Replay=function(e,t,i,n,r,o){t$4.render.VectorContext.call(this),this.declutterTree=o,this.tmpExtent_=t$4.extent.createEmpty(),this.tolerance=e,this.maxExtent=t,this.overlaps=r,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.fillOrigin_,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.coordinateCache_={},this.renderedTransform_=t$4.transform.create(),this.hitDetectionInstructions=[],this.pixelCoordinates_=null,this.state={},this.viewRotation_=0,this.tmpLocalTransform_=t$4.transform.create(),this.resetTransform_=t$4.transform.create()},t$4.inherits(t$4.render.canvas.Replay,t$4.render.VectorContext),t$4.render.canvas.Replay.prototype.replayTextBackground_=function(e,t,i,n,r,o,a){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,i),e.lineTo.apply(e,n),e.lineTo.apply(e,r),e.lineTo.apply(e,t),o&&(this.fillOrigin_=o[2],this.fill_(e)),a&&(this.setStrokeStyle_(e,a),e.stroke())},t$4.render.canvas.Replay.prototype.replayImage_=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g){var x=m||g,v=this.tmpLocalTransform_;t-=r*=d,i-=o*=d,f&&(t=Math.round(t),i=Math.round(i));var y,$,b,T,C=p+u>n.width?n.width-u:p,S=s+c>n.height?n.height-c:s,w=this.tmpExtent_,E=_[3]+C*d+_[1],P=_[0]+S*d+_[2],A=t-_[3],L=i-_[0];(x||0!==h)&&(y=[A,L],$=[A+E,L],b=[A+E,L+P],T=[A,L+P]);var M=null;if(0!==h){var R=t+r,O=i+o;M=t$4.transform.compose(v,R,O,1,1,h,-R,-O),t$4.extent.createOrUpdateEmpty(w),t$4.extent.extendCoordinate(w,t$4.transform.apply(v,y)),t$4.extent.extendCoordinate(w,t$4.transform.apply(v,$)),t$4.extent.extendCoordinate(w,t$4.transform.apply(v,b)),t$4.extent.extendCoordinate(w,t$4.transform.apply(v,T))}else t$4.extent.createOrUpdate(A,L,A+E,L+P,w);var I=e.canvas,D=w[0]<=I.width&&w[2]>=0&&w[1]<=I.height&&w[3]>=0;if(a){if(!D&&1==a[4])return;t$4.extent.extend(a,w);var B=D?[e,M?M.slice(0):null,l,n,u,c,C,S,t,i,d]:null;B&&x&&B.push(m,g,y,$,b,T),a.push(B)}else D&&(x&&this.replayTextBackground_(e,y,$,b,T,m,g),t$4.render.canvas.drawImage(e,M,l,n,u,c,C,S,t,i,d))},t$4.render.canvas.Replay.prototype.applyPixelRatio=function(e){var t=this.pixelRatio;return 1==t?e:e.map((function(e){return e*t}))},t$4.render.canvas.Replay.prototype.appendFlatCoordinates=function(e,t,i,n,r,o){var a=this.coordinates.length,s=this.getBufferedMaxExtent();o&&(t+=n);var l,u,c,h=[e[t],e[t+1]],d=[NaN,NaN],f=!0;for(l=t+n;l<i;l+=n)d[0]=e[l],d[1]=e[l+1],(c=t$4.extent.coordinateRelationship(s,d))!==u?(f&&(this.coordinates[a++]=h[0],this.coordinates[a++]=h[1]),this.coordinates[a++]=d[0],this.coordinates[a++]=d[1],f=!1):c===t$4.extent.Relationship.INTERSECTING?(this.coordinates[a++]=d[0],this.coordinates[a++]=d[1],f=!1):f=!0,h[0]=d[0],h[1]=d[1],u=c;return(r&&f||l===t+n)&&(this.coordinates[a++]=h[0],this.coordinates[a++]=h[1]),a},t$4.render.canvas.Replay.prototype.drawCustomCoordinates_=function(e,t,i,n,r){for(var o=0,a=i.length;o<a;++o){var s=i[o],l=this.appendFlatCoordinates(e,t,s,n,!1,!1);r.push(l),t=s}return t},t$4.render.canvas.Replay.prototype.drawCustom=function(e,t,i){this.beginGeometry(e,t);var n,r,o,a,s,l=e.getType(),u=e.getStride(),c=this.coordinates.length;if(l==t$4.geom.GeometryType.MULTI_POLYGON){n=(e=e).getOrientedFlatCoordinates(),a=[];var h=e.getEndss();s=0;for(var d=0,f=h.length;d<f;++d){var p=[];s=this.drawCustomCoordinates_(n,s,h[d],u,p),a.push(p)}this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,a,e,i,t$4.geom.flat.inflate.coordinatesss])}else l==t$4.geom.GeometryType.POLYGON||l==t$4.geom.GeometryType.MULTI_LINE_STRING?(o=[],n=l==t$4.geom.GeometryType.POLYGON?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),s=this.drawCustomCoordinates_(n,0,e.getEnds(),u,o),this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,o,e,i,t$4.geom.flat.inflate.coordinatess])):l==t$4.geom.GeometryType.LINE_STRING||l==t$4.geom.GeometryType.MULTI_POINT?(n=e.getFlatCoordinates(),r=this.appendFlatCoordinates(n,0,n.length,u,!1,!1),this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,r,e,i,t$4.geom.flat.inflate.coordinates])):l==t$4.geom.GeometryType.POINT&&(n=e.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),r=this.coordinates.length,this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,r,e,i]));this.endGeometry(e,t)},t$4.render.canvas.Replay.prototype.beginGeometry=function(e,t){this.beginGeometryInstruction1_=[t$4.render.canvas.Instruction.BEGIN_GEOMETRY,t,0],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[t$4.render.canvas.Instruction.BEGIN_GEOMETRY,t,0],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},t$4.render.canvas.Replay.prototype.fill_=function(e){if(this.fillOrigin_){var t=t$4.transform.apply(this.renderedTransform_,this.fillOrigin_.slice());e.translate(t[0],t[1]),e.rotate(this.viewRotation_)}e.fill(),this.fillOrigin_&&e.setTransform.apply(e,t$4.render.canvas.resetTransform_)},t$4.render.canvas.Replay.prototype.setStrokeStyle_=function(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],t$4.has.CANVAS_LINE_DASH&&(e.lineDashOffset=t[7],e.setLineDash(t[6]))},t$4.render.canvas.Replay.prototype.renderDeclutter_=function(e,t){if(e&&e.length>5){var i=e[4];if(1==i||i==e.length-5){var n={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};if(!this.declutterTree.collides(n)){this.declutterTree.insert(n);for(var r=t$4.render.canvas.drawImage,o=5,a=e.length;o<a;++o){var s=e[o];s&&(s.length>11&&this.replayTextBackground_(s[0],s[13],s[14],s[15],s[16],s[11],s[12]),r.apply(void 0,s))}}e.length=5,t$4.extent.createOrUpdateEmpty(e)}}},t$4.render.canvas.Replay.prototype.replay_=function(e,t,i,n,r,o){var a;this.pixelCoordinates_&&t$4.array.equals(t,this.renderedTransform_)?a=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),a=t$4.geom.flat.transform.transform2D(this.coordinates,0,this.coordinates.length,2,t,this.pixelCoordinates_),t$4.transform.setFromArray(this.renderedTransform_,t));for(var s,l,u,c,h,d,f,p,_,m=!t$4.obj.isEmpty(i),g=0,x=n.length,v=0,y=0,$=0,b=null,T=null,C=this.coordinateCache_,S=this.viewRotation_,w={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:S},E=this.instructions!=n||this.overlaps?0:200;g<x;){var P,A,L,M=n[g];switch(M[0]){case t$4.render.canvas.Instruction.BEGIN_GEOMETRY:P=M[1],m&&i[t$4.getUid(P).toString()]||!P.getGeometry()?g=M[2]:void 0===o||t$4.extent.intersects(o,P.getGeometry().getExtent())?++g:g=M[2]+1;break;case t$4.render.canvas.Instruction.BEGIN_PATH:y>E&&(this.fill_(e),y=0),$>E&&(e.stroke(),$=0),!y&&!$&&(e.beginPath(),c=h=NaN),++g;break;case t$4.render.canvas.Instruction.CIRCLE:var R=a[v=M[1]],O=a[v+1],I=a[v+2]-R,D=a[v+3]-O,B=Math.sqrt(I*I+D*D);e.moveTo(R+B,O),e.arc(R,O,B,0,2*Math.PI,!0),++g;break;case t$4.render.canvas.Instruction.CLOSE_PATH:e.closePath(),++g;break;case t$4.render.canvas.Instruction.CUSTOM:v=M[1],s=M[2];var N=M[3],F=M[4],U=6==M.length?M[5]:void 0;w.geometry=N,w.feature=P,g in C||(C[g]=[]);var G=C[g];U?U(a,v,s,2,G):(G[0]=a[v],G[1]=a[v+1],G.length=2),F(G,w),++g;break;case t$4.render.canvas.Instruction.DRAW_IMAGE:v=M[1],s=M[2],_=M[3],l=M[4],u=M[5],p=r?null:M[6];var z,V,k,W=M[7],H=M[8],q=M[9],j=M[10],Y=M[11],X=M[12],K=M[13],Q=M[14],Z=M[15];for(M.length>16?(z=M[16],V=M[17],k=M[18]):(z=t$4.render.canvas.defaultPadding,V=k=!1),Y&&(X+=S);v<s;v+=2)this.replayImage_(e,a[v],a[v+1],_,l,u,p,W,H,q,j,X,K,Q,Z,z,V?b:null,k?T:null);this.renderDeclutter_(p,P),++g;break;case t$4.render.canvas.Instruction.DRAW_CHARS:var J=M[1],ee=M[2],te=M[3];p=r?null:M[4];var ie=M[5],ne=M[6],re=M[7],oe=M[8],ae=M[9],se=M[10],le=M[11],ue=M[12],ce=M[13],he=M[14],de=t$4.geom.flat.length.lineString(a,J,ee,2),fe=oe(ue);if(ie||fe<=de){var pe=this.textStates[ce].textAlign,_e=(de-fe)*t$4.render.replay.TEXT_ALIGN[pe],me=t$4.geom.flat.textpath.lineString(a,J,ee,2,ue,oe,_e,re);if(me){var ge,xe,ve,ye,$e;if(se)for(ge=0,xe=me.length;ge<xe;++ge)ve=($e=me[ge])[4],ye=this.getImage(ve,ce,"",se),l=$e[2]+le,u=te*ye.height+2*(.5-te)*le-ae,this.replayImage_(e,$e[0],$e[1],ye,l,u,p,ye.height,1,0,0,$e[3],he,!1,ye.width,t$4.render.canvas.defaultPadding,null,null);if(ne)for(ge=0,xe=me.length;ge<xe;++ge)ve=($e=me[ge])[4],ye=this.getImage(ve,ce,ne,""),l=$e[2],u=te*ye.height-ae,this.replayImage_(e,$e[0],$e[1],ye,l,u,p,ye.height,1,0,0,$e[3],he,!1,ye.width,t$4.render.canvas.defaultPadding,null,null)}}this.renderDeclutter_(p,P),++g;break;case t$4.render.canvas.Instruction.END_GEOMETRY:if(void 0!==r){var be=r(P=M[1]);if(be)return be}++g;break;case t$4.render.canvas.Instruction.FILL:E?y++:this.fill_(e),++g;break;case t$4.render.canvas.Instruction.MOVE_TO_LINE_TO:for(v=M[1],s=M[2],A=a[v],f=(L=a[v+1])+.5|0,((d=A+.5|0)!==c||f!==h)&&(e.moveTo(A,L),c=d,h=f),v+=2;v<s;v+=2)d=(A=a[v])+.5|0,f=(L=a[v+1])+.5|0,(v==s-2||d!==c||f!==h)&&(e.lineTo(A,L),c=d,h=f);++g;break;case t$4.render.canvas.Instruction.SET_FILL_STYLE:b=M,this.fillOrigin_=M[2],y&&(this.fill_(e),y=0,$&&(e.stroke(),$=0)),e.fillStyle=M[1],++g;break;case t$4.render.canvas.Instruction.SET_STROKE_STYLE:T=M,$&&(e.stroke(),$=0),this.setStrokeStyle_(e,M),++g;break;case t$4.render.canvas.Instruction.STROKE:E?$++:e.stroke(),++g;break;default:++g}}y&&this.fill_(e),$&&e.stroke()},t$4.render.canvas.Replay.prototype.replay=function(e,t,i,n){this.viewRotation_=i,this.replay_(e,t,n,this.instructions,void 0,void 0)},t$4.render.canvas.Replay.prototype.replayHitDetection=function(e,t,i,n,r,o){return this.viewRotation_=i,this.replay_(e,t,n,this.hitDetectionInstructions,r,o)},t$4.render.canvas.Replay.prototype.reverseHitDetectionInstructions=function(){var e=this.hitDetectionInstructions;e.reverse();var t,i,n,r=e.length,o=-1;for(t=0;t<r;++t)(n=(i=e[t])[0])==t$4.render.canvas.Instruction.END_GEOMETRY?o=t:n==t$4.render.canvas.Instruction.BEGIN_GEOMETRY&&(i[2]=t,t$4.array.reverseSubArray(this.hitDetectionInstructions,o,t),o=-1)},t$4.render.canvas.Replay.prototype.setFillStrokeStyle=function(e,t){var i=this.state;if(e){var n=e.getColor();i.fillStyle=t$4.colorlike.asColorLike(n||t$4.render.canvas.defaultFillStyle)}else i.fillStyle=void 0;if(t){var r=t.getColor();i.strokeStyle=t$4.colorlike.asColorLike(r||t$4.render.canvas.defaultStrokeStyle);var o=t.getLineCap();i.lineCap=void 0!==o?o:t$4.render.canvas.defaultLineCap;var a=t.getLineDash();i.lineDash=a?a.slice():t$4.render.canvas.defaultLineDash;var s=t.getLineDashOffset();i.lineDashOffset=s||t$4.render.canvas.defaultLineDashOffset;var l=t.getLineJoin();i.lineJoin=void 0!==l?l:t$4.render.canvas.defaultLineJoin;var u=t.getWidth();i.lineWidth=void 0!==u?u:t$4.render.canvas.defaultLineWidth;var c=t.getMiterLimit();i.miterLimit=void 0!==c?c:t$4.render.canvas.defaultMiterLimit,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},t$4.render.canvas.Replay.prototype.applyFill=function(e,t){var i=e.fillStyle,n=[t$4.render.canvas.Instruction.SET_FILL_STYLE,i];if("string"!=typeof i){var r=t.getExtent();n.push([r[0],r[3]])}this.instructions.push(n)},t$4.render.canvas.Replay.prototype.applyStroke=function(e){this.instructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio])},t$4.render.canvas.Replay.prototype.updateFillStyle=function(e,t,i){var n=e.fillStyle;("string"!=typeof n||e.currentFillStyle!=n)&&(t.call(this,e,i),e.currentFillStyle=n)},t$4.render.canvas.Replay.prototype.updateStrokeStyle=function(e,t){var i=e.strokeStyle,n=e.lineCap,r=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,s=e.lineWidth,l=e.miterLimit;(e.currentStrokeStyle!=i||e.currentLineCap!=n||r!=e.currentLineDash&&!t$4.array.equals(e.currentLineDash,r)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=s||e.currentMiterLimit!=l)&&(t.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=n,e.currentLineDash=r,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=s,e.currentMiterLimit=l)},t$4.render.canvas.Replay.prototype.endGeometry=function(e,t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var i=[t$4.render.canvas.Instruction.END_GEOMETRY,t];this.instructions.push(i),this.hitDetectionInstructions.push(i)},t$4.render.canvas.Replay.prototype.finish=t$4.nullFunction,t$4.render.canvas.Replay.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=t$4.extent.clone(this.maxExtent),this.maxLineWidth>0)){var e=this.resolution*(this.maxLineWidth+1)/2;t$4.extent.buffer(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},t$4.render.canvas.ImageReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o),this.declutterGroup_=null,this.hitDetectionImage_=null,this.image_=null,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.snapToPixel_=void 0,this.width_=void 0},t$4.inherits(t$4.render.canvas.ImageReplay,t$4.render.canvas.Replay),t$4.render.canvas.ImageReplay.prototype.drawCoordinates_=function(e,t,i,n){return this.appendFlatCoordinates(e,t,i,n,!1,!1)},t$4.render.canvas.ImageReplay.prototype.drawPoint=function(e,t){if(this.image_){this.beginGeometry(e,t);var i=e.getFlatCoordinates(),n=e.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]),this.endGeometry(e,t)}},t$4.render.canvas.ImageReplay.prototype.drawMultiPoint=function(e,t){if(this.image_){this.beginGeometry(e,t);var i=e.getFlatCoordinates(),n=e.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]),this.endGeometry(e,t)}},t$4.render.canvas.ImageReplay.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.snapToPixel_=void 0,this.width_=void 0},t$4.render.canvas.ImageReplay.prototype.setImageStyle=function(e,t){var i=e.getAnchor(),n=e.getSize(),r=e.getHitDetectionImage(1),o=e.getImage(1),a=e.getOrigin();this.anchorX_=i[0],this.anchorY_=i[1],this.declutterGroup_=t,this.hitDetectionImage_=r,this.image_=o,this.height_=n[1],this.opacity_=e.getOpacity(),this.originX_=a[0],this.originY_=a[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScale(),this.snapToPixel_=e.getSnapToPixel(),this.width_=n[0]},t$4.render.canvas.LineStringReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o)},t$4.inherits(t$4.render.canvas.LineStringReplay,t$4.render.canvas.Replay),t$4.render.canvas.LineStringReplay.prototype.drawFlatCoordinates_=function(e,t,i,n){var r=this.coordinates.length,o=this.appendFlatCoordinates(e,t,i,n,!1,!1),a=[t$4.render.canvas.Instruction.MOVE_TO_LINE_TO,r,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i},t$4.render.canvas.LineStringReplay.prototype.drawLineString=function(e,t){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],[t$4.render.canvas.Instruction.BEGIN_PATH]);var o=e.getFlatCoordinates(),a=e.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.STROKE]),this.endGeometry(e,t)}},t$4.render.canvas.LineStringReplay.prototype.drawMultiLineString=function(e,t){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],[t$4.render.canvas.Instruction.BEGIN_PATH]);var o,a,s=e.getEnds(),l=e.getFlatCoordinates(),u=e.getStride(),c=0;for(o=0,a=s.length;o<a;++o)c=this.drawFlatCoordinates_(l,c,s[o],u);this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.STROKE]),this.endGeometry(e,t)}},t$4.render.canvas.LineStringReplay.prototype.finish=function(){var e=this.state;null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push([t$4.render.canvas.Instruction.STROKE]),this.reverseHitDetectionInstructions(),this.state=null},t$4.render.canvas.LineStringReplay.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push([t$4.render.canvas.Instruction.STROKE]),e.lastStroke=this.coordinates.length),e.lastStroke=0,t$4.render.canvas.Replay.prototype.applyStroke.call(this,e),this.instructions.push([t$4.render.canvas.Instruction.BEGIN_PATH])},t$4.render.canvas.PolygonReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o)},t$4.inherits(t$4.render.canvas.PolygonReplay,t$4.render.canvas.Replay),t$4.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_=function(e,t,i,n){var r=this.state,o=void 0!==r.fillStyle,a=null!=r.strokeStyle,s=i.length,l=[t$4.render.canvas.Instruction.BEGIN_PATH];this.instructions.push(l),this.hitDetectionInstructions.push(l);for(var u=0;u<s;++u){var c=i[u],h=this.coordinates.length,d=this.appendFlatCoordinates(e,t,c,n,!0,!a),f=[t$4.render.canvas.Instruction.MOVE_TO_LINE_TO,h,d];if(this.instructions.push(f),this.hitDetectionInstructions.push(f),a){var p=[t$4.render.canvas.Instruction.CLOSE_PATH];this.instructions.push(p),this.hitDetectionInstructions.push(p)}t=c}var _=[t$4.render.canvas.Instruction.FILL];if(this.hitDetectionInstructions.push(_),o&&this.instructions.push(_),a){var m=[t$4.render.canvas.Instruction.STROKE];this.instructions.push(m),this.hitDetectionInstructions.push(m)}return t},t$4.render.canvas.PolygonReplay.prototype.drawCircle=function(e,t){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_FILL_STYLE,t$4.color.asString(t$4.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=e.getFlatCoordinates(),a=e.getStride(),s=this.coordinates.length;this.appendFlatCoordinates(o,0,o.length,a,!1,!1);var l=[t$4.render.canvas.Instruction.BEGIN_PATH],u=[t$4.render.canvas.Instruction.CIRCLE,s];this.instructions.push(l,u),this.hitDetectionInstructions.push(l,u);var c=[t$4.render.canvas.Instruction.FILL];if(this.hitDetectionInstructions.push(c),void 0!==i.fillStyle&&this.instructions.push(c),void 0!==i.strokeStyle){var h=[t$4.render.canvas.Instruction.STROKE];this.instructions.push(h),this.hitDetectionInstructions.push(h)}this.endGeometry(e,t)}},t$4.render.canvas.PolygonReplay.prototype.drawPolygon=function(e,t){var i=this.state;this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_FILL_STYLE,t$4.color.asString(t$4.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var n=e.getEnds(),r=e.getOrientedFlatCoordinates(),o=e.getStride();this.drawFlatCoordinatess_(r,0,n,o),this.endGeometry(e,t)},t$4.render.canvas.PolygonReplay.prototype.drawMultiPolygon=function(e,t){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_FILL_STYLE,t$4.color.asString(t$4.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o,a,s=e.getEndss(),l=e.getOrientedFlatCoordinates(),u=e.getStride(),c=0;for(o=0,a=s.length;o<a;++o)c=this.drawFlatCoordinatess_(l,c,s[o],u);this.endGeometry(e,t)}},t$4.render.canvas.PolygonReplay.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e){var t,i,n=this.coordinates;for(t=0,i=n.length;t<i;++t)n[t]=t$4.geom.flat.simplify.snap(n[t],e)}},t$4.render.canvas.PolygonReplay.prototype.setFillStrokeStyles_=function(e){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.applyFill,e),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},t$4.geom.flat.straightchunk={},t$4.geom.flat.straightchunk.lineString=function(e,t,i,n,r){var o,a,s,l,u,c,h,d,f,p=i,_=i,m=0,g=0,x=i;for(o=i;o<n;o+=r){var v=t[o],y=t[o+1];void 0!==l&&(d=v-l,f=y-u,s=Math.sqrt(d*d+f*f),void 0!==c&&(g+=a,Math.acos((c*d+h*f)/(a*s))>e&&(g>m&&(m=g,p=x,_=o),g=0,x=o-r)),a=s,c=d,h=f),l=v,u=y}return(g+=s)>m?[x,o]:[p,_]},t$4.style.TextPlacement={POINT:"point",LINE:"line"},t$4.render.canvas.TextReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o),this.declutterGroup_,this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.widths_={},t$4.render.canvas.labelCache.prune()},t$4.inherits(t$4.render.canvas.TextReplay,t$4.render.canvas.Replay),t$4.render.canvas.TextReplay.measureTextWidths=function(e,t,i){var n,r,o=t.length,a=0;for(r=0;r<o;++r)n=t$4.render.canvas.measureTextWidth(e,t[r]),a=Math.max(a,n),i.push(n);return a},t$4.render.canvas.TextReplay.prototype.drawText=function(e,t){var i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(i||n)){var o,a,s=this.coordinates.length,l=e.getType(),u=null,c=2,h=2;if(r.placement===t$4.style.TextPlacement.LINE){if(!t$4.extent.intersects(this.getBufferedMaxExtent(),e.getExtent()))return;var d;if(u=e.getFlatCoordinates(),h=e.getStride(),l==t$4.geom.GeometryType.LINE_STRING)d=[u.length];else if(l==t$4.geom.GeometryType.MULTI_LINE_STRING)d=e.getEnds();else if(l==t$4.geom.GeometryType.POLYGON)d=e.getEnds().slice(0,1);else if(l==t$4.geom.GeometryType.MULTI_POLYGON){var f=e.getEndss();for(d=[],o=0,a=f.length;o<a;++o)d.push(f[o][0])}this.beginGeometry(e,t);for(var p,_=r.textAlign,m=0,g=0,x=d.length;g<x;++g){if(null==_){var v=t$4.geom.flat.straightchunk.lineString(r.maxAngle,u,m,d[g],h);m=v[0],p=v[1]}else p=d[g];for(o=m;o<p;o+=h)this.coordinates.push(u[o],u[o+1]);c=this.coordinates.length,m=d[g],this.drawChars_(s,c,this.declutterGroup_),s=c}this.endGeometry(e,t)}else{var y=this.getImage(this.text_,this.textKey_,this.fillKey_,this.strokeKey_),$=y.width/this.pixelRatio;switch(l){case t$4.geom.GeometryType.POINT:case t$4.geom.GeometryType.MULTI_POINT:c=(u=e.getFlatCoordinates()).length;break;case t$4.geom.GeometryType.LINE_STRING:u=e.getFlatMidpoint();break;case t$4.geom.GeometryType.CIRCLE:u=e.getCenter();break;case t$4.geom.GeometryType.MULTI_LINE_STRING:c=(u=e.getFlatMidpoints()).length;break;case t$4.geom.GeometryType.POLYGON:if(u=e.getFlatInteriorPoint(),!r.overflow&&u[2]/this.resolution<$)return;h=3;break;case t$4.geom.GeometryType.MULTI_POLYGON:var b=e.getFlatInteriorPoints();for(u=[],o=0,a=b.length;o<a;o+=3)(r.overflow||b[o+2]/this.resolution>=$)&&u.push(b[o],b[o+1]);if(0==(c=u.length))return}c=this.appendFlatCoordinates(u,0,c,h,!1,!1),this.beginGeometry(e,t),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),this.updateFillStyle(this.state,this.applyFill,e),this.updateStrokeStyle(this.state,this.applyStroke)),this.drawTextImage_(y,s,c),this.endGeometry(e,t)}}},t$4.render.canvas.TextReplay.prototype.getImage=function(e,t,i,n){var r,o=n+t+e+i+this.pixelRatio,a=t$4.render.canvas.labelCache;if(!a.containsKey(o)){var s=n?this.strokeStates[n]||this.textStrokeState_:null,l=i?this.fillStates[i]||this.textFillState_:null,u=this.textStates[t]||this.textState_,c=this.pixelRatio,h=u.scale*c,d=t$4.render.replay.TEXT_ALIGN[u.textAlign||t$4.render.canvas.defaultTextAlign],f=n&&s.lineWidth?s.lineWidth:0,p=e.split("\n"),_=p.length,m=[],g=t$4.render.canvas.TextReplay.measureTextWidths(u.font,p,m),x=t$4.render.canvas.measureTextHeight(u.font),v=x*_,y=g+f,$=t$4.dom.createCanvasContext2D(Math.ceil(y*h),Math.ceil((v+f)*h));r=$.canvas,a.set(o,r),1!=h&&$.scale(h,h),$.font=u.font,n&&($.strokeStyle=s.strokeStyle,$.lineWidth=f*(t$4.has.SAFARI?h:1),$.lineCap=s.lineCap,$.lineJoin=s.lineJoin,$.miterLimit=s.miterLimit,t$4.has.CANVAS_LINE_DASH&&s.lineDash.length&&($.setLineDash(s.lineDash),$.lineDashOffset=s.lineDashOffset)),i&&($.fillStyle=l.fillStyle),$.textBaseline="middle",$.textAlign="center";var b,T=.5-d,C=d*r.width/h+T*f;if(n)for(b=0;b<_;++b)$.strokeText(p[b],C+T*m[b],.5*(f+x)+b*x);if(i)for(b=0;b<_;++b)$.fillText(p[b],C+T*m[b],.5*(f+x)+b*x)}return a.get(o)},t$4.render.canvas.TextReplay.prototype.drawTextImage_=function(e,t,i){var n=this.textState_,r=this.textStrokeState_,o=this.pixelRatio,a=t$4.render.replay.TEXT_ALIGN[n.textAlign||t$4.render.canvas.defaultTextAlign],s=t$4.render.replay.TEXT_ALIGN[n.textBaseline],l=r&&r.lineWidth?r.lineWidth:0,u=a*e.width/o+2*(.5-a)*l,c=s*e.height/o+2*(.5-s)*l;this.instructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,t,i,e,(u-this.textOffsetX_)*o,(c-this.textOffsetY_)*o,this.declutterGroup_,e.height,1,0,0,this.textRotateWithView_,this.textRotation_,1,!0,e.width,n.padding==t$4.render.canvas.defaultPadding?t$4.render.canvas.defaultPadding:n.padding.map((function(e){return e*o})),!!n.backgroundFill,!!n.backgroundStroke]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,t,i,e,(u-this.textOffsetX_)*o,(c-this.textOffsetY_)*o,this.declutterGroup_,e.height,1,0,0,this.textRotateWithView_,this.textRotation_,1/o,!0,e.width,n.padding,!!n.backgroundFill,!!n.backgroundStroke])},t$4.render.canvas.TextReplay.prototype.drawChars_=function(e,t,i){var n=this.textStrokeState_,r=this.textState_,o=this.textFillState_,a=this.strokeKey_;n&&(a in this.strokeStates||(this.strokeStates[a]={strokeStyle:n.strokeStyle,lineCap:n.lineCap,lineDashOffset:n.lineDashOffset,lineWidth:n.lineWidth,lineJoin:n.lineJoin,miterLimit:n.miterLimit,lineDash:n.lineDash}));var s=this.textKey_;this.textKey_ in this.textStates||(this.textStates[this.textKey_]={font:r.font,textAlign:r.textAlign||t$4.render.canvas.defaultTextAlign,scale:r.scale});var l=this.fillKey_;o&&(l in this.fillStates||(this.fillStates[l]={fillStyle:o.fillStyle}));var u=this.pixelRatio,c=t$4.render.replay.TEXT_ALIGN[r.textBaseline],h=this.textOffsetY_*u,d=this.text_,f=r.font,p=r.scale,_=n?n.lineWidth*p/2:0,m=this.widths_[f];m||(this.widths_[f]=m={}),this.instructions.push([t$4.render.canvas.Instruction.DRAW_CHARS,e,t,c,i,r.overflow,l,r.maxAngle,function(e){var t=m[e];return t||(t=m[e]=t$4.render.canvas.measureTextWidth(f,e)),t*p*u},h,a,_*u,d,s,1]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_CHARS,e,t,c,i,r.overflow,l,r.maxAngle,function(e){var t=m[e];return t||(t=m[e]=t$4.render.canvas.measureTextWidth(f,e)),t*p},h,a,_,d,s,1/u])},t$4.render.canvas.TextReplay.prototype.setTextStyle=function(e,t){var i,n,r;if(e){this.declutterGroup_=t;var o=e.getFill();o?((n=this.textFillState_)||(n=this.textFillState_={}),n.fillStyle=t$4.colorlike.asColorLike(o.getColor()||t$4.render.canvas.defaultFillStyle)):n=this.textFillState_=null;var a=e.getStroke();if(a){(r=this.textStrokeState_)||(r=this.textStrokeState_={});var s=a.getLineDash(),l=a.getLineDashOffset(),u=a.getWidth(),c=a.getMiterLimit();r.lineCap=a.getLineCap()||t$4.render.canvas.defaultLineCap,r.lineDash=s?s.slice():t$4.render.canvas.defaultLineDash,r.lineDashOffset=void 0===l?t$4.render.canvas.defaultLineDashOffset:l,r.lineJoin=a.getLineJoin()||t$4.render.canvas.defaultLineJoin,r.lineWidth=void 0===u?t$4.render.canvas.defaultLineWidth:u,r.miterLimit=void 0===c?t$4.render.canvas.defaultMiterLimit:c,r.strokeStyle=t$4.colorlike.asColorLike(a.getColor()||t$4.render.canvas.defaultStrokeStyle)}else r=this.textStrokeState_=null;i=this.textState_;var h=e.getFont()||t$4.render.canvas.defaultFont,d=e.getScale();i.overflow=e.getOverflow(),i.font=h,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.textBaseline=e.getTextBaseline()||t$4.render.canvas.defaultTextBaseline,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||t$4.render.canvas.defaultPadding,i.scale=void 0===d?1:d;var f=e.getOffsetX(),p=e.getOffsetY(),_=e.getRotateWithView(),m=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===p?0:p,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0===m?0:m,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:t$4.getUid(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+t$4.getUid(n.fillStyle):""}else this.text_=""},t$4.render.canvas.ReplayGroup=function(e,t,i,n,r,o,a){t$4.render.ReplayGroup.call(this),this.declutterTree_=o,this.declutterGroup_=null,this.tolerance_=e,this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=i,this.renderBuffer_=a,this.replaysByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=t$4.transform.create()},t$4.inherits(t$4.render.canvas.ReplayGroup,t$4.render.ReplayGroup),t$4.render.canvas.ReplayGroup.circleArrayCache_={0:[[!0]]},t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_=function(e,t,i){var n,r=Math.floor(e.length/2);if(t>=r)for(n=r;n<t;n++)e[n][i]=!0;else if(t<r)for(n=t+1;n<r;n++)e[n][i]=!0},t$4.render.canvas.ReplayGroup.getCircleArray_=function(e){if(void 0!==t$4.render.canvas.ReplayGroup.circleArrayCache_[e])return t$4.render.canvas.ReplayGroup.circleArrayCache_[e];for(var t=2*e+1,i=new Array(t),n=0;n<t;n++)i[n]=new Array(t);for(var r=e,o=0,a=0;r>=o;)t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+r,e+o),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+o,e+r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-o,e+r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-r,e+o),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-r,e-o),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-o,e-r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+o,e-r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+r,e-o),2*((a+=1+2*++o)-r)+1>0&&(a+=1-2*(r-=1));return t$4.render.canvas.ReplayGroup.circleArrayCache_[e]=i,i},t$4.render.canvas.ReplayGroup.replayDeclutter=function(e,t,i){for(var n=Object.keys(e).map(Number).sort(t$4.array.numberSafeCompareFunction),r={},o=0,a=n.length;o<a;++o)for(var s=e[n[o].toString()],l=0,u=s.length;l<u;){var c=s[l++],h=s[l++];c.replay(t,h,i,r)}},t$4.render.canvas.ReplayGroup.prototype.addDeclutter=function(e){var t=null;return this.declutterTree_&&(e?(t=this.declutterGroup_)[4]++:(t=this.declutterGroup_=t$4.extent.createEmpty()).push(1)),t},t$4.render.canvas.ReplayGroup.prototype.clip=function(e,t){var i=this.getClipCoords(t);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()},t$4.render.canvas.ReplayGroup.prototype.hasReplays=function(e){for(var t in this.replaysByZIndex_)for(var i=this.replaysByZIndex_[t],n=0,r=e.length;n<r;++n)if(e[n]in i)return!0;return!1},t$4.render.canvas.ReplayGroup.prototype.finish=function(){var e;for(e in this.replaysByZIndex_){var t,i=this.replaysByZIndex_[e];for(t in i)i[t].finish()}},t$4.render.canvas.ReplayGroup.prototype.forEachFeatureAtCoordinate=function(e,t,i,n,r,o,a){var s,l=2*(n=Math.round(n))+1,u=t$4.transform.compose(this.hitDetectionTransform_,n+.5,n+.5,1/t,-1/t,-i,-e[0],-e[1]),c=this.hitDetectionContext_;c.canvas.width!==l||c.canvas.height!==l?(c.canvas.width=l,c.canvas.height=l):c.clearRect(0,0,l,l),void 0!==this.renderBuffer_&&(s=t$4.extent.createEmpty(),t$4.extent.extendCoordinate(s,e),t$4.extent.buffer(s,t*(this.renderBuffer_+n),s));var h,d,f=t$4.render.canvas.ReplayGroup.getCircleArray_(n);function p(e){for(var t=c.getImageData(0,0,l,l).data,i=0;i<l;i++)for(var n=0;n<l;n++)if(f[i][n]&&t[4*(n*l+i)+3]>0){var r;return(!(h&&(d==t$4.render.ReplayType.IMAGE||d==t$4.render.ReplayType.TEXT))||-1!==h.indexOf(e))&&(r=o(e)),r?r:void c.clearRect(0,0,l,l)}}this.declutterTree_&&(h=this.declutterTree_.all().map((function(e){return e.value})));var _,m,g,x,v,y=Object.keys(this.replaysByZIndex_).map(Number);for(y.sort(t$4.array.numberSafeCompareFunction),_=y.length-1;_>=0;--_){var $=y[_].toString();for(g=this.replaysByZIndex_[$],m=t$4.render.replay.ORDER.length-1;m>=0;--m)if(void 0!==(x=g[d=t$4.render.replay.ORDER[m]]))if(!a||d!=t$4.render.ReplayType.IMAGE&&d!=t$4.render.ReplayType.TEXT){if(v=x.replayHitDetection(c,u,i,r,p,s))return v}else{var b=a[$];b?b.push(x,u.slice(0)):a[$]=[x,u.slice(0)]}}},t$4.render.canvas.ReplayGroup.prototype.getClipCoords=function(e){var t=this.maxExtent_,i=t[0],n=t[1],r=t[2],o=t[3],a=[i,n,i,o,r,o,r,n];return t$4.geom.flat.transform.transform2D(a,0,8,2,e,a),a},t$4.render.canvas.ReplayGroup.prototype.getReplay=function(e,t){var i=void 0!==e?e.toString():"0",n=this.replaysByZIndex_[i];void 0===n&&(n={},this.replaysByZIndex_[i]=n);var r=n[t];void 0===r&&(r=new(0,t$4.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_[t])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_),n[t]=r);return r},t$4.render.canvas.ReplayGroup.prototype.getReplays=function(){return this.replaysByZIndex_},t$4.render.canvas.ReplayGroup.prototype.isEmpty=function(){return t$4.obj.isEmpty(this.replaysByZIndex_)},t$4.render.canvas.ReplayGroup.prototype.replay=function(e,t,i,n,r,o){var a=Object.keys(this.replaysByZIndex_).map(Number);a.sort(t$4.array.numberSafeCompareFunction),e.save(),this.clip(e,t);var s,l,u,c,h,d,f=r||t$4.render.replay.ORDER;for(s=0,l=a.length;s<l;++s){var p=a[s].toString();for(h=this.replaysByZIndex_[p],u=0,c=f.length;u<c;++u){var _=f[u];if(void 0!==(d=h[_]))if(!o||_!=t$4.render.ReplayType.IMAGE&&_!=t$4.render.ReplayType.TEXT)d.replay(e,t,i,n);else{var m=o[p];m?m.push(d,t.slice(0)):o[p]=[d,t.slice(0)]}}}e.restore()},t$4.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_={Circle:t$4.render.canvas.PolygonReplay,Default:t$4.render.canvas.Replay,Image:t$4.render.canvas.ImageReplay,LineString:t$4.render.canvas.LineStringReplay,Polygon:t$4.render.canvas.PolygonReplay,Text:t$4.render.canvas.TextReplay},t$4.renderer={},t$4.renderer.vector={},t$4.renderer.vector.defaultOrder=function(e,t){return t$4.getUid(e)-t$4.getUid(t)},t$4.renderer.vector.getSquaredTolerance=function(e,t){var i=t$4.renderer.vector.getTolerance(e,t);return i*i},t$4.renderer.vector.getTolerance=function(e,t){return t$4.SIMPLIFY_TOLERANCE*e/t},t$4.renderer.vector.renderCircleGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var a=e.getReplay(i.getZIndex(),t$4.render.ReplayType.CIRCLE);a.setFillStrokeStyle(r,o),a.drawCircle(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$4.renderer.vector.renderFeature=function(e,t,i,n,r,o){var a,s,l=!1;return(a=i.getImage())&&((s=a.getImageState())==t$4.ImageState.LOADED||s==t$4.ImageState.ERROR?a.unlistenImageChange(r,o):(s==t$4.ImageState.IDLE&&a.load(),s=a.getImageState(),a.listenImageChange(r,o),l=!0)),t$4.renderer.vector.renderFeature_(e,t,i,n),l},t$4.renderer.vector.renderFeature_=function(e,t,i,n){var r=i.getGeometryFunction()(t);if(r){var o=r.getSimplifiedGeometry(n);if(i.getRenderer())t$4.renderer.vector.renderGeometry_(e,o,i,t);else(0,t$4.renderer.vector.GEOMETRY_RENDERERS_[o.getType()])(e,o,i,t)}},t$4.renderer.vector.renderGeometry_=function(e,t,i,n){if(t.getType()!=t$4.geom.GeometryType.GEOMETRY_COLLECTION)e.getReplay(i.getZIndex(),t$4.render.ReplayType.DEFAULT).drawCustom(t,n,i.getRenderer());else for(var r=t.getGeometries(),o=0,a=r.length;o<a;++o)t$4.renderer.vector.renderGeometry_(e,r[o],i,n)},t$4.renderer.vector.renderGeometryCollectionGeometry_=function(e,t,i,n){var r,o,a=t.getGeometriesArray();for(r=0,o=a.length;r<o;++r){(0,t$4.renderer.vector.GEOMETRY_RENDERERS_[a[r].getType()])(e,a[r],i,n)}},t$4.renderer.vector.renderLineStringGeometry_=function(e,t,i,n){var r=i.getStroke();if(r){var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.LINE_STRING);o.setFillStrokeStyle(null,r),o.drawLineString(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!1)),s.drawText(t,n)}},t$4.renderer.vector.renderMultiLineStringGeometry_=function(e,t,i,n){var r=i.getStroke();if(r){var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.LINE_STRING);o.setFillStrokeStyle(null,r),o.drawMultiLineString(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!1)),s.drawText(t,n)}},t$4.renderer.vector.renderMultiPolygonGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(o||r){var a=e.getReplay(i.getZIndex(),t$4.render.ReplayType.POLYGON);a.setFillStrokeStyle(r,o),a.drawMultiPolygon(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$4.renderer.vector.renderPointGeometry_=function(e,t,i,n){var r=i.getImage();if(r){if(r.getImageState()!=t$4.ImageState.LOADED)return;var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.IMAGE);o.setImageStyle(r,e.addDeclutter(!1)),o.drawPoint(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!!r)),s.drawText(t,n)}},t$4.renderer.vector.renderMultiPointGeometry_=function(e,t,i,n){var r=i.getImage();if(r){if(r.getImageState()!=t$4.ImageState.LOADED)return;var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.IMAGE);o.setImageStyle(r,e.addDeclutter(!1)),o.drawMultiPoint(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!!r)),s.drawText(t,n)}},t$4.renderer.vector.renderPolygonGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var a=e.getReplay(i.getZIndex(),t$4.render.ReplayType.POLYGON);a.setFillStrokeStyle(r,o),a.drawPolygon(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$4.renderer.vector.GEOMETRY_RENDERERS_={Point:t$4.renderer.vector.renderPointGeometry_,LineString:t$4.renderer.vector.renderLineStringGeometry_,Polygon:t$4.renderer.vector.renderPolygonGeometry_,MultiPoint:t$4.renderer.vector.renderMultiPointGeometry_,MultiLineString:t$4.renderer.vector.renderMultiLineStringGeometry_,MultiPolygon:t$4.renderer.vector.renderMultiPolygonGeometry_,GeometryCollection:t$4.renderer.vector.renderGeometryCollectionGeometry_,Circle:t$4.renderer.vector.renderCircleGeometry_},Object.defineProperties(r$a.prototype,{clock:{get:function(){return this._clock}}}),r$a.prototype.synchronize=function(){var e=this._clock;this.systemTime=a$15.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate},r$a.prototype.isDestroyed=function(){return!1},r$a.prototype.destroy=function(){this._eventHelper.removeAll(),i$10(this)};var o$4={};function c$5(e,t,i,n,r){return i.call(n,e[t]),ce$1.getObservable(e,t).subscribe(i,n,r)}function r$9(e,t){if(!e$2b(e))throw new t$16("command is required.");this._command=e,t=u$_(t,u$_.EMPTY_OBJECT),this.toggled=u$_(t.toggled,!1),this.tooltip=u$_(t.tooltip,""),ce$1.track(this,["toggled","tooltip"])}o$4.createCheckbox=function(e,t,i){o$1q.typeOf.string("labelText",e),o$1q.typeOf.string("checkedBinding",t);var n=document.createElement("div"),r=document.createElement("label"),o=document.createElement("input");o.type="checkbox";var a="checked: "+t;return e$2b(i)&&(a+=", enable: "+i),o.setAttribute("data-bind",a),r.appendChild(o),r.appendChild(document.createTextNode(e)),n.appendChild(r),n},o$4.createSection=function(e,t,i,n){o$1q.defined("panel",e),o$1q.typeOf.string("headerText",t),o$1q.typeOf.string("sectionVisibleBinding",i),o$1q.typeOf.string("toggleSectionVisibilityBinding",n);var r=document.createElement("div");r.className="supermap3d-cesiumInspector-section",r.setAttribute("data-bind",'css: { "supermap3d-cesiumInspector-section-collapsed": !'+i+" }"),e.appendChild(r);var o=document.createElement("h3");o.className="supermap3d-cesiumInspector-sectionHeader",o.appendChild(document.createTextNode(t)),o.setAttribute("data-bind","click: "+n),r.appendChild(o);var a=document.createElement("div");return a.className="supermap3d-cesiumInspector-sectionContent",r.appendChild(a),a},Object.defineProperties(r$9.prototype,{command:{get:function(){return this._command}}});var _0xa87f4e=(_0x3731f8=!0,function(e,t){var i=_0x3731f8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3731f8=!1,i}),_0x583bcd=_0xa87f4e(void 0,(function(){return _0x583bcd.toString().search("(((.+)+)+)+$").toString().constructor(_0x583bcd).search("(((.+)+)+)+$")})),_0x3731f8;function _0xb93137(e){this.clampMode=0,this.handlerDis=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.Distance,this.clampMode),this.handlerArea=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.Area,this.clampMode),this.handlerHeight=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.DVH)}_0x583bcd(),_0xb93137.prototype.calDistance=function(){this.handlerDis.measureEvt.addEventListener(function(e){var t=Number(e.distance),i=t>1e3?(t/1e3).toFixed(2)+"km":t.toFixed(2)+"m";this.handlerDis.disLabel.text=WebGLPlot.plotI18n("Distance")+":"+i}.bind(this)),this.deactiveAll(),this.handlerDis&&this.handlerDis.activate()},_0xb93137.prototype.calArea=function(){this.handlerArea.measureEvt.addEventListener(function(e){var t=Number(e.area),i=t>1e6?(t/1e6).toFixed(2)+"km²":t.toFixed(2)+"㎡";this.handlerArea.areaLabel.text=WebGLPlot.plotI18n("Area")+":"+i}.bind(this)),this.deactiveAll(),this.handlerArea&&this.handlerArea.activate()},_0xb93137.prototype.calHeight=function(){this.handlerHeight.measureEvt.addEventListener((e=>{var t=e.distance>1e3?(e.distance/1e3).toFixed(2)+"km":e.distance+"m",i=e.verticalHeight>1e3?(e.verticalHeight/1e3).toFixed(2)+"km":e.verticalHeight+"m",n=e.horizontalDistance>1e3?(e.horizontalDistance/1e3).toFixed(2)+"km":e.horizontalDistance+"m";this.handlerHeight.disLabel.text=WebGLPlot.plotI18n("SpaceDistance")+":"+t,this.handlerHeight.vLabel.text=WebGLPlot.plotI18n("VerticalHeight")+":"+i,this.handlerHeight.hLabel.text=WebGLPlot.plotI18n("LevelDistance")+":"+n})),this.handlerHeight.clear(),this.deactiveAll(),this.handlerHeight&&this.handlerHeight.activate()},_0xb93137.prototype.clear=function(){this.deactiveAll(),this.handlerDis&&this.handlerDis.clear(),this.handlerArea&&this.handlerArea.clear(),this.handlerHeight&&this.handlerHeight.clear()},_0xb93137.prototype.deactiveAll=function(){this.handlerDis&&this.handlerDis.deactivate(),this.handlerArea&&this.handlerArea.deactivate(),this.handlerHeight&&this.handlerHeight.deactivate()};var _0x54732d=(_0x251f19=!0,function(e,t){var i=_0x251f19?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x251f19=!1,i}),_0x35bb96=_0x54732d(void 0,(function(){return _0x35bb96.toString().search("(((.+)+)+)+$").toString().constructor(_0x35bb96).search("(((.+)+)+)+$")})),_0x251f19;_0x35bb96();var _0x587d2b=null,_0xa2eedc=null;function _0x3d592b(e){this.sightline=new WebGLPlot.Sightline(e.scene),this.handlerPoint=new WebGLPlot.DrawHandler(e,WebGLPlot.DrawMode.Point),this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.scene.canvas),this.sightline.lineWidth=5,this.sightline.build(),this.num=0,this.viewer=e,_0x587d2b=this.sightline,_0xa2eedc=this.num}function _0x40d728(e){_0xa2eedc+=1;var t=_0x28b2e6(e),i="point"+_0xa2eedc;_0x587d2b.addTargetPoint({position:t,name:i})}function _0x28b2e6(e){var t=WebGLPlot.Cartographic.fromCartesian(e);return[WebGLPlot.CesiumMath.toDegrees(t.longitude),WebGLPlot.CesiumMath.toDegrees(t.latitude),t.height]}_0x3d592b.prototype.activate=function(){var e=!0;if(this.sightline.removeAllTargetPoint(),this.handlerPoint.clear(),this.num=0,!this.handlerPoint.active){var t=null;this.handlerPoint.activate(),this.handlerPoint.drawEvt.addEventListener(function(i){var n=_0x28b2e6(i.object.position);this.sightline.viewPosition=n,e=!1,t=i}.bind(this)),this.handler.setInputAction(function(i){e||t||_0x40d728(this.viewer.scene.pickPosition(i.position));t=null}.bind(this),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction(function(t){if(!e){var i=this.viewer.scene.pickPosition(t.endPosition);if(this.num>0){this.sightline.removeAllTargetPoint("point0");var n=Cartesian2toDegress(i);sightline.addTargetPoint({position:n,name:"point0"})}}}.bind(this),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(){e||(this.viewer.enableCursorStyle=!0,this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK))}.bind(this),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}},_0x3d592b.prototype.clear=function(){this.handlerPoint.deactivate(),this.handlerPoint.clear(),this.num=0,this.viewer.entities.removeAll(),this.sightline.removeAllTargetPoint()},_0x3d592b.prototype.deactivate=function(){this.handlerPoint.deactivate()};var _0x2d4119=(_0x37b7b7=!0,function(e,t){var i=_0x37b7b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37b7b7=!1,i}),_0x499d96=_0x2d4119(void 0,(function(){return _0x499d96.toString().search("(((.+)+)+)+$").toString().constructor(_0x499d96).search("(((.+)+)+)+$")})),_0x37b7b7;function _0x2178ea(e){(WebGLPlot.ViewShed3D||WebGLPlot.DrawHandler)&&(this.pointHandler=new WebGLPlot.DrawHandler(e,WebGLPlot.DrawMode.Point),this.viewshed3D=new WebGLPlot.ViewShed3D(e.scene)),this.viewer=e,this.handler=new WebGLPlot.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.viewer.scene.ViewFlag=!0,this.viewPosition=null}_0x499d96(),_0x2178ea.prototype.activate=function(){this.pointHandler.active||(this.viewshed3D.distance=.1,this.viewer.scene.ViewFlag=!0,this.pointHandler.activate(),this.handler.setInputAction(function(e){if(!this.viewer.scene.ViewFlag){var t=e.endPosition,i=this.viewer.scene.pickPosition(t);if(WebGLPlot.Cartesian3.distance(this.viewPosition,i)>0){var n=WebGLPlot.Cartographic.fromCartesian(i),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=n.height;this.viewshed3D.setDistDirByPoint([r,o,a])}}}.bind(this),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(e){this.viewer.scene.ViewFlag=!0}.bind(this),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this.handler.setInputAction(function(e){!this.viewer.scene.ViewFlag&&.1!==this.viewshed3D.distance&&(this.viewer.scene.ViewFlag=!0)}.bind(this),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.pointHandler.drawEvt.addEventListener(function(e){var t=e.object,i=t.position;this.viewPosition=i;var n=WebGLPlot.Cartographic.fromCartesian(i),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=n.height+1.8;t.position=WebGLPlot.Cartesian3.fromDegrees(r,o,a),this.viewer.scene.ViewFlag&&(this.viewshed3D.viewPosition=[r,o,a],this.viewshed3D.build(),this.viewer.scene.ViewFlag=!1)}.bind(this)))},_0x2178ea.prototype.clear=function(){this.viewer.entities.removeAll(),this.viewshed3D.distance=.1,this.viewer.scene.ViewFlag=!0,this.pointHandler.clear()},_0x2178ea.prototype.deactivate=function(){this.pointHandler.deactivate(),this.viewer.scene.ViewFlag=!0};var _0x364c4d=(_0x6852f8=!0,function(e,t){var i=_0x6852f8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6852f8=!1,i}),_0x268409=_0x364c4d(void 0,(function(){return _0x268409.toString().search("(((.+)+)+)+$").toString().constructor(_0x268409).search("(((.+)+)+)+$")})),_0x6852f8;function _0x56988a(e){if(!WebGLPlot.DrawHandler&&!WebGLPlot.SlopeSetting)throw new WebGLPlot.DeveloperError("SuperMap_DrawHandler SlopeSetting is required.");this.viewer=e,this.handlerPolygon=new WebGLPlot.DrawHandler(this.viewer,WebGLPlot.DrawMode.Polygon,1),this.slope=new WebGLPlot.SlopeSetting;var t=_0x3f4cb8(this.viewer._element);this.handlerPolygon.activeEvt.addEventListener(function(e){1==e?(this.viewer.enableCursorStyle=!1,this.viewer._element.style.cursor="crosshair"):(this.viewer.enableCursorStyle=!0,this.viewer._element.style.cursor="")}.bind(this)),this.handlerPolygon.movingEvt.addEventListener((function(e){e.x<200&&e.y<150&&t.setVisible(!1)})),this.handlerPolygon.drawEvt.addEventListener(function(e){if(e.object.positions){var i=[].concat(e.object.positions);t.setVisible(!1);for(var n=[],r=0,o=i.length;r<o;r++){var a=WebGLPlot.Cartographic.fromCartesian(i[r]),s=WebGLPlot.CesiumMath.toDegrees(a.longitude),l=WebGLPlot.CesiumMath.toDegrees(a.latitude),u=a.height;-1==n.indexOf(s)&&-1==n.indexOf(l)&&(n.push(s),n.push(l),n.push(u))}this.slope.CoverageArea=n;var c=WebGLPlot.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION;this.viewer.scene.globe.SlopeSetting={slopeSetting:this.slope,analysisMode:c},this.handlerPolygon.polygon.show=!1,this.handlerPolygon.polyline.show=!0,this.handlerPolygon.deactivate(),this.handlerPolygon.activate()}else this.clear()}.bind(this))}function _0x3f4cb8(e){var t=function(e){var t=document.createElement("DIV");t.className="twipsy right";var i=document.createElement("DIV");i.className="twipsy-arrow",t.appendChild(i);var n=document.createElement("DIV");n.className="twipsy-inner",t.appendChild(n),this._div=t,this._title=n,this.message="",e.appendChild(t);var r=this;t.onmousemove=function(e){r.showAt({x:e.clientX,y:e.clientY},r.message)}};return t.prototype.setVisible=function(e){this._div.style.display=e?"block":"none"},t.prototype.showAt=function(e,t){e&&t&&(this.setVisible(!0),this._title.innerHTML=t,this._div.style.left=e.x+10+"px",this._div.style.top=e.y-this._div.clientHeight/2+"px",this.message=t)},new t(e)}_0x268409(),_0x56988a.prototype.activate=function(){if(this.slope){this.slope.DisplayMode=WebGLPlot.SlopeSettingEnum.DisplayMode.FACE_AND_ARROW,this.slope.MaxVisibleValue=78,this.slope.MinVisibleValue=0;var e=new WebGLPlot.ColorTable;e.insert(80,new WebGLPlot.Color(1,0,0)),e.insert(50,new WebGLPlot.Color(221/255,224/255,7/255)),e.insert(30,new WebGLPlot.Color(20/255,187/255,18/255)),e.insert(20,new WebGLPlot.Color(0,161/255,1)),e.insert(0,new WebGLPlot.Color(9/255,9/255,1)),this.slope.ColorTable=e,this.slope.Opacity=.5,this.handlerPolygon.activate()}},_0x56988a.prototype.deactivate=function(){this.handlerPolygon.deactivate()},_0x56988a.prototype.clear=function(){!this.slope||(this.slope.CoverageArea=[],null!=this.viewer.scene.globe.SlopeSetting.slopeSetting&&(this.viewer.scene.globe.SlopeSetting={slopeSetting:this.slope,analysisMode:WebGLPlot.HypsometricSettingEnum.AnalysisRegionMode.ARM_NONE},this.handlerPolygon.clear(),this.handlerPolygon.deactivate()))};var _0x1d1ba6=(_0xe6c09c=!0,function(e,t){var i=_0xe6c09c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe6c09c=!1,i}),_0x19a35e=_0x1d1ba6(void 0,(function(){return _0x19a35e.toString().search("(((.+)+)+)+$").toString().constructor(_0x19a35e).search("(((.+)+)+)+$")})),_0xe6c09c;function _0x9a5fe0(e){null!=e&&(this.measurementTool=new _0xb93137(e),this.sightLineTool=new _0x3d592b(e),this.viewshedTool=new _0x2178ea(e),this.terrainSlopeTool=new _0x56988a(e))}_0x19a35e(),_0x9a5fe0.prototype.activeDisMeasure=function(){this.measurementTool.calDistance()},_0x9a5fe0.prototype.activeAreaMeasure=function(){this.measurementTool.calArea()},_0x9a5fe0.prototype.activeHeightMeasure=function(){this.measurementTool.calHeight()},_0x9a5fe0.prototype.activeSightLine=function(){this.sightLineTool.activate()},_0x9a5fe0.prototype.activeViewShed=function(){this.viewshedTool.activate()},_0x9a5fe0.prototype.activeTerrainSlope=function(){this.terrainSlopeTool.activate()},_0x9a5fe0.prototype.clear=function(){this.measurementTool.clear(),this.sightLineTool.clear(),this.viewshedTool.clear(),this.terrainSlopeTool.clear()},_0x9a5fe0.prototype.deactivate=function(){this.measurementTool.deactiveAll(),this.sightLineTool.deactivate(),this.viewshedTool.deactivate(),this.terrainSlopeTool.deactivate()};var _0x1445f0=(_0x4549f1=!0,function(e,t){var i=_0x4549f1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4549f1=!1,i}),_0x50ac08=_0x1445f0(void 0,(function(){return _0x50ac08.toString().search("(((.+)+)+)+$").toString().constructor(_0x50ac08).search("(((.+)+)+)+$")})),_0x4549f1;function _0x202b10(){this._code=_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,this._symbolName=WebGLPlot.plotI18n("polygon"),this._minEditPts=3,this._maxEditPts=9999}_0x50ac08(),_0x202b10.prototype.getMinEditPts=function(){return this._minEditPts},_0x202b10.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x202b10.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;for(var i=[],n=0;n<t.length;++n)i.push(t[n].clone());return i.push(t[0].clone()),new _0x526be0({symbolType:this._symbolType,points:i})},_0x202b10.prototype.getSymbolName=function(){return this._symbolName};var _0x16bb63=(_0x4239c3=!0,function(e,t){var i=_0x4239c3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4239c3=!1,i}),_0x575a36=_0x16bb63(void 0,(function(){return _0x575a36.toString().search("(((.+)+)+)+$").toString().constructor(_0x575a36).search("(((.+)+)+)+$")})),_0x4239c3;function _0x3f02c6(){this._code=_0x18bc2f.SYMBOL_BRACE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_BRACE,this._symbolName=WebGLPlot.plotI18n("brace"),this._minEditPts=2,this._maxEditPts=2,this._scaleValues=[],this._scaleValues.push(.1),this._scaleValues.push(.1),this._scalePoints=[]}_0x575a36(),_0x3f02c6.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x3f02c6.prototype.getMinEditPts=function(){return this._minEditPts},_0x3f02c6.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2===t.length&&_0x2d6822.isSamePt(t[0],t[1]))return null;for(var i=[],n=0;n<t.length;++n)i.push(t[n].clone());i.length;var r=i[0],o=i[1],a=_0x2d6822.distance(r,o);this._scaleValues.length<2&&(this._scaleValues=[],this._scaleValues.push(.1),this._scaleValues.push(.1));var s=this._scaleValues[0],l=this._scaleValues[1],u=new WebGLPlot.Cartesian3(a*s,a*s,0),c=new WebGLPlot.Cartesian3(a*(.5-l/2),0,0),h=new WebGLPlot.Cartesian3(.5*a,-a*l,0),d=new WebGLPlot.Cartesian3(a*(.5+l/2),0,0),f=new WebGLPlot.Cartesian3(a*(1-s),a*s,0),p=[],_=180*Math.PI/180,m=270*Math.PI/180,g=3*Math.PI/180;for(n=_;n<=m;n+=g){var x=new WebGLPlot.Cartesian3(u.x+a*s,u.y,0);x=_0x2d6822.rotateAngle(u,n,x),p.push(x)}p.push(c),p.push(h),p.push(d),_=270*Math.PI/180,m=360*Math.PI/180;for(n=_;n<=m;n+=g){x=new WebGLPlot.Cartesian3(f.x+a*s,f.y,0);x=_0x2d6822.rotateAngle(f,n,x),p.push(x)}for(var v=_0x2d6822.radian(r,o),y=[],$=0;$<p.length;$++){var b=new WebGLPlot.Cartesian3(p[$].x+r.x,p[$].y+r.y,0);b=_0x2d6822.rotateAngle(r,v,b),y.push(b)}var T=new _0x526be0({points:y,symbolType:_0x18bc2f.SYMBOL_POLYLINE}),C=new WebGLPlot.Cartesian3(a*s,0,0),S=new WebGLPlot.Cartesian3(C.x+r.x,C.y+r.y,0);S=_0x2d6822.rotateAngle(r,v,S),this._scalePoints.push(S);var w=new WebGLPlot.Cartesian3(h.x+r.x,h.y+r.y,0);return w=_0x2d6822.rotateAngle(r,v,w),this._scalePoints.push(w),T},_0x3f02c6.prototype.modifyScalePoint=function(e,t,i){var n=e.points,r=_0x2d6822.distance(n[0],n[1]);if(0===t){var o=_0x2d6822.distance(n[0],i)/r;o>0&&o<.4&&(this._scaleValues[0]=o)}else if(1===t){var a=new WebGLPlot.Cartesian3((n[0].x+n[1].x)/2,(n[0].y+n[1].y)/2,0);new WebGLPlot.Cartesian3(i.x,a.y,0);var s=_0x2d6822.distance(i,a)/r;0<s&&.2>s&&(this._scaleValues[1]=s)}return this.calculateParts({points:n})},_0x3f02c6.prototype.getSymbolName=function(){return this._symbolName};var _0x26d173=(_0x2be1da=!0,function(e,t){var i=_0x2be1da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2be1da=!1,i}),_0x31902d=_0x26d173(void 0,(function(){return _0x31902d.toString().search("(((.+)+)+)+$").toString().constructor(_0x31902d).search("(((.+)+)+)+$")})),_0x2be1da;function _0xc18e25(){this._code=_0x18bc2f.SYMBOL_CONCENTRICCIRCLE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_CONCENTRICCIRCLE,this._symbolName=WebGLPlot.plotI18n("concentricCircle"),this._startAngle=0,this._endAngle=360,this._minEditPts=3,this._maxEditPts=3}_0x31902d(),_0xc18e25.prototype.getMaxEditPts=function(){return this._maxEditPts},_0xc18e25.prototype.getMinEditPts=function(){return this._minEditPts},_0xc18e25.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;for(var t=[],i=0;i<e.points.length;++i)t.push(e.points[i].clone());if(t.length<this._minEditPts||2===t.length&&_0x2d6822.isSamePt(t[0],t[1]))return null;for(2===t.length&&t.push(t[1].clone());this._startAngle>360;)this._startAngle-=360;for(;this._startAngle<0;)this._startAngle+=360;for(;this._endAngle>360;)this._endAngle-=360;for(;this._endAngle<0;)this._endAngle+=360;for(;this._endAngle<this._startAngle;)this._endAngle+=360;for(var n=_0x2d6822.distance(t[0],t[1]),r=_0x2d6822.distance(t[0],t[2]),o=[],a=[],s=[],l=Math.PI/180,u=(this._endAngle-this._startAngle)/72,c=this._startAngle;c<this._endAngle+u/2;c+=u){var h=t[0].x+n*Math.cos(c*l),d=t[0].y+n*Math.sin(c*l),f=t[0].x+r*Math.cos(c*l),p=t[0].y+r*Math.sin(c*l);o.push(new WebGLPlot.Cartesian3(h,d,0)),a.push(new WebGLPlot.Cartesian3(f,p,0))}o.push(o[0].clone()),a.push(a[0].clone());var _=new _0x526be0({points:o,symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON});s.push(_);var m=new _0x526be0({points:a,symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON});return s.push(m),s},_0xc18e25.prototype.getSymbolName=function(){return this._symbolName};var _0x3ec0bf=(_0x1b716c=!0,function(e,t){var i=_0x1b716c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b716c=!1,i}),_0x1071d0=_0x3ec0bf(void 0,(function(){return _0x1071d0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1071d0).search("(((.+)+)+)+$")})),_0x1b716c;function _0x33d4e9(){this._code=_0x18bc2f.SYMBOL_CURVEEIGHT,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_CURVEEIGHT,this._symbolName=WebGLPlot.plotI18n("curveEight"),this._minEditPts=2,this._maxEditPts=3}_0x1071d0(),_0x33d4e9.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x33d4e9.prototype.getMinEditPts=function(){return this._minEditPts},_0x33d4e9.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2==t.length&&_0x2d6822.isSamePt(t[0],t[1]))return null;var i,n,r,o,a=[];if(2===t.length){var s=t[0].clone(),l=t[1].clone(),u=_0x2d6822.distance(s,l)/2,c=180*_0x2d6822.radian(s,l)/Math.PI,h=new WebGLPlot.Cartesian3((s.x+l.x)/2,(s.y+l.y)/2,0);i=_0x2d6822.circlePoint(h,u,u,c+90);a=[];var d=new _0x526be0({points:r=_0x2d6822.calcCirclePts(u,i),symbolType:_0x18bc2f.SYMBOL_CIRCLE});a.push(d),n=_0x2d6822.circlePoint(h,3*u,3*u,c+90);var f=new _0x526be0({points:o=_0x2d6822.calcCirclePts(u,n),symbolType:_0x18bc2f.SYMBOL_CIRCLE});a.push(f)}else{s=t[0],l=t[1];var p=t[2];c=0;c=_0x2d6822.isRight(p,s,l)?180*_0x2d6822.radian(l,s)/Math.PI+90:180*_0x2d6822.radian(s,l)/Math.PI+90;u=_0x2d6822.distance(s,l)/2,h=new WebGLPlot.Cartesian3((s.x+l.x)/2,(s.y+l.y)/2,0);i=_0x2d6822.circlePoint(h,u,u,c);var _=_0x2d6822.plumbLineLen(p,s,l);if(_<=4*u)n=_0x2d6822.circlePoint(h,3*u,3*u,c),r=_0x2d6822.calcCirclePts(u,i),a.push(new _0x526be0({points:r,symbolType:_0x18bc2f.SYMBOL_SYMBOL_ARBITRARYPOLYGON})),o=_0x2d6822.calcCirclePts(u,n),a.push(new _0x526be0({points:o,symbolType:_0x18bc2f.SYMBOL_SYMBOL_ARBITRARYPOLYGON}));else{n=_0x2d6822.circlePoint(h,_-u,_-u,c);for(var m=180*Math.acos(u/(_-2*u))/Math.PI,g=c-m,x=c-180+m,v=c-180-m+360,y=[],$=c+m-360;$<=g;$+=4){var b=_0x2d6822.circlePoint(i,u,u,$);y.push(b)}var T=_0x2d6822.circlePoint(i,u,u,g);y.push(T);var C=[];for($=x;$<v;$+=4){b=_0x2d6822.circlePoint(n,u,u,$);C.push(b)}var S=_0x2d6822.circlePoint(n,u,u,v);C.push(S);var w=[];w=w.concat(y);for($=C.length-1;$>=0;$--)w.push(C[$]);w.push(w[0].clone()),a.push(new _0x526be0({points:w,symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON}))}}return a},_0x33d4e9.prototype.getSymbolName=function(){return this._symbolName};var _0x17eb78=(_0x2a8509=!0,function(e,t){var i=_0x2a8509?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a8509=!1,i}),_0xb70f84=_0x17eb78(void 0,(function(){return _0xb70f84.toString().search("(((.+)+)+)+$").toString().constructor(_0xb70f84).search("(((.+)+)+)+$")})),_0x2a8509;function _0xab1d32(){this._code=_0x18bc2f.SYMBOL_KIDNEY,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_KIDNEY,this._symbolName=WebGLPlot.plotI18n("kidney"),this._minEditPts=2,this._maxEditPts=3}_0xb70f84(),_0xab1d32.prototype.getMaxEditPts=function(){return this._maxEditPts},_0xab1d32.prototype.getMinEditPts=function(){return this._minEditPts},_0xab1d32.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;return 2==t.length&&_0x2d6822.isSamePt(t[0],t[1])||t.length<this._minEditPts?null:new _0x526be0({points:_0x2d6822.generateKidneyShapePts(t),symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON})},_0xab1d32.prototype.getSymbolName=function(){return this._symbolName};var _0x2953e3=(_0x4bb7a5=!0,function(e,t){var i=_0x4bb7a5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4bb7a5=!1,i}),_0x661f53=_0x2953e3(void 0,(function(){return _0x661f53.toString().search("(((.+)+)+)+$").toString().constructor(_0x661f53).search("(((.+)+)+)+$")})),_0x4bb7a5;function _0x20f603(){this._code=_0x18bc2f.SYMBOL_PIE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_PIE,this._symbolName=WebGLPlot.plotI18n("sector"),this._maxEditPts=3,this._minEditPts=3}_0x661f53(),_0x20f603.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i,n=_0x2d6822.innerAngle(t[0],t[1],t[2]),r=_0x2d6822.distance(t[0],t[1]),o=_0x2d6822.radian(t[0],t[1]),a=_0x2d6822.radian(t[0],t[2]),s=[];return s.push(t[0]),(s=s.concat(_0x2d6822.generateArcSpatialData(t[0],r,r,n,o,a))).push(t[0]),0!==s.length&&(i=new _0x526be0({symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,points:s})),i},_0x20f603.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x20f603.prototype.getMinEditPts=function(){return this._minEditPts},_0x20f603.prototype.getSymbolName=function(){return this._symbolName};var _0x794b24=(_0x40eb33=!0,function(e,t){var i=_0x40eb33?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40eb33=!1,i}),_0xab1b36=_0x794b24(void 0,(function(){return _0xab1b36.toString().search("(((.+)+)+)+$").toString().constructor(_0xab1b36).search("(((.+)+)+)+$")})),_0x40eb33;function _0x5178a6(){this._code=_0x18bc2f.SYMBOL_POLYBEZIERCLOSED,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_POLYBEZIERCLOSED,this._symbolName=WebGLPlot.plotI18n("closedBesselCurve"),this._minEditPts=3,this._maxEditPts=9999}_0xab1b36(),_0x5178a6.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points,i=t.length;if(2==i&&_0x2d6822.isSamePt(t[0],t[1])||i<this._minEditPts)return null;for(var n=[],r=0;r<i;++r)n.push(t[r].clone());n.push(t[0].clone());var o=_0x2d6822.generateBezierCtrlPts(n),a=_0x2d6822.generateBezierPointsWithCtrlPts(o);return new _0x526be0({points:a=_0x2d6822.clearNextSamePts(a),symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON})},_0x5178a6.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5178a6.prototype.getMinEditPts=function(){return this._minEditPts},_0x5178a6.prototype.getSymbolName=function(){return this._symbolName};var _0x2cf3c4=(_0x17f683=!0,function(e,t){var i=_0x17f683?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17f683=!1,i}),_0x34001e=_0x2cf3c4(void 0,(function(){return _0x34001e.toString().search("(((.+)+)+)+$").toString().constructor(_0x34001e).search("(((.+)+)+)+$")})),_0x17f683;function _0x43c7a1(){this._code=_0x18bc2f.SYMBOL_POLYLINE,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_POLYLINE,this._symbolName=WebGLPlot.plotI18n("polyLine"),this._minEditPts=2,this._maxEditPts=9999}_0x34001e(),_0x43c7a1.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;return null===t||t.length<this._minEditPts||t.length<this._minEditPts?null:new _0x526be0({symbolType:this._symbolType,points:t})},_0x43c7a1.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x43c7a1.prototype.getMinEditPts=function(){return this._minEditPts},_0x43c7a1.prototype.getSymbolName=function(){return this._symbolName};var _0x54c94d=(_0x35ff7d=!0,function(e,t){var i=_0x35ff7d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x35ff7d=!1,i}),_0x1637b9=_0x54c94d(void 0,(function(){return _0x1637b9.toString().search("(((.+)+)+)+$").toString().constructor(_0x1637b9).search("(((.+)+)+)+$")})),_0x35ff7d;function _0x3966c2(){this._code=_0x18bc2f.SYMBOL_REGULARPOLYGON,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_REGULARPOLYGON,this._symbolName=WebGLPlot.plotI18n("regularPolygon"),this._minEditPts=2,this._maxEditPts=9999}_0x1637b9(),_0x3966c2.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(null===t||t.length<this._minEditPts)return null;var i=[],n=t.length,r=2*Math.PI/(n+1),o=Math.PI/2,a=_0x2d6822.distance(t[0],t[n-1]),s=new WebGLPlot.Cartesian3(t[0].x+a,t[0].y,t[0].z).clone();s=_0x2d6822.rotateAngle(t[0],o,s),i.push(s.clone());for(var l=1;l<n+1;++l)s=_0x2d6822.rotateAngle(t[0],r,s),i.push(s.clone());return i.push(i[0]),new _0x526be0({symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,points:i})},_0x3966c2.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x3966c2.prototype.getMinEditPts=function(){return this._minEditPts},_0x3966c2.prototype.getSymbolName=function(){return this._symbolName};var _0x50e520=(_0xcb67d0=!0,function(e,t){var i=_0xcb67d0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xcb67d0=!1,i}),_0x571ce3=_0x50e520(void 0,(function(){return _0x571ce3.toString().search("(((.+)+)+)+$").toString().constructor(_0x571ce3).search("(((.+)+)+)+$")})),_0xcb67d0;function _0x575907(){this._code=_0x18bc2f.SYMBOL_RUNWAY,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_RUNWAY,this._symbolName=WebGLPlot.plotI18n("runway"),this._scalePoints=[],this._scaleValues=[],this._scaleValues.push(.2),this._minEditPts=2,this._maxEditPts=2}_0x571ce3(),_0x575907.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x575907.prototype.getMinEditPts=function(){return this._minEditPts},_0x575907.prototype.getSymbolName=function(){return this._symbolName},_0x575907.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2===t.length&&_0x2d6822.isSamePt(t[0],t[1]))return null;for(var i=t[0].clone(),n=t[1].clone(),r=_0x2d6822.distance(i,n)*this._scaleValues[0],o=_0x2d6822.parallel(t,r/2),a=_0x2d6822.parallel(t,-r/2),s=180*_0x2d6822.radian(i,n)/Math.PI,l=[],u=s+90;u<=s+270;u+=10){var c=_0x2d6822.circlePoint(i,r/2,r/2,u);l.push(c)}for(var h=[],d=s-90;d<=s+90;d+=10){c=_0x2d6822.circlePoint(n,r/2,r/2,d);h.push(c)}var f=[];f=(f=(f=(f=f.concat(l)).concat(a)).concat(h)).concat(o);var p=new _0x526be0({points:f=_0x2d6822.clearNextSamePts(f),symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON}),_=new WebGLPlot.Cartesian3(l[0].x,l[0].y,l[0].z);return this._scalePoints.push(_),p},_0x575907.prototype.modifyScalePoint=function(e,t,i){if(0==t){var n=_0x2d6822.distance(i,e.points[0]),r=_0x2d6822.distance(e.points[0],e.points[1]);this._scalePoints[0]=2*n/r}};var _0x321a03=(_0x53a191=!0,function(e,t){var i=_0x53a191?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53a191=!1,i}),_0x3f11a3=_0x321a03(void 0,(function(){return _0x3f11a3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f11a3).search("(((.+)+)+)+$")})),_0x53a191;function _0x1a7236(){this._code=_0x18bc2f.SYMBOL_TRAPEZOID,this._libID=0,this._symbolType=_0x18bc2f.SYMBOL_TRAPEZOID,this._symbolName=WebGLPlot.plotI18n("trapezoid"),this._minEditPts=3,this._maxEditPts=3}_0x3f11a3(),_0x1a7236.prototype.calculateParts=function(e){if(!defined(e)||!defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;t.length;var i=[],n=t[0].clone(),r=t[1].clone(),o=t[2].clone(),a=new WebGLPlot.Cartesian3(0,0,0);_0x2d6822.getTrapezoidPoints(1,o,r,n,a),i.push(n),i.push(r),i.push(o),i.push(a);var s,l=_0x2d6822.intersectLines(n,r,o,a),u=l.intersectPoint;return l.isIntersectLines&&(u.x>n.x&&u.x<r.x||u.y>n.y&&u.y<r.y||u.x<n.x&&u.x>r.x||u.y<n.y&&u.y>r.y)&&(i[0]=a,i[3]=n),4===i.length&&(i.push(i[0].clone()),s=new _0x526be0({symbolType:_0x18bc2f.SYMBOL_ARBITRARYPOLYGON,points:i})),s},_0x1a7236.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x1a7236.prototype.getMinEditPts=function(){return this._minEditPts},_0x1a7236.prototype.getSymbolName=function(){return this._symbolName};var _0x5bb3f2=(_0x58d644=!0,function(e,t){var i=_0x58d644?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x58d644=!1,i}),_0x220936=_0x5bb3f2(void 0,(function(){return _0x220936.toString().search("(((.+)+)+)+$").toString().constructor(_0x220936).search("(((.+)+)+)+$")})),_0x58d644;function _0x2004fc(){}_0x220936(),_0x2004fc.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%2525")).replace(/&/g,"%26");case Array:for(var i=[],n=0,r=t.length;n<r;n++)i.push(this.toJSON(t[n]));return"["+i.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){for(i=[],n=0,r=t.length;n<r;n++)i.push(this.toJSON(t[n]));return"["+i.join(",")+"]"}i=[];for(var o in t)"function"!=typeof t[o]&&"CLASS_NAME"!==o&&"parent"!==o&&i.push('"'+o+'":'+this.toJSON(t[o]));return i.length>0?"{"+i.join(",")+"}":"{}"}return t.toString()}},_0x2004fc.geoGraphicObjectToSmlFeature=function(e,t){return WebGLPlot.defined(e)?e.getSymbolData():null},_0x2004fc.smlFeatureToGeoGraphicObject=function(e,t){t.geoJsonToGeoGraphicObject(e)};var _0x21dba7=(_0x12c4c3=!0,function(e,t){var i=_0x12c4c3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12c4c3=!1,i}),_0x25c20c=_0x21dba7(void 0,(function(){return _0x25c20c.toString().search("(((.+)+)+)+$").toString().constructor(_0x25c20c).search("(((.+)+)+)+$")})),_0x12c4c3;function _0x3a5bf8(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.layerName=WebGLPlot.defaultValue(e.layerName,""),this.spatialAnalystUrl=WebGLPlot.defaultValue(e.spatialAnalystUrl,null),this.useCanvas2=WebGLPlot.defaultValue(e.useCanvas2,!1),this.useCanvas=WebGLPlot.defaultValue(e.useCanvas,!1),this.features=WebGLPlot.defaultValue(e.features,[])}_0x25c20c();var _0x36e36d=(_0x417ad4=!0,function(e,t){var i=_0x417ad4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x417ad4=!1,i}),_0x26b4a0=_0x36e36d(void 0,(function(){return _0x26b4a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x26b4a0).search("(((.+)+)+)+$")})),_0x417ad4;function _0x2293fb(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),WebGLPlot.Check.defined("options.url",e.url);var t=e.url,i=e.responseType,n=WebGLPlot.defaultValue(e.method,"GET"),r=e.data,o=e.headers,a=e.overrideMimeType;t=WebGLPlot.defaultValue(t,e.url);var s=WebGLPlot.defined(e.request)?e.request:new WebGLPlot.Request;return s.url=t,s.requestFunction=function(e){var l=WebGLPlot.when.defer(),u=_0x2293fb.load(WebGLPlot.defaultValue(e,t),i,n,r,o,l,a);return WebGLPlot.defined(u)&&WebGLPlot.defined(u.abort)&&(s.cancelFunction=function(){u.abort()}),l.promise},WebGLPlot.RequestScheduler.request(s)}_0x26b4a0();var _0x1a822c=/^data:(.*?)(;base64)?,(.*)$/;function _0x15d9d3(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function _0x1c6ff2(e,t){for(var i=_0x15d9d3(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return n}function _0x3eff49(e,t){t=WebGLPlot.defaultValue(t,"");var i=e[1],n=!!e[2],r=e[3];switch(t){case"":case"text":return _0x15d9d3(n,r);case"arraybuffer":return _0x1c6ff2(n,r);case"blob":var o=_0x1c6ff2(n,r);return new Blob([o],{type:i});case"document":return(new DOMParser).parseFromString(_0x15d9d3(n,r),i);case"json":return JSON.parse(_0x15d9d3(n,r));default:throw new WebGLPlot.DeveloperError("Unhandled responseType: "+t)}}_0x2293fb.load=function(e,t,i,n,r,o,a){var s=_0x1a822c.exec(e);if(null===s){var l=new XMLHttpRequest;if(WebGLPlot.TrustedServers.contains(e)&&(l.withCredentials=!0),WebGLPlot.defined(a)&&WebGLPlot.defined(l.overrideMimeType)&&l.overrideMimeType(a),l.open(i,e,!0),WebGLPlot.defined(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);WebGLPlot.defined(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,i=l.responseType;if(!WebGLPlot.defined(e)||WebGLPlot.defined(t)&&i!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===i||"document"===i)&&WebGLPlot.defined(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==i&&"text"!==i||!WebGLPlot.defined(l.responseText)?o.reject(new WebGLPlot.RuntimeError("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new WebGLPlot.RequestErrorEvent(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new WebGLPlot.RequestErrorEvent)},l.send(n),l}o.resolve(_0x3eff49(s,t))},_0x2293fb.defaultLoad=_0x2293fb.load;var _0x185da5=(_0x454349=!0,function(e,t){var i=_0x454349?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x454349=!1,i}),_0x5f4ed5=_0x185da5(void 0,(function(){return _0x5f4ed5.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f4ed5).search("(((.+)+)+)+$")})),_0x454349;function _0xdbaebe(e,t,i){return _0x2293fb({url:e,headers:t,request:i})}_0x5f4ed5();var _0x450b7f=(_0x3eedfe=!0,function(e,t){var i=_0x3eedfe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3eedfe=!1,i}),_0x10b7a0=_0x450b7f(void 0,(function(){return _0x10b7a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x10b7a0).search("(((.+)+)+)+$")})),_0x3eedfe;_0x10b7a0();var _0x2c1efb={Accept:"application/json,*/*;q=0.01"};function _0x2bb4f4(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("url is required.");WebGLPlot.defined(t)?WebGLPlot.defined(t.Accept)||((t=WebGLPlot.clone(t)).Accept=_0x2c1efb.Accept):t=_0x2c1efb;var n=_0xdbaebe(e,t,i);if(WebGLPlot.defined(n))return n.then((function(e){return JSON.parse(e)}))}var _0x278140=(_0x5b42c9=!0,function(e,t){var i=_0x5b42c9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b42c9=!1,i}),_0x5eb968=_0x278140(void 0,(function(){return _0x5eb968.toString().search("(((.+)+)+)+$").toString().constructor(_0x5eb968).search("(((.+)+)+)+$")})),_0x5b42c9;function _0x19562b(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.smlInfo=WebGLPlot.defaultValue(e.smlInfo,void 0),this.mapInfo=WebGLPlot.defaultValue(e.mapInfo,""),this.layerDatas=WebGLPlot.defaultValue(e.layerDatas,void 0)}_0x5eb968(),_0x19562b.prototype.destory=function(){this.smlInfo=null,this.mapInfo=null,this.layerDatas=null};var _0x401a25=(_0x2063ea=!0,function(e,t){var i=_0x2063ea?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2063ea=!1,i}),_0x1d25b0=_0x401a25(void 0,(function(){return _0x1d25b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d25b0).search("(((.+)+)+)+$")})),_0x2063ea;function _0x24c268(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.smlName=WebGLPlot.defaultValue(e.smlName,""),this.smlDesc=WebGLPlot.defaultValue(e.smlDesc,""),this.smlSeclevel=WebGLPlot.defaultValue(e.smlSeclevel,""),this.smlDepat=WebGLPlot.defaultValue(e.smlDepat,""),this.smlAuthor=WebGLPlot.defaultValue(e.smlAuthor,""),this.smlTime=WebGLPlot.defaultValue(e.smlTime,"")}_0x1d25b0(),_0x24c268.prototype.fromJSON=function(e){this.smlName=e.SMLName,this.smlDesc=e.SMLDesc,this.smlSeclevel=e.SMLSeclevel,this.smlDepat=e.SMLDepat,this.smlAuthor=e.SMLAuthor,this.smlTime=e.SMLTime},_0x24c268.prototype.toJSON=function(){return'{"SMLName":'+WebGLPlot.toJSON(this.smlName)+',"SMLDesc":'+WebGLPlot.toJSON(this.smlDesc)+',"SMLSeclevel":'+WebGLPlot.toJSON(this.smlSeclevel)+',"SMLDepat":'+WebGLPlot.toJSON(this.smlDepat)+',"SMLAuthor":'+WebGLPlot.toJSON(this.smlAuthor)+',"SMLTime":'+WebGLPlot.toJSON(this.smlTime)+"}"},_0x24c268.prototype.destroy=function(){this.smlName="",this.smlDesc="",this.smlAuthor="",this.smlSeclevel="",this.smlDepat="",this.smlTime=""};var _0x468ed3=(_0x4e2566=!0,function(e,t){var i=_0x4e2566?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e2566=!1,i}),_0x220aa6=_0x468ed3(void 0,(function(){return _0x220aa6.toString().search("(((.+)+)+)+$").toString().constructor(_0x220aa6).search("(((.+)+)+)+$")})),_0x4e2566;_0x220aa6();var WebGLPlot$a=window.WebGLPlot=window.WebGLPlot||{},_0x23bb64=new Map;function _0x29db2d(e){e=WebGLPlot$a.defaultValue(e,WebGLPlot$a.defaultValue.EMPTY_OBJECT),this._scene=WebGLPlot$a.defaultValue(e.scene,void 0),this._serverUrl=WebGLPlot$a.defaultValue(e.serverUrl,""),this._smlInfo=WebGLPlot$a.defaultValue(e.smlInfo,new _0x24c268),this._smlFileName=WebGLPlot$a.defaultValue(e.smlFileName,"situationMap"),this._sitData=WebGLPlot$a.defaultValue(e.sitData,new _0x19562b),this._openSmlFileCompleted=new WebGLPlot$a.Event,this._openSmlFileFailed=new WebGLPlot$a.Event,this._saveSmlFileCompleted=new WebGLPlot$a.Event,this._saveSmlFileFailed=new WebGLPlot$a.Event,this._getSmlInfosCompleted=new WebGLPlot$a.Event,this._getSmlInfosFailed=new WebGLPlot$a.Event,this._getSmlInfoCompleted=new WebGLPlot$a.Event,this._getSmlInfoFailed=new WebGLPlot$a.Event,this._deleteSmlFileCompleted=new WebGLPlot$a.Event,this._deleteSmlFileFailed=new WebGLPlot$a.Event,this._openLocalSmlFileCompleted=new WebGLPlot$a.Event,this._openLocalSmlFileFailed=new WebGLPlot$a.Event,this._addSmlFileCompleted=new WebGLPlot$a.Event,this._addSmlFileFailed=new WebGLPlot$a.Event,this._addSmlFileToLayerCompleted=new WebGLPlot$a.Event,this._addSmlFileToLayerFailed=new WebGLPlot$a.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},e.options&&e.options.serviceParams&&_0x2d6822.extend(this.options,e.options)}_0x29db2d.getInstance=function(e){let t;return e.scene&&(t=_0x23bb64.get(e.scene._plottingID)),WebGLPlot$a.defined(e)&&!WebGLPlot$a.defined(t)&&(t=new WebGLPlot$a.SitDataManager(e),_0x23bb64.set(e.scene._plottingID,t)),t},_0x29db2d.prototype.openJsonSitData=function(e,t){!WebGLPlot$a.defined(e)||null===e||((!WebGLPlot$a.defined(t)||""===t)&&(t="situationMap"),this._getCompletedInit(e,t))},_0x29db2d.prototype.openAndUploadLocalSmlFile=function(e){var t=this;this.uploadSmlFile((function(i){i.success?t.openSmlFileOnServer(i.smlFileName,e):t._openSmlFileFailed.raiseEvent()}))},_0x29db2d.prototype.openLocalSmlFile=function(){if(!window.FileReader)return;let e=document.createElement("input");e.setAttribute("type","file"),e.click(),e.onchange=function(){if(!e.files||0===e.files.length)return;let t=e.files[0].name;var i=new FileReader;i.readAsText(e.files[0]),i.onloadstart=function(e){(e.total>=5242880||e.total<=0)&&_self._openLocalSmlFileFailed.raiseEvent()},i.onerror=function(e){_self._openLocalSmlFileFailed.raiseEvent()},i.onloadend=function(){_self._openLocalSmlFileCompleted.raiseEvent()},i.onload=function(i){self._getCompletedInit(JSON.parse(i.target.result),t),e.remove()}}},_0x29db2d.prototype.addLocalSmlFile=function(e){var t=this;this.uploadSmlFile((function(i){if(!i.success)throw new WebGLPlot$a.DeveloperError("uploadSmlFile failed!!!");t.addSmlFileOnServer(i.smlFileName,e)}))},_0x29db2d.prototype.uploadSmlFile=function(e){if(!window.FileReader)return;let t=document.createElement("input");t.setAttribute("type","file"),t.click();var i=this;t.onchange=function(){if(!t.files||0===t.files.length)return;const n=t.files[0].name.split(".")[0];var r=new FileReader;r.readAsText(t.files[0]),r.onload=function(r){var o=WebGLPlot$a.smlFileService(i._serverUrl,i.options.serviceParams);if(!o)return;let a=JSON.parse(r.target.result);var s=o.editSmlFileParams;s.method="POST",s.sitData=a,s.smlFileName=n,s.isCover=!0,o.smlFileService.editSMLFile(s,(function(t){t.result.succeed&&"function"==typeof e?e({success:!0,smlFileName:n,message:"success"}):"function"==typeof e&&e({success:!1,message:"failed"})}),i),t.remove()}}},_0x29db2d.prototype.addSmlFileToLayer=function(e){var t=this;this.uploadSmlFile((function(i){i.success?t.addSmlFileToLayerOnServer(i.smlFileName,e):t._addSmlFileToLayerFailed.raiseEvent()}))},_0x29db2d.prototype.addSmlFileOnServer=function(e,t){var i=this,n=this._scene;var r=WebGLPlot$a.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?function(e){if(WebGLPlot$a.defined(e)){for(var r=e.layerDatas,o=null,a=0;a<r.length;++a)if(null!==r[a].layerName){var s=_0x2d6822.getPlotLayers(n);if(null===s)return;o=s.find(r[a].layerName),t&&!WebGLPlot$a.defined(o)&&(o=new _0x267b40(n,r[a].layerName),s.add(o)),WebGLPlot$a.defined(o)&&i._load(r[a],o)}null!==o?i._addSmlFileCompleted.raiseEvent():i._addSmlFileFailed.raiseEvent()}}(e.result):i._addSmlFileFailed.raiseEvent()}),this)}},_0x29db2d.prototype.addSmlFileToLayerOnServer=function(e,t){var i=this,n=this._scene;var r=WebGLPlot$a.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?function(e){if(WebGLPlot$a.defined(e)){var r,o=e.layerDatas,a=_0x2d6822.getPlotLayers(n);r=a.find(t),WebGLPlot$a.defined(r)||(r=new _0x267b40(n,t),a.add(r));for(var s=0;s<o.length;++s)i._load(o[s],r);i._addSmlFileToLayerCompleted.raiseEvent()}}(e.result):i._addSmlFileToLayerFailed.raiseEvent()}),this)}},_0x29db2d.prototype.downloadSmlFileUrl=function(e){return"smlFileDownload/"+e+".sml"},_0x29db2d.prototype.openSmlFileOnServer=function(e,t){var i=this;var n=WebGLPlot$a.smlFileService(this._serverUrl,this.options.serviceParams);if(n){var r=n.editSmlFileParams;r.method="GET",r.smlFileName=e,n.smlFileService.editSMLFile(r,(function(n){var r;n.result&&n.result.succeed?(r=n.result,i._getCompletedInit(r,e),"function"==typeof t&&t({success:!0,smlFileName:e,sitDataLayers:i.getPlottingLayers()})):(i._openSmlFileFailed.raiseEvent(),"function"==typeof t&&t({success:!1,message:"Open failed"}))}),this)}},_0x29db2d.prototype.deleteSmlFileOnServer=function(e){var t=this;var i={smlFileName:e},n=this.buildUrl(i);n+="?isCover=false";var r=WebGLPlot$a.EditSmlFile(n,this.options.serviceParams);if(r){var o=r.editSmlFile;o.events.on({processCompleted:function(e){t._deleteSmlFileCompleted.raiseEvent()},processFailed:function(e){t._deleteSmlFileFailed.raiseEvent()},scope:this});var a=r.editSmlFileParams;a.method="DELETE",a.smlFileName=e,o.processAsync(a)}},_0x29db2d.prototype.updateLayerData=function(e){if(WebGLPlot$a.defined(this._sitData)&&WebGLPlot$a.defined(this._sitData.layerDatas))for(var t=0;t<this._sitData.layerDatas.length;++t)if(e._name==this._sitData.layerDatas[t].layerName){for(var i=this._sitData.layerDatas[t],n=[],r=e.geoGraphicObjects,o=0;o<r.length;++o){var a,s=r[o];a=_0x2004fc.geoGraphicObjectToSmlFeature(s,s.feature),n.push(a)}i.features=n,i.isEditable=e.isEditable,i.isLocked=e.isLocked,i.isSelected=e.isSelected,i.vivibility=e.visibility}},_0x29db2d.prototype.getSmlInfos=function(e,t){var i=this;var n=e*t,r=t,o=i._serverUrl,a=o.substr(o.length-1,1);o+="/"===a?"smlInfos":"/smlInfos",o+=".json",_0x2bb4f4(o+="?start="+n+"&count="+r).then((function(e){var t;t=e,i._getSmlInfosCompleted.raiseEvent(t)}),(function(e){var t;t=e,i._getSmlInfosFailed.raiseEvent(t)}))},_0x29db2d.prototype.getSmlInfo=function(e){this._scene;var t={smlFileName:e};_0x2bb4f4(this.buildUrl(t)).then((function(e){!function(e){this._getSmlInfoCompleted.raiseEvent(e.smlInfo)}(e)}),(function(e){!function(e){this._getSmlInfoFailed.raiseEvent(null)}()}))},_0x29db2d.prototype.saveAsSmlFile=function(e){this._save(e,!0)},_0x29db2d.prototype.newSmlFile=function(){this._smlFileName="",this._smlInfo.destroy();for(var e,t=_0x2d6822.getPlotLayers(this._scene),i=0;i<t._layerQueue.length;++i)(e=t.findByIndex(i))instanceof _0x267b40&&t.remove(e._name);_0x38860f.removeAll(this._scene)},_0x29db2d.prototype._getCompletedInit=function(e,t){this._smlFileName=t,this.openSitDataFromJson(e)},_0x29db2d.prototype.openSitDataFromJson=function(e){this._smlInfo.fromJSON(e.smlInfo),e.mapInfo&&(this._sitData.mapInfo=e.mapInfo),this._sitData.layerDatas=e.layerDatas;var t=e.layerDatas,i=this._scene,n=_0x2d6822.getPlotLayers(i);if(null!==n){for(var r,o=n._layerQueue.length,a=0;a<o;){var s=n.findByIndex(a);s instanceof _0x267b40?(s._removeAll(!0),n.remove(s._name),o--):a++}for(var l=0;l<t.length;++l)r=new _0x267b40(i,t[l].layerName),n.add(r),this._load(t[l],r),void 0!==t[l].isEditable&&null!==t[l].isEditable&&(r._isEditable=t[l].isEditable),void 0!==t[l].isSelected&&null!==t[l].isSelected&&(r._isSelected=t[l].isSelected),void 0!==t[l].isLocked&&null!==t[l].isLocked&&(r.isLocked=t[l].isLocked),void 0!==t[l].visibility&&null!==t[l].visibility&&(r.visibility=t[l].visibility),WebGLPlot$a.defined(t[l]._bIsUseDepthTest)&&r.setUseDepthTest(t[l]._bIsUseDepthTest);this._openSmlFileCompleted.raiseEvent(e)}},_0x29db2d.prototype._load=function(e,t){for(var i=0,n=e.features.length;i<n;++i){var r=e.features[i];null!==r&&(r.hasOwnProperty("isEdit")||(r.isEdit=!0),_0x2004fc.smlFeatureToGeoGraphicObject(r,t))}},_0x29db2d.prototype.saveSmlFile=function(e,t){WebGLPlot$a.defined(e)||(e=this.smlFileName),WebGLPlot$a.defined(t)||(t=!0),this._save(e,t)},_0x29db2d.prototype._save=function(e,t){_0x1713d3.getInstance({scene:this._scene}).reset();var i=this;function n(e){var t,n;e?(n=e,i._saveSmlFileCompleted.raiseEvent(n)):i._saveSmlFileFailed.raiseEvent(t)}var r=i._serverUrl,o=WebGLPlot$a.smlFileService(r,this.options.serviceParams);if(o){var a=o.editSmlFileParams;a.method="POST",a.sitData=this.saveSitData(),a.smlFileName=e,a.isCover=t,o.smlFileService.editSMLFile(a,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}},_0x29db2d.prototype.saveSitData=function(){var e=this._scene,t=new _0x19562b;t.smlInfo=this._smlInfo,this._sitData.mapInfo?t.mapInfo=this._sitData.mapInfo:t.mapInfo={zoom:4,centerX:112.5,centerY:36.5},t.layerDatas=[];var i=_0x2d6822.getPlotLayers(e);if(null===i)return t;for(var n,r,o=0;o<i._layerQueue.length;++o)if((n=i.findByIndex(o))instanceof _0x267b40){(r=new _0x3a5bf8).layerName=n._name,r.spatialAnalystUrl=WebGLPlot$a.defaultValue(n.spatialAnalystUrl,null),r.useCanvas=!0,r.isEditable=n.isEditable,r.isLocked=n.isLocked,r.isSelected=n.isSelected,r.visibility=n.visibility,r._bIsUseDepthTest=n._bIsUseDepthTest;for(var a=0;a<n.geoGraphicObjects.length;++a){var s=_0x2004fc.geoGraphicObjectToSmlFeature(n.geoGraphicObjects[a]);r.features.push(s)}t.layerDatas.push(r)}return t},_0x29db2d.prototype.getPlottingLayers=function(){for(var e=[],t=this._scene,i=_0x2d6822.getPlotLayers(t),n=0;n<i._layerQueue.length;++n){var r=i.findByIndex(n);r instanceof _0x267b40&&e.push(r)}return e},_0x29db2d.prototype.buildUrl=function(e){var t=this._serverUrl,i=t.substr(t.length-1,1);t+="/"===i?"smlInfos/":"/smlInfos/";var n=e.smlFileName,r=RegExp(/./);return n.match(r)&&(n=n.split(".")[0]),t+=n+".json"},Object.defineProperties(_0x29db2d.prototype,{scene:{get:function(){return this._scene}},serverUrl:{get:function(){return this._serverUrl}},smlInfo:{get:function(){return this._smlInfo},set:function(e){e!==this._smlInfo&&(this._smlInfo=e)}},smlFileName:{get:function(){return this._smlFileName},set:function(e){e!==this._smlFileName&&(this._smlFileName=e)}},openSmlFileCompleted:{get:function(){return this._openSmlFileCompleted}},openSmlFileFailed:{get:function(){return this._openSmlFileFailed}},saveSmlFileFailed:{get:function(){return this._saveSmlFileFailed}},saveSmlFileCompleted:{get:function(){return this._saveSmlFileCompleted}},getSmlInfosCompleted:{get:function(){return this._getSmlInfosCompleted}},getSmlInfosFailed:{get:function(){return this._getSmlInfosFailed}},getSmlInfoCompleted:{get:function(){return this._getSmlInfoCompleted}},getSmlInfoFailed:{get:function(){return this._getSmlInfoFailed}},openLocalSmlFileCompleted:{get:function(){return this._openLocalSmlFileCompleted}},openLocalSmlFileFailed:{get:function(){return this._openLocalSmlFileFailed}},addSmlFileToLayerCompleted:{get:function(){return this._addSmlFileToLayerCompleted}},addSmlFileToLayerFailed:{get:function(){return this._addSmlFileToLayerFailed}},addSmlFileCompleted:{get:function(){return this._addSmlFileCompleted}},addSmlFileFailed:{get:function(){return this._addSmlFileFailed}},deleteSmlFileCompleted:{get:function(){return this._deleteSmlFileCompleted}},deleteSmlFileFailed:{get:function(){return this._deleteSmlFileFailed}}}),WebGLPlot$a.SitDataManager=_0x29db2d;var _0x7a8e7a=(_0x359dfe=!0,function(e,t){var i=_0x359dfe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x359dfe=!1,i}),_0x5b4078=_0x7a8e7a(void 0,(function(){return _0x5b4078.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b4078).search("(((.+)+)+)+$")})),_0x359dfe;function _0x256ea7(e){this.style=this.getDefaultStyle(),this.viewer=e,this.rainStage=null,this.snowStage=null}_0x5b4078(),_0x256ea7.prototype.smoke=function(e,t){var i=this.createSmokeSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x256ea7.prototype.flame=function(e,t){var i=this.createFlameSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x256ea7.prototype.blast=function(e,t){var i=this.createBlastSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x256ea7.prototype.removeEfficiency=function(e){this.viewer.scene.primitives.remove(e)},_0x256ea7.prototype.startRain=function(){this.rain()},_0x256ea7.prototype.stopRain=function(){null!==this.rainStage&&(this.viewer.scene.postProcessStages.remove(this.rainStage),this.rainStage=null)},_0x256ea7.prototype.startSnow=function(){this.snow()},_0x256ea7.prototype.stopSnow=function(){null!==this.snowStage&&(this.viewer.scene.postProcessStages.remove(this.snowStage),this.snowStage=null)},_0x256ea7.prototype.rain=function(){if(null===this.rainStage){var e=new Cesium.PostProcessStage({name:"czm_rain",fragmentShader:"uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n \n float hash(float x){\n return fract(sin(x*133.3)*13.13);\n }\n \n void main(void){\n \n float time = czm_frameNumber / 60.0;\n vec2 resolution = czm_viewport.zw;\n \n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 c=vec3(.6,.7,.8);\n \n float a=-.4;\n float si=sin(a),co=cos(a);\n uv*=mat2(co,-si,si,co);\n uv*=length(uv+vec2(0,4.9))*.3+1.;\n \n float v=1.-sin(hash(floor(uv.x*100.))*100.);\n float b=clamp(abs(sin(15.*time*v+uv.y*(10./(2.+v))))-.95,0.,1.)*4.;\n c*=v*b; \n \n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c,1), 0.5); \n }\n"});this.viewer.scene.postProcessStages.add(e),this.rainStage=e}},_0x256ea7.prototype.snow=function(){if(null===this.snowStage){var e=new Cesium.PostProcessStage({name:"czm_snow",fragmentShader:"uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n \n float snow(vec2 uv,float scale)\n {\n float time = czm_frameNumber / 60.0;\n float w=smoothstep(1.,0.,-uv.y*(scale/10.));if(w<.1)return 0.;\n uv+=time/scale;uv.y+=time*2./scale;uv.x+=sin(uv.y+time*.5)/scale;\n uv*=scale;vec2 s=floor(uv),f=fract(uv),p;float k=3.,d;\n p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;d=length(p);k=min(d,k);\n k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\n return k*w;\n }\n \n void main(void){\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 finalColor=vec3(0);\n float c = 0.0;\n c+=snow(uv,30.)*.0;\n c+=snow(uv,20.)*.0;\n c+=snow(uv,15.)*.0;\n c+=snow(uv,10.);\n c+=snow(uv,8.);\n c+=snow(uv,6.);\n c+=snow(uv,5.);\n finalColor=(vec3(c)); \n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.5); \n \n }\n "});this.viewer.scene.postProcessStages.add(e),this.snowStage=e}},_0x256ea7.prototype.createSmokeSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:new WebGLPlot.Color(0,0,0,.6),endColor:new WebGLPlot.Color(0,0,0,0),startScale:this.style.startScale,endScale:this.style.endScale,minimumParticleLife:this.style.minimumParticleLife,maximumParticleLife:this.style.maximumParticleLife,minimumSpeed:this.style.minimumSpeed,maximumSpeed:this.style.maximumSpeed,imageSize:new WebGLPlot.Cartesian2(this.style.particleSize,this.style.particleSize),emissionRate:this.style.emissionRate,lifetime:16,emitter:new WebGLPlot.CircleEmitter(5),sizeInMeters:!0,performance:!1,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x256ea7.prototype.createFlameSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:new WebGLPlot.Color(1,1,1,1),endColor:new WebGLPlot.Color(.5,0,0,0),startScale:this.style.startScale,endScale:1.5,minimumParticleLife:this.style.minimumParticleLife,maximumParticleLife:this.style.maximumParticleLife,minimumSpeed:this.style.minimumSpeed,maximumSpeed:this.style.maximumSpeed,imageSize:new WebGLPlot.Cartesian2(2,2),emissionRate:this.style.emissionRate,lifetime:16,loop:!0,emitter:new WebGLPlot.ConeEmitter(.785398185),sizeInMeters:!0,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x256ea7.prototype.createBlastSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:WebGLPlot.Color.RED.withAlpha(.7),endColor:WebGLPlot.Color.YELLOW.withAlpha(.3),startScale:1,endScale:2,particleLife:1,speed:5,imageSize:new WebGLPlot.Cartesian2(2,2),emissionRate:50,lifetime:5,loop:!0,emitter:new WebGLPlot.BoxEmitter(new WebGLPlot.Cartesian3(1,1,1)),sizeInMeters:!0,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x256ea7.prototype.getDefaultStyle=function(e){return{fireImage:e,startScale:0,endScale:1.5,minimumParticleLife:1.5,maximumParticleLife:1.8,minimumSpeed:7,maximumSpeed:9,particleSize:2,emissionRate:200}},_0x256ea7.prototype.computeModelMatrix=function(e,t){var i=WebGLPlot.Property.getValueOrUndefined(e.position,t,new WebGLPlot.Cartesian3);if(WebGLPlot.defined(i)){var n=WebGLPlot.Property.getValueOrUndefined(e.orientation,t,new WebGLPlot.Quaternion);if(WebGLPlot.defined(n))r=WebGLPlot.Matrix4.fromRotationTranslation(WebGLPlot.Matrix3.fromQuaternion(n,new WebGLPlot.Matrix3),i,new WebGLPlot.Matrix4);else var r=WebGLPlot.Transforms.eastNorthUpToFixedFrame(i,void 0,new WebGLPlot.Matrix4);return r}},_0x256ea7.prototype.computeEmitterModelMatrix=function(){var e=WebGLPlot.HeadingPitchRoll.fromDegrees(0,0,0,new WebGLPlot.HeadingPitchRoll),t=new WebGLPlot.TranslationRotationScale;return t.translation=WebGLPlot.Cartesian3.fromElements(2.5,4,1,new WebGLPlot.Cartesian3),t.rotation=WebGLPlot.Quaternion.fromHeadingPitchRoll(e,new WebGLPlot.Quaternion),WebGLPlot.Matrix4.fromTranslationRotationScale(t,new WebGLPlot.Matrix4)};var _0x19442c=(_0x3fa410=!0,function(e,t){var i=_0x3fa410?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3fa410=!1,i}),_0x176e21=_0x19442c(void 0,(function(){return _0x176e21.toString().search("(((.+)+)+)+$").toString().constructor(_0x176e21).search("(((.+)+)+)+$")})),_0x3fa410;_0x176e21();var _0x5c92f4={u_globeMinimumAltitude:function(){return 55e3}};function _0x4dfaf3(e){var t=(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)).appearance,i=e.geometryInstances;if(!WebGLPlot.defined(t)&&WebGLPlot.defined(i))for(var n=Array.isArray(i)?i:[i],r=n.length,o=0;o<r;o++){var a=n[o].attributes;if(WebGLPlot.defined(a)&&WebGLPlot.defined(a.color)){t=new WebGLPlot.PerInstanceColorAppearance({flat:!0});break}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=WebGLPlot.defaultValue(e.show,!0),this.classificationType=WebGLPlot.defaultValue(e.classificationType,WebGLPlot.ClassificationType.BOTH),this.debugShowBoundingVolume=WebGLPlot.defaultValue(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=WebGLPlot.defaultValue(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._readyPromise=WebGLPlot.when.defer(),this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=WebGLPlot.defaultValue(e.maxTerrainHeight,WebGLPlot.ApproximateTerrainHeights._defaultMaxTerrainHeight),this._minTerrainHeight=WebGLPlot.defaultValue(e.minTerrainHeight,WebGLPlot.ApproximateTerrainHeights._defaultMinTerrainHeight),this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:WebGLPlot.defaultValue(e.vertexCacheOptimize,!1),interleave:WebGLPlot.defaultValue(e.interleave,!1),releaseGeometryInstances:WebGLPlot.defaultValue(e.releaseGeometryInstances,!0),allowPicking:WebGLPlot.defaultValue(e.allowPicking,!0),asynchronous:WebGLPlot.defaultValue(e.asynchronous,!0),compressVertices:WebGLPlot.defaultValue(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:_0x5c92f4,classificationType:this.classificationType}}function _0x4e9e6d(e){return function(t,i){return e._maxTerrainHeight}}function _0x5b0842(e){return function(t,i){return e._minHeight}}Object.defineProperties(_0x4dfaf3.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),_0x4dfaf3.isSupported=WebGLPlot.ClassificationPrimitive.isSupported;var _0x56d11e=new WebGLPlot.Cartesian3,_0x34b49f=new WebGLPlot.Cartesian3,_0x1cfd4f=new WebGLPlot.Cartesian3,_0x454209=new WebGLPlot.Cartographic,_0x3630ee=new WebGLPlot.Rectangle;function _0x1796e9(e,t){var i=e.mapProjection.ellipsoid;if(!WebGLPlot.defined(t.attributes)||!WebGLPlot.defined(t.attributes.position3DHigh))return WebGLPlot.defined(t.rectangle)?t.rectangle:void 0;for(var n=t.attributes.position3DHigh.values,r=t.attributes.position3DLow.values,o=n.length,a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=0;c<o;c+=3){var h=WebGLPlot.Cartesian3.unpack(n,c,_0x56d11e),d=WebGLPlot.Cartesian3.unpack(r,c,_0x34b49f),f=WebGLPlot.Cartesian3.add(h,d,_0x1cfd4f),p=i.cartesianToCartographic(f,_0x454209),_=p.latitude,m=p.longitude;a=Math.min(a,_),s=Math.min(s,m),l=Math.max(l,_),u=Math.max(u,m)}var g=_0x3630ee;return g.north=l,g.south=a,g.east=u,g.west=s,g}function _0x1272f7(e,t,i){var n=t.mapProjection.ellipsoid,r=_0x1796e9(t,i);if(e.geometryInstances){var o=Number.MIN_VALUE,a=Number.MAX_VALUE,s=!1;for(let t=0;t<e.geometryInstances.length>0;t++){var l=e.geometryInstances[t].geometry._groundBottomAltitude,u=e.geometryInstances[t].geometry._groundExtrudedHeight;if(WebGLPlot.defined(l)&&WebGLPlot.defined(u)){var c=l+u;o=Math.max(o,c),a=Math.min(a,l),s=!0}}e._maxHeight=s?o:e._maxHeight,e._minHeight=s?a:e._minHeight}var h=(Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances])[0].geometry._granularity,d=WebGLPlot.OrientedBoundingBox.fromRectangle(r,_0x5b0842(e)(h,n),_0x4e9e6d(e)(h,n),n);if(e._boundingVolumes.push(d),!t.scene3DOnly){var f=t.mapProjection,p=WebGLPlot.BoundingSphere.fromRectangleWithHeights2D(r,f,e._maxHeight,e._minHeight);WebGLPlot.Cartesian3.fromElements(p.center.z,p.center.x,p.center.y,p.center),e._boundingVolumes2D.push(p)}}function _0x5acee9(e,t){return Math.floor(e%t/3)}function _0xc93c13(e,t,i,n,r,o,a){var s=e._primitive;i.mode!==WebGLPlot.SceneMode.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&t.derivedCommands&&t.derivedCommands.appearance2D&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t)}function _0x48b9ec(e,t,i,n,r,o){var a=e._primitive;i.mode!==WebGLPlot.SceneMode.SCENE3D&&t.shaderProgram===a._spPick&&a._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,i.commandList.push(t)}function _0xf85250(e,t,i,n,r,o,a,s){var l;l=t.mode===WebGLPlot.SceneMode.SCENE3D?e._boundingVolumes:e._boundingVolumes2D;var u,c,h=e.classificationType,d=h!==WebGLPlot.ClassificationType.CESIUM_3D_TILE&&h!==WebGLPlot.ClassificationType.S3M_TILE,f=h!==WebGLPlot.ClassificationType.TERRAIN&&h!==WebGLPlot.ClassificationType.S3M_TILE,p=h!==WebGLPlot.ClassificationType.TERRAIN&&h!==WebGLPlot.ClassificationType.CESIUM_3D_TILE,_=t.passes,m=e._primitive;if(_.render){var g=i.length;for(u=0;u<g;++u)c=l[_0x5acee9(u,g)],d&&_0xc93c13(e,i[u],t,r,o,c,a),f&&_0xc93c13(e,i[u].derivedCommands.tileset,t,r,o,c,a),p&&_0xc93c13(e,i[u].derivedCommands.s3mtiles,t,r,o,c,a);if(t.invertClassification){var x=m._commandsIgnoreShow,v=x.length;for(u=0;u<v;++u)c=l[Math.floor(u/2)],_0xc93c13(e,x[u],t,r,o,c,a)}}if(_.pick){var y,$=n.length;for(e._useFragmentCulling||(y=m._primitive._pickOffsets),u=0;u<$;++u){if(c=l[_0x5acee9(u,$)],!e._useFragmentCulling)c=l[y[_0x5acee9(u,$)].index];d&&_0x48b9ec(e,n[u],t,r,o,c),f&&_0x48b9ec(e,n[u].derivedCommands.tileset,t,r,o,c),p&&_0xc93c13(e,n[u].derivedCommands.s3mtiles,t,r,o,c,a)}}}_0x4dfaf3.initializeTerrainHeights=function(){return WebGLPlot.ApproximateTerrainHeights.initialize()},_0x4dfaf3.prototype.update=function(e){if(WebGLPlot.defined(this._primitive)||WebGLPlot.defined(this.geometryInstances)){if(!WebGLPlot.ApproximateTerrainHeights.initialized){if(!this.asynchronous)throw new WebGLPlot.DeveloperError("For synchronous GroundPrimitives, you must call PlotGroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");return void _0x4dfaf3.initializeTerrainHeights()}var t=this,i=this._classificationPrimitiveOptions;if(!WebGLPlot.defined(this._primitive)){var n,r,o,a,s,l=e.mapProjection.ellipsoid,u=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=u.length,h=new Array(c);for(a=0;a<c;++a){var d=_0x1796e9(e,r=(n=u[a]).geometry);WebGLPlot.defined(s)?WebGLPlot.defined(d)&&WebGLPlot.Rectangle.union(s,d,s):s=WebGLPlot.Rectangle.clone(d);var f=n.id;if(WebGLPlot.defined(f)&&WebGLPlot.defined(d)){var p=WebGLPlot.ApproximateTerrainHeights.getBoundingSphere(d,l);this._boundingSpheresKeys.push(f),this._boundingSpheres.push(p)}if(o=r.constructor,!WebGLPlot.defined(o)||!WebGLPlot.defined(o.createShadowVolume))throw new WebGLPlot.DeveloperError("Not all of the geometry instances have PlotGroundPrimitive support.")}var _=e.terrainExaggeration;this._minHeight=this._minTerrainHeight*_,this._maxHeight=this._maxTerrainHeight*_;var m=_0x4dfaf3._supportsMaterials(e.context);if(this._useFragmentCulling=m,m){var g,x=!0;for(a=0;a<c;++a)if(s=_0x1796e9(e,r=(n=u[a]).geometry),WebGLPlot.ShadowVolumeAppearance.shouldUseSphericalCoordinates(s)){x=!1;break}for(a=0;a<c;++a){o=(r=(n=u[a]).geometry).constructor;var v=_0x1796e9(e,r),y=r.textureCoordinateRotationPoints,$=e.context.floatTextureSixPlaces;g=x?WebGLPlot.ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes(v,y,l,e.mapProjection,$,this._maxHeight):WebGLPlot.ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes(v,y,l,e.mapProjection,$);var b=n.attributes;for(var T in b)b.hasOwnProperty(T)&&(g[T]=b[T]);n.created?h[a]=new WebGLPlot.GeometryInstance({geometry:n._groundGeometry,attributes:g,id:n.id}):(h[a]=new WebGLPlot.GeometryInstance({geometry:o.createShadowVolume(r,_0x5b0842(this),_0x4e9e6d(this)),attributes:g,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0)}}else for(a=0;a<c;++a)o=(r=(n=u[a]).geometry).constructor,n.created?h[a]=new WebGLPlot.GeometryInstance({geometry:r,attributes:n.attributes,id:n.id}):(h[a]=new WebGLPlot.GeometryInstance({geometry:o.createShadowVolume(r,_0x5b0842(this),_0x4e9e6d(this)),attributes:n.attributes,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0);i.geometryInstances=h,i.appearance=this.appearance,i._createBoundingVolumeFunction=function(e,i){_0x1272f7(t,e,i)},i._updateAndQueueCommandsFunction=function(e,i,n,r,o,a,s,l){_0xf85250(t,i,n,r,o,a,s)},this._primitive=new WebGLPlot.ClassificationPrimitive(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0);var i=e._error;WebGLPlot.defined(i)?t._readyPromise.reject(i):t._readyPromise.resolve(t)}))}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},_0x4dfaf3.prototype.getBoundingSphere=function(e){var t=this._boundingSpheresKeys.indexOf(e);if(-1!==t)return this._boundingSpheres[t]},_0x4dfaf3.prototype.getGeometryInstanceAttributes=function(e){if(!WebGLPlot.defined(this._primitive))throw new WebGLPlot.DeveloperError("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},_0x4dfaf3.prototype.isDestroyed=function(){return!1},_0x4dfaf3.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),WebGLPlot.destroyObject(this)},_0x4dfaf3._supportsMaterials=function(e){return e.depthTexture},_0x4dfaf3.supportsMaterials=function(e){return WebGLPlot.Check.typeOf.object("scene",e),_0x4dfaf3._supportsMaterials(e.frameState.context)};var _0x21eb33=(_0x1d3cf6=!0,function(e,t){var i=_0x1d3cf6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d3cf6=!1,i}),_0x3fd717=_0x21eb33(void 0,(function(){return _0x3fd717.toString().search("(((.+)+)+)+$").toString().constructor(_0x3fd717).search("(((.+)+)+)+$")})),_0x1d3cf6;function _0x3a2d15(e){if(!e||!e.scene)throw new WebGLPlot.defined("GroundEffect scene is required.");this._scene=e.scene,this._show=WebGLPlot.defaultValue(e.show,!0),this._positions=WebGLPlot.defaultValue(e.positions,!0),this._color=WebGLPlot.defaultValue(e.color,WebGLPlot.Color.BLACK.withAlpha(.8)),this._maxTerrainHeight=WebGLPlot.defaultValue(e.maxTerrainHeight,void 0),this._minTerrainHeight=WebGLPlot.defaultValue(e.minTerrainHeight,void 0),this._id=WebGLPlot.defaultValue(e.id,WebGLPlot.createGuid()),this.initialize()}_0x3fd717(),_0x3a2d15.prototype.initialize=function(){if(Array.isArray(this._positions)&&!(this._positions.length<3)){this._primitive&&this.destroy();var e=WebGLPlot.Cartesian3.fromDegreesArray(this._positions),t=new WebGLPlot.PolygonHierarchy(e),i=new WebGLPlot.PolygonGeometry({polygonHierarchy:t}),n={show:new WebGLPlot.ShowGeometryInstanceAttribute(this._show),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(this._color)},r=new WebGLPlot.GeometryInstance({geometry:i,attributes:n,id:this._id}),o=new _0x4dfaf3({show:this._show,asynchronous:!0,geometryInstances:r,classificationType:3,appearance:new WebGLPlot.PerInstanceColorAppearance,maxTerrainHeight:this._maxTerrainHeight,minTerrainHeight:this._minTerrainHeight});this._primitive=this._scene.primitives.add(o)}},_0x3a2d15.prototype.destroy=function(){this._scene&&this._primitive&&(this._scene.primitives.removeAndDestroy(this._primitive),this._primitive=void 0)},_0x3a2d15.prototype._update=function(){this.destroy(),this.initialize()},Object.defineProperties(_0x3a2d15.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._primitive&&(this._primitive.show=e))}},positions:{get:function(){return this._positions},set:function(e){Array.isArray(e)&&e.length>=3&&(this._positions=e,this._update())}},color:{get:function(){return this._color},set:function(e){WebGLPlot.Color.equals(e,this._color)||(this._color=e,this._update())}},maxTerrainHeight:{get:function(){return this._maxTerrainHeight},set:function(e){this._maxTerrainHeight!==e&&(this._maxTerrainHeight=e,this._update())}},minTerrainHeight:{get:function(){return this._minTerrainHeight},set:function(e){this._minTerrainHeight!==e&&(this._minTerrainHeight=e,this._update())}}});const _0x5ed8e3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x417853=_0x5ed8e3(void 0,(function(){return _0x417853.toString().search("(((.+)+)+)+$").toString().constructor(_0x417853).search("(((.+)+)+)+$")}));function _0x539867(e){if(!e)throw new WebGLPlot.DeveloperError("CameraMoveHandler is required to initialize viewer");this._cameraMoveRate=100;let t=e.scene.globe.ellipsoid;_0x539867.flags={looking:!1,moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1};let i=this;e.clock.onTick.addEventListener((function(n){const r=e.camera,o=t.cartesianToCartographic(r.position).height/i._cameraMoveRate;_0x539867.flags.moveForward&&r.moveForward(o),_0x539867.flags.moveBackward&&r.moveBackward(o),_0x539867.flags.moveUp&&r.moveUp(o),_0x539867.flags.moveDown&&r.moveDown(o),_0x539867.flags.moveLeft&&r.moveLeft(o),_0x539867.flags.moveRight&&r.moveRight(o)}))}function _0x286152(e){switch(e){case"Z".charCodeAt(0):return"moveForward";case"X".charCodeAt(0):return"moveBackward";case"W".charCodeAt(0):return"moveUp";case"S".charCodeAt(0):return"moveDown";case"D".charCodeAt(0):return"moveRight";case"A".charCodeAt(0):case 37:return"moveLeft";case 38:return"moveUp";case 39:return"moveRight";case 40:return"moveDown";default:return}}_0x417853(),_0x539867.prototype.activate=function(){document.addEventListener("keydown",this.keydown,!1),document.addEventListener("keyup",this.keyup,!1)},_0x539867.prototype.deActivate=function(){document.removeEventListener("keydown",this.keydown),document.removeEventListener("keyup",this.keyup)},_0x539867.prototype.keydown=function(e){const t=_0x286152(e.keyCode);typeof t<"u"&&(_0x539867.flags[t]=!0)},_0x539867.prototype.keyup=function(e){const t=_0x286152(e.keyCode);typeof t<"u"&&(_0x539867.flags[t]=!1)},Object.defineProperties(_0x539867.prototype,{cameraMoveRate:{get:function(){return this._cameraMoveRate},set:function(e){if(e===this._cameraMoveRate||"number"!=typeof e)return!1;this._cameraMoveRate=e}}});var _0x5e1a6f=(_0x3f3033=!0,function(e,t){var i=_0x3f3033?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f3033=!1,i}),_0x49b83e=_0x5e1a6f(void 0,(function(){return _0x49b83e.toString().search("(((.+)+)+)+$").toString().constructor(_0x49b83e).search("(((.+)+)+)+$")})),_0x3f3033;function _0x4b4567(e){e=e||{},this.method=e.method?e.method:"POST",this.sitData=e.sitData?e.sitData:null,this.smlFileName=e.smlFileName?e.smlFileName:"",this.isCover=!!e.isCover&&e.isCover,this.CLASS_NAME="SuperMap.EditSmlFileParameters"}_0x49b83e(),_0x4b4567.prototype.destroy=function(){var e=this;e.method="POST",e.sitData=null,e.isCover=!1,e.smlFileName=""},_0x4b4567.toJsonParameters=function(e){if(e)return WebGLPlot.toJSON(e.sitData)};var _0x159071=(_0x5798c9=!0,function(e,t){var i=_0x5798c9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5798c9=!1,i}),_0x1bdaa0=_0x159071(void 0,(function(){return _0x1bdaa0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bdaa0).search("(((.+)+)+)+$")})),_0x5798c9;_0x1bdaa0();class _0x13c545 extends _0x1393d7{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i=this;i.events=new _0x3d7456(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),this.CLASS_NAME="SuperMap.EditSmlFileService"}destroy(){super.destroy()}processAsync(e){if(e){var t=this,i=e.method,n=t.url.substr(t.url.length-1,1);t.url+="/"==n?"smlInfos/":"/smlInfos/",t.url+=e.smlFileName+".json",t.url+="?isCover="+e.isCover;var r=null;e.method&&"POST"===e.method&&(r=_0x4b4567.toJsonParameters(e)),t.request({method:i,data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}const _0x2bc2ee=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1fb252=_0x2bc2ee(void 0,(function(){return _0x1fb252.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fb252).search("(((.+)+)+)+$")}));function _0x2bed72(e){e=e||{},this.libID=e.libID,this.code=e.code,this.inputPoints=e.inputPoints?e.inputPoints:null,this.symbolRank=e.symbolRank?e.symbolRank:0,this.negativeImage=!!e.negativeImage&&e.negativeImage,this.surroundLineType=e.surroundLineType?e.surroundLineType:0,this.subSymbols=e.subSymbols?e.subSymbols:null,this.scaleValues=e.scaleValues?e.scaleValues:null,this.scalePoints=e.scalePoints?e.scalePoints:null,this.newScalePoint=e.newScalePoint?e.newScalePoint:null,this.newScalePointIndex=e.newScalePointIndex?e.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}_0x1fb252(),_0x2bed72.prototype.destroy=function(){var e=this;e.libID=null,e.code=null,e.inputPoints=null,e.symbolRank=null,e.negativeImage=null,e.surroundLineType=null,e.subSymbols=null,e.scaleValues=null,e.scalePoints=null,e.newScalePoint=null,e.newScalePointIndex=null},_0x2bed72.toUrlParameters=function(e){if(e&&null!==e.libID&&null!==e.code){var t="libID="+encodeURIComponent(e.libID)+"&code="+encodeURIComponent(e.code);if(e.inputPoints&&null!==e.inputPoints&&0!==e.inputPoints.length){let i="[";for(let t=0;t<e.inputPoints.length;t++)t===e.inputPoints.length-1?i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"}]":i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"},";t+="&inputPoints="+encodeURIComponent(i)}if(e.scalePoints&&null!==e.scalePoints&&0!==e.scalePoints.length){let i="[";for(let t=0;t<e.scalePoints.length;t++)t===e.scalePoints.length-1?i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"}]":i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"},";t+="&scalePoints="+encodeURIComponent(i)}if(e.scaleValues&&null!==e.scaleValues&&0!==e.scaleValues.length){let i="[";for(let t=0;t<e.scaleValues.length;t++)t===e.scaleValues.length-1?i+=e.scaleValues[t]+"]":i+=e.scaleValues[t]+",";t+="&scaleValues="+encodeURIComponent(i)}if(e.subSymbols&&null!==e.subSymbols&&0!==e.subSymbols.length){let i="[";for(let t=0;t<e.subSymbols.length;t++)t===e.subSymbols.length-1?i+=e.subSymbols[t].code+"]":i+=e.subSymbols[t].code+",";t+="&subSymbols="+encodeURIComponent(i)}return e.newScalePoint&&null!==e.newScalePoint&&(t+="&newScalePoint="+encodeURIComponent('{"x":'+e.newScalePoint.x+', "y":'+e.newScalePoint.y+"}")),e.newScalePointIndex&&null!==e.newScalePointIndex&&(t+="&newScalePointIndex="+encodeURIComponent(e.newScalePointIndex)),e.symbolRank&&null!==e.symbolRank&&(t+="&symbolRank="+encodeURIComponent(e.symbolRank)),e.negativeImage&&null!==e.negativeImage&&(t+="&negativeImage="+encodeURIComponent(e.negativeImage)),e.surroundLineType&&null!==e.surroundLineType&&(t+="&surroundLineType="+encodeURIComponent(e.surroundLineType)),t}};var _0x3eec3f=(_0x2a8d30=!0,function(e,t){var i=_0x2a8d30?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a8d30=!1,i}),_0xe509ce=_0x3eec3f(void 0,(function(){return _0xe509ce.toString().search("(((.+)+)+)+$").toString().constructor(_0xe509ce).search("(((.+)+)+)+$")})),_0x2a8d30;_0xe509ce();class _0x1e0300 extends _0x1393d7{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i,n=this;n.events=new _0x3d7456(n,null,n.EVENT_TYPES,!0),n.eventListeners instanceof Object&&n.events.on(n.eventListeners),i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"smlInfos":"/smlInfos",n.url+=".json",this.CLASS_NAME="SuperMap.GetSMLInfosService"}destroy(){super.destroy()}processAsync(e){if(e){var t=this;t.url+=_0x2bed72.toUrlParameters(e),t.request({method:"GET",data:null,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x3eb96c=(_0x2d9050=!0,function(e,t){var i=_0x2d9050?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d9050=!1,i}),_0x207e5b=_0x3eb96c(void 0,(function(){return _0x207e5b.toString().search("(((.+)+)+)+$").toString().constructor(_0x207e5b).search("(((.+)+)+)+$")})),_0x2d9050;function _0x46b1b9(e,t){this.url=e,this.options=t}_0x207e5b(),_0x46b1b9.prototype.getSMLInfos=function(e,t,i){var n=this;return i||(i=n),new _0x1e0300(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n},_0x46b1b9.prototype.editSMLFile=function(e,t,i){var n=this;return i||(i=n),new _0x13c545(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n};var _0x413be5=(_0x2c65eb=!0,function(e,t){var i=_0x2c65eb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c65eb=!1,i}),_0x418954=_0x413be5(void 0,(function(){return _0x418954.toString().search("(((.+)+)+)+$").toString().constructor(_0x418954).search("(((.+)+)+)+$")})),_0x2c65eb;_0x418954();class _0x460259 extends _0x1393d7{constructor(e,t){super(e,t=t||{});var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"graphicObject.json?":"/graphicObject.json?",this.CLASS_NAME="SuperMap.GetSymbolInfoService"}destroy(){super.destroy()}processAsync(e){if(e){var t,i=this;t=_0x570598.toUrlParameters(e),i.url+=t,e.dynamicToken&&(i.url+="&dynamicToken="+e.dynamicToken),navigator.userAgent.toUpperCase().includes("MSIE")&&(i.url=encodeURI(i.url)),i.request({method:"GET",params:null,scope:i,success:i.myServiceProcessCompleted,failure:i.serviceProcessFailed})}}myServiceProcessCompleted(e){null!=(e=this.transformResult(e))&&null!=e.textStyle2D&&null!=e.textStyle2D.fontHeight&&(e.textStyle2D.fontHeight=3),this.events.triggerEvent("processCompleted",{result:e})}transformResult(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e}}var _0x24d344=(_0x5242d1=!0,function(e,t){var i=_0x5242d1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5242d1=!1,i}),_0x559a86=_0x24d344(void 0,(function(){return _0x559a86.toString().search("(((.+)+)+)+$").toString().constructor(_0x559a86).search("(((.+)+)+)+$")})),_0x5242d1;_0x559a86();var WebGLPlot$9=window.WebGLPlot=window.WebGLPlot||{};function _0x3eee05(){}var createAlgo=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoSymbol({libID:e.libID,code:e.code}):void 0},getDefaultStyle=function(e){return void 0!==SuperMapAlgoPlot?_0x39fbca.defaultStyle:void 0},getSpatialData=function(e,t){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.Primitives.getSpatialData(e,t):void 0},getServerData=function(e,t,i,n){if(void 0===i&&(i=_0x39fbca.serverUrl),void 0===SuperMap||0===e||WebGLPlot$9.getLibManager(n).getSymbolLibByLibId(this.libID))return 0===e?e:null;var r=new _0x570598;return r.libID=e,r.code=t,r.surroundLineType=1,{getSymbolInfoParameters:r,getSymbolInfo:new _0x460259(i,WebGLPlot$9.getLibManager(n).options.serviceParams)}},toJSON=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.toJSON(e):""},clonePoints=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.clonePoints(e):[]},EditSmlFile=function(e,t){return void 0!==SuperMap?{editSmlFile:new _0x13c545(e,t),editSmlFileParams:new _0x4b4567}:void 0},smlFileService=function(e,t){return{smlFileService:new _0x46b1b9(e,t),editSmlFileParams:new _0x4b4567}},isAccessServer=function(e,t){return void 0!==SuperMapAlgoPlot&&SuperMapAlgoPlot.AlgoSymbolFactory.isAccessServer(e,t)},polylineDistance=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.polylineDistance(e):0},analysisSymbolCells=function(e){if(void 0!==SuperMapAlgoPlot)return SuperMapAlgoPlot.AnalysisSymbol.analysisSymbolCells(e)},rotateAngle=function(e,t,i){void 0!==SuperMapAlgoPlot&&SuperMapAlgoPlot.PlottingUtil.rotateAngle(e,t,i)},plotI18n=function(e){if(void 0!==SuperMapAlgoPlot)return SuperMapAlgoPlot.plotI18n(e)},getLibManager=function(e){let t=WebGLPlot$9.Plotting.g_Plotting.get(e);if(t)return t.getSymbolLibManager()},createProperty=function(e,t){return new _0x32c2d4(e,t)};WebGLPlot$9.createAlgo=createAlgo,WebGLPlot$9.getDefaultStyle=getDefaultStyle,WebGLPlot$9.getSpatialData=getSpatialData,WebGLPlot$9.getServerData=getServerData,WebGLPlot$9.toJSON=toJSON,WebGLPlot$9.EditSmlFile=EditSmlFile,WebGLPlot$9.clonePoints=clonePoints,WebGLPlot$9.isAccessServer=isAccessServer,WebGLPlot$9.polylineDistance=polylineDistance,WebGLPlot$9.analysisSymbolCells=analysisSymbolCells,WebGLPlot$9.rotateAngle=rotateAngle,WebGLPlot$9.plotI18n=plotI18n,WebGLPlot$9.getLibManager=getLibManager,WebGLPlot$9.createProperty=createProperty,WebGLPlot$9.smlFileService=smlFileService,function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));(n(),"object"==typeof exports&&typeof module<"u")?module.exports=e():"function"==typeof define&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).html2canvas=e()}((function(){return function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){(function(e){!function(n){var r="object"==typeof i&&i&&!i.nodeType&&i,o="object"==typeof t&&t&&!t.nodeType&&t,a="object"==typeof e&&e;(a.global===a||a.window===a||a.self===a)&&(n=a);var s,l,u=2147483647,c=36,h=/^xn--/,d=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=Math.floor,m=String.fromCharCode;function g(e){throw new RangeError(p[e])}function x(e,t){for(var i=e.length,n=[];i--;)n[i]=t(e[i]);return n}function v(e,t){var i=e.split("@"),n="";return i.length>1&&(n=i[0]+"@",e=i[1]),n+x((e=e.replace(f,".")).split("."),t).join(".")}function y(e){for(var t,i,n=[],r=0,o=e.length;r<o;)(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<o?56320==(64512&(i=e.charCodeAt(r++)))?n.push(((1023&t)<<10)+(1023&i)+65536):(n.push(t),r--):n.push(t);return n}function $(e){return x(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,i){var n=0;for(e=i?_(e/700):e>>1,e+=_(e/t);e>455;n+=c)e=_(e/35);return _(n+36*e/(e+38))}function C(e){var t,i,n,r,o,a,s,l,h,d,f,p=[],m=e.length,x=0,v=128,y=72;for((i=e.lastIndexOf("-"))<0&&(i=0),n=0;n<i;++n)e.charCodeAt(n)>=128&&g("not-basic"),p.push(e.charCodeAt(n));for(r=i>0?i+1:0;r<m;){for(o=x,a=1,s=c;r>=m&&g("invalid-input"),((l=(f=e.charCodeAt(r++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:c)>=c||l>_((u-x)/a))&&g("overflow"),x+=l*a,!(l<(h=s<=y?1:s>=y+26?26:s-y));s+=c)a>_(u/(d=c-h))&&g("overflow"),a*=d;y=T(x-o,t=p.length+1,0==o),_(x/t)>u-v&&g("overflow"),v+=_(x/t),x%=t,p.splice(x++,0,v)}return $(p)}function S(e){var t,i,n,r,o,a,s,l,h,d,f,p,x,v,$,C=[];for(p=(e=y(e)).length,t=128,i=0,o=72,a=0;a<p;++a)(f=e[a])<128&&C.push(m(f));for(n=r=C.length,r&&C.push("-");n<p;){for(s=u,a=0;a<p;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>_((u-i)/(x=n+1))&&g("overflow"),i+=(s-t)*x,t=s,a=0;a<p;++a)if((f=e[a])<t&&++i>u&&g("overflow"),f==t){for(l=i,h=c;!(l<(d=h<=o?1:h>=o+26?26:h-o));h+=c)$=l-d,v=c-d,C.push(m(b(d+$%v,0))),l=_($/v);C.push(m(b(l,0))),o=T(i,x,n==r),i=0,++n}++i,++t}return C.join("")}if(s={version:"1.4.1",ucs2:{decode:y,encode:$},decode:C,encode:S,toASCII:function(e){return v(e,(function(e){return d.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return v(e,(function(e){return h.test(e)?C(e.slice(4).toLowerCase()):e}))}},r&&o)if(t.exports==r)o.exports=s;else for(l in s)s.hasOwnProperty(l)&&(r[l]=s[l]);else n.punycode=s}(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,i){var n=e("./log");function r(e,t){for(var i=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),o=e.firstChild;o;)(!0===t||1!==o.nodeType||"SCRIPT"!==o.nodeName)&&i.appendChild(r(o,t)),o=o.nextSibling;return 1===e.nodeType&&(i._scrollTop=e.scrollTop,i._scrollLeft=e.scrollLeft,"CANVAS"===e.nodeName?function(e,t){try{t&&(t.width=e.width,t.height=e.height,t.getContext("2d").putImageData(e.getContext("2d").getImageData(0,0,e.width,e.height),0,0))}catch(t){n("Unable to copy canvas content from",e,t)}}(e,i):("TEXTAREA"===e.nodeName||"SELECT"===e.nodeName)&&(i.value=e.value)),i}function o(e){if(1===e.nodeType){e.scrollTop=e._scrollTop,e.scrollLeft=e._scrollLeft;for(var t=e.firstChild;t;)o(t),t=t.nextSibling}}t.exports=function(e,t,i,n,a,s,l){var u=r(e.documentElement,a.javascriptEnabled),c=t.createElement("iframe");return c.className="html2canvas-container",c.style.visibility="hidden",c.style.position="fixed",c.style.left="-10000px",c.style.top="0px",c.style.border="0",c.width=i,c.height=n,c.scrolling="no",t.body.appendChild(c),new Promise((function(t){var i,n,r,h=c.contentWindow.document;c.contentWindow.onload=c.onload=function(){var e=setInterval((function(){h.body.childNodes.length>0&&(o(h.documentElement),clearInterval(e),"view"===a.type&&(c.contentWindow.scrollTo(s,l),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(c.contentWindow.scrollY!==l||c.contentWindow.scrollX!==s)&&(h.documentElement.style.top=-l+"px",h.documentElement.style.left=-s+"px",h.documentElement.style.position="absolute")),t(c))}),50)},h.open(),h.write("<!DOCTYPE html><html></html>"),n=s,r=l,(i=e).defaultView&&(n!==i.defaultView.pageXOffset||r!==i.defaultView.pageYOffset)&&i.defaultView.scrollTo(n,r),h.replaceChild(h.adoptNode(u),h.documentElement),h.close()}))}},{"./log":13}],3:[function(e,t,i){function n(e){this.r=0,this.g=0,this.b=0,this.a=null,this.fromArray(e)||this.namedColor(e)||this.rgb(e)||this.rgba(e)||this.hex6(e)||this.hex3(e)}n.prototype.darken=function(e){var t=1-e;return new n([Math.round(this.r*t),Math.round(this.g*t),Math.round(this.b*t),this.a])},n.prototype.isTransparent=function(){return 0===this.a},n.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},n.prototype.fromArray=function(e){return Array.isArray(e)&&(this.r=Math.min(e[0],255),this.g=Math.min(e[1],255),this.b=Math.min(e[2],255),e.length>3&&(this.a=e[3])),Array.isArray(e)};var r=/^#([a-f0-9]{3})$/i;n.prototype.hex3=function(e){var t;return null!==(t=e.match(r))&&(this.r=parseInt(t[1][0]+t[1][0],16),this.g=parseInt(t[1][1]+t[1][1],16),this.b=parseInt(t[1][2]+t[1][2],16)),null!==t};var o=/^#([a-f0-9]{6})$/i;n.prototype.hex6=function(e){var t=null;return null!==(t=e.match(o))&&(this.r=parseInt(t[1].substring(0,2),16),this.g=parseInt(t[1].substring(2,4),16),this.b=parseInt(t[1].substring(4,6),16)),null!==t};var a=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;n.prototype.rgb=function(e){var t;return null!==(t=e.match(a))&&(this.r=Number(t[1]),this.g=Number(t[2]),this.b=Number(t[3])),null!==t};var s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;n.prototype.rgba=function(e){var t;return null!==(t=e.match(s))&&(this.r=Number(t[1]),this.g=Number(t[2]),this.b=Number(t[3]),this.a=Number(t[4])),null!==t},n.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},n.prototype.namedColor=function(e){e=e.toLowerCase();var t=l[e];if(t)this.r=t[0],this.g=t[1],this.b=t[2];else if("transparent"===e)return this.r=this.g=this.b=this.a=0,!0;return!!t},n.prototype.isColor=!0;var l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};t.exports=n},{}],4:[function(e,t,i){var n=e("./support"),r=e("./renderers/canvas"),o=e("./imageloader"),a=e("./nodeparser"),s=e("./nodecontainer"),l=e("./log"),u=e("./utils"),c=e("./clone"),h=e("./proxy").loadUrlDocument,d=u.getBounds,f="data-html2canvas-node",p=0;function _(e,t){var i,n,o=p++;if((t=t||{}).logging&&(l.options.logging=!0,l.options.start=Date.now()),t.async=typeof t.async>"u"||t.async,t.allowTaint=!(typeof t.allowTaint>"u")&&t.allowTaint,t.removeContainer=typeof t.removeContainer>"u"||t.removeContainer,t.javascriptEnabled=!(typeof t.javascriptEnabled>"u")&&t.javascriptEnabled,t.imageTimeout=typeof t.imageTimeout>"u"?1e4:t.imageTimeout,t.renderer="function"==typeof t.renderer?t.renderer:r,t.strict=!!t.strict,"string"==typeof e){if("string"!=typeof t.proxy)return Promise.reject("Proxy must be used when rendering url");var a=null!=t.width?t.width:window.innerWidth,s=null!=t.height?t.height:window.innerHeight;return h((i=e,n=document.createElement("a"),n.href=i,n.href=n.href,n),t.proxy,document,a,s,t).then((function(e){return g(e.contentWindow.document.documentElement,e,t,a,s)}))}var u,d,_,m,x,v=(void 0===e?[document.documentElement]:e.length?e:[e])[0];return v.setAttribute(f+o,o),(u=v.ownerDocument,d=t,_=v.ownerDocument.defaultView.innerWidth,m=v.ownerDocument.defaultView.innerHeight,x=o,c(u,u,_,m,d,u.defaultView.pageXOffset,u.defaultView.pageYOffset).then((function(e){l("Document cloned");var t=f+x,i="["+t+"='"+x+"']";u.querySelector(i).removeAttribute(t);var n=e.contentWindow,r=n.document.querySelector(i);return("function"==typeof d.onclone?Promise.resolve(d.onclone(n.document)):Promise.resolve(!0)).then((function(){return g(r,e,d,_,m)}))}))).then((function(e){return"function"==typeof t.onrendered&&(l("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),t.onrendered(e)),e}))}_.CanvasRenderer=r,_.NodeContainer=s,_.log=l,_.utils=u;var m=typeof document>"u"||"function"!=typeof Object.create||"function"!=typeof document.createElement("canvas").getContext?function(){return Promise.reject("No canvas support")}:_;function g(e,t,i,r,s){var u=t.contentWindow,c=new n(u.document),h=new o(i,c),f=d(e),p="view"===i.type?r:f.right+1,_="view"===i.type?s:f.bottom+1,m=new i.renderer(p,_,h,i,document);return new a(e,m,c,h,i).ready.then((function(){var n,r;if(l("Finished rendering"),"view"===i.type)n=x(m.canvas,{width:m.canvas.width,height:m.canvas.height,top:0,left:0,x:0,y:0});else if(e===u.document.body||e===u.document.documentElement||null!=i.canvas)n=m.canvas;else if(i.scale){var o={width:null!=i.width?i.width:f.width,height:null!=i.height?i.height:f.height,top:f.top,left:f.left,x:0,y:0},a={};for(var s in o)o.hasOwnProperty(s)&&(a[s]=o[s]*i.scale);(n=x(m.canvas,a)).style.width=o.width+"px",n.style.height=o.height+"px"}else n=x(m.canvas,{width:null!=i.width?i.width:f.width,height:null!=i.height?i.height:f.height,top:f.top,left:f.left,x:0,y:0});return r=t,i.removeContainer&&(r.parentNode.removeChild(r),l("Cleaned up container")),n}))}function x(e,t){var i=document.createElement("canvas"),n=Math.min(e.width-1,Math.max(0,t.left)),r=Math.min(e.width,Math.max(1,t.left+t.width)),o=Math.min(e.height-1,Math.max(0,t.top)),a=Math.min(e.height,Math.max(1,t.top+t.height));i.width=t.width,i.height=t.height;var s=r-n,u=a-o;return l("Cropping canvas at:","left:",t.left,"top:",t.top,"width:",s,"height:",u),l("Resulting crop with width",t.width,"and height",t.height,"with x",n,"and y",o),i.getContext("2d").drawImage(e,n,o,s,u,t.x,t.y,s,u),i}t.exports=m},{"./clone":2,"./imageloader":11,"./log":13,"./nodecontainer":14,"./nodeparser":15,"./proxy":16,"./renderers/canvas":20,"./support":22,"./utils":26}],5:[function(e,t,i){var n=e("./log"),r=e("./utils").smallImage;t.exports=function e(t){if(this.src=t,n("DummyImageContainer for",t),!this.promise||!this.image){n("Initiating DummyImageContainer"),e.prototype.image=new Image;var i=this.image;e.prototype.promise=new Promise((function(e,t){i.onload=e,i.onerror=t,i.src=r(),!0===i.complete&&e(i)}))}}},{"./log":13,"./utils":26}],6:[function(e,t,i){var n=e("./utils").smallImage;t.exports=function(e,t){var i,r,o=document.createElement("div"),a=document.createElement("img"),s=document.createElement("span"),l="Hidden Text";o.style.visibility="hidden",o.style.fontFamily=e,o.style.fontSize=t,o.style.margin=0,o.style.padding=0,document.body.appendChild(o),a.src=n(),a.width=1,a.height=1,a.style.margin=0,a.style.padding=0,a.style.verticalAlign="baseline",s.style.fontFamily=e,s.style.fontSize=t,s.style.margin=0,s.style.padding=0,s.appendChild(document.createTextNode(l)),o.appendChild(s),o.appendChild(a),i=a.offsetTop-s.offsetTop+1,o.removeChild(s),o.appendChild(document.createTextNode(l)),o.style.lineHeight="normal",a.style.verticalAlign="super",r=a.offsetTop-o.offsetTop+1,document.body.removeChild(o),this.baseline=i,this.lineWidth=1,this.middle=r}},{"./utils":26}],7:[function(e,t,i){var n=e("./font");function r(){this.data={}}r.prototype.getMetrics=function(e,t){return void 0===this.data[e+"-"+t]&&(this.data[e+"-"+t]=new n(e,t)),this.data[e+"-"+t]},t.exports=r},{"./font":6}],8:[function(e,t,i){var n=e("./utils").getBounds,r=e("./proxy").loadUrlDocument;function o(t,i,r){this.image=null,this.src=t;var o=this,a=n(t);this.promise=(i?new Promise((function(e){"about:blank"===t.contentWindow.document.URL||null==t.contentWindow.document.documentElement?t.contentWindow.onload=t.onload=function(){e(t)}:e(t)})):this.proxyLoad(r.proxy,a,r)).then((function(t){return e("./core")(t.contentWindow.document.documentElement,{type:"view",width:t.width,height:t.height,proxy:r.proxy,javascriptEnabled:r.javascriptEnabled,removeContainer:r.removeContainer,allowTaint:r.allowTaint,imageTimeout:r.imageTimeout/2})})).then((function(e){return o.image=e}))}o.prototype.proxyLoad=function(e,t,i){var n=this.src;return r(n.src,e,n.ownerDocument,t.width,t.height,i)},t.exports=o},{"./core":4,"./proxy":16,"./utils":26}],9:[function(e,t,i){function n(e){this.src=e.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=Promise.resolve(!0)}n.TYPES={LINEAR:1,RADIAL:2},n.REGEXP_COLORSTOP=/^\s*(rgba?\(\s*\d{1,3},\s*\d{1,3},\s*\d{1,3}(?:,\s*[0-9\.]+)?\s*\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\s+(\d{1,3}(?:\.\d+)?)(%|px)?)?(?:\s|$)/i,t.exports=n},{}],10:[function(e,t,i){t.exports=function(e,t){this.src=e,this.image=new Image;var i=this;this.tainted=null,this.promise=new Promise((function(n,r){i.image.onload=n,i.image.onerror=r,t&&(i.image.crossOrigin="anonymous"),i.image.src=e,!0===i.image.complete&&n(i.image)}))}},{}],11:[function(e,t,i){var n=e("./log"),r=e("./imagecontainer"),o=e("./dummyimagecontainer"),a=e("./proxyimagecontainer"),s=e("./framecontainer"),l=e("./svgcontainer"),u=e("./svgnodecontainer"),c=e("./lineargradientcontainer"),h=e("./webkitgradientcontainer"),d=e("./utils").bind;function f(e,t){this.link=null,this.options=e,this.support=t,this.origin=this.getOrigin(window.location.href)}f.prototype.findImages=function(e){var t=[];return e.reduce((function(e,t){switch(t.node.nodeName){case"IMG":return e.concat([{args:[t.node.src],method:"url"}]);case"svg":case"IFRAME":return e.concat([{args:[t.node],method:t.node.nodeName}])}return e}),[]).forEach(this.addImage(t,this.loadImage),this),t},f.prototype.findBackgroundImage=function(e,t){return t.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(e,this.loadImage),this),e},f.prototype.addImage=function(e,t){return function(i){i.args.forEach((function(r){this.imageExists(e,r)||(e.splice(0,0,t.call(this,i)),n("Added image #"+e.length,"string"==typeof r?r.substring(0,100):r))}),this)}},f.prototype.hasImageBackground=function(e){return"none"!==e.method},f.prototype.loadImage=function(e){if("url"===e.method){var t=e.args[0];return!this.isSVG(t)||this.support.svg||this.options.allowTaint?t.match(/data:image\/.*;base64,/i)?new r(t.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(t)||!0===this.options.allowTaint||this.isSVG(t)?new r(t,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new r(t,!0):this.options.proxy?new a(t,this.options.proxy):new o(t):new l(t)}return"linear-gradient"===e.method?new c(e):"gradient"===e.method?new h(e):"svg"===e.method?new u(e.args[0],this.support.svg):"IFRAME"===e.method?new s(e.args[0],this.isSameOrigin(e.args[0].src),this.options):new o(e)},f.prototype.isSVG=function(e){return"svg"===e.substring(e.length-3).toLowerCase()||l.prototype.isInline(e)},f.prototype.imageExists=function(e,t){return e.some((function(e){return e.src===t}))},f.prototype.isSameOrigin=function(e){return this.getOrigin(e)===this.origin},f.prototype.getOrigin=function(e){var t=this.link||(this.link=document.createElement("a"));return t.href=e,t.href=t.href,t.protocol+t.hostname+t.port},f.prototype.getPromise=function(e){return this.timeout(e,this.options.imageTimeout).catch((function(){return new o(e.src).promise.then((function(t){e.image=t}))}))},f.prototype.get=function(e){var t=null;return this.images.some((function(i){return(t=i).src===e}))?t:null},f.prototype.fetch=function(e){return this.images=e.reduce(d(this.findBackgroundImage,this),this.findImages(e)),this.images.forEach((function(e,t){e.promise.then((function(){n("Succesfully loaded image #"+(t+1),e)}),(function(i){n("Failed loading image #"+(t+1),e,i)}))})),this.ready=Promise.all(this.images.map(this.getPromise,this)),n("Finished searching images"),this},f.prototype.timeout=function(e,t){var i,r=Promise.race([e.promise,new Promise((function(r,o){i=setTimeout((function(){n("Timed out loading image",e),o(e)}),t)}))]).then((function(e){return clearTimeout(i),e}));return r.catch((function(){clearTimeout(i)})),r},t.exports=f},{"./dummyimagecontainer":5,"./framecontainer":8,"./imagecontainer":10,"./lineargradientcontainer":12,"./log":13,"./proxyimagecontainer":17,"./svgcontainer":23,"./svgnodecontainer":24,"./utils":26,"./webkitgradientcontainer":27}],12:[function(e,t,i){var n=e("./gradientcontainer"),r=e("./color");function o(e){n.apply(this,arguments),this.type=n.TYPES.LINEAR;var t=o.REGEXP_DIRECTION.test(e.args[0])||!n.REGEXP_COLORSTOP.test(e.args[0]);t?e.args[0].split(/\s+/).reverse().forEach((function(e,t){switch(e){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var i=this.y0,n=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=n,this.y1=i;break;case"center":break;default:var r=.01*parseFloat(e,10);if(isNaN(r))break;0===t?(this.y0=r,this.y1=1-this.y0):(this.x0=r,this.x1=1-this.x0)}}),this):(this.y0=0,this.y1=1),this.colorStops=e.args.slice(t?1:0).map((function(e){var t=e.match(n.REGEXP_COLORSTOP),i=+t[2],o=0===i?"%":t[3];return{color:new r(t[1]),stop:"%"===o?i/100:null}})),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach((function(e,t){null===e.stop&&this.colorStops.slice(t).some((function(i,n){return null!==i.stop&&(e.stop=(i.stop-this.colorStops[t-1].stop)/(n+1)+this.colorStops[t-1].stop,!0)}),this)}),this)}o.prototype=Object.create(n.prototype),o.REGEXP_DIRECTION=/^\s*(?:to|left|right|top|bottom|center|\d{1,3}(?:\.\d+)?%?)(?:\s|$)/i,t.exports=o},{"./color":3,"./gradientcontainer":9}],13:[function(e,t,i){var n=function(){n.options.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-n.options.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))};n.options={logging:!1},t.exports=n},{}],14:[function(e,t,i){var n=e("./color"),r=e("./utils"),o=r.getBounds,a=r.parseBackgrounds,s=r.offsetBounds;function l(e,t){this.node=e,this.parent=t,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function u(e){return-1!==e.toString().indexOf("%")}function c(e){return e.replace("px","")}function h(e){return parseFloat(e)}l.prototype.cloneTo=function(e){e.visible=this.visible,e.borders=this.borders,e.bounds=this.bounds,e.clip=this.clip,e.backgroundClip=this.backgroundClip,e.computedStyles=this.computedStyles,e.styles=this.styles,e.backgroundImages=this.backgroundImages,e.opacity=this.opacity},l.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat("opacity"):this.opacity},l.prototype.assignStack=function(e){this.stack=e,e.children.push(this)},l.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},l.prototype.css=function(e){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[e]||(this.styles[e]=this.computedStyles[e])},l.prototype.prefixedCss=function(e){var t=this.css(e);return void 0===t&&["webkit","moz","ms","o"].some((function(i){return void 0!==(t=this.css(i+e.substr(0,1).toUpperCase()+e.substr(1)))}),this),void 0===t?null:t},l.prototype.computedStyle=function(e){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,e)},l.prototype.cssInt=function(e){var t=parseInt(this.css(e),10);return isNaN(t)?0:t},l.prototype.color=function(e){return this.colors[e]||(this.colors[e]=new n(this.css(e)))},l.prototype.cssFloat=function(e){var t=parseFloat(this.css(e));return isNaN(t)?0:t},l.prototype.fontWeight=function(){var e=this.css("fontWeight");switch(parseInt(e,10)){case 401:e="bold";break;case 400:e="normal"}return e},l.prototype.parseClip=function(){var e=this.css("clip").match(this.CLIP);return e?{top:parseInt(e[1],10),right:parseInt(e[2],10),bottom:parseInt(e[3],10),left:parseInt(e[4],10)}:null},l.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=a(this.css("backgroundImage")))},l.prototype.cssList=function(e,t){var i=(this.css(e)||"").split(",");return 1===(i=(i=i[t||0]||i[0]||"auto").trim().split(" ")).length&&(i=[i[0],u(i[0])?"auto":i[0]]),i},l.prototype.parseBackgroundSize=function(e,t,i){var n,r,o=this.cssList("backgroundSize",i);if(u(o[0]))n=e.width*parseFloat(o[0])/100;else{if(/contain|cover/.test(o[0])){var a=e.width/e.height,s=t.width/t.height;return a<s^"contain"===o[0]?{width:e.height*s,height:e.height}:{width:e.width,height:e.width/s}}n=parseInt(o[0],10)}return r="auto"===o[0]&&"auto"===o[1]?t.height:"auto"===o[1]?n/t.width*t.height:u(o[1])?e.height*parseFloat(o[1])/100:parseInt(o[1],10),"auto"===o[0]&&(n=r/t.height*t.width),{width:n,height:r}},l.prototype.parseBackgroundPosition=function(e,t,i,n){var r,o,a=this.cssList("backgroundPosition",i);return r=u(a[0])?(e.width-(n||t).width)*(parseFloat(a[0])/100):parseInt(a[0],10),o="auto"===a[1]?r/t.width*t.height:u(a[1])?(e.height-(n||t).height)*parseFloat(a[1])/100:parseInt(a[1],10),"auto"===a[0]&&(r=o/t.height*t.width),{left:r,top:o}},l.prototype.parseBackgroundRepeat=function(e){return this.cssList("backgroundRepeat",e)[0]},l.prototype.parseTextShadows=function(){var e=this.css("textShadow"),t=[];if(e&&"none"!==e)for(var i=e.match(this.TEXT_SHADOW_PROPERTY),r=0;i&&r<i.length;r++){var o=i[r].match(this.TEXT_SHADOW_VALUES);t.push({color:new n(o[0]),offsetX:o[1]?parseFloat(o[1].replace("px","")):0,offsetY:o[2]?parseFloat(o[2].replace("px","")):0,blur:o[3]?o[3].replace("px",""):0})}return t},l.prototype.parseTransform=function(){if(!this.transformData)if(this.hasTransform()){var e=this.parseBounds(),t=this.prefixedCss("transformOrigin").split(" ").map(c).map(h);t[0]+=e.left,t[1]+=e.top,this.transformData={origin:t,matrix:this.parseTransformMatrix()}}else this.transformData={origin:[0,0],matrix:[1,0,0,1,0,0]};return this.transformData},l.prototype.parseTransformMatrix=function(){if(!this.transformMatrix){var e=this.prefixedCss("transform"),t=e?function(e){if(e&&"matrix"===e[1])return e[2].split(",").map((function(e){return parseFloat(e.trim())}));if(e&&"matrix3d"===e[1]){var t=e[2].split(",").map((function(e){return parseFloat(e.trim())}));return[t[0],t[1],t[4],t[5],t[12],t[13]]}}(e.match(this.MATRIX_PROPERTY)):null;this.transformMatrix=t||[1,0,0,1,0,0]}return this.transformMatrix},l.prototype.inverseTransform=function(){var e,t,i,n,r,o,a,s,l,u=this.parseTransform();return{origin:u.origin,matrix:(e=u.matrix,t=e[0],i=e[2],n=e[4],r=e[1],o=e[3],a=e[5],s=t*o-i*r,l=[o,-r,-i,t,i*a-n*o,n*r-t*a].map((function(e){return e/s})),l)}},l.prototype.parseBounds=function(){return this.bounds||(this.bounds=this.hasTransform()?s(this.node):o(this.node))},l.prototype.hasTransform=function(){return"1,0,0,1,0,0"!==this.parseTransformMatrix().join(",")||this.parent&&this.parent.hasTransform()},l.prototype.getValue=function(){var e,t,i=this.node.value||"";return"SELECT"===this.node.tagName?(e=this.node,i=(t=e.options[e.selectedIndex||0])&&t.text||""):"password"===this.node.type&&(i=Array(i.length+1).join("•")),0===i.length?this.node.placeholder||"":i},l.prototype.MATRIX_PROPERTY=/(matrix|matrix3d)\((.+)\)/,l.prototype.TEXT_SHADOW_PROPERTY=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,l.prototype.TEXT_SHADOW_VALUES=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g,l.prototype.CLIP=/^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/,t.exports=l},{"./color":3,"./utils":26}],15:[function(e,t,i){var n=e("./log"),r=e("punycode"),o=e("./nodecontainer"),a=e("./textcontainer"),s=e("./pseudoelementcontainer"),l=e("./fontmetrics"),u=e("./color"),c=e("./stackingcontext"),h=e("./utils"),d=h.bind,f=h.getBounds,p=h.parseBackgrounds,_=h.offsetBounds;function m(e,t,i,r,a){n("Starting NodeParser"),this.renderer=t,this.options=a,this.range=null,this.support=i,this.renderQueue=[],this.stack=new c(!0,1,e.ownerDocument,null);var s=new o(e,null);if(a.background&&t.rectangle(0,0,t.width,t.height,new u(a.background)),e===e.ownerDocument.documentElement){var h=new o(s.color("backgroundColor").isTransparent()?e.ownerDocument.body:e.ownerDocument.documentElement,null);t.rectangle(0,0,t.width,t.height,h.color("backgroundColor"))}s.visibile=s.isElementVisible(),this.createPseudoHideStyles(e.ownerDocument),this.disableAnimations(e.ownerDocument),this.nodes=k([s].concat(this.getChildren(s)).filter((function(e){return e.visible=e.isElementVisible()})).map(this.getPseudoElements,this)),this.fontMetrics=new l,n("Fetched nodes, total:",this.nodes.length),n("Calculate overflow clips"),this.calculateOverflowClips(),n("Start fetching images"),this.images=r.fetch(this.nodes.filter(N)),this.ready=this.images.ready.then(d((function(){return n("Images loaded, starting parsing"),n("Creating stacking contexts"),this.createStackingContexts(),n("Sorting stacking contexts"),this.sortStackingContexts(this.stack),this.parse(this.stack),n("Render queue created with "+this.renderQueue.length+" items"),new Promise(d((function(e){a.async?"function"==typeof a.async?a.async.call(this,this.renderQueue,e):this.renderQueue.length>0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,e)):e():(this.renderQueue.forEach(this.paint,this),e())}),this))}),this))}function g(e){return e.parent&&e.parent.clip.length}function x(){}m.prototype.calculateOverflowClips=function(){this.nodes.forEach((function(e){if(N(e)){F(e)&&e.appendToDOM(),e.borders=this.parseBorders(e);var t="hidden"===e.css("overflow")?[e.borders.clip]:[],i=e.parseClip();i&&-1!==["absolute","fixed"].indexOf(e.css("position"))&&t.push([["rect",e.bounds.left+i.left,e.bounds.top+i.top,i.right-i.left,i.bottom-i.top]]),e.clip=g(e)?e.parent.clip.concat(t):t,e.backgroundClip="hidden"!==e.css("overflow")?e.clip.concat([e.borders.clip]):e.clip,F(e)&&e.cleanDOM()}else U(e)&&(e.clip=g(e)?e.parent.clip:[]);F(e)||(e.bounds=null)}),this)},m.prototype.asyncRenderer=function(e,t,i){i=i||Date.now(),this.paint(e[this.renderIndex++]),e.length===this.renderIndex?t():i+20>Date.now()?this.asyncRenderer(e,t,i):setTimeout(d((function(){this.asyncRenderer(e,t)}),this),0)},m.prototype.createPseudoHideStyles=function(e){this.createStyles(e,"."+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},m.prototype.disableAnimations=function(e){this.createStyles(e,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},m.prototype.createStyles=function(e,t){var i=e.createElement("style");i.innerHTML=t,e.body.appendChild(i)},m.prototype.getPseudoElements=function(e){var t=[[e]];if(e.node.nodeType===Node.ELEMENT_NODE){var i=this.getPseudoElement(e,":before"),n=this.getPseudoElement(e,":after");i&&t.push(i),n&&t.push(n)}return k(t)},m.prototype.getPseudoElement=function(e,t){var i,n,r=e.computedStyle(t);if(!r||!r.content||"none"===r.content||"-moz-alt-content"===r.content||"none"===r.display)return null;for(var o=(i=r.content,n=void 0,(n=i.substr(0,1))===i.substr(i.length-1)&&n.match(/'|"/)?i.substr(1,i.length-2):i),l="url"===o.substr(0,3),u=document.createElement(l?"img":"html2canvaspseudoelement"),c=new s(u,e,t),h=r.length-1;h>=0;h--){var d=r.item(h).replace(/(\-[a-z])/g,(function(e){return e.toUpperCase().replace("-","")}));u.style[d]=r[d]}if(u.className=s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,l)return u.src=p(o)[0].args[0],[c];var f=document.createTextNode(o);return u.appendChild(f),[c,new a(f,c)]},m.prototype.getChildren=function(e){return k([].filter.call(e.node.childNodes,O).map((function(t){var i=[t.nodeType===Node.TEXT_NODE?new a(t,e):new o(t,e)].filter(V);return t.nodeType===Node.ELEMENT_NODE&&i.length&&"TEXTAREA"!==t.tagName?i[0].isElementVisible()?i.concat(this.getChildren(i[0])):[]:i}),this))},m.prototype.newStackingContext=function(e,t){var i=new c(t,e.getOpacity(),e.node,e.parent);e.cloneTo(i),(t?i.getParentStack(this):i.parent.stack).contexts.push(i),e.stack=i},m.prototype.createStackingContexts=function(){this.nodes.forEach((function(e){var t,i;N(e)&&(this.isRootElement(e)||e.getOpacity()<1||(i=(t=e).css("position"),"auto"!==(-1!==["absolute","relative","fixed"].indexOf(i)?t.css("zIndex"):"auto"))||this.isBodyWithTransparentRoot(e)||e.hasTransform())?this.newStackingContext(e,!0):N(e)&&(I(e)&&A(e)||-1!==["inline-block","inline-table"].indexOf(e.css("display"))||D(e))?this.newStackingContext(e,!1):e.assignStack(e.parent.stack)}),this)},m.prototype.isBodyWithTransparentRoot=function(e){return"BODY"===e.node.nodeName&&e.parent.color("backgroundColor").isTransparent()},m.prototype.isRootElement=function(e){return null===e.parent},m.prototype.sortStackingContexts=function(e){var t;e.contexts.sort((t=e.contexts.slice(0),function(e,i){return e.cssInt("zIndex")+t.indexOf(e)/t.length-(i.cssInt("zIndex")+t.indexOf(i)/t.length)})),e.contexts.forEach(this.sortStackingContexts,this)},m.prototype.parseTextBounds=function(e){return function(t,i,n){if("none"!==e.parent.css("textDecoration").substr(0,4)||0!==t.trim().length){if(this.support.rangeBounds&&!e.parent.hasTransform()){var r=n.slice(0,i).join("").length;return this.getRangeBounds(e.node,r,t.length)}if(e.node&&"string"==typeof e.node.data){var o=e.node.splitText(t.length),a=this.getWrapperBounds(e.node,e.parent.hasTransform());return e.node=o,a}}else(!this.support.rangeBounds||e.parent.hasTransform())&&(e.node=e.node.splitText(t.length));return{}}},m.prototype.getWrapperBounds=function(e,t){var i=e.ownerDocument.createElement("html2canvaswrapper"),n=e.parentNode,r=e.cloneNode(!0);i.appendChild(e.cloneNode(!0)),n.replaceChild(i,e);var o=t?_(i):f(i);return n.replaceChild(r,i),o},m.prototype.getRangeBounds=function(e,t,i){var n=this.range||(this.range=e.ownerDocument.createRange());return n.setStart(e,t),n.setEnd(e,t+i),n.getBoundingClientRect()},m.prototype.parse=function(e){var t=e.contexts.filter(E),i=e.children.filter(N),n=i.filter(B(D)),r=n.filter(B(I)).filter(B(L)),o=i.filter(B(I)).filter(D),a=n.filter(B(I)).filter(L),s=e.contexts.concat(n.filter(I)).filter(A),l=e.children.filter(U).filter(R),u=e.contexts.filter(P);t.concat(r).concat(o).concat(a).concat(s).concat(l).concat(u).forEach((function(e){this.renderQueue.push(e),M(e)&&(this.parse(e),this.renderQueue.push(new x))}),this)},m.prototype.paint=function(e){try{e instanceof x?this.renderer.ctx.restore():U(e)?(F(e.parent)&&e.parent.appendToDOM(),this.paintText(e),F(e.parent)&&e.parent.cleanDOM()):this.paintNode(e)}catch(e){if(n(e),this.options.strict)throw e}},m.prototype.paintNode=function(e){M(e)&&(this.renderer.setOpacity(e.opacity),this.renderer.ctx.save(),e.hasTransform()&&this.renderer.setTransform(e.parseTransform())),"INPUT"===e.node.nodeName&&"checkbox"===e.node.type?this.paintCheckbox(e):"INPUT"===e.node.nodeName&&"radio"===e.node.type?this.paintRadio(e):this.paintElement(e)},m.prototype.paintElement=function(e){var t=e.parseBounds();this.renderer.clip(e.backgroundClip,(function(){this.renderer.renderBackground(e,t,e.borders.borders.map(z))}),this,e),this.renderer.mask(e.backgroundClip,(function(){this.renderer.renderShadows(e,e.borders.clip)}),this,e),this.renderer.clip(e.clip,(function(){this.renderer.renderBorders(e.borders.borders)}),this,e),this.renderer.clip(e.backgroundClip,(function(){switch(e.node.nodeName){case"svg":case"IFRAME":var i=this.images.get(e.node);i?this.renderer.renderImage(e,t,e.borders,i):n("Error loading <"+e.node.nodeName+">",e.node);break;case"IMG":var r=this.images.get(e.node.src);r?this.renderer.renderImage(e,t,e.borders,r):n("Error loading <img>",e.node.src);break;case"CANVAS":this.renderer.renderImage(e,t,e.borders,{image:e.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(e)}}),this,e)},m.prototype.paintCheckbox=function(e){var t=e.parseBounds(),i=Math.min(t.width,t.height),n={width:i-1,height:i-1,top:t.top,left:t.left},r=[3,3],o=[r,r,r,r],a=[1,1,1,1].map((function(e){return{color:new u("#A5A5A5"),width:e}})),s=b(n,o,a);this.renderer.clip(e.backgroundClip,(function(){this.renderer.rectangle(n.left+1,n.top+1,n.width-2,n.height-2,new u("#DEDEDE")),this.renderer.renderBorders(y(a,n,s,o)),e.node.checked&&(this.renderer.font(new u("#424242"),"normal","normal","bold",i-3+"px","arial"),this.renderer.text("✔",n.left+i/6,n.top+i-1))}),this,e)},m.prototype.paintRadio=function(e){var t=e.parseBounds(),i=Math.min(t.width,t.height)-2;this.renderer.clip(e.backgroundClip,(function(){this.renderer.circleStroke(t.left+1,t.top+1,i,new u("#DEDEDE"),1,new u("#A5A5A5")),e.node.checked&&this.renderer.circle(Math.ceil(t.left+i/4)+1,Math.ceil(t.top+i/4)+1,Math.floor(i/2),new u("#424242"))}),this,e)},m.prototype.paintFormValue=function(e){var t=e.getValue();if(t.length>0){var i=e.node.ownerDocument,r=i.createElement("html2canvaswrapper");["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"].forEach((function(t){try{r.style[t]=e.css(t)}catch(e){n("html2canvas: Parse: Exception caught in renderFormValue: "+e.message)}}));var o=e.parseBounds();r.style.position="fixed",r.style.left=o.left+"px",r.style.top=o.top+"px",r.textContent=t,i.body.appendChild(r),this.paintText(new a(r.firstChild,e)),i.body.removeChild(r)}},m.prototype.paintText=function(e){e.applyTextTransform();var t,i=r.ucs2.decode(e.node.data),n=(!this.options.letterRendering||/^(normal|none|0px)$/.test(e.parent.css("letterSpacing")))&&(t=e.node.data,!/[^\u0000-\u00ff]/.test(t)),o=n?function(e){for(var t,i=[],n=0,o=!1;e.length;)W(e[n])===o?((t=e.splice(0,n)).length&&i.push(r.ucs2.encode(t)),o=!o,n=0):n++,n>=e.length&&(t=e.splice(0,n)).length&&i.push(r.ucs2.encode(t));return i}(i):i.map((function(e){return r.ucs2.encode([e])}));n||(e.parent.node.style.fontVariantLigatures="none");var a=e.parent.fontWeight(),s=e.parent.css("fontSize"),l=e.parent.css("fontFamily"),u=e.parent.parseTextShadows();this.renderer.font(e.parent.color("color"),e.parent.css("fontStyle"),e.parent.css("fontVariant"),a,s,l),u.length?this.renderer.fontShadow(u[0].color,u[0].offsetX,u[0].offsetY,u[0].blur):this.renderer.clearShadow(),this.renderer.clip(e.parent.clip,(function(){o.map(this.parseTextBounds(e),this).forEach((function(t,i){t&&(this.renderer.text(o[i],t.left,t.bottom),this.renderTextDecoration(e.parent,t,this.fontMetrics.getMetrics(l,s)))}),this)}),this,e.parent)},m.prototype.renderTextDecoration=function(e,t,i){switch(e.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(t.left,Math.round(t.top+i.baseline+i.lineWidth),t.width,1,e.color("color"));break;case"overline":this.renderer.rectangle(t.left,Math.round(t.top),t.width,1,e.color("color"));break;case"line-through":this.renderer.rectangle(t.left,Math.ceil(t.top+i.middle+i.lineWidth),t.width,1,e.color("color"))}};var v={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};function y(e,t,i,n){var r={top:t.top+e[0].width/2,right:t.right-e[1].width/2,bottom:t.bottom-e[2].width/2,left:t.left+e[3].width/2};return e.map((function(o,a){if(o.width>0){var s=t.left,l=t.top,u=t.width,c=t.height-e[2].width;switch(a){case 0:c=e[0].width,o.args=C({c1:[s,l],c2:[s+u,l],c3:[s+u-e[1].width,l+c],c4:[s+e[3].width,l+c]},n[0],n[1],i.topLeftOuter,i.topLeftInner,i.topRightOuter,i.topRightInner),o.pathArgs=S({c1:[r.left,r.top],c2:[r.right,r.top]},n[0],n[1],i.topLeft,i.topRight);break;case 1:s=t.left+t.width-e[1].width,u=e[1].width,o.args=C({c1:[s+u,l],c2:[s+u,l+c+e[2].width],c3:[s,l+c],c4:[s,l+e[0].width]},n[1],n[2],i.topRightOuter,i.topRightInner,i.bottomRightOuter,i.bottomRightInner),o.pathArgs=S({c1:[r.right,r.top],c2:[r.right,r.bottom]},n[1],n[2],i.topRight,i.bottomRight);break;case 2:l=l+t.height-e[2].width,c=e[2].width,o.args=C({c1:[s+u,l+c],c2:[s,l+c],c3:[s+e[3].width,l],c4:[s+u-e[3].width,l]},n[2],n[3],i.bottomRightOuter,i.bottomRightInner,i.bottomLeftOuter,i.bottomLeftInner),o.pathArgs=S({c1:[r.right,r.bottom],c2:[r.left,r.bottom]},n[2],n[3],i.bottomRight,i.bottomLeft);break;case 3:u=e[3].width,o.args=C({c1:[s,l+c+e[2].width],c2:[s,l],c3:[s+u,l+e[0].width],c4:[s+u,l+c]},n[3],n[0],i.bottomLeftOuter,i.bottomLeftInner,i.topLeftOuter,i.topLeftInner),o.pathArgs=S({c1:[r.left,r.bottom],c2:[r.left,r.top]},n[3],n[0],i.bottomLeft,i.topLeft)}}return o}))}function $(e,t,i,n){var r=(Math.sqrt(2)-1)/3*4,o=i*r,a=n*r,s=e+i,l=t+n;return{topLeft:T({x:e,y:l},{x:e,y:l-a},{x:s-o,y:t},{x:s,y:t}),topRight:T({x:e,y:t},{x:e+o,y:t},{x:s,y:l-a},{x:s,y:l}),bottomRight:T({x:s,y:t},{x:s,y:t+a},{x:e+o,y:l},{x:e,y:l}),bottomLeft:T({x:s,y:l},{x:s-o,y:l},{x:e,y:t+a},{x:e,y:t})}}function b(e,t,i){var n=e.left,r=e.top,o=e.width,a=e.height,s=t[0][0]<o/2?t[0][0]:o/2,l=t[0][1]<a/2?t[0][1]:a/2,u=t[1][0]<o/2?t[1][0]:o/2,c=t[1][1]<a/2?t[1][1]:a/2,h=t[2][0]<o/2?t[2][0]:o/2,d=t[2][1]<a/2?t[2][1]:a/2,f=t[3][0]<o/2?t[3][0]:o/2,p=t[3][1]<a/2?t[3][1]:a/2,_=o-u,m=a-d,g=o-h,x=a-p;return{topLeft:$(n+i[3].width/2,r+i[0].width/2,Math.max(0,s-i[3].width/2),Math.max(0,l-i[0].width/2)).topLeft.subdivide(.5),topRight:$(n+Math.min(_,o+i[3].width/2),r+i[0].width/2,_>o+i[3].width/2?0:u-i[3].width/2,c-i[0].width/2).topRight.subdivide(.5),bottomRight:$(n+Math.min(g,o-i[3].width/2),r+Math.min(m,a+i[0].width/2),Math.max(0,h-i[1].width/2),d-i[2].width/2).bottomRight.subdivide(.5),bottomLeft:$(n+i[3].width/2,r+x,Math.max(0,f-i[3].width/2),p-i[2].width/2).bottomLeft.subdivide(.5),topLeftOuter:$(n,r,s,l).topLeft.subdivide(.5),topLeftInner:$(n+i[3].width,r+i[0].width,Math.max(0,s-i[3].width),Math.max(0,l-i[0].width)).topLeft.subdivide(.5),topRightOuter:$(n+_,r,u,c).topRight.subdivide(.5),topRightInner:$(n+Math.min(_,o+i[3].width),r+i[0].width,_>o+i[3].width?0:u-i[3].width,c-i[0].width).topRight.subdivide(.5),bottomRightOuter:$(n+g,r+m,h,d).bottomRight.subdivide(.5),bottomRightInner:$(n+Math.min(g,o-i[3].width),r+Math.min(m,a+i[0].width),Math.max(0,h-i[1].width),d-i[2].width).bottomRight.subdivide(.5),bottomLeftOuter:$(n,r+x,f,p).bottomLeft.subdivide(.5),bottomLeftInner:$(n+i[3].width,r+x,Math.max(0,f-i[3].width),p-i[2].width).bottomLeft.subdivide(.5)}}function T(e,t,i,n){var r=function(e,t,i){return{x:e.x+(t.x-e.x)*i,y:e.y+(t.y-e.y)*i}};return{start:e,startControl:t,endControl:i,end:n,subdivide:function(o){var a=r(e,t,o),s=r(t,i,o),l=r(i,n,o),u=r(a,s,o),c=r(s,l,o),h=r(u,c,o);return[T(e,a,u,h),T(h,c,l,n)]},curveTo:function(e){e.push(["bezierCurve",t.x,t.y,i.x,i.y,n.x,n.y])},curveToReversed:function(n){n.push(["bezierCurve",i.x,i.y,t.x,t.y,e.x,e.y])}}}function C(e,t,i,n,r,o,a){var s=[];return t[0]>0||t[1]>0?(s.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(s)):s.push(["line",e.c1[0],e.c1[1]]),i[0]>0||i[1]>0?(s.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(s),s.push(["line",a[0].end.x,a[0].end.y]),a[0].curveToReversed(s)):(s.push(["line",e.c2[0],e.c2[1]]),s.push(["line",e.c3[0],e.c3[1]])),t[0]>0||t[1]>0?(s.push(["line",r[1].end.x,r[1].end.y]),r[1].curveToReversed(s)):s.push(["line",e.c4[0],e.c4[1]]),s}function S(e,t,i,n,r){var o=[];return t[0]>0||t[1]>0?(o.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(o)):o.push(["line",e.c1[0],e.c1[1]]),i[0]>0||i[1]>0?(o.push(["line",r[0].start.x,r[0].start.y]),r[0].curveTo(o)):o.push(["line",e.c2[0],e.c2[1]]),o}function w(e,t,i,n,r,o,a){t[0]>0||t[1]>0?(e.push(["line",n[0].start.x,n[0].start.y]),n[0].curveTo(e),n[1].curveTo(e)):e.push(["line",o,a]),(i[0]>0||i[1]>0)&&e.push(["line",r[0].start.x,r[0].start.y])}function E(e){return e.cssInt("zIndex")<0}function P(e){return e.cssInt("zIndex")>0}function A(e){return 0===e.cssInt("zIndex")}function L(e){return-1!==["inline","inline-block","inline-table"].indexOf(e.css("display"))}function M(e){return e instanceof c}function R(e){return e.node.data.trim().length>0}function O(e){return e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE}function I(e){return"static"!==e.css("position")}function D(e){return"none"!==e.css("float")}function B(e){var t=this;return function(){return!e.apply(t,arguments)}}function N(e){return e.node.nodeType===Node.ELEMENT_NODE}function F(e){return!0===e.isPseudoElement}function U(e){return e.node.nodeType===Node.TEXT_NODE}function G(e){return parseInt(e,10)}function z(e){return e.width}function V(e){return e.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(e.node.nodeName)}function k(e){return[].concat.apply([],e)}function W(e){return-1!==[32,13,10,9,45].indexOf(e)}m.prototype.parseBorders=function(e){var t,i=e.parseBounds(),n=(t=e,["TopLeft","TopRight","BottomRight","BottomLeft"].map((function(e){var i=t.css("border"+e+"Radius").split(" ");return i.length<=1&&(i[1]=i[0]),i.map(G)}))),r=["Top","Right","Bottom","Left"].map((function(t,i){var n=e.css("border"+t+"Style"),r=e.color("border"+t+"Color");"inset"===n&&r.isBlack()&&(r=new u([255,255,255,r.a]));var o=v[n]?v[n][i]:null;return{width:e.cssInt("border"+t+"Width"),color:o?r[o[0]](o[1]):r,style:n,pathArgs:null,args:null}})),o=b(i,n,r);return{clip:this.parseBackgroundClip(e,o,r,n,i),borders:y(r,i,o,n)}},m.prototype.parseBackgroundClip=function(e,t,i,n,r){var o=[];switch(e.css("backgroundClip")){case"content-box":case"padding-box":w(o,n[0],n[1],t.topLeftInner,t.topRightInner,r.left+i[3].width,r.top+i[0].width),w(o,n[1],n[2],t.topRightInner,t.bottomRightInner,r.left+r.width-i[1].width,r.top+i[0].width),w(o,n[2],n[3],t.bottomRightInner,t.bottomLeftInner,r.left+r.width-i[1].width,r.top+r.height-i[2].width),w(o,n[3],n[0],t.bottomLeftInner,t.topLeftInner,r.left+i[3].width,r.top+r.height-i[2].width);break;default:w(o,n[0],n[1],t.topLeftOuter,t.topRightOuter,r.left,r.top),w(o,n[1],n[2],t.topRightOuter,t.bottomRightOuter,r.left+r.width,r.top),w(o,n[2],n[3],t.bottomRightOuter,t.bottomLeftOuter,r.left+r.width,r.top+r.height),w(o,n[3],n[0],t.bottomLeftOuter,t.topLeftOuter,r.left,r.top+r.height)}return o},t.exports=m},{"./color":3,"./fontmetrics":7,"./log":13,"./nodecontainer":14,"./pseudoelementcontainer":18,"./stackingcontext":21,"./textcontainer":25,"./utils":26,punycode:1}],16:[function(e,t,i){var n=e("./xhr"),r=e("./utils"),o=e("./log"),a=e("./clone"),s=r.decode64;function l(e,t,i){var r="withCredentials"in new XMLHttpRequest;if(!t)return Promise.reject("No proxy configured");var o=h(r),a=d(t,e,o);return r?n(a):c(i,a,o).then((function(e){return s(e.content)}))}var u=0;function c(e,t,i){return new Promise((function(n,r){var o=e.createElement("script"),a=function(){delete window.html2canvas.proxy[i],e.body.removeChild(o)};window.html2canvas.proxy[i]=function(e){a(),n(e)},o.src=t,o.onerror=function(e){a(),r(e)},e.body.appendChild(o)}))}function h(e){return e?"":"html2canvas_"+Date.now()+"_"+ ++u+"_"+Math.round(1e5*Math.random())}function d(e,t,i){return e+"?url="+encodeURIComponent(t)+(i.length?"&callback=html2canvas.proxy."+i:"")}i.Proxy=l,i.ProxyURL=function(e,t,i){var n="crossOrigin"in new Image,r=h(n),o=d(t,e,r);return n?Promise.resolve(o):c(i,o,r).then((function(e){return"data:"+e.type+";base64,"+e.content}))},i.loadUrlDocument=function(e,t,i,n,r,s){return new l(e,t,window.document).then((u=e,function(e){var t,i=new DOMParser;try{t=i.parseFromString(e,"text/html")}catch{o("DOMParser not supported, falling back to createHTMLDocument"),t=document.implementation.createHTMLDocument("");try{t.open(),t.write(e),t.close()}catch{o("createHTMLDocument write not supported, falling back to document.body.innerHTML"),t.body.innerHTML=e}}var n=t.querySelector("base");if(!n||!n.href.host){var r=t.createElement("base");r.href=u,t.head.insertBefore(r,t.head.firstChild)}return t})).then((function(e){return a(e,i,n,r,s,0,0)}));var u}},{"./clone":2,"./log":13,"./utils":26,"./xhr":28}],17:[function(e,t,i){var n=e("./proxy").ProxyURL;t.exports=function(e,t){var i=document.createElement("a");i.href=e,e=i.href,this.src=e,this.image=new Image;var r=this;this.promise=new Promise((function(i,o){r.image.crossOrigin="Anonymous",r.image.onload=i,r.image.onerror=o,new n(e,t,document).then((function(e){r.image.src=e})).catch(o)}))}},{"./proxy":16}],18:[function(e,t,i){var n=e("./nodecontainer");function r(e,t,i){n.call(this,e,t),this.isPseudoElement=!0,this.before=":before"===i}r.prototype.cloneTo=function(e){r.prototype.cloneTo.call(this,e),e.isPseudoElement=!0,e.before=this.before},r.prototype=Object.create(n.prototype),r.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},r.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},r.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",t.exports=r},{"./nodecontainer":14}],19:[function(e,t,i){var n=e("./log");function r(e,t,i,n,r){this.width=e,this.height=t,this.images=i,this.options=n,this.document=r}r.prototype.renderImage=function(e,t,i,n){var r=e.cssInt("paddingLeft"),o=e.cssInt("paddingTop"),a=e.cssInt("paddingRight"),s=e.cssInt("paddingBottom"),l=i.borders,u=t.width-(l[1].width+l[3].width+r+a),c=t.height-(l[0].width+l[2].width+o+s);this.drawImage(n,0,0,n.image.width||u,n.image.height||c,t.left+r+l[3].width,t.top+o+l[0].width,u,c)},r.prototype.renderBackground=function(e,t,i){t.height>0&&t.width>0&&(this.renderBackgroundColor(e,t),this.renderBackgroundImage(e,t,i))},r.prototype.renderBackgroundColor=function(e,t){var i=e.color("backgroundColor");i.isTransparent()||this.rectangle(t.left,t.top,t.width,t.height,i)},r.prototype.renderShadows=function(e,t){var i=e.css("boxShadow");if("none"!==i){var n=i.split(/,(?![^(]*\))/);this.shadow(t,n)}},r.prototype.renderBorders=function(e){e.forEach(this.renderBorder,this)},r.prototype.renderBorder=function(e){if(!e.color.isTransparent()&&null!==e.args)if("dashed"===e.style||"dotted"===e.style){var t="dashed"===e.style?3:e.width;this.ctx.setLineDash([t]),this.path(e.pathArgs),this.ctx.strokeStyle=e.color,this.ctx.lineWidth=e.width,this.ctx.stroke()}else this.drawShape(e.args,e.color)},r.prototype.renderBackgroundImage=function(e,t,i){e.parseBackgroundImages().reverse().forEach((function(r,o,a){switch(r.method){case"url":var s=this.images.get(r.args[0]);s?this.renderBackgroundRepeating(e,t,s,a.length-(o+1),i):n("Error loading background-image",r.args[0]);break;case"linear-gradient":case"gradient":var l=this.images.get(r.value);l?this.renderBackgroundGradient(l,t,i):n("Error loading background-image",r.args[0]);break;case"none":break;default:n("Unknown background-image type",r.args[0])}}),this)},r.prototype.renderBackgroundRepeating=function(e,t,i,n,r){var o=e.parseBackgroundSize(t,i.image,n),a=e.parseBackgroundPosition(t,i.image,n,o);switch(e.parseBackgroundRepeat(n)){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(i,a,o,t,t.left+r[3],t.top+a.top+r[0],99999,o.height,r);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(i,a,o,t,t.left+a.left+r[3],t.top+r[0],o.width,99999,r);break;case"no-repeat":this.backgroundRepeatShape(i,a,o,t,t.left+a.left+r[3],t.top+a.top+r[0],o.width,o.height,r);break;default:this.renderBackgroundRepeat(i,a,o,{top:t.top,left:t.left},r[3],r[0])}},t.exports=r},{"./log":13}],20:[function(e,t,i){var n=e("../renderer"),r=e("../lineargradientcontainer"),o=e("../log");function a(e,t){n.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.options.canvas||(this.options.dpi&&(this.options.scale=this.options.dpi/96),this.options.scale?(this.canvas.style.width=e+"px",this.canvas.style.height=t+"px",this.canvas.width=Math.floor(e*this.options.scale),this.canvas.height=Math.floor(t*this.options.scale),this.ctx.scale(this.options.scale,this.options.scale)):(this.canvas.width=e,this.canvas.height=t)),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},o("Initialized CanvasRenderer with size",e,"x",t)}function s(e){return e.length>0}a.prototype=Object.create(n.prototype),a.prototype.setFillStyle=function(e){return this.ctx.fillStyle="object"==typeof e&&e.isColor?e.toString():e,this.ctx},a.prototype.rectangle=function(e,t,i,n,r){this.setFillStyle(r).fillRect(e,t,i,n)},a.prototype.circle=function(e,t,i,n){this.setFillStyle(n),this.ctx.beginPath(),this.ctx.arc(e+i/2,t+i/2,i/2,0,2*Math.PI,!0),this.ctx.closePath(),this.ctx.fill()},a.prototype.circleStroke=function(e,t,i,n,r,o){this.circle(e,t,i,n),this.ctx.strokeStyle=o.toString(),this.ctx.stroke()},a.prototype.shadow=function(e,t){var i=this.setFillStyle("white");i.save(),this.shape(e),t.forEach((function(e){var t=function(e){var t={color:/^(#|rgb|hsl|(?!(inset|initial|inherit))\D+)/i,inset:/^inset/i,px:/px$/i},i=["x","y","blur","spread"],n=e.split(/ (?![^(]*\))/),r={};for(var o in t)r[o]=n.filter(t[o].test.bind(t[o])),r[o]=0===r[o].length?null:1===r[o].length?r[o][0]:r[o];for(var a=0;a<r.px.length;a++)r[i[a]]=parseInt(r.px[a]);return r}(e);t.inset||(i.shadowOffsetX=t.x,i.shadowOffsetY=t.y,i.shadowColor=t.color,i.shadowBlur=t.blur,i.fill())}),this),i.restore()},a.prototype.drawShape=function(e,t){this.shape(e),this.setFillStyle(t).fill()},a.prototype.taints=function(e){if(null===e.tainted){this.taintCtx.drawImage(e.image,0,0);try{this.taintCtx.getImageData(0,0,1,1),e.tainted=!1}catch{this.taintCtx=document.createElement("canvas").getContext("2d"),e.tainted=!0}}return e.tainted},a.prototype.drawImage=function(e,t,i,n,r,o,a,s,l){(!this.taints(e)||this.options.allowTaint)&&this.ctx.drawImage(e.image,t,i,n,r,o,a,s,l)},a.prototype.clip=function(e,t,i,n){this.ctx.save(),n&&n.hasTransform()?(this.setTransform(n.inverseTransform()),e.filter(s).forEach((function(e){this.shape(e).clip()}),this),this.setTransform(n.parseTransform())):e.filter(s).forEach((function(e){this.shape(e).clip()}),this),t.call(i),this.ctx.restore()},a.prototype.mask=function(e,t,i,n){var r=e[e.length-1];if(r&&r.length){var o=[["rect",this.canvas.width,0,-this.canvas.width,this.canvas.height]].concat(r).concat([r[0]]);e=e.slice(0,-1).concat([o])}this.clip(e,t,i,n)},a.prototype.shape=function(e){return this.ctx.beginPath(),e.forEach((function(e,t){"rect"===e[0]?this.ctx.rect.apply(this.ctx,e.slice(1)):this.ctx[0===t?"moveTo":e[0]+"To"].apply(this.ctx,e.slice(1))}),this),this.ctx.closePath(),this.ctx},a.prototype.path=function(e){return this.ctx.beginPath(),e.forEach((function(e,t){"rect"===e[0]?this.ctx.rect.apply(this.ctx,e.slice(1)):this.ctx[0===t?"moveTo":e[0]+"To"].apply(this.ctx,e.slice(1))}),this),this.ctx},a.prototype.font=function(e,t,i,n,r,o){i=/^(normal|small-caps)$/i.test(i)?i:"",this.setFillStyle(e).font=[t,i,n,r,o].join(" ").split(",")[0]},a.prototype.fontShadow=function(e,t,i,n){this.setVariable("shadowColor",e.toString()).setVariable("shadowOffsetY",t).setVariable("shadowOffsetX",i).setVariable("shadowBlur",n)},a.prototype.clearShadow=function(){this.setVariable("shadowColor","rgba(0,0,0,0)")},a.prototype.setOpacity=function(e){this.ctx.globalAlpha=e},a.prototype.setTransform=function(e){this.ctx.translate(e.origin[0],e.origin[1]),this.ctx.transform.apply(this.ctx,e.matrix),this.ctx.translate(-e.origin[0],-e.origin[1])},a.prototype.setVariable=function(e,t){return this.variables[e]!==t&&(this.variables[e]=this.ctx[e]=t),this},a.prototype.text=function(e,t,i){this.ctx.fillText(e,t,i)},a.prototype.backgroundRepeatShape=function(e,t,i,n,r,o,a,s,l){var u=[["line",Math.round(r),Math.round(o)],["line",Math.round(r+a),Math.round(o)],["line",Math.round(r+a),Math.round(s+o)],["line",Math.round(r),Math.round(s+o)]];this.clip([u],(function(){this.renderBackgroundRepeat(e,t,i,n,l[3],l[0])}),this)},a.prototype.renderBackgroundRepeat=function(e,t,i,n,r,o){var a=Math.round(n.left+t.left+r),s=Math.round(n.top+t.top+o);this.setFillStyle(this.ctx.createPattern(this.resizeImage(e,i),"repeat")),this.ctx.translate(a,s),this.ctx.fill(),this.ctx.translate(-a,-s)},a.prototype.renderBackgroundGradient=function(e,t){if(e instanceof r){var i=this.ctx.createLinearGradient(t.left+t.width*e.x0,t.top+t.height*e.y0,t.left+t.width*e.x1,t.top+t.height*e.y1);e.colorStops.forEach((function(e){i.addColorStop(e.stop,e.color.toString())})),this.rectangle(t.left,t.top,t.width,t.height,i)}},a.prototype.resizeImage=function(e,t){var i=e.image;if(i.width===t.width&&i.height===t.height)return i;var n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(i,0,0,i.width,i.height,0,0,t.width,t.height),n},t.exports=a},{"../lineargradientcontainer":12,"../log":13,"../renderer":19}],21:[function(e,t,i){var n=e("./nodecontainer");function r(e,t,i,r){n.call(this,i,r),this.ownStacking=e,this.contexts=[],this.children=[],this.opacity=(this.parent?this.parent.stack.opacity:1)*t}r.prototype=Object.create(n.prototype),r.prototype.getParentStack=function(e){var t=this.parent?this.parent.stack:null;return t?t.ownStacking?t:t.getParentStack(e):e.stack},t.exports=r},{"./nodecontainer":14}],22:[function(e,t,i){function n(e){this.rangeBounds=this.testRangeBounds(e),this.cors=this.testCORS(),this.svg=this.testSVG()}n.prototype.testRangeBounds=function(e){var t,i,n=!1;return e.createRange&&((t=e.createRange()).getBoundingClientRect&&((i=e.createElement("boundtest")).style.height="123px",i.style.display="block",e.body.appendChild(i),t.selectNode(i),123===t.getBoundingClientRect().height&&(n=!0),e.body.removeChild(i))),n},n.prototype.testCORS=function(){return typeof(new Image).crossOrigin<"u"},n.prototype.testSVG=function(){var e=new Image,t=document.createElement("canvas"),i=t.getContext("2d");e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(e,0,0),t.toDataURL()}catch{return!1}return!0},t.exports=n},{}],23:[function(e,t,i){var n=e("./xhr"),r=e("./utils").decode64;function o(e){this.src=e,this.image=null;var t=this;this.promise=this.hasFabric().then((function(){return t.isInline(e)?Promise.resolve(t.inlineFormatting(e)):n(e)})).then((function(e){return new Promise((function(i){window.html2canvas.svg.fabric.loadSVGFromString(e,t.createCanvas.call(t,i))}))}))}o.prototype.hasFabric=function(){return window.html2canvas.svg&&window.html2canvas.svg.fabric?Promise.resolve():Promise.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},o.prototype.inlineFormatting=function(e){return/^data:image\/svg\+xml;base64,/.test(e)?this.decode64(this.removeContentType(e)):this.removeContentType(e)},o.prototype.removeContentType=function(e){return e.replace(/^data:image\/svg\+xml(;base64)?,/,"")},o.prototype.isInline=function(e){return/^data:image\/svg\+xml/i.test(e)},o.prototype.createCanvas=function(e){var t=this;return function(i,n){var r=new window.html2canvas.svg.fabric.StaticCanvas("c");t.image=r.lowerCanvasEl,r.setWidth(n.width).setHeight(n.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(i,n)).renderAll(),e(r.lowerCanvasEl)}},o.prototype.decode64=function(e){return"function"==typeof window.atob?window.atob(e):r(e)},t.exports=o},{"./utils":26,"./xhr":28}],24:[function(e,t,i){var n=e("./svgcontainer");function r(e,t){this.src=e,this.image=null;var i=this;this.promise=t?new Promise((function(t,n){i.image=new Image,i.image.onload=t,i.image.onerror=n,i.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(e),!0===i.image.complete&&t(i.image)})):this.hasFabric().then((function(){return new Promise((function(t){window.html2canvas.svg.fabric.parseSVGDocument(e,i.createCanvas.call(i,t))}))}))}r.prototype=Object.create(n.prototype),t.exports=r},{"./svgcontainer":23}],25:[function(e,t,i){var n=e("./nodecontainer");function r(e,t){n.call(this,e,t)}function o(e,t,i){if(e.length>0)return t+i.toUpperCase()}r.prototype=Object.create(n.prototype),r.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},r.prototype.transform=function(e){var t=this.node.data;switch(e){case"lowercase":return t.toLowerCase();case"capitalize":return t.replace(/(^|\s|:|-|\(|\))([a-z])/g,o);case"uppercase":return t.toUpperCase();default:return t}},t.exports=r},{"./nodecontainer":14}],26:[function(e,t,i){i.smallImage=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},i.bind=function(e,t){return function(){return e.apply(t,arguments)}},i.decode64=function(e){var t,i,n,r,o,a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=e.length,c="";for(t=0;t<u;t+=4)o=l.indexOf(e[t])<<2|(i=l.indexOf(e[t+1]))>>4,a=(15&i)<<4|(n=l.indexOf(e[t+2]))>>2,s=(3&n)<<6|(r=l.indexOf(e[t+3])),c+=64===n?String.fromCharCode(o):64===r||-1===r?String.fromCharCode(o,a):String.fromCharCode(o,a,s);return c},i.getBounds=function(e){if(e.getBoundingClientRect){var t=e.getBoundingClientRect(),i=null==e.offsetWidth?t.width:e.offsetWidth;return{top:t.top,bottom:t.bottom||t.top+t.height,right:t.left+i,left:t.left,width:i,height:null==e.offsetHeight?t.height:e.offsetHeight}}return{}},i.offsetBounds=function(e){var t=e.offsetParent?i.offsetBounds(e.offsetParent):{top:0,left:0};return{top:e.offsetTop+t.top,bottom:e.offsetTop+e.offsetHeight+t.top,right:e.offsetLeft+t.left+e.offsetWidth,left:e.offsetLeft+t.left,width:e.offsetWidth,height:e.offsetHeight}},i.parseBackgrounds=function(e){var t,i,n,r,o,a,s,l=[],u=0,c=0,h=function(){t&&('"'===i.substr(0,1)&&(i=i.substr(1,i.length-2)),i&&s.push(i),"-"===t.substr(0,1)&&(r=t.indexOf("-",1)+1)>0&&(n=t.substr(0,r),t=t.substr(r)),l.push({prefix:n,method:t.toLowerCase(),value:o,args:s,image:null})),s=[],t=n=i=o=""};return s=[],t=n=i=o="",e.split("").forEach((function(e){if(!(0===u&&" \r\n\t".indexOf(e)>-1)){switch(e){case'"':a?a===e&&(a=null):a=e;break;case"(":if(a)break;if(0===u)return u=1,void(o+=e);c++;break;case")":if(a)break;if(1===u){if(0===c)return u=0,o+=e,void h();c--}break;case",":if(a)break;if(0===u)return void h();if(1===u&&0===c&&!t.match(/^url$/i))return s.push(i),i="",void(o+=e)}o+=e,0===u?t+=e:i+=e}})),h(),l}},{}],27:[function(e,t,i){var n=e("./gradientcontainer");function r(e){n.apply(this,arguments),this.type="linear"===e.args[0]?n.TYPES.LINEAR:n.TYPES.RADIAL}r.prototype=Object.create(n.prototype),t.exports=r},{"./gradientcontainer":9}],28:[function(e,t,i){t.exports=function(e){return new Promise((function(t,i){var n=new XMLHttpRequest;n.open("GET",e),n.onload=function(){200===n.status?t(n.responseText):i(new Error(n.statusText))},n.onerror=function(){i(new Error("Network Error"))},n.send()}))}},{}]},{},[4])(4)}));var _0x269f3b=html2canvas,_0x552b5d=(_0x2ada87=!0,function(e,t){var i=_0x2ada87?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ada87=!1,i}),_0x122dd4=_0x552b5d(void 0,(function(){return _0x122dd4.toString().search("(((.+)+)+)+$").toString().constructor(_0x122dd4).search("(((.+)+)+)+$")})),_0x2ada87;_0x122dd4();class _0x702fc2{constructor(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.rotateX=WebGLPlot.defaultValue(e.rotateX,0),this.rotateY=WebGLPlot.defaultValue(e.rotateY,0),this.rotateZ=WebGLPlot.defaultValue(e.rotateZ,0),this.offsetX=WebGLPlot.defaultValue(e.offsetX,0),this.offsetY=WebGLPlot.defaultValue(e.offsetY,0),this.offsetZ=WebGLPlot.defaultValue(e.offsetZ,0)}}var _0xa0af3e=(_0x4e340f=!0,function(e,t){var i=_0x4e340f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e340f=!1,i}),_0x37e45b=_0xa0af3e(void 0,(function(){return _0x37e45b.toString().search("(((.+)+)+)+$").toString().constructor(_0x37e45b).search("(((.+)+)+)+$")})),_0x4e340f;_0x37e45b();var _0x4574a2=Object.freeze({simple:0,detail:1,notitle:2,notitle2:3,element:4}),_0x145cec=(_0x1e6d2e=!0,function(e,t){var i=_0x1e6d2e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e6d2e=!1,i}),_0x398112=_0x145cec(void 0,(function(){return _0x398112.toString().search("(((.+)+)+)+$").toString().constructor(_0x398112).search("(((.+)+)+)+$")})),_0x1e6d2e;_0x398112();var WebGLPlot$8=window.WebGLPlot=window.WebGLPlot||{};class _0x1aae83{constructor(){this.boxModelMatrix=null,this.symbol=null,this.fixedFrameTransform=WebGLPlot$8.Transforms.localFrameToFixedFrameGenerator("north","west")}static getElement(e){var t=null,i=null;return e===_0x4574a2.detail?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0),i=".popup {position: absolute;border:0.1px solid white;}.popup-content-wrapper {max-height: 200px;overflow-y: auto;text-align: left;/*border-radius: 6px;*/background-color:rgb(48, 123, 250,0.3);}.popup-content {/* margin: 5px 20px;*/color: rgb(255, 255, 255); line-height: 0.5;font-size:xx-small;font-weight:normal;}.popup-content div {text-align: center;background-color: #8585bf;}.popup-content div {line-height: 1;}.popup-content table {margin-left: 1px;margin-right: 3px;}.popup-content table tr {height: 15px;}"):e===_0x4574a2.notitle?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0),i=".popup {z-index:100;position: absolute;/*margin-left:400px;*/border:0.1px solid white;margin:1px;}.popup-content div{color: rgb(255, 255, 255);font-size:small;}.popup-content-wrapper {max-height: 200px;overflow-y: auto;/*height: 133px;padding: 1px;*/text-align: left;/*border-radius: 6px;*/background-color:rgb(67, 60, 252, 0.45);}.popup-content {color: rgb(255, 255, 255); line-height: 1;font-size:xx-small;font-weight:normal;}.popup-content div {line-height: 1;}.popup-content table {margin-left: 1px;margin-right: 3px;}.popup-content table tr {height: 15px;}"):e===_0x4574a2.notitle2?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0),i=".popup {position: absolute;border:0.05px solid white;padding:1px;}.popup-content div{color: rgb(255, 255, 255);font-size:small;}.popup-content-wrapper {height:50%;text-align: left;background-color:rgb(48, 123, 250,0.3);}.popup-content {color: rgb(255, 255, 255); line-height: 1;font-size:xx-small;font-weight:normal;}.popup-content div {line-height: 1;}.popup-content table {margin-left: 1px;margin-right: 3px;}.popup-content table tr {height: 15px;}"):e===_0x4574a2.notitle3?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div class="main"><div id="trackPopUpLink" class="popup-content"></div></div></div></div>').get(0),i=".popup {position: absolute;}.popup-content {padding:11.6px;color: rgb(255, 255, 255); line-height: 1;font-size:xx-small;font-weight:normal;}.popup-content div {line-height: 1;}.popup-content table tr {height: 15px;}.popup-content-wrapper .main{background: url('../Source/Assets/Images/overlayer.png') no-repeat;background-size: cover;}"):e===_0x4574a2.simple&&(t=$('<div id="trackPopUpContent" class="popup"></div>').get(0),i=".popup {z-index: -1;position: absolute;text-align: center;/*font-weight:bold;*/color: rgb(255, 255, 255);background-color:rgb(255,0,0,0.3);border:0.1px solid red;}"),{element:t,style:i}}static getModelHeight(e){if(void 0===e)return 0;this.symbol=e.clone();var t=e.localPoints[0].clone(),i=e._model;let n=i.modelMatrix;var r=i._boundingSphere.center;let o=r.x>r.y?r.x:r.y;o=(o>r.z?o:r.z)*i.scale;var a=_0x2d6822.getModelMinAndMaxCorner(i),s=i.scale,l=WebGLPlot$8.Cartesian3.multiplyByScalar(WebGLPlot$8.Cartesian3.fromElements(a.minCorner.z,a.minCorner.x,a.minCorner.y),s,new WebGLPlot$8.Cartesian3),u=WebGLPlot$8.Cartesian3.multiplyByScalar(WebGLPlot$8.Cartesian3.fromElements(a.maxCorner.z,a.maxCorner.x,a.maxCorner.y),s,new WebGLPlot$8.Cartesian3),c=new WebGLPlot$8.AxisAlignedBoundingBox(l,u);this.BoundingBoxCenter=c.center,this.boxModelMatrix=this.computeBoundingBoxMatrix(t,e._modelRotate,n.clone(),this.fixedFrameTransform);var h=this.getLinePts(t,u,l,this.boxModelMatrix),d=[];for(let e=0;e<h.length;e++){let t=WebGLPlot$8.Cartographic.fromCartesian(h[e]);var f=WebGLPlot$8.CesiumMath.toDegrees(t.latitude),p=WebGLPlot$8.CesiumMath.toDegrees(t.longitude);let i=t.height;d.push({x:p,y:f,z:i})}return d}static getLinePts(e,t,i,n){var r=0,o=0,a=0,s=0;return WebGLPlot$8.defined(t)&&WebGLPlot$8.defined(i)?(r=Math.abs(t.x-i.x)/2,o=Math.abs(t.y-i.y)/2,a=i.z<=0?t.z:t.z-i.z,s=r>o?o:r):(s=(this.centerMax+this.modelRadius)/2,a=1.5*this.centerMax+this.modelRadius/2),this.rotateCircleCenter=WebGLPlot$8.Cartesian3.fromDegrees(e.x,e.y,a+e.z),this.computeHeightLines(r,o,s,a,n)}static computeHeightLines(e,t,i,n,r){var o=[],a=new WebGLPlot$8.Cartesian3,s=new WebGLPlot$8.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot$8.Cartesian3.fromDegrees(this.symbol.localPoints[0].x,this.symbol.localPoints[0].y,this.symbol.localPoints[0].z),h=new WebGLPlot$8.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.symbol?h.heading=d*this.symbol._modelRotate.z:h.heading=d*this.symbol.vectorRotate.z;var f=WebGLPlot$8.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot$8.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot$8.Cartesian3.multiplyByScalar(new WebGLPlot$8.Cartesian3(l,1,u),i,s),a=WebGLPlot$8.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot$8.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot$8.Cartesian3.multiplyByScalar(new WebGLPlot$8.Cartesian3(l,1,.7*u),i,s),a=WebGLPlot$8.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot$8.Cartesian3(a.x,a.y,a.z)),o}static computeBoundingBoxMatrix(e,t,i,n){var r=WebGLPlot$8.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot$8.HeadingPitchRoll,a=Math.PI/180;return o.pitch=0,o.roll=0,o.heading=a*t.z+90*a,WebGLPlot$8.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot$8.Ellipsoid.WGS84,n,i),i}}var _0x47bda3=(_0x3df92f=!0,function(e,t){var i=_0x3df92f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3df92f=!1,i}),_0x420519=_0x47bda3(void 0,(function(){return _0x420519.toString().search("(((.+)+)+)+$").toString().constructor(_0x420519).search("(((.+)+)+)+$")})),_0x3df92f;_0x420519();var WebGLPlot$7=window.WebGLPlot=window.WebGLPlot||{};class _0x7480db extends _0x4157b2{constructor(e,t){if(!WebGLPlot$7.defined(t))throw new WebGLPlot$7.DeveloperError("OverLayerPicture viewer is required.");(e=WebGLPlot$7.defaultValue(e,WebGLPlot$7.defaultValue.EMPTY_OBJECT)).scene=t.scene,super(e),this.position=e.position.clone(),this.symbol=e.model,this.content=e.content,this.style=e.style,this.showline=e.showline,this.viewer=t,this.primitive=null,this._element=null,this._images=null,this._id=null,this._divContent=null,this._endPosition=e.position.clone(),this._bimHeight=0,this._modelHeight=0,this._lineEnd=null,this._initOverlayer(),this._initHandler()}updateEffect(e){WebGLPlot$7.defined(e.point)&&(this._getModelHeight(),e.point.z=this._modelHeight,this.setPosition(e.point)),WebGLPlot$7.defined(e.visible)&&this.setVisible(e.visible)}_initOverlayer(){if(this.style===_0x4574a2.detail){var e=_0x1aae83.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);var t="";for(var i in this.content)"title"===i?t="<div>"+this.content[i]+"</div><table><tbody>":t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=WebGLPlot$7.createGuid(),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=WebGLPlot$7.createGuid(),this._divContent=this._element}else if(this.style===_0x4574a2.notitle||this.style===_0x4574a2.notitle2||this.style===_0x4574a2.notitle3){e=_0x1aae83.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t='<div class="information">'+WebGLPlot$7.plotI18n("OVERLAYER_DETAIL")+"</div><table><tbody>";for(var i in this.content)t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=WebGLPlot$7.createGuid(),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=WebGLPlot$7.createGuid(),this._divContent=this._element}else if(this.style===_0x4574a2.simple){e=_0x1aae83.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t=this.content;this._element.id=WebGLPlot$7.createGuid(),this._element.append(t),this._divContent=this._element}else this.style===_0x4574a2.element&&(this.bpDom=document.createElement("div"),this.bpDom.style.cssText=this.content.style.cssText,this.bpDom.id=WebGLPlot$7.createGuid(),this.bpDom.appendChild(this.content),document.body.appendChild(this.bpDom),this._divContent=this.bpDom);var n=this._divContent.offsetWidth,r=this._divContent.offsetHeight,o=1.5,a=document.createElement("canvas"),s=a.getContext("2d");a.width=n*o,a.height=r*o,a.style.width=n+"px",a.style.height=r+"px",s.scale(o,o);var l={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:a,width:n,height:r,foreignObjectRendering:!0,tainTest:!1};_0x269f3b(this._divContent,l).then(function(e){let t=e.toDataURL("image/png",1);this.images=t,this._divContent.style.display="none",this._create()}.bind(this))}_create(){this._getModelHeight(),this._endPosition.x=this.position.x,this._endPosition.y=this.position.y,this._endPosition.z=this._modelHeight,this.position.z=this._endPosition.z,this._id=WebGLPlot$7.createGuid();let e={id:this._id,show:!0,position:WebGLPlot$7.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z),image:this.images,pixelOffset:new WebGLPlot$7.Cartesian2(0,0),horizontalOrigin:WebGLPlot$7.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$7.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,sizeInMeters:!1,scale:1};if(this._billboard&&(_0x38860f.removeBillboard(this._billboard,this.viewer.scene),this._billboard=void 0),this._billboard=_0x38860f.addBillboard(e,this.viewer.scene),!this._polyline){let e={show:this.showline,width:1,positions:[WebGLPlot$7.Cartesian3.fromDegrees(this.position.x,this.position.y,this.position.z),WebGLPlot$7.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z)]};this._polyline=_0x38860f.addOverLayerPolyLine(e,this.viewer.scene)}}_getModelHeight(){var e=_0x1aae83.getModelHeight(this.symbol);let t=this.viewer.scene.sampleHeight(new WebGLPlot$7.Cartographic(WebGLPlot$7.CesiumMath.toRadians(e[0].x),WebGLPlot$7.CesiumMath.toRadians(e[0].y))),i=this.viewer.scene.sampleHeight(new WebGLPlot$7.Cartographic(WebGLPlot$7.CesiumMath.toRadians(e[1].x),WebGLPlot$7.CesiumMath.toRadians(e[1].y)));e[0].z<e[1].z?(this._bimHeight=t,this._modelHeight=e[1].z):(this._bimHeight=i,this._modelHeight=e[0].z)}delete(){this._billboard&&(_0x38860f.removeBillboard(this._billboard,this.viewer.scene),this._billboard=void 0),this._polyline&&(_0x38860f.removeOverLayerPolyLine(this._polyline,this.viewer.scene),this._polyline=void 0)}setPosition(e){this._endPosition=e,this._billboard&&(this._billboard.position=WebGLPlot$7.Cartesian3.fromDegrees(e.x,e.y,e.z)),this._polyline&&(this._polyline.positions=[WebGLPlot$7.Cartesian3.fromDegrees(this.position.x,this.position.y,this.position.z),WebGLPlot$7.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z)])}setShowline(e){this._polyline&&(this.showline=e,this._polyline.show=this.showline)}_initHandler(){var e=!1,t=-1,i=new WebGLPlot$7.ScreenSpaceEventHandler(viewer.scene.canvas);i.setInputAction(function(i){var n=viewer.scene.pick(i.position);n?null===n.id||n.id!==this._id||e?(e=!1,t=-1,this.viewer.scene.canvas.style.cursor="default"):(e=!0,t=n.id,this.viewer.scene.canvas.style.cursor="move"):(e=!1,t=-1,this.viewer.scene.canvas.style.cursor="default")}.bind(this),WebGLPlot$7.ScreenSpaceEventType.LEFT_CLICK),i.setInputAction(function(i){e=!1,t=-1}.bind(this),WebGLPlot$7.ScreenSpaceEventType.RIGHT_CLICK),i.setInputAction(function(i){if(e&&-1!==t){var n=this._bimHeight,r=WebGLPlot$7.Cartesian3.fromDegrees(this.position.x,this.position.y,n),o=WebGLPlot$7.SceneTransforms.wgs84ToWindowCoordinates(scene,r),a=this._modifyModelPosition(this.position,i.endPosition);i.endPosition.y=o.y;var s=_0x2d6822.getPosition(this.viewer.scene,i.endPosition);this._endPosition={x:s.x,y:s.y,z:a.z};var l=WebGLPlot$7.Cartesian3.fromDegrees(s.x,s.y,a.z);this._billboard.position=l,this._polyline.positions=[WebGLPlot$7.Cartesian3.fromDegrees(this.position.x,this.position.y,this.position.z),WebGLPlot$7.Cartesian3.fromDegrees(s.x,s.y,a.z)]}}.bind(this),WebGLPlot$7.ScreenSpaceEventType.MOUSE_MOVE)}_modifyModelPosition(e,t){var i=1,n=this.viewer.scene,r=WebGLPlot$7.SceneTransforms.transformWindowToDrawingBuffer(n,t);r.y=n.drawingBufferHeight-r.y;var o=WebGLPlot$7.Cartesian3.fromDegrees(e.x,e.y,0),a=WebGLPlot$7.SceneTransforms.wgs84ToWindowCoordinates(n,o),s=this._getAltitudeByLogical(o,r,n);if(WebGLPlot$7.defined(s)){a.y<t.y&&(i=-1);var l=WebGLPlot$7.Cartesian3.distance(o,s)*i,u=n.globe.ellipsoid.cartesianToCartographic(s),c=WebGLPlot$7.CesiumMath.toDegrees(u.latitude);return new _0x11ff81(WebGLPlot$7.CesiumMath.toDegrees(u.longitude),c,l)}}_getAltitudeByLogical(e,t,i){var n=WebGLPlot$7.Cartographic.fromCartesian(e);n.height+=1,n=WebGLPlot$7.Cartesian3.fromRadians(n.longitude,n.latitude,n.height);var r=WebGLPlot$7.SceneTransforms.wgs84ToWindowCoordinates(i,e),o=WebGLPlot$7.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(o){var a;o.x===r.x?(-1,a=0):o.y===r.y?(0,a=-1):a=-1/((o.y-r.y)/(o.x-r.x));var s=i._view.viewport,l={left:s.x,right:s.x+s.width,bottom:s.y,top:s.y+s.height},u=_0x2d6822.intersectionOfRectByPointslopeline(t,a,l),c=u[0],h=u[1],d=new WebGLPlot$7.Cartesian3,f=new WebGLPlot$7.Cartesian3;WebGLPlot$7.SceneTransforms.drawingBufferToWgs84Coordinates(i,c,1,d),WebGLPlot$7.SceneTransforms.drawingBufferToWgs84Coordinates(i,h,1,f);var p=i.camera.position,_=new WebGLPlot$7.Cartesian3;WebGLPlot$7.Cartesian3.subtract(e,n,_);var m=new WebGLPlot$7.Cartesian3;WebGLPlot$7.Cartesian3.negate(_,m),WebGLPlot$7.Cartesian3.normalize(_,_),WebGLPlot$7.Cartesian3.normalize(m,m);var g=new WebGLPlot$7.Ray(e,_),x=new WebGLPlot$7.Ray(e,m),v=WebGLPlot$7.IntersectionTests.rayTriangleParametric(g,d,f,p);if(v)return WebGLPlot$7.Ray.getPoint(g,v);if(v=WebGLPlot$7.IntersectionTests.rayTriangleParametric(x,d,f,p))return WebGLPlot$7.Ray.getPoint(x,v)}}setVisible(e){this.setShowline(e),this._billboard&&(this._billboard.show=e)}destroy(){this.delete()}clone(){}}var _0x211722=(_0x2d6cce=!0,function(e,t){var i=_0x2d6cce?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d6cce=!1,i}),_0x1cb3ee=_0x211722(void 0,(function(){return _0x1cb3ee.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cb3ee).search("(((.+)+)+)+$")})),_0x2d6cce;_0x1cb3ee();var WebGLPlot$6=window.WebGLPlot=window.WebGLPlot||{};class _0x59b619 extends _0x4157b2{constructor(e,t){if(!WebGLPlot$6.defined(t))throw new WebGLPlot$6.DeveloperError("OverLayerPicture viewer is required.");(e=WebGLPlot$6.defaultValue(e,WebGLPlot$6.defaultValue.EMPTY_OBJECT)).scene=t.scene,super(e),this.position=e.position,this.symbol=e.model,this.content=e.content,this.style=e.style,this.viewer=t,this.primitive=null,this._element=null,this._images=null,this._width=0,this._height=0,this._divContent=null,this._offSetOptions=new _0x702fc2,this._initOverlayer()}updateEffect(e){WebGLPlot$6.defined(e.point)&&this.setOffSet(e.point,void 0),WebGLPlot$6.defined(e.visible)&&this.setVisible(e.visible)}_initOverlayer(){if(this.style===_0x4574a2.detail){var e=_0x1aae83.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.style=document.createElement("style"),this.style.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.style);var t="";for(var i in this.content)"title"===i?t="<div>"+this.content[i]+"</div><table><tbody>":t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=Math.random().toString(15).slice(2,15),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=Math.random().toString(15).slice(2,15),this._divContent=this._element}else if(this.style===_0x4574a2.simple){e=_0x1aae83.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t=this.content;this._element.id=Math.random().toString(15).slice(2,15),this._element.append(t),this._divContent=this._element}else if(this.style===_0x4574a2.element){this.bpDom=document.createElement("div"),this.bpDom.style.cssText=this.content.style.cssText;var n=Math.random().toString(15);this.bpDom.id=n.slice(2,n.length),this.bpDom.appendChild(this.content),document.body.appendChild(this.bpDom),this._divContent=this.bpDom}else if(this.style===_0x4574a2.notitle||this.style===_0x4574a2.notitle2||this.style===_0x4574a2.notitle3){e=_0x1aae83.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t='<div class="information">'+WebGLPlot$6.plotI18n("OVERLAYER_DETAIL")+"</div><table><tbody>";for(var i in this.content)t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=Math.random().toString(15).slice(2,15),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=Math.random().toString(15).slice(2,15),this._divContent=this._element}this._width=this._divContent.offsetWidth,this._height=this._divContent.offsetHeight;var r=1.5,o=document.createElement("canvas"),a=o.getContext("2d");o.width=this._width*r,o.height=this._height*r,o.style.width=this._width+"px",o.style.height=this._height+"px",o.style.background="transparent",a.scale(r,r),a.mozImageSmoothingEnabled=!1,a.webkitImageSmoothingEnabled=!1,a.msImageSmoothingEnabled=!1,a.imageSmoothingEnabled=!1,a.globalAlpha=.1,document.documentElement.scrollTop||document.body.scrollTop;var s={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:o,width:this._width,height:this._height,foreignObjectRendering:!0,tainTest:!1};_0x269f3b(this._divContent,s).then(function(e){var t=new Image;t.src=e.toDataURL("image/png",1),this._images=t,this._divContent.style.display="none",this._create()}.bind(this))}_create(){this.setOffSet(this.position,void 0)}setOffSet(e,t){if(e&&(!WebGLPlot$6.defined(t)||t instanceof _0x702fc2)){WebGLPlot$6.defined(t)&&(this._offSetOptions=t);var i=e.x,n=e.y,r=this.viewer.scene.sampleHeight(new WebGLPlot$6.Cartographic(WebGLPlot$6.CesiumMath.toRadians(this.position.x),WebGLPlot$6.CesiumMath.toRadians(this.position.y)))+.5,o=this._offSetOptions.rotateX,a=this._offSetOptions.rotateY,s=this._offSetOptions.rotateZ;i+=this._offSetOptions.offsetX,n+=this._offSetOptions.offsetY,r+=this._offSetOptions.offsetZ;var l=new WebGLPlot$6.Cartesian3(this._width/40,this._height/40,1),u=WebGLPlot$6.Cartesian3.fromDegrees(i,n,r),c=WebGLPlot$6.Transforms.eastNorthUpToFixedFrame(u),h=WebGLPlot$6.Matrix4.fromRotationTranslation(WebGLPlot$6.Matrix3.fromRotationX(WebGLPlot$6.CesiumMath.toRadians(90+o))),d=WebGLPlot$6.Matrix4.fromRotationTranslation(WebGLPlot$6.Matrix3.fromRotationY(WebGLPlot$6.CesiumMath.toRadians(180+a))),f=WebGLPlot$6.Matrix4.fromRotationTranslation(WebGLPlot$6.Matrix3.fromRotationZ(WebGLPlot$6.CesiumMath.toRadians(0+s))),p=new WebGLPlot$6.Matrix4,_=new WebGLPlot$6.Matrix4,m=new WebGLPlot$6.Matrix4,g=WebGLPlot$6.Matrix4.fromScale(l);WebGLPlot$6.Matrix4.multiply(c,h,p),WebGLPlot$6.Matrix4.multiply(p,g,p),WebGLPlot$6.Matrix4.multiply(p,d,_),WebGLPlot$6.Matrix4.multiply(_,f,m),null!==this.primitive&&this.delete();var x=new WebGLPlot$6.PlaneGeometry,v=new WebGLPlot$6.GeometryInstance({geometry:x,modelMatrix:m}),y=new WebGLPlot$6.Material({fabric:{type:"DiffuseMap",uniforms:{image:this._images}},translucent:!0});this.primitive=this.viewer.scene.primitives.add(new WebGLPlot$6.Primitive({geometryInstances:v,appearance:new WebGLPlot$6.MaterialAppearance({closed:!0,translucent:!0,material:y})}))}}setVisible(e){null!==this.primitive&&(this.primitive.show=e)}delete(){null!==this.primitive&&(this.viewer.scene.primitives.removeAndDestroy(this.primitive),this.primitive=void 0)}destroy(){this.delete()}clone(){}}var _0x53dce7=(_0x5278b9=!0,function(e,t){var i=_0x5278b9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5278b9=!1,i}),_0x231435=_0x53dce7(void 0,(function(){return _0x231435.toString().search("(((.+)+)+)+$").toString().constructor(_0x231435).search("(((.+)+)+)+$")})),_0x5278b9;_0x231435();var WebGLPlot$5=window.WebGLPlot=window.WebGLPlot||{};function _0x4cfa9e(e,t){void 0===e.showLine?this.showLine=!0:this.showLine=e.showLine,this.scene=t.scene,this.position=this.lonLatToPixel(e.position),void 0===this.position&&(this.position={x:100,y:200,z:0}),this.finalPosition=e.position,this.style=document.createElement("style"),this.style.innerHTML=".dialog{min-width:150px;min-height:100px;position:absolute; background-color: rgba(42, 69, 105,.3);border: none;display: block;left:"+this.position.x+"px;top:"+this.position.y+"px;z-index: 1;\n}\n.dialog-content{padding:4px;color:#00a7d0}\n",this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.style),this.bpDom=document.createElement("div"),this.bpDom.classList.add("dialog"),this.bpDom.style.cssText="display: block;";var i=Math.random().toString(15);this.bpDom.id=i.slice(2,i.length),this.bpDom.position=e.position,this.canvasDom=document.createElement("canvas"),this.canvasDom.id=this.bpDom.id+"c",this.canvasDom.style.cssText="position: absolute; z-index: 1",document.body.appendChild(this.canvasDom),this.contentDom=document.createElement("div"),this.contentDom.classList.add("dialog-content"),this.contentDom.appendChild(e.element),this.bpDom.appendChild(this.contentDom),document.body.appendChild(this.bpDom),this.Dragging(this.getDraggingDialog).enable(),this.self=this,this.canvas=document.getElementById(this.bpDom.id+"c"),this.lineCtx=this.canvas.getContext("2d"),this.bpDiv=document.getElementById(this.bpDom.id),this.bpPosition=this.getCordInContainer(this.bpDiv),t.camera.changed.addEventListener(function(){var t=document.getElementsByClassName("dialog");for(let e=0;e<t.length;e++){this.bpDiv=t[e],this.bpPosition=this.getCordInContainer(t[e]);var i=this.bpDiv.id,n=document.getElementById(i+"c");this.lineCtx=n.getContext("2d"),this.canvas=n,this.position=this.lonLatToPixel(this.bpDiv.position),void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx)}var r=this.lonLatToPixel(this.finalPosition),o=this.lonLatToPixel(e.position),a=null!==r&&r.x>=0&&r.y>=0&&r.x<this.scene.drawingBufferWidth&&r.y<this.scene.drawingBufferHeight,s=null!==o&&o.x>=0&&o.y>=0&&o.x<this.scene.drawingBufferWidth&&o.y<this.scene.drawingBufferHeight;if(a&&s){this.setLineVisible(!0),this.bpDiv.style.cssText="display: block;",this.pt=this.pixelToLonlat(r);var l=WebGLPlot$5.Cartesian3.fromDegrees(this.pt[0],this.pt[1]),u=new WebGLPlot$5.Cartesian2,c=this.scene.cartesianToCanvasCoordinates(l,u);WebGLPlot$5.defined(c)&&(this.bpDom.style.top=c.y+"px",this.bpDom.style.left=c.x+"px")}else this.bpDiv.style.cssText="display: none;",this.setLineVisible(!1)}.bind(this))}_0x4cfa9e.prototype.Dragging=function(e){var t=null,i=0,n=0,r=null,o=o=>{switch(o.type){case"touchstart":case"mousedown":if(null!=(t=e(o))){this.bpDiv=t,this.bpPosition=this.getCordInContainer(this.bpDiv);var a=this.bpDiv.id,s=document.getElementById(a+"c");this.lineCtx=s.getContext("2d"),this.canvas=s,this.position=this.lonLatToPixel(this.bpDiv.position)}r=o.touches?o.touches[0]:o,null!=t&&(i=r.clientX-t.offsetLeft,n=r.clientY-t.offsetTop);break;case"touchmove":case"mousemove":r=o.touches?o.touches[0]:o,null!=t&&(t.style.left=r.clientX-i+"px",t.style.top=r.clientY-n+"px",void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx));break;case"touchend":case"mouseup":t=null,i=0,n=0;var l={x:this.bpDom.offsetLeft,y:this.bpDom.offsetTop};null!==l&&l.x>=0&&l.y>=0&&l.x<this.scene.drawingBufferWidth&&l.y<this.scene.drawingBufferHeight&&(this.finalPosition=this.pixelToLonlat(l))}};return{enable:function(){document.addEventListener("mousedown",o),document.addEventListener("mousemove",o),document.addEventListener("mouseup",o),document.addEventListener("touchstart",o),document.addEventListener("touchmove",o),document.addEventListener("touchend",o)},disable:function(){document.removeEventListener("mousedown",o),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",o),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",o),document.removeEventListener("touchend",o)}}},_0x4cfa9e.prototype.getDraggingDialog=function(e){for(var t=e.target;t&&-1==t.className.indexOf("dialog");)t=t.offsetParent;return t},_0x4cfa9e.prototype.getCordInContainer=function(e){return{x:e.getBoundingClientRect().left,y:e.getBoundingClientRect().top}},_0x4cfa9e.prototype.getMinDisPoint=function(){let e={x:this.bpDiv.offsetLeft,y:this.bpDiv.offsetTop},t={x:this.bpDiv.offsetLeft,y:this.bpDiv.offsetTop+this.bpDiv.clientHeight},i={x:this.bpDiv.offsetLeft+this.bpDiv.clientWidth,y:this.bpDiv.offsetTop},n={x:this.bpDiv.offsetLeft+this.bpDiv.clientWidth,y:this.bpDiv.offsetTop+this.bpDiv.clientHeight};this.position;let r=(this.position.x-e.x)*(this.position.x-e.x)+(this.position.y-e.y)*(this.position.y-e.y),o=(this.position.x-t.x)*(this.position.x-t.x)+(this.position.y-t.y)*(this.position.y-t.y),a=(this.position.x-i.x)*(this.position.x-i.x)+(this.position.y-i.y)*(this.position.y-i.y),s=(this.position.x-n.x)*(this.position.x-n.x)+(this.position.y-n.y)*(this.position.y-n.y),l=[];l.push(r),l.push(o),l.push(a),l.push(s);let u=l[0],c=0;for(var h=1;h<l.length;h++)l[h]<u&&(u=l[h],c=h);return 0==c?e:1==c?t:2==c?i:3==c?n:null},_0x4cfa9e.prototype.drawLine=function(e,t){let i=this.getMinDisPoint();if(null==i||0==i.x&&0==i.y)return;let n=Math.abs(i.x-this.position.x),r=Math.abs(this.position.y-i.y),o=this.position.x,a=this.position.y,s=i.x,l=i.y,u=Math.min(o,s),c=Math.min(a,l);e.width=Math.abs(n),e.height=Math.abs(r),e.style.setProperty("left",u+"px",""),e.style.setProperty("top",c+"px",""),e.style.setProperty("pointer-events","none"),t.clearRect(0,0,e.width,e.height),t.beginPath(),t.moveTo(o-u,a-c),t.lineTo(s-u,l-c),t.stroke()},_0x4cfa9e.prototype.lonLatToPixel=function(e){2===e.length&&(e[2]=0);var t=WebGLPlot$5.Cartesian3.fromDegrees(e[0],e[1],e[2]);return WebGLPlot$5.SceneTransforms.wgs84ToWindowCoordinates(this.scene,t)},_0x4cfa9e.prototype.pixelToLonlat=function(e){var t=this.scene.pickPosition(e),i=Cesium.Cartographic.fromCartesian(t);return[Cesium.Math.toDegrees(i.longitude),Cesium.Math.toDegrees(i.latitude),i.height]},_0x4cfa9e.prototype.setPosition=function(e){this.position=this.lonLatToPixel(e),null!=this.position&&(this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height),this.drawLine(this.canvas,this.lineCtx))},_0x4cfa9e.prototype.setLineVisible=function(e){this.showLine=e,e?void 0!==this.position&&this.drawLine(this.canvas,this.lineCtx):this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height)},_0x4cfa9e.prototype.getPosition=function(){return this.bpDiv.position},_0x4cfa9e.prototype.setContent=function(e){this.contentDom.childNodes.forEach((e=>e.remove())),this.contentDom.appendChild(e)},_0x4cfa9e.prototype.setVisible=function(e){const t=this.bpDiv;if(t&&e){t.style.cssText="display: block;";var i=this.bpDiv.id,n=document.getElementById(i+"c");this.lineCtx=n.getContext("2d"),this.canvas=n,this.position=this.lonLatToPixel(this.bpDiv.position),void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx)}else t.style.cssText="display: none;",this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height)},_0x4cfa9e.prototype.remove=function(){document.body.removeChild(this.bpDiv),document.body.removeChild(this.canvas)},_0x4cfa9e.prototype.updateDom=function(e){this.contentDom.childNodes.forEach((e=>e.remove())),this.contentDom.appendChild(e)};var _0x4de6be=(_0x492d7b=!0,function(e,t){var i=_0x492d7b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x492d7b=!1,i}),_0x4aab4e=_0x4de6be(void 0,(function(){return _0x4aab4e.toString().search("(((.+)+)+)+$").toString().constructor(_0x4aab4e).search("(((.+)+)+)+$")})),_0x492d7b;_0x4aab4e();var _0x190d2a=new WebGLPlot.Cartesian3,_0x5e3ab0=new WebGLPlot.Cartesian3,_0x4f8b1c=new WebGLPlot.Cartesian3,_0x4aa6c8=new WebGLPlot.Cartesian3,_0x228d21=new WebGLPlot.Cartesian3;function _0x328501(e){this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),this.positions=WebGLPlot.defaultValue(e.customPts,[]),this.numThetas=WebGLPlot.defaultValue(e.slicePartitions,65),this.numPhis=WebGLPlot.defaultValue(e.stackPartitions,65),this.vertexFormat=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),this._offsetAttribute=e.offsetAttribute,this._indices=e.indices,this._workerName="createPlotCustomRadarGeometry"}function _0xbd9140(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_0x328501.createGeometry=function(e,t){if(e.numPhis<2||e.numThetas<2||e.positions.length<2)return;let i=_0xbd9140(e.positions),n=e.numThetas,r=e.numPhis;var o=e.vertexFormat,a=n*r,s=6*a,l=WebGLPlot.IndexDatatype.createTypedArray(a,s),u=o.normal?new Float32Array(3*a):void 0,c=o.tangent?new Float32Array(3*a):void 0,h=o.bitangent?new Float32Array(3*a):void 0,d=o.st?new Float32Array(2*a):void 0;if(e._indices)l=e._indices;else{var f,p;let e=0;var _,m;if(t)for(f=0;f<=r-1;f++)for(_=f*n,m=(f+1)*n,p=0;p<n-1;p++)l[e++]=m+p,l[e++]=m+p+1,l[e++]=_+p+1,l[e++]=m+p,l[e++]=_+p+1,l[e++]=_+p;else for(f=0;f<=r-1;f++)for(_=f*n,m=(f+1)*n,p=0;p<n-1;p++)0===p&&(l[e++]=0,l[e++]=_,l[e++]=m),l[e++]=m+p,l[e++]=m+p+1,l[e++]=_+p+1,l[e++]=m+p,l[e++]=_+p+1,l[e++]=_+p,p===n-2&&(l[e++]=0,l[e++]=_+p+1,l[e++]=m+p+1)}var g=new WebGLPlot.GeometryAttributes;o.position&&(g.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:i}));var x,v=0,y=0,$=0,b=0,T=WebGLPlot.Ellipsoid.fromCartesian3(e.radii);if(o.st||o.normal||o.tangent||o.bitangent){for(f=0;f<a;f++){x=T;var C=WebGLPlot.Cartesian3.fromArray(i,3*f,_0x190d2a);0===C.x&&(C.x=1e-10),0===C.y&&(C.y=1e-10),0===C.z&&(C.z=1e-10);var S=x.geodeticSurfaceNormal(C,_0x5e3ab0);if(o.st){var w=WebGLPlot.Cartesian2.negate(S,_0x228d21);d[v++]=Math.atan2(w.y,w.x)/WebGLPlot.CesiumMath.TWO_PI+.5,d[v++]=Math.asin(S.z)/WebGLPlot.CesiumMath.PI+.5}if(o.normal&&(u[y++]=S.x,u[y++]=S.y,u[y++]=S.z),o.tangent||o.bitangent){var E,P=_0x4f8b1c;if(E=!isTopOpen&&f>=0&&f<0+2*n?WebGLPlot.Cartesian3.UNIT_X:WebGLPlot.Cartesian3.UNIT_Z,WebGLPlot.Cartesian3.cross(E,S,P),WebGLPlot.Cartesian3.normalize(P,P),o.tangent&&(c[$++]=P.x,c[$++]=P.y,c[$++]=P.z),o.bitangent){var A=WebGLPlot.Cartesian3.cross(S,P,_0x4aa6c8);WebGLPlot.Cartesian3.normalize(A,A),h[b++]=A.x,h[b++]=A.y,h[b++]=A.z}}}o.st&&(g.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),o.normal&&(g.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:u})),o.tangent&&(g.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),o.bitangent&&(g.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:h}))}if(WebGLPlot.defined(e._offsetAttribute)){var L=i.length,M=new Uint8Array(L/3),R=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(M,R),g.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:M})}return new WebGLPlot.Geometry({attributes:g,indices:l,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(T),offsetAttribute:e._offsetAttribute})};var _0x1242ad=(_0x525e33=!0,function(e,t){var i=_0x525e33?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x525e33=!1,i}),_0x3be1c0=_0x1242ad(void 0,(function(){return _0x3be1c0.toString().search("(((.+)+)+)+$").toString().constructor(_0x3be1c0).search("(((.+)+)+)+$")})),_0x525e33;function _0x1ff575(e){this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),this.positions=WebGLPlot.defaultValue(e.customPts,[]),this.slicePartitions=WebGLPlot.defaultValue(e.slicePartitions,65),this.stackPartitions=WebGLPlot.defaultValue(e.stackPartitions,65),this.vertexFormat=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),this._offsetAttribute=e.offsetAttribute,this._workerName="createPlotCustomRadarOutlineGeometry"}function _0x4decdf(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_0x3be1c0(),_0x1ff575.createGeometry=function(e,t){if(e.numPhis<3||e.numThetas<3||e.positions.length<3)return;var i=WebGLPlot.Ellipsoid.fromCartesian3(e.radii);let n=_0x4decdf(e.positions),r=e.slicePartitions,o=e.stackPartitions;var a,s,l=r*o,u=4*l,c=WebGLPlot.IndexDatatype.createTypedArray(l,u);let h=0;if(t){for(a=0;a<o;a++){var d=a*r;for(s=0;s<r-1;s++)c[h++]=d+s,c[h++]=d+s+1}for(a=0;a<r-1;a++)for(s=0;s<o-1;s++)c[h++]=a+s*r,c[h++]=a+(s+1)*r}else{for(a=0;a<o;a++){d=a*r;for(s=0;s<r-1;s++)c[h++]=d+s,c[h++]=d+s+1}for(a=0;a<=r-1;a++)for(s=0;s<o-1;s++)c[h++]=a+s*r,c[h++]=a+(s+1)*r}var f=new WebGLPlot.GeometryAttributes({position:new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})});if(WebGLPlot.defined(e._offsetAttribute)){var p=n.length,_=new Uint8Array(p/3),m=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(_,m),f.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new WebGLPlot.Geometry({attributes:f,indices:c,primitiveType:WebGLPlot.PrimitiveType.LINES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(i),offsetAttribute:e._offsetAttribute})};var _0x1968f1=(_0x17c67b=!0,function(e,t){var i=_0x17c67b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17c67b=!1,i}),_0x125081=_0x1968f1(void 0,(function(){return _0x125081.toString().search("(((.+)+)+)+$").toString().constructor(_0x125081).search("(((.+)+)+)+$")})),_0x17c67b;_0x125081();var _0x22d450=new WebGLPlot.Cartesian3,_0xb504d3=new WebGLPlot.Cartesian3,_0x37b7ed=new WebGLPlot.Cartesian3,_0x581ebc=new WebGLPlot.Cartesian3,_0x3de580=new WebGLPlot.Cartesian3,_0x166094=new WebGLPlot.Cartesian3(1,1,1),_0x330915=Math.cos,_0x374034=Math.sin;function _0x436613(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT);var t=WebGLPlot.defaultValue(e.scale,1),i=WebGLPlot.defaultValue(e.radii,_0x166094),n=WebGLPlot.defaultValue(e.innerRadii,i),r=WebGLPlot.defaultValue(e._minimumClock,0),o=WebGLPlot.defaultValue(e._maximumClock,WebGLPlot.CesiumMath.TWO_PI),a=WebGLPlot.defaultValue(e._minimumCone,0),s=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),l=Math.round(WebGLPlot.defaultValue(e.stackPartitions,64)),u=Math.round(WebGLPlot.defaultValue(e.slicePartitions,64)),c=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT);if(u<3)throw new WebGLPlot.DeveloperError("options.slicePartitions cannot be less than three.");if(l<3)throw new WebGLPlot.DeveloperError("options.stackPartitions cannot be less than three.");this._radii=new WebGLPlot.Cartesian3(i.x*t,i.y*t,i.z*t),this._innerRadii=new WebGLPlot.Cartesian3(n.x*t,n.y*t,n.z*t),this._minimumClock=r,this._maximumClock=o,this._minimumCone=a,this._maximumCone=s,this._stackPartitions=l,this._slicePartitions=u,this._vertexFormat=WebGLPlot.VertexFormat.clone(c),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}_0x436613.packedLength=2*WebGLPlot.Cartesian3.packedLength+WebGLPlot.VertexFormat.packedLength+7,_0x436613.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.Cartesian3.pack(e._radii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.Cartesian3.pack(e._innerRadii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.VertexFormat.pack(e._vertexFormat,t,i),i+=WebGLPlot.VertexFormat.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x1606d4=new WebGLPlot.Cartesian3,_0x13c019=new WebGLPlot.Cartesian3,_0xa53821=new WebGLPlot.VertexFormat,_0x1871ce={radii:_0x1606d4,innerRadii:_0x13c019,vertexFormat:_0xa53821,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0},_0x2906e1;_0x436613.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.Cartesian3.unpack(e,t,_0x1606d4);t+=WebGLPlot.Cartesian3.packedLength;var r=WebGLPlot.Cartesian3.unpack(e,t,_0x13c019);t+=WebGLPlot.Cartesian3.packedLength;var o=WebGLPlot.VertexFormat.unpack(e,t,_0xa53821);t+=WebGLPlot.VertexFormat.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return WebGLPlot.defined(i)?(i._radii=WebGLPlot.Cartesian3.clone(n,i._radii),i._innerRadii=WebGLPlot.Cartesian3.clone(r,i._innerRadii),i._vertexFormat=WebGLPlot.VertexFormat.clone(o,i._vertexFormat),i._minimumClock=a,i._maximumClock=s,i._minimumCone=l,i._maximumCone=u,i._stackPartitions=c,i._slicePartitions=h,i._offsetAttribute=-1===d?void 0:d,i):(_0x1871ce.minimumClock=a,_0x1871ce.maximumClock=s,_0x1871ce.minimumCone=l,_0x1871ce.maximumCone=u,_0x1871ce.stackPartitions=c,_0x1871ce.slicePartitions=h,_0x1871ce.offsetAttribute=-1===d?void 0:d,new _0x436613(_0x1871ce))},_0x436613.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._vertexFormat,l=e._slicePartitions+1,u=e._stackPartitions+1;(l=Math.round(l*Math.abs(r-n)/WebGLPlot.CesiumMath.TWO_PI))<2&&(l=2),(u=Math.round(u*Math.abs(a-o)/WebGLPlot.CesiumMath.PI))<2&&(u=2);var c,h,d=0,f=[o],p=[n];for(c=0;c<u;c++)f.push(o+c*(a-o)/(u-1));for(f.push(a),h=0;h<l;h++)p.push(n+h*(r-n)/(l-1));p.push(r);var _=f.length,m=p.length,g=0,x=1,v=i.x!==t.x||i.y!==t.y||i.z!==t.z,y=!1,$=!1,b=!1;v&&(x=2,o>0&&(y=!0,g+=l-1),a<WebGLPlot.CesiumMath.PI&&($=!0,g+=l-1),(r-n)%WebGLPlot.CesiumMath.TWO_PI?(b=!0,g+=2*(u-1)+1):g+=1);var T=m*_*x,C=new Float64Array(3*T),S=WebGLPlot.arrayFill(new Array(T),!1),w=WebGLPlot.arrayFill(new Array(T),!1),E=l*u*x,P=6*(E+g+1-(l+u)*x),A=WebGLPlot.IndexDatatype.createTypedArray(E,P),L=s.normal?new Float32Array(3*T):void 0,M=s.tangent?new Float32Array(3*T):void 0,R=s.bitangent?new Float32Array(3*T):void 0,O=s.st?new Float32Array(2*T):void 0,I=new Array(_),D=new Array(_);for(c=0;c<_;c++)I[c]=_0x374034(f[c]),D[c]=_0x330915(f[c]);var B=new Array(m),N=new Array(m);for(h=0;h<m;h++)N[h]=_0x330915(p[h]),B[h]=_0x374034(p[h]);for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=t.x*I[c]*N[h],C[d++]=t.y*I[c]*B[h],C[d++]=t.z*D[c];var F,U,G,z,V=T/2;if(v)for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=i.x*I[c]*N[h],C[d++]=i.y*I[c]*B[h],C[d++]=i.z*D[c],S[V]=!0,c>0&&c!==_-1&&0!==h&&h!==m-1&&(w[V]=!0),V++;for(d=0,c=1;c<_-2;c++)for(F=c*m,U=(c+1)*m,h=1;h<m-2;h++)A[d++]=U+h,A[d++]=U+h+1,A[d++]=F+h+1,A[d++]=U+h,A[d++]=F+h+1,A[d++]=F+h;if(v){var k=_*m;for(c=1;c<_-2;c++)for(F=k+c*m,U=k+(c+1)*m,h=1;h<m-2;h++)A[d++]=U+h,A[d++]=F+h,A[d++]=F+h+1,A[d++]=U+h,A[d++]=F+h+1,A[d++]=U+h+1}if(v){if(y)for(z=_*m,c=1;c<m-2;c++)A[d++]=c,A[d++]=c+1,A[d++]=z+c+1,A[d++]=c,A[d++]=z+c+1,A[d++]=z+c;if($)for(G=_*m-m,z=_*m*x-m,c=1;c<m-2;c++)A[d++]=G+c+1,A[d++]=G+c,A[d++]=z+c,A[d++]=G+c+1,A[d++]=z+c,A[d++]=z+c+1}if(b){for(c=1;c<_-2;c++)z=m*_+m*c,G=m*c,A[d++]=z,A[d++]=G+m,A[d++]=G,A[d++]=z,A[d++]=z+m,A[d++]=G+m;for(c=1;c<_-2;c++)z=m*_+m*(c+1)-1,G=m*(c+1)-1,A[d++]=G+m,A[d++]=z,A[d++]=G,A[d++]=G+m,A[d++]=z+m,A[d++]=z}var W=new WebGLPlot.GeometryAttributes;s.position&&(W.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:C}));var H,q=0,j=0,Y=0,X=0,K=T/2,Q=WebGLPlot.Ellipsoid.fromCartesian3(t),Z=WebGLPlot.Ellipsoid.fromCartesian3(i);if(s.st||s.normal||s.tangent||s.bitangent){for(c=0;c<T;c++){H=S[c]?Z:Q;var J=WebGLPlot.Cartesian3.fromArray(C,3*c,_0x22d450),ee=H.geodeticSurfaceNormal(J,_0xb504d3);if(w[c]&&WebGLPlot.Cartesian3.negate(ee,ee),s.st){var te=WebGLPlot.Cartesian2.negate(ee,_0x3de580);O[q++]=Math.atan2(te.y,te.x)/WebGLPlot.CesiumMath.TWO_PI+.5,O[q++]=Math.asin(ee.z)/WebGLPlot.CesiumMath.PI+.5}if(s.normal&&(L[j++]=ee.x,L[j++]=ee.y,L[j++]=ee.z),s.tangent||s.bitangent){var ie,ne=_0x37b7ed,re=0;if(S[c]&&(re=K),ie=!y&&c>=re&&c<re+2*m?WebGLPlot.Cartesian3.UNIT_X:WebGLPlot.Cartesian3.UNIT_Z,WebGLPlot.Cartesian3.cross(ie,ee,ne),WebGLPlot.Cartesian3.normalize(ne,ne),s.tangent&&(M[Y++]=ne.x,M[Y++]=ne.y,M[Y++]=ne.z),s.bitangent){var oe=WebGLPlot.Cartesian3.cross(ee,ne,_0x581ebc);WebGLPlot.Cartesian3.normalize(oe,oe),R[X++]=oe.x,R[X++]=oe.y,R[X++]=oe.z}}}s.st&&(W.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:O})),s.normal&&(W.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),s.tangent&&(W.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:M})),s.bitangent&&(W.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R}))}if(WebGLPlot.defined(e._offsetAttribute)){var ae=C.length,se=new Uint8Array(ae/3),le=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(se,le),W.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:se})}return new WebGLPlot.Geometry({attributes:W,indices:A,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(Q),offsetAttribute:e._offsetAttribute})}}},_0x436613.getUnitEllipsoid=function(){return WebGLPlot.defined(_0x2906e1)||(_0x2906e1=_0x436613.createGeometry(new _0x436613({radii:new WebGLPlot.Cartesian3(1,1,1),vertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY}))),_0x2906e1};var _0x18e37f=(_0x4d5eb3=!0,function(e,t){var i=_0x4d5eb3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d5eb3=!1,i}),_0x5af7be=_0x18e37f(void 0,(function(){return _0x5af7be.toString().search("(((.+)+)+)+$").toString().constructor(_0x5af7be).search("(((.+)+)+)+$")})),_0x4d5eb3;_0x5af7be();var _0x5682b9=new WebGLPlot.Cartesian3(1,1,1),_0x2c545c=Math.cos,_0x41e0c1=Math.sin;function _0x377d94(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT);var t=WebGLPlot.defaultValue(e.scale,1),i=WebGLPlot.defaultValue(e.radii,_0x5682b9),n=WebGLPlot.defaultValue(e.innerRadii,i),r=WebGLPlot.defaultValue(e._minimumClock,0),o=WebGLPlot.defaultValue(e._maximumClock,WebGLPlot.CesiumMath.TWO_PI),a=WebGLPlot.defaultValue(e._minimumCone,0),s=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),l=Math.round(WebGLPlot.defaultValue(e.stackPartitions,10)),u=Math.round(WebGLPlot.defaultValue(e.slicePartitions,8)),c=Math.round(WebGLPlot.defaultValue(e.subdivisions,128));if(l<1)throw new WebGLPlot.DeveloperError("options.stackPartitions cannot be less than 1");if(u<0)throw new WebGLPlot.DeveloperError("options.slicePartitions cannot be less than 0");if(c<0)throw new WebGLPlot.DeveloperError("options.subdivisions must be greater than or equal to zero.");if(WebGLPlot.defined(e.offsetAttribute)&&e.offsetAttribute===WebGLPlot.GeometryOffsetAttribute.TOP)throw new WebGLPlot.DeveloperError("WebGLPlot.GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=new WebGLPlot.Cartesian3(i.x*t,i.y*t,i.z*t),this._innerRadii=new WebGLPlot.Cartesian3(n.x*t,n.y*t,n.z*t),this._minimumClock=r,this._maximumClock=o,this._minimumCone=a,this._maximumCone=s,this._stackPartitions=l,this._slicePartitions=u,this._subdivisions=c,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}_0x377d94.packedLength=2*WebGLPlot.Cartesian3.packedLength+8,_0x377d94.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.Cartesian3.pack(e._radii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.Cartesian3.pack(e._innerRadii,t,i),i+=WebGLPlot.Cartesian3.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i++]=e._subdivisions,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x40c115=new WebGLPlot.Cartesian3,_0x51fff0=new WebGLPlot.Cartesian3,_0x4ecf2e={radii:_0x40c115,innerRadii:_0x51fff0,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};_0x377d94.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.Cartesian3.unpack(e,t,_0x40c115);t+=WebGLPlot.Cartesian3.packedLength;var r=WebGLPlot.Cartesian3.unpack(e,t,_0x51fff0);t+=WebGLPlot.Cartesian3.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return WebGLPlot.defined(i)?(i._radii=WebGLPlot.Cartesian3.clone(n,i._radii),i._innerRadii=WebGLPlot.Cartesian3.clone(r,i._innerRadii),i._minimumClock=o,i._maximumClock=a,i._minimumCone=s,i._maximumCone=l,i._stackPartitions=u,i._slicePartitions=c,i._subdivisions=h,i._offsetAttribute=-1===d?void 0:d,i):(_0x4ecf2e.minimumClock=o,_0x4ecf2e.maximumClock=a,_0x4ecf2e.minimumCone=s,_0x4ecf2e.maximumCone=l,_0x4ecf2e.stackPartitions=u,_0x4ecf2e.slicePartitions=c,_0x4ecf2e.subdivisions=h,_0x4ecf2e.offsetAttribute=-1===d?void 0:d,new _0x377d94(_0x4ecf2e))},_0x377d94.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._subdivisions,l=WebGLPlot.Ellipsoid.fromCartesian3(t),u=e._slicePartitions+1,c=e._stackPartitions+1;(u=Math.round(u*Math.abs(r-n)/WebGLPlot.CesiumMath.TWO_PI))<2&&(u=2),(c=Math.round(c*Math.abs(a-o)/WebGLPlot.CesiumMath.PI))<2&&(c=2);var h=0,d=1,f=i.x!==t.x||i.y!==t.y||i.z!==t.z,p=!1,_=!1;f&&(d=2,o>0&&(p=!0,h+=u),a<WebGLPlot.CesiumMath.PI&&(_=!0,h+=u));var m,g,x,v,y=s*d*(c+u),$=new Float64Array(3*y),b=2*(y+h-(u+c)*d),T=WebGLPlot.IndexDatatype.createTypedArray(y,b),C=0,S=new Array(c),w=new Array(c);for(m=0;m<c;m++)v=o+m*(a-o)/(c-1),S[m]=_0x41e0c1(v),w[m]=_0x2c545c(v);var E=new Array(s),P=new Array(s);for(m=0;m<s;m++)x=n+m*(r-n)/(s-1),E[m]=_0x41e0c1(x),P[m]=_0x2c545c(x);for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(S.length=s,w.length=s,m=0;m<s;m++)v=o+m*(a-o)/(s-1),S[m]=_0x41e0c1(v),w[m]=_0x2c545c(v);for(E.length=u,P.length=u,m=0;m<u;m++)x=n+m*(r-n)/(u-1),E[m]=_0x41e0c1(x),P[m]=_0x2c545c(x);for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(C=0,m=0;m<c*d;m++){var A=m*s;for(g=0;g<s-1;g++)T[C++]=A+g,T[C++]=A+g+1}var L=c*s*d;for(m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f)for(L=c*s*d+u*s,m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f){var M=c*s*d,R=M+s*u;if(p)for(m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m;if(_)for(M+=s*u-u,R+=s*u-u,m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m}var O=new WebGLPlot.GeometryAttributes({position:new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:$})});if(WebGLPlot.defined(e._offsetAttribute)){var I=$.length,D=new Uint8Array(I/3),B=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(D,B),O.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:D})}return new WebGLPlot.Geometry({attributes:O,indices:T,primitiveType:WebGLPlot.PrimitiveType.LINES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(l),offsetAttribute:e._offsetAttribute})}}};const _0x57226a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4a5089=_0x57226a(void 0,(function(){return _0x4a5089.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a5089).search("(((.+)+)+)+$")}));_0x4a5089();var _0x3e862f=void 0;function _0x14bd84(e){if(!e)throw new WebGLPlot.DeveloperError("PlotRadarUpdater scene is required.");_0x3e862f||(this.start(50),this._primitives=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._primitives)),this.radarArray=[]}_0x14bd84.getInstance=function(e){return _0x3e862f||(_0x3e862f=new _0x14bd84(e)),_0x3e862f},_0x14bd84.prototype.add=function(e){e.PlotRadarType&&this.radarArray.push(e)},_0x14bd84.prototype.radarUpdate=function(e){for(let t=0;t<this.radarArray.length;t++)this.radarArray[t]._updated(e)},_0x14bd84.prototype.start=function(e){this.stop();let t=this;this.IntervalID=setInterval((function(){t.radarUpdate(e)}),e)},_0x14bd84.prototype.stop=function(){clearInterval(this.IntervalID),this.IntervalID=-1},_0x14bd84.prototype.destroy=function(){this.stop(),_0x3e862f=void 0,this._primitives.destroy()};const _0xb01c0d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4bb871=_0xb01c0d(void 0,(function(){return _0x4bb871.toString().search("(((.+)+)+)+$").toString().constructor(_0x4bb871).search("(((.+)+)+)+$")}));_0x4bb871();class _0x46adf9 extends _0x4157b2{constructor(e,t){super(e),this._scene=t,this._isNeedUpdate=!1,this.PlotRadarType="PlotRadarBase",e&&(this._scale=WebGLPlot$f.defaultValue(e.scale,1),this._id=WebGLPlot$f.defaultValue(e.id,WebGLPlot$f.createGuid()),this._point=WebGLPlot$f.defaultValue(e.point,new WebGLPlot$f.Cartesian3),this._offset=WebGLPlot$f.defaultValue(e.offset,new WebGLPlot$f.Cartesian3),this._customPts=WebGLPlot$f.defaultValue(e.customPts,[]),this._radii=WebGLPlot$f.defaultValue(e.radii,new WebGLPlot$f.Cartesian3(1,1,1)),this._slicePartitions=WebGLPlot$f.defaultValue(e.slicePartitions,67),this._stackPartitions=WebGLPlot$f.defaultValue(e.stackPartitions,67),this._show=WebGLPlot$f.defaultValue(e.show,!0),this._fill=WebGLPlot$f.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$f.defaultValue(e.fillColor,new WebGLPlot$f.Color(1,0,0,.5)),this._outline=WebGLPlot$f.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$f.defaultValue(e.outlineColor,new WebGLPlot$f.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$f.defaultValue(e.outlineWidth,1),e.rotate?this._rotate=new WebGLPlot$f.Cartesian3(WebGLPlot$f.CesiumMath.toRadians(e.rotate.x),WebGLPlot$f.CesiumMath.toRadians(e.rotate.y),WebGLPlot$f.CesiumMath.toRadians(e.rotate.z)):this._rotate=new WebGLPlot$f.Cartesian3(0,0,0),this.shadows=WebGLPlot$f.defaultValue(e.shadows,WebGLPlot$f.ShadowMode.DISABLED)),t&&(_0x14bd84.getInstance(t).add(this),this._primitives=_0x14bd84.getInstance()._primitives),this._primitive=void 0,this._outlinePrimitive=void 0}updateEffect(e){WebGLPlot$f.defined(e.point)&&(this.point=e.point),WebGLPlot$f.defined(e.rotate)&&(this.rotate=e.rotate),WebGLPlot$f.defined(e.visible)&&(this.show=e.visible)}_createRadarPrimitive(){var e=new WebGLPlot$f.HeadingPitchRoll(this._rotate.z,this._rotate.y,this._rotate.x);const t=WebGLPlot$f.Cartesian3.fromDegrees(this.point.x+this._offset.x,this.point.y+this._offset.y,this.point.z+this._offset.z),i=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(t,e);this.isFill&&this._addFillPrimitive(i),this.isOutline&&this._addOutlinePrimitive(i)}_addFillPrimitive(e){if(this._primitive&&this._primitives.removeAndDestroy(this._primitive),!this.show)return;let t=this._createFillPrimitive(e);this._primitive=this._primitives.add(t)}_addOutlinePrimitive(e){if(this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),!this.show)return;let t=this._createOutlinePrimitive(e);this._outlinePrimitive=this._primitives.add(t)}_createFillPrimitive(e,t){t||(t=this);var i={show:new WebGLPlot$f.ShowGeometryInstanceAttribute(t.isFill),distanceDisplayCondition:new WebGLPlot$f.DistanceDisplayConditionGeometryInstanceAttribute,color:void 0,offset:void 0},n=new WebGLPlot$f.MaterialAppearance({material:WebGLPlot$f.Material.fromType(WebGLPlot$f.Material.ColorType,{color:t.fillColor}),translucent:!0,closed:!0});let r=this._createRadarFillGeometry(t),o=new WebGLPlot$f.GeometryInstance({id:t.id,geometry:r,modelMatrix:e,attributes:i});return new WebGLPlot$f.Primitive({geometryInstances:o,appearance:n,asynchronous:!1,shadows:t.shadows})}_createOutlinePrimitive(e,t){t||(t=this);var i={show:new WebGLPlot$f.ShowGeometryInstanceAttribute(t.isOutline),distanceDisplayCondition:new WebGLPlot$f.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot$f.ColorGeometryInstanceAttribute.fromColor(t.outlineColor),offset:void 0};let n=this._createRadarOutLineGeometry(t),r=new WebGLPlot$f.GeometryInstance({id:t.id,geometry:n,modelMatrix:e,attributes:i}),o=new WebGLPlot$f.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:t.outlineWidth}});return new WebGLPlot$f.Primitive({geometryInstances:r,appearance:o,asynchronous:!1,shadows:t.shadows})}clone(e){if(!WebGLPlot$f.defined(e))throw new WebGLPlot$f.DeveloperError("PlotRadar clone result is required.");return e.PlotRadarType="PlotRadarBase",e._scene=this._scene,e._id=this.id,e._point=this.point.clone(),e._rotate=this._rotate.clone(),e._radii=this.radii.clone(),e._slicePartitions=this.slicePartitions,e._stackPartitions=this.stackPartitions,e._show=this.show,e._fill=this.isFill,e._fillColor=this.fillColor,e._outline=this.isOutline,e._outlineColor=this.outlineColor,e._outlineWidth=this._outlineWidth,e.shadows=this.shadows,e._customPts=this._customPts,e}getEffectParameter(){let e={};return e.point=this.point,e.rotate=this.rotate,e.visible=this.visible,e}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[])}toGeoJson(){return{}}fromGeoJson(e){}}Object.defineProperties(_0x46adf9.prototype,{id:{get:function(){return this._id},set:function(e){"string"==typeof e&&this._id!==e&&(this._id=e)}},point:{get:function(){return this._point},set:function(e){(e instanceof WebGLPlot$f.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._point)&&(this._point=e.clone(),this._scanArray&&this._scanArray.length>0&&this._scanArray.forEach((t=>{t.point=e})),this._isNeedUpdate=!0)}},offset:{get:function(){return this._offset},set:function(e){(e instanceof WebGLPlot$f.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._offset)&&(this._offset=e,this._scanArray&&this._scanArray.length>0&&this._scanArray.forEach((t=>{t.offset=e})),this._isNeedUpdate=!0)}},rotate:{get:function(){return new WebGLPlot$f.Cartesian3(WebGLPlot$f.CesiumMath.toDegrees(this._rotate.x),WebGLPlot$f.CesiumMath.toDegrees(this._rotate.y),WebGLPlot$f.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot$f.Cartesian3||e instanceof _0x11ff81){let t=new WebGLPlot$f.Cartesian3(WebGLPlot$f.CesiumMath.toRadians(e.x),WebGLPlot$f.CesiumMath.toRadians(e.y),WebGLPlot$f.CesiumMath.toRadians(e.z));WebGLPlot$f.Cartesian3(t,this._rotate)||(this._rotate=t,this._isNeedUpdate=!0)}}},slicePartitions:{get:function(){return this._slicePartitions},set:function(e){"number"==typeof e&&this._slicePartitions!==e&&(this._slicePartitions=e,this._isNeedUpdate=!0)}},stackPartitions:{get:function(){return this._stackPartitions}},show:{get:function(){return this._show},set:function(e){"boolean"==typeof e&&this._show!==e&&(this._show=e,this._isNeedUpdate=!0)}},isFill:{get:function(){return this._fill},set:function(e){"boolean"==typeof e&&this._fill!==e&&(this._fill=e,this._primitive&&(this._primitive.show=e))}},isOutline:{get:function(){return this._outline},set:function(e){"boolean"==typeof e&&this._outline!==e&&(this._outline=e,this._outlinePrimitive&&(this._outlinePrimitive.show=e))}},fillColor:{get:function(){return this._fillColor},set:function(e){e instanceof WebGLPlot$f.Color&&!WebGLPlot$f.Color.equals(e,this._fillColor)&&(this._fillColor=e,this._primitive&&(this._primitive.appearance.material=WebGLPlot$f.Material.fromType(WebGLPlot$f.Material.ColorType,{color:e})))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){e instanceof WebGLPlot$f.Color&&!WebGLPlot$f.Color.equals(e,this._outlineColor)&&(this._outlineColor=e,this._isNeedUpdate=!0)}},material:{get:function(){return this._fillColor},set:function(e){if(e instanceof WebGLPlot$f.Color&&!WebGLPlot$f.Color.equals(e,this._fillColor)){this.fillColor=e;let t=2*e.alpha>=1?1:2*e.alpha;this.outlineColor=new WebGLPlot$f.Color(e.red,e.green,e.blue,t)}}},radii:{get:function(){return this._radii},set:function(e){(e instanceof WebGLPlot$f.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._radii)&&(this._radii=e.clone(),this._createScan&&this._createScan(),this._isNeedUpdate=!0)}},isShowScan:{get:function(){return this._isShowScan},set:function(e){"boolean"==typeof e&&this.__isShowScan!==e&&(this._isShowScan=e)}},dScanSpeed:{get:function(){return WebGLPlot$f.CesiumMath.toDegrees(this._dScanSpeed)},set:function(e){if("number"==typeof e){let t=WebGLPlot$f.CesiumMath.toRadians(e);this._dScanSpeed=t}}},scale:{get:function(){return this._scale},set:function(e){"number"==typeof e&&this._scale!==e&&(this._scale=e,this._isNeedUpdate=!0)}}});var _0x17cb76=(_0x4eae5f=!0,function(e,t){var i=_0x4eae5f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4eae5f=!1,i}),_0x30012e=_0x17cb76(void 0,(function(){return _0x30012e.toString().search("(((.+)+)+)+$").toString().constructor(_0x30012e).search("(((.+)+)+)+$")})),_0x4eae5f;_0x30012e();var _0x11ff89={PlotMechanicalRadar:0,PlotParameterRadar:1,PlotWarningRadar:2,PlotScanRadar:3,PlotRotateRadar:4,PlotCustomRadar:5},_0x49109a=Object.freeze(_0x11ff89),_0x5ef7fb=(_0x2e089e=!0,function(e,t){var i=_0x2e089e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e089e=!1,i}),_0x35d453=_0x5ef7fb(void 0,(function(){return _0x35d453.toString().search("(((.+)+)+)+$").toString().constructor(_0x35d453).search("(((.+)+)+)+$")})),_0x2e089e;_0x35d453();class _0x45019a extends _0x46adf9{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotCustomRadar scene is required.");super(e,t),this.PlotRadarType=_0x49109a.PlotCustomRadar,this._add2Scene()}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive())}_add2Scene(){this._createRadarPrimitive()}_createRadarFillGeometry(e){return _0x328501.createGeometry(new _0x328501({customPts:e._customPts,slicePartitions:e.slicePartitions,stackPartitions:e.stackPartitions,radii:e.radii}),!0)}_createRadarOutLineGeometry(e){return _0x1ff575.createGeometry(new _0x1ff575({customPts:e._customPts,slicePartitions:e.slicePartitions,stackPartitions:e.stackPartitions,radii:e.radii}),!0)}getScanPts(e,t){var i=[];for(let r=0;r<e.length;r++){var n=[];const o=e[r];for(let e=0;e<t;e++){const t=o[e];n.push(t)}i.push(n)}return i}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e.rotate=this.rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x45019a(this,this._scene)}}Object.defineProperties(_0x45019a.prototype,{customPts:{get:function(){return this._customPts},set:function(e){Array.isArray(e)&&(this._customPts=e,this._isNeedUpdate=!0)}}});const _0x287a79=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x494dc0=_0x287a79(void 0,(function(){return _0x494dc0.toString().search("(((.+)+)+)+$").toString().constructor(_0x494dc0).search("(((.+)+)+)+$")}));_0x494dc0();class _0x2e830f extends _0x46adf9{constructor(e){super(e),this.PlotRadarType="PlotRotateRadarScan",this._slicePartitions=2,this._computeScanPts(e)}_computeScanPts(e){WebGLPlot.defined(e)&&(this.scanAngle=e.rotateAngle*(this._slicePartitions/e.slicePartitions),e._radarPts.length>3&&this._getScanPts(e._radarPts))}_getScanPts(e){this._radarPts=[];for(let i=0;i<e.length;i++){var t=[];const n=e[i];for(let e=0;e<this._slicePartitions;e++){const i=n[e];t.push(i)}this._radarPts.push(t)}}clone(e){return(!WebGLPlot.defined(e)||!(e instanceof _0x2e830f))&&(e=new _0x2e830f),(e=super.clone(e))._radarPts=this._radarPts,e.PlotRadarType=this.PlotRadarType,e._slicePartitions=this._slicePartitions,e.scanAngle=this.scanAngle,e._isNeedUpdate=!0,e}}const _0x59db20=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x8c2d4f=_0x59db20(void 0,(function(){return _0x8c2d4f.toString().search("(((.+)+)+)+$").toString().constructor(_0x8c2d4f).search("(((.+)+)+)+$")}));_0x8c2d4f();class _0x467388 extends _0x46adf9{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotRotateRadar scene is required.");super(e,t),this.PlotRadarType=_0x49109a.PlotRotateRadar,this._primitiveScnaFillArry=[],this._primitiveScnaOutLineArry=[],this._scanArray=[],this._merge(e),this._add2Scene()}getScanArray(){return this._scanArray}setScanArray(e){this.removeAllScanArray();for(let t=0;t<e.length;t++){const i=e[t];i instanceof _0x2e830f&&this._scanArray.push(i)}return this._createScanGeoArray(),this._scanArray}addScan(e){(!e||!(e instanceof _0x2e830f))&&(e=new _0x2e830f(this)),this._scanArray.push(e),this._createScanGeoArray()}removeAllScanArray(){this._removeAllScanArrayPrimitive(),this._scanArray=[]}removeScan(e){if(this._primitiveScnaFillArry.length>e){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaFillArry.splice(e,1)}if(this._primitiveScnaOutLineArry.length>e){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaOutLineArry.splice(e,1)}return this._scanArray.length>e&&(this._scanArray.splice(e,1),this._createScanGeoArray(),!0)}setScan(e,t){return e instanceof _0x2e830f&&(this.removeScan(t),this._scanArray.splice(t,0,e),this._createScanGeoArray(),!0)}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[]),this.removeAllScanArray()}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive());const t=this._dScanSpeed*e/1e3;this._updated_Scan(-t)}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScan()}_createScan(){if(this.removeAllScanArray(),!this.isShowScan||!this.show)return;const e=this.rotateAngle/this.scanCount;for(let r=0;r<this.scanCount;r++){var t=new _0x2e830f(this),i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*r);t._rotate=i,t.material=this.scanColor,this._scanArray.push(t);var n=new WebGLPlot.HeadingPitchRoll(t._rotate.z,t._rotate.y,t._rotate.x);const o=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this._offset.x,t.point.y+this._offset.y,t.point.z+this._offset.z),a=WebGLPlot.Transforms.headingPitchRollToFixedFrame(o,n);if(t.isFill){let e=this._createFillPrimitive(a,t);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(a,t);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan(e){if(this._removeAllScanArrayPrimitive(),this.isShowScan&&this.show)for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n];this.rotateAngle>=WebGLPlot.CesiumMath.TWO_PI?(t._rotate.z+=e,Math.abs(t._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(t._rotate.z=t._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(t.__bIsBack_?t._rotate.z-=e:t._rotate.z+=e,-t._rotate.z>=this.rotateAngle-this._rotate.z-t.scanAngle/2?t.__bIsBack_=!0:-t._rotate.z<=-this._rotate.z&&(t.__bIsBack_=!1));var i=new WebGLPlot.HeadingPitchRoll(t._rotate.z,t._rotate.y,t._rotate.x);const r=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this.offset.x,t.point.y+this.offset.y,t.point.z+this.offset.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,i);if(t.isFill){let e=this._createFillPrimitive(o,t);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(o,t);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_removeAllScanArrayPrimitive(){if(this._primitiveScnaFillArry.length>0){for(let e=0;e<this._primitiveScnaFillArry.length;e++){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaFillArry=[]}if(this._primitiveScnaOutLineArry.length>0){for(let e=0;e<this._primitiveScnaOutLineArry.length;e++){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaOutLineArry=[]}}_createRadarFillGeometry(e){return e||(e=this),_0x328501.createGeometry(new _0x328501({customPts:e._radarPts,slicePartitions:e.slicePartitions,stackPartitions:e._radarPts.length,radii:e.radii}),e.isClose)}_createRadarOutLineGeometry(e){return e||(e=this),_0x1ff575.createGeometry(new _0x1ff575({customPts:e._radarPts,slicePartitions:e.slicePartitions,stackPartitions:e._radarPts.length,radii:e.radii}),e.isClose)}_computerRadarPts(){if(this._customPts.length<3)throw new WebGLPlot.defined("PlotRotateRadar Property customPts.length < 3.");let e=[];for(let n=0;n<this._customPts.length;n++){const r=this._customPts[n],o=this.rotateAngle/(this.slicePartitions-1);for(var t=[],i=0;i<this.slicePartitions;i++){const e=i*o;t.push(new WebGLPlot.Cartesian3(r.x*Math.cos(e),r.x*Math.sin(e),r.y))}e.push(t)}return e}_createScanGeoArray(){const e=this.rotateAngle/this._scanArray.length;for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n],i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*n);t._rotate=i}}_merge(e){this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,.5)),e.dScanSpeed?this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),e.rotateAngle?this.rotateAngle=WebGLPlot.CesiumMath.toRadians(e.rotateAngle):this.rotateAngle=WebGLPlot.CesiumMath.toRadians(360),this.isClose=this.rotateAngle%WebGLPlot.CesiumMath.TWO_PI==0,this._radarPts=this._computerRadarPts()}}Object.defineProperties(_0x467388.prototype,{customPts:{get:function(){return this._customPts},set:function(e){Array.isArray(e)&&(this._customPts=e,this._radarPts=this._computerRadarPts())}}});const _0x177173=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x116052=_0x177173(void 0,(function(){return _0x116052.toString().search("(((.+)+)+)+$").toString().constructor(_0x116052).search("(((.+)+)+)+$")}));_0x116052();class _0x2a4b84 extends _0x467388{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotMechanicalRadar scene is required.");e.rotateAngle=360,e.scale=WebGLPlot.defaultValue(e.scale,1),e.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1e4,1e4,1e4)),e.cellAngle=WebGLPlot.defaultValue(e.cellAngle,5),e.customPts=_0x5ad840(e.radii.x/10*e.scale),e.slicePartitions=e.rotateAngle/e.cellAngle,super(e,t),this.PlotRadarType=_0x49109a.PlotMechanicalRadar}}function _0x5ad840(e){var t=[];return t.push(new WebGLPlot.Cartesian3(0,0,0)),t.push(new WebGLPlot.Cartesian3(1.10296043731977*e,.046804145634484*e,0)),t.push(new WebGLPlot.Cartesian3(2.21610390044188*e,.11759698792659*e,0)),t.push(new WebGLPlot.Cartesian3(3.23948463412258*e,.207919742367934*e,0)),t.push(new WebGLPlot.Cartesian3(4.24306826853316*e,.304605633553736*e,0)),t.push(new WebGLPlot.Cartesian3(5.07593366806073*e,.449055607644075*e,0)),t.push(new WebGLPlot.Cartesian3(6.09774013826592*e,.626275021765735*e,0)),t.push(new WebGLPlot.Cartesian3(6.82649676873021*e,.854033937659516*e,0)),t.push(new WebGLPlot.Cartesian3(7.59836360255064*e,1.13340451890574*e,0)),t.push(new WebGLPlot.Cartesian3(8.12046765798091*e,1.39526442140232*e,0)),t.push(new WebGLPlot.Cartesian3(8.77215268479149*e,1.76316819829927*e,0)),t.push(new WebGLPlot.Cartesian3(9.24420050024946*e,2.26394442518268*e,0)),t.push(new WebGLPlot.Cartesian3(9.41437066670075*e,2.78004341750028*e,0)),t.push(new WebGLPlot.Cartesian3(9.37677016147896*e,3.37826190260998*e,0)),t.push(new WebGLPlot.Cartesian3(9.02402463279236*e,4.05665157036142*e,0)),t.push(new WebGLPlot.Cartesian3(8.49067600110484*e,4.52027646588052*e,0)),t.push(new WebGLPlot.Cartesian3(7.93178024681909*e,4.83964546832953*e,0)),t.push(new WebGLPlot.Cartesian3(7.37859457443028*e,4.95818525526998*e,0)),t.push(new WebGLPlot.Cartesian3(6.73933014626123*e,4.97031713954619*e,0)),t.push(new WebGLPlot.Cartesian3(6.1144105659988*e,4.8548345993221*e,0)),t.push(new WebGLPlot.Cartesian3(5.51606295388907*e,4.68304158511523*e,0)),t.push(new WebGLPlot.Cartesian3(4.84103177562709*e,4.34900006813962*e,0)),t.push(new WebGLPlot.Cartesian3(4.09846873384157*e,3.95082720446673*e,0)),t.push(new WebGLPlot.Cartesian3(3.26846203349058*e,3.4279079135254*e,0)),t.push(new WebGLPlot.Cartesian3(2.2493811983941*e,2.68004157158963*e,0)),t.push(new WebGLPlot.Cartesian3(1.43802404023069*e,1.88816148893958*e,0)),t.push(new WebGLPlot.Cartesian3(.67580571600966*e,.925081705540024*e,0)),t.push(new WebGLPlot.Cartesian3(0,0,0)),t}Object.defineProperties(_0x2a4b84.prototype,{radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._radii)){this._radii=e.clone(),this.customPts=_0x5ad840(this._radii.x/10*this._scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e,this.customPts=_0x5ad840(this._radii.x/10*e);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}}});const _0x19f520=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4ab434=_0x19f520(void 0,(function(){return _0x4ab434.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ab434).search("(((.+)+)+)+$")}));_0x4ab434();class _0x18b408 extends _0x46adf9{constructor(e){if(super(e),this.PlotRadarType="PlotParameterRadarScan",this.scale=WebGLPlot.defaultValue(e.scale,1),this.radii=WebGLPlot.defaultValue(e.radii,0),this.innerRadii=WebGLPlot.defaultValue(e.innerRadii,0),this._minimumClock=WebGLPlot.CesiumMath.toRadians(0),this._maximumClock=WebGLPlot.CesiumMath.toRadians(5),this._minimumCone=WebGLPlot.defaultValue(e._minimumCone,0),this._maximumCone=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),this.heightReference=WebGLPlot.defaultValue(e.heightReference,void 0),this.subdivisions=WebGLPlot.defaultValue(e.subdivisions,128),this.shadows=WebGLPlot.defaultValue(e.shadows,WebGLPlot.ShadowMode.DISABLED),this.distanceDisplayCondition=WebGLPlot.defaultValue(e.distanceDisplayCondition,new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute),this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this.isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),this.__bIsBack_=void 0,this._minimumClock>this._maximumClock){let e=this._minimumClock;this._minimumClock=this._maximumClock,this._maximumClock=e}this.scanAngle=this._maximumClock-this._minimumClock,"PlotParameterRadar"===e.PlotRadarType&&(this.isOutline=!1)}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e.rotate=this.rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x18b408(this)}}const _0x1cc733=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2b5ec6=_0x1cc733(void 0,(function(){return _0x2b5ec6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b5ec6).search("(((.+)+)+)+$")}));_0x2b5ec6();class _0x2f0d40 extends _0x46adf9{constructor(e,t){super(e,t),this.PlotRadarType=_0x49109a.PlotParameterRadar,this._primitiveScnaFillArry=[],this._primitiveScnaOutLineArry=[],this._scanArray=[],this._merge(e),this._add2Scene()}getScanArray(){return this._scanArray}setScanArray(e){this.removeAllScanArray();for(let t=0;t<e.length;t++){const i=e[t];i instanceof _0x18b408&&this._scanArray.push(i)}return this._createScanGeoArray(),this._scanArray}addScan(e){(!e||!(e instanceof _0x18b408))&&(e=new _0x18b408(this)),this._scanArray.push(e),this._createScanGeoArray()}removeAllScanArray(){this._removeAllScanArrayPrimitive(),this._scanArray=[]}removeScan(e){if(this._primitiveScnaFillArry.length>e){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaFillArry.splice(e,1)}if(this._primitiveScnaOutLineArry.length>e){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaOutLineArry.splice(e,1)}return this._scanArray.length>e&&(this._scanArray.splice(e,1),this._createScanGeoArray(),!0)}setScan(e,t){return!(t>=this._scanArray.length)&&((!e||!(e instanceof _0x18b408))&&(e=new _0x18b408(this)),this.removeScan(t),this._scanArray.splice(t,0,e),this._createScanGeoArray(),!0)}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive());const t=this._dScanSpeed*e/1e3;this._updated_Scan(-t)}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScan()}_createScan(){if(this.removeAllScanArray(),!this.isShowScan||!this.show)return;const e=(this._maximumClock-this._minimumClock)/this.scanCount;for(let r=0;r<this.scanCount;r++){var t=new _0x18b408(this),i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-this._minimumClock-e*r);t._rotate=i,t.material=this.scanColor,this._scanArray.push(t);var n=new WebGLPlot.HeadingPitchRoll(t._rotate.z,t._rotate.y,t._rotate.x);const o=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this.offset.x,t.point.y+this.offset.y,t.point.z+this.offset.z),a=WebGLPlot.Transforms.headingPitchRollToFixedFrame(o,n);if(t.isFill){let e=this._createFillPrimitive(a,t);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(a,t);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan(e){if(this._removeAllScanArrayPrimitive(),this.isShowScan&&this.show)for(let i=0;i<this._scanArray.length;i++){const n=this._scanArray[i];this.radarClock>=WebGLPlot.CesiumMath.TWO_PI?(n._rotate.z+=e,Math.abs(n._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(n._rotate.z=n._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(n.__bIsBack_?n._rotate.z-=e:n._rotate.z+=e,-n._rotate.z>=this._maximumClock-this._rotate.z-n.scanAngle?n.__bIsBack_=!0:-n._rotate.z<=this._minimumClock-this._rotate.z&&(n.__bIsBack_=!1));var t=new WebGLPlot.HeadingPitchRoll(n._rotate.z,n._rotate.y,n._rotate.x);const r=WebGLPlot.Cartesian3.fromDegrees(n.point.x+this.offset.x,n.point.y+this.offset.y,n.point.z+this.offset.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,t);if(n.isFill){let e=this._createFillPrimitive(o,n);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(n.isOutline){let e=this._createOutlinePrimitive(o,n);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan2(e){if(this._primitiveScnaFillArry.length>0)for(let o=0;o<this._primitiveScnaFillArry.length;o++){let a=this._primitiveScnaFillArry[o];const s=this._scanArray[o];this.radarClock>=WebGLPlot.CesiumMath.TWO_PI?(s._rotate.z+=e,Math.abs(s._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(s._rotate.z=s._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(s.__bIsBack_?s._rotate.z-=e:s._rotate.z+=e,-s._rotate.z>=this._maximumClock-this._rotate.z-s.scanAngle?s.__bIsBack_=!0:-s._rotate.z<=this._minimumClock-this._rotate.z&&(s.__bIsBack_=!1));const l=WebGLPlot.Cartesian3.fromDegrees(s.point.x,s.point.y,s.point.z);var t=WebGLPlot.Matrix4.fromTranslation(l),i=WebGLPlot.Cartesian3.multiplyByScalar(l,-1,new WebGLPlot.Cartesian3),n=WebGLPlot.Matrix4.fromTranslation(i);let u=WebGLPlot.Matrix3.fromRotationX(s._rotate.x),c=WebGLPlot.Matrix3.fromRotationY(s._rotate.y),h=WebGLPlot.Matrix3.fromRotationZ(s._rotate.z);n=WebGLPlot.Matrix4.multiplyByMatrix3(n,u,n),n=WebGLPlot.Matrix4.multiplyByMatrix3(n,c,n),n=WebGLPlot.Matrix4.multiplyByMatrix3(n,h,n);var r=WebGLPlot.Matrix4.multiply(t,n,new WebGLPlot.Matrix4);a.modelMatrix=r}if(this._primitiveScnaOutLineArry.length>0)for(let e=0;e<this._primitiveScnaOutLineArry.length;e++)this._primitiveScnaOutLineArry[e]}_createRadarFillGeometry(e){return _0x436613.createGeometry(new _0x436613(e))}_createRadarOutLineGeometry(e){return _0x377d94.createGeometry(new _0x377d94(e))}_removeAllScanArrayPrimitive(){if(this._primitiveScnaFillArry.length>0){for(let e=0;e<this._primitiveScnaFillArry.length;e++){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaFillArry=[]}if(this._primitiveScnaOutLineArry.length>0){for(let e=0;e<this._primitiveScnaOutLineArry.length;e++){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaOutLineArry=[]}}_createScanGeoArray(){const e=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n],i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*n);t._rotate=i,t.scanAngle=t.maximumClock-t.minimumClock}}clone(e){return WebGLPlot.defined(e)?(e.PlotRadarType=this.PlotRadarType,e.id=this.id,e.point=this.point.clone(),e._rotate=this._rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this._innerRadii,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.fillColor,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x2f0d40(this)}_merge(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("PlotParameterRadar merge source is required.");if(this._innerRadii=WebGLPlot.defaultValue(e.innerRadii,0),e.minimumClock?this._minimumClock=WebGLPlot.CesiumMath.toRadians(e.minimumClock):this._minimumClock=0,e.maximumClock?this._maximumClock=WebGLPlot.CesiumMath.toRadians(e.maximumClock):this._maximumClock=WebGLPlot.CesiumMath.TWO_PI,e.minimumCone?this._minimumCone=WebGLPlot.CesiumMath.toRadians(e.minimumCone):this._minimumCone=0,e.maximumCone?this._maximumCone=WebGLPlot.CesiumMath.toRadians(e.maximumCone):this._maximumCone=WebGLPlot.CesiumMath.PI,this.heightReference=WebGLPlot.defaultValue(e.heightReference,void 0),this.distanceDisplayCondition=WebGLPlot.defaultValue(e.distanceDisplayCondition,new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute),this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),e.dScanSpeed?this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),this._minimumClock>this._maximumClock){let e=this._minimumClock;this._minimumClock=this._maximumClock,this._maximumClock=e}this.radarClock=this._maximumClock-this._minimumClock}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[]),this.removeAllScanArray()}}Object.defineProperties(_0x2f0d40.prototype,{point:{get:function(){return this._point},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._point)){this._point=e.clone();for(let t=0;t<this._scanArray.length;t++){this._scanArray[t].point=e}this._isNeedUpdate=!0}}},rotate:{get:function(){return new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toDegrees(this._rotate.x),WebGLPlot.CesiumMath.toDegrees(this._rotate.y),WebGLPlot.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81){let i=new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toRadians(e.x),WebGLPlot.CesiumMath.toRadians(e.y),WebGLPlot.CesiumMath.toRadians(e.z));if(!WebGLPlot.Cartesian3(i,this._rotate)){this._rotate=i;const e=(this._maximumClock-this._minimumClock)/this.scanCount;for(let i=0;i<this._scanArray.length;i++){const n=this._scanArray[i];var t=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*i);n._rotate=t}this._isNeedUpdate=!0}}}},innerRadii:{get:function(){return this._innerRadii.x<=1e-8||this._innerRadii.y<=1e-8||this._innerRadii.z<=1e-8?new _0x11ff81(0,0,0):this._innerRadii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._point)){(e.x<=0||e.y<=0||e.z<=0)&&(e=new _0x11ff81(1e-8,1e-8,1e-8)),this._innerRadii=e.clone(),this._innerRadii.x>this.radii.x&&(this._innerRadii=this.radii.clone());for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].innerRadii=this.innerRadii.clone()}this._isNeedUpdate=!0}}},radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._point)){this._radii=e.clone(),this._innerRadii.x>this.radii.x&&(this._innerRadii=this.radii.clone());for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].radii=this.radii.clone()}this._isNeedUpdate=!0}}},minimumClock:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._minimumClock)},set:function(e){if("number"!=typeof e||e===this.minimumClock||e>this.maximumClock)return;this._minimumClock=WebGLPlot.CesiumMath.toRadians(e),this._isNeedUpdate=!0;const t=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let e=0;e<this._scanArray.length;e++){var i=this._scanArray[e],n=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-t*e);i._rotate=n}this.radarClock=this._maximumClock-this._minimumClock}},maximumClock:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._maximumClock)},set:function(e){if("number"!=typeof e||e===this.maximumClock||e<this.minimumClock)return;this._maximumClock=WebGLPlot.CesiumMath.toRadians(e),this._isNeedUpdate=!0;const t=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let e=0;e<this._scanArray.length;e++){var i=this._scanArray[e],n=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-t*e);i._rotate=n}this.radarClock=this._maximumClock-this._minimumClock}},minimumCone:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._minimumCone)},set:function(e){if("number"==typeof e&&e!==this.minimumCone){this._minimumCone=WebGLPlot.CesiumMath.toRadians(e);for(let e=0;e<this._scanArray.length;e++){this._scanArray[e]._minimumCone=this._minimumCone}this._isNeedUpdate=!0}}},maximumCone:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._maximumCone)},set:function(e){if("number"==typeof e&&e!==this.maximumCone){this._maximumCone=WebGLPlot.CesiumMath.toRadians(e);for(let e=0;e<this._scanArray.length;e++){this._scanArray[e]._maximumCone=this._maximumCone}this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e;for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].scale=this._scale}this._isNeedUpdate=!0}}}});var _0xd7f0d1=(_0x1bb754=!0,function(e,t){var i=_0x1bb754?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1bb754=!1,i}),_0x398591=_0xd7f0d1(void 0,(function(){return _0x398591.toString().search("(((.+)+)+)+$").toString().constructor(_0x398591).search("(((.+)+)+)+$")})),_0x1bb754;_0x398591();class _0x11b373 extends _0x46adf9{constructor(e){super(e),this._slicePartitions=2,this.scaningRow=0,e._radarPts.length>3&&this._computeScanPts(e._radarPts),this.PlotRadarType="PlotScanRadarScan",e.scanConeColor&&(this._fillColor=e.scanConeColor),this.isBackIng=!1}_computeScanPts(e){const t=e[0],i=e[this.scaningRow+1],n=e[this.scaningRow+2];var r=[];r.push(new WebGLPlot.Cartesian3(t[0].x,t[0].y,t[0].z)),r.push(new WebGLPlot.Cartesian3(t[1].x,t[1].y,t[1].z));var o=[];o.push(new WebGLPlot.Cartesian3(i[0].x,i[0].y,i[0].z)),o.push(new WebGLPlot.Cartesian3(i[1].x,i[1].y,i[1].z));var a=[];a.push(new WebGLPlot.Cartesian3(n[0].x,n[0].y,n[0].z)),a.push(new WebGLPlot.Cartesian3(n[1].x,n[1].y,n[1].z));var s=[];s.push(new WebGLPlot.Cartesian3(t[0].x,t[0].y,t[0].z)),s.push(new WebGLPlot.Cartesian3(t[1].x,t[1].y,t[1].z)),this._radarPts=[r,o,a,s],this._indices=[0,3,2,0,4,5,0,2,4,0,5,3,4,2,3,3,5,4]}}const _0x12ec98=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x43891d=_0x12ec98(void 0,(function(){return _0x43891d.toString().search("(((.+)+)+)+$").toString().constructor(_0x43891d).search("(((.+)+)+)+$")}));_0x43891d();class _0x5d6ff7 extends _0x46adf9{constructor(e,t){super(e,t),this._primitiveScnaFill=void 0,this._primitiveScnaOutLine=void 0,this.PlotRadarType=_0x49109a.PlotScanRadar,e.isShowScan&&(this.scaningRow=1),this._fillPrimitives=[],this._merge(e),this._add2Scene()}_updated(e){if(this._isNeedUpdate&&(this._isNeedUpdate=!1,this._computeRadarPts2(),this._createRadarPrimitive()),this.isShowScan){const t=this.dScanSpeed*e/1e3;this._updated_Scan(-t)}}_updated_Scan(e){if(this._removeScanConePrimitive(),!this.scanCone)return;this.scaningRow%2!=0?this.scanCone.isBackIng=!1:(e*=-1,this.scanCone.isBackIng=!0),this.scanCone._rotate.z+=e,(-this.scanCone._rotate.z+this.cellAngle>=-this._rotate.z+this.scanHAngle||-this.scanCone._rotate.z<=-this._rotate.z&&this.scanCone.isBackIng)&&(this.scaningRow+=1,this.scanCone.scaningRow+=1,this.scaningRow-1>=this.scanVAngle/this.cellAngle&&(this.scanCone.scaningRow=0,this.scaningRow=1,this.scanCone._rotate.z=this._rotate.z),this._isNeedUpdate=!0,this.scanCone._computeScanPts(this._radarPts));var t=new WebGLPlot.HeadingPitchRoll(this.scanCone._rotate.z,this._rotate.y,this._rotate.x);const i=WebGLPlot.Cartesian3.fromDegrees(this.scanCone.point.x+this.offset.x,this.scanCone.point.y+this.offset.y,this.scanCone.point.z+this.offset.z),n=WebGLPlot.Transforms.headingPitchRollToFixedFrame(i,t);if(this.scanCone.isFill){let e=this._createFillPrimitive(n,this.scanCone);this._primitiveScnaFill=this._primitives.add(e[0])}if(this.scanCone.isOutline){let e=this._createOutlinePrimitive(n,this.scanCone);this._primitiveScnaOutLine=this._primitives.add(e)}}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScanCone()}_createRadarFillGeometry(e,t){return e||(e=this),t||(t=e._radarPts),_0x328501.createGeometry(new _0x328501({customPts:t,slicePartitions:e.slicePartitions,stackPartitions:t.length,radii:e.radii,indices:e._indices}),this.isClose)}_createRadarOutLineGeometry(e,t){return e||(e=this),t||(t=e._radarPts),_0x1ff575.createGeometry(new _0x1ff575({customPts:t,slicePartitions:e.slicePartitions,stackPartitions:t.length,radii:this.radii}),this.isClose)}_createScanCone(){this._removeScanConePrimitive(),this.scanCone||(this.scanCone=new _0x11b373(this)),this.scanCone.rotate=this.rotate,this.scanCone.material=this.scanConeColor;var e=new WebGLPlot.HeadingPitchRoll(this.scanCone._rotate.z,this.scanCone._rotate.y,this.scanCone._rotate.x);const t=WebGLPlot.Cartesian3.fromDegrees(this.point.x+this.offset.x,this.point.y+this.offset.y,this.point.z+this.offset.z),i=WebGLPlot.Transforms.headingPitchRollToFixedFrame(t,e);if(this.scanCone.isFill){let e=this._createFillPrimitive(i,this.scanCone);this._primitiveScnaFill=this._primitives.add(e[0])}if(this.scanCone.isOutline){let e=this._createOutlinePrimitive(i,this.scanCone);this._primitiveScnaOutLine=this._primitives.add(e)}}_removeScanConePrimitive(){this._primitiveScnaFill&&(this._primitives.removeAndDestroy(this._primitiveScnaFill),this._primitiveScnaFill=void 0),this._primitiveScnaOutLine&&(this._primitives.removeAndDestroy(this._primitiveScnaOutLine),this._primitiveScnaOutLine=void 0)}_addFillPrimitive(e){if(this._fillPrimitives.length>0){for(var t in this._fillPrimitives)this._primitives.removeAndDestroy(this._fillPrimitives[t]);this._fillPrimitives=[]}let i=this._createFillPrimitive(e);for(var t in i)this._fillPrimitives.push(this._primitives.add(i[t]))}_createFillPrimitive(e,t){t||(t=this);var i=[],n={show:new WebGLPlot.ShowGeometryInstanceAttribute(t.isFill),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:void 0,offset:void 0},r=new WebGLPlot.MaterialAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:t.fillColor}),translucent:!0,closed:!0});let o=this._createRadarFillGeometry(t,t._radarPts1),a=new WebGLPlot.GeometryInstance({id:t.id,geometry:o,modelMatrix:e,attributes:n}),s=new WebGLPlot.Primitive({geometryInstances:a,appearance:r,asynchronous:!1,shadows:t.shadows});if(i.push(s),t._radarPts2&&t._radarPts2.length>2){let r=this._createRadarFillGeometry(t,t._radarPts2),o=new WebGLPlot.GeometryInstance({id:t.id,geometry:r,modelMatrix:e,attributes:n});var l=new WebGLPlot.MaterialAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:t.scanedColor}),translucent:!0,closed:!0});let a=new WebGLPlot.Primitive({geometryInstances:o,appearance:l,asynchronous:!1,shadows:t.shadows});i.push(a)}return i}_createOutlinePrimitive(e,t){t||(t=this);var i={show:new WebGLPlot.ShowGeometryInstanceAttribute(t.isOutline),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(t.outlineColor),offset:void 0};let n=this._createRadarOutLineGeometry(t,t._radarPts),r=new WebGLPlot.GeometryInstance({id:t.id,geometry:n,modelMatrix:e,attributes:i}),o=new WebGLPlot.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:t.outlineWidth}});return new WebGLPlot.Primitive({geometryInstances:r,appearance:o,asynchronous:!1,shadows:t.shadows})}_merge(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("PlotScanRadar merge source is required.");this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),e.cellAngle?this.cellAngle=WebGLPlot.CesiumMath.toRadians(e.cellAngle):this.cellAngle=WebGLPlot.CesiumMath.toRadians(5);let t=30,i=60,n=WebGLPlot.CesiumMath.toDegrees(this.cellAngle);WebGLPlot.defined(e.scanVAngle)?t=e.scanVAngle%n!=0?e.scanVAngle+(n-e.scanVAngle%n):e.scanVAngle:t%n!=0?t+=n-t%n:t=t,WebGLPlot.defined(e.scanHAngle)?i=e.scanHAngle%n!=0?e.scanHAngle+(n-e.scanHAngle%n):e.scanHAngle:i%n!=0?i+=n-i%n:i=i,this.scanVAngle=WebGLPlot.CesiumMath.toRadians(t),this.scanHAngle=WebGLPlot.CesiumMath.toRadians(i),this._stackPartitions=t/n+1,this._slicePartitions=i/n+1,this.scanHAngle>=WebGLPlot.CesiumMath.TWO_PI&&(this.isClose=!0),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this._scanConeColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(0,1,0,.8)),this._scanedColor=WebGLPlot.defaultValue(e.scanedColor,new WebGLPlot.Color(0,1,0,.3)),e.dScanSpeed?this.dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this.dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),this._computeRadarPts(),this._computeRadarPts2()}_computeRadarPts(){const e=this.radii.x*this.scale;this._customPts=[],this._customPts.push(new WebGLPlot.Cartesian2(0,0));for(let t=0;t<=this.scanVAngle;t+=this.cellAngle){const i=Math.cos(t)*e,n=Math.sin(t)*e;this._customPts.push(new WebGLPlot.Cartesian2(i,n))}this._customPts.push(new WebGLPlot.Cartesian2(0,0));let t=[];for(let e=0;e<this._customPts.length;e++){const r=this._customPts[e];for(var i=[],n=0;n<=this.scanHAngle;n+=this.cellAngle)i.push(new WebGLPlot.Cartesian3(r.x*Math.cos(n),r.x*Math.sin(n),r.y));t.push(i)}this._radarPts=t}_computeRadarPts2(){const e=this.radii.x*this.scale;this._customPts1=[],this._customPts1.push(new WebGLPlot.Cartesian2(0,0));for(let t=this.scaningRow*this.cellAngle;t<=this.scanVAngle;t+=this.cellAngle){const i=Math.cos(t)*e,n=Math.sin(t)*e;this._customPts1.push(new WebGLPlot.Cartesian2(i,n))}if(this._customPts1.push(new WebGLPlot.Cartesian2(0,0)),this._customPts2=[],this.scaningRow>0){this._customPts2.push(new WebGLPlot.Cartesian2(0,0));for(let t=0;t<=this.scaningRow*this.cellAngle;t+=this.cellAngle){const i=Math.cos(t)*e,n=Math.sin(t)*e;this._customPts2.push(new WebGLPlot.Cartesian2(i,n))}this._customPts2.push(new WebGLPlot.Cartesian2(0,0))}let t=[];for(let e=0;e<this._customPts1.length;e++){const r=this._customPts1[e];for(var i=[],n=0;n<=this.scanHAngle;n+=this.cellAngle)i.push(new WebGLPlot.Cartesian3(r.x*Math.cos(n),r.x*Math.sin(n),r.y));t.push(i)}this._radarPts1=t;let r=[];for(let e=0;e<this._customPts2.length;e++){const t=this._customPts2[e];for(i=[],n=0;n<=this.scanHAngle;n+=this.cellAngle)i.push(new WebGLPlot.Cartesian3(t.x*Math.cos(n),t.x*Math.sin(n),t.y));r.push(i)}this._radarPts2=r}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e._rotate=this._rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x5d6ff7(this,this._scene)}destroy(){if(this._removeScanConePrimitive(),this._fillPrimitives.length>0){for(var e in this._fillPrimitives)this._primitives.removeAndDestroy(this._fillPrimitives[e]);this._fillPrimitives=[]}this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this.scanCone=void 0}}Object.defineProperties(_0x5d6ff7.prototype,{point:{get:function(){return this._point},set:function(e){(e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._point)&&(this._point=e.clone(),this.scanCone.point=e.clone(),this._isNeedUpdate=!0)}},radii:{get:function(){return this._radii},set:function(e){(e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._radii)&&(this._radii=e.clone(),this._computeRadarPts(),this._computeRadarPts2(),this.scanCone._computeScanPts(this._radarPts),this._isNeedUpdate=!0)}},scale:{get:function(){return this._scale},set:function(e){"number"==typeof e&&this._scale!==e&&(this._scale=e,this._computeRadarPts(),this._computeRadarPts2(),this.scanCone._computeScanPts(this._radarPts),this._isNeedUpdate=!0)}},rotate:{get:function(){return new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toDegrees(0),WebGLPlot.CesiumMath.toDegrees(0),WebGLPlot.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81){let t=new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toRadians(0),WebGLPlot.CesiumMath.toRadians(0),WebGLPlot.CesiumMath.toRadians(e.z));WebGLPlot.Cartesian3.equals(t,this._rotate)||(this._rotate=t,this._createScanCone(),this._isNeedUpdate=!0)}}},scanedColor:{get:function(){return this._scanedColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._scanedColor)&&(this._scanedColor=e,this._createRadarPrimitive())}},fillColor:{get:function(){return this._fillColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._fillColor)&&(this._fillColor=e,this._createRadarPrimitive())}},scanConeColor:{get:function(){return this._scanConeColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._scanConeColor)&&(this._scanConeColor=e,this._createScanCone())}}});const _0x143e2c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x564680=_0x143e2c(void 0,(function(){return _0x564680.toString().search("(((.+)+)+)+$").toString().constructor(_0x564680).search("(((.+)+)+)+$")}));_0x564680();class _0x5e75e0 extends _0x467388{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotWarningRadar scene is required.");e.rotateAngle=360,e.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1e4,1e4,1e4)),e.cellAngle=WebGLPlot.defaultValue(e.cellAngle,5),e.customPts=_0x2111f3(e.radii.x),e.slicePartitions=e.rotateAngle/e.cellAngle,super(e,t),this.PlotRadarType=_0x49109a.PlotWarningRadar}clone(e){if(!WebGLPlot.defined(e)){var t=new _0x5e75e0(this,this._scene);return t.id=WebGLPlot.createGuid(),t}return e._id=this.id,e._point=this.point.clone(),e._rotate=this.rotate.clone(),e._show=this.show,e._radii=this.radii,e._innerRadii=this.innerRadii,e._minimumClock=this.minimumClock,e._maximumClock=this.maximumClock,e._minimumCone=this.minimumCone,e._maximumCone=this.maximumCone,e._heightReference=this.heightReference,e._fill=this.fill,e._material=this.material,e._outline=this.outline,e._outlineColor=this.outlineColor,e._outlineWidth=this.outlineWidth,e._stackPartitions=this.stackPartitions,e._slicePartitions=this.slicePartitions,e._shadows=this.shadows,e._distanceDisplayCondition=this.distanceDisplayCondition,e}}function _0x2111f3(e){return[new WebGLPlot.Cartesian3(0,e/5,0),new WebGLPlot.Cartesian3(e,e/5*2,0),new WebGLPlot.Cartesian3(e,0,0),new WebGLPlot.Cartesian3(0,e/5,0)]}Object.defineProperties(_0x5e75e0.prototype,{radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x11ff81)&&!_0x11ff81.equals(e,this._radii)){this._radii=e.clone(),this.customPts=_0x2111f3(this._radii.x*this.scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e,this.customPts=_0x2111f3(this._radii.x*this.scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}}});var _0x391965=(_0x2e9432=!0,function(e,t){var i=_0x2e9432?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e9432=!1,i}),_0x33aa66=_0x391965(void 0,(function(){return _0x33aa66.toString().search("(((.+)+)+)+$").toString().constructor(_0x33aa66).search("(((.+)+)+)+$")})),_0x2e9432;_0x33aa66();var _0x564a2c={LocationPt:0,ScalePt:1,AlgoMovePt:2,UnkownPt:4},_0x1e0288=Object.freeze(_0x564a2c),_0x4d3584=(_0x425a1f=!0,function(e,t){var i=_0x425a1f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x425a1f=!1,i}),_0x59f30e=_0x4d3584(void 0,(function(){return _0x59f30e.toString().search("(((.+)+)+)+$").toString().constructor(_0x59f30e).search("(((.+)+)+)+$")})),_0x425a1f;function _0x1f7045(e,t){this._scene=e,this._graphicObject=null,this._ctrlPoints=new WebGLPlot.BillboardCollection,this._scene.primitives.add(this._ctrlPoints),this.positionPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointWhite_Go.png"),this.scalePointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointYellow_Go.png"),this.anchorPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointRed_Go.png"),this.handle=t,this.isShiftPress=!1,this.shiftKeyDownFun=void 0,this.shiftKeyUpFun=void 0,this.editHeightMode=!1,this.ctrlPointCallBack=null}function _0x47b44d(e,t,i){e[t]=i}function _0x4c6e9e(e,t,i){for(var n=0;n<e._ctrlPoints.length;++n){var r=e._ctrlPoints.get(n);r.index===t.index&&r.type===t.type||(r.show=i)}}function _0x30eb39(e,t,i,n){if(e._graphicObject){var r=1,o=e._scene,a=WebGLPlot.SceneTransforms.transformWindowToDrawingBuffer(o,n);a.y=o.drawingBufferHeight-a.y;var s=WebGLPlot.Cartesian3.fromDegrees(e.startPoint.x,e.startPoint.y,0),l=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(o,s),u=_0x1f7045.getAltitudeByLogical(s,a,o);if(WebGLPlot.defined(u)){l.y<n.y&&(r=-1);var c=WebGLPlot.Cartesian3.distance(s,u)*r,h=new _0x11ff81(e.startPoint.x,e.startPoint.y,c);if(WebGLPlot.defined(i.index)){var d=i.index;t.localPoints[d]=h}else WebGLPlot.defined(i.annotationIndex)&&(t._localPoint=h);_0x2d6822.isSymbolDot(t.symbolType)?e._graphicObject.billboard.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z):e._graphicObject._initialize=!1,i.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z),e._graphicObject._wholeHeight=0}}}function _0x3f5100(e,t,i,n){if(WebGLPlot.defined(n)&&t._graphicObject){var r,o=i.type;t.getCtrlPt(i.type,i.index);var a=t._graphicObject;if(0===e)o===_0x1e0288.LocationPt&&t.isShiftPress&&(t.editHeightMode=!0),o===_0x1e0288.ScalePt&&(i.startScalePtn=n);else if(1===e){if(o===_0x1e0288.LocationPt&&(t.editHeightMode?_0x30eb39(t,t._graphicObject,i,n):(t._graphicObject.localPoints[i.index]=n,_0x2d6822.isSymbolDot(t._graphicObject.symbolType)?(t._graphicObject.__setEffectParameter({point:n}),t._graphicObject.billboard.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)):t._graphicObject.localPoints[0]=new WebGLPlot.Cartesian3(n.x,n.y,n.z),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z))),o===_0x1e0288.ScalePt){if(null===t._graphicObject)return;r=t.modifyDotSymbolSize(n,i.startScalePtn),a._sizeInMeters?(a.showMode===_0x4e5d29.Grid&&(a.billboard.scale=a.symbolSizeInMeters.x/a.gridSymbolSize.x*r,i.eyeOffset=new WebGLPlot.Cartesian3(i.eyeOffsetX*r,i.eyeOffsetY*r,0)),a.showMode===_0x4e5d29.Picture&&(a.billboard.scale=a.symbolPictureSizeInMeters.x/a._pictureSymbolSize.x*r,i.eyeOffset=new WebGLPlot.Cartesian3(i.eyeOffsetX*r,i.eyeOffsetY*r,0))):(i.pixelOffset=new WebGLPlot.Cartesian3(i.pixelOffsetX*r,i.pixelOffsetY*r,0),a.billboard.scale=r)}}else 2===e&&o===_0x1e0288.ScalePt&&(r=t.modifyDotSymbolSize(n,i.startScalePtn),a._sizeInMeters?(a.showMode===_0x4e5d29.Grid&&(a.symbolSizeInMeters=new WebGLPlot.Cartesian2(a.symbolSizeInMeters.x*r,a.symbolSizeInMeters.y*r)),a.showMode===_0x4e5d29.Picture&&(a.symbolPictureSizeInMeters=new WebGLPlot.Cartesian2(a.symbolPictureSizeInMeters.x*r,a.symbolPictureSizeInMeters.y*r))):(i.pixelOffsetX*=r,i.pixelOffsetY*=r,a.showMode===_0x4e5d29.Picture?(a.pictureSymbolSize.x*=r,a.pictureSymbolSize.y*=r):a.showMode===_0x4e5d29.Grid&&(a.gridSymbolSize.x*=r,a.gridSymbolSize.y*=r)),a._initialize=!1,t.createCtrlPoints(a))}}function _0x4feff0(e,t,i,n){if(WebGLPlot.defined(n)&&WebGLPlot.defined(t._graphicObject)){var r=i.type,o=i.index;if(r===_0x1e0288.LocationPt){if(t.editHeightMode)_0x30eb39(t,t._graphicObject,i,n);else{if(!(n instanceof _0x11ff81))return;var a=SuperMapAlgoPlot.PlottingUtil.clonePoints(t._graphicObject.localPoints);if(a[o]=n,(a=_0x2d6822.clearNextSamePts(a)).length!==t._graphicObject.localPoints.length)return;t._graphicObject.localPoints[o]=n,t.isogon&&0!==o&&(o=1),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)}t._graphicObject._isScalePtModify=!1}else if(r===_0x1e0288.ScalePt){if(!(n instanceof _0x11ff81))return;if(1===e){t._graphicObject._isScalePtModify=!0,t._graphicObject._modifyScalePtParams={index:o,position:n};var s=_0x41d4a9(t._graphicObject._scalePoints);i.position=s[o]}else if(2===e){var l=t._graphicObject._scalePoints[o],u=WebGLPlot.Cartesian3.fromDegrees(l.x,l.y,l.z);i.position=u,t._graphicObject._isScalePtModify=!1}}else if(r===_0x1e0288.AlgoMovePt){if(!(n instanceof _0x11ff81))return;t.getCtrlPt(r,o).position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z);for(var c=n.x-t.redPntPos.x,h=n.y-t.redPntPos.y,d=0;d<t._graphicObject.localPoints.length;++d){var f=t._graphicObject.localPoints[d];t._graphicObject.localPoints[d]=new WebGLPlot.Cartesian3(f.x+c,f.y+h,f.z)}t._graphicObject._isScalePtModify=!1,t.redPntPos.x=n.x,t.redPntPos.y=n.y}t._graphicObject._initialize=!1}}function _0x277d71(e,t,i){if(i instanceof _0x11ff81&&e._graphicObject&&e._graphicObject.annotationArray){var n=0,r=0;e._graphicObject.code;var o=e._graphicObject.symbolType;if(_0x2d6822.isSymbolDot(o)||t.type!==_0x1e0288.AlgoMovePt){if(!_0x2d6822.isSymbolDot(o)&&o!==_0x18bc2f.SYMBOL_TEXT||t.type!==_0x1e0288.LocationPt)return;n=i.x-e._graphicObject.localPoints[t.index].x,r=i.y-e._graphicObject.localPoints[t.index].y}else n=i.x-e.redPntPos.x,r=i.y-e.redPntPos.y;for(var a=0;a<e._graphicObject.annotationArray.length;a++){var s=e._graphicObject.annotationArray[a];s._localPoint.x+=n,s._localPoint.y+=r,s._localPoint.z=i.z}}}function _0x58c5f3(e,t,i,n){if(WebGLPlot.defined(n)&&t._graphicObject){if(WebGLPlot.defined(i.index)){_0x277d71(t,i,n);var r=t._graphicObject.symbolType;t._graphicObject.code,_0x2d6822.isSymbolDot(r)||r===_0x18bc2f.SYMBOL_TEXT?_0x3f5100(e,t,i,n):_0x4feff0(e,t,i,n)}else if(t._graphicObject.annotationArray.length>0){var o=t._graphicObject.annotationArray[i.annotationIndex];t.editHeightMode?_0x30eb39(t,o,i,n):n instanceof _0x11ff81&&(o._localPoint=n,i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z))}0===e&&t.isShiftPress?t.editHeightMode=!0:2===e&&(t._graphicObject._initialize=!1)}}function _0x41d4a9(e){var t=[];if(!WebGLPlot.defined(e)||0===e.length)return t;for(var i=0;i<e.length;++i){var n=e[i];t.push(n.x),t.push(n.y),t.push(0)}return WebGLPlot.Cartesian3.fromDegreesArrayHeights(t)}function _0xbe5764(e,t,i,n){if(t.editHeightMode){var r=1,o=t._scene,a=WebGLPlot.SceneTransforms.transformWindowToDrawingBuffer(o,n);a.y=o.drawingBufferHeight-a.y;var s=WebGLPlot.Cartesian3.fromDegrees(t.startPoint.x,t.startPoint.y,0),l=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(o,s),u=_0x1f7045.getAltitudeByLogical(s,a,o);if(!WebGLPlot.defined(u))return;l.y<n.y&&(r=-1);var c=WebGLPlot.Cartesian3.distance(s,u)*r,h=new _0x11ff81(t.startPoint.x,t.startPoint.y,c);t._graphicObject instanceof _0x3a6b26&&t._graphicObject.setOffset(h,!0),i.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z)}else{if(!(n instanceof _0x11ff81))return;var d=WebGLPlot.Cartographic.fromCartesian(i.position),f=new _0x11ff81(WebGLPlot.CesiumMath.toDegrees(d.longitude),WebGLPlot.CesiumMath.toDegrees(d.latitude),d.height),p=new _0x11ff81(n.x-f.x,n.y-f.y,n.z-f.z);t._graphicObject instanceof _0x3a6b26&&t._graphicObject.setOffset(p),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)}}_0x59f30e(),_0x1f7045.prototype.createCtrlPoint=function(e,t){if(WebGLPlot.defined(e)){var i=this;this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t){i.isShiftPress&&(i.editHeightMode=!0),_0x58c5f3(0,i,e,t),_0x4c6e9e(i,e,!1)},onDrag:function(e,t){_0x58c5f3(1,i,e,t)},onDragEnd:function(t,n){_0x58c5f3(2,i,t,n),i.createCtrlPoints(i._graphicObject),i.handle._featureModifiedEvent.raiseEvent(e),_0x47a70a.getInstance().symbolModified.raiseEvent(e),t.type===_0x1e0288.LocationPt&&i.handle._featureDragEvent.raiseEvent(i._graphicObject)}}},e.code;var n=e.symbolType,r=null,o=new WebGLPlot.Cartesian3(0,0,0),a=[];if(t===_0x1e0288.LocationPt)r=this.positionPointIconUrl,0===e.libID&&_0x18bc2f.SYMBOL_REGULARPOLYGON===e.code?(a.push(e.localPoints[0]),a.push(e.localPoints[e.localPoints.length-1]),this.isogon=!0):0===e.libID&&_0x18bc2f.SYMBOL_TEXT===e.code?a.push(e.localPoints[0]):a=e.localPoints;else if(t===_0x1e0288.ScalePt)r=this.scalePointIconUrl,_0x2d6822.isSymbolDot(n)?(o=i.getSaclePtOffset(e),a=e.localPoints):n!==_0x18bc2f.SYMBOL_DOT&&n!==_0x18bc2f.SYMBOL_TEXT&&(a=e._scalePoints);else if(t===_0x1e0288.AlgoMovePt){r=this.anchorPointIconUrl,a.push(i.computeRedPoint(e));var s=i.computeRedPoint(e);i.redPntPos=s}var l=Number.MIN_VALUE;this._scene.globe.depthTestAgainstTerrain&&(l=Number.MAX_VALUE);for(var u=0;u<a.length;++u){(void 0===a[u].z||isNaN(a[u].z))&&(a[u].z=0);var c={show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(a[u].x,a[u].y,a[u].z),scale:2,image:r,id:e.id,disableDepthTestDistance:l};if(e._sizeInMeters?c.eyeOffset=o:c.pixelOffset=o,(c=this._ctrlPoints.add(c)).index=u,c.type=t,c.SymbolType=_0x18bc2f.SYMBOL_UNKNOW,e._sizeInMeters)c.eyeOffsetX=o.x,c.eyeOffsetY=o.y;else{if(void 0===o)return;c.pixelOffsetX=o.x,c.pixelOffsetY=o.y}this.addCallback(c,i.ctrlPointCallBack)}}},_0x1f7045.prototype.createCtrlPoints=function(e){if(this.removeAll(),e&&this.handle._plottingLayer._isEditable){this._graphicObject=e;var t=e.symbolType;t===_0x18bc2f.SYMBOL_DOT&&e.showMode===_0x4e5d29.Marker||(this.createCtrlPoint(e,_0x1e0288.LocationPt),this.createCtrlPoint(e,_0x1e0288.ScalePt),!_0x2d6822.isSymbolDot(e.symbolType)&&t!==_0x18bc2f.SYMBOL_TEXT&&this.createCtrlPoint(e,_0x1e0288.AlgoMovePt),this.createAnnotationArrayCtrlPoints(e))}},_0x1f7045.prototype.createAnnotationArrayCtrlPoints=function(e){if(e&&e.annotationArray.length>0)for(var t=0;t<e.annotationArray.length;t++){var i=e.annotationArray[t];this.createAnnotationCtrlPoint(i,t)}},_0x1f7045.prototype.createAnnotationCtrlPoint=function(e,t){if(this._graphicObject){var i=e._localPoint,n=this._ctrlPoints.add({show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(i.x,i.y,i.z),scale:2,image:this.scalePointIconUrl,id:this._graphicObject.id,horizontalOrigin:WebGLPlot.HorizontalOrigin.LEFT});n.annotationIndex=t,n.type=_0x1e0288.LocationPt,n.SymbolType=_0x18bc2f.SYMBOL_UNKNOW,this.addCallback(n,this.ctrlPointCallBack)}},_0x1f7045.prototype.addCallback=function(e,t){var i=this;t.dragHandlers&&(_0x47b44d(e,"LEFT_DOWN",(function(n,r){function o(n,r){_0x2d6822.screenSpaceCameraController(i._scene,!1),void 0!==e.index&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(n,r),void 0!==e.annotationIndex&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(n,r)}function a(n,o){r.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x2d6822.screenSpaceCameraController(i._scene,!0),void 0!==e.index&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(n,o),void 0!==e.annotationIndex&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(n,o)}r.setInputAction((function(t){if(i._graphicObject)if(i.editHeightMode||e.type===_0x1e0288.ScalePt&&_0x2d6822.isSymbolDot(i._graphicObject.symbolType))o(e,t.endPosition);else{var n=_0x2d6822.getPosition(i._scene,t.endPosition);o(e,n)}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.setInputAction((function(t){i.editHeightMode||e.type===_0x1e0288.ScalePt&&_0x2d6822.isSymbolDot(i._graphicObject.symbolType)?a(e,t.position):a(e,_0x2d6822.getPosition(i._scene,t.position))}),WebGLPlot.ScreenSpaceEventType.LEFT_UP),void 0!==e.index&&t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(e,n),void 0!==e.annotationIndex&&t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(e,n)})),_0x47b44d(e,"mouseMove",(function(t){i.editHeightMode||(i.isShiftPress&&0===e.type?i._scene._canvas.style.cursor="n-resize":i._scene._canvas.style.cursor="default")})),_0x47b44d(e,"mouseOut",(function(e){i.editHeightMode||(i._scene._canvas.style.cursor="")})))},_0x1f7045.prototype.getSaclePtOffset=function(e){var t,i,n=e.billboardBoundsLineWidth,r=new WebGLPlot.Cartesian3(0,0,0);if(e.showMode===_0x4e5d29.Picture){let o=e._dotGrid._canvas.getContext("2d").measureText(e._textContent).width;t=(o>e.pictureSymbolSize.x?o:e.pictureSymbolSize.x)+n,i=e.pictureSymbolSize.y+n,e.sizeInMeters&&(i*=-1,t*=e.billboard.scale,i*=e.billboard.scale),r=new WebGLPlot.Cartesian3(t/2*e.scale,-i*e.scale,0)}else if(e.showMode===_0x4e5d29.Grid){if(null===e._dotGrid)return;t=e._dotGrid.selectedRectBounds.x+e._dotGrid.selectedRectBounds.width-e._dotGrid._canvas.width/2,i=e._dotGrid._canvas.height-e._dotGrid.selectedRectBounds.y,i-=e._dotGrid._OffsetText_Down,e.sizeInMeters&&(i*=-1,t*=e.billboard.scale/e.scale,i*=e.billboard.scale/e.scale),r=new WebGLPlot.Cartesian3(t,-i,0)}return r},_0x1f7045.prototype.getCtrlPt=function(e,t){for(var i=0;i<this._ctrlPoints.length;i++){var n=this._ctrlPoints.get(i);if(n.type===e&&t===n.index)return this._ctrlPoints.get(i)}return null},_0x1f7045.prototype.removeAll=function(){this._ctrlPoints.removeAll(),this._graphicObject=null},_0x1f7045.prototype.modifyDotSymbolSize=function(e,t){if(this._graphicObject){if(!WebGLPlot.defined(e))return this._graphicObject.billboard.scale;var i=this._scene,n=this._graphicObject.localPoints[0],r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)),o=_0x2d6822.distance(r,t);return _0x2d6822.distance(r,e)/o}},_0x1f7045.prototype.addListener=function(){var e=this;e.handle._featureRemoveEvent.addEventListener((function(){WebGLPlot.defined(e._ctrlPoints)&&e._ctrlPoints.removeAll()})),e.shiftKeyDownFun=function(t){72===t.keyCode&&(e.isShiftPress=!0)},e.shiftKeyUpFun=function(t){72===t.keyCode&&(e.isShiftPress=!1,e.editHeightMode=!1)},document.addEventListener("keydown",e.shiftKeyDownFun),document.addEventListener("keyup",e.shiftKeyUpFun)},_0x1f7045.prototype.removeListener=function(){document.removeEventListener("keydown",this.shiftKeyDownFun),document.removeEventListener("keyup",this.shiftKeyUpFun)},_0x1f7045.getAltitudeByLogical=function(e,t,i){var n=WebGLPlot.Cartographic.fromCartesian(e);n.height+=1,n=WebGLPlot.Cartesian3.fromRadians(n.longitude,n.latitude,n.height);var r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,e),o=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(o){var a;o.x===r.x?(-1,a=0):o.y===r.y?(0,a=-1):a=-1/((o.y-r.y)/(o.x-r.x));var s=i._view.viewport,l={left:s.x,right:s.x+s.width,bottom:s.y,top:s.y+s.height},u=_0x2d6822.intersectionOfRectByPointslopeline(t,a,l),c=u[0],h=u[1],d=new WebGLPlot.Cartesian3,f=new WebGLPlot.Cartesian3;WebGLPlot.SceneTransforms.drawingBufferToWgs84Coordinates(i,c,1,d),WebGLPlot.SceneTransforms.drawingBufferToWgs84Coordinates(i,h,1,f);var p=i.camera.position,_=new WebGLPlot.Cartesian3;WebGLPlot.Cartesian3.subtract(e,n,_);var m=new WebGLPlot.Cartesian3;WebGLPlot.Cartesian3.negate(_,m),WebGLPlot.Cartesian3.normalize(_,_),WebGLPlot.Cartesian3.normalize(m,m);var g=new WebGLPlot.Ray(e,_),x=new WebGLPlot.Ray(e,m),v=WebGLPlot.IntersectionTests.rayTriangleParametric(g,d,f,p);if(v)return WebGLPlot.Ray.getPoint(g,v);if(v=WebGLPlot.IntersectionTests.rayTriangleParametric(x,d,f,p))return WebGLPlot.Ray.getPoint(x,v)}},_0x1f7045.prototype.computeRedPoint=function(e){if(WebGLPlot.defined(e)||"function"!==e.computeBounds){var t=e.computeBounds(),i=this.pixelDisToRealDis(t,3);return new WebGLPlot.Cartesian3(t.x,t.y-i,t.z)}},_0x1f7045.prototype.pixelDisToRealDis=function(e,t){var i=this._scene,n=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(!WebGLPlot.defined(r))return 0;var o=new WebGLPlot.Cartesian3(r.x+t,r.y,0),a=_0x2d6822.getPosition(i,r),s=_0x2d6822.getPosition(i,o);return _0x2d6822.distance(a,s)},_0x1f7045.prototype.createGroupObjectCtrlPoint=function(e,t,i){if(WebGLPlot.defined(e)){this._graphicObject=e;var n=this;this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t){n.isShiftPress&&(n.editHeightMode=!0),n.handle.removeGroupObjectEditObject(),_0xbe5764(0,n,e,t)},onDrag:function(e,t){_0xbe5764(1,n,e,t)},onDragEnd:function(t,i){_0xbe5764(2,n,t,i),n.handle._featureModifiedEvent.raiseEvent(e),_0x47a70a.getInstance().symbolModified.raiseEvent(e),n.handle.drawGroupObjectEditObject(n._graphicObject,!0)}}};var r=null;i===_0x1e0288.LocationPt&&(r=this.positionPointIconUrl);var o=Number.MIN_VALUE;this._scene.globe.depthTestAgainstTerrain&&(o=Number.MAX_VALUE),(void 0===t.z||isNaN(t.z))&&(t.z=0);var a={show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z),scale:2,image:r,id:e.id,disableDepthTestDistance:o};(a=this._ctrlPoints.add(a)).index=0,a.type=i,a.SymbolType=_0x18bc2f.SYMBOL_UNKNOW,this.addCallback(a,n.ctrlPointCallBack)}};var _0x3ea87b=(_0x47e558=!0,function(e,t){var i=_0x47e558?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47e558=!1,i}),_0x5124bc=_0x3ea87b(void 0,(function(){return _0x5124bc.toString().search("(((.+)+)+)+$").toString().constructor(_0x5124bc).search("(((.+)+)+)+$")})),_0x47e558;function _0x4cf411(e,t){this._scene=e,this.handle=t,this.model=null,this.fixedFrameTransform=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("north","west"),this.initCallBack()}function _0x1fdc73(e,t,i){e[t]=i}function _0x2be103(e){e.destoryBoundsCtrl(),e.model?(e.createModelCtrl(),e.geoEdit._modelScale.x=e.model.scale):e.vector&&e.createVectorCtrl(e)}function _0x3b0fb1(e){e.scaleLeft1.show=!1,e.rotateCircle.show=!1,e.heightCtrl.show=!1,e.boxBounds.show=!1,e.moveFillCtrl.show=!1}function _0x37ac97(e,t,i,n){var r=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot.HeadingPitchRoll,a=Math.PI/180;return o.pitch=a*t.x,o.roll=a*t.y,o.heading=a*t.z,WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot.Ellipsoid.WGS84,n,i),i}function _0x7ba091(e,t,i,n){var r=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot.HeadingPitchRoll,a=Math.PI/180;return o.pitch=0,o.roll=0,o.heading=a*t.z+90*a,WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot.Ellipsoid.WGS84,n,i),i}function _0x25df49(e,t,i){if(WebGLPlot.defined(i)&&_0x451686(t)){var n=e._scene;if("heightCtrl"===t._instanceIds[0]){_0x3b0fb1(e);var r=_0x2d6822.pixelHeightToRealHeight(n,e.pixeStartPoint,i);e.geoEdit.localPoints[0].z=e.startPoint.z+r;var o=new _0x11ff81(e.geoEdit.localPoints[0].x,e.geoEdit.localPoints[0].y,e.geoEdit.localPoints[0].z);e.geoEdit.localPoints[0]=o,e.model&&_0x37ac97(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform),e.vector&&e.geoEdit.initSymbol(!0)}if("moveFillCtrl"===t._instanceIds[0]&&(_0x3b0fb1(e),e.geoEdit.localPoints[0].x=i.x,e.geoEdit.localPoints[0].y=i.y,e.model?_0x37ac97(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform):e.vector&&e.geoEdit.initSymbol(!0)),"rotateCircle"===t._instanceIds[0]){var a=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(n,e.rotateCircleCenter),s=i,l=_0x2d6822.radian(a,e.rotateStartPosition),u=_0x2d6822.radian(a,s)-l;e.model&&(e.geoEdit._modelRotate.z=e.startRotate+180*u/Math.PI,_0x37ac97(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform)),e.vector&&(e.geoEdit.vectorRotate.z=e.startRotate+180*u/Math.PI,e.geoEdit.initSymbol(!0))}if("ScaleLeft1_1"===t._instanceIds[0]){var c=e.geoEdit.localPoints[0],h=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(n,WebGLPlot.Cartesian3.fromDegrees(c.x,c.y,c.z)),d=_0x2d6822.distance(h,e.startSCalePtn),f=_0x2d6822.distance(h,i)/d;e.model&&(e.geoEdit._model.scale=e.startScale*f),e.vector&&(e.geoEdit._vectorScale=e.startScale*f,e.geoEdit.initSymbol(!0))}}}function _0x451686(e){return!!(e&&e._instanceIds&&e._instanceIds.length>0)}_0x5124bc(),_0x4cf411.prototype.initCallBack=function(){this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t,i,n){if("rotateCircle"===t._instanceIds[0]){if(!i)return;e.rotateStartPosition=n,e.startRotate=e.geoEdit._modelRotate.z}"ScaleLeft1_1"===t._instanceIds[0]&&(e.startSCalePtn=n,e.model?e.startScale=e.geoEdit._modelScale.x:e.vector&&(e.startScale=e.geoEdit.vectorScale))},onDrag:function(e,t,i){_0x25df49(e,t,i)},onDragEnd:function(e,t,i){_0x451686(t)&&"moveFillCtrl"===t._instanceIds[0]&&e.handle._featureDragEvent.raiseEvent(e.geoEdit),_0x2be103(e),e.geoEdit._initialize=!1,e.geoEdit.__setEffectParameter({point:e.geoEdit.localPoints[0],rotate:e.geoEdit.modelRotate}),e.handle._featureModifiedEvent.raiseEvent(e.geoEdit),_0x47a70a.getInstance().symbolModified.raiseEvent(e.geoEdit)}}}},_0x4cf411.prototype.addCallback=function(e,t){var i=this;t.dragHandlers&&(_0x1fdc73(e,"LEFT_DOWN",(function(n,r){function o(e,n){_0x2d6822.screenSpaceCameraController(i._scene,!1),void 0!==e.type&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(i,e,n)}if(r.setInputAction((function(t){if(_0x451686(e))if("heightCtrl"===e._instanceIds[0]||"ScaleLeft1_1"===e._instanceIds[0]||"rotateCircle"===e._instanceIds[0])o(e,t.endPosition);else{var n=_0x2d6822.getPosition(i._scene,t.endPosition);o(e,n)}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.setInputAction((function(n){var o;!_0x451686(e)||(o=_0x2d6822.getPosition(i._scene,n.position),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x2d6822.screenSpaceCameraController(i._scene,!0),void 0!==e.type&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(i,e,o))}),WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x451686(e)){if("rotateCircle"===e._instanceIds[0]||"ScaleLeft1_1"===e._instanceIds[0]){var a=_0x2d6822.getPosition(i._scene,n);t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(i,e,a,n)}if("heightCtrl"===e._instanceIds[0]){var s=i.geoEdit.localPoints[0].clone();i.startPoint=s,i.pixeStartPoint=n}}})),_0x1fdc73(e,"mouseMove",(function(t){if(i.editHeightMode||!_0x451686(e))return;i._scene._canvas.style.cursor="default";var n=null;if(n=e.getGeometryInstanceAttributes("heightCtrl"))return i._scene._canvas.style.cursor="n-resize",void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)));if(n=e.getGeometryInstanceAttributes("rotateCircle"))return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)));n=e.getGeometryInstanceAttributes("ScaleLeft1_1");let r=e.getGeometryInstanceAttributes("ScaleLeft1_2");return n&&r?(r.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)),void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)))):void 0})),_0x1fdc73(e,"mouseOut",(function(t){if(i.editHeightMode)return;i._scene._canvas.style.cursor="";var n=e.getGeometryInstanceAttributes("heightCtrl");if(n)return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,0,1,1)));if(n=e.getGeometryInstanceAttributes("rotateCircle"))return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,1,0,1)));n=e.getGeometryInstanceAttributes("ScaleLeft1_1");let r=e.getGeometryInstanceAttributes("ScaleLeft1_2");return n?(r.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,1,0,1)),void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,1,0,1)))):void 0})))},_0x4cf411.prototype.hideModeEditBouds=function(e){!WebGLPlot.defined(this.boxBounds)||null===this.boxBounds||(this.scaleLeft1.show=e,this.rotateCircle.show=e,this.heightCtrl.show=e,this.boxBounds.show=e,this.moveFillCtrl.show=e)},_0x4cf411.prototype.createModeEditBouds=function(e){e&&!WebGLPlot.defined(this.boxBounds)||e&&WebGLPlot.defined(this.boxBounds)?this.createModelCtrl():e||this.destoryBoundsCtrl()},_0x4cf411.prototype.createModelCtrl=function(){if(this.vector=null,this.handle._graphicObject){this.geoEdit=this.handle._graphicObject;var e=this.geoEdit.localPoints[0];this.model=this.geoEdit._model,this.modelMatrix=this.model.modelMatrix;var t=this.model._boundingSphere.center;this.centerMax=t.x>t.y?t.x:t.y,this.centerMax=(this.centerMax>t.z?this.centerMax:t.z)*this.model.scale,this.modelRadius=this.model._initialRadius*this.model.scale;var i=new WebGLPlot.Cartesian3(this.modelRadius+this.centerMax,this.modelRadius+this.centerMax,this.modelRadius+this.centerMax),n=new _0x11ff81(e.x,e.y,e.z),r=_0x2d6822.getModelMinAndMaxCorner(this.model),o=this.model.scale;if(0!==this.geoEdit._modelRotate.x||0!==this.geoEdit._modelRotate.y){var a=Math.abs(this.model._maxCorner.x-r.minCorner.x),s=Math.abs(this.model._maxCorner.y-r.minCorner.y),l=Math.abs(this.model._maxCorner.z-r.minCorner.z),u=a>s?a:s,c=a<s?a:s;o*=(u>l?u:l)/(c<l?c:l)}var h=Math.abs(r.minCorner.z)>Math.abs(r.minCorner.x)?r.minCorner.z:r.minCorner.x,d=Math.abs(r.maxCorner.z)>Math.abs(r.maxCorner.x)?r.maxCorner.z:r.maxCorner.x,f=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(h,h,r.minCorner.y),o,new WebGLPlot.Cartesian3),p=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(d,d,r.maxCorner.y),o,new WebGLPlot.Cartesian3),_=new WebGLPlot.AxisAlignedBoundingBox(f,p);this.BoundingBoxCenter=_.center,this.boxBounds=this.createBoxGeometry(n,i,_);var m=this.getLinePts(e,p,f,this.boxModelMatrix);if(this.moveFillCtrl=this.createFillCtrl(m.moveFillCtrl,new WebGLPlot.Color(1,1,0,.3),"moveFillCtrl"),this.scaleLeft1=this.createScaleLeft1(m.left1[0],m.left1[1]),this.rotateCircle=this.createRotateCircle(m.rotateCircle),this.heightCtrl=this.createHeightCtrl(m.heightCtrl),!this.handle._plottingLayer._isEditable)return void(this.boxBounds=this._scene._primitives.add(this.boxBounds));this.scaleLeft1=this._scene._primitives.add(this.scaleLeft1),this.rotateCircle=this._scene._primitives.add(this.rotateCircle),this.heightCtrl=this._scene._primitives.add(this.heightCtrl),this.moveFillCtrl=this._scene._primitives.add(this.moveFillCtrl),this.boxBounds=this._scene._primitives.add(this.boxBounds),this.addCallback(this.scaleLeft1,this.ctrlPointCallBack),this.addCallback(this.rotateCircle,this.ctrlPointCallBack),this.addCallback(this.heightCtrl,this.ctrlPointCallBack),this.addCallback(this.moveFillCtrl,this.ctrlPointCallBack)}},_0x4cf411.prototype.createBoxGeometry=function(e,t,i){if(null===e||null===t)return null;var n,r=[];return this.model?this.boxModelMatrix=_0x7ba091(e,this.geoEdit._modelRotate,this.modelMatrix.clone(),this.fixedFrameTransform):this.vector?this.boxModelMatrix=_0x7ba091(e,this.geoEdit.vectorRotate,this.modelMatrix.clone(),this.fixedFrameTransform):this.boxModelMatrix=_0x7ba091(e,new WebGLPlot.Cartesian3(0,0,0),new WebGLPlot.Matrix4,this.fixedFrameTransform),n=WebGLPlot.defined(i)?WebGLPlot.BoxOutlineGeometry.fromAxisAlignedBoundingBox(i):WebGLPlot.BoxOutlineGeometry.fromDimensions({dimensions:t}),r.push(new WebGLPlot.GeometryInstance({geometry:n,modelMatrix:this.boxModelMatrix,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(WebGLPlot.Color.YELLOW)}})),new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.PerInstanceColorAppearance({flat:!0,translucent:!1,renderState:{lineWidth:Math.min(3,this._scene.maximumAliasedLineWidth)}})})},_0x4cf411.prototype.createScaleLeft1=function(e,t){var i=[],n=new WebGLPlot.Color(0,1,0);return i.push(this.createLineGometryInstance(e,6,n,"ScaleLeft1_1")),i.push(this.createLineGometryInstance(t,6,n,"ScaleLeft1_2")),this.createPrimitive(i)},_0x4cf411.prototype.createRotateCircle=function(e){var t=[],i=new WebGLPlot.Color(1,1,0);return t.push(this.createLineGometryInstance(e,3,i,"rotateCircle")),this.createPrimitive(t)},_0x4cf411.prototype.createHeightCtrl=function(e){var t=[],i=new WebGLPlot.Color(0,0,1);return t.push(this.createLineGometryInstance(e,5,i,"heightCtrl")),this.createPrimitive(t)},_0x4cf411.prototype.createPrimitive=function(e){var t=WebGLPlot.Material.fromType("Color",{color:new WebGLPlot.Color(1,1,0,1),fill:!0}),i=new WebGLPlot.PolylineColorAppearance({translucent:!0,closed:!0,material:t}),n=new WebGLPlot.Primitive({geometryInstances:e,appearance:i,asynchronous:!1,compressVertices:!0,show:!0});return n.type="ModelEdit",n.SymbolType=1,n},_0x4cf411.prototype.createLineGometryInstance=function(e,t,i,n){var r=new WebGLPlot.PolylineGeometry({positions:e,width:t}),o=WebGLPlot.PolylineGeometry.createGeometry(r);return i=WebGLPlot.ColorGeometryInstanceAttribute.fromColor(i),new WebGLPlot.GeometryInstance({geometry:o,id:n,attributes:{color:i}})},_0x4cf411.prototype.getLinePts=function(e,t,i,n){var r=[],o=[],a=[],s=[],l=0,u=0,c=0,h=0;WebGLPlot.defined(t)&&WebGLPlot.defined(i)?(l=Math.abs(t.x-i.x)/2,u=Math.abs(t.y-i.y)/2,c=i.z<=0?t.z:t.z-i.z,h=l>u?u:l):(h=(this.centerMax+this.modelRadius)/2,c=1.5*this.centerMax+this.modelRadius/2),c=Math.abs(c),this.rotateCircleCenter=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,c+e.z);var d=this.computeHeightLines(l,u,h,c,n);a=a.concat(d);var f=this.computeScaleLines(l,u,h,c,n);r.push(f[0]),r.push(f[1]),r.push(f[2]),o.push(f[3]),o.push(f[4]),this.scaleLeft1Pnt=f[1],this.rotateCircle=this.computeRotateCircle(h,c,n);var p=this.computeMoveFill(h,c,n);return s.push(p[0]),s.push(p[1]),s.push(p[2]),s.push(p[3]),{left1:[r,o],rotateCircle:this.rotateCircle,heightCtrl:a,moveFillCtrl:s}},_0x4cf411.prototype.createFillCtrl=function(e,t,i){var n=WebGLPlot.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0}),r=WebGLPlot.PolygonGeometry.createGeometry(n),o=new WebGLPlot.GeometryInstance({geometry:r,id:i}),a=new WebGLPlot.Material.fromType("Color",{color:t,fill:!0}),s=new WebGLPlot.Primitive({geometryInstances:[o],appearance:new WebGLPlot.EllipsoidSurfaceAppearance({material:a,aboveGround:!0}),show:this._display,asynchronous:!1});return s.type="ModelEdit",s.SymbolType=1,s},_0x4cf411.prototype.getCartesian3ByLength=function(e,t,i,n){var r,o,a,s,l;(!WebGLPlot.defined(t)||!WebGLPlot.defined(i)||!WebGLPlot.defined(n))&&(t=0,i=0,n=0),r=Math.sqrt(e.x*e.x+e.y*e.y),o=Math.sqrt(r*r+e.z*e.z);var u=Math.acos((o*o+r*r-e.z*e.z)/(2*o*r));o+=n,l=Math.sin(u)*o;var c=Math.cos(u)*o;return a=c*e.x/r,s=c*e.y/r,new WebGLPlot.Cartesian3(a,s,l)},_0x4cf411.prototype.computeHeightLines=function(e,t,i,n,r){var o=[],a=new WebGLPlot.Cartesian3,s=new WebGLPlot.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot.Cartesian3.fromDegrees(this.geoEdit.localPoints[0].x,this.geoEdit.localPoints[0].y,this.geoEdit.localPoints[0].z),h=new WebGLPlot.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.model?h.heading=d*this.geoEdit._modelRotate.z:h.heading=d*this.geoEdit.vectorRotate.z;var f=WebGLPlot.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1*l,1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1*l,1,.7*u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),o},_0x4cf411.prototype.computeScaleLines=function(e,t,i,n,r){var o=[],a=new WebGLPlot.Cartesian3,s=new WebGLPlot.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot.Cartesian3.fromDegrees(this.geoEdit.localPoints[0].x,this.geoEdit.localPoints[0].y,this.geoEdit.localPoints[0].z),h=new WebGLPlot.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.model?h.heading=d*this.geoEdit._modelRotate.z:h.heading=d*this.geoEdit.vectorRotate.z;var f=WebGLPlot.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-.8,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.8*l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,.8*u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),o},_0x4cf411.prototype.computeMoveFill=function(e,t,i){var n=[],r=new WebGLPlot.Cartesian3,o=new WebGLPlot.Cartesian3,a=t/e;return o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.3,.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-.3,.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-.3,-.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.3,-.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),n},_0x4cf411.prototype.computeRotateCircle=function(e,t,i){for(var n=[],r=new WebGLPlot.Cartesian3,o=new WebGLPlot.Cartesian3,a=t/e,s=_0x2d6822.calcCirclePts(1,new WebGLPlot.Cartesian3(0,0,0),72),l=0;l<s.length;l++)o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.8*s[l].x,.8*s[l].y,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z));return n},_0x4cf411.prototype.createVectorEditBouds=function(e){e&&!WebGLPlot.defined(this.boxBounds)?this.createVectorCtrl(this):e&&WebGLPlot.defined(this.boxBounds)?(_0x3b0fb1(this),this.createVectorCtrl(this)):e||this.destoryBoundsCtrl()},_0x4cf411.prototype.destoryBoundsCtrl=function(){this.scaleLeft1&&(this.scaleLeft1.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.scaleLeft1),this.scaleLeft1=void 0),this.rotateCircle&&(this.rotateCircle.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.rotateCircle),this.rotateCircle=void 0),this.heightCtrl&&(this.heightCtrl.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.heightCtrl),this.heightCtrl=void 0),this.moveFillCtrl&&(this.moveFillCtrl.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.moveFillCtrl),this.moveFillCtrl=void 0),this.boxBounds&&(this.boxBounds.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.boxBounds),this.boxBounds=void 0)},_0x4cf411.prototype.createVectorCtrl=function(e){if(this.handle._graphicObject){this.model=null,this.geoEdit=this.handle._graphicObject;var t=this.geoEdit.localPoints[0];this.vector=this.geoEdit._dotVector,this.modelMatrix=this.vector.modelMatrix,this.centerMax=this.vector.vectorHeight/2,this.modelRadius=this.vector.vectorHeight/2;var i=new WebGLPlot.Cartesian3(e.modelRadius+this.centerMax,e.modelRadius+this.centerMax,e.modelRadius+this.centerMax),n=new _0x11ff81(t.x,t.y,this.centerMax+t.z);e.boxBounds=e.createBoxGeometry(n,i);var r=_0x7ba091(t,this.geoEdit.vectorRotate,this.vector.modelMatrix.clone(),this.fixedFrameTransform),o=e.getLinePts(t,void 0,void 0,r);if(e.moveFillCtrl=e.createFillCtrl(o.moveFillCtrl,new WebGLPlot.Color(1,1,0,.3),"moveFillCtrl"),e.scaleLeft1=e.createScaleLeft1(o.left1[0],o.left1[1]),e.rotateCircle=e.createRotateCircle(o.rotateCircle),e.heightCtrl=e.createHeightCtrl(o.heightCtrl),!this.handle._plottingLayer._isEditable)return void(e.boxBounds=e._scene._primitives.add(e.boxBounds));e.scaleLeft1=e._scene._primitives.add(e.scaleLeft1),e.rotateCircle=e._scene._primitives.add(e.rotateCircle),e.heightCtrl=e._scene._primitives.add(e.heightCtrl),e.moveFillCtrl=e._scene._primitives.add(e.moveFillCtrl),e.boxBounds=e._scene._primitives.add(e.boxBounds),e.addCallback(e.scaleLeft1,e.ctrlPointCallBack),e.addCallback(e.rotateCircle,e.ctrlPointCallBack),e.addCallback(e.heightCtrl,e.ctrlPointCallBack),e.addCallback(e.moveFillCtrl,e.ctrlPointCallBack)}};var _0xdd3d1b=(_0x4cf797=!0,function(e,t){var i=_0x4cf797?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4cf797=!1,i}),_0x1de628=_0xdd3d1b(void 0,(function(){return _0x1de628.toString().search("(((.+)+)+)+$").toString().constructor(_0x1de628).search("(((.+)+)+)+$")})),_0x4cf797;function _0x5bdde1(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("plottingLayer is required!");this._scene=e,this._plottingLayer=t,this._active=!1,t._plottingEdit=this,this.CtrlPosition=new _0x1f7045(e,this),this.ModelEditControl=new _0x4cf411(e,this),this.pasteGeoJson=null,this.initialize()}function _0x536a93(e,t,i,n){if(i&&i._plottingLayer&&i._plottingLayer._scene&&i._plottingLayer._isSelected&&t){if("LEFT_DOWN"!==e||WebGLPlot.defined(i._graphicObject)){var r=[],o=[];o=void 0===n?i._scene.drillPick(t,void 0,10,10):i._scene.drillPick(t,void 0,n.width,n.height);for(var a=[],s=0;s<o.length;s++)if(o[s]&&o[s].id&&null!==o[s].primitive&&WebGLPlot.defined(o[s].primitive.SymbolType)){var l=i._plottingLayer.getFeatureByUuid(o[s].id);l&&a.push(l),r.push(o[s])}if(void 0!==n)return a;for(var u=!1,c=0;c<r.length;c++)if("heightCtrl"===r[c].id){u=!0;break}for(s=0;s<r.length;s++){var h,d=r[s];if(d&&d.primitive&&d.primitive[e]){if(0===d.primitive.type&&i.CtrlPosition.isShiftPress&&(void 0!==d.primitive.index?i._graphicObject instanceof _0x3a6b26?(h=i._graphicObject._centerPt3D,WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h):(h=i._graphicObject.localPoints[d.primitive.index],WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h):void 0!==d.primitive.annotationIndex&&(h=i._graphicObject.annotationArray[d.primitive.annotationIndex].localPoint,WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h)),!u){d.primitive[e](t,i._CtrlPointhandler);break}if("heightCtrl"===d.id){d.primitive[e](t,i._CtrlPointhandler);break}}else if(d&&d.primitive&&d.id&&"LEFT_CLICK"===e){var f=i._plottingLayer.getFeatureByUuid(d.id);if(f instanceof _0x3a6b26)return i.releaseSelection(),i.drawGroupObjectEditObject(f,!0),i._graphicObject=f,i._graphicObject._isSelected=!0,i._graphicObject._isEdit=!0,i._plottingLayer.setSelectedFeatureByID(f._id),void i._featureSelectedEvent.raiseEvent(i._graphicObject);if(WebGLPlot.defined(i._graphicObject)){if(i._graphicObject.id===d.id)return;if(i.unSelection(!0),i._graphicObject=i._plottingLayer.getFeatureByUuid(d.id),!WebGLPlot.defined(i._graphicObject))return;return void i.DoSelectObjectEdit(f)}if(!f)continue;return i._graphicObject=f,void i.DoSelectObjectEdit(f)}}if("LEFT_CLICK"===e&&(!WebGLPlot.defined(r)||0===r.length)&&WebGLPlot.defined(i._graphicObject)){const e=i._graphicObject.id;i.unSelection(!0);var p=i._featureReleaseEvent;let t=i._plottingLayer.getFeatureByUuid(e);p.raiseEvent(t)}}}else i.releaseSelection()}function _0x26ca55(e){const t=_0x80fbbd(e.keyCode);let i=_self._graphicObject;if(i&&(i.showMode===_0x4e5d29.Marker||i.code===_0x18bc2f.SYMBOL_Model))switch(t){case"Z":i.modelScale*=1.1;break;case"X":i.modelScale*=.9;break;case"W":i.modelRotate.y+=1,i._initialize=!1;break;case"S":i.modelRotate.y-=1,i._initialize=!1;break;case"A":i.modelRotate.z-=1,i._initialize=!1;break;case"D":i.modelRotate.z+=1,i._initialize=!1;break;case"Q":i.modelRotate.x+=1,i._initialize=!1;break;case"E":i.modelRotate.x-=1,i._initialize=!1}}function _0x80fbbd(e){switch(e){case"Z".charCodeAt(0):return"Z";case"X".charCodeAt(0):return"X";case"W".charCodeAt(0):case 38:return"W";case"S".charCodeAt(0):case 40:return"S";case"D".charCodeAt(0):case 39:return"D";case"A".charCodeAt(0):case 37:return"A";case"Q".charCodeAt(0):return"Q";case"E".charCodeAt(0):return"E";default:return}}_0x1de628(),_0x5bdde1.prototype.initialize=function(){this._graphicObject=void 0,this._handler=new WebGLPlot.ScreenSpaceEventHandler(this._scene.canvas),this._ctrlPoints=new WebGLPlot.BillboardCollection,this._scene.primitives.add(this._ctrlPoints),this.positionPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointWhite_Go.png"),this.scalePointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointYellow_Go.png"),this.anchorPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointRed_Go.png"),this._featureSelectedEvent=new WebGLPlot.Event,this._featureModifiedEvent=new WebGLPlot.Event,this._featureReleaseEvent=new WebGLPlot.Event,this._featureRemoveEvent=new WebGLPlot.Event,this.isShiftPress=!1,this.shiftKeyDownFun=void 0,this.shiftKeyUpFun=void 0,this.editHeightMode=!1,this._CtrlPointhandler=new WebGLPlot.ScreenSpaceEventHandler(this._scene.canvas),this._featureLeftClickEvent=new WebGLPlot.Event,this._featureRightClickEvent=new WebGLPlot.Event,this._sceneLeftClickEvent=new WebGLPlot.Event,this._sceneRightClickEvent=new WebGLPlot.Event,this._featureDragEvent=new WebGLPlot.Event,this._featureDoubleClickEvent=new WebGLPlot.Event,this.CtrlPosition.addListener();let e=this;this._handler.setInputAction((function(t){!e._active||_0x536a93("LEFT_CLICK",t.position,e)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK);var t=null;this._handler.setInputAction((function(i){if(WebGLPlot.defined(e._graphicObject)&&(e._graphicObject.showMode===_0x4e5d29.Vector||e._graphicObject.showMode===_0x4e5d29.Marker)&&e._active){var n=e._scene.pick(i.endPosition);t&&(!n||t!==n.primitive)&&(!(t.isDestroyed&&t.isDestroyed())&&t.mouseOut(i.endPosition),t=null),n&&n.primitive&&((n=n.primitive).mouseOut&&(t=n),n.mouseMove&&n.mouseMove(i.endPosition))}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this._handler.setInputAction((function(t){!e._active||_0x536a93("LEFT_DOWN",t.position,e,void 0)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),this._handler28s=new WebGLPlot.ScreenSpaceEventHandler(e._scene.canvas),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),i?e._featureLeftClickEvent.raiseEvent(i,t.position):e._sceneLeftClickEvent.raiseEvent(t.position)}}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),i?e._featureRightClickEvent.raiseEvent(i,t.position):e._sceneRightClickEvent.raiseEvent(t.position)}}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),e._featureDoubleClickEvent.raiseEvent(i,t.position)}}),WebGLPlot.ScreenSpaceEventType.LEFT_DOUBLE_CLICK)},_0x5bdde1.prototype.setPlottingLayer=function(e){return!!e&&(this.releaseSelection(),this._plottingLayer=e,e._plottingEdit=this,!0)},Object.defineProperties(_0x5bdde1.prototype,{plottingLayer:{get:function(){return this._plottingLayer},set:function(e){e!==this._plottingLayer&&(this._plottingLayer=e)}},SelectedEvent:{get:function(){return this._featureSelectedEvent}},FeatureSelectedEvent:{get:function(){return this._featureSelectedEvent}},ModifiedEvent:{get:function(){return this._featureModifiedEvent}},FeatureModifiedEvent:{get:function(){return this._featureModifiedEvent}},UnSelectedEvent:{get:function(){return this._featureReleaseEvent}},RemoveFeatureEvent:{get:function(){return this._featureRemoveEvent}},FeatureRemoveEvent:{get:function(){return this._featureRemoveEvent}},FeatureLeftClickEvent:{get:function(){return this._featureLeftClickEvent}},FeatureRightClickEvent:{get:function(){return this._featureRightClickEvent}},SceneLeftClickEvent:{get:function(){return this._sceneLeftClickEvent}},SceneRightClickEvent:{get:function(){return this._sceneRightClickEvent}},FeatureDoubleClickEvent:{get:function(){return this._featureDoubleClickEvent}},FeatureDragEvent:{get:function(){return this._featureDragEvent}}}),_0x5bdde1.prototype.unSelection=function(e){WebGLPlot.defined(this._graphicObject)&&e&&_0x47a70a.getInstance().symbolUnSelected.raiseEvent(this._graphicObject.id),this.releaseSelection(!1)},_0x5bdde1.prototype.releaseSelection=function(e){WebGLPlot.defined(this._graphicObject)&&(this.clearAllEditCtrl(),e||(this._plottingLayer._selectedFeature=void 0))},_0x5bdde1.prototype.clearAllEditCtrl=function(){WebGLPlot.defined(this._graphicObject)&&null!==this._graphicObject&&(this.CtrlPosition.removeAll(),this._graphicObject._initialize=!1,this._graphicObject._isSelected=!1,this._graphicObject instanceof _0x3a6b26&&this.drawGroupObjectEditObject(this._graphicObject,!1),_0x4e5d29.Marker===this._graphicObject.showMode&&this.drawModelEditObject(!1),_0x4e5d29.Vector===this._graphicObject.showMode&&this.drawVectorEditObject(!1),this._graphicObject=null)},_0x5bdde1.prototype.activate=function(){!this._plottingLayer||!this._plottingLayer._isSelected||this.isActive()||(this._active=!0)},_0x5bdde1.prototype.pickRect=function(e,t){var i=t.x-e.x,n=t.y-e.y,r=(t.x+e.x)/2,o=(t.y+e.y)/2;return _0x536a93("LEFT_CLICK",new WebGLPlot.Cartesian2(r,o),this,{width:i,height:n})},_0x5bdde1.prototype.DoSelectObject=function(e,t=!0){this._graphicObject=e,this._graphicObject._isEdit=!0,this._graphicObject._isSelected=!0,this._plottingLayer._selectedFeature=e,this._graphicObject._initialize=!1,t&&(this._featureSelectedEvent.raiseEvent(this._graphicObject),_0x47a70a.getInstance().symbolSelected.raiseEvent(this._graphicObject))},_0x5bdde1.prototype.DoSelectObjectEdit=function(e){!e||!(e instanceof _0x21fac2)||!this._plottingLayer.isSelected||(this.releaseSelection(),this.DoSelectObject(e),this._plottingLayer._isEditable&&this.drawSymbolExtend(e))},_0x5bdde1.prototype.drawSymbolExtend=function(e){var t=e.symbolType;e.showMode,_0x18bc2f.SYMBOL_UNKNOW!==t&&(_0x18bc2f.SYMBOL_Model!==t||_0x18bc2f.SYMBOL_DOT!==t||_0x18bc2f.SYMBOL_PICTURE!==t)&&this.createCtrlPoints(e)},_0x5bdde1.prototype.addAnnotationArrayPositionPt=function(e,t){this.CtrlPosition.createAnnotationCtrlPoint(e,t)},_0x5bdde1.prototype.deactivate=function(){this.releaseSelection(),this._active=!1},_0x5bdde1.prototype.isActive=function(){return this._active},_0x5bdde1.prototype.createCtrlPoints=function(e){this.CtrlPosition.createCtrlPoints(e),this.ModelEditControl.hideModeEditBouds(!1)},_0x5bdde1.prototype.drawModelEditObject=function(e){this.CtrlPosition.removeAll(),this._graphicObject&&_0x4e5d29.Marker===this._graphicObject.showMode&&(this.ModelEditControl.destoryBoundsCtrl(),this.ModelEditControl.createModeEditBouds(e))},_0x5bdde1.prototype.drawVectorEditObject=function(e){this.CtrlPosition.removeAll(),this.ModelEditControl.destoryBoundsCtrl(),this.ModelEditControl.createVectorEditBouds(e)},_0x5bdde1.prototype.drawGroupObjectEditObject=function(e,t){if(e instanceof _0x3a6b26)if(t&&!this.groupObjectEditObject){var i=e.getBounds(),n=.5*(i.max_X+i.min_X),r=.5*(i.max_Y+i.min_Y);i.max_Z,i.min_Z;var o=new WebGLPlot.Cartesian3(i.min_X,i.max_Y,0),a=new WebGLPlot.Cartesian3(i.max_X,i.max_Y,0),s=new WebGLPlot.Cartesian3(i.min_X,i.min_Y,0),l=_0x2d6822.getSpaceDistance(o,a)+i.modelRadius,u=_0x2d6822.getSpaceDistance(o,s)+i.modelRadius,c=i.max_Z-i.min_Z;c=c>i.modelRadius?c:i.modelRadius,e._centerPt3D=new WebGLPlot.Cartesian3(n,r,i.min_Z);var h=new WebGLPlot.Cartesian3(l,u,c);h.z<0&&(h.z=0);var d=this.ModelEditControl.createBoxGeometry(new WebGLPlot.Cartesian3(n,r,i.min_Z+.5*c),h);this.groupObjectEditObject=this._scene.primitives.add(d),this.CtrlPosition._ctrlPoints.removeAll(),this.CtrlPosition.createGroupObjectCtrlPoint(e,e._centerPt3D,0)}else t||(this.CtrlPosition._ctrlPoints.removeAll(),this._scene.primitives.remove(this.groupObjectEditObject),this.groupObjectEditObject=null)},_0x5bdde1.prototype.removeGroupObjectEditObject=function(){this.groupObjectEditObject&&(this._scene.primitives.remove(this.groupObjectEditObject),this.groupObjectEditObject=null)},_0x5bdde1.prototype.cut=function(){null!==this._graphicObject&&this._plottingLayer&&this._plottingLayer._isEditable&&(this.pasteGeoJson=_0x21fac2.toGeoJson(this._graphicObject,this.pasteGeoJson),this._plottingLayer.removeGeoGraphicObject(this._graphicObject))},_0x5bdde1.prototype.copy=function(){null!==this._graphicObject&&(this.pasteGeoJson=_0x21fac2.toGeoJson(this._graphicObject,this.pasteGeoJson))},_0x5bdde1.prototype.paste=function(e){if(null!==this.pasteGeoJson&&this._plottingLayer&&this._plottingLayer._isEditable){var t=JSON.parse(this.pasteGeoJson);if(t.uuid=WebGLPlot.createGuid(),WebGLPlot.defined(e))if(parseInt(t.symbolType)===_0x18bc2f.SYMBOL_DOT||parseInt(t.symbolType)===_0x18bc2f.SYMBOL_TEXT)t.localePoints[0].x=e.x,t.localePoints[0].y=e.y,t.localePoints[0].z=e.z;else for(var i=e.x-t._CenterPosition.x,n=e.y-t._CenterPosition.y,r=0;r<t.localePoints.length;++r)t.localePoints[r].x=t.localePoints[r].x+i,t.localePoints[r].y=t.localePoints[r].y+n,t.localePoints[r].z=e.z;this._plottingLayer.geoJsonToGeoGraphicObject(t)}},_0x5bdde1.prototype.clearCopyOrCut=function(){this.pasteGeoJson=null},_0x5bdde1.prototype.activateModelShortCutEdit=function(){this.ModelScaleShortCuts_Active||document.addEventListener("keydown",_0x26ca55,!1),this.ModelScaleShortCuts_Active=!0},_0x5bdde1.prototype.deActivateModelShortCutEdit=function(){document.removeEventListener("keydown",_0x26ca55),this.ModelScaleShortCuts_Active=!1};var _0x5e6d04=(_0x16e202=!0,function(e,t){var i=_0x16e202?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16e202=!1,i}),_0x196788=_0x5e6d04(void 0,(function(){return _0x196788.toString().search("(((.+)+)+)+$").toString().constructor(_0x196788).search("(((.+)+)+)+$")})),_0x16e202;function _0x1ae927(e,t){if(!WebGLPlot.defined(t)||!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("plottingLayer || scene is required!");this._handler=new WebGLPlot.ScreenSpaceEventHandler(e.canvas),this._scene=e,this._isDrawing=!1,this._geoGraphicObject=void 0,this._layer=t,this._active=!1,this._drawFinishEvent=new WebGLPlot.Event,this._drawControlEndEvent=new WebGLPlot.Event,this._libID=-1,this._code=-1,this._Url="",this._serverUrl="";var i=this;this._handler.setInputAction((function(e){_0x4e52db(e,i)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this._handler.setInputAction((function(e){_0x384f03(e,i)}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this._handler.setInputAction((function(e){_0x636034(e,i)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),this._handler.setInputAction((function(e){_0x3cc51c(e,i)}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}function _0x4e52db(e,t){var i=t;if(i._active&&i._layer&&i&&i._active){var n=i._scene,r=_0x2d6822.getPosition(n,e.position);if(r)if(i._isDrawing){if(null===i._geoGraphicObject||void 0===i._geoGraphicObject)return void(i._isDrawing=!1);i._geoGraphicObject.localPoints.length>=i._geoGraphicObject.getMaxEditPts()?_0x3ca335(t):(r.z+=1,i._geoGraphicObject.localPoints.push(r),i._geoGraphicObject._initialize=!1)}else{i._isDrawing=!0;var o=null;if(0===i._libID){switch(i._code){case _0x18bc2f.SYMBOL_Model:case _0x18bc2f.SYMBOL_PICTURE:case _0x18bc2f.SYMBOL_POINT:o=new _0x25259d({layer:i._layer,libID:i._libID,code:i._code,localPoints:[]}),i._code===_0x18bc2f.SYMBOL_Model?(o._modelPath=i._Url,o._showMode=_0x4e5d29.Marker):i._code===_0x18bc2f.SYMBOL_PICTURE&&(o._picturePath=i._Url,o._showMode=_0x4e5d29.Picture);break;default:o=new _0x4381c6({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],isDrawing:!0,isEdit:!1})}o._symbolType=i._code}else void 0!==i._serverData&&null!==i._serverData&&i._serverData.symbolType===_0x18bc2f.SYMBOL_DOT?o=new _0x25259d({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],serverData:i._serverData}):i._serverData.symbolType===_0x18bc2f.SYMBOL_ALGO&&(o=new _0x4381c6({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],serverData:i._serverData,isDrawing:!0}));if(null===o||o._symbolType===_0x18bc2f.SYMBOL_UNKNOW)return void(i._isDrawing=!1);_0x2d6822.isSymbolDot(o._symbolType)?(i._geoGraphicObject=o,i._geoGraphicObject.localPoints.push(r),i._layer.isEditable&&i._layer._geoGraphicObjects.push(o),_0x3ca335(t)):(i._geoGraphicObject=o,i._geoGraphicObject.localPoints.push(r),i._layer.isEditable&&i._layer._geoGraphicObjects.push(o),0===i._libID&&34===i._code&&_0x3ca335(t))}}}function _0x384f03(e,t){var i=t;if(i._active&&i&&i._active&&i._isDrawing&&i._geoGraphicObject){var n=i._scene,r=_0x2d6822.getPosition(n,e.endPosition);if(r)i._geoGraphicObject.localPoints.length>=2&&i._geoGraphicObject.localPoints.pop(),i._geoGraphicObject.localPoints.push(r),i._geoGraphicObject._initialize=!1}}function _0x636034(e,t){var i=t;if(i._active){if(i._geoGraphicObject._symbolType!==_0x18bc2f.SYMBOL_DOT){var n=i._geoGraphicObject.localPoints.length;i._geoGraphicObject.localPoints.splice(n-2,2)}_0x3ca335(t)}}function _0x3cc51c(e,t){var i=t;i._active?(_0x3ca335(t),i._drawControlEndEvent.raiseEvent(t._geoGraphicObject),i._serverData=null,t._isDrawing||t.deactivate()):i._scene._canvas.style.cursor=""}function _0x3ca335(e){var t=e;if(t._isDrawing&&WebGLPlot.defined(t._geoGraphicObject)){var i=t._geoGraphicObject;if(_0x2d6822.clearSamePtsXY(i.localPoints).length<i.getMinEditPts())return t._layer.removeGeoGraphicObject(i),t._isDrawing=!1,void(t._geoGraphicObject=void 0);t._geoGraphicObject.isDrawing=!1,t._geoGraphicObject._initialize=!1,t._isDrawing=!1,t._drawFinishEvent.raiseEvent(e._geoGraphicObject),t._layer.symbolAddedEvent.raiseEvent(e._geoGraphicObject),_0x47a70a.getInstance().symbolAdded.raiseEvent(e._geoGraphicObject,t._layer.name)}}function _0x72eaeb(e){e.setDrawPrototype()}_0x196788(),_0x1ae927.prototype.activate=function(e,t,i){if(this._layer&&this._layer._scene&&this._layer.isEditable)if(WebGLPlot.defined(e)&&WebGLPlot.defined(t)){if("number"!=typeof e||"number"!=typeof t)return void console.log("PlotDrawControl activate libID or code should be number");(!WebGLPlot.defined(i)||null==i)&&(i=""),this._libID=e,this._code=t,this._Url=i,0===e?this.setDrawPrototype():this.getServerData(this._libID,this._code,_0x72eaeb(this))}else(null===this._serverData||!WebGLPlot.defined(this._serverData))&&0!==this._libID&&!WebGLPlot.getLibManager(this._scene._plottingID).useServerData&&this.getServerDataFromLocal(symbolLibManager,this._libID,this._code),this.setDrawPrototype()},_0x1ae927.prototype.setDrawPrototype=function(){-1===this._libID&&-1===this._code||(this._active=!0,this._scene._canvas.style.cursor="crosshair",_0x2d6822.screenSpaceCameraController(this._scene,!1))},_0x1ae927.prototype.setAction=function(e,t,i){if(!this._active&&((!WebGLPlot.defined(i)||null==i)&&(i=""),WebGLPlot.defined(e)&&WebGLPlot.defined(t)&&null!==e&&null!==t&&this._layer&&this._layer._scene)){if("number"!=typeof e||"number"!=typeof t)return void console.log("PlotDrawControl setAction libId or code should be number");this._libID=e,this._code=t,this._Url=i,0!==e&&this.getServerData(this._libID,this._code)}},_0x1ae927.prototype.getServerData=function(e,t,i){var n=this,r=WebGLPlot.getLibManager(this._layer._scene._plottingID),o=r.getSymbolData(e,t);if(WebGLPlot.defined(o)&&null!==o)return n._serverData=o,void(i&&i());var a=WebGLPlot.getServerData(e,t,void 0,this._layer._scene._plottingID);!a||(a.getSymbolInfo.events.on({processCompleted:function(t){return n._serverData=t.result,r.setSymbolData(e,t.result),i&&i(),!0},processFailed:function(){},scope:n}),a.getSymbolInfo.processAsync(a.getSymbolInfoParameters))},_0x1ae927.prototype.getServerDataFromLocal=function(e,t,i){var n=e.localSymbolLibData;this._serverData=n[t][i]},Object.defineProperties(_0x1ae927.prototype,{libID:{get:function(){return this._libID}},code:{get:function(){return this._code}},serverUrl:{get:function(){return this._serverUrl},set:function(e){e!==this._serverUrl&&(this._serverUrl=e)}},drawFinishEvent:{get:function(){return this._drawFinishEvent}},drawControlEndEvent:{get:function(){return this._drawControlEndEvent}},plottingLayer:{get:function(){return this._layer},set:function(e){e!==this._layer&&(this._layer=e)}}}),_0x1ae927.prototype.setPlottingLayer=function(e){return!!e&&(this._layer=e,!0)},_0x1ae927.prototype.deactivate=function(){this._active=!1,this._isDrawing=!1,this._libID=-1,this._code=-1,delete this._geoGraphicObject,this._scene._canvas.style.cursor="",_0x2d6822.screenSpaceCameraController(this._layer._scene,!0)};const _0x579dd8=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x56f9a1=_0x579dd8(void 0,(function(){return _0x56f9a1.toString().search("(((.+)+)+)+$").toString().constructor(_0x56f9a1).search("(((.+)+)+)+$")}));_0x56f9a1();class _0x1e39c8{constructor(e,t){this._isGroup=t,this._UUID=WebGLPlot$f.createGuid(),this._name=e,this._parentNode=void 0,this._childNodes=[],this._isModified=!1}_getRootNode(){let e=this;for(;!e.isRootNode();)e=e._parentNode;return e}_removeGeoEntityNode(e){let t=this.findNode(e);if(!t.isGroupNode()){let i=t._parentNode,n=i.indexOf(e);i._childNodes.splice(n,1),this._isModified=!0,this._save()}}_getParentNode(){return this._parentNode}_clear(){this._childNodes.splice(0),this._isModified=!0,this._save()}_isModify(){return!!this._isModified||(this._childNodes.forEach((e=>{if(e._isModify())return!0})),!1)}_setIsModify(e){this._isModified=e,this._childNodes.forEach((t=>{t._setIsModify(e)}))}_save(){_0x41dd10.getInstance()._saveGeoEntity(!1)}_fromJson(e,t){if(!WebGLPlot$f.defined(t))return;let i=JSON.parse(e);!WebGLPlot$f.defined(i)||(WebGLPlot$f.defined(i.isGroup)&&(this._isGroup=i.isGroup),WebGLPlot$f.defined(i.UUID)&&(this._UUID=i.UUID),WebGLPlot$f.defined(i.name)&&(this._name=i.name),WebGLPlot$f.defined(i.parentUUID)&&(this._parentNode=t.findNode(i.parentUUID)),WebGLPlot$f.defined(i.childNodes)&&(this._childNodes=[],i.childNodes.forEach((e=>{let i=new _0x1e39c8("",!1);this._childNodes.push(i),i._fromJson(e,t)}))))}_toJson(){let e={};return e.hasOwnProperty("isGroup")||(e.isGroup=this._isGroup),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),WebGLPlot$f.defined(this._parentNode)&&(e.hasOwnProperty("parentUUID")||(e.parentUUID=this._parentNode.getUUID())),e.hasOwnProperty("childNodes")||(e.childNodes=[],this._childNodes.forEach((t=>{e.childNodes.push(t._toJson())}))),JSON.stringify(e)}isRootNode(){return void 0===this._parentNode}isGroupNode(){return this._isGroup}getUUID(){return this._UUID}getName(){return this._name}setName(e){this._name=e,this._isModified=!0,this._save()}createGroupNode(e){let t;return this._isGroup&&(t=new _0x1e39c8(e,!0),t._parentNode=this,this._childNodes.push(t),this._isModified=!0,this._save()),t}createGeoEntityNode(e){let t;return this._isGroup&&(t=new _0x1e39c8(e.getName(),!1),t._UUID=e.getUUID(),t._parentNode=this,this._childNodes.push(t),this._isModified=!0,this._save()),t}getChildNodes(){return this._childNodes}findNode(e){let t;if(this._UUID===e)return this;for(let i=0;i<this._childNodes.length;i++){const n=this._childNodes[i];if(n.getUUID()===e){t=n;break}if(n._isGroup&&(t=n.findNode(e),WebGLPlot$f.defined(t)))break}return t}indexOf(e){let t=-1;for(let i=0;i<this._childNodes.length;i++)if(this._childNodes[i].getUUID()===e){t=i;break}return t}moveNodeTo(e,t,i){if(!this.isGroupNode()||!t.isGroupNode()||e>=this._childNodes.length)return!1;let n=this._childNodes.splice(e,1);if(0===n.length)return!1;let r=n[0];return r._parentNode=t,-1===i||i>=t.getChildNodes().length?t._childNodes.push(r):t._childNodes.splice(i,0,r),this._isModified=!0,this._save(),!0}moveTo(e,t){if(!e.isGroupNode())return!1;let i=this._getParentNode();if(WebGLPlot$f.defined(i)){let n=i.indexOf(this.UUID);if(i.moveNodeTo(n,e,t))return this._isModified=!0,this._save(),!0}return!1}}const _0x6ad8d3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x31c2dc=_0x6ad8d3(void 0,(function(){return _0x31c2dc.toString().search("(((.+)+)+)+$").toString().constructor(_0x31c2dc).search("(((.+)+)+)+$")}));_0x31c2dc();class _0x2887b9{constructor(){this._mapModelPathToModelSize=void 0}static cartesian3ToDegrees(e){let t=WebGLPlot$f.Cartographic.fromCartesian(e);return new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(t.longitude),WebGLPlot$f.CesiumMath.toDegrees(t.latitude),t.height)}static degreesToCartesian3(e){return WebGLPlot$f.Cartesian3.fromDegrees(e.x,e.y,e.z)}static getPositionFromModelMatrix(e){let t=WebGLPlot$f.Matrix4.getTranslation(e,new WebGLPlot$f.Cartesian3);return this.cartesian3ToDegrees(t)}static getScaleFromModelMatrix(e){let t=WebGLPlot$f.Matrix4.getScale(e,new WebGLPlot$f.Cartesian3);return this.cartesian3ToDegrees(t)}static getRotationFromModelMatrix(e){let t=WebGLPlot$f.Matrix4.getRotation(e,new WebGLPlot$f.Matrix4),i=WebGLPlot$f.Matrix4.getMatrix3(t,new WebGLPlot$f.Matrix3),n=WebGLPlot$f.Quaternion.fromRotationMatrix(i),r=WebGLPlot$f.HeadingPitchRoll.fromQuaternion(n);return new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(r.pitch),WebGLPlot$f.CesiumMath.toDegrees(r.roll),WebGLPlot$f.CesiumMath.toDegrees(r.heading))}static getHeading(e,t){let i=WebGLPlot$f.Transforms.eastNorthUpToFixedFrame(e),n=Cesium.Cartesian3.subtract(t,e,new Cesium.Cartesian3),r=WebGLPlot$f.Matrix4.multiplyByPointAsVector(WebGLPlot$f.Matrix4.inverse(i,new WebGLPlot$f.Matrix4),n,new WebGLPlot$f.Cartesian3),o=WebGLPlot$f.Cartesian3.normalize(r,new WebGLPlot$f.Cartesian3),a=Math.atan2(o.y,o.x)-WebGLPlot$f.CesiumMath.PI_OVER_TWO;return WebGLPlot$f.CesiumMath.TWO_PI-WebGLPlot$f.CesiumMath.zeroToTwoPi(a)}static getPitch(e,t){let i=WebGLPlot$f.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$f.Cartesian3.subtract(t,e,new WebGLPlot$f.Cartesian3),r=WebGLPlot$f.Matrix4.multiplyByPointAsVector(WebGLPlot$f.Matrix4.inverse(i,i),n,n);return WebGLPlot$f.Cartesian3.normalize(r,r),WebGLPlot$f.CesiumMath.PI_OVER_TWO-WebGLPlot$f.CesiumMath.acosClamped(r.z)}static getModelSize(e){WebGLPlot$f.defined(this._mapModelPathToModelSize)||(this._mapModelPathToModelSize=new Map);let t=(e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT)).modelPath,i=e.scene,n=this._mapModelPathToModelSize.get(t);if(WebGLPlot$f.defined(n))return n;if(!WebGLPlot$f.defined(i))return;const r=t.split(".");let o=r[r.length-1];if("gltf"===o||"glb"===o){let e=i.primitives.add(WebGLPlot$f.Model.fromGltf({url:t})),n=this;e.readyPromise.then((function(e){if(WebGLPlot$f.defined(e._maxCorner)&&WebGLPlot$f.defined(e._minCorner)){var r=Math.abs(e._maxCorner.x-e._minCorner.x),o=Math.abs(e._maxCorner.y-e._minCorner.y),a=Math.abs(e._maxCorner.z-e._minCorner.z);n._mapModelPathToModelSize.set(t,new _0x11ff81(r,o,a)),i.primitives.remove(e)}}))}return n}static getModelSizeSyn(e){if(!WebGLPlot$f.defined(e)||WebGLPlot$f.defined(e.modelPath))return;let t=e.modelPath,i=e.modelJson,n=this._mapModelPathToModelSize.get(t);if(WebGLPlot$f.defined(n))return n;if(WebGLPlot$f.defined(e.modelJson))return;for(var r=new WebGLPlot$f.Cartesian3,o=new WebGLPlot$f.Cartesian3,a=i.nodes,s=i.meshes,l=i.scenes[i.scene].nodes,u=l.length,c=[],h=new WebGLPlot$f.Cartesian3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),d=new WebGLPlot$f.Cartesian3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),f=0;f<u;++f){var p=a[l[f]];for(p._transformToRoot=WebGLPlot$f.ModelUtility.getTransform(p),c.push(p);c.length>0;){var _=(p=c.pop())._transformToRoot,m=p.mesh;if(WebGLPlot$f.defined(m))for(var g=s[m].primitives,x=g.length,v=0;v<x;++v){var y=g[v].attributes.POSITION;if(WebGLPlot$f.defined(y)){var $=WebGLPlot$f.ModelUtility.getAccessorMinMax(i,y),b=WebGLPlot$f.Cartesian3.fromArray($.min,0,r),T=WebGLPlot$f.Cartesian3.fromArray($.max,0,o);WebGLPlot$f.defined(h)&&WebGLPlot$f.defined(d)&&(WebGLPlot$f.Matrix4.multiplyByPoint(_,b,b),WebGLPlot$f.Matrix4.multiplyByPoint(_,T,T),WebGLPlot$f.Cartesian3.minimumByComponent(h,b,h),WebGLPlot$f.Cartesian3.maximumByComponent(d,T,d))}}var C=p.children;if(WebGLPlot$f.defined(C))for(var S=C.length,w=0;w<S;++w){var E=a[C[w]];E._transformToRoot=WebGLPlot$f.ModelUtility.getTransform(E),WebGLPlot$f.Matrix4.multiplyTransformation(_,E._transformToRoot,E._transformToRoot),c.push(E)}delete p._transformToRoot}}let P={};if(P._minCorner=h,P._maxCorner=d,WebGLPlot$f.defined(P._maxCorner)&&WebGLPlot$f.defined(P._minCorner)){var A=Math.abs(P._maxCorner.x-P._minCorner.x),L=Math.abs(P._maxCorner.y-P._minCorner.y),M=Math.abs(P._maxCorner.z-P._minCorner.z);this._mapModelPathToModelSize.set(t,new WebGLPlot$f.PlotPoint3D(A,L,M))}return n=this._mapModelPathToModelSize.get(t),n}static getPositionByDistanceOnOld(e,t,i,n){if(e.length>=2&&t>=0&&i>=0&&n>=0){if(0==t)return{index:i,point:e[i],distanceIndexOld:n};let r=n;for(let n=i;n<e.length-1;n++){let i=e[n],o=e[n+1],a=WebGLPlot$f.Cartesian3.distance(i,o);if(r+=a,r==t)return{index:n+1,point:o,distanceIndexOld:r};if(r>t){let e=(r-t)/a,s=o.x+(i.x-o.x)*e,l=o.y+(i.y-o.y)*e,u=o.z+(i.z-o.z)*e;return{index:n,point:new WebGLPlot$f.Cartesian3(s,l,u),distanceIndexOld:r-a}}}}return{index:-1,point:new WebGLPlot$f.Cartesian3}}static getPositionByDistance(e,t){if(e.length>=2&&t>=0){if(0==t)return{index:0,point:e[0],distanceIndex:0};let i=0;for(let n=0;n<e.length-1;n++){let r=e[n],o=e[n+1],a=WebGLPlot$f.Cartesian3.distance(r,o);if(i+=a,i==t)return{index:n+1,point:o,distanceIndex:i};if(i>t){let e=(i-t)/a,s=o.x+(r.x-o.x)*e,l=o.y+(r.y-o.y)*e,u=o.z+(r.z-o.z)*e;return{index:n,point:new WebGLPlot$f.Cartesian3(s,l,u),distanceIndex:i-a}}}}return{index:-1,point:new WebGLPlot$f.Cartesian3,distanceIndex:0}}static getAllDistance(e){let t=0;for(let i=0;i<e.length-1;i++){let n=e[i],r=e[i+1];t+=WebGLPlot$f.Cartesian3.distance(n,r)}return t}static calcControlPosMatrix(e,t,i){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t))return null;let n=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west"),r=null;if(e.getShowMode()!=_0x4e5d29.Marker){const t=this.degreesToCartesian3(e.getPosition());r=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(t,new WebGLPlot$f.HeadingPitchRoll,WebGLPlot$f.Ellipsoid.WGS84,n)}else{const o=e.getModelRotate(),a=WebGLPlot$f.HeadingPitchRoll.fromDegrees(o.z,o.x,o.y,new WebGLPlot$f.HeadingPitchRoll),s=this.degreesToCartesian3(e.getPosition()),l=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(s,a,WebGLPlot$f.Ellipsoid.WGS84,n),u=e.getModelScale(),c=e.getModelPath(),h=this.getModelSize({modelPath:c,scene:i});if(WebGLPlot$f.defined(h)){const e=WebGLPlot$f.Cartesian3.fromElements(h.x*t.y*u,h.y*t.x*u,h.z*t.z*u);r=WebGLPlot$f.Matrix4.multiplyByTranslation(l,e,new WebGLPlot$f.Matrix4)}}return r}static calcControlPoint(e,t,i){if(0==t.x&&0==t.y&&0==t.z)return e.getPosition();let n=this.calcControlPosMatrix(e,t,i);return WebGLPlot$f.defined(n)?this.getPositionFromModelMatrix(n):null}static colorToObject(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}static objectToColor(e){var t=new WebGLPlot$f.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,WebGLPlot$f.defined(e.red)||(t.red=1),WebGLPlot$f.defined(e.green)||(t.green=1),WebGLPlot$f.defined(e.blue)||(t.blue=1),WebGLPlot$f.defined(e.alpha)||(t.alpha=1),t}static circlePoint(e,t,i,n){n*=Math.PI/180;let r=e.x+t*Math.cos(n),o=e.y+i*Math.sin(n);return new Cesium.Cartesian2(r,o)}static calcCameraDistance(e,t){if(WebGLPlot$f.defined(e)&&WebGLPlot$f.defined(t)){let i=this.degreesToCartesian3(e);return WebGLPlot$f.Cartesian3.distance(i,t.camera.positionWC)}return null}}const _0x23a222=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2077d7=_0x23a222(void 0,(function(){return _0x2077d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2077d7).search("(((.+)+)+)+$")}));_0x2077d7();class _0x24b262{constructor(){this._symbolStyle=new _0x53d051,this._lineSymbolID=0,this._lineWidth=3,this._surroundLineWidth=3,this._gridSymbolSize=new WebGLPlot$f.Cartesian2(-1,-1),this._symbolRank=0}clone(){let e=new _0x24b262;return e._symbolStyle=this._symbolStyle.clone(),e._lineSymbolID=this._lineSymbolID,e._lineWidth=this._lineWidth,e._surroundLineWidth=this._surroundLineWidth,e._gridSymbolSize=this._gridSymbolSize,e._symbolRank=this._symbolRank,e}getSymbolStyle(){return this._symbolStyle}setSymbolStyle(e){this._symbolStyle=e}getLineSymbolID(){return this._lineSymbolID}setLineSymbolID(e){this._lineSymbolID=e}getLineWidth(){return this._lineWidth}setLineWidth(e){this._lineWidth=e}getSurroundLineWidth(){return this._surroundLineWidth}setSurroundLineWidth(e){this._surroundLineWidth=e}getGridSymbolSize(){return this._gridSymbolSize}setGridSymbolSize(e){this._gridSymbolSize=e}getSymbolRank(){return this._symbolRank}setSymbolRank(e){this._symbolRank=e}setGeoGraphicObjectStyle(e){e.symbolStyle=this._symbolStyle,e.lineSymbolID=this._lineSymbolID,e.gridLineWidth=this._lineWidth,e.gridSurroundLineWidth=this._surroundLineWidth,-1!=this._gridSymbolSize.x&&-1!=this._gridSymbolSize.y&&(e.gridSymbolSize=this._gridSymbolSize),e.symbolRank=this._symbolRank}getGeoGraphicObjectStyle(e){this._symbolStyle=e.symbolStyle,this._lineSymbolID=e.lineSymbolID,this._lineWidth=e.gridLineWidth,this._surroundLineWidth=e.gridSurroundLineWidth,this._gridSymbolSize=e.gridSymbolSize,this._symbolRank=e.symbolRank}toJson(){let e={};if(!e.hasOwnProperty("symbolStyle")){var t={};t.lineColor=_0x2887b9.colorToObject(this._symbolStyle.lineColor),t.fillSymbolID=this._symbolStyle._fillSymbolID,t.fillBackColor=_0x2887b9.colorToObject(this._symbolStyle._fillBackColor),t.fillForeColor=_0x2887b9.colorToObject(this._symbolStyle._fillForeColor),t.fillBackOpaque=this._symbolStyle._fillBackOpaque,t.fillGradientMode=this._symbolStyle._fillGradientMode,t.fillCenterOffsetX=this._symbolStyle.fillGradientOffsetRatioX,t.fillCenterOffsetY=this._symbolStyle.fillGradientOffsetRatioY,t.fillAngle=this._symbolStyle.fillGradientAngle,t.fillOpaqueRate=100-this._symbolStyle.fillOpaqueRate,t.lineWidth3D=this._symbolStyle.lineWidth,e.symbolStyle=t}return e.hasOwnProperty("lineSymbolID")||(e.lineSymbolID=this._lineSymbolID),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("surroundLineWidth")||(e.surroundLineWidth=this._surroundLineWidth),e.hasOwnProperty("gridSymbolSize")||(e.gridSymbolSize={x:this._gridSymbolSize.x,y:this._gridSymbolSize.y}),e.hasOwnProperty("symbolRank")||(e.symbolRank=this._symbolRank),JSON.stringify(e)}fromJson(e){let t=JSON.parse(e);if(WebGLPlot$f.defined(t.symbolStyle)){let e=t.symbolStyle;WebGLPlot$f.defined(e.lineColor)&&(this._symbolStyle.lineColor=_0x2887b9.objectToColor(e.lineColor),this._symbolStyle._opacity=this._symbolStyle.lineColor.alpha),WebGLPlot$f.defined(e.fillSymbolID)&&(this._symbolStyle.fillSymbolID=e.fillSymbolID),WebGLPlot$f.defined(e.fillForeColor)&&(this._symbolStyle.fillForeColor=_0x2887b9.objectToColor(e.fillForeColor)),WebGLPlot$f.defined(e.fillBackColor)&&(this._symbolStyle.fillBackColor=_0x2887b9.objectToColor(e.fillBackColor)),WebGLPlot$f.defined(e.fillGradientMode)&&(this._symbolStyle.fillGradientMode=e.fillGradientMode),WebGLPlot$f.defined(e.fillBackOpaque)&&(this._symbolStyle.fillBackOpaque=e.fillBackOpaque),WebGLPlot$f.defined(e.fillGradientAngle)&&(this._symbolStyle.fillGradientAngle=e.fillGradientAngle),WebGLPlot$f.defined(e.fillOpaqueRate)&&(this._symbolStyle.fillOpaqueRate=100-e.fillOpaqueRate),WebGLPlot$f.defined(e.fillGradientAngle)&&(this._symbolStyle.fillGradientAngle=e.fillGradientAngle),WebGLPlot$f.defined(e.fillGradientOffsetRatioX)&&(this._symbolStyle.fillGradientOffsetRatioX=e.fillGradientOffsetRatioX),WebGLPlot$f.defined(e.fillGradientOffsetRatioY)&&(this._symbolStyle.fillGradientOffsetRatioY=e.fillGradientOffsetRatioY),WebGLPlot$f.defined(e.lineWidth3D)?this._symbolStyle.lineWidth=e.lineWidth3D:this._symbolStyle.lineWidth=3}WebGLPlot$f.defined(t.lineSymbolID)&&(this._lineSymbolID=t.lineSymbolID),WebGLPlot$f.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$f.defined(t.surroundLineWidth)&&(this._surroundLineWidth=t.surroundLineWidth),WebGLPlot$f.defined(t.gridSymbolSize)&&(this._gridSymbolSize=new WebGLPlot$f.Cartesian2(t.gridSymbolSize.x,t.gridSymbolSize.y)),WebGLPlot$f.defined(t.symbolRank)&&(this._symbolRank=t.symbolRank)}}const _0x320483=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2b72a2=_0x320483(void 0,(function(){return _0x2b72a2.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b72a2).search("(((.+)+)+)+$")}));_0x2b72a2();class _0x487d97{constructor(){this._position=new _0x11ff81,this._isPositionUpdate=!1,this._modelScale=1,this._isModelScaleUpdate=!1,this._vectorScale=1,this._isVectorScaleUpdate=!1,this._modelRotate=new _0x11ff81,this._isModelRotateUpdate=!1,this._vectorRotate=new _0x11ff81,this._isVectorRotateUpdate=!1,this._modelPath="",this._isModelPathUpdate=!1,this._visible=!0,this._isVisibleUpdate=!1,this._dotPlotLibID=0,this._isDotPlotLibIDUpdate=!1,this._dotPlotCode=0,this._isDotPlotCodeUpdate=!1,this._dotPlotStyle=new _0x24b262,this._isDotPlotStyleUpdate=!1,this._pictureSymbolSize=new WebGLPlot$f.Cartesian2(0,0),this._isPictureSymbolSizeUpdate=!1,this._picturePath="",this._isPicturePathUpdate=!1,this._showMode=_0x4e5d29.Unkown,this._isShowModeUpdate=!1,this._isDistanceChangeMode=!1,this._isDistanceChangeModeUpdate=!1,this._changeModeDistance=5e3,this._isChangeModeDistanceUpdate=!1}_update(e){this._position=e._position,this._isPositionUpdate=!0,this._modelScale=e._modelScale,this._isModelScaleUpdate=!0,this._vectorScale=e._vectorScale,this._isVectorScaleUpdate=!0,this._modelRotate=e._modelRotate,this._isModelRotateUpdate=!0,this._vectorRotate=e._vectorRotate,this._isVectorRotateUpdate=!0,this._modelPath=e._modelPath,this._isModelPathUpdate=!0,this._visible=e._visible,this._isVisibleUpdate=!0,this._dotPlotLibID=e._dotPlotLibID,this._isDotPlotLibIDUpdate=!0,this._dotPlotCode=e._dotPlotCode,this._isDotPlotCodeUpdate=!0,this._dotPlotStyle=e._dotPlotStyle,this._isDotPlotStyleUpdate=!0,this._pictureSymbolSize=e._pictureSymbolSize,this._isPictureSymbolSizeUpdate=!0,this._picturePath=e._picturePath,this._isPicturePathUpdate=!0,this._showMode=e._showMode,this._isShowModeUpdate=!0,this._isDistanceChangeMode=e._isDistanceChangeMode,this._isDistanceChangeModeUpdate=!0,this._changeModeDistance=e._changeModeDistance,this._isChangeModeDistanceUpdate=!0}_merge(e){e._isPositionUpdate&&(this._position=new _0x11ff81(e._position.x,e._position.y,e._position.z),this._isPositionUpdate=!0),e._isModelScaleUpdate&&(this._modelScale=e._modelScale,this._isModelScaleUpdate=!0),e._isVectorScaleUpdate&&(this._vectorScale=e._vectorScale,this._isVectorScaleUpdate=!0),e._isModelRotateUpdate&&(this._modelRotate=new _0x11ff81(e._modelRotate.x,e._modelRotate.y,e._modelRotate.z),this._isModelRotateUpdate=!0),e._isVectorRotateUpdate&&(this._vectorRotate=new _0x11ff81(e._vectorRotate.x,e._vectorRotate.y,e._vectorRotate.z),this._isVectorRotateUpdate=!0),e._isModelPathUpdate&&(this._modelPath=e._modelPath,this._isModelPathUpdate=!0),e._isVisibleUpdate&&(this._visible=e._visible,this._isVisibleUpdate=!0),e._isDotPlotLibIDUpdate&&(this._dotPlotLibID=e._dotPlotLibID,this._isDotPlotLibIDUpdate=!0),e._isDotPlotCodeUpdate&&(this._dotPlotCode=e._dotPlotCode,this._isDotPlotCodeUpdate=!0),e._isDotPlotStyleUpdate&&(this._dotPlotStyle=e._dotPlotStyle.clone(),this._isDotPlotStyleUpdate=!0),e._isPictureSymbolSizeUpdate&&(this._pictureSymbolSize=new WebGLPlot$f.Cartesian2(e._pictureSymbolSize.x,e._pictureSymbolSize.y),this._isPictureSymbolSizeUpdate=!0),e._isPicturePathUpdate&&(this._picturePath=e._picturePath,this._isPicturePathUpdate=!0),e._isShowModeUpdate&&(this._showMode=e._showMode,this._isShowModeUpdate=!0),e._isDistanceChangeModeUpdate&&(this._isDistanceChangeMode=e._isDistanceChangeMode,this._isDistanceChangeModeUpdate=!0),e._isChangeModeDistanceUpdate&&(this._changeModeDistance=e._changeModeDistance,this._isChangeModeDistanceUpdate=!0)}_initParm(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){this._position=new _0x11ff81(e.x,e.y,e.z),this._isPositionUpdate=!1,this._modelScale=t,this._isModelScaleUpdate=!1,this._vectorScale=i,this._isVectorScaleUpdate=!1,this._modelRotate=new _0x11ff81(n.x,n.y,n.z),this._isModelRotateUpdate=!1,this._vectorRotate=new _0x11ff81(r.x,r.y,r.z),this._isVectorRotateUpdate=!1,this._modelPath=o,this._isModelPathUpdate=!1,this._visible=a,this._isVisibleUpdate=!1,this._dotPlotLibID=s,this._isDotPlotLibIDUpdate=!1,this._dotPlotCode=l,this._isDotPlotCodeUpdate=!1,this._dotPlotStyle=u,this._isDotPlotStyleUpdate=!1,this._pictureSymbolSize=new WebGLPlot$f.Cartesian2(c.x,c.y),this._isPictureSymbolSizeUpdate=!1,this._picturePath=h,this._isPicturePathUpdate=!1,this._showMode=d,this._isShowModeUpdate=!1,this._isDistanceChangeMode=f,this._isDistanceChangeModeUpdate=!1,this._changeModeDistance=p,this._isChangeModeDistanceUpdate=!1}_toJson(){let e={};return e.hasOwnProperty("position")||(e.position={x:this._position.x,y:this._position.y,z:this._position.z}),e.hasOwnProperty("isPositionUpdate")||(e.isPositionUpdate=this._isPositionUpdate),e.hasOwnProperty("modelScale")||(e.modelScale=this._modelScale),e.hasOwnProperty("isModelScaleUpdate")||(e.isModelScaleUpdate=this._isModelScaleUpdate),e.hasOwnProperty("vectorScale")||(e.vectorScale=this._vectorScale),e.hasOwnProperty("isVectorScaleUpdate")||(e.isVectorScaleUpdate=this._isVectorScaleUpdate),e.hasOwnProperty("modelRotate")||(e.modelRotate={x:this._modelRotate.x,y:this._modelRotate.y,z:this._modelRotate.z}),e.hasOwnProperty("isModelRotateUpdate")||(e.isModelRotateUpdate=this._isModelRotateUpdate),e.hasOwnProperty("vectorRotate")||(e.vectorRotate={x:this._vectorRotate.x,y:this._vectorRotate.y,z:this._vectorRotate.z}),e.hasOwnProperty("isVectorRotateUpdate")||(e.isVectorRotateUpdate=this._isVectorRotateUpdate),e.hasOwnProperty("modelPath")||(e.modelPath=this._modelPath),e.hasOwnProperty("isModelPathUpdate")||(e.isModelPathUpdate=this._isModelPathUpdate),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("isVisibleUpdate")||(e.isVisibleUpdate=this._isVisibleUpdate),e.hasOwnProperty("dotPlotLibID")||(e.dotPlotLibID=this._dotPlotLibID),e.hasOwnProperty("isDotPlotLibIDUpdate")||(e._isDotPlotLibIDUpdate=this._isDotPlotLibIDUpdate),e.hasOwnProperty("dotPlotCode")||(e.dotPlotCode=this._dotPlotCode),e.hasOwnProperty("isDotPlotCodeUpdate")||(e._isDotPlotCodeUpdate=this._isDotPlotCodeUpdate),e.hasOwnProperty("dotPlotSyle")||(e.dotPlotStyle=this._dotPlotStyle.toJson()),e.hasOwnProperty("isDotPlotStyleUpdate")||(e._isDotPlotStyleUpdate=this._isDotPlotStyleUpdate),e.hasOwnProperty("pictureSymbolSize")||(e.pictureSymbolSize={x:this._pictureSymbolSize.x,y:this._pictureSymbolSize.y}),e.hasOwnProperty("isPictureSymbolSizeUpdate")||(e.isPictureSymbolSizeUpdate=this._isPictureSymbolSizeUpdate),e.hasOwnProperty("picturePath")||(e.picturePath=this._picturePath),e.hasOwnProperty("isPicturePathUpdate")||(e.isPicturePathUpdate=this._isPicturePathUpdate),e.hasOwnProperty("showMode")||(e.showMode=this._showMode),e.hasOwnProperty("isShowModeUpdate")||(e.isShowModeUpdate=this._isShowModeUpdate),e.hasOwnProperty("isDistanceChangeMode")||(e.isDistanceChangeMode=this._isDistanceChangeMode),e.hasOwnProperty("isDistanceChangeModeUpdate")||(e.isDistanceChangeModeUpdate=this._isDistanceChangeModeUpdate),e.hasOwnProperty("changeModeDistance")||(e.changeModeDistance=this._changeModeDistance),e.hasOwnProperty("isChangeModeDistanceUpdate")||(e.isChangeModeDistanceUpdate=this._isChangeModeDistanceUpdate),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);if(WebGLPlot$f.defined(t.position)&&(this._position=new _0x11ff81(t.position.x,t.position.y,t.position.z)),WebGLPlot$f.defined(t.isPositionUpdate)&&(this._isPositionUpdate=t.isPositionUpdate),WebGLPlot$f.defined(t.modelScale)&&(this._modelScale=t.modelScale),WebGLPlot$f.defined(t.isModelScaleUpdate)&&(this._isModelScaleUpdate=t.isModelScaleUpdate),WebGLPlot$f.defined(t.vectorScale)&&(this._vectorScale=t.vectorScale),WebGLPlot$f.defined(t.isVectorScaleUpdate)&&(this._isVectorScaleUpdate=t.isVectorScaleUpdate),WebGLPlot$f.defined(t.modelRotate)&&(this._modelRotate=new _0x11ff81(t.modelRotate.x,t.modelRotate.y,t.modelRotate.z)),WebGLPlot$f.defined(t.isModelRotateUpdate)&&(this._isModelRotateUpdate=t.isModelRotateUpdate),WebGLPlot$f.defined(t.vectorRotate)&&(this._vectorRotate=new _0x11ff81(t.vectorRotate.x,t.vectorRotate.y,t.vectorRotate.z)),WebGLPlot$f.defined(t.isVectorRotateUpdate)&&(this._isVectorRotateUpdate=t.isVectorRotateUpdate),WebGLPlot$f.defined(t.modelPath)&&(this._modelPath=t.modelPath),WebGLPlot$f.defined(t.isModelRotateUpdate)&&(this._isModelPathUpdate=t.isModelPathUpdate),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.isVisibleUpdate)&&(this._isVisibleUpdate=t.isVisibleUpdate),WebGLPlot$f.defined(t.dotPlotLibID)&&(this._dotPlotLibID=t.dotPlotLibID),WebGLPlot$f.defined(t.isDotPlotParmUpdate)&&(this._isDotPlotLibIDUpdate=t.isDotPlotLibIDUpdate),WebGLPlot$f.defined(t.dotPlotCode)&&(this._dotPlotCode=t.dotPlotCode),WebGLPlot$f.defined(t.isDotPlotCodeUpdate)&&(this._isDotPlotCodeUpdate=t.isDotPlotCodeUpdate),WebGLPlot$f.defined(t.dotPlotStyle)){let e=new _0x24b262;e.fromJson(t.dotPlotStyle),this._dotPlotStyle=e}WebGLPlot$f.defined(t.isDotPlotStyleUpdate)&&(this._isDotPlotStyleUpdate=t.isDotPlotStyleUpdate),WebGLPlot$f.defined(t.pictureSymbolSize)&&(this._pictureSymbolSize=new WebGLPlot$f.Cartesian2(t.pictureSymbolSize.x,t.pictureSymbolSize.y)),WebGLPlot$f.defined(t.isPictureSymbolSizeUpdate)&&(this._isPictureSymbolSizeUpdate=t.isPictureSymbolSizeUpdate),WebGLPlot$f.defined(t.picturePath)&&(this._picturePath=t.picturePath),WebGLPlot$f.defined(t.isPicturePathUpdate)&&(this._isPicturePathUpdate=t.isPicturePathUpdate),WebGLPlot$f.defined(t.showMode)&&(this._showMode=t.showMode),WebGLPlot$f.defined(t.isShowModeUpdate)&&(this._isShowModeUpdate=t.isShowModeUpdate),WebGLPlot$f.defined(t.isDistanceChangeMode)&&(this._isDistanceChangeMode=t.isDistanceChangeMode),WebGLPlot$f.defined(t.isDistanceChangeModeUpdate)&&(this._isDistanceChangeModeUpdate=t.isDistanceChangeModeUpdate),WebGLPlot$f.defined(t.changeModeDistance)&&(this._changeModeDistance=t.changeModeDistance),WebGLPlot$f.defined(t.isChangeModeDistanceUpdate)&&(this._isChangeModeDistanceUpdate=t.isChangeModeDistanceUpdate)}clone(){let e=new _0x487d97;return e._position=new _0x11ff81(this._position.x,this._position.y,this._position.z),e._isPositionUpdate=this._isPositionUpdate,e._modelScale=this._modelScale,e._isModelScaleUpdate=this._isModelScaleUpdate,e._vectorScale=this._vectorScale,e._isVectorScaleUpdate=this._isVectorScaleUpdate,e._modelRotate=new _0x11ff81(this._modelRotate.x,this._modelRotate.y,this._modelRotate.z),e._isModelRotateUpdate=this._isModelRotateUpdate,e._vectorRotate=new _0x11ff81(this._vectorRotate.x,this._vectorRotate.y,this._vectorRotate.z),e._isVectorRotateUpdate=this._isVectorRotateUpdate,e._modelPath=this._modelPath,e._isModelPathUpdate=this._isModelPathUpdate,e._visible=this._visible,e._isVisibleUpdate=this._isVisibleUpdate,e._dotPlotLibID=this._dotPlotLibID,e._isDotPlotLibIDUpdate=this._isDotPlotLibIDUpdate,e._dotPlotCode=this._dotPlotCode,e._isDotPlotCodeUpdate=this._isDotPlotCodeUpdate,e._dotPlotStyle=this._dotPlotStyle.clone(),e._isDotPlotStyleUpdate=this._isDotPlotStyleUpdate,e._pictureSymbolSize=new WebGLPlot$f.Cartesian2(this._pictureSymbolSize.x,this._pictureSymbolSize.y),e._isPictureSymbolSizeUpdate=this._isPictureSymbolSizeUpdate,e._picturePath=this._picturePath,e._isPicturePathUpdate=this._isPicturePathUpdate,e._showMode=this._showMode,e._isShowModeUpdate=this._isShowModeUpdate,e._isDistanceChangeMode=this._isDistanceChangeMode,e._isDistanceChangeModeUpdate=this._isDistanceChangeModeUpdate,e._changeModeDistance=this._changeModeDistance,e._isChangeModeDistanceUpdate=this._isChangeModeDistanceUpdate,e}setPosition(e){this._position=e,this._isPositionUpdate=!0}getPosition(){return this._position}isPositionUpdate(){return this._isPositionUpdate}setModelScale(e){this._modelScale=e,this._isModelScaleUpdate=!0}getModelScale(){return this._modelScale}isModelScaleUpdate(){return this._isModelScaleUpdate}setVectorScale(e){this._vectorScale=e,this._isVectorScaleUpdate=!0}getVectorScale(){return this._vectorScale}isVectorScaleUpdate(){return this._isVectorScaleUpdate}setModelRotate(e){this._modelRotate=e,this._isModelRotateUpdate=!0}getModelRotate(){return this._modelRotate}isModelRotateUpdate(){return this._isModelRotateUpdate}setVectorRotate(e){this._vectorRotate=e,this._isVectorRotateUpdate=!0}getVectorRotate(){return this._vectorRotate}isVectorRotateUpdate(){return this._isVectorRotateUpdate}setModelPath(e){this._modelPath=e,this._isModelPathUpdate=!0}getModelPath(){return this._modelPath}isModelPathUpdate(){return this._isModelPathUpdate}setDotPlotLibID(e){this._dotPlotLibID=e,this._isDotPlotLibIDUpdate=!0}getDotPlotLibID(){return this._dotPlotLibID}isDotPlotLibIDUpdate(){return this._isDotPlotLibIDUpdate}setDotPlotCode(e){this._dotPlotCode=e,this._isDotPlotCodeUpdate=!0}getDotPlotCode(){return this._dotPlotCode}isDotPlotCodeUpdate(){return this._isDotPlotCodeUpdate}setDotPlotStyle(e){this._dotPlotStyle=e,this._isDotPlotStyleUpdate=!0}getDotPlotStyle(){return this._dotPlotStyle}isDotPlotStyleUpdate(){return this._isDotPlotStyleUpdate}setVisible(e){this._visible=e,this._isVisibleUpdate=!0}isVisible(){return this._visible}isVisibleUpdate(){return this._isVisibleUpdate}setPicturePath(e){this._picturePath=e,this._isPicturePathUpdate=!0}getPicturePath(){return this._picturePath}isPicturePathUpdate(){return this._isPicturePathUpdate}setPictureSymbolSize(e){this._pictureSymbolSize=e,this._isPictureSymbolSizeUpdate=!0}getPictureSymbolSize(){return this._pictureSymbolSize}isPictureSymbolSizeUpdate(){return this._isPictureSymbolSizeUpdate}setShowMode(e){this._showMode=e,this._isShowModeUpdate=!0}getShowMode(){return this._showMode}isShowModeUpdate(){return this._isShowModeUpdate}setIsDistanceChangeMode(e){this._isDistanceChangeMode=e,this._isDistanceChangeModeUpdate=!0}getIsDistanceChangeMode(){return this._isDistanceChangeMode}isDistanceChangeModeUpdate(){return this._isDistanceChangeModeUpdate}setChangeModeDistance(e){this._changeModeDistance=e,this._isChangeModeDistanceUpdate=!0}getChangeModeDistance(){return this._changeModeDistance}isChangeModeDistanceUpdate(){return this._isChangeModeDistanceUpdate}}var _0x1f1da0=(_0x2e2c59=!0,function(e,t){var i=_0x2e2c59?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e2c59=!1,i}),_0x105117=_0x1f1da0(void 0,(function(){return _0x105117.toString().search("(((.+)+)+)+$").toString().constructor(_0x105117).search("(((.+)+)+)+$")})),_0x2e2c59;_0x105117();var _0x49b975={UNKNOW:0,WAKE:1,ROTORWASH:2,FIRESMOKE:3,BURST:4,TAILFLAME:5,TAILGAS:6,RADAR:7,SCANWAVE:8,SCANCONE:9,DETECTIONCONE:10,TRACKLINE:11,ATTACKLINE:12,SIGN:13,COMMUNICATIONLINK:14,DYNAMICMODEL:15,TEXT:16,EXTENDACTION:17,AUGMENT:18,ANNULARDIFFUSION:19},_0x3b1c90=Object.freeze(_0x49b975);const _0x30ae25=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1d897c=_0x30ae25(void 0,(function(){return _0x1d897c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d897c).search("(((.+)+)+)+$")}));_0x1d897c();class _0x46eece{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._name=WebGLPlot$f.defaultValue(e.name,""),this._geoEntity=WebGLPlot$f.defaultValue(e.geoEntity,null),this._visible=WebGLPlot$f.defaultValue(e.visible,!0),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._UUID=WebGLPlot$f.createGuid(),this._type=_0x3b1c90.UNKNOW,this._geoEntityParameter=void 0,this._initialized=!1,this._scene=void 0;let t=this;this._execute=function(e,i){t._executeFunction(e),t._initialized||(t._removeEffectFromScene(e),t._visible?t._initialized=t._addEffectToScene(e):t._initialized=!0)}}getType(){return this._type}setGeoEntity(e){this._geoEntity=e}getGeoEntity(){return this._geoEntity}setVisible(e){this._visible=e,this._initialized=!1}isVisible(){return this._visible}setOffset(e){this._pntOffset=e,this._initialized=!1}getOffset(){return this._pntOffset}setChangeSizeFlowModel(e){this._bChangeSizeFlowModel=e}isChangeSizeFlowModel(){return this._bChangeSizeFlowModel}getUUID(){return this._UUID}addEffectToScene(e){this._scene=e,e.preUpdate.addEventListener(this._execute)}removeEffectFromScene(e){e.preUpdate.removeEventListener(this._execute),this._removeEffectFromScene(e),this._initialized=!1}setGeoEntityParameter(e,t){}_addEffectToScene(e){}_removeEffectFromScene(e){}_executeFunction(e){}destroy(){}toJSON(){return{}}fromJSON(e){}clone(){}getName(){return this._name}setName(e){this._name=e}}const _0x49529a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x45ed72=_0x49529a(void 0,(function(){return _0x45ed72.toString().search("(((.+)+)+)+$").toString().constructor(_0x45ed72).search("(((.+)+)+)+$")}));_0x45ed72();class _0x3c13c7 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.TAILFLAME,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectTailflame_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,-.5,.5)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._crossDiameter=WebGLPlot$f.defaultValue(e.crossDiameter,20),this._particleTailflame=void 0}setCrossDiameter(e){this._crossDiameter=e,this._initialized=!1}getCrossDiameter(){return this._crossDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._particleTailflame)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._particleTailflame.emitterModelMatrix=t)}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){if(0==this._geoEntityParameter.getModelScale()){let t=1*e.getModelScale();this._crossDiameter=t}else{let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._crossDiameter*=t}this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleTailflame=this._createTailFlameParticle(e),WebGLPlot$f.defined(this._particleTailflame)&&(e.primitives.add(this._particleTailflame),t=!0),t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._particleTailflame)&&e.primitives.contains(this._particleTailflame)&&e.primitives.remove(this._particleTailflame),this._particleTailflame=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("crossDiameter")||(e.crossDiameter=this._crossDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.crossDiameter)&&(this._crossDiameter=t.crossDiameter),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x3c13c7;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._crossDiameter=this._crossDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createTailFlameParticle(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset)||!WebGLPlot$f.defined(this._crossDiameter))return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=this._crossDiameter/1,n=1*i;n<.5&&(n=.5);let r=20*i,o=80*i;return new WebGLPlot$f.ParticleSystem({image:_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/flame.png",startColor:new WebGLPlot$f.Color(1,1,1,1),endColor:new WebGLPlot$f.Color(.5,0,0,0),startScale:1,endScale:1,minimumParticleLife:.1,maximumParticleLife:.3,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$f.Cartesian2(n,n),emissionRate:600,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$f.ConeEmitter(WebGLPlot$f.CesiumMath.toRadians(10)),sizeInMeters:!0})}_calcControlPoint(e,t,i){const n=_0x2887b9.calcControlPosMatrix(e,t,i);if(!WebGLPlot$f.defined(n))return null;const r=WebGLPlot$f.HeadingPitchRoll.fromDegrees(0,90,0,new WebGLPlot$f.HeadingPitchRoll),o=WebGLPlot$f.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$f.Matrix3);return WebGLPlot$f.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$f.Matrix4)}}const _0x2a9490=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe5c3e5=_0x2a9490(void 0,(function(){return _0xe5c3e5.toString().search("(((.+)+)+)+$").toString().constructor(_0xe5c3e5).search("(((.+)+)+)+$")}));_0xe5c3e5();class _0x1914c9 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.TAILGAS,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectTailgas_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,-.5,.5)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._crossDiameter=WebGLPlot$f.defaultValue(e.crossDiameter,20),this._particleTailgas=void 0}setCrossDiameter(e){this._crossDiameter=e,this._initialized=!1}getCrossDiameter(){return this._crossDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._particleTailgas)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._particleTailgas.emitterModelMatrix=t)}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._crossDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleTailgas=this._createTailgasParticle(e),WebGLPlot$f.defined(this._particleTailgas)&&(e.primitives.add(this._particleTailgas),t=!0),t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._particleTailgas)&&e.primitives.contains(this._particleTailgas)&&e.primitives.remove(this._particleTailgas),this._particleTailgas=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("crossDiameter")||(e.crossDiameter=this._crossDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.crossDiameter)&&(this._crossDiameter=t.crossDiameter),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x1914c9;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._crossDiameter=this._crossDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createTailgasParticle(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset)||!WebGLPlot$f.defined(this._crossDiameter))return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=this._crossDiameter/1,n=1*i;n<.5&&(n=.5);let r=5*i,o=5*i;return new WebGLPlot$f.ParticleSystem({image:_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/gas.png",startColor:new WebGLPlot$f.Color(.57,.57,.57,1),endColor:new WebGLPlot$f.Color(.57,.57,.57,0),startScale:1,endScale:1,minimumParticleLife:7,maximumParticleLife:7,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$f.Cartesian2(n,n),emissionRate:80,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$f.ConeEmitter(WebGLPlot$f.CesiumMath.toRadians(5)),sizeInMeters:!0})}_calcControlPoint(e,t,i){const n=_0x2887b9.calcControlPosMatrix(e,t,i);if(!WebGLPlot$f.defined(n))return null;const r=WebGLPlot$f.HeadingPitchRoll.fromDegrees(0,90,0,new WebGLPlot$f.HeadingPitchRoll),o=WebGLPlot$f.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$f.Matrix3);return WebGLPlot$f.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$f.Matrix4)}}const _0xe3d9d6=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x15c81c=_0xe3d9d6(void 0,(function(){return _0x15c81c.toString().search("(((.+)+)+)+$").toString().constructor(_0x15c81c).search("(((.+)+)+)+$")}));_0x15c81c();class _0x302fab extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.FIRESMOKE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectFiresmoke_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,.5)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._firesmokeDiameter=WebGLPlot$f.defaultValue(e.firesmokeDiameter,50),this._particleFiresmoke=void 0}setFiresmokeDiameter(e){this._firesmokeDiameter=e,this._initialized=!1}getFiresmokeDiameter(){return this._firesmokeDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._particleFiresmoke)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._particleFiresmoke.emitterModelMatrix=t)}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._firesmokeDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleFiresmoke=this._createFiresmokeParticle(e),WebGLPlot$f.defined(this._particleFiresmoke)&&(e.primitives.add(this._particleFiresmoke),t=!0),t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._particleFiresmoke)&&e.primitives.contains(this._particleFiresmoke)&&e.primitives.remove(this._particleFiresmoke),this._particleFiresmoke=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("firesmokeDiameter")||(e.firesmokeDiameter=this._firesmokeDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.firesmokeDiameter)&&(this._firesmokeDiameter=t.firesmokeDiameter),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x302fab;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._firesmokeDiameter=this._firesmokeDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createFiresmokeParticle(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset)||!WebGLPlot$f.defined(this._firesmokeDiameter)||this._firesmokeDiameter<=0)return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=this._firesmokeDiameter/1,n=1*i;n<.5&&(n=.5);let r=7*i,o=9*i;return new WebGLPlot$f.ParticleSystem({image:_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/fire.png",startColor:new WebGLPlot$f.Color(1,1,1,1),endColor:new WebGLPlot$f.Color(.2,0,0,0),startScale:3,endScale:3,minimumParticleLife:1.5,maximumParticleLife:1.8,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$f.Cartesian2(n,n),emissionRate:200,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$f.ConeEmitter(WebGLPlot$f.CesiumMath.toRadians(30)),sizeInMeters:!0})}_calcControlPoint(e,t,i){let n=_0x2887b9.calcControlPoint(e,t,i);return WebGLPlot$f.defined(n)?WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(_0x2887b9.degreesToCartesian3(n),new WebGLPlot$f.HeadingPitchRoll,WebGLPlot$f.Ellipsoid.WGS84,WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west")):null}}const _0x198c45=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2ca4a7=_0x198c45(void 0,(function(){return _0x2ca4a7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ca4a7).search("(((.+)+)+)+$")}));_0x2ca4a7();class _0xfa8fd4 extends _0x46eece{constructor(){super(),this._UUID="GeoEntityEffectExtend_"+WebGLPlot$f.createGuid(),this._type=_0x3b1c90.EXTENDACTION,this._name="",this._param=""}toJSON(){let e={};return e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("param")||(e.param=this._param),JSON.stringify(e)}fromJSON(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.param)&&(this._param=t.param)}_executeExtend(){_0xfa8fd4.extendCallBacks.forEach(((e,t)=>{t(e,this._name,this._param)}))}getName(){return this._name}setName(e){this._name=e}getParam(){return this._param}setParam(e){this._param=e}static addExtendCallBack(e,t){WebGLPlot$f.defined(_0xfa8fd4.extendCallBacks.get(e))||_0xfa8fd4.extendCallBacks.set(e,t)}static removeExtendCallBack(e){WebGLPlot$f.defined(_0xfa8fd4.extendCallBacks.get(e))&&_0xfa8fd4.extendCallBacks.delete(e)}}_0xfa8fd4.extendCallBacks=new Map;var _0x52ec3a=(_0x1492e9=!0,function(e,t){var i=_0x1492e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1492e9=!1,i}),_0x34a47b=_0x52ec3a(void 0,(function(){return _0x34a47b.toString().search("(((.+)+)+)+$").toString().constructor(_0x34a47b).search("(((.+)+)+)+$")})),_0x1492e9;_0x34a47b();class _0x4d608c extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new WebGLPlot$f.Cartesian3(0,0,0)),this._type=_0x3b1c90.DYNAMICMODEL,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectDynamic_"+WebGLPlot$f.createGuid(),this._dynamicModelUrl=WebGLPlot$f.defaultValue(e.dynamicModelUrl,""),this._angleTimes=WebGLPlot$f.defaultValue(e.angleTimes,[{time:3,start:{x:0,y:0,z:0},end:{x:45,y:45,z:45},isloop:!0}]),this._scaleTimes=WebGLPlot$f.defaultValue(e.scaleTimes,[{time:3,start:500,end:2e3,isloop:!0}]),this._dynamicModel=void 0,this._angleLoop=WebGLPlot$f.defaultValue(e.angleLoop,!1),this._scaleLoop=WebGLPlot$f.defaultValue(e.scaleLoop,!1),this._gapTime=WebGLPlot$f.defaultValue(e.gapTime,30),this._timer=null}setModelPath(e){this._dynamicModelUrl=e,this._initialized=!1}getModelPath(){return this._dynamicModelUrl}setAngleTimes(e){this._angleTimes=e,this._initialized=!1}getAngleTimes(){return this._angleTimes}setScaleTimes(e){this._scaleTimes=e,this._initialized=!1}getScaleTimes(){return this._scaleTimes}setAngleLoop(e){this._angleLoop=e,this._initialized=!1}getAngleLoop(){return this._angleLoop}setScaleLoop(e){this._scaleLoop=e,this._initialized=!1}getScaleLoop(){return this._scaleLoop}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._dynamicModel)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0x2887b9.calcControlPosMatrix(e,this._pntOffset,null);WebGLPlot$f.defined(t)&&(this._dynamicModel.modelMatrix=t)}e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()||this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)&&(this._initialized=!1)}this._geoEntityParameter=e}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("dynamicModelUrl")||(e.dynamicModelUrl=this._dynamicModelUrl);let t=[];if(!e.hasOwnProperty("angleTimes")){e.angleTimes=t;for(var i=0;i<this._angleTimes.length;i++)!e.angleTimes.hasOwnProperty("time")&&!e.angleTimes.hasOwnProperty("start")&&!e.angleTimes.hasOwnProperty("end")&&!e.angleTimes.hasOwnProperty("isloop")&&e.angleTimes.push({time:this._angleTimes[i].time,start:this._angleTimes[i].start,end:this._angleTimes[i].end,isloop:this._angleTimes[i].isloop})}let n=[];if(!e.hasOwnProperty("scaleTimes")){e.scaleTimes=n;for(i=0;i<this._scaleTimes.length;i++)!e.scaleTimes.hasOwnProperty("time")&&!e.scaleTimes.hasOwnProperty("start")&&!e.scaleTimes.hasOwnProperty("end")&&!e.scaleTimes.hasOwnProperty("isloop")&&e.scaleTimes.push({time:this._scaleTimes[i].time,start:this._scaleTimes[i].start,end:this._scaleTimes[i].end,isloop:this._scaleTimes[i].isloop})}return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("angleLoop")||(e.angleLoop=this._angleLoop),e.hasOwnProperty("scaleLoop")||(e.scaleLoop=this._scaleLoop),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);if(WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.angleTimes))for(var i=0;i<t.angleTimes.length;i++)WebGLPlot$f.defined(t.angleTimes[i].time),WebGLPlot$f.defined(t.angleTimes[i].start),WebGLPlot$f.defined(t.angleTimes[i].end),WebGLPlot$f.defined(t.angleTimes[i].isloop)&&this._angleTimes.push({time:t.angleTimes[i].time,start:t.angleTimes[i].start,end:t.angleTimes[i].end,isloop:t.angleTimes[i].isloop});if(WebGLPlot$f.defined(t.scaleTimes))for(i=0;i<t.scaleTimes.length;i++)WebGLPlot$f.defined(t.scaleTimes[i].time),WebGLPlot$f.defined(t.scaleTimes[i].start),WebGLPlot$f.defined(t.scaleTimes[i].end),WebGLPlot$f.defined(t.scaleTimes[i].isloop)&&this._scaleTimes.push({time:t.scaleTimes[i].time,start:t.scaleTimes[i].start,end:t.scaleTimes[i].end,isloop:t.scaleTimes[i].isloop});WebGLPlot$f.defined(t.angleLoop)&&(this._angleLoop=t.angleLoop),WebGLPlot$f.defined(t.scaleLoop)&&(this._scaleLoop=t.scaleLoop)}clone(){let e=new _0x4d608c;return e.name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._initialized=this._initialized,e._dynamicModelUrl=this._dynamicModelUrl,e._angleTimes=this._angleTimes,e._scaleTimes=this._scaleTimes,e._angleLoop=this._angleLoop,e._scaleLoop=this._scaleLoop,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e}_addEffectToScene(e){let t=!1;if(this._dynamicModel=this._createDynamicModel(e),WebGLPlot$f.defined(this._dynamicModel)){e.primitives.add(this._dynamicModel);var i=this._getdata(this._angleTimes,this._scaleTimes);this._startChange(i),t=!0}return t}_startChange(e){var t=new WebGLPlot$f.JulianDate.fromDate(new Date),i=new WebGLPlot$f.JulianDate.fromDate(new Date),n=new WebGLPlot$f.JulianDate.fromDate(new Date),r=t,o=i,a=e.angle.as[0].x,s=e.angle.as[0].y,l=e.angle.as[0].z,u=e.scale.ss[0],c=this._dynamicModel.modelMatrix,h=e.angle.at,d=e.scale.st,f=0,p=0;h.forEach((e=>{f+=e})),d.forEach((e=>{p+=e}));var _=null;_=f>p?f:p;let m=this;this._timer=setInterval((function(){var g=new WebGLPlot$f.JulianDate.fromDate(new Date),x=WebGLPlot$f.JulianDate.secondsDifference(g,r),v=WebGLPlot$f.JulianDate.secondsDifference(g,o),y=WebGLPlot$f.JulianDate.secondsDifference(g,t),$=WebGLPlot$f.JulianDate.secondsDifference(g,i),b=WebGLPlot$f.JulianDate.secondsDifference(g,n),T=m._findIndex(y,h),C=m._findIndex($,d),S=1e3*x,w=1e3*v;r=g,o=g;var E=m._dynamicModel.modelMatrix;if(y<=f){let t=S*e.angleVX[T],i=S*e.angleVY[T],n=S*e.angleVZ[T];a+=t,s+=i,l+=n;const r=WebGLPlot$f.HeadingPitchRoll.fromDegrees(l,a,s,new WebGLPlot$f.HeadingPitchRoll),o=WebGLPlot$f.Matrix4.getTranslation(E,new WebGLPlot$f.Cartesian3);let u=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west");E=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(o,r,WebGLPlot$f.Ellipsoid.WGS84,u)}if(y<=f)try{WebGLPlot$f.defined(E)&&(m._dynamicModel.modelMatrix=E)}catch(e){console.log(e)}if($<=p)try{u+=w*e.scaleVS[C],m._dynamicModel.scale=u}catch(e){console.log(e)}if(b>_){if(m._angleLoop){t=WebGLPlot$f.JulianDate.fromDate(new Date),r=t;try{m._dynamicModel.modelMatrix=c,a=e.angle.as[0].x,s=e.angle.as[0].y,l=e.angle.as[0].z}catch(e){console.log(e)}}if(m._scaleLoop){i=WebGLPlot$f.JulianDate.fromDate(new Date),o=i;try{m._dynamicModel.scale=e.scale.ss[0],u=e.scale.ss[0]}catch(e){console.log(e)}}(m._angleLoop||m._scaleLoop)&&(n=WebGLPlot$f.JulianDate.fromDate(new Date)),!m._angleLoop&&!m._scaleLoop&&clearInterval(m._timer)}}),m._gapTime)}_getdata(e,t){for(var i=[],n=[],r=[],o=[],a=[],s=[],l=[],u=[],c=0;c<e.length;c++)i.push(e[c].time),n.push(e[c].start),r.push(e[c].end),o.push(e[c].isloop);for(c=0;c<t.length;c++)a.push(t[c].time),s.push(t[c].start),l.push(t[c].end),u.push(t[c].isloop);var h=[],d=[],f=[],p=[];for(c=0;c<i.length;c++){var _=this._calspeed(i[c],n[c].x,r[c].x),m=this._calspeed(i[c],n[c].y,r[c].y),g=this._calspeed(i[c],n[c].z,r[c].z);h.push(_),d.push(m),f.push(g)}for(c=0;c<a.length;c++){var x=this._calspeed(a[c],s[c],l[c]);p.push(x)}return{angle:{at:i,as:n,ae:r,al:o},scale:{st:a,ss:s,se:l,sl:u},angleVX:h,angleVY:d,angleVZ:f,scaleVS:p}}_calspeed(e,t,i){return(i-t)/(e*=1e3)}_findIndex(e,t){for(var i=[],n=0,r=0;r<t.length;r++)n+=t[r],i.push(n);var o=0;for(r=0;r<i.length;r++)if(e<i[r]){o=r;break}return o}_removeEffectFromScene(e){WebGLPlot$f.defined(this._timer)&&clearInterval(this._timer),WebGLPlot$f.defined(this._dynamicModel)&&e.primitives.contains(this._dynamicModel)&&e.primitives.remove(this._dynamicModel),this._dynamicModel=null}_createDynamicModel(){if(!(WebGLPlot$f.defined(this._geoEntityParameter)&&WebGLPlot$f.defined(this._pntOffset)&&WebGLPlot$f.defined(this._angleTimes)&&WebGLPlot$f.defined(this._scaleTimes)))return null;var e=_0x2887b9.calcControlPosMatrix(this._geoEntityParameter,this._pntOffset,scene);return WebGLPlot$f.defined(e)?new WebGLPlot$f.Model.fromGltf({url:this._dynamicModelUrl,modelMatrix:e,allowPicking:!0}):null}}const _0x4c6403=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x23b9eb=_0x4c6403(void 0,(function(){return _0x23b9eb.toString().search("(((.+)+)+)+$").toString().constructor(_0x23b9eb).search("(((.+)+)+)+$")}));_0x23b9eb();const _0xa62790={AXES:0,STREAMER:1,WALL:2};var _0x31475a=Object.freeze(_0xa62790);const _0x37b2de=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x498bd3=_0x37b2de(void 0,(function(){return _0x498bd3.toString().search("(((.+)+)+)+$").toString().constructor(_0x498bd3).search("(((.+)+)+)+$")}));_0x498bd3();class _0x21af16 extends _0x46eece{constructor(e){super(e),e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._UUID="GeoEntityEffectTrackline"+WebGLPlot.createGuid(),this._pntOffset=WebGLPlot.defaultValue(e.pntOffset,new _0x11ff81(0,-.5,.5)),this._type=_0x3b1c90.TRACKLINE,this._name=WebGLPlot.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._trackType=_0x31475a.AXES,this._initialColor=WebGLPlot.defaultValue(e.initialColor,WebGLPlot.Color.RED),this._lineWidth=WebGLPlot.defaultValue(e.lineWidth,1),this._streamerWidth=WebGLPlot.defaultValue(e.streamerWidth,1),this._showPntCount=WebGLPlot.defaultValue(e.showPntCount,500),this._aryGradientColors=WebGLPlot.defaultValue(e.aryGradientColors,[]),this._pntsTmp=[],this._wallCollection=null,this._polylineCollection=null,this._polygonCollection=null,this._appearance=new WebGLPlot.PerInstanceColorAppearance}setTrackType(e){this._trackType!==e&&(this._trackType=e,this._initialized=!1)}getTrackType(){return this._trackType}setTrackColor(e){this._initialColor=e}getTrackColor(){return this._initialColor}setLineWidth(e){this._lineWidth!==e&&(this._lineWidth=e,this._initialized=!1)}getLineWidth(){return this._lineWidth}setStreamerWidth(e){this._streamerWidth!==e&&(this._streamerWidth=e,this._initialized=!1)}getStreamerWidth(){return this._streamerWidth}setShowPntCount(e){this._showPntCount=e}getShowPntCount(){return this._showPntCount}setGradients(e){this._aryGradientColors=e}getGradients(){return this._aryGradientColors}setGeoEntityParameter(e,t){WebGLPlot.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(e.getPosition())&&this._updateTrack(e),this._geoEntityParameter=e}_addEffectToScene(e){this._polylineCollection=new WebGLPlot.PolylineCollection,e.primitives.add(this._polylineCollection),this._wallCollection=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._wallCollection),this._polygonCollection=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._polygonCollection);let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);return WebGLPlot.defined(t)}_removeEffectFromScene(e){WebGLPlot.defined(this._polylineCollection)&&this._polylineCollection.removeAll(),WebGLPlot.defined(this._wallCollection)&&this._wallCollection.removeAll(),WebGLPlot.defined(this._polygonCollection)&&this._polygonCollection.removeAll(),this._pntsTmp=[]}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("trackType")||(e.trackType=this._trackType),e.hasOwnProperty("initialColor")||(e.initialColor=this._initialColor.toCssColorString()),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("streamerWidth")||(e.streamerWidth=this._streamerWidth),e.hasOwnProperty("showPntCount")||(e.showPntCount=this._showPntCount),e.hasOwnProperty("aryGradientColors")||(e.aryGradientColors=[],this._aryGradientColors.forEach((t=>{e.aryGradientColors.push(t.toCssColorString())}))),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),WebGLPlot.toJSON(e)}fromJSON(e){if(!WebGLPlot.defined(e))return;let t=JSON.parse(e);WebGLPlot.defined(t.type)&&(this._type=t.type),WebGLPlot.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot.defined(t.name)&&(this._name=t.name),WebGLPlot.defined(t.trackType)&&(this._trackType=t.trackType),WebGLPlot.defined(t.initialColor)&&(this._initialColor=WebGLPlot.Color.fromCssColorString(t.initialColor)),WebGLPlot.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot.defined(t.streamerWidth)&&(this._streamerWidth=t.streamerWidth),WebGLPlot.defined(t.showPntCount)&&(this._showPntCount=t.showPntCount),WebGLPlot.defined(t.aryGradientColors)&&(this._aryGradientColors=[],t.aryGradientColors.forEach((e=>{this._aryGradientColors.push(WebGLPlot.Color.fromCssColorString(e))}))),WebGLPlot.defined(t.visible)&&(this._visible=t.visible),WebGLPlot.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot.defined(t.offset)&&(WebGLPlot.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x21af16;return e._name=this._name,e._type=this._type,e._trackType=this._trackType,e._initialColor=this._initialColor.clone(),e._lineWidth=this._lineWidth,e._streamerWidth=this._streamerWidth,e._showPntCount=this._showPntCount,e._aryGradientColors=this._aryGradientColors,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_updateTrack(e){this._trackType===_0x31475a.AXES?this._updateTrackLine(e):this._trackType===_0x31475a.STREAMER?this._updateTrackStreamer(e):this._trackType===_0x31475a.WALL&&this._updateTrackWall(e)}_updateTrackLine(e){if(0==e.getModelScale())return;let t=_0x2887b9.degreesToCartesian3(_0x2887b9.calcControlPoint(e,this._pntOffset,this._scene));if(0===this._pntsTmp.length)this._pntsTmp.push(t);else if(1===this._pntsTmp.length){let e=[];e.push(this._pntsTmp[0]),e.push(t),this._polylineCollection.add({positions:e,width:this._lineWidth,material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}})}),this._pntsTmp.push(t)}else{let e=[];for(e.push(this._pntsTmp[1]),e.push(t),this._polylineCollection.add({positions:e,width:this._lineWidth,material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}})}),this._pntsTmp[1]=t;this._polylineCollection.length>this._showPntCount&&this._showPntCount>0;)this._polylineCollection.remove(this._polylineCollection.get(0));for(let e=0,t=0;e<this._polylineCollection.length;e++,t++){let i=(t+1)/this._polylineCollection.length,n=this._calcGradientColor(i),r=this._polylineCollection.get(e);null!=r&&(r.material.uniforms.color=n)}}}_updateTrackStreamer(e){let t=this._streamerWidth/2,i=new _0x11ff81(this._pntOffset.x-t,this._pntOffset.y,this._pntOffset.z),n=new _0x11ff81(this._pntOffset.x+t,this._pntOffset.y,this._pntOffset.z),r=_0x2887b9.calcControlPoint(e,i,this._scene),o=_0x2887b9.calcControlPoint(e,n,this._scene);if(!WebGLPlot.defined(r)||!WebGLPlot.defined(o))return;let a=_0x2887b9.degreesToCartesian3(r),s=_0x2887b9.degreesToCartesian3(o);if(0===this._pntsTmp.length)this._pntsTmp.push(a),this._pntsTmp.push(s);else if(2===this._pntsTmp.length){let e=[];e.push(this._pntsTmp[0]),e.push(a),e.push(s),e.push(this._pntsTmp[1]),e.push(this._pntsTmp[0]),this._polygonCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(e),perPositionHeight:!0}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp.push(a),this._pntsTmp.push(s)}else{let e=[];for(e.push(this._pntsTmp[2]),e.push(a),e.push(s),e.push(this._pntsTmp[3]),e.push(this._pntsTmp[2]),this._polygonCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(e),perPositionHeight:!0}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp[2]=a,this._pntsTmp[3]=s;this._polygonCollection.length>this._showPntCount&&this._showPntCount>0;)this._polygonCollection.remove(this._polygonCollection.get(0));for(let e=0,t=0;e<this._polygonCollection.length;e++,t++){let i=(t+1)/this._polygonCollection.length,n=this._calcGradientColor(i),r=this._polygonCollection.get(e);null!=r&&(r.appearance.material.uniforms.color=n)}}}_updateTrackWall(e){let t=_0x2887b9.degreesToCartesian3(e.getPosition());if(0===this._pntsTmp.length)this._pntsTmp.push(t);else if(1===this._pntsTmp.length){let e=[];e.push(this._pntsTmp[0]),e.push(t),this._wallCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.WallGeometry({positions:e}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp.push(t)}else{let e=[];for(e.push(this._pntsTmp[1]),e.push(t),this._wallCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.WallGeometry({positions:e}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp[1]=t;this._wallCollection.length>this._showPntCount&&this._showPntCount>0;)this._wallCollection.remove(this._wallCollection.get(0));for(let e=0,t=0;e<this._wallCollection.length;e++,t++){let i=(t+1)/this._wallCollection.length,n=this._calcGradientColor(i),r=this._wallCollection.get(e);null!=r&&(r.appearance.material.uniforms.color=n)}}}_calcGradientColor(e){let t=this._initialColor;if(this._aryGradientColors.length>0){let i=this._aryGradientColors.slice().reverse(),n=i.length-1,r=1;for(;r/n<=e&&r<n;)r++;let o=r-1,a=o/n,s=i[o],l=i[o+1];if(e===a)t=new WebGLPlot.Color(s.r,s.g,s.b,s.a);else{let i=(e-a)*n,r=s.red+(l.red-s.red)*i,o=s.green+(l.green-s.green)*i,u=s.blue+(l.blue-s.blue)*i,c=s.alpha+(l.alpha-s.alpha)*i;t=new WebGLPlot.Color(r,o,u,c)}}return t}}const _0x393901=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5d7aeb=_0x393901(void 0,(function(){return _0x5d7aeb.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d7aeb).search("(((.+)+)+)+$")}));_0x5d7aeb();class _0x2c1685 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.ATTACKLINE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAttackline"+WebGLPlot$f.createGuid(),this._visible=WebGLPlot$f.defaultValue(e.visible,!0),this._pathInfo=WebGLPlot$f.defaultValue(e.pathInfo,[{totalLengthProportion:.3,relativeHeight:200},{totalLengthProportion:.5,relativeHeight:100},{totalLengthProportion:.7,relativeHeight:300}]),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,-.5,.5)),WebGLPlot$f.defined(e.start)&&(this._start=new WebGLPlot$f.Cartesian3.fromDegrees(e.start.x,e.start.y,e.start.z)),WebGLPlot$f.defined(e.target)&&(this._target=new WebGLPlot$f.Cartesian3.fromDegrees(e.target.x,e.target.y,e.target.z)),this._attactModelPath=WebGLPlot$f.defaultValue(e.attactModelPath,""),this._attactModelScale=WebGLPlot$f.defaultValue(e.attactModelScale,40),this._during=WebGLPlot$f.defaultValue(e.during,5),this._lineWide=WebGLPlot$f.defaultValue(e.lineWide,1),this._lineColor=WebGLPlot$f.defaultValue(e.lineColor,new WebGLPlot$f.Color(0,255,0)),this._Attackline=void 0,this._modelLinePrimitice=void 0,this._ispause=!1,this._isBack=!1,this._isForward=!1,this._isRewind=!1}setPathInfo(e){this._pathInfo=e,this._initialized=!1}getPathInfo(){return this._pathInfo}setStartpoint(e){this._start=e,this._initialized=!1}getStartpoint(){return _0x2887b9.cartesian3ToDegrees(this._start)}setTargetpoint(e){this._target=e,this._initialized=!1}getTargetpoint(){return _0x2887b9.cartesian3ToDegrees(this._target)}setAttactModelPath(e){this._attactModelPath=decodeURI(e),this._initialized=!1}getAttactModelPath(){return this._attactModelPath}setAttactModelScale(e){this._attactModelScale=e,this._initialized=!1}getAttactModelScale(){return this._attactModelScale}setDuring(e){this._during=e,this._initialized=!1}getDuring(){return this._during}setLineWide(e){this._lineWide=e,this._initialized=!1}getLineWide(){return this._lineWide}setLineColor(e){this._lineColor=e,this._initialized=!1}getLineColor(){return this._lineColor}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible);let t=[];if(!e.hasOwnProperty("pathInfo")){e.pathInfo=t;for(var i=0;i<this._pathInfo.length;i++)!e.pathInfo.hasOwnProperty("totalLengthProportion")&&!e.pathInfo.hasOwnProperty("relativeHeight")&&e.pathInfo.push({totalLengthProportion:this._pathInfo[i].totalLengthProportion,relativeHeight:this._pathInfo[i].relativeHeight})}return e.hasOwnProperty("start")||(e.start=this._start),e.hasOwnProperty("target")||(e.target=this._target),e.hasOwnProperty("attactModelPath")||(e.attactModelPath=this._attactModelPath),e.hasOwnProperty("attactModelScale")||(e.attactModelScale=this._attactModelScale),e.hasOwnProperty("during")||(e.during=this._during),e.hasOwnProperty("lineWide")||(e.lineWide=this._lineWide),e.hasOwnProperty("lineColor")||(e.lineColor=_0x2887b9.colorToObject(this._lineColor)),WebGLPlot$f.toJSON(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);if(WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),this._pathInfo=[],WebGLPlot$f.defined(t.pathInfo))for(var i=0;i<t.pathInfo.length;i++)WebGLPlot$f.defined(t.pathInfo[i].totalLengthProportion),WebGLPlot$f.defined(t.pathInfo[i].relativeHeight)&&this._pathInfo.push({totalLengthProportion:t.pathInfo[i].totalLengthProportion,relativeHeight:t.pathInfo[i].relativeHeight});WebGLPlot$f.defined(t.start)&&(this._start=t.start),WebGLPlot$f.defined(t.target)&&(this._target=t.target),WebGLPlot$f.defined(t.attactModelPath)&&(this._attactModelPath=t.attactModelPath),WebGLPlot$f.defined(t.attactModelScale)&&(this._attactModelScale=t.attactModelScale),WebGLPlot$f.defined(t.during)&&(this._during=t.during),WebGLPlot$f.defined(t.lineWide)&&(this._lineWide=t.lineWide),WebGLPlot$f.defined(t.lineColor)&&(this._lineColor=_0x2887b9.objectToColor(t.lineColor))}clone(){let e=new _0x2c1685;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pathInfo=this._pathInfo,e._start=this._start,e._target=this._target,e._attactModelPath=this._attactModelPath,e._attactModelScale=this._attactModelScale,e._during=this._during,e._lineWide=this._lineWide,e._lineColor=this._lineColor.clone(),e._initialized=this._initialized,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e}_addEffectToScene(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return!1;let t=!1,i=this._createAttackline(e);if(!WebGLPlot$f.defined(i))return!1;if(this._Attackline=i,WebGLPlot$f.defined(this._Attackline)){var n=this._start,r=this._target,o=this._pathInfo,a=this._during,s=this._calPoints(n,r,o),l=this._createCurve3D(s),u=this._getAllDistance(l.curvePath3D)/(1e3*a),c=WebGLPlot$f.JulianDate.fromDate(new Date),h=0,d=new WebGLPlot$f.HeadingPitchRoll,f=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west"),p=this._lineColor,_=this._lineWide;this._modelLinePrimitice=e.primitives.add(new WebGLPlot$f.PolylineCollection);var m=l.curvePath3D[0],g=WebGLPlot$f.Cartographic.fromCartesian(m),x=WebGLPlot$f.CesiumMath.toDegrees(g.longitude),v=WebGLPlot$f.CesiumMath.toDegrees(g.latitude),y=g.height;m=[{lon:x,lat:v,height:y}];var $=this;this._ispause,this._isBack,this._isBack,this._isRewind,setInterval((function(){var e,t=WebGLPlot$f.JulianDate.fromDate(new Date),i=1e3*(t.secondsOfDay-c.secondsOfDay);if(c=t,$._ispause)return;e=$._isBack?-u:u,$._isForward&&(h+=2e3*e*1),$._isRewind&&(h-=2e3*e*1);var n=h+i*e*1;h=n;var r=_0x2887b9.getPositionByDistance(l.curvePath3D,n);let o=r.index;if(!(o>=l.curvePath3D.length||-1==o)){if(o<l.curvePath3D.length-1){var a=l.curvePath3D[o+1];const e=$._getHeading(l.curvePath3D[o],a);e&&(d.heading=e);const t=$._getPitch(l.curvePath3D[o],a);t&&(d.pitch=t)}var s=WebGLPlot$f.Cartographic.fromCartesian(r.point),g=[{lon:WebGLPlot$f.CesiumMath.toDegrees(s.longitude),lat:WebGLPlot$f.CesiumMath.toDegrees(s.latitude),height:s.height}],x=new WebGLPlot$f.Cartesian3.fromDegreesArrayHeights([m[0].lon,m[0].lat,m[0].height,g[0].lon,g[0].lat,g[0].height]),v=new WebGLPlot$f.Matrix4;WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(r.point,d,WebGLPlot$f.Ellipsoid.WGS84,f,v);var y=WebGLPlot$f.Matrix3.fromRotationZ(WebGLPlot$f.CesiumMath.toRadians(180));v=WebGLPlot$f.Matrix4.multiplyByMatrix3(v,y,new WebGLPlot$f.Matrix4),WebGLPlot$f.defined(v)&&WebGLPlot$f.defined($._Attackline)&&($._Attackline.modelMatrix=v,$._modelLinePrimitice.add({positions:x,width:_,material:new WebGLPlot$f.Material.fromType("Color",{color:p})})),m=g}}),30),t=!0}return t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._Attackline)&&WebGLPlot$f.defined(this._modelLinePrimitice)&&(e.primitives.contains(this._Attackline)&&(e.primitives.remove(this._Attackline),this._Attackline=null),e.primitives.contains(this._modelLinePrimitice)&&(e.primitives.remove(this._modelLinePrimitice),this._modelLinePrimitice=null))}setGeoEntityParameter(e,t){this._geoEntityParameter=e}_createAttackline(e){var t,i,n=this._attactModelPath,r=this._pathInfo,o=this._attactModelScale;let a=this._calcControlPoint(this._start,this._geoEntityParameter,this._pntOffset,e),s=this._calcControlPoint(this._target,this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(a)&&!WebGLPlot$f.defined(s))return null;t=_0x2887b9.getPositionFromModelMatrix(a),i=_0x2887b9.getPositionFromModelMatrix(s);var l=this._calPoints(t,i,r),u=this._createCurve3D(l),c=new WebGLPlot$f.HeadingPitchRoll;const h=this._getHeading(u.curvePath3D[0],u.curvePath3D[1]);h&&(c.heading=h);const d=this._getPitch(u.curvePath3D[0],u.curvePath3D[1]);d&&(c.pitch=d);var f=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west"),p=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(u.curvePath3D[0],c,WebGLPlot$f.Ellipsoid.WGS84,f);return viewer.scene.primitives.add(WebGLPlot$f.Model.fromGltf({url:n,scale:o,modelMatrix:p}))}_calPoints(e,t,i){var n=[];n.push(e);for(var r=e.x-t.x,o=e.y-t.y,a=e.z-t.z,s=0;s<i.length;s++){var l=i[s].totalLengthProportion,u=new WebGLPlot$f.Cartesian3(e.x-r*l,e.y-o*l,e.z-a*l+i[s].relativeHeight);n.push(u)}return n.push(t),n}_getHeading(e,t){let i=WebGLPlot$f.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$f.Cartesian3.subtract(t,e,new Cesium.Cartesian3),r=WebGLPlot$f.Matrix4.multiplyByPointAsVector(WebGLPlot$f.Matrix4.inverse(i,new WebGLPlot$f.Matrix4),n,new WebGLPlot$f.Cartesian3),o=WebGLPlot$f.Cartesian3.normalize(r,new WebGLPlot$f.Cartesian3),a=Math.atan2(o.y,o.x)-WebGLPlot$f.CesiumMath.PI_OVER_TWO;return WebGLPlot$f.CesiumMath.TWO_PI-WebGLPlot$f.CesiumMath.zeroToTwoPi(a)}_getPitch(e,t){let i=WebGLPlot$f.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$f.Cartesian3.subtract(t,e,new WebGLPlot$f.Cartesian3),r=WebGLPlot$f.Matrix4.multiplyByPointAsVector(WebGLPlot$f.Matrix4.inverse(i,i),n,n);return WebGLPlot$f.Cartesian3.normalize(r,r),WebGLPlot$f.CesiumMath.PI_OVER_TWO-WebGLPlot$f.CesiumMath.acosClamped(r.z)}_getAllDistance(e){let t=0;for(let i=0;i<e.length-1;i++){let n=e[i],r=e[i+1];t+=WebGLPlot$f.Cartesian3.distance(n,r)}return t}_createCurve3D(e){let t=this._getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$f.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new WebGLPlot$f.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_calcControlPoint(e,t,i,n){const r=t.getModelRotate(),o=WebGLPlot$f.HeadingPitchRoll.fromDegrees(r.z,r.x,r.y,new WebGLPlot$f.HeadingPitchRoll),a=_0x2887b9.degreesToCartesian3(e);let s=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west");const l=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(a,o,WebGLPlot$f.Ellipsoid.WGS84,s),u=t.getModelScale(),c=t.getModelPath(),h=_0x2887b9.getModelSize({modelPath:c,scene:n});if(!WebGLPlot$f.defined(h))return null;const d=WebGLPlot$f.Cartesian3.fromElements(h.x*i.x*u,h.y*i.y*u,h.z*i.z*u),f=WebGLPlot$f.Matrix4.multiplyByTranslation(l,d,new WebGLPlot$f.Matrix4),p=WebGLPlot$f.HeadingPitchRoll.fromDegrees(0,90,0,new WebGLPlot$f.HeadingPitchRoll),_=WebGLPlot$f.Matrix3.fromHeadingPitchRoll(p,new WebGLPlot$f.Matrix3);return WebGLPlot$f.Matrix4.multiplyByMatrix3(f,_,new WebGLPlot$f.Matrix4)}}const _0x41f0fe=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x15fc89=_0x41f0fe(void 0,(function(){return _0x15fc89.toString().search("(((.+)+)+)+$").toString().constructor(_0x15fc89).search("(((.+)+)+)+$")}));_0x15fc89();const _0x8b0bf2={ColorMode:0,TextureMode:1};var _0x4ca362=Object.freeze(_0x8b0bf2);const _0x318a1f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4a6883=_0x318a1f(void 0,(function(){return _0x4a6883.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a6883).search("(((.+)+)+)+$")}));_0x4a6883();class _0x3fbded extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._UUID="GeoEntityEffectScanWave_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new WebGLPlot$f.Cartesian3(0,.5,.5)),this._type=WebGLPlot$f.defaultValue(e.type,_0x3b1c90.SCANWAVE),this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._length=WebGLPlot$f.defaultValue(e.length,15),this._width=WebGLPlot$f.defaultValue(e.width,5),this._height=WebGLPlot$f.defaultValue(e.height,3),this._scanAngle=WebGLPlot$f.defaultValue(e.scanAngle,30),this._sectionSlices=WebGLPlot$f.defaultValue(e.sectionSlices,360),this._initRotate=WebGLPlot$f.defaultValue(e.initRotate,new WebGLPlot$f.Cartesian3(90,0,0)),this._repeatCount=WebGLPlot$f.defaultValue(e.repeatCount,8),this._flowSpeed=WebGLPlot$f.defaultValue(e.flowSpeed,3),this._scanAxis=WebGLPlot$f.defaultValue(e.scanAxis,0),this._scanSpeed=WebGLPlot$f.defaultValue(e.scanSpeed,.5),this._picturePath=WebGLPlot$f.defaultValue(e.picturePath,""),this._pictureColorScale=WebGLPlot$f.defaultValue(e.pictureColorScale,5),this._colorBack=WebGLPlot$f.defaultValue(e.colorBack,new WebGLPlot$f.Color(0,1,0,.3)),this._colorBackScale=WebGLPlot$f.defaultValue(e.colorBackScale,1),this._colorForward=WebGLPlot$f.defaultValue(e.colorForward,new WebGLPlot$f.Color(1,1,0,1)),this._colorForwardScale=WebGLPlot$f.defaultValue(e.colorForwardScale,5),this._colorForwardLengthRatio=WebGLPlot$f.defaultValue(e.colorForwardLengthRatio,.08),this._sectionAngle=WebGLPlot$f.defaultValue(e.sectionAngle,360),this._mode=WebGLPlot$f.defaultValue(e.mode,_0x4ca362.ColorMode),this._scanWavePrimitive=void 0,this._currentRotateDirection=1,this._currentRotateDirectionAngle=0}getLength(){return this._length}setLength(e){this._length=e,this._initialized=!1}getWidth(){return this._width}setWidth(e){this._width=e,this._initialized=!1}getHeight(){return this._height}setHeight(e){this._height=e,this._initialized=!1}getScanAngle(){return this._scanAngle}setScanAngle(e){this._scanAngle=e}getSectionSlices(){return this._sectionSlices}setSectionSlices(e){this._sectionSlices=e,this._initialized=!1}getInitRotate(){return this._initRotate}setInitRotate(e){this._initRotate=e,this._initialized=!1}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getFlowSpeed(){return this._flowSpeed}setFlowSpeed(e){this._flowSpeed=e,this._initialized=!1}getScanAxis(){return this._scanAxis}setScanAxis(e){this._scanAxis=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getPicturePath(){return this._picturePath}setPicturePath(e){this._picturePath=e,this._initialized=!1}getPictureColorScale(){return this._pictureColorScale}setPictureColorScale(e){this._pictureColorScale=e,this._initialized=!1}getColorBack(){return this._colorBack}setColorBack(e){this._colorBack=e,this._initialized=!1}getColorBackScale(){return this._colorBackScale}setColorBackScale(e){this._colorBackScale=e,this._initialized=!1}getColorForward(){return this._colorForward}setColorForward(e){this._colorForward=e,this._initialized=!1}getColorForwardScale(){return this._colorForwardScale}setColorForwardScale(e){this._colorForwardScale=e,this._initialized=!1}getColorForwardLengthRatio(){return this._colorForwardLengthRatio}setColorForwardLengthRatio(e){this._colorForwardLengthRatio=e,this._initialized=!1}getSectionAngle(){return this._sectionAngle}setSectionAngle(e){this._sectionAngle=e,this._initialized=!1}getMode(){return this._mode}setMode(e){this._mode=e,this._initialized=!1}_addEffectToScene(e){let t=!1;return this._scanWavePrimitive=this._createScanWavePrimitive(e),WebGLPlot$f.defined(this._scanWavePrimitive)&&(e.primitives.add(this._scanWavePrimitive),t=!0),t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._scanWavePrimitive)&&e.primitives.contains(this._scanWavePrimitive)&&e.primitives.remove(this._scanWavePrimitive),this._scanWavePrimitive=void 0}_executeFunction(e){if(!WebGLPlot$f.defined(this._scanWavePrimitive)||!this._visible||this._scanAngle<=0)return;let t=this._scanAngle/2;(this._currentRotateDirectionAngle>t||this._currentRotateDirectionAngle<-t)&&(this._currentRotateDirection=-this._currentRotateDirection);let i=this._scanSpeed*this._currentRotateDirection;this._currentRotateDirectionAngle+=i;let n=this._getRotateMatrix(i);this._scanWavePrimitive.modelMatrix=WebGLPlot$f.Matrix4.multiplyByMatrix3(this._scanWavePrimitive.modelMatrix,n,new WebGLPlot$f.Matrix4)}_getRotateMatrix(e){let t;return 0===this._scanAxis?t=WebGLPlot$f.Matrix3.fromRotationX(WebGLPlot$f.CesiumMath.toRadians(e)):1===this._scanAxis?t=WebGLPlot$f.Matrix3.fromRotationY(WebGLPlot$f.CesiumMath.toRadians(e)):2===this._scanAxis&&(t=WebGLPlot$f.Matrix3.fromRotationZ(WebGLPlot$f.CesiumMath.toRadians(e))),t}_createScanWavePrimitive(e){this._currentRotateDirection=1,this._currentRotateDirectionAngle=0;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=this._generateGeometry();if(!WebGLPlot$f.defined(i))return;let n,r="";r=this._mode===_0x4ca362.ColorMode?" uniform vec4 colorForward; uniform float colorForwardScale; uniform vec4 colorBack; uniform float colorBackScale; uniform float repeat; uniform float flowSpeed; uniform float colorForwardLengthRatio; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); float sp = 1.0 / repeat; float dis = materialInput.st.t; float m = mod(dis - fract(czm_frameNumber * 0.001 * flowSpeed), sp); if(m <= sp * colorForwardLengthRatio){ material.diffuse = colorForward.rgb * colorForwardScale; material.alpha = colorForward.a; } else { material.diffuse = colorBack.rgb * colorBackScale; material.alpha = colorBack.a; } return material; }":" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }",n=this._mode===_0x4ca362.ColorMode?new WebGLPlot$f.Material({fabric:{uniforms:{colorForward:this._colorForward,colorForwardScale:this._colorForwardScale,colorBack:this._colorBack,colorBackScale:this._colorBackScale,repeat:this._repeatCount,flowSpeed:this._flowSpeed,colorForwardLengthRatio:this._colorForwardLengthRatio},source:r},translucent:!0}):new WebGLPlot$f.Material({fabric:{uniforms:{picture:this._picturePath,pictureColorScale:this._pictureColorScale,repeat:new WebGLPlot$f.Cartesian2(1,this._repeatCount),flowSpeed:this._flowSpeed},source:r},translucent:!0});let o=e.frameState;o.scene3DOnly=!0;let a=new WebGLPlot$f.MaterialAppearance({material:n,faceForward:!1,closed:!0,frameState:o});return new WebGLPlot$f.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$f.GeometryInstance({geometry:i}),asynchronous:!1,appearance:a,modelMatrix:t})}_generateGeometry(){let e=this._sectionSlices,t=new Array(3*(e+1)),i=this._sectionAngle/e;for(let n=0;n<e+1;n++)if(0==n)t[3*n]=0,t[3*n+1]=0,t[3*n+2]=0;else{let e=_0x2887b9.circlePoint(new WebGLPlot$f.Cartesian2(0,0),this._height,this._width,i*n);t[3*n]=e.x,t[3*n+1]=e.y,t[3*n+2]=-this._length}let n=new Float64Array(t),r=WebGLPlot$f.BoundingSphere.fromVertices(t),o=new Array(3*e);for(let t=0;t<e;t++)t==e-1?(o[3*t]=0,o[3*t+1]=t+1,o[3*t+2]=1):(o[3*t]=0,o[3*t+1]=t+1,o[3*t+2]=t+2);this._sectionAngle<360&&o.splice(o.length-3,3);let a=new Uint16Array(o),s=new Array(4*(e+1));for(let t=0;t<e+1;t++)s[4*t]=1,s[4*t+1]=1,s[4*t+2]=1,s[4*t+3]=1;let l=new Array(2*(e+1));if(this._mode===_0x4ca362.ColorMode)for(let t=0;t<e+1;t++)0==t?(l[2*t]=0,l[2*t+1]=0):(l[2*t]=0,l[2*t+1]=1);else for(let t=0;t<e+1;t++)0==t?(l[2*t]=.5,l[2*t+1]=0):(l[2*t]=1/e/2+1/e*(t-1),l[2*t+1]=1);let u=new WebGLPlot$f.GeometryAttributes;return u.position=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n}),u.color=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:new Float32Array(s)}),u.st=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(l)}),new WebGLPlot$f.Geometry({attributes:u,indices:a,primitiveType:WebGLPlot$f.PrimitiveType.TRIANGLES,boundingSphere:r})}_calcModelMatrix(e,t){let i=WebGLPlot$f.Matrix3.fromRotationX(WebGLPlot$f.CesiumMath.toRadians(t.x));return e=WebGLPlot$f.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$f.Matrix4),i=WebGLPlot$f.Matrix3.fromRotationY(WebGLPlot$f.CesiumMath.toRadians(t.y)),e=WebGLPlot$f.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$f.Matrix4),i=WebGLPlot$f.Matrix3.fromRotationZ(WebGLPlot$f.CesiumMath.toRadians(t.z)),e=WebGLPlot$f.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$f.Matrix4)}_calcControlPoint(e,t,i){const n=_0x2887b9.calcControlPosMatrix(e,t,i);if(!WebGLPlot$f.defined(n))return null;const r=WebGLPlot$f.HeadingPitchRoll.fromDegrees(this._initRotate.z,this._initRotate.x,this._initRotate.y,new WebGLPlot$f.HeadingPitchRoll),o=WebGLPlot$f.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$f.Matrix3);return WebGLPlot$f.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$f.Matrix4)}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._scanWavePrimitive)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);if(WebGLPlot$f.defined(t)){let e=this._getRotateMatrix(this._currentRotateDirectionAngle);this._scanWavePrimitive.modelMatrix=WebGLPlot$f.Matrix4.multiplyByMatrix3(t,e,new WebGLPlot$f.Matrix4)}}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._length*=t,this._width*=t,this._height*=t,this._initialized=!1}}this._geoEntityParameter=e}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("length")||(e.length=this._length),e.hasOwnProperty("width")||(e.width=this._width),e.hasOwnProperty("height")||(e.height=this._height),e.hasOwnProperty("scanAngle")||(e.scanAngle=this._scanAngle),e.hasOwnProperty("sectionSlices")||(e.sectionSlices=this._sectionAngle),e.hasOwnProperty("initRotate")||(e.initRotate={x:this._initRotate.x,y:this._initRotate.y,z:this._initRotate.z}),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("flowSpeed")||(e.flowSpeed=this._flowSpeed),e.hasOwnProperty("scanAxis")||(e.scanAxis=this._scanAxis),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("picturePath")||(e._picturePath=this._picturePath),e.hasOwnProperty("pictureColorScale")||(e.pictureColorScale=this._pictureColorScale),e.hasOwnProperty("colorBack")||(e.colorBack=_0x2887b9.colorToObject(this._colorBack)),e.hasOwnProperty("colorBackScale")||(e.colorBackScale=this._colorBackScale),e.hasOwnProperty("colorForward")||(e.colorForward=_0x2887b9.colorToObject(this._colorForward)),e.hasOwnProperty("colorForwardScale")||(e.colorForwardScale=this._colorForwardScale),e.hasOwnProperty("colorForwardLengthRatio")||(e.colorForwardLengthRatio=this._colorForwardLengthRatio),e.hasOwnProperty("sectionAngle")||(e.sectionAngle=this._sectionAngle),e.hasOwnProperty("mode")||(e.mode=this._mode),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$f.defined(t.length)&&(this._length=t.length),WebGLPlot$f.defined(t.width)&&(this._width=t.width),WebGLPlot$f.defined(t.height)&&(this._height=t.height),WebGLPlot$f.defined(t.scanAngle)&&(this._scanAngle=t.scanAngle),WebGLPlot$f.defined(t.sectionSlices)&&(this._sectionSlices=t.sectionSlices),WebGLPlot$f.defined(t.initRotate)&&(this._initRotate=new WebGLPlot$f.Cartesian3(t.initRotate.x,t.initRotate.y,t.initRotate.z)),WebGLPlot$f.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$f.defined(this.flowSpeed)&&(this._flowSpeed=t.flowSpeed),WebGLPlot$f.defined(t.scanAxis)&&(this._scanAxis=t.scanAxis),WebGLPlot$f.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$f.defined(t.picturePath)&&(this._picturePath=t.picturePath),WebGLPlot$f.defined(t.pictureColorScale)&&(this._pictureColorScale=t.pictureColorScale),WebGLPlot$f.defined(t.colorBack)&&(this._colorBack=_0x2887b9.objectToColor(t.colorBack)),WebGLPlot$f.defined(t.colorBackScale)&&(this._colorBackScale=t.colorBackScale),WebGLPlot$f.defined(t.colorForward)&&(this._colorForward=_0x2887b9.objectToColor(t.colorForward)),WebGLPlot$f.defined(t.colorForwardScale)&&(this._colorForwardScale=t.colorForwardScale),WebGLPlot$f.defined(t.colorForwardLengthRatio)&&(this._colorForwardLengthRatio=t.colorForwardLengthRatio),WebGLPlot$f.defined(t.sectionAngle)&&(this._sectionAngle=t.sectionAngle),WebGLPlot$f.defined(t.mode)&&(this._mode=t.mode)}clone(){let e=new _0x3fbded;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new WebGLPlot$f.Cartesian3(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._length=this._length,e._width=this._width,e._height=this._height,e._scanAngle=this._scanAngle,e._sectionSlices=this._sectionSlices,e._initRotate=this._initRotate,e._repeatCount=this._repeatCount,e._flowSpeed=this._flowSpeed,e._scanAxis=this._scanAxis,e._scanSpeed=this._scanSpeed,e._picturePath=this._picturePath,e._pictureColorScale=this._pictureColorScale,e._colorBack=this._colorBack.clone(),e._colorBackScale=this._colorBackScale,e._colorForward=this._colorForward.clone(),e._colorForwardScale=this._colorForwardScale,e._colorForwardLengthRatio=this._colorForwardLengthRatio,e._sectionAngle=this._sectionAngle,e._mode=this._mode,e}}const _0x293b24=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5c7fbc=_0x293b24(void 0,(function(){return _0x5c7fbc.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c7fbc).search("(((.+)+)+)+$")}));_0x5c7fbc();class _0x318fc4 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.BURST,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectBurst_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,.5)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._burstDiameter=WebGLPlot$f.defaultValue(e.burstDiameter,50),this._paricleBurst=void 0}setBurstDiameter(e){this._burstDiameter=e,this._initialized=!1}getBurstDiameter(){return this._burstDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._paricleBurst)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._paricleBurst.emitterModelMatrix=t)}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._burstDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._paricleBurst=this._createBurstParticle(e),WebGLPlot$f.defined(this._paricleBurst)&&(e.primitives.add(this._paricleBurst),t=!0),t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._paricleBurst)&&e.primitives.contains(this._paricleBurst)&&e.primitives.remove(this._paricleBurst),this._paricleBurst=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("burstDiameter")||(e.burstDiameter=this._burstDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.burstDiameter)&&(this._burstDiameter=t.burstDiameter),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x318fc4;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._burstDiameter=this._burstDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createBurstParticle(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset)||!WebGLPlot$f.defined(this._burstDiameter)||this._burstDiameter<=0)return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=this._burstDiameter/1,n=1*i;n<.5&&(n=.5);let r=2*i,o=2*i;return new WebGLPlot$f.ParticleSystem({image:_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/explosion.png",startColor:new Cesium.Color(1,1,1,1),endColor:new Cesium.Color(.5,0,0,0),startScale:1,endScale:.8,minimumParticleLife:.5,maximumParticleLife:1.2,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$f.Cartesian2(n,n),emissionRate:300,lifetime:1,bursts:[{time:0,minimum:500,maximum:500},{time:1,minimum:500,maximum:500}],loop:!0,emitterModelMatrix:t,emitter:new Cesium.SphereEmitter(n),sizeInMeters:!0})}_calcControlPoint(e,t,i){let n=_0x2887b9.calcControlPoint(e,t,i);return WebGLPlot$f.defined(n)?WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(_0x2887b9.degreesToCartesian3(n),new WebGLPlot$f.HeadingPitchRoll,WebGLPlot$f.Ellipsoid.WGS84,WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west")):null}}const _0x1ff63b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5a8f8b=_0x1ff63b(void 0,(function(){return _0x5a8f8b.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a8f8b).search("(((.+)+)+)+$")}));_0x5a8f8b();class _0x457e81 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,-.5,.5)),this._type=_0x3b1c90.AUGMENT,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAugment_"+WebGLPlot$f.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._augmentPicture=WebGLPlot$f.defaultValue(e.augmentPicture,_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/AugPicture/Augment_Blue.png"),this._pictureWidth=WebGLPlot$f.defaultValue(e.pictureWidth,50),this._pictureHeight=WebGLPlot$f.defaultValue(e.pictureHeight,50),this._minDistanceDisplay=WebGLPlot$f.defaultValue(e.minDistanceDisplay,10),this._maxDistanceDisplay=WebGLPlot$f.defaultValue(e.maxDistanceDisplay,5e4),this._augmentCollection=null,this._augmentGeo=null}setAugmentPicture(e){this._augmentPicture=e,this._initialized=!1}getAugmentPicture(){return this._augmentPicture}setPictureWidth(e){this._pictureWidth=e,this._initialized=!1}getPictureWidth(){return this._pictureWidth}setPictureHeight(e){this._pictureHeight=e,this._initialized=!1}getPictureHeight(){return this._pictureHeight}setMinDistanceDisplay(e){this._minDistanceDisplay=e,this._initialized=!1}getMinDistanceDisplay(){return this._minDistanceDisplay}setMaxDistanceDisplay(e){this._maxDistanceDisplay=e,this._initialized=!1}getMaxDistanceDisplay(){return this._maxDistanceDisplay}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._augmentGeo)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())){let t=_0x2887b9.degreesToCartesian3(e.getPosition());WebGLPlot$f.defined(t)&&(this._augmentGeo.position=t)}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._pictureWidth*=t,this._pictureHeight*=t,this._initialized=!1}}this._geoEntityParameter=e}_executeFunction(e){if(!WebGLPlot$f.defined(this._augmentGeo)||!WebGLPlot$f.defined(this._geoEntityParameter)||!this._augmentGeo.show)return;let t=Math.abs(WebGLPlot$f.CesiumMath.toDegrees(e.camera.pitch))/90*this._pictureHeight;t!=this._augmentGeo.height&&(this._augmentGeo.height=t)}_addEffectToScene(e){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(this._augmentPicture))return!1;if(!WebGLPlot$f.defined(this._geoEntityParameter))return;let t=_0x2887b9.degreesToCartesian3(this._geoEntityParameter.getPosition());return this._augmentCollection=e.primitives.add(new WebGLPlot$f.BillboardCollection),this._augmentGeo=this._augmentCollection.add({position:t,image:this._augmentPicture,horizontalOrigin:WebGLPlot$f.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$f.VerticalOrigin.CENTER,distanceDisplayCondition:new WebGLPlot$f.DistanceDisplayCondition(this._minDistanceDisplay,this._maxDistanceDisplay),show:!0,width:this._pictureWidth,height:this._pictureHeight}),!!WebGLPlot$f.defined(this._augmentGeo)}_removeEffectFromScene(e){WebGLPlot$f.defined(this._augmentGeo)&&WebGLPlot$f.defined(this._augmentCollection)&&e.primitives.contains(this._augmentCollection)&&(e.primitives.remove(this._augmentCollection),this._augmentCollection=void 0,this._augmentGeo=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel),e.hasOwnProperty("augmentPicture")||(e.augmentPicture=this._augmentPicture),e.hasOwnProperty("pictureWidth")||(e.pictureWidth=this._pictureWidth),e.hasOwnProperty("pictureHeight")||(e.pictureHeight=this._pictureHeight),e.hasOwnProperty("minDistanceDisplay")||(e.minDistanceDisplay=this._minDistanceDisplay),e.hasOwnProperty("maxDistanceDisplay")||(e.maxDistanceDisplay=this._maxDistanceDisplay),e.hasOwnProperty("visible")||(e.visible=this._visible);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.augmentPicture)&&(this._augmentPicture=t.augmentPicture),WebGLPlot$f.defined(t.pictureWidth)&&(this._pictureWidth=t.pictureWidth),WebGLPlot$f.defined(t.pictureHeight)&&(this._pictureHeight=t.pictureHeight),WebGLPlot$f.defined(t.minDistanceDisplay)&&(this._minDistanceDisplay=t.minDistanceDisplay),WebGLPlot$f.defined(t.maxDistanceDisplay)&&(this._maxDistanceDisplay=t.maxDistanceDisplay),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x457e81;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._augmentPicture=this._augmentPicture,e._pictureWidth=this._pictureWidth,e._pictureHeight=this._pictureHeight,e._minDistanceDisplay=this._minDistanceDisplay,e._maxDistanceDisplay=this._maxDistanceDisplay,e}}const _0xf74ffe=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xa2a2a6=_0xf74ffe(void 0,(function(){return _0xa2a2a6.toString().search("(((.+)+)+)+$").toString().constructor(_0xa2a2a6).search("(((.+)+)+)+$")}));_0xa2a2a6();const _0x18dfff={ScanCone_ARC:0,ScanCone_FLAT:1};var _0x2bebaf=Object.freeze(_0x18dfff);const _0x193da8=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4037f2=_0x193da8(void 0,(function(){return _0x4037f2.toString().search("(((.+)+)+)+$").toString().constructor(_0x4037f2).search("(((.+)+)+)+$")}));_0x4037f2();class _0x5433aa extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,.3,.5)),this._type=_0x3b1c90.SCANCONE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectScancone_"+WebGLPlot$f.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$f.defaultValue(e.radius,15e3),this._scanHAngle=WebGLPlot$f.defaultValue(e.scanHAngle,50),this._scanVAngle=WebGLPlot$f.defaultValue(e.scanVAngle,30),this._cellAngle=WebGLPlot$f.defaultValue(e.cellAngle,5),this._isFill=WebGLPlot$f.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$f.defaultValue(e.fillColor,new WebGLPlot$f.Color(1,0,0,.3)),this._isOutline=WebGLPlot$f.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$f.defaultValue(e.outlineColor,new WebGLPlot$f.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$f.defaultValue(e.outlineWidth,1),this._scanConeType=WebGLPlot$f.defaultValue(e.scanConeType,_0x2bebaf.ScanCone_ARC),this._scanSpeed=WebGLPlot$f.defaultValue(e.scanSpeed,.5),this._pitchAngle=WebGLPlot$f.defaultValue(e.pitchAngle,0),this._scanRange=WebGLPlot$f.defaultValue(e.scanRange,30),this._linePrimitiveCone=null,this._fillPrimitiveCone=null,this._currentScanAngle=0,this._unitScanAngle=1}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._fillPrimitiveCone)||WebGLPlot$f.defined(this._linePrimitiveCone)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,new _0x11ff81(this._pitchAngle,this._currentScanAngle,0),this._scene);WebGLPlot$f.defined(t)&&(WebGLPlot$f.defined(this._fillPrimitiveCone)&&(this._fillPrimitiveCone.modelMatrix=t),WebGLPlot$f.defined(this._linePrimitiveCone)&&(this._linePrimitiveCone.modelMatrix=t))}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){this._currentScanAngle=0;let t=!1;if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return!1;let i=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,new _0x11ff81(this._pitchAngle,0,0),e);return!!WebGLPlot$f.defined(i)&&(this._isOutline&&(this._linePrimitiveCone=this._createLinePrimitiveCone(i),WebGLPlot$f.defined(this._linePrimitiveCone)&&(e.primitives.add(this._linePrimitiveCone),t=!0)),this._isFill&&(this._fillPrimitiveCone=this._createFillPrimitiveCone(i),WebGLPlot$f.defined(this._fillPrimitiveCone)&&(e.primitives.add(this._fillPrimitiveCone),t=!0)),t)}_removeEffectFromScene(e){WebGLPlot$f.defined(this._linePrimitiveCone)&&e.primitives.contains(this._linePrimitiveCone)&&e.primitives.remove(this._linePrimitiveCone),WebGLPlot$f.defined(this._fillPrimitiveCone)&&e.primitives.contains(this._fillPrimitiveCone)&&e.primitives.remove(this._fillPrimitiveCone),this._linePrimitiveCone=null,this._fillPrimitiveCone=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("radius")||(e.radius=this._radius),e.hasOwnProperty("scanHAngle")||(e.scanHAngle=this._scanHAngle),e.hasOwnProperty("scanVAngle")||(e.scanVAngle=this._scanVAngle),e.hasOwnProperty("cellAngle")||(e.cellAngle=this._cellAngle),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),e.hasOwnProperty("outlineWidth")||(e.outlineWidth=this._outlineWidth),e.hasOwnProperty("scanConeType")||(e.scanConeType=this._scanConeType),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("pitchAngle")||(e.pitchAngle=this._pitchAngle),e.hasOwnProperty("scanRange")||(e.scanRange=this._scanRange),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$f.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$f.defined(t.scanHAngle)&&(this._scanHAngle=t.scanHAngle),WebGLPlot$f.defined(t.scanVAngle)&&(this._scanVAngle=t.scanVAngle),WebGLPlot$f.defined(t.cellAngle)&&(this._cellAngle=t.cellAngle),WebGLPlot$f.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$f.defined(t.fillColor)&&(this._fillColor=WebGLPlot$f.Color.fromCssColorString(t.fillColor)),WebGLPlot$f.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$f.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$f.Color.fromCssColorString(t.outlineColor)),WebGLPlot$f.defined(t.outlineWidth)&&(this._outlineWidth=t.outlineWidth),WebGLPlot$f.defined(t.scanConeType)&&(this._scanConeType=t.scanConeType),WebGLPlot$f.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$f.defined(t.pitchAngle)&&(this._pitchAngle=t.pitchAngle),WebGLPlot$f.defined(t.scanRange)&&(this._scanRange=t.scanRange)}clone(){let e=new _0x5433aa;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._radius=this._radius,e._scanHAngle=this._scanHAngle,e._scanVAngle=this._scanVAngle,e._cellAngle=this._cellAngle,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth,e._scanConeType=this._scanConeType,e._scanSpeed=this._scanSpeed,e._pitchAngle=this._pitchAngle,e._scanRange=this._scanRange,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanHAngle(e){this._scanHAngle=e,this._initialized=!1}getScanHAngle(){return this._scanHAngle}setScanVAngle(e){this._scanVAngle=e,this._initialized=!1}getScanVAngle(){return this._scanVAngle}setCellAngle(e){this._cellAngle=e,this._initialized=!1}getCellAngle(){return this._cellAngle}setIsFill(e){this._isFill=e,this._initialized=!1}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e,this._initialized=!1}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e,this._initialized=!1}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e,this._initialized=!1}getOutlineColor(){return this._outlineColor}setOutlineWidth(e){this._outlineWidth=e,this._initialized=!1}getOutlineWidth(){return this._outlineWidth}setScanConeType(e){this._scanConeType=e,this._initialized=!1}getScanConeType(){return this._scanConeType}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setPitchAngle(e){this._pitchAngle=e,this._initialized=!1}getPitchAngle(){return this._pitchAngle}setScanRange(e){this._scanRange=e}getScanRange(){return this._scanRange}_executeFunction(e){if(!WebGLPlot$f.defined(this._linePrimitiveCone)&&!WebGLPlot$f.defined(this._fillPrimitiveCone)||!this._visible||this._scanRange<=0)return;let t=this._scanRange/2;(this._currentScanAngle>t||this._currentScanAngle<-t)&&(this._unitScanAngle=-this._unitScanAngle);let i=this._scanSpeed*this._unitScanAngle;this._currentScanAngle+=i;let n=WebGLPlot$f.Matrix3.fromRotationZ(WebGLPlot$f.CesiumMath.toRadians(i));WebGLPlot$f.defined(this._linePrimitiveCone)&&(this._linePrimitiveCone.modelMatrix=WebGLPlot$f.Matrix4.multiplyByMatrix3(this._linePrimitiveCone.modelMatrix,n,new WebGLPlot$f.Matrix4)),WebGLPlot$f.defined(this._fillPrimitiveCone)&&(this._fillPrimitiveCone.modelMatrix=WebGLPlot$f.Matrix4.multiplyByMatrix3(this._fillPrimitiveCone.modelMatrix,n,new WebGLPlot$f.Matrix4))}_createFillPrimitiveCone(e){if(!WebGLPlot$f.defined(e))return null;let t=this._createFillGeometry();if(!WebGLPlot$f.defined(t))return null;let i=new WebGLPlot$f.Material({fabric:{type:"Color",uniforms:{color:this._fillColor}},translucent:!0}),n=scene.frameState;n.scene3DOnly=!0;let r=new WebGLPlot$f.MaterialAppearance({material:i,faceForward:!1,closed:!0,frameState:n});return new WebGLPlot$f.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$f.GeometryInstance({geometry:WebGLPlot$f.GeometryPipeline.computeNormal(t)}),asynchronous:!1,modelMatrix:e,appearance:r})}_createLinePrimitiveCone(e){let t=this._outlineWidth,i=this._outlineColor;if(!WebGLPlot$f.defined(e))return null;let n=this._createLineGeometry();return WebGLPlot$f.defined(n)?new WebGLPlot$f.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$f.GeometryInstance({geometry:n,attributes:{show:new WebGLPlot$f.ShowGeometryInstanceAttribute(!0),distanceDisplayCondition:new WebGLPlot$f.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot$f.ColorGeometryInstanceAttribute.fromColor(i),offset:void 0}}),asynchronous:!1,modelMatrix:e,appearance:new WebGLPlot$f.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:t}})}):null}_createFillGeometry(){let e=this._scanConeType,t=this._radius,i=WebGLPlot$f.CesiumMath.toRadians(this._scanVAngle),n=WebGLPlot$f.CesiumMath.toRadians(this._scanHAngle),r=WebGLPlot$f.CesiumMath.toRadians(this._cellAngle);i%r!=0&&(i+=r-i%r),n%r!=0&&(n+=r-n%r);let o=0,a=[],s=0,l=n/r,u=i/r,c=new Array(l*u*6+6*u+6*l),h=[],d=l+1,f=u+1,p=-i/2;for(let i=0;i<f;i++){let n=p+r*i;const o=Math.cos(n)*t,a=Math.sin(n)*t;e==_0x2bebaf.ScanCone_ARC?h.push(new WebGLPlot$f.Cartesian2(o,a)):e==_0x2bebaf.ScanCone_FLAT&&h.push(new WebGLPlot$f.Cartesian2(t,a))}for(let t=0;t<h.length;t++){const i=h[t];let o=-n/2;for(let t=0;t<d;t++){let n=o+r*t;e==_0x2bebaf.ScanCone_ARC?a.push(new WebGLPlot$f.Cartesian3(i.x*Math.cos(n),i.x*Math.sin(n),i.y)):e==_0x2bebaf.ScanCone_FLAT&&a.push(new WebGLPlot$f.Cartesian3(i.x,i.x*Math.sin(n),i.y))}}for(let e=0;e<f-1;e++){let t=e*d;for(let e=0;e<d-1;e++)c[s++]=t+e,c[s++]=t+e+1,c[s++]=t+d+e,c[s++]=t+d+e,c[s++]=t+e+1,c[s++]=t+d+e+1}o=a.length;let _=[];for(let e=0;e<f;e++)_.push(a[e*d+d-1]);_.push(new WebGLPlot$f.Cartesian3(0,0,0));for(let e=0;e<f-1;e++)c[s++]=o+(e+1),c[s++]=o+e,c[s++]=o+_.length-1;a=a.concat(_),o=a.length;let m=[];for(let e=0;e<d;e++)m.push(a[e]);m.push(new WebGLPlot$f.Cartesian3(0,0,0));for(let e=0;e<d-1;e++)c[s++]=o+e,c[s++]=o+(e+1),c[s++]=o+m.length-1;a=a.concat(m),o=a.length;let g=[];for(let e=0;e<f;e++)g.push(a[e*d]);g.push(new WebGLPlot$f.Cartesian3(0,0,0));for(let e=0;e<f-1;e++)c[s++]=o+e,c[s++]=o+(e+1),c[s++]=o+g.length-1;a=a.concat(g),o=a.length;let x=[];for(let e=0;e<d;e++)x.push(a[e+(f-1)*d]);x.push(new WebGLPlot$f.Cartesian3(0,0,0));for(let e=0;e<d-1;e++)c[s++]=o+e,c[s++]=o+(e+1),c[s++]=o+x.length-1;a=a.concat(x);let v=this._ptsTransform([a]),y=new Uint16Array(c),$=WebGLPlot$f.BoundingSphere.fromVertices(v),b=new WebGLPlot$f.GeometryAttributes;b.position=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(v)});let T=new Array(v.length/3*2);for(let e=0;e<v.length/3;e+=2)T[e]=1,T[e+1]=1;return b.st=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(T)}),new WebGLPlot$f.Geometry({attributes:b,indices:y,primitiveType:WebGLPlot$f.PrimitiveType.TRIANGLES,boundingSphere:$})}_createLineGeometry(){let e=this._scanConeType,t=this._radius,i=WebGLPlot$f.CesiumMath.toRadians(this._scanVAngle),n=WebGLPlot$f.CesiumMath.toRadians(this._scanHAngle),r=WebGLPlot$f.CesiumMath.toRadians(this._cellAngle);i%r!=0&&(i+=r-i%r),n%r!=0&&(n+=r-n%r);let o=[],a=n/r+1,s=i/r+1,l=[],u=-i/2;for(let i=0;i<s;i++){let n=u+r*i;const o=Math.cos(n)*t,a=Math.sin(n)*t;e==_0x2bebaf.ScanCone_ARC?l.push(new WebGLPlot$f.Cartesian2(o,a)):e==_0x2bebaf.ScanCone_FLAT&&l.push(new WebGLPlot$f.Cartesian2(t,a))}for(let t=0;t<l.length;t++){const i=l[t];let s=-n/2;for(let t=0;t<a;t++){let n=s+r*t;e==_0x2bebaf.ScanCone_ARC?o.push(new WebGLPlot$f.Cartesian3(i.x*Math.cos(n),i.x*Math.sin(n),i.y)):e==_0x2bebaf.ScanCone_FLAT&&o.push(new WebGLPlot$f.Cartesian3(i.x,i.x*Math.sin(n),i.y))}}let c=this._ptsTransform([o]),h=a*s,d=WebGLPlot$f.IndexDatatype.createTypedArray(h,4*h+8),f=0,p=h;for(let e=0;e<s;e++)for(let t=0;t<a-1;t++)d[f++]=e*a+t,d[f++]=e*a+t+1;for(let e=0;e<a;e++)for(let t=0;t<s-1;t++)d[f++]=e+t*a,d[f++]=e+(t+1)*a;d[f++]=p,d[f++]=0,d[f++]=p,d[f++]=a-1,d[f++]=p,d[f++]=(s-1)*a,d[f++]=p,d[f++]=s*a-1;let _=new WebGLPlot$f.GeometryAttributes;_.position=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(c)});let m=new Array(c.length/3*2);for(let e=0;e<c.length/3;e+=2)m[e]=1,m[e+1]=1;return _.st=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(m)}),new WebGLPlot$f.Geometry({attributes:_,indices:d,primitiveType:WebGLPlot$f.PrimitiveType.LINES,boundingSphere:WebGLPlot$f.BoundingSphere.fromVertices(c)})}_ptsTransform(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_calcControlPoint(e,t,i,n){const r=_0x2887b9.calcControlPosMatrix(e,t,n);if(!WebGLPlot$f.defined(r))return null;const o=WebGLPlot$f.HeadingPitchRoll.fromDegrees(i.y,i.x,i.z,new WebGLPlot$f.HeadingPitchRoll),a=WebGLPlot$f.Matrix3.fromHeadingPitchRoll(o,new WebGLPlot$f.Matrix3);return WebGLPlot$f.Matrix4.multiplyByMatrix3(r,a,new WebGLPlot$f.Matrix4)}}const _0x23b070=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1ede90=_0x23b070(void 0,(function(){return _0x1ede90.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ede90).search("(((.+)+)+)+$")}));_0x1ede90();class _0x1232ba extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.DETECTIONCONE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectDetecttoncone"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._bottomRadius=WebGLPlot$f.defaultValue(e.bottomRadius,15e4),this._bottomPosition=e.bottomPosition,this._repeatCount=WebGLPlot$f.defaultValue(e.repeatCount,8),this._colorBack=WebGLPlot$f.defaultValue(e.colorBack,new WebGLPlot$f.Color(0,1,0,.3)),this._colorBackScale=WebGLPlot$f.defaultValue(e.colorBackScale,1),this._colorForward=WebGLPlot$f.defaultValue(e.colorForward,new WebGLPlot$f.Color(1,1,0,1)),this._colorForwardScale=WebGLPlot$f.defaultValue(e.colorForwardScale,5),this._flowSpeed=WebGLPlot$f.defaultValue(e.flowSpeed,3),this._mode=WebGLPlot$f.defaultValue(e.mdoe,_0x4ca362.ColorMode),this._picturePath=WebGLPlot$f.defaultValue(e.picturePath,""),this._pictureColorScale=WebGLPlot$f.defaultValue(e.pictureColorScale,5),this._speed=WebGLPlot$f.defaultValue(e.speed,.005),this._detecttoncone=void 0,this._currentScale=0}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getFlowSpeed(){return this._flowSpeed}setFlowSpeed(e){this._flowSpeed=e,this._initialized=!1}getPicturePath(){return this._picturePath}setPicturePath(e){this._picturePath=e,this._initialized=!1}getPictureColorScale(){return this._pictureColorScale}setPictureColorScale(e){this._pictureColorScale=e,this._initialized=!1}getColorBack(){return this._colorBack}setColorBack(e){this._colorBack=e,this._initialized=!1}getColorBackScale(){return this._colorBackScale}setColorBackScale(e){this._colorBackScale=e,this._initialized=!1}getColorForward(){return this._colorForward}setColorForward(e){this._colorForward=e,this._initialized=!1}getColorForwardScale(){return this._colorForwardScale}setColorForwardScale(e){this._colorForwardScale=e,this._initialized=!1}setRadius(e){this._bottomRadius=e,this._initialized=!1}getRadius(){return this._bottomRadius}setPosition(e){this._bottomPosition=e,this._initialized=!1}getPosition(){return this._bottomPosition}setSpeed(e){this._speed=e,this._initialized=!1}getSpeed(){return this._speed}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("bottomRadius")||(e.bottomRadius=this._bottomRadius),e.hasOwnProperty("bottomPosition")||(e.bottomPosition={x:this._bottomPosition.x,y:this._bottomPosition.y,z:this._bottomPosition.z}),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("flowSpeed")||(e.flowSpeed=this._flowSpeed),e.hasOwnProperty("picturePath")||(e.picturePath=this._picturePath),e.hasOwnProperty("pictureColorScale")||(e.pictureColorScale=this._pictureColorScale),e.hasOwnProperty("colorBack")||(e.colorBack=this._colorBack.toCssColorString()),e.hasOwnProperty("colorBackScale")||(e.colorBackScale=this._colorBackScale),e.hasOwnProperty("colorForward")||(e.colorForward=this._colorForward.toCssColorString()),e.hasOwnProperty("colorForwardScale")||(e.colorForwardScale=this._colorForwardScale),e.hasOwnProperty("mode")||(e.mode=this._mode),e.hasOwnProperty("speed")||(e.speed=this._speed),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$f.defined(t.bottomRadius)&&(this._bottomRadius=t.bottomRadius),WebGLPlot$f.defined(t.bottomPosition)&&(this._bottomPosition=new _0x11ff81(t.bottomPosition.x,t.bottomPosition.y,t.bottomPosition.z)),WebGLPlot$f.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$f.defined(this.flowSpeed)&&(this._flowSpeed=t.flowSpeed),WebGLPlot$f.defined(t.picturePath)&&(this._picturePath=t.picturePath),WebGLPlot$f.defined(t.pictureColorScale)&&(this._pictureColorScale=t.pictureColorScale),WebGLPlot$f.defined(t.colorBack)&&(this._colorBack=WebGLPlot$f.Color.fromCssColorString(t.colorBack)),WebGLPlot$f.defined(t.colorBackScale)&&(this._colorBackScale=t.colorBackScale),WebGLPlot$f.defined(t.colorForward)&&(this._colorForward=WebGLPlot$f.Color.fromCssColorString(t.colorForward)),WebGLPlot$f.defined(t.colorForwardScale)&&(this._colorForwardScale=t.colorForwardScale),WebGLPlot$f.defined(t.mode)&&(this._mode=t.mode),WebGLPlot$f.defined(t.speed)&&(this._speed=t.speed)}clone(){let e=new _0x1232ba;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bottomRadius=this._bottomRadius,e._bottomPosition=new _0x11ff81(this._bottomPosition.x,this._bottomPosition.y,this._bottomPosition.z),e._repeatCount=this._repeatCount,e._flowSpeed=this._flowSpeed,e._pictureColorScale=this._pictureColorScale,e._colorBack=this._colorBack.clone(),e._colorBackScale=this._colorBackScale,e._colorForward=this._colorForward.clone(),e._colorForwardScale=this._colorForwardScale,e._mode=this._mode,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._speed=this._speed}setGeoEntityParameter(e,t){this._geoEntityParameter=e,this._initialized=!1}_executeFunction(e){!WebGLPlot$f.defined(this._detecttoncone)||!this._visible||this._currentScale>1||(this._currentScale+=this._speed,this._detecttoncone.modelMatrix=WebGLPlot$f.Matrix4.setScale(this._detecttoncone.modelMatrix,new WebGLPlot$f.Cartesian3(this._currentScale,this._currentScale,this._currentScale),new WebGLPlot$f.Matrix4))}_addEffectToScene(e){let t=!1;return this._detecttoncone=this._createDetecttoncone(e),WebGLPlot$f.defined(this._detecttoncone)&&(e.primitives.add(this._detecttoncone),t=!0),t}_removeEffectFromScene(e){WebGLPlot$f.defined(this._detecttoncone)&&e.primitives.contains(this._detecttoncone)&&e.primitives.remove(this._detecttoncone),this._currentScale=0,this._detecttoncone=null}_createDetecttoncone(e){let t;t=null!=this._bottomPosition?_0x2887b9.degreesToCartesian3(this._bottomPosition):WebGLPlot$f.Cartesian3.fromDegrees(this._geoEntityParameter.getPosition().x,this._geoEntityParameter.getPosition().y,0);let i=this._bottomRadius,n=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(n))return null;n=_0x2887b9.degreesToCartesian3(n);let r=WebGLPlot$f.Transforms.eastNorthUpToFixedFrame(n);if(r=WebGLPlot$f.Matrix4.setScale(r,new WebGLPlot$f.Cartesian3(.005,.005,.005),new WebGLPlot$f.Matrix4),!WebGLPlot$f.defined(r))return null;let o,a="";a=this._mode===_0x4ca362.ColorMode?" uniform vec4 colorForward; uniform float colorForwardScale; uniform vec4 colorBack; uniform float colorBackScale; uniform float repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); float sp = 1.0 / repeat; vec2 st = materialInput.st; float dis = distance(st, vec2(0.0, 0.0)); float m = mod(dis - fract(czm_frameNumber * 0.001 * flowSpeed), sp); float a = step(sp / repeat * 0.2, m); if(a == 0.0){ material.diffuse = colorForward.rgb * colorForwardScale; material.alpha = colorForward.a; } else { material.diffuse = colorBack.rgb * colorBackScale; material.alpha = colorBack.a; } return material; }":" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }",o=this._mode===_0x4ca362.ColorMode?new WebGLPlot$f.Material({fabric:{uniforms:{colorForward:this._colorForward,colorForwardScale:this._colorForwardScale,colorBack:this._colorBack,colorBackScale:this._colorBackScale,repeat:this._repeatCount,flowSpeed:this._flowSpeed},source:a},translucent:!0}):new WebGLPlot$f.Material({fabric:{uniforms:{picture:this._picturePath,pictureColorScale:this._pictureColorScale,repeat:new WebGLPlot$f.Cartesian2(1,this._repeatCount),flowSpeed:this._flowSpeed},source:a},translucent:!0});let s=e.frameState;s.scene3DOnly=!0;let l=_0x2887b9.degreesToCartesian3(this._geoEntityParameter.getPosition()),u=this._generateGeometry(t,l,i),c=new WebGLPlot$f.GeometryInstance({geometry:u});return new WebGLPlot$f.Primitive({geometryInstances:c,appearance:new WebGLPlot$f.MaterialAppearance({material:o,faceForward:!1,closed:!0,frameState:s}),releaseGeometryInstances:!1,modelMatrix:r,asynchronous:!1})}_create(e){let t=this._geoEntityParameter.getPosition(),i=this._geoEntityParameter.getModelRotate(),n=WebGLPlot$f.HeadingPitchRoll.fromDegrees(i.z,i.x,i.y,new WebGLPlot$f.HeadingPitchRoll),r=this._detecttonconeColor,o=this._geoEntityParameter.getPosition().z,a=WebGLPlot$f.Cartesian3.fromDegrees(t.x,t.y,.5*t.z),s=WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west");const l=WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(a,n,WebGLPlot$f.Ellipsoid.WGS84,s);let u=new WebGLPlot$f.CylinderGeometry({length:o,topRadius:0,bottomRadius:.5*o,vertexFormat:WebGLPlot$f.MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat}),c=new WebGLPlot$f.GeometryInstance({geometry:u,modelMatrix:l,id:"Detecttoncone"});const h=new WebGLPlot$f.Material({fabric:{type:"VtxfShader1",uniforms:{color:r,repeat:30,offset:0,thickness:.3},source:"uniform vec4 color;\n uniform float repeat;\n uniform float offset;\n uniform float thickness;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n float sp = 1.0 / repeat;\n vec2 st = materialInput.st;\n float dis = distance(st,vec2(0.5));\n float m = mod(dis + offset,sp);\n float a = step(sp * (1.0 - thickness), m);\n material.diffuse = color.rgb;\n material.alpha = a*color.a;\n return material;}"},translucent:!1}),d=new WebGLPlot$f.MaterialAppearance({material:h,faceForward:!1,closed:!0});return new WebGLPlot$f.Primitive({geometryInstances:[c],appearance:d})}_generateGeometry(e,t,i){let n=361,r=new Array(1086),o=WebGLPlot$f.Transforms.eastNorthUpToFixedFrame(t),a=WebGLPlot$f.Matrix4.inverse(o,new WebGLPlot$f.Matrix4);WebGLPlot$f.Matrix4.multiplyByPoint(a,t,new WebGLPlot$f.Cartesian3);let s=WebGLPlot$f.Matrix4.multiplyByPoint(a,e,new WebGLPlot$f.Cartesian3),l=this._bottomPosition.z-this._geoEntityParameter.getPosition().z;for(let e=0;e<362;e++)if(0==e)r[3*e]=0,r[3*e+1]=0,r[3*e+2]=0;else{let t=_0x2887b9.circlePoint(s,i,i,1*e);r[3*e]=t.x,r[3*e+1]=t.y,r[3*e+2]=l}let u=new Float64Array(r),c=WebGLPlot$f.BoundingSphere.fromVertices(r),h=new Array(1083);for(let e=0;e<n;e++)360==e?(h[3*e]=0,h[3*e+1]=e+1,h[3*e+2]=1):(h[3*e]=0,h[3*e+1]=e+1,h[3*e+2]=e+2);h.splice(h.length-3,3);let d=new Uint16Array(h),f=new Array(1448);for(let e=0;e<362;e++)f[4*e]=1,f[4*e+1]=1,f[4*e+2]=1,f[4*e+3]=1;let p=new Array(724);for(let e=0;e<362;e++)0==e?(p[2*e]=0,p[2*e+1]=0):(p[2*e]=1,p[2*e+1]=1);let _=new WebGLPlot$f.GeometryAttributes;return _.position=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),_.color=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:new Float32Array(f)}),_.st=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(p)}),new WebGLPlot$f.Geometry({attributes:_,indices:d,primitiveType:WebGLPlot$f.PrimitiveType.TRIANGLES,boundingSphere:c})}_getRotateMatrix(e){let t;return 0===this._scanAxis?t=WebGLPlot$f.Matrix3.fromRotationX(WebGLPlot$f.CesiumMath.toRadians(e)):1===this._scanAxis?t=WebGLPlot$f.Matrix3.fromRotationY(WebGLPlot$f.CesiumMath.toRadians(e)):2===this._scanAxis&&(t=WebGLPlot$f.Matrix3.fromRotationZ(WebGLPlot$f.CesiumMath.toRadians(e))),t}}const _0x56f3f7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x28f668=_0x56f3f7(void 0,(function(){return _0x28f668.toString().search("(((.+)+)+)+$").toString().constructor(_0x28f668).search("(((.+)+)+)+$")}));_0x28f668();const _0x3fcab2={SIMPLE:0,TITLE:1,PICTUREBACKGROUND_WHALE:2,PICTUREBACKGROUND_SCIENCE:3,PICTUREBACKGROUND_FUTURE:4};var _0x1c3666=Object.freeze(_0x3fcab2);const _0x2630d4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x459d9e=_0x2630d4(void 0,(function(){return _0x459d9e.toString().search("(((.+)+)+)+$").toString().constructor(_0x459d9e).search("(((.+)+)+)+$")}));_0x459d9e();class _0x137383 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,.5)),this._type=_0x3b1c90.SIGN,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectSign_"+WebGLPlot$f.createGuid(),this._imagePath=WebGLPlot$f.defaultValue(e.imagePath,""),this._text=WebGLPlot$f.defaultValue(e.text,"飞机"),this._billboardCollection=null,this._signType=WebGLPlot$f.defaultValue(e.signType,_0x1c3666.SIMPLE),this._scale=WebGLPlot$f.defaultValue(e.scale,1)}setImagePath(e){this._imagePath=e,this._initialized=!1}getImagePath(){return this._imagePath}setText(e){this._text=e,this._initialized=!1}getText(){return this._text}setSignType(e){this._signType=e,this._initialized=!1}getSignType(){return this._signType}setScale(e){this._scale=e,this._initialized=!1}getScale(){return this._scale}setGeoEntityParameter(e,t){if(null!=this._billboardCollection&&this._billboardCollection.length>0){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!==e.getShowMode()||e.getShowMode()===_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0x2887b9.calcControlPoint(e,this._pntOffset,null);WebGLPlot$f.defined(t)&&(t=_0x2887b9.degreesToCartesian3(t),this._billboardCollection.get(0).position=t)}e.getShowMode()===_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!==e.getModelPath()||this._geoEntityParameter.getModelScale()!==e.getModelScale())&&(this._initialized=!1)}if(WebGLPlot$f.defined(this._geoEntityParameter)){let t=this._geoEntityParameter.getModelScale();this._geoEntityParameter=e,this._bChangeSizeFlowModel||this._geoEntityParameter.setModelScale(t)}else this._geoEntityParameter=e}_addEffectToScene(e){let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);return!!WebGLPlot$f.defined(t)&&(t=_0x2887b9.degreesToCartesian3(t),this._createSign(e,function(i){if(WebGLPlot$f.defined(this._billboardCollection)||(this._billboardCollection=e.primitives.add(new WebGLPlot$f.BillboardCollection)),0===this._billboardCollection.length&&this._billboardCollection.add({show:!0,position:t,image:i,pixelOffset:new WebGLPlot$f.Cartesian2(0,0),horizontalOrigin:WebGLPlot$f.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$f.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,sizeInMeters:!1,scale:1}),WebGLPlot$f.defined(this._billboardCollection)&&this._billboardCollection.length>0)return this._initialized=!0,!0}.bind(this)),!0)}_removeEffectFromScene(e){WebGLPlot$f.defined(e)&&WebGLPlot$f.defined(this._billboardCollection)&&e.primitives.remove(this._billboardCollection),this._billboardCollection=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("imagePath")||(e.imagePath=this._imagePath),e.hasOwnProperty("text")||(e.text=this._text),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("changeSizeFlowModel")||(e.changeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.imagePath)&&(this._imagePath=t.imagePath),WebGLPlot$f.defined(t.text)&&(this._text=t.text),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.changeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.changeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x137383;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._imagePath=this._imagePath,e._text=this._text,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createSign(e,t){let i="red",n=30,r=30,o=null;if(this._signType===_0x1c3666.SIMPLE&&"string"!=typeof this._text||this._signType!==_0x1c3666.SIMPLE&&"object"!=typeof this._text)return;if(this._signType===_0x1c3666.SIMPLE){let e={element:$('<div id="simpleSign" class="simpleSign"></div>').get(0),style:".simpleSign {z-index: -1;position: absolute;text-align: center;color: rgb(255, 255, 255);background-color:rgb(255,0,0,0.5);border:2px solid red;}"},t=e.element;document.body.appendChild(t);let i=document.createElement("style");i.innerHTML=e.style,document.getElementsByTagName("head").item(0).appendChild(i),t.id=Math.random().toString(15).slice(2,15),t.append(this._text),o=t}else if(this._signType===_0x1c3666.TITLE){let e={element:$('<div id="titleSign" class="titleSign"><div class="titleSignContent-wrapper"><div id="titleSignContent" class="titleSignContent"></div></div></div>').get(0),style:".titleSign {z-index: -1;position: absolute;border:2px solid rgb(0,160,233);padding:0.1px;border-bottom: 2px solid rgb(0,255,0);}.titleSignContent-wrapper {max-height: 200px;overflow-y: auto;text-align: left;/*border-radius: 6px;*/background-color:rgb(164,255,176,0.5);padding: 5px;padding-top: 8px;}.titleSignContent {/* margin: 5px 20px;*/line-height: 0.5;font-size:xx-small;font-weight:normal;}.titleSignContent div {text-align: center;color: rgb(226, 249, 46);}.titleSignContent div {line-height: 1;}.titleSignContent table {margin-left: 2px;margin-right: 2px;color: rgb(238, 154, 78);}.titleSignContent table tr {height: 15px;}"};i="green";let t=e.element;document.body.appendChild(t);let n=document.createElement("style");n.innerHTML=e.style,document.getElementsByTagName("head").item(0).appendChild(n);let r="";for(let e in this._text)"title"===e?r="<div>"+this._text[e]+"</div><table><tbody>":r+="<tr><td>"+e+": </th><td>"+this._text[e]+"</td></tr>";r+="</tbody></table>",t.id=Math.random().toString(15).slice(2,15),$("#titleSignContent").append(r),$("#titleSignContent").get(0).id=Math.random().toString(15).slice(2,15),o=t}else if(this._signType===_0x1c3666.PICTUREBACKGROUND_WHALE||this._signType===_0x1c3666.PICTUREBACKGROUND_SCIENCE||this._signType===_0x1c3666.PICTUREBACKGROUND_FUTURE){let e=_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/鲸鱼.png",t="padding: 20px;padding-right: 45px;";i="#8b9ec6",this._signType===_0x1c3666.PICTUREBACKGROUND_SCIENCE?(e=_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/科技.png",n=36,r=20,t="padding: 20px",i="#1cd0fd"):this._signType===_0x1c3666.PICTUREBACKGROUND_FUTURE&&(e=_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/未来.png",n=45,r=0,t="padding: 20px;padding-top: 55px;padding-bottom: 55px",i="#1cd0fd");let a={element:$('<div id="pictureSign" class="pictureSign"><div class="pictureSign-wrapper"><div id="pictureSignContent" class="pictureSignContent"></div></div></div>').get(0),style:".pictureSign {z-index: -1;position: absolute;background-image: url("+e+");background-size: 100% 100%;"+t+"}.pictureSign-wrapper {max-height: 200px;overflow-y: auto;text-align: left;}.pictureSignContent {line-height: 0.5;font-size:xx-small;font-weight:normal;}.pictureSignContent div {text-align: center;color: rgb(0, 255, 0);}.pictureSignContent div {line-height: 1;}.pictureSignContent table {margin-left: 2px;margin-right: 2px;color: rgb(238, 154, 78);}.pictureSignContent table tr {height: 15px;}"},s=a.element;document.body.appendChild(s);let l=document.createElement("style");l.innerHTML=a.style,document.getElementsByTagName("head").item(0).appendChild(l);let u="";for(let e in this._text)"title"===e?u="<div>"+this._text[e]+"</div><table><tbody>":u+="<tr><td>"+e+": </th><td>"+this._text[e]+"</td></tr>";u+="</tbody></table>",s.id=Math.random().toString(15).slice(2,15),$("#pictureSignContent").append(u),$("#pictureSignContent").get(0).id=Math.random().toString(15).slice(2,15),o=s}let a=o.offsetWidth,s=o.offsetHeight+r,l=document.createElement("canvas");l.width=a*this._scale,l.height=s*this._scale,l.style.width=a+"px",l.style.height=s+"px";let u=l.getContext("2d");u.scale(this._scale,this._scale),u.beginPath(),u.moveTo(a/2,s-n),u.lineTo(a/2,s),u.strokeStyle=i,u.stroke();let c={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:l,width:a,height:s,foreignObjectRendering:!0,tainTest:!1,scale:this._scale};_0x269f3b(o,c).then((function(e){let i=new Image;i.src=e.toDataURL("image/png",1),document.body.removeChild(o),"function"==typeof t&&t(i)}))}}const _0x3fa3aa=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x577201=_0x3fa3aa(void 0,(function(){return _0x577201.toString().search("(((.+)+)+)+$").toString().constructor(_0x577201).search("(((.+)+)+)+$")}));_0x577201();class _0x367e91 extends _0x46eece{constructor(e){super(e),e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._type=_0x3b1c90.ANNULARDIFFUSION,this._name=WebGLPlot.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAnnularDiffusion_"+WebGLPlot.createGuid(),this._bChangeSizeFlowModel=WebGLPlot.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot.defaultValue(e.radius,1e3),this._scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),this._scanSpeed=WebGLPlot.defaultValue(e.scanSpeed,5),WebGLPlot.defined(e.repeat)?this.setRepeat(e.repeat):this._repeat=1,this._diffusionPrimitive=void 0}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanColor(e){this._scanColor=e,this._initialized=!1}getScanColor(){return this._scanColor}setRepeat(e){let t=parseInt(e);t<1?t=1:t>5&&(t=5),this._repeat=t,this._initialized=!1}getRepeat(){return this._repeat}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setGeoEntityParameter(e,t){if(WebGLPlot.defined(this._diffusionPrimitive)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0x2887b9.calcControlPosMatrix(e,this._pntOffset,this._scene);WebGLPlot.defined(t)&&(this._initialized=!1)}if(e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._diffusionPrimitive=this._createAnnularDiffusion(e),WebGLPlot.defined(this._diffusionPrimitive)&&(e.primitives.add(this._diffusionPrimitive),t=!0),t}_removeEffectFromScene(e){WebGLPlot.defined(this._diffusionPrimitive)&&e.primitives.contains(this._diffusionPrimitive)&&e.primitives.remove(this._diffusionPrimitive),this._diffusionPrimitive=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("radius")||(e.radius=this._radius),e.hasOwnProperty("scanColor")||(e.scanColor=this._scanColor.toCssColorString()),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("repeat")||(e.repeat=this._repeat),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot.defined(e))return;let t=JSON.parse(e);WebGLPlot.defined(t.type)&&(this._type=t.type),WebGLPlot.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot.defined(t.name)&&(this._name=t.name),WebGLPlot.defined(t.radius)&&(this._radius=t.radius),WebGLPlot.defined(t.scanColor)&&(this._scanColor=WebGLPlot.Color.fromCssColorString(t.scanColor)),WebGLPlot.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot.defined(t.repeat)&&(this._repeat=t.repeat),WebGLPlot.defined(t.visible)&&(this._visible=t.visible),WebGLPlot.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot.defined(t.offset)&&(WebGLPlot.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x367e91;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._radius=this._radius,e._scanColor=this._scanColor.clone(),e._scanSpeed=this._scanSpeed,e._repeat=this._repeat,e}_createAnnularDiffusion(){if(!WebGLPlot.defined(this._geoEntityParameter)||!WebGLPlot.defined(this._pntOffset)||!WebGLPlot.defined(this._radius))return null;let e=_0x2887b9.calcControlPosMatrix(this._geoEntityParameter,this._pntOffset,scene);if(!WebGLPlot.defined(e))return null;let t=_0x2887b9.getPositionFromModelMatrix(e);let i=new WebGLPlot.Material({fabric:{type:"MyAnnularDiffusion",uniforms:{color:this._scanColor,speed:this._scanSpeed,count:this._repeat,gradient:.2},source:"uniform vec4 color;\n uniform float speed;\n uniform float count;\n uniform float gradient;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(czm_frameNumber * speed / 1000.0);\n vec3 str = materialInput.str;\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = 0.0;\n for(int i = 0; i <= 5; i++){\n if(float(i) <= count){\n disNum = perDis * float(i) - dis + per / count;\n if(disNum > 0.0){\n if(disNum < perDis){\n bl = 1.0 - disNum / perDis;\n } else if(disNum - perDis < perDis){\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl,(1.0 + 10.0 * (1.0 - gradient)));\n }\n }\n }\n }\n return material;\n }"}});return new WebGLPlot.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.EllipseGeometry({center:_0x2887b9.degreesToCartesian3(t),semiMajorAxis:this._radius,semiMinorAxis:this._radius,height:t.z})}),appearance:new WebGLPlot.EllipsoidSurfaceAppearance({material:i})})}}var _0x177751=(_0x1638fa=!0,function(e,t){var i=_0x1638fa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1638fa=!1,i}),_0x5a1966=_0x177751(void 0,(function(){return _0x5a1966.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a1966).search("(((.+)+)+)+$")})),_0x1638fa;_0x5a1966();var _0x227167={UNKNOW:0,BASICLINE:1,DASHLINE:2,METEORLINE:3,TUBULAR:4,ARROW:5},_0x4fea45=Object.freeze(_0x227167);const _0x1910be=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x37419f=_0x1910be(void 0,(function(){return _0x37419f.toString().search("(((.+)+)+)+$").toString().constructor(_0x37419f).search("(((.+)+)+)+$")}));_0x37419f();class _0x1eb387 extends _0x46eece{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.COMMUNICATIONLINK,this._linkType=_0x4fea45.UNKNOW,this._UUID=WebGLPlot$f.createGuid(),this._bChangeSizeFlowModel=!1,this._startUUID=WebGLPlot$f.defaultValue(e.startUUID,""),this._endUUID=WebGLPlot$f.defaultValue(e.endUUID,""),this._startOffset=WebGLPlot$f.defaultValue(e.startOffset,new _0x11ff81(0,0,.5)),this._endOffset=WebGLPlot$f.defaultValue(e.endOffset,new _0x11ff81(0,0,.5)),this._maxVisibleDistance=WebGLPlot$f.defaultValue(e.maxVisibleDistance,-1),this._linkPrimitive=void 0,this._pntStart=void 0,this._pntEnd=void 0}getLinkType(){return this._linkType}setStartUUID(e){this._startUUID=e}getStartUUID(){return this._startUUID}setEndUUID(e){this._endUUID=e}getEndUUID(){return this._endUUID}setStartOffset(e){this._startOffset=e}getStartOffset(){return this._startOffset}setEndOffset(e){this._endOffset=e}getEndOffset(){return this._endOffset}setMaxVisibleDistance(e){this._maxVisibleDistance=e}getMaxVisibleDistance(){return this._maxVisibleDistance}_executeFunction(e){if(WebGLPlot$f.defined(this._pntStart)&&WebGLPlot$f.defined(this._pntEnd)&&this._visible){let t=WebGLPlot$f.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),i=WebGLPlot$f.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z),n=Math.sqrt(WebGLPlot$f.Cartesian3.distanceSquared(t,i)),r=!0;-1!=this._maxVisibleDistance&&(r=n<=this._maxVisibleDistance),r&&!WebGLPlot$f.defined(this._linkPrimitive)?this._addEffectToScene(e):!r&&WebGLPlot$f.defined(this._linkPrimitive)&&this._removeEffectFromScene(e)}}}const _0xe26ce5=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5282b0=_0xe26ce5(void 0,(function(){return _0x5282b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x5282b0).search("(((.+)+)+)+$")}));_0x5282b0();class _0xc54aac extends _0x1eb387{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._linkType=_0x4fea45.BASICLINE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="BasicLineCommunicationLink_"+WebGLPlot$f.createGuid(),this._speedV=WebGLPlot$f.defaultValue(e.speedV,5),this._lineWidth=WebGLPlot$f.defaultValue(e.lineWidth,1),this._signalLengthRatio=WebGLPlot$f.defaultValue(e.signalLengthRatio,.15),this._signalColor=WebGLPlot$f.defaultValue(e.signalColor,new WebGLPlot$f.Color(.21,1,.027,.78)),this._linkLineColor=WebGLPlot$f.defaultValue(e.linkLineColor,new WebGLPlot$f.Color(.92,.92,.92,.19)),this._bBothWay=WebGLPlot$f.defaultValue(e.bBothWay,!0),this._polylineCollection=void 0,this._linkPrimitive=void 0,this._direct=1;let t=this;this._executeAni=function(e,i){if(!WebGLPlot$f.defined(t._linkPrimitive)||!WebGLPlot$f.defined(t._polylineCollection))return;let n=.001*t._speedV,r=t._linkPrimitive.material.uniforms.start;t._bBothWay?(r<=0&&(t._direct=1),r+t._signalLengthRatio>=1&&(t._direct=-1),r+=n*t._direct):r>.8?r=0:r+=n,t._linkPrimitive.material.uniforms.start=r}}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x2887b9.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$f.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x2887b9.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$f.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$f.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x3f9f2a.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$f.defined(t)&&(this._pntStart=_0x2887b9.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x3f9f2a.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$f.defined(i)&&(this._pntEnd=_0x2887b9.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$f.defined(this._pntStart)||!WebGLPlot$f.defined(this._pntEnd))return!1;let n=new WebGLPlot$f.Material({fabric:{type:"MyBaseLineMaterial",uniforms:{color:this._signalColor,color1:this._linkLineColor,start:0,signalLengthRatio:this._signalLengthRatio},source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; \n if(st.s > start && st.s < start + signalLengthRatio){ material.diffuse = color.rgb; \n material.alpha = color.a; \n }\n else{\n material.diffuse = color1.rgb; \n material.alpha = color1.a; \n }\n return material;\n }"}});this._polylineCollection=new WebGLPlot$f.PolylineCollection;let r=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(r),width:this._lineWidth,material:n});let o=!1;return WebGLPlot$f.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),e.preUpdate.addEventListener(this._executeAni),o=!0),o}_removeEffectFromScene(e){WebGLPlot$f.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.preUpdate.removeEventListener(this._executeAni),e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("signalLengthRatio")||(e.signalLengthRatio=this._signalLengthRatio),e.hasOwnProperty("signalColor")||(e.signalColor=this._signalColor.toCssColorString()),e.hasOwnProperty("linkLineColor")||(e.linkLineColor=this._linkLineColor.toCssColorString()),e.hasOwnProperty("bBothWay")||(e.bBothWay=this._bBothWay),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$f.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$f.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$f.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$f.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$f.defined(t.signalLengthRatio)&&(this._signalLengthRatio=t.signalLengthRatio),WebGLPlot$f.defined(t.signalColor)&&(this._signalColor=WebGLPlot$f.Color.fromCssColorString(t.signalColor)),WebGLPlot$f.defined(t.linkLineColor)&&(this._linkLineColor=WebGLPlot$f.Color.fromCssColorString(t.linkLineColor)),WebGLPlot$f.defined(t.bBothWay)&&(this._bBothWay=t.bBothWay),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.startOffset)&&(WebGLPlot$f.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$f.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$f.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$f.defined(t.endOffset)&&(WebGLPlot$f.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$f.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$f.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0xc54aac;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x11ff81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x11ff81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._signalLengthRatio=this._signalLengthRatio,e._signalColor=WebGLPlot$f.Color.clone(this._signalColor),e._linkLineColor=WebGLPlot$f.Color.clone(this._linkLineColor),e._bBothWay=this._bBothWay,e}setSpeedV(e){this._speedV=e}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setSignalLengthRatio(e){this._signalLengthRatio=e,this._initialized=!1}getSignalLengthRatio(){return this._signalLengthRatio}setSignalColor(e){this._signalColor=e,this._initialized=!1}getSignalColor(){return this._signalColor}setLinkLineColor(e){this._linkLineColor=e,this._initialized=!1}getLinkLineColor(){return this._linkLineColor}setbBothWay(e){this._bBothWay=e}getbBothWay(){return this._bBothWay}}const _0x289e66=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x151881=_0x289e66(void 0,(function(){return _0x151881.toString().search("(((.+)+)+)+$").toString().constructor(_0x151881).search("(((.+)+)+)+$")}));_0x151881();class _0x412cba extends _0x1eb387{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._linkType=_0x4fea45.ARROW,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="ArrowCommunicationLink_"+WebGLPlot$f.createGuid(),this._speedV=WebGLPlot$f.defaultValue(e.speedV,1),this._lineWidth=WebGLPlot$f.defaultValue(e.lineWidth,5),this._repeatCount=WebGLPlot$f.defaultValue(e.repeatCount,50),this._arrowImage=WebGLPlot$f.defaultValue(e.arrowImage,_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/Arrow.png"),this._polylineCollection=null,this._linkPrimitive=void 0}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x2887b9.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$f.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x2887b9.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$f.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$f.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x3f9f2a.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$f.defined(t)&&(this._pntStart=_0x2887b9.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x3f9f2a.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$f.defined(i)&&(this._pntEnd=_0x2887b9.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$f.defined(this._pntStart)||!WebGLPlot$f.defined(this._pntEnd))return!1;let n=new WebGLPlot$f.Material({fabric:{type:"MyArrowImage",uniforms:{image:this._arrowImage,repeat:new WebGLPlot$f.Cartesian2(this._repeatCount,1),time:this._speedV},source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = repeat * materialInput.st;\n vec4 colorImage = texture2D(image, vec2(fract(st.s - czm_frameNumber * time * 0.005), st.t));\n material.alpha = colorImage.a;\n material.diffuse = colorImage.rgb;\n return material;\n }"}});this._polylineCollection=new WebGLPlot$f.PolylineCollection;let r=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(r),width:this._lineWidth,material:n});let o=!1;return WebGLPlot$f.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),o=!0),o}_removeEffectFromScene(e){WebGLPlot$f.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("arrowImage")||(e.arrowImage=this._arrowImage),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$f.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$f.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$f.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$f.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$f.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$f.defined(t.arrowImage)&&(this._arrowImage=t.arrowImage),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.startOffset)&&(WebGLPlot$f.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$f.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$f.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$f.defined(t.endOffset)&&(WebGLPlot$f.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$f.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$f.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x412cba;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x11ff81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x11ff81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._repeatCount=this._repeatCount,e._arrowImage=this._arrowImage,e}setSpeedV(e){this._speedV=e,this._initialized=!1}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getRepeatCount(){return this._repeatCount}setArrowImage(e){this._arrowImage=e,this._initialized=!1}getArrowImage(){return this._arrowImage}}const _0x14e255=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4ceb49=_0x14e255(void 0,(function(){return _0x4ceb49.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ceb49).search("(((.+)+)+)+$")}));_0x4ceb49();class _0x592290 extends _0x1eb387{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._linkType=_0x4fea45.TUBULAR,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="TubularCommunicationLink_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,.5)),!WebGLPlot$f.defined(e.sectionSlices)||e.sectionSlices<3||e.sectionSlices>128?this._sectionSlices=60:this._sectionSlices=e.sectionSlices,this._topRadius=WebGLPlot$f.defaultValue(e.topRadius,1e3),this._bottomRadius=WebGLPlot$f.defaultValue(e.bottomRadius,1e3),this._speedV=WebGLPlot$f.defaultValue(e.speedV,1.5),this._repeatCount=WebGLPlot$f.defaultValue(e.repeatCount,10),this._image=WebGLPlot$f.defaultValue(e.image,_0x3f9f2a.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/TubularLinkSpacer.png"),this._linkPrimitive=void 0,this._linkLength=0}getSectionSlices(){return this._sectionSlices}setSectionSlices(e){!WebGLPlot$f.defined(e)||e<3||e>128||(this._sectionSlices=e,this._initialized=!1)}getTopRadius(){return this._topRadius}setTopRadius(e){this._topRadius=e,this._initialized=!1}getBottomRadius(){return this._bottomRadius}setBottomRadius(e){this._bottomRadius=e,this._initialized=!1}getSpeedV(){return this._speedV}setSpeedV(e){this._speedV=e}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e}getImage(){return this._image}setImage(e){this._image=e,this._initialized=!1}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x2887b9.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$f.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x2887b9.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$f.defined(this._pntEnd)&&(i=!0)),i){let e=this._getModelMatrix(this._pntStart,this._pntEnd),t=WebGLPlot$f.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),i=WebGLPlot$f.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z),n=WebGLPlot$f.Cartesian3.distance(t,i)/this._linkLength;this._linkPrimitive.modelMatrix=WebGLPlot$f.Matrix4.multiplyByScale(e,new WebGLPlot$f.Cartesian3(n,1,1),new WebGLPlot$f.Matrix4)}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;this._pntStart=void 0;let i=_0x3f9f2a.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$f.defined(i)&&(this._pntStart=_0x2887b9.calcControlPoint(i,this._startOffset,e)),this._pntEnd=void 0;let n=_0x3f9f2a.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$f.defined(n)&&(this._pntEnd=_0x2887b9.calcControlPoint(n,this._endOffset,e)),!WebGLPlot$f.defined(this._pntStart)||!WebGLPlot$f.defined(this._pntEnd))return!1;let r=this._getModelMatrix(this._pntStart,this._pntEnd);return!!WebGLPlot$f.defined(r)&&(this._linkPrimitive=this._createFillPrimitive(r),WebGLPlot$f.defined(this._linkPrimitive)&&(e.primitives.add(this._linkPrimitive),t=!0),t)}_removeEffectFromScene(e){WebGLPlot$f.defined(this._linkPrimitive)&&e.primitives.contains(this._linkPrimitive)&&(e.primitives.remove(this._linkPrimitive),this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("sectionSlices")||(e.sectionSlices=this._sectionSlices),e.hasOwnProperty("topRadius")||(e.topRadius=this._topRadius),e.hasOwnProperty("bottomRadius")||(e.bottomRadius=this._bottomRadius),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("image")||(e.image=this._image),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$f.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$f.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$f.defined(t.sectionSlices)&&(this._sectionSlices=t.sectionSlices),WebGLPlot$f.defined(t.topRadius)&&(this._topRadius=t.topRadius),WebGLPlot$f.defined(t.bottomRadius)&&(this._bottomRadius=t.bottomRadius),WebGLPlot$f.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$f.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$f.defined(t.image)&&(this._image=t.image),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.startOffset)&&(WebGLPlot$f.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$f.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$f.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$f.defined(t.endOffset)&&(WebGLPlot$f.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$f.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$f.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x592290;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x11ff81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x11ff81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._sectionSlices=this._sectionSlices,e._topRadius=this._topRadius,e._bottomRadius=this._bottomRadius,e._speedV=this._speedV,e._repeatCount=this._repeatCount,e._image=this._image,e}_getModelMatrix(e,t){const i=_0x2887b9.degreesToCartesian3(e),n=_0x2887b9.degreesToCartesian3(t);let r=new WebGLPlot$f.HeadingPitchRoll,o=_0x2887b9.getHeading(i,n);o&&(r.heading=o);let a=_0x2887b9.getPitch(i,n);return a&&(r.pitch=a),WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(i,r,WebGLPlot$f.Ellipsoid.WGS84,WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west"))}_createFillPrimitive(e){if(!WebGLPlot$f.defined(e))return null;let t=this._createFillGeometry();if(!WebGLPlot$f.defined(t))return null;let i=new WebGLPlot$f.Material({fabric:{type:"TubularImage",uniforms:{picture:this._image,pictureColorScale:1,repeat:new WebGLPlot$f.Cartesian2(1,this._repeatCount),flowSpeed:this._speedV},source:" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }"}}),n=scene.frameState;n.scene3DOnly=!0;let r=new WebGLPlot$f.MaterialAppearance({material:i,faceForward:!1,closed:!0,frameState:n});return new WebGLPlot$f.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$f.GeometryInstance({geometry:WebGLPlot$f.GeometryPipeline.computeNormal(t)}),asynchronous:!1,modelMatrix:e,appearance:r})}_createFillGeometry(){let e=WebGLPlot$f.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),t=WebGLPlot$f.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z);this._linkLength=WebGLPlot$f.Cartesian3.distance(e,t);let i=this._linkLength,n=this._topRadius,r=this._bottomRadius,o=this._sectionSlices,a=[],s=[],l=WebGLPlot$f.CesiumMath.toRadians(360/o);for(let e=0;e<o;e++){let t=l*e;const o=Math.cos(t)*n,u=Math.sin(t)*n;a.push(new WebGLPlot$f.Cartesian3(0,o,u));const c=Math.cos(t)*r,h=Math.sin(t)*r;s.push(new WebGLPlot$f.Cartesian3(i,c,h))}let u=[],c=s.length;u=a.concat(s);let h=this._ptsTransform([u]),d=WebGLPlot$f.BoundingSphere.fromVertices(h),f=new Array(2*c*3),p=0;for(let e=0;e<c-1;e++)f[p++]=e,f[p++]=e+1,f[p++]=c+e,f[p++]=e+1,f[p++]=c+(e+1),f[p++]=c+e;f[p++]=c-1,f[p++]=0,f[p++]=2*c-1,f[p++]=0,f[p++]=c,f[p++]=2*c-1;let _=new Uint16Array(f),m=new WebGLPlot$f.GeometryAttributes;m.position=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(h)});let g=0,x=2*u.length,v=new Array(x);for(let e=0;e<u.length;e++){let t=e,i=0;e>=c&&(t=e-c,i=1),v[g++]=1*t/c,v[g++]=i}return m.st=new WebGLPlot$f.GeometryAttribute({componentDatatype:WebGLPlot$f.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(v)}),new WebGLPlot$f.Geometry({attributes:m,indices:_,primitiveType:WebGLPlot$f.PrimitiveType.TRIANGLES,boundingSphere:d})}_ptsTransform(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}}const _0x399a34=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x31c5e2=_0x399a34(void 0,(function(){return _0x31c5e2.toString().search("(((.+)+)+)+$").toString().constructor(_0x31c5e2).search("(((.+)+)+)+$")}));_0x31c5e2();class _0x115b1a extends _0x1eb387{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._linkType=_0x4fea45.METEORLINE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="MeteorCommunicationLink_"+WebGLPlot$f.createGuid(),this._color=WebGLPlot$f.defaultValue(e.color,new WebGLPlot$f.Color(1,1,.3,.8)),this._speedV=WebGLPlot$f.defaultValue(e.speedV,1),this._percent=WebGLPlot$f.defaultValue(e.percent,.1),this._gradient=WebGLPlot$f.defaultValue(e.gradient,.01),this._lineWidth=WebGLPlot$f.defaultValue(e.lineWidth,1),this._linkPrimitive=void 0,this._polylineCollection=void 0}getColor(){return this._color}setColor(e){this._color=e}getSpeedV(){return this._speedV}setSpeedV(e){this._speedV=e}getPercent(){return this._percent}setPercent(e){this._percent=e}getGradient(){return this._gradient}setGradient(e){this._gradient=e}getLineWidth(){return this._lineWidth}setLineWidth(e){this._lineWidth=e}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x2887b9.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$f.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x2887b9.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$f.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$f.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x3f9f2a.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$f.defined(t)&&(this._pntStart=_0x2887b9.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x3f9f2a.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$f.defined(i)&&(this._pntEnd=_0x2887b9.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$f.defined(this._pntStart)||!WebGLPlot$f.defined(this._pntEnd))return!1;let n=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z],r=new WebGLPlot$f.Material({fabric:{type:"MeteorLine",uniforms:{color:this._color,speedV:this._speedV,percent:this._percent,gradient:this._gradient},source:"\n uniform vec4 color;\n uniform float speedV;\n uniform float percent;\n uniform float gradient;\n \n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float t =fract(czm_frameNumber * speedV / 1000.0);\n t *= (1.0 + percent);\n float alpha = smoothstep(t- percent, t, st.s) * step(-t, -st.s);\n \n if(alpha < 1.0 && alpha > 0.0){\n material.diffuse = color.rgb;\n alpha = alpha * (pow(2.0, alpha * 5.0) / pow(2.0, 5.0));\n }else{\n material.diffuse = color.rgb;\n }\n alpha += gradient;\n material.alpha = alpha;\n \n return material;\n }\n "}});this._polylineCollection=new WebGLPlot$f.PolylineCollection,this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(n),width:this._lineWidth,material:r});let o=!1;return WebGLPlot$f.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),o=!0),o}_removeEffectFromScene(e){WebGLPlot$f.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("color")||(e.color=this._color),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("percent")||(e.percent=this._percent),e.hasOwnProperty("gradient")||(e.gradient=this._gradient),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$f.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$f.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$f.defined(t.color)&&(this._color=t.color),WebGLPlot$f.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$f.defined(t.percent)&&(this._percent=t.percent),WebGLPlot$f.defined(t.gradient)&&(this._gradient=t.gradient),WebGLPlot$f.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.startOffset)&&(WebGLPlot$f.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$f.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$f.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$f.defined(t.endOffset)&&(WebGLPlot$f.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$f.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$f.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x115b1a;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x11ff81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x11ff81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._color=WebGLPlot$f.Color.clone(this._color),e._speedV=this._speedV,e._percent=this._percent,e._gradient=this._gradient,e._wide=this._wide,e}}const _0x5e83f6=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x20929a=_0x5e83f6(void 0,(function(){return _0x20929a.toString().search("(((.+)+)+)+$").toString().constructor(_0x20929a).search("(((.+)+)+)+$")}));_0x20929a();class _0x5df5f1 extends _0x1eb387{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._linkType=_0x4fea45.DASHLINE,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="DashLineCommunicationLink"+WebGLPlot$f.createGuid(),this._speedV=WebGLPlot$f.defaultValue(e.speedV,5),this._lineWidth=WebGLPlot$f.defaultValue(e.lineWidth,1),this._dashLength=WebGLPlot$f.defaultValue(e.dashLength,30),this._dashPattern=WebGLPlot$f.defaultValue(e.dashPattern,255),this._signalColor=WebGLPlot$f.defaultValue(e.signalColor,new WebGLPlot$f.Color(1,0,0,1)),this._gapColor=WebGLPlot$f.defaultValue(e.gapColor,new WebGLPlot$f.Color(0,0,0,0)),this._polylineCollection=void 0,this._linkPrimitive=void 0}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0x2887b9.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$f.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$f.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0x2887b9.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$f.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$f.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x3f9f2a.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$f.defined(t)&&(this._pntStart=_0x2887b9.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x3f9f2a.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$f.defined(i)&&(this._pntEnd=_0x2887b9.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$f.defined(this._pntStart)||!WebGLPlot$f.defined(this._pntEnd))return!1;let n=new Cesium.Material({fabric:{type:"MyDashLineMaterial",uniforms:{color:this._signalColor,gapColor:this._gapColor,dashLength:this._dashLength,dashPattern:this._dashPattern,speedV:this._speedV},source:"uniform vec4 gapColor;\n uniform float dashLength;\n uniform float dashPattern;\n uniform float xy;\n varying float v_polylineAngle;\n \n const float maskLength = 16.0;\n \n mat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(\n c, s,\n -s, c\n );\n }\n \n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n \n // Get the relative position within the dash from 0 to 1\n float dashPosition = fract(pos.x/ (dashLength * czm_pixelRatio) + czm_frameNumber * 0.01 * speedV);\n // Figure out the mask index.\n float maskIndex = floor(dashPosition * maskLength);\n // Test the bit mask.\n float maskTest = floor((dashPattern) / pow(2.0, maskIndex));\n vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\n if (fragColor.a < 0.005) { // matches 0/255 and 1/255\n discard;\n }\n \n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n }"},translucent:!0});this._polylineCollection=new WebGLPlot$f.PolylineCollection;let r=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$f.Cartesian3.fromDegreesArrayHeights(r),width:this._lineWidth,material:n});let o=!1;return WebGLPlot$f.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),o=!0),o}_removeEffectFromScene(e){WebGLPlot$f.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("dashLength")||(e.dashLength=this._dashLength),e.hasOwnProperty("dashPattern")||(e.dashPattern=this._dashPattern),e.hasOwnProperty("signalColor")||(e.signalColor=this._signalColor.toCssColorString()),e.hasOwnProperty("gapColor")||(e.gapColor=this._gapColor.toCssColorString()),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$f.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$f.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$f.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$f.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$f.defined(t.dashLength)&&(this._dashLength=t.dashLength),WebGLPlot$f.defined(t.dashPattern)&&(this._dashPattern=t.dashPattern),WebGLPlot$f.defined(t.signalColor)&&(this._signalColor=WebGLPlot$f.Color.fromCssColorString(t.signalColor)),WebGLPlot$f.defined(t.gapColor)&&(this._gapColor=WebGLPlot$f.Color.fromCssColorString(t.gapColor)),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.startOffset)&&(WebGLPlot$f.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$f.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$f.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$f.defined(t.endOffset)&&(WebGLPlot$f.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$f.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$f.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x5df5f1;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x11ff81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x11ff81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._dashLength=this._dashLength,e._dashPattern=this._dashPattern,e._signalColor=WebGLPlot$f.Color.clone(this._signalColor),e._gapColor=WebGLPlot$f.Color.clone(this._gapColor),e}setSpeedV(e){this._speedV=e}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setDashLength(e){this._dashLength=e,this._initialized=!1}getDashLength(){return this._dashLength}setDashPattern(e){this._dashPattern=e,this._initialized=!1}getDashPattern(){return this._dashPattern}setSignalColor(e){this._signalColor=e,this._initialized=!1}getSignalColor(){return this._signalColor}setGapColor(e){this._gapColor=e,this._initialized=!1}getGapColor(){return this._gapColor}}const _0x1814f5=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2c0d65=_0x1814f5(void 0,(function(){return _0x2c0d65.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c0d65).search("(((.+)+)+)+$")}));_0x2c0d65();class _0x6508a2{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._shadows=WebGLPlot$f.defaultValue(e.shadows,WebGLPlot$f.ShadowMode.DISABLED),this._isFill=WebGLPlot$f.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$f.defaultValue(e.fillColor,new WebGLPlot$f.Color(1,1,0,.5)),this._isOutline=WebGLPlot$f.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$f.defaultValue(e.outlineColor,new WebGLPlot$f.Color(1,1,0,1))}setShadows(e){this._shadows=e}getShadows(){return this._shadows}setIsFill(e){this._isFill=e}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e}getOutlineColor(){return this._outlineColor}toJSON(){let e={};return e.hasOwnProperty("shadows")||(e.shadows=this._shadows),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.shadows)&&(this._shadows=t.shadows),WebGLPlot$f.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$f.defined(t.fillColor)&&(this._fillColor=WebGLPlot$f.Color.fromCssColorString(t.fillColor)),WebGLPlot$f.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$f.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$f.Color.fromCssColorString(t.outlineColor))}clone(){let e=new _0x6508a2;return e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e}_updateScan(e){e.shadows=this._shadows,e.isFill=this._isFill,e.fillColor=this._fillColor.clone(),e.isOutline=this._isOutline,e.outlineColor=this._outlineColor.clone()}}const _0x299701=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x549995=_0x299701(void 0,(function(){return _0x549995.toString().search("(((.+)+)+)+$").toString().constructor(_0x549995).search("(((.+)+)+)+$")}));_0x549995();class _0x2ed19c extends _0x46eece{constructor(e){if(super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._type=_0x3b1c90.RADAR,this._radarType=_0x49109a.PlotCustomRadar,this._UUID=WebGLPlot$f.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._scanSpeed=WebGLPlot$f.defaultValue(e.scanSpeed,60),this._shadows=WebGLPlot$f.defaultValue(e.shadows,WebGLPlot$f.ShadowMode.DISABLED),this._isFill=WebGLPlot$f.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$f.defaultValue(e.fillColor,new WebGLPlot$f.Color(1,0,0,.3)),this._isOutline=WebGLPlot$f.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$f.defaultValue(e.outlineColor,new WebGLPlot$f.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$f.defaultValue(e.outlineWidth,1),this._isShowScan=!0,WebGLPlot$f.defined(e.arrGeoEntityEffectRadarScans))this._arrGeoEntityEffectRadarScans=e.arrGeoEntityEffectRadarScans;else{let e=[];for(let t=0;t<3;t++){let t=new _0x6508a2;e.push(t)}this._arrGeoEntityEffectRadarScans=e}}getRadarType(){return this._radarType}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setShadows(e){this._shadows=e,this._initialized=!1}getShadows(){return this._shadows}setIsFill(e){this._isFill=e,this._initialized=!1}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e,this._initialized=!1}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e,this._initialized=!1}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e,this._initialized=!1}getOutlineColor(){return this._outlineColor}setOutlineWidth(e){this._outlineWidth=e,this._initialized=!1}getOutlineWidth(){return this._outlineWidth}getGeoEntityEffectRadarScans(){return this._arrGeoEntityEffectRadarScans}setGeoEntityEffectRadarScans(e){this._arrGeoEntityEffectRadarScans=e,this._initialized=!1}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("shadows")||(e.shadows=this._shadows),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),e.hasOwnProperty("outlineWidth")||(e.outlineWidth=this._outlineWidth);let t=[];return e.hasOwnProperty("arrGeoEntityEffectRadarScans")||(e.arrGeoEntityEffectRadarScans=t,this._arrGeoEntityEffectRadarScans.forEach((e=>{t.push(e.toJSON())}))),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.type)&&(this._type=t.type),WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$f.defined(t.offset)&&(WebGLPlot$f.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$f.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$f.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$f.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$f.defined(t.shadows)&&(this._shadows=t.shadows),WebGLPlot$f.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$f.defined(t.fillColor)&&(this._fillColor=WebGLPlot$f.Color.fromCssColorString(t.fillColor)),WebGLPlot$f.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$f.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$f.Color.fromCssColorString(t.outlineColor)),WebGLPlot$f.defined(t.outlineWidth)&&(this._outlineWidth=t.outlineWidth),this._arrGeoEntityEffectRadarScans=[],t.arrGeoEntityEffectRadarScans.forEach((e=>{let t=new _0x6508a2;t.fromJSON(e),this._arrGeoEntityEffectRadarScans.push(t)}))}}const _0x11fbda=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x40fa1d=_0x11fbda(void 0,(function(){return _0x40fa1d.toString().search("(((.+)+)+)+$").toString().constructor(_0x40fa1d).search("(((.+)+)+)+$")}));_0x40fa1d();class _0x28004f extends _0x2ed19c{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._radarType=_0x49109a.PlotMechanicalRadar,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectMechanicalRadar_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$f.defaultValue(e.radius,15e4),this._mechanicalRadar=null,this._cellAngle=5,this._isShowScan=!0}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._mechanicalRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x2887b9.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._mechanicalRadar.point=t)}if(e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._mechanicalRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return null;let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=new _0x11ff81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x4e5d29.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._mechanicalRadar=new _0x2a4b84({id:this._UUID,point:t,rotate:new WebGLPlot$f.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,cellAngle:this._cellAngle,radii:new WebGLPlot$f.Cartesian3(this._radius,this._radius,this._radius),isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$f.defined(this._mechanicalRadar))return!1;let n=this._mechanicalRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._mechanicalRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$f.defined(this._mechanicalRadar)&&(this._mechanicalRadar.destroy(),this._mechanicalRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$f.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$f.defined(t.radius)&&(this._radius=t.radius)}clone(){let e=new _0x28004f;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}}const _0xc09082=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4b109b=_0xc09082(void 0,(function(){return _0x4b109b.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b109b).search("(((.+)+)+)+$")}));_0x4b109b();class _0x1c4ba4 extends _0x2ed19c{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._radarType=_0x49109a.PlotParameterRadar,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectParameterRadar_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$f.defaultValue(e.radius,15e4),this._innerRadius=WebGLPlot$f.defaultValue(e.innerRadius,5e3),this._minimumClock=WebGLPlot$f.defaultValue(e.minimumClock,0),this._maximumClock=WebGLPlot$f.defaultValue(e.maximumClock,360),this._minimumCone=WebGLPlot$f.defaultValue(e.minimumCone,0),this._maximumCone=WebGLPlot$f.defaultValue(e.maximumCone,90),this._parameterRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._parameterRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x2887b9.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._parameterRadar.point=t)}if(e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._parameterRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._innerRadius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return null;let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=new _0x11ff81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x4e5d29.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._parameterRadar=new _0x2f0d40({id:this._UUID,point:t,rotate:new WebGLPlot$f.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,radii:new WebGLPlot$f.Cartesian3(this._radius,this._radius,this._radius),innerRadii:new WebGLPlot$f.Cartesian3(this._innerRadius,this._innerRadius,this._innerRadius),minimumClock:this._minimumClock,maximumClock:this._maximumClock,minimumCone:this._minimumCone,maximumCone:this._maximumCone,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$f.defined(this._parameterRadar))return!1;let n=this._parameterRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._parameterRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$f.defined(this._parameterRadar)&&(this._parameterRadar.destroy(),this._parameterRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),t.hasOwnProperty("innerRadius")||(t.innerRadius=this._innerRadius),t.hasOwnProperty("minimumClock")||(t.minimumClock=this._minimumClock),t.hasOwnProperty("maximumClock")||(t.maximumClock=this._maximumClock),t.hasOwnProperty("minimumCone")||(t.minimumCone=this._minimumCone),t.hasOwnProperty("maximumCone")||(t.maximumCone=this._maximumCone),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$f.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$f.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$f.defined(t.innerRadius)&&(this._innerRadius=t.innerRadius),WebGLPlot$f.defined(t.minimumClock)&&(this._minimumClock=t.minimumClock),WebGLPlot$f.defined(t.maximumClock)&&(this._maximumClock=t.maximumClock),WebGLPlot$f.defined(t.minimumCone)&&(this._minimumCone=t.minimumCone),WebGLPlot$f.defined(t.maximumCone)&&(this._maximumCone=t.maximumCone)}clone(){let e=new _0x1c4ba4;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e._innerRadius=this._innerRadius,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setInnerRadius(e){this._innerRadius=e,this._initialized=!1}getInnerRadius(){return this._innerRadius}setMinimumClock(e){this._minimumClock=e,this._initialized=!1}getMinimumClock(){return this._minimumClock}setMaximumClock(e){this._maximumClock=e,this._initialized=!1}getMaximumClock(){return this._maximumClock}setMinimumCone(e){this._minimumCone=e,this._initialized=!1}getMinimumCone(){return this._minimumCone}setMaximumCone(e){this._maximumCone=e,this._initialized=!1}getMaximumCone(){return this._maximumCone}}const _0x104f66=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x7579=_0x104f66(void 0,(function(){return _0x7579.toString().search("(((.+)+)+)+$").toString().constructor(_0x7579).search("(((.+)+)+)+$")}));_0x7579();class _0x4ffa33 extends _0x2ed19c{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._radarType=_0x49109a.PlotWarningRadar,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectWarningRadar_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$f.defaultValue(e.radius,15e4),this._warningRadar=null,this._cellAngle=5}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._warningRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x2887b9.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._warningRadar.point=t)}if(e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._warningRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return null;let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=new _0x11ff81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x4e5d29.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._warningRadar=new _0x5e75e0({id:this._UUID,point:t,rotate:new WebGLPlot$f.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,cellAngle:this._cellAngle,radii:new WebGLPlot$f.Cartesian3(this._radius,this._radius,this._radius),isFill:this._isFill,fillColor:this._fillColor.clone(),isOutline:this._isOutline,outlineColor:this._outlineColor.clone(),outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$f.defined(this._warningRadar))return!1;let n=this._warningRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._warningRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$f.defined(this._warningRadar)&&(this._warningRadar.destroy(),this._warningRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$f.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$f.defined(t.radius)&&(this._radius=t.radius)}clone(){let e=new _0x4ffa33;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}}const _0x417ea7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1274b4=_0x417ea7(void 0,(function(){return _0x1274b4.toString().search("(((.+)+)+)+$").toString().constructor(_0x1274b4).search("(((.+)+)+)+$")}));_0x1274b4();class _0x504843 extends _0x2ed19c{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._radarType=_0x49109a.PlotScanRadar,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectScanRadar_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._scanSpeed=WebGLPlot$f.defaultValue(e.scanSpeed,30),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$f.defaultValue(e.radius,15e4),this._scanVAngle=WebGLPlot$f.defaultValue(e.scanVAngle,30),this._scanHAngle=WebGLPlot$f.defaultValue(e.scanHAngle,90),this._cellAngle=WebGLPlot$f.defaultValue(e.cellAngle,5),this._scanColor=WebGLPlot$f.defaultValue(e.scanColor,new WebGLPlot$f.Color(1,0,0,.3)),this._scanedColor=WebGLPlot$f.defaultValue(e.scanedColor,new WebGLPlot$f.Color(0,1,0,.3)),this._scanRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._scanRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x2887b9.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._scanRadar.point=t)}if(e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._scanRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return null;let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=new _0x11ff81(0,0,0);return this._geoEntityParameter.getShowMode()==_0x4e5d29.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._scanRadar=new _0x5d6ff7({id:this._UUID,point:t,rotate:new WebGLPlot$f.Cartesian3(i.x,i.y,i.z-45),scale:this._radius,dScanSpeed:this._scanSpeed,shadows:this._shadows,scanVAngle:this._scanVAngle,scanHAngle:this._scanHAngle,cellAngle:this._cellAngle,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanColor:this._scanColor,scanedColor:this._scanedColor,show:!0},e),!!WebGLPlot$f.defined(this._scanRadar)}_removeEffectFromScene(e){WebGLPlot$f.defined(this._scanRadar)&&(this._scanRadar.destroy(),this._scanRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),t.hasOwnProperty("scanVAngle")||(t.scanVAngle=this._scanVAngle),t.hasOwnProperty("scanHAngle")||(t.scanHAngle=this._scanHAngle),t.hasOwnProperty("cellAngle")||(t.cellAngle=this._cellAngle),t.hasOwnProperty("scanColor")||(t.scanColor=this._scanColor.toCssColorString()),t.hasOwnProperty("scanedColor")||(t.scanedColor=this._scanedColor.toCssColorString()),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$f.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$f.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$f.defined(t.scanVAngle)&&(this._scanVAngle=t.scanVAngle),WebGLPlot$f.defined(t.scanHAngle)&&(this._scanHAngle=t.scanHAngle),WebGLPlot$f.defined(t.cellAngle)&&(this._cellAngle=t.cellAngle),WebGLPlot$f.defined(t.scanColor)&&(this._scanColor=WebGLPlot$f.Color.fromCssColorString(t.scanColor)),WebGLPlot$f.defined(t.scanedColor)&&(this._scanedColor=WebGLPlot$f.Color.fromCssColorString(t.scanedColor))}clone(){let e=new _0x504843;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e._scanVAngle=this._scanVAngle,e._scanHAngle=this._scanHAngle,e._cellAngle=this._cellAngle,e._scanColor=this._scanColor.clone(),e._scanedColor=this._scanedColor.clone(),e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanVAngle(e){this._scanVAngle=e}getScanVAngle(){return this._scanVAngle}setScanHAngle(e){this._scanHAngle=e}getScanHAngle(){return this._scanHAngle}setCellAngle(e){this._cellAngle=e}getCellAngle(){return this._cellAngle}setScanColor(e){this._scanColor=e}getScanColor(){return this._scanColor}setScanedColor(e){this._scanedColor=e}getScanedColor(){return this._scanedColor}}const _0x5d789f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x10b944=_0x5d789f(void 0,(function(){return _0x10b944.toString().search("(((.+)+)+)+$").toString().constructor(_0x10b944).search("(((.+)+)+)+$")}));_0x10b944();class _0x2c9b58 extends _0x2ed19c{constructor(e){super(e),e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._radarType=_0x49109a.PlotRotateRadar,this._name=WebGLPlot$f.defaultValue(e.name,_0x3f9f2a.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectRotateRadar_"+WebGLPlot$f.createGuid(),this._pntOffset=WebGLPlot$f.defaultValue(e.pntOffset,new _0x11ff81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$f.defaultValue(e.bChangeSizeFlowModel,!0);var t=[new WebGLPlot$f.Cartesian3(0,2e3,0),new WebGLPlot$f.Cartesian3(2e4,8e3,0),new WebGLPlot$f.Cartesian3(4e4,2e3,0),new WebGLPlot$f.Cartesian3(0,2e3,0)];this._customPts=WebGLPlot$f.defaultValue(e.customPts,t),this._customAngle=WebGLPlot$f.defaultValue(e.customAngle,360),this._rotateRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$f.defined(this._rotateRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0x2887b9.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$f.defined(t)&&(this._rotateRadar.point=t)}if(e.getShowMode()==_0x4e5d29.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._rotateRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x4e5d29.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._rotateRadar.scale*=t}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$f.defined(this._geoEntityParameter)||!WebGLPlot$f.defined(this._pntOffset))return null;let t=_0x2887b9.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$f.defined(t))return null;let i=new _0x11ff81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x4e5d29.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._rotateRadar=new _0x467388({id:this._UUID,point:t,rotate:new WebGLPlot$f.Cartesian3(i.x,i.y,i.z-45),dScanSpeed:this._scanSpeed,shadows:this._shadows,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,customPts:this._customPts,rotateAngle:this._customAngle,slicePartitions:this._customAngle/5,show:!0},e),!WebGLPlot$f.defined(this._rotateRadar))return!1;this._rotateRadar.scale=this._geoEntityParameter.getModelScale();let n=this._rotateRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._rotateRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$f.defined(this._rotateRadar)&&(this._rotateRadar.destroy(),this._rotateRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("customAngle")||(t.customAngle=this._customAngle);return t.hasOwnProperty("customPts")||(t.customPts=[]),this._customPts.forEach((e=>{t.customPts.push({x:e.x,y:e.y,z:e.z})})),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$f.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$f.defined(t.customAngle)&&(this._customAngle=t.customAngle),WebGLPlot$f.defined(t.customPts)&&(this._customPts=[],t.customPts.forEach((e=>{this._customPts.push(new WebGLPlot$f.Cartesian3(e.x,e.y,e.z))})))}clone(){let e=new _0x2c9b58;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x11ff81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._customAngle=this._customAngle,e._customPts=[],this._customPts.forEach((t=>{e._customPts.push(new WebGLPlot$f.Cartesian3(t.x,t.y,t.z))})),e}}const _0x27b8b4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x24b850=_0x27b8b4(void 0,(function(){return _0x24b850.toString().search("(((.+)+)+)+$").toString().constructor(_0x24b850).search("(((.+)+)+)+$")}));_0x24b850();class _0x3f9f2a{constructor(){}static createGeoEntityEffectFromJson(e){let t,i,n,r,o=JSON.parse(e);return WebGLPlot$f.defined(o.type)&&(i=o.type,o.type===_0x3b1c90.COMMUNICATIONLINK?WebGLPlot$f.defined(o.linkType)&&(n=o.linkType):o.type===_0x3b1c90.RADAR&&WebGLPlot$f.defined(o.radarType)&&(r=o.radarType),t=this.createGeoEntityEffectFromType({effectType:i,linkType:n,radarType:r}),WebGLPlot$f.defined(t)&&t.fromJSON(e)),t}static createGeoEntityEffectFromType(e){let t,i=(e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT)).effectType,n=e.linkType,r=e.radarType;switch(i){case _0x3b1c90.WAKE:case _0x3b1c90.ROTORWASH:break;case _0x3b1c90.FIRESMOKE:t=new _0x302fab;break;case _0x3b1c90.BURST:t=new _0x318fc4;break;case _0x3b1c90.TAILFLAME:t=new _0x3c13c7;break;case _0x3b1c90.TAILGAS:t=new _0x1914c9;break;case _0x3b1c90.RADAR:switch(r){case _0x49109a.PlotMechanicalRadar:t=new _0x28004f;break;case _0x49109a.PlotParameterRadar:t=new _0x1c4ba4;break;case _0x49109a.PlotWarningRadar:t=new _0x4ffa33;break;case _0x49109a.PlotScanRadar:t=new _0x504843;break;case _0x49109a.PlotRotateRadar:t=new _0x2c9b58}break;case _0x3b1c90.SCANWAVE:t=new _0x3fbded;break;case _0x3b1c90.SCANCONE:t=new _0x5433aa;break;case _0x3b1c90.DETECTIONCONE:t=new _0x1232ba;break;case _0x3b1c90.TRACKLINE:t=new _0x21af16;break;case _0x3b1c90.ATTACKLINE:t=new _0x2c1685;break;case _0x3b1c90.SIGN:t=new _0x137383;break;case _0x3b1c90.COMMUNICATIONLINK:switch(n){case _0x4fea45.BASICLINE:t=new _0xc54aac;break;case _0x4fea45.ARROW:t=new _0x412cba;break;case _0x4fea45.TUBULAR:t=new _0x592290;break;case _0x4fea45.METEORLINE:t=new _0x115b1a;break;case _0x4fea45.DASHLINE:t=new _0x5df5f1}break;case _0x3b1c90.DYNAMICMODEL:t=new _0x4d608c;break;case _0x3b1c90.TEXT:break;case _0x3b1c90.EXTENDACTION:t=new _0xfa8fd4;break;case _0x3b1c90.AUGMENT:t=new _0x457e81;break;case _0x3b1c90.ANNULARDIFFUSION:t=new _0x367e91}return t}static linkToAnotherGeoEntity(e,t,i){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t))return!1;let n=null;if(t.getStartUUID()==e?n=t.getEndUUID():t.getEndUUID()===e&&(n=t.getStartUUID()),!WebGLPlot$f.defined(n))return!1;let r=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(n);WebGLPlot$f.defined(r)||(r=_0x41dd10.getInstance().getGeoEntityManager().getGeoEntityByUUID(n)),WebGLPlot$f.defined(r)||(r=_0x41dd10.getInstance().getSatelliteEntityManager().getSatelliteEntityByUUID(n));let o=!1;return WebGLPlot$f.defined(r)&&(o=i?r._connectLinkToGeoEntity(t):r._disConnectLinkToGeoEntity(t)),o}static getGeoEntityParamByUUID(e){if(!WebGLPlot$f.defined(e))return;let t,i=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(e);return WebGLPlot$f.defined(i)||(i=_0x41dd10.getInstance().getGeoEntityManager().getGeoEntityByUUID(e)),WebGLPlot$f.defined(i)||(i=_0x41dd10.getInstance().getSatelliteEntityManager().getSatelliteEntityByUUID(e)),WebGLPlot$f.defined(i)&&(t=i.getGeoEntityParameter()),t}static getResourceURI(){return _0x41dd10.getInstance().getURI()}static getDefaultName(e){let t=(e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT)).effectType,i=e.linkType,n=e.radarType,r="";switch(t){case _0x3b1c90.WAKE:case _0x3b1c90.ROTORWASH:break;case _0x3b1c90.FIRESMOKE:r="燃烧";break;case _0x3b1c90.BURST:r="爆炸";break;case _0x3b1c90.TAILFLAME:r="尾焰";break;case _0x3b1c90.TAILGAS:r="尾气";break;case _0x3b1c90.RADAR:switch(n){case _0x49109a.PlotMechanicalRadar:r="机械雷达";break;case _0x49109a.PlotParameterRadar:r="参数雷达";break;case _0x49109a.PlotWarningRadar:r="预警雷达";break;case _0x49109a.PlotScanRadar:r="扫描雷达";break;case _0x49109a.PlotRotateRadar:r="旋转雷达"}break;case _0x3b1c90.SCANWAVE:r="扫描波";break;case _0x3b1c90.SCANCONE:r="扫描棱锥";break;case _0x3b1c90.DETECTIONCONE:r="探视锥";break;case _0x3b1c90.TRACKLINE:r="尾迹";break;case _0x3b1c90.ATTACKLINE:r="攻击线";break;case _0x3b1c90.SIGN:r="标牌";break;case _0x3b1c90.COMMUNICATIONLINK:switch(i){case _0x4fea45.BASICLINE:r="基础线";break;case _0x4fea45.ARROW:r="箭头线";break;case _0x4fea45.TUBULAR:r="管状线";break;case _0x4fea45.METEORLINE:r="流星线";break;case _0x4fea45.DASHLINE:r="间断线"}break;case _0x3b1c90.DYNAMICMODEL:r="渐变体";break;case _0x3b1c90.TEXT:r="文本";break;case _0x3b1c90.EXTENDACTION:r="扩展特效";break;case _0x3b1c90.AUGMENT:r="增强";break;case _0x3b1c90.ANNULARDIFFUSION:r="扩散圆"}return r}}const _0x5cfeb3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x274d2a=_0x5cfeb3(void 0,(function(){return _0x274d2a.toString().search("(((.+)+)+)+$").toString().constructor(_0x274d2a).search("(((.+)+)+)+$")}));_0x274d2a();class _0x5589fe{constructor(e){this._geoGraphicObject=e,this._name="",this._geoEntityEffects=[];let t=this;this._getScene().preUpdate.addEventListener((function(){let e=t.getGeoEntityParameter();if(e.getIsDistanceChangeMode()){let i=_0x2887b9.calcCameraDistance(e.getPosition(),t._getScene());i>e.getChangeModeDistance()&&e.getShowMode()!==_0x4e5d29.Picture?e.setShowMode(_0x4e5d29.Picture):i<e.getChangeModeDistance()&&e.getShowMode()!==_0x4e5d29.Marker&&e.setShowMode(_0x4e5d29.Marker),t.setGeoEntityParameter(e)}})),this._isModified=!1,this._isMoveGeoEntity=!1,this._isDistanceChangeMode=!1,this._changeModeDistance=5e3}_getGeoGraphicObject(){return this._geoGraphicObject}_getScene(){return this._geoGraphicObject.layer._scene}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){this._isMoveGeoEntity||_0x41dd10.getInstance()._saveGeoEntity(!1)}destroy(){this.clearGeoEntityEffects()}clone(e){e.id=WebGLPlot$f.createGuid();let t=new _0x5589fe(e);t._name=this._name;let i=[];return this._geoEntityEffects.forEach((e=>{let t=e.clone();e.getType()!=_0x3b1c90.COMMUNICATIONLINK&&i.push(t)})),t.updateGeoEntityEffects(i),t}setName(e){this._name=e,this._isModified=!0,this._save()}getName(){return this._name}setUUID(e){this._geoGraphicObject.id=e}getUUID(){return this._geoGraphicObject.id}setGeoEntityParameter(e){WebGLPlot$f.defined(this._geoGraphicObject)&&(e.isPositionUpdate()&&(this._geoGraphicObject.localPoints=[e.getPosition()]),e.isModelScaleUpdate()&&(this._geoGraphicObject.modelScale=e.getModelScale()),e.isVectorScaleUpdate()&&(this._geoGraphicObject.vectorScale=e.getVectorScale()),e.isModelRotateUpdate()&&(this._geoGraphicObject.modelRotate=e.getModelRotate()),e.isVectorRotateUpdate()&&(this._geoGraphicObject.vectorRotate=e.getVectorRotate()),e.isModelPathUpdate()&&(this._geoGraphicObject.modelPath=e.getModelPath()),e.isVisibleUpdate()&&(this._geoGraphicObject.display=e.isVisible()),e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())):e.isDotPlotLibIDUpdate()&&!e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())):!e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()&&(this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())),e.isDotPlotStyleUpdate()&&e.getDotPlotStyle().setGeoGraphicObjectStyle(this._geoGraphicObject),e.isPictureSymbolSizeUpdate()&&(this._geoGraphicObject.pictureSymbolSize=e.getPictureSymbolSize()),e.isPicturePathUpdate()&&(this._geoGraphicObject.picturePath=e.getPicturePath()),e.isShowModeUpdate()&&this._geoGraphicObject.setGeoEntityShowMode(e.getShowMode()),e.isChangeModeDistanceUpdate()&&(this._changeModeDistance=e.getChangeModeDistance()),e.isDistanceChangeModeUpdate()&&(this._isDistanceChangeMode=e.getIsDistanceChangeMode()),this._geoEntityEffects.forEach((e=>{e.setGeoEntityParameter(this.getGeoEntityParameter(),this.getUUID())})),this._isModified=!0,this._save())}getGeoEntityParameter(){if(WebGLPlot$f.defined(this._geoGraphicObject)){let e=new _0x487d97,t=new _0x24b262;return t.getGeoGraphicObjectStyle(this._geoGraphicObject),e._initParm(this._geoGraphicObject.localPoints[0],this._geoGraphicObject.modelScale,this._geoGraphicObject.vectorScale,this._geoGraphicObject.modelRotate,this._geoGraphicObject.vectorRotate,this._geoGraphicObject.modelPath,this._geoGraphicObject.display,this._geoGraphicObject.__dotPlotLibID,this._geoGraphicObject.__dotPlotCode,t,this._geoGraphicObject.pictureSymbolSize,this._geoGraphicObject.picturePath,this._geoGraphicObject.getGeoEntityShowMode(),this._isDistanceChangeMode,this._changeModeDistance),e}}toJson(){if(WebGLPlot$f.defined(this._geoGraphicObject)){let e={},t=JSON.stringify(this._geoGraphicObject.getSymbolData());if(e.hasOwnProperty("geoGraphicObject")||(e.geoGraphicObject=t),!e.hasOwnProperty("geoEntity")){let t={};t.hasOwnProperty("name")||(t.name=this._name),t.hasOwnProperty("isDistanceChangeMode")||(t.isDistanceChangeMode=this._isDistanceChangeMode),t.hasOwnProperty("changeModeDistance")||(t.changeModeDistance=this._changeModeDistance),t.hasOwnProperty("geoEntityEffects")||(t.geoEntityEffects=[],this._geoEntityEffects.forEach((e=>{(e.getType()!=_0x3b1c90.COMMUNICATIONLINK||e.getStartUUID()===this.getUUID())&&t.geoEntityEffects.push(e.toJSON())}))),e.geoEntity=JSON.stringify(t)}return JSON.stringify(e)}return""}fromJson(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.name)&&(this._name=t.name),WebGLPlot$f.defined(t.isDistanceChangeMode)&&(this._isDistanceChangeMode=t.isDistanceChangeMode),WebGLPlot$f.defined(t.changeModeDistance)&&(this._changeModeDistance=t.changeModeDistance),WebGLPlot$f.defined(t.geoEntityEffects)&&t.geoEntityEffects.forEach((e=>{let t=_0x3f9f2a.createGeoEntityEffectFromJson(e);WebGLPlot$f.defined(t)&&(t.setGeoEntity(this),t.getType()!=_0x3b1c90.COMMUNICATIONLINK&&this.addGeoEntityEffect(t))}))}getGeoEntityEffects(){return this._geoEntityEffects}addGeoEntityEffect(e){for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID())return!1;let t=this._getScene();return WebGLPlot$f.defined(t)&&(e.setGeoEntityParameter(this.getGeoEntityParameter(),this.getUUID()),e.addEffectToScene(t)),this._geoEntityEffects.push(e),e.getType()===_0x3b1c90.COMMUNICATIONLINK&&_0x3f9f2a.linkToAnotherGeoEntity(this.getUUID(),e,!0),this._isModified=!0,this._save(),!0}removeGeoEntityEffect(e){for(let t=0;t<this._geoEntityEffects.length;t++){const i=this._geoEntityEffects[t];if(i.getUUID()===e){i.getType()===_0x3b1c90.COMMUNICATIONLINK&&_0x3f9f2a.linkToAnotherGeoEntity(this.getUUID(),i,!1);let e=this._getScene();return WebGLPlot$f.defined(e)&&i.removeEffectFromScene(e),this._geoEntityEffects.splice(t,1),!0}}return this._isModified=!0,this._save(),!1}updateGeoEntityEffects(e){for(let e=0;e<this._geoEntityEffects.length;e++){const t=this._geoEntityEffects[e];t.getType()===_0x3b1c90.COMMUNICATIONLINK&&_0x3f9f2a.linkToAnotherGeoEntity(this.getUUID(),t,!1);let i=this._getScene();WebGLPlot$f.defined(i)&&t.removeEffectFromScene(i)}this._geoEntityEffects.splice(0),e.forEach((e=>{this.addGeoEntityEffect(e)})),this._isModified=!0,this._save()}updateGeoEntityEffect(e){let t=-1;for(let i=0;i<this.geoEntityEffects.length;i++)if(this.geoEntityEffects[i].getUUID()===e.getUUID()){t=i;break}-1!==t&&(this.removeGeoEntityEffect(e.getUUID()),this.addGeoEntityEffect(e),this._isModified=!0,this._save())}clearGeoEntityEffects(){this.updateGeoEntityEffects([])}_connectLinkToGeoEntity(e){if(!WebGLPlot$f.defined(e))return!1;for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID())return!1;return this._geoEntityEffects.push(e),!0}_disConnectLinkToGeoEntity(e){if(!WebGLPlot$f.defined(e))return!1;let t=!1,i=-1;for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID()){i=t;break}return-1!=i&&(this._geoEntityEffects.splice(i,1),t=!0),t}}const _0x163d1b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x227515=_0x163d1b(void 0,(function(){return _0x227515.toString().search("(((.+)+)+)+$").toString().constructor(_0x227515).search("(((.+)+)+)+$")}));_0x227515();class _0x1fa8f7{constructor(){this._geoEntitys=new Map,this._geoEntityRootNode=new _0x1e39c8("GeoEntityRootNode",!0),this._geoEntityLayer=void 0,this._geoEntityEditControl=void 0,this._geoEntityDrawControl=void 0,this._addGeoEntitys=[],this._removeEntityUUIDs=[]}_setScene(e){this._geoEntityLayer=new _0x267b40(e,"GeoEntitys"),e.plotLayers.add(this._geoEntityLayer),this._geoEntityEditControl=new _0x5bdde1(e,this._geoEntityLayer),this._geoEntityDrawControl=new _0x1ae927(e,this._geoEntityLayer)}_getAddAndRemoveGeoEntitys(){return{add:this._addGeoEntitys,remove:this._removeEntityUUIDs}}_clearAddAndRemoveGeoEntitys(){this._addGeoEntitys.splice(0),this._removeEntityUUIDs.splice(0)}_save(){_0x41dd10.getInstance()._saveGeoEntity(!1)}_removeAllGeoEntityFromScene(){this._geoEntitys.forEach(((e,t)=>{e.clearGeoEntityEffects();let i=e._getGeoGraphicObject();WebGLPlot$f.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i)})),this._geoEntitys.clear(),this._geoEntityRootNode._clear()}addGeoEntity(e){if(WebGLPlot$f.defined(this.getGeoEntityByUUID(e.getGeoEntity().getUUID())))return"";if(this._geoEntityLayer.addFeature(e)){let t=new _0x5589fe(e);e.setGeoEntity(t);let i=t.getUUID();return this._geoEntitys.set(i,t),this._geoEntityRootNode.createGeoEntityNode(t),this._addGeoEntitys.push(t),this._save(),i}return""}addGeoEntityModel(e,t,i,n,r){let o=this;this._geoEntityLayer.createSymbol(0,99999,[t],{url:i},(function(t){t.feature.__dotPlotLibID=0,t.feature.__dotPlotCode=99998;let i=_0x41dd10.getInstance().getURI();t.feature.picturePath=i+"/iserver/mgis/situationSimulation/Picture/DafaultPicture.png",WebGLPlot$f.defined(r)&&(WebGLPlot$f.defined(r.modelScale)&&(t.feature.modelScale=r.modelScale),WebGLPlot$f.defined(r.modelRotate)&&(t.feature.modelRotate=r.modelRotate),WebGLPlot$f.defined(r.picturePath)&&(t.feature.picturePath=r.picturePath),WebGLPlot$f.defined(r.pictureSymbolSize)&&(t.feature.pictureSymbolSize=r.pictureSymbolSize),WebGLPlot$f.defined(r.plotLibID)&&WebGLPlot$f.defined(r.plotCode)&&(t.feature.__dotPlotLibID=r.plotLibID,t.feature.__dotPlotCode=r.plotCode),WebGLPlot$f.defined(r.dotPlotStyle)&&r.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$f.defined(r.vectorScale)&&(t.feature.vectorScale=r.vectorScale),WebGLPlot$f.defined(r.vectorRotate)&&(t.feature.vectorRotate=r.vectorRotate),WebGLPlot$f.defined(r.visible)&&(t.feature.display=r.visible));let a=new _0x5589fe(t.feature);t.feature.setGeoEntity(a),a.setName(e);let s=a.getUUID();o._geoEntitys.set(s,a),o._geoEntityRootNode.createGeoEntityNode(a),"function"==typeof n&&n({UUID:s}),o._addGeoEntitys.push(a),o._save()}))}addGeoEntityPicture(e,t,i,n,r){let o=this;this._geoEntityLayer.createSymbol(0,20,[t],{url:i},(function(t){t.feature.__dotPlotLibID=0,t.feature.__dotPlotCode=99998;let i=_0x41dd10.getInstance().getURI();t.feature.modelPath=i+"/iserver/mgis/situationSimulation/Model/DafaultModel.gltf",WebGLPlot$f.defined(r)&&(WebGLPlot$f.defined(r.modelScale)&&(t.feature.modelScale=r.modelScale),WebGLPlot$f.defined(r.modelRotate)&&(t.feature.modelRotate=r.modelRotate),WebGLPlot$f.defined(r.modelPath)&&(t.feature.modelPath=r.modelPath),WebGLPlot$f.defined(r.pictureSymbolSize)&&(t.feature.pictureSymbolSize=r.pictureSymbolSize),WebGLPlot$f.defined(r.plotLibID)&&WebGLPlot$f.defined(r.plotCode)&&(t.feature.__dotPlotLibID=r.plotLibID,t.feature.__dotPlotCode=r.plotCode),WebGLPlot$f.defined(r.dotPlotStyle)&&r.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$f.defined(r.vectorScale)&&(t.feature.vectorScale=r.vectorScale),WebGLPlot$f.defined(r.vectorRotate)&&(t.feature.vectorRotate=r.vectorRotate),WebGLPlot$f.defined(r.visible)&&(t.feature.display=r.visible));let a=new _0x5589fe(t.feature);t.feature.setGeoEntity(a),a.setName(e);let s=a.getUUID();o._geoEntitys.set(s,a),o._geoEntityRootNode.createGeoEntityNode(a),"function"==typeof n&&n({UUID:s}),o._addGeoEntitys.push(a),o._save()}))}addGeoEntityDotPlot(e,t,i,n,r,o){let a=this;this._geoEntityLayer.createSymbol(i,n,[t],(function(t){t.feature.__dotPlotLibID=t.feature.libID,t.feature.__dotPlotCode=t.feature.code;let i=_0x41dd10.getInstance().getURI();t.feature.modelPath=i+"/iserver/mgis/situationSimulation/Model/DafaultModel.gltf",t.feature.picturePath=i+"/iserver/mgis/situationSimulation/Picture/DafaultPicture.png",WebGLPlot$f.defined(o)&&(WebGLPlot$f.defined(o.modelScale)&&(t.feature.modelScale=o.modelScale),WebGLPlot$f.defined(o.modelRotate)&&(t.feature.modelRotate=o.modelRotate),WebGLPlot$f.defined(o.modelPath)&&(t.feature.modelPath=o.modelPath),WebGLPlot$f.defined(o.picturePath)&&(t.feature.picturePath=o.picturePath),WebGLPlot$f.defined(o.pictureSymbolSize)&&(t.feature.pictureSymbolSize=o.pictureSymbolSize),WebGLPlot$f.defined(o.dotPlotStyle)&&o.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$f.defined(o.vectorScale)&&(t.feature.vectorScale=o.vectorScale),WebGLPlot$f.defined(o.vectorRotate)&&(t.feature.vectorRotate=o.vectorRotate),WebGLPlot$f.defined(o.visible)&&(t.feature.display=o.visible));let n=new _0x5589fe(t.feature);t.feature.setGeoEntity(n),n.setName(e);let s=n.getUUID();a._geoEntitys.set(s,n),a._geoEntityRootNode.createGeoEntityNode(n),"function"==typeof r&&r({UUID:s}),a._addGeoEntitys.push(n),a._save()}))}removeGeoEntity(e){let t=this._geoEntitys.get(e);if(WebGLPlot$f.defined(t)){let i=t._getGeoGraphicObject();if(t.clearGeoEntityEffects(),WebGLPlot$f.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i))return this._geoEntityRootNode._removeGeoEntityNode(e),this._geoEntitys.delete(e),this._removeEntityUUIDs.push(e),this._save(),!0}return!1}removeAllGeoEntity(){this._geoEntitys.forEach(((e,t)=>{e.clearGeoEntityEffects();let i=e._getGeoGraphicObject();WebGLPlot$f.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i),this._removeEntityUUIDs.push(t)})),this._geoEntitys.clear(),this._geoEntityRootNode._clear(),this._save()}getGeoEntityByUUID(e){return this._geoEntitys.get(e)}isGeoEntityLayerEditable(){return!!WebGLPlot$f.defined(this._geoEntityEditControl)&&this._geoEntityEditControl.isActive()}setGeoEntityLayerEditable(e){WebGLPlot$f.defined(this._geoEntityEditControl)&&(e?this._geoEntityEditControl.activate():this._geoEntityEditControl.deactivate())}getGeoEntityRootNode(){return this._geoEntityRootNode}getGeoEntitys(){return this._geoEntitys}toJson(){let e=new Map;this._geoEntitys.forEach(((t,i)=>{e.set(t.getUUID(),t.toJson())}));let t=this._geoEntityRootNode._toJson();return{geoEntityJsons:e,geoEntityNodeJson:t}}fromJson(e,t){let i=e.geoEntityJsons,n=e.geoEntityNodeJson;if(this.removeAllGeoEntity(!1),WebGLPlot$f.defined(this._geoEntityLayer)){let e=this,n=[],r=new Map;i.forEach(((o,a)=>{if(o.length>0){let s=JSON.parse(o);WebGLPlot$f.defined(s.geoGraphicObject)&&this._geoEntityLayer.geoJsonToGeoGraphicObject(JSON.parse(s.geoGraphicObject),(function(o){if(WebGLPlot$f.defined(s.geoEntity)){let l=o.feature;if(WebGLPlot$f.defined(l)){let o=new _0x5589fe(l);l.setGeoEntity(o),o.fromJson(s.geoEntity),e._geoEntitys.set(a,o),n.push(a),"function"==typeof t&&n.length===i.size&&t({UUIDs:n}),r.set(o,s)}}}))}})),this._fromJsonLink(r)}this._geoEntityRootNode._clear(),n.length>0&&this._geoEntityRootNode._fromJson(n,this._geoEntityRootNode)}_fromJsonLink(e){e.forEach(((e,t)=>{let i=JSON.parse(e.geoEntity);WebGLPlot$f.defined(i.geoEntityEffects)&&i.geoEntityEffects.forEach((e=>{let i=_0x3f9f2a.createGeoEntityEffectFromJson(e);WebGLPlot$f.defined(i)&&i.getType()==_0x3b1c90.COMMUNICATIONLINK&&t.getUUID()===i.getStartUUID()&&t.addGeoEntityEffect(i)}))}))}}function _0x124bda(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),WebGLPlot$f.PolylineCollection.call(this,e),this._visible=WebGLPlot$f.defaultValue(e.visible,!0),this._orbitsWidth=WebGLPlot$f.defaultValue(e.orbitsWidth,1),this._orbitsColor=WebGLPlot$f.defaultValue(e.orbitsColor,new WebGLPlot$f.Color(.8,.8,.2,.39)),this._initialized=!1}(function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();var i=function(){};i.prototype=WebGLPlot$f.PolylineCollection.prototype,_0x124bda.prototype=new i,_0x124bda.prototype.constructor=_0x124bda,_0x124bda.prototype.update=function(e){!this._visible&&!this._initialized||(i.prototype.update.apply(this,Array.prototype.slice.apply(arguments)),this._initialized&&(this._initialized=!1))}})(),Object.defineProperties(_0x124bda.prototype,{visible:{get:function(){return this._visible},set:function(e){for(let t=0;t<this.length;t++)this.get(t).show=e;this._visible=e,this._initialized=!0}},orbitsWidth:{get:function(){return this._orbitsWidth},set:function(e){for(let t=0;t<this.length;t++)this.get(t).width=e;this._orbitsWidth=e,this._initialized=!0}},orbitsColor:{get:function(){return this._orbitsWidth},set:function(e){for(let t=0;t<this.length;t++)this.get(t).material=WebGLPlot$f.Material.fromType("Color",{color:e});this._orbitsColor=e,this._initialized=!0}}}),function(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));r(),"object"==typeof exports&&typeof module<"u"?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).SatelliteToolkit=t()}(void 0,(function(){var e=Math.PI,t=2*e,i=e/180,n=180/e,r=1440,o=398600.8,a=6378.135,s=60/Math.sqrt(650942.9922085947),l=a*s/60,u=1/s,c=.001082616,h=-253881e-11,d=-165597e-11,f=h/c,p=2/3;function _(e,t){for(var i=[31,e%4==0?29:28,31,30,31,30,31,31,30,31,30,31],n=Math.floor(t),r=1,o=0;n>o+i[r-1]&&r<12;)o+=i[r-1],r+=1;var a=r,s=n-o,l=24*(t-n),u=Math.floor(l);l=60*(l-u);var c=Math.floor(l);return{mon:a,day:s,hr:u,minute:c,sec:60*(l-c)}}function m(e,t,i,n,r,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;return 367*e-Math.floor(7*(e+Math.floor((t+9)/12))*.25)+Math.floor(275*t/9)+i+1721013.5+((a/6e4+o/60+r)/60+n)/24}function g(e,t,i,n,r,o,a){if(e instanceof Date){var s=e;return m(s.getUTCFullYear(),s.getUTCMonth()+1,s.getUTCDate(),s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds())}return m(e,t,i,n,r,o,a)}function x(i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b=i.e3,T=i.ee2,C=i.peo,S=i.pgho,w=i.pho,E=i.pinco,P=i.plo,A=i.se2,L=i.se3,M=i.sgh2,R=i.sgh3,O=i.sgh4,I=i.sh2,D=i.sh3,B=i.si2,N=i.si3,F=i.sl2,U=i.sl3,G=i.sl4,z=i.t,V=i.xgh2,k=i.xgh3,W=i.xgh4,H=i.xh2,q=i.xh3,j=i.xi2,Y=i.xi3,X=i.xl2,K=i.xl3,Q=i.xl4,Z=i.zmol,J=i.zmos,ee=n.init,te=n.opsmode,ie=n.ep,ne=n.inclp,re=n.nodep,oe=n.argpp,ae=n.mp;$=J+119459e-10*z,"y"===ee&&($=J),y=$+.0335*Math.sin($);var se=A*(c=.5*(g=Math.sin(y))*g-.25)+L*(h=-.5*g*Math.cos(y)),le=B*c+N*h,ue=F*c+U*h+G*g,ce=M*c+R*h+O*g,he=I*c+D*h;return $=Z+.00015835218*z,"y"===ee&&($=Z),y=$+.1098*Math.sin($),d=se+(T*(c=.5*(g=Math.sin(y))*g-.25)+b*(h=-.5*g*Math.cos(y))),_=le+(j*c+Y*h),m=ue+(X*c+K*h+Q*g),f=ce+(V*c+k*h+W*g),p=he+(H*c+q*h),"n"===ee&&(m-=P,f-=S,p-=w,ne+=_-=E,ie+=d-=C,s=Math.sin(ne),a=Math.cos(ne),ne>=.2?(oe+=f-=a*(p/=s),re+=p,ae+=m):(r=s*(u=Math.sin(re)),o=s*(l=Math.cos(re)),r+=p*l+_*a*u,o+=-p*u+_*a*l,(re%=t)<0&&"a"===te&&(re+=t),x=ae+oe+a*re,x+=m+f-_*re*s,v=re,(re=Math.atan2(r,o))<0&&"a"===te&&(re+=t),Math.abs(v-re)>e&&(re<v?re+=t:re-=t),oe=x-(ae+=m)-a*re)),{ep:ie,inclp:ne,nodep:re,argpp:oe,mp:ae}}function v(e){var n=(e-2451545)/36525,r=-62e-7*n*n*n+.093104*n*n+3164400184.812866*n+67310.54841;return(r=r*i/240%t)<0&&(r+=t),r}function y(){return(arguments.length<=0?void 0:arguments[0])instanceof Date||arguments.length>1?v(g.apply(void 0,arguments)):v.apply(void 0,arguments)}function $(i,n){var r,o,u,c,h,d,_,m,g,v,y,$,b,T,C,S,w,E,P,A,L,M,R,O,I,D;i.t=n,i.error=0;var B=i.mo+i.mdot*i.t,N=i.argpo+i.argpdot*i.t,F=i.nodeo+i.nodedot*i.t;m=N,A=B;var U=i.t*i.t;if(M=F+i.nodecf*U,S=1-i.cc1*i.t,w=i.bstar*i.cc4*i.t,E=i.t2cof*U,1!==i.isimp){d=i.omgcof*i.t;var G=1+i.eta*Math.cos(B);A=B+(C=d+i.xmcof*(G*G*G-i.delmo)),m=N-C,$=(y=U*i.t)*i.t,S=S-i.d2*U-i.d3*y-i.d4*$,w+=i.bstar*i.cc5*(Math.sin(A)-i.sinmao),E=E+i.t3cof*y+$*(i.t4cof+i.t*i.t5cof)}L=i.no;var z=i.ecco;if(P=i.inclo,"d"===i.method){b=i.t;var V=function(e){var i,n,r,o,a,s,l,u,c=e.irez,h=e.d2201,d=e.d2211,f=e.d3210,p=e.d3222,_=e.d4410,m=e.d4422,g=e.d5220,x=e.d5232,v=e.d5421,y=e.d5433,$=e.dedt,b=e.del1,T=e.del2,C=e.del3,S=e.didt,w=e.dmdt,E=e.dnodt,P=e.domdt,A=e.argpo,L=e.argpdot,M=e.t,R=e.tc,O=e.gsto,I=e.xfact,D=e.xlamo,B=e.no,N=e.atime,F=e.em,U=e.argpm,G=e.inclm,z=e.xli,V=e.mm,k=e.xni,W=e.nodem,H=e.nm,q=.13130908,j=2.8843198,Y=.37448087,X=5.7686396,K=.95240898,Q=1.8014998,Z=1.050833,J=4.4108898,ee=259200,te=0,ie=0,ne=(O+.0043752690880113*R)%t;if(F+=$*M,G+=S*M,U+=P*M,W+=E*M,V+=w*M,0!==c){(0===N||M*N<=0||Math.abs(M)<Math.abs(N))&&(N=0,k=B,z=D),i=M>0?720:-720;for(var re=381;381===re;)2!==c?(l=b*Math.sin(z-q)+T*Math.sin(2*(z-j))+C*Math.sin(3*(z-Y)),a=k+I,s=b*Math.cos(z-q)+2*T*Math.cos(2*(z-j))+3*C*Math.cos(3*(z-Y)),s*=a):(r=(u=A+L*N)+u,n=z+z,l=h*Math.sin(r+z-X)+d*Math.sin(z-X)+f*Math.sin(u+z-K)+p*Math.sin(-u+z-K)+_*Math.sin(r+n-Q)+m*Math.sin(n-Q)+g*Math.sin(u+z-Z)+x*Math.sin(-u+z-Z)+v*Math.sin(u+n-J)+y*Math.sin(-u+n-J),a=k+I,s=h*Math.cos(r+z-X)+d*Math.cos(z-X)+f*Math.cos(u+z-K)+p*Math.cos(-u+z-K)+g*Math.cos(u+z-Z)+x*Math.cos(-u+z-Z)+2*(_*Math.cos(r+n-Q)+m*Math.cos(n-Q)+v*Math.cos(u+n-J)+y*Math.cos(-u+n-J)),s*=a),Math.abs(M-N)>=720?re=381:(ie=M-N,re=0),381===re&&(z+=a*i+l*ee,k+=l*i+s*ee,N+=i);H=k+l*ie+s*ie*ie*.5,o=z+a*ie+l*ie*ie*.5,1!==c?(V=o-2*W+2*ne,te=H-B):(V=o-W-U+ne,te=H-B),H=B+te}return{atime:N,em:F,argpm:U,inclm:G,xli:z,mm:V,xni:k,nodem:W,dndt:te,nm:H}}({irez:i.irez,d2201:i.d2201,d2211:i.d2211,d3210:i.d3210,d3222:i.d3222,d4410:i.d4410,d4422:i.d4422,d5220:i.d5220,d5232:i.d5232,d5421:i.d5421,d5433:i.d5433,dedt:i.dedt,del1:i.del1,del2:i.del2,del3:i.del3,didt:i.didt,dmdt:i.dmdt,dnodt:i.dnodt,domdt:i.domdt,argpo:i.argpo,argpdot:i.argpdot,t:i.t,tc:b,gsto:i.gsto,xfact:i.xfact,xlamo:i.xlamo,no:i.no,atime:i.atime,em:z,argpm:m,inclm:P,xli:i.xli,mm:A,xni:i.xni,nodem:M,nm:L});z=V.em,m=V.argpm,P=V.inclm,A=V.mm,M=V.nodem,L=V.nm}if(L<=0)return i.error=2,[!1,!1];var k=Math.pow(s/L,p)*S*S;if(L=s/Math.pow(k,1.5),(z-=w)>=1||z<-.001)return i.error=1,[!1,!1];z<1e-6&&(z=1e-6),O=(A+=i.no*E)+m+M;var W=z;if(R=P,g=m%=t,D=M%=t,I=A=((O%=t)-m-M)%t,c=Math.sin(P),u=Math.cos(P),"d"===i.method){var H=x(i,{inclo:i.inclo,init:"n",ep:W,inclp:R,nodep:D,argpp:g,mp:I,opsmode:i.operationmode});if(W=H.ep,D=H.nodep,g=H.argpp,I=H.mp,(R=H.inclp)<0&&(R=-R,D+=e,g-=e),W<0||W>1)return i.error=3,[!1,!1]}"d"===i.method&&(c=Math.sin(R),u=Math.cos(R),i.aycof=-.5*f*c,Math.abs(u+1)>15e-13?i.xlcof=-.25*f*c*(3+5*u)/(1+u):i.xlcof=-.25*f*c*(3+5*u)/15e-13);var q=W*Math.cos(g);C=1/(k*(1-W*W));var j=W*Math.sin(g)+C*i.aycof,Y=(I+g+D+C*i.xlcof*q-D)%t;_=Y,T=9999.9;for(var X=1;Math.abs(T)>=1e-12&&X<=10;)o=Math.sin(_),T=(Y-j*(r=Math.cos(_))+q*o-_)/(T=1-r*q-o*j),Math.abs(T)>=.95&&(T=T>0?.95:-.95),_+=T,X+=1;var K=q*r+j*o,Q=q*o-j*r,Z=q*q+j*j,J=k*(1-Z);if(J<0)return i.error=4,[!1,!1];var ee=k*(1-K),te=Math.sqrt(k)*Q/ee,ie=Math.sqrt(J)/ee,ne=Math.sqrt(1-Z),re=k/ee*(o-j-q*(C=Q/(1+ne))),oe=k/ee*(r-q+j*C);v=Math.atan2(re,oe);var ae=(oe+oe)*re,se=1-2*re*re,le=541308e-9*(C=1/J),ue=le*C;"d"===i.method&&(h=u*u,i.con41=3*h-1,i.x1mth2=1-h,i.x7thm1=7*h-1);var ce=ee*(1-1.5*ue*ne*i.con41)+.5*le*i.x1mth2*se;if(ce<1)return i.error=6,{position:!1,velocity:!1};v-=.25*ue*i.x7thm1*ae;var he=D+1.5*ue*u*ae,de=R+1.5*ue*u*c*se,fe=te-L*le*i.x1mth2*ae/s,pe=ie+L*le*(i.x1mth2*se+1.5*i.con41)/s,_e=Math.sin(v),me=Math.cos(v),ge=Math.sin(he),xe=Math.cos(he),ve=Math.sin(de),ye=Math.cos(de),$e=-ge*ye,be=xe*ye,Te=$e*_e+xe*me,Ce=be*_e+ge*me,Se=ve*_e;return{position:{x:ce*Te*a,y:ce*Ce*a,z:ce*Se*a},velocity:{x:(fe*Te+pe*($e*me-xe*_e))*l,y:(fe*Ce+pe*(be*me-ge*_e))*l,z:(fe*Se+pe*(ve*me))*l}}}function b(i,n){var r,o,l,h,d,_,m,g,v,b,T,C,S,w,E,P,A,L,M,R,O,I,D,B,N,F,U,G,z,V,k,W,H,q,j,Y,X,K,Q,Z,J,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he=n.opsmode,de=n.satn,fe=n.epoch,pe=n.xbstar,_e=n.xecco,me=n.xargpo,ge=n.xinclo,xe=n.xmo,ve=n.xno,ye=n.xnodeo;i.isimp=0,i.method="n",i.aycof=0,i.con41=0,i.cc1=0,i.cc4=0,i.cc5=0,i.d2=0,i.d3=0,i.d4=0,i.delmo=0,i.eta=0,i.argpdot=0,i.omgcof=0,i.sinmao=0,i.t=0,i.t2cof=0,i.t3cof=0,i.t4cof=0,i.t5cof=0,i.x1mth2=0,i.x7thm1=0,i.mdot=0,i.nodedot=0,i.xlcof=0,i.xmcof=0,i.nodecf=0,i.irez=0,i.d2201=0,i.d2211=0,i.d3210=0,i.d3222=0,i.d4410=0,i.d4422=0,i.d5220=0,i.d5232=0,i.d5421=0,i.d5433=0,i.dedt=0,i.del1=0,i.del2=0,i.del3=0,i.didt=0,i.dmdt=0,i.dnodt=0,i.domdt=0,i.e3=0,i.ee2=0,i.peo=0,i.pgho=0,i.pho=0,i.pinco=0,i.plo=0,i.se2=0,i.se3=0,i.sgh2=0,i.sgh3=0,i.sgh4=0,i.sh2=0,i.sh3=0,i.si2=0,i.si3=0,i.sl2=0,i.sl3=0,i.sl4=0,i.gsto=0,i.xfact=0,i.xgh2=0,i.xgh3=0,i.xgh4=0,i.xh2=0,i.xh3=0,i.xi2=0,i.xi3=0,i.xl2=0,i.xl3=0,i.xl4=0,i.xlamo=0,i.zmol=0,i.zmos=0,i.atime=0,i.xli=0,i.xni=0,i.bstar=pe,i.ecco=_e,i.argpo=me,i.inclo=ge,i.mo=xe,i.no=ve,i.nodeo=ye,i.operationmode=he;i.init="y",i.t=0;var $e=function(e){var i=e.ecco,n=e.epoch,r=e.inclo,o=e.opsmode,a=e.no,l=i*i,u=1-l,h=Math.sqrt(u),d=Math.cos(r),f=d*d,_=Math.pow(s/a,p),m=.75*c*(3*f-1)/(h*u),g=m/(_*_),x=_*(1-g*g-g*(1/3+134*g*g/81));a/=1+(g=m/(x*x));var v,$=Math.pow(s/a,p),b=Math.sin(r),T=$*u,C=1-5*f,S=-C-f-f,w=1/$,E=T*T,P=$*(1-i);if("a"===o){var A=n-7305,L=Math.floor(A+1e-8),M=.017202791694070362;(v=(1.7321343856509375+M*L+(M+t)*(A-L)+A*A*5075514194322695e-30)%t)<0&&(v+=t)}else v=y(n+2433281.5);return{no:a,method:"n",ainv:w,ao:$,con41:S,con42:C,cosio:d,cosio2:f,eccsq:l,omeosq:u,posq:E,rp:P,rteosq:h,sinio:b,gsto:v}}({satn:de,ecco:i.ecco,epoch:fe,inclo:i.inclo,no:i.no,method:i.method,opsmode:i.operationmode}),be=$e.ao,Te=$e.con42,Ce=$e.cosio,Se=$e.cosio2,we=$e.eccsq,Ee=$e.omeosq,Pe=$e.posq,Ae=$e.rp,Le=$e.rteosq,Me=$e.sinio;if(i.no=$e.no,i.con41=$e.con41,i.gsto=$e.gsto,i.a=Math.pow(i.no*u,-2/3),i.alta=i.a*(1+i.ecco)-1,i.altp=i.a*(1-i.ecco)-1,i.error=0,Ee>=0||i.no>=0){if(i.isimp=0,Ae<220/a+1&&(i.isimp=1),B=1.0122292801892716,L=1.880279159015271e-9,(E=(Ae-1)*a)<156){B=E-78,E<98&&(B=20);var Re=(120-B)/a;L=Re*Re*Re*Re,B=B/a+1}P=1/Pe,ee=1/(be-B),i.eta=be*i.ecco*ee,C=i.eta*i.eta,T=i.ecco*i.eta,A=Math.abs(1-C),h=(m=(_=L*Math.pow(ee,4))/Math.pow(A,3.5))*i.no*(be*(1+1.5*C+T*(4+C))+.375*c*ee/A*i.con41*(8+3*C*(8+C))),i.cc1=i.bstar*h,d=0,i.ecco>1e-4&&(d=-2*_*ee*f*i.no*Me/i.ecco),i.x1mth2=1-Se,i.cc4=2*i.no*m*be*Ee*(i.eta*(2+.5*C)+i.ecco*(.5+2*C)-c*ee/(be*A)*(-3*i.con41*(1-2*T+C*(1.5-.5*T))+.75*i.x1mth2*(2*C-T*(1+C))*Math.cos(2*i.argpo))),i.cc5=2*m*be*Ee*(1+2.75*(C+T)+T*C),g=Se*Se,Z=.5*(Q=1.5*c*P*i.no)*c*P,J=7.762359375e-7*P*P*i.no,i.mdot=i.no+.5*Q*Le*i.con41+.0625*Z*Le*(13-78*Se+137*g),i.argpdot=-.5*Q*Te+.0625*Z*(7-114*Se+395*g)+J*(3-36*Se+49*g),ie=-Q*Ce,i.nodedot=ie+(.5*Z*(4-19*Se)+2*J*(3-7*Se))*Ce,te=i.argpdot+i.nodedot,i.omgcof=i.bstar*d*Math.cos(i.argpo),i.xmcof=0,i.ecco>1e-4&&(i.xmcof=-p*_*i.bstar/T),i.nodecf=3.5*Ee*ie*i.cc1,i.t2cof=1.5*i.cc1,Math.abs(Ce+1)>15e-13?i.xlcof=-.25*f*Me*(3+5*Ce)/(1+Ce):i.xlcof=-.25*f*Me*(3+5*Ce)/15e-13,i.aycof=-.5*f*Me;var Oe=1+i.eta*Math.cos(i.mo);if(i.delmo=Oe*Oe*Oe,i.sinmao=Math.sin(i.mo),i.x7thm1=7*Se-1,2*e/i.no>=225){i.method="d",i.isimp=1,0,S=i.inclo;var Ie=function(e){var i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,v,y,$,b,T,C,S,w,E,P,A,L,M,R,O,I,D,B,N,F,U,G,z,V,k,W,H,q,j,Y,X,K,Q,Z,J,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he=e.epoch,de=e.ep,fe=e.argpp,pe=e.tc,_e=e.inclp,me=e.nodep,ge=.01675,xe=.0549,ve=e.np,ye=de,$e=Math.sin(me),be=Math.cos(me),Te=Math.sin(fe),Ce=Math.cos(fe),Se=Math.sin(_e),we=Math.cos(_e),Ee=ye*ye,Pe=1-Ee,Ae=Math.sqrt(Pe),Le=he+18261.5+pe/1440,Me=(4.523602-.00092422029*Le)%t,Re=Math.sin(Me),Oe=Math.cos(Me),Ie=.91375164-.03568096*Oe,De=Math.sqrt(1-Ie*Ie),Be=.089683511*Re/De,Ne=Math.sqrt(1-Be*Be),Fe=5.8351514+.001944368*Le,Ue=.39785416*Re/De,Ge=Ne*Oe+.91744867*Be*Re;Ue=Math.atan2(Ue,Ge),Ue+=Fe-Me;var ze=Math.cos(Ue),Ve=Math.sin(Ue);$=.1945905,b=-.98088458,S=.91744867,w=.39785416,T=be,C=$e,d=29864797e-13;for(var ke=1/ve,We=0;We<2;)ie=-6*(i=$*T+b*S*C)*(a=-Se*(l=-$*C+b*S*T)+we*(u=b*w))+Ee*(-24*(f=i*Ce+(n=we*l+Se*u)*Te)*(v=a*Ce)-6*(_=-i*Te+n*Ce)*(g=a*Te)),ne=-6*(i*(s=-Se*(c=b*C+$*S*T)+we*(h=$*w))+(r=-b*T+$*S*C)*a)+Ee*(-24*((p=r*Ce+(o=we*c+Se*h)*Te)*v+f*(y=s*Ce))+-6*(_*(x=s*Te)+(m=-r*Te+o*Ce)*g)),re=-6*r*s+Ee*(-24*p*y-6*m*x),oe=6*n*a+Ee*(24*f*g-6*_*v),ae=6*(o*a+n*s)+Ee*(24*(p*g+f*x)-6*(m*v+_*y)),se=6*o*s+Ee*(24*p*x-6*m*y),J=(J=3*(i*i+n*n)+(le=12*f*f-3*_*_)*Ee)+J+Pe*le,ee=(ee=6*(i*r+n*o)+(ue=24*f*p-6*_*m)*Ee)+ee+Pe*ue,te=(te=3*(r*r+o*o)+(ce=12*p*p-3*m*m)*Ee)+te+Pe*ce,j=-.5*(Y=d*ke)/Ae,q=-15*ye*(X=Y*Ae),K=f*_+p*m,Q=p*_+f*m,Z=p*m-f*_,1===(We+=1)&&(E=q,P=j,A=Y,L=X,M=K,R=Q,O=Z,I=J,D=ee,B=te,N=ie,F=ne,U=re,G=oe,z=ae,V=se,k=le,W=ue,H=ce,$=ze,b=Ve,S=Ie,w=De,T=Ne*be+Be*$e,C=$e*Ne-be*Be,d=4.7968065e-7);return{snodm:$e,cnodm:be,sinim:Se,cosim:we,sinomm:Te,cosomm:Ce,day:Le,e3:2*q*Z,ee2:2*q*Q,em:ye,emsq:Ee,gam:Fe,peo:0,pgho:0,pho:0,pinco:0,plo:0,rtemsq:Ae,se2:2*E*R,se3:2*E*O,sgh2:2*L*W,sgh3:2*L*(H-k),sgh4:-18*L*ge,sh2:-2*P*z,sh3:-2*P*(V-G),si2:2*P*F,si3:2*P*(U-N),sl2:-2*A*D,sl3:-2*A*(B-I),sl4:-2*A*(-21-9*Ee)*ge,s1:q,s2:j,s3:Y,s4:X,s5:K,s6:Q,s7:Z,ss1:E,ss2:P,ss3:A,ss4:L,ss5:M,ss6:R,ss7:O,sz1:I,sz2:D,sz3:B,sz11:N,sz12:F,sz13:U,sz21:G,sz22:z,sz23:V,sz31:k,sz32:W,sz33:H,xgh2:2*X*ue,xgh3:2*X*(ce-le),xgh4:-18*X*xe,xh2:-2*j*ae,xh3:-2*j*(se-oe),xi2:2*j*ne,xi3:2*j*(re-ie),xl2:-2*Y*ee,xl3:-2*Y*(te-J),xl4:-2*Y*(-21-9*Ee)*xe,nm:ve,z1:J,z2:ee,z3:te,z11:ie,z12:ne,z13:re,z21:oe,z22:ae,z23:se,z31:le,z32:ue,z33:ce,zmol:(.2299715*Le-Fe+4.7199672)%t,zmos:(6.2565837+.017201977*Le)%t}}({epoch:fe,ep:i.ecco,argpp:i.argpo,tc:0,inclp:i.inclo,nodep:i.nodeo,np:i.no,e3:i.e3,ee2:i.ee2,peo:i.peo,pgho:i.pgho,pho:i.pho,pinco:i.pinco,plo:i.plo,se2:i.se2,se3:i.se3,sgh2:i.sgh2,sgh3:i.sgh3,sgh4:i.sgh4,sh2:i.sh2,sh3:i.sh3,si2:i.si2,si3:i.si3,sl2:i.sl2,sl3:i.sl3,sl4:i.sl4,xgh2:i.xgh2,xgh3:i.xgh3,xgh4:i.xgh4,xh2:i.xh2,xh3:i.xh3,xi2:i.xi2,xi3:i.xi3,xl2:i.xl2,xl3:i.xl3,xl4:i.xl4,zmol:i.zmol,zmos:i.zmos});i.e3=Ie.e3,i.ee2=Ie.ee2,i.peo=Ie.peo,i.pgho=Ie.pgho,i.pho=Ie.pho,i.pinco=Ie.pinco,i.plo=Ie.plo,i.se2=Ie.se2,i.se3=Ie.se3,i.sgh2=Ie.sgh2,i.sgh3=Ie.sgh3,i.sgh4=Ie.sgh4,i.sh2=Ie.sh2,i.sh3=Ie.sh3,i.si2=Ie.si2,i.si3=Ie.si3,i.sl2=Ie.sl2,i.sl3=Ie.sl3,i.sl4=Ie.sl4,o=Ie.sinim,r=Ie.cosim,v=Ie.em,b=Ie.emsq,M=Ie.s1,R=Ie.s2,O=Ie.s3,I=Ie.s4,D=Ie.s5,N=Ie.ss1,F=Ie.ss2,U=Ie.ss3,G=Ie.ss4,z=Ie.ss5,V=Ie.sz1,k=Ie.sz3,W=Ie.sz11,H=Ie.sz13,q=Ie.sz21,j=Ie.sz23,Y=Ie.sz31,X=Ie.sz33,i.xgh2=Ie.xgh2,i.xgh3=Ie.xgh3,i.xgh4=Ie.xgh4,i.xh2=Ie.xh2,i.xh3=Ie.xh3,i.xi2=Ie.xi2,i.xi3=Ie.xi3,i.xl2=Ie.xl2,i.xl3=Ie.xl3,i.xl4=Ie.xl4,i.zmol=Ie.zmol,i.zmos=Ie.zmos,w=Ie.nm,ne=Ie.z1,re=Ie.z3,oe=Ie.z11,ae=Ie.z13,se=Ie.z21,le=Ie.z23,ue=Ie.z31,ce=Ie.z33;var De=x(i,{inclo:S,init:i.init,ep:i.ecco,inclp:i.inclo,nodep:i.nodeo,argpp:i.argpo,mp:i.mo,opsmode:i.operationmode});i.ecco=De.ep,i.inclo=De.inclp,i.nodeo=De.nodep,i.argpo=De.argpp,i.mo=De.mp,0,0,0;var Be=function(i){var n,r,o,a,l,u,c,h,d,f,_,m,g,x,v,y,$,b=i.cosim,T=i.argpo,C=i.s1,S=i.s2,w=i.s3,E=i.s4,P=i.s5,A=i.sinim,L=i.ss1,M=i.ss2,R=i.ss3,O=i.ss4,I=i.ss5,D=i.sz1,B=i.sz3,N=i.sz11,F=i.sz13,U=i.sz21,G=i.sz23,z=i.sz31,V=i.sz33,k=i.t,W=i.tc,H=i.gsto,q=i.mo,j=i.mdot,Y=i.no,X=i.nodeo,K=i.nodedot,Q=i.xpidot,Z=i.z1,J=i.z3,ee=i.z11,te=i.z13,ie=i.z21,ne=i.z23,re=i.z31,oe=i.z33,ae=i.ecco,se=i.eccsq,le=i.emsq,ue=i.em,ce=i.argpm,he=i.inclm,de=i.mm,fe=i.nm,pe=i.nodem,_e=i.irez,me=i.atime,ge=i.d2201,xe=i.d2211,ve=i.d3210,ye=i.d3222,$e=i.d4410,be=i.d4422,Te=i.d5220,Ce=i.d5232,Se=i.d5421,we=i.d5433,Ee=i.dedt,Pe=i.didt,Ae=i.dmdt,Le=i.dnodt,Me=i.domdt,Re=i.del1,Oe=i.del2,Ie=i.del3,De=i.xfact,Be=i.xlamo,Ne=i.xli,Fe=i.xni,Ue=.0043752690880113,Ge=.00015835218,ze=119459e-10;_e=0,fe<.0052359877&&fe>.0034906585&&(_e=1),fe>=.00826&&fe<=.00924&&ue>=.5&&(_e=2);var Ve=-ze*M*(U+G);(he<.052359877||he>e-.052359877)&&(Ve=0),0!==A&&(Ve/=A);var ke=-Ge*S*(ie+ne);(he<.052359877||he>e-.052359877)&&(ke=0),Me=O*ze*(z+V-6)-b*Ve+E*Ge*(re+oe-6),Le=Ve,0!==A&&(Me-=b/A*ke,Le+=ke/A);var We=(H+W*Ue)%t;if(ue+=(Ee=L*ze*I+C*Ge*P)*k,he+=(Pe=M*ze*(N+F)+S*Ge*(ee+te))*k,ce+=Me*k,pe+=Le*k,de+=(Ae=-ze*R*(D+B-14-6*le)-Ge*w*(Z+J-14-6*le))*k,0!==_e){if(v=Math.pow(fe/s,p),2===_e){var He=ue,qe=le;$=(ue=ae)*(le=se),ue<=.65?(o=3.616-13.247*ue+16.29*le,a=117.39*ue-19.302-228.419*le+156.591*$,l=109.7927*ue-18.9068-214.6334*le+146.5816*$,u=242.694*ue-41.122-471.094*le+313.953*$,c=841.88*ue-146.407-1629.014*le+1083.435*$,h=3017.977*ue-532.114-5740.032*le+3708.276*$):(o=331.819*ue-72.099-508.738*le+266.724*$,a=1582.851*ue-346.844-2415.925*le+1246.113*$,l=1554.908*ue-342.585-2366.899*le+1215.972*$,u=4758.686*ue-1052.797-7193.992*le+3651.957*$,c=16178.11*ue-3581.69-24462.77*le+12422.52*$,h=ue>.715?29936.92*ue-5149.66-54087.36*le+31324.56*$:1464.74-4664.75*ue+3763.64*le),ue<.7?(_=4988.61*ue-919.2277-9064.77*le+5542.21*$,d=4568.6173*ue-822.71072-8491.4146*le+5337.524*$,f=4690.25*ue-853.666-8624.77*le+5341.4*$):(_=161616.52*ue-37995.78-229838.2*le+109377.94*$,d=218913.95*ue-51752.104-309468.16*le+146349.42*$,f=170470.89*ue-40023.88-242699.48*le+115605.82*$),ge=(g=17891679e-13*(x=fe*fe*3*(v*v)))*(n=.75*(1+2*b+(y=b*b)))*(-.306-.44*(ue-.64)),xe=g*(1.5*(m=A*A))*o,ve=(g=3.7393792e-7*(x*=v))*(1.875*A*(1-2*b-3*y))*a,ye=g*(-1.875*A*(1+2*b-3*y))*l,$e=(g=2*(x*=v)*7.3636953e-9)*(35*m*n)*u,be=g*(39.375*m*m)*c,Te=(g=1.1428639e-7*(x*=v))*(9.84375*A*(m*(1-2*b-5*y)+.33333333*(4*b-2+6*y)))*h,Ce=g*(A*(4.92187512*m*(-2-4*b+10*y)+6.56250012*(1+2*b-3*y)))*f,Se=(g=2*x*2.1765803e-9)*(29.53125*A*(2-8*b+y*(8*b-12+10*y)))*d,we=g*(29.53125*A*(-2-8*b+y*(12+8*b-10*y)))*_,Be=(q+X+X-(We+We))%t,De=j+Ae+2*(K+Le-Ue)-Y,ue=He,le=qe}1===_e&&(r=1+b,Oe=2*(Re=3*fe*fe*v*v)*(n=.75*(1+b)*(1+b))*(1+le*(.8125*le-2.5))*17891679e-13,Ie=3*Re*(r*=1.875*r*r)*(1+le*(6.60937*le-6))*2.2123015e-7*v,Re=Re*(.9375*A*A*(1+3*b)-.75*(1+b))*(a=1+2*le)*21460748e-13*v,Be=(q+X+T-We)%t,De=j+Q+Ae+Me+Le-(Y+Ue)),Ne=Be,Fe=Y,me=0,fe=Y+0}return{em:ue,argpm:ce,inclm:he,mm:de,nm:fe,nodem:pe,irez:_e,atime:me,d2201:ge,d2211:xe,d3210:ve,d3222:ye,d4410:$e,d4422:be,d5220:Te,d5232:Ce,d5421:Se,d5433:we,dedt:Ee,didt:Pe,dmdt:Ae,dndt:0,dnodt:Le,domdt:Me,del1:Re,del2:Oe,del3:Ie,xfact:De,xlamo:Be,xli:Ne,xni:Fe}}({cosim:r,emsq:b,argpo:i.argpo,s1:M,s2:R,s3:O,s4:I,s5:D,sinim:o,ss1:N,ss2:F,ss3:U,ss4:G,ss5:z,sz1:V,sz3:k,sz11:W,sz13:H,sz21:q,sz23:j,sz31:Y,sz33:X,t:i.t,tc:0,gsto:i.gsto,mo:i.mo,mdot:i.mdot,no:i.no,nodeo:i.nodeo,nodedot:i.nodedot,xpidot:te,z1:ne,z3:re,z11:oe,z13:ae,z21:se,z23:le,z31:ue,z33:ce,ecco:i.ecco,eccsq:we,em:v,argpm:0,inclm:S,mm:0,nm:w,nodem:0,irez:i.irez,atime:i.atime,d2201:i.d2201,d2211:i.d2211,d3210:i.d3210,d3222:i.d3222,d4410:i.d4410,d4422:i.d4422,d5220:i.d5220,d5232:i.d5232,d5421:i.d5421,d5433:i.d5433,dedt:i.dedt,didt:i.didt,dmdt:i.dmdt,dnodt:i.dnodt,domdt:i.domdt,del1:i.del1,del2:i.del2,del3:i.del3,xfact:i.xfact,xlamo:i.xlamo,xli:i.xli,xni:i.xni});i.irez=Be.irez,i.atime=Be.atime,i.d2201=Be.d2201,i.d2211=Be.d2211,i.d3210=Be.d3210,i.d3222=Be.d3222,i.d4410=Be.d4410,i.d4422=Be.d4422,i.d5220=Be.d5220,i.d5232=Be.d5232,i.d5421=Be.d5421,i.d5433=Be.d5433,i.dedt=Be.dedt,i.didt=Be.didt,i.dmdt=Be.dmdt,i.dnodt=Be.dnodt,i.domdt=Be.domdt,i.del1=Be.del1,i.del2=Be.del2,i.del3=Be.del3,i.xfact=Be.xfact,i.xlamo=Be.xlamo,i.xli=Be.xli,i.xni=Be.xni}1!==i.isimp&&(l=i.cc1*i.cc1,i.d2=4*be*ee*l,K=i.d2*ee*i.cc1/3,i.d3=(17*be+B)*K,i.d4=.5*K*be*ee*(221*be+31*B)*i.cc1,i.t3cof=i.d2+2*l,i.t4cof=.25*(3*i.d3+i.cc1*(12*i.d2+10*l)),i.t5cof=.2*(3*i.d4+12*i.cc1*i.d3+6*i.d2*i.d2+15*l*(2*i.d2+l)))}$(i,0),i.init="n"}function T(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return C(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function S(e){return e*n}function w(e){return e*i}function E(e){var t=e.longitude,i=e.latitude,n=e.height,r=6378.137,o=.006694380004260718,a=r/Math.sqrt(1-o*(Math.sin(i)*Math.sin(i)));return{x:(a+n)*Math.cos(i)*Math.cos(t),y:(a+n)*Math.cos(i)*Math.sin(t),z:(a*(1-o)+n)*Math.sin(i)}}var P={constants:Object.freeze({__proto__:null,deg2rad:i,earthRadius:a,j2:c,j3:h,j3oj2:f,j4:d,minutesPerDay:r,mu:o,pi:e,rad2deg:n,tumin:u,twoPi:t,vkmpersec:l,x2o3:p,xke:s}),propagate:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],o=Array.prototype.slice.call(t,1),a=g.apply(void 0,T(o)),s=(a-n.jdsatepoch)*r;return $(n,s)},sgp4:$,twoline2satrec:function(t,n){var r=1440/(2*e),o=0,a={error:0};a.satnum=t.substring(2,7),a.epochyr=parseInt(t.substring(18,20),10),a.epochdays=parseFloat(t.substring(20,32)),a.ndot=parseFloat(t.substring(33,43)),a.nddot=parseFloat(".".concat(parseInt(t.substring(44,50),10),"E").concat(t.substring(50,52))),a.bstar=parseFloat("".concat(t.substring(53,54),".").concat(parseInt(t.substring(54,59),10),"E").concat(t.substring(59,61))),a.inclo=parseFloat(n.substring(8,16)),a.nodeo=parseFloat(n.substring(17,25)),a.ecco=parseFloat(".".concat(n.substring(26,33))),a.argpo=parseFloat(n.substring(34,42)),a.mo=parseFloat(n.substring(43,51)),a.no=parseFloat(n.substring(52,63)),a.nc=parseFloat(n.substring(52,63)),a.no/=r,a.inclo*=i,a.nodeo*=i,a.argpo*=i,a.mo*=i;var s=_(o=a.epochyr<57?a.epochyr+2e3:a.epochyr+1900,a.epochdays),l=s.mon,u=s.day,c=s.hr,h=s.minute,d=s.sec;return a.jdsatepoch=g(o,l,u,c,h,d),b(a,{opsmode:"i",satn:a.satnum,epoch:a.jdsatepoch-2433281.5,xbstar:a.bstar,xecco:a.ecco,xargpo:a.argpo,xinclo:a.inclo,xmo:a.mo,xno:a.no,xnodeo:a.nodeo}),a},gstime:y,jday:g,invjday:function(e,t){var i=e-2415019.5,n=i/365.25,r=1900+Math.floor(n),o=Math.floor(.25*(r-1901)),a=i-(365*(r-1900)+o)+1e-11;a<1&&(a=i-(365*((r-=1)-1900)+(o=Math.floor(.25*(r-1901)))));var s=_(r,a),l=s.mon,u=s.day,c=s.hr,h=s.minute,d=s.sec-864e-9;return t?[r,l,u,c,h,Math.floor(d)]:new Date(Date.UTC(r,l-1,u,c,h,Math.floor(d)))},dopplerFactor:function(e,t,i){var n=7292115e-11,r={x:t.x-e.x,y:t.y-e.y,z:t.z-e.z};r.w=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)+Math.pow(r.z,2));var o=i.x+n*e.y,a=i.y-n*e.x,s=i.z,l=(r.x*o+r.y*a+r.z*s)/r.w;return 1+l/299792.458*(l>=0?1:-1)},radiansToDegrees:S,degreesToRadians:w,degreesLat:function(t){if(t<-e/2||t>e/2)throw new RangeError("Latitude radians must be in range [-pi/2; pi/2].");return S(t)},degreesLong:function(t){if(t<-e||t>e)throw new RangeError("Longitude radians must be in range [-pi; pi].");return S(t)},radiansLat:function(e){if(e<-90||e>90)throw new RangeError("Latitude degrees must be in range [-90; 90].");return w(e)},radiansLong:function(e){if(e<-180||e>180)throw new RangeError("Longitude degrees must be in range [-180; 180].");return w(e)},geodeticToEcf:E,eciToGeodetic:function(i,n){for(var r=6378.137,o=Math.sqrt(i.x*i.x+i.y*i.y),a=.006694380004260718,s=Math.atan2(i.y,i.x)-n;s<-e;)s+=t;for(;s>e;)s-=t;for(var l,u=0,c=Math.atan2(i.z,Math.sqrt(i.x*i.x+i.y*i.y));u<20;)l=1/Math.sqrt(1-a*(Math.sin(c)*Math.sin(c))),c=Math.atan2(i.z+r*l*a*Math.sin(c),o),u+=1;return{longitude:s,latitude:c,height:o/Math.cos(c)-r*l}},eciToEcf:function(e,t){return{x:e.x*Math.cos(t)+e.y*Math.sin(t),y:e.x*-Math.sin(t)+e.y*Math.cos(t),z:e.z}},ecfToEci:function(e,t){return{x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t),z:e.z}},ecfToLookAngles:function(t,i){var n,r,o,a,s,l,u,c,h,d,f,p,_,m,g=(r=i,o=(n=t).longitude,a=n.latitude,s=E(n),l=r.x-s.x,u=r.y-s.y,c=r.z-s.z,{topS:Math.sin(a)*Math.cos(o)*l+Math.sin(a)*Math.sin(o)*u-Math.cos(a)*c,topE:-Math.sin(o)*l+Math.cos(o)*u,topZ:Math.cos(a)*Math.cos(o)*l+Math.cos(a)*Math.sin(o)*u+Math.sin(a)*c});return d=(h=g).topS,f=h.topE,p=h.topZ,_=Math.sqrt(d*d+f*f+p*p),m=Math.asin(p/_),{azimuth:Math.atan2(-f,d)+e,elevation:m,rangeSat:_}}};return P}));var _0x59a6dd=SatelliteToolkit;const _0x39d53b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x44f0e4=_0x39d53b(void 0,(function(){return _0x44f0e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x44f0e4).search("(((.+)+)+)+$")}));_0x44f0e4();class _0x44d1e4{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._name=WebGLPlot$f.defaultValue(e.name,void 0),this._tleLine1=WebGLPlot$f.defaultValue(e.tleLine1,void 0),this._tleLine2=WebGLPlot$f.defaultValue(e.tleLine2,void 0),this._networking=WebGLPlot$f.defaultValue(e.networking,void 0),this._mapExtendProperty=new Map,this._satrec=_0x59a6dd.twoline2satrec(this._tleLine1,this._tleLine2)}setName(e){this._name}getName(){return this._name}getUUID(){return this._name+" #"+this._satrec.satnum}setNetworking(e){this._networking=e}getNetworking(){return this._networking}getPositionEci(e){let t=null,i=_0x59a6dd.propagate(this._satrec,new Date(e)).position;return WebGLPlot$f.defined(i)&&!isNaN(i.x)&&!isNaN(i.y)&&!isNaN(i.z)&&(t=new WebGLPlot$f.Cartesian3(1e3*i.x,1e3*i.y,1e3*i.z)),t}getPositionMatrix(e){var t=new WebGLPlot$f.HeadingPitchRoll;const i=this.getPositionEci(e),n=this.getPositionEci(e+1e3),r=_0x2887b9.getHeading(i,n);r&&(t.heading=r);const o=_0x2887b9.getPitch(i,n);return o&&(t.pitch=o),WebGLPlot$f.Transforms.headingPitchRollToFixedFrame(i,t,WebGLPlot$f.Ellipsoid.WGS84,new WebGLPlot$f.Transforms.localFrameToFixedFrameGenerator("north","west"))}getOrbitPoints(e){let t=864e5/this._satrec.nc/100,i=[];for(let n=0;n<100;n++){let r=e+parseInt(n*t),o=this.getPositionEci(r);null!=o&&i.push(o)}return i.push(i[0].clone()),i}getExtendProperty(e){return this._mapExtendProperty.get(e)}setExtendProperty(e,t){this._mapExtendProperty.set(e,t)}removeExtendProperty(e){this._mapExtendProperty.delete(e)}getllExtendProperty(){return this._mapExtendProperty}removeAllExtendProperty(){this._mapExtendProperty.clear()}toGeoJson(){let e={};if(!e.hasOwnProperty("SatelliteProperty")){const e=Object.fromEntries(_mapExtendProperty);dataJSON.SatelliteProperty=e}return JSON.stringify(e)}fromGeoJson(e){let t=e.SatelliteProperty;_mapExtendProperty=new Map(Object.entries(t))}clone(){let e=new _0x44d1e4({name:this._name,tleLine1:this._tleLine1,tleLine2:this._tleLine2,networking:this._networking});return this._mapExtendProperty.forEach(((t,i)=>{e._mapExtendProperty.set(i,t)})),e}}const _0x2d0432=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1e16c8=_0x2d0432(void 0,(function(){return _0x1e16c8.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e16c8).search("(((.+)+)+)+$")}));_0x1e16c8();class _0x329fbd{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._groupName=WebGLPlot$f.defaultValue(e.groupName,""),this._modelPath=WebGLPlot$f.defaultValue(e.modelPath,""),this._modelScale=WebGLPlot$f.defaultValue(e.modelScale,1e4),this._visible=WebGLPlot$f.defaultValue(e.visible,!0),this._orbitsVisible=WebGLPlot$f.defaultValue(e.orbitsVisible,!0),this._orbitsWidth=WebGLPlot$f.defaultValue(e.orbitsWidth,1),this._orbitsColor=WebGLPlot$f.defaultValue(e.orbitsColor,new WebGLPlot$f.Color(.8,.8,.2,.39)),this._tleFilePaths=WebGLPlot$f.defaultValue(e.tleFilePaths,[]),this._scene=void 0,this._mapSatellites=new Map,this._tleInfos=[],this._lUTCtime=void 0,this._isModel=void 0,this._satelliteCollection=void 0,this._orbitsCollection=[],this._POLYLINE_ALL_COUNT=150}setScene(e){if(WebGLPlot$f.defined(e)){this._scene=e,this._scene.primitives.add(this._satelliteCollection);const t=this._orbitsCollection.length;for(let e=0;e<t;e++)this._scene.primitives.add(this._orbitsCollection[e])}}getAllSatelliteScale(){return this._modelScale}setAllSatelliteScale(e){const t=this._satelliteCollection.length;for(let i=0;i<t;i++){this._satelliteCollection.get(i).scale=e}this._modelScale=e,this._saveToScheme()}isVisible(){return this._visible}setVisible(e){this._visible=e;const t=this._satelliteCollection.length;for(let i=0;i<t;i++){this._satelliteCollection.get(i).show=e}let i=!1;this._visible&&this._orbitsVisible&&(i=!0);for(let e=0;e<this._orbitsCollection.length;e++)this._orbitsCollection[e].visible=i;this._saveToScheme()}isOrbitsVisible(){return this._orbitsVisible}setOrbitsVisible(e){this._orbitsVisible=e;let t=!1;this._visible&&this._orbitsVisible&&(t=!0);const i=this._orbitsCollection.length;for(let e=0;e<i;e++)this._orbitsCollection[e].visible=t;this._saveToScheme()}getOrbitsWidth(){return Number(this._orbitsWidth)}setOrbitsWidth(e){const t=this._orbitsCollection.length;for(let i=0;i<t;i++)this._orbitsCollection[i].orbitsWidth=e;this._orbitsWidth=e,this._saveToScheme()}getOrbitsColor(){return this._orbitsColor}setOrbitsColor(e){const t=this._orbitsCollection.length;for(let i=0;i<t;i++)this._orbitsCollection[i].orbitsColor=e;this._orbitsColor=e,this._saveToScheme()}getGroupName(){return this._groupName}getSatelliteFileNames(){let e=[];const t=this._tleInfos.length;for(let i=0;i<t;i++)e.push(this._tleInfos[i].fileName);return e}getSatellites(e){const t=this._tleInfos.length;for(let i=0;i<t;i++){const t=this._tleInfos[i];if(t.fileName===e)return t.satellites}return[]}getSatellitePos(e){let t=null;const i=this._satelliteCollection.length;for(let n=0;n<i;n++){const i=this._satelliteCollection.get(n);if(WebGLPlot$f.defined(i)&&i.id===e){t=this._isModel?_0x2887b9.getPositionFromModelMatrix(i.modelMatrix):_0x2887b9.cartesian3ToDegrees(i.position);break}}return t}getSatelliteZRotation(e){let t=new _0x11ff81(0,0,0);const i=this._satelliteCollection.length;for(let r=0;r<i;r++){const i=this._satelliteCollection.get(r);if(WebGLPlot$f.defined(i)&&i.id===e&&this._isModel){const i=this._mapSatellites.get(e);var n=new WebGLPlot$f.HeadingPitchRoll;const r=i.getPositionEci(this._lUTCtime),o=i.getPositionEci(this._lUTCtime+1e3),a=_0x2887b9.getHeading(r,o);a&&(n.heading=a);const s=_0x2887b9.getPitch(r,o);s&&(n.pitch=s),t=new _0x11ff81(WebGLPlot$f.CesiumMath.toDegrees(n.pitch),WebGLPlot$f.CesiumMath.toDegrees(n.roll),WebGLPlot$f.CesiumMath.toDegrees(n.heading))}}return t}setGroupModelPath(e){if(WebGLPlot$f.defined(e)&&-1!==e.lastIndexOf(".")){WebGLPlot$f.defined(this._satelliteCollection)&&WebGLPlot$f.defined(this._scene)&&this._scene.primitives.contains(this._satelliteCollection)&&this._scene.primitives.remove(this._satelliteCollection),this._modelPath=e,this._isModel=this._isModelPath(e),this._isModel?this._satelliteCollection=new WebGLPlot$f.PrimitiveCollection:this._satelliteCollection=new WebGLPlot$f.BillboardCollection;for(let e of this._mapSatellites.values())if(this._isModel){let t=e.getPositionMatrix(this._lUTCtime);this._satelliteCollection.add(WebGLPlot$f.Model.fromGltf({id:e.getUUID(),url:this._modelPath,scale:this._modelScale,modelMatrix:t,show:this._visible}))}else{const t=e.getPositionEci(this._lUTCtime);this._satelliteCollection.add({id:e.getUUID(),position:t,image:this._modelPath,scale:this._modelScale,horizontalOrigin:WebGLPlot$f.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$f.VerticalOrigin.CENTER,show:this._visible})}WebGLPlot$f.defined(this._scene)&&this._scene.primitives.add(this._satelliteCollection),this._saveToScheme()}}getGroupModelPath(){return this._modelPath}setGroupModelScale(e){this._modelScale=e;const t=this._satelliteCollection.length;for(let i=0;i<t;i++){let t=this._satelliteCollection.get(i);WebGLPlot$f.defined(t)&&(t.scale=e)}this._saveToScheme()}getGroupModelScale(){return this._modelScale}isModel(){return this._isModel}updateAllSatellitePosition(e){const t=this._satelliteCollection.length;for(let i=0;i<t;i++){const t=this._satelliteCollection.get(i);if(!WebGLPlot$f.defined(t))continue;let n=this.getSatelliteByUUID(t.id);if(!WebGLPlot$f.defined(n))continue;let r=n.getPositionEci(e);WebGLPlot$f.defined(r)&&(this._isModel?t.modelMatrix=n.getPositionMatrix(e):t.position=r)}}updateAllOrbitPosition(e){const t=this._orbitsCollection.length;for(let i=0;i<t;i++){const t=this._orbitsCollection[i].length;for(let n=0;n<t;n++){let t=this._orbitsCollection[i].get(n),r=this._mapSatellites.get(t.id);WebGLPlot$f.defined(r)&&(t.point3Ds=r.getPositionMatrix(e))}}}getSatelliteByUUID(e){return this._mapSatellites.get(e)}_removeSatelliteFromScene(e){if(!WebGLPlot$f.defined(e))return!1;let t=!1;const i=this._satelliteCollection.length;let n=null;for(let t=0;t<i;t++){const i=this._satelliteCollection.get(t);if(WebGLPlot$f.defined(i)&&i.id===e){n=i;break}}null!=n&&(this._satelliteCollection.remove(n),t=!0);let r=!1;const o=this._orbitsCollection.length;for(let t=0;t<o&&!r;t++){let i=null,n=this._orbitsCollection[t];const o=n.length;for(let t=0;t<o;t++){const r=n.get(t);if(WebGLPlot$f.defined(r)&&r.id===e){i=r;break}}null!=i&&(n.remove(i),r=!0)}return t&&r}_addSatelliteToScene(e){if(!WebGLPlot$f.defined(e))return!1;const t=this._mapSatellites.get(e);if(!WebGLPlot$f.defined(t))return!1;if(this._isModel){let e=t.getPositionMatrix(this._lUTCtime);this._satelliteCollection.add(WebGLPlot$f.Model.fromGltf({id:t.getUUID(),url:this._modelPath,scale:this._modelScale,modelMatrix:e,show:this._visible}))}else{const e=t.getPositionEci(this._lUTCtime);this._satelliteCollection.add({id:t.getUUID(),position:e,image:this._modelPath,scale:this._modelScale,horizontalOrigin:WebGLPlot$f.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$f.VerticalOrigin.CENTER,show:this._visible})}const i=t.getOrbitPoints(this._lUTCtime);let n=this._orbitsCollection[this._orbitsCollection.length-1];return n.add({id:t.getUUID(),positions:i}),n.orbitsColor=this._orbitsColor,n.orbitsWidth=this._orbitsWidth,n.orbitsVisible=this._orbitsVisible,!0}fromJson(e){if(!WebGLPlot$f.defined(e))return;let t=JSON.parse(e);WebGLPlot$f.defined(t.groupName)&&(this._groupName=t.groupName),WebGLPlot$f.defined(t.modelPath)&&(this._modelPath=t.modelPath),WebGLPlot$f.defined(t.modelScale)&&(this._modelScale=t.modelScale),WebGLPlot$f.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$f.defined(t.orbitsVisible)&&(this._orbitsVisible=t.orbitsVisible),WebGLPlot$f.defined(t.orbitsWidth)&&(this._orbitsWidth=t.orbitsWidth),WebGLPlot$f.defined(t.orbitsColor)&&(this._orbitsColor=WebGLPlot$f.Color.fromCssColorString(t.orbitsColor)),WebGLPlot$f.defined(t.tleFilePaths)&&(this._tleFilePaths=[],t.tleFilePaths.forEach((e=>{this._tleFilePaths.push(e)})))}toJson(){let e={};e.hasOwnProperty("groupName")||(e.groupName=this._groupName),e.hasOwnProperty("modelPath")||(e.modelPath=this._modelPath),e.hasOwnProperty("modelScale")||(e.modelScale=this._modelScale),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("orbitsVisible")||(e.orbitsVisible=this._orbitsVisible),e.hasOwnProperty("orbitsWidth")||(e.orbitsWidth=this._orbitsWidth),e.hasOwnProperty("orbitsColor")||(e.orbitsColor=this._orbitsColor.toCssColorString());let t=[];return e.hasOwnProperty("tleFilePaths")||(this._tleFilePaths.forEach((e=>{t.push(e)})),e.tleFilePaths=t),JSON.stringify(e)}initGroup(){if(!WebGLPlot$f.defined(this._modelPath)||!WebGLPlot$f.defined(this._tleFilePaths)||!WebGLPlot$f.defined(this._groupName))return;let e=_0x41dd10.getInstance().getURI();if(!WebGLPlot$f.defined(e))return;this._lUTCtime=Date.now(),this._isModel=this._isModelPath(this._modelPath),this._isModel?this._satelliteCollection=new WebGLPlot$f.PrimitiveCollection:this._satelliteCollection=new WebGLPlot$f.BillboardCollection,this._POLYLINE_ALL_COUNT=150,this._orbitsCollection=[],this._orbitsCollection.push(new _0x124bda),this._tleInfos=[];let t=this._tleFilePaths.length;for(let i=0;i<t;i++){let t=this._loadTLE(e+this._tleFilePaths[i]);WebGLPlot$f.defined(t)&&(this._tleInfos.push(t),this._addSatellites(t))}this.setOrbitsColor(this._orbitsColor),this.setOrbitsWidth(this._orbitsWidth),this.setOrbitsVisible(this._orbitsVisible)}destory(){if(WebGLPlot$f.defined(this._scene)){WebGLPlot$f.defined(this._satelliteCollection)&&this._scene.primitives.remove(this._satelliteCollection);const e=this._orbitsCollection.length;for(let t=0;t<e;t++)WebGLPlot$f.defined(this._orbitsCollection[t])&&this._scene.primitives.remove(this._orbitsCollection[t])}this._satelliteCollection=void 0,this._orbitsCollection=[],this._tleInfos=[]}_loadTLE(e){if(!WebGLPlot$f.defined(e))return null;var t=(e=e.replace(/\\+/g,"/")).lastIndexOf("/");if(-1==t)return null;let i=e.substring(t+1),n=i.substring(0,i.lastIndexOf(".")),r=[];var o;(o=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open("GET",e,!1),o.send();let a=o.responseText.split(/\r\n/).filter((function(e){return e&&e.trim()})),s=0,l=a.length/3;for(let e=0;e<l;e++){let e=new _0x44d1e4({name:a[s].trim(),tleLine1:a[s+1].trim(),tleLine2:a[s+2].trim(),networking:n});null!=e&&r.push(e),s+=3}return{fileName:n,filePath:e,satellites:r}}_addSatellites(e){let t=this._orbitsCollection[this._orbitsCollection.length-1],i=e.satellites.length;for(let n=0;n<i;n++){let i=e.satellites[n];if(!WebGLPlot$f.defined(i))continue;this._mapSatellites.set(i.getUUID(),i);const r=i.getPositionEci(this._lUTCtime);if(null==r)continue;const o=i.getOrbitPoints(this._lUTCtime);if(WebGLPlot$f.defined(o)&&0!=o.length){if(this._isModel){let e=i.getPositionMatrix(this._lUTCtime);this._satelliteCollection.add(WebGLPlot$f.Model.fromGltf({id:i.getUUID(),url:this._modelPath,scale:this._modelScale,modelMatrix:e,show:this._visible}))}else this._satelliteCollection.add({id:i.getUUID(),position:r,image:this._modelPath,scale:this._modelScale,horizontalOrigin:WebGLPlot$f.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$f.VerticalOrigin.CENTER,show:this._visible});t.length>this._POLYLINE_ALL_COUNT&&(t=new _0x124bda,this._orbitsCollection.push(t)),t.add({id:i.getUUID(),positions:o})}}}_saveToScheme(){_0x41dd10.getInstance().getSatelliteManager()._setIsModify(!0),_0x41dd10.getInstance().getSatelliteManager()._save()}_isModelPath(e){let t=!1;if(WebGLPlot$f.defined(e)){let i=e.lastIndexOf(".");if(-1!=i){let n=e.substring(i+1).toUpperCase();("GLTF"===n||"GLB"===n)&&(t=!0)}}return t}}const _0x47e68d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2c0dfb=_0x47e68d(void 0,(function(){return _0x2c0dfb.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c0dfb).search("(((.+)+)+)+$")}));_0x2c0dfb();class _0x19ce0d{constructor(){this._scene=void 0,this._arrSatelliteGroup=[],this._isModified=!1}setScene(e){this._scene=e}getGroups(){return this._arrSatelliteGroup}getGroup(e){const t=this._arrSatelliteGroup.length;for(let i=0;i<t;i++)if(this._arrSatelliteGroup[i].getGroupName()===e)return this._arrSatelliteGroup[i];return null}updateAllSatellitePosition(e){const t=this._arrSatelliteGroup.length;for(let i=0;i<t;i++)this._arrSatelliteGroup[i].updateAllSatellitePosition(e)}updateAllOrbitPosition(e){const t=this._arrSatelliteGroup.length;for(let e=0;e<t;e++)this._arrSatelliteGroup[e].updateAllOrbitPosition()}fromJson(e){let t=this._arrSatelliteGroup.length;for(let e=0;e<t;e++)this._arrSatelliteGroup[e].destory();if(this._arrSatelliteGroup=[],e.length>0){let t=JSON.parse(e);WebGLPlot$f.defined(t.groups)&&t.groups.forEach((e=>{let t=new _0x329fbd;t.fromJson(JSON.stringify(e)),t.initGroup(),WebGLPlot$f.defined(this._scene)&&t.setScene(this._scene),this._arrSatelliteGroup.push(t)}))}}toJson(){let e={},t=[];return this._arrSatelliteGroup.forEach((e=>{t.push(JSON.parse(e.toJson()))})),e.hasOwnProperty("groups")||(e.groups=t),JSON.stringify(e)}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){this._isModified&&_0x41dd10.getInstance()._saveSatelliteGroups(!1)}}const _0x1bab8c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1442ad=_0x1bab8c(void 0,(function(){return _0x1442ad.toString().search("(((.+)+)+)+$").toString().constructor(_0x1442ad).search("(((.+)+)+)+$")}));_0x1442ad();const _0x20b219={ENTITY:0,SCRIPT:1,SATELLITE:2};var _0x59c417=Object.freeze(_0x20b219);const _0xe0b6cd=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3deead=_0xe0b6cd(void 0,(function(){return _0x3deead.toString().search("(((.+)+)+)+$").toString().constructor(_0x3deead).search("(((.+)+)+)+$")}));_0x3deead();class _0x5ced36 extends _0x5589fe{constructor(e){super(e.geoGraphicObject),this._satelliteGroupName=e.satelliteGroupName,this._satellite=e.satellite,this._orbit=e.orbit,this._name=this._satellite.getUUID(),this._orbitVisible=void 0,WebGLPlot$f.defined(e.orbit)&&(this.setOrbitVisible(e.orbitVisible),this.setOrbitWidth(e.orbitWidth),this.setOrbitColor(e.orbitColor))}setGeoEntityParameter(e){super.setGeoEntityParameter(e),e.isVisible()&&this._orbitVisible?this._orbit.show=!0:this._orbit.show=!1,this._isModified=!0,this._save()}getSatellite(){return this._satellite}getSatelliteGroupName(){return this._satelliteGroupName}getOrbit(){return this._orbit}isOrbitVisible(){if(WebGLPlot$f.defined(this._orbit))return this._orbit.show}setOrbitVisible(e){this.getGeoEntityParameter().isVisible()&&e?this._orbit.show=!0:this._orbit.show=!1,this._orbitVisible=e,this._isModified=!0,this._save()}getOrbitWidth(){if(WebGLPlot$f.defined(this._orbit))return this._orbit.width}setOrbitWidth(e){this._orbit.width=e,this._isModified=!0,this._save()}getOrbitColor(){if(WebGLPlot$f.defined(this._orbit))return this._orbit.material.uniforms.color}setOrbitColor(e){this._orbit.material.uniforms.color=e,this._isModified=!0,this._save()}updateOrbitPosition(e){let t=this._satellite.getOrbitPoints(e);this._orbit.positions=t}toJson(){let e=super.toJson();if(""==e)return"";let t=JSON.parse(e);t.hasOwnProperty("satellite")||(t.satellite={},t.satellite.hasOwnProperty("satelliteGroupName")||(t.satellite.satelliteGroupName=this._satelliteGroupName),t.satellite.hasOwnProperty("satelliteUUID")||(t.satellite.satelliteUUID=this._satellite.getUUID()));return t.hasOwnProperty("orbit")||(t.orbit={},t.orbit.hasOwnProperty("orbitVisible")||(t.orbit.orbitVisible=this._orbitVisible),t.orbit.hasOwnProperty("orbitWidth")||(t.orbit.orbitWidth=this._orbit.width),t.orbit.hasOwnProperty("orbitColor")||(t.orbit.orbitColor=this._orbit.material.uniforms.color.toCssColorString())),JSON.stringify(t)}fromJson(e){return super.fromJson(e)}_save(){this._isMoveGeoEntity||_0x41dd10.getInstance()._saveSatelliteGeoEntity(!1)}}const _0xd472f4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x263417=_0xd472f4(void 0,(function(){return _0x263417.toString().search("(((.+)+)+)+$").toString().constructor(_0x263417).search("(((.+)+)+)+$")}));_0x263417();class _0x42f78d{constructor(){this._mapSatelliteEntitys=new Map,this._scene=void 0,this._geoEntityLayer=void 0,this._satelliteOrbitsLayer=new _0x124bda,this._addGeoEntitys=[],this._removeEntityUUIDs=[]}setScene(e){WebGLPlot$f.defined(e)&&(this._geoEntityLayer=new _0x267b40(e,"SatelliteEntitys"),e.plotLayers.add(this._geoEntityLayer),e.primitives.add(this._satelliteOrbitsLayer),this._scene=e)}addSatelliteEntity(e,t,i,n){if(!WebGLPlot$f.defined(t))return;const r=t.getGroup(i);if(!WebGLPlot$f.defined(r))return;let o=r.getSatelliteByUUID(e);if(!WebGLPlot$f.defined(o))return;let a=o.getName(),s=r.getAllSatelliteScale(),l=r.getOrbitsWidth(),u=r.getOrbitsColor(),c=r.getSatelliteZRotation(o.getUUID()),h=r.getSatellitePos(o.getUUID()),d=r.getGroupModelPath(),f=r.isModel(),p=this;if(f)this._geoEntityLayer.createSymbol(0,99999,[h],{url:d},(function(e){if(WebGLPlot$f.defined(e)){e.feature.__dotPlotLibID=0,e.feature.__dotPlotCode=99998;let t=o.getOrbitPoints(r._lUTCtime),h=p._satelliteOrbitsLayer.add({id:o.getUUID(),positions:t}),d=new _0x5ced36({geoGraphicObject:e.feature,satelliteGroupName:i,satellite:o,orbit:h,orbitWidth:l,orbitColor:u,orbitVisible:true});e.feature.setGeoEntity(d),p._mapSatelliteEntitys.set(d.getUUID(),d),p._addGeoEntitys.push(d),p._save();let f=d.getGeoEntityParameter();f.setModelScale(s),f.setModelRotate(c),d.setGeoEntityParameter(f),d.setName(a),r._removeSatelliteFromScene(o.getUUID()),"function"==typeof n&&n({uuid:d.getUUID()})}}));else{let e=new Image;e.src=d,e.onload=function(){let t=new WebGLPlot$f.Cartesian2(e.width*s,e.height*s),c=p;p._geoEntityLayer.createSymbol(0,20,[h],{url:d},(function(e){if(WebGLPlot$f.defined(e)){e.feature.__dotPlotLibID=0,e.feature.__dotPlotCode=99998,e.feature.anchorPoint=new WebGLPlot$f.Cartesian2(.5,1.5);let s=o.getOrbitPoints(r._lUTCtime),h=c._satelliteOrbitsLayer.add({id:o.getUUID(),positions:s}),d=new _0x5ced36({geoGraphicObject:e.feature,satelliteGroupName:i,satellite:o,orbit:h,orbitWidth:l,orbitColor:u,orbitVisible:true});e.feature.setGeoEntity(d),c._mapSatelliteEntitys.set(d.getUUID(),d),c._addGeoEntitys.push(d),c._save();let f=d.getGeoEntityParameter();f.setPictureSymbolSize(t),d.setGeoEntityParameter(f),d.setName(a),r._removeSatelliteFromScene(o.getUUID()),"function"==typeof n&&n({uuid:d.getUUID()})}}))}}}removeSatelliteEntity(e,t){let i=this._convertEntityToSatellite(e,t);return i&&(this._removeEntityUUIDs.push(e),this._save()),i}getSatelliteEntityByUUID(e){return this._mapSatelliteEntitys.get(e)}getSatelliteEntitys(){let e=[];for(let t of this._mapSatelliteEntitys.values())e.push(t);return e}updateAllSatelliteEntityPosition(e){for(let t of this._mapSatelliteEntitys.values()){let i=t.getSatellite();if(WebGLPlot$f.defined(i)){let n=i.getPositionEci(e);if(WebGLPlot$f.defined(n)){let e=t.getGeoEntityParameter();e.setPosition(_0x2887b9.cartesian3ToDegrees(n)),t.setGeoEntityParameter(e)}}}}updateAllOrbitPosition(e){for(let t of this._mapSatelliteEntitys.values())t.updateOrbitPosition(e)}removeAllSatelliteEntity(e){this._mapSatelliteEntitys.forEach(((t,i)=>{this._convertEntityToSatellite(i,e)&&this._removeEntityUUIDs.push(i)})),this._mapSatelliteEntitys.clear(),this._save()}toJson(){let e=new Map;return this._mapSatelliteEntitys.forEach(((t,i)=>{e.set(t.getUUID(),t.toJson())})),e}fromJson(e,t){let i=e.satelliteEntityJsons,n=e.satelliteManager;if(this.removeAllSatelliteEntity(n),!WebGLPlot$f.defined(this._geoEntityLayer))return;let r=this,o=[];i.forEach(((e,a)=>{let s=JSON.parse(e);WebGLPlot$f.defined(s.geoGraphicObject)&&this._geoEntityLayer.geoJsonToGeoGraphicObject(JSON.parse(s.geoGraphicObject),(function(e){if(WebGLPlot$f.defined(e)){let a=e.feature;if(WebGLPlot$f.defined(a)){let e,l,u,c,h;if(WebGLPlot$f.defined(s.satellite)&&(e=n.getGroup(s.satellite.satelliteGroupName),l=e.getSatelliteByUUID(s.satellite.satelliteUUID)),WebGLPlot$f.defined(s.orbit)&&(u=s.orbit.orbitVisible,c=s.orbit.orbitWidth,h=WebGLPlot$f.Color.fromCssColorString(s.orbit.orbitColor)),WebGLPlot$f.defined(s.geoEntity)&&WebGLPlot$f.defined(e)&&WebGLPlot$f.defined(l)){let n=l.getOrbitPoints(e._lUTCtime),d=r._satelliteOrbitsLayer.add({id:l.getUUID(),positions:n}),f=new _0x5ced36({geoGraphicObject:a,satelliteGroupName:e.getGroupName(),satellite:l,orbit:d,orbitWidth:c,orbitColor:h,orbitVisible:u});f.fromJson(s.geoEntity),a.setGeoEntity(f),r._mapSatelliteEntitys.set(f.getUUID(),f),o.push(f.getUUID()),"function"==typeof t&&o.length===i.size&&t({UUIDs:o})}}}}))}))}_convertEntityToSatellite(e,t){if(!WebGLPlot$f.defined(t))return!1;const i=this._mapSatelliteEntitys.get(e);if(!WebGLPlot$f.defined(i))return!1;const n=i.getSatelliteGroupName();if(!WebGLPlot$f.defined(n))return!1;this._satelliteOrbitsLayer.remove(i.getOrbit()),this._mapSatelliteEntitys.delete(e);let r=i._getGeoGraphicObject();WebGLPlot$f.defined(r)&&(r.removeAllGeoEffect(),this._geoEntityLayer.removeGeoGraphicObject(r));const o=t.getGroup(n);return!!WebGLPlot$f.defined(o)&&(o._addSatelliteToScene(i.getSatellite().getUUID()),!0)}_removeAllSatelliteEntityFromScene(e){this._mapSatelliteEntitys.forEach(((t,i)=>{this._convertEntityToSatellite(i,e)})),this._mapSatelliteEntitys.clear()}_getAddAndRemoveGeoEntitys(){return{add:this._addGeoEntitys,remove:this._removeEntityUUIDs}}_clearAddAndRemoveGeoEntitys(){this._addGeoEntitys.splice(0),this._removeEntityUUIDs.splice(0)}_save(){_0x41dd10.getInstance()._saveSatelliteGeoEntity(!1)}}const _0x410d98=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x533a7c=_0x410d98(void 0,(function(){return _0x533a7c.toString().search("(((.+)+)+)+$").toString().constructor(_0x533a7c).search("(((.+)+)+)+$")}));_0x533a7c();class _0x78fecc{constructor(e){this._UUID=WebGLPlot$f.createGuid(),this._geoEntityParameter=WebGLPlot$f.defaultValue(e,new _0x487d97)}_getGeoEntityParameter(){return this._geoEntityParameter}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityParameter")||(e.geoEntityParameter=this._geoEntityParameter._toJson()),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.geoEntityParameter)&&this._geoEntityParameter._fromJson(t.geoEntityParameter)}clone(){let e=new _0x78fecc;return e._UUID=this._UUID,e._geoEntityParameter=this._geoEntityParameter.clone(),e}getUUID(){return this._UUID}setModelPath(e){this._geoEntityParameter.setModelPath(e)}getModelPath(){return this._geoEntityParameter.getModelPath()}setDotPlotLibID(e){this._geoEntityParameter.setDotPlotLibID(e)}getDotPlotLibID(){return this._geoEntityParameter.getDotPlotLibID()}setDotPlotCode(e){this._geoEntityParameter.setDotPlotCode(e)}getDotPlotCode(){return this._geoEntityParameter.getDotPlotCode()}setDotPlotStyle(e){this._geoEntityParameter.setDotPlotStyle(e)}getDotPlotStyle(){return this._geoEntityParameter.getDotPlotStyle()}setVisible(e){this._geoEntityParameter.setVisible(e)}isVisible(){return this._visible}setPicturePath(e){this._geoEntityParameter.setPicturePath(e)}getPicturePath(){return this._geoEntityParameter.getPicturePath()}setShowMode(e){this._geoEntityParameter.setShowMode(e)}getShowMode(){return this._geoEntityParameter.getShowMode()}setIsDistanceChangeMode(e){this._geoEntityParameter.setIsDistanceChangeMode(e)}getIsDistanceChangeMode(){return this._geoEntityParameter.getIsDistanceChangeMode()}setChangeModeDistance(e){this._geoEntityParameter.setChangeModeDistance(e)}getChangeModeDistance(){return this._geoEntityParameter.getChangeModeDistance()}}const _0x2d4be0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3edea0=_0x2d4be0(void 0,(function(){return _0x3edea0.toString().search("(((.+)+)+)+$").toString().constructor(_0x3edea0).search("(((.+)+)+)+$")}));_0x3edea0();class _0x25bff7{constructor(e){this._UUID=WebGLPlot$f.createGuid(),this._geoEntityEffects=WebGLPlot$f.defaultValue(e,[])}_fromJson(e){let t=JSON.parse(e);!WebGLPlot$f.defined(t)||(WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.geoEntityEffects)&&(this._geoEntityEffects=[],t.geoEntityEffects.forEach((e=>{this._geoEntityEffects.push(_0x3f9f2a.createGeoEntityEffectFromJson(e))}))))}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityEffects")||(e.geoEntityEffects=[],this._geoEntityEffects.forEach((t=>{e.geoEntityEffects.push(t.toJSON())}))),JSON.stringify(e)}getUUID(){return this._UUID}setGeoEntityEffects(e){this._geoEntityEffects=e}getGeoEntityEffects(){return this._geoEntityEffects}}const _0x183a0d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x7e8f1b=_0x183a0d(void 0,(function(){return _0x7e8f1b.toString().search("(((.+)+)+)+$").toString().constructor(_0x7e8f1b).search("(((.+)+)+)+$")}));_0x7e8f1b();class _0x354a71{constructor(){this._UUID=WebGLPlot$f.createGuid(),this._isTimeMode=!0,this._time=void 0,this._speed=void 0,this._isCurvePath=!1,this._pathPoint3D=void 0,this._scalePoint2D=void 0,this._originPosition=void 0,this._targetPosition=void 0,this._originGeoEntityUUID=void 0,this._targetGeoEntityUUID=void 0}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("isTimeMode")||(e.isTimeMode=this._isTimeMode),!e.hasOwnProperty("time")&&WebGLPlot$f.defined(this._time)&&(e.time=this._time),!e.hasOwnProperty("speed")&&WebGLPlot$f.defined(this._speed)&&(e.speed=this._speed),e.hasOwnProperty("isCurvePath")||(e.isCurvePath=this._isCurvePath),!e.hasOwnProperty("pathPoint3D")&&WebGLPlot$f.defined(this._pathPoint3D)&&(e.pathPoint3D=[],this._pathPoint3D.forEach((t=>{e.pathPoint3D.push({x:t.x,y:t.y,z:t.z})}))),!e.hasOwnProperty("scalePoint2D")&&WebGLPlot$f.defined(this._scalePoint2D)&&(e.scalePoint2D=[],this._scalePoint2D.forEach((t=>{e.scalePoint2D.push({x:t.x,y:t.y})}))),!e.hasOwnProperty("originPosition")&&WebGLPlot$f.defined(this._originPosition)&&(e.originPosition={x:this._originPosition.x,y:this._originPosition.y,z:this._originPosition.z}),!e.hasOwnProperty("targetPosition")&&WebGLPlot$f.defined(this._targetPosition)&&(e.targetPosition={x:this._targetPosition.x,y:this._targetPosition.y,z:this._targetPosition.z}),!e.hasOwnProperty("targetGeoEntityUUID")&&WebGLPlot$f.defined(this._targetGeoEntityUUID)&&(e.targetGeoEntityUUID=this._targetGeoEntityUUID),!e.hasOwnProperty("originGeoEntityUUID")&&WebGLPlot$f.defined(this._originGeoEntityUUID)&&(e.originGeoEntityUUID=this._originGeoEntityUUID),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.isTimeMode)&&(this._isTimeMode=t.isTimeMode),WebGLPlot$f.defined(t.time)&&(this._time=t.time),WebGLPlot$f.defined(t.speed)&&(this._speed=t.speed),WebGLPlot$f.defined(t.isCurvePath)&&(this._isCurvePath=t.isCurvePath),WebGLPlot$f.defined(t.pathPoint3D)&&(this._pathPoint3D=[],t.pathPoint3D.forEach((e=>{this._pathPoint3D.push(new _0x11ff81(e.x,e.y,e.z))}))),WebGLPlot$f.defined(t.scalePoint2D)&&(this._scalePoint2D=[],t.scalePoint2D.forEach((e=>{this._scalePoint2D.push(new WebGLPlot$f.Cartesian2(e.x,e.y))}))),WebGLPlot$f.defined(t.targetPosition)&&(this._targetPosition=new _0x11ff81(t.targetPosition.x,t.targetPosition.y,t.targetPosition.z)),WebGLPlot$f.defined(t.originPosition)&&(this._originPosition=new _0x11ff81(t.originPosition.x,t.originPosition.y,t.originPosition.z)),WebGLPlot$f.defined(t.targetGeoEntityUUID)&&(this._targetGeoEntityUUID=t.targetGeoEntityUUID),WebGLPlot$f.defined(t.originGeoEntityUUID)&&(this._originGeoEntityUUID=t.originGeoEntityUUID)}getUUID(){return this._UUID}setIsTimeMode(e){this._isTimeMode=e}isTimeMode(){return this._isTimeMode}setTime(e){this._time=e}getTime(){return this._time}setSpeed(e){this._speed=e}getSpeed(){return this._speed}setScalePoint2D(e){this._scalePoint2D=e,this._pathPoint3D=void 0}getScalePoint2D(){return this._scalePoint2D}setPathPoint3D(e){this._pathPoint3D=e,this._scalePoint2D=void 0}getPathPoint3D(){return this._pathPoint3D}setTargetPosition(e){this._targetPosition=e}getTargetPosition(){return this._targetPosition}setOriginPosition(e){this._originPosition=e}getOriginPosition(){return this._originPosition}setTargetGeoEntityUUID(e){this._targetGeoEntityUUID=e}getTargetGeoEntityUUID(){return this._targetGeoEntityUUID}setOriginGeoEntityUUID(e){this._originGeoEntityUUID=e}getOriginGeoEntityUUID(){return this._originGeoEntityUUID}setIsCurvePath(e){this._isCurvePath=e}isCurvePath(){return this._isCurvePath}clone(){let e=new _0x354a71;return e._UUID=this._UUID,e._isTimeMode=this._isTimeMode,e._time=this._time,e._speed=this._speed,e._isCurvePath=this._isCurvePath,WebGLPlot$f.defined(this._pathPoint3D)&&(e._pathPoint3D=[],this._pathPoint3D.forEach((t=>{e._pathPoint3D.push(new _0x11ff81(t.x,t.y,t.z))}))),WebGLPlot$f.defined(this._scalePoint2D)&&(e._scalePoint2D=[],this._scalePoint2D.forEach((t=>{e._scalePoint2D.push(new WebGLPlot$f.Cartesian2(t.x,t.y))}))),e._originPosition=this._originPosition,e._targetPosition=this._targetPosition,e._targetGeoEntityUUID=this._targetGeoEntityUUID,e._originGeoEntityUUID=this._originGeoEntityUUID,e}}var _0x339153=(_0x1b5cc5=!0,function(e,t){var i=_0x1b5cc5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b5cc5=!1,i}),_0x200b11=_0x339153(void 0,(function(){return _0x200b11.toString().search("(((.+)+)+)+$").toString().constructor(_0x200b11).search("(((.+)+)+)+$")})),_0x1b5cc5;_0x200b11();var _0xdb296e={NO:0,ONEWAY:1,BOTHWAY:2},_0x12cd7b=Object.freeze(_0xdb296e);const _0x294a2a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xc2ee1d=_0x294a2a(void 0,(function(){return _0xc2ee1d.toString().search("(((.+)+)+)+$").toString().constructor(_0xc2ee1d).search("(((.+)+)+)+$")}));_0xc2ee1d();class _0x537142{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._time=WebGLPlot$f.defaultValue(e.time,0),this._startRotation=WebGLPlot$f.defaultValue(e.startRotation,new _0x11ff81(0,0,0)),this._endRotation=WebGLPlot$f.defaultValue(e.endRotation,new _0x11ff81(0,0,0)),this._cyclicType=WebGLPlot$f.defaultValue(e.cyclicType,_0x12cd7b.NO),this._isGradient=WebGLPlot$f.defaultValue(e.isGradient,!0),WebGLPlot$f.defined(e.time)||WebGLPlot$f.defined(e.totalTime)?this._totalTime=WebGLPlot$f.defaultValue(e.totalTime,e.time):this._totalTime=void 0,this._UUID=WebGLPlot$f.createGuid()}getUUID(){return this._UUID}setTotalTime(e){this._totalTime=e}getTotalTime(){return this._totalTime}setTime(e){this._time=e,WebGLPlot$f.defined(this._totalTime)||(this._totalTime=this._time)}getTime(){return this._time}setStartRotation(e){this._startRotation=e}getStartRotation(){return this._startRotation}setEndRotation(e){this._endRotation=e}getEndRotation(){return this._endRotation}setCyclicType(e){this._cyclicType=e}getCyclicType(){return this._cyclicType}setIsGradient(e){this._isGradient=e}isGradient(){return this._isGradient}_toJson(){let e={};e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("time")||(e.time=this._time);e.hasOwnProperty("startRotation")||(e.startRotation={},e.startRotation.hasOwnProperty("x")||(e.startRotation.x=this._startRotation.x),e.startRotation.hasOwnProperty("y")||(e.startRotation.y=this._startRotation.y),e.startRotation.hasOwnProperty("z")||(e.startRotation.z=this._startRotation.z));return e.hasOwnProperty("endRotation")||(e.endRotation={},e.endRotation.hasOwnProperty("x")||(e.endRotation.x=this._endRotation.x),e.endRotation.hasOwnProperty("y")||(e.endRotation.y=this._endRotation.y),e.endRotation.hasOwnProperty("z")||(e.endRotation.z=this._endRotation.z)),e.hasOwnProperty("cyclicType")||(e.cyclicType=this._cyclicType),e.hasOwnProperty("isGradient")||(e.isGradient=this._isGradient),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.time)&&(this._time=t.time),WebGLPlot$f.defined(t.startRotation)&&(WebGLPlot$f.defined(t.startRotation.x)&&(this._startRotation.x=t.startRotation.x),WebGLPlot$f.defined(t.startRotation.y)&&(this._startRotation.y=t.startRotation.y),WebGLPlot$f.defined(t.startRotation.z)&&(this._startRotation.z=t.startRotation.z)),WebGLPlot$f.defined(t.endRotation)&&(WebGLPlot$f.defined(t.endRotation.x)&&(this._endRotation.x=t.endRotation.x),WebGLPlot$f.defined(t.endRotation.y)&&(this._endRotation.y=t.endRotation.y),WebGLPlot$f.defined(t.endRotation.z)&&(this._endRotation.z=t.endRotation.z)),WebGLPlot$f.defined(t.cyclicType)&&(this._cyclicType=t.cyclicType),WebGLPlot$f.defined(t.isGradient)&&(this._isGradient=t.isGradient)}}const _0x2bd227=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x57e4b3=_0x2bd227(void 0,(function(){return _0x57e4b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x57e4b3).search("(((.+)+)+)+$")}));_0x57e4b3();class _0xbe66a7{constructor(e){e=WebGLPlot$f.defaultValue(e,WebGLPlot$f.defaultValue.EMPTY_OBJECT),this._time=WebGLPlot$f.defaultValue(e.time,0),this._startScale=WebGLPlot$f.defaultValue(e.startScale,1),this._endScale=WebGLPlot$f.defaultValue(e.endScale,1),this._cyclicType=WebGLPlot$f.defaultValue(e.cyclicType,_0x12cd7b.NO),this._isGradient=WebGLPlot$f.defaultValue(e.isGradient,!0),WebGLPlot$f.defined(e.time)||WebGLPlot$f.defined(e.totalTime)?this._totalTime=WebGLPlot$f.defaultValue(e.totalTime,e.time):this._totalTime=void 0,this._UUID=WebGLPlot$f.createGuid()}getUUID(){return this._UUID}setTotalTime(e){this._totalTime=e}getTotalTime(){return this._totalTime}setTime(e){this._time=e,WebGLPlot$f.defined(this._totalTime)||(this._totalTime=this._time)}getTime(){return this._time}setStartScale(e){this._startScale=e}getStartScale(){return this._startScale}setEndScale(e){this._endScale=e}getEndScale(){return this._endScale}setCyclicType(e){this._cyclicType=e}getCyclicType(){return this._cyclicType}setIsGradient(e){this._isGradient=e}isGradient(){return this._isGradient}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("time")||(e.time=this._time),e.hasOwnProperty("startScale")||(e.startScale=this._startScale),e.hasOwnProperty("endScale")||(e.endScale=this._endScale),e.hasOwnProperty("cyclicType")||(e.cyclicType=this._cyclicType),e.hasOwnProperty("isGradient")||(e.isGradient=this._isGradient),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.time)&&(this._time=t.time),WebGLPlot$f.defined(t.startScale)&&(this._startScale=t.startScale),WebGLPlot$f.defined(t.endScale)&&(this._endScale=t.endScale),WebGLPlot$f.defined(t.cyclicType)&&(this._cyclicType=t.cyclicType),WebGLPlot$f.defined(t.isGradient)&&(this._isGradient=t.isGradient)}}const _0x21d437=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1fabd8=_0x21d437(void 0,(function(){return _0x1fabd8.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fabd8).search("(((.+)+)+)+$")}));_0x1fabd8();class _0x3139ed{constructor(e,t,i,n,r,o,a){this._geoEntityUUID=e,this._geoEntityMoveParameter=t,this._executeManagerCalc=n,this._groupIndex=r,this._speed=0,this._curvePath3D=[],this._controlPointIndexs=[],this._isToTarget=!1,this._lastTime=void 0,this._lastDistance=0,this._isFinished=!1,this._isChangeCurve=!1,this._moveMode=-1,this._position=o,this._rotation=a,this._geoEntityMoveParameter=t,this._init(t,i)}_createCurve3D(e){let t=_0x2887b9.getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$f.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new Cesium.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_init(e,t){let i=e.isTimeMode(),n=e.getTime(),r=e.getSpeed(),o=e.getPathPoint3D(),a=e.getScalePoint2D();if(i&&WebGLPlot$f.defined(n)){let i=1e3*n;if(i>0){let n,r=[],s=e.getOriginGeoEntityUUID();WebGLPlot$f.defined(s)&&(n=this._executeManagerCalc._getPosition(this._groupIndex,s,t));let l,u=e.getTargetGeoEntityUUID();if(WebGLPlot$f.defined(u)&&(l=this._executeManagerCalc._getPosition(this._groupIndex,u,t+i)),WebGLPlot$f.defined(o))WebGLPlot$f.defined(n)&&r.push(n),o.forEach((e=>{r.push(e)})),WebGLPlot$f.defined(l)&&r.push(l);else if(WebGLPlot$f.defined(a)){if(WebGLPlot$f.defined(n)&&WebGLPlot$f.defined(l)){let e=[n,l];r=[n,l];let t=_0x2887b9.getAllDistance(e);a.forEach((i=>{let n=t*i.x,o=_0x2887b9.getPositionByDistance(e,n);r.splice(r.length-1,0,new WebGLPlot$f.Cartesian3(o.point.x,o.point.y,o.point.z+i.y))}))}}else WebGLPlot$f.defined(n)&&r.push(n),WebGLPlot$f.defined(l)&&r.push(l);if(r=this._convertToCartesian3(r),r.length>=2&&_0x2887b9.getAllDistance(r)>.001){if(this._moveMode=0,e.isCurvePath()){let e=this._createCurve3D(r);this._curvePath3D=e.curvePath3D}else this._curvePath3D=r;let n=_0x2887b9.getAllDistance(this._curvePath3D);this._speed=n/i,this._lastTime=t,this._lastDistance=0}}}else if(!i&&WebGLPlot$f.defined(r)){let i=r/1e3;if(i>0){let n,r=[],s=e.getOriginGeoEntityUUID();WebGLPlot$f.defined(s)&&(n=this._executeManagerCalc._getPosition(this._groupIndex,s,t));let l,u=e.getTargetGeoEntityUUID();if(WebGLPlot$f.defined(u)&&(l=this._executeManagerCalc._getPosition(this._groupIndex,u,t)),WebGLPlot$f.defined(o))WebGLPlot$f.defined(n)&&r.push(n),o.forEach((e=>{r.push(e)})),WebGLPlot$f.defined(l)&&r.push(l);else if(WebGLPlot$f.defined(a)){if(WebGLPlot$f.defined(n)&&WebGLPlot$f.defined(l)){let e=[n,l];r=[n,l];let t=_0x2887b9.getAllDistance(e);a.forEach((i=>{let n=t*i.x,o=_0x2887b9.getPositionByDistance(e,n);r.splice(r.length-1,0,new WebGLPlot$f.Cartesian3(o.point.x,o.point.y,o.point.z+i.y))}))}}else WebGLPlot$f.defined(n)&&r.push(n),WebGLPlot$f.defined(l)&&r.push(l);if(r=this._convertToCartesian3(r),r.length>=2&&_0x2887b9.getAllDistance(r)>.001){if(WebGLPlot$f.defined(l)?this._moveMode=1:this._moveMode=0,e.isCurvePath()){let e=this._createCurve3D(r);this._curvePath3D=e.curvePath3D,this._controlPointIndexs=e.controlPointIndexs}else{this._curvePath3D=r;for(let e=0;e<r.length;e++)this._controlPointIndexs.push(e)}1===this._moveMode&&this._controlPointIndexs.splice(this._controlPointIndexs.length-1,1),this._speed=i,this._lastTime=t,this._lastDistance=0}}}}_convertToCartesian3(e){let t=[];return e.forEach((e=>{t.push(_0x2887b9.degreesToCartesian3(e))})),t}_caclulate(e){if(!this._isFinished)if(this._geoEntityMoveParameter.isTimeMode()&&0===this._geoEntityMoveParameter.getTime()){this._isFinished=!0;let t,i=this._geoEntityMoveParameter.getTargetGeoEntityUUID();if(WebGLPlot$f.defined(i)&&(t=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityMoveParameter.getTargetGeoEntityUUID(),e)),!WebGLPlot$f.defined(t)){let e=this._geoEntityMoveParameter.getPathPoint3D();WebGLPlot$f.defined(e)&&e.length>0&&(t=e[e.length-1])}WebGLPlot$f.defined(t)&&(this._position=t)}else{let t=e-this._lastTime;this._lastTime=e;let i=this._lastDistance+t*this._speed;this._lastDistance=i;let n=[];if(this._isToTarget){let t=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityUUID,e),i=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityMoveParameter.getTargetGeoEntityUUID(),e),r=_0x2887b9.degreesToCartesian3(t),o=_0x2887b9.degreesToCartesian3(i);WebGLPlot$f.defined(t)&&WebGLPlot$f.defined(i)&&WebGLPlot$f.Cartesian3.distance(this._curvePath3D[this._curvePath3D.length-1],o)>.001?(this._isChangeCurve?this._curvePath3D.splice(this._curvePath3D.length-1):(this._curvePath3D.splice(this._controlPointIndexs[this._controlPointIndexs.length-1]),this._isChangeCurve=!0),n.push(r),n.push(o),this._curvePath3D=this._curvePath3D.concat(n),n=this._curvePath3D):n=this._curvePath3D}else n=this._curvePath3D;if(i>_0x2887b9.getAllDistance(n))this._isFinished=!0;else{let e=_0x2887b9.getPositionByDistance(n,i),t=e.index;if(t<n.length&&t>=0){if(!this._isToTarget&&1===this._moveMode&&t>=this._controlPointIndexs[this._controlPointIndexs.length-1]&&(this._isToTarget=!0),this._position=_0x2887b9.cartesian3ToDegrees(e.point),t!==n.length-1){let i=n[t+1];if(e.point.x!==i.x||e.point.y!==i.y||e.point.z!==i.z){let t=_0x2887b9.getPitch(e.point,i),n=_0x2887b9.getHeading(e.point,i);if(t&&n){let e=new _0x11ff81(0);e.x=WebGLPlot$f.CesiumMath.toDegrees(t),e.z=WebGLPlot$f.CesiumMath.toDegrees(n),this._rotation=e}}}}else this._isFinished=!0}}return{position:this._position,rotation:this._rotation}}}const _0x1b824c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x464403=_0x1b824c(void 0,(function(){return _0x464403.toString().search("(((.+)+)+)+$").toString().constructor(_0x464403).search("(((.+)+)+)+$")}));_0x464403();class _0x177623{constructor(e,t){this._geoEntityRotationParameter=e,this._speed=void 0,this._startTime=t,this._cyclicStartTime=void 0,this._lastTime=void 0,this._isBack=!1,this._isFinished=!1,this._rotate=void 0,this._init(e,t)}_init(e,t){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t))return void(this._isFinished=!0);let i=1e3*e.getTime();if(i<0)return void(this._isFinished=!0);let n=e.getStartRotation(),r=e.getEndRotation();this._isBack&&(n=e.getEndRotation(),r=e.getStartRotation()),this._speed=new _0x11ff81(0,0,0),e.isGradient()&&(this._speed=new _0x11ff81((r.x-n.x)/i,(r.y-n.y)/i,(r.z-n.z)/i)),this._cyclicStartTime=t,this._lastTime=t,this._rotate=new _0x11ff81(n.x,n.y,n.z),this._isFinished=!1}_caclulate(e){if(WebGLPlot$f.defined(this._geoEntityRotationParameter)){if(this._isFinished)return this._rotate;if(e-this._startTime>1e3*this._geoEntityRotationParameter.getTotalTime()&&(this._isFinished=!0),e-this._cyclicStartTime>1e3*this._geoEntityRotationParameter.getTime()){let t=this._geoEntityRotationParameter.getCyclicType();t==_0x12cd7b.NO?(this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isFinished=!0):t==_0x12cd7b.ONEWAY?(this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isFinished||this._init(this._geoEntityRotationParameter,e)):t==_0x12cd7b.BOTHWAY&&(this._isBack?this._rotate=this._geoEntityRotationParameter.getStartRotation().clone():this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isBack=!this._isBack,this._isFinished||this._init(this._geoEntityRotationParameter,e))}else{let t=e-this._lastTime;this._lastTime=e;let i=this._rotate.x+t*this._speed.x,n=this._rotate.y+t*this._speed.y,r=this._rotate.z+t*this._speed.z;this._rotate=new _0x11ff81(i,n,r)}return this._rotate}}}const _0x3edec0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xcbebed=_0x3edec0(void 0,(function(){return _0xcbebed.toString().search("(((.+)+)+)+$").toString().constructor(_0xcbebed).search("(((.+)+)+)+$")}));_0xcbebed();class _0x109a17{constructor(e,t){this._geoEntityScaleParameter=e,this._speed=void 0,this._startTime=t,this._cyclicStartTime=void 0,this._lastTime=void 0,this._isBack=!1,this._isFinished=!1,this._scale=void 0,this._init(e,t)}_init(e,t){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t))return void(this._isFinished=!0);let i=1e3*e.getTime();if(i<0)return void(this._isFinished=!0);let n=e.getStartScale(),r=e.getEndScale();this._isBack&&(n=e.getEndScale(),r=e.getStartScale()),this._speed=0,e.isGradient()&&(this._speed=(r-n)/i),this._cyclicStartTime=t,this._lastTime=t,this._scale=n,this._isFinished=!1}_caclulate(e){if(WebGLPlot$f.defined(this._geoEntityScaleParameter)){if(this._isFinished)return this._scale;if(e-this._startTime>1e3*this._geoEntityScaleParameter.getTotalTime()&&(this._isFinished=!0),e-this._cyclicStartTime>1e3*this._geoEntityScaleParameter.getTime()){let t=this._geoEntityScaleParameter.getCyclicType();t==_0x12cd7b.NO?(this._isFinished=!0,this._scale=this._geoEntityScaleParameter.getEndScale()):t==_0x12cd7b.ONEWAY?(this._scale=this._geoEntityScaleParameter.getEndScale(),this._isFinished||this._init(this._geoEntityScaleParameter,e)):t==_0x12cd7b.BOTHWAY&&(this._isBack?this._scale=this._geoEntityScaleParameter.getStartScale():this._scale=this._geoEntityScaleParameter.getEndScale(),this._isBack=!this._isBack,this._isFinished||this._init(this._geoEntityScaleParameter,e))}else{let t=e-this._lastTime;this._lastTime=e,this._scale+=t*this._speed}return this._scale}}}const _0x25eae7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2658e5=_0x25eae7(void 0,(function(){return _0x2658e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x2658e5).search("(((.+)+)+)+$")}));_0x2658e5();class _0x47d1ee{constructor(e,t,i){this._deductionScript=e,this._executeManagerCalc=t,this._currentGroupIndex=i,this._currentGeoEntityBasicParameter=void 0,this._currentGeoEntityEffectParameter=void 0,this._currentGeoEntityMoveParameter=void 0,this._currentGeoEntityRotationParameter=void 0,this._currentGeoEntityScaleParameter=void 0,this._geoEntity=void 0,this._finishTime=void 0,this._geoEntityMoveCalc=void 0,this._geoEntityRotationCalc=void 0,this._geoEntityScaleCalc=void 0,this._position=void 0,this._scale=void 0,this._rotation=void 0,this._startTime=void 0}_getGeoEntityUUID(){return this._deductionScript.getGeoEntityUUID()}_setGeoEntityMoveParameter(e,t){this._geoEntityMoveCalc=new _0x3139ed(this._deductionScript.getGeoEntityUUID(),e,t,this._executeManagerCalc,this._currentGroupIndex,this._position,this._rotation)}_setGeoEntityRotationParameter(e,t){this._geoEntityRotationCalc=new _0x177623(e,t)}_setGeoEntityScaleParameter(e,t){this._geoEntityScaleCalc=new _0x109a17(e,t)}_getPosition(){return this._position}_start(e){this._startTime=e,this._geoEntity=_0x41dd10.getInstance().getGeoEntityManager().getGeoEntityByUUID(this._deductionScript.getGeoEntityUUID()),WebGLPlot$f.defined(this._geoEntity)&&(this._position=this._geoEntity.getGeoEntityParameter().getPosition(),this._rotation=this._geoEntity.getGeoEntityParameter().getModelRotate(),this._scale=this._geoEntity.getGeoEntityParameter().getModelScale())}_excuteMove(e){if(!WebGLPlot$f.defined(this._geoEntityMoveCalc))return;let t={},i=this._geoEntityMoveCalc._caclulate(e);return WebGLPlot$f.defined(i)&&(WebGLPlot$f.defined(i.position)&&(t.position=i.position),WebGLPlot$f.defined(i.rotation)&&(t.moveRotate=i.rotation)),t}_excuteRotation(e){if(!WebGLPlot$f.defined(this._geoEntityRotationCalc))return;let t=this._geoEntityRotationCalc._caclulate(e);return WebGLPlot$f.defined(t)?t:void 0}_excuteScale(e){if(!WebGLPlot$f.defined(this._geoEntityScaleCalc))return;let t=this._geoEntityScaleCalc._caclulate(e);return WebGLPlot$f.defined(t)?t:void 0}_isLegal(e){if(!WebGLPlot$f.defined(e))return!1;let t=e._getGeoEntityParameter();return!!(t._isModelPathUpdate&&t._isVisibleUpdate&&t._isDotPlotLibIDUpdate&&t._isDotPlotCodeUpdate&&t._isDotPlotStyleUpdate&&t._isPicturePathUpdate&&t._isShowModeUpdate&&t._isDistanceChangeModeUpdate&&t._isChangeModeDistanceUpdate)}_execute(e){if(this._isDeductionScriptExecuteStop(e))return;let t=e-this._startTime,i=t/1e3,n=this._deductionScript.getGeoEntityBasicParameterTimes();for(let e=0;e<n.length;e++){let t=n[e],r=this._deductionScript.getGeoEntityBasicParameter(t);if(i>=t){if(e===n.length-1){this._currentGeoEntityBasicParameter=r.clone();break}if(i<n[e+1]){this._currentGeoEntityBasicParameter=r.clone();break}}}let r=this._deductionScript.getGeoEntityEffectParameterTimes();for(let e=0;e<r.length;e++){let t=r[e],n=this._deductionScript.getGeoEntityEffectParameter(t);if(i>=t){if(e===r.length-1){this._currentGeoEntityEffectParameter=n;break}if(i<r[e+1]){this._currentGeoEntityEffectParameter=n;break}}}let o,a,s=this._deductionScript.getGeoEntityMoveParameterTimes();for(let e=0;e<s.length;e++){let t=s[e],n=this._deductionScript.getGeoEntityMoveParameter(t);if(i>=t){if(e===s.length-1){o=n,a=1e3*t;break}if(i<s[e+1]){o=n,a=1e3*t;break}}}let l,u,c=this._deductionScript.getGeoEntityRotationParameterTimes();for(let e=0;e<c.length;e++){let t=c[e],n=this._deductionScript.getGeoEntityRotationParameter(t);if(i>=t){if(e===c.length-1){l=n,u=1e3*t;break}if(i<c[e+1]){l=n,u=1e3*t;break}}}let h,d,f=this._deductionScript.getGeoEntityScaleParameterTimes();for(let e=0;e<f.length;e++){let t=f[e],n=this._deductionScript.getGeoEntityScaleParameter(t);if(i>=t){if(e===f.length-1){h=n,d=1e3*t;break}if(i<f[e+1]){h=n,d=1e3*t;break}}}!WebGLPlot$f.defined(this._currentGeoEntityBasicParameter)&&WebGLPlot$f.defined(this._geoEntity)&&(this._currentGeoEntityBasicParameter=new _0x78fecc,this._currentGeoEntityBasicParameter._UUID="InitGeoEntityBasicParameter",this._currentGeoEntityBasicParameter._geoEntityParameter=this._geoEntity.getGeoEntityParameter()),WebGLPlot$f.defined(this._currentGeoEntityEffectParameter)||(this._currentGeoEntityEffectParameter=new _0x25bff7,this._currentGeoEntityEffectParameter._UUID="InitGeoEntityEffectParameter",WebGLPlot$f.defined(this._geoEntity)&&this._geoEntity.getGeoEntityEffects().forEach((e=>{this._currentGeoEntityEffectParameter._geoEntityEffects.push(e.clone())}))),WebGLPlot$f.defined(o)&&(!WebGLPlot$f.defined(this._currentGeoEntityMoveParameter)||this._currentGeoEntityMoveParameter.getUUID()!=o.getUUID())&&(this._currentGeoEntityMoveParameter=o,this._setGeoEntityMoveParameter(o,a)),WebGLPlot$f.defined(l)&&(!WebGLPlot$f.defined(this._currentGeoEntityRotationParameter)||this._currentGeoEntityRotationParameter.getUUID()!=l.getUUID())&&(this._currentGeoEntityRotationParameter=l,this._setGeoEntityRotationParameter(l,u)),WebGLPlot$f.defined(h)&&(!WebGLPlot$f.defined(this._currentGeoEntityScaleParameter)||this._currentGeoEntityScaleParameter.getUUID()!=h.getUUID())&&(this._currentGeoEntityScaleParameter=h,this._setGeoEntityScaleParameter(h,d));let p={position:this._position,rotation:this._rotation,scale:this._scale};p.UUID=this._deductionScript.getGeoEntityUUID(),WebGLPlot$f.defined(this._currentGeoEntityMoveParameter)&&(p.geoEntityMoveParameter={UUID:this._currentGeoEntityMoveParameter.getUUID(),geoEntityMoveParameter:this._currentGeoEntityMoveParameter}),WebGLPlot$f.defined(this._currentGeoEntityBasicParameter)&&(p.geoEntityBasicParameter={UUID:this._currentGeoEntityBasicParameter.getUUID(),geoEntityBasicParameter:this._currentGeoEntityBasicParameter}),WebGLPlot$f.defined(this._currentGeoEntityEffectParameter)&&(p.geoEntityEffectParameter={UUID:this._currentGeoEntityEffectParameter.getUUID(),geoEntityEffectParameter:this._currentGeoEntityEffectParameter});let _=this._excuteMove(t),m=this._excuteRotation(t),g=this._excuteScale(t);return WebGLPlot$f.defined(_)&&WebGLPlot$f.defined(_.position)&&(p.position=_.position),WebGLPlot$f.defined(_)&&WebGLPlot$f.defined(_.moveRotate)&&(p.rotation=_.moveRotate),WebGLPlot$f.defined(m)&&(p.rotation=new _0x11ff81(p.rotation.x+m.x,p.rotation.y+m.y,p.rotation.z+m.z)),WebGLPlot$f.defined(g)&&(p.scale=g),p}_isDeductionScriptExecuteStop(e){let t=!1,i=this._deductionScript.getGeoEntityMoveParameterTimes();if(0===i.length)t=!0;else{let e=i[i.length-1];WebGLPlot$f.defined(this._currentGeoEntityMoveParameter)&&this._currentGeoEntityMoveParameter.getUUID()===this._deductionScript.getGeoEntityMoveParameter(e).getUUID()&&(!WebGLPlot$f.defined(this._geoEntityMoveCalc)||!0===this._geoEntityMoveCalc._isFinished)&&(t=!0)}let n=!1,r=this._deductionScript.getGeoEntityRotationParameterTimes();if(0===r.length)n=!0;else{let e=r[r.length-1];WebGLPlot$f.defined(this._currentGeoEntityRotationParameter)&&this._currentGeoEntityRotationParameter.getUUID()===this._deductionScript.getGeoEntityRotationParameter(e).getUUID()&&(!WebGLPlot$f.defined(this._geoEntityRotationCalc)||!0===this._geoEntityRotationCalc._isFinished)&&(n=!0)}let o=!1,a=this._deductionScript.getGeoEntityScaleParameterTimes();if(0===a.length)o=!0;else{let e=a[a.length-1];WebGLPlot$f.defined(this._currentGeoEntityScaleParameter)&&this._currentGeoEntityScaleParameter.getUUID()===this._deductionScript.getGeoEntityScaleParameter(e).getUUID()&&(!WebGLPlot$f.defined(this._geoEntityScaleCalc)||!0===this._geoEntityScaleCalc._isFinished)&&(o=!0)}let s=!1,l=this._deductionScript.getGeoEntityBasicParameterTimes();if(0===l.length)s=!0;else{let e=l[l.length-1];WebGLPlot$f.defined(this._currentGeoEntityBasicParameter)&&this._currentGeoEntityBasicParameter.getUUID()===this._deductionScript.getGeoEntityBasicParameter(e).getUUID()&&(s=!0)}let u=!1,c=this._deductionScript.getGeoEntityEffectParameterTimes();if(0===c.length)u=!0;else{let e=c[c.length-1];WebGLPlot$f.defined(this._currentGeoEntityEffectParameter)&&this._currentGeoEntityEffectParameter.getUUID()===this._deductionScript.getGeoEntityEffectParameter(e).getUUID()&&(u=!0)}if(t&&n&&o&&s&&u){if(this._deductionScript.getDelayFinishTime()>0){if(!WebGLPlot$f.defined(this._finishTime))return this._finishTime=e,!1;if(e-this._finishTime<=1e3*this._deductionScript.getDelayFinishTime())return!1}return!0}return!1}}const _0xa45c3b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x30935d=_0xa45c3b(void 0,(function(){return _0x30935d.toString().search("(((.+)+)+)+$").toString().constructor(_0x30935d).search("(((.+)+)+)+$")}));_0x30935d();class _0x101f8e{constructor(){this._deductionScriptGroups=void 0,this._allActions=void 0}static getInstance(){return _0x101f8e._instance||(_0x101f8e._instance=new _0x101f8e),_0x101f8e._instance}_reset(){this._deductionScriptGroups=void 0,this._allActions=void 0}_getAllActions(){return this._allActions}_containDeductionScriptGeoEntity(e,t){let i=e.getDeductionScripts();for(let e=0;e<i.length;e++)if(i[e].getGeoEntityUUID()===t)return i[e]}_calcDeductionScript(e,t,i,n,r){if(-1!==t.indexOf(n.getUUID()))return;n.getGeoEntityMoveParameterTimes().forEach((o=>{let a=n.getGeoEntityMoveParameter(o),s=a.getOriginGeoEntityUUID(),l=a.getTargetGeoEntityUUID();if(WebGLPlot$f.defined(s)&&s!==n.getGeoEntityUUID()){let n=this._containDeductionScriptGeoEntity(i,s);WebGLPlot$f.defined(n)&&-1===t.indexOf(n.getUUID())&&this._calcDeductionScript(e,t,i,n,r)}if(WebGLPlot$f.defined(l)){let n=this._containDeductionScriptGeoEntity(i,l);WebGLPlot$f.defined(n)&&-1===t.indexOf(n.getUUID())&&this._calcDeductionScript(e,t,i,n,r)}})),t.push(n.getUUID()),e.set(n.getGeoEntityUUID(),[]);let o=new _0x47d1ee(n,this,r);o._start(0);let a=10;for(;;){let t=o._execute(a);if(!WebGLPlot$f.defined(t))break;t.time=a,e.get(n.getGeoEntityUUID()).push(t),a+=10}}_getPosition(e,t,i){let n;if(WebGLPlot$f.defined(this._allActions)){let r=this._allActions.groupActions;if(r.length>0){let o=r[e].actions;if(o.has(t)){let e=o.get(t);for(let t=0;t<e.length;t++){let r=e[t];if(i>=r.time){if(t===e.length-1){n=r.position;break}if(i<e[t+1].time){n=r.position;break}}}}if(!WebGLPlot$f.defined(n))for(let i=e-1;i>=0;i--){let e=r[i].actions;if(e.has(t)){let i=e.get(t);i.length>0&&(n=i[i.length-1].position);break}}}}if(!WebGLPlot$f.defined(n)){let e=_0x41dd10.getInstance().getGeoEntityManager().getGeoEntityByUUID(t);WebGLPlot$f.defined(e)&&(n=e.getGeoEntityParameter().getPosition())}return n}_calcute(){this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._allActions={};let e=0,t=[];this._allActions.groupActions=t;for(let i=0;i<this._deductionScriptGroups.length;i++){let n=this._deductionScriptGroups[i],r={};t.push(r);let o=new Map;r.actions=o;let a=[],s=n.getDeductionScriptExtend()._getDeductionScript();this._calcDeductionScript(o,a,n,s,i),n.getDeductionScripts().forEach((e=>{this._calcDeductionScript(o,a,n,e,i)}));let l=0;o.forEach(((e,t)=>{if(e.length>0){let t=e[e.length-1].time;t>l&&(l=t)}})),r.time=l,e+=l}this._allActions.time=e,console.log(this._allActions)}_findGeoEntityMoveParameter(e){if(WebGLPlot$f.defined(this._deductionScriptGroups))for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t].getDeductionScripts();for(let n=0;n<i.length;n++){let r=i[n],o=r.getGeoEntityMoveParameterTimes();for(let i=0;i<o.length;i++){let n=r.getGeoEntityMoveParameter(o[i]);if(n.getUUID()===e)return{geoEntityMoveParameter:n,deductionScript:r,groupIndex:t,time:o[i]}}}}}_indexOfDeductionScript(e){if(WebGLPlot$f.defined(this._deductionScriptGroups))for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t].getDeductionScripts();for(let n=0;n<i.length;n++)if(i[n].getUUID()===e)return t}return-1}_calcGeoEntityMoveParameter(e,t,i){let n=this._getMoveParameterTime(e.getUUID()),r=this._getMoveParameterSpeed(e.getUUID());WebGLPlot$f.defined(n)&&WebGLPlot$f.defined(r)&&(WebGLPlot$f.defined(e.getOriginGeoEntityUUID())&&e.setOriginPosition(this._getPosition(i,e.getOriginGeoEntityUUID(),1e3*t)),WebGLPlot$f.defined(e.getTargetGeoEntityUUID())&&WebGLPlot$f.defined(n)&&e.setTargetPosition(this._getPosition(i,e.getTargetGeoEntityUUID(),1e3*(t+n))),e.setTime(n),e.setSpeed(r))}_getMoveParameterTime(e){let t;if(WebGLPlot$f.defined(this._deductionScriptGroups)){let i=this._findGeoEntityMoveParameter(e);if(WebGLPlot$f.defined(i)){t=i.geoEntityMoveParameter.getTime();let n=i.groupIndex,r=i.deductionScript.getGeoEntityUUID();if(!i.geoEntityMoveParameter.isTimeMode()&&WebGLPlot$f.defined(n)&&WebGLPlot$f.defined(r)&&WebGLPlot$f.defined(this._allActions)){let i=this._allActions.groupActions;if(n<i.length){let o=i[n].actions;if(o.has(r)){let i=o.get(r);if(WebGLPlot$f.defined(i)){let n;for(let r=0;r<i.length;r++){let o=i[r];if(Cesium.defined(o.geoEntityMoveParameter)&&o.geoEntityMoveParameter.UUID===e)WebGLPlot$f.defined(n)||(n=o.time);else if(WebGLPlot$f.defined(n)){t=(o.time-n)/1e3;break}}Cesium.defined(n)&&!Cesium.defined(t)&&(t=(i[i.length-1].time-n)/1e3)}}}}}}return t}_getMoveParameterSpeed(e){let t;if(WebGLPlot$f.defined(this._deductionScriptGroups)){let i=this._findGeoEntityMoveParameter(e);if(WebGLPlot$f.defined(i)){t=i.geoEntityMoveParameter.getSpeed();let n=i.groupIndex,r=i.deductionScript.getGeoEntityUUID();if(i.geoEntityMoveParameter.isTimeMode()&&WebGLPlot$f.defined(n)&&WebGLPlot$f.defined(r)&&WebGLPlot$f.defined(this._allActions)){let i,o,a=this._allActions.groupActions;if(n<a.length){let t=a[n].actions;if(t.has(r)){let n=t.get(r);if(WebGLPlot$f.defined(n)){let t;for(let r=0;r<n.length;r++){let a=n[r];if(Cesium.defined(a.geoEntityMoveParameter)&&a.geoEntityMoveParameter.UUID===e)WebGLPlot$f.defined(i)||(t=a.time,i=[]),i.push(a.position);else if(WebGLPlot$f.defined(t)){o=(a.time-t)/1e3;break}}WebGLPlot$f.defined(t)&&!WebGLPlot$f.defined(o)&&(o=(n[n.length-1].time-t)/1e3)}}}let s=[];i.forEach((e=>{s.push(_0x2887b9.degreesToCartesian3(e))})),t=_0x2887b9.getAllDistance(s)/o}}}return t}_getDependsDeductionScriptInfos(e,t){let i=[];if(WebGLPlot$f.defined(this._deductionScriptGroups)&&e<this._deductionScriptGroups.length)for(let n=e;n<this._deductionScriptGroups.length;n++)this._deductionScriptGroups[n].getDeductionScripts().forEach((r=>{if(r.getGeoEntityUUID()!==t||n!==e){let e=r.getGeoEntityMoveParameterTimes();for(let o=0;o<e.length;o++){let a=r.getGeoEntityMoveParameter(e[o]);(a.getOriginGeoEntityUUID()===t||a.getTargetGeoEntityUUID()===t)&&i.push({deductionScript:r,groupIndex:n})}}}));return i}_calcFlowMoveParameter(e,t,i){e.getGeoEntityMoveParameterTimes().forEach((n=>{if(n>t){let t=e.getGeoEntityMoveParameter(n);this._calcGeoEntityMoveParameter(t,n,i)}}))}_updateGeoEntityMoveParameter(e,t,i){let n=this._indexOfDeductionScript(e.getUUID());this._calcGeoEntityMoveParameter(i,t,n),this._calcFlowMoveParameter(e,t,n),this._getDependsDeductionScriptInfos(n,e.getGeoEntityUUID()).forEach((e=>{let t=e.deductionScript.getGeoEntityMoveParameterTimes();t.length>0&&this._updateGeoEntityMoveParameter(e.deductionScript,t[0],e.deductionScript.getGeoEntityMoveParameter(t[0]))}))}_removeGeoEntityMoveParameter(e,t){let i=this._indexOfDeductionScript(e.getUUID());this._calcFlowMoveParameter(e,t,i),this._getDependsDeductionScriptInfos(i,e.getGeoEntityUUID()).forEach((e=>{let t=e.deductionScript.getGeoEntityMoveParameterTimes();t.length>0&&this._updateGeoEntityMoveParameter(e.deductionScript,t[0],e.deductionScript.getGeoEntityMoveParameter(t[0]))}))}}const _0x2f80c0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xa82966=_0x2f80c0(void 0,(function(){return _0xa82966.toString().search("(((.+)+)+)+$").toString().constructor(_0xa82966).search("(((.+)+)+)+$")}));_0xa82966();class _0x39c042{constructor(e){this._UUID=WebGLPlot$f.createGuid(),this._geoEntityUUID=e,this._delayFinishTime=0,this._geoEntityBasicParameters=new Map,this._geoEntityEffectParameters=new Map,this._geoEntityMoveParameters=new Map,this._geoEntityRotationParameters=new Map,this._geoEntityScaleParameters=new Map,this._isModified=!1}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){_0x41dd10.getInstance()._saveDeductionScript(!1)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$f.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$f.defined(t.geoEntityUUID)&&(this._geoEntityUUID=t.geoEntityUUID),WebGLPlot$f.defined(t.delayFinishTime)&&(this._delayFinishTime=t.delayFinishTime),WebGLPlot$f.defined(t.geoBaseEntityParameters)&&(this._geoEntityBasicParameters.clear(),t.geoBaseEntityParameters.forEach((e=>{let t=e.time,i=new _0x78fecc;i._fromJson(e.geoEntityBasicParameter),this._geoEntityBasicParameters.set(t,i)}))),WebGLPlot$f.defined(t.geoEntityEffectParameters)&&(this._geoEntityEffectParameters.clear(),t.geoEntityEffectParameters.forEach((e=>{let t=e.time,i=new _0x25bff7;i._fromJson(e.geoEntityEffectParameter),this._geoEntityEffectParameters.set(t,i)}))),WebGLPlot$f.defined(t.geoEntityMoveParameters)&&(this._geoEntityMoveParameters.clear(),t.geoEntityMoveParameters.forEach((e=>{let t=e.time,i=new _0x354a71;i._fromJson(e.geoEntityMoveParameter),this._geoEntityMoveParameters.set(t,i)}))),WebGLPlot$f.defined(t.geoEntityRotationParameters)&&(this._geoEntityRotationParameters.clear(),t.geoEntityRotationParameters.forEach((e=>{let t=e.time,i=new _0x537142;i._fromJson(e.geoEntityRotationParameter),this._geoEntityRotationParameters.set(t,i)}))),WebGLPlot$f.defined(t.geoEntityScaleParameters)&&(this._geoEntityScaleParameters.clear(),t.geoEntityScaleParameters.forEach((e=>{let t=e.time,i=new _0xbe66a7;i._fromJson(e.geoEntityScaleParameter),this._geoEntityScaleParameters.set(t,i)})))}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityUUID")||(e.geoEntityUUID=this._geoEntityUUID),e.hasOwnProperty("delayFinishTime")||(e.delayFinishTime=this._delayFinishTime),e.hasOwnProperty("geoBaseEntityParameters")||(e.geoBaseEntityParameters=[],this._geoEntityBasicParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityBasicParameter")||(n.geoEntityBasicParameter=t._toJson()),e.geoBaseEntityParameters.push(n)}))),e.hasOwnProperty("geoEntityEffectParameters")||(e.geoEntityEffectParameters=[],this._geoEntityEffectParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityEffectParameter")||(n.geoEntityEffectParameter=t._toJson()),e.geoEntityEffectParameters.push(n)}))),e.hasOwnProperty("geoEntityMoveParameters")||(e.geoEntityMoveParameters=[],this._geoEntityMoveParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityMoveParameter")||(n.geoEntityMoveParameter=t._toJson()),e.geoEntityMoveParameters.push(n)}))),e.hasOwnProperty("geoEntityRotationParameters")||(e.geoEntityRotationParameters=[],this._geoEntityRotationParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityRotationParameter")||(n.geoEntityRotationParameter=t._toJson()),e.geoEntityRotationParameters.push(n)}))),e.hasOwnProperty("geoEntityScaleParameters")||(e.geoEntityScaleParameters=[],this._geoEntityScaleParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityScaleParameter")||(n.geoEntityScaleParameter=t._toJson()),e.geoEntityScaleParameters.push(n)}))),JSON.stringify(e)}_getTotalTime(){let e=0,t=this.getGeoEntityBasicParameterTimes();if(t.length>0){let i=1e3*t[t.length-1];e<i&&(e=i)}let i=this.getGeoEntityEffectParameterTimes();if(i.length>0){let t=1e3*i[i.length-1];e<t&&(e=t)}let n=this.getGeoEntityMoveParameterTimes();if(n.length>0){let t=n[n.length-1],i=this.getGeoEntityMoveParameter(t),r=1e3*(n[n.length-1]+i.getTime());e<r&&(e=r)}let r=this.getGeoEntityRotationParameterTimes();if(r.length>0){let t=r[r.length-1],i=this.getGeoEntityRotationParameter(t),n=1e3*(r[r.length-1]+i.getTotalTime());e<n&&(e=n)}let o=this.getGeoEntityScaleParameterTimes();if(o.length>0){let t=o[o.length-1],i=this.getGeoEntityScaleParameter(t),n=1e3*(o[o.length-1]+i.getTotalTime());e<n&&(e=n)}return e+=1e3*this._delayFinishTime,e}getGeoEntityUUID(){return this._geoEntityUUID}getUUID(){return this._UUID}getGeoEntityBasicParameterTimes(){let e=[];return this._geoEntityBasicParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityBasicParameter(e){let t;return this._geoEntityBasicParameters.has(e)&&(t=this._geoEntityBasicParameters.get(e)),t}setGeoEntityBasicParameter(e,t){this._geoEntityBasicParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityBasicParameter(e){this._geoEntityBasicParameters.has(e)&&(this._geoEntityBasicParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityEffectParameterTimes(){let e=[];return this._geoEntityEffectParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityEffectParameter(e){let t;return this._geoEntityEffectParameters.has(e)&&(t=this._geoEntityEffectParameters.get(e)),t}setGeoEntityEffectParameter(e,t){this._geoEntityEffectParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityEffectParameter(e){this._geoEntityEffectParameters.has(e)&&(this._geoEntityEffectParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityMoveParameterTimes(){let e=[];return this._geoEntityMoveParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityMoveParameter(e){let t;return this._geoEntityMoveParameters.has(e)&&(t=this._geoEntityMoveParameters.get(e)),t}setGeoEntityMoveParameter(e,t){this._geoEntityMoveParameters.set(e,t),_0x101f8e.getInstance()._calcute(),_0x101f8e.getInstance()._updateGeoEntityMoveParameter(this,e,t),this._isModified=!0,this._save()}removeGeoEntityMoveParameter(e){this._geoEntityMoveParameters.has(e)&&(this._geoEntityMoveParameters.delete(e),_0x101f8e.getInstance()._calcute(),_0x101f8e.getInstance()._removeGeoEntityMoveParameter(this,e),this._isModified=!0,this._save())}setDelayFinishTime(e){this._delayFinishTime=e,this._isModified=!0,this._save()}getDelayFinishTime(){return this._delayFinishTime}getGeoEntityRotationParameterTimes(){let e=[];return this._geoEntityRotationParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityRotationParameter(e){let t;return this._geoEntityRotationParameters.has(e)&&(t=this._geoEntityRotationParameters.get(e)),t}setGeoEntityRotationParameter(e,t){this._geoEntityRotationParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityRotationParameter(e){this._geoEntityRotationParameters.has(e)&&(this._geoEntityRotationParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityScaleParameterTimes(){let e=[];return this._geoEntityScaleParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityScaleParameter(e){let t;return this._geoEntityScaleParameters.has(e)&&(t=this._geoEntityScaleParameters.get(e)),t}setGeoEntityScaleParameter(e,t){this._geoEntityScaleParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityScaleParameter(e){this._geoEntityScaleParameters.has(e)&&(this._geoEntityScaleParameters.delete(e),this._isModified=!0,this._save())}}const _0x47f773=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4beb46=_0x47f773(void 0,(function(){return _0x4beb46.toString().search("(((.+)+)+)+$").toString().constructor(_0x4beb46).search("(((.+)+)+)+$")}));_0x4beb46();class _0x3e4e1c{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityMoveParameter=void 0,this._speed=0,this._curvePath3D=[],this._startTime=void 0,this._isFinished=!1,this._position=void 0,this._rotation=void 0,this._geoEntityMoveParameter=void 0,this._allDistance=void 0,this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityMoveParameterUUID=void 0}_init(e,t,i,n){this._geoEntityMoveParameter=e,this._startTime=t,this._position=i,this._rotation=n;let r=e.getSpeed()/1e3;if(r>0){let t=[],i=e.getPathPoint3D(),n=e.getScalePoint2D(),o=e.getOriginPosition(),a=e.getTargetPosition();if(WebGLPlot$f.defined(i))WebGLPlot$f.defined(o)&&t.push(o),i.forEach((e=>{t.push(e)})),WebGLPlot$f.defined(a)&&t.push(a);else if(WebGLPlot$f.defined(n)){if(WebGLPlot$f.defined(o)&&WebGLPlot$f.defined(a)){let e=[o,a];t=[o,a];let i=_0x2887b9.getAllDistance(e);n.forEach((n=>{let r=i*n.x,o=_0x2887b9.getPositionByDistance(e,r);t.splice(t.length-1,0,new WebGLPlot$f.Cartesian3(o.point.x,o.point.y,o.point.z+n.y))}))}}else WebGLPlot$f.defined(o)&&t.push(o),WebGLPlot$f.defined(a)&&t.push(a);if(t=this._convertToCartesian3(t),t.length>=2&&_0x2887b9.getAllDistance(t)>.001){if(e.isCurvePath()){let e=this._createCurve3D(t);this._curvePath3D=e.curvePath3D}else this._curvePath3D=t;this._speed=r}}this._allDistance=_0x2887b9.getAllDistance(this._curvePath3D),this._isFinished=!1}_update(e,t,i){let n={},r=e/1e3,o=this._getCurrentGeoEntityMoveParameter(r);if(WebGLPlot$f.defined(o.geoEntityMoveParameter)&&WebGLPlot$f.defined(o.geoEntityMoveParameterActionTime)){this._currentGeoEntityMoveParameterUUID!=o.geoEntityMoveParameter.getUUID()&&(this._currentGeoEntityMoveParameterUUID=o.geoEntityMoveParameter.getUUID(),this._init(o.geoEntityMoveParameter,o.geoEntityMoveParameterActionTime,t,i));let r=this._caclulate(e);WebGLPlot$f.defined(r)&&(n.position=r.position,n.isCurrent=!0,n.finishTime=o.geoEntityMoveParameterActionTime+1e3*this._geoEntityMoveParameter.getTime(),n.isFinished=this._isFinished,n.rotation=r.rotation)}else{let e,r,o;if(this._groupIndex>0)for(let t=this._groupIndex-1;t>=0;t--){let i=this._deductionScriptGroups[t]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$f.defined(i)){let n=i.getGeoEntityMoveParameterTimes();if(n.length>0){e=n[n.length-1],r=i.getGeoEntityMoveParameter(e),o=t;break}}}if(WebGLPlot$f.defined(r)){let t=new _0x3e4e1c;t._init(r);let i,a=t._getFinalPosition(),s=t._curvePath3D;if(s.length>1){let e=_0x2887b9.getPitch(s[s.length-2],s[s.length-1]),t=_0x2887b9.getHeading(s[s.length-2],s[s.length-1]);e&&t&&(i=new _0x11ff81(0),i.x=WebGLPlot$f.CesiumMath.toDegrees(e),i.z=WebGLPlot$f.CesiumMath.toDegrees(t))}n.position=a,n.isCurrent=!1,n.rotation=i,n.groupIndex=o,n.finishTime=1e3*(e+r.getTime())}else n.position=t,n.isCurrent=!1,n.rotation=i}return n}_getCurrentGeoEntityMoveParameter(e){let t,i,n=this._deductionScript.getGeoEntityMoveParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityMoveParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityMoveParameter:t,geoEntityMoveParameterActionTime:i}}_createCurve3D(e){let t=_0x2887b9.getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$f.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new Cesium.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_convertToCartesian3(e){let t=[];return e.forEach((e=>{t.push(_0x2887b9.degreesToCartesian3(e))})),t}_getFinalPosition(){let e=this._geoEntityMoveParameter.getTargetPosition();if(WebGLPlot$f.defined(e))return e;let t=this._geoEntityMoveParameter.getPathPoint3D();return t.length>0&&(e=t[t.length-1]),WebGLPlot$f.defined(e)||(e=this._geoEntityMoveParameter.getOriginPosition(),WebGLPlot$f.defined(e))?e:void 0}_caclulate(e){if(!this._isFinished)if(this._geoEntityMoveParameter.isTimeMode()&&0===this._geoEntityMoveParameter.getTime())this._isFinished=!0,this._position=this._getFinalPosition();else{let t=(e-this._startTime)*this._speed;if(t>this._allDistance)this._isFinished=!0,this._currentGeoEntityMoveParameterUUID=void 0;else{let e=_0x2887b9.getPositionByDistance(this._curvePath3D,t),i=e.index;if(i<=this._curvePath3D.length&&i>=0){if(this._position=_0x2887b9.cartesian3ToDegrees(e.point),i!==this._curvePath3D.length-1){let t=this._curvePath3D[i+1];if(e.point.x!==t.x||e.point.y!==t.y||e.point.z!==t.z){let i=_0x2887b9.getPitch(e.point,t),n=_0x2887b9.getHeading(e.point,t);if(i&&n){let e=new _0x11ff81(0);e.x=WebGLPlot$f.CesiumMath.toDegrees(i),e.z=WebGLPlot$f.CesiumMath.toDegrees(n),this._rotation=e}}}}else this._isFinished=!0,this._currentGeoEntityMoveParameterUUID=void 0}if(this._isFinished){let e=this._getFinalPosition();if(WebGLPlot$f.defined(e)&&(this._position=e),!WebGLPlot$f.defined(this._curvePath3D)){let e=this._geoEntityMoveParameter.getPathPoint3D();if(WebGLPlot$f.defined(e)&&e.length>0&&e.length>1){let t=_0x2887b9.getPitch(e[e.length-2],e[e.length-1]),i=_0x2887b9.getHeading(e[e.length-2],e[e.length-1]);if(t&&i){let e=new _0x11ff81(0);e.x=WebGLPlot$f.CesiumMath.toDegrees(t),e.z=WebGLPlot$f.CesiumMath.toDegrees(i),this._rotation=e}}}}}return{position:this._position,rotation:this._rotation}}}const _0x8c6327=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xbdf4ac=_0x8c6327(void 0,(function(){return _0xbdf4ac.toString().search("(((.+)+)+)+$").toString().constructor(_0xbdf4ac).search("(((.+)+)+)+$")}));_0xbdf4ac();class _0x75e70a{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityRotationParameter=void 0,this._speed=void 0,this._startTime=void 0,this._isBack=!1,this._isFinished=!1,this._rotate=void 0,this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityRotationParameterUUID=void 0,this._startRotation=void 0,this._endRotation=void 0}_init(e,t){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t))return void(this._isFinished=!0);this._geoEntityRotationParameter=e,this._startTime=t,this._rotate=new _0x11ff81(0);let i=1e3*e.getTime();i<0?this._isFinished=!0:(this._startRotation=e.getStartRotation(),this._endRotation=e.getEndRotation(),(!WebGLPlot$f.defined(this._startRotation)||!WebGLPlot$f.defined(this._endRotation)||this._startRotation.x===this._endRotation.x&&this._startRotation.y===this._endRotation.y&&this._startRotation.z===this._endRotation.z)&&(this._isFinished=!0),e.isGradient()&&(this._speed=new _0x11ff81((this._endRotation.x-this._startRotation.x)/i,(this._endRotation.y-this._startRotation.y)/i,(this._endRotation.z-this._startRotation.z)/i),e.getCyclicType()==_0x12cd7b.BOTHWAY&&(this._speed=new _0x11ff81(2*this._speed.x,2*this._speed.y,2*this._speed.z))),this._isFinished=!1)}_update(e){let t=e/1e3,i=this._getCurrentGeoEntityRotationParameter(t);if(WebGLPlot$f.defined(i.geoEntityRotationParameter)&&WebGLPlot$f.defined(i.geoEntityRotationParameterActionTime))return this._currentGeoEntityRotationParameterUUID!=i.geoEntityRotationParameter.getUUID()&&(this._currentGeoEntityRotationParameterUUID=i.geoEntityRotationParameter.getUUID(),this._init(i.geoEntityRotationParameter,i.geoEntityRotationParameterActionTime)),{rotation:this._caclulate(e),isCurrent:!0,isFinished:this._isFinished};{let e,t,i;if(this._groupIndex>0)for(let n=this._groupIndex-1;n>=0;n--){let r=this._deductionScriptGroups[n]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$f.defined(r)){let o=r.getGeoEntityRotationParameterTimes();if(o.length>0){e=o[o.length-1],t=r.getGeoEntityRotationParameter(e),i=n;break}}}if(WebGLPlot$f.defined(t)){let n=new _0x75e70a;return n._init(t),{rotation:n._caclulate(1e3*t.getTotalTime()+1),isCurrent:!1,groupIndex:i,finishTime:1e3*(e+t.getTotalTime())}}return{rotation:new _0x11ff81(0),isCurrent:!1}}}_getCurrentGeoEntityRotationParameter(e){let t,i,n=this._deductionScript.getGeoEntityRotationParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityRotationParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityRotationParameter:t,geoEntityRotationParameterActionTime:i}}_caclulate(e){if(!WebGLPlot$f.defined(this._geoEntityRotationParameter))return;if(this._isFinished)return this._rotate;let t=this._geoEntityRotationParameter.getCyclicType(),i=1e3*this._geoEntityRotationParameter.getTime(),n=this._geoEntityRotationParameter.isGradient(),r=e-this._startTime;if(t==_0x12cd7b.NO)if(r>=i)this._isFinished=!0,this._rotate=this._endRotation.clone();else if(n){let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x11ff81(e,t,i)}else this._rotate=this._startRotation.clone();else{let e=1e3*this._geoEntityRotationParameter.getTotalTime();if(r>=e){this._isFinished=!0;let r=e%i;if(0===r)n?t==_0x12cd7b.ONEWAY?this._rotate=this._endRotation.clone():t==_0x12cd7b.BOTHWAY&&(this._rotate=this._startRotation.clone()):this._rotate=this._endRotation.clone();else if(n){if(t==_0x12cd7b.ONEWAY){let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x11ff81(e,t,i)}else if(t==_0x12cd7b.BOTHWAY){let e=i/2;if(r>e){let t=this._endRotation.x-(r-e)*this._speed.x,i=this._endRotation.y-(r-e)*this._speed.y,n=this._endRotation.z-(r-e)*this._speed.z;this._rotate=new _0x11ff81(t,i,n)}else{let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x11ff81(e,t,i)}}}else{let e=i/2;this._rotate=r>e?this._endRotation.clone():this._startRotation.clone()}}else{let e=r%i;if(n){if(t==_0x12cd7b.ONEWAY){let t=this._startRotation.x+e*this._speed.x,i=this._startRotation.y+e*this._speed.y,n=this._startRotation.z+e*this._speed.z;this._rotate=new _0x11ff81(t,i,n)}else if(t==_0x12cd7b.BOTHWAY){let t=i/2;if(e>t){let i=this._endRotation.x-(e-t)*this._speed.x,n=this._endRotation.y-(e-t)*this._speed.y,r=this._endRotation.z-(e-t)*this._speed.z;this._rotate=new _0x11ff81(i,n,r)}else{let t=this._startRotation.x+e*this._speed.x,i=this._startRotation.y+e*this._speed.y,n=this._startRotation.z+e*this._speed.z;this._rotate=new _0x11ff81(t,i,n)}}}else{let t=i/2;this._rotate=e>t?this._endRotation.clone():this._startRotation.clone()}}}return this._rotate}}const _0x6673dd=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x41812b=_0x6673dd(void 0,(function(){return _0x41812b.toString().search("(((.+)+)+)+$").toString().constructor(_0x41812b).search("(((.+)+)+)+$")}));_0x41812b();class _0x3f6390{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityScaleParameter=void 0,this._speed=void 0,this._startTime=void 0,this._cyclicStartTime=void 0,this._isBack=!1,this._isFinished=!1,this._scale=void 0,this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityScaleParameterUUID=void 0,this._startScale=void 0,this._endScale=void 0}_init(e,t,i){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(t))return void(this._isFinished=!0);this._geoEntityScaleParameter=e,this._startTime=t,this._scale=i;let n=1e3*e.getTime();n<0?this._isFinished=!0:(this._startScale=e.getStartScale(),WebGLPlot$f.defined(this._startScale)||(this._startScale=i),this._endScale=e.getEndScale(),WebGLPlot$f.defined(this._endScale)||(this._endScale=i),this._startScale!==this._endScale?(e.isGradient()&&(this._speed=(this._endScale-this._startScale)/n,this._geoEntityScaleParameter.getCyclicType()==_0x12cd7b.BOTHWAY&&(this._speed=2*this._speed)),this._isFinished=!1):this._isFinished=!0)}_update(e){let t=e/1e3,i=this._getCurrentGeoEntityScaleParameter(t);if(WebGLPlot$f.defined(i.geoEntityScaleParameter)&&WebGLPlot$f.defined(i.geoEntityScaleParameterActionTime))return this._currentGeoEntityScaleParameterUUID!=i.geoEntityScaleParameter.getUUID()&&(this._currentGeoEntityScaleParameterUUID=i.geoEntityScaleParameter.getUUID(),this._init(i.geoEntityScaleParameter,i.geoEntityScaleParameterActionTime)),this._caclulate(e);{let e,t;if(this._groupIndex>0)for(let i=this._groupIndex-1;i>=0;i--){let n=this._deductionScriptGroups[i]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$f.defined(n)){let i=n.getGeoEntityScaleParameterTimes();if(i.length>0){e=i[i.length-1],t=n.getGeoEntityScaleParameter(e);break}}}if(WebGLPlot$f.defined(t)){let e=new _0x3f6390;return e._init(t),e._caclulate(1e3*t.getTotalTime()+1)}return this._scale}}_getCurrentGeoEntityScaleParameter(e){let t,i,n=this._deductionScript.getGeoEntityScaleParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityScaleParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityScaleParameter:t,geoEntityScaleParameterActionTime:i}}_caclulate(e){if(!WebGLPlot$f.defined(this._geoEntityScaleParameter))return;if(this._isFinished)return this._scale;let t=this._geoEntityScaleParameter.getCyclicType(),i=1e3*this._geoEntityScaleParameter.getTime(),n=this._geoEntityScaleParameter.getStartScale();WebGLPlot$f.defined(n)||(n=this._initScale);let r=this._geoEntityScaleParameter.getEndScale();WebGLPlot$f.defined(n)||(r=this._initScale);let o=this._geoEntityScaleParameter.isGradient(),a=e-this._startTime;if(t==_0x12cd7b.NO)a>=i?(this._isFinished=!0,this._scale=r):this._scale=o?n+a*this._speed:this._initScale;else{let e=1e3*this._geoEntityScaleParameter.getTotalTime();if(a>=e){this._isFinished=!0;let a=e%i;if(0===a)o?t==_0x12cd7b.ONEWAY?this._scale=r:t==_0x12cd7b.BOTHWAY&&(this._scale=n):this._scale=r;else if(o){if(t==_0x12cd7b.ONEWAY)this._scale=n+a*this._speed;else if(t==_0x12cd7b.BOTHWAY){let e=i/2;this._scale=a>e?r-(a-e)*this._speed:n+a*this._speed}}else{let e=i/2;this._scale=a>e?r:n}}else{let e=a%i;if(o){if(t==_0x12cd7b.ONEWAY)this._scale=n+e*this._speed;else if(t==_0x12cd7b.BOTHWAY){let t=i/2;this._scale=e>t?r-(e-t)*this._speed:n+e*this._speed}}else{let t=i/2;this._scale=e>t?r:n}}}return this._scale}}const _0x392260=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x34cf6c=_0x392260(void 0,(function(){return _0x34cf6c.toString().search("(((.+)+)+)+$").toString().constructor(_0x34cf6c).search("(((.+)+)+)+$")}));_0x34cf6c();class _0x397ab1{constructor(e,t,i,n,r){this._geoEntity=e,this._moveGeoEntity=t,this._deductionScript=i,this._groupIndex=n,this._geoEntityStartVisible=r,this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityBasicParameterUUID=void 0}_setGeoEntityBasicParamerter(e){WebGLPlot$f.defined(this._moveGeoEntity)&&this._moveGeoEntity.setGeoEntityParameter(e._getGeoEntityParameter())}_caclulate(e){if(!WebGLPlot$f.defined(this._geoEntity)||!WebGLPlot$f.defined(this._deductionScript))return;let t,i=this._deductionScript.getGeoEntityBasicParameterTimes();for(let n=0;n<i.length;n++){let r=i[n],o=this._deductionScript.getGeoEntityBasicParameter(r);if(e>=r){if(n===i.length-1){t=o;break}if(e<i[n+1]){t=o;break}}}if(!WebGLPlot$f.defined(t)&&this._groupIndex>0)for(let e=this._groupIndex-1;e>=0;e--){let i=this._deductionScriptGroups[e]._getDeductionScriptByGeoEntityUUID(this._geoEntity.getUUID());if(WebGLPlot$f.defined(i)){let e=i.getGeoEntityBasicParameterTimes();if(e.length>0){t=i.getGeoEntityBasicParameter(e[e.length-1]);break}}}if(WebGLPlot$f.defined(t))return{geoEntityBasicParameter:t,geoEntityBasicParameterUUID:t.getUUID()};{let e=this._geoEntity.getGeoEntityParameter(),t=new _0x487d97;return t._update(e),t.setVisible(this._geoEntityStartVisible),{geoEntityBasicParameter:new _0x78fecc(t),geoEntityBasicParameterUUID:"initGeoEntityBasicParameter"}}}_update(e){let t=e/1e3,i=this._caclulate(t);WebGLPlot$f.defined(i)&&WebGLPlot$f.defined(i.geoEntityBasicParameter)&&this._currentGeoEntityBasicParameterUUID!==i.geoEntityBasicParameterUUID&&(this._setGeoEntityBasicParamerter(i.geoEntityBasicParameter),this._currentGeoEntityBasicParameterUUID=i.geoEntityBasicParameterUUID)}}const _0xc66a29=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5afed2=_0xc66a29(void 0,(function(){return _0x5afed2.toString().search("(((.+)+)+)+$").toString().constructor(_0x5afed2).search("(((.+)+)+)+$")}));_0x5afed2();class _0x5d6f1b{constructor(e,t,i,n,r){this._geoEntity=e,this._moveGeoEntity=t,this._deductionScript=i,this._groupIndex=n,this._geoEntityStartEffectVisible=r,this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityEffectParameterUUID=void 0}_setGeoEntityEffectParameter(e){let t=e.getGeoEntityEffects(),i=[];t.forEach((e=>{let t=e.clone();if(t.setGeoEntity(this._moveGeoEntity),t.getType()==_0x3b1c90.COMMUNICATIONLINK){let e=t.getStartUUID(),i=t.getEndUUID();if(this._geoEntity.getUUID()==e){e=this._moveGeoEntity.getUUID();let t=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(i);WebGLPlot$f.defined(t)&&(i=t.getUUID())}else if(this._geoEntity.getUUID()==i){i=this._moveGeoEntity.getUUID();let t=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(e);WebGLPlot$f.defined(t)&&(e=t.getUUID())}t.setStartUUID(e),t.setEndUUID(i)}i.push(t)})),this._moveGeoEntity.updateGeoEntityEffects(i)}_caclulate(e){if(!WebGLPlot$f.defined(this._geoEntity)||!WebGLPlot$f.defined(this._deductionScript))return;let t,i=this._deductionScript.getGeoEntityEffectParameterTimes();for(let n=0;n<i.length;n++){let r=i[n],o=this._deductionScript.getGeoEntityEffectParameter(r);if(e>=r){if(n===i.length-1){t=o;break}if(e<i[n+1]){t=o;break}}}if(!WebGLPlot$f.defined(t)&&this._groupIndex>0)for(let e=this._groupIndex-1;e>=0;e--){let i=this._deductionScriptGroups[e]._getDeductionScriptByGeoEntityUUID(this._geoEntity.getUUID());if(WebGLPlot$f.defined(i)){let e=i.getGeoEntityEffectParameterTimes();if(e.length>0){t=i.getGeoEntityEffectParameter(e[e.length-1]);break}}}if(WebGLPlot$f.defined(t))return{geoEntityEffectParameter:t,geoEntityEffectParameterUUID:t.getUUID()};{let e=this._geoEntity.getGeoEntityEffects(),t=[];return e.forEach((e=>{let i=e.clone(),n=this._geoEntityStartEffectVisible.get(e.getUUID());i.setVisible(n),t.push(i)})),{geoEntityEffectParameter:new _0x25bff7(t),geoEntityEffectParameterUUID:"initGeoEntityEffectParameter"}}}_update(e){let t=e/1e3,i=this._caclulate(t);WebGLPlot$f.defined(i)&&WebGLPlot$f.defined(i.geoEntityEffectParameter)&&this._currentGeoEntityEffectParameterUUID!==i.geoEntityEffectParameterUUID&&(this._setGeoEntityEffectParameter(i.geoEntityEffectParameter),this._currentGeoEntityEffectParameterUUID=i.geoEntityEffectParameterUUID)}}const _0x22f009=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x33848e=_0x22f009(void 0,(function(){return _0x33848e.toString().search("(((.+)+)+)+$").toString().constructor(_0x33848e).search("(((.+)+)+)+$")}));_0x33848e();class _0x8bca35{constructor(e,t,i){this._geoEntityMoveLayer=e,this._deductionScript=t,this._groupIndex=i,this._geoEntity=void 0,this._moveGeoEntity=void 0,this._position=void 0,this._scale=void 0,this._rotation=void 0,this._currentExtendEffectParameterUUID=void 0,this._deductionScriptActionBasicParm=void 0,this._deductionScriptActionEffect=void 0,this._deductionScriptActionMove=void 0,this._deductionScriptActionRotation=void 0,this._deductionScriptActionScale=void 0,this._geoEntityStartEffectVisible=void 0,this._geoEntityStartVisible=void 0,this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups()}_getMoveGeoEntity(){return this._moveGeoEntity}_getGeoEntityUUID(){return this._deductionScript.getGeoEntityUUID()}_setGeoEntityParamerter(e){WebGLPlot$f.defined(this._moveGeoEntity)&&this._moveGeoEntity.setGeoEntityParameter(e)}_setExtendEffectParameter(e){e.getGeoEntityEffects().forEach((e=>{e.getType()===_0x3b1c90.EXTENDACTION&&e._executeExtend()}))}_updateDeductionScript(e,t){this._deductionScript=e,this._groupIndex=t,this._currentGeoEntityEffectParameterUUID=void 0,this._deductionScriptActionBasicParm=new _0x397ab1(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionEffect=new _0x5d6f1b(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionMove=new _0x3e4e1c(this._deductionScript,this._groupIndex),this._deductionScriptActionRotation=new _0x75e70a(this._deductionScript,this._groupIndex),this._deductionScriptActionScale=new _0x3f6390(this._deductionScript,this._groupIndex)}_start(){let e=_0x41dd10.getInstance().getGeoEntityManager();if(!WebGLPlot$f.defined(e)||(this._geoEntity=e.getGeoEntityByUUID(this._deductionScript.getGeoEntityUUID()),!WebGLPlot$f.defined(this._geoEntity)))return;let t=this._geoEntity._getGeoGraphicObject();if(!WebGLPlot$f.defined(t))return;let i=t.clone();this._geoEntityStartEffectVisible=new Map,this._geoEntity.getGeoEntityEffects().forEach((e=>{e.getType()!=_0x3b1c90.COMMUNICATIONLINK&&(this._geoEntityStartEffectVisible.set(e.getUUID(),e.isVisible()),e.setVisible(!1))}));let n=[];if(t.getGeoEntity().getGeoEntityEffects().forEach((e=>{e.getType()==_0x3b1c90.COMMUNICATIONLINK&&n.push(e)})),n.forEach((e=>{let n=t.getGeoEntity().getUUID(),r=i.getGeoEntity().getUUID(),o=!1,a=e.getStartUUID();n==a&&(o=!0,a=e.getEndUUID());let s=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(a);if(WebGLPlot$f.defined(s))o?e.setStartUUID(r):e.setEndUUID(r),i.getGeoEntity()._connectLinkToGeoEntity(e);else{let t=e.clone();o?t.setStartUUID(r):t.setEndUUID(r),i.getGeoEntity().addGeoEntityEffect(t),this._geoEntityStartEffectVisible.set(e.getUUID(),e.isVisible()),e.isVisible()&&e.setVisible(!1)}})),this._geoEntityMoveLayer.addFeature(i),this._geoEntityStartVisible=this._geoEntity.getGeoEntityParameter().isVisible(),this._geoEntityStartVisible){let e=new _0x487d97;e.setVisible(!1),this._geoEntity.setGeoEntityParameter(e)}this._moveGeoEntity=i.getGeoEntity(),this._moveGeoEntity._isMoveGeoEntity=!0,this._position=this._geoEntity.getGeoEntityParameter().getPosition(),this._rotation=this._geoEntity.getGeoEntityParameter().getModelRotate(),this._scale=this._geoEntity.getGeoEntityParameter().getModelScale(),this._deductionScriptActionBasicParm=new _0x397ab1(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionEffect=new _0x5d6f1b(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartEffectVisible),this._deductionScriptActionMove=new _0x3e4e1c(this._deductionScript,this._groupIndex),this._deductionScriptActionRotation=new _0x75e70a(this._deductionScript,this._groupIndex),this._deductionScriptActionScale=new _0x3f6390(this._deductionScript,this._groupIndex)}_reset(e){if(!WebGLPlot$f.defined(this._geoEntity)||!WebGLPlot$f.defined(this._moveGeoEntity))return;let t=new _0x487d97;if(e){t.setVisible(this._geoEntityStartVisible),this._geoEntity.getGeoEntityEffects().forEach((e=>{let t=this._geoEntityStartEffectVisible.get(e.getUUID());if(e.getType()==_0x3b1c90.COMMUNICATIONLINK){let i=e.getStartUUID();i==this._geoEntity.getUUID()&&(i=e.getEndUUID());let n=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(i);WebGLPlot$f.defined(n)||e.setVisible(t)}else e.setVisible(t)}));let e=this._moveGeoEntity.getGeoEntityEffects(),i=[],n=[];e.forEach((e=>{if(e.getType()==_0x3b1c90.COMMUNICATIONLINK){let t=!1,r=e.getStartUUID();r==this._moveGeoEntity.getUUID()&&(t=!0,r=e.getEndUUID());let o=_0x41dd10.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(r);WebGLPlot$f.defined(o)?(t?e.setStartUUID(this._geoEntity.getUUID()):e.setEndUUID(this._geoEntity.getUUID()),n.push(e)):i.push(e)}})),i.forEach((e=>{this._moveGeoEntity.removeGeoEntityEffect(e.getUUID())})),n.forEach((e=>{this._moveGeoEntity._disConnectLinkToGeoEntity(e),this._geoEntity._connectLinkToGeoEntity(e)}))}else{let e=this._moveGeoEntity.getGeoEntityParameter();WebGLPlot$f.defined(e)&&t._update(e);let i=[],n=[];this._moveGeoEntity.getGeoEntityEffects().forEach((e=>{e.getType()==_0x3b1c90.COMMUNICATIONLINK?i.push(e):n.push(e.clone())})),this._geoEntity.updateGeoEntityEffects(n),i.forEach((e=>{this._moveGeoEntity._disConnectLinkToGeoEntity(e),this._geoEntity._connectLinkToGeoEntity(e)}))}this._geoEntity.setGeoEntityParameter(t),this._geoEntityMoveLayer.removeGeoGraphicObject(this._moveGeoEntity._getGeoGraphicObject()),this._moveGeoEntity=void 0}_execute(e){if(WebGLPlot$f.defined(this._geoEntity)){this._deductionScriptActionBasicParm._update(e),this._deductionScriptActionEffect._update(e);let t=this._deductionScriptActionMove._update(e,this._position,this._rotation),i=this._deductionScriptActionRotation._update(e),n=this._deductionScriptActionScale._update(e);if(WebGLPlot$f.defined(t)||WebGLPlot$f.defined(i)||WebGLPlot$f.defined(n)){let e=new _0x487d97;WebGLPlot$f.defined(t)&&WebGLPlot$f.defined(t.position)&&e.setPosition(t.position);let r=new _0x11ff81(0);if(t.isCurrent?r=i.isCurrent?t.isFinished?i.isFinished&&t.currentFinishTime>i.currentFinishTime?new _0x11ff81(t.rotation.x,i.rotation.y,t.rotation.z):new _0x11ff81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):i.isFinished?new _0x11ff81(t.rotation.x,i.rotation.y,t.rotation.z):new _0x11ff81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):new _0x11ff81(t.rotation.x,i.rotation.y,t.rotation.z):i.isCurrent?r=new _0x11ff81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):WebGLPlot$f.defined(t.groupIndex)?WebGLPlot$f.defined(i.groupIndex)?t.groupIndex===i.groupIndex?r=t.finishTime>i.finishTime?new _0x11ff81(t.rotation.x,i.rotation.y,t.rotation.z):new _0x11ff81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):t.groupIndex<i.groupIndex?r=new _0x11ff81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):t.groupIndex>i.groupIndex&&(r=new _0x11ff81(t.rotation.x,i.rotation.y,t.rotation.z)):r=t.rotation:r=WebGLPlot$f.defined(i.groupIndex)?new _0x11ff81(t.rotation.x+i.rotation.x,t.rotation.y+i.rotation.y,t.rotation.z+i.rotation.z):t.rotation,e.setModelRotate(r),e.setVectorRotate(r),WebGLPlot$f.defined(n)){e.setModelScale(n),e.setVectorRotate(n);let t=this._moveGeoEntity._getGeoGraphicObject()._symbolSizeInLib;if(-1!=t.x&&-1!=t.y){let i=this._moveGeoEntity.getGeoEntityParameter().getDotPlotStyle();0===n?i.setGridSymbolSize(new WebGLPlot$f.Cartesian2(.1,.1)):i.setGridSymbolSize(new WebGLPlot$f.Cartesian2(t.x*n,t.y*n)),e.setDotPlotStyle(i)}let i=new WebGLPlot$f.Cartesian2(64,64);e.setPictureSymbolSize(new WebGLPlot$f.Cartesian2(i.x*n,i.y*n))}this._setGeoEntityParamerter(e)}}else{let t,i=e/1e3,n=this._deductionScript.getGeoEntityEffectParameterTimes();for(let e=0;e<n.length;e++){let r=n[e],o=this._deductionScript.getGeoEntityEffectParameter(r);if(i>=r){if(e===n.length-1){t=o;break}if(i<n[e+1]){t=o;break}}}WebGLPlot$f.defined(t)&&this._currentExtendEffectParameterUUID!==t.getUUID()&&(this._setExtendEffectParameter(t),this._currentExtendEffectParameterUUID=t.getUUID())}}}var _0x40c323=(_0x426332=!0,function(e,t){var i=_0x426332?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x426332=!1,i}),_0x79cfbf=_0x40c323(void 0,(function(){return _0x79cfbf.toString().search("(((.+)+)+)+$").toString().constructor(_0x79cfbf).search("(((.+)+)+)+$")})),_0x426332;_0x79cfbf();var _0x3a4b02={Ready:0,Executing:1,Stop:2},_0x100aa6=Object.freeze(_0x3a4b02);const _0x432763=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1c63ed=_0x432763(void 0,(function(){return _0x1c63ed.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c63ed).search("(((.+)+)+)+$")}));_0x1c63ed();class _0x130d03{constructor(e,t,i){this._geoEntityMoveLayer=e,this._deductionScriptGroup=t,this._deductionScriptExcuteManager=i,this._deductionScriptExcutes=[],this._executeState=_0x100aa6.Ready,this._totalTime=this._calcTotalTime()}_calcTotalTime(){let e=this._deductionScriptGroup.getDeductionScripts(),t=0;e.forEach((e=>{let i=e._getTotalTime();t<i&&(t=i)}));let i=this._deductionScriptGroup.getDeductionScriptExtend()._getDeductionScript()._getTotalTime();return t<i&&(t=i),t}_getTotalTime(){return this._totalTime}_getExecuteState(){return this._executeState}_getDeductionScriptExcutes(){return this._deductionScriptExcutes}_execute(e,t){this._executeState===_0x100aa6.Executing&&this._deductionScriptExcutes.forEach((i=>{i._execute(e,t)}))}_start(e){let t=this._deductionScriptGroup.getDeductionScripts();for(let i=0;i<t.length;i++){let n=t[i],r=this._deductionScriptExcuteManager._getDeductionScriptExecute(n.getGeoEntityUUID());WebGLPlot$f.defined(r)?r._updateDeductionScript(n,e):(r=new _0x8bca35(this._geoEntityMoveLayer,n,e),r._start()),this._deductionScriptExcutes.push(r)}let i=this._deductionScriptGroup.getDeductionScriptExtend()._getDeductionScript(),n=new _0x8bca35(this._geoEntityMoveLayer,i,e);n._start(),this._deductionScriptExcutes.push(n),this._executeState=_0x100aa6.Executing}_reset(e){this._deductionScriptExcutes.forEach((t=>{this._executeState!==_0x100aa6.Ready&&t._reset(e)})),this._executeState=_0x100aa6.Ready}}var _0x23b738=(_0x4cc278=!0,function(e,t){var i=_0x4cc278?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4cc278=!1,i}),_0x3c4f54=_0x23b738(void 0,(function(){return _0x3c4f54.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c4f54).search("(((.+)+)+)+$")})),_0x4cc278;_0x3c4f54();var _0x5c2bbc={NoReset:0,ManualReset:1,AutoReset:2},_0x1d0519=Object.freeze(_0x5c2bbc);const _0x5c31f9=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x51d446=_0x5c31f9(void 0,(function(){return _0x51d446.toString().search("(((.+)+)+)+$").toString().constructor(_0x51d446).search("(((.+)+)+)+$")}));_0x51d446();class _0x5ba8bb{constructor(e){this._geoEntityMoveLayer=e,this._UUID=WebGLPlot$f.createGuid(),this._resetType=_0x1d0519.AutoReset,this._executeState=_0x100aa6.Ready,this._executeCallBackFunction=void 0,this._groupIndex=-1,this._deductionScriptExecuteGroups=[],this._currentDeductionScriptExecuteGroup=void 0,this._totalPassTime=0,this._lastTime=void 0}_getUUID(){return this._UUID}_getDeductionScriptExecute(e){for(let t=0;t<=this._groupIndex;t++){let i=this._deductionScriptExecuteGroups[t]._getDeductionScriptExcutes();if(WebGLPlot$f.defined(i))for(let t=0;t<i.length;t++){const n=i[t];if(n._getGeoEntityUUID()===e)return n}}}_execute(e){if(this._executeState===_0x100aa6.Executing){let t=e-this._lastTime;if(this._totalPassTime+=t,this._totalPassTime>0){let e=-1,t=0;for(let i=0;i<this._deductionScriptExecuteGroups.length;i++){let n=t+this._deductionScriptExecuteGroups[i]._getTotalTime();if(this._totalPassTime>=t&&this._totalPassTime<n+30){e=i;break}t=n}-1===e?this._stop():e!=this._groupIndex?(this._groupIndex=e,this._currentDeductionScriptExecuteGroup=this._deductionScriptExecuteGroups[this._groupIndex],this._currentDeductionScriptExecuteGroup._start(e)):this._currentDeductionScriptExecuteGroup._execute(this._totalPassTime-t,this._deductionScriptGroups[e-1]),WebGLPlot$f.defined(this._executeCallBackFunction)&&this._executeCallBackFunction({allPassTime:this._totalPassTime,groupIndex:this._groupIndex,groupPassTime:this._totalPassTime-t})}}this._lastTime=e}_start(e){this._deductionScriptGroups=_0x41dd10.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._lastTime=e,this._deductionScriptGroups.forEach((e=>{let t=new _0x130d03(this._geoEntityMoveLayer,e,this);this._deductionScriptExecuteGroups.push(t)})),this._executeState=_0x100aa6.Executing;let t=0;return this._deductionScriptExecuteGroups.forEach((e=>{t+=e._getTotalTime()})),t}_stop(){this._executeState===_0x100aa6.Executing&&(this._resetType===_0x1d0519.AutoReset||this._resetType===_0x1d0519.NoReset?this._reset(this._UUID):this._executeState=_0x100aa6.Stop)}_reset(){this._executeState!==_0x100aa6.Ready&&(this._deductionScriptExecuteGroups.forEach((e=>{this._resetType===_0x1d0519.NoReset?e._reset(!1):e._reset(!0)})),this._executeState=_0x100aa6.Ready,this._groupIndex=-1,this._deductionScriptExecuteGroups=[],this._currentDeductionScriptExecuteGroup=void 0,this._totalPassTime=0,this._lastTime=void 0)}_setExecuteCallBackFunc(e){this._executeCallBackFunction=e}_setResetType(e){this._resetType=e}}var _0x417d21=(_0x322589=!0,function(e,t){var i=_0x322589?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x322589=!1,i}),_0x415a04=_0x417d21(void 0,(function(){return _0x415a04.toString().search("(((.+)+)+)+$").toString().constructor(_0x415a04).search("(((.+)+)+)+$")})),_0x322589;_0x415a04();class _0x14792f{constructor(){this._deductionScript=new _0x39c042("Extend"),this._isModified=!1}_getDeductionScript(){return this._deductionScript}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){_0x41dd10.getInstance()._saveDeductionScript(!1)}_toJson(){return this._deductionScript._toJson()}_fromJson(e){this._deductionScript._fromJson(e)}getUUID(){return this._deductionScript.getUUID()}getGeoEntityEffectExtendParameterTimes(){return this._deductionScript.getGeoEntityEffectParameterTimes()}getGeoEntityEffectExtendParameter(e){this._deductionScript.getGeoEntityEffectParameter(e)}setGeoEntityEffectExtendParameter(e,t){this._deductionScript.setGeoEntityEffectParameter(e,t),this._isModified=!0,this._save()}removeGeoEntityEffectExtendParameter(e){this._deductionScript.removeGeoEntityEffectParameter(e),this._isModified=!0,this._save()}getDelayFinishTime(){return this._deductionScript.getDelayFinishTime()}setDelayFinishTime(e){this._deductionScript.setDelayFinishTime(e),this._isModified=!0}}const _0x5252f7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3da48c=_0x5252f7(void 0,(function(){return _0x3da48c.toString().search("(((.+)+)+)+$").toString().constructor(_0x3da48c).search("(((.+)+)+)+$")}));_0x3da48c();class _0x386efd{constructor(e){this._deductionScriptManager=e,this._UUID=WebGLPlot$f.createGuid(),this._name="",this._deductionScripts=[],this._deductionScriptExtend=new _0x14792f,this._isModified=!1}_fromJson(e,t){let i=JSON.parse(e);WebGLPlot$f.defined(i.UUID)&&(this._UUID=i.UUID),WebGLPlot$f.defined(i.name)&&(this._name=i.name),WebGLPlot$f.defined(i.deductionScriptUUIDs)&&(this._deductionScripts.splice(0),i.deductionScriptUUIDs.forEach((e=>{this._deductionScripts.push(t.get(e))}))),WebGLPlot$f.defined(i.deductionScriptExtend)&&this._deductionScriptExtend._fromJson(i.deductionScriptExtend)}_toJson(){let e=new Map,t={};return t.hasOwnProperty("UUID")||(t.UUID=this._UUID),t.hasOwnProperty("name")||(t.name=this._name),t.hasOwnProperty("deductionScriptUUIDs")||(t.deductionScriptUUIDs=[],this._deductionScripts.forEach((i=>{e.set(i.getUUID(),i._toJson()),t.deductionScriptUUIDs.push(i.getUUID())}))),t.hasOwnProperty("deductionScriptExtend")||(t.deductionScriptExtend=this._deductionScriptExtend._toJson()),{deductionScriptJsons:e,json:JSON.stringify(t)}}_isModify(){return!!this._isModified||!!this._deductionScriptExtend._isModify()}_setIsModify(e){this._isModified=e,this._deductionScriptExtend._setIsModify(e)}_save(){_0x41dd10.getInstance()._saveDeductionScript(!1)}_getDeductionScriptByGeoEntityUUID(e){for(let t=0;t<this._deductionScripts.length;t++){let i=this._deductionScripts[t];if(i.getGeoEntityUUID()===e)return i}}createDeductionScript(e){let t=new _0x39c042(e);return this._deductionScripts.push(t),this._deductionScriptManager._addDeductionScripts.push(t),this._isModified=!0,this._save(),t}removeDeductionScript(e){for(let t=0;t<this._deductionScripts.length;t++){const i=this._deductionScripts[t];if(i.getUUID()===e){let n=i.getGeoEntityMoveParameterTimes();for(let e=n.length-1;e>=0;e--)i.removeGeoEntityMoveParameter(n[e]);this._deductionScripts.splice(t,1),this._deductionScriptManager._removeDeductionScriptUUIDs.push(e),this._isModified=!0,this._save();break}}}getDeductionScripts(){return this._deductionScripts}setName(e){this._name=e,this._isModified=!0,this._save()}getName(){return this._name}getUUID(){return this._UUID}getDeductionScriptExtend(){return this._deductionScriptExtend}}const _0x501882=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x248e54=_0x501882(void 0,(function(){return _0x248e54.toString().search("(((.+)+)+)+$").toString().constructor(_0x248e54).search("(((.+)+)+)+$")}));_0x248e54();class _0x2962c5{constructor(){this._deductionScriptGroups=[],this._scene=void 0,this._geoEntityMoveLayer=void 0,this._deductionScriptExecuteManager=void 0,this._addDeductionScripts=[],this._removeDeductionScriptUUIDs=[],this._isGroupInfoModified=!1}_setScene(e){this._geoEntityMoveLayer=new _0x267b40(e,"GeoEntityMoveLayer"),e.plotLayers.add(this._geoEntityMoveLayer),this._scene=e,this._deductionScriptExecuteManager=new _0x5ba8bb(this._geoEntityMoveLayer)}_execute(e){WebGLPlot$f.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._execute(e)}_getDeductionScriptExecute(e){if(WebGLPlot$f.defined(this._deductionScriptExecuteManager)){let t=this._deductionScriptExecuteManager._getDeductionScriptExecute(e);if(WebGLPlot$f.defined(t))return t}}_saveDeduscriptGroupsDataToScheme(){let e=_0x41dd10.getInstance()._getOpenedSchemeName();if(WebGLPlot$f.defined(e)){let t=[];this._deductionScriptGroups.forEach((e=>{let i=e._toJson();t.push(i.json)})),_0x41dd10.getInstance().getSituationSimulationSchemeManager().saveScriptStructure(e,t)}}_getAddAndRemoveDeductionScripts(){return{add:this._addDeductionScripts,remove:this._removeDeductionScriptUUIDs}}_clearAddAndRemoveDeductionScripts(){this._addDeductionScripts.splice(0),this._removeDeductionScriptUUIDs.splice(0)}_isGroupInfoModify(){if(this._isGroupInfoModified)return!0;for(let e=0;e<this._deductionScriptGroups.length;e++)if(this._deductionScriptGroups[e]._isModify())return!0;return!1}_setIsGroupInfoModify(e){this._isGroupInfoModified=e,this._deductionScriptGroups.forEach((t=>{t._setIsModify(e)}))}_save(){_0x41dd10.getInstance()._saveDeductionScript(!1)}_start(e){return this._reset(),this._deductionScriptExecuteManager._start(e)}_stop(){WebGLPlot$f.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._stop()}_reset(){WebGLPlot$f.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._reset(),_0x41dd10.getInstance().getGeoEntityEffectExtendFactory().clearText()}_setResetType(e){WebGLPlot$f.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._setResetType(e)}_setExecuteCallBackFunc(e){WebGLPlot$f.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._setExecuteCallBackFunc(e)}_removeAllScriptGroupFromScene(){this._deductionScriptGroups.splice(0)}getDeductionScriptGroups(){return this._deductionScriptGroups}removeScriptGroup(e){for(let t=0;t<this._deductionScriptGroups.length;t++){const i=this._deductionScriptGroups[t];if(i.getUUID()===e){i.getDeductionScripts().forEach((e=>{this._removeDeductionScriptUUIDs.push(e.getUUID())})),this._deductionScriptGroups.splice(t,1),this._isGroupInfoModified=!0,this._save();break}}}getScriptGroupByUUID(e){for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t];if(i.getUUID()===e)return i}}removeAllScriptGroup(){this._deductionScriptGroups.forEach((e=>{e.getDeductionScripts().forEach((e=>{this._removeDeductionScriptUUIDs.push(e.getUUID())}))})),this._deductionScriptGroups.splice(0),this._isGroupInfoModified=!0,this._save()}createScriptGroup(e){let t=new _0x386efd(this);return t.setName(e),this._deductionScriptGroups.push(t),this._isGroupInfoModified=!0,this._save(),t}toJson(){let e=new Map,t=[];return this._deductionScriptGroups.forEach((i=>{let n=i._toJson();e=new Map([...e,...n.deductionScriptJsons]),t.push(n.json)})),{deductionScriptJsons:e,deductionScriptGroupJsons:JSON.stringify(t)}}fromJson(e){this.removeAllScriptGroup(!1);let t=e.deductionScriptJsons,i=new Map;if(t.forEach(((e,t)=>{if(e.length>0){let n=new _0x39c042("");n._fromJson(e),i.set(t,n)}})),e.deductionScriptGroupJsons.length>0){let t=JSON.parse(e.deductionScriptGroupJsons);WebGLPlot$f.defined(t)&&t.forEach((e=>{let t=new _0x386efd(this);t._fromJson(e,i),this._deductionScriptGroups.push(t)}))}}_getMoveGeoEntityByUUID(e){let t=this._getDeductionScriptExecute(e);if(WebGLPlot$f.defined(t))return t._getMoveGeoEntity();if(WebGLPlot$f.defined(this._deductionScriptExecuteManager))for(let t=0;t<=this._deductionScriptExecuteManager._groupIndex;t++){let i=this._deductionScriptExecuteManager._deductionScriptExecuteGroups[t]._getDeductionScriptExcutes();if(WebGLPlot$f.defined(i))for(let t=0;t<i.length;t++){const n=i[t];if(WebGLPlot$f.defined(n)&&WebGLPlot$f.defined(n._getMoveGeoEntity())){let t=n._getMoveGeoEntity();if(t.getUUID()==e)return t}}}return null}}const _0x33a479=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xc3a9ab=_0x33a479(void 0,(function(){return _0xc3a9ab.toString().search("(((.+)+)+)+$").toString().constructor(_0xc3a9ab).search("(((.+)+)+)+$")}));_0xc3a9ab();class _0x236d05{constructor(){this._datasetNameSuffix=["_Structure","_Entity","_Script","_Satellite"],this._commit=this._getCommit(),this._URI=null}_setURI(e){this._URI=e,this._SatelliteConfigURI=e+"/iserver/mgis/situationSimulation/Satellite/SatelliteGroupsTemplate.json",this._datasetsURI=e+"/iserver/services/data-SituationSimulationSchemeWorkspace/rest/data/datasources/SituationSimulationSchemeDatasource/datasets",this._featureResultsURI=e+"/iserver/services/data-SituationSimulationSchemeWorkspace/rest/data/featureResults.rjson?returnContent=true"}newScheme(e){if(null==e||0===e.length||/^\d/.test(e))return!1;let t=this._queryFeatures("metadata","SchemeName",e);if(null==t||null!=t&&t.length>0)return!1;let i=this._datasetsURI+"/metadata/features.rjson",n=[{fieldNames:["SmID","SmUserID","SchemeName"],fieldValues:["0","0",e],geometry:null}];this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(WebGLPlot$f.toJSON(n));for(let t=0;t<this._datasetNameSuffix.length;t++){let i={datasetType:"TABULAR",datasetName:e+this._datasetNameSuffix[t]};if(this._commit.open("POST",encodeURI(this._datasetsURI+".json"),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(i)),JSON.parse(this._commit.responseText,null).succeed){let i=this._datasetsURI+"/"+e+this._datasetNameSuffix[t]+"/fields.rjson",n=["uuid","Content"];0===t&&(n=["EntityStructure","ScriptStructure","SatelliteGroupStructure"]);for(let e=0;e<n.length;e++){let t={isZeroLengthAllowed:"false",maxLength:"100000",isRequired:"false",name:n[e],caption:n[e],type:"WTEXT",defaultValue:"null",isSystemField:"false"};this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(t))}}}let r=this._loadSateGroupInfos(this._SatelliteConfigURI);return WebGLPlot$f.defined(r)&&this.saveSatelliteGroupStructure(e,r),!0}getAllSchemeName(){let e=this._queryFeatures("metadata","",""),t=[];if(null!=e)for(let i=0;i<e.length;i++)t.push(e[i].fieldValues[2]);return t}deleteScheme(e){let t=this._datasetsURI+"/metadata/features.rjson?_method=DELETE&deleteMode=SQL",i={attributeFilter:'SchemeName="'+e+'"'};this._commit.open("POST",encodeURI(t),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(WebGLPlot$f.toJSON(i));for(let t=0;t<this._datasetNameSuffix.length;t++){let i=this._datasetsURI+"/"+e+this._datasetNameSuffix[t]+".rjson";this._commit.open("DELETE",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null)}}saveEntityStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","EntityStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","EntityStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getEntityStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[2]:""}saveScriptStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","ScriptStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","ScriptStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getScriptStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[3]:""}saveSatelliteGroupStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","SatelliteGroupStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","SatelliteGroupStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getSatelliteGroupStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[4]:""}addFeature(e,t,i,n){return this._editFeature(e,t,i,n)}addFeatures(e,t,i){i.forEach(((i,n)=>{this._editFeature(e,t,n,i)}))}getFeatures(e,t){let i=this._getDatasetNameSuffix(t),n=this._queryFeatures(e+i,"","");const r=new Map;if(null!=n)for(let e=0;e<n.length;e++)r.set(n[e].fieldValues[2],n[e].fieldValues[3]);return r}updateFeature(e,t,i,n){return this._editFeature(e,t,i,n)}updateFeatures(e,t,i){let n=this._getDatasetNameSuffix(t),r=this._datasetsURI+"/"+e+n+"/features.rjson";this._commit.open("GET",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let o=JSON.parse(this._commit.responseText,null);if(null!=o&&o.featureCount>0){r=this._datasetsURI+"/"+e+n+"/features.rjson?_method=DELETE&deleteMode=SQL";let t={attributeFilter:"SmID>=0"};this._commit.open("POST",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(t))}i.forEach(((i,n)=>{this._editFeature(e,t,n,i)}))}deleteFeature(e,t,i){let n=this._getDatasetNameSuffix(t),r=this._datasetsURI+"/"+e+n+"/features.rjson?_method=DELETE&deleteMode=SQL",o={attributeFilter:'uuid="'+i+'"'};return this._commit.open("POST",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(o)),JSON.parse(this._commit.responseText,null).succeed}_getCommit(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{this.commit=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}_editFeature(e,t,i,n){let r=this._getDatasetNameSuffix(t),o=this._queryFeatures(e+r,"uuid",i),a=this._datasetsURI+"/"+e+r+"/features.rjson",s=[{fieldNames:["SmID","SmUserID","uuid","Content"],fieldValues:["0","0",i,n],geometry:null}];return null!=o&&o.length>0&&(a+="?_method=PUT",s=[{ID:o[0].ID,fieldNames:["SmID","SmUserID","Content"],fieldValues:["0","0",n],geometry:null}]),this._commit.open("POST",encodeURI(a),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(s)),JSON.parse(this._commit.responseText,null).succeed}_getDatasetNameSuffix(e){let t="";switch(e){case _0x59c417.ENTITY:t="_Entity";break;case _0x59c417.SCRIPT:t="_Script";break;case _0x59c417.SATELLITE:t="_Satellite"}return t}_queryFeatures(e,t,i){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let n={getFeatureMode:"SQL",datasetNames:["SituationSimulationSchemeDatasource:"+e],maxFeatures:1e4,queryParameter:{sortClause:null,ids:null,name:null,attributeFilter:0===t.length?"":t+'="'+i+'"',groupClause:null,linkItems:null,joinItems:null,fields:null}};this._commit.send(WebGLPlot$f.toJSON(n));let r=JSON.parse(this._commit.responseText,null);return null==r?null:r.features}_loadSateGroupInfos(e){if(!WebGLPlot$f.defined(e)||!WebGLPlot$f.defined(this._URI))return null;var t;if(-1==(e=e.replace(/\\+/g,"/")).lastIndexOf("/"))return null;(t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open("GET",e,!1),t.send();var i=t.responseText;if(!WebGLPlot$f.defined(i))return null;let n=JSON.parse(i);return WebGLPlot$f.defined(n.groups)&&n.groups.forEach((e=>{WebGLPlot$f.defined(e.modelPath)&&(e.modelPath=this._URI+e.modelPath)})),JSON.stringify(n)}_convertToRgba(e){if(e.startsWith("RGBA(")&&e.endsWith(")")){let t=e.replace("RGBA(","");t=t.substring(0,t.lastIndexOf(")"));let i=t.split(",");if(4===i.length)return new WebGLPlot$f.Color(i[0].trim(),i[1].trim(),i[2].trim(),i[3].trim())}return null}}const _0x165a9c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1cfc64=_0x165a9c(void 0,(function(){return _0x1cfc64.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cfc64).search("(((.+)+)+)+$")}));_0x1cfc64();class _0x5ed02a{constructor(){this._textNames=[],this._funcs=new Map,this._time=void 0}_execute(e){this._time=e,this._funcs.forEach(((e,t)=>{e.func(e.parms)}))}init(e){let t=this;WebGLPlot$f.defined(e.viewer)&&_0xfa8fd4.addExtendCallBack((function(e,t,i){if("camera"===t){let t=e.viewer,n=JSON.parse(i);t.camera.flyTo({destination:new Cesium.Cartesian3(n.position.x,n.position.y,n.position.z),orientation:{heading:n.heading,pitch:n.pitch,roll:n.roll},duration:n.duration})}}),{viewer:e.viewer}),WebGLPlot$f.defined(e.document)&&_0xfa8fd4.addExtendCallBack((function(e,i,n){if("text"===i){let i=e.document,r=JSON.parse(n),o=i.createElement("Div");o.onselectstart=function(){return!1},o.style.position="absolute",o.style.zIndex="9999",o.style.whiteSpace="pre-wrap",o.style.wordBreak="break-all",o.style.width=r.width,o.style.height=r.height,o.style.background=r.backColor,o.style.webkitBorderRadius=r.borderRadius,o.style.paddingLeft=r.paddingLeft,o.style.paddingRight=r.paddingRight,o.style.paddingTop=r.paddingTop,o.style.paddingBottom=r.paddingBottom;let a=r.texts;for(let e=0;e<a.length;e++){let t=a[e],n=i.createElement("p");n.style.marginTop="0px",n.style.marginBottom="0px";let r=t.fontSize,s=r.slice(0,r.length-2);n.style.paddingTop=String(Number(s)/2)+"px",n.style.paddingBottom=String(Number(s)/2)+"px",n.style.color=t.color,n.style.fontFamily=t.fontFamily,n.style.fontSize=t.fontSize,n.style.fontWeight=t.fontWeight,n.style.fontStyle=t.fontStyle,n.style.lineHeight=t.lineHeight,n.style.letterSpacing=t.letterSpacing,n.style.textDecoration=t.textDecoration,n.style.textShadow=t.textShadow,n.style["-webkit-text-stroke"]=t.stroke,n.style.textAlign=t.textAlign,"left"===n.style.textAlign?n.style.marginLeft=t.margin:"right"===n.style.textAlign&&(n.style.marginRight=t.margin);let l=i.createTextNode(t.text);n.appendChild(l),o.appendChild(n)}i.body.appendChild(o);let s=o.offsetWidth,l=o.offsetHeight;switch(r.position.type){case 0:o.style.left=r.position.customPos.left,o.style.top=r.position.customPos.top;break;case 1:o.style.left="1px",o.style.top="1px";break;case 2:o.style.left="calc(50% - "+String(s/2)+"px)",o.style.top="1px";break;case 3:o.style.left="calc(100% - "+String(s+1)+"px)",o.style.top="1px";break;case 4:o.style.left="1px",o.style.top="calc(50% - "+String(l/2)+"px)";break;case 5:o.style.left="calc(50% - "+String(s/2)+"px)",o.style.top="calc(50% - "+String(l/2)+"px)";break;case 6:o.style.left="calc(100% - "+String(s+1)+"px)",o.style.top="calc(50% - "+String(l/2)+"px)";break;case 7:o.style.left="1px",o.style.top="calc(100% - "+String(l+1)+"px)";break;case 8:o.style.left="calc(50% - "+String(s/2)+"px)",o.style.top="calc(100% - "+String(l+1)+"px)";break;case 9:o.style.left="calc(50% - "+String(s+1)+"px)",o.style.top="calc(100% - "+String(l+1)+"px)"}let u=WebGLPlot$f.createGuid(),c=function(e){if(t._time-e.startTime>e.time){e.div.remove(),t._funcs.delete(u);for(let e=0;e<t._textNames.length;e++)if(t._textNames[e]===u){t._textNames.splice(e,1);break}}};t._funcs.set(u,{parms:{startTime:t._time,time:r.time,div:o},func:c}),t._textNames.push(u)}}),{document:e.document})}clearText(){this._textNames.forEach((e=>{this._funcs.get(e).parms.div.remove(),this._funcs.delete(e)})),this._textNames=[]}createCameraFlyExtendEffect(e){let t=new _0xfa8fd4;t.setName("camera");let i={};return i.position={x:e.position.x,y:e.position.y,z:e.position.z},i.heading=e.heading,i.pitch=e.pitch,i.roll=e.roll,i.duration=e.duration,t.setParam(JSON.stringify(i)),t}createTextExtendEffect(e){if(!WebGLPlot$f.defined(e.texts))return;let t=new _0xfa8fd4;t.setName("text");let i={};return i.time=WebGLPlot$f.defaultValue(1e3*e.time,3e3),i.width=WebGLPlot$f.defined(e.width)?String(e.width)+"px":"",i.height=WebGLPlot$f.defined(e.height)?String(e.height)+"px":"",WebGLPlot$f.defined(e.position)?(i.position={type:WebGLPlot$f.defaultValue(e.position.type,8)},WebGLPlot$f.defined(e.position.customPos)?i.position.customPos={left:WebGLPlot$f.defined(e.position.customPos.x)?String(e.position.customPos.x)+"px":"0px",top:WebGLPlot$f.defined(e.position.customPos.y)?String(e.position.customPos.y)+"px":"0px"}:i.position.customPos={left:"0px",top:"0px"}):i.position={type:8},i.backColor=WebGLPlot$f.defined(e.backColor)?e.backColor.toCssColorString():"white",i.borderRadius=WebGLPlot$f.defined(e.borderRadius)?e.borderRadius+"px":"0px",i.paddingLeft=WebGLPlot$f.defined(e.paddingLeft)?String(e.paddingLeft)+"px":"0px",i.paddingRight=WebGLPlot$f.defined(e.paddingRight)?String(e.paddingRight)+"px":"0px",i.paddingTop=WebGLPlot$f.defined(e.paddingTop)?String(e.paddingTop)+"px":"0px",i.paddingBottom=WebGLPlot$f.defined(e.paddingBottom)?String(e.paddingBottom)+"px":"0px",i.texts=[],e.texts.forEach((e=>{let t={text:WebGLPlot$f.defaultValue(e.text,"Text"),fontFamily:WebGLPlot$f.defaultValue(e.fontFamily,"Microsoft YaHei"),fontStyle:WebGLPlot$f.defaultValue(e.fontStyle,"normal"),lineHeight:WebGLPlot$f.defaultValue(e.lineHeight,1),fontSize:WebGLPlot$f.defined(e.fontSize)?String(e.fontSize)+"px":"16px",fontWeight:WebGLPlot$f.defined(e.fontWeight)?String(e.fontWeight)+"px":"normal",letterSpacing:WebGLPlot$f.defined(e.letterSpacing)?String(e.letterSpacing)+"px":"0px",color:WebGLPlot$f.defined(e.color)?e.color.toCssColorString():"black",textAlign:WebGLPlot$f.defaultValue(e.textAlign,"left"),margin:WebGLPlot$f.defined(e.margin)?String(e.margin)+"px":"0px"};if(WebGLPlot$f.defined(e.textDecoration)){let i=WebGLPlot$f.defined(e.textDecoration.type)?e.textDecoration.type:"none",n=WebGLPlot$f.defined(e.textDecoration.color)?e.textDecoration.color.toCssColorString():"black";t.textDecoration=i+" "+n}if(WebGLPlot$f.defined(e.textShadow)){let i=WebGLPlot$f.defined(e.textShadow.color)?e.textShadow.color.toCssColorString():"black",n=WebGLPlot$f.defined(e.textShadow.left)?String(e.textShadow.left)+"px":"4px",r=WebGLPlot$f.defined(e.textShadow.top)?String(e.textShadow.top)+"px":"4px",o=WebGLPlot$f.defined(e.textShadow.size)?String(e.textShadow.size)+"px":"4px";t.textShadow=i+" "+n+" "+r+" "+o}if(WebGLPlot$f.defined(e.stroke)){let i=WebGLPlot$f.defined(e.stroke.width)?String(e.stroke.width)+"px":"0px",n=WebGLPlot$f.defined(e.stroke.color)?e.stroke.color.toCssColorString():"black";t.stroke=i+" "+n}i.texts.push(t)})),t.setParam(JSON.stringify(i)),t}}const _0x4cb1bb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x33a3b7=_0x4cb1bb(void 0,(function(){return _0x33a3b7.toString().search("(((.+)+)+)+$").toString().constructor(_0x33a3b7).search("(((.+)+)+)+$")}));_0x33a3b7();class _0x4e5cfb{constructor(){this._bPlay=!1,this._lUTCTime=(new Date).getTime(),this._lSimulationTime=this._lUTCTime,this._dSimulationSpeed=1,this._lCumnlativeTime=0,this._bReverse=!1,this._bAutoUpdate=!1,this._lOrbitTime=this._lSimulationTime;let e=this;this._timer=setInterval((function(){e._execute()}),30)}setResetType(e){_0x41dd10.getInstance().getDeductionScriptManager()._setResetType(e)}start(){return this._bPlay=!0,_0x41dd10.getInstance().getDeductionScriptManager()._start(this._lSimulationTime)}stop(){this._bPlay=!1,_0x41dd10.getInstance().getDeductionScriptManager()._stop()}reset(){this._bPlay=!1,_0x41dd10.getInstance().getDeductionScriptManager()._reset()}pause(){this._bPlay=!1}continue(){this._bPlay=!0}setExecutePassTimeOffset(e){this._lSimulationTime+=e}setExecuteCallBackFunc(e){_0x41dd10.getInstance().getDeductionScriptManager()._setExecuteCallBackFunc(e)}getUTCTime(){return this._lUTCTime}setSimulationSpeed(e){this._dSimulationSpeed=e}getSimulationSpeed(){return this._dSimulationSpeed}setSimulationTime(e){this._lSimulationTime=e,this._executeSatellite(),this._executeDeductionScript()}getSimulationTime(){return this._lSimulationTime}setIsReverse(e){this._bReverse=e}getIsReverse(){return this._bReverse}getAutoUpdate(){return this._bAutoUpdate}isPlay(){return this._bPlay}updataAllOrbitPosition(){_0x41dd10.getInstance().getSatelliteManager().updateAllOrbitPosition(this._lSimulationTime)}_execute(){let e=(new Date).getTime();if(this._bPlay){let t=(e-this._lUTCTime)*this._dSimulationSpeed;this._bReverse?this._lSimulationTime=this._lSimulationTime-t:this._lSimulationTime=this._lSimulationTime+t,this._executeSatellite(),this._executeDeductionScript(),this._lCumnlativeTime=0}this._lUTCTime=e}_executeSatellite(){_0x41dd10.getInstance().getSatelliteManager().updateAllSatellitePosition(this._lSimulationTime),_0x41dd10.getInstance().getSatelliteEntityManager().updateAllSatelliteEntityPosition(this._lSimulationTime)}_executeDeductionScript(){_0x41dd10.getInstance().getDeductionScriptManager()._execute(this._lSimulationTime),_0x41dd10.getInstance().getGeoEntityEffectExtendFactory()._execute(this._lSimulationTime)}}const _0x20e1f3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x27edd6=_0x20e1f3(void 0,(function(){return _0x27edd6.toString().search("(((.+)+)+)+$").toString().constructor(_0x27edd6).search("(((.+)+)+)+$")}));_0x27edd6();class _0x41dd10{constructor(){this._geoEntityManager=new _0x1fa8f7,this._satelliteEntityManager=new _0x42f78d,this._satelliteManager=new _0x19ce0d,this._deductionScriptManager=new _0x2962c5,this._situationSimulationSchemeManager=new _0x236d05,this._geoEntityEffectExtendFactory=new _0x5ed02a,this._simulationController=new _0x4e5cfb,this._schemeName=void 0,this._isAutoSave=!1,this._uri=void 0}_getOpenedSchemeName(){return this._schemeName}_saveGeoEntity(e){if(e||this._isAutoSave){if(!WebGLPlot$f.defined(this._schemeName))return;let e=this._geoEntityManager._getAddAndRemoveGeoEntitys();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x59c417.ENTITY,e.getUUID(),e.toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x59c417.ENTITY,e)}));let t=this._geoEntityManager.getGeoEntityRootNode();(e.add.length>0||e.remove.length>0||t._isModify())&&(this._situationSimulationSchemeManager.saveEntityStructure(this._schemeName,t._toJson()),t._isModify()&&t._setIsModify(!1)),this._geoEntityManager.getGeoEntitys().forEach((t=>{-1===e.add.indexOf(t)&&t._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x59c417.ENTITY,t.getUUID(),t.toJson()),t._setIsModify(!1))})),this._geoEntityManager._clearAddAndRemoveGeoEntitys()}}_saveSatelliteGeoEntity(e){if(e||this._isAutoSave){if(!WebGLPlot$f.defined(this._schemeName))return;let e=this._satelliteEntityManager._getAddAndRemoveGeoEntitys();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x59c417.SATELLITE,e.getUUID(),e.toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x59c417.SATELLITE,e)})),this._satelliteEntityManager.getSatelliteEntitys().forEach((t=>{-1===e.add.indexOf(t)&&t._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x59c417.SATELLITE,t.getUUID(),t.toJson()),t._setIsModify(!1))})),this._satelliteEntityManager._clearAddAndRemoveGeoEntitys()}}_saveDeductionScript(e){if(e||this._isAutoSave){if(!WebGLPlot$f.defined(this._schemeName))return;let e=this._deductionScriptManager._getAddAndRemoveDeductionScripts();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x59c417.SCRIPT,e.getUUID(),e._toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x59c417.SCRIPT,e)})),(e.add.length>0||e.remove.length>0||this._deductionScriptManager._isGroupInfoModify())&&(this._situationSimulationSchemeManager.saveScriptStructure(this._schemeName,this._deductionScriptManager.toJson().deductionScriptGroupJsons),this._deductionScriptManager._isGroupInfoModify()&&this._deductionScriptManager._setIsGroupInfoModify(!1)),this._deductionScriptManager.getDeductionScriptGroups().forEach((e=>{e.getDeductionScripts().forEach((e=>{e._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x59c417.SCRIPT,e.getUUID(),e._toJson()),e._setIsModify(!1))}))}))}}_saveSatelliteGroups(e){if(e||this._isAutoSave){if(!WebGLPlot$f.defined(this._schemeName))return;this._satelliteManager._isModify()&&(this._situationSimulationSchemeManager.saveSatelliteGroupStructure(this._schemeName,this._satelliteManager.toJson()),this._satelliteManager._setIsModify(!1))}}static getInstance(){return _0x41dd10._instance||(_0x41dd10._instance=new _0x41dd10),_0x41dd10._instance}getSimulationController(){return this._simulationController}getGeoEntityManager(){return this._geoEntityManager}getSatelliteEntityManager(){return this._satelliteEntityManager}getSatelliteManager(){return this._satelliteManager}getDeductionScriptManager(){return this._deductionScriptManager}getSituationSimulationSchemeManager(){return this._situationSimulationSchemeManager}getGeoEntityEffectExtendFactory(){return this._geoEntityEffectExtendFactory}setScene(e){this._geoEntityManager._setScene(e),this._satelliteEntityManager.setScene(e),this._satelliteManager.setScene(e),this._deductionScriptManager._setScene(e)}openScheme(e,t){let i=this._isAutoSave;this._isAutoSave=!1;let n=this._situationSimulationSchemeManager.getSatelliteGroupStructure(e);this._satelliteManager.fromJson(n);let r=this._situationSimulationSchemeManager.getFeatures(e,_0x59c417.ENTITY),o=this._situationSimulationSchemeManager.getEntityStructure(e);this._geoEntityManager.fromJson({geoEntityJsons:r,geoEntityNodeJson:o},(function(e){"function"==typeof t&&t(e)}));let a=this._situationSimulationSchemeManager.getFeatures(e,_0x59c417.SCRIPT),s=this._situationSimulationSchemeManager.getScriptStructure(e);this._deductionScriptManager.fromJson({deductionScriptJsons:a,deductionScriptGroupJsons:s});let l=this._situationSimulationSchemeManager.getFeatures(e,_0x59c417.SATELLITE);this._satelliteEntityManager.fromJson({satelliteEntityJsons:l,satelliteManager:this._satelliteManager},(function(e){"function"==typeof t&&t(e)})),this._schemeName=e,this._isAutoSave=i}closeScheme(){let e=this._isAutoSave;this._isAutoSave=!1,this._geoEntityManager._removeAllGeoEntityFromScene(),this._deductionScriptManager._removeAllScriptGroupFromScene(),this._satelliteEntityManager._removeAllSatelliteEntityFromScene(this._satelliteManager),this._schemeName=void 0,this._isAutoSave=e}saveScheme(){this._saveGeoEntity(!0),this._saveSatelliteGeoEntity(!0),this._saveDeductionScript(!0),this._saveSatelliteGroups(!0)}setIsAutoSave(e){this._isAutoSave=e}isAutoSave(){return this._isAutoSave}setURI(e){this._situationSimulationSchemeManager._setURI(e),this._uri=e}getURI(){return this._uri}}var _0x480a2a=(_0x4c56de=!0,function(e,t){var i=_0x4c56de?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c56de=!1,i}),_0x5ec440=_0x480a2a(void 0,(function(){return _0x5ec440.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ec440).search("(((.+)+)+)+$")})),_0x4c56de;_0x5ec440();var WebGLPlot$4=window.WebGLPlot=window.WebGLPlot||{};function _0x1d0b9d(e){e=e||{},this.defaultFlag=!!e.defaultFlag&&e.defaultFlag,this.symbolStyle=new _0x53d051,this.symbolTextStyle=new _0x34d1aa,this._gridSymbolSize=e.gridSymbolSize?e.gridSymbolSize:new WebGLPlot$4.Cartesian2(-1,-1),this._lineSymbolID=e.lineSymbolID?e.lineSymbolID:-1,this._gridLineWidth=e.gridLineWidth?e.gridLineWidth:-1,this._modelPath=e.modelPath?e.modelPath:"",this.CLASS_NAME="DefaultStyle"}Object.defineProperties(_0x1d0b9d.prototype,{lineColor:{get:function(){return this.symbolStyle._lineColor},set:function(e){e!==this.symbolStyle._lineColor&&(this.symbolStyle.lineColor=e)}},lineWidth:{get:function(){return this.symbolStyle._lineWidth},set:function(e){e!==this.symbolStyle._lineWidth&&(this.symbolStyle.lineWidth=e)}},fillBackColor:{get:function(){return this.symbolStyle._fillBackColor},set:function(e){e!==this.symbolStyle._fillBackColor&&(this.symbolStyle.fillBackColor=e)}},fillForeColor:{get:function(){return this.symbolStyle._fillForeColor},set:function(e){e!==this.symbolStyle._fillForeColor&&(this.symbolStyle.fillForeColor=e)}},fillBackOpaque:{get:function(){return this.symbolStyle._fillBackOpaque},set:function(e){e!==this.symbolStyle._fillBackOpaque&&(this.symbolStyle.fillBackOpaque=e)}},fillGradientAngle:{get:function(){return this.symbolStyle._fillGradientAngle},set:function(e){e!==this.symbolStyle._fillGradientAngle&&(this.symbolStyle.fillGradientAngle=e)}},fillGradientMode:{get:function(){return this.symbolStyle._fillGradientMode},set:function(e){e!==this.symbolStyle._fillGradientMode&&(this.symbolStyle.fillGradientMode=e)}},fillGradientOffsetRatioY:{get:function(){return this.symbolStyle._fillGradientOffsetRatioY},set:function(e){e!==this.symbolStyle._fillGradientOffsetRatioY&&(this.symbolStyle.fillGradientOffsetRatioY=e)}},fillGradientOffsetRatioX:{get:function(){return this.symbolStyle._fillGradientOffsetRatioX},set:function(e){e!==this.symbolStyle._fillGradientOffsetRatioX&&(this.symbolStyle.fillGradientOffsetRatioX=e)}},fillSymbolID:{get:function(){return this.symbolStyle._fillSymbolID},set:function(e){e!==this.symbolStyle._fillSymbolID&&(this.symbolStyle.fillSymbolID=e)}},fillOpaqueRate:{get:function(){return this.symbolStyle._fillOpaqueRate},set:function(e){e===this.symbolStyle._fillOpaqueRate||e>100||e<0||(this.symbolStyle.fillOpaqueRate=e)}},surroundLineWidth:{get:function(){return this.symbolStyle._surroundLineWidth},set:function(e){e!==this.symbolStyle._surroundLineWidth&&(this.symbolStyle.surroundLineWidth=e)}},surroundLineColor:{get:function(){return this.symbolStyle._surroundLineColor},set:function(e){e!==this.symbolStyle._surroundLineColor&&(this.symbolStyle.surroundLineColor=e)}},opacity:{get:function(){return this.symbolStyle._opacity},set:function(e){e!==this.symbolStyle._opacity&&(this.symbolStyle.opacity=e)}},surroundLineType:{get:function(){return this.symbolStyle._surroundLineType},set:function(e){e!==this.symbolStyle._surroundLineType&&(this.symbolStyle.surroundLineType=e)}},height:{get:function(){return this.symbolTextStyle._height},set:function(e){e!==this.symbolTextStyle._height&&(this.symbolTextStyle.height=e)}},foreColor:{get:function(){return this.symbolTextStyle._foreColor},set:function(e){e!==this.symbolTextStyle._foreColor&&(this.symbolTextStyle.foreColor=e)}},backColor:{get:function(){return this.symbolTextStyle._backColor},set:function(e){e!==this.symbolTextStyle._backColor&&(this.symbolTextStyle.backColor=e)}},outline:{get:function(){return this.symbolTextStyle._outline},set:function(e){e!==this.symbolTextStyle._outline&&(this.symbolTextStyle.outline=e)}},fontName:{get:function(){return this.symbolTextStyle._fontName},set:function(e){e!==this.symbolTextStyle._fontName&&(this.symbolTextStyle.fontName=e)}},italic:{get:function(){return this.symbolTextStyle._italic},set:function(e){e!==this.symbolTextStyle._italic&&(this.symbolTextStyle.italic=e)}},bold:{get:function(){return this.symbolTextStyle._bold},set:function(e){e!==this.symbolTextStyle._bold&&(this.symbolTextStyle.bold=e)}},align:{get:function(){return this.symbolTextStyle._align},set:function(e){e!==this.symbolTextStyle._italic&&(this.symbolTextStyle.align=e)}},italicAngle:{get:function(){return this.symbolTextStyle._italicAngle},set:function(e){e!==this.symbolTextStyle._italicAngle&&(this.symbolTextStyle.italicAngle=e)}},shadow:{get:function(){return this.symbolTextStyle._shadow},set:function(e){e!==this.symbolTextStyle._shadow&&(this.symbolTextStyle.shadow=e)}},sizeFixed:{get:function(){return this.symbolTextStyle._sizeFixed},set:function(e){e!==this.symbolTextStyle._sizeFixed&&(this.symbolTextStyle.sizeFixed=e)}},underline:{get:function(){return this.symbolTextStyle._underline},set:function(e){e!==this.symbolTextStyle._underline&&(this.symbolTextStyle.underline=e)}},backOpaque:{get:function(){return this.symbolTextStyle._backOpaque},set:function(e){e!==this.symbolTextStyle._backOpaque&&(this.symbolTextStyle.backOpaque=e)}},strikeout:{get:function(){return this.symbolTextStyle._strikeout},set:function(e){e!==this.symbolTextStyle._strikeout&&(this.symbolTextStyle.strikeout=e)}},borderSpacingWidth:{get:function(){return this._borderSpacingWidth},set:function(e){e!==this._borderSpacingWidth&&(this._borderSpacingWidth=e)}},outlineWidth:{get:function(){return this.symbolTextStyle._outlineWidth},set:function(e){e!==this.symbolTextStyle._outlineWidth&&(this.symbolTextStyle.outlineWidth=e)}},fontWidth:{get:function(){return this.symbolTextStyle._fontWidth},set:function(e){e!==this.symbolTextStyle._fontWidth&&(this.symbolTextStyle.fontWidth=e)}},opaqueRate:{get:function(){return this.symbolTextStyle._opaqueRate},set:function(e){e!==this.symbolTextStyle._opaqueRate&&(this.symbolTextStyle.opaqueRate=e)}},stringAlignment:{get:function(){return this.symbolTextStyle._stringAlignment},set:function(e){e!==this.symbolTextStyle._stringAlignment&&(this.symbolTextStyle.stringAlignment=e)}},text3DScale:{get:function(){return this.symbolTextStyle._text3DScale},set:function(e){e!==this.symbolTextStyle._text3DScale&&(this.symbolTextStyle.text3DScale=e)}},fontWeight:{get:function(){return this.symbolTextStyle._fontWeight},set:function(e){e!==this.symbolTextStyle._fontWeight&&(this.symbolTextStyle.fontWeight=e)}},fontSize:{get:function(){return this.symbolTextStyle._fontSize},set:function(e){e!==this.symbolTextStyle._fontSize&&(this.symbolTextStyle.fontSize=e)}},outlineColor:{get:function(){return this.symbolTextStyle._outlineColor},set:function(e){e!==this.symbolTextStyle._outlineColor&&(this.symbolTextStyle.outlineColor=e)}},gridSymbolSize:{get:function(){return this._gridSymbolSize},set:function(e){e.x>0&&e.y>0&&(this._gridSymbolSize=e)}},lineSymbolID:{get:function(){return this._lineSymbolID},set:function(e){this._lineSymbolID!==e&&(this._lineSymbolID=e)}},gridLineWidth:{get:function(){return this._gridLineWidth},set:function(e){this._gridLineWidth!==e&&(this._gridLineWidth=e)}},modelPath:{get:function(){return this._modelPath},set:function(e){this._modelPath!==e&&(this._modelPath=e)}}}),WebGLPlot$4.DefaultStyle=_0x1d0b9d;var _0x292cd2=(_0x39c022=!0,function(e,t){var i=_0x39c022?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39c022=!1,i}),_0x2a9f7d=_0x292cd2(void 0,(function(){return _0x2a9f7d.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a9f7d).search("(((.+)+)+)+$")})),_0x39c022;_0x2a9f7d();var WebGLPlot$3=window.WebGLPlot=window.WebGLPlot||{};function _0x14b23e(e){e=e||{},this.properties=e.properties?e.properties:[],this.CLASS_NAME="ExtendProperty"}function t$2(e){this._shaderProgramText=e.shaderProgramText,this._name=e.name,this._context=e.context}function r$8(e,t){this.name=e.name,this._engine=e.engine,this._shaderProgram=e.shaderProgram,this._threadGroupsize=[],this._computerShader=new _0x14f326(this.name,this._engine,{computeSource:this._shaderProgram},t)}_0x14b23e.prototype.addProperty=function(e,t){var i=this.findProperty(e);return null===i?this.properties.push(WebGLPlot$3.createProperty(e,t)):i.setValue(t),!0},_0x14b23e.prototype.deleteProperty=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties.slice(t,1),!0;return!1},_0x14b23e.prototype.findProperty=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties[t];return null},_0x14b23e.prototype.getPropertyValue=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties[t].value;return null},_0x14b23e.prototype.getPropertyByIndex=function(e){return e<this.properties.length?this.properties[e]:null},_0x14b23e.prototype.getPropertyCount=function(){return this.properties.length},_0x14b23e.prototype.destroy=function(){this.properties=null},WebGLPlot$3.ExtendProperty=_0x14b23e,Object.defineProperties(t$2.prototype,{shaderProgram:{get:function(){return this._shaderProgramText}},shaderName:{get:function(){return this._name}},engine:{get:function(){return this._context.engine}}}),Object.defineProperties(r$8.prototype,{threadGroupsize:{get:function(){return this._threadGroupsize}}}),r$8.prototype.dispatch=function(e,t,i,n){e$2b(t)||(t=1),e$2b(i)||(i=1),0==this.threadGroupsize.length&&this.getThreadGroupSizes(this._shaderProgram);const r=this.threadGroupsize,o=Math.ceil(e/r[0]),a=Math.ceil(t/r[1]),s=Math.ceil(i/r[2]);return e$2b(n)?this._computerShader.dispatchWhenReady(o,a,s,n):(this._computerShader.dispatch(o,a,s),null)},r$8.prototype.getThreadGroupSizes=function(e){var t=/workgroup_size\s*?\(\s*?(\d+)\s*?,\s*?(\d+)\s*?,\s*?(\d+)/g.exec(e);return t=t?[0|t[1],0|t[2],0|t[3]]:[1,1,1],this._threadGroupsize=t,t},r$8.prototype.bindStorageBuffer=function(e,t){this._computerShader.setStorageBuffer(e,t)},r$8.prototype.bindUniformBuffer=function(e,t){this._computerShader.setUniformBuffer(e,t)},r$8.prototype.bindTextureSampler=function(e,t){this._computerShader.setTextureSampler(e,t)},r$8.prototype.bindStorageTexture=function(e,t){this._computerShader.setStorageTexture(e,t)},r$8.prototype.bindTexture=function(e,t,i){this._computerShader.setTexture(e,t,i)};var _0x28b766=(_0x5d388f=!0,function(e,t){var i=_0x5d388f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d388f=!1,i}),_0x6489fa=_0x28b766(void 0,(function(){return _0x6489fa.toString().search("(((.+)+)+)+$").toString().constructor(_0x6489fa).search("(((.+)+)+)+$")})),_0x5d388f;_0x6489fa();var CommonNoLigthOneTextureVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\n#ifdef RENDER_POINT\nuniform float uPointSize;\n#endif\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n gl_Position = depthClampFarPlane(pos);\n vTexCoord = aTexCoord0.xy;\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n#ifdef RENDER_POINT\n gl_PointSize = uPointSize;\n#endif\n}",_0x262122=(_0x57b18c=!0,function(e,t){var i=_0x57b18c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57b18c=!1,i}),_0x40bdea=_0x262122(void 0,(function(){return _0x40bdea.toString().search("(((.+)+)+)+$").toString().constructor(_0x40bdea).search("(((.+)+)+)+$")})),_0x57b18c;_0x40bdea();var CommonOneTextureFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uTexture0;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec2 texcoord = vTexCoord.xy;\n gl_FragColor = texture2D(uTexture0, texcoord);\n}",_0x4dc43e=(_0x5715c1=!0,function(e,t){var i=_0x5715c1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5715c1=!1,i}),_0x1c822c=_0x4dc43e(void 0,(function(){return _0x1c822c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c822c).search("(((.+)+)+)+$")})),_0x5715c1;_0x1c822c();var DepthMapAnalysisVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nuniform mat4 uRenderTextureMatrix;\nvarying vec4 renderTextureCoord;\nvarying float texcoordX;\n#ifdef LOG_DEPTH\nvarying float v_rttLogZ;\n#endif\nvarying vec4 vPositionEC;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n vPositionEC = viewPos;\n renderTextureCoord = uRenderTextureMatrix * viewPos;\n texcoordX = aTexCoord0.x;\n}",_0x3bc55c=(_0x108208=!0,function(e,t){var i=_0x108208?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x108208=!1,i}),_0x54131e=_0x3bc55c(void 0,(function(){return _0x54131e.toString().search("(((.+)+)+)+$").toString().constructor(_0x54131e).search("(((.+)+)+)+$")})),_0x108208;_0x54131e();var ModifyRegionBottomFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uColorTexture;\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\nuniform vec4 uGeoBounds;\nuniform vec4 uHypRect;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying float fHeight;\n\n\nfloat computeMixCon(float height)\n{\n\tfloat distanceToContour = mod(height - 0.0002, uHypContourInterval);\n\tfloat dxc = abs(dFdx(height));\n\tfloat dyc = abs(dFdy(height));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float height)\n{\n\tfloat threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat contourRate = (height - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tvec2 contourCoord = vec2(0.0, finalCoord);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec2 texcoord = vTexCoord.xy;\n gl_FragColor = texture2D(uColorTexture, texcoord);\n if(uHypHasColorTable > 0.1)\n {\n float bNext = 1.0;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (uGeoBounds.z - uGeoBounds.x) + uGeoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uGeoBounds.w - uGeoBounds.y) + uGeoBounds.y;\n if(polyTexCoord.x>uHypRect.x && polyTexCoord.x<uHypRect.z && polyTexCoord.y> uHypRect.y&& polyTexCoord.y < uHypRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uHypRect.x, uHypRect.w);\n polyTexCoord.x = polyTexCoord.x / (uHypRect.z - uHypRect.x);\n polyTexCoord.y = 1.0 - polyTexCoord.y / (uHypRect.y - uHypRect.w);\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n bNext = 0.0;\n }\n }\n else\n {\n bNext = 0.0;\n }\n }\n if(bNext > 0.2)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(fHeight <= uHypMaxVisibleValue && fHeight >= uHypMinVisibleValue)\n {\n#ifdef GL_OES_standard_derivatives\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fHeight);\n contourMapColor = mix(computeContourMapColor(fHeight), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fHeight);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fHeight);\n }\n else\n {\n finalOpacity = 0.0;\n }\n }\n else\n {\n finalOpacity = 0.5;\n }\n gl_FragColor = mix(gl_FragColor, contourMapColor, finalOpacity);\n }\n }\n}",_0x53f31f=(_0x158f9e=!0,function(e,t){var i=_0x158f9e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x158f9e=!1,i}),_0x264b62=_0x53f31f(void 0,(function(){return _0x264b62.toString().search("(((.+)+)+)+$").toString().constructor(_0x264b62).search("(((.+)+)+)+$")})),_0x158f9e;_0x264b62();var ModifyRegionBottomVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\n#ifdef RENDER_POINT\nuniform float uPointSize;\n#endif\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying float fHeight;\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n gl_Position = depthClampFarPlane(pos);\n vTexCoord = aTexCoord0.xy;\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n fHeight = aPosition.w;\n#ifdef RENDER_POINT\n gl_PointSize = uPointSize;\n#endif\n}",_0x2ac431=(_0x43408b=!0,function(e,t){var i=_0x43408b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43408b=!1,i}),_0x47e9e3=_0x2ac431(void 0,(function(){return _0x47e9e3.toString().search("(((.+)+)+)+$").toString().constructor(_0x47e9e3).search("(((.+)+)+)+$")})),_0x43408b;_0x47e9e3();var ModifyRegionOuterFS="varying vec2 vTexCoord;\nuniform sampler2D uColorTexture;\nvoid main()\n{\n gl_FragColor = texture2D(uColorTexture, vTexCoord);\n}",_0x5cee8f=(_0x29227a=!0,function(e,t){var i=_0x29227a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29227a=!1,i}),_0x36c236=_0x5cee8f(void 0,(function(){return _0x36c236.toString().search("(((.+)+)+)+$").toString().constructor(_0x36c236).search("(((.+)+)+)+$")})),_0x29227a;_0x36c236();var ModifyRegionOuterVS="attribute vec4 aPosition;\nattribute vec2 aTexCoord;\nuniform vec2 uMinMaxModifyHeight;\nvarying vec2 vTexCoord;\nuniform sampler2D uHeightTexture;\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uHeightTexture, aTexCoord));\n float height = aPosition.z + terrainHeight;\n vec4 vertexPos = vec4(aPosition.xy, height, 1.0);\n gl_Position = czm_modelViewProjection * vertexPos;\n vTexCoord = aTexCoord;\n}",_0x510f99=(_0x17c529=!0,function(e,t){var i=_0x17c529?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17c529=!1,i}),_0xbe76f8=_0x510f99(void 0,(function(){return _0xbe76f8.toString().search("(((.+)+)+)+$").toString().constructor(_0xbe76f8).search("(((.+)+)+)+$")})),_0x17c529;_0xbe76f8();var ModifyRegionSideFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uHeightTexture;\nuniform sampler2D uColorTexture;\n\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\nuniform vec4 uGeoBounds;\nuniform vec4 uHypRect;\nvarying vec2 vTexcoord;\nvarying float fHeight;\nvarying float height;\nvarying float regionHeight;\n#ifdef Excavation\nvarying vec2 vTexcoord1;\n#endif\n\nfloat computeMixCon(float height)\n{\n\tfloat distanceToContour = mod(height - 0.0002, uHypContourInterval);\n\tfloat dxc = abs(dFdx(height));\n\tfloat dyc = abs(dFdy(height));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float height)\n{\n\tfloat threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat contourRate = (height - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tvec2 contourCoord = vec2(0.0, finalCoord);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvoid main()\n{\nczm_writeDepthClampedToFarPlane();\n\tvec2 texcoord = vTexcoord;\n#ifdef Excavation\n\ttexcoord = vTexcoord1;\n#endif\nfloat terrainHeight = max(czm_unpackValue(texture2D(uHeightTexture, vTexcoord)), 0.0);\nif(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n}\n#ifndef Excavation\n if(regionHeight > terrainHeight)\n {\n if(height > regionHeight|| height < terrainHeight - 500.0)\n {\n discard;\n }\n }\n else\n {\n if(height > terrainHeight || height < regionHeight - 500.0)\n {\n discard;\n }\n }\n#else\n if(height > terrainHeight || height < regionHeight)\n {\n discard;\n }\n#endif\n\tgl_FragColor = vec4(texture2D(uColorTexture, texcoord).rgb, 1.0);\n\tif(uHypHasColorTable > 0.1)\n {\n float bNext = 1.0;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexcoord.xy;\n polyTexCoord.x = polyTexCoord.x * (uGeoBounds.z - uGeoBounds.x) + uGeoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uGeoBounds.w - uGeoBounds.y) + uGeoBounds.y;\n if(polyTexCoord.x>uHypRect.x && polyTexCoord.x<uHypRect.z && polyTexCoord.y> uHypRect.y&& polyTexCoord.y < uHypRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uHypRect.x, uHypRect.w);\n polyTexCoord.x = polyTexCoord.x / (uHypRect.z - uHypRect.x);\n polyTexCoord.y = 1.0 - polyTexCoord.y / (uHypRect.y - uHypRect.w);\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n bNext = 0.0;\n }\n }\n else\n {\n bNext = 0.0;\n }\n }\n if(bNext > 0.2)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(fHeight <= uHypMaxVisibleValue && fHeight >= uHypMinVisibleValue)\n {\n#ifdef GL_OES_standard_derivatives\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fHeight);\n contourMapColor = mix(computeContourMapColor(fHeight), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fHeight);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fHeight);\n }\n else\n {\n finalOpacity = 0.0;\n }\n }\n else\n {\n finalOpacity = 0.5;\n }\n gl_FragColor = mix(gl_FragColor, contourMapColor, finalOpacity);\n }\n }\n}",_0x1813bd=(_0x29c6a2=!0,function(e,t){var i=_0x29c6a2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29c6a2=!1,i}),_0x1b9e3=_0x1813bd(void 0,(function(){return _0x1b9e3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b9e3).search("(((.+)+)+)+$")})),_0x29c6a2;_0x1b9e3();var ModifyRegionSideVp="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n\nuniform sampler2D uTexture0;\nvarying vec2 vTexcoord;\nvarying float fHeight;\nvarying float height;\nvarying float regionHeight;\n#ifdef Excavation\nvarying vec2 vTexcoord1;\n#endif\n\nvoid main()\n{\n\tvTexcoord = aTexCoord0.xy;\n#ifdef Excavation\n\tvTexcoord1 = aTexCoord1.xy;\n#endif\n\tgl_Position = czm_depthClampFarPlane(czm_modelViewProjection * vec4(aPosition.xyz, 1.0));\n\theight = aPosition.w;\n\tregionHeight = aTexCoord0.z;\n}",_0x1e14b7=(_0x273b5e=!0,function(e,t){var i=_0x273b5e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x273b5e=!1,i}),_0x34cef4=_0x1e14b7(void 0,(function(){return _0x34cef4.toString().search("(((.+)+)+)+$").toString().constructor(_0x34cef4).search("(((.+)+)+)+$")})),_0x273b5e;_0x34cef4();var S3MTilesBillboardVp="attribute vec3 aPosition; \n \nattribute vec3 aNormal; \n \nattribute vec4 aTexCoord0; \n \nattribute vec4 aTexCoord1; \n \n#ifdef VertexColor \nattribute vec4 aColor; \n#endif \n#ifdef BatchTable \nattribute float batchId; \n#endif \n \nvarying vec4 vColor; \nvarying float fVertexColor; \nvarying vec4 vSecondColor; \nvarying vec4 vAmbientColor; \nvarying vec2 vTexCoord; \nvarying vec2 vSecondTexCoord; \nvarying vec4 clip_vertex; \n \nuniform vec4 uDiffuseColor; \nuniform vec4 uAmbientColor; \n \nvoid main() \n{ \n vTexCoord = aTexCoord0.xy; \n vSecondTexCoord = aTexCoord1.xy; \n\tvec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n vertexColor = aColor; \n#endif \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n vec4 operationType = czm_batchTable_operation(batchId); \n vec4 objsColor = czm_batchTable_color(batchId); \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor); \n#endif \n vColor = vertexColor * uDiffuseColor; \n fVertexColor = vertexColor.a; \n vec4 viewPos = czm_modelView * vec4(aPosition, 1.0); \n viewPos.xyz = viewPos.xyz + aNormal; \n clip_vertex = viewPos; \n gl_Position = czm_projection * viewPos; \n vAmbientColor = uAmbientColor; \n}",_0x592b8c=(_0x2e795b=!0,function(e,t){var i=_0x2e795b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e795b=!1,i}),_0x29da08=_0x592b8c(void 0,(function(){return _0x29da08.toString().search("(((.+)+)+)+$").toString().constructor(_0x29da08).search("(((.+)+)+)+$")})),_0x2e795b;_0x29da08();var S3MVoxelGridFp="#extension GL_EXT_draw_buffers : enable\nvarying vec4 vColor;\nvarying vec4 vPosition;\nvarying vec4 vPositionMC;\nvarying float v_pixelDistance;\nvoid main()\n{\n#ifdef CLIP\n czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n vec4 color = vColor;\n float distanceToCenter = length(gl_PointCoord - vec2(0.5));\n float maxDistance = max(0.0, 0.5 - v_pixelDistance);\n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n color.a *= wholeAlpha;\n\tcolor = czm_gammaCorrect(color);\n#ifdef EXCAVATION\n if(czm_executeExcavation())\n {\n discard;\n }\n#endif\n#ifdef OIT\n vec3 Ci = color.rgb * color.a;\n float ai = color.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n#else\n gl_FragColor = color;\n#endif\n}",_0x2cb9d6=(_0x3e721b=!0,function(e,t){var i=_0x3e721b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3e721b=!1,i}),_0x466cb8=_0x2cb9d6(void 0,(function(){return _0x466cb8.toString().search("(((.+)+)+)+$").toString().constructor(_0x466cb8).search("(((.+)+)+)+$")})),_0x3e721b;_0x466cb8();var S3MVoxelGridVp="attribute vec4 aPosition;\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n#endif\nattribute vec4 aColor;\nvarying float v_pixelDistance;\nvarying vec4 vPosition;\nuniform mat4 uGeoMatrix;\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\n#ifdef HYPSOMETRIC\n uniform sampler2D uHypsometricTexture;\n uniform float uHypOpacity;\n uniform float uHypContourFillMode;\n uniform float uHypFloor;\n uniform float uHypCeil;\n uniform float uHypMaxVisibleValue;\n uniform float uHypMinVisibleValue;\n uniform vec4 uNoValueColor;\n#endif\n uniform float uPointCloudSize;\n uniform vec4 uFillForeColor;\n varying vec4 vColor;\n varying vec4 vPositionMC;\n#ifdef HYPSOMETRIC\nvec4 computeContourMapColor(float fValue)\n{\n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n float contourRate = (fValue - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n float count = floor(finalCoord * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 contourCoord = vec2(x, y);\n return texture2D(uHypsometricTexture, contourCoord).rgba;\n}\nvec4 getHypsometricColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n contourMapColor = computeContourMapColor(fValue);\n finalOpacity *= sign(uHypContourFillMode);\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n return mixColor;\n}\n#endif\n\nfloat getGlobeDepth(vec4 positionEC)\n{\n vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n if (globeDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n\nvoid main()\n{\n vec4 vertexPos = aPosition;\n vertexPos.w = 1.0;\n vPositionMC.xyz = vertexPos.xyz;\n vPositionMC.w = 0.0;\n vColor = aColor;\n float wValue = aTexCoord0.x;\n gl_Position = czm_modelViewProjection * vertexPos;\n#ifdef HYPSOMETRIC\n if(wValue > uHypMaxVisibleValue || wValue < uHypMinVisibleValue)\n {\n gl_Position = czm_projection * vec4(0.0, 0.0, 0.0, 1.0);\n }\n vColor = getHypsometricColor(vColor, wValue);\n#endif\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n vColor *= uFillForeColor;\n vPosition = czm_modelView * vertexPos;\n float depthsilon = 10.0;\n float globeDepth = getGlobeDepth(vPosition);\n if (globeDepth != 0.0 && vPosition.z + depthsilon < globeDepth)\n {\n gl_Position = czm_projection * vec4(0.0, 0.0, 0.0, 1.0);\n }\n float mpp = czm_metersPerPixel(vPosition);\n float pointSize = uPointCloudSize / mpp;\n v_pixelDistance = 2.0 / pointSize;\n gl_PointSize = pointSize;\n}",_0x6723e0=(_0x5678b7=!0,function(e,t){var i=_0x5678b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5678b7=!1,i}),_0x44f935=_0x6723e0(void 0,(function(){return _0x44f935.toString().search("(((.+)+)+)+$").toString().constructor(_0x44f935).search("(((.+)+)+)+$")})),_0x5678b7;_0x44f935();var SightlineAnalysisFp="uniform sampler2D uTexture0;\nuniform vec4 uVisibleColor;\nuniform vec4 uHiddenColor;\n\nvarying vec4 renderTextureCoord;\nvarying float texcoordX;\nvarying vec4 vPositionEC;void main()\n{\n vec4 resultColor = vec4(uVisibleColor.rgb, 1.0);\n vec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n float depth = texCoord.z * 0.5 + 0.5;\n // float depthBias = 0.0005 * max(-vPositionEC.z * 0.01, 1.0);\n // depth -= depthBias;\n texCoord.xy = texCoord.xy * 0.5 + 0.5;\n if(abs(texcoordX - 1.0) < 0.0001)\n {\n\t\tfloat z_window = czm_unpackDepth(texture2D(uTexture0, texCoord.xy));\n\t\tif(z_window < depth && z_window > 0.0 && z_window < 1.0)\n\t\t{\n\t\t\tresultColor = vec4(uHiddenColor.rgb, 1.0);\n\t\t}\n }\n else\n {\n\t\tresultColor = vec4(0.4, 0.4, 0.4, 1.0);\n }\n gl_FragColor = resultColor;\n}";const _0x5599d7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x252f02=_0x5599d7(void 0,(function(){return _0x252f02.toString().search("(((.+)+)+)+$").toString().constructor(_0x252f02).search("(((.+)+)+)+$")}));function _0x3c3817(e){var t=_0x3e2f69.call(this)||this;t._layer=e,t._name=_0x27131a.Polyline,this._initUniformMap()}_0x252f02(),_0x3e2f69&&(_0x3c3817.__proto__=_0x3e2f69),_0x3c3817.prototype=Object.create(_0x3e2f69&&_0x3e2f69.prototype),_0x3c3817.prototype.constructor=_0x3e2f69,Object.defineProperties(_0x3c3817.prototype,{}),_0x3c3817.prototype._initUBOStruct=function(){const e=this._ubo;e.addUniform("uForeColor",4),e.addUniform("uBackColor",4),e.addUniform("uRotationAngle",1),e.addUniform("uType",1),e.addUniform("uLineWidthX",1),e.addUniform("uLineWidthY",1),e.addUniform("uRepeatX",1),e.addUniform("uRepeatY",1),e.addUniform("uOffsetX",1),e.addUniform("uOffsetY",1)},_0x3c3817.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1z(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x2e52cb(e.engine,void 0,!1,this._name,!1,!1),this._initUBOStruct(),this._ubo.create()},_0x3c3817.prototype.update=function(e){if(!e.webgpu&&!e.webgl2)return;e$2b(this._ubo)||this._initUBO(e);const t=this._layer,i=this._ubo,n=t._effect;i.updateDirectColor4("uForeColor",n._foreColor),i.updateDirectColor4("uBackColor",n._backColor),i.updateFloat("uRotationAngle",n._rotationAngle),i.updateFloat("uType",n._type),i.updateFloat("uLineWidthX",n._lineWidthX),i.updateFloat("uLineWidthY",n._lineWidthY),i.updateFloat("uRepeatX",n._repeatX),i.updateFloat("uRepeatY",n._repeatY),i.updateFloat("uOffsetX",n._offsetX),i.updateFloat("uOffsetY",n._offsetY),i.update()},_0x3c3817.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x3c3817.prototype._setTextureToEffect=function(e,t,i){if(e$2b(t)&&e$2b(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x3c3817.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(t.webgl2||t.webgpu)return;const i=e._effect;var n={uForeColor:function(){return i._foreColor},uBackColor:function(){return i._backColor},uRotationAngle:function(){return i._rotationAngle},uType:function(){return i._type},uLineWidthX:function(){return i._lineWidthX},uLineWidthY:function(){return i._lineWidthY},uRepeatX:function(){return i._repeatX},uRepeatY:function(){return i._repeatY},uOffsetX:function(){return i._offsetX},uOffsetY:function(){return i._offsetY}};this._uniformMap=n},_0x3c3817.prototype.isDestroyed=function(){return!1},_0x3c3817.prototype.destroy=function(){return e$2b(this._ubo)&&this._ubo.dispose(),i$10(this)};var RasterLayerUboDecl="\n uniform RasterLayer {\n \n };\n",N$1="http://www.w3.org/2000/svg",O$2="http://www.w3.org/1999/xlink",w,x$2=e$1U.fromCssColorString("rgba(247,250,255,0.384)"),E$1=e$1U.fromCssColorString("rgba(143,191,255,0.216)"),M$2=e$1U.fromCssColorString("rgba(153,197,255,0.098)"),k$2=e$1U.fromCssColorString("rgba(255,255,255,0.086)"),K=e$1U.fromCssColorString("rgba(255,255,255,0.267)"),X$1=e$1U.fromCssColorString("rgba(255,255,255,0)"),F$1=e$1U.fromCssColorString("rgba(66,67,68,0.3)"),W$2=e$1U.fromCssColorString("rgba(0,0,0,0.5)");function b$3(e){return e$1U.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}function c$4(e){var t=document.createElementNS(N$1,e.tagName);for(var i in e)if(e.hasOwnProperty(i)&&"tagName"!==i)if("children"===i){var n,r=e.children.length;for(n=0;n<r;++n)t.appendChild(c$4(e.children[n]))}else 0===i.indexOf("xlink:")?t.setAttributeNS(O$2,i.substring(6),e[i]):"textContent"===i?t.textContent=e[i]:t.setAttribute(i,e[i]);return t}function B(e,t,i){var n=document.createElementNS(N$1,"text");n.setAttribute("x",e),n.setAttribute("y",t),n.setAttribute("class","supermap3d-animation-svgText");var r=document.createElementNS(N$1,"tspan");return r.textContent=i,n.appendChild(r),n}function q$1(e,t,i){e.setAttribute("transform","translate(100,100) rotate("+i+")"),t.setAttribute("transform","rotate("+i+")")}var R$2=new e$1U;function i$6(e,t){var i=t.alpha,n=1-i;return R$2.red=e.red*n+t.red*i,R$2.green=e.green*n+t.green*i,R$2.blue=e.blue*n+t.blue*i,R$2.toCssColorString()}function z$1(e,t,i){return c$4({tagName:"g",class:"supermap3d-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"rect",class:"supermap3d-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect",class:"supermap3d-animation-buttonMain",width:32,height:32,rx:4,ry:4},{tagName:"use",class:"supermap3d-animation-buttonPath","xlink:href":i},{tagName:"title",textContent:""}]})}function J(e,t,i){return c$4({tagName:"g",class:"supermap3d-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"use",class:"supermap3d-animation-buttonGlow","xlink:href":"#animation_pathWingButton"},{tagName:"use",class:"supermap3d-animation-buttonMain","xlink:href":"#animation_pathWingButton"},{tagName:"use",class:"supermap3d-animation-buttonPath","xlink:href":i},{tagName:"title",textContent:""}]})}function Q$2(e,t){var i=e._viewModel,n=i.shuttleRingDragging;if(!n||w===e)if("mousedown"===t.type||n&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||n&&"touchmove"===t.type&&1===t.touches.length){var r,o,a=e._centerX,s=e._centerY,l=e._svgNode.getBoundingClientRect();if("touchstart"===t.type||"touchmove"===t.type?(r=t.touches[0].clientX,o=t.touches[0].clientY):(r=t.clientX,o=t.clientY),!n&&(r>l.right||r<l.left||o<l.top||o>l.bottom))return;var u=e._shuttleRingPointer.getBoundingClientRect(),c=r-a-l.left,h=o-s-l.top,d=180*Math.atan2(h,c)/Math.PI+90;d>180&&(d-=360);var f=i.shuttleRingAngle;n||r<u.right&&r>u.left&&o>u.top&&o<u.bottom?(w=e,i.shuttleRingDragging=!0,i.shuttleRingAngle=d):d<f?i.slower():d>f&&i.faster(),t.preventDefault()}else e===w&&(w=void 0),i.shuttleRingDragging=!1}function f$4(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;var i=this;this._clickFunction=function(){var e=i._viewModel.command;e.canExecute&&e()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[c$5(t,"toggled",this.setToggled,this),c$5(t,"tooltip",this.setTooltip,this),c$5(t.command,"canExecute",this.setEnabled,this)]}function y$4(e,t){if(!e$2b(e))throw new t$16("container is required.");if(!e$2b(t))throw new t$16("viewModel is required.");e=i$c(e),this._viewModel=t,this._container=e,this._centerX=0,this._centerY=0,this._defsElement=void 0,this._svgNode=void 0,this._topG=void 0,this._lastHeight=void 0,this._lastWidth=void 0;var i=document.createElement("style");i.textContent=".supermap3d-animation-rectButton .supermap3d-animation-buttonGlow { filter: url(#animation_blurred); }.supermap3d-animation-rectButton .supermap3d-animation-buttonMain { fill: url(#animation_buttonNormal); }.supermap3d-animation-buttonToggled .supermap3d-animation-buttonMain { fill: url(#animation_buttonToggled); }.supermap3d-animation-rectButton:hover .supermap3d-animation-buttonMain { fill: url(#animation_buttonHovered); }.supermap3d-animation-buttonDisabled .supermap3d-animation-buttonMain { fill: url(#animation_buttonDisabled); }.supermap3d-animation-shuttleRingG .supermap3d-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.supermap3d-animation-shuttleRingG:hover .supermap3d-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.supermap3d-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.supermap3d-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.supermap3d-animation-knobOuter { fill: url(#animation_knobOuter); }.supermap3d-animation-knobInner { fill: url(#animation_knobInner); }",document.head.insertBefore(i,document.head.childNodes[0]);var n=document.createElement("div");n.className="supermap3d-animation-theme",n.innerHTML='<div class="supermap3d-animation-themeNormal"></div><div class="supermap3d-animation-themeHover"></div><div class="supermap3d-animation-themeSelect"></div><div class="supermap3d-animation-themeDisabled"></div><div class="supermap3d-animation-themeKnob"></div><div class="supermap3d-animation-themePointer"></div><div class="supermap3d-animation-themeSwoosh"></div><div class="supermap3d-animation-themeSwooshHover"></div>',this._theme=n,this._themeNormal=n.childNodes[0],this._themeHover=n.childNodes[1],this._themeSelect=n.childNodes[2],this._themeDisabled=n.childNodes[3],this._themeKnob=n.childNodes[4],this._themePointer=n.childNodes[5],this._themeSwoosh=n.childNodes[6],this._themeSwooshHover=n.childNodes[7];var r=document.createElementNS(N$1,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",O$2);var o=document.createElementNS(N$1,"g");this._topG=o,this._realtimeSVG=new f$4(J(3,4,"#animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new f$4(z$1(44,99,"#animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new f$4(z$1(124,99,"#animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new f$4(z$1(84,99,"#animation_pathPause"),t.pauseViewModel);var a=document.createElementNS(N$1,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);var s=c$4({tagName:"circle",class:"supermap3d-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=s;var l=c$4({tagName:"g",class:"supermap3d-animation-shuttleRingSwoosh",children:[{tagName:"use",transform:"translate(100,97) scale(-1,1)","xlink:href":"#animation_pathSwooshFX"},{tagName:"use",transform:"translate(100,97)","xlink:href":"#animation_pathSwooshFX"},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=l,this._shuttleRingPointer=c$4({tagName:"use",class:"supermap3d-animation-shuttleRingPointer","xlink:href":"#animation_pathPointer"});var u=c$4({tagName:"g",transform:"translate(100,100)"});this._knobOuter=c$4({tagName:"circle",class:"supermap3d-animation-knobOuter",cx:0,cy:0,r:71});var c=c$4({tagName:"circle",class:"supermap3d-animation-knobInner",cx:0,cy:0,r:61});this._knobDate=B(0,-24,""),this._knobTime=B(0,-7,""),this._knobStatus=B(0,-41,"");var h=c$4({tagName:"circle",class:"supermap3d-animation-blank",cx:0,cy:0,r:61}),d=document.createElementNS(N$1,"g");d.setAttribute("class","supermap3d-animation-shuttleRingG"),e.appendChild(n),o.appendChild(d),o.appendChild(u),o.appendChild(a),d.appendChild(s),d.appendChild(l),d.appendChild(this._shuttleRingPointer),u.appendChild(this._knobOuter),u.appendChild(c),u.appendChild(this._knobDate),u.appendChild(this._knobTime),u.appendChild(this._knobStatus),u.appendChild(h),r.appendChild(o),e.appendChild(r);var f=this;function p(e){Q$2(f,e)}this._mouseCallback=p,s.addEventListener("mousedown",p,!0),s.addEventListener("touchstart",p,!0),l.addEventListener("mousedown",p,!0),l.addEventListener("touchstart",p,!0),document.addEventListener("mousemove",p,!0),document.addEventListener("touchmove",p,!0),document.addEventListener("mouseup",p,!0),document.addEventListener("touchend",p,!0),document.addEventListener("touchcancel",p,!0),this._shuttleRingPointer.addEventListener("mousedown",p,!0),this._shuttleRingPointer.addEventListener("touchstart",p,!0),this._knobOuter.addEventListener("mousedown",p,!0),this._knobOuter.addEventListener("touchstart",p,!0);var _,m=this._knobTime.childNodes[0],g=this._knobDate.childNodes[0],x=this._knobStatus.childNodes[0];this._subscriptions=[c$5(t.pauseViewModel,"toggled",(function(e){_!==e&&((_=e)?f._shuttleRingPointer.setAttribute("class","supermap3d-animation-shuttleRingPausePointer"):f._shuttleRingPointer.setAttribute("class","supermap3d-animation-shuttleRingPointer"))})),c$5(t,"shuttleRingAngle",(function(e){q$1(f._shuttleRingPointer,f._knobOuter,e)})),c$5(t,"dateLabel",(function(e){g.textContent!==e&&(g.textContent=e)})),c$5(t,"timeLabel",(function(e){m.textContent!==e&&(m.textContent=e)})),c$5(t,"multiplierLabel",(function(e){x.textContent!==e&&(x.textContent=e)}))],this.applyThemeChanges(),this.resize()}f$4.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);for(var e=this._subscriptions,t=0,i=e.length;t<i;t++)e[t].dispose();i$10(this)},f$4.prototype.isDestroyed=function(){return!1},f$4.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e)return void this.svgElement.setAttribute("class","supermap3d-animation-buttonDisabled");if(this._toggled)return void this.svgElement.setAttribute("class","supermap3d-animation-rectButton supermap3d-animation-buttonToggled");this.svgElement.setAttribute("class","supermap3d-animation-rectButton")}},f$4.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","supermap3d-animation-rectButton supermap3d-animation-buttonToggled"):this.svgElement.setAttribute("class","supermap3d-animation-rectButton")))},f$4.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e},Object.defineProperties(y$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),y$4.prototype.isDestroyed=function(){return!1},y$4.prototype.destroy=function(){e$2b(this._observer)&&(this._observer.disconnect(),this._observer=void 0);var e=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",e,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",e,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",e,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",e,!0),document.removeEventListener("mousemove",e,!0),document.removeEventListener("touchmove",e,!0),document.removeEventListener("mouseup",e,!0),document.removeEventListener("touchend",e,!0),document.removeEventListener("touchcancel",e,!0),this._shuttleRingPointer.removeEventListener("mousedown",e,!0),this._shuttleRingPointer.removeEventListener("touchstart",e,!0),this._knobOuter.removeEventListener("mousedown",e,!0),this._knobOuter.removeEventListener("touchstart",e,!0),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();for(var t=this._subscriptions,i=0,n=t.length;i<n;i++)t[i].dispose();return i$10(this)},y$4.prototype.resize=function(){var e=this._container.clientWidth,t=this._container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){var i=this._svgNode,n=200,r=132,o=e,a=t;0===e&&0===t?(o=n,a=r):0===e?(a=t,o=n*(t/r)):0===t&&(o=e,a=r*(e/n));var s=o/n,l=a/r;i.style.cssText="width: "+o+"px; height: "+a+"px; position: absolute; bottom: 0; left: 0; overflow: hidden;",i.setAttribute("width",o),i.setAttribute("height",a),i.setAttribute("viewBox","0 0 "+o+" "+a),this._topG.setAttribute("transform","scale("+s+","+l+")"),this._centerX=Math.max(1,100*s),this._centerY=Math.max(1,100*l),this._lastHeight=e,this._lastWidth=t}},y$4.prototype.applyThemeChanges=function(){if(!document.body.contains(this._container)){if(e$2b(this._observer))return;var e=this;return e._observer=new MutationObserver((function(){document.body.contains(e._container)&&(e._observer.disconnect(),e._observer=void 0,e.applyThemeChanges())})),void e._observer.observe(document,{childList:!0,subtree:!0})}var t=b$3(this._themeNormal),i=b$3(this._themeHover),n=b$3(this._themeSelect),r=b$3(this._themeDisabled),o=b$3(this._themeKnob),a=b$3(this._themePointer),s=b$3(this._themeSwoosh),l=b$3(this._themeSwooshHover),u=c$4({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(t,x$2)},{tagName:"stop",offset:"12%","stop-color":i$6(t,E$1)},{tagName:"stop",offset:"46%","stop-color":i$6(t,M$2)},{tagName:"stop",offset:"81%","stop-color":i$6(t,k$2)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(i,x$2)},{tagName:"stop",offset:"12%","stop-color":i$6(i,E$1)},{tagName:"stop",offset:"46%","stop-color":i$6(i,M$2)},{tagName:"stop",offset:"81%","stop-color":i$6(i,k$2)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(n,x$2)},{tagName:"stop",offset:"12%","stop-color":i$6(n,E$1)},{tagName:"stop",offset:"46%","stop-color":i$6(n,M$2)},{tagName:"stop",offset:"81%","stop-color":i$6(n,k$2)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(r,K)},{tagName:"stop",offset:"75%","stop-color":i$6(r,X$1)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,in:"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":s.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":l.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":i$6(a,W$2)},{tagName:"stop",offset:"100%","stop-color":i$6(a,W$2)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":i$6(o,x$2)},{tagName:"stop",offset:"60%","stop-color":i$6(o,F$1)},{tagName:"stop",offset:"85%","stop-color":i$6(o,E$1)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":i$6(o,F$1)},{tagName:"stop",offset:"60%","stop-color":i$6(o,x$2)},{tagName:"stop",offset:"85%","stop-color":i$6(o,k$2)}]},{id:"animation_pathReset",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},{id:"animation_pathPause",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},{id:"animation_pathPlay",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},{id:"animation_pathPlayReverse",tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},{id:"animation_pathLoop",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},{id:"animation_pathClock",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},{id:"animation_pathWingButton",tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},{id:"animation_pathPointer",tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},{id:"animation_pathSwooshFX",tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}]});e$2b(this._defsElement)?this._svgNode.replaceChild(u,this._defsElement):this._svgNode.appendChild(u),this._defsElement=u};var F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],f$3=15,_$2=105;function R$1(e,t){return e-t}function y$3(e,t){var i=a$17(t,e,R$1);return i<0?~i:i}function b$2(e,t){if(Math.abs(e)<=f$3)return e/f$3;var i,n=f$3,r=_$2;return e>0?(i=(Math.log(t[t.length-1])-0)/(r-n),Math.exp(0+i*(e-n))):(i=(Math.log(-t[0])-0)/(r-n),-Math.exp(0+i*(Math.abs(e)-n)))}function C$2(e,t,i){if(i.clockStep===g$Q.SYSTEM_CLOCK)return f$3;if(Math.abs(e)<=1)return e*f$3;var n=t[t.length-1];e>n?e=n:e<-n&&(e=-n);var r,o=f$3,a=_$2;return e>0?(r=(Math.log(n)-0)/(a-o),(Math.log(e)-0)/r+o):(r=(Math.log(-t[0])-0)/(a-o),-((Math.log(Math.abs(e))-0)/r+o))}function m$5(e){if(!e$2b(e))throw new t$16("clockViewModel is required.");var t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=m$5.defaultDateFormatter,this._timeFormatter=m$5.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,ce$1.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(m$5.defaultTicks),this.timeLabel=void 0,ce$1.defineProperty(this,"timeLabel",(function(){return t._timeFormatter(t._clockViewModel.currentTime,t)})),this.dateLabel=void 0,ce$1.defineProperty(this,"dateLabel",(function(){return t._dateFormatter(t._clockViewModel.currentTime,t)})),this.multiplierLabel=void 0,ce$1.defineProperty(this,"multiplierLabel",(function(){var e=t._clockViewModel;if(e.clockStep===g$Q.SYSTEM_CLOCK)return"Today";var i=e.multiplier;return i%1==0?i.toFixed(0)+"x":i.toFixed(3).replace(/0{0,3}$/,"")+"x"})),this.shuttleRingAngle=void 0,ce$1.defineProperty(this,"shuttleRingAngle",{get:function(){return C$2(e.multiplier,t._allShuttleRingTicks,e)},set:function(e){e=Math.max(Math.min(e,_$2),-_$2);var i=t._allShuttleRingTicks,n=t._clockViewModel;if(n.clockStep=g$Q.SYSTEM_CLOCK_MULTIPLIER,Math.abs(e)!==_$2){var r=b$2(e,i);if(t.snapToTicks)r=i[y$3(r,i)];else if(0!==r){var o=Math.abs(r);if(o>100){var a=o.toFixed(0).length-2,s=Math.pow(10,a);r=Math.round(r/s)*s|0}else o>f$3?r=Math.round(r):o>1?r=+r.toFixed(1):o>0&&(r=+r.toFixed(2))}n.multiplier=r}else n.multiplier=e>0?i[i.length-1]:i[0]}}),this._canAnimate=void 0,ce$1.defineProperty(this,"_canAnimate",(function(){var e=t._clockViewModel,i=e.clockRange;if(t.shuttleRingDragging||i===tt$9.UNBOUNDED)return!0;var n=e.multiplier,r=e.currentTime,o=e.startTime,a=!1;if(i===tt$9.LOOP_STOP)a=a$15.greaterThan(r,o)||r.equals(o)&&n>0;else{var s=e.stopTime;a=a$15.greaterThan(r,o)&&a$15.lessThan(r,s)||r.equals(o)&&n>0||r.equals(s)&&n<0}return a||(e.shouldAnimate=!1),a})),this._isSystemTimeAvailable=void 0,ce$1.defineProperty(this,"_isSystemTimeAvailable",(function(){var e=t._clockViewModel;if(e.clockRange===tt$9.UNBOUNDED)return!0;var i=e.systemTime;return a$15.greaterThanOrEquals(i,e.startTime)&&a$15.lessThanOrEquals(i,e.stopTime)})),this._isAnimating=void 0,ce$1.defineProperty(this,"_isAnimating",(function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)}));var i=s$4((function(){var e=t._clockViewModel;e.shouldAnimate?e.shouldAnimate=!1:t._canAnimate&&(e.shouldAnimate=!0)}));this._pauseViewModel=new r$9(i,{toggled:ce$1.computed((function(){return!t._isAnimating})),tooltip:"Pause"});var n=s$4((function(){var e=t._clockViewModel,i=e.multiplier;i>0&&(e.multiplier=-i),e.shouldAnimate=!0}));this._playReverseViewModel=new r$9(n,{toggled:ce$1.computed((function(){return t._isAnimating&&e.multiplier<0})),tooltip:"Play Reverse"});var r=s$4((function(){var e=t._clockViewModel,i=e.multiplier;i<0&&(e.multiplier=-i),e.shouldAnimate=!0}));this._playForwardViewModel=new r$9(r,{toggled:ce$1.computed((function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==g$Q.SYSTEM_CLOCK})),tooltip:"Play Forward"});var o=s$4((function(){t._clockViewModel.clockStep=g$Q.SYSTEM_CLOCK}),ce$1.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new r$9(o,{toggled:ce$1.computed((function(){return e.clockStep===g$Q.SYSTEM_CLOCK})),tooltip:ce$1.computed((function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"}))}),this._slower=s$4((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,n=y$3(e.multiplier,i)-1;n>=0&&(e.multiplier=i[n])})),this._faster=s$4((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,n=y$3(e.multiplier,i)+1;n<i.length&&(e.multiplier=i[n])}))}function V(e){var t=(e=u$_(e,u$_.EMPTY_OBJECT)).globe,i=u$_(e.imageryProviderViewModels,[]),n=u$_(e.terrainProviderViewModels,[]);if(!e$2b(t))throw new t$16("globe is required");this._globe=t,this.imageryProviderViewModels=i.slice(0),this.terrainProviderViewModels=n.slice(0),this.dropDownVisible=!1,ce$1.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);var r=ce$1.getObservable(this,"imageryProviderViewModels"),o=ce$1.pureComputed((function(){var e,t=r(),i={};for(e=0;e<t.length;e++){var n=t[e],o=n.category;e$2b(i[o])?i[o].push(n):i[o]=[n]}var a=Object.keys(i),s=[];for(e=0;e<a.length;e++){var l=a[e];s.push({name:l,providers:i[l]})}return s}));this._imageryProviders=o;var a=ce$1.getObservable(this,"terrainProviderViewModels"),s=ce$1.pureComputed((function(){var e,t=a(),i={};for(e=0;e<t.length;e++){var n=t[e],r=n.category;e$2b(i[r])?i[r].push(n):i[r]=[n]}var o=Object.keys(i),s=[];for(e=0;e<o.length;e++){var l=o[e];s.push({name:l,providers:i[l]})}return s}));this._terrainProviders=s,this.buttonTooltip=void 0,ce$1.defineProperty(this,"buttonTooltip",(function(){var e=this.selectedImagery,t=this.selectedTerrain,i=e$2b(e)?e.name:void 0,n=e$2b(t)?t.name:void 0;return e$2b(i)&&e$2b(n)?i+"\n"+n:e$2b(i)?i:n})),this.buttonImageUrl=void 0,ce$1.defineProperty(this,"buttonImageUrl",(function(){var e=this.selectedImagery;if(e$2b(e))return e.iconUrl})),this.selectedImagery=void 0;var l=ce$1.observable();this._currentImageryProviders=[],ce$1.defineProperty(this,"selectedImagery",{get:function(){return l()},set:function(e){if(l()!==e){var t,i=this._currentImageryProviders,n=i.length,r=this._globe.imageryLayers,o=!1;for(t=0;t<n;t++)for(var a=r.length,s=0;s<a;s++){var u=r.get(s);if(u.imageryProvider===i[t]){r.remove(u),o=!0;break}}if(e$2b(e)){var c=e.creationCommand();if(Array.isArray(c)){for(t=c.length-1;t>=0;t--)r.addImageryProvider(c[t],0);this._currentImageryProviders=c.slice(0)}else if(this._currentImageryProviders=[c],o)r.addImageryProvider(c,0);else{var h=r.get(0);e$2b(h)&&r.remove(h),r.addImageryProvider(c,0)}}l(e),this.dropDownVisible=!1}else this.dropDownVisible=!1}}),this.selectedTerrain=void 0;var u=ce$1.observable();ce$1.defineProperty(this,"selectedTerrain",{get:function(){return u()},set:function(e){var t;u()!==e?(e$2b(e)&&(t=e.creationCommand()),this._globe.depthTestAgainstTerrain=!(t instanceof t$A),this._globe.terrainProvider=t,u(e),this.dropDownVisible=!1):this.dropDownVisible=!1}});var c=this;this._toggleDropDown=s$4((function(){c.dropDownVisible=!c.dropDownVisible})),this.selectedImagery=u$_(e.selectedImageryProviderViewModel,i[0]),this.selectedTerrain=u$_(e.selectedTerrainProviderViewModel,n[0])}function g$3(e,t){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e);var i=new V(t),n=document.createElement("button");n.type="button",n.className="supermap3d-button supermap3d-toolbar-button",n.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(n);var r=document.createElement("img");r.setAttribute("draggable","false"),r.className="supermap3d-baseLayerPicker-selected",r.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),n.appendChild(r);var o=document.createElement("div");o.className="supermap3d-baseLayerPicker-dropDown",o.setAttribute("data-bind",'css: { "supermap3d-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(o);var a=document.createElement("div");a.className="supermap3d-baseLayerPicker-sectionTitle",a.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),a.innerHTML="Imagery",o.appendChild(a);var s=document.createElement("div");s.className="supermap3d-baseLayerPicker-section",s.setAttribute("data-bind","foreach: _imageryProviders"),o.appendChild(s);var l=document.createElement("div");l.className="supermap3d-baseLayerPicker-category",s.appendChild(l);var u=document.createElement("div");u.className="supermap3d-baseLayerPicker-categoryTitle",u.setAttribute("data-bind","text: name"),l.appendChild(u);var c=document.createElement("div");c.className="supermap3d-baseLayerPicker-choices",c.setAttribute("data-bind","foreach: providers"),l.appendChild(c);var h=document.createElement("div");h.className="supermap3d-baseLayerPicker-item",h.setAttribute("data-bind",'css: { "supermap3d-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),c.appendChild(h);var d=document.createElement("img");d.className="supermap3d-baseLayerPicker-itemIcon",d.setAttribute("data-bind","attr: { src: iconUrl }"),d.setAttribute("draggable","false"),h.appendChild(d);var f=document.createElement("div");f.className="supermap3d-baseLayerPicker-itemLabel",f.setAttribute("data-bind","text: name"),h.appendChild(f);var p=document.createElement("div");p.className="supermap3d-baseLayerPicker-sectionTitle",p.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),p.innerHTML="Terrain",o.appendChild(p);var _=document.createElement("div");_.className="supermap3d-baseLayerPicker-section",_.setAttribute("data-bind","foreach: _terrainProviders"),o.appendChild(_);var m=document.createElement("div");m.className="supermap3d-baseLayerPicker-category",_.appendChild(m);var g=document.createElement("div");g.className="supermap3d-baseLayerPicker-categoryTitle",g.setAttribute("data-bind","text: name"),m.appendChild(g);var x=document.createElement("div");x.className="supermap3d-baseLayerPicker-choices",x.setAttribute("data-bind","foreach: providers"),m.appendChild(x);var v=document.createElement("div");v.className="supermap3d-baseLayerPicker-item",v.setAttribute("data-bind",'css: { "supermap3d-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),x.appendChild(v);var y=document.createElement("img");y.className="supermap3d-baseLayerPicker-itemIcon",y.setAttribute("data-bind","attr: { src: iconUrl }"),y.setAttribute("draggable","false"),v.appendChild(y);var $=document.createElement("div");$.className="supermap3d-baseLayerPicker-itemLabel",$.setAttribute("data-bind","text: name"),v.appendChild($),ce$1.applyBindings(i,n),ce$1.applyBindings(i,o),this._viewModel=i,this._container=e,this._element=n,this._dropPanel=o,this._closeDropDown=function(e){n.contains(e.target)||o.contains(e.target)||(i.dropDownVisible=!1)},s$Y.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function i$5(e){if(!e$2b(e.name))throw new t$16("options.name is required.");if(!e$2b(e.tooltip))throw new t$16("options.tooltip is required.");if(!e$2b(e.iconUrl))throw new t$16("options.iconUrl is required.");if("function"!=typeof e.creationFunction)throw new t$16("options.creationFunction is required.");var t=e.creationFunction;e$2b(t.canExecute)||(t=s$4(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=u$_(e.category,""),ce$1.track(this,["name","tooltip","iconUrl"])}function m$4(){var e=[];return e.push(new i$5({name:"Bing Maps Aerial",iconUrl:n$15("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return o$j({style:n$e.AERIAL})}})),e.push(new i$5({name:"Bing Maps Aerial with Labels",iconUrl:n$15("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return o$j({style:n$e.AERIAL_WITH_LABELS})}})),e.push(new i$5({name:"Bing Maps Roads",iconUrl:n$15("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return o$j({style:n$e.ROAD})}})),e.push(new i$5({name:"Mapbox Satellite",tooltip:"Mapbox satellite imagery ",iconUrl:n$15("Widgets/Images/ImageryProviders/mapboxSatellite.png"),category:"Other",creationFunction:function(){return new m$g({mapId:"mapbox.satellite"})}})),e.push(new i$5({name:"Mapbox Streets",tooltip:"Mapbox streets imagery",iconUrl:n$15("Widgets/Images/ImageryProviders/mapboxTerrain.png"),category:"Other",creationFunction:function(){return new m$g({mapId:"mapbox.streets"})}})),e.push(new i$5({name:"Mapbox Streets Classic",tooltip:"Mapbox streets basic imagery",iconUrl:n$15("Widgets/Images/ImageryProviders/mapboxStreets.png"),category:"Other",creationFunction:function(){return new m$g({mapId:"mapbox.streets-basic"})}})),e.push(new i$5({name:"ESRI World Imagery",iconUrl:n$15("Widgets/Images/ImageryProviders/esriWorldImagery.png"),tooltip:"World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. The map includes NASA Blue Marble: Next Generation 500m resolution imagery at small scales (above 1:1,000,000), i-cubed 15m eSAT imagery at medium-to-large scales (down to 1:70,000) for the world, and USGS 15m Landsat imagery for Antarctica. The map features 0.3m resolution imagery in the continental United States and 0.6m resolution imagery in parts of Western Europe from DigitalGlobe. In other parts of the world, 1 meter resolution imagery is available from GeoEye IKONOS, i-cubed Nationwide Prime, Getmapping, AeroGRID, IGN Spain, and IGP Portugal. Additionally, imagery at different resolutions has been contributed by the GIS User Community.\n",category:"Other",creationFunction:function(){return new b$p({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",enablePickFeatures:!1})}})),e.push(new i$5({name:"ESRI World Street Map",iconUrl:n$15("Widgets/Images/ImageryProviders/esriWorldStreetMap.png"),tooltip:"This worldwide street map presents highway-level data for the world. Street-level data includes the United States; much of Canada; Japan; most countries in Europe; Australia and New Zealand; India; parts of South America including Argentina, Brazil, Chile, Colombia, and Venezuela; Ghana; and parts of southern Africa including Botswana, Lesotho, Namibia, South Africa, and Swaziland.\n",category:"Other",creationFunction:function(){return new b$p({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",enablePickFeatures:!1})}})),e.push(new i$5({name:"ESRI National Geographic",iconUrl:n$15("Widgets/Images/ImageryProviders/esriNationalGeographic.png"),tooltip:"This web map contains the National Geographic World Map service. This map service is designed to be used as a general reference map for informational and educational purposes as well as a basemap by GIS professionals and other users for creating web maps and web mapping applications.\n",category:"Other",creationFunction:function(){return new b$p({url:"https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/",enablePickFeatures:!1})}})),e.push(new i$5({name:"Open­Street­Map",iconUrl:n$15("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:"OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org",category:"Other",creationFunction:function(){return L$j({url:"https://a.tile.openstreetmap.org/"})}})),e.push(new i$5({name:"Stamen Watercolor",iconUrl:n$15("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:"Reminiscent of hand drawn maps, Stamen watercolor maps apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.\n",category:"Other",creationFunction:function(){return L$j({url:"https://stamen-tiles.a.ssl.fastly.net/watercolor/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new i$5({name:"Stamen Toner",iconUrl:n$15("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:"A high contrast black and white map.\n",category:"Other",creationFunction:function(){return L$j({url:"https://stamen-tiles.a.ssl.fastly.net/toner/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new i$5({name:"Sentinel-2",iconUrl:n$15("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"SuperMap3D ion",creationFunction:function(){return new o$k({assetId:3954})}})),e.push(new i$5({name:"Blue Marble",iconUrl:n$15("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"SuperMap3D ion",creationFunction:function(){return new o$k({assetId:3845})}})),e.push(new i$5({name:"Earth at night",iconUrl:n$15("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"SuperMap3D ion",creationFunction:function(){return new o$k({assetId:3812})}})),e.push(new i$5({name:"Natural Earth II",iconUrl:n$15("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\n",category:"SuperMap3D ion",creationFunction:function(){return te$5({url:n$15("Assets/Textures/NaturalEarthII")})}})),e}function n$3(){var e=[];return e.push(new i$5({name:"WGS84 Ellipsoid",iconUrl:n$15("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"SuperMap3D ion",creationFunction:function(){return new t$A}})),e.push(new i$5({name:"SuperMap3D World Terrain",iconUrl:n$15("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return u$H({requestWaterMask:!0,requestVertexNormals:!0})}})),e}function ne(e){return function(t){var i=e._scene.pick(t.position);e$2b(i)&&i.primitive instanceof p$u&&(e.tileset=i.primitive),e.pickActive=!1}}function Y$1(e,t){t?e._eventHandler.setInputAction((function(t){var i=e._scene.pick(t.endPosition);e$2b(i)&&i.primitive instanceof p$u&&(e.tileset=i.primitive)}),G$I.MOUSE_MOVE):(e._eventHandler.removeInputAction(G$I.MOUSE_MOVE),e.picking=e.picking)}m$5.defaultDateFormatter=function(e,t){var i=a$15.toGregorianDate(e);return F[i.month-1]+" "+i.day+" "+i.year},m$5.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800],m$5.defaultTimeFormatter=function(e,t){var i=a$15.toGregorianDate(e),n=Math.round(i.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?$$17("%02d:%02d:%02d.%03d",i.hour,i.minute,i.second,n):$$17("%02d:%02d:%02d UTC",i.hour,i.minute,i.second)},m$5.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)},m$5.prototype.setShuttleRingTicks=function(e){if(!e$2b(e))throw new t$16("positiveTicks is required.");var t,i,n,r={},o=this._sortedFilteredPositiveTicks;for(o.length=0,t=0,i=e.length;t<i;++t)n=e[t],r.hasOwnProperty(n)||(r[n]=!0,o.push(n));o.sort(R$1);var a=[];for(t=(i=o.length)-1;t>=0;--t)0!==(n=o[t])&&a.push(-n);Array.prototype.push.apply(a,o),this._allShuttleRingTicks=a},Object.defineProperties(m$5.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){if("function"!=typeof e)throw new t$16("dateFormatter must be a function");this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){if("function"!=typeof e)throw new t$16("timeFormatter must be a function");this._timeFormatter=e}}}),m$5._maxShuttleRingAngle=_$2,m$5._realtimeShuttleRingAngle=f$3,Object.defineProperties(V.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}}),Object.defineProperties(g$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),g$3.prototype.isDestroyed=function(){return!1},g$3.prototype.destroy=function(){return s$Y.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ce$1.cleanNode(this._element),ce$1.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),i$10(this)},Object.defineProperties(i$5.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var oe={maximumFractionDigits:3};function P$2(e){var t=e/1048576;return t<1?t.toLocaleString(void 0,oe):Math.round(t).toLocaleString()}function y$2(e,t){if(!e$2b(e))return"";var i=t?e._statisticsLastPick:e._statisticsLastRender,n='<ul class="supermap3d-cesiumInspector-statistics">';return n+="<li><strong>Visited: </strong>"+i.visited.toLocaleString()+"</li><li><strong>Selected: </strong>"+i.selected.toLocaleString()+"</li><li><strong>Commands: </strong>"+i.numberOfCommands.toLocaleString()+"</li>",n+="</ul>",t||(n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Requests: </strong>"+i.numberOfPendingRequests.toLocaleString()+"</li><li><strong>Attempted: </strong>"+i.numberOfAttemptedRequests.toLocaleString()+"</li><li><strong>Processing: </strong>"+i.numberOfTilesProcessing.toLocaleString()+"</li><li><strong>Content Ready: </strong>"+i.numberOfTilesWithContentReady.toLocaleString()+"</li><li><strong>Total: </strong>"+i.numberOfTilesTotal.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Features Selected: </strong>"+i.numberOfFeaturesSelected.toLocaleString()+"</li><li><strong>Features Loaded: </strong>"+i.numberOfFeaturesLoaded.toLocaleString()+"</li><li><strong>Points Selected: </strong>"+i.numberOfPointsSelected.toLocaleString()+"</li><li><strong>Points Loaded: </strong>"+i.numberOfPointsLoaded.toLocaleString()+"</li><li><strong>Triangles Selected: </strong>"+i.numberOfTrianglesSelected.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Tiles styled: </strong>"+i.numberOfTilesStyled.toLocaleString()+"</li><li><strong>Features styled: </strong>"+i.numberOfFeaturesStyled.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Children Union Culled: </strong>"+i.numberOfTilesCulledWithChildrenUnion.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Geometry Memory (MB): </strong>"+P$2(i.geometryByteLength)+"</li><li><strong>Texture Memory (MB): </strong>"+P$2(i.texturesByteLength)+"</li><li><strong>Batch Table Memory (MB): </strong>"+P$2(i.batchTableByteLength)+"</li>",n+="</ul>"),n}var le=[{text:"Highlight",value:L$I.HIGHLIGHT},{text:"Replace",value:L$I.REPLACE},{text:"Mix",value:L$I.MIX}],Z$2=new e$1U(1,1,0,.4),ce=new e$1U,v$2=new e$1U;function l$6(e,t){o$1q.typeOf.object("scene",e),o$1q.typeOf.object("performanceContainer",t);var i=this,n=e.canvas;this._eventHandler=new g$J(n),this._scene=e,this._performanceContainer=t,this._canvas=n,this._performanceDisplay=new o$c({container:t}),this._statisticsText="",this._pickStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this._tileset=void 0,this._feature=void 0,this._tile=void 0,ce$1.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_editorError","showPickStatistics","showStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile"]),this._properties=ce$1.observable({}),this.properties=[],ce$1.defineProperty(this,"properties",(function(){var e=[],t=i._properties();for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}));var r=ce$1.observable();ce$1.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return r()},set:function(e){r(e),e$2b(i._tileset)&&(i._tileset.dynamicScreenSpaceError=e)}}),this.dynamicScreenSpaceError=!1;var o=ce$1.observable();ce$1.defineProperty(this,"colorBlendMode",{get:function(){return o()},set:function(e){o(e),e$2b(i._tileset)&&(i._tileset.colorBlendMode=e,i._scene.requestRender())}}),this.colorBlendMode=L$I.HIGHLIGHT;var a=ce$1.observable();ce$1.defineProperty(this,"picking",{get:function(){return a()},set:function(t){a(t),t?i._eventHandler.setInputAction((function(t){var n=e.pick(t.endPosition);if(n instanceof e$L?(i.feature=n,i.tile=n.content.tile):e$2b(n)&&e$2b(n.content)?(i.feature=void 0,i.tile=n.content.tile):(i.feature=void 0,i.tile=void 0),e$2b(i._tileset)){var r;if(f&&e$2b(n)&&e$2b(n.content))e.pickPositionSupported&&(e$2b(r=e.pickPosition(t.endPosition))&&(i._tileset.debugPickPosition=r)),i._tileset.debugPickedTile=n.content.tile;else i._tileset.debugPickedTile=void 0;i._scene.requestRender()}}),G$I.MOUSE_MOVE):(i.feature=void 0,i.tile=void 0,i._eventHandler.removeInputAction(G$I.MOUSE_MOVE))}}),this.picking=!0;var s=ce$1.observable();ce$1.defineProperty(this,"colorize",{get:function(){return s()},set:function(e){s(e),e$2b(i._tileset)&&(i._tileset.debugColorizeTiles=e,i._scene.requestRender())}}),this.colorize=!1;var l=ce$1.observable();ce$1.defineProperty(this,"wireframe",{get:function(){return l()},set:function(e){l(e),e$2b(i._tileset)&&(i._tileset.debugWireframe=e,i._scene.requestRender())}}),this.wireframe=!1;var u=ce$1.observable();ce$1.defineProperty(this,"showBoundingVolumes",{get:function(){return u()},set:function(e){u(e),e$2b(i._tileset)&&(i._tileset.debugShowBoundingVolume=e,i._scene.requestRender())}}),this.showBoundingVolumes=!1;var c=ce$1.observable();ce$1.defineProperty(this,"showContentBoundingVolumes",{get:function(){return c()},set:function(e){c(e),e$2b(i._tileset)&&(i._tileset.debugShowContentBoundingVolume=e,i._scene.requestRender())}}),this.showContentBoundingVolumes=!1;var h=ce$1.observable();ce$1.defineProperty(this,"showRequestVolumes",{get:function(){return h()},set:function(e){h(e),e$2b(i._tileset)&&(i._tileset.debugShowViewerRequestVolume=e,i._scene.requestRender())}}),this.showRequestVolumes=!1;var d=ce$1.observable();ce$1.defineProperty(this,"freezeFrame",{get:function(){return d()},set:function(e){d(e),e$2b(i._tileset)&&(i._tileset.debugFreezeFrame=e,i._scene.debugShowFrustumPlanes=e,i._scene.requestRender())}}),this.freezeFrame=!1;var f=ce$1.observable();ce$1.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return f()},set:function(e){f(e),e$2b(i._tileset)&&(i._tileset.debugPickedTileLabelOnly=e,i._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;var p=ce$1.observable();ce$1.defineProperty(this,"showGeometricError",{get:function(){return p()},set:function(e){p(e),e$2b(i._tileset)&&(i._tileset.debugShowGeometricError=e,i._scene.requestRender())}}),this.showGeometricError=!1;var _=ce$1.observable();ce$1.defineProperty(this,"showRenderingStatistics",{get:function(){return _()},set:function(e){_(e),e$2b(i._tileset)&&(i._tileset.debugShowRenderingStatistics=e,i._scene.requestRender())}}),this.showRenderingStatistics=!1;var m=ce$1.observable();ce$1.defineProperty(this,"showMemoryUsage",{get:function(){return m()},set:function(e){m(e),e$2b(i._tileset)&&(i._tileset.debugShowMemoryUsage=e,i._scene.requestRender())}}),this.showMemoryUsage=!1;var g=ce$1.observable();ce$1.defineProperty(this,"showUrl",{get:function(){return g()},set:function(e){g(e),e$2b(i._tileset)&&(i._tileset.debugShowUrl=e,i._scene.requestRender())}}),this.showUrl=!1;var x=ce$1.observable();ce$1.defineProperty(this,"maximumScreenSpaceError",{get:function(){return x()},set:function(e){e=Number(e),isNaN(e)||(x(e),e$2b(i._tileset)&&(i._tileset.maximumScreenSpaceError=e))}}),this.maximumScreenSpaceError=16;var v=ce$1.observable();ce$1.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return v()},set:function(e){e=Number(e),isNaN(e)||(v(e),e$2b(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorDensity=e))}}),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,ce$1.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(v(),1/6)},set:function(e){v(Math.pow(e,6))}});var y=ce$1.observable();ce$1.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return y()},set:function(e){e=Number(e),isNaN(e)||(y(e),e$2b(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorFactor=e))}}),this.dynamicScreenSpaceErrorFactor=4;var $=ne(this),b=ce$1.observable();ce$1.defineProperty(this,"pickActive",{get:function(){return b()},set:function(e){b(e),e?i._eventHandler.setInputAction($,G$I.LEFT_CLICK):i._eventHandler.removeInputAction(G$I.LEFT_CLICK)}});var T=ce$1.observable();ce$1.defineProperty(this,"pointCloudShading",{get:function(){return T()},set:function(e){T(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.attenuation=e)}}),this.pointCloudShading=!1;var C=ce$1.observable();ce$1.defineProperty(this,"geometricErrorScale",{get:function(){return C()},set:function(e){e=Number(e),isNaN(e)||(C(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.geometricErrorScale=e))}}),this.geometricErrorScale=1;var S=ce$1.observable();ce$1.defineProperty(this,"maximumAttenuation",{get:function(){return S()},set:function(e){e=Number(e),isNaN(e)||(S(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.maximumAttenuation=0===e?void 0:e))}}),this.maximumAttenuation=0;var w=ce$1.observable();ce$1.defineProperty(this,"baseResolution",{get:function(){return w()},set:function(e){e=Number(e),isNaN(e)||(w(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.baseResolution=0===e?void 0:e))}}),this.baseResolution=0;var E=ce$1.observable();ce$1.defineProperty(this,"eyeDomeLighting",{get:function(){return E()},set:function(e){E(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLighting=e)}}),this.eyeDomeLighting=!1;var P=ce$1.observable();ce$1.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return P()},set:function(e){e=Number(e),isNaN(e)||(P(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingStrength=e))}}),this.eyeDomeLightingStrength=1;var A=ce$1.observable();ce$1.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return A()},set:function(e){e=Number(e),isNaN(e)||(A(e),e$2b(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingRadius=e))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;var L=ce$1.observable();ce$1.defineProperty(this,"skipLevelOfDetail",{get:function(){return L()},set:function(e){L(e),e$2b(i._tileset)&&(i._tileset.skipLevelOfDetail=e)}}),this.skipLevelOfDetail=!0;var M=ce$1.observable();ce$1.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return M()},set:function(e){e=Number(e),isNaN(e)||(M(e),e$2b(i._tileset)&&(i._tileset.skipScreenSpaceErrorFactor=e))}}),this.skipScreenSpaceErrorFactor=16;var R=ce$1.observable();ce$1.defineProperty(this,"baseScreenSpaceError",{get:function(){return R()},set:function(e){e=Number(e),isNaN(e)||(R(e),e$2b(i._tileset)&&(i._tileset.baseScreenSpaceError=e))}}),this.baseScreenSpaceError=1024;var O=ce$1.observable();ce$1.defineProperty(this,"skipLevels",{get:function(){return O()},set:function(e){e=Number(e),isNaN(e)||(O(e),e$2b(i._tileset)&&(i._tileset.skipLevels=e))}}),this.skipLevels=1;var I=ce$1.observable();ce$1.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return I()},set:function(e){I(e),e$2b(i._tileset)&&(i._tileset.immediatelyLoadDesiredLevelOfDetail=e)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;var D=ce$1.observable();ce$1.defineProperty(this,"loadSiblings",{get:function(){return D()},set:function(e){D(e),e$2b(i._tileset)&&(i._tileset.loadSiblings=e)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()})),e$2b(this._tileset)||Y$1(this,!0)}function k$1(e){if(e.featuresLength>0)return!0;var t=e.innerContents;if(e$2b(t)){for(var i=t.length,n=0;n<i;++n)if(!k$1(t[n]))return!1;return!0}return!1}function y$1(e,t){o$1q.defined("container",e),o$1q.typeOf.object("scene",t),e=i$c(e);var i=document.createElement("div"),n=document.createElement("div");n.setAttribute("data-bind","visible: performance");var r=new l$6(t,n);this._viewModel=r,this._container=e,this._element=i;var o=document.createElement("div");o.textContent="3D Tiles Inspector",o.className="supermap3d-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),i.appendChild(o),i.className="supermap3d-cesiumInspector supermap3d-3DTilesInspector",i.setAttribute("data-bind",'css: { "supermap3d-cesiumInspector-visible" : inspectorVisible, "supermap3d-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(i);var a=document.createElement("div");this._panel=a,a.className="supermap3d-cesiumInspector-dropDown",i.appendChild(a);var s=o$4.createSection,l=o$4.createCheckbox,u=s(a,"Tileset","tilesetVisible","toggleTileset"),c=s(a,"Display","displayVisible","toggleDisplay"),h=s(a,"Update","updateVisible","toggleUpdate"),d=s(a,"Logging","loggingVisible","toggleLogging"),f=s(a,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),p=s(a,"Style","styleVisible","toggleStyle"),_=s(a,"Optimization","optimizationVisible","toggleOptimization"),m=document.createElement("div");m.className="field-group";var g=document.createElement("label");g.className="field-label",g.appendChild(document.createTextNode("Properties: "));var x=document.createElement("div");x.setAttribute("data-bind","text: properties"),m.appendChild(g),m.appendChild(x),u.appendChild(m),u.appendChild(L$4("togglePickTileset","Pick Tileset","pickActive")),u.appendChild(L$4("trimTilesCache","Trim Tiles Cache")),u.appendChild(l("Enable Picking","picking")),c.appendChild(l("Colorize","colorize")),c.appendChild(l("Wireframe","wireframe")),c.appendChild(l("Bounding Volumes","showBoundingVolumes")),c.appendChild(l("Content Volumes","showContentBoundingVolumes")),c.appendChild(l("Request Volumes","showRequestVolumes")),c.appendChild(l("Point Cloud Shading","pointCloudShading"));var v=document.createElement("div");v.setAttribute("data-bind","visible: pointCloudShading"),v.appendChild(r$7("geometricErrorScale",0,2,.01,"Geometric Error Scale")),v.appendChild(r$7("maximumAttenuation",0,32,1,"Maximum Attenuation")),v.appendChild(r$7("baseResolution",0,1,.01,"Base Resolution")),v.appendChild(l("Eye Dome Lighting (EDL)","eyeDomeLighting")),c.appendChild(v);var y=document.createElement("div");y.setAttribute("data-bind","visible: eyeDomeLighting"),y.appendChild(r$7("eyeDomeLightingStrength",0,2,.1,"EDL Strength")),y.appendChild(r$7("eyeDomeLightingRadius",0,4,.1,"EDL Radius")),v.appendChild(y),h.appendChild(l("Freeze Frame","freezeFrame")),h.appendChild(l("Dynamic Screen Space Error","dynamicScreenSpaceError"));var $=document.createElement("div");$.appendChild(r$7("maximumScreenSpaceError",0,128,1,"Maximum Screen Space Error")),h.appendChild($);var b=document.createElement("div");b.setAttribute("data-bind","visible: dynamicScreenSpaceError"),b.appendChild(r$7("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"Screen Space Error Density","dynamicScreenSpaceErrorDensity")),b.appendChild(r$7("dynamicScreenSpaceErrorFactor",1,10,.1,"Screen Space Error Factor")),h.appendChild(b),d.appendChild(l("Performance","performance")),d.appendChild(n),d.appendChild(l("Statistics","showStatistics"));var T=document.createElement("div");T.className="supermap3d-3dTilesInspector-statistics",T.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),d.appendChild(T),d.appendChild(l("Pick Statistics","showPickStatistics"));var C=document.createElement("div");C.className="supermap3d-3dTilesInspector-statistics",C.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),d.appendChild(C);var S=document.createElement("div");p.appendChild(S),S.appendChild(document.createTextNode("Color Blend Mode: "));var w=document.createElement("select");w.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),S.appendChild(w);var E=document.createElement("textarea");E.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),S.className="supermap3d-cesiumInspector-styleEditor",S.appendChild(E);var P=L$4("compileStyle","Compile (Ctrl+Enter)");S.appendChild(P);var A=document.createElement("div");A.className="supermap3d-cesiumInspector-error",A.setAttribute("data-bind","text: editorError"),S.appendChild(A),f.appendChild(l("Show Picked Only","showOnlyPickedTileDebugLabel")),f.appendChild(l("Geometric Error","showGeometricError")),f.appendChild(l("Rendering Statistics","showRenderingStatistics")),f.appendChild(l("Memory Usage (MB)","showMemoryUsage")),f.appendChild(l("Url","showUrl")),_.appendChild(l("Skip Tile LODs","skipLevelOfDetail"));var L=document.createElement("div");L.appendChild(r$7("skipScreenSpaceErrorFactor",1,50,1,"Skip SSE Factor")),_.appendChild(L);var M=document.createElement("div");M.appendChild(r$7("baseScreenSpaceError",0,4096,1,"SSE before skipping LOD")),_.appendChild(M);var R=document.createElement("div");R.appendChild(r$7("skipLevels",0,10,1,"Min. levels to skip")),_.appendChild(R),_.appendChild(l("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),_.appendChild(l("Load siblings of visible tiles","loadSiblings")),ce$1.applyBindings(r,i)}function r$7(e,t,i,n,r,o){o=u$_(o,e);var a=document.createElement("input");a.setAttribute("data-bind","value: "+o),a.type="number";var s=document.createElement("input");s.type="range",s.min=t,s.max=i,s.step=n,s.setAttribute("data-bind",'valueUpdate: "input", value: '+e);var l=document.createElement("div");l.appendChild(s);var u=document.createElement("div");return u.className="supermap3d-cesiumInspector-slider",u.appendChild(document.createTextNode(r)),u.appendChild(a),u.appendChild(l),u}function L$4(e,t,i){var n=document.createElement("button");n.type="button",n.textContent=t,n.className="supermap3d-cesiumInspector-pickButton";var r="click: "+e;return e$2b(i)&&(r+=', css: {"supermap3d-cesiumInspector-pickButtonHighlight" : '+i+"}"),n.setAttribute("data-bind",r),n}function M$1(e){var t;if(e$2b(e)){t="Command Statistics";var i=e.commandsInFrustums;for(var n in i)if(i.hasOwnProperty(n)){var r,o=parseInt(n,10);if(7===o)r="1, 2 and 3";else{for(var a=[],s=2;s>=0;s--){var l=Math.pow(2,s);o>=l&&(a.push(s+1),o-=l)}r=a.reverse().join(" and ")}t+="<br>    "+i[n]+" in frustum "+r}t+="<br>Total: "+e.totalCommands}return t}function g$2(e,t,i){var n=Math.min(i,t);return n=Math.max(n,e)}function m$3(e,t){if(!e$2b(e))throw new t$16("scene is required");if(!e$2b(t))throw new t$16("performanceContainer is required");var i=this,n=e.canvas,r=new g$J(n);this._eventHandler=r,this._scene=e,this._canvas=n,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;var o,a=this._scene.globe;function s(e){var t=i._scene.pick({x:e.position.x,y:e.position.y});e$2b(t)&&(i.primitive=e$2b(t.collection)?t.collection:t.primitive),i._scene.requestRender(),i.pickPrimitiveActive=!1}function l(e){var t,n=a.ellipsoid,r=i._scene.camera.pickEllipsoid({x:e.position.x,y:e.position.y},n);if(e$2b(r))for(var o=n.cartesianToCartographic(r),s=a._surface.tileProvider._tilesToRenderByTextureCount,l=0;!t&&l<s.length;++l){var u=s[l];if(e$2b(u))for(var c=0;!t&&c<u.length;++c){var h=u[c];h$18.contains(h.rectangle,o)&&(t=h)}}i.tile=t,i.pickTileActive=!1}a.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.globeDepth=!1,this.pickDepth=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",ce$1.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","globeDepth","pickDepth","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=s$4((function(){i.dropDownVisible=!i.dropDownVisible})),this._toggleGeneral=s$4((function(){i.generalVisible=!i.generalVisible})),this._togglePrimitives=s$4((function(){i.primitivesVisible=!i.primitivesVisible})),this._toggleTerrain=s$4((function(){i.terrainVisible=!i.terrainVisible})),this._frustumsSubscription=ce$1.getObservable(this,"frustums").subscribe((function(e){i._scene.debugShowFrustums=e,i._scene.requestRender()})),this._frustumPlanesSubscription=ce$1.getObservable(this,"frustumPlanes").subscribe((function(e){i._scene.debugShowFrustumPlanes=e,i._scene.requestRender()})),this._performanceSubscription=ce$1.getObservable(this,"performance").subscribe((function(e){e?i._performanceDisplay=new o$c({container:i._performanceContainer}):i._performanceContainer.innerHTML=""})),this._showPrimitiveBoundingSphere=s$4((function(){return i._primitive.debugShowBoundingVolume=i.primitiveBoundingSphere,i._scene.requestRender(),!0})),this._primitiveBoundingSphereSubscription=ce$1.getObservable(this,"primitiveBoundingSphere").subscribe((function(){i._showPrimitiveBoundingSphere()})),this._showPrimitiveReferenceFrame=s$4((function(){if(i.primitiveReferenceFrame){var e=i._primitive.modelMatrix;i._modelMatrixPrimitive=new s$d({modelMatrix:e}),i._scene.primitives.add(i._modelMatrixPrimitive)}else e$2b(i._modelMatrixPrimitive)&&(i._scene.primitives.remove(i._modelMatrixPrimitive),i._modelMatrixPrimitive=void 0);return i._scene.requestRender(),!0})),this._primitiveReferenceFrameSubscription=ce$1.getObservable(this,"primitiveReferenceFrame").subscribe((function(){i._showPrimitiveReferenceFrame()})),this._doFilterPrimitive=s$4((function(){return i.filterPrimitive?i._scene.debugCommandFilter=function(e){return!(!e$2b(i._modelMatrixPrimitive)||e.owner!==i._modelMatrixPrimitive._primitive)||!!e$2b(i._primitive)&&(e.owner===i._primitive||e.owner===i._primitive._billboardCollection||e.owner.primitive===i._primitive)}:i._scene.debugCommandFilter=void 0,!0})),this._filterPrimitiveSubscription=ce$1.getObservable(this,"filterPrimitive").subscribe((function(){i._doFilterPrimitive(),i._scene.requestRender()})),this._wireframeSubscription=ce$1.getObservable(this,"wireframe").subscribe((function(e){a._surface.tileProvider._debug.wireframe=e,i._scene.requestRender()})),this._globeDepthSubscription=ce$1.getObservable(this,"globeDepth").subscribe((function(e){i._scene.debugShowGlobeDepth=e,i._scene.requestRender()})),this._pickDepthSubscription=ce$1.getObservable(this,"pickDepth").subscribe((function(e){i._scene.debugShowPickDepth=e,i._scene.requestRender()})),this._depthFrustumSubscription=ce$1.getObservable(this,"depthFrustum").subscribe((function(e){i._scene.debugShowDepthFrustum=e,i._scene.requestRender()})),this._incrementDepthFrustum=s$4((function(){var e=i.depthFrustum+1;return i.depthFrustum=g$2(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._decrementDepthFrustum=s$4((function(){var e=i.depthFrustum-1;return i.depthFrustum=g$2(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._suspendUpdatesSubscription=ce$1.getObservable(this,"suspendUpdates").subscribe((function(e){a._surface._debug.suspendLodUpdate=e,e||(i.filterTile=!1)})),this._showTileCoordinates=s$4((function(){return i.tileCoordinates&&!e$2b(o)?o=e.imageryLayers.addImageryProvider(new n$4({tilingScheme:e.terrainProvider.tilingScheme})):!i.tileCoordinates&&e$2b(o)&&(e.imageryLayers.remove(o),o=void 0),!0})),this._tileCoordinatesSubscription=ce$1.getObservable(this,"tileCoordinates").subscribe((function(){i._showTileCoordinates(),i._scene.requestRender()})),this._tileBoundingSphereSubscription=ce$1.getObservable(this,"tileBoundingSphere").subscribe((function(){i._showTileBoundingSphere(),i._scene.requestRender()})),this._showTileBoundingSphere=s$4((function(){return i.tileBoundingSphere?a._surface.tileProvider._debug.boundingSphereTile=i._tile:a._surface.tileProvider._debug.boundingSphereTile=void 0,i._scene.requestRender(),!0})),this._doFilterTile=s$4((function(){return i.filterTile?(i.suspendUpdates=!0,a._surface._tilesToRender=[],e$2b(i._tile)&&i._tile.renderable&&a._surface._tilesToRender.push(i._tile)):i.suspendUpdates=!1,!0})),this._filterTileSubscription=ce$1.getObservable(this,"filterTile").subscribe((function(){i.doFilterTile(),i._scene.requestRender()})),this._pickPrimitive=s$4((function(){i.pickPrimitiveActive=!i.pickPrimitiveActive})),this._pickPrimitiveActiveSubscription=ce$1.getObservable(this,"pickPrimitiveActive").subscribe((function(e){e?r.setInputAction(s,G$I.LEFT_CLICK):r.removeInputAction(G$I.LEFT_CLICK)})),this._pickTile=s$4((function(){i.pickTileActive=!i.pickTileActive})),this._pickTileActiveSubscription=ce$1.getObservable(this,"pickTileActive").subscribe((function(e){e?r.setInputAction(l,G$I.LEFT_CLICK):r.removeInputAction(G$I.LEFT_CLICK)})),this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()}))}function g$1(e,t){if(!e$2b(e))throw new t$16("container is required.");if(!e$2b(t))throw new t$16("scene is required.");e=i$c(e);var i=document.createElement("div"),n=new m$3(t,i);this._viewModel=n,this._container=e;var r=document.createElement("div");this._element=r;var o=document.createElement("div");o.textContent="SuperMap3D Inspector",o.className="supermap3d-cesiumInspector-button",o.setAttribute("data-bind","click: toggleDropDown"),r.appendChild(o),r.className="supermap3d-cesiumInspector",r.setAttribute("data-bind",'css: { "supermap3d-cesiumInspector-visible" : dropDownVisible, "supermap3d-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);var a=document.createElement("div");this._panel=a,a.className="supermap3d-cesiumInspector-dropDown",r.appendChild(a);var s=o$4.createSection,l=o$4.createCheckbox,u=s(a,"General","generalVisible","toggleGeneral"),c=l("Show Frustums","frustums"),h=document.createElement("div");h.className="supermap3d-cesiumInspector-frustumStatistics",h.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),c.appendChild(h),u.appendChild(c),u.appendChild(l("Show Frustum Planes","frustumPlanes")),u.appendChild(l("Performance Display","performance")),i.className="supermap3d-cesiumInspector-performanceDisplay",u.appendChild(i);var d=document.createElement("div");d.className="supermap3d-cesiumInspector-shaderCache",d.setAttribute("data-bind","html: shaderCacheText"),u.appendChild(d);var f=document.createElement("div");u.appendChild(f);var p=document.createElement("span");p.setAttribute("data-bind",'html: "     Frustum:"'),f.appendChild(p);var _=document.createElement("span");_.setAttribute("data-bind","text: depthFrustumText"),f.appendChild(_);var m=document.createElement("input");m.type="button",m.value="-",m.className="supermap3d-cesiumInspector-pickButton",m.setAttribute("data-bind","click: decrementDepthFrustum"),f.appendChild(m);var g=document.createElement("input");g.type="button",g.value="+",g.className="supermap3d-cesiumInspector-pickButton",g.setAttribute("data-bind","click: incrementDepthFrustum"),f.appendChild(g);var x=s(a,"Primitives","primitivesVisible","togglePrimitives"),v=document.createElement("div");v.className="supermap3d-cesiumInspector-pickSection",x.appendChild(v);var y=document.createElement("input");y.type="button",y.value="Pick a primitive",y.className="supermap3d-cesiumInspector-pickButton",y.setAttribute("data-bind",'css: {"supermap3d-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');var $=document.createElement("div");$.className="supermap3d-cesiumInspector-center",$.appendChild(y),v.appendChild($),v.appendChild(l("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),v.appendChild(l("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=l("Show only selected","filterPrimitive","hasPickedPrimitive"),v.appendChild(this._primitiveOnly);var b=s(a,"Terrain","terrainVisible","toggleTerrain"),T=document.createElement("div");T.className="supermap3d-cesiumInspector-pickSection",b.appendChild(T);var C=document.createElement("input");C.type="button",C.value="Pick a tile",C.className="supermap3d-cesiumInspector-pickButton",C.setAttribute("data-bind",'css: {"supermap3d-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),($=document.createElement("div")).appendChild(C),$.className="supermap3d-cesiumInspector-center",T.appendChild($);var S=document.createElement("div");T.appendChild(S);var w=document.createElement("input");w.type="button",w.value="Parent",w.className="supermap3d-cesiumInspector-pickButton",w.setAttribute("data-bind","click: selectParent");var E=document.createElement("input");E.type="button",E.value="NW",E.className="supermap3d-cesiumInspector-pickButton",E.setAttribute("data-bind","click: selectNW");var P=document.createElement("input");P.type="button",P.value="NE",P.className="supermap3d-cesiumInspector-pickButton",P.setAttribute("data-bind","click: selectNE");var A=document.createElement("input");A.type="button",A.value="SW",A.className="supermap3d-cesiumInspector-pickButton",A.setAttribute("data-bind","click: selectSW");var L=document.createElement("input");L.type="button",L.value="SE",L.className="supermap3d-cesiumInspector-pickButton",L.setAttribute("data-bind","click: selectSE");var M=document.createElement("div");M.className="supermap3d-cesiumInspector-tileText",S.className="supermap3d-cesiumInspector-frustumStatistics",S.appendChild(M),S.setAttribute("data-bind","visible: hasPickedTile"),M.setAttribute("data-bind","html: tileText");var R=document.createElement("div");R.className="supermap3d-cesiumInspector-relativeText",R.textContent="Select relative:",S.appendChild(R);var O=document.createElement("table"),I=document.createElement("tr"),D=document.createElement("tr"),B=document.createElement("td");B.appendChild(w);var N=document.createElement("td");N.appendChild(E);var F=document.createElement("td");F.appendChild(P),I.appendChild(B),I.appendChild(N),I.appendChild(F);var U=document.createElement("td"),G=document.createElement("td");G.appendChild(A);var z=document.createElement("td");z.appendChild(L),D.appendChild(U),D.appendChild(G),D.appendChild(z),O.appendChild(I),O.appendChild(D),S.appendChild(O),T.appendChild(l("Show bounding volume","tileBoundingSphere","hasPickedTile")),T.appendChild(l("Show only selected","filterTile","hasPickedTile")),b.appendChild(l("Wireframe","wireframe")),b.appendChild(l("Suspend LOD update","suspendUpdates")),b.appendChild(l("Show tile coordinates","tileCoordinates")),ce$1.applyBindings(n,this._element)}function r$6(e){var t=this,i=ce$1.observable(l$1f.fullscreen),n=ce$1.observable(l$1f.enabled);this.isFullscreen=void 0,ce$1.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,ce$1.defineProperty(this,"isFullscreenEnabled",{get:function(){return n()},set:function(e){n(e&&l$1f.enabled)}}),this.tooltip=void 0,ce$1.defineProperty(this,"tooltip",(function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"})),this._command=s$4((function(){l$1f.fullscreen?l$1f.exitFullscreen():l$1f.requestFullscreen(t._fullscreenElement)}),ce$1.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=u$_(i$c(e),document.body),this._callback=function(){i(l$1f.fullscreen)},document.addEventListener(l$1f.changeEventName,this._callback)}Object.defineProperties(l$6.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},colorBlendModes:{get:function(){return le}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,e$2b(e)){var t=this;e.readyPromise.then((function(e){t.isDestroyed()||t._properties(e.properties)}));for(var i=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],n=i.length,r=0;r<n;++r){var o=i[r];this[o]=this[o]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings;var a=e.pointCloudShading;this.pointCloudShading=a.attenuation,this.geometricErrorScale=a.geometricErrorScale,this.maximumAttenuation=a.maximumAttenuation?a.maximumAttenuation:0,this.baseResolution=a.baseResolution?a.baseResolution:0,this.eyeDomeLighting=a.eyeDomeLighting,this.eyeDomeLightingStrength=a.eyeDomeLightingStrength,this.eyeDomeLightingRadius=a.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=y$2(e,!1),this._pickStatisticsText=y$2(e,!0),Y$1(this,!1)}},feature:{get:function(){return this._feature},set:function(e){if(this._feature!==e){var t=this._feature;e$2b(t)&&!t.content.isDestroyed()&&(!this.colorize&&e$2b(this._style)?t.color=e$2b(this._style.color)?this._style.color.evaluateColor(t,ce):e$1U.WHITE:t.color=v$2,this._scene.requestRender()),e$2b(e)&&(e$1U.clone(e.color,v$2),e.color=Z$2,this._scene.requestRender()),this._feature=e}}},tile:{get:function(){return this._tile},set:function(e){if(this._tile!==e){var t=this._tile;e$2b(t)&&!t.isDestroyed()&&!k$1(t.content)&&(t.color=v$2,this._scene.requestRender()),e$2b(e)&&!k$1(e.content)&&(e$1U.clone(e.color,v$2),e.color=Z$2,this._scene.requestRender()),this._tile=e}}}}),l$6.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive},l$6.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible},l$6.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible},l$6.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible},l$6.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible},l$6.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible},l$6.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible},l$6.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible},l$6.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible},l$6.prototype.trimTilesCache=function(){e$2b(this._tileset)&&this._tileset.trimLoadedTiles()},l$6.prototype.compileStyle=function(){var e=this._tileset;if(e$2b(e)&&this.styleString!==JSON.stringify(e.style)){this._editorError="";try{0===this.styleString.length&&(this.styleString="{}"),this._style=new d$n(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(e){this._editorError=e.toString()}this.feature=this._feature,this.tile=this._tile}},l$6.prototype.styleEditorKeyPress=function(e,t){if(9===t.keyCode){t.preventDefault();var i,n=t.target,r=n.selectionStart,o=n.selectionEnd,a=o,s=n.value.slice(r,o).split("\n"),l=s.length;if(t.shiftKey)for(i=0;i<l;++i)" "===s[i][0]&&(" "===s[i][1]?(s[i]=s[i].substr(2),a-=2):(s[i]=s[i].substr(1),a-=1));else for(i=0;i<l;++i)s[i]=" "+s[i],a+=2;var u=s.join("\n");n.value=n.value.slice(0,r)+u+n.value.slice(o),n.selectionStart=r!==o?r:a,n.selectionEnd=a}else t.ctrlKey&&(10===t.keyCode||13===t.keyCode)&&this.compileStyle();return!0},l$6.prototype._update=function(){var e=this._tileset;if(this.performance&&this._performanceDisplay.update(),e$2b(e)){if(e.isDestroyed())return this.tile=void 0,this.feature=void 0,void(this.tileset=void 0);var t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=y$2(e,!1),this._pickStatisticsText=y$2(e,!0))},l$6.prototype.isDestroyed=function(){return!1},l$6.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();var e=this;return this._definedProperties.forEach((function(t){ce$1.getObservable(e,t).dispose()})),i$10(this)},l$6.getStatistics=y$2,Object.defineProperties(y$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),y$1.prototype.isDestroyed=function(){return!1},y$1.prototype.destroy=function(){return ce$1.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),i$10(this)},Object.defineProperties(m$3.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.parent}))}},selectNW:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.northwestChild}))}},selectNE:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.northeastChild}))}},selectSW:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.southwestChild}))}},selectSE:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.southeastChild}))}},primitive:{get:function(){return this._primitive},set:function(e){var t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,e$2b(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,e$2b(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout((function(){e.show=!0}),50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(e$2b(e)){if(this.hasPickedTile=!0,e!==this._tile){this.tileText="L: "+e.level+" X: "+e.x+" Y: "+e.y,this.tileText+="<br>SW corner: "+e.rectangle.west+", "+e.rectangle.south,this.tileText+="<br>NE corner: "+e.rectangle.east+", "+e.rectangle.north;var t=e.data;e$2b(t)?this.tileText+="<br>Min: "+t.minimumHeight+" Max: "+t.maximumHeight:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}}),m$3.prototype._update=function(){this.frustums&&(this.frustumStatisticText=M$1(this._scene.debugFrustumStatistics));var e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=g$2(1,e,this.depthFrustum),this.depthFrustumText=this.depthFrustum+" of "+e,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText="Cached shaders: "+this._scene.context.shaderCache.numberOfShaders},m$3.prototype.isDestroyed=function(){return!1},m$3.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._globeDepthSubscription.dispose(),this._pickDepthSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),i$10(this)},Object.defineProperties(g$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),g$1.prototype.isDestroyed=function(){return!1},g$1.prototype.destroy=function(){return ce$1.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),i$10(this)},Object.defineProperties(r$6.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){if(!(e instanceof Element))throw new t$16("value must be a valid Element.");this._fullscreenElement=e}},command:{get:function(){return this._command}}}),r$6.prototype.isDestroyed=function(){return!1},r$6.prototype.destroy=function(){document.removeEventListener(l$1f.changeEventName,this._callback),i$10(this)};var c$3="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",d$4="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function r$5(e,t){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e);var i=new r$6(t);i._exitFullScreenPath=d$4,i._enterFullScreenPath=c$3;var n=document.createElement("button");n.type="button",n.className="supermap3d-button supermap3d-fullscreenButton",n.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(n),ce$1.applyBindings(i,n),this._container=e,this._viewModel=i,this._element=n}function D$2(e){if(!e$2b(e)||!e$2b(e.scene)||!e$2b(e.viewer))throw new t$16("options.scene and optinss.viewer is required.");this._viewer=e.viewer,this._url=u$_(e.url,"//dev.virtualearth.net/"),this._url.length>0&&"/"!==this._url[this._url.length-1]&&(this._url+="/"),this._key=e$11.getKey(e.key),this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodeInProgress=void 0,this._complete=new o$1h,this._dataSource=void 0;var t=this;this._searchCommand=s$4((function(){t.isSearchInProgress?U$1(t):Q$1(t)})),this.keepExpanded=!1,ce$1.track(this,["_searchText","_isSearchInProgress","keepExpanded"]),this.isSearchInProgress=void 0,ce$1.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,ce$1.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(e){if("string"!=typeof e)throw new t$16("value must be a valid string.");this._searchText=e}}),this.flightDuration=void 0,ce$1.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(e){if(e$2b(e)&&e<0)throw new t$16("value must be positive.");this._flightDuration=e}})}function j$4(e,t){e._scene.camera.flyTo({destination:t,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:p$1d.IDENTITY})}Object.defineProperties(r$5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),r$5.prototype.isDestroyed=function(){return!1},r$5.prototype.destroy=function(){return this._viewModel.destroy(),ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$10(this)},Object.defineProperties(D$2.prototype,{url:{get:function(){return this._url}},key:{get:function(){return this._key}},complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},dataSource:{get:function(){return this._dataSource}}});var L$3="https://www.supermapol.com/iserver/services/localsearch/rest/searchdatas/China/poiinfos.json";function Q$1(e){var t=e.searchText;if(!/^\s*$/.test(t)){var i=t.match(/[^\s,\n]+/g);if(2===i.length||3===i.length){var n=+i[0],r=+i[1],o=3===i.length?+i[2]:300;if(!isNaN(n)&&!isNaN(r)&&!isNaN(o))return void j$4(e,o$1p.fromDegrees(n,r,o))}e._isSearchInProgress=!0;var a={key:e.geoKey},s=t.match(/[^\s-\n]+/g);2===s.length?(a.city=s[0],a.keywords=s[1]):a.keywords=s[0],t$11.fetch({url:L$3,queryParameters:a}).then((t=>{t=JSON.parse(t);if(e._isSearchInProgress=!1,e$2b(t.error))return e._isSearchInProgress=!1,void(e.searchText=t.error.errorMsg);e$2b(e._datasource)&&(e._viewer.dataSources.remove(e._datasource),e._datasource=void 0);var i=t.poiInfos[0];e._searchText=i.name;var n=i.location;n.lon=n.x,n.lat=n.y,!e$2b(o$1p.fromDegrees(n.x,n.y,500))||(e._datasource=Y(t,e),e._viewer.dataSources.add(e._datasource),o$1l(e._datasource,(function(t){e._datasource=t,e._viewer.flyTo(t)}),(function(e){console.log(e)})))})).catch((e=>{console.log("error",e)}))}}function U$1(e){e._isSearchInProgress=!1,e$2b(e._geocodeInProgress)&&(e._geocodeInProgress.cancel=!0,e._geocodeInProgress=void 0)}function Y(e,t){for(var i={type:"FeatureCollection",features:[]},n=e.poiInfos,r=[],o=0,a=n.length;o<a;o++){var s=n[o];s.address;var l=s.location,u=e$2a.toRadians(l.x),c=e$2a.toRadians(l.y);r.push(new a$18(u,c))}return o$1l(y$C(t._viewer.terrainProvider,9,r),(function(e){for(var t=0,r=n.length;t<r;t++){var o=n[t],a=o.address,s=e[t],l={type:"Feature",geometry:{type:"Point",coordinates:[e$2a.toDegrees(s.longitude),e$2a.toDegrees(s.latitude),s.height]},properties:{title:o.name,"marker-color":"#B9EB14",tel:o.telephone,address:a}};i.features.push(l)}return(new y$p).loadPoiJsonData(i)}))}var l$5="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",f$2="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function s$3(e){if(!e$2b(e)||!e$2b(e.container))throw new t$16("options.container is required.");if(!e$2b(e.scene)||!e$2b(e.viewer))throw new t$16("options.scene and options.viewer is required.");var t=i$c(e.container),i=new D$2(e);i._startSearchPath=l$5,i._stopSearchPath=f$2;var n=document.createElement("form");n.setAttribute("data-bind","submit: search");var r=document.createElement("input");r.type="search",r.className="supermap3d-geocoder-input",r.setAttribute("placeholder","Enter an address or landmark..."),r.setAttribute("data-bind",'value: searchText,valueUpdate: "afterkeydown",disable: isSearchInProgress,css: { "supermap3d-geocoder-input-wide" : keepExpanded || searchText.length > 0 }'),n.appendChild(r);var o=document.createElement("span");o.className="supermap3d-geocoder-searchButton",o.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),n.appendChild(o),t.appendChild(n),ce$1.applyBindings(i,n),this._container=t,this._viewModel=i,this._form=n,this._onInputBegin=function(e){t.contains(e.target)||r.blur()},this._onInputEnd=function(e){t.contains(e.target)&&r.focus()},s$Y.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),document.addEventListener("pointerup",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),document.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),document.addEventListener("touchend",this._onInputEnd,!0))}function r$4(e,t){if(!e$2b(e))throw new t$16("scene is required.");this._scene=e,this._duration=t;var i=this;this._command=s$4((function(){i._scene.camera.flyHome(i._duration)})),this.tooltip="View Home",ce$1.track(this,["tooltip"])}function o$3(e,t,i){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e);var n=new r$4(t,i);n._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";var r=document.createElement("button");r.type="button",r.className="supermap3d-button supermap3d-toolbar-button supermap3d-home-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(r),ce$1.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}Object.defineProperties(s$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),s$3.prototype.isDestroyed=function(){return!1},s$3.prototype.destroy=function(){return s$Y.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),document.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),document.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),document.removeEventListener("touchend",this._onInputEnd,!0)),ce$1.cleanNode(this._form),this._container.removeChild(this._form),i$10(this)},Object.defineProperties(r$4.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){if(e$2b(e)&&e<0)throw new t$16("value must be positive.");this._duration=e}}}),Object.defineProperties(o$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),o$3.prototype.isDestroyed=function(){return!1},o$3.prototype.destroy=function(){return ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$10(this)};var r$3="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",o$2="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function t$1(){this._cameraClicked=new o$1h,this._closeClicked=new o$1h,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",ce$1.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="supermap3d-infoBox-loadingContainer"><span class="supermap3d-infoBox-loading"></span></div>',this.cameraIconPath=void 0,ce$1.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?o$2:r$3}}),ce$1.defineProperty(this,"_bodyless",{get:function(){return!e$2b(this.description)||0===this.description.length}})}function l$4(e){o$1q.defined("container",e),e=i$c(e);var t=document.createElement("div");t.className="supermap3d-infoBox",t.setAttribute("data-bind",'css: { "supermap3d-infoBox-visible" : showInfo, "supermap3d-infoBox-bodyless" : _bodyless }'),e.appendChild(t);var i=document.createElement("div");i.className="supermap3d-infoBox-title",i.setAttribute("data-bind","text: titleText"),t.appendChild(i);var n=document.createElement("button");n.type="button",n.className="supermap3d-button supermap3d-infoBox-camera",n.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(n);var r=document.createElement("button");r.type="button",r.className="supermap3d-infoBox-close",r.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),r.innerHTML="×",t.appendChild(r);var o=document.createElement("iframe");o.className="supermap3d-infoBox-iframe",o.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),o.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),o.setAttribute("allowfullscreen",!0),t.appendChild(o);var a=new t$1;ce$1.applyBindings(a,t),this._container=e,this._element=t,this._frame=o,this._viewModel=a,this._descriptionSubscription=void 0;var s=this;o.addEventListener("load",(function(){var e=o.contentDocument,i=e.createElement("link");i.href=n$15("Widgets/InfoBox/InfoBoxDescription.css"),i.rel="stylesheet",i.type="text/css";var n=e.createElement("div");n.className="supermap3d-infoBox-description",e.head.appendChild(i),e.body.appendChild(n),s._descriptionSubscription=c$5(a,"description",(function(e){o.style.height="5px",n.innerHTML=e;var i=null,r=n.firstElementChild;if(null!==r&&1===n.childNodes.length){var a=window.getComputedStyle(r);if(null!==a){var s=a["background-color"],l=e$1U.fromCssColorString(s);e$2b(l)&&0!==l.alpha&&(i=a["background-color"])}}t.style["background-color"]=i;var u=n.getBoundingClientRect().height;o.style.height=u+"px"}))})),o.setAttribute("src","about:blank")}t$1.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},Object.defineProperties(t$1.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}}),Object.defineProperties(l$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),l$4.prototype.isDestroyed=function(){return!1},l$4.prototype.destroy=function(){var e=this._container;return ce$1.cleanNode(this._element),e.removeChild(this._element),e$2b(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),i$10(this)};var n$2=function(e){var t=document.createElement("div");t.innerHTML=e;for(var i=document.createDocumentFragment();t.firstChild;)i.appendChild(t.firstChild);return i},f$1=function(e,t,i){t=i$c(t);var n,r=n$2(e),o=[];for(n=0;n<r.childNodes.length;++n)o.push(r.childNodes[n]);for(t.appendChild(r),n=0;n<o.length;++n){var a=o[n];(1===a.nodeType||8===a.nodeType)&&ce$1.applyBindings(i,a)}return o},y=function(e,t){if(!e$2b(e)||!e$2b(e.viewer)||!e$2b(e.scene))throw new t$16("options and options.viewer and optins.scene is required.");this.viewer=e.viewer,this.viewer.afterViewerChanged=new o$1h,this.viewer.beforeViewerChanged=new o$1h,this.scene=e.scene,this.eventHelper=new n$x,this.showCompass=e$2b(this.scene),this.heading=this.showCompass?this.scene.camera.heading:0,this.isOrbiting=!1,this.orbitCursorAngle=0,this.isRotating=!1,this.rotateInitialCursorAngle=void 0,this.rotateFrame=void 0,this.rotateMouseMoveFunction=void 0,this.rotateMouseUpFunction=void 0,this._unsubcribeFromPostRender=void 0,this.tiltbarLeft=56,this.tiltbarTop=3,this.isTilting=!1,this.zoombarTop=65,this.tiltInitialCursorAngle=0,this.screenSpaceEventHandler=new g$J(t),this.clickStartPosition=null,ce$1.track(this,["showCompass","heading","isOrbiting","orbitCursorAngle","isRotating","tiltbarLeft","tiltbarTop","isTilting","zoombarTop"]);var i=this;function n(){e$2b(i.viewer)?(i._unsubcribeFromPostRender&&(i._unsubcribeFromPostRender(),i._unsubcribeFromPostRender=void 0),i.showCompass=!0,i._unsubcribeFromPostRender=i.scene.postRender.addEventListener((function(){var e=Math.abs(i.scene.camera.heading-i.heading);if((e<e$2a.PI_OVER_TWO||e>3*e$2a.PI_OVER_TWO)&&(i.heading=i.scene.camera.heading),i.scene.screenSpaceCameraController,!i.isTilting){var t=i.scene.camera.pitch+e$2a.PI_OVER_TWO,n=e$2a.PI_OVER_TWO/20,r=Math.floor(t/n);r=(r=r>19?19:r)<0?0:r,i.tiltbarLeft=C$1[r].x,i.tiltbarTop=C$1[r].y}}))):(i._unsubcribeFromPostRender&&(i._unsubcribeFromPostRender(),i._unsubcribeFromPostRender=void 0),i.showCompass=!1)}this.eventHelper.add(this.viewer.afterViewerChanged,n,this),function(){var t=e$2a.PI_OVER_TWO+e.scene.camera.pitch,n=Math.PI/2/20,r=Math.floor(t/n);r=(r=r>19?19:r)<0?0:r,i.tiltbarLeft=C$1[r].x,i.tiltbarTop=C$1[r].y}(),n()},z=new o$1o;new o$1p,y.prototype.handleZoomBarScrollMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e.screenSpaceEventHandler.removeInputAction(G$I.MOUSE_MOVE),e$2b(e.zoombarTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoombarTickFunction),e.zoomBarScrollMouseUpFunction=void 0,e.zoombarTickFunction=void 0,e.isZoomBarScrolling=!0;var i=e.viewer.scene.camera;e.zoombarTickFunction=function(t){var n=e.zoombarTop-65;n>0?e.viewer.scene.mode===C$13.COLUMBUS_VIEW||e.viewer.scene.mode===C$13.SCENE2D?i.zoomOut():L$2(e,-1):n<0&&(e.viewer.scene.mode===C$13.COLUMBUS_VIEW||e.viewer.scene.mode===C$13.SCENE2D?i.zoomIn():L$2(e,1))},e.zoomBarScrollMouseMoveFunction=function(t,n){var r=e.zoombarTop,o=t.endPosition.y-t.startPosition.y+r;o=(o=o<0?0:o)>120?120:o,e.zoombarTop=o,e.zoombarTop-r>0?e.viewer.scene.mode===C$13.COLUMBUS_VIEW?i.zoomOut():L$2(e,-1):e.viewer.scene.mode===C$13.COLUMBUS_VIEW?i.zoomIn():L$2(e,1)},e.zoomBarScrollMouseUpFunction=function(t){e.isZoomBarScrolling=!1,e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e.screenSpaceEventHandler.removeInputAction(G$I.MOUSE_MOVE),e$2b(e.zoombarTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoombarTickFunction),e.zoomBarScrollMouseUpFunction=void 0,e.zoomBarScrollMouseMoveFunction=void 0,e.zoombarTickFunction=void 0,e.zoombarTop=65},e.screenSpaceEventHandler.setInputAction(e.zoomBarScrollMouseUpFunction,G$I.LEFT_UP),e.screenSpaceEventHandler.setInputAction(e.zoomBarScrollMouseMoveFunction,G$I.MOUSE_MOVE),e.viewer.clock.onTick.addEventListener(e.zoombarTickFunction)},y.prototype.handleZoomInMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e$2b(e.zoominTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoominTickFunction),e.zoominMouseUpFunction=void 0,e.zoominTickFunction=void 0,e.isZoomin=!0,e.zoominLastTimestamp=Et$a();var i=e.viewer.scene,n=i.camera;e.zoominTickFunction=function(t){if(e.viewer.scene.mode===C$13.COLUMBUS_VIEW){var r=j$3(i,1);e$2b(r)&&n.zoomIn(r)}else e.viewer.scene.mode===C$13.SCENE2D?n.zoomIn():L$2(e,1)},e.zoominMouseUpFunction=function(t){e.isZoomin=!1,e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e$2b(e.zoominTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoominTickFunction),e.zoominMouseUpFunction=void 0,e.zoominTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.zoominMouseUpFunction,G$I.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.zoominTickFunction)},y.prototype.handleZoomOutMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e$2b(e.zoomoutTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoomoutTickFunction),e.zoomoutMouseUpFunction=void 0,e.zoomoutTickFunction=void 0,e.iszoomout=!0,e.zoomoutLastTimestamp=Et$a();var i=e.viewer.scene,n=i.camera;e.zoomoutTickFunction=function(t){if(e.viewer.scene.mode===C$13.COLUMBUS_VIEW){var r=j$3(i,1);e$2b(r)&&n.zoomOut(r)}else e.viewer.scene.mode===C$13.SCENE2D?n.zoomOut():L$2(e,-1)},e.zoomoutMouseUpFunction=function(t){e.iszoomout=!1,e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e$2b(e.zoomoutTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoomoutTickFunction),e.zoomoutMouseUpFunction=void 0,e.zoomoutTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.zoomoutMouseUpFunction,G$I.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.zoomoutTickFunction)};var X=1;function M(e,t,i){e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e$2b(e.rotateEastTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.rotateEastTickFunction),e.rotateEastMouseUpFunction=void 0,e.rotateEastTickFunction=void 0,e.isrotateEasting=!0,e.rotateEastLastTimestamp=Et$a(),e.viewer.scene.camera;var n=e$2a.PI_OVER_TWO-Math.atan2(-i.y,i.x),r=Math.PI/4,o=0,a=1,s=2,l=3,u=4;o=n>=-r&&n<=r?u:n>=r&&n<=3*r?s:n>=3*r&&n<=5*r?l:a,e.rotateEastTickFunction=function(t){var i=e.viewer.scene.camera,r=Et$a();switch(e.rotateEastLastTimestamp,n=20*Math.abs(i._positionCartographic.height/6378317)*5e-4,o){case a:i.rotate(i.up,n);break;case s:i.rotate(i.up,-n);break;case l:i.rotate(i.right,-n);break;case u:i.rotate(i.right,n)}e.rotateLastTimestamp=r},e.rotateEastMouseUpFunction=function(t){e.isRotateEasting=!1,e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e$2b(e.rotateEastTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.rotateEastTickFunction),e.rotateEastMouseUpFunction=void 0,e.rotateEastTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.rotateEastMouseUpFunction,G$I.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.rotateEastTickFunction)}y.prototype.handleMouseDown=function(e,t){var i=t.currentTarget,n=t.currentTarget.getBoundingClientRect();X=n.height/i.clientHeight,n.width;var r=new o$1o((n.right-n.left)/2,(n.bottom-n.top)/2),o=0;o="mousedown"===t.type?new o$1o(t.clientX-n.left,t.clientY-n.top):new o$1o(t.originalEvent.touches[0].clientX-n.left,t.originalEvent.touches[0].clientY-n.top);var a=o$1o.subtract(o,r,z);this.clickStartPosition=new o$1o(t.clientX,t.clientY);var s=o$1o.magnitude(a);if((s/=X)>30&&s<45)tt(this,i,a);else{if(!(s>50&&s<70))return e.viewer.scene.mode===C$13.SCENE2D?void 0:M(this,i,a);if(e.viewer.scene.mode===C$13.SCENE2D)return;var l=e$2a.PI_OVER_TWO-Math.atan2(-a.y,a.x);l>=0&&l<=e$2a.PI_OVER_TWO&&nt(this,i,a)}},y.prototype.handleMouseUp=function(e,t){var i=t.currentTarget.getBoundingClientRect(),n=new o$1o((i.right-i.left)/2,(i.bottom-i.top)/2),r=0;r="mouseup"===t.type?new o$1o(t.clientX-i.left,t.clientY-i.top):new o$1o(t.originalEvent.touches[0].clientX-i.left,t.originalEvent.touches[0].clientY-i.top);var o=o$1o.subtract(r,n,z),a=o$1o.magnitude(o);if(a>30&&a<45){var s=e$2a.toDegrees(Math.atan2(-o.y,o.x)),l=new o$1o(t.clientX,t.clientY),u=l.x-this.clickStartPosition.x,c=l.y-this.clickStartPosition.y;if(Math.sqrt(u*u+c*c)>5)return;var h=e$2a.toDegrees(e.heading),d=Math.abs(s-h),f=e.viewer.scene;(s>0&&h>0&&h<90&&d>80&&d<100||d>260&&d<280)&&f.camera.flyTo({destination:f.camera.position,orientation:{heading:0,pitch:f.camera.pitch}})}};var x$1=new p$1d,W$1=new p$1d,d$3=new o$1p,N=new o$1o;function tt(e,t,i){e.screenSpaceEventHandler.removeInputAction(G$I.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e.rotateMouseMoveFunction=void 0,e.rotateMouseUpFunction=void 0,e.isRotating=!0,e.rotateInitialCursorAngle=Math.atan2(-i.y,i.x);var n=e.viewer.scene,r=n.camera,o=N;o.x=n.canvas.clientWidth/2,o.y=n.canvas.clientHeight/2;var a=r.pickEllipsoid(o,n.globe.ellipsoid,d$3);e$2b(a)?(e.rotateFrame=m$17.eastNorthUpToFixedFrame(a,n.globe.ellipsoid,W$1),e.rotateIsLook=!1):(e.rotateFrame=m$17.eastNorthUpToFixedFrame(r.positionWC,n.globe.ellipsoid,W$1),e.rotateIsLook=!0);var s=p$1d.clone(r.transform,x$1);r.lookAtTransform(e.rotateFrame),e.rotateInitialCameraAngle=-r.heading,e.rotateInitialCameraDistance=o$1p.magnitude(new o$1p(r.position.x,r.position.y,0)),r.lookAtTransform(s),e.rotateMouseMoveFunction=function(i,n){var r=t.getBoundingClientRect(),o=new o$1o((r.right-r.left)/2,(r.bottom-r.top)/2),a=new o$1o(n.clientX-r.left,n.clientY-r.top),s=o$1o.subtract(a,o,z),l=Math.atan2(-s.y,s.x)-e.rotateInitialCursorAngle,u=e$2a.zeroToTwoPi(e.rotateInitialCameraAngle-l),c=e.viewer.scene.camera,h=p$1d.clone(c.transform,x$1);c.lookAtTransform(e.rotateFrame);var d=-c.heading;c.rotateRight(u-d),c.lookAtTransform(h)},e.rotateMouseUpFunction=function(t){e.isRotating=!1,e.screenSpaceEventHandler.removeInputAction(G$I.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e.rotateMouseMoveFunction=void 0,e.rotateMouseUpFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.rotateMouseMoveFunction,G$I.MOUSE_MOVE),e.screenSpaceEventHandler.setInputAction(e.rotateMouseUpFunction,G$I.LEFT_UP)}var C$1=[{x:56,y:3},{x:59,y:4},{x:64,y:5},{x:69,y:6},{x:74,y:7},{x:79,y:9},{x:84,y:12},{x:89,y:15},{x:92,y:19},{x:94,y:20},{x:99,y:25},{x:104,y:34},{x:106,y:40},{x:107,y:44},{x:107,y:46},{x:107,y:48},{x:107,y:50},{x:107,y:52},{x:107,y:54},{x:107,y:56}],Z$1=Math.PI/40;function nt(e,t,i){e.screenSpaceEventHandler.removeInputAction(G$I.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e.tiltMouseMoveFunction=void 0,e.tiltMouseUpFunction=void 0;var n=e$2a.PI_OVER_TWO-Math.atan2(-i.y,i.x);n=(n=n<0?0:n)>e$2a.PI_OVER_TWO?e$2a.PI_OVER_TWO:n,e.tiltInitialCursorAngle=n,e.isTilting=!0;var r=e.viewer.scene,o=r.camera,a=N;a.x=r.canvas.clientWidth/2,a.y=r.canvas.clientHeight/2;for(var s=o.pickEllipsoid(a,r.globe.ellipsoid,d$3);!e$2b(s)&&a.y<r.canvas.clientHeight;)a.y+=5,s=o.pickEllipsoid(a,r.globe.ellipsoid,d$3);!e$2b(s)||(e.tiltFrame=m$17.eastNorthUpToFixedFrame(s,r.globe.ellipsoid,W$1),e.tiltMouseMoveFunction=function(i,n){e.isTilting=!0;var r=t.getBoundingClientRect(),o=new o$1o((r.right-r.left)/2,(r.bottom-r.top)/2),a=new o$1o(n.clientX-r.left,n.clientY-r.top),s=o$1o.subtract(a,o,z),l=e$2a.PI_OVER_TWO-Math.atan2(-s.y,s.x);l=(l=l<0?0:l)>e$2a.PI_OVER_TWO?e$2a.PI_OVER_TWO:l;var u=e.viewer.scene.camera,c=p$1d.clone(u.transform,x$1);u.lookAtTransform(e.tiltFrame);var h=l-e.tiltInitialCursorAngle;u.rotateUp(h),e.tiltInitialCursorAngle=l,u.lookAtTransform(c);var d=Math.ceil(l/Z$1),f=C$1[d=d>19?19:d];e.tiltbarLeft=f.x,e.tiltbarTop=f.y},e.tiltMouseUpFunction=function(t){e.isTilting=!1,e.screenSpaceEventHandler.removeInputAction(G$I.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$I.LEFT_UP),e.tiltMouseMoveFunction=void 0,e.tiltMouseUpFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.tiltMouseMoveFunction,G$I.MOUSE_MOVE),e.screenSpaceEventHandler.setInputAction(e.tiltMouseUpFunction,G$I.LEFT_UP))}function j$3(e,t){var i=e.camera,n=e.canvas,r=new o$1o;r.x=n.clientWidth/2,r.y=n.clientHeight/2;var o=q(e,r);if(e$2b(o)){var a=o$1p.distance(i.positionWC,o),s=.0618*t*.2;return a*(s=a>300?s:2*s)}}function L$2(e,t){var i=e.viewer.scene,n=i.camera,r=i.canvas,o=new o$1o;o.x=r.clientWidth/2,o.y=r.clientHeight/2;var a=q(i,o);if(e$2b(a)){var s=o$1p.distance(n.position,a),l=.0618*t*.2;l=s>300?l:2*l,n.position;var u=s*l,c=new o$1p;o$1p.subtract(a,n.position,c);var h=new o$1p,d=(h=o$1p.clone(n.right,h),o$1p.dot(c,h)),f=new o$1p;f=o$1p.multiplyByScalar(h,d,f);var p=new o$1p;p=o$1p.subtract(c,f,p);var _=new o$1p;_=o$1p.normalize(p,_),new o$1p,n.move(_,u);var m=new o$1p;m=o$1p.normalize(a,m);var g=o$1p.magnitude(a),x=t$13.fromCartesian3(g),v=n.pickEllipsoid(o,x,new o$1p);if(e$2b(v)&&!isNaN(v.x)&&!isNaN(v.y)&&!isNaN(v.z)&&(v=o$1p.normalize(v,v),!(n._positionCartographic.height<0))){var y=o$1p.angleBetween(m,v);if(!e$2a.equalsEpsilon(y,0,e$2a.EPSILON10)){var $=new o$1p;$=o$1p.cross(m,v,$),n.rotate($,y)}}}}var et=new f$17,rt$1=new o$1p,at$1=new o$1p;function q(e,t){var i=e.globe,n=e.camera;if(e$2b(i)){var r;e.pickPositionSupported&&(r=e.pickPositionWorldCoordinates(t,rt$1));var o=n.getPickRay(t,et),a=i.pick(o,e,at$1);return(e$2b(r)?o$1p.distance(r,n.positionWC):Number.POSITIVE_INFINITY)<(e$2b(a)?o$1p.distance(a,n.positionWC):Number.POSITIVE_INFINITY)?r:a}}var t=function(e){if(!e$2b(e)||!e$2b(e.container))throw new t$16("options.container is required.");if(!e$2b(e.scene))throw new t$16("options.scene is required.");if(!e$2b(e.viewer))throw new t$16("options.viewer is required.");var t=i$c(e.container);this._viewModel=new y(e,t),m$2(t,this._viewModel),s$Y.isPCBroswer()||(document.querySelector(".sm-zoom").style.visibility="visible",document.querySelector(".sm-compass-tiltbar").style.visibility="visible",document.querySelector(".sm-compass-arrows").style.visibility="visible",document.querySelector(".sm-compass-tilt").style.visibility="visible")};function m$2(e,t){var i=['<div class="sm-compass" data-bind="visible: showCompass, event: { mousedown: handleMouseDown , touchstart : handleMouseDown, mouseup: handleMouseUp, touchend: handleMouseUp}">','<div class="sm-compass-tilt"></div>',"<div class=\"sm-compass-tiltbar\" data-bind = \"style : { left : + tiltbarLeft + 'px',top : + tiltbarTop + 'px'}\"></div>",'<div class="sm-compass-arrows"></div>',"<div class=\"sm-compass-outer-ring\" data-bind=\"style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }\"></div>",'<div class="arrows_e_active"></div>','<div class="arrows_n_active"></div>','<div class="arrows_s_active"></div>','<div class="arrows_w_active"></div>',"</div>",'<div class="sm-zoom">','<div class="sm-zoomin" data-bind="event : {mousedown : handleZoomInMouseDown,touchstart : handleZoomInMouseDown}"></div>','<div class="sm-zoomout" data-bind="event : {mousedown : handleZoomOutMouseDown, touchstart : handleZoomOutMouseDown}"></div>','<div class="sm-zoombar" data-bind="event : {mousedown : handleZoomBarScrollMouseDown, touchstart : handleZoomBarScrollMouseDown},style : {top : + zoombarTop + \'px\' }"></div>'," </div>"].join("");f$1(i,e,t)}function i$4(){this.showInstructions=!1;var e=this;this._command=s$4((function(){e.showInstructions=!e.showInstructions})),this._showClick=s$4((function(){e._touch=!1})),this._showTouch=s$4((function(){e._touch=!0})),this._touch=!1,this.tooltip="Navigation Instructions",ce$1.track(this,["tooltip","showInstructions","_touch"])}function l$3(e){if(!e$2b(e)||!e$2b(e.container))throw new t$16("options.container is required.");var t=i$c(e.container),i=new i$4,n=u$_(e.instructionsInitiallyVisible,!1);i.showInstructions=n,i._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";var r=document.createElement("span");r.className="supermap3d-navigationHelpButton-wrapper",t.appendChild(r);var o=document.createElement("button");o.type="button",o.className="supermap3d-button supermap3d-toolbar-button supermap3d-navigation-help-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),r.appendChild(o);var a=document.createElement("div");a.className="supermap3d-navigation-help",a.setAttribute("data-bind",'css: { "supermap3d-navigation-help-visible" : showInstructions}'),r.appendChild(a);var s=document.createElement("button");s.type="button",s.className="supermap3d-navigation-button supermap3d-navigation-button-left",s.setAttribute("data-bind",'click: showClick, css: {"supermap3d-navigation-button-selected": !_touch, "supermap3d-navigation-button-unselected": _touch}');var l=document.createElement("img");l.src=n$15("Widgets/Images/NavigationHelp/Mouse.svg"),l.className="supermap3d-navigation-button-icon",l.style.width="25px",l.style.height="25px",s.appendChild(l),s.appendChild(document.createTextNode("Mouse"));var u=document.createElement("button");u.type="button",u.className="supermap3d-navigation-button supermap3d-navigation-button-right",u.setAttribute("data-bind",'click: showTouch, css: {"supermap3d-navigation-button-selected": _touch, "supermap3d-navigation-button-unselected": !_touch}');var c=document.createElement("img");c.src=n$15("Widgets/Images/NavigationHelp/Touch.svg"),c.className="supermap3d-navigation-button-icon",c.style.width="25px",c.style.height="25px",u.appendChild(c),u.appendChild(document.createTextNode("Touch")),a.appendChild(s),a.appendChild(u);var h=document.createElement("div");h.className="supermap3d-click-navigation-help supermap3d-navigation-help-instructions",h.setAttribute("data-bind",'css: { "supermap3d-click-navigation-help-visible" : !_touch}'),h.innerHTML=' <table> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/MouseLeft.svg")+'" width="48" height="48" /></td> <td> <div class="supermap3d-navigation-help-pan">Pan view</div> <div class="supermap3d-navigation-help-details">Left click + drag</div> </td> </tr> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/MouseRight.svg")+'" width="48" height="48" /></td> <td> <div class="supermap3d-navigation-help-zoom">Zoom view</div> <div class="supermap3d-navigation-help-details">Right click + drag, or</div> <div class="supermap3d-navigation-help-details">Mouse wheel scroll</div> </td> </tr> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/MouseMiddle.svg")+'" width="48" height="48" /></td> <td> <div class="supermap3d-navigation-help-rotate">Rotate view</div> <div class="supermap3d-navigation-help-details">Middle click + drag, or</div> <div class="supermap3d-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>',a.appendChild(h);var d=document.createElement("div");d.className="supermap3d-touch-navigation-help supermap3d-navigation-help-instructions",d.setAttribute("data-bind",'css: { "supermap3d-touch-navigation-help-visible" : _touch}'),d.innerHTML=' <table> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/TouchDrag.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-pan">Pan view</div> <div class="supermap3d-navigation-help-details">One finger drag</div> </td> </tr> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/TouchZoom.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-zoom">Zoom view</div> <div class="supermap3d-navigation-help-details">Two finger pinch</div> </td> </tr> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/TouchTilt.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-rotate">Tilt view</div> <div class="supermap3d-navigation-help-details">Two finger drag, same direction</div> </td> </tr> <tr> <td><img src="'+n$15("Widgets/Images/NavigationHelp/TouchRotate.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-tilt">Rotate view</div> <div class="supermap3d-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>',a.appendChild(d),ce$1.applyBindings(i,r),this._container=t,this._viewModel=i,this._wrapper=r,this._closeInstructions=function(e){r.contains(e.target)||(i.showInstructions=!1)},s$Y.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}function r$2(e){if(!e$2b(e)||!e$2b(e.scene))throw new t$16("options.scene is required.");this._scene=e.scene,this.lowFrameRateMessage=u$_(e.lowFrameRateMessage,"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,ce$1.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);var t=this;this._dismissMessage=s$4((function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0}));var i=i$f.fromScene(e.scene);this._unsubscribeLowFrameRate=i.lowFrameRate.addEventListener((function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)})),this._unsubscribeNominalFrameRate=i.nominalFrameRate.addEventListener((function(){t.showingLowFrameRateMessage=!1}))}function i$3(e){if(!e$2b(e)||!e$2b(e.container))throw new t$16("options.container is required.");if(!e$2b(e.scene))throw new t$16("options.scene is required.");var t=i$c(e.container),i=new r$2(e),n=document.createElement("div");n.className="supermap3d-performance-watchdog-message-area",n.setAttribute("data-bind","visible: showingLowFrameRateMessage");var r=document.createElement("button");r.setAttribute("type","button"),r.className="supermap3d-performance-watchdog-message-dismiss",r.innerHTML="×",r.setAttribute("data-bind","click: dismissMessage"),n.appendChild(r);var o=document.createElement("div");o.className="supermap3d-performance-watchdog-message",o.setAttribute("data-bind","html: lowFrameRateMessage"),n.appendChild(o),t.appendChild(n),ce$1.applyBindings(i,n),this._container=t,this._viewModel=i,this._element=n}function o$1(e){if(!e$2b(e))throw new t$16("scene is required.");this._scene=e,this._orthographic=e.camera.frustum instanceof a$V,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,ce$1.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);var t=this;ce$1.defineProperty(this,"selectedTooltip",(function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective})),this._toggleDropDown=s$4((function(){t.sceneMode===C$13.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)})),this._eventHelper=new n$x,this._eventHelper.add(e.morphComplete,(function(e,i,n,r){t.sceneMode=n,t._orthographic=n===C$13.SCENE2D||t._scene.camera.frustum instanceof a$V})),this._eventHelper.add(e.preRender,(function(){t._flightInProgress=e$2b(e.camera._currentFlight)})),this._switchToPerspective=s$4((function(){t.sceneMode!==C$13.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)})),this._switchToOrthographic=s$4((function(){t.sceneMode!==C$13.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)})),this._sceneMode=C$13}Object.defineProperties(t.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Object.defineProperties(i$4.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}}),Object.defineProperties(l$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),l$3.prototype.isDestroyed=function(){return!1},l$3.prototype.destroy=function(){return s$Y.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),ce$1.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i$10(this)},Object.defineProperties(r$2.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}}),r$2.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),i$10(this)},Object.defineProperties(i$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),i$3.prototype.isDestroyed=function(){return!1},i$3.prototype.destroy=function(){return this._viewModel.destroy(),ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$10(this)},Object.defineProperties(o$1.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}}),o$1.prototype.isDestroyed=function(){return!1},o$1.prototype.destroy=function(){this._eventHelper.removeAll(),i$10(this)};var v$1="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",b$1="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function n$1(e,t){if(!e$2b(e))throw new t$16("container is required.");if(!e$2b(t))throw new t$16("scene is required.");e=i$c(e);var i=new o$1(t);i._perspectivePath=v$1,i._orthographicPath=b$1;var n=document.createElement("span");n.className="supermap3d-projectionPicker-wrapper supermap3d-toolbar-button",e.appendChild(n);var r=document.createElement("button");r.type="button",r.className="supermap3d-button supermap3d-toolbar-button",r.setAttribute("data-bind",'css: { "supermap3d-projectionPicker-buttonPerspective": !_orthographic, "supermap3d-projectionPicker-buttonOrthographic": _orthographic, "supermap3d-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "supermap3d-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "supermap3d-projectionPicker-iconPerspective" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "supermap3d-projectionPicker-iconOrthographic" } --\x3e\x3c!-- /ko --\x3e',n.appendChild(r);var o=document.createElement("button");o.type="button",o.className="supermap3d-button supermap3d-toolbar-button supermap3d-projectionPicker-dropDown-icon",o.setAttribute("data-bind",'css: { "supermap3d-projectionPicker-visible" : (dropDownVisible && _orthographic), "supermap3d-projectionPicker-none" : !_orthographic, "supermap3d-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),n.appendChild(o);var a=document.createElement("button");a.type="button",a.className="supermap3d-button supermap3d-toolbar-button supermap3d-projectionPicker-dropDown-icon",a.setAttribute("data-bind",'css: { "supermap3d-projectionPicker-visible" : (dropDownVisible && !_orthographic), "supermap3d-projectionPicker-none" : _orthographic, "supermap3d-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),n.appendChild(a),ce$1.applyBindings(i,n),this._viewModel=i,this._container=e,this._wrapper=n,this._closeDropDown=function(e){n.contains(e.target)||(i.dropDownVisible=!1)},s$Y.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function i$2(e,t){if(!e$2b(e))throw new t$16("scene is required.");this._scene=e;var i=this;this._eventHelper=new n$x,this._eventHelper.add(e.morphStart,(function(e,t,n,r){i.sceneMode=n,i.dropDownVisible=!1})),this._duration=u$_(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",ce$1.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,ce$1.defineProperty(this,"selectedTooltip",(function(){var e=i.sceneMode;return e===C$13.SCENE2D?i.tooltip2D:e===C$13.SCENE3D?i.tooltip3D:i.tooltipColumbusView})),this._toggleDropDown=s$4((function(){i.dropDownVisible=!i.dropDownVisible})),this._morphTo2D=s$4((function(){e.morphTo2D(i._duration)})),this._morphTo3D=s$4((function(){e.morphTo3D(i._duration)})),this._morphToColumbusView=s$4((function(){e.morphToColumbusView(i._duration)})),this._sceneMode=C$13}Object.defineProperties(n$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),n$1.prototype.isDestroyed=function(){return!1},n$1.prototype.destroy=function(){return this._viewModel.destroy(),s$Y.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ce$1.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i$10(this)},Object.defineProperties(i$2.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){if(e<0)throw new t$16("duration value must be positive.");this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}}),i$2.prototype.isDestroyed=function(){return!1},i$2.prototype.destroy=function(){this._eventHelper.removeAll(),i$10(this)};var D$1="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",P$1="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",_$1="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function c$2(e,t,i){if(!e$2b(e))throw new t$16("container is required.");if(!e$2b(t))throw new t$16("scene is required.");e=i$c(e);var n=new i$2(t,i);n._globePath=D$1,n._flatMapPath=P$1,n._columbusViewPath=_$1;var r=document.createElement("span");r.className="supermap3d-sceneModePicker-wrapper supermap3d-toolbar-button",e.appendChild(r);var o=document.createElement("button");o.type="button",o.className="supermap3d-button supermap3d-toolbar-button",o.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "supermap3d-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "supermap3d-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "supermap3d-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "supermap3d-sceneModePicker-slide-svg supermap3d-sceneModePicker-icon3D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "supermap3d-sceneModePicker-slide-svg supermap3d-sceneModePicker-icon2D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "supermap3d-sceneModePicker-slide-svg supermap3d-sceneModePicker-iconColumbusView" } --\x3e\x3c!-- /ko --\x3e',r.appendChild(o);var a=document.createElement("button");a.type="button",a.className="supermap3d-button supermap3d-toolbar-button supermap3d-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "supermap3d-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "supermap3d-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),r.appendChild(a);var s=document.createElement("button");s.type="button",s.className="supermap3d-button supermap3d-toolbar-button supermap3d-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "supermap3d-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "supermap3d-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),r.appendChild(s);var l=document.createElement("button");l.type="button",l.className="supermap3d-button supermap3d-toolbar-button supermap3d-sceneModePicker-dropDown-icon",l.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "supermap3d-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "supermap3d-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),r.appendChild(l),ce$1.applyBindings(n,r),this._viewModel=n,this._container=e,this._wrapper=r,this._closeDropDown=function(e){r.contains(e.target)||(n.dropDownVisible=!1)},s$Y.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(c$2.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),c$2.prototype.isDestroyed=function(){return!1},c$2.prototype.destroy=function(){return this._viewModel.destroy(),s$Y.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ce$1.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i$10(this)};var m$1=new o$1o,s$2="-1000px";function n(e,t,i){if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(t))throw new t$16("selectionIndicatorElement is required.");if(!e$2b(i))throw new t$16("container is required.");this._scene=e,this._screenPositionX=s$2,this._screenPositionY=s$2,this._tweens=e.tweens,this._container=u$_(i,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,ce$1.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,ce$1.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&e$2b(this.position)}}),ce$1.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return s$Q.wgs84ToWindowCoordinates(e,t,i)}}function i$1(e,t){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e),this._container=e;var i=document.createElement("div");i.className="supermap3d-selection-wrapper",i.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "supermap3d-selection-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var r="http://www.w3.org/2000/svg",o=document.createElementNS(r,"svg:svg");o.setAttribute("width",160),o.setAttribute("height",160),o.setAttribute("viewBox","0 0 160 160");var a=document.createElementNS(r,"g");a.setAttribute("transform","translate(80,80)"),o.appendChild(a);var s=document.createElementNS(r,"path");s.setAttribute("data-bind","attr: { transform: _transform }"),s.setAttribute("d","M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z"),a.appendChild(s),i.appendChild(o);var l=new n(t,this._element,this._container);this._viewModel=l,ce$1.applyBindings(this._viewModel,this._element)}n.prototype.update=function(){if(this.showSelection&&e$2b(this.position)){var e=this.computeScreenSpacePosition(this.position,m$1);if(e$2b(e)){var t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,r=this._selectionIndicatorElement.clientWidth,o=.5*r;e.x=Math.min(Math.max(e.x,-r),i+r)-o,e.y=Math.min(Math.max(e.y,-r),n+r)-o,this._screenPositionX=Math.floor(e.x+.25)+"px",this._screenPositionY=Math.floor(e.y+.25)+"px"}else this._screenPositionX=s$2,this._screenPositionY=s$2}},n.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:m$W.EXPONENTIAL_OUT})},n.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:m$W.EXPONENTIAL_OUT})},Object.defineProperties(n.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(i$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),i$1.prototype.isDestroyed=function(){return!1},i$1.prototype.destroy=function(){var e=this._container;return ce$1.cleanNode(this._element),e.removeChild(this._element),i$10(this)};var C={UNLOAD:0,LOADING:1,LOADED:2,LOST:3},Be=new i$V("S3MTilesParser",1e4);function g(e,t,i,n,r){this._viewer=e,this._context=t,this._state=C.UNLOAD,this._url=i,this._gl=t._gl,this._renderEntities=[],this._visible=!1,this._scale=u$_(r,1),this._position=o$1p.clone(n),this._modelMatrix=m$17.eastNorthUpToFixedFrame(n,void 0,new p$1d),null!==t.s3tc?this._supportCompressType=1:null!==t.pvrtc?this._supportCompressType=2:null!==t.etc1&&(this._supportCompressType=3)}function Ue(e){let t=o$1p.distance(e._position,e._viewer.camera.position),i=e._viewer.camera.frustum.near,n=e._viewer.scene._view.viewport.height,r=e._viewer.camera.frustum.fov;return 25/n*Math.tan(r/2)*i*2/(i/(i+t))}function d$2(e,t,i){if(e$2b(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(e$2b(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function he(e,t,i){if(e$2b(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];e$2b(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}}function Fe(e,t,i){if(!e$2b(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];e$2b(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function l$2(e,t,i){var n=d$2(e,t,i);if(e$2b(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function R(e,t,i){var n=d$2(e,t,i);if(e$2b(n))return n.textContent.trim()}function Ve$1(e,t,i){var n=d$2(e,t,i);if(e$2b(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}Object.defineProperties(g.prototype,{visible:{set:function(e){this._visible=e},get:function(){return this._visible}},position:{get:function(){return this._position}},scale:{get:function(){return this._scale}}}),g.prototype.setModelMatrix=function(e,t){this._position=o$1p.clone(t);var i=Ue(this),n=m$17.eastNorthUpToFixedFrame(t,void 0,new p$1d);p$1d.multiplyByUniformScale(n,i,this._modelMatrix);for(var r=this._renderEntities,o=0,a=r.length;o<a;o++){var s=r[o],l=s._oriCenter,u=s._colorCommand;e$2b(u)&&(u.modelMatrix=p$1d.clone(this._modelMatrix),p$1d.multiplyByPoint(this._modelMatrix,l,u.boundingVolume.center))}},g.prototype.load=function(){var e=this,t=this._state;if(C.UNLOAD==t){var i=o$N(this._url,(function(e){return o$10(e)}));e$2b(i)&&(this._state=C.LOADING,i.then((function(t){Ge(e,t)}),(function(e){this._state=C.UNLOAD})))}},g.prototype.update=function(e){if(this._visible&&!e.passes.fbo){if(!this._ready)return void this.load();e.context;var t=this._renderEntities;if(t&&0!=t.length)for(var i=0,n=t.length;i<n;i++){var r=t[i];e$2b(r._colorCommand)&&!o$1p.equals(r._colorCommand.boundingVolume.center,o$1p.ZERO)&&e.commandList.push(r._colorCommand)}}},g.prototype.isDestroyed=function(){return!1},g.prototype.destroy=function(){for(var e=this._renderEntities,t=0,i=e.length;t<i;t++){e[t].destroy()}return this._renderEntities.length=0,this._viewer._tiltIndicator=void 0,i$10(this)};var Me=new s$S;function Ge(e,t){var i={buffer:t,supportCompressType:e._supportCompressType},n=Be.scheduleTask(i,[t]);e$2b(n)?n.then((function(t){if(t.result){e._gl;for(var i=e._context,n=Me.read(t.xmlDoc).firstChild,r=n.namespaceURI,o=Fe(d$2(n,"Material3Ds",r),"material",r),a={},s=0,l=o.length;s<l;s++){var u=o[s],c=R(u,"name",r),h=new _0x21d1b1({});a[c]=h;var d=d$2(u,"Ambient",r),f=l$2(d,"AmbientR",r),p=l$2(d,"AmbientG",r),_=l$2(d,"AmbientB",r),m=l$2(d,"AmbientA",r);h._ambientColor=new e$1U(f,p,_,m);var g=d$2(u,"Diffuse",r);f=l$2(g,"DiffuseR",r),p=l$2(g,"DiffuseG",r),_=l$2(g,"DiffuseB",r),m=l$2(g,"DiffuseA",r),h._diffuseColor=new e$1U(f,p,_,m);var x=d$2(u,"Specular",r);f=l$2(x,"SpecularR",r),p=l$2(x,"SpecularG",r),_=l$2(x,"SpecularB",r),m=l$2(x,"SpecularA",r),h._specularColor=new e$1U(f,p,_,m);var v=l$2(u,"Shininess",r);h._shininess=v,d$2(u,"TransparentSorting",r),h._bTransparentSorting=Ve$1(u,"TransparentSorting",r);var y=d$2(u,"texture",r),$=R(y,"name",r),b=d$2(y,"AddressMode",r),T=R(b,"u",r),S=R(b,"v",r);T="TAM_WRAP"===T?q$19.REPEAT:q$19.CLAMP_TO_EDGE,S="TAM_WRAP"===S?q$19.REPEAT:q$19.CLAMP_TO_EDGE;var w=t.texturePackage[$];if(e$2b(w)){$=i._id+"_"+$;var E=Se$d.CreateTexture($,i,w.width,w.height,w.nFormat,w.compressType,w.imageBuffer,!1,T,S);h._textures.push(E)}}var P=he(d$2(n,"PageLods",r),"Geode",r);for(s=0,l=P.length;s<l;s++){for(var A=P[s],L=R(A,"GeoDeModMatrix",r).split(","),M=0;M<16;M++)L[M]=parseFloat(L[M]);L=p$1d.unpack(L,0);for(var O=he(A,"GeoName",r),I=[],D=0,B=O.length;D<B;D++){var N=O[D].textContent.trim();I.push(N)}for(var F=[],U=new i$1c,G=0;G<I.length;G++){var z=ze$1(W=(k=t.geoPackage[I[G]]).vertexPackage,L);F.push(z)}var V=new o$1p;F.length>0&&(i$1c.fromBoundingSpheres(F,U),V=o$1p.clone(U.center),F.length=0),e.oriRadius=U.radius;for(B=0;B<I.length;B++){var k,W=(k=t.geoPackage[I[B]]).vertexPackage,H=k.arrIndexPackage,q={};for(var j in H){var Y=H[j];if(e$2b(Y)){h=a[c=Y.materialCode];q[c]=h}}var X=new T$1({vertexPackage:W,arrIndexPackage:H,version:t.version,mapPass:q,boundingVolume:U,oriCenter:V,owner:e});X.initialize(e._context),e._renderEntities.push(X)}}e._ready=!0,e._state=C.LOADED}else e._state=C.UNLOAD})):e.state=C.UNLOAD}function ze$1(e,t){for(var i=[],n=new i$1c,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1c.fromPoints(i,n),i.length=0,i$1c.transform(n,t,n),n}function T$1(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;this._arrIndexPackage=t,this._vertexPackage=i,this._owner=e.owner,this._attributeLocations={},this._initialize=!1,this._mapPass=n,this._boundingVolume=e.boundingVolume,this._oriCenter=e.oriCenter}function s$1(e,t,i){this._color=e,this._height=t,this._base=u$_(i,0)}function v(e,t,i,n){this.interval=e,this.height=t,this.color=i||new e$1U(.5,.5,.5,1),this.backgroundColor=n||new e$1U(0,0,0,0)}T$1.prototype.initialize=function(e){this._initialize||(this.createCommand(e),this._initialize=!0)},T$1.prototype.createVertexData=function(e){var t=this._vertexPackage.vertexAttributes;for(var i in this._vertexPackage.attrLocation){var n=this._vertexPackage.attrLocation[i];this._vertexPackage.vertexAttributes[n].name=i}for(var r=0,o=t.length;r<o;r++){var a=t[r];!e$2b(a.typedArray)||(a.vertexBuffer=t$Y.createVertexBuffer({context:e,typedArray:a.typedArray,usage:A$19.STATIC_DRAW}),a.typedArray=null,delete a.typedArray)}return this._attributeLocations=this._vertexPackage.attrLocation,t},T$1.prototype.createCommand=function(e){var t=this.createVertexData(e),i=Le$s.OPAQUE,n=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),r=this._vertexPackage.verticesCount,o=this._arrIndexPackage[0];if(e$2b(o)){var a=ce$x.UNSIGNED_SHORT;(1===o.indexType||r>=e$2a.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(a=ce$x.UNSIGNED_INT);var s=t$Y.createIndexBuffer({context:e,typedArray:o.indicesTypedArray,usage:A$19.STATIC_DRAW,indexDatatype:a}),l=this._mapPass[o.materialCode]||_0x21d1b1.Default,u=W$18.TRIANGLES;switch(o.primitiveType){case 1:u=W$18.POINTS;break;case 2:u=W$18.LINES;break;case 4:u=W$18.TRIANGLES}var c=new i$_({primitiveType:u,boundingVolume:this._boundingVolume,pass:i,owner:this,cull:!1,modelMatrix:p$1d.clone(this._owner._modelMatrix)});c.vertexArray=new c$12({context:e,attributes:t,indexBuffer:s});var h=new s$U({name:"tiltIndicatorVS",sources:["attribute vec4 aPosition;\n attribute vec3 aNormal;\n attribute vec4 aTexCoord0;\n #ifdef VertexColor\n attribute vec4 aColor;\n #endif\n uniform vec4 uAmbientColor;\n uniform vec4 uDiffuseColor;\n uniform vec4 uSpecularColor;\n varying vec2 vTexCoord;\n varying vec4 vColor;\n const float SHIFT_LEFT8 = 256.0;\n const float SHIFT_RIGHT8 = 1.0 / 256.0;\n const vec4 LIGHT_COLOR = vec4(0.8, 0.8, 0.8, 1.0);\n vec4 vertexColor = vec4(1.0);\n #ifdef VertexColor\n vertexColor = aColor;\n #endif\n void main()\n {\n vec4 vertexPos = aPosition;\n vTexCoord = aTexCoord0.xy;\n vertexPos.w = 1.0;\n gl_Position = czm_modelViewProjection * vertexPos;\n vColor = vertexColor;\n vec4 eyePosition = czm_modelView * vertexPos;\n vec3 normal = normalize(aNormal);\n vec3 lightDirection = normalize(czm_sunPositionWC - vec3(eyePosition));\n float nDotL = max(dot(lightDirection, normal), 0.0);\n vec4 diffuse = uDiffuseColor * LIGHT_COLOR * nDotL;\n vec4 ambient = uAmbientColor * LIGHT_COLOR;\n vec4 materialColor = clamp(diffuse + ambient, vec4(0.0), vec4(1.0));\n vColor = vColor * materialColor;\n }"]}),d=new s$U({name:"tiltIndicatorFS",sources:["#ifdef TEXTURE_ENABLE\n uniform sampler2D uTexture;\n #endif\n varying vec2 vTexCoord;\n varying vec4 vColor;\n void main()\n {\n #ifdef TEXTURE_ENABLE\n vec2 vecTexCoord = vec2(vTexCoord.x,1.0-vTexCoord.y);\n gl_FragColor = texture2D(uTexture, vecTexCoord.xy, 0.0) * vColor;\n #else\n gl_FragColor = vColor;\n #endif\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n }"]});e$2b(this._attributeLocations.aTexCoord0)&&l._textures.length>0&&d.defines.push("TEXTURE_ENABLE"),e$2b(this._attributeLocations.aColor)&&h.defines.push("VertexColor"),c.shaderProgram=r$13.fromCache({context:e,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:this._attributeLocations}),c.uniformMap={uTexture:function(){return l._textures[0]},uAmbientColor:function(){return l._ambientColor},uDiffuseColor:function(){return l._diffuseColor},uSpecularColor:function(){return l._specularColor}},c.renderState=n,this._colorCommand=c,this._vertexPackage=null,this._arrIndexPackage.length=0}},T$1.prototype.isDestroyed=function(){return!1},T$1.prototype.destroy=function(){for(var e in this._mapPass)this._mapPass.hasOwnProperty(e)&&this._mapPass[e].destroy();return this._mapPass.length=0,e$2b(this._colorCommand)&&(this._colorCommand.vertexArray=this._colorCommand.vertexArray&&!this._colorCommand.vertexArray.isDestroyed()&&this._colorCommand.vertexArray.destroy(),this._colorCommand.shaderProgram=this._colorCommand.shaderProgram&&!this._colorCommand.shaderProgram.isDestroyed()&&this._colorCommand.shaderProgram.destroy(),this._colorCommand=void 0),this._vertexPackage=null,this._arrIndexPackage.length=0,this._attributeLocations=void 0,i$10(this)},s$1.prototype.getHeight=function(){return this._height},s$1.prototype.getBase=function(){return this._base},s$1.prototype.getStartTime=function(){return this._start},s$1.prototype.getStopTime=function(){return this._stop},s$1.prototype.setRange=function(e,t){this._start=e,this._stop=t},s$1.prototype.render=function(e){var t="";if(this._start&&this._stop&&this._color){var i=a$15.secondsDifference(this._start,e.epochJulian),n=Math.round(e.timeBarWidth*e.getAlpha(i)),r=a$15.secondsDifference(this._stop,e.epochJulian),o=Math.round(e.timeBarWidth*e.getAlpha(r))-n;n<0&&(o+=n,n=0),n+o>e.timeBarWidth&&(o=e.timeBarWidth-n),o>0&&(t='<span class="supermap3d-timeline-highlight" style="left: '+n.toString()+"px; width: "+o.toString()+"px; bottom: "+this._base.toString()+"px; height: "+this._height+"px; background-color: "+this._color+';"></span>')}return t},v.prototype.render=function(e,t){var i=this.interval.start,n=this.interval.stop,r=t.startJulian,o=a$15.addSeconds(t.startJulian,t.duration,new a$15);if(a$15.lessThan(i,r)&&a$15.greaterThan(n,o))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(a$15.lessThanOrEquals(i,o)&&a$15.greaterThanOrEquals(n,r)){var a,s,l;for(a=0;a<t.timeBarWidth;++a){var u=a$15.addSeconds(t.startJulian,a/t.timeBarWidth*t.duration,new a$15);!e$2b(s)&&a$15.greaterThanOrEquals(u,i)?s=a:!e$2b(l)&&a$15.greaterThanOrEquals(u,n)&&(l=a)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),e$2b(s)&&(e$2b(l)||(l=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(s,t.y,Math.max(l-s,1),this.height))}};var Z=1e12,_={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},c$1={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},T=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6];function u$3(e,t){if(!e$2b(e))throw new t$16("container is required.");if(!e$2b(t))throw new t$16("clock is required.");e=i$c(e),this.container=e;var i=document.createElement("div");i.className="supermap3d-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=_.none,this._touchMode=c$1.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="supermap3d-timeline-bar"></div><div class="supermap3d-timeline-trackContainer"><canvas class="supermap3d-timeline-tracks" width="10" height="1"></canvas></div><div class="supermap3d-timeline-needle"></div><span class="supermap3d-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=ot(this),this._onMouseUp=at(this),this._onMouseMove=rt(this),this._onMouseWheel=ht(this),this._onTouchStart=ct(this),this._onTouchMove=dt(this),this._onTouchEnd=ut(this);var n=this._timeBarEle;document.addEventListener("mouseup",this._onMouseUp,!1),document.addEventListener("mousemove",this._onMouseMove,!1),n.addEventListener("mousedown",this._onMouseDown,!1),n.addEventListener("touchstart",this._onTouchStart,!1),n.addEventListener("touchend",this._onTouchEnd,!1),n.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}function A(e){return e<10?"0"+e.toString():e.toString()}function ot(e){return function(t){e._mouseMode!==_.touchOnly&&(0===t.button?(e._mouseMode=_.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,2===t.button?e._mouseMode=_.zoom:e._mouseMode=_.slide)),t.preventDefault()}}function at(e){return function(t){e._mouseMode=_.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function rt(e){return function(t){var i;if(e._mouseMode===_.scrub){t.preventDefault();var n=t.clientX-e._topDiv.getBoundingClientRect().left;n<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):n>e._topDiv.clientWidth||(e._timelineDragLocation=void 0,e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===_.slide){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i){var r=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(a$15.addSeconds(e._startJulian,r,new a$15),a$15.addSeconds(e._endJulian,r,new a$15))}}else e._mouseMode===_.zoom&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i&&e.zoomFrom(Math.pow(1.01,i)))}}function ht(e){return function(t){var i=t.wheelDeltaY||t.wheelDelta||-t.detail;i/=Z=Math.max(Math.min(Math.abs(i),Z),1),e.zoomFrom(Math.pow(1.05,-i))}}function ct(e){return function(t){var i,n,r=t.touches.length,o=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=_.touchOnly,1===r?(i=a$15.secondsDifference(e._scrubJulian,e._startJulian),n=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+o),Math.abs(t.touches[0].clientX-n)<50?(e._touchMode=c$1.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===r?"-16px 0":"0 0")):(e._touchMode=c$1.singleTap,e._touchState.centerX=t.touches[0].clientX-o)):2===r?(e._touchMode=c$1.slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-o,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=c$1.ignore}}function ut(e){return function(t){var i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===c$1.singleTap?(e._touchMode=c$1.scrub,e._onTouchMove(t)):e._touchMode===c$1.scrub&&e._onTouchMove(t),e._mouseMode=_.touchOnly,1!==i?e._touchMode=i>0?c$1.ignore:c$1.none:e._touchMode===c$1.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function dt(e){return function(t){var i,n,r,o,a,s,l=1,u=e._topDiv.getBoundingClientRect().left;e._touchMode===c$1.singleTap&&(e._touchMode=c$1.slideZoom),e._mouseMode=_.touchOnly,e._touchMode===c$1.scrub?(t.preventDefault(),1===t.changedTouches.length&&((n=t.changedTouches[0].clientX-u)>=0&&n<=e._topDiv.clientWidth&&e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===c$1.slideZoom&&(2===(r=t.touches.length)?(o=.5*(t.touches[0].clientX+t.touches[1].clientX)-u,a=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===r&&(o=t.touches[0].clientX-u,a=0),e$2b(o)&&(a>0&&e._touchState.spanX>0?(l=e._touchState.spanX/a,s=a$15.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-o*e._timeBarSecondsSpan*l)/e._topDiv.clientWidth,new a$15)):(i=e._touchState.centerX-o,s=a$15.addSeconds(e._startJulian,i*e._timeBarSecondsSpan/e._topDiv.clientWidth,new a$15)),e.zoomTo(s,a$15.addSeconds(s,e._timeBarSecondsSpan*l,new a$15)),e._touchState.centerX=o,e._touchState.spanX=a))}}function f(e){return n$15("Assets/Textures/SkyBox/tycho2t3_80_"+e+".jpg")}function U(e){e._renderLoopRunning=!0;var t=0;p$H((function i(n){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{var r=e._targetFrameRate;if(e$2b(r)){var o=1e3/r,a=n-t;a>o&&(e.resize(),e.render(),t=n-a%o),p$H(i)}else e.resize(),e.render(),p$H(i)}catch(t){e._errorListenerEvent.raiseEvent(t)}else e._renderLoopRunning=!1}))}function j$2(e){var t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,e._pixelRatio=t,e$2b(e._scene)&&(e._scene.pixelRatio=t),t}function x(e){var t=e._canvas,i=t.clientWidth,n=t.clientHeight,r=j$2(e);e._canvasClientWidth=i,e._canvasClientHeight=n,i*=r,n*=r,t.width=i,t.height=n,e._canRender=0!==i&&0!==n,e._lastDevicePixelRatio=window.devicePixelRatio}function L$1(e){var t=e._canvas,i=t.width,n=t.height;if(0!==i&&0!==n){var r=e._scene.camera.frustum;e$2b(r.aspectRatio)?r.aspectRatio=i/n:(r.top=r.right*(n/i),r.bottom=-r.top)}}function u$2(e,t){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e),t=u$_(t,{}),this._options=t;var i=document.createElement("div");i.className="supermap3d-widget",e.appendChild(i);var n=document.createElement("canvas"),r=s$Y.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=r,r&&(n.style.imageRendering=s$Y.imageRenderingValue()),n.oncontextmenu=function(){return!1},n.onselectstart=function(){return!1},i.appendChild(n);var o=document.createElement("div");o.className="supermap3d-widget-credits";var a=e$2b(t.creditContainer)?i$c(t.creditContainer):i;a.appendChild(o);var s=e$2b(t.creditViewport)?i$c(t.creditViewport):i,l=u$_(t.showRenderLoopErrors,!0),u=u$_(t.useBrowserRecommendedResolution,!0);this._element=i,this._container=e,this._canvas=n,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=s,this._creditContainer=a,this._innerCreditContainer=o,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=l,this._resolutionScale=1,this._useBrowserRecommendedResolution=u,this._forceResize=!1,this._clock=e$2b(t.clock)?t.clock:new u$I,this._isShowErrorPanel=!0,this._errorListenerEvent=new o$1h,x(this),(!e$2b(t.contextOptions)||!e$2b(t.contextOptions)||t.contextOptions.contextType!=De$h.WebGPU)&&this._initScene()}function E(e){var t=!1,i=window.screen;return e$2b(i)&&(e$2b(i.lockOrientation)?t=i.lockOrientation(e):e$2b(i.mozLockOrientation)?t=i.mozLockOrientation(e):e$2b(i.msLockOrientation)?t=i.msLockOrientation(e):e$2b(i.orientation&&i.orientation.lock)&&(t=i.orientation.lock(e))),t}function u$1(){var e=window.screen;e$2b(e)&&(e$2b(e.unlockOrientation)?e.unlockOrientation():e$2b(e.mozUnlockOrientation)?e.mozUnlockOrientation():e$2b(e.msUnlockOrientation)?e.msUnlockOrientation():e$2b(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function O$1(e,t,i,n){n()||(i()?(t.useWebVR=!1,e._locked&&(u$1(),e._locked=!1),e._noSleep.disable(),l$1f.exitFullscreen(),i(!1)):(l$1f.fullscreen||l$1f.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=E("landscape")),t.useWebVR=!0,i(!0)))}function a(e,t){if(!e$2b(e))throw new t$16("scene is required.");var i=this,n=ce$1.observable(l$1f.enabled),r=ce$1.observable(!1);this.isVRMode=void 0,ce$1.defineProperty(this,"isVRMode",{get:function(){return r()}}),this.isVREnabled=void 0,ce$1.defineProperty(this,"isVREnabled",{get:function(){return n()},set:function(e){n(e&&l$1f.enabled)}}),this.tooltip=void 0,ce$1.defineProperty(this,"tooltip",(function(){return n()?r()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"}));var o=ce$1.observable(!1);this._isOrthographic=void 0,ce$1.defineProperty(this,"_isOrthographic",{get:function(){return o()}}),this._eventHelper=new n$x,this._eventHelper.add(e.preRender,(function(){o(e.camera.frustum instanceof a$V)})),this._locked=!1,this._noSleep=new b$4,this._command=s$4((function(){O$1(i,e,r,o)}),ce$1.getObservable(this,"isVREnabled")),this._vrElement=u$_(i$c(t),document.body),this._callback=function(){!l$1f.fullscreen&&r()&&(e.useWebVR=!1,i._locked&&(u$1(),i._locked=!1),i._noSleep.disable(),r(!1))},document.addEventListener(l$1f.changeEventName,this._callback)}u$3.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},u$3.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},u$3.prototype.isDestroyed=function(){return!1},u$3.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this),document.removeEventListener("mouseup",this._onMouseUp,!1),document.removeEventListener("mousemove",this._onMouseMove,!1);var e=this._timeBarEle;e.removeEventListener("mousedown",this._onMouseDown,!1),e.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),e.removeEventListener("mousewheel",this._onMouseWheel,!1),e.removeEventListener("touchstart",this._onTouchStart,!1),e.removeEventListener("touchmove",this._onTouchMove,!1),e.removeEventListener("touchend",this._onTouchEnd,!1),e.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),i$10(this)},u$3.prototype.addHighlightRange=function(e,t,i){var n=new s$1(e,t,i);return this._highlightRanges.push(n),this.resize(),n},u$3.prototype.addTrack=function(e,t,i,n){var r=new v(e,t,i,n);return this._trackList.push(r),this._lastHeight=void 0,this.resize(),r},u$3.prototype.zoomTo=function(e,t){if(!e$2b(e))throw new t$16("startTime is required.");if(!e$2b(t))throw new t$16("stopTime is required");if(a$15.lessThanOrEquals(t,e))throw new t$16("Start time must come before end time.");if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=a$15.secondsDifference(t,e),this._clock&&this._clock.clockRange!==tt$9.UNBOUNDED){var i=this._clock.startTime,n=this._clock.stopTime,r=a$15.secondsDifference(n,i),o=a$15.secondsDifference(i,this._startJulian),a=a$15.secondsDifference(n,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):o>0?(this._endJulian=a$15.addSeconds(this._endJulian,o,new a$15),this._startJulian=i,this._timeBarSecondsSpan=a$15.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=a$15.addSeconds(this._startJulian,a,new a$15),this._endJulian=n,this._timeBarSecondsSpan=a$15.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();var s=document.createEvent("Event");s.initEvent("setzoom",!0,!0),s.startJulian=this._startJulian,s.endJulian=this._endJulian,s.epochJulian=this._epochJulian,s.totalSpan=this._timeBarSecondsSpan,s.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(s)},u$3.prototype.zoomFrom=function(e){var t=a$15.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;var i=this._timeBarSecondsSpan-t;this.zoomTo(a$15.addSeconds(this._startJulian,t-t*e,new a$15),a$15.addSeconds(this._endJulian,i*e-i,new a$15))},u$3.prototype.makeLabel=function(e){var t=a$15.toGregorianDate(e),i=t.hour+8;return i>=24&&(i-=24),A(i)+":"+A(t.minute)+":"+A(t.second)},u$3.prototype.smallestTicInPixels=7,u$3.prototype._makeTics=function(){var e,t=this._timeBarEle,i=a$15.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(i*this._topDiv.clientWidth/this._timeBarSecondsSpan),r=n-8,o=this;this._needleEle.style.left=n.toString()+"px";var a="",s=.01,l=31536e6,u=1e-10,c=0,h=this._timeBarSecondsSpan;h<s?(h=s,this._timeBarSecondsSpan=s,this._endJulian=a$15.addSeconds(this._startJulian,s,new a$15)):h>l&&(h=l,this._timeBarSecondsSpan=l,this._endJulian=a$15.addSeconds(this._startJulian,l,new a$15));var d=this._timeBarEle.clientWidth;d<10&&(d=10);var f,p=this._startJulian,_=Math.min(h/d*1e-5,.4),m=a$15.toGregorianDate(p);f=h>31536e4?a$15.fromDate(new Date(Date.UTC(100*Math.floor(m.year/100),0))):h>31536e3?a$15.fromDate(new Date(Date.UTC(10*Math.floor(m.year/10),0))):h>86400?a$15.fromDate(new Date(Date.UTC(m.year,0))):a$15.fromDate(new Date(Date.UTC(m.year,m.month,m.day)));var g=a$15.secondsDifference(this._startJulian,a$15.addSeconds(f,_,new a$15)),x=g+h;function v(e){return Math.floor(g/e)*e}function y(e,t){return Math.ceil(e/t+.5)*t}function $(e){return(e-g)/h}function b(e,t){return e-t*Math.round(e/t)}this._epochJulian=f,this._rulerEle.innerHTML=this.makeLabel(a$15.addSeconds(this._endJulian,-s,new a$15));var C=this._rulerEle.offsetWidth+20;C<30&&(C=180);var S=c;c-=u;var w={startTime:g,startJulian:p,epochJulian:f,duration:h,timeBarWidth:d,getAlpha:$};this._highlightRanges.forEach((function(e){a+=e.render(w)}));var E=0,P=0,A=0,L=C/d;L>1&&(L=1),L*=this._timeBarSecondsSpan;var M,R=-1,O=-1,I=T.length;for(M=0;M<I;++M){var D=T[M];if(++R,E=D,D>L&&D>c)break;O<0&&d*(D/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(O=R)}if(R>0){for(;R>0;)if(--R,Math.abs(b(E,T[R]))<1e-5){T[R]>=c&&(P=T[R]);break}if(O>=0)for(;O<R;){if(Math.abs(b(P,T[O]))<1e-5&&T[O]>=c){A=T[O];break}++O}}(c=S)>u&&A<1e-5&&Math.abs(c-E)>u&&(A=c,c<=E+u&&(P=0));var B,N=-999999;if(d*(A/this._timeBarSecondsSpan)>=3)for(e=v(A);e<=x;e=y(e,A))a+='<span class="supermap3d-timeline-ticTiny" style="left: '+Math.round(d*$(e)).toString()+'px;"></span>';if(d*(P/this._timeBarSecondsSpan)>=3)for(e=v(P);e<=x;e=y(e,P))a+='<span class="supermap3d-timeline-ticSub" style="left: '+Math.round(d*$(e)).toString()+'px;"></span>';if(d*(E/this._timeBarSecondsSpan)>=2){this._mainTicSpan=E,x+=E,e=v(E);for(var F=a$15.computeTaiMinusUtc(f);e<=x;){var U=a$15.addSeconds(p,e-g,new a$15);if(E>2.1){var G=a$15.computeTaiMinusUtc(U);Math.abs(G-F)>.1&&(e+=G-F,U=a$15.addSeconds(p,e-g,new a$15))}var z=Math.round(d*$(e)),V=this.makeLabel(U);this._rulerEle.innerHTML=V,(B=this._rulerEle.offsetWidth)<10&&(B=C);var k=z-(B/2-1);k>N?(N=k+B+271,a+='<span class="supermap3d-timeline-ticMain" style="left: '+z.toString()+'px;"></span><span class="supermap3d-timeline-ticLabel" style="left: '+k.toString()+'px;">'+V+"</span>"):a+='<span class="supermap3d-timeline-ticSub" style="left: '+z.toString()+'px;"></span>',e=y(e,E)}}else this._mainTicSpan=-1;a+='<span class="supermap3d-timeline-icon16" style="left:'+r+'px;bottom:0;background-position: 0 0;"></span>',t.innerHTML=a,this._scrubElement=t.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),w.y=0,this._trackList.forEach((function(e){e.render(o._context,w),w.y+=e.height}))},u$3.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;var e=this._scrubElement;if(e$2b(this._scrubElement)){var t=a$15.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==i&&(this._lastXPos=i,e.style.left=i-8+"px",this._needleEle.style.left=i+"px")}e$2b(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(a$15.addSeconds(this._startJulian,this._timelineDrag,new a$15),a$15.addSeconds(this._endJulian,this._timelineDrag,new a$15)))},u$3.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=a$15.addSeconds(this._startJulian,t,new a$15),this._scrubElement){var i=e-8;this._scrubElement.style.left=i.toString()+"px",this._needleEle.style.left=e.toString()+"px"}var n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)},u$3.prototype.resize=function(){var e=this.container.clientWidth,t=this.container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){this._trackContainer.style.height=t+"px";var i=1;this._trackList.forEach((function(e){i+=e.height})),this._trackListEle.style.height=i.toString()+"px",this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=i,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t}},Object.defineProperties(u$2.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},scenePromise:{get:function(){if(e$2b(this._options)&&e$2b(this._options.contextOptions)&&e$2b(this._options.contextOptions.contextType)&&this._options.contextOptions.contextType==De$h.WebGPU){var e=this;return _0x58fcf.CreateAsync(this._canvas,{doNotHandleContextLost:!0,deviceDescriptor:{requiredFeatures:["depth-clamping","depth32float-stencil8","depth24unorm-stencil8","texture-compression-bc","timestamp-query"]}}).then((function(t){return e._options.engine=t,t.compatibilityMode=!1,e._initScene(),console.log("SuperMap - WebGPU Engine"),e._scene})).catch((function(e){console.log("Can not create WebGPU Device and/or context.")}))}return Promise.resolve(this._scene)}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){if(e<=0)throw new t$16("targetFrameRate must be greater than 0, or undefined.");this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&U(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){if(e<=0)throw new t$16("resolutionScale must be greater than 0.");this._resolutionScale=e,this._forceResize=!0}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}},setErrorPanelIsShow:{get:function(){return this._isShowErrorPanel},set:function(e){this._isShowErrorPanel!==e&&(this._isShowErrorPanel=e)}},errorListenerEvent:{get:function(){return this._errorListenerEvent}}}),u$2.prototype._initScene=function(){var e=this._options;try{var t=new w$3({canvas:this._canvas,contextOptions:e.contextOptions,engine:e.engine,creditContainer:this._innerCreditContainer,creditViewport:this._creditViewport,mapProjection:e.mapProjection,orderIndependentTranslucency:e.orderIndependentTranslucency,scene3DOnly:u$_(e.scene3DOnly,!1),terrainExaggeration:e.terrainExaggeration,shadows:e.shadows,mapMode2D:e.mapMode2D,requestRenderMode:e.requestRenderMode,maximumRenderTimeChange:e.maximumRenderTimeChange,pcss:e.pcss,shadowQuality:u$_(e.shadowQuality,0)});t.pixelRatio=this._pixelRatio,this._scene=t,t.camera.constrainedAxis=o$1p.UNIT_Z,L$1(this);var i=u$_(t.mapProjection.ellipsoid,t$13.WGS84),n=e.globe;e$2b(n)||(n=new h$d(i)),!1!==n&&(t.globe=n,t.globe.shadows=u$_(e.terrainShadows,W$W.RECEIVE_ONLY));var r=e.skyBox;e$2b(r)||(r=new h$5({sources:{positiveX:f("px"),negativeX:f("mx"),positiveY:f("py"),negativeY:f("my"),positiveZ:f("pz"),negativeZ:f("mz")}})),!1!==r&&(t.skyBox=r,t.sun=new u$5,t.moon=new n$9);var o=e.cloudBox;e$2b(o)&&(t.cloudBox=o);var a=e.skyAtmosphere;e$2b(a)||(a=new h$6(i)),!1!==a&&(t.skyAtmosphere=a);var s=!1!==e.globe&&e.imageryProvider;e$2b(s)||(s=new u$f({url:n$15("Assets/Textures/GlobalBkLayer.jpg")})),!1!==s&&t.imageryLayers.addImageryProvider(s),e$2b(e.terrainProvider)&&!1!==e.globe&&(t.terrainProvider=e.terrainProvider,e.terrainProvider.readyPromise.otherwise((function(){t.terrainProvider=t.globe._defaultTerrainProvider}))),e$2b(e.gridProvider)&&t.imageryLayers.addGridProvider(e.gridProvider),this._screenSpaceEventHandler=new g$J(this._canvas,!1),e$2b(e.sceneMode)&&(e.sceneMode===C$13.SCENE2D&&this._scene.morphTo2D(0),e.sceneMode===C$13.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=u$_(e.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=e.targetFrameRate;var l=this;t.renderError.addEventListener((function(e,t){if(l._useDefaultRenderLoop=!1,l._renderLoopRunning=!1,l._showRenderLoopErrors){l.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,t)}}))}catch(e){if(this._showRenderLoopErrors){this.showErrorPanel("Error constructing Widget.","verify your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:",e)}throw e}},u$2.prototype.showErrorPanel=function(e,t,i){var n=this._element,r=document.createElement("div");r.className="supermap3d-widget-errorPanel",!1===this.setErrorPanelIsShow?r.style.display="none":r.style.display="block";var o=document.createElement("div");o.className="supermap3d-widget-errorPanel-content",r.appendChild(o);var a=document.createElement("div");a.className="cessupermap3dium-widget-errorPanel-header",a.appendChild(document.createTextNode(e)),o.appendChild(a);var s=document.createElement("div");function l(){s.style.maxHeight=Math.max(Math.round(.9*n.clientHeight-100),30)+"px"}if(s.className="supermap3d-widget-errorPanel-scroll",o.appendChild(s),l(),e$2b(window.addEventListener)&&window.addEventListener("resize",l,!1),e$2b(t)){var u=document.createElement("div");u.className="supermap3d-widget-errorPanel-message",u.innerHTML="<p>"+t+"</p>",s.appendChild(u)}var c="(no error details available)";e$2b(i)&&(c=f$R(i));var h=document.createElement("div");h.className="supermap3d-widget-errorPanel-message",h.appendChild(document.createTextNode(c)),s.appendChild(h);var d=document.createElement("div");d.className="supermap3d-widget-errorPanel-buttonPanel",o.appendChild(d);var f=document.createElement("button");f.setAttribute("type","button"),f.className="supermap3d-button",f.appendChild(document.createTextNode("OK")),f.onclick=function(){e$2b(l)&&e$2b(window.removeEventListener)&&window.removeEventListener("resize",l,!1),n.removeChild(r)},d.appendChild(f),n.appendChild(r),typeof console<"u"&&console.error(e+"\n"+t+"\n"+c)},u$2.prototype.isDestroyed=function(){return!1},u$2.prototype.destroy=function(){this._scene=this._scene&&this._scene.destroy(),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),i$10(this)},u$2.prototype.resize=function(){var e=this._canvas,t=e.clientWidth,i=e.clientHeight;!this._forceResize&&this._canvasClientWidth===t&&this._canvasClientHeight===i&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,x(this),L$1(this),this._scene.requestRender())},u$2.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();var e=this._clock.tick();this._scene.render(e)}else this._clock.tick()},Object.defineProperties(a.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){if(!(e instanceof Element))throw new t$16("value must be a valid Element.");this._vrElement=e}},command:{get:function(){return this._command}}}),a.prototype.isDestroyed=function(){return!1},a.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(l$1f.changeEventName,this._callback),i$10(this)};var p="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",h$1="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function r$1(e,t,i){if(!e$2b(e))throw new t$16("container is required.");if(!e$2b(t))throw new t$16("scene is required.");e=i$c(e);var n=new a(t,i);n._exitVRPath=h$1,n._enterVRPath=p;var r=document.createElement("button");r.type="button",r.className="supermap3d-button supermap3d-vrButton",r.setAttribute("data-bind",'css: { "supermap3d-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(r),ce$1.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}Object.defineProperties(r$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),r$1.prototype.isDestroyed=function(){return!1},r$1.prototype.destroy=function(){return this._viewModel.destroy(),ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$10(this)},new o$1o;var l$1="-1000px";function r(e,t,i){if(!e$2b(e))throw new t$16("scene is required.");if(!e$2b(t))throw new t$16("zoomIndicatorElement is required.");if(!e$2b(i))throw new t$16("container is required.");this._scene=e,this._screenPositionX=l$1,this._screenPositionY=l$1,this._tweens=e.tweens,this._container=u$_(i,document.body),this._zoomIndicatorElement=t,this._scale=1,this._opacity=1,this.position=void 0,this.showSelection=!1,ce$1.track(this,["position","_screenPositionX","_screenPositionY","_opacity","showSelection"]),this.isVisible=void 0,ce$1.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&e$2b(this.position)}}),ce$1.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return s$Q.wgs84ToWindowCoordinates(e,t,i)}}function o(e,t){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e),this._container=e;var i=document.createElement("div");i.className="supermap3d-zoom-wrapper",i.setAttribute("data-bind",' style: { "top" : _screenPositionY, "left" : _screenPositionX,"opacity" : _opacity }, css: { "supermap3d-zoom-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var n=document.createElement("img");n.src=n$15("Widgets/Images/ZoomIndicator/zoom_Identifiers.png"),n.style.width="48px",n.style.height="48px",i.appendChild(n);var o=new r(t,this._element,this._container);this._viewModel=o,ce$1.applyBindings(this._viewModel,this._element)}r.prototype.update=function(){var e=this.scene._screenSpaceCameraController;if(e.zoomActive){e.zoomActive=!1;var t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,r=o$1o.clone(e._zoomMouseStart);r.x=Math.min(Math.max(r.x,-48),i+48)-24,r.y=Math.min(Math.max(r.y,-48),n+48)-24,this._screenPositionX=Math.floor(r.x+.25)+"px",this._screenPositionY=Math.floor(r.y+.25)+"px",this._opacity=1,this.showSelection=!0,this.animateDepart()}},r.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:m$W.EXPONENTIAL_OUT})},r.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_opacity",startValue:this._opacity,stopValue:0,duration:1,easingFunction:m$W.EXPONENTIAL_OUT})},Object.defineProperties(r.prototype,{container:{get:function(){return this._container}},zoomIndicatorElement:{get:function(){return this._zoomIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(o.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),o.prototype.isDestroyed=function(){return!1},o.prototype.destroy=function(){var e=this._container;return ce$1.cleanNode(this._element),e.removeChild(this._element),i$10(this)};var P=new i$1c;function xe(e){var t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function Le(e,t){if(e$2b(e.scene._frameState)&&e$2b(e.scene._frameState.pickIDColor)&&(e.scene._frameState.pickIDColor=new e$1U(1,1,1,1)),e$2b(e._activeBillboard)){if(e$2b(e._activeBillboard.billboard._billboardsBySymbol))for(var i=e._activeBillboard.billboard._billboardsBySymbol.length,n=0;n<i;n++)e._activeBillboard.billboard._billboardsBySymbol[n].color=e._activeBillboard.originalColor;e._activeBillboard=void 0}return e.scene.pickAsync(t.position).then((i=>{if(i){var n=u$_(i.id,i.primitive.id);if(n instanceof h$V)return Promise.resolve(n);if(e$2b(i.primitive)){if(e.scene.layers._layerQueue.length>0&&wt(e,t.position),e$2b(i.collection)&&i.collection._isMVT){if(e$2b(i.primitive)&&i.primitive instanceof n$I&&e$2b(i.primitive._billboardsBySymbol))for(var r=0;r<i.primitive._billboardsBySymbol.length;r++)e._activeBillboard={billboard:i.primitive,originalColor:e$1U.clone(i.primitive._billboardsBySymbol[r].color)},i.primitive._billboardsBySymbol[r].color=e$1U.CYAN;var o={pickResult:{featureID:i.primitive._id,layerID:i.primitive._mvtLayerID,mapName:i.primitive._mapName,position:i.primitive._position,primitive:i.primitive,properties:i.primitive._mvtProperties}};return Promise.resolve(o)}for(var a=e.scene._vectorTileSource.values.length-1;a>=0;a--){var s=e.scene._vectorTileSource.values[a];s._MVTStyle.cancelHighLight(s)}return Promise.resolve(i)}}return e$2b(e.scene.globe)?Promise.resolve(Ae(e.scene,t.position)):Promise.resolve(!1)}))}function Ve(e,t,i){if(e$2b(i)){var n=i.clock;e$2b(n)&&(n.getValue(t),e$2b(e)&&(e.updateFromClock(),e.zoomTo(n.startTime,n.stopTime)))}}var Re=new o$1p;function Ae(e,t){var i=null,n=e._frameState;return e.pickPositionAsync(t).then((t=>{if(!e$2b(t))return Promise.resolve(null);for(var r=a$18.fromCartesian(t),o=e._vectorTileSource.values.length-1;o>=0;o--){var a=e._vectorTileSource.values[o];if((!e$2b(a._selectEnabled)||a._selectEnabled)&&e$2b(i=a.pick(r,n)))return i.mapName=a._owner._name,Promise.resolve(new h$V({id:i.featureID,layerID:i.layerID,pickResult:i}))}return Promise.resolve(null)}))}function wt(e,t){var i=e.scene,n=i.layers.pickFeatures(t,i);if(!e$2b(n))return!1;var r=new h$V({id:"Loading...",description:"Loading feature information..."});o$1l(n,(function(i){if(e$2b(i)){var n=i.fieldNames,r=i.fieldValues;if(e$2b(n)&&e$2b(r)){for(var o={},a=0,s=n.length;a<s;a++)o[n[a]]=r[a];var l=new h$V({feature:o});if(e.scene.pickPositionAsync(t).then((e=>{l.scenePos=e})),e$2b(o.position)){var u=e.scene.globe.ellipsoid.cartographicToCartesian(o.position,Re);l.position=new r$U(u)}e$2b(i.geometry)&&(o.geometry=i.geometry),e.selectedEntity=l,e.pickEvent.raiseEvent(o)}else e.selectedEntity=void 0}else e.selectedEntity=void 0}),(function(){e.selectedEntity===r&&(e.selectedEntity=void 0)}))}function Bt(e,t){var i=e._geocoder,n=e._homeButton,r=e._sceneModePicker,o=e._projectionPicker,a=e._baseLayerPicker,s=e._animation,l=e._timeline,u=e._fullscreenButton,c=e._infoBox,h=e._selectionIndicator,d=t?"hidden":"visible";if(e$2b(i)&&(i.container.style.visibility=d),e$2b(n)&&(n.container.style.visibility=d),e$2b(r)&&(r.container.style.visibility=d),e$2b(o)&&(o.container.style.visibility=d),e$2b(a)&&(a.container.style.visibility=d),e$2b(s)&&(s.container.style.visibility=d),e$2b(l)&&(l.container.style.visibility=d),e$2b(u)&&u.viewModel.isFullscreenEnabled&&(u.container.style.visibility=d),e$2b(c)&&(c.container.style.visibility=d),e$2b(h)&&(h.container.style.visibility=d),e._container){var f=t||!e$2b(u)?0:u.container.clientWidth;e._vrButton.container.style.right=f+"px",e.forceResize()}}function u(e,t){if(!e$2b(e))throw new t$16("container is required.");e=i$c(e),this._container=e;var i=(!e$2b((t=u$_(t,u$_.EMPTY_OBJECT)).globe)||!1!==t.globe)&&e$2b(t.baseLayerPicker)&&!1!==t.baseLayerPicker;if(!i&&e$2b(t.selectedImageryProviderViewModel))throw new t$16("options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.imageryProvider instead or set options.baseLayerPicker to true.");if(!i&&e$2b(t.selectedTerrainProviderViewModel))throw new t$16("options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.terrainProvider instead or set options.baseLayerPicker to true.");var n=document.createElement("div");n.className="supermap3d-viewer",e.appendChild(n);var r=document.createElement("div");r.className="supermap3d-viewer-WidgetContainer",n.appendChild(r);var o=document.createElement("div");o.className="supermap3d-viewer-bottom",n.appendChild(o),this._bottomContainer=o,this._viewerContainer=n;var a,s=u$_(t.scene3DOnly,!1);e$2b(t.clockViewModel)?a=t.clockViewModel.clock:new r$a(a=new u$I),a.shouldAnimate=u$_(t.shouldAnimate,!0),this._clock=a;var l=new u$2(r,{terrainProvider:t.terrainProvider,imageryProvider:!i&&!e$2b(t.imageryProvider)&&void 0,gridProvider:t.gridProvider,clock:a,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:e$2b(t.creditContainer)?t.creditContainer:o,creditViewport:t.creditViewport,scene3DOnly:s,terrainExaggeration:t.terrainExaggeration,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,cloudBox:t.cloudBox,pcss:t.pcss,shadowQuality:t.shadowQuality});this._Widget=l,this._options=t,(!e$2b(t.contextOptions)||!e$2b(t.contextOptions.contextType)||t.contextOptions.contextType!=De$h.WebGPU)&&this._initScene(t)}Object.defineProperties(u.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},Widget:{get:function(){return this._Widget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},navigation:{get:function(){return this._navigation}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._Widget.canvas}},cesiumLogo:{get:function(){return this._Widget.cesiumLogo}},scene:{get:function(){return this._Widget.scene}},scenePromise:{get:function(){var e=this;return this._Widget.scenePromise.then((t=>(e$2b(e._options)&&e$2b(e._options.contextOptions)&&e$2b(e._options.contextOptions.contextType)&&e._options.contextOptions.contextType==De$h.WebGPU&&e._initScene(e._options),Promise.resolve(t))))}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainLayers:{get:function(){return this.scene.terrainLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e;var t=this;e.readyPromise.otherwise((function(){t.scene.terrainProvider=t.scene.globe._defaultTerrainProvider}))}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._Widget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._Widget.targetFrameRate},set:function(e){this._Widget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._Widget.useDefaultRenderLoop},set:function(e){this._Widget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._Widget.resolutionScale},set:function(e){this._Widget.resolutionScale=e,this._forceResize=!0}},useBrowserRecommendedResolution:{get:function(){return this._Widget.useBrowserRecommendedResolution},set:function(e){this._Widget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,de(this);var t=this.scene,i=t.mode;e$2b(e)&&e$2b(e.position)?this._needTrackedEntityUpdate=!0:(this._needTrackedEntityUpdate=!1,(i===C$13.COLUMBUS_VIEW||i===C$13.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(i===C$13.COLUMBUS_VIEW||i===C$13.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(p$1d.IDENTITY)),this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;var t=e$2b(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;e$2b(e)?e$2b(t)&&t.animateAppear():e$2b(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,Ve(this._timeline,this.clock,e))}}}),u.prototype._initScene=function(e){var i=this,n=this._Widget.scene,r=e.dataSources,a=!1;e$2b(r)||(r=new i$t,a=!0);var s,l=new u$p({scene:n,dataSourceCollection:r}),c=this._clock,h=!1;e$2b(e.clockViewModel)?s=e.clockViewModel:(s=new r$a(c),h=!0);var d=new n$x;d.add(c.onTick,u.prototype._onTick,this),d.add(n.morphStart,u.prototype._clearTrackedObject,this);var f,p,_=this._viewerContainer;if(!e$2b(e.selectionIndicator)||!1!==e.selectionIndicator){var m=document.createElement("div");m.className="supermap3d-viewer-selectionIndicatorContainer",_.appendChild(m),f=new i$1(m,n)}if(!e$2b(e.infoBox)||!1!==e.infoBox){var g=document.createElement("div");g.className="supermap3d-viewer-infoBoxContainer",_.appendChild(g);var x=(p=new l$4(g)).viewModel;d.add(x.cameraClicked,u.prototype._onInfoBoxCameraClicked,this),d.add(x.closeClicked,u.prototype._onInfoBoxClockClicked,this)}var v,y,$=document.createElement("div");if($.className="supermap3d-viewer-toolbar",_.appendChild($),e$2b(e.geocoder)&&!1!==e.geocoder){var b,T=document.createElement("div");T.className="supermap3d-viewer-geocoderContainer",$.appendChild(T),e$2b(e.geocoder)&&"boolean"!=typeof e.geocoder&&(b=Array.isArray(e.geocoder)?e.geocoder:[e.geocoder]),v=new s$3({container:T,geocoderServices:b,scene:n,viewer:this}),d.add(v.viewModel.search.beforeExecute,u.prototype._clearObjects,this)}if(e$2b(e.homeButton)&&!1!==e.homeButton&&(y=new o$3($,n),e$2b(v)&&d.add(y.viewModel.command.afterExecute,(function(){var e=v.viewModel;e.searchText="",e.isSearchInProgress&&e.search()})),d.add(y.viewModel.command.beforeExecute,u.prototype._clearTrackedObject,this)),!0===e.sceneModePicker&&w)throw new t$16("options.sceneModePicker is not available when options.scene3DOnly is set to true.");var C,S,w=u$_(e.scene3DOnly,!1);!w&&e$2b(e.sceneModePicker)&&!1!==e.sceneModePicker&&(C=new c$2($,n)),e.projectionPicker&&(S=new n$1($,n));var E,P,A,L,M,R,O,I,D,B,N,F,U=(!e$2b(e.globe)||!1!==e.globe)&&e$2b(e.baseLayerPicker)&&!1!==e.baseLayerPicker;if(U){var G=u$_(e.imageryProviderViewModels,m$4()),z=u$_(e.terrainProviderViewModels,n$3());E=new g$3($,{globe:n.globe,imageryProviderViewModels:G,selectedImageryProviderViewModel:e.selectedImageryProviderViewModel,terrainProviderViewModels:z,selectedTerrainProviderViewModel:e.selectedTerrainProviderViewModel}),P=$.getElementsByClassName("supermap3d-baseLayerPicker-dropDown")[0]}if(e$2b(e.imageryProvider)&&!1!==e.imageryProvider&&(U&&(E.viewModel.selectedImagery=void 0),n.imageryLayers.removeAll(),n.imageryLayers.addImageryProvider(e.imageryProvider)),e$2b(e.terrainProvider)&&(U&&(E.viewModel.selectedTerrain=void 0),n.terrainProvider=e.terrainProvider),e$2b(e.navigationHelpButton)&&!1!==e.navigationHelpButton){var V=!0;try{if(e$2b(window.localStorage)){var k=window.localStorage.getItem("supermap3d-hasSeenNavHelp");e$2b(k)&&Boolean(k)?V=!1:window.localStorage.setItem("supermap3d-hasSeenNavHelp","true")}}catch{}A=new l$3({container:$,instructionsInitiallyVisible:u$_(e.navigationInstructionsInitiallyVisible,V)})}if(e$2b(e.animation)&&!1!==e.animation){var W=document.createElement("div");W.className="supermap3d-viewer-animationContainer",_.appendChild(W),L=new y$4(W,new m$5(s))}if(e$2b(e.timeline)&&!1!==e.timeline){var H=document.createElement("div");H.className="supermap3d-viewer-timelineContainer",_.appendChild(H),(M=new u$3(H,c)).addEventListener("settime",xe,!1);var q=a$15.clone(c.startTime);q.secondsOfDay=14400;var j=a$15.clone(c.stopTime);j.secondsOfDay=14400,M.zoomTo(q,j)}if(e$2b(e.fullscreenButton)&&!1!==e.fullscreenButton&&((I=document.createElement("div")).className="supermap3d-viewer-fullscreenContainer",_.appendChild(I),O=c$5((R=new r$5(I,e.fullscreenElement)).viewModel,"isFullscreenEnabled",(function(e){I.style.display=e?"block":"none",e$2b(M)&&(M.container.style.right=I.clientWidth+"px",M.resize())}))),e.vrButton){var Y=document.createElement("div");Y.className="supermap3d-viewer-vrContainer",_.appendChild(Y),B=c$5((D=new r$1(Y,n,e.fullScreenElement)).viewModel,"isVREnabled",(function(e){Y.style.display=e?"block":"none",e$2b(R)&&(Y.style.right=I.clientWidth+"px"),e$2b(M)&&(M.container.style.right=Y.clientWidth+"px",M.resize())})),N=c$5(D.viewModel,"isVRMode",(function(e){Bt(i,e)}))}if(!e$2b(e.navigation)||!1!==e.navigation){var X=document.createElement("div");X.className="supermap3d-viewer-navigationContainer",_.appendChild(X),F=new t({container:X,scene:n,viewer:this})}this._scratchHoldUrl="url("+n$15("Widgets/Images/cur/Hold.cur")+"), auto",this._scratchPanUrl="url("+n$15("Widgets/Images/cur/Pan.cur")+"), auto",this._activeBillboard=void 0,this._baseLayerPickerDropDown=P,this._fullscreenSubscription=O,this._vrSubscription=B,this._vrModeSubscription=N,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=u$_(e.automaticallyTrackDataSourceClocks,!0),this._element=_,this._selectionIndicator=f,this._infoBox=p,this._dataSourceCollection=r,this._destroyDataSourceCollection=a,this._dataSourceDisplay=l,this._clockViewModel=s,this._destroyClockViewModel=h,this._toolbar=$,this._homeButton=y,this._sceneModePicker=C,this._projectionPicker=S,this._baseLayerPicker=E,this._navigationHelpButton=A,this._animation=L,this._timeline=M,this._fullscreenButton=R,this._vrButton=D,this._geocoder=v,this._navigation=F,this._eventHelper=d,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=e$2b(p)||e$2b(f),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._clockTrackedDataSource=void 0,this._forceResize=!1,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new o$1h,this._trackedEntityChanged=new o$1h,this._capturePointSize=16,this._capturePointColor=e$1U.fromCssColorString("#0173c7"),ce$1.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),d.add(r.dataSourceAdded,u.prototype._onDataSourceAdded,this),d.add(r.dataSourceRemoved,u.prototype._onDataSourceRemoved,this),d.add(n.postUpdate,u.prototype.resize,this),d.add(n.postRender,u.prototype._postRender,this);for(var K=r.length,Q=0;Q<K;Q++)this._dataSourceAdded(r,r.get(Q));this._dataSourceAdded(void 0,l.defaultDataSource),d.add(r.dataSourceAdded,u.prototype._dataSourceAdded,this),d.add(r.dataSourceRemoved,u.prototype._dataSourceRemoved,this);var Z=this._Widget;Z.screenSpaceEventHandler.setInputAction((function(e){Le(i,e).then((e=>{i.selectedEntity=e}))}),G$I.LEFT_CLICK),Z.screenSpaceEventHandler.setInputAction((function(e){Le(i,e).then((e=>{var t=e;e$2b(t)?r$Z.getValueOrUndefined(t.position,i.clock.currentTime)?i.trackedEntity=t:i.zoomTo(t):e$2b(i.trackedEntity)&&(i.trackedEntity=void 0)}))}),G$I.LEFT_DOUBLE_CLICK),this.pickEvent=new o$1h;var J=document.createElement("div");J.className="supermap3d-viewer-zoomIndicatorContainer",_.appendChild(J),this._zoomIndicator=new o(J,Z.scene);var ee=this._zoomIndicator._viewModel;ee._screenPositionX="100px",ee._screenPositionY="100px",ee.position="absolute",ee.showSelection=!1},u.prototype.extend=function(e,t){if(!e$2b(e))throw new t$16("mixin is required.");e(this,t)},u.prototype.resize=function(){var e=this._Widget,t=this._container,i=t.clientWidth,n=t.clientHeight,r=e$2b(this._animation),o=e$2b(this._timeline);if(this._forceResize||i!==this._lastWidth||n!==this._lastHeight){e.resize(),this.scene.context.resize(),this._forceResize=!1;var a=n-125,s=this._baseLayerPickerDropDown;e$2b(s)&&(s.style.maxHeight=a+"px"),e$2b(this._infoBox)&&(this._infoBox.viewModel.maxHeight=a);var l,u=this._timeline,c=0,h=0,d=0;if(r&&"hidden"!==window.getComputedStyle(this._animation.container).visibility){var f=this._lastWidth;l=this._animation.container,i>900?(c=169,f<=900&&(l.style.width="169px",l.style.height="112px",this._animation.resize())):i>=600?(c=136,(f<600||f>900)&&(l.style.width="136px",l.style.height="90px",this._animation.resize())):(c=106,(f>600||0===f)&&(l.style.width="106px",l.style.height="70px",this._animation.resize())),h=c+5}if(o&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility){var p=this._fullscreenButton,_=this._vrButton,m=u.container,g=m.style;d=m.clientHeight+3,g.left=c+"px";var x=0;e$2b(p)&&(x+=p.container.clientWidth),e$2b(_)&&(x+=_.container.clientWidth),g.right=x+"px",u.resize()}this._bottomContainer.style.left=h+"px",this._bottomContainer.style.bottom=d+"px",this._lastWidth=i,this._lastHeight=n}},u.prototype.forceResize=function(){this._lastWidth=0,this.resize()},u.prototype.render=function(){this._Widget.render()},u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){var e;this.screenSpaceEventHandler.removeInputAction(G$I.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(G$I.LEFT_DOUBLE_CLICK);var t=this.dataSources,i=t.length;for(e=0;e<i;e++)this._dataSourceRemoved(t,t.get(e));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),e$2b(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),e$2b(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),e$2b(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),e$2b(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),e$2b(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),e$2b(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),e$2b(this._timeline)&&(this._timeline.removeEventListener("settime",xe,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),e$2b(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),e$2b(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),e$2b(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),e$2b(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._Widget=this._Widget.destroy(),this._destroyDataSourceCollection&&!this._dataSourceCollection.isDestroyed()&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),i$10(this)},u.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(u.prototype._onEntityCollectionChanged,this)},u.prototype._dataSourceRemoved=function(e,t){var i=t.entities;i.collectionChanged.removeEventListener(u.prototype._onEntityCollectionChanged,this),e$2b(this.trackedEntity)&&i.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),e$2b(this.selectedEntity)&&i.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};var Q=!1,W,ze=0;function We(e,t,i,n){if(!e$2b(t))throw new t$16("zoomTarget is required.");de(e);var r=o$1l.defer();return e._zoomPromise=r,e._zoomIsFlight=n,e._zoomOptions=i,o$1l(t,(function(t){if(e._zoomPromise===r){if(t instanceof h$Q)return void t.getViewableRectangle().then((function(t){return a$d(t,e.scene)})).then((function(t){e._zoomPromise===r&&(e._zoomTarget=t)}));if(t instanceof p$u)return void(e._zoomTarget=t);if(t instanceof g$6)return void(e._zoomTarget=t);if(t.isLoading&&e$2b(t.loadingEvent)){var i=t.loadingEvent.addEventListener((function(){i(),e._zoomPromise===r&&(e._zoomTarget=t.entities.values.slice(0))}));return}if(Array.isArray(t))return void(e._zoomTarget=t.slice(0));if(t instanceof _0x22e933)return void(e._zoomTarget=t.layerBounds);if(t instanceof p$b)return void t.getViewableRectangle().then((function(t){return a$d(t,e.scene)})).then((function(t){e._zoomPromise===r&&(e._zoomTarget=t)}));e$2b((t=u$_(t.values,t)).entities)&&(t=t.entities.values),Array.isArray(t)?e._zoomTarget=t.slice(0):e._zoomTarget=[t]}})),e.scene.requestRender(),r.promise}function D(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function de(e){var t=e._zoomPromise;e$2b(t)&&(D(e),t.resolve(!1))}function It(e){var t=e._zoomTarget;if(e$2b(t)&&e.scene.mode!==C$13.MORPHING){var i=e.scene,n=i.camera,r=e._zoomPromise,o=u$_(e._zoomOptions,{});if(t instanceof p$u)return t.readyPromise.then((function(){var i=t.boundingSphere;e$2b(o.offset)||(o.offset=new a$T(0,-.5,i.radius)),s={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(t.boundingSphere,s):(n.viewBoundingSphere(i,o.offset),n.lookAtTransform(p$1d.IDENTITY),r.resolve(!0)),D(e)}));if(t instanceof g$6)return t.readyPromise.then((function(){var i=t.boundingSphere;e$2b(o.offset)||(o.offset=new a$T(0,-.5,i.radius)),s={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(i,s):(n.viewBoundingSphere(i,o.offset),n.lookAtTransform(p$1d.IDENTITY),r.resolve(!0)),D(e)}));if(t instanceof a$18)return s={destination:i.mapProjection.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyTo(s):(n.setView(s),r.resolve(!0)),void D(e);var a=t;if(a instanceof h$18){var s={offset:o.offset,destination:a,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}};if(e._zoomIsFlight){var l=i$1c.fromRectangle3D(t);n.flyToBoundingSphere(l,s)}else n.setView(s),r.resolve(!0);return void D(e)}for(var u=[],c=0,h=a.length;c<h;c++){var d=e._dataSourceDisplay.getBoundingSphere(a[c],!1,P);if(d===R$w.PENDING)return;d!==R$w.FAILED&&u.push(i$1c.clone(P))}if(0===u.length)return void de(e);e.trackedEntity=void 0,l=i$1c.fromBoundingSpheres(u),e._zoomIsFlight?(D(e),n.flyToBoundingSphere(l,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)},offset:o.offset})):(n.viewBoundingSphere(l,o.offset),n.lookAtTransform(p$1d.IDENTITY),D(e),r.resolve(!0))}}function Tt(e){if(e._needTrackedEntityUpdate){var t=e._trackedEntity,i=e.clock.currentTime;if(e$2b(r$Z.getValueOrUndefined(t.position,i))){var n=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,P);if(r!==R$w.PENDING){var o=n.mode;(o===C$13.COLUMBUS_VIEW||o===C$13.SCENE2D)&&(n.screenSpaceCameraController.enableTranslate=!1),(o===C$13.COLUMBUS_VIEW||o===C$13.SCENE3D)&&(n.screenSpaceCameraController.enableTilt=!1);var a=r!==R$w.FAILED?P:void 0;e._entityView=new V$i(t,n,n.mapProjection.ellipsoid),e._entityView.update(i,a),e._needTrackedEntityUpdate=!1}}}}function s(e){o$1q.typeOf.object("viewer",e);var t=document.createElement("div");t.className="supermap3d-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);var i=new y$1(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return i}}})}function c(e){if(!e$2b(e))throw new t$16("viewer is required.");var t=document.createElement("div");t.className="supermap3d-viewer-cesiumInspectorContainer",e.container.appendChild(t);var i=new g$1(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return i}}})}function $$1(e,t){if(!e$2b(e))throw new t$16("viewer is required.");if(e.hasOwnProperty("dropTarget"))throw new t$16("dropTarget is already defined by another mixin.");if(e.hasOwnProperty("dropEnabled"))throw new t$16("dropEnabled is already defined by another mixin.");if(e.hasOwnProperty("dropError"))throw new t$16("dropError is already defined by another mixin.");if(e.hasOwnProperty("clearOnDrop"))throw new t$16("clearOnDrop is already defined by another mixin.");if(e.hasOwnProperty("flyToOnDrop"))throw new t$16("flyToOnDrop is already defined by another mixin.");t=u$_(t,u$_.EMPTY_OBJECT);var i=!0,n=u$_(t.flyToOnDrop,!0),r=new o$1h,o=u$_(t.clearOnDrop,!0),a=u$_(t.dropTarget,e.container),s=u$_(t.clampToGround,!0),l=t.proxy;function u(t){d$1(t),o&&(e.entities.removeAll(),e.dataSources.removeAll());for(var i=t.dataTransfer.files,n=i.length,r=0;r<n;r++){var a=i[r],u=new FileReader;u.onload=j$1(e,a,l,s),u.onerror=k(e,a),u.readAsText(a)}}a=i$c(a),Object.defineProperties(e,{dropTarget:{get:function(){return a},set:function(e){if(!e$2b(e))throw new t$16("value is required.");O(a,u),h(a=e,u)}},dropEnabled:{get:function(){return i},set:function(e){e!==i&&(e?h(a,u):O(a,u),i=e)}},dropError:{get:function(){return r}},clearOnDrop:{get:function(){return o},set:function(e){o=e}},flyToOnDrop:{get:function(){return n},set:function(e){n=e}},proxy:{get:function(){return l},set:function(e){l=e}},clampToGround:{get:function(){return s},set:function(e){s=e}}}),h(a,u),e.destroy=e$O(e,e.destroy,(function(){e.dropEnabled=!1})),e._handleDrop=u}function d$1(e){e.stopPropagation(),e.preventDefault()}function O(e,t){var i=e;e$2b(i)&&(i.removeEventListener("drop",t,!1),i.removeEventListener("dragenter",d$1,!1),i.removeEventListener("dragover",d$1,!1),i.removeEventListener("dragexit",d$1,!1))}function h(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",d$1,!1),e.addEventListener("dragover",d$1,!1),e.addEventListener("dragexit",d$1,!1)}function j$1(e,t,i,n){var r=e.scene;return function(o){var a=t.name;try{var s;if(/\.czml$/i.test(a))s=E$v.load(JSON.parse(o.target.result),{sourceUri:a});else if(/\.geojson$/i.test(a)||/\.json$/i.test(a)||/\.topojson$/i.test(a))s=y$p.load(JSON.parse(o.target.result),{sourceUri:a,clampToGround:n});else{if(!/\.(kml|kmz)$/i.test(a))return void e.dropError.raiseEvent(e,a,"Unrecognized file: "+a);s=U$m.load(t,{sourceUri:a,proxy:i,camera:r.camera,canvas:r.canvas,clampToGround:n})}e$2b(s)&&e.dataSources.add(s).then((function(t){e.flyToOnDrop&&e.flyTo(t)})).otherwise((function(t){e.dropError.raiseEvent(e,a,t)}))}catch(t){e.dropError.raiseEvent(e,a,t)}}}function k(e,t){return function(i){e.dropError.raiseEvent(e,t.name,i.target.error)}}function m(e,t){if(!e$2b(e))throw new t$16("viewer is required.");t=u$_(t,u$_.EMPTY_OBJECT);var i=new i$3({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return i}}})}u.prototype._onTick=function(e){var t=e.currentTime,i=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=i);var n=this._entityView;if(e$2b(n)){var r=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(r,!1,P)===R$w.DONE&&n.update(t,P)}var o,a=!1,s=this.selectedEntity,l=e$2b(s)&&this._enableInfoOrSelection,u=this.customInfobox;if(e$2b(u))if(this._enableInfoOrSelection=!1,e$2b(s)&&e$2b(s.scenePos)){var c=this.scene.canvas.height,h=s.scenePos,d=new o$1o;s$Q.wgs84ToWindowCoordinates(this.scene,h,d),u.style.bottom=c-d.y+45+"px",u.style.left=d.x-70+"px",u.style.visibility="visible"}else u.style.visibility="hidden";(l=e$2b(s)&&this._enableInfoOrSelection)&&s.isShowing&&s.isAvailable(t)&&(this._dataSourceDisplay.getBoundingSphere(s,!0,P)!==R$w.FAILED?o=P.center:e$2b(s.position)&&(o=s.position.getValue(t,o)),a=e$2b(o));var f=e$2b(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;e$2b(f)&&(f.position=o$1p.clone(o,f.position),f.showSelection=l&&a,f.update());var p=e$2b(this._infoBox)?this._infoBox.viewModel:void 0;e$2b(p)&&(p.showInfo=l,p.enableCamera=a,p.isCameraTracking=this.trackedEntity===this.selectedEntity,l?(p.titleText=u$_(s.name,s.id),p.description=r$Z.getValueOrDefault(s.description,t,"")):(p.titleText="",p.description="")),this._zoomIndicator._viewModel.update();var _=this.scene._screenSpaceCameraController,m=_.tiltEventTypes,x=_._aggregator._isDown;(x[m[0]]&&3==this.scene.mode?(e$2b(this._tiltIndicator)?this._tiltIndicator.setModelMatrix(this.scene.frameState,_._tiltCenter):(this._tiltIndicator=new g(this,this.scene.context,n$15("Widgets/Images/compass.s3m"),_._tiltCenter),this.scene.primitives.add(this._tiltIndicator)),this._tiltIndicator._visible=!0):e$2b(this._tiltIndicator)&&(this._tiltIndicator._visible=!1),e$2b(this.enableCursorStyle)&&0==this.enableCursorStyle)||(""==this._element.style.cursor&&(this._element.style.cursor=this._scratchPanUrl),x[_.rotateEventTypes]?Q||(Q=!0,this._element.style.cursor=this._scratchHoldUrl):Q&&(Q=!1,this._element.style.cursor=this._scratchPanUrl));if(_._scene.pickPointEnabled){e$2b(this.pointCloudIndicator)||(this.pointCloudIndicator=this.entities.add({id:"pont-cloud-indicator",position:new n$V((function(){return _._scene.pickPoint}),!1),point:{pixelSize:this._capturePointSize,color:this._capturePointColor,disableDepthTestDistance:Number.POSITIVE_INFINITY}})),this.pointCloudIndicator.show=!0;var v=_._aggregator;e$2b(W)||(W=o$1o.clone(v.currentMousePosition));var y=Et$a();if(y-ze>_._scene.pickPointInterval){ze=y;var $=o$1o.clone(v.currentMousePosition),b=$.x-W.x,T=$.y-W.y,C=Math.sqrt(b*b+T*T);W=o$1o.clone(v.currentMousePosition),C>5&&_._scene.pointPick($)}}else e$2b(this.pointCloudIndicator)&&(this.pointCloudIndicator.show=!1)},u.prototype._onEntityCollectionChanged=function(e,t,i){for(var n=i.length,r=0;r<n;r++){var o=i[r];this.trackedEntity===o&&(this.trackedEntity=void 0),this.selectedEntity===o&&(this.selectedEntity=void 0)}},u.prototype._onInfoBoxCameraClicked=function(e){e.isCameraTracking&&this.trackedEntity===this.selectedEntity?this.trackedEntity=void 0:e$2b(this.selectedEntity.position)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)},u.prototype._clearTrackedObject=function(){this.trackedEntity=void 0},u.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0},u.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0},u.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Ve(this.timeline,this.clock,e)},u.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);var i=t.entities.id,n=this._eventHelper.add(t.changedEvent,u.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[i]=n},u.prototype._onDataSourceRemoved=function(e,t){var i=this.clockTrackedDataSource===t,n=t.entities.id;if(this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0,i){var r=e.length;this._automaticallyTrackDataSourceClocks&&r>0?this.clockTrackedDataSource=e.get(r-1):this.clockTrackedDataSource=void 0}},u.prototype.zoomTo=function(e,t){return We(this,e,{offset:t},!1)},u.prototype.flyTo=function(e,t){return We(this,e,t,!0)},u.prototype._postRender=function(){It(this),Tt(this)};const _0x146629=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x15cfa7=_0x146629(void 0,(function(){return _0x15cfa7.toString().search("(((.+)+)+)+$").toString().constructor(_0x15cfa7).search("(((.+)+)+)+$")}));_0x15cfa7();var _0x38b1eb,_0x5762f7=[],_0x1e9b87=.1,_0x476e95,_0xc80623,_0x6182f6="Selection_Cube";function _0x195cd9(e){this._scene=e,_0x38b1eb=new WebGLPlot.ScreenSpaceEventHandler(e.canvas)}function _0x1aa412(e,t){let i=[];if(e&&e.plotLayers){let t=e.plotLayers._layerQueue.length;for(let n=0;n<t;n++){let t=e.plotLayers._layerQueue[n];if(WebGLPlot.defined(t)&&t instanceof _0x267b40){let e=t._geoGraphicObjects.length;for(let n=0;n<e;n++){let e=t._geoGraphicObjects[n];_0x45cda7(e)&&i.push(e)}}}}"function"==typeof t&&t({geoArray:i})}function _0x45cda7(e){let t=_0x5762f7[0].x>_0x5762f7[1].x?_0x5762f7[0].x:_0x5762f7[1].x,i=_0x5762f7[0].y>_0x5762f7[1].y?_0x5762f7[0].y:_0x5762f7[1].y,n=_0x5762f7[0].z>_0x1e9b87?_0x5762f7[0].z:_0x1e9b87,r=_0x5762f7[0].x<_0x5762f7[1].x?_0x5762f7[0].x:_0x5762f7[1].x,o=_0x5762f7[0].y<_0x5762f7[1].y?_0x5762f7[0].y:_0x5762f7[1].y,a=_0x5762f7[0].z<_0x1e9b87?_0x5762f7[0].z:_0x1e9b87,s=e.localPoints.length;for(let l=0;l<s;l++){let s=e.localPoints[l];if(s.x>r&&s.x<t&&s.y>o&&s.y<i&&s.z>a&&s.z<n)return!0}return!1}function _0x257ae1(e,t){_0x38b1eb.setInputAction((function(i){var n=_0x2d6822.getPosition(e._scene,i.position);if(n){if(_0x5762f7.length>=3)return _0xc80623=i.position,_0x17be26(),_0x1aa412(e._scene,t),void e.deActivate();2===_0x5762f7.length&&(_0x5762f7[_0x5762f7.length-1]=n,_0x476e95=i.position),0===_0x5762f7.length&&_0x5762f7.push(n),_0x5762f7.push(n),_0x5762f7.length>=2&&_0x17be26()}}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x38b1eb.setInputAction((function(t){var i=_0x2d6822.getPosition(e._scene,t.endPosition);_0x5762f7.length>=2&&(_0x5762f7.pop(),_0x5762f7.push(i),_0x5762f7.length>=3&&(_0xc80623=t.endPosition),_0x17be26(e._scene))}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE)}function _0x17be26(e){if(!e||_0x5762f7.length<2||_0x5762f7[0].x===_0x5762f7[1].x&&_0x5762f7[0].y===_0x5762f7[1].y)return;var t=WebGLPlot.Cartesian3.fromDegrees(_0x5762f7[0].x,_0x5762f7[0].y,_0x5762f7[0].z),i=[t,WebGLPlot.Cartesian3.fromDegrees(_0x5762f7[1].x,_0x5762f7[0].y,_0x5762f7[0].z),WebGLPlot.Cartesian3.fromDegrees(_0x5762f7[1].x,_0x5762f7[1].y,_0x5762f7[0].z),WebGLPlot.Cartesian3.fromDegrees(_0x5762f7[0].x,_0x5762f7[1].y,_0x5762f7[0].z),t];if(_0x476e95&&_0xc80623){let t=e.camera;var n=t.getPickRay(_0x476e95),r=new WebGLPlot.Cartesian2(_0x476e95.x+1,_0x476e95.y),o=t.getPickRay(r),a=e.globe.pick(n,e),s=e.globe.pick(o,e);let i=WebGLPlot.Cartesian3.distance(a,s);_0x1e9b87=(_0x476e95.y-_0xc80623.y)*i}const l=new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(i),perPositionHeight:!0,closeTop:!0,closeBottom:!0,extrudedHeight:_0x1e9b87}),u=WebGLPlot.PolygonGeometry.createGeometry(l);var c=new WebGLPlot.GeometryInstance({geometry:u,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(new WebGLPlot.Color(1,0,0,.2))}});_0x38860f.setScaneInstances(_0x6182f6,[c],this._scene)}WebGLPlot.g_CubeHandler=null,_0x195cd9.getInstance=function(e){return WebGLPlot.defined(e)&&(!WebGLPlot.g_CubeHandler||WebGLPlot.g_CubeHandler._scene!==e)&&(WebGLPlot.g_CubeHandler=new _0x195cd9(e)),WebGLPlot.g_CubeHandler},_0x195cd9.prototype.activate=function(e){_0x5762f7=[],_0x257ae1(this,e)},_0x195cd9.prototype.deActivate=function(){_0x5762f7=[],_0x38b1eb&&(_0x38b1eb.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x38b1eb.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE)),_0x1e9b87=.1,_0x476e95=void 0,_0xc80623=void 0,_0x38860f.setScaneInstances(_0x6182f6,[],this._scene)};const _0x25b423=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2b88b9=_0x25b423(void 0,(function(){return _0x2b88b9.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b88b9).search("(((.+)+)+)+$")}));_0x2b88b9();let _0x34363d,_0x4c5536,_0x822650=!1,_0x4cccce,_0x30487c=[],_0x395f89;function _0x434208(e,t){this.dom=e,this.viewer=t,_0x4c5536=this,_0x4cccce=new WebGLPlot.ScreenSpaceEventHandler(e),_0x395f89=new _0x53a1a6(e),this.isDestroyed=!1,this.activeEvt=new WebGLPlot.Event,this.cancelEvt=new WebGLPlot.Event,this.movingEvt=new WebGLPlot.Event,this.drawEvt=new WebGLPlot.Event}function _0x53a1a6(e){this.rect=document.createElement("div"),this.rect.style.visibility="hidden",e.appendChild(this.rect),this.leftTopPoint=new WebGLPlot.Cartesian2,this.rightBottomPoint=new WebGLPlot.Cartesian2,_0x53a1a6.prototype.setPosition=function(e,t){let i,n,r,o,a=t.x-e.x,s=t.y-e.y;a<0?(i=t.x,r=-a):(i=e.x,r=a),s<0?(n=t.y,o=-s):(n=e.y,o=s),this.leftTopPoint=new WebGLPlot.Cartesian2(i,n),this.rightBottomPoint=new WebGLPlot.Cartesian2(i+r,n+o),this.rect.style="position:fixed;top:"+n+"px;left:"+i+"px;width:"+r+"px;height:"+o+"px;border:2px dashed #333;",this.setVisible(!0)},_0x53a1a6.prototype.setVisible=function(e){this.rect.style.visibility=e?"visible":"hidden"},_0x53a1a6.prototype.getRectPoint=function(){return{leftTopPoint:this.leftTopPoint,rightBottomPoint:this.rightBottomPoint}},_0x53a1a6.prototype.destroy=function(){e.removeChild(_0x395f89),this.rect=null}}function _0x165998(e,t){let i=t.screenSpaceCameraController;i.enableRotate=e,i.enableTranslate=e,i.enableZoom=e,i.enableTilt=e,i.enableLook=e}function _0x13971e(e,t,i){t?(i.enableCursorStyle=!1,i._element.style.cursor="",e.style.cursor="default"):i.enableCursorStyle=!0}function _0x3c696b(){_0x4cccce.setInputAction((function(e){_0x822650=!0,_0x34363d=new WebGLPlot.Cartesian2(e.position.x,e.position.y)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN);let e=function(e){_0x4c5536.cancelEvt.raiseEvent(),"Shift"===e.key&&_0x822650&&!_0x4c5536.isDestroyed&&(_0x822650=!1,_0x395f89.setVisible(!1))};document.addEventListener("keyup",e),_0x30487c.push((function(){document.removeEventListener("keyup",e)})),_0x4cccce.setInputAction((function(e){let t=e.endPosition;_0x4c5536.activeEvt.raiseEvent(t),_0x822650&&(_0x395f89.setPosition(_0x34363d,t),_0x395f89.setVisible(!0),_0x4c5536.movingEvt.raiseEvent(_0x395f89.getRectPoint()))}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),_0x4cccce.setInputAction((function(e){_0x822650=!1,_0x395f89.setVisible(!1),_0x4c5536.drawEvt.raiseEvent(_0x395f89.getRectPoint())}),WebGLPlot.ScreenSpaceEventType.LEFT_UP)}function _0x44e94d(){_0x4cccce.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x4cccce.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),_0x4cccce.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x4cccce.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP)}_0x434208.prototype.destroy=function(){if(!this.isDestroyed){_0x165998(!0,this.viewer.scene),_0x44e94d();for(let e=0,t=_0x30487c.length;e<t;e++)_0x30487c[e]();_0x4cccce.destroy(),_0x395f89.destroy(),_0x395f89=null,this.isDestroyed=!0}},_0x434208.prototype.activate=function(){this.isDestroyed||(_0x165998(!1,this.viewer.scene),_0x13971e(this.dom,!0,this.viewer),_0x3c696b())},_0x434208.prototype.deactivate=function(){this.isDestroyed||(_0x165998(!0,this.viewer.scene),_0x13971e(this.dom,!1,this.viewer),_0x44e94d())};var _0x4a5c55=(_0x2a4a06=!0,function(e,t){var i=_0x2a4a06?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a4a06=!1,i}),_0x14f8b0=_0x4a5c55(void 0,(function(){return _0x14f8b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x14f8b0).search("(((.+)+)+)+$")})),_0x2a4a06;_0x14f8b0();var _0x926223={GEOJSON:"GEOJSON",ISERVER:"ISERVER"};class NetworkAnalystServiceBase extends _0xd9c3dd{constructor(e,t){super(e,t),this.format=_0x926223.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t,i=this;(e=_0x57693f.transformResult(e))&&i.format===_0x926223.GEOJSON&&"function"==typeof i.toGeoJSONResult&&(t=i.toGeoJSONResult(e)),t||(t=e),i.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){return null}}function _0x4a6d61(){}_0x4a6d61.extend=function(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},_0x4a6d61.copy=function(e,t){var i;if(e=e||{},t)for(var n in e)typeof(i=t[n])<"u"&&(e[n]=i)},_0x4a6d61.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"===_typeof(e[t])&&e[t]instanceof Array){for(var i in e[t])e[t][i].destroy&&e[t][i].destroy();e[t].length=0}else"object"===_typeof(e[t])&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},_0x4a6d61.getElement=function(){for(var e=[],t=0,i=arguments.length;t<i;t++){var n=arguments[t];if("string"==typeof n&&(n=document.getElementById(n)),1===arguments.length)return n;e.push(n)}return e},_0x4a6d61.isElement=function(e){return!(!e||1!==e.nodeType)},_0x4a6d61.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},_0x4a6d61.removeItem=function(e,t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1);return e},_0x4a6d61.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},_0x4a6d61.modifyDOMElement=function(e,t,i,n,r,o,a,s){t&&(e.id=t),i&&(e.style.left=i.x+"px",e.style.top=i.y+"px"),n&&(e.style.width=n.w+"px",e.style.height=n.h+"px"),r&&(e.style.position=r),o&&(e.style.border=o),a&&(e.style.overflow=a),parseFloat(s)>=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},_0x4a6d61.applyDefaults=function(e,t){e=e||{};var i="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!i&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!i&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},_0x4a6d61.getParameterString=function(e){var t=[];for(var i in e){var n,r=e[i];if(null!=r&&"function"!=typeof r)n=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(i)+"="+n)}return t.join("&")},_0x4a6d61.urlAppend=function(e,t){var i=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i},_0x4a6d61.urlPathAppend=function(e,t){var i=e;if(!t)return i;0===t.indexOf("/")&&(t=t.substring(1));var n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),i="".concat(n[0]).concat(t).concat(n.length>1?"?".concat(n[1]):"")},_0x4a6d61.DEFAULT_PRECISION=14,_0x4a6d61.toFloat=function(e,t){return null==t&&(t=_0x4a6d61.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},_0x4a6d61.rad=function(e){return e*Math.PI/180},_0x4a6d61.getParameters=function(e){e=e??window.location.href;var t="";if(StringExt.contains(e,"?")){var i=e.indexOf("?")+1,n=StringExt.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(i,n)}for(var r={},o=t.split(/[&;]/),a=0,s=o.length;a<s;++a){var l=o[a].split("=");if(l[0]){var u=l[0];try{u=decodeURIComponent(u)}catch{u=unescape(u)}var c=(l[1]||"").replace(/\+/g," ");try{c=decodeURIComponent(c)}catch{c=unescape(c)}1==(c=c.split(",")).length&&(c=c[0]),r[u]=c}}return r},_0x4a6d61.lastSeqID=0,_0x4a6d61.createUniqueID=function(e){return null==e&&(e="id_"),_0x4a6d61.lastSeqID+=1,e+_0x4a6d61.lastSeqID},_0x4a6d61.normalizeScale=function(e){return e>1?1/e:e},_0x4a6d61.getResolutionFromScale=function(e,t){var i;e&&(null==t&&(t="degrees"),i=1/(_0x4a6d61.normalizeScale(e)*_0x37ee86[t]*_0x5f44f1));return i},_0x4a6d61.getScaleFromResolution=function(e,t){return null==t&&(t="degrees"),e*_0x37ee86[t]*_0x5f44f1},_0x4a6d61.getBrowser=function(){return _0x24e6db},_0x4a6d61.isSupportCanvas=_0x228fbf,_0x4a6d61.supportCanvas=function(){return _0x4a6d61.isSupportCanvas},_0x4a6d61.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l},_0x4a6d61.calculateDpi=function(e,t,i,n,r){if(e&&t&&i){var o,a=1e4,s=e.getWidth(),l=e.getHeight(),u=t.w,c=t.h;if(r=r||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){var h=s/u,d=l/c;o=254/(h>d?h:d)/i/(2*Math.PI*r/360)/a}else{o=254/(s/u)/i/a}return o}},_0x4a6d61.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var i="",n=0,r=t.length;n<r;n++)i+=_0x4a6d61.toJSON(t[n]),n!==t.length-1&&(i+=",");return"["+i+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"===_typeof(t)){if(t.length){for(var o=[],a=0,s=t.length;a<s;a++)o.push(_0x4a6d61.toJSON(t[a]));return"["+o.join(",")+"]"}var l=[];for(var u in t)"function"!=typeof t[u]&&"CLASS_NAME"!==u&&"parent"!==u&&l.push("'"+u+"':"+_0x4a6d61.toJSON(t[u]));return l.length>0?"{"+l.join(",")+"}":"{}"}return t.toString()}},_0x4a6d61.getResolutionFromScaleDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?(e=_0x4a6d61.normalizeScale(e),"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r):-1},_0x4a6d61.getScaleFromResolutionDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r:-1},_0x4a6d61.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},_0x4a6d61.copyAttributes=function(e,t){if(e=e||{},t)for(var i in t){var n=t[i];void 0!==n&&"CLASS_NAME"!==i&&"function"!=typeof n&&(e[i]=n)}return e},_0x4a6d61.copyAttributesWithClip=function(e,t,i){if(e=e||{},t)for(var n in t){var r=!1;if(i&&i.length)for(var o=0,a=i.length;o<a;o++)if(n===i[o]){r=!0;break}if(!0!==r){var s=t[n];void 0!==s&&"CLASS_NAME"!==n&&"function"!=typeof s&&(e[n]=s)}}return e},_0x4a6d61.cloneObject=function(e){if(null===e||"object"!==_typeof(e))return e;if(e instanceof Date){var t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.slice(0);if(e instanceof Object){var i={};for(var n in e)e.hasOwnProperty(n)&&(i[n]=_0x4a6d61.cloneObject(e[n]));return i}throw new Error("Unable to copy obj! Its type isn't supported.")},_0x4a6d61.lineIntersection=function(e,t,i,n){var r,o,a=null,s=(n.x-i.x)*(e.y-i.y)-(n.y-i.y)*(e.x-i.x),l=(t.x-e.x)*(e.y-i.y)-(t.y-e.y)*(e.x-i.x),u=(n.y-i.y)*(t.x-e.x)-(n.x-i.x)*(t.y-e.y);if(0!=u)o=l/u,a=(r=s/u)>=0&&o<=1&&r<=1&&o>=0?new Geometry.Point(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y)):"No Intersection";else if(0==s&&0==l){var c=Math.max(e.y,t.y),h=Math.min(e.y,t.y),d=Math.max(e.x,t.x),f=Math.min(e.x,t.x);a=(i.y>=h&&i.y<=c||n.y>=h&&n.y<=c)&&i.x>=f&&i.x<=d||n.x>=f&&n.x<=d?"Coincident":"Parallel"}else a="Parallel";return a},_0x4a6d61.getTextBounds=function(e,t,i){document.body.appendChild(i),i.style.width="auto",i.style.height="auto",e.fontSize&&(i.style.fontSize=e.fontSize),e.fontFamily&&(i.style.fontFamily=e.fontFamily),e.fontWeight&&(i.style.fontWeight=e.fontWeight),i.style.position="relative",i.style.visibility="hidden",i.style.display="inline-block",i.innerHTML=t;var n=i.clientWidth,r=i.clientHeight;return document.body.removeChild(i),{textWidth:n,textHeight:r}},_0x4a6d61.convertPath=function(e,t){return t?e.replace(/\{([\w-\.]+)\}/g,(function(e,i){var n;return n=t.hasOwnProperty(i)?paramToString(t[i]):e,encodeURIComponent(n)})):e};var _0x5f44f1=96,_0x37ee86={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};_0x37ee86.in=_0x37ee86.inches,_0x37ee86.degrees=_0x37ee86.dd,_0x37ee86.nmi=1852*_0x37ee86.m;var _0x24e6db=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();var n,r="",o="",a="pc",s=navigator.userAgent.toLowerCase();return s.indexOf("msie")>-1||s.indexOf("trident")>-1&&s.indexOf("rv")>-1?(r="msie",n=s.match(/msie ([\d.]+)/)||s.match(/rv:([\d.]+)/)):s.indexOf("chrome")>-1?(r="chrome",n=s.match(/chrome\/([\d.]+)/)):s.indexOf("firefox")>-1?(r="firefox",n=s.match(/firefox\/([\d.]+)/)):s.indexOf("opera")>-1?(r="opera",n=s.match(/version\/([\d.]+)/)):s.indexOf("safari")>-1&&(r="safari",n=s.match(/version\/([\d.]+)/)),o=n?n[1]:"",s.indexOf("ipad")>-1||s.indexOf("ipod")>-1||s.indexOf("iphone")>-1?a="apple":s.indexOf("android")>-1&&(o=(n=s.match(/version\/([\d.]+)/))?n[1]:"",a="android"),{name:r,version:o,device:a}}(),_0x228fbf=(_0x171728=!0,_0x1b58ea=_0x24e6db,document.createElement("canvas").getContext?("firefox"===_0x1b58ea.name&&parseFloat(_0x1b58ea.version)<5&&(_0x171728=!1),"safari"===_0x1b58ea.name&&parseFloat(_0x1b58ea.version)<4&&(_0x171728=!1),"opera"===_0x1b58ea.name&&parseFloat(_0x1b58ea.version)<10&&(_0x171728=!1),"msie"===_0x1b58ea.name&&parseFloat(_0x1b58ea.version)<9&&(_0x171728=!1)):_0x171728=!1,_0x171728),_0x171728,_0x1b58ea,_0x3534f6=(_0x593ad7=!0,function(e,t){var i=_0x593ad7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x593ad7=!1,i}),_0x107600=_0x3534f6(void 0,(function(){return _0x107600.toString().search("(((.+)+)+)+$").toString().constructor(_0x107600).search("(((.+)+)+)+$")})),_0x593ad7;_0x107600();class BurstPipelineAnalystService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof BurstPipelineAnalystParameters))return null;var t,i=this;if(i.url=_0x4a6d61.urlPathAppend(i.url,"burstAnalyse"),t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");if(null===e.edgeID&&null===e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}var _0x84fa9d=(_0x2127a4=!0,function(e,t){var i=_0x2127a4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2127a4=!1,i}),_0x319b21=_0x84fa9d(void 0,(function(){return _0x319b21.toString().search("(((.+)+)+)+$").toString().constructor(_0x319b21).search("(((.+)+)+)+$")})),_0x2127a4;_0x319b21();class TransportationAnalystResultSetting{constructor(e){!e||(this.returnEdgeFeatures=!1,this.returnEdgeGeometry=!1,this.returnEdgeIDs=!1,this.returnNodeFeatures=!1,this.returnNodeGeometry=!1,this.returnNodeIDs=!1,this.returnPathGuides=!1,this.returnRoutes=!1,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystResultSetting")}destroy(){var e=this;e.returnEdgeFeatures=null,e.returnEdgeGeometry=null,e.returnEdgeIDs=null,e.returnNodeFeatures=null,e.returnNodeGeometry=null,e.returnNodeIDs=null,e.returnPathGuides=null,e.returnRoutes=null}}var _0x21f3df=(_0x52bbdd=!0,function(e,t){var i=_0x52bbdd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x52bbdd=!1,i}),_0x25780e=_0x21f3df(void 0,(function(){return _0x25780e.toString().search("(((.+)+)+)+$").toString().constructor(_0x25780e).search("(((.+)+)+)+$")})),_0x52bbdd;_0x25780e();class TransportationAnalystParameter{constructor(e){!e||(this.barrierEdgeIDs=null,this.barrierNodeIDs=null,this.barrierPoints=null,this.weightFieldName=null,this.turnWeightField=null,this.resultSetting=new TransportationAnalystResultSetting,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystParameter")}destroy(){var e=this;if(e.barrierEdgeIDs=null,e.barrierNodeIDs=null,e.weightFieldName=null,e.turnWeightField=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.barrierPoints&&e.barrierPoints.length)for(var t in e.barrierPoints)e.barrierPoints[t].destroy();e.barrierPoints=null}}var _0x3d37b3=(_0x435ccc=!0,function(e,t){var i=_0x435ccc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x435ccc=!1,i}),_0x62fc28=_0x3d37b3(void 0,(function(){return _0x62fc28.toString().search("(((.+)+)+)+$").toString().constructor(_0x62fc28).search("(((.+)+)+)+$")})),_0x435ccc;_0x62fc28();class ComputeWeightMatrixParameters{constructor(e){this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.ComputeWeightMatrixParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x24c237=(_0x512359=!0,function(e,t){var i=_0x512359?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x512359=!1,i}),_0xa7fb69=_0x24c237(void 0,(function(){return _0xa7fb69.toString().search("(((.+)+)+)+$").toString().constructor(_0xa7fb69).search("(((.+)+)+)+$")})),_0x512359;_0xa7fb69();class ComputeWeightMatrixService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ComputeWeightMatrixService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ComputeWeightMatrixParameters){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"weightmatrix"),t={parameter:_0x57693f.toJSON(e.parameter),nodes:i.getJson(e.isAnalyzeById,e.nodes)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}}var _0x1e6561=(_0xe0dd34=!0,function(e,t){var i=_0xe0dd34?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe0dd34=!1,i}),_0x2ae599=_0x1e6561(void 0,(function(){return _0x2ae599.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ae599).search("(((.+)+)+)+$")})),_0xe0dd34;_0x2ae599();class _0x531671{constructor(e){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=!1,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalyst3DParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null}}var _0xcd63ba=(_0x9b11da=!0,function(e,t){var i=_0x9b11da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x9b11da=!1,i}),_0x24045f=_0xcd63ba(void 0,(function(){return _0x24045f.toString().search("(((.+)+)+)+$").toString().constructor(_0x24045f).search("(((.+)+)+)+$")})),_0x9b11da;_0x24045f();class FacilityAnalystStreamParameters{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,this.queryType=null,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystStreamParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null,e.type=null}}var _0x2cfcc2=(_0x398d60=!0,function(e,t){var i=_0x398d60?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x398d60=!1,i}),_0x130339=_0x2cfcc2(void 0,(function(){return _0x130339.toString().search("(((.+)+)+)+$").toString().constructor(_0x130339).search("(((.+)+)+)+$")})),_0x398d60;_0x130339();class FacilityAnalystStreamService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystStreamService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FacilityAnalystStreamParameters){var t,i=this;if(0===e.queryType)i.url=_0x4a6d61.urlPathAppend(i.url,"upstreamcirticalfaclilities");else{if(1!==e.queryType)return;i.url=_0x4a6d61.urlPathAppend(i.url,"downstreamcirticalfaclilities")}t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},(null===e.edgeID||null===e.nodeID)&&(null===e.edgeID&&null===e.nodeID||(null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})))}}}var _0x2859d4=(_0x15b122=!0,function(e,t){var i=_0x15b122?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x15b122=!1,i}),_0x2fa5d7=_0x2859d4(void 0,(function(){return _0x2fa5d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fa5d7).search("(((.+)+)+)+$")})),_0x15b122;_0x2fa5d7();class _0x573b05 extends _0x531671{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DParameters"}destroy(){super.destroy()}}var _0x13b9c1=(_0x23e591=!0,function(e,t){var i=_0x23e591?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23e591=!1,i}),_0x7a18f0=_0x13b9c1(void 0,(function(){return _0x7a18f0.toString().search("(((.+)+)+)+$").toString().constructor(_0x7a18f0).search("(((.+)+)+)+$")})),_0x23e591;_0x7a18f0();class _0x11783d extends _0xd9c3dd{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _0x573b05){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"tracedownresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}var _0x48ed3b=(_0x3f83f6=!0,function(e,t){var i=_0x3f83f6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f83f6=!1,i}),_0x5f9b22=_0x48ed3b(void 0,(function(){return _0x5f9b22.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f9b22).search("(((.+)+)+)+$")})),_0x3f83f6;_0x5f9b22();class _0x205ec0 extends _0x531671{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DParameters"}destroy(){super.destroy()}}var _0x8edb93=(_0x47d731=!0,function(e,t){var i=_0x47d731?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47d731=!1,i}),_0x2f3811=_0x8edb93(void 0,(function(){return _0x2f3811.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f3811).search("(((.+)+)+)+$")})),_0x47d731;_0x2f3811();class _0x3e2490 extends _0xd9c3dd{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _0x205ec0){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"traceupresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}var _0x35abc0=(_0x51d14c=!0,function(e,t){var i=_0x51d14c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51d14c=!1,i}),_0x7124c0=_0x35abc0(void 0,(function(){return _0x7124c0.toString().search("(((.+)+)+)+$").toString().constructor(_0x7124c0).search("(((.+)+)+)+$")})),_0x51d14c;_0x7124c0();class _0x25f55d{constructor(e,t,i,n){_0x57693f.isArray(e)&&(n=e[3],i=e[2],t=e[1],e=e[0]),this.left=null!=e?_0x57693f.toFloat(e):this.left,this.bottom=null!=t?_0x57693f.toFloat(t):this.bottom,this.right=null!=i?_0x57693f.toFloat(i):this.right,this.top=null!=n?_0x57693f.toFloat(n):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new _0x25f55d(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var i=Math.pow(10,e),n=Math.round(this.left*i)/i,r=Math.round(this.bottom*i)/i,o=Math.round(this.right*i)/i,a=Math.round(this.top*i)/i;return!0===t?r+","+n+","+a+","+o:n+","+r+","+o+","+a}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new Size(this.getWidth(),this.getHeight())}getCenterPixel(){return new Pixel((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new LonLat((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var i,n;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(i=t.lon,n=t.lat):(i=t.x,n=t.y);var r=(this.left-i)*e+i,o=(this.bottom-n)*e+n,a=(this.right-i)*e+i,s=(this.top-n)*e+n;return new _0x25f55d(r,o,a,s)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new _0x25f55d(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new _0x25f55d(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new _0x25f55d(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var i=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!i){var r=n.getWidth(),o=(n.left+n.right)/2,a=Math.round((e.lon-o)/r);i=this.containsLonLat({lon:e.lon-a*r,lat:e.lat},{inclusive:t.inclusive})}return i}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,i){if(null==i&&(i=!0),null==e||null==t)return!1;return i?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var i=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else i=this;null==t.inclusive&&(t.inclusive=!0);var n=!1,r=i.left===e.right||i.right===e.left||i.top===e.bottom||i.bottom===e.top;if(t.inclusive||!r){var o=e.bottom>=i.bottom&&e.bottom<=i.top||i.bottom>=e.bottom&&i.bottom<=e.top,a=e.top>=i.bottom&&e.top<=i.top||i.top>e.bottom&&i.top<e.top,s=e.left>=i.left&&e.left<=i.right||i.left>=e.left&&i.left<=e.right,l=e.right>=i.left&&e.right<=i.right||i.right>=e.left&&i.right<=e.right;n=(o||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),h=!u.containsBounds(i),d=!u.containsBounds(e);h&&!d?(e=e.add(-c,0),n=i.intersectsBounds(e,{inclusive:t.inclusive})):d&&!h&&(i=i.add(-c,0),n=e.intersectsBounds(i,{inclusive:t.inclusive}))}return n}containsBounds(e,t,i){null==t&&(t=!1),null==i&&(i=!0);var n=this.contains(e.left,e.bottom,i),r=this.contains(e.right,e.bottom,i),o=this.contains(e.left,e.top,i),a=this.contains(e.right,e.top,i);return t?n||r||o||a:n&&r&&o&&a}determineQuadrant(e){var t="",i=this.getCenterLonLat();return t+=e.lat<i.lat?"b":"t",t+=e.lon<i.lon?"l":"r"}wrapDateLine(e,t){var i=(t=t||{}).leftTolerance||0,n=t.rightTolerance||0,r=this.clone();if(e){for(var o=e.getWidth();r.left<e.left&&r.right-n<=e.left;)r=r.add(o,0);for(;r.left+i>=e.right&&r.right>e.right;)r=r.add(-o,0);var a=r.left+i;a<e.right&&a>e.left&&r.right-n>e.right&&(r=r.add(-o,0))}return r}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}fromString(e,t){var i=e.split(",");return _0x25f55d.fromArray(i,t)}fromArray(e,t){return!0===t?new _0x25f55d(e[1],e[0],e[3],e[2]):new _0x25f55d(e[0],e[1],e[2],e[3])}fromSize(e){return new _0x25f55d(0,e.h,e.w,0)}oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}var _0xf5a48c=(_0x3aea27=!0,function(e,t){var i=_0x3aea27?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3aea27=!1,i}),_0x4b2f29=_0xf5a48c(void 0,(function(){return _0x4b2f29.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b2f29).search("(((.+)+)+)+$")})),_0x3aea27;_0x4b2f29();class _0x46fa27{constructor(){this.CLASS_NAME="SuperMap.GeometryServer",this.id=_0x57693f.createUniqueID(this.CLASS_NAME+"_"),this.parent=null,this.bounds=null,this.SRID=null}destroy(){this.id=null,this.bounds=null,this.SRID=null}clone(){return new _0x46fa27}setBounds(e){e&&(this.bounds=e.clone())}clearBounds(){this.bounds=null,this.parent&&this.parent.clearBounds()}extendBounds(e){this.getBounds()?this.bounds.extend(e):this.setBounds(e)}getBounds(){return null==this.bounds&&this.calculateBounds(),this.bounds}calculateBounds(){}getVertices(e){}getArea(){return 0}}var _0xcc18ff=(_0x1b500e=!0,function(e,t){var i=_0x1b500e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b500e=!1,i}),_0x5a515f=_0xcc18ff(void 0,(function(){return _0x5a515f.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a515f).search("(((.+)+)+)+$")})),_0x1b500e;_0x5a515f();class Collection$1 extends _0x46fa27{constructor(e){super(),this.components=[],this.componentTypes=null,null!=e&&this.addComponents(e),this.CLASS_NAME="SuperMap.Geometry.Collection",this.geometryType="Collection"}destroy(){this.components.length=0,this.components=null,super.destroy()}clone(){for(var e=new Collection$1,t=0,i=this.components.length;t<i;t++)e.addComponent(this.components[t].clone());return _0x57693f.applyDefaults(e,this),e}getComponentsString(){for(var e=[],t=0,i=this.components.length;t<i;t++)e.push(this.components[t].toShortString());return e.join(",")}calculateBounds(){this.bounds=null;var e=new _0x25f55d,t=this.components;if(t)for(var i=0,n=t.length;i<n;i++)e.extend(t[i].getBounds());null!=e.left&&null!=e.bottom&&null!=e.right&&null!=e.top&&this.setBounds(e)}addComponents(e){_0x57693f.isArray(e)||(e=[e]);for(var t=0,i=e.length;t<i;t++)this.addComponent(e[t])}addComponent(e,t){var i=!1;if(e&&(null==this.componentTypes||_0x57693f.indexOf(this.componentTypes,e.CLASS_NAME)>-1)){if(null!=t&&t<this.components.length){var n=this.components.slice(0,t),r=this.components.slice(t,this.components.length);n.push(e),this.components=n.concat(r)}else this.components.push(e);e.parent=this,this.clearBounds(),i=!0}return i}removeComponents(e){var t=!1;_0x57693f.isArray(e)||(e=[e]);for(var i=e.length-1;i>=0;--i)t=this.removeComponent(e[i])||t;return t}removeComponent(e){return _0x57693f.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,i=this.components.length;t<i;t++)e+=this.components[t].getArea();return e}equals(e){var t=!0;if(e&&e.CLASS_NAME&&this.CLASS_NAME===e.CLASS_NAME)if(_0x57693f.isArray(e.components)&&e.components.length===this.components.length){for(var i=0,n=this.components.length;i<n;++i)if(!this.components[i].equals(e.components[i])){t=!1;break}}else t=!1;else t=!1;return t}getVertices(e){for(var t=[],i=0,n=this.components.length;i<n;++i)Array.prototype.push.apply(t,this.components[i].getVertices(e));return t}}var _0x42149b=(_0x117db2=!0,function(e,t){var i=_0x117db2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x117db2=!1,i}),_0xa7917a=_0x42149b(void 0,(function(){return _0xa7917a.toString().search("(((.+)+)+)+$").toString().constructor(_0xa7917a).search("(((.+)+)+)+$")})),_0x117db2;_0xa7917a();class MultiPolygon extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Polygon"],this.CLASS_NAME="SuperMap.Geometry.MultiPolygon",this.geometryType="MultiPolygon"}}var _0x3682a7=(_0x413d95=!0,function(e,t){var i=_0x413d95?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x413d95=!1,i}),_0x484037=_0x3682a7(void 0,(function(){return _0x484037.toString().search("(((.+)+)+)+$").toString().constructor(_0x484037).search("(((.+)+)+)+$")})),_0x413d95;_0x484037();class Point$1 extends _0x46fa27{constructor(e,t,i,n){super(e,t,i,n),this.x=parseFloat(e),this.y=parseFloat(t),this.tag=n||0==n?parseFloat(n):null,this.type=i||"Point",this.CLASS_NAME="SuperMap.Geometry.Point",this.geometryType="Point"}clone(e){return null==e&&(e=new Point$1(this.x,this.y)),_0x57693f.applyDefaults(e,this),e}calculateBounds(){this.bounds=new _0x25f55d(this.x,this.y,this.x,this.y)}equals(e){var t=!1;return null!=e&&(t=this.x===e.x&&this.y===e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}move(e,t){this.x=this.x+e,this.y=this.y+t,this.clearBounds()}toShortString(){return this.x+", "+this.y}destroy(){this.x=null,this.y=null,this.tag=null,super.destroy()}getVertices(){return[this]}}var _0x30370a=(_0x5e0c7e=!0,function(e,t){var i=_0x5e0c7e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e0c7e=!1,i}),_0xfb8bfb=_0x30370a(void 0,(function(){return _0xfb8bfb.toString().search("(((.+)+)+)+$").toString().constructor(_0xfb8bfb).search("(((.+)+)+)+$")})),_0x5e0c7e;_0xfb8bfb();class MultiPoint extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.MultiPoint",this.geometryType="MultiPoint"}addPoint(e,t){this.addComponent(e,t)}removePoint(e){this.removeComponent(e)}}var _0x3b17ca=(_0xdce96f=!0,function(e,t){var i=_0xdce96f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xdce96f=!1,i}),_0x56e441=_0x3b17ca(void 0,(function(){return _0x56e441.toString().search("(((.+)+)+)+$").toString().constructor(_0x56e441).search("(((.+)+)+)+$")})),_0xdce96f;_0x56e441();class Curve extends MultiPoint{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point","SuperMap.PointWithMeasure"],this.CLASS_NAME="SuperMap.Geometry.Curve",this.geometryType="Curve"}}var _0x1109a6=(_0x4065ab=!0,function(e,t){var i=_0x4065ab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4065ab=!1,i}),_0x4a2c4d=_0x1109a6(void 0,(function(){return _0x4a2c4d.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a2c4d).search("(((.+)+)+)+$")})),_0x4065ab;_0x4a2c4d();class LineString extends Curve{constructor(e){super(e),this.CLASS_NAME="SuperMap.Geometry.LineString",this.geometryType="LineString"}removeComponent(e){var t=this.components&&this.components.length>2;return t&&LineString_get(LineString_getPrototypeOf(LineString.prototype),"removeComponent",this).apply(this,arguments),t}getSortedSegments(){for(var e,t,i=this.components.length-1,n=new Array(i),r=0;r<i;++r)e=this.components[r],t=this.components[r+1],e.x<t.x?n[r]={x1:e.x,y1:e.y,x2:t.x,y2:t.y}:n[r]={x1:t.x,y1:t.y,x2:e.x,y2:e.y};return n.sort((function(e,t){return e.x1-t.x1}))}getVertices(e){return!0===e?[this.components[0],this.components[this.components.length-1]]:!1===e?this.components.slice(1,this.components.length-1):this.components.slice()}calculateCircle(e){if(e.length<3)return e;var t={},i=e[0],n=e[1],r=e[2],o=0,a=0,s=!0,l=0,u=0,c=0,h=[],d=(r.y-i.y)/(r.x-i.x),f=r.y-d*r.x;if(r.x!=i.x&&r.y!=i.y&&n.y==d*n.x+f||r.x==i.x&&n.x==i.x||r.y==i.y&&n.y==i.y||r.x==i.x&&r.y==i.y||r.x==n.x&&r.y==n.y||i.x==n.x&&i.y==n.y)h.push(i),h.push(n),h.push(r);else{var p=(n.x*n.x+n.y*n.y-(i.x*i.x+i.y*i.y))*(2*(r.y-i.y))-(r.x*r.x+r.y*r.y-(i.x*i.x+i.y*i.y))*(2*(n.y-i.y)),_=2*(n.x-i.x)*(r.x*r.x+r.y*r.y-(i.x*i.x+i.y*i.y))-2*(r.x-i.x)*(n.x*n.x+n.y*n.y-(i.x*i.x+i.y*i.y)),m=4*((n.x-i.x)*(r.y-i.y)-(r.x-i.x)*(n.y-i.y));t.x=p/m,t.y=_/m;var g=(2*(o=Math.sqrt((i.x-t.x)*(i.x-t.x)+(i.y-t.y)*(i.y-t.y)))*o-((i.x-r.x)*(i.x-r.x)+(i.y-r.y)*(i.y-r.y)))/(2*o*o);g=(g=g>=1?1:g)<=-1?-1:g,c=180*Math.acos(g)/Math.PI,a=(c=r.x==i.x?t.x>i.x&&n.x>i.x||t.x<i.x&&n.x<i.x?360-c:c:t.y>d*t.x+f&&n.y>d*n.x+f||t.y<d*t.x+f&&n.y<d*n.x+f?360-c:c)/72,r.y!=i.y?r.x==i.x?r.y>i.y?n.x<i.x&&(s=!1):n.x>i.x&&(s=!1):r.x<i.x?n.y<d*n.x+f&&(s=!1):n.y>d*n.x+f&&(s=!1):r.x>i.x?n.y>i.y&&(s=!1):n.y<i.y&&(s=!1);var x=(i.y-t.y)/(i.x-t.x),v=x>=0?180*Math.atan(x)/Math.PI:Math.abs(180*Math.atan(x)/Math.PI)+90,y=Math.abs(t.y);i.y==y&&y==r.y&&i.x<r.x&&(v+=180);var $=i.y-t.y;h.push(i);for(var b=1;b<72;b++){l=a*b,u=v,s?$>=0?x>=0?u+=l:u=180-(u-90)+l:u=x>0?u-180+l:90-u+l:$>=0?x>=0?u-=l:u=180-(u-90)-l:u=x>=0?u-180-l:90-u-l,u=u*Math.PI/180;var T=t.x+o*Math.cos(u),C=t.y+o*Math.sin(u);h.push(new Point(T,C))}h.push(r)}return h}createLineEPS(e){var t=[],i=e.length;if(i<2)return e;for(var n=0;n<i;){if("LTypeArc"==e[n].type){var r=LineString.createLineArc(t,n,i,e);t=r[0],n=r[1]}else t.push(e[n]),n++}return t}createLineArc(e,t,i,n){if(0==t){var r=LineString.addPointEPS(n,t,i,"LTypeArc");Array.prototype.push.apply(e,r[0]),t=r[1]+1}else if(t==i-1){var o=[n[t-1],n[t]],a=LineString.calculateCircle(o);Array.prototype.push.apply(e,a),t++}else{var s=LineString.addPointEPS(n,t,i,"LTypeArc");e.pop(),Array.prototype.push.apply(e,s[0]),t=s[1]+1}return[e,t]}addPointEPS(e,t,i,n){var r,o=[],a=t+1;return 0==t?Array.prototype.push.apply(o,[e[t],e[t+1]]):t==i-1?Array.prototype.push.apply(o,[e[t-1],e[t]]):Array.prototype.push.apply(o,[e[t-1],e[t],e[t+1]]),"LTypeCurve"==n?r=LineString.calculatePointsFBZN(o):"LTypeArc"==n&&(r=LineString.calculateCircle(o)),[r,a]}}var _0x2f7f25=(_0x5f14bc=!0,function(e,t){var i=_0x5f14bc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f14bc=!1,i}),_0x28b7f8=_0x2f7f25(void 0,(function(){return _0x28b7f8.toString().search("(((.+)+)+)+$").toString().constructor(_0x28b7f8).search("(((.+)+)+)+$")})),_0x5f14bc;_0x28b7f8();class MultiLineString extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Geometry.MultiLineString",this.geometryType="MultiLineString"}}var _0x13ae77=(_0x175315=!0,function(e,t){var i=_0x175315?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x175315=!1,i}),_0x2b0fa6=_0x13ae77(void 0,(function(){return _0x2b0fa6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b0fa6).search("(((.+)+)+)+$")})),_0x175315;_0x2b0fa6();class LinearRing extends LineString{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var i=!1,n=this.components.pop();(null!=t||!e.equals(n))&&(i=LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,arguments));var r=this.components[0];return LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,[r]),i}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"removeComponent",this).apply(this,arguments);var i=this.components[0];LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,[i])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,i=0,n=this.components.length;i<n-1;i++){var r=this.components[i],o=this.components[i+1];t+=(r.x+o.x)*(o.y-r.y)}e=-t/2}return e}getVertices(e){return!0===e?[]:this.components.slice(0,this.components.length-1)}}var _0x2f31d0=(_0x48a269=!0,function(e,t){var i=_0x48a269?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x48a269=!1,i}),_0x4d6396=_0x2f31d0(void 0,(function(){return _0x4d6396.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d6396).search("(((.+)+)+)+$")})),_0x48a269;_0x4d6396();class Polygon extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LinearRing"],this.CLASS_NAME="SuperMap.Geometry.Polygon",this.geometryType="Polygon"}getArea(){var e=0;if(this.components&&this.components.length>0){e+=Math.abs(this.components[0].getArea());for(var t=1,i=this.components.length;t<i;t++)e-=Math.abs(this.components[t].getArea())}return e}}var _0x39a5a6=(_0x37e558=!0,function(e,t){var i=_0x37e558?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37e558=!1,i}),_0x2f79dc=_0x39a5a6(void 0,(function(){return _0x2f79dc.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f79dc).search("(((.+)+)+)+$")})),_0x37e558;_0x2f79dc();class Feature{constructor(e,t,i){this.CLASS_NAME="SuperMap.Feature",this.layer=e,this.id=_0x57693f.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=t,this.data=i??{}}destroy(){this.id=null,this.lonlat=null,this.data=null}}var _0x3cd79c=(_0x5ac5f5=!0,function(e,t){var i=_0x5ac5f5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ac5f5=!1,i}),_0xb141e2=_0x3cd79c(void 0,(function(){return _0xb141e2.toString().search("(((.+)+)+)+$").toString().constructor(_0xb141e2).search("(((.+)+)+)+$")})),_0x5ac5f5;_0xb141e2();var _0x326b5b={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"};class Vector extends Feature{constructor(e,t,i){super(null,null,t),this.fid=null,this.geometry=e||null,this.attributes={},t&&(this.attributes=Util.extend(_this.attributes,t)),this.bounds=null,this.state=null,this.style=i||null,this.url=null,this.lonlat=null,this.CLASS_NAME="SuperMap.Feature.Vector",Vector.style={default:{fillColor:"#ee9900",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},select:{fillColor:"blue",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},temporary:{fillColor:"#66cccc",fillOpacity:.2,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"default",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},delete:{display:"none"}}}destroy(){this.layer&&(this.layer.removeFeatures(this),this.layer=null),this.geometry=null,Vector_get(Vector_getPrototypeOf(Vector.prototype),"destroy",this).call(this)}clone(){return new Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style)}toState(e){if(e===_0x326b5b.UPDATE)switch(this.state){case _0x326b5b.UNKNOWN:case _0x326b5b.DELETE:this.state=e}else if(e===_0x326b5b.INSERT)if(this.state===_0x326b5b.UNKNOWN);else this.state=e;else if(e===_0x326b5b.DELETE)switch(this.state){case _0x326b5b.INSERT:case _0x326b5b.DELETE:break;case _0x326b5b.UNKNOWN:case _0x326b5b.UPDATE:this.state=e}else e===_0x326b5b.UNKNOWN&&(this.state=e)}}var _0x1e8577=(_0x1ccc94=!0,function(e,t){var i=_0x1ccc94?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ccc94=!1,i}),_0x425ca9=_0x1e8577(void 0,(function(){return _0x425ca9.toString().search("(((.+)+)+)+$").toString().constructor(_0x425ca9).search("(((.+)+)+)+$")})),_0x1ccc94;_0x425ca9();class PointWithMeasure extends Point$1{constructor(e){super(e),this.measure=null,this.CLASS_NAME="SuperMap.PointWithMeasure"}equals(e){var t=!1;if(null!=e){var i=this.x===e.x&&this.y===e.y&&this.measure===e.measure,n=isNaN(this.x)&&isNaN(this.y)&&isNaN(this.measure),r=isNaN(e.x)&&isNaN(e.y)&&isNaN(e.measure);t=i||n&&r}return t}static toJson(){var e="{";return null!=this.measure&&null!=this.measure&&(e+='"measure":'+this.measure+","),e+='"x":'+this.x+",",e+='"y":'+this.y,e+="}"}destroy(){var e=this;e.measure=null,e.x=null,e.y=null}static fromJson(e){if(e)return new PointWithMeasure({x:e.x,y:e.y,measure:e.measure})}}var _0x43a74a=(_0x264b82=!0,function(e,t){var i=_0x264b82?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x264b82=!1,i}),_0x44720a=_0x43a74a(void 0,(function(){return _0x44720a.toString().search("(((.+)+)+)+$").toString().constructor(_0x44720a).search("(((.+)+)+)+$")})),_0x264b82;_0x44720a();class Route extends Collection$1{constructor(e,t){super(e,t),this.id=null,this.center=null,this.style=null,this.length=null,this.maxM=null,this.minM=null,this.parts=null,this.points=null,this.type=null,this.componentTypes=["SuperMap.Geometry.LinearRing","SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Route",this.geometryType="LINEM"}static toJson(){var e="{";if(null!=this.id&&null!=this.id&&(e+='"id":'+this.id+","),null!=this.center&&null!=this.center&&(e+='"center":'+this.center+","),null!=this.style&&null!=this.style&&(e+='"style":'+this.style+","),null!=this.length&&null!=this.length&&(e+='"length":'+this.length+","),null!=this.maxM&&null!=this.maxM&&(e+='"maxM":'+this.maxM+","),null!=this.minM&&null!=this.minM&&(e+='"minM":'+this.minM+","),null!=this.type&&null!=this.type&&(e+='"type":"'+this.type+'",'),null!=this.parts&&null!=this.parts){e+='"parts":['+this.parts[0];for(var t=1;t<this.parts.length;t++)e+=","+this.parts[t];e+="],"}if(null!=this.components&&this.components.length>0){e+='"points":[';for(var i=0,n=this.components.length;i<n;i++)for(var r=0,o=this.components[i].components.length;r<o;r++)e+=this.components[i].components[r].toJson()+",";e=e.replace(/,$/g,""),e+="]"}return e=e.replace(/,$/g,""),e+="}"}destroy(){var e=this;e.id=null,e.center=null,e.style=null,e.length=null,e.maxM=null,e.minM=null,e.type=null,e.parts=null,e.components.length=0,e.components=null,e.componentTypes=null}static fromJson(e){if(e){var t=e.parts||[],i=e.points||[],n=t.length,r=[];if(!(n>0))return null;for(var o=0,a=0,s=[];o<n;o++){for(var l=0;l<t[o];l++)s.push(PointWithMeasure.fromJson(i[a+l]));a+=t[o],s[0].equals(s[t[o]-1])?r.push(new LinearRing(s)):r.push(new LineString(s)),s=[]}return new Route(r,{id:e.id,center:e.center,style:e.style,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type,parts:e.parts})}}}var _0x4f8f77=(_0x39a5c1=!0,function(e,t){var i=_0x39a5c1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39a5c1=!1,i}),_0x549988=_0x4f8f77(void 0,(function(){return _0x549988.toString().search("(((.+)+)+)+$").toString().constructor(_0x549988).search("(((.+)+)+)+$")})),_0x39a5c1;_0x549988();var _0x6b07b8={LINE:"LINE",LINEM:"LINEM",POINT:"POINT",REGION:"REGION",POINTEPS:"POINTEPS",LINEEPS:"LINEEPS",REGIONEPS:"REGIONEPS",ELLIPSE:"ELLIPSE",CIRCLE:"CIRCLE",TEXT:"TEXT",RECTANGLE:"RECTANGLE",UNKNOWN:"UNKNOWN",GEOCOMPOUND:"GEOCOMPOUND"};class ServerGeometry{constructor(e){this.id=0,this.style=null,this.parts=null,this.points=null,this.type=null,this.prjCoordSys=null,e&&_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.ServerGeometry"}destroy(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}toGeometry(){var e=this;switch(e.type.toUpperCase()){case _0x6b07b8.POINT:return e.toGeoPoint();case _0x6b07b8.LINE:return e.toGeoLine();case _0x6b07b8.LINEM:return e.toGeoLinem();case _0x6b07b8.REGION:return e.toGeoRegion();case _0x6b07b8.POINTEPS:return e.toGeoPoint();case _0x6b07b8.LINEEPS:return e.toGeoLineEPS();case _0x6b07b8.REGIONEPS:return e.toGeoRegionEPS();case _0x6b07b8.GEOCOMPOUND:return e.transformGeoCompound()}}toGeoPoint(){var e=this.parts||[],t=this.points||[],i=e.length;if(i>0){if(1===i)return new Point$1(t[0].x,t[0].y);for(var n=[],r=0;r<i;r++)n.push(new Point$1(t[r].x,t[r].y));return new MultiPoint(n)}return null}toGeoLine(){var e=this.parts||[],t=this.points||[],i=e.length;if(i>0){if(1===i){for(var n=[],r=0;r<e[0];r++)n.push(new Point$1(t[r].x,t[r].y));return n[0].equals(n[e[0]-1])?new LinearRing(n):new LineString(n)}for(var o=[],a=0;a<i;a++){for(var s=[],l=0;l<e[a];l++)s.push(new Point$1(t[l].x,t[l].y));o.push(new LineString(s)),t.splice(0,e[a])}return new MultiLineString(o)}return null}toGeoLineEPS(){var e,t,i,n,r,o=this.parts||[],a=this.points||[],s=o.length;if(s>0){if(1===s){for(e=0,i=[];e<o[0];e++)i.push(new Point$1(a[e].x,a[e].y,a[e].type));return i[0].equals(i[o[0]-1])?(r=LineString.createLineEPS(i),new LinearRing(r)):(r=LineString.createLineEPS(i),new LineString(r))}for(e=0,n=[];e<s;e++){for(t=0,i=[];t<o[e];t++)i.push(new Point$1(a[t].x,a[t].y));r=LineString.createLineEPS(i),n.push(new LineString(r)),a.splice(0,o[e])}return new MultiLineString(n)}return null}toGeoLinem(){return Route.fromJson(this)}toGeoRegion(){var e=this,t=e.parts||[],i=e.partTopo||[],n=e.points||[],r=t.length;if(r<=0)return null;var o=[],a=[];if(1==r){for(var s=0;s<n.length;s++)a.push(new Point$1(n[s].x,n[s].y));return o.push(new Polygon([new LinearRing(a)])),new MultiPolygon(o)}for(var l=[],u=[],c=[],h=[],d=[],f=0,p=0;f<r;f++){for(var _=0;_<t[f];_++)a.push(new Point$1(n[p+_].x,n[p+_].y));p+=t[f];var m=new Polygon([new LinearRing(a)]);a=[],c.push(m),0===i.length&&h.push(m.getBounds()),d.push(1),u.push(m.getArea())}if(0===i.length){ServerGeometry.bubbleSort(u,c,i,h);for(var g=[],x=1;x<c.length;x++)for(var v=x-1;v>=0;v--)if(g[x]=-1,h[v].containsBounds(h[x])){d[x]=-1*d[v],d[x]<0&&(g[x]=v);break}for(var y=0;y<c.length;y++)d[y]>0?o.push(c[y]):(o[g[y]].components=o[g[y]].components.concat(c[y].components),o.push(""))}else{o=new Array;for(var $=0;$<c.length;$++)if(i[$]&&-1==i[$]?l=l.concat(c[$].components):(l.length>0&&o.length>0&&(o[o.length-1].components=o[o.length-1].components.concat(l),l=[]),o.push(c[$])),$==r-1){var b=o.length;if(b)o[b-1].components=o[b-1].components.concat(l);else for(var T=0,C=l.length;T<C;T++)o.push(new Polygon(l))}}return new MultiPolygon(o)}toGeoRegionEPS(){var e=this,t=e.parts||[],i=e.partTopo||[],n=e.points||[],r=t.length;if(r<=0)return null;var o,a=[],s=[];if(1==r){for(var l=0;l<n.length;l++)s.push(new Point$1(n[l].x,n[l].y));return o=LineString.createLineEPS(s),a.push(new Polygon([new LinearRing(o)])),new MultiPolygon(a)}for(var u=[],c=[],h=[],d=[],f=[],p=0,_=0;p<r;p++){for(var m=0;m<t[p];m++)s.push(new Point$1(n[_+m].x,n[_+m].y));_+=t[p],o=LineString.createLineEPS(s);var g=new Polygon([new LinearRing(o)]);s=[],h.push(g),0===i.length&&d.push(g.getBounds()),f.push(1),c.push(g.getArea())}if(0===i.length){ServerGeometry.bubbleSort(c,h,i,d);for(var x=[],v=1;v<h.length;v++)for(var y=v-1;y>=0;y--)if(x[v]=-1,d[y].containsBounds(d[v])){f[v]=-1*f[y],f[v]<0&&(x[v]=y);break}for(var $=0;$<h.length;$++)f[$]>0?a.push(h[$]):(a[x[$]].components=a[x[$]].components.concat(h[$].components),a.push(""))}else{a=new Array;for(var b=0;b<h.length;b++)if(i[b]&&-1==i[b]?u=u.concat(h[b].components):(u.length>0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(u),u=[]),a.push(h[b])),b==r-1){var T=a.length;if(T)a[T-1].components=a[T-1].components.concat(u);else for(var C=0,S=u.length;C<S;C++)a.push(new Polygon(u))}}return new MultiPolygon(a)}transformGeoCompound(){var e=this.geoParts||[],t=e.length;if(t<=0)return null;for(var i=[],n=0;n<t;n++){var r=e[n];i.push(new ServerGeometry(r).toGeometry())}return new Collection(i)}fromJson(e){if(e)return new ServerGeometry({id:e.id,style:ServerStyle.fromJson(e.style),parts:e.parts,partTopo:e.partTopo,points:e.points,center:e.center,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type})}fromGeometry(e){if(e){var t=0,i=[],n=[],r=null,o=e.components,a=e.CLASS_NAME,s={epsgCode:e.SRID};if(isNaN(e.id)||(t=e.id),"SuperMap.Geometry.LinearRing"!=a&&"SuperMap.Geometry.LineString"!=a&&(e instanceof MultiPoint||e instanceof MultiLineString)){for(var l=o.length,u=0;u<l;u++){var c=o[u].getVertices(),h=c.length;i.push(h);for(var d=0;d<h;d++)n.push(new Point$1(c[d].x,c[d].y))}r="SuperMap.Geometry.MultiPoint"==a?_0x6b07b8.POINT:_0x6b07b8.LINE}else if(e instanceof MultiPolygon){for(var f=o.length,p=0;p<f;p++)for(var _=o[p].components,m=_.length,g=0;g<m;g++){var x=_[g].getVertices(),v=x.length+1;i.push(v);for(var y=0;y<v-1;y++)n.push(new Point$1(x[y].x,x[y].y));n.push(new Point$1(x[0].x,x[0].y))}r=_0x6b07b8.REGION}else if(e instanceof Polygon){for(var $=o.length,b=0;b<$;b++){var T=o[b].getVertices(),C=T.length+1;i.push(C);for(var S=0;S<C-1;S++)n.push(new Point$1(T[S].x,T[S].y));n.push(new Point$1(T[0].x,T[0].y))}r=_0x6b07b8.REGION}else{for(var w=e.getVertices(),E=w.length,P=0;P<E;P++)n.push(new Point$1(w[P].x,w[P].y));e instanceof LinearRing&&(n.push(new Point$1(w[0].x,w[0].y)),E++),i.push(E),r=e instanceof Point$1?_0x6b07b8.POINT:_0x6b07b8.LINE}return new ServerGeometry({id:t,style:null,parts:i,points:n,type:r,prjCoordSys:s})}}IsClockWise(e){var t=e.length;if(t<3)return 0;var i=e[0].y*(e[t-1].x-e[1].x);e.push(e[0]);for(var n=1;n<t;n++)i+=e[n].y*(e[n-1].x-e[n+1].x);return.5*i}bubbleSort(e,t,i,n){for(var r=0;r<e.length;r++)for(var o=0;o<e.length;o++)if(e[r]>e[o]){var a=e[o];e[o]=e[r],e[r]=a;var s=t[o];if(t[o]=t[r],t[r]=s,i&&i.length>0){var l=i[o];i[o]=i[r],i[r]=l}if(n&&n.length>0){var u=n[o];n[o]=n[r],n[r]=u}}}}var _0x1244c3=(_0x20acf5=!0,function(e,t){var i=_0x20acf5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x20acf5=!1,i}),_0x5d22aa=_0x1244c3(void 0,(function(){return _0x5d22aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d22aa).search("(((.+)+)+)+$")})),_0x20acf5;_0x5d22aa();class _0x1a420a extends _0x3ca704{constructor(e){super(e),this.ignoreExtraDims=!0,this.CLASS_NAME="SuperMap.Format.GeoJSON",this.parseCoords={point:function(e){if(!1===this.ignoreExtraDims&&2!=e.length)throw"Only 2D points are supported: "+e;return new Point$1(e[0],e[1])},multipoint:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.point.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiPoint(t)},linestring:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.point.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new LineString(t)},multilinestring:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.linestring.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiLineString(t)},polygon:function(e){for(var t,i,n=[],r=0,o=e.length;r<o;++r){try{i=this.parseCoords.linestring.apply(this,[e[r]])}catch(e){throw e}t=new LinearRing(i.components),n.push(t)}return new Polygon(n)},multipolygon:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.polygon.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiPolygon(t)},box:function(e){if(2!=e.length)throw"GeoJSON box coordinates must have 2 elements";return new Polygon([new LinearRing([new Point$1(e[0][0],e[0][1]),new Point$1(e[1][0],e[0][1]),new Point$1(e[1][0],e[1][1]),new Point$1(e[0][0],e[1][1]),new Point$1(e[0][0],e[0][1])])])}},this.extract={feature:function(e){var t=this.extract.geometry.apply(this,[e.geometry]),i={type:"Feature",properties:this.createAttributes(e),geometry:t};return e.geometry&&"TEXT"===e.geometry.type&&(i.properties.texts=e.geometry.texts,i.properties.textStyle=e.geometry.textStyle),e.fid&&(i.id=e.fid),e.ID&&(i.id=e.ID),i},geometry:function(e){if(null==e)return null;!e.parts&&e.points&&(e.parts=[e.points.length]);var t,i=e.hasOwnProperty("geometryType")?e:new ServerGeometry(e).toGeometry()||e,n=i.geometryType||i.type;return"LinearRing"===n&&(n="LineString"),"LINEM"===n&&(n="MultiLineString"),t=this.extract[n.toLowerCase()].apply(this,[i]),"Collection"===(n="TEXT"===n?"Point":n)?{type:"GeometryCollection",geometries:t}:{type:n,coordinates:t}},point:function(e){var t=[e.x,e.y];for(var i in e)"x"!==i&&"y"!==i&&null!==e[i]&&!isNaN(e[i])&&t.push(e[i]);return t},text:function(e){return[e.points[0].x,e.points[0].y]},multipoint:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t},linestring:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t},multilinestring:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.linestring.apply(this,[e.components[i]]));return t},polygon:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.linestring.apply(this,[e.components[i]]));return t},multipolygon:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.polygon.apply(this,[e.components[i]]));return t},collection:function(e){for(var t=e.components.length,i=new Array(t),n=0;n<t;++n)i[n]=this.extract.geometry.apply(this,[e.components[n]]);return i}}}read(e,t,i){t=t||"FeatureCollection";var n=null,r=null;if((r="string"==typeof e?GeoJSON_get(GeoJSON_getPrototypeOf(_0x1a420a.prototype),"read",this).call(this,e,i):e)&&"string"==typeof r.type&&this.isValidType(r,t))switch(t){case"Geometry":try{n=this.parseGeometry(r)}catch{}break;case"Feature":try{(n=this.parseFeature(r)).type="Feature"}catch{}break;case"FeatureCollection":switch(n=[],r.type){case"Feature":try{n.push(this.parseFeature(r))}catch{n=null}break;case"FeatureCollection":for(var o=0,a=r.features.length;o<a;++o)try{n.push(this.parseFeature(r.features[o]))}catch{n=null}break;default:try{var s=this.parseGeometry(r);n.push(new Vector(s))}catch{n=null}}}return n}write(e,t){return GeoJSON_get(GeoJSON_getPrototypeOf(_0x1a420a.prototype),"write",this).call(this,this.toGeoJSON(e),t)}fromGeoJSON(e,t,i){var n=this,r=this.read(e,t,i);return Array.isArray(r)?r.map((function(e){return n._toiSevrerFeature(e)})):this._toiSevrerFeature(r)}toGeoJSON(e){var t={type:null};if(Array.isArray(e)){t.type="FeatureCollection";var i=e.length;t.features=new Array(i);for(var n=0;n<i;++n){var r=e[n];if(s(r)){var o={};o.geometry=r,t.features[n]=this.extract.feature.apply(this,[o])}else t.features[n]=this.extract.feature.apply(this,[r])}}else if(s(e)){var a={};a.geometry=e,t=this.extract.feature.apply(this,[a])}else t=this.extract.feature.apply(this,[e]);function s(e){return e.hasOwnProperty("parts")&&e.hasOwnProperty("points")||e.hasOwnProperty("geoParts")}return t}isValidType(e,t){var i=!1;switch(t){case"Geometry":-1==_0x57693f.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],e.type)||(i=!0);break;case"FeatureCollection":i=!0;break;default:e.type==t&&(i=!0)}return i}parseFeature(e){var t,i,n,r;n=e.properties?e.properties:{},r=e.geometry&&e.geometry.bbox||e.bbox;try{i=this.parseGeometry(e.geometry)}catch(e){throw e}return t=new Vector(i,n),r&&(t.bounds=_0x25f55d.fromArray(r)),e.id&&(t.fid=e.id),t}parseGeometry(e){if(null==e)return null;var t;if("GeometryCollection"==e.type){if(!Array.isArray(e.geometries))throw"GeometryCollection must have geometries array: "+e;for(var i=e.geometries.length,n=new Array(i),r=0;r<i;++r)n[r]=this.parseGeometry.apply(this,[e.geometries[r]]);t=new Collection$1(n)}else{if(!Array.isArray(e.coordinates))throw"Geometry must have coordinates array: "+e;if(!this.parseCoords[e.type.toLowerCase()])throw"Unsupported geometry type: "+e.type;try{t=this.parseCoords[e.type.toLowerCase()].apply(this,[e.coordinates])}catch(e){throw e}}return t}createCRSObject(e){var t=e.layer.projection.toString(),i={};if(t.match(/epsg:/i)){var n=parseInt(t.substring(t.indexOf(":")+1));i=4326==n?{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"name",properties:{name:"EPSG:"+n}}}return i}_toiSevrerFeature(e){var t=e.attributes,i=[],n=[];for(var r in t)i.push(r),n.push(t[r]);var o={fieldNames:i,fieldValues:n,geometry:ServerGeometry.fromGeometry(e.geometry)};return o.geometry.id=e.fid,o}createAttributes(e){if(!e)return null;return{}}}var _0x2abecb=(_0x2db5b2=!0,function(e,t){var i=_0x2db5b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2db5b2=!1,i}),_0x48ea1e=_0x2abecb(void 0,(function(){return _0x48ea1e.toString().search("(((.+)+)+)+$").toString().constructor(_0x48ea1e).search("(((.+)+)+)+$")})),_0x2db5b2;_0x48ea1e();class FindClosestFacilitiesService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindClosestFacilitiesService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindClosestFacilitiesParameters){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"closestfacility"),t={expectFacilityCount:e.expectFacilityCount,fromEvent:e.fromEvent,maxWeight:e.maxWeight,parameter:_0x57693f.toJSON(e.parameter),event:_0x57693f.toJSON(e.event),facilities:i.getJson(e.isAnalyzeById,e.facilities)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new _0x1a420a;return e.facilityPathList.map((function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e})),e}}var _0x69102=(_0xb12fca=!0,function(e,t){var i=_0xb12fca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb12fca=!1,i}),_0x16f2e5=_0x69102(void 0,(function(){return _0x16f2e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x16f2e5).search("(((.+)+)+)+$")})),_0xb12fca;_0x16f2e5();class FindLocationParameters{constructor(e){this.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FindLocationParameters"}destroy(){var e=this;if(e.expectedSupplyCenterCount=null,e.isFromCenter=null,e.turnWeightField=null,e.weightName=null,e.supplyCenters){for(var t=0,i=e.supplyCenters,n=i.length;t<n;t++)i[t].destroy();e.supplyCenters=null}}}var _0x395368=(_0x2f28cd=!0,function(e,t){var i=_0x2f28cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f28cd=!1,i}),_0x411dca=_0x395368(void 0,(function(){return _0x411dca.toString().search("(((.+)+)+)+$").toString().constructor(_0x411dca).search("(((.+)+)+)+$")})),_0x2f28cd;_0x411dca();class FindLocationService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindLocationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindLocationParameters){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"location"),t={isFromCenter:e.isFromCenter,expectedSupplyCenterCount:e.expectedSupplyCenterCount,weightName:e.weightName,turnWeightField:e.turnWeightField,returnEdgeFeature:!0,returnEdgeGeometry:!0,returnNodeFeature:!0,mapParameter:_0x57693f.toJSON(e.mapParameter),supplyCenters:i.getCentersJson(e.supplyCenters)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getCentersJson(e){for(var t="[",i=e?e.length:0,n=0;n<i;n++)n>0&&(t+=","),t+=_0x57693f.toJSON(e[n]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new _0x1a420a;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}var _0x874fb3=(_0x2b0482=!0,function(e,t){var i=_0x2b0482?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b0482=!1,i}),_0x2ef1ae=_0x874fb3(void 0,(function(){return _0x2ef1ae.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ef1ae).search("(((.+)+)+)+$")})),_0x2b0482;_0x2ef1ae();class FindMTSPPathsParameters{constructor(e){this.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FindMTSPPathsParameters"}destroy(){var e=this;e.centers=null,e.hasLeastTotalCost=null,e.isAnalyzeById=null,e.nodes=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x252d30=(_0x463bd4=!0,function(e,t){var i=_0x463bd4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x463bd4=!1,i}),_0x1d07f3=_0x252d30(void 0,(function(){return _0x1d07f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d07f3).search("(((.+)+)+)+$")})),_0x463bd4;_0x1d07f3();class FindMTSPPathsService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindMTSPPathsParameters){var t,i=this,n=i.getJson(e.isAnalyzeById,e.centers),r=i.getJson(e.isAnalyzeById,e.nodes);i.url=_0x4a6d61.urlPathAppend(i.url,"mtsppath"),t={centers:n,nodes:r,parameter:_0x57693f.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new _0x1a420a;return e.pathList.map((function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e})),e}}var _0x3ee781=(_0x307d36=!0,function(e,t){var i=_0x307d36?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x307d36=!1,i}),_0xfddcca=_0x3ee781(void 0,(function(){return _0xfddcca.toString().search("(((.+)+)+)+$").toString().constructor(_0xfddcca).search("(((.+)+)+)+$")})),_0x307d36;_0xfddcca();class FindPathParameters{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FindPathParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.hasLeastEdgeCount=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x2f5407=(_0x5586fa=!0,function(e,t){var i=_0x5586fa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5586fa=!1,i}),_0x5ad5f4=_0x2f5407(void 0,(function(){return _0x5ad5f4.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ad5f4).search("(((.+)+)+)+$")})),_0x5586fa;_0x5ad5f4();class FindPathService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindPathParameters){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"path"),t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:_0x57693f.toJSON(e.parameter),nodes:i.getJson(e.isAnalyzeById,e.nodes)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new _0x1a420a;return e.pathList.forEach((function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))})),e}}var _0x2862b8=(_0x3c3ec7=!0,function(e,t){var i=_0x3c3ec7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3c3ec7=!1,i}),_0x30e8c3=_0x2862b8(void 0,(function(){return _0x30e8c3.toString().search("(((.+)+)+)+$").toString().constructor(_0x30e8c3).search("(((.+)+)+)+$")})),_0x3c3ec7;_0x30e8c3();class FindServiceAreasParameters{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new TransportationAnalystParameter,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FindServiceAreasParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.isCenterMutuallyExclusive=null,e.centers=null,e.isFromCenter=null,e.weights=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x9a936=(_0x12cc5b=!0,function(e,t){var i=_0x12cc5b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12cc5b=!1,i}),_0x40f3ca=_0x9a936(void 0,(function(){return _0x40f3ca.toString().search("(((.+)+)+)+$").toString().constructor(_0x40f3ca).search("(((.+)+)+)+$")})),_0x12cc5b;_0x40f3ca();class FindServiceAreasService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){this.destroy()}processAsync(e){if(e instanceof FindServiceAreasParameters){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"servicearea"),t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:_0x57693f.toJSON(e.parameter),centers:i.getJson(e.isAnalyzeById,e.centers),weights:i.getJson(!0,e.weights)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new _0x1a420a;return e.serviceAreaList.map((function(e){return e.serviceRegion&&(e.serviceRegion=t.toGeoJSON(e.serviceRegion)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e.routes&&(e.routes=t.toGeoJSON(e.routes)),e})),e}}var _0x392251=(_0x4fc4b3=!0,function(e,t){var i=_0x4fc4b3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fc4b3=!1,i}),_0x3b2be3=_0x392251(void 0,(function(){return _0x3b2be3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b2be3).search("(((.+)+)+)+$")})),_0x4fc4b3;_0x3b2be3();class FindTSPPathsParameters{constructor(e){this.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.FindTSPPathsParameters"}destroy(){var e=this;e.endNodeAssigned=null,e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x3b83b2=(_0x3e7d60=!0,function(e,t){var i=_0x3e7d60?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3e7d60=!1,i}),_0x546d32=_0x3b83b2(void 0,(function(){return _0x546d32.toString().search("(((.+)+)+)+$").toString().constructor(_0x546d32).search("(((.+)+)+)+$")})),_0x3e7d60;_0x546d32();class FindTSPPathsService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindTSPPathsParameters){var t,i=this;i.url=_0x4a6d61.urlPathAppend(i.url,"tsppath"),t={parameter:_0x57693f.toJSON(e.parameter),endNodeAssigned:e.endNodeAssigned,nodes:i.getNodesJson(e)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getNodesJson(e){var t,i,n,r,o="";if(!1===e.isAnalyzeById){for(t="[",i=0,n=(r=e.nodes).length;i<n;i++)i>0&&(t+=","),t+='{"x":'+r[i].x+',"y":'+r[i].y+"}";o+=t+="]"}else if(!0===e.isAnalyzeById){for(var a="[",s=e.nodes,l=s.length,u=0;u<l;u++)u>0&&(a+=","),a+=s[u];o+=a+="]"}return o}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new _0x1a420a;return e.tspPathList.forEach((function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))})),e}}var _0x4c726c={extend:function(e){var t,i,n,r;for(i=1,n=arguments.length;i<n;i++)for(t in r=arguments[i])e[t]=r[t];return e},create:Object.create||function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));function n(){}return i(),function(e){return n.prototype=e,new n}}(),bind:function(e,t){var i=Array.prototype.slice;if(e.bind)return e.bind.apply(e,i.call(arguments,1));var n=i.call(arguments,2);return function(){return e.apply(t,n.length?n.concat(i.call(arguments)):arguments)}},stamp:function(e){return e._leaflet_id=e._leaflet_id||++L.Util.lastId,e._leaflet_id},lastId:0,throttle:function(e,t,i){var n,r,o,a;return a=function(){n=!1,r&&(o.apply(i,r),r=!1)},o=function(){n?r=arguments:(e.apply(i,arguments),setTimeout(a,t),n=!0)},o},wrapNum:function(e,t,i){var n=t[1],r=t[0],o=n-r;return e===n&&i?e:((e-r)%o+o)%o+r},falseFn:function(){return!1},formatNum:function(e,t){var i=Math.pow(10,t||5);return Math.round(e*i)/i},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},splitWords:function(e){return _0x4c726c.trim(e).split(/\s+/)},setOptions:function(e,t){for(var i in e.hasOwnProperty("options")||(e.options=e.options?_0x4c726c.create(e.options):{}),t)e.options[i]=t[i];return e.options},getParamString:function(e,t,i){var n=[];for(var r in e)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(e[r]));return(t&&-1!==t.indexOf("?")?"&":"?")+n.join("&")},template:function(e,t){return e.replace(_0x4c726c.templateRe,(function(e,i){var n=t[i];if(void 0===n)throw new Error("No value provided for variable "+e);return"function"==typeof n&&(n=n(t)),n}))},templateRe:/\{ *([\w_\-]+) *\}/g,isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},indexOf:function(e,t){for(var i=0;i<e.length;i++)if(e[i]===t)return i;return-1},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},_0x523bdf=(_0x3f741a=!0,function(e,t){var i=_0x3f741a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f741a=!1,i}),_0x563508=_0x523bdf(void 0,(function(){return _0x563508.toString().search("(((.+)+)+)+$").toString().constructor(_0x563508).search("(((.+)+)+)+$")})),_0x3f741a;function _0x18ea93(){}_0x563508(),_0x18ea93.extend=function(e){var t=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=t.__super__=this.prototype,n=_0x4c726c.create(i);for(var r in n.constructor=t,t.prototype=n,this)this.hasOwnProperty(r)&&"prototype"!==r&&(t[r]=this[r]);return e.statics&&(_0x4c726c.extend(t,e.statics),delete e.statics),e.includes&&(_0x4c726c.extend.apply(null,[n].concat(e.includes)),delete e.includes),n.options&&(e.options=_0x4c726c.extend(_0x4c726c.create(n.options),e.options)),_0x4c726c.extend(n,e),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=n._initHooks.length;e<t;e++)n._initHooks[e].call(this)}},t},_0x18ea93.include=function(e){return _0x4c726c.extend(this.prototype,e),this},_0x18ea93.mergeOptions=function(e){return _0x4c726c.extend(this.prototype.options,e),this},_0x18ea93.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),i="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var _0x28b477=(_0x5694e4=!0,function(e,t){var i=_0x5694e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5694e4=!1,i}),_0x57880f=_0x28b477(void 0,(function(){return _0x57880f.toString().search("(((.+)+)+)+$").toString().constructor(_0x57880f).search("(((.+)+)+)+$")})),_0x5694e4;_0x57880f();var _0x59a8a5=_0x18ea93.extend({on:function(e,t,i){if("object"==typeof e)for(var n in e)this._on(n,e[n],t);else for(var r=0,o=(e=_0x4c726c.splitWords(e)).length;r<o;r++)this._on(e[r],t,i);return this},off:function(e,t,i){if(e)if("object"==typeof e)for(var n in e)this._off(n,e[n],t);else for(var r=0,o=(e=_0x4c726c.splitWords(e)).length;r<o;r++)this._off(e[r],t,i);else delete this._events;return this},_on:function(e,t,i){this._events=this._events||{};var n=this._events[e];n||(n=[],this._events[e]=n),i===this&&(i=void 0);for(var r={fn:t,ctx:i},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===t&&o[a].ctx===i)return;o.push(r)},_off:function(e,t,i){var n,r,o;if(this._events&&(n=this._events[e])){if(!t){for(r=0,o=n.length;r<o;r++)n[r].fn=_0x4c726c.falseFn;return void delete this._events[e]}if(i===this&&(i=void 0),n)for(r=0,o=n.length;r<o;r++){var a=n[r];if(a.ctx===i&&a.fn===t)return a.fn=_0x4c726c.falseFn,this._firingCount&&(this._events[e]=n=n.slice()),void n.splice(r,1)}}},fire:function(e,t,i){if(!this.listens(e,i))return this;var n=_0x4c726c.extend({},t,{type:e,target:this});if(this._events){var r=this._events[e];if(r){this._firingCount=this._firingCount+1||1;for(var o=0,a=r.length;o<a;o++){var s=r[o];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(e,t){var i=this._events&&this._events[e];if(i&&i.length)return!0;if(t)for(var n in this._eventParents)if(this._eventParents[n].listens(e,t))return!0;return!1},once:function(e,t,i){if("object"==typeof e){for(var n in e)this.once(n,e[n],t);return this}var r=_0x4c726c.bind((function(){this.off(e,t,i).off(e,r,i)}),this);return this.on(e,t,i).on(e,r,i)},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[_0x4c726c.stamp(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[_0x4c726c.stamp(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,_0x4c726c.extend({layer:e.target},e),!0)}}),_0x2f33e4=(_0x5bd00c=!0,function(e,t){var i=_0x5bd00c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5bd00c=!1,i}),_0x1afd4b=_0x2f33e4(void 0,(function(){return _0x1afd4b.toString().search("(((.+)+)+)+$").toString().constructor(_0x1afd4b).search("(((.+)+)+)+$")})),_0x5bd00c;_0x1afd4b();class ServiceBase extends _0x59a8a5{constructor(e,t){super(),e&&(e=e.indexOf("/")!==e.length-1?e:e.substr(0,e.length-1)),this.url=e,_0x4c726c.setOptions(this,t),this.fire("initialized",this)}destroy(){this.fire("destroy",this)}}var _0x566c9b=(_0x4e5c3b=!0,function(e,t){var i=_0x4e5c3b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e5c3b=!1,i}),_0x25d90b=_0x566c9b(void 0,(function(){return _0x25d90b.toString().search("(((.+)+)+)+$").toString().constructor(_0x25d90b).search("(((.+)+)+)+$")})),_0x4e5c3b;_0x25d90b();class UpdateEdgeWeightParameters{constructor(e){!e||(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}}var _0x5441df=(_0x277797=!0,function(e,t){var i=_0x277797?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x277797=!1,i}),_0x1e98dd=_0x5441df(void 0,(function(){return _0x1e98dd.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e98dd).search("(((.+)+)+)+$")})),_0x277797;_0x1e98dd();class UpdateEdgeWeightService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof UpdateEdgeWeightParameters){var t=this,i=t.parse(e);t.url=_0x4a6d61.urlPathAppend(t.url,i);var n=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:n,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var i in e)if(""!==e[i]&&"edgeWeight"!==e[i])switch(i){case"edgeId":t+="/edgeweight/"+e[i];break;case"fromNodeId":t+="/fromnode/"+e[i];break;case"toNodeId":t+="/tonode/"+e[i];break;case"weightField":t+="/weightfield/"+e[i]}return t}}}var _0x7ae0d0=(_0x646c1d=!0,function(e,t){var i=_0x646c1d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x646c1d=!1,i}),_0x59ccf5=_0x7ae0d0(void 0,(function(){return _0x59ccf5.toString().search("(((.+)+)+)+$").toString().constructor(_0x59ccf5).search("(((.+)+)+)+$")})),_0x646c1d;_0x59ccf5();class UpdateTurnNodeWeightParameters{constructor(e){!e||(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}}var _0x2a3316=(_0x4526d6=!0,function(e,t){var i=_0x4526d6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4526d6=!1,i}),_0x58c712=_0x2a3316(void 0,(function(){return _0x58c712.toString().search("(((.+)+)+)+$").toString().constructor(_0x58c712).search("(((.+)+)+)+$")})),_0x4526d6;_0x58c712();class UpdateTurnNodeWeightService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof UpdateTurnNodeWeightParameters){var t=this,i=t.parse(e);t.url=_0x4a6d61.urlPathAppend(t.url,i);var n=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:n,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var i in e)if(""!==e[i]&&"turnNodeWeight"!==e[i])switch(i){case"nodeId":t+="/turnnodeweight/"+e[i];break;case"fromEdgeId":t+="/fromedge/"+e[i];break;case"toEdgeId":t+="/toedge/"+e[i];break;case"weightField":t+="/weightfield/"+e[i]}return t}}}var _0xfc2cc6=(_0x5492e8=!0,function(e,t){var i=_0x5492e8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5492e8=!1,i}),_0x5973cf=_0xfc2cc6(void 0,(function(){return _0x5973cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x5973cf).search("(((.+)+)+)+$")})),_0x5492e8;_0x5973cf();var _0x5781b8=function(e,t,i){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==i&&(this.alt=+i)};_0x5781b8.prototype={equals:function(e,t){return!!e&&(e=L.latLng(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+L.Util.formatNum(this.lat,e)+", "+L.Util.formatNum(this.lng,e)+")"},distanceTo:function(e){return L.CRS.Earth.distance(this,L.latLng(e))},wrap:function(){return L.CRS.Earth.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,i=t/Math.cos(Math.PI/180*this.lat);return L.latLngBounds([this.lat-t,this.lng-i],[this.lat+t,this.lng+i])},clone:function(){return new L.LatLng(this.lat,this.lng,this.alt)}};var _0x484153=(_0x35637d=!0,function(e,t){var i=_0x35637d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x35637d=!1,i}),_0x35077e=_0x484153(void 0,(function(){return _0x35077e.toString().search("(((.+)+)+)+$").toString().constructor(_0x35077e).search("(((.+)+)+)+$")})),_0x35637d;_0x35077e();var _0x55fbe7={GEOJSON:"GEOJSON",ISERVER:"ISERVER"};class NetworkAnalystService extends ServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.NetworkAnalystService"}burstPipelineAnalyst(e,t){var i=this;new BurstPipelineAnalystService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))}computeWeightMatrix(e,t){var i=this;new ComputeWeightMatrixService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))}findClosestFacilities(e,t,i){var n=this;new FindClosestFacilitiesService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}streamFacilityAnalyst(e,t,i){var n=this;new FacilityAnalystStreamService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findLocation(e,t,i){var n=this;new FindLocationService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findPath(e,t,i){var n=this;new FindPathService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findTSPPaths(e,t,i){var n=this;new FindTSPPathsService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findMTSPPaths(e,t,i){var n=this;new FindMTSPPathsService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findServiceAreas(e,t,i){var n=this;new FindServiceAreasService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}updateEdgeWeight(e,t){var i=this;new UpdateEdgeWeightService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}updateTurnNodeWeight(e,t){var i=this;new UpdateTurnNodeWeightService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}_processParams(e){if(!e)return{};if(e.centers&&Array.isArray(e.centers)&&e.centers.map((function(t,i){return e.centers[i]=t instanceof _0x5781b8?{x:t.lng,y:t.lat}:t,e.centers[i]})),e.nodes&&Array.isArray(e.nodes)&&e.nodes.map((function(t,i){return e.nodes[i]=t instanceof _0x5781b8?{x:t.lng,y:t.lat}:t,e.nodes[i]})),e.event&&e.event instanceof _0x5781b8&&(e.event={x:e.event.lng,y:e.event.lat}),e.facilities&&Array.isArray(e.facilities)&&e.facilities.map((function(t,i){return e.facilities[i]=t instanceof _0x5781b8?{x:t.lng,y:t.lat}:t,e.facilities[i]})),e.parameter&&e.parameter.barrierPoints){var t=e.parameter.barrierPoints;Array.isArray(t)?t.map((function(t,i){return e.parameter.barrierPoints[i]=t instanceof _0x5781b8?{x:t.lng,y:t.lat}:t,e.parameter.barrierPoints[i]})):e.parameter.barrierPoints=[t instanceof _0x5781b8?{x:t.lng,y:t.lat}:t]}return e}_processFormat(e){return e||_0x55fbe7.GEOJSON}}const _0x13781f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x17fe83=_0x13781f(void 0,(function(){return _0x17fe83.toString().search("(((.+)+)+)+$").toString().constructor(_0x17fe83).search("(((.+)+)+)+$")}));_0x17fe83();class _0x3cd63d{constructor(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.scene))throw new WebGLPlot.DeveloperError("BIMInfoClickQueryHandler scene is required.");if(!WebGLPlot.defined(e.axiosUrl)||""==e.axiosUrl||!e.axiosUrl.includes("MGISDataQueryImpl"))throw new WebGLPlot.DeveloperError("BIMInfoClickQueryHandler url is required.");this._scene=e.scene,this.axiosUrl=e.axiosUrl,this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.scene.canvas)}activate(e){if(!WebGLPlot.defined(this._scene)||!WebGLPlot.defined(this.handler))return;let t=this;this.handler.setInputAction((function(i){const n=i.position,r=t._scene.pick(n);if(!r)return;let{id:o,primitive:a}=r;if(!a||null==o)return;a._transparentBackColor=new Cesium.Color(1,0,0,1),a._section=!0;let s=a.name;if(WebGLPlot.defined(s)&&s.includes("@")){let i=s.split("@")[0].toUpperCase();_0x150d44(t.axiosUrl,i,o,"BIMDataBox",n,e)}else if("string"==typeof o&&-1!==o.indexOf("_")){let i=o.split("_")[0],r=Number(o.split("_")[1]);if("people"===i)return void _0x150d44(t.axiosUrl,"LJBD_PB_SY_JBXX",r,"PeopleDataBox",n,e);if("build"===i)return void _0x150d44(t.axiosUrl,"LJBD_PB_JZW_JBXX",r,"BuildDataBox",n,e)}}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK)}deactivate(){this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK)}}function _0x150d44(e,t,i,n,r,o){const a=e+"getDataByIDsWithOutCfgResults.json";let s={arg0:t,arg1:[i]};var l=JSON.stringify(s);let u=_0x15292b();u.open("POST",a,!1,"",""),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.send(l);var c=JSON.parse(u.responseText,null).newResourceLocation;u.open("GET",encodeURI(c),!1,"",""),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.send();let h=JSON.parse(u.responseText);WebGLPlot.defined(h)&&o&&o(h,r)}function _0x15292b(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}var _0x37fa90=(_0x593151=!0,function(e,t){var i=_0x593151?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x593151=!1,i}),_0x246f30=_0x37fa90(void 0,(function(){return _0x246f30.toString().search("(((.+)+)+)+$").toString().constructor(_0x246f30).search("(((.+)+)+)+$")})),_0x593151;_0x246f30();class _0x565d46{constructor(e){this.datasetNames=null,this.targetEpsgCode=null,this.targetPrj=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnCountOnly=!1,this.maxFeatures=null,this.hasGeometry=!0,this.aggregations=null,_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesParametersBase"}destroy(){var e=this;e.datasetNames=null,e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.hasGeometry=null,e.maxFeatures=null,e.targetEpsgCode=null,e.targetPrj=null,e.aggregation&&(e.aggregation=null)}}const _0x49a3c6=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x490de3=_0x49a3c6(void 0,(function(){return _0x490de3.toString().search("(((.+)+)+)+$").toString().constructor(_0x490de3).search("(((.+)+)+)+$")}));_0x490de3();class _0x1b5b86{constructor(e){this.attributeFilter=null,this.name=null,this.joinItems=null,this.linkItems=null,this.ids=null,this.orderBy=null,this.groupBy=null,this.fields=null,e&&Util.extend(this,e),this.CLASS_NAME="SuperMap.FilterParameter"}destroy(){var e=this;if(e.attributeFilter=null,e.name=null,e.joinItems){for(let t=0,i=e.joinItems,n=i.length;t<n;t++)i[t].destroy();e.joinItems=null}if(e.linkItems){for(let t=0,i=e.linkItems,n=i.length;t<n;t++)i[t].destroy();e.linkItems=null}e.ids=null,e.orderBy=null,e.groupBy=null,e.fields=null}}var _0xb37c08=(_0x79574a=!0,function(e,t){var i=_0x79574a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x79574a=!1,i}),_0xb6c674=_0xb37c08(void 0,(function(){return _0xb6c674.toString().search("(((.+)+)+)+$").toString().constructor(_0xb6c674).search("(((.+)+)+)+$")})),_0x79574a;_0xb6c674();class _0x24c8e8 extends _0x565d46{constructor(e){super(e),this.getFeatureMode="BOUNDS",this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode="CONTAIN",_0x57693f.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsParameters"}destroy(){super.destroy();var e=this;if(e.bounds&&(e.bounds.destroy(),e.bounds=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,i,n;return i={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},n={datasetNames:e.datasetNames,getFeatureMode:"BOUNDS",bounds:i,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new _0x1b5b86).name=e.datasetNames,t.fields=e.fields,n.queryParameter=t),e.attributeFilter&&(n.attributeFilter=e.attributeFilter,n.getFeatureMode="BOUNDS_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(n.maxFeatures=e.maxFeatures),"boolean"==typeof e.hasGeometry&&(n.hasGeometry=e.hasGeometry),e.targetEpsgCode&&(n.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(n.targetPrj=e.targetPrj),e.aggregations&&(n.aggregations=e.aggregations),_0x57693f.toJSON(n)}}var _0x1d9e8e=(_0x429070=!0,function(e,t){var i=_0x429070?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x429070=!1,i}),_0x3e5155=_0x1d9e8e(void 0,(function(){return _0x3e5155.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e5155).search("(((.+)+)+)+$")})),_0x429070;_0x3e5155();class _0x1e847d extends _0xd9c3dd{constructor(e,t){super(e,t),t=t||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.hasGeometry=!0,this.maxFeatures=null,this.format="GEOJSON",_0x57693f.extend(this,t),this.url=_0x57693f.urlPathAppend(this.url,"featureResults"),this.CLASS_NAME="SuperMap.GetFeaturesServiceBase"}destroy(){super.destroy();var e=this;e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.format=null,e.hasGeometry=null}processAsync(e){if(e){var t,i=this,n=!0;i.returnContent=e.returnContent,i.fromIndex=e.fromIndex,i.toIndex=e.toIndex,i.maxFeatures=e.maxFeatures,i.hasGeometry=e.hasGeometry,i.returnContent&&(i.url=_0x57693f.urlAppend(i.url,"returnContent="+i.returnContent),n=!1),null!=i.fromIndex&&null!=i.toIndex&&!isNaN(i.fromIndex)&&!isNaN(i.toIndex)&&i.fromIndex>=0&&i.toIndex>=0&&!n&&(i.url=_0x57693f.urlAppend(i.url,"fromIndex="+i.fromIndex+"&toIndex="+i.toIndex)),e.returnCountOnly&&(i.url=_0x57693f.urlAppend(i.url,"&returnCountOnly="+e.returnContent)),t=i.getJsonParameters(e),i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}serviceProcessCompleted(e){e=_0x57693f.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}getJsonParameters(e){var t="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata",i=this;return i.url=_0x57693f.urlPathAppend(i.url,t),i.url=_0x57693f.urlAppend(i.url,"returnContent=true"),_0x57693f.toJSON(e)}}var _0x386a23=(_0x29f301=!0,function(e,t){var i=_0x29f301?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29f301=!1,i}),_0x210ed5=_0x386a23(void 0,(function(){return _0x210ed5.toString().search("(((.+)+)+)+$").toString().constructor(_0x210ed5).search("(((.+)+)+)+$")})),_0x29f301;_0x210ed5();class _0x424915 extends _0x1e847d{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return _0x24c8e8.toJsonParameters(e)}}var _0x20a508=(_0x5ef097=!0,function(e,t){var i=_0x5ef097?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ef097=!1,i}),_0x1a234a=_0x20a508(void 0,(function(){return _0x1a234a.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a234a).search("(((.+)+)+)+$")})),_0x5ef097;_0x1a234a();class _0x54c5e3{constructor(e,t,i,n){SuperMap.Util.isArray(e)&&(n=e[3],i=e[2],t=e[1],e=e[0]),this.left=null!=e?SuperMap.Util.toFloat(e):this.left,this.bottom=null!=t?SuperMap.Util.toFloat(t):this.bottom,this.right=null!=i?SuperMap.Util.toFloat(i):this.right,this.top=null!=n?SuperMap.Util.toFloat(n):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.PlotBounds"}clone(){return new _0x54c5e3(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var i=Math.pow(10,e),n=Math.round(this.left*i)/i,r=Math.round(this.bottom*i)/i,o=Math.round(this.right*i)/i,a=Math.round(this.top*i)/i;return!0===t?r+","+n+","+a+","+o:n+","+r+","+o+","+a}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new WebGLPlot.Cartesian2(this.getWidth(),this.getHeight())}getCenterPixel(){return new WebGLPlot.Cartesian2((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new WebGLPlot.Cartesian2((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var i,n;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(i=t.lon,n=t.lat):(i=t.x,n=t.y);var r=(this.left-i)*e+i,o=(this.bottom-n)*e+n,a=(this.right-i)*e+i,s=(this.top-n)*e+n;return new _0x54c5e3(r,o,a,s)}add(e,t){if(null==e||null==t)throw new WebGLPlot.DeveloperError("PlotBounds.add cannot receive null values");return new _0x54c5e3(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new _0x54c5e3(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new _0x54c5e3(e.x,e.y,e.x,e.y);break;case"SuperMap.PlotBounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var i=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!i){var r=n.getWidth(),o=(n.left+n.right)/2,a=Math.round((e.lon-o)/r);i=this.containsLonLat({lon:e.lon-a*r,lat:e.lat},{inclusive:t.inclusive})}return i}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,i){if(null==i&&(i=!0),null==e||null==t)return!1;return i?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var i=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else i=this;null==t.inclusive&&(t.inclusive=!0);var n=!1,r=i.left===e.right||i.right===e.left||i.top===e.bottom||i.bottom===e.top;if(t.inclusive||!r){var o=e.bottom>=i.bottom&&e.bottom<=i.top||i.bottom>=e.bottom&&i.bottom<=e.top,a=e.top>=i.bottom&&e.top<=i.top||i.top>e.bottom&&i.top<e.top,s=e.left>=i.left&&e.left<=i.right||i.left>=e.left&&i.left<=e.right,l=e.right>=i.left&&e.right<=i.right||i.right>=e.left&&i.right<=e.right;n=(o||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),h=!u.containsBounds(i),d=!u.containsBounds(e);h&&!d?(e=e.add(-c,0),n=i.intersectsBounds(e,{inclusive:t.inclusive})):d&&!h&&(i=i.add(-c,0),n=e.intersectsBounds(i,{inclusive:t.inclusive}))}return n}containsBounds(e,t,i){null==t&&(t=!1),null==i&&(i=!0);var n=this.contains(e.left,e.bottom,i),r=this.contains(e.right,e.bottom,i),o=this.contains(e.left,e.top,i),a=this.contains(e.right,e.top,i);return t?n||r||o||a:n&&r&&o&&a}determineQuadrant(e){var t="",i=this.getCenterLonLat();return t+=e.lat<i.lat?"b":"t",t+=e.lon<i.lon?"l":"r"}wrapDateLine(e,t){var i=(t=t||{}).leftTolerance||0,n=t.rightTolerance||0,r=this.clone();if(e){for(var o=e.getWidth();r.left<e.left&&r.right-n<=e.left;)r=r.add(o,0);for(;r.left+i>=e.right&&r.right>e.right;)r=r.add(-o,0);var a=r.left+i;a<e.right&&a>e.left&&r.right-n>e.right&&(r=r.add(-o,0))}return r}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}static fromString(e,t){var i=e.split(",");return _0x54c5e3.fromArray(i,t)}static fromArray(e,t){return!0===t?new _0x54c5e3(e[1],e[0],e[3],e[2]):new _0x54c5e3(e[0],e[1],e[2],e[3])}static fromSize(e){return new _0x54c5e3(0,e.h,e.w,0)}static oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}var _0x2fac72=(_0x6071b2=!0,function(e,t){var i=_0x6071b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6071b2=!1,i}),_0x2ea9e2=_0x2fac72(void 0,(function(){return _0x2ea9e2.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ea9e2).search("(((.+)+)+)+$")})),_0x6071b2;_0x2ea9e2();class _0x3913cb extends ServiceBase{constructor(e,t){super(e,t)}getFeaturesByBounds(e,t,i){var n=this;new _0x424915(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}_processParams(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.fromIndex=e.fromIndex?e.fromIndex:0,e.toIndex=e.toIndex?e.toIndex:-1,e.isUseBatch=null!=e.isUseBatch&&e.isUseBatch,e.bounds&&(e.bounds=_0x218b23(e.bounds)),e):{}}_processFormat(e){return e||"GEOJSON"}}function _0x218b23(e){if(Array.isArray(e)&&e[0]instanceof WebGLPlot.Cartesian2){let t=Math.min(e[0].x,e[1].x),i=Math.min(e[0].y,e[1].y),n=Math.max(e[0].x,e[1].x),r=Math.max(e[0].y,e[1].y);return new _0x54c5e3(t,i,n,r)}return new _0x54c5e3}var _0x5c0d79=(_0x1fd4f4=!0,function(e,t){var i=_0x1fd4f4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fd4f4=!1,i}),_0x5a025b=_0x5c0d79(void 0,(function(){return _0x5a025b.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a025b).search("(((.+)+)+)+$")})),_0x1fd4f4;_0x5a025b();class _0x5870d3{constructor(e,t){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.viewer))throw new WebGLPlot.DeveloperError("RectQueryHandler viewer is required.");if(!WebGLPlot.defined(e.superMapDataUrl)||""===e.superMapDataUrl)throw new WebGLPlot.DeveloperError("RectQueryHandler superMapDataUrl is required.");this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.viewer.scene.canvas),this.active=!1,this.isDrawing=!1,this.bounds=null,this.boundsPts=[],this.fillColor=new WebGLPlot.Color(0,.35,.91,.4),this.outlineColor=new WebGLPlot.Color(0,1,0,1),this._superMapDataUrl=WebGLPlot.defaultValue(e.superMapDataUrl,""),this._queryFeatures=WebGLPlot.defaultValue(e.queryFeatures,[]),this._viewer=e.viewer,this.callback=t}setQueryFeatures(e){e&&e.length>0&&(this._queryFeatures=e)}activate(e){if(!0!==this.active){this._viewer.scene._canvas.style.cursor="crosshair",this.polygon&&(this._viewer.entities.remove(this.polygon),this.polygon=void 0),this.active=!0;var t=this;this.handler.setInputAction((function(i){_0x194d8c(i,t,e)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction((function(e){_0xc9b814(e,t)}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction((function(i){_0x4fae7c(i,t,e)}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}}deactivate(){this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this.polygon&&(this._viewer.entities.remove(this.polygon),this.polygon=void 0),this._viewer.scene._canvas.style.cursor=""}queryByDrawRect(){_0x56024b(this)}queryByBounds(e,t){let i=Math.min(e.x,t.x),n=Math.min(e.y,t.y),r=Math.max(e.x,t.x),o=Math.max(e.y,t.y);this._positions=[],this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(i,o,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(r,o,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(r,n,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(i,n,0)),this.boundsPts=[],this.boundsPts.push(new WebGLPlot.Cartesian2(i,o)),this.boundsPts.push(new WebGLPlot.Cartesian2(r,n)),this.bounds={leftBottom:{x:i,y:n},rightTop:{x:r,y:o}},_0x56024b(this)}}function _0x194d8c(e,t,i){var n=t;if(n&&n.active){var r=n._viewer.scene.pickPosition(e.position);r&&(n.isDrawing||n.polygon?n.polygon&&(n.isDrawing=!1,n.active=!1,n._clickPts[1]=r,n._positions=_0x39124b(n,n._clickPts),i&&i(n.boundsPts),n._viewer.scene._canvas.style.cursor=""):(n.isDrawing=!0,n._clickPts=[r.clone(),r.clone()],n._positions=[r.clone(),r.clone()],n.polygon=n._viewer.entities.add({name:"RectQuery__Rect",polygon:{hierarchy:new WebGLPlot.CallbackProperty((function(){return{positions:n._positions}}),!1),material:n.fillColor,outline:!0,outlineColor:n.outlineColor},depthTestEnabled:!0})))}}function _0xc9b814(e,t){var i=t;if(i&&i.active&&i.isDrawing){var n=i._viewer.scene.pickPosition(e.endPosition);n&&(i._clickPts[1]=n,i._positions=_0x39124b(i,i._clickPts))}}function _0x4fae7c(e,t,i){var n=t;if(n&&n.active&&n.isDrawing){n.isDrawing=!1,n.active=!1;var r=n._viewer.scene.pickPosition(e.position);r&&(n._clickPts[1]=r,n._positions=_0x39124b(n,n._clickPts)),i&&i(n.boundsPts),n._viewer.scene._canvas.style.cursor=""}}function _0x39124b(e,t){var i=[];if(e.boundsPts=[],2===t.length){var n=WebGLPlot.Cartographic.fromCartesian(t[0]),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=WebGLPlot.Cartographic.fromCartesian(t[1]),s=WebGLPlot.CesiumMath.toDegrees(a.longitude),l=WebGLPlot.CesiumMath.toDegrees(a.latitude);let u=Math.min(r,s),c=Math.min(o,l),h=Math.max(r,s),d=Math.max(o,l);i.push(new WebGLPlot.Cartesian3.fromDegrees(u,d,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(h,d,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(h,c,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(u,c,0)),e.bounds={leftBottom:{x:u,y:c},rightTop:{x:h,y:d}},e.boundsPts.push(new WebGLPlot.Cartesian2(r,o)),e.boundsPts.push(new WebGLPlot.Cartesian2(s,l))}return i}function _0x56024b(e){let t=[];for(let r=0;r<e._queryFeatures.length;r++){const o=e._queryFeatures[r],a=o.axiosUrl+"queryByBoundsResults.json";let s=o.datasetNames;if(s.length>0){let r={arg0:s,arg1:e.bounds};var i=JSON.stringify(r);let o=_0x1cf8f3();o.open("POST",encodeURI(a),!1,"",""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),o.send(i);var n=JSON.parse(o.responseText,null).newResourceLocation;o.open("GET",encodeURI(n),!1,"",""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),o.send();let l=JSON.parse(o.responseText);t.push(l)}e.callback&&e.callback(t)}}function _0x1cf8f3(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}const _0x361582=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x226f2c=_0x361582(void 0,(function(){return _0x226f2c.toString().search("(((.+)+)+)+$").toString().constructor(_0x226f2c).search("(((.+)+)+)+$")}));_0x226f2c();class _0x301bce{constructor(e,t){this.viewer=e,this.init(e),this.updateOptionsParams(t)}init(e){this.clipPlanePositions=null,this.ClipPlaneShow=!1,this.clipPlaneScale=.1,this.LocalToWorldMatrix=null,this.layerNmaes=null}updateOptionsParams(e){!e||(WebGLPlot.defined(e.ClipPlaneShow)&&(this.ClipPlaneShow=e.ClipPlaneShow),WebGLPlot.defined(e.clipPlaneScale)&&(this.clipPlaneScale=e.clipPlaneScale))}setPlanePositions(e){this.LocalToWorldMatrix=e;let t=10*this.clipPlaneScale,i=new WebGLPlot.Cartesian3(t,t,0),n=new WebGLPlot.Cartesian3(t,-t,0),r=new WebGLPlot.Cartesian3(-t,-t,0),o=new WebGLPlot.Cartesian3(-t,t,0),a=WebGLPlot.Matrix4.multiplyByPoint(e,o,new WebGLPlot.Cartesian3),s=WebGLPlot.Matrix4.multiplyByPoint(e,r,new WebGLPlot.Cartesian3),l=WebGLPlot.Matrix4.multiplyByPoint(e,n,new WebGLPlot.Cartesian3),u=WebGLPlot.Matrix4.multiplyByPoint(e,i,new WebGLPlot.Cartesian3);this.clipPlanePositions=[a,s,l,u],this.clipPlaneUpdate()}addsurface(){this.planeSurface=this.viewer.entities.add({id:"clip-plane",polygon:{hierarchy:new Cesium.CallbackProperty((()=>({positions:this.clipPlanePositions,holes:[]})),!1),show:new Cesium.CallbackProperty((()=>this.ClipPlaneShow),!1),material:WebGLPlot.Color.GOLD.withAlpha(.2),outline:!0,outlineColor:WebGLPlot.Color.GOLD,perPositionHeight:!0}})}setClipPlane(e,t){this.clear();let i=this.degreeToCartesian3(e),n=WebGLPlot.Transforms.eastNorthUpToFixedFrame(i);this.layerNmaes=t,this.setPlanePositions(n),this.addsurface()}clipPlaneUpdate(){if(!this.clipPlanePositions)return;const e=this.getAllS3MTilesLayer(this.viewer.scene);0!==e.size&&e.forEach((e=>{if(this.layerNmaes&&this.layerNmaes.includes(e.name))e.setCustomClipPlane(this.clipPlanePositions[0],this.clipPlanePositions[1],this.clipPlanePositions[2]);else if(this.layerNmaes&&this.layerNmaes.includes(e._name))for(let t of e._s3mLayers._array)t.setCustomClipPlane(this.clipPlanePositions[0],this.clipPlanePositions[1],this.clipPlanePositions[2])}))}clear(){const e=this.getAllS3MTilesLayer(this.viewer.scene);0!==e.size&&(e.forEach((e=>{if(null==e._layerConfigs)e.clearCustomClipBox();else for(let t of e._s3mLayers._array)t.clearCustomClipBox()})),this.planeSurface&&(this.viewer.entities.remove(this.planeSurface),this.planeSurface=null,this.clipPlanePositions=null,this.LocalToWorldMatrix=null))}degreeToCartesian3(e){let t=this.viewer.scene.globe.ellipsoid,i=WebGLPlot.Cartographic.fromDegrees(e.lng,e.lat,e.alt);return t.cartographicToCartesian(i)}destroy(){this.clear(),this.modelEditor&&this.modelEditor.destroy()}getAllS3MTilesLayer(){var e=new Map;if(window.SuperMap3D&&void 0===this.viewer.scene.layers){let t=this.viewer.scene.primitives._primitives;for(let i=0;i<t.length;i++){const n=t[i];n instanceof WebGLPlot.S3MTilesLayer&&e.set(n.name,n)}}else this.viewer.scene.layers instanceof WebGLPlot.Layers&&this.viewer.scene.layers._layers._array.map((t=>{t instanceof WebGLPlot.S3MTilesLayer&&e.set(t.name,t)}));return e}}const _0x16c376=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x32dfba=_0x16c376(void 0,(function(){return _0x32dfba.toString().search("(((.+)+)+)+$").toString().constructor(_0x32dfba).search("(((.+)+)+)+$")}));function _0xeb17d7(e,t){this.viewer=e,this.clipPlaneclipPlane=new _0x301bce(e,{ClipPlaneShow:!1}),this.tsBuildDatas=t.tsBuildDatas,this.levelHeight=t.levelHeight,this.BIMHeight=t.BIMHeight,this.levelNum=t.levelNum}function _0x2aff73(e){var t=new Map;if(window.SuperMap3D&&void 0===e.scene.layers){let i=e.scene.primitives._primitives;for(let e=0;e<i.length;e++){const n=i[e];n instanceof WebGLPlot.S3MTilesLayer&&t.set(n.name,n)}}else e.scene.layers instanceof WebGLPlot.Layers&&e.scene.layers._layers._array.map((e=>{e instanceof WebGLPlot.S3MTilesLayer&&t.set(e.name,e)}));return t}_0x32dfba(),_0xeb17d7.prototype.setLayerShow=function(e,t){for(let r=0;r<this.tsBuildDatas.length;r++){let o=this.tsBuildDatas[r].Name,a=this.tsBuildDatas[r].CilpLayers,s=this.tsBuildDatas[r].HideLayers,l=this.tsBuildDatas[r].ShowLayers,u=this.tsBuildDatas[r].ShowImageLayers,c=this.tsBuildDatas[r].Center,h=this.tsBuildDatas[r].Height,d=this.tsBuildDatas[r].BaseHeight;if(e===o){if(0!==a.length&&void 0!==h&&void 0!==d&&this.clipPlaneclipPlane.setClipPlane({lng:c.x,lat:c.y,alt:this.BIMHeight-this.levelHeight*(this.levelNum-t)},a),0===a.length&&this.clipPlaneclipPlane.clear(),0!==s.length&&this.hideLayers(s),0!==l.length&&(this.showLayers(l),"showUnderLinePipe"===o)){var i=WebGLPlot.CesiumMath.toDegrees(1.9875852260482232),n=WebGLPlot.CesiumMath.toDegrees(.3928307475708383);this.viewer.scene.camera.setView({destination:new WebGLPlot.Cartesian3.fromDegrees(i,n,360),orientation:{heading:1.1366928213021517,pitch:-1.063671189141393,roll:6.283184795466507}})}!0===u?this.showImageryLayers():this.hideImageryLayers()}}},_0xeb17d7.prototype.showLayers=function(e){const t=_0x2aff73(this.viewer);0!==t.size&&t.forEach((t=>{if(e.includes(t.name)||e.includes(t._name))if(null==t._layerConfigs)t.visible=!0;else for(let e of t._layerConfigs._array)e.isVisible=!0}))},_0xeb17d7.prototype.hideLayers=function(e){const t=_0x2aff73(this.viewer);0!==t.size&&t.forEach((t=>{if(e.includes(t.name)||e.includes(t._name))if(null==t._layerConfigs)t.visible=!1;else for(let e of t._layerConfigs._array)e.isVisible=!1}))},_0xeb17d7.prototype.hideImageryLayers=function(){let e=this.viewer.scene.imageryLayers._layers;for(let t=1;t<e.length;++t)e[t].show=!1},_0xeb17d7.prototype.showImageryLayers=function(){let e=this.viewer.scene.imageryLayers._layers;for(let t=1;t<e.length;++t)e[t].show=!0};var _0x3c11d9=(_0x51b547=!0,function(e,t){var i=_0x51b547?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51b547=!1,i}),_0x4dbbf5=_0x3c11d9(void 0,(function(){return _0x4dbbf5.toString().search("(((.+)+)+)+$").toString().constructor(_0x4dbbf5).search("(((.+)+)+)+$")})),_0x51b547;function _0x2a4279(){this.dataStorege=new Array,this.add=_0x430099,this.show=_0x3ef84d,this.find=_0x43c3fc,this.remove=_0x4718c8,this.count=_0x33bb27,this.kSort=_0x2cb08b,this.vSort=_0x15a206,this.clear=_0xa7df0e}function _0x430099(e,t){this.dataStorege[e]=t}function _0x3ef84d(){for(var e in this.dataStorege)console.log(e+":"+this.dataStorege[e])}function _0x43c3fc(e){return this.dataStorege[e]}function _0x4718c8(e){delete this.dataStorege[e]}function _0x33bb27(){var e=0;for(var t in Object.keys(this.dataStorege))++e;return e}function _0x2cb08b(){var e=this.dataStorege,t=Object.keys(e).sort();for(var i in t)console.log(t[i]+":"+e[t[i]])}function _0x15a206(){var e=this.dataStorege,t=Object.keys(e).sort((function(t,i){return e[t]-e[i]}));for(var i in t)console.log(t[i]+":"+e[t[i]])}function _0xa7df0e(){for(var e in this.dataStorege)delete this.dataStorege[e]}_0x4dbbf5();const _0x2a8801=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x375f1f=_0x2a8801(void 0,(function(){return _0x375f1f.toString().search("(((.+)+)+)+$").toString().constructor(_0x375f1f).search("(((.+)+)+)+$")}));_0x375f1f();class _0x3e45e1{constructor(){}static getAllS3MTilesLayer(e){var t=new Map;if(window.SuperMap3D&&void 0===e.layers){let i=e.primitives._primitives;for(let e=0;e<i.length;e++){const n=i[e];n instanceof WebGLPlot.S3MTilesLayer&&t.set(n.name,n)}}else e.layers instanceof WebGLPlot.Layers&&e.layers._layers._array.map((e=>{e instanceof WebGLPlot.S3MTilesLayer&&t.set(e.name,e)}));return t}static createS3MTilesLayersTreeData(e,t){let i=[],n=[];const r=this.getAllS3MTilesLayer(e.scene);if(WebGLPlot.defined(t)){let e=function(t){return t?t.filter((t=>{if(t.children=e(t.children),t.node){if(!r.get(t.label))return!1;n.push(t.label),t.data=r.get(t.label)}return!0})):[]};i=e(window.tsLayerPanelConfig),r.forEach((e=>{n.includes(e.name)||i.push({label:e.name,data:e,show:e.visible})}))}else r.size>0&&r.forEach((e=>{var t={label:e.name,data:e,children:[],show:e.visible};i.push(t)}));return i}static createImageryLayerTreeData(e){let t=[];return e&&e.imageryLayers.length>0&&e.imageryLayers._layers&&(t=e.imageryLayers._layers.map((e=>{const t=e._imageryProvider;let i="";if(t._image){const e=t.url.split("/");i=e[e.length-1].split(".")[0],i=decodeURI(i)}else if(t._resource){const e=t._resource.url.split("/");i=e[e.length-1].split("/")[0],i.includes(".")&&(i=i.split(".")[0]),""===i&&(i=e[e.length-2].split("/")[0]),i=decodeURI(i)}return{label:i,data:e,show:e.show}}))),t}static createTerrainProviderTreeData(e){let t=[];return e&&e.terrainProvider&&e.terrainProvider.tablename&&(t=e.terrainProvider._layers.map((t=>{let i=e.terrainProvider;return{label:e.terrainProvider.tablename,data:i,show:i.visible}}))),t}}const _0x4d283b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5c7284=_0x4d283b(void 0,(function(){return _0x5c7284.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c7284).search("(((.+)+)+)+$")}));_0x5c7284(),WebGLPlot.wtsConfigManager=void 0;class _0x5ca3d2{constructor(e){try{if(!e||""===e||!e.includes("http://"))throw console.log("WTSConfig dataServerUrl is error!!!"),this._urlIsError=!0,"PlotCustomRadar scene is required.";if(this.dataServerUrl=e,this.queryServerUrl=this.dataServerUrl.split("datasources")[0]+"featureResults.rjson?returnContent=true",this._commit=_0x4dca24(),this._commit.open("GET",encodeURI(e),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(),404===this._commit.status)throw this._urlIsError=!0,"PlotCustomRadar scene is required."}catch(e){console.log(e)}}static getInstance(e){return e&&(!WebGLPlot.wtsConfigManager||WebGLPlot.wtsConfigManager.plotServerUrl!==e)&&(WebGLPlot.wtsConfigManager=new _0x5ca3d2(e)),WebGLPlot.wtsConfigManager}updateDoorsCfg(e){if(e.length<=0||this._urlIsError)return!1;_0x489f36(this._commit,e,this.dataServerUrl,"doorsConfig")}getDoorsCfg(){if(this._urlIsError)return[];return _0x229631(this._commit,this.dataServerUrl,"doorsConfig")}updateQuickPositionCfg(e){if(e.length<0||this._urlIsError)return!1;const t="quickPositionConfig",i=this.dataServerUrl+"/"+t+"/features.rjson";let n=[];n.push("groupName"),n.push("groupUuID"),n.push("keyCode"),n.push("stopUuID");let r=Object.keys(e[0].stops[0].stop);for(let e=0;e<r.length;e++)"key"!==r[e]&&n.push(r[e]);_0x1c58a2(this._commit,this.dataServerUrl,t)?_0x5862ab(this._commit,i):_0x107107(this._commit,t,this.dataServerUrl,n);let o=[];o.push(_0x2bd6ea(n));for(let t=0;t<e.length;t++){const i=e[t];for(let e=0;e<i.stops.length;e++){const t=i.stops[e].stop;t.stopUuID=i.stops[e].uuid,t.keyCode=t.key,t.groupName=i.groupName,t.groupUuID=i.uuid;let r=[];for(let e=0;e<n.length;e++)r.push(t[n[e]]);let a=_0x3e3563(n,r);o.push(a)}}_0x154efc(this._commit,i,o)}getQuickPositionCfg(){if(this._urlIsError)return[];let e=_0x229631(this._commit,this.dataServerUrl,"quickPositionConfig"),t=new Map;for(let i=0;i<e.length;i++){const n=e[i];let r={};r.key=n.keyCode,r.lat=n.lat,r.lng=n.lng,r.alt=n.alt,r.heading=n.heading,r.roll=n.roll,r.pitch=n.pitch,r.second=n.second,r.uuid=n.stopUuID,r.name=n.name,r.groupName=n.groupName,r.groupUuID=n.groupUuID,t.get(n.groupName)||t.set(n.groupName,[]),t.get(n.groupName).push(r)}let i=[];return t.forEach((function(e,t,n){let r={};r.groupName=t,e.length>0&&(r.uuid=e[0].groupUuID),r.stops=e,i.push(r)})),i}updateBuildClipCfg(e){if(e.length<0||this._urlIsError)return!1;_0x489f36(this._commit,e,this.dataServerUrl,"buildClipsConfig")}getBuildClipCfg(){if(this._urlIsError)return[];return _0x229631(this._commit,this.dataServerUrl,"buildClipsConfig")}updataLayer3DGroupCfg(e){if(e.length<0||this._urlIsError)return!1;_0x489f36(this._commit,e,this.dataServerUrl,"Layer3DGroupCfg")}getLayer3DGroupCfg(){if(this._urlIsError)return[];return _0x229631(this._commit,this.dataServerUrl,"Layer3DGroupCfg")}updateCommonSymbolsCfg(e){if(e.length<0||this._urlIsError)return!1;_0x489f36(this._commit,e,this.dataServerUrl,"commonSymbolsConfig")}getCommonSymbols(){if(this._urlIsError)return[];return _0x229631(this._commit,this.dataServerUrl,"commonSymbolsConfig")}updateOhterSimpleCfg(e,t){if(e.length<0||this._urlIsError)return!1;_0x489f36(this._commit,e,this.dataServerUrl,t)}getOhterSimpleCfg(e){return this._urlIsError?[]:_0x229631(this._commit,this.dataServerUrl,e)}deleteDataset(e){_0x4c0687(this._commit,e,this.dataServerUrl)}}function _0x154efc(e,t,i){_0x35bea4(e,t,i)}function _0x5862ab(e,t){t+="?_method=DELETE&deleteMode=SQL";e.open("POST",encodeURI(t),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify({attributeFilter:"SmID>0"}))}function _0x35bea4(e,t,i){e.open("POST",encodeURI(t),!0,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(i))}function _0x2bd6ea(e){let t={fieldNames:["SmID","SmUserID"],fieldValues:["0","0"],geometry:null};for(let i in e){const n=e[i];t.fieldNames.push(n),t.fieldValues.push(n)}return t}function _0x3e3563(e,t){let i={fieldNames:["SmID","SmUserID"],fieldValues:["0","0"],geometry:null};for(let n in e){const r=e[n],o=t[n];i.fieldNames.push(r),i.fieldValues.push(o)}return i}function _0x19d83c(e){let t=[];for(let i=1;i<e.length;i++){const n=e[i];let r={};for(let t=2;t<n.fieldValues.length;t++){const i=e[0].fieldValues[t];r[i]=n.fieldValues[t],n.fieldValues[t].includes(",")&&(r[i]=JSON.parse(n.fieldValues[t]))}t.push(r)}return t}function _0x1c58a2(e,t,i){e.open("GET",encodeURI(t+".json"),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(null);let n=JSON.parse(e.responseText,null);return!!(n&&n.datasetNames&&n.datasetNames.includes(i))}function _0x489f36(e,t,i,n){const r=i+"/"+n+"/features.rjson";if(t.length<=0)return void _0x5862ab(e,r);let o=[],a=Object.keys(t[0]);for(let e=0;e<a.length;e++)o.push(a[e]);_0x1c58a2(e,i,n)?_0x5862ab(e,r):_0x107107(e,n,i,o);let s=[];s.push(_0x2bd6ea(o));for(let e=0;e<t.length;e++){const i=t[e];let n=[];for(let e=0;e<o.length;e++)n.push(i[o[e]]);let r=_0x3e3563(o,n);s.push(r)}_0x154efc(e,r,s)}function _0x229631(e,t,i){return _0x19d83c(_0x4175ed(e,t,i))}function _0x4175ed(e,t,i){const n=t+"/"+i+"/features.json";let r;e.open("GET",encodeURI(n),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");try{if(e.send(),r=JSON.parse(e.responseText,null),r.error)return console.log("WTSConfig request error!!!",r.error),[];if(r.featureCount<=0)return[]}catch(e){return console.log("WTSConfig request error!!!",e),[]}const o=n+"?fromIndex=0&toIndex="+(r.featureCount-1).toString();e.open("GET",encodeURI(o),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(),r=JSON.parse(e.responseText,null);let a=[];for(let t=0;t<r.childUriList.length;t++){const i=r.childUriList[t]+".json";e.open("GET",encodeURI(i),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send();let n=JSON.parse(e.responseText,null);a.push(n)}return a}function _0x107107(e,t,i,n){let r=i+".json",o={datasetType:"TABULAR",datasetName:t};if(e.open("POST",encodeURI(r),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(o)),JSON.parse(e.responseText,null).succeed){let r=i+"/"+t+"/fields.rjson";for(let t=0;t<n.length;t++){const i=n[t];let o={isZeroLengthAllowed:"true",maxLength:"50000",isRequired:"false",name:i,caption:i,type:"WTEXT",defaultValue:"null",isSystemField:"false"};e.open("POST",encodeURI(r),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(o)),JSON.parse(e.responseText,null)}}}function _0x4c0687(e,t,i){let n=i+"/"+t+".rjson";e.open("DELETE",encodeURI(n),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(null)}function _0x4dca24(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}var _0x293844=(_0x41c9e9=!0,function(e,t){var i=_0x41c9e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41c9e9=!1,i}),_0x21fa44=_0x293844(void 0,(function(){return _0x21fa44.toString().search("(((.+)+)+)+$").toString().constructor(_0x21fa44).search("(((.+)+)+)+$")})),_0x41c9e9;function _0x51fe51(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.SampleDataModelsCfg=WebGLPlot.defaultValue(e.SampleDataModelsCfg,[]),this.elementsCfg=WebGLPlot.defaultValue(e.elementsCfg,[]),this.tsBuildDatas=WebGLPlot.defaultValue(e.tsBuildDatas,[]),this.geoLayerConfig=WebGLPlot.defaultValue(e.geoLayerConfig,[]),this.MGISQueryConfig=WebGLPlot.defaultValue(e.MGISQueryConfig,[]),this.tsPositions=WebGLPlot.defaultValue(e.tsPositions,[])}_0x21fa44(),_0x51fe51.prototype.fromJSON=function(e){this.SampleDataModelsCfg=e.SampleDataModelsCfg,this.elementsCfg=e.elementsCfg,this.tsBuildDatas=e.tsBuildDatas,this.geoLayerConfig=e.geoLayerConfig,this.MGISQueryConfig=e.MGISQueryConfig,this.tsPositions=e.tsPositions},_0x51fe51.prototype.toJSON=function(){return'{"SampleDataModelsCfg":'+WebGLPlot.toJSON(this.SampleDataModelsCfg)+',"elementsCfg":'+WebGLPlot.toJSON(this.elementsCfg)+',"tsBuildDatas":'+WebGLPlot.toJSON(this.tsBuildDatas)+',"geoLayerConfig":'+WebGLPlot.toJSON(this.geoLayerConfig)+',"MGISQueryConfig":'+WebGLPlot.toJSON(this.MGISQueryConfig)+',"tsPositions":'+WebGLPlot.toJSON(this.tsPositions)+"}"},_0x51fe51.prototype.destory=function(){this.SampleDataModelsCfg=null,this.elementsCfg=null,this.tsBuildDatas=null,this.geoLayerConfig=null,this.MGISQueryConfig=null,this.tsPositions=null};var _0x105d8b=(_0x235f3a=!0,function(e,t){var i=_0x235f3a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x235f3a=!1,i}),_0x34c226=_0x105d8b(void 0,(function(){return _0x34c226.toString().search("(((.+)+)+)+$").toString().constructor(_0x34c226).search("(((.+)+)+)+$")})),_0x235f3a;_0x34c226();var WebGLPlot$2=window.WebGLPlot=window.WebGLPlot||{},_0xf1e015=null,_0x51bfe6=void 0;function _0x290856(e){e=WebGLPlot$2.defaultValue(e,WebGLPlot$2.defaultValue.EMPTY_OBJECT),this._serverUrl=WebGLPlot$2.defaultValue(e.serverUrl,WebGLPlot$2.Plotting.serverUrl),this._configData=WebGLPlot$2.defaultValue(e.configSmlInfo,new _0x51fe51),this._configSmlFileName=WebGLPlot$2.defaultValue(e._configSmlFileName,"WTSPlotConfig_DoNotDel"),this._openSmlFileCompleted=new WebGLPlot$2.Event,this._openSmlFileFailed=new WebGLPlot$2.Event,this._saveSmlFileCompleted=new WebGLPlot$2.Event,this._saveSmlFileFailed=new WebGLPlot$2.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}}}_0x290856.getInstance=function(e){return _0xf1e015||(_0xf1e015=new WebGLPlot$2.ConfigManager(e)),_0xf1e015},_0x290856.prototype.openSmlFileOnServer=function(e,t){e||(e=this._configSmlFileName);var i=this;function n(e){i._openSmlFileFailed.raiseEvent(),"function"==typeof t&&t({success:!1,message:"Open failed"})}var r=WebGLPlot$2.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(r){var o;r.result?r.result.succeed?(o=r.result,i._getCompletedInit(o,e),"function"==typeof t&&t({success:!0,configSmlFileName:e})):n():r.error&&n()}),this)}},_0x290856.prototype._getCompletedInit=function(e,t){if(this._configSmlFileName=t,e.tsPositions)for(var i=0;i<e.tsPositions.length;i++){var n=e.tsPositions[i].key;e.tsPositions[i].key=n.replaceAll("%2b","+")}this.openConfigDataFromConfigData(e)},_0x290856.prototype.openConfigDataFromConfigData=function(e){this._configData.fromJSON(e),e.SampleDataModelsCfg&&(this.configData.SampleDataModelsCfg=e.SampleDataModelsCfg),e.elementsCfg&&(this.configData.elementsCfg=e.elementsCfg),e.tsBuildDatas&&(this.configData.tsBuildDatas=e.tsBuildDatas),e.geoLayerConfig&&(this.configData.geoLayerConfig=e.geoLayerConfig),e.MGISQueryConfig&&(this.configData.MGISQueryConfig=e.MGISQueryConfig),e.tsPositions&&(this.configData.tsPositions=e.tsPositions),this._openSmlFileCompleted.raiseEvent(e)},_0x290856.prototype.saveSmlFileToServer=function(e,t){if(!WebGLPlot$2.defined(e))throw new WebGLPlot$2.DeveloperError("Local ConfigData Path is required.");WebGLPlot$2.defaultValue(t,!1)},_0x290856.prototype._save=function(e,t){var i=this;function n(e){var t,n;e?(n=e,i._saveSmlFileCompleted.raiseEvent(n)):i._saveSmlFileFailed.raiseEvent(t)}var r=i._serverUrl,o=WebGLPlot$2.smlFileService(r,this.options.serviceParams);if(o){var a=o.editSmlFileParams;a.method="POST",a.sitData=this.saveConfigData(),a.smlFileName=e,a.isCover=t,o.smlFileService.editSMLFile(a,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}},_0x290856.prototype.saveConfigData=function(){var e=new _0x51fe51;return e.SampleDataModelsCfg=_0x51bfe6.SampleDataModelsCfg,e.elementsCfg=_0x51bfe6.elementsCfg,e.tsBuildDatas=_0x51bfe6.tsBuildDatas,e.geoLayerConfig=_0x51bfe6.geoLayerConfig,e.MGISQueryConfig=_0x51bfe6.MGISQueryConfig,e.tsPositions=_0x51bfe6.tsPositions,e},Object.defineProperties(_0x290856.prototype,{serverUrl:{get:function(){return this._serverUrl}},configData:{get:function(){return this._configData},set:function(e){e!==this._configData&&(this._configData=e)}},configSmlFileName:{get:function(){return this._configSmlFileName},set:function(e){e!==this._configSmlFileName&&(this._configSmlFileName=e)}},openSmlFileCompleted:{get:function(){return this._openSmlFileCompleted}},openSmlFileFailed:{get:function(){return this._openSmlFileFailed}},saveSmlFileFailed:{get:function(){return this._saveSmlFileFailed}},saveSmlFileCompleted:{get:function(){return this._saveSmlFileCompleted}}}),WebGLPlot$2.ConfigManager=_0x290856;var _0x41e16b=(_0x132689=!0,function(e,t){var i=_0x132689?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x132689=!1,i}),_0x281989=_0x41e16b(void 0,(function(){return _0x281989.toString().search("(((.+)+)+)+$").toString().constructor(_0x281989).search("(((.+)+)+)+$")})),_0x132689;_0x281989();class _0x1f291c{constructor(){}static doContourAnalyst(e,t,i,n,r){void 0===t&&(t=theCrimePoint),_0x1f291c.entity&&_0x1f291c.clear(e);let o=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,i);_0x1f291c.entityEllipse=e.entities.add({position:o,ellipse:{height:i,semiMinorAxis:n,semiMajorAxis:n,material:new WebGLPlot.Color(1,1,0,.35),outline:!0}}),_0x1f291c.entityCirclePt=e.entities.add({position:o,point:{pixelSize:5,color:WebGLPlot.Color.WHITE,outlineColor:WebGLPlot.Color.fromCssColorString("#fff"),outlineWidth:2,show:!0}}),_0x1f291c.entityPolyline=e.entities.add({polyline:{show:!0,positions:WebGLPlot.Cartesian3.fromDegreesArrayHeights([t.x,t.y,i,r.x,r.y,i,r.x,r.y,0]),width:3,material:WebGLPlot.Color.fromCssColorString("#51ff00"),loop:!0,clampToGround:!1}});var a=(r.x+t.x)/2,s=(r.y+t.y)/2;_0x1f291c.labels=e.scene.primitives.add(new WebGLPlot.LabelCollection({depthTestEnable:!1})),_0x1f291c.labels.add({position:WebGLPlot.Cartesian3.fromDegrees(a,s,i+10),font:"500 16px sans-serif",style:WebGLPlot.LabelStyle.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:WebGLPlot.Color.BLACK,showBackground:!0,backgroundColor:WebGLPlot.Color.fromCssColorString("rgba(38, 38, 38, 0.85)"),pixelOffset:new WebGLPlot.Cartesian2(15,0),pixelOffsetScaleByDistance:new WebGLPlot.NearFarScalar(150,3,15e6,.5),text:"height:"+i+"m\nradius:"+n+"m",show:!0,horizontalOrigin:WebGLPlot.HorizontalOrigin.LEFT})}static clear(e){_0x1f291c.entity&&(e.entities.remove(_0x1f291c.entity),e.entities.remove(_0x1f291c.entityCirclePt),e.entities.remove(_0x1f291c.entityPolyline),e.entities.remove(_0x1f291c.labels),_0x1f291c.entity=void 0),_0x1f291c.textGeo&&superMapTrackingLayer.removeGeoGraphicObject(_0x1f291c.textGeo)}}_0x1f291c.entity=1,_0x1f291c.textGeo=void 0;var _0x3bd5b1=(_0x4e9b08=!0,function(e,t){var i=_0x4e9b08?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e9b08=!1,i}),_0x494b94=_0x3bd5b1(void 0,(function(){return _0x494b94.toString().search("(((.+)+)+)+$").toString().constructor(_0x494b94).search("(((.+)+)+)+$")})),_0x4e9b08;_0x494b94();var WebGLPlot$1=window.WebGLPlot=window.WebGLPlot||{};function _0x14bd2c(e){this.viewer=e.viewer,this.theCrimePoint=WebGLPlot$1.defaultValue(e.theCrimePoint,new _0x11ff81(113.88122956581786,22.50809724778502,0)),this.groundEfficiency=void 0}function _0x4d9b51(e,t,i){WebGLPlot$1.defined(i)||(i=15);const n=e/6378137;for(var r=[_0x24d2b4(t[1]),_0x24d2b4(t[0])],o=[],a=0;a<i;a++){const e=a*(360/i)*Math.PI/180,t=r[0]+n*Math.cos(e),s=r[1]+n*Math.sin(e);o.push([_0x36edc5(s),_0x36edc5(t)])}return o.push(o[0]),[o]}function _0x24d2b4(e){return e*Math.PI/180}function _0x36edc5(e){return 180*e/Math.PI}_0x14bd2c.prototype.contourAnalysisConfirm=function(e){this.groundEfficiency&&(this.groundEfficiency.destroy(),this.groundEfficiency=void 0);let t=e.height,i=e.radius,n=WebGLPlot$1.defined(e.minTerrainHeight)?e.minTerrainHeight:0;if(0===i)throw new WebGLPlot$1.DeveloperError("height or radius can not be empty!");for(var r=_0x4d9b51(i,[this.theCrimePoint.x,this.theCrimePoint.y],50),o=[],a=0;a<r[0].length;a++)o.push(r[0][a][0]),o.push(r[0][a][1]);_0x1f291c.doContourAnalyst(this.viewer,this.theCrimePoint,t,i,o),this.groundEfficiency=new _0x3a2d15({scene:scene,id:"sniperGroundEffect",color:WebGLPlot$1.Color.RED.withAlpha(.5),positions:o,minTerrainHeight:n})},_0x14bd2c.prototype.contourAnalysisClose=function(){_0x1f291c.clear(this.viewer),this.groundEfficiency&&this.groundEfficiency.destroy()},WebGLPlot$1.BuildContourAnalyst=_0x14bd2c;const _0x36f23a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x38f70b=_0x36f23a(void 0,(function(){return _0x38f70b.toString().search("(((.+)+)+)+$").toString().constructor(_0x38f70b).search("(((.+)+)+)+$")}));function _0x234d8c(e){this.viewer=e,this.doorEntitise=[],this.doorExcID=-1,this._doorClickEvent=new WebGLPlot.Event}function _0x492774(e,t){let i=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),n=WebGLPlot.Transforms.headingPitchRollQuaternion(i,new WebGLPlot.HeadingPitchRoll(WebGLPlot.CesiumMath.toRadians(e.radians),WebGLPlot.CesiumMath.toRadians(90),0)),r=t.entities.add({position:i,box:{dimensions:new WebGLPlot.Cartesian3(e.width,e.height,.5),material:new WebGLPlot.Color(1,0,0,.5)},orientation:n,show:!1});return r.show=!0,r}function _0xe1b5fe(e,t){isNaN(e.lon)||isNaN(e.lat)||isNaN(e.height)?console.warn("flyToMap:option is not correct"):e.heading?t.camera.flyTo({destination:WebGLPlot.Cartesian3.fromDegrees(e.lon,e.lat,e.height),orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},aim:!0}):t.camera.flyTo({destination:WebGLPlot.Cartesian3.fromDegrees(e.lon,e.lat,e.height),aim:!0})}_0x38f70b(),_0x234d8c.prototype.createDoors=function(e){if(-1===this.doorExcID){for(let t=0;t<e.length;t++){let i=e[t];this.doorEntitise.push(_0x492774(i,this.viewer))}this._doorClickEvent.raiseEvent(e)}},_0x234d8c.prototype.removeDoors=function(){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1),this.doorEntitise&&this.doorEntitise.length>0&&(this.doorEntitise.map((e=>{this.viewer.entities.remove(e)})),this.doorEntitise=[])},_0x234d8c.prototype.blinkDoor=function(e){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1);var t=this.doorEntitise[e];this.doorExcID=window.setInterval(function(){t.show=!t.show}.bind(this),500)},_0x234d8c.prototype.blinkDoors=function(e){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1);for(var t=[],i=0;i<e.length;i++)t.push(this.doorEntitise[e[i]]);this.doorExcID=window.setInterval(function(){t.map((e=>{e.show=!e.show}))}.bind(this),500)},_0x234d8c.prototype.blinkAllDoors=function(){if(-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1),!this.doorEntitise||this.doorEntitise.length<=0)return;let e=this;this.doorExcID=window.setInterval(function(){e.doorEntitise.map((e=>{e.show=!e.show}))}.bind(this),500)},_0x234d8c.prototype.flytoLocation=function(e){_0xe1b5fe(e,this.viewer)},Object.defineProperties(_0x234d8c.prototype,{doorClickEvent:{get:function(){return this._doorClickEvent}}});const _0x27d59f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1f8f62=_0x27d59f(void 0,(function(){return _0x1f8f62.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f8f62).search("(((.+)+)+)+$")}));_0x1f8f62();class _0x35248f{constructor(){}createXMLflyLine(e){let t=new DOMParser;window.parser=t;let i=t.parseFromString("<cusxmlRoute></cusxmlRoute>","text/xml");window.xmlDoc=i;let n=this.createSceneRouteNode(i),r=this.createRouteNode(i,e),o=this.createRouteStyleNode(i);r.appendChild(o);let a=this,s=e.routeStops;if(!(s.length<2)){for(let e=0;e<s.length;e++){let t=s[e],n={longitude:t.point[0],latitude:t.point[1],altitude:t.point[2],heading:t.heading*(180/Math.PI),tilt:t.tilt*(180/Math.PI)+90},o=a.createStopNode(i,n,t,e);r.appendChild(o)}return n.appendChild(r),i.children[0].appendChild(n),i.children[0].innerHTML}}createXMLflyLines(e){let t=new DOMParser;window.parser=t;let i=t.parseFromString("<cusxmlRoute></cusxmlRoute>","text/xml");window.xmlDoc=i;let n=this.createSceneRouteNode(i);for(let t=0;t<e.length;t++){var r=e[t];let o=this.createRouteNode(i,r),a=this.createRouteStyleNode(i);o.appendChild(a);let s=this,l=r.routeStops;if(l.length<2)return void console.warn("节点数小于2");for(let e=0;e<l.length;e++){let t=l[e],n={longitude:t.point[0],latitude:t.point[1],altitude:t.point[2],heading:t.heading*(180/Math.PI),tilt:t.tilt*(180/Math.PI)+90},r=s.createStopNode(i,n,t,e);o.appendChild(r)}n.appendChild(o)}return i.children[0].appendChild(n),i.children[0].innerHTML}createSceneRouteNode(e){let t=e.createElement("SceneRoute");return t.setAttribute("xmlns","http://www.supermap.com"),t}createRouteNode(e,t){let i=e.createElement("route"),n={name:t.routeName||"飞行路线",speed:t.speed||"200",lineType:"0",showroutestop:"False",showrouteline:"False",altitudefree:"False",headingfree:"False",tiltfree:"False",flycircle:"False",alongline:t.isAlongLine||"False"};for(const e in n)i.setAttribute(e,n[e]);return i}createRouteStyleNode(e){let t=e.createElement("style"),i=e.createElement("geostyle3d"),n=e.createElement("linecolor");n.textContent="RGBA(147,112,219,255)";let r=e.createElement("linewidth");r.textContent=2;let o=e.createElement("altitudeMode");o.textContent="Absolute";let a=e.createElement("bottomAltitude");return a.textContent=0,i.appendChild(n),i.appendChild(r),i.appendChild(o),i.appendChild(a),t.appendChild(i),t}createStopNode(e,t,i,n){let r=e.createElement("routestop"),o={name:i.stopName||"Stop"+(n+1),speed:i.speed,excluded:"False",viewType:"camera"};for(const e in o)r.setAttribute(e,o[e]);let a=this.createStopCameraNode(e,t);r.appendChild(a);let s=this.createStopStyleNode(e,i);r.appendChild(s);let l=this.createStopSettingNode(e,i);return r.appendChild(l),r}createStopCameraNode(e,t){let i=e.createElement("camera");for(const n in t){let r=e.createElement(n);r.textContent=t[n],i.appendChild(r)}return i}createStopStyleNode(e,t){let i={icon:t.img,markersize:4.8,markericonscale:1,markercolor:"RGBA(255, 255, 255, 255)"},n=e.createElement("style"),r=e.createElement("geostyle3d");for(const t in i){let n=e.createElement(t);n.textContent=i[t],r.appendChild(n)}return n.appendChild(r),n}createStopSettingNode(e,t){let i=e.createElement("setting"),n={turnTime:t.surroundDuration||1.5,turnSlowly:"False",stopPlayMode:t.stopPlayMode||"StopPause",autoPlay:"False",pauseTime:t.waitTime||0,angularSpeed:1};for(const t in n){let r=e.createElement(t);r.textContent=n[t],i.appendChild(r)}return i}}const _0xc60def=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x242096=_0xc60def(void 0,(function(){return _0x242096.toString().search("(((.+)+)+)+$").toString().constructor(_0x242096).search("(((.+)+)+)+$")}));_0x242096();class _0x27821a{constructor(e){this.viewer=e,this.flyManager,this.routeCollection,this.reader=new FileReader,this.createXml,this.flyLineXmls=new _0x2a4279,this.routesDictionary=new _0x2a4279,this.routes=[],this.duration=5,this.showRoute=!1,this.showStop=!1,this.setStopSpeed=0,this.stopPlayMode="StopPause",this.waitTime=.001,this.surroundDuration=1,this.isAlongline=!1,this.routeSpeed=0,this.initFlyManager()}initFlyManager(){this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.flyManager=new Cesium.FlyManager({scene:this.viewer.scene,routes:this.routeCollection}),this.createXml=new _0x35248f}addStop(e){this.route=this.routesDictionary.find(e);let t=this.route.routeStops,i=this.viewer.camera.position,n=this.CartesiantoDegrees(i);var r=0;if(t.length>0){let e=t[t.length-1],i=e.point,o=Cesium.Cartesian3.fromDegrees(i[0],i[1],i[2]),a=Cesium.Cartesian3.fromDegrees(n[0],n[1],n[2]);r=Cesium.Cartesian3.distance(o,a)/this.duration,e.speed=r}let o=t.length,a="视点"+(Number(o)+1),s={uuid:Math.random().toString(15).slice(2,15),stopName:a,point:n,heading:this.viewer.camera.heading,tilt:this.viewer.camera.pitch,speed:r,stopPlayMode:this.stopPlayMode,surroundDuration:this.surroundDuration,waitTime:this.waitTime,duration:this.duration};t.push(s),this.loadRoute(e)}changeStop(e,t){this.flyManager&&this.flyManager.stop();let i=e.routename;this.route=this.routesDictionary.find(i);let n=this.route.routeStops,r=this.viewer.camera.position,o=this.CartesiantoDegrees(r),a=null,s=null,l=null;for(let t=0;t<n.length;t++){let i=n[t];if(t>0&&(s=n[t-1]),n.length!==t+1&&(l=n[t+1]),i.uuid===e.stop.uuid){a=i;break}}let u=a.speed;if(t.position&&null!==l){let e=l.point,i=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]),n=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),r=Cesium.Cartesian3.distance(i,n);u=t.duration?r/t.duration:r/a.duration}else if(t.position&&null!==s&&null===l){let e=s.point,t=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]),i=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),n=Cesium.Cartesian3.distance(t,i);s.speed=n/s.duration}else if(!t.position&&t.duration&&null!==l){o=a.point;let e=l.point,i=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]),n=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),r=Cesium.Cartesian3.distance(i,n);t.duration&&(u=r/t.duration)}var c=null,h=null,d=null;t.position?(c=this.viewer.camera.heading,h=this.viewer.camera.pitch):(c=a.heading,h=a.tilt,o=a.point,d=t.duration?parseInt(t.duration):a.duration);let f={uuid:e.stop.uuid,stopName:t.name||e.stop.stopName,point:o,heading:c,tilt:h,speed:u,stopPlayMode:this.stopPlayMode,surroundDuration:this.surroundDuration,waitTime:this.waitTime,duration:d||this.duration};for(let t=0;t<n.length;t++)if(n[t].uuid===e.stop.uuid){n[t]=f;break}this.loadRoute(i)}locateStop(e,t){this.flyManager&&this.flyManager.stop(),this.route=this.routesDictionary.find(e);let i=this.route.routeStops;for(let e=0;e<i.length;e++){let n=i[e];if(n.stopName===t){this.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(n.point[0],n.point[1],n.point[2]),orientation:{heading:n.heading,pitch:n.tilt,roll:0},duration:1});break}}}deleteStop(e,t){this.flyManager&&this.flyManager.stop(),this.route=this.routesDictionary.find(e);let i=this.route.routeStops;for(let e=0;e<i.length;e++)if(i[e].stopName===t){i.splice(e,1);break}this.loadRoute(e)}createImage(){return this.viewer.render(),this.viewer.scene.canvas.toDataURL("image/png").replace("image/png","image/octet-stream")}addRoute(){let e={routeName:"飞行路线"+(this.routes.length+1),speed:this.routeSpeed,isAlongLine:"False",routeStops:[],showLine:!1};this.routesDictionary.add(e.routeName,e),this.routes.push(e)}changeRoute(e,t){this.flyManager&&this.flyManager.stop();let i=e.name;this.route=this.routesDictionary.find(i),this.route.routeName=t.name;let n=this.createXml.createXMLflyLine(this.route);this.routesDictionary.remove(i),this.routesDictionary.add(t.name,this.route),n&&(this.flyLineXmls.remove(i),this.flyLineXmls.add(t.name,n))}deleteRoute(e){if(this.flyManager&&this.flyManager.stop(),!(this.flyLineXmls.length<1)){this.flyLineXmls.remove(e);var t=this.routesDictionary.find(e);this.routes.splice(this.routes.indexOf(t),1),this.routesDictionary.remove(e)}}showCurRoute(e,t){let i=this.flyLineXmls.find(e),n=this.flyManager.currentRoute;if(this.route=this.routesDictionary.find(e),n.routeName===e)n.isLineVisible=t,n.isStopVisible=t,this.route.showLine=t;else{n&&n.clear(),this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.routeCollection.fromXML(i),this.flyManager.routes=this.routeCollection,this.route.showLine=!0;for(let t=0;t<this.flyManager.routes._routes.length;t++){let i=this.flyManager.routes._routes[t];i.routeName===e&&(i.isLineVisible=!0,i.isStopVisible=!0)}}}loadRoute(e){var t=this.routesDictionary.find(e);if(t.routeStops.length<2)return;let i=this.createXml.createXMLflyLine(t);if(!i||(this.flyLineXmls.add(e,i),!e))return;let n=this.flyManager.currentRoute;n&&n.clear(),this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.routeCollection.fromXML(i),this.flyManager.routes=this.routeCollection}readyPromise(){this.routesDictionary.clear(),this.flyLineXmls.clear(),this.routes=[],this.routeCollection.readyPromise.then((()=>{this.flyManager.routes=this.routeCollection;for(let e=0;e<this.routeCollection._routes.length;e++){let t=this.routeCollection._routes[e],i={routeName:t._routeName,speed:t._speed,isAlongLine:t._isAlongline,routeStops:[]};for(let e=0;e<t._stopCollection.length;e++){let n=t._stopCollection.get(e),r=n._point,o=this.CartesiantoDegrees(r),a=n._duration;(e===t._stopCollection.length-1||200===n._speed&&10===n._duration)&&(a=5);let s=n._waitTime;0===s&&(s=.001);let l={uuid:Math.random().toString(15).slice(2,15),stopName:n._stopName,point:o,heading:n._heading,tilt:n._tilt,speed:n._speed,stopPlayMode:n._stopPlayMode,surroundDuration:n._surroundDuration,waitTime:s,duration:a};i.routeStops.push(l)}this.routesDictionary.add(i.routeName,i),this.routes.push(i);let n=this.createXml.createXMLflyLine(i);if(!n)return;this.flyLineXmls.add(i.routeName,n)}}))}download(e){let t=this.flyLineXmls.find(e);if(!t)return;let i=new Blob([t]),n=document.createElement("a");n.download="view-flight-route.fpf",n.href=URL.createObjectURL(i),n.click()}downloadAll(){if(this.flyLineXmls.count()<1)return;let e=this.createXml.createXMLflyLines(this.routes);if(!e)return;let t=new Blob(["\ufeff",e],{type:"text/plain"}),i=document.createElement("a");i.download="view-flight-route.fpf",i.href=URL.createObjectURL(t),i.click()}uploading(e){this.flyManager.stop();let t=this.flyManager.currentRoute;t&&t.clear(),this.routeCollection=new Cesium.RouteCollection(viewer.entities),e&&(this.reader.onload=e=>{let t=e.target.result;this.routeCollection.fromXML(t),this.readyPromise()},this.reader.readAsText(e,"UTF-8"))}play(e){let t=this.flyLineXmls.find(e),i=this.flyManager.currentRoute;i&&i.clear(),this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.routeCollection.fromXML(t),this.flyManager.routes=this.routeCollection,this.flyManager.readyPromise.then((()=>{this.flyManager.play()}))}pause(){this.flyManager&&this.flyManager.pause()}stop(){this.flyManager&&this.flyManager.stop()}CartesiantoDegrees(e){let t=[].concat(e),i=[];for(let e=0,n=t.length;e<n;e++){let n=Cesium.Cartographic.fromCartesian(t[e]),r=Cesium.Math.toDegrees(n.longitude),o=Cesium.Math.toDegrees(n.latitude),a=n.height;-1==i.indexOf(r)&&-1==i.indexOf(o)&&(i.push(r),i.push(o),i.push(a))}return i}}var _0x2b3b1b=(_0x543c33=!0,function(e,t){var i=_0x543c33?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x543c33=!1,i}),_0x3cf19b=_0x2b3b1b(void 0,(function(){return _0x3cf19b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3cf19b).search("(((.+)+)+)+$")})),_0x543c33;_0x3cf19b();class _0x1df87e{constructor(e){this.name=WebGLPlot.defaultValue(e.name,""),this.key=WebGLPlot.defaultValue(e.key,""),this.second=WebGLPlot.defaultValue(e.second,""),e.position&&e.position.heading&&(this.heading=e.position.heading,this.pitch=e.position.pitch,this.roll=e.position.roll,this.lng=e.position.point.lng,this.lat=e.position.point.lat,this.alt=e.position.point.alt)}}var _0x39b66f=(_0x14cb7a=!0,function(e,t){var i=_0x14cb7a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x14cb7a=!1,i}),_0x522a0b=_0x39b66f(void 0,(function(){return _0x522a0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x522a0b).search("(((.+)+)+)+$")})),_0x14cb7a;function _0x4b85fa(e){this.viewer=e}_0x522a0b(),_0x4b85fa.prototype.addCamera=function(e,t){if(!this.viewer)return;let i=this.viewer.scene.camera,n=i.positionCartographic,r={point:{lng:Cesium.Math.toDegrees(n.longitude),lat:Cesium.Math.toDegrees(n.latitude),alt:n.height},heading:i.heading,pitch:i.pitch,roll:i.roll},o=t.root.uuid,a=this.groupDic.find(o),s=a.stops.count(),l=e+(Number(s)+1);o=Math.random().toString(15).slice(2,15),this.quickPosPara=new positionPara({name:l,position:r}),a.stops.add(o,this.quickPosPara)},_0x4b85fa.prototype.addRoute=function(e){if(!this.viewer)return;let t=Math.random().toString(15).slice(2,15),i={groupName:e+(this.groupDic.count()+1),uuid:t,stops:new _0x2a4279};this.quickGroupPara=i,this.groupDic.add(t,i)},_0x4b85fa.prototype.inputRoute=function(){for(var e in this.keyboards=[],this.groupJson=[],this.groupDic.dataStorege){var t=this.groupDic.find(e),i=[];for(var n in t.stops.dataStorege){var r=t.stops.find(n);i.push({uuid:n,stop:r}),this.keyboards.push(r)}this.groupJson.push({groupName:t.groupName,uuid:e,stops:i})}return this.groupJson},_0x4b85fa.prototype.locateCamera=function(e){let t=e.heading,i=e.pitch,n=e.roll,r=e.lng,o=e.lat,a=e.alt;this.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(r,o,a),orientation:{heading:t,pitch:i,roll:n}})};var _0x2edaae=(_0x2fdac0=!0,function(e,t){var i=_0x2fdac0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2fdac0=!1,i}),_0x3cce5a=_0x2edaae(void 0,(function(){return _0x3cce5a.toString().search("(((.+)+)+)+$").toString().constructor(_0x3cce5a).search("(((.+)+)+)+$")})),_0x2fdac0;_0x3cce5a();var _0x5aa1b7={on:function(e,t,i){if("object"==typeof e)for(var n in e)this._on(n,e[n],t);else for(var r=0,o=(e=splitWords(e)).length;r<o;r++)this._on(e[r],t,i);return this},off:function(e,t,i){if(e)if("object"==typeof e)for(var n in e)this._off(n,e[n],t);else for(var r=0,o=(e=splitWords(e)).length;r<o;r++)this._off(e[r],t,i);else delete this._events;return this},_on:function(e,t,i){this._events=this._events||{};var n=this._events[e];n||(n=[],this._events[e]=n),i===this&&(i=void 0);for(var r={fn:t,ctx:i},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===t&&o[a].ctx===i)return;o.push(r)},_off:function(e,t,i){var n,r,o;if(this._events&&(n=this._events[e])){if(!t){for(r=0,o=n.length;r<o;r++)n[r].fn=falseFn;return void delete this._events[e]}if(i===this&&(i=void 0),n)for(r=0,o=n.length;r<o;r++){var a=n[r];if(a.ctx===i&&a.fn===t)return a.fn=falseFn,this._firingCount&&(this._events[e]=n=n.slice()),void n.splice(r,1)}}},fire:function(e,t,i){if(!this.listens(e,i))return this;var n=extend({},t,{type:e,target:this});if(this._events){var r=this._events[e];if(r){this._firingCount=this._firingCount+1||1;for(var o=0,a=r.length;o<a;o++){var s=r[o];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(e,t){var i=this._events&&this._events[e];if(i&&i.length)return!0;if(t)for(var n in this._eventParents)if(this._eventParents[n].listens(e,t))return!0;return!1},once:function(e,t,i){if("object"==typeof e){for(var n in e)this.once(n,e[n],t);return this}var r=bind((function(){this.off(e,t,i).off(e,r,i)}),this);return this.on(e,t,i).on(e,r,i)},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[stamp(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[stamp(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,extend({layer:e.target},e),!0)}};function d(e,t,i){try{return e(t,i)}catch(e){return o$1l.reject(e)}}function l(e){var t;return function(i){var n=i.data,r=[],o={id:n.id,result:void 0,error:void 0};return o$1l(d(e,n.parameters,r)).then((function(e){o.result=e})).otherwise((function(e){e instanceof Error?o.error={name:e.name,message:e.message,stack:e.stack}:o.error=e})).always((function(){e$2b(t)||(t=u$_(self.webkitPostMessage,self.postMessage)),n.canTransferArrayBuffer||(r.length=0);try{t(o,r)}catch(e){o.result=void 0,o.error="postMessage failed with error: "+f$R(e)+"\n with responseMessage: "+JSON.stringify(o),t(o)}}))}}var VERSION="11i(2023)",SuperMapVersion="39571";exports.AbstractMesh=_0xdbdb64,exports.AlgoInclude=_0x3eee05,exports.AlgoSymbol=_0x4381c6,exports.AlphaMode=_0x5f0e97,exports.AnalysisTool=_0x9a5fe0,exports.Animation=_0x142894,exports.Animation2=y$4,exports.AnimationBlink=_0x19c7e4,exports.AnimationBrokenLine=_0x426167,exports.AnimationCurve=_0x2c9321,exports.AnimationFollowType=_0x178a11,exports.AnimationGrow=_0x27e0a8,exports.AnimationHide=_0x4c816f,exports.AnimationMoveIn=_0x448584,exports.AnimationMoveOut=_0x365699,exports.AnimationPlayType=_0x28a0bd,exports.AnimationReduce=_0xa4850,exports.AnimationShow=_0x33f59e,exports.AnimationViewModel=m$5,exports.AnimationWay=_0x4f5528,exports.AnimationZoomIn=_0x440bb3,exports.AnimationZoomOut=_0x443e7e,exports.Appearance=a$S,exports.ApproximateTerrainHeights=e$1E,exports.ArcGISTiledElevationTerrainProvider=_$E,exports.ArcGisGeographicTilingScheme=m$L,exports.ArcGisMapServerImageryProvider=b$p,exports.ArcType=m$1f,exports.ArrowCommunicationLink=_0x412cba,exports.AssociativeArray=e$1N,exports.AttributeCompression=t$10,exports.AttributeType=Q$y,exports.AutoExposure=a$h,exports.Autolinker=zr,exports.AutomaticUniforms=l$19,exports.Axis=v$y,exports.AxisAlignedBoundingBox=e$26,exports.BIMInfoClickQueryHandler=_0x3cd63d,exports.BaseLayerPicker=g$3,exports.BaseLayerPickerViewModel=V,exports.BaseParticleSystem=_0x36dee7,exports.BasicLineCommunicationLink=_0xc54aac,exports.BatchTable=h$W,exports.Batched3DModel3DTileContent=n$p,exports.Billboard=n$I,exports.BillboardAxialVp=_0x5b6bf2,exports.BillboardCollection=w$N,exports.BillboardGraphics=n$T,exports.BillboardMode=yr$1,exports.BillboardPixelSizeWithAngleVp=_0x539845,exports.BillboardVisualizer=g$I,exports.BingMapsApi=e$11,exports.BingMapsGeocoderService=o$L,exports.BingMapsImageryProvider=o$p,exports.BingMapsStyle=I$k,exports.BlendEquation=b$19,exports.BlendFunction=l$14,exports.BlendOption=S$J,exports.BlendingState=Ee$r,exports.BlinkAnimationBlinkStyle=_0x448062,exports.BlinkAnimationReplaceStyle=_0x41970a,exports.BlockCacheList=r$Q,exports.BlockCacheNode=e$1b,exports.BloodPosition=_0x3dc8e2,exports.BloodVolume=_0xb27609,exports.BloomEffect=e$f,exports.BoundingBoxRenderer=t$9,exports.BoundingRectangle=f$18,exports.BoundingSphere=i$1c,exports.BoundingSphereState=R$w,exports.Bounds=_0x25f55d,exports.BoundsOctree=d$s,exports.BoxEditor=S$l,exports.BoxEmitter=a$j,exports.BoxGeometry=O$y,exports.BoxGeometryUpdater=i$E,exports.BoxGraphics=n$S,exports.BoxOutlineGeometry=o$17,exports.BoxParticleEmitter=_0x419949,exports.BrdfLutGenerator=t$d,exports.Buffer=t$Y,exports.BufferGL=h$11,exports.BufferGPU=r$12,exports.BufferIDRecorder=f$Z,exports.BufferManager=_0x408f08,exports.BufferUsage=A$19,exports.BuildContourAnalyst=_0x14bd2c,exports.BuildingDoors=_0x234d8c,exports.BurstPipelineAnalystService=BurstPipelineAnalystService,exports.CGCS2000MapServerImageryProvider=D$h,exports.CallbackProperty=n$V,exports.Camera=v$K,exports.CameraEventAggregator=l$l,exports.CameraEventType=Q$c,exports.CameraFlightPath=mr$4,exports.CameraMoveHandler=_0x539867,exports.Cartesian2=o$1o,exports.Cartesian3=o$1p,exports.Cartesian4=e$29,exports.Cartographic=a$18,exports.CartographicGeocoderService=N$B,exports.CaseTable=_0x5a8f1b,exports.CategoryVisibleMode=_0x576c2d,exports.Catenaryline=z$n,exports.CatmullRomSpline=c$K,exports.Cesium3DTile=c$r,exports.Cesium3DTileBatchTable=h$D,exports.Cesium3DTileColorBlendMode=L$I,exports.Cesium3DTileContent=r$n,exports.Cesium3DTileContentFactory=i$y,exports.Cesium3DTileContentState=X$o,exports.Cesium3DTileFeature=e$L,exports.Cesium3DTileFeatureTable=o$B,exports.Cesium3DTileOptimizationHint=s$q,exports.Cesium3DTileOptimizations=I$E,exports.Cesium3DTilePass=ue$d,exports.Cesium3DTilePassState=a$g,exports.Cesium3DTilePointFeature=i$z,exports.Cesium3DTileRefine=f$D,exports.Cesium3DTileStyle=d$n,exports.Cesium3DTileStyleEngine=e$1r,exports.Cesium3DTilesInspector=y$1,exports.Cesium3DTilesInspectorViewModel=l$6,exports.Cesium3DTileset=p$u,exports.Cesium3DTilesetAsyncTraversal=h$j,exports.Cesium3DTilesetCache=e$B,exports.Cesium3DTilesetGraphics=i$R,exports.Cesium3DTilesetHeatmap=a$s,exports.Cesium3DTilesetMostDetailedTraversal=f$C,exports.Cesium3DTilesetStatistics=r$x,exports.Cesium3DTilesetTraversal=W$x,exports.Cesium3DTilesetVisualizer=l$E,exports.CesiumInspector=g$1,exports.CesiumInspectorViewModel=m$3,exports.Check=o$1q,exports.CheckerboardMaterialProperty=r$w,exports.CircleEmitter=u$l,exports.CircleGeometry=n$A,exports.CircleOutlineGeometry=a$H,exports.ClampFramebuffer=t$h,exports.ClampMode=l$p,exports.Class=_0x18ea93,exports.ClassificationModel=A$C,exports.ClassificationPrimitive=x$$,exports.ClassificationType=_0x3b5200,exports.ClearCommand=t$X,exports.ClipBuild=_0xeb17d7,exports.ClipPlaneDepthFp=_0x2742bb,exports.ClipPlaneFp=_0x5a01b0,exports.ClipPlaneMode=_0xff9e19,exports.ClipPlaneVp=R$K,exports.ClippingPlane=a$I,exports.ClippingPlaneCollection=h$K,exports.ClippingType=R$J,exports.Clock=u$I,exports.ClockRange=tt$9,exports.ClockStep=g$Q,exports.ClockViewModel=r$a,exports.ClosedDepthFramebuffer=a$i,exports.CloudBox=t$c,exports.Collection=Collection$1,exports.Color=e$1U,exports.Color3Gradient=_0x48c0c2,exports.ColorBlendMode=I$J,exports.ColorCorrection=o$n,exports.ColorGeometryInstanceAttribute=o$16,exports.ColorGradient=_0x43ab59,exports.ColorMaterialProperty=t$Q,exports.ColorTable=i$S,exports.ColorTransferFunction=_0x40204d,exports.Command=t$3,exports.CommonBillboardVp=_0x26c9cf,exports.CommonNoLigthNoTextureVp=Ht$7,exports.CommonNoLigthOneTextureVp=CommonNoLigthOneTextureVp,exports.CommonNoTextureFS=_0x1b19d0,exports.CommonNoTextureFp=Yt$8,exports.CommonNoTextureVS=_0x49106d,exports.CommonOneTextureFp=CommonOneTextureFp,exports.CommonServiceBase=_0xd9c3dd,exports.CommonUtil=_0x4a6d61,exports.CommunicationLinkBase=_0x1eb387,exports.CommunicationLinkType=_0x4fea45,exports.ComponentDatatype=S$12,exports.Composite3DTileContent=i$B,exports.CompositeEntityCollection=s$p,exports.CompositeMaterialProperty=e$z,exports.CompositePositionProperty=t$q,exports.CompositeProperty=e$A,exports.Compositor=o$l,exports.CompressedTextureBuffer=e$1H,exports.ComputeCommand=t$I,exports.ComputeEngine=f$n,exports.ComputePipeline=r$8,exports.ComputeWeightMatrixParameters=ComputeWeightMatrixParameters,exports.ComputeWeightMatrixService=ComputeWeightMatrixService,exports.ConditionsExpression=u$h,exports.ConeEmitter=n$j,exports.ConeParticleEmitter=_0xf9ea81,exports.ConfigData=_0x51fe51,exports.ConfigManager=_0x290856,exports.ConstantPositionProperty=r$U,exports.ConstantProperty=e$1I,exports.Context=i$i,exports.ContextGL=g$a,exports.ContextLimits=e$1T,exports.ContextType=De$h,exports.ContextWebGPU=f$8,exports.ContourAnalyst=_0x1f291c,exports.ControlMode=vi$1,exports.CoplanarPolygonGeometry=P$H,exports.CoplanarPolygonGeometryLibrary=g$P,exports.CoplanarPolygonOutlineGeometry=a$G,exports.CornerType=ar$5,exports.CorridorGeometry=P$F,exports.CorridorGeometryLibrary=b$S,exports.CorridorGeometryUpdater=f$y,exports.CorridorGraphics=n$R,exports.CorridorOutlineGeometry=V$w,exports.Credential=a$O,exports.CredentialType=E$X,exports.Credit=r$T,exports.CreditDisplay=r$l,exports.CtrlPosition=_0x1f7045,exports.CtrlPositionType=_0x1e0288,exports.CubeMap=e$1M,exports.CubeMapFace=c$$,exports.CubeMapGL=X$Y,exports.CubeMapGPU=y$T,exports.CubicRealPolynomial=j$1g,exports.CullFace=G$17,exports.CullingVolume=i$W,exports.Curve=Curve,exports.CustomDataSource=n$o,exports.CustomGeometryUpdater=m$r,exports.CustomParticleEmitter=_0x4ba997,exports.CustomProjection=p$L,exports.CylinderDirectedParticleEmitter=_0x732f89,exports.CylinderGeometry=l$Q,exports.CylinderGeometryLibrary=I$R,exports.CylinderGeometryUpdater=s$n,exports.CylinderGraphics=n$Q,exports.CylinderOutlineGeometry=d$Z,exports.CylinderParticleEmitter=_0x17a06c,exports.CzmlDataSource=E$v,exports.DDSTexture=_0x2dc616,exports.DDSTextureGL=o$$,exports.DDSTextureGPU=o$_,exports.DDSTextureManager=Se$d,exports.DXTTextureDecode=L$U,exports.DamBreakAnalysis=r$k,exports.DashLineCommunicationLink=_0x5df5f1,exports.DataFileType=d$15,exports.DataSource=o$A,exports.DataSourceClock=e$y,exports.DataSourceCollection=i$t,exports.DataSourceDisplay=u$p,exports.DebugAppearance=i$h,exports.DebugCameraPrimitive=p$U,exports.DebugCommand=_0x41e390,exports.DebugModelMatrixPrimitive=s$d,exports.DeductionScript=_0x39c042,exports.DeductionScriptActionBasicParm=_0x397ab1,exports.DeductionScriptActionEffect=_0x5d6f1b,exports.DeductionScriptActionMove=_0x3e4e1c,exports.DeductionScriptActionRotation=_0x75e70a,exports.DeductionScriptActionScale=_0x3f6390,exports.DeductionScriptCalc=_0x101f8e,exports.DeductionScriptExecute=_0x8bca35,exports.DeductionScriptExecuteCalc=_0x47d1ee,exports.DeductionScriptExecuteGroup=_0x130d03,exports.DeductionScriptExecuteManager=_0x5ba8bb,exports.DeductionScriptExecuteResetType=_0x1d0519,exports.DeductionScriptExecuteState=_0x100aa6,exports.DeductionScriptExtend=_0x14792f,exports.DeductionScriptGroup=_0x386efd,exports.DeductionScriptManager=_0x2962c5,exports.DefaultProxy=o$K,exports.DefaultStyle=_0x1d0b9d,exports.DepthFramebuffer=s$T,exports.DepthFunction=re$E,exports.DepthMapAnalysisVp=DepthMapAnalysisVp,exports.DepthOfFieldEffect=n$g,exports.DepthPlane=c$c,exports.DerivedCommand=l$i,exports.DeveloperError=t$16,exports.DeviceOrientationCameraController=h$g,exports.Dictionary=_0x2a4279,exports.DirectionalLight=c$h,exports.DiscardColorTileImagePolicy=r$j,exports.DiscardEmptyTileImagePolicy=A$l,exports.DiscardMissingTileImagePolicy=u$i,exports.DistanceDisplayCondition=r$Y,exports.DistanceDisplayConditionGeometryInstanceAttribute=t$B,exports.DotMode=_0x4e5d29,exports.DotPlotStyle=_0x24b262,exports.DoublyLinkedList=h$P,exports.DracoLoader=r$A,exports.DrawCommand=i$_,exports.DrawCubeHandler=_0x195cd9,exports.DrawHandler=w$m,exports.DrawMode=_0x20cc4b,exports.DrawRectHandler=_0x434208,exports.DxtTexture=_0x413c78,exports.DynamicExtendRegionFp=_0x728fb1,exports.DynamicExtendRegionVp=_0x35073f,exports.DynamicGeometryBatch=r$s,exports.DynamicGeometryUpdater=a$C,exports.DynamicLayer3D=_0x75f8b5,exports.DynamicLayerVertex=_0x46b7bc,exports.DynamicObjectScane=_0x4c5a2b,exports.DynamicObjectState=_0x2b82d9,exports.EarthOrientationParameters=x$1h,exports.EarthOrientationParametersSample=n$1a,exports.EasingFunction=m$W,exports.EdgePreprocessing=_0x461802,exports.EditHandler=_$l,exports.EditSmlFileParameters=_0x4b4567,exports.EditSmlFileService=_0x13c545,exports.EfficiencyManager=_0x256ea7,exports.EllipseGeometry=Y$y,exports.EllipseGeometryLibrary=C$J,exports.EllipseGeometryUpdater=u$t,exports.EllipseGraphics=n$P,exports.EllipseOutlineGeometry=M$L,exports.Ellipsoid=t$13,exports.EllipsoidGeodesic=E$1s,exports.EllipsoidGeometry=b$P,exports.EllipsoidGeometryUpdater=l$z,exports.EllipsoidGraphics=e$1n,exports.EllipsoidOutlineGeometry=x$13,exports.EllipsoidPrimitive=p$c,exports.EllipsoidRhumbLine=P$16,exports.EllipsoidSurfaceAppearance=t$i,exports.EllipsoidTangentPlane=f$14,exports.EllipsoidTerrainProvider=t$A,exports.EllipsoidalOccluder=s$G,exports.EmissionMaterialProperty=t$k,exports.EmissionTextureUnit=_0x3ba5f2,exports.Empty3DTileContent=t$s,exports.EncodedCartesian3=i$11,exports.Entity=h$V,exports.EntityCluster=a$r,exports.EntityCollection=r$v,exports.EntityView=V$i,exports.EnumConvertor=R$$,exports.Event=o$1h,exports.EventHelper=n$x,exports.Evented=_0x59a8a5,exports.Events=_0x5aa1b7,exports.ExcavationBottomFS=Ta$3,exports.ExcavationBottomVS=xa$3,exports.ExcavationFS=$$N,exports.ExcavationSources=b$W,exports.ExcavationVS=Z$J,exports.Expression=L$E,exports.ExpressionNodeType=s$u,exports.ExtendProperty=_0x14b23e,exports.ExtrapolationType=_0x346789,exports.FXAA3_11=k$I,exports.Facade=C$l,exports.FacilityAnalyst3DParameters=_0x531671,exports.FacilityAnalystStreamParameters=FacilityAnalystStreamParameters,exports.FacilityAnalystStreamService=FacilityAnalystStreamService,exports.FacilityAnalystTracedown3DParameters=_0x573b05,exports.FacilityAnalystTracedown3DService=_0x11783d,exports.FacilityAnalystTraceup3DParameters=_0x205ec0,exports.FacilityAnalystTraceup3DService=_0x3e2490,exports.FactorGradient=_0x28226b,exports.Feature=Feature,exports.FeatureDetection=s$Y,exports.FeatureService=_0x3913cb,exports.FieldLayer3D=i$g,exports.FillGradientMode=_0x83f1a2,exports.FillStyle=fr$2,exports.FilterParameter=_0x1b5b86,exports.FindClosestFacilitiesService=FindClosestFacilitiesService,exports.FindLocationParameters=FindLocationParameters,exports.FindLocationService=FindLocationService,exports.FindMTSPPathsParameters=FindMTSPPathsParameters,exports.FindMTSPPathsService=FindMTSPPathsService,exports.FindPathParameters=FindPathParameters,exports.FindPathService=FindPathService,exports.FindServiceAreasParameters=FindServiceAreasParameters,exports.FindServiceAreasService=FindServiceAreasService,exports.FindTSPPathsParameters=FindTSPPathsParameters,exports.FindTSPPathsService=FindTSPPathsService,exports.FlattenRegion=f$X,exports.FloodAnalysis3D=I$d,exports.FlyInterpolationMode=j$13,exports.FlyManager=l$r,exports.FlyTurningMode=v$p,exports.Fog=g$i,exports.ForEach=e$K,exports.Format=_0x398ff2,exports.Forward3D=_0x205de2,exports.FrameBufferType=Qe$c,exports.FrameRateMonitor=i$f,exports.FrameState=h$f,exports.Framebuffer=t$W,exports.FramebufferGL=a$W,exports.FramebufferGPU=r$11,exports.FramebufferManager=s$g,exports.FresnelFp=_0xace9b2,exports.FresnelVp=_0x3b10bb,exports.FrustumCommands=i$e,exports.FrustumGeometry=z$T,exports.FrustumOutlineGeometry=s$N,exports.Fullscreen=l$1f,exports.FullscreenButton=r$5,exports.FullscreenButtonViewModel=r$6,exports.FunctionExt=_0x1d93f7,exports.GOAnimation=_0x2688ba,exports.GOAnimationAttribute=_0x45edd9,exports.GOAnimationBlink=_0x306baa,exports.GOAnimationGrow=_0x4a4ca0,exports.GOAnimationManager=_0x1713d3,exports.GOAnimationManagerBase=GOAnimationManagerBase,exports.GOAnimationRotate=_0x1b6a94,exports.GOAnimationScale=_0x1c88c7,exports.GOAnimationShow=_0x43b269,exports.GOAnimationState=_0x5140b5,exports.GOAnimationType=_0x304306,exports.GOAnimationWay=_0x381298,exports.GOAnimationWay_ModelGroup=_0x1c2b25,exports.GeoBillboard=i$q,exports.GeoBox=i$p,exports.GeoCircle3D=i$o,exports.GeoCone=r$q,exports.GeoCylinder=i$n,exports.GeoEllipsoid=i$m,exports.GeoEntity=_0x5589fe,exports.GeoEntityBasicParameter=_0x78fecc,exports.GeoEntityEffect=_0x46eece,exports.GeoEntityEffectAnnularDiffusion=_0x367e91,exports.GeoEntityEffectAttackline=_0x2c1685,exports.GeoEntityEffectAugment=_0x457e81,exports.GeoEntityEffectBurst=_0x318fc4,exports.GeoEntityEffectDetecttoncone=_0x1232ba,exports.GeoEntityEffectDynamic=_0x4d608c,exports.GeoEntityEffectExtend=_0xfa8fd4,exports.GeoEntityEffectExtendFactory=_0x5ed02a,exports.GeoEntityEffectFiresmoke=_0x302fab,exports.GeoEntityEffectMechanicalRadar=_0x28004f,exports.GeoEntityEffectParameter=_0x25bff7,exports.GeoEntityEffectParameterRadar=_0x1c4ba4,exports.GeoEntityEffectRadarBase=_0x2ed19c,exports.GeoEntityEffectRadarScanBase=_0x6508a2,exports.GeoEntityEffectRotateRadar=_0x2c9b58,exports.GeoEntityEffectScanRadar=_0x504843,exports.GeoEntityEffectScanWave=_0x3fbded,exports.GeoEntityEffectScanWaveColorMode=_0x4ca362,exports.GeoEntityEffectScancone=_0x5433aa,exports.GeoEntityEffectScanconeType=_0x2bebaf,exports.GeoEntityEffectSign=_0x137383,exports.GeoEntityEffectSignType=_0x1c3666,exports.GeoEntityEffectTailflame=_0x3c13c7,exports.GeoEntityEffectTailgas=_0x1914c9,exports.GeoEntityEffectToolkit=_0x3f9f2a,exports.GeoEntityEffectTrackLineType=_0x31475a,exports.GeoEntityEffectTrackline=_0x21af16,exports.GeoEntityEffectType=_0x3b1c90,exports.GeoEntityEffectWarningRadar=_0x4ffa33,exports.GeoEntityManager=_0x1fa8f7,exports.GeoEntityMoveCalc=_0x3139ed,exports.GeoEntityMoveParameter=_0x354a71,exports.GeoEntityNode=_0x1e39c8,exports.GeoEntityParamCyclicType=_0x12cd7b,exports.GeoEntityParameter=_0x487d97,exports.GeoEntityRotationCalc=_0x177623,exports.GeoEntityRotationParameter=_0x537142,exports.GeoEntityScaleCalc=_0x109a17,exports.GeoEntityScaleParameter=_0xbe66a7,exports.GeoGraphicObject=_0x21fac2,exports.GeoGraphicObjectConvert=_0x2004fc,exports.GeoJSON=_0x1a420a,exports.GeoJsonDataSource=y$p,exports.GeoLine3D=p$T,exports.GeoModel3D=t$j,exports.GeoPoint3D=e$q,exports.GeoPolyline=o$t,exports.GeoRegion3D=n$E,exports.GeoSphere=e$p,exports.GeocodeType=c$G,exports.Geocoder=s$3,exports.GeocoderService=o$J,exports.GeocoderViewModel=D$2,exports.GeographicProjection=n$1b,exports.GeographicTilingScheme=g$13,exports.Geometry=I$1p,exports.Geometry3D=o$11,exports.Geometry3DTileContent=p$w,exports.Geometry3DType=P$U,exports.GeometryAttribute=o$1c,exports.GeometryAttributes=a$_,exports.GeometryInstance=d$1o,exports.GeometryInstanceAttribute=o$13,exports.GeometryOffsetAttribute=_0x58701d,exports.GeometryPipeline=k$13,exports.GeometryServer=_0x46fa27,exports.GeometryType=Me$p,exports.GeometryUpdater=i$F,exports.GeometryVisualizer=c$k,exports.GetFeatureInfoFormat=R$h,exports.GetFeaturesByBoundsParameters=_0x24c8e8,exports.GetFeaturesByBoundsService=_0x424915,exports.GetFeaturesParametersBase=_0x565d46,exports.GetFeaturesServiceBase=_0x1e847d,exports.GetLibIDsService=_0x5ad32f,exports.GetLibInfoParameter=_0x23d9b2,exports.GetLibInfoService=GetLibInfoService,exports.GetSMLInfosParameters=_0x2bed72,exports.GetSMLInfosService=_0x1e0300,exports.GetSymbolInfoParameters=_0x570598,exports.GetSymbolInfoService=_0x460259,exports.Globe=h$d,exports.GlobeDepth=a$a,exports.GlobeSurfaceShaderSet=H$j,exports.GlobeSurfaceTile=v$C,exports.GlobeSurfaceTileProvider=A$S,exports.GlobeTileUBO=_0x55856b,exports.GlobeTranslucency=i$d,exports.GlobeTranslucencyFramebuffer=p$8,exports.GlobeTranslucencyState=F$b,exports.GltfSkeleton=_0x4c199e,exports.GltfSkeletonProcessor=_0x5bf1b0,exports.GoogleEarthEnterpriseImageryProvider=h$b,exports.GoogleEarthEnterpriseMapsProvider=n$f,exports.GoogleEarthEnterpriseMetadata=c$F,exports.GoogleEarthEnterpriseTerrainData=T$G,exports.GoogleEarthEnterpriseTerrainProvider=_$B,exports.GoogleEarthEnterpriseTileInformation=e$V,exports.GpuParticleSystem=_0x326310,exports.GradientHelper=_0xf6a90a,exports.GregorianDate=d$1r,exports.GridImagery=n$c,exports.GridImageryProvider=o$g,exports.GridLayer=p$b,exports.GridMaterialProperty=t$p,exports.GridProvider=w$a,exports.GridState=_$e,exports.GridTileImagery=d$j,exports.GroundEffect=_0x3a2d15,exports.GroundGeometryUpdater=i$x,exports.GroundPolylineGeometry=aa$4,exports.GroundPolylinePrimitive=g$11,exports.GroundPrimitive=d$14,exports.GroupObject=_0x3a6b26,exports.HeadingPitchRange=a$T,exports.HeadingPitchRoll=i$15,exports.Heap=o$1g,exports.HeatMap=o$f,exports.HeightReference=k$P,exports.HeightmapEncoding=T$L,exports.HeightmapTerrainData=T$J,exports.HeightmapTessellator=m$O,exports.HemisphereLight=e$k,exports.HemisphericParticleEmitter=_0x498a84,exports.HermitePolynomialApproximation=E$I,exports.HermiteSpline=m$M,exports.HomeButton=o$3,exports.HomeButtonViewModel=r$4,exports.HorizontalOrigin=j$T,exports.HypSometric=T$11,exports.HypsometricSetting=u$M,exports.HypsometricSettingEnum=k$Q,exports.Iau2000Orientation=y$F,exports.Iau2006XysData=D$15,exports.Iau2006XysSample=a$10,exports.IauOrientationAxes=h$I,exports.IauOrientationParameters=o$I,exports.ImageMarchingCubes=_0x3aace6,exports.ImageMaterialProperty=a$R,exports.Imagery=o$V,exports.ImageryLayer=h$Q,exports.ImageryLayerCollection=n$b,exports.ImageryLayerFeatureInfo=o$q,exports.ImageryProvider=e$h,exports.ImagerySplitDirection=Xe$b,exports.ImageryState=wt$6,exports.IndexDatatype=ce$x,exports.IndexedDBScheduler=l$15,exports.InfoBox=l$4,exports.InfoBoxViewModel=t$1,exports.InspectorShared=o$4,exports.Instance=_0x588b14,exports.InstanceInfo=_0x377331,exports.InstanceLayer=_0x2c3aba,exports.InstanceMode=_0x721735,exports.InstanceSkeletonManager=_0x212e1c,exports.InstanceTile=_0xbc2054,exports.InstanceTilesLayerVS=_0x1525ff,exports.Instanced3DModel3DTileContent=u$z,exports.InstancedType=bt$5,exports.InterpolationAlgorithm=r$L,exports.InterpolationType=_0x186188,exports.Intersect=Ae$u,exports.IntersectionTests=g$1h,exports.Intersections2D=d$10,exports.Interval=o$1n,exports.InvertClassification=t$a,exports.Ion=e$Y,exports.IonGeocoderService=s$C,exports.IonImageryProvider=o$k,exports.IonResource=n$y,exports.IonWorldImageryStyle=n$e,exports.Iso8601=o$H,exports.JSONFormat=_0x3ca704,exports.JobScheduler=o$e,exports.JobType=i$Q,exports.JulianDate=a$15,exports.KTX2Transcoder=o$U,exports.KeyboardEventModifier=Aa$1,exports.KmlCamera=o$v,exports.KmlDataSource=U$m,exports.KmlLookAt=o$u,exports.KmlTour=l$s,exports.KmlTourFlyTo=a$m,exports.KmlTourWait=i$r,exports.Label=D$Q,exports.LabelCollection=g$U,exports.LabelGraphics=n$O,exports.LabelStyle=R$Q,exports.LabelVisualizer=l$w,exports.LagrangePolynomialApproximation=i$I,exports.LatLng=_0x5781b8,exports.LayerDataStruct=_0x3a5bf8,exports.LayerUboDecl=d$1h,exports.Layers=u$k,exports.LeapSecond=a$16,exports.LercDecode=LercDecode,exports.Light=r$g,exports.LightCount=_0x3cc8e0,exports.LightGroupType=Ze$3,exports.LightSource=s$I,exports.LightSourceType=_0x1d9df9,exports.LightUBO=_0x3de36a,exports.LightUboDecl=K$U,exports.LimitBody=_0x218aaa,exports.LimitBodyVp=_0x18d31f,exports.LineCallOut=_$L,exports.LineCallOutVp=X$M,exports.LineDisplayType=X$V,exports.LineString=LineString,exports.LinearApproximation=v$A,exports.LinearRing=LinearRing,exports.LinearSpline=r$P,exports.LoadState=N$P,exports.LoadingPriorityMode=_0x10659f,exports.ManagedArray=r$R,exports.MapMode2D=Rr$2,exports.MapProjection=r$J,exports.MapboxApi=e$T,exports.MapboxImageryProvider=m$g,exports.MapboxStyleImageryProvider=o$d,exports.Material=r$X,exports.MaterialAppearance=t$w,exports.MaterialExt=_0x34f811,exports.MaterialManager=_0x5b0881,exports.MaterialPass=_0x21d1b1,exports.MaterialProperty=r$C,exports.MaterialUboDecl=b$1d,exports.Math=e$2a,exports.Matrix2=f$13,exports.Matrix3=p$1e,exports.Matrix4=p$1d,exports.MeasureHandler=T$l,exports.MeasureMode=_0x91cd7b,exports.Measurement=_0xb93137,exports.MemoryManager=ti$3,exports.MeshParticleEmitter=_0x40adc0,exports.MeshProcessing=_0x165ffe,exports.MeshUboDecl=u$T,exports.MeteorCommunicationLink=_0x115b1a,exports.MipmapHint=I$1e,exports.MixColorType=_0x203e3b,exports.Model=F$C,exports.ModelAnimation=a$x,exports.ModelAnimationCache=S$t,exports.ModelAnimationCollection=f$F,exports.ModelAnimationLoop=_0x157d80,exports.ModelAnimationState=E$B,exports.ModelEdgeFp=_0x171550,exports.ModelEdgeVp=_0x5a4442,exports.ModelEditControl=_0x4cf411,exports.ModelEditor=u$o,exports.ModelGraphics=t$J,exports.ModelInstance=e$G,exports.ModelInstanceCollection=w$u,exports.ModelLoadResources=t$u,exports.ModelMaterial=a$w,exports.ModelMesh=a$v,exports.ModelNode=r$z,exports.ModelObject=_0x18cb5a,exports.ModelUtility=s$v,exports.ModelVisualizer=d$z,exports.ModifyRegionBottomFp=ModifyRegionBottomFp,exports.ModifyRegionBottomVp=ModifyRegionBottomVp,exports.ModifyRegionMode=_0x25a093,exports.ModifyRegionOuterFS=ModifyRegionOuterFS,exports.ModifyRegionOuterVS=ModifyRegionOuterVS,exports.ModifyRegionSideFp=ModifyRegionSideFp,exports.ModifyRegionSideVp=ModifyRegionSideVp,exports.ModifyTerrain=Ne$g,exports.Module=_0x1c5342,exports.Moon=n$9,exports.MultiLineString=MultiLineString,exports.MultiPoint=MultiPoint,exports.MultiPolygon=MultiPolygon,exports.MultiTemporalFresnelFp=_0x26a0a0,exports.MultiViewShed3D=_0x49e50a,exports.MultiViewShedAnalysisFp=_0xe651ea,exports.MultiViewportMode=B$e,exports.MultisampleFramebuffer=f$m,exports.MvtProviderGL=I$10,exports.Navigation=t,exports.NavigationHelpButton=l$3,exports.NavigationHelpButtonViewModel=i$4,exports.NavigationViewModel=y,exports.NearFarScalar=o$Y,exports.NetCDFParser=x$b,exports.NetworkAnalystService=NetworkAnalystService,exports.NetworkAnalystServiceBase=NetworkAnalystServiceBase,exports.NeverTileDiscardPolicy=e$7,exports.NoSleep=b$4,exports.NodeTransformationProperty=a$N,exports.NormalFramebuffer=s$h,exports.OIT=C$c,exports.ObjsOperationType=_0x4580ad,exports.Occluder=d$U,exports.OcclusionFp=g$9,exports.OcclusionMesh=i$$,exports.OcclusionQueryStastics=e$1V,exports.OcclusionVp=A$8,exports.OctahedralProjectedCubeMap=u$B,exports.OffsetGeometryInstanceAttribute=e$1B,exports.OpenCageGeocoderService=s$B,exports.OpenStreetMapImageryProvider=a$9,exports.OrderedGroundPrimitiveCollection=r$t,exports.OrientedBoundingBox=y$Z,exports.OrthographicFrustum=a$V,exports.OrthographicOffCenterFrustum=l$12,exports.OverLayerOffsetOptions=_0x702fc2,exports.OverLayerPicture=_0x7480db,exports.OverLayerSolid=_0x59b619,exports.OverLayerStyle=_0x4574a2,exports.OverLayerSymbol=_0x4cfa9e,exports.OverLayerUtilityTools=_0x1aae83,exports.PBRExtensionParamterType=ie$p,exports.PBRMaterialType=je$g,exports.Packable=t$y,exports.PackableForInterpolation=o$F,exports.PackingRequest=X$N,exports.PagedLOD=_0x46a5cb,exports.Particle=_0x15de7e,exports.Particle2=a$k,exports.ParticleBillboardMode=_0x29b01c,exports.ParticleBlendMode=_0x5f5957,exports.ParticleBurst=m$c,exports.ParticleEmitter=e$6,exports.ParticleHelper=_0x42502,exports.ParticlePostRenderer=u$b,exports.ParticleSystem=_0x2fb622,exports.ParticleSystem2=g$s,exports.ParticleSystemSet=_0x279143,exports.ParticleSystemType=v$o,exports.ParticleTrailsPostRenderer=r$f,exports.ParticleVelocityFieldEffect=P$g,exports.Pass=Le$s,exports.PassState=n$Z,exports.PathGraphics=n$N,exports.PathVisualizer=w$p,exports.PeliasGeocoderService=i$J,exports.PerInstanceColorAppearance=t$R,exports.PerformanceDisplay=o$c,exports.PerformanceWatchdog=i$3,exports.PerformanceWatchdogViewModel=r$2,exports.PerspectiveFrustum=o$15,exports.PerspectiveOffCenterFrustum=l$11,exports.PickDepth=f$d,exports.PickDepthFramebuffer=s$b,exports.PickFramebuffer=f$c,exports.PickPointFramebuffer=a$7,exports.PickRectFramebuffer=t$f,exports.Picking=d$g,exports.PiecewiseFunction=_0x52c5cf,exports.PinBuilder=s$A,exports.PixelDatatype=_$$,exports.PixelFormat=V$10,exports.Plane=o$1m,exports.PlaneGeometry=f$K,exports.PlaneGeometryUpdater=p$n,exports.PlaneGraphics=e$1l,exports.PlaneOutlineGeometry=i$H,exports.PlotAnimationLayer=_0x3ff6b7,exports.PlotBounds=_0x54c5e3,exports.PlotCesium=_0x5a145c,exports.PlotCollentionLayer=_0x3c9c12,exports.PlotCollentionManager=_0x38860f,exports.PlotCommonServiceBase=_0x1393d7,exports.PlotCredential=_0x5ab2f6;exports.PlotCustomRadar=_0x45019a,exports.PlotCustomRadarGeometry=_0x328501,exports.PlotCustomRadarOutlineGeometry=_0x1ff575,exports.PlotCylinderGeometry=_0x5f15a4,exports.PlotCylinderGeometryLibrary=_0x2d7530,exports.PlotDrawControl=_0x1ae927,exports.PlotEditControl=_0x5bdde1,exports.PlotEvent=_0x4f2fe2,exports.PlotEventManager=_0x47a70a,exports.PlotEvents=_0x3d7456,exports.PlotFetchJsonp=_0x4c2451,exports.PlotFetchRequest=_0x363434,exports.PlotGeoEffectBase=_0x4157b2,exports.PlotGroundPrimitive=_0x4dfaf3,exports.PlotLayers=_0x5291a3,exports.PlotMechanicalRadar=_0x2a4b84,exports.PlotParameterRadar=_0x2f0d40,exports.PlotParameterRadarScan=_0x18b408,exports.PlotPoint3D=_0x11ff81,exports.PlotProperty=_0x32c2d4,exports.PlotRadarBase=_0x46adf9,exports.PlotRadarGeometry=_0x436613,exports.PlotRadarOutlineGeometry=_0x377d94,exports.PlotRadarType=_0x49109a,exports.PlotRadarUpdater=_0x14bd84,exports.PlotRotateRadar=_0x467388,exports.PlotRotateRadarScan=_0x2e830f,exports.PlotScanRadar=_0x5d6ff7,exports.PlotScanRadarScan=_0x11b373,exports.PlotServicesUtil=_0x57693f,exports.PlotUtilityTools=_0x3e45e1,exports.PlotWarningRadar=_0x5e75e0,exports.Plotting=_0x39fbca,exports.PlottingLayer=_0x267b40,exports.Point=Point$1,exports.Point3D=s$M,exports.Point3Ds=t$M,exports.PointCloud=ie$g,exports.PointCloud3DTileContent=a$u,exports.PointCloudClassificationInfo=_0x5730db,exports.PointCloudEyeDomeLighting=m$U,exports.PointCloudRenderMode=_0x16e744,exports.PointCloudShading=o$Z,exports.PointGraphics=n$M,exports.PointHandler=d$v,exports.PointLight=c$g,exports.PointParticleEmitter=_0x21fe0a,exports.PointPrimitive=s$o,exports.PointPrimitiveCollection=D$s,exports.PointVisualizer=v$r,exports.PointWithMeasure=PointWithMeasure,exports.Polygon=Polygon,exports.PolygonEmitter=M$a,exports.PolygonGeometry=z$_,exports.PolygonGeometryLibrary=y$_,exports.PolygonGeometryUpdater=l$y,exports.PolygonGraphics=l$Z,exports.PolygonHandler=l$n,exports.PolygonHierarchy=e$1J,exports.PolygonOutlineGeometry=A$R,exports.PolygonPipeline=A$1g,exports.Polyline=o$14,exports.PolylineArrowMaterialProperty=t$o,exports.PolylineCollection=k$T,exports.PolylineColorAppearance=e$1C,exports.PolylineDashMaterialProperty=o$z,exports.PolylineDynamicMaterialProperty=e$u,exports.PolylineEffectUboDecl=H$10,exports.PolylineFp=_0x54ee86,exports.PolylineGeometry=R$A,exports.PolylineGeometryUpdater=u$q,exports.PolylineGlowMaterialProperty=t$n,exports.PolylineGraphics=a$L,exports.PolylineHandler=d$u,exports.PolylineMaterialAppearance=r$W,exports.PolylineOutlineMaterialProperty=e$x,exports.PolylinePipeline=m$V,exports.PolylineRasterVp=_0x45c27e,exports.PolylineShadowVolumeFS=_0x5b2edf,exports.PolylineShadowVolumeVS=_0x4632a6,exports.PolylineTrailMaterialProperty=o$w,exports.PolylineVisualizer=l$u,exports.PolylineVolumeGeometry=N$y,exports.PolylineVolumeGeometryLibrary=J$B,exports.PolylineVolumeGeometryUpdater=a$n,exports.PolylineVolumeGraphics=e$1k,exports.PolylineVolumeOutlineGeometry=_$z,exports.PolylineVp=_0x1e7638,exports.PositionMode=j$X,exports.PositionProperty=t$K,exports.PositionPropertyArray=n$n,exports.PostEffectFilterlFramebuffer=t$g,exports.PostProcessStage=p$h,exports.PostProcessStageCollection=_$a,exports.PostProcessStageComposite=s$f,exports.PostProcessStageLibrary=i$b,exports.PostProcessStageSampleMode=e$i,exports.PostProcessStageTextureCache=g$q,exports.PrefilterRadianceMap=v$9,exports.PrepassRenderer=_0x4e6a4d,exports.PreprocessCubeMap=b$r,exports.Primitive=y$S,exports.PrimitiveCollection=o$x,exports.PrimitiveEdgeFp=_e$s,exports.PrimitiveEdgeVp=ge$p,exports.PrimitivePipeline=k$S,exports.PrimitiveState=_0x142e29,exports.PrimitiveType=W$18,exports.Profile=_0x15862b,exports.ProfilePlaneGeometry=h$8,exports.ProfileRender=f$a,exports.ProgramDefines=Y$H,exports.ProjectionImage=_0x3065eb,exports.ProjectionImageFp=_0x48873e,exports.ProjectionMode=_0x23afcf,exports.ProjectionName=ProjectionName,exports.ProjectionPicker=n$1,exports.ProjectionPickerViewModel=o$1,exports.Property=r$Z,exports.PropertyArray=i$v,exports.PropertyBag=f$T,exports.ProviderViewModel=i$5,exports.QuadraticRealPolynomial=m$1d,exports.QuadtreeOccluders=e$9,exports.QuadtreePrimitive=C$e,exports.QuadtreeTile=h$e,exports.QuadtreeTileLoadState=re$z,exports.QuadtreeTileProvider=r$e,exports.Quality=Quality,exports.QuantizedMeshTerrainData=p$O,exports.QuarticRealPolynomial=F$1i,exports.Quaternion=n$13,exports.QuaternionSpline=r$O,exports.Queue=r$16,exports.QuickPosition=_0x1df87e,exports.QuickPositionManager=_0x4b85fa,exports.RGBELoader=U$h,exports.RPListenerType=k$f,exports.RangeMode=_0x2056d1,exports.RasterFramebuffer=t$F,exports.RasterGeometryType=C$q,exports.RasterLayerUboDecl=RasterLayerUboDecl,exports.RasterVectorCollection=p$9,exports.Ray=f$17,exports.RectQueryHandler=_0x5870d3,exports.Rectangle=h$18,exports.RectangleCollisionChecker=r$G,exports.RectangleGeometry=j$N,exports.RectangleGeometryLibrary=j$O,exports.RectangleGeometryUpdater=d$B,exports.RectangleGraphics=n$L,exports.RectangleOutlineGeometry=k$G,exports.ReferenceFrame=Re$k,exports.ReferenceProperty=a$p,exports.ReflectFramebuffer=i$j,exports.RegionAltitudeVectex=_0x568483,exports.RegionEffectUboDecl=q$15,exports.RegionFragment=_0x3af34f,exports.RegionMaterialFp=_0x362543,exports.RegionMaterialVp=_0xb28fe0,exports.RegionTextureVertex=_0x4dbad4,exports.RegionVectex=_0x3a1ce5,exports.RenderClipPlane=_0x3218ec,exports.RenderEntityPagedLOD=_0x30a010,exports.RenderPipeline=_0x485985,exports.RenderState=d$1m,exports.RenderStateGL=t$_,exports.RenderStateGPU=n$10,exports.RenderTexture=s$L,exports.Renderbuffer=r$$,exports.RenderbufferFormat=M$13,exports.RenderbufferGL=o$19,exports.RenderbufferGPU=r$10,exports.Renderer2D=t$e,exports.Request=r$1b,exports.RequestErrorEvent=s$_,exports.RequestScheduler=r$1a,exports.RequestState=W$1c,exports.RequestType=V$15,exports.Resource=t$11,exports.RotateDirection=_0x36b304,exports.Rotation=m$q,exports.RotationOrigin=O$I,exports.Route=f$p,exports.Route2=Route,exports.RouteCollection=d$x,exports.RouteStop=e$s,exports.RuntimeError=t$14,exports.S3MBDataParser=_0x1309b8,exports.S3MBSkeletonProcessor=_0x1c7703,exports.S3MBlock=_0x5868f1,exports.S3MBlockCache=_0x5d6ada,exports.S3MBloomEffect=_0x5ea05b,exports.S3MCompressType=_0x2072ef,exports.S3MCreateIndexJob=_0x5cff5c,exports.S3MCreateVertexJob=_0x4eaac2,exports.S3MDataParser=_0x215208,exports.S3MDracoDecode=_0x2424eb,exports.S3MEdgeProcessor=_0x30c9ea,exports.S3MEntity=_0x206cda,exports.S3MFeature=_0x104945,exports.S3MGroupLayer=_0x40a7a7,exports.S3MInstance=_0x331f36,exports.S3MInstanceCollection=_0x448857,exports.S3MInstanceCollectionVertex=_0x3e7b8e,exports.S3MLayerScheduler=_0x2e6772,exports.S3MLayerUBO=_0x473d2d,exports.S3MMaterialUBO=_0xfa6ee5,exports.S3MMeshUBO=_0x4db383,exports.S3MOperationFSDecl=v$R,exports.S3MPBRMaterialLib=_0x5370ac,exports.S3MPixelFormat=_0x3dfacd,exports.S3MPointCloudEDL=_0x25441b,exports.S3MPointCloudEDLFp=_0x3af776,exports.S3MPointCloudEDLFpWGSL=_0x4b2711,exports.S3MPointCloudFp=_0x18fcae,exports.S3MPointCloudFpWGSL=_0x4e9507,exports.S3MPointCloudVp=_0x50ea4a,exports.S3MPointCloudVpWGSL=_0x390e70,exports.S3MPolylineEffect=_0x2f60f9,exports.S3MPolylineEffectUBO=_0x280589,exports.S3MRegionEffect=_0x14c08b,exports.S3MRegionEffectUBO=_0x3c3817,exports.S3MRenderStateCreator=_0x187e60,exports.S3MShaderProgramJob=_0x3fd475,exports.S3MSkeleton=_0x4f9ecb,exports.S3MSkeletonProcessor=_0x5ba273,exports.S3MTaskManager=_0x46a73d,exports.S3MTextureManager=_0x4dad4e,exports.S3MThemeGraph=_0x14f094,exports.S3MTilesBillboardPixelSizeVp=_0x21a0db,exports.S3MTilesBillboardVp=S3MTilesBillboardVp,exports.S3MTilesCommonOntTextureFP=_0x4da3bc,exports.S3MTilesExtendPolygonShadowVP=_0x3410ec,exports.S3MTilesFontWithHaloFp=_0x223db1,exports.S3MTilesFpPointWGSL=_0x2288cf,exports.S3MTilesFpWGSL=_0x1084eb,exports.S3MTilesFragment=_0x2b6657,exports.S3MTilesFragmentRaster=_0x21bee4,exports.S3MTilesLabelStyle=_0x4ee275,exports.S3MTilesLayer=_0x22e933,exports.S3MTilesLineShadowVectex=_0x4c08bd,exports.S3MTilesRectSelection=_0x25cbb0,exports.S3MTilesRectSelectionWGSL=_0xaee82b,exports.S3MTilesRegionShadowVectex=_0x3b4223,exports.S3MTilesSelection=_0x527139,exports.S3MTilesShadowVolumeFP=_0x5e3105,exports.S3MTilesVectex=_0x19a31f,exports.S3MTilesVectexRaster=_0x370b02,exports.S3MTilesVpPointWGSL=_0x519466,exports.S3MTilesVpWGSL=_0x46f3da,exports.S3MUniformMapCreator=_0x23730d,exports.S3MUploadSubTextureJob=_0x10b3f1,exports.S3MVersion=_0x41168d,exports.S3MVertexFactory=C$16,exports.S3MVertexPackage=_0x58bcd6,exports.S3MVolumeUBO=_0x236967,exports.S3MVolumeUboDecl=X$_,exports.S3MVoxelGridFp=S3MVoxelGridFp,exports.S3MVoxelGridVp=S3MVoxelGridVp,exports.S3MWaterLayerUBO=_0x360415,exports.S3ModelFP=_0x451393,exports.SCTTerrainProvider=se$q,exports.SDFSettings=V$I,exports.SMAA=i$a,exports.SMLFileService=_0x46b1b9,exports.SQFramebuffer=t$L,exports.SRGBtoLINEAR=s$V,exports.SSAOEffect=a$f,exports.SampledPositionProperty=o$y,exports.SampledProperty=g$x,exports.Sampler=e$1P,exports.Satellite=_0x44d1e4,exports.SatelliteEntity=_0x5ced36,exports.SatelliteEntityManager=_0x42f78d,exports.SatelliteGroup=_0x329fbd,exports.SatelliteManager=_0x19ce0d,exports.SatelliteOrbitsLayer=_0x124bda,exports.SatelliteToolkit=_0x59a6dd,exports.Scalar=_0x2c1e2b,exports.ScaledPositionProperty=i$s,exports.ScanEffect=h$i,exports.ScanEffectMode=A$j,exports.Scene=w$3,exports.SceneConfigLoader=De$1,exports.SceneFramebuffer=n$i,exports.SceneMode=C$13,exports.SceneModePicker=c$2,exports.SceneModePickerViewModel=i$2,exports.SceneTransforms=s$Q,exports.SceneTransitioner=R$8,exports.SceneUBO=_0x4116a0,exports.SceneUboDecl=x$16,exports.ScreenSpaceCameraController=_a,exports.ScreenSpaceEventHandler=g$J,exports.ScreenSpaceEventType=G$I,exports.SelectColorType=Zr$2,exports.SelectionIndicator=i$1,exports.SelectionIndicatorViewModel=n,exports.ServerGeometry=ServerGeometry,exports.ServiceBase=ServiceBase,exports.ShaderCache=h$m,exports.ShaderChunk=mo$1,exports.ShaderProgram=r$13,exports.ShaderProgramCompute=t$2,exports.ShaderProgramCreator=_0x256445,exports.ShaderProgramGL=g$18,exports.ShaderProgramGPU=m$Z,exports.ShaderSource=s$U,exports.ShadowAnalysisFp=_0x4e4501,exports.ShadowMap=C$Y,exports.ShadowMapShader=g$10,exports.ShadowMode=W$W,exports.ShadowQueryFp=_0x485098,exports.ShadowQueryPoints=_0x38ed3e,exports.ShadowQueryVp=_0x2328b4,exports.ShadowType=_0x381f49,exports.ShadowUBO=_0x1498b5,exports.ShadowUboDecl=J$X,exports.ShadowVolumeAppearance=y$R,exports.SharedEDLFrameBuffer=_0x3cffe6,exports.ShowGeometryInstanceAttribute=e$1F,exports.SightLineAnalysis=_0x3d592b,exports.Sightline=_0x23be36,exports.SightlineAnalysisFp=SightlineAnalysisFp,exports.SightlineAnalysisVp=_0x26c186,exports.SilverLightingAtmosphere=n$6,exports.SilverLightingEphemeris=a$2,exports.SilverLightingLocalTime=e$2,exports.SilverLightingLocation=i$8,exports.SilverLightingLuminanceMapper=a$3,exports.SilverLightingSky=l$a,exports.SilverLightingSolarSpectrum=o$8,exports.SilverLightingSpectrum=G$5,exports.Simon1994PlanetaryPositions=F$H,exports.SimplePolylineGeometry=S$z,exports.SimulationController=_0x4e5cfb,exports.SingleTileImageryProvider=u$f,exports.SitDataManager=_0x29db2d,exports.SitDataStruct=_0x19562b,exports.SituationSimulationManager=_0x41dd10,exports.SituationSimulationSchemeDataType=_0x59c417,exports.SituationSimulationSchemeManager=_0x236d05,exports.SituationSimulationToolkit=_0x2887b9,exports.SkeletonProcessor=_0x344064,exports.SkeletonState=_0x49d3c9,exports.SkyAtmosphere=h$6,exports.SkyBox=h$5,exports.Skyline=_0x1e0d7c,exports.SkylineFp=_0x2821fb,exports.SkylineVp=_0x150dfa,exports.SlopeSetting=l$K,exports.SlopeSettingEnum=_0x256766,exports.SmlInfoStruct=_0x24c268,exports.SmoothStepSpline=r$N,exports.SolidModelsProfile=r$d,exports.SolidProfileFp=V$6,exports.SpatialQuery3D=_0x4d0d03,exports.SpatialQueryFp=_0x594de8,exports.SpatialQueryFpWGSL=_0x2a7fd2,exports.SphereDirectedParticleEmitter=_0x18a488,exports.SphereEmitter=o$r,exports.SphereGeometry=n$u,exports.SphereOutlineGeometry=a$U,exports.SphereParticleEmitter=_0x19aa0e,exports.Spherical=c$A,exports.Spline=n$G,exports.SplitDirection=_0x405774,exports.SpotLight=_$k,exports.StaticGeometryColorBatch=y$s,exports.StaticGeometryPerMaterialBatch=u$s,exports.StaticGroundGeometryColorBatch=p$l,exports.StaticGroundGeometryPerMaterialBatch=f$s,exports.StaticGroundPolylinePerMaterialBatch=m$n,exports.StaticOutlineGeometryBatch=y$r,exports.StencilConstants=u$N,exports.StencilFunction=m$X,exports.StencilOperation=n$Y,exports.StopPlayMode=A$q,exports.StripeMaterialProperty=i$u,exports.StripeOrientation=mr$1,exports.Style3D=e$1s,exports.StyleExpression=t$8,exports.SubEmitter=_0x1e1355,exports.SubEmitterType=_0x536d2c,exports.SubTextureCache=_0x2f6556,exports.SubTextureManager=_0x3fad8f,exports.Sun=u$5,exports.SunLight=i$k,exports.SunPostProcess=s$e,exports.SuperMapImageryProvider=H$4,exports.SuperMapTerrainProvider=ne$x,exports.SuperMapVersion=SuperMapVersion,exports.SupportTools=f$I,exports.SurroundLineType=_0x26609d,exports.SvgPathBindingHandler=g$4,exports.SymbolAlgoUtil=_0x2d6822,exports.SymbolAnnotation=_0xebe7e9,exports.SymbolArbitraryPolygon=_0x202b10,exports.SymbolArc=_0x3b1257,exports.SymbolBrace=_0x3f02c6,exports.SymbolCell=_0x526be0,exports.SymbolChord=_0x56bfc5,exports.SymbolCircle=_0x5538dd,exports.SymbolConcentricCircle=_0xc18e25,exports.SymbolCurveEight=_0x33d4e9,exports.SymbolDot=_0x25259d,exports.SymbolDotGraphic=_0x22f580,exports.SymbolDotPicture=_0x54378e,exports.SymbolDotVector=_0x404870,exports.SymbolEllipse=_0x2ebfea,exports.SymbolKidney=_0xab1d32,exports.SymbolLib=_0x4657e6,exports.SymbolLibManager=_0x298073,exports.SymbolLibService=_0xdf8675,exports.SymbolParallelogram=_0x3a50ed,exports.SymbolPie=_0x20f603,exports.SymbolPolyBezier=_0x2ad880,exports.SymbolPolyBezierClosed=_0x5178a6,exports.SymbolPolyline=_0x43c7a1,exports.SymbolRectangle=_0x26b28c,exports.SymbolRegularPolygon=_0x3966c2,exports.SymbolRunWay=_0x575907,exports.SymbolStyle=_0x53d051,exports.SymbolTextStyle=_0x34d1aa,exports.SymbolTrapezoid=_0x1a7236,exports.SymbolType=_0x18bc2f,exports.TSClipPlane=_0x301bce,exports.TaskProcessor=i$V,exports.TemporalAA=a$e,exports.TemporalSetting=o$T,exports.TerrainData=r$E,exports.TerrainEncoding=h$L,exports.TerrainFillMesh=Q$J,exports.TerrainLayer=r$h,exports.TerrainLayerCollection=o$h,exports.TerrainMesh=T$K,exports.TerrainOffsetProperty=h$E,exports.TerrainProvider=I$12,exports.TerrainQuantization=me$p,exports.TerrainSlopeAnalysis=_0x56988a,exports.TerrainState=Le$m,exports.TextOverlapInfo=_0x15f4db,exports.TextPos=_0x4c2bdd,exports.Texture=t$V,exports.Texture3D=e$j,exports.Texture3DGL=E$l,exports.Texture3DGPU=f$l,exports.TextureAtlas=v$I,exports.TextureCache=r$o,exports.TextureGL=w$U,exports.TextureGPU=u$S,exports.TextureMagnificationFilter=rt$i,exports.TextureManager=_0x27ac16,exports.TextureMinificationFilter=tt$h,exports.TextureWrap=q$19,exports.ThreeDModeling=_0x4bd175,exports.TiandituAnnotationProvider=h$3,exports.TiandituImageryProvider=f$6,exports.TiandituMapsStyle=t$7,exports.TiandituTerrainProvider=d$8,exports.TileAvailability=n$C,exports.TileBoundingRegion=y$K,exports.TileBoundingSphere=t$r,exports.TileBoundingVolume=o$7,exports.TileCoordinatesImageryProvider=n$4,exports.TileDiscardPolicy=r$b,exports.TileEdge=T$I,exports.TileImagery=o$S,exports.TileMapServiceImageryProvider=g$m,exports.TileOrientedBoundingBox=c$s,exports.TileProviderError=l$W,exports.TileReplacementQueue=i$L,exports.TileSelectionResult=D$J,exports.TileState=TileState,exports.TileTerrain=x$Q,exports.Tileset3DTileContent=t$t,exports.TilingScheme=o$C,exports.TiltIndicator=g,exports.TimeConstants=h$17,exports.TimeDynamicImagery=f$P,exports.TimeDynamicPointCloud=g$6,exports.TimeInterval=d$W,exports.TimeIntervalCollection=c$z,exports.TimeIntervalCollectionPositionProperty=t$m,exports.TimeIntervalCollectionProperty=t$l,exports.TimeStandard=H$19,exports.Timeline=u$3,exports.TimelineHighlightRange=s$1,exports.TimelineTrack=v,exports.Tipsify=D$12,exports.ToggleButtonViewModel=r$9,exports.Tonemapper=M$8,exports.TransformFeedback=s$i,exports.Transforms=m$17,exports.TranslationRotationScale=e$1X,exports.TransportationAnalystParameter=TransportationAnalystParameter,exports.TransportationAnalystResultSetting=TransportationAnalystResultSetting,exports.TridiagonalSystemSolver=m$N,exports.TrustedServers=u$X,exports.TubularCommunicationLink=_0x592290,exports.Tween=f$V,exports.TweenCollection=s$a,exports.UBOBase=_0x3e2f69,exports.UBONames=_0x27131a,exports.UBONames2=UBONames,exports.UnderGlobe=t$6,exports.UniformBufferEngineGL=F$5,exports.UniformBufferGL=e$1z,exports.UniformState=P$l,exports.UniformlyVariableMotionSpline=n$F,exports.UpdateEdgeWeightParameters=UpdateEdgeWeightParameters,exports.UpdateEdgeWeightService=UpdateEdgeWeightService,exports.UpdateTurnNodeWeightParameters=UpdateTurnNodeWeightParameters,exports.UpdateTurnNodeWeightService=UpdateTurnNodeWeightService,exports.Uri=h$16,exports.UrlTemplateImageryProvider=_$g,exports.UrlType=Tr$3,exports.Util=_0x4c726c,exports.VERSION=VERSION,exports.VRButton=r$1,exports.VRButtonViewModel=a,exports.VRTheWorldTerrainProvider=l$J,exports.Vector=Vector,exports.Vector3DTileBatch=c$w,exports.Vector3DTileContent=y$v,exports.Vector3DTileGeometry=e$H,exports.Vector3DTilePoints=b$H,exports.Vector3DTilePolygons=a$t,exports.Vector3DTilePolylines=h$C,exports.Vector3DTilePrimitive=y$y,exports.VectorTilesLayer=_$8,exports.VectorTilesMap=i$O,exports.VelocityOrientationProperty=e$v,exports.VelocityVectorProperty=r$u,exports.VertexArray=c$12,exports.VertexArrayFacade=v$F,exports.VertexArrayGL=l$16,exports.VertexArrayGPU=m$Y,exports.VertexCompressOption=_0x35ed09,exports.VertexFormat=n$11,exports.VertexWeightMode=_0x7aa085,exports.VerticalOrigin=S$O,exports.VideoSynchronizer=n$t,exports.View=L$c,exports.ViewDome=_0x4f36f0,exports.ViewDomeFp=_0xefb578,exports.ViewDomeType=_0xc82867,exports.ViewDomeVp=_0x69adc8,exports.ViewShed3D=_0x12cc1f,exports.ViewShedAnalysis=_0x2178ea,exports.ViewShedAnalysisFp=_0x2818b6,exports.ViewShedAnalysisVp=_0x2f8522,exports.Viewer=u,exports.ViewportQuad=o$6,exports.Visibility=fe$n,exports.Visualizer=r$r,exports.Volume=A$2,exports.VolumeBillboardCollection=c$7,exports.VolumeBoxFp=Nt$1,exports.VolumeBoxVp=Mt$1,exports.VolumeRenderMode=gt$1,exports.VoxelGridLayer3D=g$d,exports.VoxelGridPostRenderer=a$5,exports.VoxelGridTile=_$9,exports.VoxelGridTileMultiResolution=o$a,exports.VulkanConstants=VulkanConstants,exports.WTSConfigManager=_0x5ca3d2,exports.WalkingMode=Ct,exports.WallGeometry=E$F,exports.WallGeometryLibrary=D$C,exports.WallGeometryUpdater=n$m,exports.WallGraphics=e$1j,exports.WallOutlineGeometry=w$x,exports.WaterLayerUboDecl=G$1c,exports.WaterMode=K$9,exports.WayPathType=_0x59cef0,exports.WebGLConstants=de$x,exports.WebMapServiceImageryProvider=m$f,exports.WebMapTileServiceImageryProvider=v$E,exports.WebMercatorProjection=t$O,exports.WebMercatorTilingScheme=c$R,exports.WeightSpline=r$D,exports.Widget=u$2,exports.WindingOrder=W$13,exports.WireFrameType=_0x15916e,exports.XML=s$S,exports.ZoomIndicator=o,exports.ZoomIndicatorViewModel=r,exports.addBuffer=a$y,exports.addDefaults=E$D,exports.addExtensionsRequired=s$x,exports.addExtensionsUsed=i$C,exports.addPipelineExtras=s$z,exports.addToArray=d$P,exports.adjustColor=O$N,exports.appendForwardSlash=n$18,exports.arrayFill=d$1s,exports.arrayRemoveDuplicates=D$11,exports.arraySlice=l$R,exports.barycentricCoordinates=S$Z,exports.bignumber=tr,exports.binarySearch=a$17,exports.bitmap_sdf=b$10,exports.blinnPhong=ro$1,exports.brdf=l$17,exports.buildModuleUrl=n$15,exports.bytebuffer=u$4,exports.calcTexCoordDecl=eo,exports.calculateMipLevel=V$W,exports.calculatePolyTexCoord=N$W,exports.cancelAnimationFrame=t$D,exports.checkFloatTexturePrecision=r$p,exports.clip=_$X,exports.clone=l$1g,exports.combine=p$19,exports.computeFlyToLocationForRectangle=a$d,exports.computeWValue=R$Z,exports.createBillboardPointCallback=i$A,exports.createCommand=s$4,exports.createDefaultImageryProviderViewModels=m$4,exports.createDefaultTerrainProviderViewModels=n$3,exports.createFragmentFromTemplate=n$2,exports.createGuid=e$1Q,exports.createMaterialPropertyDescriptor=c$_,exports.createOpenStreetMapImageryProvider=L$j,exports.createPropertyDescriptor=C$$,exports.createRawPropertyDescriptor=c$W,exports.createTangentSpaceDebugPrimitive=y$e,exports.createTaskProcessorWorker=l,exports.createTileMapServiceImageryProvider=te$5,exports.createUniform=I$1m,exports.createUniformArray=V$Z,exports.createUniformArrayGPU=j$17,exports.createUniformGPU=V$X,exports.createWorldImagery=o$j,exports.createWorldTerrain=u$H,exports.crunchprevious=Module$1,exports.cubeUV_reflection=c$13,exports.decodeGoogleEarthEnterpriseData=f$L,exports.defaultValue=u$_,exports.defined=e$2b,exports.deprecationWarning=t$12,exports.destroyObject=i$10,exports.directionLightDecl=i$Y,exports.dynamicGeometryGetBoundingSphere=h$s,exports.earcut=_0x66a0ff,exports.earcut_2_2_1=z$$,exports.executeExcavation=I$1i,exports.executeServerExcavationDecl=f$Y,exports.exportKml=oe$a,exports.fill_style_layer=_0x2e833c,exports.findAccessorMinMax=B$y,exports.flightLineXml=_0x35248f,exports.flyManager=_0x27821a,exports.formatError=f$R,exports.freezeRenderState=c$15,exports.getAbsoluteUri=o$1j,exports.getAccessorByteStride=p$A,exports.getBaseUri=i$1a,exports.getBinaryAccessor=M$C,exports.getClipAndStyleCode=p$x,exports.getClippingFunction=f$G,exports.getComponentReader=c$x,exports.getElement=i$c,exports.getEmissiveTextureAtlasColor=k$Z,exports.getEnvironmentColor=Z$$,exports.getExtensionFromUri=a$13,exports.getFilenameFromUri=f$O,exports.getFusionModePosition=w$W,exports.getImagePixels=d$13,exports.getMagic=a$F,exports.getNormalMatrix=z$X,exports.getPBRParamFromTexture=A$1b,exports.getPreciseArea=R$C,exports.getStringFromTypedArray=a$K,exports.getTextureColorDecl=y$W,exports.getTimestamp=Et$a,exports.getUVMatrixDecl=E$18,exports.getVertexByFlatten=P$12,exports.getVolumeValue=j$16,exports.globeAnalysis=h$12,exports.globeOcean=D$Z,exports.graphemesplitter=T$N,exports.hasExtension=i$D,exports.heightReferenceOnEntityPropertyChanged=a$B,exports.hemisphereLightDecl=e$1R,exports.html2canvas=_0x269f3b,exports.isBitSet=i$P,exports.isBlobUri=i$19,exports.isCrossOriginUrl=i$18,exports.isDataUri=e$23,exports.isLeapYear=i$1b,exports.joinUrls=n$U,exports.jsep=q$B,exports.kdbush=O$B,exports.knockout=ce$1,exports.knockout_3_5_1=ce$1,exports.knockout_es5=t$5,exports.lightSourceImpl=p$10,exports.line_style_layer=_0x5e23b5,exports.loadAndExecuteScript=a$11,exports.loadArrayBuffer=o$10,exports.loadBlob=l$O,exports.loadCRN=a$P,exports.loadCRNForS3M=h$T,exports.loadCubeMap=d$q,exports.loadDXTZ=B$M,exports.loadImage=t$T,exports.loadImageFromTypedArray=w$Q,exports.loadImageViaBlob=c$E,exports.loadJson=u$Q,exports.loadJson2=_0x2bb4f4,exports.loadJsonp=d$V,exports.loadKTX=k$V,exports.loadKTX2=f$S,exports.loadText=u$R,exports.loadText2=_0xdbaebe,exports.loadView=f$1,exports.loadWithXhr=p$_,exports.loadWithXhr2=_0x2293fb,exports.loadXML=d$1f,exports.long=s$7,exports.measureText=F$T,exports.mergeSort=m$H,exports.mersenne_twister=s$11,exports.meshopt_decoder_module=V$1,exports.modernizeShader=S$U,exports.moveTechniqueRenderStates=R$v,exports.moveTechniquesToExtension=R$u,exports.netcdf=k$5,exports.numberOfComponentsForType=r$B,exports.objectToQuery=m$1b,exports.oneTimeWarning=e$1$,exports.parseGlb=O$u,exports.parseResponseHeaders=n$17,exports.pbf=h$U,exports.pointInsideTriangle=c$C,exports.pointLightDecl=m$_,exports.potpack=W$U,exports.preClipFS=M$16,exports.processModelMaterialsCommon=ue$k,exports.processPbrMaterials=he$f,exports.proj4_src=k$C,exports.protobuf=f$7,exports.protobuf_minimal=R$B,exports.purify=je$d,exports.queryToObject=m$1a,exports.quickselect=s$J,exports.rainDecl=o$1a,exports.rbush=B$B,exports.readAccessorPacked=T$z,exports.removeExtensionsRequired=s$y,exports.removeExtensionsUsed=d$N,exports.removePipelineExtras=f$E,exports.removeUnusedElements=d$L,exports.renderNormal=g$15,exports.renderNormalAndDepth=S$T,exports.renderPrePass=U$12,exports.requestAnimationFrame=p$H,exports.s3mComputeVaryings=B$Z,exports.sampleTerrain=y$C,exports.sampleTerrainMostDetailed=y$B,exports.scaleToGeodeticSurface=P$1e,exports.setAlphaByWValue=F$13,exports.shaderModelBase=Y$R,exports.shadowReceive=a$X,exports.shadowVisibility=n$_,exports.sketchMode=Q$$,exports.snowDecl=r$14,exports.splitClip=W$10,exports.spotLightDecl=t$Z,exports.sprintf=$$17,exports.subdivideArray=u$P,exports.subscribeAndEvaluate=c$5,exports.supermap3D_openlayer_4_6_5=t$4,exports.throttleRequestByServer=o$N,exports.topojson=ke$4,exports.unzip=_0x3ebab5,exports.updateAccessorComponentTypes=T$y,exports.updateVersion=re$r,exports.vertexLogDepthDecl=$$10,exports.viewerCesium3DTilesInspectorMixin=s,exports.viewerCesiumInspectorMixin=c,exports.viewerDragDropMixin=$$1,exports.viewerPerformanceWatchdogMixin=m,exports.webGLConstantToGlslType=t$x,exports.websocketScheduler=l$I,exports.when=o$1l,exports.wrapFunction=e$O,exports.writeFragDepth=L$16,exports.writeLogDepthDecl=oo,exports.writeTextToCanvas=x$X,exports.zip=he$8,Object.defineProperty(exports,"__esModule",{value:!0})})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SuperMap3D={})}(this,(function(exports){"use strict";var factory;function e$2e(e){return null!=e}function t$15(e){var t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}factory=function(){var e,t;e=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(void 0,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();var n=1,r=function(e,t){var i=t.pixelRatio,n=t.version,r=t.stretchX,o=t.stretchY,a=t.content;this.paddedRect=e,this.pixelRatio=i,this.stretchX=r,this.stretchY=o,this.content=a,this.version=n},o={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};o.tl.get=function(){return[this.paddedRect.x+n,this.paddedRect.y+n]},o.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-n,this.paddedRect.y+this.paddedRect.h-n]},o.tlbr.get=function(){return this.tl.concat(this.br)},o.displaySize.get=function(){return[(this.paddedRect.w-2*n)/this.pixelRatio,(this.paddedRect.h-2*n)/this.pixelRatio]},Object.defineProperties(r.prototype,o);var a,s=(a=!0,function(e,t){var i=a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return a=!1,i}),l=s(void 0,(function(){return l.toString().search("(((.+)+)+)+$").toString().constructor(l).search("(((.+)+)+)+$")}));l();var u=function(e,t){c(this,e,4,t)};function c(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function h(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=c({},{width:n,height:r},i);d(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function d(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)return console.log("out of range source coordinates for image copy"),t;if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)return console.log("out of range destination coordinates for image copy"),t;for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}function f(e){for(var t=0,i=0,n=0,r=e;n<r.length;n+=1){var o=r[n];t+=o.w*o.h,i=Math.max(i,o.w)}e.sort((function(e,t){return t.h-e.h}));for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}],s=0,l=0,u=0,c=e;u<c.length;u+=1)for(var h=c[u],d=a.length-1;d>=0;d--){var f=a[d];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var p=a.pop();d<a.length&&(a[d]=p)}else h.h===f.h?(f.x+=h.w,f.w-=h.w):h.w===f.w?(f.y+=h.h,f.h-=h.h):(a.push({x:f.x+h.w,y:f.y,w:f.w-h.w,h:h.h}),f.y+=h.h,f.h-=h.h);break}}return{w:s,h:l,fill:t/(s*l)||0}}u.prototype.resize=function(e){h(this,e,4)},u.prototype.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},u.prototype.clone=function(){return new u({width:this.width,height:this.height},new Uint8Array(this.data))},u.copy=function(e,t,i,n,r){d(e,t,i,n,r,4)};var p,_=(p=!0,function(e,t){var i=p?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return p=!1,i}),m=_(void 0,(function(){return m.toString().search("(((.+)+)+)+$").toString().constructor(m).search("(((.+)+)+)+$")}));m();var g=1,x=function(e,t){var i={},n={};this.haveRenderCallbacks=[];var r=[];this.addImages(e,i,r),this.addImages(t,n,r);var o=f(r),a=o.w,s=o.h,l=new u({width:a||1,height:s||1});for(var c in e){var h=e[c],d=i[c].paddedRect;u.copy(h.data,l,{x:0,y:0},{x:d.x+g,y:d.y+g},h.data)}for(var p in t){var _=t[p],m=n[p].paddedRect,x=m.x+g,y=m.y+g,v=_.data.width,$=_.data.height;u.copy(_.data,l,{x:0,y:0},{x:x,y:y},_.data),u.copy(_.data,l,{x:0,y:$-1},{x:x,y:y-1},{width:v,height:1}),u.copy(_.data,l,{x:0,y:0},{x:x,y:y+$},{width:v,height:1}),u.copy(_.data,l,{x:v-1,y:0},{x:x-1,y:y},{width:1,height:$}),u.copy(_.data,l,{x:0,y:0},{x:x+v,y:y},{width:1,height:$})}this.image=l,this.iconPositions=i,this.patternPositions=n};x.prototype.addImages=function(e,t,i){for(var n in e){var o=e[n],a={x:0,y:0,w:o.data.width+2*g,h:o.data.height+2*g};i.push(a),t[n]=new r(a,o),o.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},x.prototype.patchUpdatedImages=function(e,t){for(var i in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[i],e.getImage(i),t),this.patchUpdatedImage(this.patternPositions[i],e.getImage(i),t)},x.prototype.patchUpdatedImage=function(e,t,i){if(e&&t&&e.version!==t.version){e.version=t.version;var n=e.tl,r=n[0],o=n[1];i.update(t.data,void 0,{x:r,y:o})}};var y,v=(y=!0,function(e,t){var i=y?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return y=!1,i}),$=v(void 0,(function(){return $.toString().search("(((.+)+)+)+$").toString().constructor($).search("(((.+)+)+)+$")}));$();var b={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function T(e){return(e=Math.round(e))<0?0:e>255?255:e}function C(e){return e<0?0:e>1?1:e}function S(e){return"%"===e[e.length-1]?T(parseFloat(e)/100*255):T(parseInt(e))}function w(e){return"%"===e[e.length-1]?C(parseFloat(e)/100):C(parseFloat(e))}function E(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function P(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in b)return b[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===i.length){var o=i.substr(0,n),a=i.substr(n+1,r-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=w(a.pop());case"rgb":return 3!==a.length?null:[S(a[0]),S(a[1]),S(a[2]),s];case"hsla":if(4!==a.length)return null;s=w(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=w(a[1]),c=w(a[2]),h=c<=.5?c*(u+1):c+u-c*u,d=2*c-h;return[T(255*E(d,h,l+1/3)),T(255*E(d,h,l)),T(255*E(d,h,l-1/3)),s];default:return null}}return null}const A=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),L=A(void 0,(function(){return L.toString().search("(((.+)+)+)+$").toString().constructor(L).search("(((.+)+)+)+$")}));L();class M{constructor(e,t,i,n=1){this.r=e,this.g=t,this.b=i,this.a=n}static parse(e){if(!e)return;if(e instanceof M)return e;if("string"!=typeof e)return;const t=P(e);return t?new M(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,i,n]=this.toArray();return"rgba("+Math.round(e)+","+Math.round(t)+","+Math.round(i)+","+n+")"}toArray(){const{r:e,g:t,b:i,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*i/n,n]}}M.black=new M(0,0,0,1),M.white=new M(1,1,1,1),M.transparent=new M(0,0,0,0),M.red=new M(1,0,0,1);var R={kind:"null"},O={kind:"number"},D={kind:"string"},I={kind:"boolean"},B={kind:"color"},F={kind:"object"},N={kind:"value"},G={kind:"formatted"},z={kind:"resolvedImage"};function U(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));return r(),{kind:"array",itemType:e,N:t}}function V(e){if("array"===e.kind){var t=V(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var k=[R,O,D,I,B,G,F,U(N),z];function W(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!W(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var i=0,n=k;i<n.length;i+=1)if(!W(n[i],t))return null}return"Expected "+V(e)+" but found "+V(t)+" instead."}var H,q=(H=!0,function(e,t){var i=H?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return H=!1,i}),j=q(void 0,(function(){return j.toString().search("(((.+)+)+)+$").toString().constructor(j).search("(((.+)+)+)+$")}));j();var X=function(e,t,i){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};X.prototype.compare=function(e,t){return this.collator.compare(e,t)},X.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Y,Z=(Y=!0,function(e,t){var i=Y?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Y=!1,i}),K=Z(void 0,(function(){return K.toString().search("(((.+)+)+)+$").toString().constructor(K).search("(((.+)+)+)+$")}));K();var Q,J=function(e,t,i,n,r){this.text=e,this.image=t,this.scale=i,this.fontStack=n,this.textColor=r},ee=(Q=!0,function(e,t){var i=Q?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Q=!1,i}),te=ee(void 0,(function(){return te.toString().search("(((.+)+)+)+$").toString().constructor(te).search("(((.+)+)+)+$")}));te();var ie=function(e){this.sections=e};ie.fromString=function(e){return new ie([new J(e,null,null,null,null)])},ie.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},ie.factory=function(e){return e instanceof ie?e:ie.fromString(e)},ie.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},ie.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];if(n.image)e.push(["image",n.image.name]);else{e.push(n.text);var r={};n.fontStack&&(r["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(r["font-scale"]=n.scale),n.textColor&&(r["text-color"]=["rgba"].concat(n.textColor.toArray())),e.push(r)}}return e};var ne,re=(ne=!0,function(e,t){var i=ne?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ne=!1,i}),oe=re(void 0,(function(){return oe.toString().search("(((.+)+)+)+$").toString().constructor(oe).search("(((.+)+)+)+$")}));oe();var ae=function(e){this.name=e.name,this.available=e.available};ae.prototype.toString=function(){return this.name},ae.fromString=function(e){return new ae({name:e,available:!1})},ae.prototype.serialize=function(){return["image",this.name]};var se,le=(se=!0,function(e,t){var i=se?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return se=!1,i}),ue=le(void 0,(function(){return ue.toString().search("(((.+)+)+)+$").toString().constructor(ue).search("(((.+)+)+)+$")}));ue();var ce={kind:"null"},he={kind:"number"},de={kind:"string"},fe={kind:"boolean"},pe={kind:"color"},_e={kind:"object"},me={kind:"value"},ge={kind:"collator"},xe={kind:"formatted"},ye={kind:"resolvedImage"};function ve(e,t){return{kind:"array",itemType:e,N:t}}function $e(){}$e.validateRGBA=function(e,t,i,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,i,n]:[e,t,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."},$e.isValue=function(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof M)return!0;if(e instanceof X)return!0;if(e instanceof ie)return!0;if(e instanceof ae)return!0;if(Array.isArray(e)){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(!$e.isValue(n))return!1}return!0}if("object"==typeof e){for(var r in e)if(!$e.isValue(e[r]))return!1;return!0}return!1},$e.typeOf=function(e){if(null===e)return ce;if("string"==typeof e)return de;if("boolean"==typeof e)return fe;if("number"==typeof e)return he;if(e instanceof M)return pe;if(e instanceof X)return ge;if(e instanceof ie)return xe;if(e instanceof ae)return ye;if(Array.isArray(e)){for(var t,i=e.length,n=0,r=e;n<r.length;n+=1){var o=r[n],a=$e.typeOf(o);if(t){if(t===a)continue;t=me;break}t=a}return ve(t||me,i)}return _e},$e.toString$1=function(e){var t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof M||e instanceof ie||e instanceof ae?e.toString():JSON.stringify(e)};var be,Te=(be=!0,function(e,t){var i=be?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return be=!1,i}),Ce=Te(void 0,(function(){return Ce.toString().search("(((.+)+)+)+$").toString().constructor(Ce).search("(((.+)+)+)+$")}));Ce();var Se={kind:"number"},we={kind:"string"},Ee={kind:"boolean"},Pe={kind:"object"},Ae={kind:"value"};function Le(e,t){return{kind:"array",itemType:e,N:t}}var Me={string:we,number:Se,boolean:Ee,object:Pe},Re=function(e,t){this.type=e,this.args=t};Re.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i,n=1,r=e[0];if("array"===r){var o,a;if(e.length>2){var s=e[1];if("string"!=typeof s||!(s in Me)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=Me[s],n++}else o=Ae;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}i=Le(o,a)}else i=Me[r];for(var l=[];n<e.length;n++){var u=t.parse(e[n],n,Ae);if(!u)return null;l.push(u)}return new Re(i,l)},Re.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var i=this.args[t].evaluate(e);if(!W(this.type,$e.typeOf(i)))return i;if(t===this.args.length-1)throw new RuntimeError("Expected value to be of type "+toString(this.type)+", but found "+toString($e.typeOf(i))+" instead.")}return null},Re.prototype.eachChild=function(e){this.args.forEach(e)},Re.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},Re.prototype.serialize=function(){var e=this.type,t=[e.kind];if("array"===e.kind){var i=e.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){t.push(i.kind);var n=e.N;("number"==typeof n||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var Oe,De=(Oe=!0,function(e,t){var i=Oe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Oe=!1,i}),Ie=De(void 0,(function(){return Ie.toString().search("(((.+)+)+)+$").toString().constructor(Ie).search("(((.+)+)+)+$")}));Ie();var Be={kind:"number"},Fe={kind:"value"};function Ne(e,t){return{kind:"array",itemType:e,N:t}}var Ge=function(e,t,i){this.type=e,this.index=t,this.input=i};Ge.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,Be),n=t.parse(e[2],2,Ne(t.expectedType||Fe));if(!i||!n)return null;var r=n.type;return new Ge(r.itemType,i,n)},Ge.prototype.evaluate=function(e){var t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new RuntimeError("Array index out of bounds: "+t+" < 0.");if(t>=i.length)throw new RuntimeError("Array index out of bounds: "+t+" > "+(i.length-1)+".");if(t!==Math.floor(t))throw new RuntimeError("Array index must be an integer, but found "+t+" instead.");return i[t]},Ge.prototype.eachChild=function(e){e(this.index),e(this.input)},Ge.prototype.possibleOutputs=function(){return[void 0]},Ge.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ze,Ue=(ze=!0,function(e,t){var i=ze?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ze=!1,i}),Ve=Ue(void 0,(function(){return Ve.toString().search("(((.+)+)+)+$").toString().constructor(Ve).search("(((.+)+)+)+$")}));Ve();var ke={kind:"boolean"},We=function(e,t,i){this.type=e,this.branches=t,this.otherwise=i};We.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var i;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(var n=[],r=1;r<e.length-1;r+=2){var o=t.parse(e[r],r,ke);if(!o)return null;var a=t.parse(e[r+1],r+1,i);if(!a)return null;n.push([o,a]),i=i||a.type}var s=t.parse(e[e.length-1],e.length-1,i);return s?new We(i,n,s):null},We.prototype.evaluate=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];if(r.evaluate(e))return o.evaluate(e)}return this.otherwise.evaluate(e)},We.prototype.eachChild=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e(r),e(o)}e(this.otherwise)},We.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.branches.map((function(e){return e[0],e[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},We.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var He,qe=(He=!0,function(e,t){var i=He?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return He=!1,i}),je=qe(void 0,(function(){return je.toString().search("(((.+)+)+)+$").toString().constructor(je).search("(((.+)+)+)+$")}));je();var Xe={kind:"value"},Ye=function(e,t){this.type=e,this.args=t};Ye.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var i=null,n=t.expectedType;n&&"value"!==n.kind&&(i=n);for(var r=[],o=0,a=e.slice(1);o<a.length;o+=1){var s=a[o],l=t.parse(s,1+r.length,i,void 0,{typeAnnotation:"omit"});if(!l)return null;i=i||l.type,r.push(l)}var u=n&&r.some((function(e){return W(n,e.type)}));return new Ye(u?Xe:i,r)},Ye.prototype.evaluate=function(e){for(var t,i=null,n=0,r=0,o=this.args;r<o.length&&(n++,(i=o[r].evaluate(e))&&i instanceof ae&&!i.available&&(!t&&(t=i.name),i=null,n===this.args.length&&(i=t)),null===i);r+=1);return i},Ye.prototype.eachChild=function(e){this.args.forEach(e)},Ye.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},Ye.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Ze,Ke=(Ze=!0,function(e,t){var i=Ze?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ze=!1,i}),Qe=Ke(void 0,(function(){return Qe.toString().search("(((.+)+)+)+$").toString().constructor(Qe).search("(((.+)+)+)+$")}));Qe();var Je={kind:"number"},et={kind:"string"},tt={kind:"boolean"},it={kind:"color"},nt={kind:"value"},rt={"to-boolean":tt,"to-color":it,"to-number":Je,"to-string":et},ot=function(e,t){this.type=e,this.args=t};ot.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[0];if(("to-boolean"===i||"to-string"===i)&&2!==e.length)return t.error("Expected one argument.");for(var n=rt[i],r=[],o=1;o<e.length;o++){var a=t.parse(e[o],o,nt);if(!a)return null;r.push(a)}return new ot(n,r)},ot.prototype.evaluate=function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){for(var t,i,n=0,r=this.args;n<r.length;n+=1){if(i=null,(t=r[n].evaluate(e))instanceof M)return t;if("string"==typeof t){var o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&!(i=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":validateRGBA(t[0],t[1],t[2],t[3])))return new M(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new RuntimeError(i||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null===(a=l[s].evaluate(e)))return 0;var u=Number(a);if(!isNaN(u))return u}throw new RuntimeError("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?Formatted.fromString($e.toString$1(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?ae.fromString($e.toString$1(this.args[0].evaluate(e))):$e.toString$1(this.args[0].evaluate(e))},ot.prototype.eachChild=function(e){this.args.forEach(e)},ot.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},ot.prototype.serialize=function(){if("formatted"===this.type.kind)return new FormatExpression([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ImageExpression(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var at,st=(at=!0,function(e,t){var i=at?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return at=!1,i}),lt=st(void 0,(function(){return lt.toString().search("(((.+)+)+)+$").toString().constructor(lt).search("(((.+)+)+)+$")}));lt();var ut={kind:"string"},ct={kind:"boolean"},ht={kind:"collator"},dt=function(e,t,i){this.type=ht,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=t};dt.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var i=e[1];if("object"!=typeof i||Array.isArray(i))return t.error("Collator options argument must be an object.");var n=t.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,ct);if(!n)return null;var r=t.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,ct);if(!r)return null;var o=null;return i.locale&&!(o=t.parse(i.locale,1,ut))?null:new dt(n,r,o)},dt.prototype.evaluate=function(e){return new X(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},dt.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},dt.prototype.possibleOutputs=function(){return[void 0]},dt.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var ft={kind:"boolean"},pt={kind:"value"},_t={kind:"collator"};function mt(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function gt(e,t,i){return t===i}function xt(e,t,i){return t!==i}function yt(e,t,i){return t<i}function vt(e,t,i){return t>i}function $t(e,t,i){return t<=i}function bt(e,t,i){return t>=i}function Tt(e,t,i,n){return 0===n.compare(t,i)}function Ct(e,t,i,n){return!Tt(0,t,i,n)}function St(e,t,i,n){return n.compare(t,i)<0}function wt(e,t,i,n){return n.compare(t,i)>0}function Et(e,t,i,n){return n.compare(t,i)<=0}function Pt(e,t,i,n){return n.compare(t,i)>=0}function At(e,t,i){var n,r=(n=!0,function(e,t){var i=n?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}),o="=="!==e&&"!="!==e;return function(){var n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function a(e,t,i){this.type=ft,this.lhs=e,this.rhs=t,this.collator=i,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return n(),a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var i=e[0],n=t.parse(e[1],1,pt);if(!n)return null;if(!mt(i,n.type))return t.concat(1).error('"'+i+"\" comparisons are not supported for type '"+toString(n.type)+"'.");var r=t.parse(e[2],2,pt);if(!r)return null;if(!mt(i,r.type))return t.concat(2).error('"'+i+"\" comparisons are not supported for type '"+toString(r.type)+"'.");if(n.type.kind!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot compare types '"+toString(n.type)+"' and '"+toString(r.type)+"'.");o&&("value"===n.type.kind&&"value"!==r.type.kind?n=new Re(r.type,[n]):"value"!==n.type.kind&&"value"===r.type.kind&&(r=new Re(n.type,[r])));var s=null;if(4===e.length){if("string"!==n.type.kind&&"string"!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,_t)))return null}return new a(n,r,s)},a.prototype.evaluate=function(n){var r=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(o&&this.hasUntypedArgument){var s=$e.typeOf(r),l=$e.typeOf(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new RuntimeError('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!o&&this.hasUntypedArgument){var u=$e.typeOf(r),c=$e.typeOf(a);if("string"!==u.kind||"string"!==c.kind)return t(n,r,a)}return this.collator?i(n,r,a,this.collator.evaluate(n)):t(n,r,a)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.possibleOutputs=function(){return[!0,!1]},a.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},a}()}var Lt={};Lt.Equals=At("==",gt,Tt),Lt.NotEquals=At("!=",xt,Ct),Lt.LessThan=At("<",yt,St),Lt.GreaterThan=At(">",vt,wt),Lt.LessThanOrEqual=At("<=",$t,Et),Lt.GreaterThanOrEqual=At(">=",bt,Pt);var Mt,Rt=(Mt=!0,function(e,t){var i=Mt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Mt=!1,i}),Ot=Rt(void 0,(function(){return Ot.toString().search("(((.+)+)+)+$").toString().constructor(Ot).search("(((.+)+)+)+$")}));Ot();var Dt={kind:"number"},It={kind:"string"},Bt={kind:"color"},Ft={kind:"value"},Nt={kind:"formatted"},Gt={kind:"resolvedImage"};function zt(e,t){return{kind:"array",itemType:e,N:t}}var Ut=function(e){this.type=Nt,this.sections=e};Ut.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[1];if(!Array.isArray(i)&&"object"==typeof i)return t.error("First argument must be an image or text section.");for(var n=[],r=!1,o=1;o<=e.length-1;++o){var a=e[o];if(r&&"object"==typeof a&&!Array.isArray(a)){r=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,Dt)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,zt(It))))return null;var u=null;if(a["text-color"]&&!(u=t.parse(a["text-color"],1,Bt)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var h=t.parse(e[o],1,Ft);if(!h)return null;var d=h.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new Ut(n)},Ut.prototype.evaluate=function(e){return new ie(this.sections.map((function(t){var i=t.content.evaluate(e);return $e.typeOf(i)===Gt?new J("",i,null,null,null):new J($e.toString$1(i),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},Ut.prototype.eachChild=function(e){for(var t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e(n.content),n.scale&&e(n.scale),n.font&&e(n.font),n.textColor&&e(n.textColor)}},Ut.prototype.possibleOutputs=function(){return[void 0]},Ut.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e.push(n.content.serialize());var r={};n.scale&&(r["font-scale"]=n.scale.serialize()),n.font&&(r["text-font"]=n.font.serialize()),n.textColor&&(r["text-color"]=n.textColor.serialize()),e.push(r)}return e};var Vt,kt=(Vt=!0,function(e,t){var i=Vt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Vt=!1,i}),Wt=kt(void 0,(function(){return Wt.toString().search("(((.+)+)+)+$").toString().constructor(Wt).search("(((.+)+)+)+$")}));Wt();var Ht={kind:"string"},qt={kind:"resolvedImage"},jt=function(e){this.type=qt,this.input=e};jt.parse=function(e,t){if(2!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,Ht);return i?new jt(i):t.error("No image name provided.")},jt.prototype.evaluate=function(e){var t=this.input.evaluate(e),i=!1;return e.availableImages&&e.availableImages.indexOf(t)>-1&&(i=!0),new ae({name:t,available:i})},jt.prototype.eachChild=function(e){e(this.input)},jt.prototype.possibleOutputs=function(){return[void 0]},jt.prototype.serialize=function(){return["image",this.input.serialize()]};var Xt,Yt=(Xt=!0,function(e,t){var i=Xt?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Xt=!1,i}),Zt=Yt(void 0,(function(){return Zt.toString().search("(((.+)+)+)+$").toString().constructor(Zt).search("(((.+)+)+)+$")}));Zt();var Kt=function(e,t,i,n,r){this.type=e,this.operator=t,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=r;o<a.length;o+=1){var s=a[o],l=s[0],u=s[1];this.labels.push(l),this.outputs.push(u)}},Qt={kind:"number"},Jt={kind:"color"};function ei(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}Kt.interpolationFactor=function(e,t,i,n){var r=0;if("exponential"===e.name)r=ei(t,e.base,i,n);else if("linear"===e.name)r=ei(t,1,i,n);else if("cubic-bezier"===e.name){var o=e.controlPoints;r=new unitbezier(o[0],o[1],o[2],o[3]).solve(ei(t,1,i,n))}return r},Kt.parse=function(e,t){var i=e[0],n=e[1],r=e[2],o=e.slice(3);if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var a=n[1];if("number"!=typeof a)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:a}}else{if("cubic-bezier"!==n[0])return t.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some((function(e){return"number"!=typeof e||e<0||e>1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(r=t.parse(r,2,Qt)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=Jt:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c<o.length;c+=2){var h=o[c],d=o[c+1],f=c+3,p=c+4;if("number"!=typeof h)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var _=t.parse(d,p,u);if(!_)return null;u=u||_.type,l.push([h,_])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new Kt(u,i,n,r,l):t.error("Type "+toString(u)+" is not interpolatable.")},Kt.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;if(n>=t[r-1])return i[r-1].evaluate(e);var o=findStopLessThanOrEqualTo(t,n),a=t[o],s=t[o+1],l=Kt.interpolationFactor(this.interpolation,n,a,s),u=i[o].evaluate(e),c=i[o+1].evaluate(e);return"interpolate"===this.operator?interpolate[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?hcl.reverse(hcl.interpolate(hcl.forward(u),hcl.forward(c),l)):lab.reverse(lab.interpolate(lab.forward(u),lab.forward(c),l))},Kt.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1)e(i[t])},Kt.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},Kt.prototype.serialize=function(){var e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],i=0;i<this.labels.length;i++)t.push(this.labels[i],this.outputs[i].serialize());return t};var ti,ii=(ti=!0,function(e,t){var i=ti?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ti=!1,i}),ni=ii(void 0,(function(){return ni.toString().search("(((.+)+)+)+$").toString().constructor(ni).search("(((.+)+)+)+$")}));ni();var ri={kind:"boolean"},oi={kind:"value"};function ai(e){return"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind}function si(e){return"boolean"==typeof e||"string"==typeof e||"number"==typeof e}function li(e){return Array.isArray(e)||"string"==typeof e}var ui=function(e,t){this.type=ri,this.needle=e,this.haystack=t};ui.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,oi),n=t.parse(e[2],2,oi);return i&&n?ai(i.type)?new ui(i,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+toString(i.type)+" instead"):null},ui.prototype.evaluate=function(e){var t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!t||!i)return!1;if(!si(t))throw new RuntimeError("Expected first argument to be of type boolean, string or number, but found "+toString(typeOf(t))+" instead.");if(!li(i))throw new RuntimeError("Expected second argument to be of type array or string, but found "+toString(typeOf(i))+" instead.");return i.indexOf(t)>=0},ui.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},ui.prototype.possibleOutputs=function(){return[!0,!1]},ui.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var ci,hi=(ci=!0,function(e,t){var i=ci?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ci=!1,i}),di=hi(void 0,(function(){return di.toString().search("(((.+)+)+)+$").toString().constructor(di).search("(((.+)+)+)+$")}));di();var fi=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};fi.prototype.evaluate=function(e){return this.result.evaluate(e)},fi.prototype.eachChild=function(e){for(var t=0,i=this.bindings;t<i.length;t+=1)e(i[t][1]);e(this.result)},fi.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var i=[],n=1;n<e.length-1;n+=2){var r=e[n];if("string"!=typeof r)return t.error("Expected string, but found "+typeof r+" instead.",n);if(/[^a-zA-Z0-9_]/.test(r))return t.error("Variable names must contain only alphanumeric characters or '_'.",n);var o=t.parse(e[n+1],n+1);if(!o)return null;i.push([r,o])}var a=t.parse(e[e.length-1],e.length-1,t.expectedType,i);return a?new fi(i,a):null},fi.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},fi.prototype.serialize=function(){for(var e=["let"],t=0,i=this.bindings;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e.push(r,o.serialize())}return e.push(this.result.serialize()),e};var pi,_i=(pi=!0,function(e,t){var i=pi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return pi=!1,i}),mi=_i(void 0,(function(){return mi.toString().search("(((.+)+)+)+$").toString().constructor(mi).search("(((.+)+)+)+$")}));mi();var gi={kind:"number"},xi=function(e){this.type=gi,this.input=e};xi.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?t.error("Expected argument of type string or array, but found "+toString(i.type)+" instead."):new xi(i):null},xi.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new RuntimeError("Expected value to be of type string or array, but found "+toString(typeOf(t))+" instead.")},xi.prototype.eachChild=function(e){e(this.input)},xi.prototype.possibleOutputs=function(){return[void 0]},xi.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var yi,vi=(yi=!0,function(e,t){var i=yi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return yi=!1,i}),$i=vi(void 0,(function(){return $i.toString().search("(((.+)+)+)+$").toString().constructor($i).search("(((.+)+)+)+$")}));$i();var bi=function(e,t){this.type=e,this.value=t};bi.parse=function(e,t){if(2!==e.length)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!$e.isValue(e[1]))return t.error("invalid value");var i=e[1],n=$e.typeOf(i),r=t.expectedType;return"array"===n.kind&&0===n.N&&r&&"array"===r.kind&&("number"!=typeof r.N||0===r.N)&&(n=r),new bi(n,i)},bi.prototype.evaluate=function(){return this.value},bi.prototype.eachChild=function(){},bi.prototype.possibleOutputs=function(){return[this.value]},bi.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Color?["rgba"].concat(this.value.toArray()):this.value instanceof ie?this.value.serialize():this.value};var Ti,Ci=(Ti=!0,function(e,t){var i=Ti?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ti=!1,i}),Si=Ci(void 0,(function(){return Si.toString().search("(((.+)+)+)+$").toString().constructor(Si).search("(((.+)+)+)+$")}));Si();var wi={kind:"value"},Ei=function(e,t,i,n,r,o){this.inputType=e,this.type=t,this.input=i,this.cases=n,this.outputs=r,this.otherwise=o};Ei.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var i,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var r={},o=[],a=2;a<e.length-1;a+=2){var s=e[a],l=e[a+1];!Array.isArray(s)&&(s=[s]);var u=t.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,h=s;c<h.length;c+=1){var d=h[c];if("number"!=typeof d&&"string"!=typeof d)return u.error("Branch labels must be numbers or strings.");if("number"==typeof d&&Math.abs(d)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,$e.typeOf(d)))return null}else i=$e.typeOf(d);if(void 0!==r[String(d)])return u.error("Branch labels must be unique.");r[String(d)]=o.length}var f=t.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var p=t.parse(e[1],1,wi);if(!p)return null;var _=t.parse(e[e.length-1],e.length-1,n);return _?"value"!==p.type.kind&&t.concat(1).checkSubtype(i,p.type)?null:new Ei(i,n,p,r,o,_):null},Ei.prototype.evaluate=function(e){var t=this.input.evaluate(e);return($e.typeOf(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},Ei.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},Ei.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},Ei.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],i=[],n={},r=0,o=Object.keys(this.cases).sort();r<o.length;r+=1){var a=o[r];void 0===(h=n[this.cases[a]])?(n[this.cases[a]]=i.length,i.push([this.cases[a],[a]])):i[h][1].push(a)}for(var s=function(t){return"number"===e.inputType.kind?Number(t):t},l=0,u=i;l<u.length;l+=1){var c=u[l],h=c[0],d=c[1];1===d.length?t.push(s(d[0])):t.push(d.map(s)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var Pi,Ai=(Pi=!0,function(e,t){var i=Pi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Pi=!1,i}),Li=Ai(void 0,(function(){return Li.toString().search("(((.+)+)+)+$").toString().constructor(Li).search("(((.+)+)+)+$")}));Li();var Mi={kind:"number"},Ri={kind:"string"},Oi=function(e,t,i,n,r){this.type=Ri,this.number=e,this.locale=t,this.currency=i,this.minFractionDigits=n,this.maxFractionDigits=r};Oi.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,Mi);if(!i)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var r=null;if(n.locale&&!(r=t.parse(n.locale,1,Ri)))return null;var o=null;if(n.currency&&!(o=t.parse(n.currency,1,Ri)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=t.parse(n["min-fraction-digits"],1,Mi)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,Mi))?null:new Oi(i,r,o,a,s)},Oi.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},Oi.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},Oi.prototype.possibleOutputs=function(){return[void 0]},Oi.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Di,Ii=(Di=!0,function(e,t){var i=Di?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Di=!1,i}),Bi=Ii(void 0,(function(){return Bi.toString().search("(((.+)+)+)+$").toString().constructor(Bi).search("(((.+)+)+)+$")}));function Fi(e,t){for(var i,n,r=e.length-1,o=0,a=r,s=0;o<=a;)if(i=e[s=Math.floor((o+a)/2)],n=e[s+1],i<=t){if(s===r||t<n)return s;o=s+1}else{if(!(i>t))throw new RuntimeError("Input is not a number.");a=s-1}return 0}Bi();var Ni,Gi=(Ni=!0,function(e,t){var i=Ni?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ni=!1,i}),zi=Gi(void 0,(function(){return zi.toString().search("(((.+)+)+)+$").toString().constructor(zi).search("(((.+)+)+)+$")}));zi();var Ui={kind:"number"},Vi=function(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,r=i;n<r.length;n+=1){var o=r[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};Vi.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var i=t.parse(e[1],1,Ui);if(!i)return null;var n=[],r=null;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var o=1;o<e.length;o+=2){var a=1===o?-1/0:e[o],s=e[o+1],l=o,u=o+1;if("number"!=typeof a)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,r);if(!c)return null;r=r||c.type,n.push([a,c])}return new Vi(r,i,n)},Vi.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;return n>=t[r-1]?i[r-1].evaluate(e):i[Fi(t,n)].evaluate(e)},Vi.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1)e(i[t])},Vi.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},Vi.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var ki,Wi=(ki=!0,function(e,t){var i=ki?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ki=!1,i}),Hi=Wi(void 0,(function(){return Hi.toString().search("(((.+)+)+)+$").toString().constructor(Hi).search("(((.+)+)+)+$")}));Hi();var qi=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};qi.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var i=e[1];return t.scope.has(i)?new qi(i,t.scope.get(i)):t.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},qi.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},qi.prototype.eachChild=function(){},qi.prototype.possibleOutputs=function(){return[void 0]},qi.prototype.serialize=function(){return["var",this.name]};var ji,Xi=(ji=!0,function(e,t){var i=ji?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ji=!1,i}),Yi=Xi(void 0,(function(){return Yi.toString().search("(((.+)+)+)+$").toString().constructor(Yi).search("(((.+)+)+)+$")}));Yi();var Zi,Ki={"==":Lt.Equals,"!=":Lt.NotEquals,">":Lt.GreaterThan,"<":Lt.LessThan,">=":Lt.GreaterThanOrEqual,"<=":Lt.LessThanOrEqual,array:Re,at:Ge,boolean:Re,case:We,coalesce:Ye,collator:dt,format:Ut,image:jt,in:ui,interpolate:Kt,"interpolate-hcl":Kt,"interpolate-lab":Kt,length:xi,let:fi,literal:bi,match:Ei,number:Re,"number-format":Oi,object:Re,step:Vi,string:Re,"to-boolean":ot,"to-color":ot,"to-number":ot,"to-string":ot,var:qi},Qi=(Zi=!0,function(e,t){var i=Zi?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Zi=!1,i}),Ji=Qi(void 0,(function(){return Ji.toString().search("(((.+)+)+)+$").toString().constructor(Ji).search("(((.+)+)+)+$")}));function en(){}Ji();var tn={};for(var nn in en.register=function(e,t,i){void 0===i&&(i={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),tn[e]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}},en.register("Object",Object),en.register("Color",M),en.register("Error",Error),en.register("ResolvedImage",ae),en.register("ImageAtlas",x),en.register("ImagePosition",r),en.register("RGBAImage",u),en.register("Formatted",ie),en.register("FormattedSection",J),Ki)Ki[nn]._classRegistryKey||en.register("Expression_"+nn,Ki[nn]);function rn(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}en.serialize=function(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(rn(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var i=e;return t&&t.push(i.buffer),i}if(e instanceof ImageData)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var n=[],r=0,o=e;r<o.length;r+=1){var a=o[r];n.push(en.serialize(a,t))}return n}if("object"==typeof e){var s=e.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var u=s.serialize?s.serialize(e,t):{};if(!s.serialize){for(var c in e)if(e.hasOwnProperty(c)&&!(tn[l].omit.indexOf(c)>=0)){var h=e[c];"function"!=typeof h&&(u[c]=tn[l].shallow.indexOf(c)>=0?h:en.serialize(h,t))}e instanceof Error&&(u.message=e.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof e)},en.deserialize=function(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||rn(e)||ArrayBuffer.isView(e)||e instanceof ImageData)return e;if(Array.isArray(e))return e.map(en.deserialize);if("object"==typeof e){var t=e.$name||"Object",i=tn[t].klass;if(!i)throw new Error("can't deserialize unregistered class "+t);if(i.deserialize)return i.deserialize(e);for(var n=Object.create(i.prototype),r=0,o=Object.keys(e);r<o.length;r+=1){var a=o[r];if("$name"!==a){var s=e[a];n[a]=tn[t].shallow.indexOf(a)>=0?s:en.deserialize(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)};var on,an=(on=!0,function(e,t){var i=on?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return on=!1,i}),sn=an(void 0,(function(){return sn.toString().search("(((.+)+)+)+$").toString().constructor(sn).search("(((.+)+)+)+$")}));function ln(e){this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}sn(),ln.prototype.trigger=function(){!this._triggered&&(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))};const un=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),cn=un(void 0,(function(){return cn.toString().search("(((.+)+)+)+$").toString().constructor(cn).search("(((.+)+)+)+$")}));function hn(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function dn(e,t,i){this.target=e,this.parent=t,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},hn(["receive","process"],this),this.invoker=new ln(this.process),this.target.addEventListener("message",this.receive,!1)}cn(),dn.prototype.send=function(e,t,i,n){const r=++dn.taskId;i&&(this.callbacks[r]=i);const o=[];return this.target.postMessage({id:r,type:e,hasCallback:!!i,targetMapId:n,sourceMapId:this.mapId,data:en.serialize(t,o)},o),{cancel:()=>{i&&delete this.callbacks[r],this.target.postMessage({id:r,type:"<cancel>",targetMapId:n,sourceMapId:this.mapId})}}},dn.prototype.receive=function(e){const t=e.data,i=t.id;if(i&&(!t.targetMapId||this.mapId===t.targetMapId))if("<cancel>"===t.type){delete this.tasks[i];const e=this.cancelCallbacks[i];delete this.cancelCallbacks[i],e&&e()}else this.tasks[i]=t,this.taskQueue.push(i),this.invoker.trigger()},dn.prototype.process=function(){if(!this.taskQueue.length)return;const e=this.taskQueue.shift(),t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t)if("<response>"===t.type){const i=this.callbacks[e];delete this.callbacks[e],i&&(t.error?i(en.deserialize(t.error)):i(null,en.deserialize(t.data)))}else{let i=!1;const n=t.hasCallback?(t,n)=>{i=!0,delete this.cancelCallbacks[e];const r=[];this.target.postMessage({id:e,type:"<response>",sourceMapId:this.mapId,error:t?en.serialize(t):null,data:en.serialize(n,r)},r)}:e=>{i=!0};let r=null;const o=en.deserialize(t.data);if(this.parent[t.type])r=this.parent[t.type](t.sourceMapId,o,n);else if(this.parent.getWorkerSource){const e=t.type.split(".");r=this.parent.getWorkerSource(t.sourceMapId,e[0],o.source)[e[1]](o,n)}else n(new Error("Could not find function "+t.type));!i&&r&&r.cancel&&(this.cancelCallbacks[e]=r.cancel)}},dn.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},dn.taskId=0;var fn,pn=(fn=!0,function(e,t){var i=fn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return fn=!1,i}),_n=pn(void 0,(function(){return _n.toString().search("(((.+)+)+)+$").toString().constructor(_n).search("(((.+)+)+)+$")}));_n();var mn=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var i=0,n=t;i<n.length;i+=1){var r=n[i],o=r[0],a=r[1];this.bindings[o]=a}};mn.prototype.concat=function(e){return new mn(this,e)},mn.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},mn.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var gn,xn=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,i),this.message=i,this.key=t}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r}(Error),yn=(gn=!0,function(e,t){var i=gn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return gn=!1,i}),vn=yn(void 0,(function(){return vn.toString().search("(((.+)+)+)+$").toString().constructor(vn).search("(((.+)+)+)+$")}));vn();var $n=["Unknown","Point","LineString","Polygon"],bn=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null};bn.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},bn.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?$n[this.feature.type]:this.feature.type:null},bn.prototype.properties=function(){return this.feature&&this.feature.properties||{}},bn.prototype.parseColor=function(e){var t=this._parseColorCache[e];return!t&&(t=this._parseColorCache[e]=M.parse(e)),t},en.register("EvaluationContext",bn);var Tn,Cn=(Tn=!0,function(e,t){var i=Tn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Tn=!1,i}),Sn=Cn(void 0,(function(){return Sn.toString().search("(((.+)+)+)+$").toString().constructor(Sn).search("(((.+)+)+)+$")}));function wn(){}Sn(),wn.isFeatureConstant=function(e){if(e instanceof Ln.CompoundExpression){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}var t=!0;return e.eachChild((function(e){t&&!wn.isFeatureConstant(e)&&(t=!1)})),t},wn.isStateConstant=function(e){if(e instanceof Ln.CompoundExpression&&"feature-state"===e.name)return!1;var t=!0;return e.eachChild((function(e){t&&!wn.isStateConstant(e)&&(t=!1)})),t},wn.isGlobalPropertyConstant=function(e,t){if(e instanceof Ln.CompoundExpression&&t.indexOf(e.name)>=0)return!1;var i=!0;return e.eachChild((function(e){i&&!wn.isGlobalPropertyConstant(e,t)&&(i=!1)})),i};var En,Pn=(En=!0,function(e,t){var i=En?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return En=!1,i}),An=Pn(void 0,(function(){return An.toString().search("(((.+)+)+)+$").toString().constructor(An).search("(((.+)+)+)+$")}));An();var Ln=function(e,t,i,n,r){void 0===t&&(t=[]),void 0===n&&(n=new mn),void 0===r&&(r=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=r,this.expectedType=i};function Mn(e,t){const i=t[e];return void 0===i?null:i}Ln.prototype.parse=function(e,t,i,n,r){return void 0===r&&(r={}),t?this.concat(t,i,n)._parse(e,r):this._parse(e,r)},Ln.prototype._parse=function(e,t){function i(e,t,i){return"assert"===i?new Re(t,[e]):"coerce"===i?new ot(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var o=r.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=i(o,a,t.typeAnnotation||"coerce");else o=i(o,a,t.typeAnnotation||"assert")}return!(o instanceof bi)&&o.type.kind,o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},Ln.prototype.concat=function(e,t,i){var n="number"==typeof e?this.path.concat(e):this.path,r=i?this.scope.concat(i):this.scope;return new Ln(this.registry,n,t||null,r,this.errors)},Ln.prototype.error=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new xn(n,e))},Ln.prototype.checkSubtype=function(e,t){var i=W(e,t);return i&&this.error(i),i};var Rn=function(e,t,i,n){this.name=e,this.type=t,this._evaluate=i,this.args=n};function On(e){return Array.isArray(e)?"("+e.map(toString).join(", ")+")":"("+toString(e.type)+"...)"}Rn.prototype.evaluate=function(e,t){return this._evaluate(e,this.args,t)},Rn.prototype.eachChild=function(e){this.args.forEach(e)},Rn.prototype.possibleOutputs=function(){return[void 0]},Rn.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},Rn.parse=function(e,t){var i,n=e[0],r=Rn.definitions[n];if(!r)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=a.filter((function(t){var i=t[0];return!Array.isArray(i)||i.length===e.length-1})),l=null,u=0,c=s;u<c.length;u+=1){var h=c[u],d=h[0],f=h[1];l=new Ln(t.registry,t.path,null,t.scope);for(var p=[],_=!1,m=1;m<e.length;m++){var g=e[m],x=Array.isArray(d)?d[m-1]:d.type,y=l.parse(g,1+p.length,x);if(!y){_=!0;break}p.push(y)}if(!_)if(Array.isArray(d)&&d.length!==p.length)l.error("Expected "+d.length+" arguments, but found "+p.length+" instead.");else{for(var v=0;v<p.length;v++){var $=Array.isArray(d)?d[v]:d.type,b=p[v];l.concat(v+1).checkSubtype($,b.type)}if(0===l.errors.length)return new Rn(n,o,f,p)}}if(1===s.length)(i=t.errors).push.apply(i,l.errors);else{for(var T=(s.length?s:a).map((function(e){return On(e[0])})).join(" | "),C=[],S=1;S<e.length;S++){var w=t.parse(e[S],1+C.length);if(!w)return null;C.push(toString(w.type))}t.error("Expected arguments of type "+T+", but found ("+C.join(", ")+") instead.")}return null},Rn.register=function(e,t){for(var i in Rn.definitions=t,t)e[i]=Rn},en.register("CompoundExpression",Rn);var Dn={kind:"number"},In={kind:"string"},Bn={kind:"boolean"},Fn={kind:"color"},Nn={kind:"object"},Gn={kind:"value"},zn={kind:"error"},Un={kind:"collator"};function Vn(e,t){return{kind:"array",itemType:e,N:t}}function kn(e){return{type:e}}function Wn(e,t){var i=t[0],n=t[1],r=t[2],o=t[3];i=i.evaluate(e),n=n.evaluate(e),r=r.evaluate(e);var a=o?o.evaluate(e):1,s=Values.validateRGBA(i,n,r,a);if(s)throw new RuntimeError(s);return new Color(i/255*a,n/255*a,r/255*a,a)}Rn.register(Ki,{error:[zn,[In],function(e,t){var i=t[0];throw new RuntimeError(i.evaluate(e))}],typeof:[In,[Gn],function(e,t){var i=t[0];return toString(Values.typeOf(i.evaluate(e)))}],"to-rgba":[Vn(Dn,4),[Fn],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[Fn,[Dn,Dn,Dn],Wn],rgba:[Fn,[Dn,Dn,Dn,Dn],Wn],has:{type:Bn,overloads:[[[In],function(e,t){var i=t[0];return has(i.evaluate(e),e.properties())}],[[In,Nn],function(e,t){var i=t[0],n=t[1];return has(i.evaluate(e),n.evaluate(e))}]]},get:{type:Gn,overloads:[[[In],function(e,t){return Mn(t[0].evaluate(e),e.properties())}],[[In,Nn],function(e,t){var i=t[0],n=t[1];return Mn(i.evaluate(e),n.evaluate(e))}]]},"feature-state":[Gn,[In],function(e,t){return Mn(t[0].evaluate(e),e.featureState||{})}],properties:[Nn,[],function(e){return e.properties()}],"geometry-type":[In,[],function(e){return e.geometryType()}],id:[Gn,[],function(e){return e.id()}],zoom:[Dn,[],function(e){return e.globals.zoom}],"heatmap-density":[Dn,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[Dn,[],function(e){return e.globals.lineProgress||0}],accumulated:[Gn,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[Dn,kn(Dn),function(e,t){for(var i=0,n=0,r=t;n<r.length;n+=1)i+=r[n].evaluate(e);return i}],"*":[Dn,kn(Dn),function(e,t){for(var i=1,n=0,r=t;n<r.length;n+=1)i*=r[n].evaluate(e);return i}],"-":{type:Dn,overloads:[[[Dn,Dn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)-n.evaluate(e)}],[[Dn],function(e,t){return-t[0].evaluate(e)}]]},"/":[Dn,[Dn,Dn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)/n.evaluate(e)}],"%":[Dn,[Dn,Dn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)%n.evaluate(e)}],ln2:[Dn,[],function(){return Math.LN2}],pi:[Dn,[],function(){return Math.PI}],e:[Dn,[],function(){return Math.E}],"^":[Dn,[Dn,Dn],function(e,t){var i=t[0],n=t[1];return Math.pow(i.evaluate(e),n.evaluate(e))}],sqrt:[Dn,[Dn],function(e,t){var i=t[0];return Math.sqrt(i.evaluate(e))}],log10:[Dn,[Dn],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN10}],ln:[Dn,[Dn],function(e,t){var i=t[0];return Math.log(i.evaluate(e))}],log2:[Dn,[Dn],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN2}],sin:[Dn,[Dn],function(e,t){var i=t[0];return Math.sin(i.evaluate(e))}],cos:[Dn,[Dn],function(e,t){var i=t[0];return Math.cos(i.evaluate(e))}],tan:[Dn,[Dn],function(e,t){var i=t[0];return Math.tan(i.evaluate(e))}],asin:[Dn,[Dn],function(e,t){var i=t[0];return Math.asin(i.evaluate(e))}],acos:[Dn,[Dn],function(e,t){var i=t[0];return Math.acos(i.evaluate(e))}],atan:[Dn,[Dn],function(e,t){var i=t[0];return Math.atan(i.evaluate(e))}],min:[Dn,kn(Dn),function(e,t){return Math.min.apply(Math,t.map((function(t){return t.evaluate(e)})))}],max:[Dn,kn(Dn),function(e,t){return Math.max.apply(Math,t.map((function(t){return t.evaluate(e)})))}],abs:[Dn,[Dn],function(e,t){var i=t[0];return Math.abs(i.evaluate(e))}],round:[Dn,[Dn],function(e,t){var i=t[0].evaluate(e);return i<0?-Math.round(-i):Math.round(i)}],floor:[Dn,[Dn],function(e,t){var i=t[0];return Math.floor(i.evaluate(e))}],ceil:[Dn,[Dn],function(e,t){var i=t[0];return Math.ceil(i.evaluate(e))}],"filter-==":[Bn,[In,Gn],function(e,t,i){var n=t[0],r=t[1];if(i){var o,a,s=n.value,l=r.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":o=c+d;break;case"-":o=c-d}return o===(a=r.value)}if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(o="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);a="left"==g?d.substring(0,x):d.substring(d.length-x)}else a=r.value;return o===a}return e.properties()[n.value]===e.properties()[r.value]}return e.properties()[n.value]===r.value}],"filter-id-==":[Bn,[Gn],function(e,t){var i=t[0];return e.id()===i.value}],"filter-like":[Bn,[In,In],function(e,t){var i=t[0].value,n=t[1].value,r=e.properties();return i in r&&(/^%.*[^%]$/.test(n)?(n=n.replace("%",""),r[i].endsWith(n)):/^(?!%).+%$/.test(n)?(n=n.replace("%",""),r[i].startsWith(n)):(n=n.replace(/%/g,""),r[i].indexOf(n)>-1))}],"filter-type-==":[Bn,[In],function(e,t){var i=t[0];return e.geometryType()===i.value}],"filter-<":[Bn,[In,Gn],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<r}],"filter-id-<":[Bn,[Gn],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<r}],"filter->":[Bn,[In,Gn],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>r}],"filter-id->":[Bn,[Gn],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[Bn,[In,Gn],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<=r}],"filter-id-<=":[Bn,[Gn],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[Bn,[In,Gn],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>=r}],"filter-id->=":[Bn,[Gn],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[Bn,[Gn],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[Bn,[],function(e){return null!==e.id()}],"filter-type-in":[Bn,[Vn(In)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[Bn,[Vn(Gn)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[Bn,[In,Vn(Gn)],function(e,t){var i=t[0];return t[1].value.indexOf(e.properties()[i.value])>=0}],"filter-in-large":[Bn,[In,Vn(Gn)],function(e,t){var i=t[0],n=t[1];return binarySearch(e.properties()[i.value],n.value,0,n.value.length-1)}],all:{type:Bn,overloads:[[[Bn,Bn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)&&n.evaluate(e)}],[kn(Bn),function(e,t){for(var i=0,n=t;i<n.length;i+=1)if(!n[i].evaluate(e))return!1;return!0}]]},crossFields:{type:Bn,overloads:[[[Bn,Bn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e,!0)&&n.evaluate(e,!0)}],[kn(Bn),function(e,t){for(var i=0,n=t;i<n.length;i+=1)if(!n[i].evaluate(e,!0))return!1;return!0}]]},any:{type:Bn,overloads:[[[Bn,Bn],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)||n.evaluate(e)}],[kn(Bn),function(e,t){for(var i=0,n=t;i<n.length;i+=1)if(n[i].evaluate(e))return!0;return!1}]]},"!":[Bn,[Bn],function(e,t,i){return!t[0].evaluate(e,i)}],"is-supported-script":[Bn,[In],function(e,t){var i=t[0],n=e.globals&&e.globals.isSupportedScript;return!n||n(i.evaluate(e))}],upcase:[In,[In],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[In,[In],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[In,kn(Gn),function(e,t){return t.map((function(t){return Values.toString$1(t.evaluate(e))})).join("")}],"resolved-locale":[In,[Un],function(e,t){return t[0].evaluate(e).resolvedLocale()}]}),Ln.CompoundExpression=Rn;var Hn,qn=(Hn=!0,function(e,t){var i=Hn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Hn=!1,i}),jn=qn(void 0,(function(){return jn.toString().search("(((.+)+)+)+$").toString().constructor(jn).search("(((.+)+)+)+$")}));jn();var Xn=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new bn,this._defaultValue=t?Zn(t):null,this._enumValues=t&&"enum"===t.type?t.values:null};function Yn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Zn(e){return"color"===e.type&&Yn(e.default)?new M(0,0,0,0):"color"===e.type?M.parse(e.default)||null:void 0===e.default?null:e.default}Xn.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r,this.expression.evaluate(this._evaluator)},Xn.prototype.evaluate=function(e,t,i,n,r){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=i||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new RuntimeError("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(e){return!this._warningHistory[e.message]&&(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}},en.register("StyleExpression",Xn);var Kn,Qn=(Kn=!0,function(e,t){var i=Kn?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Kn=!1,i}),Jn=Qn(void 0,(function(){return Jn.toString().search("(((.+)+)+)+$").toString().constructor(Jn).search("(((.+)+)+)+$")}));function er(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function tr(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function ir(e){return!!e.expression&&e.expression.interpolated}Jn();var nr,rr=(nr=!0,function(e,t){var i=nr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return nr=!1,i}),or=rr(void 0,(function(){return or.toString().search("(((.+)+)+)+$").toString().constructor(or).search("(((.+)+)+)+$")}));function ar(){}function sr(e){return{result:"success",value:e}}function lr(e){return{result:"error",value:e}}or(),ar.isExpression=function(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in Ki};var ur={kind:"number"},cr={kind:"string"},hr={kind:"boolean"},dr={kind:"color"},fr={kind:"value"},pr={kind:"formatted"},_r={kind:"resolvedImage"};function mr(e,t){return{kind:"array",itemType:e,N:t}}function gr(e){var t=null;if(e instanceof fi)t=gr(e.result);else if(e instanceof Ye){for(var i of e.args)if(t=gr(i))break}else(e instanceof Vi||e instanceof Kt)&&e.input instanceof Ln.CompoundExpression&&"zoom"===e.input.name&&(t=e);return t instanceof xn||e.eachChild((e=>{var i=gr(e);i instanceof xn?t=i:!t&&i?t=new xn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new xn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function xr(e){var t={color:dr,string:cr,number:ur,enum:cr,boolean:hr,formatted:pr,resolvedImage:_r};return"array"===e.type?mr(t[e.value]||fr,e.length):t[e.type]}function yr(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function vr(e){return e}function $r(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}function br(e,t,i){var n=void 0!==e.base?e.base:1;if("number"!==Rr(i))return Ar(e.default,t.default);var r=e.stops.length;if(1===r)return e.stops[0][1];if(i<=e.stops[0][0])return e.stops[0][1];if(i>=e.stops[r-1][0])return e.stops[r-1][1];var o=Fi(e.stops.map((e=>e[0])),i),a=Lr(i,n,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],u=interpolate[t.type]||vr;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=colorSpaces[e.colorSpace];u=(e,t)=>c.reverse(c.interpolate(c.forward(e),c.forward(t),a))}return"function"==typeof s.evaluate?{evaluate(...e){var t=s.evaluate.apply(void 0,e),i=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==i)return u(t,i,a)}}:u(s,l,a)}function Tr(e,t,i){return"color"===t.type?i=M.parse(i):"formatted"===t.type?i=Formatted.fromString(i.toString()):"resolvedImage"===t.type?i=ResolvedImage.fromString(i.toString()):Rr(i)!==t.type&&("enum"!==t.type||!t.values[i])&&(i=void 0),Ar(i,e.default,t.default)}function Cr(e,t){var i=new Ln(Ki,[],t?xr(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?sr(new Xn(n,t)):lr(i.errors)}function Sr(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!wn.isStateConstant(t.expression)}function wr(e,t,i,n){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent="camera"!==e&&!wn.isStateConstant(t.expression),this.interpolationType=n}function Er(e,t){if("error"===(e=Cr(e,t)).result)return e;var i=e.value.expression,n=wn.isFeatureConstant(i);if(!n&&!er(t))return lr([new xn("","data expressions not supported")]);var r=wn.isGlobalPropertyConstant(i,["zoom"]);if(!r&&!tr(t))return lr([new xn("","zoom expressions not supported")]);var o=gr(i);if(!o&&!r)return lr([new xn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof xn)return lr([o]);if(o instanceof Kt&&!ir(t))return lr([new xn("",'"interpolate" expressions cannot be used with this property')]);if(!o)return sr(new Sr(n?"constant":"source",e.value));var a=o instanceof Kt?o.interpolation:void 0;return sr(new wr(n?"camera":"composite",e.value,o.labels,a))}function Pr(e,t){var i,n,r,o="color"===t.type,a=e.stops&&"object"==typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,u=e.type||(ir(t)?"exponential":"interval");if(o&&((e=$r({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],M.parse(e[1])]}))),e.default?e.default=M.parse(e.default):e.default=M.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!colorSpaces[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)i=br;else if("interval"===u)i=evaluateIntervalFunction;else if("categorical"===u){i=evaluateCategoricalFunction,n=Object.create(null);for(var c=0,h=e.stops;c<h.length;c+=1){var d=h[c];n[d[0]]=d[1]}r=typeof e.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');i=Tr}if(a){for(var f={},p=[],_=0;_<e.stops.length;_++){var m=e.stops[_],g=m[0].zoom;void 0===f[g]&&(f[g]={zoom:g,type:e.type,property:e.property,default:e.default,stops:[]},p.push(g)),f[g].stops.push([m[0].value,m[1]])}for(var x=[],y=0,v=p;y<v.length;y+=1){var $=v[y];x.push([f[$].zoom,Pr(f[$],t)])}var b={name:"linear"};return{kind:"composite",interpolationType:b,interpolationFactor:Kt.interpolationFactor.bind(void 0,b),zoomStops:x.map((function(e){return e[0]})),evaluate:function(i,n){var r=i.zoom;return br({stops:x,base:e.base},t,r).evaluate(r,n)}}}if(l){var T="exponential"===u?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:T,interpolationFactor:Kt.interpolationFactor.bind(void 0,T),zoomStops:e.stops.map((function(e){return e[0]})),evaluate:function(o){var a=o.zoom;return i(e,t,a,n,r)}}}return{kind:"source",evaluate:function(o,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?Ar(e.default,t.default):i(e,t,s,n,r)}}}function Ar(e,t,i){return void 0!==e?e:void 0!==t?t:void 0!==i?i:void 0}function Lr(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}ar.createExpression=function(e,t){var i=new Ln(Ki,[],t?xr(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?sr(new Xn(n,t)):lr(i.errors)},Sr.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},Sr.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},en.register("ZoomConstantExpression",Sr),wr.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},wr.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},wr.prototype.interpolationFactor=function(e,t,i){return this.interpolationType?Kt.interpolationFactor(this.interpolationType,e,t,i):0},en.register("ZoomDependentExpression",wr);var Mr=function(e,t){this._parameters=e,this._specification=t,$r(this,Pr(this._parameters,this._specification))};function Rr(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}Mr.deserialize=function(e){return new Mr(e._parameters,e._specification)},Mr.serialize=function(e){return{_parameters:e._parameters,_specification:e._specification}},en.register("StylePropertyFunction",Mr),ar.normalizePropertyExpression=function(e,t){if(yr(e))return new Mr(e,t);if(ar.isExpression(e)){var i=Er(e,t);if("error"===i.result)throw new Error(i.value.map((function(e){return e.key+": "+e.message})).join(", "));return i.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=M.parse(e)),{kind:"constant",evaluate:function(){return n}}};var Or,Dr=(Or=!0,function(e,t){var i=Or?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Or=!1,i}),Ir=Dr(void 0,(function(){return Ir.toString().search("(((.+)+)+)+$").toString().constructor(Ir).search("(((.+)+)+)+$")}));function Br(){}Ir(),Br.isExpressionFilter=function(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&Array.isArray(e[2]);case"!in":case"!has":case"none":case"crossFields":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":case"like":case"!like":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,i=e.slice(1);t<i.length;t+=1){var n=i[t];if(!Br.isExpressionFilter(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}};var Fr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Nr(e,t){return e<t?-1:e>t?1:0}function Gr(e){if(!e)return!0;var t=e[0];return e.length<=1?"any"!==t:"=="===t?zr(e[1],e[2],"=="):"!="===t?Wr(zr(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?zr(e[1],e[2],t):"any"===t?Ur(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(Gr)):"crossFields"===t?["crossFields"].concat(e.slice(1).map(Gr)):"none"===t?["all"].concat(e.slice(1).map(Gr).map(Wr)):"in"===t?Vr(e[1],e.slice(2)):"!in"===t?Wr(Vr(e[1],e.slice(2))):"has"===t?kr(e[1]):"!has"===t?Wr(kr(e[1])):"like"===t?zr(e[1],e[2],"like"):"!like"!==t||Wr(zr(e[1],e[2],"like"))}function zr(e,t,i){switch(e){case"$type":return["filter-type-"+i,t];case"$id":return["filter-id-"+i,t];default:return["filter-"+i,e,t]}}function Ur(e){return["any"].concat(e.map(Gr))}function Vr(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(Nr)]]:["filter-in-small",e,["literal",t]]}}function kr(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Wr(e){return["!",e]}Br.createFilter=function(e){if(null==e)return function(){return!0};!Br.isExpressionFilter(e)&&(e=Gr(e));var t=ar.createExpression(e,Fr);if("error"===t.result)throw new Error(t.value.map((function(e){return e.key+": "+e.message})).join(", "));return function(e,i){return t.value.evaluate(e,i)}};var Hr,qr=(Hr=!0,function(e,t){var i=Hr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Hr=!1,i}),jr=qr(void 0,(function(){return jr.toString().search("(((.+)+)+)+$").toString().constructor(jr).search("(((.+)+)+)+$")}));jr();const Xr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Yr(e){var t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var i="[",n=0,r=e;n<r.length;n+=1)i+=Yr(r[n])+",";return i+"]"}for(var o=Object.keys(e).sort(),a="{",s=0;s<o.length;s++)a+=JSON.stringify(o[s])+":"+Yr(e[o[s]])+",";return a+"}"}function Zr(e){for(var t="",i=0,n=Xr;i<n.length;i+=1)t+="/"+Yr(e[n[i]]);return t}function Kr(e,t){for(var i={},n=0;n<e.length;n++){var r=t&&t[e[n].id]||Zr(e[n]);t&&(t[e[n].id]=r);var o=i[r];!o&&(o=i[r]=[]),o.push(e[n])}var a=[];for(var s in i)a.push(i[s]);return a}var Qr,Jr=(Qr=!0,function(e,t){var i=Qr?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Qr=!1,i}),eo=Jr(void 0,(function(){return eo.toString().search("(((.+)+)+)+$").toString().constructor(eo).search("(((.+)+)+)+$")}));function to(e,t){this.x=e,this.y=t}eo(),to.prototype={clone:function(){return new to(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,i=e.y-this.y;return t*t+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,i=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=i,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),i=Math.sin(e),n=t*this.x-i*this.y,r=i*this.x+t*this.y;return this.x=n,this.y=r,this},_rotateAround:function(e,t){var i=Math.cos(e),n=Math.sin(e),r=t.x+i*(this.x-t.x)-n*(this.y-t.y),o=t.y+n*(this.x-t.x)+i*(this.y-t.y);return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},to.convert=function(e){return e instanceof to?e:Array.isArray(e)?new to(e[0],e[1]):e};var io,no=(io=!0,function(e,t){var i=io?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return io=!1,i}),ro=no(void 0,(function(){return ro.toString().search("(((.+)+)+)+$").toString().constructor(ro).search("(((.+)+)+)+$")}));ro();var oo={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};function ao(e,t){void 0===t&&(t=1);var i=0,n=0;return{members:e.map((function(e){var r=so(e.type),o=i=lo(i,Math.max(t,r)),a=e.components||1;return n=Math.max(n,r),i+=r*a,{name:e.name,type:e.type,components:a,offset:o}})),size:lo(i,Math.max(n,t)),alignment:t}}function so(e){return oo[e].BYTES_PER_ELEMENT}function lo(e,t){return Math.ceil(e/t)*t}var uo,co=(uo=!0,function(e,t){var i=uo?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return uo=!1,i}),ho=co(void 0,(function(){return ho.toString().search("(((.+)+)+)+$").toString().constructor(ho).search("(((.+)+)+)+$")}));ho();var fo=function(){this.first=!0};fo.prototype.update=function(e,t){var i=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<i&&(this.lastIntegerZoom=i,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=i,!0))},en.register("ZoomHistory",fo);var po,_o=(po=!0,function(e,t){var i=po?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return po=!1,i}),mo=_o(void 0,(function(){return mo.toString().search("(((.+)+)+)+$").toString().constructor(mo).search("(((.+)+)+)+$")}));mo();var go=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new fo,this.transition={})};go.prototype.isSupportedScript=function(e){return!1},go.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},go.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),i=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*t}},en.register("EvaluationParameters",go);var xo,yo=(xo=!0,function(e,t){var i=xo?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return xo=!1,i}),vo=yo(void 0,(function(){return vo.toString().search("(((.+)+)+)+$").toString().constructor(vo).search("(((.+)+)+)+$")}));vo();var $o=8192;function bo(e,t,i){return Math.min(i,Math.max(t,e))}function To(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),{min:-1*Math.pow(2,e-1),max:Math.pow(2,e-1)-1}}var Co=To(15);function So(e){for(var t=$o/e.extent,i=e.loadGeometry(),n=0;n<i.length;n++)for(var r=i[n],o=0;o<r.length;o++){var a=r[o];a.x=Math.round(a.x*t),a.y=$o-Math.round(a.y*t),(a.x<Co.min||a.x>Co.max||a.y<Co.min||a.y>Co.max)&&(a.x=bo(a.x,Co.min,Co.max),a.y=bo(a.y,Co.min,Co.max))}return i}var wo,Eo=(wo=!0,function(e,t){var i=wo?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wo=!1,i}),Po=Eo(void 0,(function(){return Po.toString().search("(((.+)+)+)+$").toString().constructor(Po).search("(((.+)+)+)+$")}));Po();var Ao=function(e){void 0===e&&(e=[]),this.segments=e};Ao.prototype.prepareSegment=function(e,t,i,n){var r=this.segments[this.segments.length-1];return(!r||r.vertexLength+e>Ao.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==n)&&(r={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},void 0!==n&&(r.sortKey=n),this.segments.push(r)),r},Ao.prototype.get=function(){return this.segments},Ao.prototype.destroy=function(){for(var e=0,t=this.segments;e<t.length;e+=1){var i=t[e];for(var n in i.cesiumVaos)i.cesiumVaos[n].destroy()}},Ao.simpleSegment=function(e,t,i,n){return new Ao([{vertexOffset:e,primitiveOffset:t,vertexLength:i,primitiveLength:n,vaos:{},cesiumVaos:{},drawCommands:{},sortKey:0}])},Ao.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,en.register("SegmentVector",Ao);const Lo=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Mo=Lo(void 0,(function(){return Mo.toString().search("(((.+)+)+)+$").toString().constructor(Mo).search("(((.+)+)+)+$")}));Mo();var Ro=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8};const Oo=128,Do=5;var Io=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Io.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},Io.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},Io.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Io.prototype.clear=function(){this.length=0},Io.prototype.resize=function(e){this.reserve(e),this.length=e},Io.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*Do),Oo),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&(0==t.length&&console.log("oldUint8Array.length == 0"),this.uint8.set(t))}},Io.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Bo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=i,e},t}(Io);Bo.prototype.bytesPerElement=4,en.register("StructArrayLayout2i4",Bo);var Fo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=i,this.int16[o+2]=n,this.int16[o+3]=r,e},t}(Io);Fo.prototype.bytesPerElement=8,en.register("StructArrayLayout4i8",Fo);var No=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(Io);No.prototype.bytesPerElement=12,en.register("StructArrayLayout2i4i12",No);var Go=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.uint8[l+4]=n,this.uint8[l+5]=r,this.uint8[l+6]=o,this.uint8[l+7]=a,e},t}(Io);Go.prototype.bytesPerElement=8,en.register("StructArrayLayout2i4ub8",Go);var zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=i,this.uint16[u+2]=n,this.uint16[u+3]=r,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,e},t}(Io);zo.prototype.bytesPerElement=16,en.register("StructArrayLayout8ui16",zo);var Uo=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},r.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},r.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.int16[f+0]=t,this.int16[f+1]=i,this.int16[f+2]=n,this.int16[f+3]=r,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=d,e},r}(Io);Uo.prototype.bytesPerElement=24,en.register("StructArrayLayout4i4ui4i24",Uo);var Vo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.float32[r+0]=t,this.float32[r+1]=i,this.float32[r+2]=n,e},t}(Io);Vo.prototype.bytesPerElement=12,en.register("StructArrayLayout3f12",Vo);var ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint32[i+0]=t,e},t}(Io);ko.prototype.bytesPerElement=4,en.register("StructArrayLayout1ul4",ko);var Wo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c){var h=this.length;return this.resize(h+1),this.emplace(h,e,t,i,n,r,o,a,s,l,u,c)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=12*e,f=6*e;return this.int16[d+0]=t,this.int16[d+1]=i,this.int16[d+2]=n,this.int16[d+3]=r,this.int16[d+4]=o,this.int16[d+5]=a,this.uint32[f+3]=s,this.uint16[d+8]=l,this.uint16[d+9]=u,this.int16[d+10]=c,this.int16[d+11]=h,e},t}(Io);Wo.prototype.bytesPerElement=24,en.register("StructArrayLayout6i1ul2ui2i24",Wo);var Ho=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(Io);Ho.prototype.bytesPerElement=12,en.register("StructArrayLayout2i2i2i12",Ho);var qo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=i,this.float32[a+1]=n,this.float32[a+2]=r,e},t}(Io);qo.prototype.bytesPerElement=12,en.register("StructArrayLayout2ub2f12",qo);var jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var g=this.length;return this.resize(g+1),this.emplace(g,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g){var x=24*e,y=12*e,v=48*e;return this.int16[x+0]=t,this.int16[x+1]=i,this.uint16[x+2]=n,this.uint16[x+3]=r,this.uint32[y+2]=o,this.uint32[y+3]=a,this.uint32[y+4]=s,this.uint16[x+10]=l,this.uint16[x+11]=u,this.uint16[x+12]=c,this.float32[y+7]=h,this.float32[y+8]=d,this.uint8[v+36]=f,this.uint8[v+37]=p,this.uint8[v+38]=_,this.uint32[y+10]=m,this.int16[x+22]=g,e},t}(Io);jo.prototype.bytesPerElement=48,en.register("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",jo);var Xo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S){var w=this.length;return this.resize(w+1),this.emplace(w,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S,w){var E=30*e,P=15*e;return this.int16[E+0]=t,this.int16[E+1]=i,this.int16[E+2]=n,this.int16[E+3]=r,this.int16[E+4]=o,this.int16[E+5]=a,this.int16[E+6]=s,this.int16[E+7]=l,this.uint16[E+8]=u,this.uint16[E+9]=c,this.uint16[E+10]=h,this.uint16[E+11]=d,this.uint16[E+12]=f,this.uint16[E+13]=p,this.uint16[E+14]=_,this.uint16[E+15]=m,this.uint16[E+16]=g,this.uint16[E+17]=x,this.uint16[E+18]=y,this.uint16[E+19]=v,this.uint16[E+20]=$,this.uint16[E+21]=b,this.uint32[P+11]=T,this.float32[P+12]=C,this.float32[P+13]=S,this.float32[P+14]=w,e},t}(Io);Xo.prototype.bytesPerElement=60,en.register("StructArrayLayout8i14ui1ul3f60",Xo);var Yo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.float32[i+0]=t,e},t}(Io);Yo.prototype.bytesPerElement=4,en.register("StructArrayLayout1f4",Yo);var Zo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.int16[r+0]=t,this.int16[r+1]=i,this.int16[r+2]=n,e},t}(Io);Zo.prototype.bytesPerElement=6,en.register("StructArrayLayout3i6",Zo);var Ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=2*e,o=4*e;return this.uint32[r+0]=t,this.uint16[o+2]=i,this.uint16[o+3]=n,e},t}(Io);Ko.prototype.bytesPerElement=8,en.register("StructArrayLayout1ul2ui8",Ko);var Qo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.uint16[r+0]=t,this.uint16[r+1]=i,this.uint16[r+2]=n,e},t}(Io);Qo.prototype.bytesPerElement=6,en.register("StructArrayLayout3ui6",Qo);var Jo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=i,e},t}(Io);Jo.prototype.bytesPerElement=4,en.register("StructArrayLayout2ui4",Jo);var ea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint16[i+0]=t,e},t}(Io);ea.prototype.bytesPerElement=2,en.register("StructArrayLayout1ui2",ea);var ta=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=i,e},t}(Io);ta.prototype.bytesPerElement=8,en.register("StructArrayLayout2f8",ta);var ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=i,this.float32[o+2]=n,this.float32[o+3]=r,e},t}(Io);ia.prototype.bytesPerElement=16,en.register("StructArrayLayout4f16",ia);var na=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.float32[s+0]=t,this.float32[s+1]=i,this.float32[s+2]=n,this.float32[s+3]=r,this.float32[s+4]=o,this.float32[s+5]=a,e},t}(Io);na.prototype.bytesPerElement=24,en.register("StructArrayLayout6f24",na);var ra=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.float32[u+0]=t,this.float32[u+1]=i,this.float32[u+2]=n,this.float32[u+3]=r,this.float32[u+4]=o,this.float32[u+5]=a,this.float32[u+6]=s,this.float32[u+7]=l,e},t}(Io);ra.prototype.bytesPerElement=32,en.register("StructArrayLayout8f32",ra);var oa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.float32[f+0]=t,this.float32[f+1]=i,this.float32[f+2]=n,this.float32[f+3]=r,this.float32[f+4]=o,this.float32[f+5]=a,this.float32[f+6]=s,this.float32[f+7]=l,this.float32[f+8]=u,this.float32[f+9]=c,this.float32[f+10]=h,this.float32[f+11]=d,e},t}(Io);oa.prototype.bytesPerElement=48,en.register("StructArrayLayout12f48",oa);var aa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return i.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.x1.get=function(){return this._structArray.int16[this._pos2+2]},i.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},i.y1.get=function(){return this._structArray.int16[this._pos2+3]},i.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},i.x2.get=function(){return this._structArray.int16[this._pos2+4]},i.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},i.y2.get=function(){return this._structArray.int16[this._pos2+5]},i.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.radius.get=function(){return this._structArray.int16[this._pos2+10]},i.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},i.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},i.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},i.anchorPoint.get=function(){return new pointGeometry(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,i),t}(Ro);aa.prototype.size=24;var sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new aa(this,e)},t}(Wo);en.register("CollisionBoxArray",sa);var la=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},i.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},i.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},i.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},i.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},i.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},i.segment.get=function(){return this._structArray.uint16[this._pos2+10]},i.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},i.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},i.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},i.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},i.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},i.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},i.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},i.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},i.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},i.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},i.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},i.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},i.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},i.associatedIconIndex.set=function(e){this._structArray.int16[this._pos2+22]=e},Object.defineProperties(t.prototype,i),t}(Ro);la.prototype.size=48;var ua=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new la(this,e)},t}(jo);en.register("PlacedSymbolArray",ua);var ca=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},i.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},i.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},i.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},i.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},i.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},i.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},i.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},i.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},i.placedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+6]=e},i.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},i.verticalPlacedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+7]=e},i.key.get=function(){return this._structArray.uint16[this._pos2+8]},i.key.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},i.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},i.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},i.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},i.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},i.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},i.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+14]=e},i.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},i.verticalIconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+15]=e},i.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},i.verticalIconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+16]=e},i.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},i.featureIndex.set=function(e){this._structArray.uint16[this._pos2+17]=e},i.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},i.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+18]=e},i.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},i.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+19]=e},i.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},i.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+20]=e},i.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},i.numVerticalIconVertices.set=function(e){this._structArray.uint16[this._pos2+21]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+11]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+11]=e},i.textBoxScale.get=function(){return this._structArray.float32[this._pos4+12]},i.textBoxScale.set=function(e){this._structArray.float32[this._pos4+12]=e},i.textOffset0.get=function(){return this._structArray.float32[this._pos4+13]},i.textOffset0.set=function(e){this._structArray.float32[this._pos4+13]=e},i.textOffset1.get=function(){return this._structArray.float32[this._pos4+14]},i.textOffset1.set=function(e){this._structArray.float32[this._pos4+14]=e},Object.defineProperties(t.prototype,i),t}(Ro);ca.prototype.size=60;var ha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ca(this,e)},t}(Xo);en.register("SymbolInstanceArray",ha);var da=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={offsetX:{configurable:!0}};return i.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},i.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,i),t}(Ro);da.prototype.size=4;var fa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new da(this,e)},t}(Yo);en.register("GlyphOffsetArray",fa);var pa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return i.x.get=function(){return this._structArray.int16[this._pos2+0]},i.x.set=function(e){this._structArray.int16[this._pos2+0]=e},i.y.get=function(){return this._structArray.int16[this._pos2+1]},i.y.set=function(e){this._structArray.int16[this._pos2+1]=e},i.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},i.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,i),t}(Ro);pa.prototype.size=6;var _a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new pa(this,e)},t}(Zo);en.register("SymbolLineVertexArray",_a);var ma=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,i),t}(Ro);ma.prototype.size=8;var ga=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ma(this,e)},t}(Ko);en.register("FeatureIndexArray",ga);var xa,ya=(xa=!0,function(e,t){var i=xa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return xa=!1,i}),va=ya(void 0,(function(){return va.toString().search("(((.+)+)+)+$").toString().constructor(va).search("(((.+)+)+)+$")}));va();var $a=function(e,t,i){this.property=e,this.value=t,this.parameters=i};$a.prototype.isConstant=function(){return"constant"===this.value.kind},$a.prototype.constantOr=function(e){return"constant"===this.value.kind?this.value.value:e},$a.prototype.evaluate=function(e,t,i){return this.property.evaluate(this.value,this.parameters,e,t,i)};var ba={},Ta=function(e,t){this.gl=e.gl,this.location=t};ba.Uniform1i=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,t,i),this.current=0}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},r}(Ta),ba.Uniform1f=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(Ta),ba.Uniform2f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(Ta),ba.Uniform3f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(Ta),ba.Uniform4f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},t}(Ta),ba.UniformColor=function(e){function t(t,i){e.call(this,t,i),this.current=M.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(Ta);var Ca=new Float32Array(16);function Sa(e,t){return e??t}function wa(e){return null!=e}function Ea(e){var t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}ba.UniformMatrix4f=function(e){function t(t,i){e.call(this,t,i),this.current=Ca}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.gl.uniformMatrix4fv(this.location,!1,e)},t}(Ta),Sa.EMPTY_OBJECT=Object.freeze({}),wa(Object.create)&&(Ea.prototype=Object.create(Error.prototype),Ea.prototype.constructor=Ea),Ea.prototype.toString=function(){var e=this.name+": "+this.message;return wa(this.stack)&&(e+="\n"+this.stack.toString()),e},Ea.throwInstantiationError=function(){throw new Ea("This function defines an interface and should not be called directly.")};const Pa={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047};var Aa=Object.freeze(Pa),La={BYTE:Aa.BYTE,UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,SHORT:Aa.SHORT,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,INT:Aa.INT,UNSIGNED_INT:Aa.UNSIGNED_INT,FLOAT:Aa.FLOAT,DOUBLE:Aa.DOUBLE,getSizeInBytes:function(e){if(!wa(e))throw new Ea("value is required.");switch(e){case La.BYTE:return Int8Array.BYTES_PER_ELEMENT;case La.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case La.SHORT:return Int16Array.BYTES_PER_ELEMENT;case La.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case La.INT:return Int32Array.BYTES_PER_ELEMENT;case La.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case La.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case La.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new Ea("componentDatatype is not a valid value.")}},fromTypedArray:function(e){return e instanceof Int8Array?La.BYTE:e instanceof Uint8Array?La.UNSIGNED_BYTE:e instanceof Int16Array?La.SHORT:e instanceof Uint16Array?La.UNSIGNED_SHORT:e instanceof Int32Array?La.INT:e instanceof Uint32Array?La.UNSIGNED_INT:e instanceof Float32Array?La.FLOAT:e instanceof Float64Array?La.DOUBLE:void 0},validate:function(e){return wa(e)&&(e===La.BYTE||e===La.UNSIGNED_BYTE||e===La.SHORT||e===La.UNSIGNED_SHORT||e===La.INT||e===La.UNSIGNED_INT||e===La.FLOAT||e===La.DOUBLE)},createTypedArray:function(e,t){if(!wa(e))throw new Ea("componentDatatype is required.");if(!wa(t))throw new Ea("valuesOrLength is required.");switch(e){case La.BYTE:return new Int8Array(t);case La.UNSIGNED_BYTE:return new Uint8Array(t);case La.SHORT:return new Int16Array(t);case La.UNSIGNED_SHORT:return new Uint16Array(t);case La.INT:return new Int32Array(t);case La.UNSIGNED_INT:return new Uint32Array(t);case La.FLOAT:return new Float32Array(t);case La.DOUBLE:return new Float64Array(t);default:throw new Ea("componentDatatype is not a valid value.")}},createArrayBufferView:function(e,t,i,n){if(!wa(e))throw new Ea("componentDatatype is required.");if(!wa(t))throw new Ea("buffer is required.");switch(i=Sa(i,0),n=Sa(n,(t.byteLength-i)/La.getSizeInBytes(e)),e){case La.BYTE:return new Int8Array(t,i,n);case La.UNSIGNED_BYTE:return new Uint8Array(t,i,n);case La.SHORT:return new Int16Array(t,i,n);case La.UNSIGNED_SHORT:return new Uint16Array(t,i,n);case La.INT:return new Int32Array(t,i,n);case La.UNSIGNED_INT:return new Uint32Array(t,i,n);case La.FLOAT:return new Float32Array(t,i,n);case La.DOUBLE:return new Float64Array(t,i,n);default:throw new Ea("componentDatatype is not a valid value.")}},fromName:function(e){switch(e){case"BYTE":return La.BYTE;case"UNSIGNED_BYTE":return La.UNSIGNED_BYTE;case"SHORT":return La.SHORT;case"UNSIGNED_SHORT":return La.UNSIGNED_SHORT;case"INT":return La.INT;case"UNSIGNED_INT":return La.UNSIGNED_INT;case"FLOAT":return La.FLOAT;case"DOUBLE":return La.DOUBLE;default:throw new Ea("name is not a valid value.")}}},Ma=Object.freeze(La),Ra=function(e){null==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};Ra.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++)e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30,this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0},Ra.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i<this.N-this.M;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+this.M]^e>>>1^t[1&e];for(;i<this.N-1;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+(this.M-this.N)]^e>>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},Ra.prototype.random=function(){return this.genrand_int32()*(1/4294967296)};var Oa={};function Da(e){return e+" is required, actual value was undefined"}function Ia(e,t,i){return"Expected "+i+" to be typeof "+t+", actual typeof was "+e}Oa.typeOf={},Oa.defined=function(e,t){if(!wa(t))throw new Ea(Da(e))},Oa.typeOf.func=function(e,t){if("function"!=typeof t)throw new Ea(Ia(typeof t,"function",e))},Oa.typeOf.string=function(e,t){if("string"!=typeof t)throw new Ea(Ia(typeof t,"string",e))},Oa.typeOf.number=function(e,t){if("number"!=typeof t)throw new Ea(Ia(typeof t,"number",e))},Oa.typeOf.number.lessThan=function(e,t,i){if(Oa.typeOf.number(e,t),t>=i)throw new Ea("Expected "+e+" to be less than "+i+", actual value was "+t)},Oa.typeOf.number.lessThanOrEquals=function(e,t,i){if(Oa.typeOf.number(e,t),t>i)throw new Ea("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},Oa.typeOf.number.greaterThan=function(e,t,i){if(Oa.typeOf.number(e,t),t<=i)throw new Ea("Expected "+e+" to be greater than "+i+", actual value was "+t)},Oa.typeOf.number.greaterThanOrEquals=function(e,t,i){if(Oa.typeOf.number(e,t),t<i)throw new Ea("Expected "+e+" to be greater than or equal to"+i+", actual value was "+t)},Oa.typeOf.object=function(e,t){if("object"!=typeof t)throw new Ea(Ia(typeof t,"object",e))},Oa.typeOf.bool=function(e,t){if("boolean"!=typeof t)throw new Ea(Ia(typeof t,"boolean",e))},Oa.typeOf.number.equals=function(e,t,i,n){if(Oa.typeOf.number(e,i),Oa.typeOf.number(t,n),i!==n)throw new Ea(e+" must be equal to "+t+", the actual values are "+i+" and "+n)};var Ba={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536};Ba.sign=Sa(Math.sign,(function(e){return 0==(e=+e)||e!=e?e:e>0?1:-1})),Ba.signNotZero=function(e){return e<0?-1:1},Ba.toSNorm=function(e,t){return t=Sa(t,255),Math.round((.5*Ba.clamp(e,-1,1)+.5)*t)},Ba.fromSNorm=function(e,t){return t=Sa(t,255),Ba.clamp(e,0,t)/t*2-1},Ba.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:Ba.clamp((e-t)/i,0,1)},Ba.sinh=Sa(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),Ba.cosh=Sa(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),Ba.lerp=function(e,t,i){return(1-i)*e+i*t},Ba.PI=Math.PI,Ba.ONE_OVER_PI=1/Math.PI,Ba.PI_OVER_TWO=Math.PI/2,Ba.PI_OVER_THREE=Math.PI/3,Ba.PI_OVER_FOUR=Math.PI/4,Ba.PI_OVER_SIX=Math.PI/6,Ba.THREE_PI_OVER_TWO=3*Math.PI/2,Ba.TWO_PI=2*Math.PI,Ba.ONE_OVER_TWO_PI=1/(2*Math.PI),Ba.RADIANS_PER_DEGREE=Math.PI/180,Ba.DEGREES_PER_RADIAN=180/Math.PI,Ba.RADIANS_PER_ARCSECOND=Ba.RADIANS_PER_DEGREE/3600,Ba.toRadians=function(e){if(!wa(e))throw new Ea("degrees is required.");return e*Ba.RADIANS_PER_DEGREE},Ba.toDegrees=function(e){if(!wa(e))throw new Ea("radians is required.");return e*Ba.DEGREES_PER_RADIAN},Ba.convertLongitudeRange=function(e){if(!wa(e))throw new Ea("angle is required.");var t=Ba.TWO_PI,i=e-Math.floor(e/t)*t;return i<-Math.PI?i+t:i>=Math.PI?i-t:i},Ba.clampToLatitudeRange=function(e){if(!wa(e))throw new Ea("angle is required.");return Ba.clamp(e,-1*Ba.PI_OVER_TWO,Ba.PI_OVER_TWO)},Ba.negativePiToPi=function(e){if(!wa(e))throw new Ea("angle is required.");return Ba.zeroToTwoPi(e+Ba.PI)-Ba.PI},Ba.zeroToTwoPi=function(e){if(!wa(e))throw new Ea("angle is required.");var t=Ba.mod(e,Ba.TWO_PI);return Math.abs(t)<Ba.EPSILON14&&Math.abs(e)>Ba.EPSILON14?Ba.TWO_PI:t},Ba.mod=function(e,t){if(!wa(e))throw new Ea("m is required.");if(!wa(t))throw new Ea("n is required.");return(e%t+t)%t},Ba.equalsEpsilon=function(e,t,i,n){if(!wa(e))throw new Ea("left is required.");if(!wa(t))throw new Ea("right is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");n=Sa(n,i);var r=Math.abs(e-t);return r<=n||r<=i*Math.max(Math.abs(e),Math.abs(t))},Ba.lessThan=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t<-i},Ba.lessThanOrEquals=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t<i},Ba.greaterThan=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t>i},Ba.greaterThanOrEquals=function(e,t,i){if(!wa(e))throw new Ea("first is required.");if(!wa(t))throw new Ea("second is required.");if(!wa(i))throw new Ea("relativeEpsilon is required.");return e-t>-i};var Fa=[1];Ba.factorial=function(e){if("number"!=typeof e||e<0)throw new Ea("A number greater than or equal to 0 is required.");var t=Fa.length;if(e>=t)for(var i=Fa[t-1],n=t;n<=e;n++){var r=i*n;Fa.push(r),i=r}return Fa[e]},Ba.incrementWrap=function(e,t,i){if(i=Sa(i,0),!wa(e))throw new Ea("n is required.");if(t<=i)throw new Ea("maximumValue must be greater than minimumValue.");return++e>t&&(e=i),e},Ba.isPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new Ea("A number greater than or equal to 0 is required.");return 0!==e&&0==(e&e-1)},Ba.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new Ea("A number greater than or equal to 0 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},Ba.clamp=function(e,t,i){if(!wa(e))throw new Ea("value is required");if(!wa(t))throw new Ea("min is required.");if(!wa(i))throw new Ea("max is required.");return e<t?t:e>i?i:e};var Na=new Ra;Ba.setRandomNumberSeed=function(e){if(!wa(e))throw new Ea("seed is required.");Na=new Ra(e)},Ba.nextRandomNumber=function(){return Na.random()},Ba.randomBetween=function(e,t){return Ba.nextRandomNumber()*(t-e)+e},Ba.acosClamped=function(e){if(!wa(e))throw new Ea("value is required.");return Math.acos(Ba.clamp(e,-1,1))},Ba.asinClamped=function(e){if(!wa(e))throw new Ea("value is required.");return Math.asin(Ba.clamp(e,-1,1))},Ba.chordLength=function(e,t){if(!wa(e))throw new Ea("angle is required.");if(!wa(t))throw new Ea("radius is required.");return 2*t*Math.sin(.5*e)},Ba.logBase=function(e,t){if(!wa(e))throw new Ea("number is required.");if(!wa(t))throw new Ea("base is required.");return Math.log(e)/Math.log(t)},Ba.cbrt=Sa(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t})),Ba.log2=Sa(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),Ba.fog=function(e,t){var i=e*t;return 1-Math.exp(-i*i)},Ba.fastApproximateAtan=function(e){return Oa.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},Ba.fastApproximateAtan2=function(e,t){Oa.typeOf.number("x",e),Oa.typeOf.number("y",t);var i,n,r=Math.abs(e);i=Math.abs(t),n=Math.max(r,i);var o=(i=Math.min(r,i))/n;if(isNaN(o))throw new Ea("either x or y must be nonzero");return r=Ba.fastApproximateAtan(o),r=Math.abs(t)>Math.abs(e)?Ba.PI_OVER_TWO-r:r,r=e<0?Ba.PI-r:r,r=t<0?-r:r};var Ga={UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,UNSIGNED_INT:Aa.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case Ga.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Ga.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Ga.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new Ea("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return Ga.UNSIGNED_SHORT;case 4:return Ga.UNSIGNED_INT;case 1:return Ga.UNSIGNED_BYTE;default:throw new Ea("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return wa(e)&&(e===Ga.UNSIGNED_BYTE||e===Ga.UNSIGNED_SHORT||e===Ga.UNSIGNED_INT)},createTypedArray:function(e,t){if(!wa(e))throw new Ea("numberOfVertices is required.");return e>=Ba.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,i,n){if(!wa(e))throw new Ea("numberOfVertices is required.");if(!wa(t))throw new Ea("sourceArray is required.");if(!wa(i))throw new Ea("byteOffset is required.");return e>=Ba.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,i,n):new Uint16Array(t,i,n)}},za=Object.freeze(Ga),Ua={STREAM_DRAW:Aa.STREAM_DRAW,STATIC_DRAW:Aa.STATIC_DRAW,DYNAMIC_DRAW:Aa.DYNAMIC_DRAW,validate:function(e){return e===Ua.STREAM_DRAW||e===Ua.STATIC_DRAW||e===Ua.DYNAMIC_DRAW}};function Va(){return!0}function ka(e,t){function i(){throw new Ea(t)}for(var n in t=Sa(t,"This object was destroyed, i.e., destroy() was called."),e)"function"==typeof e[n]&&(e[n]=i);e.isDestroyed=Va}function Wa(e){if(e=Sa(e,Sa.EMPTY_OBJECT),Oa.defined("options.context",e.context),!wa(e.typedArray)&&!wa(e.sizeInBytes))throw new Ea("Either options.sizeInBytes or options.typedArray is required.");if(wa(e.typedArray)&&wa(e.sizeInBytes))throw new Ea("Cannot pass in both options.sizeInBytes and options.typedArray.");if(wa(e.typedArray)&&(Oa.typeOf.object("options.typedArray",e.typedArray),Oa.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!Ua.validate(e.usage))throw new Ea("usage is invalid.");var t=e.context._gl,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=wa(n);a&&(r=n.byteLength),Oa.typeOf.number.greaterThan("sizeInBytes",r,0);var s=t.createBuffer();t.bindBuffer(i,s),t.bufferData(i,a?n:r,o),t.bindBuffer(i,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this._buffer=s,this.context=e.context,e.context.memorySize+=r}Object.defineProperties(Wa.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),Wa.prototype._getBuffer=function(){return this._buffer},Wa.prototype.copyFromArrayView=function(e,t){t=Sa(t,0),Oa.defined("arrayView",e),Oa.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);var i=this._gl,n=this._bufferTarget;i.bindBuffer(n,this._buffer),i.bufferSubData(n,t,e),i.bindBuffer(n,null)},Wa.prototype.copyFromBuffer=function(e,t,i,n){if(!this._webgl2)throw new Ea("A WebGL 2 context is required.");if(!wa(e))throw new Ea("readBuffer must be defined.");if(!wa(n)||n<=0)throw new Ea("sizeInBytes must be defined and be greater than zero.");if(!wa(t)||t<0||t+n>e._sizeInBytes)throw new Ea("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!wa(i)||i<0||i+n>this._sizeInBytes)throw new Ea("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(i>=t&&i<t+n||t>i&&t<i+n))throw new Ea("When readBuffer is equal to this, the ranges [readOffset + sizeInBytes) and [writeOffset, writeOffset + sizeInBytes) must not overlap.");if(this._bufferTarget===Aa.ELEMENT_ARRAY_BUFFER&&e._bufferTarget!==Aa.ELEMENT_ARRAY_BUFFER||this._bufferTarget!==Aa.ELEMENT_ARRAY_BUFFER&&e._bufferTarget===Aa.ELEMENT_ARRAY_BUFFER)throw new Ea("Can not copy an index buffer into another buffer type.");var r=Aa.COPY_READ_BUFFER,o=Aa.COPY_WRITE_BUFFER,a=this._gl;a.bindBuffer(o,this._buffer),a.bindBuffer(r,e._buffer),a.copyBufferSubData(r,o,t,i,n),a.bindBuffer(o,null),a.bindBuffer(r,null)},Wa.prototype.getBufferData=function(e,t,i,n){if(t=Sa(t,0),i=Sa(i,0),!this._webgl2)throw new Ea("A WebGL 2 context is required.");if(!wa(e))throw new Ea("arrayView is required.");var r,o,a=e.byteLength;if(wa(n)?(r=n,wa(a)?o=1:(a=e.length,o=e.BYTES_PER_ELEMENT)):wa(a)?(r=a-i,o=1):(r=(a=e.length)-i,o=e.BYTES_PER_ELEMENT),i<0||i>a)throw new Ea("destinationOffset must be greater than zero and less than the arrayView length.");if(i+r>a)throw new Ea("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new Ea("sourceOffset must be greater than zero and less than the buffers size.");if(t+r*o>this._sizeInBytes)throw new Ea("sourceOffset + length must be less than the buffers size.");var s=this._gl,l=Aa.COPY_READ_BUFFER;s.bindBuffer(l,this._buffer),s.getBufferSubData(l,t,e,i,n),s.bindBuffer(l,null)},Wa.prototype.isDestroyed=function(){return!1},Wa.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),this.context.memorySize-=this.sizeInBytes,ka(this)};var Ha,qa=(Ha=!0,function(e,t){var i=Ha?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ha=!1,i}),ja=qa(void 0,(function(){return ja.toString().search("(((.+)+)+)+$").toString().constructor(ja).search("(((.+)+)+)+$")}));function Xa(){}ja(),Xa.ALPHA_DISABLE=0,Xa.ALPHA_ADD=1,Xa.ALPHA_COMBINE=2,Xa.ALPHA_SUBTRACT=3,Xa.ALPHA_MULTIPLY=4,Xa.ALPHA_MAXIMIZED=5,Xa.ALPHA_ONEONE=6,Xa.ALPHA_PREMULTIPLIED=7,Xa.ALPHA_PREMULTIPLIED_PORTERDUFF=8,Xa.ALPHA_INTERPOLATE=9,Xa.ALPHA_SCREENMODE=10,Xa.ALPHA_ONEONE_ONEONE=11,Xa.ALPHA_ALPHATOCOLOR=12,Xa.ALPHA_REVERSEONEMINUS=13,Xa.ALPHA_SRC_DSTONEMINUSSRCALPHA=14,Xa.ALPHA_ONEONE_ONEZERO=15,Xa.ALPHA_EXCLUSION=16,Xa.ALPHA_LAYER_ACCUMULATE=17,Xa.ALPHA_EQUATION_ADD=0,Xa.ALPHA_EQUATION_SUBSTRACT=1,Xa.ALPHA_EQUATION_REVERSE_SUBTRACT=2,Xa.ALPHA_EQUATION_MAX=3,Xa.ALPHA_EQUATION_MIN=4,Xa.ALPHA_EQUATION_DARKEN=5,Xa.DELAYLOADSTATE_NONE=0,Xa.DELAYLOADSTATE_LOADED=1,Xa.DELAYLOADSTATE_LOADING=2,Xa.DELAYLOADSTATE_NOTLOADED=4,Xa.NEVER=512,Xa.ALWAYS=519,Xa.LESS=513,Xa.EQUAL=514,Xa.LEQUAL=515,Xa.GREATER=516,Xa.GEQUAL=518,Xa.NOTEQUAL=517,Xa.KEEP=7680,Xa.ZERO=0,Xa.REPLACE=7681,Xa.INCR=7682,Xa.DECR=7683,Xa.INVERT=5386,Xa.INCR_WRAP=34055,Xa.DECR_WRAP=34056,Xa.FRONT=0,Xa.BACK=1,Xa.TEXTURE_CLAMP_ADDRESSMODE=0,Xa.TEXTURE_WRAP_ADDRESSMODE=1,Xa.TEXTURE_MIRROR_ADDRESSMODE=2,Xa.TEXTURE_CREATIONFLAG_STORAGE=1,Xa.TEXTUREFORMAT_ALPHA=0,Xa.TEXTUREFORMAT_LUMINANCE=1,Xa.TEXTUREFORMAT_LUMINANCE_ALPHA=2,Xa.TEXTUREFORMAT_RGB=4,Xa.TEXTUREFORMAT_RGBA=5,Xa.TEXTUREFORMAT_RED=6,Xa.TEXTUREFORMAT_R=6,Xa.TEXTUREFORMAT_RG=7,Xa.TEXTUREFORMAT_RED_INTEGER=8,Xa.TEXTUREFORMAT_R_INTEGER=8,Xa.TEXTUREFORMAT_RG_INTEGER=9,Xa.TEXTUREFORMAT_RGB_INTEGER=10,Xa.TEXTUREFORMAT_RGBA_INTEGER=11,Xa.TEXTUREFORMAT_BGRA=12,Xa.TEXTUREFORMAT_DEPTH24_STENCIL8=13,Xa.TEXTUREFORMAT_DEPTH32_FLOAT=14,Xa.TEXTUREFORMAT_DEPTH16=15,Xa.TEXTUREFORMAT_DEPTH24=16,Xa.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8=17,Xa.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8=18,Xa.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM=36492,Xa.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM=36493,Xa.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT=36495,Xa.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT=36494,Xa.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5=33779,Xa.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919,Xa.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3=33778,Xa.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918,Xa.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1=33777,Xa.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1=33776,Xa.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917,Xa.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT=35916,Xa.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4=37808,Xa.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840,Xa.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL=36196,Xa.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2=37492,Xa.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2=37493,Xa.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494,Xa.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495,Xa.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC=37496,Xa.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497,Xa.TEXTURETYPE_UNSIGNED_BYTE=0,Xa.TEXTURETYPE_UNSIGNED_INT=0,Xa.TEXTURETYPE_FLOAT=1,Xa.TEXTURETYPE_HALF_FLOAT=2,Xa.TEXTURETYPE_BYTE=3,Xa.TEXTURETYPE_SHORT=4,Xa.TEXTURETYPE_UNSIGNED_SHORT=5,Xa.TEXTURETYPE_INT=6,Xa.TEXTURETYPE_UNSIGNED_INTEGER=7,Xa.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,Xa.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,Xa.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,Xa.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,Xa.TEXTURETYPE_UNSIGNED_INT_24_8=12,Xa.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,Xa.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,Xa.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,Xa.TEXTURETYPE_UNDEFINED=16,Xa.TEXTURE_NEAREST_SAMPLINGMODE=1,Xa.TEXTURE_NEAREST_NEAREST=1,Xa.TEXTURE_BILINEAR_SAMPLINGMODE=2,Xa.TEXTURE_LINEAR_LINEAR=2,Xa.TEXTURE_TRILINEAR_SAMPLINGMODE=3,Xa.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,Xa.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,Xa.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,Xa.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,Xa.TEXTURE_NEAREST_LINEAR=7,Xa.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,Xa.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,Xa.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,Xa.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,Xa.TEXTURE_LINEAR_NEAREST=12,Xa.TEXTURE_EXPLICIT_MODE=0,Xa.TEXTURE_SPHERICAL_MODE=1,Xa.TEXTURE_PLANAR_MODE=2,Xa.TEXTURE_CUBIC_MODE=3,Xa.TEXTURE_PROJECTION_MODE=4,Xa.TEXTURE_SKYBOX_MODE=5,Xa.TEXTURE_INVCUBIC_MODE=6,Xa.TEXTURE_EQUIRECTANGULAR_MODE=7,Xa.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,Xa.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,Xa.TEXTURE_FILTERING_QUALITY_OFFLINE=4096,Xa.TEXTURE_FILTERING_QUALITY_HIGH=64,Xa.TEXTURE_FILTERING_QUALITY_MEDIUM=16,Xa.TEXTURE_FILTERING_QUALITY_LOW=8,Xa.SCALEMODE_FLOOR=1,Xa.SCALEMODE_NEAREST=2,Xa.SCALEMODE_CEILING=3,Xa.MATERIAL_TextureDirtyFlag=1,Xa.MATERIAL_LightDirtyFlag=2,Xa.MATERIAL_FresnelDirtyFlag=4,Xa.MATERIAL_AttributesDirtyFlag=8,Xa.MATERIAL_MiscDirtyFlag=16,Xa.MATERIAL_PrePassDirtyFlag=32,Xa.MATERIAL_AllDirtyFlag=63,Xa.MATERIAL_TriangleFillMode=0,Xa.MATERIAL_WireFrameFillMode=1,Xa.MATERIAL_PointFillMode=2,Xa.MATERIAL_PointListDrawMode=3,Xa.MATERIAL_LineListDrawMode=4,Xa.MATERIAL_LineLoopDrawMode=5,Xa.MATERIAL_LineStripDrawMode=6,Xa.MATERIAL_TriangleStripDrawMode=7,Xa.MATERIAL_TriangleFanDrawMode=8,Xa.MATERIAL_ClockWiseSideOrientation=0,Xa.MATERIAL_CounterClockWiseSideOrientation=1,Xa.ACTION_NothingTrigger=0,Xa.ACTION_OnPickTrigger=1,Xa.ACTION_OnLeftPickTrigger=2,Xa.ACTION_OnRightPickTrigger=3,Xa.ACTION_OnCenterPickTrigger=4,Xa.ACTION_OnPickDownTrigger=5,Xa.ACTION_OnDoublePickTrigger=6,Xa.ACTION_OnPickUpTrigger=7,Xa.ACTION_OnPickOutTrigger=16,Xa.ACTION_OnLongPressTrigger=8,Xa.ACTION_OnPointerOverTrigger=9,Xa.ACTION_OnPointerOutTrigger=10,Xa.ACTION_OnEveryFrameTrigger=11,Xa.ACTION_OnIntersectionEnterTrigger=12,Xa.ACTION_OnIntersectionExitTrigger=13,Xa.ACTION_OnKeyDownTrigger=14,Xa.ACTION_OnKeyUpTrigger=15,Xa.PARTICLES_BILLBOARDMODE_Y=2,Xa.PARTICLES_BILLBOARDMODE_ALL=7,Xa.PARTICLES_BILLBOARDMODE_STRETCHED=8,Xa.MESHES_CULLINGSTRATEGY_STANDARD=0,Xa.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,Xa.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=2,Xa.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=3,Xa.SCENELOADER_NO_LOGGING=0,Xa.SCENELOADER_MINIMAL_LOGGING=1,Xa.SCENELOADER_SUMMARY_LOGGING=2,Xa.SCENELOADER_DETAILED_LOGGING=3,Xa.PREPASS_IRRADIANCE_TEXTURE_TYPE=0,Xa.PREPASS_POSITION_TEXTURE_TYPE=1,Xa.PREPASS_VELOCITY_TEXTURE_TYPE=2,Xa.PREPASS_REFLECTIVITY_TEXTURE_TYPE=3,Xa.PREPASS_COLOR_TEXTURE_TYPE=4,Xa.PREPASS_DEPTH_TEXTURE_TYPE=5,Xa.PREPASS_NORMAL_TEXTURE_TYPE=6,Xa.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE=7,Xa.BUFFER_CREATIONFLAG_READ=1,Xa.BUFFER_CREATIONFLAG_WRITE=2,Xa.BUFFER_CREATIONFLAG_READWRITE=3,Xa.BUFFER_CREATIONFLAG_UNIFORM=4,Xa.BUFFER_CREATIONFLAG_VERTEX=8,Xa.BUFFER_CREATIONFLAG_INDEX=16,Xa.BUFFER_CREATIONFLAG_STORAGE=32,Xa.RENDERPASS_MAIN=0,Xa.INPUT_ALT_KEY=18,Xa.INPUT_CTRL_KEY=17,Xa.INPUT_META_KEY1=91,Xa.INPUT_META_KEY2=92,Xa.INPUT_META_KEY3=93,Xa.INPUT_SHIFT_KEY=16,Xa.SNAPSHOTRENDERING_STANDARD=0,Xa.SNAPSHOTRENDERING_FAST=1,Xa.PERSPECTIVE_CAMERA=0,Xa.ORTHOGRAPHIC_CAMERA=1,Xa.FOVMODE_VERTICAL_FIXED=0,Xa.FOVMODE_HORIZONTAL_FIXED=1,Xa.RIG_MODE_NONE=0,Xa.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,Xa.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,Xa.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,Xa.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,Xa.RIG_MODE_STEREOSCOPIC_INTERLACED=14,Xa.RIG_MODE_VR=20,Xa.RIG_MODE_WEBVR=21,Xa.RIG_MODE_CUSTOM=22,Xa.MAX_SUPPORTED_UV_SETS=6,Xa.GL_ALPHA_EQUATION_ADD=32774,Xa.GL_ALPHA_EQUATION_MIN=32775,Xa.GL_ALPHA_EQUATION_MAX=32776,Xa.GL_ALPHA_EQUATION_SUBTRACT=32778,Xa.GL_ALPHA_EQUATION_REVERSE_SUBTRACT=32779,Xa.GL_ALPHA_FUNCTION_SRC=768,Xa.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR=769,Xa.GL_ALPHA_FUNCTION_SRC_ALPHA=770,Xa.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA=771,Xa.GL_ALPHA_FUNCTION_DST_ALPHA=772,Xa.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA=773,Xa.GL_ALPHA_FUNCTION_DST_COLOR=774,Xa.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR=775,Xa.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED=776,Xa.GL_ALPHA_FUNCTION_CONSTANT_COLOR=32769,Xa.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR=32770,Xa.GL_ALPHA_FUNCTION_CONSTANT_ALPHA=32771,Xa.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA=32772,Xa.SnippetUrl="";var Ya,Za=(Ya=!0,function(e,t){var i=Ya?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ya=!1,i}),Ka=Za(void 0,(function(){return Ka.toString().search("(((.+)+)+)+$").toString().constructor(Ka).search("(((.+)+)+)+$")}));function Qa(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=Qa._Counter++}Ka(),Object.defineProperty(Qa.prototype,"underlyingResource",{get:function(){return null},enumerable:!1,configurable:!0}),Qa._Counter=0;var Ja,es=(Ja=!0,function(e,t){var i=Ja?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Ja=!1,i}),ts=es(void 0,(function(){return ts.toString().search("(((.+)+)+)+$").toString().constructor(ts).search("(((.+)+)+)+$")}));function is(e,t,i,n,r,o,a,s){void 0===n&&(n=0),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),this._isAlreadyOwned=!1,e.getScene?this._engine=e.getScene().getEngine():this._engine=e,this._updatable=i,this._instanced=o,this._divisor=s||1,t instanceof Qa?(this._data=null,this._buffer=t):(this._data=t,this._buffer=null),this.byteStride=a?n:n*Float32Array.BYTES_PER_ELEMENT,!r&&this.create()}function ns(e,t,i,n,r,o,a,s,l,u,c,h,d,f){if(void 0===c&&(c=!1),void 0===h&&(h=!1),void 0===d&&(d=1),void 0===f&&(f=!1),t instanceof is?(this._buffer=t,this._ownsBuffer=f):(this._buffer=new is(e,t,n,o,r,a,h),this._ownsBuffer=!0),this.uniqueId=ns._Counter++,this._kind=i,null==u){var p=this.getData();this.type=ns.FLOAT,p instanceof Int8Array?this.type=ns.BYTE:p instanceof Uint8Array?this.type=ns.UNSIGNED_BYTE:p instanceof Int16Array?this.type=ns.SHORT:p instanceof Uint16Array?this.type=ns.UNSIGNED_SHORT:p instanceof Int32Array?this.type=ns.INT:p instanceof Uint32Array&&(this.type=ns.UNSIGNED_INT)}else this.type=u;var _=ns.GetTypeByteLength(this.type);h?(this._size=l||(o?o/_:ns.DeduceStride(i)),this.byteStride=o||this._buffer.byteStride||this._size*_,this.byteOffset=s||0):(this._size=l||o||ns.DeduceStride(i),this.byteStride=o?o*_:this._buffer.byteStride||this._size*_,this.byteOffset=(s||0)*_),this.normalized=c,this._instanced=void 0!==a&&a,this._instanceDivisor=a?d:0,this._computeHashCode()}ts(),is.prototype.createVertexBuffer=function(e,t,i,n,r,o,a){void 0===o&&(o=!1);var s=o?t:t*Float32Array.BYTES_PER_ELEMENT,l=n?o?n:n*Float32Array.BYTES_PER_ELEMENT:this.byteStride;return new ns(this._engine,this,e,this._updatable,!0,l,void 0===r?this._instanced:r,s,i,void 0,void 0,!0,this._divisor||a)},is.prototype.isUpdatable=function(){return this._updatable},is.prototype.getData=function(){return this._data},is.prototype.getBuffer=function(){return this._buffer},is.prototype.getStrideSize=function(){return this.byteStride/Float32Array.BYTES_PER_ELEMENT},is.prototype.create=function(e){void 0===e&&(e=null),!e&&this._buffer||(e=e||this._data)&&(this._buffer?this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e),this._data=e):this._updatable?(this._buffer=this._engine.createDynamicVertexBuffer(e),this._data=e):this._buffer=this._engine.createVertexBuffer(e))},is.prototype._rebuild=function(){this._buffer=null,this.create(this._data)},is.prototype.update=function(e){this.create(e)},is.prototype.updateDirectly=function(e,t,i,n){void 0===n&&(n=!1),this._buffer&&this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e,n?t:t*Float32Array.BYTES_PER_ELEMENT,i?i*this.byteStride:void 0),this._data=0===t&&void 0===i?e:null)},is.prototype._increaseReferences=function(){this._buffer&&(this._isAlreadyOwned?this._buffer.references++:this._isAlreadyOwned=!0)},is.prototype.dispose=function(){this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null,this._data=null)},Object.defineProperty(ns.prototype,"instanceDivisor",{get:function(){return this._instanceDivisor},set:function(e){this._instanceDivisor=e,this._instanced=0!=e,this._computeHashCode()},enumerable:!1,configurable:!0}),ns.prototype._computeHashCode=function(){this.hashCode=(this.type-5120<<0)+((this.normalized?1:0)<<3)+(this._size<<4)+((this._instanced?1:0)<<6)+(this.byteStride<<12)},ns.prototype._rebuild=function(){this._buffer&&this._buffer._rebuild()},ns.prototype.getKind=function(){return this._kind},ns.prototype.isUpdatable=function(){return this._buffer.isUpdatable()},ns.prototype.getData=function(){return this._buffer.getData()},ns.prototype.getFloatData=function(e,t){var i=this.getData();if(!i)return null;var n=this.getSize()*ns.GetTypeByteLength(this.type),r=e*this.getSize();if(this.type!==ns.FLOAT||this.byteStride!==n){var o=new Float32Array(r);return this.forEach(r,(function(e,t){return o[t]=e})),o}if(!(i instanceof Array||i instanceof Float32Array)||0!==this.byteOffset||i.length!==r){if(i instanceof Array){var a=this.byteOffset/4;return i.slice(a,a+r)}if(i instanceof ArrayBuffer)return new Float32Array(i,this.byteOffset,r);if(a=i.byteOffset+this.byteOffset,t){var s=new Float32Array(r),l=new Float32Array(i.buffer,a,r);return s.set(l),s}var u=a%4;return u&&(a=Math.max(0,a-u)),new Float32Array(i.buffer,a,r)}return t?i.slice():i},ns.prototype.getBuffer=function(){return this._buffer.getBuffer()},ns.prototype.getStrideSize=function(){return this.byteStride/ns.GetTypeByteLength(this.type)},ns.prototype.getOffset=function(){return this.byteOffset/ns.GetTypeByteLength(this.type)},ns.prototype.getSize=function(e){return void 0===e&&(e=!1),e?this._size*ns.GetTypeByteLength(this.type):this._size},ns.prototype.getIsInstanced=function(){return this._instanced},ns.prototype.getInstanceDivisor=function(){return this._instanceDivisor},ns.prototype.create=function(e){this._buffer.create(e)},ns.prototype.update=function(e){this._buffer.update(e)},ns.prototype.updateDirectly=function(e,t,i){void 0===i&&(i=!1),this._buffer.updateDirectly(e,t,void 0,i)},ns.prototype.dispose=function(){this._ownsBuffer&&this._buffer.dispose()},ns.prototype.forEach=function(e,t){ns.ForEach(this._buffer.getData(),this.byteOffset,this.byteStride,this._size,this.type,e,this.normalized,t)},ns.DeduceStride=function(e){switch(e){case ns.UVKind:case ns.UV2Kind:case ns.UV3Kind:case ns.UV4Kind:case ns.UV5Kind:case ns.UV6Kind:return 2;case ns.NormalKind:case ns.PositionKind:return 3;case ns.ColorKind:case ns.MatricesIndicesKind:case ns.MatricesIndicesExtraKind:case ns.MatricesWeightsKind:case ns.MatricesWeightsExtraKind:case ns.TangentKind:return 4;default:throw new Error("Invalid kind '"+e+"'")}},ns.GetTypeByteLength=function(e){switch(e){case ns.BYTE:case ns.UNSIGNED_BYTE:return 1;case ns.SHORT:case ns.UNSIGNED_SHORT:return 2;case ns.INT:case ns.UNSIGNED_INT:case ns.FLOAT:return 4;default:throw new Error("Invalid type '".concat(e,"'"))}},ns.ForEach=function(e,t,i,n,r,o,a,s){if(e instanceof Array)for(var l=t/4,u=i/4,c=0;c<o;c+=n){for(var h=0;h<n;h++)s(e[l+h],c+h);l+=u}else{var d=e instanceof ArrayBuffer?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),f=ns.GetTypeByteLength(r);for(c=0;c<o;c+=n){var p=t;for(h=0;h<n;h++)s(ns._GetFloatValue(d,r,p,a),c+h),p+=f;t+=i}}},ns._GetFloatValue=function(e,t,i,n){switch(t){case ns.BYTE:var r=e.getInt8(i);return n&&(r=Math.max(r/127,-1)),r;case ns.UNSIGNED_BYTE:return r=e.getUint8(i),n&&(r/=255),r;case ns.SHORT:return r=e.getInt16(i,!0),n&&(r=Math.max(r/32767,-1)),r;case ns.UNSIGNED_SHORT:return r=e.getUint16(i,!0),n&&(r/=65535),r;case ns.INT:return e.getInt32(i,!0);case ns.UNSIGNED_INT:return e.getUint32(i,!0);case ns.FLOAT:return e.getFloat32(i,!0);default:throw new Error("Invalid component type ".concat(t))}},ns._Counter=0,ns.BYTE=5120,ns.UNSIGNED_BYTE=5121,ns.SHORT=5122,ns.UNSIGNED_SHORT=5123,ns.INT=5124,ns.UNSIGNED_INT=5125,ns.FLOAT=5126,ns.PositionKind="position",ns.NormalKind="normal",ns.TangentKind="tangent",ns.UVKind="uv",ns.UV2Kind="uv2",ns.UV3Kind="uv3",ns.UV4Kind="uv4",ns.UV5Kind="uv5",ns.UV6Kind="uv6",ns.ColorKind="color",ns.ColorInstanceKind="instanceColor",ns.MatricesIndicesKind="matricesIndices",ns.MatricesWeightsKind="matricesWeights",ns.MatricesIndicesExtraKind="matricesIndicesExtra",ns.MatricesWeightsExtraKind="matricesWeightsExtra";var rs,os=(rs=!0,function(e,t){var i=rs?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return rs=!1,i}),as=os(void 0,(function(){return as.toString().search("(((.+)+)+)+$").toString().constructor(as).search("(((.+)+)+)+$")}));function ss(e,t,i){void 0===i&&(i=Xa.BUFFER_CREATIONFLAG_READWRITE),this._engine=e,this._engine._storageBuffers.push(this),this._create(t,i)}function ls(e){var t=(e=Sa(e,Sa.EMPTY_OBJECT)).context,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=wa(n);a?r=n.byteLength:n=new Uint8Array(r);var s=Xa.BUFFER_CREATIONFLAG_STORAGE;wa(o)&&(o==Ua.STREAM_DRAW||o==Ua.STATIC_DRAW?s|=Xa.BUFFER_CREATIONFLAG_WRITE:o==Ua.DYNAMIC_DRAW&&(s|=Xa.BUFFER_CREATIONFLAG_READWRITE)),wa(i)?i==Aa.ELEMENT_ARRAY_BUFFER?(n instanceof Uint8Array&&(e.indexDatatype==za.UNSIGNED_INT?n=new Uint32Array(n.buffer,n.byteOffset,n.byteLength/4):e.indexDatatype==za.UNSIGNED_SHORT&&(n=new Uint16Array(n.buffer,n.byteOffset,n.byteLength/2))),this._dataBuffer=t.engine.createIndexBuffer(n)):i==Aa.ARRAY_BUFFER?(this._dataBuffer=new is(t.engine,n,!0),this._dataBuffer._data=null):console.log("BufferGPU not supported bufferTarget"):(this._dataBuffer=new ss(t.engine,r,s),a&&this._dataBuffer.update(n,0,r)),this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this.context=e.context,e.context.memorySize+=r}function us(e){if(e=Sa(e,Sa.EMPTY_OBJECT),Oa.defined("options.context",e.context),!wa(e.typedArray)&&!wa(e.sizeInBytes))throw new Ea("Either options.sizeInBytes or options.typedArray is required.");if(wa(e.typedArray)&&wa(e.sizeInBytes))throw new Ea("Cannot pass in both options.sizeInBytes and options.typedArray.");wa(e.typedArray)&&(Oa.typeOf.object("options.typedArray",e.typedArray),Oa.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),e.context.webgpu?this._inner=new ls(e):this._inner=new Wa(e),this.vertexArrayDestroyable=!0}function cs(e,t){this.x=Sa(e,0),this.y=Sa(t,0)}as(),ss.prototype._create=function(e,t){this._bufferSize=e,this._creationFlags=t,this._buffer=this._engine.createStorageBuffer(e,t)},ss.prototype._rebuild=function(){this._create(this._bufferSize,this._creationFlags)},ss.prototype.getBuffer=function(){return this._buffer},ss.prototype.update=function(e,t,i){this._buffer&&this._engine.updateStorageBuffer(this._buffer,e,t,i)},ss.prototype.read=function(e,t,i){return this._engine.readFromStorageBuffer(this._buffer,e,t,i)},ss.prototype.dispose=function(){var e=this._engine._storageBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._engine._releaseBuffer(this._buffer),this._buffer=null},Object.defineProperties(ls.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}},dataBuffer:{get:function(){return this._dataBuffer}}}),ls.prototype._getBuffer=function(){return console.log("BufferGPU.prototype._getBuffer"),this._dataBuffer},ls.prototype.copyFromArrayView=function(e,t){this._dataBuffer.updateDirectly(e,t,null,!0)},ls.prototype.copyFromBuffer=function(e,t,i,n){console.log("BufferGPU.prototype.copyFromBuffer")},ls.prototype.getBufferData=function(e,t,i,n){console.log("BufferGPU.prototype.getBufferData")},ls.prototype.isDestroyed=function(){return!1},ls.prototype.destroy=function(){return this._bufferTarget!==Aa.ELEMENT_ARRAY_BUFFER?this._dataBuffer.dispose():this.context._engine._releaseBuffer(this._dataBuffer),this.context.memorySize-=this.sizeInBytes,ka(this)},us.createVertexBuffer=function(e){return Oa.defined("options.context",e.context),new us({context:e.context,bufferTarget:Aa.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},us.createIndexBuffer=function(e){if(Oa.defined("options.context",e.context),!za.validate(e.indexDatatype))throw new Ea("Invalid indexDatatype.");if(e.indexDatatype===za.UNSIGNED_INT&&!e.context.elementIndexUint)throw new Ea("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");var t=e.context,i=e.indexDatatype,n=za.getSizeInBytes(i),r=new us({context:t,bufferTarget:Aa.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage,indexDatatype:i}),o=r.sizeInBytes/n;return Object.defineProperties(r,{indexDatatype:{get:function(){return i}},bytesPerIndex:{get:function(){return n}},numberOfIndices:{get:function(){return o}}}),r},Object.defineProperties(us.prototype,{sizeInBytes:{get:function(){return this._inner.sizeInBytes}},usage:{get:function(){return this._inner.usage}}}),us.prototype._getBuffer=function(){return this._inner._getBuffer()},us.prototype.copyFromArrayView=function(e,t){this._inner.copyFromArrayView(e,t)},us.prototype.copyFromBuffer=function(e,t,i,n){this._inner.copyFromBuffer(e,t,i,n)},us.prototype.getBufferData=function(e,t,i,n){this._inner.getBufferData(e,t,i,n)},us.prototype.isDestroyed=function(){return!1},us.prototype.destroy=function(){return this._inner.destroy(),ka(this)},cs.fromElements=function(e,t,i){return wa(i)?(i.x=e,i.y=t,i):new cs(e,t)},cs.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t):new cs(e.x,e.y)},cs.fromCartesian3=cs.clone,cs.fromCartesian4=cs.clone,cs.packedLength=2,cs.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i]=e.y,t},cs.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new cs),i.x=e[t++],i.y=e[t],i},cs.packArray=function(e,t){Oa.defined("array",e);var i=e.length,n=2*i;if(wa(t)){if(!Array.isArray(t)&&t.length!==n)throw new Ea("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)cs.pack(e[r],t,2*r);return t},cs.unpackArray=function(e,t){if(Oa.defined("array",e),Oa.typeOf.number.greaterThanOrEquals("array.length",e.length,2),e.length%2!=0)throw new Ea("array length must be a multiple of 2.");var i=e.length;wa(t)?t.length=i/2:t=new Array(i/2);for(var n=0;n<i;n+=2){var r=n/2;t[r]=cs.unpack(e,n,t[r])}return t},cs.fromArray=cs.unpack,cs.maximumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.max(e.x,e.y)},cs.minimumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.min(e.x,e.y)},cs.minimumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i},cs.maximumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i},cs.magnitudeSquared=function(e){return Oa.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y},cs.magnitude=function(e){return Math.sqrt(cs.magnitudeSquared(e))};var hs=new cs;cs.distance=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),cs.subtract(e,t,hs),cs.magnitude(hs)},cs.distanceSquared=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),cs.subtract(e,t,hs),cs.magnitudeSquared(hs)},cs.normalize=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=cs.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,isNaN(t.x)||isNaN(t.y))throw new Ea("normalized result is not a number");return t},cs.dot=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),e.x*t.x+e.y*t.y},cs.multiplyComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i},cs.divideComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i},cs.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i},cs.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i},cs.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i},cs.divideByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i},cs.negate=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t},cs.abs=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var ds=new cs;cs.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),cs.multiplyByScalar(t,i,ds),n=cs.multiplyByScalar(e,1-i,n),cs.add(ds,n,n)};var fs=new cs,ps=new cs;cs.angleBetween=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),cs.normalize(e,fs),cs.normalize(t,ps),Ba.acosClamped(cs.dot(fs,ps))};var _s=new cs;function ms(e,t,i){this.x=Sa(e,0),this.y=Sa(t,0),this.z=Sa(i,0)}cs.mostOrthogonalAxis=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=cs.normalize(e,_s);return cs.abs(i,i),t=i.x<=i.y?cs.clone(cs.UNIT_X,t):cs.clone(cs.UNIT_Y,t)},cs.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y},cs.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]},cs.equalsEpsilon=function(e,t,i,n){return e===t||wa(e)&&wa(t)&&Ba.equalsEpsilon(e.x,t.x,i,n)&&Ba.equalsEpsilon(e.y,t.y,i,n)},cs.ZERO=Object.freeze(new cs(0,0)),cs.UNIT_X=Object.freeze(new cs(1,0)),cs.UNIT_Y=Object.freeze(new cs(0,1)),cs.prototype.clone=function(e){return cs.clone(this,e)},cs.prototype.equals=function(e){return cs.equals(this,e)},cs.prototype.equalsEpsilon=function(e,t,i){return cs.equalsEpsilon(this,e,t,i)},cs.prototype.toString=function(){return"("+this.x+", "+this.y+")"},cs.prototype.toArray=function(e,t){cs.pack(this,e,t)},ms.fromSpherical=function(e,t){Oa.typeOf.object("spherical",e),wa(t)||(t=new ms);var i=e.clock,n=e.cone,r=Sa(e.magnitude,1),o=r*Math.sin(n);return t.x=o*Math.cos(i),t.y=o*Math.sin(i),t.z=r*Math.cos(n),t},ms.fromElements=function(e,t,i,n){return wa(n)?(n.x=e,n.y=t,n.z=i,n):new ms(e,t,i)},ms.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new ms(e.x,e.y,e.z)},ms.fromCartesian4=ms.clone,ms.packedLength=3,ms.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i++]=e.y,t[i]=e.z,t},ms.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new ms),i.x=e[t++],i.y=e[t++],i.z=e[t],i},ms.packArray=function(e,t){Oa.defined("array",e);var i=e.length,n=3*i;if(wa(t)){if(!Array.isArray(t)&&t.length!==n)throw new Ea("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)ms.pack(e[r],t,3*r);return t},ms.unpackArray=function(e,t){if(Oa.defined("array",e),Oa.typeOf.number.greaterThanOrEquals("array.length",e.length,3),e.length%3!=0)throw new Ea("array length must be a multiple of 3.");var i=e.length;wa(t)?t.length=i/3:t=new Array(i/3);for(var n=0;n<i;n+=3){var r=n/3;t[r]=ms.unpack(e,n,t[r])}return t},ms.fromArray=ms.unpack,ms.maximumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z)},ms.minimumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z)},ms.minimumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i},ms.maximumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i},ms.magnitudeSquared=function(e){return Oa.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z},ms.magnitude=function(e){return Math.sqrt(ms.magnitudeSquared(e))};var gs=new ms;ms.distance=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),ms.subtract(e,t,gs),ms.magnitude(gs)},ms.distanceSquared=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),ms.subtract(e,t,gs),ms.magnitudeSquared(gs)},ms.normalize=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=ms.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new Ea("normalized result is not a number");return t},ms.dot=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z},ms.multiplyComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i},ms.divideComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i},ms.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i},ms.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i},ms.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i},ms.divideByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i},ms.negate=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t},ms.abs=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var xs=new ms;ms.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),ms.multiplyByScalar(t,i,xs),n=ms.multiplyByScalar(e,1-i,n),ms.add(xs,n,n)};var ys=new ms,vs=new ms;ms.angleBetween=function(e,t){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),ms.normalize(e,ys),ms.normalize(t,vs);var i=ms.dot(ys,vs),n=ms.magnitude(ms.cross(ys,vs,ys));return Math.atan2(n,i)};var $s=new ms;ms.mostOrthogonalAxis=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=ms.normalize(e,$s);return ms.abs(i,i),t=i.x<=i.y?i.x<=i.z?ms.clone(ms.UNIT_X,t):ms.clone(ms.UNIT_Z,t):i.y<=i.z?ms.clone(ms.UNIT_Y,t):ms.clone(ms.UNIT_Z,t)},ms.projectVector=function(e,t,i){Oa.defined("a",e),Oa.defined("b",t),Oa.defined("result",i);var n=ms.dot(e,t)/ms.dot(t,t);return ms.multiplyByScalar(t,n,i)},ms.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},ms.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]},ms.equalsEpsilon=function(e,t,i,n){return e===t||wa(e)&&wa(t)&&Ba.equalsEpsilon(e.x,t.x,i,n)&&Ba.equalsEpsilon(e.y,t.y,i,n)&&Ba.equalsEpsilon(e.z,t.z,i,n)},ms.cross=function(e,t,i){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i);var n=e.x,r=e.y,o=e.z,a=t.x,s=t.y,l=t.z,u=r*l-o*s,c=o*a-n*l,h=n*s-r*a;return i.x=u,i.y=c,i.z=h,i},ms.midpoint=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=.5*(e.x+t.x),i.y=.5*(e.y+t.y),i.z=.5*(e.z+t.z),i},ms.fromDegrees=function(e,t,i,n,r){return Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),e=Ba.toRadians(e),t=Ba.toRadians(t),ms.fromRadians(e,t,i,n,r)};var bs=new ms,Ts=new ms,Cs=new ms(40680631590769,40680631590769,40408299984661.445);ms.fromRadians=function(e,t,i,n,r){Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),i=Sa(i,0);var o=wa(n)?n.radiiSquared:Cs,a=Math.cos(t);bs.x=a*Math.cos(e),bs.y=a*Math.sin(e),bs.z=Math.sin(t),bs=ms.normalize(bs,bs),ms.multiplyComponents(o,bs,Ts);var s=Math.sqrt(ms.dot(bs,Ts));return Ts=ms.divideByScalar(Ts,s,Ts),bs=ms.multiplyByScalar(bs,i,bs),wa(r)||(r=new ms),ms.add(Ts,bs,r)},ms.fromDegreesArray=function(e,t,i){if(Oa.defined("coordinates",e),e.length<2||e.length%2!=0)throw new Ea("the number of coordinates must be a multiple of 2 and at least 2");var n=e.length;wa(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var o=e[r],a=e[r+1],s=r/2;i[s]=ms.fromDegrees(o,a,0,t,i[s])}return i},ms.fromRadiansArray=function(e,t,i){if(Oa.defined("coordinates",e),e.length<2||e.length%2!=0)throw new Ea("the number of coordinates must be a multiple of 2 and at least 2");var n=e.length;wa(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var o=e[r],a=e[r+1],s=r/2;i[s]=ms.fromRadians(o,a,0,t,i[s])}return i},ms.fromDegreesArrayHeights=function(e,t,i){if(Oa.defined("coordinates",e),e.length<3||e.length%3!=0)throw new Ea("the number of coordinates must be a multiple of 3 and at least 3");var n=e.length;wa(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var o=e[r],a=e[r+1],s=e[r+2],l=r/3;i[l]=ms.fromDegrees(o,a,s,t,i[l])}return i},ms.fromRadiansArrayHeights=function(e,t,i){if(Oa.defined("coordinates",e),e.length<3||e.length%3!=0)throw new Ea("the number of coordinates must be a multiple of 3 and at least 3");var n=e.length;wa(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var o=e[r],a=e[r+1],s=e[r+2],l=r/3;i[l]=ms.fromRadians(o,a,s,t,i[l])}return i},ms.ZERO=Object.freeze(new ms(0,0,0)),ms.UNIT_X=Object.freeze(new ms(1,0,0)),ms.UNIT_Y=Object.freeze(new ms(0,1,0)),ms.UNIT_Z=Object.freeze(new ms(0,0,1)),ms.UNIT_XYZ=Object.freeze(new ms(1,1,1)),ms.prototype.clone=function(e){return ms.clone(this,e)},ms.prototype.equals=function(e){return ms.equals(this,e)},ms.prototype.equalsEpsilon=function(e,t,i){return ms.equalsEpsilon(this,e,t,i)},ms.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},ms.prototype.toArray=function(e,t){ms.pack(this,e,t)},ms.globalOffset=new ms(0,0,0);var Ss=new ms,ws=new ms;function Es(e,t,i,n,r){if(!wa(e))throw new Ea("cartesian is required.");if(!wa(t))throw new Ea("oneOverRadii is required.");if(!wa(i))throw new Ea("oneOverRadiiSquared is required.");if(!wa(n))throw new Ea("centerToleranceSquared is required.");var o=e.x,a=e.y,s=e.z,l=t.x,u=t.y,c=t.z,h=o*o*l*l,d=a*a*u*u,f=s*s*c*c,p=h+d+f,_=Math.sqrt(1/p),m=ms.multiplyByScalar(e,_,Ss);if(p<n)return isFinite(_)?ms.clone(m,r):void 0;var g=i.x,x=i.y,y=i.z,v=ws;v.x=m.x*g*2,v.y=m.y*x*2,v.z=m.z*y*2;var $,b,T,C,S,w,E,P=(1-_)*ms.magnitude(e)/(.5*ms.magnitude(v)),A=0;do{A=($=h*(S=(b=1/(1+(P-=A)*g))*b)+d*(w=(T=1/(1+P*x))*T)+f*(E=(C=1/(1+P*y))*C)-1)/(-2*(h*(S*b)*g+d*(w*T)*x+f*(E*C)*y))}while(Math.abs($)>Ba.EPSILON12);return wa(r)?(r.x=o*b,r.y=a*T,r.z=s*C,r):new ms(o*b,a*T,s*C)}function Ps(e,t,i){this.longitude=Sa(e,0),this.latitude=Sa(t,0),this.height=Sa(i,0)}Ps.fromRadians=function(e,t,i,n){return Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),i=Sa(i,0),wa(n)?(n.longitude=e,n.latitude=t,n.height=i,n):new Ps(e,t,i)},Ps.fromDegrees=function(e,t,i,n){return Oa.typeOf.number("longitude",e),Oa.typeOf.number("latitude",t),e=Ba.toRadians(e),t=Ba.toRadians(t),Ps.fromRadians(e,t,i,n)};var As=new ms,Ls=new ms,Ms=new ms,Rs=new ms(1/6378137,1/6378137,1/6356752.314245179),Os=new ms(1/40680631590769,1/40680631590769,1/40408299984661.445),Ds=Ba.EPSILON1;function Is(e,t,i,n){t=Sa(t,0),i=Sa(i,0),n=Sa(n,0),Oa.typeOf.number.greaterThanOrEquals("x",t,0),Oa.typeOf.number.greaterThanOrEquals("y",i,0),Oa.typeOf.number.greaterThanOrEquals("z",n,0),e._radii=new ms(t,i,n),e._radiiSquared=new ms(t*t,i*i,n*n),e._radiiToTheFourth=new ms(t*t*t*t,i*i*i*i,n*n*n*n),e._oneOverRadii=new ms(0===t?0:1/t,0===i?0:1/i,0===n?0:1/n),e._oneOverRadiiSquared=new ms(0===t?0:1/(t*t),0===i?0:1/(i*i),0===n?0:1/(n*n)),e._minimumRadius=Math.min(t,i,n),e._maximumRadius=Math.max(t,i,n),e._centerToleranceSquared=Ba.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function Bs(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,Is(this,e,t,i)}Ps.fromCartesian=function(e,t,i){var n=wa(t)?t.oneOverRadii:Rs,r=wa(t)?t.oneOverRadiiSquared:Os,o=Es(e,n,r,wa(t)?t._centerToleranceSquared:Ds,Ls);if(wa(o)){var a=ms.multiplyComponents(o,r,As);a=ms.normalize(a,a);var s=ms.subtract(e,o,Ms),l=Math.atan2(a.y,a.x),u=Math.asin(a.z),c=Ba.sign(ms.dot(s,e))*ms.magnitude(s);return wa(i)?(i.longitude=l,i.latitude=u,i.height=c,i):new Ps(l,u,c)}},Ps.toCartesian=function(e,t,i){return Oa.defined("cartographic",e),ms.fromRadians(e.longitude,e.latitude,e.height,t,i)},Ps.sphericalDistance=function(e,t,i,n){if(Oa.defined("longitudeA",e),Oa.defined("longitudeB",i),Oa.defined("latitudeA",t),Oa.defined("latitudeB",n),e===i&&t===n)return 0;var r=Ba.toRadians(t),o=Ba.toRadians(n),a=Ba.toRadians(e),s=Ba.toRadians(i),l=a*a+r*r,u=s*s+o*o,c=(l+u-((a-s)*(a-s)+(r-o)*(r-o)))/(2*Math.sqrt(l)*Math.sqrt(u));return c=Ba.clamp(c,-1,1),6378137*Math.acos(c)},Ps.clone=function(e,t){if(wa(e))return wa(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new Ps(e.longitude,e.latitude,e.height)},Ps.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},Ps.equalsEpsilon=function(e,t,i){return Oa.typeOf.number("epsilon",i),e===t||wa(e)&&wa(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},Ps.ZERO=Object.freeze(new Ps(0,0,0)),Ps.prototype.clone=function(e){return Ps.clone(this,e)},Ps.prototype.equals=function(e){return Ps.equals(this,e)},Ps.prototype.equalsEpsilon=function(e,t){return Ps.equalsEpsilon(this,e,t)},Ps.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},Object.defineProperties(Bs.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),Bs.clone=function(e,t){if(wa(e)){var i=e._radii;return wa(t)?(ms.clone(i,t._radii),ms.clone(e._radiiSquared,t._radiiSquared),ms.clone(e._radiiToTheFourth,t._radiiToTheFourth),ms.clone(e._oneOverRadii,t._oneOverRadii),ms.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new Bs(i.x,i.y,i.z)}},Bs.fromCartesian3=function(e,t){return wa(t)||(t=new Bs),wa(e)&&Is(t,e.x,e.y,e.z),t},Bs.WGS84=Object.freeze(new Bs(6378137,6378137,6356752.314245179)),Bs.XIAN80=Object.freeze(new Bs(6378140,6378140,6356755.29)),Bs.CGCS2000=Object.freeze(new Bs(6378137,6378137,6356752.31)),Bs.UNIT_SPHERE=Object.freeze(new Bs(1,1,1)),Bs.MOON=Object.freeze(new Bs(Ba.LUNAR_RADIUS,Ba.LUNAR_RADIUS,Ba.LUNAR_RADIUS)),Bs.prototype.clone=function(e){return Bs.clone(this,e)},Bs.packedLength=ms.packedLength,Bs.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),ms.pack(e._radii,t,i),t},Bs.unpack=function(e,t,i){Oa.defined("array",e),t=Sa(t,0);var n=ms.unpack(e,t);return Bs.fromCartesian3(n,i)},Bs.prototype.geocentricSurfaceNormal=ms.normalize,Bs.prototype.geodeticSurfaceNormalCartographic=function(e,t){Oa.typeOf.object("cartographic",e);var i=e.longitude,n=e.latitude,r=Math.cos(n),o=r*Math.cos(i),a=r*Math.sin(i),s=Math.sin(n);return wa(t)||(t=new ms),t.x=o,t.y=a,t.z=s,ms.normalize(t,t)},Bs.prototype.geodeticSurfaceNormal=function(e,t){return wa(t)||(t=new ms),t=ms.multiplyComponents(e,this._oneOverRadiiSquared,t),ms.normalize(t,t)};var Fs=new ms,Ns=new ms;Bs.prototype.cartographicToCartesian=function(e,t){var i=Fs,n=Ns;this.geodeticSurfaceNormalCartographic(e,i),ms.multiplyComponents(this._radiiSquared,i,n);var r=Math.sqrt(ms.dot(i,n));return ms.divideByScalar(n,r,n),ms.multiplyByScalar(i,e.height,i),wa(t)||(t=new ms),ms.add(n,i,t)},Bs.prototype.cartographicArrayToCartesianArray=function(e,t){Oa.defined("cartographics",e);var i=e.length;wa(t)?t.length=i:t=new Array(i);for(var n=0;n<i;n++)t[n]=this.cartographicToCartesian(e[n],t[n]);return t};var Gs=new ms,zs=new ms,Us=new ms;function Vs(e){this._ellipsoid=Sa(e,Bs.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Bs.prototype.cartesianToCartographic=function(e,t){var i=this.scaleToGeodeticSurface(e,zs);if(wa(i)){var n=this.geodeticSurfaceNormal(i,Gs),r=ms.subtract(e,i,Us),o=Math.atan2(n.y,n.x),a=Math.asin(n.z),s=Ba.sign(ms.dot(r,e))*ms.magnitude(r);return wa(t)?(t.longitude=o,t.latitude=a,t.height=s,t):new Ps(o,a,s)}},Bs.prototype.cartesianArrayToCartographicArray=function(e,t){Oa.defined("cartesians",e);var i=e.length;wa(t)?t.length=i:t=new Array(i);for(var n=0;n<i;++n)t[n]=this.cartesianToCartographic(e[n],t[n]);return t},Bs.prototype.scaleToGeodeticSurface=function(e,t){return Es(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},Bs.prototype.scaleToGeocentricSurface=function(e,t){Oa.typeOf.object("cartesian",e),wa(t)||(t=new ms);var i=e.x,n=e.y,r=e.z,o=this._oneOverRadiiSquared,a=1/Math.sqrt(i*i*o.x+n*n*o.y+r*r*o.z);return ms.multiplyByScalar(e,a,t)},Bs.prototype.transformPositionToScaledSpace=function(e,t){return wa(t)||(t=new ms),ms.multiplyComponents(e,this._oneOverRadii,t)},Bs.prototype.transformPositionFromScaledSpace=function(e,t){return wa(t)||(t=new ms),ms.multiplyComponents(e,this._radii,t)},Bs.prototype.equals=function(e){return this===e||wa(e)&&ms.equals(this._radii,e._radii)},Bs.prototype.toString=function(){return this._radii.toString()},Bs.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,i){if(Oa.typeOf.object("position",e),!Ba.equalsEpsilon(this._radii.x,this._radii.y,Ba.EPSILON15))throw new Ea("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");Oa.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),t=Sa(t,0);var n=this._squaredXOverSquaredZ;if(wa(i)||(i=new ms),i.x=0,i.y=0,i.z=e.z*(1-n),!(Math.abs(i.z)>=this._radii.z-t))return i},Object.defineProperties(Vs.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),Vs.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=e.latitude*i,o=e.height;return wa(t)?(t.x=n,t.y=r,t.z=o,t):new ms(n,r,o)},Vs.prototype.unproject=function(e,t){if(!wa(e))throw new Ea("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=e.y*i,o=e.z;return wa(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new Ps(n,r,o)};var ks={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Ws=Object.freeze(ks);function Hs(e,t,i,n){this.west=Sa(e,0),this.south=Sa(t,0),this.east=Sa(i,0),this.north=Sa(n,0)}Object.defineProperties(Hs.prototype,{width:{get:function(){return Hs.computeWidth(this)}},height:{get:function(){return Hs.computeHeight(this)}}}),Hs.packedLength=4,Hs.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.west,t[i++]=e.south,t[i++]=e.east,t[i]=e.north,t},Hs.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new Hs),i.west=e[t++],i.south=e[t++],i.east=e[t++],i.north=e[t],i},Hs.computeWidth=function(e){Oa.typeOf.object("rectangle",e);var t=e.east,i=e.west;return t<i&&(t+=Ba.TWO_PI),t-i},Hs.computeHeight=function(e){return Oa.typeOf.object("rectangle",e),e.north-e.south},Hs.fromDegrees=function(e,t,i,n,r){return e=Ba.toRadians(Sa(e,0)),t=Ba.toRadians(Sa(t,0)),i=Ba.toRadians(Sa(i,0)),n=Ba.toRadians(Sa(n,0)),wa(r)?(r.west=e,r.south=t,r.east=i,r.north=n,r):new Hs(e,t,i,n)},Hs.fromRadians=function(e,t,i,n,r){return wa(r)?(r.west=Sa(e,0),r.south=Sa(t,0),r.east=Sa(i,0),r.north=Sa(n,0),r):new Hs(e,t,i,n)},Hs.fromCartographicArray=function(e,t){Oa.defined("cartographics",e);for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0,u=e.length;l<u;l++){var c=e[l];i=Math.min(i,c.longitude),n=Math.max(n,c.longitude),a=Math.min(a,c.latitude),s=Math.max(s,c.latitude);var h=c.longitude>=0?c.longitude:c.longitude+Ba.TWO_PI;r=Math.min(r,h),o=Math.max(o,h)}return n-i>o-r&&(i=r,(n=o)>Ba.PI&&(n-=Ba.TWO_PI),i>Ba.PI&&(i-=Ba.TWO_PI)),wa(t)?(t.west=i,t.south=a,t.east=n,t.north=s,t):new Hs(i,a,n,s)},Hs.fromCartesianArray=function(e,t,i){Oa.defined("cartesians",e),t=Sa(t,Bs.WGS84);for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0,c=e.length;u<c;u++){var h=t.cartesianToCartographic(e[u]);n=Math.min(n,h.longitude),r=Math.max(r,h.longitude),s=Math.min(s,h.latitude),l=Math.max(l,h.latitude);var d=h.longitude>=0?h.longitude:h.longitude+Ba.TWO_PI;o=Math.min(o,d),a=Math.max(a,d)}return r-n>a-o&&(n=o,(r=a)>Ba.PI&&(r-=Ba.TWO_PI),n>Ba.PI&&(n-=Ba.TWO_PI)),wa(i)?(i.west=n,i.south=s,i.east=r,i.north=l,i):new Hs(n,s,r,l)},Hs.clone=function(e,t){if(wa(e))return wa(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new Hs(e.west,e.south,e.east,e.north)},Hs.equalsEpsilon=function(e,t,i){return Oa.typeOf.number("absoluteEpsilon",i),e===t||wa(e)&&wa(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},Hs.prototype.clone=function(e){return Hs.clone(this,e)},Hs.prototype.equals=function(e){return Hs.equals(this,e)},Hs.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},Hs.prototype.equalsEpsilon=function(e,t){return Oa.typeOf.number("epsilon",t),Hs.equalsEpsilon(this,e,t)},Hs.validate=function(e){Oa.typeOf.object("rectangle",e);var t=e.north;Oa.typeOf.number.greaterThanOrEquals("north",t,-Ba.PI_OVER_TWO),Oa.typeOf.number.lessThanOrEquals("north",t,Ba.PI_OVER_TWO);var i=e.south;Oa.typeOf.number.greaterThanOrEquals("south",i,-Ba.PI_OVER_TWO),Oa.typeOf.number.lessThanOrEquals("south",i,Ba.PI_OVER_TWO);var n=e.west;Oa.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),Oa.typeOf.number.lessThanOrEquals("west",n,Math.PI);var r=e.east;Oa.typeOf.number.greaterThanOrEquals("east",r,-Math.PI),Oa.typeOf.number.lessThanOrEquals("east",r,Math.PI)},Hs.southwest=function(e,t){return Oa.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new Ps(e.west,e.south)},Hs.northwest=function(e,t){return Oa.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new Ps(e.west,e.north)},Hs.northeast=function(e,t){return Oa.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new Ps(e.east,e.north)},Hs.southeast=function(e,t){return Oa.typeOf.object("rectangle",e),wa(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new Ps(e.east,e.south)},Hs.center=function(e,t){Oa.typeOf.object("rectangle",e);var i=e.east,n=e.west;i<n&&(i+=Ba.TWO_PI);var r=Ba.negativePiToPi(.5*(n+i)),o=.5*(e.south+e.north);return wa(t)?(t.longitude=r,t.latitude=o,t.height=0,t):new Ps(r,o)},Hs.intersection=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("otherRectangle",t);var n=e.east,r=e.west,o=t.east,a=t.west;n<r&&o>0?n+=Ba.TWO_PI:o<a&&n>0&&(o+=Ba.TWO_PI),n<r&&a<0?a+=Ba.TWO_PI:o<a&&r<0&&(r+=Ba.TWO_PI);var s=Ba.negativePiToPi(Math.max(r,a)),l=Ba.negativePiToPi(Math.min(n,o));if(!((e.west<e.east||t.west<t.east)&&l<=s)){var u=Math.max(e.south,t.south),c=Math.min(e.north,t.north);if(!(u>=c))return wa(i)?(i.west=s,i.south=u,i.east=l,i.north=c,i):new Hs(s,u,l,c)}},Hs.simpleIntersection=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("otherRectangle",t);var n=Math.max(e.west,t.west),r=Math.max(e.south,t.south),o=Math.min(e.east,t.east),a=Math.min(e.north,t.north);if(!(r>=a||n>=o))return wa(i)?(i.west=n,i.south=r,i.east=o,i.north=a,i):new Hs(n,r,o,a)},Hs.union=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("otherRectangle",t),wa(i)||(i=new Hs);var n=e.east,r=e.west,o=t.east,a=t.west;n<r&&o>0?n+=Ba.TWO_PI:o<a&&n>0&&(o+=Ba.TWO_PI),n<r&&a<0?a+=Ba.TWO_PI:o<a&&r<0&&(r+=Ba.TWO_PI);var s=Ba.convertLongitudeRange(Math.min(r,a)),l=Ba.convertLongitudeRange(Math.max(n,o));return i.west=s,i.south=Math.min(e.south,t.south),i.east=l,i.north=Math.max(e.north,t.north),i},Hs.expand=function(e,t,i){return Oa.typeOf.object("rectangle",e),Oa.typeOf.object("cartographic",t),wa(i)||(i=new Hs),i.west=Math.min(e.west,t.longitude),i.south=Math.min(e.south,t.latitude),i.east=Math.max(e.east,t.longitude),i.north=Math.max(e.north,t.latitude),i},Hs.contains=function(e,t){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("cartographic",t);var i=t.longitude,n=t.latitude,r=e.west,o=e.east;return o<r&&(o+=Ba.TWO_PI,i<0&&(i+=Ba.TWO_PI)),(i>r||Ba.equalsEpsilon(i,r,Ba.EPSILON14))&&(i<o||Ba.equalsEpsilon(i,o,Ba.EPSILON14))&&n>=e.south&&n<=e.north};var qs=new Ps;Hs.subsample=function(e,t,i,n){Oa.typeOf.object("rectangle",e),t=Sa(t,Bs.WGS84),i=Sa(i,0),wa(n)||(n=[]);var r=0,o=e.north,a=e.south,s=e.east,l=e.west,u=qs;u.height=i,u.longitude=l,u.latitude=o,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=a,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=o<0?o:a>0?a:0;for(var c=1;c<8;++c)u.longitude=-Math.PI+c*Ba.PI_OVER_TWO,Hs.contains(e,u)&&(n[r]=t.cartographicToCartesian(u,n[r]),r++);return 0===u.latitude&&(u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++),n.length=r,n};var js=new Ps;function Xs(e,t,i,n){this.x=Sa(e,0),this.y=Sa(t,0),this.width=Sa(i,0),this.height=Sa(n,0)}Hs.prototype.contains=function(e){return Hs.contains(this,Hs.southwest(e,js))&&Hs.contains(this,Hs.northwest(e,js))&&Hs.contains(this,Hs.southeast(e,js))&&Hs.contains(this,Hs.northeast(e,js))},Hs.MAX_VALUE=Object.freeze(new Hs(-Math.PI,-Ba.PI_OVER_TWO,Math.PI,Ba.PI_OVER_TWO)),Xs.packedLength=4,Xs.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.width,t[i]=e.height,t},Xs.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new Xs),i.x=e[t++],i.y=e[t++],i.width=e[t++],i.height=e[t],i},Xs.fromPoints=function(e,t){if(wa(t)||(t=new Xs),!wa(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,n=e[0].x,r=e[0].y,o=e[0].x,a=e[0].y,s=1;s<i;s++){var l=e[s],u=l.x,c=l.y;n=Math.min(u,n),o=Math.max(u,o),r=Math.min(c,r),a=Math.max(c,a)}return t.x=n,t.y=r,t.width=o-n,t.height=a-r,t};var Ys=new Vs,Zs=new Ps,Ks=new Ps;Xs.fromRectangle=function(e,t,i){if(wa(i)||(i=new Xs),!wa(e))return i.x=0,i.y=0,i.width=0,i.height=0,i;var n=(t=Sa(t,Ys)).project(Hs.southwest(e,Zs)),r=t.project(Hs.northeast(e,Ks));return cs.subtract(r,n,r),i.x=n.x,i.y=n.y,i.width=r.x,i.height=r.y,i},Xs.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new Xs(e.x,e.y,e.width,e.height)},Xs.union=function(e,t,i){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),wa(i)||(i=new Xs);var n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),o=Math.max(e.x+e.width,t.x+t.width),a=Math.max(e.y+e.height,t.y+t.height);return i.x=n,i.y=r,i.width=o-n,i.height=a-r,i},Xs.expand=function(e,t,i){Oa.typeOf.object("rectangle",e),Oa.typeOf.object("point",t),i=Xs.clone(e,i);var n=t.x-i.x,r=t.y-i.y;return n>i.width?i.width=n:n<0&&(i.width-=n,i.x=t.x),r>i.height?i.height=r:r<0&&(i.height-=r,i.y=t.y),i},Xs.intersect=function(e,t){Oa.typeOf.object("left",e),Oa.typeOf.object("right",t);var i=e.x,n=e.y,r=t.x,o=t.y;return i>r+t.width||i+e.width<r||n+e.height<o||n>o+t.height?Ws.OUTSIDE:Ws.INTERSECTING},Xs.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},Xs.prototype.clone=function(e){return Xs.clone(this,e)},Xs.prototype.intersect=function(e){return Xs.intersect(this,e)},Xs.prototype.equals=function(e){return Xs.equals(this,e)};var Qs,Js,el,tl,il,nl,rl,ol,al,sl,ll,ul,cl,hl,dl,fl,pl,_l,ml,gl,xl,yl,vl,$l,bl={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},Tl={};function Cl(e,t,i,n){return Sl(e).then(t,i,n)}function Sl(e){var t,i;return e instanceof El?t=e:Ml(e)?(i=Ll(),e.then((function(e){i.resolve(e)}),(function(e){i.reject(e)}),(function(e){i.progress(e)})),t=i.promise):t=Pl(e),t}function wl(e){return Cl(e,Al)}function El(e){this.then=e}function Pl(e){var t=new El((function(t){try{return Sl(t?t(e):e)}catch(e){return Al(e)}}));return t}function Al(e){var t=new El((function(t,i){try{return i?Sl(i(e)):Al(e)}catch(e){return Al(e)}}));return t}function Ll(){var e,t,i,n,r,o;return e=new El(a),t=[],i=[],n=function(e,n,r){var o,a;return o=Ll(),a="function"==typeof r?function(e){try{o.progress(r(e))}catch(e){o.progress(e)}}:function(e){o.progress(e)},t.push((function(t){t.then(e,n).then(o.resolve,o.reject,a)})),i.push(a),o.promise},r=function(e){return zl(i,e),e},o=function(e){return e=Sl(e),n=e.then,o=Sl,r=Vl,zl(t,e),i=t=tl,e},{then:a,resolve:s,reject:l,progress:u,promise:e,resolver:{resolve:s,reject:l,progress:u}};function a(e,t,i){return n(e,t,i)}function s(e){return o(e)}function l(e){return o(Al(e))}function u(e){return r(e)}}function Ml(e){return e&&"function"==typeof e.then}function Rl(e,t,i,n,r){return Ul(2,arguments),Cl(e,(function(e){var o,a,s,l,u,c,h,d,f,p;if(f=e.length>>>0,o=Math.max(0,Math.min(t,f)),s=[],a=f-o+1,l=[],u=Ll(),o)for(d=u.progress,h=function(e){l.push(e),--a||(c=h=Vl,u.reject(l))},c=function(e){s.push(e),--o||(c=h=Vl,u.resolve(s))},p=0;p<f;++p)p in e&&Cl(e[p],m,_,d);else u.resolve(s);return u.then(i,n,r);function _(e){h(e)}function m(e){c(e)}}))}function Ol(e,t,i,n){return Ul(1,arguments),Cl(e,(function(e){var r,o,a,s,l,u,c,h,d;for(c=e.length>>>0,h=e.length>>>0,r=[],o=[],u=(a=Ll()).progress,l=function(e){o.push(e),--h||(s=l=Vl,a.resolve(r))},s=function(e,t){r[t]=e,--h||(s=l=Vl,a.resolve(r))},d=0;d<c;++d)switch(d){case 0:Cl(e[d],_,f,u);break;case 1:Cl(e[d],m,f,u);break;case 2:Cl(e[d],g,f,u);break;case 3:Cl(e[d],x,f,u);break;case 4:Cl(e[d],y,f,u);break;default:Cl(e[d],p,f,u)}return a.then(t,i,n);function f(e){l(e)}function p(e){s(e,0)}function _(e){s(e,0)}function m(e){s(e,1)}function g(e){s(e,2)}function x(e){s(e,3)}function y(e){s(e,4)}}))}function Dl(e,t,i,n){return Rl(e,1,(function(e){return t?t(e[0]):e[0]}),i,n)}function Il(e,t,i,n){return Ul(1,arguments),Fl(e,kl).then(t,i,n)}function Bl(){return Fl(arguments,kl)}function Fl(e,t){return Cl(e,(function(e){var i,n,r,o,a,s;if(r=n=e.length>>>0,i=[],s=Ll(),r)for(o=function(e,n){Cl(e,t).then((function(e){i[n]=e,--r||s.resolve(i)}),s.reject)},a=0;a<n;a++)a in e?o(e[a],a):--r;else s.resolve(i);return s.promise}))}function Nl(e,t){var i=el.call(arguments,1);return Cl(e,(function(e){var n;return n=e.length,i[0]=function(e,i,r){return Cl(e,(function(e){return Cl(i,(function(i){return t(e,i,r,n)}))}))},Js.apply(e,i)}))}function Gl(e,t,i){var n=arguments.length>2;return Cl(e,(function(e){return e=n?i:e,t.resolve(e),e}),(function(e){return t.reject(e),Al(e)}),t.progress)}function zl(e,t){for(var i,n=0;i=e[n++];)i(t)}function Ul(e,t){for(var i,n=t.length;n>e;)if(null!=(i=t[--n])&&"function"!=typeof i)throw new Error("arg "+n+" must be a function")}function Vl(){}function kl(e){return e}function Wl(e){for(var t=e.split("."),i=0,n=t.length;i<n;++i)t[i]=parseInt(t[i],10);return t}function Hl(){if(!wa(nl)&&(nl=!1,!Jl())){var e=/ Chrome\/([\.0-9]+)/.exec(il.userAgent);null!==e&&(nl=!0,rl=Wl(e[1]))}return nl}function ql(){return Hl()&&rl}function jl(){if(!wa(ol)&&(ol=!1,!Hl()&&!Jl()&&/ Safari\/[\.0-9]+/.test(il.userAgent))){var e=/ Version\/([\.0-9]+)/.exec(il.userAgent);null!==e&&(ol=!0,al=Wl(e[1]))}return ol}function Xl(){return jl()&&al}function Yl(){if(!wa(sl)){sl=!1;var e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(il.userAgent);null!==e&&(sl=!0,(ll=Wl(e[1])).isNightly=!!e[2])}return sl}function Zl(){return Yl()&&ll}function Kl(){var e;return wa(ul)||(ul=!1,"Microsoft Internet Explorer"===il.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(il.userAgent))&&(ul=!0,cl=Wl(e[1])):"Netscape"===il.appName&&null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(il.userAgent))&&(ul=!0,cl=Wl(e[1]))),ul}function Ql(){return Kl()&&cl}function Jl(){if(!wa(hl)){hl=!1;var e=/ Edge\/([\.0-9]+)/.exec(il.userAgent);null!==e&&(hl=!0,dl=Wl(e[1]))}return hl}function eu(){return Jl()&&dl}function tu(){if(!wa(fl)){fl=!1;var e=/Firefox\/([\.0-9]+)/.exec(il.userAgent);null!==e&&(fl=!0,pl=Wl(e[1]))}return fl}function iu(){return wa(_l)||(_l=/Windows/i.test(il.appVersion)),_l}function nu(){return tu()&&pl}function ru(){return wa(ml)||(ml="object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)),ml}function ou(){return wa(gl)||(gl=!tu()&&typeof PointerEvent<"u"&&(!wa(il.pointerEnabled)||il.pointerEnabled)),gl}function au(){if(!wa(yl)){var e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");var t=e.style.imageRendering;(yl=wa(t)&&""!==t)&&(xl=t)}return yl}function su(){return au()?xl:void 0}function lu(){if(wa($l))return $l.promise;$l=Cl.defer(),Jl()&&(vl=!1,$l.resolve(vl));var e=new Image;return e.onload=function(){vl=e.width>0&&e.height>0,$l.resolve(vl)},e.onerror=function(){vl=!1,$l.resolve(vl)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",$l.promise}function uu(){return wa($l)||lu(),vl}Object.defineProperties(Tl,{element:{get:function(){if(Tl.supportsFullscreen())return document[bl.fullscreenElement]}},changeEventName:{get:function(){if(Tl.supportsFullscreen())return bl.fullscreenchange}},errorEventName:{get:function(){if(Tl.supportsFullscreen())return bl.fullscreenerror}},enabled:{get:function(){if(Tl.supportsFullscreen())return document[bl.fullscreenEnabled]}},fullscreen:{get:function(){if(Tl.supportsFullscreen())return null!==Tl.element}}}),Tl.supportsFullscreen=function(){if(wa(Qs))return Qs;Qs=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return bl.requestFullscreen="requestFullscreen",bl.exitFullscreen="exitFullscreen",bl.fullscreenEnabled="fullscreenEnabled",bl.fullscreenElement="fullscreenElement",bl.fullscreenchange="fullscreenchange",bl.fullscreenerror="fullscreenerror",Qs=!0;for(var t,i=["webkit","moz","o","ms","khtml"],n=0,r=i.length;n<r;++n){var o=i[n];("function"==typeof e[t=o+"RequestFullscreen"]||"function"==typeof e[t=o+"RequestFullScreen"])&&(bl.requestFullscreen=t,Qs=!0),t=o+"ExitFullscreen","function"==typeof document[t]?bl.exitFullscreen=t:(t=o+"CancelFullScreen","function"==typeof document[t]&&(bl.exitFullscreen=t)),t=o+"FullscreenEnabled",void 0!==document[t]?bl.fullscreenEnabled=t:(t=o+"FullScreenEnabled",void 0!==document[t]&&(bl.fullscreenEnabled=t)),t=o+"FullscreenElement",void 0!==document[t]?bl.fullscreenElement=t:(t=o+"FullScreenElement",void 0!==document[t]&&(bl.fullscreenElement=t)),t=o+"fullscreenchange",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenChange"),bl.fullscreenchange=t),t=o+"fullscreenerror",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenError"),bl.fullscreenerror=t)}return Qs},Tl.requestFullscreen=function(e,t){!Tl.supportsFullscreen()||e[bl.requestFullscreen]({vrDisplay:t})},Tl.exitFullscreen=function(){!Tl.supportsFullscreen()||document[bl.exitFullscreen]()},Tl._names=bl,Cl.defer=Ll,Cl.resolve=Sl,Cl.reject=wl,Cl.join=Bl,Cl.all=Il,Cl.map=Fl,Cl.reduce=Nl,Cl.any=Dl,Cl.some=Rl,Cl.allSettled=Ol,Cl.chain=Gl,Cl.isPromise=Ml,El.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(tl,e)},yield:function(e){return this.then((function(){return e}))},spread:function(e){return this.then((function(t){return Il(t,(function(t){return e.apply(tl,t)}))}))}},el=[].slice,Js=[].reduce||function(e){var t,i,n,r,o;if(o=0,r=(t=Object(this)).length>>>0,(i=arguments).length<=1)for(;;){if(o in t){n=t[o++];break}if(++o>=r)throw new TypeError}else n=i[1];for(;o<r;++o)o in t&&(n=e(n,t[o],o,t));return n},il=typeof navigator<"u"?navigator:{};var cu=[];typeof ArrayBuffer<"u"&&(cu.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&cu.push(Uint8ClampedArray),typeof CanvasPixelArray<"u"&&cu.push(CanvasPixelArray));var hu,du,fu,pu={isChrome:Hl,chromeVersion:ql,isSafari:jl,safariVersion:Xl,isWebkit:Yl,webkitVersion:Zl,isInternetExplorer:Kl,internetExplorerVersion:Ql,isEdge:Jl,edgeVersion:eu,isFirefox:tu,firefoxVersion:nu,isWindows:iu,isNodeJs:ru,hardwareConcurrency:Sa(il.hardwareConcurrency,3),supportsPointerEvents:ou,supportsImageRenderingPixelated:au,supportsWebP:lu,supportsWebPSync:uu,imageRenderingValue:su,typedArrayTypes:cu,isPCBroswer:_u};function _u(){var e=window.navigator.userAgent.toLowerCase(),t="ipad"==e.match(/ipad/i),i="iphone os"==e.match(/iphone os/i),n="midp"==e.match(/midp/i),r="ucweb"==e.match(/ucweb/i),o="android"==e.match(/android/i),a="windows ce"==e.match(/windows ce/i),s="windows mobile"==e.match(/windows mobile/i);return!(t||i||n||r||o||a||s)}function mu(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function gu(e,t,i,n){this.red=Sa(e,1),this.green=Sa(t,1),this.blue=Sa(i,1),this.alpha=Sa(n,1)}pu.supportsFullscreen=function(){return Tl.supportsFullscreen()},pu.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},pu.supportsWebWorkers=function(){return typeof Worker<"u"},pu.supportsWebAssembly=function(){return typeof WebAssembly<"u"&&!pu.isEdge()},pu.supportsOffscreenCanvas=function(){return typeof OffscreenCanvas<"u"&&!pu.isEdge()},gu.fromCartesian4=function(e,t){return Oa.typeOf.object("cartesian",e),wa(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new gu(e.x,e.y,e.z,e.w)},gu.fromBytes=function(e,t,i,n,r){return e=gu.byteToFloat(Sa(e,255)),t=gu.byteToFloat(Sa(t,255)),i=gu.byteToFloat(Sa(i,255)),n=gu.byteToFloat(Sa(n,255)),wa(r)?(r.red=e,r.green=t,r.blue=i,r.alpha=n,r):new gu(e,t,i,n)},gu.fromAlpha=function(e,t,i){return Oa.typeOf.object("color",e),Oa.typeOf.number("alpha",t),wa(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=t,i):new gu(e.red,e.green,e.blue,t)},pu.supportsTypedArrays()&&(hu=new ArrayBuffer(4),du=new Uint32Array(hu),fu=new Uint8Array(hu)),gu.fromRgba=function(e,t){return du[0]=e,gu.fromBytes(fu[0],fu[1],fu[2],fu[3],t)},gu.byteToRgba=function(e,t,i,n){return fu[0]=e,fu[1]=t,fu[2]=i,fu[3]=n,du[0]},gu.fromHsl=function(e,t,i,n,r){e=Sa(e,0)%1,t=Sa(t,0),i=Sa(i,0),n=Sa(n,1);var o=i,a=i,s=i;if(0!==t){var l,u=2*i-(l=i<.5?i*(1+t):i+t-i*t);o=mu(u,l,e+1/3),a=mu(u,l,e),s=mu(u,l,e-1/3)}return wa(r)?(r.red=o,r.green=a,r.blue=s,r.alpha=n,r):new gu(o,a,s,n)},gu.fromRandom=function(e,t){var i=(e=Sa(e,Sa.EMPTY_OBJECT)).red;if(!wa(i)){var n=Sa(e.minimumRed,0),r=Sa(e.maximumRed,1);Oa.typeOf.number.lessThanOrEquals("minimumRed",n,r),i=n+Ba.nextRandomNumber()*(r-n)}var o=e.green;if(!wa(o)){var a=Sa(e.minimumGreen,0),s=Sa(e.maximumGreen,1);Oa.typeOf.number.lessThanOrEquals("minimumGreen",a,s),o=a+Ba.nextRandomNumber()*(s-a)}var l=e.blue;if(!wa(l)){var u=Sa(e.minimumBlue,0),c=Sa(e.maximumBlue,1);Oa.typeOf.number.lessThanOrEquals("minimumBlue",u,c),l=u+Ba.nextRandomNumber()*(c-u)}var h=e.alpha;if(!wa(h)){var d=Sa(e.minimumAlpha,0),f=Sa(e.maximumAlpha,1);Oa.typeOf.number.lessThanOrEquals("minumumAlpha",d,f),h=d+Ba.nextRandomNumber()*(f-d)}return wa(t)?(t.red=i,t.green=o,t.blue=l,t.alpha=h,t):new gu(i,o,l,h)};var xu=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,yu=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,vu=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,$u=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;gu.fromCssColorString=function(e,t){Oa.typeOf.string("color",e),wa(t)||(t=new gu);var i=gu[e.toUpperCase()];if(wa(i))return gu.clone(i,t),t;var n=xu.exec(e);return null!==n?(t.red=parseInt(n[1],16)/15,t.green=parseInt(n[2],16)/15,t.blue=parseInt(n[3],16)/15,t.alpha=1,t):null!==(n=yu.exec(e))?(t.red=parseInt(n[1],16)/255,t.green=parseInt(n[2],16)/255,t.blue=parseInt(n[3],16)/255,t.alpha=1,t):null!==(n=vu.exec(e))?(t.red=parseFloat(n[1])/("%"===n[1].substr(-1)?100:255),t.green=parseFloat(n[2])/("%"===n[2].substr(-1)?100:255),t.blue=parseFloat(n[3])/("%"===n[3].substr(-1)?100:255),t.alpha=parseFloat(Sa(n[4],"1.0")),t):null!==(n=$u.exec(e))?gu.fromHsl(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(Sa(n[4],"1.0")),t):t=void 0},gu.packedLength=4,gu.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.red,t[i++]=e.green,t[i++]=e.blue,t[i]=e.alpha,t},gu.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new gu),i.red=e[t++],i.green=e[t++],i.blue=e[t++],i.alpha=e[t],i},gu.byteToFloat=function(e){return e/255},gu.floatToByte=function(e){return 1===e?255:256*e|0},gu.clone=function(e,t){if(wa(e))return wa(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new gu(e.red,e.green,e.blue,e.alpha)},gu.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},gu.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},gu.prototype.clone=function(e){return gu.clone(this,e)},gu.prototype.equals=function(e){return gu.equals(this,e)},gu.prototype.equalsEpsilon=function(e,t){return this===e||wa(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},gu.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},gu.prototype.toCssColorString=function(){var e=gu.floatToByte(this.red),t=gu.floatToByte(this.green),i=gu.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},gu.prototype.toBytes=function(e){var t=gu.floatToByte(this.red),i=gu.floatToByte(this.green),n=gu.floatToByte(this.blue),r=gu.floatToByte(this.alpha);return wa(e)?(e[0]=t,e[1]=i,e[2]=n,e[3]=r,e):[t,i,n,r]},gu.prototype.toRgba=function(){return fu[0]=gu.floatToByte(this.red),fu[1]=gu.floatToByte(this.green),fu[2]=gu.floatToByte(this.blue),fu[3]=gu.floatToByte(this.alpha),du[0]},gu.prototype.brighten=function(e,t){return Oa.typeOf.number("magnitude",e),Oa.typeOf.number.greaterThanOrEquals("magnitude",e,0),Oa.typeOf.object("result",t),e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},gu.prototype.darken=function(e,t){return Oa.typeOf.number("magnitude",e),Oa.typeOf.number.greaterThanOrEquals("magnitude",e,0),Oa.typeOf.object("result",t),e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},gu.prototype.withAlpha=function(e,t){return gu.fromAlpha(this,e,t)},gu.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},gu.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},gu.multiply=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},gu.divide=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},gu.mod=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},gu.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),n.red=Ba.lerp(e.red,t.red,i),n.green=Ba.lerp(e.green,t.green,i),n.blue=Ba.lerp(e.blue,t.blue,i),n.alpha=Ba.lerp(e.alpha,t.alpha,i),n},gu.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("color",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},gu.divideByScalar=function(e,t,i){return Oa.typeOf.object("color",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},gu.ALICEBLUE=Object.freeze(gu.fromCssColorString("#F0F8FF")),gu.ANTIQUEWHITE=Object.freeze(gu.fromCssColorString("#FAEBD7")),gu.AQUA=Object.freeze(gu.fromCssColorString("#00FFFF")),gu.AQUAMARINE=Object.freeze(gu.fromCssColorString("#7FFFD4")),gu.AZURE=Object.freeze(gu.fromCssColorString("#F0FFFF")),gu.BEIGE=Object.freeze(gu.fromCssColorString("#F5F5DC")),gu.BISQUE=Object.freeze(gu.fromCssColorString("#FFE4C4")),gu.BLACK=Object.freeze(gu.fromCssColorString("#000000")),gu.BLANCHEDALMOND=Object.freeze(gu.fromCssColorString("#FFEBCD")),gu.BLUE=Object.freeze(gu.fromCssColorString("#0000FF")),gu.BLUEVIOLET=Object.freeze(gu.fromCssColorString("#8A2BE2")),gu.BROWN=Object.freeze(gu.fromCssColorString("#A52A2A")),gu.BURLYWOOD=Object.freeze(gu.fromCssColorString("#DEB887")),gu.CADETBLUE=Object.freeze(gu.fromCssColorString("#5F9EA0")),gu.CHARTREUSE=Object.freeze(gu.fromCssColorString("#7FFF00")),gu.CHOCOLATE=Object.freeze(gu.fromCssColorString("#D2691E")),gu.CORAL=Object.freeze(gu.fromCssColorString("#FF7F50")),gu.CORNFLOWERBLUE=Object.freeze(gu.fromCssColorString("#6495ED")),gu.CORNSILK=Object.freeze(gu.fromCssColorString("#FFF8DC")),gu.CRIMSON=Object.freeze(gu.fromCssColorString("#DC143C")),gu.CYAN=Object.freeze(gu.fromCssColorString("#00FFFF")),gu.DARKBLUE=Object.freeze(gu.fromCssColorString("#00008B")),gu.DARKCYAN=Object.freeze(gu.fromCssColorString("#008B8B")),gu.DARKGOLDENROD=Object.freeze(gu.fromCssColorString("#B8860B")),gu.DARKGRAY=Object.freeze(gu.fromCssColorString("#A9A9A9")),gu.DARKGREEN=Object.freeze(gu.fromCssColorString("#006400")),gu.DARKGREY=gu.DARKGRAY,gu.DARKKHAKI=Object.freeze(gu.fromCssColorString("#BDB76B")),gu.DARKMAGENTA=Object.freeze(gu.fromCssColorString("#8B008B")),gu.DARKOLIVEGREEN=Object.freeze(gu.fromCssColorString("#556B2F")),gu.DARKORANGE=Object.freeze(gu.fromCssColorString("#FF8C00")),gu.DARKORCHID=Object.freeze(gu.fromCssColorString("#9932CC")),gu.DARKRED=Object.freeze(gu.fromCssColorString("#8B0000")),gu.DARKSALMON=Object.freeze(gu.fromCssColorString("#E9967A")),gu.DARKSEAGREEN=Object.freeze(gu.fromCssColorString("#8FBC8F")),gu.DARKSLATEBLUE=Object.freeze(gu.fromCssColorString("#483D8B")),gu.DARKSLATEGRAY=Object.freeze(gu.fromCssColorString("#2F4F4F")),gu.DARKSLATEGREY=gu.DARKSLATEGRAY,gu.DARKTURQUOISE=Object.freeze(gu.fromCssColorString("#00CED1")),gu.DARKVIOLET=Object.freeze(gu.fromCssColorString("#9400D3")),gu.DEEPPINK=Object.freeze(gu.fromCssColorString("#FF1493")),gu.DEEPSKYBLUE=Object.freeze(gu.fromCssColorString("#00BFFF")),gu.DIMGRAY=Object.freeze(gu.fromCssColorString("#696969")),gu.DIMGREY=gu.DIMGRAY,gu.DODGERBLUE=Object.freeze(gu.fromCssColorString("#1E90FF")),gu.FIREBRICK=Object.freeze(gu.fromCssColorString("#B22222")),gu.FLORALWHITE=Object.freeze(gu.fromCssColorString("#FFFAF0")),gu.FORESTGREEN=Object.freeze(gu.fromCssColorString("#228B22")),gu.FUCHSIA=Object.freeze(gu.fromCssColorString("#FF00FF")),gu.GAINSBORO=Object.freeze(gu.fromCssColorString("#DCDCDC")),gu.GHOSTWHITE=Object.freeze(gu.fromCssColorString("#F8F8FF")),gu.GOLD=Object.freeze(gu.fromCssColorString("#FFD700")),gu.GOLDENROD=Object.freeze(gu.fromCssColorString("#DAA520")),gu.GRAY=Object.freeze(gu.fromCssColorString("#808080")),gu.GREEN=Object.freeze(gu.fromCssColorString("#008000")),gu.GREENYELLOW=Object.freeze(gu.fromCssColorString("#ADFF2F")),gu.GREY=gu.GRAY,gu.HONEYDEW=Object.freeze(gu.fromCssColorString("#F0FFF0")),gu.HOTPINK=Object.freeze(gu.fromCssColorString("#FF69B4")),gu.INDIANRED=Object.freeze(gu.fromCssColorString("#CD5C5C")),gu.INDIGO=Object.freeze(gu.fromCssColorString("#4B0082")),gu.IVORY=Object.freeze(gu.fromCssColorString("#FFFFF0")),gu.KHAKI=Object.freeze(gu.fromCssColorString("#F0E68C")),gu.LAVENDER=Object.freeze(gu.fromCssColorString("#E6E6FA")),gu.LAVENDAR_BLUSH=Object.freeze(gu.fromCssColorString("#FFF0F5")),gu.LAWNGREEN=Object.freeze(gu.fromCssColorString("#7CFC00")),gu.LEMONCHIFFON=Object.freeze(gu.fromCssColorString("#FFFACD")),gu.LIGHTBLUE=Object.freeze(gu.fromCssColorString("#ADD8E6")),gu.LIGHTCORAL=Object.freeze(gu.fromCssColorString("#F08080")),gu.LIGHTCYAN=Object.freeze(gu.fromCssColorString("#E0FFFF")),gu.LIGHTGOLDENRODYELLOW=Object.freeze(gu.fromCssColorString("#FAFAD2")),gu.LIGHTGRAY=Object.freeze(gu.fromCssColorString("#D3D3D3")),gu.LIGHTGREEN=Object.freeze(gu.fromCssColorString("#90EE90")),gu.LIGHTGREY=gu.LIGHTGRAY,gu.LIGHTPINK=Object.freeze(gu.fromCssColorString("#FFB6C1")),gu.LIGHTSEAGREEN=Object.freeze(gu.fromCssColorString("#20B2AA")),gu.LIGHTSKYBLUE=Object.freeze(gu.fromCssColorString("#87CEFA")),gu.LIGHTSLATEGRAY=Object.freeze(gu.fromCssColorString("#778899")),gu.LIGHTSLATEGREY=gu.LIGHTSLATEGRAY,gu.LIGHTSTEELBLUE=Object.freeze(gu.fromCssColorString("#B0C4DE")),gu.LIGHTYELLOW=Object.freeze(gu.fromCssColorString("#FFFFE0")),gu.LIME=Object.freeze(gu.fromCssColorString("#00FF00")),gu.LIMEGREEN=Object.freeze(gu.fromCssColorString("#32CD32")),gu.LINEN=Object.freeze(gu.fromCssColorString("#FAF0E6")),gu.MAGENTA=Object.freeze(gu.fromCssColorString("#FF00FF")),gu.MAROON=Object.freeze(gu.fromCssColorString("#800000")),gu.MEDIUMAQUAMARINE=Object.freeze(gu.fromCssColorString("#66CDAA")),gu.MEDIUMBLUE=Object.freeze(gu.fromCssColorString("#0000CD")),gu.MEDIUMORCHID=Object.freeze(gu.fromCssColorString("#BA55D3")),gu.MEDIUMPURPLE=Object.freeze(gu.fromCssColorString("#9370DB")),gu.MEDIUMSEAGREEN=Object.freeze(gu.fromCssColorString("#3CB371")),gu.MEDIUMSLATEBLUE=Object.freeze(gu.fromCssColorString("#7B68EE")),gu.MEDIUMSPRINGGREEN=Object.freeze(gu.fromCssColorString("#00FA9A")),gu.MEDIUMTURQUOISE=Object.freeze(gu.fromCssColorString("#48D1CC")),gu.MEDIUMVIOLETRED=Object.freeze(gu.fromCssColorString("#C71585")),gu.MIDNIGHTBLUE=Object.freeze(gu.fromCssColorString("#191970")),gu.MINTCREAM=Object.freeze(gu.fromCssColorString("#F5FFFA")),gu.MISTYROSE=Object.freeze(gu.fromCssColorString("#FFE4E1")),gu.MOCCASIN=Object.freeze(gu.fromCssColorString("#FFE4B5")),gu.NAVAJOWHITE=Object.freeze(gu.fromCssColorString("#FFDEAD")),gu.NAVY=Object.freeze(gu.fromCssColorString("#000080")),gu.OLDLACE=Object.freeze(gu.fromCssColorString("#FDF5E6")),gu.OLIVE=Object.freeze(gu.fromCssColorString("#808000")),gu.OLIVEDRAB=Object.freeze(gu.fromCssColorString("#6B8E23")),gu.ORANGE=Object.freeze(gu.fromCssColorString("#FFA500")),gu.ORANGERED=Object.freeze(gu.fromCssColorString("#FF4500")),gu.ORCHID=Object.freeze(gu.fromCssColorString("#DA70D6")),gu.PALEGOLDENROD=Object.freeze(gu.fromCssColorString("#EEE8AA")),gu.PALEGREEN=Object.freeze(gu.fromCssColorString("#98FB98")),gu.PALETURQUOISE=Object.freeze(gu.fromCssColorString("#AFEEEE")),gu.PALEVIOLETRED=Object.freeze(gu.fromCssColorString("#DB7093")),gu.PAPAYAWHIP=Object.freeze(gu.fromCssColorString("#FFEFD5")),gu.PEACHPUFF=Object.freeze(gu.fromCssColorString("#FFDAB9")),gu.PERU=Object.freeze(gu.fromCssColorString("#CD853F")),gu.PINK=Object.freeze(gu.fromCssColorString("#FFC0CB")),gu.PLUM=Object.freeze(gu.fromCssColorString("#DDA0DD")),gu.POWDERBLUE=Object.freeze(gu.fromCssColorString("#B0E0E6")),gu.PURPLE=Object.freeze(gu.fromCssColorString("#800080")),gu.RED=Object.freeze(gu.fromCssColorString("#FF0000")),gu.ROSYBROWN=Object.freeze(gu.fromCssColorString("#BC8F8F")),gu.ROYALBLUE=Object.freeze(gu.fromCssColorString("#4169E1")),gu.SADDLEBROWN=Object.freeze(gu.fromCssColorString("#8B4513")),gu.SALMON=Object.freeze(gu.fromCssColorString("#FA8072")),gu.SANDYBROWN=Object.freeze(gu.fromCssColorString("#F4A460")),gu.SEAGREEN=Object.freeze(gu.fromCssColorString("#2E8B57")),gu.SEASHELL=Object.freeze(gu.fromCssColorString("#FFF5EE")),gu.SIENNA=Object.freeze(gu.fromCssColorString("#A0522D")),gu.SILVER=Object.freeze(gu.fromCssColorString("#C0C0C0")),gu.SKYBLUE=Object.freeze(gu.fromCssColorString("#87CEEB")),gu.SLATEBLUE=Object.freeze(gu.fromCssColorString("#6A5ACD")),gu.SLATEGRAY=Object.freeze(gu.fromCssColorString("#708090")),gu.SLATEGREY=gu.SLATEGRAY,gu.SNOW=Object.freeze(gu.fromCssColorString("#FFFAFA")),gu.SPRINGGREEN=Object.freeze(gu.fromCssColorString("#00FF7F")),gu.STEELBLUE=Object.freeze(gu.fromCssColorString("#4682B4")),gu.TAN=Object.freeze(gu.fromCssColorString("#D2B48C")),gu.TEAL=Object.freeze(gu.fromCssColorString("#008080")),gu.THISTLE=Object.freeze(gu.fromCssColorString("#D8BFD8")),gu.TOMATO=Object.freeze(gu.fromCssColorString("#FF6347")),gu.TURQUOISE=Object.freeze(gu.fromCssColorString("#40E0D0")),gu.VIOLET=Object.freeze(gu.fromCssColorString("#EE82EE")),gu.WHEAT=Object.freeze(gu.fromCssColorString("#F5DEB3")),gu.WHITE=Object.freeze(gu.fromCssColorString("#FFFFFF")),gu.WHITESMOKE=Object.freeze(gu.fromCssColorString("#F5F5F5")),gu.YELLOW=Object.freeze(gu.fromCssColorString("#FFFF00")),gu.YELLOWGREEN=Object.freeze(gu.fromCssColorString("#9ACD32")),gu.TRANSPARENT=Object.freeze(new gu(0,0,0,0));var bu={CLOCKWISE:Aa.CW,COUNTER_CLOCKWISE:Aa.CCW,NONE:Aa.NONE,validate:function(e){return e===bu.CLOCKWISE||e===bu.COUNTER_CLOCKWISE}},Tu=Object.freeze(bu),Cu={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:10,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1,_uniformBufferOffsetAlignment:256,_maxUniformBufferBinding:36,_maxArrayTextureLayers:256};function Su(e){if("object"!=typeof e||null===e)return e;for(var t,i=Object.keys(e),n=0;n<i.length;n++)t=i[n],e.hasOwnProperty(t)&&"_applyFunctions"!==t&&(e[t]=Su(e[t]));return Object.freeze(e)}Object.defineProperties(Cu,{maximumCombinedTextureImageUnits:{get:function(){return Cu._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return Cu._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return Cu._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return Cu._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return Cu._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return Cu._maximumTextureSize}},maximumVaryingVectors:{get:function(){return Cu._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return Cu._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return Cu._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return Cu._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return Cu._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return Cu._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return Cu._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return Cu._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return Cu._maximumViewportWidth}},maximumViewportHeight:{get:function(){return Cu._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return Cu._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return Cu._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return Cu._maximumColorAttachments}},highpFloatSupported:{get:function(){return Cu._highpFloatSupported}},highpIntSupported:{get:function(){return Cu._highpIntSupported}},uniformBufferOffsetAlignment:{get:function(){return Cu._uniformBufferOffsetAlignment}},maxUniformBufferBinding:{get:function(){return Cu._maxUniformBufferBinding}},maxArrayTextureLayers:{get:function(){return Cu._maxArrayTextureLayers}}});var wu,Eu=(wu=!0,function(e,t){var i=wu?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wu=!1,i}),Pu=Eu(void 0,(function(){return Pu.toString().search("(((.+)+)+)+$").toString().constructor(Pu).search("(((.+)+)+)+$")}));function Au(){this.reset()}Pu(),Au.prototype.reset=function(){this.enabled=!1,this.mask=255,this.funcRef=1,this.funcMask=255,this.frontFunc=Au.ALWAYS,this.backFunc=Au.ALWAYS,this.frontOpStencilFail=Au.KEEP,this.backOpStencilFail=Au.KEEP,this.frontOpDepthFail=Au.KEEP,this.backOpDepthFail=Au.KEEP,this.frontOpStencilDepthPass=Au.REPLACE,this.backOpStencilDepthPass=Au.REPLACE},Object.defineProperty(Au.prototype,"frontStencilFunc",{get:function(){return this.frontFunc},set:function(e){this.frontFunc=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"backStencilFunc",{get:function(){return this.backFunc},set:function(e){this.backFunc=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"stencilFuncRef",{get:function(){return this.funcRef},set:function(e){this.funcRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"stencilFuncMask",{get:function(){return this.funcMask},set:function(e){this.funcMask=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"frontStencilOpStencilFail",{get:function(){return this.frontOpStencilFail},set:function(e){this.frontOpStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"backStencilOpStencilFail",{get:function(){return this.backOpStencilFail},set:function(e){this.backOpStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"frontStencilOpDepthFail",{get:function(){return this.frontOpDepthFail},set:function(e){this.frontOpDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"backStencilOpDepthFail",{get:function(){return this.backOpDepthFail},set:function(e){this.backOpDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"frontStencilOpStencilDepthPass",{get:function(){return this.frontOpStencilDepthPass},set:function(e){this.frontOpStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"backStencilOpStencilDepthPass",{get:function(){return this.backOpStencilDepthPass},set:function(e){this.backOpStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"stencilMask",{get:function(){return this.mask},set:function(e){this.mask=e},enumerable:!1,configurable:!0}),Object.defineProperty(Au.prototype,"stencilTest",{get:function(){return this.enabled},set:function(e){this.enabled=e},enumerable:!1,configurable:!0}),Au.ALWAYS=Xa.ALWAYS,Au.KEEP=Xa.KEEP,Au.REPLACE=Xa.REPLACE,Au.FRONT=Xa.FRONT,Au.BACK=Xa.BACK;var Lu={UNSIGNED_BYTE:Aa.UNSIGNED_BYTE,UNSIGNED_SHORT:Aa.UNSIGNED_SHORT,UNSIGNED_INT:Aa.UNSIGNED_INT,FLOAT:Aa.FLOAT,HALF_FLOAT:Aa.HALF_FLOAT_OES,UNSIGNED_INT_24_8:Aa.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:Aa.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:Aa.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:Aa.UNSIGNED_SHORT_5_6_5,isPacked:function(e){return e===Lu.UNSIGNED_INT_24_8||e===Lu.UNSIGNED_SHORT_4_4_4_4||e===Lu.UNSIGNED_SHORT_5_5_5_1||e===Lu.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case Lu.UNSIGNED_BYTE:return 1;case Lu.UNSIGNED_SHORT:case Lu.UNSIGNED_SHORT_4_4_4_4:case Lu.UNSIGNED_SHORT_5_5_5_1:case Lu.UNSIGNED_SHORT_5_6_5:case Aa.HALF_FLOAT:case Aa.HALF_FLOAT_OES:return 2;case Lu.UNSIGNED_INT:case Lu.FLOAT:case Lu.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===Lu.UNSIGNED_BYTE||e===Lu.UNSIGNED_SHORT||e===Lu.UNSIGNED_INT||e===Lu.FLOAT||e===Aa.HALF_FLOAT||e===Aa.HALF_FLOAT_OES||e===Lu.UNSIGNED_INT_24_8||e===Lu.UNSIGNED_SHORT_4_4_4_4||e===Lu.UNSIGNED_SHORT_5_5_5_1||e===Lu.UNSIGNED_SHORT_5_6_5},toWebGLConstant:function(e,t){switch(e){case Lu.UNSIGNED_BYTE:return Aa.UNSIGNED_BYTE;case Lu.UNSIGNED_SHORT:return Aa.UNSIGNED_SHORT;case Lu.UNSIGNED_INT:return Aa.UNSIGNED_INT;case Lu.FLOAT:return Aa.FLOAT;case Lu.HALF_FLOAT:return t.webgl2?Aa.HALF_FLOAT:Aa.HALF_FLOAT_OES;case Lu.UNSIGNED_INT_24_8:return Aa.UNSIGNED_INT_24_8;case Lu.UNSIGNED_SHORT_4_4_4_4:return Aa.UNSIGNED_SHORT_4_4_4_4;case Lu.UNSIGNED_SHORT_5_5_5_1:return Aa.UNSIGNED_SHORT_5_5_5_1;case Lu.UNSIGNED_SHORT_5_6_5:return Lu.UNSIGNED_SHORT_5_6_5}}},Mu={DEPTH_COMPONENT:Aa.DEPTH_COMPONENT,DEPTH_COMPONENT16:Aa.DEPTH_COMPONENT16,DEPTH_COMPONENT32F:Aa.DEPTH_COMPONENT32F,DEPTH_STENCIL:Aa.DEPTH_STENCIL,ALPHA:Aa.ALPHA,RGB:Aa.RGB,RGBA:Aa.RGBA,LUMINANCE:Aa.LUMINANCE,LUMINANCE_ALPHA:Aa.LUMINANCE_ALPHA,RGB_DXT1:Aa.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:Aa.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:Aa.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:Aa.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:Aa.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:Aa.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:Aa.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:Aa.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:Aa.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:Aa.COMPRESSED_RGB_ETC1_WEBGL,RED_INTEGER:Aa.RED_INTEGER,RED:Aa.RED,RGB8_ETC2:Aa.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:Aa.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:Aa.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(e){switch(e){case Mu.RGB:return 3;case Mu.RGBA:return 4;case Mu.LUMINANCE_ALPHA:return 2;case Mu.ALPHA:case Mu.LUMINANCE:case Mu.RED:case Mu.RED_INTEGER:default:return 1}},validate:function(e){return e===Mu.DEPTH_COMPONENT||e===Mu.DEPTH_COMPONENT16||e===Mu.DEPTH_COMPONENT32F||e===Mu.DEPTH_STENCIL||e===Mu.ALPHA||e===Mu.RED||e===Mu.RED_INTEGER||e===Mu.RGB||e===Mu.RGBA||e===Mu.LUMINANCE||e===Mu.LUMINANCE_ALPHA||e===Mu.RGB_DXT1||e===Mu.RGBA_DXT1||e===Mu.RGBA_DXT3||e===Mu.RGBA_DXT5||e===Mu.RGB_PVRTC_4BPPV1||e===Mu.RGB_PVRTC_2BPPV1||e===Mu.RGBA_PVRTC_4BPPV1||e===Mu.RGBA_PVRTC_2BPPV1||e===Mu.RGBA_ASTC||e===Mu.RGB_ETC1||e===Mu.RGB8_ETC2||e===Mu.RGBA8_ETC2_EAC||e===Mu.RGBA_BC7},isColorFormat:function(e){return e===Mu.ALPHA||e===Mu.RED||e===Mu.RED_INTEGER||e===Mu.RGB||e===Mu.RGBA||e===Mu.LUMINANCE||e===Mu.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===Mu.DEPTH_COMPONENT||e===Mu.DEPTH_COMPONENT16||e===Mu.DEPTH_COMPONENT32F||e===Mu.DEPTH_STENCIL},isCompressedFormat:function(e){return e===Mu.RGB_DXT1||e===Mu.RGBA_DXT1||e===Mu.RGBA_DXT3||e===Mu.RGBA_DXT5||e===Mu.RGB_PVRTC_4BPPV1||e===Mu.RGB_PVRTC_2BPPV1||e===Mu.RGBA_PVRTC_4BPPV1||e===Mu.RGBA_PVRTC_2BPPV1||e===Mu.RGBA_ASTC||e===Mu.RGB_ETC1||e===Mu.RGB8_ETC2||e===Mu.RGBA8_ETC2_EAC||e===Mu.RGBA_BC7},isDXTFormat:function(e){return e===Mu.RGB_DXT1||e===Mu.RGBA_DXT1||e===Mu.RGBA_DXT3||e===Mu.RGBA_DXT5},isPVRTCFormat:function(e){return e===Mu.RGB_PVRTC_4BPPV1||e===Mu.RGB_PVRTC_2BPPV1||e===Mu.RGBA_PVRTC_4BPPV1||e===Mu.RGBA_PVRTC_2BPPV1},isETC1Format:function(e){return e===Mu.RGB_ETC1},compressedTextureSizeInBytes:function(e,t,i,n){var r=wa(n)?n:1;switch(e){case Mu.RGB_DXT1:case Mu.RGBA_DXT1:case Mu.RGB_ETC1:case Mu.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*8*r;case Mu.RGBA_DXT3:case Mu.RGBA_DXT5:case Mu.RGBA_ASTC:case Mu.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*16*r;case Mu.RGB_PVRTC_4BPPV1:case Mu.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8)*r;case Mu.RGB_PVRTC_2BPPV1:case Mu.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8)*r;case Mu.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(i/4)*16;default:return 0}},textureSizeInBytes:function(e,t,i,n,r){var o=wa(r)?r:1,a=Mu.componentsLength(e);return Lu.isPacked(t)&&(a=1),a*Lu.sizeInBytes(t)*i*n*o},alignmentInBytes:function(e,t,i){var n=Mu.textureSizeInBytes(e,t,i,1)%4;return 0===n?4:2===n?2:1},createTypedArray:function(e,t,i,n){var r=Lu.sizeInBytes(t);return new(r===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:r===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:r===Float32Array.BYTES_PER_ELEMENT&&t===Lu.FLOAT?Float32Array:Uint32Array)(Mu.componentsLength(e)*i*n)},flipY:function(e,t,i,n,r){if(1===r)return e;for(var o=Mu.createTypedArray(t,i,n,r),a=Mu.componentsLength(t),s=n*a,l=0;l<r;++l)for(var u=l*n*a,c=(r-l-1)*n*a,h=0;h<s;++h)o[c+h]=e[u+h];return o},RGBToRGBA:function(e,t,i,n){for(var r=Mu.createTypedArray(Mu.RGBA,t,i,n),o=e.length/3,a=0;a<o;a++)r[4*a]=e[3*a],r[4*a+1]=e[3*a+1],r[4*a+2]=e[3*a+2];return r},toInternalFormat:function(e,t,i){if(!i.webgl2)return e;if(e===Mu.DEPTH_STENCIL)return Aa.DEPTH24_STENCIL8;if(e===Mu.DEPTH_COMPONENT){if(t===Lu.UNSIGNED_SHORT)return Aa.DEPTH_COMPONENT16;if(t===Lu.UNSIGNED_INT)return Aa.DEPTH_COMPONENT24;if(t===Lu.FLOAT)return Aa.DEPTH_COMPONENT32F}if(e===Mu.DEPTH_COMPONENT16)return Aa.DEPTH_COMPONENT16;if(e===Mu.DEPTH_COMPONENT32F)return Aa.DEPTH_COMPONENT32F;if(t===Lu.FLOAT)switch(e){case Mu.RGBA:return Aa.RGBA32F;case Mu.RGB:return Aa.RGB32F;case Mu.RG:return Aa.RG32F;case Mu.RED:return Aa.R32F}if(t===Lu.UNSIGNED_BYTE)switch(e){case Mu.RGBA:return Aa.RGBA8;case Mu.RGB:return Aa.RGB8;case Mu.RED:return Aa.R8}if(t===Lu.HALF_FLOAT)switch(e){case Mu.RGBA:return Aa.RGBA16F;case Mu.RGB:return Aa.RGB16F;case Mu.RG:return Aa.RG16F;case Mu.RED:return Aa.R16F}return e}},Ru=Object.freeze(Mu),Ou={POINTS:Aa.POINTS,LINES:Aa.LINES,LINE_LOOP:Aa.LINE_LOOP,LINE_STRIP:Aa.LINE_STRIP,TRIANGLES:Aa.TRIANGLES,TRIANGLE_STRIP:Aa.TRIANGLE_STRIP,TRIANGLE_FAN:Aa.TRIANGLE_FAN,validate:function(e){return e===Ou.POINTS||e===Ou.LINES||e===Ou.LINE_LOOP||e===Ou.LINE_STRIP||e===Ou.TRIANGLES||e===Ou.TRIANGLE_STRIP||e===Ou.TRIANGLE_FAN}},Du=Object.freeze(Ou),Iu={CLAMP_TO_EDGE:Aa.CLAMP_TO_EDGE,REPEAT:Aa.REPEAT,MIRRORED_REPEAT:Aa.MIRRORED_REPEAT,validate:function(e){return e===Iu.CLAMP_TO_EDGE||e===Iu.REPEAT||e===Iu.MIRRORED_REPEAT}},Bu=Object.freeze(Iu),Fu={NEAREST:Aa.NEAREST,LINEAR:Aa.LINEAR,validate:function(e){return e===Fu.NEAREST||e===Fu.LINEAR}},Nu=Object.freeze(Fu),Gu={NEAREST:Aa.NEAREST,LINEAR:Aa.LINEAR,NEAREST_MIPMAP_NEAREST:Aa.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:Aa.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:Aa.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:Aa.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===Gu.NEAREST||e===Gu.LINEAR||e===Gu.NEAREST_MIPMAP_NEAREST||e===Gu.LINEAR_MIPMAP_NEAREST||e===Gu.NEAREST_MIPMAP_LINEAR||e===Gu.LINEAR_MIPMAP_LINEAR}},zu=Object.freeze(Gu);function Uu(){}function Vu(){}Uu.toPixelFormat=function(e){switch(e){case Ru.RED:return Xa.TEXTUREFORMAT_RED;case Ru.RED_INTEGER:return Xa.TEXTUREFORMAT_RED_INTEGER;case Ru.RGB:return Xa.TEXTUREFORMAT_RGB;case Ru.RGBA:return Xa.TEXTUREFORMAT_RGBA;case Ru.LUMINANCE_ALPHA:return Xa.TEXTUREFORMAT_LUMINANCE_ALPHA;case Ru.ALPHA:return Xa.TEXTUREFORMAT_ALPHA;case Ru.LUMINANCE:return Xa.TEXTUREFORMAT_LUMINANCE;case Ru.DEPTH_COMPONENT16:return Xa.TEXTUREFORMAT_DEPTH16;case Ru.DEPTH_COMPONENT:return Xa.TEXTUREFORMAT_DEPTH24;case Ru.DEPTH_COMPONENT32F:return Xa.TEXTUREFORMAT_DEPTH32_FLOAT;case Ru.DEPTH_STENCIL:return Xa.TEXTUREFORMAT_DEPTH24_STENCIL8;case Ru.RGBA_DXT1:return Xa.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1;case Ru.RGBA_DXT3:return Xa.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3;case Ru.RGBA_DXT5:return Xa.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5;case Ru.RGB_DXT1:return Xa.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1;case Ru.RGBA_PVRTC_2BPPV1:case Ru.RGBA_PVRTC_4BPPV1:case Ru.RGB_ETC1:case Ru.RGB_PVRTC_2BPPV1:case Ru.RGB_PVRTC_4BPPV1:default:return 1}},Uu.toPixelType=function(e){switch(e){case Lu.FLOAT:return Xa.TEXTURETYPE_FLOAT;case Lu.HALF_FLOAT:return Xa.TEXTURETYPE_HALF_FLOAT;case Lu.UNSIGNED_BYTE:return Xa.TEXTURETYPE_UNSIGNED_BYTE;case Lu.UNSIGNED_INT:return Xa.TEXTURETYPE_UNSIGNED_INT;case Lu.UNSIGNED_INT_24_8:return Xa.TEXTURETYPE_UNSIGNED_INT_24_8;case Lu.UNSIGNED_SHORT:return Xa.TEXTURETYPE_UNSIGNED_SHORT;case Lu.UNSIGNED_SHORT_4_4_4_4:return Xa.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4;case Lu.UNSIGNED_SHORT_5_5_5_1:return Xa.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1;case Lu.UNSIGNED_SHORT_5_6_5:return Xa.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;default:return Xa.TEXTURETYPE_UNDEFINED}},Uu.toSamplerMode=function(e,t){var i=e==Lu.FLOAT||e==Lu.HALF_FLOAT;if(t.magnificationFilter==Nu.NEAREST){if(t.minificationFilter==zu.NEAREST)return Xa.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==zu.LINEAR)return Xa.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==zu.NEAREST_MIPMAP_NEAREST)return Xa.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==zu.LINEAR_MIPMAP_NEAREST)return Xa.TEXTURE_NEAREST_SAMPLINGMODE}else{if(t.magnificationFilter!=Nu.LINEAR)return console.log("EnumConvertor.toSamplerMode unsupported type"),Xa.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==zu.NEAREST)return i?Xa.TEXTURE_NEAREST_SAMPLINGMODE:Xa.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==zu.LINEAR)return i?Xa.TEXTURE_NEAREST_SAMPLINGMODE:Xa.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==zu.NEAREST_MIPMAP_NEAREST)return i?Xa.TEXTURE_NEAREST_SAMPLINGMODE:Xa.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==zu.LINEAR_MIPMAP_NEAREST)return i?Xa.TEXTURE_NEAREST_SAMPLINGMODE:Xa.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==zu.LINEAR_MIPMAP_LINEAR)return i?Xa.TEXTURE_NEAREST_SAMPLINGMODE:Xa.TEXTURE_LINEAR_LINEAR_MIPLINEAR}},Uu.toAddressMode=function(e){switch(e){case Bu.CLAMP_TO_EDGE:return Xa.TEXTURE_CLAMP_ADDRESSMODE;case Bu.REPEAT:return Xa.TEXTURE_WRAP_ADDRESSMODE;case Bu.MIRRORED_REPEAT:return Xa.TEXTURE_MIRROR_ADDRESSMODE;default:return Xa.TEXTURE_CLAMP_ADDRESSMODE}},Uu.toFillMode=function(e){switch(e){case Du.TRIANGLES:return Xa.MATERIAL_TriangleFillMode;case Du.POINTS:return Xa.MATERIAL_PointFillMode;case Du.LINES:return Xa.MATERIAL_WireFrameFillMode;case Du.LINE_STRIP:return Xa.MATERIAL_LineStripDrawMode;default:return console.log("EnumConvertor.toFillMode unsupported type"),Xa.MATERIAL_TriangleFillMode}},Uu.toCullFace=function(e){switch(e){case Aa.FRONT:return 2;case Aa.BACK:default:return 1}},Uu.toFrontFace=function(e,t){switch(e){case Aa.CCW:return t?2:1;case Aa.CW:return t?1:2;default:return 1}},Uu.toVertexBufferDataType=function(e){switch(e){case Ma.BYTE:return ns.BYTE;case Ma.UNSIGNED_BYTE:return ns.UNSIGNED_BYTE;case Ma.SHORT:return ns.SHORT;case Ma.UNSIGNED_SHORT:return ns.UNSIGNED_SHORT;case Ma.INT:return ns.INT;case Ma.UNSIGNED_INT:return ns.UNSIGNED_INT;case Ma.FLOAT:return ns.FLOAT;default:throw console.log("EnumConvertor.toVertexBufferDataType unsupported type"),new Ea("componentDatatype is not a valid value.")}},Vu.applyFrontFace=function(e,t,i){e._depthCullingState.frontFace=Uu.toFrontFace(t.frontFace,i)},Vu.applyCull=function(e,t){var i=t.cull;i.enabled?(e._depthCullingState.cull=!0,e._depthCullingState.cullFace=Uu.toCullFace(i.face)):(e._depthCullingState.cull=!1,e._depthCullingState.cullFace=0)},Vu.applyLineWidth=function(e,t){},Vu.applyPolygonOffset=function(e,t){var i=t.polygonOffset;i.enabled?(e.setZOffset(i.factor),e.setZOffsetUnits(i.units)):(e.setZOffset(0),e.setZOffsetUnits(0))},Vu.applyScissorTest=function(e,t,i){var n=t.scissorTest;if(wa(i.scissorTest)?i.scissorTest.enabled:n.enabled){var r=wa(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.enableScissor(r.x,r.y,r.width,r.height)}else e.disableScissor()},Vu.applyDepthRange=function(e,t){},Vu.applyDepthTest=function(e,t){var i=t.depthTest,n=i.enabled;e.setDepthBuffer(n),n&&e.setDepthFunction(i.func)},Vu.applyColorMask=function(e,t){var i=t.colorMask;e.setColorWrite(i.red)},Vu.applyDepthMask=function(e,t){e.setDepthWrite(t.depthMask)},Vu.applyStencilMask=function(e,t){var i=t.stencilMask;i<0&&(i=255),e.setStencilMask(i)},Vu.applyBlendingColor=function(e,t){e.setAlphaConstants(t.red,t.green,t.blue,t.alpha)},Vu.applyBlending=function(e,t,i){var n=t.blending;(wa(i.blendingEnabled)?i.blendingEnabled:n.enabled)?(Vu.applyBlendingColor(e,n.color),e._alphaState.setAlphaEquationParameters(n.equationRgb,n.equationAlpha),e._alphaState.setAlphaBlendFunctionParameters(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha),e._alphaState.alphaBlend=!0):e.setAlphaMode(Xa.ALPHA_DISABLE)},Vu.applyStencilTest=function(e,t){var i=t.stencilTest,n=i.enabled;if(e.setStencilBuffer(n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.setStencilFunction(Au.FRONT,r);var l=i.frontOperation;e.setStencilOperationFail(Au.FRONT,l.fail),e.setStencilOperationDepthFail(Au.FRONT,l.zFail),e.setStencilOperationPass(Au.FRONT,l.zPass),e.setStencilFunction(Au.BACK,o);var u=i.backOperation;e.setStencilOperationFail(Au.BACK,u.fail),e.setStencilOperationDepthFail(Au.BACK,u.zFail),e.setStencilOperationPass(Au.BACK,u.zPass),e.setStencilFunctionReference(a),e.setStencilFunctionMask(s)}},Vu.applySampleCoverage=function(e,t){};var ku=new Xs;function Wu(){}function Hu(e,t,i){i?e.enable(t):e.disable(t)}Vu.applyViewport=function(e,t,i,n,r){var o=Sa(t.viewport,i.viewport);wa(o)||((o=ku).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight);var a=Sa(n,i.context.drawingBufferWidth),s=Sa(r,i.context.drawingBufferHeight);i.context.uniformState.viewport=o;var l={x:o.x/a,y:o.y/s,width:o.width/a,height:o.height/s};e.setViewport(l,n,r)},Wu.applyFrontFace=function(e,t,i){e.frontFace(t.frontFace)},Wu.applyCull=function(e,t){var i=t.cull,n=i.enabled;Hu(e,e.CULL_FACE,n),n&&e.cullFace(i.face)},Wu.applyLineWidth=function(e,t){e.lineWidth(t.lineWidth)},Wu.applyPolygonOffset=function(e,t){var i=t.polygonOffset,n=i.enabled;Hu(e,e.POLYGON_OFFSET_FILL,n),n&&e.polygonOffset(i.factor,i.units)},Wu.applyScissorTest=function(e,t,i){var n=t.scissorTest,r=wa(i.scissorTest)?i.scissorTest.enabled:n.enabled;if(Hu(e,e.SCISSOR_TEST,r),r){var o=wa(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.scissor(o.x,o.y,o.width,o.height)}},Wu.applyDepthRange=function(e,t){var i=t.depthRange;e.depthRange(i.near,i.far)},Wu.applyDepthTest=function(e,t){var i=t.depthTest,n=i.enabled;Hu(e,e.DEPTH_TEST,n),n&&e.depthFunc(i.func)},Wu.applyColorMask=function(e,t){var i=t.colorMask;e.colorMask(i.red,i.green,i.blue,i.alpha)},Wu.applyDepthMask=function(e,t){e.depthMask(t.depthMask)},Wu.applyStencilMask=function(e,t){e.stencilMask(t.stencilMask)},Wu.applyBlendingColor=function(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)},Wu.applyBlending=function(e,t,i){var n=t.blending,r=wa(i.blendingEnabled)?i.blendingEnabled:n.enabled;Hu(e,e.BLEND,r),r&&(Wu.applyBlendingColor(e,n.color),e.blendEquationSeparate(n.equationRgb,n.equationAlpha),e.blendFuncSeparate(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha))},Wu.applyStencilTest=function(e,t){var i=t.stencilTest,n=i.enabled;if(Hu(e,e.STENCIL_TEST,n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.stencilFunc(r,a,s),e.stencilFuncSeparate(e.BACK,o,a,s),e.stencilFuncSeparate(e.FRONT,r,a,s);var l=i.frontOperation,u=l.fail,c=l.zFail,h=l.zPass;e.stencilOpSeparate(e.FRONT,u,c,h);var d=i.backOperation,f=d.fail,p=d.zFail,_=d.zPass;e.stencilOpSeparate(e.BACK,f,p,_)}},Wu.applySampleCoverage=function(e,t){var i=t.sampleCoverage,n=i.enabled;Hu(e,e.SAMPLE_COVERAGE,n),n&&e.sampleCoverage(i.value,i.invert)};var qu=new Xs;function ju(e){return e===Aa.FUNC_ADD||e===Aa.FUNC_SUBTRACT||e===Aa.FUNC_REVERSE_SUBTRACT||e===Aa.MIN||e===Aa.MAX}function Xu(e){return e===Aa.ZERO||e===Aa.ONE||e===Aa.SRC_COLOR||e===Aa.ONE_MINUS_SRC_COLOR||e===Aa.DST_COLOR||e===Aa.ONE_MINUS_DST_COLOR||e===Aa.SRC_ALPHA||e===Aa.ONE_MINUS_SRC_ALPHA||e===Aa.DST_ALPHA||e===Aa.ONE_MINUS_DST_ALPHA||e===Aa.CONSTANT_COLOR||e===Aa.ONE_MINUS_CONSTANT_COLOR||e===Aa.CONSTANT_ALPHA||e===Aa.ONE_MINUS_CONSTANT_ALPHA||e===Aa.SRC_ALPHA_SATURATE}function Yu(e){return e===Aa.FRONT||e===Aa.BACK||e===Aa.FRONT_AND_BACK}function Zu(e){return e===Aa.NEVER||e===Aa.LESS||e===Aa.EQUAL||e===Aa.LEQUAL||e===Aa.GREATER||e===Aa.NOTEQUAL||e===Aa.GEQUAL||e===Aa.ALWAYS}function Ku(e){return e===Aa.NEVER||e===Aa.LESS||e===Aa.EQUAL||e===Aa.LEQUAL||e===Aa.GREATER||e===Aa.NOTEQUAL||e===Aa.GEQUAL||e===Aa.ALWAYS}function Qu(e){return e===Aa.ZERO||e===Aa.KEEP||e===Aa.REPLACE||e===Aa.INCR||e===Aa.DECR||e===Aa.INVERT||e===Aa.INCR_WRAP||e===Aa.DECR_WRAP}function Ju(e){var t=Sa(e,{}),i=Sa(t.cull,{}),n=Sa(t.polygonOffset,{}),r=Sa(t.scissorTest,{}),o=Sa(r.rectangle,{}),a=Sa(t.depthRange,{}),s=Sa(t.depthTest,{}),l=Sa(t.colorMask,{}),u=Sa(t.blending,{}),c=Sa(u.color,{}),h=Sa(t.stencilTest,{}),d=Sa(h.frontOperation,{}),f=Sa(h.backOperation,{}),p=Sa(t.sampleCoverage,{}),_=t.viewport;if(this.frontFace=Sa(t.frontFace,Tu.COUNTER_CLOCKWISE),this.cull={enabled:Sa(i.enabled,!1),face:Sa(i.face,Aa.BACK)},this.lineWidth=Sa(t.lineWidth,1),this.polygonOffset={enabled:Sa(n.enabled,!1),factor:Sa(n.factor,0),units:Sa(n.units,0)},this.scissorTest={enabled:Sa(r.enabled,!1),rectangle:Xs.clone(o)},this.depthRange={near:Sa(a.near,0),far:Sa(a.far,1)},this.depthTest={enabled:Sa(s.enabled,!1),func:Sa(s.func,Aa.LESS)},this.colorMask={red:Sa(l.red,!0),green:Sa(l.green,!0),blue:Sa(l.blue,!0),alpha:Sa(l.alpha,!0)},this.depthMask=Sa(t.depthMask,!0),this.stencilMask=Sa(t.stencilMask,65535),this.blending={enabled:Sa(u.enabled,!1),color:new gu(Sa(c.red,0),Sa(c.green,0),Sa(c.blue,0),Sa(c.alpha,0)),equationRgb:Sa(u.equationRgb,Aa.FUNC_ADD),equationAlpha:Sa(u.equationAlpha,Aa.FUNC_ADD),functionSourceRgb:Sa(u.functionSourceRgb,Aa.ONE),functionSourceAlpha:Sa(u.functionSourceAlpha,Aa.ONE),functionDestinationRgb:Sa(u.functionDestinationRgb,Aa.ZERO),functionDestinationAlpha:Sa(u.functionDestinationAlpha,Aa.ZERO)},this.stencilTest={enabled:Sa(h.enabled,!1),frontFunction:Sa(h.frontFunction,Aa.ALWAYS),backFunction:Sa(h.backFunction,Aa.ALWAYS),reference:Sa(h.reference,0),mask:Sa(h.mask,65535),frontOperation:{fail:Sa(d.fail,Aa.KEEP),zFail:Sa(d.zFail,Aa.KEEP),zPass:Sa(d.zPass,Aa.KEEP)},backOperation:{fail:Sa(f.fail,Aa.KEEP),zFail:Sa(f.zFail,Aa.KEEP),zPass:Sa(f.zPass,Aa.KEEP)}},this.sampleCoverage={enabled:Sa(p.enabled,!1),value:Sa(p.value,1),invert:Sa(p.invert,!1)},this.viewport=wa(_)?new Xs(_.x,_.y,_.width,_.height):void 0,this.lineWidth<Cu.minimumAliasedLineWidth||this.lineWidth>Cu.maximumAliasedLineWidth)throw new Ea("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!Tu.validate(this.frontFace))throw new Ea("Invalid renderState.frontFace.");if(!Yu(this.cull.face))throw new Ea("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new Ea("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new Ea("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new Ea("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new Ea("renderState.depthRange.far must be less than or equal to one.");if(!Zu(this.depthTest.func))throw new Ea("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new Ea("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!ju(this.blending.equationRgb))throw new Ea("Invalid renderState.blending.equationRgb.");if(!ju(this.blending.equationAlpha))throw new Ea("Invalid renderState.blending.equationAlpha.");if(!Xu(this.blending.functionSourceRgb))throw new Ea("Invalid renderState.blending.functionSourceRgb.");if(!Xu(this.blending.functionSourceAlpha))throw new Ea("Invalid renderState.blending.functionSourceAlpha.");if(!Xu(this.blending.functionDestinationRgb))throw new Ea("Invalid renderState.blending.functionDestinationRgb.");if(!Xu(this.blending.functionDestinationAlpha))throw new Ea("Invalid renderState.blending.functionDestinationAlpha.");if(!Ku(this.stencilTest.frontFunction))throw new Ea("Invalid renderState.stencilTest.frontFunction.");if(!Ku(this.stencilTest.backFunction))throw new Ea("Invalid renderState.stencilTest.backFunction.");if(!Qu(this.stencilTest.frontOperation.fail))throw new Ea("Invalid renderState.stencilTest.frontOperation.fail.");if(!Qu(this.stencilTest.frontOperation.zFail))throw new Ea("Invalid renderState.stencilTest.frontOperation.zFail.");if(!Qu(this.stencilTest.frontOperation.zPass))throw new Ea("Invalid renderState.stencilTest.frontOperation.zPass.");if(!Qu(this.stencilTest.backOperation.fail))throw new Ea("Invalid renderState.stencilTest.backOperation.fail.");if(!Qu(this.stencilTest.backOperation.zFail))throw new Ea("Invalid renderState.stencilTest.backOperation.zFail.");if(!Qu(this.stencilTest.backOperation.zPass))throw new Ea("Invalid renderState.stencilTest.backOperation.zPass.");if(wa(this.viewport)){if(this.viewport.width<0)throw new Ea("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new Ea("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>Cu.maximumViewportWidth)throw new Ea("renderState.viewport.width must be less than or equal to the maximum viewport width ("+Cu.maximumViewportWidth.toString()+"). Check maximumViewportWidth.");if(this.viewport.height>Cu.maximumViewportHeight)throw new Ea("renderState.viewport.height must be less than or equal to the maximum viewport height ("+Cu.maximumViewportHeight.toString()+"). Check maximumViewportHeight.")}this.id=0,this._applyFunctions=[]}Wu.applyViewport=function(e,t,i,n,r){var o=Sa(t.viewport,i.viewport);wa(o)||((o=qu).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=o,e.viewport(o.x,o.y,o.width,o.height)};var ec=0,tc={};function ic(e,t,i){(e?Vu:Wu).applyFrontFace(t,i)}function nc(e,t,i){(e?Vu:Wu).applyCull(t,i)}function rc(e,t,i){(e?Vu:Wu).applyLineWidth(t,i)}function oc(e,t,i){(e?Vu:Wu).applyPolygonOffset(t,i)}function ac(e,t,i){(e?Vu:Wu).applyDepthRange(t,i)}function sc(e,t,i){(e?Vu:Wu).applyDepthTest(t,i)}function lc(e,t,i){(e?Vu:Wu).applyColorMask(t,i)}function uc(e,t,i){(e?Vu:Wu).applyDepthMask(t,i)}function cc(e,t,i){(e?Vu:Wu).applyStencilMask(t,i)}function hc(e,t,i){(e?Vu:Wu).applyStencilTest(t,i)}function dc(e,t,i){(e?Vu:Wu).applySampleCoverage(t,i)}function fc(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(ic),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&i.push(nc),e.lineWidth!==t.lineWidth&&i.push(rc),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&i.push(oc),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&i.push(ac),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&i.push(sc),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&i.push(lc),e.depthMask!==t.depthMask&&i.push(uc),e.stencilMask!==t.stencilMask&&i.push(cc),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&i.push(hc),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&i.push(dc),i}Ju.fromCache=function(e){var t=JSON.stringify(e),i=tc[t];if(wa(i))return++i.referenceCount,i.state;var n=new Ju(e),r=JSON.stringify(n);return wa(i=tc[r])||(n.id=ec++,i={referenceCount:0,state:n=Su(n)},tc[r]=i),++i.referenceCount,tc[t]={referenceCount:1,state:i.state},i.state},Ju.removeFromCache=function(e){var t=new Ju(e),i=JSON.stringify(t),n=tc[i],r=JSON.stringify(e),o=tc[r];wa(o)&&(--o.referenceCount,0===o.referenceCount&&(delete tc[r],wa(n)&&--n.referenceCount)),wa(n)&&0===n.referenceCount&&delete tc[i]},Ju.getCache=function(){return tc},Ju.clearCache=function(){tc={}},Ju.apply=function(e,t,i){const n=wa(e.name)?Vu:Wu;n.applyFrontFace(e,t),n.applyCull(e,t),n.applyLineWidth(e,t),n.applyPolygonOffset(e,t),n.applyDepthRange(e,t),n.applyDepthTest(e,t),n.applyColorMask(e,t),n.applyDepthMask(e,t),n.applyStencilMask(e,t),n.applyStencilTest(e,t),n.applySampleCoverage(e,t),n.applyScissorTest(e,t,i),n.applyBlending(e,t,i),n.applyViewport(e,t,i)},Ju.partialApply=function(e,t,i,n,r,o,a,s,l,u,c){const h=wa(e.name),d=h?Vu:Wu;if(t!==i){var f=i._applyFunctions[t.id];wa(f)||(f=fc(t,i),i._applyFunctions[t.id]=f);for(var p=f.length,_=0;_<p;++_)f[_](h,e,i)}((wa(n.scissorTest)?n.scissorTest:t.scissorTest)!==(wa(r.scissorTest)?r.scissorTest:i.scissorTest)||s)&&d.applyScissorTest(e,i,r);var m=wa(n.blendingEnabled)?n.blendingEnabled:t.blending.enabled,g=wa(r.blendingEnabled)?r.blendingEnabled:i.blending.enabled;(m!==g||g&&t.blending!==i.blending)&&d.applyBlending(e,i,r),(t!==i||n!==r||n.context!==r.context||o!==a)&&d.applyViewport(e,i,r,l,u)},Ju.getState=function(e){if(!wa(e))throw new Ea("renderState is required.");return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:Xs.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:gu.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:wa(e.viewport)?Xs.clone(e.viewport):void 0}};var pc,_c={ADD:Aa.FUNC_ADD,SUBTRACT:Aa.FUNC_SUBTRACT,REVERSE_SUBTRACT:Aa.FUNC_REVERSE_SUBTRACT,MIN:Aa.MIN,MAX:Aa.MAX},mc=Object.freeze(_c),gc={ZERO:Aa.ZERO,ONE:Aa.ONE,SOURCE_COLOR:Aa.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:Aa.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:Aa.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:Aa.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:Aa.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:Aa.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:Aa.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:Aa.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:Aa.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:Aa.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:Aa.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:Aa.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:Aa.SRC_ALPHA_SATURATE},xc=Object.freeze(gc),yc={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:mc.ADD,equationAlpha:mc.ADD,functionSourceRgb:xc.SOURCE_ALPHA,functionSourceAlpha:xc.ONE,functionDestinationRgb:xc.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:xc.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:mc.ADD,equationAlpha:mc.ADD,functionSourceRgb:xc.ONE,functionSourceAlpha:xc.ONE,functionDestinationRgb:xc.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:xc.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:mc.ADD,equationAlpha:mc.ADD,functionSourceRgb:xc.SOURCE_ALPHA,functionSourceAlpha:xc.ONE,functionDestinationRgb:xc.ONE,functionDestinationAlpha:xc.ONE})},vc=Object.freeze(yc),$c=(pc=!0,function(e,t){var i=pc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return pc=!1,i}),bc=$c(void 0,(function(){return bc.toString().search("(((.+)+)+)+$").toString().constructor(bc).search("(((.+)+)+)+$")}));function Tc(){}bc(),Tc.toVertexBuffer=function(e,t,i,n){var r=us.createVertexBuffer({context:e,typedArray:t.arrayBuffer,usage:n?Ua.DYNAMIC_DRAW:Ua.STATIC_DRAW});return r.vertexArrayDestroyable=!1,r.bytesPerElement=t.bytesPerElement,r.length=t.length,r.attributes=i,r.itemSize=t.bytesPerElement,r.dynamicDraw=n,!n&&delete t.arrayBuffer,r},Tc.toIndexBuffer=function(e,t,i){if(0!==t.length){var n=us.createIndexBuffer({context:e,typedArray:t.arrayBuffer,usage:Ua.STATIC_DRAW,indexDatatype:za.UNSIGNED_SHORT});return n.vertexArrayDestroyable=!1,n.dynamicDraw=i,!n.dynamicDraw&&delete t.arrayBuffer,n}},Tc.toRenderState=function(e,t,i){var n=vc.DISABLED;e.blendFunction[0]==Aa.ONE&&e.blendFunction[1]==Aa.ONE_MINUS_SRC_ALPHA&&(n=vc.ALPHA_BLEND);var r={frontFace:i.frontFace,cull:{enabled:i.enable,face:i.mode},depthRange:{near:t.range[0],far:t.range[1]},depthTest:{enabled:t.func!==Aa.ALWAYS,func:t.func},depthMask:t.mask,colorMask:{red:e.mask[0],green:e.mask[1],blue:e.mask[2],alpha:e.mask[3]},blending:n};return Ju.fromCache(r)},Tc.toComponentDatatype=function(e){switch(e){case"Int8":return Ma.BYTE;case"Uint8":return Ma.UNSIGNED_BYTE;case"Int16":return Ma.SHORT;case"Uint16":return Ma.UNSIGNED_SHORT;case"Int32":return Ma.INT;case"Uint32":return Ma.UNSIGNED_INT;default:return Ma.FLOAT}},Tc.mbxAttributeToCesiumVertexArrtribute=function(e,t,i,n){var r=this.toComponentDatatype(e.type);Ma.getSizeInBytes(r);var o=t.bytesPerElement,a=e.offset+o*(n||0);return{name:e.name,index:i,vertexBuffer:t,componentsPerAttribute:e.components,componentDatatype:r,offsetInBytes:a,strideInBytes:o,normalize:!1}};var Cc,Sc=(Cc=!0,function(e,t){var i=Cc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Cc=!1,i}),wc=Sc(void 0,(function(){return wc.toString().search("(((.+)+)+)+$").toString().constructor(wc).search("(((.+)+)+)+$")}));wc();var Ec=function(){this.ids=[],this.positions=[],this.indexed=!1};function Pc(e,t,i,n){if(!(i>=n)){for(var r=e[i+n>>1],o=i-1,a=n+1;;){do{o++}while(e[o]<r);do{a--}while(e[a]>r);if(o>=a)break;Ac(e,o,a),Ac(t,3*o,3*a),Ac(t,3*o+1,3*a+1),Ac(t,3*o+2,3*a+2)}Pc(e,t,i,a),Pc(e,t,a+1,n)}}function Ac(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Lc(e,t,i,n){this.x=Sa(e,0),this.y=Sa(t,0),this.z=Sa(i,0),this.w=Sa(n,0)}Ec.prototype.add=function(e,t,i,n){this.ids.push(e),this.positions.push(t,i,n)},Ec.prototype.getPositions=function(e){for(var t=0,i=this.ids.length-1;t<i;){var n=t+i>>1;this.ids[n]>=e?i=n:t=n+1}for(var r=[];this.ids[t]===e;){var o=this.positions[3*t],a=this.positions[3*t+1],s=this.positions[3*t+2];r.push({index:o,start:a,end:s}),t++}return r},Ec.serialize=function(e,t){var i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Pc(i,n,0,i.length-1),t&&t.push(i.buffer,n.buffer),{ids:i,positions:n}},Ec.deserialize=function(e){var t=new Ec;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},en.register("FeaturePositionMap",Ec),Lc.fromElements=function(e,t,i,n,r){return wa(r)?(r.x=e,r.y=t,r.z=i,r.w=n,r):new Lc(e,t,i,n)},Lc.fromColor=function(e,t){return Oa.typeOf.object("color",e),wa(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new Lc(e.red,e.green,e.blue,e.alpha)},Lc.clone=function(e,t){if(wa(e))return wa(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Lc(e.x,e.y,e.z,e.w)},Lc.packedLength=4,Lc.pack=function(e,t,i){return Oa.typeOf.object("value",e),Oa.defined("array",t),i=Sa(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},Lc.unpack=function(e,t,i){return Oa.defined("array",e),t=Sa(t,0),wa(i)||(i=new Lc),i.x=e[t++],i.y=e[t++],i.z=e[t++],i.w=e[t],i},Lc.packArray=function(e,t){Oa.defined("array",e);var i=e.length,n=4*i;if(wa(t)){if(!Array.isArray(t)&&t.length!==n)throw new Ea("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)Lc.pack(e[r],t,4*r);return t},Lc.unpackArray=function(e,t){if(Oa.defined("array",e),Oa.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!=0)throw new Ea("array length must be a multiple of 4.");var i=e.length;wa(t)?t.length=i/4:t=new Array(i/4);for(var n=0;n<i;n+=4){var r=n/4;t[r]=Lc.unpack(e,n,t[r])}return t},Lc.fromArray=Lc.unpack,Lc.maximumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)},Lc.minimumComponent=function(e){return Oa.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)},Lc.minimumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i.w=Math.min(e.w,t.w),i},Lc.maximumByComponent=function(e,t,i){return Oa.typeOf.object("first",e),Oa.typeOf.object("second",t),Oa.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i.w=Math.max(e.w,t.w),i},Lc.magnitudeSquared=function(e){return Oa.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},Lc.magnitude=function(e){return Math.sqrt(Lc.magnitudeSquared(e))};var Mc=new Lc;Lc.distance=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Lc.subtract(e,t,Mc),Lc.magnitude(Mc)},Lc.distanceSquared=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Lc.subtract(e,t,Mc),Lc.magnitudeSquared(Mc)},Lc.normalize=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=Lc.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t.w=e.w/i,isNaN(t.x)||isNaN(t.y)||isNaN(t.z)||isNaN(t.w))throw new Ea("normalized result is not a number");return t},Lc.dot=function(e,t){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},Lc.multiplyComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i.w=e.w*t.w,i},Lc.divideComponents=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i.w=e.w/t.w,i},Lc.add=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},Lc.subtract=function(e,t,i){return Oa.typeOf.object("left",e),Oa.typeOf.object("right",t),Oa.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},Lc.multiplyByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},Lc.divideByScalar=function(e,t,i){return Oa.typeOf.object("cartesian",e),Oa.typeOf.number("scalar",t),Oa.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},Lc.negate=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},Lc.abs=function(e,t){return Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var Rc=new Lc;Lc.lerp=function(e,t,i,n){return Oa.typeOf.object("start",e),Oa.typeOf.object("end",t),Oa.typeOf.number("t",i),Oa.typeOf.object("result",n),Lc.multiplyByScalar(t,i,Rc),n=Lc.multiplyByScalar(e,1-i,n),Lc.add(Rc,n,n)};var Oc=new Lc;Lc.mostOrthogonalAxis=function(e,t){Oa.typeOf.object("cartesian",e),Oa.typeOf.object("result",t);var i=Lc.normalize(e,Oc);return Lc.abs(i,i),t=i.x<=i.y?i.x<=i.z?i.x<=i.w?Lc.clone(Lc.UNIT_X,t):Lc.clone(Lc.UNIT_W,t):i.z<=i.w?Lc.clone(Lc.UNIT_Z,t):Lc.clone(Lc.UNIT_W,t):i.y<=i.z?i.y<=i.w?Lc.clone(Lc.UNIT_Y,t):Lc.clone(Lc.UNIT_W,t):i.z<=i.w?Lc.clone(Lc.UNIT_Z,t):Lc.clone(Lc.UNIT_W,t)},Lc.equals=function(e,t){return e===t||wa(e)&&wa(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},Lc.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]&&e.w===t[i+3]},Lc.equalsEpsilon=function(e,t,i,n){return e===t||wa(e)&&wa(t)&&Ba.equalsEpsilon(e.x,t.x,i,n)&&Ba.equalsEpsilon(e.y,t.y,i,n)&&Ba.equalsEpsilon(e.z,t.z,i,n)&&Ba.equalsEpsilon(e.w,t.w,i,n)},Lc.ZERO=Object.freeze(new Lc(0,0,0,0)),Lc.UNIT_X=Object.freeze(new Lc(1,0,0,0)),Lc.UNIT_Y=Object.freeze(new Lc(0,1,0,0)),Lc.UNIT_Z=Object.freeze(new Lc(0,0,1,0)),Lc.UNIT_W=Object.freeze(new Lc(0,0,0,1)),Lc.prototype.clone=function(e){return Lc.clone(this,e)},Lc.prototype.equals=function(e){return Lc.equals(this,e)},Lc.prototype.equalsEpsilon=function(e,t,i){return Lc.equalsEpsilon(this,e,t,i)},Lc.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var Dc=new Float32Array(1),Ic=256,Bc=65536,Fc=16777216,Nc=1/Ic,Gc=1/Bc,zc=1/Fc,Uc=38;Lc.packFloat=function(e,t){if(Oa.typeOf.number("value",e),wa(t)||(t=new Lc),Dc[0]=e,0===(e=Dc[0]))return Lc.clone(Lc.ZERO,t);var i,n=e<0?1:0;isFinite(e)?(e=Math.abs(e),i=Math.floor(Ba.logBase(e,10))+1,e/=Math.pow(10,i)):(e=.1,i=Uc);var r=e*Ic;return t.x=Math.floor(r),r=(r-t.x)*Ic,t.y=Math.floor(r),r=(r-t.y)*Ic,t.z=Math.floor(r),t.w=2*(i+Uc)+n,t},Lc.unpackFloat=function(e){Oa.typeOf.object("packedFloat",e);var t=e.w/2,i=Math.floor(t),n=2*(t-i);if(n=-(n=2*n-1),(i-=Uc)>=Uc)return n<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var r=n*e.x*Nc;return r+=n*e.y*Gc,(r+=n*e.z*zc)*Math.pow(10,i)},Lc.prototype.toArray=function(e,t){Lc.pack(this,e,t)};var Vc,kc=(Vc=!0,function(e,t){var i=Vc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Vc=!1,i}),Wc=kc(void 0,(function(){return Wc.toString().search("(((.+)+)+)+$").toString().constructor(Wc).search("(((.+)+)+)+$")}));function Hc(e,t,i){return Math.min(i,Math.max(t,e))}function qc(e,t){return 256*(e=Hc(Math.floor(e),0,255))+(t=Hc(Math.floor(t),0,255))}function jc(e){return[qc(255*e.r,255*e.g),qc(255*e.b,255*e.a)]}Wc();var Xc=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0};Xc.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},Xc.prototype.setConstantPatternPositions=function(){},Xc.prototype.populatePaintArray=function(){},Xc.prototype.updatePaintArray=function(){},Xc.prototype.upload=function(){},Xc.prototype.destroy=function(){},Xc.prototype.setUniforms=function(e,t,i,n){t.set(n.constantOr(this.value))},Xc.prototype.getBinding=function(e,t){return"color"===this.type?new ba.UniformColor(e,t):new ba.Uniform1f(e,t)},Xc.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){var e=n.get(i).constantOr(r.value);return"color"===r.type&&(e.red=e.r,e.green=e.g,e.blue=e.b,e.alpha=e.a),e}},Xc.serialize=function(e){var t=e.value,i=e.names,n=e.type;return{value:en.serialize(t),names:i,type:n}},Xc.deserialize=function(e){var t=e.value,i=e.names,n=e.type;return new Xc(en.deserialize(t),i,n)};var Yc=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};Yc.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},Yc.prototype.populatePaintArray=function(){},Yc.prototype.updatePaintArray=function(){},Yc.prototype.upload=function(){},Yc.prototype.destroy=function(){},Yc.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},Yc.prototype.setUniforms=function(e,t,i,n,r){var o=this.patternPositions;"u_pattern_to"===r&&o.patternTo&&t.set(Lc(o.patternTo[0],o.patternTo[1],o.patternTo[2],o.patternTo[3])),"u_pattern_from"===r&&o.patternFrom&&t.set(Lc(o.patternFrom[0],o.patternFrom[1],o.patternFrom[2],o.patternFrom[3]))},Yc.prototype.getBinding=function(e,t){return new ba.Uniform4f(e,t)},Yc.prototype.setUniformMap=function(e,t,i,n){var r=this.patternPositions;e[t]=function(){return"u_pattern_to"===t&&r.patternTo?new Lc(r.patternTo[0],r.patternTo[1],r.patternTo[2],r.patternTo[3]):"u_pattern_from"===t&&r.patternFrom?new Lc(r.patternFrom[0],r.patternFrom[1],r.patternFrom[2],r.patternFrom[3]):void console.log("CrossFadedConstantBinder is not support")}};var Zc=function(e,t,i,n){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?2:1,offset:0}})),this.paintVertexArray=new n};Zc.prototype.defines=function(){return[]},Zc.prototype.setConstantPatternPositions=function(){},Zc.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new go(0),t,{},[],n);if("color"===this.type)for(var s=jc(a),l=o;l<e;l++)r.emplaceBack(s[0],s[1]);else{for(var u=o;u<e;u++)r.emplaceBack(a);this.maxValue=Math.max(this.maxValue,a)}},Zc.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:0},i,n);if("color"===this.type)for(var a=jc(o),s=e;s<t;s++)r.emplace(s,a[0],a[1]);else{for(var l=e;l<t;l++)r.emplace(l,o);this.maxValue=Math.max(this.maxValue,o)}},Zc.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=Tc.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},Zc.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Zc.prototype.setUniforms=function(e,t){t.set(0)},Zc.prototype.getBinding=function(e,t){return new ba.Uniform1f(e,t)},Zc.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};var Kc=function(e,t,i,n,r,o){this.expression=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.type=i,this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?4:2,offset:0}})),this.paintVertexArray=new a};Kc.prototype.defines=function(){return[]},Kc.prototype.setConstantPatternPositions=function(){},Kc.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new go(this.zoom),t,{},[],n),s=this.expression.evaluate(new go(this.zoom+1),t,{},[],n);if("color"===this.type)for(var l=jc(a),u=jc(s),c=o;c<e;c++)r.emplaceBack(l[0],l[1],u[0],u[1]);else{for(var h=o;h<e;h++)r.emplaceBack(a,s);this.maxValue=Math.max(this.maxValue,a,s)}},Kc.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},i,n),a=this.expression.evaluate({zoom:this.zoom+1},i,n);if("color"===this.type)for(var s=jc(o),l=jc(a),u=e;u<t;u++)r.emplace(u,s[0],s[1],l[0],l[1]);else{for(var c=e;c<t;c++)r.emplace(c,o,a);this.maxValue=Math.max(this.maxValue,o,a)}},Kc.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=Tc.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},Kc.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Kc.prototype.interpolationFactor=function(e){return this.useIntegerZoom&&(e=Math.floor(e)),Hc(this.expression.interpolationFactor(e,this.zoom,this.zoom+1),0,1)},Kc.prototype.setUniforms=function(e,t,i){t.set(this.interpolationFactor(i.zoom))},Kc.prototype.getBinding=function(e,t){return new ba.Uniform1f(e,t)},Kc.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){return r.interpolationFactor(0)}};var Qc=function(e,t,i,n,r,o,a){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0,this.layerId=a,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:4,offset:0}})),this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o};Qc.prototype.defines=function(){return[]},Qc.prototype.setConstantPatternPositions=function(){},Qc.prototype.populatePaintArray=function(e,t,i){var n=this.zoomInPaintVertexArray,r=this.zoomOutPaintVertexArray,o=this.layerId,a=n.length;if(n.reserve(e),r.reserve(e),i&&t.patterns&&t.patterns[o]){var s=t.patterns[o],l=s.min,u=s.mid,c=s.max,h=i[l],d=i[u],f=i[c];if(!h||!d||!f)return;for(var p=a;p<e;p++)n.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1]),r.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},Qc.prototype.updatePaintArray=function(e,t,i,n,r){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(r&&i.patterns&&i.patterns[s]){var l=i.patterns[s],u=l.min,c=l.mid,h=l.max,d=r[u],f=r[c],p=r[h];if(!d||!f||!p)return;for(var _=e;_<t;_++)o.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],d.tl[0],d.tl[1],d.br[0],d.br[1]),a.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],p.tl[0],p.tl[1],p.br[0],p.br[1])}},Qc.prototype.upload=function(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=Tc.toVertexBuffer(e,this.zoomInPaintVertexArray,this.paintVertexAttributes),this.zoomOutPaintVertexBuffer=Tc.toVertexBuffer(e,this.zoomOutPaintVertexArray,this.paintVertexAttributes))},Qc.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},Qc.prototype.setUniforms=function(e,t){t.set(0)},Qc.prototype.getBinding=function(e,t){return new Uniform1f(e,t)},Qc.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};class Jc{constructor(){this.binders={},this.cacheKey="",this._buffers=[]}static createDynamic(e,t,i){const n=new Jc,r=[];for(const o in e.paint._values){if(!i(o))continue;const a=e.paint.get(o);if(!(a instanceof $a&&er(a.property.specification)))continue;const s=th(o,e.type),l=a.property.specification.type,u=a.property.useIntegerZoom;if("cross-faded"===a.property.specification["property-type"]||"cross-faded-data-driven"===a.property.specification["property-type"])if("constant"===a.value.kind)n.binders[o]=new Yc(a.value.value,s,l),r.push("/u_"+o);else{const i=nh(o,l,"source");n.binders[o]=new Qc(a.value,s,l,u,t,i,e.id),r.push("/a_"+o)}else if("constant"===a.value.kind)n.binders[o]=new Xc(a.value.value,s,l),r.push("/u_"+o);else if("source"===a.value.kind){const e=nh(o,l,"source");n.binders[o]=new Zc(a.value,s,l,e),r.push("/a_"+o)}else{const e=nh(o,l,"composite");n.binders[o]=new Kc(a.value,s,l,u,t,e),r.push("/z_"+o)}}return n.cacheKey=r.sort().join(""),n}populatePaintArrays(e,t,i,n,r){for(const i in this.binders)this.binders[i].populatePaintArray(e,t,n,r)}setConstantPatternPositions(e,t){for(const i in this.binders)this.binders[i].setConstantPatternPositions(e,t)}updatePaintArrays(e,t,i,n,r){let o=!1;for(const a in e){const s=t.getPositions(+a);for(const t of s){const s=i.feature(t.index);for(const i in this.binders){const l=this.binders[i];if(!(l instanceof Xc||l instanceof Yc)&&!0===l.expression.isStateDependent){const u=n.paint.get(i);l.expression=u.value,l.updatePaintArray(t.start,t.end,s,e[a],r),o=!0}}}}return o}defines(){var e=[];for(var t in this.binders)e.push.apply(e,this.binders[t].defines());return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){const i=[];for(const n in this.binders){const r=this.binders[n];for(const o of r.uniformNames)if(t[o]){const a=r.getBinding(e,t[o]);i.push({name:o,property:n,binding:a})}}return i}setUniforms(e,t,i,n){for(const{name:r,property:o,binding:a}of t)this.binders[o].setUniforms(e,a,n,i.get(o),r)}updatePatternPaintBuffers(e){const t=[];for(const i in this.binders){const n=this.binders[i];if(n instanceof Qc){const i=2===e.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;i&&t.push(i)}else(n instanceof Zc||n instanceof Kc)&&n.paintVertexBuffer&&t.push(n.paintVertexBuffer)}this._buffers=t}upload(e){for(const t in this.binders)this.binders[t].upload(e);const t=[];for(const e in this.binders){const i=this.binders[e];(i instanceof Zc||i instanceof Kc)&&i.paintVertexBuffer&&t.push(i.paintVertexBuffer)}this._buffers=t}getAttributeLocation(){for(var e=0,t={},i=0;i<this.layoutAttributes.length;i++)t[this.layoutAttributes[i].name]=i,e++;for(var n=this.getPaintVertexBuffers(),r=0;n&&r<n.length;r++)for(var o=n[r],a=0;a<o.attributes.length;a++)t[o.attributes[a].name]=e++;return t}getUniformMaps(e,t,i){for(var n in this.binders)for(var r=this.binders[n],o=0,a=r.uniformNames;o<a.length;o+=1){var s=a[o];e[s]&&r.setUniformMap(i,s,n,t)}for(var l in e)!i[l]&&l.indexOf("_t")>-1&&(i[l]=function(){return 0});return i}destroy(){for(const e in this.binders)this.binders[e].destroy()}}class eh{constructor(e,t,i,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=Jc.createDynamic(r,i,n),this.programConfigurations[r.id].layoutAttributes=e;this.needsUpload=!1,this._featureMap=new Ec,this._bufferOffset=0}populatePaintArrays(e,t,i,n,r){for(const o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(e,t,i,n,r);void 0!==t.id&&this._featureMap.add(+t.id,i,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,i,n){for(const r of i)this.needsUpload=this.programConfigurations[r.id].updatePaintArrays(e,this._featureMap,t,r,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function th(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"text-show-background":["show-background"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function ih(e){return{"line-pattern":{source:ra,composite:ra},"fill-pattern":{source:ra,composite:ra},"fill-extrusion-pattern":{source:ra,composite:ra}}[e]}function nh(e,t,i){var n={color:{source:ta,composite:ia},number:{source:Yo,composite:ta}},r=ih(e);return r&&r[i]||n[t][i]}en.register("ConstantBinder",Xc),en.register("CrossFadedConstantBinder",Yc),en.register("SourceExpressionBinder",Zc),en.register("CrossFadedCompositeBinder",Qc),en.register("CompositeExpressionBinder",Kc),en.register("ProgramConfiguration",Jc,{omit:["_buffers"]}),en.register("ProgramConfigurationSet",eh);var rh,oh=(rh=!0,function(e,t){var i=rh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return rh=!1,i}),ah=oh(void 0,(function(){return ah.toString().search("(((.+)+)+)+$").toString().constructor(ah).search("(((.+)+)+)+$")}));ah();var sh=ao([{name:"a_pos",components:2,type:"Int16"}],4),lh=sh.members,uh=ao([{name:"a_pos",components:2,type:"Float32"}],4),ch=uh.members;function hh(e,t,i,n,r){e.emplaceBack(2*t+(n+1)/2,2*i+(r+1)/2)}var dh=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this._sourceLayerIds={};var t=this;this.layerIds=this.layers.map((function(e,i){return t._sourceLayerIds[e.sourceLayer]=i,e.sourceLayer})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Bo,this.indexArray=new Qo,this.segments=new Ao,this.programConfigurations=new eh(lh,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};dh.prototype.populate=function(e,t){var i=this.layers[0],n=[],r=null;"circle"===i.type&&(r=i.layout.get("circle-sort-key"));for(var o=0,a=e;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.index,c=s.sourceLayerIndex,h=s.sourceLayerId,d=this._sourceLayerIds[h],f=this.layers[d];if(f){var p=$o/512,_=f.paint.get("circle-radius").value.value*p;if(this.layers[0]._featureFilter(new go(0),l)){var m=So(l),g=r?r.evaluate(l,{}):void 0,x={id:l.id,properties:l.properties,type:l.type,sourceLayerIndex:c,index:u,geometry:m,patterns:{},sortKey:g,circleRadius:_};n.push(x)}}}r&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var y=0,v=n;y<v.length;y+=1){var $=v[y],b=$,T=b.geometry,C=b.index,S=b.sourceLayerIndex,w=e[C].feature;this.addFeature($,T,C),t.featureIndex.insert(w,T,C,S,this.index,void 0,b.circleRadius)}},dh.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},dh.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},dh.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},dh.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=e.webgpu?ch:lh;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Tc.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},dh.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},dh.prototype.clear=function(){wa(this.layoutVertexArray)&&(this.layoutVertexArray=null),wa(this.indexArray)&&(this.indexArray=null)},dh.prototype.addFeature=function(e,t,i){for(var n=0,r=t;n<r.length;n+=1)for(var o=0,a=r[n];o<a.length;o+=1){var s=a[o],l=s.x,u=s.y;if(!(l<0||l>=$o||u<0||u>=$o)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),h=c.vertexLength;hh(this.layoutVertexArray,l,u,-1,-1),hh(this.layoutVertexArray,l,u,1,-1),hh(this.layoutVertexArray,l,u,1,1),hh(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,{})},en.register("CircleBucket",dh,{omit:["layers"]});var fh,ph=(fh=!0,function(e,t){var i=fh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return fh=!1,i}),_h=ph(void 0,(function(){return _h.toString().search("(((.+)+)+)+$").toString().constructor(_h).search("(((.+)+)+)+$")}));_h();var mh=function(e){this.specification=e};mh.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},mh.prototype.interpolate=function(e,t,i){var n=interpolate[this.specification.type];return n?n(e,t,i):e},en.register("DataConstantProperty",mh);var gh,xh=(gh=!0,function(e,t){var i=gh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return gh=!1,i}),yh=xh(void 0,(function(){return yh.toString().search("(((.+)+)+)+$").toString().constructor(yh).search("(((.+)+)+)+$")}));yh();var vh=function(e,t){this.specification=e,this.overrides=t};vh.prototype.possiblyEvaluate=function(e,t,i){return"constant"===e.expression.kind||"camera"===e.expression.kind?new $a(this,{kind:"constant",value:e.expression.evaluate(t,null,{},i)},t):new $a(this,e.expression,t)},vh.prototype.interpolate=function(e,t,i){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new $a(this,{kind:"constant",value:void 0},e.parameters);var n=interpolate[this.specification.type];return n?new $a(this,{kind:"constant",value:n(e.value.value,t.value.value,i)},e.parameters):e},vh.prototype.evaluate=function(e,t,i,n,r){return"constant"===e.kind?e.value:e.evaluate(t,i,n,r)},en.register("DataDrivenProperty",vh);var $h,bh=($h=!0,function(e,t){var i=$h?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return $h=!1,i}),Th=bh(void 0,(function(){return Th.toString().search("(((.+)+)+)+$").toString().constructor(Th).search("(((.+)+)+)+$")}));Th();var Ch=function(e,t){this.property=e,this.value=t,this.expression=ar.normalizePropertyExpression(void 0===t?e.specification.default:t,e.specification)};Ch.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Ch.prototype.possiblyEvaluate=function(e,t){return this.property.possiblyEvaluate(this,e,t)};var Sh,wh=(Sh=!0,function(e,t){var i=Sh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Sh=!1,i}),Eh=wh(void 0,(function(){return Eh.toString().search("(((.+)+)+)+$").toString().constructor(Eh).search("(((.+)+)+)+$")}));function Ph(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,i=t*e;return 4*(e<.5?i:3*(e-t)+i-.75)}Eh();var Ah=function(e,t,i,n,r){this.property=e,this.value=t,this.begin=r+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=i)};Ah.prototype.possiblyEvaluate=function(e,t){var i=e.now||0,n=this.value.possiblyEvaluate(e,t),r=this.prior;if(r){if(i>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(i<this.begin)return r.possiblyEvaluate(e,t);var o=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(r.possiblyEvaluate(e,t),n,Ph(o))}return n};const Lh=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Mh=Lh(void 0,(function(){return Mh.toString().search("(((.+)+)+)+$").toString().constructor(Mh).search("(((.+)+)+)+$")}));function Rh(e,t,i,n){const r=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),o=r(this,(function(){return o.toString().search("(((.+)+)+)+$").toString().constructor(o).search("(((.+)+)+)+$")}));o()}function Oh(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}function Dh(e,t){return-1!==e.indexOf(t,e.length-t.length)}function Ih(e,t,i){const n={};for(const r in e)n[r]=t.call(i||this,e[r],r,e);return n}function Bh(e,t,i){const n={};for(const r in e)t.call(i||this,e[r],r,e)&&(n[r]=e[r]);return n}function Fh(e){return Array.isArray(e)?e.map(Fh):"object"==typeof e&&e?Ih(e,Fh):e}function Nh(e,t){for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>=0)return!0;return!1}Mh(),Rh();const Gh={};function zh(e){Gh[e]||("undefined"!=typeof console&&console.warn(e),Gh[e]=!0)}function Uh(e,t,i){return(i.y-e.y)*(t.x-e.x)>(t.y-e.y)*(i.x-e.x)}function Vh(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function kh(e){const t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,i,n,r)=>{const o=n||r;return t[i]=!o||o.toLowerCase(),""})),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}var Wh,Hh=(Wh=!0,function(e,t){var i=Wh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Wh=!1,i}),qh=Hh(void 0,(function(){return qh.toString().search("(((.+)+)+)+$").toString().constructor(qh).search("(((.+)+)+)+$")}));qh();var jh=function(e){this.property=e,this.value=new Ch(e,void 0)};jh.prototype.transitioned=function(e,t){return new Ah(this.property,this.value,t,Oh({},e.transition,this.transition),e.now)},jh.prototype.untransitioned=function(){return new Ah(this.property,this.value,null,{},0)};var Xh,Yh=(Xh=!0,function(e,t){var i=Xh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Xh=!1,i}),Zh=Yh(void 0,(function(){return Zh.toString().search("(((.+)+)+)+$").toString().constructor(Zh).search("(((.+)+)+)+$")}));Zh();var Kh,Qh=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var i=e[t];i.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new Ch(i,void 0),r=this.defaultTransitionablePropertyValues[t]=new jh(i);this.defaultTransitioningPropertyValues[t]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}},Jh=(Kh=!0,function(e,t){var i=Kh?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Kh=!1,i}),ed=Jh(void 0,(function(){return ed.toString().search("(((.+)+)+)+$").toString().constructor(ed).search("(((.+)+)+)+$")}));function td(){}ed(),td.getMaximumPaintValue=function(e,t,i){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:i.programConfigurations.get(t.id).binders[e].maxValue},td.translateDistance=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},td.translate=function(e,t,i,n,r){if(!t||!t[0]&&!t[1])return e;var o=to.convert(t)._mult(r);"viewport"===i&&o._rotate(-n);for(var a=[],s=0;s<e.length;s++){var l=e[s];a.push(l.sub(o))}return a};var id,nd=(id=!0,function(e,t){var i=id?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return id=!1,i}),rd=nd(void 0,(function(){return rd.toString().search("(((.+)+)+)+$").toString().constructor(rd).search("(((.+)+)+)+$")}));rd();var od=function(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)};od.prototype.get=function(e){return this._values[e]};var ad,sd=(ad=!0,function(e,t){var i=ad?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ad=!1,i}),ld=sd(void 0,(function(){return ld.toString().search("(((.+)+)+)+$").toString().constructor(ld).search("(((.+)+)+)+$")}));ld();var ud=function(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)};ud.prototype.getValue=function(e){return Fh(this._values[e].value)},ud.prototype.setValue=function(e,t){this._values[e]=new Ch(this._values[e].property,null===t?void 0:Fh(t))},ud.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r)}return e},ud.prototype.possiblyEvaluate=function(e,t){for(var i=new od(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i};var cd,hd=(cd=!0,function(e,t){var i=cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return cd=!1,i}),dd=hd(void 0,(function(){return dd.toString().search("(((.+)+)+)+$").toString().constructor(dd).search("(((.+)+)+)+$")}));dd();var fd=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};fd.prototype.possiblyEvaluate=function(e,t){for(var i=new od(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i},fd.prototype.hasTransition=function(){for(var e=0,t=Object.keys(this._values);e<t.length;e+=1){var i=t[e];if(this._values[i].prior)return!0}return!1};var pd,_d=(pd=!0,function(e,t){var i=pd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return pd=!1,i}),md=_d(void 0,(function(){return md.toString().search("(((.+)+)+)+$").toString().constructor(md).search("(((.+)+)+)+$")}));md();var gd=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};gd.prototype.getValue=function(e){return Fh(this._values[e].value.value)},gd.prototype.setValue=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new jh(this._values[e].property)),this._values[e].value=new Ch(this._values[e].property,null===t?void 0:Fh(t))},gd.prototype.getTransition=function(e){return Fh(this._values[e].transition)},gd.prototype.setTransition=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new jh(this._values[e].property)),this._values[e].transition=Fh(t)||void 0},gd.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r);var o=this.getTransition(n);void 0!==o&&(e[n+"-transition"]=o)}return e},gd.prototype.transitioned=function(e,t){for(var i=new fd(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].transitioned(e,t._values[o])}return i},gd.prototype.untransitioned=function(){for(var e=new fd(this._properties),t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t];e._values[n]=this._values[n].untransitioned()}return e};var xd,yd=(xd=!0,function(e,t){var i=xd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return xd=!1,i}),vd=yd(void 0,(function(){return vd.toString().search("(((.+)+)+)+$").toString().constructor(vd).search("(((.+)+)+)+$")}));vd();var $d="-transition";function bd(e,t){if(this.id=e.id,this.type=e.type,"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new ud(t.layout)),t.paint)){for(var i in this._transitionablePaint=new gd(t.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var n in e.layout)this.setLayoutProperty(n,e.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}bd.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},bd.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},bd.prototype.setLayoutProperty=function(e,t,i){if(null!=t&&this.id,"visibility"===e)return this.visibility=t,void(this.config&&this.config.layout&&(this.config.layout.visibility=t));this._unevaluatedLayout.setValue(e,t)},bd.prototype.getPaintProperty=function(e){return Dh(e,$d)?this._transitionablePaint.getTransition(e.slice(0,-$d.length)):this._transitionablePaint.getValue(e)},bd.prototype.setPaintProperty=function(e,t,i){if(null!=t&&this.id,Dh(e,$d))return this._transitionablePaint.setTransition(e.slice(0,-$d.length),t||void 0),!1;var n=this._transitionablePaint._values[e],r="cross-faded-data-driven"===n.property.specification["property-type"],o=n.value.isDataDriven(),a=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var s=this._transitionablePaint._values[e].value;return s.isDataDriven()||o||r||this._handleOverridablePaintPropertyUpdate(e,a,s)},bd.prototype._handleSpecialPaintPropertyUpdate=function(e){},bd.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!1},bd.prototype.isHidden=function(e){return!!(this.minzoom&&e<this.minzoom)||!!(this.maxzoom&&e>=this.maxzoom)||"none"===this.visibility},bd.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},bd.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},bd.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,t)},bd.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),Bh(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},bd.prototype._validate=function(e,t,i,n,r){return!0},bd.prototype.is3D=function(){return!1},bd.prototype.isTileClipped=function(){return!1},bd.prototype.hasOffscreenPass=function(){return!1},bd.prototype.resize=function(){},bd.prototype.isStateDependent=function(){return!0};var Td,Cd=(Td=!0,function(e,t){var i=Td?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Td=!1,i}),Sd=Cd(void 0,(function(){return Sd.toString().search("(((.+)+)+)+$").toString().constructor(Sd).search("(((.+)+)+)+$")}));Sd();var wd,Ed=8,Pd={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},Ad={"*":{type:"source"}},Ld=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Md={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},Rd={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},Od={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},Dd={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},Id={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Bd={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Fd={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Nd=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Gd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},zd={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ud={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Vd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},kd={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Wd={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Hd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},qd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},jd={type:"array",value:"*"},Xd={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},Yd={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Zd={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Kd={type:"array",value:"*",minimum:1},Qd={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},Jd={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},ef=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],tf={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},nf={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},rf={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},of={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},af={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-show-background":{type:"boolean",default:!1,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},sf={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},lf={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},uf={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},cf={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},hf={$version:Ed,$root:Pd,sources:Ad,source:Ld,source_vector:Md,source_raster:Rd,source_raster_dem:Od,source_geojson:Dd,source_video:Id,source_image:Bd,layer:Fd,layout:Nd,layout_background:Gd,layout_fill:zd,layout_circle:Ud,layout_heatmap:Vd,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:kd,layout_symbol:Wd,layout_raster:Hd,layout_hillshade:qd,filter:jd,filter_operator:Xd,geometry_type:Yd,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:Zd,expression:Kd,expression_name:Qd,light:Jd,paint:ef,paint_fill:tf,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:nf,paint_circle:rf,paint_heatmap:of,paint_symbol:af,paint_raster:sf,paint_hillshade:lf,paint_background:uf,transition:cf,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},df=(wd=!0,function(e,t){var i=wd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wd=!1,i}),ff=df(void 0,(function(){return ff.toString().search("(((.+)+)+)+$").toString().constructor(ff).search("(((.+)+)+)+$")}));function pf(){}function _f(e,t,i){if(e.length>1){if(mf(e,t))return!0;for(var n=0;n<t.length;n++)if(xf(t[n],e,i))return!0}for(var r=0;r<e.length;r++)if(xf(e[r],t,i))return!0;return!1}function mf(e,t){if(0===e.length||0===t.length)return!1;for(var i=0;i<e.length-1;i++)for(var n=e[i],r=e[i+1],o=0;o<t.length-1;o++)if(gf(n,r,t[o],t[o+1]))return!0;return!1}function gf(e,t,i,n){return Uh(e,i,n)!==Uh(t,i,n)&&Uh(e,t,i)!==Uh(e,t,n)}function xf(e,t,i){var n=i*i;if(1===t.length)return e.distSqr(t[0])<n;for(var r=1;r<t.length;r++){var o=t[r-1],a=t[r];if(pf.distToSegmentSquared(e,o,a)<n)return!0}return!1}function yf(e,t){for(var i,n,r,o=!1,a=0;a<e.length;a++)for(var s=0,l=(i=e[a]).length-1;s<i.length;l=s++)n=i[s],r=i[l],n.y>t.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(o=!o);return o}function vf(e,t){for(var i=!1,n=0,r=e.length-1;n<e.length;r=n++){var o=e[n],a=e[r];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}ff(),pf.polygonIntersectsPolygon=function(e,t){for(var i=0;i<e.length;i++)if(vf(t,e[i]))return!0;for(var n=0;n<t.length;n++)if(vf(e,t[n]))return!0;return!!mf(e,t)},pf.polygonIntersectsBufferedPoint=function(e,t,i){return!!vf(e,t)||!!xf(t,e,i)},pf.polygonIntersectsMultiPolygon=function(e,t){if(1===e.length)return yf(t,e[0]);for(var i=0;i<t.length;i++)for(var n=t[i],r=0;r<n.length;r++)if(vf(e,n[r]))return!0;for(var o=0;o<e.length;o++)if(yf(t,e[o]))return!0;for(var a=0;a<t.length;a++)if(mf(e,t[a]))return!0;return!1},pf.polygonIntersectsBufferedMultiLine=function(e,t,i){for(var n=0;n<t.length;n++){var r=t[n];if(e.length>=3)for(var o=0;o<r.length;o++)if(vf(e,r[o]))return!0;if(_f(e,r,i))return!0}return!1},pf.distToSegmentSquared=function(e,t,i){var n=t.distSqr(i);if(0===n)return e.distSqr(t);var r=((e.x-t.x)*(i.x-t.x)+(e.y-t.y)*(i.y-t.y))/n;return r<0?e.distSqr(t):r>1?e.distSqr(i):e.distSqr(i.sub(t)._mult(r)._add(t))},pf.polygonIntersectPoint=function(e,t){return vf(e,t)};var $f=new Qh({"circle-sort-key":new vh(hf.layout_circle["circle-sort-key"])}),bf=new Qh({"circle-radius":new vh(hf.paint_circle["circle-radius"]),"circle-color":new vh(hf.paint_circle["circle-color"]),"circle-blur":new vh(hf.paint_circle["circle-blur"]),"circle-opacity":new vh(hf.paint_circle["circle-opacity"]),"circle-translate":new mh(hf.paint_circle["circle-translate"]),"circle-translate-anchor":new mh(hf.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new mh(hf.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new mh(hf.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new vh(hf.paint_circle["circle-stroke-width"]),"circle-stroke-color":new vh(hf.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new vh(hf.paint_circle["circle-stroke-opacity"])}),Tf={paint:bf,layout:$f},Cf=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Tf)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.createBucket=function(e){return new dh(e)},r.prototype.queryRadius=function(e){var t=e;return td.getMaximumPaintValue("circle-radius",this,t)+td.getMaximumPaintValue("circle-stroke-width",this,t)+td.translateDistance(this.paint.get("circle-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a,s,l){s=Ef();for(var u=td.translate(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),0,a),c=this.paint.get("circle-radius")?.evaluate(t,i),h=this.paint.get("circle-stroke-width")?.evaluate(t,i),d=c+h,f="map"===this.paint.get("circle-pitch-alignment"),p=f?u:wf(u,s),_=f?d*a:d,m=0,g=n;m<g.length;m+=1)for(var x=0,y=g[m];x<y.length;x+=1){var v=y[x],$=f?v:Sf(v,s),b=_;if(Pf([],[v.x,v.y,0,1],s),"viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")||"map"===this.paint.get("circle-pitch-scale")&&this.paint.get("circle-pitch-alignment"),l=wa(l)?l:10,pf.polygonIntersectsBufferedPoint(p,$,b*l))return!0}return!1},r}(bd);function Sf(e,t){var i=Pf([],[e.x,e.y,0,1],t);return new to(i[0],i[1])}function wf(e,t){return e.map((function(e){return Sf(e,t)}))}function Ef(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function Pf(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,e[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,e[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,e[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,e}function Af(e,t,i,n,r){Lf(e,t,i||0,n||e.length-1,r||Rf)}function Lf(e,t,i,n,r){for(;n>i;){if(n-i>600){var o=n-i+1,a=t-i+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);Lf(e,t,Math.max(i,Math.floor(t-a*l/o+u)),Math.min(n,Math.floor(t+(o-a)*l/o+u)),r)}var c=e[t],h=i,d=n;for(Mf(e,i,t),r(e[n],c)>0&&Mf(e,i,n);h<d;){for(Mf(e,h,d),h++,d--;r(e[h],c)<0;)h++;for(;r(e[d],c)>0;)d--}0===r(e[i],c)?Mf(e,i,d):Mf(e,++d,n),d<=t&&(i=d+1),t<=d&&(n=d-1)}}function Mf(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Rf(e,t){return e<t?-1:e>t?1:0}var Of,Df=(Of=!0,function(e,t){var i=Of?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Of=!1,i}),If=Df(void 0,(function(){return If.toString().search("(((.+)+)+)+$").toString().constructor(If).search("(((.+)+)+)+$")}));function Bf(e){for(var t=0,i=0,n=e.length,r=n-1,o=void 0,a=void 0;i<n;r=i++)o=e[i],t+=((a=e[r]).x-o.x)*(o.y+a.y);return t}function Ff(e,t){var i=e.length;if(i<=1)return[e];for(var n,r,o=[],a=0;a<i;a++){var s=Bf(e[a]);0!==s&&(e[a].area=Math.abs(s),void 0===r&&(r=s<0),r===s<0?(n&&o.push(n),n=[e[a]]):n.push(e[a]))}if(n&&o.push(n),t>1)for(var l=0;l<o.length;l++)o[l].length<=t||(Af(o[l],t,1,o[l].length-1,Nf),o[l]=o[l].slice(0,t));return o}function Nf(e,t){return t.area-e.area}function Gf(e,t,i){i=i||2;var n,r,o,a,s,l,u,c=t&&t.length,h=c?t[0]*i:e.length,d=zf(e,0,h,i,!0),f=[];if(!d||d.next===d.prev)return f;if(c&&(d=jf(e,t,d,i)),e.length>80*i){n=o=e[0],r=a=e[1];for(var p=i;p<h;p+=i)(s=e[p])<n&&(n=s),(l=e[p+1])<r&&(r=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-r))?1/u:0}return Vf(d,f,i,n,r,u),f}function zf(e,t,i,n,r){var o,a;if(r===mp(e,t,i,n)>0)for(o=t;o<i;o+=n)a=fp(o,e[o],e[o+1],a);else for(o=i-n;o>=t;o-=n)a=fp(o,e[o],e[o+1],a);return a&&op(a,a.next)&&(pp(a),a=a.next),a}function Uf(e,t){if(!e)return e;t||(t=e);var i,n=e;do{if(i=!1,n.steiner||!op(n,n.next)&&0!==rp(n.prev,n,n.next))n=n.next;else{if(pp(n),(n=t=n.prev)===n.next)break;i=!0}}while(i||n!==t);return t}function Vf(e,t,i,n,r,o,a){if(e){!a&&o&&Qf(e,n,r,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?Wf(e,n,r,o):kf(e))t.push(s.i/i),t.push(e.i/i),t.push(l.i/i),pp(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?Vf(e=Hf(Uf(e),t,i),t,i,n,r,o,2):2===a&&qf(e,t,i,n,r,o):Vf(Uf(e),t,i,n,r,o,1);break}}}function kf(e){var t=e.prev,i=e,n=e.next;if(rp(t,i,n)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(ip(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&rp(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Wf(e,t,i,n){var r=e.prev,o=e,a=e.next;if(rp(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,l=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,u=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=ep(s,l,t,i,n),d=ep(u,c,t,i,n),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&rp(f.prev,f,f.next)>=0||(f=f.prevZ,p!==e.prev&&p!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&rp(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&rp(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&ip(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&rp(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Hf(e,t,i){var n=e;do{var r=n.prev,o=n.next.next;!op(r,o)&&ap(r,n,n.next,o)&&cp(r,o)&&cp(o,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(o.i/i),pp(n),pp(n.next),n=e=o),n=n.next}while(n!==e);return Uf(n)}function qf(e,t,i,n,r,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&np(a,s)){var l=dp(a,s);return a=Uf(a,a.next),l=Uf(l,l.next),Vf(a,t,i,n,r,o),void Vf(l,t,i,n,r,o)}s=s.next}a=a.next}while(a!==e)}function jf(e,t,i,n){var r,o,a,s=[];for(r=0,o=t.length;r<o;r++)(a=zf(e,t[r]*n,r<o-1?t[r+1]*n:e.length,n,!1))===a.next&&(a.steiner=!0),s.push(tp(a));for(s.sort(Xf),r=0;r<s.length;r++)Yf(s[r],i),i=Uf(i,i.next);return i}function Xf(e,t){return e.x-t.x}function Yf(e,t){if(t=Zf(e,t)){var i=dp(t,e);Uf(i,i.next)}}function Zf(e,t){var i,n=t,r=e.x,o=e.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if(a=s,s===r){if(o===n.y)return n;if(o===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!i)return null;if(r===a)return i;var l,u=i,c=i.x,h=i.y,d=1/0;n=i;do{r>=n.x&&n.x>=c&&r!==n.x&&ip(o<h?r:a,o,c,h,o<h?a:r,o,n.x,n.y)&&(l=Math.abs(o-n.y)/(r-n.x),cp(n,e)&&(l<d||l===d&&(n.x>i.x||n.x===i.x&&Kf(i,n)))&&(i=n,d=l)),n=n.next}while(n!==u);return i}function Kf(e,t){return rp(e.prev,e,t.prev)<0&&rp(t.next,e,e.next)<0}function Qf(e,t,i,n){var r=e;do{null===r.z&&(r.z=ep(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,Jf(r)}function Jf(e){var t,i,n,r,o,a,s,l,u=1;do{for(i=e,e=null,o=null,a=0;i;){for(a++,n=i,s=0,t=0;t<u&&(s++,n=n.nextZ);t++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=n}o.nextZ=null,u*=2}while(a>1);return e}function ep(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function tp(e){var t=e,i=e;do{(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next}while(t!==e);return i}function ip(e,t,i,n,r,o,a,s){return(r-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(n-s)-(i-a)*(t-s)>=0&&(i-a)*(o-s)-(r-a)*(n-s)>=0}function np(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!up(e,t)&&(cp(e,t)&&cp(t,e)&&hp(e,t)&&(rp(e.prev,e,t.prev)||rp(e,t.prev,t))||op(e,t)&&rp(e.prev,e,e.next)>0&&rp(t.prev,t,t.next)>0)}function rp(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function op(e,t){return e.x===t.x&&e.y===t.y}function ap(e,t,i,n){var r=lp(rp(e,t,i)),o=lp(rp(e,t,n)),a=lp(rp(i,n,e)),s=lp(rp(i,n,t));return!!(r!==o&&a!==s||0===r&&sp(e,i,t)||0===o&&sp(e,n,t)||0===a&&sp(i,e,n)||0===s&&sp(i,t,n))}function sp(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function lp(e){return e>0?1:e<0?-1:0}function up(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&ap(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function cp(e,t){return rp(e.prev,e,e.next)<0?rp(e,t,e.next)>=0&&rp(e,e.prev,t)>=0:rp(e,t,e.prev)<0||rp(e,e.next,t)<0}function hp(e,t){var i=e,n=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}function dp(e,t){var i=new _p(e.i,e.x,e.y),n=new _p(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function fp(e,t,i,n){var r=new _p(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function pp(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _p(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function mp(e,t,i,n){for(var r=0,o=t,a=i-n;o<i;o+=n)r+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return r}If(),Gf.deviation=function(e,t,i,n){var r=t&&t.length,o=r?t[0]*i:e.length,a=Math.abs(mp(e,0,o,i));if(r)for(var s=0,l=t.length;s<l;s++){var u=t[s]*i,c=s<l-1?t[s+1]*i:e.length;a-=Math.abs(mp(e,u,c,i))}var h=0;for(s=0;s<n.length;s+=3){var d=n[s]*i,f=n[s+1]*i,p=n[s+2]*i;h+=Math.abs((e[d]-e[p])*(e[f+1]-e[d+1])-(e[d]-e[f])*(e[p+1]-e[d+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},Gf.flatten=function(e){for(var t=e[0][0].length,i={vertices:[],holes:[],dimensions:t},n=0,r=0;r<e.length;r++){for(var o=0;o<e[r].length;o++)for(var a=0;a<t;a++)i.vertices.push(e[r][o][a]);r>0&&(n+=e[r-1].length,i.holes.push(n))}return i};var gp,xp=(gp=!0,function(e,t){var i=gp?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return gp=!1,i}),yp=xp(void 0,(function(){return yp.toString().search("(((.+)+)+)+$").toString().constructor(yp).search("(((.+)+)+)+$")}));function vp(e,t,i,n,r){for(var o=r.patternDependencies,a=0,s=t;a<s.length;a+=1){var l=s[a],u=l.paint.get(e+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:n-1},i,{},r.availableImages),h=u.evaluate({zoom:n},i,{},r.availableImages),d=u.evaluate({zoom:n+1},i,{},r.availableImages);c=c&&c.name?c.name:c,h=h&&h.name?h.name:h,d=d&&d.name?d.name:d,o[c]=!0,o[h]=!0,o[d]=!0,i.patterns[l.id]={min:c,mid:h,max:d}}}return i}yp();var $p,bp=($p=!0,function(e,t){var i=$p?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return $p=!1,i}),Tp=bp(void 0,(function(){return Tp.toString().search("(((.+)+)+)+$").toString().constructor(Tp).search("(((.+)+)+)+$")}));function Cp(e,t,i){for(var n=i.patternDependencies,r=!1,o=0,a=t;o<a.length;o+=1){var s=a[o].paint.get(e+"-pattern");!s.isConstant()&&(r=!0);var l=s.constantOr(null);l&&(r=!0,n[l.to]=!0,n[l.from]=!0)}return r}if(Tp(),typeof WebAssembly<"u"){let e=function(e){return wp.locateFile?wp.locateFile(e,Dp):Dp+e},t=function(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1)},i=function(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return Hp[e>>0];case"i16":return jp[e>>1];case"i32":case"i64":return Xp[e>>2];case"float":return Zp[e>>2];case"double":return Kp[e>>3];default:de("invalid type for getValue: "+t)}return null},n=function(e,t){e||de("Assertion failed: "+t)},r=function(e){var t=wp["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=k_(i),c(e,t,i)}return t},array:function(e){var t=k_(e.length);return h(e,t),t}},u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p<o.length;p++){var _=s[i[p]];_?(0===f&&(f=H_()),d[p]=_(o[p])):d[p]=o[p]}var m=u.apply(null,d);return m=function(e){return"string"===t?l(e):"boolean"===t?Boolean(e):e}(m),0!==f&&W_(f),m},a=function(e,t,i,n){return function(){return o(e,t,i,arguments)}},s=function(e,i,n){for(var r=i+n,o=i;e[o]&&!(o>=r);)++o;if(o-i>16&&e.subarray&&kp)return kp.decode(e.subarray(i,o));for(var a="";i<o;){var s=e[i++];if(128&s){var l=63&e[i++];if(192!=(224&s)){var u=63&e[i++];if(224==(240&s)?s=(15&s)<<12|l<<6|u:(240!=(248&s)&&t("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),s=(7&s)<<18|l<<12|u<<6|63&e[i++]),s<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(qp,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343&&(l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s)),l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,qp,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),Hp.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e==e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return wp.extraStackTrace&&(e+="\n"+wp.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){wp.HEAP8=Hp=new Int8Array(Wp),wp.HEAP16=jp=new Int16Array(Wp),wp.HEAP32=Xp=new Int32Array(Wp),wp.HEAPU8=qp=new Uint8Array(Wp),wp.HEAPU16=new Uint16Array(Wp),wp.HEAPU32=Yp=new Uint32Array(Wp),wp.HEAPF32=Zp=new Float32Array(Wp),wp.HEAPF64=Kp=new Float64Array(Wp)},g=function(){n(0==(3&e_)),Yp[(e_>>2)-1]=34821223,Yp[(e_>>2)-2]=2310721022},x=function(){(34821223!=Yp[(e_>>2)-1]||2310721022!=Yp[(e_>>2)-2])&&de("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+Yp[(e_>>2)-2].toString(16)+" "+Yp[(e_>>2)-1].toString(16)),1668509029!==Xp[0]&&de("Runtime error: The application has corrupted its heap memory area (address zero)!")},y=function(e){de("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(e_-H_()+e)+" bytes available!")},v=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?wp.dynCall_v(i):wp.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},$=function(){if(wp.preRun)for("function"==typeof wp.preRun&&(wp.preRun=[wp.preRun]);wp.preRun.length;)S(wp.preRun.shift());v(o_)},b=function(){x(),!u_&&(u_=!0,v(a_))},T=function(){x(),v(s_)},C=function(){if(x(),wp.postRun)for("function"==typeof wp.postRun&&(wp.postRun=[wp.postRun]);wp.postRun.length;)w(wp.postRun.shift());v(l_)},S=function(e){o_.unshift(e)},w=function(e){l_.unshift(e)},E=function(e){h_++,wp.monitorRunDependencies&&wp.monitorRunDependencies(h_),e&&(n(!p_[e]),p_[e]=1,null===d_&&typeof setInterval<"u"&&(d_=setInterval((function(){if(Vp)return clearInterval(d_),void(d_=null)}),1e4)))},P=function(e){if(h_--,wp.monitorRunDependencies&&wp.monitorRunDependencies(h_),e&&(n(p_[e]),delete p_[e]),0==h_&&(null!==d_&&(clearInterval(d_),d_=null),f_)){var t=f_;f_=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(g_):0===e.indexOf(g_)},L=function(){try{if(wp.wasmBinary)return new Uint8Array(wp.wasmBinary);if(wp.readBinary)return wp.readBinary(m_);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}},M=function(){return wp.wasmBinary||!Pp&&!Ap||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(m_,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+m_+"'";return e.arrayBuffer()})).catch((function(){return L()}))},R=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Fp};function i(e,t){var i=e.exports;wp.asm=i,P("wasm-instantiate")}E("wasm-instantiate");var r=wp;function o(e){n(wp===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(wp.instantiateWasm)try{return wp.instantiateWasm(t,i)}catch{return!1}return function(){if(wp.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(m_)||"function"!=typeof fetch)return a(o);fetch(m_,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},O=function(e){return V_(e)},D=function(e){e&&v_[e].refcount++},I=function(e){if(!e||v_[e])return e;for(var t in v_)for(var i=+t,n=v_[i].adjusted,r=n.length,o=0;o<r;o++)if(n[o]===e)return i;return e},B=function(e){var t=v_[e];return t&&!t.caught&&(t.caught=!0,U_.uncaught_exception--),t&&(t.rethrown=!1),$_.push(e),D(I(e)),e},F=function(e,t,i){throw v_[e]={ptr:e,adjusted:[e],type:t,destructor:i,refcount:0,caught:!1,rethrown:!1},"uncaught_exception"in U_?U_.uncaught_exception++:U_.uncaught_exception=1,e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."},N=function(){return!!U_.uncaught_exception},G=function(){},z=function(){},U=function(e,t){b_.varargs=t;try{return b_.getStreamFromFD(),b_.get(),b_.get(),b_.get(),b_.get(),de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},V=function(){var e=wp._fflush;e&&e(0);var t=b_.buffers;t[1].length&&b_.printChar(1,10),t[2].length&&b_.printChar(2,10)},k=function(e,t){b_.varargs=t;try{for(var i=b_.get(),n=b_.get(),r=b_.get(),o=0,a=0;a<r;a++){for(var s=Xp[n+8*a>>2],l=Xp[n+(8*a+4)>>2],u=0;u<l;u++)b_.printChar(i,qp[s+u]);o+=l}return o}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},W=function(e,t){b_.varargs=t;try{return 0}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},H=function(e,t){b_.varargs=t;try{return b_.getStreamFromFD(),de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof __>"u"||!(e instanceof __.ErrnoError))&&de(e),-e.errno}},q=function(){},j=function(){wp.abort()},X=function(){return Hp.length},Y=function(e,t,i){qp.set(qp.subarray(t,t+i),e)},Z=function(e){if(!wp.___errno_location)return e;Xp[wp.___errno_location()>>2]=e},K=function(e){de("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+Hp.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},Q=function(e){e=_(e,65536);var t=Wp.byteLength;try{return-1!==Up.grow((e-t)/65536)&&(Wp=Up.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},J=function(e){var i=X();n(e>i);var r=65536,o=2147418112;if(e>o)return!1;for(var a=Math.max(i,16777216);a<e;)(a=a<=536870912?_(2*a,r):Math.min(_((3*a+2147483648)/4,r),o))===i&&t("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+Hp.length);return!!Q(a)&&(m(),!0)},ee=function(e){Bp("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},te=function(e){Bp("Invalid function pointer called with signature 'iidiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},ie=function(e){Bp("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},ne=function(e){Bp("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},re=function(e){Bp("Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},oe=function(e){Bp("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},ae=function(e){Bp("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},se=function(e){Bp("Invalid function pointer called with signature 'viiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},le=function(e){Bp("Invalid function pointer called with signature 'viiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},ue=function(e){Bp("Invalid function pointer called with signature 'viiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Bp("Build with ASSERTIONS=2 for more info."),de(e)},ce=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},he=function(e){function t(){wp.calledRun||(wp.calledRun=!0,!Vp&&(b(),T(),wp.onRuntimeInitialized&&wp.onRuntimeInitialized(),n(!wp._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),C()))}e=e||wp.arguments,h_>0||(g(),$(),h_>0)||wp.calledRun||(wp.setStatus?(wp.setStatus("Running..."),setTimeout((function(){setTimeout((function(){wp.setStatus("")}),1),t()}),1)):t(),x())},de=function(e){wp.onAbort&&wp.onAbort(e),Vp=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw q_&&q_.forEach((function(i){t=i(t,e)})),t};var Sp,wp=typeof wp<"u"?wp:{},Ep={};for(Sp in wp)wp.hasOwnProperty(Sp)&&(Ep[Sp]=wp[Sp]);wp.arguments=[],wp.thisProgram="./this.program",wp.quit=function(e,t){throw t},wp.preRun=[],wp.postRun=[];var Pp=!1,Ap=!1,Lp=!1,Mp=!1;if(Pp="object"==typeof window,Ap="function"==typeof importScripts,Lp="object"==typeof process&&"function"==typeof require&&!Pp&&!Ap,Mp=!Pp&&!Lp&&!Ap,wp.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var Rp,Op,Dp="";if(Lp)Dp=__dirname+"/",wp.read=function(e,t){var i;return Rp||(Rp=require("fs")),Op||(Op=require("path")),e=Op.normalize(e),i=Rp.readFileSync(e),t?i:i.toString()},wp.readBinary=function(e){var t=wp.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(wp.thisProgram=process.argv[1].replace(/\\/g,"/")),wp.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=wp),process.on("uncaughtException",(function(e){if(!(e instanceof ce))throw e})),process.on("unhandledRejection",de),wp.quit=function(e){process.exit(e)},wp.inspect=function(){return"[Emscripten Module object]"};else if(Mp)typeof read<"u"&&(wp.read=function(e){return read(e)}),wp.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?wp.arguments=scriptArgs:typeof arguments<"u"&&(wp.arguments=arguments),"function"==typeof quit&&(wp.quit=function(e){quit(e)});else{if(!Pp&&!Ap)throw new Error("environment detection error");Ap?Dp=self.location.href:document.currentScript&&(Dp=document.currentScript.src),Dp=0!==Dp.indexOf("blob:")?Dp.substr(0,Dp.lastIndexOf("/")+1):"",wp.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},Ap&&(wp.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),wp.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},wp.setWindowTitle=function(e){document.title=e}}var Ip=wp.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),Bp=wp.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||Ip);for(Sp in Ep)Ep.hasOwnProperty(Sp)&&(wp[Sp]=Ep[Sp]);Ep=void 0,n(typeof wp.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof wp.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof wp.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof wp.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),H_=W_=k_=function(){de("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Fp={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var Np=0,Gp=function(e){Np=e},zp=function(){return Np};"object"!=typeof WebAssembly&&de("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Up,Vp=!1,kp=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Wp,Hp,qp,jp,Xp,Yp,Zp,Kp,Qp=65536,Jp=5872,e_=5248752,t_=5248752,i_=5840;n(Jp%16==0,"stack must start aligned"),n(t_%16==0,"heap must start aligned");var n_=5242880;wp.TOTAL_STACK&&n(n_===wp.TOTAL_STACK,"the stack size can no longer be determined at runtime");var r_=wp.TOTAL_MEMORY||16777216;if(r_<n_&&Bp("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+r_+"! (TOTAL_STACK="+n_+")"),n(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),wp.buffer?(Wp=wp.buffer,n(Wp.byteLength===r_,"provided buffer should be "+r_+" bytes, but it is "+Wp.byteLength)):("object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(n(r_%Qp==0),Up=new WebAssembly.Memory({initial:r_/Qp}),Wp=Up.buffer):Wp=new ArrayBuffer(r_),n(Wp.byteLength===r_)),m(),Xp[i_>>2]=t_,Xp[0]=1668509029,jp[1]=25459,115!==qp[2]||99!==qp[3])throw"Runtime error: expected the system to be little-endian!";var o_=[],a_=[],s_=[],l_=[],u_=!1,c_=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var h_=0,d_=null,f_=null,p_={};wp.preloadedImages={},wp.preloadedAudios={};var __={error:function(){de("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){__.error()},createDataFile:function(){__.error()},createPreloadedFile:function(){__.error()},createLazyFile:function(){__.error()},open:function(){__.error()},mkdev:function(){__.error()},registerDevice:function(){__.error()},analyzePath:function(){__.error()},loadFilesFromDB:function(){__.error()},ErrnoError:function(){__.error()}};wp.FS_createDataFile=__.createDataFile,wp.FS_createPreloadedFile=__.createPreloadedFile;var m_,g_="data:application/octet-stream;base64,",x_=typeof window>"u"?self:window;m_=x_.location.href.endsWith(".openrealspace")?"../../static/Build/SuperMap3D/ThirdParty/earcut.wasm":"ThirdParty/earcut.wasm",A(m_)||(m_=e(m_)),wp.asm=function(e,t,i){t.memory=Up,t.table=new WebAssembly.Table({initial:260,maximum:260,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=R(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var y_=5856;n(y_%8==0);var v_={},$_=[],b_={buffers:[null,[],[]],printChar:function(e,t){var i=b_.buffers[e];n(i),0===t||10===t?((1===e?Ip:Bp)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return b_.varargs+=4,Xp[b_.varargs-4>>2]},getStr:function(){return l(b_.get())},get64:function(){var e=b_.get(),t=b_.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===b_.get())}},T_={},C_={abort:de,setTempRet0:Gp,getTempRet0:zp,abortStackOverflow:y,nullFunc_ii:ee,nullFunc_iidiiii:te,nullFunc_iiii:ie,nullFunc_jiji:ne,nullFunc_v:re,nullFunc_vi:oe,nullFunc_vii:ae,nullFunc_viiii:se,nullFunc_viiiii:le,nullFunc_viiiiii:ue,___cxa_allocate_exception:O,___cxa_begin_catch:B,___cxa_throw:F,___cxa_uncaught_exception:N,___exception_addRef:D,___exception_deAdjust:I,___gxx_personality_v0:G,___lock:z,___setErrNo:Z,___syscall140:U,___syscall146:k,___syscall54:W,___syscall6:H,___unlock:q,_abort:j,_emscripten_get_heap_size:X,_emscripten_memcpy_big:Y,_emscripten_resize_heap:J,abortOnCannotGrowMemory:K,emscripten_realloc_buffer:Q,flush_NO_FILESYSTEM:V,tempDoublePtr:y_,DYNAMICTOP_PTR:i_},S_=wp.asm(T_,C_,Wp),w_=S_.__ZSt18uncaught_exceptionv;S_.__ZSt18uncaught_exceptionv=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),w_.apply(null,arguments)};var E_=S_.___cxa_can_catch;S_.___cxa_can_catch=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),E_.apply(null,arguments)};var P_=S_.___cxa_is_pointer_type;S_.___cxa_is_pointer_type=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),P_.apply(null,arguments)};var A_=S_.___errno_location;S_.___errno_location=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),A_.apply(null,arguments)};var L_=S_._earcut;S_._earcut=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),L_.apply(null,arguments)};var M_=S_._fflush;S_._fflush=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),M_.apply(null,arguments)};var R_=S_._free;S_._free=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),R_.apply(null,arguments)};var O_=S_._llvm_maxnum_f64;S_._llvm_maxnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),O_.apply(null,arguments)};var D_=S_._llvm_minnum_f64;S_._llvm_minnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),D_.apply(null,arguments)};var I_=S_._malloc;S_._malloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),I_.apply(null,arguments)};var B_=S_._sbrk;S_._sbrk=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),B_.apply(null,arguments)};var F_=S_.establishStackSpace;S_.establishStackSpace=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),F_.apply(null,arguments)};var N_=S_.stackAlloc;S_.stackAlloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),N_.apply(null,arguments)};var G_=S_.stackRestore;S_.stackRestore=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),G_.apply(null,arguments)};var z_=S_.stackSave;S_.stackSave=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),z_.apply(null,arguments)},wp.asm=S_;var U_=wp.__ZSt18uncaught_exceptionv=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.__ZSt18uncaught_exceptionv.apply(null,arguments)};wp.___cxa_can_catch=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.___cxa_can_catch.apply(null,arguments)},wp.___cxa_is_pointer_type=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.___cxa_is_pointer_type.apply(null,arguments)},wp.___errno_location=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.___errno_location.apply(null,arguments)},wp._earcut=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._earcut.apply(null,arguments)},wp._emscripten_replace_memory=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._emscripten_replace_memory.apply(null,arguments)},wp._fflush=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._fflush.apply(null,arguments)},wp._free=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._free.apply(null,arguments)},wp._llvm_maxnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._llvm_maxnum_f64.apply(null,arguments)},wp._llvm_minnum_f64=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._llvm_minnum_f64.apply(null,arguments)};var V_=wp._malloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._malloc.apply(null,arguments)};wp._memcpy=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._memcpy.apply(null,arguments)},wp._memset=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._memset.apply(null,arguments)},wp._sbrk=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm._sbrk.apply(null,arguments)},wp.establishStackSpace=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.establishStackSpace.apply(null,arguments)};var k_=wp.stackAlloc=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.stackAlloc.apply(null,arguments)},W_=wp.stackRestore=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.stackRestore.apply(null,arguments)},H_=wp.stackSave=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.stackSave.apply(null,arguments)};wp.dynCall_ii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_ii.apply(null,arguments)},wp.dynCall_iidiiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_iidiiii.apply(null,arguments)},wp.dynCall_iiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_iiii.apply(null,arguments)},wp.dynCall_jiji=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_jiji.apply(null,arguments)},wp.dynCall_v=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_v.apply(null,arguments)},wp.dynCall_vi=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_vi.apply(null,arguments)},wp.dynCall_vii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_vii.apply(null,arguments)},wp.dynCall_viiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_viiii.apply(null,arguments)},wp.dynCall_viiiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_viiiii.apply(null,arguments)},wp.dynCall_viiiiii=function(){return n(u_,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!c_,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wp.asm.dynCall_viiiiii.apply(null,arguments)},wp.asm=S_,wp.intArrayFromString||(wp.intArrayFromString=function(){de("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.intArrayToString||(wp.intArrayToString=function(){de("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.ccall=o,wp.cwrap=a,wp.setValue||(wp.setValue=function(){de("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getValue=i,wp.allocate||(wp.allocate=function(){de("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getMemory||(wp.getMemory=function(){de("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.AsciiToString||(wp.AsciiToString=function(){de("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToAscii||(wp.stringToAscii=function(){de("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF8ArrayToString||(wp.UTF8ArrayToString=function(){de("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF8ToString||(wp.UTF8ToString=function(){de("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF8Array||(wp.stringToUTF8Array=function(){de("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF8||(wp.stringToUTF8=function(){de("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.lengthBytesUTF8||(wp.lengthBytesUTF8=function(){de("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF16ToString||(wp.UTF16ToString=function(){de("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF16||(wp.stringToUTF16=function(){de("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.lengthBytesUTF16||(wp.lengthBytesUTF16=function(){de("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.UTF32ToString||(wp.UTF32ToString=function(){de("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stringToUTF32||(wp.stringToUTF32=function(){de("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.lengthBytesUTF32||(wp.lengthBytesUTF32=function(){de("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.allocateUTF8||(wp.allocateUTF8=function(){de("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackTrace||(wp.stackTrace=function(){de("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnPreRun||(wp.addOnPreRun=function(){de("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnInit||(wp.addOnInit=function(){de("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnPreMain||(wp.addOnPreMain=function(){de("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnExit||(wp.addOnExit=function(){de("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addOnPostRun||(wp.addOnPostRun=function(){de("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.writeStringToMemory||(wp.writeStringToMemory=function(){de("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.writeArrayToMemory||(wp.writeArrayToMemory=function(){de("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.writeAsciiToMemory||(wp.writeAsciiToMemory=function(){de("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addRunDependency||(wp.addRunDependency=function(){de("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.removeRunDependency||(wp.removeRunDependency=function(){de("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.ENV||(wp.ENV=function(){de("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.FS||(wp.FS=function(){de("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.FS_createFolder||(wp.FS_createFolder=function(){de("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createPath||(wp.FS_createPath=function(){de("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createDataFile||(wp.FS_createDataFile=function(){de("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createPreloadedFile||(wp.FS_createPreloadedFile=function(){de("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createLazyFile||(wp.FS_createLazyFile=function(){de("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createLink||(wp.FS_createLink=function(){de("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_createDevice||(wp.FS_createDevice=function(){de("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.FS_unlink||(wp.FS_unlink=function(){de("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wp.GL||(wp.GL=function(){de("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.dynamicAlloc||(wp.dynamicAlloc=function(){de("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.warnOnce||(wp.warnOnce=function(){de("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.loadDynamicLibrary||(wp.loadDynamicLibrary=function(){de("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.loadWebAssemblyModule||(wp.loadWebAssemblyModule=function(){de("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getLEB||(wp.getLEB=function(){de("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getFunctionTables||(wp.getFunctionTables=function(){de("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.alignFunctionTables||(wp.alignFunctionTables=function(){de("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.registerFunctions||(wp.registerFunctions=function(){de("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.addFunction||(wp.addFunction=function(){de("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.removeFunction||(wp.removeFunction=function(){de("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getFuncWrapper||(wp.getFuncWrapper=function(){de("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.prettyPrint||(wp.prettyPrint=function(){de("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.makeBigInt||(wp.makeBigInt=function(){de("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.dynCall||(wp.dynCall=function(){de("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getCompilerSetting||(wp.getCompilerSetting=function(){de("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackSave||(wp.stackSave=function(){de("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackRestore||(wp.stackRestore=function(){de("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.stackAlloc||(wp.stackAlloc=function(){de("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.establishStackSpace||(wp.establishStackSpace=function(){de("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.print||(wp.print=function(){de("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.printErr||(wp.printErr=function(){de("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.getTempRet0||(wp.getTempRet0=function(){de("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.setTempRet0||(wp.setTempRet0=function(){de("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.Pointer_stringify||(wp.Pointer_stringify=function(){de("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wp.ALLOC_NORMAL||Object.defineProperty(wp,"ALLOC_NORMAL",{get:function(){de("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wp.ALLOC_STACK||Object.defineProperty(wp,"ALLOC_STACK",{get:function(){de("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wp.ALLOC_DYNAMIC||Object.defineProperty(wp,"ALLOC_DYNAMIC",{get:function(){de("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wp.ALLOC_NONE||Object.defineProperty(wp,"ALLOC_NONE",{get:function(){de("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),ce.prototype=new Error,ce.prototype.constructor=ce,f_=function e(){wp.calledRun||he(),wp.calledRun||(f_=e)},wp.run=he;var q_=[];if(wp.abort=de,wp.preInit)for("function"==typeof wp.preInit&&(wp.preInit=[wp.preInit]);wp.preInit.length>0;)wp.preInit.pop()();wp.noExitRuntime=!0,he()}else wp=null;var j_,X_=wp,Y_=(j_=!0,function(e,t){var i=j_?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return j_=!1,i}),Z_=Y_(void 0,(function(){return Z_.toString().search("(((.+)+)+)+$").toString().constructor(Z_).search("(((.+)+)+)+$")}));Z_();var K_=!1;if(wa(X_)){X_.onRuntimeInitialized=function(){K_=!0};var Q_=X_.cwrap("earcut","number",["number","number","number","number","number","number"])}var J_=ao([{name:"a_pos",components:2,type:"Int16"}],4),em=J_.members,tm=500,im=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Bo,this.indexArray=new Qo,this.indexArray2=new Jo,this.programConfigurations=new eh(em,e.layers,e.zoom),this.segments=new Ao,this.segments2=new Ao,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};im.prototype.populate=function(e,t){this.hasPattern=Cp("fill",this.layers,t);for(var i=[],n=0,r=e;n<r.length;n+=1){var o=r[n],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(this.layers[0]._featureFilter(new go(0),a)){var u=So(a),c={id:a.id,properties:a.properties,type:a.type,sourceLayerIndex:l,index:s,geometry:u,patterns:{},sortKey:void 0};i.push(c)}}for(var h=0,d=i;h<d.length;h+=1){var f=d[h],p=f,_=p.geometry,m=p.index,g=p.sourceLayerIndex;if(this.hasPattern){var x=vp("fill",this.layers,f,this.zoom,t);this.patternFeatures.push(x)}else this.addFeature(f,_,m,{},t.indexData);var y=e[m].feature;t.featureIndex.insert(y,_,m,g,this.index)}},im.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},im.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},im.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},im.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},im.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=em;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Tc.toIndexBuffer(e,this.indexArray),this.cesiumIndexBuffer2=Tc.toIndexBuffer(e,this.indexArray2))}this.programConfigurations.upload(e),this.uploaded=!0},im.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer?.destroy(),this.cesiumIndexBuffer2?.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},im.prototype.clear=function(){wa(this.layoutVertexArray)&&(this.layoutVertexArray=null),wa(this.indexArray)&&(this.indexArray=null),wa(this.indexArray2)&&(this.indexArray2=null)},im.prototype.addFeature=function(e,t,i,n,r){for(var o=0,a=Ff(t,tm);o<a.length;o+=1){for(var s=a[o],l=0,u=0,c=s;u<c.length;u+=1)l+=c[u].length;for(var h,d=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),f=d.vertexLength,p=[],_=[],m=0,g=s;m<g.length;m+=1){var x=g[m];if(0!==x.length){x!==s[0]&&_.push(p.length/2);var y=this.segments2.prepareSegment(x.length,this.layoutVertexArray,this.indexArray2),v=y.vertexLength;this.layoutVertexArray.emplaceBack(x[0].x,x[0].y),this.indexArray2.emplaceBack(v+x.length-1,v),p.push(x[0].x),p.push(x[0].y);for(var $=1;$<x.length;$++)this.layoutVertexArray.emplaceBack(x[$].x,x[$].y),this.indexArray2.emplaceBack(v+$-1,v+$),p.push(x[$].x),p.push(x[$].y);y.vertexLength+=x.length,y.primitiveLength+=x.length}}if(wa(r)&&wa(r[e.id]))h=r[e.id];else if(!0===K_){var b=new Int32Array(p),T=b.length,C=X_._malloc(Int32Array.BYTES_PER_ELEMENT*T);X_.HEAP32.set(b,C/Int32Array.BYTES_PER_ELEMENT);var S=new Int32Array(_),w=S.length,E=X_._malloc(Int32Array.BYTES_PER_ELEMENT*w);X_.HEAP32.set(S,E/Int32Array.BYTES_PER_ELEMENT);var P=new Int32Array(10*T),A=X_._malloc(Int32Array.BYTES_PER_ELEMENT*T*10);X_.HEAP32.set(P,A/Int32Array.BYTES_PER_ELEMENT);var L=Q_(C,T,E,w,2,A),M=new Int32Array(X_.HEAP32.buffer,A,L);h=new Int32Array(M),X_._free(C),X_._free(E),X_._free(A)}else h=Gf(p,_);for(var R=0;R<h.length;R+=3)this.indexArray.emplaceBack(f+h[R],f+h[R+1],f+h[R+2]);d.vertexLength+=l,d.primitiveLength+=h.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,n)},en.register("FillBucket",im,{omit:["layers","patternFeatures"]});var nm=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.possiblyEvaluate=function(e,t,i){if(void 0===e.value)return new $a(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i),r="resolvedImage"===e.property.specification.type&&"string"!=typeof n?n.name:n,o=this._calculate(r,r,r,t);return new $a(this,{kind:"constant",value:o},t)}if("camera"===e.expression.kind){var a=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new $a(this,{kind:"constant",value:a},t)}return new $a(this,e.expression,t)},r.prototype.evaluate=function(e,t,i,n,r){if("source"===e.kind){var o=e.evaluate(t,i,n,r);return this._calculate(o,o,o,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},i,n),e.evaluate({zoom:Math.floor(t.zoom)},i,n),e.evaluate({zoom:Math.floor(t.zoom)+1},i,n),t):e.value},r.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},r.prototype.interpolate=function(e){return e},r}(vh);en.register("DataDrivenProperty",vh);var rm,om=new Qh({"fill-sort-key":new vh(hf.layout_fill["fill-sort-key"])}),am=new Qh({"fill-antialias":new mh(hf.paint_fill["fill-antialias"]),"fill-opacity":new vh(hf.paint_fill["fill-opacity"]),"fill-color":new vh(hf.paint_fill["fill-color"]),"fill-outline-color":new vh(hf.paint_fill["fill-outline-color"]),"fill-translate":new mh(hf.paint_fill["fill-translate"]),"fill-translate-anchor":new mh(hf.paint_fill["fill-translate-anchor"]),"fill-pattern":new nm(hf.paint_fill["fill-pattern"])}),sm={paint:am,layout:om},lm=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,sm)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},r.prototype.createBucket=function(e){return new im(e)},r.prototype.queryRadius=function(){return td.translateDistance(this.paint.get("fill-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){var s=td.translate(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),0,a);return pf.polygonIntersectsMultiPolygon(s,n)},r.prototype.isTileClipped=function(){return!0},r}(bd),um=(rm=!0,function(e,t){var i=rm?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return rm=!1,i}),cm=um(void 0,(function(){return cm.toString().search("(((.+)+)+)+$").toString().constructor(cm).search("(((.+)+)+)+$")}));cm();var hm=["Unknown","Point","LineString","Polygon"],dm=ao([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),fm=dm.members,pm=63,_m=Math.cos(Math.PI/180*37.5),mm=15,gm=20,xm=15,ym=.5,vm=Math.pow(2,xm-1)/ym,$m=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Go,this.indexArray=new Qo,this.programConfigurations=new eh(fm,e.layers,e.zoom),this.segments=new Ao,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};$m.prototype.populate=function(e,t){this.hasPattern=!1;for(var i=this.layers[0].layout.get("line-sort-key"),n=[],r=0,o=e;r<o.length;r+=1){var a=o[r],s=a.feature,l=a.index,u=a.sourceLayerIndex;if(this.layers[0]._featureFilter(new go(0),s)){var c=So(s),h=i?i.evaluate(s,{}):void 0,d={id:s.id,properties:s.properties,type:s.type,sourceLayerIndex:u,index:l,geometry:c,patterns:{},sortKey:h};n.push(d)}}i&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var f=0,p=n;f<p.length;f+=1){var _=p[f],m=_,g=m.geometry,x=m.index,y=m.sourceLayerIndex;if(this.hasPattern){var v=vp("line",this.layers,_,this.zoom,t);this.patternFeatures.push(v)}else this.addFeature(_,g,x,{});var $=e[x].feature;t.featureIndex.insert($,g,x,y,this.index)}},$m.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},$m.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},$m.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},$m.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},$m.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=fm;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=Tc.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},$m.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy()),this.programConfigurations.destroy(),this.segments.destroy())},$m.prototype.clear=function(){wa(this.layoutVertexArray)&&(this.layoutVertexArray=null),wa(this.indexArray)&&(this.indexArray=null)},$m.prototype.addFeature=function(e,t,i,n){for(var r=this.layers[0].layout,o=r.get("line-join").evaluate(e,{}),a=r.get("line-cap"),s=r.get("line-miter-limit"),l=r.get("line-round-limit"),u=0,c=t;u<c.length;u+=1){var h=c[u];this.addLine(h,e,o,a,s,l,i,n)}},$m.prototype.addLine=function(e,t,i,n,r,o,a,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+t.properties.mapbox_clip_start,this.clipEnd=+t.properties.mapbox_clip_end;for(var l=0;l<e.length-1;l++)this.totalDistance+=e[l].dist(e[l+1])}for(var u="Polygon"===hm[t.type],c=e.length;c>=2&&e[c-1].equals(e[c-2]);)c--;for(var h=0;h<c-1&&e[h].equals(e[h+1]);)h++;if(!(c<(u?3:2))){"bevel"===i&&(r=1.05);var d,f=this.overscaling<=16?mm*$o/(512*this.overscaling):0,p=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray),_=void 0,m=void 0,g=void 0,x=void 0;this.e1=this.e2=-1,u&&(d=e[c-2],x=e[h].sub(d)._unit()._perp());for(var y=h;y<c;y++)if(!(m=u&&y===c-1?e[h+1]:e[y+1])||!e[y].equals(m)){x&&(g=x),d&&(_=d),d=e[y],x=m?m.sub(d)._unit()._perp():g;var v=(g=g||x).add(x);(0!==v.x||0!==v.y)&&v._unit();var $=g.x*x.x+g.y*x.y,b=v.x*x.x+v.y*x.y,T=0!==b?1/b:1/0,C=2*Math.sqrt(2-2*b),S=b<_m&&_&&m,w=g.x*x.y-g.y*x.x>0;if(S&&y>h){var E=d.dist(_);if(E>2*f){var P=d.sub(d.sub(_)._mult(f/E)._round());this.updateDistance(_,P),this.addCurrentVertex(P,g,0,0,p),_=P}}var A=_&&m,L=A?i:u?"butt":n;if(A&&"round"===L&&(T<o?L="miter":T<=2&&(L="fakeround")),"miter"===L&&T>r&&(L="bevel"),"bevel"===L&&(T>2&&(L="flipbevel"),T<r&&(L="miter")),_&&this.updateDistance(_,d),"miter"===L)v._mult(T),this.addCurrentVertex(d,v,0,0,p);else if("flipbevel"===L){if(T>100)v=x.mult(-1);else{var M=T*g.add(x).mag()/g.sub(x).mag();v._perp()._mult(M*(w?-1:1))}this.addCurrentVertex(d,v,0,0,p),this.addCurrentVertex(d,v.mult(-1),0,0,p)}else if("bevel"===L||"fakeround"===L){var R=-Math.sqrt(T*T-1),O=w?R:0,D=w?0:R;if(_&&this.addCurrentVertex(d,g,O,D,p),"fakeround"===L)for(var I=Math.round(180*C/Math.PI/gm),B=1;B<I;B++){var F=B/I;if(.5!==F){var N=F-.5;F+=F*N*(F-1)*((1.0904+$*($*(3.55645-1.43519*$)-3.2452))*N*N+(.848013+$*(.215638*$-1.06021)))}var G=x.sub(g)._mult(F)._add(g)._unit()._mult(w?-1:1);this.addHalfVertex(d,G.x,G.y,!1,w,0,p)}m&&this.addCurrentVertex(d,x,-O,-D,p)}else if("butt"===L)this.addCurrentVertex(d,v,0,0,p);else if("square"===L){var z=_?1:-1;this.addCurrentVertex(d,v,z,z,p)}else"round"===L&&(_&&(this.addCurrentVertex(d,g,0,0,p),this.addCurrentVertex(d,g,1,1,p,!0)),m&&(this.addCurrentVertex(d,x,-1,-1,p,!0),this.addCurrentVertex(d,x,0,0,p)));if(S&&y<c-1){var U=d.dist(m);if(U>2*f){var V=d.add(m.sub(d)._mult(f/U)._round());this.updateDistance(d,V),this.addCurrentVertex(V,x,0,0,p),d=V}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,a,s)}},$m.prototype.addCurrentVertex=function(e,t,i,n,r,o){void 0===o&&(o=!1);var a=t.x+t.y*i,s=t.y-t.x*i,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,a,s,o,!1,i,r),this.addHalfVertex(e,l,u,o,!0,-n,r),this.distance>vm/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,i,n,r,o))},$m.prototype.addHalfVertex=function(e,t,i,n,r,o,a){var s=e.x,l=e.y,u=this.scaledDistance*ym;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(r?1:0),Math.round(pm*t)+128,Math.round(pm*i)+128,1+(0===o?0:o<0?-1:1)|(63&u)<<2,u>>6);var c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),a.primitiveLength++),r?this.e2=c:this.e1=c},$m.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(vm-1):this.distance},en.register("LineBucket",$m,{omit:["layers","patternFeatures"]});var bm,Tm=(bm=!0,function(e,t){var i=bm?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return bm=!1,i}),Cm=Tm(void 0,(function(){return Cm.toString().search("(((.+)+)+)+$").toString().constructor(Cm).search("(((.+)+)+)+$")}));Cm();var Sm=function(e){this.specification=e};Sm.prototype.possiblyEvaluate=function(e,t,i){if(void 0!==e.value){if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new go(Math.floor(t.zoom-1),t)),e.expression.evaluate(new go(Math.floor(t.zoom),t)),e.expression.evaluate(new go(Math.floor(t.zoom+1),t)),t)}},Sm.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},Sm.prototype.interpolate=function(e){return e},en.register("CrossFadedProperty",Sm);var wm,Em=(wm=!0,function(e,t){var i=wm?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return wm=!1,i}),Pm=Em(void 0,(function(){return Pm.toString().search("(((.+)+)+)+$").toString().constructor(Pm).search("(((.+)+)+)+$")}));Pm();var Am=function(e){this.specification=e};Am.prototype.possiblyEvaluate=function(e,t,i){return!!e.expression.evaluate(t,null,{},i)},Am.prototype.interpolate=function(){return!1},en.register("ColorRampProperty",Am);var Lm=new Qh({"line-cap":new mh(hf.layout_line["line-cap"]),"line-join":new vh(hf.layout_line["line-join"]),"line-miter-limit":new mh(hf.layout_line["line-miter-limit"]),"line-round-limit":new mh(hf.layout_line["line-round-limit"]),"line-sort-key":new vh(hf.layout_line["line-sort-key"])}),Mm=new Qh({"line-opacity":new vh(hf.paint_line["line-opacity"]),"line-color":new vh(hf.paint_line["line-color"]),"line-translate":new mh(hf.paint_line["line-translate"]),"line-translate-anchor":new mh(hf.paint_line["line-translate-anchor"]),"line-width":new vh(hf.paint_line["line-width"]),"line-gap-width":new vh(hf.paint_line["line-gap-width"]),"line-offset":new vh(hf.paint_line["line-offset"]),"line-blur":new vh(hf.paint_line["line-blur"]),"line-dasharray":new Sm(hf.paint_line["line-dasharray"]),"line-pattern":new nm(hf.paint_line["line-pattern"]),"line-gradient":new Am(hf.paint_line["line-gradient"])}),Rm={paint:Mm,layout:Lm},Om=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,i){return i=new go(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),e.prototype.possiblyEvaluate.call(this,t,i)},t.prototype.evaluate=function(t,i,n,r){return i=extend({},i,{zoom:Math.floor(i.zoom)}),e.prototype.evaluate.call(this,t,i,n,r)},t}(vh),Dm=new Om(Rm.paint.properties["line-width"].specification);Dm.useIntegerZoom=!0;var Im=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Rm)}function o(e,t){return t>0?t+2*e:e}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},r.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=renderColorRamp(e,"lineProgress"),this.gradientTexture=null},r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i),this.paint._values["line-floorwidth"]=Dm.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},r.prototype.createBucket=function(e){return new $m(e)},r.prototype.queryRadius=function(e){var t=e,i=o(td.getMaximumPaintValue("line-width",this,t),td.getMaximumPaintValue("line-gap-width",this,t)),n=td.getMaximumPaintValue("line-offset",this,t);return i/2+Math.abs(n)+td.translateDistance(this.paint.get("line-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,a,s){var l=td.translate(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),0,s),u=o(this.paint.get("line-width")?.evaluate(t,i),this.paint.get("line-gap-width")?.evaluate(t,i)),c=s/2*(u=Math.max(u,5)),h=this.paint.get("line-offset")?.evaluate(t,i);return h&&(n=function(e,t){for(var i=[],n=new to(0,0),r=0;r<e.length;r++){for(var o=e[r],a=[],s=0;s<o.length;s++){var l=o[s-1],u=o[s],c=o[s+1],h=0===s?n:u.sub(l)._unit()._perp(),d=s===o.length-1?n:c.sub(u)._unit()._perp(),f=h._add(d)._unit(),p=f.x*d.x+f.y*d.y;f._mult(1/p),a.push(f._mult(t)._add(u))}i.push(a)}return i}(n,h*s)),pf.polygonIntersectsBufferedMultiLine(l,n,c)},r.prototype.isTileClipped=function(){return!0},r}(bd);const Bm=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Fm=Bm(void 0,(function(){return Fm.toString().search("(((.+)+)+)+$").toString().constructor(Fm).search("(((.+)+)+)+$")}));Fm();const Nm=ao([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Gm=ao([{name:"a_projected_pos",components:3,type:"Float32"}],4);ao([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ao([{name:"a_fade_opacity",components:1,type:"Float32"}],4);const zm=ao([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);ao([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]);const Um=ao([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Vm=ao([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);ao([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ao([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"}]),ao([{type:"Float32",name:"offsetX"}]),ao([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var km,Wm=(km=!0,function(e,t){var i=km?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return km=!1,i}),Hm=Wm(void 0,(function(){return Hm.toString().search("(((.+)+)+)+$").toString().constructor(Hm).search("(((.+)+)+)+$")}));Hm();var qm={"Latin-1 Supplement":function(e){return e>=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};const jm=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Xm=jm(void 0,(function(){return Xm.toString().search("(((.+)+)+)+$").toString().constructor(Xm).search("(((.+)+)+)+$")}));function Ym(e){for(const t of e)if(Jm(t.charCodeAt(0)))return!0;return!1}function Zm(e){for(const t of e)if(!Km(t.charCodeAt(0)))return!1;return!0}function Km(e){return!(qm.Arabic(e)||qm["Arabic Supplement"](e)||qm["Arabic Extended-A"](e)||qm["Arabic Presentation Forms-A"](e)||qm["Arabic Presentation Forms-B"](e))}function Qm(e){return!(e<11904||!(qm["Bopomofo Extended"](e)||qm.Bopomofo(e)||qm["CJK Compatibility Forms"](e)||qm["CJK Compatibility Ideographs"](e)||qm["CJK Compatibility"](e)||qm["CJK Radicals Supplement"](e)||qm["CJK Strokes"](e)||qm["CJK Symbols and Punctuation"](e)||qm["CJK Unified Ideographs Extension A"](e)||qm["CJK Unified Ideographs"](e)||qm["Enclosed CJK Letters and Months"](e)||qm["Halfwidth and Fullwidth Forms"](e)||qm.Hiragana(e)||qm["Ideographic Description Characters"](e)||qm["Kangxi Radicals"](e)||qm["Katakana Phonetic Extensions"](e)||qm.Katakana(e)||qm["Vertical Forms"](e)||qm["Yi Radicals"](e)||qm["Yi Syllables"](e)))}function Jm(e){return!(746!==e&&747!==e&&(e<4352||!(qm["Bopomofo Extended"](e)||qm.Bopomofo(e)||qm["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||qm["CJK Compatibility Ideographs"](e)||qm["CJK Compatibility"](e)||qm["CJK Radicals Supplement"](e)||qm["CJK Strokes"](e)||!(!qm["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||qm["CJK Unified Ideographs Extension A"](e)||qm["CJK Unified Ideographs"](e)||qm["Enclosed CJK Letters and Months"](e)||qm["Hangul Compatibility Jamo"](e)||qm["Hangul Jamo Extended-A"](e)||qm["Hangul Jamo Extended-B"](e)||qm["Hangul Jamo"](e)||qm["Hangul Syllables"](e)||qm.Hiragana(e)||qm["Ideographic Description Characters"](e)||qm.Kanbun(e)||qm["Kangxi Radicals"](e)||qm["Katakana Phonetic Extensions"](e)||qm.Katakana(e)&&12540!==e||!(!qm["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!qm["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||qm["Unified Canadian Aboriginal Syllabics"](e)||qm["Unified Canadian Aboriginal Syllabics Extended"](e)||qm["Vertical Forms"](e)||qm["Yijing Hexagram Symbols"](e)||qm["Yi Syllables"](e)||qm["Yi Radicals"](e))))}function eg(e){return!!(qm["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||qm["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||qm["Letterlike Symbols"](e)||qm["Number Forms"](e)||qm["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||qm["Control Pictures"](e)&&9251!==e||qm["Optical Character Recognition"](e)||qm["Enclosed Alphanumerics"](e)||qm["Geometric Shapes"](e)||qm["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||qm["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||qm["CJK Symbols and Punctuation"](e)||qm.Katakana(e)||qm["Private Use Area"](e)||qm["CJK Compatibility Forms"](e)||qm["Small Form Variants"](e)||qm["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}function tg(e){return!(Jm(e)||eg(e))}function ig(e){return qm.Arabic(e)||qm["Arabic Supplement"](e)||qm["Arabic Extended-A"](e)||qm["Arabic Presentation Forms-A"](e)||qm["Arabic Presentation Forms-B"](e)}function ng(e){return e>=1424&&e<=2303||qm["Arabic Presentation Forms-A"](e)||qm["Arabic Presentation Forms-B"](e)}function rg(e){for(const t of e)if(ng(t.charCodeAt(0)))return!0;return!1}Xm();const og=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),ag=og(void 0,(function(){return ag.toString().search("(((.+)+)+)+$").toString().constructor(ag).search("(((.+)+)+)+$")}));ag();const sg={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function lg(e){let t="";for(let i=0;i<e.length;i++){const n=e.charCodeAt(i+1)||null,r=e.charCodeAt(i-1)||null;n&&tg(n)&&!sg[e[i+1]]||r&&tg(r)&&!sg[e[i-1]]||!sg[e[i]]?t+=e[i]:t+=sg[e[i]]}return t}var ug,cg=(ug=!0,function(e,t){var i=ug?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ug=!1,i}),hg=cg(void 0,(function(){return hg.toString().search("(((.+)+)+)+$").toString().constructor(hg).search("(((.+)+)+)+$")}));hg();var dg,fg=(dg=!0,function(e,t){var i=dg?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return dg=!1,i}),pg=fg(void 0,(function(){return pg.toString().search("(((.+)+)+)+$").toString().constructor(pg).search("(((.+)+)+)+$")}));function _g(e){var t={},i={},n=[],r=0;function o(t){n.push(e[t]),r++}function a(e,t,r){var o=i[e];return delete i[e],i[t]=o,n[o].geometry[0].pop(),n[o].geometry[0]=n[o].geometry[0].concat(r[0]),o}function s(e,i,r){var o=t[i];return delete t[i],t[e]=o,n[o].geometry[0].shift(),n[o].geometry[0]=r[0].concat(n[o].geometry[0]),o}function l(e,t,i){var n=i?t[0][t[0].length-1]:t[0][0];return e+":"+n.x+":"+n.y}for(var u=0;u<e.length;u++){var c=e[u],h=c.geometry,d=c.text?c.text.toString():null;if(d){var f=l(d,h),p=l(d,h,!0);if(f in i&&p in t&&i[f]!==t[p]){var _=s(f,p,h),m=a(f,p,n[_].geometry);delete t[f],delete i[p],i[l(d,n[m].geometry,!0)]=m,n[_].geometry=null}else f in i?a(f,p,h):p in t?s(f,p,h):(o(u),t[f]=r-1,i[p]=r-1)}else o(u)}return n.filter((function(e){return e.geometry}))}pg();var mg=function(e,t){void 0===t&&(t={}),Oh(this,t),this.type=e};!function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){void 0===i&&(i={}),e.call(this,"error",Oh({error:t},i))}n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r}(mg);const gg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),xg=gg(void 0,(function(){return xg.toString().search("(((.+)+)+)+$").toString().constructor(xg).search("(((.+)+)+)+$")}));xg();const yg=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function vg(e){return yg.test(e)}function $g(e){return e.indexOf("sku=")>0&&vg(e)}const bg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Tg=bg(void 0,(function(){return Tg.toString().search("(((.+)+)+)+$").toString().constructor(Tg).search("(((.+)+)+)+$")}));Tg();const Cg="mapbox-tiles",Sg=42e4;let wg;function Eg(e,t){if(void 0===wg)try{new Response(new ReadableStream),wg=!0}catch(e){wg=!1}wg?t(e.body):e.blob().then(t)}function Pg(e,t,i){if(!window.caches)return;const n={status:t.status,statusText:t.statusText,headers:new window.Headers};t.headers.forEach(((e,t)=>n.headers.set(t,e)));const r=kh(t.headers.get("Cache-Control")||"");r["no-store"]||(r["max-age"]&&n.headers.set("Expires",new Date(i+1e3*r["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-i<Sg||Eg(t,(t=>{const i=new window.Response(t,n);window.caches.open(Cg).then((t=>t.put(Ag(e.url),i)))})))}function Ag(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Lg(e,t){if(!window.caches)return t(null);const i=Ag(e.url);window.caches.open(Cg).catch(t).then((e=>{e.match(i).catch(t).then((n=>{const r=Mg(n);e.delete(i),r&&e.put(i,n.clone()),t(null,n,r)}))}))}function Mg(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")),i=kh(e.headers.get("Cache-Control")||"");return t>Date.now()&&!i["no-cache"]}function Rg(e){window.caches&&window.caches.open(Cg).then((t=>{t.keys().then((i=>{for(let n=0;n<i.length-e;n++)t.delete(i[n])}))}))}const Og=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Dg=Og(void 0,(function(){return Dg.toString().search("(((.+)+)+)+$").toString().constructor(Dg).search("(((.+)+)+)+$")}));Dg();const Ig={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(Ig);class Bg extends Error{constructor(e,t,i){401===t&&vg(i)&&(e+=": you may have provided an invalid Mapbox access token."),super(e),this.status=t,this.url=i,this.name=this.constructor.name,this.message=e}toString(){return this.name+": "+this.message+" ("+this.status+"): "+this.url}}const Fg=Vh()?()=>self.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href,Ng=e=>/^file:/.test(e)||/^file:/.test(Fg())&&!/^\w+:/.test(e);function Gg(e,t){const i=Vh()?self:window,n=new i.AbortController,r=new i.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:Fg(),signal:n.signal});let o=!1,a=!1;const s=$g(r.url);"json"===e.type&&r.headers.set("Accept","application/json");const l=(n,o,l)=>{if(a)return;if(n&&"SecurityError"!==n.message&&zh(n),o&&l)return u(o);const c=Date.now();i.fetch(r).then((i=>{if(i.ok){const e=s?i.clone():null;return u(i,e,c)}return t(new Bg(i.statusText,i.status,e.url))})).catch((e=>{20!==e.code&&t(new Error(e.message))}))},u=(i,n,s)=>{("arrayBuffer"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text()).then((e=>{a||(n&&s&&Pg(r,n,s),o=!0,t(null,e,i.headers.get("Cache-Control"),i.headers.get("Expires")))})).catch((e=>t(new Error(e.message))))};return s?Lg(r,l):l(null,null),{cancel:()=>{a=!0,o||n.abort()}}}function zg(e,t){const i=new((Vh()?self:window).XMLHttpRequest);i.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(i.responseType="arraybuffer");for(const t in e.headers)i.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=()=>{t(new Error(i.statusText))},i.onload=()=>{if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){let n=i.response;if("json"===e.type)try{n=JSON.parse(i.response)}catch(e){return t(e)}t(null,n,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else t(new Bg(i.statusText,i.status,e.url))},i.send(e.body),{cancel:()=>i.abort()}}const Ug=function(e,t){const i=Vh()?self:window;if(!Ng(e.url)){if(i.fetch&&i.Request&&i.AbortController&&i.Request.prototype.hasOwnProperty("signal"))return Gg(e,t);if(Vh()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}return zg(e,t)},Vg=function(e,t){return Ug(Oh(e,{type:"arrayBuffer"}),t)},kg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Wg=kg(void 0,(function(){return Wg.toString().search("(((.+)+)+)+$").toString().constructor(Wg).search("(((.+)+)+)+$")}));Wg();const Hg=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),qg=Hg(void 0,(function(){return qg.toString().search("(((.+)+)+)+$").toString().constructor(qg).search("(((.+)+)+)+$")}));qg();const jg={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"};let Xg=jg.unavailable,Yg=null;const Zg={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Xg===jg.loaded||null!=Zg.applyArabicShaping,isLoading:()=>Xg===jg.loading,setState(e){Xg=e.pluginStatus,Yg=e.pluginURL},isParsed:()=>null!=Zg.applyArabicShaping,getPluginURL:()=>Yg};var Kg,Qg=(Kg=!0,function(e,t){var i=Kg?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Kg=!1,i}),Jg=Qg(void 0,(function(){return Jg.toString().search("(((.+)+)+)+$").toString().constructor(Jg).search("(((.+)+)+)+$")}));Jg();var ex,tx=24,ix=(ex=!0,function(e,t){var i=ex?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return ex=!1,i}),nx=ix(void 0,(function(){return nx.toString().search("(((.+)+)+)+$").toString().constructor(nx).search("(((.+)+)+)+$")}));nx();var rx=function(e,t){ox(this,e,1,t)};function ox(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function ax(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=ox({},{width:n,height:r},i);sx(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function sx(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}rx.prototype.resize=function(e){ax(this,e,1)},rx.prototype.clone=function(){return new rx({width:this.width,height:this.height},new Uint8Array(this.data))},rx.copy=function(e,t,i,n,r){sx(e,t,i,n,r,1)},en.register("AlphaImage",rx);var lx=function(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},ux=function(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_},cx={read:lx,write:ux};function hx(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}hx.Varint=0,hx.Fixed64=1,hx.Bytes=2,hx.Fixed32=5;var dx=4294967296,fx=1/dx;function px(e,t,i){var n,r,o=i.buf;if(n=(112&(r=o[i.pos++]))>>4,r<128||(n|=(127&(r=o[i.pos++]))<<3,r<128)||(n|=(127&(r=o[i.pos++]))<<10,r<128)||(n|=(127&(r=o[i.pos++]))<<17,r<128)||(n|=(127&(r=o[i.pos++]))<<24,r<128)||(n|=(1&(r=o[i.pos++]))<<31,r<128))return mx(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function _x(e){return e.type===hx.Bytes?e.readVarint()+e.pos:e.pos+1}function mx(e,t,i){return i?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function gx(e,t){var i,n;if(e>=0?(i=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(i=~(-e%4294967296))?i=i+1|0:(i=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),xx(i,0,t),yx(n,t)}function xx(e,t,i){i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}function yx(e,t){var i=(7&e)<<4;t.buf[t.pos++]|=i|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function vx(e,t,i){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=e;r--)i.buf[r+n]=i.buf[r]}function $x(e,t){for(var i=0;i<e.length;i++)t.writeVarint(e[i])}function bx(e,t){for(var i=0;i<e.length;i++)t.writeSVarint(e[i])}function Tx(e,t){for(var i=0;i<e.length;i++)t.writeFloat(e[i])}function Cx(e,t){for(var i=0;i<e.length;i++)t.writeDouble(e[i])}function Sx(e,t){for(var i=0;i<e.length;i++)t.writeBoolean(e[i])}function wx(e,t){for(var i=0;i<e.length;i++)t.writeFixed32(e[i])}function Ex(e,t){for(var i=0;i<e.length;i++)t.writeSFixed32(e[i])}function Px(e,t){for(var i=0;i<e.length;i++)t.writeFixed64(e[i])}function Ax(e,t){for(var i=0;i<e.length;i++)t.writeSFixed64(e[i])}function Lx(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function Mx(e,t,i){e[i]=t,e[i+1]=t>>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function Rx(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function Ox(e,t,i){for(var n="",r=t;r<i;){var o,a,s,l=e[r],u=null,c=l>239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[r+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(o=e[r+1],a=e[r+2],128==(192&o)&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(o=e[r+1],a=e[r+2],s=e[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=c}return n}function Dx(e,t,i){for(var n,r,o=0;o<t.length;o++){if((n=t.charCodeAt(o))>55295&&n<57344){if(!r){n>56319||o+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):r=n;continue}if(n<56320){e[i++]=239,e[i++]=191,e[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(e[i++]=239,e[i++]=191,e[i++]=189,r=null);n<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:(n<65536?e[i++]=n>>12|224:(e[i++]=n>>18|240,e[i++]=n>>12&63|128),e[i++]=n>>6&63|128),e[i++]=63&n|128)}return i}hx.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=7&n,e(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Lx(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Rx(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Lx(this.buf,this.pos)+Lx(this.buf,this.pos+4)*dx;return this.pos+=8,e},readSFixed64:function(){var e=Lx(this.buf,this.pos)+Rx(this.buf,this.pos+4)*dx;return this.pos+=8,e},readFloat:function(){var e=cx.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=cx.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,n=this.buf;return t=127&(i=n[this.pos++]),i<128||(t|=(127&(i=n[this.pos++]))<<7,i<128)||(t|=(127&(i=n[this.pos++]))<<14,i<128)||(t|=(127&(i=n[this.pos++]))<<21,i<128)?t:px(t|=(15&(i=n[this.pos]))<<28,e,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=Ox(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var i=_x(this);for(e=e||[];this.pos<i;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){var t=_x(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===hx.Varint)for(;this.buf[this.pos++]>127;);else if(t===hx.Bytes)this.pos=this.readVarint()+this.pos;else if(t===hx.Fixed32)this.pos+=4;else{if(t!==hx.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var i=new Uint8Array(t);i.set(this.buf),this.buf=i,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),Mx(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),Mx(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),Mx(this.buf,-1&e,this.pos),Mx(this.buf,Math.floor(e*fx),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),Mx(this.buf,-1&e,this.pos),Mx(this.buf,Math.floor(e*fx),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?gx(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=Dx(this.buf,e,this.pos);var i=this.pos-t;i>=128&&vx(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),cx.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),cx.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i<t;i++)this.buf[this.pos++]=e[i]},writeRawMessage:function(e,t){this.pos++;var i=this.pos;e(t,this);var n=this.pos-i;n>=128&&vx(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,i){this.writeTag(e,hx.Bytes),this.writeRawMessage(t,i)},writePackedVarint:function(e,t){this.writeMessage(e,$x,t)},writePackedSVarint:function(e,t){this.writeMessage(e,bx,t)},writePackedBoolean:function(e,t){this.writeMessage(e,Sx,t)},writePackedFloat:function(e,t){this.writeMessage(e,Tx,t)},writePackedDouble:function(e,t){this.writeMessage(e,Cx,t)},writePackedFixed32:function(e,t){this.writeMessage(e,wx,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,Ex,t)},writePackedFixed64:function(e,t){this.writeMessage(e,Px,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,Ax,t)},writeBytesField:function(e,t){this.writeTag(e,hx.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,hx.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,hx.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,hx.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,hx.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,hx.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,hx.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,hx.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,hx.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,hx.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};const Ix=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),Bx=Ix(void 0,(function(){return Bx.toString().search("(((.+)+)+)+$").toString().constructor(Bx).search("(((.+)+)+)+$")}));Bx();const Fx=3,Nx=Fx,Gx=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),zx=Gx(void 0,(function(){return zx.toString().search("(((.+)+)+)+$").toString().constructor(zx).search("(((.+)+)+)+$")}));zx();var Ux=1;const Vx={horizontal:1,vertical:2,horizontalOnly:3},kx=-17;function Wx(e){for(const t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}const Hx=57344,qx=63743;class jx{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(e,t){const i=new jx;return i.scale=e||1,i.fontStack=t,i}static forImage(e){const t=new jx;return t.imageName=e,t}}class Xx{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(e,t){const i=new Xx;for(let n=0;n<e.sections.length;n++){const r=e.sections[n];r.image?i.addImageSection(r):i.addTextSection(r,t)}return i}length(){return this.text.length}getSection(e){return this.sections[this.sectionIndex[e]]}getSectionIndex(e){return this.sectionIndex[e]}getCharCode(e){return this.text.charCodeAt(e)}verticalizePunctuation(){this.text=lg(this.text)}trim(){let e=0;for(let t=0;t<this.text.length&&Kx[this.text.charCodeAt(t)];t++)e++;let t=this.text.length;for(let i=this.text.length-1;i>=0&&i>=e&&Kx[this.text.charCodeAt(i)];i--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){const i=new Xx;return i.text=this.text.substring(e,t),i.sectionIndex=this.sectionIndex.slice(e,t),i.sections=this.sections,i}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((e,t)=>Math.max(e,this.sections[t].scale)),0)}addTextSection(e,t){this.text+=e.text,this.sections.push(jx.forText(e.scale,e.fontStack||t));const i=this.sections.length-1;for(let t=0;t<e.text.length;++t)this.sectionIndex.push(i)}addImageSection(e){const t=e.image?e.image.name:"";if(0===t.length)return void zh("Can't add FormattedSection with an empty image.");const i=this.getNextImageSectionCharCode();i?(this.text+=String.fromCharCode(i),this.sections.push(jx.forImage(t)),this.sectionIndex.push(this.sections.length-1)):zh("Reached maximum number of images "+(qx-Hx+2))}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=qx?null:++this.imageSectionID:(this.imageSectionID=Hx,this.imageSectionID)}}function Yx(e,t){const i=[],n=e.text;let r=0;for(const n of t)i.push(e.substring(r,n)),r=n;return r<n.length&&i.push(e.substring(r,n.length)),i}function Zx(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){const m=Xx.fromFeature(e,r);let g;h===Vx.vertical&&m.verticalizePunctuation();const{processBidirectionalText:x,processStyledBidirectionalText:y}=Zg;if(x&&1===m.sections.length){g=[];const e=x(m.toString(),oy(m,u,o,t,n,f,p));for(const t of e){const e=new Xx;e.text=t,e.sections=m.sections;for(let i=0;i<t.length;i++)e.sectionIndex.push(0);g.push(e)}}else if(y){g=[];const e=y(m.text,m.sectionIndex,oy(m,u,o,t,n,f,p));for(const t of e){const e=new Xx;e.text=t[0],e.sectionIndex=t[1],e.sections=m.sections,g.push(e)}}else g=Yx(m,oy(m,u,o,t,n,f,p));const v=[],$={positionedLines:v,text:m.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:h,iconsInText:!1,verticalizable:!1};return sy($,t,i,n,g,a,s,l,h,u,d,_),!Wx(v)&&$}const Kx={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Qx={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function Jx(e,t,i,n,r,o){if(t.imageName){const e=n[t.imageName];return e?e.displaySize[0]*t.scale*tx/o+r:0}{const n=i[t.fontStack],o=n&&n[e];return o?o.metrics.advance*t.scale+r:0}}function ey(e,t,i,n,r,o){let a=0;for(let i=0;i<e.length();i++){const s=e.getSection(i);a+=Jx(e.getCharCode(i),s,n,r,t,o)}return a/Math.max(1,Math.ceil(a/i))}function ty(e,t,i,n){const r=Math.pow(e-t,2);return n?e<t?r/2:2*r:r+Math.abs(i)*i}function iy(e,t,i){let n=0;return 10===e&&(n-=1e4),i&&(n+=150),(40===e||65288===e)&&(n+=50),(41===t||65289===t)&&(n+=50),n}function ny(e,t,i,n,r,o){let a=null,s=ty(t,i,r,o);for(const e of n){const n=ty(t-e.x,i,r,o)+e.badness;n<=s&&(a=e,s=n)}return{index:e,x:t,priorBreak:a,badness:s}}function ry(e){return e?ry(e.priorBreak).concat(e.index):[]}function oy(e,t,i,n,r,o,a){if("point"!==o)return[];if(!e)return[];const s=[],l=ey(e,t,i,n,r,a),u=e.text.indexOf("​")>=0;let c=0;for(let i=0;i<e.length();i++){const o=e.getSection(i),h=e.getCharCode(i);if(Kx[h]||(c+=Jx(h,o,n,r,t,a)),i<e.length()-1){const t=Qm(h);(Qx[h]||t||o.imageName)&&s.push(ny(i+1,c,l,s,iy(h,e.getCharCode(i+1),t&&u),!1))}}return ry(ny(e.length(),c,l,s,0,!0))}function ay(e){let t=.5,i=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":i=1;break;case"top":case"top-right":case"top-left":i=0}return{horizontalAlign:t,verticalAlign:i}}function sy(e,t,i,n,r,o,a,s,l,u,c,h){let d=0,f=kx,p=0,_=0;const m="right"===s?1:"left"===s?0:.5;let g=0;for(const a of r){a.trim();const r=a.getMaxScale(),s=(r-1)*tx,x={positionedGlyphs:[],lineOffset:0};e.positionedLines[g]=x;const y=x.positionedGlyphs;let v=0;if(!a.length()){f+=o,++g;continue}for(let o=0;o<a.length();o++){const p=a.getSection(o),_=a.getSectionIndex(o),m=a.getCharCode(o);let g=0,x=null,$=null,b=null,T=tx;const C=!(l===Vx.horizontal||!c&&!Jm(m)||c&&(Kx[m]||ig(m)));if(p.imageName){const t=n[p.imageName];if(!t)continue;b=p.imageName,e.iconsInText=e.iconsInText||!0,$=t.paddedRect;const i=t.displaySize;p.scale=p.scale*tx/h,x={width:i[0],height:i[1],left:Ux,top:-Nx,advance:C?i[1]:i[0]},g=s+(tx-i[1]*p.scale),T=x.advance;const o=C?i[0]*p.scale-tx*r:i[1]*p.scale-tx*r;o>0&&o>v&&(v=o)}else{const e=i[p.fontStack],n=e&&e[m];if(n&&n.rect)$=n.rect,x=n.metrics;else{const e=t[p.fontStack],i=e&&e[m];if(!i)continue;x=i.metrics}g=(r-p.scale)*tx}C?(e.verticalizable=!0,y.push({glyph:m,imageName:b,x:d,y:f+g,vertical:C,scale:p.scale,fontStack:p.fontStack,sectionIndex:_,metrics:x,rect:$}),d+=T*p.scale+u):(y.push({glyph:m,imageName:b,x:d,y:f+g,vertical:C,scale:p.scale,fontStack:p.fontStack,sectionIndex:_,metrics:x,rect:$}),d+=x.advance*p.scale+u)}if(0!==y.length){const e=d-u;p=Math.max(e,p),ly(y,0,y.length-1,m,v)}d=0;const $=o*r+v;x.lineOffset=Math.max(v,s),f+=$,_=Math.max($,_),++g}const x=f-kx,{horizontalAlign:y,verticalAlign:v}=ay(a);uy(e.positionedLines,m,y,v,p,_,o,x,r.length),e.top+=-v*x,e.bottom=e.top+x,e.left+=-y*p,e.right=e.left+p}function ly(e,t,i,n,r){if(!n&&!r)return;const o=e[i],a=o.metrics.advance*o.scale,s=(e[i].x+a)*n;for(let n=t;n<=i;n++)e[n].x-=s,e[n].y+=r}function uy(e,t,i,n,r,o,a,s,l){const u=(t-i)*r;let c=0;c=o!==a?-s*n-kx:(-n*l+.5)*a;for(const t of e)for(const e of t.positionedGlyphs)e.x+=u,e.y+=c}function cy(e,t,i){const{horizontalAlign:n,verticalAlign:r}=ay(i),o=t[0],a=t[1],s=o-e.displaySize[0]*n,l=s+e.displaySize[0],u=a-e.displaySize[1]*r;return{image:e,top:u,bottom:u+e.displaySize[1],left:s,right:l}}function hy(e,t,i,n,r,o){const a=e.image;let s;if(a.content){const e=a.content,t=a.pixelRatio||1;s=[e[0]/t,e[1]/t,a.displaySize[0]-e[2]/t,a.displaySize[1]-e[3]/t]}const l=t.left*o,u=t.right*o;let c,h,d,f;"width"===i||"both"===i?(f=r[0]+l-n[3],h=r[0]+u+n[1]):(f=r[0]+(l+u-a.displaySize[0])/2,h=f+a.displaySize[0]);const p=t.top*o,_=t.bottom*o;return"height"===i||"both"===i?(c=r[1]+p-n[0],d=r[1]+_+n[2]):(c=r[1]+(p+_-a.displaySize[1])/2,d=c+a.displaySize[1]),{image:a,top:c,right:h,bottom:d,left:f,collisionPadding:s}}var dy,fy=(dy=!0,function(e,t){var i=dy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return dy=!1,i}),py=fy(void 0,(function(){return py.toString().search("(((.+)+)+)+$").toString().constructor(py).search("(((.+)+)+)+$")}));py();const _y=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),my=_y(void 0,(function(){return my.toString().search("(((.+)+)+)+$").toString().constructor(my).search("(((.+)+)+)+$")}));my();const gy=128;function xy(e,t){const{expression:i}=t;if("constant"===i.kind)return{kind:"constant",layoutSize:i.evaluate(new go(e+1))};if("source"===i.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:n}=i;let r=0;for(;r<t.length&&t[r]<=e;)r++;r=Math.max(0,r-1);let o=r;for(;o<t.length&&t[o]<e+1;)o++;o=Math.min(t.length-1,o);const a=t[r],s=t[o];return"composite"===i.kind?{kind:"composite",minZoom:a,maxZoom:s,interpolationType:n}:{kind:"camera",minZoom:a,maxZoom:s,minSize:i.evaluate(new go(a)),maxSize:i.evaluate(new go(s)),interpolationType:n}}}var yy=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n,r){e.call(this,t,i),this.angle=n,void 0!==r&&(this.segment=r)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.clone=function(){return new r(this.x,this.y,this.angle,this.segment)},r}(to);en.register("Anchor",yy);var vy,$y=(vy=!0,function(e,t){var i=vy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return vy=!1,i}),by=$y(void 0,(function(){return by.toString().search("(((.+)+)+)+$").toString().constructor(by).search("(((.+)+)+)+$")}));function Ty(e,t,i,n,r){if(void 0===t.segment)return!0;for(var o=t,a=t.segment+1,s=0;s>-i/2;){if(--a<0)return!1;s-=e[a].dist(o),o=e[a]}s+=e[a].dist(e[a+1]),a++;for(var l=[],u=0;s<i/2;){var c=e[a-1],h=e[a],d=e[a+1];if(!d)return!1;var f=c.angleTo(h)-h.angleTo(d);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:f}),u+=f;s-l[0].distance>n;)u-=l.shift().angleDelta;if(u>r)return!1;a++,s+=h.dist(d)}return!0}by();var Cy,Sy=(Cy=!0,function(e,t){var i=Cy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Cy=!1,i}),wy=Sy(void 0,(function(){return wy.toString().search("(((.+)+)+)+$").toString().constructor(wy).search("(((.+)+)+)+$")}));function Ey(e,t,i){return e*(1-i)+t*i}wy();var Py=function(){};function Ay(e){for(var t=0,i=0;i<e.length-1;i++)t+=e[i].dist(e[i+1]);return t}function Ly(e,t,i){return e?.6*t*i:0}function My(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function Ry(e,t,i,n,r,o,a,s,l){for(var u=o/2,c=Ay(e),h=0,d=t-i,f=[],p=0;p<e.length-1;p++){for(var _=e[p],m=e[p+1],g=_.dist(m),x=m.angleTo(_);d+i<h+g;){var y=((d+=i)-h)/g,v=Ey(_.x,m.x,y),$=Ey(_.y,m.y,y);if(v>=0&&v<l&&$>=0&&$<l&&d-u>=0&&d+u<=c){var b=new yy(v,$,x,p);b._round(),(!n||Ty(e,b,o,n,r))&&f.push(b)}}h+=g}return!s&&!f.length&&!a&&(f=Ry(e,h/2,i,n,r,o,a,!0,l)),f}Py.getCenterAnchor=function(e,t,i,n,r,o){for(var a=Ly(i,r,o),s=My(i,n)*o,l=0,u=Ay(e)/2,c=0;c<e.length-1;c++){var h=e[c],d=e[c+1],f=h.dist(d);if(l+f>u){var p=(u-l)/f,_=Ey(h.x,d.x,p),m=Ey(h.y,d.y,p),g=new yy(_,m,d.angleTo(h),c);return g._round(),!a||Ty(e,g,s,a,t)?g:void 0}l+=f}},Py.getAnchors=function(e,t,i,n,r,o,a,s,l){var u=Ly(n,o,a),c=My(n,r),h=c*a,d=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-h<t/4&&(t=h+t/4),Ry(e,d?t/2*s%t:(c/2+2*o)*a*s%t,t,u,i,h,d,!1,l)};var Oy,Dy=(Oy=!0,function(e,t){var i=Oy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Oy=!1,i}),Iy=Dy(void 0,(function(){return Iy.toString().search("(((.+)+)+)+$").toString().constructor(Iy).search("(((.+)+)+)+$")}));function By(e,t,i,n,r){for(var o=[],a=0;a<e.length;a++)for(var s=e[a],l=void 0,u=0;u<s.length-1;u++){var c=s[u],h=s[u+1];c.x<t&&h.x<t||(c.x<t?c=new to(t,c.y+(h.y-c.y)*((t-c.x)/(h.x-c.x)))._round():h.x<t&&(h=new to(t,c.y+(h.y-c.y)*((t-c.x)/(h.x-c.x)))._round()),c.y<i&&h.y<i||(c.y<i?c=new to(c.x+(h.x-c.x)*((i-c.y)/(h.y-c.y)),i)._round():h.y<i&&(h=new to(c.x+(h.x-c.x)*((i-c.y)/(h.y-c.y)),i)._round()),c.x>=n&&h.x>=n||(c.x>=n?c=new to(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round():h.x>=n&&(h=new to(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round()),c.y>=r&&h.y>=r||(c.y>=r?c=new to(c.x+(h.x-c.x)*((r-c.y)/(h.y-c.y)),r)._round():h.y>=r&&(h=new to(c.x+(h.x-c.x)*((r-c.y)/(h.y-c.y)),r)._round()),(!l||!c.equals(l[l.length-1]))&&(l=[c],o.push(l)),l.push(h)))))}return o}Iy();var Fy,Ny=(Fy=!0,function(e,t){var i=Fy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Fy=!1,i}),Gy=Ny(void 0,(function(){return Gy.toString().search("(((.+)+)+)+$").toString().constructor(Gy).search("(((.+)+)+)+$")}));Gy();var zy=1,Uy=-17,Vy=3,ky=function(){},Wy=zy;function Hy(e,t,i){for(var n=0,r=0,o=e;r<o.length;r+=1){var a=o[r];n+=Math.max(t,Math.min(i,a[1]))-Math.max(t,Math.min(i,a[0]))}return n}function qy(e,t,i){for(var n=[{fixed:-Wy,stretch:0}],r=0,o=e;r<o.length;r+=1){var a=o[r],s=a[0],l=a[1],u=n[n.length-1];n.push({fixed:s-u.stretch,stretch:u.stretch}),n.push({fixed:s-u.stretch,stretch:u.stretch+(l-s)})}return n.push({fixed:t+Wy,stretch:i}),n}function jy(e,t,i,n){return e/t*i+n}function Xy(e,t,i,n){return e-t*i/n}ky.getIconQuads=function(e,t,i,n){var r=[],o=e.image,a=o.pixelRatio,s=o.paddedRect.w-2*Wy,l=o.paddedRect.h-2*Wy,u=e.right-e.left,c=e.bottom-e.top,h=o.stretchX||[[0,s]],d=o.stretchY||[[0,l]],f=function(e,t){return e+t[1]-t[0]},p=h.reduce(f,0),_=d.reduce(f,0),m=s-p,g=l-_,x=0,y=p,v=0,$=_,b=0,T=m,C=0,S=g;if(o.content&&n){var w=o.content;x=Hy(h,0,w[0]),v=Hy(d,0,w[1]),y=Hy(h,w[0],w[2]),$=Hy(d,w[1],w[3]),b=w[0]-x,C=w[1]-v,T=w[2]-w[0]-y,S=w[3]-w[1]-$}var E=function(n,r,s,l){var h=jy(n.stretch-x,y,u,e.left),d=Xy(n.fixed-b,T,n.stretch,p),f=jy(r.stretch-v,$,c,e.top),m=Xy(r.fixed-C,S,r.stretch,_),g=jy(s.stretch-x,y,u,e.left),w=Xy(s.fixed-b,T,s.stretch,p),E=jy(l.stretch-v,$,c,e.top),P=Xy(l.fixed-C,S,l.stretch,_),A=new to(h,f),L=new to(g,f),M=new to(g,E),R=new to(h,E),O=new to(d/a,m/a),D=new to(w/a,P/a),I=t*Math.PI/180;if(I){var B=Math.sin(I),F=Math.cos(I),N=[F,-B,B,F];A._matMult(N),L._matMult(N),R._matMult(N),M._matMult(N)}var G=n.stretch+n.fixed,z=s.stretch+s.fixed,U=r.stretch+r.fixed,V=l.stretch+l.fixed;return{tl:A,tr:L,bl:R,br:M,tex:{x:o.paddedRect.x+Wy+G,y:o.paddedRect.y+Wy+U,w:z-G,h:V-U},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:O,pixelOffsetBR:D,minFontScaleX:T/a/u,minFontScaleY:S/a/c,isSDF:i}};if(n&&(o.stretchX||o.stretchY))for(var P=qy(h,m,p),A=qy(d,g,_),L=0;L<P.length-1;L++)for(var M=P[L],R=P[L+1],O=0;O<A.length-1;O++){var D=A[O],I=A[O+1];r.push(E(M,D,R,I))}else r.push(E({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:s+1},{fixed:0,stretch:l+1}));return r},ky.getGlyphQuads=function(e,t,i,n,r,o,a,s){for(var l=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=[],c=0,h=t.positionedLines;c<h.length;c+=1)for(var d=h[c],f=0,p=d.positionedGlyphs;f<p.length;f+=1){var _=p[f];if(_.rect){var m=_.rect||{},g=Vy+1,x=!0,y=1,v=0,$=(r||s)&&_.vertical,b=_.metrics.advance*_.scale/2;if(s&&t.verticalizable){var T=(_.scale-1)*tx,C=(tx-_.metrics.width*_.scale)/2;v=d.lineOffset/2-(_.imageName?-C:T)}if(_.imageName){var S=a[_.imageName];x=S.sdf,y=S.pixelRatio,g=zy/y}var w=r?[_.x+b,_.y]:[0,0],E=r?[0,0]:[_.x+b+i[0],_.y+i[1]-v],P=[0,0];$&&(P=E,E=[0,0]);var A=(_.metrics.left-g)*_.scale-b+E[0],L=(-_.metrics.top-g)*_.scale+E[1],M=A+m.w*_.scale/y,R=L+m.h*_.scale/y,O=new to(A,L),D=new to(M,L),I=new to(A,R),B=new to(M,R);if($){var F=new to(-b,b-Uy),N=-Math.PI/2,G=tx/2-b,z=_.imageName?G:0,U=new to(5-Uy-G,-z),V=new(Function.prototype.bind.apply(to,[null].concat(P)));O._rotateAround(N,F)._add(U)._add(V),D._rotateAround(N,F)._add(U)._add(V),I._rotateAround(N,F)._add(U)._add(V),B._rotateAround(N,F)._add(U)._add(V)}if(l){var k=Math.sin(l),W=Math.cos(l),H=[W,-k,k,W];O._matMult(H),D._matMult(H),I._matMult(H),B._matMult(H)}var q=new to(0,0),j=new to(0,0);u.push({tl:O,tr:D,bl:I,br:B,tex:m,writingMode:t.writingMode,glyphOffset:w,sectionIndex:_.sectionIndex,isSDF:x,pixelOffsetTL:q,pixelOffsetBR:j,minFontScaleX:0,minFontScaleY:0})}}return u};var Yy,Zy=(Yy=!0,function(e,t){var i=Yy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Yy=!1,i}),Ky=Zy(void 0,(function(){return Ky.toString().search("(((.+)+)+)+$").toString().constructor(Ky).search("(((.+)+)+)+$")}));Ky();var Qy=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=a.top*s-l,f=a.bottom*s+l,p=a.left*s-l,_=a.right*s+l,m=a.collisionPadding;if(m&&(p-=m[0]*s,d-=m[1]*s,_+=m[2]*s,f+=m[3]*s),this.boxStartIndex=e.length,u){var g=f-d,x=_-p;g>0&&(g=Math.max(10*s,g),this._addLineCollisionCircles(e,t,i,i.segment,x,g,n,r,o,c))}else{if(h){var y=new to(p,d),v=new to(_,d),$=new to(p,f),b=new to(_,f),T=h*Math.PI/180;y._rotate(T),v._rotate(T),$._rotate(T),b._rotate(T),p=Math.min(y.x,v.x,$.x,b.x),_=Math.max(y.x,v.x,$.x,b.x),d=Math.min(y.y,v.y,$.y,b.y),f=Math.max(y.y,v.y,$.y,b.y)}e.emplaceBack(i.x,i.y,p,d,_,f,n,r,o,0,0)}this.boxEndIndex=e.length};Qy.prototype._addLineCollisionCircles=function(e,t,i,n,r,o,a,s,l,u){var c=o/2,h=Math.floor(r/c)||1,d=1+.4*Math.log(u)/Math.LN2,f=Math.floor(h*d/2),p=-o/2,_=i,m=n+1,g=p,x=-r/2,y=x-r/4;do{if(--m<0){if(g>x)return;m=0;break}g-=t[m].dist(_),_=t[m]}while(g>y);for(var v=t[m].dist(t[m+1]),$=-f;$<h+f;$++){var b=$*c,T=x+b;if(b<0&&(T+=b),b>r&&(T+=b-r),!(T<g)){for(;g+v<T;){if(g+=v,1+ ++m>=t.length)return;v=t[m].dist(t[m+1])}var C=T-g,S=t[m],w=t[m+1].sub(S)._unit()._mult(C)._add(S)._round(),E=Math.abs(T-p)<c?0:.8*(T-p);e.emplaceBack(w.x,w.y,-o/2,-o/2,o/2,o/2,a,s,l,o/2,E)}}};var Jy,ev=(Jy=!0,function(e,t){var i=Jy?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Jy=!1,i}),tv=ev(void 0,(function(){return tv.toString().search("(((.+)+)+)+$").toString().constructor(tv).search("(((.+)+)+)+$")}));function iv(e,t,i){void 0===t&&(t=1),void 0===i&&(i=!1);for(var n=1/0,r=1/0,o=-1/0,a=-1/0,s=e[0],l=0;l<s.length;l++){var u=s[l];(!l||u.x<n)&&(n=u.x),(!l||u.y<r)&&(r=u.y),(!l||u.x>o)&&(o=u.x),(!l||u.y>a)&&(a=u.y)}var c=o-n,h=a-r,d=Math.min(c,h),f=d/2,p=new TinyQueue([],nv);if(0===d)return new to(n,r);for(var _=n;_<o;_+=d)for(var m=r;m<a;m+=d)p.push(new rv(_+f,m+f,f,e));for(var g=av(e),x=p.length;p.length;){var y=p.pop();(y.d>g.d||!g.d)&&(g=y,i&&console.log("found best %d after %d probes",Math.round(1e4*y.d)/1e4,x)),y.max-g.d<=t||(f=y.h/2,p.push(new rv(y.p.x-f,y.p.y-f,f,e)),p.push(new rv(y.p.x+f,y.p.y-f,f,e)),p.push(new rv(y.p.x-f,y.p.y+f,f,e)),p.push(new rv(y.p.x+f,y.p.y+f,f,e)),x+=4)}return i&&(console.log("num probes: "+x),console.log("best distance: "+g.d)),g.p}function nv(e,t){return t.max-e.max}function rv(e,t,i,n){this.p=new to(e,t),this.h=i,this.d=ov(this.p,n),this.max=this.d+this.h*Math.SQRT2}function ov(e,t){for(var i=!1,n=1/0,r=0;r<t.length;r++)for(var o=t[r],a=0,s=o.length,l=s-1;a<s;l=a++){var u=o[a],c=o[l];u.y>e.y!=c.y>e.y&&e.x<(c.x-u.x)*(e.y-u.y)/(c.y-u.y)+u.x&&(i=!i),n=Math.min(n,pf.distToSegmentSquared(e,u,c))}return(i?1:-1)*Math.sqrt(n)}function av(e){for(var t=0,i=0,n=0,r=e[0],o=0,a=r.length,s=a-1;o<a;s=o++){var l=r[o],u=r[s],c=l.x*u.y-u.x*l.y;i+=(l.x+u.x)*c,n+=(l.y+u.y)*c,t+=3*c}return new rv(i/t,n/t,0,e)}tv();var sv,lv=(sv=!0,function(e,t){var i=sv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return sv=!1,i}),uv=lv(void 0,(function(){return uv.toString().search("(((.+)+)+)+$").toString().constructor(uv).search("(((.+)+)+)+$")}));function cv(e,t){var i,n,r,o,a,s,l,u;for(i=3&e.length,n=e.length-i,r=t,a=3432918353,s=461845907,u=0;u<n;)l=255&e.charCodeAt(u)|(255&e.charCodeAt(++u))<<8|(255&e.charCodeAt(++u))<<16|(255&e.charCodeAt(++u))<<24,++u,r=27492+(65535&(o=5*(65535&(r=(r^=l=(65535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,i){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:r^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return r^=e.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}uv();const hv=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),dv=hv(void 0,(function(){return dv.toString().search("(((.+)+)+)+$").toString().constructor(dv).search("(((.+)+)+)+$")}));dv();const fv=7,pv=Number.POSITIVE_INFINITY;function _v(e,t){return t[1]!==pv?function(e,t,i){let n=0,r=0;switch(t=Math.abs(t),i=Math.abs(i),e){case"top-right":case"top-left":case"top":r=i-fv;break;case"bottom-right":case"bottom-left":case"bottom":r=-i+fv}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,r]}(e,t[0],t[1]):function(e,t){let i=0,n=0;t<0&&(t=0);const r=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":n=r-fv;break;case"bottom-right":case"bottom-left":n=-r+fv;break;case"bottom":n=-t+fv;break;case"top":n=t-fv}switch(e){case"top-right":case"bottom-right":i=-r;break;case"top-left":case"bottom-left":i=r;break;case"left":i=t;break;case"right":i=-t}return[i,n]}(e,t[0])}function mv(e,t,i,n,r,o){e.createArrays();const a=512*e.overscaling;e.tilePixelRatio=$o/a,e.compareText={},e.iconsNeedLinear=!1;const s=e.layers[0].layout,l=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){const{minZoom:t,maxZoom:i}=e.textSizeData;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new go(t)),l["text-size"].possiblyEvaluate(new go(i))]}if("composite"===e.iconSizeData.kind){const{minZoom:t,maxZoom:i}=e.iconSizeData;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new go(t)),l["icon-size"].possiblyEvaluate(new go(i))]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new go(e.zoom+1)),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new go(e.zoom+1)),u.textMaxSize=l["text-size"].possiblyEvaluate(new go(18));const c=s.get("text-line-height")*tx,h="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),d=s.get("text-keep-upright"),f=s.get("text-size");for(const o of e.features){const a=s.get("text-font").evaluate(o,{}).join(","),l=f.evaluate(o,{}),p=u.layoutTextSize.evaluate(o,{}),_=u.layoutIconSize.evaluate(o,{}),m={horizontal:{},vertical:void 0},g=o.text;let x=[0,0];if(g){const n=g.toString(),u=s.get("text-letter-spacing").evaluate(o,{})*tx,f=Zm(n)?u:0,_=s.get("text-anchor").evaluate(o,{}),y=s.get("text-variable-anchor");if(!y){const e=s.get("text-radial-offset").evaluate(o,{});x=e?_v(_,[e*tx,pv]):s.get("text-offset").evaluate(o,{}).map((e=>e*tx))}let v=h?"center":s.get("text-justify").evaluate(o,{});const $=s.get("symbol-placement"),b="point"===$?s.get("text-max-width").evaluate(o,{})*tx:0,T=()=>{e.allowVerticalPlacement&&Ym(n)&&(m.vertical=Zx(g,t,i,r,a,b,c,_,"left",f,x,Vx.vertical,!0,$,p,l))};if(!h&&y){const e="auto"===v?y.map((e=>gv(e))):[v];let n=!1;for(let o=0;o<e.length;o++){const s=e[o];if(!m.horizontal[s])if(n)m.horizontal[s]=m.horizontal[0];else{const e=Zx(g,t,i,r,a,b,c,"center",s,f,x,Vx.horizontal,!1,$,p,l);e&&(m.horizontal[s]=e,n=1===e.positionedLines.length)}}T()}else{"auto"===v&&(v=gv(_));const e=Zx(g,t,i,r,a,b,c,_,v,f,x,Vx.horizontal,!1,$,p,l);e&&(m.horizontal[v]=e),T(),Ym(n)&&h&&d&&(m.vertical=Zx(g,t,i,r,a,b,c,_,v,f,x,Vx.vertical,!1,$,p,l))}}let y,v=!1;if(o.icon&&o.icon.name){const t=n[o.icon.name];t&&(y=cy(r[o.icon.name],s.get("icon-offset").evaluate(o,{}),s.get("icon-anchor").evaluate(o,{})),v=t.sdf,void 0===e.sdfIcons?e.sdfIcons=t.sdf:e.sdfIcons!==t.sdf&&zh("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(t.pixelRatio!==e.pixelRatio||0!==s.get("icon-rotate").constantOr(1))&&(e.iconsNeedLinear=!0))}const $=bv(m.horizontal)||m.vertical;e.iconsInText=!!$&&$.iconsInText,($||y)&&xv(e,o,m,y,n,u,p,_,x,v)}o&&e.generateCollisionDebugBuffers()}function gv(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function xv(e,t,i,n,r,o,a,s,l,u){let c=o.textMaxSize.evaluate(t,{});void 0===c&&(c=a);const h=e.layers[0].layout,d=h.get("icon-offset").evaluate(t,{}),f=bv(i.horizontal),p=a/24,_=e.tilePixelRatio*p,m=e.tilePixelRatio*c/24,g=e.tilePixelRatio*s,x=e.tilePixelRatio*h.get("symbol-spacing"),y=h.get("text-padding")*e.tilePixelRatio,v=h.get("icon-padding")*e.tilePixelRatio,$=h.get("text-max-angle")/180*Math.PI,b="map"===h.get("text-rotation-alignment")&&"point"!==h.get("symbol-placement"),T="map"===h.get("icon-rotation-alignment")&&"point"!==h.get("symbol-placement"),C=h.get("symbol-placement"),S=x/2,w=h.get("icon-text-fit");let E;n&&"none"!==w&&(e.allowVerticalPlacement&&i.vertical&&(E=hy(n,i.vertical,w,h.get("icon-text-fit-padding"),d,p)),f&&(n=hy(n,f,w,h.get("icon-text-fit-padding"),d,p)));const P=(a,s)=>{s.x<0||s.x>=$o||s.y<0||s.y>=$o||Tv(e,s,a,i,n,r,E,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,_,y,b,l,g,v,T,d,t,o,u)};if("line"===C)for(const r of By(t.geometry,0,0,$o,$o)){const t=Py.getAnchors(r,x,$,i.vertical||f,n,24,m,e.overscaling,$o);for(const i of t){const t=f;(!t||!Cv(e,t.text,S,i))&&P(r,i)}}else if("line-center"===C){for(const e of t.geometry)if(e.length>1){const t=Py.getCenterAnchor(e,$,i.vertical||f,n,24,m);t&&P(e,t)}}else if("Polygon"===t.type)for(const e of Ff(t.geometry,0)){const t=iv(e,16);P(e[0],new yy(t.x,t.y,0))}else if("LineString"===t.type)for(const e of t.geometry)P(e,new yy(e[0].x,e[0].y,0));else if("Point"===t.type)for(const e of t.geometry)for(const t of e)P([t],new yy(t.x,t.y,0))}const yv=255,vv=yv*gy;function $v(e,t,i,n,r,o,a,s,l,u,c,h,d,f){const p=ky.getGlyphQuads(t,i,s,r,o,a,n,e.allowVerticalPlacement),_=e.textSizeData;let m=null;"source"===_.kind?(m=[gy*r.layout.get("text-size").evaluate(a,{})],m[0]>vv&&zh(e.layerIds[0]+': Value for "text-size" is >= '+yv+'. Reduce your "text-size".')):"composite"===_.kind&&(m=[gy*f.compositeTextSizes[0].evaluate(a,{}),gy*f.compositeTextSizes[1].evaluate(a,{})],(m[0]>vv||m[1]>vv)&&zh(e.layerIds[0]+': Value for "text-size" is >= '+yv+'. Reduce your "text-size".')),e.addSymbols(e.text,p,m,s,o,a,u,t,l.lineStartIndex,l.lineLength,d);for(const t of c)h[t]=e.text.placedSymbolArray.length-1;return 4*p.length}function bv(e){for(const t in e)return e[t];return null}function Tv(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b){const T=e.addToLineVertexArray(t,i);let C,S,w,E,P=0,A=0,L=0,M=0,R=-1,O=-1;const D={};let I=cv(""),B=0,F=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?[B,F]=s.layout.get("text-offset").evaluate(v,{}).map((e=>e*tx)):(B=s.layout.get("text-radial-offset").evaluate(v,{})*tx,F=pv),e.allowVerticalPlacement&&n.vertical){const r=s.layout.get("text-rotate").evaluate(v,{})+90,o=n.vertical;w=new Qy(l,i,t,u,c,h,o,d,f,p,e.overscaling,r),a&&(E=new Qy(l,i,t,u,c,h,a,m,g,p,e.overscaling,r))}if(r){const n=s.layout.get("icon-rotate").evaluate(v,{}),o="none"!==s.layout.get("icon-text-fit"),d=ky.getIconQuads(r,n,b,o),f=a?ky.getIconQuads(a,n,b,o):void 0;S=new Qy(l,i,t,u,c,h,r,m,g,!1,e.overscaling,n),P=4*d.length;const p=e.iconSizeData;let _=null;"source"===p.kind?(_=[gy*s.layout.get("icon-size").evaluate(v,{})],_[0]>vv&&zh(e.layerIds[0]+': Value for "icon-size" is >= '+yv+'. Reduce your "icon-size".')):"composite"===p.kind&&(_=[gy*$.compositeIconSizes[0].evaluate(v,{}),gy*$.compositeIconSizes[1].evaluate(v,{})],(_[0]>vv||_[1]>vv)&&zh(e.layerIds[0]+': Value for "icon-size" is >= '+yv+'. Reduce your "icon-size".')),e.addSymbols(e.icon,d,_,y,x,v,!1,t,T.lineStartIndex,T.lineLength,-1),R=e.icon.placedSymbolArray.length-1,f&&(A=4*f.length,e.addSymbols(e.icon,f,_,y,x,v,Vx.vertical,t,T.lineStartIndex,T.lineLength,-1),O=e.icon.placedSymbolArray.length-1)}for(const r in n.horizontal){const a=n.horizontal[r];if(!C){I=cv(a.text);const n=s.layout.get("text-rotate").evaluate(v,{});C=new Qy(l,i,t,u,c,h,a,d,f,p,e.overscaling,n)}const m=1===a.positionedLines.length;if(L+=$v(e,t,a,o,s,p,v,_,T,n.vertical?Vx.horizontal:Vx.horizontalOnly,m?Object.keys(n.horizontal):[r],D,R,$),m)break}n.vertical&&(M+=$v(e,t,n.vertical,o,s,p,v,_,T,Vx.vertical,["vertical"],D,O,$));const N=C?C.boxStartIndex:e.collisionBoxArray.length,G=C?C.boxEndIndex:e.collisionBoxArray.length,z=w?w.boxStartIndex:e.collisionBoxArray.length,U=w?w.boxEndIndex:e.collisionBoxArray.length,V=S?S.boxStartIndex:e.collisionBoxArray.length,k=S?S.boxEndIndex:e.collisionBoxArray.length,W=E?E.boxStartIndex:e.collisionBoxArray.length,H=E?E.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=zv.MAX_GLYPHS&&zh("Too many glyphs being rendered in a tile."),e.symbolInstances.emplaceBack(t.x,t.y,D.right>=0?D.right:-1,D.center>=0?D.center:-1,D.left>=0?D.left:-1,D.vertical||-1,R,O,I,N,G,z,U,V,k,W,H,u,L,M,P,A,0,d,B,F)}function Cv(e,t,i,n){const r=e.compareText;if(t in r){const e=r[t];for(let t=e.length-1;t>=0;t--)if(n.dist(e[t])<i)return!0}else r[t]=[];return r[t].push(n),!1}var Sv,wv=(Sv=!0,function(e,t){var i=Sv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Sv=!1,i}),Ev=wv(void 0,(function(){return Ev.toString().search("(((.+)+)+)+$").toString().constructor(Ev).search("(((.+)+)+)+$")}));function Pv(e,t,i){var n=t.layout.get("text-transform").evaluate(i,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),e}function Av(e,t,i){return e.sections.forEach((function(e){e.text=Pv(e.text,t,i)})),e}Ev();var Lv,Mv=(Lv=!0,function(e,t){var i=Lv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Lv=!1,i}),Rv=Mv(void 0,(function(){return Rv.toString().search("(((.+)+)+)+$").toString().constructor(Rv).search("(((.+)+)+)+$")}));Rv();var Ov=["Unknown","Point","LineString","Polygon"],Dv=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Iv(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=s?Math.min(vv,Math.round(s[0])):0,p=s?Math.min(vv,Math.round(s[1])):0;e.emplaceBack(t,i,Math.round(32*n),Math.round(32*r),o,a,(f<<1)+(l?1:0),p,16*u,16*c,256*h,256*d)}function Bv(e,t,i){e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i)}function Fv(e){for(var t=0,i=e.sections;t<i.length;t+=1)if(rg(i[t].text))return!0;return!1}var Nv=function(e){this.layoutVertexArray=new Uo,this.indexArray=new Qo,this.programConfigurations=e,this.segments=new Ao,this.dynamicLayoutVertexArray=new Vo,this.opacityVertexArray=new ko,this.placedSymbolArray=new ua};Nv.prototype.upload=function(e,t,i,n){i&&(this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,Nm.members)),this.indexArray.length>0&&(this.indexBuffer=Tc.toIndexBuffer(e,this.indexArray,t)),this.dynamicLayoutVertexArray.length>0&&(this.dynamicLayoutVertexBuffer=Tc.toVertexBuffer(e,this.dynamicLayoutVertexArray,Gm.members,!0)),this.opacityVertexArray.length>0&&(this.opacityVertexBuffer=Tc.toVertexBuffer(e,this.opacityVertexArray,Dv,!0),this.opacityVertexBuffer.itemSize=1)),(i||n)&&this.programConfigurations.upload(e)},Nv.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.dynamicLayoutVertexBuffer&&(this.dynamicLayoutVertexBuffer.destroy(),this.dynamicLayoutVertexBuffer=null),this.opacityVertexBuffer&&(this.opacityVertexBuffer.destroy(),this.opacityVertexBuffer=null),this.programConfigurations.destroy(),this.segments.destroy()},Nv.prototype.clear=function(){},en.register("SymbolBuffers",Nv);var Gv=function(e,t,i){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new i,this.segments=new Ao,this.collisionVertexArray=new qo};Gv.prototype.upload=function(e){this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=Tc.toVertexBuffer(e,this.layoutVertexArray,this.layoutAttributes)),this.indexArray.length>0&&(this.indexBuffer=Tc.toIndexBuffer(e,this.indexArray)),this.collisionVertexArray.length>0&&(this.collisionVertexBuffer=Tc.toVertexBuffer(e,this.collisionVertexArray,zm.members,!0))},Gv.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.collisionVertexBuffer&&(this.collisionVertexBuffer.destroy(),this.collisionVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.segments.destroy()},en.register("CollisionBuffers",Gv);var zv=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasPaintOverrides=!1,this.hasRTLText=!1;var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=xy(this.zoom,t["text-size"]),this.iconSizeData=xy(this.zoom,t["icon-size"]);var i=this.layers[0].layout,n=i.get("symbol-sort-key"),r=i.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==r&&void 0!==n.constantOr(1);var o="viewport-y"===r||"auto"===r&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map((function(e){return Vx[e]}))),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id})),this.sourceID=e.sourceID,this.overscaling=1};zv.prototype.createArrays=function(){const e=this.layers[0].layout;this.hasPaintOverrides=Qv.hasPaintOverrides(e);var t=Nm.members;this.text=new Nv(new eh(t,this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new Nv(new eh(t,this.layers,this.zoom,(e=>/^icon/.test(e)))),this.textCollisionBox=new Gv(Ho,Um.members,Jo),this.iconCollisionBox=new Gv(Ho,Um.members,Jo),this.textCollisionCircle=new Gv(Ho,Vm.members,Qo),this.iconCollisionCircle=new Gv(Ho,Vm.members,Qo),this.glyphOffsetArray=new fa,this.lineVertexArray=new _a,this.symbolInstances=new ha},zv.prototype.calculateGlyphDependencies=function(e,t,i,n,r){for(let o=0;o<e.length;o++)if(t[e.charCodeAt(o)]=!0,(i||n)&&r){const i=sg[e.charAt(o)];i&&(t[i.charCodeAt(0)]=!0)}},zv.prototype.populate=function(e,t){var i=this.layers[0],n=i.layout,r=n.get("text-font"),o=n.get("text-field"),a=n.get("icon-image"),s=("constant"!==o.value.kind||o.value.value instanceof ie&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&("constant"!==r.value.kind||r.value.value.length>0),l=("constant"!==a.value.kind||!!a.value.value)&&Object.keys(a.parameters).length>0,u=n.get("symbol-sort-key");if(this.features=[],s||l){for(var c=t.iconDependencies,h=t.glyphDependencies,d=t.availableImages,f=new go(this.zoom),p=0,_=e;p<_.length;p+=1){var m=_[p],g=m.feature,x=m.index,y=m.sourceLayerIndex;if(i._featureFilter(f,g)){var v=void 0;if(s){var $=i.getValueAndResolveTokens("text-field",g,d),b=ie.factory($);Fv(b)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===getRTLTextPluginStatus()||this.hasRTLText&&plugin.isParsed())&&(v=Av(b,i,g))}var T=void 0;if(l){var C=i.getValueAndResolveTokens("icon-image",g,d);T=C instanceof ae?C:ae.fromString(C)}if(v||T){var S=this.sortFeaturesByKey?u.evaluate(g,{}):void 0,w={text:v,icon:T,index:x,sourceLayerIndex:y,geometry:So(g),properties:g.properties,type:Ov[g.type],sortKey:S};if(void 0!==g.id&&(w.id=g.id),this.features.push(w),T&&(c[T.name]=!0),v){var E=r.evaluate(g,{}).join(","),P="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(Vx.vertical)>=0;for(var A=0,L=v.sections;A<L.length;A+=1){var M=L[A];if(M.image)c[M.image.name]=!0;else{var R=Ym(v.toString()),O=M.fontStack||E,D=h[O]=h[O]||{};this.calculateGlyphDependencies(M.text,D,P,this.allowVerticalPlacement,R)}}}}}}if("point"===n.get("symbol-placement"))for(p=0,_=this.features;p<_.length;p+=1){var I=_[p],B=I.geometry,F=I.index,N=I.sourceLayerIndex,G=e[F].feature;t.featureIndex.insert(G,B,F,N,this.index)}"line"===n.get("symbol-placement")&&(this.features=_g(this.features)),this.sortFeaturesByKey&&this.features.sort((function(e,t){return e.sortKey-t.sortKey}))}},zv.prototype.update=function(e,t,i){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,i),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,i))},zv.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},zv.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},zv.prototype.upload=function(e){this.text&&(!this.uploaded&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e),this.textCollisionCircle.upload(e),this.iconCollisionCircle.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0)},zv.prototype.destroy=function(){this.text&&(this.text.destroy(),this.icon.destroy(),this.textCollisionBox.destroy(),this.iconCollisionBox.destroy(),this.textCollisionCircle.destroy(),this.iconCollisionCircle.destroy())},zv.prototype.clear=function(){},zv.prototype.addToLineVertexArray=function(e,t){var i=this.lineVertexArray.length;if(void 0!==e.segment){for(var n=e.dist(t[e.segment+1]),r=e.dist(t[e.segment]),o={},a=e.segment+1;a<t.length;a++)o[a]={x:t[a].x,y:t[a].y,tileUnitDistanceFromAnchor:n},a<t.length-1&&(n+=t[a+1].dist(t[a]));for(var s=e.segment||0;s>=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:r},s>0&&(r+=t[s-1].dist(t[s]));for(var l=0;l<t.length;l++){var u=o[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:i,lineLength:this.lineVertexArray.length-i}},zv.prototype.addSymbols=function(e,t,i,n,r,o,a,s,l,u,c){var h=this,d=e.indexArray,f=e.layoutVertexArray,p=e.dynamicLayoutVertexArray,_=e.segments.prepareSegment(4*t.length,e.layoutVertexArray,e.indexArray,o.sortKey),m=this.glyphOffsetArray.length,g=_.vertexLength,x=this.allowVerticalPlacement&&a===Vx.vertical?Math.PI/2:0,y=function(e){var t=e.tl,n=e.tr,r=e.bl,o=e.br,a=e.tex,l=e.pixelOffsetTL,u=e.pixelOffsetBR,c=e.minFontScaleX,m=e.minFontScaleY,g=_.vertexLength,y=e.glyphOffset[1];Iv(f,s.x,s.y,t.x,y+t.y,a.x,a.y+a.h,i,e.isSDF,l.x,l.y,c,m),Iv(f,s.x,s.y,n.x,y+n.y,a.x+a.w,a.y+a.h,i,e.isSDF,u.x,l.y,c,m),Iv(f,s.x,s.y,r.x,y+r.y,a.x,a.y,i,e.isSDF,l.x,u.y,c,m),Iv(f,s.x,s.y,o.x,y+o.y,a.x+a.w,a.y,i,e.isSDF,u.x,u.y,c,m),Bv(p,s,x),d.emplaceBack(g,g+1,g+2),d.emplaceBack(g+1,g+2,g+3),_.vertexLength+=4,_.primitiveLength+=2,h.glyphOffsetArray.emplaceBack(e.glyphOffset[0])};if(o.text&&o.text.sections){var v=o.text.sections;if(this.hasPaintOverrides){for(var $,b=function(t,i){void 0!==$&&($!==t||i)&&e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},v[$]),$=t},T=0,C=t;T<C.length;T+=1){var S=C[T];b(S.sectionIndex,!1),y(S)}b($,!0)}else{for(var w=0,E=t;w<E.length;w+=1)y(E[w]);e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},v[0])}}else{for(var P=0,A=t;P<A.length;P+=1)y(A[P]);e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{})}e.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,g,l,u,s.segment,i?i[0]:0,i?i[1]:0,n[0],n[1],a,0,!1,0,c)},zv.prototype._addCollisionDebugVertex=function(e,t,i,n,r,o){return t.emplaceBack(0,0),e.emplaceBack(i.x,i.y,n,r,Math.round(o.x),Math.round(o.y))},zv.prototype.addCollisionDebugVertices=function(e,t,i,n,r,o,a,s){var l=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),u=l.vertexLength,c=r.layoutVertexArray,h=r.collisionVertexArray,d=a.anchorX,f=a.anchorY;if(this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,n)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,n)),l.vertexLength+=4,s){var p=r.indexArray;p.emplaceBack(u,u+1,u+2),p.emplaceBack(u,u+2,u+3),l.primitiveLength+=2}else{var _=r.indexArray;_.emplaceBack(u,u+1),_.emplaceBack(u+1,u+2),_.emplaceBack(u+2,u+3),_.emplaceBack(u+3,u),l.primitiveLength+=4}},zv.prototype.addDebugCollisionBoxes=function(e,t,i,n){for(var r=e;r<t;r++){var o=this.collisionBoxArray.get(r),a=o.x1,s=o.y1,l=o.x2,u=o.y2,c=o.radius>0;this.addCollisionDebugVertices(a,s,l,u,c?n?this.textCollisionCircle:this.iconCollisionCircle:n?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,i,c)}},zv.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e<this.symbolInstances.length;e++){var t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}},zv.prototype._deserializeCollisionBoxesForSymbol=function(e,t,i,n,r,o,a,s,l){for(var u={},c=t;c<i;c++){var h=e.get(c);if(0===h.radius){u.textBox={x1:h.x1,y1:h.y1,x2:h.x2,y2:h.y2,anchorPointX:h.anchorPointX,anchorPointY:h.anchorPointY},u.textFeatureIndex=h.featureIndex;break}!u.textCircles&&(u.textCircles=[],u.textFeatureIndex=h.featureIndex),u.textCircles.push(h.anchorPointX,h.anchorPointY,h.radius,h.signedDistanceFromAnchor,1)}for(var d=n;d<r;d++){var f=e.get(d);if(0===f.radius){u.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalTextFeatureIndex=f.featureIndex;break}}for(var p=o;p<a;p++){var _=e.get(p);if(0===_.radius){u.iconBox={x1:_.x1,y1:_.y1,x2:_.x2,y2:_.y2,anchorPointX:_.anchorPointX,anchorPointY:_.anchorPointY},u.iconFeatureIndex=_.featureIndex;break}}for(var m=s;m<l;m++){var g=e.get(m);if(0===g.radius){u.verticalIconBox={x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,anchorPointX:g.anchorPointX,anchorPointY:g.anchorPointY},u.verticalIconFeatureIndex=g.featureIndex;break}}return u},zv.prototype.deserializeCollisionBoxes=function(e){this.collisionArrays=[];for(var t=0;t<this.symbolInstances.length;t++){var i=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,i.textBoxStartIndex,i.textBoxEndIndex,i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i.iconBoxStartIndex,i.iconBoxEndIndex,i.verticalIconBoxStartIndex,i.verticalIconBoxEndIndex))}},zv.prototype.hasTextData=function(){return this.text.segments.get().length>0},zv.prototype.hasIconData=function(){return this.icon.segments.get().length>0},zv.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},zv.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},zv.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},zv.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},zv.prototype.addIndicesForPlacedSymbol=function(e,t){for(var i=e.placedSymbolArray.get(t),n=i.vertexStartIndex+4*i.numGlyphs,r=i.vertexStartIndex;r<n;r+=4)e.indexArray.emplaceBack(r,r+1,r+2),e.indexArray.emplaceBack(r+1,r+2,r+3)},zv.prototype.getSortedSymbolIndexes=function(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var t=Math.sin(e),i=Math.cos(e),n=[],r=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);n.push(0|Math.round(t*s.anchorX+i*s.anchorY)),r.push(s.featureIndex)}return o.sort((function(e,t){return n[e]-n[t]||r[t]-r[e]})),o},zv.prototype.sortFeatures=function(e){var t=this;if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var i=0,n=this.symbolInstanceIndexes;i<n.length;i+=1){var r=n[i],o=this.symbolInstances.get(r);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(e,i,n){e>=0&&n.indexOf(e)===i&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},en.register("SymbolBucket",zv,{omit:["layers","collisionBoxArray","compareText"]}),zv.MAX_GLYPHS=65535,zv.addDynamicAttributes=Bv;var Uv,Vv=(Uv=!0,function(e,t){var i=Uv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Uv=!1,i}),kv=Vv(void 0,(function(){return kv.toString().search("(((.+)+)+)+$").toString().constructor(kv).search("(((.+)+)+)+$")}));function Wv(e,t){return t.replace(/{([^{}]+)}/g,((t,i)=>i in e?String(e[i]):""))}kv();var Hv,qv={kind:"color"},jv={kind:"formatted"},Xv=new Qh({"symbol-placement":new mh(hf.layout_symbol["symbol-placement"]),"symbol-spacing":new mh(hf.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new mh(hf.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new vh(hf.layout_symbol["symbol-sort-key"]),"symbol-z-order":new mh(hf.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new mh(hf.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new mh(hf.layout_symbol["icon-ignore-placement"]),"icon-optional":new mh(hf.layout_symbol["icon-optional"]),"icon-rotation-alignment":new mh(hf.layout_symbol["icon-rotation-alignment"]),"icon-size":new vh(hf.layout_symbol["icon-size"]),"icon-text-fit":new mh(hf.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new mh(hf.layout_symbol["icon-text-fit-padding"]),"icon-image":new vh(hf.layout_symbol["icon-image"]),"icon-rotate":new vh(hf.layout_symbol["icon-rotate"]),"icon-padding":new mh(hf.layout_symbol["icon-padding"]),"icon-keep-upright":new mh(hf.layout_symbol["icon-keep-upright"]),"icon-offset":new vh(hf.layout_symbol["icon-offset"]),"icon-anchor":new vh(hf.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new mh(hf.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new mh(hf.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new mh(hf.layout_symbol["text-rotation-alignment"]),"text-field":new vh(hf.layout_symbol["text-field"]),"text-font":new vh(hf.layout_symbol["text-font"]),"text-size":new vh(hf.layout_symbol["text-size"]),"text-max-width":new vh(hf.layout_symbol["text-max-width"]),"text-line-height":new mh(hf.layout_symbol["text-line-height"]),"text-letter-spacing":new vh(hf.layout_symbol["text-letter-spacing"]),"text-justify":new vh(hf.layout_symbol["text-justify"]),"text-radial-offset":new vh(hf.layout_symbol["text-radial-offset"]),"text-variable-anchor":new mh(hf.layout_symbol["text-variable-anchor"]),"text-anchor":new vh(hf.layout_symbol["text-anchor"]),"text-max-angle":new mh(hf.layout_symbol["text-max-angle"]),"text-writing-mode":new mh(hf.layout_symbol["text-writing-mode"]),"text-rotate":new vh(hf.layout_symbol["text-rotate"]),"text-padding":new mh(hf.layout_symbol["text-padding"]),"text-keep-upright":new mh(hf.layout_symbol["text-keep-upright"]),"text-transform":new vh(hf.layout_symbol["text-transform"]),"text-offset":new vh(hf.layout_symbol["text-offset"]),"text-allow-overlap":new mh(hf.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new mh(hf.layout_symbol["text-ignore-placement"]),"text-optional":new mh(hf.layout_symbol["text-optional"])}),Yv=new Qh({"icon-opacity":new vh(hf.paint_symbol["icon-opacity"]),"icon-color":new vh(hf.paint_symbol["icon-color"]),"icon-halo-color":new vh(hf.paint_symbol["icon-halo-color"]),"icon-halo-width":new vh(hf.paint_symbol["icon-halo-width"]),"icon-halo-blur":new vh(hf.paint_symbol["icon-halo-blur"]),"icon-translate":new mh(hf.paint_symbol["icon-translate"]),"icon-translate-anchor":new mh(hf.paint_symbol["icon-translate-anchor"]),"text-opacity":new vh(hf.paint_symbol["text-opacity"]),"text-color":new vh(hf.paint_symbol["text-color"],{runtimeType:qv,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new vh(hf.paint_symbol["text-halo-color"]),"text-halo-width":new vh(hf.paint_symbol["text-halo-width"]),"text-halo-blur":new vh(hf.paint_symbol["text-halo-blur"]),"text-show-background":new vh(hf.paint_symbol["text-show-background"]),"text-translate":new mh(hf.paint_symbol["text-translate"]),"text-translate-anchor":new mh(hf.paint_symbol["text-translate-anchor"])}),Zv={paint:Yv,layout:Xv},Kv=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,Zv)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){if(e.prototype.recalculate.call(this,t,i),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"line"==this.layout.get("symbol-placement")&&"viewport"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="map"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var r=[],o=0,a=n;o<a.length;o+=1){var s=a[o];r.indexOf(s)<0&&r.push(s)}this.layout._values["text-writing-mode"]=r}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},r.prototype.getValueAndResolveTokens=function(e,t,i){var n=this.layout.get(e).evaluate(t,{},i),r=this._unevaluatedLayout._values[e];return r.isDataDriven()||ar.isExpression(r.value)||!n?n:Wv(t.properties,n)},r.prototype.createBucket=function(e){return new zv(e)},r.prototype.queryRadius=function(){return 0},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){return pf.polygonIntersectPoint(e,n[0][0])},r.prototype._setPaintOverrides=function(){for(var e=0,t=Zv.paint.overridableProperties;e<t.length;e+=1){var i=t[e];if(r.hasPaintOverride(this.layout,i)){var n=this.paint.get(i);new FormatSectionOverride(n),"constant"===n.value.kind||n.value.kind,this.paint._values[i]=new PossiblyEvaluatedPropertyValue(n.property,null,n.parameters)}}},r.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!(!this.layout||t.isDataDriven()||i.isDataDriven())&&r.hasPaintOverride(this.layout,e)},r.hasPaintOverride=function(e,t){var i=e.get("text-field"),n=Zv.paint.properties[t],r=!1,o=function(e){for(var t=0,i=e;t<i.length;t+=1){var o=i[t];if(n.overrides&&n.overrides.hasOverride(o))return void(r=!0)}};if("constant"===i.value.kind&&i.value.value instanceof ie)o(i.value.value.sections);else if("source"===i.value.kind){var a=function(e){if(!r)if(e instanceof bi&&$e.typeOf(e.value)===jv){var t=e.value;o(t.sections)}else e instanceof Ut?o(e.sections):e.eachChild(a)},s=i.value;s._styleExpression&&a(s._styleExpression.expression)}return r},r.hasPaintOverrides=function(e){for(var t=0,i=Zv.paint.overridableProperties;t<i.length;t+=1){var n=i[t];if(r.hasPaintOverride(e,n))return!0}return!1},r}(bd),Qv=Kv,Jv=(Hv=!0,function(e,t){var i=Hv?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return Hv=!1,i}),e$=Jv(void 0,(function(){return e$.toString().search("(((.+)+)+)+$").toString().constructor(e$).search("(((.+)+)+)+$")}));e$();var t$={circle:Cf,fill:lm,line:Im,symbol:Qv};function i$(e){return t$[e.type]?new t$[e.type](e):null}var n$,r$=(n$=!0,function(e,t){var i=n$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n$=!1,i}),o$=r$(void 0,(function(){return o$.toString().search("(((.+)+)+)+$").toString().constructor(o$).search("(((.+)+)+)+$")}));o$();var a$=function(e){this.keyCache={},e&&this.replace(e)};function s$(e){var t=[];for(var i in e)t.push(e[i]);return t}a$.prototype.replace=function(e){this._layerConfigs={},this._layers={},this.update(e,[])},a$.prototype.update=function(e,t){for(var i=this,n=0,r=e;n<r.length;n+=1){var o=r[n];this._layerConfigs[o.id]=o;var a=i$(o);null!=a&&(this._layers[o.id]=a,a._featureFilter=Br.createFilter(a.filter),this.keyCache[o.id]&&delete this.keyCache[o.id])}for(var s=0,l=t;s<l.length;s+=1){var u=l[s];delete this.keyCache[u],delete this._layerConfigs[u],delete this._layers[u]}this.familiesBySource={};for(var c=0,h=Kr(s$(this._layerConfigs),this.keyCache);c<h.length;c+=1){var d=h[c].map((function(e){return i._layers[e.id]})),f=d[0];if(null!=f&&"none"!==f.visibility){var p=f.source||"",_=this.familiesBySource[p];!_&&(_=this.familiesBySource[p]={});var m=f.sourceLayer,g=_[m];!g&&(g=_[m]=[]),g.push(d)}}};var l$,u$=(l$=!0,function(e,t){var i=l$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return l$=!1,i}),c$=u$(void 0,(function(){return c$.toString().search("(((.+)+)+)+$").toString().constructor(c$).search("(((.+)+)+)+$")}));function h$(e,t,i,n,r){this.properties={},this.extent=i,this.type=0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=r,e.readFields(d$,this,t)}function d$(e,t,i){1==e?t.id=i.readVarint():2==e?f$(i,t):3==e?t.type=i.readVarint():4==e&&(t._geometry=i.pos)}function f$(e,t){for(var i=e.readVarint()+e.pos;e.pos<i;){var n=t._keys[e.readVarint()],r=t._values[e.readVarint()];t.properties[n]=r}}function p$(e){var t=e.length;if(t<=1)return[e];for(var i,n,r=[],o=0;o<t;o++){var a=_$(e[o]);0!==a&&(void 0===n&&(n=a<0),n===a<0?(i&&r.push(i),i=[e[o]]):i.push(e[o]))}return i&&r.push(i),r}function _$(e){for(var t,i,n=0,r=0,o=e.length,a=o-1;r<o;a=r++)t=e[r],n+=((i=e[a]).x-t.x)*(t.y+i.y);return n}c$(),h$.types=["Unknown","Point","LineString","Polygon"],h$.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,i=e.readVarint()+e.pos,n=1,r=0,o=0,a=0,s=[];e.pos<i;){if(r<=0){var l=e.readVarint();n=7&l,r=l>>3}r--,1===n||2===n?(o+=e.readSVarint(),a+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new to(o,a))):7===n?t&&t.push(t[0].clone()):console.log("VectorTileFeature loadGeometry unknown command "+n)}return t&&s.push(t),s},h$.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,n=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos<t;){if(n<=0){var c=e.readVarint();i=7&c,n=c>>3}if(n--,1===i||2===i)(r+=e.readSVarint())<a&&(a=r),r>s&&(s=r),(o+=e.readSVarint())<l&&(l=o),o>u&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},h$.prototype.toGeoJSON=function(e,t,i){var n,r,o=this.extent*Math.pow(2,i),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=h$.types[this.type];function c(e){for(var t=0;t<e.length;t++){var i=e[t],n=180-360*(i.y+s)/o;e[t]=[360*(i.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(n=0;n<l.length;n++)h[n]=l[n][0];c(l=h);break;case 2:for(n=0;n<l.length;n++)c(l[n]);break;case 3:for(l=p$(l),n=0;n<l.length;n++)for(r=0;r<l[n].length;r++)c(l[n][r])}1===l.length?l=l[0]:u="Multi"+u;var d={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(d.id=this.id),d};var m$,g$=(m$=!0,function(e,t){var i=m$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return m$=!1,i}),x$=g$(void 0,(function(){return x$.toString().search("(((.+)+)+)+$").toString().constructor(x$).search("(((.+)+)+)+$")}));function y$(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(v$,this,t),this.length=this._features.length}function v$(e,t,i){15===e?t.version=i.readVarint():1===e?t.name=i.readString():5===e?t.extent=i.readVarint():2===e?t._features.push(i.pos):3===e?t._keys.push(i.readString()):4===e&&t._values.push($$(i))}function $$(e){for(var t=null,i=e.readVarint()+e.pos;e.pos<i;){var n=e.readVarint()>>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}x$(),y$.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new h$(this._pbf,t,this.extent,this._keys,this._values)};var b$,T$=(b$=!0,function(e,t){var i=b$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return b$=!1,i}),C$=T$(void 0,(function(){return C$.toString().search("(((.+)+)+)+$").toString().constructor(C$).search("(((.+)+)+)+$")}));function S$(e,t){this.layers=e.readFields(w$,{},t)}function w$(e,t,i){if(3===e){var n=new y$(i,i.readVarint()+i.pos);n.length&&(t[n.name]=n)}}C$();var E$,P$=(E$=!0,function(e,t){var i=E$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return E$=!1,i}),A$=P$(void 0,(function(){return A$.toString().search("(((.+)+)+)+$").toString().constructor(A$).search("(((.+)+)+)+$")}));function L$(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t<e.length;t++){var i=e[t];this._stringToNumber[i]=t,this._numberToString[t]=i}}A$(),L$.prototype.encode=function(e){return this._stringToNumber[e]},L$.prototype.decode=function(e){return this._numberToString[e]};var M$,R$=(M$=!0,function(e,t){var i=M$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return M$=!1,i}),O$=R$(void 0,(function(){return O$.toString().search("(((.+)+)+)+$").toString().constructor(O$).search("(((.+)+)+)+$")}));O$();var D$=3;function I$(e,t,i){var n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var r=new Int32Array(this.arrayBuffer);e=r[0],t=r[1],i=r[2],this.d=t+2*i;for(var o=0;o<this.d*this.d;o++){var a=r[D$+o],s=r[D$+o+1];n.push(a===s?null:r.subarray(a,s))}var l=r[D$+n.length],u=r[D$+n.length+1];this.keys=r.subarray(l,u),this.bboxes=r.subarray(u),this.insert=this._insertReadonly}else{this.d=t+2*i;for(var c=0;c<this.d*this.d;c++)n.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=i,this.scale=t/e,this.uid=0;var h=i/t*e;this.min=-h,this.max=e+h}I$.prototype.insert=function(e,t,i,n,r){this._forEachCell(t,i,n,r,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)},I$.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},I$.prototype._insertCell=function(e,t,i,n,r,o){this.cells[r].push(o)},I$.prototype.query=function(e,t,i,n,r){var o=this.min,a=this.max;if(e<=o&&t<=o&&a<=i&&a<=n&&!r)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(e,t,i,n,this._queryCell,s,{},r),s},I$.prototype._queryCell=function(e,t,i,n,r,o,a,s){var l=this.cells[r];if(null!==l)for(var u=this.keys,c=this.bboxes,h=0;h<l.length;h++){var d=l[h];if(void 0===a[d]){var f=4*d;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):e<=c[f+2]&&t<=c[f+3]&&i>=c[f+0]&&n>=c[f+1])?(a[d]=!0,o.push(u[d])):a[d]=!1}}},I$.prototype._forEachCell=function(e,t,i,n,r,o,a,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(i),h=this._convertToCellCoord(n),d=l;d<=c;d++)for(var f=u;f<=h;f++){var p=this.d*f+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(f),this._convertFromCellCoord(d+1),this._convertFromCellCoord(f+1)))&&r.call(this,e,t,i,n,p,o,a,s))return}},I$.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},I$.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},I$.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=D$+this.cells.length+1+1,i=0,n=0;n<this.cells.length;n++)i+=this.cells[n].length;var r=new Int32Array(t+i+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;for(var o=t,a=0;a<e.length;a++){var s=e[a];r[D$+a]=o,r.set(s,o),o+=s.length}return r[D$+e.length]=o,r.set(this.keys,o),o+=this.keys.length,r[D$+e.length+1]=o,r.set(this.bboxes,o),o+=this.bboxes.length,r.buffer},en.register("GridIndex",I$,{omit:["layers","patternFeatures"]});var B$,F$=(B$=!0,function(e,t){var i=B$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return B$=!1,i}),N$=F$(void 0,(function(){return N$.toString().search("(((.+)+)+)+$").toString().constructor(N$).search("(((.+)+)+)+$")}));N$();var G$=function(e,t,i){this.x=e.x,this.y=e.y,this.z=e.z,this.grid=t||new I$($o,16,0),this.featureIndexArray=i||new ga};function z$(e){for(var t=1/0,i=1/0,n=-1/0,r=-1/0,o=0,a=e;o<a.length;o+=1){var s=a[o];t=Math.min(t,s.x),i=Math.min(i,s.y),n=Math.max(n,s.x),r=Math.max(r,s.y)}return{minX:t,minY:i,maxX:n,maxY:r}}function U$(e,t){return t-e}function V$(e,t,i){if(wa(i)&&i.realtime&&wa(i.zoom)){var n=i.zoom-e,r=$o/(t*Math.pow(2,n));return r*=t/512}return $o/t}G$.prototype.insert=function(e,t,i,n,r,o,a){var s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(i,n,r);var l=this.grid;a=a||0;for(var u=0;u<t.length;u++){for(var c=t[u],h=[1/0,1/0,-1/0,-1/0],d=0;d<c.length;d++){var f=c[d];h[0]=Math.min(h[0],f.x),h[1]=Math.min(h[1],f.y),h[2]=Math.max(h[2],f.x),h[3]=Math.max(h[3],f.y)}h[0]<$o&&h[1]<$o&&h[2]>=0&&h[3]>=0&&l.insert(s,h[0]-a,h[1]-a,h[2]+a,h[3]+a)}},G$.prototype.loadVTLayers=function(){return!this.vtLayers&&(this.vtLayers=new S$(new hx(this.rawTileData)).layers,this.sourceLayerCoder=new L$(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},G$.prototype.query=function(e,t,i){var n=this;this.loadVTLayers();var r=e.params||{},o=V$(this.z,e.tileSize,r),a=Br.createFilter(r.filter),s=e.queryGeometry,l=5,u=z$(s),c=[];wa(r.selectTolerance)&&(l+=o*r.selectTolerance),(c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l)).sort(U$);for(var h,d={},f=function(i){var l=c[i];if(l!==h){h=l;var u=n.featureIndexArray.get(l),f=null;n.loadMatchingFeature(d,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,a,r.layers,t,(function(t,i){return!f&&(f=So(t)),i.queryIntersectsFeature(s,t,{},f,n.z,e.transform,o,e.pixelPosMatrix,e.adjustScale)}))}},p=0;p<c.length;p++)f(p);return d},G$.prototype.loadMatchingFeature=function(e,t,i,n,r,o,a,s){if(wa(t)&&wa(i)&&wa(n)){var l=this.bucketLayerIDs[t];if(!o||Nh(o,l)){var u=this.sourceLayerCoder.decode(i),c=this.vtLayers[u].feature(n);if(r(new go(this.z),c))for(var h=0;h<l.length;h++){var d=l[h];if(!(o&&o.indexOf(d)<0)){var f=a[d];if(f){var p=!s||s(c,f);if(p){c.layer=f.serialize();var _=e[d];void 0===_&&(_=e[d]=[]),_.push({featureIndex:n,feature:c,intersectionZ:p})}}}}}}},G$.prototype.lookupSymbolFeatures=function(e,t,i,n,r,o){var a={};this.loadVTLayers();for(var s=createFilter(n),l=0,u=e;l<u.length;l+=1){var c=u[l];this.loadMatchingFeature(a,t,i,c,s,r,o)}return a},G$.prototype.hasLayer=function(e){for(var t=0,i=this.bucketLayerIDs;t<i.length;t+=1)for(var n=0,r=i[t];n<r.length;n+=1)if(e===r[n])return!0;return!1},en.register("FeatureIndex",G$,{omit:["rawTileData","sourceLayerCoder","vtLayers"]});var k$,W$=(k$=!0,function(e,t){var i=k$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return k$=!1,i}),H$=W$(void 0,(function(){return H$.toString().search("(((.+)+)+)+$").toString().constructor(H$).search("(((.+)+)+)+$")}));H$();var q$=1,j$=function(e){var t={},i=[];for(var n in e){var r=e[n],o=t[n]={};for(var a in r){var s=r[+a];if(s&&0!==s.bitmap.width&&0!==s.bitmap.height){var l={x:0,y:0,w:s.bitmap.width+2*q$,h:s.bitmap.height+2*q$};i.push(l),o[a]={rect:l,metrics:s.metrics}}}}var u=f(i),c=u.w,h=u.h,d=new rx({width:c||1,height:h||1});for(var p in e){var _=e[p];for(var m in _){var g=_[+m];if(g&&0!==g.bitmap.width&&0!==g.bitmap.height){var x=t[p][m].rect;rx.copy(g.bitmap,d,{x:0,y:0},{x:x.x+q$,y:x.y+q$},g.bitmap)}}}this.image=d,this.positions=t};en.register("GlyphAtlas",j$);var X$,Y$=(X$=!0,function(e,t){var i=X$?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return X$=!1,i}),Z$=Y$(void 0,(function(){return Z$.toString().search("(((.+)+)+)+$").toString().constructor(Z$).search("(((.+)+)+)+$")}));function K$(e){this.uid=e.uid,this.source=e.source,this.showCollisionBoxes=!1,this.zoom=e.tileID.z}function Q$(e,t,i){for(var n=new go(t),r=0,o=e;r<o.length;r+=1)o[r].recalculate(n,i)}Z$(),en.register("FeatureIndex",G$,{omit:["rawTileData","sourceLayerCoder"]}),K$.prototype.parse=function(e,t,i,n,r,o){try{this.status="parsing",this.data=t,this.collisionBoxArray=new sa,this.tileID=e.tileID;var a=e.featureIndex;!wa(a)&&((a=new G$(e.tileID)).bucketLayerIDs=[]);var s={},l=new L$(Object.keys(t.layers).sort()),u={},c={featureIndex:a,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:n};for(var h in i.familiesBySource){var d=i.familiesBySource[h];for(var f in d){var p=t.layers[f];if(p){for(var _=l.encode(f),m=[],g=0;g<p.length;g++){var y=p.feature(g);m.push({feature:y,index:g,sourceLayerIndex:_,sourceLayerId:f})}for(var v=0,$=d[f];v<$.length;v+=1){var b=$[v],T=b[0];if(!(T.minzoom&&this.zoom<Math.floor(T.minzoom)||T.maxzoom&&this.zoom>=T.maxzoom||"none"===T.visibility)){Q$(b,0,n);var C=T.id,S=u[C]=T.createBucket({index:a.bucketLayerIDs.length,layers:b,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_,webgpu:e.webgpu});wa(e.indexData)&&wa(e.indexData[T.id])&&(c.indexData=e.indexData[T.id]),S.populate(m,c),a.bucketLayerIDs.push(b.map((function(e){return e.id})))}}}}}let w,E,P,A;const L=Ih(c.glyphDependencies,(e=>Object.keys(e).map(Number)));Object.keys(L).length?r.send("getGlyphs",{uid:0,stacks:L},((e,t)=>{!w&&(w=e,E=t,O.call(this))})):E={};const M=Object.keys(c.iconDependencies);M.length?r.send("getImages",{icons:M,source:this.source,tileID:this.tileID,type:"icons"},((e,t)=>{!w&&(w=e,P=t,O.call(this))})):P={};const R=Object.keys(c.patternDependencies);function O(){if(w)return o(w);if(E&&P&&A){const n=new j$(E),r=new x(P,A);for(var t in u){var i=u[t];i instanceof zv?(i.layers[0].layout,mv(i,E,n.positions,P,r.iconPositions,this.showCollisionBoxes)):i.hasPattern&&(i instanceof $m||i instanceof im)&&i.addFeatures(c,r.patternPositions)}s.buckets=u,s.imageAtlas=r,s.glyphAtlasImage=n.image,s.featureIndex=a,s.pickId=e.pickId,this.status="done",o(null,s)}}R.length?r.send("getImages",{icons:R,source:this.source,tileID:this.tileID,type:"patterns"},((e,t)=>{!w&&(w=e,A=t,O.call(this))})):A={},O.call(this)}catch(D){console.log(D)}};const J$=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),eb=J$(void 0,(function(){return eb.toString().search("(((.+)+)+)+$").toString().constructor(eb).search("(((.+)+)+)+$")}));function tb(e,t){const i=Vg(e.request,((e,i,n,r)=>{e?t(e):i&&t(null,{vectorTile:new S$(new hx(i)),rawData:i,cacheControl:n,expires:r})}));return()=>{i.cancel(),t()}}eb();class ib{constructor(e,t,i,n){this.actor=e,this.layerIndex=t,this.availableImages=i,this.loadVectorData=n||tb,this.loading={},this.loaded={}}loadTile(e,t){const i=e.uid;this.loading||(this.loading={});const n=this.loading[i]=new K$(e);n.abort=this.loadVectorData(e,((r,o)=>{if(delete this.loading[i],r||!o)return n.status="done",this.loaded[i]=n,t(r);const a=o.rawData,s={};o.expires&&(s.expires=o.expires),o.cacheControl&&(s.cacheControl=o.cacheControl);const l={};n.vectorTile=o.vectorTile,n.parse(e,o.vectorTile,this.layerIndex,this.availableImages,this.actor,((e,i)=>{if(e||!i)return t(e);t(null,Oh({rawTileData:a.slice(0)},i,s,l))})),this.loaded=this.loaded||{},this.loaded[i]=n}))}reloadTile(e,t){const i=this.loaded,n=e.uid,r=this;if(i&&i[n]){const o=i[n];o.showCollisionBoxes=e.showCollisionBoxes;const a=(i,n)=>{const a=o.reloadCallback;a&&(delete o.reloadCallback,o.parse(e,o.vectorTile,r.layerIndex,this.availableImages,r.actor,a)),t(i,n)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(e,o.vectorTile,this.layerIndex,this.availableImages,this.actor,a):a())}}abortTile(e,t){const i=this.loading,n=e.uid;i&&i[n]&&i[n].abort&&(i[n].abort(),delete i[n]),t()}removeTile(e,t){const i=this.loaded,n=e.uid;i&&i[n]&&delete i[n],t()}}const nb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),rb=nb(void 0,(function(){return rb.toString().search("(((.+)+)+)+$").toString().constructor(rb).search("(((.+)+)+)+$")}));rb();class ob{constructor(e){this.self=e,this.actor=new dn(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:ib},this.workerSources={},this.demWorkerSources={}}setReferrer(e,t){this.referrer=t}setImages(e,t,i){this.availableImages[e]=t,i()}setLayers(e,t,i){this.getLayerIndex(e).replace(t),i()}updateLayers(e,t,i){this.getLayerIndex(e).update(t.layers,t.removedIds),i()}loadTile(e,t,i){this.getWorkerSource(e,t.type,t.source).loadTile(t,i)}reloadTile(e,t,i){this.getWorkerSource(e,t.type,t.source).reloadTile(t,i)}abortTile(e,t,i){this.getWorkerSource(e,t.type,t.source).abortTile(t,i)}removeTile(e,t,i){this.getWorkerSource(e,t.type,t.source).removeTile(t,i)}removeSource(e,t,i){if(!this.workerSources[e]||!this.workerSources[e][t.type]||!this.workerSources[e][t.type][t.source])return;const n=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==n.removeSource?n.removeSource(t,i):i()}loadWorkerSource(e,t,i){try{this.self.importScripts(t.url),i()}catch(e){i(e.toString())}}getAvailableImages(e){let t=this.availableImages[e];return!t&&(t=[]),t}getLayerIndex(e){let t=this.layerIndexes[e];return!t&&(t=this.layerIndexes[e]=new a$),t}getWorkerSource(e,t,i){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][i]){const n={send:(t,i,n)=>{this.actor.send(t,i,n,e)}};this.workerSources[e][t][i]=new this.workerSourceTypes[t](n,this.getLayerIndex(e),this.getAvailableImages(e))}return this.workerSources[e][t][i]}enforceCacheSizeLimit(e,t){Rg(t)}}"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new ob(self))},t="("+e+")()",window.mvtWorkerUrl=window.URL.createObjectURL(new Blob([t],{type:"text/javascript"}))},"function"==typeof define&&define.amd?define(factory):factory(),e$2e(Object.create)&&(t$15.prototype=Object.create(Error.prototype),t$15.prototype.constructor=t$15),t$15.prototype.toString=function(){var e=this.name+": "+this.message;return e$2e(this.stack)&&(e+="\n"+this.stack.toString()),e},t$15.throwInstantiationError=function(){throw new t$15("This function defines an interface and should not be called directly.")};var o$1q={};function p$1f(e){return e+" is required, actual value was undefined"}function t$14(e,t,i){return"Expected "+i+" to be typeof "+t+", actual typeof was "+e}function u$Z(e,t){return e??t}o$1q.typeOf={},o$1q.defined=function(e,t){if(!e$2e(t))throw new t$15(p$1f(e))},o$1q.typeOf.func=function(e,t){if("function"!=typeof t)throw new t$15(t$14(typeof t,"function",e))},o$1q.typeOf.string=function(e,t){if("string"!=typeof t)throw new t$15(t$14(typeof t,"string",e))},o$1q.typeOf.number=function(e,t){if("number"!=typeof t)throw new t$15(t$14(typeof t,"number",e))},o$1q.typeOf.number.lessThan=function(e,t,i){if(o$1q.typeOf.number(e,t),t>=i)throw new t$15("Expected "+e+" to be less than "+i+", actual value was "+t)},o$1q.typeOf.number.lessThanOrEquals=function(e,t,i){if(o$1q.typeOf.number(e,t),t>i)throw new t$15("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},o$1q.typeOf.number.greaterThan=function(e,t,i){if(o$1q.typeOf.number(e,t),t<=i)throw new t$15("Expected "+e+" to be greater than "+i+", actual value was "+t)},o$1q.typeOf.number.greaterThanOrEquals=function(e,t,i){if(o$1q.typeOf.number(e,t),t<i)throw new t$15("Expected "+e+" to be greater than or equal to"+i+", actual value was "+t)},o$1q.typeOf.object=function(e,t){if("object"!=typeof t)throw new t$15(t$14(typeof t,"object",e))},o$1q.typeOf.bool=function(e,t){if("boolean"!=typeof t)throw new t$15(t$14(typeof t,"boolean",e))},o$1q.typeOf.number.equals=function(e,t,i,n){if(o$1q.typeOf.number(e,i),o$1q.typeOf.number(t,n),i!==n)throw new t$15(e+" must be equal to "+t+", the actual values are "+i+" and "+n)},u$Z.EMPTY_OBJECT=Object.freeze({});var s$12=function(e){null==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};s$12.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++){e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0}},s$12.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i<this.N-this.M;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+this.M]^e>>>1^t[1&e];for(;i<this.N-1;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+(this.M-this.N)]^e>>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},s$12.prototype.random=function(){return this.genrand_int32()*(1/4294967296)};var e$2d={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536};e$2d.sign=u$Z(Math.sign,(function(e){return 0===(e=+e)||e!=e?e:e>0?1:-1})),e$2d.signNotZero=function(e){return e<0?-1:1},e$2d.toSNorm=function(e,t){return t=u$Z(t,255),Math.round((.5*e$2d.clamp(e,-1,1)+.5)*t)},e$2d.fromSNorm=function(e,t){return t=u$Z(t,255),e$2d.clamp(e,0,t)/t*2-1},e$2d.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:e$2d.clamp((e-t)/i,0,1)},e$2d.sinh=u$Z(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),e$2d.cosh=u$Z(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),e$2d.lerp=function(e,t,i){return(1-i)*e+i*t},e$2d.PI=Math.PI,e$2d.ONE_OVER_PI=1/Math.PI,e$2d.PI_OVER_TWO=Math.PI/2,e$2d.PI_OVER_THREE=Math.PI/3,e$2d.PI_OVER_FOUR=Math.PI/4,e$2d.PI_OVER_SIX=Math.PI/6,e$2d.THREE_PI_OVER_TWO=3*Math.PI/2,e$2d.TWO_PI=2*Math.PI,e$2d.ONE_OVER_TWO_PI=1/(2*Math.PI),e$2d.RADIANS_PER_DEGREE=Math.PI/180,e$2d.DEGREES_PER_RADIAN=180/Math.PI,e$2d.RADIANS_PER_ARCSECOND=e$2d.RADIANS_PER_DEGREE/3600,e$2d.toRadians=function(e){if(!e$2e(e))throw new t$15("degrees is required.");return e*e$2d.RADIANS_PER_DEGREE},e$2d.toDegrees=function(e){if(!e$2e(e))throw new t$15("radians is required.");return e*e$2d.DEGREES_PER_RADIAN},e$2d.convertLongitudeRange=function(e){if(!e$2e(e))throw new t$15("angle is required.");var t=e$2d.TWO_PI,i=e-Math.floor(e/t)*t;return i<-Math.PI?i+t:i>=Math.PI?i-t:i},e$2d.clampToLatitudeRange=function(e){if(!e$2e(e))throw new t$15("angle is required.");return e$2d.clamp(e,-1*e$2d.PI_OVER_TWO,e$2d.PI_OVER_TWO)},e$2d.negativePiToPi=function(e){if(!e$2e(e))throw new t$15("angle is required.");return e$2d.zeroToTwoPi(e+e$2d.PI)-e$2d.PI},e$2d.zeroToTwoPi=function(e){if(!e$2e(e))throw new t$15("angle is required.");var t=e$2d.mod(e,e$2d.TWO_PI);return Math.abs(t)<e$2d.EPSILON14&&Math.abs(e)>e$2d.EPSILON14?e$2d.TWO_PI:t},e$2d.mod=function(e,t){if(!e$2e(e))throw new t$15("m is required.");if(!e$2e(t))throw new t$15("n is required.");return(e%t+t)%t},e$2d.equalsEpsilon=function(e,t,i,n){if(!e$2e(e))throw new t$15("left is required.");if(!e$2e(t))throw new t$15("right is required.");if(!e$2e(i))throw new t$15("relativeEpsilon is required.");n=u$Z(n,i);var r=Math.abs(e-t);return r<=n||r<=i*Math.max(Math.abs(e),Math.abs(t))},e$2d.lessThan=function(e,t,i){if(!e$2e(e))throw new t$15("first is required.");if(!e$2e(t))throw new t$15("second is required.");if(!e$2e(i))throw new t$15("relativeEpsilon is required.");return e-t<-i},e$2d.lessThanOrEquals=function(e,t,i){if(!e$2e(e))throw new t$15("first is required.");if(!e$2e(t))throw new t$15("second is required.");if(!e$2e(i))throw new t$15("relativeEpsilon is required.");return e-t<i},e$2d.greaterThan=function(e,t,i){if(!e$2e(e))throw new t$15("first is required.");if(!e$2e(t))throw new t$15("second is required.");if(!e$2e(i))throw new t$15("relativeEpsilon is required.");return e-t>i},e$2d.greaterThanOrEquals=function(e,t,i){if(!e$2e(e))throw new t$15("first is required.");if(!e$2e(t))throw new t$15("second is required.");if(!e$2e(i))throw new t$15("relativeEpsilon is required.");return e-t>-i};var h$1a=[1];e$2d.factorial=function(e){if("number"!=typeof e||e<0)throw new t$15("A number greater than or equal to 0 is required.");var t=h$1a.length;if(e>=t)for(var i=h$1a[t-1],n=t;n<=e;n++){var r=i*n;h$1a.push(r),i=r}return h$1a[e]},e$2d.incrementWrap=function(e,t,i){if(i=u$Z(i,0),!e$2e(e))throw new t$15("n is required.");if(t<=i)throw new t$15("maximumValue must be greater than minimumValue.");return++e>t&&(e=i),e},e$2d.isPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new t$15("A number greater than or equal to 0 is required.");return 0!==e&&0==(e&e-1)},e$2d.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0)throw new t$15("A number greater than or equal to 0 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},e$2d.clamp=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("min is required.");if(!e$2e(i))throw new t$15("max is required.");return e<t?t:e>i?i:e};var I$1z=new s$12;function o$1p(e,t,i){this.x=u$Z(e,0),this.y=u$Z(t,0),this.z=u$Z(i,0)}e$2d.setRandomNumberSeed=function(e){if(!e$2e(e))throw new t$15("seed is required.");I$1z=new s$12(e)},e$2d.nextRandomNumber=function(){return I$1z.random()},e$2d.randomBetween=function(e,t){return e$2d.nextRandomNumber()*(t-e)+e},e$2d.acosClamped=function(e){if(!e$2e(e))throw new t$15("value is required.");return Math.acos(e$2d.clamp(e,-1,1))},e$2d.asinClamped=function(e){if(!e$2e(e))throw new t$15("value is required.");return Math.asin(e$2d.clamp(e,-1,1))},e$2d.chordLength=function(e,t){if(!e$2e(e))throw new t$15("angle is required.");if(!e$2e(t))throw new t$15("radius is required.");return 2*t*Math.sin(.5*e)},e$2d.logBase=function(e,t){if(!e$2e(e))throw new t$15("number is required.");if(!e$2e(t))throw new t$15("base is required.");return Math.log(e)/Math.log(t)},e$2d.cbrt=u$Z(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t})),e$2d.log2=u$Z(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),e$2d.fog=function(e,t){var i=e*t;return 1-Math.exp(-i*i)},e$2d.fastApproximateAtan=function(e){return o$1q.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},e$2d.fastApproximateAtan2=function(e,t){o$1q.typeOf.number("x",e),o$1q.typeOf.number("y",t);var i,n,r=Math.abs(e);i=Math.abs(t),n=Math.max(r,i);var o=(i=Math.min(r,i))/n;if(isNaN(o))throw new t$15("either x or y must be nonzero");return r=e$2d.fastApproximateAtan(o),r=Math.abs(t)>Math.abs(e)?e$2d.PI_OVER_TWO-r:r,r=e<0?e$2d.PI-r:r,r=t<0?-r:r},o$1p.fromSpherical=function(e,t){o$1q.typeOf.object("spherical",e),e$2e(t)||(t=new o$1p);var i=e.clock,n=e.cone,r=u$Z(e.magnitude,1),o=r*Math.sin(n);return t.x=o*Math.cos(i),t.y=o*Math.sin(i),t.z=r*Math.cos(n),t},o$1p.fromElements=function(e,t,i,n){return e$2e(n)?(n.x=e,n.y=t,n.z=i,n):new o$1p(e,t,i)},o$1p.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new o$1p(e.x,e.y,e.z)},o$1p.fromCartesian4=o$1p.clone,o$1p.packedLength=3,o$1p.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.x,t[i++]=e.y,t[i]=e.z,t},o$1p.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new o$1p),i.x=e[t++],i.y=e[t++],i.z=e[t],i},o$1p.packArray=function(e,t){o$1q.defined("array",e);var i=e.length,n=3*i;if(e$2e(t)){if(!Array.isArray(t)&&t.length!==n)throw new t$15("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)o$1p.pack(e[r],t,3*r);return t},o$1p.unpackArray=function(e,t){if(o$1q.defined("array",e),o$1q.typeOf.number.greaterThanOrEquals("array.length",e.length,3),e.length%3!=0)throw new t$15("array length must be a multiple of 3.");var i=e.length;e$2e(t)?t.length=i/3:t=new Array(i/3);for(var n=0;n<i;n+=3){var r=n/3;t[r]=o$1p.unpack(e,n,t[r])}return t},o$1p.fromArray=o$1p.unpack,o$1p.maximumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z)},o$1p.minimumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z)},o$1p.minimumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i},o$1p.maximumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i},o$1p.magnitudeSquared=function(e){return o$1q.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z},o$1p.magnitude=function(e){return Math.sqrt(o$1p.magnitudeSquared(e))};var v$_=new o$1p;o$1p.distance=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1p.subtract(e,t,v$_),o$1p.magnitude(v$_)},o$1p.distanceSquared=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1p.subtract(e,t,v$_),o$1p.magnitudeSquared(v$_)},o$1p.normalize=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1p.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new t$15("normalized result is not a number");return t},o$1p.dot=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z},o$1p.multiplyComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i},o$1p.divideComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i},o$1p.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i},o$1p.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i},o$1p.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i},o$1p.divideByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i},o$1p.negate=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t},o$1p.abs=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var d$1u=new o$1p;o$1p.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),o$1p.multiplyByScalar(t,i,d$1u),n=o$1p.multiplyByScalar(e,1-i,n),o$1p.add(d$1u,n,n)};var u$Y=new o$1p,x$1o=new o$1p;o$1p.angleBetween=function(e,t){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1p.normalize(e,u$Y),o$1p.normalize(t,x$1o);var i=o$1p.dot(u$Y,x$1o),n=o$1p.magnitude(o$1p.cross(u$Y,x$1o,u$Y));return Math.atan2(n,i)};var S$15=new o$1p;o$1p.mostOrthogonalAxis=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1p.normalize(e,S$15);return o$1p.abs(i,i),t=i.x<=i.y?i.x<=i.z?o$1p.clone(o$1p.UNIT_X,t):o$1p.clone(o$1p.UNIT_Z,t):i.y<=i.z?o$1p.clone(o$1p.UNIT_Y,t):o$1p.clone(o$1p.UNIT_Z,t)},o$1p.projectVector=function(e,t,i){o$1q.defined("a",e),o$1q.defined("b",t),o$1q.defined("result",i);var n=o$1p.dot(e,t)/o$1p.dot(t,t);return o$1p.multiplyByScalar(t,n,i)},o$1p.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},o$1p.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]},o$1p.equalsEpsilon=function(e,t,i,n){return e===t||e$2e(e)&&e$2e(t)&&e$2d.equalsEpsilon(e.x,t.x,i,n)&&e$2d.equalsEpsilon(e.y,t.y,i,n)&&e$2d.equalsEpsilon(e.z,t.z,i,n)},o$1p.cross=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e.x,r=e.y,o=e.z,a=t.x,s=t.y,l=t.z,u=r*l-o*s,c=o*a-n*l,h=n*s-r*a;return i.x=u,i.y=c,i.z=h,i},o$1p.midpoint=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=.5*(e.x+t.x),i.y=.5*(e.y+t.y),i.z=.5*(e.z+t.z),i},o$1p.fromDegrees=function(e,t,i,n,r){return o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),e=e$2d.toRadians(e),t=e$2d.toRadians(t),o$1p.fromRadians(e,t,i,n,r)};var b$1l=new o$1p,z$15=new o$1p,q$1j=new o$1p(40680631590769,40680631590769,40408299984661.445);function e$2c(e,t,i,n){this.x=u$Z(e,0),this.y=u$Z(t,0),this.z=u$Z(i,0),this.w=u$Z(n,0)}o$1p.fromRadians=function(e,t,i,n,r){o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),i=u$Z(i,0);var o=e$2e(n)?n.radiiSquared:q$1j,a=Math.cos(t);b$1l.x=a*Math.cos(e),b$1l.y=a*Math.sin(e),b$1l.z=Math.sin(t),b$1l=o$1p.normalize(b$1l,b$1l),o$1p.multiplyComponents(o,b$1l,z$15);var s=Math.sqrt(o$1p.dot(b$1l,z$15));return z$15=o$1p.divideByScalar(z$15,s,z$15),b$1l=o$1p.multiplyByScalar(b$1l,i,b$1l),e$2e(r)||(r=new o$1p),o$1p.add(z$15,b$1l,r)},o$1p.fromDegreesArray=function(e,t,i){if(o$1q.defined("coordinates",e),e.length<2||e.length%2!=0)throw new t$15("the number of coordinates must be a multiple of 2 and at least 2");var n=e.length;e$2e(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var o=e[r],a=e[r+1],s=r/2;i[s]=o$1p.fromDegrees(o,a,0,t,i[s])}return i},o$1p.fromRadiansArray=function(e,t,i){if(o$1q.defined("coordinates",e),e.length<2||e.length%2!=0)throw new t$15("the number of coordinates must be a multiple of 2 and at least 2");var n=e.length;e$2e(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var o=e[r],a=e[r+1],s=r/2;i[s]=o$1p.fromRadians(o,a,0,t,i[s])}return i},o$1p.fromDegreesArrayHeights=function(e,t,i){if(o$1q.defined("coordinates",e),e.length<3||e.length%3!=0)throw new t$15("the number of coordinates must be a multiple of 3 and at least 3");var n=e.length;e$2e(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var o=e[r],a=e[r+1],s=e[r+2],l=r/3;i[l]=o$1p.fromDegrees(o,a,s,t,i[l])}return i},o$1p.fromRadiansArrayHeights=function(e,t,i){if(o$1q.defined("coordinates",e),e.length<3||e.length%3!=0)throw new t$15("the number of coordinates must be a multiple of 3 and at least 3");var n=e.length;e$2e(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var o=e[r],a=e[r+1],s=e[r+2],l=r/3;i[l]=o$1p.fromRadians(o,a,s,t,i[l])}return i},o$1p.ZERO=Object.freeze(new o$1p(0,0,0)),o$1p.UNIT_X=Object.freeze(new o$1p(1,0,0)),o$1p.UNIT_Y=Object.freeze(new o$1p(0,1,0)),o$1p.UNIT_Z=Object.freeze(new o$1p(0,0,1)),o$1p.UNIT_XYZ=Object.freeze(new o$1p(1,1,1)),o$1p.prototype.clone=function(e){return o$1p.clone(this,e)},o$1p.prototype.equals=function(e){return o$1p.equals(this,e)},o$1p.prototype.equalsEpsilon=function(e,t,i){return o$1p.equalsEpsilon(this,e,t,i)},o$1p.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},o$1p.prototype.toArray=function(e,t){o$1p.pack(this,e,t)},o$1p.globalOffset=new o$1p(0,0,0),e$2c.fromElements=function(e,t,i,n,r){return e$2e(r)?(r.x=e,r.y=t,r.z=i,r.w=n,r):new e$2c(e,t,i,n)},e$2c.fromColor=function(e,t){return o$1q.typeOf.object("color",e),e$2e(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new e$2c(e.red,e.green,e.blue,e.alpha)},e$2c.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new e$2c(e.x,e.y,e.z,e.w)},e$2c.packedLength=4,e$2c.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},e$2c.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new e$2c),i.x=e[t++],i.y=e[t++],i.z=e[t++],i.w=e[t],i},e$2c.packArray=function(e,t){o$1q.defined("array",e);var i=e.length,n=4*i;if(e$2e(t)){if(!Array.isArray(t)&&t.length!==n)throw new t$15("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)e$2c.pack(e[r],t,4*r);return t},e$2c.unpackArray=function(e,t){if(o$1q.defined("array",e),o$1q.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!=0)throw new t$15("array length must be a multiple of 4.");var i=e.length;e$2e(t)?t.length=i/4:t=new Array(i/4);for(var n=0;n<i;n+=4){var r=n/4;t[r]=e$2c.unpack(e,n,t[r])}return t},e$2c.fromArray=e$2c.unpack,e$2c.maximumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)},e$2c.minimumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)},e$2c.minimumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i.w=Math.min(e.w,t.w),i},e$2c.maximumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i.w=Math.max(e.w,t.w),i},e$2c.magnitudeSquared=function(e){return o$1q.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},e$2c.magnitude=function(e){return Math.sqrt(e$2c.magnitudeSquared(e))};var b$1k=new e$2c;e$2c.distance=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e$2c.subtract(e,t,b$1k),e$2c.magnitude(b$1k)},e$2c.distanceSquared=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e$2c.subtract(e,t,b$1k),e$2c.magnitudeSquared(b$1k)},e$2c.normalize=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=e$2c.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t.w=e.w/i,isNaN(t.x)||isNaN(t.y)||isNaN(t.z)||isNaN(t.w))throw new t$15("normalized result is not a number");return t},e$2c.dot=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},e$2c.multiplyComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i.w=e.w*t.w,i},e$2c.divideComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i.w=e.w/t.w,i},e$2c.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},e$2c.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},e$2c.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},e$2c.divideByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},e$2c.negate=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},e$2c.abs=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var j$1l=new e$2c;e$2c.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),e$2c.multiplyByScalar(t,i,j$1l),n=e$2c.multiplyByScalar(e,1-i,n),e$2c.add(j$1l,n,n)};var h$19=new e$2c;e$2c.mostOrthogonalAxis=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=e$2c.normalize(e,h$19);return e$2c.abs(i,i),t=i.x<=i.y?i.x<=i.z?i.x<=i.w?e$2c.clone(e$2c.UNIT_X,t):e$2c.clone(e$2c.UNIT_W,t):i.z<=i.w?e$2c.clone(e$2c.UNIT_Z,t):e$2c.clone(e$2c.UNIT_W,t):i.y<=i.z?i.y<=i.w?e$2c.clone(e$2c.UNIT_Y,t):e$2c.clone(e$2c.UNIT_W,t):i.z<=i.w?e$2c.clone(e$2c.UNIT_Z,t):e$2c.clone(e$2c.UNIT_W,t)},e$2c.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},e$2c.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]&&e.w===t[i+3]},e$2c.equalsEpsilon=function(e,t,i,n){return e===t||e$2e(e)&&e$2e(t)&&e$2d.equalsEpsilon(e.x,t.x,i,n)&&e$2d.equalsEpsilon(e.y,t.y,i,n)&&e$2d.equalsEpsilon(e.z,t.z,i,n)&&e$2d.equalsEpsilon(e.w,t.w,i,n)},e$2c.ZERO=Object.freeze(new e$2c(0,0,0,0)),e$2c.UNIT_X=Object.freeze(new e$2c(1,0,0,0)),e$2c.UNIT_Y=Object.freeze(new e$2c(0,1,0,0)),e$2c.UNIT_Z=Object.freeze(new e$2c(0,0,1,0)),e$2c.UNIT_W=Object.freeze(new e$2c(0,0,0,1)),e$2c.prototype.clone=function(e){return e$2c.clone(this,e)},e$2c.prototype.equals=function(e){return e$2c.equals(this,e)},e$2c.prototype.equalsEpsilon=function(e,t,i){return e$2c.equalsEpsilon(this,e,t,i)},e$2c.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var i$1g=new Float32Array(1),z$14=256,T$1g=65536,N$11=16777216,_$17=1/z$14,M$1e=1/T$1g,d$1t=1/N$11,O$_=38;e$2c.packFloat=function(e,t){if(o$1q.typeOf.number("value",e),e$2e(t)||(t=new e$2c),i$1g[0]=e,0===(e=i$1g[0]))return e$2c.clone(e$2c.ZERO,t);var i,n=e<0?1:0;isFinite(e)?(e=Math.abs(e),i=Math.floor(e$2d.logBase(e,10))+1,e/=Math.pow(10,i)):(e=.1,i=O$_);var r=e*z$14;return t.x=Math.floor(r),r=(r-t.x)*z$14,t.y=Math.floor(r),r=(r-t.y)*z$14,t.z=Math.floor(r),t.w=2*(i+O$_)+n,t},e$2c.unpackFloat=function(e){o$1q.typeOf.object("packedFloat",e);var t=e.w/2,i=Math.floor(t),n=2*(t-i);if(n=-(n=2*n-1),(i-=O$_)>=O$_)return n<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var r=n*e.x*_$17;return r+=n*e.y*M$1e,(r+=n*e.z*d$1t)*Math.pow(10,i)},e$2c.prototype.toArray=function(e,t){e$2c.pack(this,e,t)};var F$1m=new o$1p,L$1m=new o$1p;function P$1d(e,t,i,n,r){if(!e$2e(e))throw new t$15("cartesian is required.");if(!e$2e(t))throw new t$15("oneOverRadii is required.");if(!e$2e(i))throw new t$15("oneOverRadiiSquared is required.");if(!e$2e(n))throw new t$15("centerToleranceSquared is required.");var o=e.x,a=e.y,s=e.z,l=t.x,u=t.y,c=t.z,h=o*o*l*l,d=a*a*u*u,f=s*s*c*c,p=h+d+f,_=Math.sqrt(1/p),m=o$1p.multiplyByScalar(e,_,F$1m);if(p<n)return isFinite(_)?o$1p.clone(m,r):void 0;var g=i.x,x=i.y,y=i.z,v=L$1m;v.x=m.x*g*2,v.y=m.y*x*2,v.z=m.z*y*2;var $,b,T,C,S,w,E,P=(1-_)*o$1p.magnitude(e)/(.5*o$1p.magnitude(v)),A=0;do{A=($=h*(S=(b=1/(1+(P-=A)*g))*b)+d*(w=(T=1/(1+P*x))*T)+f*(E=(C=1/(1+P*y))*C)-1)/(-2*(h*(S*b)*g+d*(w*T)*x+f*(E*C)*y))}while(Math.abs($)>e$2d.EPSILON12);return e$2e(r)?(r.x=o*b,r.y=a*T,r.z=s*C,r):new o$1p(o*b,a*T,s*C)}function a$18(e,t,i){this.longitude=u$Z(e,0),this.latitude=u$Z(t,0),this.height=u$Z(i,0)}a$18.fromRadians=function(e,t,i,n){return o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),i=u$Z(i,0),e$2e(n)?(n.longitude=e,n.latitude=t,n.height=i,n):new a$18(e,t,i)},a$18.fromDegrees=function(e,t,i,n){return o$1q.typeOf.number("longitude",e),o$1q.typeOf.number("latitude",t),e=e$2d.toRadians(e),t=e$2d.toRadians(t),a$18.fromRadians(e,t,i,n)};var g$1m=new o$1p,l$1h=new o$1p,w$19=new o$1p,b$1j=new o$1p(1/6378137,1/6378137,1/6356752.314245179),y$14=new o$1p(1/40680631590769,1/40680631590769,1/40408299984661.445),C$1i=e$2d.EPSILON1;function p$1e(e,t,i,n,r,o,a,s,l){this[0]=u$Z(e,0),this[1]=u$Z(n,0),this[2]=u$Z(a,0),this[3]=u$Z(t,0),this[4]=u$Z(r,0),this[5]=u$Z(s,0),this[6]=u$Z(i,0),this[7]=u$Z(o,0),this[8]=u$Z(l,0),this.isMatrix3=!0}a$18.fromCartesian=function(e,t,i){var n=e$2e(t)?t.oneOverRadii:b$1j,r=e$2e(t)?t.oneOverRadiiSquared:y$14,o=P$1d(e,n,r,e$2e(t)?t._centerToleranceSquared:C$1i,l$1h);if(e$2e(o)){var a=o$1p.multiplyComponents(o,r,g$1m);a=o$1p.normalize(a,a);var s=o$1p.subtract(e,o,w$19),l=Math.atan2(a.y,a.x),u=Math.asin(a.z),c=e$2d.sign(o$1p.dot(s,e))*o$1p.magnitude(s);return e$2e(i)?(i.longitude=l,i.latitude=u,i.height=c,i):new a$18(l,u,c)}},a$18.toCartesian=function(e,t,i){return o$1q.defined("cartographic",e),o$1p.fromRadians(e.longitude,e.latitude,e.height,t,i)},a$18.sphericalDistance=function(e,t,i,n){if(o$1q.defined("longitudeA",e),o$1q.defined("longitudeB",i),o$1q.defined("latitudeA",t),o$1q.defined("latitudeB",n),e===i&&t===n)return 0;var r=e$2d.toRadians(t),o=e$2d.toRadians(n),a=e$2d.toRadians(e),s=e$2d.toRadians(i),l=a*a+r*r,u=s*s+o*o,c=(l+u-((a-s)*(a-s)+(r-o)*(r-o)))/(2*Math.sqrt(l)*Math.sqrt(u));return c=e$2d.clamp(c,-1,1),6378137*Math.acos(c)},a$18.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new a$18(e.longitude,e.latitude,e.height)},a$18.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},a$18.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},a$18.ZERO=Object.freeze(new a$18(0,0,0)),a$18.prototype.clone=function(e){return a$18.clone(this,e)},a$18.prototype.equals=function(e){return a$18.equals(this,e)},a$18.prototype.equalsEpsilon=function(e,t){return a$18.equalsEpsilon(this,e,t)},a$18.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},p$1e.packedLength=9,p$1e.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t},p$1e.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new p$1e),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i},p$1e.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new p$1e(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},p$1e.fromArray=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new p$1e),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i[4]=e[t+4],i[5]=e[t+5],i[6]=e[t+6],i[7]=e[t+7],i[8]=e[t+8],i},p$1e.fromColumnMajorArray=function(e,t){return o$1q.defined("values",e),p$1e.clone(e,t)},p$1e.fromRowMajorArray=function(e,t){return o$1q.defined("values",e),e$2e(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new p$1e(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},p$1e.fromQuaternion=function(e,t){o$1q.typeOf.object("quaternion",e);var i=e.x*e.x,n=e.x*e.y,r=e.x*e.z,o=e.x*e.w,a=e.y*e.y,s=e.y*e.z,l=e.y*e.w,u=e.z*e.z,c=e.z*e.w,h=e.w*e.w,d=i-a-u+h,f=2*(n-c),p=2*(r+l),_=2*(n+c),m=-i+a-u+h,g=2*(s-o),x=2*(r-l),y=2*(s+o),v=-i-a+u+h;return e$2e(t)?(t[0]=d,t[1]=_,t[2]=x,t[3]=f,t[4]=m,t[5]=y,t[6]=p,t[7]=g,t[8]=v,t):new p$1e(d,f,p,_,m,g,x,y,v)},p$1e.fromHeadingPitchRoll=function(e,t){o$1q.typeOf.object("headingPitchRoll",e);var i=Math.cos(-e.pitch),n=Math.cos(-e.heading),r=Math.cos(e.roll),o=Math.sin(-e.pitch),a=Math.sin(-e.heading),s=Math.sin(e.roll),l=i*n,u=-r*a+s*o*n,c=s*a+r*o*n,h=i*a,d=r*n+s*o*a,f=-s*n+r*o*a,p=-o,_=s*i,m=r*i;return e$2e(t)?(t[0]=l,t[1]=h,t[2]=p,t[3]=u,t[4]=d,t[5]=_,t[6]=c,t[7]=f,t[8]=m,t):new p$1e(l,u,c,h,d,f,p,_,m)},p$1e.fromScale=function(e,t){return o$1q.typeOf.object("scale",e),e$2e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new p$1e(e.x,0,0,0,e.y,0,0,0,e.z)},p$1e.fromUniformScale=function(e,t){return o$1q.typeOf.number("scale",e),e$2e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new p$1e(e,0,0,0,e,0,0,0,e)},p$1e.fromCrossProduct=function(e,t){return o$1q.typeOf.object("vector",e),e$2e(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new p$1e(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},p$1e.fromRotationX=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2e(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=i,t[5]=n,t[6]=0,t[7]=-n,t[8]=i,t):new p$1e(1,0,0,0,i,-n,0,n,i)},p$1e.fromRotationY=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2e(t)?(t[0]=i,t[1]=0,t[2]=-n,t[3]=0,t[4]=1,t[5]=0,t[6]=n,t[7]=0,t[8]=i,t):new p$1e(i,0,n,0,1,0,-n,0,i)},p$1e.fromRotationZ=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2e(t)?(t[0]=i,t[1]=n,t[2]=0,t[3]=-n,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new p$1e(i,-n,0,n,i,0,0,0,1)},p$1e.toArray=function(e,t){return o$1q.typeOf.object("matrix",e),e$2e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},p$1e.getElementIndex=function(e,t){return o$1q.typeOf.number.greaterThanOrEquals("row",t,0),o$1q.typeOf.number.lessThanOrEquals("row",t,2),o$1q.typeOf.number.greaterThanOrEquals("column",e,0),o$1q.typeOf.number.lessThanOrEquals("column",e,2),3*e+t},p$1e.getColumn=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("result",i);var n=3*t,r=e[n],o=e[n+1],a=e[n+2];return i.x=r,i.y=o,i.z=a,i},p$1e.setColumn=function(e,t,i,n){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n);var r=3*t;return(n=p$1e.clone(e,n))[r]=i.x,n[r+1]=i.y,n[r+2]=i.z,n},p$1e.getRow=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("result",i);var n=e[t],r=e[t+3],o=e[t+6];return i.x=n,i.y=r,i.z=o,i},p$1e.setRow=function(e,t,i,n){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,2),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n),(n=p$1e.clone(e,n))[t]=i.x,n[t+3]=i.y,n[t+6]=i.z,n};var W$1d=new o$1p;p$1e.getScale=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=o$1p.magnitude(o$1p.fromElements(e[0],e[1],e[2],W$1d)),t.y=o$1p.magnitude(o$1p.fromElements(e[3],e[4],e[5],W$1d)),t.z=o$1p.magnitude(o$1p.fromElements(e[6],e[7],e[8],W$1d)),t};var A$1l=new o$1p;p$1e.getMaximumScale=function(e){return p$1e.getScale(e,A$1l),o$1p.maximumComponent(A$1l)},p$1e.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],r=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],o=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],a=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],s=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],l=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],u=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],c=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],h=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return i[0]=n,i[1]=r,i[2]=o,i[3]=a,i[4]=s,i[5]=l,i[6]=u,i[7]=c,i[8]=h,i},p$1e.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i},p$1e.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i},p$1e.multiplyByVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[3]*r+e[6]*o,s=e[1]*n+e[4]*r+e[7]*o,l=e[2]*n+e[5]*r+e[8]*o;return i.x=a,i.y=s,i.z=l,i},p$1e.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i},p$1e.multiplyByScale=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.x,i[3]=e[3]*t.y,i[4]=e[4]*t.y,i[5]=e[5]*t.y,i[6]=e[6]*t.z,i[7]=e[7]*t.z,i[8]=e[8]*t.z,i},p$1e.negate=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},p$1e.transpose=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[3],r=e[6],o=e[1],a=e[4],s=e[7],l=e[2],u=e[5],c=e[8];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=s,t[6]=l,t[7]=u,t[8]=c,t};var F$1l=new o$1p(1,1,1);function X$17(e){for(var t=0,i=0;i<9;++i){var n=e[i];t+=n*n}return Math.sqrt(t)}p$1e.getRotation=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=o$1p.divideComponents(F$1l,p$1e.getScale(e,A$1l),A$1l);return t=p$1e.multiplyByScale(e,i,t)};var D$19=[1,0,0],k$1d=[2,2,1];function H$1h(e){for(var t=0,i=0;i<3;++i){var n=e[p$1e.getElementIndex(k$1d[i],D$19[i])];t+=2*n*n}return Math.sqrt(t)}function Q$1e(e,t){for(var i=e$2d.EPSILON15,n=0,r=1,o=0;o<3;++o){var a=Math.abs(e[p$1e.getElementIndex(k$1d[o],D$19[o])]);a>n&&(r=o,n=a)}var s=1,l=0,u=D$19[r],c=k$1d[r];if(Math.abs(e[p$1e.getElementIndex(c,u)])>i){var h,d=(e[p$1e.getElementIndex(c,c)]-e[p$1e.getElementIndex(u,u)])/2/e[p$1e.getElementIndex(c,u)];l=(h=d<0?-1/(-d+Math.sqrt(1+d*d)):1/(d+Math.sqrt(1+d*d)))*(s=1/Math.sqrt(1+h*h))}return(t=p$1e.clone(p$1e.IDENTITY,t))[p$1e.getElementIndex(u,u)]=t[p$1e.getElementIndex(c,c)]=s,t[p$1e.getElementIndex(c,u)]=l,t[p$1e.getElementIndex(u,c)]=-l,t}var U$1i=new p$1e,V$19=new p$1e;function t$13(e){var t;this.name="RuntimeError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}function p$1d(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){this[0]=u$Z(e,0),this[1]=u$Z(r,0),this[2]=u$Z(l,0),this[3]=u$Z(d,0),this[4]=u$Z(t,0),this[5]=u$Z(o,0),this[6]=u$Z(u,0),this[7]=u$Z(f,0),this[8]=u$Z(i,0),this[9]=u$Z(a,0),this[10]=u$Z(c,0),this[11]=u$Z(p,0),this[12]=u$Z(n,0),this[13]=u$Z(s,0),this[14]=u$Z(h,0),this[15]=u$Z(_,0),this.isMatrix4=!0}p$1e.computeEigenDecomposition=function(e,t){o$1q.typeOf.object("matrix",e);var i=e$2d.EPSILON20,n=0,r=0;e$2e(t)||(t={});for(var o=t.unitary=p$1e.clone(p$1e.IDENTITY,t.unitary),a=t.diagonal=p$1e.clone(e,t.diagonal),s=i*X$17(a);r<10&&H$1h(a)>s;)Q$1e(a,U$1i),p$1e.transpose(U$1i,V$19),p$1e.multiply(a,U$1i,a),p$1e.multiply(V$19,a,a),p$1e.multiply(o,U$1i,o),++n>2&&(++r,n=0);return t},p$1e.abs=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},p$1e.determinant=function(e){o$1q.typeOf.object("matrix",e);var t=e[0],i=e[3],n=e[6],r=e[1],o=e[4],a=e[7],s=e[2],l=e[5],u=e[8];return t*(o*u-l*a)+r*(l*n-i*u)+s*(i*a-o*n)},p$1e.inverse=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=p$1e.determinant(e);if(Math.abs(h)<=e$2d.EPSILON15)throw new t$15("matrix is not invertible");t[0]=a*c-u*s,t[1]=u*r-n*c,t[2]=n*s-a*r,t[3]=l*s-o*c,t[4]=i*c-l*r,t[5]=o*r-i*s,t[6]=o*u-l*a,t[7]=l*n-i*u,t[8]=i*a-o*n;var d=1/h;return p$1e.multiplyByScalar(t,d,t)},p$1e.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},p$1e.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i},p$1e.IDENTITY=Object.freeze(new p$1e(1,0,0,0,1,0,0,0,1)),p$1e.ZERO=Object.freeze(new p$1e(0,0,0,0,0,0,0,0,0)),p$1e.COLUMN0ROW0=0,p$1e.COLUMN0ROW1=1,p$1e.COLUMN0ROW2=2,p$1e.COLUMN1ROW0=3,p$1e.COLUMN1ROW1=4,p$1e.COLUMN1ROW2=5,p$1e.COLUMN2ROW0=6,p$1e.COLUMN2ROW1=7,p$1e.COLUMN2ROW2=8,Object.defineProperties(p$1e.prototype,{length:{get:function(){return p$1e.packedLength}}}),p$1e.prototype.clone=function(e){return p$1e.clone(this,e)},p$1e.prototype.equals=function(e){return p$1e.equals(this,e)},p$1e.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]},p$1e.prototype.equalsEpsilon=function(e,t){return p$1e.equalsEpsilon(this,e,t)},p$1e.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},p$1e.prototype.toArray=function(e,t){p$1e.pack(this,e,t)},e$2e(Object.create)&&(t$13.prototype=Object.create(Error.prototype),t$13.prototype.constructor=t$13),t$13.prototype.toString=function(){var e=this.name+": "+this.message;return e$2e(this.stack)&&(e+="\n"+this.stack.toString()),e},p$1d.packedLength=16,p$1d.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t[i++]=e[9],t[i++]=e[10],t[i++]=e[11],t[i++]=e[12],t[i++]=e[13],t[i++]=e[14],t[i]=e[15],t},p$1d.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new p$1d),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i[9]=e[t++],i[10]=e[t++],i[11]=e[t++],i[12]=e[t++],i[13]=e[t++],i[14]=e[t++],i[15]=e[t],i},p$1d.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new p$1d(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])},p$1d.fromArray=p$1d.unpack,p$1d.fromColumnMajorArray=function(e,t){return o$1q.defined("values",e),p$1d.clone(e,t)},p$1d.fromRowMajorArray=function(e,t){return o$1q.defined("values",e),e$2e(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new p$1d(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},p$1d.fromRotationTranslation=function(e,t,i){return o$1q.typeOf.object("rotation",e),t=u$Z(t,o$1p.ZERO),e$2e(i)?(i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=0,i[4]=e[3],i[5]=e[4],i[6]=e[5],i[7]=0,i[8]=e[6],i[9]=e[7],i[10]=e[8],i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,i):new p$1d(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)},p$1d.fromTranslationQuaternionRotationScale=function(e,t,i,n){o$1q.typeOf.object("translation",e),o$1q.typeOf.object("rotation",t),o$1q.typeOf.object("scale",i),e$2e(n)||(n=new p$1d);var r=i.x,o=i.y,a=i.z,s=t.x*t.x,l=t.x*t.y,u=t.x*t.z,c=t.x*t.w,h=t.y*t.y,d=t.y*t.z,f=t.y*t.w,p=t.z*t.z,_=t.z*t.w,m=t.w*t.w,g=s-h-p+m,x=2*(l-_),y=2*(u+f),v=2*(l+_),$=-s+h-p+m,b=2*(d-c),T=2*(u-f),C=2*(d+c),S=-s-h+p+m;return n[0]=g*r,n[1]=v*r,n[2]=T*r,n[3]=0,n[4]=x*o,n[5]=$*o,n[6]=C*o,n[7]=0,n[8]=y*a,n[9]=b*a,n[10]=S*a,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n},p$1d.fromTranslationRotationScale=function(e,t){return o$1q.typeOf.object("translationRotationScale",e),p$1d.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},p$1d.fromTranslation=function(e,t){return o$1q.typeOf.object("translation",e),p$1d.fromRotationTranslation(p$1e.IDENTITY,e,t)},p$1d.fromScale=function(e,t){return o$1q.typeOf.object("scale",e),e$2e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new p$1d(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},p$1d.fromUniformScale=function(e,t){return o$1q.typeOf.number("scale",e),e$2e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new p$1d(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};var $$19=new o$1p,I$1y=new o$1p,i$1f=new o$1p;p$1d.fromCamera=function(e,t){o$1q.typeOf.object("camera",e);var i=e.position,n=e.direction,r=e.up;o$1q.typeOf.object("camera.position",i),o$1q.typeOf.object("camera.direction",n),o$1q.typeOf.object("camera.up",r),o$1p.normalize(n,$$19),o$1p.normalize(o$1p.cross($$19,r,I$1y),I$1y),o$1p.normalize(o$1p.cross(I$1y,$$19,i$1f),i$1f);var o=I$1y.x,a=I$1y.y,s=I$1y.z,l=$$19.x,u=$$19.y,c=$$19.z,h=i$1f.x,d=i$1f.y,f=i$1f.z,p=i.x,_=i.y,m=i.z,g=o*-p+a*-_+s*-m,x=h*-p+d*-_+f*-m,y=l*p+u*_+c*m;return e$2e(t)?(t[0]=o,t[1]=h,t[2]=-l,t[3]=0,t[4]=a,t[5]=d,t[6]=-u,t[7]=0,t[8]=s,t[9]=f,t[10]=-c,t[11]=0,t[12]=g,t[13]=x,t[14]=y,t[15]=1,t):new p$1d(o,a,s,g,h,d,f,x,-l,-u,-c,y,0,0,0,1)},p$1d.computePerspectiveFieldOfView=function(e,t,i,n,r){o$1q.typeOf.number.greaterThan("fovY",e,0),o$1q.typeOf.number.lessThan("fovY",e,Math.PI),o$1q.typeOf.number.greaterThan("near",i,0),o$1q.typeOf.number.greaterThan("far",n,0),o$1q.typeOf.object("result",r);var o=1/Math.tan(.5*e),a=o/t,s=(n+i)/(i-n),l=2*n*i/(i-n);return r[0]=a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=o,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=s,r[11]=-1,r[12]=0,r[13]=0,r[14]=l,r[15]=0,r},p$1d.computeOrthographicOffCenter=function(e,t,i,n,r,o,a){o$1q.typeOf.number("left",e),o$1q.typeOf.number("right",t),o$1q.typeOf.number("bottom",i),o$1q.typeOf.number("top",n),o$1q.typeOf.number("near",r),o$1q.typeOf.number("far",o),o$1q.typeOf.object("result",a);var s=1/(t-e),l=1/(n-i),u=1/(o-r),c=-(t+e)*s,h=-(n+i)*l,d=-(o+r)*u;return s*=2,l*=2,u*=-2,a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=u,a[11]=0,a[12]=c,a[13]=h,a[14]=d,a[15]=1,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,a,a),a},p$1d.computePerspectiveOffCenter=function(e,t,i,n,r,o,a){o$1q.typeOf.number("left",e),o$1q.typeOf.number("right",t),o$1q.typeOf.number("bottom",i),o$1q.typeOf.number("top",n),o$1q.typeOf.number("near",r),o$1q.typeOf.number("far",o),o$1q.typeOf.object("result",a);var s=2*r/(t-e),l=2*r/(n-i),u=(t+e)/(t-e),c=(n+i)/(n-i),h=-(o+r)/(o-r),d=-2*o*r/(o-r);return a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=u,a[9]=c,a[10]=h,a[11]=-1,a[12]=0,a[13]=0,a[14]=d,a[15]=0,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,a,a),a},p$1d.computeInfinitePerspectiveOffCenter=function(e,t,i,n,r,o){o$1q.typeOf.number("left",e),o$1q.typeOf.number("right",t),o$1q.typeOf.number("bottom",i),o$1q.typeOf.number("top",n),o$1q.typeOf.number("near",r),o$1q.typeOf.object("result",o);var a=2*r/(t-e),s=2*r/(n-i),l=(t+e)/(t-e),u=(n+i)/(n-i),c=-2*r;return o[0]=a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=l,o[9]=u,o[10]=-1,o[11]=-1,o[12]=0,o[13]=0,o[14]=c,o[15]=0,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,o,o),o},p$1d.computeViewportTransformation=function(e,t,i,n){o$1q.typeOf.object("result",n),e=u$Z(e,u$Z.EMPTY_OBJECT);var r=u$Z(e.x,0),o=u$Z(e.y,0),a=u$Z(e.width,0),s=u$Z(e.height,0);t=u$Z(t,0);var l=.5*a,u=.5*s,c=.5*((i=u$Z(i,1))-t),h=l,d=u,f=c,p=r+l,_=o+u,m=t+c;return n[0]=h,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=d,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=f,n[11]=0,n[12]=p,n[13]=_,n[14]=m,n[15]=1,n},p$1d.computeView=function(e,t,i,n,r){return o$1q.typeOf.object("position",e),o$1q.typeOf.object("direction",t),o$1q.typeOf.object("up",i),o$1q.typeOf.object("right",n),o$1q.typeOf.object("result",r),r[0]=n.x,r[1]=i.x,r[2]=-t.x,r[3]=0,r[4]=n.y,r[5]=i.y,r[6]=-t.y,r[7]=0,r[8]=n.z,r[9]=i.z,r[10]=-t.z,r[11]=0,r[12]=-o$1p.dot(n,e),r[13]=-o$1p.dot(i,e),r[14]=o$1p.dot(t,e),r[15]=1,r},p$1d.toArray=function(e,t){return o$1q.typeOf.object("matrix",e),e$2e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},p$1d.getElementIndex=function(e,t){return o$1q.typeOf.number.greaterThanOrEquals("row",t,0),o$1q.typeOf.number.lessThanOrEquals("row",t,3),o$1q.typeOf.number.greaterThanOrEquals("column",e,0),o$1q.typeOf.number.lessThanOrEquals("column",e,3),4*e+t},p$1d.getColumn=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("result",i);var n=4*t,r=e[n],o=e[n+1],a=e[n+2],s=e[n+3];return i.x=r,i.y=o,i.z=a,i.w=s,i},p$1d.setColumn=function(e,t,i,n){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n);var r=4*t;return(n=p$1d.clone(e,n))[r]=i.x,n[r+1]=i.y,n[r+2]=i.z,n[r+3]=i.w,n},p$1d.setTranslation=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("translation",t),o$1q.typeOf.object("result",i),i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=e[15],i};var p0=new o$1p;p$1d.setScale=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i);var n=p$1d.getScale(e,p0),r=o$1p.divideComponents(t,n,p0);return p$1d.multiplyByScale(e,r,i)},p$1d.getRow=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("result",i);var n=e[t],r=e[t+4],o=e[t+8],a=e[t+12];return i.x=n,i.y=r,i.z=o,i.w=a,i},p$1d.setRow=function(e,t,i,n){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,3),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n),(n=p$1d.clone(e,n))[t]=i.x,n[t+4]=i.y,n[t+8]=i.z,n[t+12]=i.w,n};var O0=new o$1p;p$1d.getScale=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=o$1p.magnitude(o$1p.fromElements(e[0],e[1],e[2],O0)),t.y=o$1p.magnitude(o$1p.fromElements(e[4],e[5],e[6],O0)),t.z=o$1p.magnitude(o$1p.fromElements(e[8],e[9],e[10],O0)),t};var f0$1=new o$1p;p$1d.getMaximumScale=function(e){return p$1d.getScale(e,f0$1),o$1p.maximumComponent(f0$1)},p$1d.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=e[10],p=e[11],_=e[12],m=e[13],g=e[14],x=e[15],y=t[0],v=t[1],$=t[2],b=t[3],T=t[4],C=t[5],S=t[6],w=t[7],E=t[8],P=t[9],A=t[10],L=t[11],M=t[12],R=t[13],O=t[14],D=t[15],I=n*y+s*v+h*$+_*b,B=r*y+l*v+d*$+m*b,F=o*y+u*v+f*$+g*b,N=a*y+c*v+p*$+x*b,G=n*T+s*C+h*S+_*w,z=r*T+l*C+d*S+m*w,U=o*T+u*C+f*S+g*w,V=a*T+c*C+p*S+x*w,k=n*E+s*P+h*A+_*L,W=r*E+l*P+d*A+m*L,H=o*E+u*P+f*A+g*L,q=a*E+c*P+p*A+x*L,j=n*M+s*R+h*O+_*D,X=r*M+l*R+d*O+m*D,Y=o*M+u*R+f*O+g*D,Z=a*M+c*R+p*O+x*D;return i[0]=I,i[1]=B,i[2]=F,i[3]=N,i[4]=G,i[5]=z,i[6]=U,i[7]=V,i[8]=k,i[9]=W,i[10]=H,i[11]=q,i[12]=j,i[13]=X,i[14]=Y,i[15]=Z,i},p$1d.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i[9]=e[9]+t[9],i[10]=e[10]+t[10],i[11]=e[11]+t[11],i[12]=e[12]+t[12],i[13]=e[13]+t[13],i[14]=e[14]+t[14],i[15]=e[15]+t[15],i},p$1d.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i[9]=e[9]-t[9],i[10]=e[10]-t[10],i[11]=e[11]-t[11],i[12]=e[12]-t[12],i[13]=e[13]-t[13],i[14]=e[14]-t[14],i[15]=e[15]-t[15],i},p$1d.multiplyTransformation=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],c=e[9],h=e[10],d=e[12],f=e[13],p=e[14],_=t[0],m=t[1],g=t[2],x=t[4],y=t[5],v=t[6],$=t[8],b=t[9],T=t[10],C=t[12],S=t[13],w=t[14],E=n*_+a*m+u*g,P=r*_+s*m+c*g,A=o*_+l*m+h*g,L=n*x+a*y+u*v,M=r*x+s*y+c*v,R=o*x+l*y+h*v,O=n*$+a*b+u*T,D=r*$+s*b+c*T,I=o*$+l*b+h*T,B=n*C+a*S+u*w+d,F=r*C+s*S+c*w+f,N=o*C+l*S+h*w+p;return i[0]=E,i[1]=P,i[2]=A,i[3]=0,i[4]=L,i[5]=M,i[6]=R,i[7]=0,i[8]=O,i[9]=D,i[10]=I,i[11]=0,i[12]=B,i[13]=F,i[14]=N,i[15]=1,i},p$1d.multiplyByMatrix3=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("rotation",t),o$1q.typeOf.object("result",i);var n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],c=e[9],h=e[10],d=t[0],f=t[1],p=t[2],_=t[3],m=t[4],g=t[5],x=t[6],y=t[7],v=t[8],$=n*d+a*f+u*p,b=r*d+s*f+c*p,T=o*d+l*f+h*p,C=n*_+a*m+u*g,S=r*_+s*m+c*g,w=o*_+l*m+h*g,E=n*x+a*y+u*v,P=r*x+s*y+c*v,A=o*x+l*y+h*v;return i[0]=$,i[1]=b,i[2]=T,i[3]=0,i[4]=C,i[5]=S,i[6]=w,i[7]=0,i[8]=E,i[9]=P,i[10]=A,i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},p$1d.multiplyByTranslation=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("translation",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=n*e[0]+r*e[4]+o*e[8]+e[12],s=n*e[1]+r*e[5]+o*e[9]+e[13],l=n*e[2]+r*e[6]+o*e[10]+e[14];return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=a,i[13]=s,i[14]=l,i[15]=e[15],i};var r$1f=new o$1p;p$1d.multiplyByUniformScale=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scale",t),o$1q.typeOf.object("result",i),r$1f.x=t,r$1f.y=t,r$1f.z=t,p$1d.multiplyByScale(e,r$1f,i)},p$1d.multiplyByScale=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z;return 1===n&&1===r&&1===o?p$1d.clone(e,i):(i[0]=n*e[0],i[1]=n*e[1],i[2]=n*e[2],i[3]=0,i[4]=r*e[4],i[5]=r*e[5],i[6]=r*e[6],i[7]=0,i[8]=o*e[8],i[9]=o*e[9],i[10]=o*e[10],i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=1,i)},p$1d.multiplyByVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=t.w,s=e[0]*n+e[4]*r+e[8]*o+e[12]*a,l=e[1]*n+e[5]*r+e[9]*o+e[13]*a,u=e[2]*n+e[6]*r+e[10]*o+e[14]*a,c=e[3]*n+e[7]*r+e[11]*o+e[15]*a;return i.x=s,i.y=l,i.z=u,i.w=c,i},p$1d.multiplyByPointAsVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[4]*r+e[8]*o,s=e[1]*n+e[5]*r+e[9]*o,l=e[2]*n+e[6]*r+e[10]*o;return i.x=a,i.y=s,i.z=l,i},p$1d.multiplyByPoint=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[4]*r+e[8]*o+e[12],s=e[1]*n+e[5]*r+e[9]*o+e[13],l=e[2]*n+e[6]*r+e[10]*o+e[14];return i.x=a,i.y=s,i.z=l,i},p$1d.multiplyByDirection=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=t.x,r=t.y,o=t.z;return i.x=n*e[0]+r*e[4]+o*e[8],i.y=n*e[1]+r*e[5]+o*e[9],i.z=n*e[2]+r*e[6]+o*e[10],i},p$1d.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i[9]=e[9]*t,i[10]=e[10]*t,i[11]=e[11]*t,i[12]=e[12]*t,i[13]=e[13]*t,i[14]=e[14]*t,i[15]=e[15]*t,i},p$1d.multiplyByPlane=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("plane",t),o$1q.typeOf.object("result",i);var n=new p$1d,r=new p$1d;p$1d.inverse(e,n),p$1d.transpose(n,r);var o=new e$2c(t.normal.x,t.normal.y,t.normal.z,t.distance);p$1d.multiplyByVector(r,o,o),i.normal.x=o.x,i.normal.y=o.y,i.normal.z=o.z;var a=o$1p.magnitude(i.normal);return o$1p.normalize(i.normal,i.normal),i.distance=o.w/a,i},p$1d.negate=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},p$1d.transpose=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[1],n=e[2],r=e[3],o=e[6],a=e[7],s=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=i,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[10]=e[10],t[11]=e[14],t[12]=r,t[13]=a,t[14]=s,t[15]=e[15],t},p$1d.abs=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},p$1d.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},p$1d.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i&&Math.abs(e[9]-t[9])<=i&&Math.abs(e[10]-t[10])<=i&&Math.abs(e[11]-t[11])<=i&&Math.abs(e[12]-t[12])<=i&&Math.abs(e[13]-t[13])<=i&&Math.abs(e[14]-t[14])<=i&&Math.abs(e[15]-t[15])<=i},p$1d.getTranslation=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=e[12],t.y=e[13],t.z=e[14],t},p$1d.getMatrix3=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},p$1d.getRotation=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var z0=new p$1e,h0$2=new p$1e,C0=new e$2c,T0=new e$2c(0,0,0,1);p$1d.inverse=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[4],r=e[8],o=e[12],a=e[1],s=e[5],l=e[9],u=e[13],c=e[2],h=e[6],d=e[10],f=e[14],p=e[3],_=e[7],m=e[11],g=e[15],x=d*g,y=f*m,v=h*g,$=f*_,b=h*m,T=d*_,C=c*g,S=f*p,w=c*m,E=d*p,P=c*_,A=h*p,L=x*s+$*l+b*u-(y*s+v*l+T*u),M=y*a+C*l+E*u-(x*a+S*l+w*u),R=v*a+S*s+P*u-($*a+C*s+A*u),O=T*a+w*s+A*l-(b*a+E*s+P*l),D=y*n+v*r+T*o-(x*n+$*r+b*o),I=x*i+S*r+w*o-(y*i+C*r+E*o),B=$*i+C*n+A*o-(v*i+S*n+P*o),F=b*i+E*n+P*r-(T*i+w*n+A*r),N=(x=r*u)*_+($=o*s)*m+(b=n*l)*g-((y=o*l)*_+(v=n*u)*m+(T=r*s)*g),G=y*p+(C=i*u)*m+(E=r*a)*g-(x*p+(S=o*a)*m+(w=i*l)*g),z=v*p+S*_+(P=i*s)*g-($*p+C*_+(A=n*a)*g),U=T*p+w*_+A*m-(b*p+E*_+P*m),V=v*d+T*f+y*h-(b*f+x*h+$*d),k=w*f+x*c+S*d-(C*d+E*f+y*c),W=C*h+A*f+$*c-(P*f+v*c+S*h),H=P*d+b*c+E*h-(w*h+A*d+T*c),q=i*L+n*M+r*R+o*O;if(Math.abs(q)<e$2d.EPSILON21){if(p$1e.equalsEpsilon(p$1d.getRotation(e,z0),h0$2,e$2d.EPSILON5)&&e$2c.equals(p$1d.getRow(e,3,C0),T0))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new t$13("matrix is not invertible because its determinate is zero.")}return q=1/q,t[0]=L*q,t[1]=M*q,t[2]=R*q,t[3]=O*q,t[4]=D*q,t[5]=I*q,t[6]=B*q,t[7]=F*q,t[8]=N*q,t[9]=G*q,t[10]=z*q,t[11]=U*q,t[12]=V*q,t[13]=k*q,t[14]=W*q,t[15]=H*q,t},p$1d.inverseTransformation=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[1],r=e[2],o=e[4],a=e[5],s=e[6],l=e[8],u=e[9],c=e[10],h=e[12],d=e[13],f=e[14],p=-i*h-n*d-r*f,_=-o*h-a*d-s*f,m=-l*h-u*d-c*f;return t[0]=i,t[1]=o,t[2]=l,t[3]=0,t[4]=n,t[5]=a,t[6]=u,t[7]=0,t[8]=r,t[9]=s,t[10]=c,t[11]=0,t[12]=p,t[13]=_,t[14]=m,t[15]=1,t},p$1d.IDENTITY=Object.freeze(new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),p$1d.ZERO=Object.freeze(new p$1d(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),p$1d.ConvertNDCToHalfZRange=Object.freeze(new p$1d(1,0,0,0,0,1,0,0,0,0,.5,.5,0,0,0,1)),p$1d.COLUMN0ROW0=0,p$1d.COLUMN0ROW1=1,p$1d.COLUMN0ROW2=2,p$1d.COLUMN0ROW3=3,p$1d.COLUMN1ROW0=4,p$1d.COLUMN1ROW1=5,p$1d.COLUMN1ROW2=6,p$1d.COLUMN1ROW3=7,p$1d.COLUMN2ROW0=8,p$1d.COLUMN2ROW1=9,p$1d.COLUMN2ROW2=10,p$1d.COLUMN2ROW3=11,p$1d.COLUMN3ROW0=12,p$1d.COLUMN3ROW1=13,p$1d.COLUMN3ROW2=14,p$1d.COLUMN3ROW3=15,p$1d.halfZRange=!1,Object.defineProperties(p$1d.prototype,{length:{get:function(){return p$1d.packedLength}}}),p$1d.prototype.clone=function(e){return p$1d.clone(this,e)},p$1d.prototype.equals=function(e){return p$1d.equals(this,e)},p$1d.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]&&e[9]===t[i+9]&&e[10]===t[i+10]&&e[11]===t[i+11]&&e[12]===t[i+12]&&e[13]===t[i+13]&&e[14]===t[i+14]&&e[15]===t[i+15]},p$1d.prototype.equalsEpsilon=function(e,t){return p$1d.equalsEpsilon(this,e,t)},p$1d.prototype.toString=function(){return"("+this[0]+", "+this[4]+", "+this[8]+", "+this[12]+")\n("+this[1]+", "+this[5]+", "+this[9]+", "+this[13]+")\n("+this[2]+", "+this[6]+", "+this[10]+", "+this[14]+")\n("+this[3]+", "+this[7]+", "+this[11]+", "+this[15]+")"},p$1d.prototype.toArray=function(e,t){p$1d.pack(this,e,t)};var e$2b={NONE:0,GEODESIC:1,RHUMB:2},m$1h=Object.freeze(e$2b);function d$1s(e,t,i,n){if(o$1q.defined("array",e),o$1q.defined("value",t),e$2e(i)&&o$1q.typeOf.number("start",i),e$2e(n)&&o$1q.typeOf.number("end",n),"function"==typeof e.fill)return e.fill(t,i,n);for(var r=e.length>>>0,o=u$Z(i,0),a=o<0?Math.max(r+o,0):Math.min(o,r),s=u$Z(n,r),l=s<0?Math.max(r+s,0):Math.min(s,r);a<l;)e[a]=t,a++;return e}function o$1o(e,t){this.x=u$Z(e,0),this.y=u$Z(t,0)}o$1o.fromElements=function(e,t,i){return e$2e(i)?(i.x=e,i.y=t,i):new o$1o(e,t)},o$1o.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.x=e.x,t.y=e.y,t):new o$1o(e.x,e.y)},o$1o.fromCartesian3=o$1o.clone,o$1o.fromCartesian4=o$1o.clone,o$1o.packedLength=2,o$1o.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.x,t[i]=e.y,t},o$1o.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new o$1o),i.x=e[t++],i.y=e[t],i},o$1o.packArray=function(e,t){o$1q.defined("array",e);var i=e.length,n=2*i;if(e$2e(t)){if(!Array.isArray(t)&&t.length!==n)throw new t$15("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)o$1o.pack(e[r],t,2*r);return t},o$1o.unpackArray=function(e,t){if(o$1q.defined("array",e),o$1q.typeOf.number.greaterThanOrEquals("array.length",e.length,2),e.length%2!=0)throw new t$15("array length must be a multiple of 2.");var i=e.length;e$2e(t)?t.length=i/2:t=new Array(i/2);for(var n=0;n<i;n+=2){var r=n/2;t[r]=o$1o.unpack(e,n,t[r])}return t},o$1o.fromArray=o$1o.unpack,o$1o.maximumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.max(e.x,e.y)},o$1o.minimumComponent=function(e){return o$1q.typeOf.object("cartesian",e),Math.min(e.x,e.y)},o$1o.minimumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i},o$1o.maximumByComponent=function(e,t,i){return o$1q.typeOf.object("first",e),o$1q.typeOf.object("second",t),o$1q.typeOf.object("result",i),i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i},o$1o.magnitudeSquared=function(e){return o$1q.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y},o$1o.magnitude=function(e){return Math.sqrt(o$1o.magnitudeSquared(e))};var i$1e=new o$1o;o$1o.distance=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1o.subtract(e,t,i$1e),o$1o.magnitude(i$1e)},o$1o.distanceSquared=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1o.subtract(e,t,i$1e),o$1o.magnitudeSquared(i$1e)},o$1o.normalize=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1o.magnitude(e);if(t.x=e.x/i,t.y=e.y/i,isNaN(t.x)||isNaN(t.y))throw new t$15("normalized result is not a number");return t},o$1o.dot=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.x*t.x+e.y*t.y},o$1o.multiplyComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x*t.x,i.y=e.y*t.y,i},o$1o.divideComponents=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x/t.x,i.y=e.y/t.y,i},o$1o.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i},o$1o.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i},o$1o.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i},o$1o.divideByScalar=function(e,t,i){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i},o$1o.negate=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t},o$1o.abs=function(e,t){return o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var m$1g=new o$1o;o$1o.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),o$1o.multiplyByScalar(t,i,m$1g),n=o$1o.multiplyByScalar(e,1-i,n),o$1o.add(m$1g,n,n)};var b$1i=new o$1o,O$Z=new o$1o;o$1o.angleBetween=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1o.normalize(e,b$1i),o$1o.normalize(t,O$Z),e$2d.acosClamped(o$1o.dot(b$1i,O$Z))};var x$1n=new o$1o;function _$16(e,t,i,n){t=u$Z(t,0),i=u$Z(i,0),n=u$Z(n,0),o$1q.typeOf.number.greaterThanOrEquals("x",t,0),o$1q.typeOf.number.greaterThanOrEquals("y",i,0),o$1q.typeOf.number.greaterThanOrEquals("z",n,0),e._radii=new o$1p(t,i,n),e._radiiSquared=new o$1p(t*t,i*i,n*n),e._radiiToTheFourth=new o$1p(t*t*t*t,i*i*i*i,n*n*n*n),e._oneOverRadii=new o$1p(0===t?0:1/t,0===i?0:1/i,0===n?0:1/n),e._oneOverRadiiSquared=new o$1p(0===t?0:1/(t*t),0===i?0:1/(i*i),0===n?0:1/(n*n)),e._minimumRadius=Math.min(t,i,n),e._maximumRadius=Math.max(t,i,n),e._centerToleranceSquared=e$2d.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function t$12(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,_$16(this,e,t,i)}o$1o.mostOrthogonalAxis=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1o.normalize(e,x$1n);return o$1o.abs(i,i),t=i.x<=i.y?o$1o.clone(o$1o.UNIT_X,t):o$1o.clone(o$1o.UNIT_Y,t)},o$1o.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.x===t.x&&e.y===t.y},o$1o.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]},o$1o.equalsEpsilon=function(e,t,i,n){return e===t||e$2e(e)&&e$2e(t)&&e$2d.equalsEpsilon(e.x,t.x,i,n)&&e$2d.equalsEpsilon(e.y,t.y,i,n)},o$1o.ZERO=Object.freeze(new o$1o(0,0)),o$1o.UNIT_X=Object.freeze(new o$1o(1,0)),o$1o.UNIT_Y=Object.freeze(new o$1o(0,1)),o$1o.prototype.clone=function(e){return o$1o.clone(this,e)},o$1o.prototype.equals=function(e){return o$1o.equals(this,e)},o$1o.prototype.equalsEpsilon=function(e,t,i){return o$1o.equalsEpsilon(this,e,t,i)},o$1o.prototype.toString=function(){return"("+this.x+", "+this.y+")"},o$1o.prototype.toArray=function(e,t){o$1o.pack(this,e,t)},Object.defineProperties(t$12.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),t$12.clone=function(e,t){if(e$2e(e)){var i=e._radii;return e$2e(t)?(o$1p.clone(i,t._radii),o$1p.clone(e._radiiSquared,t._radiiSquared),o$1p.clone(e._radiiToTheFourth,t._radiiToTheFourth),o$1p.clone(e._oneOverRadii,t._oneOverRadii),o$1p.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new t$12(i.x,i.y,i.z)}},t$12.fromCartesian3=function(e,t){return e$2e(t)||(t=new t$12),e$2e(e)&&_$16(t,e.x,e.y,e.z),t},t$12.WGS84=Object.freeze(new t$12(6378137,6378137,6356752.314245179)),t$12.XIAN80=Object.freeze(new t$12(6378140,6378140,6356755.29)),t$12.CGCS2000=Object.freeze(new t$12(6378137,6378137,6356752.31)),t$12.UNIT_SPHERE=Object.freeze(new t$12(1,1,1)),t$12.MOON=Object.freeze(new t$12(e$2d.LUNAR_RADIUS,e$2d.LUNAR_RADIUS,e$2d.LUNAR_RADIUS)),t$12.prototype.clone=function(e){return t$12.clone(this,e)},t$12.packedLength=o$1p.packedLength,t$12.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),o$1p.pack(e._radii,t,i),t},t$12.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=o$1p.unpack(e,t);return t$12.fromCartesian3(n,i)},t$12.prototype.geocentricSurfaceNormal=o$1p.normalize,t$12.prototype.geodeticSurfaceNormalCartographic=function(e,t){o$1q.typeOf.object("cartographic",e);var i=e.longitude,n=e.latitude,r=Math.cos(n),o=r*Math.cos(i),a=r*Math.sin(i),s=Math.sin(n);return e$2e(t)||(t=new o$1p),t.x=o,t.y=a,t.z=s,o$1p.normalize(t,t)},t$12.prototype.geodeticSurfaceNormal=function(e,t){return e$2e(t)||(t=new o$1p),t=o$1p.multiplyComponents(e,this._oneOverRadiiSquared,t),o$1p.normalize(t,t)};var g$1l=new o$1p,q$1i=new o$1p;t$12.prototype.cartographicToCartesian=function(e,t){var i=g$1l,n=q$1i;this.geodeticSurfaceNormalCartographic(e,i),o$1p.multiplyComponents(this._radiiSquared,i,n);var r=Math.sqrt(o$1p.dot(i,n));return o$1p.divideByScalar(n,r,n),o$1p.multiplyByScalar(i,e.height,i),e$2e(t)||(t=new o$1p),o$1p.add(n,i,t)},t$12.prototype.cartographicArrayToCartesianArray=function(e,t){o$1q.defined("cartographics",e);var i=e.length;e$2e(t)?t.length=i:t=new Array(i);for(var n=0;n<i;n++)t[n]=this.cartographicToCartesian(e[n],t[n]);return t};var T$1f=new o$1p,R$17=new o$1p,y$13=new o$1p;function n$1d(e){this._ellipsoid=u$Z(e,t$12.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}t$12.prototype.cartesianToCartographic=function(e,t){var i=this.scaleToGeodeticSurface(e,R$17);if(e$2e(i)){var n=this.geodeticSurfaceNormal(i,T$1f),r=o$1p.subtract(e,i,y$13),o=Math.atan2(n.y,n.x),a=Math.asin(n.z),s=e$2d.sign(o$1p.dot(r,e))*o$1p.magnitude(r);return e$2e(t)?(t.longitude=o,t.latitude=a,t.height=s,t):new a$18(o,a,s)}},t$12.prototype.cartesianArrayToCartographicArray=function(e,t){o$1q.defined("cartesians",e);var i=e.length;e$2e(t)?t.length=i:t=new Array(i);for(var n=0;n<i;++n)t[n]=this.cartesianToCartographic(e[n],t[n]);return t},t$12.prototype.scaleToGeodeticSurface=function(e,t){return P$1d(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},t$12.prototype.scaleToGeocentricSurface=function(e,t){o$1q.typeOf.object("cartesian",e),e$2e(t)||(t=new o$1p);var i=e.x,n=e.y,r=e.z,o=this._oneOverRadiiSquared,a=1/Math.sqrt(i*i*o.x+n*n*o.y+r*r*o.z);return o$1p.multiplyByScalar(e,a,t)},t$12.prototype.transformPositionToScaledSpace=function(e,t){return e$2e(t)||(t=new o$1p),o$1p.multiplyComponents(e,this._oneOverRadii,t)},t$12.prototype.transformPositionFromScaledSpace=function(e,t){return e$2e(t)||(t=new o$1p),o$1p.multiplyComponents(e,this._radii,t)},t$12.prototype.equals=function(e){return this===e||e$2e(e)&&o$1p.equals(this._radii,e._radii)},t$12.prototype.toString=function(){return this._radii.toString()},t$12.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,i){if(o$1q.typeOf.object("position",e),!e$2d.equalsEpsilon(this._radii.x,this._radii.y,e$2d.EPSILON15))throw new t$15("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");o$1q.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),t=u$Z(t,0);var n=this._squaredXOverSquaredZ;if(e$2e(i)||(i=new o$1p),i.x=0,i.y=0,i.z=e.z*(1-n),!(Math.abs(i.z)>=this._radii.z-t))return i},Object.defineProperties(n$1d.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),n$1d.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=e.latitude*i,o=e.height;return e$2e(t)?(t.x=n,t.y=r,t.z=o,t):new o$1p(n,r,o)},n$1d.prototype.unproject=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=e.y*i,o=e.z;return e$2e(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new a$18(n,r,o)};var e$2a={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Ae$w=Object.freeze(e$2a);function h$18(e,t,i,n){this.west=u$Z(e,0),this.south=u$Z(t,0),this.east=u$Z(i,0),this.north=u$Z(n,0)}Object.defineProperties(h$18.prototype,{width:{get:function(){return h$18.computeWidth(this)}},height:{get:function(){return h$18.computeHeight(this)}}}),h$18.packedLength=4,h$18.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.west,t[i++]=e.south,t[i++]=e.east,t[i]=e.north,t},h$18.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new h$18),i.west=e[t++],i.south=e[t++],i.east=e[t++],i.north=e[t],i},h$18.computeWidth=function(e){o$1q.typeOf.object("rectangle",e);var t=e.east,i=e.west;return t<i&&(t+=e$2d.TWO_PI),t-i},h$18.computeHeight=function(e){return o$1q.typeOf.object("rectangle",e),e.north-e.south},h$18.fromDegrees=function(e,t,i,n,r){return e=e$2d.toRadians(u$Z(e,0)),t=e$2d.toRadians(u$Z(t,0)),i=e$2d.toRadians(u$Z(i,0)),n=e$2d.toRadians(u$Z(n,0)),e$2e(r)?(r.west=e,r.south=t,r.east=i,r.north=n,r):new h$18(e,t,i,n)},h$18.fromRadians=function(e,t,i,n,r){return e$2e(r)?(r.west=u$Z(e,0),r.south=u$Z(t,0),r.east=u$Z(i,0),r.north=u$Z(n,0),r):new h$18(e,t,i,n)},h$18.fromCartographicArray=function(e,t){o$1q.defined("cartographics",e);for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0,u=e.length;l<u;l++){var c=e[l];i=Math.min(i,c.longitude),n=Math.max(n,c.longitude),a=Math.min(a,c.latitude),s=Math.max(s,c.latitude);var h=c.longitude>=0?c.longitude:c.longitude+e$2d.TWO_PI;r=Math.min(r,h),o=Math.max(o,h)}return n-i>o-r&&(i=r,(n=o)>e$2d.PI&&(n-=e$2d.TWO_PI),i>e$2d.PI&&(i-=e$2d.TWO_PI)),e$2e(t)?(t.west=i,t.south=a,t.east=n,t.north=s,t):new h$18(i,a,n,s)},h$18.fromCartesianArray=function(e,t,i){o$1q.defined("cartesians",e),t=u$Z(t,t$12.WGS84);for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0,c=e.length;u<c;u++){var h=t.cartesianToCartographic(e[u]);n=Math.min(n,h.longitude),r=Math.max(r,h.longitude),s=Math.min(s,h.latitude),l=Math.max(l,h.latitude);var d=h.longitude>=0?h.longitude:h.longitude+e$2d.TWO_PI;o=Math.min(o,d),a=Math.max(a,d)}return r-n>a-o&&(n=o,(r=a)>e$2d.PI&&(r-=e$2d.TWO_PI),n>e$2d.PI&&(n-=e$2d.TWO_PI)),e$2e(i)?(i.west=n,i.south=s,i.east=r,i.north=l,i):new h$18(n,s,r,l)},h$18.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new h$18(e.west,e.south,e.east,e.north)},h$18.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("absoluteEpsilon",i),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},h$18.prototype.clone=function(e){return h$18.clone(this,e)},h$18.prototype.equals=function(e){return h$18.equals(this,e)},h$18.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},h$18.prototype.equalsEpsilon=function(e,t){return o$1q.typeOf.number("epsilon",t),h$18.equalsEpsilon(this,e,t)},h$18.validate=function(e){o$1q.typeOf.object("rectangle",e);var t=e.north;o$1q.typeOf.number.greaterThanOrEquals("north",t,-e$2d.PI_OVER_TWO),o$1q.typeOf.number.lessThanOrEquals("north",t,e$2d.PI_OVER_TWO);var i=e.south;o$1q.typeOf.number.greaterThanOrEquals("south",i,-e$2d.PI_OVER_TWO),o$1q.typeOf.number.lessThanOrEquals("south",i,e$2d.PI_OVER_TWO);var n=e.west;o$1q.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),o$1q.typeOf.number.lessThanOrEquals("west",n,Math.PI);var r=e.east;o$1q.typeOf.number.greaterThanOrEquals("east",r,-Math.PI),o$1q.typeOf.number.lessThanOrEquals("east",r,Math.PI)},h$18.southwest=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2e(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new a$18(e.west,e.south)},h$18.northwest=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2e(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new a$18(e.west,e.north)},h$18.northeast=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2e(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new a$18(e.east,e.north)},h$18.southeast=function(e,t){return o$1q.typeOf.object("rectangle",e),e$2e(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new a$18(e.east,e.south)},h$18.center=function(e,t){o$1q.typeOf.object("rectangle",e);var i=e.east,n=e.west;i<n&&(i+=e$2d.TWO_PI);var r=e$2d.negativePiToPi(.5*(n+i)),o=.5*(e.south+e.north);return e$2e(t)?(t.longitude=r,t.latitude=o,t.height=0,t):new a$18(r,o)},h$18.intersection=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("otherRectangle",t);var n=e.east,r=e.west,o=t.east,a=t.west;n<r&&o>0?n+=e$2d.TWO_PI:o<a&&n>0&&(o+=e$2d.TWO_PI),n<r&&a<0?a+=e$2d.TWO_PI:o<a&&r<0&&(r+=e$2d.TWO_PI);var s=e$2d.negativePiToPi(Math.max(r,a)),l=e$2d.negativePiToPi(Math.min(n,o));if(!((e.west<e.east||t.west<t.east)&&l<=s)){var u=Math.max(e.south,t.south),c=Math.min(e.north,t.north);if(!(u>=c))return e$2e(i)?(i.west=s,i.south=u,i.east=l,i.north=c,i):new h$18(s,u,l,c)}},h$18.simpleIntersection=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("otherRectangle",t);var n=Math.max(e.west,t.west),r=Math.max(e.south,t.south),o=Math.min(e.east,t.east),a=Math.min(e.north,t.north);if(!(r>=a||n>=o))return e$2e(i)?(i.west=n,i.south=r,i.east=o,i.north=a,i):new h$18(n,r,o,a)},h$18.union=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("otherRectangle",t),e$2e(i)||(i=new h$18);var n=e.east,r=e.west,o=t.east,a=t.west;n<r&&o>0?n+=e$2d.TWO_PI:o<a&&n>0&&(o+=e$2d.TWO_PI),n<r&&a<0?a+=e$2d.TWO_PI:o<a&&r<0&&(r+=e$2d.TWO_PI);var s=e$2d.convertLongitudeRange(Math.min(r,a)),l=e$2d.convertLongitudeRange(Math.max(n,o));return i.west=s,i.south=Math.min(e.south,t.south),i.east=l,i.north=Math.max(e.north,t.north),i},h$18.expand=function(e,t,i){return o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("cartographic",t),e$2e(i)||(i=new h$18),i.west=Math.min(e.west,t.longitude),i.south=Math.min(e.south,t.latitude),i.east=Math.max(e.east,t.longitude),i.north=Math.max(e.north,t.latitude),i},h$18.contains=function(e,t){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("cartographic",t);var i=t.longitude,n=t.latitude,r=e.west,o=e.east;return o<r&&(o+=e$2d.TWO_PI,i<0&&(i+=e$2d.TWO_PI)),(i>r||e$2d.equalsEpsilon(i,r,e$2d.EPSILON14))&&(i<o||e$2d.equalsEpsilon(i,o,e$2d.EPSILON14))&&n>=e.south&&n<=e.north};var T$1e=new a$18;h$18.subsample=function(e,t,i,n){o$1q.typeOf.object("rectangle",e),t=u$Z(t,t$12.WGS84),i=u$Z(i,0),e$2e(n)||(n=[]);var r=0,o=e.north,a=e.south,s=e.east,l=e.west,u=T$1e;u.height=i,u.longitude=l,u.latitude=o,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=a,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.latitude=o<0?o:a>0?a:0;for(var c=1;c<8;++c)u.longitude=-Math.PI+c*e$2d.PI_OVER_TWO,h$18.contains(e,u)&&(n[r]=t.cartographicToCartesian(u,n[r]),r++);return 0===u.latitude&&(u.longitude=l,n[r]=t.cartographicToCartesian(u,n[r]),r++,u.longitude=s,n[r]=t.cartographicToCartesian(u,n[r]),r++),n.length=r,n};var p$1c=new a$18;function f$1a(e,t,i,n){this.x=u$Z(e,0),this.y=u$Z(t,0),this.width=u$Z(i,0),this.height=u$Z(n,0)}h$18.prototype.contains=function(e){return h$18.contains(this,h$18.southwest(e,p$1c))&&h$18.contains(this,h$18.northwest(e,p$1c))&&h$18.contains(this,h$18.southeast(e,p$1c))&&h$18.contains(this,h$18.northeast(e,p$1c))},h$18.MAX_VALUE=Object.freeze(new h$18(-Math.PI,-e$2d.PI_OVER_TWO,Math.PI,e$2d.PI_OVER_TWO)),f$1a.packedLength=4,f$1a.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.width,t[i]=e.height,t},f$1a.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new f$1a),i.x=e[t++],i.y=e[t++],i.width=e[t++],i.height=e[t],i},f$1a.fromPoints=function(e,t){if(e$2e(t)||(t=new f$1a),!e$2e(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,n=e[0].x,r=e[0].y,o=e[0].x,a=e[0].y,s=1;s<i;s++){var l=e[s],u=l.x,c=l.y;n=Math.min(u,n),o=Math.max(u,o),r=Math.min(c,r),a=Math.max(c,a)}return t.x=n,t.y=r,t.width=o-n,t.height=a-r,t};var O$Y=new n$1d,g$1k=new a$18,r$1e=new a$18;function o$1n(e,t){this.start=u$Z(e,0),this.stop=u$Z(t,0)}function i$1d(e,t){this.center=o$1p.clone(u$Z(e,o$1p.ZERO)),this.radius=u$Z(t,0)}f$1a.fromRectangle=function(e,t,i){if(e$2e(i)||(i=new f$1a),!e$2e(e))return i.x=0,i.y=0,i.width=0,i.height=0,i;var n=(t=u$Z(t,O$Y)).project(h$18.southwest(e,g$1k)),r=t.project(h$18.northeast(e,r$1e));return o$1o.subtract(r,n,r),i.x=n.x,i.y=n.y,i.width=r.x,i.height=r.y,i},f$1a.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new f$1a(e.x,e.y,e.width,e.height)},f$1a.union=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e$2e(i)||(i=new f$1a);var n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),o=Math.max(e.x+e.width,t.x+t.width),a=Math.max(e.y+e.height,t.y+t.height);return i.x=n,i.y=r,i.width=o-n,i.height=a-r,i},f$1a.expand=function(e,t,i){o$1q.typeOf.object("rectangle",e),o$1q.typeOf.object("point",t),i=f$1a.clone(e,i);var n=t.x-i.x,r=t.y-i.y;return n>i.width?i.width=n:n<0&&(i.width-=n,i.x=t.x),r>i.height?i.height=r:r<0&&(i.height-=r,i.y=t.y),i},f$1a.intersect=function(e,t){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t);var i=e.x,n=e.y,r=t.x,o=t.y;return i>r+t.width||i+e.width<r||n+e.height<o||n>o+t.height?Ae$w.OUTSIDE:Ae$w.INTERSECTING},f$1a.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},f$1a.prototype.clone=function(e){return f$1a.clone(this,e)},f$1a.prototype.intersect=function(e){return f$1a.intersect(this,e)},f$1a.prototype.equals=function(e){return f$1a.equals(this,e)};var T$1d=new o$1p,F$1k=new o$1p,I$1x=new o$1p,J$17=new o$1p,K$15=new o$1p,Q$1d=new o$1p,$$18=new o$1p,M$1d=new o$1p,L$1l=new o$1p,H$1g=new o$1p,s$11=new o$1p,aa$8=new o$1p,da$4=4/3*e$2d.PI;i$1d.fromPoints=function(e,t){if(e$2e(t)||(t=new i$1d),!e$2e(e)||0===e.length)return t.center=o$1p.clone(o$1p.ZERO,t.center),t.radius=0,t;var i,n=o$1p.clone(e[0],$$18),r=o$1p.clone(n,T$1d),o=o$1p.clone(n,F$1k),a=o$1p.clone(n,I$1x),s=o$1p.clone(n,J$17),l=o$1p.clone(n,K$15),u=o$1p.clone(n,Q$1d),c=e.length;for(i=1;i<c;i++){o$1p.clone(e[i],n);var h=n.x,d=n.y,f=n.z;h<r.x&&o$1p.clone(n,r),h>s.x&&o$1p.clone(n,s),d<o.y&&o$1p.clone(n,o),d>l.y&&o$1p.clone(n,l),f<a.z&&o$1p.clone(n,a),f>u.z&&o$1p.clone(n,u)}var p=o$1p.magnitudeSquared(o$1p.subtract(s,r,M$1d)),_=o$1p.magnitudeSquared(o$1p.subtract(l,o,M$1d)),m=o$1p.magnitudeSquared(o$1p.subtract(u,a,M$1d)),g=r,x=s,y=p;_>y&&(y=_,g=o,x=l),m>y&&(y=m,g=a,x=u);var v=L$1l;v.x=.5*(g.x+x.x),v.y=.5*(g.y+x.y),v.z=.5*(g.z+x.z);var $=o$1p.magnitudeSquared(o$1p.subtract(x,v,M$1d)),b=Math.sqrt($),T=H$1g;T.x=r.x,T.y=o.y,T.z=a.z;var C=s$11;C.x=s.x,C.y=l.y,C.z=u.z;var S=o$1p.midpoint(T,C,aa$8),w=0;for(i=0;i<c;i++){o$1p.clone(e[i],n);var E=o$1p.magnitude(o$1p.subtract(n,S,M$1d));E>w&&(w=E);var P=o$1p.magnitudeSquared(o$1p.subtract(n,v,M$1d));if(P>$){var A=Math.sqrt(P);$=(b=.5*(b+A))*b;var L=A-b;v.x=(b*v.x+L*n.x)/A,v.y=(b*v.y+L*n.y)/A,v.z=(b*v.z+L*n.z)/A}}return b<w?(o$1p.clone(v,t.center),t.radius=b):(o$1p.clone(S,t.center),t.radius=w),t};var ua$6=new n$1d,ma$5=new o$1p,ya$4=new o$1p,ra$9=new a$18,ea$9=new a$18;i$1d.fromRectangle2D=function(e,t,i){return i$1d.fromRectangleWithHeights2D(e,t,0,0,i)},i$1d.fromRectangleWithHeights2D=function(e,t,i,n,r){if(e$2e(r)||(r=new i$1d),!e$2e(e))return r.center=o$1p.clone(o$1p.ZERO,r.center),r.radius=0,r;t=u$Z(t,ua$6),h$18.southwest(e,ra$9),ra$9.height=i,h$18.northeast(e,ea$9),ea$9.height=n;var o=t.project(ra$9,ma$5),a=t.project(ea$9,ya$4),s=a.x-o.x,l=a.y-o.y,u=a.z-o.z;r.radius=.5*Math.sqrt(s*s+l*l+u*u);var c=r.center;return c.x=o.x+.5*s,c.y=o.y+.5*l,c.z=o.z+.5*u,r};var xa$5=[];i$1d.fromRectangle3D=function(e,t,i,n){if(t=u$Z(t,t$12.WGS84),i=u$Z(i,0),e$2e(n)||(n=new i$1d),!e$2e(e))return n.center=o$1p.clone(o$1p.ZERO,n.center),n.radius=0,n;var r=h$18.subsample(e,t,i,xa$5);return i$1d.fromPoints(r,n)},i$1d.fromVertices=function(e,t,i,n){if(e$2e(n)||(n=new i$1d),!e$2e(e)||0===e.length)return n.center=o$1p.clone(o$1p.ZERO,n.center),n.radius=0,n;t=u$Z(t,o$1p.ZERO),i=u$Z(i,3),o$1q.typeOf.number.greaterThanOrEquals("stride",i,3);var r=$$18;r.x=e[0]+t.x,r.y=e[1]+t.y,r.z=e[2]+t.z;var o,a=o$1p.clone(r,T$1d),s=o$1p.clone(r,F$1k),l=o$1p.clone(r,I$1x),u=o$1p.clone(r,J$17),c=o$1p.clone(r,K$15),h=o$1p.clone(r,Q$1d),d=e.length;for(o=0;o<d;o+=i){var f=e[o]+t.x,p=e[o+1]+t.y,_=e[o+2]+t.z;r.x=f,r.y=p,r.z=_,f<a.x&&o$1p.clone(r,a),f>u.x&&o$1p.clone(r,u),p<s.y&&o$1p.clone(r,s),p>c.y&&o$1p.clone(r,c),_<l.z&&o$1p.clone(r,l),_>h.z&&o$1p.clone(r,h)}var m=o$1p.magnitudeSquared(o$1p.subtract(u,a,M$1d)),g=o$1p.magnitudeSquared(o$1p.subtract(c,s,M$1d)),x=o$1p.magnitudeSquared(o$1p.subtract(h,l,M$1d)),y=a,v=u,$=m;g>$&&($=g,y=s,v=c),x>$&&($=x,y=l,v=h);var b=L$1l;b.x=.5*(y.x+v.x),b.y=.5*(y.y+v.y),b.z=.5*(y.z+v.z);var T=o$1p.magnitudeSquared(o$1p.subtract(v,b,M$1d)),C=Math.sqrt(T),S=H$1g;S.x=a.x,S.y=s.y,S.z=l.z;var w=s$11;w.x=u.x,w.y=c.y,w.z=h.z;var E=o$1p.midpoint(S,w,aa$8),P=0;for(o=0;o<d;o+=i){r.x=e[o]+t.x,r.y=e[o+1]+t.y,r.z=e[o+2]+t.z;var A=o$1p.magnitude(o$1p.subtract(r,E,M$1d));A>P&&(P=A);var L=o$1p.magnitudeSquared(o$1p.subtract(r,b,M$1d));if(L>T){var M=Math.sqrt(L);T=(C=.5*(C+M))*C;var R=M-C;b.x=(C*b.x+R*r.x)/M,b.y=(C*b.y+R*r.y)/M,b.z=(C*b.z+R*r.z)/M}}return C<P?(o$1p.clone(b,n.center),n.radius=C):(o$1p.clone(E,n.center),n.radius=P),n},i$1d.fromEncodedCartesianVertices=function(e,t,i){if(e$2e(i)||(i=new i$1d),!e$2e(e)||!e$2e(t)||e.length!==t.length||0===e.length)return i.center=o$1p.clone(o$1p.ZERO,i.center),i.radius=0,i;var n=$$18;n.x=e[0]+t[0],n.y=e[1]+t[1],n.z=e[2]+t[2];var r,o=o$1p.clone(n,T$1d),a=o$1p.clone(n,F$1k),s=o$1p.clone(n,I$1x),l=o$1p.clone(n,J$17),u=o$1p.clone(n,K$15),c=o$1p.clone(n,Q$1d),h=e.length;for(r=0;r<h;r+=3){var d=e[r]+t[r],f=e[r+1]+t[r+1],p=e[r+2]+t[r+2];n.x=d,n.y=f,n.z=p,d<o.x&&o$1p.clone(n,o),d>l.x&&o$1p.clone(n,l),f<a.y&&o$1p.clone(n,a),f>u.y&&o$1p.clone(n,u),p<s.z&&o$1p.clone(n,s),p>c.z&&o$1p.clone(n,c)}var _=o$1p.magnitudeSquared(o$1p.subtract(l,o,M$1d)),m=o$1p.magnitudeSquared(o$1p.subtract(u,a,M$1d)),g=o$1p.magnitudeSquared(o$1p.subtract(c,s,M$1d)),x=o,y=l,v=_;m>v&&(v=m,x=a,y=u),g>v&&(v=g,x=s,y=c);var $=L$1l;$.x=.5*(x.x+y.x),$.y=.5*(x.y+y.y),$.z=.5*(x.z+y.z);var b=o$1p.magnitudeSquared(o$1p.subtract(y,$,M$1d)),T=Math.sqrt(b),C=H$1g;C.x=o.x,C.y=a.y,C.z=s.z;var S=s$11;S.x=l.x,S.y=u.y,S.z=c.z;var w=o$1p.midpoint(C,S,aa$8),E=0;for(r=0;r<h;r+=3){n.x=e[r]+t[r],n.y=e[r+1]+t[r+1],n.z=e[r+2]+t[r+2];var P=o$1p.magnitude(o$1p.subtract(n,w,M$1d));P>E&&(E=P);var A=o$1p.magnitudeSquared(o$1p.subtract(n,$,M$1d));if(A>b){var L=Math.sqrt(A);b=(T=.5*(T+L))*T;var M=L-T;$.x=(T*$.x+M*n.x)/L,$.y=(T*$.y+M*n.y)/L,$.z=(T*$.z+M*n.z)/L}}return T<E?(o$1p.clone($,i.center),i.radius=T):(o$1p.clone(w,i.center),i.radius=E),i},i$1d.fromCornerPoints=function(e,t,i){o$1q.typeOf.object("corner",e),o$1q.typeOf.object("oppositeCorner",t),e$2e(i)||(i=new i$1d);var n=o$1p.midpoint(e,t,i.center);return i.radius=o$1p.distance(n,t),i},i$1d.fromEllipsoid=function(e,t){return o$1q.typeOf.object("ellipsoid",e),e$2e(t)||(t=new i$1d),o$1p.clone(o$1p.ZERO,t.center),t.radius=e.maximumRadius,t};var za$6=new o$1p;i$1d.fromBoundingSpheres=function(e,t){if(e$2e(t)||(t=new i$1d),!e$2e(e)||0===e.length)return t.center=o$1p.clone(o$1p.ZERO,t.center),t.radius=0,t;var i=e.length;if(1===i)return i$1d.clone(e[0],t);if(2===i)return i$1d.union(e[0],e[1],t);var n,r=[];for(n=0;n<i;n++)r.push(e[n].center);var o=(t=i$1d.fromPoints(r,t)).center,a=t.radius;for(n=0;n<i;n++){var s=e[n];a=Math.max(a,o$1p.distance(o,s.center,za$6)+s.radius)}return t.radius=a,t};var Sa$5=new o$1p,ha$4=new o$1p,pa$5=new o$1p;i$1d.fromOrientedBoundingBox=function(e,t){o$1q.defined("orientedBoundingBox",e),e$2e(t)||(t=new i$1d);var i=e.halfAxes,n=p$1e.getColumn(i,0,Sa$5),r=p$1e.getColumn(i,1,ha$4),o=p$1e.getColumn(i,2,pa$5);return o$1p.add(n,r,n),o$1p.add(n,o,n),t.center=o$1p.clone(e.center,t.center),t.radius=o$1p.magnitude(n),t},i$1d.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.center=o$1p.clone(e.center,t.center),t.radius=e.radius,t):new i$1d(e.center,e.radius)},i$1d.packedLength=4,i$1d.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0);var n=e.center;return t[i++]=n.x,t[i++]=n.y,t[i++]=n.z,t[i]=e.radius,t},i$1d.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new i$1d);var n=i.center;return n.x=e[t++],n.y=e[t++],n.z=e[t++],i.radius=e[t],i};var wa$4=new o$1p,Oa$6=new o$1p;i$1d.union=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e$2e(i)||(i=new i$1d);var n=e.center,r=e.radius,o=t.center,a=t.radius,s=o$1p.subtract(o,n,wa$4),l=o$1p.magnitude(s);if(r>=l+a)return e.clone(i),i;if(a>=l+r)return t.clone(i),i;var u=.5*(r+l+a),c=o$1p.multiplyByScalar(s,(-r+u)/l,Oa$6);return o$1p.add(c,n,c),o$1p.clone(c,i.center),i.radius=u,i};var ba$4=new o$1p;i$1d.expand=function(e,t,i){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("point",t),i=i$1d.clone(e,i);var n=o$1p.magnitude(o$1p.subtract(t,i.center,ba$4));return n>i.radius&&(i.radius=n),i},i$1d.intersectPlane=function(e,t){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("plane",t);var i=e.center,n=e.radius,r=t.normal,o=o$1p.dot(r,i)+t.distance;return o<-n?Ae$w.OUTSIDE:o<n?Ae$w.INTERSECTING:Ae$w.INSIDE},i$1d.transform=function(e,t,i){return o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("transform",t),e$2e(i)||(i=new i$1d),i.center=p$1d.multiplyByPoint(t,e.center,i.center),i.radius=p$1d.getMaximumScale(t)*e.radius,i};var ga$6=new o$1p;i$1d.distanceSquaredTo=function(e,t){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("cartesian",t);var i=o$1p.subtract(e.center,t,ga$6);return o$1p.magnitudeSquared(i)-e.radius*e.radius},i$1d.transformWithoutScale=function(e,t,i){return o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("transform",t),e$2e(i)||(i=new i$1d),i.center=p$1d.multiplyByPoint(t,e.center,i.center),i.radius=e.radius,i};var Ma$6=new o$1p;i$1d.computePlaneDistances=function(e,t,i,n){o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("position",t),o$1q.typeOf.object("direction",i),e$2e(n)||(n=new o$1n);var r=o$1p.subtract(e.center,t,Ma$6),o=o$1p.dot(i,r);return n.start=o-e.radius,n.stop=o+e.radius,n};for(var ca$2=new o$1p,Ra$8=new o$1p,qa$7=new o$1p,ja$4=new o$1p,Pa$5=new o$1p,Ba$5=new a$18,ia$5=new Array(8),na$5=0;na$5<8;++na$5)ia$5[na$5]=new o$1p;var Da$8=new n$1d;i$1d.projectTo2D=function(e,t,i){o$1q.typeOf.object("sphere",e);var n,r=(t=u$Z(t,Da$8)).ellipsoid,o=e.center,a=e.radius;n=o$1p.equals(o,o$1p.ZERO)?o$1p.clone(o$1p.UNIT_X,ca$2):r.geodeticSurfaceNormal(o,ca$2);var s=o$1p.cross(o$1p.UNIT_Z,n,Ra$8);o$1p.normalize(s,s);var l=o$1p.cross(n,s,qa$7);o$1p.normalize(l,l),o$1p.multiplyByScalar(n,a,n),o$1p.multiplyByScalar(l,a,l),o$1p.multiplyByScalar(s,a,s);var u=o$1p.negate(l,Pa$5),c=o$1p.negate(s,ja$4),h=ia$5,d=h[0];o$1p.add(n,l,d),o$1p.add(d,s,d),d=h[1],o$1p.add(n,l,d),o$1p.add(d,c,d),d=h[2],o$1p.add(n,u,d),o$1p.add(d,c,d),d=h[3],o$1p.add(n,u,d),o$1p.add(d,s,d),o$1p.negate(n,n),d=h[4],o$1p.add(n,l,d),o$1p.add(d,s,d),d=h[5],o$1p.add(n,l,d),o$1p.add(d,c,d),d=h[6],o$1p.add(n,u,d),o$1p.add(d,c,d),d=h[7],o$1p.add(n,u,d),o$1p.add(d,s,d);for(var f=h.length,p=0;p<f;++p){var _=h[p];o$1p.add(o,_,_);var m=r.cartesianToCartographic(_,Ba$5);t.project(m,_)}var g=(o=(i=i$1d.fromPoints(h,i)).center).x,x=o.y,y=o.z;return o.x=y,o.y=g,o.z=x,i},i$1d.isOccluded=function(e,t){return o$1q.typeOf.object("sphere",e),o$1q.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)},i$1d.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&o$1p.equals(e.center,t.center)&&e.radius===t.radius},i$1d.prototype.intersectPlane=function(e){return i$1d.intersectPlane(this,e)},i$1d.prototype.distanceSquaredTo=function(e){return i$1d.distanceSquaredTo(this,e)},i$1d.prototype.computePlaneDistances=function(e,t,i){return i$1d.computePlaneDistances(this,e,t,i)},i$1d.prototype.isOccluded=function(e){return i$1d.isOccluded(this,e)},i$1d.prototype.equals=function(e){return i$1d.equals(this,e)},i$1d.prototype.clone=function(e){return i$1d.clone(this,e)},i$1d.prototype.volume=function(){var e=this.radius;return da$4*e*e*e};const E$1u={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047};var de$y=Object.freeze(E$1u),r$1d={BYTE:de$y.BYTE,UNSIGNED_BYTE:de$y.UNSIGNED_BYTE,SHORT:de$y.SHORT,UNSIGNED_SHORT:de$y.UNSIGNED_SHORT,INT:de$y.INT,UNSIGNED_INT:de$y.UNSIGNED_INT,FLOAT:de$y.FLOAT,DOUBLE:de$y.DOUBLE,getSizeInBytes:function(e){if(!e$2e(e))throw new t$15("value is required.");switch(e){case r$1d.BYTE:return Int8Array.BYTES_PER_ELEMENT;case r$1d.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r$1d.SHORT:return Int16Array.BYTES_PER_ELEMENT;case r$1d.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r$1d.INT:return Int32Array.BYTES_PER_ELEMENT;case r$1d.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case r$1d.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case r$1d.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new t$15("componentDatatype is not a valid value.")}},fromTypedArray:function(e){return e instanceof Int8Array?r$1d.BYTE:e instanceof Uint8Array?r$1d.UNSIGNED_BYTE:e instanceof Int16Array?r$1d.SHORT:e instanceof Uint16Array?r$1d.UNSIGNED_SHORT:e instanceof Int32Array?r$1d.INT:e instanceof Uint32Array?r$1d.UNSIGNED_INT:e instanceof Float32Array?r$1d.FLOAT:e instanceof Float64Array?r$1d.DOUBLE:void 0},validate:function(e){return e$2e(e)&&(e===r$1d.BYTE||e===r$1d.UNSIGNED_BYTE||e===r$1d.SHORT||e===r$1d.UNSIGNED_SHORT||e===r$1d.INT||e===r$1d.UNSIGNED_INT||e===r$1d.FLOAT||e===r$1d.DOUBLE)},createTypedArray:function(e,t){if(!e$2e(e))throw new t$15("componentDatatype is required.");if(!e$2e(t))throw new t$15("valuesOrLength is required.");switch(e){case r$1d.BYTE:return new Int8Array(t);case r$1d.UNSIGNED_BYTE:return new Uint8Array(t);case r$1d.SHORT:return new Int16Array(t);case r$1d.UNSIGNED_SHORT:return new Uint16Array(t);case r$1d.INT:return new Int32Array(t);case r$1d.UNSIGNED_INT:return new Uint32Array(t);case r$1d.FLOAT:return new Float32Array(t);case r$1d.DOUBLE:return new Float64Array(t);default:throw new t$15("componentDatatype is not a valid value.")}},createArrayBufferView:function(e,t,i,n){if(!e$2e(e))throw new t$15("componentDatatype is required.");if(!e$2e(t))throw new t$15("buffer is required.");switch(i=u$Z(i,0),n=u$Z(n,(t.byteLength-i)/r$1d.getSizeInBytes(e)),e){case r$1d.BYTE:return new Int8Array(t,i,n);case r$1d.UNSIGNED_BYTE:return new Uint8Array(t,i,n);case r$1d.SHORT:return new Int16Array(t,i,n);case r$1d.UNSIGNED_SHORT:return new Uint16Array(t,i,n);case r$1d.INT:return new Int32Array(t,i,n);case r$1d.UNSIGNED_INT:return new Uint32Array(t,i,n);case r$1d.FLOAT:return new Float32Array(t,i,n);case r$1d.DOUBLE:return new Float64Array(t,i,n);default:throw new t$15("componentDatatype is not a valid value.")}},fromName:function(e){switch(e){case"BYTE":return r$1d.BYTE;case"UNSIGNED_BYTE":return r$1d.UNSIGNED_BYTE;case"SHORT":return r$1d.SHORT;case"UNSIGNED_SHORT":return r$1d.UNSIGNED_SHORT;case"INT":return r$1d.INT;case"UNSIGNED_INT":return r$1d.UNSIGNED_INT;case"FLOAT":return r$1d.FLOAT;case"DOUBLE":return r$1d.DOUBLE;default:throw new t$15("name is not a valid value.")}}},S$14=Object.freeze(r$1d);function Y$Z(e){var t=e._uSquared,i=e._ellipsoid.maximumRadius,n=e._ellipsoid.minimumRadius,r=(i-n)/i,o=Math.cos(e._startHeading),a=Math.sin(e._startHeading),s=(1-r)*Math.tan(e._start.latitude),l=1/Math.sqrt(1+s*s),u=l*s,c=Math.atan2(s,o),h=l*a,d=h*h,f=1-d,p=Math.sqrt(f),_=t/4,m=_*_,g=m*_,x=m*m,y=1+_-3*m/4+5*g/4-175*x/64,v=1-_+15*m/8-35*g/8,$=1-3*_+35*m/4,b=1-5*_,T=y*c-v*Math.sin(2*c)*_/2-$*Math.sin(4*c)*m/16-b*Math.sin(6*c)*g/48-5*Math.sin(8*c)*x/512,C=e._constants;C.a=i,C.b=n,C.f=r,C.cosineHeading=o,C.sineHeading=a,C.tanU=s,C.cosineU=l,C.sineU=u,C.sigma=c,C.sineAlpha=h,C.sineSquaredAlpha=d,C.cosineSquaredAlpha=f,C.cosineAlpha=p,C.u2Over4=_,C.u4Over16=m,C.u6Over64=g,C.u8Over256=x,C.a0=y,C.a1=v,C.a2=$,C.a3=b,C.distanceRatio=T}function Z$1d(e,t){return e*t*(4+e*(4-3*t))/16}function B$17(e,t,i,n,r,o,a){var s=Z$1d(e,i);return(1-s)*e*t*(n+s*r*(a+s*o*(2*a*a-1)))}function $$17(e,t,i,n,r,o,a){var s,l,u,c,h,d=(t-i)/t,f=o-n,p=Math.atan((1-d)*Math.tan(r)),_=Math.atan((1-d)*Math.tan(a)),m=Math.cos(p),g=Math.sin(p),x=Math.cos(_),y=Math.sin(_),v=m*x,$=m*y,b=g*y,T=g*x,C=f,S=e$2d.TWO_PI,w=Math.cos(C),E=Math.sin(C);do{w=Math.cos(C),E=Math.sin(C);var P,A=$-T*w;u=Math.sqrt(x*x*E*E+A*A),l=b+v*w,s=Math.atan2(u,l),0===u?(P=0,c=1):c=1-(P=v*E/u)*P,S=C,h=l-2*b/c,isNaN(h)&&(h=0),C=f+B$17(d,P,c,s,u,l,h)}while(Math.abs(C-S)>e$2d.EPSILON12);var L=c*(t*t-i*i)/(i*i),M=L*(256+L*(L*(74-47*L)-128))/1024,R=h*h,O=i*(1+L*(4096+L*(L*(320-175*L)-768))/16384)*(s-M*u*(h+M*(l*(2*R-1)-M*h*(4*u*u-3)*(4*R-3)/6)/4)),D=Math.atan2(x*E,$-T*w),I=Math.atan2(m*E,$*w-T);e._distance=O,e._startHeading=D,e._endHeading=I,e._uSquared=L}var j$1k=new o$1p,L$1k=new o$1p;function F$1j(e,t,i,n){var r=o$1p.normalize(n.cartographicToCartesian(t,L$1k),j$1k),o=o$1p.normalize(n.cartographicToCartesian(i,L$1k),L$1k);o$1q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(o$1p.angleBetween(r,o))-Math.PI),.0125),$$17(e,n.maximumRadius,n.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude),e._start=a$18.clone(t,e._start),e._end=a$18.clone(i,e._end),e._start.height=0,e._end.height=0,Y$Z(e)}function E$1t(e,t,i){var n=u$Z(i,t$12.WGS84);this._ellipsoid=n,this._start=new a$18,this._end=new a$18,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,e$2e(e)&&e$2e(t)&&F$1j(this,e,t,n)}function e$29(e,t,i){this.minimum=o$1p.clone(u$Z(e,o$1p.ZERO)),this.maximum=o$1p.clone(u$Z(t,o$1p.ZERO)),i=e$2e(i)?o$1p.clone(i):o$1p.midpoint(this.minimum,this.maximum,new o$1p),this.center=i}Object.defineProperties(E$1t.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return o$1q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return o$1q.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return o$1q.defined("distance",this._distance),this._endHeading}}}),E$1t.prototype.setEndPoints=function(e,t){o$1q.defined("start",e),o$1q.defined("end",t),F$1j(this,e,t,this._ellipsoid)},E$1t.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},E$1t.prototype.interpolateUsingSurfaceDistance=function(e,t){o$1q.defined("distance",this._distance);var i=this._constants,n=i.distanceRatio+e/i.b,r=Math.cos(2*n),o=Math.cos(4*n),a=Math.cos(6*n),s=Math.sin(2*n),l=Math.sin(4*n),u=Math.sin(6*n),c=Math.sin(8*n),h=n*n,d=n*h,f=i.u8Over256,p=i.u2Over4,_=i.u6Over64,m=i.u4Over16,g=2*d*f*r/3+n*(1-p+7*m/4-15*_/4+579*f/64-(m-15*_/4+187*f/16)*r-(5*_/4-115*f/16)*o-29*f*a/16)+(p/2-m+71*_/32-85*f/16)*s+(5*m/16-5*_/4+383*f/96)*l-h*((_-11*f/2)*s+5*f*l/2)+(29*_/96-29*f/16)*u+539*f*c/1536,x=Math.asin(Math.sin(g)*i.cosineAlpha),y=Math.atan(i.a/i.b*Math.tan(x));g-=i.sigma;var v=Math.cos(2*i.sigma+g),$=Math.sin(g),b=Math.cos(g),T=i.cosineU*b,C=i.sineU*$,S=Math.atan2($*i.sineHeading,T-C*i.cosineHeading)-B$17(i.f,i.sineAlpha,i.cosineSquaredAlpha,g,$,b,v);return e$2e(t)?(t.longitude=this._start.longitude+S,t.latitude=y,t.height=0,t):new a$18(this._start.longitude+S,y,0)},e$29.fromPoints=function(e,t){if(e$2e(t)||(t=new e$29),!e$2e(e)||0===e.length)return t.minimum=o$1p.clone(o$1p.ZERO,t.minimum),t.maximum=o$1p.clone(o$1p.ZERO,t.maximum),t.center=o$1p.clone(o$1p.ZERO,t.center),t;for(var i=e[0].x,n=e[0].y,r=e[0].z,o=e[0].x,a=e[0].y,s=e[0].z,l=e.length,u=1;u<l;u++){var c=e[u],h=c.x,d=c.y,f=c.z;i=Math.min(h,i),o=Math.max(h,o),n=Math.min(d,n),a=Math.max(d,a),r=Math.min(f,r),s=Math.max(f,s)}var p=t.minimum;p.x=i,p.y=n,p.z=r;var _=t.maximum;return _.x=o,_.y=a,_.z=s,t.center=o$1p.midpoint(p,_,t.center),t},e$29.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.minimum=o$1p.clone(e.minimum,t.minimum),t.maximum=o$1p.clone(e.maximum,t.maximum),t.center=o$1p.clone(e.center,t.center),t):new e$29(e.minimum,e.maximum,e.center)},e$29.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&o$1p.equals(e.center,t.center)&&o$1p.equals(e.minimum,t.minimum)&&o$1p.equals(e.maximum,t.maximum)};var x$1m=new o$1p;e$29.intersectPlane=function(e,t){o$1q.defined("box",e),o$1q.defined("plane",t),x$1m=o$1p.subtract(e.maximum,e.minimum,x$1m);var i=o$1p.multiplyByScalar(x$1m,.5,x$1m),n=t.normal,r=i.x*Math.abs(n.x)+i.y*Math.abs(n.y)+i.z*Math.abs(n.z),o=o$1p.dot(e.center,n)+t.distance;return o-r>0?Ae$w.INSIDE:o+r<0?Ae$w.OUTSIDE:Ae$w.INTERSECTING},e$29.prototype.clone=function(e){return e$29.clone(this,e)},e$29.prototype.intersectPlane=function(e){return e$29.intersectPlane(this,e)},e$29.prototype.equals=function(e){return e$29.equals(this,e)};var m$1f={};function p$1b(e,t,i){var n=e+t;return e$2d.sign(e)!==e$2d.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))<i?0:n}m$1f.computeDiscriminant=function(e,t,i){if("number"!=typeof e)throw new t$15("a is a required number.");if("number"!=typeof t)throw new t$15("b is a required number.");if("number"!=typeof i)throw new t$15("c is a required number.");return t*t-4*e*i},m$1f.computeRealRoots=function(e,t,i){if("number"!=typeof e)throw new t$15("a is a required number.");if("number"!=typeof t)throw new t$15("b is a required number.");if("number"!=typeof i)throw new t$15("c is a required number.");var n;if(0===e)return 0===t?[]:[-i/t];if(0===t){if(0===i)return[0,0];var r=Math.abs(i),o=Math.abs(e);if(r<o&&r/o<e$2d.EPSILON14)return[0,0];if(r>o&&o/r<e$2d.EPSILON14)return[];if((n=-i/e)<0)return[];var a=Math.sqrt(n);return[-a,a]}if(0===i)return(n=-t/e)<0?[n,0]:[0,n];var s=p$1b(t*t,-(4*e*i),e$2d.EPSILON14);if(s<0)return[];var l=-.5*p$1b(t,e$2d.sign(t)*Math.sqrt(s),e$2d.EPSILON14);return t>0?[l/e,i/l]:[i/l,l/e]};var j$1j={};function k$1c(e,t,i,n){var r,o,a=e,s=t/3,l=i/3,u=n,c=a*l,h=s*u,d=s*s,f=l*l,p=a*l-d,_=a*u-s*l,m=s*u-f,g=4*p*m-_*_;if(g<0){var x,y,v;d*h>=c*f?(x=a,y=p,v=-2*s*p+a*_):(x=u,y=m,v=-u*_+2*l*m);var $=-(v<0?-1:1)*Math.abs(x)*Math.sqrt(-g),b=(o=-v+$)/2,T=b<0?-Math.pow(-b,1/3):Math.pow(b,1/3),C=o===$?-T:-y/T;return r=y<=0?T+C:-v/(T*T+C*C+y),d*h>=c*f?[(r-s)/a]:[-u/(r+l)]}var S=p,w=-2*s*p+a*_,E=m,P=-u*_+2*l*m,A=Math.sqrt(g),L=Math.sqrt(3)/2,M=Math.abs(Math.atan2(a*A,-w)/3);r=2*Math.sqrt(-S);var R=Math.cos(M);o=r*R;var O=r*(-R/2-L*Math.sin(M)),D=o+O>2*s?o-s:O-s,I=a,B=D/I;M=Math.abs(Math.atan2(u*A,-P)/3);var F=-u,N=(o=(r=2*Math.sqrt(-E))*(R=Math.cos(M)))+(O=r*(-R/2-L*Math.sin(M)))<2*l?o+l:O+l,G=F/N,z=-D*N-I*F,U=(l*z-s*(D*F))/(-s*z+l*(I*N));return B<=U?B<=G?U<=G?[B,U,G]:[B,G,U]:[G,B,U]:B<=G?[U,B,G]:U<=G?[U,G,B]:[G,U,B]}j$1j.computeDiscriminant=function(e,t,i,n){if("number"!=typeof e)throw new t$15("a is a required number.");if("number"!=typeof t)throw new t$15("b is a required number.");if("number"!=typeof i)throw new t$15("c is a required number.");if("number"!=typeof n)throw new t$15("d is a required number.");var r=t*t,o=i*i;return 18*e*t*i*n+r*o-27*(e*e)*(n*n)-4*(e*o*i+r*t*n)},j$1j.computeRealRoots=function(e,t,i,n){if("number"!=typeof e)throw new t$15("a is a required number.");if("number"!=typeof t)throw new t$15("b is a required number.");if("number"!=typeof i)throw new t$15("c is a required number.");if("number"!=typeof n)throw new t$15("d is a required number.");var r,o;if(0===e)return m$1f.computeRealRoots(t,i,n);if(0===t){if(0===i){if(0===n)return[0,0,0];var a=(o=-n/e)<0?-Math.pow(-o,1/3):Math.pow(o,1/3);return[a,a,a]}return 0===n?0===(r=m$1f.computeRealRoots(e,0,i)).Length?[0]:[r[0],0,r[1]]:k$1c(e,0,i,n)}return 0===i?0===n?(o=-t/e)<0?[o,0,0]:[0,0,o]:k$1c(e,t,0,n):0===n?0===(r=m$1f.computeRealRoots(e,t,i)).length?[0]:r[1]<=0?[r[0],r[1],0]:r[0]>=0?[0,r[0],r[1]]:[r[0],0,r[1]]:k$1c(e,t,i,n)};var F$1i={};function P$1c(e,t,i,n){var r=e*e,o=t-3*r/8,a=i-t*e/2+r*e/8,s=n-i*e/4+t*r/16-3*r*r/256,l=j$1j.computeRealRoots(1,2*o,o*o-4*s,-a*a);if(l.length>0){var u=-e/4,c=l[l.length-1];if(Math.abs(c)<e$2d.EPSILON14){var h=m$1f.computeRealRoots(1,o,s);if(2===h.length){var d,f=h[0],p=h[1];if(f>=0&&p>=0){var _=Math.sqrt(f),m=Math.sqrt(p);return[u-m,u-_,u+_,u+m]}if(f>=0&&p<0)return[u-(d=Math.sqrt(f)),u+d];if(f<0&&p>=0)return[u-(d=Math.sqrt(p)),u+d]}return[]}if(c>0){var g=Math.sqrt(c),x=(o+c-a/g)/2,y=(o+c+a/g)/2,v=m$1f.computeRealRoots(1,g,x),$=m$1f.computeRealRoots(1,-g,y);return 0!==v.length?(v[0]+=u,v[1]+=u,0!==$.length?($[0]+=u,$[1]+=u,v[1]<=$[0]?[v[0],v[1],$[0],$[1]]:$[1]<=v[0]?[$[0],$[1],v[0],v[1]]:v[0]>=$[0]&&v[1]<=$[1]?[$[0],v[0],v[1],$[1]]:$[0]>=v[0]&&$[1]<=v[1]?[v[0],$[0],$[1],v[1]]:v[0]>$[0]&&v[0]<$[1]?[$[0],v[0],$[1],v[1]]:[v[0],$[0],v[1],$[1]]):v):0!==$.length?($[0]+=u,$[1]+=u,$):[]}}return[]}function y$12(e,t,i,n){var r=e*e,o=-2*t,a=i*e+t*t-4*n,s=r*n-i*t*e+i*i,l=j$1j.computeRealRoots(1,o,a,s);if(l.length>0){var u,c,h,d,f,p,_=l[0],m=t-_,g=m*m,x=e/2,y=m/2,v=g-4*n,$=g+4*Math.abs(n),b=r-4*_,T=r+4*Math.abs(_);if(_<0||v*T<b*$){var C=Math.sqrt(b);u=C/2,c=0===C?0:(e*y-i)/C}else{var S=Math.sqrt(v);u=0===S?0:(e*y-i)/S,c=S/2}0===x&&0===u?(h=0,d=0):e$2d.sign(x)===e$2d.sign(u)?d=_/(h=x+u):h=_/(d=x-u),0===y&&0===c?(f=0,p=0):e$2d.sign(y)===e$2d.sign(c)?p=n/(f=y+c):f=n/(p=y-c);var w=m$1f.computeRealRoots(1,h,f),E=m$1f.computeRealRoots(1,d,p);if(0!==w.length)return 0!==E.length?w[1]<=E[0]?[w[0],w[1],E[0],E[1]]:E[1]<=w[0]?[E[0],E[1],w[0],w[1]]:w[0]>=E[0]&&w[1]<=E[1]?[E[0],w[0],w[1],E[1]]:E[0]>=w[0]&&E[1]<=w[1]?[w[0],E[0],E[1],w[1]]:w[0]>E[0]&&w[0]<E[1]?[E[0],w[0],E[1],w[1]]:[w[0],E[0],w[1],E[1]]:w;if(0!==E.length)return E}return[]}function f$19(e,t){t=o$1p.clone(u$Z(t,o$1p.ZERO)),o$1p.equals(t,o$1p.ZERO)||o$1p.normalize(t,t),this.origin=o$1p.clone(u$Z(e,o$1p.ZERO)),this.direction=t}F$1i.computeDiscriminant=function(e,t,i,n,r){if("number"!=typeof e)throw new t$15("a is a required number.");if("number"!=typeof t)throw new t$15("b is a required number.");if("number"!=typeof i)throw new t$15("c is a required number.");if("number"!=typeof n)throw new t$15("d is a required number.");if("number"!=typeof r)throw new t$15("e is a required number.");var o=e*e,a=t*t,s=a*t,l=i*i,u=l*i,c=n*n,h=c*n,d=r*r;return a*l*c-4*s*h-4*e*u*c+18*e*t*i*h-27*o*c*c+256*(o*e)*(d*r)+r*(18*s*i*n-4*a*u+16*e*l*l-80*e*t*l*n-6*e*a*c+144*o*i*c)+d*(144*e*a*i-27*a*a-128*o*l-192*o*t*n)},F$1i.computeRealRoots=function(e,t,i,n,r){if("number"!=typeof e)throw new t$15("a is a required number.");if("number"!=typeof t)throw new t$15("b is a required number.");if("number"!=typeof i)throw new t$15("c is a required number.");if("number"!=typeof n)throw new t$15("d is a required number.");if("number"!=typeof r)throw new t$15("e is a required number.");if(Math.abs(e)<e$2d.EPSILON15)return j$1j.computeRealRoots(t,i,n,r);var o=t/e,a=i/e,s=n/e,l=r/e,u=o<0?1:0;switch(u+=a<0?u+1:u,u+=s<0?u+1:u,u+=l<0?u+1:u){case 0:case 3:case 4:case 6:case 7:case 9:case 10:case 12:case 13:case 14:case 15:return P$1c(o,a,s,l);case 1:case 2:case 5:case 8:case 11:return y$12(o,a,s,l);default:return}},f$19.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.origin=o$1p.clone(e.origin),t.direction=o$1p.clone(e.direction),t):new f$19(e.origin,e.direction)},f$19.getPoint=function(e,t,i){return o$1q.typeOf.object("ray",e),o$1q.typeOf.number("t",t),e$2e(i)||(i=new o$1p),i=o$1p.multiplyByScalar(e.direction,t,i),o$1p.add(e.origin,i,i)};var g$1j={rayPlane:function(e,t,i){if(!e$2e(e))throw new t$15("ray is required.");if(!e$2e(t))throw new t$15("plane is required.");e$2e(i)||(i=new o$1p);var n=e.origin,r=e.direction,o=t.normal,a=o$1p.dot(o,r);if(!(Math.abs(a)<e$2d.EPSILON15)){var s=(-t.distance-o$1p.dot(o,n))/a;if(!(s<0))return i=o$1p.multiplyByScalar(r,s,i),o$1p.add(n,i,i)}}},or$b=new o$1p,dr$7=new o$1p,Y$Y=new o$1p,j$1i=new o$1p,H$1f=new o$1p;g$1j.rayTriangleParametric=function(e,t,i,n,r){if(!e$2e(e))throw new t$15("ray is required.");if(!e$2e(t))throw new t$15("p0 is required.");if(!e$2e(i))throw new t$15("p1 is required.");if(!e$2e(n))throw new t$15("p2 is required.");r=u$Z(r,!1);var o,a,s,l,u,c=e.origin,h=e.direction,d=o$1p.subtract(i,t,or$b),f=o$1p.subtract(n,t,dr$7),p=o$1p.cross(h,f,Y$Y),_=o$1p.dot(d,p);if(r){if(_<e$2d.EPSILON6||(o=o$1p.subtract(c,t,j$1i),(s=o$1p.dot(o,p))<0||s>_)||(a=o$1p.cross(o,d,H$1f),(l=o$1p.dot(h,a))<0||s+l>_))return;u=o$1p.dot(f,a)/_}else{if(Math.abs(_)<e$2d.EPSILON6)return;var m=1/_;if(o=o$1p.subtract(c,t,j$1i),(s=o$1p.dot(o,p)*m)<0||s>1||(a=o$1p.cross(o,d,H$1f),(l=o$1p.dot(h,a)*m)<0||s+l>1))return;u=o$1p.dot(f,a)*m}return u},g$1j.rayTriangle=function(e,t,i,n,r,o){var a=g$1j.rayTriangleParametric(e,t,i,n,r);if(e$2e(a)&&!(a<0))return e$2e(o)||(o=new o$1p),o$1p.multiplyByScalar(e.direction,a,o),o$1p.add(e.origin,o,o)};var fr$5=new f$19;function vr$9(e,t,i,n){var r=t*t-4*e*i;if(!(r<0)){if(r>0){var o=1/(2*e),a=Math.sqrt(r),s=(-t+a)*o,l=(-t-a)*o;return s<l?(n.root0=s,n.root1=l):(n.root0=l,n.root1=s),n}var u=-t/(2*e);if(0!==u)return n.root0=n.root1=u,n}}g$1j.lineSegmentTriangle=function(e,t,i,n,r,o,a){if(!e$2e(e))throw new t$15("v0 is required.");if(!e$2e(t))throw new t$15("v1 is required.");if(!e$2e(i))throw new t$15("p0 is required.");if(!e$2e(n))throw new t$15("p1 is required.");if(!e$2e(r))throw new t$15("p2 is required.");var s=fr$5;o$1p.clone(e,s.origin),o$1p.subtract(t,e,s.direction),o$1p.normalize(s.direction,s.direction);var l=g$1j.rayTriangleParametric(s,i,n,r,o);if(!(!e$2e(l)||l<0||l>o$1p.distance(e,t)))return e$2e(a)||(a=new o$1p),o$1p.multiplyByScalar(s.direction,l,a),o$1p.add(s.origin,a,a)};var cr$8={root0:0,root1:0};function J$16(e,t,i){e$2e(i)||(i=new o$1n);var n=e.origin,r=e.direction,o=t.center,a=t.radius*t.radius,s=o$1p.subtract(n,o,Y$Y),l=vr$9(o$1p.dot(r,r),2*o$1p.dot(r,s),o$1p.magnitudeSquared(s)-a,cr$8);if(e$2e(l))return i.start=l.root0,i.stop=l.root1,i}g$1j.raySphere=function(e,t,i){if(!e$2e(e))throw new t$15("ray is required.");if(!e$2e(t))throw new t$15("sphere is required.");if(e$2e(i=J$16(e,t,i))&&!(i.stop<0))return i.start=Math.max(i.start,0),i};var ur$a=new f$19;g$1j.lineSegmentSphere=function(e,t,i,n){if(!e$2e(e))throw new t$15("p0 is required.");if(!e$2e(t))throw new t$15("p1 is required.");if(!e$2e(i))throw new t$15("sphere is required.");var r=ur$a;o$1p.clone(e,r.origin);var o=o$1p.subtract(t,e,r.direction),a=o$1p.magnitude(o);if(o$1p.normalize(o,o),!(!e$2e(n=J$16(r,i,n))||n.stop<0||n.start>a))return n.start=Math.max(n.start,0),n.stop=Math.min(n.stop,a),n};var sr$a=new o$1p,hr$7=new o$1p;function E$1s(e,t,i){var n=e+t;return e$2d.sign(e)!==e$2d.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))<i?0:n}function mr$8(e,t,i,n,r){var o,a=n*n,s=r*r,l=(e[p$1e.COLUMN1ROW1]-e[p$1e.COLUMN2ROW2])*s,u=r*(n*E$1s(e[p$1e.COLUMN1ROW0],e[p$1e.COLUMN0ROW1],e$2d.EPSILON15)+t.y),c=e[p$1e.COLUMN0ROW0]*a+e[p$1e.COLUMN2ROW2]*s+n*t.x+i,h=s*E$1s(e[p$1e.COLUMN2ROW1],e[p$1e.COLUMN1ROW2],e$2d.EPSILON15),d=r*(n*E$1s(e[p$1e.COLUMN2ROW0],e[p$1e.COLUMN0ROW2])+t.z),f=[];if(0===d&&0===h){if(0===(o=m$1f.computeRealRoots(l,u,c)).length)return f;var p=o[0],_=Math.sqrt(Math.max(1-p*p,0));if(f.push(new o$1p(n,r*p,r*-_)),f.push(new o$1p(n,r*p,r*_)),2===o.length){var m=o[1],g=Math.sqrt(Math.max(1-m*m,0));f.push(new o$1p(n,r*m,r*-g)),f.push(new o$1p(n,r*m,r*g))}return f}var x=d*d,y=h*h,v=d*h,$=l*l+y,b=2*(u*l+v),T=2*c*l+u*u-y+x,C=2*(c*u-v),S=c*c-x;if(0===$&&0===b&&0===T&&0===C)return f;var w=(o=F$1i.computeRealRoots($,b,T,C,S)).length;if(0===w)return f;for(var E=0;E<w;++E){var P=o[E],A=P*P,L=Math.max(1-A,0),M=Math.sqrt(L),R=(e$2d.sign(l)===e$2d.sign(c)?E$1s(l*A+c,u*P,e$2d.EPSILON12):e$2d.sign(c)===e$2d.sign(u*P)?E$1s(l*A,u*P+c,e$2d.EPSILON12):E$1s(l*A+u*P,c,e$2d.EPSILON12))*E$1s(h*P,d,e$2d.EPSILON15);R<0?f.push(new o$1p(n,r*P,r*M)):R>0?f.push(new o$1p(n,r*P,r*-M)):0!==M?(f.push(new o$1p(n,r*P,r*-M)),f.push(new o$1p(n,r*P,r*M)),++E):f.push(new o$1p(n,r*P,r*M))}return f}g$1j.rayEllipsoid=function(e,t){if(!e$2e(e))throw new t$15("ray is required.");if(!e$2e(t))throw new t$15("ellipsoid is required.");var i,n,r,o,a,s=t.oneOverRadii,l=o$1p.multiplyComponents(s,e.origin,sr$a),u=o$1p.multiplyComponents(s,e.direction,hr$7),c=o$1p.magnitudeSquared(l),h=o$1p.dot(l,u);if(c>1){if(h>=0)return;var d=h*h;if(i=c-1,d<(r=(n=o$1p.magnitudeSquared(u))*i))return;if(d>r){o=h*h-r;var f=(a=-h+Math.sqrt(o))/n,p=i/a;return f<p?new o$1n(f,p):{start:p,stop:f}}var _=Math.sqrt(i/n);return new o$1n(_,_)}return c<1?(i=c-1,o=h*h-(r=(n=o$1p.magnitudeSquared(u))*i),new o$1n(0,(a=-h+Math.sqrt(o))/n)):h<0?new o$1n(0,-h/(n=o$1p.magnitudeSquared(u))):void 0};var Z$1c=new o$1p,K$14=new o$1p,X$16=new o$1p,V$18=new o$1p,wr$6=new o$1p,gr$8=new p$1e,Sr$6=new p$1e,lr$a=new p$1e,qr$4=new p$1e,yr$7=new p$1e,$$16=new p$1e,k$1b=new p$1e,F$1h=new o$1p,Or$5=new o$1p,Mr$6=new a$18;g$1j.grazingAltitudeLocation=function(e,t){if(!e$2e(e))throw new t$15("ray is required.");if(!e$2e(t))throw new t$15("ellipsoid is required.");var i=e.origin,n=e.direction;if(!o$1p.equals(i,o$1p.ZERO)){var r=t.geodeticSurfaceNormal(i,Z$1c);if(o$1p.dot(n,r)>=0)return i}var o=e$2e(this.rayEllipsoid(e,t)),a=t.transformPositionToScaledSpace(n,Z$1c),s=o$1p.normalize(a,a),l=o$1p.mostOrthogonalAxis(a,V$18),u=o$1p.normalize(o$1p.cross(l,s,K$14),K$14),c=o$1p.normalize(o$1p.cross(s,u,X$16),X$16),h=gr$8;h[0]=s.x,h[1]=s.y,h[2]=s.z,h[3]=u.x,h[4]=u.y,h[5]=u.z,h[6]=c.x,h[7]=c.y,h[8]=c.z;var d=p$1e.transpose(h,Sr$6),f=p$1e.fromScale(t.radii,lr$a),p=p$1e.fromScale(t.oneOverRadii,qr$4),_=yr$7;_[0]=0,_[1]=-n.z,_[2]=n.y,_[3]=n.z,_[4]=0,_[5]=-n.x,_[6]=-n.y,_[7]=n.x,_[8]=0;var m,g,x=p$1e.multiply(p$1e.multiply(d,p,$$16),_,$$16),y=p$1e.multiply(p$1e.multiply(x,f,k$1b),h,k$1b),v=p$1e.multiplyByVector(x,i,wr$6),$=mr$8(y,o$1p.negate(v,Z$1c),0,0,1),b=$.length;if(b>0){for(var T=o$1p.clone(o$1p.ZERO,Or$5),C=Number.NEGATIVE_INFINITY,S=0;S<b;++S){m=p$1e.multiplyByVector(f,p$1e.multiplyByVector(h,$[S],F$1h),F$1h);var w=o$1p.normalize(o$1p.subtract(m,i,V$18),V$18),E=o$1p.dot(w,n);E>C&&(C=E,T=o$1p.clone(m,T))}var P=t.cartesianToCartographic(T,Mr$6);return C=e$2d.clamp(C,0,1),g=o$1p.magnitude(o$1p.subtract(T,i,V$18))*Math.sqrt(1-C*C),g=o?-g:g,P.height=g,t.cartographicToCartesian(P,new o$1p)}};var Pr$6=new o$1p;function o$1m(e,t){if(o$1q.typeOf.object("normal",e),!e$2d.equalsEpsilon(o$1p.magnitude(e),1,e$2d.EPSILON6))throw new t$15("normal must be normalized.");o$1q.typeOf.number("distance",t),this.normal=o$1p.clone(e),this.distance=t}g$1j.lineSegmentPlane=function(e,t,i,n){if(!e$2e(e))throw new t$15("endPoint0 is required.");if(!e$2e(t))throw new t$15("endPoint1 is required.");if(!e$2e(i))throw new t$15("plane is required.");e$2e(n)||(n=new o$1p);var r=o$1p.subtract(t,e,Pr$6),o=i.normal,a=o$1p.dot(o,r);if(!(Math.abs(a)<e$2d.EPSILON6)){var s=o$1p.dot(o,e),l=-(i.distance+s)/a;if(!(l<0||l>1))return o$1p.multiplyByScalar(r,l,n),o$1p.add(e,n,n),n}},g$1j.trianglePlaneIntersection=function(e,t,i,n){if(!(e$2e(e)&&e$2e(t)&&e$2e(i)&&e$2e(n)))throw new t$15("p0, p1, p2, and plane are required.");var r,o,a=n.normal,s=n.distance,l=o$1p.dot(a,e)+s<0,u=o$1p.dot(a,t)+s<0,c=o$1p.dot(a,i)+s<0,h=0;if(h+=l?1:0,h+=u?1:0,(1===(h+=c?1:0)||2===h)&&(r=new o$1p,o=new o$1p),1===h){if(l)return g$1j.lineSegmentPlane(e,t,n,r),g$1j.lineSegmentPlane(e,i,n,o),{positions:[e,t,i,r,o],indices:[0,3,4,1,2,4,1,4,3]};if(u)return g$1j.lineSegmentPlane(t,i,n,r),g$1j.lineSegmentPlane(t,e,n,o),{positions:[e,t,i,r,o],indices:[1,3,4,2,0,4,2,4,3]};if(c)return g$1j.lineSegmentPlane(i,e,n,r),g$1j.lineSegmentPlane(i,t,n,o),{positions:[e,t,i,r,o],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===h){if(!l)return g$1j.lineSegmentPlane(t,e,n,r),g$1j.lineSegmentPlane(i,e,n,o),{positions:[e,t,i,r,o],indices:[1,2,4,1,4,3,0,3,4]};if(!u)return g$1j.lineSegmentPlane(i,t,n,r),g$1j.lineSegmentPlane(e,t,n,o),{positions:[e,t,i,r,o],indices:[2,0,4,2,4,3,1,3,4]};if(!c)return g$1j.lineSegmentPlane(e,i,n,r),g$1j.lineSegmentPlane(t,i,n,o),{positions:[e,t,i,r,o],indices:[0,1,4,0,4,3,2,3,4]}}},o$1m.fromPointNormal=function(e,t,i){if(o$1q.typeOf.object("point",e),o$1q.typeOf.object("normal",t),!e$2d.equalsEpsilon(o$1p.magnitude(t),1,e$2d.EPSILON6))throw new t$15("normal must be normalized.");var n=-o$1p.dot(t,e);return e$2e(i)?(o$1p.clone(t,i.normal),i.distance=n,i):new o$1m(t,n)};var m$1e=new o$1p;o$1m.fromCartesian4=function(e,t){o$1q.typeOf.object("coefficients",e);var i=o$1p.fromCartesian4(e,m$1e),n=e.w;if(!e$2d.equalsEpsilon(o$1p.magnitude(i),1,e$2d.EPSILON6))throw new t$15("normal must be normalized.");return e$2e(t)?(o$1p.clone(i,t.normal),t.distance=n,t):new o$1m(i,n)},o$1m.getPointDistance=function(e,t){return o$1q.typeOf.object("plane",e),o$1q.typeOf.object("point",t),o$1p.dot(e.normal,t)+e.distance};var O$X=new o$1p;o$1m.projectPointOntoPlane=function(e,t,i){o$1q.typeOf.object("plane",e),o$1q.typeOf.object("point",t),e$2e(i)||(i=new o$1p);var n=o$1m.getPointDistance(e,t),r=o$1p.multiplyByScalar(e.normal,n,O$X);return o$1p.subtract(t,r,i)};var l$1g=new o$1p,H$1e,M$1c,S$13;function o$1l(e,t,i,n){return y$11(e).then(t,i,n)}function y$11(e){var t,i;return e instanceof _$15?t=e:T$1c(e)?(i=k$1a(),e.then((function(e){i.resolve(e)}),(function(e){i.reject(e)}),(function(e){i.progress(e)})),t=i.promise):t=G$1p(e),t}function D$18(e){return o$1l(e,b$1h)}function _$15(e){this.then=e}function G$1p(e){var t=new _$15((function(t){try{return y$11(t?t(e):e)}catch(e){return b$1h(e)}}));return t}function b$1h(e){var t=new _$15((function(t,i){try{return i?y$11(i(e)):b$1h(e)}catch(e){return b$1h(e)}}));return t}function k$1a(){var e,t,i,n,r,o;return e=new _$15(a),t=[],i=[],n=function(e,n,r){var o,a;return o=k$1a(),a="function"==typeof r?function(e){try{o.progress(r(e))}catch(e){o.progress(e)}}:function(e){o.progress(e)},t.push((function(t){t.then(e,n).then(o.resolve,o.reject,a)})),i.push(a),o.promise},r=function(e){return Q$1c(i,e),e},o=function(e){return e=y$11(e),n=e.then,o=y$11,r=P$1b,Q$1c(t,e),i=t=S$13,e},{then:a,resolve:s,reject:l,progress:u,promise:e,resolver:{resolve:s,reject:l,progress:u}};function a(e,t,i){return n(e,t,i)}function s(e){return o(e)}function l(e){return o(b$1h(e))}function u(e){return r(e)}}function T$1c(e){return e&&"function"==typeof e.then}function A$1k(e,t,i,n,r){return E$1r(2,arguments),o$1l(e,(function(e){var o,a,s,l,u,c,h,d,f,p;if(f=e.length>>>0,o=Math.max(0,Math.min(t,f)),s=[],a=f-o+1,l=[],u=k$1a(),o)for(d=u.progress,h=function(e){l.push(e),--a||(c=h=P$1b,u.reject(l))},c=function(e){s.push(e),--o||(c=h=P$1b,u.resolve(s))},p=0;p<f;++p)p in e&&o$1l(e[p],m,_,d);else u.resolve(s);return u.then(i,n,r);function _(e){h(e)}function m(e){c(e)}}))}function I$1w(e,t,i,n){return E$1r(1,arguments),o$1l(e,(function(e){var r,o,a,s,l,u,c,h,d;for(c=e.length>>>0,h=e.length>>>0,r=[],o=[],u=(a=k$1a()).progress,l=function(e){o.push(e),--h||(s=l=P$1b,a.resolve(r))},s=function(e,t){r[t]=e,--h||(s=l=P$1b,a.resolve(r))},d=0;d<c;++d)switch(d){case 0:o$1l(e[d],_,f,u);break;case 1:o$1l(e[d],m,f,u);break;case 2:o$1l(e[d],g,f,u);break;case 3:o$1l(e[d],x,f,u);break;case 4:o$1l(e[d],y,f,u);break;default:o$1l(e[d],p,f,u)}return a.then(t,i,n);function f(e){l(e)}function p(e){s(e,0)}function _(e){s(e,0)}function m(e){s(e,1)}function g(e){s(e,2)}function x(e){s(e,3)}function y(e){s(e,4)}}))}function J$15(e,t,i,n){return A$1k(e,1,(function(e){return t?t(e[0]):e[0]}),i,n)}function L$1j(e,t,i,n){return E$1r(1,arguments),x$1l(e,q$1h).then(t,i,n)}function K$13(){return x$1l(arguments,q$1h)}function x$1l(e,t){return o$1l(e,(function(e){var i,n,r,o,a,s;if(r=n=e.length>>>0,i=[],s=k$1a(),r)for(o=function(e,n){o$1l(e,t).then((function(e){i[n]=e,--r||s.resolve(i)}),s.reject)},a=0;a<n;a++)a in e?o(e[a],a):--r;else s.resolve(i);return s.promise}))}function N$10(e,t){var i=M$1c.call(arguments,1);return o$1l(e,(function(e){var n;return n=e.length,i[0]=function(e,i,r){return o$1l(e,(function(e){return o$1l(i,(function(i){return t(e,i,r,n)}))}))},H$1e.apply(e,i)}))}function U$1h(e,t,i){var n=arguments.length>2;return o$1l(e,(function(e){return e=n?i:e,t.resolve(e),e}),(function(e){return t.reject(e),b$1h(e)}),t.progress)}function Q$1c(e,t){for(var i,n=0;i=e[n++];)i(t)}function E$1r(e,t){for(var i,n=t.length;n>e;)if(null!=(i=t[--n])&&"function"!=typeof i)throw new Error("arg "+n+" must be a function")}function P$1b(){}function q$1h(e){return e}function a$17(e,t,i){o$1q.defined("array",e),o$1q.defined("itemToFind",t),o$1q.defined("comparator",i);for(var n,r,o=0,a=e.length-1;o<=a;)if((r=i(e[n=~~((o+a)/2)],t))<0)o=n+1;else{if(!(r>0))return n;a=n-1}return~(a+1)}function n$1c(e,t,i,n,r){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=i,this.yPoleOffset=n,this.ut1MinusUtc=r}function $$15(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,t=arguments,i=0,n=t[i++],r=function(e,t,i,n){i||(i=" ");var r=e.length>=t?"":Array(1+t-e.length>>>0).join(i);return n?e+r:r+e},o=function(e,t,i,n,o,a){var s=n-e.length;return s>0&&(e=i||!o?r(e,n,a,i):e.slice(0,t.length)+r("",s,"0",!0)+e.slice(t.length)),e},a=function(e,t,i,n,a,s,l){var u=e>>>0;return e=(i=i&&u&&{2:"0b",8:"0",16:"0x"}[t]||"")+r(u.toString(t),s||0,"0",!1),o(e,i,n,a,l)},s=function(e,t,i,n,r,a){return null!=n&&(e=e.slice(0,n)),o(e,"",t,i,r,a)},l=function(e,n,l,u,c,h,d){var f,p,_,m,g;if("%%"==e)return"%";for(var x=!1,y="",v=!1,$=!1,b=" ",T=l.length,C=0;l&&C<T;C++)switch(l.charAt(C)){case" ":y=" ";break;case"+":y="+";break;case"-":x=!0;break;case"'":b=l.charAt(C+1);break;case"0":v=!0;break;case"#":$=!0}if((u=u?"*"==u?+t[i++]:"*"==u.charAt(0)?+t[u.slice(1,-1)]:+u:0)<0&&(u=-u,x=!0),!isFinite(u))throw new Error("sprintf: (minimum-)width must be finite");switch(h=h?"*"==h?+t[i++]:"*"==h.charAt(0)?+t[h.slice(1,-1)]:+h:"fFeE".indexOf(d)>-1?6:"d"==d?0:void 0,g=n?t[n.slice(0,-1)]:t[i++],d){case"s":return s(String(g),x,u,h,v,b);case"c":return s(String.fromCharCode(+g),x,u,h,v);case"b":return a(g,2,$,x,u,h,v);case"o":return a(g,8,$,x,u,h,v);case"x":return a(g,16,$,x,u,h,v);case"X":return a(g,16,$,x,u,h,v).toUpperCase();case"u":return a(g,10,$,x,u,h,v);case"i":case"d":return f=+g||0,g=(p=(f=Math.round(f-f%1))<0?"-":y)+r(String(Math.abs(f)),h,"0",!1),o(g,p,x,u,v);case"e":case"E":case"f":case"F":case"g":case"G":return p=(f=+g)<0?"-":y,_=["toExponential","toFixed","toPrecision"]["efg".indexOf(d.toLowerCase())],m=["toString","toUpperCase"]["eEfFgG".indexOf(d)%2],g=p+Math.abs(f)[_](h),o(g,p,x,u,v)[m]();default:return e}};return n.replace(e,l)}function d$1r(e,t,i,n,r,o,a,s){this.year=e,this.month=t,this.day=i,this.hour=n,this.minute=r,this.second=o,this.millisecond=a,this.isLeapSecond=s}function i$1c(e){if(null===e||isNaN(e))throw new t$15("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0}function a$16(e,t){this.julianDate=e,this.offset=t}o$1m.transform=function(e,t,i){return o$1q.typeOf.object("plane",e),o$1q.typeOf.object("transform",t),p$1d.multiplyByPointAsVector(t,e.normal,m$1e),o$1p.normalize(m$1e,m$1e),o$1p.multiplyByScalar(e.normal,-e.distance,l$1g),p$1d.multiplyByPoint(t,l$1g,l$1g),o$1m.fromPointNormal(l$1g,m$1e,i)},o$1m.clone=function(e,t){return o$1q.typeOf.object("plane",e),e$2e(t)?(o$1p.clone(e.normal,t.normal),t.distance=e.distance,t):new o$1m(e.normal,e.distance)},o$1m.equals=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.distance===t.distance&&o$1p.equals(e.normal,t.normal)},o$1m.ORIGIN_XY_PLANE=Object.freeze(new o$1m(o$1p.UNIT_Z,0)),o$1m.ORIGIN_YZ_PLANE=Object.freeze(new o$1m(o$1p.UNIT_X,0)),o$1m.ORIGIN_ZX_PLANE=Object.freeze(new o$1m(o$1p.UNIT_Y,0)),o$1l.defer=k$1a,o$1l.resolve=y$11,o$1l.reject=D$18,o$1l.join=K$13,o$1l.all=L$1j,o$1l.map=x$1l,o$1l.reduce=N$10,o$1l.any=J$15,o$1l.some=A$1k,o$1l.allSettled=I$1w,o$1l.chain=U$1h,o$1l.isPromise=T$1c,_$15.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(S$13,e)},yield:function(e){return this.then((function(){return e}))},spread:function(e){return this.then((function(t){return L$1j(t,(function(t){return e.apply(S$13,t)}))}))}},M$1c=[].slice,H$1e=[].reduce||function(e){var t,i,n,r,o;if(o=0,r=(t=Object(this)).length>>>0,(i=arguments).length<=1)for(;;){if(o in t){n=t[o++];break}if(++o>=r)throw new TypeError}else n=i[1];for(;o<r;++o)o in t&&(n=e(n,t[o],o,t));return n};var E$1q={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5},h$17=Object.freeze(E$1q),e$28={UTC:0,TAI:1},H$1d=Object.freeze(e$28),Z$1b=new d$1r,U$1g=[31,28,31,30,31,30,31,31,30,31,30,31],b$1g=29;function H$1c(e,t){return a$15.compare(e.julianDate,t.julianDate)}var O$W=new a$16;function q$1g(e){O$W.julianDate=e;var t=a$15.leapSeconds,i=a$17(t,O$W,H$1c);i<0&&(i=~i),i>=t.length&&(i=t.length-1);var n=t[i].offset;i>0&&(a$15.secondsDifference(t[i].julianDate,e)>n&&(n=t[--i].offset));a$15.addSeconds(e,n,e)}function F$1g(e,t){O$W.julianDate=e;var i=a$15.leapSeconds,n=a$17(i,O$W,H$1c);if(n<0&&(n=~n),0===n)return a$15.addSeconds(e,-i[0].offset,t);if(n>=i.length)return a$15.addSeconds(e,-i[n-1].offset,t);var r=a$15.secondsDifference(i[n].julianDate,e);return 0===r?a$15.addSeconds(e,-i[n].offset,t):r<=1?void 0:a$15.addSeconds(e,-i[--n].offset,t)}function I$1v(e,t,i){var n=t/h$17.SECONDS_PER_DAY|0;return e+=n,(t-=h$17.SECONDS_PER_DAY*n)<0&&(e--,t+=h$17.SECONDS_PER_DAY),i.dayNumber=e,i.secondsOfDay=t,i}function x$1k(e,t,i,n,r,o,a){var s=(t-14)/12|0,l=e+4800+s,u=(1461*l/4|0)+(367*(t-2-12*s)/12|0)-(3*((l+100)/100|0)/4|0)+i-32075;(n-=12)<0&&(n+=24);var c=o+(n*h$17.SECONDS_PER_HOUR+r*h$17.SECONDS_PER_MINUTE+a*h$17.SECONDS_PER_MILLISECOND);return c>=43200&&(u-=1),[u,c]}var V$17=/^(\d{4})$/,B$16=/^(\d{4})-(\d{2})$/,K$12=/^(\d{4})-?(\d{3})$/,Q$1b=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,X$15=/^(\d{4})-?(\d{2})-?(\d{2})$/,G$1o=/([Z+\-])?(\d{2})?:?(\d{2})?$/,j$1h=/^(\d{2})(\.\d+)?/.source+G$1o.source,ee$C=/^(\d{2}):?(\d{2})(\.\d+)?/.source+G$1o.source,ne$J=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+G$1o.source,y$10="Invalid ISO 8601 date.";function a$15(e,t,i){this.dayNumber=void 0,this.secondsOfDay=void 0,e=u$Z(e,0),t=u$Z(t,0),i=u$Z(i,H$1d.UTC);var n=0|e;I$1v(n,t+=(e-n)*h$17.SECONDS_PER_DAY,this),i===H$1d.UTC&&q$1g(this)}a$15.fromGregorianDate=function(e,t){if(!(e instanceof d$1r))throw new t$15("date must be a valid GregorianDate.");var i=x$1k(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return e$2e(t)?(I$1v(i[0],i[1],t),q$1g(t),t):new a$15(i[0],i[1],H$1d.UTC)},a$15.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new t$15("date must be a valid JavaScript Date.");var i=x$1k(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return e$2e(t)?(I$1v(i[0],i[1],t),q$1g(t),t):new a$15(i[0],i[1],H$1d.UTC)},a$15.fromIso8601=function(e,t){if("string"!=typeof e)throw new t$15(y$10);var i,n,r,o,a,s=(e=e.replace(",",".")).split("T"),l=1,u=1,c=0,h=0,d=0,f=0,p=s[0],_=s[1];if(!e$2e(p))throw new t$15(y$10);if(null!==(s=p.match(X$15))){if((o=p.split("-").length-1)>0&&2!==o)throw new t$15(y$10);i=+s[1],l=+s[2],u=+s[3]}else if(null!==(s=p.match(B$16)))i=+s[1],l=+s[2];else if(null!==(s=p.match(V$17)))i=+s[1];else{var m;if(null!==(s=p.match(K$12))){if(i=+s[1],m=+s[2],r=i$1c(i),m<1||r&&m>366||!r&&m>365)throw new t$15(y$10)}else{if(null===(s=p.match(Q$1b)))throw new t$15(y$10);i=+s[1];var g=+s[2],x=+s[3]||0;if((o=p.split("-").length-1)>0&&(!e$2e(s[3])&&1!==o||e$2e(s[3])&&2!==o))throw new t$15(y$10);m=7*g+x-new Date(Date.UTC(i,0,4)).getUTCDay()-3}(n=new Date(Date.UTC(i,0,1))).setUTCDate(m),l=n.getUTCMonth()+1,u=n.getUTCDate()}if(r=i$1c(i),l<1||l>12||u<1||(2!==l||!r)&&u>U$1g[l-1]||r&&2===l&&u>b$1g)throw new t$15(y$10);if(e$2e(_)){if(null!==(s=_.match(ne$J))){if((o=_.split(":").length-1)>0&&2!==o&&3!==o)throw new t$15(y$10);c=+s[1],h=+s[2],d=+s[3],f=1e3*+(s[4]||0),a=5}else if(null!==(s=_.match(ee$C))){if((o=_.split(":").length-1)>2)throw new t$15(y$10);c=+s[1],h=+s[2],d=60*+(s[3]||0),a=4}else{if(null===(s=_.match(j$1h)))throw new t$15(y$10);c=+s[1],h=60*+(s[2]||0),a=3}if(h>=60||d>=61||c>24||24===c&&(h>0||d>0||f>0))throw new t$15(y$10);var y=s[a],v=+s[a+1],$=+(s[a+2]||0);switch(y){case"+":c-=v,h-=$;break;case"-":c+=v,h+=$;break;case"Z":break;default:h+=new Date(Date.UTC(i,l-1,u,c,h)).getTimezoneOffset()}}var b=60===d;for(b&&d--;h>=60;)h-=60,c++;for(;c>=24;)c-=24,u++;for(n=r&&2===l?b$1g:U$1g[l-1];u>n;)u-=n,++l>12&&(l-=12,i++),n=r&&2===l?b$1g:U$1g[l-1];for(;h<0;)h+=60,c--;for(;c<0;)c+=24,u--;for(;u<1;)--l<1&&(l+=12,i--),u+=n=r&&2===l?b$1g:U$1g[l-1];var T=x$1k(i,l,u,c,h,d,f);return e$2e(t)?(I$1v(T[0],T[1],t),q$1g(t)):t=new a$15(T[0],T[1],H$1d.UTC),b&&a$15.addSeconds(t,1,t),t},a$15.now=function(e){return a$15.fromDate(new Date,e)};var g$1i=new a$15(0,0,H$1d.TAI);function h$16(e){if(e instanceof h$16)this.scheme=e.scheme,this.authority=e.authority,this.path=e.path,this.query=e.query,this.fragment=e.fragment;else if(e){var t=o$1k.exec(e);this.scheme=t[1],this.authority=t[2],this.path=t[3],this.query=t[4],this.fragment=t[5]}}a$15.toGregorianDate=function(e,t){if(!e$2e(e))throw new t$15("julianDate is required.");var i=!1,n=F$1g(e,g$1i);e$2e(n)||(a$15.addSeconds(e,-1,g$1i),n=F$1g(g$1i,g$1i),i=!0);var r=n.dayNumber,o=n.secondsOfDay;o>=43200&&(r+=1);var a=r+68569|0,s=4*a/146097|0,l=4e3*((a=a-((146097*s+3)/4|0)|0)+1)/1461001|0,u=80*(a=a-(1461*l/4|0)+31|0)/2447|0,c=a-(2447*u/80|0)|0,h=u+2-12*(a=u/11|0)|0,d=100*(s-49)+l+a|0,f=o/h$17.SECONDS_PER_HOUR|0,p=o-f*h$17.SECONDS_PER_HOUR,_=p/h$17.SECONDS_PER_MINUTE|0,m=0|(p-=_*h$17.SECONDS_PER_MINUTE),g=(p-m)/h$17.SECONDS_PER_MILLISECOND;return(f+=12)>23&&(f-=24),i&&(m+=1),e$2e(t)?(t.year=d,t.month=h,t.day=c,t.hour=f,t.minute=_,t.second=m,t.millisecond=g,t.isLeapSecond=i,t):new d$1r(d,h,c,f,_,m,g,i)},a$15.toDate=function(e){if(!e$2e(e))throw new t$15("julianDate is required.");var t=a$15.toGregorianDate(e,Z$1b),i=t.second;return t.isLeapSecond&&(i-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,i,t.millisecond))},a$15.toIso8601=function(e,t){if(!e$2e(e))throw new t$15("julianDate is required.");var i=a$15.toGregorianDate(e,Z$1b),n=i.year,r=i.month,o=i.day,a=i.hour,s=i.minute,l=i.second,u=i.millisecond;return 1e4===n&&1===r&&1===o&&0===a&&0===s&&0===l&&0===u&&(n=9999,r=12,o=31,a=24),e$2e(t)||0===u?e$2e(t)&&0!==t?$$15("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",n,r,o,a,s,l,(.01*u).toFixed(t).replace(".","").slice(0,t)):$$15("%04d-%02d-%02dT%02d:%02d:%02dZ",n,r,o,a,s,l):$$15("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",n,r,o,a,s,l,(.01*u).toString().replace(".",""))},a$15.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new a$15(e.dayNumber,e.secondsOfDay,H$1d.TAI)},a$15.compare=function(e,t){if(!e$2e(e))throw new t$15("left is required.");if(!e$2e(t))throw new t$15("right is required.");var i=e.dayNumber-t.dayNumber;return 0!==i?i:e.secondsOfDay-t.secondsOfDay},a$15.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},a$15.equalsEpsilon=function(e,t,i){if(!e$2e(i))throw new t$15("epsilon is required.");return e===t||e$2e(e)&&e$2e(t)&&Math.abs(a$15.secondsDifference(e,t))<=i},a$15.totalDays=function(e){if(!e$2e(e))throw new t$15("julianDate is required.");return e.dayNumber+e.secondsOfDay/h$17.SECONDS_PER_DAY},a$15.secondsDifference=function(e,t){if(!e$2e(e))throw new t$15("left is required.");if(!e$2e(t))throw new t$15("right is required.");return(e.dayNumber-t.dayNumber)*h$17.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},a$15.daysDifference=function(e,t){if(!e$2e(e))throw new t$15("left is required.");if(!e$2e(t))throw new t$15("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/h$17.SECONDS_PER_DAY},a$15.computeTaiMinusUtc=function(e){O$W.julianDate=e;var t=a$15.leapSeconds,i=a$17(t,O$W,H$1c);return i<0&&(i=~i,--i<0&&(i=0)),t[i].offset},a$15.addSeconds=function(e,t,i){if(!e$2e(e))throw new t$15("julianDate is required.");if(!e$2e(t))throw new t$15("seconds is required.");if(!e$2e(i))throw new t$15("result is required.");return I$1v(e.dayNumber,e.secondsOfDay+t,i)},a$15.addMinutes=function(e,t,i){if(!e$2e(e))throw new t$15("julianDate is required.");if(!e$2e(t))throw new t$15("minutes is required.");if(!e$2e(i))throw new t$15("result is required.");var n=e.secondsOfDay+t*h$17.SECONDS_PER_MINUTE;return I$1v(e.dayNumber,n,i)},a$15.addHours=function(e,t,i){if(!e$2e(e))throw new t$15("julianDate is required.");if(!e$2e(t))throw new t$15("hours is required.");if(!e$2e(i))throw new t$15("result is required.");var n=e.secondsOfDay+t*h$17.SECONDS_PER_HOUR;return I$1v(e.dayNumber,n,i)},a$15.addDays=function(e,t,i){if(!e$2e(e))throw new t$15("julianDate is required.");if(!e$2e(t))throw new t$15("days is required.");if(!e$2e(i))throw new t$15("result is required.");return I$1v(e.dayNumber+t,e.secondsOfDay,i)},a$15.lessThan=function(e,t){return a$15.compare(e,t)<0},a$15.lessThanOrEquals=function(e,t){return a$15.compare(e,t)<=0},a$15.greaterThan=function(e,t){return a$15.compare(e,t)>0},a$15.greaterThanOrEquals=function(e,t){return a$15.compare(e,t)>=0},a$15.prototype.clone=function(e){return a$15.clone(this,e)},a$15.prototype.equals=function(e){return a$15.equals(this,e)},a$15.prototype.equalsEpsilon=function(e,t){return a$15.equalsEpsilon(this,e,t)},a$15.prototype.toString=function(){return a$15.toIso8601(this)},a$15.leapSeconds=[new a$16(new a$15(2441317,43210,H$1d.TAI),10),new a$16(new a$15(2441499,43211,H$1d.TAI),11),new a$16(new a$15(2441683,43212,H$1d.TAI),12),new a$16(new a$15(2442048,43213,H$1d.TAI),13),new a$16(new a$15(2442413,43214,H$1d.TAI),14),new a$16(new a$15(2442778,43215,H$1d.TAI),15),new a$16(new a$15(2443144,43216,H$1d.TAI),16),new a$16(new a$15(2443509,43217,H$1d.TAI),17),new a$16(new a$15(2443874,43218,H$1d.TAI),18),new a$16(new a$15(2444239,43219,H$1d.TAI),19),new a$16(new a$15(2444786,43220,H$1d.TAI),20),new a$16(new a$15(2445151,43221,H$1d.TAI),21),new a$16(new a$15(2445516,43222,H$1d.TAI),22),new a$16(new a$15(2446247,43223,H$1d.TAI),23),new a$16(new a$15(2447161,43224,H$1d.TAI),24),new a$16(new a$15(2447892,43225,H$1d.TAI),25),new a$16(new a$15(2448257,43226,H$1d.TAI),26),new a$16(new a$15(2448804,43227,H$1d.TAI),27),new a$16(new a$15(2449169,43228,H$1d.TAI),28),new a$16(new a$15(2449534,43229,H$1d.TAI),29),new a$16(new a$15(2450083,43230,H$1d.TAI),30),new a$16(new a$15(2450630,43231,H$1d.TAI),31),new a$16(new a$15(2451179,43232,H$1d.TAI),32),new a$16(new a$15(2453736,43233,H$1d.TAI),33),new a$16(new a$15(2454832,43234,H$1d.TAI),34),new a$16(new a$15(2456109,43235,H$1d.TAI),35),new a$16(new a$15(2457204,43236,H$1d.TAI),36),new a$16(new a$15(2457754,43237,H$1d.TAI),37)],h$16.prototype.scheme=null,h$16.prototype.authority=null,h$16.prototype.path="",h$16.prototype.query=null,h$16.prototype.fragment=null;var o$1k=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");h$16.prototype.getScheme=function(){return this.scheme},h$16.prototype.getAuthority=function(){return this.authority},h$16.prototype.getPath=function(){return this.path},h$16.prototype.getQuery=function(){return this.query},h$16.prototype.getFragment=function(){return this.fragment},h$16.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},h$16.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query},h$16.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment},h$16.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(n$1b,u$X).replace(s$10,a$14)),this.path&&(this.path=this.path.replace(s$10,a$14)),this.query&&(this.query=this.query.replace(s$10,a$14)),this.fragment&&(this.fragment=this.fragment.replace(s$10,a$14))};var s$10=/%[0-9a-z]{2}/gi,p$1a=/[a-zA-Z0-9\-\._~]/,n$1b=/(.*@)?([^@:]*)(:.*)?/;function a$14(e){var t=unescape(e);return p$1a.test(t)?t:e.toUpperCase()}function u$X(e,t,i,n){return(t||"")+i.toLowerCase()+(n||"")}function n$1a(e){return(0===e.length||"/"!==e[e.length-1])&&(e+="/"),e}function l$1f(e,t){if(null===e||"object"!=typeof e)return e;t=u$Z(t,!1);var i=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t&&(r=l$1f(r,t)),i[n]=r}return i}function p$19(e,t,i){i=u$Z(i,!1);var n,r,o,a={},s=e$2e(e),l=e$2e(t);if(s)for(n in e)e.hasOwnProperty(n)&&(r=e[n],l&&i&&"object"==typeof r&&t.hasOwnProperty(n)?(o=t[n],a[n]="object"==typeof o?p$19(r,o,i):r):a[n]=r);if(l)for(n in t)t.hasOwnProperty(n)&&!a.hasOwnProperty(n)&&(o=t[n],a[n]=o);return a}function o$1j(e,t){var i;return typeof document<"u"&&(i=document),o$1j._implementation(e,t,i)}function i$1b(e,t){if(!e$2e(e))throw new t$15("uri is required.");var i="",n=e.lastIndexOf("/");return-1!==n&&(i=e.substring(0,n+1)),t&&(e$2e((e=new h$16(e)).query)&&(i+="?"+e.query),e$2e(e.fragment)&&(i+="#"+e.fragment)),i}function a$13(e){if(!e$2e(e))throw new t$15("uri is required.");var t=new h$16(e);t.normalize();var i=t.path,n=i.lastIndexOf("/");return-1!==n&&(i=i.substr(n+1)),n=i.lastIndexOf("."),i=-1===n?"":i.substr(n+1)}h$16.prototype.resolve=function(e){var t=new h$16;return this.scheme?(t.scheme=this.scheme,t.authority=this.authority,t.path=this.path,t.query=this.query):(t.scheme=e.scheme,this.authority?(t.authority=this.authority,t.path=this.path,t.query=this.query):(t.authority=e.authority,""==this.path?(t.path=e.path,t.query=this.query||e.query):("/"==this.path.charAt(0)?(t.path=this.path,t.removeDotSegments()):(e.authority&&""==e.path?t.path="/"+this.path:t.path=e.path.substring(0,e.path.lastIndexOf("/")+1)+this.path,t.removeDotSegments()),t.query=this.query))),t.fragment=this.fragment,t},h$16.prototype.removeDotSegments=function(){var e,t=this.path.split("/"),i=[],n=""==t[0];n&&t.shift();for(""==t[0]&&t.shift();t.length;)".."==(e=t.shift())?i.pop():"."!=e&&i.push(e);("."==e||".."==e)&&i.push(""),n&&i.unshift(""),this.path=i.join("/")},h$16.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e},o$1j._implementation=function(e,t,i){if(!e$2e(e))throw new t$15("relative uri is required.");if(!e$2e(t)){if(typeof i>"u")return e;t=u$Z(i.baseURI,i.location.href)}var n=new h$16(t);return new h$16(e).resolve(n).toString()};var e$27=/^blob:/i,o$1i;function i$1a(e){return o$1q.typeOf.string("uri",e),e$27.test(e)}function i$19(e){e$2e(o$1i)||(o$1i=document.createElement("a")),o$1i.href=window.location.href;var t=o$1i.host,i=o$1i.protocol;return o$1i.href=e,o$1i.href=o$1i.href,i!==o$1i.protocol||t!==o$1i.host}var a$12=/^data:/i;function e$26(e){return o$1q.typeOf.string("uri",e),a$12.test(e)}function a$11(e){var t=o$1l.defer(),i=document.createElement("script");i.async=!0,i.src=e;var n=document.getElementsByTagName("head")[0];return i.onload=function(){i.onload=void 0,n.removeChild(i),t.resolve()},i.onerror=function(e){t.reject(e)},n.appendChild(i),t.promise}function m$1d(e,t){if(!e$2e(e))throw new t$15("obj is required.");var i="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=encodeURIComponent(n)+"=";if(Array.isArray(r))for(var a=0,s=r.length;a<s;++a)i+=!0===t?o+encodeURI(r[a])+"&":o+encodeURIComponent(r[a])+"&";else i+=!0===t?o+encodeURI(r)+"&":o+encodeURIComponent(r)+"&"}return i=i.slice(0,-1)}function m$1c(e){if(!e$2e(e))throw new t$15("queryString is required.");var t={};if(""===e)return t;for(var i=e.replace(/\+/g,"%20").split(/[&;]/),n=0,r=i.length;n<r;++n){var o=i[n].split("=");if(o.length>2){var a=i[n].indexOf("=");o=[i[n].substring(0,a),i[n].substring(a+1,i[n].length)]}var s=decodeURIComponent(o[0]),l=o[1];l=e$2e(l)?decodeURIComponent(l):"";var u=t[s];"string"==typeof u?t[s]=[u,l]:Array.isArray(u)?u.push(l):t[s]=l}return t}var e$25={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},W$1c=Object.freeze(e$25),e$24={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3,PACK:4,BLOCK:5,BLOCKPACK:6},U$1f=Object.freeze(e$24),e$23;function r$1c(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.throttleByServer,!1),i=u$Z(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=u$Z(e.priority,0),this.throttle=i,this.throttleByServer=t,this.type=u$Z(e.type,U$1f.OTHER),this.serverKey=void 0,this.state=W$1c.UNISSUED,this.deferred=void 0,this.cancelled=!1}function n$19(e){var t={};if(!e)return t;for(var i=e.split("\r\n"),n=0;n<i.length;++n){var r=i[n],o=r.indexOf(": ");if(o>0){var a=r.substring(0,o),s=r.substring(o+2);t[a]=s}}return t}function s$$(e,t,i){this.statusCode=e,this.response=t,this.responseHeaders=i,"string"==typeof this.responseHeaders&&(this.responseHeaders=n$19(this.responseHeaders))}function o$1h(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function v$Z(e,t){return t-e}function o$1g(e){o$1q.typeOf.object("options",e),o$1q.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function m$1b(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}r$1c.prototype.cancel=function(){this.cancelled=!0},r$1c.prototype.clone=function(e){return e$2e(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new r$1c(this)},s$$.prototype.toString=function(){var e="Request has failed.";return e$2e(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e},Object.defineProperties(o$1h.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),o$1h.prototype.addEventListener=function(e,t){o$1q.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);var i=this;return function(){i.removeEventListener(e,t)}},o$1h.prototype.removeEventListener=function(e,t){o$1q.typeOf.func("listener",e);for(var i=this._listeners,n=this._scopes,r=-1,o=0;o<i.length;o++)if(i[o]===e&&n[o]===t){r=o;break}return-1!==r&&(this._insideRaiseEvent?(this._toRemove.push(r),i[r]=void 0,n[r]=void 0):(i.splice(r,1),n.splice(r,1)),!0)},o$1h.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;var e,t=this._listeners,i=this._scopes,n=t.length;for(e=0;e<n;e++){var r=t[e];e$2e(r)&&t[e].apply(i[e],arguments)}var o=this._toRemove;if((n=o.length)>0){for(o.sort(v$Z),e=0;e<n;e++){var a=o[e];t.splice(a,1),i.splice(a,1)}o.length=0}this._insideRaiseEvent=!1},Object.defineProperties(o$1g.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){this._maximumLength=e,this._length>e&&e>0&&(this._length=e,this._array.length=e)}},comparator:{get:function(){return this._comparator}}}),o$1g.prototype.reserve=function(e){e=u$Z(e,this._length),this._array.length=e},o$1g.prototype.heapify=function(e){e=u$Z(e,0);for(var t=this._length,i=this._comparator,n=this._array,r=-1,o=!0;o;){var a=2*(e+1),s=a-1;r=s<t&&i(n[s],n[e])<0?s:e,a<t&&i(n[a],n[r])<0&&(r=a),r!==e?(m$1b(n,r,e),e=r):o=!1}},o$1g.prototype.resort=function(){for(var e=this._length,t=Math.ceil(e/2);t>=0;--t)this.heapify(t)},o$1g.prototype.insert=function(e){o$1q.defined("element",e);var t,i=this._array,n=this._comparator,r=this._maximumLength,o=this._length++;for(o<i.length?i[o]=e:i.push(e);0!==o;){var a=Math.floor((o-1)/2);if(!(n(i[o],i[a])<0))break;m$1b(i,o,a),o=a}return e$2e(r)&&this._length>r&&(t=i[r],i.pop(),this._length=r),t},o$1g.prototype.pop=function(e){if(e=u$Z(e,0),0!==this._length){o$1q.typeOf.number.lessThan("index",e,this._length);var t=this._array,i=t[e];return m$1b(t,e,--this._length),t[this._length]=void 0,this.heapify(e),i}},e$23=typeof performance<"u"&&"function"==typeof performance.now&&isFinite(performance.now())?function(){return performance.now()}:function(){return Date.now()};var Et$c=e$23;function S$12(e,t){return e.priority-t.priority}var i$18={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0,totalRequestTime:0},b$1f=20,o$1f=new o$1g({comparator:S$12});o$1f.maximumLength=b$1f,o$1f.reserve(b$1f);var c$19=[],v$Y={},I$1u=typeof document<"u"?new h$16(document.location.href):new h$16,k$19=new o$1h;function r$1b(){}function K$11(e){e$2e(e.priorityFunction)&&(e.priority=e.priorityFunction())}function C$1h(e){var t=u$Z(r$1b.requestsByServer[e],r$1b.maximumRequestsPerServer);return v$Y[e]<t}function q$1f(e){return e$2e(e.packKey)||(e.packKey=e.serverKey+"_"+e.providerName),e.packKey}function L$1i(e){return e$2e(e.blockKey)||(e.blockKey=e.serverKey+"_"+e.providerName+"_"+e.quadKey+e.url.substring(e.url.indexOf("dataVersion"))),e.blockKey}function N$$(e){var t=q$1f(e);return e$2e(r$1b.packRequestGroup[t])||(r$1b.packRequestGroup[t]=[]),e$2e(r$1b.packRequestQuadKey[t])||(r$1b.packRequestQuadKey[t]=""),e$2e(r$1b.packRequestPromise[t])||(r$1b.packRequestPromise[t]=o$1l.defer()),e$2e(r$1b.quadKeyIndex[t])||(r$1b.quadKeyIndex[t]=0),e.quadKeyIndex=r$1b.quadKeyIndex[t]++,e.deferred=r$1b.packRequestPromise[t],e.state=W$1c.ISSUED,r$1b.packRequestGroup[t].push(e),e.deferred.promise}function T$1b(e){var t=L$1i(e),i=r$1b.blockDefer[t];return e$2e(i)||(i=r$1b.blockDefer[t]=o$1l.defer(),r$1b.blockRequest[t]=e),e.deferred=i,e.state=W$1c.ISSUED,e.deferred.promise}function H$1b(){r$1b.packRequestGroup={},r$1b.packRequestPromise={},r$1b.packRequestQuadKey={},r$1b.quadKeyIndex={}}function U$1e(){r$1b.blockRequest={}}function Q$1a(e){for(var t=0,i=e.length;t<i;t++){e[t].state=W$1c.CANCELLED}}function j$1g(e){for(var t=[],i={},n=0,r=e.length;n<r;n++){var o=e[n];if(!o.cancelled){var a=o.quadKey;i[a]||(i[a]=!0,t.push(a))}}return t}function V$16(){var e=r$1b.packRequestGroup;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];if(i.length<1)continue;var n=i[0].clone(),r=-1!==n.url.indexOf("rest/maps");n.serverKey=i[0].serverKey,n.state=i[0].state;var o=n.url,a=j$1g(i);if(a.length<1)continue;r$1b.packRequestQuadKey[t]=r?a.join(","):a.join(";");var s=r$1b.packRequestQuadKey[t];if(n.throttleByServer&&!C$1h(n.serverKey)){Q$1a(i),r$1b.packRequestPromise[t].reject();continue}n.deferred=r$1b.packRequestPromise[t];var l=new h$16(o);l.query=r?e$2e(l.query)?l.query+"&tiles="+s:"tiles="+s:e$2e(l.query)?l.query+"&extratiles="+s:"extratiles="+s,n.url=l.toString(),A$1j(n,n.url)}H$1b()}function _$14(){var e=r$1b.blockRequest;for(var t in e)if(e.hasOwnProperty(t)){A$1j(e[t])}U$1e()}function x$1j(e){if(e.state===W$1c.UNISSUED)if(e.state=W$1c.ISSUED,e.type===U$1f.PACK||e.type===U$1f.BLOCKPACK){var t=q$1f(e);e$2e(r$1b.packRequestPromise[t])||(r$1b.packRequestPromise[t]=o$1l.defer()),e.deferred=r$1b.packRequestPromise[t]}else e.deferred=o$1l.defer();return e.deferred.promise}function M$1b(e){return function(t){if(e.state!==W$1c.CANCELLED&&(--i$18.numberOfActiveRequests,--v$Y[e.serverKey],k$19.raiseEvent(),e.state=W$1c.RECEIVED,e.deferred.resolve(t),e.endTime=Et$c(),(r$1b.statisticRequestTime>0||e.type!==U$1f.OTHER)&&(i$18.totalRequestTime+=e.endTime-e.startTime),e.type===U$1f.BLOCK||e.type===U$1f.BLOCKPACK)){var i=L$1i(e);e$2e(r$1b.blockDefer[i])&&(r$1b.blockDefer[i]=void 0,delete r$1b.blockDefer[i])}}}function z$13(e){return function(t){e.state!==W$1c.CANCELLED&&(++i$18.numberOfFailedRequests,--i$18.numberOfActiveRequests,--v$Y[e.serverKey],k$19.raiseEvent(t),e.state=W$1c.FAILED,e.deferred.reject(t))}}function A$1j(e,t){var i=x$1j(e);return e.state=W$1c.ACTIVE,c$19.push(e),++i$18.numberOfActiveRequests,++i$18.numberOfActiveRequestsEver,++v$Y[e.serverKey],e.startTime=Et$c(),e.requestFunction(t).then(M$1b(e)).otherwise(z$13(e)),i}function p$18(e){var t=e.state===W$1c.ACTIVE;e.state=W$1c.CANCELLED,++i$18.numberOfCancelledRequests,e.deferred.reject(),t&&(--i$18.numberOfActiveRequests,--v$Y[e.serverKey],++i$18.numberOfCancelledActiveRequests),e$2e(e.cancelFunction)&&e.cancelFunction()}function G$1n(){for(var e in r$1b.packRequestHeap)if(r$1b.packRequestHeap.hasOwnProperty(e)){for(var t=r$1b.packRequestHeap[e],i=t.internalArray,n=t.length,r=0;r<n;++r)K$11(i[r]);t.resort()}}function J$14(){for(var e in r$1b.packRequestHeap)if(r$1b.packRequestHeap.hasOwnProperty(e))for(var t=r$1b.packRequestHeap[e];t.length>0;){var i=t.pop();i.cancelled?p$18(i):N$$(i)}V$16()}function W$1b(e){var t=q$1f(e),i=r$1b.packRequestHeap[t];return e$2e(i)||((i=r$1b.packRequestHeap[t]=new o$1g({comparator:S$12})).maximumLength=r$1b.perPacketCount,i.reserve(b$1f)),i}function X$14(){!r$1b.debugShowStatistics||(0===i$18.numberOfActiveRequests&&i$18.lastNumberOfActiveRequests>0&&(i$18.numberOfAttemptedRequests>0&&(console.log("Number of attempted requests: "+i$18.numberOfAttemptedRequests),i$18.numberOfAttemptedRequests=0),i$18.numberOfCancelledRequests>0&&(console.log("Number of cancelled requests: "+i$18.numberOfCancelledRequests),i$18.numberOfCancelledRequests=0),i$18.numberOfCancelledActiveRequests>0&&(console.log("Number of cancelled active requests: "+i$18.numberOfCancelledActiveRequests),i$18.numberOfCancelledActiveRequests=0),i$18.numberOfFailedRequests>0&&(console.log("Number of failed requests: "+i$18.numberOfFailedRequests),i$18.numberOfFailedRequests=0)),i$18.lastNumberOfActiveRequests=i$18.numberOfActiveRequests)}r$1b.TIMEOUT=5e3,r$1b.CANCLE_COUNT=3,r$1b.statisticRequestTime=-1,r$1b.maximumRequests=50,r$1b.maximumRequestsPerServer=6,r$1b.perPacketCount=20,r$1b.requestsByServer={},r$1b.throttleRequests=!0,r$1b.debugShowStatistics=!1,r$1b.requestCompletedEvent=k$19,Object.defineProperties(r$1b,{activeRequestLength:{get:function(){return c$19.length}},statistics:{get:function(){return i$18}},priorityHeapLength:{get:function(){return b$1f},set:function(e){if(e<b$1f)for(;o$1f.length>e;){p$18(o$1f.pop())}b$1f=e,o$1f.maximumLength=e,o$1f.reserve(e)}}}),r$1b.packRequestGroup={},r$1b.packRequestPromise={},r$1b.packRequestQuadKey={},r$1b.quadKeyIndex={},r$1b.packRequestHeap={},r$1b.blockDefer={},r$1b.blockRequest={},r$1b.update=function(){var e,t,i=0,n=c$19.length;for(e=0;e<n;++e)(t=c$19[e]).cancelled&&p$18(t),t.state===W$1c.ACTIVE?i>0&&(c$19[e-i]=t):++i;c$19.length-=i;var r=o$1f.internalArray,o=o$1f.length;for(e=0;e<o;++e)K$11(r[e]);o$1f.resort(),G$1n(),_$14(),J$14();for(var a=Math.max(r$1b.maximumRequests-c$19.length,0),s=0;s<a&&o$1f.length>0;)(t=o$1f.pop()).cancelled?p$18(t):!t.throttleByServer||C$1h(t.serverKey)?(A$1j(t),++s):p$18(t);X$14()},r$1b.getServerKey=function(e){o$1q.typeOf.string("url",e);var t=new h$16(e).resolve(I$1u);t.normalize();var i=t.authority;return/:/.test(i)||(i=i+":"+("https"===t.scheme?"443":"80")),e$2e(v$Y[i])||(v$Y[i]=0),i},r$1b.request=function(e){if(o$1q.typeOf.object("request",e),o$1q.typeOf.string("request.url",e.url),o$1q.typeOf.func("request.requestFunction",e.requestFunction),e$26(e.url)||i$1a(e.url))return k$19.raiseEvent(),e.state=W$1c.RECEIVED,e.requestFunction();if(++i$18.numberOfAttemptedRequests,e$2e(e.serverKey)||(e.serverKey=r$1b.getServerKey(e.url)),e.type===U$1f.BLOCK)return T$1b(e);if(!e.throttleByServer||C$1h(e.serverKey)){if(!r$1b.throttleRequests||!e.throttle)return A$1j(e);if(!(c$19.length>=r$1b.maximumRequests)){var t;if(K$11(e),e.type===U$1f.PACK||e.type===U$1f.BLOCKPACK){var i=W$1b(e),n=!0;if(e.type===U$1f.BLOCKPACK)for(var r=0;r<i.length;r++)if(i._array[r].quadKey===e.quadKey){e.blockRequest=i._array[r],n=!1;break}n&&(t=i.insert(e))}else t=o$1f.insert(e);if(e$2e(t)){if(t===e)return;p$18(t)}return x$1j(e)}}},r$1b.clearForSpecs=function(){for(;o$1f.length>0;){p$18(o$1f.pop())}for(var e=c$19.length,t=0;t<e;++t)p$18(c$19[t]);c$19.length=0,v$Y={},i$18.numberOfAttemptedRequests=0,i$18.numberOfActiveRequests=0,i$18.numberOfCancelledRequests=0,i$18.numberOfCancelledActiveRequests=0,i$18.numberOfFailedRequests=0,i$18.numberOfActiveRequestsEver=0,i$18.lastNumberOfActiveRequests=0,i$18.totalRequestTime=0},r$1b.numberOfActiveRequestsByServer=function(e){return v$Y[e]},r$1b.requestHeap=o$1f;var u$W={},n$18={};function w$18(e){var t=new h$16(e);t.normalize();var i=t.getAuthority();if(e$2e(i)){if(-1!==i.indexOf("@")){var n=i.split("@");i=n[1]}if(-1===i.indexOf(":")){var r=t.getScheme();if(e$2e(r)||(r=(r=window.location.protocol).substring(0,r.length-1)),"http"===r)i+=":80";else{if("https"!==r)return;i+=":443"}}return i}}u$W.add=function(e,t){if(!e$2e(e))throw new t$15("host is required.");if(!e$2e(t)||t<=0)throw new t$15("port is required to be greater than 0.");var i=e.toLowerCase()+":"+t;e$2e(n$18[i])||(n$18[i]=!0)},u$W.remove=function(e,t){if(!e$2e(e))throw new t$15("host is required.");if(!e$2e(t)||t<=0)throw new t$15("port is required to be greater than 0.");var i=e.toLowerCase()+":"+t;e$2e(n$18[i])&&delete n$18[i]},u$W.contains=function(e){if(!e$2e(e))throw new t$15("url is required.");var t=w$18(e);return!(!e$2e(t)||!e$2e(n$18[t]))},u$W.clear=function(){n$18={}};var i$17={};function e$22(e,t){if(!e$2e(e))throw new t$15("identifier is required.");e$2e(i$17[e])||(i$17[e]=!0,console.warn(u$Z(t,e)))}function t$11(e,t){if(!e$2e(e)||!e$2e(t))throw new t$15("identifier and message are required.");e$22(e,t)}e$22.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",e$22.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",e$22.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",e$22.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var k$18=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch{return!1}}(),_$13;function x$1i(e,t,i,n){var r,o=e.query;if(!e$2e(o)||0===o.length)return{};if(-1===o.indexOf("=")){var a={};a[o]=void 0,r=a}else r=m$1c(o);t._queryParameters=i?O$V(r,t._queryParameters,n):r,e.query=void 0}function re$K(e,t){var i=t._queryParameters,n=Object.keys(i);1!==n.length||e$2e(i[n[0]])?e.query=m$1d(i):e.query=n[0]}function v$X(e,t){return e$2e(e)?e$2e(e.clone)?e.clone():l$1f(e):t}function C$1g(e){if(e.state===W$1c.ISSUED||e.state===W$1c.ACTIVE)throw new t$13("The Resource is already being fetched.");e.state=W$1c.UNISSUED,e.deferred=void 0}function O$V(e,t,i){if(!i)return p$19(e,t);var n=l$1f(e,!0);for(var r in t)if(t.hasOwnProperty(r)){var o=n[r],a=t[r];e$2e(o)?(Array.isArray(o)||(o=n[r]=[o]),n[r]=o.concat(a)):n[r]=Array.isArray(a)?a.slice():a}return n}function t$10(e){"string"==typeof(e=u$Z(e,u$Z.EMPTY_OBJECT))&&(e={url:e}),o$1q.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=v$X(e.templateValues,{}),this._queryParameters=v$X(e.queryParameters,{}),this.headers=v$X(e.headers,{}),this.request=u$Z(e.request,new r$1c),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=u$Z(e.retryAttempts,0),this._retryCount=0;var t=new h$16(e.url);x$1i(t,this,!0,!0),t.fragment=void 0,this._url=t.toString()}function j$1f(e){var t=e.resource,i=e.flipY,n=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){var e=!1;!t.isDataUri&&!t.isBlobUri&&(e=t.isCrossOriginUrl);var o=o$1l.defer();return t$10._Implementations.createImage(r,e,o,i,n),o.promise};var o=r$1b.request(r);if(e$2e(o))return o.otherwise((function(e){return r.state!==W$1c.FAILED?o$1l.reject(e):t.retryOnError(e).then((function(o){return o?(r.state=W$1c.UNISSUED,r.deferred=void 0,j$1f({resource:t,flipY:i,preferImageBitmap:n})):o$1l.reject(e)}))}))}function L$1h(e,t,i){var n={};n[t]=i,e.setQueryParameters(n);var r=e.request;r.url=e.url,r.requestFunction=function(){var t=o$1l.defer();return window[i]=function(e){t.resolve(e);try{delete window[i]}catch{window[i]=void 0}},t$10._Implementations.loadAndExecuteScript(e.url,i,t),t.promise};var o=r$1b.request(r);if(e$2e(o))return o.otherwise((function(n){return r.state!==W$1c.FAILED?o$1l.reject(n):e.retryOnError(n).then((function(o){return o?(r.state=W$1c.UNISSUED,r.deferred=void 0,L$1h(e,t,i)):o$1l.reject(n)}))}))}t$10.createIfNeeded=function(e){return e instanceof t$10?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new t$10({url:e})},t$10.supportsImageBitmapOptions=function(){if(e$2e(_$13))return _$13;if("function"!=typeof createImageBitmap)return _$13=o$1l.resolve(!1);return _$13=t$10.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then((function(e){return createImageBitmap(e,{imageOrientation:"flipY",premultiplyAlpha:"none"})})).then((function(e){return!0})).otherwise((function(){return!1})),_$13},Object.defineProperties(t$10,{isBlobSupported:{get:function(){return k$18}}}),Object.defineProperties(t$10.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){var t=new h$16(e);x$1i(t,this,!1),t.fragment=void 0,this._url=t.toString()}},extension:{get:function(){return a$13(this._url)}},isDataUri:{get:function(){return e$26(this._url)}},isBlobUri:{get:function(){return i$1a(this._url)}},isCrossOriginUrl:{get:function(){return i$19(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}}),t$10.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;var i=new h$16(this._url);e&&re$K(i,this);var n=i.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),r=this._templateValues;return n=n.replace(/{(.*?)}/g,(function(e,t){var i=r[t];return e$2e(i)?encodeURIComponent(i):e})),t&&e$2e(this.proxy)&&(n=this.proxy.getURL(n)),n},t$10.prototype.setQueryParameters=function(e,t){this._queryParameters=t?O$V(this._queryParameters,e,!1):O$V(e,this._queryParameters,!1)},t$10.prototype.appendQueryParameters=function(e){this._queryParameters=O$V(e,this._queryParameters,!0)},t$10.prototype.setTemplateValues=function(e,t){this._templateValues=t?p$19(this._templateValues,e):p$19(e,this._templateValues)},t$10.prototype.getDerivedResource=function(e){var t=this.clone();if(t._retryCount=0,e$2e(e.url)){var i=new h$16(e.url);x$1i(i,t,!0,u$Z(e.preserveQueryParameters,!1)),i.fragment=void 0,t._url=i.resolve(new h$16(o$1j(this._url))).toString()}return e$2e(e.queryParameters)&&(t._queryParameters=p$19(e.queryParameters,t._queryParameters)),e$2e(e.templateValues)&&(t._templateValues=p$19(e.templateValues,t.templateValues)),e$2e(e.headers)&&(t.headers=p$19(e.headers,t.headers)),e$2e(e.proxy)&&(t.proxy=e.proxy),e$2e(e.request)&&(t.request=e.request),e$2e(e.retryCallback)&&(t.retryCallback=e.retryCallback),e$2e(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},t$10.prototype.retryOnError=function(e){var t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return o$1l(!1);var i=this;return o$1l(t(this,e)).then((function(e){return++i._retryCount,e}))},t$10.prototype.clone=function(e){return e$2e(e)||(e=new t$10({url:this._url})),e._url=this._url,e._queryParameters=l$1f(this._queryParameters),e._templateValues=l$1f(this._templateValues),e.headers=l$1f(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},t$10.prototype.getBaseUri=function(e){return i$1b(this.getUrlComponent(e),e)},t$10.prototype.appendForwardSlash=function(){this._url=n$1a(this._url)},t$10.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},t$10.fetchArrayBuffer=function(e){return new t$10(e).fetchArrayBuffer()},t$10.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},t$10.fetchBlob=function(e){return new t$10(e).fetchBlob()},t$10.prototype.fetchImage=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.preferImageBitmap,!1),i=u$Z(e.preferBlob,!1),n=u$Z(e.flipY,!1);if(C$1g(this.request),!k$18||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!i)return j$1f({resource:this,flipY:n,preferImageBitmap:t});var r,o,a,s=this.fetchBlob();return e$2e(s)?t$10.supportsImageBitmapOptions().then((function(e){return r=e&&t,s})).then((function(e){if(e$2e(e)){if(a=e,r)return t$10.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});var t=window.URL.createObjectURL(e);return j$1f({resource:o=new t$10({url:t}),flipY:n,preferImageBitmap:!1})}})).then((function(e){if(e$2e(e))return e.blob=a,r||window.URL.revokeObjectURL(o.url),e})).otherwise((function(e){return e$2e(o)&&window.URL.revokeObjectURL(o.url),e.blob=a,o$1l.reject(e)})):void 0},t$10.fetchImage=function(e){return new t$10(e).fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},t$10.prototype.fetchText=function(){return this.fetch({responseType:"text"})},t$10.fetchText=function(e){return new t$10(e).fetchText()},t$10.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(e$2e(e))return e.then((function(e){if(e$2e(e))return JSON.parse(e)}))},t$10.fetchJson=function(e){return new t$10(e).fetchJson()},t$10.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},t$10.fetchXML=function(e){return new t$10(e).fetchXML()},t$10.prototype.fetchJsonp=function(e){var t;e=u$Z(e,"callback"),C$1g(this.request);do{t="loadJsonp"+Math.random().toString().substring(2,8)}while(e$2e(window[t]));return L$1h(this,e,t)},t$10.fetchJsonp=function(e){return new t$10(e).fetchJsonp(e.callbackParameterName)},t$10.prototype._makeRequest=function(e){var t=this;C$1g(t.request);var i=t.request;i.url=t.url,i.requestFunction=function(n){var r=e.responseType,o=p$19(e.headers,t.headers),a=e.overrideMimeType,s=e.method,l=e.data,u=o$1l.defer(),c=e$2e(n)?n:t.url,h=t$10._Implementations.loadWithXhr(c,r,s,l,o,u,a);return e$2e(h)&&e$2e(h.abort)&&(i.cancelFunction=function(){h.abort()}),u.promise};var n=r$1b.request(i);if(e$2e(n))return n.then((function(e){return e})).otherwise((function(n){return i.state!==W$1c.FAILED?o$1l.reject(n):t.retryOnError(n).then((function(r){return r?(i.state=W$1c.UNISSUED,i.deferred=void 0,t.fetch(e)):o$1l.reject(n)}))}))};var te$F=/^data:(.*?)(;base64)?,(.*)$/;function E$1p(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function Y$X(e,t){for(var i=E$1p(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return n}function ne$I(e,t){t=u$Z(t,"");var i=e[1],n=!!e[2],r=e[3];switch(t){case"":case"text":return E$1p(n,r);case"arraybuffer":return Y$X(n,r);case"blob":var o=Y$X(n,r);return new Blob([o],{type:i});case"document":return(new DOMParser).parseFromString(E$1p(n,r),i);case"json":return JSON.parse(E$1p(n,r));default:throw new t$15("Unhandled responseType: "+t)}}function ae$A(e,t,i){var n=new Image;n.onload=function(){i.resolve(n)},n.onerror=function(e){i.reject(e)},t&&(u$W.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e}function F$1f(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}function ie$G(e,t,i,n,r,o,a){var s=require("url").parse(e),l="https:"===s.protocol?require("https"):require("http"),u=require("zlib"),c={protocol:s.protocol,hostname:s.hostname,port:s.port,path:s.path,query:s.query,method:i,headers:r};l.request(c).on("response",(function(e){if(e.statusCode<200||e.statusCode>=300)o.reject(new s$$(e.statusCode,e,e.headers));else{var i=[];e.on("data",(function(e){i.push(e)})),e.on("end",(function(){var n=Buffer.concat(i);"gzip"===e.headers["content-encoding"]?u.gunzip(n,(function(e,i){e?o.reject(new t$13("Error decompressing response.")):o.resolve(F$1f(i,t))})):o.resolve(F$1f(n,t))}))}})).on("error",(function(e){o.reject(new s$$)})).end()}t$10.prototype.fetch=function(e){return(e=v$X(e,{})).method="GET",this._makeRequest(e)},t$10.fetch=function(e){return new t$10(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$10.prototype.delete=function(e){return(e=v$X(e,{})).method="DELETE",this._makeRequest(e)},t$10.delete=function(e){return new t$10(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},t$10.prototype.head=function(e){return(e=v$X(e,{})).method="HEAD",this._makeRequest(e)},t$10.head=function(e){return new t$10(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$10.prototype.options=function(e){return(e=v$X(e,{})).method="OPTIONS",this._makeRequest(e)},t$10.options=function(e){return new t$10(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$10.prototype.post=function(e,t){return o$1q.defined("data",e),(t=v$X(t,{})).method="POST",t.data=e,this._makeRequest(t)},t$10.post=function(e){return new t$10(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$10.prototype.put=function(e,t){return o$1q.defined("data",e),(t=v$X(t,{})).method="PUT",t.data=e,this._makeRequest(t)},t$10.put=function(e){return new t$10(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$10.prototype.patch=function(e,t){return o$1q.defined("data",e),(t=v$X(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},t$10.patch=function(e){return new t$10(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},t$10._Implementations={},t$10._Implementations.createImage=function(e,t,i,n,r){var o=e.url;t$10.supportsImageBitmapOptions().then((function(a){if(a&&r){var s=o$1l.defer(),l=t$10._Implementations.loadWithXhr(o,"blob","GET",void 0,void 0,s,void 0,void 0,void 0);return e$2e(l)&&e$2e(l.abort)&&(e.cancelFunction=function(){l.abort()}),s.promise.then((function(e){if(e$2e(e))return t$10.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});i.reject(new t$13("Successfully retrieved "+o+" but it contained no content."))})).then(i.resolve)}ae$A(o,t,i)})).otherwise(i.reject)},t$10.createImageBitmapFromBlob=function(e,t){return o$1q.defined("options",t),o$1q.typeOf.bool("options.flipY",t.flipY),o$1q.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none"})};var ue$E=typeof XMLHttpRequest>"u";function x$1h(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=u$Z(e.addNewLeapSeconds,!0),e$2e(e.data))U$1d(this,e.data);else if(e$2e(e.url)){var t=t$10.createIfNeeded(e.url),i=this;this._downloadPromise=o$1l(t.fetchJson(),(function(e){U$1d(i,e)}),(function(){i._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))}else U$1d(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function F$1e(e,t){return a$15.compare(e.julianDate,t)}function U$1d(e,t){if(e$2e(t.columnNames))if(e$2e(t.samples)){var i=t.columnNames.indexOf("modifiedJulianDateUtc"),n=t.columnNames.indexOf("xPoleWanderRadians"),r=t.columnNames.indexOf("yPoleWanderRadians"),o=t.columnNames.indexOf("ut1MinusUtcSeconds"),a=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),s=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(i<0||n<0||r<0||o<0||a<0||s<0||l<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var u=e._samples=t.samples,c=e._dates=[];e._dateColumn=i,e._xPoleWanderRadiansColumn=n,e._yPoleWanderRadiansColumn=r,e._ut1MinusUtcSecondsColumn=o,e._xCelestialPoleOffsetRadiansColumn=a,e._yCelestialPoleOffsetRadiansColumn=s,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var h,d=e._addNewLeapSeconds,f=0,p=u.length;f<p;f+=e._columnCount){var _=u[f+i],m=u[f+l],g=new a$15(_+h$17.MODIFIED_JULIAN_DATE_DIFFERENCE,m,H$1d.TAI);if(c.push(g),d){if(m!==h&&e$2e(h)){var x=a$15.leapSeconds,y=a$17(x,g,F$1e);if(y<0){var v=new a$16(g,m);x.splice(~y,0,v)}}h=m}}}}else e._dataError="Error in loaded EOP data: The samples property is required.";else e._dataError="Error in loaded EOP data: The columnNames property is required."}function T$1a(e,t,i,n,r){var o=i*n;r.xPoleWander=t[o+e._xPoleWanderRadiansColumn],r.yPoleWander=t[o+e._yPoleWanderRadiansColumn],r.xPoleOffset=t[o+e._xCelestialPoleOffsetRadiansColumn],r.yPoleOffset=t[o+e._yCelestialPoleOffsetRadiansColumn],r.ut1MinusUtc=t[o+e._ut1MinusUtcSecondsColumn]}function O$U(e,t,i){return t+e*(i-t)}function I$1t(e,t,i,n,r,o,a){var s=e._columnCount;if(o>t.length-1)return a.xPoleWander=0,a.yPoleWander=0,a.xPoleOffset=0,a.yPoleOffset=0,a.ut1MinusUtc=0,a;var l=t[r],u=t[o];if(l.equals(u)||n.equals(l))return T$1a(e,i,r,s,a),a;if(n.equals(u))return T$1a(e,i,o,s,a),a;var c=a$15.secondsDifference(n,l)/a$15.secondsDifference(u,l),h=r*s,d=o*s,f=i[h+e._ut1MinusUtcSecondsColumn],p=i[d+e._ut1MinusUtcSecondsColumn],_=p-f;if(_>.5||_<-.5){var m=i[h+e._taiMinusUtcSecondsColumn],g=i[d+e._taiMinusUtcSecondsColumn];m!==g&&(u.equals(n)?f=p:p-=g-m)}return a.xPoleWander=O$U(c,i[h+e._xPoleWanderRadiansColumn],i[d+e._xPoleWanderRadiansColumn]),a.yPoleWander=O$U(c,i[h+e._yPoleWanderRadiansColumn],i[d+e._yPoleWanderRadiansColumn]),a.xPoleOffset=O$U(c,i[h+e._xCelestialPoleOffsetRadiansColumn],i[d+e._xCelestialPoleOffsetRadiansColumn]),a.yPoleOffset=O$U(c,i[h+e._yCelestialPoleOffsetRadiansColumn],i[d+e._yCelestialPoleOffsetRadiansColumn]),a.ut1MinusUtc=O$U(c,f,p),a}function i$16(e,t,i){this.heading=u$Z(e,0),this.pitch=u$Z(t,0),this.roll=u$Z(i,0)}t$10._Implementations.loadWithXhr=function(e,t,i,n,r,o,a){var s=te$F.exec(e);if(null===s){if(!ue$E){var l=new XMLHttpRequest;if(u$W.contains(e)&&(l.withCredentials=!0),e=e.replace(/{/g,"%7B").replace(/}/g,"%7D"),l.open(i,e,!0),e$2e(a)&&e$2e(l.overrideMimeType)&&l.overrideMimeType(a),e$2e(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);e$2e(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")||typeof window<"u"&&"file://"===window.location.origin),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,n=l.responseType;if("HEAD"===i||"OPTIONS"===i){var r=l.getAllResponseHeaders().trim().split(/[\r\n]+/),a={};return r.forEach((function(e){var t=e.split(": "),i=t.shift();a[i]=t.join(": ")})),void o.resolve(a)}if(204===l.status)o.resolve();else if(!e$2e(e)||e$2e(t)&&n!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===n||"document"===n)&&e$2e(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==n&&"text"!==n||!e$2e(l.responseText)?o.reject(new t$13("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new s$$(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new s$$)},l.send(n),l}ie$G(e,t,i,n,r,o)}else o.resolve(ne$I(s,t))},t$10._Implementations.loadAndExecuteScript=function(e,t,i){return a$11(e).otherwise(i.reject)},t$10._DefaultImplementations={},t$10._DefaultImplementations.createImage=t$10._Implementations.createImage,t$10._DefaultImplementations.loadWithXhr=t$10._Implementations.loadWithXhr,t$10._DefaultImplementations.loadAndExecuteScript=t$10._Implementations.loadAndExecuteScript,t$10.DEFAULT=Object.freeze(new t$10({url:typeof document>"u"?"":document.location.href.split("?")[0]})),x$1h.NONE=Object.freeze({getPromiseToLoad:function(){return o$1l()},compute:function(e,t){return e$2e(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new n$1c(0,0,0,0,0),t}}),x$1h.prototype.getPromiseToLoad=function(){return o$1l(this._downloadPromise)},x$1h.prototype.compute=function(e,t){if(e$2e(this._samples)){if(e$2e(t)||(t=new n$1c(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;var i=this._dates,n=this._lastIndex,r=0,o=0;if(e$2e(n)){var a=i[n],s=i[n+1],l=a$15.lessThanOrEquals(a,e),u=!e$2e(s),c=u||a$15.greaterThanOrEquals(s,e);if(l&&c)return r=n,!u&&s.equals(e)&&++r,o=r+1,I$1t(this,i,this._samples,e,r,o,t),t}var h=a$17(i,e,a$15.compare,this._dateColumn);return h>=0?(h<i.length-1&&i[h+1].equals(e)&&++h,r=h,o=h):(r=(o=~h)-1)<0&&(r=0),this._lastIndex=r,I$1t(this,i,this._samples,e,r,o,t),t}if(e$2e(this._dataError))throw new t$13(this._dataError)},i$16.fromQuaternion=function(e,t){if(!e$2e(e))throw new t$15("quaternion is required");e$2e(t)||(t=new i$16);var i=2*(e.w*e.y-e.z*e.x),n=1-2*(e.x*e.x+e.y*e.y),r=2*(e.w*e.x+e.y*e.z),o=1-2*(e.y*e.y+e.z*e.z),a=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(a,o),t.roll=Math.atan2(r,n),t.pitch=-e$2d.asinClamped(i),t},i$16.fromDegrees=function(e,t,i,n){if(!e$2e(e))throw new t$15("heading is required");if(!e$2e(t))throw new t$15("pitch is required");if(!e$2e(i))throw new t$15("roll is required");return e$2e(n)||(n=new i$16),n.heading=e*e$2d.RADIANS_PER_DEGREE,n.pitch=t*e$2d.RADIANS_PER_DEGREE,n.roll=i*e$2d.RADIANS_PER_DEGREE,n},i$16.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new i$16(e.heading,e.pitch,e.roll)},i$16.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},i$16.equalsEpsilon=function(e,t,i,n){return e===t||e$2e(e)&&e$2e(t)&&e$2d.equalsEpsilon(e.heading,t.heading,i,n)&&e$2d.equalsEpsilon(e.pitch,t.pitch,i,n)&&e$2d.equalsEpsilon(e.roll,t.roll,i,n)},i$16.prototype.clone=function(e){return i$16.clone(this,e)},i$16.prototype.equals=function(e){return i$16.equals(this,e)},i$16.prototype.equalsEpsilon=function(e,t,i){return i$16.equalsEpsilon(this,e,t,i)},i$16.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var d$1q=/((?:.*\/)|^)SuperMap3D\.js$/,u$V,i$15,o$1e;function g$1h(){for(var e=document.getElementsByTagName("script"),t=0,i=e.length;t<i;++t){var n=e[t].getAttribute("src"),r=d$1q.exec(n);if(null!==r)return r[1]}}function f$18(e){return typeof document>"u"?e:(e$2e(u$V)||(u$V=document.createElement("a")),u$V.href=e,u$V.href=u$V.href,u$V.href)}function s$_(){if(e$2e(i$15))return i$15;var e;if(e=typeof BASE_URL<"u"?BASE_URL:"object"==typeof define&&e$2e(define.amd)&&!define.amd.toUrlUndefined&&e$2e(require.toUrl)?o$1j("..",n$17("Core/buildModuleUrl.js")):g$1h(),!e$2e(e))throw new t$15("Unable to determine SuperMap3D base URL automatically, try defining a global variable called BASE_URL.");return(i$15=new t$10({url:f$18(e)})).appendForwardSlash(),i$15}function v$W(e){return f$18(require.toUrl("../"+e))}function c$18(e){return s$_().getDerivedResource({url:e}).url}function n$17(e){return e$2e(o$1e)||(o$1e="object"==typeof define&&e$2e(define.amd)&&!define.amd.toUrlUndefined&&e$2e(require.toUrl)?v$W:c$18),o$1e(e)}function a$10(e,t,i){this.x=e,this.y=t,this.s=i}function D$17(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._xysFileUrlTemplate=t$10.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=u$Z(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=u$Z(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new a$15(this._sampleZeroJulianEphemerisDate,0,H$1d.TAI),this._stepSizeDays=u$Z(e.stepSizeDays,1),this._samplesPerXysFile=u$Z(e.samplesPerXysFile,1e3),this._totalSamples=u$Z(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,i=this._denominators=new Array(t+1),n=this._xTable=new Array(t+1),r=Math.pow(this._stepSizeDays,t),o=0;o<=t;++o){i[o]=r,n[o]=o*this._stepSizeDays;for(var a=0;a<=t;++a)a!==o&&(i[o]*=o-a);i[o]=1/i[o]}this._work=new Array(t+1),this._coef=new Array(t+1)}n$17._cesiumScriptRegex=d$1q,n$17._buildModuleUrlFromBaseUrl=c$18,n$17._clearBaseResource=function(){i$15=void 0},n$17.setBaseUrl=function(e){i$15=t$10.DEFAULT.getDerivedResource({url:e})},n$17.getCesiumBaseUrl=s$_;var E$1o=new a$15(0,0,H$1d.TAI);function w$17(e,t,i){var n=E$1o;return n.dayNumber=t,n.secondsOfDay=i,a$15.daysDifference(n,e._sampleZeroDateTT)}function T$19(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];var i=o$1l.defer();e._chunkDownloadsInProgress[t]=i;var n=e._xysFileUrlTemplate;return o$1l((e$2e(n)?n.getDerivedResource({templateValues:{0:t}}):new t$10({url:n$17("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")})).fetchJson(),(function(n){e._chunkDownloadsInProgress[t]=!1;for(var r=e._samples,o=n.samples,a=t*e._samplesPerXysFile*3,s=0,l=o.length;s<l;++s)r[a+s]=o[s];i.resolve()})),i.promise}D$17.prototype.preload=function(e,t,i,n){var r=w$17(this,e,t),o=w$17(this,i,n),a=r/this._stepSizeDays-this._interpolationOrder/2|0;a<0&&(a=0);var s=o/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;s>=this._totalSamples&&(s=this._totalSamples-1);for(var l=a/this._samplesPerXysFile|0,u=s/this._samplesPerXysFile|0,c=[],h=l;h<=u;++h)c.push(T$19(this,h));return o$1l.all(c)},D$17.prototype.computeXysRadians=function(e,t,i){var n=w$17(this,e,t);if(!(n<0)){var r=n/this._stepSizeDays|0;if(!(r>=this._totalSamples)){var o=this._interpolationOrder,a=r-(o/2|0);a<0&&(a=0);var s=a+o;s>=this._totalSamples&&((a=(s=this._totalSamples-1)-o)<0&&(a=0));var l=!1,u=this._samples;if(e$2e(u[3*a])||(T$19(this,a/this._samplesPerXysFile|0),l=!0),e$2e(u[3*s])||(T$19(this,s/this._samplesPerXysFile|0),l=!0),!l){e$2e(i)?(i.x=0,i.y=0,i.s=0):i=new a$10(0,0,0);var c,h,d=n-a*this._stepSizeDays,f=this._work,p=this._denominators,_=this._coef,m=this._xTable;for(c=0;c<=o;++c)f[c]=d-m[c];for(c=0;c<=o;++c){for(_[c]=1,h=0;h<=o;++h)h!==c&&(_[c]*=f[h]);_[c]*=p[c];var g=3*(a+c);i.x+=_[c]*u[g++],i.y+=_[c]*u[g++],i.s+=_[c]*u[g]}return i}}}};var r$1a,n$16={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},l$1e={},r$19,l$1d,E$1n,c$17,W$1a,d$1p,h$15,f$17,w$16,v$V,k$17,A$1i,S$11,R$16,V$15,I$1s,N$_,g$1g,a$$,i$14;function o$1d(e){for(var t=e.split("."),i=0,n=t.length;i<n;++i)t[i]=parseInt(t[i],10);return t}function b$1e(){if(!e$2e(l$1d)&&(l$1d=!1,!p$17())){var e=/ Chrome\/([\.0-9]+)/.exec(r$19.userAgent);null!==e&&(l$1d=!0,E$1n=o$1d(e[1]))}return l$1d}function z$12(){return b$1e()&&E$1n}function P$1a(){if(!e$2e(c$17)&&(c$17=!1,!b$1e()&&!p$17()&&/ Safari\/[\.0-9]+/.test(r$19.userAgent))){var e=/ Version\/([\.0-9]+)/.exec(r$19.userAgent);null!==e&&(c$17=!0,W$1a=o$1d(e[1]))}return c$17}function G$1m(){return P$1a()&&W$1a}function C$1f(){if(!e$2e(d$1p)){d$1p=!1;var e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(r$19.userAgent);null!==e&&(d$1p=!0,(h$15=o$1d(e[1])).isNightly=!!e[2])}return d$1p}function K$10(){return C$1f()&&h$15}function F$1d(){var e;e$2e(f$17)||(f$17=!1,"Microsoft Internet Explorer"===r$19.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(r$19.userAgent))&&(f$17=!0,w$16=o$1d(e[1])):"Netscape"===r$19.appName&&(null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(r$19.userAgent))&&(f$17=!0,w$16=o$1d(e[1]))));return f$17}function L$1g(){return F$1d()&&w$16}function p$17(){if(!e$2e(v$V)){v$V=!1;var e=/ Edge\/([\.0-9]+)/.exec(r$19.userAgent);null!==e&&(v$V=!0,k$17=o$1d(e[1]))}return v$V}function X$13(){return p$17()&&k$17}function x$1g(){if(!e$2e(A$1i)){A$1i=!1;var e=/Firefox\/([\.0-9]+)/.exec(r$19.userAgent);null!==e&&(A$1i=!0,S$11=o$1d(e[1]))}return A$1i}function Y$W(){return e$2e(R$16)||(R$16=/Windows/i.test(r$19.appVersion)),R$16}function q$1e(){return x$1g()&&S$11}function H$1a(){return e$2e(V$15)||(V$15="object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)),V$15}function Z$1a(){return e$2e(I$1s)||(I$1s=!x$1g()&&typeof PointerEvent<"u"&&(!e$2e(r$19.pointerEnabled)||r$19.pointerEnabled)),I$1s}function U$1c(){if(!e$2e(g$1g)){var e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");var t=e.style.imageRendering;(g$1g=e$2e(t)&&""!==t)&&(N$_=t)}return g$1g}function _$12(){return U$1c()?N$_:void 0}function B$15(){if(e$2e(i$14))return i$14.promise;i$14=o$1l.defer(),p$17()&&(a$$=!1,i$14.resolve(a$$));var e=new Image;return e.onload=function(){a$$=e.width>0&&e.height>0,i$14.resolve(a$$)},e.onerror=function(){a$$=!1,i$14.resolve(a$$)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",i$14.promise}function $$14(){return e$2e(i$14)||B$15(),a$$}Object.defineProperties(l$1e,{element:{get:function(){if(l$1e.supportsFullscreen())return document[n$16.fullscreenElement]}},changeEventName:{get:function(){if(l$1e.supportsFullscreen())return n$16.fullscreenchange}},errorEventName:{get:function(){if(l$1e.supportsFullscreen())return n$16.fullscreenerror}},enabled:{get:function(){if(l$1e.supportsFullscreen())return document[n$16.fullscreenEnabled]}},fullscreen:{get:function(){if(l$1e.supportsFullscreen())return null!==l$1e.element}}}),l$1e.supportsFullscreen=function(){if(e$2e(r$1a))return r$1a;r$1a=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return n$16.requestFullscreen="requestFullscreen",n$16.exitFullscreen="exitFullscreen",n$16.fullscreenEnabled="fullscreenEnabled",n$16.fullscreenElement="fullscreenElement",n$16.fullscreenchange="fullscreenchange",n$16.fullscreenerror="fullscreenerror",r$1a=!0;for(var t,i=["webkit","moz","o","ms","khtml"],n=0,r=i.length;n<r;++n){var o=i[n];"function"==typeof e[t=o+"RequestFullscreen"]?(n$16.requestFullscreen=t,r$1a=!0):"function"==typeof e[t=o+"RequestFullScreen"]&&(n$16.requestFullscreen=t,r$1a=!0),t=o+"ExitFullscreen","function"==typeof document[t]?n$16.exitFullscreen=t:(t=o+"CancelFullScreen","function"==typeof document[t]&&(n$16.exitFullscreen=t)),t=o+"FullscreenEnabled",void 0!==document[t]?n$16.fullscreenEnabled=t:(t=o+"FullScreenEnabled",void 0!==document[t]&&(n$16.fullscreenEnabled=t)),t=o+"FullscreenElement",void 0!==document[t]?n$16.fullscreenElement=t:(t=o+"FullScreenElement",void 0!==document[t]&&(n$16.fullscreenElement=t)),t=o+"fullscreenchange",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenChange"),n$16.fullscreenchange=t),t=o+"fullscreenerror",void 0!==document["on"+t]&&("ms"===o&&(t="MSFullscreenError"),n$16.fullscreenerror=t)}return r$1a},l$1e.requestFullscreen=function(e,t){!l$1e.supportsFullscreen()||e[n$16.requestFullscreen]({vrDisplay:t})},l$1e.exitFullscreen=function(){!l$1e.supportsFullscreen()||document[n$16.exitFullscreen]()},l$1e._names=n$16,r$19=typeof navigator<"u"?navigator:{};var m$1a=[];typeof ArrayBuffer<"u"&&(m$1a.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&m$1a.push(Uint8ClampedArray),typeof CanvasPixelArray<"u"&&m$1a.push(CanvasPixelArray));var s$Z={isChrome:b$1e,chromeVersion:z$12,isSafari:P$1a,safariVersion:G$1m,isWebkit:C$1f,webkitVersion:K$10,isInternetExplorer:F$1d,internetExplorerVersion:L$1g,isEdge:p$17,edgeVersion:X$13,isFirefox:x$1g,firefoxVersion:q$1e,isWindows:Y$W,isNodeJs:H$1a,hardwareConcurrency:u$Z(r$19.hardwareConcurrency,3),supportsPointerEvents:Z$1a,supportsImageRenderingPixelated:U$1c,supportsWebP:B$15,supportsWebPSync:$$14,imageRenderingValue:_$12,typedArrayTypes:m$1a,isPCBroswer:ee$B};function ee$B(){var e=window.navigator.userAgent.toLowerCase(),t="ipad"==e.match(/ipad/i),i="iphone os"==e.match(/iphone os/i),n="midp"==e.match(/midp/i),r="ucweb"==e.match(/ucweb/i),o="android"==e.match(/android/i),a="windows ce"==e.match(/windows ce/i),s="windows mobile"==e.match(/windows mobile/i);return!(t||i||n||r||o||a||s)}function n$15(e,t,i,n){this.x=u$Z(e,0),this.y=u$Z(t,0),this.z=u$Z(i,0),this.w=u$Z(n,0)}s$Z.supportsFullscreen=function(){return l$1e.supportsFullscreen()},s$Z.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},s$Z.supportsWebWorkers=function(){return typeof Worker<"u"},s$Z.supportsWebAssembly=function(){return typeof WebAssembly<"u"&&!s$Z.isEdge()},s$Z.supportsOffscreenCanvas=function(){return typeof OffscreenCanvas<"u"&&!s$Z.isEdge()};var E$1m=new o$1p;n$15.fromAxisAngle=function(e,t,i){o$1q.typeOf.object("axis",e),o$1q.typeOf.number("angle",t);var n=t/2,r=Math.sin(n),o=(E$1m=o$1p.normalize(e,E$1m)).x*r,a=E$1m.y*r,s=E$1m.z*r,l=Math.cos(n);return e$2e(i)?(i.x=o,i.y=a,i.z=s,i.w=l,i):new n$15(o,a,s,l)};var G$1l=[1,2,0],J$13=new Array(3);n$15.fromRotationMatrix=function(e,t){o$1q.typeOf.object("matrix",e);var i,n,r,o,a,s=e[p$1e.COLUMN0ROW0],l=e[p$1e.COLUMN1ROW1],u=e[p$1e.COLUMN2ROW2],c=s+l+u;if(c>0)a=.5*(i=Math.sqrt(c+1)),i=.5/i,n=(e[p$1e.COLUMN1ROW2]-e[p$1e.COLUMN2ROW1])*i,r=(e[p$1e.COLUMN2ROW0]-e[p$1e.COLUMN0ROW2])*i,o=(e[p$1e.COLUMN0ROW1]-e[p$1e.COLUMN1ROW0])*i;else{var h=G$1l,d=0;l>s&&(d=1),u>s&&u>l&&(d=2);var f=h[d],p=h[f];i=Math.sqrt(e[p$1e.getElementIndex(d,d)]-e[p$1e.getElementIndex(f,f)]-e[p$1e.getElementIndex(p,p)]+1);var _=J$13;_[d]=.5*i,i=.5/i,a=(e[p$1e.getElementIndex(p,f)]-e[p$1e.getElementIndex(f,p)])*i,_[f]=(e[p$1e.getElementIndex(f,d)]+e[p$1e.getElementIndex(d,f)])*i,_[p]=(e[p$1e.getElementIndex(p,d)]+e[p$1e.getElementIndex(d,p)])*i,n=-_[0],r=-_[1],o=-_[2]}return e$2e(t)?(t.x=n,t.y=r,t.z=o,t.w=a,t):new n$15(n,r,o,a)};var Y$V=new n$15,Z$19=new n$15,I$1r=new n$15,k$16=new n$15;n$15.fromHeadingPitchRoll=function(e,t){return o$1q.typeOf.object("headingPitchRoll",e),k$16=n$15.fromAxisAngle(o$1p.UNIT_X,e.roll,Y$V),I$1r=n$15.fromAxisAngle(o$1p.UNIT_Y,-e.pitch,t),t=n$15.multiply(I$1r,k$16,I$1r),Z$19=n$15.fromAxisAngle(o$1p.UNIT_Z,-e.heading,Y$V),n$15.multiply(Z$19,t,t)};var g$1f=new o$1p,U$1b=new o$1p,i$13=new n$15,H$19=new n$15,C$1e=new n$15;n$15.packedLength=4,n$15.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},n$15.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new n$15),i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3],i},n$15.packedInterpolationLength=3,n$15.convertPackedArrayForInterpolation=function(e,t,i,n){n$15.unpack(e,4*i,C$1e),n$15.conjugate(C$1e,C$1e);for(var r=0,o=i-t+1;r<o;r++){var a=3*r;n$15.unpack(e,4*(t+r),i$13),n$15.multiply(i$13,C$1e,i$13),i$13.w<0&&n$15.negate(i$13,i$13),n$15.computeAxis(i$13,g$1f);var s=n$15.computeAngle(i$13);n[a]=g$1f.x*s,n[a+1]=g$1f.y*s,n[a+2]=g$1f.z*s}},n$15.unpackInterpolationResult=function(e,t,i,n,r){e$2e(r)||(r=new n$15),o$1p.fromArray(e,0,U$1b);var o=o$1p.magnitude(U$1b);return n$15.unpack(t,4*n,H$19),0===o?n$15.clone(n$15.IDENTITY,i$13):n$15.fromAxisAngle(U$1b,o,i$13),n$15.multiply(i$13,H$19,r)},n$15.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new n$15(e.x,e.y,e.z,e.w)},n$15.conjugate=function(e,t){return o$1q.typeOf.object("quaternion",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},n$15.magnitudeSquared=function(e){return o$1q.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},n$15.magnitude=function(e){return Math.sqrt(n$15.magnitudeSquared(e))},n$15.normalize=function(e,t){o$1q.typeOf.object("result",t);var i=1/n$15.magnitude(e),n=e.x*i,r=e.y*i,o=e.z*i,a=e.w*i;return t.x=n,t.y=r,t.z=o,t.w=a,t},n$15.inverse=function(e,t){o$1q.typeOf.object("result",t);var i=n$15.magnitudeSquared(e);return t=n$15.conjugate(e,t),n$15.multiplyByScalar(t,1/i,t)},n$15.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},n$15.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},n$15.negate=function(e,t){return o$1q.typeOf.object("quaternion",e),o$1q.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},n$15.dot=function(e,t){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},n$15.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e.x,r=e.y,o=e.z,a=e.w,s=t.x,l=t.y,u=t.z,c=t.w,h=a*s+n*c+r*u-o*l,d=a*l-n*u+r*c+o*s,f=a*u+n*l-r*s+o*c,p=a*c-n*s-r*l-o*u;return i.x=h,i.y=d,i.z=f,i.w=p,i},n$15.multiplyByVec=function(e,t,i){var n=new o$1p,r=new o$1p,o=new o$1p(e.x,e.y,e.z);n=o$1p.cross(o,t,n),r=o$1p.cross(o,n,r);var a=new o$1p;a=o$1p.multiplyByScalar(n,2*e.w,a);var s=new o$1p;return s=o$1p.multiplyByScalar(n,2,s),i=o$1p.add(t,a,i),i=o$1p.add(i,s,i)},n$15.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("quaternion",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},n$15.divideByScalar=function(e,t,i){return o$1q.typeOf.object("quaternion",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},n$15.computeAxis=function(e,t){o$1q.typeOf.object("quaternion",e),o$1q.typeOf.object("result",t);var i=e.w;if(Math.abs(i-1)<e$2d.EPSILON6)return t.x=t.y=t.z=0,t;var n=1/Math.sqrt(1-i*i);return t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t},n$15.computeAngle=function(e){return o$1q.typeOf.object("quaternion",e),Math.abs(e.w-1)<e$2d.EPSILON6?0:2*Math.acos(e.w)};var W$19=new n$15;n$15.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),W$19=n$15.multiplyByScalar(t,i,W$19),n=n$15.multiplyByScalar(e,1-i,n),n$15.add(W$19,n,n)};var X$12=new n$15,D$16=new n$15,F$1c=new n$15;n$15.slerp=function(e,t,i,n){o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n);var r=n$15.dot(e,t),o=t;if(r<0&&(r=-r,o=X$12=n$15.negate(t,X$12)),1-r<e$2d.EPSILON6)return n$15.lerp(e,o,i,n);var a=Math.acos(r);return D$16=n$15.multiplyByScalar(e,Math.sin((1-i)*a),D$16),F$1c=n$15.multiplyByScalar(o,Math.sin(i*a),F$1c),n=n$15.add(D$16,F$1c,n),n$15.multiplyByScalar(n,1/Math.sin(a),n)},n$15.log=function(e,t){o$1q.typeOf.object("quaternion",e),o$1q.typeOf.object("result",t);var i=e$2d.acosClamped(e.w),n=0;return 0!==i&&(n=i/Math.sin(i)),o$1p.multiplyByScalar(e,n,t)},n$15.exp=function(e,t){o$1q.typeOf.object("cartesian",e),o$1q.typeOf.object("result",t);var i=o$1p.magnitude(e),n=0;return 0!==i&&(n=Math.sin(i)/i),t.x=e.x*n,t.y=e.y*n,t.z=e.z*n,t.w=Math.cos(i),t};var K$$=new o$1p,$$13=new o$1p,N$Z=new n$15,l$1c=new n$15;n$15.computeInnerQuadrangle=function(e,t,i,n){o$1q.typeOf.object("q0",e),o$1q.typeOf.object("q1",t),o$1q.typeOf.object("q2",i),o$1q.typeOf.object("result",n);var r=n$15.conjugate(t,N$Z);n$15.multiply(r,i,l$1c);var o=n$15.log(l$1c,K$$);n$15.multiply(r,e,l$1c);var a=n$15.log(l$1c,$$13);return o$1p.add(o,a,o),o$1p.multiplyByScalar(o,.25,o),o$1p.negate(o,o),n$15.exp(o,N$Z),n$15.multiply(t,N$Z,n)},n$15.squad=function(e,t,i,n,r,o){o$1q.typeOf.object("q0",e),o$1q.typeOf.object("q1",t),o$1q.typeOf.object("s0",i),o$1q.typeOf.object("s1",n),o$1q.typeOf.number("t",r),o$1q.typeOf.object("result",o);var a=n$15.slerp(e,t,r,N$Z),s=n$15.slerp(i,n,r,l$1c);return n$15.slerp(a,s,2*r*(1-r),o)};for(var s$Y=new n$15,_$11=1.9011074535173003,B$14=s$Z.supportsTypedArrays()?new Float32Array(8):[],L$1f=s$Z.supportsTypedArrays()?new Float32Array(8):[],x$1f=s$Z.supportsTypedArrays()?new Float32Array(8):[],S$10=s$Z.supportsTypedArrays()?new Float32Array(8):[],Q$19=0;Q$19<7;++Q$19){var P$19=Q$19+1,V$14=2*P$19+1;B$14[Q$19]=1/(P$19*V$14),L$1f[Q$19]=P$19/V$14}B$14[7]=_$11/136,L$1f[7]=8*_$11/17,n$15.fastSlerp=function(e,t,i,n){o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n);var r,o=n$15.dot(e,t);o>=0?r=1:(r=-1,o=-o);for(var a=o-1,s=1-i,l=i*i,u=s*s,c=7;c>=0;--c)x$1f[c]=(B$14[c]*l-L$1f[c])*a,S$10[c]=(B$14[c]*u-L$1f[c])*a;var h=r*i*(1+x$1f[0]*(1+x$1f[1]*(1+x$1f[2]*(1+x$1f[3]*(1+x$1f[4]*(1+x$1f[5]*(1+x$1f[6]*(1+x$1f[7])))))))),d=s*(1+S$10[0]*(1+S$10[1]*(1+S$10[2]*(1+S$10[3]*(1+S$10[4]*(1+S$10[5]*(1+S$10[6]*(1+S$10[7])))))))),f=n$15.multiplyByScalar(e,d,s$Y);return n$15.multiplyByScalar(t,h,n),n$15.add(f,n,n)},n$15.fastSquad=function(e,t,i,n,r,o){o$1q.typeOf.object("q0",e),o$1q.typeOf.object("q1",t),o$1q.typeOf.object("s0",i),o$1q.typeOf.object("s1",n),o$1q.typeOf.number("t",r),o$1q.typeOf.object("result",o);var a=n$15.fastSlerp(e,t,r,N$Z),s=n$15.fastSlerp(i,n,r,l$1c);return n$15.fastSlerp(a,s,2*r*(1-r),o)},n$15.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},n$15.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e.x-t.x)<=i&&Math.abs(e.y-t.y)<=i&&Math.abs(e.z-t.z)<=i&&Math.abs(e.w-t.w)<=i},n$15.ZERO=Object.freeze(new n$15(0,0,0,0)),n$15.IDENTITY=Object.freeze(new n$15(0,0,0,1)),n$15.prototype.clone=function(e){return n$15.clone(this,e)},n$15.prototype.equals=function(e){return n$15.equals(this,e)},n$15.prototype.equalsEpsilon=function(e,t){return n$15.equalsEpsilon(this,e,t)},n$15.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var m$19={},B$13={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},O$T={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Y$U={},y$$={east:new o$1p,north:new o$1p,up:new o$1p,west:new o$1p,south:new o$1p,down:new o$1p},x$1e=new o$1p,P$18=new o$1p,E$1l=new o$1p;m$19.localFrameToFixedFrameGenerator=function(e,t){if(!B$13.hasOwnProperty(e)||!B$13[e].hasOwnProperty(t))throw new t$15("firstAxis and secondAxis must be east, north, up, west, south or down.");var i,n=B$13[e][t],r=e+t;return e$2e(Y$U[r])?i=Y$U[r]:(i=function(i,r,o){if(!e$2e(i))throw new t$15("origin is required.");if(e$2e(o)||(o=new p$1d),o$1p.equalsEpsilon(i,o$1p.ZERO,e$2d.EPSILON14))o$1p.unpack(O$T[e],0,x$1e),o$1p.unpack(O$T[t],0,P$18),o$1p.unpack(O$T[n],0,E$1l);else if(e$2d.equalsEpsilon(i.x,0,e$2d.EPSILON14)&&e$2d.equalsEpsilon(i.y,0,e$2d.EPSILON14)){var a=e$2d.sign(i.z);o$1p.unpack(O$T[e],0,x$1e),"east"!==e&&"west"!==e&&o$1p.multiplyByScalar(x$1e,a,x$1e),o$1p.unpack(O$T[t],0,P$18),"east"!==t&&"west"!==t&&o$1p.multiplyByScalar(P$18,a,P$18),o$1p.unpack(O$T[n],0,E$1l),"east"!==n&&"west"!==n&&o$1p.multiplyByScalar(E$1l,a,E$1l)}else{(r=u$Z(r,t$12.WGS84)).geodeticSurfaceNormal(i,y$$.up);var s=y$$.up,l=y$$.east;l.x=-i.y,l.y=i.x,l.z=0,o$1p.normalize(l,y$$.east),o$1p.cross(s,l,y$$.north),o$1p.multiplyByScalar(y$$.up,-1,y$$.down),o$1p.multiplyByScalar(y$$.east,-1,y$$.west),o$1p.multiplyByScalar(y$$.north,-1,y$$.south),x$1e=y$$[e],P$18=y$$[t],E$1l=y$$[n]}return o[0]=x$1e.x,o[1]=x$1e.y,o[2]=x$1e.z,o[3]=0,o[4]=P$18.x,o[5]=P$18.y,o[6]=P$18.z,o[7]=0,o[8]=E$1l.x,o[9]=E$1l.y,o[10]=E$1l.z,o[11]=0,o[12]=i.x,o[13]=i.y,o[14]=i.z,o[15]=1,o},Y$U[r]=i),i},m$19.eastNorthUpToFixedFrame=m$19.localFrameToFixedFrameGenerator("east","north"),m$19.northEastDownToFixedFrame=m$19.localFrameToFixedFrameGenerator("north","east"),m$19.northUpEastToFixedFrame=m$19.localFrameToFixedFrameGenerator("north","up"),m$19.northWestUpToFixedFrame=m$19.localFrameToFixedFrameGenerator("north","west");var fa$5=new n$15,da$3=new o$1p(1,1,1),ua$5=new p$1d;m$19.headingPitchRollToFixedFrame=function(e,t,i,n,r){o$1q.typeOf.object("HeadingPitchRoll",t),n=u$Z(n,m$19.eastNorthUpToFixedFrame);var o=n$15.fromHeadingPitchRoll(t,fa$5),a=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,o,da$3,ua$5);return r=n(e,i,r),p$1d.multiply(r,a,r)};var ya$3=new p$1d,la$5=new p$1e;m$19.headingPitchRollQuaternion=function(e,t,i,n,r){o$1q.typeOf.object("HeadingPitchRoll",t);var o=m$19.headingPitchRollToFixedFrame(e,t,i,n,ya$3),a=p$1d.getMatrix3(o,la$5);return n$15.fromRotationMatrix(a,r)};var Ta$6=new o$1p(1,1,1),xa$4=new o$1p,aa$7=new p$1d,Pa$4=new p$1d,Ea$5=new p$1e,Sa$4=new n$15;m$19.fixedFrameToHeadingPitchRoll=function(e,t,i,n){o$1q.defined("transform",e),t=u$Z(t,t$12.WGS84),i=u$Z(i,m$19.eastNorthUpToFixedFrame),e$2e(n)||(n=new i$16);var r=p$1d.getTranslation(e,xa$4);if(o$1p.equals(r,o$1p.ZERO))return n.heading=0,n.pitch=0,n.roll=0,n;var o=p$1d.inverseTransformation(i(r,t,aa$7),aa$7),a=p$1d.setScale(e,Ta$6,Pa$4);a=p$1d.setTranslation(a,o$1p.ZERO,a),o=p$1d.multiply(o,a,o);var s=n$15.fromRotationMatrix(p$1d.getMatrix3(o,Ea$5),Sa$4);return s=n$15.normalize(s,s),i$16.fromQuaternion(s,n)};var Fa$6=24110.54841,Ca$4=8640184.812866,Ma$5=.093104,Oa$5=-62e-7,Na$5=11772758384668e-32,Ra$7=72921158553e-15,Da$7=e$2d.TWO_PI/86400,q$1d=new a$15;m$19.computeTemeToPseudoFixedMatrix=function(e,t){if(!e$2e(e))throw new t$15("date is required.");var i,n=(q$1d=a$15.addSeconds(e,-a$15.computeTaiMinusUtc(e),q$1d)).dayNumber,r=q$1d.secondsOfDay,o=n-2451545;i=r>=43200?(o+.5)/h$17.DAYS_PER_JULIAN_CENTURY:(o-.5)/h$17.DAYS_PER_JULIAN_CENTURY;var a=(Fa$6+i*(Ca$4+i*(Ma$5+i*Oa$5)))*Da$7%e$2d.TWO_PI+(Ra$7+Na$5*(n-2451545.5))*((r+.5*h$17.SECONDS_PER_DAY)%h$17.SECONDS_PER_DAY),s=Math.cos(a),l=Math.sin(a);return e$2e(t)?(t[0]=s,t[1]=-l,t[2]=0,t[3]=l,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new p$1e(s,l,0,-l,s,0,0,0,1)},m$19.iau2006XysData=new D$17,m$19.earthOrientationParameters=x$1h.NONE;var H$18=32.184,ga$5=2451545;m$19.preloadIcrfFixed=function(e){var t=e.start.dayNumber,i=e.start.secondsOfDay+H$18,n=e.stop.dayNumber,r=e.stop.secondsOfDay+H$18,o=m$19.iau2006XysData.preload(t,i,n,r),a=m$19.earthOrientationParameters.getPromiseToLoad();return o$1l.all([o,a])},m$19.computeIcrfToFixedMatrix=function(e,t){if(!e$2e(e))throw new t$15("date is required.");e$2e(t)||(t=new p$1e);var i=m$19.computeFixedToIcrfMatrix(e,t);if(e$2e(i))return p$1e.transpose(i,t)};var Ua$7=new a$10(0,0,0),_a$5=new n$1c(0,0,0,0,0,0),Q$18=new p$1e,Z$18=new p$1e;m$19.computeFixedToIcrfMatrix=function(e,t){if(!e$2e(e))throw new t$15("date is required.");e$2e(t)||(t=new p$1e);var i=m$19.earthOrientationParameters.compute(e,_a$5);if(e$2e(i)){var n=e.dayNumber,r=e.secondsOfDay+H$18,o=m$19.iau2006XysData.computeXysRadians(n,r,Ua$7);if(e$2e(o)){var a=o.x+i.xPoleOffset,s=o.y+i.yPoleOffset,l=1/(1+Math.sqrt(1-a*a-s*s)),u=Q$18;u[0]=1-l*a*a,u[3]=-l*a*s,u[6]=a,u[1]=-l*a*s,u[4]=1-l*s*s,u[7]=s,u[2]=-a,u[5]=-s,u[8]=1-l*(a*a+s*s);var c=p$1e.fromRotationZ(-o.s,Z$18),h=p$1e.multiply(u,c,Q$18),d=e.dayNumber-2451545,f=(e.secondsOfDay-a$15.computeTaiMinusUtc(e)+i.ut1MinusUtc)/h$17.SECONDS_PER_DAY,p=.779057273264+f+.00273781191135448*(d+f);p=p%1*e$2d.TWO_PI;var _=p$1e.fromRotationZ(p,Z$18),m=p$1e.multiply(h,_,Q$18),g=Math.cos(i.xPoleWander),x=Math.cos(i.yPoleWander),y=Math.sin(i.xPoleWander),v=Math.sin(i.yPoleWander),$=n-ga$5+r/h$17.SECONDS_PER_DAY,b=-47e-6*($/=36525)*e$2d.RADIANS_PER_DEGREE/3600,T=Math.cos(b),C=Math.sin(b),S=Z$18;return S[0]=g*T,S[1]=g*C,S[2]=y,S[3]=-x*C+v*y*T,S[4]=x*T+v*y*C,S[5]=-v*g,S[6]=-v*C-x*y*T,S[7]=v*T-x*y*C,S[8]=x*g,p$1e.multiply(m,S,t)}}};var Ia$6=new e$2c;m$19.pointToWindowCoordinates=function(e,t,i,n){return(n=m$19.pointToGLWindowCoordinates(e,t,i,n)).y=2*t[5]-n.y,n},m$19.pointToGLWindowCoordinates=function(e,t,i,n){if(!e$2e(e))throw new t$15("modelViewProjectionMatrix is required.");if(!e$2e(t))throw new t$15("viewportTransformation is required.");if(!e$2e(i))throw new t$15("point is required.");e$2e(n)||(n=new o$1o);var r=Ia$6;return p$1d.multiplyByVector(e,e$2c.fromElements(i.x,i.y,i.z,1,r),r),e$2c.multiplyByScalar(r,1/r.w,r),p$1d.multiplyByVector(t,r,r),o$1o.fromCartesian4(r,n)};var za$5=new o$1p,qa$6=new o$1p,Wa$4=new o$1p;m$19.rotationMatrixFromPositionVelocity=function(e,t,i,n){if(!e$2e(e))throw new t$15("position is required.");if(!e$2e(t))throw new t$15("velocity is required.");var r=u$Z(i,t$12.WGS84).geodeticSurfaceNormal(e,za$5),o=o$1p.cross(t,r,qa$6);o$1p.equalsEpsilon(o,o$1p.ZERO,e$2d.EPSILON6)&&(o=o$1p.clone(o$1p.UNIT_X,o));var a=o$1p.cross(o,t,Wa$4);return o$1p.normalize(a,a),o$1p.cross(t,a,o),o$1p.negate(o,o),o$1p.normalize(o,o),e$2e(n)||(n=new p$1e),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=o.x,n[4]=o.y,n[5]=o.z,n[6]=a.x,n[7]=a.y,n[8]=a.z,n};var ra$8=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),oa$6=new a$18,ta$6=new o$1p,ba$3=new o$1p,Ga$6=new p$1e,k$15=new p$1d,ea$8=new p$1d;m$19.basisTo2D=function(e,t,i){if(!e$2e(e))throw new t$15("projection is required.");if(!e$2e(t))throw new t$15("matrix is required.");if(!e$2e(i))throw new t$15("result is required.");var n=p$1d.getTranslation(t,ba$3),r=e.ellipsoid,o=r.cartesianToCartographic(n,oa$6),a=e.project(o,ta$6);o$1p.fromElements(a.z,a.x,a.y,a);var s=m$19.eastNorthUpToFixedFrame(n,r,k$15),l=p$1d.inverseTransformation(s,ea$8),u=p$1d.getMatrix3(t,Ga$6),c=p$1d.multiplyByMatrix3(l,u,i);return p$1d.multiply(ra$8,c,i),p$1d.setTranslation(i,a,i),i},m$19.wgs84To2DModelMatrix=function(e,t,i){if(!e$2e(e))throw new t$15("projection is required.");if(!e$2e(t))throw new t$15("center is required.");if(!e$2e(i))throw new t$15("result is required.");var n=e.ellipsoid,r=m$19.eastNorthUpToFixedFrame(t,n,k$15),o=p$1d.inverseTransformation(r,ea$8),a=n.cartesianToCartographic(t,oa$6),s=e.project(a,ta$6);o$1p.fromElements(s.z,s.x,s.y,s);var l=p$1d.fromTranslation(s,k$15);return p$1d.multiply(ra$8,o,i),p$1d.multiply(l,i,i),i},m$19.buildUp=function(e,t){var i=t.clone(),n=e.clone();n=o$1p.normalize(n,n),Math.abs(o$1p.dot(n,i))>=1&&(n=Math.abs(o$1p.dot(i,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,n):o$1p.clone(o$1p.UNIT_Z,n));var r=new o$1p;return o$1p.cross(n,i,r),r=o$1p.normalize(r,r),o$1p.cross(i,r,n),n=o$1p.normalize(n,n)},m$19.getHeading=function(e,t){var i;return i=e$2d.equalsEpsilon(Math.abs(e.z),1,e$2d.EPSILON3)?Math.atan2(t.y,t.x)-e$2d.PI_OVER_TWO:Math.atan2(e.y,e.x)-e$2d.PI_OVER_TWO,e$2d.TWO_PI-e$2d.zeroToTwoPi(i)},m$19.convertToColumbusCartesian=function(e){var t=new n$1d,i=t.ellipsoid,n=new o$1p,r=new a$18;return i.cartesianToCartographic(e,r),t.project(r,n),o$1p.fromElements(n.z,n.x,n.y)},m$19.convertTo3DCartesian=function(e){var t=new n$1d,i=t.ellipsoid,n=new o$1p,r=new a$18;return n=o$1p.fromElements(e.y,e.z,e.x),t.unproject(n,r),i.cartographicToCartesian(r,n)};var l$1b=new e$2c;function f$16(e,t){if(o$1q.defined("origin",e),!e$2e(e=(t=u$Z(t,t$12.WGS84)).scaleToGeodeticSurface(e)))throw new t$15("origin must not be at the center of the ellipsoid.");var i=m$19.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=o$1p.fromCartesian4(p$1d.getColumn(i,0,l$1b)),this._yAxis=o$1p.fromCartesian4(p$1d.getColumn(i,1,l$1b));var n=o$1p.fromCartesian4(p$1d.getColumn(i,2,l$1b));this._plane=o$1m.fromPointNormal(e,n)}Object.defineProperties(f$16.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var w$15=new e$29;f$16.fromPoints=function(e,t){return o$1q.defined("cartesians",e),new f$16(e$29.fromPoints(e,w$15).center,t)};var x$1d=new f$19,m$18=new o$1p;f$16.prototype.projectPointOntoPlane=function(e,t){o$1q.defined("cartesian",e);var i=x$1d;i.origin=e,o$1p.normalize(e,i.direction);var n=g$1j.rayPlane(i,this._plane,m$18);if(e$2e(n)||(o$1p.negate(i.direction,i.direction),n=g$1j.rayPlane(i,this._plane,m$18)),e$2e(n)){var r=o$1p.subtract(n,this._origin,n),o=o$1p.dot(this._xAxis,r),a=o$1p.dot(this._yAxis,r);return e$2e(t)?(t.x=o,t.y=a,t):new o$1o(o,a)}},f$16.prototype.projectPointsOntoPlane=function(e,t){o$1q.defined("cartesians",e),e$2e(t)||(t=[]);for(var i=0,n=e.length,r=0;r<n;r++){var o=this.projectPointOntoPlane(e[r],t[i]);e$2e(o)&&(t[i]=o,i++)}return t.length=i,t},f$16.prototype.projectPointToNearestOnPlane=function(e,t){o$1q.defined("cartesian",e),e$2e(t)||(t=new o$1o);var i=x$1d;i.origin=e,o$1p.clone(this._plane.normal,i.direction);var n=g$1j.rayPlane(i,this._plane,m$18);e$2e(n)||(o$1p.negate(i.direction,i.direction),n=g$1j.rayPlane(i,this._plane,m$18));var r=o$1p.subtract(n,this._origin,n),o=o$1p.dot(this._xAxis,r),a=o$1p.dot(this._yAxis,r);return t.x=o,t.y=a,t},f$16.prototype.projectPointsToNearestOnPlane=function(e,t){o$1q.defined("cartesians",e),e$2e(t)||(t=[]);var i=e.length;t.length=i;for(var n=0;n<i;n++)t[n]=this.projectPointToNearestOnPlane(e[n],t[n]);return t};var C$1d=new o$1p;f$16.prototype.projectPointOntoEllipsoid=function(e,t){o$1q.defined("cartesian",e),e$2e(t)||(t=new o$1p);var i=this._ellipsoid,n=this._origin,r=this._xAxis,o=this._yAxis,a=C$1d;return o$1p.multiplyByScalar(r,e.x,a),t=o$1p.add(n,a,t),o$1p.multiplyByScalar(o,e.y,a),o$1p.add(t,a,t),i.scaleToGeocentricSurface(t,t),t},f$16.prototype.projectPointsOntoEllipsoid=function(e,t){o$1q.defined("cartesians",e);var i=e.length;e$2e(t)?t.length=i:t=new Array(i);for(var n=0;n<i;++n)t[n]=this.projectPointOntoEllipsoid(e[n],t[n]);return t};var e$21={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},Me$s=Object.freeze(e$21);function f$15(e,t,i,n){this[0]=u$Z(e,0),this[1]=u$Z(i,0),this[2]=u$Z(t,0),this[3]=u$Z(n,0)}f$15.packedLength=4,f$15.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t},f$15.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new f$15),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i},f$15.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new f$15(e[0],e[2],e[1],e[3])},f$15.fromArray=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new f$15),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i},f$15.fromColumnMajorArray=function(e,t){return o$1q.defined("values",e),f$15.clone(e,t)},f$15.fromRowMajorArray=function(e,t){return o$1q.defined("values",e),e$2e(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new f$15(e[0],e[1],e[2],e[3])},f$15.fromScale=function(e,t){return o$1q.typeOf.object("scale",e),e$2e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new f$15(e.x,0,0,e.y)},f$15.fromUniformScale=function(e,t){return o$1q.typeOf.number("scale",e),e$2e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new f$15(e,0,0,e)},f$15.fromRotation=function(e,t){o$1q.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return e$2e(t)?(t[0]=i,t[1]=n,t[2]=-n,t[3]=i,t):new f$15(i,-n,n,i)},f$15.toArray=function(e,t){return o$1q.typeOf.object("matrix",e),e$2e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},f$15.getElementIndex=function(e,t){return o$1q.typeOf.number.greaterThanOrEquals("row",t,0),o$1q.typeOf.number.lessThanOrEquals("row",t,1),o$1q.typeOf.number.greaterThanOrEquals("column",e,0),o$1q.typeOf.number.lessThanOrEquals("column",e,1),2*e+t},f$15.getColumn=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,1),o$1q.typeOf.object("result",i);var n=2*t,r=e[n],o=e[n+1];return i.x=r,i.y=o,i},f$15.setColumn=function(e,t,i,n){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,1),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n);var r=2*t;return(n=f$15.clone(e,n))[r]=i.x,n[r+1]=i.y,n},f$15.getRow=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,1),o$1q.typeOf.object("result",i);var n=e[t],r=e[t+2];return i.x=n,i.y=r,i},f$15.setRow=function(e,t,i,n){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number.greaterThanOrEquals("index",t,0),o$1q.typeOf.number.lessThanOrEquals("index",t,1),o$1q.typeOf.object("cartesian",i),o$1q.typeOf.object("result",n),(n=f$15.clone(e,n))[t]=i.x,n[t+2]=i.y,n};var u$U=new o$1o;f$15.getScale=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t.x=o$1o.magnitude(o$1o.fromElements(e[0],e[1],u$U)),t.y=o$1o.magnitude(o$1o.fromElements(e[2],e[3],u$U)),t};var w$14=new o$1o;f$15.getMaximumScale=function(e){return f$15.getScale(e,w$14),o$1o.maximumComponent(w$14)},f$15.multiply=function(e,t,i){o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i);var n=e[0]*t[0]+e[2]*t[1],r=e[0]*t[2]+e[2]*t[3],o=e[1]*t[0]+e[3]*t[1],a=e[1]*t[2]+e[3]*t[3];return i[0]=n,i[1]=o,i[2]=r,i[3]=a,i},f$15.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i},f$15.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i},f$15.multiplyByVector=function(e,t,i){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("cartesian",t),o$1q.typeOf.object("result",i);var n=e[0]*t.x+e[2]*t.y,r=e[1]*t.x+e[3]*t.y;return i.x=n,i.y=r,i},f$15.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i},f$15.multiplyByScale=function(e,t,i){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("scale",t),o$1q.typeOf.object("result",i),i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.y,i[3]=e[3]*t.y,i},f$15.negate=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},f$15.transpose=function(e,t){o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t);var i=e[0],n=e[2],r=e[1],o=e[3];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t},f$15.abs=function(e,t){return o$1q.typeOf.object("matrix",e),o$1q.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},f$15.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},f$15.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]},f$15.equalsEpsilon=function(e,t,i){return o$1q.typeOf.number("epsilon",i),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i},f$15.IDENTITY=Object.freeze(new f$15(1,0,0,1)),f$15.ZERO=Object.freeze(new f$15(0,0,0,0)),f$15.COLUMN0ROW0=0,f$15.COLUMN0ROW1=1,f$15.COLUMN1ROW0=2,f$15.COLUMN1ROW1=3,Object.defineProperties(f$15.prototype,{length:{get:function(){return f$15.packedLength}}}),f$15.prototype.clone=function(e){return f$15.clone(this,e)},f$15.prototype.equals=function(e){return f$15.equals(this,e)},f$15.prototype.equalsEpsilon=function(e,t){return f$15.equalsEpsilon(this,e,t)},f$15.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"};var I$1q={POINTS:de$y.POINTS,LINES:de$y.LINES,LINE_LOOP:de$y.LINE_LOOP,LINE_STRIP:de$y.LINE_STRIP,TRIANGLES:de$y.TRIANGLES,TRIANGLE_STRIP:de$y.TRIANGLE_STRIP,TRIANGLE_FAN:de$y.TRIANGLE_FAN,validate:function(e){return e===I$1q.POINTS||e===I$1q.LINES||e===I$1q.LINE_LOOP||e===I$1q.LINE_STRIP||e===I$1q.TRIANGLES||e===I$1q.TRIANGLE_STRIP||e===I$1q.TRIANGLE_FAN}},W$18=Object.freeze(I$1q);function I$1p(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.typeOf.object("options.attributes",e.attributes),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=u$Z(e.primitiveType,W$18.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=u$Z(e.geometryType,Me$s.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}I$1p.computeNumberOfVertices=function(e){o$1q.typeOf.object("geometry",e);var t=-1;for(var i in e.attributes)if(e.attributes.hasOwnProperty(i)&&e$2e(e.attributes[i])&&e$2e(e.attributes[i].values)){var n=e.attributes[i];if(n.isInstanceAttribute)continue;var r=n.values.length/n.componentsPerAttribute;if(t!==r&&-1!==t)throw new t$15("All attribute lists must have the same number of attributes.");t=r}return t};var R$15=new a$18,W$17=new o$1p,P$17=new p$1d,Z$17=[new a$18,new a$18,new a$18],q$1c=[new o$1o,new o$1o,new o$1o],z$11=[new o$1o,new o$1o,new o$1o],D$15=new o$1p,K$_=new n$15,$$12=new p$1d,rr$d=new f$15;function o$1c(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).componentDatatype))throw new t$15("options.componentDatatype is required.");if(!e$2e(e.componentsPerAttribute))throw new t$15("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new t$15("options.componentsPerAttribute must be between 1 and 4.");if(!e$2e(e.values))throw new t$15("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=u$Z(e.normalize,!1),this.values=e.values}function d$1o(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).geometry))throw new t$15("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=u$Z(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}I$1p._textureCoordinateRotationPoints=function(e,t,i,n){var r,o=h$18.center(n,R$15),a=a$18.toCartesian(o,i,W$17),s=m$19.eastNorthUpToFixedFrame(a,i,P$17),l=p$1d.inverse(s,P$17),u=q$1c,c=Z$17;c[0].longitude=n.west,c[0].latitude=n.south,c[1].longitude=n.west,c[1].latitude=n.north,c[2].longitude=n.east,c[2].latitude=n.south;var h=D$15;for(r=0;r<3;r++)a$18.toCartesian(c[r],i,h),h=p$1d.multiplyByPointAsVector(l,h,h),u[r].x=h.x,u[r].y=h.y;var d=n$15.fromAxisAngle(o$1p.UNIT_Z,-t,K$_),f=p$1e.fromQuaternion(d,$$12),p=e.length,_=Number.POSITIVE_INFINITY,m=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(r=0;r<p;r++)h=p$1d.multiplyByPointAsVector(l,e[r],h),h=p$1e.multiplyByVector(f,h,h),_=Math.min(_,h.x),m=Math.min(m,h.y),g=Math.max(g,h.x),x=Math.max(x,h.y);var y=f$15.fromRotation(t,rr$d),v=z$11;v[0].x=_,v[0].y=m,v[1].x=_,v[1].y=x,v[2].x=g,v[2].y=m;var $=u[0],b=u[2].x-$.x,T=u[1].y-$.y;for(r=0;r<3;r++){var C=v[r];f$15.multiplyByVector(y,C,C),C.x=(C.x-$.x)/b,C.y=(C.y-$.y)/T}var S=v[0],w=v[1],E=v[2],P=new Array(6);return o$1o.pack(S,P),o$1o.pack(w,P,2),o$1o.pack(E,P,4),P};var e$20={NONE:0,TOP:1,ALL:2},_0x39c22a=Object.freeze(e$20),F$1b=1/256,M$1a=256,t$$={octEncodeInRange:function(e,t,i){o$1q.defined("vector",e),o$1q.defined("result",i);var n=o$1p.magnitudeSquared(e);if(Math.abs(n-1)>e$2d.EPSILON6)throw new t$15("vector must be normalized.");if(i.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),i.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){var r=i.x,o=i.y;i.x=(1-Math.abs(o))*e$2d.signNotZero(r),i.y=(1-Math.abs(r))*e$2d.signNotZero(o)}return i.x=e$2d.toSNorm(i.x,t),i.y=e$2d.toSNorm(i.y,t),i},octEncode:function(e,t){return t$$.octEncodeInRange(e,255,t)}},y$_=new o$1o,w$13=new Uint8Array(1);function h$14(e){return w$13[0]=e,w$13[0]}t$$.octEncodeToCartesian4=function(e,t){return t$$.octEncodeInRange(e,65535,y$_),t.x=h$14(y$_.x*F$1b),t.y=h$14(y$_.x),t.z=h$14(y$_.y*F$1b),t.w=h$14(y$_.y),t},t$$.octDecodeInRange=function(e,t,i,n){if(o$1q.defined("result",n),e<0||e>i||t<0||t>i)throw new t$15("x and y must be unsigned normalized integers between 0 and "+i);if(n.x=e$2d.fromSNorm(e,i),n.y=e$2d.fromSNorm(t,i),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){var r=n.x;n.x=(1-Math.abs(n.y))*e$2d.signNotZero(r),n.y=(1-Math.abs(r))*e$2d.signNotZero(n.y)}return o$1p.normalize(n,n)},t$$.octDecode=function(e,t,i){return t$$.octDecodeInRange(e,t,255,i)},t$$.octDecodeFromCartesian4=function(e,t){o$1q.typeOf.object("encoded",e),o$1q.typeOf.object("result",t);var i=e.x,n=e.y,r=e.z,o=e.w;if(i<0||i>255||n<0||n>255||r<0||r>255||o<0||o>255)throw new t$15("x, y, z, and w must be unsigned normalized integers between 0 and 255");var a=i*M$1a+n,s=r*M$1a+o;return t$$.octDecodeInRange(a,s,65535,t)},t$$.octPackFloat=function(e){return o$1q.defined("encoded",e),256*e.x+e.y};var b$1d=new o$1o;function g$1e(e){return e>>1^-(1&e)}t$$.octEncodeFloat=function(e){return t$$.octEncode(e,b$1d),t$$.octPackFloat(b$1d)},t$$.octDecodeFloat=function(e,t){o$1q.defined("value",e);var i=e/256,n=Math.floor(i),r=256*(i-n);return t$$.octDecode(n,r,t)},t$$.octPack=function(e,t,i,n){o$1q.defined("v1",e),o$1q.defined("v2",t),o$1q.defined("v3",i),o$1q.defined("result",n);var r=t$$.octEncodeFloat(e),o=t$$.octEncodeFloat(t),a=t$$.octEncode(i,b$1d);return n.x=65536*a.x+r,n.y=65536*a.y+o,n},t$$.octUnpack=function(e,t,i,n){o$1q.defined("packed",e),o$1q.defined("v1",t),o$1q.defined("v2",i),o$1q.defined("v3",n);var r=e.x/65536,o=Math.floor(r),a=65536*(r-o);r=e.y/65536;var s=Math.floor(r),l=65536*(r-s);t$$.octDecodeFloat(a,t),t$$.octDecodeFloat(l,i),t$$.octDecode(o,s,n)},t$$.compressTextureCoordinates=function(e){return o$1q.defined("textureCoordinates",e),4096*(4095*e.x|0)+(4095*e.y|0)},t$$.decompressTextureCoordinates=function(e,t){o$1q.defined("compressed",e),o$1q.defined("result",t);var i=e/4096,n=Math.floor(i);return t.x=n/4095,t.y=(e-4096*n)/4095,t},t$$.zigZagDeltaDecode=function(e,t,i){o$1q.defined("uBuffer",e),o$1q.defined("vBuffer",t),o$1q.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),e$2e(i)&&o$1q.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,i.length);for(var n=e.length,r=0,o=0,a=0,s=0;s<n;++s)r+=g$1e(e[s]),o+=g$1e(t[s]),e[s]=r,t[s]=o,e$2e(i)&&(a+=g$1e(i[s]),i[s]=a)},t$$.octShortToFloat=function(e){return e$2d.clamp(3051850947599719e-20*e,-1,1)},t$$.octShortDecode=function(e,t,i){if(o$1q.defined("result",i),i.x=t$$.octShortToFloat(e),i.y=t$$.octShortToFloat(t),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){var n=i.x;i.x=(1-Math.abs(i.y))*e$2d.signNotZero(n),i.y=(1-Math.abs(n))*e$2d.signNotZero(i.y)}return o$1p.normalize(i,i)};var L$1e=new o$1p,O$S=new o$1p,P$16=new o$1p;function S$$(e,t,i,n,r){var o,a,s,l,u,c,h,d;if(o$1q.defined("point",e),o$1q.defined("p0",t),o$1q.defined("p1",i),o$1q.defined("p2",n),e$2e(r)||(r=new o$1p),e$2e(t.z)){if(o$1p.equalsEpsilon(e,t,e$2d.EPSILON14))return o$1p.clone(o$1p.UNIT_X,r);if(o$1p.equalsEpsilon(e,i,e$2d.EPSILON14))return o$1p.clone(o$1p.UNIT_Y,r);if(o$1p.equalsEpsilon(e,n,e$2d.EPSILON14))return o$1p.clone(o$1p.UNIT_Z,r);o=o$1p.subtract(i,t,L$1e),a=o$1p.subtract(n,t,O$S),s=o$1p.subtract(e,t,P$16),l=o$1p.dot(o,o),u=o$1p.dot(o,a),c=o$1p.dot(o,s),h=o$1p.dot(a,a),d=o$1p.dot(a,s)}else{if(o$1o.equalsEpsilon(e,t,e$2d.EPSILON14))return o$1p.clone(o$1p.UNIT_X,r);if(o$1o.equalsEpsilon(e,i,e$2d.EPSILON14))return o$1p.clone(o$1p.UNIT_Y,r);if(o$1o.equalsEpsilon(e,n,e$2d.EPSILON14))return o$1p.clone(o$1p.UNIT_Z,r);o=o$1o.subtract(i,t,L$1e),a=o$1o.subtract(n,t,O$S),s=o$1o.subtract(e,t,P$16),l=o$1o.dot(o,o),u=o$1o.dot(o,a),c=o$1o.dot(o,s),h=o$1o.dot(a,a),d=o$1o.dot(a,s)}r.y=h*c-u*d,r.z=l*d-u*c;var f=l*h-u*u;return 0!==r.y&&(r.y/=f),0!==r.z&&(r.z/=f),r.x=1-r.y-r.z,r}function i$12(){this.high=o$1p.clone(o$1p.ZERO),this.low=o$1p.clone(o$1p.ZERO)}i$12.encode=function(e,t){var i;return o$1q.typeOf.number("value",e),e$2e(t)||(t={high:0,low:0}),e>=0?(i=65536*Math.floor(e/65536),t.high=i,t.low=e-i):(i=65536*Math.floor(-e/65536),t.high=-i,t.low=e+i),t};var n$14={high:0,low:0};i$12.fromCartesian=function(e,t){o$1q.typeOf.object("cartesian",e),e$2e(t)||(t=new i$12);var i=t.high,n=t.low;return i$12.encode(e.x,n$14),i.x=n$14.high,n.x=n$14.low,i$12.encode(e.y,n$14),i.y=n$14.high,n.y=n$14.low,i$12.encode(e.z,n$14),i.z=n$14.high,n.z=n$14.low,t};var t$_=new i$12;i$12.writeElements=function(e,t,i){o$1q.defined("cartesianArray",t),o$1q.typeOf.number("index",i),o$1q.typeOf.number.greaterThanOrEquals("index",i,0),i$12.fromCartesian(e,t$_);var n=t$_.high,r=t$_.low;t[i]=n.x,t[i+1]=n.y,t[i+2]=n.z,t[i+3]=r.x,t[i+4]=r.y,t[i+5]=r.z};var r$18={UNSIGNED_BYTE:de$y.UNSIGNED_BYTE,UNSIGNED_SHORT:de$y.UNSIGNED_SHORT,UNSIGNED_INT:de$y.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case r$18.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r$18.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r$18.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t$15("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return r$18.UNSIGNED_SHORT;case 4:return r$18.UNSIGNED_INT;case 1:return r$18.UNSIGNED_BYTE;default:throw new t$15("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return e$2e(e)&&(e===r$18.UNSIGNED_BYTE||e===r$18.UNSIGNED_SHORT||e===r$18.UNSIGNED_INT)},createTypedArray:function(e,t){if(!e$2e(e))throw new t$15("numberOfVertices is required.");return e>=e$2d.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,i,n){if(!e$2e(e))throw new t$15("numberOfVertices is required.");if(!e$2e(t))throw new t$15("sourceArray is required.");if(!e$2e(i))throw new t$15("byteOffset is required.");return e>=e$2d.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,i,n):new Uint16Array(t,i,n)}},ce$z=Object.freeze(r$18),D$14={calculateACMR:function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).indices,i=e.maximumIndex,n=u$Z(e.cacheSize,24);if(!e$2e(t))throw new t$15("indices is required.");var r=t.length;if(r<3||r%3!=0)throw new t$15("indices length must be a multiple of three.");if(i<=0)throw new t$15("maximumIndex must be greater than zero.");if(n<3)throw new t$15("cacheSize must be greater than two.");if(!e$2e(i)){i=0;for(var o=0,a=t[o];o<r;)a>i&&(i=a),a=t[++o]}for(var s=[],l=0;l<i+1;l++)s[l]=0;for(var u=n+1,c=0;c<r;++c)u-s[t[c]]>n&&(s[t[c]]=u,++u);return(u-n+1)/(r/3)}};D$14.tipsify=function(e){var t,i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).indices,n=e.maximumIndex,r=u$Z(e.cacheSize,24);function o(e,i,n,r,o,a,s){for(var l,u=-1,c=-1,h=0;h<n.length;){var d=n[h];r[d].numLiveTriangles&&(l=0,o-r[d].timeStamp+2*r[d].numLiveTriangles<=i&&(l=o-r[d].timeStamp),(l>c||-1===c)&&(c=l,u=d)),++h}return-1===u?function(e,i,n,r){for(;i.length>=1;){var o=i[i.length-1];if(i.splice(i.length-1,1),e[o].numLiveTriangles>0)return o}for(;t<r;){if(e[t].numLiveTriangles>0)return++t-1;++t}return-1}(r,a,0,s):u}if(!e$2e(i))throw new t$15("indices is required.");var a=i.length;if(a<3||a%3!=0)throw new t$15("indices length must be a multiple of three.");if(n<=0)throw new t$15("maximumIndex must be greater than zero.");if(r<3)throw new t$15("cacheSize must be greater than two.");var s=0,l=0,u=i[l],c=a;if(e$2e(n))s=n+1;else{for(;l<c;)u>s&&(s=u),u=i[++l];if(-1===s)return 0;++s}var h,d=[];for(h=0;h<s;h++)d[h]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};l=0;for(var f=0;l<c;)d[i[l]].vertexTriangles.push(f),++d[i[l]].numLiveTriangles,d[i[l+1]].vertexTriangles.push(f),++d[i[l+1]].numLiveTriangles,d[i[l+2]].vertexTriangles.push(f),++d[i[l+2]].numLiveTriangles,++f,l+=3;var p=0,_=r+1;t=1;var m,g,x,y,v=[],$=[],b=0,T=[],C=a/3,S=[];for(h=0;h<C;h++)S[h]=!1;for(;-1!==p;){v=[],y=(g=d[p]).vertexTriangles.length;for(var w=0;w<y;++w)if(!S[f=g.vertexTriangles[w]]){S[f]=!0,l=f+f+f;for(var E=0;E<3;++E)x=i[l],v.push(x),$.push(x),T[b]=x,++b,--(m=d[x]).numLiveTriangles,_-m.timeStamp>r&&(m.timeStamp=_,++_),++l}p=o(0,r,v,d,_,$,s)}return T};var k$14={};function gr$7(e,t,i,n,r){e[t++]=i,e[t++]=n,e[t++]=n,e[t++]=r,e[t++]=r,e[t]=i}function ma$4(e){for(var t=e.length,i=t/3*6,n=ce$z.createTypedArray(t,i),r=0,o=0;o<t;o+=3,r+=6)gr$7(n,r,e[o],e[o+1],e[o+2]);return n}function pa$4(e){var t=e.length;if(t>=3){var i=6*(t-2),n=ce$z.createTypedArray(t,i);gr$7(n,0,e[0],e[1],e[2]);for(var r=6,o=3;o<t;++o,r+=6)gr$7(n,r,e[o-1],e[o],e[o-2]);return n}return new Uint16Array}function ya$2(e){if(e.length>0){for(var t=e.length-1,i=6*(t-1),n=ce$z.createTypedArray(t,i),r=e[0],o=0,a=1;a<t;++a,o+=6)gr$7(n,o,r,e[a],e[a+1]);return n}return new Uint16Array}function Yr$3(e){var t={};for(var i in e)if(e.hasOwnProperty(i)&&e$2e(e[i])&&e$2e(e[i].values)){var n=e[i];t[i]=new o$1c({componentDatatype:n.componentDatatype,componentsPerAttribute:n.componentsPerAttribute,normalize:n.normalize,values:[]})}return t}function wa$3(e,t,i){for(var n in t)if(t.hasOwnProperty(n)&&e$2e(t[n])&&e$2e(t[n].values))for(var r=t[n],o=0;o<r.componentsPerAttribute;++o)e[n].values.push(r.values[i*r.componentsPerAttribute+o])}k$14.toWireframe=function(e){if(!e$2e(e))throw new t$15("geometry is required.");var t=e.indices;if(e$2e(t)){switch(e.primitiveType){case W$18.TRIANGLES:e.indices=ma$4(t);break;case W$18.TRIANGLE_STRIP:e.indices=pa$4(t);break;case W$18.TRIANGLE_FAN:e.indices=ya$2(t);break;default:throw new t$15("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}e.primitiveType=W$18.LINES}return e},k$14.createLineSegmentsForVectors=function(e,t,i){if(t=u$Z(t,"normal"),!e$2e(e))throw new t$15("geometry is required.");if(!e$2e(e.attributes.position))throw new t$15("geometry.attributes.position is required.");if(!e$2e(e.attributes[t]))throw new t$15("geometry.attributes must have an attribute with the same name as the attributeName parameter, "+t+".");i=u$Z(i,1e4);for(var n=e.attributes.position.values,r=e.attributes[t].values,o=n.length,a=new Float64Array(2*o),s=0,l=0;l<o;l+=3)a[s++]=n[l],a[s++]=n[l+1],a[s++]=n[l+2],a[s++]=n[l]+r[l]*i,a[s++]=n[l+1]+r[l+1]*i,a[s++]=n[l+2]+r[l+2]*i;var u,c=e.boundingSphere;return e$2e(c)&&(u=new i$1d(c.center,c.radius+i)),new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:a})},primitiveType:W$18.LINES,boundingSphere:u})},k$14.createAttributeLocations=function(e){if(!e$2e(e))throw new t$15("geometry is required.");var t,i=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,r={},o=0,a=i.length;for(t=0;t<a;++t){var s=i[t];e$2e(n[s])&&(r[s]=o++)}for(var l in n)n.hasOwnProperty(l)&&!e$2e(r[l])&&(r[l]=o++);return r},k$14.reorderForPreVertexCache=function(e){if(!e$2e(e))throw new t$15("geometry is required.");var t=I$1p.computeNumberOfVertices(e),i=e.indices;if(e$2e(i)){for(var n=new Int32Array(t),r=0;r<t;r++)n[r]=-1;for(var o,a=i,s=a.length,l=ce$z.createTypedArray(t,s),u=0,c=0,h=0;u<s;)-1!==(o=n[a[u]])?l[c]=o:(n[o=a[u]]=h,l[c]=h,++h),++u,++c;e.indices=l;var d=e.attributes;for(var f in d)if(d.hasOwnProperty(f)&&e$2e(d[f])&&e$2e(d[f].values)){for(var p=d[f],_=p.values,m=0,g=p.componentsPerAttribute,x=S$14.createTypedArray(p.componentDatatype,h*g);m<t;){var y=n[m];if(-1!==y)for(var v=0;v<g;v++)x[g*y+v]=_[g*m+v];++m}p.values=x}}return e},k$14.reorderForPostVertexCache=function(e,t){if(!e$2e(e))throw new t$15("geometry is required.");var i=e.indices;if(e.primitiveType===W$18.TRIANGLES&&e$2e(i)){for(var n=i.length,r=0,o=0;o<n;o++)i[o]>r&&(r=i[o]);e.indices=D$14.tipsify({indices:i,maximumIndex:r,cacheSize:t})}return e},k$14.fitToUnsignedShortIndices=function(e){if(!e$2e(e))throw new t$15("geometry is required.");if(e$2e(e.indices)&&e.primitiveType!==W$18.TRIANGLES&&e.primitiveType!==W$18.LINES&&e.primitiveType!==W$18.POINTS)throw new t$15("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");var t=[],i=I$1p.computeNumberOfVertices(e);if(e$2e(e.indices)&&i>=e$2d.SIXTY_FOUR_KILOBYTES){var n,r=[],o=[],a=0,s=Yr$3(e.attributes),l=e.indices,u=l.length;e.primitiveType===W$18.TRIANGLES?n=3:e.primitiveType===W$18.LINES?n=2:e.primitiveType===W$18.POINTS&&(n=1);for(var c=0;c<u;c+=n){for(var h=0;h<n;++h){var d=l[c+h],f=r[d];e$2e(f)||(f=a++,r[d]=f,wa$3(s,e.attributes,d)),o.push(f)}a+n>=e$2d.SIXTY_FOUR_KILOBYTES&&(t.push(new I$1p({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),r=[],o=[],a=0,s=Yr$3(e.attributes))}0!==o.length&&t.push(new I$1p({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var Hr$2=new o$1p,da$2=new a$18;k$14.projectTo2D=function(e,t,i,n,r){if(!e$2e(e))throw new t$15("geometry is required.");if(!e$2e(t))throw new t$15("attributeName is required.");if(!e$2e(i))throw new t$15("attributeName3D is required.");if(!e$2e(n))throw new t$15("attributeName2D is required.");if(!e$2e(e.attributes[t]))throw new t$15("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==S$14.DOUBLE)throw new t$15("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var o=e.attributes[t],a=(r=e$2e(r)?r:new n$1d).ellipsoid,s=o.values,l=new Float64Array(s.length),u=0,c=0;c<s.length;c+=3){var h=o$1p.fromArray(s,c,Hr$2),d=a.cartesianToCartographic(h,da$2);if(!e$2e(d))throw new t$15("Could not project point ("+h.x+", "+h.y+", "+h.z+") to 2D.");var f=r.project(d,Hr$2);l[u++]=f.x,l[u++]=f.y,l[u++]=f.z}return e.attributes[i]=o,e.attributes[n]=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:l}),delete e.attributes[t],e};var xr$6={high:0,low:0};k$14.encodeAttribute=function(e,t,i,n){if(!e$2e(e))throw new t$15("geometry is required.");if(!e$2e(t))throw new t$15("attributeName is required.");if(!e$2e(i))throw new t$15("attributeHighName is required.");if(!e$2e(n))throw new t$15("attributeLowName is required.");if(!e$2e(e.attributes[t]))throw new t$15("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==S$14.DOUBLE)throw new t$15("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var r=e.attributes[t],o=r.values,a=o.length,s=new Float32Array(a),l=new Float32Array(a),u=0;u<a;++u)i$12.encode(o[u],xr$6),s[u]=xr$6.high,l[u]=xr$6.low;var c=r.componentsPerAttribute;return e.attributes[i]=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:c,values:s}),e.attributes[n]=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:c,values:l}),delete e.attributes[t],e};var W$16=new o$1p;function Vr$5(e,t){if(e$2e(t))for(var i=t.values,n=i.length,r=0;r<n;r+=3)o$1p.unpack(i,r,W$16),p$1d.multiplyByPoint(e,W$16,W$16),o$1p.pack(W$16,i,r)}function qr$3(e,t){if(e$2e(t))for(var i=t.values,n=i.length,r=0;r<n;r+=3)o$1p.unpack(i,r,W$16),p$1e.multiplyByVector(e,W$16,W$16),W$16=o$1p.normalize(W$16,W$16),o$1p.pack(W$16,i,r)}var Er$6=new p$1d,Lr$6=new p$1e;function Sa$3(e,t){var i,n=e.length,r={},o=e[0][t].attributes;for(i in o)if(o.hasOwnProperty(i)&&e$2e(o[i])&&e$2e(o[i].values)){for(var a=o[i],s=a.values.length,l=!0,u=1;u<n;++u){var c=e[u][t].attributes[i];if(!e$2e(c)||a.componentDatatype!==c.componentDatatype||a.componentsPerAttribute!==c.componentsPerAttribute||a.normalize!==c.normalize){l=!1;break}s+=c.values.length}l&&(r[i]=new o$1c({componentDatatype:a.componentDatatype,componentsPerAttribute:a.componentsPerAttribute,normalize:a.normalize,values:S$14.createTypedArray(a.componentDatatype,s)}),a.isInstanceAttribute&&(r[i].isInstanceAttribute=!0))}return r}k$14.transformToWorldCoordinates=function(e){if(!e$2e(e))throw new t$15("instance is required.");var t=e.modelMatrix;if(p$1d.equals(t,p$1d.IDENTITY))return e;var i=e.geometry.attributes;Vr$5(t,i.position),Vr$5(t,i.prevPosition),Vr$5(t,i.nextPosition),(e$2e(i.normal)||e$2e(i.tangent)||e$2e(i.bitangent))&&(p$1d.inverse(t,Er$6),p$1d.transpose(Er$6,Er$6),p$1d.getRotation(Er$6,Lr$6),qr$3(Lr$6,i.normal),qr$3(Lr$6,i.tangent),qr$3(Lr$6,i.bitangent));var n=e.geometry.boundingSphere;return e$2e(n)&&(e.geometry.boundingSphere=i$1d.transform(n,t,n)),e.modelMatrix=p$1d.clone(p$1d.IDENTITY),e};var Ta$5=new o$1p;function Gr$4(e,t){var i,n,r,o,a=e.length,s=e[0].modelMatrix,l=e$2e(e[0][t].indices),u=e[0][t].primitiveType;for(n=1;n<a;++n){if(!p$1d.equals(e[n].modelMatrix,s))throw new t$15("All instances must have the same modelMatrix.");if(e$2e(e[n][t].indices)!==l)throw new t$15("All instance geometries must have an indices or not have one.");if(e[n][t].primitiveType!==u)throw new t$15("All instance geometries must have the same primitiveType.")}var c,h,d,f,p=Sa$3(e,t);for(i in p)if(p.hasOwnProperty(i))for(c=p[i].values,o=0,n=0;n<a;++n)for(d=(h=e[n][t].attributes[i].values).length,r=0;r<d;++r)c[o++]=h[r];if(l){var _=0;for(n=0;n<a;++n)_+=e[n][t].indices.length;var m=I$1p.computeNumberOfVertices(new I$1p({attributes:p,primitiveType:W$18.POINTS})),g=ce$z.createTypedArray(m,_),x=0,y=0;for(n=0;n<a;++n){var v=e[n][t].indices,$=v.length;for(o=0;o<$;++o)g[x++]=y+v[o];y+=I$1p.computeNumberOfVertices(e[n][t])}f=g}var b,T=new o$1p,C=0;for(n=0;n<a;++n){if(!e$2e(b=e[n][t].boundingSphere)){T=void 0;break}o$1p.add(b.center,T,T)}if(e$2e(T))for(o$1p.divideByScalar(T,a,T),n=0;n<a;++n){b=e[n][t].boundingSphere;var S=o$1p.magnitude(o$1p.subtract(b.center,T,Ta$5))+b.radius;S>C&&(C=S)}return new I$1p({attributes:p,indices:f,primitiveType:u,boundingSphere:e$2e(T)?new i$1d(T,C):void 0})}k$14.combineInstances=function(e){if(!e$2e(e)||e.length<1)throw new t$15("instances is required and must have length greater than zero.");for(var t=[],i=[],n=e.length,r=0;r<n;++r){var o=e[r];e$2e(o.geometry)?t.push(o):e$2e(o.westHemisphereGeometry)&&e$2e(o.eastHemisphereGeometry)&&i.push(o)}var a=[];return t.length>0&&a.push(Gr$4(t,"geometry")),i.length>0&&(a.push(Gr$4(i,"westHemisphereGeometry")),a.push(Gr$4(i,"eastHemisphereGeometry"))),a};var U$1a=new o$1p,mr$7=new o$1p,or$a=new o$1p,sr$9=new o$1p;k$14.computeNormal=function(e){if(!e$2e(e))throw new t$15("geometry is required.");if(!e$2e(e.attributes.position)||!e$2e(e.attributes.position.values))throw new t$15("geometry.attributes.position.values is required.");if(!e$2e(e.indices))throw new t$15("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!=0)throw new t$15("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==W$18.TRIANGLES)throw new t$15("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var t,i=e.indices,n=e.attributes,r=n.position.values,o=n.position.values.length/3,a=i.length,s=new Array(o),l=new Array(a/3),u=new Array(a);for(t=0;t<o;t++)s[t]={indexOffset:0,count:0,currentCount:0};var c=0;for(t=0;t<a;t+=3){var h=i[t],d=i[t+1],f=i[t+2],p=3*h,_=3*d,m=3*f;mr$7.x=r[p],mr$7.y=r[p+1],mr$7.z=r[p+2],or$a.x=r[_],or$a.y=r[_+1],or$a.z=r[_+2],sr$9.x=r[m],sr$9.y=r[m+1],sr$9.z=r[m+2],s[h].count++,s[d].count++,s[f].count++,o$1p.subtract(or$a,mr$7,or$a),o$1p.subtract(sr$9,mr$7,sr$9),l[c]=o$1p.cross(or$a,sr$9,new o$1p),c++}var g,x=0;for(t=0;t<o;t++)s[t].indexOffset+=x,x+=s[t].count;for(c=0,t=0;t<a;t+=3){var y=(g=s[i[t]]).indexOffset+g.currentCount;u[y]=c,g.currentCount++,u[y=(g=s[i[t+1]]).indexOffset+g.currentCount]=c,g.currentCount++,u[y=(g=s[i[t+2]]).indexOffset+g.currentCount]=c,g.currentCount++,c++}var v=new Float32Array(3*o);for(t=0;t<o;t++){var $=3*t;if(g=s[t],o$1p.clone(o$1p.ZERO,U$1a),g.count>0){for(c=0;c<g.count;c++)o$1p.add(U$1a,l[u[g.indexOffset+c]],U$1a);o$1p.equalsEpsilon(o$1p.ZERO,U$1a,e$2d.EPSILON10)&&o$1p.clone(l[u[g.indexOffset]],U$1a)}o$1p.equalsEpsilon(o$1p.ZERO,U$1a,e$2d.EPSILON10)&&(U$1a.z=1),o$1p.normalize(U$1a,U$1a),v[$]=U$1a.x,v[$+1]=U$1a.y,v[$+2]=U$1a.z}return e.attributes.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:v}),e};var ba$2=new o$1p,Wr$3=new o$1p,ga$4=new o$1p;k$14.computeTangentAndBitangent=function(e){if(!e$2e(e))throw new t$15("geometry is required.");var t=e.attributes,i=e.indices;if(!e$2e(t.position)||!e$2e(t.position.values))throw new t$15("geometry.attributes.position.values is required.");if(!e$2e(t.normal)||!e$2e(t.normal.values))throw new t$15("geometry.attributes.normal.values is required.");if(!e$2e(t.st)||!e$2e(t.st.values))throw new t$15("geometry.attributes.st.values is required.");if(!e$2e(i))throw new t$15("geometry.indices is required.");if(i.length<2||i.length%3!=0)throw new t$15("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==W$18.TRIANGLES)throw new t$15("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var n,r,o,a,s=e.attributes.position.values,l=e.attributes.normal.values,u=e.attributes.st.values,c=e.attributes.position.values.length/3,h=i.length,d=new Array(3*c);for(n=0;n<d.length;n++)d[n]=0;for(n=0;n<h;n+=3){var f=i[n],p=i[n+1],_=i[n+2];o=3*p,a=3*_;var m=2*f,g=2*p,x=2*_,y=s[r=3*f],v=s[r+1],$=s[r+2],b=u[m],T=u[m+1],C=u[g+1]-T,S=u[x+1]-T,w=1/((u[g]-b)*S-(u[x]-b)*C),E=(S*(s[o]-y)-C*(s[a]-y))*w,P=(S*(s[o+1]-v)-C*(s[a+1]-v))*w,A=(S*(s[o+2]-$)-C*(s[a+2]-$))*w;d[r]+=E,d[r+1]+=P,d[r+2]+=A,d[o]+=E,d[o+1]+=P,d[o+2]+=A,d[a]+=E,d[a+1]+=P,d[a+2]+=A}var L=new Float32Array(3*c),M=new Float32Array(3*c);for(n=0;n<c;n++){o=(r=3*n)+1,a=r+2;var R=o$1p.fromArray(l,r,ba$2),O=o$1p.fromArray(d,r,ga$4),D=o$1p.dot(R,O);o$1p.multiplyByScalar(R,D,Wr$3),o$1p.normalize(o$1p.subtract(O,Wr$3,O),O),L[r]=O.x,L[o]=O.y,L[a]=O.z,o$1p.normalize(o$1p.cross(R,O,O),O),M[r]=O.x,M[o]=O.y,M[a]=O.z}return e.attributes.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:L}),e.attributes.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:M}),e};var pr$6=new o$1o,X$11=new o$1p,Xr$3=new o$1p,Kr$4=new o$1p,Or$4=new o$1o;function Ea$4(e){if(e$2e(e.indices))return e;var t=I$1p.computeNumberOfVertices(e);if(t<3)throw new t$15("The number of vertices must be at least three.");if(t%3!=0)throw new t$15("The number of vertices must be a multiple of three.");for(var i=ce$z.createTypedArray(t,t),n=0;n<t;++n)i[n]=n;return e.indices=i,e}function La$4(e){var t=I$1p.computeNumberOfVertices(e);if(t<3)throw new t$15("The number of vertices must be at least three.");var i=ce$z.createTypedArray(t,3*(t-2));i[0]=1,i[1]=0,i[2]=2;for(var n=3,r=3;r<t;++r)i[n++]=r-1,i[n++]=0,i[n++]=r;return e.indices=i,e.primitiveType=W$18.TRIANGLES,e}function Oa$4(e){var t=I$1p.computeNumberOfVertices(e);if(t<3)throw new t$15("The number of vertices must be at least 3.");var i=ce$z.createTypedArray(t,3*(t-2));i[0]=0,i[1]=1,i[2]=2,t>3&&(i[3]=0,i[4]=2,i[5]=3);for(var n=6,r=3;r<t-1;r+=2)i[n++]=r,i[n++]=r-1,i[n++]=r+1,r+2<t&&(i[n++]=r,i[n++]=r+1,i[n++]=r+2);return e.indices=i,e.primitiveType=W$18.TRIANGLES,e}function Aa$5(e){if(e$2e(e.indices))return e;var t=I$1p.computeNumberOfVertices(e);if(t<2)throw new t$15("The number of vertices must be at least two.");if(t%2!=0)throw new t$15("The number of vertices must be a multiple of 2.");for(var i=ce$z.createTypedArray(t,t),n=0;n<t;++n)i[n]=n;return e.indices=i,e}function Pa$3(e){var t=I$1p.computeNumberOfVertices(e);if(t<2)throw new t$15("The number of vertices must be at least two.");var i=ce$z.createTypedArray(t,2*(t-1));i[0]=0,i[1]=1;for(var n=2,r=2;r<t;++r)i[n++]=r-1,i[n++]=r;return e.indices=i,e.primitiveType=W$18.LINES,e}function za$4(e){var t=I$1p.computeNumberOfVertices(e);if(t<2)throw new t$15("The number of vertices must be at least two.");var i=ce$z.createTypedArray(t,2*t);i[0]=0,i[1]=1;for(var n=2,r=2;r<t;++r)i[n++]=r-1,i[n++]=r;return i[n++]=t-1,i[n]=0,e.indices=i,e.primitiveType=W$18.LINES,e}function Na$4(e){switch(e.primitiveType){case W$18.TRIANGLE_FAN:return La$4(e);case W$18.TRIANGLE_STRIP:return Oa$4(e);case W$18.TRIANGLES:return Ea$4(e);case W$18.LINE_STRIP:return Pa$3(e);case W$18.LINE_LOOP:return za$4(e);case W$18.LINES:return Aa$5(e)}return e}function ar$a(e,t){Math.abs(e.y)<e$2d.EPSILON6&&(e.y=t?-e$2d.EPSILON6:e$2d.EPSILON6)}function Da$6(e,t,i){if(0!==e.y&&0!==t.y&&0!==i.y)return ar$a(e,e.y<0),ar$a(t,t.y<0),void ar$a(i,i.y<0);var n=Math.abs(e.y),r=Math.abs(t.y),o=Math.abs(i.y),a=(n>r?n>o?e$2d.sign(e.y):e$2d.sign(i.y):r>o?e$2d.sign(t.y):e$2d.sign(i.y))<0;ar$a(e,a),ar$a(t,a),ar$a(i,a)}k$14.compressVertices=function(e){if(!e$2e(e))throw new t$15("geometry is required.");var t,i,n=e.attributes.extrudeDirection;if(e$2e(n)){var r=n.values;i=r.length/3;var o=new Float32Array(2*i),a=0;for(t=0;t<i;++t)o$1p.fromArray(r,3*t,X$11),o$1p.equals(X$11,o$1p.ZERO)?a+=2:(Or$4=t$$.octEncodeInRange(X$11,65535,Or$4),o[a++]=Or$4.x,o[a++]=Or$4.y);return e.attributes.compressedAttributes=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:o}),delete e.attributes.extrudeDirection,e}var s=e.attributes.normal,l=e.attributes.st,u=e$2e(s),c=e$2e(l);if(!u&&!c)return e;var h,d,f,p,_=e.attributes.tangent,m=e.attributes.bitangent,g=e$2e(_),x=e$2e(m);u&&(h=s.values),c&&(d=l.values),g&&(f=_.values),x&&(p=m.values);var y=i=(u?h.length:d.length)/(u?3:2),v=c&&u?2:1;v+=g||x?1:0;var $=new Float32Array(y*=v),b=0;for(t=0;t<i;++t){c&&(o$1o.fromArray(d,2*t,pr$6),$[b++]=t$$.compressTextureCoordinates(pr$6));var T=3*t;u&&e$2e(f)&&e$2e(p)?(o$1p.fromArray(h,T,X$11),o$1p.fromArray(f,T,Xr$3),o$1p.fromArray(p,T,Kr$4),t$$.octPack(X$11,Xr$3,Kr$4,pr$6),$[b++]=pr$6.x,$[b++]=pr$6.y):(u&&(o$1p.fromArray(h,T,X$11),$[b++]=t$$.octEncodeFloat(X$11)),g&&(o$1p.fromArray(f,T,X$11),$[b++]=t$$.octEncodeFloat(X$11)),x&&(o$1p.fromArray(p,T,X$11),$[b++]=t$$.octEncodeFloat(X$11)))}return e.attributes.compressedAttributes=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:v,values:$}),u&&delete e.attributes.normal,c&&delete e.attributes.st,x&&delete e.attributes.bitangent,g&&delete e.attributes.tangent,e};var Jr$3=new o$1p;function Z$16(e,t,i,n){o$1p.add(e,o$1p.multiplyByScalar(o$1p.subtract(t,e,Jr$3),e.y/(e.y-t.y),Jr$3),i),o$1p.clone(i,n),ar$a(i,!0),ar$a(n,!1)}var er$d=new o$1p,nr$d=new o$1p,vr$8=new o$1p,tr$b=new o$1p,Rr$5={positions:new Array(7),indices:new Array(9)};function xa$3(e,t,i){if(!(e.x>=0||t.x>=0||i.x>=0)){Da$6(e,t,i);var n=e.y<0,r=t.y<0,o=i.y<0,a=0;a+=n?1:0,a+=r?1:0,a+=o?1:0;var s=Rr$5.indices;1===a?(s[1]=3,s[2]=4,s[5]=6,s[7]=6,s[8]=5,n?(Z$16(e,t,er$d,vr$8),Z$16(e,i,nr$d,tr$b),s[0]=0,s[3]=1,s[4]=2,s[6]=1):r?(Z$16(t,i,er$d,vr$8),Z$16(t,e,nr$d,tr$b),s[0]=1,s[3]=2,s[4]=0,s[6]=2):o&&(Z$16(i,e,er$d,vr$8),Z$16(i,t,nr$d,tr$b),s[0]=2,s[3]=0,s[4]=1,s[6]=0)):2===a&&(s[2]=4,s[4]=4,s[5]=3,s[7]=5,s[8]=6,n?r?o||(Z$16(i,e,er$d,vr$8),Z$16(i,t,nr$d,tr$b),s[0]=0,s[1]=1,s[3]=0,s[6]=2):(Z$16(t,i,er$d,vr$8),Z$16(t,e,nr$d,tr$b),s[0]=2,s[1]=0,s[3]=2,s[6]=1):(Z$16(e,t,er$d,vr$8),Z$16(e,i,nr$d,tr$b),s[0]=1,s[1]=2,s[3]=1,s[6]=0));var l=Rr$5.positions;return l[0]=e,l[1]=t,l[2]=i,l.length=3,(1===a||2===a)&&(l[3]=er$d,l[4]=nr$d,l[5]=vr$8,l[6]=tr$b,l.length=7),Rr$5}}function Qr$3(e,t){var i=e.attributes;if(0!==i.position.values.length){for(var n in i)if(i.hasOwnProperty(n)&&e$2e(i[n])&&e$2e(i[n].values)){var r=i[n];r.values=S$14.createTypedArray(r.componentDatatype,r.values)}var o=I$1p.computeNumberOfVertices(e);return e.indices=ce$z.createTypedArray(o,e.indices),t&&(e.boundingSphere=i$1d.fromVertices(i.position.values)),e}}function ur$9(e){var t=e.attributes,i={};for(var n in t)if(t.hasOwnProperty(n)&&e$2e(t[n])&&e$2e(t[n].values)){var r=t[n];i[n]=new o$1c({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]})}return new I$1p({attributes:i,indices:[],primitiveType:e.primitiveType})}function Br$4(e,t,i){var n=e$2e(e.geometry.boundingSphere);t=Qr$3(t,n),e$2e(i=Qr$3(i,n))&&!e$2e(t)?e.geometry=i:!e$2e(i)&&e$2e(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=i,e.geometry=void 0)}function Fr$4(e,t){var i=new e,n=new e,r=new e;return function(o,a,s,l,u,c,h,d){var f=e.fromArray(u,o*t,i),p=e.fromArray(u,a*t,n),_=e.fromArray(u,s*t,r);e.multiplyByScalar(f,l.x,f),e.multiplyByScalar(p,l.y,p),e.multiplyByScalar(_,l.z,_);var m=e.add(f,p,f);e.add(m,_,m),d&&e.normalize(m,m),e.pack(m,c,h*t)}}var Va$4=Fr$4(e$2c,4),Ar$5=Fr$4(o$1p,3),$r$4=Fr$4(o$1o,2),qa$5=function(e,t,i,n,r,o,a){var s=r[e]*n.x,l=r[t]*n.y,u=r[i]*n.z;o[a]=s+l+u>e$2d.EPSILON6?1:0},yr$6=new o$1p,kr$5=new o$1p,Ir$7=new o$1p,Ga$5=new o$1p;function Pr$5(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){if(e$2e(o)||e$2e(a)||e$2e(s)||e$2e(l)||e$2e(u)||0!==f){var m=S$$(n,o$1p.fromArray(r,3*e,yr$6),o$1p.fromArray(r,3*t,kr$5),o$1p.fromArray(r,3*i,Ir$7),Ga$5);if(e$2e(o)&&Ar$5(e,t,i,m,o,h.normal.values,_,!0),e$2e(u)){var g,x=o$1p.fromArray(u,3*e,yr$6),y=o$1p.fromArray(u,3*t,kr$5),v=o$1p.fromArray(u,3*i,Ir$7);o$1p.multiplyByScalar(x,m.x,x),o$1p.multiplyByScalar(y,m.y,y),o$1p.multiplyByScalar(v,m.z,v),o$1p.equals(x,o$1p.ZERO)&&o$1p.equals(y,o$1p.ZERO)&&o$1p.equals(v,o$1p.ZERO)?((g=yr$6).x=0,g.y=0,g.z=0):(g=o$1p.add(x,y,x),o$1p.add(g,v,g),o$1p.normalize(g,g)),o$1p.pack(g,h.extrudeDirection.values,3*_)}if(e$2e(c)&&qa$5(e,t,i,m,c,h.applyOffset.values,_),e$2e(a)&&Ar$5(e,t,i,m,a,h.tangent.values,_,!0),e$2e(s)&&Ar$5(e,t,i,m,s,h.bitangent.values,_,!0),e$2e(l)&&$r$4(e,t,i,m,l,h.st.values,_),f>0)for(var $=0;$<f;$++){var b=d[$];Ra$6(e,t,i,m,_,p[b],h[b])}}}function Ra$6(e,t,i,n,r,o,a){var s=o.componentsPerAttribute,l=o.values,u=a.values;switch(s){case 4:Va$4(e,t,i,n,l,u,r,!1);break;case 3:Ar$5(e,t,i,n,l,u,r,!1);break;case 2:$r$4(e,t,i,n,l,u,r,!1);break;default:u[r]=l[e]*n.x+l[t]*n.y+l[i]*n.z}}function Q$17(e,t,i,n,r,o){var a=e.position.values.length/3;if(-1!==r){var s=n[r],l=i[s];return-1===l?(i[s]=a,e.position.values.push(o.x,o.y,o.z),t.push(a),a):(t.push(l),l)}return e.position.values.push(o.x,o.y,o.z),t.push(a),a}var Ba$4={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function jr$5(e){var t=e.geometry,i=t.attributes,n=i.position.values,r=e$2e(i.normal)?i.normal.values:void 0,o=e$2e(i.bitangent)?i.bitangent.values:void 0,a=e$2e(i.tangent)?i.tangent.values:void 0,s=e$2e(i.st)?i.st.values:void 0,l=e$2e(i.extrudeDirection)?i.extrudeDirection.values:void 0,u=e$2e(i.applyOffset)?i.applyOffset.values:void 0,c=t.indices,h=[];for(var d in i)i.hasOwnProperty(d)&&!Ba$4[d]&&e$2e(i[d])&&h.push(d);var f,p,_,m,g=h.length,x=ur$9(t),y=ur$9(t),v=[];v.length=n.length/3;var $=[];for($.length=n.length/3,m=0;m<v.length;++m)v[m]=-1,$[m]=-1;var b=c.length;for(m=0;m<b;m+=3){var T=c[m],C=c[m+1],S=c[m+2],w=o$1p.fromArray(n,3*T),E=o$1p.fromArray(n,3*C),P=o$1p.fromArray(n,3*S),A=xa$3(w,E,P);if(e$2e(A)&&A.positions.length>3)for(var L=A.positions,M=A.indices,R=M.length,O=0;O<R;++O){var D=M[O],I=L[D];I.y<0?(f=y.attributes,p=y.indices,_=v):(f=x.attributes,p=x.indices,_=$),Pr$5(T,C,S,I,n,r,a,o,s,l,u,f,h,g,i,Q$17(f,p,_,c,D<3?m+D:-1,I))}else e$2e(A)&&(w=A.positions[0],E=A.positions[1],P=A.positions[2]),w.y<0?(f=y.attributes,p=y.indices,_=v):(f=x.attributes,p=x.indices,_=$),Pr$5(T,C,S,w,n,r,a,o,s,l,u,f,h,g,i,Q$17(f,p,_,c,m,w)),Pr$5(T,C,S,E,n,r,a,o,s,l,u,f,h,g,i,Q$17(f,p,_,c,m+1,E)),Pr$5(T,C,S,P,n,r,a,o,s,l,u,f,h,g,i,Q$17(f,p,_,c,m+2,P))}Br$4(e,y,x)}var ra$7=o$1m.fromPointNormal(o$1p.ZERO,o$1p.UNIT_Y),Fa$5=new o$1p,ka$5=new o$1p;function lr$9(e,t,i,n,r,o,a){if(e$2e(a)){var s=o$1p.fromArray(n,3*e,yr$6);o$1p.equalsEpsilon(s,i,e$2d.EPSILON10)?o.applyOffset.values[r]=a[e]:o.applyOffset.values[r]=a[t]}}function aa$6(e){var t,i=e.geometry,n=i.attributes,r=n.position.values,o=e$2e(n.applyOffset)?n.applyOffset.values:void 0,a=i.indices,s=ur$9(i),l=ur$9(i),u=a.length,c=[];c.length=r.length/3;var h=[];for(h.length=r.length/3,t=0;t<c.length;++t)c[t]=-1,h[t]=-1;for(t=0;t<u;t+=2){var d=a[t],f=a[t+1],p=o$1p.fromArray(r,3*d,yr$6),_=o$1p.fromArray(r,3*f,kr$5);Math.abs(p.y)<e$2d.EPSILON6&&(p.y<0?p.y=-e$2d.EPSILON6:p.y=e$2d.EPSILON6),Math.abs(_.y)<e$2d.EPSILON6&&(_.y<0?_.y=-e$2d.EPSILON6:_.y=e$2d.EPSILON6);var m=s.attributes,g=s.indices,x=h,y=l.attributes,v=l.indices,$=c,b=g$1j.lineSegmentPlane(p,_,ra$7,Ir$7);if(e$2e(b)){var T=o$1p.multiplyByScalar(o$1p.UNIT_Y,5*e$2d.EPSILON9,Fa$5);p.y<0&&(o$1p.negate(T,T),m=l.attributes,g=l.indices,x=c,y=s.attributes,v=s.indices,$=h);var C=o$1p.add(b,T,ka$5);lr$9(d,f,p,r,Q$17(m,g,x,a,t,p),m,o),lr$9(d,f,C,r,Q$17(m,g,x,a,-1,C),m,o),o$1p.negate(T,T),o$1p.add(b,T,C),lr$9(d,f,C,r,Q$17(y,v,$,a,-1,C),y,o),lr$9(d,f,_,r,Q$17(y,v,$,a,t+1,_),y,o)}else{var S,w,E;p.y<0?(S=l.attributes,w=l.indices,E=c):(S=s.attributes,w=s.indices,E=h),lr$9(d,f,p,r,Q$17(S,w,E,a,t,p),S,o),lr$9(d,f,_,r,Q$17(S,w,E,a,t+1,_),S,o)}}Br$4(e,l,s)}var ea$7=new o$1o,Ia$5=new o$1o,na$4=new o$1p,va$3=new o$1p,Cr$5=new o$1p,Ca$3=new o$1p,_a$4=new o$1p,Ma$4=new o$1p,ta$5=new o$1p,ia$4=new e$2c;function oa$5(e){for(var t=e.attributes,i=t.position.values,n=t.prevPosition.values,r=t.nextPosition.values,o=i.length,a=0;a<o;a+=3){var s=o$1p.unpack(i,a,na$4);if(!(s.x>0)){var l=o$1p.unpack(n,a,va$3);(s.y<0&&l.y>0||s.y>0&&l.y<0)&&(a-3>0?(n[a]=i[a-3],n[a+1]=i[a-2],n[a+2]=i[a-1]):o$1p.pack(s,n,a));var u=o$1p.unpack(r,a,Cr$5);(s.y<0&&u.y>0||s.y>0&&u.y<0)&&(a+3<o?(r[a]=i[a+3],r[a+1]=i[a+4],r[a+2]=i[a+5]):o$1p.pack(s,r,a))}}}var Ua$6=5*e$2d.EPSILON9,zr$7=e$2d.EPSILON6;function Za$5(e){var t,i,n,r=e.geometry,o=r.attributes,a=o.position.values,s=o.prevPosition.values,l=o.nextPosition.values,u=o.expandAndWidth.values,c=e$2e(o.st)?o.st.values:void 0,h=e$2e(o.color)?o.color.values:void 0,d=e$2e(o.dist)?o.dist.values:void 0,f=ur$9(r),p=ur$9(r),_=!1,m=a.length/3;for(t=0;t<m;t+=4){var g=t,x=t+2,y=o$1p.fromArray(a,3*g,na$4),v=o$1p.fromArray(a,3*x,va$3);if(Math.abs(y.y)<zr$7)for(y.y=zr$7*(v.y<0?-1:1),a[3*t+1]=y.y,a[3*(t+1)+1]=y.y,i=3*g;i<3*g+12;i+=3)s[i]=a[3*t],s[i+1]=a[3*t+1],s[i+2]=a[3*t+2];if(Math.abs(v.y)<zr$7)for(v.y=zr$7*(y.y<0?-1:1),a[3*(t+2)+1]=v.y,a[3*(t+3)+1]=v.y,i=3*g;i<3*g+12;i+=3)l[i]=a[3*(t+2)],l[i+1]=a[3*(t+2)+1],l[i+2]=a[3*(t+2)+2];var $=f.attributes,b=f.indices,T=p.attributes,C=p.indices,S=g$1j.lineSegmentPlane(y,v,ra$7,Ca$3);if(e$2e(S)){_=!0;var w=o$1p.multiplyByScalar(o$1p.UNIT_Y,Ua$6,_a$4);y.y<0&&(o$1p.negate(w,w),$=p.attributes,b=p.indices,T=f.attributes,C=f.indices);var E=o$1p.add(S,w,Ma$4);$.position.values.push(y.x,y.y,y.z,y.x,y.y,y.z),$.position.values.push(E.x,E.y,E.z),$.position.values.push(E.x,E.y,E.z),$.prevPosition.values.push(s[3*g],s[3*g+1],s[3*g+2]),$.prevPosition.values.push(s[3*g+3],s[3*g+4],s[3*g+5]),$.prevPosition.values.push(y.x,y.y,y.z,y.x,y.y,y.z),$.nextPosition.values.push(E.x,E.y,E.z),$.nextPosition.values.push(E.x,E.y,E.z),$.nextPosition.values.push(E.x,E.y,E.z),$.nextPosition.values.push(E.x,E.y,E.z),o$1p.negate(w,w),o$1p.add(S,w,E),T.position.values.push(E.x,E.y,E.z),T.position.values.push(E.x,E.y,E.z),T.position.values.push(v.x,v.y,v.z,v.x,v.y,v.z),T.prevPosition.values.push(E.x,E.y,E.z),T.prevPosition.values.push(E.x,E.y,E.z),T.prevPosition.values.push(E.x,E.y,E.z),T.prevPosition.values.push(E.x,E.y,E.z),T.nextPosition.values.push(v.x,v.y,v.z,v.x,v.y,v.z),T.nextPosition.values.push(l[3*x],l[3*x+1],l[3*x+2]),T.nextPosition.values.push(l[3*x+3],l[3*x+4],l[3*x+5]);var P=o$1o.fromArray(u,2*g,ea$7),A=Math.abs(P.y);$.expandAndWidth.values.push(-1,A,1,A),$.expandAndWidth.values.push(-1,-A,1,-A),T.expandAndWidth.values.push(-1,A,1,A),T.expandAndWidth.values.push(-1,-A,1,-A);var L=o$1p.magnitudeSquared(o$1p.subtract(S,y,Cr$5));if(L/=o$1p.magnitudeSquared(o$1p.subtract(v,y,Cr$5)),e$2e(h)){var M=e$2c.fromArray(h,4*g,ia$4),R=e$2c.fromArray(h,4*x,ia$4),O=e$2d.lerp(M.x,R.x,L),D=e$2d.lerp(M.y,R.y,L),I=e$2d.lerp(M.z,R.z,L),B=e$2d.lerp(M.w,R.w,L);for(i=4*g;i<4*g+8;++i)$.color.values.push(h[i]);for($.color.values.push(O,D,I,B),$.color.values.push(O,D,I,B),T.color.values.push(O,D,I,B),T.color.values.push(O,D,I,B),i=4*x;i<4*x+8;++i)T.color.values.push(h[i])}if(e$2e(c)){var F=o$1o.fromArray(c,2*g,ea$7),N=o$1o.fromArray(c,2*(t+3),Ia$5),G=e$2d.lerp(F.x,N.x,L);for(i=2*g;i<2*g+4;++i)$.st.values.push(c[i]);for($.st.values.push(G,F.y),$.st.values.push(G,N.y),T.st.values.push(G,F.y),T.st.values.push(G,N.y),i=2*x;i<2*x+4;++i)T.st.values.push(c[i])}if(e$2e(d)){var z=o$1p.fromArray(d,3*g,ta$5),U=o$1p.fromArray(d,3*x,ta$5),V=e$2d.lerp(z.x,U.x,L);for(i=3*g;i<3*g+6;++i)$.dist.values.push(d[i]);for($.dist.values.push(V,z.y,z.z),$.dist.values.push(V,z.y,z.z),T.dist.values.push(V,U.y,U.z),T.dist.values.push(V,U.y,U.z),i=3*x;i<3*x+6;++i)T.dist.values.push(d[i])}n=$.position.values.length/3-4,b.push(n,n+2,n+1),b.push(n+1,n+2,n+3),n=T.position.values.length/3-4,C.push(n,n+2,n+1),C.push(n+1,n+2,n+3)}else{var k,W;for(y.y<0?(k=p.attributes,W=p.indices):(k=f.attributes,W=f.indices),k.position.values.push(y.x,y.y,y.z),k.position.values.push(y.x,y.y,y.z),k.position.values.push(v.x,v.y,v.z),k.position.values.push(v.x,v.y,v.z),i=3*t;i<3*t+12;++i)k.prevPosition.values.push(s[i]),k.nextPosition.values.push(l[i]);for(i=2*t;i<2*t+8;++i)k.expandAndWidth.values.push(u[i]),e$2e(c)&&k.st.values.push(c[i]);if(e$2e(h))for(i=4*t;i<4*t+16;++i)k.color.values.push(h[i]);if(e$2e(d))for(i=3*t;i<3*t+12;++i)k.dist.values.push(d[i]);n=k.position.values.length/3-4,W.push(n,n+2,n+1),W.push(n+1,n+2,n+3)}}_&&(oa$5(p),oa$5(f)),Br$4(e,p,f)}k$14.splitLongitude=function(e){if(!e$2e(e))throw new t$15("instance is required.");var t=e.geometry,i=t.boundingSphere;if(e$2e(i)&&(i.center.x-i.radius>0||i$1d.intersectPlane(i,o$1m.ORIGIN_ZX_PLANE)!==Ae$w.INTERSECTING))return e;if(t.geometryType!==Me$s.NONE)switch(t.geometryType){case Me$s.POLYLINES:Za$5(e);break;case Me$s.TRIANGLES:jr$5(e);break;case Me$s.LINES:aa$6(e)}else Na$4(t),t.primitiveType===W$18.TRIANGLES?jr$5(e):t.primitiveType===W$18.LINES&&aa$6(e);return e};var C$1c=e$2d.EPSILON10;function D$13(e,t,i,n){if(o$1q.defined("equalsEpsilon",t),e$2e(e)){n=u$Z(n,C$1c),i=u$Z(i,!1);var r,o,a,s=e.length;if(s<2)return e;for(r=1;r<s&&!t(o=e[r-1],a=e[r],n);++r);if(r===s)return i&&t(e[0],e[e.length-1],n)?e.slice(1):e;for(var l=e.slice(0,r);r<s;++r)t(o,a=e[r],n)||(l.push(a),o=a);return i&&l.length>1&&t(l[0],l[l.length-1],n)&&l.shift(),l}}function T$18(e,t,i){if(0===e)return t*i;var n=e*e,r=n*n,o=r*n,a=o*n,s=a*n,l=s*n,u=i;return t*((1-n/4-3*r/64-5*o/256-175*a/16384-441*s/65536-4851*l/1048576)*u-(3*n/8+3*r/32+45*o/1024+105*a/4096+2205*s/131072+6237*l/524288)*Math.sin(2*u)+(15*r/256+45*o/1024+525*a/16384+1575*s/65536+155925*l/8388608)*Math.sin(4*u)-(35*o/3072+175*a/12288+3675*s/262144+13475*l/1048576)*Math.sin(6*u)+(315*a/131072+2205*s/524288+43659*l/8388608)*Math.sin(8*u)-(693*s/1310720+6237*l/5242880)*Math.sin(10*u)+1001*l/8388608*Math.sin(12*u))}function z$10(e,t,i){var n=e/i;if(0===t)return n;var r=n*n,o=r*n,a=o*n,s=t*t,l=s*s,u=l*s,c=u*s,h=c*s,d=h*s,f=Math.sin(2*n),p=Math.cos(2*n),_=Math.sin(4*n),m=Math.cos(4*n),g=Math.sin(6*n),x=Math.cos(6*n),y=Math.sin(8*n),v=Math.cos(8*n),$=Math.sin(10*n);return n+n*s/4+7*n*l/64+15*n*u/256+579*n*c/16384+1515*n*h/65536+16837*n*d/1048576+(3*n*l/16+45*n*u/256-n*(32*r-561)*c/4096-n*(232*r-1677)*h/16384+n*(399985-90560*r+512*a)*d/5242880)*p+(21*n*u/256+483*n*c/4096-n*(224*r-1969)*h/16384-n*(33152*r-112599)*d/1048576)*m+(151*n*c/4096+4681*n*h/65536+1479*n*d/16384-453*o*d/32768)*x+(1097*n*h/65536+42783*n*d/1048576)*v+8011*n*d/1048576*Math.cos(10*n)+(3*s/8+3*l/16+213*u/2048-3*r*u/64+255*c/4096-33*r*c/512+20861*h/524288-33*r*h/512+a*h/1024+28273*d/1048576-471*r*d/8192+9*a*d/4096)*f+(21*l/256+21*u/256+533*c/8192-21*r*c/512+197*h/4096-315*r*h/4096+584039*d/16777216-12517*r*d/131072+7*a*d/2048)*_+(151*u/6144+151*c/4096+5019*h/131072-453*r*h/16384+26965*d/786432-8607*r*d/131072)*g+(1097*c/131072+1097*h/65536+225797*d/10485760-1097*r*d/65536)*y+(8011*h/2621440+8011*d/1048576)*$+293393*d/251658240*Math.sin(12*n)}function p$16(e,t){if(0===e)return Math.log(Math.tan(.5*(e$2d.PI_OVER_TWO+t)));var i=e*Math.sin(t);return Math.log(Math.tan(.5*(e$2d.PI_OVER_TWO+t)))-e/2*Math.log((1+i)/(1-i))}function G$1k(e,t,i,n,r){var o=p$16(e._ellipticity,i),a=p$16(e._ellipticity,r);return Math.atan2(e$2d.negativePiToPi(n-t),a-o)}function k$13(e,t,i,n,r,o,a){var s=e._heading,l=o-n,u=0;if(e$2d.equalsEpsilon(Math.abs(s),e$2d.PI_OVER_TWO,e$2d.EPSILON8))if(t===i)u=t*Math.cos(r)*e$2d.negativePiToPi(l);else{var c=Math.sin(r);u=t*Math.cos(r)*e$2d.negativePiToPi(l)/Math.sqrt(1-e._ellipticitySquared*c*c)}else{var h=T$18(e._ellipticity,t,r);u=(T$18(e._ellipticity,t,a)-h)/Math.cos(s)}return Math.abs(u)}var A$1h=new o$1p,q$1b=new o$1p;function D$12(e,t,i,n){var r=o$1p.normalize(n.cartographicToCartesian(t,q$1b),A$1h),o=o$1p.normalize(n.cartographicToCartesian(i,q$1b),q$1b);o$1q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(o$1p.angleBetween(r,o))-Math.PI),.0125);var a=n.maximumRadius,s=n.minimumRadius,l=a*a,u=s*s;e._ellipticitySquared=(l-u)/l,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=a$18.clone(t,e._start),e._start.height=0,e._end=a$18.clone(i,e._end),e._end.height=0,e._heading=G$1k(e,t.longitude,t.latitude,i.longitude,i.latitude),e._distance=k$13(e,n.maximumRadius,n.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude)}function W$15(e,t,i,n,r,o){var a,s,l,u=r*r;if(Math.abs(e$2d.PI_OVER_TWO-Math.abs(t))>e$2d.EPSILON8){s=z$10(T$18(r,n,e.latitude)+i*Math.cos(t),r,n);var c=p$16(r,e.latitude),h=p$16(r,s);l=Math.tan(t)*(h-c),a=e$2d.negativePiToPi(e.longitude+l)}else{var d;if(s=e.latitude,0===r)d=n*Math.cos(e.latitude);else{var f=Math.sin(e.latitude);d=n*Math.cos(e.latitude)/Math.sqrt(1-u*f*f)}l=i/d,a=t>0?e$2d.negativePiToPi(e.longitude+l):e$2d.negativePiToPi(e.longitude-l)}return e$2e(o)?(o.longitude=a,o.latitude=s,o.height=0,o):new a$18(a,s,0)}function P$15(e,t,i){var n=u$Z(i,t$12.WGS84);this._ellipsoid=n,this._start=new a$18,this._end=new a$18,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,e$2e(e)&&e$2e(t)&&D$12(this,e,t,n)}function a$_(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}function z$$(e,t,i){i=i||2;var n,r,o,a,s,l,u,c=t&&t.length,h=c?t[0]*i:e.length,d=P$14(e,0,h,i,!0),f=[];if(!d||d.next===d.prev)return f;if(c&&(d=K$Z(e,t,d,i)),e.length>80*i){n=o=e[0],r=a=e[1];for(var p=i;p<h;p+=i)(s=e[p])<n&&(n=s),(l=e[p+1])<r&&(r=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-n,a-r))?1/u:0}return g$1d(d,f,i,n,r,u),f}function P$14(e,t,i,n,r){var o,a;if(r===E$1k(e,t,i,n)>0)for(o=t;o<i;o+=n)a=D$11(o,e[o],e[o+1],a);else for(o=i-n;o>=t;o-=n)a=D$11(o,e[o],e[o+1],a);return a&&L$1d(a,a.next)&&(M$19(a),a=a.next),a}function Z$15(e,t){if(!e)return e;t||(t=e);var i,n=e;do{if(i=!1,n.steiner||!L$1d(n,n.next)&&0!==h$13(n.prev,n,n.next))n=n.next;else{if(M$19(n),(n=t=n.prev)===n.next)break;i=!0}}while(i||n!==t);return t}function g$1d(e,t,i,n,r,o,a){if(e){!a&&o&&_$10(e,n,r,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?V$13(e,n,r,o):O$R(e))t.push(s.i/i),t.push(e.i/i),t.push(l.i/i),M$19(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?g$1d(e=G$1j(Z$15(e),t,i),t,i,n,r,o,2):2===a&&J$12(e,t,i,n,r,o):g$1d(Z$15(e),t,i,n,r,o,1);break}}}function O$R(e){var t=e.prev,i=e,n=e.next;if(h$13(t,i,n)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(w$12(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&h$13(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function V$13(e,t,i,n){var r=e.prev,o=e,a=e.next;if(h$13(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,l=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,u=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=T$17(s,l,t,i,n),d=T$17(u,c,t,i,n),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&w$12(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&h$13(f.prev,f,f.next)>=0||(f=f.prevZ,p!==e.prev&&p!==e.next&&w$12(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&h$13(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&w$12(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&h$13(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&w$12(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&h$13(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function G$1j(e,t,i){var n=e;do{var r=n.prev,o=n.next.next;!L$1d(r,o)&&C$1b(r,n,n.next,o)&&F$1a(r,o)&&F$1a(o,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(o.i/i),M$19(n),M$19(n.next),n=e=o),n=n.next}while(n!==e);return Z$15(n)}function J$12(e,t,i,n,r,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Y$T(a,s)){var l=B$12(a,s);return a=Z$15(a,a.next),l=Z$15(l,l.next),g$1d(a,t,i,n,r,o),void g$1d(l,t,i,n,r,o)}s=s.next}a=a.next}while(a!==e)}function K$Z(e,t,i,n){var r,o,a,s=[];for(r=0,o=t.length;r<o;r++)(a=P$14(e,t[r]*n,r<o-1?t[r+1]*n:e.length,n,!1))===a.next&&(a.steiner=!0),s.push(X$10(a));for(s.sort(Q$16),r=0;r<s.length;r++)R$14(s[r],i),i=Z$15(i,i.next);return i}function Q$16(e,t){return e.x-t.x}function R$14(e,t){if(t=U$19(e,t)){var i=B$12(t,e);Z$15(i,i.next)}}function U$19(e,t){var i,n=t,r=e.x,o=e.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if(a=s,s===r){if(o===n.y)return n;if(o===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!i)return null;if(r===a)return i;var l,u=i,c=i.x,h=i.y,d=1/0;n=i;do{r>=n.x&&n.x>=c&&r!==n.x&&w$12(o<h?r:a,o,c,h,o<h?a:r,o,n.x,n.y)&&(l=Math.abs(o-n.y)/(r-n.x),F$1a(n,e)&&(l<d||l===d&&(n.x>i.x||n.x===i.x&&W$14(i,n)))&&(i=n,d=l)),n=n.next}while(n!==u);return i}function W$14(e,t){return h$13(e.prev,e,t.prev)<0&&h$13(t.next,e,e.next)<0}function _$10(e,t,i,n){var r=e;do{null===r.z&&(r.z=T$17(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,$$11(r)}function $$11(e){var t,i,n,r,o,a,s,l,u=1;do{for(i=e,e=null,o=null,a=0;i;){for(a++,n=i,s=0,t=0;t<u&&(s++,n=n.nextZ);t++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=n}o.nextZ=null,u*=2}while(a>1);return e}function T$17(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function X$10(e){var t=e,i=e;do{(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next}while(t!==e);return i}function w$12(e,t,i,n,r,o,a,s){return(r-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(n-s)-(i-a)*(t-s)>=0&&(i-a)*(o-s)-(r-a)*(n-s)>=0}function Y$T(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!I$1o(e,t)&&(F$1a(e,t)&&F$1a(t,e)&&S$_(e,t)&&(h$13(e.prev,e,t.prev)||h$13(e,t.prev,t))||L$1d(e,t)&&h$13(e.prev,e,e.next)>0&&h$13(t.prev,t,t.next)>0)}function h$13(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function L$1d(e,t){return e.x===t.x&&e.y===t.y}function C$1b(e,t,i,n){var r=H$17(h$13(e,t,i)),o=H$17(h$13(e,t,n)),a=H$17(h$13(i,n,e)),s=H$17(h$13(i,n,t));return!!(r!==o&&a!==s||0===r&&k$12(e,i,t)||0===o&&k$12(e,n,t)||0===a&&k$12(i,e,n)||0===s&&k$12(i,t,n))}function k$12(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function H$17(e){return e>0?1:e<0?-1:0}function I$1o(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&C$1b(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function F$1a(e,t){return h$13(e.prev,e,e.next)<0?h$13(e,t,e.next)>=0&&h$13(e,e.prev,t)>=0:h$13(e,t,e.prev)<0||h$13(e,e.next,t)<0}function S$_(e,t){var i=e,n=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}function B$12(e,t){var i=new A$1g(e.i,e.x,e.y),n=new A$1g(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function D$11(e,t,i,n){var r=new A$1g(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function M$19(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function A$1g(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E$1k(e,t,i,n){for(var r=0,o=t,a=i-n;o<i;o+=n)r+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return r}Object.defineProperties(P$15.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return o$1q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return o$1q.defined("distance",this._distance),this._heading}}}),P$15.fromStartHeadingDistance=function(e,t,i,n,r){o$1q.defined("start",e),o$1q.defined("heading",t),o$1q.defined("distance",i),o$1q.typeOf.number.greaterThan("distance",i,0);var o=u$Z(n,t$12.WGS84),a=o.maximumRadius,s=o.minimumRadius,l=a*a,u=s*s,c=Math.sqrt((l-u)/l),h=W$15(e,t=e$2d.negativePiToPi(t),i,o.maximumRadius,c);return!e$2e(r)||e$2e(n)&&!n.equals(r.ellipsoid)?new P$15(e,h,o):(r.setEndPoints(e,h),r)},P$15.prototype.setEndPoints=function(e,t){o$1q.defined("start",e),o$1q.defined("end",t),D$12(this,e,t,this._ellipsoid)},P$15.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)},P$15.prototype.interpolateUsingSurfaceDistance=function(e,t){if(o$1q.typeOf.number("distance",e),!e$2e(this._distance)||0===this._distance)throw new t$15("EllipsoidRhumbLine must have distinct start and end set.");return W$15(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)},P$15.prototype.findIntersectionWithLongitude=function(e,t){if(o$1q.typeOf.number("intersectionLongitude",e),!e$2e(this._distance)||0===this._distance)throw new t$15("EllipsoidRhumbLine must have distinct start and end set.");var i=this._ellipticity,n=this._heading,r=Math.abs(n),o=this._start;if(e=e$2d.negativePiToPi(e),e$2d.equalsEpsilon(Math.abs(e),Math.PI,e$2d.EPSILON14)&&(e=e$2d.sign(o.longitude)*Math.PI),e$2e(t)||(t=new a$18),Math.abs(e$2d.PI_OVER_TWO-r)<=e$2d.EPSILON8)return t.longitude=e,t.latitude=o.latitude,t.height=0,t;if(e$2d.equalsEpsilon(Math.abs(e$2d.PI_OVER_TWO-r),e$2d.PI_OVER_TWO,e$2d.EPSILON8))return e$2d.equalsEpsilon(e,o.longitude,e$2d.EPSILON12)?void 0:(t.longitude=e,t.latitude=e$2d.PI_OVER_TWO*e$2d.sign(e$2d.PI_OVER_TWO-n),t.height=0,t);var a,s=o.latitude,l=i*Math.sin(s),u=Math.tan(.5*(e$2d.PI_OVER_TWO+s))*Math.exp((e-o.longitude)/Math.tan(n)),c=(1+l)/(1-l),h=o.latitude;do{a=h;var d=i*Math.sin(a),f=(1+d)/(1-d);h=2*Math.atan(u*Math.pow(f/c,i/2))-e$2d.PI_OVER_TWO}while(!e$2d.equalsEpsilon(h,a,e$2d.EPSILON12));return t.longitude=e,t.latitude=h,t.height=0,t},P$15.prototype.findIntersectionWithLatitude=function(e,t){if(o$1q.typeOf.number("intersectionLatitude",e),!e$2e(this._distance)||0===this._distance)throw new t$15("EllipsoidRhumbLine must have distinct start and end set.");var i=this._ellipticity,n=this._heading,r=this._start;if(!e$2d.equalsEpsilon(Math.abs(n),e$2d.PI_OVER_TWO,e$2d.EPSILON8)){var o=p$16(i,r.latitude),a=p$16(i,e),s=Math.tan(n)*(a-o),l=e$2d.negativePiToPi(r.longitude+s);return e$2e(t)?(t.longitude=l,t.latitude=e,t.height=0,t):new a$18(l,e,0)}},z$$.deviation=function(e,t,i,n){var r=t&&t.length,o=r?t[0]*i:e.length,a=Math.abs(E$1k(e,0,o,i));if(r)for(var s=0,l=t.length;s<l;s++){var u=t[s]*i,c=s<l-1?t[s+1]*i:e.length;a-=Math.abs(E$1k(e,u,c,i))}var h=0;for(s=0;s<n.length;s+=3){var d=n[s]*i,f=n[s+1]*i,p=n[s+2]*i;h+=Math.abs((e[d]-e[p])*(e[f+1]-e[d+1])-(e[d]-e[f])*(e[p+1]-e[d+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},z$$.flatten=function(e){for(var t=e[0][0].length,i={vertices:[],holes:[],dimensions:t},n=0,r=0;r<e.length;r++){for(var o=0;o<e[r].length;o++)for(var a=0;a<t;a++)i.vertices.push(e[r][o][a]);r>0&&(n+=e[r-1].length,i.holes.push(n))}return i};var e$1$={CLOCKWISE:de$y.CW,COUNTER_CLOCKWISE:de$y.CCW,NONE:de$y.NONE,validate:function(e){return e===e$1$.CLOCKWISE||e===e$1$.COUNTER_CLOCKWISE}},W$13=Object.freeze(e$1$),nr$c=new o$1p,ur$8=new o$1p,A$1f={computeArea2D:function(e){o$1q.defined("positions",e),o$1q.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);for(var t=e.length,i=0,n=t-1,r=0;r<t;n=r++){var o=e[n],a=e[r];i+=o.x*a.y-a.x*o.y}return.5*i},computeWindingOrder2D:function(e){return A$1f.computeArea2D(e)>0?W$13.COUNTER_CLOCKWISE:W$13.CLOCKWISE},triangulate:function(e,t){return o$1q.defined("positions",e),z$$(o$1o.packArray(e),t,2)}},X$$=new o$1p,Y$S=new o$1p,Z$14=new o$1p,$$10=new o$1p,H$16=new o$1p,rr$c=new o$1p,g$1c=new o$1p;A$1f.computeSubdivision=function(e,t,i,n,r){r=u$Z(r,!1),n=u$Z(n,e$2d.RADIANS_PER_DEGREE),o$1q.typeOf.object("ellipsoid",e),o$1q.defined("positions",t),o$1q.defined("indices",i),o$1q.typeOf.number.greaterThanOrEquals("indices.length",i.length,3),o$1q.typeOf.number.equals("indices.length % 3","0",i.length%3,0),o$1q.typeOf.number.greaterThan("granularity",n,0);var o,a=i.slice(0),s=t.length,l=new Array(3*s),u=0;for(o=0;o<s;o++){var c=t[o];l[u++]=c.x,l[u++]=c.y,l[u++]=c.z}for(var h=[],d={},f=e.maximumRadius,p=e$2d.chordLength(n,f),_=p*p;a.length>0;){var m,g,x=a.pop(),y=a.pop(),v=a.pop(),$=o$1p.fromArray(l,3*v,X$$),b=o$1p.fromArray(l,3*y,Y$S),T=o$1p.fromArray(l,3*x,Z$14),C=r?$:o$1p.multiplyByScalar(o$1p.normalize($,$$10),f,$$10),S=r?b:o$1p.multiplyByScalar(o$1p.normalize(b,H$16),f,H$16),w=r?T:o$1p.multiplyByScalar(o$1p.normalize(T,rr$c),f,rr$c),E=o$1p.magnitudeSquared(o$1p.subtract(C,S,g$1c)),P=o$1p.magnitudeSquared(o$1p.subtract(S,w,g$1c)),A=o$1p.magnitudeSquared(o$1p.subtract(w,C,g$1c)),L=Math.max(E,P,A);L>_?E===L?(e$2e(o=d[m=Math.min(v,y)+" "+Math.max(v,y)])||(g=o$1p.add($,b,g$1c),o$1p.multiplyByScalar(g,.5,g),l.push(g.x,g.y,g.z),o=l.length/3-1,d[m]=o),a.push(v,o,x),a.push(o,y,x)):P===L?(e$2e(o=d[m=Math.min(y,x)+" "+Math.max(y,x)])||(g=o$1p.add(b,T,g$1c),o$1p.multiplyByScalar(g,.5,g),l.push(g.x,g.y,g.z),o=l.length/3-1,d[m]=o),a.push(y,o,v),a.push(o,x,v)):A===L&&(e$2e(o=d[m=Math.min(x,v)+" "+Math.max(x,v)])||(g=o$1p.add(T,$,g$1c),o$1p.multiplyByScalar(g,.5,g),l.push(g.x,g.y,g.z),o=l.length/3-1,d[m]=o),a.push(x,o,y),a.push(o,v,y)):(h.push(v),h.push(y),h.push(x))}return new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:l})},indices:h,primitiveType:W$18.TRIANGLES})};var or$9=new a$18,hr$6=new a$18,vr$7=new a$18,F$19=new a$18;function r$17(){this._array=[],this._offset=0,this._length=0}A$1f.computeRhumbLineSubdivision=function(e,t,i,n){n=u$Z(n,e$2d.RADIANS_PER_DEGREE),o$1q.typeOf.object("ellipsoid",e),o$1q.defined("positions",t),o$1q.defined("indices",i),o$1q.typeOf.number.greaterThanOrEquals("indices.length",i.length,3),o$1q.typeOf.number.equals("indices.length % 3","0",i.length%3,0),o$1q.typeOf.number.greaterThan("granularity",n,0);var r,o=i.slice(0),a=t.length,s=new Array(3*a),l=0;for(r=0;r<a;r++){var u=t[r];s[l++]=u.x,s[l++]=u.y,s[l++]=u.z}for(var c=[],h={},d=e.maximumRadius,f=e$2d.chordLength(n,d),p=new P$15(void 0,void 0,e),_=new P$15(void 0,void 0,e),m=new P$15(void 0,void 0,e);o.length>0;){var g=o.pop(),x=o.pop(),y=o.pop(),v=o$1p.fromArray(s,3*y,X$$),$=o$1p.fromArray(s,3*x,Y$S),b=o$1p.fromArray(s,3*g,Z$14),T=e.cartesianToCartographic(v,or$9),C=e.cartesianToCartographic($,hr$6),S=e.cartesianToCartographic(b,vr$7);p.setEndPoints(T,C);var w=p.surfaceDistance;_.setEndPoints(C,S);var E=_.surfaceDistance;m.setEndPoints(S,T);var P,A,L,M,R=m.surfaceDistance,O=Math.max(w,E,R);O>f?w===O?(e$2e(r=h[P=Math.min(y,x)+" "+Math.max(y,x)])||(A=p.interpolateUsingFraction(.5,F$19),L=.5*(T.height+C.height),M=o$1p.fromRadians(A.longitude,A.latitude,L,e,g$1c),s.push(M.x,M.y,M.z),r=s.length/3-1,h[P]=r),o.push(y,r,g),o.push(r,x,g)):E===O?(e$2e(r=h[P=Math.min(x,g)+" "+Math.max(x,g)])||(A=_.interpolateUsingFraction(.5,F$19),L=.5*(C.height+S.height),M=o$1p.fromRadians(A.longitude,A.latitude,L,e,g$1c),s.push(M.x,M.y,M.z),r=s.length/3-1,h[P]=r),o.push(x,r,y),o.push(r,g,y)):R===O&&(e$2e(r=h[P=Math.min(g,y)+" "+Math.max(g,y)])||(A=m.interpolateUsingFraction(.5,F$19),L=.5*(S.height+T.height),M=o$1p.fromRadians(A.longitude,A.latitude,L,e,g$1c),s.push(M.x,M.y,M.z),r=s.length/3-1,h[P]=r),o.push(g,r,x),o.push(r,y,x)):(c.push(y),c.push(x),c.push(g))}return new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:s})},indices:c,primitiveType:W$18.TRIANGLES})},A$1f.scaleToGeodeticHeight=function(e,t,i,n){i=u$Z(i,t$12.WGS84);var r=nr$c,o=ur$8;if(t=u$Z(t,0),n=u$Z(n,!0),e$2e(e))for(var a=e.length,s=0;s<a;s+=3)o$1p.fromArray(e,s,o),n&&(o=i.scaleToGeodeticSurface(o,o)),0!==t&&(r=i.geodeticSurfaceNormal(o,r),o$1p.multiplyByScalar(r,t,r),o$1p.add(o,r,o)),e[s]=o.x,e[s+1]=o.y,e[s+2]=o.z;return e},Object.defineProperties(r$17.prototype,{length:{get:function(){return this._length}}}),r$17.prototype.enqueue=function(e){this._array.push(e),this._length++},r$17.prototype.dequeue=function(){if(0!==this._length){var e=this._array,t=this._offset,i=e[t];return e[t]=void 0,++t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,i}},r$17.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},r$17.prototype.contains=function(e){return-1!==this._array.indexOf(e)},r$17.prototype.clear=function(){this._array.length=this._offset=this._length=0},r$17.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var y$Z={computeHierarchyPackedLength:function(e){for(var t=0,i=[e];i.length>0;){var n=i.pop();if(e$2e(n)){t+=2;var r=n.positions,o=n.holes;if(e$2e(r)&&(t+=r.length*o$1p.packedLength),e$2e(o))for(var a=o.length,s=0;s<a;++s)i.push(o[s])}}return t},packPolygonHierarchy:function(e,t,i){for(var n=[e];n.length>0;){var r=n.pop();if(e$2e(r)){var o=r.positions,a=r.holes;if(t[i++]=e$2e(o)?o.length:0,t[i++]=e$2e(a)?a.length:0,e$2e(o))for(var s=o.length,l=0;l<s;++l,i+=3)o$1p.pack(o[l],t,i);if(e$2e(a))for(var u=a.length,c=0;c<u;++c)n.push(a[c])}}return i},unpackPolygonHierarchy:function(e,t){for(var i=e[t++],n=e[t++],r=new Array(i),o=n>0?new Array(n):void 0,a=0;a<i;++a,t+=o$1p.packedLength)r[a]=o$1p.unpack(e,t);for(var s=0;s<n;++s)o[s]=y$Z.unpackPolygonHierarchy(e,t),t=o[s].startingIndex,delete o[s].startingIndex;return{positions:r,holes:o,startingIndex:t}}},G$1i=new o$1p;function P$13(e,t,i,n){return o$1p.subtract(t,e,G$1i),o$1p.multiplyByScalar(G$1i,i/n,G$1i),o$1p.add(e,G$1i,G$1i),[G$1i.x,G$1i.y,G$1i.z]}y$Z.subdivideLineCount=function(e,t,i){var n=o$1p.distance(e,t)/i,r=Math.max(0,Math.ceil(e$2d.log2(n)));return Math.pow(2,r)};var _$$=new a$18,Q$15=new a$18,j$1e=new a$18,rr$b=new o$1p;y$Z.subdivideRhumbLineCount=function(e,t,i,n){var r=new P$15(e.cartesianToCartographic(t,_$$),e.cartesianToCartographic(i,Q$15),e).surfaceDistance/n,o=Math.max(0,Math.ceil(e$2d.log2(r)));return Math.pow(2,o)},y$Z.subdivideLine=function(e,t,i,n){var r=y$Z.subdivideLineCount(e,t,i),o=o$1p.distance(e,t),a=o/r;e$2e(n)||(n=[]);var s=n;s.length=3*r;for(var l=0,u=0;u<r;u++){var c=P$13(e,t,u*a,o);s[l++]=c[0],s[l++]=c[1],s[l++]=c[2]}return s},y$Z.subdivideRhumbLine=function(e,t,i,n,r){var o=new P$15(e.cartesianToCartographic(t,_$$),e.cartesianToCartographic(i,Q$15),e),a=o.surfaceDistance/n,s=Math.max(0,Math.ceil(e$2d.log2(a))),l=Math.pow(2,s),u=o.surfaceDistance/l;e$2e(r)||(r=[]);var c=r;c.length=3*l;for(var h=0,d=0;d<l;d++){var f=o.interpolateUsingSurfaceDistance(d*u,j$1e),p=e.cartographicToCartesian(f,rr$b);c[h++]=p.x,c[h++]=p.y,c[h++]=p.z}return c};var ar$9=new o$1p,er$c=new o$1p,tr$a=new o$1p,nr$b=new o$1p;y$Z.scaleToGeodeticHeightExtruded=function(e,t,i,n,r){n=u$Z(n,t$12.WGS84);var o=ar$9,a=er$c,s=tr$a,l=nr$b;if(e$2e(e)&&e$2e(e.attributes)&&e$2e(e.attributes.position))for(var u=e.attributes.position.values,c=u.length/2,h=0;h<c;h+=3)o$1p.fromArray(u,h,s),n.geodeticSurfaceNormal(s,o),l=n.scaleToGeodeticSurface(s,l),a=o$1p.multiplyByScalar(o,i,a),a=o$1p.add(l,a,a),u[h+c]=a.x,u[h+1+c]=a.y,u[h+2+c]=a.z,r&&(l=o$1p.clone(s,l)),a=o$1p.multiplyByScalar(o,t,a),a=o$1p.add(l,a,a),u[h]=a.x,u[h+1]=a.y,u[h+2]=a.z;return e},y$Z.polygonOutlinesFromHierarchy=function(e,t,i){var n,r,o,a=[],s=new r$17;for(s.enqueue(e);0!==s.length;){var l=s.dequeue(),u=l.positions;if(t)for(o=u.length,n=0;n<o;n++)i.scaleToGeodeticSurface(u[n],u[n]);if(!((u=D$13(u,o$1p.equalsEpsilon,!0)).length<3)){var c=l.holes?l.holes.length:0;for(n=0;n<c;n++){var h=l.holes[n],d=h.positions;if(t)for(o=d.length,r=0;r<o;++r)i.scaleToGeodeticSurface(d[r],d[r]);if(!((d=D$13(d,o$1p.equalsEpsilon,!0)).length<3)){a.push(d);var f=0;for(e$2e(h.holes)&&(f=h.holes.length),r=0;r<f;r++)s.enqueue(h.holes[r])}}a.push(u)}}return a};var vr$6=new o$1p(6378137,6378137,6378137);y$Z.polygonsFromHierarchy=function(e,t,i,n){var r=[],o=[],a=new r$17;for(a.enqueue(e);0!==a.length;){var s,l,u,c=a.dequeue(),h=c.positions,d=c.holes,f=h.slice();if(i)for(l=h.length,s=0;s<l;s++)n.scaleToGeodeticSurface(h[s],f[s]);if(e$2e(n)&&!o$1p.equals(n._radii,vr$6)&&(u=e$2d.EPSILON7),!((h=D$13(f,o$1p.equalsEpsilon,!0,u)).length<3)){var p=t(h);if(e$2e(p)){var _=[],m=A$1f.computeWindingOrder2D(p);m===W$13.CLOCKWISE&&(p.reverse(),h=h.slice().reverse());var g,x=h.slice(),y=e$2e(d)?d.length:0,v=[];for(s=0;s<y;s++){var $=d[s],b=$.positions;if(i)for(l=b.length,g=0;g<l;++g)n.scaleToGeodeticSurface(b[g],b[g]);if(!((b=D$13(b,o$1p.equalsEpsilon,!0,e$2d.EPSILON7)).length<3)){var T=t(b);if(e$2e(T)){(m=A$1f.computeWindingOrder2D(T))===W$13.CLOCKWISE&&(T.reverse(),b=b.slice().reverse()),v.push(b),_.push(x.length),x=x.concat(b),p=p.concat(T);var C=0;for(e$2e($.holes)&&(C=$.holes.length),g=0;g<C;g++)a.enqueue($.holes[g])}}}r.push({outerRing:h,holes:v}),o.push({positions:x,positions2D:p,holes:_})}}}return{hierarchy:r,polygons:o}};var cr$7=new o$1o,ur$7=new o$1p,fr$4=new n$15,ir$7=new p$1e;y$Z.computeBoundingRectangle=function(e,t,i,n,r){for(var o=n$15.fromAxisAngle(e,n,fr$4),a=p$1e.fromQuaternion(o,ir$7),s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,h=i.length,d=0;d<h;++d){var f=o$1p.clone(i[d],ur$7);p$1e.multiplyByVector(a,f,f);var p=t(f,cr$7);e$2e(p)&&(s=Math.min(s,p.x),l=Math.max(l,p.x),u=Math.min(u,p.y),c=Math.max(c,p.y))}return r.x=s,r.y=u,r.width=l-s,r.height=c-u,r},y$Z.createGeometryFromPositions=function(e,t,i,n,r,o){var a=A$1f.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);var s=t.positions;if(n){for(var l=s.length,u=new Array(3*l),c=0,h=0;h<l;h++){var d=s[h];u[c++]=d.x,u[c++]=d.y,u[c++]=d.z}var f=new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:u})},indices:a,primitiveType:W$18.TRIANGLES});return r.normal?k$14.computeNormal(f):f}return o===m$1h.GEODESIC?A$1f.computeSubdivision(e,s,a,i):o===m$1h.RHUMB?A$1f.computeRhumbLineSubdivision(e,s,a,i):void 0};var K$Y=[],mr$6=new o$1p,or$8=new o$1p;function n$13(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.position=u$Z(e.position,!1),this.normal=u$Z(e.normal,!1),this.st=u$Z(e.st,!1),this.bitangent=u$Z(e.bitangent,!1),this.tangent=u$Z(e.tangent,!1),this.color=u$Z(e.color,!1)}y$Z.computeWallGeometry=function(e,t,i,n,r){var o,a,s,l,u,c=e.length,h=0;if(n)for(a=3*c*2,o=new Array(2*a),s=0;s<c;s++)l=e[s],u=e[(s+1)%c],o[h]=o[h+a]=l.x,o[++h]=o[h+a]=l.y,o[++h]=o[h+a]=l.z,o[++h]=o[h+a]=u.x,o[++h]=o[h+a]=u.y,o[++h]=o[h+a]=u.z,++h;else{var d=e$2d.chordLength(i,t.maximumRadius),f=0;if(r===m$1h.GEODESIC)for(s=0;s<c;s++)f+=y$Z.subdivideLineCount(e[s],e[(s+1)%c],d);else if(r===m$1h.RHUMB)for(s=0;s<c;s++)f+=y$Z.subdivideRhumbLineCount(t,e[s],e[(s+1)%c],d);for(a=3*(f+c),o=new Array(2*a),s=0;s<c;s++){var p;l=e[s],u=e[(s+1)%c],r===m$1h.GEODESIC?p=y$Z.subdivideLine(l,u,d,K$Y):r===m$1h.RHUMB&&(p=y$Z.subdivideRhumbLine(t,l,u,d,K$Y));for(var _=p.length,m=0;m<_;++m,++h)o[h]=p[m],o[h+a]=p[m];o[h]=u.x,o[h+a]=u.x,o[++h]=u.y,o[h+a]=u.y,o[++h]=u.z,o[h+a]=u.z,++h}}c=o.length;var g=ce$z.createTypedArray(c/3,c-6*e.length),x=0;for(c/=6,s=0;s<c;s++){var y=s,v=y+1,$=y+c,b=$+1;l=o$1p.fromArray(o,3*y,mr$6),u=o$1p.fromArray(o,3*v,or$8),!o$1p.equalsEpsilon(l,u,e$2d.EPSILON10,e$2d.EPSILON10)&&(g[x++]=y,g[x++]=$,g[x++]=v,g[x++]=v,g[x++]=$,g[x++]=b)}return new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:o})}),indices:g,primitiveType:W$18.TRIANGLES})},n$13.POSITION_ONLY=Object.freeze(new n$13({position:!0})),n$13.POSITION_AND_NORMAL=Object.freeze(new n$13({position:!0,normal:!0})),n$13.POSITION_NORMAL_AND_ST=Object.freeze(new n$13({position:!0,normal:!0,st:!0})),n$13.POSITION_AND_ST=Object.freeze(new n$13({position:!0,st:!0})),n$13.POSITION_AND_COLOR=Object.freeze(new n$13({position:!0,color:!0})),n$13.ALL=Object.freeze(new n$13({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0})),n$13.DEFAULT=n$13.POSITION_NORMAL_AND_ST,n$13.packedLength=6,n$13.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),t[i++]=e.position?1:0,t[i++]=e.normal?1:0,t[i++]=e.st?1:0,t[i++]=e.tangent?1:0,t[i++]=e.bitangent?1:0,t[i]=e.color?1:0,t},n$13.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");return t=u$Z(t,0),e$2e(i)||(i=new n$13),i.position=1===e[t++],i.normal=1===e[t++],i.st=1===e[t++],i.tangent=1===e[t++],i.bitangent=1===e[t++],i.color=1===e[t],i},n$13.clone=function(e,t){if(e$2e(e))return e$2e(t)||(t=new n$13),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var Se$i=new a$18,Ee$s=new a$18;function Ve$l(e,t,i,n){var r=n.cartesianToCartographic(e,Se$i).height,o=n.cartesianToCartographic(t,Ee$s);o.height=r,n.cartographicToCartesian(o,t);var a=n.cartesianToCartographic(i,Ee$s);a.height=r-100,n.cartographicToCartesian(a,i)}var Be$o=new f$1a,ke$i=new o$1p,ze$h=new o$1p,Ue$k=new o$1p,Ye$j=new o$1p,We$m=new o$1p,je$i=new o$1p,ve$x=new o$1p,Q$14=new o$1p,I$1n=new o$1p,Me$r=new o$1o,Qe$d=new o$1o,qe$f=new o$1p,He$h=new n$15,Ke$d=new p$1e,Ze$9=new p$1e;function pe$D(e){var t=e.vertexFormat,i=e.geometry,n=e.shadowVolume,r=i.attributes.position.values,o=r.length,a=e.wall,s=e.top||a,l=e.bottom||a;if(t.st||t.normal||t.tangent||t.bitangent||n){var u=e.boundingRectangle,c=e.tangentPlane,h=e.ellipsoid,d=e.stRotation,f=e.perPositionHeight,p=Me$r;p.x=u.x,p.y=u.y;var _,m=e.isComputeTexCoord?new Float32Array(o):new Float32Array(o/3*2),g=t.st?m:void 0;t.normal&&(_=f&&s&&!a?i.attributes.normal.values:new Float32Array(o));var x=t.tangent?new Float32Array(o):void 0,y=t.bitangent?new Float32Array(o):void 0,v=n?new Float32Array(o):void 0,$=0,b=0,T=ze$h,C=Ue$k,S=Ye$j,w=!0,E=Ke$d,P=Ze$9;if(0!==d){var A=n$15.fromAxisAngle(c._plane.normal,d,He$h);E=p$1e.fromQuaternion(A,E),A=n$15.fromAxisAngle(c._plane.normal,-d,He$h),P=p$1e.fromQuaternion(A,P)}else E=p$1e.clone(p$1e.IDENTITY,E),P=p$1e.clone(p$1e.IDENTITY,P);var L=0,M=0;s&&l&&(L=o/2,M=o/3,o/=2);for(var R=0;R<o;R+=3){var O=o$1p.fromArray(r,R,qe$f);if(t.st){var D=p$1e.multiplyByVector(E,O,ke$i);D=h.scaleToGeodeticSurface(D,D);var I=c.projectPointOntoPlane(D,Qe$d);o$1o.subtract(I,p,I);var B=e$2d.clamp(I.x/u.width,0,1),F=e$2d.clamp(I.y/u.height,0,1);l&&(g[$+M]=B,g[$+1+M]=F),s&&(g[$]=B,g[$+1]=F),$+=2}if(t.normal||t.tangent||t.bitangent||n){var N=b+1,G=b+2;if(a){if(R+3<o){var z=o$1p.fromArray(r,R+3,We$m);if(w){var U=o$1p.fromArray(r,R+o,je$i);f&&Ve$l(O,z,U,h),o$1p.subtract(z,O,z),o$1p.subtract(U,O,U),T=o$1p.normalize(o$1p.cross(U,z,T),T),w=!1}o$1p.equalsEpsilon(z,O,e$2d.EPSILON10)&&(w=!0)}(t.tangent||t.bitangent)&&(S=h.geodeticSurfaceNormal(O,S),t.tangent&&(C=o$1p.normalize(o$1p.cross(S,T,C),C)))}else T=h.geodeticSurfaceNormal(O,T),(t.tangent||t.bitangent)&&(f&&(ve$x=o$1p.fromArray(_,b,ve$x),Q$14=o$1p.cross(o$1p.UNIT_Z,ve$x,Q$14),Q$14=o$1p.normalize(p$1e.multiplyByVector(P,Q$14,Q$14),Q$14),t.bitangent&&(I$1n=o$1p.normalize(o$1p.cross(ve$x,Q$14,I$1n),I$1n))),C=o$1p.cross(o$1p.UNIT_Z,T,C),C=o$1p.normalize(p$1e.multiplyByVector(P,C,C),C),t.bitangent&&(S=o$1p.normalize(o$1p.cross(T,C,S),S)));t.normal&&(e.wall?(_[b+L]=T.x,_[N+L]=T.y,_[G+L]=T.z):l&&(_[b+L]=-T.x,_[N+L]=-T.y,_[G+L]=-T.z),(s&&!f||a)&&(_[b]=T.x,_[N]=T.y,_[G]=T.z)),n&&(a&&(T=h.geodeticSurfaceNormal(O,T)),v[b+L]=-T.x,v[N+L]=-T.y,v[G+L]=-T.z),t.tangent&&(e.wall?(x[b+L]=C.x,x[N+L]=C.y,x[G+L]=C.z):l&&(x[b+L]=-C.x,x[N+L]=-C.y,x[G+L]=-C.z),s&&(f?(x[b]=Q$14.x,x[N]=Q$14.y,x[G]=Q$14.z):(x[b]=C.x,x[N]=C.y,x[G]=C.z))),t.bitangent&&(l&&(y[b+L]=S.x,y[N+L]=S.y,y[G+L]=S.z),s&&(f?(y[b]=I$1n.x,y[N]=I$1n.y,y[G]=I$1n.z):(y[b]=S.x,y[N]=S.y,y[G]=S.z))),b+=3}}t.st&&(i.attributes.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:g})),t.normal&&(i.attributes.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:_})),t.tangent&&(i.attributes.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:x})),t.bitangent&&(i.attributes.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:y})),n&&(i.attributes.extrudeDirection=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:v}))}if(e.extrude&&e$2e(e.offsetAttribute)){var V=r.length/3,k=new Uint8Array(V);if(e.offsetAttribute===_0x39c22a.TOP)s&&l||a?k=d$1s(k,1,0,V/2):s&&(k=d$1s(k,1));else k=d$1s(k,e.offsetAttribute===_0x39c22a.NONE?0:1);i.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:k})}return i}var Ce$l=new a$18,De$o=new a$18,Ce$l=new a$18,De$o=new a$18,Z$13={westOverIDL:0,eastOverIDL:0},ee$A=new E$1t;function Ae$v(e,t,i,n,r){if(r=u$Z(r,new h$18),!e$2e(e)||e.length<3)return r.west=0,r.north=0,r.south=0,r.east=0,r;if(i===m$1h.RHUMB)return h$18.fromCartesianArray(e,t,r);ee$A.ellipsoid.equals(t)||(ee$A=new E$1t(void 0,void 0,t)),r.west=Number.POSITIVE_INFINITY,r.east=Number.NEGATIVE_INFINITY,r.south=Number.POSITIVE_INFINITY,r.north=Number.NEGATIVE_INFINITY,Z$13.westOverIDL=Number.POSITIVE_INFINITY,Z$13.eastOverIDL=Number.NEGATIVE_INFINITY;for(var o,a=1/e$2d.chordLength(n,t.maximumRadius),s=e.length,l=t.cartesianToCartographic(e[0],De$o),u=Ce$l,c=1;c<s;c++)o=u,u=l,l=t.cartesianToCartographic(e[c],o),ee$A.setEndPoints(u,l),be$v(ee$A,a,r,Z$13);return o=u,u=l,l=t.cartesianToCartographic(e[0],o),ee$A.setEndPoints(u,l),be$v(ee$A,a,r,Z$13),r.east-r.west>Z$13.eastOverIDL-Z$13.westOverIDL&&(r.west=Z$13.westOverIDL,r.east=Z$13.eastOverIDL,r.east>e$2d.PI&&(r.east=r.east-e$2d.TWO_PI),r.west>e$2d.PI&&(r.west=r.west-e$2d.TWO_PI)),r}var Je$a=new a$18;function be$v(e,t,i,n){for(var r=e.surfaceDistance,o=Math.ceil(r*t),a=o>0?r/(o-1):Number.POSITIVE_INFINITY,s=0,l=0;l<o;l++){var u=e.interpolateUsingSurfaceDistance(s,Je$a);s+=a;var c=u.longitude,h=u.latitude;i.west=Math.min(i.west,c),i.east=Math.max(i.east,c),i.south=Math.min(i.south,h),i.north=Math.max(i.north,h);var d=c>=0?c:c+e$2d.TWO_PI;n.westOverIDL=Math.min(n.westOverIDL,d),n.eastOverIDL=Math.max(n.eastOverIDL,d)}}var Ne$l=[];function Xe$g(e,t,i,n,r,o,a,s,l,u){var c,h={walls:[]};if(o||a){var d,f,p=y$Z.createGeometryFromPositions(e,t,i,r,s,l),_=p.attributes.position.values,m=p.indices;if(o&&a){var g=_.concat(_);d=g.length/3,(f=ce$z.createTypedArray(d,2*m.length)).set(m);var x=m.length,y=d/2;for(c=0;c<x;c+=3){var v=f[c]+y,$=f[c+1]+y,b=f[c+2]+y;f[c+x]=b,f[c+1+x]=$,f[c+2+x]=v}if(p.attributes.position.values=g,r&&s.normal){var T=p.attributes.normal.values;p.attributes.normal.values=new Float32Array(g.length),p.attributes.normal.values.set(T)}p.indices=f}else if(a){for(d=_.length/3,f=ce$z.createTypedArray(d,m.length),c=0;c<m.length;c+=3)f[c]=m[c+2],f[c+1]=m[c+1],f[c+2]=m[c];p.indices=f}h.topAndBottom=new d$1o({geometry:p})}var C,S=n.outerRing,w=f$16.fromPoints(S,e),E=w.projectPointsOntoPlane(S,Ne$l),P=A$1f.computeWindingOrder2D(E);P===W$13.CLOCKWISE&&(S=S.slice().reverse()),u&&(C=y$Z.computeWallGeometry(S,e,i,r,l),h.walls.push(new d$1o({geometry:C})));var A=n.holes;for(c=0;c<A.length;c++){var L=A[c];E=(w=f$16.fromPoints(L,e)).projectPointsOntoPlane(L,Ne$l),(P=A$1f.computeWindingOrder2D(E))===W$13.COUNTER_CLOCKWISE&&(L=L.slice().reverse()),C=y$Z.computeWallGeometry(L,e,i,r,l),h.walls.push(new d$1o({geometry:C}))}return h}function U$18(e){if(o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e$2e(e.perPositionHeight)&&e.perPositionHeight&&e$2e(e.height))throw new t$15("Cannot use both options.perPositionHeight and options.height");if(e$2e(e.arcType)&&e.arcType!==m$1h.GEODESIC&&e.arcType!==m$1h.RHUMB)throw new t$15("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var t=e.polygonHierarchy,i=u$Z(e.vertexFormat,n$13.DEFAULT),n=u$Z(e.ellipsoid,t$12.WGS84),r=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),o=u$Z(e.stRotation,0),a=u$Z(e.perPositionHeight,!1),s=a&&e$2e(e.extrudedHeight),l=u$Z(e.height,0),u=u$Z(e.extrudedHeight,l);if(!s){var c=Math.max(l,u);u=Math.min(l,u),l=c}this._vertexFormat=n$13.clone(i),this._ellipsoid=t$12.clone(n),this._granularity=r,this._stRotation=o,this._height=l,this._extrudedHeight=u,this._closeTop=u$Z(e.closeTop,!0),this._closeBottom=u$Z(e.closeBottom,!0),this._extrudeOutering=u$Z(e.extrudeOutering,!0),this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=s,this._shadowVolume=u$Z(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=u$Z(e.arcType,m$1h.GEODESIC),this._groundBottomAltitude=u$Z(e.groundBottomAltitude,0),this._groundExtrudedHeight=u$Z(e.groundExtrudedHeight,0),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this.packedLength=y$Z.computeHierarchyPackedLength(t)+t$12.packedLength+n$13.packedLength+12}U$18.fromPositions=function(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new U$18({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType})},U$18.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),i=y$Z.packPolygonHierarchy(e._polygonHierarchy,t,i),t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._stRotation,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._closeTop?1:0,t[i++]=e._closeBottom?1:0,t[i++]=e._shadowVolume?1:0,t[i++]=u$Z(e._offsetAttribute,-1),t[i++]=e._arcType,t[i]=e.packedLength,t};var $e$c=t$12.clone(t$12.UNIT_SPHERE),Ge$i=new n$13,xe$r={polygonHierarchy:{}};function Ie$o(e){var t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];var i=e._ellipsoid,n=e._polygonHierarchy.positions,r=e.rectangle;return I$1p._textureCoordinateRotationPoints(n,t,i,r)}U$18.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=y$Z.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=t$12.unpack(e,t,$e$c);t+=t$12.packedLength;var o=n$13.unpack(e,t,Ge$i);t+=n$13.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=1===e[t++],h=1===e[t++],d=1===e[t++],f=1===e[t++],p=1===e[t++],_=e[t++],m=e[t++],g=e[t];return e$2e(i)||(i=new U$18(xe$r)),i._polygonHierarchy=n,i._ellipsoid=t$12.clone(r,i._ellipsoid),i._vertexFormat=n$13.clone(o,i._vertexFormat),i._height=a,i._extrudedHeight=s,i._granularity=l,i._stRotation=u,i._perPositionHeightExtrude=c,i._perPositionHeight=h,i._closeTop=d,i._closeBottom=f,i._shadowVolume=p,i._offsetAttribute=-1===_?void 0:_,i._arcType=m,i.packedLength=g,i},U$18.computeRectangle=function(e,t){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.polygonHierarchy",e.polygonHierarchy);var i=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),n=u$Z(e.arcType,m$1h.GEODESIC);if(n!==m$1h.GEODESIC&&n!==m$1h.RHUMB)throw new t$15("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var r=e.polygonHierarchy,o=u$Z(e.ellipsoid,t$12.WGS84);return Ae$v(r.positions,o,n,i,t)},U$18.createGeometry=function(e){var t=e._vertexFormat,i=e._ellipsoid,n=e._granularity,r=e._stRotation,o=e._polygonHierarchy,a=e._perPositionHeight,s=e._closeTop,l=e._closeBottom,u=e._arcType,c=o.positions;if(!(c.length<3)){var h=f$16.fromPoints(c,i),d=y$Z.polygonsFromHierarchy(o,h.projectPointsOntoPlane.bind(h),!a,i),f=d.hierarchy,p=d.polygons;if(0!==f.length){c=f[0].outerRing;var _,m=y$Z.computeBoundingRectangle(h.plane.normal,h.projectPointOntoPlane.bind(h),c,r,Be$o),g=[],x=e._height,y=e._extrudedHeight,v={perPositionHeight:a,vertexFormat:t,geometry:void 0,tangentPlane:h,boundingRectangle:m,ellipsoid:i,stRotation:r,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u};if(e._perPositionHeightExtrude||!e$2d.equalsEpsilon(x,y,0,e$2d.EPSILON2))for(v.extrude=!0,v.top=s,v.bottom=l,v.shadowVolume=e._shadowVolume,v.offsetAttribute=e._offsetAttribute,_=0;_<p.length;_++){var $,b=Xe$g(i,p[_],n,f[_],a,s,l,t,u,e._extrudeOutering);s&&l?($=b.topAndBottom,v.geometry=y$Z.scaleToGeodeticHeightExtruded($.geometry,x,y,i,a)):s?(($=b.topAndBottom).geometry.attributes.position.values=A$1f.scaleToGeodeticHeight($.geometry.attributes.position.values,x,i,!a),v.geometry=$.geometry):l&&(($=b.topAndBottom).geometry.attributes.position.values=A$1f.scaleToGeodeticHeight($.geometry.attributes.position.values,y,i,!0),v.geometry=$.geometry),(s||l)&&(v.wall=!1,$.geometry=pe$D(v),g.push($));var T=b.walls;v.wall=!0;for(var C=0;C<T.length;C++){var S=T[C];v.geometry=y$Z.scaleToGeodeticHeightExtruded(S.geometry,x,y,i,a),S.geometry=pe$D(v),g.push(S)}}else for(_=0;_<p.length;_++){var w=new d$1o({geometry:y$Z.createGeometryFromPositions(i,p[_],n,a,t,u)});if(w.geometry.attributes.position.values=A$1f.scaleToGeodeticHeight(w.geometry.attributes.position.values,x,i,!a),v.geometry=w.geometry,w.geometry=pe$D(v),e$2e(e._offsetAttribute)){var E=w.geometry.attributes.position.values.length,P=new Uint8Array(E/3);d$1s(P,e._offsetAttribute===_0x39c22a.NONE?0:1),w.geometry.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:P})}g.push(w)}var A=k$14.combineInstances(g)[0];A.attributes.position.values=new Float64Array(A.attributes.position.values),A.indices=ce$z.createTypedArray(A.attributes.position.values.length/3,A.indices);var L=A.attributes,M=i$1d.fromVertices(L.position.values);return t.position||delete L.position,new I$1p({attributes:L,indices:A.indices,primitiveType:A.primitiveType,boundingSphere:M,offsetAttribute:e._offsetAttribute})}}},U$18.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=e._groundBottomAltitude+e._groundExtrudedHeight,a=e._groundBottomAltitude?e._groundBottomAltitude:t(n,r),s=o!==e._groundBottomAltitude?o:i(n,r);return new U$18({polygonHierarchy:e._polygonHierarchy,ellipsoid:r,stRotation:e._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:a,height:s,vertexFormat:n$13.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(U$18.prototype,{rectangle:{get:function(){if(!e$2e(this._rectangle)){var e=this._polygonHierarchy.positions;this._rectangle=Ae$v(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e$2e(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Ie$o(this)),this._textureCoordinateRotationPoints}}});var E$1j={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE:4,CESIUM_3D_TILE_CLASSIFICATION:5,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:6,S3MTiles:8,S3MTilesClampObjectStencil:9,S3MTilesClampObjectColor:10,ProjectionImage:11,OPAQUE:12,ClampObject:13,NonClampObject:14,Label_Billboard:15,Voxel_Billboard:16,Particle:17,TRANSLUCENT:18,ANALYSIS:19,LOG_DEPTH_OVERLAY:20,OVERLAY:21,OVERLAY_AGAINST_DEPTH:22,NUMBER_OF_PASSES:23},Le$q=Object.freeze(E$1j);function f$14(){return!0}function i$11(e,t){function i(){throw new t$15(t)}for(var n in t=u$Z(t,"This object was destroyed, i.e., destroy() was called."),e)"function"==typeof e[n]&&(e[n]=i);e.isDestroyed=f$14}var v$U=[];function y$Y(e,t){this.center=o$1p.clone(u$Z(e,o$1p.ZERO)),this.halfAxes=p$1e.clone(u$Z(t,p$1e.ZERO)),this.areaDirty=1}v$U[0]={num:0,des:"inside"},v$U[1]={num:4,data:[0,4,7,3],des:"left"},v$U[2]={num:4,data:[1,2,6,5],des:"right"},v$U[3]={num:0},v$U[4]={num:4,data:[0,1,5,4],des:"bottom"},v$U[5]={num:6,data:[0,1,5,4,7,3],des:"bottom, left"},v$U[6]={num:6,data:[0,1,2,6,5,4],des:"bottom, right"},v$U[7]={num:0},v$U[8]={num:4,data:[2,3,7,6],des:"top"},v$U[9]={num:6,data:[4,7,6,2,3,0],des:"top, left"},v$U[10]={num:6,data:[2,3,7,6,5,1],des:"top, right"},v$U[11]={num:0},v$U[12]={num:0},v$U[13]={num:0},v$U[14]={num:0},v$U[15]={num:0},v$U[16]={num:4,data:[0,3,2,1],des:"front"},v$U[17]={num:6,data:[0,4,7,3,2,1],des:"front, left"},v$U[18]={num:6,data:[0,3,2,6,5,1],des:"front, right"},v$U[19]={num:0},v$U[20]={num:6,data:[0,3,2,1,5,4],des:"front, bottom"},v$U[21]={num:6,data:[2,1,5,4,7,3],des:"front, bottom, left"},v$U[22]={num:6,data:[0,3,2,6,5,4],des:"front, bottom, right"},v$U[23]={num:0},v$U[24]={num:6,data:[0,3,7,6,2,1],des:"front, top"},v$U[25]={num:6,data:[0,4,7,6,2,1],des:"front, top, left"},v$U[26]={num:6,data:[0,3,7,6,5,1],des:"front, top, right"},v$U[27]={num:0},v$U[28]={num:0},v$U[29]={num:0},v$U[30]={num:0},v$U[31]={num:0},v$U[32]={num:4,data:[4,5,6,7],des:"back"},v$U[33]={num:6,data:[4,5,6,7,3,0],des:"back, left"},v$U[34]={num:6,data:[1,2,6,7,4,5],des:"back, right"},v$U[35]={num:0},v$U[36]={num:6,data:[0,1,5,6,7,4],des:"back, bottom"},v$U[37]={num:6,data:[0,1,5,6,7,3],des:"back, bottom, left"},v$U[38]={num:6,data:[0,1,2,6,7,4],des:"back, bottom, right"},v$U[39]={num:0},v$U[40]={num:6,data:[2,3,7,4,5,6],des:"back, top"},v$U[41]={num:6,data:[0,4,5,6,2,3],des:"back, top, left"},v$U[42]={num:6,data:[1,2,3,7,4,5],des:"back, top, right"},y$Y.packedLength=o$1p.packedLength+p$1e.packedLength,y$Y.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),o$1p.pack(e.center,t,i),p$1e.pack(e.halfAxes,t,i+o$1p.packedLength),t},y$Y.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new y$Y),o$1p.unpack(e,t,i.center),p$1e.unpack(e,t+o$1p.packedLength,i.halfAxes),i};var Oa$3=new o$1p,Aa$4=new o$1p,Na$3=new o$1p,Ea$3=new o$1p,Ta$4=new o$1p,Ra$5=new o$1p,ga$3=new p$1e,Ba$3={unitary:new p$1e,diagonal:new p$1e},k$11=new o$1p,E$1i=new o$1p,p$15=new o$1p;y$Y.fromPoints=function(e,t){if(e$2e(t)||(t=new y$Y),!e$2e(e)||0===e.length)return t.halfAxes=p$1e.ZERO,t.center=o$1p.ZERO,t;var i,n=e.length,r=o$1p.clone(e[0],Oa$3);for(i=1;i<n;i++)o$1p.add(r,e[i],r);var o=1/n;o$1p.multiplyByScalar(r,o,r);var a,s=0,l=0,u=0,c=0,h=0,d=0;for(i=0;i<n;i++)s+=(a=o$1p.subtract(e[i],r,Aa$4)).x*a.x,l+=a.x*a.y,u+=a.x*a.z,c+=a.y*a.y,h+=a.y*a.z,d+=a.z*a.z;s*=o,l*=o,u*=o,c*=o,h*=o,d*=o;var f=ga$3;f[0]=s,f[1]=l,f[2]=u,f[3]=l,f[4]=c,f[5]=h,f[6]=u,f[7]=h,f[8]=d;var p=p$1e.computeEigenDecomposition(f,Ba$3),_=p$1e.clone(p.unitary,t.halfAxes),m=p$1e.getColumn(_,0,Ea$3),g=p$1e.getColumn(_,1,Ta$4),x=p$1e.getColumn(_,2,Ra$5),y=-Number.MAX_VALUE,v=-Number.MAX_VALUE,$=-Number.MAX_VALUE,b=Number.MAX_VALUE,T=Number.MAX_VALUE,C=Number.MAX_VALUE;for(i=0;i<n;i++)a=e[i],y=Math.max(o$1p.dot(m,a),y),v=Math.max(o$1p.dot(g,a),v),$=Math.max(o$1p.dot(x,a),$),b=Math.min(o$1p.dot(m,a),b),T=Math.min(o$1p.dot(g,a),T),C=Math.min(o$1p.dot(x,a),C);m=o$1p.multiplyByScalar(m,.5*(b+y),m),g=o$1p.multiplyByScalar(g,.5*(T+v),g),x=o$1p.multiplyByScalar(x,.5*(C+$),x);var S=o$1p.add(m,g,t.center);o$1p.add(S,x,S);var w=Na$3;return w.x=y-b,w.y=v-T,w.z=$-C,o$1p.multiplyByScalar(w,.5,w),p$1e.multiplyByScale(t.halfAxes,w,t.halfAxes),t};var va$2=new o$1p,La$3=new o$1p;function ua$4(e,t,i,n,r,o,a,s,l,u,c){if(!(e$2e(r)&&e$2e(o)&&e$2e(a)&&e$2e(s)&&e$2e(l)&&e$2e(u)))throw new t$15("all extents (minimum/maximum X/Y/Z) are required.");e$2e(c)||(c=new y$Y);var h=c.halfAxes;p$1e.setColumn(h,0,t,h),p$1e.setColumn(h,1,i,h),p$1e.setColumn(h,2,n,h);var d=va$2;d.x=(r+o)/2,d.y=(a+s)/2,d.z=(l+u)/2;var f=La$3;f.x=(o-r)/2,f.y=(s-a)/2,f.z=(u-l)/2;var p=c.center;return d=p$1e.multiplyByVector(h,d,d),o$1p.add(e,d,p),p$1e.multiplyByScale(h,f,h),c}var fa$4=new a$18,Ia$4=new o$1p,Sa$2=new a$18,qa$4=new a$18,ka$4=new a$18,Ua$5=new a$18,Da$5=new a$18,Va$3=new o$1p,ma$3=new o$1p,Xa$5=new o$1p,wa$2=new o$1p,ja$3=new o$1p,Wa$3=new o$1o,_a$3=new o$1o,Za$4=new o$1o,Ya$5=new o$1o,Fa$4=new o$1o,Ga$4=new o$1p,Ja$5=new o$1p,Ka$5=new o$1p,Qa$5=new o$1p,$a$5=new o$1o,Ha$3=new o$1p,ar$8=new o$1p,rr$a=new o$1p,tr$9=new o$1m(o$1p.UNIT_X,0);y$Y.fromRectangle=function(e,t,i,n,r){if(!e$2e(e))throw new t$15("rectangle is required");if(e.width<0||e.width>e$2d.TWO_PI)throw new t$15("Rectangle width must be between 0 and 2*pi");if(e.height<0||e.height>e$2d.PI)throw new t$15("Rectangle height must be between 0 and pi");if(e$2e(n)&&!e$2d.equalsEpsilon(n.radii.x,n.radii.y,e$2d.EPSILON15))throw new t$15("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");var o,a,s,l,u,c,h;if(t=u$Z(t,0),i=u$Z(i,0),n=u$Z(n,t$12.WGS84),e.width<=e$2d.PI){var d=h$18.center(e,fa$4),f=new f$16(n.cartographicToCartesian(d,Ia$4),n);h=f.plane;var p=d.longitude,_=e.south<0&&e.north>0?0:d.latitude,m=a$18.fromRadians(p,e.north,i,Sa$2),g=a$18.fromRadians(e.west,e.north,i,qa$4),x=a$18.fromRadians(e.west,_,i,ka$4),y=a$18.fromRadians(e.west,e.south,i,Ua$5),v=a$18.fromRadians(p,e.south,i,Da$5),$=n.cartographicToCartesian(m,Va$3),b=n.cartographicToCartesian(g,ma$3),T=n.cartographicToCartesian(x,Xa$5),C=n.cartographicToCartesian(y,wa$2),S=n.cartographicToCartesian(v,ja$3),w=f.projectPointToNearestOnPlane($,Wa$3),E=f.projectPointToNearestOnPlane(b,_a$3),P=f.projectPointToNearestOnPlane(T,Za$4),A=f.projectPointToNearestOnPlane(C,Ya$5),L=f.projectPointToNearestOnPlane(S,Fa$4);return a=-(o=Math.min(E.x,P.x,A.x)),l=Math.max(E.y,w.y),s=Math.min(A.y,L.y),g.height=y.height=t,b=n.cartographicToCartesian(g,ma$3),C=n.cartographicToCartesian(y,wa$2),u=Math.min(o$1m.getPointDistance(h,b),o$1m.getPointDistance(h,C)),c=i,ua$4(f.origin,f.xAxis,f.yAxis,f.zAxis,o,a,s,l,u,c,r)}var M=e.south>0,R=e.north<0,O=M?e.south:R?e.north:0,D=h$18.center(e,fa$4).longitude,I=o$1p.fromRadians(D,O,i,n,Ga$4);I.z=0;var B=Math.abs(I.x)<e$2d.EPSILON10&&Math.abs(I.y)<e$2d.EPSILON10?o$1p.UNIT_X:o$1p.normalize(I,Ja$5),F=o$1p.UNIT_Z,N=o$1p.cross(B,F,Ka$5);h=o$1m.fromPointNormal(I,B,tr$9);var G=o$1p.fromRadians(D+e$2d.PI_OVER_TWO,O,i,n,Qa$5);o=-(a=o$1p.dot(o$1m.projectPointOntoPlane(h,G,$a$5),N)),l=o$1p.fromRadians(0,e.north,R?t:i,n,Ha$3).z,s=o$1p.fromRadians(0,e.south,M?t:i,n,ar$8).z;var z=o$1p.fromRadians(e.east,O,i,n,rr$a);return ua$4(I,N,F,B,o,a,s,l,u=o$1m.getPointDistance(h,z),c=0,r)},y$Y.clone=function(e,t){if(e$2e(e))return e$2e(t)?(o$1p.clone(e.center,t.center),p$1e.clone(e.halfAxes,t.halfAxes),t.areaDirty=1,t):new y$Y(e.center,e.halfAxes)},y$Y.intersectPlane=function(e,t){if(!e$2e(e))throw new t$15("box is required.");if(!e$2e(t))throw new t$15("plane is required.");var i=e.center,n=t.normal,r=e.halfAxes,o=n.x,a=n.y,s=n.z,l=Math.abs(o*r[p$1e.COLUMN0ROW0]+a*r[p$1e.COLUMN0ROW1]+s*r[p$1e.COLUMN0ROW2])+Math.abs(o*r[p$1e.COLUMN1ROW0]+a*r[p$1e.COLUMN1ROW1]+s*r[p$1e.COLUMN1ROW2])+Math.abs(o*r[p$1e.COLUMN2ROW0]+a*r[p$1e.COLUMN2ROW1]+s*r[p$1e.COLUMN2ROW2]),u=o$1p.dot(n,i)+t.distance;return u<=-l?Ae$w.OUTSIDE:u>=l?Ae$w.INSIDE:Ae$w.INTERSECTING};var ra$6=new o$1p,ta$4=new o$1p,ea$6=new o$1p,er$b=new o$1p,nr$a=new o$1p;y$Y.distanceSquaredTo=function(e,t){if(!e$2e(e))throw new t$15("box is required.");if(!e$2e(t))throw new t$15("cartesian is required.");var i=o$1p.subtract(t,e.center,va$2),n=e.halfAxes,r=p$1e.getColumn(n,0,ra$6),o=p$1e.getColumn(n,1,ta$4),a=p$1e.getColumn(n,2,ea$6),s=o$1p.magnitude(r),l=o$1p.magnitude(o),u=o$1p.magnitude(a);o$1p.normalize(r,r),o$1p.normalize(o,o),o$1p.normalize(a,a);var c=er$b;c.x=o$1p.dot(i,r),c.y=o$1p.dot(i,o),c.z=o$1p.dot(i,a);var h,d=0;return c.x<-s?d+=(h=c.x+s)*h:c.x>s&&(d+=(h=c.x-s)*h),c.y<-l?d+=(h=c.y+l)*h:c.y>l&&(d+=(h=c.y-l)*h),c.z<-u?d+=(h=c.z+u)*h:c.z>u&&(d+=(h=c.z-u)*h),d};var la$4=new o$1p,or$7=new o$1p;y$Y.computePlaneDistances=function(e,t,i,n){if(!e$2e(e))throw new t$15("box is required.");if(!e$2e(t))throw new t$15("position is required.");if(!e$2e(i))throw new t$15("direction is required.");e$2e(n)||(n=new o$1n);var r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=e.center,s=e.halfAxes,l=p$1e.getColumn(s,0,ra$6),u=p$1e.getColumn(s,1,ta$4),c=p$1e.getColumn(s,2,ea$6),h=o$1p.add(l,u,la$4);o$1p.add(h,c,h),o$1p.add(h,a,h);var d=o$1p.subtract(h,t,or$7),f=o$1p.dot(i,d);return r=Math.min(f,r),o=Math.max(f,o),o$1p.add(a,l,h),o$1p.add(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.add(a,l,h),o$1p.subtract(h,u,h),o$1p.add(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.add(a,l,h),o$1p.subtract(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.add(h,u,h),o$1p.add(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.add(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.subtract(h,u,h),o$1p.add(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),o$1p.subtract(a,l,h),o$1p.subtract(h,u,h),o$1p.subtract(h,c,h),o$1p.subtract(h,t,d),f=o$1p.dot(i,d),r=Math.min(f,r),o=Math.max(f,o),n.start=r,n.stop=o,n};var sr$8=new i$1d;y$Y.isOccluded=function(e,t){if(!e$2e(e))throw new t$15("box is required.");if(!e$2e(t))throw new t$15("occluder is required.");var i=i$1d.fromOrientedBoundingBox(e,sr$8);return!t.isBoundingSphereVisible(i)},y$Y.prototype.intersectPlane=function(e){return y$Y.intersectPlane(this,e)},y$Y.prototype.distanceSquaredTo=function(e){return y$Y.distanceSquaredTo(this,e)},y$Y.prototype.computePlaneDistances=function(e,t,i){return y$Y.computePlaneDistances(this,e,t,i)},y$Y.prototype.isOccluded=function(e){return y$Y.isOccluded(this,e)},y$Y.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&o$1p.equals(e.center,t.center)&&p$1e.equals(e.halfAxes,t.halfAxes)},y$Y.prototype.clone=function(e){return y$Y.clone(this,e)},y$Y.prototype.equals=function(e){return y$Y.equals(this,e)};var pa$3=new e$2c;y$Y.prototype._updateBBox=function(){if(1==this.areaDirty){var e=p$1e.getColumn(this.halfAxes,0,ra$6),t=o$1p.clone(o$1p.negate(e,k$11)),i=p$1e.getColumn(this.halfAxes,1,ta$4),n=o$1p.clone(o$1p.negate(i,k$11)),r=p$1e.getColumn(this.halfAxes,2,ea$6),o=o$1p.clone(o$1p.negate(r,k$11));this.bbox=[],o$1p.add(this.center,i,k$11),o$1p.add(k$11,o,E$1i),o$1p.add(E$1i,t,p$15),this.bbox[0]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1i,e,p$15),this.bbox[1]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(k$11,r,E$1i),o$1p.add(E$1i,e,p$15),this.bbox[2]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1i,t,p$15),this.bbox[3]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(this.center,n,k$11),o$1p.add(k$11,o,E$1i),o$1p.add(E$1i,t,p$15),this.bbox[4]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1i,e,p$15),this.bbox[5]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(k$11,r,E$1i),o$1p.add(E$1i,e,p$15),this.bbox[6]=new o$1p(p$15.x,p$15.y,p$15.z),o$1p.add(E$1i,t,p$15),this.bbox[7]=new o$1p(p$15.x,p$15.y,p$15.z);var a=o$1p.magnitude(e),s=o$1p.magnitude(i),l=o$1p.magnitude(r),u=new o$1p(-a,-s,-l),c=new o$1p(a,s,l);if(a*s*l==0)return void(this.areaDirty=-1);o$1p.normalize(e,e),o$1p.normalize(i,i),o$1p.normalize(r,r),this.u=o$1p.clone(e),this.v=o$1p.clone(i),this.w=o$1p.clone(r),this.posMin=u,this.posMaX=c,this.areaDirty=0}};var j$1d=[];j$1d.push(new o$1o),j$1d.push(new o$1o),j$1d.push(new o$1o),j$1d.push(new o$1o),j$1d.push(new o$1o),j$1d.push(new o$1o);var cr$6=new a$18,J$11=new o$1p;y$Y.prototype.calculateBoxArea=function(e,t,i,n,r,o,a,s){this._updateBBox();var l=e,u=o$1p.subtract(l,this.center,nr$a);if(-1==this.areaDirty){var c=r/n*($=-1!=o?o:.5*o$1p.distance(this.posMaX,this.posMin))/i;return e$2d.PI*c*c}var h=o$1p.fromElements(o$1p.dot(u,this.u),o$1p.dot(u,this.v),o$1p.dot(u,this.w),la$4),d=(h.x<this.posMin.x?1:0)+((h.x>this.posMaX.x?1:0)<<1)+((h.z<this.posMin.z?1:0)<<2)+((h.z>this.posMaX.z?1:0)<<3)+((h.y>this.posMaX.y?1:0)<<4)+((h.y<this.posMin.y?1:0)<<5);if(d>42)return console.log("area calculation is wrong"),-100;var f=v$U[d];if(0==f.num){c=r/n*($=-1!=o?o:.5*o$1p.distance(this.posMaX,this.posMin))/i;return e$2d.PI*c*c}if(0==f.num)return console.log("area calculation is wrong"),-100;for(var p,_=[],m=a,g=0;g<f.num;g++){var x=j$1d[g],y=this.bbox[f.data[g]];p=!1;var v,$,b=e$2d.PI;if(3===t)(v=p$1d.multiplyByVector(m,e$2c.fromElements(y.x,y.y,y.z,1),pa$3)).z<0&&(p=!0,-1==$&&(b=e$2d.PI_OVER_FOUR,i=o$1p.magnitude(u)));else{var T=s,C=T.ellipsoid.cartesianToCartographic(y,cr$6);e$2e(C)?(T.project(C,J$11),(v=p$1d.multiplyByVector(m,e$2c.fromElements(J$11.z,J$11.x,J$11.y,1),pa$3)).z<0&&(p=!0)):p=!0}if(1==p)return b*(c=r/n*($=-1!=o?o:.5*o$1p.distance(this.posMaX,this.posMin))/i)*c;x.x=v.x/v.w,x.y=r-v.y/v.w,_.push(x)}return Math.abs(A$1f.computeArea2D(_))};var s$X=new o$1p(1,1,1),u$T=o$1p.ZERO,f$13=n$15.IDENTITY,e$1_=function(e,t,i){this.translation=o$1p.clone(u$Z(e,u$T)),this.rotation=n$15.clone(u$Z(t,f$13)),this.scale=o$1p.clone(u$Z(i,s$X))};e$1_.prototype.equals=function(e){return this===e||e$2e(e)&&o$1p.equals(this.translation,e.translation)&&n$15.equals(this.rotation,e.rotation)&&o$1p.equals(this.scale,e.scale)};var _0x352b38=(_0x31e5a5=!0,function(e,t){var i=_0x31e5a5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31e5a5=!1,i}),_0x1aa701=_0x352b38(void 0,(function(){return _0x1aa701.toString().search("(((.+)+)+)+$").toString().constructor(_0x1aa701).search("(((.+)+)+)+$")})),_0x31e5a5;function _0x50f23a(){}_0x1aa701(),_0x50f23a._CheckLimit=function(e,t){var i=_0x50f23a._LogLimitOutputs[e];return i?i.current++:(i={limit:t,current:1},_0x50f23a._LogLimitOutputs[e]=i),i.current<=i.limit},_0x50f23a._GenerateLimitMessage=function(e,t){var i=_0x50f23a._LogLimitOutputs[e];if(i&&_0x50f23a.MessageLimitReached&&i.current===i.limit)switch(t){case 0:_0x50f23a.Log(_0x50f23a.MessageLimitReached.replace(/%LIMIT%/g,""+i.limit).replace(/%TYPE%/g,"log"));break;case 1:_0x50f23a.Warn(_0x50f23a.MessageLimitReached.replace(/%LIMIT%/g,""+i.limit).replace(/%TYPE%/g,"warning"));break;case 2:_0x50f23a.Error(_0x50f23a.MessageLimitReached.replace(/%LIMIT%/g,""+i.limit).replace(/%TYPE%/g,"error"))}},_0x50f23a._AddLogEntry=function(e){_0x50f23a._LogCache=e+_0x50f23a._LogCache,_0x50f23a.OnNewCacheEntry&&_0x50f23a.OnNewCacheEntry(e)},_0x50f23a._FormatMessage=function(e){var t=function(e){return e<10?"0"+e:""+e},i=new Date;return"["+t(i.getHours())+":"+t(i.getMinutes())+":"+t(i.getSeconds())+"]: "+e},_0x50f23a._LogDisabled=function(e,t){},_0x50f23a._LogEnabled=function(e,t){if(void 0===t||_0x50f23a._CheckLimit(e,t)){var i=_0x50f23a._FormatMessage(e);console.log("BJS - "+i);var n="<div style='color:white'>"+i+"</div><br>";_0x50f23a._AddLogEntry(n),_0x50f23a._GenerateLimitMessage(e,0)}},_0x50f23a._WarnDisabled=function(e,t){},_0x50f23a._WarnEnabled=function(e,t){if(void 0===t||_0x50f23a._CheckLimit(e,t)){var i=_0x50f23a._FormatMessage(e);console.warn("BJS - "+i);var n="<div style='color:orange'>"+e+"</div><br>";_0x50f23a._AddLogEntry(n),_0x50f23a._GenerateLimitMessage(e,1)}},_0x50f23a._ErrorDisabled=function(e,t){},_0x50f23a._ErrorEnabled=function(e,t){if(void 0===t||_0x50f23a._CheckLimit(e,t)){var i=_0x50f23a._FormatMessage(e);_0x50f23a.errorsCount++,console.error("BJS - "+i);var n="<div style='color:red'>"+i+"</div><br>";_0x50f23a._AddLogEntry(n),_0x50f23a._GenerateLimitMessage(e,2)}},Object.defineProperty(_0x50f23a,"LogCache",{get:function(){return _0x50f23a._LogCache},enumerable:!1,configurable:!0}),_0x50f23a.ClearLogCache=function(){_0x50f23a._LogCache="",_0x50f23a._LogLimitOutputs={},_0x50f23a.errorsCount=0},Object.defineProperty(_0x50f23a,"LogLevels",{set:function(e){(e&_0x50f23a.MessageLogLevel)===_0x50f23a.MessageLogLevel?_0x50f23a.Log=_0x50f23a._LogEnabled:_0x50f23a.Log=_0x50f23a._LogDisabled,(e&_0x50f23a.WarningLogLevel)===_0x50f23a.WarningLogLevel?_0x50f23a.Warn=_0x50f23a._WarnEnabled:_0x50f23a.Warn=_0x50f23a._WarnDisabled,(e&_0x50f23a.ErrorLogLevel)===_0x50f23a.ErrorLogLevel?_0x50f23a.Error=_0x50f23a._ErrorEnabled:_0x50f23a.Error=_0x50f23a._ErrorDisabled},enumerable:!1,configurable:!0}),_0x50f23a.NoneLogLevel=0,_0x50f23a.MessageLogLevel=1,_0x50f23a.WarningLogLevel=2,_0x50f23a.ErrorLogLevel=4,_0x50f23a.AllLogLevel=7,_0x50f23a.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",_0x50f23a._LogCache="",_0x50f23a._LogLimitOutputs={},_0x50f23a.errorsCount=0,_0x50f23a.Log=_0x50f23a._LogEnabled,_0x50f23a.Warn=_0x50f23a._WarnEnabled,_0x50f23a.Error=_0x50f23a._ErrorEnabled;var _0x42d20b=(_0x12cada=!0,function(e,t){var i=_0x12cada?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12cada=!1,i}),_0xa3286e=_0x42d20b(void 0,(function(){return _0xa3286e.toString().search("(((.+)+)+)+$").toString().constructor(_0xa3286e).search("(((.+)+)+)+$")})),_0x12cada;function _0xd79dde(){}_0xa3286e(),Object.defineProperty(_0xd79dde,"BaseUrl",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.BaseUrl},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.BaseUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xd79dde,"DefaultRetryStrategy",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.DefaultRetryStrategy},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.DefaultRetryStrategy=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xd79dde,"CorsBehavior",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.CorsBehavior},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.CorsBehavior=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xd79dde,"UseFallbackTexture",{get:function(){return _Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.UseFallbackTexture},set:function(e){_Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.UseFallbackTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xd79dde,"RegisteredExternalClasses",{get:function(){return _instantiationTools__WEBPACK_IMPORTED_MODULE_11__.InstantiationTools.RegisteredExternalClasses},set:function(e){_instantiationTools__WEBPACK_IMPORTED_MODULE_11__.InstantiationTools.RegisteredExternalClasses=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xd79dde,"fallbackTexture",{get:function(){return _Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.FallbackTexture},set:function(e){_Engines_engineStore__WEBPACK_IMPORTED_MODULE_8__.EngineStore.FallbackTexture=e},enumerable:!1,configurable:!0}),_0xd79dde.FetchToRef=function(e,t,i,n,r,o){var a=4*((Math.abs(e)*i%i|0)+(Math.abs(t)*n%n|0)*i);o.r=r[a]/255,o.g=r[a+1]/255,o.b=r[a+2]/255,o.a=r[a+3]/255},_0xd79dde.Mix=function(e,t,i){return e*(1-i)+t*i},_0xd79dde.Instantiate=function(e){return _instantiationTools__WEBPACK_IMPORTED_MODULE_11__.InstantiationTools.Instantiate(e)},_0xd79dde.SetImmediate=function(e){_timingTools__WEBPACK_IMPORTED_MODULE_10__.TimingTools.SetImmediate(e)},_0xd79dde.IsExponentOfTwo=function(e){var t=1;do{t*=2}while(t<e);return t===e},_0xd79dde.FloatRound=function(e){return Math.fround?Math.fround(e):(_0xd79dde._TmpFloatArray[0]=e,_0xd79dde._TmpFloatArray[0])},_0xd79dde.GetFilename=function(e){var t=e.lastIndexOf("/");return t<0?e:e.substring(t+1)},_0xd79dde.GetFolderPath=function(e,t){void 0===t&&(t=!1);var i=e.lastIndexOf("/");return i<0?t?e:"":e.substring(0,i+1)},_0xd79dde.ToDegrees=function(e){return 180*e/Math.PI},_0xd79dde.ToRadians=function(e){return e*Math.PI/180},_0xd79dde.MakeArray=function(e,t){return!0===t||void 0!==e&&null!=e?Array.isArray(e)?e:[e]:null},_0xd79dde.GetPointerPrefix=function(e){var t="pointer";return(0,_domManagement__WEBPACK_IMPORTED_MODULE_2__.IsWindowObjectExist)()&&!window.PointerEvent&&(t="mouse"),e._badDesktopOS&&!e._badOS&&!(document&&"ontouchend"in document)&&(t="mouse"),t},_0xd79dde.SetCorsBehavior=function(e,t){t.crossOrigin="anonymous"},_0xd79dde.CleanUrl=function(e){return e=e.replace(/#/gm,"%23")},Object.defineProperty(_0xd79dde,"PreprocessUrl",{get:function(){return _fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.PreprocessUrl},set:function(e){_fileTools__WEBPACK_IMPORTED_MODULE_9__.FileToolsOptions.PreprocessUrl=e},enumerable:!1,configurable:!0}),_0xd79dde.LoadImage=function(e,t,i,n,r,o){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.LoadImage)(e,t,i,n,r,o)},_0xd79dde.LoadFile=function(e,t,i,n,r,o){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.LoadFile)(e,t,i,n,r,o)},_0xd79dde.LoadFileAsync=function(e,t){return void 0===t&&(t=!0),new Promise((function(i,n){(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.LoadFile)(e,(function(e){i(e)}),void 0,void 0,t,(function(e,t){n(t)}))}))},_0xd79dde.LoadScript=function(e,t,i,n){if("undefined"!=typeof window){var r=document.getElementsByTagName("head")[0],o=document.createElement("script");o.setAttribute("type","text/javascript"),o.setAttribute("src",e),n&&(o.id=n),o.onload=function(){t&&t()},o.onerror=function(t){i&&i("Unable to load script '".concat(e,"'"),t)},r.appendChild(o)}},_0xd79dde.LoadScriptAsync=function(e){var t=this;return new Promise((function(i,n){t.LoadScript(e,(function(){i()}),(function(e,t){n(t)}))}))},_0xd79dde.ReadFileAsDataURL=function(e,t,i){var n=new FileReader,r={onCompleteObservable:new _observable__WEBPACK_IMPORTED_MODULE_1__.Observable,abort:function(){return n.abort()}};return n.onloadend=function(){r.onCompleteObservable.notifyObservers(r)},n.onload=function(e){t(e.target.result)},n.onprogress=i,n.readAsDataURL(e),r},_0xd79dde.ReadFile=function(e,t,i,n,r){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.ReadFile)(e,t,i,n,r)},_0xd79dde.FileAsURL=function(e){var t=new Blob([e]);return(window.URL||window.webkitURL).createObjectURL(t)},_0xd79dde.Format=function(e,t){return void 0===t&&(t=2),e.toFixed(t)},_0xd79dde.DeepCopy=function(e,t,i,n){_deepCopier__WEBPACK_IMPORTED_MODULE_4__.DeepCopier.DeepCopy(e,t,i,n)},_0xd79dde.IsEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},_0xd79dde.RegisterTopRootEvents=function(e,t){for(var i=0;i<t.length;i++){var n=t[i];e.addEventListener(n.name,n.handler,!1);try{window.parent&&window.parent.addEventListener(n.name,n.handler,!1)}catch(e){}}},_0xd79dde.UnregisterTopRootEvents=function(e,t){for(var i=0;i<t.length;i++){var n=t[i];e.removeEventListener(n.name,n.handler);try{e.parent&&e.parent.removeEventListener(n.name,n.handler)}catch(e){}}},_0xd79dde.DumpFramebuffer=function(e,t,i,n,r,o){return void 0===r&&(r="image/png"),(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this,void 0,void 0,(function(){var a,s;return(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this,(function(l){switch(l.label){case 0:return[4,i.readPixels(0,0,e,t)];case 1:return a=l.sent(),s=new Uint8Array(a.buffer),_0xd79dde.DumpData(e,t,s,n,r,o,!0),[2]}}))}))},_0xd79dde.DumpData=function(e,t,i,n,r,o,a,s,l){void 0===r&&(r="image/png"),void 0===a&&(a=!1),void 0===s&&(s=!1),!_0xd79dde._ScreenshotCanvas&&(_0xd79dde._ScreenshotCanvas=document.createElement("canvas")),_0xd79dde._ScreenshotCanvas.width=e,_0xd79dde._ScreenshotCanvas.height=t;var u=_0xd79dde._ScreenshotCanvas.getContext("2d");if(u){if(i instanceof Float32Array){for(var c=new Uint8Array(i.length),h=i.length;h--;){var d=i[h];c[h]=d<0?0:d>1?1:Math.round(255*d)}i=c}var f=u.createImageData(e,t);f.data.set(i),u.putImageData(f,0,0);var p=_0xd79dde._ScreenshotCanvas;if(a){var _=document.createElement("canvas");_.width=e,_.height=t;var m=_.getContext("2d");if(!m)return;m.translate(0,t),m.scale(1,-1),m.drawImage(_0xd79dde._ScreenshotCanvas,0,0),p=_}s?_0xd79dde.ToBlob(p,(function(e){var t=new FileReader;t.onload=function(e){var t=e.target.result;n&&n(t)},t.readAsArrayBuffer(e)}),r,l):_0xd79dde.EncodeScreenshotCanvasData(n,r,o,p,l)}},_0xd79dde.DumpDataAsync=function(e,t,i,n,r,o,a,s){return void 0===n&&(n="image/png"),void 0===o&&(o=!1),void 0===a&&(a=!1),new Promise((function(l){_0xd79dde.DumpData(e,t,i,(function(e){return l(e)}),n,r,o,a,s)}))},_0xd79dde.ToBlob=function(e,t,i,n){void 0===i&&(i="image/png"),!e.toBlob&&(e.toBlob=function(e,t,i){var n=this;setTimeout((function(){for(var r=atob(n.toDataURL(t,i).split(",")[1]),o=r.length,a=new Uint8Array(o),s=0;s<o;s++)a[s]=r.charCodeAt(s);e(new Blob([a]))}))}),e.toBlob((function(e){t(e)}),i,n)},_0xd79dde.EncodeScreenshotCanvasData=function(e,t,i,n,r){(void 0===t&&(t="image/png"),e)?e((null!=n?n:_0xd79dde._ScreenshotCanvas).toDataURL(t,r)):this.ToBlob(null!=n?n:_0xd79dde._ScreenshotCanvas,(function(e){if("download"in document.createElement("a")){if(!i){var t=new Date,n=(t.getFullYear()+"-"+(t.getMonth()+1)).slice(2)+"-"+t.getDate()+"_"+t.getHours()+"-"+("0"+t.getMinutes()).slice(-2);i="screenshot_"+n+".png"}_0xd79dde.Download(e,i)}else if(e){var r=URL.createObjectURL(e),o=window.open("");if(!o)return;var a=o.document.createElement("img");a.onload=function(){URL.revokeObjectURL(r)},a.src=r,o.document.body.appendChild(a)}}),t,r)},_0xd79dde.Download=function(e,t){if(navigator&&navigator.msSaveBlob)navigator.msSaveBlob(e,t);else{var i=window.URL.createObjectURL(e),n=document.createElement("a");document.body.appendChild(n),n.style.display="none",n.href=i,n.download=t,n.addEventListener("click",(function(){n.parentElement&&n.parentElement.removeChild(n)})),n.click(),window.URL.revokeObjectURL(i)}},_0xd79dde.BackCompatCameraNoPreventDefault=function(e){return"boolean"==typeof e[0]?e[0]:"boolean"==typeof e[1]&&e[1]},_0xd79dde.CreateScreenshot=function(e,t,i,n,r){throw(0,_devTools__WEBPACK_IMPORTED_MODULE_6__._WarnImport)("ScreenshotTools")},_0xd79dde.CreateScreenshotAsync=function(e,t,i,n){throw(0,_devTools__WEBPACK_IMPORTED_MODULE_6__._WarnImport)("ScreenshotTools")},_0xd79dde.CreateScreenshotUsingRenderTarget=function(e,t,i,n,r,o,a,s){throw(0,_devTools__WEBPACK_IMPORTED_MODULE_6__._WarnImport)("ScreenshotTools")},_0xd79dde.CreateScreenshotUsingRenderTargetAsync=function(e,t,i,n,r,o,a){throw(0,_devTools__WEBPACK_IMPORTED_MODULE_6__._WarnImport)("ScreenshotTools")},_0xd79dde.RandomId=function(){return(0,_guid__WEBPACK_IMPORTED_MODULE_12__.RandomGUID)()},_0xd79dde.IsBase64=function(e){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.IsBase64DataUrl)(e)},_0xd79dde.DecodeBase64=function(e){return(0,_fileTools__WEBPACK_IMPORTED_MODULE_9__.DecodeBase64UrlToBinary)(e)},Object.defineProperty(_0xd79dde,"errorsCount",{get:function(){return _logger__WEBPACK_IMPORTED_MODULE_3__.Logger.errorsCount},enumerable:!1,configurable:!0}),_0xd79dde.Log=function(e){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.Log(e)},_0xd79dde.Warn=function(e){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.Warn(e)},_0xd79dde.Error=function(e){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.Error(e)},Object.defineProperty(_0xd79dde,"LogCache",{get:function(){return _logger__WEBPACK_IMPORTED_MODULE_3__.Logger.LogCache},enumerable:!1,configurable:!0}),_0xd79dde.ClearLogCache=function(){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.ClearLogCache()},Object.defineProperty(_0xd79dde,"LogLevels",{set:function(e){_logger__WEBPACK_IMPORTED_MODULE_3__.Logger.LogLevels=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xd79dde,"PerformanceLogLevel",{set:function(e){return(e&_0xd79dde.PerformanceUserMarkLogLevel)===_0xd79dde.PerformanceUserMarkLogLevel?(_0xd79dde.StartPerformanceCounter=_0xd79dde._StartUserMark,void(_0xd79dde.EndPerformanceCounter=_0xd79dde._EndUserMark)):(e&_0xd79dde.PerformanceConsoleLogLevel)===_0xd79dde.PerformanceConsoleLogLevel?(_0xd79dde.StartPerformanceCounter=_0xd79dde._StartPerformanceConsole,void(_0xd79dde.EndPerformanceCounter=_0xd79dde._EndPerformanceConsole)):(_0xd79dde.StartPerformanceCounter=_0xd79dde._StartPerformanceCounterDisabled,void(_0xd79dde.EndPerformanceCounter=_0xd79dde._EndPerformanceCounterDisabled))},enumerable:!1,configurable:!0}),_0xd79dde._StartPerformanceCounterDisabled=function(e,t){},_0xd79dde._EndPerformanceCounterDisabled=function(e,t){},_0xd79dde._StartUserMark=function(e,t){if(void 0===t&&(t=!0),!_0xd79dde._Performance){if(!(0,_domManagement__WEBPACK_IMPORTED_MODULE_2__.IsWindowObjectExist)())return;_0xd79dde._Performance=window.performance}t&&_0xd79dde._Performance.mark&&_0xd79dde._Performance.mark(e+"-Begin")},_0xd79dde._EndUserMark=function(e,t){void 0===t&&(t=!0),t&&_0xd79dde._Performance.mark&&(_0xd79dde._Performance.mark(e+"-End"),_0xd79dde._Performance.measure(e,e+"-Begin",e+"-End"))},_0xd79dde._StartPerformanceConsole=function(e,t){void 0===t&&(t=!0),t&&(_0xd79dde._StartUserMark(e,t),console.time&&console.time(e))},_0xd79dde._EndPerformanceConsole=function(e,t){void 0===t&&(t=!0),t&&(_0xd79dde._EndUserMark(e,t),console.timeEnd(e))},Object.defineProperty(_0xd79dde,"Now",{get:function(){return _precisionDate__WEBPACK_IMPORTED_MODULE_5__.PrecisionDate.Now},enumerable:!1,configurable:!0}),_0xd79dde.GetClassName=function(e,t){void 0===t&&(t=!1);var i=null;if(!t&&e.getClassName)i=e.getClassName();else{if(e instanceof Object)i=(t?e:Object.getPrototypeOf(e)).constructor.__bjsclassName__;!i&&(i=typeof e)}return i},_0xd79dde.First=function(e,t){for(var i=0,n=e;i<n.length;i++){var r=n[i];if(t(r))return r}return null},_0xd79dde.getFullClassName=function(e,t){void 0===t&&(t=!1);var i=null,n=null;if(!t&&e.getClassName)i=e.getClassName();else{if(e instanceof Object){var r=t?e:Object.getPrototypeOf(e);i=r.constructor.__bjsclassName__,n=r.constructor.__bjsmoduleName__}!i&&(i=typeof e)}return i?(null!=n?n+".":"")+i:null},_0xd79dde.DelayAsync=function(e){return new Promise((function(t){setTimeout((function(){t()}),e)}))},_0xd79dde.IsSafari=function(){return!!(0,_domManagement__WEBPACK_IMPORTED_MODULE_2__.IsNavigatorAvailable)()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)};var _0xb120bc=(_0x409188=!0,function(e,t){var i=_0x409188?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x409188=!1,i}),_0x245335=_0xb120bc(void 0,(function(){return _0x245335.toString().search("(((.+)+)+)+$").toString().constructor(_0x245335).search("(((.+)+)+)+$")})),_0x409188;function _0x5c4ccd(e,t,i,n,r,o){void 0===r&&(r=!1),this._valueCache={},this._engine=e,this._noUBO=!e.supportsUniformBuffers||r,this._dynamic=i,this._name=null!=n?n:"no-name",this._data=t||[],this._uniformLocations={},this._uniformSizes={},this._uniformArraySizes={},this._uniformLocationPointer=0,this._needSync=!1,this._trackUbosInFrame=null!=o?o:this._engine._features.trackUbosInFrame,this._trackUbosInFrame&&(this._buffers=[],this._bufferIndex=-1,this._createBufferOnWrite=!1,this._currentFrameId=0),this._noUBO?(this.updateMatrix3x3=this._updateMatrix3x3ForEffect,this.updateMatrix2x2=this._updateMatrix2x2ForEffect,this.updateFloat=this._updateFloatForEffect,this.updateFloat2=this._updateFloat2ForEffect,this.updateFloat3=this._updateFloat3ForEffect,this.updateFloat4=this._updateFloat4ForEffect,this.updateFloatArray=this._updateFloatArrayForEffect,this.updateArray=this._updateArrayForEffect,this.updateIntArray=this._updateIntArrayForEffect,this.updateMatrix=this._updateMatrixForEffect,this.updateMatrices=this._updateMatricesForEffect,this.updateVector3=this._updateVector3ForEffect,this.updateVector4=this._updateVector4ForEffect,this.updateColor3=this._updateColor3ForEffect,this.updateColor4=this._updateColor4ForEffect,this.updateDirectColor4=this._updateDirectColor4ForEffect,this.updateInt=this._updateIntForEffect,this.updateInt2=this._updateInt2ForEffect,this.updateInt3=this._updateInt3ForEffect,this.updateInt4=this._updateInt4ForEffect):(this._engine._uniformBuffers.push(this),this.updateMatrix3x3=this._updateMatrix3x3ForUniform,this.updateMatrix2x2=this._updateMatrix2x2ForUniform,this.updateFloat=this._updateFloatForUniform,this.updateFloat2=this._updateFloat2ForUniform,this.updateFloat3=this._updateFloat3ForUniform,this.updateFloat4=this._updateFloat4ForUniform,this.updateFloatArray=this._updateFloatArrayForUniform,this.updateArray=this._updateArrayForUniform,this.updateIntArray=this._updateIntArrayForUniform,this.updateMatrix=this._updateMatrixForUniform,this.updateMatrices=this._updateMatricesForUniform,this.updateVector3=this._updateVector3ForUniform,this.updateVector4=this._updateVector4ForUniform,this.updateColor3=this._updateColor3ForUniform,this.updateColor4=this._updateColor4ForUniform,this.updateDirectColor4=this._updateDirectColor4ForUniform,this.updateInt=this._updateIntForUniform,this.updateInt2=this._updateInt2ForUniform,this.updateInt3=this._updateInt3ForUniform,this.updateInt4=this._updateInt4ForUniform)}_0x245335(),Object.defineProperty(_0x5c4ccd.prototype,"useUbo",{get:function(){return!this._noUBO},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5c4ccd.prototype,"isSync",{get:function(){return!this._needSync},enumerable:!1,configurable:!0}),_0x5c4ccd.prototype.isDynamic=function(){return void 0!==this._dynamic},_0x5c4ccd.prototype.getData=function(){return this._bufferData},_0x5c4ccd.prototype.getBuffer=function(){return this._buffer},_0x5c4ccd.prototype._fillAlignment=function(e){var t;if(t=e<=2?e:4,this._uniformLocationPointer%t!=0){var i=this._uniformLocationPointer;this._uniformLocationPointer+=t-this._uniformLocationPointer%t;for(var n=this._uniformLocationPointer-i,r=0;r<n;r++)this._data.push(0)}},_0x5c4ccd.prototype.addUniform=function(e,t,i){if(void 0===i&&(i=0),!this._noUBO&&void 0===this._uniformLocations[e]){var n;if(i>0){if(t instanceof Array)throw"addUniform should not be use with Array in UBO: "+e;if(this._fillAlignment(4),this._uniformArraySizes[e]={strideSize:t,arraySize:i},16==t)t*=i;else t=t*i+(4-t)*i;n=[];for(var r=0;r<t;r++)n.push(0)}else{if(t instanceof Array)t=(n=t).length;else{t=t,n=[];for(r=0;r<t;r++)n.push(0)}this._fillAlignment(t)}this._uniformSizes[e]=t,this._uniformLocations[e]=this._uniformLocationPointer,this._uniformLocationPointer+=t;for(r=0;r<t;r++)this._data.push(n[r]);this._needSync=!0}},_0x5c4ccd.prototype.addMatrix=function(e,t){this.addUniform(e,Array.prototype.slice.call(t.toArray()))},_0x5c4ccd.prototype.addFloat2=function(e,t,i){var n=[t,i];this.addUniform(e,n)},_0x5c4ccd.prototype.addFloat3=function(e,t,i,n){var r=[t,i,n];this.addUniform(e,r)},_0x5c4ccd.prototype.addColor3=function(e,t){var i=[t.r,t.g,t.b];this.addUniform(e,i)},_0x5c4ccd.prototype.addColor4=function(e,t,i){var n=[t.r,t.g,t.b,i];this.addUniform(e,n)},_0x5c4ccd.prototype.addVector3=function(e,t){var i=[t.x,t.y,t.z];this.addUniform(e,i)},_0x5c4ccd.prototype.addMatrix3x3=function(e){this.addUniform(e,12)},_0x5c4ccd.prototype.addMatrix2x2=function(e){this.addUniform(e,8)},_0x5c4ccd.prototype.create=function(){this._noUBO||this._buffer||(this._fillAlignment(4),this._bufferData=new Float32Array(this._data),this._rebuild(),this._needSync=!0)},_0x5c4ccd.prototype._rebuild=function(){!this._noUBO&&this._bufferData&&(this._dynamic?this._buffer=this._engine.createDynamicUniformBuffer(this._bufferData):this._buffer=this._engine.createUniformBuffer(this._bufferData),this._trackUbosInFrame&&(this._buffers.push([this._buffer,this._engine._features.checkUbosContentBeforeUpload?this._bufferData.slice():void 0]),this._bufferIndex=this._buffers.length-1,this._createBufferOnWrite=!1))},Object.defineProperty(_0x5c4ccd.prototype,"_numBuffers",{get:function(){return this._buffers.length},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5c4ccd.prototype,"_indexBuffer",{get:function(){return this._bufferIndex},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5c4ccd.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),_0x5c4ccd.prototype._buffersEqual=function(e,t){for(var i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0},_0x5c4ccd.prototype._copyBuffer=function(e,t){for(var i=0;i<e.length;++i)t[i]=e[i]},_0x5c4ccd.prototype.update=function(){if(!this._noUBO)if(this.bindUniformBuffer(),this._buffer)if(this._dynamic||this._needSync){if(this._buffers&&this._buffers.length>1&&this._buffers[this._bufferIndex][1]){if(this._buffersEqual(this._bufferData,this._buffers[this._bufferIndex][1]))return this._needSync=!1,void(this._createBufferOnWrite=this._trackUbosInFrame);this._copyBuffer(this._bufferData,this._buffers[this._bufferIndex][1])}this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._engine._features._collectUbosUpdatedInFrame&&(!_0x5c4ccd._UpdatedUbosInFrame[this._name]&&(_0x5c4ccd._UpdatedUbosInFrame[this._name]=0),_0x5c4ccd._UpdatedUbosInFrame[this._name]++),this._needSync=!1,this._createBufferOnWrite=this._trackUbosInFrame}else this._createBufferOnWrite=this._trackUbosInFrame;else this.create()},_0x5c4ccd.prototype._createNewBuffer=function(){this._bufferIndex+1<this._buffers.length?(this._bufferIndex++,this._buffer=this._buffers[this._bufferIndex][0],this._createBufferOnWrite=!1,this._needSync=!0):this._rebuild()},_0x5c4ccd.prototype._checkNewFrame=function(){this._trackUbosInFrame&&this._currentFrameId!==this._engine.frameId&&(this._currentFrameId=this._engine.frameId,this._createBufferOnWrite=!1,this._buffers&&this._buffers.length>0?(this._needSync=0!==this._bufferIndex,this._bufferIndex=0,this._buffer=this._buffers[this._bufferIndex][0]):this._bufferIndex=-1)},_0x5c4ccd.prototype.updateUniform=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0===n){if(this._buffer)return void _0x50f23a.Error("Cannot add an uniform after UBO has been created.");this.addUniform(e,i),n=this._uniformLocations[e]}if(!this._buffer&&this.create(),this._dynamic)for(o=0;o<i;o++)this._bufferData[n+o]=t[o];else{for(var r=!1,o=0;o<i;o++)(16===i&&!this._engine._features.uniformBufferHardCheckMatrix||this._bufferData[n+o]!==_0xd79dde.FloatRound(t[o]))&&(r=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[n+o]=t[o]);this._needSync=this._needSync||r}},_0x5c4ccd.prototype.updateUniformArray=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0!==n){!this._buffer&&this.create();var r=this._uniformArraySizes[e];if(this._dynamic)for(l=0;l<i;l++)this._bufferData[n+l]=t[l];else{for(var o=!1,a=0,s=0,l=0;l<i;l++)if(this._bufferData[n+4*s+a]!==_0xd79dde.FloatRound(t[l])&&(o=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[n+4*s+a]=t[l]),++a===r.strideSize){for(;a<4;a++)this._bufferData[n+4*s+a]=0;a=0,s++}this._needSync=this._needSync||o}}else _0x50f23a.Error("Cannot add an uniform Array dynamically. Please, add it using addUniform.")},_0x5c4ccd.prototype._cacheMatrix=function(e,t){this._checkNewFrame();var i=this._valueCache[e],n=t.updateFlag;return(void 0===i||i!==n)&&(this._valueCache[e]=n,!0)},_0x5c4ccd.prototype._updateMatrix3x3ForUniform=function(e,t){for(var i=0;i<3;i++)_0x5c4ccd._TempBuffer[4*i]=t[3*i],_0x5c4ccd._TempBuffer[4*i+1]=t[3*i+1],_0x5c4ccd._TempBuffer[4*i+2]=t[3*i+2],_0x5c4ccd._TempBuffer[4*i+3]=0;this.updateUniform(e,_0x5c4ccd._TempBuffer,12)},_0x5c4ccd.prototype._updateMatrix3x3ForEffect=function(e,t){this._currentEffect.setMatrix3x3(e,t)},_0x5c4ccd.prototype._updateMatrix2x2ForEffect=function(e,t){this._currentEffect.setMatrix2x2(e,t)},_0x5c4ccd.prototype._updateMatrix2x2ForUniform=function(e,t){for(var i=0;i<2;i++)_0x5c4ccd._TempBuffer[4*i]=t[2*i],_0x5c4ccd._TempBuffer[4*i+1]=t[2*i+1],_0x5c4ccd._TempBuffer[4*i+2]=0,_0x5c4ccd._TempBuffer[4*i+3]=0;this.updateUniform(e,_0x5c4ccd._TempBuffer,8)},_0x5c4ccd.prototype._updateFloatForEffect=function(e,t){this._currentEffect.setFloat(e,t)},_0x5c4ccd.prototype._updateFloatForUniform=function(e,t){_0x5c4ccd._TempBuffer[0]=t,this.updateUniform(e,_0x5c4ccd._TempBuffer,1)},_0x5c4ccd.prototype._updateFloat2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setFloat2(e+n,t,i)},_0x5c4ccd.prototype._updateFloat2ForUniform=function(e,t,i){_0x5c4ccd._TempBuffer[0]=t,_0x5c4ccd._TempBuffer[1]=i,this.updateUniform(e,_0x5c4ccd._TempBuffer,2)},_0x5c4ccd.prototype._updateFloat3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setFloat3(e+r,t,i,n)},_0x5c4ccd.prototype._updateFloat3ForUniform=function(e,t,i,n){_0x5c4ccd._TempBuffer[0]=t,_0x5c4ccd._TempBuffer[1]=i,_0x5c4ccd._TempBuffer[2]=n,this.updateUniform(e,_0x5c4ccd._TempBuffer,3)},_0x5c4ccd.prototype._updateFloat4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setFloat4(e+o,t,i,n,r)},_0x5c4ccd.prototype._updateFloat4ForUniform=function(e,t,i,n,r){_0x5c4ccd._TempBuffer[0]=t,_0x5c4ccd._TempBuffer[1]=i,_0x5c4ccd._TempBuffer[2]=n,_0x5c4ccd._TempBuffer[3]=r,this.updateUniform(e,_0x5c4ccd._TempBuffer,4)},_0x5c4ccd.prototype._updateFloatArrayForEffect=function(e,t){this._currentEffect.setFloatArray(e,t)},_0x5c4ccd.prototype._updateFloatArrayForUniform=function(e,t){this.updateUniformArray(e,t,t.length)},_0x5c4ccd.prototype._updateArrayForEffect=function(e,t){this._currentEffect.setArray(e,t)},_0x5c4ccd.prototype._updateArrayForUniform=function(e,t){this.updateUniformArray(e,t,t.length)},_0x5c4ccd.prototype._updateIntArrayForEffect=function(e,t){this._currentEffect.setIntArray(e,t)},_0x5c4ccd.prototype._updateIntArrayForUniform=function(e,t){_0x5c4ccd._TempBufferInt32View.set(t),this.updateUniformArray(e,_0x5c4ccd._TempBuffer,t.length)},_0x5c4ccd.prototype._updateMatrixForEffect=function(e,t){this._currentEffect.setMatrix(e,t)},_0x5c4ccd.prototype._updateMatrixForUniform=function(e,t){this._cacheMatrix(e,t)&&this.updateUniform(e,t.toArray(),16)},_0x5c4ccd.prototype._updateMatricesForEffect=function(e,t){this._currentEffect.setMatrices(e,t)},_0x5c4ccd.prototype._updateMatricesForUniform=function(e,t){this.updateUniform(e,t,t.length)},_0x5c4ccd.prototype._updateVector3ForEffect=function(e,t){this._currentEffect.setVector3(e,t)},_0x5c4ccd.prototype._updateVector3ForUniform=function(e,t){_0x5c4ccd._TempBuffer[0]=t.x,_0x5c4ccd._TempBuffer[1]=t.y,_0x5c4ccd._TempBuffer[2]=t.z,this.updateUniform(e,_0x5c4ccd._TempBuffer,3)},_0x5c4ccd.prototype._updateVector4ForEffect=function(e,t){this._currentEffect.setVector4(e,t)},_0x5c4ccd.prototype._updateVector4ForUniform=function(e,t){_0x5c4ccd._TempBuffer[0]=t.x,_0x5c4ccd._TempBuffer[1]=t.y,_0x5c4ccd._TempBuffer[2]=t.z,_0x5c4ccd._TempBuffer[3]=t.w,this.updateUniform(e,_0x5c4ccd._TempBuffer,4)},_0x5c4ccd.prototype._updateColor3ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setColor3(e+i,t)},_0x5c4ccd.prototype._updateColor3ForUniform=function(e,t){_0x5c4ccd._TempBuffer[0]=t.r,_0x5c4ccd._TempBuffer[1]=t.g,_0x5c4ccd._TempBuffer[2]=t.b,this.updateUniform(e,_0x5c4ccd._TempBuffer,3)},_0x5c4ccd.prototype._updateColor4ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setColor4(e+n,t,i)},_0x5c4ccd.prototype._updateDirectColor4ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setDirectColor4(e+i,t)},_0x5c4ccd.prototype._updateColor4ForUniform=function(e,t,i){_0x5c4ccd._TempBuffer[0]=t.r,_0x5c4ccd._TempBuffer[1]=t.g,_0x5c4ccd._TempBuffer[2]=t.b,_0x5c4ccd._TempBuffer[3]=i,this.updateUniform(e,_0x5c4ccd._TempBuffer,4)},_0x5c4ccd.prototype._updateDirectColor4ForUniform=function(e,t){t.red?(_0x5c4ccd._TempBuffer[0]=t.red,_0x5c4ccd._TempBuffer[1]=t.green,_0x5c4ccd._TempBuffer[2]=t.blue,_0x5c4ccd._TempBuffer[3]=t.alpha):(_0x5c4ccd._TempBuffer[0]=t.r,_0x5c4ccd._TempBuffer[1]=t.g,_0x5c4ccd._TempBuffer[2]=t.b,_0x5c4ccd._TempBuffer[3]=t.a),this.updateUniform(e,_0x5c4ccd._TempBuffer,4)},_0x5c4ccd.prototype._updateIntForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setInt(e+i,t)},_0x5c4ccd.prototype._updateIntForUniform=function(e,t){_0x5c4ccd._TempBufferInt32View[0]=t,this.updateUniform(e,_0x5c4ccd._TempBuffer,1)},_0x5c4ccd.prototype._updateInt2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setInt2(e+n,t,i)},_0x5c4ccd.prototype._updateInt2ForUniform=function(e,t,i){_0x5c4ccd._TempBufferInt32View[0]=t,_0x5c4ccd._TempBufferInt32View[1]=i,this.updateUniform(e,_0x5c4ccd._TempBuffer,2)},_0x5c4ccd.prototype._updateInt3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setInt3(e+r,t,i,n)},_0x5c4ccd.prototype._updateInt3ForUniform=function(e,t,i,n){_0x5c4ccd._TempBufferInt32View[0]=t,_0x5c4ccd._TempBufferInt32View[1]=i,_0x5c4ccd._TempBufferInt32View[2]=n,this.updateUniform(e,_0x5c4ccd._TempBuffer,3)},_0x5c4ccd.prototype._updateInt4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setInt4(e+o,t,i,n,r)},_0x5c4ccd.prototype._updateInt4ForUniform=function(e,t,i,n,r){_0x5c4ccd._TempBufferInt32View[0]=t,_0x5c4ccd._TempBufferInt32View[1]=i,_0x5c4ccd._TempBufferInt32View[2]=n,_0x5c4ccd._TempBufferInt32View[3]=r,this.updateUniform(e,_0x5c4ccd._TempBuffer,4)},_0x5c4ccd.prototype.setTexture=function(e,t){this._currentEffect.setTexture(e,t)},_0x5c4ccd.prototype.updateUniformDirectly=function(e,t){this.updateUniform(e,t,t.length),this.update()},_0x5c4ccd.prototype.bindToEffect=function(e,t){this._currentEffect=e,this._currentEffectName=t},_0x5c4ccd.prototype.bindUniformBuffer=function(){!this._noUBO&&this._buffer&&this._currentEffect&&this._currentEffect.bindUniformBuffer(this._buffer,this._currentEffectName)},_0x5c4ccd.prototype.unbindEffect=function(){this._currentEffect=void 0,this._currentEffectName=void 0},_0x5c4ccd.prototype.setDataBuffer=function(e){if(!this._buffers)return this._buffer===e;for(var t=0;t<this._buffers.length;++t){if(this._buffers[t][0]===e)return this._bufferIndex=t,this._buffer=e,this._createBufferOnWrite=!1,this._currentEffect=void 0,!0}return!1},_0x5c4ccd.prototype.dispose=function(){if(!this._noUBO){var e=this._engine._uniformBuffers,t=e.indexOf(this);if(-1!==t&&(e[t]=e[e.length-1],e.pop()),this._trackUbosInFrame&&this._buffers)for(var i=0;i<this._buffers.length;++i){var n=this._buffers[i][0];this._engine._releaseBuffer(n)}else this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)}},_0x5c4ccd._UpdatedUbosInFrame={},_0x5c4ccd._MAX_UNIFORM_SIZE=256,_0x5c4ccd._TempBuffer=new Float32Array(_0x5c4ccd._MAX_UNIFORM_SIZE),_0x5c4ccd._TempBufferInt32View=new Uint32Array(_0x5c4ccd._TempBuffer.buffer);var e$1Z={SCENE:"Scene",LIGHT:"Light",MESH:"Mesh",MATERIAL:"Material",LAYER:"Layer",SHADOW:"Shadow",WaterLayer:"WaterLayer",Polyline:"Polyline",S3MVolume:"S3MVolume"},_0x2e0417=Object.freeze(e$1Z),_0x39f9f1=(_0x5e85d9=!0,function(e,t){var i=_0x5e85d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e85d9=!1,i}),_0xbfe2d8=_0x39f9f1(void 0,(function(){return _0xbfe2d8.toString().search("(((.+)+)+)+$").toString().constructor(_0xbfe2d8).search("(((.+)+)+)+$")})),_0x5e85d9;function _0x404bc2(){}_0xbfe2d8(),_0x404bc2.BuildArray=function(e,t){for(var i=[],n=0;n<e;++n)i.push(t());return i},_0x404bc2.BuildTuple=function(e,t){return _0x404bc2.BuildArray(e,t)};var _0x59e1ec=(_0x426578=!0,function(e,t){var i=_0x426578?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x426578=!1,i}),_0x3a4632=_0x59e1ec(void 0,(function(){return _0x3a4632.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a4632).search("(((.+)+)+)+$")})),_0x426578;function _0x2fa08c(){}_0x3a4632(),_0x2fa08c.SetMatrixPrecision=function(e){if(_0x2fa08c.MatrixTrackPrecisionChange=!1,e&&!_0x2fa08c.MatrixUse64Bits&&_0x2fa08c.MatrixTrackedMatrices)for(var t=0;t<_0x2fa08c.MatrixTrackedMatrices.length;++t){var i=_0x2fa08c.MatrixTrackedMatrices[t],n=i._m;i._m=new Array(16);for(var r=0;r<16;++r)i._m[r]=n[r]}_0x2fa08c.MatrixUse64Bits=e,_0x2fa08c.MatrixCurrentType=_0x2fa08c.MatrixUse64Bits?Array:Float32Array,_0x2fa08c.MatrixTrackedMatrices=null},_0x2fa08c.MatrixUse64Bits=!1,_0x2fa08c.MatrixTrackPrecisionChange=!0,_0x2fa08c.MatrixCurrentType=Float32Array,_0x2fa08c.MatrixTrackedMatrices=[];var _0x305a01=(_0x422df3=!0,function(e,t){var i=_0x422df3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x422df3=!1,i}),_0x2151c3=_0x305a01(void 0,(function(){return _0x2151c3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2151c3).search("(((.+)+)+)+$")})),_0x422df3;_0x2151c3();var _0x1b2557=function(e){return parseInt(e.toString().replace(/\W/g,""))};function Vector2(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.x=e,this.y=t}function Vector3(e,t,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),this._isDirty=!0,this._x=e,this._y=t,this._z=i}function Vector4(e,t,i,n){this.x=e,this.y=t,this.z=i,this.w=n}function Quaternion(e,t,i,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=1),this._isDirty=!0,this._x=e,this._y=t,this._z=i,this._w=n}function Matrix(){this._isIdentity=!1,this._isIdentityDirty=!0,this._isIdentity3x2=!0,this._isIdentity3x2Dirty=!0,this.updateFlag=-1,_0x2fa08c.MatrixTrackPrecisionChange&&_0x2fa08c.MatrixTrackedMatrices.push(this),this._m=new _0x2fa08c.MatrixCurrentType(16),this.markAsUpdated()}function MathTmp(){}function TmpVectors(){}Vector2.prototype.toString=function(){return"{X: ".concat(this.x," Y: ").concat(this.y,"}")},Vector2.prototype.getClassName=function(){return"Vector2"},Vector2.prototype.getHashCode=function(){var e=_0x1b2557(this.x);return e=397*e^_0x1b2557(this.y)},Vector2.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,this},Vector2.prototype.fromArray=function(e,t){return void 0===t&&(t=0),Vector2.FromArrayToRef(e,t,this),this},Vector2.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},Vector2.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this},Vector2.prototype.copyFromFloats=function(e,t){return this.x=e,this.y=t,this},Vector2.prototype.set=function(e,t){return this.copyFromFloats(e,t)},Vector2.prototype.add=function(e){return new Vector2(this.x+e.x,this.y+e.y)},Vector2.prototype.addToRef=function(e,t){return t.x=this.x+e.x,t.y=this.y+e.y,this},Vector2.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this},Vector2.prototype.addVector3=function(e){return new Vector2(this.x+e.x,this.y+e.y)},Vector2.prototype.subtract=function(e){return new Vector2(this.x-e.x,this.y-e.y)},Vector2.prototype.subtractToRef=function(e,t){return t.x=this.x-e.x,t.y=this.y-e.y,this},Vector2.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this},Vector2.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this},Vector2.prototype.multiply=function(e){return new Vector2(this.x*e.x,this.y*e.y)},Vector2.prototype.multiplyToRef=function(e,t){return t.x=this.x*e.x,t.y=this.y*e.y,this},Vector2.prototype.multiplyByFloats=function(e,t){return new Vector2(this.x*e,this.y*t)},Vector2.prototype.divide=function(e){return new Vector2(this.x/e.x,this.y/e.y)},Vector2.prototype.divideToRef=function(e,t){return t.x=this.x/e.x,t.y=this.y/e.y,this},Vector2.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},Vector2.prototype.negate=function(){return new Vector2(-this.x,-this.y)},Vector2.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this},Vector2.prototype.negateToRef=function(e){return e.copyFromFloats(-1*this.x,-1*this.y)},Vector2.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this},Vector2.prototype.scale=function(e){var t=new Vector2(0,0);return this.scaleToRef(e,t),t},Vector2.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,this},Vector2.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,this},Vector2.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y},Vector2.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.x,e.x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.y,e.y,t)},Vector2.prototype.floor=function(){return new Vector2(Math.floor(this.x),Math.floor(this.y))},Vector2.prototype.fract=function(){return new Vector2(this.x-Math.floor(this.x),this.y-Math.floor(this.y))},Vector2.prototype.rotateToRef=function(e,t){var i=Math.cos(e),n=Math.sin(e);return t.x=i*this.x-n*this.y,t.y=n*this.x+i*this.y,this},Vector2.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},Vector2.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y},Vector2.prototype.normalize=function(){return Vector2.NormalizeToRef(this,this),this},Vector2.prototype.clone=function(){return new Vector2(this.x,this.y)},Vector2.Zero=function(){return new Vector2(0,0)},Vector2.One=function(){return new Vector2(1,1)},Vector2.FromArray=function(e,t){return void 0===t&&(t=0),new Vector2(e[t],e[t+1])},Vector2.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1]},Vector2.CatmullRom=function(e,t,i,n,r){var o=r*r,a=r*o;return new Vector2(.5*(2*t.x+(-e.x+i.x)*r+(2*e.x-5*t.x+4*i.x-n.x)*o+(-e.x+3*t.x-3*i.x+n.x)*a),.5*(2*t.y+(-e.y+i.y)*r+(2*e.y-5*t.y+4*i.y-n.y)*o+(-e.y+3*t.y-3*i.y+n.y)*a))},Vector2.Clamp=function(e,t,i){var n=e.x;n=(n=n>i.x?i.x:n)<t.x?t.x:n;var r=e.y;return new Vector2(n,r=(r=r>i.y?i.y:r)<t.y?t.y:r)},Vector2.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o,s=2*a-3*o+1,l=-2*a+3*o,u=a-2*o+r,c=a-o;return new Vector2(e.x*s+i.x*l+t.x*u+n.x*c,e.y*s+i.y*l+t.y*u+n.y*c)},Vector2.Hermite1stDerivative=function(e,t,i,n,r){var o=Vector2.Zero();return this.Hermite1stDerivativeToRef(e,t,i,n,r,o),o},Vector2.Hermite1stDerivativeToRef=function(e,t,i,n,r,o){var a=r*r;o.x=6*(a-r)*e.x+(3*a-4*r+1)*t.x+6*(-a+r)*i.x+(3*a-2*r)*n.x,o.y=6*(a-r)*e.y+(3*a-4*r+1)*t.y+6*(-a+r)*i.y+(3*a-2*r)*n.y},Vector2.Lerp=function(e,t,i){return new Vector2(e.x+(t.x-e.x)*i,e.y+(t.y-e.y)*i)},Vector2.Dot=function(e,t){return e.x*t.x+e.y*t.y},Vector2.Normalize=function(e){var t=Vector2.Zero();return this.NormalizeToRef(e,t),t},Vector2.NormalizeToRef=function(e,t){var i=e.length();0!==i&&(t.x=e.x/i,t.y=e.y/i)},Vector2.Minimize=function(e,t){return new Vector2(e.x<t.x?e.x:t.x,e.y<t.y?e.y:t.y)},Vector2.Maximize=function(e,t){return new Vector2(e.x>t.x?e.x:t.x,e.y>t.y?e.y:t.y)},Vector2.Transform=function(e,t){var i=Vector2.Zero();return Vector2.TransformToRef(e,t,i),i},Vector2.TransformToRef=function(e,t,i){var n=t.m,r=e.x*n[0]+e.y*n[4]+n[12],o=e.x*n[1]+e.y*n[5]+n[13];i.x=r,i.y=o},Vector2.PointInTriangle=function(e,t,i,n){var r=.5*(-i.y*n.x+t.y*(-i.x+n.x)+t.x*(i.y-n.y)+i.x*n.y),o=r<0?-1:1,a=(t.y*n.x-t.x*n.y+(n.y-t.y)*e.x+(t.x-n.x)*e.y)*o,s=(t.x*i.y-t.y*i.x+(t.y-i.y)*e.x+(i.x-t.x)*e.y)*o;return a>0&&s>0&&a+s<2*r*o},Vector2.Distance=function(e,t){return Math.sqrt(Vector2.DistanceSquared(e,t))},Vector2.DistanceSquared=function(e,t){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},Vector2.Center=function(e,t){return Vector2.CenterToRef(e,t,Vector2.Zero())},Vector2.CenterToRef=function(e,t,i){return i.copyFromFloats((e.x+t.x)/2,(e.y+t.y)/2)},Vector2.DistanceOfPointFromSegment=function(e,t,i){var n=Vector2.DistanceSquared(t,i);if(0===n)return Vector2.Distance(e,t);var r=i.subtract(t),o=Math.max(0,Math.min(1,Vector2.Dot(e.subtract(t),r)/n)),a=t.add(r.multiplyByFloats(o,o));return Vector2.Distance(e,a)},Object.defineProperty(Vector3.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3.prototype,"z",{get:function(){return this._z},set:function(e){this._z=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Vector3.prototype.toString=function(){return"{X: ".concat(this._x," Y: ").concat(this._y," Z: ").concat(this._z,"}")},Vector3.prototype.getClassName=function(){return"Vector3"},Vector3.prototype.getHashCode=function(){var e=_0x1b2557(this._x);return e=397*(e=397*e^_0x1b2557(this._y))^_0x1b2557(this._z)},Vector3.prototype.asArray=function(){var e=[];return this.toArray(e,0),e},Vector3.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,this},Vector3.prototype.fromArray=function(e,t){return void 0===t&&(t=0),Vector3.FromArrayToRef(e,t,this),this},Vector3.prototype.toQuaternion=function(){return Quaternion.RotationYawPitchRoll(this._y,this._x,this._z)},Vector3.prototype.addInPlace=function(e){return this.addInPlaceFromFloats(e._x,e._y,e._z)},Vector3.prototype.addInPlaceFromFloats=function(e,t,i){return this.x+=e,this.y+=t,this.z+=i,this},Vector3.prototype.add=function(e){return new Vector3(this._x+e._x,this._y+e._y,this._z+e._z)},Vector3.prototype.addToRef=function(e,t){return t.copyFromFloats(this._x+e._x,this._y+e._y,this._z+e._z)},Vector3.prototype.subtractInPlace=function(e){return this.x-=e._x,this.y-=e._y,this.z-=e._z,this},Vector3.prototype.subtract=function(e){return new Vector3(this._x-e._x,this._y-e._y,this._z-e._z)},Vector3.prototype.subtractToRef=function(e,t){return this.subtractFromFloatsToRef(e._x,e._y,e._z,t)},Vector3.prototype.subtractFromFloats=function(e,t,i){return new Vector3(this._x-e,this._y-t,this._z-i)},Vector3.prototype.subtractFromFloatsToRef=function(e,t,i,n){return n.copyFromFloats(this._x-e,this._y-t,this._z-i)},Vector3.prototype.negate=function(){return new Vector3(-this._x,-this._y,-this._z)},Vector3.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},Vector3.prototype.negateToRef=function(e){return e.copyFromFloats(-1*this._x,-1*this._y,-1*this._z)},Vector3.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this},Vector3.prototype.scale=function(e){return new Vector3(this._x*e,this._y*e,this._z*e)},Vector3.prototype.scaleToRef=function(e,t){return t.copyFromFloats(this._x*e,this._y*e,this._z*e)},Vector3.prototype.applyRotationQuaternionToRef=function(e,t){var i=e.w*this.x+e.y*this.z-e.z*this.y,n=e.w*this.y+e.z*this.x-e.x*this.z,r=e.w*this.z+e.x*this.y-e.y*this.x,o=-e.x*this.x-e.y*this.y-e.z*this.z;return t.x=i*e.w+o*-e.x+n*-e.z-r*-e.y,t.y=n*e.w+o*-e.y+r*-e.x-i*-e.z,t.z=r*e.w+o*-e.z+i*-e.y-n*-e.x,t},Vector3.prototype.applyRotationQuaternionInPlace=function(e){return this.applyRotationQuaternionToRef(e,this)},Vector3.prototype.applyRotationQuaternion=function(e){return this.applyRotationQuaternionToRef(e,Vector3.Zero())},Vector3.prototype.scaleAndAddToRef=function(e,t){return t.addInPlaceFromFloats(this._x*e,this._y*e,this._z*e)},Vector3.prototype.projectOnPlane=function(e,t){var i=Vector3.Zero();return this.projectOnPlaneToRef(e,t,i),i},Vector3.prototype.projectOnPlaneToRef=function(e,t,i){var n=e.normal,r=e.d,o=MathTmp.Vector3[0];this.subtractToRef(t,o),o.normalize();var a=Vector3.Dot(o,n),s=-(Vector3.Dot(t,n)+r)/a,l=o.scaleInPlace(s);t.addToRef(l,i)},Vector3.prototype.equals=function(e){return e&&this._x===e._x&&this._y===e._y&&this._z===e._z},Vector3.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._x,e._x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._y,e._y,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._z,e._z,t)},Vector3.prototype.equalsToFloats=function(e,t,i){return this._x===e&&this._y===t&&this._z===i},Vector3.prototype.multiplyInPlace=function(e){return this.x*=e._x,this.y*=e._y,this.z*=e._z,this},Vector3.prototype.multiply=function(e){return this.multiplyByFloats(e._x,e._y,e._z)},Vector3.prototype.multiplyToRef=function(e,t){return t.copyFromFloats(this._x*e._x,this._y*e._y,this._z*e._z)},Vector3.prototype.multiplyByFloats=function(e,t,i){return new Vector3(this._x*e,this._y*t,this._z*i)},Vector3.prototype.divide=function(e){return new Vector3(this._x/e._x,this._y/e._y,this._z/e._z)},Vector3.prototype.divideToRef=function(e,t){return t.copyFromFloats(this._x/e._x,this._y/e._y,this._z/e._z)},Vector3.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},Vector3.prototype.minimizeInPlace=function(e){return this.minimizeInPlaceFromFloats(e._x,e._y,e._z)},Vector3.prototype.maximizeInPlace=function(e){return this.maximizeInPlaceFromFloats(e._x,e._y,e._z)},Vector3.prototype.minimizeInPlaceFromFloats=function(e,t,i){return e<this._x&&(this.x=e),t<this._y&&(this.y=t),i<this._z&&(this.z=i),this},Vector3.prototype.maximizeInPlaceFromFloats=function(e,t,i){return e>this._x&&(this.x=e),t>this._y&&(this.y=t),i>this._z&&(this.z=i),this},Vector3.prototype.isNonUniformWithinEpsilon=function(e){var t=Math.abs(this._x),i=Math.abs(this._y);if(!_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(t,i,e))return!0;var n=Math.abs(this._z);return!_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(t,n,e)||!_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(i,n,e)},Object.defineProperty(Vector3.prototype,"isNonUniform",{get:function(){var e=Math.abs(this._x);return e!==Math.abs(this._y)||e!==Math.abs(this._z)},enumerable:!1,configurable:!0}),Vector3.prototype.floor=function(){return new Vector3(Math.floor(this._x),Math.floor(this._y),Math.floor(this._z))},Vector3.prototype.fract=function(){return new Vector3(this._x-Math.floor(this._x),this._y-Math.floor(this._y),this._z-Math.floor(this._z))},Vector3.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)},Vector3.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z},Object.defineProperty(Vector3.prototype,"hasAZeroComponent",{get:function(){return this._x*this._y*this._z==0},enumerable:!1,configurable:!0}),Vector3.prototype.normalize=function(){return this.normalizeFromLength(this.length())},Vector3.prototype.reorderInPlace=function(e){var t=this;return"xyz"===(e=e.toLowerCase())||(MathTmp.Vector3[0].copyFrom(this),["x","y","z"].forEach((function(i,n){t[i]=MathTmp.Vector3[0][e[n]]}))),this},Vector3.prototype.rotateByQuaternionToRef=function(e,t){return e.toRotationMatrix(MathTmp.Matrix[0]),Vector3.TransformCoordinatesToRef(this,MathTmp.Matrix[0],t),t},Vector3.prototype.rotateByQuaternionAroundPointToRef=function(e,t,i){return this.subtractToRef(t,MathTmp.Vector3[0]),MathTmp.Vector3[0].rotateByQuaternionToRef(e,MathTmp.Vector3[0]),t.addToRef(MathTmp.Vector3[0],i),i},Vector3.prototype.cross=function(e){return Vector3.Cross(this,e)},Vector3.prototype.normalizeFromLength=function(e){return 0===e||1===e?this:this.scaleInPlace(1/e)},Vector3.prototype.normalizeToNew=function(){var e=new Vector3(0,0,0);return this.normalizeToRef(e),e},Vector3.prototype.normalizeToRef=function(e){var t=this.length();return 0===t||1===t?e.copyFromFloats(this._x,this._y,this._z):this.scaleToRef(1/t,e)},Vector3.prototype.clone=function(){return new Vector3(this._x,this._y,this._z)},Vector3.prototype.copyFrom=function(e){return this.copyFromFloats(e._x,e._y,e._z)},Vector3.prototype.copyFromFloats=function(e,t,i){return this.x=e,this.y=t,this.z=i,this},Vector3.prototype.set=function(e,t,i){return this.copyFromFloats(e,t,i)},Vector3.prototype.setAll=function(e){return this.x=this.y=this.z=e,this},Vector3.GetClipFactor=function(e,t,i,n){var r=Vector3.Dot(e,i)-n;return r/(r-(Vector3.Dot(t,i)-n))},Vector3.GetAngleBetweenVectors=function(e,t,i){var n=e.normalizeToRef(MathTmp.Vector3[1]),r=t.normalizeToRef(MathTmp.Vector3[2]),o=Vector3.Dot(n,r);o=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(o,-1,1);var a=Math.acos(o),s=MathTmp.Vector3[3];return Vector3.CrossToRef(n,r,s),Vector3.Dot(s,i)>0?isNaN(a)?0:a:isNaN(a)?-Math.PI:-Math.acos(o)},Vector3.GetAngleBetweenVectorsOnPlane=function(e,t,i){MathTmp.Vector3[0].copyFrom(e);var n=MathTmp.Vector3[0];MathTmp.Vector3[1].copyFrom(t);var r=MathTmp.Vector3[1];MathTmp.Vector3[2].copyFrom(i);var o=MathTmp.Vector3[2],a=MathTmp.Vector3[3],s=MathTmp.Vector3[4];n.normalize(),r.normalize(),o.normalize(),Vector3.CrossToRef(o,n,a),Vector3.CrossToRef(a,o,s);var l=Math.atan2(Vector3.Dot(r,a),Vector3.Dot(r,s));return _math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.NormalizeRadians(l)},Vector3.SlerpToRef=function(e,t,i,n){i=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(i,0,1);var r=MathTmp.Vector3[0],o=MathTmp.Vector3[1];r.copyFrom(e);var a=r.length();r.normalizeFromLength(a),o.copyFrom(t);var s=o.length();o.normalizeFromLength(s);var l,u,c=Vector3.Dot(r,o);if(c<1-_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon){var h=Math.acos(c),d=1/Math.sin(h);l=Math.sin((1-i)*h)*d,u=Math.sin(i*h)*d}else l=1-i,u=i;r.scaleInPlace(l),o.scaleInPlace(u),n.copyFrom(r).addInPlace(o),n.scaleInPlace(_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Lerp(a,s,i))},Vector3.SmoothToRef=function(e,t,i,n,r){Vector3.SlerpToRef(e,t,0===n?1:i/n,r)},Vector3.FromArray=function(e,t){return void 0===t&&(t=0),new Vector3(e[t],e[t+1],e[t+2])},Vector3.FromFloatArray=function(e,t){return Vector3.FromArray(e,t)},Vector3.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2]},Vector3.FromFloatArrayToRef=function(e,t,i){return Vector3.FromArrayToRef(e,t,i)},Vector3.FromFloatsToRef=function(e,t,i,n){n.copyFromFloats(e,t,i)},Vector3.Zero=function(){return new Vector3(0,0,0)},Vector3.One=function(){return new Vector3(1,1,1)},Vector3.Up=function(){return new Vector3(0,1,0)},Object.defineProperty(Vector3,"UpReadOnly",{get:function(){return Vector3._UpReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"RightReadOnly",{get:function(){return Vector3._RightReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"LeftReadOnly",{get:function(){return Vector3._LeftReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"LeftHandedForwardReadOnly",{get:function(){return Vector3._LeftHandedForwardReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"RightHandedForwardReadOnly",{get:function(){return Vector3._RightHandedForwardReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(Vector3,"ZeroReadOnly",{get:function(){return Vector3._ZeroReadOnly},enumerable:!1,configurable:!0}),Vector3.Down=function(){return new Vector3(0,-1,0)},Vector3.Forward=function(e){return void 0===e&&(e=!1),new Vector3(0,0,e?-1:1)},Vector3.Backward=function(e){return void 0===e&&(e=!1),new Vector3(0,0,e?1:-1)},Vector3.Right=function(){return new Vector3(1,0,0)},Vector3.Left=function(){return new Vector3(-1,0,0)},Vector3.TransformCoordinates=function(e,t){var i=Vector3.Zero();return Vector3.TransformCoordinatesToRef(e,t,i),i},Vector3.TransformCoordinatesToRef=function(e,t,i){Vector3.TransformCoordinatesFromFloatsToRef(e._x,e._y,e._z,t,i)},Vector3.TransformCoordinatesFromFloatsToRef=function(e,t,i,n,r){var o=n.m,a=e*o[0]+t*o[4]+i*o[8]+o[12],s=e*o[1]+t*o[5]+i*o[9]+o[13],l=e*o[2]+t*o[6]+i*o[10]+o[14],u=1/(e*o[3]+t*o[7]+i*o[11]+o[15]);r.x=a*u,r.y=s*u,r.z=l*u},Vector3.TransformNormal=function(e,t){var i=Vector3.Zero();return Vector3.TransformNormalToRef(e,t,i),i},Vector3.TransformNormalToRef=function(e,t,i){this.TransformNormalFromFloatsToRef(e._x,e._y,e._z,t,i)},Vector3.TransformNormalFromFloatsToRef=function(e,t,i,n,r){var o=n.m;r.x=e*o[0]+t*o[4]+i*o[8],r.y=e*o[1]+t*o[5]+i*o[9],r.z=e*o[2]+t*o[6]+i*o[10]},Vector3.CatmullRom=function(e,t,i,n,r){var o=r*r,a=r*o;return new Vector3(.5*(2*t._x+(-e._x+i._x)*r+(2*e._x-5*t._x+4*i._x-n._x)*o+(-e._x+3*t._x-3*i._x+n._x)*a),.5*(2*t._y+(-e._y+i._y)*r+(2*e._y-5*t._y+4*i._y-n._y)*o+(-e._y+3*t._y-3*i._y+n._y)*a),.5*(2*t._z+(-e._z+i._z)*r+(2*e._z-5*t._z+4*i._z-n._z)*o+(-e._z+3*t._z-3*i._z+n._z)*a))},Vector3.Clamp=function(e,t,i){var n=new Vector3;return Vector3.ClampToRef(e,t,i,n),n},Vector3.ClampToRef=function(e,t,i,n){var r=e._x;r=(r=r>i._x?i._x:r)<t._x?t._x:r;var o=e._y;o=(o=o>i._y?i._y:o)<t._y?t._y:o;var a=e._z;a=(a=a>i._z?i._z:a)<t._z?t._z:a,n.copyFromFloats(r,o,a)},Vector3.CheckExtends=function(e,t,i){t.minimizeInPlace(e),i.maximizeInPlace(e)},Vector3.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o,s=2*a-3*o+1,l=-2*a+3*o,u=a-2*o+r,c=a-o;return new Vector3(e._x*s+i._x*l+t._x*u+n._x*c,e._y*s+i._y*l+t._y*u+n._y*c,e._z*s+i._z*l+t._z*u+n._z*c)},Vector3.Hermite1stDerivative=function(e,t,i,n,r){var o=Vector3.Zero();return this.Hermite1stDerivativeToRef(e,t,i,n,r,o),o},Vector3.Hermite1stDerivativeToRef=function(e,t,i,n,r,o){var a=r*r;o.x=6*(a-r)*e.x+(3*a-4*r+1)*t.x+6*(-a+r)*i.x+(3*a-2*r)*n.x,o.y=6*(a-r)*e.y+(3*a-4*r+1)*t.y+6*(-a+r)*i.y+(3*a-2*r)*n.y,o.z=6*(a-r)*e.z+(3*a-4*r+1)*t.z+6*(-a+r)*i.z+(3*a-2*r)*n.z},Vector3.Lerp=function(e,t,i){var n=new Vector3(0,0,0);return Vector3.LerpToRef(e,t,i,n),n},Vector3.LerpToRef=function(e,t,i,n){n.x=e._x+(t._x-e._x)*i,n.y=e._y+(t._y-e._y)*i,n.z=e._z+(t._z-e._z)*i},Vector3.Dot=function(e,t){return e._x*t._x+e._y*t._y+e._z*t._z},Vector3.Cross=function(e,t){var i=Vector3.Zero();return Vector3.CrossToRef(e,t,i),i},Vector3.CrossToRef=function(e,t,i){var n=e._y*t._z-e._z*t._y,r=e._z*t._x-e._x*t._z,o=e._x*t._y-e._y*t._x;i.copyFromFloats(n,r,o)},Vector3.Normalize=function(e){var t=Vector3.Zero();return Vector3.NormalizeToRef(e,t),t},Vector3.NormalizeToRef=function(e,t){e.normalizeToRef(t)},Vector3.Project=function(e,t,i,n){var r=new Vector3;return Vector3.ProjectToRef(e,t,i,n,r),r},Vector3.ProjectToRef=function(e,t,i,n,r){var o=n.width,a=n.height,s=n.x,l=n.y,u=MathTmp.Matrix[1];Matrix.FromValuesToRef(o/2,0,0,0,0,-a/2,0,0,0,0,.5,0,s+o/2,a/2+l,.5,1,u);var c=MathTmp.Matrix[0];return t.multiplyToRef(i,c),c.multiplyToRef(u,c),Vector3.TransformCoordinatesToRef(e,c,r),r},Vector3._UnprojectFromInvertedMatrixToRef=function(e,t,i){Vector3.TransformCoordinatesToRef(e,t,i);var n=t.m,r=e._x*n[3]+e._y*n[7]+e._z*n[11]+n[15];_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(r,1)&&i.scaleInPlace(1/r)},Vector3.UnprojectFromTransform=function(e,t,i,n,r){return this.Unproject(e,t,i,n,r,Matrix.IdentityReadOnly)},Vector3.Unproject=function(e,t,i,n,r,o){var a=Vector3.Zero();return Vector3.UnprojectToRef(e,t,i,n,r,o,a),a},Vector3.UnprojectToRef=function(e,t,i,n,r,o,a){Vector3.UnprojectFloatsToRef(e._x,e._y,e._z,t,i,n,r,o,a)},Vector3.UnprojectFloatsToRef=function(e,t,i,n,r,o,a,s,l){var u,c=MathTmp.Matrix[0];o.multiplyToRef(a,c),c.multiplyToRef(s,c),c.invert();var h=MathTmp.Vector3[0];h.x=e/n*2-1,h.y=-(t/r*2-1),(null===(u=_Engines_engineStore__WEBPACK_IMPORTED_MODULE_5__.EngineStore.LastCreatedEngine)||void 0===u?void 0:u.isNDCHalfZRange)?h.z=i:h.z=2*i-1,Vector3._UnprojectFromInvertedMatrixToRef(h,c,l)},Vector3.Minimize=function(e,t){var i=e.clone();return i.minimizeInPlace(t),i},Vector3.Maximize=function(e,t){var i=e.clone();return i.maximizeInPlace(t),i},Vector3.Distance=function(e,t){return Math.sqrt(Vector3.DistanceSquared(e,t))},Vector3.DistanceSquared=function(e,t){var i=e._x-t._x,n=e._y-t._y,r=e._z-t._z;return i*i+n*n+r*r},Vector3.ProjectOnTriangleToRef=function(e,t,i,n,r){var o=MathTmp.Vector3[0],a=MathTmp.Vector3[1],s=MathTmp.Vector3[2],l=MathTmp.Vector3[3],u=MathTmp.Vector3[4];i.subtractToRef(t,o),n.subtractToRef(t,a),n.subtractToRef(i,s);var c=o.length(),h=a.length(),d=s.length();if(c<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon||h<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon||d<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(t),Vector3.Distance(e,t);e.subtractToRef(t,u),Vector3.CrossToRef(o,a,l);var f=l.length();if(f<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(t),Vector3.Distance(e,t);l.normalizeFromLength(f);var p=u.length();if(p<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(t),0;u.normalizeFromLength(p);var _=Vector3.Dot(l,u),m=MathTmp.Vector3[5],g=MathTmp.Vector3[6];m.copyFrom(l).scaleInPlace(-p*_),g.copyFrom(e).addInPlace(m);var x=MathTmp.Vector3[4],y=MathTmp.Vector3[5],v=MathTmp.Vector3[7],$=MathTmp.Vector3[8];x.copyFrom(o).scaleInPlace(1/c),$.copyFrom(a).scaleInPlace(1/h),x.addInPlace($).scaleInPlace(-1),y.copyFrom(o).scaleInPlace(-1/c),$.copyFrom(s).scaleInPlace(1/d),y.addInPlace($).scaleInPlace(-1),v.copyFrom(s).scaleInPlace(-1/d),$.copyFrom(a).scaleInPlace(-1/h),v.addInPlace($).scaleInPlace(-1);var b=MathTmp.Vector3[9];b.copyFrom(g).subtractInPlace(t),Vector3.CrossToRef(x,b,$);var T=Vector3.Dot($,l);b.copyFrom(g).subtractInPlace(i),Vector3.CrossToRef(y,b,$);var C=Vector3.Dot($,l);b.copyFrom(g).subtractInPlace(n),Vector3.CrossToRef(v,b,$);var S,w,E=Vector3.Dot($,l),P=MathTmp.Vector3[10];T>0&&C<0?(P.copyFrom(o),S=t,w=i):C>0&&E<0?(P.copyFrom(s),S=i,w=n):(P.copyFrom(a).scaleInPlace(-1),S=n,w=t);var A=MathTmp.Vector3[9],L=MathTmp.Vector3[4];if(S.subtractToRef(g,$),w.subtractToRef(g,A),Vector3.CrossToRef($,A,L),!(Vector3.Dot(L,l)<0))return r.copyFrom(g),Math.abs(p*_);var M=MathTmp.Vector3[5];Vector3.CrossToRef(P,L,M),M.normalize();var R=MathTmp.Vector3[9];R.copyFrom(S).subtractInPlace(g);var O=R.length();if(O<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)return r.copyFrom(S),Vector3.Distance(e,S);R.normalizeFromLength(O);var D=Vector3.Dot(M,R),I=MathTmp.Vector3[7];I.copyFrom(g).addInPlace(M.scaleInPlace(O*D)),$.copyFrom(I).subtractInPlace(S),p=P.length(),P.normalizeFromLength(p);var B=Vector3.Dot($,P)/Math.max(p,_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon);return B=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(B,0,1),I.copyFrom(S).addInPlace(P.scaleInPlace(B*p)),r.copyFrom(I),Vector3.Distance(e,I)},Vector3.Center=function(e,t){return Vector3.CenterToRef(e,t,Vector3.Zero())},Vector3.CenterToRef=function(e,t,i){return i.copyFromFloats((e._x+t._x)/2,(e._y+t._y)/2,(e._z+t._z)/2)},Vector3.RotationFromAxis=function(e,t,i){var n=Vector3.Zero();return Vector3.RotationFromAxisToRef(e,t,i,n),n},Vector3.RotationFromAxisToRef=function(e,t,i,n){var r=MathTmp.Quaternion[0];Quaternion.RotationQuaternionFromAxisToRef(e,t,i,r),r.toEulerAnglesToRef(n)},Vector3._UpReadOnly=Vector3.Up(),Vector3._LeftHandedForwardReadOnly=Vector3.Forward(!1),Vector3._RightHandedForwardReadOnly=Vector3.Forward(!0),Vector3._RightReadOnly=Vector3.Right(),Vector3._LeftReadOnly=Vector3.Left(),Vector3._ZeroReadOnly=Vector3.Zero(),Vector4.prototype.toString=function(){return"{X: ".concat(this.x," Y: ").concat(this.y," Z: ").concat(this.z," W: ").concat(this.w,"}")},Vector4.prototype.getClassName=function(){return"Vector4"},Vector4.prototype.getHashCode=function(){var e=_0x1b2557(this.x);return e=397*(e=397*(e=397*e^_0x1b2557(this.y))^_0x1b2557(this.z))^_0x1b2557(this.w)},Vector4.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},Vector4.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,this},Vector4.prototype.fromArray=function(e,t){return void 0===t&&(t=0),Vector4.FromArrayToRef(e,t,this),this},Vector4.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this},Vector4.prototype.add=function(e){return new Vector4(this.x+e.x,this.y+e.y,this.z+e.z,this.w+e.w)},Vector4.prototype.addToRef=function(e,t){return t.x=this.x+e.x,t.y=this.y+e.y,t.z=this.z+e.z,t.w=this.w+e.w,this},Vector4.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this},Vector4.prototype.subtract=function(e){return new Vector4(this.x-e.x,this.y-e.y,this.z-e.z,this.w-e.w)},Vector4.prototype.subtractToRef=function(e,t){return t.x=this.x-e.x,t.y=this.y-e.y,t.z=this.z-e.z,t.w=this.w-e.w,this},Vector4.prototype.subtractFromFloats=function(e,t,i,n){return new Vector4(this.x-e,this.y-t,this.z-i,this.w-n)},Vector4.prototype.subtractFromFloatsToRef=function(e,t,i,n,r){return r.x=this.x-e,r.y=this.y-t,r.z=this.z-i,r.w=this.w-n,this},Vector4.prototype.negate=function(){return new Vector4(-this.x,-this.y,-this.z,-this.w)},Vector4.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.w*=-1,this},Vector4.prototype.negateToRef=function(e){return e.copyFromFloats(-1*this.x,-1*this.y,-1*this.z,-1*this.w)},Vector4.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},Vector4.prototype.scale=function(e){return new Vector4(this.x*e,this.y*e,this.z*e,this.w*e)},Vector4.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,t.z=this.z*e,t.w=this.w*e,this},Vector4.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,t.z+=this.z*e,t.w+=this.w*e,this},Vector4.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y&&this.z===e.z&&this.w===e.w},Vector4.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.x,e.x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.y,e.y,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.z,e.z,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this.w,e.w,t)},Vector4.prototype.equalsToFloats=function(e,t,i,n){return this.x===e&&this.y===t&&this.z===i&&this.w===n},Vector4.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this},Vector4.prototype.multiply=function(e){return new Vector4(this.x*e.x,this.y*e.y,this.z*e.z,this.w*e.w)},Vector4.prototype.multiplyToRef=function(e,t){return t.x=this.x*e.x,t.y=this.y*e.y,t.z=this.z*e.z,t.w=this.w*e.w,this},Vector4.prototype.multiplyByFloats=function(e,t,i,n){return new Vector4(this.x*e,this.y*t,this.z*i,this.w*n)},Vector4.prototype.divide=function(e){return new Vector4(this.x/e.x,this.y/e.y,this.z/e.z,this.w/e.w)},Vector4.prototype.divideToRef=function(e,t){return t.x=this.x/e.x,t.y=this.y/e.y,t.z=this.z/e.z,t.w=this.w/e.w,this},Vector4.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},Vector4.prototype.minimizeInPlace=function(e){return e.x<this.x&&(this.x=e.x),e.y<this.y&&(this.y=e.y),e.z<this.z&&(this.z=e.z),e.w<this.w&&(this.w=e.w),this},Vector4.prototype.maximizeInPlace=function(e){return e.x>this.x&&(this.x=e.x),e.y>this.y&&(this.y=e.y),e.z>this.z&&(this.z=e.z),e.w>this.w&&(this.w=e.w),this},Vector4.prototype.floor=function(){return new Vector4(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z),Math.floor(this.w))},Vector4.prototype.fract=function(){return new Vector4(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z),this.w-Math.floor(this.w))},Vector4.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},Vector4.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},Vector4.prototype.normalize=function(){var e=this.length();return 0===e?this:this.scaleInPlace(1/e)},Vector4.prototype.toVector3=function(){return new Vector3(this.x,this.y,this.z)},Vector4.prototype.clone=function(){return new Vector4(this.x,this.y,this.z,this.w)},Vector4.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},Vector4.prototype.copyFromFloats=function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},Vector4.prototype.set=function(e,t,i,n){return this.copyFromFloats(e,t,i,n)},Vector4.prototype.setAll=function(e){return this.x=this.y=this.z=this.w=e,this},Vector4.FromArray=function(e,t){return!t&&(t=0),new Vector4(e[t],e[t+1],e[t+2],e[t+3])},Vector4.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3]},Vector4.FromFloatArrayToRef=function(e,t,i){Vector4.FromArrayToRef(e,t,i)},Vector4.FromFloatsToRef=function(e,t,i,n,r){r.x=e,r.y=t,r.z=i,r.w=n},Vector4.Zero=function(){return new Vector4(0,0,0,0)},Vector4.One=function(){return new Vector4(1,1,1,1)},Vector4.Normalize=function(e){var t=Vector4.Zero();return Vector4.NormalizeToRef(e,t),t},Vector4.NormalizeToRef=function(e,t){t.copyFrom(e),t.normalize()},Vector4.Minimize=function(e,t){var i=e.clone();return i.minimizeInPlace(t),i},Vector4.Maximize=function(e,t){var i=e.clone();return i.maximizeInPlace(t),i},Vector4.Distance=function(e,t){return Math.sqrt(Vector4.DistanceSquared(e,t))},Vector4.DistanceSquared=function(e,t){var i=e.x-t.x,n=e.y-t.y,r=e.z-t.z,o=e.w-t.w;return i*i+n*n+r*r+o*o},Vector4.Center=function(e,t){return Vector4.CenterToRef(e,t,Vector4.Zero())},Vector4.CenterToRef=function(e,t,i){return i.copyFromFloats((e.x+t.x)/2,(e.y+t.y)/2,(e.z+t.z)/2,(e.w+t.w)/2)},Vector4.TransformCoordinates=function(e,t){var i=Vector4.Zero();return Vector4.TransformCoordinatesToRef(e,t,i),i},Vector4.TransformCoordinatesToRef=function(e,t,i){Vector4.TransformCoordinatesFromFloatsToRef(e._x,e._y,e._z,t,i)},Vector4.TransformCoordinatesFromFloatsToRef=function(e,t,i,n,r){var o=n.m,a=e*o[0]+t*o[4]+i*o[8]+o[12],s=e*o[1]+t*o[5]+i*o[9]+o[13],l=e*o[2]+t*o[6]+i*o[10]+o[14],u=e*o[3]+t*o[7]+i*o[11]+o[15];r.x=a,r.y=s,r.z=l,r.w=u},Vector4.TransformNormal=function(e,t){var i=Vector4.Zero();return Vector4.TransformNormalToRef(e,t,i),i},Vector4.TransformNormalToRef=function(e,t,i){var n=t.m,r=e.x*n[0]+e.y*n[4]+e.z*n[8],o=e.x*n[1]+e.y*n[5]+e.z*n[9],a=e.x*n[2]+e.y*n[6]+e.z*n[10];i.x=r,i.y=o,i.z=a,i.w=e.w},Vector4.TransformNormalFromFloatsToRef=function(e,t,i,n,r,o){var a=r.m;o.x=e*a[0]+t*a[4]+i*a[8],o.y=e*a[1]+t*a[5]+i*a[9],o.z=e*a[2]+t*a[6]+i*a[10],o.w=n},Vector4.FromVector3=function(e,t){return void 0===t&&(t=0),new Vector4(e._x,e._y,e._z,t)},Object.defineProperty(Quaternion.prototype,"x",{get:function(){return this._x},set:function(e){this._x=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Quaternion.prototype,"y",{get:function(){return this._y},set:function(e){this._y=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Quaternion.prototype,"z",{get:function(){return this._z},set:function(e){this._z=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(Quaternion.prototype,"w",{get:function(){return this._w},set:function(e){this._w=e,this._isDirty=!0},enumerable:!1,configurable:!0}),Quaternion.prototype.toString=function(){return"{X: ".concat(this._x," Y: ").concat(this._y," Z: ").concat(this._z," W: ").concat(this._w,"}")},Quaternion.prototype.getClassName=function(){return"Quaternion"},Quaternion.prototype.getHashCode=function(){var e=_0x1b2557(this._x);return e=397*(e=397*(e=397*e^_0x1b2557(this._y))^_0x1b2557(this._z))^_0x1b2557(this._w)},Quaternion.prototype.asArray=function(){return[this._x,this._y,this._z,this._w]},Quaternion.prototype.equals=function(e){return e&&this._x===e._x&&this._y===e._y&&this._z===e._z&&this._w===e._w},Quaternion.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon),e&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._x,e._x,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._y,e._y,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._z,e._z,t)&&_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.WithinEpsilon(this._w,e._w,t)},Quaternion.prototype.clone=function(){return new Quaternion(this._x,this._y,this._z,this._w)},Quaternion.prototype.copyFrom=function(e){return this.x=e._x,this.y=e._y,this.z=e._z,this.w=e._w,this},Quaternion.prototype.copyFromFloats=function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},Quaternion.prototype.set=function(e,t,i,n){return this.copyFromFloats(e,t,i,n)},Quaternion.prototype.add=function(e){return new Quaternion(this._x+e._x,this._y+e._y,this._z+e._z,this._w+e._w)},Quaternion.prototype.addInPlace=function(e){return this._x+=e._x,this._y+=e._y,this._z+=e._z,this._w+=e._w,this},Quaternion.prototype.subtract=function(e){return new Quaternion(this._x-e._x,this._y-e._y,this._z-e._z,this._w-e._w)},Quaternion.prototype.subtractInPlace=function(e){return this._x-=e._x,this._y-=e._y,this._z-=e._z,this._w-=e._w,this},Quaternion.prototype.scale=function(e){return new Quaternion(this._x*e,this._y*e,this._z*e,this._w*e)},Quaternion.prototype.scaleToRef=function(e,t){return t.x=this._x*e,t.y=this._y*e,t.z=this._z*e,t.w=this._w*e,this},Quaternion.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},Quaternion.prototype.scaleAndAddToRef=function(e,t){return t.x+=this._x*e,t.y+=this._y*e,t.z+=this._z*e,t.w+=this._w*e,this},Quaternion.prototype.multiply=function(e){var t=new Quaternion(0,0,0,1);return this.multiplyToRef(e,t),t},Quaternion.prototype.multiplyToRef=function(e,t){var i=this._x*e._w+this._y*e._z-this._z*e._y+this._w*e._x,n=-this._x*e._z+this._y*e._w+this._z*e._x+this._w*e._y,r=this._x*e._y-this._y*e._x+this._z*e._w+this._w*e._z,o=-this._x*e._x-this._y*e._y-this._z*e._z+this._w*e._w;return t.copyFromFloats(i,n,r,o),this},Quaternion.prototype.multiplyInPlace=function(e){return this.multiplyToRef(e,this),this},Quaternion.prototype.conjugateToRef=function(e){return e.copyFromFloats(-this._x,-this._y,-this._z,this._w),this},Quaternion.prototype.conjugateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},Quaternion.prototype.conjugate=function(){return new Quaternion(-this._x,-this._y,-this._z,this._w)},Quaternion.prototype.invert=function(){var e=this.conjugate(),t=this.lengthSquared();return 0==t||1==t||e.scaleInPlace(1/t),e},Quaternion.prototype.invertInPlace=function(){this.conjugateInPlace();var e=this.lengthSquared();return 0==e||1==e||this.scaleInPlace(1/e),this},Quaternion.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},Quaternion.prototype.length=function(){return Math.sqrt(this.lengthSquared())},Quaternion.prototype.normalize=function(){var e=this.length();if(0===e)return this;var t=1/e;return this.scaleInPlace(t),this},Quaternion.prototype.normalizeToNew=function(){var e=this.length();if(0===e)return this.clone();var t=1/e;return this.scale(t)},Quaternion.prototype.toEulerAngles=function(){var e=Vector3.Zero();return this.toEulerAnglesToRef(e),e},Quaternion.prototype.toEulerAnglesToRef=function(e){var t=this._z,i=this._x,n=this._y,r=this._w,o=n*t-i*r,a=.4999999;if(o<-.4999999)e.y=2*Math.atan2(n,r),e.x=Math.PI/2,e.z=0;else if(o>a)e.y=2*Math.atan2(n,r),e.x=-Math.PI/2,e.z=0;else{var s=r*r,l=t*t,u=i*i,c=n*n;e.z=Math.atan2(2*(i*n+t*r),-l-u+c+s),e.x=Math.asin(-2*o),e.y=Math.atan2(2*(t*i+n*r),l-u-c+s)}return this},Quaternion.prototype.toRotationMatrix=function(e){return Matrix.FromQuaternionToRef(this,e),this},Quaternion.prototype.fromRotationMatrix=function(e){return Quaternion.FromRotationMatrixToRef(e,this),this},Quaternion.FromRotationMatrix=function(e){var t=new Quaternion;return Quaternion.FromRotationMatrixToRef(e,t),t},Quaternion.FromRotationMatrixToRef=function(e,t){var i,n=e.m,r=n[0],o=n[4],a=n[8],s=n[1],l=n[5],u=n[9],c=n[2],h=n[6],d=n[10],f=r+l+d;f>0?(i=.5/Math.sqrt(f+1),t.w=.25/i,t.x=(h-u)*i,t.y=(a-c)*i,t.z=(s-o)*i):r>l&&r>d?(i=2*Math.sqrt(1+r-l-d),t.w=(h-u)/i,t.x=.25*i,t.y=(o+s)/i,t.z=(a+c)/i):l>d?(i=2*Math.sqrt(1+l-r-d),t.w=(a-c)/i,t.x=(o+s)/i,t.y=.25*i,t.z=(u+h)/i):(i=2*Math.sqrt(1+d-r-l),t.w=(s-o)/i,t.x=(a+c)/i,t.y=(u+h)/i,t.z=.25*i)},Quaternion.Dot=function(e,t){return e._x*t._x+e._y*t._y+e._z*t._z+e._w*t._w},Quaternion.AreClose=function(e,t){return Quaternion.Dot(e,t)>=0},Quaternion.SmoothToRef=function(e,t,i,n,r){var o=0===n?1:i/n;o=_math_scalar__WEBPACK_IMPORTED_MODULE_0__.Scalar.Clamp(o,0,1),Quaternion.SlerpToRef(e,t,o,r)},Quaternion.Zero=function(){return new Quaternion(0,0,0,0)},Quaternion.Inverse=function(e){return new Quaternion(-e._x,-e._y,-e._z,e._w)},Quaternion.InverseToRef=function(e,t){return t.set(-e._x,-e._y,-e._z,e._w),t},Quaternion.Identity=function(){return new Quaternion(0,0,0,1)},Quaternion.IsIdentity=function(e){return e&&0===e._x&&0===e._y&&0===e._z&&1===e._w},Quaternion.RotationAxis=function(e,t){return Quaternion.RotationAxisToRef(e,t,new Quaternion)},Quaternion.RotationAxisToRef=function(e,t,i){var n=Math.sin(t/2);return e.normalize(),i.w=Math.cos(t/2),i.x=e._x*n,i.y=e._y*n,i.z=e._z*n,i},Quaternion.FromArray=function(e,t){return!t&&(t=0),new Quaternion(e[t],e[t+1],e[t+2],e[t+3])},Quaternion.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3]},Quaternion.FromEulerAngles=function(e,t,i){var n=new Quaternion;return Quaternion.RotationYawPitchRollToRef(t,e,i,n),n},Quaternion.FromEulerAnglesToRef=function(e,t,i,n){return Quaternion.RotationYawPitchRollToRef(t,e,i,n),n},Quaternion.FromEulerVector=function(e){var t=new Quaternion;return Quaternion.RotationYawPitchRollToRef(e._y,e._x,e._z,t),t},Quaternion.FromEulerVectorToRef=function(e,t){return Quaternion.RotationYawPitchRollToRef(e._y,e._x,e._z,t),t},Quaternion.FromUnitVectorsToRef=function(e,t,i){var n=Vector3.Dot(e,t)+1;return n<_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon?Math.abs(e.x)>Math.abs(e.z)?i.set(-e.y,e.x,0,0):i.set(0,-e.z,e.y,0):(Vector3.CrossToRef(e,t,TmpVectors.Vector3[0]),i.set(TmpVectors.Vector3[0].x,TmpVectors.Vector3[0].y,TmpVectors.Vector3[0].z,n)),i.normalize()},Quaternion.RotationYawPitchRoll=function(e,t,i){var n=new Quaternion;return Quaternion.RotationYawPitchRollToRef(e,t,i,n),n},Quaternion.RotationYawPitchRollToRef=function(e,t,i,n){var r=.5*i,o=.5*t,a=.5*e,s=Math.sin(r),l=Math.cos(r),u=Math.sin(o),c=Math.cos(o),h=Math.sin(a),d=Math.cos(a);n.x=d*u*l+h*c*s,n.y=h*c*l-d*u*s,n.z=d*c*s-h*u*l,n.w=d*c*l+h*u*s},Quaternion.RotationAlphaBetaGamma=function(e,t,i){var n=new Quaternion;return Quaternion.RotationAlphaBetaGammaToRef(e,t,i,n),n},Quaternion.RotationAlphaBetaGammaToRef=function(e,t,i,n){var r=.5*(i+e),o=.5*(i-e),a=.5*t;n.x=Math.cos(o)*Math.sin(a),n.y=Math.sin(o)*Math.sin(a),n.z=Math.sin(r)*Math.cos(a),n.w=Math.cos(r)*Math.cos(a)},Quaternion.RotationQuaternionFromAxis=function(e,t,i){var n=new Quaternion(0,0,0,0);return Quaternion.RotationQuaternionFromAxisToRef(e,t,i,n),n},Quaternion.RotationQuaternionFromAxisToRef=function(e,t,i,n){var r=MathTmp.Matrix[0];Matrix.FromXYZAxesToRef(e.normalize(),t.normalize(),i.normalize(),r),Quaternion.FromRotationMatrixToRef(r,n)},Quaternion.FromLookDirectionLH=function(e,t){var i=new Quaternion;return Quaternion.FromLookDirectionLHToRef(e,t,i),i},Quaternion.FromLookDirectionLHToRef=function(e,t,i){var n=MathTmp.Matrix[0];Matrix.LookDirectionLHToRef(e,t,n),Quaternion.FromRotationMatrixToRef(n,i)},Quaternion.FromLookDirectionRH=function(e,t){var i=new Quaternion;return Quaternion.FromLookDirectionRHToRef(e,t,i),i},Quaternion.FromLookDirectionRHToRef=function(e,t,i){var n=MathTmp.Matrix[0];return Matrix.LookDirectionRHToRef(e,t,n),Quaternion.FromRotationMatrixToRef(n,i)},Quaternion.Slerp=function(e,t,i){var n=Quaternion.Identity();return Quaternion.SlerpToRef(e,t,i,n),n},Quaternion.SlerpToRef=function(e,t,i,n){var r,o,a=e._x*t._x+e._y*t._y+e._z*t._z+e._w*t._w,s=!1;if(a<0&&(s=!0,a=-a),a>.999999)o=1-i,r=s?-i:i;else{var l=Math.acos(a),u=1/Math.sin(l);o=Math.sin((1-i)*l)*u,r=s?-Math.sin(i*l)*u:Math.sin(i*l)*u}n.x=o*e._x+r*t._x,n.y=o*e._y+r*t._y,n.z=o*e._z+r*t._z,n.w=o*e._w+r*t._w},Quaternion.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o,s=2*a-3*o+1,l=-2*a+3*o,u=a-2*o+r,c=a-o;return new Quaternion(e._x*s+i._x*l+t._x*u+n._x*c,e._y*s+i._y*l+t._y*u+n._y*c,e._z*s+i._z*l+t._z*u+n._z*c,e._w*s+i._w*l+t._w*u+n._w*c)},Quaternion.Hermite1stDerivative=function(e,t,i,n,r){var o=Quaternion.Zero();return this.Hermite1stDerivativeToRef(e,t,i,n,r,o),o},Quaternion.Hermite1stDerivativeToRef=function(e,t,i,n,r,o){var a=r*r;o.x=6*(a-r)*e.x+(3*a-4*r+1)*t.x+6*(-a+r)*i.x+(3*a-2*r)*n.x,o.y=6*(a-r)*e.y+(3*a-4*r+1)*t.y+6*(-a+r)*i.y+(3*a-2*r)*n.y,o.z=6*(a-r)*e.z+(3*a-4*r+1)*t.z+6*(-a+r)*i.z+(3*a-2*r)*n.z,o.w=6*(a-r)*e.w+(3*a-4*r+1)*t.w+6*(-a+r)*i.w+(3*a-2*r)*n.w},Object.defineProperty(Matrix,"Use64Bits",{get:function(){return _0x2fa08c.MatrixUse64Bits},enumerable:!1,configurable:!0}),Object.defineProperty(Matrix.prototype,"m",{get:function(){return this._m},enumerable:!1,configurable:!0}),Matrix.prototype.markAsUpdated=function(){this.updateFlag=Matrix._UpdateFlagSeed++,this._isIdentity=!1,this._isIdentity3x2=!1,this._isIdentityDirty=!0,this._isIdentity3x2Dirty=!0},Matrix.prototype._updateIdentityStatus=function(e,t,i,n){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!0),this._isIdentity=e,this._isIdentity3x2=e||i,this._isIdentityDirty=!this._isIdentity&&t,this._isIdentity3x2Dirty=!this._isIdentity3x2&&n},Matrix.prototype.isIdentity=function(){if(this._isIdentityDirty){this._isIdentityDirty=!1;var e=this._m;this._isIdentity=1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]}return this._isIdentity},Matrix.prototype.isIdentityAs3x2=function(){return this._isIdentity3x2Dirty&&(this._isIdentity3x2Dirty=!1,1!==this._m[0]||1!==this._m[5]||1!==this._m[15]||0!==this._m[1]||0!==this._m[2]||0!==this._m[3]||0!==this._m[4]||0!==this._m[6]||0!==this._m[7]||0!==this._m[8]||0!==this._m[9]||0!==this._m[10]||0!==this._m[11]||0!==this._m[12]||0!==this._m[13]||0!==this._m[14]?this._isIdentity3x2=!1:this._isIdentity3x2=!0),this._isIdentity3x2},Matrix.prototype.determinant=function(){if(!0===this._isIdentity)return 1;var e=this._m,t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],f=e[12],p=e[13],_=e[14],m=e[15],g=h*m-_*d,x=c*m-p*d,y=c*_-p*h,v=u*m-f*d,$=u*_-h*f,b=u*p-f*c;return t*+(a*g-s*x+l*y)+i*-(o*g-s*v+l*$)+n*+(o*x-a*v+l*b)+r*-(o*y-a*$+s*b)},Matrix.prototype.toArray=function(){return this._m},Matrix.prototype.asArray=function(){return this._m},Matrix.prototype.invert=function(){return this.invertToRef(this),this},Matrix.prototype.reset=function(){return Matrix.FromValuesToRef(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,this),this._updateIdentityStatus(!1),this},Matrix.prototype.add=function(e){var t=new Matrix;return this.addToRef(e,t),t},Matrix.prototype.addToRef=function(e,t){for(var i=this._m,n=t._m,r=e.m,o=0;o<16;o++)n[o]=i[o]+r[o];return t.markAsUpdated(),this},Matrix.prototype.addToSelf=function(e){for(var t=this._m,i=e.m,n=0;n<16;n++)t[n]+=i[n];return this.markAsUpdated(),this},Matrix.prototype.invertToRef=function(e){if(!0===this._isIdentity)return Matrix.IdentityToRef(e),this;var t=this._m,i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15],x=d*g-m*f,y=h*g-_*f,v=h*m-_*d,$=c*g-p*f,b=c*m-d*p,T=c*_-p*h,C=+(s*x-l*y+u*v),S=-(a*x-l*$+u*b),w=+(a*y-s*$+u*T),E=-(a*v-s*b+l*T),P=i*C+n*S+r*w+o*E;if(0===P)return e.copyFrom(this),this;var A=1/P,L=l*g-m*u,M=s*g-_*u,R=s*m-_*l,O=a*g-p*u,D=a*m-p*l,I=a*_-p*s,B=l*f-d*u,F=s*f-h*u,N=s*d-h*l,G=a*f-c*u,z=a*d-c*l,U=a*h-c*s,V=-(n*x-r*y+o*v),k=+(i*x-r*$+o*b),W=-(i*y-n*$+o*T),H=+(i*v-n*b+r*T),q=+(n*L-r*M+o*R),j=-(i*L-r*O+o*D),X=+(i*M-n*O+o*I),Y=-(i*R-n*D+r*I),Z=-(n*B-r*F+o*N),K=+(i*B-r*G+o*z),Q=-(i*F-n*G+o*U),J=+(i*N-n*z+r*U);return Matrix.FromValuesToRef(C*A,V*A,q*A,Z*A,S*A,k*A,j*A,K*A,w*A,W*A,X*A,Q*A,E*A,H*A,Y*A,J*A,e),this},Matrix.prototype.addAtIndex=function(e,t){return this._m[e]+=t,this.markAsUpdated(),this},Matrix.prototype.multiplyAtIndex=function(e,t){return this._m[e]*=t,this.markAsUpdated(),this},Matrix.prototype.setTranslationFromFloats=function(e,t,i){return this._m[12]=e,this._m[13]=t,this._m[14]=i,this.markAsUpdated(),this},Matrix.prototype.addTranslationFromFloats=function(e,t,i){return this._m[12]+=e,this._m[13]+=t,this._m[14]+=i,this.markAsUpdated(),this},Matrix.prototype.setTranslation=function(e){return this.setTranslationFromFloats(e._x,e._y,e._z)},Matrix.prototype.getTranslation=function(){return new Vector3(this._m[12],this._m[13],this._m[14])},Matrix.prototype.getTranslationToRef=function(e){return e.x=this._m[12],e.y=this._m[13],e.z=this._m[14],this},Matrix.prototype.removeRotationAndScaling=function(){var e=this.m;return Matrix.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,e[12],e[13],e[14],e[15],this),this._updateIdentityStatus(0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]),this},Matrix.prototype.multiply=function(e){var t=new Matrix;return this.multiplyToRef(e,t),t},Matrix.prototype.copyFrom=function(e){e.copyToArray(this._m);var t=e;return this.updateFlag=t.updateFlag,this._updateIdentityStatus(t._isIdentity,t._isIdentityDirty,t._isIdentity3x2,t._isIdentity3x2Dirty),this},Matrix.prototype.copyToArray=function(e,t){void 0===t&&(t=0);var i=this._m;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],this},Matrix.prototype.multiplyToRef=function(e,t){return this._isIdentity?(t.copyFrom(e),this):e._isIdentity?(t.copyFrom(this),this):(this.multiplyToArray(e,t._m,0),t.markAsUpdated(),this)},Matrix.prototype.multiplyToArray=function(e,t,i){var n=this._m,r=e.m,o=n[0],a=n[1],s=n[2],l=n[3],u=n[4],c=n[5],h=n[6],d=n[7],f=n[8],p=n[9],_=n[10],m=n[11],g=n[12],x=n[13],y=n[14],v=n[15],$=r[0],b=r[1],T=r[2],C=r[3],S=r[4],w=r[5],E=r[6],P=r[7],A=r[8],L=r[9],M=r[10],R=r[11],O=r[12],D=r[13],I=r[14],B=r[15];return t[i]=o*$+a*S+s*A+l*O,t[i+1]=o*b+a*w+s*L+l*D,t[i+2]=o*T+a*E+s*M+l*I,t[i+3]=o*C+a*P+s*R+l*B,t[i+4]=u*$+c*S+h*A+d*O,t[i+5]=u*b+c*w+h*L+d*D,t[i+6]=u*T+c*E+h*M+d*I,t[i+7]=u*C+c*P+h*R+d*B,t[i+8]=f*$+p*S+_*A+m*O,t[i+9]=f*b+p*w+_*L+m*D,t[i+10]=f*T+p*E+_*M+m*I,t[i+11]=f*C+p*P+_*R+m*B,t[i+12]=g*$+x*S+y*A+v*O,t[i+13]=g*b+x*w+y*L+v*D,t[i+14]=g*T+x*E+y*M+v*I,t[i+15]=g*C+x*P+y*R+v*B,this},Matrix.prototype.equals=function(e){var t=e;if(!t)return!1;if((this._isIdentity||t._isIdentity)&&!this._isIdentityDirty&&!t._isIdentityDirty)return this._isIdentity&&t._isIdentity;var i=this.m,n=t.m;return i[0]===n[0]&&i[1]===n[1]&&i[2]===n[2]&&i[3]===n[3]&&i[4]===n[4]&&i[5]===n[5]&&i[6]===n[6]&&i[7]===n[7]&&i[8]===n[8]&&i[9]===n[9]&&i[10]===n[10]&&i[11]===n[11]&&i[12]===n[12]&&i[13]===n[13]&&i[14]===n[14]&&i[15]===n[15]},Matrix.prototype.clone=function(){var e=new Matrix;return e.copyFrom(this),e},Matrix.prototype.getClassName=function(){return"Matrix"},Matrix.prototype.getHashCode=function(){for(var e=_0x1b2557(this._m[0]),t=1;t<16;t++)e=397*e^_0x1b2557(this._m[t]);return e},Matrix.prototype.decomposeToTransformNode=function(e){return e.rotationQuaternion=e.rotationQuaternion||new Quaternion,this.decompose(e.scaling,e.rotationQuaternion,e.position)},Matrix.prototype.decompose=function(e,t,i,n){if(this._isIdentity)return i&&i.setAll(0),e&&e.setAll(1),t&&t.copyFromFloats(0,0,0,1),!0;var r=this._m;if(i&&i.copyFromFloats(r[12],r[13],r[14]),(e=e||MathTmp.Vector3[0]).x=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]),e.y=Math.sqrt(r[4]*r[4]+r[5]*r[5]+r[6]*r[6]),e.z=Math.sqrt(r[8]*r[8]+r[9]*r[9]+r[10]*r[10]),n){var o=n.scaling.x<0?-1:1,a=n.scaling.y<0?-1:1,s=n.scaling.z<0?-1:1;e.x*=o,e.y*=a,e.z*=s}else this.determinant()<=0&&(e.y*=-1);if(0===e._x||0===e._y||0===e._z)return t&&t.copyFromFloats(0,0,0,1),!1;if(t){var l=1/e._x,u=1/e._y,c=1/e._z;Matrix.FromValuesToRef(r[0]*l,r[1]*l,r[2]*l,0,r[4]*u,r[5]*u,r[6]*u,0,r[8]*c,r[9]*c,r[10]*c,0,0,0,0,1,MathTmp.Matrix[0]),Quaternion.FromRotationMatrixToRef(MathTmp.Matrix[0],t)}return!0},Matrix.prototype.getRow=function(e){if(e<0||e>3)return null;var t=4*e;return new Vector4(this._m[t+0],this._m[t+1],this._m[t+2],this._m[t+3])},Matrix.prototype.setRow=function(e,t){return this.setRowFromFloats(e,t.x,t.y,t.z,t.w)},Matrix.prototype.transpose=function(){return Matrix.Transpose(this)},Matrix.prototype.transposeToRef=function(e){return Matrix.TransposeToRef(this,e),this},Matrix.prototype.setRowFromFloats=function(e,t,i,n,r){if(e<0||e>3)return this;var o=4*e;return this._m[o+0]=t,this._m[o+1]=i,this._m[o+2]=n,this._m[o+3]=r,this.markAsUpdated(),this},Matrix.prototype.scale=function(e){var t=new Matrix;return this.scaleToRef(e,t),t},Matrix.prototype.scaleToRef=function(e,t){for(var i=0;i<16;i++)t._m[i]=this._m[i]*e;return t.markAsUpdated(),this},Matrix.prototype.scaleAndAddToRef=function(e,t){for(var i=0;i<16;i++)t._m[i]+=this._m[i]*e;return t.markAsUpdated(),this},Matrix.prototype.toNormalMatrix=function(e){var t=MathTmp.Matrix[0];this.invertToRef(t),t.transposeToRef(e);var i=e._m;Matrix.FromValuesToRef(i[0],i[1],i[2],0,i[4],i[5],i[6],0,i[8],i[9],i[10],0,0,0,0,1,e)},Matrix.prototype.getRotationMatrix=function(){var e=new Matrix;return this.getRotationMatrixToRef(e),e},Matrix.prototype.getRotationMatrixToRef=function(e){var t=MathTmp.Vector3[0];if(!this.decompose(t))return Matrix.IdentityToRef(e),this;var i=this._m,n=1/t._x,r=1/t._y,o=1/t._z;return Matrix.FromValuesToRef(i[0]*n,i[1]*n,i[2]*n,0,i[4]*r,i[5]*r,i[6]*r,0,i[8]*o,i[9]*o,i[10]*o,0,0,0,0,1,e),this},Matrix.prototype.toggleModelMatrixHandInPlace=function(){var e=this._m;e[2]*=-1,e[6]*=-1,e[8]*=-1,e[9]*=-1,e[14]*=-1,this.markAsUpdated()},Matrix.prototype.toggleProjectionMatrixHandInPlace=function(){var e=this._m;e[8]*=-1,e[9]*=-1,e[10]*=-1,e[11]*=-1,this.markAsUpdated()},Matrix.FromArray=function(e,t){void 0===t&&(t=0);var i=new Matrix;return Matrix.FromArrayToRef(e,t,i),i},Matrix.FromArrayToRef=function(e,t,i){for(var n=0;n<16;n++)i._m[n]=e[n+t];i.markAsUpdated()},Matrix.FromFloat32ArrayToRefScaled=function(e,t,i,n){for(var r=0;r<16;r++)n._m[r]=e[r+t]*i;n.markAsUpdated()},Object.defineProperty(Matrix,"IdentityReadOnly",{get:function(){return Matrix._IdentityReadOnly},enumerable:!1,configurable:!0}),Matrix.FromValuesToRef=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var g=m._m;g[0]=e,g[1]=t,g[2]=i,g[3]=n,g[4]=r,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=u,g[10]=c,g[11]=h,g[12]=d,g[13]=f,g[14]=p,g[15]=_,m.markAsUpdated()},Matrix.FromValues=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=new Matrix,g=m._m;return g[0]=e,g[1]=t,g[2]=i,g[3]=n,g[4]=r,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=u,g[10]=c,g[11]=h,g[12]=d,g[13]=f,g[14]=p,g[15]=_,m.markAsUpdated(),m},Matrix.Compose=function(e,t,i){var n=new Matrix;return Matrix.ComposeToRef(e,t,i,n),n},Matrix.ComposeToRef=function(e,t,i,n){var r=n._m,o=t._x,a=t._y,s=t._z,l=t._w,u=o+o,c=a+a,h=s+s,d=o*u,f=o*c,p=o*h,_=a*c,m=a*h,g=s*h,x=l*u,y=l*c,v=l*h,$=e._x,b=e._y,T=e._z;r[0]=(1-(_+g))*$,r[1]=(f+v)*$,r[2]=(p-y)*$,r[3]=0,r[4]=(f-v)*b,r[5]=(1-(d+g))*b,r[6]=(m+x)*b,r[7]=0,r[8]=(p+y)*T,r[9]=(m-x)*T,r[10]=(1-(d+_))*T,r[11]=0,r[12]=i._x,r[13]=i._y,r[14]=i._z,r[15]=1,n.markAsUpdated()},Matrix.Identity=function(){var e=Matrix.FromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return e._updateIdentityStatus(!0),e},Matrix.IdentityToRef=function(e){Matrix.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,e),e._updateIdentityStatus(!0)},Matrix.Zero=function(){var e=Matrix.FromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return e._updateIdentityStatus(!1),e},Matrix.RotationX=function(e){var t=new Matrix;return Matrix.RotationXToRef(e,t),t},Matrix.Invert=function(e){var t=new Matrix;return e.invertToRef(t),t},Matrix.RotationXToRef=function(e,t){var i=Math.sin(e),n=Math.cos(e);Matrix.FromValuesToRef(1,0,0,0,0,n,i,0,0,-i,n,0,0,0,0,1,t),t._updateIdentityStatus(1===n&&0===i)},Matrix.RotationY=function(e){var t=new Matrix;return Matrix.RotationYToRef(e,t),t},Matrix.RotationYToRef=function(e,t){var i=Math.sin(e),n=Math.cos(e);Matrix.FromValuesToRef(n,0,-i,0,0,1,0,0,i,0,n,0,0,0,0,1,t),t._updateIdentityStatus(1===n&&0===i)},Matrix.RotationZ=function(e){var t=new Matrix;return Matrix.RotationZToRef(e,t),t},Matrix.RotationZToRef=function(e,t){var i=Math.sin(e),n=Math.cos(e);Matrix.FromValuesToRef(n,i,0,0,-i,n,0,0,0,0,1,0,0,0,0,1,t),t._updateIdentityStatus(1===n&&0===i)},Matrix.RotationAxis=function(e,t){var i=new Matrix;return Matrix.RotationAxisToRef(e,t,i),i},Matrix.RotationAxisToRef=function(e,t,i){var n=Math.sin(-t),r=Math.cos(-t),o=1-r;e.normalize();var a=i._m;a[0]=e._x*e._x*o+r,a[1]=e._x*e._y*o-e._z*n,a[2]=e._x*e._z*o+e._y*n,a[3]=0,a[4]=e._y*e._x*o+e._z*n,a[5]=e._y*e._y*o+r,a[6]=e._y*e._z*o-e._x*n,a[7]=0,a[8]=e._z*e._x*o-e._y*n,a[9]=e._z*e._y*o+e._x*n,a[10]=e._z*e._z*o+r,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,i.markAsUpdated()},Matrix.RotationAlignToRef=function(e,t,i){var n=Vector3.Dot(t,e),r=i._m;if(n<-1+_math_constants__WEBPACK_IMPORTED_MODULE_1__.Epsilon)r[0]=-1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0;else{var o=Vector3.Cross(t,e),a=1/(1+n);r[0]=o._x*o._x*a+n,r[1]=o._y*o._x*a-o._z,r[2]=o._z*o._x*a+o._y,r[3]=0,r[4]=o._x*o._y*a+o._z,r[5]=o._y*o._y*a+n,r[6]=o._z*o._y*a-o._x,r[7]=0,r[8]=o._x*o._z*a-o._y,r[9]=o._y*o._z*a+o._x,r[10]=o._z*o._z*a+n,r[11]=0}r[12]=0,r[13]=0,r[14]=0,r[15]=1,i.markAsUpdated()},Matrix.RotationYawPitchRoll=function(e,t,i){var n=new Matrix;return Matrix.RotationYawPitchRollToRef(e,t,i,n),n},Matrix.RotationYawPitchRollToRef=function(e,t,i,n){Quaternion.RotationYawPitchRollToRef(e,t,i,MathTmp.Quaternion[0]),MathTmp.Quaternion[0].toRotationMatrix(n)},Matrix.Scaling=function(e,t,i){var n=new Matrix;return Matrix.ScalingToRef(e,t,i,n),n},Matrix.ScalingToRef=function(e,t,i,n){Matrix.FromValuesToRef(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1,n),n._updateIdentityStatus(1===e&&1===t&&1===i)},Matrix.Translation=function(e,t,i){var n=new Matrix;return Matrix.TranslationToRef(e,t,i,n),n},Matrix.TranslationToRef=function(e,t,i,n){Matrix.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,e,t,i,1,n),n._updateIdentityStatus(0===e&&0===t&&0===i)},Matrix.Lerp=function(e,t,i){var n=new Matrix;return Matrix.LerpToRef(e,t,i,n),n},Matrix.LerpToRef=function(e,t,i,n){for(var r=n._m,o=e.m,a=t.m,s=0;s<16;s++)r[s]=o[s]*(1-i)+a[s]*i;n.markAsUpdated()},Matrix.DecomposeLerp=function(e,t,i){var n=new Matrix;return Matrix.DecomposeLerpToRef(e,t,i,n),n},Matrix.DecomposeLerpToRef=function(e,t,i,n){var r=MathTmp.Vector3[0],o=MathTmp.Quaternion[0],a=MathTmp.Vector3[1];e.decompose(r,o,a);var s=MathTmp.Vector3[2],l=MathTmp.Quaternion[1],u=MathTmp.Vector3[3];t.decompose(s,l,u);var c=MathTmp.Vector3[4];Vector3.LerpToRef(r,s,i,c);var h=MathTmp.Quaternion[2];Quaternion.SlerpToRef(o,l,i,h);var d=MathTmp.Vector3[5];Vector3.LerpToRef(a,u,i,d),Matrix.ComposeToRef(c,h,d,n)},Matrix.LookAtLH=function(e,t,i){var n=new Matrix;return Matrix.LookAtLHToRef(e,t,i,n),n},Matrix.LookAtLHToRef=function(e,t,i,n){var r=MathTmp.Vector3[0],o=MathTmp.Vector3[1],a=MathTmp.Vector3[2];t.subtractToRef(e,a),a.normalize(),Vector3.CrossToRef(i,a,r);var s=r.lengthSquared();0===s?r.x=1:r.normalizeFromLength(Math.sqrt(s)),Vector3.CrossToRef(a,r,o),o.normalize();var l=-Vector3.Dot(r,e),u=-Vector3.Dot(o,e),c=-Vector3.Dot(a,e);Matrix.FromValuesToRef(r._x,o._x,a._x,0,r._y,o._y,a._y,0,r._z,o._z,a._z,0,l,u,c,1,n)},Matrix.LookAtRH=function(e,t,i){var n=new Matrix;return Matrix.LookAtRHToRef(e,t,i,n),n},Matrix.LookAtRHToRef=function(e,t,i,n){var r=MathTmp.Vector3[0],o=MathTmp.Vector3[1],a=MathTmp.Vector3[2];e.subtractToRef(t,a),a.normalize(),Vector3.CrossToRef(i,a,r);var s=r.lengthSquared();0===s?r.x=1:r.normalizeFromLength(Math.sqrt(s)),Vector3.CrossToRef(a,r,o),o.normalize();var l=-Vector3.Dot(r,e),u=-Vector3.Dot(o,e),c=-Vector3.Dot(a,e);Matrix.FromValuesToRef(r._x,o._x,a._x,0,r._y,o._y,a._y,0,r._z,o._z,a._z,0,l,u,c,1,n)},Matrix.LookDirectionLH=function(e,t){var i=new Matrix;return Matrix.LookDirectionLHToRef(e,t,i),i},Matrix.LookDirectionLHToRef=function(e,t,i){var n=MathTmp.Vector3[0];n.copyFrom(e),n.scaleInPlace(-1);var r=MathTmp.Vector3[1];Vector3.CrossToRef(t,n,r),Matrix.FromValuesToRef(r._x,r._y,r._z,0,t._x,t._y,t._z,0,n._x,n._y,n._z,0,0,0,0,1,i)},Matrix.LookDirectionRH=function(e,t){var i=new Matrix;return Matrix.LookDirectionRHToRef(e,t,i),i},Matrix.LookDirectionRHToRef=function(e,t,i){var n=MathTmp.Vector3[2];Vector3.CrossToRef(t,e,n),Matrix.FromValuesToRef(n._x,n._y,n._z,0,t._x,t._y,t._z,0,e._x,e._y,e._z,0,0,0,0,1,i)},Matrix.OrthoLH=function(e,t,i,n,r){var o=new Matrix;return Matrix.OrthoLHToRef(e,t,i,n,o,r),o},Matrix.OrthoLHToRef=function(e,t,i,n,r,o){var a=2/e,s=2/t,l=2/(n-i),u=-(n+i)/(n-i);Matrix.FromValuesToRef(a,0,0,0,0,s,0,0,0,0,l,0,0,0,u,1,r),o&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(1===a&&1===s&&1===l&&0===u)},Matrix.OrthoOffCenterLH=function(e,t,i,n,r,o,a){var s=new Matrix;return Matrix.OrthoOffCenterLHToRef(e,t,i,n,r,o,s,a),s},Matrix.OrthoOffCenterLHToRef=function(e,t,i,n,r,o,a,s){var l=2/(t-e),u=2/(n-i),c=2/(o-r),h=-(o+r)/(o-r),d=(e+t)/(e-t),f=(n+i)/(i-n);Matrix.FromValuesToRef(l,0,0,0,0,u,0,0,0,0,c,0,d,f,h,1,a),s&&a.multiplyToRef(mtxConvertNDCToHalfZRange,a),a.markAsUpdated()},Matrix.OrthoOffCenterRH=function(e,t,i,n,r,o,a){var s=new Matrix;return Matrix.OrthoOffCenterRHToRef(e,t,i,n,r,o,s,a),s},Matrix.OrthoOffCenterRHToRef=function(e,t,i,n,r,o,a,s){Matrix.OrthoOffCenterLHToRef(e,t,i,n,r,o,a,s),a._m[10]*=-1},Matrix.PerspectiveLH=function(e,t,i,n,r,o){void 0===o&&(o=0);var a=new Matrix,s=2*i/e,l=2*i/t,u=(n+i)/(n-i),c=-2*n*i/(n-i),h=Math.tan(o);return Matrix.FromValuesToRef(s,0,0,0,0,l,0,h,0,0,u,1,0,0,c,0,a),r&&a.multiplyToRef(mtxConvertNDCToHalfZRange,a),a._updateIdentityStatus(!1),a},Matrix.PerspectiveFovLH=function(e,t,i,n,r,o,a){void 0===o&&(o=0),void 0===a&&(a=!1);var s=new Matrix;return Matrix.PerspectiveFovLHToRef(e,t,i,n,s,!0,r,o,a),s},Matrix.PerspectiveFovLHToRef=function(e,t,i,n,r,o,a,s,l){void 0===o&&(o=!0),void 0===s&&(s=0),void 0===l&&(l=!1);var u=i,c=n,h=1/Math.tan(.5*e),d=o?h/t:h,f=o?h:h*t,p=l&&0===u?-1:0!==c?(c+u)/(c-u):1,_=l&&0===u?2*c:0!==c?-2*c*u/(c-u):-2*u,m=Math.tan(s);Matrix.FromValuesToRef(d,0,0,0,0,f,0,m,0,0,p,1,0,0,_,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovReverseLHToRef=function(e,t,i,n,r,o,a,s){void 0===o&&(o=!0),void 0===s&&(s=0);var l=1/Math.tan(.5*e),u=o?l/t:l,c=o?l:l*t,h=Math.tan(s);Matrix.FromValuesToRef(u,0,0,0,0,c,0,h,0,0,-i,1,0,0,1,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovRH=function(e,t,i,n,r,o,a){void 0===o&&(o=0),void 0===a&&(a=!1);var s=new Matrix;return Matrix.PerspectiveFovRHToRef(e,t,i,n,s,!0,r,o,a),s},Matrix.PerspectiveFovRHToRef=function(e,t,i,n,r,o,a,s,l){void 0===o&&(o=!0),void 0===s&&(s=0),void 0===l&&(l=!1);var u=i,c=n,h=1/Math.tan(.5*e),d=o?h/t:h,f=o?h:h*t,p=l&&0===u?1:0!==c?-(c+u)/(c-u):-1,_=l&&0===u?2*c:0!==c?-2*c*u/(c-u):-2*u,m=Math.tan(s);Matrix.FromValuesToRef(d,0,0,0,0,f,0,m,0,0,p,-1,0,0,_,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovReverseRHToRef=function(e,t,i,n,r,o,a,s){void 0===o&&(o=!0),void 0===s&&(s=0);var l=1/Math.tan(.5*e),u=o?l/t:l,c=o?l:l*t,h=Math.tan(s);Matrix.FromValuesToRef(u,0,0,0,0,c,0,h,0,0,-i,-1,0,0,-1,0,r),a&&r.multiplyToRef(mtxConvertNDCToHalfZRange,r),r._updateIdentityStatus(!1)},Matrix.PerspectiveFovWebVRToRef=function(e,t,i,n,r,o,a){void 0===r&&(r=!1),void 0===a&&(a=0);var s=r?-1:1,l=Math.tan(e.upDegrees*Math.PI/180),u=Math.tan(e.downDegrees*Math.PI/180),c=Math.tan(e.leftDegrees*Math.PI/180),h=Math.tan(e.rightDegrees*Math.PI/180),d=2/(c+h),f=2/(l+u),p=Math.tan(a),_=n._m;_[0]=d,_[1]=_[2]=_[3]=_[4]=0,_[5]=f,_[6]=0,_[7]=p,_[8]=(c-h)*d*.5,_[9]=-(l-u)*f*.5,_[10]=-i/(t-i),_[11]=1*s,_[12]=_[13]=_[15]=0,_[14]=-2*i*t/(i-t),o&&n.multiplyToRef(mtxConvertNDCToHalfZRange,n),n.markAsUpdated()},Matrix.GetFinalMatrix=function(e,t,i,n,r,o){var a=e.width,s=e.height,l=e.x,u=e.y,c=Matrix.FromValues(a/2,0,0,0,0,-s/2,0,0,0,0,o-r,0,l+a/2,s/2+u,r,1),h=MathTmp.Matrix[0];return t.multiplyToRef(i,h),h.multiplyToRef(n,h),h.multiply(c)},Matrix.GetAsMatrix2x2=function(e){var t=e.m,i=[t[0],t[1],t[4],t[5]];return _0x2fa08c.MatrixUse64Bits?i:new Float32Array(i)},Matrix.GetAsMatrix3x3=function(e){var t=e.m,i=[t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]];return _0x2fa08c.MatrixUse64Bits?i:new Float32Array(i)},Matrix.Transpose=function(e){var t=new Matrix;return Matrix.TransposeToRef(e,t),t},Matrix.TransposeToRef=function(e,t){var i=t._m,n=e.m;i[0]=n[0],i[1]=n[4],i[2]=n[8],i[3]=n[12],i[4]=n[1],i[5]=n[5],i[6]=n[9],i[7]=n[13],i[8]=n[2],i[9]=n[6],i[10]=n[10],i[11]=n[14],i[12]=n[3],i[13]=n[7],i[14]=n[11],i[15]=n[15],t.markAsUpdated(),t._updateIdentityStatus(e._isIdentity,e._isIdentityDirty)},Matrix.Reflection=function(e){var t=new Matrix;return Matrix.ReflectionToRef(e,t),t},Matrix.ReflectionToRef=function(e,t){e.normalize();var i=e.normal.x,n=e.normal.y,r=e.normal.z,o=-2*i,a=-2*n,s=-2*r;Matrix.FromValuesToRef(o*i+1,a*i,s*i,0,o*n,a*n+1,s*n,0,o*r,a*r,s*r+1,0,o*e.d,a*e.d,s*e.d,1,t)},Matrix.FromXYZAxesToRef=function(e,t,i,n){Matrix.FromValuesToRef(e._x,e._y,e._z,0,t._x,t._y,t._z,0,i._x,i._y,i._z,0,0,0,0,1,n)},Matrix.FromQuaternionToRef=function(e,t){var i=e._x*e._x,n=e._y*e._y,r=e._z*e._z,o=e._x*e._y,a=e._z*e._w,s=e._z*e._x,l=e._y*e._w,u=e._y*e._z,c=e._x*e._w;t._m[0]=1-2*(n+r),t._m[1]=2*(o+a),t._m[2]=2*(s-l),t._m[3]=0,t._m[4]=2*(o-a),t._m[5]=1-2*(r+i),t._m[6]=2*(u+c),t._m[7]=0,t._m[8]=2*(s+l),t._m[9]=2*(u-c),t._m[10]=1-2*(n+i),t._m[11]=0,t._m[12]=0,t._m[13]=0,t._m[14]=0,t._m[15]=1,t.markAsUpdated()},Matrix._UpdateFlagSeed=0,Matrix._IdentityReadOnly=Matrix.Identity(),MathTmp.Vector3=_0x404bc2.BuildTuple(11,Vector3.Zero),MathTmp.Matrix=_0x404bc2.BuildTuple(2,Matrix.Identity),MathTmp.Quaternion=_0x404bc2.BuildTuple(3,Quaternion.Zero),TmpVectors.Vector2=_0x404bc2.BuildTuple(3,Vector2.Zero),TmpVectors.Vector3=_0x404bc2.BuildTuple(13,Vector3.Zero),TmpVectors.Vector4=_0x404bc2.BuildTuple(3,Vector4.Zero),TmpVectors.Quaternion=_0x404bc2.BuildTuple(2,Quaternion.Zero),TmpVectors.Matrix=_0x404bc2.BuildTuple(8,Matrix.Identity);const mtxConvertNDCToHalfZRange=Matrix.FromValues(1,0,0,0,0,1,0,0,0,0,.5,0,0,0,.5,1);var _0x5d3935=(_0x572008=!0,function(e,t){var i=_0x572008?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x572008=!1,i}),_0x4b6964=_0x5d3935(void 0,(function(){return _0x4b6964.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b6964).search("(((.+)+)+)+$")})),_0x572008;function _0x37a515(){this._ubo=void 0,this._name="",this._isValueDirty=!0,this._isTextureDirty=!1,this._uniformMap=void 0}_0x4b6964(),Object.defineProperties(_0x37a515.prototype,{GPUbuffer:{get:function(){return this._ubo.getBuffer()}},buffer:{get:function(){return this._ubo}},name:{get:function(){return this._name}},valueDirty:{set:function(e){return this._isValueDirty=e},get:function(){return this._isValueDirty}},textureDirty:{set:function(e){return this._isTextureDirty=e},get:function(){return this._isTextureDirty}},uniformMap:{get:function(){return this._uniformMap}}}),_0x37a515.prototype.update=function(e,t){},_0x37a515.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x37a515.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x37a515.writeCartesian2ToUBO=function(e,t,i){t.updateFloat2(e,i.x,i.y)},_0x37a515.writeCartesian3ToUBO=function(e,t,i){t.updateFloat3(e,i.x,i.y,i.z)},_0x37a515.writeCartesian4ToUBO=function(e,t,i){t.updateFloat4(e,i.x,i.y,i.z,i.w)};var _0x48ac1d=new Float32Array(16),_0x5c191c=new Matrix,_0x188c73=new Float32Array(9);function e$1Y(){}function r$16(){(_0x37a515.call(this)||this)._name=_0x2e0417.MESH}_0x37a515.writeMatrix3ToUBO=function(e,t,i){p$1e.toArray(i,_0x188c73),t.updateMatrix3x3(e,_0x188c73)},_0x37a515.writeMatrix4ToUBO=function(e,t,i){p$1d.toArray(i,_0x48ac1d),Matrix.FromArrayToRef(_0x48ac1d,0,_0x5c191c),t.updateMatrix(e,_0x5c191c)},_0x37a515.writeColorToUBO=function(e,t,i){t.updateFloat4(e,i.red,i.green,i.blue,i.alpha)},_0x37a515.setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x37a515.setTextureArrayToEffect=function(e,t,i){var n,r=t.length,o=[];for(n=0;n<r;++n){var a=t[n];o.push(a._inner._texture)}r>0&&e.setTextureArray(i,o)},_0x37a515.prototype.isDestroyed=function(){return!1},_0x37a515.prototype.destroy=function(){return this._ubo.dispose(),i$11(this)},e$1Y.totalQueryCount=0,e$1Y.thisFrameQueryCount=0,e$1Y.maxQueryPerFrame=1,e$1Y.updateArrayByQueryID=new Uint32Array(8192),e$1Y.reset=function(){e$1Y.thisFrameQueryCount=0;var e=e$1Y.totalQueryCount/5;e$1Y.maxQueryPerFrame=Math.ceil(e)},e$1Y.createQuery=function(e){e$1Y.totalQueryCount++,e$1Y.updateArrayByQueryID[e]=0},e$1Y.deleteQuery=function(e){e$1Y.totalQueryCount--,e$1Y.totalQueryCount<0&&(e$1Y.totalQueryCount=0)},e$1Y.canQueryThisFrame=function(e,t){return!(e$1Y.thisFrameQueryCount>=e$1Y.maxQueryPerFrame)&&!(t-e$1Y.updateArrayByQueryID[e]<=5)},e$1Y.updateQuery=function(e,t){e$1Y.updateArrayByQueryID[e]=t},_0x37a515&&(r$16.__proto__=_0x37a515),r$16.prototype=Object.create(_0x37a515&&_0x37a515.prototype),r$16.prototype.constructor=_0x37a515,r$16.prototype._initUBO=function(e){this._ubo=new _0x5c4ccd(e.engine,void 0,!1,_0x2e0417.MESH,!1,!1),this._ubo.addUniform("uModelMatrix",16),this._ubo.create()},r$16.prototype.update=function(e,t){this._ubo||this._initUBO(e),_0x37a515.writeMatrix4ToUBO("uModelMatrix",this._ubo,t),this._ubo.update()},r$16.prototype.isDestroyed=function(){return!1},r$16.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};const D$10=8192;var M$18={OCCLUSION_TYPE_NONE:0,OCCLUSION_TYPE_OPTIMISTIC:1,OCCLUSION_TYPE_STRICT:2};function w$11(){this.occlusionInternalRetryCounter=0,this.isOcclusionQueryInProgress=!1,this.isOccluded=!1,this.occlusionRetryCount=-1,this.occlusionType=M$18.OCCLUSION_TYPE_OPTIMISTIC,this.forceRenderingWhenOccluded=!1}function i$10(e,t,i){this._occlusionDataStorage=new w$11,this._context=e,this._occlusionQuery=null,this._meshDrawCommand=t,this._occlusionMeshDrawCommand=i,this._matModel=new p$1d,this._relativeModelMatrix=new p$1d,this._createFrameId=-1}i$10.prototype.isOccluded=function(){return this._occlusionDataStorage.isOccluded},i$10.prototype.checkOcclusionQuery=function(e,t){var i=t.frameNumber;const n=this._occlusionDataStorage;if(n.occlusionType===M$18.OCCLUSION_TYPE_NONE)return n.isOccluded=!1,!1;this._prepare();var r=this._context.engine;if(this._occlusionDataStorage.isOcclusionQueryInProgress&&this._occlusionQuery){const e=r.isQueryResultAvailable(this._occlusionQuery,this),t=r.getQueryResultFrameID();if(e&&this._createFrameId<=t){const e=r.getQueryResult(this._occlusionQuery);n.isOcclusionQueryInProgress=!1,n.occlusionInternalRetryCounter=0,n.isOccluded=!(e>0)}else{if(!e)return!1;this._createFrameId>t&&(n.isOccluded=!1)}}if(this._occlusionQuery&&!e$1Y.canQueryThisFrame(this._occlusionQuery,i))return n.isOccluded;var o=t.camera.position;if(this._meshDrawCommand.orientedBoundingBox){if(y$Y.isPointIn(this._meshDrawCommand.orientedBoundingBox,o))return n.isOccluded=!1,!1}else if(this._meshDrawCommand.boundingVolume.distanceSquaredTo(o)<0)return n.isOccluded=!1,!1;return null===this._occlusionQuery&&(this._occlusionQuery=r.createQuery(),e$1Y.createQuery(this._occlusionQuery),this._createFrameId=r.frameId+5),this._occlusionQuery<D$10&&(this._occlusionMeshDrawCommand.occlusionQueryID=this._occlusionQuery,this._occlusionMeshDrawCommand.execute(this._context,e),this._occlusionDataStorage.isOcclusionQueryInProgress=!0,e$1Y.updateQuery(this._occlusionQuery,i)),n.isOccluded},i$10.prototype._prepare=function(){this._meshUBO||(this._meshUBO=new r$16,this._occlusionMeshDrawCommand.addUniformBuffer(this._meshUBO),this._occlusionMeshDrawCommand.addUniformBuffer(this._context.uniformState.sceneUBO),this._meshDrawCommand.orientedBoundingBox?this._obbToWorldMatrix(this._meshDrawCommand.orientedBoundingBox):this._boundingVolumeToWorldMatrix(this._meshDrawCommand.boundingVolume),this.updateRelativeModelMatrix(),this._context._boundingBoxRenderer.initDrawCommand(this._occlusionMeshDrawCommand))};var d$1n=new o$1p;i$10.prototype.updateRelativeModelMatrix=function(){p$1d.clone(this._matModel,this._relativeModelMatrix),p$1d.getTranslation(this._matModel,d$1n),o$1p.subtract(d$1n,this._context.relativeOrigin,d$1n),p$1d.setTranslation(this._relativeModelMatrix,d$1n,this._relativeModelMatrix),this._meshUBO.update(this._context,this._relativeModelMatrix)};var a$Z=new e$1_;i$10.prototype._boundingVolumeToWorldMatrix=function(e){a$Z.translation=o$1p.clone(e.center,a$Z.translation);var t=2*e.radius;a$Z.scale.x=t,a$Z.scale.y=t,a$Z.scale.z=t,p$1d.fromTranslationRotationScale(a$Z,this._matModel)};var x$1c=new p$1e,S$Z=new o$1p(2,2,2),l$1a,j$1c,E$1h;function i$$(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._cull=u$Z(e.cull,!0),this._occlude=u$Z(e.occlude,!0),this._modelMatrix=e.modelMatrix,this._primitiveType=u$Z(e.primitiveType,W$18.TRIANGLES),this._vertexArray=e.vertexArray,this._count=e.count,this._offset=u$Z(e.offset,0),this._instanceCount=u$Z(e.instanceCount,0),this._shaderProgram=e.shaderProgram,this._uniformMap=e.uniformMap,this._renderState=e.renderState,this._framebuffer=e.framebuffer,this._pass=e.pass,this._executeInClosestFrustum=u$Z(e.executeInClosestFrustum,!1),this._owner=e.owner,this._debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this._debugOverlappingFrustums=0,this._castShadows=u$Z(e.castShadows,!1),this._receiveShadows=u$Z(e.receiveShadows,!1),this._selectCastShadows=!1,this._pickId=e.pickId,this._pickOnly=u$Z(e.pickOnly,!1),this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={},this._uniformBuffers=[],this._relativeOrigin=new o$1p,this._relativeModelMatrix=new p$1d,this._useRelativeOrigin=!0,this._fastBundleDirty=!0,e$2e(this._matModel)?p$1d.clone(this._matModel,this._relativeModelMatrix):p$1d.clone(p$1d.IDENTITY,this._relativeModelMatrix),this._activeFrameBufferID=-1,this._fastBundle={},this._s3mlayer=!1,this._occulsionQueryEnable=u$Z(e.occulsionQueryEnable,!1),!e$2e(this._count)&&e$2e(this._vertexArray)){var t=this._vertexArray.indexBuffer;e$2e(t)&&(this._count=t.numberOfIndices)}this._vertexArrayID=-1,this._lastUseVertexArrayID=-1}function m$17(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function e$1X(e,t,i,n){this.red=u$Z(e,1),this.green=u$Z(t,1),this.blue=u$Z(i,1),this.alpha=u$Z(n,1)}i$10.prototype._obbToWorldMatrix=function(e){p$1e.fromArray(e.halfAxes,0,x$1c),this._matModel=p$1d.fromRotationTranslation(x$1c,e.center,this._matModel),p$1d.multiplyByScale(this._matModel,S$Z,this._matModel)},i$10.prototype.isDestroyed=function(){return!1},i$10.prototype.destroy=function(){return this._occlusionQuery&&(this._context.engine.deleteQuery(this._occlusionQuery),this._occlusionQuery=null,this._occlusionDataStorage.isOcclusionQueryInProgress=!1,e$1Y.deleteQuery(this._occlusionQuery)),this._meshUBO&&this._meshUBO.destroy(),this._occlusionMeshDrawCommand=null,i$11(this)},Object.defineProperties(i$$.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this.dirty=!0)}},occlude:{get:function(){return this._occlude},set:function(e){this._occlude!==e&&(this._occlude=e,this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){if(this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0,e$2e(e)?this._vertexArrayID=e.uniqueID:this._vertexArrayID=-1,!e$2e(this._count))){var t=e.indexBuffer;e$2e(t)&&(this._count=t.numberOfIndices)}}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0,this._fastBundleDirty=!0)}},castShadows:{get:function(){return this._castShadows},set:function(e){this._castShadows!==e&&(this._castShadows=e,this.dirty=!0)}},selectCastShadows:{get:function(){return this._selectCastShadows},set:function(e){this._selectCastShadows!==e&&(this._selectCastShadows=e,this.dirty=!0)}},receiveShadows:{get:function(){return this._receiveShadows},set:function(e){this._receiveShadows!==e&&(this._receiveShadows=e,this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this._combineUniformMapWithUBO(),this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return this._executeInClosestFrustum},set:function(e){this._executeInClosestFrustum!==e&&(this._executeInClosestFrustum=e,this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickOnly:{get:function(){return this._pickOnly},set:function(e){this._pickOnly!==e&&(this._pickOnly=e,this.dirty=!0)}},transformFeedback:{get:function(){return this._transformFeedback},set:function(e){this._transformFeedback=e}},fastBundleDirty:{get:function(){return this._fastBundleDirty}},s3mLayer:{get:function(){return this._s3mlayer},set:function(e){this._s3mlayer=e}},occlusionQueryEnable:{get:function(){return this._occulsionQueryEnable},set:function(e){this._occulsionQueryEnable=e}},useRelativeOrigin:{get:function(){return this._useRelativeOrigin},set:function(e){this._useRelativeOrigin=e}}}),i$$.prototype.addUniformBuffer=function(e){this._uniformBuffers.push(e),e.uniformMap&&(this._uniformMap=p$19(this._uniformMap,e.uniformMap))},i$$.prototype.removeAllUniformBuffer=function(){this._uniformBuffers=[]},i$$.shallowClone=function(e,t){if(e$2e(e))return e$2e(t)||(t=new i$$),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._cull=e._cull,t._occlude=e._occlude,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._uniformBuffers=e._uniformBuffers,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._executeInClosestFrustum=e._executeInClosestFrustum,t._owner=e._owner,t._debugShowBoundingVolume=e._debugShowBoundingVolume,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._castShadows=e._castShadows,t._receiveShadows=e._receiveShadows,t._selectCastShadows=e._selectCastShadows,t._pickId=e._pickId,t._pickOnly=e._pickOnly,t._pointCloudEyeDomeLighting=e._pointCloudEyeDomeLighting,t._transformFeedback=e._transformFeedback,t._relativeOrigin=e._relativeOrigin,t._relativeModelMatrix=e._relativeModelMatrix,t._occlusionMesh=e._occlusionMesh,t._occulsionQueryEnable=e._occulsionQueryEnable,t._useRelativeOrigin=e._useRelativeOrigin,t.dirty=!0,t.lastDirtyTime=0,t._vertexArrayID=e._vertexArrayID,t._activeFrameBufferID=e._activeFrameBufferID,t},i$$.prototype.execute=function(e,t){e.draw(this,t)},i$$.prototype.setActiveFrameBufferID=function(e){this._activeFrameBufferID=e},i$$.prototype.setFastBundle=function(e){this._fastBundle[this._activeFrameBufferID]=e,this._fastBundleDirty=!1},i$$.prototype.removeAllFastBundleAndBindGroups=function(){this.bindGroups=void 0,this._fastBundle={}},i$$.prototype.getActiveBundle=function(){return this._fastBundle[this._activeFrameBufferID]},i$$.prototype.checkOcclusionQuery=function(e,t,i){return!(!e.webgpu||!this._occulsionQueryEnable)&&(this._occlusionMesh||(this._occlusionMesh=new i$10(e,this,new i$$)),this._occlusionMesh.checkOcclusionQuery(t,i))},i$$.prototype.isOccluded=function(){return!(!this._occulsionQueryEnable||!this._occlusionMesh)&&this._occlusionMesh.isOccluded()},i$$.prototype._combineUniformMapWithUBO=function(){for(var e=0;e<this._uniformBuffers.length;e++){var t=this._uniformBuffers[e];t.uniformMap&&(this._uniformMap=p$19(this._uniformMap,t.uniformMap))}},e$1X.fromCartesian4=function(e,t){return o$1q.typeOf.object("cartesian",e),e$2e(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new e$1X(e.x,e.y,e.z,e.w)},e$1X.fromBytes=function(e,t,i,n,r){return e=e$1X.byteToFloat(u$Z(e,255)),t=e$1X.byteToFloat(u$Z(t,255)),i=e$1X.byteToFloat(u$Z(i,255)),n=e$1X.byteToFloat(u$Z(n,255)),e$2e(r)?(r.red=e,r.green=t,r.blue=i,r.alpha=n,r):new e$1X(e,t,i,n)},e$1X.fromAlpha=function(e,t,i){return o$1q.typeOf.object("color",e),o$1q.typeOf.number("alpha",t),e$2e(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=t,i):new e$1X(e.red,e.green,e.blue,t)},s$Z.supportsTypedArrays()&&(l$1a=new ArrayBuffer(4),j$1c=new Uint32Array(l$1a),E$1h=new Uint8Array(l$1a)),e$1X.fromRgba=function(e,t){return j$1c[0]=e,e$1X.fromBytes(E$1h[0],E$1h[1],E$1h[2],E$1h[3],t)},e$1X.byteToRgba=function(e,t,i,n){return E$1h[0]=e,E$1h[1]=t,E$1h[2]=i,E$1h[3]=n,j$1c[0]},e$1X.fromHsl=function(e,t,i,n,r){e=u$Z(e,0)%1,t=u$Z(t,0),i=u$Z(i,0),n=u$Z(n,1);var o=i,a=i,s=i;if(0!==t){var l,u=2*i-(l=i<.5?i*(1+t):i+t-i*t);o=m$17(u,l,e+1/3),a=m$17(u,l,e),s=m$17(u,l,e-1/3)}return e$2e(r)?(r.red=o,r.green=a,r.blue=s,r.alpha=n,r):new e$1X(o,a,s,n)},e$1X.fromRandom=function(e,t){var i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).red;if(!e$2e(i)){var n=u$Z(e.minimumRed,0),r=u$Z(e.maximumRed,1);o$1q.typeOf.number.lessThanOrEquals("minimumRed",n,r),i=n+e$2d.nextRandomNumber()*(r-n)}var o=e.green;if(!e$2e(o)){var a=u$Z(e.minimumGreen,0),s=u$Z(e.maximumGreen,1);o$1q.typeOf.number.lessThanOrEquals("minimumGreen",a,s),o=a+e$2d.nextRandomNumber()*(s-a)}var l=e.blue;if(!e$2e(l)){var u=u$Z(e.minimumBlue,0),c=u$Z(e.maximumBlue,1);o$1q.typeOf.number.lessThanOrEquals("minimumBlue",u,c),l=u+e$2d.nextRandomNumber()*(c-u)}var h=e.alpha;if(!e$2e(h)){var d=u$Z(e.minimumAlpha,0),f=u$Z(e.maximumAlpha,1);o$1q.typeOf.number.lessThanOrEquals("minumumAlpha",d,f),h=d+e$2d.nextRandomNumber()*(f-d)}return e$2e(t)?(t.red=i,t.green=o,t.blue=l,t.alpha=h,t):new e$1X(i,o,l,h)};var R$13=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,L$1c=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,B$11=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,T$16=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;e$1X.fromCssColorString=function(e,t){o$1q.typeOf.string("color",e),e$2e(t)||(t=new e$1X);var i=e$1X[e.toUpperCase()];if(e$2e(i))return e$1X.clone(i,t),t;var n=R$13.exec(e);return null!==n?(t.red=parseInt(n[1],16)/15,t.green=parseInt(n[2],16)/15,t.blue=parseInt(n[3],16)/15,t.alpha=1,t):null!==(n=L$1c.exec(e))?(t.red=parseInt(n[1],16)/255,t.green=parseInt(n[2],16)/255,t.blue=parseInt(n[3],16)/255,t.alpha=1,t):null!==(n=B$11.exec(e))?(t.red=parseFloat(n[1])/("%"===n[1].substr(-1)?100:255),t.green=parseFloat(n[2])/("%"===n[2].substr(-1)?100:255),t.blue=parseFloat(n[3])/("%"===n[3].substr(-1)?100:255),t.alpha=parseFloat(u$Z(n[4],"1.0")),t):null!==(n=T$16.exec(e))?e$1X.fromHsl(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(u$Z(n[4],"1.0")),t):t=void 0},e$1X.packedLength=4,e$1X.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.red,t[i++]=e.green,t[i++]=e.blue,t[i]=e.alpha,t},e$1X.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new e$1X),i.red=e[t++],i.green=e[t++],i.blue=e[t++],i.alpha=e[t],i},e$1X.byteToFloat=function(e){return e/255},e$1X.floatToByte=function(e){return 1===e?255:256*e|0},e$1X.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new e$1X(e.red,e.green,e.blue,e.alpha)},e$1X.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},e$1X.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},e$1X.prototype.clone=function(e){return e$1X.clone(this,e)},e$1X.prototype.equals=function(e){return e$1X.equals(this,e)},e$1X.prototype.equalsEpsilon=function(e,t){return this===e||e$2e(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},e$1X.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},e$1X.prototype.toCssColorString=function(){var e=e$1X.floatToByte(this.red),t=e$1X.floatToByte(this.green),i=e$1X.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},e$1X.prototype.toBytes=function(e){var t=e$1X.floatToByte(this.red),i=e$1X.floatToByte(this.green),n=e$1X.floatToByte(this.blue),r=e$1X.floatToByte(this.alpha);return e$2e(e)?(e[0]=t,e[1]=i,e[2]=n,e[3]=r,e):[t,i,n,r]},e$1X.prototype.toRgba=function(){return E$1h[0]=e$1X.floatToByte(this.red),E$1h[1]=e$1X.floatToByte(this.green),E$1h[2]=e$1X.floatToByte(this.blue),E$1h[3]=e$1X.floatToByte(this.alpha),j$1c[0]},e$1X.prototype.brighten=function(e,t){return o$1q.typeOf.number("magnitude",e),o$1q.typeOf.number.greaterThanOrEquals("magnitude",e,0),o$1q.typeOf.object("result",t),e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},e$1X.prototype.darken=function(e,t){return o$1q.typeOf.number("magnitude",e),o$1q.typeOf.number.greaterThanOrEquals("magnitude",e,0),o$1q.typeOf.object("result",t),e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},e$1X.prototype.withAlpha=function(e,t){return e$1X.fromAlpha(this,e,t)},e$1X.add=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},e$1X.subtract=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},e$1X.multiply=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},e$1X.divide=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},e$1X.mod=function(e,t,i){return o$1q.typeOf.object("left",e),o$1q.typeOf.object("right",t),o$1q.typeOf.object("result",i),i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},e$1X.lerp=function(e,t,i,n){return o$1q.typeOf.object("start",e),o$1q.typeOf.object("end",t),o$1q.typeOf.number("t",i),o$1q.typeOf.object("result",n),n.red=e$2d.lerp(e.red,t.red,i),n.green=e$2d.lerp(e.green,t.green,i),n.blue=e$2d.lerp(e.blue,t.blue,i),n.alpha=e$2d.lerp(e.alpha,t.alpha,i),n},e$1X.multiplyByScalar=function(e,t,i){return o$1q.typeOf.object("color",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},e$1X.divideByScalar=function(e,t,i){return o$1q.typeOf.object("color",e),o$1q.typeOf.number("scalar",t),o$1q.typeOf.object("result",i),i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},e$1X.ALICEBLUE=Object.freeze(e$1X.fromCssColorString("#F0F8FF")),e$1X.ANTIQUEWHITE=Object.freeze(e$1X.fromCssColorString("#FAEBD7")),e$1X.AQUA=Object.freeze(e$1X.fromCssColorString("#00FFFF")),e$1X.AQUAMARINE=Object.freeze(e$1X.fromCssColorString("#7FFFD4")),e$1X.AZURE=Object.freeze(e$1X.fromCssColorString("#F0FFFF")),e$1X.BEIGE=Object.freeze(e$1X.fromCssColorString("#F5F5DC")),e$1X.BISQUE=Object.freeze(e$1X.fromCssColorString("#FFE4C4")),e$1X.BLACK=Object.freeze(e$1X.fromCssColorString("#000000")),e$1X.BLANCHEDALMOND=Object.freeze(e$1X.fromCssColorString("#FFEBCD")),e$1X.BLUE=Object.freeze(e$1X.fromCssColorString("#0000FF")),e$1X.BLUEVIOLET=Object.freeze(e$1X.fromCssColorString("#8A2BE2")),e$1X.BROWN=Object.freeze(e$1X.fromCssColorString("#A52A2A")),e$1X.BURLYWOOD=Object.freeze(e$1X.fromCssColorString("#DEB887")),e$1X.CADETBLUE=Object.freeze(e$1X.fromCssColorString("#5F9EA0")),e$1X.CHARTREUSE=Object.freeze(e$1X.fromCssColorString("#7FFF00")),e$1X.CHOCOLATE=Object.freeze(e$1X.fromCssColorString("#D2691E")),e$1X.CORAL=Object.freeze(e$1X.fromCssColorString("#FF7F50")),e$1X.CORNFLOWERBLUE=Object.freeze(e$1X.fromCssColorString("#6495ED")),e$1X.CORNSILK=Object.freeze(e$1X.fromCssColorString("#FFF8DC")),e$1X.CRIMSON=Object.freeze(e$1X.fromCssColorString("#DC143C")),e$1X.CYAN=Object.freeze(e$1X.fromCssColorString("#00FFFF")),e$1X.DARKBLUE=Object.freeze(e$1X.fromCssColorString("#00008B")),e$1X.DARKCYAN=Object.freeze(e$1X.fromCssColorString("#008B8B")),e$1X.DARKGOLDENROD=Object.freeze(e$1X.fromCssColorString("#B8860B")),e$1X.DARKGRAY=Object.freeze(e$1X.fromCssColorString("#A9A9A9")),e$1X.DARKGREEN=Object.freeze(e$1X.fromCssColorString("#006400")),e$1X.DARKGREY=e$1X.DARKGRAY,e$1X.DARKKHAKI=Object.freeze(e$1X.fromCssColorString("#BDB76B")),e$1X.DARKMAGENTA=Object.freeze(e$1X.fromCssColorString("#8B008B")),e$1X.DARKOLIVEGREEN=Object.freeze(e$1X.fromCssColorString("#556B2F")),e$1X.DARKORANGE=Object.freeze(e$1X.fromCssColorString("#FF8C00")),e$1X.DARKORCHID=Object.freeze(e$1X.fromCssColorString("#9932CC")),e$1X.DARKRED=Object.freeze(e$1X.fromCssColorString("#8B0000")),e$1X.DARKSALMON=Object.freeze(e$1X.fromCssColorString("#E9967A")),e$1X.DARKSEAGREEN=Object.freeze(e$1X.fromCssColorString("#8FBC8F")),e$1X.DARKSLATEBLUE=Object.freeze(e$1X.fromCssColorString("#483D8B")),e$1X.DARKSLATEGRAY=Object.freeze(e$1X.fromCssColorString("#2F4F4F")),e$1X.DARKSLATEGREY=e$1X.DARKSLATEGRAY,e$1X.DARKTURQUOISE=Object.freeze(e$1X.fromCssColorString("#00CED1")),e$1X.DARKVIOLET=Object.freeze(e$1X.fromCssColorString("#9400D3")),e$1X.DEEPPINK=Object.freeze(e$1X.fromCssColorString("#FF1493")),e$1X.DEEPSKYBLUE=Object.freeze(e$1X.fromCssColorString("#00BFFF")),e$1X.DIMGRAY=Object.freeze(e$1X.fromCssColorString("#696969")),e$1X.DIMGREY=e$1X.DIMGRAY,e$1X.DODGERBLUE=Object.freeze(e$1X.fromCssColorString("#1E90FF")),e$1X.FIREBRICK=Object.freeze(e$1X.fromCssColorString("#B22222")),e$1X.FLORALWHITE=Object.freeze(e$1X.fromCssColorString("#FFFAF0")),e$1X.FORESTGREEN=Object.freeze(e$1X.fromCssColorString("#228B22")),e$1X.FUCHSIA=Object.freeze(e$1X.fromCssColorString("#FF00FF")),e$1X.GAINSBORO=Object.freeze(e$1X.fromCssColorString("#DCDCDC")),e$1X.GHOSTWHITE=Object.freeze(e$1X.fromCssColorString("#F8F8FF")),e$1X.GOLD=Object.freeze(e$1X.fromCssColorString("#FFD700")),e$1X.GOLDENROD=Object.freeze(e$1X.fromCssColorString("#DAA520")),e$1X.GRAY=Object.freeze(e$1X.fromCssColorString("#808080")),e$1X.GREEN=Object.freeze(e$1X.fromCssColorString("#008000")),e$1X.GREENYELLOW=Object.freeze(e$1X.fromCssColorString("#ADFF2F")),e$1X.GREY=e$1X.GRAY,e$1X.HONEYDEW=Object.freeze(e$1X.fromCssColorString("#F0FFF0")),e$1X.HOTPINK=Object.freeze(e$1X.fromCssColorString("#FF69B4")),e$1X.INDIANRED=Object.freeze(e$1X.fromCssColorString("#CD5C5C")),e$1X.INDIGO=Object.freeze(e$1X.fromCssColorString("#4B0082")),e$1X.IVORY=Object.freeze(e$1X.fromCssColorString("#FFFFF0")),e$1X.KHAKI=Object.freeze(e$1X.fromCssColorString("#F0E68C")),e$1X.LAVENDER=Object.freeze(e$1X.fromCssColorString("#E6E6FA")),e$1X.LAVENDAR_BLUSH=Object.freeze(e$1X.fromCssColorString("#FFF0F5")),e$1X.LAWNGREEN=Object.freeze(e$1X.fromCssColorString("#7CFC00")),e$1X.LEMONCHIFFON=Object.freeze(e$1X.fromCssColorString("#FFFACD")),e$1X.LIGHTBLUE=Object.freeze(e$1X.fromCssColorString("#ADD8E6")),e$1X.LIGHTCORAL=Object.freeze(e$1X.fromCssColorString("#F08080")),e$1X.LIGHTCYAN=Object.freeze(e$1X.fromCssColorString("#E0FFFF")),e$1X.LIGHTGOLDENRODYELLOW=Object.freeze(e$1X.fromCssColorString("#FAFAD2")),e$1X.LIGHTGRAY=Object.freeze(e$1X.fromCssColorString("#D3D3D3")),e$1X.LIGHTGREEN=Object.freeze(e$1X.fromCssColorString("#90EE90")),e$1X.LIGHTGREY=e$1X.LIGHTGRAY,e$1X.LIGHTPINK=Object.freeze(e$1X.fromCssColorString("#FFB6C1")),e$1X.LIGHTSEAGREEN=Object.freeze(e$1X.fromCssColorString("#20B2AA")),e$1X.LIGHTSKYBLUE=Object.freeze(e$1X.fromCssColorString("#87CEFA")),e$1X.LIGHTSLATEGRAY=Object.freeze(e$1X.fromCssColorString("#778899")),e$1X.LIGHTSLATEGREY=e$1X.LIGHTSLATEGRAY,e$1X.LIGHTSTEELBLUE=Object.freeze(e$1X.fromCssColorString("#B0C4DE")),e$1X.LIGHTYELLOW=Object.freeze(e$1X.fromCssColorString("#FFFFE0")),e$1X.LIME=Object.freeze(e$1X.fromCssColorString("#00FF00")),e$1X.LIMEGREEN=Object.freeze(e$1X.fromCssColorString("#32CD32")),e$1X.LINEN=Object.freeze(e$1X.fromCssColorString("#FAF0E6")),e$1X.MAGENTA=Object.freeze(e$1X.fromCssColorString("#FF00FF")),e$1X.MAROON=Object.freeze(e$1X.fromCssColorString("#800000")),e$1X.MEDIUMAQUAMARINE=Object.freeze(e$1X.fromCssColorString("#66CDAA")),e$1X.MEDIUMBLUE=Object.freeze(e$1X.fromCssColorString("#0000CD")),e$1X.MEDIUMORCHID=Object.freeze(e$1X.fromCssColorString("#BA55D3")),e$1X.MEDIUMPURPLE=Object.freeze(e$1X.fromCssColorString("#9370DB")),e$1X.MEDIUMSEAGREEN=Object.freeze(e$1X.fromCssColorString("#3CB371")),e$1X.MEDIUMSLATEBLUE=Object.freeze(e$1X.fromCssColorString("#7B68EE")),e$1X.MEDIUMSPRINGGREEN=Object.freeze(e$1X.fromCssColorString("#00FA9A")),e$1X.MEDIUMTURQUOISE=Object.freeze(e$1X.fromCssColorString("#48D1CC")),e$1X.MEDIUMVIOLETRED=Object.freeze(e$1X.fromCssColorString("#C71585")),e$1X.MIDNIGHTBLUE=Object.freeze(e$1X.fromCssColorString("#191970")),e$1X.MINTCREAM=Object.freeze(e$1X.fromCssColorString("#F5FFFA")),e$1X.MISTYROSE=Object.freeze(e$1X.fromCssColorString("#FFE4E1")),e$1X.MOCCASIN=Object.freeze(e$1X.fromCssColorString("#FFE4B5")),e$1X.NAVAJOWHITE=Object.freeze(e$1X.fromCssColorString("#FFDEAD")),e$1X.NAVY=Object.freeze(e$1X.fromCssColorString("#000080")),e$1X.OLDLACE=Object.freeze(e$1X.fromCssColorString("#FDF5E6")),e$1X.OLIVE=Object.freeze(e$1X.fromCssColorString("#808000")),e$1X.OLIVEDRAB=Object.freeze(e$1X.fromCssColorString("#6B8E23")),e$1X.ORANGE=Object.freeze(e$1X.fromCssColorString("#FFA500")),e$1X.ORANGERED=Object.freeze(e$1X.fromCssColorString("#FF4500")),e$1X.ORCHID=Object.freeze(e$1X.fromCssColorString("#DA70D6")),e$1X.PALEGOLDENROD=Object.freeze(e$1X.fromCssColorString("#EEE8AA")),e$1X.PALEGREEN=Object.freeze(e$1X.fromCssColorString("#98FB98")),e$1X.PALETURQUOISE=Object.freeze(e$1X.fromCssColorString("#AFEEEE")),e$1X.PALEVIOLETRED=Object.freeze(e$1X.fromCssColorString("#DB7093")),e$1X.PAPAYAWHIP=Object.freeze(e$1X.fromCssColorString("#FFEFD5")),e$1X.PEACHPUFF=Object.freeze(e$1X.fromCssColorString("#FFDAB9")),e$1X.PERU=Object.freeze(e$1X.fromCssColorString("#CD853F")),e$1X.PINK=Object.freeze(e$1X.fromCssColorString("#FFC0CB")),e$1X.PLUM=Object.freeze(e$1X.fromCssColorString("#DDA0DD")),e$1X.POWDERBLUE=Object.freeze(e$1X.fromCssColorString("#B0E0E6")),e$1X.PURPLE=Object.freeze(e$1X.fromCssColorString("#800080")),e$1X.RED=Object.freeze(e$1X.fromCssColorString("#FF0000")),e$1X.ROSYBROWN=Object.freeze(e$1X.fromCssColorString("#BC8F8F")),e$1X.ROYALBLUE=Object.freeze(e$1X.fromCssColorString("#4169E1")),e$1X.SADDLEBROWN=Object.freeze(e$1X.fromCssColorString("#8B4513")),e$1X.SALMON=Object.freeze(e$1X.fromCssColorString("#FA8072")),e$1X.SANDYBROWN=Object.freeze(e$1X.fromCssColorString("#F4A460")),e$1X.SEAGREEN=Object.freeze(e$1X.fromCssColorString("#2E8B57")),e$1X.SEASHELL=Object.freeze(e$1X.fromCssColorString("#FFF5EE")),e$1X.SIENNA=Object.freeze(e$1X.fromCssColorString("#A0522D")),e$1X.SILVER=Object.freeze(e$1X.fromCssColorString("#C0C0C0")),e$1X.SKYBLUE=Object.freeze(e$1X.fromCssColorString("#87CEEB")),e$1X.SLATEBLUE=Object.freeze(e$1X.fromCssColorString("#6A5ACD")),e$1X.SLATEGRAY=Object.freeze(e$1X.fromCssColorString("#708090")),e$1X.SLATEGREY=e$1X.SLATEGRAY,e$1X.SNOW=Object.freeze(e$1X.fromCssColorString("#FFFAFA")),e$1X.SPRINGGREEN=Object.freeze(e$1X.fromCssColorString("#00FF7F")),e$1X.STEELBLUE=Object.freeze(e$1X.fromCssColorString("#4682B4")),e$1X.TAN=Object.freeze(e$1X.fromCssColorString("#D2B48C")),e$1X.TEAL=Object.freeze(e$1X.fromCssColorString("#008080")),e$1X.THISTLE=Object.freeze(e$1X.fromCssColorString("#D8BFD8")),e$1X.TOMATO=Object.freeze(e$1X.fromCssColorString("#FF6347")),e$1X.TURQUOISE=Object.freeze(e$1X.fromCssColorString("#40E0D0")),e$1X.VIOLET=Object.freeze(e$1X.fromCssColorString("#EE82EE")),e$1X.WHEAT=Object.freeze(e$1X.fromCssColorString("#F5DEB3")),e$1X.WHITE=Object.freeze(e$1X.fromCssColorString("#FFFFFF")),e$1X.WHITESMOKE=Object.freeze(e$1X.fromCssColorString("#F5F5F5")),e$1X.YELLOW=Object.freeze(e$1X.fromCssColorString("#FFFF00")),e$1X.YELLOWGREEN=Object.freeze(e$1X.fromCssColorString("#9ACD32")),e$1X.TRANSPARENT=Object.freeze(new e$1X(0,0,0,0));var e$1W={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:10,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1,_uniformBufferOffsetAlignment:256,_maxUniformBufferBinding:36,_maxArrayTextureLayers:256};function c$16(e){if("object"!=typeof e||null===e)return e;for(var t,i=Object.keys(e),n=0;n<i.length;n++)t=i[n],e.hasOwnProperty(t)&&"_applyFunctions"!==t&&(e[t]=c$16(e[t]));return Object.freeze(e)}Object.defineProperties(e$1W,{maximumCombinedTextureImageUnits:{get:function(){return e$1W._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return e$1W._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return e$1W._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return e$1W._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return e$1W._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return e$1W._maximumTextureSize}},maximumVaryingVectors:{get:function(){return e$1W._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return e$1W._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return e$1W._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return e$1W._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return e$1W._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return e$1W._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return e$1W._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return e$1W._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return e$1W._maximumViewportWidth}},maximumViewportHeight:{get:function(){return e$1W._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return e$1W._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return e$1W._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return e$1W._maximumColorAttachments}},highpFloatSupported:{get:function(){return e$1W._highpFloatSupported}},highpIntSupported:{get:function(){return e$1W._highpIntSupported}},uniformBufferOffsetAlignment:{get:function(){return e$1W._uniformBufferOffsetAlignment}},maxUniformBufferBinding:{get:function(){return e$1W._maxUniformBufferBinding}},maxArrayTextureLayers:{get:function(){return e$1W._maxArrayTextureLayers}}});var _0x3b2396=(_0x545c37=!0,function(e,t){var i=_0x545c37?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x545c37=!1,i}),_0x6df049=_0x3b2396(void 0,(function(){return _0x6df049.toString().search("(((.+)+)+)+$").toString().constructor(_0x6df049).search("(((.+)+)+)+$")})),_0x545c37;function _0x333f62(){}_0x6df049(),_0x333f62.ALPHA_DISABLE=0,_0x333f62.ALPHA_ADD=1,_0x333f62.ALPHA_COMBINE=2,_0x333f62.ALPHA_SUBTRACT=3,_0x333f62.ALPHA_MULTIPLY=4,_0x333f62.ALPHA_MAXIMIZED=5,_0x333f62.ALPHA_ONEONE=6,_0x333f62.ALPHA_PREMULTIPLIED=7,_0x333f62.ALPHA_PREMULTIPLIED_PORTERDUFF=8,_0x333f62.ALPHA_INTERPOLATE=9,_0x333f62.ALPHA_SCREENMODE=10,_0x333f62.ALPHA_ONEONE_ONEONE=11,_0x333f62.ALPHA_ALPHATOCOLOR=12,_0x333f62.ALPHA_REVERSEONEMINUS=13,_0x333f62.ALPHA_SRC_DSTONEMINUSSRCALPHA=14,_0x333f62.ALPHA_ONEONE_ONEZERO=15,_0x333f62.ALPHA_EXCLUSION=16,_0x333f62.ALPHA_LAYER_ACCUMULATE=17,_0x333f62.ALPHA_EQUATION_ADD=0,_0x333f62.ALPHA_EQUATION_SUBSTRACT=1,_0x333f62.ALPHA_EQUATION_REVERSE_SUBTRACT=2,_0x333f62.ALPHA_EQUATION_MAX=3,_0x333f62.ALPHA_EQUATION_MIN=4,_0x333f62.ALPHA_EQUATION_DARKEN=5,_0x333f62.DELAYLOADSTATE_NONE=0,_0x333f62.DELAYLOADSTATE_LOADED=1,_0x333f62.DELAYLOADSTATE_LOADING=2,_0x333f62.DELAYLOADSTATE_NOTLOADED=4,_0x333f62.NEVER=512,_0x333f62.ALWAYS=519,_0x333f62.LESS=513,_0x333f62.EQUAL=514,_0x333f62.LEQUAL=515,_0x333f62.GREATER=516,_0x333f62.GEQUAL=518,_0x333f62.NOTEQUAL=517,_0x333f62.KEEP=7680,_0x333f62.ZERO=0,_0x333f62.REPLACE=7681,_0x333f62.INCR=7682,_0x333f62.DECR=7683,_0x333f62.INVERT=5386,_0x333f62.INCR_WRAP=34055,_0x333f62.DECR_WRAP=34056,_0x333f62.FRONT=0,_0x333f62.BACK=1,_0x333f62.TEXTURE_CLAMP_ADDRESSMODE=0,_0x333f62.TEXTURE_WRAP_ADDRESSMODE=1,_0x333f62.TEXTURE_MIRROR_ADDRESSMODE=2,_0x333f62.TEXTURE_CREATIONFLAG_STORAGE=1,_0x333f62.TEXTUREFORMAT_ALPHA=0,_0x333f62.TEXTUREFORMAT_LUMINANCE=1,_0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA=2,_0x333f62.TEXTUREFORMAT_RGB=4,_0x333f62.TEXTUREFORMAT_RGBA=5,_0x333f62.TEXTUREFORMAT_RED=6,_0x333f62.TEXTUREFORMAT_R=6,_0x333f62.TEXTUREFORMAT_RG=7,_0x333f62.TEXTUREFORMAT_RED_INTEGER=8,_0x333f62.TEXTUREFORMAT_R_INTEGER=8,_0x333f62.TEXTUREFORMAT_RG_INTEGER=9,_0x333f62.TEXTUREFORMAT_RGB_INTEGER=10,_0x333f62.TEXTUREFORMAT_RGBA_INTEGER=11,_0x333f62.TEXTUREFORMAT_BGRA=12,_0x333f62.TEXTUREFORMAT_DEPTH24_STENCIL8=13,_0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT=14,_0x333f62.TEXTUREFORMAT_DEPTH16=15,_0x333f62.TEXTUREFORMAT_DEPTH24=16,_0x333f62.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8=17,_0x333f62.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8=18,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM=36492,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM=36493,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT=36495,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT=36494,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5=33779,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3=33778,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1=33777,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1=33776,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT=35916,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4=37808,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL=36196,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2=37492,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2=37493,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495,_0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC=37496,_0x333f62.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497,_0x333f62.TEXTURETYPE_UNSIGNED_BYTE=0,_0x333f62.TEXTURETYPE_UNSIGNED_INT=0,_0x333f62.TEXTURETYPE_FLOAT=1,_0x333f62.TEXTURETYPE_HALF_FLOAT=2,_0x333f62.TEXTURETYPE_BYTE=3,_0x333f62.TEXTURETYPE_SHORT=4,_0x333f62.TEXTURETYPE_UNSIGNED_SHORT=5,_0x333f62.TEXTURETYPE_INT=6,_0x333f62.TEXTURETYPE_UNSIGNED_INTEGER=7,_0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,_0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,_0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,_0x333f62.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,_0x333f62.TEXTURETYPE_UNSIGNED_INT_24_8=12,_0x333f62.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,_0x333f62.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,_0x333f62.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,_0x333f62.TEXTURETYPE_UNDEFINED=16,_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE=1,_0x333f62.TEXTURE_NEAREST_NEAREST=1,_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE=2,_0x333f62.TEXTURE_LINEAR_LINEAR=2,_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE=3,_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,_0x333f62.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,_0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,_0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,_0x333f62.TEXTURE_NEAREST_LINEAR=7,_0x333f62.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,_0x333f62.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,_0x333f62.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,_0x333f62.TEXTURE_LINEAR_NEAREST=12,_0x333f62.TEXTURE_EXPLICIT_MODE=0,_0x333f62.TEXTURE_SPHERICAL_MODE=1,_0x333f62.TEXTURE_PLANAR_MODE=2,_0x333f62.TEXTURE_CUBIC_MODE=3,_0x333f62.TEXTURE_PROJECTION_MODE=4,_0x333f62.TEXTURE_SKYBOX_MODE=5,_0x333f62.TEXTURE_INVCUBIC_MODE=6,_0x333f62.TEXTURE_EQUIRECTANGULAR_MODE=7,_0x333f62.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,_0x333f62.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,_0x333f62.TEXTURE_FILTERING_QUALITY_OFFLINE=4096,_0x333f62.TEXTURE_FILTERING_QUALITY_HIGH=64,_0x333f62.TEXTURE_FILTERING_QUALITY_MEDIUM=16,_0x333f62.TEXTURE_FILTERING_QUALITY_LOW=8,_0x333f62.SCALEMODE_FLOOR=1,_0x333f62.SCALEMODE_NEAREST=2,_0x333f62.SCALEMODE_CEILING=3,_0x333f62.MATERIAL_TextureDirtyFlag=1,_0x333f62.MATERIAL_LightDirtyFlag=2,_0x333f62.MATERIAL_FresnelDirtyFlag=4,_0x333f62.MATERIAL_AttributesDirtyFlag=8,_0x333f62.MATERIAL_MiscDirtyFlag=16,_0x333f62.MATERIAL_PrePassDirtyFlag=32,_0x333f62.MATERIAL_AllDirtyFlag=63,_0x333f62.MATERIAL_TriangleFillMode=0,_0x333f62.MATERIAL_WireFrameFillMode=1,_0x333f62.MATERIAL_PointFillMode=2,_0x333f62.MATERIAL_PointListDrawMode=3,_0x333f62.MATERIAL_LineListDrawMode=4,_0x333f62.MATERIAL_LineLoopDrawMode=5,_0x333f62.MATERIAL_LineStripDrawMode=6,_0x333f62.MATERIAL_TriangleStripDrawMode=7,_0x333f62.MATERIAL_TriangleFanDrawMode=8,_0x333f62.MATERIAL_ClockWiseSideOrientation=0,_0x333f62.MATERIAL_CounterClockWiseSideOrientation=1,_0x333f62.ACTION_NothingTrigger=0,_0x333f62.ACTION_OnPickTrigger=1,_0x333f62.ACTION_OnLeftPickTrigger=2,_0x333f62.ACTION_OnRightPickTrigger=3,_0x333f62.ACTION_OnCenterPickTrigger=4,_0x333f62.ACTION_OnPickDownTrigger=5,_0x333f62.ACTION_OnDoublePickTrigger=6,_0x333f62.ACTION_OnPickUpTrigger=7,_0x333f62.ACTION_OnPickOutTrigger=16,_0x333f62.ACTION_OnLongPressTrigger=8,_0x333f62.ACTION_OnPointerOverTrigger=9,_0x333f62.ACTION_OnPointerOutTrigger=10,_0x333f62.ACTION_OnEveryFrameTrigger=11,_0x333f62.ACTION_OnIntersectionEnterTrigger=12,_0x333f62.ACTION_OnIntersectionExitTrigger=13,_0x333f62.ACTION_OnKeyDownTrigger=14,_0x333f62.ACTION_OnKeyUpTrigger=15,_0x333f62.PARTICLES_BILLBOARDMODE_Y=2,_0x333f62.PARTICLES_BILLBOARDMODE_ALL=7,_0x333f62.PARTICLES_BILLBOARDMODE_STRETCHED=8,_0x333f62.MESHES_CULLINGSTRATEGY_STANDARD=0,_0x333f62.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,_0x333f62.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=2,_0x333f62.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=3,_0x333f62.SCENELOADER_NO_LOGGING=0,_0x333f62.SCENELOADER_MINIMAL_LOGGING=1,_0x333f62.SCENELOADER_SUMMARY_LOGGING=2,_0x333f62.SCENELOADER_DETAILED_LOGGING=3,_0x333f62.PREPASS_IRRADIANCE_TEXTURE_TYPE=0,_0x333f62.PREPASS_POSITION_TEXTURE_TYPE=1,_0x333f62.PREPASS_VELOCITY_TEXTURE_TYPE=2,_0x333f62.PREPASS_REFLECTIVITY_TEXTURE_TYPE=3,_0x333f62.PREPASS_COLOR_TEXTURE_TYPE=4,_0x333f62.PREPASS_DEPTH_TEXTURE_TYPE=5,_0x333f62.PREPASS_NORMAL_TEXTURE_TYPE=6,_0x333f62.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE=7,_0x333f62.BUFFER_CREATIONFLAG_READ=1,_0x333f62.BUFFER_CREATIONFLAG_WRITE=2,_0x333f62.BUFFER_CREATIONFLAG_READWRITE=3,_0x333f62.BUFFER_CREATIONFLAG_UNIFORM=4,_0x333f62.BUFFER_CREATIONFLAG_VERTEX=8,_0x333f62.BUFFER_CREATIONFLAG_INDEX=16,_0x333f62.BUFFER_CREATIONFLAG_STORAGE=32,_0x333f62.RENDERPASS_MAIN=0,_0x333f62.INPUT_ALT_KEY=18,_0x333f62.INPUT_CTRL_KEY=17,_0x333f62.INPUT_META_KEY1=91,_0x333f62.INPUT_META_KEY2=92,_0x333f62.INPUT_META_KEY3=93,_0x333f62.INPUT_SHIFT_KEY=16,_0x333f62.SNAPSHOTRENDERING_STANDARD=0,_0x333f62.SNAPSHOTRENDERING_FAST=1,_0x333f62.PERSPECTIVE_CAMERA=0,_0x333f62.ORTHOGRAPHIC_CAMERA=1,_0x333f62.FOVMODE_VERTICAL_FIXED=0,_0x333f62.FOVMODE_HORIZONTAL_FIXED=1,_0x333f62.RIG_MODE_NONE=0,_0x333f62.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,_0x333f62.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,_0x333f62.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,_0x333f62.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,_0x333f62.RIG_MODE_STEREOSCOPIC_INTERLACED=14,_0x333f62.RIG_MODE_VR=20,_0x333f62.RIG_MODE_WEBVR=21,_0x333f62.RIG_MODE_CUSTOM=22,_0x333f62.MAX_SUPPORTED_UV_SETS=6,_0x333f62.GL_ALPHA_EQUATION_ADD=32774,_0x333f62.GL_ALPHA_EQUATION_MIN=32775,_0x333f62.GL_ALPHA_EQUATION_MAX=32776,_0x333f62.GL_ALPHA_EQUATION_SUBTRACT=32778,_0x333f62.GL_ALPHA_EQUATION_REVERSE_SUBTRACT=32779,_0x333f62.GL_ALPHA_FUNCTION_SRC=768,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR=769,_0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA=770,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA=771,_0x333f62.GL_ALPHA_FUNCTION_DST_ALPHA=772,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA=773,_0x333f62.GL_ALPHA_FUNCTION_DST_COLOR=774,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR=775,_0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED=776,_0x333f62.GL_ALPHA_FUNCTION_CONSTANT_COLOR=32769,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR=32770,_0x333f62.GL_ALPHA_FUNCTION_CONSTANT_ALPHA=32771,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA=32772,_0x333f62.SnippetUrl="";var _0x5585c2=(_0x2ef89e=!0,function(e,t){var i=_0x2ef89e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ef89e=!1,i}),_0x13daeb=_0x5585c2(void 0,(function(){return _0x13daeb.toString().search("(((.+)+)+)+$").toString().constructor(_0x13daeb).search("(((.+)+)+)+$")})),_0x2ef89e;function _0x4257c2(){this.reset()}_0x13daeb(),_0x4257c2.prototype.reset=function(){this.enabled=!1,this.mask=255,this.funcRef=1,this.funcMask=255,this.frontFunc=_0x4257c2.ALWAYS,this.backFunc=_0x4257c2.ALWAYS,this.frontOpStencilFail=_0x4257c2.KEEP,this.backOpStencilFail=_0x4257c2.KEEP,this.frontOpDepthFail=_0x4257c2.KEEP,this.backOpDepthFail=_0x4257c2.KEEP,this.frontOpStencilDepthPass=_0x4257c2.REPLACE,this.backOpStencilDepthPass=_0x4257c2.REPLACE},Object.defineProperty(_0x4257c2.prototype,"frontStencilFunc",{get:function(){return this.frontFunc},set:function(e){this.frontFunc=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"backStencilFunc",{get:function(){return this.backFunc},set:function(e){this.backFunc=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"stencilFuncRef",{get:function(){return this.funcRef},set:function(e){this.funcRef=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"stencilFuncMask",{get:function(){return this.funcMask},set:function(e){this.funcMask=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"frontStencilOpStencilFail",{get:function(){return this.frontOpStencilFail},set:function(e){this.frontOpStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"backStencilOpStencilFail",{get:function(){return this.backOpStencilFail},set:function(e){this.backOpStencilFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"frontStencilOpDepthFail",{get:function(){return this.frontOpDepthFail},set:function(e){this.frontOpDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"backStencilOpDepthFail",{get:function(){return this.backOpDepthFail},set:function(e){this.backOpDepthFail=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"frontStencilOpStencilDepthPass",{get:function(){return this.frontOpStencilDepthPass},set:function(e){this.frontOpStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"backStencilOpStencilDepthPass",{get:function(){return this.backOpStencilDepthPass},set:function(e){this.backOpStencilDepthPass=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"stencilMask",{get:function(){return this.mask},set:function(e){this.mask=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4257c2.prototype,"stencilTest",{get:function(){return this.enabled},set:function(e){this.enabled=e},enumerable:!1,configurable:!0}),_0x4257c2.ALWAYS=_0x333f62.ALWAYS,_0x4257c2.KEEP=_0x333f62.KEEP,_0x4257c2.REPLACE=_0x333f62.REPLACE,_0x4257c2.FRONT=_0x333f62.FRONT,_0x4257c2.BACK=_0x333f62.BACK;var _$_={UNSIGNED_BYTE:de$y.UNSIGNED_BYTE,UNSIGNED_SHORT:de$y.UNSIGNED_SHORT,UNSIGNED_INT:de$y.UNSIGNED_INT,FLOAT:de$y.FLOAT,HALF_FLOAT:de$y.HALF_FLOAT_OES,UNSIGNED_INT_24_8:de$y.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:de$y.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:de$y.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:de$y.UNSIGNED_SHORT_5_6_5,isPacked:function(e){return e===_$_.UNSIGNED_INT_24_8||e===_$_.UNSIGNED_SHORT_4_4_4_4||e===_$_.UNSIGNED_SHORT_5_5_5_1||e===_$_.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case _$_.UNSIGNED_BYTE:return 1;case _$_.UNSIGNED_SHORT:case _$_.UNSIGNED_SHORT_4_4_4_4:case _$_.UNSIGNED_SHORT_5_5_5_1:case _$_.UNSIGNED_SHORT_5_6_5:case de$y.HALF_FLOAT:case de$y.HALF_FLOAT_OES:return 2;case _$_.UNSIGNED_INT:case _$_.FLOAT:case _$_.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===_$_.UNSIGNED_BYTE||e===_$_.UNSIGNED_SHORT||e===_$_.UNSIGNED_INT||e===_$_.FLOAT||e===de$y.HALF_FLOAT||e===de$y.HALF_FLOAT_OES||e===_$_.UNSIGNED_INT_24_8||e===_$_.UNSIGNED_SHORT_4_4_4_4||e===_$_.UNSIGNED_SHORT_5_5_5_1||e===_$_.UNSIGNED_SHORT_5_6_5},toWebGLConstant:function(e,t){switch(e){case _$_.UNSIGNED_BYTE:return de$y.UNSIGNED_BYTE;case _$_.UNSIGNED_SHORT:return de$y.UNSIGNED_SHORT;case _$_.UNSIGNED_INT:return de$y.UNSIGNED_INT;case _$_.FLOAT:return de$y.FLOAT;case _$_.HALF_FLOAT:return t.webgl2?de$y.HALF_FLOAT:de$y.HALF_FLOAT_OES;case _$_.UNSIGNED_INT_24_8:return de$y.UNSIGNED_INT_24_8;case _$_.UNSIGNED_SHORT_4_4_4_4:return de$y.UNSIGNED_SHORT_4_4_4_4;case _$_.UNSIGNED_SHORT_5_5_5_1:return de$y.UNSIGNED_SHORT_5_5_5_1;case _$_.UNSIGNED_SHORT_5_6_5:return _$_.UNSIGNED_SHORT_5_6_5}}},_$Z={DEPTH_COMPONENT:de$y.DEPTH_COMPONENT,DEPTH_COMPONENT16:de$y.DEPTH_COMPONENT16,DEPTH_COMPONENT32F:de$y.DEPTH_COMPONENT32F,DEPTH_STENCIL:de$y.DEPTH_STENCIL,ALPHA:de$y.ALPHA,RGB:de$y.RGB,RGBA:de$y.RGBA,LUMINANCE:de$y.LUMINANCE,LUMINANCE_ALPHA:de$y.LUMINANCE_ALPHA,RGB_DXT1:de$y.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:de$y.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:de$y.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:de$y.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:de$y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:de$y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:de$y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:de$y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:de$y.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:de$y.COMPRESSED_RGB_ETC1_WEBGL,RED_INTEGER:de$y.RED_INTEGER,RED:de$y.RED,RGB8_ETC2:de$y.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:de$y.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:de$y.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(e){switch(e){case _$Z.RGB:return 3;case _$Z.RGBA:return 4;case _$Z.LUMINANCE_ALPHA:return 2;case _$Z.ALPHA:case _$Z.LUMINANCE:case _$Z.RED:case _$Z.RED_INTEGER:default:return 1}},validate:function(e){return e===_$Z.DEPTH_COMPONENT||e===_$Z.DEPTH_COMPONENT16||e===_$Z.DEPTH_COMPONENT32F||e===_$Z.DEPTH_STENCIL||e===_$Z.ALPHA||e===_$Z.RED||e===_$Z.RED_INTEGER||e===_$Z.RGB||e===_$Z.RGBA||e===_$Z.LUMINANCE||e===_$Z.LUMINANCE_ALPHA||e===_$Z.RGB_DXT1||e===_$Z.RGBA_DXT1||e===_$Z.RGBA_DXT3||e===_$Z.RGBA_DXT5||e===_$Z.RGB_PVRTC_4BPPV1||e===_$Z.RGB_PVRTC_2BPPV1||e===_$Z.RGBA_PVRTC_4BPPV1||e===_$Z.RGBA_PVRTC_2BPPV1||e===_$Z.RGBA_ASTC||e===_$Z.RGB_ETC1||e===_$Z.RGB8_ETC2||e===_$Z.RGBA8_ETC2_EAC||e===_$Z.RGBA_BC7},isColorFormat:function(e){return e===_$Z.ALPHA||e===_$Z.RED||e===_$Z.RED_INTEGER||e===_$Z.RGB||e===_$Z.RGBA||e===_$Z.LUMINANCE||e===_$Z.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===_$Z.DEPTH_COMPONENT||e===_$Z.DEPTH_COMPONENT16||e===_$Z.DEPTH_COMPONENT32F||e===_$Z.DEPTH_STENCIL},isCompressedFormat:function(e){return e===_$Z.RGB_DXT1||e===_$Z.RGBA_DXT1||e===_$Z.RGBA_DXT3||e===_$Z.RGBA_DXT5||e===_$Z.RGB_PVRTC_4BPPV1||e===_$Z.RGB_PVRTC_2BPPV1||e===_$Z.RGBA_PVRTC_4BPPV1||e===_$Z.RGBA_PVRTC_2BPPV1||e===_$Z.RGBA_ASTC||e===_$Z.RGB_ETC1||e===_$Z.RGB8_ETC2||e===_$Z.RGBA8_ETC2_EAC||e===_$Z.RGBA_BC7},isDXTFormat:function(e){return e===_$Z.RGB_DXT1||e===_$Z.RGBA_DXT1||e===_$Z.RGBA_DXT3||e===_$Z.RGBA_DXT5},isPVRTCFormat:function(e){return e===_$Z.RGB_PVRTC_4BPPV1||e===_$Z.RGB_PVRTC_2BPPV1||e===_$Z.RGBA_PVRTC_4BPPV1||e===_$Z.RGBA_PVRTC_2BPPV1},isETC1Format:function(e){return e===_$Z.RGB_ETC1},compressedTextureSizeInBytes:function(e,t,i,n){var r=e$2e(n)?n:1;switch(e){case _$Z.RGB_DXT1:case _$Z.RGBA_DXT1:case _$Z.RGB_ETC1:case _$Z.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*8*r;case _$Z.RGBA_DXT3:case _$Z.RGBA_DXT5:case _$Z.RGBA_ASTC:case _$Z.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*16*r;case _$Z.RGB_PVRTC_4BPPV1:case _$Z.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8)*r;case _$Z.RGB_PVRTC_2BPPV1:case _$Z.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8)*r;case _$Z.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(i/4)*16;default:return 0}},textureSizeInBytes:function(e,t,i,n,r){var o=e$2e(r)?r:1,a=_$Z.componentsLength(e);return _$_.isPacked(t)&&(a=1),a*_$_.sizeInBytes(t)*i*n*o},alignmentInBytes:function(e,t,i){var n=_$Z.textureSizeInBytes(e,t,i,1)%4;return 0===n?4:2===n?2:1},createTypedArray:function(e,t,i,n){var r=_$_.sizeInBytes(t);return new(r===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:r===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:r===Float32Array.BYTES_PER_ELEMENT&&t===_$_.FLOAT?Float32Array:Uint32Array)(_$Z.componentsLength(e)*i*n)},flipY:function(e,t,i,n,r){if(1===r)return e;for(var o=_$Z.createTypedArray(t,i,n,r),a=_$Z.componentsLength(t),s=n*a,l=0;l<r;++l)for(var u=l*n*a,c=(r-l-1)*n*a,h=0;h<s;++h)o[c+h]=e[u+h];return o},RGBToRGBA:function(e,t,i,n){for(var r=_$Z.createTypedArray(_$Z.RGBA,t,i,n),o=e.length/3,a=0;a<o;a++)r[4*a]=e[3*a],r[4*a+1]=e[3*a+1],r[4*a+2]=e[3*a+2];return r},toInternalFormat:function(e,t,i){if(!i.webgl2)return e;if(e===_$Z.DEPTH_STENCIL)return de$y.DEPTH24_STENCIL8;if(e===_$Z.DEPTH_COMPONENT){if(t===_$_.UNSIGNED_SHORT)return de$y.DEPTH_COMPONENT16;if(t===_$_.UNSIGNED_INT)return de$y.DEPTH_COMPONENT24;if(t===_$_.FLOAT)return de$y.DEPTH_COMPONENT32F}if(e===_$Z.DEPTH_COMPONENT16)return de$y.DEPTH_COMPONENT16;if(e===_$Z.DEPTH_COMPONENT32F)return de$y.DEPTH_COMPONENT32F;if(t===_$_.FLOAT)switch(e){case _$Z.RGBA:return de$y.RGBA32F;case _$Z.RGB:return de$y.RGB32F;case _$Z.RG:return de$y.RG32F;case _$Z.RED:return de$y.R32F}if(t===_$_.UNSIGNED_BYTE)switch(e){case _$Z.RGBA:return de$y.RGBA8;case _$Z.RGB:return de$y.RGB8;case _$Z.RED:return de$y.R8}if(t===_$_.HALF_FLOAT)switch(e){case _$Z.RGBA:return de$y.RGBA16F;case _$Z.RGB:return de$y.RGB16F;case _$Z.RG:return de$y.RG16F;case _$Z.RED:return de$y.R16F}return e}},V$12=Object.freeze(_$Z),E$1g={CLAMP_TO_EDGE:de$y.CLAMP_TO_EDGE,REPEAT:de$y.REPEAT,MIRRORED_REPEAT:de$y.MIRRORED_REPEAT,validate:function(e){return e===E$1g.CLAMP_TO_EDGE||e===E$1g.REPEAT||e===E$1g.MIRRORED_REPEAT}},q$1a=Object.freeze(E$1g),e$1V={NEAREST:de$y.NEAREST,LINEAR:de$y.LINEAR,validate:function(e){return e===e$1V.NEAREST||e===e$1V.LINEAR}},rt$k=Object.freeze(e$1V),E$1f={NEAREST:de$y.NEAREST,LINEAR:de$y.LINEAR,NEAREST_MIPMAP_NEAREST:de$y.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:de$y.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:de$y.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:de$y.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===E$1f.NEAREST||e===E$1f.LINEAR||e===E$1f.NEAREST_MIPMAP_NEAREST||e===E$1f.LINEAR_MIPMAP_NEAREST||e===E$1f.NEAREST_MIPMAP_LINEAR||e===E$1f.LINEAR_MIPMAP_LINEAR}},tt$i=Object.freeze(E$1f),_0x54b949=(_0x53e092=!0,function(e,t){var i=_0x53e092?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53e092=!1,i}),_0x89b7f=_0x54b949(void 0,(function(){return _0x89b7f.toString().search("(((.+)+)+)+$").toString().constructor(_0x89b7f).search("(((.+)+)+)+$")})),_0x53e092;function _0xc1cee(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=_0xc1cee._Counter++}_0x89b7f(),Object.defineProperty(_0xc1cee.prototype,"underlyingResource",{get:function(){return null},enumerable:!1,configurable:!0}),_0xc1cee._Counter=0;var _0x14b656=(_0x2b9730=!0,function(e,t){var i=_0x2b9730?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b9730=!1,i}),_0x342d77=_0x14b656(void 0,(function(){return _0x342d77.toString().search("(((.+)+)+)+$").toString().constructor(_0x342d77).search("(((.+)+)+)+$")})),_0x2b9730;function Buffer$1(e,t,i,n,r,o,a,s){void 0===n&&(n=0),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),this._isAlreadyOwned=!1,e.getScene?this._engine=e.getScene().getEngine():this._engine=e,this._updatable=i,this._instanced=o,this._divisor=s||1,t instanceof _0xc1cee?(this._data=null,this._buffer=t):(this._data=t,this._buffer=null),this.byteStride=a?n:n*Float32Array.BYTES_PER_ELEMENT,!r&&this.create()}function VertexBuffer(e,t,i,n,r,o,a,s,l,u,c,h,d,f){if(void 0===c&&(c=!1),void 0===h&&(h=!1),void 0===d&&(d=1),void 0===f&&(f=!1),t instanceof Buffer$1?(this._buffer=t,this._ownsBuffer=f):(this._buffer=new Buffer$1(e,t,n,o,r,a,h),this._ownsBuffer=!0),this.uniqueId=VertexBuffer._Counter++,this._kind=i,null==u){var p=this.getData();this.type=VertexBuffer.FLOAT,p instanceof Int8Array?this.type=VertexBuffer.BYTE:p instanceof Uint8Array?this.type=VertexBuffer.UNSIGNED_BYTE:p instanceof Int16Array?this.type=VertexBuffer.SHORT:p instanceof Uint16Array?this.type=VertexBuffer.UNSIGNED_SHORT:p instanceof Int32Array?this.type=VertexBuffer.INT:p instanceof Uint32Array&&(this.type=VertexBuffer.UNSIGNED_INT)}else this.type=u;var _=VertexBuffer.GetTypeByteLength(this.type);h?(this._size=l||(o?o/_:VertexBuffer.DeduceStride(i)),this.byteStride=o||this._buffer.byteStride||this._size*_,this.byteOffset=s||0):(this._size=l||o||VertexBuffer.DeduceStride(i),this.byteStride=o?o*_:this._buffer.byteStride||this._size*_,this.byteOffset=(s||0)*_),this.normalized=c,this._instanced=void 0!==a&&a,this._instanceDivisor=a?d:0,this._computeHashCode()}function R$12(){}function n$12(){}_0x342d77(),Buffer$1.prototype.createVertexBuffer=function(e,t,i,n,r,o,a){void 0===o&&(o=!1);var s=o?t:t*Float32Array.BYTES_PER_ELEMENT,l=n?o?n:n*Float32Array.BYTES_PER_ELEMENT:this.byteStride;return new VertexBuffer(this._engine,this,e,this._updatable,!0,l,void 0===r?this._instanced:r,s,i,void 0,void 0,!0,this._divisor||a)},Buffer$1.prototype.isUpdatable=function(){return this._updatable},Buffer$1.prototype.getData=function(){return this._data},Buffer$1.prototype.getBuffer=function(){return this._buffer},Buffer$1.prototype.getStrideSize=function(){return this.byteStride/Float32Array.BYTES_PER_ELEMENT},Buffer$1.prototype.create=function(e){void 0===e&&(e=null),!e&&this._buffer||(e=e||this._data)&&(this._buffer?this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e),this._data=e):this._updatable?(this._buffer=this._engine.createDynamicVertexBuffer(e),this._data=e):this._buffer=this._engine.createVertexBuffer(e))},Buffer$1.prototype._rebuild=function(){this._buffer=null,this.create(this._data)},Buffer$1.prototype.update=function(e){this.create(e)},Buffer$1.prototype.updateDirectly=function(e,t,i,n){void 0===n&&(n=!1),this._buffer&&this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e,n?t:t*Float32Array.BYTES_PER_ELEMENT,i?i*this.byteStride:void 0),this._data=0===t&&void 0===i?e:null)},Buffer$1.prototype._increaseReferences=function(){this._buffer&&(this._isAlreadyOwned?this._buffer.references++:this._isAlreadyOwned=!0)},Buffer$1.prototype.dispose=function(){this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null,this._data=null)},Object.defineProperty(VertexBuffer.prototype,"instanceDivisor",{get:function(){return this._instanceDivisor},set:function(e){this._instanceDivisor=e,this._instanced=0!=e,this._computeHashCode()},enumerable:!1,configurable:!0}),VertexBuffer.prototype._computeHashCode=function(){this.hashCode=(this.type-5120<<0)+((this.normalized?1:0)<<3)+(this._size<<4)+((this._instanced?1:0)<<6)+(this.byteStride<<12)},VertexBuffer.prototype._rebuild=function(){this._buffer&&this._buffer._rebuild()},VertexBuffer.prototype.getKind=function(){return this._kind},VertexBuffer.prototype.isUpdatable=function(){return this._buffer.isUpdatable()},VertexBuffer.prototype.getData=function(){return this._buffer.getData()},VertexBuffer.prototype.getFloatData=function(e,t){var i=this.getData();if(!i)return null;var n=this.getSize()*VertexBuffer.GetTypeByteLength(this.type),r=e*this.getSize();if(this.type!==VertexBuffer.FLOAT||this.byteStride!==n){var o=new Float32Array(r);return this.forEach(r,(function(e,t){return o[t]=e})),o}if(!(i instanceof Array||i instanceof Float32Array)||0!==this.byteOffset||i.length!==r){if(i instanceof Array){var a=this.byteOffset/4;return i.slice(a,a+r)}if(i instanceof ArrayBuffer)return new Float32Array(i,this.byteOffset,r);a=i.byteOffset+this.byteOffset;if(t){var s=new Float32Array(r),l=new Float32Array(i.buffer,a,r);return s.set(l),s}var u=a%4;return u&&(a=Math.max(0,a-u)),new Float32Array(i.buffer,a,r)}return t?i.slice():i},VertexBuffer.prototype.getBuffer=function(){return this._buffer.getBuffer()},VertexBuffer.prototype.getStrideSize=function(){return this.byteStride/VertexBuffer.GetTypeByteLength(this.type)},VertexBuffer.prototype.getOffset=function(){return this.byteOffset/VertexBuffer.GetTypeByteLength(this.type)},VertexBuffer.prototype.getSize=function(e){return void 0===e&&(e=!1),e?this._size*VertexBuffer.GetTypeByteLength(this.type):this._size},VertexBuffer.prototype.getIsInstanced=function(){return this._instanced},VertexBuffer.prototype.getInstanceDivisor=function(){return this._instanceDivisor},VertexBuffer.prototype.create=function(e){this._buffer.create(e)},VertexBuffer.prototype.update=function(e){this._buffer.update(e)},VertexBuffer.prototype.updateDirectly=function(e,t,i){void 0===i&&(i=!1),this._buffer.updateDirectly(e,t,void 0,i)},VertexBuffer.prototype.dispose=function(){this._ownsBuffer&&this._buffer.dispose()},VertexBuffer.prototype.forEach=function(e,t){VertexBuffer.ForEach(this._buffer.getData(),this.byteOffset,this.byteStride,this._size,this.type,e,this.normalized,t)},VertexBuffer.DeduceStride=function(e){switch(e){case VertexBuffer.UVKind:case VertexBuffer.UV2Kind:case VertexBuffer.UV3Kind:case VertexBuffer.UV4Kind:case VertexBuffer.UV5Kind:case VertexBuffer.UV6Kind:return 2;case VertexBuffer.NormalKind:case VertexBuffer.PositionKind:return 3;case VertexBuffer.ColorKind:case VertexBuffer.MatricesIndicesKind:case VertexBuffer.MatricesIndicesExtraKind:case VertexBuffer.MatricesWeightsKind:case VertexBuffer.MatricesWeightsExtraKind:case VertexBuffer.TangentKind:return 4;default:throw new Error("Invalid kind '"+e+"'")}},VertexBuffer.GetTypeByteLength=function(e){switch(e){case VertexBuffer.BYTE:case VertexBuffer.UNSIGNED_BYTE:return 1;case VertexBuffer.SHORT:case VertexBuffer.UNSIGNED_SHORT:return 2;case VertexBuffer.INT:case VertexBuffer.UNSIGNED_INT:case VertexBuffer.FLOAT:return 4;default:throw new Error("Invalid type '".concat(e,"'"))}},VertexBuffer.ForEach=function(e,t,i,n,r,o,a,s){if(e instanceof Array)for(var l=t/4,u=i/4,c=0;c<o;c+=n){for(var h=0;h<n;h++)s(e[l+h],c+h);l+=u}else{var d=e instanceof ArrayBuffer?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),f=VertexBuffer.GetTypeByteLength(r);for(c=0;c<o;c+=n){var p=t;for(h=0;h<n;h++){s(VertexBuffer._GetFloatValue(d,r,p,a),c+h),p+=f}t+=i}}},VertexBuffer._GetFloatValue=function(e,t,i,n){switch(t){case VertexBuffer.BYTE:var r=e.getInt8(i);return n&&(r=Math.max(r/127,-1)),r;case VertexBuffer.UNSIGNED_BYTE:r=e.getUint8(i);return n&&(r/=255),r;case VertexBuffer.SHORT:r=e.getInt16(i,!0);return n&&(r=Math.max(r/32767,-1)),r;case VertexBuffer.UNSIGNED_SHORT:r=e.getUint16(i,!0);return n&&(r/=65535),r;case VertexBuffer.INT:return e.getInt32(i,!0);case VertexBuffer.UNSIGNED_INT:return e.getUint32(i,!0);case VertexBuffer.FLOAT:return e.getFloat32(i,!0);default:throw new Error("Invalid component type ".concat(t))}},VertexBuffer._Counter=0,VertexBuffer.BYTE=5120,VertexBuffer.UNSIGNED_BYTE=5121,VertexBuffer.SHORT=5122,VertexBuffer.UNSIGNED_SHORT=5123,VertexBuffer.INT=5124,VertexBuffer.UNSIGNED_INT=5125,VertexBuffer.FLOAT=5126,VertexBuffer.PositionKind="position",VertexBuffer.NormalKind="normal",VertexBuffer.TangentKind="tangent",VertexBuffer.UVKind="uv",VertexBuffer.UV2Kind="uv2",VertexBuffer.UV3Kind="uv3",VertexBuffer.UV4Kind="uv4",VertexBuffer.UV5Kind="uv5",VertexBuffer.UV6Kind="uv6",VertexBuffer.ColorKind="color",VertexBuffer.ColorInstanceKind="instanceColor",VertexBuffer.MatricesIndicesKind="matricesIndices",VertexBuffer.MatricesWeightsKind="matricesWeights",VertexBuffer.MatricesIndicesExtraKind="matricesIndicesExtra",VertexBuffer.MatricesWeightsExtraKind="matricesWeightsExtra",R$12.toPixelFormat=function(e){switch(e){case V$12.RED:return _0x333f62.TEXTUREFORMAT_RED;case V$12.RED_INTEGER:return _0x333f62.TEXTUREFORMAT_RED_INTEGER;case V$12.RGB:return _0x333f62.TEXTUREFORMAT_RGB;case V$12.RGBA:return _0x333f62.TEXTUREFORMAT_RGBA;case V$12.LUMINANCE_ALPHA:return _0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA;case V$12.ALPHA:return _0x333f62.TEXTUREFORMAT_ALPHA;case V$12.LUMINANCE:return _0x333f62.TEXTUREFORMAT_LUMINANCE;case V$12.DEPTH_COMPONENT16:return _0x333f62.TEXTUREFORMAT_DEPTH16;case V$12.DEPTH_COMPONENT:return _0x333f62.TEXTUREFORMAT_DEPTH24;case V$12.DEPTH_COMPONENT32F:return _0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT;case V$12.DEPTH_STENCIL:return _0x333f62.TEXTUREFORMAT_DEPTH24_STENCIL8;case V$12.RGBA_DXT1:return _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1;case V$12.RGBA_DXT3:return _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3;case V$12.RGBA_DXT5:return _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5;case V$12.RGB_DXT1:return _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1;case V$12.RGBA_PVRTC_2BPPV1:case V$12.RGBA_PVRTC_4BPPV1:case V$12.RGB_ETC1:case V$12.RGB_PVRTC_2BPPV1:case V$12.RGB_PVRTC_4BPPV1:default:return 1}},R$12.toPixelType=function(e){switch(e){case _$_.FLOAT:return _0x333f62.TEXTURETYPE_FLOAT;case _$_.HALF_FLOAT:return _0x333f62.TEXTURETYPE_HALF_FLOAT;case _$_.UNSIGNED_BYTE:return _0x333f62.TEXTURETYPE_UNSIGNED_BYTE;case _$_.UNSIGNED_INT:return _0x333f62.TEXTURETYPE_UNSIGNED_INT;case _$_.UNSIGNED_INT_24_8:return _0x333f62.TEXTURETYPE_UNSIGNED_INT_24_8;case _$_.UNSIGNED_SHORT:return _0x333f62.TEXTURETYPE_UNSIGNED_SHORT;case _$_.UNSIGNED_SHORT_4_4_4_4:return _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4;case _$_.UNSIGNED_SHORT_5_5_5_1:return _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1;case _$_.UNSIGNED_SHORT_5_6_5:return _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;default:return _0x333f62.TEXTURETYPE_UNDEFINED}},R$12.toSamplerMode=function(e,t){var i=e==_$_.FLOAT||e==_$_.HALF_FLOAT;if(t.magnificationFilter==rt$k.NEAREST){if(t.minificationFilter==tt$i.NEAREST)return _0x333f62.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==tt$i.LINEAR)return _0x333f62.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==tt$i.NEAREST_MIPMAP_NEAREST)return _0x333f62.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==tt$i.LINEAR_MIPMAP_NEAREST)return _0x333f62.TEXTURE_NEAREST_SAMPLINGMODE}else{if(t.magnificationFilter!=rt$k.LINEAR)return console.log("EnumConvertor.toSamplerMode unsupported type"),_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE;if(t.minificationFilter==tt$i.NEAREST)return i?_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE:_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==tt$i.LINEAR)return i?_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE:_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==tt$i.NEAREST_MIPMAP_NEAREST)return i?_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE:_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==tt$i.LINEAR_MIPMAP_NEAREST)return i?_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE:_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE;if(t.minificationFilter==tt$i.LINEAR_MIPMAP_LINEAR)return i?_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE:_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR}},R$12.toAddressMode=function(e){switch(e){case q$1a.CLAMP_TO_EDGE:return _0x333f62.TEXTURE_CLAMP_ADDRESSMODE;case q$1a.REPEAT:return _0x333f62.TEXTURE_WRAP_ADDRESSMODE;case q$1a.MIRRORED_REPEAT:return _0x333f62.TEXTURE_MIRROR_ADDRESSMODE;default:return _0x333f62.TEXTURE_CLAMP_ADDRESSMODE}},R$12.toFillMode=function(e){switch(e){case W$18.TRIANGLES:return _0x333f62.MATERIAL_TriangleFillMode;case W$18.POINTS:return _0x333f62.MATERIAL_PointFillMode;case W$18.LINES:return _0x333f62.MATERIAL_WireFrameFillMode;case W$18.LINE_STRIP:return _0x333f62.MATERIAL_LineStripDrawMode;default:return console.log("EnumConvertor.toFillMode unsupported type"),_0x333f62.MATERIAL_TriangleFillMode}},R$12.toCullFace=function(e){switch(e){case de$y.FRONT:return 2;case de$y.BACK:default:return 1}},R$12.toFrontFace=function(e,t){switch(e){case de$y.CCW:return t?2:1;case de$y.CW:return t?1:2;default:return 1}},R$12.toVertexBufferDataType=function(e){switch(e){case S$14.BYTE:return VertexBuffer.BYTE;case S$14.UNSIGNED_BYTE:return VertexBuffer.UNSIGNED_BYTE;case S$14.SHORT:return VertexBuffer.SHORT;case S$14.UNSIGNED_SHORT:return VertexBuffer.UNSIGNED_SHORT;case S$14.INT:return VertexBuffer.INT;case S$14.UNSIGNED_INT:return VertexBuffer.UNSIGNED_INT;case S$14.FLOAT:return VertexBuffer.FLOAT;default:throw console.log("EnumConvertor.toVertexBufferDataType unsupported type"),new t$15("componentDatatype is not a valid value.")}},n$12.applyFrontFace=function(e,t,i){e._depthCullingState.frontFace=R$12.toFrontFace(t.frontFace,i)},n$12.applyCull=function(e,t){var i=t.cull;i.enabled?(e._depthCullingState.cull=!0,e._depthCullingState.cullFace=R$12.toCullFace(i.face)):(e._depthCullingState.cull=!1,e._depthCullingState.cullFace=0)},n$12.applyLineWidth=function(e,t){},n$12.applyPolygonOffset=function(e,t){var i=t.polygonOffset;i.enabled?(e.setZOffset(i.factor),e.setZOffsetUnits(i.units)):(e.setZOffset(0),e.setZOffsetUnits(0))},n$12.applyScissorTest=function(e,t,i){var n=t.scissorTest;if(e$2e(i.scissorTest)?i.scissorTest.enabled:n.enabled){var r=e$2e(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.enableScissor(r.x,r.y,r.width,r.height)}else e.disableScissor()},n$12.applyDepthRange=function(e,t){},n$12.applyDepthTest=function(e,t){var i=t.depthTest,n=i.enabled;e.setDepthBuffer(n),n&&e.setDepthFunction(i.func)},n$12.applyColorMask=function(e,t){var i=t.colorMask;e.setColorWrite(i.red)},n$12.applyDepthMask=function(e,t){e.setDepthWrite(t.depthMask)},n$12.applyStencilMask=function(e,t){var i=t.stencilMask;i<0&&(i=255),e.setStencilMask(i)},n$12.applyBlendingColor=function(e,t){e.setAlphaConstants(t.red,t.green,t.blue,t.alpha)},n$12.applyBlending=function(e,t,i){var n=t.blending;(e$2e(i.blendingEnabled)?i.blendingEnabled:n.enabled)?(n$12.applyBlendingColor(e,n.color),e._alphaState.setAlphaEquationParameters(n.equationRgb,n.equationAlpha),e._alphaState.setAlphaBlendFunctionParameters(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha),e._alphaState.alphaBlend=!0):e.setAlphaMode(_0x333f62.ALPHA_DISABLE)},n$12.applyStencilTest=function(e,t){var i=t.stencilTest,n=i.enabled;if(e.setStencilBuffer(n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.setStencilFunction(_0x4257c2.FRONT,r);var l=i.frontOperation;e.setStencilOperationFail(_0x4257c2.FRONT,l.fail),e.setStencilOperationDepthFail(_0x4257c2.FRONT,l.zFail),e.setStencilOperationPass(_0x4257c2.FRONT,l.zPass),e.setStencilFunction(_0x4257c2.BACK,o);var u=i.backOperation;e.setStencilOperationFail(_0x4257c2.BACK,u.fail),e.setStencilOperationDepthFail(_0x4257c2.BACK,u.zFail),e.setStencilOperationPass(_0x4257c2.BACK,u.zPass),e.setStencilFunctionReference(a),e.setStencilFunctionMask(s)}},n$12.applySampleCoverage=function(e,t){};var S$Y=new f$1a;function t$Z(){}function l$19(e,t,i){i?e.enable(t):e.disable(t)}n$12.applyViewport=function(e,t,i,n,r){var o=u$Z(t.viewport,i.viewport);e$2e(o)||((o=S$Y).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight);var a=u$Z(n,i.context.drawingBufferWidth),s=u$Z(r,i.context.drawingBufferHeight);i.context.uniformState.viewport=o;var l={x:o.x/a,y:o.y/s,width:o.width/a,height:o.height/s};e.setViewport(l,n,r)},t$Z.applyFrontFace=function(e,t,i){e.frontFace(t.frontFace)},t$Z.applyCull=function(e,t){var i=t.cull,n=i.enabled;l$19(e,e.CULL_FACE,n),n&&e.cullFace(i.face)},t$Z.applyLineWidth=function(e,t){e.lineWidth(t.lineWidth)},t$Z.applyPolygonOffset=function(e,t){var i=t.polygonOffset,n=i.enabled;l$19(e,e.POLYGON_OFFSET_FILL,n),n&&e.polygonOffset(i.factor,i.units)},t$Z.applyScissorTest=function(e,t,i){var n=t.scissorTest,r=e$2e(i.scissorTest)?i.scissorTest.enabled:n.enabled;if(l$19(e,e.SCISSOR_TEST,r),r){var o=e$2e(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.scissor(o.x,o.y,o.width,o.height)}},t$Z.applyDepthRange=function(e,t){var i=t.depthRange;e.depthRange(i.near,i.far)},t$Z.applyDepthTest=function(e,t){var i=t.depthTest,n=i.enabled;l$19(e,e.DEPTH_TEST,n),n&&e.depthFunc(i.func)},t$Z.applyColorMask=function(e,t){var i=t.colorMask;e.colorMask(i.red,i.green,i.blue,i.alpha)},t$Z.applyDepthMask=function(e,t){e.depthMask(t.depthMask)},t$Z.applyStencilMask=function(e,t){e.stencilMask(t.stencilMask)},t$Z.applyBlendingColor=function(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)},t$Z.applyBlending=function(e,t,i){var n=t.blending,r=e$2e(i.blendingEnabled)?i.blendingEnabled:n.enabled;l$19(e,e.BLEND,r),r&&(t$Z.applyBlendingColor(e,n.color),e.blendEquationSeparate(n.equationRgb,n.equationAlpha),e.blendFuncSeparate(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha))},t$Z.applyStencilTest=function(e,t){var i=t.stencilTest,n=i.enabled;if(l$19(e,e.STENCIL_TEST,n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.stencilFunc(r,a,s),e.stencilFuncSeparate(e.BACK,o,a,s),e.stencilFuncSeparate(e.FRONT,r,a,s);var l=i.frontOperation,u=l.fail,c=l.zFail,h=l.zPass;e.stencilOpSeparate(e.FRONT,u,c,h);var d=i.backOperation,f=d.fail,p=d.zFail,_=d.zPass;e.stencilOpSeparate(e.BACK,f,p,_)}},t$Z.applySampleCoverage=function(e,t){var i=t.sampleCoverage,n=i.enabled;l$19(e,e.SAMPLE_COVERAGE,n),n&&e.sampleCoverage(i.value,i.invert)};var S$X=new f$1a;function F$18(e){return e===de$y.FUNC_ADD||e===de$y.FUNC_SUBTRACT||e===de$y.FUNC_REVERSE_SUBTRACT||e===de$y.MIN||e===de$y.MAX}function E$1e(e){return e===de$y.ZERO||e===de$y.ONE||e===de$y.SRC_COLOR||e===de$y.ONE_MINUS_SRC_COLOR||e===de$y.DST_COLOR||e===de$y.ONE_MINUS_DST_COLOR||e===de$y.SRC_ALPHA||e===de$y.ONE_MINUS_SRC_ALPHA||e===de$y.DST_ALPHA||e===de$y.ONE_MINUS_DST_ALPHA||e===de$y.CONSTANT_COLOR||e===de$y.ONE_MINUS_CONSTANT_COLOR||e===de$y.CONSTANT_ALPHA||e===de$y.ONE_MINUS_CONSTANT_ALPHA||e===de$y.SRC_ALPHA_SATURATE}function W$12(e){return e===de$y.FRONT||e===de$y.BACK||e===de$y.FRONT_AND_BACK}function U$17(e){return e===de$y.NEVER||e===de$y.LESS||e===de$y.EQUAL||e===de$y.LEQUAL||e===de$y.GREATER||e===de$y.NOTEQUAL||e===de$y.GEQUAL||e===de$y.ALWAYS}function _$Y(e){return e===de$y.NEVER||e===de$y.LESS||e===de$y.EQUAL||e===de$y.LEQUAL||e===de$y.GREATER||e===de$y.NOTEQUAL||e===de$y.GEQUAL||e===de$y.ALWAYS}function m$16(e){return e===de$y.ZERO||e===de$y.KEEP||e===de$y.REPLACE||e===de$y.INCR||e===de$y.DECR||e===de$y.INVERT||e===de$y.INCR_WRAP||e===de$y.DECR_WRAP}function d$1m(e){var t=u$Z(e,{}),i=u$Z(t.cull,{}),n=u$Z(t.polygonOffset,{}),r=u$Z(t.scissorTest,{}),o=u$Z(r.rectangle,{}),a=u$Z(t.depthRange,{}),s=u$Z(t.depthTest,{}),l=u$Z(t.colorMask,{}),u=u$Z(t.blending,{}),c=u$Z(u.color,{}),h=u$Z(t.stencilTest,{}),d=u$Z(h.frontOperation,{}),f=u$Z(h.backOperation,{}),p=u$Z(t.sampleCoverage,{}),_=t.viewport;if(this.frontFace=u$Z(t.frontFace,W$13.COUNTER_CLOCKWISE),this.cull={enabled:u$Z(i.enabled,!1),face:u$Z(i.face,de$y.BACK)},this.lineWidth=u$Z(t.lineWidth,1),this.polygonOffset={enabled:u$Z(n.enabled,!1),factor:u$Z(n.factor,0),units:u$Z(n.units,0)},this.scissorTest={enabled:u$Z(r.enabled,!1),rectangle:f$1a.clone(o)},this.depthRange={near:u$Z(a.near,0),far:u$Z(a.far,1)},this.depthTest={enabled:u$Z(s.enabled,!1),func:u$Z(s.func,de$y.LESS)},this.colorMask={red:u$Z(l.red,!0),green:u$Z(l.green,!0),blue:u$Z(l.blue,!0),alpha:u$Z(l.alpha,!0)},this.depthMask=u$Z(t.depthMask,!0),this.stencilMask=u$Z(t.stencilMask,65535),this.blending={enabled:u$Z(u.enabled,!1),color:new e$1X(u$Z(c.red,0),u$Z(c.green,0),u$Z(c.blue,0),u$Z(c.alpha,0)),equationRgb:u$Z(u.equationRgb,de$y.FUNC_ADD),equationAlpha:u$Z(u.equationAlpha,de$y.FUNC_ADD),functionSourceRgb:u$Z(u.functionSourceRgb,de$y.ONE),functionSourceAlpha:u$Z(u.functionSourceAlpha,de$y.ONE),functionDestinationRgb:u$Z(u.functionDestinationRgb,de$y.ZERO),functionDestinationAlpha:u$Z(u.functionDestinationAlpha,de$y.ZERO)},this.stencilTest={enabled:u$Z(h.enabled,!1),frontFunction:u$Z(h.frontFunction,de$y.ALWAYS),backFunction:u$Z(h.backFunction,de$y.ALWAYS),reference:u$Z(h.reference,0),mask:u$Z(h.mask,65535),frontOperation:{fail:u$Z(d.fail,de$y.KEEP),zFail:u$Z(d.zFail,de$y.KEEP),zPass:u$Z(d.zPass,de$y.KEEP)},backOperation:{fail:u$Z(f.fail,de$y.KEEP),zFail:u$Z(f.zFail,de$y.KEEP),zPass:u$Z(f.zPass,de$y.KEEP)}},this.sampleCoverage={enabled:u$Z(p.enabled,!1),value:u$Z(p.value,1),invert:u$Z(p.invert,!1)},this.viewport=e$2e(_)?new f$1a(_.x,_.y,_.width,_.height):void 0,this.lineWidth<e$1W.minimumAliasedLineWidth||this.lineWidth>e$1W.maximumAliasedLineWidth)throw new t$15("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!W$13.validate(this.frontFace))throw new t$15("Invalid renderState.frontFace.");if(!W$12(this.cull.face))throw new t$15("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new t$15("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new t$15("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new t$15("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new t$15("renderState.depthRange.far must be less than or equal to one.");if(!U$17(this.depthTest.func))throw new t$15("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new t$15("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!F$18(this.blending.equationRgb))throw new t$15("Invalid renderState.blending.equationRgb.");if(!F$18(this.blending.equationAlpha))throw new t$15("Invalid renderState.blending.equationAlpha.");if(!E$1e(this.blending.functionSourceRgb))throw new t$15("Invalid renderState.blending.functionSourceRgb.");if(!E$1e(this.blending.functionSourceAlpha))throw new t$15("Invalid renderState.blending.functionSourceAlpha.");if(!E$1e(this.blending.functionDestinationRgb))throw new t$15("Invalid renderState.blending.functionDestinationRgb.");if(!E$1e(this.blending.functionDestinationAlpha))throw new t$15("Invalid renderState.blending.functionDestinationAlpha.");if(!_$Y(this.stencilTest.frontFunction))throw new t$15("Invalid renderState.stencilTest.frontFunction.");if(!_$Y(this.stencilTest.backFunction))throw new t$15("Invalid renderState.stencilTest.backFunction.");if(!m$16(this.stencilTest.frontOperation.fail))throw new t$15("Invalid renderState.stencilTest.frontOperation.fail.");if(!m$16(this.stencilTest.frontOperation.zFail))throw new t$15("Invalid renderState.stencilTest.frontOperation.zFail.");if(!m$16(this.stencilTest.frontOperation.zPass))throw new t$15("Invalid renderState.stencilTest.frontOperation.zPass.");if(!m$16(this.stencilTest.backOperation.fail))throw new t$15("Invalid renderState.stencilTest.backOperation.fail.");if(!m$16(this.stencilTest.backOperation.zFail))throw new t$15("Invalid renderState.stencilTest.backOperation.zFail.");if(!m$16(this.stencilTest.backOperation.zPass))throw new t$15("Invalid renderState.stencilTest.backOperation.zPass.");if(e$2e(this.viewport)){if(this.viewport.width<0)throw new t$15("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new t$15("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>e$1W.maximumViewportWidth)throw new t$15("renderState.viewport.width must be less than or equal to the maximum viewport width ("+e$1W.maximumViewportWidth.toString()+"). Check maximumViewportWidth.");if(this.viewport.height>e$1W.maximumViewportHeight)throw new t$15("renderState.viewport.height must be less than or equal to the maximum viewport height ("+e$1W.maximumViewportHeight.toString()+"). Check maximumViewportHeight.")}this.id=0,this._applyFunctions=[]}t$Z.applyViewport=function(e,t,i,n,r){var o=u$Z(t.viewport,i.viewport);e$2e(o)||((o=S$X).width=i.context.drawingBufferWidth,o.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=o,e.viewport(o.x,o.y,o.width,o.height)};var q$19=0,g$1b={};function B$10(e,t,i){(e?n$12:t$Z).applyFrontFace(t,i)}function K$X(e,t,i){(e?n$12:t$Z).applyCull(t,i)}function V$11(e,t,i){(e?n$12:t$Z).applyLineWidth(t,i)}function H$15(e,t,i){(e?n$12:t$Z).applyPolygonOffset(t,i)}function Q$13(e,t,i){(e?n$12:t$Z).applyDepthRange(t,i)}function G$1h(e,t,i){(e?n$12:t$Z).applyDepthTest(t,i)}function J$10(e,t,i){(e?n$12:t$Z).applyColorMask(t,i)}function Y$R(e,t,i){(e?n$12:t$Z).applyDepthMask(t,i)}function Z$12(e,t,i){(e?n$12:t$Z).applyStencilMask(t,i)}function X$_(e,t,i){(e?n$12:t$Z).applyStencilTest(t,i)}function j$1b(e,t,i){(e?n$12:t$Z).applySampleCoverage(t,i)}function $$$(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(B$10),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&i.push(K$X),e.lineWidth!==t.lineWidth&&i.push(V$11),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&i.push(H$15),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&i.push(Q$13),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&i.push(G$1h),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&i.push(J$10),e.depthMask!==t.depthMask&&i.push(Y$R),e.stencilMask!==t.stencilMask&&i.push(Z$12),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&i.push(X$_),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&i.push(j$1b),i}d$1m.fromCache=function(e){var t=JSON.stringify(e),i=g$1b[t];if(e$2e(i))return++i.referenceCount,i.state;var n=new d$1m(e),r=JSON.stringify(n);return e$2e(i=g$1b[r])||(n.id=q$19++,i={referenceCount:0,state:n=c$16(n)},g$1b[r]=i),++i.referenceCount,g$1b[t]={referenceCount:1,state:i.state},i.state},d$1m.removeFromCache=function(e){var t=new d$1m(e),i=JSON.stringify(t),n=g$1b[i],r=JSON.stringify(e),o=g$1b[r];e$2e(o)&&(--o.referenceCount,0===o.referenceCount&&(delete g$1b[r],e$2e(n)&&--n.referenceCount)),e$2e(n)&&0===n.referenceCount&&delete g$1b[i]},d$1m.getCache=function(){return g$1b},d$1m.clearCache=function(){g$1b={}},d$1m.apply=function(e,t,i){const n=e$2e(e.name)?n$12:t$Z;n.applyFrontFace(e,t),n.applyCull(e,t),n.applyLineWidth(e,t),n.applyPolygonOffset(e,t),n.applyDepthRange(e,t),n.applyDepthTest(e,t),n.applyColorMask(e,t),n.applyDepthMask(e,t),n.applyStencilMask(e,t),n.applyStencilTest(e,t),n.applySampleCoverage(e,t),n.applyScissorTest(e,t,i),n.applyBlending(e,t,i),n.applyViewport(e,t,i)},d$1m.partialApply=function(e,t,i,n,r,o,a,s,l,u,c){const h=e$2e(e.name),d=h?n$12:t$Z;if(t!==i){var f=i._applyFunctions[t.id];e$2e(f)||(f=$$$(t,i),i._applyFunctions[t.id]=f);for(var p=f.length,_=0;_<p;++_)f[_](h,e,i)}((e$2e(n.scissorTest)?n.scissorTest:t.scissorTest)!==(e$2e(r.scissorTest)?r.scissorTest:i.scissorTest)||s)&&d.applyScissorTest(e,i,r);var m=e$2e(n.blendingEnabled)?n.blendingEnabled:t.blending.enabled,g=e$2e(r.blendingEnabled)?r.blendingEnabled:i.blending.enabled;(m!==g||g&&t.blending!==i.blending)&&d.applyBlending(e,i,r),(t!==i||n!==r||n.context!==r.context||o!==a)&&d.applyViewport(e,i,r,l,u)},d$1m.getState=function(e){if(!e$2e(e))throw new t$15("renderState is required.");return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:f$1a.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:e$1X.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:e$2e(e.viewport)?f$1a.clone(e.viewport):void 0}};var o$1b=new o$1p;function n$11(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var a$Y={};a$Y[de$y.FLOAT]="float",a$Y[de$y.FLOAT_VEC2]="vec2",a$Y[de$y.FLOAT_VEC3]="vec3",a$Y[de$y.FLOAT_VEC4]="vec4",a$Y[de$y.INT]="int",a$Y[de$y.INT_VEC2]="ivec2",a$Y[de$y.INT_VEC3]="ivec3",a$Y[de$y.INT_VEC4]="ivec4",a$Y[de$y.BOOL]="bool",a$Y[de$y.BOOL_VEC2]="bvec2",a$Y[de$y.BOOL_VEC3]="bvec3",a$Y[de$y.BOOL_VEC4]="bvec4",a$Y[de$y.FLOAT_MAT2]="mat2",a$Y[de$y.FLOAT_MAT3]="mat3",a$Y[de$y.FLOAT_MAT4]="mat4",a$Y[de$y.SAMPLER_2D]="sampler2D",a$Y[de$y.SAMPLER_CUBE]="samplerCube",n$11.prototype.getDeclaration=function(e){var t="uniform "+a$Y[this._datatype]+" "+e,i=this._size;return t+=1===i?";":"["+i.toString()+"];"};var i$_={};i$_[de$y.FLOAT]="f32",i$_[de$y.FLOAT_VEC2]="vec2<f32>",i$_[de$y.FLOAT_VEC3]="vec3<f32>",i$_[de$y.FLOAT_VEC4]="vec4<f32>",i$_[de$y.INT]="i32",i$_[de$y.INT_VEC2]="vec2<i32>",i$_[de$y.INT_VEC3]="vec3<i32>",i$_[de$y.INT_VEC4]="vec4<i32>",i$_[de$y.BOOL]="bool",i$_[de$y.BOOL_VEC2]="vec2<bool>",i$_[de$y.BOOL_VEC3]="vec3<bool>",i$_[de$y.BOOL_VEC4]="vec4<bool>",i$_[de$y.FLOAT_MAT2]="mat2x2<f32>",i$_[de$y.FLOAT_MAT3]="mat3x3<f32>",i$_[de$y.FLOAT_MAT4]="mat4x4<f32>",i$_[de$y.SAMPLER_2D]="texture_2d<f32>",i$_[de$y.SAMPLER_CUBE]="texture_cube<f32>",n$11.prototype.getWgslDeclaration=function(e){var t="";return this._datatype==de$y.SAMPLER_2D||this._datatype==de$y.SAMPLER_CUBE?(t+="var "+e+" : "+i$_[this._datatype]+";\n",t+="var "+e+"Sampler : sampler;"):t+="uniform "+e+" : "+i$_[this._datatype]+";",t};var l$18={czm_viewport:new n$11({size:1,datatype:de$y.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new n$11({size:1,datatype:de$y.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_model:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new n$11({size:1,datatype:de$y.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight2D:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_entireFrustum:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new n$11({size:1,datatype:de$y.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_cameraPositionWC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e._cameraPosition}}),czm_viewerPositionWC:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return p$1d.getTranslation(e.inverseView,o$1b)}}),czm_viewerPositionECEF:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return p$1d.getTranslation(e.inverseView,o$1b),o$1p.add(o$1b,e._relativeOrigin,o$1b),o$1b}}),czm_frameNumber:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new n$11({size:1,datatype:de$y.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new n$11({size:1,datatype:de$y.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new n$11({size:1,datatype:de$y.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new n$11({size:1,datatype:de$y.SAMPLER_2D,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapSize:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.specularEnvironmentMapsDimensions}}),czm_specularEnvironmentMapsMaximumLOD:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new n$11({size:9,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new n$11({size:1,datatype:de$y.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_resolutionScale:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.resolutionScale}}),czm_fogDensity:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.fogDensity}}),czm_imagerySplitPosition:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.imagerySplitPosition}}),czm_globeSplitPosition:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.globeSplitPosition}}),czm_geometricToleranceOverMeter:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new n$11({size:1,datatype:de$y.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.gamma}}),czm_sunColor:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.sunColor}}),czm_globeDepthTextureDim:new n$11({size:1,datatype:de$y.FLOAT_VEC2,getValue:function(e){return e.globeDepthTextureDim}}),czm_nonSelDepthTexture:new n$11({size:1,datatype:de$y.SAMPLER_2D,getValue:function(e){return e.nonSelDepthTexture}}),czm_maskTexture:new n$11({size:1,datatype:de$y.SAMPLER_2D,getValue:function(e){return e.maskTexture}}),czm_relativeOrigin:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e._relativeOrigin}}),czm_hdrEnvMap:new n$11({size:1,datatype:de$y.SAMPLER_2D,getValue:function(e){return e.hdrEnvMap}}),czm_toneMappingExposure:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.toneMappingExposure}}),czm_encodedOriginCameraPositionMCHigh:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.encodedOriginCameraPositionMCHigh}}),czm_encodedOriginCameraPositionMCLow:new n$11({size:1,datatype:de$y.FLOAT_VEC3,getValue:function(e){return e.encodedOriginCameraPositionMCLow}}),czm_eyeHeight:new n$11({size:1,datatype:de$y.FLOAT,getValue:function(e){return e.eyeHeight}})};function I$1m(e,t,i,n){switch(t.type){case e.FLOAT:return new d$1l(e,t,i,n);case e.FLOAT_VEC2:return new p$14(e,t,i,n);case e.FLOAT_VEC3:return new m$15(e,t,i,n);case e.FLOAT_VEC4:return new y$X(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_2D_SHADOW:case e.SAMPLER_CUBE:return new f$12(e,t,i,n);case e.SAMPLER_2D_ARRAY:return new v$T(e,t,i,n);case e.INT:case e.BOOL:return new w$10(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new A$1e(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new x$1b(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new T$15(e,t,i,n);case e.FLOAT_MAT2:return new E$1d(e,t,i,n);case e.FLOAT_MAT3:return new U$16(e,t,i,n);case e.FLOAT_MAT4:return new M$17(e,t,i,n);default:throw new t$13("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function d$1l(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function p$14(e,t,i,n){this.name=i,this.value=void 0,this._value=new o$1o,this._gl=e,this._location=n}function m$15(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function y$X(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function f$12(e,t,i,n){this.name=i,this.value=void 0,this._gl=e,this._location=n,this.textureUnitIndex=void 0}function v$T(e,t,i,n){this.name=i,this.value=void 0,this._gl=e,this._location=n,this.textureUnitIndex=void 0,this.lastBindTextureID=void 0}function w$10(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function A$1e(e,t,i,n){this.name=i,this.value=void 0,this._value=new o$1o,this._gl=e,this._location=n}function x$1b(e,t,i,n){this.name=i,this.value=void 0,this._value=new o$1p,this._gl=e,this._location=n}function T$15(e,t,i,n){this.name=i,this.value=void 0,this._value=new e$2c,this._gl=e,this._location=n}d$1l.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))},p$14.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))},m$15.prototype.set=function(){var e=this.value;if(e$2e(e.red))e$1X.equals(e,this._value)||(this._value=e$1X.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue));else{if(!e$2e(e.x))throw new t$15('Invalid vec3 value for uniform "'+this.name+'".');o$1p.equals(e,this._value)||(this._value=o$1p.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z))}},y$X.prototype.set=function(){var e=this.value;if(e$2e(e.red))e$1X.equals(e,this._value)||(this._value=e$1X.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha));else{if(!e$2e(e.x))throw new t$15('Invalid vec4 value for uniform "'+this.name+'".');e$2c.equals(e,this._value)||(this._value=e$2c.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w))}},f$12.prototype.set=function(){var e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);var t=this.value;e.bindTexture(t._target,t._texture)},f$12.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},v$T.prototype.set=function(){var e=this.value;if(!e$2e(e.id)||this.lastBindTextureID!==e.id){var t=this._gl;t.activeTexture(t.TEXTURE0+this.textureUnitIndex),t.bindTexture(e._target,e._texture),this.lastBindTextureID=e.id}},v$T.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},w$10.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))},A$1e.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))},x$1b.prototype.set=function(){var e=this.value;o$1p.equals(e,this._value)||(o$1p.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))},T$15.prototype.set=function(){var e=this.value;e$2c.equals(e,this._value)||(e$2c.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};var L$1b=new Float32Array(4);function E$1d(e,t,i,n){this.name=i,this.value=void 0,this._value=new f$15,this._gl=e,this._location=n}E$1d.prototype.set=function(){if(!f$15.equalsArray(this.value,this._value,0)){f$15.clone(this.value,this._value);var e=f$15.toArray(this.value,L$1b);this._gl.uniformMatrix2fv(this._location,!1,e)}};var V$10=new Float32Array(9);function U$16(e,t,i,n){this.name=i,this.value=void 0,this._value=new p$1e,this._gl=e,this._location=n}U$16.prototype.set=function(){if(!p$1e.equalsArray(this.value,this._value,0)){p$1e.clone(this.value,this._value);var e=p$1e.toArray(this.value,V$10);this._gl.uniformMatrix3fv(this._location,!1,e)}};var C$1a=new Float32Array(16);function M$17(e,t,i,n){this.name=i,this.value=void 0,this._value=new p$1d,this._gl=e,this._location=n}function V$$(e,t,i,n){switch(t.type){case e.FLOAT:return new A$1d(e,t,i,n);case e.FLOAT_VEC2:return new p$13(e,t,i,n);case e.FLOAT_VEC3:return new w$$(e,t,i,n);case e.FLOAT_VEC4:return new m$14(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new f$11(e,t,i,n);case e.INT:case e.BOOL:return new d$1k(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new F$17(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new T$14(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new U$15(e,t,i,n);case e.FLOAT_MAT2:return new x$1a(e,t,i,n);case e.FLOAT_MAT3:return new E$1c(e,t,i,n);case e.FLOAT_MAT4:return new I$1l(e,t,i,n);default:throw new t$13("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function A$1d(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=e,this._location=n[0]}function p$13(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(2*r),this._gl=e,this._location=n[0]}function w$$(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(3*r),this._gl=e,this._location=n[0]}function m$14(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(4*r),this._gl=e,this._location=n[0]}function f$11(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=e,this._locations=n,this.textureUnitIndex=void 0}function d$1k(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r),this._gl=e,this._location=n[0]}function F$17(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(2*r),this._gl=e,this._location=n[0]}function T$14(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(3*r),this._gl=e,this._location=n[0]}function U$15(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(4*r),this._gl=e,this._location=n[0]}function x$1a(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(4*r),this._gl=e,this._location=n[0]}function E$1c(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(9*r),this._gl=e,this._location=n[0]}function I$1l(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(16*r),this._gl=e,this._location=n[0]}M$17.prototype.set=function(){if(!p$1d.equalsArray(this.value,this._value,0)){p$1d.clone(this.value,this._value);var e=p$1d.toArray(this.value,C$1a);this._gl.uniformMatrix4fv(this._location,!1,e)}},A$1d.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;r<t;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._gl.uniform1fv(this._location,i)},p$13.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1o.equalsArray(a,i,r)||(o$1o.pack(a,i,r),n=!0),r+=2}n&&this._gl.uniform2fv(this._location,i)},w$$.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(e$2e(a.red))(a.red!==i[r]||a.green!==i[r+1]||a.blue!==i[r+2])&&(i[r]=a.red,i[r+1]=a.green,i[r+2]=a.blue,n=!0);else{if(!e$2e(a.x))throw new t$15("Invalid vec3 value.");o$1p.equalsArray(a,i,r)||(o$1p.pack(a,i,r),n=!0)}r+=3}n&&this._gl.uniform3fv(this._location,i)},m$14.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(e$2e(a.red))e$1X.equalsArray(a,i,r)||(e$1X.pack(a,i,r),n=!0);else{if(!e$2e(a.x))throw new t$15("Invalid vec4 value.");e$2c.equalsArray(a,i,r)||(e$2c.pack(a,i,r),n=!0)}r+=4}n&&this._gl.uniform4fv(this._location,i)},f$11.prototype.set=function(){for(var e=this._gl,t=e.TEXTURE0+this.textureUnitIndex,i=this.value,n=i.length,r=0;r<n;++r){var o=i[r];e.activeTexture(t+r),e.bindTexture(o._target,o._texture)}},f$11.prototype._setSampler=function(e){this.textureUnitIndex=e;for(var t=this._locations,i=t.length,n=0;n<i;++n){var r=e+n;this._gl.uniform1i(t[n],r)}return e+i},d$1k.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;r<t;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._gl.uniform1iv(this._location,i)},F$17.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1o.equalsArray(a,i,r)||(o$1o.pack(a,i,r),n=!0),r+=2}n&&this._gl.uniform2iv(this._location,i)},T$14.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1p.equalsArray(a,i,r)||(o$1p.pack(a,i,r),n=!0),r+=3}n&&this._gl.uniform3iv(this._location,i)},U$15.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];e$2c.equalsArray(a,i,r)||(e$2c.pack(a,i,r),n=!0),r+=4}n&&this._gl.uniform4iv(this._location,i)},x$1a.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];f$15.equalsArray(a,i,r)||(f$15.pack(a,i,r),n=!0),r+=4}n&&this._gl.uniformMatrix2fv(this._location,!1,i)},E$1c.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];p$1e.equalsArray(a,i,r)||(p$1e.pack(a,i,r),n=!0),r+=9}n&&this._gl.uniformMatrix3fv(this._location,!1,i)},I$1l.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];p$1d.equalsArray(a,i,r)||(p$1d.pack(a,i,r),n=!0),r+=16}n&&this._gl.uniformMatrix4fv(this._location,!1,i)};var E$1b=0;function g$1a(e){var t=C$19(e.vertexShaderText,e.fragmentShaderText);this._context=e.context,this._gl=e.gl,this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=e.attributeLocations,this._transformFeedbackVaryings=e.transformFeedbackVaryings,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._uniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=t.duplicateUniformNames,this._cachedShader=void 0,this._maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=t.fragmentShaderText,this._id=E$1b++,this._uniformBuffersNames={},this._nextUniformBufferPoint=0}function B$$(e){var t=[],i=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(e$2e(i))for(var n=i.length,r=0;r<n;r++){var o=i[r].trim(),a=o.slice(o.lastIndexOf(" ")+1);t.push(a)}return t}function C$19(e,t){var i={};if(!e$1W.highpFloatSupported||!e$1W.highpIntSupported){var n,r,o,a,s=B$$(e),l=B$$(t),u=s.length,c=l.length;for(n=0;n<u;n++)for(r=0;r<c;r++)if(s[n]===l[r]){a="czm_mediump_"+(o=s[n]);var h=new RegExp(o+"\\b","g");t=t.replace(h,a),i[a]=o}}return{fragmentShaderText:t,duplicateUniformNames:i}}g$1a._BaseCache={},Object.defineProperties(g$1a.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return x$19(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return x$19(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return x$19(this),this._uniformsByName}},cachedShader:{get:function(){return this._cachedShader},set:function(e){this._cachedShader=e}},name:{get:function(){return""}},program:{get:function(){return this._program}},maximumTextureUnitIndex:{get:function(){return this._maximumTextureUnitIndex}},id:{get:function(){return this._id}}});var l$17="[SuperMap3D WebGL] ";function F$16(e,t){var i=t._vertexShaderText,n=t._fragmentShaderText,r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,i),e.compileShader(r);var o=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(o,n),e.compileShader(o);var a=e.createProgram();e.attachShader(a,r),e.attachShader(a,o),e.deleteShader(r),e.deleteShader(o);var s,l=t._attributeLocations;if(e$2e(l))for(var u in l)l.hasOwnProperty(u)&&e.bindAttribLocation(a,l[u],u);if(e$2e(t._transformFeedbackVaryings)&&e.transformFeedbackVaryings(a,t._transformFeedbackVaryings,e.SEPARATE_ATTRIBS),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS)){var c=t._debugShaders;if(!e.getShaderParameter(o,e.COMPILE_STATUS)){if(s=e.getShaderInfoLog(o),console.error(l$17+"Fragment shader compile log: "+s),e$2e(c)){var h=c.getTranslatedShaderSource(o);console.error(""!==h?l$17+"Translated fragment shader source:\n"+h:l$17+"Fragment shader translation failed.")}throw e.deleteProgram(a),new t$13("Fragment shader failed to compile. Compile log: "+s)}if(!e.getShaderParameter(r,e.COMPILE_STATUS)){if(s=e.getShaderInfoLog(r),console.error(l$17+"Vertex shader compile log: "+s),e$2e(c)){var d=c.getTranslatedShaderSource(r);console.error(""!==d?l$17+"Translated vertex shader source:\n"+d:l$17+"Vertex shader translation failed.")}throw e.deleteProgram(a),new t$13("Vertex shader failed to compile. Compile log: "+s)}throw s=e.getProgramInfoLog(a),console.error(l$17+"Shader program link log: "+s),e$2e(c)&&(console.error(l$17+"Translated vertex shader source:\n"+c.getTranslatedShaderSource(r)),console.error(l$17+"Translated fragment shader source:\n"+c.getTranslatedShaderSource(o))),e.deleteProgram(a),new t$13("Program failed to link. Link log: "+s)}var f=t._logShaderCompilation;return f&&(e$2e(s=e.getShaderInfoLog(r))&&s.length>0&&console.log(l$17+"Vertex shader compile log: "+s)),f&&(e$2e(s=e.getShaderInfoLog(o))&&s.length>0&&console.log(l$17+"Fragment shader compile log: "+s)),f&&(e$2e(s=e.getProgramInfoLog(a))&&s.length>0&&console.log(l$17+"Shader program link log: "+s)),a}function O$Q(e,t,i){for(var n={},r=0;r<i;++r){var o=e.getActiveAttrib(t,r),a=e.getAttribLocation(t,o.name);n[o.name]={name:o.name,type:o.type,index:a}}return n}function w$_(e,t){for(var i={},n=[],r=[],o=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),a=0;a<o;++a){var s=e.getActiveUniform(t,a),l=-1!==s.name.indexOf("[0]",s.name.length-"[0]".length)?s.name.slice(0,s.name.length-3):s.name;if(0!==l.indexOf("gl_"))if(s.name.indexOf("[")<0){var u=e.getUniformLocation(t,l);if(null!==u){var c=I$1m(e,s,l,u);i[l]=c,n.push(c),c._setSampler&&r.push(c)}}else{var h,d,f,p,_=l.indexOf("[");if(_>=0){if(!e$2e(h=i[l.slice(0,_)]))continue;(d=h._locations).length<=1&&(f=h.value,null!==(p=e.getUniformLocation(t,l))&&(d.push(p),f.push(e.getUniform(t,p))))}else{d=[];for(var m=!1,g=0;g<s.size;++g)null!==(p=e.getUniformLocation(t,l+"["+g+"]"))&&d.push(p),0===g&&null===p&&(m=!0);d.length>0&&!m&&(h=V$$(e,s,l,d),i[l]=h,n.push(h),h._setSampler&&r.push(h))}}}return{uniformsByName:i,uniforms:n,samplerUniforms:r}}function k$10(e,t){var i=[],n=[];for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=r,s=e._duplicateUniformNames[a];e$2e(s)&&(o.name=s,a=s);var l=l$18[a];e$2e(l)?i.push({uniform:o,automaticUniform:l}):n.push(o)}return{automaticUniforms:i,manualUniforms:n}}function R$11(e,t,i){e.useProgram(t);for(var n=0,r=i.length,o=0;o<r;++o)n=i[o]._setSampler(n);return e.useProgram(null),n}function x$19(e){if(!e$2e(e._program)){var t=e._gl,i=F$16(t,e,e._debugShaders),n=t.getProgramParameter(i,t.ACTIVE_ATTRIBUTES),r=w$_(t,i),o=k$10(e,r.uniformsByName);e._program=i,e._numberOfVertexAttributes=n,e._vertexAttributes=O$Q(t,i,n),e._uniformsByName=r.uniformsByName,e._uniforms=r.uniforms,e._automaticUniforms=o.automaticUniforms,e._manualUniforms=o.manualUniforms,e._maximumTextureUnitIndex=R$11(t,i,r.samplerUniforms)}}function V$_(e,t,i){switch(i){case"float":case"f32":return new c$15(e,t);case"vec2":case"vec2<f32>":return new _$X(e,t);case"vec3":case"vec3<f32>":return new m$13(e,t);case"vec4":case"vec4<f32>":return new p$12(e,t);case"texture2D":return new f$10(e,t);case"texture2DArray":return new d$1j(e,t);case"int":case"bool":case"i32":return new y$W(e,t);case"int2":case"bool2":case"vec2<i32>":return new x$18(e,t);case"int3":case"bool3":case"vec3<i32>":return new w$Z(e,t);case"int4":case"bool4":case"vec4<i32>":return new U$14(e,t);case"mat2":case"mat2x2<f32>":return new A$1c(e,t);case"mat3":case"mat3x3<f32>":return new I$1k(e,t);case"mat4":case"mat4x4<f32>":return new q$18(e,t);default:throw new t$13('Unrecognized for uniform "'+t+'".')}}function c$15(e,t){this.name=t,this.value=void 0,this._value=0,this._effect=e}function _$X(e,t){this.name=t,this.value=void 0,this._value=new o$1o,this._effect=e}function m$13(e,t){this.name=t,this.value=void 0,this._value=void 0,this._effect=e}function p$12(e,t){this.name=t,this.value=void 0,this._value=void 0,this._effect=e,this._valueType=-1}function f$10(e,t){this.name=t,this.value=void 0,this._effect=e,this.id=void 0}function d$1j(e,t){this.name=t,this.value=void 0,this._effect=e,this.lastBindTextureID=void 0}function y$W(e,t){this.name=t,this.value=void 0,this._value=0,this._effect=e}function x$18(e,t){this.name=t,this.value=void 0,this._value=new o$1o,this._effect=e}function w$Z(e,t){this.name=t,this.value=void 0,this._value=new o$1p,this._effect=e}function U$14(e,t){this.name=t,this.value=void 0,this._value=new e$2c,this._effect=e}g$1a.prototype._bind=function(){x$19(this),this._gl.useProgram(this._program)},g$1a.prototype._setUniforms=function(e,t,i,n){var r,o;if(e$2e(e)){var a=this._manualUniforms;for(r=a.length,o=0;o<r;++o){var s=a[o];s.value=e[s.name]()}}var l=this._automaticUniforms;for(r=l.length,o=0;o<r;++o){var u=l[o];u.uniform.value=u.automaticUniform.getValue(t)}var c=this._uniforms;for(r=c.length,o=0;o<r;++o)c[o].set();if(this._context.webgl2){const e=n._uniformBuffers;for(this.initUniformBufferBindPoint(e),o=0,r=e.length;o<r;o++){var h=e[o];this.bindUniformBuffer(h.buffer.getBuffer(),h.name)}}if(i){var d=this._gl,f=this._program;if(d.validateProgram(f),!d.getProgramParameter(f,d.VALIDATE_STATUS))throw new t$15("Program validation failed. Program info log: "+d.getProgramInfoLog(f))}},g$1a.prototype.initUniformBufferBindPoint=function(e){if(this._nextUniformBufferPoint>0||0==e.length||!this._context.webgl2)return;const t=this.program,i=this._context._uniformBufferEngine;var n,r;for(n=0,r=e.length;n<r;n++){const r=e[n]._ubo,o=this._allocateBindingPointIndexForUniformBuffer(r.name);i.bindUniformBlock(t,r.name,o)}},g$1a.prototype.bindUniformBuffer=function(e,t){const i=this._uniformBuffersNames[t];void 0!==i&&g$1a._BaseCache[i]!==e&&(g$1a._BaseCache[i]=e,this._context._uniformBufferEngine.bindUniformBufferBase(e,i,t))},g$1a.prototype._allocateBindingPointIndexForUniformBuffer=function(e){var t=this._nextUniformBufferPoint;return this._uniformBuffersNames[e]=t,this._nextUniformBufferPoint++,t},g$1a.prototype._isReady=function(){return!0},g$1a.prototype.isDestroyed=function(){return!1},g$1a.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)},g$1a.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),i$11(this)},c$15.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._effect.setFloat(this.name,this.value))},_$X.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._effect.setFloat2(this.name,e.x,e.y))},m$13.prototype.set=function(){var e=this.value;if(e$2e(e.red))e$1X.equals(e,this._value)||(this._value=e$1X.clone(e,this._value),this._effect.setFloat3(this.name,e.red,e.green,e.blue));else{if(!e$2e(e.x))throw new t$15('Invalid vec3 value for uniform "'+this.name+'".');o$1p.equals(e,this._value)||(this._value=o$1p.clone(e,this._value),this._effect.setFloat3(this.name,e.x,e.y,e.z))}},p$12.prototype.set=function(){var e=this.value;this._valueType<0&&(e$2e(e.red)?this._valueType=0:e$2e(e.x)&&(this._valueType=1)),0==this._valueType?e$1X.equals(e,this._value)||(this._value=e$1X.clone(e,this._value),this._effect.setFloat4(this.name,e.red,e.green,e.blue,e.alpha)):e$2c.equals(e,this._value)||(this._value=e$2c.clone(e,this._value),this._effect.setFloat4(this.name,e.x,e.y,e.z,e.w))},f$10.prototype.set=function(){var e=this.value,t=this._effect.getEngine(),i=e._inner._texture.getInternalTexture();t._setInternalTexture(this.name,i,this.name)},f$10.prototype.getUniqueId=function(e){var t=this.value;this._effect.getEngine();var i=t._inner._texture.getInternalTexture();e.push(i.uniqueId)},d$1j.prototype.set=function(){var e=this.value;this._effect.setTextureArray(this.name,e._texture)},y$W.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._effect.setInt(this.name,this.value))},x$18.prototype.set=function(){var e=this.value;o$1o.equals(e,this._value)||(o$1o.clone(e,this._value),this._effect.setInt2(this.name,e.x,e.y))},w$Z.prototype.set=function(){var e=this.value;o$1p.equals(e,this._value)||(o$1p.clone(e,this._value),this._effect.setInt3(this.name,e.x,e.y,e.z))},U$14.prototype.set=function(){var e=this.value;e$2c.equals(e,this._value)||(e$2c.clone(e,this._value),this._effect.setInt3(this.name,e.x,e.y,e.z,e.w))};var z$_=new Float32Array(4);function A$1c(e,t){this.name=t,this.value=void 0,this._value=new f$15,this._effect=e}A$1c.prototype.set=function(){if(!f$15.equalsArray(this.value,this._value,0)){f$15.clone(this.value,this._value);var e=f$15.toArray(this.value,z$_);this._effect.setMatrix2x2(this.name,e)}};var C$18=new Float32Array(9);function I$1k(e,t){this.name=t,this.value=void 0,this._value=new p$1e,this._effect=e}I$1k.prototype.set=function(){if(!p$1e.equalsArray(this.value,this._value,0)){p$1e.clone(this.value,this._value);var e=p$1e.toArray(this.value,C$18);this._effect.setMatrix3x3(this.name,e)}};var F$15=new Float32Array(16),T$13=new Matrix;function q$18(e,t){this.name=t,this.value=void 0,this._value=new p$1d,this._effect=e}function j$1a(e,t,i,n){switch(i){case"float":case"f32":return new A$1b(e,t,n);case"vec2":case"vec2<f32>":return new m$12(e,t,n);case"vec3":case"vec3<f32>":return new g$19(e,t,n);case"vec4":case"vec4<f32>":return new w$Y(e,t,n);case"texture2D":case"textureCube":return new v$S(e,t,n);case"int":case"bool":case"u32":case"i32":return new d$1i(e,t,n);case"int2":case"bool2":case"vec2<u32>":case"vec2<i32>":return new b$1c(e,t,n);case"int3":case"bool3":case"vec3<u32>":case"vec3<i32>":return new I$1j(e,t,n);case"int4":case"bool4":case"vec4<u32>":case"vec4<i32>":return new x$17(e,t,n);case"mat2":case"mat2x2<f32>":return new U$13(e,t,n);case"mat3":case"mat3x3<f32>":return new q$17(e,t,n);case"mat4":case"mat4x4<f32>":return new k$$(e,t,n);default:throw new t$13('Unrecognized for uniform "'+t+'".')}}function A$1b(e,t,i){this.name=t,this._effect=e}function m$12(e,t,i){this.name=t,this._value=new Float32Array(2*i),this._effect=e}function g$19(e,t,i){this.name=t,this._value=new Float32Array(3*i),this._effect=e}function w$Y(e,t,i){this.name=t,this._value=new Float32Array(4*i),this._effect=e}function v$S(e,t,i){this.name=t,this.value=new Array(i),this._effect=e}function d$1i(e,t,i){this.name=t,this._value=new Int32Array(i),this._effect=e}function b$1c(e,t,i){this.name=t,this._value=new Int32Array(2*i),this._effect=e}function I$1j(e,t,i){this.name=t,this._value=new Int32Array(3*i),this._effect=e}function x$17(e,t,i){this.name=t,this._value=new Int32Array(4*i),this._effect=e}function U$13(e,t,i){this.name=t,this._value=new Float32Array(9*i),this._effect=e}function q$17(e,t,i){this.name=t,this._value=new Float32Array(9*i),this._effect=e}function k$$(e,t,i){this.name=t,this._value=new Float32Array(16*i),this._effect=e}q$18.prototype.set=function(){p$1d.equalsArray(this.value,this._value,0)||(p$1d.clone(this.value,this._value),p$1d.toArray(this.value,F$15),Matrix.FromArrayToRef(F$15,0,T$13),this._effect.setMatrix(this.name,T$13))},A$1b.prototype.set=function(){this._effect.setArray(this.name,this.value)},m$12.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1o.equalsArray(a,i,r)||(o$1o.pack(a,i,r),n=!0),r+=2}n&&this._effect.setArray2(this.name,i)},g$19.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(e$2e(a.red))(a.red!==i[r]||a.green!==i[r+1]||a.blue!==i[r+2])&&(i[r]=a.red,i[r+1]=a.green,i[r+2]=a.blue,n=!0);else{if(!e$2e(a.x))throw new t$15("Invalid vec3 value.");o$1p.equalsArray(a,i,r)||(o$1p.pack(a,i,r),n=!0)}r+=3}n&&this._effect.setArray3(this.name,i)},w$Y.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];if(e$2e(a.red))e$1X.equalsArray(a,i,r)||(e$1X.pack(a,i,r),n=!0);else{if(!e$2e(a.x))throw new t$15("Invalid vec4 value.");e$2c.equalsArray(a,i,r)||(e$2c.pack(a,i,r),n=!0)}r+=4}n&&this._effect.setArray4(this.name,i)},v$S.prototype.set=function(){for(var e=this.value,t=e.length,i=[],n=0;n<t;++n){var r=e[n];i.push(r._inner._texture)}this._effect.setTextureArray(this.name,i)},v$S.prototype._setSampler=function(e){return this.textureUnitIndex=e,e+length},v$S.prototype.getUniqueId=function(e){for(var t=this.value,i=t.length,n=0;n<i;++n){var r=t[n]._inner._texture.getInternalTexture();e.push(r.uniqueId)}},d$1i.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;r<t;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._effect.setIntArray(this.name,i)},b$1c.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1o.equalsArray(a,i,r)||(o$1o.pack(a,i,r),n=!0),r+=2}n&&this._effect.setIntArray2(this.name,i)},I$1j.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];o$1p.equalsArray(a,i,r)||(o$1p.pack(a,i,r),n=!0),r+=3}n&&this._effect.setIntArray3(this.name,i)},x$17.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];e$2c.equalsArray(a,i,r)||(e$2c.pack(a,i,r),n=!0),r+=4}n&&this._effect.setIntArray4(this.name,i)},U$13.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];f$15.equalsArray(a,i,r)||(f$15.pack(a,i,r),n=!0),r+=4}n&&this._effect.setMatrices(this.name,i)},q$17.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];p$1e.equalsArray(a,i,r)||(p$1e.pack(a,i,r),n=!0),r+=9}n&&this._effect.setMatrices(this.name,i)},k$$.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var a=e[o];p$1d.equalsArray(a,i,r)||(p$1d.pack(a,i,r),n=!0),r+=16}n&&this._effect.setMatrices(this.name,i)};var _0x302d18=(_0x1f7676=!0,function(e,t){var i=_0x1f7676?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f7676=!1,i}),_0xf1af12=_0x302d18(void 0,(function(){return _0xf1af12.toString().search("(((.+)+)+)+$").toString().constructor(_0xf1af12).search("(((.+)+)+)+$")})),_0x1f7676;function _0x2da137(e,t){void 0===t&&(t=!0),this.effect=null,this.defines=null,this.drawContext=e.createDrawContext(),t&&(this.materialContext=e.createMaterialContext())}_0xf1af12(),_0x2da137.IsWrapper=function(e){return void 0===e.getPipelineContext},_0x2da137.GetEffect=function(e){return void 0===e.getPipelineContext?e.effect:e},_0x2da137.prototype.setEffect=function(e,t,i){var n;void 0===i&&(i=!0),this.effect=e,void 0!==t&&(this.defines=t),i&&(null===(n=this.drawContext)||void 0===n||n.reset())},_0x2da137.prototype.dispose=function(){var e;null===(e=this.drawContext)||void 0===e||e.dispose()};var _0x90fc5=(_0x480309=!0,function(e,t){var i=_0x480309?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x480309=!1,i}),_0x249ff6=_0x90fc5(void 0,(function(){return _0x249ff6.toString().search("(((.+)+)+)+$").toString().constructor(_0x249ff6).search("(((.+)+)+)+$")})),_0x480309;_0x249ff6();var _0x5b1907={GLSL:0,WGSL:1,0:"GLSL",1:"WGSL"},_0x3b3a87=Object.freeze(_0x5b1907);function f$$(){this._lastTextureId=[],this._lastLeftOverBufferID=-1,this._init=!1}function S$W(e,t){var i=/#define OUTPUT_DECLARATION/,n=e.split("\n");if(/#version 300 es/g.test(e))return e;var r,o,a=-1;for(r=0;r<n.length;++r)if(o=n[r],i.test(o)){a=r;break}if(-1===a)throw new t$15("Could not find a #define OUTPUT_DECLARATION!");var s=[];for(r=0;r<10;r++){var l="gl_FragData\\["+r+"\\]",u="czm_out"+r;new RegExp(l,"g").test(e)&&(L$1a(u,s),g$18(l,u,n),n.splice(a,0,"layout(location = "+r+") out vec4 "+u+";"),a+=1)}var c="czm_fragColor";z$Z("gl_FragColor",n)&&(L$1a(c,s),g$18("gl_FragColor",c,n),n.splice(a,0,"layout(location = 0) out vec4 czm_fragColor;"),a+=1);var h=P$12(s,n),d={};for(r=0;r<n.length;r++)for(var f in o=n[r],h)if(h.hasOwnProperty(f)){new RegExp("(layout)[^]+(out)[^]+("+f+")[^]+","g").test(o)&&(d[o]=f)}for(var p in d)if(d.hasOwnProperty(p)){var _,m=d[p],g=n.indexOf(p),x=h[m],y=x.length;for(_=0;_<y;_++)n.splice(g,0,x[_]);for(g+=y+1,_=y-1;_>=0;_--)n.splice(g,0,"#endif //"+x[_])}var v="#version 300 es",$=!1;for(r=0;r<n.length;r++)/#version/.test(n[r])&&(n[r]=v,$=!0);return $||n.splice(0,0,v),R$10("EXT_draw_buffers",n),R$10("EXT_frag_depth",n),g$18("texture2D","texture",n),g$18("texture3D","texture",n),g$18("textureCube","texture",n),g$18("gl_FragDepthEXT","gl_FragDepth",n),t?g$18("varying","in",n):(g$18("attribute","in",n),g$18("varying","out",n)),F$14(n)}function g$18(e,t,i){for(var n=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),r=i.length,o=0;o<r;++o){var a=i[o];i[o]=a.replace(n,"$1"+t+"$3")}}function m$11(e,t,i){for(var n=i.length,r=0;r<n;++r){var o=i[r];i[r]=o.replace(e,t)}}function z$Z(e,t){for(var i=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),n=t.length,r=0;r<n;++r){var o=t[r];if(i.test(o))return!0}return!1}function F$14(e){for(var t="",i=e.length,n=0;n<i;++n)t+=e[n]+"\n";return t}function L$1a(e,t){-1===t.indexOf(e)&&t.push(e)}function P$12(e,t){for(var i={},n=e.length,r=[],o=0;o<t.length;++o){var a=t[o],s=/(#ifdef|#if)/g.test(a),l=/#else/g.test(a),u=/#endif/g.test(a);if(s)r.push(a);else if(l){var c=r[r.length-1].replace("ifdef","ifndef");/if/g.test(c)&&(c=c.replace(/(#if\s+)(\S*)([^]*)/,"$1!($2)$3")),r.pop(),r.push(c)}else if(u)r.pop();else if(!/layout/g.test(a))for(var h=0;h<n;++h){var d=e[h];-1!==a.indexOf(d)&&(e$2e(i[d])?i[d]=i[d].filter((function(e){return r.indexOf(e)>=0})):i[d]=r.slice())}}return i}function R$10(e,t){m$11(new RegExp("#extension\\s+GL_"+e+"\\s+:\\s+[a-zA-Z0-9]+\\s*$","g"),"",t)}Object.defineProperties(f$$.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}}}),f$$.prototype.isDirty=function(e,t){if(!this._init)return!0;var i=-1;if(e$2e(t.drawContext.buffers.LeftOver)&&(i=t.drawContext.buffers.LeftOver.uniqueId,t.effect._pipelineContext.uniformBuffer.getBuffer().uniqueId!=i))return!0;var n,r=e.length,o=[];for(n=0;n<r;++n)e[n].getUniqueId(o);if((r=o.length)!==this._lastTextureId.length)return!0;for(n=0;n<r;++n)if(this._lastTextureId[n]!==o[n])return!0;return!1},f$$.prototype.setBufferIDToContext=function(e){this._lastTextureId=[];var t,i=e.length;for(t=0;t<i;++t){var n=e[t];e[t].getUniqueId(this._lastTextureId),n.set()}this._init=!0},f$$.prototype.isDestroyed=function(){return!1},f$$.prototype.destroy=function(){return i$11(this)};var czm_degreesPerRadian$1="const float czm_degreesPerRadian = 57.29577951308232;\n",czm_depthRange$1="const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n",czm_ellipsoidInverseRadii$1="const vec3 czm_ellipsoidInverseRadii = vec3(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.314245);\n",czm_ellipsoidRadii$1="const vec3 czm_ellipsoidRadii = vec3(6378137.0, 6378137.0, 6356752.314245);\n",czm_epsilon1$1="const float czm_epsilon1 = 0.1;\n",czm_epsilon2$1="const float czm_epsilon2 = 0.01;\n",czm_epsilon3$1="const float czm_epsilon3 = 0.001;\n",czm_epsilon4$1="const float czm_epsilon4 = 0.0001;\n",czm_epsilon5$1="const float czm_epsilon5 = 0.00001;\n",czm_epsilon6$1="const float czm_epsilon6 = 0.000001;\n",czm_epsilon7$1="const float czm_epsilon7 = 0.0000001;\n",czm_infinity$1="const float czm_infinity = 5906376272000.0;\n",czm_oneOverPi$1="const float czm_oneOverPi = 0.3183098861837907;\n",czm_oneOverTwoPi$1="const float czm_oneOverTwoPi = 0.15915494309189535;\n",czm_passCesium3DTile$1="const float czm_passCesium3DTile = 4.0;\n",czm_passCesium3DTileClassification$1="const float czm_passCesium3DTileClassification = 5.0;\n",czm_passCesium3DTileClassificationIgnoreShow$1="const float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n",czm_passClassification$1="const float czm_passClassification = 7.0;\n",czm_passCompute$1="const float czm_passCompute = 1.0;\n",czm_passEnvironment$1="const float czm_passEnvironment = 0.0;\n",czm_passGlobe$1="const float czm_passGlobe = 2.0;\n",czm_passGround$1="const float czm_passGround = 4.0;\n",czm_passOpaque$1="const float czm_passOpaque = 12.0;\n",czm_passOverlay$1="const float czm_passOverlay = 20.0;\n",czm_passTerrainClassification$1="const float czm_passTerrainClassification = 3.0;\n",czm_passTranslucent$1="const float czm_passTranslucent = 18.0;\n",czm_pi$1="const float czm_pi = 3.141592653589793;\n",czm_piOverFour$1="const float czm_piOverFour = 0.7853981633974483;\n",czm_piOverSix$1="const float czm_piOverSix = 0.5235987755982988;\n",czm_piOverThree$1="const float czm_piOverThree = 1.0471975511965976;\n",czm_piOverTwo$1="const float czm_piOverTwo = 1.5707963267948966;\n",czm_radiansPerDegree$1="const float czm_radiansPerDegree = 0.017453292519943295;\n",czm_sceneMode2D$1="const float czm_sceneMode2D = 2.0;\n",czm_sceneMode3D$1="const float czm_sceneMode3D = 3.0;\n",czm_sceneModeColumbusView$1="const float czm_sceneModeColumbusView = 1.0;\n",czm_sceneModeMorphing$1="const float czm_sceneModeMorphing = 0.0;\n",czm_solarRadius$1="const float czm_solarRadius = 695500000.0;\n",czm_threePiOver2$1="const float czm_threePiOver2 = 4.71238898038469;\n",czm_twoPi$1="const float czm_twoPi = 6.283185307179586;\n",czm_webMercatorMaxLatitude$1="const float czm_webMercatorMaxLatitude = 1.4844222297453324;\n",czm_depthRangeStruct$1="struct czm_depthRangeStruct\n{\nfloat near;\nfloat far;\n};\n",czm_ellipsoid$1="struct czm_ellipsoid\n{\nvec3 center;\nvec3 radii;\nvec3 inverseRadii;\nvec3 inverseRadiiSquared;\n};\n",czm_material$1="struct czm_material\n{\nvec3 diffuse;\nfloat specular;\nfloat shininess;\nvec3 normal;\nvec3 emission;\nfloat alpha;\n};\n",czm_materialInput$1="struct czm_materialInput\n{\nfloat s;\nvec2 st;\nvec3 str;\nvec3 normalEC;\nmat3 tangentToEyeMatrix;\nvec3 positionToEyeEC;\nfloat height;\nfloat slope;\n};\n",czm_ray$1="struct czm_ray\n{\nvec3 origin;\nvec3 direction;\n};\n",czm_raySegment$1="struct czm_raySegment\n{\nfloat start;\nfloat stop;\n};\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n",czm_s3mMaterialInput$1="struct czm_s3mMaterialInput\n{\nvec4 ambientColor;\nvec4 diffuseColor;\nvec4 ambientLightColor;\nvec4 sunLightColor;\nmat4 texMatrix;\nfloat texture0Width;\nfloat texture1Width;\nvec3 sunDirectionEC;\nfloat sunLightON;\n};\n",czm_shadowParameters$1="struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\nvec3 texCoords;\n#else\nvec2 texCoords;\n#endif\nfloat depthBias;\nfloat depth;\nfloat nDotL;\nvec2 texelStepSize;\nfloat normalShadingSmooth;\nfloat darkness;\nvec4 uvRange;\nfloat shadowMapIndex;\n};\n",czm_acesTonemapping$1="vec3 czm_acesTonemapping(vec3 color) {\nfloat g = 0.985;\nfloat a = 0.065;\nfloat b = 0.0001;\nfloat c = 0.433;\nfloat d = 0.238;\ncolor = (color * (color + a) - b) / (color * (g * color + c) + d);\ncolor = clamp(color, 0.0, 1.0);\nreturn color;\n}\n",czm_adjustColor$1="uniform float uBrightness;\nuniform float uContrast;\nuniform float uHue;\nuniform float uSaturation;\nuniform float uOneOverGamma;\nvec3 czm_adjustColor(vec3 inputColor)\n{\nvec3 outputColor = inputColor;\noutputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\noutputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\noutputColor.rgb = czm_hue(outputColor.rgb, uHue);\noutputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\noutputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\noutputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\nreturn outputColor;\n}\n",czm_alphaWeight$1="float czm_alphaWeight(float a)\n{\nfloat z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\nreturn pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n",czm_antialias$1="vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\nfloat val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\nfloat val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\nval1 = val1 * (1.0 - val2);\nval1 = val1 * val1 * (3.0 - (2.0 * val1));\nval1 = pow(val1, 0.5);\nvec4 midColor = (color1 + color2) * 0.5;\nreturn mix(midColor, currentColor, val1);\n}\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\nreturn czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n",czm_approximateSphericalCoordinates$1="vec2 czm_approximateSphericalCoordinates(vec3 normal) {\nfloat latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\nfloat longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\nreturn vec2(latitudeApproximation, longitudeApproximation);\n}\n",czm_branchFreeTernary$1="float czm_branchFreeTernary(bool comparison, float a, float b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\n",czm_cascadeColor$1="vec4 czm_cascadeColor(vec4 weights)\n{\nreturn vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\nvec4(0.0, 1.0, 0.0, 1.0) * weights.y +\nvec4(0.0, 0.0, 1.0, 1.0) * weights.z +\nvec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n",czm_cascadeDistance$1="uniform vec4 shadowMap_cascadeDistances;\nfloat czm_cascadeDistance(vec4 weights)\n{\nreturn dot(shadowMap_cascadeDistances, weights);\n}\n",czm_cascadeMatrix$1="uniform mat4 shadowMap_cascadeMatrices[4];\nmat4 czm_cascadeMatrix(vec4 weights)\n{\nreturn shadowMap_cascadeMatrices[0] * weights.x +\nshadowMap_cascadeMatrices[1] * weights.y +\nshadowMap_cascadeMatrices[2] * weights.z +\nshadowMap_cascadeMatrices[3] * weights.w;\n}\n",czm_cascadeWeights$1="uniform vec4 shadowMap_cascadeSplits[2];\nvec4 czm_cascadeWeights(float depthEye)\n{\nvec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\nvec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\nreturn near * far;\n}\n",czm_clip$1="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform float clip_mode;\nuniform vec4 clip_planes[6];\nuniform vec4 clip_line_color;\nconst float clip_lineWidth = 3.0;\nfloat GetClipDistance(vec3 pos, vec3 planeNormal, float disToOrigin)\n{\nreturn dot(planeNormal, pos) + disToOrigin;\n}\nfloat ClipBehindAllPlane(float fBorderWidth, vec4 clip_vertex)\n{\nfloat distance = 0.0;\nfloat result = -1.0;\n#ifdef CLIPPLANE\ndistance = GetClipDistance(clip_vertex.xyz, clip_planes[0].xyz, clip_planes[0].w);\nif (distance < 0.0)\n{\nreturn 1.0;\n}\nelse if (distance < fBorderWidth)\n{\nresult = 0.0;\n}\n#else\nfor(int i = 0; i < 6; i++)\n{\ndistance = GetClipDistance(clip_vertex.xyz, clip_planes[i].xyz, clip_planes[i].w);\nif(distance < 0.0)\n{\nreturn 1.0;\n}\nelse if(distance < fBorderWidth)\n{\nresult = 0.0;\n}\n}\n#endif\nreturn result;\n}\nfloat ClipBehindAnyPlane(float fBorderWidth, vec4 clip_vertex)\n{\nfloat result = 1.0;\nfor(int i = 0; i < 6; i++)\n{\nfloat distance = GetClipDistance(clip_vertex.xyz, clip_planes[i].xyz, clip_planes[i].w);\nif((distance + fBorderWidth) < 0.0)\n{\nreturn -1.0;\n}\nelse if(distance < 0.0)\n{\nresult = 0.0;\n}\n}\nreturn result;\n}\nfloat ClipAnythingButLine(float fBorderWidth, vec4 clip_vertex)\n{\nfloat result = -1.0;\nfor(int i = 0; i < 6; i++)\n{\nfloat distance = GetClipDistance(clip_vertex.xyz, clip_planes[i].xyz, clip_planes[i].w);\nif(distance < 0.0)\n{\nreturn -1.0;\n}\nelse if(distance < fBorderWidth)\n{\nresult = 0.0;\n}\n}\nreturn result;\n}\nvec4 czm_clip(vec4 clip_vertex, float fIsFiltByID)\n{\nif(fIsFiltByID < 0.1)\n{\nreturn vec4(1.0);\n}\nif(clip_mode < 0.5)\n{\nreturn vec4(1.0);\n}\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nfloat dxc = abs(dFdx(clip_vertex.x));\nfloat dyc = abs(dFdy(clip_vertex.y));\nfloat fBorderWidth = max(dxc, dyc) * clip_lineWidth;\n#else\nfloat fBorderWidth = clip_lineWidth;\n#endif\nfloat clipResult = 1.0;\nif(clip_line_color.a < 0.01)\n{\nfBorderWidth = 0.0;\n}\nif(clip_mode < 1.5)\n{\nclipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n}\nelse if(clip_mode < 2.5)\n{\nclipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n}\nelse if(clip_mode < 3.5)\n{\nclipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n}\nif(clipResult < -0.5)\n{\ndiscard;\n}\nelse if(clipResult < 0.5)\n{\nreturn clip_line_color;\n}\nelse\n{\nreturn vec4(1.0);\n}\n}\n",czm_columbusViewMorph$1="vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)\n{\nvec3 p = mix(position2D.xyz, position3D.xyz, time);\nreturn vec4(p, 1.0);\n}\n",czm_computeLightColorInFP="vec4 czm_computeLightColorInFP(czm_s3mMaterialInput material, vec3 positionMC, float hasNormal, vec3 normal)\n{\nvec3 normalEC;\nif(hasNormal > 0.9)\n{\nnormalEC = normalize(normal);\n}\nelse\n{\nnormalEC = normalize(czm_normal*czm_computeNormal(positionMC));\n}\nvec3 positionEC = vec3(czm_modelView * vec4(positionMC,1.0)).xyz;\nreturn czm_directionLight(material, normalEC, -positionEC, positionMC);\n}\n",czm_computeLightColorInstanceInFP="vec4 czm_computeLightColorInstanceInFP(czm_s3mMaterialInput material, vec3 positionRotateMC, vec3 positionMC, float hasNormal, vec3 normal)\n{\nvec3 normalEC;\nif(hasNormal > 0.9)\n{\nnormalEC = normalize(normal);\n}\nelse\n{\nnormalEC = normalize(czm_normal*czm_computeNormal(positionRotateMC));\n}\nvec3 positionEC = vec3(czm_modelView * vec4(positionMC,1.0)).xyz;\nreturn czm_directionLight(material, normalEC, -positionEC, positionMC);\n}\n",czm_computeNormal$1="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvec3 czm_computeNormal(in vec3 oriVertex)\n{\nvec3 normal = cross(vec3(dFdx(oriVertex.x), dFdx(oriVertex.y), dFdx(oriVertex.z)), vec3(dFdy(oriVertex.x), dFdy(oriVertex.y), dFdy(oriVertex.z)));\nnormal = normalize(normal);\nreturn normal;\n}\n",czm_computePosition$1="vec4 czm_computePosition();\n",czm_cosineAndSine$1="vec2 cordic(float angle)\n{\nvec2 vector = vec2(6.0725293500888267e-1, 0.0);\nfloat sense = (angle < 0.0) ? -1.0 : 1.0;\nmat2 rotation = mat2(1.0, sense, -sense, 1.0);\nvector = rotation * vector;\nangle -= sense * 7.8539816339744828e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfloat factor = sense * 5.0e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.6364760900080609e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.5e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.4497866312686414e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.25e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.2435499454676144e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 6.25e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 6.2418809995957350e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.125e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.1239833430268277e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.5625e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.5623728620476831e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 7.8125e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 7.8123410601011111e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.90625e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.9062301319669718e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.953125e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.9531225164788188e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 9.765625e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 9.7656218955931946e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 4.8828125e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.8828121119489829e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.44140625e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.4414062014936177e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.220703125e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.2207031189367021e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 6.103515625e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 6.1035156174208773e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.0517578125e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.0517578115526096e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.52587890625e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.5258789061315762e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 7.62939453125e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 7.6293945311019700e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.814697265625e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.8146972656064961e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.9073486328125e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.9073486328101870e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 9.5367431640625e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 9.5367431640596084e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 4.76837158203125e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.7683715820308884e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.384185791015625e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.3841857910155797e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.1920928955078125e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nreturn vector;\n}\nvec2 czm_cosineAndSine(float angle)\n{\nif (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n{\nif (angle < 0.0)\n{\nreturn -cordic(angle + czm_pi);\n}\nelse\n{\nreturn -cordic(angle - czm_pi);\n}\n}\nelse\n{\nreturn cordic(angle);\n}\n}\n",czm_decompressTextureCoordinates$1="vec2 czm_decompressTextureCoordinates(float encoded)\n{\nfloat temp = encoded / 4096.0;\nfloat xZeroTo4095 = floor(temp);\nfloat stx = xZeroTo4095 / 4095.0;\nfloat sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\nreturn vec2(stx, sty);\n}\n",czm_depthClampFarPlane$1="#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\nvec4 czm_depthClampFarPlane(vec4 coords)\n{\n#ifndef LOG_DEPTH\nv_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\ncoords.z = min(coords.z, coords.w);\n#endif\nreturn coords;\n}\n",czm_directionLight="const vec3 SideLightColor = vec3(0.0);\nuniform vec4 uSpecularColor;\nuniform float uShininess;\nconst vec3 specular = vec3(0.066666);\nconst float shininess2 = 30.0;\nfloat saturate( in float a ) { return clamp( a, 0.0, 1.0 ); }\nfloat calcLightAttenuation( float lightDistance, float cutoffDistance, float decayExponent ) {\nif ( decayExponent > 0.0 ) {\nreturn pow( saturate( 1.0 - lightDistance / cutoffDistance ), decayExponent );\n}\nreturn 1.0;\n}\n#if POINT_LIGHTS > 0\nuniform vec3 uPointLightPositionEC[POINT_LIGHTS];\nuniform vec3 uPointLightColor[POINT_LIGHTS];\nuniform vec2 uPointLightDistanceAndDecay[POINT_LIGHTS];\n#endif\n#if SPOT_LIGHTS > 0\nuniform vec3 uSpotLightPosition[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightDirection[ SPOT_LIGHTS ];\nuniform float uSpotLightExponent[ SPOT_LIGHTS ];\nuniform vec4 uSpotLightDistanceDecayCosPenumbra[ SPOT_LIGHTS ];\n#endif\n#if DIR_LIGHTS > 0\nuniform vec3 uDirectionalLightDirection[ DIR_LIGHTS ];\nuniform vec3 uDirectionalLightColor[ DIR_LIGHTS];\n#endif\n#if HEMISPHERE_LIGHTS > 0\nuniform vec3 uSkyColor[ HEMISPHERE_LIGHTS ];\nuniform vec3 uGroundColor[ HEMISPHERE_LIGHTS];\n#endif\nvec4 czm_directionLight(czm_s3mMaterialInput material, vec3 normalEC, vec3 positionToEyeEC, vec3 positionMC)\n{\nvec3 totalDiffuseLight = vec3(0.0);\nvec3 totalSpecularLight = vec3(0.0);\nfloat sunLightDiffuseWeight = max( dot( normalEC, material.sunDirectionEC ), 0.0 );\nfloat sideLightDiffuseWeight = max( dot( normalEC, vec3(0.0,0.0,1.0) ), 0.0 );\ntotalDiffuseLight = material.sunLightColor.rgb * sunLightDiffuseWeight * material.sunLightON + sideLightDiffuseWeight * SideLightColor;\nvec3 positionToEyeECDir = normalize(positionToEyeEC);\n#if HEMISPHERE_LIGHTS > 0\nfor ( int i = 0; i < HEMISPHERE_LIGHTS; i ++ )\n{\nvec3 dirVectorEC = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\nfloat dotProduct = dot( normalEC, dirVectorEC );\nvec3 skyColor = uSkyColor[i];\nvec3 groundColor = uGroundColor[i];\nfloat hemiDiffuseWeight = 0.5 * dotProduct + 0.5;\nvec3 irradiance = mix( groundColor, skyColor, hemiDiffuseWeight );\nirradiance *= 3.141592653589793;\ntotalDiffuseLight += irradiance;\n}\n#endif\n#if DIR_LIGHTS > 0\nfor ( int i = 0; i < DIR_LIGHTS; i ++ )\n{\nvec3 dirVectorEC = normalize((czm_view * vec4(uDirectionalLightDirection[ i ], 0.0)).xyz);\nfloat dotProduct = dot( normalEC, dirVectorEC );\nfloat dirDiffuseWeight = max( dotProduct, 0.0 );\ntotalDiffuseLight += uDirectionalLightColor[ i ] * dirDiffuseWeight;\n}\n#endif\n#if POINT_LIGHTS > 0\nfor ( int i = 0; i < POINT_LIGHTS; i ++ )\n{\nvec3 lVector = uPointLightPositionEC[i] + positionToEyeEC;\nfloat lengthToLight = length( lVector );\nfloat cutoffDis = uPointLightDistanceAndDecay[i].x;\nif(lengthToLight > cutoffDis)\n{\ncontinue;\n}\nfloat attenuation = calcLightAttenuation( lengthToLight, cutoffDis, uPointLightDistanceAndDecay[i].y);\nlVector = normalize( lVector );\nfloat dotProduct = dot( normalEC, lVector );\nfloat pointLightDiffuse = max( dotProduct, 0.0 );\ntotalDiffuseLight += uPointLightColor[i] * pointLightDiffuse * attenuation;\nvec3 pointHalfVector = normalize( lVector + positionToEyeECDir );\nfloat pointDotNormalHalf = max( dot( normalEC, pointHalfVector ), 0.0 );\nfloat pointSpecularWeight = max( pow( pointDotNormalHalf, shininess2 ), 0.0 );\nfloat specularNormalization = ( shininess2 + 2.0 ) / 8.0;\nvec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, pointHalfVector ), 0.0 ), 5.0 );\ntotalSpecularLight += schlick * uPointLightColor[ i ] * pointSpecularWeight * pointLightDiffuse * attenuation * specularNormalization;\n}\n#endif\n#if SPOT_LIGHTS > 0\nvec3 positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;\nfor ( int i = 0; i < SPOT_LIGHTS; i ++ )\n{\nvec3 lVector = uSpotLightPositionEC[i] + positionToEyeEC;\nfloat attenuation = calcLightAttenuation( length( lVector ), uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\nlVector = normalize( lVector );\nfloat spotEffect = dot( uSpotLightDirection[ i ], normalize( uSpotLightPosition[ i ] - positionWC ) );\nif ( spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z ) {\nspotEffect = max( pow( max( spotEffect, 0.0 ), uSpotLightExponent[ i ] ), 0.0 );\nfloat dotProduct = dot( normalEC, lVector );\nfloat spotDiffuseWeight = max( dotProduct, 0.0 );\ntotalDiffuseLight += uSpotLightColor[ i ] * spotDiffuseWeight * attenuation * spotEffect;\nvec3 spotHalfVector = normalize( lVector + positionToEyeECDir );\nfloat spotDotNormalHalf = max( dot( normalEC, spotHalfVector ), 0.0 );\nfloat spotSpecularWeight = max( pow( spotDotNormalHalf, shininess2 ), 0.0 );\nfloat specularNormalization = ( shininess2 + 2.0 ) / 8.0;\nvec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\ntotalSpecularLight += schlick * uSpotLightColor[ i ] * spotSpecularWeight * spotDiffuseWeight * attenuation * specularNormalization * spotEffect;\n}\n}\n#endif\nvec4 color = vec4(material.diffuseColor.rgb * totalDiffuseLight + material.ambientColor.rgb * material.ambientLightColor.rgb * 0.6 + totalSpecularLight, material.diffuseColor.a);\nreturn color;\n}\n",czm_eastNorthUpToEyeCoordinates$1="mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\nvec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0));\nvec3 tangentEC = normalize(czm_normal3D * tangentMC);\nvec3 bitangentEC = normalize(cross(normalEC, tangentEC));\nreturn mat3(\ntangentEC.x, tangentEC.y, tangentEC.z,\nbitangentEC.x, bitangentEC.y, bitangentEC.z,\nnormalEC.x, normalEC.y, normalEC.z);\n}\n",czm_ellipsoidContainsPoint$1="bool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\nvec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\nreturn (dot(scaled, scaled) <= 1.0);\n}\n",czm_ellipsoidNew$1="czm_ellipsoid czm_ellipsoidNew(vec3 center, vec3 radii)\n{\nvec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\nvec3 inverseRadiiSquared = inverseRadii * inverseRadii;\nczm_ellipsoid temp = czm_ellipsoid(center, radii, inverseRadii, inverseRadiiSquared);\nreturn temp;\n}\n",czm_ellipsoidWgs84TextureCoordinates$1="vec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\nreturn vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n",czm_equalsEpsilon$1="bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\nreturn (abs(left - right) <= epsilon);\n}\n",czm_executeExcavation$1="#ifdef EXCAVATION\nuniform sampler2D uExcavationTexture;\nuniform float uExcavationMode;\nuniform vec4 uExcavationRect;\nvarying vec4 vExcavationVertexPos;\nvec2 CalculateExcavationPolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect)\n{\nvec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\nvec2 texCoord = vec2(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\ntexCoord.x = texCoord.x / vecRatio.x;\ntexCoord.y = texCoord.y / vecRatio.y;\nptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\ntexCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\nreturn texCoord;\n}\nbool czm_executeExcavation()\n{\nfloat hasExcavation = 1.0;\nvec2 vecExcavationTexCoord = CalculateExcavationPolyTexCoord(vExcavationVertexPos, uExcavationRect, hasExcavation);\nbool excavationInside = (uExcavationMode < 0.5);\nif(hasExcavation < 0.1)\n{\nreturn !excavationInside;\n}\nif(excavationInside)\n{\nreturn texture2D(uExcavationTexture, vecExcavationTexCoord.xy).r > 0.5;\n}\nelse\n{\nreturn texture2D(uExcavationTexture, vecExcavationTexCoord.xy).r < 0.5;\n}\n}\n#endif\n",czm_eyeOffset$1="vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\nvec4 p = positionEC;\nvec4 zEyeOffset = normalize(p) * eyeOffset.z;\np.xy += eyeOffset.xy + zEyeOffset.xy;\np.z += zEyeOffset.z;\nreturn p;\n}\n",czm_eyeToWindowCoordinates$1="vec4 czm_eyeToWindowCoordinates(vec4 positionEC)\n{\nvec4 q = czm_projection * positionEC;\nq.xyz /= q.w;\nq.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz;\nreturn q;\n}\n",czm_fastApproximateAtan$1="float czm_fastApproximateAtan(float x) {\nreturn x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\nfloat czm_fastApproximateAtan(float x, float y) {\nfloat t = abs(x);\nfloat opposite = abs(y);\nfloat adjacent = max(t, opposite);\nopposite = min(t, opposite);\nt = czm_fastApproximateAtan(opposite / adjacent);\nt = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\nt = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\nt = czm_branchFreeTernary(y < 0.0, -t, t);\nreturn t;\n}\n",czm_fog$1="vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)\n{\nfloat scalar = distanceToCamera * czm_fogDensity;\nfloat fog = 1.0 - exp(-(scalar * scalar));\nreturn mix(color, fogColor, fog);\n}\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)\n{\nfloat scalar = distanceToCamera * czm_fogDensity;\nfloat fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\nreturn mix(color, fogColor, fog);\n}\n",czm_gammaCorrect$1="vec3 czm_gammaCorrect(vec3 color) {\n#ifdef HDR\ncolor = pow(color, vec3(czm_gamma));\n#endif\nreturn color;\n}\nvec4 czm_gammaCorrect(vec4 color) {\n#ifdef HDR\ncolor.rgb = pow(color.rgb, vec3(czm_gamma));\n#endif\nreturn color;\n}\n",czm_geodeticSurfaceNormal$1="vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)\n{\nreturn normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial$1="czm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\nczm_material material;\nmaterial.diffuse = vec3(0.0);\nmaterial.specular = 0.0;\nmaterial.shininess = 1.0;\nmaterial.normal = materialInput.normalEC;\nmaterial.emission = vec3(0.0);\nmaterial.alpha = 1.0;\nreturn material;\n}\n",czm_getEmissiveTextureColor$1="uniform float uMaxCategoryOrHypCeil;\nuniform float uMinCategoryOrHypFloor;\nuniform sampler2D uEmissionTexAtlas;\nuniform vec4 uEmissionTexAtlasTilingAndOffset[EMISSION_TEXTURE_COUNT];\nuniform vec4 uEmissionTexAtlasRects[EMISSION_TEXTURE_COUNT];\nuniform float uLayerCornerLength;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 czm_getEmissiveTextureColor(float w)\n{\nvec3 texColor = vec3(0.0);\nvec2 emissionTexCoord;\nint nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\nvec2 atlasTexCoord;\nfor(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\nif(nEmissionTexTexIdx == i){\nemissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\nemissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\nemissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\nemissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\nemissionTexCoord.xy = fract(emissionTexCoord.xy);\natlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\nbreak;\n}\n}\ntexColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\nreturn texColor;\n}\nvec3 czm_getEmissiveTextureColor(float w, vec2 texCoord)\n{\nvec3 texColor = vec3(0.0);\nvec2 emissionTexCoord;\nint nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\nvec2 atlasTexCoord;\nfor(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\nif(nEmissionTexTexIdx == i){\nemissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\nemissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\nemissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\nemissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\nemissionTexCoord.xy = fract(emissionTexCoord.xy);\natlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\nbreak;\n}\n}\ntexColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\nreturn texColor;\n}\n",czm_getHorizontalColor$1="uniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\nfloat distanceToContour = uHorizontalLine;\nfloat dxc = abs(dFdx(fValue));\nfloat dyc = abs(dFdy(fValue));\nfloat dF = max(dxc, dyc);\nreturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\nvec4 czm_getHorizontalColor(vec4 oriColor, float fValue)\n{\nfloat finalOpacity = computeContourline(fValue);\nreturn mix(oriColor,uHorizontalColor, finalOpacity);\n}\n",czm_getHypsometricColor$1="uniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypsometricVisible;\nuniform float uHypOpacity;\nuniform float uHypContourInterval;\nuniform vec4 uHypLineColor;\nuniform float uHypContourFillMode;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypHasAnalysisRegion;\nvarying vec2 vecHypTexCoord;\nuniform float uMixColorType;\nuniform vec4 uNoValueColor;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uVolumeType;\n#endif\n#ifdef Volume2\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uFilterMode;\n#endif\nfloat computeMixCon(float fValue)\n{\nfloat distanceToContour;\nif(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n{\nif(fValue < 0.5)\n{\ndistanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n}\nelse\n{\nfloat t = floor(fValue / uHypContourInterval);\ndistanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n}\n}\nelse\n{\ndistanceToContour = abs(fValue - uHypMaxVisibleValue);\n}\nfloat dxc = abs(dFdx(fValue));\nfloat dyc = abs(dFdy(fValue));\nfloat dF = max(dxc, dyc);\nreturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\nvec4 computeContourMapColor(float fValue)\n{\nfloat threshold = abs(uHypCeil - uHypFloor);\nfloat contourRate = (fValue - uHypFloor) / threshold;\nfloat finalCoord = clamp(contourRate, 0.0, 1.0);\nfloat count = floor(finalCoord * 16.0);\nfloat y = (count*2.0 + 1.0)/32.0;\nfloat x = fract(finalCoord*16.0);\nif(y > 1.0)\n{\nx = 1.0;\n}\nvec2 contourCoord = vec2(x, y);\nreturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n#ifdef Volume2\nvec4 czm_getContourMapColor(vec4 oriColor, vec4 volColor)\n{\nif(uFilterMode > 0.5)\n{\nvec4 finalColor = volColor * oriColor;\nif(uMixColorType > 0.5)\n{\nfinalColor = volColor;\n}\nreturn finalColor;\n}\nvec4 contourMapColor = vec4(0.0);\nfloat finalOpacity = uHypOpacity;\nfloat noValue = volColor.a;\nfloat texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\nfloat fValue;\nif(noValue > 0.5)\n{\nfValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n}\nelse\n{\nfValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n}\nfloat extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\nif(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n{\nreturn uNoValueColor * oriColor;\n}\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nif(uHypContourFillMode > 2.9)\n{\nfloat mix_con = computeMixCon(fValue);\ncontourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n}\nelse if(uHypContourFillMode > 1.9)\n{\nfinalOpacity = computeMixCon(fValue);\ncontourMapColor = uHypLineColor;\n}\nelse if(uHypContourFillMode > 0.9)\n#else\nif(uHypContourFillMode > 0.9)\n#endif\n{\ncontourMapColor = computeContourMapColor(fValue);\n}\nelse\n{\nfinalOpacity = 0.0;\n}\nvec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\nvec4 finalColor = mixColor * oriColor;\n#ifdef PT_CLOUD\nfinalColor = mixColor;\n#endif\nif(uMixColorType > 0.5)\n{\nfinalColor = mixColor;\n}\nreturn finalColor;\n}\n#else\nvec4 czm_getContourMapColor(vec4 oriColor, float fValue)\n{\nvec4 contourMapColor = vec4(0.0);\nfloat finalOpacity = uHypOpacity;\n#ifdef Volume\nvec3 aRatioT = vecRotioCoord;\nif((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n{\nif(uVolumeType > 0.5)\n{\nvec4 volumeColor = czm_getVolumeValue(aRatioT);\nif(uMixColorType > 0.5)\n{\nvolumeColor = volumeColor * oriColor;\n}\nreturn volumeColor;\n}\nfloat noValue;\nfloat texTest = czm_getVolumeValue(aRatioT, noValue);\nif(noValue > 0.5)\n{\nfValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n}\nelse\n{\nfValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n}\n}\nelse\n{\nfValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n}\n#endif\nfloat extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\nif(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n{\nreturn uNoValueColor * oriColor;\n}\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nif(uHypContourFillMode > 2.9)\n{\nfloat mix_con = computeMixCon(fValue);\ncontourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n}\nelse if(uHypContourFillMode > 1.9)\n{\nfinalOpacity = computeMixCon(fValue);\ncontourMapColor = uHypLineColor;\n}\nelse if(uHypContourFillMode > 0.9)\n#else\nif(uHypContourFillMode > 0.9)\n#endif\n{\ncontourMapColor = computeContourMapColor(fValue);\n}\nelse\n{\nfinalOpacity = 0.0;\n}\nvec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\nvec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\nfinalColor = mixColor;\n#endif\n#ifdef Volume\nif(uMixColorType > 0.5)\n{\nfinalColor = mixColor;\n}\n#endif\nreturn finalColor;\n}\n#endif\n#ifdef Volume2\nvec4 czm_getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\nif(uHypHasAnalysisRegion > 0.1)\n{\nvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\nif(hypColor.r < 0.1)\n{\nreturn oriColor;\n}\n}\nreturn czm_getContourMapColor(oriColor, volColor);\n}\n#else\nvec4 czm_getHypsometricColor(vec4 oriColor, float wValue)\n{\nfloat fValue = wValue;\nif(uHypHasAnalysisRegion > 0.1)\n{\nvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\nif(hypColor.r < 0.1)\n{\nreturn oriColor;\n}\n}\nreturn czm_getContourMapColor(oriColor, fValue);\n}\nvec4 czm_getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\nif(uHypHasAnalysisRegion > 0.1)\n{\nvec2 polyTexCoord = vTexCoord.xy;\npolyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\npolyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\nif(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n{\nreturn oriColor;\n}\nvec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\nif(hypColor.r < 0.1)\n{\nreturn oriColor;\n}\n}\nreturn czm_getContourMapColor(oriColor, wValue);\n}\n#endif\n",czm_getLambertDiffuse$1="float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)\n{\nreturn max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getSpecular$1="float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\nvec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\nfloat specular = max(dot(toReflectedLight, toEyeEC), 0.0);\nreturn pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getTexColorForS3M="void CalculateMipLevel(in vec2 inTexCoord, in float vecTile, in float fMaxMip, inout float mipLevel)\n{\nvec2 dx = dFdx(inTexCoord * vecTile);\nvec2 dy = dFdy(inTexCoord * vecTile);\nfloat dotX = dot(dx, dx);\nfloat dotY = dot(dy, dy);\nfloat dMax = max(dotX, dotY);\nfloat dMin = min(dotX, dotY);\nfloat offset = (dMax - dMin) / (dMax + dMin);\noffset = clamp(offset, 0.0, 1.0);\nfloat d = dMax * (1.0 - offset) + dMin * offset;\nmipLevel = 0.5 * log2(d);\nmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\nvoid CalculateMipLevel(in vec2 inTexCoord, in vec2 vecTile, in float fMaxMip, inout float mipLevel)\n{\nvec2 dx = dFdx(inTexCoord * vecTile.x);\nvec2 dy = dFdy(inTexCoord * vecTile.y);\nfloat dotX = dot(dx, dx);\nfloat dotY = dot(dy, dy);\nfloat dMax = max(dotX, dotY);\nfloat dMin = min(dotX, dotY);\nfloat offset = (dMax - dMin) / (dMax + dMin);\noffset = clamp(offset, 0.0, 1.0);\nfloat d = dMax * (1.0 - offset) + dMin * offset;\nmipLevel = 0.5 * log2(d);\nmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\nvoid CalculateTexCoord(in vec3 inTexCoord, in float scale, in float XTran, in float YTran, in float fTile, in float mipLevel, inout vec2 outTexCoord)\n{\nif(inTexCoord.z < -9000.0)\n{\noutTexCoord = inTexCoord.xy;\n}\nelse\n{\nvec2 fTexCoord = fract(inTexCoord.xy);\nfloat offset = 1.0 * pow(2.0, mipLevel) / fTile;\nfTexCoord = clamp(fTexCoord, offset, 1.0 - offset);\noutTexCoord.x = (fTexCoord.x + XTran) * scale;\noutTexCoord.y = (fTexCoord.y + YTran) * scale;\n}\n}\nvec4 czm_getTexColorForS3M(sampler2D curTexture, vec3 oriTexCoord, float texTileWidth, float fMaxMipLev, float fTexCoordScale, vec2 vecTexCoordTranslate,float isRGBA, vec4 texUVoffset, out vec2 outTexCoord)\n{\nvec4 color = vec4(1.0);\nfloat mipLevel = 0.0;\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nCalculateMipLevel(oriTexCoord.xy, texTileWidth, fMaxMipLev, mipLevel);\n#endif\nvec2 realTexCoord;\nCalculateTexCoord(oriTexCoord, fTexCoordScale, vecTexCoordTranslate.x, vecTexCoordTranslate.y, texTileWidth, mipLevel, realTexCoord);\nif(isRGBA > 0.5)\n{\nvec2 rgbTexCoord;\nrgbTexCoord.x = (realTexCoord.x + vecTexCoordTranslate.x * fTexCoordScale) * 0.5;\nrgbTexCoord.y = (realTexCoord.y + vecTexCoordTranslate.y * fTexCoordScale) * 0.5;\nrgbTexCoord.xy += texUVoffset.xy;\ncolor = texture2D(curTexture, rgbTexCoord.xy, -10.0);\nvec2 vecAlphaTexCoord;\nvecAlphaTexCoord.x = rgbTexCoord.x;\nvecAlphaTexCoord.y = rgbTexCoord.y + fTexCoordScale * 0.5;\nvecAlphaTexCoord.xy += texUVoffset.xy;\ncolor.a = texture2D(curTexture, vecAlphaTexCoord.xy, -10.0).r;\n}\nelse\n{\nrealTexCoord = realTexCoord * texUVoffset.zw + texUVoffset.xy;\nif(oriTexCoord.z < -9000.0)\n{\ncolor = texture2D(curTexture, realTexCoord.xy);\n}\nelse\n{\n#ifdef GL_EXT_shader_texture_lod\ncolor = texture2DLodEXT(curTexture, realTexCoord.xy, mipLevel);\n#else\n#ifdef WEBGL2\ncolor = textureLod(curTexture, realTexCoord.xy, mipLevel);\n#else\ncolor = texture2D(curTexture, realTexCoord.xy, mipLevel);\n#endif\n#endif\n}\n#ifdef RGBTOBGR\ncolor = color.bgra;\n#endif\n}\noutTexCoord = realTexCoord;\nreturn color;\n}\nvec4 czm_getTexColorForS3M(sampler2D texture, vec2 uv, vec2 texDim, vec2 texTran, vec2 texScale, float maxMipLevel, out vec2 outTexCoord)\n{\nif(maxMipLevel < 0.0)\n{\nreturn vec4(1.0);\n}\nvec4 colorCeil = vec4(1.0);\nfloat mipLevel = 0.0;\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nCalculateMipLevel(uv, texDim, maxMipLevel, mipLevel);\n#endif\nfloat ceilMipLevel = ceil(mipLevel);\nvec2 translate = vec2(texTran.x, texTran.y);\nfloat temp;\nif(ceilMipLevel > 0.0)\n{\ntranslate.x = texTran.x + texScale.x;\ntemp = pow(2.0, ceilMipLevel - 1.0);\ntranslate.y = texTran.y + texScale.y * (temp - 1.0) / temp;\n}\nfloat scale = 1.0 / pow(2.0, ceilMipLevel);\nvec2 texcoord = fract(uv);\nfloat offsetX = pow(2.0, ceilMipLevel) / texDim.x;\nfloat offsetY = pow(2.0, ceilMipLevel) / texDim.y;\ntexcoord.x = clamp(texcoord.x, 0.0 + offsetX, 1.0 - offsetX);\ntexcoord.y = clamp(texcoord.y, 0.0 + offsetY, 1.0 - offsetY);\ntexcoord.x = texcoord.x * texScale.x * scale + translate.x;\ntexcoord.y = texcoord.y * texScale.y * scale + translate.y;\n#ifdef GL_EXT_shader_texture_lod\ncolorCeil = texture2DLodEXT(texture, texcoord.xy, 0.0);\n#else\n#ifdef WEBGL2\ncolorCeil = textureLod(texture, texcoord.xy, 0.0);\n#else\ncolorCeil = texture2D(texture, texcoord.xy, -10.0);\n#endif\n#endif\nvec4 colorFloor = vec4(1.0);\nfloat floorMipLevel = floor(mipLevel);\ntranslate = vec2(texTran.x, texTran.y);\nif(floorMipLevel > 0.0)\n{\ntranslate.x = texTran.x + texScale.x;\ntemp = pow(2.0, floorMipLevel - 1.0);\ntranslate.y = texTran.y + texScale.y * (temp - 1.0) / temp;\n}\nscale = 1.0 / pow(2.0, floorMipLevel);\ntexcoord = fract(uv);\noffsetX = pow(2.0, floorMipLevel) / texDim.x;\noffsetY = pow(2.0, floorMipLevel) / texDim.y;\ntexcoord.x = clamp(texcoord.x, 0.0 + offsetX, 1.0 - offsetX);\ntexcoord.y = clamp(texcoord.y, 0.0 + offsetY, 1.0 - offsetY);\ntexcoord.x = texcoord.x * texScale.x * scale + translate.x;\ntexcoord.y = texcoord.y * texScale.y * scale + translate.y;\n#ifdef GL_EXT_shader_texture_lod\ncolorFloor = texture2DLodEXT(texture, texcoord.xy, 0.0);\n#else\n#ifdef WEBGL2\ncolorFloor = textureLod(texture, texcoord.xy, 0.0);\n#else\ncolorFloor = texture2D(texture, texcoord.xy, -10.0);\n#endif\n#endif\nvec4 color = colorCeil * 0.5 + colorFloor * 0.5;\nreturn color;\n}\n",czm_getTextureMatrixFromZValue="const float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT4 = 1.0 / 16.0;\nconst float SHIFT_LEFT4 = 16.0;\nvoid czm_getTextureMatrixFromZValue(in float nZ, inout float XTran, inout float YTran, inout float scale, inout float isRGBA)\n{\nif(nZ <= 0.0)\n{\nreturn;\n}\nfloat nDel8 = floor(nZ * SHIFT_RIGHT8);\nfloat nDel16 = floor(nDel8 * SHIFT_RIGHT8);\nfloat nDel20 = floor(nDel16 * SHIFT_RIGHT4);\nisRGBA = floor(nDel20);\nYTran = nZ - nDel8 * SHIFT_LEFT8;\nXTran = nDel8 - nDel16 * SHIFT_LEFT8;\nfloat nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\nscale = 1.0 / pow(2.0, nLevel);\n}\n",czm_getVolumeValue$1="uniform sampler2D uVolumeTexture;\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uTimeRatio;\n#endif\n#ifdef Volume\nuniform float width;\nuniform float height;\nuniform float depth;\nuniform float sideBlockCount;\nuniform float blockLength;\nuniform float texLength;\nuniform float uFilterMode;\n#endif\nfloat czm_unpackVolume(vec3 packedDepth)\n{\nreturn dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n#ifdef Volume\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\nfloat yOffset = floor((fLevel+0.25/sideBlockCount) / sideBlockCount);\nfloat xOffset = fLevel - yOffset * sideBlockCount;\nfloat texCoordV = (texCoord.y * height + yOffset * blockLength) / texLength;\nfloat texCoordU = (texCoord.x * width + xOffset * blockLength) / texLength;\nreturn vec2(texCoordU, texCoordV);\n}\n#define inline\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\nvec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\nvec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\nfloat fValue1 = clamp(czm_unpackVolume(volumeValue1.xyz),0.0,1.0);\nfloat fValue2 = clamp(czm_unpackVolume(volumeValue2.xyz),0.0,1.0);\nif(uFilterMode >0.5)\n{\nif(ratio<0.5)\n{\nratio = 0.0;\n}\nelse\n{\nratio = 1.0;\n}\n}\nnoValue = mix(volumeValue1.a, volumeValue2.a, ratio);\nif(volumeValue1.a < 0.5)\n{\nfValue1 = fValue2;\n}\nif(volumeValue2.a < 0.5)\n{\nfValue2 = fValue1;\n}\nreturn mix(fValue1, fValue2, ratio);\n}\nfloat czm_getVolumeValue(vec3 texCoord, out float noValue)\n{\nfloat fLevel = (depth - 1.0) * texCoord.z;\nfloat bottomLevel= floor(fLevel);\nfloat topLevel = bottomLevel + 1.0;\nfloat ratio = topLevel - fLevel;\nvec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\nvec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\nfloat fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\nfResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\nreturn fResult;\n}\nvec4 czm_getVolumeValue(vec3 texCoord)\n{\nfloat fLevel = (depth - 1.0) * texCoord.z;\nfloat bottomLevel= floor(fLevel);\nfloat topLevel = bottomLevel + 1.0;\nfloat ratio = topLevel - fLevel;\nfloat yOffset1 = floor((topLevel+0.25/sideBlockCount) / sideBlockCount);\nfloat xOffset1 = topLevel - yOffset1 * sideBlockCount;\nfloat texCoordV1 = (texCoord.y * height + yOffset1 * blockLength)/texLength;\nfloat texCoordU1 = (texCoord.x * width + xOffset1 * blockLength)/texLength;\nvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\nfloat yOffset2 = floor((bottomLevel+0.25/sideBlockCount) / sideBlockCount);\nfloat xOffset2 = bottomLevel - yOffset2 * sideBlockCount;\nfloat texCoordV2 = (texCoord.y * height + yOffset2 * blockLength)/texLength;\nfloat texCoordU2 = (texCoord.x * width + xOffset2 * blockLength)/texLength;\nvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\nif(uFilterMode >0.5)\n{\nif(ratio<0.5)\n{\nratio = 0.0;\n}\nelse\n{\nratio = 1.0;\n}\n}\nvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\nreturn volumeColor;\n}\n#endif\n",czm_getVolumeValueMultiResolution="uniform sampler2D uVolumeTexture1;\nuniform sampler2D uVolumeTexture2;\nuniform sampler2D uVolumeTexture3;\nuniform mat4 uMultiResolutionPara1;\nuniform mat4 uMultiResolutionPara2;\nuniform mat4 uMultiResolutionPara3;\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture1;\nuniform sampler2D uNextVolumeTexture2;\nuniform sampler2D uNextVolumeTexture3;\n#endif\n#ifdef Volume\nvec2 computeVolumeTextureCoord(vec2 texCoord, float fLevel, float texWidth, float texHeight, float texSideBlockCount, float texBlockLength, float texTotalLength)\n{\nfloat yOffset = floor((fLevel+0.25/texSideBlockCount) / texSideBlockCount);\nfloat xOffset = fLevel - yOffset * texSideBlockCount;\nfloat texCoordV = (texCoord.y * texHeight + yOffset * texBlockLength) / texTotalLength;\nfloat texCoordU = (texCoord.x * texWidth + xOffset * texBlockLength) / texTotalLength;\nreturn vec2(texCoordU, texCoordV);\n}\nfloat czm_getVolumeValueMultiResolution(vec3 texCoord, out float noValue)\n{\nfloat fLevel = (depth - 1.0) * texCoord.z;\nfloat bottomLevel= floor(fLevel);\nfloat topLevel = bottomLevel + 1.0;\nfloat ratio = topLevel - fLevel;\nvec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\nvec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\nfloat fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\nfResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\nfloat width = uMultiResolutionPara1[2].x;\nfloat height = uMultiResolutionPara1[2].y;\nfloat sideBlockCount = uMultiResolutionPara1[2].z;\nfloat blockLength = uMultiResolutionPara1[2].w;\nfloat texLength = uMultiResolutionPara1[3].x;\nvec4 uMultiResolutionTranslation = uMultiResolutionPara1[0];\nvec2 texCoord1 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\nvec2 topTexCoord1 = computeVolumeTextureCoord(texCoord1, topLevel, width, height, sideBlockCount, blockLength, texLength);\nvec2 bottomTexCoord1 = computeVolumeTextureCoord(texCoord1, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\nfloat alpha1 = 5.0 * clamp( max(abs(texCoord1.x - 0.5), abs(texCoord1.y - 0.5)) - 0.3,0.0,0.2);\nfloat fResult1 = computeVolumeValue(uVolumeTexture1, topTexCoord1, bottomTexCoord1, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult1 = computeVolumeValue(uNextVolumeTexture1, topTexCoord1, bottomTexCoord1, ratio, noValue);\nfResult1 = mix(fResult1, fNextResult1, uTimeRatio);\n#endif\nwidth = uMultiResolutionPara2[2].x;\nheight = uMultiResolutionPara2[2].y;\nsideBlockCount = uMultiResolutionPara2[2].z;\nblockLength = uMultiResolutionPara2[2].w;\ntexLength = uMultiResolutionPara2[3].x;\nuMultiResolutionTranslation = uMultiResolutionPara2[0];\nvec2 texCoord2 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\nvec2 topTexCoord2 = computeVolumeTextureCoord(texCoord2, topLevel, width, height, sideBlockCount, blockLength, texLength);\nvec2 bottomTexCoord2 = computeVolumeTextureCoord(texCoord2, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\nfloat alpha2 = 5.0 * clamp( max(abs(texCoord2.x - 0.5), abs(texCoord2.y - 0.5)) - 0.3,0.0,0.2);\nfloat fResult2 = computeVolumeValue(uVolumeTexture2, topTexCoord2, bottomTexCoord2, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult2 = computeVolumeValue(uNextVolumeTexture2, topTexCoord2, bottomTexCoord2, ratio, noValue);\nfResult2 = mix(fResult2, fNextResult2, uTimeRatio);\n#endif\nwidth = uMultiResolutionPara3[2].x;\nheight = uMultiResolutionPara3[2].y;\nsideBlockCount = uMultiResolutionPara3[2].z;\nblockLength = uMultiResolutionPara3[2].w;\ntexLength = uMultiResolutionPara3[3].x;\nuMultiResolutionTranslation = uMultiResolutionPara3[0];\nvec2 texCoord3 = (texCoord.xy - uMultiResolutionTranslation.xy) * uMultiResolutionTranslation.zw;\nvec2 topTexCoord3 = computeVolumeTextureCoord(texCoord3, topLevel, width, height, sideBlockCount, blockLength, texLength);\nvec2 bottomTexCoord3 = computeVolumeTextureCoord(texCoord3, bottomLevel, width, height, sideBlockCount, blockLength, texLength);\nfloat alpha3 = 5.0 * clamp( max(abs(texCoord3.x - 0.5), abs(texCoord3.y - 0.5)) - 0.3,0.0,0.2);\nfloat fResult3 = computeVolumeValue(uVolumeTexture3, topTexCoord3, bottomTexCoord3, ratio, noValue);\n#ifdef TIME_ORDER\nfloat fNextResult3 = computeVolumeValue(uNextVolumeTexture3, topTexCoord3, bottomTexCoord3, ratio, noValue);\nfResult3 = mix(fResult3, fNextResult3, uTimeRatio);\n#endif\nreturn mix(fResult3, mix(fResult2, mix(fResult1, fResult, alpha1), alpha2), alpha3);\n}\n#endif\n",czm_getWaterNoise$1="vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\nfloat cosAngle = cos(angleInRadians);\nfloat sinAngle = sin(angleInRadians);\nvec2 s0 = vec2(1.0/17.0, 0.0);\nvec2 s1 = vec2(-1.0/29.0, 0.0);\nvec2 s2 = vec2(1.0/101.0, 1.0/59.0);\nvec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\ns0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\ns1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\ns2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\ns3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\nvec2 uv0 = (uv/103.0) + (time * s0);\nvec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\nvec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\nvec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\nuv0 = fract(uv0);\nuv1 = fract(uv1);\nuv2 = fract(uv2);\nuv3 = fract(uv3);\nvec4 noise = (texture2D(normalMap, uv0)) +\n(texture2D(normalMap, uv1)) +\n(texture2D(normalMap, uv2)) +\n(texture2D(normalMap, uv3));\nreturn ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_getWgs84EllipsoidEC$1="czm_ellipsoid czm_getWgs84EllipsoidEC()\n{\nvec3 radii = vec3(6378137.0, 6378137.0, 6378137.0);\nvec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\nvec3 inverseRadiiSquared = inverseRadii * inverseRadii;\nczm_ellipsoid temp = czm_ellipsoid(czm_view[3].xyz, radii, inverseRadii, inverseRadiiSquared);\nreturn temp;\n}\n",czm_HSBToRGB$1="const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\nvec3 czm_HSBToRGB(vec3 hsb)\n{\nvec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\nreturn hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);\n}\n",czm_HSLToRGB$1="vec3 hueToRGB(float hue)\n{\nfloat r = abs(hue * 6.0 - 3.0) - 1.0;\nfloat g = 2.0 - abs(hue * 6.0 - 2.0);\nfloat b = 2.0 - abs(hue * 6.0 - 4.0);\nreturn clamp(vec3(r, g, b), 0.0, 1.0);\n}\nvec3 czm_HSLToRGB(vec3 hsl)\n{\nvec3 rgb = hueToRGB(hsl.x);\nfloat c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\nreturn (rgb - 0.5) * c + hsl.z;\n}\n",czm_hue$1="vec3 czm_hue(vec3 rgb, float adjustment)\n{\nconst mat3 toYIQ = mat3(0.299, 0.587, 0.114,\n0.595716, -0.274453, -0.321263,\n0.211456, -0.522591, 0.311135);\nconst mat3 toRGB = mat3(1.0, 0.9563, 0.6210,\n1.0, -0.2721, -0.6474,\n1.0, -1.107, 1.7046);\nvec3 yiq = toYIQ * rgb;\nfloat hue = atan(yiq.z, yiq.y) + adjustment;\nfloat chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\nvec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\nreturn toRGB * color;\n}\n",czm_inverseGamma$1="vec3 czm_inverseGamma(vec3 color) {\nreturn pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_inverseMatrix$1="mat3 czm_inverseMatrix(mat3 m)\n{\nfloat Determinant =\nm[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\n- m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\n+ m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\nmat3 Inverse;\nInverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);\nInverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);\nInverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);\nInverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);\nInverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);\nInverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);\nInverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\nInverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);\nInverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);\nInverse /= Determinant;\nreturn Inverse;\n}\nmat4 czm_inverseMatrix(mat4 m)\n{\nfloat Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\nfloat Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\nfloat Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\nfloat Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\nfloat Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\nfloat Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\nfloat Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\nfloat Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\nfloat Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\nfloat Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\nfloat Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\nfloat Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\nfloat Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\nfloat Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\nfloat Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\nfloat Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\nfloat Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\nfloat Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\nconst vec4 SignA = vec4( 1.0, -1.0, 1.0, -1.0);\nconst vec4 SignB = vec4(-1.0, 1.0, -1.0, 1.0);\nvec4 Fac0 = vec4(Coef00, Coef00, Coef02, Coef03);\nvec4 Fac1 = vec4(Coef04, Coef04, Coef06, Coef07);\nvec4 Fac2 = vec4(Coef08, Coef08, Coef10, Coef11);\nvec4 Fac3 = vec4(Coef12, Coef12, Coef14, Coef15);\nvec4 Fac4 = vec4(Coef16, Coef16, Coef18, Coef19);\nvec4 Fac5 = vec4(Coef20, Coef20, Coef22, Coef23);\nvec4 Vec0 = vec4(m[1][0], m[0][0], m[0][0], m[0][0]);\nvec4 Vec1 = vec4(m[1][1], m[0][1], m[0][1], m[0][1]);\nvec4 Vec2 = vec4(m[1][2], m[0][2], m[0][2], m[0][2]);\nvec4 Vec3 = vec4(m[1][3], m[0][3], m[0][3], m[0][3]);\nvec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);\nvec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);\nvec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);\nvec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);\nmat4 Inverse = mat4(Inv0, Inv1, Inv2, Inv3);\nvec4 Row0 = vec4(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);\nfloat Determinant = dot(m[0], Row0);\nInverse /= Determinant;\nreturn Inverse;\n}\n",czm_isEmpty$1="bool czm_isEmpty(czm_raySegment interval)\n{\nreturn (interval.stop < 0.0);\n}\n",czm_isFull$1="bool czm_isFull(czm_raySegment interval)\n{\nreturn (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction$1="float czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)\n{\nfloat sinLatitude = sin(latitude);\nfloat mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\nreturn (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_lineDistance$1="float czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\nreturn abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_luminance$1="float czm_luminance(vec3 rgb)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nreturn dot(rgb, W);\n}\n",czm_metersPerPixel$1="float czm_metersPerPixel(vec4 positionEC, float pixelRatio)\n{\nfloat width = czm_viewport.z;\nfloat height = czm_viewport.w;\nfloat pixelWidth;\nfloat pixelHeight;\nfloat top = czm_frustumPlanes.x;\nfloat bottom = czm_frustumPlanes.y;\nfloat left = czm_frustumPlanes.z;\nfloat right = czm_frustumPlanes.w;\nif (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n{\nfloat frustumWidth = right - left;\nfloat frustumHeight = top - bottom;\npixelWidth = frustumWidth / width;\npixelHeight = frustumHeight / height;\n}\nelse\n{\nfloat distanceToPixel = -positionEC.z;\nfloat inverseNear = 1.0 / czm_currentFrustum.x;\nfloat tanTheta = top * inverseNear;\npixelHeight = 2.0 * distanceToPixel * tanTheta / height;\ntanTheta = right * inverseNear;\npixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n}\nreturn max(pixelWidth, pixelHeight) * pixelRatio;\n}\nfloat czm_metersPerPixel(vec4 positionEC)\n{\nreturn czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates$1="vec4 czm_modelToWindowCoordinates(vec4 position)\n{\nvec4 q = czm_modelViewProjection * position;\nq.xyz /= q.w;\nq.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz;\nreturn q;\n}\n",czm_multiplyWithColorBalance$1="vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nvec3 target = left * right;\nfloat leftLuminance = dot(left, W);\nfloat rightLuminance = dot(right, W);\nfloat targetLuminance = dot(target, W);\nreturn ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar$1="float czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\nfloat valueAtMin = nearFarScalar.y;\nfloat valueAtMax = nearFarScalar.w;\nfloat nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\nfloat farDistanceSq = nearFarScalar.z * nearFarScalar.z;\nfloat t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\nt = pow(clamp(t, 0.0, 1.0), 0.2);\nreturn mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode$1="vec3 czm_octDecode(vec2 encoded, float range)\n{\nif (encoded.x == 0.0 && encoded.y == 0.0) {\nreturn vec3(0.0, 0.0, 0.0);\n}\nencoded = encoded / range * 2.0 - 1.0;\nvec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\nif (v.z < 0.0)\n{\nv.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);\n}\nreturn normalize(v);\n}\nvec3 czm_octDecode(vec2 encoded)\n{\nreturn czm_octDecode(encoded, 255.0);\n}\nvec3 czm_octDecode(float encoded)\n{\nfloat temp = encoded / 256.0;\nfloat x = floor(temp);\nfloat y = (temp - x) * 256.0;\nreturn czm_octDecode(vec2(x, y));\n}\nvoid czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)\n{\nfloat temp = encoded.x / 65536.0;\nfloat x = floor(temp);\nfloat encodedFloat1 = (temp - x) * 65536.0;\ntemp = encoded.y / 65536.0;\nfloat y = floor(temp);\nfloat encodedFloat2 = (temp - y) * 65536.0;\nvector1 = czm_octDecode(encodedFloat1);\nvector2 = czm_octDecode(encodedFloat2);\nvector3 = czm_octDecode(vec2(x, y));\n}\n",czm_packDepth$1="vec4 czm_packDepth(float depth)\n{\nvec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;\nenc = fract(enc);\nenc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\nreturn enc;\n}\n",czm_packValue$1="vec4 czm_packValue(float value)\n{\nfloat SHIFT_LEFT8 = 256.0;\nfloat SHIFT_RIGHT8 = 1.0 / 256.0;\nvec4 result;\nresult.a = 255.0;\nfloat fPos = abs(value + 9000.0) * SHIFT_RIGHT8;\nresult.b = (fPos - floor(fPos)) * SHIFT_LEFT8;\nfPos = floor(fPos) * SHIFT_RIGHT8;\nresult.g = (fPos - floor(fPos)) * SHIFT_LEFT8;\nresult.r = floor(fPos);\nresult /= 255.0;\nreturn result;\n}\n",czm_phong$1="float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\nreturn czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\nreturn czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\nif (czm_sceneMode == czm_sceneMode3D) {\ndiffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n}\nfloat specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\nvec3 materialDiffuse = material.diffuse * 0.5;\nvec3 ambient = materialDiffuse;\nvec3 color = ambient + material.emission;\ncolor += materialDiffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\nfloat specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\nvec3 ambient = vec3(0.0);\nvec3 color = ambient + material.emission;\ncolor += material.diffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\n",czm_planeDistance$1="float czm_planeDistance(vec4 plane, vec3 point) {\nreturn (dot(plane.xyz, point) + plane.w);\n}\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\nreturn (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay$1="vec3 czm_pointAlongRay(czm_ray ray, float time)\n{\nreturn ray.origin + (time * ray.direction);\n}\n",czm_rayEllipsoidIntersectionInterval$1="czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)\n{\nvec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;\nvec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;\nq = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;\nfloat q2 = dot(q, q);\nfloat qw = dot(q, w);\nif (q2 > 1.0)\n{\nif (qw >= 0.0)\n{\nreturn czm_emptyRaySegment;\n}\nelse\n{\nfloat qw2 = qw * qw;\nfloat difference = q2 - 1.0;\nfloat w2 = dot(w, w);\nfloat product = w2 * difference;\nif (qw2 < product)\n{\nreturn czm_emptyRaySegment;\n}\nelse if (qw2 > product)\n{\nfloat discriminant = qw * qw - product;\nfloat temp = -qw + sqrt(discriminant);\nfloat root0 = temp / w2;\nfloat root1 = difference / temp;\nif (root0 < root1)\n{\nczm_raySegment i = czm_raySegment(root0, root1);\nreturn i;\n}\nelse\n{\nczm_raySegment i = czm_raySegment(root1, root0);\nreturn i;\n}\n}\nelse\n{\nfloat root = sqrt(difference / w2);\nczm_raySegment i = czm_raySegment(root, root);\nreturn i;\n}\n}\n}\nelse if (q2 < 1.0)\n{\nfloat difference = q2 - 1.0;\nfloat w2 = dot(w, w);\nfloat product = w2 * difference;\nfloat discriminant = qw * qw - product;\nfloat temp = -qw + sqrt(discriminant);\nczm_raySegment i = czm_raySegment(0.0, temp / w2);\nreturn i;\n}\nelse\n{\nif (qw < 0.0)\n{\nfloat w2 = dot(w, w);\nczm_raySegment i = czm_raySegment(0.0, -qw / w2);\nreturn i;\n}\nelse\n{\nreturn czm_emptyRaySegment;\n}\n}\n}\n",czm_raySphereIntersectionInterval="czm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)\n{\nvec3 o = ray.origin;\nvec3 d = ray.direction;\nvec3 oc = o - center;\nfloat a = dot(d, d);\nfloat b = 2.0 * dot(d, oc);\nfloat c = dot(oc, oc) - (radius * radius);\nfloat det = (b * b) - (4.0 * a * c);\nif (det < 0.0) {\nreturn czm_emptyRaySegment;\n}\nfloat sqrtDet = sqrt(det);\nfloat t0 = (-b - sqrtDet) / (2.0 * a);\nfloat t1 = (-b + sqrtDet) / (2.0 * a);\nczm_raySegment result = czm_raySegment(t0, t1);\nreturn result;\n}\n",czm_readDepth$1="float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\nreturn czm_reverseLogDepth(texture2D(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective$1="float czm_readNonPerspective(float value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\nreturn value * oneOverW;\n}\n",czm_reverseLogDepth$1="float czm_reverseLogDepth(float logZ)\n{\n#ifdef LOG_DEPTH\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nfloat log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;\nfloat depthFromNear = pow(2.0, log2Depth) - 1.0;\nreturn far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#endif\nreturn logZ;\n}\n",czm_RGBToHSB$1="const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\nvec3 czm_RGBToHSB(vec3 rgb)\n{\nvec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\nvec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\nfloat d = q.x - min(q.w, q.y);\nreturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL$1="vec3 RGBtoHCV(vec3 rgb)\n{\nvec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);\nvec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);\nfloat c = q.x - min(q.w, q.y);\nfloat h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\nreturn vec3(h, c, q.x);\n}\nvec3 czm_RGBToHSL(vec3 rgb)\n{\nvec3 hcv = RGBtoHCV(rgb);\nfloat l = hcv.z - hcv.y * 0.5;\nfloat s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\nreturn vec3(hcv.x, s, l);\n}\n",czm_RGBToXYZ$1="vec3 czm_RGBToXYZ(vec3 rgb)\n{\nconst mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,\n0.3576, 0.7152, 0.1192,\n0.1805, 0.0722, 0.9505);\nvec3 xyz = RGB2XYZ * rgb;\nvec3 Yxy;\nYxy.r = xyz.g;\nfloat temp = dot(vec3(1.0), xyz);\nYxy.gb = xyz.rg / temp;\nreturn Yxy;\n}\n",czm_RollerShutter$1="void czm_RollerShutter(vec2 coord, vec4 region)\n{\nvec2 f = step(region.xw, coord);\nvec2 s = step(coord, region.zy);\nif (f.x * f.y * s.x * s.y < 1.0)\n{\ndiscard;\n};\n}\n",czm_s3mBatchOperation$1="void czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation)\n{\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nvertexColor *= color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nvertexColor *= selectedColor;\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\nfloat isOffset = fract(floor(right_8)* 0.5);\nif(isOffset > 0.1)\n{\nvertexPos.xyz += translation;\n}\nfloat isClip = fract(floor(right_16) * 0.5);\nif(isClip > 0.1)\n{\nvIsFiltByID.x = 1.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout float fSelected)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nvertexColor *= color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nfSelected = 1.0;\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\nfloat isOffset = fract(floor(right_8)* 0.5);\nif(isOffset > 0.1)\n{\nvertexPos.xyz += translation;\n}\nfloat isClip = fract(floor(right_16) * 0.5);\nif(isClip > 0.1)\n{\nvIsFiltByID.x = 1.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout float fSelected)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nvertexColor.rgb = color.rgb;\nvertexColor.a *= color.a;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nfSelected = 1.0;\n#ifdef REPLACE_SELECT_TYPE\nvertexColor = selectedColor;\n#else\nvertexColor *= selectedColor;\n#endif\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\nfloat isOffset = fract(floor(right_8)* 0.5);\nif(isOffset > 0.1)\n{\nvertexPos.xyz += translation;\n}\nfloat isClip = fract(floor(right_16) * 0.5);\nif(isClip > 0.1)\n{\nvIsFiltByID.x = 1.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nvertexColor *= color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nvertexColor *= selectedColor;\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout float fSelected)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nfSelected = 1.0;\nvertexColor = color;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nfSelected = 1.0;\nvertexColor = selectedColor;\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\n}\nvoid czm_s3mBatchOperation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor, inout vec4 vertexPos, inout vec4 vIsFiltByID, vec3 translation, inout vec2 fSelected)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isSetColor = fract(right_2);\nif(isSetColor > 0.1)\n{\nfSelected.y = 1.0;\nvertexColor.rgb = color.rgb;\nvertexColor.a *= color.a;\n}\nfloat isPicked = fract(floor(right_2)* 0.5);\nif(isPicked > 0.1)\n{\nfSelected.x = 1.0;\n#ifdef REPLACE_SELECT_TYPE\nvertexColor = selectedColor;\n#else\nvertexColor *= selectedColor;\n#endif\n}\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\nfloat isOffset = fract(floor(right_8)* 0.5);\nif(isOffset > 0.1)\n{\nvertexPos.xyz += translation;\n}\nfloat isClip = fract(floor(right_16) * 0.5);\nif(isClip > 0.1)\n{\nvIsFiltByID.x = 1.0;\n}\n}\n",czm_S3MPBR$1="uniform float u_metallicFactor;\nuniform float u_roughnessFactor;\nuniform vec4 u_emissiveFactor;\nuniform vec4 u_baseColorFactor;\nuniform float u_alphaCutoff;\nuniform sampler2D u_baseColorTexture;\nuniform sampler2D u_metallicRoughnessTexture;\nuniform sampler2D u_normalTexture;\nuniform sampler2D u_occlusionTexture;\nuniform sampler2D u_emissiveTexture;\nuniform vec4 u_baseColorUVOffsetAndTiling;\nuniform vec4 u_emissiveUVOffsetAndTiling;\nuniform float uSunLightON;\n#if DIR_LIGHTS > 0\nuniform vec3 uDirectionalLightDirectionEC[ DIR_LIGHTS ];\nuniform vec3 uDirectionalLightColor[ DIR_LIGHTS ];\n#endif\n#if POINT_LIGHTS > 0\nuniform vec3 uPointLightPositionEC[ POINT_LIGHTS ];\nuniform vec3 uPointLightColor[ POINT_LIGHTS ];\nuniform vec2 uPointLightDistanceAndDecay[ POINT_LIGHTS ];\n#endif\n#if SPOT_LIGHTS > 0\nuniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightDirectionEC[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightDistanceDecayCos[ SPOT_LIGHTS ];\nuniform vec3 uSpotLightExponent[ SPOT_LIGHTS ];\n#endif\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor)\n{\nreturn diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n{\nreturn f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nvec3 fresnelSchlick(float metalness, float VdotH)\n{\nreturn metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n}\nvec3 F_Schlick(float ndv, vec3 spec)\n{\nreturn spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n}\nfloat D_Phong(float g, float ndh)\n{\nfloat a = pow(8192.0, g);\nreturn (a + 2.0) / 8.0 * pow(ndh, a);\n}\nfloat smithVisibilityG1(float NdotV, float roughness)\n{\nfloat k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\nreturn NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n{\nreturn smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH)\n{\nfloat roughnessSquared = roughness * roughness;\nfloat f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\nreturn roughnessSquared / (M_PI * f * f);\n}\nvoid getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm)\n{\nvec3 h = normalize(viewDir + lightDir);\nfloat NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\nfloat NdotH = clamp(dot(normal, h), 0.0, 1.0);\nvec3 li = lightColor * NdotL;\ndiffuseTerm = li;\nspecularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n}\nvec3 SRGBtoLINEAR3(vec3 srgbIn)\n{\nreturn pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\nvec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\nreturn vec4(linearOut, srgbIn.a);\n}\nvec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR\nreturn pow(linearIn, vec3(1.0/2.2));\n#else\nreturn linearIn;\n#endif\n}\nfloat calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent)\n{\nreturn pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n}\nvec4 czm_S3MPBR(vec3 normalEC, vec3 positionEC, vec2 texCoord, vec4 vertexColor)\n{\nvec3 ng = normalize(normalEC);\nvec3 positionWC = (czm_inverseView * vec4(positionEC, 1.0)).xyz;\n#ifdef HAS_NORMAL_TEXTURE\nvec3 pos_dx = dFdx(positionEC);\nvec3 pos_dy = dFdy(positionEC);\nvec3 tex_dx = dFdx(vec3(texCoord, 0.0));\nvec3 tex_dy = dFdy(vec3(texCoord, 0.0));\nvec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\nt = normalize(t - ng * dot(ng, t));\nvec3 b = normalize(cross(ng, t));\nmat3 tbn = mat3(t, b, ng);\nvec3 n = texture2D(u_normalTexture, texCoord).rgb;\nn = normalize(tbn * (2.0 * n - 1.0));\n#else\nvec3 n = ng;\n#endif\nvec3 v = -normalize(positionEC);\n#ifdef DOUBLE_SIDED\nif (dot(n, v) < 0.0) {\nn = -n;\n}\n#endif\n#ifdef HAS_BASECOLOR_TEXTURE\nvec2 baseColorTexCoord = texCoord;\nbaseColorTexCoord = baseColorTexCoord * u_baseColorUVOffsetAndTiling.zw + u_baseColorUVOffsetAndTiling.xy;\nvec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, baseColorTexCoord));\nbaseColorWithAlpha *= u_baseColorFactor;\n#else\nvec4 baseColorWithAlpha = u_baseColorFactor;\n#endif\nbaseColorWithAlpha *= vertexColor;\nvec3 baseColor = baseColorWithAlpha.rgb;\n#ifdef HAS_METALLICROUGHNESS_TEXTURE\nvec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, texCoord).rgb;\nfloat metalness = clamp(metallicRoughness.b, 0.0, 1.0);\nfloat roughness = clamp(metallicRoughness.g, 0.04, 1.0);\nmetalness *= u_metallicFactor;\nroughness *= u_roughnessFactor;\n#else\nfloat metalness = clamp(u_metallicFactor, 0.0, 1.0);\nfloat roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n#endif\nvec3 f0 = vec3(0.04);\nvec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\nvec3 specularColor = mix(f0, baseColor, metalness);\nfloat NdotV = abs(dot(n, v)) + 0.001;\nvec3 diffuseTerm = vec3(0.0);\nvec3 specularTerm = vec3(0.0);\nvec3 fresnelTerm = F_Schlick(NdotV, specularColor);\nvec3 color = vec3(0.0);\nvec3 lightDiffuseTerm = vec3(0.0);\nvec3 lightSpecularTerm = vec3(0.0);\ngetLightColor(czm_sunDirectionEC, v, n, vec3(0.8), fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\ndiffuseTerm +=lightDiffuseTerm * uSunLightON;\nspecularTerm += lightSpecularTerm * uSunLightON;\n#if DIR_LIGHTS > 0\nfor (int i = 0; i < DIR_LIGHTS; i++) {\ngetLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\ndiffuseTerm +=lightDiffuseTerm;\nspecularTerm += lightSpecularTerm;\n}\n#endif\n#if POINT_LIGHTS > 0\nfor (int i = 0; i < POINT_LIGHTS; i++) {\nvec3 lVector = uPointLightPositionEC[i] - v_positionEC;\nfloat lightDistance = length(lVector);\nfloat lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\nif(lightAttenuation < 0.001) {\ncontinue;\n}\nvec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\nvec3 lightDiffuseTerm = vec3(0.0);\nvec3 lightSpecularTerm = vec3(0.0);\ngetLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\ndiffuseTerm +=lightDiffuseTerm;\nspecularTerm += lightSpecularTerm;\n}\n#endif\n#if SPOT_LIGHTS > 0\nfor (int i = 0; i < SPOT_LIGHTS; i++) {\nvec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\nfloat lightDistance = length(lVector);\nfloat lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCos[i].x, uSpotLightDistanceDecayCos[i].y);\nif(lightAttenuation < 0.001) {\ncontinue;\n}\nfloat spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\nif(spotEffect > uSpotLightDistanceDecayCos[i].z) {\nvec3 spotLightColor = uSpotLightColor[i] * lightAttenuation * spotEffect;\nvec3 lightDiffuseTerm = vec3(0.0);\nvec3 lightSpecularTerm = vec3(0.0);\ngetLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\ndiffuseTerm +=lightDiffuseTerm;\nspecularTerm += lightSpecularTerm;\n}\n}\n#endif\ncolor = baseColor;\ncolor *= max(diffuseTerm, vec3(0.0));\ncolor += max(specularTerm, vec3(0.0));\n#ifdef USE_IBL_LIGHTING\nvec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\nfloat vertexRadius = length(positionWC);\nfloat horizonDotNadir = 1.0 - min(1.0, 6378137.0 / vertexRadius);\nfloat reflectionDotNadir = dot(r, normalize(positionWC));\nr.x = -r.x;\nr = -normalize(czm_temeToPseudoFixed * r);\nr.x = -r.x;\nfloat inverseRoughness = 1.04 - roughness;\ninverseRoughness *= inverseRoughness;\nvec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\nfloat atmosphereHeight = 0.05;\nfloat blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\nfloat blendRegionOffset = roughness * -1.0;\nfloat farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\nfloat aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\nfloat farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\nfloat smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\nvec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\nvec3 nadirColor = belowHorizonColor * 0.5;\nvec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\nvec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\nvec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\nvec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\nfloat diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\nfloat diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\nvec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\nfloat notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\nvec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\nspecularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\nspecularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\nvec2 iblFactor = vec2(1.0);\nfloat luminanceAtZenith = 0.5;\n#ifdef USE_SUN_LUMINANCE\nfloat LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\nfloat S = acos(LdotZenith);\nfloat NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\nfloat sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\nfloat gamma = acos(sunNdotL);\nfloat numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\nfloat denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\nfloat luminance = luminanceAtZenith * (numerator / denominator);\n#endif\nvec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;\nvec3 IBLColor = (diffuseIrradiance * diffuseColor * iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * iblFactor.y);\n#ifdef USE_SUN_LUMINANCE\ncolor += IBLColor * luminance;\n#else\ncolor += IBLColor;\n#endif // end of USE_SUN_LUMINANCE\n#endif // end of USE_IBL_LIGHTING\n#ifdef HAS_OCCLUSION_TEXTURE\ncolor *= texture2D(u_occlusionTexture, texCoord).r;\n#endif\n#ifdef HAS_EMISSIVE_TEXTURE\nvec2 emissiveTexCoord = texCoord;\nemissiveTexCoord = emissiveTexCoord * u_emissiveUVOffsetAndTiling.zw + u_emissiveUVOffsetAndTiling.xy;\nvec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, emissiveTexCoord).rgb);\nemissive *= u_emissiveFactor.rgb;\ncolor += emissive;\n#else\ncolor += u_emissiveFactor.rgb;\n#endif\ncolor = LINEARtoSRGB(color);\nvec4 resultColor = vec4(color, 1.0);\n#ifdef MASK\nif (baseColorWithAlpha.a < u_alphaCutoff)\n{\ndiscard;\n}\nresultColor = vec4(color, 1.0);\n#endif\n#ifdef BLEND\nresultColor = vec4(color, baseColorWithAlpha.a);\n#endif\nreturn resultColor;\n}\n",czm_sampleAndBlend$1="vec4 czm_sampleAndBlend(\nvec4 currentTextureColor,\nvec4 previousColor,\nvec2 tileTextureCoordinates,\nvec4 textureCoordinateRectangle,\nvec4 transparentBackColor,\nbool imageryClipEnable,\nfloat textureAlpha,\nfloat textureBrightness,\nfloat textureContrast,\nfloat textureHue,\nfloat textureSaturation,\nfloat textureOneOverGamma,\nvec2 split,\nvec4 swipe)\n{\nvec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nalphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nvec3 color = currentTextureColor.rgb;\nfloat alpha = currentTextureColor.a;\nif(transparentBackColor.a > 0.01)\n{\nfloat rDiff = abs(transparentBackColor.r - color.r);\nfloat gDiff = abs(transparentBackColor.g - color.g);\nfloat bDiff = abs(transparentBackColor.b - color.b);\nif(rDiff < transparentBackColor.a && gDiff < transparentBackColor.a && bDiff < transparentBackColor.a)\n{\nalpha = 0.0;\n}\n}\nif(imageryClipEnable)\n{\n#ifdef Apply_ImageryClip\nif(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n{\nalpha = 0.0;\n}\n#else\nalpha = 0.0;\n#endif\n}\n#if !defined(APPLY_GAMMA)\nvec4 tempColor = czm_gammaCorrect(vec4(color, alpha));\ncolor = tempColor.rgb;\nalpha = tempColor.a;\n#else\ncolor = pow(color, vec3(textureOneOverGamma));\n#endif\n#ifdef APPLY_SPLIT\nvec2 splitPosition = czm_imagerySplitPosition;\nif (split.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\nalpha = 0.0;\n}\nelse if (split.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\nalpha = 0.0;\n}\nif(split.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\nalpha = 0.0;\n}\nelse if(split.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_SWIPE\nif (gl_FragCoord.x < swipe.x || gl_FragCoord.y > swipe.y) {\nalpha = 0.0;\n}\nelse if (gl_FragCoord.x > swipe.z || gl_FragCoord.y < swipe.w) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_BRIGHTNESS\ncolor = mix(vec3(0.0), color, textureBrightness);\n#endif\n#ifdef APPLY_CONTRAST\ncolor = mix(vec3(0.5), color, textureContrast);\n#endif\n#ifdef APPLY_HUE\ncolor = czm_hue(color, textureHue);\n#endif\n#ifdef APPLY_SATURATION\ncolor = czm_saturation(color, textureSaturation);\n#endif\nfloat sourceAlpha = alpha * textureAlpha;\nfloat outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\nvec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4(outColor, outAlpha);\n}\nvec4 gridTextureSampleAndBlend(\nvec4 previousColor,\nsampler2D textureToSample,\nvec2 tileTextureCoordinates,\nvec4 textureCoordinateRectangle,\nvec4 textureCoordinateTranslationAndScale)\n{\nfloat textureAlpha = 1.0;\nvec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nalphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nvec2 translation = textureCoordinateTranslationAndScale.xy;\nvec2 scale = textureCoordinateTranslationAndScale.zw;\nvec2 textureCoordinates = tileTextureCoordinates * scale + translation;\nvec4 value = texture2D(textureToSample, textureCoordinates);\nvec3 color = value.rgb;\nfloat alpha = value.a;\nfloat sourceAlpha = alpha * textureAlpha;\nfloat outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\nvec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4(outColor, outAlpha);\n}\nvec2 computeTextureCoord(vec2 tileTextureCoordinates, vec4 textureCoordinateTranslationAndScale, vec4 textureSize, bool flipY)\n{\nvec2 translation = textureCoordinateTranslationAndScale.xy;\nvec2 scale = textureCoordinateTranslationAndScale.zw;\nvec2 textureCoordinates = tileTextureCoordinates * scale + translation;\nif(flipY)\n{\ntextureCoordinates.y = 1.0 - textureCoordinates.y;\n}\n#ifdef WEBGPU\nvec2 texelSize = textureSize.zw;\ntextureCoordinates = clamp(textureCoordinates, texelSize, 1.0 - texelSize);\n#endif\nreturn textureCoordinates;\n}\n",czm_sampleOctahedralProjection$1="vec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod)\n{\ndirection /= dot(vec3(1.0), abs(direction));\nvec2 rev = abs(direction.zx) - vec2(1.0);\nvec2 neg = vec2(direction.x < 0.0 ? rev.x : -rev.x,\ndirection.z < 0.0 ? rev.y : -rev.y);\nvec2 uv = direction.y < 0.0 ? neg : direction.xz;\nvec2 coord = 0.5 * uv + vec2(0.5);\nvec2 pixel = 1.0 / textureSize;\nif (lod > 0.0)\n{\nfloat scale = 1.0 / pow(2.0, lod);\nfloat offset = ((textureSize.y + 1.0) / textureSize.x);\ncoord.x *= offset;\ncoord *= scale;\ncoord.x += offset + pixel.x;\ncoord.y += (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n}\nelse\n{\ncoord.x *= (textureSize.y / textureSize.x);\n}\n#ifndef OES_texture_float_linear\nvec3 color1 = texture2D(projectedMap, coord + vec2(0.0, pixel.y)).rgb;\nvec3 color2 = texture2D(projectedMap, coord + vec2(pixel.x, 0.0)).rgb;\nvec3 color3 = texture2D(projectedMap, coord + pixel).rgb;\nvec3 color4 = texture2D(projectedMap, coord).rgb;\nvec2 texturePosition = coord * textureSize;\nfloat fu = fract(texturePosition.x);\nfloat fv = fract(texturePosition.y);\nvec3 average1 = mix(color4, color2, fu);\nvec3 average2 = mix(color1, color3, fu);\nvec3 color = mix(average1, average2, fv);\n#else\nvec3 color = texture2D(projectedMap, coord).rgb;\n#endif\nreturn color;\n}\nvec3 czm_sampleOctahedralProjection(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod, float maxLod) {\nfloat currentLod = floor(lod);\nfloat nextLod = min(currentLod + 1.0, maxLod);\nvec3 colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, currentLod);\nvec3 colorNextLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, nextLod);\nreturn mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation$1="vec3 czm_saturation(vec3 rgb, float adjustment)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nvec3 intensity = vec3(dot(rgb, W));\nreturn mix(intensity, rgb, adjustment);\n}\n",czm_shadowDepthCompare="float czm_sampleShadowMap(samplerCube shadowMap, vec3 d)\n{\nreturn czm_unpackDepth(textureCube(shadowMap, d));\n}\nfloat czm_sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\nreturn texture2D(shadowMap, uv).r;\n#else\nreturn czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\nfloat czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\nreturn step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\nfloat czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\nreturn step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n",czm_shadowVisibility="float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\nfloat strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\nfloat strength = step(0.0, nDotL);\n#endif\nvisibility *= strength;\n#endif\nvisibility = max(visibility, darkness);\nreturn visibility;\n}\n#ifdef USE_CUBE_MAP_SHADOW\nfloat czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\nfloat depthBias = shadowParameters.depthBias;\nfloat depth = shadowParameters.depth;\nfloat nDotL = shadowParameters.nDotL;\nfloat normalShadingSmooth = shadowParameters.normalShadingSmooth;\nfloat darkness = shadowParameters.darkness;\nvec3 uvw = shadowParameters.texCoords;\ndepth -= depthBias;\nfloat visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\nreturn czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\nfloat czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\nfloat depthBias = shadowParameters.depthBias;\nfloat depth = shadowParameters.depth;\nfloat nDotL = shadowParameters.nDotL;\nfloat normalShadingSmooth = shadowParameters.normalShadingSmooth;\nfloat darkness = shadowParameters.darkness;\nvec2 uv = shadowParameters.texCoords;\ndepth -= depthBias;\n#ifdef USE_SOFT_SHADOWS\nvec2 texelStepSize = shadowParameters.texelStepSize;\nfloat radius = 1.0;\nfloat dx0 = -texelStepSize.x * radius;\nfloat dy0 = -texelStepSize.y * radius;\nfloat dx1 = texelStepSize.x * radius;\nfloat dy1 = texelStepSize.y * radius;\nfloat visibility = (\nczm_shadowDepthCompare(shadowMap, uv, depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\n) * (1.0 / 9.0);\n#else\nfloat visibility = czm_shadowDepthCompare(shadowMap, uv, depth);\n#endif\nreturn czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n",czm_signNotZero$1="float czm_signNotZero(float value)\n{\nreturn value >= 0.0 ? 1.0 : -1.0;\n}\nvec2 czm_signNotZero(vec2 value)\n{\nreturn vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\nvec3 czm_signNotZero(vec3 value)\n{\nreturn vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n}\nvec4 czm_signNotZero(vec4 value)\n{\nreturn vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n}\n",czm_sketchMode$1="uniform sampler2D uNormalDepthTexture;\nuniform int uFillStyle;\nfloat edgeDetection(float lineWidth)\n{\nvec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\nvec2 off = lineWidth / czm_globeDepthTextureDim.xy;\nvec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\nvec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\nval_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\nvec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\nvec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\nval_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\nvec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\nvec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\nval_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\nvec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\nvec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\nval_se.xyz = (val_se.xyz * 2.0) - 1.0;\nfloat discontinuity = 0.0;\nfloat dot0 = dot(val_nw.xyz, val_se.xyz);\nfloat dot1 = dot(val_ne.xyz, val_sw.xyz);\ndiscontinuity = 0.5*(dot0+dot1);\nreturn discontinuity;\n}\nvec4 czm_sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\nvec4 outputColor = inputColor;\nfloat discontinuity = edgeDetection(lineWidth);\ndiscontinuity = clamp(discontinuity, 0.0, 1.0);\nif(uFillStyle == 1)\n{\noutputColor = lineColor;\noutputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\noutputColor.a *= lineColor.a;\n}\nelse\n{\nvec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\noutputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n}\nreturn outputColor;\n}\n",czm_sphericalHarmonics$1="vec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])\n{\nconst float c1 = 0.429043;\nconst float c2 = 0.511664;\nconst float c3 = 0.743125;\nconst float c4 = 0.886227;\nconst float c5 = 0.247708;\nvec3 L00 = coefficients[0];\nvec3 L1_1 = coefficients[1];\nvec3 L10 = coefficients[2];\nvec3 L11 = coefficients[3];\nvec3 L2_2 = coefficients[4];\nvec3 L2_1 = coefficients[5];\nvec3 L20 = coefficients[6];\nvec3 L21 = coefficients[7];\nvec3 L22 = coefficients[8];\nfloat x = normal.x;\nfloat y = normal.y;\nfloat z = normal.z;\nreturn c1 * L22 * (x * x - y * y) + c3 * L20 * z * z + c4 * L00 - c5 * L20 +\n2.0 * c1 * (L2_2 * x * y + L21 * x * z + L2_1 * y * z) +\n2.0 * c2 * (L11 * x + L1_1 * y + L10 * z);\n}\n",czm_tangentToEyeSpaceMatrix$1="mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\nvec3 normal = normalize(normalEC);\nvec3 tangent = normalize(tangentEC);\nvec3 bitangent = normalize(bitangentEC);\nreturn mat3(tangent.x , tangent.y , tangent.z,\nbitangent.x, bitangent.y, bitangent.z,\nnormal.x , normal.y , normal.z);\n}\n",czm_transformPlane$1="vec4 czm_transformPlane(vec4 clippingPlane, mat4 transform) {\nvec3 transformedDirection = normalize((transform * vec4(clippingPlane.xyz, 0.0)).xyz);\nvec3 transformedPosition = (transform * vec4(clippingPlane.xyz * -clippingPlane.w, 1.0)).xyz;\nvec4 transformedPlane;\ntransformedPlane.xyz = transformedDirection;\ntransformedPlane.w = -dot(transformedDirection, transformedPosition);\nreturn transformedPlane;\n}\n",czm_translateRelativeToEye$1="vec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\nvec3 highDifference = high - czm_encodedCameraPositionMCHigh;\nvec3 lowDifference = low - czm_encodedCameraPositionMCLow;\nreturn vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong$1="vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\nif (czm_sceneMode == czm_sceneMode3D) {\ndiffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n}\ndiffuse = clamp(diffuse, 0.0, 1.0);\nfloat specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\nvec3 materialDiffuse = material.diffuse * 0.5;\nvec3 ambient = materialDiffuse;\nvec3 color = ambient + material.emission;\ncolor += materialDiffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\n",czm_transpose$1="mat2 czm_transpose(mat2 matrix)\n{\nreturn mat2(\nmatrix[0][0], matrix[1][0],\nmatrix[0][1], matrix[1][1]);\n}\nmat3 czm_transpose(mat3 matrix)\n{\nreturn mat3(\nmatrix[0][0], matrix[1][0], matrix[2][0],\nmatrix[0][1], matrix[1][1], matrix[2][1],\nmatrix[0][2], matrix[1][2], matrix[2][2]);\n}\nmat4 czm_transpose(mat4 matrix)\n{\nreturn mat4(\nmatrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\nmatrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\nmatrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\nmatrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackDepth$1="float czm_unpackDepth(vec4 packedDepth)\n{\nreturn dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n}\n",czm_unpackFloat$1="#define SHIFT_RIGHT_8 0.00390625 //1.0 / 256.0\n#define SHIFT_RIGHT_16 0.00001525878 //1.0 / 65536.0\n#define SHIFT_RIGHT_24 5.960464477539063e-8//1.0 / 16777216.0\n#define BIAS 38.0\nfloat czm_unpackFloat(vec4 packedFloat)\n{\npackedFloat *= 255.0;\nfloat temp = packedFloat.w / 2.0;\nfloat exponent = floor(temp);\nfloat sign = (temp - exponent) * 2.0;\nexponent = exponent - float(BIAS);\nsign = sign * 2.0 - 1.0;\nsign = -sign;\nfloat unpacked = sign * packedFloat.x * float(SHIFT_RIGHT_8);\nunpacked += sign * packedFloat.y * float(SHIFT_RIGHT_16);\nunpacked += sign * packedFloat.z * float(SHIFT_RIGHT_24);\nreturn unpacked * pow(10.0, exponent);\n}\n",czm_unpackValue$1="float czm_unpackValue(vec4 packedValue)\n{\nfloat SHIFT_LEFT16 = 65536.0;\nfloat SHIFT_LEFT8 = 256.0;\nvec4 value = packedValue * 255.0;\nreturn value.r * SHIFT_LEFT16 + value.g * SHIFT_LEFT8 + value.b - 9000.0;\n}\n",czm_vertexLogDepth$1="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nvarying vec3 v_logPositionEC;\n#endif\n#endif\nvec4 czm_updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n#ifdef SHADOW_MAP\nvec3 logPositionEC = (czm_inverseProjection * coords).xyz;\nv_logPositionEC = logPositionEC;\n#endif\ncoords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\nreturn coords;\n}\nvoid czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = 1.0 - czm_currentFrustum.x + gl_Position.w;\ngl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\nvoid czm_vertexLogDepth(vec4 clipCoords)\n{\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = 1.0 - czm_currentFrustum.x + clipCoords.w;\nczm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates$1="vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)\n{\nfloat x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\nfloat y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\nfloat z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\nvec4 q = vec4(x, y, z, 1.0);\nq /= fragmentCoordinate.w;\nif (!(czm_inverseProjection == mat4(0.0)))\n{\nq = czm_inverseProjection * q;\n}\nelse\n{\nfloat top = czm_frustumPlanes.x;\nfloat bottom = czm_frustumPlanes.y;\nfloat left = czm_frustumPlanes.z;\nfloat right = czm_frustumPlanes.w;\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nq.x = (q.x * (right - left) + left + right) * 0.5;\nq.y = (q.y * (top - bottom) + bottom + top) * 0.5;\nq.z = (q.z * (near - far) - near - far) * 0.5;\nq.w = 1.0;\n}\nreturn q;\n}\nvec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)\n{\n#ifdef LOG_DEPTH\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nfloat log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\nfloat depthFromNear = pow(2.0, log2Depth) - 1.0;\nfloat depthFromCamera = depthFromNear + near;\nvec4 windowCoord = vec4(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\neyeCoordinate.w = 1.0 / depthFromCamera;\nreturn eyeCoordinate;\n#else\nvec4 windowCoord = vec4(fragmentCoordinateXY, depthOrLogDepth, 1.0);\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n#endif\nreturn eyeCoordinate;\n}\n",czm_writeDepthClampedToFarPlane$1="#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\nvoid czm_writeDepthClampedToFarPlane()\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && !defined(LOG_DEPTH)\ngl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n",czm_writeLogDepth$1="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\nuniform vec2 u_polygonOffset;\n#endif\n#endif\nvoid czm_writeLogDepth(float depth)\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && defined(LOG_DEPTH)\nif (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {\ndiscard;\n}\n#ifdef POLYGON_OFFSET\nfloat factor = u_polygonOffset[0];\nfloat units = u_polygonOffset[1];\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nfloat x = dFdx(depth);\nfloat y = dFdy(depth);\nfloat m = sqrt(x * x + y * y);\ndepth += m * factor;\n#endif\n#endif\ngl_FragDepthEXT = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\ngl_FragDepthEXT += czm_epsilon7 * units;\n#endif\n#endif\n}\nvoid czm_writeLogDepth() {\n#ifdef LOG_DEPTH\nczm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",czm_writeNonPerspective$1="float czm_writeNonPerspective(float value, float w) {\nreturn value * w;\n}\nvec2 czm_writeNonPerspective(vec2 value, float w) {\nreturn value * w;\n}\nvec3 czm_writeNonPerspective(vec3 value, float w) {\nreturn value * w;\n}\nvec4 czm_writeNonPerspective(vec4 value, float w) {\nreturn value * w;\n}\n",czm_XYZToRGB$1="vec3 czm_XYZToRGB(vec3 Yxy)\n{\nconst mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n-1.5371, 1.8760, -0.2040,\n-0.4985, 0.0416, 1.0572);\nvec3 xyz;\nxyz.r = Yxy.r * Yxy.g / Yxy.b;\nxyz.g = Yxy.r;\nxyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\nreturn XYZ2RGB * xyz;\n}\n",G$1g={czm_degreesPerRadian:czm_degreesPerRadian$1,czm_depthRange:czm_depthRange$1,czm_ellipsoidInverseRadii:czm_ellipsoidInverseRadii$1,czm_ellipsoidRadii:czm_ellipsoidRadii$1,czm_epsilon1:czm_epsilon1$1,czm_epsilon2:czm_epsilon2$1,czm_epsilon3:czm_epsilon3$1,czm_epsilon4:czm_epsilon4$1,czm_epsilon5:czm_epsilon5$1,czm_epsilon6:czm_epsilon6$1,czm_epsilon7:czm_epsilon7$1,czm_infinity:czm_infinity$1,czm_oneOverPi:czm_oneOverPi$1,czm_oneOverTwoPi:czm_oneOverTwoPi$1,czm_passCesium3DTile:czm_passCesium3DTile$1,czm_passCesium3DTileClassification:czm_passCesium3DTileClassification$1,czm_passCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow$1,czm_passClassification:czm_passClassification$1,czm_passCompute:czm_passCompute$1,czm_passEnvironment:czm_passEnvironment$1,czm_passGlobe:czm_passGlobe$1,czm_passGround:czm_passGround$1,czm_passOpaque:czm_passOpaque$1,czm_passOverlay:czm_passOverlay$1,czm_passTerrainClassification:czm_passTerrainClassification$1,czm_passTranslucent:czm_passTranslucent$1,czm_pi:czm_pi$1,czm_piOverFour:czm_piOverFour$1,czm_piOverSix:czm_piOverSix$1,czm_piOverThree:czm_piOverThree$1,czm_piOverTwo:czm_piOverTwo$1,czm_radiansPerDegree:czm_radiansPerDegree$1,czm_sceneMode2D:czm_sceneMode2D$1,czm_sceneMode3D:czm_sceneMode3D$1,czm_sceneModeColumbusView:czm_sceneModeColumbusView$1,czm_sceneModeMorphing:czm_sceneModeMorphing$1,czm_solarRadius:czm_solarRadius$1,czm_threePiOver2:czm_threePiOver2$1,czm_twoPi:czm_twoPi$1,czm_webMercatorMaxLatitude:czm_webMercatorMaxLatitude$1,czm_depthRangeStruct:czm_depthRangeStruct$1,czm_ellipsoid:czm_ellipsoid$1,czm_material:czm_material$1,czm_materialInput:czm_materialInput$1,czm_ray:czm_ray$1,czm_raySegment:czm_raySegment$1,czm_s3mMaterialInput:czm_s3mMaterialInput$1,czm_shadowParameters:czm_shadowParameters$1,czm_acesTonemapping:czm_acesTonemapping$1,czm_adjustColor:czm_adjustColor$1,czm_alphaWeight:czm_alphaWeight$1,czm_antialias:czm_antialias$1,czm_approximateSphericalCoordinates:czm_approximateSphericalCoordinates$1,czm_branchFreeTernary:czm_branchFreeTernary$1,czm_cascadeColor:czm_cascadeColor$1,czm_cascadeDistance:czm_cascadeDistance$1,czm_cascadeMatrix:czm_cascadeMatrix$1,czm_cascadeWeights:czm_cascadeWeights$1,czm_clip:czm_clip$1,czm_columbusViewMorph:czm_columbusViewMorph$1,czm_computeLightColorInFP:czm_computeLightColorInFP,czm_computeLightColorInstanceInFP:czm_computeLightColorInstanceInFP,czm_computeNormal:czm_computeNormal$1,czm_computePosition:czm_computePosition$1,czm_cosineAndSine:czm_cosineAndSine$1,czm_decompressTextureCoordinates:czm_decompressTextureCoordinates$1,czm_depthClampFarPlane:czm_depthClampFarPlane$1,czm_directionLight:czm_directionLight,czm_eastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates$1,czm_ellipsoidContainsPoint:czm_ellipsoidContainsPoint$1,czm_ellipsoidNew:czm_ellipsoidNew$1,czm_ellipsoidWgs84TextureCoordinates:czm_ellipsoidWgs84TextureCoordinates$1,czm_equalsEpsilon:czm_equalsEpsilon$1,czm_executeExcavation:czm_executeExcavation$1,czm_eyeOffset:czm_eyeOffset$1,czm_eyeToWindowCoordinates:czm_eyeToWindowCoordinates$1,czm_fastApproximateAtan:czm_fastApproximateAtan$1,czm_fog:czm_fog$1,czm_gammaCorrect:czm_gammaCorrect$1,czm_geodeticSurfaceNormal:czm_geodeticSurfaceNormal$1,czm_getDefaultMaterial:czm_getDefaultMaterial$1,czm_getEmissiveTextureColor:czm_getEmissiveTextureColor$1,czm_getHorizontalColor:czm_getHorizontalColor$1,czm_getHypsometricColor:czm_getHypsometricColor$1,czm_getLambertDiffuse:czm_getLambertDiffuse$1,czm_getSpecular:czm_getSpecular$1,czm_getTexColorForS3M:czm_getTexColorForS3M,czm_getTextureMatrixFromZValue:czm_getTextureMatrixFromZValue,czm_getVolumeValue:czm_getVolumeValue$1,czm_getVolumeValueMultiResolution:czm_getVolumeValueMultiResolution,czm_getWaterNoise:czm_getWaterNoise$1,czm_getWgs84EllipsoidEC:czm_getWgs84EllipsoidEC$1,czm_HSBToRGB:czm_HSBToRGB$1,czm_HSLToRGB:czm_HSLToRGB$1,czm_hue:czm_hue$1,czm_inverseGamma:czm_inverseGamma$1,czm_inverseMatrix:czm_inverseMatrix$1,czm_isEmpty:czm_isEmpty$1,czm_isFull:czm_isFull$1,czm_latitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction$1,czm_lineDistance:czm_lineDistance$1,czm_luminance:czm_luminance$1,czm_metersPerPixel:czm_metersPerPixel$1,czm_modelToWindowCoordinates:czm_modelToWindowCoordinates$1,czm_multiplyWithColorBalance:czm_multiplyWithColorBalance$1,czm_nearFarScalar:czm_nearFarScalar$1,czm_octDecode:czm_octDecode$1,czm_packDepth:czm_packDepth$1,czm_packValue:czm_packValue$1,czm_phong:czm_phong$1,czm_planeDistance:czm_planeDistance$1,czm_pointAlongRay:czm_pointAlongRay$1,czm_rayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval$1,czm_raySphereIntersectionInterval:czm_raySphereIntersectionInterval,czm_readDepth:czm_readDepth$1,czm_readNonPerspective:czm_readNonPerspective$1,czm_reverseLogDepth:czm_reverseLogDepth$1,czm_RGBToHSB:czm_RGBToHSB$1,czm_RGBToHSL:czm_RGBToHSL$1,czm_RGBToXYZ:czm_RGBToXYZ$1,czm_RollerShutter:czm_RollerShutter$1,czm_s3mBatchOperation:czm_s3mBatchOperation$1,czm_S3MPBR:czm_S3MPBR$1,czm_sampleAndBlend:czm_sampleAndBlend$1,czm_sampleOctahedralProjection:czm_sampleOctahedralProjection$1,czm_saturation:czm_saturation$1,czm_shadowDepthCompare:czm_shadowDepthCompare,czm_shadowVisibility:czm_shadowVisibility,czm_signNotZero:czm_signNotZero$1,czm_sketchMode:czm_sketchMode$1,czm_sphericalHarmonics:czm_sphericalHarmonics$1,czm_tangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix$1,czm_transformPlane:czm_transformPlane$1,czm_translateRelativeToEye:czm_translateRelativeToEye$1,czm_translucentPhong:czm_translucentPhong$1,czm_transpose:czm_transpose$1,czm_unpackDepth:czm_unpackDepth$1,czm_unpackFloat:czm_unpackFloat$1,czm_unpackValue:czm_unpackValue$1,czm_vertexLogDepth:czm_vertexLogDepth$1,czm_windowToEyeCoordinates:czm_windowToEyeCoordinates$1,czm_writeDepthClampedToFarPlane:czm_writeDepthClampedToFarPlane$1,czm_writeLogDepth:czm_writeLogDepth$1,czm_writeNonPerspective:czm_writeNonPerspective$1,czm_XYZToRGB:czm_XYZToRGB$1},czm_degreesPerRadian="/**\n * A built-in GLSL floating-point constant for converting radians to degrees.\n *\n * @alias czm_degreesPerRadian\n * @glslConstant\n *\n * @see CesiumMath.DEGREES_PER_RADIAN\n *\n * @example\n * // GLSL declaration\n * const float czm_degreesPerRadian = ...;\n *\n * // Example\n * float deg = czm_degreesPerRadian * rad;\n */\nconst float czm_degreesPerRadian = 57.29577951308232;\n",czm_depthRange="/**\n * A built-in GLSL vec2 constant for defining the depth range.\n * This is a workaround to a bug where IE11 does not implement gl_DepthRange.\n *\n * @alias czm_depthRange\n * @glslConstant\n *\n * @example\n * // GLSL declaration\n * float depthRangeNear = czm_depthRange.near;\n * float depthRangeFar = czm_depthRange.far;\n *\n */\nconst czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n",czm_ellipsoidInverseRadii="/**\n * The reciprocal of the radius of the WGS84 ellipsoid.\n *\n * @name czm_ellipsoidInverseRadii\n * @glslConstant\n */\nconst czm_ellipsoidInverseRadii = vec3<f32>(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.314245);\n",czm_ellipsoidRadii="/**\n * The radius of the WGS84 ellipsoid.\n *\n * @name czm_ellipsoidRadii\n * @glslConstant\n */\nconst czm_ellipsoidRadii = vec3<f32>(6378137.0, 6378137.0, 6356752.314245);\n",czm_epsilon1="/**\n * 0.1\n *\n * @name czm_epsilon1\n * @glslConstant\n */\nconst czm_epsilon1 = 0.1;\n",czm_epsilon2="/**\n * 0.01\n *\n * @name czm_epsilon2\n * @glslConstant\n */\nconst czm_epsilon2 = 0.01;\n",czm_epsilon3="/**\n * 0.001\n *\n * @name czm_epsilon3\n * @glslConstant\n */\nconst czm_epsilon3 = 0.001;\n",czm_epsilon4="/**\n * 0.0001\n *\n * @name czm_epsilon4\n * @glslConstant\n */\nconst czm_epsilon4 = 0.0001;\n",czm_epsilon5="/**\n * 0.00001\n *\n * @name czm_epsilon5\n * @glslConstant\n */\nconst czm_epsilon5 = 0.00001;\n",czm_epsilon6="/**\n * 0.000001\n *\n * @name czm_epsilon6\n * @glslConstant\n */\nconst czm_epsilon6 = 0.000001;\n",czm_epsilon7="/**\n * 0.0000001\n *\n * @name czm_epsilon7\n * @glslConstant\n */\nconst czm_epsilon7 = 0.0000001;\n",czm_infinity="/**\n * DOC_TBA\n *\n * @name czm_infinity\n * @glslConstant\n */\nconst float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?\n",czm_oneOverPi="/**\n * A built-in GLSL floating-point constant for <code>1/pi</code>.\n *\n * @alias czm_oneOverPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverPi = ...;\n *\n * // Example\n * float pi = 1.0 / czm_oneOverPi;\n */\nconst float czm_oneOverPi = 0.3183098861837907;\n",czm_oneOverTwoPi="/**\n * A built-in GLSL floating-point constant for <code>1/2pi</code>.\n *\n * @alias czm_oneOverTwoPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverTwoPi = ...;\n *\n * // Example\n * float pi = 2.0 * czm_oneOverTwoPi;\n */\nconst float czm_oneOverTwoPi = 0.15915494309189535;\n",czm_passCesium3DTile="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}\n *\n * @name czm_passCesium3DTile\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTile = 4.0;\n",czm_passCesium3DTileClassification="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}\n *\n * @name czm_passCesium3DTileClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassification = 5.0;\n",czm_passCesium3DTileClassificationIgnoreShow="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}\n *\n * @name czm_passCesium3DTileClassificationIgnoreShow\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n",czm_passClassification="/**\n * The automatic GLSL constant for {@link Pass#CLASSIFICATION}\n *\n * @name czm_passClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passClassification = 7.0;\n",czm_passCompute="/**\n * The automatic GLSL constant for {@link Pass#COMPUTE}\n *\n * @name czm_passCompute\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCompute = 1.0;\n",czm_passEnvironment="/**\n * The automatic GLSL constant for {@link Pass#ENVIRONMENT}\n *\n * @name czm_passEnvironment\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passEnvironment = 0.0;\n",czm_passGlobe="/**\n * The automatic GLSL constant for {@link Pass#GLOBE}\n *\n * @name czm_passGlobe\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGlobe = 2.0;\n",czm_passGround="/**\n * The automatic GLSL constant for {@link Pass#GROUND}\n *\n * @name czm_passGround\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGround = 4.0;\n",czm_passOpaque="/**\n * The automatic GLSL constant for {@link Pass#OPAQUE}\n *\n * @name czm_passOpaque\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOpaque = 12.0;\n",czm_passOverlay="/**\n * The automatic GLSL constant for {@link Pass#OVERLAY}\n *\n * @name czm_passOverlay\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOverlay = 20.0;",czm_passTerrainClassification="/**\n * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}\n *\n * @name czm_passTerrainClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTerrainClassification = 3.0;\n",czm_passTranslucent="/**\n * The automatic GLSL constant for {@link Pass#TRANSLUCENT}\n *\n * @name czm_passTranslucent\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTranslucent = 18.0;",czm_pi="/**\n * A built-in GLSL floating-point constant for <code>Math.PI</code>.\n *\n * @alias czm_pi\n * @glslConstant\n *\n * @see CesiumMath.PI\n *\n * @example\n * // GLSL declaration\n * const float czm_pi = ...;\n *\n * // Example\n * float twoPi = 2.0 * czm_pi;\n */\nconst czm_pi = 3.141592653589793;\n",czm_piOverFour="/**\n * A built-in GLSL floating-point constant for <code>pi/4</code>.\n *\n * @alias czm_piOverFour\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_FOUR\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverFour = ...;\n *\n * // Example\n * float pi = 4.0 * czm_piOverFour;\n */\nconst float czm_piOverFour = 0.7853981633974483;\n",czm_piOverSix="/**\n * A built-in GLSL floating-point constant for <code>pi/6</code>.\n *\n * @alias czm_piOverSix\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_SIX\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverSix = ...;\n *\n * // Example\n * float pi = 6.0 * czm_piOverSix;\n */\nconst float czm_piOverSix = 0.5235987755982988;\n",czm_piOverThree="/**\n * A built-in GLSL floating-point constant for <code>pi/3</code>.\n *\n * @alias czm_piOverThree\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_THREE\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverThree = ...;\n *\n * // Example\n * float pi = 3.0 * czm_piOverThree;\n */\nconst float czm_piOverThree = 1.0471975511965976;\n",czm_piOverTwo="/**\n * A built-in GLSL floating-point constant for <code>pi/2</code>.\n *\n * @alias czm_piOverTwo\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverTwo = ...;\n *\n * // Example\n * float pi = 2.0 * czm_piOverTwo;\n */\nconst float czm_piOverTwo = 1.5707963267948966;\n",czm_radiansPerDegree="/**\n * A built-in GLSL floating-point constant for converting degrees to radians.\n *\n * @alias czm_radiansPerDegree\n * @glslConstant\n *\n * @see CesiumMath.RADIANS_PER_DEGREE\n *\n * @example\n * // GLSL declaration\n * const float czm_radiansPerDegree = ...;\n *\n * // Example\n * float rad = czm_radiansPerDegree * deg;\n */\nconst czm_radiansPerDegree = 0.017453292519943295;\n",czm_sceneMode2D="/**\n * The constant identifier for the 2D {@link SceneMode}\n *\n * @name czm_sceneMode2D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode2D = 2.0;\n",czm_sceneMode3D="/**\n * The constant identifier for the 3D {@link SceneMode}\n *\n * @name czm_sceneMode3D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode3D = 3.0;\n",czm_sceneModeColumbusView="/**\n * The constant identifier for the Columbus View {@link SceneMode}\n *\n * @name czm_sceneModeColumbusView\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneModeColumbusView = 1.0;\n",czm_sceneModeMorphing="/**\n * The constant identifier for the Morphing {@link SceneMode}\n *\n * @name czm_sceneModeMorphing\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n */\nconst float czm_sceneModeMorphing = 0.0;\n",czm_solarRadius="/**\n * A built-in GLSL floating-point constant for one solar radius.\n *\n * @alias czm_solarRadius\n * @glslConstant\n *\n * @see CesiumMath.SOLAR_RADIUS\n *\n * @example\n * // GLSL declaration\n * const float czm_solarRadius = ...;\n */\nconst float czm_solarRadius = 695500000.0;\n",czm_threePiOver2="/**\n * A built-in GLSL floating-point constant for <code>3pi/2</code>.\n *\n * @alias czm_threePiOver2\n * @glslConstant\n *\n * @see CesiumMath.THREE_PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_threePiOver2 = ...;\n *\n * // Example\n * float pi = (2.0 / 3.0) * czm_threePiOver2;\n */\nconst float czm_threePiOver2 = 4.71238898038469;\n",czm_twoPi="/**\n * A built-in GLSL floating-point constant for <code>2pi</code>.\n *\n * @alias czm_twoPi\n * @glslConstant\n *\n * @see CesiumMath.TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_twoPi = ...;\n *\n * // Example\n * float pi = czm_twoPi / 2.0;\n */\nconst float czm_twoPi = 6.283185307179586;\n",czm_webMercatorMaxLatitude="/**\n * The maximum latitude, in radians, both North and South, supported by a Web Mercator\n * (EPSG:3857) projection. Technically, the Mercator projection is defined\n * for any latitude up to (but not including) 90 degrees, but it makes sense\n * to cut it off sooner because it grows exponentially with increasing latitude.\n * The logic behind this particular cutoff value, which is the one used by\n * Google Maps, Bing Maps, and Esri, is that it makes the projection\n * square. That is, the rectangle is equal in the X and Y directions.\n *\n * The constant value is computed as follows:\n * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))\n *\n * @name czm_webMercatorMaxLatitude\n * @glslConstant\n */\nconst float czm_webMercatorMaxLatitude = 1.4844222297453324;\n",czm_depthRangeStruct="/**\n * @name czm_depthRangeStruct\n * @glslStruct\n */\nstruct czm_depthRangeStruct\n{\n float near;\n float far;\n};\n",czm_ellipsoid="/** DOC_TBA\n *\n * @name czm_ellipsoid\n * @glslStruct\n */\nstruct czm_ellipsoid\n{\n vec3 center;\n vec3 radii;\n vec3 inverseRadii;\n vec3 inverseRadiiSquared;\n};\n",czm_material="/**\n * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.\n *\n * @name czm_material\n * @glslStruct\n *\n * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n * @property {float} specular Intensity of incoming light reflecting in a single direction.\n * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n * @property {float} alpha Opacity of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n */\nstruct czm_material\n{\n diffuse : vec3<f32>;\n specular : f32;\n shininess : f32;\n normal : vec3<f32>;\n emission : vec3<f32>;\n alpha : f32;\n};\n",czm_materialInput="/**\n * Used as input to every material's czm_getMaterial function.\n *\n * @name czm_materialInput\n * @glslStruct\n *\n * @property {float} s 1D texture coordinates.\n * @property {vec2} st 2D texture coordinates.\n * @property {vec3} str 3D texture coordinates.\n * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.\n * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.\n * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.\n * @property {float} height The height of the terrain in meters above or below the WGS84 ellipsoid. Only available for globe materials.\n * @property {float} slope The slope of the terrain normalized from 0 to 1. 0 is completely vertical, 1 is completely flat. Only available for globe materials.\n */\nstruct czm_materialInput\n{\n s : f32;\n st : vec2<f32>;\n str : vec3<f32>;\n normalEC : vec3<f32>;\n tangentToEyeMatrix : mat3x3<f32>;\n positionToEyeEC : vec3<f32>;\n height : f32;\n slope : f32;\n};\n",czm_ray="/**\n * DOC_TBA\n *\n * @name czm_ray\n * @glslStruct\n */\nstruct czm_ray\n{\n origin : vec3<f32>;\n direction : vec3<f32>;\n};\n",czm_raySegment="/**\n * DOC_TBA\n *\n * @name czm_raySegment\n * @glslStruct\n */\nstruct czm_raySegment\n{\n start : f32;\n stop : f32;\n};\n\n/**\n * DOC_TBA\n *\n * @name czm_emptyRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\n\n/**\n * DOC_TBA\n *\n * @name czm_fullRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n",czm_s3mMaterialInput="struct czm_s3mMaterialInput\n{\n vec4 ambientColor;\n vec4 diffuseColor;\n vec4 ambientLightColor;\n vec4 sunLightColor;\n mat4 texMatrix;\n float texture0Width;\n float texture1Width;\n vec3 sunDirectionEC;\n float sunLightON;\n};\n",czm_shadowParameters="struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\n texCoords : vec3<f32>,\n#else\n texCoords : vec2<f32>,\n#endif\n\n depthBias : f32,\n depth : f32,\n nDotL : f32,\n texelStepSize : vec2<f32>,\n normalShadingSmooth : f32,\n darkness : f32,\n shadowMapIndex : f32\n};\n",czm_acesTonemapping="// See:\n// https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/\n\nfn czm_acesTonemapping(inColor : vec3<f32>) -> vec3<f32> {\n var color = inColor;\n var g = 0.985f;\n var a = 0.065f;\n var b = 0.0001f;\n var c = 0.433f;\n var d = 0.238f;\n color = (color * (color + a) - b) / (color * (g * color + c) + d);\n color = clamp(color, vec3<f32>(0.0f, 0.0f, 0.0f), vec3<f32>(1.0f, 1.0f, 1.0f));\n return color;\n}\n",czm_adjustColor="uniform float uBrightness;\nuniform float uContrast;\nuniform float uHue;\nuniform float uSaturation;\nuniform float uOneOverGamma;\nvec3 czm_adjustColor(vec3 inputColor)\n{\n vec3 outputColor = inputColor;\n outputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\n outputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\n outputColor.rgb = czm_hue(outputColor.rgb, uHue);\n outputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\n outputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\n outputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\n return outputColor;\n}",czm_alphaWeight="\nfn czm_alphaWeight(a : f32) -> f32\n{\n var z = (gl_FragCoord.z - Scene.uViewportTransformation[3][2]) / Scene.uViewportTransformation[2][2];\n\n // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:\n // http://jcgt.org/published/0002/02/09/\n return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n",czm_antialias="/**\n * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.\n *\n * @name czm_antialias\n * @glslFunction\n *\n * @param {vec4} color1 The color on one side of the edge.\n * @param {vec4} color2 The color on the other side of the edge.\n * @param {vec4} currentcolor The current color, either <code>color1</code> or <code>color2</code>.\n * @param {float} dist The distance to the edge in texture coordinates.\n * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.\n * @returns {vec4} The anti-aliased color.\n *\n * @example\n * // GLSL declarations\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);\n *\n * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space\n * float dist = abs(textureCoordinates.t - 0.5);\n * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));\n * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);\n */\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\n float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\n float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\n val1 = val1 * (1.0 - val2);\n val1 = val1 * val1 * (3.0 - (2.0 * val1));\n val1 = pow(val1, 0.5); //makes the transition nicer\n \n vec4 midColor = (color1 + color2) * 0.5;\n return mix(midColor, currentColor, val1);\n}\n\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\n return czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n",czm_approximateSphericalCoordinates="/**\n * Approximately computes spherical coordinates given a normal.\n * Uses approximate inverse trigonometry for speed and consistency,\n * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.\n *\n * @name czm_approximateSphericalCoordinates\n * @glslFunction\n *\n * @param {vec3} normal arbitrary-length normal.\n *\n * @returns {vec2} Approximate latitude and longitude spherical coordinates.\n */\nvec2 czm_approximateSphericalCoordinates(vec3 normal) {\n // Project into plane with vertical for latitude\n float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\n float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\n return vec2(latitudeApproximation, longitudeApproximation);\n}\n",czm_branchFreeTernary="/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a float expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {float} a Value to return if the comparison is true.\n * @param {float} b Value to return if the comparison is false.\n *\n * @returns {float} equivalent of comparison ? a : b\n */\nfloat czm_branchFreeTernary(bool comparison, float a, float b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec2 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec2} a Value to return if the comparison is true.\n * @param {vec2} b Value to return if the comparison is false.\n *\n * @returns {vec2} equivalent of comparison ? a : b\n */\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec3 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec4 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n",czm_cascadeColor="\nvec4 czm_cascadeColor(vec4 weights)\n{\n return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\n vec4(0.0, 1.0, 0.0, 1.0) * weights.y +\n vec4(0.0, 0.0, 1.0, 1.0) * weights.z +\n vec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n",czm_cascadeDistance="\nuniform vec4 shadowMap_cascadeDistances;\n\nfloat czm_cascadeDistance(vec4 weights)\n{\n return dot(shadowMap_cascadeDistances, weights);\n}\n",czm_cascadeMatrix="\nuniform mat4 shadowMap_cascadeMatrices[4];\n\nmat4 czm_cascadeMatrix(vec4 weights)\n{\n return shadowMap_cascadeMatrices[0] * weights.x +\n shadowMap_cascadeMatrices[1] * weights.y +\n shadowMap_cascadeMatrices[2] * weights.z +\n shadowMap_cascadeMatrices[3] * weights.w;\n}\n",czm_cascadeWeights="\nuniform shadowMap_cascadeSplits : array<vec4<f32>, 2>;\n\nfn czm_cascadeWeights(depthEye : f32) -> vec4<f32>\n{\n // One component is set to 1.0 and all others set to 0.0.\n var near = step(shadowMap_cascadeSplits[0], vec4<f32>(depthEye));\n var far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}\n",czm_clip="\nuniform clip_mode : f32;\nuniform clip_planes : array<vec4<f32>, 6>;\nuniform clip_line_color : vec4<f32>;\nconst clip_lineWidth = 3.0;\n\nfn GetClipDistance(pos : vec3<f32>, planeNormal : vec3<f32>, disToOrigin : f32) -> f32\n{\n\treturn dot(planeNormal, pos) + disToOrigin;\n}\n\nfn ClipBehindAllPlane(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n\tvar distance = 0.0;\n\tvar result = -1.0;\n#ifdef CLIPPLANE\n\tdistance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[0].xyz, uniforms.clip_planes[0].w);\n\tif (distance < 0.0)\n\t{\n\t\treturn 1.0;\n\t}\n\telse if (distance < fBorderWidth)\n\t{\n\t\tresult = 0.0;\n\t}\n#else\n\tvar i : u32;\n\tfor(i = 0; i < 6; i++)\n\t{\n\t\tdistance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[i].xyz, uniforms.clip_planes[i].w);\n\t\tif(distance < 0.0)\n\t\t{\n\t\t\treturn 1.0;\n\t\t}\n\t\telse if(distance < fBorderWidth)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n#endif // CLIPPLANE\n\treturn result;\n}\n\nfn ClipBehindAnyPlane(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n\tvar result = 1.0;\n\tvar i : u32;\n\tfor(i = 0; i < 6; i++)\n\t{\n\t\tvar distance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[i].xyz, uniforms.clip_planes[i].w);\n\t\tif((distance + fBorderWidth) < 0.0)\n\t\t{\n\t\t\treturn -1.0;\n\t\t}\n\t\telse if(distance < 0.0)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n\treturn result;\n}\n\nfn ClipAnythingButLine(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n\tvar result = -1.0;\n\tvar i : u32;\n\tfor(i = 0; i < 6; i++)\n\t{\n\t\tvar distance = GetClipDistance(clip_vertex.xyz, uniforms.clip_planes[i].xyz, uniforms.clip_planes[i].w);\n\t\tif(distance < 0.0)\n\t\t{\n\t\t\treturn -1.0;\n\t\t}\n\t\telse if(distance < fBorderWidth)\n\t\t{\n\t\t\tresult = 0.0;\n\t\t}\n\t}\n\treturn result;\n}\n\nfn czm_clip(clip_vertex : vec4<f32>, fIsFiltByID : f32) -> vec4<f32>\n{\n if(fIsFiltByID < 0.1)\n {\n return vec4<f32>(1.0);\n }\n\tif(uniforms.clip_mode < 0.5)\n\t{\n\t\treturn vec4<f32>(1.0);\n\t}\n\n\tvar fBorderWidth = clip_lineWidth;\n\tvar clipResult = 1.0;\n\tif(uniforms.clip_line_color.a < 0.01)\n\t{\n\t\tfBorderWidth = 0.0;\n\t}\n\tif(uniforms.clip_mode < 1.5)\n\t{\n\t\tclipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n\t}\n\telse if(uniforms.clip_mode < 2.5)\n\t{\n\t\tclipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n\t}\n\telse if(uniforms.clip_mode < 3.5)\n\t{\n\t\tclipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n\t}\n\tif(clipResult < -0.5)\n\t{\n\t\tdiscard;\n\t}\n\telse if(clipResult < 0.5)\n\t{\n\t\treturn uniforms.clip_line_color;\n\t}\n\telse\n\t{\n return vec4<f32>(1.0);\n\t}\n}\n",czm_columbusViewMorph="\nfn czm_columbusViewMorph(position2D : vec4<f32>, position3D : vec4<f32>, time : f32) -> vec4<f32>\n{\n // Just linear for now.\n var p = mix(position2D.xyz, position3D.xyz, time);\n return vec4<f32>(p, 1.0);\n}\n",czm_computeNormal="\nfn czm_computeNormal(oriVertex : vec3<f32>) -> vec3<f32> {\n var normal : vec3<f32>;\n normal = cross(vec3<f32>(dpdx(oriVertex.x), dpdx(oriVertex.y), dpdx(oriVertex.z)), vec3<f32>(dpdy(oriVertex.x), dpdy(oriVertex.y), dpdy(oriVertex.z)));\n normal = normalize(normal);\n return normal;\n}",czm_computePosition="/**\n * Returns a position in model coordinates relative to eye taking into\n * account the current scene mode: 3D, 2D, or Columbus view.\n * <p>\n * This uses standard position attributes, <code>position3DHigh</code>, \n * <code>position3DLow</code>, <code>position2DHigh</code>, and <code>position2DLow</code>, \n * and should be used when writing a vertex shader for an {@link Appearance}.\n * </p>\n *\n * @name czm_computePosition\n * @glslFunction\n *\n * @returns {vec4} The position relative to eye.\n *\n * @example\n * vec4 p = czm_computePosition();\n * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n *\n * @see czm_translateRelativeToEye\n */\nvec4 czm_computePosition();\n",czm_cosineAndSine="/**\n * @private\n */\nvec2 cordic(float angle)\n{\n// Scale the vector by the appropriate factor for the 24 iterations to follow.\n vec2 vector = vec2(6.0725293500888267e-1, 0.0);\n// Iteration 1\n float sense = (angle < 0.0) ? -1.0 : 1.0;\n // float factor = sense * 1.0; // 2^-0\n mat2 rotation = mat2(1.0, sense, -sense, 1.0);\n vector = rotation * vector;\n angle -= sense * 7.8539816339744828e-1; // atan(2^-0)\n// Iteration 2\n sense = (angle < 0.0) ? -1.0 : 1.0;\n float factor = sense * 5.0e-1; // 2^-1\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.6364760900080609e-1; // atan(2^-1)\n// Iteration 3\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.5e-1; // 2^-2\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4497866312686414e-1; // atan(2^-2)\n// Iteration 4\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.25e-1; // 2^-3\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2435499454676144e-1; // atan(2^-3)\n// Iteration 5\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.25e-2; // 2^-4\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.2418809995957350e-2; // atan(2^-4)\n// Iteration 6\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.125e-2; // 2^-5\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.1239833430268277e-2; // atan(2^-5)\n// Iteration 7\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.5625e-2; // 2^-6\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5623728620476831e-2; // atan(2^-6)\n// Iteration 8\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.8125e-3; // 2^-7\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.8123410601011111e-3; // atan(2^-7)\n// Iteration 9\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.90625e-3; // 2^-8\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.9062301319669718e-3; // atan(2^-8)\n// Iteration 10\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.953125e-3; // 2^-9\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9531225164788188e-3; // atan(2^-9)\n// Iteration 11\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.765625e-4; // 2^-10\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.7656218955931946e-4; // atan(2^-10)\n// Iteration 12\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.8828125e-4; // 2^-11\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.8828121119489829e-4; // atan(2^-11)\n// Iteration 13\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.44140625e-4; // 2^-12\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4414062014936177e-4; // atan(2^-12)\n// Iteration 14\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.220703125e-4; // 2^-13\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2207031189367021e-4; // atan(2^-13)\n// Iteration 15\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.103515625e-5; // 2^-14\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.1035156174208773e-5; // atan(2^-14)\n// Iteration 16\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.0517578125e-5; // 2^-15\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.0517578115526096e-5; // atan(2^-15)\n// Iteration 17\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.52587890625e-5; // 2^-16\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5258789061315762e-5; // atan(2^-16)\n// Iteration 18\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.62939453125e-6; // 2^-17\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.6293945311019700e-6; // atan(2^-17)\n// Iteration 19\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.814697265625e-6; // 2^-18\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.8146972656064961e-6; // atan(2^-18)\n// Iteration 20\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.9073486328125e-6; // 2^-19\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9073486328101870e-6; // atan(2^-19)\n// Iteration 21\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.5367431640625e-7; // 2^-20\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.5367431640596084e-7; // atan(2^-20)\n// Iteration 22\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.76837158203125e-7; // 2^-21\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.7683715820308884e-7; // atan(2^-21)\n// Iteration 23\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.384185791015625e-7; // 2^-22\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.3841857910155797e-7; // atan(2^-22)\n// Iteration 24\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.1920928955078125e-7; // 2^-23\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n// angle -= sense * 1.1920928955078068e-7; // atan(2^-23)\n\n return vector;\n}\n\n/**\n * Computes the cosine and sine of the provided angle using the CORDIC algorithm.\n *\n * @name czm_cosineAndSine\n * @glslFunction\n *\n * @param {float} angle The angle in radians.\n *\n * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).\n *\n * @example\n * vec2 v = czm_cosineAndSine(czm_piOverSix);\n * float cosine = v.x;\n * float sine = v.y;\n */\nvec2 czm_cosineAndSine(float angle)\n{\n if (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n {\n if (angle < 0.0)\n {\n return -cordic(angle + czm_pi);\n }\n else\n {\n return -cordic(angle - czm_pi);\n }\n }\n else\n {\n return cordic(angle);\n }\n}\n",czm_decompressTextureCoordinates="/**\n * Decompresses texture coordinates that were packed into a single float.\n *\n * @name czm_decompressTextureCoordinates\n * @glslFunction\n *\n * @param {float} encoded The compressed texture coordinates.\n * @returns {vec2} The decompressed texture coordinates.\n */\n fn czm_decompressTextureCoordinates(encoded : f32) -> vec2<f32>\n {\n var temp = encoded / 4096.0;\n var xZeroTo4095 = floor(temp);\n var stx = xZeroTo4095 / 4095.0;\n var sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\n return vec2<f32>(stx, sty);\n }\n",czm_depthClampFarPlane="// emulated noperspective\n#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\n\n/**\n * Clamps a vertex to the far plane.\n *\n * @name czm_depthClampFarPlane\n * @glslFunction\n *\n * @param {vec4} coords The vertex in clip coordinates.\n * @returns {vec4} The vertex clipped to the far plane.\n *\n * @example\n * gl_Position = czm_depthClampFarPlane(czm_modelViewProjection * vec4(position, 1.0));\n *\n * @see czm_writeDepthClampedToFarPlane\n */\nvec4 czm_depthClampFarPlane(vec4 coords)\n{\n#ifndef LOG_DEPTH\n v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\n coords.z = min(coords.z, coords.w);\n#endif\n return coords;\n}\n",czm_eastNorthUpToEyeCoordinates="/**\n * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system \n * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the \n * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.\n * <br /><br />\n * The ellipsoid is assumed to be centered at the model coordinate's origin.\n *\n * @name czm_eastNorthUpToEyeCoordinates\n * @glslFunction\n *\n * @param {vec3} positionMC The position on the ellipsoid in model coordinates.\n * @param {vec3} normalEC The normalized ellipsoid surface normal, at <code>positionMC</code>, in eye coordinates.\n *\n * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.\n *\n * @example\n * // Transform a vector defined in the east-north-up coordinate \n * // system, (0, 0, 1) which is the surface normal, to eye \n * // coordinates.\n * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);\n */\nmat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\n vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates\n vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordiantes\n vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates\n\n return mat3(\n tangentEC.x, tangentEC.y, tangentEC.z,\n bitangentEC.x, bitangentEC.y, bitangentEC.z,\n normalEC.x, normalEC.y, normalEC.z);\n}\n",czm_ellipsoidContainsPoint="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidContainsPoint\n * @glslFunction\n *\n */\nbool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\n vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\n return (dot(scaled, scaled) <= 1.0);\n}\n",czm_ellipsoidNew="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidNew\n * @glslFunction\n *\n */\nczm_ellipsoid czm_ellipsoidNew(vec3 center, vec3 radii)\n{\n vec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n vec3 inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(center, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n",czm_ellipsoidWgs84TextureCoordinates="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidWgs84TextureCoordinates\n * @glslFunction\n */\nvec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\n return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n",czm_equalsEpsilon="/**\n * Compares <code>left</code> and <code>right</code> componentwise. Returns <code>true</code>\n * if they are within <code>epsilon</code> and <code>false</code> otherwise. The inputs\n * <code>left</code> and <code>right</code> can be <code>float</code>s, <code>vec2</code>s,\n * <code>vec3</code>s, or <code>vec4</code>s.\n *\n * @name czm_equalsEpsilon\n * @glslFunction\n *\n * @param {} left The first vector.\n * @param {} right The second vector.\n * @param {float} epsilon The epsilon to use for equality testing.\n * @returns {bool} <code>true</code> if the components are within <code>epsilon</code> and <code>false</code> otherwise.\n *\n * @example\n * // GLSL declarations\n * bool czm_equalsEpsilon(float left, float right, float epsilon);\n * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);\n * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);\n * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);\n */\nbool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\n\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\n return (abs(left - right) <= epsilon);\n}\n",czm_ExcavationFS="uniform sampler2D uColorTexture;\nuniform sampler2D uRasterTexture;\nvarying float vHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying float regionHeight;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uRasterTexture, vTexCoord0));\n if(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n }\n if (vHeight > terrainHeight || vHeight < regionHeight) { \n discard;\n }\n vec4 baseColorWithAlpha = texture2D(uColorTexture, vTexCoord1);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(vTexCoord1.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(vTexCoord1.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, vTexCoord1.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n if(gl_FrontFacing)\n {\n n = -n;\n }\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}\n",czm_ExcavationVS="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nattribute vec2 aTexCoord1;\nvarying float vHeight;\nvarying float regionHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vHeight = aPosition.w;\n vTexCoord0 = aTexCoord0.xy;\n vTexCoord1 = aTexCoord1;\n regionHeight = aTexCoord0.z;\n gl_Position = pos;\n v_positionMC = vec4(aPosition.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\n}\n",czm_executeExcavation="#ifdef EXCAVATION\nvar uExcavationTexture : texture_2d<f32>;\nvar uExcavationTextureSampler : sampler;\n\nvarying vExcavationVertexPos : vec4<f32>;\nfn CalculateExcavationPolyTexCoord(vertexPos :vec4<f32>, rectPos : vec4<f32>) -> vec3<f32>\n{\n var vecRatio = vec2<f32>(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n var texCoord = vec2<f32>(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n var ptInRect : f32 = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2<f32>(0.0), vec2<f32>(1.0));\n var result = vec3<f32>(texCoord.xy, ptInRect);\n return result;\n}\nfn czm_executeExcavation() -> bool\n{\n var vecExcavationTexCoord = CalculateExcavationPolyTexCoord(vExcavationVertexPos, Layer.uExcavationRect);\n var hasExcavation = vecExcavationTexCoord.z;\n var excavationInside : bool = (Layer.uExcavationMode < 0.5);\n var regionColor = textureSample(uExcavationTexture, uExcavationTextureSampler, vecExcavationTexCoord.xy).r;\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n if(excavationInside)\n {\n return regionColor > 0.5;\n }\n else\n {\n return regionColor < 0.5;\n }\n}\n#endif",czm_eyeOffset="/**\n * DOC_TBA\n *\n * @name czm_eyeOffset\n * @glslFunction\n *\n * @param {vec4} positionEC DOC_TBA.\n * @param {vec3} eyeOffset DOC_TBA.\n *\n * @returns {vec4} DOC_TBA.\n */\nvec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\n // This equation is approximate in x and y.\n vec4 p = positionEC;\n vec4 zEyeOffset = normalize(p) * eyeOffset.z;\n p.xy += eyeOffset.xy + zEyeOffset.xy;\n p.z += zEyeOffset.z;\n return p;\n}\n",czm_eyeToWindowCoordinates="/**\n * Transforms a position from eye to window coordinates. The transformation\n * from eye to clip coordinates is done using {@link czm_projection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of <code>near = 0</code> and <code>far = 1</code>.\n * <br /><br />\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *\n * @name czm_eyeToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in eye coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_projection\n * @see czm_viewportTransformation\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n */\nfn czm_eyeToWindowCoordinates(positionEC : vec4<f32>) -> vec4<f32>\n{\n var q = uniforms.czm_projection * positionEC; // clip coordinates\n var qxyz = q.xyz;\n q = vec4<f32>(qxyz / q.w, q.w); // normalized device coordinates\n q = vec4<f32>((uniforms.czm_viewportTransformation * vec4<f32>(q.xyz, 1.0)).xyz, q.w); // window coordinates\n return q;\n}\n",czm_fastApproximateAtan="/**\n * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.\n *\n * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on\n * \"Efficient approximations for the arctangent function,\" Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.\n * Adapted from ShaderFastLibs under MIT License.\n *\n * Chosen for the following characteristics over range [0, 1]:\n * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)\n * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)\n *\n * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);\n * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between 0 and 1 inclusive.\n *\n * @returns {float} Approximation of atan(x)\n */\nfloat czm_fastApproximateAtan(float x) {\n return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\n\n/**\n * Approximation of atan2.\n *\n * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html\n * However, we replaced their atan curve with Michael Drobot's (see above).\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between -1 and 1 inclusive.\n * @param {float} y Value between -1 and 1 inclusive.\n *\n * @returns {float} Approximation of atan2(x, y)\n */\nfloat czm_fastApproximateAtan(float x, float y) {\n // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.\n // So range-reduce using abs and by flipping whether x or y is on top.\n float t = abs(x); // t used as swap and atan result.\n float opposite = abs(y);\n float adjacent = max(t, opposite);\n opposite = min(t, opposite);\n\n t = czm_fastApproximateAtan(opposite / adjacent);\n\n // Undo range reduction\n t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\n t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\n t = czm_branchFreeTernary(y < 0.0, -t, t);\n return t;\n}\n",czm_floodAnalysis="#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nvoid czm_getFloodWaterColor(inout vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n}\n#endif\n}",czm_fog="/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nfn czm_fog(distanceToCamera : f32, color : vec3<f32>, fogColor : vec3<f32>) -> vec3<f32>\n{\n var scalar = distanceToCamera * czm_fogDensity;\n var fog = 1.0 - exp(-(scalar * scalar));\n return mix(color, fogColor, fog);\n}\n\n/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n * @param {float} fogModifierConstant A constant to modify the appearance of fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\n fn czm_fog(distanceToCamera : f32, color : vec3<f32>, fogColor : vec3<f32>, fogModifierConstant : f32) -> vec3<f32>\n{\n var scalar = distanceToCamera * czm_fogDensity;\n var fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\n return mix(color, fogColor, fog);\n}\n",czm_gammaCorrect="/**\n * Converts a color from RGB space to linear space.\n *\n * @name czm_gammaCorrect\n * @glslFunction\n *\n * @param {vec3} color The color in RGB space.\n * @returns {vec3} The color in linear space.\n */\n// vec3 czm_gammaCorrect(vec3 color) {\n// #ifdef HDR\n// color = pow(color, vec3(czm_gamma));\n// #endif\n// return color;\n// }\n\nfn czm_gammaCorrect(color : vec4<f32>) -> vec4<f32> {\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3<f32>(czm_gamma));\n#endif\n return color;\n}\n",czm_geodeticSurfaceNormal="/**\n * DOC_TBA\n *\n * @name czm_geodeticSurfaceNormal\n * @glslFunction\n *\n * @param {vec3} positionOnEllipsoid DOC_TBA\n * @param {vec3} ellipsoidCenter DOC_TBA\n * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA\n * \n * @returns {vec3} DOC_TBA.\n */\nfn czm_geodeticSurfaceNormal(positionOnEllipsoid : vec3<f32>, ellipsoidCenter : vec3<f32>, oneOverEllipsoidRadiiSquared : vec3<f32>) -> vec3<f32>\n{\n return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial="/**\n * An czm_material with default values. Every material's czm_getMaterial\n * should use this default material as a base for the material it returns.\n * The default normal value is given by materialInput.normalEC.\n *\n * @name czm_getDefaultMaterial\n * @glslFunction\n *\n * @param {czm_materialInput} input The input used to construct the default material.\n *\n * @returns {czm_material} The default material.\n *\n * @see czm_materialInput\n * @see czm_material\n * @see czm_getMaterial\n */\nczm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\n czm_material material;\n material.diffuse = vec3(0.0);\n material.specular = 0.0;\n material.shininess = 1.0;\n material.normal = materialInput.normalEC;\n material.emission = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n",czm_getEmissiveTextureColor="uniform float uMaxCategoryOrHypCeil;\nuniform float uMinCategoryOrHypFloor;\nuniform sampler2D uEmissionTexAtlas;\n#if EMISSION_TEXTURE_COUNT > 0\nuniform vec4 uEmissionTexAtlasTilingAndOffset[EMISSION_TEXTURE_COUNT];\nuniform vec4 uEmissionTexAtlasRects[EMISSION_TEXTURE_COUNT];\n#endif\nuniform float uLayerCornerLength;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 czm_getEmissiveTextureColor(float w)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n #if EMISSION_TEXTURE_COUNT > 0\n for(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n #endif\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n return texColor;\n}\nvec3 czm_getEmissiveTextureColor(float w, vec2 texCoord)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n #if EMISSION_TEXTURE_COUNT > 0\n for(int i = 0; i < EMISSION_TEXTURE_COUNT; i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n #endif\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n return texColor;\n}",czm_getFusionModePostiion="\n#ifdef FusionMode\n uniform mat4 uModelView;\n uniform vec2 uPanOffset;\n\n czm_getFusionModePosition(vec4 vertexPos)\n {\n vec4 positionCC = czm_projection * uModelView * vertexPos;\n positionCC.x += (2.0 * uPanOffset.x * positionCC.w);\n positionCC.y += (-2.0 * uPanOffset.y * positionCC.w);\n return positionCC;\n }\n#endif\n",czm_getHorizontalColor="uniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 czm_getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}",czm_getHypsometricColor="uniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypsometricVisible;\nuniform float uHypOpacity;\nuniform float uHypContourInterval;\nuniform vec4 uHypLineColor;\nuniform float uHypContourFillMode;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypHasAnalysisRegion;\nvarying vec2 vecHypTexCoord;\nuniform float uMixColorType;\nuniform vec4 uNoValueColor;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uVolumeType;\n#endif\n\n#ifdef Volume2\nuniform float uDataFloor;\nuniform float uDataCeil;\nuniform float uFilterMode;\n#endif\n\nfloat computeMixCon(float fValue)\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n\t if(fValue < 0.5)\n {\n distanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n }\n else\n {\n float t = floor(fValue / uHypContourInterval);\n distanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n }\n\t}\n\telse\n\t{\n\t distanceToContour = abs(fValue - uHypMaxVisibleValue);\n\t}\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float fValue)\n{\n\t//float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat threshold = abs(uHypCeil - uHypFloor);\n\tfloat contourRate = (fValue - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tfloat count = floor(finalCoord * 16.0);\n\tfloat y = (count*2.0 + 1.0)/32.0;\n\tfloat x = fract(finalCoord*16.0);\n\tif(y > 1.0)\n\t{\n\t x = 1.0;\n\t}\n\tvec2 contourCoord = vec2(x, y);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n#ifdef Volume2\n\nvec4 czm_getContourMapColor(vec4 oriColor, vec4 volColor)\n{\n if(uFilterMode > 0.5)\n {\n vec4 finalColor = volColor * oriColor;\n\n if(uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n\n\tfloat noValue = volColor.a;\n\tfloat texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\n\n\tfloat fValue;\n\tif(noValue > 0.5)\n\t{\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n vec4 finalColor = mixColor * oriColor;\n#ifdef PT_CLOUD\n\tfinalColor = mixColor;\n#endif\n if(uMixColorType > 0.5)\n {\n finalColor = mixColor;\n }\n return finalColor;\n}\n\n#else\n\nvec4 czm_getContourMapColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n#ifdef Volume\n\tvec3 aRatioT = vecRotioCoord;\n\tif((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n\t{\n\t if(uVolumeType > 0.5)\n\t {\n\t\t\tvec4 volumeColor = czm_getVolumeValue(aRatioT);\n\t\t\tif(uMixColorType > 0.5)\n\t\t\t{\n\t\t\t\tvolumeColor = volumeColor * oriColor;\n\t\t\t}\n\t\t\treturn volumeColor;\n\t }\n\t float noValue;\n\t float texTest = czm_getVolumeValue(aRatioT, noValue);\n\t if(noValue > 0.5)\n\t {\n\t fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n\t }\n\t else\n\t {\n\t fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n\t }\n\t}\n\telse\n\t{\n\t fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n\t}\n#endif\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n vec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n\tfinalColor = mixColor;\n#endif\n#ifdef Volume\n if(uMixColorType > 0.5)\n {\n finalColor = mixColor;\n }\n#endif\n return finalColor;\n}\n\n#endif\n\n#ifdef Volume2\nvec4 czm_getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\n\tif(uHypHasAnalysisRegion > 0.1)\n {\n\t\tvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n\t\tif(hypColor.r < 0.1)\n\t\t{\n\t\t\treturn oriColor;\n\t\t}\n\t}\n return czm_getContourMapColor(oriColor, volColor);\n}\n#else\nvec4 czm_getHypsometricColor(vec4 oriColor, float wValue)\n{\n float fValue = wValue;\n\tif(uHypHasAnalysisRegion > 0.1)\n {\n\t\tvec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n\t\tif(hypColor.r < 0.1)\n\t\t{\n\t\t\treturn oriColor;\n\t\t}\n\t}\n return czm_getContourMapColor(oriColor, fValue);\n}\n\nvec4 czm_getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return czm_getContourMapColor(oriColor, wValue);\n}\n\n#endif",czm_getLambertDiffuse="/**\n * Calculates the intensity of diffusely reflected light.\n *\n * @name czm_getLambertDiffuse\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n *\n * @returns {float} The intensity of the diffuse reflection.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfn czm_getLambertDiffuse(lightDirectionEC : vec3<f32>, normalEC : vec3<f32>) -> f32\n{\n return max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getPBRParamFromTexture="\n#ifdef USE_BatchPBR\n var uPBRTexture : texture_2d<f32>;\n var uPBRTextureSampler : sampler;\n varying vMetallicRoughness : vec2<f32>;\n varying vEmissiveFactor : vec4<f32>;\n varying vAlphaCutoffAndModeAndDoubleSide : vec3<f32>;\n fn czm_getPBRParamFromTexture(uv : vec2<f32>)\n {\n var x = (uv.x * 2.0f + 0.5f)/ Material.uPBRTexWH.x;\n var y = (uv.x * 2.0f + 1.5f)/ Material.uPBRTexWH.x;\n var pbrParam = textureSampleLevel(uPBRTexture, uPBRTextureSampler, vec2<f32>(x, 0.5f), 0.0f);\n vMetallicRoughness = pbrParam.rg;\n vAlphaCutoffAndModeAndDoubleSide.x = pbrParam.b;\n var temp = pbrParam.a / 65536.0f;\n vAlphaCutoffAndModeAndDoubleSide.y = floor(temp);\n vAlphaCutoffAndModeAndDoubleSide.z = (temp- vAlphaCutoffAndModeAndDoubleSide.y) * 65536.0f;\n vEmissiveFactor = textureSampleLevel(uPBRTexture, uPBRTextureSampler, vec2<f32>(y, 0.5f), 0.0f);\n }\n#endif\n",czm_getSpecular="/**\n * Calculates the specular intensity of reflected light.\n *\n * @name czm_getSpecular\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n *\n * @returns {float} The intensity of the specular highlight.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\n vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\n float specular = max(dot(toReflectedLight, toEyeEC), 0.0);\n\n // pow has undefined behavior if both parameters <= 0.\n // Prevent this by making sure shininess is at least czm_epsilon2.\n return pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getVolumeValue="\nuniform sampler2D uVolumeTexture;\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uVolumeTimeRatio;\n#endif\n\n#ifdef Volume\nuniform float uVolumeWidth;\nuniform float uVolumeHeight;\nuniform float uVolumeDepth;\nuniform float uVolumeSideBlockCount;\nuniform float uVolumeBlockLength;\nuniform float uVolumeTexLength;\nuniform float uVolumeFilterMode;\n#endif\n\nfloat czm_unpackVolume(vec3 packedDepth)\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\n#ifdef Volume\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\n float yOffset = floor((fLevel+0.25/uVolumeSideBlockCount) / uVolumeSideBlockCount);\n float xOffset = fLevel - yOffset * uVolumeSideBlockCount;\n float texCoordV = (texCoord.y * uVolumeHeight + yOffset * uVolumeBlockLength) / uVolumeTexLength;\n float texCoordU = (texCoord.x * uVolumeWidth + xOffset * uVolumeBlockLength) / uVolumeTexLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\n vec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\n vec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\n float fValue1 = clamp(czm_unpackVolume(volumeValue1.xyz),0.0,1.0);\n float fValue2 = clamp(czm_unpackVolume(volumeValue2.xyz),0.0,1.0);\n if(uVolumeFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n noValue = mix(volumeValue1.a, volumeValue2.a, ratio);\n if(volumeValue1.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(volumeValue2.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfloat czm_getVolumeValue(vec3 texCoord, out float noValue)\n{\n float fLevel = (uVolumeDepth - 1.0) * texCoord.z;\n float bottomLevel= floor(fLevel);\n float topLevel = bottomLevel + 1.0;\n float ratio = topLevel - fLevel;\n vec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n vec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n float fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n fResult = mix(fResult, fNextResult, uVolumeTimeRatio);\n#endif\n return fResult;\n}\n\nvec4 czm_getVolumeValue(vec3 texCoord)\n{\n\tfloat fLevel = (uVolumeDepth - 1.0) * texCoord.z;\n\tfloat bottomLevel= floor(fLevel);\n\tfloat topLevel = bottomLevel + 1.0;\n\tfloat ratio = topLevel - fLevel;\n\tfloat yOffset1 = floor((topLevel+0.25/uVolumeSideBlockCount) / uVolumeSideBlockCount);\n\tfloat xOffset1 = topLevel - yOffset1 * uVolumeSideBlockCount;\n\tfloat texCoordV1 = (texCoord.y * uVolumeHeight + yOffset1 * uVolumeBlockLength)/uVolumeTexLength;\n\tfloat texCoordU1 = (texCoord.x * uVolumeWidth + xOffset1 * uVolumeBlockLength)/uVolumeTexLength;\n\tvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\n\tfloat yOffset2 = floor((bottomLevel+0.25/uVolumeSideBlockCount) / uVolumeSideBlockCount);\n\tfloat xOffset2 = bottomLevel - yOffset2 * uVolumeSideBlockCount;\n\tfloat texCoordV2 = (texCoord.y * uVolumeHeight + yOffset2 * uVolumeBlockLength)/uVolumeTexLength;\n\tfloat texCoordU2 = (texCoord.x * uVolumeWidth + xOffset2 * uVolumeBlockLength)/uVolumeTexLength;\n\tvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\n\n\tif(uVolumeFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif\n",czm_getWaterNoise="/**\n * @private\n */\nvec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n\n // time dependent sampling directions\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n\n // rotate sampling direction by specified angle\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (texture2D(normalMap, uv0)) +\n (texture2D(normalMap, uv1)) +\n (texture2D(normalMap, uv2)) +\n (texture2D(normalMap, uv3));\n\n // average and scale to between -1 and 1\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_getWgs84EllipsoidEC="/**\n * Returns the WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @name czm_getWgs84EllipsoidEC\n * @glslFunction\n *\n * @returns {czm_ellipsoid} The WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @see Ellipsoid.WGS84\n *\n * @example\n * czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n */\nfn czm_getWgs84EllipsoidEC() -> czm_ellipsoid\n{\n var radii = vec3<f32>(6378137.0, 6378137.0, 6378137.0);\n var inverseRadii = vec3<f32>(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n var inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(czm_view[3].xyz, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n",czm_HSBToRGB="\nfn czm_HSBToRGB(hsb : vec3<f32>) -> vec3<f32>\n{\n var K_HSB2RGB = vec4<f32>(1.0, 0.66667, 0.33333, 3.0);\n var p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\n return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, vec3<f32>(0.0), vec3<f32>(1.0)), hsb.y);\n}\n",czm_HSLToRGB="/**\n * Converts an HSL color (hue, saturation, lightness) to RGB\n * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}\n *\n * @name czm_HSLToRGB\n * @glslFunction\n * \n * @param {vec3} rgb The color in HSL.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n\nvec3 hueToRGB(float hue)\n{\n float r = abs(hue * 6.0 - 3.0) - 1.0;\n float g = 2.0 - abs(hue * 6.0 - 2.0);\n float b = 2.0 - abs(hue * 6.0 - 4.0);\n return clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 czm_HSLToRGB(vec3 hsl)\n{\n vec3 rgb = hueToRGB(hsl.x);\n float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\n return (rgb - 0.5) * c + hsl.z;\n}\n",czm_hue="/**\n * Adjusts the hue of a color.\n * \n * @name czm_hue\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the hue of the color in radians.\n *\n * @returns {float} The color with the hue adjusted.\n *\n * @example\n * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)\n */\nfn czm_hue(rgb : vec3<f32>, adjustment : f32) -> vec3<f32>\n{\n var toYIQ = mat3x3<f32>(0.299, 0.587, 0.114,\n 0.595716, -0.274453, -0.321263,\n 0.211456, -0.522591, 0.311135);\n var toRGB = mat3x3<f32>(1.0, 0.9563, 0.6210,\n 1.0, -0.2721, -0.6474,\n 1.0, -1.107, 1.7046);\n \n var yiq = toYIQ * rgb;\n var hue = atan2(yiq.z, yiq.y) + adjustment;\n var chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\n \n var color = vec3<f32>(yiq.x, chroma * cos(hue), chroma * sin(hue));\n return toRGB * color;\n}\n",czm_inverseGamma="/**\n * Converts a color in linear space to RGB space.\n *\n * @name czm_inverseGamma\n * @glslFunction\n *\n * @param {vec3} color The color in linear space.\n * @returns {vec3} The color in RGB space.\n */\nvec3 czm_inverseGamma(vec3 color) {\n return pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_inverseMatrix="mat3 czm_inverseMatrix(mat3 m)\n{\n float Determinant =\n m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\n - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\n + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\n\n mat3 Inverse;\n Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);\n Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);\n Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);\n Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);\n Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);\n Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);\n Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\n Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);\n Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);\n Inverse /= Determinant;\n\n return Inverse;\n}\n\nmat4 czm_inverseMatrix(mat4 m)\n{\n float Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\n float Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\n float Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\n\n float Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\n float Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\n float Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\n\n float Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\n float Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\n float Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\n\n float Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\n float Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\n float Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\n\n float Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\n float Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\n float Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\n\n float Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\n float Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\n float Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\n\n const vec4 SignA = vec4( 1.0, -1.0, 1.0, -1.0);\n const vec4 SignB = vec4(-1.0, 1.0, -1.0, 1.0);\n\n vec4 Fac0 = vec4(Coef00, Coef00, Coef02, Coef03);\n vec4 Fac1 = vec4(Coef04, Coef04, Coef06, Coef07);\n vec4 Fac2 = vec4(Coef08, Coef08, Coef10, Coef11);\n vec4 Fac3 = vec4(Coef12, Coef12, Coef14, Coef15);\n vec4 Fac4 = vec4(Coef16, Coef16, Coef18, Coef19);\n vec4 Fac5 = vec4(Coef20, Coef20, Coef22, Coef23);\n\n vec4 Vec0 = vec4(m[1][0], m[0][0], m[0][0], m[0][0]);\n vec4 Vec1 = vec4(m[1][1], m[0][1], m[0][1], m[0][1]);\n vec4 Vec2 = vec4(m[1][2], m[0][2], m[0][2], m[0][2]);\n vec4 Vec3 = vec4(m[1][3], m[0][3], m[0][3], m[0][3]);\n\n vec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);\n vec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);\n vec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);\n vec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);\n\n mat4 Inverse = mat4(Inv0, Inv1, Inv2, Inv3);\n\n vec4 Row0 = vec4(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);\n\n float Determinant = dot(m[0], Row0);\n\n Inverse /= Determinant;\n\n return Inverse;\n}\n",czm_isEmpty="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isEmpty\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isEmpty(czm_raySegment interval)\n{\n return (interval.stop < 0.0);\n}\n",czm_isFull="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isFull\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isFull(czm_raySegment interval)\n{\n return (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction="/**\n * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.\n *\n * @name czm_latitudeToWebMercatorFraction\n * @glslFunction\n *\n * @param {float} latitude The geodetic latitude, in radians.\n * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.\n * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.\n *\n * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern\n * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return\n * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.\n */ \nfn czm_latitudeToWebMercatorFraction(latitude : f32, southMercatorY : f32, oneOverMercatorHeight : f32) -> f32\n{\n var sinLatitude = sin(latitude);\n var mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\n \n return (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_LineCallOutVp="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute float aColor;\nuniform float uLineWidth;\nvarying float vColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nvoid main()\n{\n bool bUsePre = aTexCoord0.x < 0.1;\n float offset = bUsePre ? -uLineWidth : uLineWidth;\n vec4 viewPos1 = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tviewPos1.x = viewPos1.x + offset * computerOnePixelLength();\n\tgl_Position = czm_projection * viewPos1;\n\tvColor = aColor;\n}\n\n\n\n",czm_lineDistance="/**\n * Computes distance from an point in 2D to a line in 2D.\n *\n * @name czm_lineDistance\n * @glslFunction\n *\n * param {vec2} point1 A point along the line.\n * param {vec2} point2 A point along the line.\n * param {vec2} point A point that may or may not be on the line.\n * returns {float} The distance from the point to the line.\n */\nfloat czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\n return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_luminance="/**\n * Computes the luminance of a color. \n *\n * @name czm_luminance\n * @glslFunction\n *\n * @param {vec3} rgb The color.\n * \n * @returns {float} The luminance.\n *\n * @example\n * float light = czm_luminance(vec3(0.0)); // 0.0\n * float dark = czm_luminance(vec3(1.0)); // ~1.0 \n */\nfloat czm_luminance(vec3 rgb)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n return dot(rgb, W);\n}\n",czm_metersPerPixel="/**\n * Computes the size of a pixel in meters at a distance from the eye.\n * <p>\n * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.\n * </p>\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n * @param {float} pixelRatio The scaling factor from pixel space to coordinate space\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfn czm_metersPerPixel(positionEC : vec4<f32>, pixelRatio : f32) -> f32\n{\n var width = czm_viewport.z;\n var height = czm_viewport.w;\n var pixelWidth;\n var pixelHeight;\n\n var top = czm_frustumPlanes.x;\n var bottom = czm_frustumPlanes.y;\n var left = czm_frustumPlanes.z;\n var right = czm_frustumPlanes.w;\n\n if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n {\n var frustumWidth = right - left;\n var frustumHeight = top - bottom;\n pixelWidth = frustumWidth / width;\n pixelHeight = frustumHeight / height;\n }\n else\n {\n var distanceToPixel = -positionEC.z;\n var inverseNear = 1.0 / czm_currentFrustum.x;\n var tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n }\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}\n\n/**\n * Computes the size of a pixel in meters at a distance from the eye.\n * <p>\n * Use this version when scaling by pixel ratio.\n * </p>\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfn czm_metersPerPixel(positionEC : vec4<f32>) -> f32\n{\n return czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates="/**\n * Transforms a position from model to window coordinates. The transformation\n * from model to clip coordinates is done using {@link czm_modelViewProjection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of <code>near = 0</code> and <code>far = 1</code>.\n * <br /><br />\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n * <br /><br />\n * This function should not be confused with {@link czm_viewportOrthographic},\n * which is an orthographic projection matrix that transforms from window \n * coordinates to clip coordinates.\n *\n * @name czm_modelToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in model coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_eyeToWindowCoordinates\n * @see czm_modelViewProjection\n * @see czm_viewportTransformation\n * @see czm_viewportOrthographic\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);\n */\nfn czm_modelToWindowCoordinates(vec4 position) -> vec4<f32>\n{\n var q = uniforms.czm_modelViewProjection * position; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (uniforms.czm_viewportTransformation * vec4<f32>(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n",czm_multiplyWithColorBalance="/**\n * DOC_TBA\n *\n * @name czm_multiplyWithColorBalance\n * @glslFunction\n */\nvec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n \n vec3 target = left * right;\n float leftLuminance = dot(left, W);\n float rightLuminance = dot(right, W);\n float targetLuminance = dot(target, W);\n \n return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar="/**\n * Computes a value that scales with distance. The scaling is clamped at the near and\n * far distances, and does not extrapolate. This function works with the\n * {@link NearFarScalar} JavaScript class.\n *\n * @name czm_nearFarScalar\n * @glslFunction\n *\n * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).\n * @param {float} cameraDistSq The square of the current distance from the camera.\n *\n * @returns {float} The value at this distance.\n */\nfloat czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\n float valueAtMin = nearFarScalar.y;\n float valueAtMax = nearFarScalar.w;\n float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\n float farDistanceSq = nearFarScalar.z * nearFarScalar.z;\n\n float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\n\n t = pow(clamp(t, 0.0, 1.0), 0.2);\n\n return mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode="\n\nfn signNotZero_v2(value : vec2<f32>) -> vec2<f32>\n{\n return vec2<f32>(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\n\nfn czm_octDecode(inEncoded : vec2<f32>, range : f32) -> vec3<f32>\n{\n if (inEncoded.x == 0.0 && inEncoded.y == 0.0) {\n return vec3<f32>(0.0, 0.0, 0.0);\n }\n var encoded = inEncoded / range * 2.0 - 1.0;\n var v = vec3<f32>(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\n if (v.z < 0.0)\n {\n var temp = (vec2(1.0) - abs(v.yx)) * signNotZero_v2(v.xy);\n v.x = temp.x;\n v.y = temp.y;\n }\n\n return normalize(v);\n}\n// wgsl不支持重载\n// fn czm_octDecode(encoded : f32) -> vec3<f32>\n// {\n// var temp = encoded / 256.0;\n// var x = floor(temp);\n// var y = (temp - x) * 256.0;\n// return czm_octDecode(vec2<f32>(x, y));\n// }\n\n// fn czm_octDecode(encoded : vec2<f32>, vector1 : ptr<function, vec3<f32>>, vector2 : ptr<function, vec3<f32>>, vector3 : ptr<function, vec3<f32>>)\n// {\n// var temp = encoded.x / 65536.0;\n// var x = floor(temp);\n// var encodedFloat1 = (temp - x) * 65536.0;\n\n// temp = encoded.y / 65536.0;\n// var y = floor(temp);\n// var encodedFloat2 = (temp - y) * 65536.0;\n\n// vector1 = czm_octDecode(encodedFloat1);\n// vector2 = czm_octDecode(encodedFloat2);\n// vector3 = czm_octDecode(vec2<f32>(x, y));\n// }\n",czm_packDepth="\nfn czm_packDepth(depth : f32) -> vec4<f32>\n{\n var enc = vec4<f32>(1.0, 255.0, 65025.0, 16581375.0) * depth;\n enc = fract(enc);\n enc -= enc.yzww * vec4<f32>(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n return enc;\n}\n",czm_packValue="/**\n * Packs a float value into a vec3 that can be represented by unsigned bytes.\n *\n * @name czm_packValue\n * @glslFunction\n *\n * @param {float} value The floating-point value.\n * @returns {vec3} The packed value.\n */\nvec4 czm_packValue(float value)\n{\n float SHIFT_LEFT8 = 256.0;\n\tfloat SHIFT_RIGHT8 = 1.0 / 256.0;\n\tvec4 result;\n\tresult.a = 255.0;\n\tfloat fPos = abs(value + 9000.0) * SHIFT_RIGHT8;\n\tresult.b = (fPos - floor(fPos)) * SHIFT_LEFT8;\n\tfPos = floor(fPos) * SHIFT_RIGHT8;\n\tresult.g = (fPos - floor(fPos)) * SHIFT_LEFT8;\n\tresult.r = floor(fPos);\n\tresult /= 255.0;\n\treturn result;\n}\n",czm_phong="float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\n return czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\n\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\n return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\n\n/**\n * Computes a color using the Phong lighting model.\n *\n * @name czm_phong\n * @glslFunction\n *\n * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.\n * @param {czm_material} material The fragment's material.\n *\n * @returns {vec4} The computed color.\n *\n * @example\n * vec3 positionToEyeEC = // ...\n * czm_material material = // ...\n * vec3 lightDirectionEC = // ...\n * gl_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);\n *\n * @see czm_getMaterial\n */\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down)\n float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n }\n\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n vec3 ambient = vec3(0.0);\n vec3 color = ambient + material.emission;\n color += material.diffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_planeDistance="/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec4 plane, vec3 point) {\n return (dot(plane.xyz, point) + plane.w);\n}\n\n/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js\n * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\n return (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay="/**\n * Computes the point along a ray at the given time. <code>time</code> can be positive, negative, or zero.\n *\n * @name czm_pointAlongRay\n * @glslFunction\n *\n * @param {czm_ray} ray The ray to compute the point along.\n * @param {float} time The time along the ray.\n * \n * @returns {vec3} The point along the ray at the given time.\n * \n * @example\n * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction\n * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)\n */\nfn czm_pointAlongRay(ray : czm_ray, time : f32) -> vec3<f32>\n{\n return ray.origin + (time * ray.direction);\n}\n",czm_rainMaterial="#ifdef HAS_WETNESS\nuniform float uWetnessFactor;\n#endif\n#ifdef HAS_RAIN\nuniform float uAnimationSpeed;\nuniform sampler2D uRippleTexture;\nuniform float uRippleScale;\nuniform float uWindIntensity;\nuniform float uRain;\nuniform float uCameraDepth;\nvoid getTimeInfo(float animationSpeed, out vec2 timeVec)\n{\n float time = czm_frameNumber * animationSpeed;\n time = floor(30.0 * time);\n float time_diff = floor(time*0.25);\n time = mod(time, 4.0);\n time_diff = mod(time_diff, 4.0);\n timeVec = vec2(time, time_diff);\n}\nvoid getPosInfo(vec4 posMC, out vec2 posMC_frac1, out vec2 posMC_frac2)\n{\n float ripple_scale = 1.0 / uRippleScale;\n vec2 posXY = posMC.xy * ripple_scale;\n posMC_frac1 = fract(posXY);\n vec2 posStep = vec2(0.5);\n posMC_frac2 = fract(posXY + posStep);\n}\nfloat getAlpha(vec2 posMC_frac1)\n{\n vec2 dist = (posMC_frac1 - vec2(0.5)) * 2.0;\n dist = vec2(abs(dist.x), abs(dist.y));\n vec2 result = pow(dist, vec2(5.0));\n return result.x + result.y;\n}\nvec4 getRippleValue(vec2 timeVec, vec2 posMC_frac1, vec2 posMC_frac2, float alpha)\n{\n vec2 rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n vec2 rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n vec4 rippleValue_1 = texture2D(uRippleTexture, rippleUV_1.xy);\n vec4 rippleValue_2 = texture2D(uRippleTexture, rippleUV_2.xy);\n return mix(rippleValue_1, rippleValue_2, alpha);\n}\nvec3 getRippleNormal(vec4 rippleValue, float wind_intensity, float rain, float depthFade)\n{\n vec2 rippleValueXY = rippleValue.xy;\n vec2 rippleValueZW = rippleValue.zw;\n const vec2 _value = vec2(0.5);\n vec2 part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n vec2 part_2 = (rippleValueXY - _value) * 0.6;\n vec2 mergedValue = mix(part_1, part_2, rain) * depthFade;\n return vec3(mergedValue, 1.0);\n}\nfloat getNormalAlpha(vec3 normalWS, float wetness)\n{\n float valueZ = normalWS.z - 0.5;\n float wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n return pow(wet_correction, 15.0);\n}\nvec3 rippleNormalCorrection(vec3 rippleNormal, float normalAlpha)\n{\n const vec3 blueNormal = vec3(0.0, 0.0, 1.0);\n return mix(blueNormal, rippleNormal, normalAlpha);\n}\nvec3 rippleGenerator(float animationSpeed, vec3 normalWS, float wetness)\n{\n vec2 timeVec = vec2(1.0);\n getTimeInfo(animationSpeed, timeVec);\n vec2 posMC_frac1 = vec2(1.0);\n vec2 posMC_frac2 = vec2(1.0);\n getPosInfo(vPositionMC, posMC_frac1, posMC_frac2);\n float alpha = getAlpha(posMC_frac1);\n vec4 rippleValue = getRippleValue(timeVec, posMC_frac1, posMC_frac2, alpha);\n vec3 rippleNormal = getRippleNormal(rippleValue, uWindIntensity, uRain, uCameraDepth);\n float normalAlpha = getNormalAlpha(normalWS, wetness);\n return normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\nvoid czm_getRainMaterialParam(inout vec3 normalEC, inout vec3 baseColor, inout float roughness){\n vec3 normalWS_wetness = vec3(0.0, 0.0, 1.0);\n#ifdef HAS_WETNESS\n mat3 fixedToENU_wetness = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n normalWS_wetness = normalize(fixedToENU_wetness * normalEC);\n#endif\n normalEC = rippleGenerator(uAnimationSpeed, normalWS_wetness, uWetnessFactor);\n#ifdef HAS_WETNESS\n float fWetness = clamp(uWetnessFactor,0.0,1.0);\n float fWetness_correction = pow(4.0 * fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction, clamp(fWetness,0.0,0.9),1.0);\n float fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n baseColor = mix(baseColor,baseColor * 0.7, fWerness_normalized);\n roughness = mix(roughness, 0.05, fWerness_normalized);\n#endif\n}\n#endif\n",czm_rasterCull="\n#ifdef RASTER_CULL\nvarying vec2 vRasterTexCoord;\nuniform float uDepth;\nuniform sampler2D uRasterTexture;\n\nvoid czm_rasterCull()\n{\n float colorByDepth = texture2D(uRasterTexture, vRasterTexCoord.xy).g;\n\tif((colorByDepth * 255.0 - uDepth) > 0.5)\n\t{\n \t\tdiscard;\n\t}\n}\n#endif\n",czm_rayEllipsoidIntersectionInterval="/**\n * DOC_TBA\n *\n * @name czm_rayEllipsoidIntersectionInterval\n * @glslFunction\n */\nfn czm_rayEllipsoidIntersectionInterval(ray : czm_ray, ellipsoid_center : vec3<f32>, ellipsoid_inverseRadii : vec3<f32>) -> czm_raySegment\n{\n // ray and ellipsoid center in eye coordinates. radii in model coordinates.\n var q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4<f32>(ray.origin, 1.0)).xyz;\n var w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4<f32>(ray.direction, 0.0)).xyz;\n\n q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4<f32>(ellipsoid_center, 1.0)).xyz;\n\n var q2 = dot(q, q);\n var qw = dot(q, w);\n\n if (q2 > 1.0) // Outside ellipsoid.\n {\n if (qw >= 0.0) // Looking outward or tangent (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else // qw < 0.0.\n {\n var qw2 = qw * qw;\n var difference = q2 - 1.0; // Positively valued.\n var w2 = dot(w, w);\n var product = w2 * difference;\n\n if (qw2 < product) // Imaginary roots (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else if (qw2 > product) // Distinct roots (2 intersections).\n {\n var discriminant = qw * qw - product;\n var temp = -qw + sqrt(discriminant); // Avoid cancellation.\n var root0 = temp / w2;\n var root1 = difference / temp;\n if (root0 < root1)\n {\n czm_raySegment i = czm_raySegment(root0, root1);\n return i;\n }\n else\n {\n czm_raySegment i = czm_raySegment(root1, root0);\n return i;\n }\n }\n else // qw2 == product. Repeated roots (2 intersections).\n {\n var root = sqrt(difference / w2);\n czm_raySegment i = czm_raySegment(root, root);\n return i;\n }\n }\n }\n else if (q2 < 1.0) // Inside ellipsoid (2 intersections).\n {\n var difference = q2 - 1.0; // Negatively valued.\n var w2 = dot(w, w);\n var product = w2 * difference; // Negatively valued.\n var discriminant = qw * qw - product;\n var temp = -qw + sqrt(discriminant); // Positively valued.\n czm_raySegment i = czm_raySegment(0.0, temp / w2);\n return i;\n }\n else // q2 == 1.0. On ellipsoid.\n {\n if (qw < 0.0) // Looking inward.\n {\n var w2 = dot(w, w);\n czm_raySegment i = czm_raySegment(0.0, -qw / w2);\n return i;\n }\n else // qw >= 0.0. Looking outward or tangent.\n {\n return czm_emptyRaySegment;\n }\n }\n}\n",czm_readDepth="float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\n return czm_reverseLogDepth(texture2D(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective="/**\n * Reads a value previously transformed with {@link czm_writeNonPerspective}\n * by dividing it by `w`, the value used in the perspective divide.\n * This function is intended to be called in a fragment shader to access a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The value should have been\n * previously written in the vertex shader with a call to\n * {@link czm_writeNonPerspective}.\n *\n * @name czm_readNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.\n * @param {float} oneOverW One over the perspective divide value, `w`. Usually this is simply `gl_FragCoord.w`.\n * @returns {float|vec2|vec3|vec4} The usable value.\n */\nfloat czm_readNonPerspective(float value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\n return value * oneOverW;\n}\n",czm_reverseLogDepth="fn czm_reverseLogDepth(logZ : f32) -> f32\n{\n#ifdef LOG_DEPTH\n var near = uniforms.czm_currentFrustum.x;\n var far = uniforms.czm_currentFrustum.y;\n var log2Depth = logZ * uniforms.czm_log2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#else\n return logZ;\n#endif\n}\n",czm_RGBToHSB="\nfn czm_RGBToHSB(rgb : vec3<f32>) -> vec3<f32>\n{\n var K_RGB2HSB = vec4<f32>(0.0, -0.33333, 0.66667, -1.0);\n var p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\n var q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\n var d = q.x - min(q.w, q.y);\n return vec3<f32>(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL="\nfn RGBtoHCV(rgb : vec3<f32>) -> vec3<f32>\n{\n // Based on work by Sam Hocevar and Emil Persson\n var p : vec4<f32>;\n if(rgb.g < rgb.b){\n p = vec4<f32>(rgb.bg, -1.0, 2.0 / 3.0);\n }\n else{\n p = vec4<f32>(rgb.gb, 0.0, -1.0 / 3.0);\n }\n var q : vec4<f32>;\n if(rgb.r < p.x){\n p = vec4(p.xyw, rgb.r);\n }\n else{\n p = vec4(rgb.r, p.yzx);\n }\n var c = q.x - min(q.w, q.y);\n var h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\n return vec3(h, c, q.x);\n}\n\nfn czm_RGBToHSL(rgb : vec3<f32>) -> vec3<f32>\n{\n var hcv = RGBtoHCV(rgb);\n var l = hcv.z - hcv.y * 0.5;\n var s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\n return vec3<f32>(hcv.x, s, l);\n}\n",czm_RGBToXYZ="\nfn czm_RGBToXYZ(rgb : vec3<f32>) -> vec3<f32>\n{\n const RGB2XYZ = mat3x3<f32>(0.4124, 0.2126, 0.0193,\n 0.3576, 0.7152, 0.1192,\n 0.1805, 0.0722, 0.9505);\n var xyz = RGB2XYZ * rgb;\n var Yxy;\n Yxy.r = xyz.g;\n var temp = dot(vec3<f32>(1.0), xyz);\n Yxy.gb = xyz.rg / temp;\n return Yxy;\n}\n",czm_RollerShutter="void czm_RollerShutter(vec2 coord, vec4 region)\n{\n vec2 f = step(region.xw, coord);\n vec2 s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n",czm_s3mBatchOperation="\nfn czm_s3mBatchOperation(inOperationType : vec4<f32>, color : vec4<f32>, selectedColor : vec4<f32>, translation : vec3<f32>,\n vertexColor : ptr<function, vec4<f32>>, vertexPos : ptr<function, vec4<f32>>, vIsFiltByID : ptr<function, vec4<f32>>, fSelected : ptr<function, f32>)\n{\n var operationType = inOperationType;\n operationType.x += 0.001f;\n var right_2 = operationType.x * 0.5f;\n var right_4 = right_2 * 0.5f;\n var right_8 = right_4 * 0.5f;\n var right_16 = right_8 * 0.5f;\n var isSetColor = fract(right_2);\n if(isSetColor > 0.1f)\n {\n var mixA = (*vertexColor).a * color.a;\n (*vertexColor) = vec4(color.rgb, mixA);\n }\n var isPicked = fract(floor(right_2)* 0.5f);\n if(isPicked > 0.1f)\n {\n (*fSelected) = 1.0f;\n #ifdef REPLACE_SELECT_TYPE\n (*vertexColor) = selectedColor;\n #else\n (*vertexColor) *= selectedColor;\n #endif\n }\n var isHide = fract(floor(right_4)* 0.5f);\n if(isHide > 0.1f)\n {\n (*vertexColor).a = 0.0f;\n }\n var isOffset = fract(floor(right_8)* 0.5f);\n if(isOffset > 0.1f)\n {\n (*vertexPos).x += translation.x;\n (*vertexPos).y += translation.y;\n (*vertexPos).z += translation.z;\n }\n var isClip = fract(floor(right_16) * 0.5f);\n if(isClip > 0.1f)\n {\n (*vIsFiltByID).x = 1.0f;\n }\n}\n",czm_s3mBatchOperationForSilhouette="\nfn czm_s3mBatchOperationForSilhouette(inOperationType : vec4<f32>, color : vec4<f32>, vertexColor : ptr<function, vec4<f32>>, vertexPos : ptr<function, vec4<f32>>, vIsFiltByID : ptr<function, vec4<f32>>, translation : vec3<f32>, fSelected : ptr<function, f32>)\n{\n var operationType = inOperationType;\n operationType.x += 0.001;\n var right_2 = operationType.x * 0.5f;\n var right_4 = right_2 * 0.5f;\n var right_8 = right_4 * 0.5f;\n var right_16 = right_8 * 0.5f;\n var isSetColor = fract(right_2);\n if(isSetColor > 0.1f)\n {\n (*vertexColor) *= color;\n }\n var isPicked = fract(floor(right_2)* 0.5f);\n if(isPicked > 0.1f)\n {\n (*fSelected) = 1.0f;\n }\n var isHide = fract(floor(right_4)* 0.5f);\n if(isHide > 0.1f)\n {\n (*vertexColor).a = 0.0f;\n }\n var isOffset = fract(floor(right_8)* 0.5f);\n if(isOffset > 0.1f)\n {\n (*vertexPos).x += translation.x;\n (*vertexPos).y += translation.y;\n (*vertexPos).z += translation.z;\n }\n var isClip = fract(floor(right_16) * 0.5f);\n if(isClip > 0.1f)\n {\n (*vIsFiltByID).x = 1.0f;\n }\n}\n",czm_s3mComputeVaryings="\n#ifdef IMAGERY\n attribute img : vec2<f32>;\n varying imgCoord : vec2<f32>;\n#endif\n\n#ifdef RASTER_CULL\nvarying vRasterTexCoord : vec2<f32>;\nuniform uRasterRactc : vec4<f32>;\n#endif\n\n#ifdef Volume\n attribute aRatio : vec3<f32>;\n varying vecRotioCoord : vec3<f32>;\n#endif\n\n#ifdef QUAD_OUTLINE\n varying vDistanceFromEye : f32;\n#endif\n\n#ifdef HYPSOMETRIC\n varying vecHypTexCoord : vec2<f32>;\n#endif\n\n#ifdef EXCAVATION\n varying vExcavationVertexPos : vec4<f32>;\n#endif\n\n#ifdef SQRESULT\n uniform uSQViewProj : mat4x4<f32>;\n varying vSQ_clip_pos : vec4<f32>;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n uniform uFloodMatrixInvert : mat4x4<f32>;\n varying vFloodPos : vec4<f32>;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n varying vLayerTexCoord : vec2<f32>;\n varying vModIndexAndTexIndex : vec2<f32>;\n#endif\n\n\nfn czm_s3mComputeVaryings(vertexPos : vec4<f32>)\n{\n#ifdef RASTER_CULL\n var rasterPos : vec2<f32> = (Mesh.uGeoMatrix * aPosition).xy;\n vRasterTexCoord.x = (rasterPos.x - uRasterRact.x)/(uRasterRact.z - uRasterRact.x);\n vRasterTexCoord.y = (rasterPos.y - uRasterRact.y)/(uRasterRact.w - uRasterRact.y);\n#endif\n\n#ifdef Volume\n vecRotioCoord = aRatio;\n#endif\n\n#ifdef EXCAVATION\n vExcavationVertexPos = Mesh.uGeoMatrix * vertexPos;\n#endif\n\n#ifdef HYPSOMETRIC\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var ptInRect = 1.0;\n vecHypTexCoord = calculatePolyTexCoord(Mesh.uGeoMatrix * vec4(vertexPos.xyz, 1.0), Layer.uHypRect, &ptInRect);\n }\n#endif\n\n#ifdef SQRESULT\n vSQ_clip_pos = uniforms.uSQViewProj * vec4<f32>(vertexPos.xyz, 1.0);\n#endif\n\n#ifdef IMAGERY\n imgCoord = img;\n#endif\n\n#ifdef QUAD_OUTLINE\n vDistanceFromEye = gl_Position.z;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n const right_8 : f32 = 65280.0;\n const right_16 : f32 = 16711680.0;\n var pickId = vSecondColor.r * 255.0 + vSecondColor.g * right_8 + vSecondColor.b * right_16;\n vModIndexAndTexIndex.x = (pickId - 10.0 * floor(pickId / 10.0)) * 0.1;\n vModIndexAndTexIndex.y = pickId - Layer.uEmissionTexAtlasCount * floor(pickId / Layer.uEmissionTexAtlasCount);\n var realVertexPos = Mesh.uGeoMatrix * vertexPos;\n vLayerTexCoord = (realVertexPos.xy - Layer.uLayerBounds.xy) / Layer.uLayerBounds.zw;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n vFloodPos = uniforms.uFloodMatrixInvert * vec4<f32>(vertexPos.xyz, 1.0);\n#endif\n}\n",czm_s3mImageryColor="\n#ifdef IMAGERY\nvarying vec2 imgCoord;\nuniform sampler2D uImgTexture;\nuniform float uImgTextureAlpha;\nuniform vec2 uImgTextureBound;\n\n//#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\nuniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n//#endif\n\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\n\n\nvoid czm_getImageryColor(inout vec4 color)\n{\n\tvec2 texcood = vec2(imgCoord.x / uImgTextureBound.x, imgCoord.y / uImgTextureBound.y);\n#ifdef MULTIBATCH\n\tcolor = computeDayColor(vec4(1.0,1.0,1.0,0.0), clamp(vec3(texcood,0.0), 0.0, 1.0));\n#else\n\tcolor = computeDayColor(color, clamp(vec3(texcood,0.0), 0.0, 1.0));\n#endif\n}\n#endif\n",czm_s3mOverlay="\n#ifdef OVERLAY\n uniform sampler2D uOverlayTexture;\n varying vec2 vecOverlayTexCoord;\n varying float hasOverlay;\n\tvoid czm_getOverlayColor(inout vec4 color)\n\t{\n\t\tif(hasOverlay > 0.5)\n\t\t{\n\t\t\tvec4 overlayColor = texture2D(uOverlayTexture, vecOverlayTexCoord.xy);\n\t\t\tif(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n\t\t\t{\n\t\t\t\tvec4 mixColor = mix(color, overlayColor, overlayColor.a);\n\t\t\t\tcolor = vec4(mixColor.r, mixColor.g, mixColor.b, color.a);\n\t\t\t}\n\t\t}\n\t}\n#endif\n",czm_S3MPBR=" uniform float u_metallicFactor;\n uniform float u_roughnessFactor;\n uniform vec4 u_emissiveFactor;\n uniform vec4 u_baseColorFactor;\n uniform float u_alphaCutoff;\n uniform sampler2D u_baseColorTexture;\n uniform sampler2D u_metallicRoughnessTexture;\n uniform sampler2D u_normalTexture;\n uniform sampler2D u_occlusionTexture;\n uniform sampler2D u_emissiveTexture;\n uniform vec4 u_baseColorUVOffsetAndTiling;\n uniform vec4 u_emissiveUVOffsetAndTiling;\n\n uniform float uSunLightON;\n #if DIR_LIGHTS > 0\n uniform vec3 uDirectionalLightDirectionEC[ DIR_LIGHTS ];\n uniform vec3 uDirectionalLightColor[ DIR_LIGHTS ];\n #endif\n #if POINT_LIGHTS > 0\n uniform vec3 uPointLightPositionEC[ POINT_LIGHTS ];\n uniform vec3 uPointLightColor[ POINT_LIGHTS ];\n uniform vec2 uPointLightDistanceAndDecay[ POINT_LIGHTS ];\n #endif\n #if SPOT_LIGHTS > 0\n uniform vec3 uSpotLightColor[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightPositionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDirectionEC[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightDistanceDecayCos[ SPOT_LIGHTS ];\n uniform vec3 uSpotLightExponent[ SPOT_LIGHTS ];\n #endif\n\n const float M_PI = 3.141592653589793;\n\n vec3 lambertianDiffuse(vec3 diffuseColor)\n {\n return diffuseColor / M_PI;\n }\n\n vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n {\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n }\n\n vec3 fresnelSchlick(float metalness, float VdotH)\n {\n return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n }\n\n vec3 F_Schlick(float ndv, vec3 spec)\n {\n return spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n }\n\n float D_Phong(float g, float ndh)\n {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n }\n\n float smithVisibilityG1(float NdotV, float roughness)\n {\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n }\n\n float smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n {\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n }\n\n float GGX(float roughness, float NdotH)\n {\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n }\n\n void getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm)\n {\n vec3 h = normalize(viewDir + lightDir);\n float NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\n float NdotH = clamp(dot(normal, h), 0.0, 1.0);\n vec3 li = lightColor * NdotL;\n diffuseTerm = li;\n specularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n }\n\n vec3 SRGBtoLINEAR3(vec3 srgbIn)\n {\n return pow(srgbIn, vec3(2.2));\n }\n\n vec4 SRGBtoLINEAR4(vec4 srgbIn)\n {\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n }\n\n vec3 LINEARtoSRGB(vec3 linearIn)\n {\n#ifndef HDR\n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n }\n\n float calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent)\n {\n return pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n }\n\n vec4 czm_S3MPBR(vec3 normalEC, vec3 positionEC, vec2 texCoord, vec4 vertexColor)\n {\n vec3 ng = normalize(normalEC);\n vec3 positionWC = (czm_inverseView * vec4(positionEC, 1.0)).xyz;\n#ifdef HAS_NORMAL_TEXTURE\n vec3 pos_dx = dFdx(positionEC);\n vec3 pos_dy = dFdy(positionEC);\n vec3 tex_dx = dFdx(vec3(texCoord, 0.0));\n vec3 tex_dy = dFdy(vec3(texCoord, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(u_normalTexture, texCoord).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n\n vec3 v = -normalize(positionEC);\n#ifdef DOUBLE_SIDED\n if (dot(n, v) < 0.0) {\n n = -n;\n }\n#endif\n\n // Add base color to fragment shader\n#ifdef HAS_BASECOLOR_TEXTURE\n vec2 baseColorTexCoord = texCoord;\n baseColorTexCoord = baseColorTexCoord * u_baseColorUVOffsetAndTiling.zw + u_baseColorUVOffsetAndTiling.xy;\n vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, baseColorTexCoord));\n baseColorWithAlpha *= u_baseColorFactor;\n#else\n vec4 baseColorWithAlpha = u_baseColorFactor;\n#endif\n baseColorWithAlpha *= vertexColor;\n vec3 baseColor = baseColorWithAlpha.rgb;\n#ifdef HAS_METALLICROUGHNESS_TEXTURE\n vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, texCoord).rgb;\n float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n metalness *= u_metallicFactor;\n roughness *= u_roughnessFactor;\n#else\n float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n#endif\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float NdotV = abs(dot(n, v)) + 0.001;\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n vec3 fresnelTerm = F_Schlick(NdotV, specularColor);\n vec3 color = vec3(0.0);\n // 默认加一个平行光作为太阳光\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(czm_sunDirectionEC, v, n, vec3(0.8), fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm * uSunLightON;\n specularTerm += lightSpecularTerm * uSunLightON;\n#if DIR_LIGHTS > 0 \n for (int i = 0; i < DIR_LIGHTS; i++) { \n getLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n } \n#endif \n#if POINT_LIGHTS > 0 \n for (int i = 0; i < POINT_LIGHTS; i++) {\n vec3 lVector = uPointLightPositionEC[i] - v_positionEC;\n float lightDistance = length(lVector);\n float lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\n if(lightAttenuation < 0.001) {\n continue;\n }\n vec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n }\n#endif \n#if SPOT_LIGHTS > 0 \n for (int i = 0; i < SPOT_LIGHTS; i++) {\n vec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\n float lightDistance = length(lVector);\n float lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCos[i].x, uSpotLightDistanceDecayCos[i].y);\n if(lightAttenuation < 0.001) {\n continue;\n }\n float spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\n if(spotEffect > uSpotLightDistanceDecayCos[i].z) {\n vec3 spotLightColor = uSpotLightColor[i] * lightAttenuation * spotEffect;\n vec3 lightDiffuseTerm = vec3(0.0);\n vec3 lightSpecularTerm = vec3(0.0);\n getLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n diffuseTerm +=lightDiffuseTerm;\n specularTerm += lightSpecularTerm;\n }\n }\n#endif \n color = baseColor; \n color *= max(diffuseTerm, vec3(0.0)); \n color += max(specularTerm, vec3(0.0)); \n // 计算环境光\n #ifdef USE_IBL_LIGHTING\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n // Figure out if the reflection vector hits the ellipsoid\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, 6378137.0 / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z.\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n\n vec2 iblFactor = vec2(1.0);\n float luminanceAtZenith = 0.5;\n // Luminance model from page 40 of http://silviojemma.com/public/papers/lighting/spherical-harmonic-lighting.pdf\n #ifdef USE_SUN_LUMINANCE\n // Angle between sun and zenith\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n // Angle between zenith and current pixel\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n // Angle between sun and current pixel\n float sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\n float gamma = acos(sunNdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = luminanceAtZenith * (numerator / denominator);\n#endif\n\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * iblFactor.y);\n#ifdef USE_SUN_LUMINANCE\n color += IBLColor * luminance;\n#else\n color += IBLColor;\n#endif // end of USE_SUN_LUMINANCE\n#endif // end of USE_IBL_LIGHTING\n\n#ifdef HAS_OCCLUSION_TEXTURE\n color *= texture2D(u_occlusionTexture, texCoord).r;\n#endif\n\n#ifdef HAS_EMISSIVE_TEXTURE\n vec2 emissiveTexCoord = texCoord;\n emissiveTexCoord = emissiveTexCoord * u_emissiveUVOffsetAndTiling.zw + u_emissiveUVOffsetAndTiling.xy;\n vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, emissiveTexCoord).rgb);\n emissive *= u_emissiveFactor.rgb;\n color += emissive;\n#else\n color += u_emissiveFactor.rgb;\n#endif\n color = LINEARtoSRGB(color);\n vec4 resultColor = vec4(color, 1.0);\n#ifdef MASK\n if (baseColorWithAlpha.a < u_alphaCutoff)\n {\n discard;\n }\n resultColor = vec4(color, 1.0);\n#endif\n#ifdef BLEND\n resultColor = vec4(color, baseColorWithAlpha.a);\n#endif\n return resultColor;\n }",czm_s3mVisibleDistance="#ifdef VISIBLEDISTANCEMAX\nuniform float uVisibleDistanceMax;\nvoid czm_s3mGetAlphaByDistance(vec3 positionEC, inout vec4 color)\n{\n if(length(positionEC) > uVisibleDistanceMax)\n {\n float minAlphl = min(1.0, (length(positionEC) - uVisibleDistanceMax) / 2000.0);\n color.a = 1.0 - minAlphl;\n }\n}\n#endif",czm_sampleOctahedralProjection="\nvar uSpecularEnvironmentMaps : texture_2d<f32>;\nvar uSpecularEnvironmentMapsSampler : sampler;\n\n/**\n * Samples the 4 neighboring pixels and return the weighted average.\n *\n * @private\n */\nfn czm_sampleOctahedralProjectionWithFiltering(textureSize : vec2<f32>, inDirection : vec3<f32>, lod : f32) -> vec3<f32> {\n var direction = inDirection / dot(vec3<f32>(1.0), abs(inDirection));\n var rev = abs(direction.zx) - vec2<f32>(1.0);\n var negX : f32;\n var negY : f32;\n if(direction.x < 0.0){\n negX = rev.x;\n }\n else\n {\n negX = -rev.x;\n }\n if(direction.z < 0.0) {\n negY = rev.y;\n }\n else {\n negY = -rev.y;\n }\n var neg = vec2<f32>(negX, negY);\n\n var uv : vec2<f32>;\n if(direction.y < 0.0){\n uv = neg;\n }\n else {\n uv = direction.xz;\n }\n\n var coord = 0.5 * uv + vec2<f32>(0.5);\n var pixel = 1.0 / textureSize;\n\n if (lod > 0.0)\n {\n // Each subseqeuent mip level is half the size\n var scale = 1.0 / pow(2.0, lod);\n var offset = ((textureSize.y + 1.0) / textureSize.x);\n\n coord.x = coord.x * offset;\n coord = coord * scale;\n\n coord.x = coord.x + offset + pixel.x;\n coord.y = coord.y + (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n }\n else\n {\n coord.x = coord.x * (textureSize.y / textureSize.x);\n }\n\n // Do bilinear filtering\n //#ifndef OES_texture_float_linear\n // var color1 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord + vec2<f32>(0.0, pixel.y)).rgb;\n // var color2 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord + vec2<f32>(pixel.x, 0.0)).rgb;\n // var color3 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord + pixel).rgb;\n // var color4 = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord).rgb;\n\n // var texturePosition = coord * textureSize;\n\n // var fu = fract(texturePosition.x);\n // var fv = fract(texturePosition.y);\n\n // var average1 = mix(color4, color2, fu);\n // var average2 = mix(color1, color3, fu);\n\n // var color = mix(average1, average2, fv);\n // #else\n var color = textureSample(uSpecularEnvironmentMaps, uSpecularEnvironmentMapsSampler, coord).rgb;\n // #endif\n\n return color;\n}\n\n\n/**\n * Samples from a cube map that has been projected using an octahedral projection from the given direction.\n *\n * @name czm_sampleOctahedralProjection\n * @glslFunction\n *\n * @param {vec2} textureSize The width and height dimensions in pixels of the projected map.\n * @param {vec3} direction The normalized direction used to sample the cube map.\n * @param {float} lod The level of detail to sample.\n * @param {float} maxLod The maximum level of detail.\n * @returns {vec3} The color of the cube map at the direction.\n */\nfn czm_sampleOctahedralProjection(textureSize : vec2<f32>, direction : vec3<f32>, lod : f32, maxLod : f32) -> vec3<f32>{\n var currentLod = floor(lod);\n var nextLod = min(currentLod + 1.0, maxLod);\n\n var colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(textureSize, direction, currentLod);\n var colorNextLod = czm_sampleOctahedralProjectionWithFiltering(textureSize, direction, nextLod);\n\n return mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation="/**\n * Adjusts the saturation of a color.\n * \n * @name czm_saturation\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the saturation of the color.\n *\n * @returns {float} The color with the saturation adjusted.\n *\n * @example\n * vec3 greyScale = czm_saturation(color, 0.0);\n * vec3 doubleSaturation = czm_saturation(color, 2.0);\n */\nfn czm_saturation(rgb : vec3<f32>, adjustment : f32) -> vec3<f32>\n{\n // Algorithm from Chapter 16 of OpenGL Shading Language\n var W = vec3(0.2125, 0.7154, 0.0721);\n var intensity = vec3<f32>(dot(rgb, W));\n return mix(intensity, rgb, adjustment);\n}\n",czm_setAlphaByWWalue="\n#ifdef W_VISIBLE\n uniform sampler2D uCategorieTexture;\n uniform float uMaxCategory;\n uniform float uMinCategory;\n uniform float uCategoryWidht;\n\n czm_setAlphaByWValue(in float w, inout vec4 color)\n {\n vec2 categoryTexCoord = vec2(abs(w - uMinCategory) / uCategoryWidht + 0.5 /uCategoryWidht , 0.5);\n float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n color.a *= 1.0 - category;\n }\n#endif\n",czm_signNotZero="\nfn czm_signNotZero(value : f32) ->f32\n{\n if(value >= 0.0){\n return 1.0; \n }\n else\n {\n return -1.0;\n }\n}\n// wgsl不支持重载\n// fn czm_signNotZero_v2(value : vec2<f32>) -> vec2<f32>\n// {\n// return vec2<f32>(czm_signNotZero(value.x), czm_signNotZero(value.y));\n// }\n\n// fn czm_signNotZero_v3(value : vec3<f32>) -> vec3<f32>\n// {\n// return vec3<f32>(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n// }\n\n// fn czm_signNotZero_v4(value : vec4<f32>) -> vec4<f32>\n// {\n// return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n// }\n",czm_sketchMode="uniform sampler2D uNormalDepthTexture;\nuniform int uFillStyle;\nfloat edgeDetection(float lineWidth)\n{\n vec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\n vec2 off = lineWidth / czm_globeDepthTextureDim.xy;\n vec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\n val_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\n vec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\n val_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\n vec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\n val_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\n vec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\n val_se.xyz = (val_se.xyz * 2.0) - 1.0;\n float discontinuity = 0.0;\n float dot0 = dot(val_nw.xyz, val_se.xyz);\n float dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nvec4 czm_sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\n vec4 outputColor = inputColor;\n float discontinuity = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0, 1.0);\n if(uFillStyle == 1)\n {\n outputColor = lineColor;\n outputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\n outputColor.a *= lineColor.a;\n }\n else\n {\n vec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\n outputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n }\n return outputColor;\n}",czm_spatialQueryClip="#ifdef SQCLIP\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \nfloat computeDepth()\n{\n#ifdef LOG_DEPTH\n return log2(v_depthFromNearPlusOne) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\n return gl_FragCoord.z;\n#endif\n}\nbool isPointInSpatialQueryObject(vec2 texCoord)\n{\n bool bIn = false;\n vec4 colorInClipTexture = texture2D(uFrontColorTexture,texCoord.xy);\n if(colorInClipTexture.r > 0.99 && colorInClipTexture.g < 0.01 && colorInClipTexture.b < 0.01)\n {\n float depthNear = czm_unpackDepth(texture2D(uFrontDepthTexture, texCoord.xy)) - 0.00001;\n float depthFar = czm_unpackDepth(texture2D(uBackDepthTexture, texCoord.xy)) + 0.00001;\n float currentDepth = computeDepth();\n if(currentDepth > depthNear && currentDepth < depthFar){\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\nvoid czm_spatialQueryClip(){\n\tvec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\n if(!isPointInSpatialQueryObject(texCoord)) \n { \n discard; \n } \n}\n#endif\n}",czm_sphericalHarmonics="/**\n * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.\n * <p>\n * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].\n * </p>\n *\n * @name czm_sphericalHarmonics\n * @glslFunction\n *\n * @param {vec3} normal The normalized direction.\n * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.\n * @returns {vec3} The color at the direction.\n *\n * @see https://graphics.stanford.edu/papers/envmap/envmap.pdf\n */\nfn czm_sphericalHarmonics(normal : vec3<f32>, coefficients : array<vec3<f32>, 9>) -> vec3<f32>\n{\n const c1 = 0.429043;\n const c2 = 0.511664;\n const c3 = 0.743125;\n const c4 = 0.886227;\n const c5 = 0.247708;\n\n var L00 = coefficients[0];\n var L1_1 = coefficients[1];\n var L10 = coefficients[2];\n var L11 = coefficients[3];\n var L2_2 = coefficients[4];\n var L2_1 = coefficients[5];\n var L20 = coefficients[6];\n var L21 = coefficients[7];\n var L22 = coefficients[8];\n\n var x = normal.x;\n var y = normal.y;\n var z = normal.z;\n\n return c1 * L22 * (x * x - y * y) + c3 * L20 * z * z + c4 * L00 - c5 * L20 +\n 2.0 * c1 * (L2_2 * x * y + L21 * x * z + L2_1 * y * z) +\n 2.0 * c2 * (L11 * x + L1_1 * y + L10 * z);\n}\n",czm_splitClip="#ifdef APPLY_SPLIT\nuniform float uSplitDirection;\nuniform float uSplitPosition;\nvoid czm_splitClip(){\n if (uSplitDirection > 1.5)\n {\n if(gl_FragCoord.x > uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection > 0.5)\n {\n if(gl_FragCoord.x < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -1.5)\n {\n if(gl_FragCoord.y < uSplitPosition)\n {\n discard;\n }\n }\n else if(uSplitDirection < -0.5)\n {\n if(gl_FragCoord.y > uSplitPosition)\n {\n discard;\n }\n }\n}\n#endif\n}",czm_sRGBToLinear="vec3 czm_sRGBToLinear(vec3 srgbIn)\n{\nreturn pow(srgbIn, vec3(2.2));\n}\nvec4 czm_sRGBToLinear(vec4 srgbIn)\n{\nsrgbIn = srgbIn ;\nvec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\nreturn vec4(linearOut, srgbIn.a);\n}\n",czm_tangentToEyeSpaceMatrix="/**\n * Creates a matrix that transforms vectors from tangent space to eye space.\n *\n * @name czm_tangentToEyeSpaceMatrix\n * @glslFunction\n *\n * @param {vec3} normalEC The normal vector in eye coordinates.\n * @param {vec3} tangentEC The tangent vector in eye coordinates.\n * @param {vec3} bitangentEC The bitangent vector in eye coordinates.\n *\n * @returns {mat3} The matrix that transforms from tangent space to eye space.\n *\n * @example\n * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);\n * vec3 normal = tangentToEye * texture2D(normalMap, st).xyz;\n */\nmat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\n vec3 normal = normalize(normalEC);\n vec3 tangent = normalize(tangentEC);\n vec3 bitangent = normalize(bitangentEC);\n return mat3(tangent.x , tangent.y , tangent.z,\n bitangent.x, bitangent.y, bitangent.z,\n normal.x , normal.y , normal.z);\n}\n",czm_transformPlane="vec4 czm_transformPlane(vec4 clippingPlane, mat4 transform) {\n vec3 transformedDirection = normalize((transform * vec4(clippingPlane.xyz, 0.0)).xyz);\n vec3 transformedPosition = (transform * vec4(clippingPlane.xyz * -clippingPlane.w, 1.0)).xyz;\n vec4 transformedPlane;\n transformedPlane.xyz = transformedDirection;\n transformedPlane.w = -dot(transformedDirection, transformedPosition);\n return transformedPlane;\n}\n",czm_translateRelativeToEye="/**\n * Translates a position (or any <code>vec3</code>) that was encoded with {@link EncodedCartesian3},\n * and then provided to the shader as separate <code>high</code> and <code>low</code> bits to\n * be relative to the eye. As shown in the example, the position can then be transformed in eye\n * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},\n * respectively.\n * <p>\n * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as\n * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.\n * </p>\n *\n * @name czm_translateRelativeToEye\n * @glslFunction\n *\n * @param {vec3} high The position's high bits.\n * @param {vec3} low The position's low bits.\n * @returns {vec3} The position translated to be relative to the camera's position.\n *\n * @example\n * attribute vec3 positionHigh;\n * attribute vec3 positionLow;\n *\n * void main()\n * {\n * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n * }\n *\n * @see czm_modelViewRelativeToEye\n * @see czm_modelViewProjectionRelativeToEye\n * @see czm_computePosition\n * @see EncodedCartesian3\n */\nvec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\n vec3 highDifference = high - czm_encodedCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedCameraPositionMCLow;\n\n return vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong="/**\n * @private\n */\nvec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down and horizon views)\n float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\n\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n }\n\n diffuse = clamp(diffuse, 0.0, 1.0);\n\n float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n",czm_transparentColorClip="#ifdef TRANSPARENT_BACK_COLOR\nuniform vec4 uTransparentBackColor;\nuniform float uTransparentBackColorTolerance;\n\nczm_transparentColorClip(vec4 color)\n{\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - color.r);\n float gDiff = abs(uTransparentBackColor.g - color.g);\n float bDiff = abs(uTransparentBackColor.b - color.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n}\n#endif\n",czm_transpose="/**\n * Returns the transpose of the matrix. The input <code>matrix</code> can be\n * a <code>mat2</code>, <code>mat3</code>, or <code>mat4</code>.\n *\n * @name czm_transpose\n * @glslFunction\n *\n * @param {} matrix The matrix to transpose.\n *\n * @returns {} The transposed matrix.\n *\n * @example\n * // GLSL declarations\n * mat2 czm_transpose(mat2 matrix);\n * mat3 czm_transpose(mat3 matrix);\n * mat4 czm_transpose(mat4 matrix);\n *\n * // Transpose a 3x3 rotation matrix to find its inverse.\n * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(\n * positionMC, normalEC);\n * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);\n */\nmat2 czm_transpose(mat2 matrix)\n{\n return mat2(\n matrix[0][0], matrix[1][0],\n matrix[0][1], matrix[1][1]);\n}\n\nmat3 czm_transpose(mat3 matrix)\n{\n return mat3(\n matrix[0][0], matrix[1][0], matrix[2][0],\n matrix[0][1], matrix[1][1], matrix[2][1],\n matrix[0][2], matrix[1][2], matrix[2][2]);\n}\n\nmat4 czm_transpose(mat4 matrix)\n{\n return mat4(\n matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\n matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\n matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\n matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackDepth="\n fn czm_unpackDepth(packedDepth : vec4<f32>) -> f32\n {\n return dot(packedDepth, vec4<f32>(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n }\n",czm_unpackFloat="\n// #define SHIFT_RIGHT_8 0.00390625 //1.0 / 256.0\n// #define SHIFT_RIGHT_16 0.00001525878 //1.0 / 65536.0\n// #define SHIFT_RIGHT_24 5.960464477539063e-8//1.0 / 16777216.0\n// #define BIAS 38.0\n\nfn czm_unpackFloat(packedFloat : vec4<f32>) -> f32\n{\n packedFloat *= 255.0f;\n var temp = packedFloat.w / 2.0f;\n var exponent = floor(temp);\n var sign = (temp - exponent) * 2.0f;\n exponent = exponent - float(38.0f);\n sign = sign * 2.0f - 1.0f;\n sign = -sign;\n var unpacked = sign * packedFloat.x * 0.00390625f;\n unpacked += sign * packedFloat.y * 0.00001525878f;\n unpacked += sign * packedFloat.z * 5.960464477539063e-8f;\n return unpacked * pow(10.0f, exponent);\n}\n",czm_unpackValue="\n fn czm_unpackValue(packedValue : vec4<f32>) -> f32\n {\n const SHIFT_LEFT16 = 65536.0;\n\tconst SHIFT_LEFT8 = 256.0;\n\tvar value = packedValue * 255.0;\n\treturn value.r * SHIFT_LEFT16 + value.g * SHIFT_LEFT8 + value.b - 9000.0;\n }\n",czm_vertexLogDepth="\n#ifdef LOG_DEPTH\n varying v_depthFromNearPlusOne : f32;\n #ifdef SHADOW_MAP\n varying v_logPositionEC : vec3<f32>;\n #endif\n#endif\n\nfn czm_updatePositionDepth(inCoords : vec4<f32>) -> vec4<f32> {\n var coords = inCoords;\n#ifdef LOG_DEPTH\n #ifdef SHADOW_MAP\n var logPositionEC = (Scene.uInverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n #endif\n coords.z = clamp(coords.z / coords.w, -1.0f, 1.0f) * coords.w;\n#endif\n return coords;\n}\n\nfn czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0f - Scene.uCurrentFrustum.x + gl_Position.w;\n gl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\n\nfn czm_vertexLogDepth_v4f(clipCoords : vec4<f32>)\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0f - Scene.uCurrentFrustum.x + clipCoords.w;\n czm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates="/**\n * Transforms a position from window to eye coordinates.\n * The transform from window to normalized device coordinates is done using components\n * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating\n * the inverse of <code>czm_viewportTransformation</code>. The transformation from\n * normalized device coordinates to clip coordinates is done using <code>fragmentCoordinate.w</code>,\n * which is expected to be the scalar used in the perspective divide. The transformation\n * from clip to eye coordinates is done using {@link czm_inverseProjection}.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec4} fragmentCoordinate The position in window coordinates to transform.\n *\n * @returns {vec4} The transformed position in eye coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @example\n * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);\n */\nfn czm_windowToEyeCoordinates(fragmentCoordinate : vec4<f32>) -> vec4<f32>\n{\n // Reconstruct NDC coordinates\n var x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\n var y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\n var z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n var q = vec4<f32>(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= fragmentCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s\n {\n q = czm_inverseProjection * q;\n }\n else\n {\n var top = czm_frustumPlanes.x;\n var bottom = czm_frustumPlanes.y;\n var left = czm_frustumPlanes.z;\n var right = czm_frustumPlanes.w;\n\n var near = czm_currentFrustum.x;\n var far = czm_currentFrustum.y;\n\n q.x = (q.x * (right - left) + left + right) * 0.5;\n q.y = (q.y * (top - bottom) + bottom + top) * 0.5;\n q.z = (q.z * (near - far) - near - far) * 0.5;\n q.w = 1.0;\n }\n\n return q;\n}\n\n/**\n * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.\n * This function produces more accurate results for window positions with log depth than\n * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version\n * of czm_windowToEyeCoordinates.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.\n * @param {float} depthOrLogDepth A depth or log depth for the fragment.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @returns {vec4} The transformed position in eye coordinates.\n */\nfn czm_windowToEyeCoordinates(fragmentCoordinateXY : vec2<f32>, depthOrLogDepth : f32) -> vec4<f32>\n{\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#ifdef LOG_DEPTH\n var near = czm_currentFrustum.x;\n var far = czm_currentFrustum.y;\n var log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n var depthFromCamera = depthFromNear + near;\n var windowCoord = vec4<f32>(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n var eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n return eyeCoordinate;\n#else\n var windowCoord = vec4<f32>(fragmentCoordinateXY, depthOrLogDepth, 1.0);\n var eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n#endif\n return eyeCoordinate;\n}\n",czm_writeDepthClampedToFarPlane="// emulated noperspective\n#ifndef LOG_DEPTH\nvarying float v_WindowZ;\n#endif\n/**\n * Clamps a vertex to the far plane by writing the fragments depth.\n * <p>\n * The shader must enable the GL_EXT_frag_depth extension.\n * </p>\n *\n * @name czm_writeDepthClampedToFarPlane\n * @glslFunction\n *\n * @example\n * gl_FragColor = color;\n * czm_writeDepthClampedToFarPlane();\n *\n * @see czm_depthClampFarPlane\n */\nvoid czm_writeDepthClampedToFarPlane()\n{\n#if (defined(GL_EXT_frag_depth) || defined(WEBGL2)) && !defined(LOG_DEPTH)\n gl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n",czm_writeLogDepth="#ifdef LOG_DEPTH\nvarying v_depthFromNearPlusOne : f32;\n\n#ifdef POLYGON_OFFSET\nuniform u_polygonOffset : vec2<f32>;\n#endif\n\n#endif\n\nfn czm_writeLogDepth(inDepth : f32)\n{\n var depth = inDepth;\n#ifdef LOG_DEPTH\n if (depth <= 0.9999999 || depth > Scene.uFarDepthFromNearPlusOne) {\n discard;\n }\n\n#ifdef POLYGON_OFFSET\n var factor = u_polygonOffset.x;\n var units = u_polygonOffset.y;\n var x = dpdx(depth);\n var y = dpdy(depth);\n var m = sqrt(x * x + y * y);\n depth += m * factor;\n\n#endif // POLYGON_OFFSET\n\n gl_FragDepth = log2(depth) * Scene.uOneOverLog2FarDepthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\n gl_FragDepth += 0.00000001 * units;\n#endif // POLYGON_OFFSET\n\n#endif // LOG_DEPTH\n}\n",czm_writeNonPerspective="/**\n * Transforms a value for non-perspective interpolation by multiplying\n * it by w, the value used in the perspective divide. This function is\n * intended to be called in a vertex shader to compute the value of a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The fragment shader\n * must call {@link czm_readNonPerspective} to retrieve the final\n * non-perspective value.\n *\n * @name czm_writeNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.\n * @param {float} w The perspective divide value. Usually this is the computed `gl_Position.w`.\n * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a `varying` and read in the\n * fragment shader with {@link czm_readNonPerspective}.\n */\nfloat czm_writeNonPerspective(float value, float w) {\n return value * w;\n}\n\nvec2 czm_writeNonPerspective(vec2 value, float w) {\n return value * w;\n}\n\nvec3 czm_writeNonPerspective(vec3 value, float w) {\n return value * w;\n}\n\nvec4 czm_writeNonPerspective(vec4 value, float w) {\n return value * w;\n}\n",czm_XYZToRGB="/**\n * Converts a CIE Yxy color to RGB.\n * <p>The conversion is described in\n * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n * </p>\n * \n * @name czm_XYZToRGB\n * @glslFunction\n * \n * @param {vec3} Yxy The color in CIE Yxy.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_XYZToRGB(vec3 Yxy)\n{\n const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n -1.5371, 1.8760, -0.2040,\n -0.4985, 0.0416, 1.0572);\n vec3 xyz;\n xyz.r = Yxy.r * Yxy.g / Yxy.b;\n xyz.g = Yxy.r;\n xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\n \n return XYZ2RGB * xyz;\n}\n",czm_getNormalMatrix="\nfn czm_getNormalMatrix(viewMatrix : mat4x4<f32>, modelMatrix : mat4x4<f32>) -> mat3x3<f32> {\n var modelView = viewMatrix * modelMatrix;\n let modelViewRow0 : vec4<f32> = modelView[0u];\n let modelViewRow1 : vec4<f32> = modelView[1u]; \n let modelViewRow2 : vec4<f32> = modelView[2u]; \n var normalMatrix = mat3x3<f32>(\n vec3<f32>(modelViewRow0.x, modelViewRow0.y, modelViewRow0.z), \n vec3<f32>(modelViewRow1.x, modelViewRow1.y, modelViewRow1.z), \n vec3<f32>(modelViewRow2.x, modelViewRow2.y, modelViewRow2.z));\n return normalMatrix;\n}",czm_sampleAndBlend="fn czm_sampleAndBlend(\ncurrentTextureColor : vec4<f32>,\npreviousColor : vec4<f32>,\ntileTextureCoordinates : vec2<f32>,\ntextureCoordinateRectangle : vec4<f32>,\ntransparentBackColor : vec4<f32>,\nimageryClipEnable : bool,\ntextureAlphaIn : f32,\ntextureBrightness : f32,\ntextureContrast : f32,\ntextureHue : f32,\ntextureSaturation : f32,\ntextureOneOverGamma : f32,\nsplit : vec2<f32>,\nswipe : vec4<f32>)\n-> vec4<f32> {\nvar alphaMultiplier : vec2<f32> = step(textureCoordinateRectangle.xy, tileTextureCoordinates);\nvar textureAlpha : f32 = textureAlphaIn * alphaMultiplier.x * alphaMultiplier.y;\nalphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.zw - tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nvar color : vec3<f32> = currentTextureColor.rgb;\nvar alpha : f32 = currentTextureColor.a;\nif(transparentBackColor.a > 0.01)\n{\nvar rDiff = abs(transparentBackColor.r - color.r);\nvar gDiff = abs(transparentBackColor.g - color.g);\nvar bDiff = abs(transparentBackColor.b - color.b);\nif(rDiff < transparentBackColor.a && gDiff < transparentBackColor.a && bDiff < transparentBackColor.a)\n{\nalpha = 0.0;\n}\n}\nif(imageryClipEnable)\n{\n#ifdef Apply_ImageryClip\nif(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n{\nalpha = 0.0;\n}\n#else\nalpha = 0.0;\n#endif\n}\n#if !defined(APPLY_GAMMA)\nvar tempColor : vec4<f32> = czm_gammaCorrect(vec4<f32>(color, alpha));\ncolor = tempColor.rgb;\nalpha = tempColor.a;\n#else\ncolor = pow(color, vec3<f32>(textureOneOverGamma));\n#endif\n#ifdef APPLY_SPLIT\nvar splitPosition : vec2<f32>= czm_imagerySplitPosition;\nif (split.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\nalpha = 0.0;\n}\nelse if (split.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\nalpha = 0.0;\n}\nif(split.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\nalpha = 0.0;\n}\nelse if(split.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_SWIPE\nif (gl_FragCoord.x < swipe.x || gl_FragCoord.y > swipe.y) {\nalpha = 0.0;\n}\nelse if (gl_FragCoord.x > swipe.z || gl_FragCoord.y < swipe.w) {\nalpha = 0.0;\n}\n#if TEXTURE_UNITS < 2\nif(alpha == 0.0)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef APPLY_BRIGHTNESS\ncolor = mix(vec3(0.0), color, textureBrightness);\n#endif\n#ifdef APPLY_CONTRAST\ncolor = mix(vec3(0.5), color, textureContrast);\n#endif\n#ifdef APPLY_HUE\ncolor = czm_hue(color, textureHue);\n#endif\n#ifdef APPLY_SATURATION\ncolor = czm_saturation(color, textureSaturation);\n#endif\nvar sourceAlpha : f32 = alpha * textureAlpha;\nvar outAlpha : f32 = mix(previousColor.a, 1.0, sourceAlpha);\nvar outColor : vec3<f32> = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4<f32>(outColor, outAlpha);\n}\n// fn gridTextureSampleAndBlend(\n// vec4 previousColor,\n// sampler2D textureToSample,\n// vec2 tileTextureCoordinates,\n// vec4 textureCoordinateRectangle,\n// vec4 textureCoordinateTranslationAndScale)\n// -> vec4<f32> {\n// float textureAlpha = 1.0;\n// vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\n// textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n// alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\n// textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n// vec2 translation = textureCoordinateTranslationAndScale.xy;\n// vec2 scale = textureCoordinateTranslationAndScale.zw;\n// vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n// vec4 value = texture2D(textureToSample, textureCoordinates);\n// vec3 color = value.rgb;\n// float alpha = value.a;\n// float sourceAlpha = alpha * textureAlpha;\n// float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\n// vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\n// return vec4(outColor, outAlpha);\n// }\nfn computeTextureCoord(tileTextureCoordinates : vec2<f32>, textureCoordinateTranslationAndScale : vec4<f32>, textureSize : vec4<f32>, flipY : bool) ->vec2<f32>\n{\nvar translation : vec2<f32> = textureCoordinateTranslationAndScale.xy;\nvar scale : vec2<f32> = textureCoordinateTranslationAndScale.zw;\nvar textureCoordinates : vec2<f32> = tileTextureCoordinates * scale + translation;\nif(flipY)\n{\ntextureCoordinates.y = 1.0 - textureCoordinates.y;\n}\n// #ifdef WEBGPU\n// var texelSize : vec2<f32> = textureSize.zw;\n// textureCoordinates = clamp(textureCoordinates, texelSize, 1.0 - texelSize);\n// #endif\nreturn textureCoordinates;\n}\n",E$1a={czm_degreesPerRadian:czm_degreesPerRadian,czm_depthRange:czm_depthRange,czm_ellipsoidInverseRadii:czm_ellipsoidInverseRadii,czm_ellipsoidRadii:czm_ellipsoidRadii,czm_epsilon1:czm_epsilon1,czm_epsilon2:czm_epsilon2,czm_epsilon3:czm_epsilon3,czm_epsilon4:czm_epsilon4,czm_epsilon5:czm_epsilon5,czm_epsilon6:czm_epsilon6,czm_epsilon7:czm_epsilon7,czm_infinity:czm_infinity,czm_oneOverPi:czm_oneOverPi,czm_oneOverTwoPi:czm_oneOverTwoPi,czm_passCesium3DTile:czm_passCesium3DTile,czm_passCesium3DTileClassification:czm_passCesium3DTileClassification,czm_passCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow,czm_passClassification:czm_passClassification,czm_passCompute:czm_passCompute,czm_passEnvironment:czm_passEnvironment,czm_passGlobe:czm_passGlobe,czm_passGround:czm_passGround,czm_passOpaque:czm_passOpaque,czm_passOverlay:czm_passOverlay,czm_passTerrainClassification:czm_passTerrainClassification,czm_passTranslucent:czm_passTranslucent,czm_pi:czm_pi,czm_piOverFour:czm_piOverFour,czm_piOverSix:czm_piOverSix,czm_piOverThree:czm_piOverThree,czm_piOverTwo:czm_piOverTwo,czm_radiansPerDegree:czm_radiansPerDegree,czm_sceneMode2D:czm_sceneMode2D,czm_sceneMode3D:czm_sceneMode3D,czm_sceneModeColumbusView:czm_sceneModeColumbusView,czm_sceneModeMorphing:czm_sceneModeMorphing,czm_solarRadius:czm_solarRadius,czm_threePiOver2:czm_threePiOver2,czm_twoPi:czm_twoPi,czm_webMercatorMaxLatitude:czm_webMercatorMaxLatitude,czm_depthRangeStruct:czm_depthRangeStruct,czm_ellipsoid:czm_ellipsoid,czm_material:czm_material,czm_materialInput:czm_materialInput,czm_ray:czm_ray,czm_raySegment:czm_raySegment,czm_s3mMaterialInput:czm_s3mMaterialInput,czm_shadowParameters:czm_shadowParameters,czm_acesTonemapping:czm_acesTonemapping,czm_adjustColor:czm_adjustColor,czm_alphaWeight:czm_alphaWeight,czm_antialias:czm_antialias,czm_approximateSphericalCoordinates:czm_approximateSphericalCoordinates,czm_branchFreeTernary:czm_branchFreeTernary,czm_cascadeColor:czm_cascadeColor,czm_cascadeDistance:czm_cascadeDistance,czm_cascadeMatrix:czm_cascadeMatrix,czm_cascadeWeights:czm_cascadeWeights,czm_clip:czm_clip,czm_columbusViewMorph:czm_columbusViewMorph,czm_computeNormal:czm_computeNormal,czm_computePosition:czm_computePosition,czm_cosineAndSine:czm_cosineAndSine,czm_decompressTextureCoordinates:czm_decompressTextureCoordinates,czm_depthClampFarPlane:czm_depthClampFarPlane,czm_eastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates,czm_ellipsoidContainsPoint:czm_ellipsoidContainsPoint,czm_ellipsoidNew:czm_ellipsoidNew,czm_ellipsoidWgs84TextureCoordinates:czm_ellipsoidWgs84TextureCoordinates,czm_equalsEpsilon:czm_equalsEpsilon,czm_ExcavationFS:czm_ExcavationFS,czm_ExcavationVS:czm_ExcavationVS,czm_executeExcavation:czm_executeExcavation,czm_eyeOffset:czm_eyeOffset,czm_eyeToWindowCoordinates:czm_eyeToWindowCoordinates,czm_fastApproximateAtan:czm_fastApproximateAtan,czm_floodAnalysis:czm_floodAnalysis,czm_fog:czm_fog,czm_gammaCorrect:czm_gammaCorrect,czm_geodeticSurfaceNormal:czm_geodeticSurfaceNormal,czm_getDefaultMaterial:czm_getDefaultMaterial,czm_getEmissiveTextureColor:czm_getEmissiveTextureColor,czm_getFusionModePostiion:czm_getFusionModePostiion,czm_getHorizontalColor:czm_getHorizontalColor,czm_getHypsometricColor:czm_getHypsometricColor,czm_getLambertDiffuse:czm_getLambertDiffuse,czm_getPBRParamFromTexture:czm_getPBRParamFromTexture,czm_getSpecular:czm_getSpecular,czm_getVolumeValue:czm_getVolumeValue,czm_getWaterNoise:czm_getWaterNoise,czm_getWgs84EllipsoidEC:czm_getWgs84EllipsoidEC,czm_HSBToRGB:czm_HSBToRGB,czm_HSLToRGB:czm_HSLToRGB,czm_hue:czm_hue,czm_inverseGamma:czm_inverseGamma,czm_inverseMatrix:czm_inverseMatrix,czm_isEmpty:czm_isEmpty,czm_isFull:czm_isFull,czm_latitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction,czm_LineCallOutVp:czm_LineCallOutVp,czm_lineDistance:czm_lineDistance,czm_luminance:czm_luminance,czm_metersPerPixel:czm_metersPerPixel,czm_modelToWindowCoordinates:czm_modelToWindowCoordinates,czm_multiplyWithColorBalance:czm_multiplyWithColorBalance,czm_nearFarScalar:czm_nearFarScalar,czm_octDecode:czm_octDecode,czm_packDepth:czm_packDepth,czm_packValue:czm_packValue,czm_phong:czm_phong,czm_planeDistance:czm_planeDistance,czm_pointAlongRay:czm_pointAlongRay,czm_rainMaterial:czm_rainMaterial,czm_rasterCull:czm_rasterCull,czm_rayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval,czm_readDepth:czm_readDepth,czm_readNonPerspective:czm_readNonPerspective,czm_reverseLogDepth:czm_reverseLogDepth,czm_RGBToHSB:czm_RGBToHSB,czm_RGBToHSL:czm_RGBToHSL,czm_RGBToXYZ:czm_RGBToXYZ,czm_RollerShutter:czm_RollerShutter,czm_s3mBatchOperation:czm_s3mBatchOperation,czm_s3mBatchOperationForSilhouette:czm_s3mBatchOperationForSilhouette,czm_s3mComputeVaryings:czm_s3mComputeVaryings,czm_s3mImageryColor:czm_s3mImageryColor,czm_s3mOverlay:czm_s3mOverlay,czm_S3MPBR:czm_S3MPBR,czm_s3mVisibleDistance:czm_s3mVisibleDistance,czm_sampleOctahedralProjection:czm_sampleOctahedralProjection,czm_saturation:czm_saturation,czm_setAlphaByWWalue:czm_setAlphaByWWalue,czm_signNotZero:czm_signNotZero,czm_sketchMode:czm_sketchMode,czm_spatialQueryClip:czm_spatialQueryClip,czm_sphericalHarmonics:czm_sphericalHarmonics,czm_splitClip:czm_splitClip,czm_sRGBToLinear:czm_sRGBToLinear,czm_tangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix,czm_transformPlane:czm_transformPlane,czm_translateRelativeToEye:czm_translateRelativeToEye,czm_translucentPhong:czm_translucentPhong,czm_transparentColorClip:czm_transparentColorClip,czm_transpose:czm_transpose,czm_unpackDepth:czm_unpackDepth,czm_unpackFloat:czm_unpackFloat,czm_unpackValue:czm_unpackValue,czm_vertexLogDepth:czm_vertexLogDepth,czm_windowToEyeCoordinates:czm_windowToEyeCoordinates,czm_writeDepthClampedToFarPlane:czm_writeDepthClampedToFarPlane,czm_writeLogDepth:czm_writeLogDepth,czm_writeNonPerspective:czm_writeNonPerspective,czm_XYZToRGB:czm_XYZToRGB,czm_getNormalMatrix:czm_getNormalMatrix,czm_sampleAndBlend:czm_sampleAndBlend},o$1a="\n#ifdef HAS_RAIN\nuniform sampler2D uRippleTexture;\n \nvoid getTimeInfo(float animationSpeed, out vec2 timeVec)\n{\n\tfloat time = czm_frameNumber * animationSpeed;\n\ttime = floor(30.0 * time);\n\tfloat time_diff = floor(time*0.25);\n\ttime = mod(time, 4.0);\n\ttime_diff = mod(time_diff, 4.0);\n\ttimeVec = vec2(time, time_diff);\n}\n\nvoid getPosInfo(vec4 posMC, out vec2 posMC_frac1, out vec2 posMC_frac2)\n{\n\tfloat ripple_scale = 1.0 / uRippleScale;\n\tvec2 posXY = posMC.xy * ripple_scale;\n\tposMC_frac1 = fract(posXY);\n\tvec2 posStep = vec2(0.5);\n\tposMC_frac2 = fract(posXY + posStep);\n}\n\nfloat getAlpha(vec2 posMC_frac1)\n{\n\tvec2 dist = (posMC_frac1 - vec2(0.5)) * 2.0;\n\tdist = vec2(abs(dist.x), abs(dist.y));\n\tvec2 result = pow(dist, vec2(5.0));\n\treturn result.x + result.y;\n}\n\nvec4 getRippleValue(sampler2D uRippleTexture, vec2 timeVec, vec2 posMC_frac1, vec2 posMC_frac2, float alpha)\n{\n\tvec2 rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n\tvec2 rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n\tvec4 rippleValue_1 = texture2D(uRippleTexture, rippleUV_1.xy);\n\tvec4 rippleValue_2 = texture2D(uRippleTexture, rippleUV_2.xy);\n\treturn mix(rippleValue_1, rippleValue_2, alpha);\n}\n\nvec3 getRippleNormal(vec4 rippleValue, float wind_intensity, float rain, float depthFade)\n{\n\tvec2 rippleValueXY = rippleValue.xy;\n\tvec2 rippleValueZW = rippleValue.zw;\n\tconst vec2 _value = vec2(0.5);\n\tvec2 part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n\tvec2 part_2 = (rippleValueXY - _value) * 0.6;\n\tvec2 mergedValue = mix(part_1, part_2, rain) * depthFade;\n\treturn vec3(mergedValue, 1.0);\n}\n\nfloat getNormalAlpha(vec3 normalWS,float wetness)\n{\n\tfloat valueZ = normalWS.z - 0.5;\n\tfloat wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n\treturn pow(wet_correction, 15.0);\n}\n\nvec3 rippleNormalCorrection(vec3 rippleNormal,float normalAlpha)\n{\n\tconst vec3 blueNormal = vec3(0.0, 0.0, 1.0);\n\treturn mix(blueNormal, rippleNormal, normalAlpha);\n}\n\nvec3 rippleGenerator(sampler2D uRippleTexture, float animationSpeed,vec3 normalWS,float wetness)\n{\n\tvec2 timeVec = vec2(1.0);\n\tgetTimeInfo(animationSpeed, timeVec);\n\tvec2 posMC_frac1 = vec2(1.0);\n\tvec2 posMC_frac2 = vec2(1.0);\n\tgetPosInfo(vPositionMC, posMC_frac1, posMC_frac2);\n\tfloat alpha = getAlpha(posMC_frac1);\n\tvec4 rippleValue = getRippleValue(uRippleTexture, timeVec, posMC_frac1, posMC_frac2, alpha);\n\tvec3 rippleNormal = getRippleNormal(rippleValue, uWindIntensity, uRain, uCameraDepth);\n\tfloat normalAlpha = getNormalAlpha(normalWS, wetness);\n\treturn normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\n#endif\n",r$15="\n#ifdef HAS_SNOW\nuniform sampler2D uSnowMaskTexture;\nuniform sampler2D uSnowNormalTexture;\n\nvec3 getSnowMaskValue(sampler2D uSnowMaskTexture, vec2 snowUV)\n{\n\treturn texture2D(uSnowMaskTexture, snowUV).rgb;\n}\n\nfloat getSnowCoverage(float snow_coverage, float max_snow_coverage, vec3 normalWS, float z_mask)\n{\n\tfloat normal_z = normalWS.z;\n\tnormal_z += 1.1 + z_mask;\n\tnormal_z = clamp(normal_z * 0.5, 0.0, 1.0);\n\tfloat final_snow_coverage = clamp(snow_coverage, 0.0, max_snow_coverage);\n\tfinal_snow_coverage = clamp(final_snow_coverage*normal_z, 0.0, 1.0);\n\treturn final_snow_coverage;\n}\n\nfloat getSnowCoverageWithMaskTexture(float finalSnowCoverage, float heightValue, float snow_scatter_value, float snow_scatter_alpha, float tighten_value)\n{\n\tfloat scatter_value = mix(heightValue, snow_scatter_value, snow_scatter_alpha);\n\treturn clamp((tighten_value + 1.0) * finalSnowCoverage - tighten_value * scatter_value, 0.0, 1.0);\n}\n\nfloat getSnowAlpha(vec3 normalWS, float snow_coverage, float z_mask)\n{\n\treturn clamp((normalWS.z + z_mask) * 5.0, 0.0, 1.0) * snow_coverage;\n}\n\nvec3 getFinalBaseColor(vec3 baseColor, vec3 snow_baseColor, float snowAlpha)\n{\n\treturn mix(baseColor, snow_baseColor, snowAlpha);\n}\n\nfloat getFinalRoughness(float roughness, float snow_roughness, float snowAlpha)\n{\n\treturn mix(roughness, snow_roughness, snowAlpha);\n}\n\nvec3 getFinalNormal(vec3 normalWS, vec3 snowNormal, float blendNormalValue, float snow_coverage)\n{\n\tvec3 snowNormal_part2 = vec3(snowNormal.xy - vec2(0.5), 1.0);\n\tfloat normal_alpha = (1.0 - blendNormalValue)* snow_coverage;\n\treturn mix(normalWS, snowNormal_part2, normal_alpha);\n}\n\nvoid snowGenerator(sampler2D uSnowMaskTexture, sampler2D uSnowNormalTexture, vec2 snowUV, float snow_coverage, inout vec3 normalWS, inout vec3 baseColor, inout float roughness)\n{\n\tvec3 snowMaskValue = texture2D(uSnowMaskTexture, snowUV).rgb;\n\tconst float max_snow_coverage = 1.0;\n\tconst float z_mask = 0.0;\n\tfloat snowCoverage = getSnowCoverage(snow_coverage, max_snow_coverage, normalWS, z_mask);\n\tconst float heightValue = 0.5;\n\tfloat snow_scatter_value = snowMaskValue.g;\n\tconst float snow_scatter_alpha = 0.5;\n\tconst float tighten_value = 4.0;\n snowCoverage = getSnowCoverageWithMaskTexture(snowCoverage, heightValue, snow_scatter_value, snow_scatter_alpha, tighten_value);\n\tfloat snow_alpha = getSnowAlpha(normalWS, snowCoverage, z_mask);\n\tbaseColor = getFinalBaseColor(baseColor, vec3(snowMaskValue.r), snow_alpha);\n\troughness = getFinalRoughness(roughness, snowMaskValue.b, snow_alpha);\n\tvec3 snowNormalValue = texture2D(uSnowNormalTexture, snowUV).rgb;\n\tconst float blendNormalValue = 0.3;\n\tnormalWS = getFinalNormal(normalWS, snowNormalValue, blendNormalValue, snowCoverage);\n}\n\n#endif\n",e$1U="\n#ifdef HAS_HEMISPHERE_LIGHTS\n\nstruct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n};\n\nvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n float dotNL = dot( geometry.normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n}\n\n#endif\n",m$10="\n#ifdef HAS_POINT_LIGHTS\nstruct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n};\n\nvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = pointLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n directLight.color = pointLight.color;\n directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n directLight.visible = ( directLight.color != vec3( 0.0 ) );\n}\n\n#endif\n",t$Y="\n#ifdef HAS_SPOT_LIGHTS\n\nstruct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n};\n\nvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = spotLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n float angleCos = dot( directLight.direction, spotLight.direction );\n if ( angleCos > spotLight.coneCos ) {\n float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n directLight.color = spotLight.color;\n directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n directLight.visible = true;\n } else {\n directLight.color = vec3( 0.0 );\n directLight.visible = false;\n }\n}\n\n#endif\n",i$Z="\n#ifdef HAS_DIR_LIGHTS\n \n#endif\n",p$11="\n\n#ifdef HAS_DIR_LIGHTS\nfor (int i = 0; i < uDirLightCount; i++) {\n directLight.color = uDirectionalLightColor[i];\n directLight.direction = uDirectionalLightDirectionEC[i];\n directLight.visible = true;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n\n#ifdef HAS_POINT_LIGHTS\nPointLight pointLight;\nfor (int i = 0; i < uPointLightCount; i++) {\n pointLight.position = uPointLightPositionEC[i];\n pointLight.color = uPointLightColor[i];\n pointLight.distance = uPointLightDistanceAndDecay[i].x;\n pointLight.decay = uPointLightDistanceAndDecay[i].y;\n getPointDirectLightIrradiance( pointLight, geometry, directLight );\n if(!directLight.visible) continue;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n\n#ifdef HAS_SPOT_LIGHTS\nSpotLight spotLight;\nfor (int i = 0; i < uSpotLightCount; i++) {\n spotLight.position = uSpotLightPositionEC[i];\n spotLight.color = uSpotLightColorAndExponent[i].rgb;\n spotLight.direction = uSpotLightDirectionEC[i];\n spotLight.coneCos = uSpotLightDistanceDecayCosPenumbra[i].z;\n spotLight.penumbraCos = uSpotLightDistanceDecayCosPenumbra[i].w;\n getSpotDirectLightIrradiance( spotLight, geometry, directLight );\n if(!directLight.visible) continue;\n directPhysical( directLight, geometry, material, reflectedLight );\n}\n#endif\n",l$16="\n#ifdef BRDF\n#define RECIPROCAL_PI 0.31830988618\n#define M_PI 3.141592653589793\n#define EPSILON 1e-6\nfloat pow2( const in float x ) { return x * x; }\n\n#ifdef HAS_BASE_TEXTURE\n uniform sampler2D uBaseTexture;\n#endif\n\n#ifdef HAS_NORMAL_TEXTURE\n uniform sampler2D uNormalTexture;\n#endif\n\n#ifdef HAS_EMISSIVE_TEXTURE\n uniform sampler2D uEmissionTexture;\n#endif\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n uniform sampler2D uMetallicRoughnessTexture;\n#endif\n\n#ifdef HAS_OCCLUSION_TEXTURE\n uniform sampler2D uOcclusionTexture;\n#endif\n\n#ifdef USE_BatchPBR\n varying vec2 vMetallicRoughness;\n varying vec4 vEmissiveFactor;\n varying vec3 vAlphaCutoffAndModeAndDoubleSide;\n#endif\n\n#include <directionLightDecl>\n#include <pointLightDecl>\n#include <spotLightDecl>\n#include <snowDecl>\n#include <rainDecl>\n\nvec3 sRGBToLinear(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\nvec4 sRGBToLinear(vec4 srgbIn)\n{\n srgbIn = srgbIn ;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\nvec3 LinearTosRGB(vec3 linearIn) \n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else \n return linearIn;\n#endif \n}\n\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor * RECIPROCAL_PI;\n}\n\nvec3 applyTonemapping(vec3 linearIn) \n{\n vec3 color = linearIn * uToneMappingExposure;\n return czm_acesTonemapping(color);\n}\n\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\n\nfloat GeometrySchlickGGX(float roughness, float NoV)\n{\n float k = pow(roughness + 1.0, 2.0) / 8.0;\n return NoV / (NoV * (1.0 - k) + k);\n}\n\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n float alpha = roughness * roughness;\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = clamp( dot( normal, lightDir ), 0.001, 1.0 );\n float dotNV = abs( dot( normal, viewDir ) ) + 0.001;\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotLH = saturate( dot( lightDir, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n float D = D_GGX( alpha, dotNH );\n return F * ( G * D ) / (4.0 * dotNL * dotNV);\n}\n\nvoid directPhysical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n reflectedLight.directDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n}\n\n#ifdef HAS_NORMAL_TEXTURE\nvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv, vec3 mapN) {\n float fNormalLength = length(mapN);\n vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n if(fNormalLength < 0.5) {\n return surf_norm;\n }\n mapN = mapN * 2.0 - 1.0;\n float scale = sign( st1.t * st0.s - st0.t * st1.s );\n vec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n vec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n vec3 N = normalize( surf_norm );\n mat3 tsn = mat3( S, T, N );\n mapN.xy *= uNormalTextureScale;\n mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n return normalize( tsn * mapN );\n}\n#endif\n\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n\n#ifdef HAS_RAIN\nvoid adjustByWetness(inout vec3 baseColor, inout float roughness, vec3 normalWS_wetness) {\n float fWetness = clamp(uWetnessFactor,0.0,1.0);\n float fWetness_correction = pow(4.0*fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction,clamp(fWetness,0.0,0.9),1.0);\n float fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n baseColor = mix(baseColor,baseColor*0.7,fWerness_normalized);\n roughness = mix(roughness,0.05,fWerness_normalized);\n}\n#endif\n\nfloat getRoughness(vec2 oriTexCoord){\n float roughness = uMetallicRoughnessIntensityScale.y;\n#ifdef PBR_THEME\n int pbrIndex = int(vPBRIndex);\n if(vPBRIndex < 0.0)\n {\n return 1.0;\n }\n mat4 pbrPar = mat4(0.0);\n for(int i = 0;i < NUM_PBR_MATERIALS;i++)\n {\n if(i == pbrIndex)\n {\n pbrPar = uPBRMaterials[i];\n break;\n }\n }\n roughness = clamp(pbrPar[0][0], 0.04, 1.0);\n#endif\n#ifdef USE_BatchPBR\n roughness = vMetallicRoughness.y;\n#endif\n roughness = clamp(roughness, 0.0, 1.0);\n \n#ifdef HAS_MetallicRoughness_TEXTURE\n vec3 metallicRoughness = texture2D(uMetallicRoughnessTexture, oriTexCoord).rgb;\n roughness = clamp(roughness * metallicRoughness.g, 0.04, 1.0);\n#ifdef HAS_RAIN\n adjustByWetness(vec3(1.0), roughness, vec3(0.0));\n#endif\n#endif\n return roughness;\n}\n\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\nvec3 getTexcoordAndMipmapLevel(vec2 uv, vec4 texMatrix, float texCoordZ) {\n vec2 translate = texMatrix.xy;\n float textureWidth = texMatrix.z * uPbrParTextureWidth;\n float scale = texMatrix.z;\n float maxMipmapLevel = texMatrix.w;\n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, vec2(textureWidth), maxMipmapLevel, mipLevel);\n #endif\n vec2 texCoord;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n float offset = pow(2.0, mipLevel) / textureWidth;\n texCoord = clamp(texCoord, offset, 1.0 - offset);\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n return vec3(texCoord.xy, mipLevel);\n}\n#endif\n\nvec4 brdf(in vec4 baseColorWithAlpha, vec2 texCoord, vec2 oriTexCoord, vec3 posEC, vec3 posMC, vec3 vertexNormalEC, mat4 modelMatrix) {\n vec2 uv = oriTexCoord;\n float mipmapLevel = 0.0;\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\n vec3 uvAndMiplevel = getTexcoordAndMipmapLevel(oriTexCoord, vTexMatrix, vTexCoordZ.x);\n uv = uvAndMiplevel.xy;\n mipmapLevel = uvAndMiplevel.z;\n#endif\n#ifndef USE_BatchPBR\n baseColorWithAlpha = baseColorWithAlpha * uBaseColorFactor;\n#endif\n#ifdef BaseColorReplace\n baseColorWithAlpha = uBaseColorFactor;\n#endif\n float faceDirection = (gl_FrontFacing ? 1.0 : - 1.0) * uCameraReflect;\n mat3 normalMatrix = getNormalMatrix(uView, modelMatrix);\n vec3 ng = normalize(vertexNormalEC);\n #ifndef HAS_NORMAL\n ng = normalize(normalMatrix * czm_computeNormal(posMC.xyz));\n #endif\n ng = ng * faceDirection;\n#ifdef HAS_BASE_TEXTURE\n #ifdef USE_BatchPBR\n baseColorWithAlpha *= sRGBToLinear(texture2DLodEXT(uBaseTexture, uv * uTexUVOffset.zw + uTexUVOffset.xy, mipmapLevel));\n #else\n baseColorWithAlpha = sRGBToLinear(texture2D(uBaseTexture, oriTexCoord * uTexUVOffset.zw + uTexUVOffset.xy)) * uBaseColorFactor;\n #endif\n#endif\n#ifdef HAS_NORMAL_TEXTURE\n #ifdef USE_BatchPBR\n vec3 mapN = texture2DLodEXT( uNormalTexture, uv, mipmapLevel).xyz;\n #else\n vec3 mapN = texture2D( uNormalTexture, uv).xyz;\n #endif\n // 切线空间计算纹理坐标需采用原始纹理坐标,边界未做偏移\n vec3 n = ng;\n vec3 oriNg = perturbNormal2Arb(posEC, ng, oriTexCoord, mapN);\n if(!(oriTexCoord.x == 0.0 && oriTexCoord.y == 0.0)){\n n = oriNg;\n }\n#else\n vec3 n = ng;\n#endif\n#ifdef HAS_RAIN\n mat3 fixedToENU_wetness = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n vec3 normalWS_wetness = normalize(fixedToENU_wetness * n);\n n = rippleGenerator(uRippleTexture,uAnimationSpeed,normalWS_wetness,uWetnessFactor);\n#endif\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = uMetallicRoughnessIntensityScale.y;\n float metalness = uMetallicRoughnessIntensityScale.x;\n vec4 emissiveFactor = uEmissiveFactor;\n#ifdef PBR_THEME\n int pbrIndex = int(vPBRIndex);\n if(vPBRIndex < 0.0)\n {\n return baseColorWithAlpha;\n }\n mat4 pbrPar = mat4(0.0);\n for(int i = 0;i < NUM_PBR_MATERIALS;i++)\n {\n if(i == pbrIndex)\n {\n pbrPar = uPBRMaterials[i];\n break;\n }\n }\n roughness = clamp(pbrPar[0][0], 0.04, 1.0);\n metalness = clamp(pbrPar[0][1], 0.0, 1.0);\n baseColor = (baseColorWithAlpha / uBaseColorFactor * vec4(pbrPar[0][2], pbrPar[0][3], pbrPar[1][0], pbrPar[1][1])).rgb;\n#endif\n#ifdef USE_BatchPBR\n metalness = vMetallicRoughness.x;\n roughness = vMetallicRoughness.y;\n emissiveFactor = vEmissiveFactor;\n#endif\n metalness = clamp(metalness, 0.0, 1.0);\n roughness = clamp(roughness, 0.04, 1.0);\n \n#ifdef HAS_MetallicRoughness_TEXTURE\n #ifdef USE_BatchPBR\n vec3 metallicRoughness = texture2DLodEXT(uMetallicRoughnessTexture, uv, mipmapLevel).rgb;\n #else\n vec3 metallicRoughness = texture2D(uMetallicRoughnessTexture, oriTexCoord).rgb;\n #endif\n metalness = clamp(metalness * metallicRoughness.r, 0.0, 1.0);\n roughness = clamp(roughness * metallicRoughness.g, 0.04, 1.0);\n#ifdef HAS_RAIN\n adjustByWetness(baseColor, roughness, normalWS_wetness);\n#endif\n#ifdef HAS_SNOW\n mat3 fixedToENU_snow = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n vec3 normalWS_snow = normalize(fixedToENU_snow * n);\n snowGenerator(uSnowMaskTexture,uSnowNormalTexture, oriTexCoord,uSnowCoverageFactor,normalWS_snow,baseColor,roughness);\n#endif\n#endif\n\n vec3 lightColorHdr = vec3(2.0) * uSunLightColor.rgb * uSunLightON;\n vec3 l = normalize(uSunDirectionEC);\n vec3 v = -normalize(posEC);\n vec3 h = normalize(v + l);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n \n float alpha = roughness * roughness;\n float dotNL = clamp( dot( n, l ), 0.001, 1.0 );\n float dotNV = abs( dot( n, v ) ) + 0.001;\n float dotNH = saturate( dot( n, h ) );\n float dotLH = saturate( dot( l, h ) );\n float dotVH = saturate( dot( v, h ) );\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n float f90 = clamp(reflectance * 25.0, 0.0, 1.0);\n vec3 F = F_Schlick( specularColor, f90, dotVH );\n float G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n float D = D_GGX( alpha, dotNH );\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * dotNL * dotNV);\n\n PhysicalMaterial material;\n material.diffuseColor = diffuseColor;\n material.roughness = max( roughness, 0.0525 );\n material.roughness = min( material.roughness, 1.0 );\n material.specularColor = specularColor;\n material.specularF90 = 1.0;\n \n GeometricContext geometry;\n geometry.position = posEC;\n geometry.normal = n;\n geometry.viewDir = v;\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += dotNL * lightColorHdr * diffuseContribution;\n reflectedLight.directSpecular += dotNL * lightColorHdr * specularContribution;\n \n IncidentLight directLight; \n #include <lightSourceImpl>\n \n getEnvironmentColor(geometry, material, reflectedLight);\n\n#ifdef HAS_OCCLUSION_TEXTURE\n #ifdef USE_BatchPBR\n float ambientOcclusion = texture2DLodEXT(uOcclusionTexture, uv, mipmapLevel).r;\n #else\n float ambientOcclusion = texture2D(uOcclusionTexture, oriTexCoord.xy).r;\n #endif\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n#ifdef IBL\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n#endif\n#endif\n\n float shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), n, -posEC.z);\n#endif\n\nvec3 color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n\n#ifdef HAS_EMISSIVE_TEXTURE\n vec2 emissiveTexCoord = uv * uEmissiveUVOffsetAndTiling.zw + uEmissiveUVOffsetAndTiling.xy;\n #ifdef USE_BatchPBR\n vec3 emissive = texture2DLodEXT(uEmissionTexture, emissiveTexCoord, mipmapLevel).rgb;\n #else\n vec3 emissive = texture2D(uEmissionTexture, emissiveTexCoord).rgb;\n #endif\n emissive *= emissiveFactor.rgb;\n color += emissive;\n#else\n color += emissiveFactor.rgb;\n#endif\n\n color = applyTonemapping(color);\n color = LinearTosRGB(color);\n#ifdef MASK\n if (baseColorWithAlpha.a < uAlphaCutoff)\n {\n discard;\n }\n return vec4(color.rgb, 1.0);\n#endif\n return vec4(color.rgb, baseColorWithAlpha.a);\n}\n#endif\n",f$_="\n#ifdef SERVEREXCAVATION\nuniform sampler2D uServerExcavationTexture;\nvarying vec4 vServerExcavationVertexPos;\nvec2 CalculateServerExcavationPolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect)\n{\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(vertexPos.x - rectPos.x, vertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\nbool executeServerExcavation()\n{\n float hasExcavation = 1.0;\n vec2 vecExcavationTexCoord = CalculateServerExcavationPolyTexCoord(vServerExcavationVertexPos, uServerExcavationRect, hasExcavation);\n bool excavationInside = (uServerExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n if(excavationInside)\n {\n return texture2D(uServerExcavationTexture, vecExcavationTexCoord.xy).r > 0.5;\n }\n else\n {\n return texture2D(uServerExcavationTexture, vecExcavationTexCoord.xy).r < 0.5;\n }\n}\n#endif",c$14="\n\t#define CUBEUV_MAX_MIP 8.0\n\t#define CUBEUV_TEXEL_WIDTH 0.0013020833333333333\n\t#define CUBEUV_TEXEL_HEIGHT 0.0009765625\n #define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\n\t// These shader functions convert between the UV coordinates of a single face of\n\t// a cubemap, the 0-5 integer index of a cube face, and the direction vector for\n\t// sampling a textureCube (not generally normalized ).\n\n\tfloat getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\n\t// RH coordinate system; PMREM face-indexing convention\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t}\n\n\t// These defines must match with PMREMGenerator\n\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\n\tfloat roughnessToMip( float roughness ) {\n\n\t\tfloat mip = 0.0;\n\n\t\tif ( roughness >= cubeUV_r1 ) {\n\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\n\t\t} else {\n\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25\n\t\t}\n\n\t\treturn mip;\n\n\t}\n\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\n\t\tfloat mipF = fract( mip );\n\n\t\tfloat mipInt = floor( mip );\n\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\n\t\tif ( mipF == 0.0 ) {\n\n\t\t\treturn vec4( color0, 1.0 );\n\n\t\t} else {\n\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\n\t\t}\n\n\t}\n",a$X="\n#ifdef USE_CUBE_MAP_SHADOW\n uniform samplerCube shadowMap_textureCube;\n#else\n uniform sampler2D shadowMap_texture;\n #ifdef USE_PCSS\n uniform highp sampler2DShadow u_shadowDepth;\n #endif\n#endif\n\n#include <shadowVisibility>\n\n\nvec4 cascadeWeights(float depthEye)\n{\n // One component is set to 1.0 and all others set to 0.0.\n vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\n vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}\n\n// Offset the shadow position in the direction of the normal for perpendicular and back faces\nvoid applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL)\n{\n#ifdef APPLY_NORMAL_OFFSET\n float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;\n float normalOffsetScale = 1.0 - nDotL;\n vec3 offset = normalOffset * normalOffsetScale * normalEC;\n positionEC.xyz += offset;\n#endif // APPLY_NORMAL_OFFSET\n}\n\nfloat getShadowVisibility(vec4 positionEC, vec3 normalEC, float depth){\n czm_shadowParameters shadowParameters;\n shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\n shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\n shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\n shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\n shadowParameters.uvRange = vec4(0.0, 1.0, 0.0, 1.0);\n\n float visibility = 1.0;\n\n #ifdef IS_TERRAIN\n // Scale depth bias based on view distance to reduce z-fighting in distant terrain\n shadowParameters.depthBias *= max(depth * 0.01, 1.0);\n #endif // IS_TERRAIN\n\n shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);\n \n #ifdef USE_CUBE_MAP_SHADOW // POINT_LIGHT\n vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz;\n float distance = length(directionEC);\n directionEC = normalize(directionEC);\n float radius = shadowMap_lightPositionEC.w;\n // Stop early if the fragment is beyond the point light radius\n if (distance > radius)\n {\n return visibility;\n }\n vec3 directionWC = czm_inverseViewRotation * directionEC;\n \n shadowParameters.depth = distance / radius;\n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n \n shadowParameters.texCoords = directionWC;\n visibility = shadowVisibility(shadowMap_textureCube, shadowParameters);\n #endif // USE_CUBE_MAP_SHADOW\n \n #ifdef SPOT_LIGHT_SHADOW\n vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);\n float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n applyNormalOffset(positionEC, normalEC, nDotL);\n vec4 shadowPosition = shadowMap_matrix * positionEC;\n // Spot light uses a perspective projection, so perform the perspective divide\n shadowPosition /= shadowPosition.w;\n \n // Stop early if the fragment is not in the shadow bounds\n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n {\n return visibility;\n }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n \n visibility = shadowVisibility(shadowMap_texture, shadowParameters);\n #endif // SPOT_LIGHT_SHADOW\n \n #ifdef HAS_CASCADES\n float maxDepth = shadowMap_cascadeSplits[1].w;\n // Stop early if the eye depth exceeds the last cascade\n if (depth > maxDepth)\n {\n return visibility;\n }\n \n // Get the cascade based on the eye-space depth\n vec4 weights = cascadeWeights(depth);\n \n // Apply normal offset\n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(positionEC, normalEC, nDotL);\n \n // Transform position into the cascade\n //vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;\n\n mat4 cascadeMatrix;\n mat4 nextCascadeMatrix;\n bool csmBlend = false;\n float diffRatio = 0.0;\n float shadowMapIndex = 0.0;\n if(weights.x > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[0];\n nextCascadeMatrix = shadowMap_cascadeMatrices[1];\n csmBlend = weights.y > 0.0;\n diffRatio = (depth - shadowMap_cascadeSplits[0].y) / (shadowMap_cascadeSplits[1].x - shadowMap_cascadeSplits[0].y);\n shadowMapIndex = 0.0;\n }\n else if(weights.y > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[1];\n nextCascadeMatrix = shadowMap_cascadeMatrices[2];\n csmBlend = weights.z > 0.0;\n diffRatio = (depth - shadowMap_cascadeSplits[0].z) / (shadowMap_cascadeSplits[1].y - shadowMap_cascadeSplits[0].z);\n shadowMapIndex = 1.0;\n }\n else if(weights.z > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[2];\n nextCascadeMatrix = shadowMap_cascadeMatrices[3];\n csmBlend = weights.w > 0.0;\n diffRatio = (depth - shadowMap_cascadeSplits[0].w) / (shadowMap_cascadeSplits[1].z - shadowMap_cascadeSplits[0].w);\n shadowMapIndex = 2.0;\n }\n else if(weights.w > 0.0){\n cascadeMatrix = shadowMap_cascadeMatrices[3];\n shadowMapIndex = 3.0;\n }\n vec4 shadowPosition = cascadeMatrix * positionEC;\n \n // Get visibility\n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n shadowParameters.shadowMapIndex = shadowMapIndex;\n visibility = shadowVisibility(shadowMap_texture, shadowParameters);\n\n if(csmBlend){\n vec4 nextShadowPosition = nextCascadeMatrix * positionEC;\n shadowParameters.texCoords = nextShadowPosition.xy;\n shadowParameters.depth = nextShadowPosition.z;\n shadowParameters.shadowMapIndex = shadowMapIndex + 1.0;\n float nextVisibility = shadowVisibility(shadowMap_texture, shadowParameters);\n visibility = mix(visibility, nextVisibility, diffRatio);\n // Draw cascade blend colors for debugging\n //gl_FragColor *= vec4(diffRatio, 0.0, 0.0, 1.0);\n }\n \n // Fade out shadows that are far away\n float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;\n float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);\n visibility = mix(visibility, 1.0, fade);\n \n visibility = clamp(visibility, 0.0, 1.0);\n //// Draw cascade colors for debugging\n //gl_FragColor *= czm_cascadeColor(weights);\n #endif // HAS_CASCADES\n \n #ifdef NO_CASCADES\n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(positionEC, normalEC, nDotL);\n vec4 shadowPosition = shadowMap_matrix * positionEC;\n \n // Stop early if the fragment is not in the shadow bounds\n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n {\n return visibility;\n }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n visibility = shadowVisibility(shadowMap_texture, shadowParameters);\n #endif // NO_CASCADES\n\n return visibility;\n}\n",n$10="\n#ifdef USE_PCSS\nconst vec3 PoissonSamplers32[64] = vec3[64](\n vec3(0.06407013, 0.05409927, 0.),\n vec3(0.7366577, 0.5789394, 0.),\n vec3(-0.6270542, -0.5320278, 0.),\n vec3(-0.4096107, 0.8411095, 0.),\n vec3(0.6849564, -0.4990818, 0.),\n vec3(-0.874181, -0.04579735, 0.),\n vec3(0.9989998, 0.0009880066, 0.),\n vec3(-0.004920578, -0.9151649, 0.),\n vec3(0.1805763, 0.9747483, 0.),\n vec3(-0.2138451, 0.2635818, 0.),\n vec3(0.109845, 0.3884785, 0.),\n vec3(0.06876755, -0.3581074, 0.),\n vec3(0.374073, -0.7661266, 0.),\n vec3(0.3079132, -0.1216763, 0.),\n vec3(-0.3794335, -0.8271583, 0.),\n vec3(-0.203878, -0.07715034, 0.),\n vec3(0.5912697, 0.1469799, 0.),\n vec3(-0.88069, 0.3031784, 0.),\n vec3(0.5040108, 0.8283722, 0.),\n vec3(-0.5844124, 0.5494877, 0.),\n vec3(0.6017799, -0.1726654, 0.),\n vec3(-0.5554981, 0.1559997, 0.),\n vec3(-0.3016369, -0.3900928, 0.),\n vec3(-0.5550632, -0.1723762, 0.),\n vec3(0.925029, 0.2995041, 0.),\n vec3(-0.2473137, 0.5538505, 0.),\n vec3(0.9183037, -0.2862392, 0.),\n vec3(0.2469421, 0.6718712, 0.),\n vec3(0.3916397, -0.4328209, 0.),\n vec3(-0.03576927, -0.6220032, 0.),\n vec3(-0.04661255, 0.7995201, 0.),\n vec3(0.4402924, 0.3640312, 0.),\n\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.)\n);\n\nconst vec3 PoissonSamplers64[64] = vec3[64](\n vec3(-0.613392, 0.617481, 0.),\n vec3(0.170019, -0.040254, 0.),\n vec3(-0.299417, 0.791925, 0.),\n vec3(0.645680, 0.493210, 0.),\n vec3(-0.651784, 0.717887, 0.),\n vec3(0.421003, 0.027070, 0.),\n vec3(-0.817194, -0.271096, 0.),\n vec3(-0.705374, -0.668203, 0.),\n vec3(0.977050, -0.108615, 0.),\n vec3(0.063326, 0.142369, 0.),\n vec3(0.203528, 0.214331, 0.),\n vec3(-0.667531, 0.326090, 0.),\n vec3(-0.098422, -0.295755, 0.),\n vec3(-0.885922, 0.215369, 0.),\n vec3(0.566637, 0.605213, 0.),\n vec3(0.039766, -0.396100, 0.),\n vec3(0.751946, 0.453352, 0.),\n vec3(0.078707, -0.715323, 0.),\n vec3(-0.075838, -0.529344, 0.),\n vec3(0.724479, -0.580798, 0.),\n vec3(0.222999, -0.215125, 0.),\n vec3(-0.467574, -0.405438, 0.),\n vec3(-0.248268, -0.814753, 0.),\n vec3(0.354411, -0.887570, 0.),\n vec3(0.175817, 0.382366, 0.),\n vec3(0.487472, -0.063082, 0.),\n vec3(-0.084078, 0.898312, 0.),\n vec3(0.488876, -0.783441, 0.),\n vec3(0.470016, 0.217933, 0.),\n vec3(-0.696890, -0.549791, 0.),\n vec3(-0.149693, 0.605762, 0.),\n vec3(0.034211, 0.979980, 0.),\n vec3(0.503098, -0.308878, 0.),\n vec3(-0.016205, -0.872921, 0.),\n vec3(0.385784, -0.393902, 0.),\n vec3(-0.146886, -0.859249, 0.),\n vec3(0.643361, 0.164098, 0.),\n vec3(0.634388, -0.049471, 0.),\n vec3(-0.688894, 0.007843, 0.),\n vec3(0.464034, -0.188818, 0.),\n vec3(-0.440840, 0.137486, 0.),\n vec3(0.364483, 0.511704, 0.),\n vec3(0.034028, 0.325968, 0.),\n vec3(0.099094, -0.308023, 0.),\n vec3(0.693960, -0.366253, 0.),\n vec3(0.678884, -0.204688, 0.),\n vec3(0.001801, 0.780328, 0.),\n vec3(0.145177, -0.898984, 0.),\n vec3(0.062655, -0.611866, 0.),\n vec3(0.315226, -0.604297, 0.),\n vec3(-0.780145, 0.486251, 0.),\n vec3(-0.371868, 0.882138, 0.),\n vec3(0.200476, 0.494430, 0.),\n vec3(-0.494552, -0.711051, 0.),\n vec3(0.612476, 0.705252, 0.),\n vec3(-0.578845, -0.768792, 0.),\n vec3(-0.772454, -0.090976, 0.),\n vec3(0.504440, 0.372295, 0.),\n vec3(0.155736, 0.065157, 0.),\n vec3(0.391522, 0.849605, 0.),\n vec3(-0.620106, -0.328104, 0.),\n vec3(0.789239, -0.419965, 0.),\n vec3(-0.545396, 0.538133, 0.),\n vec3(-0.178564, -0.596057, 0.)\n);\n#endif // USE_PCSS\n\n\nfloat getRand(vec2 seed) {\n return fract(sin(dot(seed.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n#define inline\nfloat cubeSampleShadowMap(samplerCube shadowMap, vec3 d)\n{\n return czm_unpackDepth(textureCube(shadowMap, d));\n}\n\n#define inline\nfloat sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture2D(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\n\n#define inline\nfloat cubeShadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\n return step(depth, cubeSampleShadowMap(shadowMap, uv));\n}\n\n#define inline\nfloat shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, sampleShadowMap(shadowMap, uv));\n}\n\nfloat private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n float strength = step(0.0, nDotL);\n#endif\n visibility *= strength;\n#endif\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\n#define inline\nfloat shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec3 uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n float visibility = cubeShadowDepthCompare(shadowMap, uvw, depth);\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\n\n#ifdef USE_PCSS\n #define inline\n float computeShadowWithPCSS(czm_shadowParameters shadowParameters, sampler2D depthSampler, int searchTapCount, int pcfTapCount, vec3[64] poissonSamplers)\n {\n float depthMetric = shadowParameters.depth;\n\n if (depthMetric > 1.0 || depthMetric < 0.0) {\n return 1.0;\n }\n\n vec4 uvRange = shadowParameters.uvRange;\n float depthBias = shadowParameters.depthBias;\n #ifdef WEBGPU\n depthBias *= 2.0;\n #endif\n vec3 clipPos = vec3(shadowParameters.texCoords.xy, shadowParameters.depth - depthBias);\n vec3 uvDepth = clipPos;\n\n float shadowMapSize = 1.0 / shadowParameters.texelStepSize.x;\n float shadowMapSizeInverse = shadowParameters.texelStepSize.x;\n float contactHardeningLightSizeUVRatio = shadowMap_penumbraRatio;\n float shadowMapIndex = shadowParameters.shadowMapIndex;\n // hack : 让不同cascade的阴影看起来没有明显分隔\n float scale = pow(2.0, shadowMapIndex);\n contactHardeningLightSizeUVRatio /= scale;\n float lightSizeUV = shadowMapSize * contactHardeningLightSizeUVRatio;\n float darkness = shadowParameters.darkness;\n\n float blockerDepth = 0.0;\n float sumBlockerDepth = 0.0;\n float numBlocker = 0.0;\n\n for (int i = 0; i < searchTapCount; i ++) {\n blockerDepth = czm_unpackDepth(textureLod(depthSampler, uvDepth.xy + (lightSizeUV * shadowMapSizeInverse * PoissonSamplers32[i].xy), 0.0));\n if (blockerDepth < uvDepth.z) {\n sumBlockerDepth += blockerDepth;\n numBlocker++;\n }\n }\n\n if (numBlocker < 1.0) {\n return 1.0;\n }\n else\n {\n float avgBlockerDepth = sumBlockerDepth / numBlocker;\n\n // Offset preventing aliasing on contact.\n float AAOffset = shadowMapSizeInverse * 10.;\n // Do not dividing by z despite being physically incorrect looks better due to the limited kernel size.\n // float penumbraRatio = (depthMetric - avgBlockerDepth) / avgBlockerDepth;\n float penumbraRatio = ((depthMetric - avgBlockerDepth) + AAOffset);\n float filterRadius = penumbraRatio * lightSizeUV * shadowMapSizeInverse;\n\n float random = getRand(shadowParameters.texCoords.xy);\n float rotationAngle = random * 3.1415926;\n vec2 rotationVector = vec2(cos(rotationAngle), sin(rotationAngle));\n\n float shadow = 0.;\n for (int i = 0; i < pcfTapCount; i++) {\n vec3 offset = poissonSamplers[i];\n // Rotated offset.\n offset = vec3(offset.x * rotationVector.x - offset.y * rotationVector.y, offset.y * rotationVector.x + offset.x * rotationVector.y, 0.);\n vec3 realUV = uvDepth + offset * filterRadius;\n #ifdef WEBGPU\n realUV.z = (realUV.z - 0.5) * 2.0;\n #endif\n shadow += textureLod(u_shadowDepth, realUV, 0.0);\n }\n shadow /= float(pcfTapCount);\n\n // Blocker distance falloff\n shadow = mix(shadow, 1.0, depthMetric - avgBlockerDepth);\n\n // Apply darkness\n shadow = mix(darkness, 1.0, shadow);\n\n return shadow;\n }\n }\n\n #define inline\n float computeShadowWithPCSS16(czm_shadowParameters shadowParameters, sampler2D depthSampler)\n {\n return computeShadowWithPCSS(shadowParameters, depthSampler, 16, 16, PoissonSamplers32);\n }\n\n #define inline\n float computeShadowWithPCSS32(czm_shadowParameters shadowParameters, sampler2D depthSampler)\n {\n return computeShadowWithPCSS(shadowParameters, depthSampler, 16, 32, PoissonSamplers32);\n }\n\n #define inline\n float computeShadowWithPCSS64(czm_shadowParameters shadowParameters, sampler2D depthSampler)\n {\n return computeShadowWithPCSS(shadowParameters, depthSampler, 32, 64, PoissonSamplers64);\n }\n\n#else\n #define inline\n float computeShadowWithPoissonSampling(czm_shadowParameters shadowParameters, sampler2D shadowMap)\n {\n float shadowPixelDepth = shadowParameters.depth;\n float depthBias = shadowParameters.depthBias;\n shadowPixelDepth -= depthBias;\n float darkness = shadowParameters.darkness;\n vec2 uv = shadowParameters.texCoords;\n vec4 uvRange = shadowParameters.uvRange;\n vec2 texelStepSize = shadowParameters.texelStepSize;\n\n float visibility = 1.0;\n vec2 poissonDisk[4];\n poissonDisk[0] = vec2(-0.94201624, -0.39906216);\n poissonDisk[1] = vec2(0.94558609, -0.76890725);\n poissonDisk[2] = vec2(-0.094184101, -0.92938870);\n poissonDisk[3] = vec2(0.34495938, 0.29387760);\n\n // Poisson Sampling\n if (sampleShadowMap(shadowMap, uv + poissonDisk[0] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n if (sampleShadowMap(shadowMap, uv + poissonDisk[1] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n if (sampleShadowMap(shadowMap, uv + poissonDisk[2] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n if (sampleShadowMap(shadowMap, uv + poissonDisk[3] * texelStepSize) < shadowPixelDepth) visibility -= 0.25;\n\n return visibility;\n }\n#endif // USE_PCSS\n\n#define inline\nfloat shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\n#ifdef USE_SOFT_SHADOWS\n #ifdef USE_PCSS\n #ifdef LOW_QUALITY_SHADOW\n float visibility = computeShadowWithPCSS16(shadowParameters, shadowMap);\n #elif defined(MEDIUM_QUALITY_SHADOW)\n float visibility = computeShadowWithPCSS32(shadowParameters, shadowMap);\n #else\n float visibility = computeShadowWithPCSS64(shadowParameters, shadowMap);\n #endif\n #else\n float visibility = computeShadowWithPoissonSampling(shadowParameters, shadowMap);\n #endif\n#else\n float depth = shadowParameters.depth;\n float depthBias = shadowParameters.depthBias;\n depth -= depthBias;\n vec2 uv = shadowParameters.texCoords;\n float visibility = shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n",D$$="\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n\nuniform sampler2D u_waterMask;\nuniform vec4 u_waterMaskTranslationAndScale;\nuniform float u_zoomedOutOceanSpecularIntensity;\n\nfloat waveFade(float edge0, float edge1, float x)\n{\n float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n return pow(1.0 - y, 5.0);\n}\n\nfloat linearFade(float edge0, float edge1, float x)\n{\n return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n}\n\n// Based on water rendering by Jonas Wagner:\n\n// low altitude wave settings\nconst float oceanFrequencyLowAltitude = 825000.0;\nconst float oceanAnimationSpeedLowAltitude = 0.004;\nconst float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;\nconst float oceanSpecularIntensity = 0.5;\n\n// high altitude wave settings\nconst float oceanFrequencyHighAltitude = 125000.0;\nconst float oceanAnimationSpeedHighAltitude = 0.008;\nconst float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;\n\nvec4 getWaterNoise(vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (textureLod(u_oceanNormalMap, uv0, 0.0)) +\n (textureLod(u_oceanNormalMap, uv1, 0.0)) +\n (textureLod(u_oceanNormalMap, uv2, 0.0)) +\n (textureLod(u_oceanNormalMap, uv3, 0.0));\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)\n{\n vec3 positionToEyeEC = -positionEyeCoordinates;\n float positionToEyeECLength = length(positionToEyeEC);\n\n // The double normalize below works around a bug in Firefox on Android devices.\n vec3 normalizedpositionToEyeEC = normalize(normalize(positionToEyeEC));\n\n // Fade out the waves as the camera moves far from the surface.\n float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);\n\n#ifdef SHOW_OCEAN_WAVES\n // high altitude waves\n float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;\n vec4 noise = getWaterNoise(textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);\n vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);\n\n // low altitude waves\n time = czm_frameNumber * oceanAnimationSpeedLowAltitude;\n noise = getWaterNoise(textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);\n vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);\n\n // blend the 2 wave layers based on distance to surface\n float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);\n float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);\n vec3 normalTangentSpace =\n (highAltitudeFade * normalTangentSpaceHighAltitude) +\n (lowAltitudeFade * normalTangentSpaceLowAltitude);\n normalTangentSpace = normalize(normalTangentSpace);\n\n // fade out the normal perturbation as we move farther from the water surface\n normalTangentSpace.xy *= waveIntensity;\n normalTangentSpace = normalize(normalTangentSpace);\n#else\n vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);\n#endif\n\n vec3 normalEC = enuToEye * normalTangentSpace;\n\n const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);\n\n // Use diffuse light to highlight the waves\n float diffuseIntensity = czm_getLambertDiffuse(czm_sunDirectionEC, normalEC) * maskValue;\n vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);\n\n#ifdef SHOW_OCEAN_WAVES\n // Where diffuse light is low or non-existent, use wave highlights based solely on\n // the wave bumpiness and no particular light direction.\n float tsPerturbationRatio = normalTangentSpace.z;\n vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);\n#else\n vec3 nonDiffuseHighlight = vec3(0.0);\n#endif\n\n // Add specular highlights in 3D, and in all modes when zoomed in.\n float specularIntensity = czm_getSpecular(czm_sunDirectionEC, normalizedpositionToEyeEC, normalEC, 10.0) + 0.25 * czm_getSpecular(czm_moonDirectionEC, normalizedpositionToEyeEC, normalEC, 10.0);\n float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);\n float specular = specularIntensity * surfaceReflectance;\n\n#ifdef HDR\n specular *= 1.4;\n\n float e = 0.2;\n float d = 3.3;\n float c = 1.7;\n\n vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));\n#else\n vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;\n#endif\n\n return vec4(color, imageryColor.a);\n}\n\nvec4 getOceanColor(vec4 inColor, vec3 positionEC, vec3 positionMC, vec3 normalEC, vec3 normalMC, float fade)\n{\n vec4 color = inColor;\n vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;\n vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;\n vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;\n waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;\n\n float mask = texture2D(u_waterMask, waterMaskTextureCoordinates).r;\n\n if (mask > 0.0)\n {\n mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n\n vec2 ellipsoidTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC);\n vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC.zyx);\n\n vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));\n\n color = computeWaterColor(positionEC, textureCoordinates, enuToEye, color, mask, fade);\n }\n return color;\n}\n\n#endif\n",g$17="\n#ifdef HYPSOMETRIC_ANALYSIS\nuniform sampler2D uHypsometricTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\n\nfloat computeMixCon()\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n float t = floor(v_height2 / uHypContourInterval);\n distanceToContour = abs(v_height2 - t * uHypContourInterval - 0.1) ;\n }\n else\n {\n distanceToContour = abs(v_height2 - uHypMaxVisibleValue);\n }\n float dxc = abs(dFdx(v_height2));\n float dyc = abs(dFdy(v_height2));\n float dF = max(dxc, dyc);\n return (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor()\n{\n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n float contourRate = (v_height2 - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n vec2 contourCoord = vec2(0.0, finalCoord);\n return textureLod(uHypsometricTexture, contourCoord, 0.0).rgba;\n}\n\nvec4 getHypsometricAnalysisColor(vec4 inColor, vec2 textureCoordinates)\n{\n vec4 finalColor = inColor;\n float mixCon = computeMixCon();\n if(uHypHasColorTable > 0.1)\n {\n bool hasHyp = true;\n #ifdef HYPSOMETRIC_REGION\n if(uHypHasAnalysisRegion > 0.1){\n hasHyp = texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w > 0.5;\n }\n #endif\n if(hasHyp)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(v_height2 > uHypMaxVisibleValue + 4.0 || v_height2 < uHypMinVisibleValue - 4.0)\n {\n finalOpacity = 0.5;\n }\n else\n {\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = mixCon;\n contourMapColor = mix(computeContourMapColor(), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = mixCon;\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n #else\n if(uHypContourFillMode > 0.9)\n #endif\n {\n contourMapColor = computeContourMapColor();\n }\n else\n {\n finalOpacity = 0.0;\n }\n finalColor = mix(finalColor, contourMapColor, finalOpacity);\n }\n }\n }\n return finalColor;\n}\n\n#endif\n\n#ifdef SLOPE_ANALYSIS\nuniform sampler2D uSlopeColorTexture;\nuniform sampler2D uSlopeArrowsTexture;\nuniform float uSlopeHasColorTable;\nuniform float uSlopeFillMode;\nuniform float uSlopeOpacity;\nuniform float uSlopeFloor;\nuniform float uSlopeCeil;\nuniform float uSlopeMinVisibleValue;\nuniform float uSlopeMaxVisibleValue;\nuniform float uHasSlopeRegion;\nuniform vec4 uSlopeRect;\nconst float PI = 3.1415926535897932384626;\nvarying vec2 texCoordRotate;\n\n\nvec4 ComputeSlopeArrowColor(in float slopeAngle, in vec3 realNormal)\n{\n vec2 limitTexCoord = fract(texCoordRotate);\n vec2 slopeDirection = realNormal.xy;\n vec4 arrowsTexColor = vec4(0.0);\n float arrowAlpha = 0.0;\n float distance = length(slopeDirection);\n float acosSlopeDirection = acos(slopeDirection.x/distance);\n float slopeArrowsAngle = acosSlopeDirection;//坡向的旋转角\n if(slopeDirection.y<0.0)//第二、三象限\n {\n slopeArrowsAngle = 2.0 * PI - acosSlopeDirection;\n }\n //绕Z轴旋转的旋转矩阵\n vec2 n = vec2(cos(slopeArrowsAngle),-sin(slopeArrowsAngle));\n vec2 t = vec2(sin(slopeArrowsAngle),cos(slopeArrowsAngle));\n mat2 slopeRotateZMatrix = mat2(n,t);\n //1、把旋转点移到(0.5,0.5)\n vec2 transCoord = limitTexCoord - vec2(0.5,0.5);\n //2、以原点为中心点旋转纹理坐标\n transCoord = slopeRotateZMatrix * transCoord;\n //3、把旋转点(0.5,0.5)移到原点处\n transCoord += vec2(0.5,0.5);\n transCoord = smoothstep(0.0,1.0, transCoord);\n arrowsTexColor = textureLod(uSlopeArrowsTexture, transCoord, 0.0);\n if (slopeAngle <= PI/180.0) // 当地形的坡度值小于E-6度时,不显示表示方向的箭头。\n {\n return vec4(0.0);\n }\n arrowAlpha = arrowsTexColor.a;\n // 解决坡向边界有黑线的问题\n float xNum = floor(transCoord.x * 64.0);\n float yNum = floor(transCoord.y * 64.0);\n if ((xNum <= 2.0 || xNum >= 61.0|| yNum <= 2.0||yNum >= 61.0) && arrowAlpha < 1.0)\n {\n arrowAlpha = 0.0;\n }\n arrowsTexColor = vec4(arrowsTexColor.rgb, arrowAlpha);\n return arrowsTexColor;\n}\n\nvec4 getSlopeAnalysisColor(vec4 inColor, vec2 textureCoordinates, vec3 realNormal){\n vec4 finalColor = inColor;\n bool hasSlopeRegion = true;\n #ifdef SlopeRegion\n if(uHasSlopeRegion > 0.1){\n hasSlopeRegion = texture2D(uModifyRasterTexture, textureCoordinates.xy).w > 0.5;\n }\n #endif\n if(hasSlopeRegion)\n {\n float finalOpacity = uSlopeOpacity;\n float slopeRate = abs(normalize(realNormal).z);\n float slopeAngle = acos(slopeRate);\n if (slopeAngle < uSlopeMinVisibleValue || slopeAngle > uSlopeMaxVisibleValue)\n {\n finalOpacity = 0.0;\n }\n float threshold = clamp(abs(uSlopeCeil-uSlopeFloor),0.0000001,PI/2.0);\n float rate = (slopeAngle-uSlopeFloor)/threshold;\n float finalRate = clamp(rate,0.0,1.0);\n float count = floor(finalRate * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalRate*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 slopeCoord = vec2(x, y);\n vec4 slopeFillColor = textureLod(uSlopeColorTexture, slopeCoord, 0.0);\n vec4 slopeMapColor = vec4(0.0);\n if(uSlopeFillMode > 2.9)//填充和坡向\n {\n vec4 arrowsTexColor = ComputeSlopeArrowColor(slopeAngle, realNormal);\n slopeMapColor = mix(slopeFillColor, arrowsTexColor, arrowsTexColor.a);\n }\n else if(uSlopeFillMode > 1.9)//坡向\n {\n vec4 arrowsTexColor = ComputeSlopeArrowColor(slopeAngle, realNormal);\n slopeMapColor = arrowsTexColor;\n finalOpacity *= arrowsTexColor.a;\n }\n else if(uSlopeFillMode > 0.9)//填充\n {\n slopeMapColor = slopeFillColor;\n }\n else\n {\n finalOpacity = 0.0;\n }\n finalColor = mix(finalColor, slopeMapColor, finalOpacity);\n }\n \n return finalColor;\n}\n\n#endif\n\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodTexture;\nuniform vec4 uFloodRect;\nvarying vec3 vProjectionCoord;\n\nvec4 getFloodAnalysisColor(vec4 inColor, vec2 textureCoordinates){\n vec4 finalColor = inColor;\n float bIsFloodColor = 1.0;\n vec2 polyTexCoord = textureCoordinates.xy;\n polyTexCoord.x = polyTexCoord.x * (uTileBounds.z - uTileBounds.x) + uTileBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uTileBounds.w - uTileBounds.y) + uTileBounds.y;\n vec4 floodColor = vec4(0.0);\n if(polyTexCoord.x>uFloodRect.x && polyTexCoord.x<uFloodRect.z && polyTexCoord.y> uFloodRect.y&& polyTexCoord.y < uFloodRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uFloodRect.x, uFloodRect.w);\n polyTexCoord.x = polyTexCoord.x / (uFloodRect.z - uFloodRect.x);\n polyTexCoord.y = 1.0-polyTexCoord.y / (uFloodRect.y - uFloodRect.w);\n }\n floodColor = texture2D(uFloodTexture, polyTexCoord);\n if(floodColor.r > 0.5)\n {\n finalColor = vec4(40.0/255.0,150.0/255.0,200.0/255.0,u_GlobeAlpha);\n }\n return finalColor;\n}\n#endif\n\n\n",h$12="\n#ifdef NORMAL\nvec4 renderNormal(vec3 posMC)\n{\n vec3 normalMC = normalize(czm_computeNormal(posMC));\n normalMC = normalMC * 0.5 + vec3(0.5);\n #include <writeFragDepth>\n return vec4(normalMC, 1.0);\n}\n#endif\n",s$W="\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn ;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\n",u$S="\nUBO_DECL_BEGIN(Mesh)\n UBO_PARAM mat4 uModelMatrix;\n UBO_PARAM mat4 uGeoMatrix;\n UBO_PARAM vec4 batchTextureStep;\n UBO_PARAM vec2 batchTextureDimensions;\n UBO_PARAM vec2 decode_texCoord0_min;\n UBO_PARAM vec2 decode_texCoord1_min;\n UBO_PARAM vec3 decode_texCoord0_vNormConstant;\n UBO_PARAM vec3 decode_texCoord1_vNormConstant;\n UBO_PARAM vec4 decode_position_min;\n UBO_PARAM float decode_position_normConstant;\n UBO_PARAM float normal_rangeConstant;\n UBO_PARAM mat4 uInverseGeoMatrix;\n UBO_PARAM mat4 uSkeletonMatrix;\n UBO_PARAM float uSkeletonCount;\n UBO_PARAM vec2 uImgTextureBound;\n UBO_PARAM float uImgTextureAlpha;\n UBO_PARAM float fMultiTemporalFactor;\n UBO_PARAM vec3 uSouthWest;\n UBO_PARAM vec3 uNorthDir;\n UBO_PARAM vec3 uEastDir;\n UBO_PARAM vec2 textureRepeat;\nUBO_DECL_END\n",d$1h="\nUBO_DECL_BEGIN(Layer)\n UBO_PARAM vec4 uSelColor;\n UBO_PARAM vec4 uTranslationAndBottom;\n UBO_PARAM vec4 uFillForeColor;\n UBO_PARAM vec4 uPolygonOffset;\n UBO_PARAM float uPointSize;\n UBO_PARAM vec2 uMinMaxTransparent;\n UBO_PARAM float uTransparentFilter;\n UBO_PARAM vec4 uHypLineColor;\n UBO_PARAM vec4 uNoValueColor;\n UBO_PARAM vec4 uHypRect;\n UBO_PARAM float uHypHasAnalysisRegion;\n UBO_PARAM float uMixColorType;\n UBO_PARAM float uHypOpacity;\n UBO_PARAM float uHypContourInterval;\n UBO_PARAM float uHypContourFillMode;\n UBO_PARAM float uHypFloor;\n UBO_PARAM float uHypCeil;\n UBO_PARAM float uDataFloor;\n UBO_PARAM float uDataCeil;\n UBO_PARAM float uHypMaxVisibleValue;\n UBO_PARAM float uHypMinVisibleValue;\n UBO_PARAM float uHypsometricVisible;\n UBO_PARAM vec4 uRect;\n UBO_PARAM float uCameraHeight;\n UBO_PARAM vec4 uExcavationRect;\n UBO_PARAM vec4 uServerExcavationRect;\n UBO_PARAM float uExcavationMode;\n UBO_PARAM float uServerExcavationMode;\n UBO_PARAM vec4 uSwipeRegion;\n UBO_PARAM float uBrightness;\n UBO_PARAM float uContrast;\n UBO_PARAM float uHue;\n UBO_PARAM float uSaturation;\n UBO_PARAM float uOneOverGamma;\n UBO_PARAM vec4 uClipPlanes[6];\n UBO_PARAM vec4 uClipLineColor;\n UBO_PARAM float uClipMode;\n UBO_PARAM float uMaxCategory;\n UBO_PARAM float uMinCategory;\n UBO_PARAM float uCategoryWidht;\n UBO_PARAM float uCategoryHeight;\n UBO_PARAM vec4 uLineColor;\n UBO_PARAM float uLineWidth;\n UBO_PARAM float uFillStyle;\n UBO_PARAM vec4 uTransparentBackColor;\n UBO_PARAM float uTransparentBackColorTolerance;\n UBO_PARAM float uVisibleDistanceMax;\n UBO_PARAM vec4 uHorizontalColor;\n UBO_PARAM float uHorizontalLine;\n UBO_PARAM float uDistanceFalloffFactor;\n UBO_PARAM vec2 uStrokesTextureScale;\n UBO_PARAM float uStrokesLog2Resolution;\n UBO_PARAM vec4 uMinMaxTerrainHeightAndPickInfo;\n UBO_PARAM vec4 uOverlayRect;\n UBO_PARAM vec4 uEmissionTexAtlasTilingAndOffset[10];\n UBO_PARAM vec4 uEmissionTexAtlasRects[10];\n UBO_PARAM vec4 uEmissionColor;\n UBO_PARAM vec4 uLayerBounds;\n UBO_PARAM float uLayerCornerLength;\n UBO_PARAM float uMaxCategoryOrHypCeil;\n UBO_PARAM float uMinCategoryOrHypFloor;\n UBO_PARAM float uEmissionTexAtlasCount;\n UBO_PARAM float uSnowCoverageFactor;\n UBO_PARAM float uAnimationSpeed;\n UBO_PARAM float uRippleScale;\n UBO_PARAM float uWindIntensity;\n UBO_PARAM float uRain;\n UBO_PARAM float uCameraDepth;\n UBO_PARAM float uWetnessFactor;\n UBO_PARAM float uSelectColorType;\nUBO_DECL_END\n",b$1b="\nUBO_DECL_BEGIN(Material)\n UBO_PARAM mat4 uTexMatrix;\n UBO_PARAM vec4 uDiffuseColor;\n UBO_PARAM vec4 uAmbientColor;\n UBO_PARAM vec4 uSpecularColor;\n UBO_PARAM vec4 uTexUVOffset;\n UBO_PARAM vec4 uTextureDim;\n UBO_PARAM vec2 uTextureWidths;\n UBO_PARAM vec4 batchTextureStep_baseTex;\n UBO_PARAM vec2 batchTextureDimensions_baseTex;\n UBO_PARAM vec4 batchTextureStep_bakeTex;\n UBO_PARAM vec2 batchTextureDimensions_bakeTex;\n \n UBO_PARAM vec4 uBaseColorFactor;\n UBO_PARAM vec4 uEmissiveFactor;\n UBO_PARAM vec4 uEmissiveUVOffsetAndTiling;\n UBO_PARAM vec3 uMetallicRoughnessIntensityScale;\n UBO_PARAM vec2 uPBRTexWH;\n UBO_PARAM float uNormalTextureScale;\n UBO_PARAM float uAlphaMode;\n UBO_PARAM float uAlphaCutoff;\n UBO_PARAM float uPbrParTextureWidth;\n \n // uIndexOfRefraction;\n // uTransmissionFactor;\n // uThickness;\n // uSnowCoverageFactor;\n // uIntensityScale;\n // uAnimationSpeed;\n // uWetnessFactor;\n // uRippleScale;\n // uWindIntensity;\n // uRain;\n // uCameraDepth;\n // uTintColor;\n // uDiffusionDistance;\n // uClearcoatFactor;\n // uClearcoatRoughnessFactor;\n // uAnisotropy; \nUBO_DECL_END\n",x$16="\nUBO_DECL_BEGIN(Scene)\n UBO_PARAM mat4 uView;\n UBO_PARAM mat4 uProjection;\n UBO_PARAM mat4 uViewProjection;\n UBO_PARAM mat4 uInverseView;\n UBO_PARAM mat4 uInverseProjection;\n UBO_PARAM mat4 uInverseViewProjection;\n UBO_PARAM mat4 uViewportTransformation;\n UBO_PARAM mat3 uViewRotation;\n UBO_PARAM mat3 uInverseViewRotation;\n UBO_PARAM mat3 uTemeToPseudoFixed;\n UBO_PARAM vec4 uViewport;\n UBO_PARAM vec4 uFrustumPlanes;\n UBO_PARAM vec3 uRelativeOrigin;\n UBO_PARAM vec2 uCurrentFrustum;\n UBO_PARAM float uFarDepthFromNearPlusOne;\n UBO_PARAM float uLog2FarDepthFromNearPlusOne;\n UBO_PARAM float uOneOverLog2FarDepthFromNearPlusOne;\n UBO_PARAM float uFrameNumber;\n UBO_PARAM float uPixelRatio;\n UBO_PARAM float uResolutionScale;\n UBO_PARAM float uGamma;\n UBO_PARAM float uToneMappingExposure;\n UBO_PARAM float uEnvMapIntensity;\n UBO_PARAM vec2 uSpecularEnvironmentMapSize;\n UBO_PARAM float uSpecularEnvironmentMapsMaximumLOD;\n UBO_PARAM vec3 uSphericalHarmonicCoefficients[9];\n UBO_PARAM float uCameraReflect;\nUBO_DECL_END\n",L$19="\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = gl_FragCoord.z;\n#endif\n\n#ifdef WEBGL2\n gl_FragDepthEXT = gl_FragCoord.z;\n#endif\n",S$V="\n#ifdef NORMAL_AND_DEPTH\nvarying vec4 oriVertex;\nvarying vec3 perVertexNormals;\nvarying float depthInCamera;\nvec4 renderNormalAndDepth(vec3 posMC)\n{\n vec3 normal = normalize(perVertexNormals);\n float dLength = length(perVertexNormals);\n if(dLength <= 0.9)\n {\n normal = vec3(mat3(czm_modelView)*czm_computeNormal(posMC.xyz));\n }\n normal = (normal + 1.0) * 0.5;\n #include <writeFragDepth>\n return vec4(normal, 1.0);\n}\n#endif\n",U$12="\n#ifdef PREPASS\nvoid renderPrePass(float roughness)\n{\n vec3 normalEC = normalize(mat3(czm_view * uModelMatrix) * czm_computeNormal(vPositionMC.xyz));\n // 相机坐标系坐标\n gl_FragData[0] = vec4(v_positionEC, 1.0);\n // 相机坐标系法线\n gl_FragData[1] = vec4(normalEC, 1.0);\n // 反射率\n float reflectivity = 1.0 - roughness;\n gl_FragData[2] = vec4(reflectivity, reflectivity, reflectivity, 1.0);\n}\n#endif\n",V$Z="\nvoid calculateMipLevel(in vec2 inTexCoord, in vec2 vecTile, in float fMaxMip, inout float mipLevel)\n{\n\tvec2 dx = dFdx(inTexCoord * vecTile.x);\n\tvec2 dy = dFdy(inTexCoord * vecTile.y);\n\tfloat dotX = dot(dx, dx);\n\tfloat dotY = dot(dy, dy);\n\tfloat dMax = max(dotX, dotY);\n\tfloat dMin = min(dotX, dotY);\n\tfloat offset = (dMax - dMin) / (dMax + dMin);\n\toffset = clamp(offset, 0.0, 1.0);\n\tfloat d = dMax * (1.0 - offset) + dMin * offset;\n\tmipLevel = 0.5 * log2(d);\n\tmipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n}\n",y$V="\n#ifdef Has_Texture\n uniform sampler2D uTexture;\n#ifdef MULTI_TEX\n uniform sampler2D uSecTexture;\n#endif\n#ifndef NO_TEXCOORD\n struct TextureParam {\n vec2 uv;\n vec2 dim;\n vec2 translate;\n vec2 scale;\n vec4 uvOffset;\n float maxMipmapLevel;\n float texCoordZ;\n float isRGBA;\n };\n \n vec4 sampleLod(vec2 uv, float mipLevel, bool bUseFirstTexture) {\n vec4 color = vec4(1.0);\n \n if(bUseFirstTexture)\n {\n #ifdef GL_EXT_shader_texture_lod\n color = texture2DLodEXT(uTexture, uv, mipLevel);\n #else\n #ifdef WEBGL2\n color = textureLod(uTexture, uv, mipLevel);\n #else\n color = texture2D(uTexture, uv, mipLevel);\n #endif\n #endif\n }\n else\n {\n #ifdef MULTI_TEX\n #ifdef GL_EXT_shader_texture_lod\n color = texture2DLodEXT(uSecTexture, uv, mipLevel);\n #else\n #ifdef WEBGL2\n color = textureLod(uSecTexture, uv, mipLevel);\n #else\n color = texture2D(uSecTexture, uv, mipLevel);\n #endif\n #endif\n #endif\n }\n \n return SRGBtoLINEAR4(color);\n }\n \n#ifdef TextureBatch\n\n vec4 getBatchTextureColor(TextureParam textureParam, bool bUseFirstTexture)\n {\n vec2 uv = textureParam.uv;\n vec2 dim = textureParam.dim;\n vec2 translate = textureParam.translate;\n vec2 scale = textureParam.scale;\n vec4 uvOffset = textureParam.uvOffset;\n float maxMipmapLevel = textureParam.maxMipmapLevel;\n if(maxMipmapLevel < 0.0)\n {\n return vec4(1.0);\n }\n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, dim, maxMipmapLevel, mipLevel);\n #endif\n vec2 texCoord = getBatchUV(uv, translate, scale, dim, ceil(mipLevel));\n vec4 colorCeil = sampleLod(texCoord, 0.0, bUseFirstTexture);\n texCoord = getBatchUV(uv, translate, scale, dim, floor(mipLevel));\n vec4 colorFloor = sampleLod(texCoord, 0.0, bUseFirstTexture);\n return colorCeil * 0.5 + colorFloor * 0.5;\n }\n\n#else\n\n vec4 getTextureColor(TextureParam textureParam, vec2 outTexCoord, bool bUseFirstTexture)\n {\n vec2 uv = textureParam.uv;\n vec2 dim = textureParam.dim;\n vec2 translate = textureParam.translate;\n vec2 scale = textureParam.scale;\n vec4 uvOffset = textureParam.uvOffset;\n float maxMipmapLevel = textureParam.maxMipmapLevel;\n float texCoordZ = textureParam.texCoordZ;\n \n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, dim, maxMipmapLevel, mipLevel);\n #endif\n outTexCoord = getUV(uv, translate, uvOffset, scale.x, dim.x, mipLevel, texCoordZ);\n vec4 color = sampleLod(outTexCoord, mipLevel, bUseFirstTexture);\n #ifdef RGBTOBGR\n color = color.bgra;\n #endif\n return color;\n }\n\n#endif\n#endif\n\n vec4 getTextureColorForS3M(out vec4 outTexCoord)\n {\n #ifdef INVALID_OBLIQUE\n return vec4(0.5,0.5,0.5,1.0);\n #endif\n #ifdef NO_TEXCOORD\n return SRGBtoLINEAR4(texture2D(uTexture, vec2(0.5)));\n #endif\n #ifndef NO_TEXCOORD\n TextureParam textureParam;\n textureParam.uv = vTexCoord.xy;\n vec4 firstColor, secColor;\n #ifdef TextureBatch\n textureParam.dim = vTexSize.xy;\n textureParam.translate = vTexTran.xy;\n textureParam.scale = vTexScale.xy;\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.x;\n firstColor = getBatchTextureColor(textureParam, true);\n #else\n if(vTexMatrix.z < 0.0){\n return vec4(1.0);\n }\n float texWidth = vTexMatrix.z * uTextureWidths.x;\n textureParam.dim = vec2(texWidth, texWidth);\n textureParam.translate = vTexMatrix.xy;\n textureParam.scale = vec2(vTexMatrix.z, vTexMatrix.z);\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vTexMatrix.w;\n textureParam.isRGBA = vIsRGBA.x;\n textureParam.texCoordZ = vTexCoordZ.x;\n firstColor = getTextureColor(textureParam, outTexCoord.xy, true);\n #endif\n \n #ifdef MULTI_TEX\n textureParam.uv = vTexCoord.zw;\n #ifdef TextureBatch\n textureParam.dim = vTexSize.zw;\n textureParam.translate = vTexTran.zw;\n textureParam.scale = vTexScale.zw;\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.y;\n secColor = getBatchTextureColor(textureParam, false);\n #else\n texWidth = vTexMatrix2.z * uTextureWidths.y;\n textureParam.dim = vec2(texWidth, texWidth);\n textureParam.translate = vTexMatrix2.xy;\n textureParam.scale = vec2(vTexMatrix2.z, vTexMatrix2.z);\n textureParam.uvOffset = uTexUVOffset;\n textureParam.maxMipmapLevel = vTexMatrix2.w;\n textureParam.isRGBA = vIsRGBA.y;\n textureParam.texCoordZ = vTexCoordZ.y;\n secColor = getTextureColor(textureParam, outTexCoord.zw, false);\n #endif\n return firstColor * secColor;\n #endif\n \n return firstColor;\n #endif\n }\n#endif\n",C$17="\n#include <calculatePolyTexCoord>\n#include <executeExcavation>\n#include <splitClip>\n#include <executeServerExcavationDecl>\n#ifdef FINAL_RESOLUTION_CLIP\nvarying vec3 vertexClip;\nuniform vec3 uMaxClip;\nuniform vec3 uMinClip;\n#endif\nvoid preClip()\n{\n if(vColor.a == 0.0)\n {\n discard;\n }\n#ifdef FINAL_RESOLUTION_CLIP\n\tif(vertexClip.x > uMaxClip.x || vertexClip.y > uMaxClip.y || vertexClip.z > uMaxClip.z \n\t|| vertexClip.x < uMinClip.x || vertexClip.y < uMinClip.y || vertexClip.z < uMinClip.z) \n { \n discard; \n } \n#endif\n#ifdef SQCLIP\n czm_spatialQueryClip();\n#endif\n#ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(executeExcavation())\n {\n discard;\n }\n#endif\n#ifdef SERVEREXCAVATION\n if(executeServerExcavation())\n {\n discard;\n }\n#endif\n}\n",M$16="\n#ifdef VISIBLEDISTANCEMAX\nvoid getAlphaByDistance(vec3 positionEC, inout vec4 color) {\n if(length(positionEC) > uVisibleDistanceMax)\n {\n float minAlpha = min(1.0, (length(positionEC) - uVisibleDistanceMax) / 2000.0);\n color.a = 1.0 - minAlpha;\n }\n}\n#endif\n\n#ifdef OVERLAY\nuniform sampler2D uOverlayTexture;\nvoid getOverlayColor(inout vec4 color)\n{\n float ptInRect = 1.0;\n vec4 vertexPos = uGeoMatrix * vec4(vPositionMC.xyz, 1.0);\n vec2 uv = calculatePolyTexCoord(vertexPos, uOverlayRect, ptInRect);\n if(ptInRect > 0.5)\n {\n vec4 overlayColor = texture2D(uOverlayTexture, uv.xy);\n if(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n {\n vec4 mixColor = mix(color, overlayColor, overlayColor.a);\n color = vec4(mixColor.r, mixColor.g, mixColor.b, color.a);\n }\n }\n}\n#endif\n\n#ifdef HORIZONTAL_LINE\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}\n#endif\n\n#ifdef IMAGERY\nvarying vec2 imgCoord;\nuniform sampler2D uImgTexture;\n\n//#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform vec4 u_dayTextureSize[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\nuniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n//#endif\n\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\n\nvoid getImageryColor(inout vec4 color)\n{\n\tvec2 texcood = vec2(imgCoord.x / uImgTextureBound.x, imgCoord.y / uImgTextureBound.y);\n#ifdef MULTIBATCH\n\tcolor = computeDayColor(vec4(1.0,1.0,1.0,0.0), clamp(vec3(texcood,0.0), 0.0, 1.0));\n#else\n\tcolor = computeDayColor(color, clamp(vec3(texcood,0.0), 0.0, 1.0));\n#endif\n}\n#endif\n\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nvoid getFloodWaterColor(inout vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n}\n#endif\n\n#ifdef TRANSPARENT_BACK_COLOR\nvoid transparentColorClip(vec4 color)\n{\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - color.r);\n float gDiff = abs(uTransparentBackColor.g - color.g);\n float bDiff = abs(uTransparentBackColor.b - color.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n}\n#endif\n",v$R="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n#endif\n#ifdef TexCoord2\n attribute vec4 aTexCoord1;\n#endif\n\n#ifdef VertexColor\n attribute vec4 aColor;\n#endif\n\n#ifdef USE_VertexWeight\n attribute float aVertexWeight;\n #ifdef MultiTemporalWeight\n attribute float aVertexWeight_1;\n #endif\n#endif\n\n#ifdef Volume\n attribute vec3 aRatio;\n#endif\n\n#ifdef InstanceRenderBIM\n attribute vec4 uv2;\n attribute vec4 uv3;\n attribute vec4 uv4;\n attribute vec4 secondary_colour;\n attribute vec4 uv6;\n#endif\n\n#ifdef InstanceRenderPipeline\n attribute vec4 uv1;\n attribute vec4 uv2;\n attribute vec4 uv3;\n attribute vec4 uv4;\n attribute vec4 uv5;\n attribute vec4 uv6;\n attribute vec4 uv7;\n attribute vec4 secondary_colour;\n attribute vec4 uv9;\n#endif\n\n#ifdef BatchTable\n#ifdef Instance\n #ifdef InstanceModel\n attribute float batchId;\n #endif\n attribute float instanceId;\n#else\n attribute float batchId;\n#endif\n#endif\n\nstruct VertexFactoryIntermediates{\n vec4 position;\n vec4 vertexColor;\n vec4 secondColor;\n vec3 normal;\n vec3 normalInstance;\n vec4 uv0;\n vec4 uv1;\n float batchTableID;\n vec2 pbrTextureUV;\n};\n\nvec4 GetLocalPosition(){\n vec4 vertexPos = aPosition;\n#ifdef COMPRESS_VERTEX\n vertexPos = decode_position_min + vec4(aPosition.xyz, 1.0) * decode_position_normConstant;\n#endif\n return vertexPos;\n}\nvec4 GetUV0(){\n vec4 result = vec4(0.0);\n#ifdef TexCoord\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n vec2 texCoord0;\n texCoord0.x = aTexCoord0.x * decode_texCoord0_vNormConstant.x;\n texCoord0.y = aTexCoord0.y * decode_texCoord0_vNormConstant.y;\n result.xy = decode_texCoord0_min + texCoord0.xy;\n #else\n result.xy = decode_texCoord0_min.xy + aTexCoord0.xy * decode_texCoord0_normConstant;\n #endif // MeshOPT_Compress\n #else\n result = aTexCoord0;\n #endif // COMPRESS_TEXCOORD\n \n #ifdef InstanceRenderPipeline\n vec4 tex4Vec;\n if(aTexCoord0.y > 0.5) {\n tex4Vec = vec4(uv7.y, aTexCoord0.x, 0.0, 1.0);\n }\n else {\n tex4Vec = vec4(uv7.x, aTexCoord0.x, 0.0, 1.0);\n }\n \n result.xy = tex4Vec.xy;\n #endif\n#endif // TexCoord\n\n return uTexMatrix * result;\n}\nvec4 GetUV1(){\n vec4 result = vec4(0.0);\n#ifdef TexCoord2\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n vec2 texCoord1;\n texCoord1.x = aTexCoord1.x * decode_texCoord1_vNormConstant.x;\n texCoord1.y = aTexCoord1.y * decode_texCoord1_vNormConstant.y;\n result.xy = decode_texCoord1_min + texCoord1.xy;\n #else\n result.xy = decode_texCoord1_min.xy + aTexCoord1.xy * decode_texCoord1_normConstant;\n #endif // MeshOPT_Compress\n #else\n result = aTexCoord1;\n #endif // COMPRESS_TEXCOORD\n#endif // TexCoord2\n return result;\n}\nvec3 GetNormal(){\n#ifdef HAS_NORMAL\n vec3 realNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n #ifdef MeshOPT_Compress\n realNormal.x = aNormal.x / 127.0;\n realNormal.y = aNormal.y / 127.0;\n realNormal.z = 1.0 - abs(realNormal.x) - abs(realNormal.y);\n realNormal = normalize(realNormal);\n #else\n realNormal = czm_octDecode(aNormal.xy, normal_rangeConstant).zxy;\n #endif // MeshOPT_Compress\n #endif // COMPRESS_NORMAL \n \n #ifdef InstanceRenderPipeline\n #ifdef TexCoord\n realNormal.x = realNormal.x * uv7.z;\n #endif \n #endif\n return realNormal;\n#else\n return vec3(0.0, 0.0, 0.0);\n#endif // HAS_NORMAL \n}\nVertexFactoryIntermediates getVertexFactoryIntermediates(){\n VertexFactoryIntermediates intermediates;\n vec4 vertexPos = GetLocalPosition();\n \n#ifdef UseInstanceSkeletonMatrix\n vertexPos = uSkeletonMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n\n#ifdef InstanceRenderBIM\n mat4 worldMatrix;\n worldMatrix[0] = uv2;\n worldMatrix[1] = uv3;\n worldMatrix[2] = uv4;\n worldMatrix[3] = vec4( 0, 0, 0, 1 );\n vertexPos = vec4(vertexPos.xyz, 1.0) * worldMatrix;\n#endif\n\n#ifdef InstanceRenderPipeline\n mat4 worldMatrix;\n mat4 worldMatrix0;\n mat4 worldMatrix1;\n vec4 worldPos0;\n vec4 worldPos1;\n worldMatrix0[0] = uv1;\n worldMatrix0[1] = uv2;\n worldMatrix0[2] = uv3;\n worldMatrix0[3] = vec4( 0, 0, 0, 1 );\n worldMatrix1[0] = uv4;\n worldMatrix1[1] = uv5;\n worldMatrix1[2] = uv6;\n worldMatrix1[3] = vec4( 0, 0, 0, 1 );\n vec4 realVertex = vec4(vertexPos.xyz, 1.0);\n realVertex.x = realVertex.x * uv7.z;\n worldPos0 = realVertex * worldMatrix0;\n worldPos1 = realVertex * worldMatrix1;\n #ifdef TexCoord\n if(aTexCoord0.y > 0.5) {\n vertexPos = worldPos1;\n worldMatrix = worldMatrix1;\n }\n else {\n vertexPos = worldPos0;\n worldMatrix = worldMatrix0;\n }\n #endif\n#endif\n\n\n\n intermediates.position = vertexPos;\n intermediates.normal = GetNormal();\n#ifdef Instance\n intermediates.normalInstance = intermediates.normal * mat3(worldMatrix);\n#endif\n intermediates.uv0 = GetUV0();\n intermediates.uv1 = GetUV1();\n intermediates.vertexColor = vec4(1.0);\n#ifdef VertexColor\n intermediates.vertexColor = aColor;\n#endif\n\n#ifdef Instance\n intermediates.vertexColor *= secondary_colour;\n#endif\n\n#ifdef BatchTable\n #ifdef Instance\n float index = instanceId;\n #else\n float index = batchId;\n #endif\n \n #ifdef InstanceModel\n index = instanceId * uSkeletonCount + batchId;\n #endif\n intermediates.batchTableID = index;\n#endif\n\n#ifdef USE_BatchPBR\n intermediates.pbrTextureUV = aTexCoord1.xy;\n#endif\n\n return intermediates;\n}\n",E$19="\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef USE_TextureCoordMatrix\n attribute vec2 aTextureCoordMatrix;\n#endif\n\n#ifdef TextureBatch\n#ifdef MULTI_TEX\n attribute vec2 aTextureBatchId;\n float getTextureBatchId0(vec2 att)\n {\n return att.x;\n }\n float getTextureBatchId1(vec2 att) \n {\n return att.y;\n }\n#else\n attribute float aTextureBatchId;\n float getTextureBatchId0(float att)\n {\n return att;\n }\n#endif\n// MULTI_TEX \n varying vec4 vTexTran;\n varying vec4 vTexScale;\n varying vec4 vTexSize;\n varying vec2 vMaxMipLevel;\n void getTextureParameter(in vec4 xywh, in vec2 textureDim, inout vec2 translate, inout vec2 scale, inout vec2 texSize, inout float maxMipLevel)\n {\n float width = xywh.z;\n float height = xywh.w;\n width *= 2.0 / 3.0;\n maxMipLevel = log2(min(width, height));\n scale.x = width / textureDim.x;\n scale.y = height / textureDim.y;\n translate.x = xywh.x;\n translate.y = xywh.y;\n translate /= textureDim;\n texSize.x = width;\n texSize.y = height;\n }\n \n void getUVMatrixForBatch(vec4 xywh, vec4 xywh2) {\n if(getTextureBatchId0(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.x = -1.0;\n }\n else\n {\n getTextureParameter(xywh, uTextureDim.xy, vTexTran.xy, vTexScale.xy, vTexSize.xy, vMaxMipLevel.x);\n }\n #ifdef MULTI_TEX\n if(getTextureBatchId1(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.y = -1.0;\n }\n else\n {\n getTextureParameter(xywh2, uTextureDim.zw, vTexTran.zw, vTexScale.zw, vTexSize.zw, vMaxMipLevel.y);\n }\n #endif // MULTI_TEX \n }\n#else\n #ifdef TexCoord\n varying vec2 vTexCoordZ;\n #endif\n \n varying vec4 vTexMatrix;\n varying vec2 vIsRGBA;\t\n #ifdef TexCoord2\n varying vec4 vTexMatrix2;\n #endif // TexCoord2\n \n const float SHIFT_LEFT8 = 256.0;\n const float SHIFT_RIGHT8 = 1.0 / 256.0;\n const float SHIFT_RIGHT4 = 1.0 / 16.0;\n const float SHIFT_LEFT4 = 16.0;\n \n void computeUVMatrixFromZValue(in float nZ, inout float XTran, inout float YTran, inout float scale, inout float isRGBA)\n {\n if(nZ <= 0.0)\n {\n return;\n }\n float nDel8 = floor(nZ * SHIFT_RIGHT8);\n float nDel16 = floor(nDel8 * SHIFT_RIGHT8);\n float nDel20 = floor(nDel16 * SHIFT_RIGHT4);\n isRGBA = floor(nDel20);\n YTran = nZ - nDel8 * SHIFT_LEFT8;\n XTran = nDel8 - nDel16 * SHIFT_LEFT8;\n float nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\n scale = 1.0 / pow(2.0, nLevel);\n }\n \n void getUVMatrix(vec4 uv0, vec4 uv1) {\n vTexCoordZ.x = uv0.z;\n \n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.x = aTextureCoordMatrix.x;\n #endif // USE_TextureCoordMatrix\n \n vTexMatrix = vec4(0.0,0.0,1.0,0.0);\n vIsRGBA.x = 0.0;\n if(vTexCoordZ.x < -90000.0) {\n vTexMatrix.z = -1.0;\n }\n \n #ifndef Instance\n computeUVMatrixFromZValue(floor(vTexCoordZ.x), vTexMatrix.x, vTexMatrix.y, vTexMatrix.z, vIsRGBA.x);\n #ifdef TexCoord2\n vTexMatrix2 = vec4(0.0,0.0,1.0,0.0);\n vIsRGBA.y = 0.0;\n vTexCoordZ.y = uv1.z;\n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.y = aTextureCoordMatrix.y;\n #endif // USE_TextureCoordMatrix \n computeUVMatrixFromZValue(floor(vTexCoordZ.y), vTexMatrix2.x, vTexMatrix2.y, vTexMatrix2.z, vIsRGBA.y);\n #endif // TexCoord2\n #endif // Instance\n vTexMatrix.w = log2(uTextureWidths.x * vTexMatrix.z);\n #ifdef TexCoord2\n vTexMatrix2.w = log2(uTextureWidths.y * vTexMatrix.z);\n #endif // TexCoord2\n }\n \n#endif\n\n#endif // COMPUTE_TEXCOORD\n",P$11="\n#ifdef FALTTEN\n uniform sampler2D uFlattenTexture;\n\n vec4 getVertexByFlatten(vec4 posInLayerCoord, float layerBottom)\n {\n vec4 vecPos = uGeoMatrix * vec4(posInLayerCoord.xyz, 1.0);\n vec2 vecRatio = vec2(uRect.z - uRect.x, uRect.w - uRect.y);\n vec2 vecTexCoord = vec2(vecPos.x - uRect.x, vecPos.y - uRect.y);\n vecTexCoord.x = vecTexCoord.x / vecRatio.x;\n vecTexCoord.y = vecTexCoord.y / vecRatio.y;\n if(vecTexCoord.x > 1.0 || vecTexCoord.x < 0.0 || vecTexCoord.y > 1.0 || vecTexCoord.y < 0.0)\n {\n return posInLayerCoord;\n }\n vec4 value = texture2D(uFlattenTexture, vecTexCoord.xy);\n #ifdef UseFloatTexture\n float fHeight = value.r;\n #else\n float fHeight = czm_unpackValue(value);\n #endif\n if(vecPos.z > fHeight && value.a > 0.5)\n {\n float fDepthOffset = clamp((uCameraHeight - fHeight - layerBottom) * 0.0001 * (vecPos.z + layerBottom - fHeight), 0.001, 3.0);\n vecPos.z = fHeight + fDepthOffset;\n vecPos.w = vecPos.z;\n }\n return uInverseGeoMatrix * vec4(vecPos.xyz, 1.0);\n }\n#endif\n",w$X="\n#ifdef FusionMode\n uniform mat4 uModelView;\n uniform vec2 uPanOffset;\n\n vec4 getFusionModePosition(vec4 vertexPos)\n {\n vec4 positionCC = czm_projection * uModelView * vertexPos;\n positionCC.x += (2.0 * uPanOffset.x * positionCC.w);\n positionCC.y += (-2.0 * uPanOffset.y * positionCC.w);\n return positionCC;\n }\n#endif\n",F$13="\n#ifdef W_VISIBLE\n uniform sampler2D uCategorieTexture;\n\n void setAlphaByWValue(in float w, inout vec4 color)\n {\n float category_u = abs(w - uMinCategory);\n float category_y = ceil(category_u / uCategoryWidht) / uCategoryHeight - 0.5 / uCategoryHeight;\n float category_x = mod(category_u, uCategoryWidht) / uCategoryWidht + 0.5 / uCategoryWidht ;\n vec2 categoryTexCoord = vec2(category_x , category_y);\n float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n color.a *= 1.0 - category;\n }\n#endif\n",A$1a="\n#ifdef USE_BatchPBR\n uniform sampler2D uPBRTexture;\n varying vec2 vMetallicRoughness;\n varying vec4 vEmissiveFactor;\n varying vec3 vAlphaCutoffAndModeAndDoubleSide;\n void getPBRParamFromTexture(vec2 uv1)\n {\n float x = (uv1.x * 2.0 + 0.5)/ uPBRTexWH.x;\n float y = (uv1.x * 2.0 + 1.5)/ uPBRTexWH.x;\n vec4 pbrParam = texture2D(uPBRTexture, vec2(x, 0.5));\n vMetallicRoughness.xy = pbrParam.rg;\n vAlphaCutoffAndModeAndDoubleSide.x = pbrParam.b;\n float temp = pbrParam.a / 65536.0;\n vAlphaCutoffAndModeAndDoubleSide.y = floor(temp);\n vAlphaCutoffAndModeAndDoubleSide.z = (temp- vAlphaCutoffAndModeAndDoubleSide.y) * 65536.0;\n vEmissiveFactor = texture2D(uPBRTexture, vec2(y, 0.5));\n }\n#endif\n",B$_="\n#ifdef IMAGERY\n attribute vec2 img;\n varying vec2 imgCoord;\n#endif\n\n#ifdef Volume\n varying vec3 vecRotioCoord;\n#endif\n\n#ifdef QUAD_OUTLINE\n varying float vDistanceFromEye;\n#endif\n\n#ifdef HYPSOMETRIC\n varying vec2 vecHypTexCoord;\n#endif\n\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\n\n#ifdef SERVEREXCAVATION\n varying vec4 vServerExcavationVertexPos;\n#endif\n\n#ifdef SQRESULT\n uniform mat4 uSQViewProj;\n varying vec4 vSQ_clip_pos;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n uniform mat4 uFloodMatrixInvert;\n varying vec4 vFloodPos;\n#endif\n\n#ifdef FINAL_RESOLUTION_CLIP\n varying vec3 vertexClip;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n varying vec2 vLayerTexCoord;\n varying vec2 vModIndexAndTexIndex;\n#endif\n\nvoid s3mComputeVaryings(vec4 vertexPos)\n{\n#ifdef Volume\n vecRotioCoord = aRatio;\n#endif\n\n#ifdef FINAL_RESOLUTION_CLIP\n vertexClip = (uGeoMatrix * vec4(vertexPos.xyz, 1.0)).xyz;\n#endif\n\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n\n#ifdef SERVEREXCAVATION\n vServerExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n\n#ifdef HYPSOMETRIC\n if(uHypHasAnalysisRegion > 0.1)\n {\n float ptInRect = 1.0;\n vecHypTexCoord = calculatePolyTexCoord(uGeoMatrix * vec4(vertexPos.xyz, 1.0), uHypRect, ptInRect);\n }\n#endif\n\n#ifdef SQRESULT\n vSQ_clip_pos = uSQViewProj * vec4(vertexPos.xyz, 1.0);\n#endif\n\n#ifdef IMAGERY\n imgCoord = img;\n#endif\n\n#ifdef QUAD_OUTLINE\n vDistanceFromEye = gl_Position.z;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n const float right_8 = 65280.0;\n const float right_16 = 16711680.0;\n float pickId = vSecondColor.r * 255.0 + vSecondColor.g * right_8 + vSecondColor.b * right_16;\n vModIndexAndTexIndex.x = mod(pickId, 10.0) * 0.1;\n vModIndexAndTexIndex.y = mod(pickId, uEmissionTexAtlasCount);\n vec4 realVertexPos = uGeoMatrix * vertexPos;\n vLayerTexCoord = (realVertexPos.xy - uLayerBounds.xy) / uLayerBounds.zw;\n#endif\n\n#ifdef FLOOD_ANALYSIS\n vFloodPos = uFloodMatrixInvert * vec4(vertexPos.xyz, 1.0);\n#endif\n}\n",N$Y="\nfloat computeWValue(inout vec4 vertexPos){\n float realWValue = vertexPos.w;\n#ifdef HypColorByZValue\n realWValue = vertexPos.z;\n#endif\n#ifdef TEXTURE_COORD_ONE_IS_W\n realWValue = aTexCoord0.x;\n#endif\n#ifdef USE_VertexWeight\n realWValue = aVertexWeight;\n #ifdef MultiTemporalWeight\n realWValue = mix(aVertexWeight, aVertexWeight_1, fMultiTemporalFactor);\n #ifdef ChangeZValue\n\t\tvertexPos.z += realWValue;\n\t\t#endif\n\t#endif\n#endif\n#ifdef COMPUTE_W_VALUE\n wValue = realWValue + uTranslationAndBottom.w;\n#endif\n return realWValue;\n}\n",R$$="\n#ifdef HYPSOMETRIC\n#include <getVolumeValue>\n\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nvarying vec2 vecHypTexCoord;\n#ifdef Volume\nvarying vec3 vecRotioCoord;\n#endif\n\nfloat computeMixCon(float fValue)\n{\n float distanceToContour;\n if(abs(uHypMaxVisibleValue - uHypMinVisibleValue) > 0.1)\n {\n if(fValue < 0.5)\n {\n distanceToContour = mod(fValue - 0.0002, uHypContourInterval);\n }\n else\n {\n float t = floor(fValue / uHypContourInterval);\n distanceToContour = abs(fValue - (t * uHypContourInterval) - 0.1);\n }\n }\n else\n {\n distanceToContour = abs(fValue - uHypMaxVisibleValue);\n }\n float dxc = abs(dFdx(fValue));\n float dyc = abs(dFdy(fValue));\n float dF = max(dxc, dyc);\n return (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float fValue)\n{\n float threshold = abs(uHypCeil - uHypFloor);\n float contourRate = (fValue - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n float count = floor(finalCoord * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 contourCoord = vec2(x, y);\n return texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvec4 getContourMapColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n#ifdef Volume\n vec3 aRatioT = vecRotioCoord;\n if((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n {\n if(uVolumeType > 0.5)\n {\n vec4 volumeColor = getVolumeValue(aRatioT);\n if(uMixColorType > 0.5)\n {\n volumeColor = volumeColor * oriColor;\n }\n return volumeColor;\n }\n float noValue;\n float texTest = getVolumeValue(aRatioT, noValue);\n if(noValue > 0.5)\n {\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n#endif\n float extendHeight = czm_branchFreeTernary(uHypContourFillMode > 2.9, 0.0, czm_branchFreeTernary(uHypContourFillMode > 1.9, 5.0, 0.0));\n if(fValue > uHypMaxVisibleValue + extendHeight || fValue < uHypMinVisibleValue - extendHeight)\n {\n return uNoValueColor * oriColor;\n }\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fValue);\n contourMapColor = mix(computeContourMapColor(fValue), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fValue);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n vec4 finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n finalColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n#endif\n return finalColor;\n}\n\n#ifdef Volume2\nfloat getContourValue(vec4 volColor) {\n float noValue = volColor.a;\n float texTest = clamp(czm_unpackVolume(volColor.zyx),0.0,1.0);\n\n float fValue;\n if(noValue > 0.5)\n {\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = uHypMaxVisibleValue + abs(uHypMaxVisibleValue * 0.1);\n }\n \n return fValue;\n}\n\nvec4 getHypsometricColor(vec4 oriColor, vec4 volColor)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n \n if(uFilterMode > 0.5) {\n vec4 finalColor = volColor * oriColor;\n\n if(uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n \n float fValue = getContourValue(volColor);\n return getContourMapColor(oriColor, fValue);\n}\n\n#else\n\nvec4 getHypsometricColor(vec4 oriColor, float wValue)\n{\n float fValue = wValue;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec4 hypColor = texture2D(uHypsometricRenderTexture, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return getContourMapColor(oriColor, fValue);\n}\n\nvec4 getHypsometricColorByGeoBounds(vec4 oriColor, float wValue, vec4 hypRect, vec2 vTexCoord, vec4 geoBounds)\n{\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return getContourMapColor(oriColor, wValue);\n}\n#endif\n\n#endif\n",T$12="\nvec2 calculatePolyTexCoord(vec4 vertexPos, vec4 rectPos, out float ptInRect){\n vec4 realVertexPos = vertexPos;\n vec2 vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n vec2 texCoord = vec2(realVertexPos.x - rectPos.x, realVertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n ptInRect = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\n",I$1i="\n#ifdef EXCAVATION\nuniform sampler2D uExcavationTexture;\nvarying vec4 vExcavationVertexPos;\nbool executeExcavation()\n{\n float hasExcavation = 1.0;\n vec2 vecExcavationTexCoord = calculatePolyTexCoord(vExcavationVertexPos, uExcavationRect, hasExcavation);\n bool excavationInside = (uExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n \n if(excavationInside)\n {\n return textureLod(uExcavationTexture, vecExcavationTexCoord.xy, 0.0).r > 0.5;\n }\n \n return textureLod(uExcavationTexture, vecExcavationTexCoord.xy, 0.0).r < 0.5;\n}\n#endif\n",W$11="\n#ifdef APPLY_SWIPE\nvoid rollerShutter(vec2 coord, vec4 region)\n{\n vec2 f = step(region.xw, coord);\n vec2 s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n#endif\n",k$_="\n#ifdef EMISSION_TEXTURE_ATLAS\nuniform sampler2D uEmissionTexAtlas;\nvarying vec2 vLayerTexCoord;\nvarying vec2 vModIndexAndTexIndex;\nvec3 getEmissiveTextureAtlasColor(float w)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n for(int i = 0; i < int(uEmissionTexAtlasCount); i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(length(vLayerTexCoord) * uLayerCornerLength / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod((w - uMinCategoryOrHypFloor) / uEmissionTexAtlasTilingAndOffset[i].y, 1.0) ;\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n vec3 normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n float isNotTopFace = 1.0 - step(0.95, normalMC.z);\n float dayTime = 1.0 - czm_RGBToHSL(uAmbientLightColor.rgb).z;\n vec3 emissionTexColor = uEmissionColor.rgb * texColor * dayTime * isNotTopFace;\n return emissionTexColor;\n}\n\nvec3 getEmissiveTextureAtlasColor(float w, vec2 texCoord)\n{\n vec3 texColor = vec3(0.0);\n vec2 emissionTexCoord;\n int nEmissionTexTexIdx = int(floor(vModIndexAndTexIndex.y + 0.5));\n vec2 atlasTexCoord;\n for(int i = 0; i < int(uEmissionTexAtlasCount); i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = mod(texCoord.x / uEmissionTexAtlasTilingAndOffset[i].x, 1.0);\n emissionTexCoord.y = mod(texCoord.y / uEmissionTexAtlasTilingAndOffset[i].y, 1.0);\n emissionTexCoord.x += uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.xy = fract(emissionTexCoord.xy);\n atlasTexCoord = mix(uEmissionTexAtlasRects[i].xy, uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = texture2D(uEmissionTexAtlas, atlasTexCoord).rgb;\n vec3 normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n float isNotTopFace = 1.0 - step(0.95, normalMC.z);\n float dayTime = 1.0 - czm_RGBToHSL(uAmbientLightColor.rgb).z;\n vec3 emissionTexColor = uEmissionColor.rgb * texColor * dayTime * isNotTopFace;\n return emissionTexColor;\n}\n#endif\n",O$P="\n#ifdef ADJUST_COLOR\nvec3 adjustColor(vec3 inputColor)\n{\n vec3 outputColor = inputColor;\n outputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\n outputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\n outputColor.rgb = czm_hue(outputColor.rgb, uHue);\n outputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\n outputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\n outputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\n return outputColor;\n}\n#endif\n",_$W="\n#ifdef CLIP\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nconst float clip_lineWidth = 3.0;\n\nfloat GetClipDistance(vec3 pos, vec3 planeNormal, float disToOrigin)\n{\n return dot(planeNormal, pos) + disToOrigin;\n}\n\nfloat ClipBehindAllPlane(float fBorderWidth, vec4 clip_vertex)\n{\n float distance = 0.0;\n float result = -1.0;\n #ifdef CLIPPLANE\n distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[0].xyz, uClipPlanes[0].w);\n if (distance < 0.0)\n {\n return 1.0;\n }\n else if (distance < fBorderWidth)\n {\n result = 0.0;\n }\n #else\n for(int i = 0; i < 6; i++)\n {\n distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[i].xyz, uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return 1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n #endif\n return result;\n}\n\nfloat ClipBehindAnyPlane(float fBorderWidth, vec4 clip_vertex)\n{\n float result = 1.0;\n for(int i = 0; i < 6; i++)\n {\n float distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[i].xyz, uClipPlanes[i].w);\n if((distance + fBorderWidth) < 0.0)\n {\n return -1.0;\n }\n else if(distance < 0.0)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nfloat ClipAnythingButLine(float fBorderWidth, vec4 clip_vertex)\n{\n float result = -1.0;\n for(int i = 0; i < 6; i++)\n {\n float distance = GetClipDistance(clip_vertex.xyz, uClipPlanes[i].xyz, uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return -1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nvec4 clip(vec4 clip_vertex, float fIsFiltByID)\n{\n if(fIsFiltByID < 0.1)\n {\n return vec4(1.0);\n }\n if(uClipMode < 0.5)\n {\n return vec4(1.0);\n }\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2) \n float dxc = abs(dFdx(clip_vertex.x));\n float dyc = abs(dFdy(clip_vertex.y));\n float fBorderWidth = max(dxc, dyc) * clip_lineWidth;\n #else\n float fBorderWidth = clip_lineWidth;\n #endif\n float clipResult = 1.0;\n if(uClipLineColor.a < 0.01)\n {\n fBorderWidth = 0.0;\n }\n if(uClipMode < 1.5)\n {\n clipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n }\n else if(uClipMode < 2.5)\n {\n clipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n }\n else if(uClipMode < 3.5)\n {\n clipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n }\n if(clipResult < -0.5)\n {\n discard;\n }\n else if(clipResult < 0.5)\n {\n return uClipLineColor;\n }\n else\n {\n return vec4(1.0);\n }\n}\n#endif\n",j$19="\n#ifdef Volume\nuniform sampler2D uVolumeTexture;\n\n#ifdef TIME_ORDER\nuniform sampler2D uNextVolumeTexture;\nuniform float uTimeRatio;\n#endif\n\nfloat unpackVolume(vec3 packedDepth)\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\nvec2 computeVolumeTextureCoord(vec3 texCoord, float fLevel)\n{\n float yOffset = floor((fLevel+0.25/uVolSideBlockCount) / uVolSideBlockCount);\n float xOffset = fLevel - yOffset * uVolSideBlockCount;\n float texCoordV = (texCoord.y * uVolHeight + yOffset * uVolBlockLength) / uVolTexLength;\n float texCoordU = (texCoord.x * uVolWidth + xOffset * uVolBlockLength) / uVolTexLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfloat computeVolumeValue(sampler2D volumeTexture, vec2 topTexCoord, vec2 bottomTexCoord, float ratio, out float noValue)\n{\n vec4 volumeValue1 = texture2D(volumeTexture, topTexCoord);\n vec4 volumeValue2 = texture2D(volumeTexture, bottomTexCoord);\n float fValue1 = clamp(unpackVolume(volumeValue1.xyz),0.0,1.0);\n float fValue2 = clamp(unpackVolume(volumeValue2.xyz),0.0,1.0);\n if(uVolFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n noValue = mix(volumeValue1.a, volumeValue2.a, ratio);\n if(volumeValue1.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(volumeValue2.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfloat getVolumeValue(vec3 texCoord, out float noValue)\n{\n float fLevel = (uVolDepth - 1.0) * texCoord.z;\n float bottomLevel= floor(fLevel);\n float topLevel = bottomLevel + 1.0;\n float ratio = topLevel - fLevel;\n vec2 topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n vec2 bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n float fResult = computeVolumeValue(uVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n#ifdef TIME_ORDER\n float fNextResult = computeVolumeValue(uNextVolumeTexture, topTexCoord, bottomTexCoord, ratio, noValue);\n fResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\n return fResult;\n}\n\nvec4 getVolumeValue(vec3 texCoord)\n{\n\tfloat fLevel = (uVolDepth - 1.0) * texCoord.z;\n\tfloat bottomLevel= floor(fLevel);\n\tfloat topLevel = bottomLevel + 1.0;\n\tfloat ratio = topLevel - fLevel;\n\tfloat yOffset1 = floor((topLevel+0.25/uVolSideBlockCount) / uVolSideBlockCount);\n\tfloat xOffset1 = topLevel - yOffset1 * uVolSideBlockCount;\n\tfloat texCoordV1 = (texCoord.y * uVolHeight + yOffset1 * uVolBlockLength)/uVolTexLength;\n\tfloat texCoordU1 = (texCoord.x * uVolWidth + xOffset1 * uVolBlockLength)/uVolTexLength;\n\tvec4 volumeColor1 = texture2D(uVolumeTexture, vec2(texCoordU1,texCoordV1));\n\tfloat yOffset2 = floor((bottomLevel+0.25/uVolSideBlockCount) / uVolSideBlockCount);\n\tfloat xOffset2 = bottomLevel - yOffset2 * uVolSideBlockCount;\n\tfloat texCoordV2 = (texCoord.y * uVolHeight + yOffset2 * uVolBlockLength)/uVolTexLength;\n\tfloat texCoordU2 = (texCoord.x * uVolWidth + xOffset2 * uVolBlockLength)/uVolTexLength;\n\tvec4 volumeColor2 = texture2D(uVolumeTexture, vec2(texCoordU2, texCoordV2));\n\n\tif(uVolFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvec4 volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif\n",G$1f="\nUBO_DECL_BEGIN(WaterLayer)\n UBO_PARAM vec4 uWaterColor;\n UBO_PARAM vec4 uSunColor;\n UBO_PARAM vec4 uFlowParameter;\n UBO_PARAM float uTimeVal;\n UBO_PARAM float uWaterBrightness;\n UBO_PARAM float uUseRefectMap;\n UBO_PARAM float uWaveScale;\n UBO_PARAM float uReflowWaveScale;\n UBO_PARAM float uNoiseStrength;\n UBO_PARAM float uMinVisibleValue;\n UBO_PARAM float uMaxVisibleValue;\n UBO_PARAM float uReflectMapLod;\nUBO_DECL_END\n",H$14="\n UBO_DECL_BEGIN(Polyline)\n vec4 uColor;\n vec4 uOutlineColor;\n vec4 uGapColor;\n float uEffectLineWidth;\n float uType;\n float uOutlineWidth;\n float uDashLength;\n float uDashPattern;\n float uGlowPower;\n float uIsArrow;\n UBO_DECL_END\n",q$16="\n UBO_DECL_BEGIN(RegionEffect)\n vec4 uForeColor;\n vec4 uBackColor;\n float uRotationAngle;\n float uType;\n float uLineWidthX;\n float uLineWidthY;\n float uRepeatX;\n float uRepeatY;\n float uOffsetX;\n float uOffsetY;\n UBO_DECL_END\n",z$Y="\nmat3 getNormalMatrix(mat4 viewMatrix, mat4 modelMatrix) {\n mat4 modelView = viewMatrix * modelMatrix;\n vec4 modelViewRow0 = modelView[0];\n vec4 modelViewRow1 = modelView[1]; \n vec4 modelViewRow2 = modelView[2]; \n mat3 normalMatrix = mat3(\n vec3(modelViewRow0.x, modelViewRow0.y, modelViewRow0.z), \n vec3(modelViewRow1.x, modelViewRow1.y, modelViewRow1.z), \n vec3(modelViewRow2.x, modelViewRow2.y, modelViewRow2.z));\n return normalMatrix;\n}",J$$="\nUBO_DECL_BEGIN(Shadow)\n UBO_PARAM mat4 shadowMap_matrix;\n UBO_PARAM vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;\n UBO_PARAM vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;\n UBO_PARAM mat4 shadowMap_cascadeMatrices[4];\n UBO_PARAM vec4 shadowMap_cascadeSplits[2];\n UBO_PARAM vec4 shadowMap_lightPositionEC;\n UBO_PARAM vec3 shadowMap_lightDirectionEC;\n UBO_PARAM float shadowMap_penumbraRatio;\nUBO_DECL_END\n",K$W="\n#define MAX_POINT_LIGHT_COUNT 16\n#define MAX_SPOT_LIGHT_COUNT 16\n#define MAX_DIRECTION_LIGHT_COUNT 4\nUBO_DECL_BEGIN(Light)\n UBO_PARAM vec3 uPointLightPositionEC[MAX_POINT_LIGHT_COUNT];\n UBO_PARAM vec3 uPointLightColor[MAX_POINT_LIGHT_COUNT];\n UBO_PARAM vec4 uPointLightDistanceAndDecay[MAX_POINT_LIGHT_COUNT];\n UBO_PARAM vec4 uSpotLightColorAndExponent[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec3 uSpotLightPositionEC[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec3 uSpotLightDirectionEC[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec4 uSpotLightDistanceDecayCosPenumbra[MAX_SPOT_LIGHT_COUNT];\n UBO_PARAM vec3 uDirectionalLightDirectionEC[MAX_DIRECTION_LIGHT_COUNT];\n UBO_PARAM vec3 uDirectionalLightDirection[MAX_DIRECTION_LIGHT_COUNT];\n UBO_PARAM vec3 uDirectionalLightColor[MAX_DIRECTION_LIGHT_COUNT];\n UBO_PARAM vec4 uAmbientLightColor;\n UBO_PARAM vec4 uSunLightColor;\n UBO_PARAM vec3 uSunDirectionEC;\n UBO_PARAM vec3 uSkyColor;\n UBO_PARAM vec3 uGroundColor;\n UBO_PARAM float uSunLightON;\n UBO_PARAM int uPointLightCount;\n UBO_PARAM int uSpotLightCount;\n UBO_PARAM int uDirLightCount;\nUBO_DECL_END\n",Q$12="\nuniform sampler2D uNormalDepthTexture;\nfloat edgeDetection(float lineWidth)\n{\n vec2 center = gl_FragCoord.xy / czm_globeDepthTextureDim.xy;\n vec2 off = lineWidth / czm_globeDepthTextureDim.xy;\n vec4 tex_nw = vec4(center.x+off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_nw = texture2D(uNormalDepthTexture, tex_nw.xy);\n val_nw.xyz = (val_nw.xyz * 2.0) - 1.0;\n vec4 tex_ne = vec4(center.x-off.x, center.y+off.y, 1.0, 1.0);\n vec4 val_ne = texture2D(uNormalDepthTexture, tex_ne.xy);\n val_ne.xyz = (val_ne.xyz * 2.0) - 1.0;\n vec4 tex_sw = vec4(center.x+off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_sw = texture2D(uNormalDepthTexture, tex_sw.xy);\n val_sw.xyz = (val_sw.xyz * 2.0 ) - 1.0;\n vec4 tex_se = vec4(center.x-off.x, center.y-off.y, 1.0, 1.0);\n vec4 val_se = texture2D(uNormalDepthTexture, tex_se.xy);\n val_se.xyz = (val_se.xyz * 2.0) - 1.0;\n float discontinuity = 0.0;\n float dot0 = dot(val_nw.xyz, val_se.xyz);\n float dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nvec4 sketchMode(vec4 inputColor, vec4 lineColor, float lineWidth)\n{\n vec4 outputColor = inputColor;\n float discontinuity = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0, 1.0);\n if(uFillStyle == 1.)\n {\n outputColor = lineColor;\n outputColor.a = (1.0 - sign(discontinuity - 0.5)) * 0.5;\n outputColor.a *= lineColor.a;\n }\n else\n {\n vec3 mixLineColor = mix(inputColor.rgb, vec3(lineColor.rgb), lineColor.a);\n outputColor.rgb = mix(mixLineColor, inputColor.rgb, discontinuity);\n }\n return outputColor;\n}\n",X$Z="\nUBO_DECL_BEGIN(S3MVolume)\n UBO_PARAM float uVolSideBlockCount;\n UBO_PARAM float uVolBlockLength;\n UBO_PARAM float uVolTexLength;\n UBO_PARAM float uVolWidth;\n UBO_PARAM float uVolHeight;\n UBO_PARAM float uVolDepth;\n UBO_PARAM float uVolFilterMode;\n UBO_PARAM float uVolumeType;\nUBO_DECL_END\n",Y$Q="\nstruct IncidentLight {\n vec3 direction;\n vec3 color;\n bool visible;\n};\n\nstruct GeometricContext {\n vec3 position;\n vec3 normal;\n vec3 viewDir;\n};\n\nstruct PhysicalMaterial {\n vec3\tdiffuseColor;\n float\troughness;\n vec3\tspecularColor;\n float specularF90;\n};\n\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n\n#define saturate(a) clamp( a, 0.0, 1.0 )\n\n#include <getEnvironmentColor>\n\n//参考UE4.24实现计算精确光源的衰减\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n if ( decayExponent > 0.0 ) {\n return pow( clamp( 1.0 - lightDistance / cutoffDistance, 0.0, 1.0 ), decayExponent );\n }\n return 1.0;\n}\n",Z$11="\n\n#include <cubeUV_reflection>\n#include <hemisphereLightDecl>\nvec3 inverseTransformDirection( in vec3 dir ) {\n mat3 fixedToENU = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n const mat3 yUpToZUp = mat3(1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n return normalize( yUpToZUp * fixedToENU * dir );\n}\n\n// void indirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n// reflectedLight.indirectDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n// }\n\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\n\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n vec3 Fr = specularColor;\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\n vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\n\nvoid indirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance;\n computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n vec3 totalScattering = singleScattering + multiScattering;\n vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n reflectedLight.indirectSpecular += radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#ifdef IBL\nvec3 getIBLIrradiance( const in vec3 normal ) {\n vec3 worldNormal = inverseTransformDirection( normal );\n vec4 envMapColor = textureCubeUV( czm_hdrEnvMap, worldNormal, 1.0 );\n return envMapColor.rgb;\n}\n\nvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n vec3 reflectVec = reflect( - viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n reflectVec = inverseTransformDirection( reflectVec );\n vec4 envMapColor = textureCubeUV( czm_hdrEnvMap, reflectVec, roughness );\n return envMapColor.rgb;\n}\n#endif\n\nvoid getEnvironmentColor(GeometricContext geometry, PhysicalMaterial material, inout ReflectedLight reflectedLight)\n{\n float roughness = material.roughness;\n vec3 posEC = geometry.position;\n vec3 n = geometry.normal;\n vec3 v = geometry.viewDir;\n\n vec3 irradiance = vec3(0.0);\n vec3 radiance = vec3(0.0);\n\n#ifdef BRDF\n#ifdef IBL\n\n#ifdef KtxEnvMap\n mat3 fixedToENU = mat3(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n vec3 cubeDir = normalize( yUpToZUp * fixedToENU * reflect(-v, n) );\n vec3 worldNormal = normalize( yUpToZUp * fixedToENU * n );\n irradiance = czm_sphericalHarmonics(worldNormal, uSphericalHarmonicCoefficients);\n radiance = czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, uSpecularEnvironmentMapSize, cubeDir, roughness * uSpecularEnvironmentMapsMaximumLOD, uSpecularEnvironmentMapsMaximumLOD);\n#else\n irradiance += getIBLIrradiance( geometry.normal );\n radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n#endif\n \n#else\n vec3 positionWC = vec3(uInverseView * vec4(posEC, 1.0)) + uRelativeOrigin;\n vec3 r = normalize(uInverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(uTemeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(uInverseViewRotation * uSunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(uInverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float sunNdotL = clamp(dot(n, uSunDirectionEC), 0.001, 1.0);\n float gamma = acos(sunNdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n luminance = luminance * uSunLightON + (1.0 - uSunLightON);\n irradiance = diffuseIrradiance * luminance;\n radiance = specularIrradiance * luminance;\n#endif\n irradiance *= uEnvMapIntensity;\n radiance *= uEnvMapIntensity;\n#else\n irradiance = uAmbientLightColor.rgb * 0.6;\n#endif\n\n#ifdef HAS_HEMISPHERE_LIGHTS\n HemisphereLight hemiLight;\n hemiLight.skyColor = uSkyColor;\n hemiLight.groundColor = uGroundColor;\n hemiLight.direction = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\n irradiance += getHemisphereLightIrradiance( hemiLight, geometry );\n#endif\n\n indirectSpecular_Physical(radiance, irradiance, geometry, material, reflectedLight);\n\n}\n\n",$$_="\n#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nvarying vec3 v_logPositionEC;\n#endif\n#endif\n\nvec4 updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n\n#ifdef SHADOW_MAP\n vec3 logPositionEC = (uInverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n#endif\n coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\n\n return coords;\n}\n\nvoid vertexLogDepth() {\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0 - uCurrentFrustum.x + gl_Position.w;\n gl_Position = updatePositionDepth(gl_Position);\n#endif\n}\n",oo$1="\n#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#endif\n\nvoid writeLogDepth(float depth)\n{\n#ifdef LOG_DEPTH\n#if defined(GL_EXT_frag_depth) || defined(WEBGL2)\n if (depth <= 0.9999999 || depth > uFarDepthFromNearPlusOne) {\n discard;\n }\n#ifdef POLYGON_OFFSET\n float factor = uPolygonOffset.z;\n float units = uPolygonOffset.w;\n\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n float x = dFdx(depth);\n float y = dFdy(depth);\n float m = sqrt(x * x + y * y);\n depth += m * factor;\n#endif\n\n#endif\n\n gl_FragDepthEXT = log2(depth) * uOneOverLog2FarDepthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\n gl_FragDepthEXT += czm_epsilon7 * units;\n#endif\n\n#endif\n#endif\n}\n\n",ro$1="\n#ifndef BRDF\nconst float shininess2 = 30.0;\nconst vec3 specular = vec3(0.066666);\n\nfloat getRoughness(vec2 oriTexCoord){\n return 1.0;\n}\n\nvec4 blinnPhong(in vec4 baseColorWithAlpha, vec2 texCoord, vec2 oriTexCoord, vec3 posEC, vec3 posMC, vec3 vertexNormalEC, mat4 modelMatrix)\n{\n vec3 normalEC = getNormalEC(vNormalEC, modelMatrix, posMC);\n vec3 totalDiffuseLight = vec3(0.0);\n vec3 totalSpecularLight = vec3(0.0);\n float sunLightDiffuseWeight = max( dot( normalEC, uSunDirectionEC ), 0.0 );\n totalDiffuseLight = uSunLightColor.rgb * sunLightDiffuseWeight * uSunLightON;\n vec3 positionToEyeECDir = -normalize(posEC);\n\n #ifdef HAS_DIR_LIGHTS\n for ( int i = 0; i < uDirLightCount; i ++ )\n {\n vec3 dirVectorEC = normalize((uView * vec4(uDirectionalLightDirection[ i ], 0.0)).xyz);\n float dotProduct = dot( normalEC, dirVectorEC );\n float dirDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += uDirectionalLightColor[ i ] * dirDiffuseWeight;\n }\n #endif\n\n #ifdef HAS_POINT_LIGHTS\n for ( int i = 0; i < uPointLightCount; i ++ )\n {\n vec3 lVector = uPointLightPositionEC[i] - posEC;\n float lengthToLight = length( lVector );\n float cutoffDis = uPointLightDistanceAndDecay[i].x;\n if(lengthToLight > cutoffDis)\n {\n continue;\n }\n float attenuation = punctualLightIntensityToIrradianceFactor( lengthToLight, cutoffDis, uPointLightDistanceAndDecay[i].y);\n lVector = normalize( lVector );\n float dotProduct = dot( normalEC, lVector );\n float pointLightDiffuse = max( dotProduct, 0.0 );\n totalDiffuseLight += uPointLightColor[i] * pointLightDiffuse * attenuation;\n vec3 pointHalfVector = normalize( lVector + positionToEyeECDir );\n float pointDotNormalHalf = max( dot( normalEC, pointHalfVector ), 0.0 );\n float pointSpecularWeight = max( pow( pointDotNormalHalf, shininess2 ), 0.0 );\n float specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, pointHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * uPointLightColor[ i ] * pointSpecularWeight * pointLightDiffuse * attenuation * specularNormalization;\n }\n #endif\n\n #ifdef HAS_SPOT_LIGHTS\n vec3 positionWC = (czm_model * vec4(posMC, 1.0)).xyz;\n for ( int i = 0; i < uSpotLightCount; i ++ )\n {\n vec3 lVector = uSpotLightPositionEC[i] - posEC;\n float attenuation = punctualLightIntensityToIrradianceFactor( length( lVector ), uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\n lVector = normalize( lVector );\n float spotEffect = dot( lVector, uSpotLightDirectionEC[ i ] );\n if ( spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z ) {\n spotEffect = max( pow( max( spotEffect, 0.0 ), uSpotLightColorAndExponent[ i ].w ), 0.0 );\n float dotProduct = dot( normalEC, lVector );\n float spotDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += uSpotLightColorAndExponent[ i ].rgb * spotDiffuseWeight * attenuation * spotEffect;\n vec3 spotHalfVector = normalize( lVector + positionToEyeECDir );\n float spotDotNormalHalf = max( dot( normalEC, spotHalfVector ), 0.0 );\n float spotSpecularWeight = max( pow( spotDotNormalHalf, shininess2 ), 0.0 );\n float specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * uSpotLightColorAndExponent[ i ].rgb * spotSpecularWeight * spotDiffuseWeight * attenuation * specularNormalization * spotEffect;\n }\n }\n #endif\n\n vec3 diffuseColor = uDiffuseColor.rgb * baseColorWithAlpha.rgb;\n\n PhysicalMaterial material;\n material.diffuseColor = diffuseColor;\n material.roughness = 1.0;\n float metalness = 0.0;\n vec3 f0 = vec3(0.04);\n material.specularColor = mix(f0, baseColorWithAlpha.rgb, metalness);;\n material.specularF90 = 1.0;\n \n GeometricContext geometry;\n geometry.position = posEC;\n geometry.normal = normalEC;\n geometry.viewDir = positionToEyeECDir;\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += totalDiffuseLight * diffuseColor;\n reflectedLight.directSpecular += totalSpecularLight * uSpecularColor.rgb;\n \n getEnvironmentColor(geometry, material, reflectedLight);\n\n float shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), normalEC, -posEC.z);\n#endif\n\n vec3 color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n return vec4(LINEARtoSRGB(color.rgb), baseColorWithAlpha.a);\n}\n#endif\n",eo="\n#ifdef TexCoord\n varying vec4 vTexCoord;\n varying vec2 vTexCoordZ;\n#endif\n\n#ifdef MULTI_TEX\n varying vec4 vTexMatrix2;\n#endif\n\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef TextureBatch\n varying vec4 vTexTran;\n varying vec4 vTexScale;\n varying vec4 vTexSize;\n varying vec2 vMaxMipLevel;\n#else\n varying vec4 vTexMatrix;\n varying vec2 vIsRGBA;\n#endif\n\n#include <calculateMipLevel>\n\n#ifdef TextureBatch\n\nvec2 getBatchUV(vec2 uv, vec2 translate, vec2 scale, vec2 dim, float mipLevel)\n{\n float temp;\n vec2 texTranslate = vec2(translate.x, translate.y);\t\n\tif(mipLevel > 0.0)\n\t{\n\t\ttexTranslate.x = translate.x + scale.x;\n\t\ttemp = pow(2.0, mipLevel - 1.0);\n\t\ttexTranslate.y = translate.y + scale.y * (temp - 1.0) / temp;\n\t}\n float texScale = 1.0 / pow(2.0, mipLevel);\n\tvec2 outUV = fract(uv);\n\tfloat offsetX = pow(2.0, mipLevel) / dim.x;\n\tfloat offsetY = pow(2.0, mipLevel) / dim.y;\n\toutUV.x = clamp(outUV.x, 0.0 + offsetX, 1.0 - offsetX);\n\toutUV.y = clamp(outUV.y, 0.0 + offsetY, 1.0 - offsetY);\n\toutUV.x = outUV.x * texScale * scale.x + texTranslate.x;\n\toutUV.y = outUV.y * texScale * scale.y + texTranslate.y;\n\treturn outUV;\n}\n\n#else\n\nvec2 getUV(vec2 uv, vec2 translate, vec4 uvOffset, float scale, float width, float mipLevel, float texCoordZ) \n{\n vec2 texCoord;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n float offset = pow(2.0, mipLevel) / width;\n texCoord = clamp(texCoord, offset, 1.0 - offset);\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n texCoord = texCoord * uvOffset.zw + uvOffset.xy;\n return texCoord;\n}\n\n#endif\n\n#endif\n",mo$2="\nvec3 getNormalEC(vec3 norEC, mat4 modelMatrix, vec3 posMC) { \n float faceDirection = gl_FrontFacing ? 1.0 : -1.0;\n mat3 normalMatrix = getNormalMatrix(uView, modelMatrix);\n vec3 normalEC = normalize(norEC);\n #ifndef HAS_NORMAL\n normalEC = normalize(normalMatrix * czm_computeNormal(posMC.xyz));\n #endif\n return normalEC * faceDirection;\n} \n";const to={rainDecl:o$1a,snowDecl:r$15,hemisphereLightDecl:e$1U,pointLightDecl:m$10,spotLightDecl:t$Y,directionLightDecl:i$Z,lightSourceImpl:p$11,brdf:l$16,executeServerExcavationDecl:f$_,cubeUV_reflection:c$14,shadowReceive:a$X,shadowVisibility:n$10,globeOcean:D$$,globeAnalysis:g$17,SRGBtoLINEAR:s$W,SceneUboDecl:x$16,LayerUboDecl:d$1h,MaterialUboDecl:b$1b,MeshUboDecl:u$S,writeFragDepth:L$19,renderNormal:h$12,renderNormalAndDepth:S$V,renderPrePass:U$12,calculateMipLevel:V$Z,getTextureColorDecl:y$V,preClipFS:C$17,S3MOperationFSDecl:M$16,S3MVertexFactory:v$R,getUVMatrixDecl:E$19,getVertexByFlatten:P$11,getFusionModePosition:w$X,setAlphaByWValue:F$13,getPBRParamFromTexture:A$1a,s3mComputeVaryings:B$_,computeWValue:N$Y,HypSometric:R$$,calculatePolyTexCoord:T$12,executeExcavation:I$1i,splitClip:W$11,getEmissiveTextureAtlasColor:k$_,adjustColor:O$P,clip:_$W,getVolumeValue:j$19,WaterLayerUboDecl:G$1f,RegionEffectUboDecl:q$16,PolylineEffectUboDecl:H$14,getNormalMatrix:z$Y,ShadowUboDecl:J$$,LightUboDecl:K$W,sketchMode:Q$12,S3MVolumeUboDecl:X$Z,vertexLogDepthDecl:$$_,writeLogDepthDecl:oo$1,getEnvironmentColor:Z$11,shaderModelBase:Y$Q,blinnPhong:ro$1,calcTexCoordDecl:eo,getNormalEC:mo$2};var preClipFS="\n#include <calculatePolyTexCoord>\n#include <executeExcavation>\n#include <splitClip>\nfn preClip()\n{\n#ifdef RASTER_CULL\n czm_rasterCull();\n#endif\n#ifdef SQCLIP\n czm_spatialQueryClip();\n#endif\n#ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, Layer.uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(executeExcavation())\n {\n discard;\n }\n#endif\n}\n",writeFragDepth="\ngl_FragDepth = gl_FragCoord.z;\n",renderNormal="\n#ifdef NORMAL\nfn renderNormal(posMC : vec3<f32>) -> vec4<f32>\n{\n var normalMC : vec3<f32> = normalize(czm_computeNormal(posMC));\n normalMC = normalMC * 0.5 + vec3<f32>(0.5);\n #include <writeFragDepth>\n return vec4<f32>(normalMC, 1.0);\n}\n#endif\n",renderNormalAndDepth="\n#ifdef NORMAL_AND_DEPTH\nvarying oriVertex : vec4<f32>;\nvarying perVertexNormals : vec3<f32>;\nfn renderNormalAndDepth(posMC : vec3<f32>) -> vec4<f32>\n{\n var normal = normalize(perVertexNormals);\n var modelView = Scene.uView * Mesh.uModelMatrix;\n var modelViewMat = mat3x3<f32>(modelView[0][0], modelView[1][0], modelView[2][0], modelView[0][1], modelView[1][1], modelView[2][1], modelView[0][2], modelView[1][2], modelView[2][2]);\n var shaderNormal = vec3<f32>(modelViewMat * czm_computeNormal(posMC.xyz));\n var dLength = length(perVertexNormals);\n if(dLength <= 0.9)\n {\n normal = shaderNormal;\n }\n normal = (normal + 1.0) * 0.5;\n #include <writeFragDepth>\n return vec4<f32>(normal, 1.0);\n}\n#endif\n",renderPrePass="\nvar normalEC = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(vPositionMC.xyz));\n// 相机坐标系坐标\ngl_FragData0 = vec4<f32>(v_positionEC, 1.0);\n// 相机坐标系法线\ngl_FragData1 = vec4<f32>(normalEC, 1.0);\n// 反射率\ngl_FragData2 = vec4<f32>(0.5, 0.5, 0.5, 1.0);\n",calculateMipLevel="\nfn calculateMipLevel(inTexCoord : vec2<f32>, vecTile : vec2<f32>, fMaxMip : f32, outMipLevel : ptr<function, f32>) {\n\tvar dx = dpdx((inTexCoord * vecTile.x));\n\tvar dy = dpdy((inTexCoord * vecTile.y));\n\tvar dotX = dot(dx, dx);\n\tvar dotY = dot(dy, dy);\n\tvar dMax = max(dotX, dotY);\n\tvar dMin = min(dotX, dotY);\n\tvar offset = ((dMax - dMin) / (dMax + dMin));\n\toffset = clamp(offset, 0.0f, 1.0f);\n\tvar d = ((dMax * (1.0f - offset)) + (dMin * offset));\n\tvar mipLevel = (0.5f * log2(d));\n\tmipLevel = clamp(mipLevel, 0.0f, (fMaxMip - 1.620000005f));\n\t(*outMipLevel) = mipLevel;\n\treturn;\n }\n \n",getTextureColorDecl="\n#ifdef Has_Texture\n var uTexture : texture_2d<f32>;\n var uTextureSampler : sampler;\n\n#ifdef MULTI_TEX\n var uSecTexture : texture_2d<f32>;\n var uSecTextureSampler : sampler;\n#endif\n#ifndef NO_TEXCOORD\nstruct TextureParam {\n uv : vec2<f32>,\n dim : vec2<f32>,\n translate : vec2<f32>,\n scale : vec2<f32>,\n uvOffset : vec4<f32>,\n maxMipmapLevel : f32,\n texCoordZ : f32,\n isRGBA : f32,\n}\nfn sampleLod(uv : vec2<f32>, mipLevel : f32, bUseFirstTexture : bool) -> vec4<f32> {\n var color = vec4<f32>(1.0f, 1.0f, 1.0f, 1.0f);\n if (bUseFirstTexture) {\n color = textureSampleLevel(uTexture, uTextureSampler, uv, mipLevel);\n }\n else\n {\n#ifdef MULTI_TEX\n color = textureSampleLevel(uSecTexture, uSecTextureSampler, uv, mipLevel);\n#endif\n }\n color = sRGBToLinear(color);\n return color;\n}\n\n #ifdef TextureBatch\n fn getBatchTextureColor(textureParam : TextureParam, bUseFirstTexture : bool) -> vec4<f32>\n {\n var uv = textureParam.uv;\n var dim = textureParam.dim;\n var translate = textureParam.translate;\n var scale = textureParam.scale;\n var uvOffset = textureParam.uvOffset;\n var maxMipmapLevel = textureParam.maxMipmapLevel;\n var mipLevel = 0.0;\n calculateMipLevel(uv, dim, maxMipmapLevel, &mipLevel);\n if(maxMipmapLevel < 0.0)\n {\n return vec4(1.0);\n }\n var texCoord = getBatchUV(uv, translate, scale, dim, ceil(mipLevel));\n var colorCeil = sampleLod(texCoord, 0.0, bUseFirstTexture);\n texCoord = getBatchUV(uv, translate, scale, dim, floor(mipLevel));\n var colorFloor = sampleLod(texCoord, 0.0, bUseFirstTexture);\n return colorCeil * 0.5 + colorFloor * 0.5;\n }\n #else\n fn getTextureColor(textureParam : TextureParam, outTexCoord : ptr<function, vec2<f32>>, bUseFirstTexture : bool) -> vec4<f32> {\n var dim = textureParam.dim;\n var maxMipmapLevel = textureParam.maxMipmapLevel;\n var mipLevel = 0.0f;\n calculateMipLevel(textureParam.uv, dim, maxMipmapLevel, &(mipLevel));\n *(outTexCoord) = getUV(textureParam.uv, textureParam.translate, textureParam.uvOffset, textureParam.scale.x, dim.x, mipLevel, textureParam.texCoordZ);\n var color = sampleLod(*(outTexCoord), mipLevel, bUseFirstTexture);\n return color;\n }\n #endif\n // end TextureBatch\n\n#endif\n\nfn SRGBtoLINEAR4(srgbIn : vec4<f32>) -> vec4<f32>\n{\n var linearOut = pow(srgbIn.rgb, vec3<f32>(2.2));\n return vec4<f32>(linearOut, srgbIn.a);\n}\n\nfn getTextureColorForS3M(outTexCoord : ptr<function, vec4<f32>>, firstColor : ptr<function, vec4<f32>>, secColor : ptr<function, vec4<f32>>) -> vec4<f32> {\n #ifdef INVALID_OBLIQUE\n return vec4<f32>(0.5, 0.5, 0.5, 1.0);\n #endif\n #ifdef NO_TEXCOORD\n return SRGBtoLINEAR4(textureSample(uTexture, uTextureSampler, vec2<f32>(0.5)));\n #endif\n #ifndef NO_TEXCOORD\n var textureParam : TextureParam;\n textureParam.uv = vec2<f32>(vTexCoord.x, vTexCoord.y);\n #ifdef TextureBatch\n textureParam.dim = vTexSize.xy;\n textureParam.translate = vTexTran.xy;\n textureParam.scale = vTexScale.xy;\n textureParam.uvOffset = Material.uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.x;\n *(firstColor) = getBatchTextureColor(textureParam, true);\n #else\n var texWidth : f32;\n texWidth = (vTexMatrix.z * Material.uTextureWidths.x); \n textureParam.dim = vec2<f32>(texWidth, texWidth); \n textureParam.translate = vec2<f32>(vTexMatrix.x, vTexMatrix.y); \n textureParam.scale = vec2<f32>(vTexMatrix.z, vTexMatrix.z); \n textureParam.uvOffset = Material.uTexUVOffset; \n textureParam.maxMipmapLevel = vTexMatrix.w; \n textureParam.texCoordZ = vTexCoordZ.x;\n var param_42 = vec2<f32>((*(outTexCoord)).x, (*(outTexCoord)).y); \n *(firstColor) = getTextureColor(textureParam, &(param_42), true);\n (*outTexCoord).x = param_42.x;\n (*outTexCoord).y = param_42.y;\n #endif\n\n #ifdef MULTI_TEX\n textureParam.uv = vTexCoord.zw;\n #ifdef TextureBatch\n textureParam.dim = vTexSize.zw;\n textureParam.translate = vTexTran.zw;\n textureParam.scale = vTexScale.zw;\n textureParam.uvOffset = Material.uTexUVOffset;\n textureParam.maxMipmapLevel = vMaxMipLevel.y;\n *(secColor) = getBatchTextureColor(textureParam, false);\n #else\n texWidth = vTexMatrix2.z * Material.uTextureWidths.y;\n textureParam.dim = vec2(texWidth, texWidth);\n textureParam.translate = vTexMatrix2.xy;\n textureParam.scale = vec2(vTexMatrix2.z, vTexMatrix2.z);\n textureParam.uvOffset = Material.uTexUVOffset;\n textureParam.maxMipmapLevel = vTexMatrix2.w;\n textureParam.texCoordZ = vTexCoordZ.y;\n param_42 = vec2<f32>((*(outTexCoord)).z, (*(outTexCoord)).w); \n *(secColor) = getTextureColor(textureParam, &(param_42), false);\n #endif\n return *(firstColor) * (*(secColor));\n #else\n return *(firstColor);\n #endif\n #endif\n}\n#endif\n",rainDecl="\n#ifdef HAS_RAIN\nvar uRippleTexture : texture_2d<f32>;\nvar uRippleTextureSampler : sampler;\n \nfn getTimeInfo(animationSpeed : f32, timeVec : ptr<function, vec2<f32>>)\n{\n\tvar time = Scene.uFrameNumber * animationSpeed;\n\ttime = floor(30.0 * time);\n\tvar time_diff = floor(time*0.25);\n\t//time = mod(time, 4.0);\n\ttime = (time - (4.0 * floor(time / 4.0)));\n\t//time_diff = mod(time_diff, 4.0);\n\ttime_diff = (time_diff - (4.0 * floor(time_diff / 4.0)));\n\t(*timeVec) = vec2<f32>(time, time_diff);\n}\n\nfn getPosInfo(posMC : vec4<f32>, posMC_frac1 : ptr<function, vec2<f32>>, posMC_frac2 : ptr<function, vec2<f32>>)\n{\n\tvar ripple_scale = 1.0 / Layer.uRippleScale;\n\tvar posXY = posMC.xy * ripple_scale;\n\t(*posMC_frac1) = fract(posXY);\n\tvar posStep = vec2<f32>(0.5);\n\t(*posMC_frac2) = fract(posXY + posStep);\n}\n\nfn getAlpha(posMC_frac1 : vec2<f32>) -> f32\n{\n\tvar dist = (posMC_frac1 - vec2<f32>(0.5)) * 2.0;\n\tdist = vec2<f32>(abs(dist.x), abs(dist.y));\n\tvar result = pow(dist, vec2<f32>(5.0));\n\treturn result.x + result.y;\n}\n\nfn getRippleValue(timeVec : vec2<f32>, posMC_frac1 : vec2<f32>, posMC_frac2 : vec2<f32>, alpha : f32) -> vec4<f32>\n{\n\tvar rippleUV_1 = (timeVec + posMC_frac1)*0.25;\n\tvar rippleUV_2 = (timeVec + posMC_frac2)*0.25;\n\tvar rippleValue_1 = textureSample(uRippleTexture, uRippleTextureSampler, rippleUV_1.xy);\n\tvar rippleValue_2 = textureSample(uRippleTexture, uRippleTextureSampler, rippleUV_2.xy);\n\treturn mix(rippleValue_1, rippleValue_2, alpha);\n}\n\nfn getRippleNormal(rippleValue : vec4<f32>, wind_intensity : f32, rain : f32, depthFade : f32) -> vec3<f32>\n{\n\tvar rippleValueXY = rippleValue.xy;\n\tvar rippleValueZW = rippleValue.zw;\n\tvar _value = vec2<f32>(0.5);\n\tvar part_1 = (rippleValueZW - _value) * wind_intensity * 0.13;\n\tvar part_2 = (rippleValueXY - _value) * 0.6;\n\tvar mergedValue = mix(part_1, part_2, rain) * depthFade;\n\treturn vec3<f32>(mergedValue, 1.0);\n}\n\nfn getNormalAlpha(normalWS : vec3<f32>, wetness : f32) -> f32\n{\n\tvar valueZ = normalWS.z - 0.5;\n\tvar wet_correction = wetness * clamp(valueZ * 2.5, 0.0, 1.0);\n\treturn pow(wet_correction, 15.0);\n}\n\nfn rippleNormalCorrection(rippleNormal : vec3<f32>, normalAlpha : f32) -> vec3<f32>\n{\n\tvar blueNormal = vec3<f32>(0.0, 0.0, 1.0);\n\treturn mix(blueNormal, rippleNormal, normalAlpha);\n}\n\nfn rippleGenerator(animationSpeed : f32,normalWS : vec3<f32>, wetness : f32) -> vec3<f32>\n{\n\tvar timeVec = vec2<f32>(1.0);\n\tgetTimeInfo(animationSpeed, &timeVec);\n\tvar posMC_frac1 = vec2(1.0);\n\tvar posMC_frac2 = vec2(1.0);\n\tgetPosInfo(vPositionMC, &posMC_frac1, &posMC_frac2);\n\tvar alpha = getAlpha(posMC_frac1);\n\tvar rippleValue = getRippleValue(timeVec, posMC_frac1, posMC_frac2, alpha);\n\tvar rippleNormal = getRippleNormal(rippleValue, Layer.uWindIntensity, Layer.uRain, Layer.uCameraDepth);\n\tvar normalAlpha = getNormalAlpha(normalWS, wetness);\n\treturn normalize(rippleNormalCorrection(rippleNormal, normalAlpha));\n}\n#endif\n",snowDecl="\n#ifdef HAS_SNOW\n\nvar uSnowMaskTexture : texture_2d<f32>;\nvar uSnowMaskTextureSampler : sampler;\n\nvar uSnowNormalTexture : texture_2d<f32>;\nvar uSnowNormalTextureSampler : sampler;\n\n// fn getSnowMaskValue(sampler2D uSnowMaskTexture, vec2 snowUV) -> vec3<f32>\n// {\n// \treturn textureSample(uSnowMaskTexture, uSnowMaskTextureSampler, snowUV).rgb;\n// }\n\nfn getSnowCoverage(snow_coverage : f32, max_snow_coverage : f32, normalWS : vec3<f32>, z_mask : f32) -> f32\n{\n\tvar normal_z = normalWS.z;\n\tnormal_z += 1.1 + z_mask;\n\tnormal_z = clamp(normal_z * 0.5, 0.0, 1.0);\n\tvar final_snow_coverage = clamp(snow_coverage, 0.0, max_snow_coverage);\n\tfinal_snow_coverage = clamp(final_snow_coverage*normal_z, 0.0, 1.0);\n\treturn final_snow_coverage;\n}\n\nfn getSnowCoverageWithMaskTexture(finalSnowCoverage : f32, heightValue : f32, snow_scatter_value : f32, snow_scatter_alpha : f32, tighten_value : f32) -> f32\n{\n\tvar scatter_value = mix(heightValue, snow_scatter_value, snow_scatter_alpha);\n\treturn clamp((tighten_value + 1.0) * finalSnowCoverage - tighten_value * scatter_value, 0.0, 1.0);\n}\n\nfn getSnowAlpha(normalWS : vec3<f32>, snow_coverage : f32, z_mask : f32) -> f32\n{\n\treturn clamp((normalWS.z + z_mask) * 5.0, 0.0, 1.0) * snow_coverage;\n}\n\nfn getFinalBaseColor(baseColor : vec3<f32>, snow_baseColor : vec3<f32>, snowAlpha : f32) -> vec3<f32>\n{\n\treturn mix(baseColor, snow_baseColor, snowAlpha);\n}\n\nfn getFinalRoughness(roughness : f32, snow_roughness : f32, snowAlpha : f32) -> f32\n{\n\treturn mix(roughness, snow_roughness, snowAlpha);\n}\n\nfn getFinalNormal(normalWS : vec3<f32>, snowNormal : vec3<f32>, blendNormalValue : f32, snow_coverage : f32) -> vec3<f32>\n{\n\tvar snowNormal_part2 = vec3<f32>(snowNormal.xy - vec2<f32>(0.5), 1.0);\n\tvar normal_alpha = (1.0 - blendNormalValue)* snow_coverage;\n\treturn mix(normalWS, snowNormal_part2, normal_alpha);\n}\n\nfn snowGenerator(snowUV : vec2<f32>, snow_coverage : f32, normalWS : ptr<function, vec3<f32>>, baseColor : ptr<function, vec3<f32>>, roughness : ptr<function, f32>)\n{\n\tvar snowMaskValue = textureSample(uSnowMaskTexture, uSnowMaskTextureSampler, snowUV).rgb;\n\tvar max_snow_coverage = 1.0;\n\tvar z_mask = 0.0;\n\tvar snowCoverage = getSnowCoverage(snow_coverage, max_snow_coverage, (*normalWS), z_mask);\n\tvar heightValue = 0.5;\n\tvar snow_scatter_value = snowMaskValue.g;\n\tvar snow_scatter_alpha = 0.5;\n\tvar tighten_value = 4.0;\n snowCoverage = getSnowCoverageWithMaskTexture(snowCoverage, heightValue, snow_scatter_value, snow_scatter_alpha, tighten_value);\n\tvar snow_alpha = getSnowAlpha((*normalWS), snowCoverage, z_mask);\n\t(*baseColor) = getFinalBaseColor((*baseColor), vec3(snowMaskValue.r), snow_alpha);\n\t(*roughness) = getFinalRoughness((*roughness), snowMaskValue.b, snow_alpha);\n\tvar snowNormalValue = textureSample(uSnowNormalTexture, uSnowNormalTextureSampler, snowUV).rgb;\n\tvar blendNormalValue = 0.3;\n\t(*normalWS) = getFinalNormal((*normalWS), snowNormalValue, blendNormalValue, snowCoverage);\n}\n\n#endif\n",directionLightDecl="\n#ifdef HAS_DIR_LIGHTS\n#endif\n",hemisphereLightDecl="\n#ifdef HAS_HEMISPHERE_LIGHTS\n\nuniform uSkyColor : array<vec3<f32>, HEMISPHERE_LIGHTS>;\nuniform uGroundColor : array<vec3<f32>, HEMISPHERE_LIGHTS>;\nuniform uHemisphereLightDirectionEC : array<vec3<f32>, HEMISPHERE_LIGHTS>;\n \nstruct HemisphereLight {\n direction : vec3<f32>;\n skyColor : vec3<f32>;\n groundColor : vec3<f32>;\n};\n\nfn getHemisphereLightIrradiance(hemiLight : HemisphereLight, geometry : GeometricContext) -> vec3<f32>{\n var dotNL = dot( geometry.normal, hemiLight.direction );\n var hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n var irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n}\n\n#endif\n",pointLightDecl="\n#ifdef HAS_POINT_LIGHTS\nstruct PointLight {\n position : vec3<f32>,\n color : vec3<f32>,\n distance : f32,\n decay : f32\n};\n\nfn getPointDirectLightIrradiance(pointLight : PointLight, geometry : GeometricContext, directLight : ptr<function,IncidentLight>) {\n var lVector = pointLight.position - geometry.position;\n (*(directLight)).direction = normalize( lVector );\n var lightDistance = length( lVector );\n (*(directLight)).color = pointLight.color;\n (*(directLight)).color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n var color = (*directLight).color;\n if(lightDistance < pointLight.distance){\n (*(directLight)).visible = true;\n }\n else{\n (*(directLight)).visible = false;\n }\n}\n\n#endif\n",spotLightDecl="\n#ifdef HAS_SPOT_LIGHTS\nstruct SpotLight {\n position : vec3<f32>;\n direction : vec3<f32>;\n color : vec3<f32>;\n distance : f32;\n decay : f32;\n coneCos : f32;\n penumbraCos : f32;\n};\n\nfn getSpotDirectLightIrradiance( spotLight : SpotLight, geometry : GeometricContext, directLight : ptr<function, IncidentLight>) {\n var lVector = spotLight.position - geometry.position;\n (*(directLight)).direction = normalize( lVector );\n var lightDistance = length( lVector );\n var angleCos = dot( directLight.direction, spotLight.direction );\n if ( angleCos > spotLight.coneCos ) {\n var spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n (*(directLight)).color = spotLight.color;\n (*(directLight)).color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n (*(directLight)).visible = true;\n } else {\n (*(directLight)).color = vec3<f32>( 0.0 );\n (*(directLight)).visible = false;\n }\n}\n\n#endif\n",lightSourceImpl="\n\nvar i= 0;\n#ifdef HAS_DIR_LIGHTS\nfor (i = 0; i < Light.uDirLightCount; i++) {\n directLight.color = Light.uDirectionalLightColor[i];\n directLight.direction = Light.uDirectionalLightDirectionEC[i];\n directLight.visible = true;\n directPhysical( directLight, geometry, material, &reflectedLight );\n}\n#endif\n\n#ifdef HAS_POINT_LIGHTS\nvar pointLight : PointLight;\nfor (i = 0; i < Light.uPointLightCount; i++) {\n pointLight.position = Light.uPointLightPositionEC[i];\n pointLight.color = Light.uPointLightColor[i];\n pointLight.distance = Light.uPointLightDistanceAndDecay[i].x;\n pointLight.decay = Light.uPointLightDistanceAndDecay[i].y;\n getPointDirectLightIrradiance( pointLight, geometry, &directLight );\n if(!directLight.visible) {\n continue;\n }\n directPhysical( directLight, geometry, material, &reflectedLight );\n}\n#endif\n\n#ifdef HAS_SPOT_LIGHTS\nvar spotLight : SpotLight;\nfor (i = 0; i < Light.uSpotLightCount; i++) {\n spotLight.position = Light.uSpotLightPositionEC[i];\n spotLight.color = Light.uSpotLightColorAndExponent[i].rgb;\n spotLight.direction = Light.uSpotLightDirectionEC[i];\n spotLight.coneCos = Light.uSpotLightDistanceDecayCosPenumbra[i].z;\n spotLight.penumbraCos = Light.uSpotLightDistanceDecayCosPenumbra[i].w;\n getSpotDirectLightIrradiance( spotLight, geometry, &directLight );\n if(!directLight.visible) {\n continue;\n }\n directPhysical( directLight, geometry, material, &reflectedLight );\n}\n#endif\n",brdf="\n const RECIPROCAL_PI = 0.31830988618;\n const M_PI = 3.141592653589793;\n const EPSILON = 1e-6;\n\n fn pow2( x : f32 ) -> f32 { return x * x; }\n\n#ifdef HAS_BASE_TEXTURE\n var uBaseTexture : texture_2d<f32>;\n var uBaseTextureSampler : sampler;\n#endif\n\n#ifdef HAS_NORMAL_TEXTURE\n var uNormalTexture : texture_2d<f32>;\n var uNormalTextureSampler : sampler;\n#endif // HAS_NORMAL_TEXTURE\n\n#ifdef HAS_EMISSIVE_TEXTURE\n var uEmissionTexture : texture_2d<f32>;\n var uEmissionTextureSampler : sampler;\n#endif\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n var uMetallicRoughnessTexture : texture_2d<f32>;\n var uMetallicRoughnessTextureSampler : sampler;\n#endif // HAS_MetallicRoughness_TEXTURE\n\n#ifdef HAS_OCCLUSION_TEXTURE\n var uOcclusionTexture : texture_2d<f32>;\n var uOcclusionTextureSampler : sampler;\n#endif\n\n#ifdef HAS_WETNESS\n uniform float uWetnessFactor;\n#endif\n\n#include <directionLightDecl>\n#include <pointLightDecl>\n#include <spotLightDecl>\n#include <snowDecl>\n#include <rainDecl>\n\nfn lambertianDiffuse(diffuseColor : vec3<f32>) -> vec3<f32>\n{\n return diffuseColor * RECIPROCAL_PI;\n}\n\nfn applyTonemapping(inLinearIn : vec3<f32>) -> vec3<f32> \n{\n var linearIn = inLinearIn;\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\n\nfn F_Schlick(f0 : vec3<f32>, f90 : f32, dotVH : f32) -> vec3<f32>\n {\n var fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\n\n\nfn GeometrySchlickGGX(roughness : f32, NoV : f32)->f32\n{\n var k = pow(roughness + 1.0, 2.0) / 8.0;\n return NoV / (NoV * (1.0 - k) + k);\n}\n\nfn D_GGX( alpha : f32, dotNH : f32 ) ->f32\n{\n var a2 = pow2( alpha );\n var denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n\nfn BRDF_GGX(lightDir : vec3<f32>, viewDir : vec3<f32>, normal : vec3<f32>, f0 : vec3<f32>, f90 : f32, roughness : f32 ) -> vec3<f32>\n{\n var alpha = roughness * roughness;\n var halfDir = normalize( lightDir + viewDir );\n var dotNL = clamp( dot( normal, lightDir ), 0.001, 1.0 );\n var dotNV = abs( dot( normal, viewDir ) ) + 0.001;\n var dotNH = saturate( dot( normal, halfDir ) );\n var dotLH = saturate( dot( lightDir, halfDir ) );\n var dotVH = saturate( dot( viewDir, halfDir ) );\n var F = F_Schlick( f0, f90, dotVH );\n var G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n var D = D_GGX( alpha, dotNH );\n return F * ( G * D ) / (4.0 * dotNL * dotNV);\n}\n\nfn directPhysical(directLight : IncidentLight, geometry : GeometricContext, material : PhysicalMaterial, reflectedLight : ptr<function, ReflectedLight> )\n {\n var dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n var irradiance = dotNL * directLight.color;\n (*(reflectedLight)).directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n (*(reflectedLight)).directDiffuse += irradiance * lambertianDiffuse( material.diffuseColor );\n}\n\n#ifdef HAS_NORMAL_TEXTURE\nfn perturbNormal2Arb( eye_pos : vec3<f32>, surf_norm : vec3<f32>, uv : vec2<f32>, mapN : vec3<f32>) -> vec3<f32>\n{\n var fNormalLength = length(mapN);\n var q0 = vec3<f32>( dpdx( eye_pos.x ), dpdx( eye_pos.y ), dpdx( eye_pos.z ) );\n var q1 = vec3<f32>( dpdy( eye_pos.x ), dpdy( eye_pos.y ), dpdy( eye_pos.z ) );\n var st0 = dpdx( uv.xy );\n var st1 = dpdy( uv.xy );\n if(fNormalLength < 0.5) {\n return surf_norm;\n }\n var scale = sign( st1.y * st0.x - st0.y * st1.x );\n var S = normalize( ( q0 * st1.y - q1 * st0.y ) * scale );\n var T = normalize( ( - q0 * st1.x + q1 * st0.x ) * scale );\n var N = normalize( surf_norm );\n var tsn = mat3x3<f32>( S, T, N );\n\n var tempN = mapN * 2.0 - 1.0;\n var flip = f32( gl_FrontFacing ) * 2.0 - 1.0;\n var normMapN = vec3(tempN.x * flip, tempN.y * flip, tempN.z);\n return normalize( tsn * normMapN );\n}\n#endif\n\nfn computeSpecularOcclusion(dotNV : f32, ambientOcclusion : f32, roughness : f32) -> f32\n{\n return saturate(pow(dotNV + ambientOcclusion, exp2(-16.0 * roughness - 1.0 )) - 1.0 + ambientOcclusion);\n}\n\n#ifdef HAS_RAIN\nfn adjustByWetness(baseColor : ptr<function, vec3<f32>>, roughness : ptr<function, f32>, normalWS_wetness : vec3<f32>) {\n var fWetness = clamp(Layer.uWetnessFactor,0.0,1.0);\n var fWetness_correction = pow(4.0*fWetness,2.0);\n fWetness_correction = clamp(fWetness_correction,clamp(fWetness,0.0,0.9),1.0);\n var fWerness_normalized = fWetness_correction * clamp(normalWS_wetness.z + 0.85,0.0,1.0);\n (*baseColor) = mix((*baseColor),(*baseColor)*0.7,fWerness_normalized);\n (*roughness) = mix((*roughness),0.05,fWerness_normalized);\n}\n#endif\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n#ifdef USE_BatchPBR\n varying vMetallicRoughness : vec2<f32>;\n varying vEmissiveFactor : vec4<f32>;\n varying vAlphaCutoffAndModeAndDoubleSide : vec3<f32>;\n#endif\n\n#ifdef PBR_THEME\n uniform uPBRMaterials : mat4x4<f32>[NUM_PBR_MATERIALS];\n varying vPBRIndex : f32;\n#endif\n\nfn getRoughness(oriTexCoord : vec2<f32>) -> f32{\n var roughness = Material.uMetallicRoughnessIntensityScale.y;\n#ifdef USE_BatchPBR\n roughness = vMetallicRoughness.y;\n#endif // USE_BatchPBR\n roughness = clamp(roughness, 0.0, 1.0);\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n var metallicRoughness = textureSample(uMetallicRoughnessTexture, uMetallicRoughnessTextureSampler, oriTexCoord.xy).rgb;\n roughness = clamp(roughness * metallicRoughness.g, 0.04f, 1.0f);\n #ifdef HAS_RAIN\n adjustByWetness(vec3<f32>(1.0), roughness, vec3<f32>(0.0));\n #endif\n#endif // HAS_MetallicRoughness_TEXTURE\n return roughness;\n}\n\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\nfn getTexcoordAndMipmapLevel(uv : vec2<f32>, texMatrix : vec4<f32>, texCoordZ : f32) -> vec3<f32> {\n var translate = texMatrix.xy;\n var textureWidth = texMatrix.z * Material.uPbrParTextureWidth;\n var scale = texMatrix.z;\n var maxMipmapLevel = texMatrix.w;\n var mipLevel = 0.0;\n calculateMipLevel(uv, vec2(textureWidth), maxMipmapLevel, &mipLevel);\n var texCoord : vec2<f32>;\n if(texCoordZ < -9000.0)\n {\n texCoord = vec2(uv.x, uv.y);\n }\n else\n {\n texCoord = fract(uv);\n var offset = pow(2.0, mipLevel) / textureWidth;\n texCoord = clamp(texCoord, vec2(offset), vec2(1.0 - offset));\n texCoord.x = (texCoord.x + translate.x) * scale;\n texCoord.y = (texCoord.y + translate.y) * scale;\n }\n \n return vec3<f32>(texCoord.xy, mipLevel);\n}\n#endif\n\nfn brdf(inBaseColorWithAlpha : vec4<f32>, texCoord : vec2<f32>, oriTexCoord : vec2<f32>, posEC : vec3<f32>, posMC : vec4<f32>, vertexNormalEC : vec3<f32>) ->vec4<f32> {\n var uv = oriTexCoord;\n var mipmapLevel = 0.0;\n#if defined(USE_BatchPBR) && defined(COMPUTE_TEXCOORD)\n var uvAndMiplevel = getTexcoordAndMipmapLevel(oriTexCoord, vTexMatrix, vTexCoordZ.x);\n uv = uvAndMiplevel.xy;\n mipmapLevel = uvAndMiplevel.z;\n #endif\n\n var baseColorWithAlpha = inBaseColorWithAlpha;\n#ifndef USE_BatchPBR\n baseColorWithAlpha = baseColorWithAlpha * Material.uBaseColorFactor;\n#endif\n\n var faceDirection : f32;\n if(gl_FrontFacing){\n faceDirection = 1.0;\n } \n else {\n faceDirection = -1.0;\n }\n\n var ng : vec3<f32> = normalize(vertexNormalEC);\n #ifndef HAS_NORMAL\n ng = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(posMC.xyz));\n #endif\n \n ng = ng * faceDirection;\n#ifdef HAS_BASE_TEXTURE\n #ifdef USE_BatchPBR\n baseColorWithAlpha *= sRGBToLinear(textureSampleLevel(uBaseTexture, uBaseTextureSampler, uv.xy, mipmapLevel));\n #else\n baseColorWithAlpha = textureSample(uBaseTexture, uBaseTextureSampler, oriTexCoord.xy);\n baseColorWithAlpha = sRGBToLinear(baseColorWithAlpha) * Material.uBaseColorFactor;\n #endif\n#endif\n#ifdef HAS_NORMAL_TEXTURE\n #ifdef USE_BatchPBR\n var mapN = textureSampleLevel(uNormalTexture, uNormalTextureSampler, uv.xy, mipmapLevel).xyz;\n #else\n var mapN = textureSample(uNormalTexture, uNormalTextureSampler, uv).xyz;\n #endif\n var n = ng;\n var oriNg = perturbNormal2Arb(posEC, ng, oriTexCoord, mapN);\n if(!(oriTexCoord.x == 0.0 && oriTexCoord.y == 0.0)){\n var n = oriNg;\n }\n#else\n var n = ng;\n#endif\n\n#ifdef HAS_WETNESS\n var fixedToENU_wetness = mat3x3<f32>(czm_modelView[0][0], czm_modelView[1][0], czm_modelView[2][0], czm_modelView[0][1], czm_modelView[1][1], czm_modelView[2][1], czm_modelView[0][2], czm_modelView[1][2], czm_modelView[2][2]);\n var normalWS_wetness = normalize(fixedToENU_wetness * n);\n#endif\n#ifdef HAS_RAIN\n var modelView = Scene.uView * Mesh.uModelMatrix;\n var fixedToENU_wetness = mat3x3<f32>(modelView[0][0], modelView[1][0], modelView[2][0], modelView[0][1], modelView[1][1], modelView[2][1], modelView[0][2], modelView[1][2], modelView[2][2]);\n var normalWS_wetness = normalize(fixedToENU_wetness * n);\n n = rippleGenerator(Layer.uAnimationSpeed,normalWS_wetness,Layer.uWetnessFactor);\n#endif\n\n var baseColor = baseColorWithAlpha.rgb;\n var roughness = Material.uMetallicRoughnessIntensityScale.y;\n var metalness = Material.uMetallicRoughnessIntensityScale.x;\n var emissiveFactor = Material.uEmissiveFactor;\n\n // TODO\n// #ifdef PBR_THEME\n// var pbrIndex = int(vPBRIndex);\n// if(vPBRIndex < 0.0f)\n// {\n// return baseColorWithAlpha;\n// }\n// var pbrPar = mat4x4<f32>(0.0f);\n// for(var i = 0;i < NUM_PBR_MATERIALS;i++)\n// {\n// if(i == pbrIndex)\n// {\n// pbrPar = uPBRMaterials[i];\n// break;\n// }\n// }\n// roughness = clamp(pbrPar[0][0], 0.04f, 1.0f);\n// metalness = clamp(pbrPar[0][1], 0.0f, 1.0f);\n// baseColor = (baseColorWithAlpha / Material.uBaseColorFactor * vec4<f32>(pbrPar[0][2], pbrPar[0][3], pbrPar[1][0], pbrPar[1][1])).rgb;\n// #endif // PBR_THEME\n\n#ifdef USE_BatchPBR\n metalness = vMetallicRoughness.x;\n roughness = vMetallicRoughness.y;\n emissiveFactor = vEmissiveFactor;\n#endif // USE_BatchPBR\n metalness = clamp(metalness, 0.0, 1.0);\n roughness = clamp(roughness, 0.04, 1.0);\n\n#ifdef HAS_MetallicRoughness_TEXTURE\n#ifdef USE_BatchPBR\n var metallicRoughness = textureSampleLevel(uMetallicRoughnessTexture, uMetallicRoughnessTextureSampler, uv, mipmapLevel).rgb;\n#else\n var metallicRoughness = textureSample(uMetallicRoughnessTexture, uMetallicRoughnessTextureSampler, oriTexCoord.xy).rgb;\n#endif\n metalness = clamp(metallicRoughness.r, 0.0f, 1.0f);\n roughness = clamp(metallicRoughness.g, 0.04f, 1.0f);\n #ifdef HAS_RAIN\n adjustByWetness(&baseColor, &roughness, normalWS_wetness);\n #endif\n #ifdef HAS_SNOW\n var modelView = Scene.uView * Mesh.uModelMatrix;\n var fixedToENU_snow = mat3x3<f32>(modelView[0][0], modelView[1][0], modelView[2][0], modelView[0][1], modelView[1][1], modelView[2][1], modelView[0][2], modelView[1][2], modelView[2][2]);\n var normalWS_snow = normalize(fixedToENU_snow * n);\n snowGenerator(oriTexCoord,Layer.uSnowCoverageFactor,&normalWS_snow,&baseColor,&roughness);\n #endif\n#endif // HAS_MetallicRoughness_TEXTURE\n\n var lightColorHdr = vec3<f32>(2.0) * Light.uSunLightColor.rgb * Light.uSunLightON;\n var l = normalize(Light.uSunDirectionEC);\n var v = -normalize(posEC);\n var h = normalize(v + l);\n var f0 = vec3<f32>(0.04);\n var diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n var specularColor = mix(f0, baseColor, metalness);\n\n var alpha = roughness * roughness;\n var dotNL = clamp( dot( n, l ), 0.001, 1.0 );\n var dotNV = abs( dot( n, v ) ) + 0.001;\n var dotNH = saturate( dot( n, h ) );\n var dotLH = saturate( dot( l, h ) );\n var dotVH = saturate( dot( v, h ) );\n var reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n var f90 = clamp(reflectance * 25.0, 0.0, 1.0);\n var F = F_Schlick( specularColor, f90, dotVH );\n var G = GeometrySchlickGGX(alpha, dotNV) * GeometrySchlickGGX(alpha, dotNL);\n var D = D_GGX( alpha, dotNH );\n var diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n var specularContribution = F * G * D / (4.0 * dotNL * dotNV);\n\n var geometryNormal = ng;\n var material : PhysicalMaterial;\n material.diffuseColor = diffuseColor;\n material.roughness = max( roughness, 0.0525 );\n material.roughness = min( material.roughness, 1.0 );\n material.specularColor = specularColor;\n material.specularF90 = 1.0;\n\n var geometry : GeometricContext;\n geometry.position = posEC;\n geometry.normal = n;\n geometry.viewDir = v;\n var reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n reflectedLight.directDiffuse += dotNL * lightColorHdr * diffuseContribution;\n reflectedLight.directSpecular += dotNL * lightColorHdr * specularContribution;\n\n var directLight : IncidentLight; \n #include <lightSourceImpl>\n\n getEnvironmentColor(geometry, material, &reflectedLight);\n\n#ifdef HAS_OCCLUSION_TEXTURE\n #ifdef USE_BatchPBR\n var ambientOcclusion = textureSampleLevel(uOcclusionTexture, uOcclusionTextureSampler, uv, mipmapLevel).r;\n #else\n var ambientOcclusion = textureSample(uOcclusionTexture, uOcclusionTextureSampler, oriTexCoord.xy).r;\n #endif\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n#ifdef IBL\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n#endif\n#endif // HAS_OCCLUSION_TEXTURE\n\n var shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), n, -posEC.z);\n#endif\n\n var color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n\n#ifdef HAS_EMISSIVE_TEXTURE\n var emissiveTexCoord = uv * Material.uEmissiveUVOffsetAndTiling.zw + Material.uEmissiveUVOffsetAndTiling.xy;\n var emissive = sRGBToLinear_vf3(textureSample(uEmissionTexture, uEmissionTextureSampler, emissiveTexCoord).rgb);\n emissive *= emissiveFactor.rgb;\n color += emissive;\n#else\n color += emissiveFactor.rgb;\n#endif // HAS_EMISSIVE_TEXTURE\n\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n\n #ifdef MASK\n if (baseColorWithAlpha.a < Material.uAlphaCutoff)\n {\n discard;\n }\n#endif\n return vec4(color.rgb, baseColorWithAlpha.a);\n}",S3MVertexFactory="\n\n#ifdef COMPRESS_VERTEX\n #ifdef DRACO_Compress\n attribute aPosition : vec4<u32>;\n #else\n attribute aPosition : vec4<i32>;\n #endif\n#else\n attribute aPosition : vec4<f32>;\n#endif\n\n#ifdef HAS_NORMAL\n #ifdef COMPRESS_NORMAL \n #ifdef MeshOPT_Compress\n attribute aNormal : vec2<i32>;\n #else\n attribute aNormal : vec3<i32>;\n #endif\n #else\n attribute aNormal : vec3<f32>;\n #endif\n#endif\n\n#ifdef TexCoord\n #ifdef UINT_TEXCOORD0\n attribute aTexCoord0 : vec2<i32>;\n #else\n attribute aTexCoord0 : vec4<f32>;\n #endif\n#endif\n\n#ifdef TexCoord2\n #ifdef USE_BatchPBR\n attribute aTexCoord1 : vec2<f32>;\n #else\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n attribute aTexCoord1 : vec2<i32>;\n #else\n attribute aTexCoord1 : vec2<f32>;\n #endif\n #else\n attribute aTexCoord1 : vec4<f32>;\n #endif //COMPRESS_TEXCOORD\n #endif //USE_BatchPBR\n#endif\n\n#ifdef VertexColor\n attribute aColor : vec4<u32>;\n#endif\n\n#ifdef InstanceRenderBIM\n attribute uv2 : vec4<f32>;\n attribute uv3 : vec4<f32>;\n attribute uv4 : vec4<f32>;\n attribute secondary_colour : vec4<f32>;\n //attribute uv6 : vec4<u32>;\n#endif\n\n#ifdef InstanceRenderPipeline\n attribute uv1 : vec4<f32>;\n attribute uv2 : vec4<f32>;\n attribute uv3 : vec4<f32>;\n attribute uv4 : vec4<f32>;\n attribute uv5 : vec4<f32>;\n attribute uv6 : vec4<f32>;\n attribute uv7 : vec4<f32>;\n // 新版本的管线\n #ifdef InstanceS3MB\n attribute secondary_colour : vec4<u32>;\n attribute uv9 : vec4<u32>;\n #else\n attribute secondary_colour : vec4<f32>;\n attribute uv9 : vec4<f32>;\n #endif\n#endif\n\n#ifdef BatchTable\n #ifdef Instance\n #ifdef InstanceModel\n attribute batchId : f32;\n #endif\n attribute instanceId : f32;\n #else\n attribute batchId : f32;\n #endif\n#endif // BatchTable\n\n#ifdef UseInstanceSkeletonMatrix\n //uniform uSkeletonMatrix : mat4x4<f32>;\n#endif\n\nstruct VertexFactoryIntermediates {\n position : vec4<f32>,\n vertexColor : vec4<f32>,\n secondColor : vec4<f32>,\n normal : vec3<f32>,\n normalInstance : vec3<f32>,\n uv0 : vec4<f32>,\n uv1 : vec4<f32>,\n batchTableID : f32,\n pbrTextureUV : vec2<f32>,\n }\n\nfn GetLocalPosition() -> vec4<f32>{\n#ifdef COMPRESS_VERTEX\n var iAPosition = vec4<f32>(aPosition);\n var vertexPos : vec4<f32>;\n vertexPos = Mesh.decode_position_min + vec4<f32>(iAPosition.xyz, 1.0f) * Mesh.decode_position_normConstant;\n#else\n var vertexPos = aPosition;\n#endif\n return vertexPos;\n}\n\nfn GetUV0() ->vec4<f32> {\n var result = vec4<f32>(0.0f);\n#ifdef TexCoord\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n var texCoord0 : vec2<f32>;\n texCoord0.x = f32(aTexCoord0.x) * f32(Mesh.decode_texCoord0_vNormConstant.x);\n texCoord0.y = f32(aTexCoord0.y) * f32(Mesh.decode_texCoord0_vNormConstant.y);\n result = vec4<f32>(vec2<f32>(Mesh.decode_texCoord0_min) + texCoord0.xy, 0.0f, 0.0f);\n #else\n result.xy = vec2<f32>(Mesh.decode_texCoord0_min.xy) + vec2<f32>(aTexCoord0.xy) * Mesh.decode_texCoord0_normConstant;\n #endif\n #else // COMPRESS_TEXCOORD\n result = aTexCoord0;\n #endif // COMPRESS_TEXCOORD\n \n #ifdef InstanceRenderPipeline\n var tex4Vec:vec4<f32>;\n if(aTexCoord0.y > 0.5) {\n tex4Vec = vec4<f32>(uv7.y, aTexCoord0.x, 0.0, 1.0);\n }\n else {\n tex4Vec = vec4<f32>(uv7.x, aTexCoord0.x, 0.0, 1.0);\n }\n result.x = tex4Vec.x;\n result.y = tex4Vec.y;\n #endif\n#endif // TexCoord\n\n return Material.uTexMatrix * result;\n}\nfn GetUV1() ->vec4<f32>{\n var result = vec4<f32>(0.0f);\n#ifdef TexCoord2\n #ifdef USE_BatchPBR\n result.x = aTexCoord1.x;\n result.y = aTexCoord1.y;\n #else\n #ifdef COMPRESS_TEXCOORD\n #ifdef MeshOPT_Compress\n var texCoord1 :vec2<f32>;\n texCoord1.x = f32(aTexCoord1.x) * Mesh.decode_texCoord1_vNormConstant.x;\n texCoord1.y = f32(aTexCoord1.y) * Mesh.decode_texCoord1_vNormConstant.y;\n result = vec4<f32>(Mesh.decode_texCoord1_min + texCoord1.xy, 0.0f, 0.0f);\n #else\n result.x = Mesh.decode_texCoord1_min.x + aTexCoord1.x * Mesh.decode_texCoord1_normConstant.x;\n result.y = Mesh.decode_texCoord1_min.y + aTexCoord1.y * Mesh.decode_texCoord1_normConstant.y;\n #endif // MeshOPT_Compress\n #else\n result = aTexCoord1;\n #endif // COMPRESS_TEXCOORD\n #endif\n#endif // TexCoord2\n return result;\n}\nfn GetNormal() ->vec3<f32> {\n#ifdef HAS_NORMAL\n var realNormal : vec3<f32>;\n #ifdef COMPRESS_NORMAL\n var fANormal = vec2<f32>(aNormal.xy);\n #ifdef MeshOPT_Compress\n realNormal.x = fANormal.x / 127.0f;\n realNormal.y = fANormal.y / 127.0f;\n realNormal.z = 1.0f - abs(realNormal.x) - abs(realNormal.y);\n realNormal = normalize(realNormal);\n #else\n realNormal = czm_octDecode(fANormal.xy, Mesh.normal_rangeConstant).zxy;\n #endif // MeshOPT_Compress\n #else\n realNormal = aNormal;\n #endif // COMPRESS_NORMAL \n \n #ifdef InstanceRenderPipeline\n realNormal.x = realNormal.x * uv7.z;\n #endif\n return realNormal;\n#else\n return vec3<f32>(0.0f, 0.0f, 0.0f);\n#endif // HAS_NORMAL \n}\n\nfn GetVertexFactoryIntermediates() -> VertexFactoryIntermediates {\n var intermediates : VertexFactoryIntermediates;\n var vertexPos = GetLocalPosition();\n\n#ifdef UseInstanceSkeletonMatrix\n vertexPos = Mesh.uSkeletonMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n \n#ifdef InstanceRenderBIM\n var worldMatrix:mat4x4<f32>;\n worldMatrix[0] = uv2;\n worldMatrix[1] = uv3;\n worldMatrix[2] = uv4;\n worldMatrix[3] = vec4( 0, 0, 0, 1 );\n vertexPos = vec4(vertexPos.xyz, 1.0) * worldMatrix;\n#endif\n\n#ifdef InstanceRenderPipeline\n var worldMatrix:mat4x4<f32>;\n var worldMatrix0:mat4x4<f32>;\n var worldMatrix1:mat4x4<f32>;\n var worldPos0:vec4<f32>;\n var worldPos1:vec4<f32>;\n worldMatrix0[0] = uv1;\n worldMatrix0[1] = uv2;\n worldMatrix0[2] = uv3;\n worldMatrix0[3] = vec4<f32>( 0, 0, 0, 1 );\n worldMatrix1[0] = uv4;\n worldMatrix1[1] = uv5;\n worldMatrix1[2] = uv6;\n worldMatrix1[3] = vec4<f32>( 0, 0, 0, 1 );\n var realVertex = vec4<f32>(vertexPos.xyz, 1.0);\n realVertex.x = realVertex.x * uv7.z;\n worldPos0 = realVertex * worldMatrix0;\n worldPos1 = realVertex * worldMatrix1;\n #ifdef TexCoord\n if(aTexCoord0.y > 0.5) {\n vertexPos = worldPos1;\n worldMatrix = worldMatrix1;\n }\n else {\n vertexPos = worldPos0;\n worldMatrix = worldMatrix0;\n }\n #endif\n#endif\n\n intermediates.position = vertexPos;\n intermediates.normal = GetNormal();\n#ifdef Instance\n intermediates.normalInstance = intermediates.normal * mat3x3<f32>(worldMatrix[0].xyz,worldMatrix[1].xyz,worldMatrix[2].xyz);\n#endif\n intermediates.uv0 = GetUV0();\n intermediates.uv1 = GetUV1();\n \n#ifdef VertexColor\n var fColor = vec4<f32>(aColor);\n intermediates.vertexColor = vec4<f32>(fColor.r / 255.0f, fColor.g / 255.0f, fColor.b / 255.0f, fColor.a / 255.0f);\n#else\n intermediates.vertexColor = vec4<f32>(1.0);\n#endif\n\n#ifdef Instance\n #ifdef InstanceRenderPipeline\n #ifdef InstanceS3MB\n var fSecondary = vec4<f32>(secondary_colour);\n intermediates.vertexColor *= vec4<f32>(fSecondary.r / 255.0f, fSecondary.g / 255.0f, fSecondary.b / 255.0f, fSecondary.a / 255.0f);\n #else\n intermediates.vertexColor *= vec4<f32>(secondary_colour);\n #endif\n #else\n intermediates.vertexColor *= vec4<f32>(secondary_colour);\n #endif\n#endif\n\n#ifdef BatchTable\n #ifdef Instance\n var index = instanceId;\n #else\n var index = batchId;\n #endif\n \n #ifdef InstanceModel\n index = instanceId * Mesh.uSkeletonCount + batchId;\n #endif\n intermediates.batchTableID = index;\n#endif\n\n#ifdef USE_BatchPBR\n intermediates.pbrTextureUV.x = f32(aTexCoord1.x);\n intermediates.pbrTextureUV.y = f32(aTexCoord1.y);\n#endif\n return intermediates;\n}\n",getUVMatrixDecl="\n#ifdef TexCoord\n varying vTexCoordZ : vec2<f32>;\n#endif\n\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef USE_TextureCoordMatrix\n attribute aTextureCoordMatrix : vec2<f32>;\n#endif\n\n#ifdef TextureBatch\n #ifdef MULTI_TEX\n attribute aTextureBatchId : vec2<f32>;\n\n fn getTextureBatchId0(att : vec2<f32>) -> f32\n {\n return att.x;\n }\n fn getTextureBatchId1(att : vec2<f32>) ->f32 \n {\n return att.y;\n }\n #else\n attribute aTextureBatchId : f32;\n\n fn getTextureBatchId0(att : f32) -> f32\n {\n return att;\n }\n #endif // MULTI_TEX \n varying vTexTran : vec4<f32>;\n varying vTexScale : vec4<f32>;\n varying vTexSize : vec4<f32>;\n varying vMaxMipLevel : vec2<f32>;\n fn getTextureParameter(xywh : vec4<f32>, textureDim : vec2<f32>, translate : ptr<function, vec2<f32>>, scale : ptr<function, vec2<f32>>, texSize : ptr<function, vec2<f32>>, \n maxMipLevel : ptr<function, f32>)\n {\n var width = xywh.z;\n var height = xywh.w;\n width *= 2.0 / 3.0;\n (*maxMipLevel) = log2(min(width, height));\n var tempScale : vec2<f32>;\n tempScale.x = width / textureDim.x;\n tempScale.y = height / textureDim.y;\n (*scale) = tempScale;\n var tempTranslate : vec2<f32>;\n tempTranslate.x = xywh.x;\n tempTranslate.y = xywh.y;\n tempTranslate /= textureDim;\n (*translate) = tempTranslate;\n var tempTexSize : vec2<f32>;\n tempTexSize.x = width;\n tempTexSize.y = height;\n (*texSize) = tempTexSize;\n }\n \n fn getUVMatrixForBatch(xywh : vec4<f32>, xywh2 : vec4<f32>) {\n if(getTextureBatchId0(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.x = -1.0;\n }\n else\n {\n var outTexTran = vec2(vTexTran.xy);\n var outTexScale = vec2(vTexScale.xy);\n var outTexSize = vec2(vTexSize.xy);\n var outMaxMipLevel = vMaxMipLevel.x;\n getTextureParameter(xywh, Material.uTextureDim.xy, &outTexTran, &outTexScale, &outTexSize, &outMaxMipLevel);\n vTexTran = vec4(outTexTran.x, outTexTran.y, vTexTran.z, vTexTran.w);\n vTexScale = vec4(outTexScale.x, outTexScale.y, vTexScale.z, vTexScale.w);\n vTexSize = vec4(outTexSize.x, outTexSize.y, vTexSize.z, vTexSize.w);\n vMaxMipLevel.x = outMaxMipLevel;\n\n }\n #ifdef MULTI_TEX\n if(getTextureBatchId0(aTextureBatchId) < 0.0)\n {\n vMaxMipLevel.y = -1.0;\n }\n else\n {\n var outTexTran = vec2(vTexTran.zw);\n var outTexScale = vec2(vTexScale.zw);\n var outTexSize = vec2(vTexSize.zw);\n var outMaxMipLevel = vMaxMipLevel.y;\n getTextureParameter(xywh2, Material.uTextureDim.zw, &outTexTran, &outTexScale, &outTexSize, &outMaxMipLevel);\n vTexTran = vec4(vTexTran.x, vTexTran.y, outTexTran.x, outTexTran.y);\n vTexScale = vec4(vTexScale.x, vTexScale.y, outTexScale.x, outTexScale.y);\n vTexSize = vec4(vTexSize.x, vTexSize.y, outTexSize.x, outTexSize.y);\n vMaxMipLevel.y = outMaxMipLevel;\n }\n #endif // MULTI_TEX \n }\n#else\n varying vTexMatrix : vec4<f32>;\n\n #ifdef TexCoord2\n varying vTexMatrix2 : vec4<f32>;\n #endif // TexCoord2\n \nconst SHIFT_LEFT8 : i32 = 256;\n\nfn computeUVMatrixFromZValue(nZ : i32, XTran : ptr<function, f32>, YTran : ptr<function, f32>, scale : ptr<function, f32>, isRGBA : ptr<function, f32>) {\n var nDel8 : i32;\n var nDel16 : i32;\n var nLevel : i32;\n if (nZ < i32(0)) {\n return;\n }\n nDel8 = nZ / SHIFT_LEFT8;\n nDel16 = nDel8 / SHIFT_LEFT8;\n *(YTran) = f32(nZ - nDel8 * SHIFT_LEFT8);\n *(XTran) = f32(nDel8 - nDel16 * SHIFT_LEFT8);\n nLevel = nDel16;\n *(scale) = 1.0 / pow(2.0, f32(nLevel));\n}\n\nfn getUVMatrix(uv0 : vec4<f32>, uv1 : vec4<f32>) { \n var param_1 : f32; \n var param_2 : f32; \n var param_3 : f32; \n var param_4 : f32;\n vTexCoordZ.x = uv0.z;\n\n#ifdef USE_TextureCoordMatrix\n vTexCoordZ.x = aTextureCoordMatrix.x;\n#endif // USE_TextureCoordMatrix\n\n vTexMatrix = vec4<f32>(0.0f, 0.0f, 1.0f, 0.0f); \n if ((vTexCoordZ.x < -90000.0f)) \n { \n vTexMatrix.z = -1.0f; \n } \n param_1 = vTexMatrix.x; \n param_2 = vTexMatrix.y; \n param_3 = vTexMatrix.z; \n computeUVMatrixFromZValue(i32(round(vTexCoordZ.x)), ¶m_1, ¶m_2, ¶m_3, ¶m_4); \n vTexMatrix.x = param_1; \n vTexMatrix.y = param_2; \n vTexMatrix.z = param_3;\n#ifdef TexCoord2\n vTexMatrix2 = vec4(0.0,0.0,1.0,0.0);\n vTexCoordZ.y = uv1.z;\n #ifdef USE_TextureCoordMatrix\n vTexCoordZ.y = aTextureCoordMatrix.y;\n #endif // USE_TextureCoordMatrix\n param_1 = vTexMatrix2.x; \n param_2 = vTexMatrix2.y; \n param_3 = vTexMatrix2.z; \n computeUVMatrixFromZValue(i32(round(vTexCoordZ.y)), &(param_1), &(param_2), &(param_3), &(param_4));\n vTexMatrix2.x = param_1; \n vTexMatrix2.y = param_2; \n vTexMatrix2.z = param_3;\n#endif // TexCoord2\n vTexMatrix.w = log2((Material.uTextureWidths.x * vTexMatrix.z));\n#ifdef TexCoord2\n vTexMatrix2.w = log2(Material.uTextureWidths.y * vTexMatrix.z);\n#endif // TexCoord2\n return;\n} \n \n#endif\n\n#endif // COMPUTE_TEXCOORD\n",S3MOperationFSDecl="\n#ifdef VISIBLEDISTANCEMAX\nuniform float uVisibleDistanceMax;\nvoid getAlphaByDistance(vec3 positionEC, inout vec4 color) {\n if(length(positionEC) > uVisibleDistanceMax)\n {\n float minAlpha = min(1.0, (length(positionEC) - uVisibleDistanceMax) / 2000.0);\n color.a = 1.0 - minAlpha;\n }\n}\n#endif\n\n#ifdef OVERLAY\nvar uOverlayTexture : texture_2d<f32>;\nvar uOverlayTextureSampler : sampler;\nfn getOverlayColor(color : ptr<function, vec4<f32>>)\n{\n var ptInRect = 1.0;\n var vertexPos = Mesh.uGeoMatrix * vec4(vPositionMC.xyz, 1.0);\n var uv = calculatePolyTexCoord(vertexPos, Layer.uOverlayRect, &ptInRect);\n if(ptInRect > 0.5)\n {\n var oldColor = vec4((*color).r, (*color).g, (*color).b, (*color).a);\n var overlayColor = textureSampleLevel(uOverlayTexture, uOverlayTextureSampler, uv.xy, 0.0);\n if(!(overlayColor.r > 0.999 && overlayColor.g > 0.999 && overlayColor.b > 0.999) && !(overlayColor.r < 0.001 && overlayColor.g < 0.001 && overlayColor.b < 0.001))\n {\n var mixColor = mix(oldColor, overlayColor, overlayColor.a);\n (*color) = vec4<f32>(mixColor.r, mixColor.g, mixColor.b, oldColor.a);\n }\n }\n \n}\n#endif\n\n#ifdef HORIZONTAL_LINE\nuniform float uHorizontalLine;\nuniform vec4 uHorizontalColor;\nfloat computeContourline(float fValue)\n{\n\tfloat distanceToContour = uHorizontalLine;\n\tfloat dxc = abs(dFdx(fValue));\n\tfloat dyc = abs(dFdy(fValue));\n\tfloat dF = max(dxc, dyc);\n\treturn (abs(distanceToContour-fValue) < dF) ? 1.0 : 0.0;\n}\n\nvec4 getHorizontalColor(vec4 oriColor, float fValue)\n{\n float finalOpacity = computeContourline(fValue);\n return mix(oriColor,uHorizontalColor, finalOpacity);\n}\n#endif\n\n#ifdef IMAGERY\nvarying imgCoord : vec2<f32>;\n//uniform sampler2D uImgTexture;\n//uniform float uImgTextureAlpha;\n//uniform vec2 uImgTextureBound;\n//#if TEXTURE_UNITS > 0\nvar u_dayTextures : array<texture_2d<f32>, TEXTURE_UNITS>;\nvar u_dayTexturesSampler : sampler;\nuniform u_dayTextureTranslationAndScale : array<vec4<f32>, TEXTURE_UNITS>;\nuniform u_dayTextureSize : array<vec4<f32>, TEXTURE_UNITS>;\nuniform u_dayTextureUseWebMercatorT : array<u32, TEXTURE_UNITS>;\nuniform u_dayTextureFlipY : array<u32, TEXTURE_UNITS>;\n//过滤颜色,rgb代表过滤的颜色,a表示Tolerance\nuniform u_transparentBackColor : array<vec4<f32>, TEXTURE_UNITS>;\nuniform u_imageryClipEnable : array<u32, TEXTURE_UNITS>;\n\n#ifdef APPLY_ALPHA\nuniform u_dayTextureAlpha : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_SPLIT\nuniform u_dayTextureSplit : array<vec2<f32>, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_SWIPE\nuniform u_dayTextureSwipeRegion : array<vec4<f32>, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_GLOBESPLIT\nuniform u_GlobeSplitDirection : vec2<f32>;\n#endif\n\n#ifdef APPLY_GLOBESWIPE\nuniform u_GlobeSwipeRegion : vec4<f32>;\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform u_dayTextureBrightness : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform u_dayTextureContrast : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_HUE\nuniform u_dayTextureHue : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_SATURATION\nuniform u_dayTextureSaturation : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_GAMMA\nuniform u_dayTextureOneOverGamma : array<f32, TEXTURE_UNITS>;\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform u_dayTextureCutoutRectangles : array<vec4<f32>, TEXTURE_UNITS>;\n#endif\n\nuniform u_dayTextureTexCoordsRectangle : array<vec4<f32>, TEXTURE_UNITS>;\n//#endif\n\nfn getImageryColor(color : ptr<function, vec4<f32>>)\n{\n\tvar texcood = vec2<f32>(imgCoord.x / Mesh.uImgTextureBound.x, imgCoord.y / Mesh.uImgTextureBound.y);\n#ifdef MULTIBATCH\n\t(*color) = computeDayColor(vec4<f32>(1.0,1.0,1.0,0.0), clamp(vec3<f32>(texcood,0.0), vec3<f32>(0.0), vec3<f32>(1.0)));\n#else\n\t(*color) = computeDayColor((*color), clamp(vec3<f32>(texcood, 0.0), vec3<f32>(0.0), vec3<f32>(1.0)));\n#endif\n}\n#endif\n\n#ifdef FLOOD_ANALYSIS\nuniform sampler2D uFloodFlagTexture;\nuniform vec4 uFloodRect;\nvarying vec4 vFloodPos;\nvoid getFloodWaterColor(inout vec4 color)\n{\n float width = uFloodRect.z - uFloodRect.x;\n float height = uFloodRect.w - uFloodRect.y;\n if(vFloodPos.x < uFloodRect.x || vFloodPos.x > uFloodRect.z || vFloodPos.y < uFloodRect.y || vFloodPos.y > uFloodRect.w)\n {\n return;\n }\n vec2 floodTexcoord = vec2((vFloodPos.x - uFloodRect.x) / width, (vFloodPos.y - uFloodRect.y) / height);\n vec4 flagColor = texture2D(uFloodFlagTexture, floodTexcoord);\n if(flagColor.r < 0.5)\n {\n return;\n }\n color = vec4(40.0/255.0,150.0/255.0,200.0/255.0,1.0);\n}\n#endif\n\n#ifdef TRANSPARENT_BACK_COLOR\nuniform vec4 uTransparentBackColor;\nuniform float uTransparentBackColorTolerance;\n\nvoid transparentColorClip(vec4 color)\n{\n if(uTransparentBackColorTolerance > 0.01)\n {\n float rDiff = abs(uTransparentBackColor.r - color.r);\n float gDiff = abs(uTransparentBackColor.g - color.g);\n float bDiff = abs(uTransparentBackColor.b - color.b);\n if(rDiff < uTransparentBackColorTolerance && gDiff < uTransparentBackColorTolerance && bDiff < uTransparentBackColorTolerance)\n {\n discard;\n }\n }\n}\n#endif\n",shadowReceive="\n#ifdef USE_CUBE_MAP_SHADOW\n var shadowMap_textureCube : texture_cube<f32>;\n var shadowMap_textureCubeSampler : sampler;\n#else\n var shadowMap_texture : texture_2d<f32>;\n var shadowMap_textureSampler : sampler;\n #ifdef USE_PCSS\n var u_shadowDepth : texture_depth_2d;\n var u_shadowDepthSampler : sampler_comparison;\n #endif\n#endif\n\n#ifdef HAS_CASCADES\n\nfn cascadeWeights(depthEye : f32) -> vec4<f32>\n{\n // One component is set to 1.0 and all others set to 0.0.\n var near = step(Shadow.shadowMap_cascadeSplits[0], vec4<f32>(depthEye));\n var far = step(vec4<f32>(depthEye), Shadow.shadowMap_cascadeSplits[1]);\n return near * far;\n}\n\nfn cascadeMatrix(weights : vec4<f32>) -> mat4x4<f32>\n{\n return Shadow.shadowMap_cascadeMatrices[0] * weights.x +\n Shadow.shadowMap_cascadeMatrices[1] * weights.y +\n Shadow.shadowMap_cascadeMatrices[2] * weights.z +\n Shadow.shadowMap_cascadeMatrices[3] * weights.w;\n}\n#endif\n\n#include <shadowVisibility>\n\n// Offset the shadow position in the direction of the normal for perpendicular and back faces\n\nfn applyNormalOffset(positionEC : ptr<function, vec4<f32>>, normalEC : vec3<f32>, nDotL : f32)\n{\n#ifdef APPLY_NORMAL_OFFSET\n var normalOffset = Shadow.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;\n var normalOffsetScale = 1.0 - nDotL;\n var offset = normalOffset * normalOffsetScale * normalEC;\n var newPositionEC = (*positionEC).xyz + offset;\n var w = (*positionEC).w;\n (*positionEC) = vec4(newPositionEC, w);\n#endif // APPLY_NORMAL_OFFSET\n}\n\nfn getShadowVisibility(inPositionEC : vec4<f32>, normalEC : vec3<f32>, depth : f32) -> f32\n{\n var positionEC : vec4<f32> = inPositionEC;\n var shadowParameters : czm_shadowParameters;\n shadowParameters.texelStepSize = Shadow.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\n shadowParameters.depthBias = Shadow.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\n shadowParameters.normalShadingSmooth = Shadow.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\n shadowParameters.darkness = Shadow.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\n\n var visibility = 1.0;\n\n #ifdef IS_TERRAIN\n // Scale depth bias based on view distance to reduce z-fighting in distant terrain\n shadowParameters.depthBias *= max(depth * 0.01, 1.0);\n #endif // IS_TERRAIN\n\n shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);\n \n #ifdef USE_CUBE_MAP_SHADOW // POINT_LIGHT\n var directionEC : vec3<f32> = positionEC.xyz - Shadow.shadowMap_lightPositionEC.xyz;\n var distance = length(directionEC);\n directionEC = normalize(directionEC);\n var radius = Shadow.shadowMap_lightPositionEC.w;\n // Stop early if the fragment is beyond the point light radius\n if (distance > radius)\n {\n return visibility;\n }\n var directionWC : vec3<f32> = czm_inverseViewRotation * directionEC;\n \n shadowParameters.depth = distance / radius;\n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n \n shadowParameters.texCoords = directionWC;\n visibility = shadowVisibility(shadowParameters);\n #endif // USE_CUBE_MAP_SHADOW\n \n #ifdef SPOT_LIGHT_SHADOW\n var directionEC = normalize(positionEC.xyz - Shadow.shadowMap_lightPositionEC.xyz);\n var nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\n applyNormalOffset(&positionEC, normalEC, nDotL);\n var shadowPosition = Shadow.shadowMap_matrix * positionEC;\n // Spot light uses a perspective projection, so perform the perspective divide\n shadowPosition /= shadowPosition.w;\n \n // Stop early if the fragment is not in the shadow bounds\n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))\n {\n return visibility;\n }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n \n visibility = shadowVisibility(shadowParameters);\n #endif // SPOT_LIGHT_SHADOW\n \n #ifdef HAS_CASCADES\n var maxDepth = Shadow.shadowMap_cascadeSplits[1].w;\n // Stop early if the eye depth exceeds the last cascade\n if (depth > maxDepth)\n {\n return visibility;\n }\n \n // Get the cascade based on the eye-space depth\n var weights : vec4<f32> = cascadeWeights(depth);\n \n // Apply normal offset\n var nDotL = clamp(dot(normalEC, Shadow.shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(&positionEC, normalEC, nDotL);\n \n var cascadeMatrix : mat4x4<f32>;\n var nextCascadeMatrix : mat4x4<f32>;\n var csmBlend = false;\n var diffRatio = 0.0;\n var shadowMapIndex = 0.0;\n if(weights.x > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[0];\n nextCascadeMatrix = Shadow.shadowMap_cascadeMatrices[1];\n csmBlend = weights.y > 0.0;\n diffRatio = (depth - Shadow.shadowMap_cascadeSplits[0].y) / (Shadow.shadowMap_cascadeSplits[1].x - Shadow.shadowMap_cascadeSplits[0].y);\n shadowMapIndex = 0.0;\n }\n else if(weights.y > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[1];\n nextCascadeMatrix = Shadow.shadowMap_cascadeMatrices[2];\n csmBlend = weights.z > 0.0;\n diffRatio = (depth - Shadow.shadowMap_cascadeSplits[0].z) / (Shadow.shadowMap_cascadeSplits[1].y - Shadow.shadowMap_cascadeSplits[0].z);\n shadowMapIndex = 1.0;\n }\n else if(weights.z > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[2];\n nextCascadeMatrix = Shadow.shadowMap_cascadeMatrices[3];\n csmBlend = weights.w > 0.0;\n diffRatio = (depth - Shadow.shadowMap_cascadeSplits[0].w) / (Shadow.shadowMap_cascadeSplits[1].z - Shadow.shadowMap_cascadeSplits[0].w);\n shadowMapIndex = 2.0;\n }\n else if(weights.w > 0.0){\n cascadeMatrix = Shadow.shadowMap_cascadeMatrices[3];\n shadowMapIndex = 3.0;\n }\n var shadowPosition = cascadeMatrix * positionEC;\n \n // Get visibility\n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n shadowParameters.shadowMapIndex = shadowMapIndex;\n visibility = shadowVisibility(shadowParameters);\n\n if(csmBlend){\n var nextVisibility = 0.0;\n var nextShadowPosition = nextCascadeMatrix * positionEC;\n shadowParameters.texCoords = nextShadowPosition.xy;\n shadowParameters.depth = nextShadowPosition.z;\n shadowParameters.shadowMapIndex = shadowMapIndex + 1.0;\n nextVisibility = shadowVisibility(shadowParameters);\n visibility = mix(visibility, nextVisibility, diffRatio);\n // Draw cascade blend colors for debugging\n //gl_FragColor *= vec4<f32>(diffRatio, 0.0, 0.0, 1.0);\n }\n \n // Fade out shadows that are far away\n var shadowMapMaximumDistance = Shadow.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;\n var fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);\n visibility = mix(visibility, 1.0, fade);\n \n visibility = clamp(visibility, 0.0, 1.0);\n\n //// Draw cascade colors for debugging\n //gl_FragColor *= czm_cascadeColor(weights);\n #endif // HAS_CASCADES\n \n #ifdef NO_CASCADES\n var nDotL = clamp(dot(normalEC, Shadow.shadowMap_lightDirectionEC), 0.0, 1.0);\n applyNormalOffset(&positionEC, normalEC, nDotL);\n var shadowPosition = Shadow.shadowMap_matrix * positionEC;\n \n // Stop early if the fragment is not in the shadow bounds\n // if (any(lessThan(shadowPosition.xyz, vec3<f32>(0.0))) || any(greaterThan(shadowPosition.xyz, vec3<f32>(1.0))))\n // {\n // return visibility;\n // }\n \n shadowParameters.texCoords = shadowPosition.xy;\n shadowParameters.depth = shadowPosition.z;\n shadowParameters.nDotL = nDotL;\n visibility = shadowVisibility(shadowParameters);\n #endif // NO_CASCADES\n\n return visibility;\n}\n",shadowVisibility="\n#ifdef USE_PCSS\nconst PoissonSamplers32 = array<vec3<f32>, 64>(\n vec3(0.06407013, 0.05409927, 0.),\n vec3(0.7366577, 0.5789394, 0.),\n vec3(-0.6270542, -0.5320278, 0.),\n vec3(-0.4096107, 0.8411095, 0.),\n vec3(0.6849564, -0.4990818, 0.),\n vec3(-0.874181, -0.04579735, 0.),\n vec3(0.9989998, 0.0009880066, 0.),\n vec3(-0.004920578, -0.9151649, 0.),\n vec3(0.1805763, 0.9747483, 0.),\n vec3(-0.2138451, 0.2635818, 0.),\n vec3(0.109845, 0.3884785, 0.),\n vec3(0.06876755, -0.3581074, 0.),\n vec3(0.374073, -0.7661266, 0.),\n vec3(0.3079132, -0.1216763, 0.),\n vec3(-0.3794335, -0.8271583, 0.),\n vec3(-0.203878, -0.07715034, 0.),\n vec3(0.5912697, 0.1469799, 0.),\n vec3(-0.88069, 0.3031784, 0.),\n vec3(0.5040108, 0.8283722, 0.),\n vec3(-0.5844124, 0.5494877, 0.),\n vec3(0.6017799, -0.1726654, 0.),\n vec3(-0.5554981, 0.1559997, 0.),\n vec3(-0.3016369, -0.3900928, 0.),\n vec3(-0.5550632, -0.1723762, 0.),\n vec3(0.925029, 0.2995041, 0.),\n vec3(-0.2473137, 0.5538505, 0.),\n vec3(0.9183037, -0.2862392, 0.),\n vec3(0.2469421, 0.6718712, 0.),\n vec3(0.3916397, -0.4328209, 0.),\n vec3(-0.03576927, -0.6220032, 0.),\n vec3(-0.04661255, 0.7995201, 0.),\n vec3(0.4402924, 0.3640312, 0.),\n\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.),\n vec3(0., 0., 0.)\n);\n\nconst PoissonSamplers64 =array<vec3<f32>, 64>(\n vec3(-0.613392, 0.617481, 0.),\n vec3(0.170019, -0.040254, 0.),\n vec3(-0.299417, 0.791925, 0.),\n vec3(0.645680, 0.493210, 0.),\n vec3(-0.651784, 0.717887, 0.),\n vec3(0.421003, 0.027070, 0.),\n vec3(-0.817194, -0.271096, 0.),\n vec3(-0.705374, -0.668203, 0.),\n vec3(0.977050, -0.108615, 0.),\n vec3(0.063326, 0.142369, 0.),\n vec3(0.203528, 0.214331, 0.),\n vec3(-0.667531, 0.326090, 0.),\n vec3(-0.098422, -0.295755, 0.),\n vec3(-0.885922, 0.215369, 0.),\n vec3(0.566637, 0.605213, 0.),\n vec3(0.039766, -0.396100, 0.),\n vec3(0.751946, 0.453352, 0.),\n vec3(0.078707, -0.715323, 0.),\n vec3(-0.075838, -0.529344, 0.),\n vec3(0.724479, -0.580798, 0.),\n vec3(0.222999, -0.215125, 0.),\n vec3(-0.467574, -0.405438, 0.),\n vec3(-0.248268, -0.814753, 0.),\n vec3(0.354411, -0.887570, 0.),\n vec3(0.175817, 0.382366, 0.),\n vec3(0.487472, -0.063082, 0.),\n vec3(-0.084078, 0.898312, 0.),\n vec3(0.488876, -0.783441, 0.),\n vec3(0.470016, 0.217933, 0.),\n vec3(-0.696890, -0.549791, 0.),\n vec3(-0.149693, 0.605762, 0.),\n vec3(0.034211, 0.979980, 0.),\n vec3(0.503098, -0.308878, 0.),\n vec3(-0.016205, -0.872921, 0.),\n vec3(0.385784, -0.393902, 0.),\n vec3(-0.146886, -0.859249, 0.),\n vec3(0.643361, 0.164098, 0.),\n vec3(0.634388, -0.049471, 0.),\n vec3(-0.688894, 0.007843, 0.),\n vec3(0.464034, -0.188818, 0.),\n vec3(-0.440840, 0.137486, 0.),\n vec3(0.364483, 0.511704, 0.),\n vec3(0.034028, 0.325968, 0.),\n vec3(0.099094, -0.308023, 0.),\n vec3(0.693960, -0.366253, 0.),\n vec3(0.678884, -0.204688, 0.),\n vec3(0.001801, 0.780328, 0.),\n vec3(0.145177, -0.898984, 0.),\n vec3(0.062655, -0.611866, 0.),\n vec3(0.315226, -0.604297, 0.),\n vec3(-0.780145, 0.486251, 0.),\n vec3(-0.371868, 0.882138, 0.),\n vec3(0.200476, 0.494430, 0.),\n vec3(-0.494552, -0.711051, 0.),\n vec3(0.612476, 0.705252, 0.),\n vec3(-0.578845, -0.768792, 0.),\n vec3(-0.772454, -0.090976, 0.),\n vec3(0.504440, 0.372295, 0.),\n vec3(0.155736, 0.065157, 0.),\n vec3(0.391522, 0.849605, 0.),\n vec3(-0.620106, -0.328104, 0.),\n vec3(0.789239, -0.419965, 0.),\n vec3(-0.545396, 0.538133, 0.),\n vec3(-0.178564, -0.596057, 0.)\n);\n\nfn getRand(seed : vec2<f32>)->f32 {\n return fract(sin(dot(seed.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n#endif // USE_PCSS\n\n#ifdef USE_CUBE_MAP_SHADOW\nfn cubeShadowDepthCompare(uv : vec3<f32>, depth : f32) -> f32\n{\n var depthValue = textureSample(shadowMap_textureCube, shadowMap_textureCubeSampler, uv);\n return step(depth, depthValue);\n}\n#else\nfn shadowDepthCompare(uv : vec2<f32>, depth : f32) -> f32\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n var depthValue = textureSample(shadowMap_texture, shadowMap_textureSampler, uv).r;\n#else\n var depthValue = czm_unpackDepth(textureSample(shadowMap_texture, shadowMap_textureSampler, uv));\n#endif // USE_SHADOW_DEPTH_TEXTURE\n return step(depth, depthValue);\n}\n#endif // USE_CUBE_MAP_SHADOW\n\nfn sampleShadowMap(uv : vec2<f32>) -> f32\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n var depthValue = textureSample(shadowMap_texture, shadowMap_textureSampler, uv).r;\n#else\n var depthValue = czm_unpackDepth(textureSample(shadowMap_texture, shadowMap_textureSampler, uv));\n#endif\n return depthValue;\n}\n\nfn private_shadowVisibility(inVisibility : f32, nDotL : f32, normalShadingSmooth : f32, darkness : f32) -> f32\n{\n var visibility = inVisibility;\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n var strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n var strength = step(0.0, nDotL);\n#endif // USE_NORMAL_SHADING_SMOOTH\n visibility *= strength;\n#endif // USE_NORMAL_SHADING\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\nfn shadowVisibility(shadowParameters : czm_shadowParameters) -> f32\n{\n var depthBias = shadowParameters.depthBias;\n var depth = shadowParameters.depth;\n var nDotL = shadowParameters.nDotL;\n var normalShadingSmooth = shadowParameters.normalShadingSmooth;\n var darkness = shadowParameters.darkness;\n var uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n var visibility = cubeShadowDepthCompare(uvw, depth);\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\n\n#ifdef USE_PCSS\n\n fn computeShadowWithPCSS(shadowParameters : czm_shadowParameters, searchTapCount : u32, pcfTapCount : u32, poissonSamplers : array<vec3<f32>, 64>)-> f32\n {\n var depthMetric = shadowParameters.depth;\n\n if (depthMetric > 1.0 || depthMetric < 0.0) {\n return 1.0;\n }\n\n var depthBias = shadowParameters.depthBias;\n depthBias *= 2.0;\n var clipPos = vec3(shadowParameters.texCoords.xy, shadowParameters.depth - depthBias);\n var uvDepth = clipPos;\n\n var shadowMapSize = 1.0 / shadowParameters.texelStepSize.x;\n var shadowMapSizeInverse = shadowParameters.texelStepSize.x;\n var contactHardeningLightSizeUVRatio = Shadow.shadowMap_penumbraRatio;\n var shadowMapIndex = shadowParameters.shadowMapIndex;\n // hack : 让不同cascade的阴影看起来没有明显分隔\n var scale = pow(2.0, shadowMapIndex);\n contactHardeningLightSizeUVRatio /= scale;\n\n var lightSizeUV = shadowMapSize * contactHardeningLightSizeUVRatio;\n var darkness = shadowParameters.darkness;\n\n var blockerDepth = 0.0;\n var sumBlockerDepth = 0.0;\n var numBlocker = 0.0;\n\n var i : u32;\n for (i = 0; i < searchTapCount; i++) {\n blockerDepth = czm_unpackDepth(textureSampleLevel(shadowMap_texture, shadowMap_textureSampler, uvDepth.xy + (lightSizeUV * shadowMapSizeInverse * PoissonSamplers32[i].xy), 0.0));\n if (blockerDepth < uvDepth.z) {\n sumBlockerDepth += blockerDepth;\n numBlocker += 1.0;\n }\n }\n\n if (numBlocker < 1.0) {\n return 1.0;\n }\n else\n {\n var avgBlockerDepth = sumBlockerDepth / numBlocker;\n\n // Offset preventing aliasing on contact.\n var AAOffset = shadowMapSizeInverse * 10.;\n // Do not dividing by z despite being physically incorrect looks better due to the limited kernel size.\n // var penumbraRatio = (depthMetric - avgBlockerDepth) / avgBlockerDepth;\n var penumbraRatio = ((depthMetric - avgBlockerDepth) + AAOffset);\n var filterRadius = penumbraRatio * lightSizeUV * shadowMapSizeInverse;\n\n var random = getRand(shadowParameters.texCoords.xy);\n var rotationAngle = random * 3.1415926;\n var rotationVector = vec2(cos(rotationAngle), sin(rotationAngle));\n\n var shadow = 0.0;\n var i : u32;\n for (i = 0; i < pcfTapCount; i++) {\n var offset = poissonSamplers[i];\n // Rotated offset.\n offset = vec3(offset.x * rotationVector.x - offset.y * rotationVector.y, offset.y * rotationVector.x + offset.x * rotationVector.y, 0.0);\n var realUV = uvDepth + offset * filterRadius;\n realUV.z = (realUV.z - 0.5) * 2.0;\n shadow += textureSampleCompareLevel(u_shadowDepth, u_shadowDepthSampler, realUV.xy, realUV.z);\n }\n shadow /= f32(pcfTapCount);\n\n // Blocker distance falloff\n shadow = mix(shadow, 1.0, depthMetric - avgBlockerDepth);\n\n // Apply darkness\n shadow = mix(darkness, 1.0, shadow);\n\n return shadow;\n }\n }\n\n fn computeShadowWithPCSS16(shadowParameters : czm_shadowParameters)->f32\n {\n return computeShadowWithPCSS(shadowParameters, 16, 16, PoissonSamplers32);\n }\n\n fn computeShadowWithPCSS32(shadowParameters : czm_shadowParameters)->f32\n {\n return computeShadowWithPCSS(shadowParameters, 16, 32, PoissonSamplers32);\n }\n\n fn computeShadowWithPCSS64(shadowParameters : czm_shadowParameters)->f32\n {\n return computeShadowWithPCSS(shadowParameters, 32, 64, PoissonSamplers64);\n }\n#else\n fn computeShadowWithPoissonSampling(shadowParameters : czm_shadowParameters) -> f32\n {\n var shadowPixelDepth = shadowParameters.depth;\n var depthBias = shadowParameters.depthBias;\n shadowPixelDepth -= depthBias;\n var darkness = shadowParameters.darkness;\n var uv = shadowParameters.texCoords;\n var texelStepSize = shadowParameters.texelStepSize;\n\n var visibility = 1.0;\n var poissonDisk : array<vec2<f32>, 4>;\n poissonDisk[0] = vec2<f32>(-0.94201624, -0.39906216);\n poissonDisk[1] = vec2<f32>(0.94558609, -0.76890725);\n poissonDisk[2] = vec2<f32>(-0.094184101, -0.92938870);\n poissonDisk[3] = vec2<f32>(0.34495938, 0.29387760);\n\n // Poisson Sampling\n if (sampleShadowMap(uv + poissonDisk[0] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n if (sampleShadowMap(uv + poissonDisk[1] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n if (sampleShadowMap(uv + poissonDisk[2] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n if (sampleShadowMap(uv + poissonDisk[3] * texelStepSize) < shadowPixelDepth){\n visibility -= 0.25;\n }\n return visibility;\n }\n#endif\n\nfn shadowVisibility(shadowParameters : czm_shadowParameters) -> f32\n{\n#ifdef USE_SOFT_SHADOWS\n #ifdef USE_PCSS\n #ifdef LOW_QUALITY_SHADOW\n var visibility = computeShadowWithPCSS16(shadowParameters);\n #elif defined(MEDIUM_QUALITY_SHADOW)\n var visibility = computeShadowWithPCSS32(shadowParameters);\n #else\n var visibility = computeShadowWithPCSS64(shadowParameters);\n #endif\n #else\n var visibility = computeShadowWithPoissonSampling(shadowParameters);\n #endif\n#else\n var depth = shadowParameters.depth;\n var depthBias = shadowParameters.depthBias;\n depth -= depthBias;\n var visibility = shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n var nDotL = shadowParameters.nDotL;\n var normalShadingSmooth = shadowParameters.normalShadingSmooth;\n var darkness = shadowParameters.darkness;\n return private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif // USE_CUBE_MAP_SHADOW\n",cubeUV_reflection="\n\n\tvar uSpecularEnvironmentMaps : texture_2d<f32>;\n\tvar uSpecularEnvironmentMapsSampler : sampler;\n\n\tconst CUBEUV_MAX_MIP = 8.0;\n const CUBEUV_TEXEL_WIDTH = 0.0013020833333333333;\n const CUBEUV_TEXEL_HEIGHT = 0.0009765625;\n const cubeUV_minMipLevel = 4.0;\n\tconst cubeUV_minTileSize = 16.0;\n\n\t// These shader functions convert between the UV coordinates of a single face of\n\t// a cubemap, the 0-5 integer index of a cube face, and the direction vector for\n\t// sampling a textureCube (not generally normalized ).\n\n\tfn getFace( direction : vec3<f32> ) ->f32\n\t{\n\t\tvar absDirection = abs( direction );\n\t\tvar face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\n\t// RH coordinate system; PMREM face-indexing convention\n\tfn getUV( direction : vec3<f32>, face : f32) -> vec2<f32>{\n\t\tvar uv : vec2<f32>;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2<f32>( direction.z, direction.y ) / abs( direction.x ); // pos x\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2<f32>( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2<f32>( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2<f32>( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2<f32>( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\t\t} else {\n\t\t\tuv = vec2<f32>( direction.x, direction.y ) / abs( direction.z ); // neg z\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\n\t// fn bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) ->vec3<f32>\n\t// {\n\t// \tfloat face = getFace( direction );\n\t// \tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t// \tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t// \tfloat faceSize = exp2( mipInt );\n\t// \tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t// \tif ( face > 2.0 ) {\n\t// \t\tuv.y += faceSize;\n\t// \t\tface -= 3.0;\n\t// \t}\n\t// \tuv.x += face * faceSize;\n\t// \tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t// \tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t// \tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t// \tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t// \treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t// }\n\n\t// These defines must match with PMREMGenerator\n\n\tconst cubeUV_r0 = 1.0;\n\tconst cubeUV_v0 = 0.339;\n\tconst cubeUV_m0 = -2.0;\n\tconst cubeUV_r1 = 0.8;\n\tconst cubeUV_v1 = 0.276;\n\tconst cubeUV_m1 = -1.0;\n\tconst cubeUV_r4 = 0.4;\n\tconst cubeUV_v4 = 0.046;\n\tconst cubeUV_m4 = 2.0;\n\tconst cubeUV_r5 = 0.305;\n\tconst cubeUV_v5 = 0.016;\n\tconst cubeUV_m5 = 3.0;\n\tconst cubeUV_r6 = 0.21;\n\tconst cubeUV_v6 = 0.0038;\n\tconst cubeUV_m6 = 4.0;\n\n\tfn roughnessToMip(roughness : f32) ->f32\n\t{\n\t\tvar mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25\n\t\t}\n\t\treturn mip;\n\t}\n\n\t// vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\n\t// \tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\n\t// \tfloat mipF = fract( mip );\n\n\t// \tfloat mipInt = floor( mip );\n\n\t// \tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\n\t// \tif ( mipF == 0.0 ) {\n\n\t// \t\treturn vec4( color0, 1.0 );\n\n\t// \t} else {\n\n\t// \t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\n\t// \t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\n\t// \t}\n\n\t// }\n",LightUBODecl="\n#define MAX_POINT_LIGHT_COUNT 16;\n#define MAX_SPOT_LIGHT_COUNT 16;\n#define MAX_DIRECTION_LIGHT_COUNT 4;\nstruct LightUBO \n{ \n uPointLightPositionEC : array<vec3<f32>, 16>,\n uPointLightColor : array<vec3<f32>, 16>,\n uPointLightDistanceAndDecay : array<vec4<f32>, 16>,\n uSpotLightColorAndExponent : array<vec4<f32>, 16>,\n uSpotLightPositionEC : array<vec3<f32>, 16>,\n uSpotLightDirectionEC : array<vec3<f32>, 16>,\n uSpotLightDistanceDecayCosPenumbra : array<vec4<f32>, 16>,\n uDirectionalLightDirectionEC : array<vec3<f32>, 4>,\n uDirectionalLightDirection : array<vec3<f32>, 4>,\n uDirectionalLightColor : array<vec3<f32>, 4>,\n uAmbientLightColor : vec4<f32>, \n uSunLightColor : vec4<f32>,\n uSunDirectionEC : vec3<f32>,\n uSkyColor : vec3<f32>,\n uGroundColor : vec3<f32>,\n uSunLightON : f32,\n uPointLightCount : i32,\n uSpotLightCount : i32,\n uDirLightCount : i32\n};\nvar<uniform> Light : LightUBO;\n",MaterialUboDecl="\nstruct MaterialUBO {\n uTexMatrix : mat4x4<f32>,\n uDiffuseColor : vec4<f32>,\n uAmbientColor : vec4<f32>,\n uSpecularColor : vec4<f32>,\n uTexUVOffset : vec4<f32>,\n uTextureDim : vec4<f32>,\n uTextureWidths : vec2<f32>,\n batchTextureStep_baseTex : vec4<f32>,\n batchTextureDimensions_baseTex : vec2<f32>,\n batchTextureStep_bakeTex : vec4<f32>,\n batchTextureDimensions_bakeTex : vec2<f32>,\n uBaseColorFactor : vec4<f32>,\n uEmissiveFactor : vec4<f32>,\n uEmissiveUVOffsetAndTiling : vec4<f32>,\n uMetallicRoughnessIntensityScale : vec3<f32>,\n uPBRTexWH : vec2<f32>,\n uNormalTextureScale : f32,\n uAlphaMode : f32,\n uAlphaCutoff : f32,\n uPbrParTextureWidth : f32\n};\n\nvar<uniform> Material : MaterialUBO;",MeshUboDecl="\nstruct MeshUBO {\n uModelMatrix : mat4x4<f32>, \n uGeoMatrix : mat4x4<f32>, \n batchTextureStep : vec4<f32>, \n batchTextureDimensions : vec2<f32>,\n decode_texCoord0_min : vec2<f32>,\n decode_texCoord1_min : vec2<f32>,\n decode_texCoord0_vNormConstant : vec3<f32>,\n decode_texCoord1_vNormConstant : vec3<f32>,\n decode_position_min : vec4<f32>,\n decode_position_normConstant : f32,\n normal_rangeConstant : f32,\n uInverseGeoMatrix : mat4x4<f32>, \n uSkeletonMatrix : mat4x4<f32>,\n uSkeletonCount : f32,\n uImgTextureBound : vec2<f32>,\n uImgTextureAlpha : f32,\n fMultiTemporalFactor : f32,\n uSouthWest : vec3<f32>,\n uNorthDir : vec3<f32>,\n uEastDir : vec3<f32>,\n textureRepeat : vec2<f32>\n};\n\nvar<uniform> Mesh : MeshUBO;",LayerUboDecl="\nstruct LayerUBO { \n uSelColor : vec4<f32>, \n uTranslationAndBottom : vec4<f32>, \n uFillForeColor : vec4<f32>, \n uPolygonOffset : vec4<f32>, \n uPointSize : f32,\n uMinMaxTransparent : vec2<f32>,\n uTransparentFilter : f32,\n uHypLineColor : vec4<f32>,\n uNoValueColor : vec4<f32>,\n uHypRect : vec4<f32>,\n uHypHasAnalysisRegion : f32,\n uMixColorType : f32,\n uHypOpacity : f32,\n uHypContourInterval : f32,\n uHypContourFillMode : f32,\n uHypFloor : f32,\n uHypCeil : f32,\n uDataFloor : f32,\n uDataCeil : f32,\n uHypMaxVisibleValue : f32,\n uHypMinVisibleValue : f32,\n uHypsometricVisible : f32,\n uRect : vec4<f32>,\n uCameraHeight : f32,\n uExcavationRect : vec4<f32>,\n uServerExcavationRect : vec4<f32>,\n uExcavationMode : f32,\n uServerExcavationMode : f32,\n uSwipeRegion : vec4<f32>,\n uBrightness : f32,\n uContrast : f32,\n uHue : f32,\n uSaturation : f32,\n uOneOverGamma : f32,\n uClipPlanes : array<vec4<f32>, 6>,\n uClipLineColor : vec4<f32>,\n uClipMode : f32,\n uMaxCategory : f32,\n uMinCategory : f32,\n uCategoryWidht : f32,\n uCategoryHeight : f32,\n uLineColor : vec4<f32>,\n uLineWidth : f32,\n uFillStyle : f32,\n uTransparentBackColor : vec4<f32>,\n uTransparentBackColorTolerance : f32,\n uVisibleDistanceMax : f32,\n uHorizontalColor : vec4<f32>,\n uHorizontalLine : f32,\n uDistanceFalloffFactor : f32,\n uStrokesTextureScale : vec2<f32>,\n uStrokesLog2Resolution : f32,\n uMinMaxTerrainHeightAndPickInfo : vec4<f32>,\n uOverlayRect : vec4<f32>,\n uEmissionTexAtlasTilingAndOffset : array<vec4<f32>, 10>,\n uEmissionTexAtlasRects : array<vec4<f32>, 10>,\n uEmissionColor : vec4<f32>,\n uLayerBounds : vec4<f32>,\n uLayerCornerLength : f32,\n uMaxCategoryOrHypCeil : f32,\n uMinCategoryOrHypFloor : f32,\n uEmissionTexAtlasCount : f32,\n uSnowCoverageFactor : f32,\n uAnimationSpeed : f32,\n uRippleScale : f32,\n uWindIntensity : f32,\n uRain : f32,\n uCameraDepth : f32,\n uWetnessFactor : f32,\n uSelectColorType: f32\n};\n\nvar<uniform> Layer : LayerUBO;",k$Z="\nstruct SceneUBO { \n uView : mat4x4<f32>, \n uProjection : mat4x4<f32>, \n uViewProjection : mat4x4<f32>, \n uInverseView : mat4x4<f32>, \n uInverseProjection : mat4x4<f32>, \n uInverseViewProjection : mat4x4<f32>, \n uViewportTransformation : mat4x4<f32>,\n uViewRotation : mat3x3<f32>, \n uInverseViewRotation : mat3x3<f32>, \n uTemeToPseudoFixed : mat3x3<f32>, \n uViewport : vec4<f32>, \n uFrustumPlanes : vec4<f32>, \n uRelativeOrigin : vec3<f32>,\n uCurrentFrustum : vec2<f32>, \n uFarDepthFromNearPlusOne : f32, \n uLog2FarDepthFromNearPlusOne : f32, \n uOneOverLog2FarDepthFromNearPlusOne : f32, \n uFrameNumber : f32, \n uPixelRatio : f32, \n uResolutionScale : f32, \n uGamma : f32,\n uToneMappingExposure : f32,\n uEnvMapIntensity : f32,\n uSpecularEnvironmentMapSize : vec2<f32>,\n uSpecularEnvironmentMapsMaximumLOD : f32,\n uSphericalHarmonicCoefficients : array<vec3<f32>, 9>,\n uCameraReflect : f32\n};\nvar<uniform> Scene : SceneUBO;",ShadowUboDecl="\nstruct ShadowUBO { \n shadowMap_matix : mat4x4<f32>,\n shadowMap_texelSizeDepthBiasAndNormalShadingSmooth : vec4<f32>,\n shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness : vec4<f32>,\n shadowMap_cascadeMatrices : array<mat4x4<f32>, 4>,\n shadowMap_cascadeSplits : array<vec4<f32>, 2>,\n shadowMap_lightPositionEC : vec4<f32>,\n shadowMap_lightDirectionEC : vec3<f32>,\n shadowMap_penumbraRatio : f32\n};\nvar<uniform> Shadow : ShadowUBO;\n",blinnPhong="\nconst shininess2 = 30.0;\nconst specular = vec3<f32>(0.066666);\n\nfn getRoughness(oriTexCoord : vec2<f32>) -> f32{\n return 1.0;\n}\n\nfn blinnPhong(inBaseColorWithAlpha : vec4<f32>, texCoord : vec2<f32>, oriTexCoord : vec2<f32>, posEC : vec3<f32>, posMC : vec4<f32>, vertexNormalEC : vec3<f32>)->vec4<f32>\n{\n var normalEC : vec3<f32> = getNormalEC(vNormalEC, Mesh.uModelMatrix, posMC.xyz);\n var totalDiffuseLight = vec3<f32>(0.0);\n var totalSpecularLight = vec3<f32>(0.0);\n var sunLightDiffuseWeight = max( dot( normalEC, Light.uSunDirectionEC ), 0.0 );\n totalDiffuseLight = Light.uSunLightColor.rgb * sunLightDiffuseWeight * Light.uSunLightON;\n var positionToEyeECDir = -normalize(posEC);\n\n var i : i32;\n #ifdef HAS_DIR_LIGHTS\n for (i = 0; i < Light.uDirLightCount; i ++ )\n {\n var dirVectorEC = normalize((Scene.uView * vec4<f32>(Light.uDirectionalLightDirection[i], 0.0)).xyz);\n var dotProduct = dot( normalEC, dirVectorEC );\n var dirDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += Light.uDirectionalLightColor[ i ] * dirDiffuseWeight;\n }\n #endif\n\n #ifdef HAS_POINT_LIGHTS\n for (i = 0; i < Light.uPointLightCount; i ++ )\n {\n var lVector = Light.uPointLightPositionEC[i] - posEC;\n var lengthToLight = length( lVector );\n var cutoffDis = Light.uPointLightDistanceAndDecay[i].x;\n if(lengthToLight > cutoffDis)\n {\n continue;\n }\n var attenuation = punctualLightIntensityToIrradianceFactor( lengthToLight, cutoffDis, Light.uPointLightDistanceAndDecay[i].y);\n lVector = normalize( lVector );\n var dotProduct = dot( normalEC, lVector );\n var pointLightDiffuse = max( dotProduct, 0.0 );\n totalDiffuseLight += Light.uPointLightColor[i] * pointLightDiffuse * attenuation;\n var pointHalfVector = normalize( lVector + positionToEyeECDir );\n var pointDotNormalHalf = max( dot( normalEC, pointHalfVector ), 0.0 );\n var pointSpecularWeight = max( pow( pointDotNormalHalf, shininess2 ), 0.0 );\n var specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n var schlick = specular + vec3<f32>(1.0 - specular) * pow(max(1.0 - dot(lVector, pointHalfVector), 0.0), 5.0);\n totalSpecularLight += schlick * Light.uPointLightColor[ i ] * pointSpecularWeight * pointLightDiffuse * attenuation * specularNormalization;\n }\n #endif\n\n #ifdef HAS_SPOT_LIGHTS\n var positionWC = (Mesh.uModelMatrix * posMC).xyz;\n for (i = 0; i < Light.uSpotLightCount; i ++ )\n {\n var lVector = Light.uSpotLightPositionEC[i] - posEC;\n var attenuation = punctualLightIntensityToIrradianceFactor( length( lVector ), Light.uSpotLightDistanceDecayCosPenumbra[i].x, Light.uSpotLightDistanceDecayCosPenumbra[i].y);\n lVector = normalize( lVector );\n var spotEffect = dot( lVector, Light.uSpotLightDirectionEC[ i ] );\n if ( spotEffect > Light.uSpotLightDistanceDecayCosPenumbra[i].z ) {\n spotEffect = max( pow( max( spotEffect, 0.0 ), Light.uSpotLightColorAndExponent[ i ].a ), 0.0 );\n var dotProduct = dot( normalEC, lVector );\n var spotDiffuseWeight = max( dotProduct, 0.0 );\n totalDiffuseLight += Light.uSpotLightColorAndExponent[ i ].rgb * spotDiffuseWeight * attenuation * spotEffect;\n var spotHalfVector = normalize( lVector + positionToEyeECDir );\n var spotDotNormalHalf = max( dot( normalEC, spotHalfVector ), 0.0 );\n var spotSpecularWeight = max( pow( spotDotNormalHalf, shininess2 ), 0.0 );\n var specularNormalization = ( shininess2 + 2.0 ) / 8.0;\n var schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\n totalSpecularLight += schlick * Light.uSpotLightColorAndExponent[ i ].rgb * spotSpecularWeight * spotDiffuseWeight * attenuation * specularNormalization * spotEffect;\n }\n }\n #endif\n\n var diffuseColor = Material.uDiffuseColor.rgb * inBaseColorWithAlpha.rgb;\n\n var material : PhysicalMaterial;\n material.diffuseColor = diffuseColor;\n material.roughness = 1.0;\n var metalness = 0.0;\n var f0 = vec3<f32>(0.04);\n material.specularColor = mix(f0, inBaseColorWithAlpha.rgb, metalness);;\n material.specularF90 = 1.0;\n \n var geometry : GeometricContext;\n geometry.position = posEC;\n geometry.normal = normalEC;\n geometry.viewDir = positionToEyeECDir;\n var reflectedLight = ReflectedLight(vec3<f32>(0.0), vec3<f32>(0.0), vec3<f32>(0.0), vec3<f32>(0.0));\n reflectedLight.directDiffuse += totalDiffuseLight * diffuseColor;\n reflectedLight.directSpecular += totalSpecularLight * Material.uSpecularColor.rgb;\n \n getEnvironmentColor(geometry, material, &reflectedLight);\n\n var shadow = 1.0;\n#ifdef SHADOW_MAP\n shadow = getShadowVisibility(vec4(posEC, 1.0), normalEC, -posEC.z);\n#endif\n\n var color = reflectedLight.directDiffuse * shadow + reflectedLight.directSpecular * shadow + reflectedLight.indirectDiffuse + reflectedLight.indirectSpecular;\n return vec4(LINEARtoSRGB(color.rgb), inBaseColorWithAlpha.a);\n}\n",shaderModelBase="\nstruct IncidentLight\n{\n direction : vec3<f32>,\n color : vec3<f32>,\n visible : bool\n};\n\nstruct GeometricContext {\n position : vec3<f32>,\n normal : vec3<f32>,\n viewDir : vec3<f32>\n};\n\nstruct PhysicalMaterial {\n diffuseColor : vec3<f32>,\n roughness : f32,\n specularColor : vec3<f32>,\n specularF90 : f32\n};\n\nstruct ReflectedLight {\n directDiffuse : vec3<f32>,\n directSpecular : vec3<f32>,\n indirectDiffuse : vec3<f32>,\n indirectSpecular : vec3<f32>\n};\n\n#define saturate(a) clamp( a, 0.0, 1.0 )\n\n#include <getEnvironmentColor>\n\n//参考UE4.24实现计算精确光源的衰减\nfn punctualLightIntensityToIrradianceFactor(lightDistance : f32, cutoffDistance : f32, decayExponent : f32) ->f32\n{\n if ( decayExponent > 0.0 ) {\n return pow( saturate( 1.0 - lightDistance / cutoffDistance ), decayExponent );\n }\n return 1.0;\n}\n\nfn sRGBToLinear(srgbIn : vec4<f32>) -> vec4<f32> {\n var linearOut = pow(vec3<f32>(srgbIn.x, srgbIn.y, srgbIn.z), vec3<f32>(2.2f, 2.2f, 2.2f));\n return vec4<f32>(linearOut.x, linearOut.y, linearOut.z, srgbIn.w);\n}\n\nfn sRGBToLinear_vf3(srgbIn : vec3<f32>) -> vec3<f32> {\n return pow(srgbIn, vec3<f32>(2.2f, 2.2f, 2.2f));\n}\n\nfn LINEARtoSRGB(linearIn : vec3<f32>) -> vec3<f32>{\n #ifndef HDR\n return pow(linearIn, vec3<f32>(1.0/2.2));\n #else\n return linearIn;\n #endif\n}\n\n",getEnvironmentColor="\n\nvar uBrdfLut : texture_2d<f32>;\nvar uBrdfLutSampler : sampler;\n\nvar uEnvironmentMap : texture_cube<f32>;\nvar uEnvironmentMapSampler : sampler;\n\n//#include <cubeUV_reflection>\n#include <hemisphereLightDecl>\n\nfn DFGApprox( normal : vec3<f32>, viewDir : vec3<f32>, roughness : f32) ->vec2<f32> {\n var dotNV = saturate( dot( normal, viewDir ) );\n const c0 = vec4<f32>( - 1, - 0.0275, - 0.572, 0.022 );\n const c1 = vec4<f32>( 1, 0.0425, 1.04, - 0.04 );\n var r = roughness * c0 + c1;\n var a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n var fab = vec2<f32>( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\n\nfn computeMultiscattering(normal : vec3<f32>, viewDir : vec3<f32>, specularColor : vec3<f32>, specularF90 : f32, roughness : f32, \n singleScatter : ptr<function, vec3<f32>>, multiScatter : ptr<function, vec3<f32>>) {\n var fab = DFGApprox( normal, viewDir, roughness );\n var Fr = specularColor;\n var FssEss = Fr * fab.x + specularF90 * fab.y;\n var Ess = fab.x + fab.y;\n var Ems = 1.0 - Ess;\n var Favg = Fr + ( 1.0 - Fr ) * 0.047619;\n var Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n var lastSingle = (*(singleScatter)) + FssEss;\n (*singleScatter) = lastSingle;\n var lastMulti = (*(multiScatter)) + Fms * Ems;\n (*multiScatter) = lastMulti;\n}\n\nfn indirectSpecular_Physical(radiance : vec3<f32>, irradiance : vec3<f32>, geometry : GeometricContext, material : PhysicalMaterial, reflectedLight : ptr<function, ReflectedLight>) {\n var singleScattering = vec3<f32>(0.0);\n var multiScattering = vec3<f32>(0.0);\n var cosineWeightedIrradiance = irradiance;\n computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, &singleScattering, &multiScattering);\n var totalScattering = singleScattering + multiScattering;\n var diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n (*(reflectedLight)).indirectSpecular += radiance * singleScattering;\n (*(reflectedLight)).indirectSpecular += multiScattering * cosineWeightedIrradiance;\n (*(reflectedLight)).indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n\nfn getEnvironmentColor(geometry : GeometricContext, material : PhysicalMaterial, reflectedLight : ptr<function, ReflectedLight> )\n{\n var roughness = material.roughness;\n var posEC = geometry.position;\n var n = geometry.normal;\n var v = geometry.viewDir;\n\n var irradiance = vec3<f32>(0.0);\n var radiance = vec3<f32>(0.0);\n \n#ifdef HAS_HEMISPHERE_LIGHTS\n // TODO\n // HemisphereLight hemiLight;\n // hemiLight.skyColor = uSkyColor[0];\n // hemiLight.groundColor = uGroundColor[0];\n // hemiLight.direction = normalize(czm_normal * vec3(0.0, 0.0, 1.0));\n // irradiance += getHemisphereLightIrradiance( hemiLight, geometry );\n#endif\n\n#ifdef BRDF\n#ifdef IBL\n\n#ifdef KtxEnvMap\n var modelView = Scene.uView * Mesh.uModelMatrix;\n let modelViewRow0 : vec4<f32> = modelView[0u];\n let modelViewRow1 : vec4<f32> = modelView[1u]; \n let modelViewRow2 : vec4<f32> = modelView[2u]; \n var fixedToENU = mat3x3<f32>(\n vec3<f32>(modelViewRow0.x, modelViewRow1.x, modelViewRow2.x), \n vec3<f32>(modelViewRow0.y, modelViewRow1.y, modelViewRow2.y), \n vec3<f32>(modelViewRow0.z, modelViewRow1.z, modelViewRow2.z)\n );\n const yUpToZUp = mat3x3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0);\n var cubeDir = normalize( yUpToZUp * fixedToENU * reflect(-v, n) );\n var worldNormal = normalize( yUpToZUp * fixedToENU * n );\n irradiance = czm_sphericalHarmonics(worldNormal, Scene.uSphericalHarmonicCoefficients);\n radiance = czm_sampleOctahedralProjection(Scene.uSpecularEnvironmentMapSize, cubeDir, \n roughness * Scene.uSpecularEnvironmentMapsMaximumLOD, Scene.uSpecularEnvironmentMapsMaximumLOD);\n #else\n // irradiance+= getIBLIrradiance( geometry.normal );\n // radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n#endif // KtxEnvMap\n \n#else // IBL\n var positionWC = vec3<f32>((Scene.uInverseView * vec4<f32>(posEC, 1.0f)).xyz) + Scene.uRelativeOrigin;\n var r = normalize(Scene.uInverseViewRotation * normalize(reflect(v, n)));\n var vertexRadius = length(positionWC);\n var horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n var reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(Scene.uTemeToPseudoFixed * r);\n r.x = -r.x;\n var inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n var sceneSkyBox = textureSample(uEnvironmentMap, uEnvironmentMapSampler, r).rgb * inverseRoughness;\n var atmosphereHeight = 0.05;\n var blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n var blendRegionOffset = roughness * -1.0;\n var farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n var aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n var farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n var smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n var belowHorizonColor = mix(vec3<f32>(0.1, 0.15, 0.25), vec3<f32>(0.4, 0.7, 0.9), smoothstepHeight);\n var nadirColor = belowHorizonColor * 0.5;\n var aboveHorizonColor = mix(vec3<f32>(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n var blueSkyColor = mix(vec3<f32>(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n var zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n var blueSkyDiffuseColor = vec3<f32>(0.7, 0.85, 0.9);\n var diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n var diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n var diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n var notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n var specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n var LdotZenith = clamp(dot(normalize(Scene.uInverseViewRotation * Light.uSunDirectionEC), normalize(positionWC * -1.0)), 0.001, 1.0);\n var S = acos(LdotZenith);\n var NdotZenith = clamp(dot(normalize(Scene.uInverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n var sunNdotL = clamp(dot(n, Light.uSunDirectionEC), 0.001, 1.0);\n var gamma = acos(sunNdotL);\n var numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n var denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n var luminance = 0.2 * (numerator / denominator);\n irradiance = diffuseIrradiance * luminance;\n radiance = specularIrradiance * luminance;\n#endif // IBL\n\n#else\n irradiance = Light.uAmbientLightColor.rgb * 0.6;\n#endif // BRDF\n\n indirectSpecular_Physical(radiance, irradiance, geometry, material, reflectedLight);\n}\n\n",getMetersPerPixel="\n//计算像素大小\nfn getMetersPerPixel(positionEC : vec4<f32>, pixelRatio : f32) -> f32\n{\n var width = Scene.uViewport.z;\n var height = Scene.uViewport.w;\n var pixelWidth:f32;\n var pixelHeight:f32;\n\n var top = Scene.uFrustumPlanes.x;\n var bottom = Scene.uFrustumPlanes.y;\n var left = Scene.uFrustumPlanes.z;\n var right = Scene.uFrustumPlanes.w;\n\n // if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n // {\n // var frustumWidth = right - left;\n // var frustumHeight = top - bottom;\n // pixelWidth = frustumWidth / width;\n // pixelHeight = frustumHeight / height;\n // }\n // else\n // {\n var distanceToPixel = -positionEC.z;\n var inverseNear = 1.0 / Scene.uCurrentFrustum.x;\n var tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n //}\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}",clip="\n#ifdef CLIP\n\nconst clip_lineWidth = 3.0;\n\nfn GetClipDistance(pos : vec3<f32>, planeNormal : vec3<f32>, disToOrigin : f32) -> f32\n{\n\treturn dot(planeNormal, pos) + disToOrigin;\n}\n\nfn ClipBehindAllPlane(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n var distance = 0.0;\n var result = -1.0;\n #ifdef CLIPPLANE\n distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[0].xyz, Layer.uClipPlanes[0].w);\n if (distance < 0.0)\n {\n return 1.0;\n }\n else if (distance < fBorderWidth)\n {\n result = 0.0;\n }\n #else\n var i : u32;\n for(i = 0; i < 6; i++)\n {\n distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[i].xyz, Layer.uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return 1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n #endif\n return result;\n}\n\nfn ClipBehindAnyPlane(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n var result = 1.0;\n var i : u32;\n for(i = 0; i < 6; i++)\n {\n var distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[i].xyz, Layer.uClipPlanes[i].w);\n if((distance + fBorderWidth) < 0.0)\n {\n return -1.0;\n }\n else if(distance < 0.0)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nfn ClipAnythingButLine(fBorderWidth : f32, clip_vertex : vec4<f32>) -> f32\n{\n var result = -1.0;\n var i : u32;\n for(i = 0; i < 6; i++)\n {\n var distance = GetClipDistance(clip_vertex.xyz, Layer.uClipPlanes[i].xyz, Layer.uClipPlanes[i].w);\n if(distance < 0.0)\n {\n return -1.0;\n }\n else if(distance < fBorderWidth)\n {\n result = 0.0;\n }\n }\n return result;\n}\n\nfn clip(clip_vertex : vec4<f32>, fIsFiltByID : f32) -> f32\n{\n if(fIsFiltByID < 0.1)\n {\n return 1.0;\n }\n if(Layer.uClipMode < 0.5)\n {\n return 1.0;\n }\n var fBorderWidth = 1.0;\n var clipResult = 1.0;\n if(Layer.uClipLineColor.a < 0.01)\n {\n fBorderWidth = 0.0;\n }\n if(Layer.uClipMode < 1.5)\n {\n clipResult = ClipBehindAnyPlane(fBorderWidth, clip_vertex);\n }\n else if(Layer.uClipMode < 2.5)\n {\n clipResult = ClipBehindAllPlane(fBorderWidth, clip_vertex);\n }\n else if(Layer.uClipMode < 3.5)\n {\n clipResult = ClipAnythingButLine(fBorderWidth, clip_vertex);\n }\n return clipResult;\n}\n#endif\n",calcTexCoordDecl="\n#ifdef TexCoord\n varying vTexCoord : vec4<f32>;\n varying vTexCoordZ : vec2<f32>;\n#endif\n\n#ifndef TextureBatch\n#ifdef MULTI_TEX\n varying vTexMatrix2 : vec4<f32>;\n#endif\n#endif\n\n#ifdef COMPUTE_TEXCOORD\n\n#ifdef TextureBatch\n varying vTexTran : vec4<f32>;\n varying vTexScale : vec4<f32>;\n varying vTexSize : vec4<f32>;\n varying vMaxMipLevel : vec2<f32>;\n#else\n varying vTexMatrix : vec4<f32>;\n#endif\n\n#include <calculateMipLevel>\n\n #ifdef TextureBatch\n fn getBatchUV(uv : vec2<f32>, translate : vec2<f32>, scale : vec2<f32>, dim : vec2<f32>, mipLevel : f32) -> vec2<f32>\n {\n var temp : f32;\n var texTranslate = vec2(translate.x, translate.y);\t\n if(mipLevel > 0.0)\n {\n texTranslate.x = translate.x + scale.x;\n temp = pow(2.0, mipLevel - 1.0);\n texTranslate.y = translate.y + scale.y * (temp - 1.0) / temp;\n }\n var texScale = 1.0 / pow(2.0, mipLevel);\n var outUV = fract(uv);\n var offsetX = pow(2.0, mipLevel) / dim.x;\n var offsetY = pow(2.0, mipLevel) / dim.y;\n outUV.x = clamp(outUV.x, 0.0 + offsetX, 1.0 - offsetX);\n outUV.y = clamp(outUV.y, 0.0 + offsetY, 1.0 - offsetY);\n outUV.x = outUV.x * texScale * scale.x + texTranslate.x;\n outUV.y = outUV.y * texScale * scale.y + texTranslate.y;\n return outUV;\n }\n #else\n fn getUV(uv : vec2<f32>, translate : vec2<f32>, uvOffset : vec4<f32>, scale : f32, width : f32, mipLevel : f32, texCoordZ : f32) -> vec2<f32> {\n var texCoord : vec2<f32>;\n var offset : f32;\n if ((texCoordZ < -9000.0f)) {\n texCoord = vec2<f32>(uv.x, uv.y);\n } else {\n texCoord = fract(uv);\n offset = (pow(2.0f, mipLevel) / width);\n texCoord = clamp(texCoord, vec2<f32>(offset, offset), vec2<f32>(1.0f - offset, 1.0f - offset));\n texCoord.x = ((texCoord.x + translate.x) * scale);\n texCoord.y = ((texCoord.y + translate.y) * scale);\n }\n texCoord = ((texCoord * vec2<f32>(uvOffset.z, uvOffset.w)) + vec2<f32>(uvOffset.x, uvOffset.y));\n return texCoord;\n }\n #endif\n // end TextureBatch\n\n#endif\n// end COMPUTE_TEXCOORD\n",getEmissiveTextureAtlasColor="\n#ifdef EMISSION_TEXTURE_ATLAS\nvar uEmissionTexAtlas : texture_2d<f32>;\nvar uEmissionTexAtlasSampler : sampler;\nvarying vLayerTexCoord : vec2<f32>;\nvarying vModIndexAndTexIndex : vec2<f32>;\nfn getEmissiveTextureAtlasColor(w : f32) -> vec3<f32>\n{\n var texColor = vec3<f32>(0.0);\n var emissionTexCoord : vec2<f32>;\n var nEmissionTexTexIdx = i32(floor(vModIndexAndTexIndex.y + 0.5));\n var atlasTexCoord : vec2<f32>;\n for(var i : i32 = 0; i < i32(Layer.uEmissionTexAtlasCount); i++){\n if(nEmissionTexTexIdx == i){\n emissionTexCoord.x = length(vLayerTexCoord) * Layer.uLayerCornerLength / Layer.uEmissionTexAtlasTilingAndOffset[i].x - floor(length(vLayerTexCoord) * Layer.uLayerCornerLength / Layer.uEmissionTexAtlasTilingAndOffset[i].x);\n emissionTexCoord.y = (w - Layer.uMinCategoryOrHypFloor) / Layer.uEmissionTexAtlasTilingAndOffset[i].y - floor((w - Layer.uMinCategoryOrHypFloor) / Layer.uEmissionTexAtlasTilingAndOffset[i].y);\n emissionTexCoord.x += Layer.uEmissionTexAtlasTilingAndOffset[i].z;\n emissionTexCoord.y += vModIndexAndTexIndex.x + Layer.uEmissionTexAtlasTilingAndOffset[i].w;\n emissionTexCoord.x = fract(emissionTexCoord.x);\n emissionTexCoord.y = fract(emissionTexCoord.y);\n atlasTexCoord = mix(Layer.uEmissionTexAtlasRects[i].xy, Layer.uEmissionTexAtlasRects[i].zw, emissionTexCoord);\n break;\n }\n }\n texColor = textureSample(uEmissionTexAtlas, uEmissionTexAtlasSampler, atlasTexCoord).rgb;\n var normalMC = normalize(czm_computeNormal(vPositionMC.xyz));\n var isNotTopFace = 1.0 - step(0.95, normalMC.z);\n var dayTime = 1.0 - czm_RGBToHSL(Light.uAmbientLightColor.rgb).z;\n var emissionTexColor = Layer.uEmissionColor.rgb * texColor * dayTime * isNotTopFace;\n return emissionTexColor;\n}\n#endif\n",computeWValue="\nfn computeWValue(vertexPos : ptr<function, vec4<f32>>) -> f32{\n var realWValue : f32 = (*vertexPos).w;\n#ifdef HypColorByZValue\n realWValue = (*vertexPos).z;\n#endif\n#ifdef TEXTURE_COORD_ONE_IS_W\n realWValue = aTexCoord0.x;\n#endif\n#ifdef USE_VertexWeight\n realWValue = aVertexWeight;\n #ifdef MultiTemporalWeight\n realWValue = mix(aVertexWeight, aVertexWeight_1, fMultiTemporalFactor);\n #ifdef ChangeZValue\n (*vertexPos).z += realWValue;\n #endif\n #endif\n#endif\n#ifdef COMPUTE_W_VALUE\n wValue = realWValue + Layer.uTranslationAndBottom.w;\n#endif\n return realWValue;\n}\n",setAlphaByWValue="\n#ifdef W_VISIBLE\n var uCategorieTexture : texture_2d<f32>;\n var uCategorieTextureSampler : sampler;\n \n fn setAlphaByWValue(w : f32, color : ptr<function, vec4<f32>>)\n {\n var category_u = abs(w - Layer.uMinCategory);\n var category_y = ceil(category_u / Layer.uCategoryWidht) / Layer.uCategoryHeight - 0.5 / Layer.uCategoryHeight;\n var category_x = (category_u - Layer.uCategoryWidht * floor(category_u / Layer.uCategoryWidht)) / Layer.uCategoryWidht + 0.5 / Layer.uCategoryWidht;\n var categoryTexCoord = vec2<f32>(category_x , category_y);\n var category = textureSampleLevel(uCategorieTexture, uCategorieTextureSampler, categoryTexCoord, 0.0f).a;\n (*color).a *= 1.0 - category;\n }\n#endif\n",adjustColor="\n#ifdef ADJUST_COLOR\nfn adjustColor(inputColor : vec3<f32>) ->vec3<f32>\n{\n var outputColor : vec3<f32> = inputColor;\n outputColor = mix(vec3(0.0), outputColor.rgb, Layer.uBrightness);\n outputColor = mix(vec3(0.5), outputColor.rgb, Layer.uContrast);\n outputColor = czm_hue(outputColor.rgb, Layer.uHue);\n outputColor = clamp(outputColor.rgb, vec3<f32>(0.0), vec3<f32>(1.0));\n outputColor = czm_saturation(outputColor.rgb, Layer.uSaturation);\n outputColor = pow(outputColor.rgb, vec3(Layer.uOneOverGamma));\n return outputColor;\n}\n#endif\n",calculatePolyTexCoord="\nfn calculatePolyTexCoord(vertexPos: vec4<f32>, rectPos : vec4<f32>, ptInRect : ptr<function, f32>) -> vec2<f32>\n{\n var realVertexPos = vertexPos;\n var vecRatio = vec2(rectPos.z - rectPos.x, rectPos.w - rectPos.y);\n var texCoord = vec2(realVertexPos.x - rectPos.x, realVertexPos.y - rectPos.y);\n texCoord.x = texCoord.x / vecRatio.x;\n texCoord.y = texCoord.y / vecRatio.y;\n (*ptInRect) = step(0.0, texCoord.x) * step(0.0, texCoord.y) * step(0.0, 1.0 - texCoord.x) * step(0.0, 1.0 - texCoord.y);\n texCoord = clamp(texCoord, vec2(0.0), vec2(1.0));\n return texCoord;\n}\n",getVertexByFlatten="\n#ifdef FALTTEN\n var uFlattenTexture : texture_2d<f32>;\n var uFlattenTextureSampler : sampler;\n\n fn getVertexByFlatten(posInLayerCoord : vec4<f32>, layerBottom : f32) -> vec4<f32>\n {\n var vecPos = Mesh.uGeoMatrix * vec4(posInLayerCoord.xyz, 1.0);\n var vecRatio = vec2(Layer.uRect.z - Layer.uRect.x, Layer.uRect.w - Layer.uRect.y);\n var vecTexCoord = vec2(vecPos.x - Layer.uRect.x, vecPos.y - Layer.uRect.y);\n vecTexCoord.x = vecTexCoord.x / vecRatio.x;\n vecTexCoord.y = vecTexCoord.y / vecRatio.y;\n if(vecTexCoord.x > 1.0 || vecTexCoord.x < 0.0 || vecTexCoord.y > 1.0 || vecTexCoord.y < 0.0)\n {\n return posInLayerCoord;\n }\n var value = textureSampleLevel(uFlattenTexture, uFlattenTextureSampler, vecTexCoord.xy, 0.0);\n #ifdef UseFloatTexture\n var fHeight = value.r;\n #else\n var fHeight = czm_unpackValue(value);\n #endif\n if(vecPos.z > fHeight && value.a > 0.5)\n {\n var fDepthOffset = clamp((Layer.uCameraHeight - fHeight - layerBottom) * 0.0001 * (vecPos.z + layerBottom - fHeight), 0.001, 3.0);\n vecPos.z = fHeight + fDepthOffset;\n vecPos.w = vecPos.z;\n }\n return Mesh.uInverseGeoMatrix * vec4(vecPos.xyz, 1.0);\n }\n#endif\n",HypSometric="\n#ifdef HYPSOMETRIC\n#include <getVolumeValue>\n\nvar uHypsometricTexture : texture_2d<f32>;\nvar uHypsometricTextureSampler : sampler;\nvar uHypsometricRenderTexture : texture_2d<f32>;\nvar uHypsometricRenderTextureSampler : sampler;\n\nvarying vecHypTexCoord : vec2<f32>;\n#ifdef Volume\nvarying vecRotioCoord : vec3<f32>;\n#endif\n\nfn computeMixCon(fValue : f32) -> f32\n{\n var distanceToContour : f32;\n if(abs(Layer.uHypMaxVisibleValue - Layer.uHypMinVisibleValue) > 0.1)\n {\n if(fValue < 0.5)\n {\n var t = fValue - 0.0002;\n var m = t - floor(t / Layer.uHypContourInterval) * Layer.uHypContourInterval;\n distanceToContour = m;\n }\n else\n {\n var t = floor(fValue / Layer.uHypContourInterval);\n distanceToContour = abs(fValue - (t * Layer.uHypContourInterval) - 0.1);\n }\n }\n else\n {\n distanceToContour = abs(fValue - Layer.uHypMaxVisibleValue);\n }\n var dxc = abs(dpdx(fValue));\n var dyc = abs(dpdy(fValue));\n var dF = max(dxc, dyc);\n if(distanceToContour < dF){\n return 1.0;\n }\n else{\n return 0.0;\n }\n}\n\nfn computeContourMapColor(fValue : f32) -> vec4<f32>\n{\n var threshold = abs(Layer.uHypCeil - Layer.uHypFloor);\n var contourRate = (fValue - Layer.uHypFloor) / threshold;\n var finalCoord = clamp(contourRate, 0.0, 1.0);\n var count = floor(finalCoord * 16.0);\n var y = (count*2.0 + 1.0)/32.0;\n var x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n var contourCoord = vec2(x, y);\n return textureSampleLevel(uHypsometricTexture, uHypsometricTextureSampler, contourCoord, 0.0).rgba;\n}\n\nfn branchFreeTernary(comparison : bool, a : f32, b : f32) ->f32\n{\n var useA = f32(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\nfn getContourMapColor(oriColor : vec4<f32>, inValue : f32) -> vec4<f32>\n{\n var fValue = inValue;\n var contourMapColor = vec4(0.0);\n var finalOpacity = Layer.uHypOpacity;\n var output = vec4<f32>(0.0);\n#ifdef Volume\nvar aRatioT = vecRotioCoord;\n if((aRatioT.x < 1.0 && aRatioT.x >0.0) && (aRatioT.y < 1.0 && aRatioT.y >0.0) && (aRatioT.z < 1.0 && aRatioT.z >0.0))\n {\n if(S3MVolume.uVolumeType > 0.5)\n {\n var volumeColor = getVolumeValue(aRatioT);\n if(Layer.uMixColorType > 0.5)\n {\n volumeColor = volumeColor * oriColor;\n }\n output = volumeColor;\n }\n var noValue : f32;\n var texTest = getVolumeValueWithNoValue(aRatioT, &noValue);\n if(noValue > 0.5)\n {\n fValue = Layer.uDataFloor + texTest * (Layer.uDataCeil - Layer.uDataFloor);\n }\n else\n {\n fValue = Layer.uHypMaxVisibleValue + abs(Layer.uHypMaxVisibleValue * 0.1);\n }\n }\n else\n {\n fValue = Layer.uHypMaxVisibleValue + abs(Layer.uHypMaxVisibleValue * 0.1);\n }\n#endif\n var extendHeight = branchFreeTernary(Layer.uHypContourFillMode > 2.9, 0.0, branchFreeTernary(Layer.uHypContourFillMode > 1.9, 5.0, 0.0));\n var mixCon = computeMixCon(fValue);\n if(length(output) > 0.0 )\n {\n return output;\n }\n if(fValue > Layer.uHypMaxVisibleValue + extendHeight || fValue < Layer.uHypMinVisibleValue - extendHeight)\n {\n return Layer.uNoValueColor * oriColor;\n }\n if(Layer.uHypContourFillMode > 2.9)\n {\n var mix_con = mixCon;\n contourMapColor = mix(computeContourMapColor(fValue), Layer.uHypLineColor, mix_con);\n }\n else if(Layer.uHypContourFillMode > 1.9)\n {\n finalOpacity = mixCon;\n contourMapColor = Layer.uHypLineColor;\n }\n else if(Layer.uHypContourFillMode > 0.9)\n {\n contourMapColor = computeContourMapColor(fValue);\n }\n else\n {\n finalOpacity = 0.0;\n }\n var finalColor = mix(oriColor, contourMapColor, finalOpacity);\n#ifdef PT_CLOUD\n finalColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n#endif\n return finalColor;\n}\n\n#ifdef Volume2\nfn getContourValue(volColor : vec4<f32>) -> f32\n{\n var noValue = volColor.a;\n var texTest = clamp(czm_unpackVolume(volColor.zyx), 0.0, 1.0);\n\n var fValue;\n if(noValue > 0.5)\n {\n fValue = uDataFloor + texTest * (uDataCeil - uDataFloor);\n }\n else\n {\n fValue = Layer.uHypMaxVisibleValue + abs(Layer.uHypMaxVisibleValue * 0.1);\n }\n \n return fValue;\n}\n\nfn getHypsometricColor(oriColor : vec4<f32>, volColor : vec4<f32>) -> vec4<f32>\n{\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var hypColor = textureSample(uHypsometricRenderTexture, uHypsometricRenderTextureSampler, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n \n if(uFilterMode > 0.5) {\n var finalColor = volColor * oriColor;\n\n if(Layer.uMixColorType > 0.5)\n {\n finalColor = volColor;\n }\n return finalColor;\n }\n \n var fValue = getContourValue(volColor);\n return getContourMapColor(oriColor, fValue);\n}\n\n#else\n\nfn getHypsometricColor(oriColor : vec4<f32>, wValue : f32)-> vec4<f32>\n{\n var fValue = wValue;\n var output : vec4<f32> = getContourMapColor(oriColor, fValue);\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var hypColor = textureSample(uHypsometricRenderTexture, uHypsometricRenderTextureSampler, vecHypTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return output;\n}\n\nfn getHypsometricColorByGeoBounds(oriColor : vec4<f32>, wValue : f32, hypRect : vec4<f32>, vTexCoord : vec2<f32>, geoBounds : vec4<f32>) -> vec4<f32>\n{\n var output : vec4<f32> = getContourMapColor(oriColor, wValue);\n if(Layer.uHypHasAnalysisRegion > 0.1)\n {\n var polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (geoBounds.z - geoBounds.x) + geoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (geoBounds.w - geoBounds.y) + geoBounds.y;\n if(polyTexCoord.x < hypRect.x || polyTexCoord.x>hypRect.z || polyTexCoord.y< hypRect.y || polyTexCoord.y > hypRect.w)\n {\n return oriColor;\n }\n var hypColor = textureSample(uHypsometricRenderTexture, uHypsometricRenderTextureSampler, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n return oriColor;\n }\n }\n return output;\n}\n#endif\n\n#endif\n",getVolumeValue="\n#ifdef Volume\nvar uVolumeTexture : texture_2d<f32>;\nvar uVolumeTextureSampler : sampler;\n\n#ifdef TIME_ORDER\nvar uNextVolumeTexture : texture_2d<f32>;\nvar uNextVolumeTextureSampler : sampler;\nuniform uTimeRatio : f32;\n#endif\n\nfn unpackVolume(packedDepth : vec3<f32>) -> f32\n{\n return dot(packedDepth, vec3(1.0, 1.0 / 255.0, 1.0 / 65025.0));\n}\n\nfn computeVolumeTextureCoord(texCoord : vec3<f32>, fLevel : f32) -> vec2<f32>\n{\n var yOffset = floor((fLevel+0.25/ S3MVolume.uVolSideBlockCount) / S3MVolume.uVolSideBlockCount);\n var xOffset = fLevel - yOffset * S3MVolume.uVolSideBlockCount;\n var texCoordV = (texCoord.y * S3MVolume.uVolHeight + yOffset * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n var texCoordU = (texCoord.x * S3MVolume.uVolWidth + xOffset * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n return vec2(texCoordU, texCoordV);\n}\n\nfn computeVolumeValue(topVolumeValue : vec4<f32>, bottomVolumeValue : vec4<f32>, inRatio : f32, noValue : ptr<function, f32>) -> f32\n{\n var ratio = inRatio;\n var fValue1 = clamp(unpackVolume(topVolumeValue.xyz),0.0,1.0);\n var fValue2 = clamp(unpackVolume(bottomVolumeValue.xyz),0.0,1.0);\n if(S3MVolume.uVolFilterMode >0.5)\n {\n if(ratio<0.5)\n {\n ratio = 0.0;\n }\n else\n {\n ratio = 1.0;\n }\n }\n (*noValue) = mix(topVolumeValue.a, bottomVolumeValue.a, ratio);\n if(topVolumeValue.a < 0.5)\n {\n fValue1 = fValue2;\n }\n if(bottomVolumeValue.a < 0.5)\n {\n fValue2 = fValue1;\n }\n return mix(fValue1, fValue2, ratio);\n}\n\nfn getVolumeValueWithNoValue(texCoord : vec3<f32>, noValue : ptr<function, f32>) -> f32\n{\n var fLevel = (S3MVolume.uVolDepth - 1.0) * texCoord.z;\n var bottomLevel= floor(fLevel);\n var topLevel = bottomLevel + 1.0;\n var ratio = topLevel - fLevel;\n var topTexCoord = computeVolumeTextureCoord(texCoord, topLevel);\n var bottomTexCoord = computeVolumeTextureCoord(texCoord, bottomLevel);\n\n var topVolumeValue = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, topTexCoord, 0.0);\n var bottomVolumeValue = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, bottomTexCoord, 0.0);\n var fResult = computeVolumeValue(topVolumeValue, bottomVolumeValue, ratio, noValue);\n#ifdef TIME_ORDER\n var topNextVolumeValue = textureSampleLevel(uNextVolumeTexture, uNextVolumeTextureSampler, topTexCoord, 0.0);\n var bottomNextVolumeValue = textureSampleLevel(uNextVolumeTexture, uNextVolumeTextureSampler, bottomTexCoord, 0.0);\n var fNextResult = computeVolumeValue(topNextVolumeValue, bottomNextVolumeValue, ratio, noValue);\n fResult = mix(fResult, fNextResult, uTimeRatio);\n#endif\n return fResult;\n}\n\nfn getVolumeValue(texCoord : vec3<f32>) -> vec4<f32>\n{\n\tvar fLevel = (S3MVolume.uVolDepth - 1.0) * texCoord.z;\n\tvar bottomLevel= floor(fLevel);\n\tvar topLevel = bottomLevel + 1.0;\n\tvar ratio = topLevel - fLevel;\n\tvar yOffset1 = floor((topLevel+0.25/ S3MVolume.uVolSideBlockCount) / S3MVolume.uVolSideBlockCount);\n\tvar xOffset1 = topLevel - yOffset1 * S3MVolume.uVolSideBlockCount;\n\tvar texCoordV1 = (texCoord.y * S3MVolume.uVolHeight + yOffset1 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar texCoordU1 = (texCoord.x * S3MVolume.uVolWidth + xOffset1 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar volumeColor1 = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, vec2(texCoordU1,texCoordV1), 0.0);\n\tvar yOffset2 = floor((bottomLevel+0.25 / S3MVolume.uVolSideBlockCount) / S3MVolume.uVolSideBlockCount);\n\tvar xOffset2 = bottomLevel - yOffset2 * S3MVolume.uVolSideBlockCount;\n\tvar texCoordV2 = (texCoord.y * S3MVolume.uVolHeight + yOffset2 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar texCoordU2 = (texCoord.x * S3MVolume.uVolWidth + xOffset2 * S3MVolume.uVolBlockLength) / S3MVolume.uVolTexLength;\n\tvar volumeColor2 = textureSampleLevel(uVolumeTexture, uVolumeTextureSampler, vec2(texCoordU2, texCoordV2), 0.0);\n\n\tif(S3MVolume.uVolFilterMode >0.5)\n\t{\n\t\tif(ratio<0.5)\n\t\t{\n\t\t\tratio = 0.0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tratio = 1.0;\n\t\t}\n\t}\n\n\tvar volumeColor = mix(volumeColor1, volumeColor2, ratio);\n\n\treturn volumeColor;\n}\n#endif\n",splitClip="\n#ifdef APPLY_SWIPE\nfn rollerShutter(coord : vec2<f32>, region : vec4<f32>)\n{\n var f = step(region.xw, coord);\n var s = step(coord, region.zy);\n if (f.x * f.y * s.x * s.y < 1.0)\n {\n discard;\n };\n}\n#endif\n",executeExcavation="\n#ifdef EXCAVATION\nvar uExcavationTexture : texture_2d<f32>;\nvar uExcavationTextureSampler : sampler;\nvarying vExcavationVertexPos : vec4<f32>;\nfn executeExcavation() -> bool\n{\n var hasExcavation = 1.0;\n var vecExcavationTexCoord = calculatePolyTexCoord(vExcavationVertexPos, Layer.uExcavationRect, &hasExcavation);\n var excavationInside = (Layer.uExcavationMode < 0.5);\n if(hasExcavation < 0.1)\n {\n return !excavationInside;\n }\n \n if(excavationInside)\n {\n return textureSampleLevel(uExcavationTexture, uExcavationTextureSampler, vecExcavationTexCoord.xy, 0.0).r > 0.5;\n }\n \n return textureSampleLevel(uExcavationTexture, uExcavationTextureSampler, vecExcavationTexCoord.xy, 0.0).r < 0.5;\n}\n#endif\n",S3MVolumeUboDecl="\nstruct S3MVolumeUBO {\n uVolSideBlockCount : f32,\n uVolBlockLength : f32,\n uVolTexLength : f32,\n uVolWidth : f32,\n uVolHeight : f32,\n uVolDepth : f32,\n uVolFilterMode : f32,\n uVolumeType : f32\n};\nvar<uniform> S3MVolume : S3MVolumeUBO;\n",sketchMode="\nvar uNormalDepthTexture : texture_2d<f32>;\nvar uNormalDepthTextureSampler : sampler;\nfn edgeDetection(lineWidth : f32) -> f32\n{\n var center : vec2<f32> = gl_FragCoord.xy / uniforms.czm_globeDepthTextureDim.xy;\n var off : vec2<f32> = lineWidth / uniforms.czm_globeDepthTextureDim.xy;\n var tex_nw : vec4<f32> = vec4<f32>(center.x+off.x, center.y+off.y, 1.0f, 1.0f);\n var val_nw : vec4<f32> = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_nw.xy);\n val_nw.x = ((val_nw.xyz * 2.0f) - 1.0f).x;\n val_nw.y = ((val_nw.xyz * 2.0f) - 1.0f).y;\n val_nw.z = ((val_nw.xyz * 2.0f) - 1.0f).z;\n var tex_ne = vec4<f32>(center.x-off.x, center.y+off.y, 1.0f, 1.0f);\n var val_ne : vec4<f32> = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_ne.xy);\n val_ne.x = ((val_ne.xyz * 2.0f) - 1.0f).x;\n val_ne.y = ((val_ne.xyz * 2.0f) - 1.0f).y;\n val_ne.z = ((val_ne.xyz * 2.0f) - 1.0f).z;\n var tex_sw = vec4<f32>(center.x+off.x, center.y-off.y, 1.0, 1.0);\n var val_sw : vec4<f32> = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_sw.xy);\n val_sw.x = ((val_sw.xyz * 2.0 ) - 1.0).x;\n val_sw.y = ((val_sw.xyz * 2.0 ) - 1.0).y;\n val_sw.z = ((val_sw.xyz * 2.0 ) - 1.0).z;\n var tex_se = vec4<f32>(center.x-off.x, center.y-off.y, 1.0f, 1.0f);\n var val_se : vec4<f32> = textureSample(uNormalDepthTexture, uNormalDepthTextureSampler, tex_se.xy);\n val_se.x = ((val_se.xyz * 2.0) - 1.0).x;\n val_se.y = ((val_se.xyz * 2.0) - 1.0).y;\n val_se.z = ((val_se.xyz * 2.0) - 1.0).z;\n var discontinuity = 0.0f;\n var dot0 = dot(val_nw.xyz, val_se.xyz);\n var dot1 = dot(val_ne.xyz, val_sw.xyz);\n discontinuity = 0.5*(dot0+dot1);\n return discontinuity;\n}\nfn sketchMode(inputColor : vec4<f32>, lineColor : vec4<f32>, lineWidth : f32) -> vec4<f32>\n{\n var outputColor = inputColor;\n var discontinuity : f32 = edgeDetection(lineWidth);\n discontinuity = clamp(discontinuity, 0.0f, 1.0f);\n if(Layer.uFillStyle == 1.0f)\n {\n outputColor = lineColor;\n outputColor.a = (1.0f - sign(discontinuity - 0.5f)) * 0.5f;\n outputColor.a *= lineColor.a;\n }\n else\n {\n var mixLineColor : vec3<f32> = mix(inputColor.rgb, vec3<f32>(lineColor.rgb), lineColor.a);\n var outColor = mix(mixLineColor, inputColor.rgb, discontinuity);\n outputColor.r = outColor.r;\n outputColor.g = outColor.g;\n outputColor.b = outColor.b;\n }\n return outputColor;\n}\n",getNormalEC="\nfn getNormalEC(vNormalEC : vec3<f32>, modelMatrix : mat4x4<f32>, posMC : vec3<f32>) -> vec3<f32>\n{ \n var faceDirection = select(-1.0, 1.0, gl_FrontFacing);\n var normalMatrix = getNormalMatrix(Scene.uView, modelMatrix);\n var normalEC = normalize(vNormalEC);\n #ifndef HAS_NORMAL\n normalEC = normalize(normalMatrix * czm_computeNormal(posMC.xyz));\n #endif\n return normalEC * faceDirection;\n}\n",getNormalMatrix="\nfn getNormalMatrix(viewMatrix : mat4x4<f32>, modelMatrix : mat4x4<f32>) -> mat3x3<f32>{\n var modelView = viewMatrix * modelMatrix;\n var modelViewRow0 : vec4<f32> = modelView[0u];\n var modelViewRow1 : vec4<f32> = modelView[1u]; \n var modelViewRow2 : vec4<f32> = modelView[2u]; \n var normalMatrix = mat3x3<f32>(\n vec3<f32>(modelViewRow0.x, modelViewRow0.y, modelViewRow0.z), \n vec3<f32>(modelViewRow1.x, modelViewRow1.y, modelViewRow1.z), \n vec3<f32>(modelViewRow2.x, modelViewRow2.y, modelViewRow2.z));\n return normalMatrix;\n}";const ShaderChunk={preClipFS:preClipFS,writeFragDepth:writeFragDepth,renderNormal:renderNormal,renderNormalAndDepth:renderNormalAndDepth,renderPrePass:renderPrePass,calculateMipLevel:calculateMipLevel,getTextureColorDecl:getTextureColorDecl,rainDecl:rainDecl,snowDecl:snowDecl,directionLightDecl:directionLightDecl,hemisphereLightDecl:hemisphereLightDecl,pointLightDecl:pointLightDecl,spotLightDecl:spotLightDecl,lightSourceImpl:lightSourceImpl,brdf:brdf,S3MVertexFactory:S3MVertexFactory,getUVMatrixDecl:getUVMatrixDecl,S3MOperationFSDecl:S3MOperationFSDecl,shadowReceive:shadowReceive,shadowVisibility:shadowVisibility,cubeUV_reflection:cubeUV_reflection,LightUBODecl:LightUBODecl,MaterialUboDecl:MaterialUboDecl,MeshUboDecl:MeshUboDecl,LayerUboDecl:LayerUboDecl,SceneUboDecl:k$Z,ShadowUboDecl:ShadowUboDecl,blinnPhong:blinnPhong,shaderModelBase:shaderModelBase,getEnvironmentColor:getEnvironmentColor,getMetersPerPixel:getMetersPerPixel,clip:clip,calcTexCoordDecl:calcTexCoordDecl,getEmissiveTextureAtlasColor:getEmissiveTextureAtlasColor,computeWValue:computeWValue,setAlphaByWValue:setAlphaByWValue,adjustColor:adjustColor,calculatePolyTexCoord:calculatePolyTexCoord,getVertexByFlatten:getVertexByFlatten,HypSometric:HypSometric,getVolumeValue:getVolumeValue,splitClip:splitClip,executeExcavation:executeExcavation,S3MVolumeUboDecl:S3MVolumeUboDecl,sketchMode:sketchMode,getNormalEC:getNormalEC,getNormalMatrix:getNormalMatrix};var _0x44d065=(_0x1ee56b=!0,function(e,t){var i=_0x1ee56b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ee56b=!1,i}),_0x657791=_0x44d065(void 0,(function(){return _0x657791.toString().search("(((.+)+)+)+$").toString().constructor(_0x657791).search("(((.+)+)+)+$")})),_0x1ee56b;function _0x6c367a(){this.children=[]}_0x657791(),_0x6c367a.prototype.isValid=function(e){return!0},_0x6c367a.prototype.process=function(e,t){var i="";if(this.line){var n=this.line,r=t.processor;if(r){if(r.lineProcessor&&(n=r.lineProcessor(n,t.isFragment,t.processingContext)),r.attributeProcessor&&this.line.startsWith("attribute"))n=r.attributeProcessor(this.line,e,t.processingContext);else if(r.varyingProcessor&&this.line.startsWith("varying"))n=r.varyingProcessor(this.line,t.isFragment,e,t.processingContext);else if(r.uniformProcessor&&r.uniformRegexp&&r.uniformRegexp.test(this.line))!t.lookForClosingBracketForUniformBuffer&&(n=r.uniformProcessor(this.line,t.isFragment,e,t.processingContext));else if(r.uniformBufferProcessor&&r.uniformBufferRegexp&&r.uniformBufferRegexp.test(this.line))!t.lookForClosingBracketForUniformBuffer&&(n=r.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0);else if(r.textureProcessor&&r.textureRegexp&&r.textureRegexp.test(this.line))n=r.textureProcessor(this.line,t.isFragment,e,t.processingContext);else if((r.uniformProcessor||r.uniformBufferProcessor)&&this.line.startsWith("uniform")&&!t.lookForClosingBracketForUniformBuffer){/uniform\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/.test(this.line)?r.uniformProcessor&&(n=r.uniformProcessor(this.line,t.isFragment,e,t.processingContext)):r.uniformBufferProcessor&&(n=r.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0)}t.lookForClosingBracketForUniformBuffer&&-1!==this.line.indexOf("}")&&(t.lookForClosingBracketForUniformBuffer=!1,r.endOfUniformBufferProcessor&&(n=r.endOfUniformBufferProcessor(this.line,t.isFragment,t.processingContext)))}i+=n+"\r\n"}return this.children.forEach((function(n){i+=n.process(e,t)})),this.additionalDefineKey&&(e[this.additionalDefineKey]=this.additionalDefineValue||"true"),i};var _0x531604=(_0x41adf6=!0,function(e,t){var i=_0x41adf6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41adf6=!1,i}),_0x97049b=_0x531604(void 0,(function(){return _0x97049b.toString().search("(((.+)+)+)+$").toString().constructor(_0x97049b).search("(((.+)+)+)+$")})),_0x41adf6;function _0x4a6f81(){}_0x97049b(),Object.defineProperty(_0x4a6f81.prototype,"currentLine",{get:function(){return this._lines[this.lineIndex]},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4a6f81.prototype,"canRead",{get:function(){return this.lineIndex<this._lines.length-1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4a6f81.prototype,"lines",{set:function(e){this._lines=[];for(var t=0,i=e;t<i.length;t++){var n=i[t];if("#"!==n[0])if(n.trim().startsWith("//"))this._lines.push(n);else for(var r=n.split(";"),o=0;o<r.length;o++){var a=r[o];(a=a.trim())&&this._lines.push(a+(o!==r.length-1?";":""))}else this._lines.push(n)}},enumerable:!1,configurable:!0});var _0x41e470=(_0x185644=!0,function(e,t){var i=_0x185644?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x185644=!1,i}),_0x5f0b81=_0x41e470(void 0,(function(){return _0x5f0b81.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f0b81).search("(((.+)+)+)+$")})),_0x185644;function _0x19d3c4(){return null!==_0x6c367a&&_0x6c367a.apply(this,arguments)||this}_0x5f0b81(),_0x6c367a&&(_0x19d3c4.__proto__=_0x6c367a),_0x19d3c4.prototype=Object.create(_0x6c367a&&_0x6c367a.prototype),_0x19d3c4.prototype.constructor=_0x6c367a,_0x19d3c4.prototype.process=function(e,t){for(var i=0;i<this.children.length;i++){var n=this.children[i];if(n.isValid(e))return n.process(e,t)}return""};var _0x3736f0=(_0x28c2df=!0,function(e,t){var i=_0x28c2df?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28c2df=!1,i}),_0x44fbeb=_0x3736f0(void 0,(function(){return _0x44fbeb.toString().search("(((.+)+)+)+$").toString().constructor(_0x44fbeb).search("(((.+)+)+)+$")})),_0x28c2df;function _0x2e49ca(){return null!==_0x6c367a&&_0x6c367a.apply(this,arguments)||this}_0x44fbeb(),_0x6c367a&&(_0x2e49ca.__proto__=_0x6c367a),_0x2e49ca.prototype=Object.create(_0x6c367a&&_0x6c367a.prototype),_0x2e49ca.prototype.constructor=_0x6c367a,_0x2e49ca.prototype.isValid=function(e){return this.testExpression.isTrue(e)};var _0x26d317=(_0x231465=!0,function(e,t){var i=_0x231465?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x231465=!1,i}),_0x5af1a3=_0x26d317(void 0,(function(){return _0x5af1a3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5af1a3).search("(((.+)+)+)+$")})),_0x231465;function _0x42c469(){}_0x5af1a3(),_0x42c469.prototype.isTrue=function(e){return!0},_0x42c469.postfixToInfix=function(e){for(var t=[],i=0,n=e;i<n.length;i++){var r=n[i];if(void 0===_0x42c469._OperatorPriority[r])t.push(r);else{var o=t[t.length-1],a=t[t.length-2];t.length-=2,t.push("(".concat(a).concat(r).concat(o,")"))}}return t[t.length-1]},_0x42c469.infixToPostfix=function(e){for(var t=[],i=-1,n=function(){""!==(l=l.trim())&&(t.push(l),l="")},r=function(e){i<_0x42c469._Stack.length-1&&(_0x42c469._Stack[++i]=e)},o=function(){return _0x42c469._Stack[i]},a=function(){return-1===i?"!!INVALID EXPRESSION!!":_0x42c469._Stack[i--]},s=0,l="";s<e.length;){var u=e.charAt(s),c=s<e.length-1?e.substr(s,2):"";if("("===u)l="",r(u);else if(")"===u){for(n();-1!==i&&"("!==o();)t.push(a());a()}else if(_0x42c469._OperatorPriority[c]>1){for(n();-1!==i&&_0x42c469._OperatorPriority[o()]>=_0x42c469._OperatorPriority[c];)t.push(a());r(c),s++}else l+=u;s++}for(n();-1!==i;)"("===o()?a():t.push(a());return t},_0x42c469._OperatorPriority={")":0,"(":1,"||":2,"&&":3},_0x42c469._Stack=["","","","","","","","","","","","","","","","","","","",""];var _0x1fd03b=(_0xa14289=!0,function(e,t){var i=_0xa14289?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa14289=!1,i}),_0x4cc68c=_0x1fd03b(void 0,(function(){return _0x4cc68c.toString().search("(((.+)+)+)+$").toString().constructor(_0x4cc68c).search("(((.+)+)+)+$")})),_0xa14289;function _0x28cf9d(e,t){void 0===t&&(t=!1);var i=_0x42c469.call(this)||this;return i.define=e,i.not=t,i}_0x4cc68c(),_0x42c469&&(_0x28cf9d.__proto__=_0x42c469),_0x28cf9d.prototype=Object.create(_0x42c469&&_0x42c469.prototype),_0x28cf9d.prototype.constructor=_0x42c469,_0x28cf9d.prototype.isTrue=function(e){var t=void 0!==e[this.define];return this.not&&(t=!t),t};var _0x4a33fb=(_0x1b1ef2=!0,function(e,t){var i=_0x1b1ef2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b1ef2=!1,i}),_0x27adcf=_0x4a33fb(void 0,(function(){return _0x27adcf.toString().search("(((.+)+)+)+$").toString().constructor(_0x27adcf).search("(((.+)+)+)+$")})),_0x1b1ef2;function _0x579206(){return null!==_0x42c469&&_0x42c469.apply(this,arguments)||this}_0x27adcf(),_0x42c469&&(_0x579206.__proto__=_0x42c469),_0x579206.prototype=Object.create(_0x42c469&&_0x42c469.prototype),_0x579206.prototype.constructor=_0x42c469,_0x579206.prototype.isTrue=function(e){return this.leftOperand.isTrue(e)||this.rightOperand.isTrue(e)};var _0x1b88bc=(_0x476591=!0,function(e,t){var i=_0x476591?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x476591=!1,i}),_0x3ae882=_0x1b88bc(void 0,(function(){return _0x3ae882.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ae882).search("(((.+)+)+)+$")})),_0x476591;function _0x40f328(){return null!==_0x42c469&&_0x42c469.apply(this,arguments)||this}_0x3ae882(),_0x42c469&&(_0x40f328.__proto__=_0x42c469),_0x40f328.prototype=Object.create(_0x42c469&&_0x42c469.prototype),_0x40f328.prototype.constructor=_0x42c469,_0x40f328.prototype.isTrue=function(e){return this.leftOperand.isTrue(e)&&this.rightOperand.isTrue(e)};var _0x27298e=(_0xfea568=!0,function(e,t){var i=_0xfea568?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xfea568=!1,i}),_0x8d0146=_0x27298e(void 0,(function(){return _0x8d0146.toString().search("(((.+)+)+)+$").toString().constructor(_0x8d0146).search("(((.+)+)+)+$")})),_0xfea568;function _0x1819d4(e,t,i){var n=_0x42c469.call(this)||this;return n.define=e,n.operand=t,n.testValue=i,n}_0x8d0146(),_0x42c469&&(_0x1819d4.__proto__=_0x42c469),_0x1819d4.prototype=Object.create(_0x42c469&&_0x42c469.prototype),_0x1819d4.prototype.constructor=_0x42c469,_0x1819d4.prototype.isTrue=function(e){var t=e[this.define];void 0===t&&(t=this.define);var i=!1,n=parseInt(t),r=parseInt(this.testValue);switch(this.operand){case">":i=n>r;break;case"<":i=n<r;break;case"<=":i=n<=r;break;case">=":i=n>=r;break;case"==":i=n===r}return i};var _0x2393c9=(_0x50cac4=!0,function(e,t){var i=_0x50cac4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x50cac4=!1,i}),_0x174b61=_0x2393c9(void 0,(function(){return _0x174b61.toString().search("(((.+)+)+)+$").toString().constructor(_0x174b61).search("(((.+)+)+)+$")})),_0x50cac4;_0x174b61();var _0x387d68=/defined\s*?\((.+?)\)/g,_0x5edc7b=/defined\s*?\[(.+?)\]/g,_0x32e7f3=/#include\s?<(.+)>(\((.*)\))*(\[(.*)\])*/g;function _0x56a2f1(){}function O$O(e){return(e=e.replace(/\/\/.*/g,"")).replace(/\/\*\*[\s\S]*?\*\//gm,(function(e){for(var t=e.match(/\n/gm).length,i="",n=0;n<t;++n)i+="\n";return i}))}function k$Y(e,t,i,n,r){for(var o,a=0;a<r.length;++a)r[a].name===i&&(o=r[a]);if(!e$2e(o)){n=O$O(n);var s=t.defines;o={name:i,glslSource:n=_0x56a2f1.removeUnuseCode(n,s,e._sysShaderDefines),dependsOn:[],requiredBy:[],evaluated:!1},r.push(o)}return o}function z$X(e,t,i,n){if(!i.evaluated){var r=t.useWGSL?s$V._czmBuiltinsAndUniformsWGSL:s$V._czmBuiltinsAndUniforms;i.evaluated=!0;var o=i.glslSource.match(/\bczm_[a-zA-Z0-9_]*/g);e$2e(o)&&null!==o&&(o=o.filter((function(e,t){return o.indexOf(e)===t})),o.forEach((function(o){if(o!==i.name&&r.hasOwnProperty(o)){var a=k$Y(e,t,o,r[o],n);i.dependsOn.push(a),a.requiredBy.push(i),z$X(e,t,a,n)}})))}}function F$12(e){for(var t=[],i=[];e.length>0;){var n=e.pop();i.push(n),0===n.requiredBy.length&&t.push(n)}for(;t.length>0;){var r=t.shift();e.push(r);for(var o=0;o<r.dependsOn.length;++o){var a=r.dependsOn[o],s=a.requiredBy.indexOf(r);a.requiredBy.splice(s,1),0===a.requiredBy.length&&t.push(a)}}for(var l=[],u=0;u<i.length;++u)0!==i[u].requiredBy.length&&l.push(i[u]);if(0!==l.length){for(var c="A circular dependency was found in the following built-in functions/structs/constants: \n",h=0;h<l.length;++h)c=c+l[h].name+"\n";throw new t$15(c)}}function A$19(e,t,i){var n=[],r=k$Y(i,e,"main",t,n);z$X(i,e,r,n),F$12(n);for(var o="",a=n.length-1;a>=0;--a)o=o+n[a].glslSource+"\n";return o.replace(r.glslSource,"")}function W$10(e,t,i){var n,r,o="",a=e.sources;if(e$2e(a))for(n=0,r=a.length;n<r;++n)o+="\n"+a[n];o=O$O(o=U$11(!0,o));var s=e.defines;o=_0x56a2f1.removeUnuseCode(o,s,i._sysShaderDefines);var l="";e.includeBuiltIns&&(l+=A$19(e,o,i));return l+="\n",l+=o}function U$11(e,t){return t.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,(function(t,i){var n=e?ShaderChunk[i]:to[i];if(void 0===n)throw new Error("Can not resolve #include <"+i+">");return U$11(e,n)}))}function I$1h(e,t,i){var n,r,o,a="",s=e.sources;if(e$2e(s))for(n=0,r=s.length;n<r;++n)a+="\n"+s[n];a=(a=O$O(a=U$11(!1,a))).replace(/#version\s+(.*?)\n/gm,(function(e,t){if(e$2e(o)&&o!==t)throw new t$15("inconsistent versions found: "+o+" and "+t);return o=t,"\n"}));var l=[];a=(a=a.replace(/#extension.*\n/gm,(function(e){return l.push(e),"\n"}))).replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");var u=e.pickColorQualifier;e$2e(u)&&(a=s$V.createPickFragmentShaderSource(a,u));var c="";e$2e(o)&&(c="#version "+o+"\n");var h=l.length;for(n=0;n<h;n++)c+=l[n];t&&(c+="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\n");var d=e.defines;if(e$2e(d))for(n=0,r=d.length;n<r;++n){var f=d[n];0!==f.length&&(c+="#define "+f+"\n")}if(i.webgl2?(c+="#define OUTPUT_DECLARATION\n\n",c+="#define WEBGL2\n\n",c+="#define texture2DGradEXT textureGrad\n\n",c+="#define texture2DLodEXT textureLod\n\n",c+="#define UBO_PARAM \n\n",c+="#define UBO_DECL_BEGIN(bufferName) uniform bufferName {\n",c+="#define UBO_DECL_END }; \n"):i.webgpu?(c+="#define texture2DGradEXT textureGrad\n\n",c+="#define texture2DLodEXT textureLod\n\n",c+="#define WEBGPU\n\n"):(c+="#define UBO_PARAM uniform \n\n",c+="#define UBO_DECL_BEGIN(bufferName) \n",c+="#define UBO_DECL_END \n"),a=_0x56a2f1.removeUnuseCode(a,d,i._sysShaderDefines),i.textureFloatLinear&&(c+="#define OES_texture_float_linear\n\n"),e.includeBuiltIns){var p=A$19(e,a,i);for(l.length=0,p=p.replace(/#extension.*\n/gm,(function(e){return l.push(e),"\n"})),h=l.length,n=0;n<h;n++)c=l[n]+c;c+=p}return c+="\n",c+=a,i.webgl2&&(c=S$W(c,t)),c}function s$V(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).pickColorQualifier;if(e$2e(t)&&"uniform"!==t&&"varying"!==t)throw new t$15("options.pickColorQualifier must be 'uniform' or 'varying'.");this.defines=e$2e(e.defines)?e.defines.slice(0):[],this.sources=e$2e(e.sources)?e.sources.slice(0):[],this.pickColorQualifier=t,this.includeBuiltIns=u$Z(e.includeBuiltIns,!0),this.name=e$2e(e.name)?e.name:void 0,this.useWGSL=u$Z(e.useWGSL,!1)}for(var p$10 in _0x56a2f1.Initialize=function(e){e.processor&&e.processor.initializeShaders&&e.processor.initializeShaders(e.processingContext)},_0x56a2f1.Process=function(e,t,i,n){var r,o=this;(null===(r=t.processor)||void 0===r?void 0:r.preProcessShaderCode)&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),this._ProcessIncludes(e,t,(function(e){t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e));var r=o._ProcessShaderConversion(e,t,n);i(r)}))},_0x56a2f1.PreProcess=function(e,t,i,n){var r,o=this;(null===(r=t.processor)||void 0===r?void 0:r.preProcessShaderCode)&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),this._ProcessIncludes(e,t,(function(e){t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e));var r=o._ApplyPreProcessing(e,t,n);i(r)}))},_0x56a2f1.Finalize=function(e,t,i){return i.processor&&i.processor.finalizeShaders?i.processor.finalizeShaders(e,t,i.processingContext):{vertexCode:e,fragmentCode:t}},_0x56a2f1._ProcessPrecision=function(e,t){var i;if(null===(i=t.processor)||void 0===i?void 0:i.noPrecision)return e;var n=t.shouldUseHighPrecisionShader;return-1===e.indexOf("precision highp float")?e=n?"precision highp float;\n"+e:"precision mediump float;\n"+e:!n&&(e=e.replace("precision highp float","precision mediump float")),e},_0x56a2f1._ExtractOperation=function(e){var t=/defined\((.+)\)/.exec(e);if(t&&t.length)return new _0x28cf9d(t[1].trim(),"!"===e[0]);for(var i="",n=0,r=0,o=["==",">=","<=","<",">"];r<o.length&&(i=o[r],!((n=e.indexOf(i))>-1));r++);return-1===n?new _0x28cf9d(e):new _0x1819d4(e.substring(0,n).trim(),i,e.substring(n+i.length).trim())},_0x56a2f1._BuildSubExpression=function(e){e=e.replace(_0x387d68,"defined[$1]");for(var t=[],i=0,n=_0x42c469.infixToPostfix(e);i<n.length;i++){var r=n[i];if("||"!==r&&"&&"!==r)t.push(r);else if(t.length>=2){var o=t[t.length-1],a=t[t.length-2];t.length-=2;var s="&&"==r?new _0x40f328:new _0x579206;"string"==typeof o&&(o=o.replace(_0x5edc7b,"defined($1)")),"string"==typeof a&&(a=a.replace(_0x5edc7b,"defined($1)")),s.leftOperand="string"==typeof a?this._ExtractOperation(a):a,s.rightOperand="string"==typeof o?this._ExtractOperation(o):o,t.push(s)}}var l=t[t.length-1];return"string"==typeof l&&(l=l.replace(_0x5edc7b,"defined($1)")),"string"==typeof l?this._ExtractOperation(l):l},_0x56a2f1._BuildExpression=function(e,t){var i=new _0x2e49ca,n=e.substring(0,t),r=e.substring(t);return r=r.substring(0,(r.indexOf("//")+1||r.length+1)-1).trim(),i.testExpression="#ifdef"===n?new _0x28cf9d(r):"#ifndef"===n?new _0x28cf9d(r,!0):this._BuildSubExpression(r),i},_0x56a2f1._MoveCursorWithinIf=function(e,t,i){for(var n=e.currentLine;this._MoveCursor(e,i);){var r=(n=e.currentLine).substring(0,5).toLowerCase();if("#else"===r){var o=new _0x6c367a;return t.children.push(o),void this._MoveCursor(e,o)}if("#elif"===r){var a=this._BuildExpression(n,5);t.children.push(a),i=a}}},_0x56a2f1._MoveCursor=function(e,t){for(;e.canRead;){e.lineIndex++;var i=e.currentLine,n=/(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/.exec(i);if(n&&n.length){switch(n[0]){case"#ifdef":var r=new _0x19d3c4;t.children.push(r);var o=this._BuildExpression(i,6);r.children.push(o),this._MoveCursorWithinIf(e,r,o);break;case"#else":case"#elif":return!0;case"#endif":return!1;case"#ifndef":r=new _0x19d3c4;t.children.push(r);o=this._BuildExpression(i,7);r.children.push(o),this._MoveCursorWithinIf(e,r,o);break;case"#if":r=new _0x19d3c4,o=this._BuildExpression(i,3);t.children.push(r),r.children.push(o),this._MoveCursorWithinIf(e,r,o)}}else{var a=new _0x6c367a;if(a.line=i,t.children.push(a),"#"===i[0]&&"d"===i[1]){var s=i.replace(";","").split(" ");a.additionalDefineKey=s[1],3===s.length&&(a.additionalDefineValue=s[2])}}}return!1},_0x56a2f1._EvaluatePreProcessors=function(e,t,i){var n=new _0x6c367a,r=new _0x4a6f81;return r.lineIndex=-1,r.lines=e.split("\n"),this._MoveCursor(r,n),n.process(t,i)},_0x56a2f1.removeUnuseCode=function(e,t,i){for(var n={},r=0,o=t.concat(i);r<o.length;r++){var a=o[r].replace("#define","").replace(";","").trim().split(" ");n[a[0]]=a.length>1?a[1]:""}var s=new _0x6c367a,l=new _0x4a6f81;return l.lineIndex=-1,l.lines=e.split("\n"),this._MoveCursor(l,s),s.process(n,{processor:{}})},_0x56a2f1._PreparePreProcessors=function(e,t){for(var i,n={},r=0,o=e.defines;r<o.length;r++){var a=o[r].replace("#define","").replace(";","").trim().split(" ");n[a[0]]=a.length>1?a[1]:""}return(null===(i=e.processor)||void 0===i?void 0:i.shaderLanguage)===_0x3b3a87.GLSL&&(n.GL_ES="true"),n.__VERSION__=e.version,n[e.platformName]="true",t._getGlobalDefines(n),n},_0x56a2f1._ProcessShaderConversion=function(e,t,i){var n=this._ProcessPrecision(e,t);if(!t.processor)return n;if(t.processor.shaderLanguage===_0x3b3a87.GLSL&&-1!==n.indexOf("#version 3"))return n.replace("#version 300 es","");var r=t.defines,o=this._PreparePreProcessors(t,i);return t.processor.preProcessor&&(n=t.processor.preProcessor(n,r,t.isFragment,t.processingContext)),n=this._EvaluatePreProcessors(n,o,t),t.processor.postProcessor&&(n=t.processor.postProcessor(n,r,t.isFragment,t.processingContext,i)),i._features.needShaderCodeInlining&&(n=i.inlineShaderCode(n)),n},_0x56a2f1._ApplyPreProcessing=function(e,t,i){var n,r,o=e,a=t.defines,s=this._PreparePreProcessors(t,i);return(null===(n=t.processor)||void 0===n?void 0:n.preProcessor)&&(o=t.processor.preProcessor(o,a,t.isFragment,t.processingContext)),o=this._EvaluatePreProcessors(o,s,t),(null===(r=t.processor)||void 0===r?void 0:r.postProcessor)&&(o=t.processor.postProcessor(o,a,t.isFragment,t.processingContext,i)),i._features.needShaderCodeInlining&&(o=i.inlineShaderCode(o)),o},_0x56a2f1._ProcessIncludes=function(e,t,i){for(var n=this,r=_0x32e7f3.exec(e),o=new String(e),a=!1,s=function(){var s=r[1];if(-1!==s.indexOf("__decl__")&&(s=s.replace(/__decl__/,""),t.supportsUniformBuffers&&(s=(s=s.replace(/Vertex/,"Ubo")).replace(/Fragment/,"Ubo")),s+="Declaration"),!t.includesShadersStore[s]){var l=t.shadersRepository+"ShadersInclude/"+s+".fx";return _0x56a2f1._FileToolsLoadFile(l,(function(e){t.includesShadersStore[s]=e,n._ProcessIncludes(o,t,i)})),{value:void 0}}var u=t.includesShadersStore[s];if(r[2])for(var c=r[3].split(","),h=0;h<c.length;h+=2){var d=new RegExp(c[h],"g"),f=c[h+1];u=u.replace(d,f)}if(r[4]){var p=r[5];if(-1!==p.indexOf("..")){var _=p.split(".."),m=parseInt(_[0]),g=parseInt(_[1]),x=u.slice(0);u="",isNaN(g)&&(g=t.indexParameters[_[1]]);for(var y=m;y<g;y++)!t.supportsUniformBuffers&&(x=x.replace(/light\{X\}.(\w*)/g,(function(e,t){return t+"{X}"}))),u+=x.replace(/\{X\}/g,y.toString())+"\n"}else!t.supportsUniformBuffers&&(u=u.replace(/light\{X\}.(\w*)/g,(function(e,t){return t+"{X}"}))),u=u.replace(/\{X\}/g,p)}o=o.replace(r[0],u),a=a||u.indexOf("#include<")>=0||u.indexOf("#include <")>=0,r=_0x32e7f3.exec(e)};null!=r;){var l=s();if("object"==typeof l)return l.value}a?this._ProcessIncludes(o.toString(),t,i):i(o)},_0x56a2f1._FileToolsLoadFile=function(e,t,i,n,r,o){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_9__._WarnImport)("FileTools")},s$V.prototype.clone=function(){return new s$V({sources:this.sources,defines:this.defines,name:this.name,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns,useWGSL:this.useWGSL})},s$V.replaceMain=function(e,t,i){return(i=u$Z(i,!1))?s$V._replaceMainWGSL(e,t):s$V._replaceMainGLSL(e,t)},s$V._replaceMainGLSL=function(e,t){return t="void "+t+"()",e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)},s$V._replaceMainWGSL=function(e,t){return t="fn "+t+"()",e.replace(/(@vertex|@fragment)\s+fn\s+main\s*\(input\s+\:\s+(VertexInputs|FragmentInputs)\s*\)\s*->\s*(FragmentInputs|FragmentOutputs)/g,t)},s$V.prototype.getCacheKey=function(e){const t=this.defines.slice().sort().join(","),i=this.pickColorQualifier||"";this.includeBuiltIns;return`${t}:${i}:${this.sources.join("\n")}`},s$V.prototype._getKeyForShaderProgramName=function(){const e=this.defines.slice().sort().join(","),t=this.pickColorQualifier||"";return`${this.name}:${e}:${t}`},s$V.prototype.createCombinedVertexShader=function(e){return e.webgpu&&this.useWGSL?W$10(this,!1,e):I$1h(this,!1,e)},s$V.prototype.createCombinedFragmentShader=function(e){return e.webgpu&&this.useWGSL?W$10(this,!0,e):I$1h(this,!0,e)},s$V._czmBuiltinsAndUniforms={},G$1g)G$1g.hasOwnProperty(p$10)&&(s$V._czmBuiltinsAndUniforms[p$10]=G$1g[p$10]);for(var v$Q in l$18)if(l$18.hasOwnProperty(v$Q)){var _$V=l$18[v$Q];"function"==typeof _$V.getDeclaration&&(s$V._czmBuiltinsAndUniforms[v$Q]=_$V.getDeclaration(v$Q))}for(var p$10 in s$V._czmBuiltinsAndUniformsWGSL={},E$1a)E$1a.hasOwnProperty(p$10)&&(s$V._czmBuiltinsAndUniformsWGSL[p$10]=E$1a[p$10]);for(var v$Q in l$18)if(l$18.hasOwnProperty(v$Q)){var _$V=l$18[v$Q];"function"==typeof _$V.getDeclaration&&(s$V._czmBuiltinsAndUniformsWGSL[v$Q]=_$V.getWgslDeclaration(v$Q))}s$V.createPickVertexShaderSource=function(e){return s$V.replaceMain(e,"czm_old_main")+"\nattribute vec4 pickColor; \nvarying vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n czm_pickColor = pickColor; \n}"},s$V.createPickFragmentShaderSource=function(e,t){return s$V.replaceMain(e,"czm_old_main")+"\n"+(t+" vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = czm_pickColor; \n}")},s$V.findVarying=function(e,t){for(var i=e.sources,n=t.length,r=0;r<n;++r)for(var o=t[r],a=i.length,s=0;s<a;++s)if(-1!==i[s].indexOf(o))return o};var V$Y=["v_normalEC","v_normal","aNormal"];s$V.findNormalVarying=function(e){return s$V.findVarying(e,V$Y)};var M$15=["v_positionEC"];s$V.findPositionVarying=function(e){return s$V.findVarying(e,M$15)};var Q$11=/UBO_DECL_BEGIN\s*\(\s*(\w+)\s*\)/g,T$11=/UBO_DECL_END/g,R$_=/UBO_PARAM/g;s$V.replaceUniformBufferMarco=function(e){var t=e.match(Q$11);if(null==t)return e;for(var i=0;i<t.length;i++){var n=t[i],r=/UBO_DECL_BEGIN\s*\(\s*(\w+)\s*\)/g.exec(n)[1];e=e.replace(n,"uniform "+r+" {")}return e=(e=e.replace(T$11,"};")).replace(R$_,"")};var I$1g=0;function m$$(e){var t=P$10(e.vertexShaderText,e.fragmentShaderText);this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=u$Z(e.attributeLocations,[]),this._transformFeedbackVaryings=e.transformFeedbackVaryings,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._samplerUniforms=void 0,this._valueUniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=t.duplicateUniformNames,this._cachedShader=void 0,this.maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=t.fragmentShaderText,this._name=e.name,this._isS3MTiles=-1!=this._name.indexOf("S3MTiles"),this.id=I$1g++,this._context=e.context,this._useWGSL=u$Z(e.useWGSL,!1)}function O$N(e,t){for(var i=e.concat(t.defines),n={},r=0,o=i.length;r<o;r++)if(!e$2e(n[i[r]])&&""!=i[r]){n[i[r]]=1}var a="";for(var s in n){var l="";s.indexOf("#define")&&(l="#define "),a+=l+s+"\n"}return a}function b$1a(e){var t=[],i=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(e$2e(i))for(var n=i.length,r=0;r<n;r++){var o=i[r].trim(),a=o.slice(o.lastIndexOf(" ")+1);t.push(a)}return t}function P$10(e,t){var i={};if(!e$1W.highpFloatSupported||!e$1W.highpIntSupported){var n,r,o,a,s=b$1a(e),l=b$1a(t),u=s.length,c=l.length;for(n=0;n<u;n++)for(r=0;r<c;r++)if(s[n]===l[r]){a="czm_mediump_"+(o=s[n]);var h=new RegExp(o+"\\b","g");t=t.replace(h,a),i[a]=o}}return{fragmentShaderText:t,duplicateUniformNames:i}}function E$18(e,t){var i={},n=[],r=[],o=t.getPipelineContext();if(e$2e(o._leftOverUniformsByName)){var a=o._leftOverUniformsByName;for(var s in a){var l=a[s],u=o.uniformBuffer._uniformArraySizes[s];d=e$2e(u)?j$1a(t,s,l,u.arraySize):V$_(t,s,l),i[s]=d,n.push(d)}if(!e){var c=o.shaderProcessingContext.availableTextures;for(var h in c){var d,f=c[h];d=f.isTextureArray?j$1a(t,h,"texture2D",f.textures.length):V$_(t,h,"texture2D"),i[h]=d,r.push(d)}}return{uniformsByName:i,valueUniforms:n,samplerUniforms:r}}}function G$1e(e,t){var i=[],n=[];for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=r,s=e._duplicateUniformNames[a];e$2e(s)&&(o.name=s,a=s);var l=l$18[a];e$2e(l)?i.push({uniform:o,automaticUniform:l}):n.push(o)}return{automaticUniforms:i,manualUniforms:n}}function B$Z(e){if(!e._uniformsByName){e._createEffect();var t=E$18(e._isS3MTiles,e._effect),i=G$1e(e,t.uniformsByName);e._uniformsByName=t.uniformsByName,e._valueUniforms=t.valueUniforms,e._samplerUniforms=t.samplerUniforms,e._automaticUniforms=i.automaticUniforms,e._manualUniforms=i.manualUniforms}}function V$X(e,t,i){if(t._bufferIDRecorder.isDirty(e,i))return!0;if(t._vertexArrayID!=t._lastUseVertexArrayID)return t._lastUseVertexArrayID=t._vertexArrayID,!0;var n,r=t._uniformBuffers.length;for(n=0;n<r;++n){if(t._uniformBuffers[n]._isTextureDirty)return!0}return!1}function r$14(e){e.context.webgpu?this._inner=new m$$(e):this._inner=new g$1a(e)}Object.defineProperties(m$$.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){if(!e$2e(this._vertexAttributes)&&(this._vertexAttributes={},this._effect)){var e=this._effect.getPipelineContext().shaderProcessingContext.availableAttributes;for(const t in e)this._vertexAttributes[t]={name:t,index:e[t]}}return this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return console.log("ShaderProgramGPU.numberOfVertexAttributes.get"),this._numberOfVertexAttributes}},allUniforms:{get:function(){return B$Z(this),this._uniformsByName}},cachedShader:{get:function(){return this._cachedShader},set:function(e){this._cachedShader=e}},name:{get:function(){return this._name}}}),m$$.prototype._createEffect=function(){if(!this._effect){var e=this._context.engine,t=this._attributeLocations,i=[];if(e$2e(t))for(var n in t)t.hasOwnProperty(n)&&i.push(n);this._useWGSL||(this._vertexShaderText=s$V.replaceUniformBufferMarco(this._vertexShaderText),this._fragmentShaderText=s$V.replaceUniformBufferMarco(this._fragmentShaderText));var r=O$N(this._vertexShaderSource.defines,this._fragmentShaderSource),o=[_0x2e0417.SCENE,_0x2e0417.LAYER,_0x2e0417.WaterLayer,_0x2e0417.LIGHT,_0x2e0417.MATERIAL,_0x2e0417.MESH,_0x2e0417.SHADOW,"TileUBO",_0x2e0417.Polyline,_0x2e0417.S3MVolume];this._effect=e.createEffect(this._name,{attributes:i,uniformsNames:[],uniformBuffersNames:o,samplers:[],defines:r,vertexCode:this._vertexShaderText,fragmentCode:this._fragmentShaderText,shaderLanguage:this._useWGSL?_0x3b3a87.WGSL:_0x3b3a87.GLSL},e),this._drawWrapper=new _0x2da137(e),this._drawWrapper.setEffect(this._effect)}},m$$.prototype._isReady=function(){return!!this._effect&&this._effect.isReady()},m$$.prototype._bind=function(){B$Z(this)},m$$.prototype._setUniforms=function(e,t,i,n){var r,o;if(e$2e(e)){var a=this._manualUniforms;for(r=a.length,o=0;o<r;++o){var s=a[o];s.value=e[s.name]()}}var l=this._automaticUniforms;for(r=l.length,o=0;o<r;++o){var u=l[o];u.uniform.value=u.automaticUniform.getValue(t)}this._context.engine.enableEffect(this._drawWrapper),e$2e(n._bufferIDRecorder)||(n._bufferIDRecorder=new f$$),this._setUniformsValue();var c=V$X(this._samplerUniforms,n,this._drawWrapper);if(!e$2e(n.bindGroups)||c||n.fastBundleDirty){for(r=n._uniformBuffers.length,o=0;o<r;++o){n._uniformBuffers[o].setToEffect(this._effect)}n._bufferIDRecorder.setBufferIDToContext(this._samplerUniforms),n.removeAllFastBundleAndBindGroups()}},m$$.prototype._setUniformsValue=function(){var e,t=this._valueUniforms,i=t.length;for(e=0;e<i;++e)t[e].set()},m$$.prototype.isDestroyed=function(){return!1},m$$.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)},m$$.prototype.finalDestroy=function(){return e$2e(this._effect)&&this._effect.dispose(),i$11(this)},r$14.fromCache=function(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.shaderCache.getShaderProgram(e)},r$14.replaceCache=function(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.shaderCache.replaceShaderProgram(e)},Object.defineProperties(r$14.prototype,{vertexShaderSource:{get:function(){return this._inner.vertexShaderSource}},fragmentShaderSource:{get:function(){return this._inner.fragmentShaderSource}},vertexAttributes:{get:function(){return this._inner.vertexAttributes}},numberOfVertexAttributes:{get:function(){return this._inner.numberOfVertexAttributes}},allUniforms:{get:function(){return this._inner.allUniforms}},_cachedShader:{get:function(){return this._inner.cachedShader},set:function(e){this._inner.cachedShader=e}},name:{get:function(){return this._inner.name}},program:{get:function(){return this._inner.program}},maximumTextureUnitIndex:{get:function(){return this._inner.maximumTextureUnitIndex}},id:{get:function(){return this._inner.id}},_attributeLocations:{get:function(){return this._inner._attributeLocations}}}),r$14.prototype._bind=function(){this._inner._bind()},r$14.prototype._setUniforms=function(e,t,i,n){this._inner._setUniforms(e,t,i,n)},r$14.prototype._isReady=function(){return this._inner._isReady()},r$14.prototype.isDestroyed=function(){return!1},r$14.prototype.destroy=function(){this._inner.destroy()},r$14.prototype.finalDestroy=function(){return this._inner.finalDestroy(),i$11(this)};var A$18={STREAM_DRAW:de$y.STREAM_DRAW,STATIC_DRAW:de$y.STATIC_DRAW,DYNAMIC_DRAW:de$y.DYNAMIC_DRAW,validate:function(e){return e===A$18.STREAM_DRAW||e===A$18.STATIC_DRAW||e===A$18.DYNAMIC_DRAW}};function h$11(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),!e$2e(e.typedArray)&&!e$2e(e.sizeInBytes))throw new t$15("Either options.sizeInBytes or options.typedArray is required.");if(e$2e(e.typedArray)&&e$2e(e.sizeInBytes))throw new t$15("Cannot pass in both options.sizeInBytes and options.typedArray.");if(e$2e(e.typedArray)&&(o$1q.typeOf.object("options.typedArray",e.typedArray),o$1q.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!A$18.validate(e.usage))throw new t$15("usage is invalid.");var t=e.context._gl,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=e$2e(n);a&&(r=n.byteLength),o$1q.typeOf.number.greaterThan("sizeInBytes",r,0);var s=t.createBuffer();t.bindBuffer(i,s),t.bufferData(i,a?n:r,o),t.bindBuffer(i,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this._buffer=s,this.context=e.context,e.context.memorySize+=r}Object.defineProperties(h$11.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),h$11.prototype._getBuffer=function(){return this._buffer},h$11.prototype.copyFromArrayView=function(e,t){t=u$Z(t,0),o$1q.defined("arrayView",e),o$1q.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);var i=this._gl,n=this._bufferTarget;i.bindBuffer(n,this._buffer),i.bufferSubData(n,t,e),i.bindBuffer(n,null)},h$11.prototype.copyFromBuffer=function(e,t,i,n){if(!this._webgl2)throw new t$15("A WebGL 2 context is required.");if(!e$2e(e))throw new t$15("readBuffer must be defined.");if(!e$2e(n)||n<=0)throw new t$15("sizeInBytes must be defined and be greater than zero.");if(!e$2e(t)||t<0||t+n>e._sizeInBytes)throw new t$15("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!e$2e(i)||i<0||i+n>this._sizeInBytes)throw new t$15("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(i>=t&&i<t+n||t>i&&t<i+n))throw new t$15("When readBuffer is equal to this, the ranges [readOffset + sizeInBytes) and [writeOffset, writeOffset + sizeInBytes) must not overlap.");if(this._bufferTarget===de$y.ELEMENT_ARRAY_BUFFER&&e._bufferTarget!==de$y.ELEMENT_ARRAY_BUFFER||this._bufferTarget!==de$y.ELEMENT_ARRAY_BUFFER&&e._bufferTarget===de$y.ELEMENT_ARRAY_BUFFER)throw new t$15("Can not copy an index buffer into another buffer type.");var r=de$y.COPY_READ_BUFFER,o=de$y.COPY_WRITE_BUFFER,a=this._gl;a.bindBuffer(o,this._buffer),a.bindBuffer(r,e._buffer),a.copyBufferSubData(r,o,t,i,n),a.bindBuffer(o,null),a.bindBuffer(r,null)},h$11.prototype.getBufferData=function(e,t,i,n){if(t=u$Z(t,0),i=u$Z(i,0),!this._webgl2)throw new t$15("A WebGL 2 context is required.");if(!e$2e(e))throw new t$15("arrayView is required.");var r,o,a=e.byteLength;if(e$2e(n)?(r=n,e$2e(a)?o=1:(a=e.length,o=e.BYTES_PER_ELEMENT)):e$2e(a)?(r=a-i,o=1):(r=(a=e.length)-i,o=e.BYTES_PER_ELEMENT),i<0||i>a)throw new t$15("destinationOffset must be greater than zero and less than the arrayView length.");if(i+r>a)throw new t$15("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new t$15("sourceOffset must be greater than zero and less than the buffers size.");if(t+r*o>this._sizeInBytes)throw new t$15("sourceOffset + length must be less than the buffers size.");var s=this._gl,l=de$y.COPY_READ_BUFFER;s.bindBuffer(l,this._buffer),s.getBufferSubData(l,t,e,i,n),s.bindBuffer(l,null)},h$11.prototype.isDestroyed=function(){return!1},h$11.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),this.context.memorySize-=this.sizeInBytes,i$11(this)};var _0x210484=(_0x415ec1=!0,function(e,t){var i=_0x415ec1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x415ec1=!1,i}),_0x4fe4ad=_0x210484(void 0,(function(){return _0x4fe4ad.toString().search("(((.+)+)+)+$").toString().constructor(_0x4fe4ad).search("(((.+)+)+)+$")})),_0x415ec1;function _0x556c47(e,t,i){void 0===i&&(i=_0x333f62.BUFFER_CREATIONFLAG_READWRITE),this._engine=e,this._engine._storageBuffers.push(this),this._create(t,i)}function r$13(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context,i=e.bufferTarget,n=e.typedArray,r=e.sizeInBytes,o=e.usage,a=e$2e(n);a?r=n.byteLength:n=new Uint8Array(r);var s=_0x333f62.BUFFER_CREATIONFLAG_STORAGE;e$2e(o)&&(o==A$18.STREAM_DRAW||o==A$18.STATIC_DRAW?s|=_0x333f62.BUFFER_CREATIONFLAG_WRITE:o==A$18.DYNAMIC_DRAW&&(s|=_0x333f62.BUFFER_CREATIONFLAG_READWRITE)),e$2e(i)?i==de$y.ELEMENT_ARRAY_BUFFER?(n instanceof Uint8Array&&(e.indexDatatype==ce$z.UNSIGNED_INT?n=new Uint32Array(n.buffer,n.byteOffset,n.byteLength/4):e.indexDatatype==ce$z.UNSIGNED_SHORT&&(n=new Uint16Array(n.buffer,n.byteOffset,n.byteLength/2))),this._dataBuffer=t.engine.createIndexBuffer(n)):i==de$y.ARRAY_BUFFER?(this._dataBuffer=new Buffer$1(t.engine,n,!0),this._dataBuffer._data=null):console.log("BufferGPU not supported bufferTarget"):(this._dataBuffer=new _0x556c47(t.engine,r,s),a&&this._dataBuffer.update(n,0,r)),this._bufferTarget=i,this._sizeInBytes=r,this._usage=o,this.context=e.context,e.context.memorySize+=r}function t$X(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),!e$2e(e.typedArray)&&!e$2e(e.sizeInBytes))throw new t$15("Either options.sizeInBytes or options.typedArray is required.");if(e$2e(e.typedArray)&&e$2e(e.sizeInBytes))throw new t$15("Cannot pass in both options.sizeInBytes and options.typedArray.");e$2e(e.typedArray)&&(o$1q.typeOf.object("options.typedArray",e.typedArray),o$1q.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),e.context.webgpu?this._inner=new r$13(e):this._inner=new h$11(e),this.vertexArrayDestroyable=!0}function w$W(e,t,i,n){var r=e$2e(t.vertexBuffer),o=e$2e(t.value),a=t.value?t.value.length:t.componentsPerAttribute;if(!r&&!o)throw new t$15("attribute must have a vertexBuffer or a value.");if(r&&o)throw new t$15("attribute cannot have both a vertexBuffer and a value. It must have either a vertexBuffer property defining per-vertex data or a value property defining data for all vertices.");if(1!==a&&2!==a&&3!==a&&4!==a)throw new t$15(o?"attribute.value.length must be in the range [1, 4].":"attribute.componentsPerAttribute must be in the range [1, 4].");if(e$2e(t.componentDatatype)&&!S$14.validate(t.componentDatatype))throw new t$15("attribute must have a valid componentDatatype or not specify it.");if(e$2e(t.strideInBytes)&&t.strideInBytes>255)throw new t$15("attribute must have a strideInBytes less than or equal to 255 or not specify it.");if(e$2e(t.instanceDivisor)&&t.instanceDivisor>0&&!n.instancedArrays)throw new t$15("instanced arrays is not supported");if(e$2e(t.instanceDivisor)&&t.instanceDivisor<0)throw new t$15("attribute must have an instanceDivisor greater than or equal to zero");if(e$2e(t.instanceDivisor)&&o)throw new t$15("attribute cannot have have an instanceDivisor if it is not backed by a buffer");if(e$2e(t.instanceDivisor)&&t.instanceDivisor>0&&0===t.index)throw new t$15("attribute zero cannot have an instanceDivisor greater than 0");var s={index:u$Z(t.index,i),enabled:u$Z(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:o?t.value.slice(0):void 0,componentsPerAttribute:a,componentDatatype:u$Z(t.componentDatatype,S$14.FLOAT),normalize:u$Z(t.normalize,!1),offsetInBytes:u$Z(t.offsetInBytes,0),strideInBytes:u$Z(t.strideInBytes,0),instanceDivisor:u$Z(t.instanceDivisor,0)};if(r)s.vertexAttrib=function(e){var t=this.index;e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),e.vertexAttribPointer(t,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),e.enableVertexAttribArray(t),this.instanceDivisor>0&&(n.glVertexAttribDivisor(t,this.instanceDivisor),n._vertexAttribDivisors[t]=this.instanceDivisor,n._previousDrawInstanced=!0)},s.disableVertexAttribArray=function(e){e.disableVertexAttribArray(this.index),this.instanceDivisor>0&&n.glVertexAttribDivisor(i,0)};else{switch(s.componentsPerAttribute){case 1:s.vertexAttrib=function(e){e.vertexAttrib1fv(this.index,this.value)};break;case 2:s.vertexAttrib=function(e){e.vertexAttrib2fv(this.index,this.value)};break;case 3:s.vertexAttrib=function(e){e.vertexAttrib3fv(this.index,this.value)};break;case 4:s.vertexAttrib=function(e){e.vertexAttrib4fv(this.index,this.value)}}s.disableVertexAttribArray=function(e){}}e.push(s)}function _$U(e,t,i){for(var n=0;n<t.length;++n){var r=t[n];r.enabled&&r.vertexAttrib(e)}e$2e(i)&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i._getBuffer())}function l$15(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),o$1q.defined("options.attributes",e.attributes);var t,i=e.context,n=i._gl,r=e.attributes,o=e.indexBuffer,a=[],s=1,l=!1,u=!1,c=r.length;for(t=0;t<c;++t)w$W(a,r[t],t,i);for(c=a.length,t=0;t<c;++t){var h=a[t];if(e$2e(h.vertexBuffer)&&0===h.instanceDivisor){var d=h.strideInBytes||h.componentsPerAttribute*S$14.getSizeInBytes(h.componentDatatype);s=h.vertexBuffer.sizeInBytes/d;break}}for(t=0;t<c;++t)a[t].instanceDivisor>0&&(l=!0),e$2e(a[t].value)&&(u=!0);var f,p={};for(t=0;t<c;++t){var _=a[t].index;if(p[_])throw new t$15("Index "+_+" is used by more than one attribute.");p[_]=!0}i.vertexArrayObject&&(f=i.glCreateVertexArray(),i.glBindVertexArray(f),_$U(n,a,o),i.glBindVertexArray(null)),this._numberOfVertices=s,this._hasInstancedAttributes=l,this._hasConstantAttributes=u,this._context=i,this._gl=n,this._vao=f,this._attributes=a,this._indexBuffer=o}function V$W(e){var t=e._context,i=e._hasInstancedAttributes;if(i||t._previousDrawInstanced){t._previousDrawInstanced=i;var n,r=t._vertexAttribDivisors,o=e._attributes,a=e$1W.maximumVertexAttributes;if(i){var s=o.length;for(n=0;n<s;++n){var l=o[n];if(l.enabled){var u=l.instanceDivisor,c=l.index;u!==r[c]&&(t.glVertexAttribDivisor(c,u),r[c]=u)}}}else for(n=0;n<a;++n)r[n]>0&&(t.glVertexAttribDivisor(n,0),r[n]=0)}}function I$1f(e,t){for(var i=e._attributes,n=i.length,r=0;r<n;++r){var o=i[r];o.enabled&&e$2e(o.value)&&o.vertexAttrib(t)}}function C$16(e,t,i,n){var r=e$2e(t.vertexBuffer),o=e$2e(t.value),a=t.value?t.value.length:t.componentsPerAttribute;if(!r&&!o)throw new t$15("attribute must have a vertexBuffer or a value.");if(r&&o)throw new t$15("attribute cannot have both a vertexBuffer and a value. It must have either a vertexBuffer property defining per-vertex data or a value property defining data for all vertices.");if(1!==a&&2!==a&&3!==a&&4!==a)throw new t$15(o?"attribute.value.length must be in the range [1, 4].":"attribute.componentsPerAttribute must be in the range [1, 4].");if(!e$2e(t.name))throw new t$15("attribute must have a name.");if(e$2e(t.componentDatatype)&&!S$14.validate(t.componentDatatype))throw new t$15("attribute must have a valid componentDatatype or not specify it.");if(e$2e(t.strideInBytes)&&t.strideInBytes>2048)throw new t$15("attribute must have a strideInBytes less than or equal to 2048 or not specify it.");if(e$2e(t.strideInBytes)&&t.strideInBytes%4!=0)throw new t$15("attribute must have a strideInBytes is a multiple of 4.");if(e$2e(t.instanceDivisor)&&t.instanceDivisor<0)throw new t$15("attribute must have an instanceDivisor greater than or equal to zero");if(e$2e(t.instanceDivisor)&&o)throw new t$15("attribute cannot have have an instanceDivisor if it is not backed by a buffer");var s={name:t.name,index:u$Z(t.index,i),enabled:u$Z(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:o?t.value.slice(0):void 0,componentsPerAttribute:a,componentDatatype:u$Z(t.componentDatatype,S$14.FLOAT),normalize:u$Z(t.normalize,!1),offsetInBytes:u$Z(t.offsetInBytes,0),strideInBytes:u$Z(t.strideInBytes,0),instanceDivisor:u$Z(t.instanceDivisor,0)};e.push(s)}function m$_(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),o$1q.defined("options.attributes",e.attributes);var t=e.context,i=e.attributes,n=e.indexBuffer;this._babylonVertexBuffers={};var r,o=[],a=1,s=!1,l=i.length;for(r=0;r<l;++r)C$16(o,i[r],r);for(l=o.length,r=0;r<l;++r){if(e$2e((c=o[r]).vertexBuffer)&&(!c.instanceDivisor||0===c.instanceDivisor)){var u=c.strideInBytes||c.componentsPerAttribute*S$14.getSizeInBytes(c.componentDatatype);a=c.vertexBuffer.sizeInBytes/u;break}}for(r=0;r<l;++r){var c;e$2e((c=o[r]).name)||console.log("no attribute name");var h=!1,d=1;c.instanceDivisor&&c.instanceDivisor>0&&(s=!0,h=!0,d=c.instanceDivisor);var f,p,_=e$2e(c.vertexBuffer),m=e$2e(c.value);_&&(p=(f=c.vertexBuffer._inner.dataBuffer).isUpdatable()),m&&(f=c.value,p=!0);const e=u$Z(c.componentDatatype,S$14.FLOAT);var g=R$12.toVertexBufferDataType(e),x=new VertexBuffer(t.engine,f,c.name,p,!0,c.strideInBytes,h,c.offsetInBytes,c.componentsPerAttribute,g,!1,!0,d);this._babylonVertexBuffers[c.name]=x}this._numberOfVertices=a,this._hasInstancedAttributes=s,this._hasConstantAttributes=!1,this._context=t,this._attributes=o,this._indexBuffer=n}_0x4fe4ad(),_0x556c47.prototype._create=function(e,t){this._bufferSize=e,this._creationFlags=t,this._buffer=this._engine.createStorageBuffer(e,t)},_0x556c47.prototype._rebuild=function(){this._create(this._bufferSize,this._creationFlags)},_0x556c47.prototype.getBuffer=function(){return this._buffer},_0x556c47.prototype.update=function(e,t,i){this._buffer&&this._engine.updateStorageBuffer(this._buffer,e,t,i)},_0x556c47.prototype.read=function(e,t,i){return this._engine.readFromStorageBuffer(this._buffer,e,t,i)},_0x556c47.prototype.dispose=function(){var e=this._engine._storageBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._engine._releaseBuffer(this._buffer),this._buffer=null},Object.defineProperties(r$13.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}},dataBuffer:{get:function(){return this._dataBuffer}}}),r$13.prototype._getBuffer=function(){return console.log("BufferGPU.prototype._getBuffer"),this._dataBuffer},r$13.prototype.copyFromArrayView=function(e,t){this._dataBuffer.updateDirectly(e,t,null,!0)},r$13.prototype.copyFromBuffer=function(e,t,i,n){console.log("BufferGPU.prototype.copyFromBuffer")},r$13.prototype.getBufferData=function(e,t,i,n){console.log("BufferGPU.prototype.getBufferData")},r$13.prototype.isDestroyed=function(){return!1},r$13.prototype.destroy=function(){return this._bufferTarget!==de$y.ELEMENT_ARRAY_BUFFER?this._dataBuffer.dispose():this.context._engine._releaseBuffer(this._dataBuffer),this.context.memorySize-=this.sizeInBytes,i$11(this)},t$X.createVertexBuffer=function(e){return o$1q.defined("options.context",e.context),new t$X({context:e.context,bufferTarget:de$y.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},t$X.createIndexBuffer=function(e){if(o$1q.defined("options.context",e.context),!ce$z.validate(e.indexDatatype))throw new t$15("Invalid indexDatatype.");if(e.indexDatatype===ce$z.UNSIGNED_INT&&!e.context.elementIndexUint)throw new t$15("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");var t=e.context,i=e.indexDatatype,n=ce$z.getSizeInBytes(i),r=new t$X({context:t,bufferTarget:de$y.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage,indexDatatype:i}),o=r.sizeInBytes/n;return Object.defineProperties(r,{indexDatatype:{get:function(){return i}},bytesPerIndex:{get:function(){return n}},numberOfIndices:{get:function(){return o}}}),r},Object.defineProperties(t$X.prototype,{sizeInBytes:{get:function(){return this._inner.sizeInBytes}},usage:{get:function(){return this._inner.usage}}}),t$X.prototype._getBuffer=function(){return this._inner._getBuffer()},t$X.prototype.copyFromArrayView=function(e,t){this._inner.copyFromArrayView(e,t)},t$X.prototype.copyFromBuffer=function(e,t,i,n){this._inner.copyFromBuffer(e,t,i,n)},t$X.prototype.getBufferData=function(e,t,i,n){this._inner.getBufferData(e,t,i,n)},t$X.prototype.isDestroyed=function(){return!1},t$X.prototype.destroy=function(){return this._inner.destroy(),i$11(this)},Object.defineProperties(l$15.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),l$15.prototype.getAttribute=function(e){return o$1q.defined("index",e),this._attributes[e]},l$15.prototype._bind=function(){e$2e(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&V$W(this),this._hasConstantAttributes&&I$1f(this,this._gl)):_$U(this._gl,this._attributes,this._indexBuffer)},l$15.prototype._unBind=function(){if(e$2e(this._vao))this._context.glBindVertexArray(null);else{for(var e=this._attributes,t=this._gl,i=0;i<e.length;++i){var n=e[i];n.enabled&&n.disableVertexAttribArray(t)}this._indexBuffer&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}},l$15.prototype.isDestroyed=function(){return!1},l$15.prototype.destroy=function(){for(var e=this._attributes,t=0;t<e.length;++t){var i=e[t].vertexBuffer;e$2e(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}var n=this._indexBuffer;return e$2e(n)&&!n.isDestroyed()&&n.vertexArrayDestroyable&&n.destroy(),e$2e(this._vao)&&this._context.glDeleteVertexArray(this._vao),i$11(this)},Object.defineProperties(m$_.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),m$_.prototype.getAttribute=function(e){return o$1q.defined("index",e),this._attributes[e]},m$_.prototype._bind=function(){var e=this._context.engine;e$2e(this._indexBuffer)?e.bindBuffers(this._babylonVertexBuffers,this._indexBuffer._inner.dataBuffer,null,null):e.bindBuffers(this._babylonVertexBuffers,null,null,null)},m$_.prototype._unBind=function(){console.log("VertexArrayGPU.prototype._unBind")},m$_.prototype.isDestroyed=function(){return!1},m$_.prototype.destroy=function(){for(var e=this._attributes,t=0;t<e.length;++t){var i=e[t].vertexBuffer;e$2e(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}var n=this._indexBuffer;return e$2e(n)&&!n.isDestroyed()&&n.vertexArrayDestroyable&&n.destroy(),i$11(this)};var Y$P=0;function c$13(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),o$1q.defined("options.attributes",e.attributes),e.context.webgpu?this._inner=new m$_(e):this._inner=new l$15(e),this._uniqueID=Y$P++}function E$17(e){return e.values.length/e.componentsPerAttribute}function G$1d(e){return S$14.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function M$14(e){var t,i,n,r=[];for(i in e)e.hasOwnProperty(i)&&e$2e(e[i])&&e$2e(e[i].values)&&(r.push(i),e[i].componentDatatype===S$14.DOUBLE&&(e[i].componentDatatype=S$14.FLOAT,e[i].values=S$14.createTypedArray(S$14.FLOAT,e[i].values)));var o,a=r.length;if(a>0)for(o=E$17(e[r[0]]),t=1;t<a;++t){var s=E$17(e[r[t]]);if(s!==o)throw new t$13("Each attribute list must have the same number of vertices. Attribute "+r[t]+" has a different number of vertices ("+s.toString()+") than attribute "+r[0]+" ("+o.toString()+").")}r.sort((function(t,i){return S$14.getSizeInBytes(e[i].componentDatatype)-S$14.getSizeInBytes(e[t].componentDatatype)}));var l=0,u={};for(t=0;t<a;++t)i=r[t],n=e[i],u[i]=l,l+=G$1d(n);if(l>0){var c=S$14.getSizeInBytes(e[r[0]].componentDatatype),h=l%c;0!==h&&(l+=c-h);var d=new ArrayBuffer(o*l),f={};for(t=0;t<a;++t){i=r[t];var p=S$14.getSizeInBytes(e[i].componentDatatype);f[i]={pointer:S$14.createTypedArray(e[i].componentDatatype,d),index:u[i]/p,strideInComponentType:l/p}}for(t=0;t<o;++t)for(var _=0;_<a;++_){i=r[_];for(var m=(n=e[i]).values,g=f[i],x=g.pointer,y=n.componentsPerAttribute,v=0;v<y;++v)x[g.index+v]=m[t*y+v];g.index+=g.strideInComponentType}return{buffer:d,offsetsInBytes:u,vertexSizeInBytes:l}}}c$13.fromGeometry=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t,i,n,r=e.context,o=u$Z(e.geometry,u$Z.EMPTY_OBJECT),a=u$Z(e.bufferUsage,A$18.DYNAMIC_DRAW),s=u$Z(e.attributeLocations,u$Z.EMPTY_OBJECT),l=u$Z(e.interleave,!1),u=e.vertexArrayAttributes,c=e$2e(u)?u:[],h=o.attributes;if(l){var d=M$14(h);if(e$2e(d)){n=t$X.createVertexBuffer({context:r,typedArray:d.buffer,usage:a});var f=d.offsetsInBytes,p=d.vertexSizeInBytes;for(t in h)h.hasOwnProperty(t)&&e$2e(h[t])&&(e$2e((i=h[t]).values)?c.push({name:t,index:s[t],vertexBuffer:n,componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,offsetInBytes:f[t],strideInBytes:p}):c.push({name:t,index:s[t],value:i.value,componentDatatype:i.componentDatatype,normalize:i.normalize}))}}else for(t in h)if(h.hasOwnProperty(t)&&e$2e(h[t])){var _=(i=h[t]).componentDatatype;_===S$14.DOUBLE&&(_=S$14.FLOAT),n=void 0,e$2e(i.values)&&(n=t$X.createVertexBuffer({context:r,typedArray:S$14.createTypedArray(_,i.values),usage:a})),c.push({name:t,index:s[t],vertexBuffer:n,value:i.value,componentDatatype:_,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize})}var m,g=o.indices;return e$2e(g)&&(m=I$1p.computeNumberOfVertices(o)>=e$2d.SIXTY_FOUR_KILOBYTES&&r.elementIndexUint?t$X.createIndexBuffer({context:r,typedArray:new Uint32Array(g),usage:a,indexDatatype:ce$z.UNSIGNED_INT}):t$X.createIndexBuffer({context:r,typedArray:new Uint16Array(g),usage:a,indexDatatype:ce$z.UNSIGNED_SHORT})),new c$13({context:r,attributes:c,indexBuffer:m})},Object.defineProperties(c$13.prototype,{numberOfAttributes:{get:function(){return this._inner.numberOfAttributes}},numberOfVertices:{get:function(){return this._inner.numberOfVertices}},indexBuffer:{get:function(){return this._inner.indexBuffer}},uniqueID:{get:function(){return this._uniqueID}}}),c$13.prototype.getAttribute=function(e){return o$1q.defined("index",e),this._inner.getAttribute(e)},c$13.prototype._bind=function(){this._inner._bind()},c$13.prototype._unBind=function(){this._inner._unBind()},c$13.prototype.isDestroyed=function(){return!1},c$13.prototype.destroy=function(){return this._inner.destroy(),i$11(this)};var _0x1c6611=(_0x1d5f60=!0,function(e,t){var i=_0x1d5f60?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d5f60=!1,i}),_0x45a610=_0x1c6611(void 0,(function(){return _0x45a610.toString().search("(((.+)+)+)+$").toString().constructor(_0x45a610).search("(((.+)+)+)+$")})),_0x1d5f60;_0x45a610();var Ht$8="attribute vec4 aPosition;\n\nuniform vec4 uDiffuseColor;\n\nvarying vec4 vColor;\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\n#endif\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n #ifdef USE_RelativeOrigin\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz - czm_relativeOrigin, 1.0);\n#else\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n#endif\n gl_Position = depthClampFarPlane(pos);\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n vColor = uDiffuseColor;\n#ifdef NormalVertex\n normal_vertex = aPosition.xyz;\n#endif\n}",_0x43c20f=(_0x17f90d=!0,function(e,t){var i=_0x17f90d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17f90d=!1,i}),_0x49f4db=_0x43c20f(void 0,(function(){return _0x49f4db.toString().search("(((.+)+)+)+$").toString().constructor(_0x49f4db).search("(((.+)+)+)+$")})),_0x17f90d;_0x49f4db();var _0x5ef453="attribute vec4 position;\n\nuniform vec4 uDiffuseColor;\n\nvarying vec4 vColor;\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\n#endif\n\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(position.xyz, 1.0);\n gl_Position = pos;\n clip_vertex = czm_modelView * vec4(position.xyz, 1.0);\n vColor = uDiffuseColor;\n#ifdef NormalVertex\n normal_vertex = position.xyz;\n#endif\n}",_0xf1928d=(_0x39ff6f=!0,function(e,t){var i=_0x39ff6f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39ff6f=!1,i}),_0x167946=_0xf1928d(void 0,(function(){return _0x167946.toString().search("(((.+)+)+)+$").toString().constructor(_0x167946).search("(((.+)+)+)+$")})),_0x39ff6f;_0x167946();var Yt$8="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\nvarying vec4 vColor;\nvarying float fWindowZ;\n\n#ifdef NormalVertex\nvarying vec3 normal_vertex;\nconst vec4 LIGHT_COLOR = vec4(0.8, 0.8, 0.8, 1.0);\n#endif\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n gl_FragColor = vColor;\n#ifdef NormalVertex\n vec3 normal = normalize(czm_computeNormal(normal_vertex));\n vec4 eyePosition = czm_modelView * vec4(normal_vertex.xyz, 1.0);\n vec3 lightDirection = normalize(czm_sunPositionWC - vec3(eyePosition));\n float nDotL = max(dot(lightDirection, normal), 0.0);\n vec4 diffuse = vColor * LIGHT_COLOR * nDotL;\n vec4 ambient = vColor * LIGHT_COLOR;\n gl_FragColor = clamp(diffuse + ambient, vec4(0.0), vec4(1.0));\n#endif\n}",_0x527443=(_0x2b28ec=!0,function(e,t){var i=_0x2b28ec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b28ec=!1,i}),_0x360684=_0x527443(void 0,(function(){return _0x360684.toString().search("(((.+)+)+)+$").toString().constructor(_0x360684).search("(((.+)+)+)+$")})),_0x2b28ec;function _0x6cc60b(e,t){this._positions=e,this._skyline=t,this._command=void 0,this._initialize=!1,this._matWorldMatrix=p$1d.IDENTITY.clone(),this._vertexArray=void 0,this._normalArray=void 0,this._texcoordArray=void 0}function _0x558838(e,t,i,n,r){var o=o$1p.fromRadians(t.longitude,t.latitude,0),a=o$1p.fromRadians(t.longitude,t.latitude,100);o$1p.subtract(o,e,o),o$1p.subtract(a,e,a);var s=new e$2c(o.x,o.y,o.z,1);p$1d.multiplyByVector(i,s,s),e$2c.divideByScalar(s,s.w,s),n.push(.5*s.x+.5),n.push(.5*s.y+.5),s=new e$2c(a.x,a.y,a.z,1),p$1d.multiplyByVector(i,s,s),e$2c.divideByScalar(s,s.w,s),r.push(.5*s.x+.5),r.push(.5*s.y+.5)}_0x360684(),_0x6cc60b.prototype.destroy=function(){e$2e(this._command)&&(this._command.vertexArray=this._command.vertexArray&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&this._command.shaderProgram.destroy(),this._command=void 0),this._vertexArray=void 0,this._normalArray=void 0,this._texcoordArray=void 0},_0x6cc60b.prototype.initialize=function(e){if(!this._initialize){e$2e(this._command)&&(this._command.vertexArray=this._command.vertexArray&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&this._command.shaderProgram.destroy(),this._command=void 0),this._typeArray=null,this._initialize=!0;var t=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArray(this._positions)},extrudedHeight:100,granularity:1e-6}),i=U$18.createGeometry(t);p$1d.setTranslation(this._matWorldMatrix,i.boundingSphere.center,this._matWorldMatrix),this._vertexArray=i.attributes.position.values,this._normalArray=i.attributes.normal.values,this._texcoordArray=i.attributes.st.values,this._command=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matWorldMatrix,pass:Le$q.ANALYSIS,boundingVolume:i.boundingSphere,cull:!1});var n={position:0,st:1,normal:2};this._command.vertexArray=c$13.fromGeometry({context:e,geometry:i,attributeLocations:n,bufferUsage:A$18.STATIC_DRAW,interleave:!0});var r=new s$V({sources:[_0x5ef453]}),o=new s$V({sources:[Yt$8]});r.defines.push("NormalVertex"),o.defines.push("NormalVertex"),this._command.shaderProgram=r$14.fromCache({name:"LimitBody",context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n}),this._command.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var a=new e$2c(128/255,1,235/255,1);this._command.uniformMap={uDiffuseColor:function(){return a}}}};var _0x22d022=new o$1p;_0x6cc60b.prototype.update=function(e,t,i,n,r){this.initialize(e),e.readPixelsAsync({framebuffer:this._skyline._depthBuffer.framebuffer}).then((o=>{var a=p$1d.IDENTITY.clone();p$1d.inverse(this._matWorldMatrix,a);var s=e$2d.toDegrees(r.longitude),l=e$2d.toDegrees(r.latitude),u=r.height,c=this._vertexArray.length/3,h=this._command.vertexArray.getAttribute(0),d=new Float32Array(8*c),f=new e$2c,p=new e$2c(1,1/255,1/65025,1/160581375),_=new p$1d;p$1d.inverse(t,_);for(var m=i.x,g=i.y,x=0;x<c;x++){var y=new e$2c(this._vertexArray[3*x],this._vertexArray[3*x+1],this._vertexArray[3*x+2],1),v=a$18.fromCartesian(y);if(v.height<50)p$1d.multiplyByVector(a,y,y),d[8*x]=y.x,d[8*x+1]=y.y,d[8*x+2]=y.z,d[8*x+3]=this._texcoordArray[2*x],d[8*x+4]=this._texcoordArray[2*x+1],d[8*x+5]=this._normalArray[3*x],d[8*x+6]=this._normalArray[3*x+1],d[8*x+7]=this._normalArray[3*x+2];else{var $=[],b=[];_0x558838(e.relativeOrigin,v,t,$,b);var T=0;b[0]!=$[0]&&b[1]!=$[1]&&(T=(b[1]-$[1])/(b[0]-$[0]));for(var C=new e$2c(0,0,0,1),S=0,w=e.drawingBufferHeight-1;w>-1;w--){var E=0;if(0===T)E=Math.round($[0]*e.drawingBufferWidth);else{var P=(w/e.drawingBufferHeight-$[1])/T+$[0];E=Math.round(P*e.drawingBufferWidth)}E=e$2d.clamp(E,0,e.drawingBufferWidth-1);var A=e.drawingBufferWidth*w+E,L=e$2c.unpack(o,4*A,f);if(e$2c.divideByScalar(L,255,L),(S=e$2c.dot(L,p))>0){C.x=E/e.drawingBufferWidth*2-1,C.y=w/e.drawingBufferHeight*2-1;break}}if(this._skyline._scene.frameState.useLogDepth&&S>0){var M=S*n;S=g*(1-m/(Math.pow(2,M)-1+m))/(g-m)}e.webgpu||(S=2*S-1),C.z=S,p$1d.multiplyByVector(_,C,C),e$2c.divideByScalar(C,C.w,C),o$1p.add(e.relativeOrigin,C,_0x22d022);var R=a$18.fromCartesian(_0x22d022);R.longitude=e$2d.toDegrees(R.longitude),R.latitude=e$2d.toDegrees(R.latitude),v.longitude=e$2d.toDegrees(v.longitude),v.latitude=e$2d.toDegrees(v.latitude);var O=a$18.sphericalDistance(s,l,R.longitude,R.latitude),D=a$18.sphericalDistance(s,l,v.longitude,v.latitude)/O*(R.height-u)+u,I=o$1p.fromDegrees(v.longitude,v.latitude,D);y.x=I.x,y.y=I.y,y.z=I.z,y.w=1,p$1d.multiplyByVector(a,y,y),d[8*x]=y.x,d[8*x+1]=y.y,d[8*x+2]=y.z,d[8*x+3]=this._texcoordArray[2*x],d[8*x+4]=this._texcoordArray[2*x+1],d[8*x+5]=this._normalArray[3*x],d[8*x+6]=this._normalArray[3*x+1],d[8*x+7]=this._normalArray[3*x+2]}}h.vertexBuffer.copyFromArrayView(d,0)}))};var _0x487e23=(_0x430140=!0,function(e,t){var i=_0x430140?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x430140=!1,i}),_0x383bba=_0x487e23(void 0,(function(){return _0x383bba.toString().search("(((.+)+)+)+$").toString().constructor(_0x383bba).search("(((.+)+)+)+$")})),_0x430140;function _0x4f9793(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._viewSheds=[],this._boundingSphere=new i$1d,this._frameState=void 0,this._update=!0,this._id=0,this._name="",this._sceneName="",this._checking=!1,this._visibleViewport=4095}function _0x5805d3(e,t,i,n){if(t._isUpdateCommand){for(var r=[],o=[],a=0;a<n.length;a++)r.push(i[n[a]]._cameraDepthBuffer.depthTexture),o.push(i[n[a]]._renderTextureMatrix);t._colorCommand.uniformMap={uVisibleAreaColor:function(){return t._visibleAreaColor},textureCount:function(){return n.length},uHiddenAreaColor:function(){return t._hiddenAreaColor},uRenderTextureMatrixs:function(){return o},uTexture1_size:function(){var e=t._cameraDepthBuffer.depthTexture;return new o$1o(e.width,e.height)},uTextures:function(){return r},uGlobalDepthTexture:function(){return t._globalDepthBuffer.depthTexture},uGlobeTextureSize:function(){return new o$1o(t._globalDepthBuffer.depthTexture.width,t._globalDepthBuffer.depthTexture.height)}},t._colorCommand._isViewShed=!0,t._isUpdateCommand=!1}}function _0x3b009f(e,t,i){for(var n=e._viewSheds,r=0;r<n.length;r++){for(var o=[],a=[],s=n[r]._boundingSphere,l=0;l<n.length;l++)r!=l&&_0x59f6ca(s,n[l]._boundingSphere)&&(o.push(n[l]._name),a.push(l));o.length>0&&(o.push(n[r]._name),a.push(r)),t.push(o),i.push(a)}}function _0x59f6ca(e,t){var i=e.radius,n=t.radius,r=e.center,o=t.center;return o$1p.distance(r,o)<i+n}function t$W(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}function T$10(e,t,i){var n=e._gl;n.framebufferTexture2D(n.FRAMEBUFFER,t,i._target,i._texture,0)}function b$19(e,t,i){var n=e._gl;n.framebufferRenderbuffer(n.FRAMEBUFFER,t,n.RENDERBUFFER,i._getRenderbuffer())}function a$W(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context;o$1q.defined("options.context",t);var i=t._gl,n=e$1W.maximumColorAttachments;if(this._gl=i,this._framebuffer=i.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=u$Z(e.destroyAttachments,!0),e$2e(e.colorTextures)&&e$2e(e.colorRenderbuffers))throw new t$15("Cannot have both color texture and color renderbuffer attachments.");if(e$2e(e.depthTexture)&&e$2e(e.depthRenderbuffer))throw new t$15("Cannot have both a depth texture and depth renderbuffer attachment.");if(e$2e(e.depthStencilTexture)&&e$2e(e.depthStencilRenderbuffer))throw new t$15("Cannot have both a depth-stencil texture and depth-stencil renderbuffer attachment.");var r,o,a,s,l,u=e$2e(e.depthTexture)||e$2e(e.depthRenderbuffer),c=e$2e(e.depthStencilTexture)||e$2e(e.depthStencilRenderbuffer);if(u&&c)throw new t$15("Cannot have both a depth and depth-stencil attachment.");if(e$2e(e.stencilRenderbuffer)&&c)throw new t$15("Cannot have both a stencil and depth-stencil attachment.");if(u&&e$2e(e.stencilRenderbuffer))throw new t$15("Cannot have both a depth and stencil attachment.");if(this._bind(),e$2e(e.colorTextures)){var h=e.colorTextures;if((s=this._colorTextures.length=this._activeColorAttachments.length=h.length)>n)throw new t$15("The number of color attachments exceeds the number supported.");for(a=0;a<s;++a){if(r=h[a],!V$12.isColorFormat(r.pixelFormat))throw new t$15("The color-texture pixel-format must be a color format.");if(r.pixelDatatype===_$_.FLOAT&&!t.colorBufferFloat)throw new t$15("The color texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions. See Context.colorBufferFloat.");if(r.pixelDatatype===_$_.HALF_FLOAT&&!t.colorBufferHalfFloat)throw new t$15("The color texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension. See Context.colorBufferHalfFloat.");T$10(this,l=this._gl.COLOR_ATTACHMENT0+a,r),this._activeColorAttachments[a]=l,this._colorTextures[a]=r}}if(e$2e(e.colorRenderbuffers)){var d=e.colorRenderbuffers;if((s=this._colorRenderbuffers.length=this._activeColorAttachments.length=d.length)>n)throw new t$15("The number of color attachments exceeds the number supported.");for(a=0;a<s;++a)o=d[a],b$19(this,l=this._gl.COLOR_ATTACHMENT0+a,o),this._activeColorAttachments[a]=l,this._colorRenderbuffers[a]=o}if(e$2e(e.depthTexture)){if((r=e.depthTexture).pixelFormat!==V$12.DEPTH_COMPONENT&&r.pixelFormat!==V$12.DEPTH_COMPONENT16&&r.pixelFormat!==V$12.DEPTH_COMPONENT32F)throw new t$15("The depth-texture pixel-format must be DEPTH_COMPONENT.");T$10(this,this._gl.DEPTH_ATTACHMENT,r),this._depthTexture=r}if(e$2e(e.depthRenderbuffer)&&(o=e.depthRenderbuffer,b$19(this,this._gl.DEPTH_ATTACHMENT,o),this._depthRenderbuffer=o),e$2e(e.stencilRenderbuffer)&&(o=e.stencilRenderbuffer,b$19(this,this._gl.STENCIL_ATTACHMENT,o),this._stencilRenderbuffer=o),e$2e(e.depthStencilTexture)){if((r=e.depthStencilTexture).pixelFormat!==V$12.DEPTH_STENCIL)throw new t$15("The depth-stencil pixel-format must be DEPTH_STENCIL.");T$10(this,this._gl.DEPTH_STENCIL_ATTACHMENT,r),this._depthStencilTexture=r}e$2e(e.depthStencilRenderbuffer)&&(o=e.depthStencilRenderbuffer,b$19(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilRenderbuffer=o),this._unBind()}_0x383bba(),Object.defineProperties(_0x4f9793.prototype,{ViewShedCount:{get:function(){return this._viewSheds.length}}}),_0x4f9793.prototype.addViewShed=function(e){e$2e(e)&&this._viewSheds.push(e)},_0x4f9793.prototype.getViewShed=function(e){if(this._viewSheds.length<=e)throw new t$15("index is outrange.");return this._viewSheds[e]},_0x4f9793.prototype.removeViewShed=function(e,t){if(this._viewSheds.length<=e)throw new t$15("index is outrange.");t?this._viewSheds[e].destroy():this._viewSheds[e].clear(),this._viewSheds.splice(e,1)},_0x4f9793.prototype.destroy=function(){for(var e=0;e<this._viewSheds.length;e++)this._viewSheds[e].destroy();this._viewSheds=[],this._scene._analyst3D.remove(this._name,!0)},_0x4f9793.prototype.clear=function(){for(var e=0;e<this._viewSheds.length;e++)this._viewSheds[e].clear();this._viewSheds=[],this._scene._analyst3D.remove(this._name,!1)},_0x4f9793.prototype.build=function(){if(""===this._name&&!this._checking){for(var e=0;e<this._viewSheds.length;e++)""!=this._viewSheds[e]._name?this._scene._analyst3D.add(this._viewSheds[e]):this._viewSheds[e].build();this._name="multiviewshed3d"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this)}},_0x4f9793.prototype.update=function(e,t,i){if("normal"===t._fboState.name&&!t.passes.pick&&!t.camera.bReflect){var n=[],r=[];_0x3b009f(this,n,r);for(var o=this._viewSheds.length,a=0;a<o;a++){var s=n[a],l=r[a];s.length>0&&(this._viewSheds[a]._setMultiViewShedNames(s),_0x5805d3(e,this._viewSheds[a],this._viewSheds,l))}}},t$W.ALL=Object.freeze(new t$W({color:new e$1X(0,0,0,0),depth:1,stencil:0})),t$W.prototype.execute=function(e,t){e.clear(this,t)},t$W.prototype.checkOcclusionQuery=function(e,t,i){return!1},t$W.prototype.isOccluded=function(){return!1},Object.defineProperties(a$W.prototype,{status:{get:function(){this._bind();var e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}}),a$W.prototype._bind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)},a$W.prototype._unBind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)},a$W.prototype._attachTexture=function(e,t){if(1==this.destroyAttachments)throw new t$15("destroyAttachments must be false");var i=this._gl;i.framebufferTexture2D(i.FRAMEBUFFER,e,t._target,t._texture,0)},a$W.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments},a$W.prototype.getColorTexture=function(e){if(!e$2e(e)||e<0||e>=this._colorTextures.length)throw new t$15("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]},a$W.prototype.getColorRenderbuffer=function(e){if(!e$2e(e)||e<0||e>=this._colorRenderbuffers.length)throw new t$15("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]},a$W.prototype.isDestroyed=function(){return!1},a$W.prototype.destroy=function(){if(this.destroyAttachments){for(var e=0,t=this._colorTextures,i=t.length;e<i;++e){var n=t[e];e$2e(n)&&n.destroy()}var r=this._colorRenderbuffers;for(i=r.length,e=0;e<i;++e){var o=r[e];e$2e(o)&&o.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),i$11(this)},a$W.blitFramebuffers=function(e,t,i,n,r,o){if(e.webgl2){var a=e._gl,s=0;if(i.numberOfColorAttachments>0&&(s|=a.COLOR_BUFFER_BIT),(e$2e(i.depthStencilTexture)||e$2e(i.depthTexture))&&(s|=a.DEPTH_BUFFER_BIT|(o?a.STENCIL_BUFFER_BIT:0)),0!=s){a.bindFramebuffer(a.READ_FRAMEBUFFER,t._inner._framebuffer),a.bindFramebuffer(a.DRAW_FRAMEBUFFER,i._inner._framebuffer);var l=i.getColorTexture(0),u=l.width,c=l.height;a.blitFramebuffer(0,0,u,c,0,0,u,c,s,a.NEAREST),a.bindFramebuffer(a.READ_FRAMEBUFFER,null),a.bindFramebuffer(a.DRAW_FRAMEBUFFER,null)}}};var _0x5e9e9f=(_0x31af5b=!0,function(e,t){var i=_0x31af5b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31af5b=!1,i}),_0x274d9b=_0x5e9e9f(void 0,(function(){return _0x274d9b.toString().search("(((.+)+)+)+$").toString().constructor(_0x274d9b).search("(((.+)+)+)+$")})),_0x31af5b;function EventState(e,t,i,n){void 0===t&&(t=!1),this.initialize(e,t,i,n)}function Observer(e,t,i){void 0===i&&(i=null),this.callback=e,this.mask=t,this.scope=i,this._willBeUnregistered=!1,this.unregisterOnNextCall=!1}function Observable(e){this._observers=new Array,this._eventState=new EventState(0),e&&(this._onObserverAdded=e)}_0x274d9b(),EventState.prototype.initialize=function(e,t,i,n){return void 0===t&&(t=!1),this.mask=e,this.skipNextObservers=t,this.target=i,this.currentTarget=n,this},Observable.FromPromise=function(e,t){var i=new Observable;return e.then((function(e){i.notifyObservers(e)})).catch((function(e){if(!t)throw e;t.notifyObservers(e)})),i},Object.defineProperty(Observable.prototype,"observers",{get:function(){return this._observers},enumerable:!1,configurable:!0}),Observable.prototype.add=function(e,t,i,n,r){if(void 0===t&&(t=-1),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===r&&(r=!1),!e)return null;var o=new Observer(e,t,n);return o.unregisterOnNextCall=r,i?this._observers.unshift(o):this._observers.push(o),this._onObserverAdded&&this._onObserverAdded(o),o},Observable.prototype.addOnce=function(e){return this.add(e,void 0,void 0,void 0,!0)},Observable.prototype.remove=function(e){return!!e&&(-1!==this._observers.indexOf(e)&&(this._deferUnregister(e),!0))},Observable.prototype.removeCallback=function(e,t){for(var i=0;i<this._observers.length;i++){var n=this._observers[i];if(!n._willBeUnregistered&&(n.callback===e&&(!t||t===n.scope)))return this._deferUnregister(n),!0}return!1},Observable.prototype._deferUnregister=function(e){var t=this;e.unregisterOnNextCall=!1,e._willBeUnregistered=!0,setTimeout((function(){t._remove(e)}),0)},Observable.prototype._remove=function(e){if(!e)return!1;var t=this._observers.indexOf(e);return-1!==t&&(this._observers.splice(t,1),!0)},Observable.prototype.makeObserverTopPriority=function(e){this._remove(e),this._observers.unshift(e)},Observable.prototype.makeObserverBottomPriority=function(e){this._remove(e),this._observers.push(e)},Observable.prototype.notifyObservers=function(e,t,i,n,r){if(void 0===t&&(t=-1),!this._observers.length)return!0;var o=this._eventState;o.mask=t,o.target=i,o.currentTarget=n,o.skipNextObservers=!1,o.lastReturnValue=e,o.userInfo=r;for(var a=0,s=this._observers;a<s.length;a++){var l=s[a];if(!l._willBeUnregistered&&(l.mask&t&&(l.scope?o.lastReturnValue=l.callback.apply(l.scope,[e,o]):o.lastReturnValue=l.callback(e,o),l.unregisterOnNextCall&&this._deferUnregister(l)),o.skipNextObservers))return!1}return!0},Observable.prototype.notifyObserversWithPromise=function(e,t,i,n,r){var o=this;void 0===t&&(t=-1);var a=Promise.resolve(e);if(!this._observers.length)return a;var s=this._eventState;return s.mask=t,s.target=i,s.currentTarget=n,s.skipNextObservers=!1,s.userInfo=r,this._observers.forEach((function(i){s.skipNextObservers||i._willBeUnregistered||i.mask&t&&(a=i.scope?a.then((function(t){return s.lastReturnValue=t,i.callback.apply(i.scope,[e,s])})):a.then((function(t){return s.lastReturnValue=t,i.callback(e,s)})),i.unregisterOnNextCall&&o._deferUnregister(i))})),a.then((function(){return e}))},Observable.prototype.notifyObserver=function(e,t,i){if(void 0===i&&(i=-1),!e._willBeUnregistered){var n=this._eventState;n.mask=i,n.skipNextObservers=!1,e.callback(t,n),e.unregisterOnNextCall&&this._deferUnregister(e)}},Observable.prototype.hasObservers=function(){return this._observers.length>0},Observable.prototype.clear=function(){this._observers=new Array,this._onObserverAdded=null},Observable.prototype.clone=function(){var e=new Observable;return e._observers=this._observers.slice(0),e},Observable.prototype.hasSpecificMask=function(e){void 0===e&&(e=-1);for(var t=0,i=this._observers;t<i.length;t++){var n=i[t];if(n.mask&e||n.mask===e)return!0}return!1};var _0xc84bd7=(_0x2e374f=!0,function(e,t){var i=_0x2e374f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e374f=!1,i}),_0x493251=_0xc84bd7(void 0,(function(){return _0x493251.toString().search("(((.+)+)+)+$").toString().constructor(_0x493251).search("(((.+)+)+)+$")})),_0x2e374f,_0x5b1f42;function _0x13d391(){this.samplingMode=-1,this._useMipMaps=!0,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this._comparisonFunction=0}_0x493251(),Object.defineProperty(_0x13d391.prototype,"wrapU",{get:function(){return this._cachedWrapU},set:function(e){this._cachedWrapU=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x13d391.prototype,"wrapV",{get:function(){return this._cachedWrapV},set:function(e){this._cachedWrapV=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x13d391.prototype,"wrapR",{get:function(){return this._cachedWrapR},set:function(e){this._cachedWrapR=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x13d391.prototype,"anisotropicFilteringLevel",{get:function(){return this._cachedAnisotropicFilteringLevel},set:function(e){this._cachedAnisotropicFilteringLevel=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x13d391.prototype,"comparisonFunction",{get:function(){return this._comparisonFunction},set:function(e){this._comparisonFunction=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x13d391.prototype,"useMipMaps",{get:function(){return this._useMipMaps},set:function(e){this._useMipMaps=e},enumerable:!1,configurable:!0}),_0x13d391.prototype.setParameters=function(e,t,i,n,r,o){return void 0===e&&(e=_0x333f62.TEXTURE_WRAP_ADDRESSMODE),void 0===t&&(t=_0x333f62.TEXTURE_WRAP_ADDRESSMODE),void 0===i&&(i=_0x333f62.TEXTURE_WRAP_ADDRESSMODE),void 0===n&&(n=1),void 0===r&&(r=_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE),void 0===o&&(o=0),this._cachedWrapU=e,this._cachedWrapV=t,this._cachedWrapR=i,this._cachedAnisotropicFilteringLevel=n,this.samplingMode=r,this._comparisonFunction=o,this},_0x13d391.prototype.compareSampler=function(e){return this._cachedWrapU===e._cachedWrapU&&this._cachedWrapV===e._cachedWrapV&&this._cachedWrapR===e._cachedWrapR&&this._cachedAnisotropicFilteringLevel===e._cachedAnisotropicFilteringLevel&&this.samplingMode===e.samplingMode&&this._comparisonFunction===e._comparisonFunction&&this._useMipMaps===e._useMipMaps},function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.Unknown=0]="Unknown",e[e.Url=1]="Url",e[e.Temp=2]="Temp",e[e.Raw=3]="Raw",e[e.Dynamic=4]="Dynamic",e[e.RenderTarget=5]="RenderTarget",e[e.MultiRenderTarget=6]="MultiRenderTarget",e[e.Cube=7]="Cube",e[e.CubeRaw=8]="CubeRaw",e[e.CubePrefiltered=9]="CubePrefiltered",e[e.Raw3D=10]="Raw3D",e[e.Raw2DArray=11]="Raw2DArray",e[e.DepthStencil=12]="DepthStencil",e[e.CubeRawRGBD=13]="CubeRawRGBD",e[e.Depth=14]="Depth"}(_0x5b1f42||(_0x5b1f42={}));const InternalTextureSource=_0x5b1f42;function InternalTexture(e,t,i){void 0===i&&(i=!1);var n=_0x13d391.call(this)||this;return n.isReady=!1,n.isCube=!1,n.is3D=!1,n.is2DArray=!1,n.isMultiview=!1,n.url="",n.generateMipMaps=!1,n.samples=0,n.type=-1,n.format=-1,n.onLoadedObservable=new Observable,n.onErrorObservable=new Observable,n.onRebuildCallback=null,n.width=0,n.height=0,n.depth=0,n.baseWidth=0,n.baseHeight=0,n.baseDepth=0,n.invertY=!1,n._invertVScale=!1,n._associatedChannel=-1,n._source=InternalTextureSource.Unknown,n._buffer=null,n._bufferView=null,n._bufferViewArray=null,n._bufferViewArrayArray=null,n._size=0,n._extension="",n._files=null,n._workingCanvas=null,n._workingContext=null,n._cachedCoordinatesMode=null,n._isDisabled=!1,n._compression=null,n._sphericalPolynomial=null,n._sphericalPolynomialPromise=null,n._sphericalPolynomialComputed=!1,n._lodGenerationScale=0,n._lodGenerationOffset=0,n._useSRGBBuffer=!1,n._lodTextureHigh=null,n._lodTextureMid=null,n._lodTextureLow=null,n._isRGBD=!1,n._linearSpecularLOD=!1,n._irradianceTexture=null,n._hardwareTexture=null,n._maxLodLevel=null,n._references=1,n._gammaSpace=null,n._engine=e,n._source=t,n._uniqueId=InternalTexture._Counter++,!i&&(n._hardwareTexture=e._createHardwareTexture()),n}_0x13d391&&(InternalTexture.__proto__=_0x13d391),InternalTexture.prototype=Object.create(_0x13d391&&_0x13d391.prototype),InternalTexture.prototype.constructor=_0x13d391,Object.defineProperty(InternalTexture.prototype,"useMipMaps",{get:function(){return this._useMipMaps},set:function(e){this._useMipMaps=e},enumerable:!1,configurable:!0}),Object.defineProperty(InternalTexture.prototype,"uniqueId",{get:function(){return this._uniqueId},enumerable:!1,configurable:!0}),InternalTexture.prototype.getEngine=function(){return this._engine},Object.defineProperty(InternalTexture.prototype,"source",{get:function(){return this._source},enumerable:!1,configurable:!0}),InternalTexture.prototype.incrementReferences=function(){this._references++},InternalTexture.prototype.updateSize=function(e,t,i){void 0===i&&(i=1),this._engine.updateTextureDimensions(this,e,t,i),this.width=e,this.height=t,this.depth=i,this.baseWidth=e,this.baseHeight=t,this.baseDepth=i,this._size=e*t*i},InternalTexture.prototype._rebuild=function(){var e,t=this;if(this.isReady=!1,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this.onRebuildCallback){var i=this.onRebuildCallback(this),n=function(e){e._swapAndDie(t,!1),t.isReady=i.isReady};i.isAsync?i.proxy.then(n):n(i.proxy)}else{var r;switch(this.source){case InternalTextureSource.Temp:break;case InternalTextureSource.Url:return void(r=this._engine.createTexture(null!==(e=this._originalUrl)&&void 0!==e?e:this.url,!this.generateMipMaps,this.invertY,null,this.samplingMode,(function(){r._swapAndDie(t,!1),t.isReady=!0}),null,this._buffer,void 0,this.format,this._extension,void 0,void 0,void 0,this._useSRGBBuffer));case InternalTextureSource.Raw:(r=this._engine.createRawTexture(this._bufferView,this.baseWidth,this.baseHeight,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type,void 0,this._useSRGBBuffer))._swapAndDie(this,!1),this.isReady=!0;break;case InternalTextureSource.Raw3D:(r=this._engine.createRawTexture3D(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type))._swapAndDie(this,!1),this.isReady=!0;break;case InternalTextureSource.Raw2DArray:(r=this._engine.createRawTexture2DArray(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type))._swapAndDie(this,!1),this.isReady=!0;break;case InternalTextureSource.Dynamic:(r=this._engine.createDynamicTexture(this.baseWidth,this.baseHeight,this.generateMipMaps,this.samplingMode))._swapAndDie(this,!1),this._engine.updateDynamicTexture(this,this._engine.getRenderingCanvas(),this.invertY,void 0,void 0,!0);break;case InternalTextureSource.Cube:return void(r=this._engine.createCubeTexture(this.url,null,this._files,!this.generateMipMaps,(function(){r._swapAndDie(t,!1),t.isReady=!0}),null,this.format,this._extension,!1,0,0,null,void 0,this._useSRGBBuffer));case InternalTextureSource.CubeRaw:(r=this._engine.createRawCubeTexture(this._bufferViewArray,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this,!1),this.isReady=!0;break;case InternalTextureSource.CubeRawRGBD:return;case InternalTextureSource.CubePrefiltered:return void((r=this._engine.createPrefilteredCubeTexture(this.url,null,this._lodGenerationScale,this._lodGenerationOffset,(function(e){e&&e._swapAndDie(t,!1),t.isReady=!0}),null,this.format,this._extension))._sphericalPolynomial=this._sphericalPolynomial)}}},InternalTexture.prototype._swapAndDie=function(e,t){var i;void 0===t&&(t=!0),null===(i=this._hardwareTexture)||void 0===i||i.setUsage(e._source,this.generateMipMaps,this.isCube,this.width,this.height),e._hardwareTexture=this._hardwareTexture,t&&(e._isRGBD=this._isRGBD),this._lodTextureHigh&&(e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureHigh=this._lodTextureHigh),this._lodTextureMid&&(e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureMid=this._lodTextureMid),this._lodTextureLow&&(e._lodTextureLow&&e._lodTextureLow.dispose(),e._lodTextureLow=this._lodTextureLow),this._irradianceTexture&&(e._irradianceTexture&&e._irradianceTexture.dispose(),e._irradianceTexture=this._irradianceTexture);var n=this._engine.getLoadedTexturesCache(),r=n.indexOf(this);-1!==r&&n.splice(r,1),-1===(r=n.indexOf(e))&&n.push(e)},InternalTexture.prototype.dispose=function(){this._references--,this.onLoadedObservable.clear(),this.onErrorObservable.clear(),0===this._references&&(this._engine._releaseTexture(this),this._hardwareTexture=null)},InternalTexture._Counter=0;var _0x5589c5=(_0x4014a1=!0,function(e,t){var i=_0x4014a1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4014a1=!1,i}),_0x3078d5=_0x5589c5(void 0,(function(){return _0x3078d5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3078d5).search("(((.+)+)+)+$")})),_0x4014a1;function _0x3ebbca(e,t,i,n){this._textures=null,this._attachments=null,this._generateStencilBuffer=!1,this._generateDepthBuffer=!1,this._depthStencilTextureWithStencil=!1,this._isMulti=e,this._isCube=t,this._size=i,this._engine=n,this._depthStencilTexture=null}_0x3078d5(),Object.defineProperty(_0x3ebbca.prototype,"depthStencilTexture",{get:function(){return this._depthStencilTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"depthStencilTextureWithStencil",{get:function(){return this._depthStencilTextureWithStencil},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"isCube",{get:function(){return this._isCube},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"isMulti",{get:function(){return this._isMulti},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"is2DArray",{get:function(){return this.layers>0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"size",{get:function(){return this.width},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"width",{get:function(){return this._size.width||this._size},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"height",{get:function(){return this._size.height||this._size},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"layers",{get:function(){return this._size.layers||0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"texture",{get:function(){var e,t;return null!==(t=null===(e=this._textures)||void 0===e?void 0:e[0])&&void 0!==t?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"textures",{get:function(){return this._textures},enumerable:!1,configurable:!0}),Object.defineProperty(_0x3ebbca.prototype,"samples",{get:function(){var e,t;return null!==(t=null===(e=this.texture)||void 0===e?void 0:e.samples)&&void 0!==t?t:1},enumerable:!1,configurable:!0}),_0x3ebbca.prototype.setSamples=function(e,t,i){return void 0===t&&(t=!0),void 0===i&&(i=!1),this.samples!==e||i?this._isMulti?this._engine.updateMultipleRenderTargetTextureSampleCount(this,e,t):this._engine.updateRenderTargetTextureSampleCount(this,e):e},_0x3ebbca.prototype.setTextures=function(e){Array.isArray(e)?this._textures=e:this._textures=e?[e]:null},_0x3ebbca.prototype.setTexture=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=!0),!this._textures&&(this._textures=[]),this._textures[t]&&i&&this._textures[t].dispose(),this._textures[t]=e},_0x3ebbca.prototype.createDepthStencilTexture=function(e,t,i,n,r){var o;return void 0===e&&(e=0),void 0===t&&(t=!0),void 0===i&&(i=!1),void 0===n&&(n=1),void 0===r&&(r=_0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT),null===(o=this._depthStencilTexture)||void 0===o||o.dispose(),this._depthStencilTextureWithStencil=i,this._depthStencilTexture=this._engine.createDepthStencilTexture(this._size,{bilinearFiltering:t,comparisonFunction:e,generateStencil:i,isCube:this._isCube,samples:n,depthTextureFormat:r},this),this._depthStencilTexture},_0x3ebbca.prototype._shareDepth=function(e){this._depthStencilTexture&&(e._depthStencilTexture&&e._depthStencilTexture.dispose(),e._depthStencilTexture=this._depthStencilTexture,this._depthStencilTexture.incrementReferences())},_0x3ebbca.prototype._swapAndDie=function(e){this.texture&&this.texture._swapAndDie(e),this._textures=null,this.dispose(!0)},_0x3ebbca.prototype._cloneRenderTargetWrapper=function(){var e,t,i,n,r,o,a=null;if(this._isMulti){var s=this.textures;if(s&&s.length>0){var l=!1,u=s.length,c=s[s.length-1]._source;(c===InternalTextureSource.Depth||c===InternalTextureSource.DepthStencil)&&(l=!0,u--);for(var h=[],d=[],f=0;f<u;++f){var p=s[f];h.push(p.samplingMode),d.push(p.type)}var _={samplingModes:h,generateMipMaps:s[0].generateMipMaps,generateDepthBuffer:this._generateDepthBuffer,generateStencilBuffer:this._generateStencilBuffer,generateDepthTexture:l,types:d,textureCount:u},m={width:this.width,height:this.height};a=this._engine.createMultipleRenderTarget(m,_)}}else{var g={};if(g.generateDepthBuffer=this._generateDepthBuffer,g.generateMipMaps=null!==(t=null===(e=this.texture)||void 0===e?void 0:e.generateMipMaps)&&void 0!==t&&t,g.generateStencilBuffer=this._generateStencilBuffer,g.samplingMode=null===(i=this.texture)||void 0===i?void 0:i.samplingMode,g.type=null===(n=this.texture)||void 0===n?void 0:n.type,g.format=null===(r=this.texture)||void 0===r?void 0:r.format,this.isCube)a=this._engine.createRenderTargetCubeTexture(this.width,g);else{m={width:this.width,height:this.height,layers:this.is2DArray?null===(o=this.texture)||void 0===o?void 0:o.depth:void 0};a=this._engine.createRenderTargetTexture(m,g)}a.texture.isReady=!0}return a},_0x3ebbca.prototype._swapRenderTargetWrapper=function(e){if(this._textures&&e._textures)for(var t=0;t<this._textures.length;++t)this._textures[t]._swapAndDie(e._textures[t],!1),e._textures[t].isReady=!0;this._depthStencilTexture&&e._depthStencilTexture&&(this._depthStencilTexture._swapAndDie(e._depthStencilTexture),e._depthStencilTexture.isReady=!0),this._textures=null,this._depthStencilTexture=null},_0x3ebbca.prototype._rebuild=function(){var e=this._cloneRenderTargetWrapper();if(e){if(this._depthStencilTexture){var t=this._depthStencilTexture.samplingMode,i=t===_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE||t===_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE||t===_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST;e.createDepthStencilTexture(this._depthStencilTexture._comparisonFunction,i,this._depthStencilTextureWithStencil,this._depthStencilTexture.samples)}this.samples>1&&e.setSamples(this.samples),e._swapRenderTargetWrapper(this),e.dispose()}},_0x3ebbca.prototype.releaseTextures=function(){var e,t;if(this._textures)for(var i=0;null!==(t=i<(null===(e=this._textures)||void 0===e?void 0:e.length))&&void 0!==t&&t;++i)this._textures[i].dispose();this._textures=null},_0x3ebbca.prototype.dispose=function(e){var t;void 0===e&&(e=!1),!e&&(null===(t=this._depthStencilTexture)||void 0===t||t.dispose(),this._depthStencilTexture=null,this.releaseTextures()),this._engine._releaseRenderTargetWrapper(this)};var v$P=1;function r$12(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context;o$1q.defined("options.context",t),this.id=v$P++,this._context=t,this._colorTextures=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthStencilTexture=void 0,this.destroyAttachments=u$Z(e.destroyAttachments,!0);var i,n,r,o=e.colorTextures,a=!1,s=1,l=1;if(e$2e(e.colorTextures)?(a=o.length>1,s=o[0].width,l=o[0].height):e$2e(e.depthTexture)?(s=e.depthTexture.width,l=e.depthTexture.height):e$2e(e.depthStencilTexture)&&(s=e.depthStencilTexture.width,l=e.depthStencilTexture.height),this._textureSize={width:s,height:l},this._renderTargetWrapper=new _0x3ebbca(a,!1,this._textureSize,t.engine),e$2e(e.colorTextures)){var u=e.colorTextures;r=this._colorTextures.length=this._activeColorAttachments.length=u.length;var c=[],h=[];for(n=0;n<r;++n){if(i=u[n],!V$12.isColorFormat(i.pixelFormat))throw new t$15("The color-texture pixel-format must be a color format.");if(i.pixelDatatype===_$_.FLOAT&&!t.colorBufferFloat)throw new t$15("The color texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions. See Context.colorBufferFloat.");if(i.pixelDatatype===_$_.HALF_FLOAT&&!t.colorBufferHalfFloat)throw new t$15("The color texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension. See Context.colorBufferHalfFloat.");this._renderTargetWrapper.setTexture(i._inner.internalTexture,n,!1),this._colorTextures[n]=i,c.push(n+1),h.push(n+1)}this._renderTargetWrapper._attachments=c,this._renderTargetWrapper._defaultAttachments=h}e$2e(e.depthTexture)&&(this._renderTargetWrapper._depthStencilTextureWithStencil=!1,this._renderTargetWrapper._depthStencilTexture=e.depthTexture._inner.internalTexture,this._depthTexture=e.depthTexture),e$2e(e.depthStencilTexture)&&(this._renderTargetWrapper._depthStencilTextureWithStencil=!0,this._renderTargetWrapper._depthStencilTexture=e.depthStencilTexture._inner.internalTexture,this._depthStencilTexture=e.depthStencilTexture)}function t$V(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context;o$1q.defined("options.context",t),e.context.webgpu?this._inner=new r$12(e):this._inner=new a$W(e)}function n$$(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}function e$1T(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}Object.defineProperties(r$12.prototype,{status:{get:function(){return de$y.FRAMEBUFFER_COMPLETE}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}},textureSize:{get:function(){return this._textureSize}}}),r$12.prototype._bind=function(){e$2e(this._renderTargetWrapper)&&this._context._engine.bindFramebuffer(this._renderTargetWrapper)},r$12.prototype._unBind=function(){e$2e(this._renderTargetWrapper)&&this._context._engine.unBindFramebuffer(this._renderTargetWrapper)},r$12.prototype._attachTexture=function(e,t){console.log("FramebufferGPU.prototype._attachTexture")},r$12.prototype._getActiveColorAttachments=function(){console.log("FramebufferGPU.prototype._getActiveColorAttachments")},r$12.prototype.getColorTexture=function(e){if(!e$2e(e)||e<0||e>=this._colorTextures.length)throw new t$15("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]},r$12.prototype.getColorRenderbuffer=function(e){if(!e$2e(e)||e<0||e>=this._colorRenderbuffers.length)throw new t$15("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]},r$12.prototype.isDestroyed=function(){return!1},r$12.prototype.destroy=function(){if(this._renderTargetWrapper.dispose(!0),this.destroyAttachments){for(var e=this._colorTextures,t=e.length,i=0;i<t;++i){var n=e[i];e$2e(n)&&n.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy()}return i$11(this)},Object.defineProperties(t$V.prototype,{status:{get:function(){return this._inner.status}},numberOfColorAttachments:{get:function(){return this._inner.numberOfColorAttachments}},depthTexture:{get:function(){return this._inner.depthTexture}},depthRenderbuffer:{get:function(){return this._inner.depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._inner.stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._inner.depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._inner.depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}},textureSize:{get:function(){return this._inner.textureSize}}}),t$V.prototype._bind=function(){this._inner._bind()},t$V.prototype._unBind=function(){this._inner._unBind()},t$V.prototype._attachTexture=function(e,t){this._inner._attachTexture(e,t)},t$V.prototype._getActiveColorAttachments=function(){return this._inner._getActiveColorAttachments()},t$V.prototype.getColorTexture=function(e){return this._inner.getColorTexture(e)},t$V.prototype.getColorRenderbuffer=function(e){return this._inner.getColorRenderbuffer(e)},t$V.prototype.isDestroyed=function(){return!1},t$V.prototype.destroy=function(){return this._inner.destroy(),i$11(this)},t$V.blitFramebuffers=function(e,t,i,n,r,o){e.webgpu||a$W.blitFramebuffers(e,t,i,n,r,o)};var T$$={DONT_CARE:de$y.DONT_CARE,FASTEST:de$y.FASTEST,NICEST:de$y.NICEST,validate:function(e){return e===T$$.DONT_CARE||e===T$$.FASTEST||e===T$$.NICEST}},I$1e=Object.freeze(T$$);function e$1S(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.wrapS,q$1a.CLAMP_TO_EDGE),i=u$Z(e.wrapT,q$1a.CLAMP_TO_EDGE),n=u$Z(e.minificationFilter,tt$i.LINEAR),r=u$Z(e.magnificationFilter,rt$k.LINEAR),o=e$2e(e.maximumAnisotropy)?e.maximumAnisotropy:1;if(!q$1a.validate(t))throw new t$15("Invalid sampler.wrapS.");if(!q$1a.validate(i))throw new t$15("Invalid sampler.wrapT.");if(!tt$i.validate(n))throw new t$15("Invalid sampler.minificationFilter.");if(!rt$k.validate(r))throw new t$15("Invalid sampler.magnificationFilter.");o$1q.typeOf.number.greaterThanOrEquals("maximumAnisotropy",o,1),this._wrapS=t,this._wrapT=i,this._minificationFilter=n,this._magnificationFilter=r,this._maximumAnisotropy=o,this._comparisonFunction=e.comparisonFunction}function w$V(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=e.width,n=e.height,r=e.source;e$2e(r)&&(e$2e(i)||(i=u$Z(r.videoWidth,r.width)),e$2e(n)||(n=u$Z(r.videoHeight,r.height)));var o=u$Z(e.pixelFormat,V$12.RGBA),a=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),s=V$12.toInternalFormat(o,a,t),l=V$12.isCompressedFormat(s);if(!e$2e(i)||!e$2e(n))throw new t$15("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(o$1q.typeOf.number.greaterThan("width",i,0),i>e$1W.maximumTextureSize)throw new t$15("Width must be less than or equal to the maximum texture size ("+e$1W.maximumTextureSize+"). Check maximumTextureSize.");if(o$1q.typeOf.number.greaterThan("height",n,0),n>e$1W.maximumTextureSize)throw new t$15("Height must be less than or equal to the maximum texture size ("+e$1W.maximumTextureSize+"). Check maximumTextureSize.");if(!V$12.validate(o))throw new t$15("Invalid options.pixelFormat.");if(!l&&!_$_.validate(a))throw new t$15("Invalid options.pixelDatatype.");if(o===V$12.DEPTH_COMPONENT&&a!==_$_.UNSIGNED_SHORT&&a!==_$_.UNSIGNED_INT&&a!==_$_.FLOAT)throw new t$15("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(o===V$12.DEPTH_STENCIL&&a!==_$_.UNSIGNED_INT_24_8)throw new t$15("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(a===_$_.FLOAT&&!t.floatingPointTexture)throw new t$15("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(a===_$_.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$15("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(V$12.isDepthFormat(o)){if(e$2e(r))throw new t$15("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, source cannot be provided.");if(!t.depthTexture)throw new t$15("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.")}if(l){if(!e$2e(r)||!e$2e(r.arrayBufferView))throw new t$15("When options.pixelFormat is compressed, options.source.arrayBufferView must be defined.");if(V$12.isDXTFormat(s)&&!t.s3tc)throw new t$15("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(V$12.isPVRTCFormat(s)&&!t.pvrtc)throw new t$15("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(V$12.isETC1Format(s)&&!t.etc1)throw new t$15("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.");if(V$12.compressedTextureSizeInBytes(s,i,n)!==r.arrayBufferView.byteLength)throw new t$15("The byte length of the array buffer is invalid for the compressed texture with the given width and height.")}var u=e.preMultiplyAlpha||o===V$12.RGB||o===V$12.LUMINANCE,c=u$Z(e.flipY,!0);const h=u$Z(e.skipColorSpaceConversion,!1);var d=!0,f=t._gl,p=f.TEXTURE_2D,_=f.createTexture();f.activeTexture(f.TEXTURE0),f.bindTexture(p,_);var m,g=4;if(e$2e(r)&&e$2e(r.arrayBufferView)&&!l&&(g=V$12.alignmentInBytes(o,a,i)),f.pixelStorei(f.UNPACK_ALIGNMENT,g),h?f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.NONE):f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.BROWSER_DEFAULT_WEBGL),e$2e(r))if(e$2e(r.arrayBufferView)){f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!1);var x,y,v=r.arrayBufferView;if(l){if(f.compressedTexImage2D(p,0,s,i,n,0,v),e$2e(r.mipLevels))for(x=i,y=n,$=0;$<r.mipLevels.length;++$)(x=0|Math.floor(x/2))<1&&(x=1),(y=0|Math.floor(y/2))<1&&(y=1),f.compressedTexImage2D(p,$+1,s,x,y,0,r.mipLevels[$])}else if(c&&(v=V$12.flipY(v,o,a,i,n)),f.texImage2D(p,0,s,i,n,0,o,_$_.toWebGLConstant(a,t),v),e$2e(r.mipLevels))for(x=i,y=n,$=0;$<r.mipLevels.length;++$)(x=0|Math.floor(x/2))<1&&(x=1),(y=0|Math.floor(y/2))<1&&(y=1),f.texImage2D(p,$+1,s,x,y,0,o,_$_.toWebGLConstant(a,t),r.mipLevels[$])}else if(e$2e(r.framebuffer))f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!1),r.framebuffer!==t.defaultFramebuffer&&r.framebuffer._bind(),f.copyTexImage2D(p,0,s,r.xOffset,r.yOffset,i,n,0),r.framebuffer!==t.defaultFramebuffer&&r.framebuffer._unBind();else{f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,c),f.texImage2D(p,0,s,o,_$_.toWebGLConstant(a,t),r);let i=e.mipLevels;if(e$2e(i))for(var $=0,b=i.length;$<b;++$)f.texImage2D(p,$+1,s,o,_$_.toWebGLConstant(a,t),i[$])}else f.texImage2D(p,0,s,i,n,0,o,_$_.toWebGLConstant(a,t),null),d=!1;f.bindTexture(p,null),m=l?V$12.compressedTextureSizeInBytes(o,i,n):V$12.textureSizeInBytes(o,a,i,n),this._id=e$1T(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=p,this._texture=_,this._internalFormat=s,this._pixelFormat=o,this._pixelDatatype=a,this._width=i,this._height=n,this._dimensions=new o$1o(i,n),this._size=[i,n],this._hasMipmap=!1,this._sizeInBytes=m,this._preMultiplyAlpha=u,this._flipY=c,this._initialized=d,this._sampler=void 0,this.ignoreWEBGL2=!1,this.sampler=e$2e(e.sampler)?e.sampler:new e$1S,t.memorySize+=m}Object.defineProperties(e$1S.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}},comparisonFunction:{get:function(){return this._comparisonFunction}}}),e$1S.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy},w$V.fromFramebuffer=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=t._gl,n=u$Z(e.pixelFormat,V$12.RGB),r=u$Z(e.framebufferXOffset,0),o=u$Z(e.framebufferYOffset,0),a=u$Z(e.width,i.drawingBufferWidth),s=u$Z(e.height,i.drawingBufferHeight),l=e.framebuffer;if(!V$12.validate(n))throw new t$15("Invalid pixelFormat.");if(V$12.isDepthFormat(n)||V$12.isCompressedFormat(n))throw new t$15("pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.");if(o$1q.defined("options.context",e.context),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",r,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",o,0),r+a>i.drawingBufferWidth)throw new t$15("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(o+s>i.drawingBufferHeight)throw new t$15("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new w$V({context:t,width:a,height:s,pixelFormat:n,source:{framebuffer:e$2e(l)?l:t.defaultFramebuffer,xOffset:r,yOffset:o,width:a,height:s}})},Object.defineProperties(w$V.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=e.comparisonFunction,r=t===tt$i.NEAREST_MIPMAP_NEAREST||t===tt$i.NEAREST_MIPMAP_LINEAR||t===tt$i.LINEAR_MIPMAP_NEAREST||t===tt$i.LINEAR_MIPMAP_LINEAR,o=this._context,a=this._pixelDatatype;const s=this._pixelFormat;(a===_$_.FLOAT&&!o.textureFloatLinear||a===_$_.HALF_FLOAT&&!o.textureHalfFloatLinear)&&(t=r?tt$i.NEAREST_MIPMAP_NEAREST:tt$i.NEAREST,i=rt$k.NEAREST),o.webgl2&&V$12.isDepthFormat(s)&&(t=tt$i.NEAREST,i=rt$k.NEAREST);var l=o._gl,u=this._textureTarget;l.activeTexture(l.TEXTURE0),l.bindTexture(u,this._texture),l.texParameteri(u,l.TEXTURE_MIN_FILTER,t),l.texParameteri(u,l.TEXTURE_MAG_FILTER,i),l.texParameteri(u,l.TEXTURE_WRAP_S,e.wrapS),l.texParameteri(u,l.TEXTURE_WRAP_T,e.wrapT),e$2e(this._textureFilterAnisotropic)&&l.texParameteri(u,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),o.webgl2&&n&&(n===de$y.LEQUAL?(l.texParameteri(u,l.TEXTURE_COMPARE_FUNC,de$y.LEQUAL),l.texParameteri(u,l.TEXTURE_COMPARE_MODE,l.NONE)):(l.texParameteri(u,l.TEXTURE_COMPARE_FUNC,n),l.texParameteri(u,l.TEXTURE_COMPARE_MODE,l.COMPARE_REF_TO_TEXTURE))),l.bindTexture(u,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},size:{get:function(){return this._size}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),w$V.prototype.copyFrom=function(e,t,i){if(t=u$Z(t,0),i=u$Z(i,0),o$1q.defined("source",e),V$12.isDepthFormat(this._pixelFormat))throw new t$15("Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");var n=V$12.isCompressedFormat(this._pixelFormat);o$1q.typeOf.number.greaterThanOrEquals("xOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",i,0),o$1q.typeOf.number.lessThanOrEquals("xOffset + source.width",t+e.width,this._width),o$1q.typeOf.number.lessThanOrEquals("yOffset + source.height",i+e.height,this._height);const r=this._context;var o=r._gl,a=this._textureTarget;o.activeTexture(o.TEXTURE0),o.bindTexture(a,this._texture);var s=e.width,l=e.height,u=e.arrayBufferView,c=this._width,h=this._height,d=this._pixelFormat,f=this._pixelDatatype;const p=this._internalFormat;var _=this._preMultiplyAlpha,m=this._flipY,g=4;e$2e(u)&&(g=V$12.alignmentInBytes(d,f,s)),o.pixelStorei(o.UNPACK_ALIGNMENT,g),o.pixelStorei(o.UNPACK_COLORSPACE_CONVERSION_WEBGL,o.BROWSER_DEFAULT_WEBGL);var x=!1;if(!this._initialized){if(0===t&&0===i&&s===c&&l===h)e$2e(u)?(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),m&&(u=V$12.flipY(u,d,f,c,h)),o.texImage2D(a,0,p,c,h,0,d,_$_.toWebGLConstant(f,r),u)):(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,_),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,m),o.texImage2D(a,0,p,d,_$_.toWebGLConstant(f,r),e)),x=!0;else{o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1);var y=V$12.createTypedArray(d,f,c,h);o.texImage2D(a,0,p,c,h,0,d,_$_.toWebGLConstant(f,r),y)}this._initialized=!0}x||(e$2e(u)?(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),m&&(u=V$12.flipY(u,d,f,s,l)),n?o.compressedTexSubImage2D(a,0,t,i,s,l,d,u):o.texSubImage2D(a,0,t,i,s,l,d,_$_.toWebGLConstant(f,r),u)):(o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,_),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,m),n?o.compressedTexSubImage2D(a,0,t,i,s,l,d,u):o.texSubImage2D(a,0,t,i,d,_$_.toWebGLConstant(f,r),e))),o.bindTexture(a,null)},w$V.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){if(e=u$Z(e,0),t=u$Z(t,0),i=u$Z(i,0),n=u$Z(n,0),r=u$Z(r,this._width),o=u$Z(o,this._height),V$12.isDepthFormat(this._pixelFormat))throw new t$15("Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(this._pixelDatatype===_$_.FLOAT)throw new t$15("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===_$_.HALF_FLOAT)throw new t$15("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");if(V$12.isCompressedFormat(this._pixelFormat))throw new t$15("Cannot call copyFrom with a compressed texture pixel format.");o$1q.typeOf.number.greaterThanOrEquals("xOffset",e,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",i,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",n,0),o$1q.typeOf.number.lessThanOrEquals("xOffset + width",e+r,this._width),o$1q.typeOf.number.lessThanOrEquals("yOffset + height",t+o,this._height);var a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.copyTexSubImage2D(s,0,e,t,i,n,r,o),a.bindTexture(s,null),this._initialized=!0},w$V.prototype.copyFromTexture=function(e,t,i,n,r,o,a){var s=this._context,l=new t$V({context:s,colorTextures:[e],destroyAttachments:!1});if(l!==s._currentFramebuffer&&(s._currentFramebuffer=l,e$2e(l))){l._bind();var u=l._getActiveColorAttachments();s.drawBuffers&&s.glDrawBuffers(u)}this.copyFromFramebuffer(t,i,n,r,o,a),l.destroy()},w$V.prototype.generateMipmap=function(e){if(e=u$Z(e,I$1e.DONT_CARE),V$12.isDepthFormat(this._pixelFormat))throw new t$15("Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(V$12.isCompressedFormat(this._pixelFormat))throw new t$15("Cannot call generateMipmap with a compressed pixel format.");if(!this._context.webgl2){if(this._width>1&&!e$2d.isPowerOfTwo(this._width))throw new t$15("width must be a power of two to call generateMipmap() in a WebGL1 context.");if(this._height>1&&!e$2d.isPowerOfTwo(this._height))throw new t$15("height must be a power of two to call generateMipmap() in a WebGL1 context.")}if(!I$1e.validate(e))throw new t$15("hint is invalid.");this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},w$V.prototype.isDestroyed=function(){return!1},w$V.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,i$11(this)};var _0xbc1b3e=(_0x11a988=!0,function(e,t){var i=_0x11a988?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x11a988=!1,i}),_0x25d124=_0xbc1b3e(void 0,(function(){return _0x25d124.toString().search("(((.+)+)+)+$").toString().constructor(_0x25d124).search("(((.+)+)+)+$")})),_0x11a988;function _0x3efa68(e,t){this.width=e,this.height=t}_0x25d124(),_0x3efa68.prototype.toString=function(){return"{W: ".concat(this.width,", H: ").concat(this.height,"}")},_0x3efa68.prototype.getClassName=function(){return"Size"},_0x3efa68.prototype.getHashCode=function(){var e=0|this.width;return e=397*e^(0|this.height)},_0x3efa68.prototype.copyFrom=function(e){this.width=e.width,this.height=e.height},_0x3efa68.prototype.copyFromFloats=function(e,t){return this.width=e,this.height=t,this},_0x3efa68.prototype.set=function(e,t){return this.copyFromFloats(e,t)},_0x3efa68.prototype.multiplyByFloats=function(e,t){return new _0x3efa68(this.width*e,this.height*t)},_0x3efa68.prototype.clone=function(){return new _0x3efa68(this.width,this.height)},_0x3efa68.prototype.equals=function(e){return!!e&&(this.width===e.width&&this.height===e.height)},Object.defineProperty(_0x3efa68.prototype,"surface",{get:function(){return this.width*this.height},enumerable:!1,configurable:!0}),_0x3efa68.Zero=function(){return new _0x3efa68(0,0)},_0x3efa68.prototype.add=function(e){return new _0x3efa68(this.width+e.width,this.height+e.height)},_0x3efa68.prototype.subtract=function(e){return new _0x3efa68(this.width-e.width,this.height-e.height)},_0x3efa68.Lerp=function(e,t,i){return new _0x3efa68(e.width+(t.width-e.width)*i,e.height+(t.height-e.height)*i)};var _0x15befd=(_0x220b53=!0,function(e,t){var i=_0x220b53?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x220b53=!1,i}),_0x27639d=_0x15befd(void 0,(function(){return _0x27639d.toString().search("(((.+)+)+)+$").toString().constructor(_0x27639d).search("(((.+)+)+)+$")})),_0x220b53,_0x319f19,_0xbbd842,_0x9ec4cc,_0x35641a,_0x524ad8,_0x55f8a5,_0x1ffb97,_0x31dfb3,_0x5d58ab,_0x52a314,_0x12594e,_0x175bc2,_0x37a56b,_0x5def63,_0xd232e9,_0x30a614,_0x4efaef,_0x50a60d,_0x291623,_0x158e5e,_0x4bb617,_0x20ad54,_0x4d085e,_0x5d3792,_0x427817,_0x347549,_0x4fceae,_0x2dcd1c,_0x6128f2,_0x41a60c,_0x59ba23,_0x5f170f,_0x246e26,_0x3461a8,_0x5950a4,_0x475b0d,_0x1e98e2,_0x2189e5,_0x133e06,_0x5473dc,_0x445856,_0x264290,_0x222021,_0x438ba1,_0x145c99,_0x5264ab,_0xf848da,_0x464add,_0x3960c5,_0x52694e,_0x3b9a40,_0x1adac6,_0x3c2100,_0x189d32,_0x1d1021,_0x328c09,_0x1ff094,_0x434c90,_0x1b2042,_0xc349d7,_0x3bc73e,_0x255cb0,_0x13e122,_0x4d7f67,_0x12ce9c,_0x5bbb5b,_0x4e2f72,_0xa7e460,_0x263931,_0x318e1f,_0x32b46f,_0x2a29b1,_0x339149,_0x1bc6f1,_0x6e2659;function _0x4f1603(e){this._wrapU=_0x333f62.TEXTURE_WRAP_ADDRESSMODE,this._wrapV=_0x333f62.TEXTURE_WRAP_ADDRESSMODE,this.wrapR=_0x333f62.TEXTURE_WRAP_ADDRESSMODE,this.anisotropicFilteringLevel=4,this.delayLoadState=_0x333f62.DELAYLOADSTATE_NONE,this._texture=null,this._engine=null,this._cachedSize=_0x3efa68.Zero(),this._cachedBaseSize=_0x3efa68.Zero(),this._initialSamplingMode=_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE,this._texture=e,this._texture&&(this._engine=this._texture.getEngine())}_0x27639d(),Object.defineProperty(_0x4f1603.prototype,"wrapU",{get:function(){return this._wrapU},set:function(e){this._wrapU=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4f1603.prototype,"wrapV",{get:function(){return this._wrapV},set:function(e){this._wrapV=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4f1603.prototype,"coordinatesMode",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4f1603.prototype,"isCube",{get:function(){return!!this._texture&&this._texture.isCube},set:function(e){this._texture&&(this._texture.isCube=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4f1603.prototype,"is3D",{get:function(){return!!this._texture&&this._texture.is3D},set:function(e){this._texture&&(this._texture.is3D=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4f1603.prototype,"is2DArray",{get:function(){return!!this._texture&&this._texture.is2DArray},set:function(e){this._texture&&(this._texture.is2DArray=e)},enumerable:!1,configurable:!0}),_0x4f1603.prototype.getClassName=function(){return"ThinTexture"},_0x4f1603.prototype.isReady=function(){return this.delayLoadState===_0x333f62.DELAYLOADSTATE_NOTLOADED?(this.delayLoad(),!1):!!this._texture&&this._texture.isReady},_0x4f1603.prototype.delayLoad=function(){},_0x4f1603.prototype.getInternalTexture=function(){return this._texture},_0x4f1603.prototype.getSize=function(){if(this._texture){if(this._texture.width)return this._cachedSize.width=this._texture.width,this._cachedSize.height=this._texture.height,this._cachedSize;if(this._texture._size)return this._cachedSize.width=this._texture._size,this._cachedSize.height=this._texture._size,this._cachedSize}return this._cachedSize},_0x4f1603.prototype.getBaseSize=function(){return this.isReady()&&this._texture?this._texture._size?(this._cachedBaseSize.width=this._texture._size,this._cachedBaseSize.height=this._texture._size,this._cachedBaseSize):(this._cachedBaseSize.width=this._texture.baseWidth,this._cachedBaseSize.height=this._texture.baseHeight,this._cachedBaseSize):(this._cachedBaseSize.width=0,this._cachedBaseSize.height=0,this._cachedBaseSize)},Object.defineProperty(_0x4f1603.prototype,"samplingMode",{get:function(){return this._texture?this._texture.samplingMode:this._initialSamplingMode},enumerable:!1,configurable:!0}),_0x4f1603.prototype.updateSamplingMode=function(e){this._texture&&this._engine&&this._engine.updateTextureSamplingMode(e,this._texture)},_0x4f1603.prototype.releaseInternalTexture=function(){this._texture&&(this._texture.dispose(),this._texture=null)},_0x4f1603.prototype.dispose=function(){this._texture&&(this.releaseInternalTexture(),this._engine=null)},_0xbbd842=_0x319f19||(_0x319f19={}),_0xbbd842.SRGB="srgb",function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e.LowPower="low-power",e.HighPerformance="high-performance"}(_0x9ec4cc||(_0x9ec4cc={})),_0x524ad8=_0x35641a||(_0x35641a={}),_0x524ad8.DepthClipControl="depth-clip-control",_0x524ad8.Depth24UnormStencil8="depth24unorm-stencil8",_0x524ad8.Depth32FloatStencil8="depth32float-stencil8",_0x524ad8.TextureCompressionBC="texture-compression-bc",_0x524ad8.TextureCompressionETC2="texture-compression-etc2",_0x524ad8.TextureCompressionASTC="texture-compression-astc",_0x524ad8.TimestampQuery="timestamp-query",_0x524ad8.IndirectFirstInstance="indirect-first-instance",_0x524ad8.ShaderF16="shader-f16",_0x524ad8.BGRA8UnormStorage="bgra8unorm-storage",_0x1ffb97=_0x55f8a5||(_0x55f8a5={}),_0x1ffb97[_0x1ffb97.MapRead=1]="MapRead",_0x1ffb97[_0x1ffb97.MapWrite=2]="MapWrite",_0x1ffb97[_0x1ffb97.CopySrc=4]="CopySrc",_0x1ffb97[_0x1ffb97.CopyDst=8]="CopyDst",_0x1ffb97[_0x1ffb97.Index=16]="Index",_0x1ffb97[_0x1ffb97.Vertex=32]="Vertex",_0x1ffb97[_0x1ffb97.Uniform=64]="Uniform",_0x1ffb97[_0x1ffb97.Storage=128]="Storage",_0x1ffb97[_0x1ffb97.Indirect=256]="Indirect",_0x1ffb97[_0x1ffb97.QueryResolve=512]="QueryResolve",_0x5d58ab=_0x31dfb3||(_0x31dfb3={}),_0x5d58ab[_0x5d58ab.Read=1]="Read",_0x5d58ab[_0x5d58ab.Write=2]="Write",_0x12594e=_0x52a314||(_0x52a314={}),_0x12594e.E1d="1d",_0x12594e.E2d="2d",_0x12594e.E3d="3d",_0x37a56b=_0x175bc2||(_0x175bc2={}),_0x37a56b[_0x37a56b.CopySrc=1]="CopySrc",_0x37a56b[_0x37a56b.CopyDst=2]="CopyDst",_0x37a56b[_0x37a56b.TextureBinding=4]="TextureBinding",_0x37a56b[_0x37a56b.StorageBinding=8]="StorageBinding",_0x37a56b[_0x37a56b.RenderAttachment=16]="RenderAttachment",_0xd232e9=_0x5def63||(_0x5def63={}),_0xd232e9.E1d="1d",_0xd232e9.E2d="2d",_0xd232e9.E2dArray="2d-array",_0xd232e9.Cube="cube",_0xd232e9.CubeArray="cube-array",_0xd232e9.E3d="3d",_0x4efaef=_0x30a614||(_0x30a614={}),_0x4efaef.All="all",_0x4efaef.StencilOnly="stencil-only",_0x4efaef.DepthOnly="depth-only",_0x291623=_0x50a60d||(_0x50a60d={}),_0x291623.R8Unorm="r8unorm",_0x291623.R8Snorm="r8snorm",_0x291623.R8Uint="r8uint",_0x291623.R8Sint="r8sint",_0x291623.R16Uint="r16uint",_0x291623.R16Sint="r16sint",_0x291623.R16Float="r16float",_0x291623.RG8Unorm="rg8unorm",_0x291623.RG8Snorm="rg8snorm",_0x291623.RG8Uint="rg8uint",_0x291623.RG8Sint="rg8sint",_0x291623.R32Uint="r32uint",_0x291623.R32Sint="r32sint",_0x291623.R32Float="r32float",_0x291623.RG16Uint="rg16uint",_0x291623.RG16Sint="rg16sint",_0x291623.RG16Float="rg16float",_0x291623.RGBA8Unorm="rgba8unorm",_0x291623.RGBA8UnormSRGB="rgba8unorm-srgb",_0x291623.RGBA8Snorm="rgba8snorm",_0x291623.RGBA8Uint="rgba8uint",_0x291623.RGBA8Sint="rgba8sint",_0x291623.BGRA8Unorm="bgra8unorm",_0x291623.BGRA8UnormSRGB="bgra8unorm-srgb",_0x291623.RGB9E5UFloat="rgb9e5ufloat",_0x291623.RGB10A2Unorm="rgb10a2unorm",_0x291623.RG11B10UFloat="rg11b10ufloat",_0x291623.RG32Uint="rg32uint",_0x291623.RG32Sint="rg32sint",_0x291623.RG32Float="rg32float",_0x291623.RGBA16Uint="rgba16uint",_0x291623.RGBA16Sint="rgba16sint",_0x291623.RGBA16Float="rgba16float",_0x291623.RGBA32Uint="rgba32uint",_0x291623.RGBA32Sint="rgba32sint",_0x291623.RGBA32Float="rgba32float",_0x291623.Stencil8="stencil8",_0x291623.Depth16Unorm="depth16unorm",_0x291623.Depth24Plus="depth24plus",_0x291623.Depth24PlusStencil8="depth24plus-stencil8",_0x291623.Depth32Float="depth32float",_0x291623.BC1RGBAUnorm="bc1-rgba-unorm",_0x291623.BC1RGBAUnormSRGB="bc1-rgba-unorm-srgb",_0x291623.BC2RGBAUnorm="bc2-rgba-unorm",_0x291623.BC2RGBAUnormSRGB="bc2-rgba-unorm-srgb",_0x291623.BC3RGBAUnorm="bc3-rgba-unorm",_0x291623.BC3RGBAUnormSRGB="bc3-rgba-unorm-srgb",_0x291623.BC4RUnorm="bc4-r-unorm",_0x291623.BC4RSnorm="bc4-r-snorm",_0x291623.BC5RGUnorm="bc5-rg-unorm",_0x291623.BC5RGSnorm="bc5-rg-snorm",_0x291623.BC6HRGBUFloat="bc6h-rgb-ufloat",_0x291623.BC6HRGBFloat="bc6h-rgb-float",_0x291623.BC7RGBAUnorm="bc7-rgba-unorm",_0x291623.BC7RGBAUnormSRGB="bc7-rgba-unorm-srgb",_0x291623.ETC2RGB8Unorm="etc2-rgb8unorm",_0x291623.ETC2RGB8UnormSRGB="etc2-rgb8unorm-srgb",_0x291623.ETC2RGB8A1Unorm="etc2-rgb8a1unorm",_0x291623.ETC2RGB8A1UnormSRGB="etc2-rgb8a1unorm-srgb",_0x291623.ETC2RGBA8Unorm="etc2-rgba8unorm",_0x291623.ETC2RGBA8UnormSRGB="etc2-rgba8unorm-srgb",_0x291623.EACR11Unorm="eac-r11unorm",_0x291623.EACR11Snorm="eac-r11snorm",_0x291623.EACRG11Unorm="eac-rg11unorm",_0x291623.EACRG11Snorm="eac-rg11snorm",_0x291623.ASTC4x4Unorm="astc-4x4-unorm",_0x291623.ASTC4x4UnormSRGB="astc-4x4-unorm-srgb",_0x291623.ASTC5x4Unorm="astc-5x4-unorm",_0x291623.ASTC5x4UnormSRGB="astc-5x4-unorm-srgb",_0x291623.ASTC5x5Unorm="astc-5x5-unorm",_0x291623.ASTC5x5UnormSRGB="astc-5x5-unorm-srgb",_0x291623.ASTC6x5Unorm="astc-6x5-unorm",_0x291623.ASTC6x5UnormSRGB="astc-6x5-unorm-srgb",_0x291623.ASTC6x6Unorm="astc-6x6-unorm",_0x291623.ASTC6x6UnormSRGB="astc-6x6-unorm-srgb",_0x291623.ASTC8x5Unorm="astc-8x5-unorm",_0x291623.ASTC8x5UnormSRGB="astc-8x5-unorm-srgb",_0x291623.ASTC8x6Unorm="astc-8x6-unorm",_0x291623.ASTC8x6UnormSRGB="astc-8x6-unorm-srgb",_0x291623.ASTC8x8Unorm="astc-8x8-unorm",_0x291623.ASTC8x8UnormSRGB="astc-8x8-unorm-srgb",_0x291623.ASTC10x5Unorm="astc-10x5-unorm",_0x291623.ASTC10x5UnormSRGB="astc-10x5-unorm-srgb",_0x291623.ASTC10x6Unorm="astc-10x6-unorm",_0x291623.ASTC10x6UnormSRGB="astc-10x6-unorm-srgb",_0x291623.ASTC10x8Unorm="astc-10x8-unorm",_0x291623.ASTC10x8UnormSRGB="astc-10x8-unorm-srgb",_0x291623.ASTC10x10Unorm="astc-10x10-unorm",_0x291623.ASTC10x10UnormSRGB="astc-10x10-unorm-srgb",_0x291623.ASTC12x10Unorm="astc-12x10-unorm",_0x291623.ASTC12x10UnormSRGB="astc-12x10-unorm-srgb",_0x291623.ASTC12x12Unorm="astc-12x12-unorm",_0x291623.ASTC12x12UnormSRGB="astc-12x12-unorm-srgb",_0x291623.Depth24UnormStencil8="depth24unorm-stencil8",_0x291623.Depth32FloatStencil8="depth32float-stencil8",_0x4bb617=_0x158e5e||(_0x158e5e={}),_0x4bb617.ClampToEdge="clamp-to-edge",_0x4bb617.Repeat="repeat",_0x4bb617.MirrorRepeat="mirror-repeat",_0x4d085e=_0x20ad54||(_0x20ad54={}),_0x4d085e.Nearest="nearest",_0x4d085e.Linear="linear",_0x427817=_0x5d3792||(_0x5d3792={}),_0x427817.Never="never",_0x427817.Less="less",_0x427817.Equal="equal",_0x427817.LessEqual="less-equal",_0x427817.Greater="greater",_0x427817.NotEqual="not-equal",_0x427817.GreaterEqual="greater-equal",_0x427817.Always="always",_0x4fceae=_0x347549||(_0x347549={}),_0x4fceae[_0x4fceae.Vertex=1]="Vertex",_0x4fceae[_0x4fceae.Fragment=2]="Fragment",_0x4fceae[_0x4fceae.Compute=4]="Compute",_0x6128f2=_0x2dcd1c||(_0x2dcd1c={}),_0x6128f2.Uniform="uniform",_0x6128f2.Storage="storage",_0x6128f2.ReadOnlyStorage="read-only-storage",_0x59ba23=_0x41a60c||(_0x41a60c={}),_0x59ba23.Filtering="filtering",_0x59ba23.NonFiltering="non-filtering",_0x59ba23.Comparison="comparison",_0x246e26=_0x5f170f||(_0x5f170f={}),_0x246e26.Float="float",_0x246e26.UnfilterableFloat="unfilterable-float",_0x246e26.Depth="depth",_0x246e26.Sint="sint",_0x246e26.Uint="uint",_0x5950a4=_0x3461a8||(_0x3461a8={}),_0x5950a4.WriteOnly="write-only",_0x1e98e2=_0x475b0d||(_0x475b0d={}),_0x1e98e2.Error="error",_0x1e98e2.Warning="warning",_0x1e98e2.Info="info",_0x133e06=_0x2189e5||(_0x2189e5={}),_0x133e06.Auto="auto",_0x445856=_0x5473dc||(_0x5473dc={}),_0x445856.PointList="point-list",_0x445856.LineList="line-list",_0x445856.LineStrip="line-strip",_0x445856.TriangleList="triangle-list",_0x445856.TriangleStrip="triangle-strip",_0x222021=_0x264290||(_0x264290={}),_0x222021.CCW="ccw",_0x222021.CW="cw",_0x145c99=_0x438ba1||(_0x438ba1={}),_0x145c99.None="none",_0x145c99.Front="front",_0x145c99.Back="back",_0xf848da=_0x5264ab||(_0x5264ab={}),_0xf848da[_0xf848da.Red=1]="Red",_0xf848da[_0xf848da.Green=2]="Green",_0xf848da[_0xf848da.Blue=4]="Blue",_0xf848da[_0xf848da.Alpha=8]="Alpha",_0xf848da[_0xf848da.All=15]="All",_0x3960c5=_0x464add||(_0x464add={}),_0x3960c5.Zero="zero",_0x3960c5.One="one",_0x3960c5.Src="src",_0x3960c5.OneMinusSrc="one-minus-src",_0x3960c5.SrcAlpha="src-alpha",_0x3960c5.OneMinusSrcAlpha="one-minus-src-alpha",_0x3960c5.Dst="dst",_0x3960c5.OneMinusDst="one-minus-dst",_0x3960c5.DstAlpha="dst-alpha",_0x3960c5.OneMinusDstAlpha="one-minus-dst-alpha",_0x3960c5.SrcAlphaSaturated="src-alpha-saturated",_0x3960c5.Constant="constant",_0x3960c5.OneMinusConstant="one-minus-constant",_0x3b9a40=_0x52694e||(_0x52694e={}),_0x3b9a40.Add="add",_0x3b9a40.Subtract="subtract",_0x3b9a40.ReverseSubtract="reverse-subtract",_0x3b9a40.Min="min",_0x3b9a40.Max="max",_0x3c2100=_0x1adac6||(_0x1adac6={}),_0x3c2100.Keep="keep",_0x3c2100.Zero="zero",_0x3c2100.Replace="replace",_0x3c2100.Invert="invert",_0x3c2100.IncrementClamp="increment-clamp",_0x3c2100.DecrementClamp="decrement-clamp",_0x3c2100.IncrementWrap="increment-wrap",_0x3c2100.DecrementWrap="decrement-wrap",_0x1d1021=_0x189d32||(_0x189d32={}),_0x1d1021.Uint16="uint16",_0x1d1021.Uint32="uint32",_0x1ff094=_0x328c09||(_0x328c09={}),_0x1ff094.Uint8x2="uint8x2",_0x1ff094.Uint8x4="uint8x4",_0x1ff094.Sint8x2="sint8x2",_0x1ff094.Sint8x4="sint8x4",_0x1ff094.Unorm8x2="unorm8x2",_0x1ff094.Unorm8x4="unorm8x4",_0x1ff094.Snorm8x2="snorm8x2",_0x1ff094.Snorm8x4="snorm8x4",_0x1ff094.Uint16x2="uint16x2",_0x1ff094.Uint16x4="uint16x4",_0x1ff094.Sint16x2="sint16x2",_0x1ff094.Sint16x4="sint16x4",_0x1ff094.Unorm16x2="unorm16x2",_0x1ff094.Unorm16x4="unorm16x4",_0x1ff094.Snorm16x2="snorm16x2",_0x1ff094.Snorm16x4="snorm16x4",_0x1ff094.Float16x2="float16x2",_0x1ff094.Float16x4="float16x4",_0x1ff094.Float32="float32",_0x1ff094.Float32x2="float32x2",_0x1ff094.Float32x3="float32x3",_0x1ff094.Float32x4="float32x4",_0x1ff094.Uint32="uint32",_0x1ff094.Uint32x2="uint32x2",_0x1ff094.Uint32x3="uint32x3",_0x1ff094.Uint32x4="uint32x4",_0x1ff094.Sint32="sint32",_0x1ff094.Sint32x2="sint32x2",_0x1ff094.Sint32x3="sint32x3",_0x1ff094.Sint32x4="sint32x4",_0x1b2042=_0x434c90||(_0x434c90={}),_0x1b2042.Vertex="vertex",_0x1b2042.Instance="instance",_0x3bc73e=_0xc349d7||(_0xc349d7={}),_0x3bc73e.Beginning="beginning",_0x3bc73e.End="end",_0x13e122=_0x255cb0||(_0x255cb0={}),_0x13e122.Beginning="beginning",_0x13e122.End="end",_0x12ce9c=_0x4d7f67||(_0x4d7f67={}),_0x12ce9c.Load="load",_0x12ce9c.Clear="clear",_0x4e2f72=_0x5bbb5b||(_0x5bbb5b={}),_0x4e2f72.Store="store",_0x4e2f72.Discard="discard",_0x263931=_0xa7e460||(_0xa7e460={}),_0x263931.Occlusion="occlusion",_0x263931.Timestamp="timestamp",_0x32b46f=_0x318e1f||(_0x318e1f={}),_0x32b46f.Opaque="opaque",_0x32b46f.Premultiplied="premultiplied",_0x339149=_0x2a29b1||(_0x2a29b1={}),_0x339149.Destroyed="destroyed",_0x6e2659=_0x1bc6f1||(_0x1bc6f1={}),_0x6e2659.OutOfMemory="out-of-memory",_0x6e2659.Validation="validation";var _0x5213c6={PredefinedColorSpace:_0x319f19,PowerPreference:_0x9ec4cc,FeatureName:_0x35641a,BufferUsage:_0x55f8a5,MapMode:_0x31dfb3,TextureDimension:_0x52a314,TextureUsage:_0x175bc2,TextureViewDimension:_0x5def63,TextureAspect:_0x30a614,TextureFormat:_0x50a60d,AddressMode:_0x158e5e,FilterMode:_0x20ad54,CompareFunction:_0x5d3792,ShaderStage:_0x347549,BufferBindingType:_0x2dcd1c,SamplerBindingType:_0x41a60c,TextureSampleType:_0x5f170f,StorageTextureAccess:_0x3461a8,CompilationMessageType:_0x475b0d,AutoLayoutMode:_0x2189e5,PrimitiveTopology:_0x5473dc,FrontFace:_0x264290,CullMode:_0x438ba1,ColorWriteFlags:_0x5264ab,BlendFactor:_0x464add,BlendOperation:_0x52694e,StencilOperation:_0x1adac6,IndexFormat:_0x189d32,VertexFormat:_0x328c09,InputStepMode:_0x434c90,ComputePassTimestampLocation:_0xc349d7,RenderPassTimestampLocation:_0x255cb0,LoadOp:_0x4d7f67,StoreOp:_0x5bbb5b,QueryType:_0xa7e460,CanvasCompositingAlphaMode:_0x318e1f,DeviceLostReason:_0x2a29b1,ErrorFilter:_0x1bc6f1},_0x251b06=(_0x1de4d1=!0,function(e,t){var i=_0x1de4d1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1de4d1=!1,i}),_0x5103ca=_0x251b06(void 0,(function(){return _0x5103ca.toString().search("(((.+)+)+)+$").toString().constructor(_0x5103ca).search("(((.+)+)+)+$")})),_0x1de4d1;function _0x3ea109(){}_0x5103ca(),_0x3ea109.WithinEpsilon=function(e,t,i){return void 0===i&&(i=1401298e-51),Math.abs(e-t)<=i},_0x3ea109.ToHex=function(e){var t=e.toString(16);return e<=15?("0"+t).toUpperCase():t.toUpperCase()},_0x3ea109.Sign=function(e){return 0===(e=+e)||isNaN(e)?e:e>0?1:-1},_0x3ea109.Clamp=function(e,t,i){return void 0===t&&(t=0),void 0===i&&(i=1),Math.min(i,Math.max(t,e))},_0x3ea109.Log2=function(e){return Math.log(e)*Math.LOG2E},_0x3ea109.ILog2=function(e){if(Math.log2)return Math.floor(Math.log2(e));if(e<0)return NaN;if(0===e)return-1/0;var t=0;if(e<1){for(;e<1;)t++,e*=2;t=-t}else if(e>1)for(;e>1;)t++,e=Math.floor(e/2);return t},_0x3ea109.Repeat=function(e,t){return e-Math.floor(e/t)*t},_0x3ea109.Normalize=function(e,t,i){return(e-t)/(i-t)},_0x3ea109.Denormalize=function(e,t,i){return e*(i-t)+t},_0x3ea109.DeltaAngle=function(e,t){var i=_0x3ea109.Repeat(t-e,360);return i>180&&(i-=360),i},_0x3ea109.PingPong=function(e,t){var i=_0x3ea109.Repeat(e,2*t);return t-Math.abs(i-t)},_0x3ea109.SmoothStep=function(e,t,i){var n=_0x3ea109.Clamp(i);return t*(n=-2*n*n*n+3*n*n)+e*(1-n)},_0x3ea109.MoveTowards=function(e,t,i){return Math.abs(t-e)<=i?t:e+_0x3ea109.Sign(t-e)*i},_0x3ea109.MoveTowardsAngle=function(e,t,i){var n=_0x3ea109.DeltaAngle(e,t),r=0;return-i<n&&n<i?r=t:(t=e+n,r=_0x3ea109.MoveTowards(e,t,i)),r},_0x3ea109.Lerp=function(e,t,i){return e+(t-e)*i},_0x3ea109.LerpAngle=function(e,t,i){var n=_0x3ea109.Repeat(t-e,360);return n>180&&(n-=360),e+n*_0x3ea109.Clamp(i)},_0x3ea109.InverseLerp=function(e,t,i){return e!=t?_0x3ea109.Clamp((i-e)/(t-e)):0},_0x3ea109.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o;return e*(2*a-3*o+1)+i*(-2*a+3*o)+t*(a-2*o+r)+n*(a-o)},_0x3ea109.Hermite1stDerivative=function(e,t,i,n,r){var o=r*r;return 6*(o-r)*e+(3*o-4*r+1)*t+6*(-o+r)*i+(3*o-2*r)*n},_0x3ea109.RandomRange=function(e,t){return e===t?e:Math.random()*(t-e)+e},_0x3ea109.RangeToPercent=function(e,t,i){return(e-t)/(i-t)},_0x3ea109.PercentToRange=function(e,t,i){return(i-t)*e+t},_0x3ea109.NormalizeRadians=function(e){return e-=_0x3ea109.TwoPi*Math.floor((e+Math.PI)/_0x3ea109.TwoPi)},_0x3ea109.HCF=function(e,t){var i=e%t;return 0===i?t:_0x3ea109.HCF(t,i)},_0x3ea109.TwoPi=2*Math.PI;var _0x1c5e22=(_0x2b542b=!0,function(e,t){var i=_0x2b542b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b542b=!1,i}),_0x32d4b0=_0x1c5e22(void 0,(function(){return _0x32d4b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x32d4b0).search("(((.+)+)+)+$")})),_0x2b542b;function _0x4de77b(e){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=_0x4de77b._Counter++;return this._buffer=e,this}_0x32d4b0(),Object.defineProperty(_0x4de77b.prototype,"underlyingResource",{get:function(){return this._buffer},enumerable:!1,configurable:!0}),_0x4de77b._Counter=0;var _0x3d1d8d=(_0x5639ec=!0,function(e,t){var i=_0x5639ec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5639ec=!1,i}),_0x34dbaf=_0x3d1d8d(void 0,(function(){return _0x34dbaf.toString().search("(((.+)+)+)+$").toString().constructor(_0x34dbaf).search("(((.+)+)+)+$")})),_0x5639ec;function RandomGUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}_0x34dbaf();var _0x2f8dbc=(_0x392d33=!0,function(e,t){var i=_0x392d33?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x392d33=!1,i}),_0x504079=_0x2f8dbc(void 0,(function(){return _0x504079.toString().search("(((.+)+)+)+$").toString().constructor(_0x504079).search("(((.+)+)+)+$")})),_0x392d33;function _0x124fec(e){var t=_0x4f1603.call(this,null)||this;return t.metadata=null,t.reservedDataStore=null,t._hasAlpha=!1,t._getAlphaFromRGB=!1,t.level=1,t._coordinatesIndex=0,t._coordinatesMode=_0x333f62.TEXTURE_EXPLICIT_MODE,t.wrapR=_0x333f62.TEXTURE_WRAP_ADDRESSMODE,t.anisotropicFilteringLevel=_0x124fec.DEFAULT_ANISOTROPIC_FILTERING_LEVEL,t._isCube=!1,t._gammaSpace=!0,t.invertZ=!1,t.lodLevelInAlpha=!1,t.isRenderTarget=!1,t._prefiltered=!1,t._forceSerialize=!1,t.animations=new Array,t.onDisposeObservable=new Observable,t._onDisposeObserver=null,t._scene=null,t._uid=null,t._parentContainer=null,t._loadingError=!1,e?_0x124fec._IsScene(e)?t._scene=e:t._engine=e:t._scene=EngineStore.LastCreatedScene,t._scene&&(t.uniqueId=t._scene.getUniqueId(),t._scene.addTexture(t),t._engine=t._scene.getEngine()),t._uid=null,t}_0x504079(),_0x4f1603&&(_0x124fec.__proto__=_0x4f1603),_0x124fec.prototype=Object.create(_0x4f1603&&_0x4f1603.prototype),_0x124fec.prototype.constructor=_0x4f1603,Object.defineProperty(_0x124fec.prototype,"hasAlpha",{get:function(){return this._hasAlpha},set:function(e){var t=this;this._hasAlpha!==e&&(this._hasAlpha=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"getAlphaFromRGB",{get:function(){return this._getAlphaFromRGB},set:function(e){var t=this;this._getAlphaFromRGB!==e&&(this._getAlphaFromRGB=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"coordinatesIndex",{get:function(){return this._coordinatesIndex},set:function(e){var t=this;this._coordinatesIndex!==e&&(this._coordinatesIndex=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"coordinatesMode",{get:function(){return this._coordinatesMode},set:function(e){var t=this;this._coordinatesMode!==e&&(this._coordinatesMode=e,this._scene&&this._scene.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"wrapU",{get:function(){return this._wrapU},set:function(e){this._wrapU=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"wrapV",{get:function(){return this._wrapV},set:function(e){this._wrapV=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"isCube",{get:function(){return this._texture?this._texture.isCube:this._isCube},set:function(e){this._texture?this._texture.isCube=e:this._isCube=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"is3D",{get:function(){return!!this._texture&&this._texture.is3D},set:function(e){this._texture&&(this._texture.is3D=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"is2DArray",{get:function(){return!!this._texture&&this._texture.is2DArray},set:function(e){this._texture&&(this._texture.is2DArray=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"gammaSpace",{get:function(){return this._texture?(null===this._texture._gammaSpace&&(this._texture._gammaSpace=this._gammaSpace),this._texture._gammaSpace&&!this._texture._useSRGBBuffer):this._gammaSpace},set:function(e){if(this._texture){if(this._texture._gammaSpace===e)return;this._texture._gammaSpace=e}else{if(this._gammaSpace===e)return;this._gammaSpace=e}this._markAllSubMeshesAsTexturesDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"isRGBD",{get:function(){return null!=this._texture&&this._texture._isRGBD},set:function(e){this._texture&&(this._texture._isRGBD=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"noMipmap",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"lodGenerationOffset",{get:function(){return this._texture?this._texture._lodGenerationOffset:0},set:function(e){this._texture&&(this._texture._lodGenerationOffset=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"lodGenerationScale",{get:function(){return this._texture?this._texture._lodGenerationScale:0},set:function(e){this._texture&&(this._texture._lodGenerationScale=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"linearSpecularLOD",{get:function(){return!!this._texture&&this._texture._linearSpecularLOD},set:function(e){this._texture&&(this._texture._linearSpecularLOD=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"irradianceTexture",{get:function(){return this._texture?this._texture._irradianceTexture:null},set:function(e){this._texture&&(this._texture._irradianceTexture=e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"uid",{get:function(){return!this._uid&&(this._uid=RandomGUID()),this._uid},enumerable:!1,configurable:!0}),_0x124fec.prototype.toString=function(){return this.name},_0x124fec.prototype.getClassName=function(){return"BaseTexture"},Object.defineProperty(_0x124fec.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"isBlocking",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"loadingError",{get:function(){return this._loadingError},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"errorObject",{get:function(){return this._errorObject},enumerable:!1,configurable:!0}),_0x124fec.prototype.getScene=function(){return this._scene},_0x124fec.prototype._getEngine=function(){return this._engine},_0x124fec.prototype.checkTransformsAreIdentical=function(e){return null!==e},_0x124fec.prototype.getTextureMatrix=function(){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityReadOnly},_0x124fec.prototype.getReflectionTextureMatrix=function(){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityReadOnly},_0x124fec.prototype.isReadyOrNotBlocking=function(){return!this.isBlocking||this.isReady()||this.loadingError},_0x124fec.prototype.scale=function(e){},Object.defineProperty(_0x124fec.prototype,"canRescale",{get:function(){return!1},enumerable:!1,configurable:!0}),_0x124fec.prototype._getFromCache=function(e,t,i,n,r){var o=this._getEngine();if(!o)return null;for(var a=o._getUseSRGBBuffer(!!r,t),s=o.getLoadedTexturesCache(),l=0;l<s.length;l++){var u=s[l];if((void 0===r||a===u._useSRGBBuffer)&&!(void 0!==n&&n!==u.invertY||u.url!==e||u.generateMipMaps!==!t||i&&i!==u.samplingMode))return u.incrementReferences(),u}return null},_0x124fec.prototype._rebuild=function(){},_0x124fec.prototype.clone=function(){return null},Object.defineProperty(_0x124fec.prototype,"textureType",{get:function(){return this._texture&&void 0!==this._texture.type?this._texture.type:_0x333f62.TEXTURETYPE_UNSIGNED_INT},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"textureFormat",{get:function(){return this._texture&&void 0!==this._texture.format?this._texture.format:_0x333f62.TEXTUREFORMAT_RGBA},enumerable:!1,configurable:!0}),_0x124fec.prototype._markAllSubMeshesAsTexturesDirty=function(){var e=this.getScene();e&&e.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag)},_0x124fec.prototype.readPixels=function(e,t,i,n,r,o,a,s,l){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=null),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=0),void 0===a&&(a=0),void 0===s&&(s=Number.MAX_VALUE),void 0===l&&(l=Number.MAX_VALUE),!this._texture)return null;var u=this._getEngine();if(!u)return null;var c=this.getSize(),h=c.width,d=c.height;0!==t&&(h/=Math.pow(2,t),d/=Math.pow(2,t),h=Math.round(h),d=Math.round(d)),s=Math.min(h,s),l=Math.min(d,l);try{return this._texture.isCube?u._readTexturePixels(this._texture,s,l,e,t,i,n,r,o,a):u._readTexturePixels(this._texture,s,l,-1,t,i,n,r,o,a)}catch(e){return null}},_0x124fec.prototype._readPixelsSync=function(e,t,i,n,r){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=null),void 0===n&&(n=!0),void 0===r&&(r=!1),!this._texture)return null;var o=this.getSize(),a=o.width,s=o.height,l=this._getEngine();if(!l)return null;0!=t&&(a/=Math.pow(2,t),s/=Math.pow(2,t),a=Math.round(a),s=Math.round(s));try{return this._texture.isCube?l._readTexturePixelsSync(this._texture,a,s,e,t,i,n,r):l._readTexturePixelsSync(this._texture,a,s,-1,t,i,n,r)}catch(e){return null}},Object.defineProperty(_0x124fec.prototype,"_lodTextureHigh",{get:function(){return this._texture?this._texture._lodTextureHigh:null},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"_lodTextureMid",{get:function(){return this._texture?this._texture._lodTextureMid:null},enumerable:!1,configurable:!0}),Object.defineProperty(_0x124fec.prototype,"_lodTextureLow",{get:function(){return this._texture?this._texture._lodTextureLow:null},enumerable:!1,configurable:!0}),_0x124fec.prototype.dispose=function(){if(this._scene){this._scene.stopAnimation&&this._scene.stopAnimation(this),this._scene._removePendingData(this);var e=this._scene.textures.indexOf(this);if(e>=0&&this._scene.textures.splice(e,1),this._scene.onTextureRemovedObservable.notifyObservers(this),this._scene=null,this._parentContainer){var t=this._parentContainer.textures.indexOf(this);t>-1&&this._parentContainer.textures.splice(t,1),this._parentContainer=null}}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.metadata=null,_super.prototype.dispose.call(this)},_0x124fec.prototype.serialize=function(){if(!this.name)return null;var e=_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Serialize(this);return _Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.AppendSerializedAnimations(this,e),e},_0x124fec.WhenAllReady=function(e,t){var i=e.length;if(0!==i)for(var n=0;n<e.length;n++){var r=e[n];if(r.isReady())0==--i&&t();else{var o=r.onLoadObservable;o?o.addOnce((function(){0==--i&&t()})):0==--i&&t()}}else t()},_0x124fec._IsScene=function(e){return"Scene"===e.getClassName()},_0x124fec.DEFAULT_ANISOTROPIC_FILTERING_LEVEL=4;var _0x5dcefa=(_0x359be1=!0,function(e,t){var i=_0x359be1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x359be1=!1,i}),_0x199455=_0x5dcefa(void 0,(function(){return _0x199455.toString().search("(((.+)+)+)+$").toString().constructor(_0x199455).search("(((.+)+)+)+$")})),_0x359be1;function _0x5141a8(e,t,i,n,r,o,a,s,l,u,c,h,d,f){void 0===r&&(r=_0x5141a8.TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=!1);var p,_,m,g,x,y,v,$,b,T=this;(T=_0x124fec.call(this,t)||this).url=null,T.uOffset=0,T.vOffset=0,T.uScale=1,T.vScale=1,T.uAng=0,T.vAng=0,T.wAng=0,T.uRotationCenter=.5,T.vRotationCenter=.5,T.wRotationCenter=.5,T.homogeneousRotationInUVTransform=!1,T.inspectableCustomProperties=null,T._noMipmap=!1,T._invertY=!1,T._rowGenerationMatrix=null,T._cachedTextureMatrix=null,T._projectionModeMatrix=null,T._t0=null,T._t1=null,T._t2=null,T._cachedUOffset=-1,T._cachedVOffset=-1,T._cachedUScale=0,T._cachedVScale=0,T._cachedUAng=-1,T._cachedVAng=-1,T._cachedWAng=-1,T._cachedProjectionMatrixId=-1,T._cachedURotationCenter=-1,T._cachedVRotationCenter=-1,T._cachedWRotationCenter=-1,T._cachedHomogeneousRotationInUVTransform=!1,T._cachedCoordinatesMode=-1,T._buffer=null,T._deleteBuffer=!1,T._format=null,T._delayedOnLoad=null,T._delayedOnError=null,T.onLoadObservable=new Observable,T._isBlocking=!0,T.name=e||"",T.url=e;var C,S=!1,w=null;"object"==typeof i&&null!==i?(C=null!==(p=i.noMipmap)&&void 0!==p&&p,n=null!==(_=i.invertY)&&void 0!==_&&_,r=null!==(m=i.samplingMode)&&void 0!==m?m:_0x5141a8.TRILINEAR_SAMPLINGMODE,o=null!==(g=i.onLoad)&&void 0!==g?g:null,a=null!==(x=i.onError)&&void 0!==x?x:null,s=null!==(y=i.buffer)&&void 0!==y?y:null,l=null!==(v=i.deleteBuffer)&&void 0!==v&&v,u=i.format,c=i.mimeType,h=i.loaderOptions,d=i.creationFlags,S=null!==($=i.useSRGBBuffer)&&void 0!==$&&$,w=null!==(b=i.internalTexture)&&void 0!==b?b:null):C=!!i,T._noMipmap=C,T._invertY=void 0!==n&&n,T._initialSamplingMode=r,T._buffer=s,T._deleteBuffer=l,T._mimeType=c,T._loaderOptions=h,T._creationFlags=d,T._useSRGBBuffer=S,T._forcedExtension=f,u&&(T._format=u);var E=T.getScene(),P=T._getEngine();if(!P)return T;P.onBeforeTextureInitObservable.notifyObservers(T);var A=function(){T._texture&&(T._texture._invertVScale&&(T.vScale*=-1,T.vOffset+=1),null!==T._texture._cachedWrapU&&(T.wrapU=T._texture._cachedWrapU,T._texture._cachedWrapU=null),null!==T._texture._cachedWrapV&&(T.wrapV=T._texture._cachedWrapV,T._texture._cachedWrapV=null),null!==T._texture._cachedWrapR&&(T.wrapR=T._texture._cachedWrapR,T._texture._cachedWrapR=null)),T.onLoadObservable.hasObservers()&&T.onLoadObservable.notifyObservers(T),o&&o(),!T.isBlocking&&E&&E.resetCachedMaterial()},L=function(e,t){T._loadingError=!0,T._errorObject={message:e,exception:t},a&&a(e,t),_0x5141a8.OnTextureLoadErrorObservable.notifyObservers(T)};if(!T.url)return T._delayedOnLoad=A,T._delayedOnError=L,T;if(T._texture=null!=w?w:T._getFromCache(T.url,C,r,T._invertY,S),T._texture)if(T._texture.isReady)_Misc_timingTools__WEBPACK_IMPORTED_MODULE_8__.TimingTools.SetImmediate((function(){return A()}));else{var M=T._texture.onLoadedObservable.add(A);T._texture.onErrorObservable.add((function(e){var t;L(e.message,e.exception),null===(t=T._texture)||void 0===t||t.onLoadedObservable.remove(M)}))}else if(E&&E.useDelayedTextureLoading)T.delayLoadState=_0x333f62.DELAYLOADSTATE_NOTLOADED,T._delayedOnLoad=A,T._delayedOnError=L;else{try{T._texture=P.createTexture(T.url,C,T._invertY,E,r,A,L,T._buffer,void 0,T._format,T._forcedExtension,c,h,d,S)}catch(e){throw L("error loading",e),e}l&&(T._buffer=null)}return T}_0x199455(),_0x124fec&&(_0x5141a8.__proto__=_0x124fec),_0x5141a8.prototype=Object.create(_0x124fec&&_0x124fec.prototype),_0x5141a8.prototype.constructor=_0x124fec,Object.defineProperty(_0x5141a8.prototype,"noMipmap",{get:function(){return this._noMipmap},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5141a8.prototype,"mimeType",{get:function(){return this._mimeType},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5141a8.prototype,"isBlocking",{get:function(){return this._isBlocking},set:function(e){this._isBlocking=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5141a8.prototype,"invertY",{get:function(){return this._invertY},enumerable:!1,configurable:!0}),_0x5141a8.prototype.updateURL=function(e,t,i,n){void 0===t&&(t=null),this.url&&(this.releaseInternalTexture(),this.getScene().markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag)),(!this.name||this.name.startsWith("data:"))&&(this.name=e),this.url=e,this._buffer=t,this._forcedExtension=n,this.delayLoadState=_0x333f62.DELAYLOADSTATE_NOTLOADED,i&&(this._delayedOnLoad=i),this.delayLoad()},_0x5141a8.prototype.delayLoad=function(){if(this.delayLoadState===_0x333f62.DELAYLOADSTATE_NOTLOADED){var e=this.getScene();e&&(this.delayLoadState=_0x333f62.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap,this.samplingMode,this._invertY,this._useSRGBBuffer),this._texture?this._delayedOnLoad&&(this._texture.isReady?_Misc_timingTools__WEBPACK_IMPORTED_MODULE_8__.TimingTools.SetImmediate(this._delayedOnLoad):this._texture.onLoadedObservable.add(this._delayedOnLoad)):(this._texture=e.getEngine().createTexture(this.url,this._noMipmap,this._invertY,e,this.samplingMode,this._delayedOnLoad,this._delayedOnError,this._buffer,null,this._format,this._forcedExtension,this._mimeType,this._loaderOptions,this._creationFlags,this._useSRGBBuffer),this._deleteBuffer&&(this._buffer=null)),this._delayedOnLoad=null,this._delayedOnError=null)}},_0x5141a8.prototype._prepareRowForTextureGeneration=function(e,t,i,n){e*=this._cachedUScale,t*=this._cachedVScale,e-=this.uRotationCenter*this._cachedUScale,t-=this.vRotationCenter*this._cachedVScale,i-=this.wRotationCenter,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.TransformCoordinatesFromFloatsToRef(e,t,i,this._rowGenerationMatrix,n),n.x+=this.uRotationCenter*this._cachedUScale+this._cachedUOffset,n.y+=this.vRotationCenter*this._cachedVScale+this._cachedVOffset,n.z+=this.wRotationCenter},_0x5141a8.prototype.checkTransformsAreIdentical=function(e){return null!==e&&this.uOffset===e.uOffset&&this.vOffset===e.vOffset&&this.uScale===e.uScale&&this.vScale===e.vScale&&this.uAng===e.uAng&&this.vAng===e.vAng&&this.wAng===e.wAng},_0x5141a8.prototype.getTextureMatrix=function(e){var t=this;if(void 0===e&&(e=1),this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale*e===this._cachedUScale&&this.vScale===this._cachedVScale&&this.uAng===this._cachedUAng&&this.vAng===this._cachedVAng&&this.wAng===this._cachedWAng&&this.uRotationCenter===this._cachedURotationCenter&&this.vRotationCenter===this._cachedVRotationCenter&&this.wRotationCenter===this._cachedWRotationCenter&&this.homogeneousRotationInUVTransform===this._cachedHomogeneousRotationInUVTransform)return this._cachedTextureMatrix;this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale*e,this._cachedVScale=this.vScale,this._cachedUAng=this.uAng,this._cachedVAng=this.vAng,this._cachedWAng=this.wAng,this._cachedURotationCenter=this.uRotationCenter,this._cachedVRotationCenter=this.vRotationCenter,this._cachedWRotationCenter=this.wRotationCenter,this._cachedHomogeneousRotationInUVTransform=this.homogeneousRotationInUVTransform,(!this._cachedTextureMatrix||!this._rowGenerationMatrix)&&(this._cachedTextureMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Zero(),this._rowGenerationMatrix=new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix,this._t0=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero(),this._t1=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero(),this._t2=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero()),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.RotationYawPitchRollToRef(this.vAng,this.uAng,this.wAng,this._rowGenerationMatrix),this.homogeneousRotationInUVTransform?(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.TranslationToRef(-this._cachedURotationCenter,-this._cachedVRotationCenter,-this._cachedWRotationCenter,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[0]),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.TranslationToRef(this._cachedURotationCenter,this._cachedVRotationCenter,this._cachedWRotationCenter,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[1]),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.ScalingToRef(this._cachedUScale,this._cachedVScale,0,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[2]),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.TranslationToRef(this._cachedUOffset,this._cachedVOffset,0,_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[3]),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[0].multiplyToRef(this._rowGenerationMatrix,this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[1],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[2],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Matrix[3],this._cachedTextureMatrix),this._cachedTextureMatrix.setRowFromFloats(2,this._cachedTextureMatrix.m[12],this._cachedTextureMatrix.m[13],this._cachedTextureMatrix.m[14],1)):(this._prepareRowForTextureGeneration(0,0,0,this._t0),this._prepareRowForTextureGeneration(1,0,0,this._t1),this._prepareRowForTextureGeneration(0,1,0,this._t2),this._t1.subtractInPlace(this._t0),this._t2.subtractInPlace(this._t0),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.FromValuesToRef(this._t1.x,this._t1.y,this._t1.z,0,this._t2.x,this._t2.y,this._t2.z,0,this._t0.x,this._t0.y,this._t0.z,0,0,0,0,1,this._cachedTextureMatrix));var i=this.getScene();return i?(i.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag,(function(e){return e.hasTexture(t)})),this._cachedTextureMatrix):this._cachedTextureMatrix},_0x5141a8.prototype.getReflectionTextureMatrix=function(){var e=this,t=this.getScene();if(!t)return this._cachedTextureMatrix;if(this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale===this._cachedUScale&&this.vScale===this._cachedVScale&&this.coordinatesMode===this._cachedCoordinatesMode){if(this.coordinatesMode!==_0x5141a8.PROJECTION_MODE)return this._cachedTextureMatrix;if(this._cachedProjectionMatrixId===t.getProjectionMatrix().updateFlag)return this._cachedTextureMatrix}!this._cachedTextureMatrix&&(this._cachedTextureMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Zero()),!this._projectionModeMatrix&&(this._projectionModeMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Zero());var i=this._cachedCoordinatesMode!==this.coordinatesMode;switch(this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale,this._cachedVScale=this.vScale,this._cachedCoordinatesMode=this.coordinatesMode,this.coordinatesMode){case _0x5141a8.PLANAR_MODE:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityToRef(this._cachedTextureMatrix),this._cachedTextureMatrix[0]=this.uScale,this._cachedTextureMatrix[5]=this.vScale,this._cachedTextureMatrix[12]=this.uOffset,this._cachedTextureMatrix[13]=this.vOffset;break;case _0x5141a8.PROJECTION_MODE:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.FromValuesToRef(.5,0,0,0,0,-.5,0,0,0,0,0,0,.5,.5,1,1,this._projectionModeMatrix);var n=t.getProjectionMatrix();this._cachedProjectionMatrixId=n.updateFlag,n.multiplyToRef(this._projectionModeMatrix,this._cachedTextureMatrix);break;default:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.IdentityToRef(this._cachedTextureMatrix)}return i&&t.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag,(function(t){return-1!==t.getActiveTextures().indexOf(e)})),this._cachedTextureMatrix},_0x5141a8.prototype.clone=function(){var e=this,t={noMipmap:this._noMipmap,invertY:this._invertY,samplingMode:this.samplingMode,onLoad:void 0,onError:void 0,buffer:this._texture?this._texture._buffer:void 0,deleteBuffer:this._deleteBuffer,format:this.textureFormat,mimeType:this.mimeType,loaderOptions:this._loaderOptions,creationFlags:this._creationFlags,useSRGBBuffer:this._useSRGBBuffer};return _Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Clone((function(){return new _0x5141a8(e._texture?e._texture.url:null,e.getScene(),t)}),this)},_0x5141a8.prototype.serialize=function(){var e=this.name;!_0x5141a8.SerializeBuffers&&this.name.startsWith("data:")&&(this.name=""),this.name.startsWith("data:")&&this.url===this.name&&(this.url="");var t=_super.prototype.serialize.call(this);return t?((_0x5141a8.SerializeBuffers||_0x5141a8.ForceSerializeBuffers)&&("string"==typeof this._buffer&&"data:"===this._buffer.substr(0,5)?(t.base64String=this._buffer,t.name=t.name.replace("data:","")):this.url&&this.url.startsWith("data:")&&this._buffer instanceof Uint8Array?t.base64String="data:image/png;base64,"+(0,_Misc_stringTools__WEBPACK_IMPORTED_MODULE_11__.EncodeArrayBufferToBase64)(this._buffer):(_0x5141a8.ForceSerializeBuffers||this.url&&this.url.startsWith("blob:")||this._forceSerialize)&&(t.base64String=!this._engine||this._engine._features.supportSyncTextureRead?(0,_Misc_copyTools__WEBPACK_IMPORTED_MODULE_12__.GenerateBase64StringFromTexture)(this):(0,_Misc_copyTools__WEBPACK_IMPORTED_MODULE_12__.GenerateBase64StringFromTextureAsync)(this))),t.invertY=this._invertY,t.samplingMode=this.samplingMode,t._creationFlags=this._creationFlags,t._useSRGBBuffer=this._useSRGBBuffer,this.name=e,t):null},_0x5141a8.prototype.getClassName=function(){return"Texture"},_0x5141a8.prototype.dispose=function(){_super.prototype.dispose.call(this),this.onLoadObservable.clear(),this._delayedOnLoad=null,this._delayedOnError=null},_0x5141a8.Parse=function(e,t,i){if(e.customType){var n=_Misc_instantiationTools__WEBPACK_IMPORTED_MODULE_9__.InstantiationTools.Instantiate(e.customType).Parse(e,t,i);return e.samplingMode&&n.updateSamplingMode&&n._samplingMode&&n._samplingMode!==e.samplingMode&&n.updateSamplingMode(e.samplingMode),n}if(e.isCube&&!e.isRenderTarget)return _0x5141a8._CubeTextureParser(e,t,i);if(!e.name&&!e.isRenderTarget)return null;var r=function(){if(o&&o._texture&&(o._texture._cachedWrapU=null,o._texture._cachedWrapV=null,o._texture._cachedWrapR=null),e.samplingMode){var t=e.samplingMode;o&&o.samplingMode!==t&&o.updateSamplingMode(t)}if(o&&e.animations)for(var i=0;i<e.animations.length;i++){var n=e.animations[i],r=(0,_Misc_typeStore__WEBPACK_IMPORTED_MODULE_6__.GetClass)("BABYLON.Animation");r&&o.animations.push(r.Parse(n))}},o=_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Parse((function(){var n,o,a,s,l=!0;if(e.noMipmap&&(l=!1),e.mirrorPlane){var u=_0x5141a8._CreateMirror(e.name,e.renderTargetSize,t,l);return u._waitingRenderList=e.renderList,u.mirrorPlane=_Maths_math_plane__WEBPACK_IMPORTED_MODULE_10__.Plane.FromArray(e.mirrorPlane),r(),u}if(e.isRenderTarget){var c=null;if(e.isCube){if(t.reflectionProbes)for(var h=0;h<t.reflectionProbes.length;h++){var d=t.reflectionProbes[h];if(d.name===e.name)return d.cubeTexture}}else(c=_0x5141a8._CreateRenderTargetTexture(e.name,e.renderTargetSize,t,l,null!==(n=e._creationFlags)&&void 0!==n?n:0))._waitingRenderList=e.renderList;return r(),c}if(e.base64String)s=_0x5141a8.CreateFromBase64String(e.base64String,e.name,t,!l,e.invertY,e.samplingMode,r,null!==(o=e._creationFlags)&&void 0!==o?o:0,null!==(a=e._useSRGBBuffer)&&void 0!==a&&a);else{var f=void 0;f=e.name&&e.name.indexOf("://")>0?e.name:i+e.name,e.url&&(e.url.startsWith("data:")||_0x5141a8.UseSerializedUrlIfAny)&&(f=e.url),s=new _0x5141a8(f,t,!l,e.invertY,e.samplingMode,r)}return s}),e,t);return o},_0x5141a8.CreateFromBase64String=function(e,t,i,n,r,o,a,s,l,u){return void 0===o&&(o=_0x5141a8.TRILINEAR_SAMPLINGMODE),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=_0x333f62.TEXTUREFORMAT_RGBA),new _0x5141a8("data:"+t,i,n,r,o,a,s,e,!1,l,void 0,void 0,u)},_0x5141a8.LoadFromDataString=function(e,t,i,n,r,o,a,s,l,u,c){return void 0===n&&(n=!1),void 0===o&&(o=!0),void 0===a&&(a=_0x5141a8.TRILINEAR_SAMPLINGMODE),void 0===s&&(s=null),void 0===l&&(l=null),void 0===u&&(u=_0x333f62.TEXTUREFORMAT_RGBA),"data:"!==e.substr(0,5)&&(e="data:"+e),new _0x5141a8(e,i,r,o,a,s,l,t,n,u,void 0,void 0,c)},_0x5141a8.SerializeBuffers=!0,_0x5141a8.ForceSerializeBuffers=!1,_0x5141a8.OnTextureLoadErrorObservable=new Observable,_0x5141a8._CubeTextureParser=function(e,t,i){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_7__._WarnImport)("CubeTexture")},_0x5141a8._CreateMirror=function(e,t,i,n){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_7__._WarnImport)("MirrorTexture")},_0x5141a8._CreateRenderTargetTexture=function(e,t,i,n,r){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_7__._WarnImport)("RenderTargetTexture")},_0x5141a8.NEAREST_SAMPLINGMODE=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,_0x5141a8.NEAREST_NEAREST_MIPLINEAR=_0x333f62.TEXTURE_NEAREST_NEAREST_MIPLINEAR,_0x5141a8.BILINEAR_SAMPLINGMODE=_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE,_0x5141a8.LINEAR_LINEAR_MIPNEAREST=_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST,_0x5141a8.TRILINEAR_SAMPLINGMODE=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE,_0x5141a8.LINEAR_LINEAR_MIPLINEAR=_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR,_0x5141a8.NEAREST_NEAREST_MIPNEAREST=_0x333f62.TEXTURE_NEAREST_NEAREST_MIPNEAREST,_0x5141a8.NEAREST_LINEAR_MIPNEAREST=_0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST,_0x5141a8.NEAREST_LINEAR_MIPLINEAR=_0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR,_0x5141a8.NEAREST_LINEAR=_0x333f62.TEXTURE_NEAREST_LINEAR,_0x5141a8.NEAREST_NEAREST=_0x333f62.TEXTURE_NEAREST_NEAREST,_0x5141a8.LINEAR_NEAREST_MIPNEAREST=_0x333f62.TEXTURE_LINEAR_NEAREST_MIPNEAREST,_0x5141a8.LINEAR_NEAREST_MIPLINEAR=_0x333f62.TEXTURE_LINEAR_NEAREST_MIPLINEAR,_0x5141a8.LINEAR_LINEAR=_0x333f62.TEXTURE_LINEAR_LINEAR,_0x5141a8.LINEAR_NEAREST=_0x333f62.TEXTURE_LINEAR_NEAREST,_0x5141a8.EXPLICIT_MODE=_0x333f62.TEXTURE_EXPLICIT_MODE,_0x5141a8.SPHERICAL_MODE=_0x333f62.TEXTURE_SPHERICAL_MODE,_0x5141a8.PLANAR_MODE=_0x333f62.TEXTURE_PLANAR_MODE,_0x5141a8.CUBIC_MODE=_0x333f62.TEXTURE_CUBIC_MODE,_0x5141a8.PROJECTION_MODE=_0x333f62.TEXTURE_PROJECTION_MODE,_0x5141a8.SKYBOX_MODE=_0x333f62.TEXTURE_SKYBOX_MODE,_0x5141a8.INVCUBIC_MODE=_0x333f62.TEXTURE_INVCUBIC_MODE,_0x5141a8.EQUIRECTANGULAR_MODE=_0x333f62.TEXTURE_EQUIRECTANGULAR_MODE,_0x5141a8.FIXED_EQUIRECTANGULAR_MODE=_0x333f62.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,_0x5141a8.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=_0x333f62.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,_0x5141a8.CLAMP_ADDRESSMODE=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,_0x5141a8.WRAP_ADDRESSMODE=_0x333f62.TEXTURE_WRAP_ADDRESSMODE,_0x5141a8.MIRROR_ADDRESSMODE=_0x333f62.TEXTURE_MIRROR_ADDRESSMODE;var _0x1f5636=(_0x38d6b7=!0,function(e,t){var i=_0x38d6b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38d6b7=!1,i}),_0x4db4b8=_0x1f5636(void 0,(function(){return _0x4db4b8.toString().search("(((.+)+)+)+$").toString().constructor(_0x4db4b8).search("(((.+)+)+)+$")})),_0x38d6b7;function _0x5535c1(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){void 0===r&&(r=!0),void 0===o&&(o=_0x333f62.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),void 0===s&&(s=_0x5141a8.TRILINEAR_SAMPLINGMODE),void 0===l&&(l=!0),void 0===u&&(u=!1),void 0===c&&(c=!1),void 0===h&&(h=_0x333f62.TEXTUREFORMAT_RGBA),void 0===d&&(d=!1),void 0===_&&(_=!1),void 0===m&&(m=!1);var g,x=this;if((x=_0x5141a8.call(this,null,i,!n,void 0,s,void 0,void 0,void 0,void 0,h)||this).renderParticles=!0,x.renderSprites=!1,x.ignoreCameraViewport=!1,x.onBeforeBindObservable=new Observable,x.onAfterUnbindObservable=new Observable,x.onBeforeRenderObservable=new Observable,x.onAfterRenderObservable=new Observable,x.onClearObservable=new Observable,x.onResizeObservable=new Observable,x._cleared=!1,x.skipInitialClear=!1,x._currentRefreshId=-1,x._refreshRate=1,x._samples=1,x._canRescale=!0,x._renderTarget=null,x.boundingBoxPosition=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Vector3.Zero(),!(i=x.getScene()))return x;var y=x.getScene().getEngine();return x._coordinatesMode=_0x5141a8.PROJECTION_MODE,x.renderList=new Array,x.name=e,x.isRenderTarget=!0,x._initialSizeParameter=t,x._renderPassIds=[],x._isCubeData=a,x._processSizeParameter(t),x.renderPassId=x._renderPassIds[0],x._resizeObserver=y.onResizeObservable.add((function(){})),x._generateMipMaps=!!n,x._doNotChangeAspectRatio=r,x._renderingManager=new _Rendering_renderingManager__WEBPACK_IMPORTED_MODULE_6__.RenderingManager(i),x._renderingManager._useSceneAutoClearSetup=!0,c||(x._renderTargetOptions={generateMipMaps:n,type:o,format:null!==(g=x._format)&&void 0!==g?g:void 0,samplingMode:x.samplingMode,generateDepthBuffer:l,generateStencilBuffer:u,samples:f,creationFlags:p,noColorTarget:_,useSRGBBuffer:m},x.samplingMode===_0x5141a8.NEAREST_SAMPLINGMODE&&(x.wrapU=_0x5141a8.CLAMP_ADDRESSMODE,x.wrapV=_0x5141a8.CLAMP_ADDRESSMODE),!d&&(a?(x._renderTarget=i.getEngine().createRenderTargetCubeTexture(x.getRenderSize(),x._renderTargetOptions),x.coordinatesMode=_0x5141a8.INVCUBIC_MODE,x._textureMatrix=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.Matrix.Identity()):x._renderTarget=i.getEngine().createRenderTargetTexture(x._size,x._renderTargetOptions),x._texture=x._renderTarget.texture,void 0!==f&&(x.samples=f))),x}_0x4db4b8(),_0x5141a8&&(_0x5535c1.__proto__=_0x5141a8),_0x5535c1.prototype=Object.create(_0x5141a8&&_0x5141a8.prototype),_0x5535c1.prototype.constructor=_0x5141a8,Object.defineProperty(_0x5535c1.prototype,"renderList",{get:function(){return this._renderList},set:function(e){this._renderList=e,this._renderList&&this._hookArray(this._renderList)},enumerable:!1,configurable:!0}),_0x5535c1.prototype._hookArray=function(e){var t=this,i=e.push;e.push=function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=0===e.length,s=i.apply(e,r);return a&&(null===(n=t.getScene())||void 0===n||n.meshes.forEach((function(e){e._markSubMeshesAsLightDirty()}))),s};var n=e.splice;e.splice=function(i,r){var o,a=n.apply(e,[i,r]);return 0===e.length&&(null===(o=t.getScene())||void 0===o||o.meshes.forEach((function(e){e._markSubMeshesAsLightDirty()}))),a}},Object.defineProperty(_0x5535c1.prototype,"postProcesses",{get:function(){return this._postProcesses},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"_prePassEnabled",{get:function(){return!!this._prePassRenderTarget&&this._prePassRenderTarget.enabled},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"onAfterUnbind",{set:function(e){this._onAfterUnbindObserver&&this.onAfterUnbindObservable.remove(this._onAfterUnbindObserver),this._onAfterUnbindObserver=this.onAfterUnbindObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"onBeforeRender",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"onAfterRender",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"onClear",{set:function(e){this._onClearObserver&&this.onClearObservable.remove(this._onClearObserver),this._onClearObserver=this.onClearObservable.add(e)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"renderPassIds",{get:function(){return this._renderPassIds},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"currentRefreshId",{get:function(){return this._currentRefreshId},enumerable:!1,configurable:!0}),_0x5535c1.prototype.setMaterialForRendering=function(e,t){var i;i=Array.isArray(e)?e:[e];for(var n=0;n<i.length;++n)for(var r=0;r<this._renderPassIds.length;++r)i[n].setMaterialForRenderPass(this._renderPassIds[r],void 0!==t?Array.isArray(t)?t[r]:t:void 0)},Object.defineProperty(_0x5535c1.prototype,"renderTargetOptions",{get:function(){return this._renderTargetOptions},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"renderTarget",{get:function(){return this._renderTarget},enumerable:!1,configurable:!0}),_0x5535c1.prototype._onRatioRescale=function(){this._sizeRatio&&this.resize(this._initialSizeParameter)},Object.defineProperty(_0x5535c1.prototype,"boundingBoxSize",{get:function(){return this._boundingBoxSize},set:function(e){if(!this._boundingBoxSize||!this._boundingBoxSize.equals(e)){this._boundingBoxSize=e;var t=this.getScene();t&&t.markAllMaterialsAsDirty(_0x333f62.MATERIAL_TextureDirtyFlag)}},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5535c1.prototype,"depthStencilTexture",{get:function(){var e,t;return null!==(t=null===(e=this._renderTarget)||void 0===e?void 0:e._depthStencilTexture)&&void 0!==t?t:null},enumerable:!1,configurable:!0}),_0x5535c1.prototype.createDepthStencilTexture=function(e,t,i,n,r){var o;void 0===e&&(e=0),void 0===t&&(t=!0),void 0===i&&(i=!1),void 0===n&&(n=1),void 0===r&&(r=_0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT),null===(o=this._renderTarget)||void 0===o||o.createDepthStencilTexture(e,t,i,n,r)},_0x5535c1.prototype._releaseRenderPassId=function(){if(this._scene)for(var e=this._scene.getEngine(),t=0;t<this._renderPassIds.length;++t)e.releaseRenderPassId(this._renderPassIds[t]);this._renderPassIds=[]},_0x5535c1.prototype._createRenderPassId=function(){this._releaseRenderPassId();for(var e=this._scene.getEngine(),t=this._isCubeData?6:this.getRenderLayers()||1,i=0;i<t;++i)this._renderPassIds[i]=e.createRenderPassId("RenderTargetTexture - ".concat(this.name,"#").concat(i))},_0x5535c1.prototype._processSizeParameter=function(e){if(e.ratio){this._sizeRatio=e.ratio;var t=this._getEngine();this._size={width:this._bestReflectionRenderTargetDimension(t.getRenderWidth(),this._sizeRatio),height:this._bestReflectionRenderTargetDimension(t.getRenderHeight(),this._sizeRatio)}}else this._size=e;this._createRenderPassId()},Object.defineProperty(_0x5535c1.prototype,"samples",{get:function(){var e,t;return null!==(t=null===(e=this._renderTarget)||void 0===e?void 0:e.samples)&&void 0!==t?t:this._samples},set:function(e){this._renderTarget&&(this._samples=this._renderTarget.setSamples(e))},enumerable:!1,configurable:!0}),_0x5535c1.prototype.resetRefreshCounter=function(){this._currentRefreshId=-1},Object.defineProperty(_0x5535c1.prototype,"refreshRate",{get:function(){return this._refreshRate},set:function(e){this._refreshRate=e,this.resetRefreshCounter()},enumerable:!1,configurable:!0}),_0x5535c1.prototype.addPostProcess=function(e){if(!this._postProcessManager){var t=this.getScene();if(!t)return;this._postProcessManager=new _PostProcesses_postProcessManager__WEBPACK_IMPORTED_MODULE_5__.PostProcessManager(t),this._postProcesses=new Array}this._postProcesses.push(e),this._postProcesses[0].autoClear=!1},_0x5535c1.prototype.clearPostProcesses=function(e){if(void 0===e&&(e=!1),this._postProcesses){if(e)for(var t=0,i=this._postProcesses;t<i.length;t++){i[t].dispose()}this._postProcesses=[]}},_0x5535c1.prototype.removePostProcess=function(e){if(this._postProcesses){var t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses.splice(t,1),this._postProcesses.length>0&&(this._postProcesses[0].autoClear=!1))}},_0x5535c1.prototype._shouldRender=function(){return-1===this._currentRefreshId||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1)},_0x5535c1.prototype.getRenderSize=function(){return this.getRenderWidth()},_0x5535c1.prototype.getRenderWidth=function(){return this._size.width?this._size.width:this._size},_0x5535c1.prototype.getRenderHeight=function(){return this._size.width?this._size.height:this._size},_0x5535c1.prototype.getRenderLayers=function(){var e=this._size.layers;return e||0},_0x5535c1.prototype.disableRescaling=function(){this._canRescale=!1},Object.defineProperty(_0x5535c1.prototype,"canRescale",{get:function(){return this._canRescale},enumerable:!1,configurable:!0}),_0x5535c1.prototype.scale=function(e){var t=Math.max(1,this.getRenderSize()*e);this.resize(t)},_0x5535c1.prototype.getReflectionTextureMatrix=function(){return this.isCube?this._textureMatrix:_super.prototype.getReflectionTextureMatrix.call(this)},_0x5535c1.prototype.resize=function(e){var t,i=this.isCube;null===(t=this._renderTarget)||void 0===t||t.dispose(),this._renderTarget=null;var n=this.getScene();n&&(this._processSizeParameter(e),this._renderTarget=i?n.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions):n.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this._texture=this._renderTarget.texture,void 0!==this._renderTargetOptions.samples&&(this.samples=this._renderTargetOptions.samples),this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this))},_0x5535c1.prototype.render=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),this._render(e,t)},_0x5535c1.prototype.isReadyForRendering=function(){return this._render(!1,!1,!0)},_0x5535c1.prototype._render=function(e,t,i){var n;void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===i&&(i=!1);var r=this.getScene();if(!r)return i;var o=r.getEngine();if(void 0!==this.useCameraPostProcesses&&(e=this.useCameraPostProcesses),this._waitingRenderList){this.renderList=[];for(var a=0;a<this._waitingRenderList.length;a++){var s=this._waitingRenderList[a];(c=r.getMeshById(s))&&this.renderList.push(c)}this._waitingRenderList=void 0}if(this.renderListPredicate){this.renderList?this.renderList.length=0:this.renderList=[];var l=this.getScene();if(!l)return i;var u=l.meshes;for(a=0;a<u.length;a++){var c=u[a];this.renderListPredicate(c)&&this.renderList.push(c)}}var h=o.currentRenderPassId;this.onBeforeBindObservable.notifyObservers(this);var d=null!==(n=this.activeCamera)&&void 0!==n?n:r.activeCamera;d&&(d!==r.activeCamera&&r.setTransformMatrix(d.getViewMatrix(),d.getProjectionMatrix(!0)),o.setViewport(d.viewport,this.getRenderWidth(),this.getRenderHeight())),this._defaultRenderListPrepared=!1;var f=i;if(i){!r.getViewMatrix()&&r.updateTransformMatrix();var p=this.is2DArray?this.getRenderLayers():this.isCube?6:1;for(y=0;y<p&&f;y++){var _=null,m=this.renderList?this.renderList:r.getActiveMeshes().data,g=this.renderList?this.renderList.length:r.getActiveMeshes().length;o.currentRenderPassId=this._renderPassIds[y],this.onBeforeRenderObservable.notifyObservers(y),this.getCustomRenderList&&(_=this.getCustomRenderList(y,m,g)),!_&&(_=m),!this._doNotChangeAspectRatio&&r.updateTransformMatrix(!0);for(var x=0;x<_.length&&f;++x){if((c=_[x]).isEnabled()&&!c.isBlocked&&c.isVisible&&c.subMeshes)if(this.customIsReadyFunction){if(!this.customIsReadyFunction(c,this.refreshRate)){f=!1;break}}else if(!c.isReady(!0)){f=!1;break}}this.onAfterRenderObservable.notifyObservers(y)}}else if(this.is2DArray)for(var y=0;y<this.getRenderLayers();y++)this._renderToTarget(0,e,t,y,d),r.incrementRenderId(),r.resetCachedMaterial();else if(this.isCube)for(var v=0;v<6;v++)this._renderToTarget(v,e,t,void 0,d),r.incrementRenderId(),r.resetCachedMaterial();else this._renderToTarget(0,e,t,void 0,d);return this.onAfterUnbindObservable.notifyObservers(this),o.currentRenderPassId=h,r.activeCamera&&((r.getEngine().scenes.length>1||this.activeCamera&&this.activeCamera!==r.activeCamera)&&r.setTransformMatrix(r.activeCamera.getViewMatrix(),r.activeCamera.getProjectionMatrix(!0)),o.setViewport(r.activeCamera.viewport)),r.resetCachedMaterial(),f},_0x5535c1.prototype._bestReflectionRenderTargetDimension=function(e,t){var i=e*t,n=_Engines_engine__WEBPACK_IMPORTED_MODULE_10__.Engine.NearestPOT(i+16384/(128+i));return Math.min(_Engines_engine__WEBPACK_IMPORTED_MODULE_10__.Engine.FloorPOT(e),n)},_0x5535c1.prototype._prepareRenderingManager=function(e,t,i,n){var r=this.getScene();if(r){this._renderingManager.reset();for(var o=r.getRenderId(),a=0;a<t;a++){var s=e[a];if(s&&!s.isBlocked){if(this.customIsReadyFunction){if(!this.customIsReadyFunction(s,this.refreshRate)){this.resetRefreshCounter();continue}}else if(!s.isReady(0===this.refreshRate)){this.resetRefreshCounter();continue}if(!s._internalAbstractMeshDataInfo._currentLODIsUpToDate&&r.activeCamera&&(s._internalAbstractMeshDataInfo._currentLOD=r.customLODSelector?r.customLODSelector(s,this.activeCamera||r.activeCamera):s.getLOD(this.activeCamera||r.activeCamera),s._internalAbstractMeshDataInfo._currentLODIsUpToDate=!0),!s._internalAbstractMeshDataInfo._currentLOD)continue;var l=s._internalAbstractMeshDataInfo._currentLOD;l._preActivateForIntermediateRendering(o);var u=void 0;if(u=!(!n||!i)&&0==(s.layerMask&i.layerMask),s.isEnabled()&&s.isVisible&&s.subMeshes&&!u&&(l!==s&&l._activate(o,!0),s._activate(o,!0)&&s.subMeshes.length)){s.isAnInstance?s._internalAbstractMeshDataInfo._actAsRegularMesh&&(l=s):l._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!1,l._internalAbstractMeshDataInfo._isActiveIntermediate=!0;for(var c=0;c<l.subMeshes.length;c++){var h=l.subMeshes[c];this._renderingManager.dispatch(h,l)}}}}for(var d=0;d<r.particleSystems.length;d++){var f=r.particleSystems[d],p=f.emitter;f.isStarted()&&p&&p.position&&p.isEnabled()&&(e.indexOf(p)>=0&&this._renderingManager.dispatchParticles(f))}}},_0x5535c1.prototype._bindFrameBuffer=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0);var i=this.getScene();if(i){var n=i.getEngine();this._renderTarget&&n.bindFramebuffer(this._renderTarget,this.isCube?e:void 0,void 0,void 0,this.ignoreCameraViewport,0,t)}},_0x5535c1.prototype._unbindFrameBuffer=function(e,t){var i=this;this._renderTarget&&e.unBindFramebuffer(this._renderTarget,this.isCube,(function(){i.onAfterRenderObservable.notifyObservers(t)}))},_0x5535c1.prototype._prepareFrame=function(e,t,i,n){this._postProcessManager?!this._prePassEnabled&&this._postProcessManager._prepareFrame(this._texture,this._postProcesses):(!n||!e.postProcessManager._prepareFrame(this._texture))&&this._bindFrameBuffer(t,i)},_0x5535c1.prototype._renderToTarget=function(e,t,i,n,r){var o,a,s,l,u,c;void 0===n&&(n=0),void 0===r&&(r=null);var h=this.getScene();if(h){var d=h.getEngine();if(null===(o=d._debugPushGroup)||void 0===o||o.call(d,"render to face #".concat(e," layer #").concat(n),1),this._prepareFrame(h,e,n,t),this.is2DArray?(d.currentRenderPassId=this._renderPassIds[n],this.onBeforeRenderObservable.notifyObservers(n)):(d.currentRenderPassId=this._renderPassIds[e],this.onBeforeRenderObservable.notifyObservers(e)),d.snapshotRendering&&d.snapshotRenderingMode===_0x333f62.SNAPSHOTRENDERING_FAST)this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(d):!this.skipInitialClear&&d.clear(this.clearColor||h.clearColor,!0,!0,!0);else{var f=null,p=this.renderList?this.renderList:h.getActiveMeshes().data,_=this.renderList?this.renderList.length:h.getActiveMeshes().length;this.getCustomRenderList&&(f=this.getCustomRenderList(this.is2DArray?n:e,p,_)),f?this._prepareRenderingManager(f,f.length,r,!1):(!this._defaultRenderListPrepared&&(this._prepareRenderingManager(p,_,r,!this.renderList),this._defaultRenderListPrepared=!0),f=p);for(var m=0,g=h._beforeRenderTargetClearStage;m<g.length;m++){g[m].action(this,e,n)}this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(d):!this.skipInitialClear&&d.clear(this.clearColor||h.clearColor,!0,!0,!0),!this._doNotChangeAspectRatio&&h.updateTransformMatrix(!0);for(var x=0,y=h._beforeRenderTargetDrawStage;x<y.length;x++){y[x].action(this,e,n)}this._renderingManager.render(this.customRenderFunction,f,this.renderParticles,this.renderSprites);for(var v=0,$=h._afterRenderTargetDrawStage;v<$.length;v++){$[v].action(this,e,n)}var b=null!==(s=null===(a=this._texture)||void 0===a?void 0:a.generateMipMaps)&&void 0!==s&&s;this._texture&&(this._texture.generateMipMaps=!1),this._postProcessManager?this._postProcessManager._finalizeFrame(!1,null!==(l=this._renderTarget)&&void 0!==l?l:void 0,e,this._postProcesses,this.ignoreCameraViewport):t&&h.postProcessManager._finalizeFrame(!1,null!==(u=this._renderTarget)&&void 0!==u?u:void 0,e),this._texture&&(this._texture.generateMipMaps=b),!this._doNotChangeAspectRatio&&h.updateTransformMatrix(!0),i&&_0xd79dde.DumpFramebuffer(this.getRenderWidth(),this.getRenderHeight(),d)}this._unbindFrameBuffer(d,e),this._texture&&this.isCube&&5===e&&d.generateMipMapsForCubemap(this._texture),null===(c=d._debugPopGroup)||void 0===c||c.call(d,1)}},_0x5535c1.prototype.setRenderingOrder=function(e,t,i,n){void 0===t&&(t=null),void 0===i&&(i=null),void 0===n&&(n=null),this._renderingManager.setRenderingOrder(e,t,i,n)},_0x5535c1.prototype.setRenderingAutoClearDepthStencil=function(e,t){this._renderingManager.setRenderingAutoClearDepthStencil(e,t),this._renderingManager._useSceneAutoClearSetup=!1},_0x5535c1.prototype.clone=function(){var e=this.getSize(),t=new _0x5535c1(this.name,e,this.getScene(),this._renderTargetOptions.generateMipMaps,this._doNotChangeAspectRatio,this._renderTargetOptions.type,this.isCube,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer,this._renderTargetOptions.generateStencilBuffer,void 0,this._renderTargetOptions.format,void 0,this._renderTargetOptions.samples);return t.hasAlpha=this.hasAlpha,t.level=this.level,t.coordinatesMode=this.coordinatesMode,this.renderList&&(t.renderList=this.renderList.slice(0)),t},_0x5535c1.prototype.serialize=function(){if(!this.name)return null;var e=_super.prototype.serialize.call(this);if(e.renderTargetSize=this.getRenderSize(),e.renderList=[],this.renderList)for(var t=0;t<this.renderList.length;t++)e.renderList.push(this.renderList[t].id);return e},_0x5535c1.prototype.disposeFramebufferObjects=function(){var e;null===(e=this._renderTarget)||void 0===e||e.dispose(!0)},_0x5535c1.prototype.releaseInternalTexture=function(){var e;null===(e=this._renderTarget)||void 0===e||e.releaseTextures(),this._texture=null},_0x5535c1.prototype.dispose=function(){var e;this.onResizeObservable.clear(),this.onClearObservable.clear(),this.onAfterRenderObservable.clear(),this.onAfterUnbindObservable.clear(),this.onBeforeBindObservable.clear(),this.onBeforeRenderObservable.clear(),this._postProcessManager&&(this._postProcessManager.dispose(),this._postProcessManager=null),this._prePassRenderTarget&&this._prePassRenderTarget.dispose(),this._releaseRenderPassId(),this.clearPostProcesses(!0),this._resizeObserver&&(this.getScene().getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null),this.renderList=null;var t=this.getScene();if(t){var i=t.customRenderTargets.indexOf(this);i>=0&&t.customRenderTargets.splice(i,1);for(var n=0,r=t.cameras;n<r.length;n++){var o=r[n];(i=o.customRenderTargets.indexOf(this))>=0&&o.customRenderTargets.splice(i,1)}null===(e=this._renderTarget)||void 0===e||e.dispose(),this._renderTarget=null,this._texture=null,_super.prototype.dispose.call(this)}},_0x5535c1.prototype._rebuild=function(){this.refreshRate===_0x5535c1.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=_0x5535c1.REFRESHRATE_RENDER_ONCE),this._postProcessManager&&this._postProcessManager._rebuild()},_0x5535c1.prototype.freeRenderingGroups=function(){this._renderingManager&&this._renderingManager.freeRenderingGroups()},_0x5535c1.prototype.getViewCount=function(){return 1},_0x5535c1.REFRESHRATE_RENDER_ONCE=0,_0x5535c1.REFRESHRATE_RENDER_ONEVERYFRAME=1,_0x5535c1.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2,_0x5141a8._CreateRenderTargetTexture=function(e,t,i,n,r){return new _0x5535c1(e,t,i,n)};var _0x4487c2=(_0x10429b=!0,function(e,t){var i=_0x10429b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x10429b=!1,i}),_0x18de9f=_0x4487c2(void 0,(function(){return _0x18de9f.toString().search("(((.+)+)+)+$").toString().constructor(_0x18de9f).search("(((.+)+)+)+$")})),_0x10429b,_0x28f552,_0x2ce3e5;function _0x253b1a(e,t,i,n){void 0===n&&(n=!0);var r=e.getScene(),o=r.getEngine(),a=new _0x5535c1("resized"+e.name,{width:t,height:i},r,!e.noMipmap,!0,e._texture.type,!1,e.samplingMode,!1);a.wrapU=e.wrapU,a.wrapV=e.wrapV,a.uOffset=e.uOffset,a.vOffset=e.vOffset,a.uScale=e.uScale,a.vScale=e.vScale,a.uAng=e.uAng,a.vAng=e.vAng,a.wAng=e.wAng,a.coordinatesIndex=e.coordinatesIndex,a.level=e.level,a.anisotropicFilteringLevel=e.anisotropicFilteringLevel,a._texture.isReady=!1,e.wrapU=_0x5141a8.CLAMP_ADDRESSMODE,e.wrapV=_0x5141a8.CLAMP_ADDRESSMODE;var s=new _PostProcesses_passPostProcess__WEBPACK_IMPORTED_MODULE_2__.PassPostProcess("pass",1,null,n?_0x5141a8.BILINEAR_SAMPLINGMODE:_0x5141a8.NEAREST_SAMPLINGMODE,o,!1,_0x333f62.TEXTURETYPE_UNSIGNED_INT);return s.externalTextureSamplerBinding=!0,s.getEffect().executeWhenCompiled((function(){s.onApply=function(t){t.setTexture("textureSampler",e)};var t=a.renderTarget;t&&(r.postProcessManager.directRender([s],t),o.unBindFramebuffer(t),a.disposeFramebufferObjects(),s.dispose(),a.getInternalTexture().isReady=!0)})),a}function _0x2a94e0(e,t,i,n,r,o){var a=t.getEngine();return t.isReady=!1,r=null!=r?r:t.samplingMode,n=null!=n?n:t.type,o=null!=o?o:t.format,-1===n&&(n=_0x333f62.TEXTURETYPE_UNSIGNED_BYTE),new Promise((function(s){var l=new _PostProcesses_postProcess__WEBPACK_IMPORTED_MODULE_4__.PostProcess("postprocess",e,null,null,1,null,r,a,!1,void 0,n,void 0,null,!1,o);l.externalTextureSamplerBinding=!0;var u=a.createRenderTargetTexture({width:t.width,height:t.height},{generateDepthBuffer:!1,generateMipMaps:!1,generateStencilBuffer:!1,samplingMode:r,type:n,format:o});l.getEffect().executeWhenCompiled((function(){l.onApply=function(e){e._bindTexture("textureSampler",t),e.setFloat2("scale",1,1)},i.postProcessManager.directRender([l],u,!0),a.restoreDefaultFramebuffer(),a._releaseTexture(t),l&&l.dispose(),u._swapAndDie(t),t.type=n,t.format=_0x333f62.TEXTUREFORMAT_RGBA,t.isReady=!0,s(t)}))}))}function _0x17e77f(e){!_0x28f552&&(_0x28f552=new Float32Array(1),_0x2ce3e5=new Int32Array(_0x28f552.buffer)),_0x28f552[0]=e;var t=_0x2ce3e5[0],i=t>>16&32768,n=t>>12&2047,r=t>>23&255;return r<103?i:r>142?(i|=31744,i|=(255==r?0:1)&&8388607&t):r<113?i|=((n|=2048)>>114-r)+(n>>113-r&1):(i|=r-112<<10|n>>1,i+=1&n)}function _0x185fb9(e){var t=(32768&e)>>15,i=(31744&e)>>10,n=1023&e;return 0===i?(t?-1:1)*Math.pow(2,-14)*(n/Math.pow(2,10)):31==i?n?NaN:1/0*(t?-1:1):(t?-1:1)*Math.pow(2,i-15)*(1+n/Math.pow(2,10))}_0x18de9f();var _0x2314f2={CreateResizedCopy:_0x253b1a,ApplyPostProcess:_0x2a94e0,ToHalfFloat:_0x17e77f,FromHalfFloat:_0x185fb9},_0x33e56b=(_0x487147=!0,function(e,t){var i=_0x487147?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x487147=!1,i}),_0xca9c5e=_0x33e56b(void 0,(function(){return _0xca9c5e.toString().search("(((.+)+)+)+$").toString().constructor(_0xca9c5e).search("(((.+)+)+)+$")})),_0x487147;function _0x168153(e){void 0===e&&(e=!0),this._isDepthTestDirty=!1,this._isDepthMaskDirty=!1,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1,e&&this.reset()}_0xca9c5e(),Object.defineProperty(_0x168153.prototype,"isDirty",{get:function(){return this._isDepthFuncDirty||this._isDepthTestDirty||this._isDepthMaskDirty||this._isCullFaceDirty||this._isCullDirty||this._isZOffsetDirty||this._isFrontFaceDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"zOffset",{get:function(){return this._zOffset},set:function(e){this._zOffset!==e&&(this._zOffset=e,this._isZOffsetDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"zOffsetUnits",{get:function(){return this._zOffsetUnits},set:function(e){this._zOffsetUnits!==e&&(this._zOffsetUnits=e,this._isZOffsetDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"cullFace",{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,this._isCullFaceDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"cull",{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this._isCullDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"depthFunc",{get:function(){return this._depthFunc},set:function(e){this._depthFunc!==e&&(this._depthFunc=e,this._isDepthFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"depthMask",{get:function(){return this._depthMask},set:function(e){this._depthMask!==e&&(this._depthMask=e,this._isDepthMaskDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"depthTest",{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._isDepthTestDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x168153.prototype,"frontFace",{get:function(){return this._frontFace},set:function(e){this._frontFace!==e&&(this._frontFace=e,this._isFrontFaceDirty=!0)},enumerable:!1,configurable:!0}),_0x168153.prototype.reset=function(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._zOffsetUnits=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!0,this._isFrontFaceDirty=!1},_0x168153.prototype.apply=function(e){this.isDirty&&(this._isCullDirty&&(this.cull?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this._isCullDirty=!1),this._isCullFaceDirty&&(e.cullFace(this.cullFace),this._isCullFaceDirty=!1),this._isDepthMaskDirty&&(e.depthMask(this.depthMask),this._isDepthMaskDirty=!1),this._isDepthTestDirty&&(this.depthTest?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this._isDepthTestDirty=!1),this._isDepthFuncDirty&&(e.depthFunc(this.depthFunc),this._isDepthFuncDirty=!1),this._isZOffsetDirty&&(this.zOffset||this.zOffsetUnits?(e.enable(e.POLYGON_OFFSET_FILL),e.polygonOffset(this.zOffset,this.zOffsetUnits)):e.disable(e.POLYGON_OFFSET_FILL),this._isZOffsetDirty=!1),this._isFrontFaceDirty&&(e.frontFace(this.frontFace),this._isFrontFaceDirty=!1))};var _0x3416e8=(_0x48556d=!0,function(e,t){var i=_0x48556d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x48556d=!1,i}),_0x511188=_0x3416e8(void 0,(function(){return _0x511188.toString().search("(((.+)+)+)+$").toString().constructor(_0x511188).search("(((.+)+)+)+$")})),_0x48556d;function _0x4ad628(){this._blendFunctionParameters=new Array(4),this._blendEquationParameters=new Array(2),this._blendConstants=new Array(4),this._isBlendConstantsDirty=!1,this._alphaBlend=!1,this._isAlphaBlendDirty=!1,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this.reset()}_0x511188(),Object.defineProperty(_0x4ad628.prototype,"isDirty",{get:function(){return this._isAlphaBlendDirty||this._isBlendFunctionParametersDirty||this._isBlendEquationParametersDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4ad628.prototype,"alphaBlend",{get:function(){return this._alphaBlend},set:function(e){this._alphaBlend!==e&&(this._alphaBlend=e,this._isAlphaBlendDirty=!0)},enumerable:!1,configurable:!0}),_0x4ad628.prototype.setAlphaBlendConstants=function(e,t,i,n){this._blendConstants[0]===e&&this._blendConstants[1]===t&&this._blendConstants[2]===i&&this._blendConstants[3]===n||(this._blendConstants[0]=e,this._blendConstants[1]=t,this._blendConstants[2]=i,this._blendConstants[3]=n,this._isBlendConstantsDirty=!0)},_0x4ad628.prototype.setAlphaBlendFunctionParameters=function(e,t,i,n){this._blendFunctionParameters[0]===e&&this._blendFunctionParameters[1]===t&&this._blendFunctionParameters[2]===i&&this._blendFunctionParameters[3]===n||(this._blendFunctionParameters[0]=e,this._blendFunctionParameters[1]=t,this._blendFunctionParameters[2]=i,this._blendFunctionParameters[3]=n,this._isBlendFunctionParametersDirty=!0)},_0x4ad628.prototype.setAlphaEquationParameters=function(e,t){this._blendEquationParameters[0]===e&&this._blendEquationParameters[1]===t||(this._blendEquationParameters[0]=e,this._blendEquationParameters[1]=t,this._isBlendEquationParametersDirty=!0)},_0x4ad628.prototype.reset=function(){this._alphaBlend=!1,this._blendFunctionParameters[0]=null,this._blendFunctionParameters[1]=null,this._blendFunctionParameters[2]=null,this._blendFunctionParameters[3]=null,this._blendEquationParameters[0]=null,this._blendEquationParameters[1]=null,this._blendConstants[0]=null,this._blendConstants[1]=null,this._blendConstants[2]=null,this._blendConstants[3]=null,this._isAlphaBlendDirty=!0,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1},_0x4ad628.prototype.apply=function(e){this.isDirty&&(this._isAlphaBlendDirty&&(this._alphaBlend?e.enable(e.BLEND):e.disable(e.BLEND),this._isAlphaBlendDirty=!1),this._isBlendFunctionParametersDirty&&(e.blendFuncSeparate(this._blendFunctionParameters[0],this._blendFunctionParameters[1],this._blendFunctionParameters[2],this._blendFunctionParameters[3]),this._isBlendFunctionParametersDirty=!1),this._isBlendEquationParametersDirty&&(e.blendEquationSeparate(this._blendEquationParameters[0],this._blendEquationParameters[1]),this._isBlendEquationParametersDirty=!1),this._isBlendConstantsDirty&&(e.blendColor(this._blendConstants[0],this._blendConstants[1],this._blendConstants[2],this._blendConstants[3]),this._isBlendConstantsDirty=!1))};var _0x39e5d5=(_0x422ced=!0,function(e,t){var i=_0x422ced?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x422ced=!1,i}),_0x39515e=_0x39e5d5(void 0,(function(){return _0x39515e.toString().search("(((.+)+)+)+$").toString().constructor(_0x39515e).search("(((.+)+)+)+$")})),_0x422ced;function IsWindowObjectExist(){return"undefined"!=typeof window}function IsDocumentAvailable(){return"undefined"!=typeof document}function GetDOMTextContent(e){for(var t="",i=e.firstChild;i;)3===i.nodeType&&(t+=i.textContent),i=i.nextSibling;return t}_0x39515e();var _0x8da745=(_0x2d7be5=!0,function(e,t){var i=_0x2d7be5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d7be5=!1,i}),_0x5cc0e3=_0x8da745(void 0,(function(){return _0x5cc0e3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5cc0e3).search("(((.+)+)+)+$")})),_0x2d7be5;function _0x588382(e){void 0===e&&(e=!0),this._isStencilTestDirty=!1,this._isStencilMaskDirty=!1,this._isStencilFuncDirty=!1,this._isStencilOpDirty=!1,this.useStencilGlobalOnly=!1,e&&this.reset()}_0x5cc0e3(),Object.defineProperty(_0x588382.prototype,"isDirty",{get:function(){return this._isStencilTestDirty||this._isStencilMaskDirty||this._isStencilFuncDirty||this._isStencilOpDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"func",{get:function(){return this._func},set:function(e){this._func!==e&&(this._func=e,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"funcRef",{get:function(){return this._funcRef},set:function(e){this._funcRef!==e&&(this._funcRef=e,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"funcMask",{get:function(){return this._funcMask},set:function(e){this._funcMask!==e&&(this._funcMask=e,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"opStencilFail",{get:function(){return this._opStencilFail},set:function(e){this._opStencilFail!==e&&(this._opStencilFail=e,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"opDepthFail",{get:function(){return this._opDepthFail},set:function(e){this._opDepthFail!==e&&(this._opDepthFail=e,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"opStencilDepthPass",{get:function(){return this._opStencilDepthPass},set:function(e){this._opStencilDepthPass!==e&&(this._opStencilDepthPass=e,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask!==e&&(this._mask=e,this._isStencilMaskDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x588382.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,this._isStencilTestDirty=!0)},enumerable:!1,configurable:!0}),_0x588382.prototype.reset=function(){var e;this.stencilMaterial=void 0,null===(e=this.stencilGlobal)||void 0===e||e.reset(),this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0},_0x588382.prototype.apply=function(e){var t;if(e){var i=!this.useStencilGlobalOnly&&!!(null===(t=this.stencilMaterial)||void 0===t?void 0:t.enabled);this.enabled=i?this.stencilMaterial.enabled:this.stencilGlobal.enabled,this.func=i?this.stencilMaterial.func:this.stencilGlobal.func,this.funcRef=i?this.stencilMaterial.funcRef:this.stencilGlobal.funcRef,this.funcMask=i?this.stencilMaterial.funcMask:this.stencilGlobal.funcMask,this.opStencilFail=i?this.stencilMaterial.opStencilFail:this.stencilGlobal.opStencilFail,this.opDepthFail=i?this.stencilMaterial.opDepthFail:this.stencilGlobal.opDepthFail,this.opStencilDepthPass=i?this.stencilMaterial.opStencilDepthPass:this.stencilGlobal.opStencilDepthPass,this.mask=i?this.stencilMaterial.mask:this.stencilGlobal.mask,this.isDirty&&(this._isStencilTestDirty&&(this.enabled?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this._isStencilTestDirty=!1),this._isStencilMaskDirty&&(e.stencilMask(this.mask),this._isStencilMaskDirty=!1),this._isStencilFuncDirty&&(e.stencilFunc(this.func,this.funcRef,this.funcMask),this._isStencilFuncDirty=!1),this._isStencilOpDirty&&(e.stencilOp(this.opStencilFail,this.opDepthFail,this.opStencilDepthPass),this._isStencilOpDirty=!1))}};var _0xcc19c2=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));return i(),function(){}}();function _0x265690(e,t,i,n){var r=this;this._name="WebGL",this.forcePOTTextures=!1,this.isFullscreen=!1,this.cullBackFaces=null,this.renderEvenInBackground=!0,this.preventCacheWipeBetweenFrames=!1,this.validateShaderPrograms=!1,this._useReverseDepthBuffer=!1,this.isNDCHalfZRange=!1,this.hasOriginBottomLeft=!0,this.disableUniformBuffers=!1,this.onDisposeObservable=new Observable,this._frameId=0,this._uniformBuffers=new Array,this._storageBuffers=new Array,this._webGLVersion=1,this._windowIsBackground=!1,this._highPrecisionShadersAllowed=!0,this._badOS=!1,this._badDesktopOS=!1,this._renderingQueueLaunched=!1,this._activeRenderLoops=new Array,this.onContextLostObservable=new Observable,this.onContextRestoredObservable=new Observable,this._contextWasLost=!1,this._doNotHandleContextLost=!1,this.disableVertexArrayObjects=!1,this._colorWrite=!0,this._colorWriteChanged=!0,this._depthCullingState=new _0x168153,this._stencilStateComposer=new _0x588382,this._stencilState=new _0x4257c2,this._alphaState=new _0x4ad628,this._alphaMode=_0x333f62.ALPHA_ADD,this._alphaEquation=_0x333f62.ALPHA_DISABLE,this._internalTexturesCache=new Array,this._renderTargetWrapperCache=new Array,this._activeChannel=0,this._currentTextureChannel=-1,this._boundTexturesCache={},this._compiledEffects={},this._vertexAttribArraysEnabled=[],this._uintIndicesCurrentlySet=!1,this._currentBoundBuffer=new Array,this._currentFramebuffer=null,this._dummyFramebuffer=null,this._currentBufferPointers=new Array,this._currentInstanceLocations=new Array,this._currentInstanceBuffers=new Array,this._vaoRecordInProgress=!1,this._mustWipeVertexAttributes=!1,this._nextFreeTextureSlots=new Array,this._maxSimultaneousTextures=0,this._maxMSAASamplesOverride=null,this._activeRequests=new Array,this._adaptToDeviceRatio=!1,this._transformTextureUrl=null,this.hostInformation={isMobile:!1},this.premultipliedAlpha=!0,this.onBeforeTextureInitObservable=new Observable,this._isWebGPU=!1,this._snapshotRenderingMode=_0x333f62.SNAPSHOTRENDERING_STANDARD,this._viewportCached={x:0,y:0,z:0,w:0},this._unpackFlipYCached=null,this.enableUnpackFlipYCached=!0,this._boundUniforms={};var o=null;if(i=i||{},this._creationOptions=i,this._adaptToDeviceRatio=null!=n&&n,this._stencilStateComposer.stencilGlobal=this._stencilState,_0x2fa08c.SetMatrixPrecision(!!i.useHighPrecisionMatrix),e){if(n=n||i.adaptToDeviceRatio||!1,e.getContext){if(o=e,this._renderingCanvas=o,void 0!==t&&(i.antialias=t),void 0===i.deterministicLockstep&&(i.deterministicLockstep=!1),void 0===i.lockstepMaxSteps&&(i.lockstepMaxSteps=4),void 0===i.timeStep&&(i.timeStep=1/60),void 0===i.preserveDrawingBuffer&&(i.preserveDrawingBuffer=!1),void 0===i.audioEngine&&(i.audioEngine=!0),void 0!==i.audioEngineOptions&&void 0!==i.audioEngineOptions.audioContext&&(this._audioContext=i.audioEngineOptions.audioContext),void 0!==i.audioEngineOptions&&void 0!==i.audioEngineOptions.audioDestination&&(this._audioDestination=i.audioEngineOptions.audioDestination),void 0===i.stencil&&(i.stencil=!0),!1===i.premultipliedAlpha&&(this.premultipliedAlpha=!1),void 0===i.xrCompatible&&(i.xrCompatible=!0),this._doNotHandleContextLost=!!i.doNotHandleContextLost,navigator&&navigator.userAgent){this._checkForMobile=function(){var e=navigator.userAgent;r.hostInformation.isMobile=-1!==e.indexOf("Mobile")||-1!==e.indexOf("Mac")&&IsDocumentAvailable()&&"ontouchend"in document},this._checkForMobile(),IsWindowObjectExist()&&window.addEventListener("resize",this._checkForMobile);for(var a=navigator.userAgent,s=0,l=_0x265690.ExceptionList;s<l.length;s++){var u=l[s],c=u.key,h=u.targets;if(new RegExp(c).test(a)){if(u.capture&&u.captureConstraint){var d=u.capture,f=u.captureConstraint,p=new RegExp(d).exec(a);if(p&&p.length>0)if(parseInt(p[p.length-1])>=f)continue}for(var _=0,m=h;_<m.length;_++){switch(m[_]){case"uniformBuffer":this.disableUniformBuffers=!0;break;case"vao":this.disableVertexArrayObjects=!0;break;case"antialias":i.antialias=!1;break;case"maxMSAASamples":this._maxMSAASamplesOverride=1}}}}}if(!this._doNotHandleContextLost&&(this._onContextLost=function(e){e.preventDefault(),r._contextWasLost=!0,_0x50f23a.Warn("WebGL context lost."),r.onContextLostObservable.notifyObservers(r)},this._onContextRestored=function(){r._restoreEngineAfterContextLost(r._initGLContext.bind(r))},o.addEventListener("webglcontextlost",this._onContextLost,!1),o.addEventListener("webglcontextrestored",this._onContextRestored,!1),i.powerPreference="high-performance"),this._badDesktopOS=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),this._badDesktopOS&&(i.xrCompatible=!1),!i.disableWebGL2Support)try{this._gl=o.getContext("webgl2",i)||o.getContext("experimental-webgl2",i),this._gl&&(this._webGLVersion=2,this._shaderPlatformName="WEBGL2",!this._gl.deleteQuery&&(this._webGLVersion=1,this._shaderPlatformName="WEBGL1"))}catch(e){}if(!this._gl){if(!o)throw new Error("The provided canvas is null or undefined.");try{this._gl=o.getContext("webgl",i)||o.getContext("experimental-webgl",i)}catch(e){throw new Error("WebGL not supported")}}if(!this._gl)throw new Error("WebGL not supported")}else{this._gl=e,this._renderingCanvas=this._gl.canvas,this._gl.renderbufferStorageMultisample?(this._webGLVersion=2,this._shaderPlatformName="WEBGL2"):this._shaderPlatformName="WEBGL1";var g=this._gl.getContextAttributes();g&&(i.stencil=g.stencil)}this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),void 0!==i.useHighPrecisionFloats&&(this._highPrecisionShadersAllowed=i.useHighPrecisionFloats);var x=IsWindowObjectExist()&&window.devicePixelRatio||1,y=i.limitDeviceRatio||x;this._hardwareScalingLevel=n?1/Math.min(y,x):1,this.resize(),this._isStencilEnable=!!i.stencil,this._initGLContext(),this._initFeatures();for(var v=0;v<this._caps.maxVertexAttribs;v++)this._currentBufferPointers[v]=new _0xcc19c2;this._shaderProcessor=this.webGLVersion>1?new _WebGL_webGL2ShaderProcessors__WEBPACK_IMPORTED_MODULE_13__.WebGL2ShaderProcessor:new _WebGL_webGLShaderProcessors__WEBPACK_IMPORTED_MODULE_12__.WebGLShaderProcessor,this._badOS=/iPad/i.test(navigator.userAgent)||/iPhone/i.test(navigator.userAgent);var $="Babylon.js v".concat(_0x265690.Version);console.log($+" - ".concat(this.description)),this._renderingCanvas&&this._renderingCanvas.setAttribute&&this._renderingCanvas.setAttribute("data-engine",$)}}Object.defineProperty(_0x265690,"NpmPackage",{get:function(){return"babylonjs@5.9.0"},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690,"Version",{get:function(){return"5.9.0"},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"description",{get:function(){var e=this.name+this.webGLVersion;return this._caps.parallelShaderCompile&&(e+=" - Parallel shader compilation"),e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"version",{get:function(){return this._webGLVersion},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690,"ShadersRepository",{get:function(){return _Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ShadersRepository},set:function(e){_Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ShadersRepository=e},enumerable:!1,configurable:!0}),_0x265690.prototype._getShaderProcessor=function(e){return this._shaderProcessor},Object.defineProperty(_0x265690.prototype,"useReverseDepthBuffer",{get:function(){return this._useReverseDepthBuffer},set:function(e){e!==this._useReverseDepthBuffer&&(this._useReverseDepthBuffer=e,this._depthCullingState.depthFunc=e?_0x333f62.GEQUAL:_0x333f62.LEQUAL)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"frameId",{get:function(){return this._frameId},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"supportsUniformBuffers",{get:function(){return this.webGLVersion>1&&!this.disableUniformBuffers},enumerable:!1,configurable:!0}),_0x265690.prototype.getCreationOptions=function(){return this._creationOptions},Object.defineProperty(_0x265690.prototype,"_shouldUseHighPrecisionShader",{get:function(){return!(!this._caps.highPrecisionShaderSupported||!this._highPrecisionShadersAllowed)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"needPOTTextures",{get:function(){return this._webGLVersion<2||this.forcePOTTextures},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"activeRenderLoops",{get:function(){return this._activeRenderLoops},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"doNotHandleContextLost",{get:function(){return this._doNotHandleContextLost},set:function(e){this._doNotHandleContextLost=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"_supportsHardwareTextureRescaling",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"framebufferDimensionsObject",{set:function(e){this._framebufferDimensionsObject=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"currentViewport",{get:function(){return this._cachedViewport},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"emptyTexture",{get:function(){return!this._emptyTexture&&(this._emptyTexture=this.createRawTexture(new Uint8Array(4),1,1,_0x333f62.TEXTUREFORMAT_RGBA,!1,!1,_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"emptyTexture3D",{get:function(){return!this._emptyTexture3D&&(this._emptyTexture3D=this.createRawTexture3D(new Uint8Array(4),1,1,1,_0x333f62.TEXTUREFORMAT_RGBA,!1,!1,_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture3D},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"emptyTexture2DArray",{get:function(){return!this._emptyTexture2DArray&&(this._emptyTexture2DArray=this.createRawTexture2DArray(new Uint8Array(4),1,1,1,_0x333f62.TEXTUREFORMAT_RGBA,!1,!1,_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture2DArray},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"emptyCubeTexture",{get:function(){if(!this._emptyCubeTexture){var e=new Uint8Array(4),t=[e,e,e,e,e,e];this._emptyCubeTexture=this.createRawCubeTexture(t,1,_0x333f62.TEXTUREFORMAT_RGBA,_0x333f62.TEXTURETYPE_UNSIGNED_INT,!1,!1,_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE)}return this._emptyCubeTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"isWebGPU",{get:function(){return this._isWebGPU},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"shaderPlatformName",{get:function(){return this._shaderPlatformName},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"snapshotRendering",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"snapshotRenderingMode",{get:function(){return this._snapshotRenderingMode},set:function(e){this._snapshotRenderingMode=e},enumerable:!1,configurable:!0}),_0x265690.prototype.snapshotRenderingReset=function(){this.snapshotRendering=!1},_0x265690._CreateCanvas=function(e,t){if("undefined"==typeof document)return new OffscreenCanvas(e,t);var i=document.createElement("canvas");return i.width=e,i.height=t,i},_0x265690.prototype.createCanvas=function(e,t){return _0x265690._CreateCanvas(e,t)},_0x265690.prototype.createCanvasImage=function(){return document.createElement("img")},_0x265690.prototype._restoreEngineAfterContextLost=function(e){var t=this;setTimeout((function(){return(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(t,void 0,void 0,(function(){var t,i,n,r,o;return(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this,(function(a){switch(a.label){case 0:return this._dummyFramebuffer=null,t=this._depthCullingState.depthTest,i=this._depthCullingState.depthFunc,n=this._depthCullingState.depthMask,r=this._stencilState.stencilTest,[4,e()];case 1:return a.sent(),this._rebuildEffects(),null===(o=this._rebuildComputeEffects)||void 0===o||o.call(this),this._rebuildInternalTextures(),this._rebuildRenderTargetWrappers(),this._rebuildBuffers(),this.wipeCaches(!0),this._depthCullingState.depthTest=t,this._depthCullingState.depthFunc=i,this._depthCullingState.depthMask=n,this._stencilState.stencilTest=r,_0x50f23a.Warn(this.name+" context successfully restored."),this.onContextRestoredObservable.notifyObservers(this),this._contextWasLost=!1,[2]}}))}))}),0)},_0x265690.prototype._sharedInit=function(e,t,i){this._renderingCanvas=e},_0x265690.prototype._getShaderProcessingContext=function(e){return null},_0x265690.prototype._rebuildInternalTextures=function(){for(var e=0,t=this._internalTexturesCache.slice();e<t.length;e++){t[e]._rebuild()}},_0x265690.prototype._rebuildRenderTargetWrappers=function(){for(var e=0,t=this._renderTargetWrapperCache.slice();e<t.length;e++){t[e]._rebuild()}},_0x265690.prototype._rebuildEffects=function(){for(var e in this._compiledEffects){var t=this._compiledEffects[e];t._pipelineContext=null,t._wasPreviouslyReady=!1,t._prepareEffect()}_Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ResetCache()},_0x265690.prototype.areAllEffectsReady=function(){for(var e in this._compiledEffects){if(!this._compiledEffects[e].isReady())return!1}return!0},_0x265690.prototype._rebuildBuffers=function(){for(var e=0,t=this._uniformBuffers;e<t.length;e++){t[e]._rebuild()}for(var i=0,n=this._storageBuffers;i<n.length;i++){n[i]._rebuild()}},_0x265690.prototype._initGLContext=function(){this._caps={maxTexturesImageUnits:this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),maxCombinedTexturesImageUnits:this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),maxVertexTextureImageUnits:this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxTextureSize:this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),maxSamples:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile")||void 0,standardDerivatives:this._webGLVersion>1||null!==this._gl.getExtension("OES_standard_derivatives"),maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),s3tc_srgb:this._gl.getExtension("WEBGL_compressed_texture_s3tc_srgb")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc_srgb"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||null!==this._gl.getExtension("OES_element_index_uint"),fragmentDepthSupported:this._webGLVersion>1||null!==this._gl.getExtension("EXT_frag_depth"),highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),supportOcclusionQuery:this._webGLVersion>1,canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float")),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1,canUseGLInstanceID:this._webGLVersion>1,canUseGLVertexID:this._webGLVersion>1,supportComputeShaders:!1,supportSRGBBuffers:!1,supportTransformFeedbacks:this._webGLVersion>1,textureMaxLevel:this._webGLVersion>1,texture2DArrayMaxLayerCount:this._webGLVersion>1?256:128},this._glVersion=this._gl.getParameter(this._gl.VERSION);var e=this._gl.getExtension("WEBGL_debug_renderer_info");if(null!=e&&(this._glRenderer=this._gl.getParameter(e.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(e.UNMASKED_VENDOR_WEBGL)),!this._glVendor&&(this._glVendor=this._gl.getParameter(this._gl.VENDOR)||"Unknown vendor"),!this._glRenderer&&(this._glRenderer=this._gl.getParameter(this._gl.RENDERER)||"Unknown renderer"),36193!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=36193),34842!==this._gl.RGBA16F&&(this._gl.RGBA16F=34842),34836!==this._gl.RGBA32F&&(this._gl.RGBA32F=34836),35056!==this._gl.DEPTH24_STENCIL8&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(1===this._webGLVersion&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!(!this._caps.textureFloat||!this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!(!this._caps.textureFloat||!this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._caps.astc&&(this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR),this._caps.bptc&&(this._gl.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=this._caps.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT),this._caps.s3tc_srgb&&(this._gl.COMPRESSED_SRGB_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT),this._caps.etc2&&(this._gl.COMPRESSED_SRGB8_ETC2=this._caps.etc2.COMPRESSED_SRGB8_ETC2,this._gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=this._caps.etc2.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC),this._webGLVersion>1&&5131!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=null!==this._maxMSAASamplesOverride?this._maxMSAASamplesOverride:this._gl.getParameter(this._gl.MAX_SAMPLES);else{var t=this._gl.getExtension("WEBGL_draw_buffers");if(null!==t){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=t.drawBuffersWEBGL.bind(t),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(var i=0;i<16;i++)this._gl["COLOR_ATTACHMENT"+i+"_WEBGL"]=t["COLOR_ATTACHMENT"+i+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{var n=this._gl.getExtension("WEBGL_depth_texture");null!=n&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=n.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{var r=this._gl.getExtension("OES_vertex_array_object");null!=r&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=r.createVertexArrayOES.bind(r),this._gl.bindVertexArray=r.bindVertexArrayOES.bind(r),this._gl.deleteVertexArray=r.deleteVertexArrayOES.bind(r))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{var o=this._gl.getExtension("ANGLE_instanced_arrays");null!=o?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=o.drawArraysInstancedANGLE.bind(o),this._gl.drawElementsInstanced=o.drawElementsInstancedANGLE.bind(o),this._gl.vertexAttribDivisor=o.vertexAttribDivisorANGLE.bind(o)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){var a=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),s=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);a&&s&&(this._caps.highPrecisionShaderSupported=0!==a.precision&&0!==s.precision)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{var l=this._gl.getExtension("EXT_blend_minmax");null!=l&&(this._caps.blendMinMax=!0,this._gl.MAX=l.MAX_EXT,this._gl.MIN=l.MIN_EXT)}if(!this._caps.supportSRGBBuffers){if(this._webGLVersion>1)this._caps.supportSRGBBuffers=!0;else{var u=this._gl.getExtension("EXT_sRGB");null!=u&&(this._caps.supportSRGBBuffers=!0,this._gl.SRGB=u.SRGB_EXT,this._gl.SRGB8=u.SRGB_ALPHA_EXT,this._gl.SRGB8_ALPHA8=u.SRGB_ALPHA_EXT)}this._caps.supportSRGBBuffers=this._caps.supportSRGBBuffers&&!(!this._creationOptions||!this._creationOptions.forceSRGBBufferSupportState)}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(var c=0;c<this._maxSimultaneousTextures;c++)this._nextFreeTextureSlots.push(c)},_0x265690.prototype._initFeatures=function(){this._features={forceBitmapOverHTMLImageElement:!1,supportRenderAndCopyToLodForFloatTextures:1!==this._webGLVersion,supportDepthStencilTexture:1!==this._webGLVersion,supportShadowSamplers:1!==this._webGLVersion,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:1!==this._webGLVersion,trackUbosInFrame:!1,checkUbosContentBeforeUpload:!1,supportCSM:1!==this._webGLVersion,basisNeedsPOT:1===this._webGLVersion,support3DTextures:1!==this._webGLVersion,needTypeSuffixInShaderConstants:1!==this._webGLVersion,supportMSAA:1!==this._webGLVersion,supportSSAO2:1!==this._webGLVersion,supportExtendedTextureFormats:1!==this._webGLVersion,supportSwitchCaseInShader:1!==this._webGLVersion,supportSyncTextureRead:!0,needsInvertingBitmap:!0,useUBOBindingCache:!0,needShaderCodeInlining:!1,needToAlwaysBindUniformBuffers:!1,supportRenderPasses:!1,_collectUbosUpdatedInFrame:!1}},Object.defineProperty(_0x265690.prototype,"webGLVersion",{get:function(){return this._webGLVersion},enumerable:!1,configurable:!0}),_0x265690.prototype.getClassName=function(){return"ThinEngine"},Object.defineProperty(_0x265690.prototype,"isStencilEnable",{get:function(){return this._isStencilEnable},enumerable:!1,configurable:!0}),_0x265690.prototype._prepareWorkingCanvas=function(){if(!this._workingCanvas){this._workingCanvas=this.createCanvas(1,1);var e=this._workingCanvas.getContext("2d");e&&(this._workingContext=e)}},_0x265690.prototype.resetTextureCache=function(){for(var e in this._boundTexturesCache)Object.prototype.hasOwnProperty.call(this._boundTexturesCache,e)&&(this._boundTexturesCache[e]=null);this._currentTextureChannel=-1},_0x265690.prototype.getInfo=function(){return this.getGlInfo()},_0x265690.prototype.getGlInfo=function(){return{vendor:this._glVendor,renderer:this._glRenderer,version:this._glVersion}},_0x265690.prototype.setHardwareScalingLevel=function(e){this._hardwareScalingLevel=e,this.resize()},_0x265690.prototype.getHardwareScalingLevel=function(){return this._hardwareScalingLevel},_0x265690.prototype.getLoadedTexturesCache=function(){return this._internalTexturesCache},_0x265690.prototype.getCaps=function(){return this._caps},_0x265690.prototype.stopRenderLoop=function(e){if(e){var t=this._activeRenderLoops.indexOf(e);t>=0&&this._activeRenderLoops.splice(t,1)}else this._activeRenderLoops=[]},_0x265690.prototype._renderLoop=function(){if(!this._contextWasLost){var e=!0;if(!this.renderEvenInBackground&&this._windowIsBackground&&(e=!1),e){this.beginFrame();for(var t=0;t<this._activeRenderLoops.length;t++){(0,this._activeRenderLoops[t])()}this.endFrame()}}this._activeRenderLoops.length>0?this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},_0x265690.prototype.getRenderingCanvas=function(){return this._renderingCanvas},_0x265690.prototype.getAudioContext=function(){return this._audioContext},_0x265690.prototype.getAudioDestination=function(){return this._audioDestination},_0x265690.prototype.getHostWindow=function(){return IsWindowObjectExist()?this._renderingCanvas&&this._renderingCanvas.ownerDocument&&this._renderingCanvas.ownerDocument.defaultView?this._renderingCanvas.ownerDocument.defaultView:window:null},_0x265690.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth},_0x265690.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight},_0x265690.prototype._queueNewFrame=function(e,t){return _0x265690.QueueNewFrame(e,t)},_0x265690.prototype.runRenderLoop=function(e){-1===this._activeRenderLoops.indexOf(e)&&(this._activeRenderLoops.push(e),!this._renderingQueueLaunched&&(this._renderingQueueLaunched=!0,this._boundRenderFunction=this._renderLoop.bind(this),this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow())))},_0x265690.prototype.clear=function(e,t,i,n){void 0===n&&(n=!1);var r=this.stencilStateComposer.useStencilGlobalOnly;this.stencilStateComposer.useStencilGlobalOnly=!0,this.applyStates(),this.stencilStateComposer.useStencilGlobalOnly=r;var o=0;t&&e&&(this._gl.clearColor(e.r,e.g,e.b,void 0!==e.a?e.a:1),o|=this._gl.COLOR_BUFFER_BIT),i&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GEQUAL,this._gl.clearDepth(0)):this._gl.clearDepth(1),o|=this._gl.DEPTH_BUFFER_BIT),n&&(this._gl.clearStencil(0),o|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(o)},_0x265690.prototype._viewport=function(e,t,i,n){(e!==this._viewportCached.x||t!==this._viewportCached.y||i!==this._viewportCached.z||n!==this._viewportCached.w)&&(this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=i,this._viewportCached.w=n,this._gl.viewport(e,t,i,n))},_0x265690.prototype.setViewport=function(e,t,i){var n=t||this.getRenderWidth(),r=i||this.getRenderHeight(),o=e.x||0,a=e.y||0;this._cachedViewport=e,this._viewport(o*n,a*r,n*e.width,r*e.height)},_0x265690.prototype.beginFrame=function(){},_0x265690.prototype.endFrame=function(){this._badOS&&this.flushFramebuffer(),this._frameId++},_0x265690.prototype.resize=function(e){var t,i;if(void 0===e&&(e=!1),this._adaptToDeviceRatio){var n=IsWindowObjectExist()&&window.devicePixelRatio||1,r=this._creationOptions.limitDeviceRatio||n;this._hardwareScalingLevel=this._adaptToDeviceRatio?1/Math.min(r,n):1}IsWindowObjectExist()?(t=this._renderingCanvas?this._renderingCanvas.clientWidth||this._renderingCanvas.width:window.innerWidth,i=this._renderingCanvas?this._renderingCanvas.clientHeight||this._renderingCanvas.height:window.innerHeight):(t=this._renderingCanvas?this._renderingCanvas.width:100,i=this._renderingCanvas?this._renderingCanvas.height:100),this.setSize(t/this._hardwareScalingLevel,i/this._hardwareScalingLevel,e)},_0x265690.prototype.setSize=function(e,t,i){return void 0===i&&(i=!1),!!this._renderingCanvas&&(e|=0,t|=0,!(!i&&this._renderingCanvas.width===e&&this._renderingCanvas.height===t)&&(this._renderingCanvas.width=e,this._renderingCanvas.height=t,!0))},_0x265690.prototype.bindFramebuffer=function(e,t,i,n,r,o,a){var s,l,u,c,h;void 0===t&&(t=0),void 0===o&&(o=0),void 0===a&&(a=0);var d=e;this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._bindUnboundFramebuffer(d._MSAAFramebuffer?d._MSAAFramebuffer:d._framebuffer);var f=this._gl;e.is2DArray?f.framebufferTextureLayer(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,null===(s=e.texture._hardwareTexture)||void 0===s?void 0:s.underlyingResource,o,a):e.isCube&&f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_CUBE_MAP_POSITIVE_X+t,null===(l=e.texture._hardwareTexture)||void 0===l?void 0:l.underlyingResource,o);var p=e._depthStencilTexture;if(p){var _=e._depthStencilTextureWithStencil?f.DEPTH_STENCIL_ATTACHMENT:f.DEPTH_ATTACHMENT;e.is2DArray?f.framebufferTextureLayer(f.FRAMEBUFFER,_,null===(u=p._hardwareTexture)||void 0===u?void 0:u.underlyingResource,o,a):e.isCube?f.framebufferTexture2D(f.FRAMEBUFFER,_,f.TEXTURE_CUBE_MAP_POSITIVE_X+t,null===(c=p._hardwareTexture)||void 0===c?void 0:c.underlyingResource,o):f.framebufferTexture2D(f.FRAMEBUFFER,_,f.TEXTURE_2D,null===(h=p._hardwareTexture)||void 0===h?void 0:h.underlyingResource,o)}this._cachedViewport&&!r?this.setViewport(this._cachedViewport,i,n):(!i&&(i=e.width,o&&(i/=Math.pow(2,o))),!n&&(n=e.height,o&&(n/=Math.pow(2,o))),this._viewport(0,0,i,n)),this.wipeCaches()},_0x265690.prototype.setState=function(e,t,i,n,r,o,a){var s,l;void 0===t&&(t=0),void 0===n&&(n=!1),void 0===a&&(a=0),(this._depthCullingState.cull!==e||i)&&(this._depthCullingState.cull=e);var u=null===(l=null!==(s=this.cullBackFaces)&&void 0!==s?s:r)||void 0===l||l?this._gl.BACK:this._gl.FRONT;(this._depthCullingState.cullFace!==u||i)&&(this._depthCullingState.cullFace=u),this.setZOffset(t),this.setZOffsetUnits(a);var c=n?this._gl.CW:this._gl.CCW;(this._depthCullingState.frontFace!==c||i)&&(this._depthCullingState.frontFace=c),this._stencilStateComposer.stencilMaterial=o},_0x265690.prototype.setZOffset=function(e){this._depthCullingState.zOffset=this.useReverseDepthBuffer?-e:e},_0x265690.prototype.getZOffset=function(){var e=this._depthCullingState.zOffset;return this.useReverseDepthBuffer?-e:e},_0x265690.prototype.setZOffsetUnits=function(e){this._depthCullingState.zOffsetUnits=this.useReverseDepthBuffer?-e:e},_0x265690.prototype.getZOffsetUnits=function(){var e=this._depthCullingState.zOffsetUnits;return this.useReverseDepthBuffer?-e:e},_0x265690.prototype._bindUnboundFramebuffer=function(e){this._currentFramebuffer!==e&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,e),this._currentFramebuffer=e)},_0x265690.prototype._currentFrameBufferIsDefaultFrameBuffer=function(){return null===this._currentFramebuffer},_0x265690.prototype.generateMipmaps=function(e){this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)},_0x265690.prototype.unBindFramebuffer=function(e,t,i){var n;void 0===t&&(t=!1);var r=e;this._currentRenderTarget=null;var o=this._gl;if(r._MSAAFramebuffer){if(e.isMulti)return void this.unBindMultiColorAttachmentFramebuffer(e,t,i);o.bindFramebuffer(o.READ_FRAMEBUFFER,r._MSAAFramebuffer),o.bindFramebuffer(o.DRAW_FRAMEBUFFER,r._framebuffer),o.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,o.COLOR_BUFFER_BIT,o.NEAREST)}(null===(n=e.texture)||void 0===n?void 0:n.generateMipMaps)&&!t&&!e.isCube&&this.generateMipmaps(e.texture),i&&(r._MSAAFramebuffer&&this._bindUnboundFramebuffer(r._framebuffer),i()),this._bindUnboundFramebuffer(null)},_0x265690.prototype.flushFramebuffer=function(){this._gl.flush()},_0x265690.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},_0x265690.prototype._resetVertexBufferBinding=function(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null},_0x265690.prototype.createVertexBuffer=function(e){return this._createVertexBuffer(e,this._gl.STATIC_DRAW)},_0x265690.prototype._createVertexBuffer=function(e,t){var i=this._gl.createBuffer();if(!i)throw new Error("Unable to create vertex buffer");var n=new _Meshes_WebGL_webGLDataBuffer__WEBPACK_IMPORTED_MODULE_14__.WebGLDataBuffer(i);return this.bindArrayBuffer(n),e instanceof Array?this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),t):this._gl.bufferData(this._gl.ARRAY_BUFFER,e,t),this._resetVertexBufferBinding(),n.references=1,n},_0x265690.prototype.createDynamicVertexBuffer=function(e){return this._createVertexBuffer(e,this._gl.DYNAMIC_DRAW)},_0x265690.prototype._resetIndexBufferBinding=function(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null},_0x265690.prototype.createIndexBuffer=function(e,t){var i=this._gl.createBuffer(),n=new _Meshes_WebGL_webGLDataBuffer__WEBPACK_IMPORTED_MODULE_14__.WebGLDataBuffer(i);if(!i)throw new Error("Unable to create index buffer");this.bindIndexBuffer(n);var r=this._normalizeIndexData(e);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,r,t?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),n.references=1,n.is32Bits=4===r.BYTES_PER_ELEMENT,n},_0x265690.prototype._normalizeIndexData=function(e){if(2===e.BYTES_PER_ELEMENT)return e;if(this._caps.uintIndices){if(e instanceof Uint32Array)return e;for(var t=0;t<e.length;t++)if(e[t]>=65535)return new Uint32Array(e);return new Uint16Array(e)}return new Uint16Array(e)},_0x265690.prototype.bindArrayBuffer=function(e){!this._vaoRecordInProgress&&this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ARRAY_BUFFER)},_0x265690.prototype.bindUniformBlock=function(e,t,i){var n=e.program,r=this._gl.getUniformBlockIndex(n,t);this._gl.uniformBlockBinding(n,r,i)},_0x265690.prototype.bindIndexBuffer=function(e){!this._vaoRecordInProgress&&this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ELEMENT_ARRAY_BUFFER)},_0x265690.prototype._bindBuffer=function(e,t){(this._vaoRecordInProgress||this._currentBoundBuffer[t]!==e)&&(this._gl.bindBuffer(t,e?e.underlyingResource:null),this._currentBoundBuffer[t]=e)},_0x265690.prototype.updateArrayBuffer=function(e){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,e)},_0x265690.prototype._vertexAttribPointer=function(e,t,i,n,r,o,a){var s=this._currentBufferPointers[t];if(s){var l=!1;s.active?(s.buffer!==e&&(s.buffer=e,l=!0),s.size!==i&&(s.size=i,l=!0),s.type!==n&&(s.type=n,l=!0),s.normalized!==r&&(s.normalized=r,l=!0),s.stride!==o&&(s.stride=o,l=!0),s.offset!==a&&(s.offset=a,l=!0)):(l=!0,s.active=!0,s.index=t,s.size=i,s.type=n,s.normalized=r,s.stride=o,s.offset=a,s.buffer=e),(l||this._vaoRecordInProgress)&&(this.bindArrayBuffer(e),this._gl.vertexAttribPointer(t,i,n,r,o,a))}},_0x265690.prototype._bindIndexBufferWithCache=function(e){null!=e&&this._cachedIndexBuffer!==e&&(this._cachedIndexBuffer=e,this.bindIndexBuffer(e),this._uintIndicesCurrentlySet=e.is32Bits)},_0x265690.prototype._bindVertexBuffersAttributes=function(e,t,i){var n=t.getAttributesNames();!this._vaoRecordInProgress&&this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var r=0;r<n.length;r++){var o=t.getAttributeLocation(r);if(o>=0){var a=n[r],s=null;if(i&&(s=i[a]),!s&&(s=e[a]),!s)continue;this._gl.enableVertexAttribArray(o),!this._vaoRecordInProgress&&(this._vertexAttribArraysEnabled[o]=!0);var l=s.getBuffer();l&&(this._vertexAttribPointer(l,o,s.getSize(),s.type,s.normalized,s.byteStride,s.byteOffset),s.getIsInstanced()&&(this._gl.vertexAttribDivisor(o,s.getInstanceDivisor()),!this._vaoRecordInProgress&&(this._currentInstanceLocations.push(o),this._currentInstanceBuffers.push(l))))}}},_0x265690.prototype.recordVertexArrayObject=function(e,t,i,n){var r=this._gl.createVertexArray();return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(r),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(e,i,n),this.bindIndexBuffer(t),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),r},_0x265690.prototype.bindVertexArrayObject=function(e,t){this._cachedVertexArrayObject!==e&&(this._cachedVertexArrayObject=e,this._gl.bindVertexArray(e),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=null!=t&&t.is32Bits,this._mustWipeVertexAttributes=!0)},_0x265690.prototype.bindBuffersDirectly=function(e,t,i,n,r){if(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==r){this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=r;var o=r.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var a=0,s=0;s<o;s++)if(s<i.length){var l=r.getAttributeLocation(s);l>=0&&(this._gl.enableVertexAttribArray(l),this._vertexAttribArraysEnabled[l]=!0,this._vertexAttribPointer(e,l,i[s],this._gl.FLOAT,!1,n,a)),a+=4*i[s]}}this._bindIndexBufferWithCache(t)},_0x265690.prototype._unbindVertexArrayObject=function(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))},_0x265690.prototype.bindBuffers=function(e,t,i,n){(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==i)&&(this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=i,this._bindVertexBuffersAttributes(e,i,n)),this._bindIndexBufferWithCache(t)},_0x265690.prototype.unbindInstanceAttributes=function(){for(var e,t=0,i=this._currentInstanceLocations.length;t<i;t++){var n=this._currentInstanceBuffers[t];e!=n&&n.references&&(e=n,this.bindArrayBuffer(n));var r=this._currentInstanceLocations[t];this._gl.vertexAttribDivisor(r,0)}this._currentInstanceBuffers.length=0,this._currentInstanceLocations.length=0},_0x265690.prototype.releaseVertexArrayObject=function(e){this._gl.deleteVertexArray(e)},_0x265690.prototype._releaseBuffer=function(e){return e.references--,0===e.references&&(this._deleteBuffer(e),!0)},_0x265690.prototype._deleteBuffer=function(e){this._gl.deleteBuffer(e.underlyingResource)},_0x265690.prototype.updateAndBindInstancesBuffer=function(e,t,i){if(this.bindArrayBuffer(e),t&&this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t),void 0!==i[0].index)this.bindInstancesBuffer(e,i,!0);else for(var n=0;n<4;n++){var r=i[n];!this._vertexAttribArraysEnabled[r]&&(this._gl.enableVertexAttribArray(r),this._vertexAttribArraysEnabled[r]=!0),this._vertexAttribPointer(e,r,4,this._gl.FLOAT,!1,64,16*n),this._gl.vertexAttribDivisor(r,1),this._currentInstanceLocations.push(r),this._currentInstanceBuffers.push(e)}},_0x265690.prototype.bindInstancesBuffer=function(e,t,i){void 0===i&&(i=!0),this.bindArrayBuffer(e);var n=0;if(i)for(var r=0;r<t.length;r++){n+=4*(o=t[r]).attributeSize}for(r=0;r<t.length;r++){var o;void 0===(o=t[r]).index&&(o.index=this._currentEffect.getAttributeLocationByName(o.attributeName)),o.index<0||(!this._vertexAttribArraysEnabled[o.index]&&(this._gl.enableVertexAttribArray(o.index),this._vertexAttribArraysEnabled[o.index]=!0),this._vertexAttribPointer(e,o.index,o.attributeSize,o.attributeType||this._gl.FLOAT,o.normalized||!1,n,o.offset),this._gl.vertexAttribDivisor(o.index,void 0===o.divisor?1:o.divisor),this._currentInstanceLocations.push(o.index),this._currentInstanceBuffers.push(e))}},_0x265690.prototype.disableInstanceAttributeByName=function(e){if(this._currentEffect){var t=this._currentEffect.getAttributeLocationByName(e);this.disableInstanceAttribute(t)}},_0x265690.prototype.disableInstanceAttribute=function(e){for(var t,i=!1;-1!==(t=this._currentInstanceLocations.indexOf(e));)this._currentInstanceLocations.splice(t,1),this._currentInstanceBuffers.splice(t,1),i=!0,t=this._currentInstanceLocations.indexOf(e);i&&(this._gl.vertexAttribDivisor(e,0),this.disableAttributeByIndex(e))},_0x265690.prototype.disableAttributeByIndex=function(e){this._gl.disableVertexAttribArray(e),this._vertexAttribArraysEnabled[e]=!1,this._currentBufferPointers[e].active=!1},_0x265690.prototype.draw=function(e,t,i,n){this.drawElementsType(e?_0x333f62.MATERIAL_TriangleFillMode:_0x333f62.MATERIAL_WireFrameFillMode,t,i,n)},_0x265690.prototype.drawPointClouds=function(e,t,i){this.drawArraysType(_0x333f62.MATERIAL_PointFillMode,e,t,i)},_0x265690.prototype.drawUnIndexed=function(e,t,i,n){this.drawArraysType(e?_0x333f62.MATERIAL_TriangleFillMode:_0x333f62.MATERIAL_WireFrameFillMode,t,i,n)},_0x265690.prototype.drawElementsType=function(e,t,i,n){this.applyStates(),this._reportDrawCall();var r=this._drawMode(e),o=this._uintIndicesCurrentlySet?this._gl.UNSIGNED_INT:this._gl.UNSIGNED_SHORT,a=this._uintIndicesCurrentlySet?4:2;n?this._gl.drawElementsInstanced(r,i,o,t*a,n):this._gl.drawElements(r,i,o,t*a)},_0x265690.prototype.drawArraysType=function(e,t,i,n){this.applyStates(),this._reportDrawCall();var r=this._drawMode(e);n?this._gl.drawArraysInstanced(r,t,i,n):this._gl.drawArrays(r,t,i)},_0x265690.prototype._drawMode=function(e){switch(e){case _0x333f62.MATERIAL_TriangleFillMode:return this._gl.TRIANGLES;case _0x333f62.MATERIAL_PointFillMode:return this._gl.POINTS;case _0x333f62.MATERIAL_WireFrameFillMode:return this._gl.LINES;case _0x333f62.MATERIAL_PointListDrawMode:return this._gl.POINTS;case _0x333f62.MATERIAL_LineListDrawMode:return this._gl.LINES;case _0x333f62.MATERIAL_LineLoopDrawMode:return this._gl.LINE_LOOP;case _0x333f62.MATERIAL_LineStripDrawMode:return this._gl.LINE_STRIP;case _0x333f62.MATERIAL_TriangleStripDrawMode:return this._gl.TRIANGLE_STRIP;case _0x333f62.MATERIAL_TriangleFanDrawMode:return this._gl.TRIANGLE_FAN;default:return this._gl.TRIANGLES}},_0x265690.prototype._reportDrawCall=function(){},_0x265690.prototype._releaseEffect=function(e){if(this._compiledEffects[e._key]){delete this._compiledEffects[e._key];var t=e.getPipelineContext();t&&this._deletePipelineContext(t)}},_0x265690.prototype._deletePipelineContext=function(e){var t=e;t&&t.program&&(t.program.__SPECTOR_rebuildProgram=null,this._gl.deleteProgram(t.program))},_0x265690.prototype._getGlobalDefines=function(e){if(e)return this.isNDCHalfZRange?e.IS_NDC_HALF_ZRANGE="":delete e.IS_NDC_HALF_ZRANGE,void(this.useReverseDepthBuffer?e.USE_REVERSE_DEPTHBUFFER="":delete e.USE_REVERSE_DEPTHBUFFER);var t="";return this.isNDCHalfZRange&&(t+="#define IS_NDC_HALF_ZRANGE"),this.useReverseDepthBuffer&&(t&&(t+="\n"),t+="#define USE_REVERSE_DEPTHBUFFER"),t},_0x265690.prototype.createEffect=function(e,t,i,n,r,o,a,s,l,u){var c;void 0===u&&(u=_Materials_shaderLanguage__WEBPACK_IMPORTED_MODULE_20__.ShaderLanguage.GLSL);var h=e.vertexElement||e.vertex||e.vertexToken||e.vertexSource||e,d=e.fragmentElement||e.fragment||e.fragmentToken||e.fragmentSource||e,f=this._getGlobalDefines(),p=null!==(c=null!=r?r:t.defines)&&void 0!==c?c:"";f&&(p+=f);var _=h+"+"+d+"@"+p;if(this._compiledEffects[_]){var m=this._compiledEffects[_];return a&&m.isReady()&&a(m),m}var g=new _Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect(e,t,i,n,this,r,o,a,s,l,_,u);return this._compiledEffects[_]=g,g},_0x265690._ConcatenateShader=function(e,t,i){return void 0===i&&(i=""),i+(t?t+"\n":"")+e},_0x265690.prototype._compileShader=function(e,t,i,n){return this._compileRawShader(_0x265690._ConcatenateShader(e,i,n),t)},_0x265690.prototype._compileRawShader=function(e,t){var i=this._gl,n=i.createShader("vertex"===t?i.VERTEX_SHADER:i.FRAGMENT_SHADER);if(!n){for(var r=i.NO_ERROR,o=i.NO_ERROR;(o=i.getError())!==i.NO_ERROR;)r=o;throw new Error("Something went wrong while creating a gl ".concat(t," shader object. gl error=").concat(r,", gl isContextLost=").concat(i.isContextLost(),", _contextWasLost=").concat(this._contextWasLost))}return i.shaderSource(n,e),i.compileShader(n),n},_0x265690.prototype._getShaderSource=function(e){return this._gl.getShaderSource(e)},_0x265690.prototype.createRawShaderProgram=function(e,t,i,n,r){void 0===r&&(r=null),n=n||this._gl;var o=this._compileRawShader(t,"vertex"),a=this._compileRawShader(i,"fragment");return this._createShaderProgram(e,o,a,n,r)},_0x265690.prototype.createShaderProgram=function(e,t,i,n,r,o){void 0===o&&(o=null),r=r||this._gl;var a=this._webGLVersion>1?"#version 300 es\n#define WEBGL2 \n":"",s=this._compileShader(t,"vertex",n,a),l=this._compileShader(i,"fragment",n,a);return this._createShaderProgram(e,s,l,r,o)},_0x265690.prototype.inlineShaderCode=function(e){return e},_0x265690.prototype.createPipelineContext=function(e){var t=new _WebGL_webGLPipelineContext__WEBPACK_IMPORTED_MODULE_15__.WebGLPipelineContext;return t.engine=this,this._caps.parallelShaderCompile&&(t.isParallelCompiled=!0),t},_0x265690.prototype.createMaterialContext=function(){},_0x265690.prototype.createDrawContext=function(){},_0x265690.prototype._createShaderProgram=function(e,t,i,n,r){var o=n.createProgram();if(e.program=o,!o)throw new Error("Unable to create program");return n.attachShader(o,t),n.attachShader(o,i),n.linkProgram(o),e.context=n,e.vertexShader=t,e.fragmentShader=i,!e.isParallelCompiled&&this._finalizePipelineContext(e),o},_0x265690.prototype._finalizePipelineContext=function(e){var t=e.context,i=e.vertexShader,n=e.fragmentShader,r=e.program;if(!t.getProgramParameter(r,t.LINK_STATUS)){var o,a;if(!this._gl.getShaderParameter(i,this._gl.COMPILE_STATUS))if(o=this._gl.getShaderInfoLog(i))throw e.vertexCompilationError=o,new Error("VERTEX SHADER "+o);if(!this._gl.getShaderParameter(n,this._gl.COMPILE_STATUS))if(o=this._gl.getShaderInfoLog(n))throw e.fragmentCompilationError=o,new Error("FRAGMENT SHADER "+o);if(a=t.getProgramInfoLog(r))throw e.programLinkError=a,new Error(a)}if(this.validateShaderPrograms&&(t.validateProgram(r),!t.getProgramParameter(r,t.VALIDATE_STATUS)&&(a=t.getProgramInfoLog(r))))throw e.programValidationError=a,new Error(a);t.deleteShader(i),t.deleteShader(n),e.vertexShader=void 0,e.fragmentShader=void 0,e.onCompiled&&(e.onCompiled(),e.onCompiled=void 0)},_0x265690.prototype._preparePipelineContext=function(e,t,i,n,r,o,a,s,l,u){var c=e;c.program=n?this.createRawShaderProgram(c,t,i,void 0,l):this.createShaderProgram(c,t,i,s,void 0,l),c.program.__SPECTOR_rebuildProgram=a},_0x265690.prototype._isRenderingStateCompiled=function(e){var t=e;return!!this._gl.getProgramParameter(t.program,this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)&&(this._finalizePipelineContext(t),!0)},_0x265690.prototype._executeWhenRenderingStateIsCompiled=function(e,t){var i=e;if(i.isParallelCompiled){var n=i.onCompiled;i.onCompiled=n?function(){n(),t()}:t}else t()},_0x265690.prototype.getUniforms=function(e,t){for(var i=new Array,n=e,r=0;r<t.length;r++)i.push(this._gl.getUniformLocation(n.program,t[r]));return i},_0x265690.prototype.getAttributes=function(e,t){for(var i=[],n=e,r=0;r<t.length;r++)try{i.push(this._gl.getAttribLocation(n.program,t[r]))}catch(e){i.push(-1)}return i},_0x265690.prototype.enableEffect=function(e){(e=null!==e&&_Materials_drawWrapper__WEBPACK_IMPORTED_MODULE_18__.DrawWrapper.IsWrapper(e)?e.effect:e)&&e!==this._currentEffect&&(this._stencilStateComposer.stencilMaterial=void 0,e=e,this.bindSamplers(e),this._currentEffect=e,e.onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e))},_0x265690.prototype.setInt=function(e,t){return!!e&&(this._gl.uniform1i(e,t),!0)},_0x265690.prototype.setInt2=function(e,t,i){return!!e&&(this._gl.uniform2i(e,t,i),!0)},_0x265690.prototype.setInt3=function(e,t,i,n){return!!e&&(this._gl.uniform3i(e,t,i,n),!0)},_0x265690.prototype.setInt4=function(e,t,i,n,r){return!!e&&(this._gl.uniform4i(e,t,i,n,r),!0)},_0x265690.prototype.setIntArray=function(e,t){return!!e&&(this._gl.uniform1iv(e,t),!0)},_0x265690.prototype.setIntArray2=function(e,t){return!(!e||t.length%2!=0)&&(this._gl.uniform2iv(e,t),!0)},_0x265690.prototype.setIntArray3=function(e,t){return!(!e||t.length%3!=0)&&(this._gl.uniform3iv(e,t),!0)},_0x265690.prototype.setIntArray4=function(e,t){return!(!e||t.length%4!=0)&&(this._gl.uniform4iv(e,t),!0)},_0x265690.prototype.setArray=function(e,t){return!!e&&(!(t.length<1)&&(this._gl.uniform1fv(e,t),!0))},_0x265690.prototype.setArray2=function(e,t){return!(!e||t.length%2!=0)&&(this._gl.uniform2fv(e,t),!0)},_0x265690.prototype.setArray3=function(e,t){return!(!e||t.length%3!=0)&&(this._gl.uniform3fv(e,t),!0)},_0x265690.prototype.setArray4=function(e,t){return!(!e||t.length%4!=0)&&(this._gl.uniform4fv(e,t),!0)},_0x265690.prototype.setMatrices=function(e,t){return!!e&&(this._gl.uniformMatrix4fv(e,!1,t),!0)},_0x265690.prototype.setMatrix3x3=function(e,t){return!!e&&(this._gl.uniformMatrix3fv(e,!1,t),!0)},_0x265690.prototype.setMatrix2x2=function(e,t){return!!e&&(this._gl.uniformMatrix2fv(e,!1,t),!0)},_0x265690.prototype.setFloat=function(e,t){return!!e&&(this._gl.uniform1f(e,t),!0)},_0x265690.prototype.setFloat2=function(e,t,i){return!!e&&(this._gl.uniform2f(e,t,i),!0)},_0x265690.prototype.setFloat3=function(e,t,i,n){return!!e&&(this._gl.uniform3f(e,t,i,n),!0)},_0x265690.prototype.setFloat4=function(e,t,i,n,r){return!!e&&(this._gl.uniform4f(e,t,i,n,r),!0)},_0x265690.prototype.applyStates=function(){if(this._depthCullingState.apply(this._gl),this._stencilStateComposer.apply(this._gl),this._alphaState.apply(this._gl),this._colorWriteChanged){this._colorWriteChanged=!1;var e=this._colorWrite;this._gl.colorMask(e,e,e,e)}},_0x265690.prototype.setColorWrite=function(e){e!==this._colorWrite&&(this._colorWriteChanged=!0,this._colorWrite=e)},_0x265690.prototype.getColorWrite=function(){return this._colorWrite},Object.defineProperty(_0x265690.prototype,"depthCullingState",{get:function(){return this._depthCullingState},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"alphaState",{get:function(){return this._alphaState},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"stencilState",{get:function(){return this._stencilState},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690.prototype,"stencilStateComposer",{get:function(){return this._stencilStateComposer},enumerable:!1,configurable:!0}),_0x265690.prototype.clearInternalTexturesCache=function(){this._internalTexturesCache=[]},_0x265690.prototype.wipeCaches=function(e){this.preventCacheWipeBetweenFrames&&!e||(this._currentEffect=null,this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0,this._unbindVertexArrayObject(),e&&(this._currentProgram=null,this.resetTextureCache(),this._stencilStateComposer.reset(),this._depthCullingState.reset(),this._depthCullingState.depthFunc=this._gl.LEQUAL,this._alphaState.reset(),this._alphaMode=_0x333f62.ALPHA_ADD,this._alphaEquation=_0x333f62.ALPHA_DISABLE,this._colorWrite=!0,this._colorWriteChanged=!0,this._unpackFlipYCached=null,this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),this._mustWipeVertexAttributes=!0,this.unbindAllAttributes()),this._resetVertexBufferBinding(),this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null,this.bindIndexBuffer(null))},_0x265690.prototype._getSamplingParameters=function(e,t){var i=this._gl,n=i.NEAREST,r=i.NEAREST;switch(e){case _0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST:n=i.LINEAR,r=t?i.LINEAR_MIPMAP_NEAREST:i.LINEAR;break;case _0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR:n=i.LINEAR,r=t?i.LINEAR_MIPMAP_LINEAR:i.LINEAR;break;case _0x333f62.TEXTURE_NEAREST_NEAREST_MIPLINEAR:n=i.NEAREST,r=t?i.NEAREST_MIPMAP_LINEAR:i.NEAREST;break;case _0x333f62.TEXTURE_NEAREST_NEAREST_MIPNEAREST:n=i.NEAREST,r=t?i.NEAREST_MIPMAP_NEAREST:i.NEAREST;break;case _0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST:n=i.NEAREST,r=t?i.LINEAR_MIPMAP_NEAREST:i.LINEAR;break;case _0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR:n=i.NEAREST,r=t?i.LINEAR_MIPMAP_LINEAR:i.LINEAR;break;case _0x333f62.TEXTURE_NEAREST_LINEAR:n=i.NEAREST,r=i.LINEAR;break;case _0x333f62.TEXTURE_NEAREST_NEAREST:n=i.NEAREST,r=i.NEAREST;break;case _0x333f62.TEXTURE_LINEAR_NEAREST_MIPNEAREST:n=i.LINEAR,r=t?i.NEAREST_MIPMAP_NEAREST:i.NEAREST;break;case _0x333f62.TEXTURE_LINEAR_NEAREST_MIPLINEAR:n=i.LINEAR,r=t?i.NEAREST_MIPMAP_LINEAR:i.NEAREST;break;case _0x333f62.TEXTURE_LINEAR_LINEAR:n=i.LINEAR,r=i.LINEAR;break;case _0x333f62.TEXTURE_LINEAR_NEAREST:n=i.LINEAR,r=i.NEAREST}return{min:r,mag:n}},_0x265690.prototype._createTexture=function(){var e=this._gl.createTexture();if(!e)throw new Error("Unable to create texture");return e},_0x265690.prototype._createHardwareTexture=function(){return new _WebGL_webGLHardwareTexture__WEBPACK_IMPORTED_MODULE_17__.WebGLHardwareTexture(this._createTexture(),this._gl)},_0x265690.prototype._createInternalTexture=function(e,t,i,n){void 0===n&&(n=InternalTextureSource.Unknown);var r={};void 0!==t&&"object"==typeof t?(r.generateMipMaps=t.generateMipMaps,r.type=void 0===t.type?_0x333f62.TEXTURETYPE_UNSIGNED_INT:t.type,r.samplingMode=void 0===t.samplingMode?_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,r.format=void 0===t.format?_0x333f62.TEXTUREFORMAT_RGBA:t.format,r.useSRGBBuffer=void 0!==t.useSRGBBuffer&&t.useSRGBBuffer):(r.generateMipMaps=t,r.type=_0x333f62.TEXTURETYPE_UNSIGNED_INT,r.samplingMode=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE,r.format=_0x333f62.TEXTUREFORMAT_RGBA,r.useSRGBBuffer=!1),r.useSRGBBuffer=r.useSRGBBuffer&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU),r.type!==_0x333f62.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?r.type===_0x333f62.TEXTURETYPE_HALF_FLOAT&&!this._caps.textureHalfFloatLinearFiltering&&(r.samplingMode=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE):r.samplingMode=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,r.type===_0x333f62.TEXTURETYPE_FLOAT&&!this._caps.textureFloat&&(r.type=_0x333f62.TEXTURETYPE_UNSIGNED_INT,_0x50f23a.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));var o=this._gl,a=new InternalTexture(this,n);a._useSRGBBuffer=!!r.useSRGBBuffer;var s=e.width||e,l=e.height||e,u=e.layers||0,c=this._getSamplingParameters(r.samplingMode,!!r.generateMipMaps),h=0!==u?o.TEXTURE_2D_ARRAY:o.TEXTURE_2D,d=this._getRGBABufferInternalSizedFormat(r.type,r.format,r.useSRGBBuffer),f=this._getInternalFormat(r.format),p=this._getWebGLTextureType(r.type);return this._bindTextureDirectly(h,a),0!==u?(a.is2DArray=!0,o.texImage3D(h,0,d,s,l,u,0,f,p,null)):o.texImage2D(h,0,d,s,l,0,f,p,null),o.texParameteri(h,o.TEXTURE_MAG_FILTER,c.mag),o.texParameteri(h,o.TEXTURE_MIN_FILTER,c.min),o.texParameteri(h,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(h,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),r.generateMipMaps&&this._gl.generateMipmap(h),this._bindTextureDirectly(h,null),a.baseWidth=s,a.baseHeight=l,a.width=s,a.height=l,a.depth=u,a.isReady=!0,a.samples=1,a.generateMipMaps=!!r.generateMipMaps,a.samplingMode=r.samplingMode,a.type=r.type,a.format=r.format,this._internalTexturesCache.push(a),a},_0x265690.prototype._getUseSRGBBuffer=function(e,t){return e&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU||t)},_0x265690.prototype._createTextureBase=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=this;void 0===r&&(r=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===u&&(u=null),void 0===c&&(c=null),void 0===h&&(h=null),void 0===d&&(d=null);var g="data:"===(e=e||"").substr(0,5),x="blob:"===e.substr(0,5),y=g&&-1!==e.indexOf(";base64,"),v=c||new InternalTexture(this,InternalTextureSource.Url),$=e;this._transformTextureUrl&&!y&&!c&&!u&&(e=this._transformTextureUrl(e)),$!==e&&(v._originalUrl=$);var b=e.lastIndexOf("."),T=d||(b>-1?e.substring(b).toLowerCase():""),C=null;T.indexOf("?")>-1&&(T=T.split("?")[0]);for(var S=0,w=_0x265690._TextureLoaders;S<w.length;S++){var E=w[S];if(E.canLoad(T,f)){C=E;break}}n&&n._addPendingData(v),v.url=e,v.generateMipMaps=!t,v.samplingMode=r,v.invertY=i,v._useSRGBBuffer=this._getUseSRGBBuffer(!!_,t),!this._doNotHandleContextLost&&(v._buffer=u);var P=null;o&&!c&&(P=v.onLoadedObservable.add(o)),!c&&this._internalTexturesCache.push(v);var A=function(i,c){n&&n._removePendingData(v),e===$?(P&&v.onLoadedObservable.remove(P),_engineStore__WEBPACK_IMPORTED_MODULE_1__.EngineStore.UseFallbackTexture&&m._createTextureBase(_engineStore__WEBPACK_IMPORTED_MODULE_1__.EngineStore.FallbackTexture,t,v.invertY,n,r,null,a,s,l,u,v),i=(i||"Unknown error")+(_engineStore__WEBPACK_IMPORTED_MODULE_1__.EngineStore.UseFallbackTexture?" - Fallback texture was used":""),v.onErrorObservable.notifyObservers({message:i,exception:c}),a&&a(i,c)):(_0x50f23a.Warn("Failed to load ".concat(e,", falling back to ").concat($)),m._createTextureBase($,t,v.invertY,n,r,o,a,s,l,u,v,h,d,f,p,_))};if(C){var L=function(e){C.loadData(e,v,(function(e,t,i,o,a,l){l?A("TextureLoader failed to load data"):s(v,T,n,{width:e,height:t},v.invertY,!i,o,(function(){return a(),!1}),r)}),p)};u?u instanceof ArrayBuffer?L(new Uint8Array(u)):ArrayBuffer.isView(u)?L(u):a&&a("Unable to load: only ArrayBuffer or ArrayBufferView is supported",null):this._loadFile(e,(function(e){return L(new Uint8Array(e))}),void 0,n?n.offlineProvider:void 0,!0,(function(e,t){A("Unable to load "+(e&&e.responseURL,t))}))}else{var M=function(e){x&&!m._doNotHandleContextLost&&(v._buffer=e),s(v,T,n,e,v.invertY,t,!1,l,r)};!g||y?u&&("string"==typeof u.decoding||u.close)&&M(u):"string"==typeof u||u instanceof ArrayBuffer||ArrayBuffer.isView(u)||u instanceof Blob||u&&M(u)}return v},_0x265690.prototype.createTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){var _=this;return void 0===r&&(r=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),this._createTextureBase(e,t,i,n,r,o,a,this._prepareWebGLTexture.bind(this),(function(e,t,i,r,o,a){var s=_._gl,l=i.width===e&&i.height===t,c=u?_._getInternalFormat(u,o._useSRGBBuffer):".jpg"!==r||o._useSRGBBuffer?o._useSRGBBuffer?s.SRGB8_ALPHA8:s.RGBA:s.RGB,h=u?_._getInternalFormat(u):".jpg"!==r||o._useSRGBBuffer?s.RGBA:s.RGB;if(o._useSRGBBuffer&&1===_.webGLVersion&&(h=c),l)return s.texImage2D(s.TEXTURE_2D,0,c,h,s.UNSIGNED_BYTE,i),!1;var d=_._caps.maxTextureSize;if(i.width>d||i.height>d||!_._supportsHardwareTextureRescaling)return _._prepareWorkingCanvas(),!(!_._workingCanvas||!_._workingContext)&&(_._workingCanvas.width=e,_._workingCanvas.height=t,_._workingContext.drawImage(i,0,0,i.width,i.height,0,0,e,t),s.texImage2D(s.TEXTURE_2D,0,c,h,s.UNSIGNED_BYTE,_._workingCanvas),o.width=e,o.height=t,!1);var f=new InternalTexture(_,InternalTextureSource.Temp);return _._bindTextureDirectly(s.TEXTURE_2D,f,!0),s.texImage2D(s.TEXTURE_2D,0,c,h,s.UNSIGNED_BYTE,i),_._rescaleTexture(f,o,n,c,(function(){_._releaseTexture(f),_._bindTextureDirectly(s.TEXTURE_2D,o,!0),a()})),!0}),s,l,u,c,h,d,p)},_0x265690._FileToolsLoadImage=function(e,t,i,n,r,o){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("FileTools")},_0x265690.prototype._rescaleTexture=function(e,t,i,n,r){},_0x265690.prototype.createRawTexture=function(e,t,i,n,r,o,a,s,l,u,c){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0x265690.prototype.createRawCubeTexture=function(e,t,i,n,r,o,a,s){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0x265690.prototype.createRawTexture3D=function(e,t,i,n,r,o,a,s,l,u){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0x265690.prototype.createRawTexture2DArray=function(e,t,i,n,r,o,a,s,l,u){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("Engine.RawTexture")},_0x265690.prototype._unpackFlipY=function(e){this._unpackFlipYCached!==e&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,e?1:0),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=e))},_0x265690.prototype._getUnpackAlignement=function(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)},_0x265690.prototype._getTextureTarget=function(e){return e.isCube?this._gl.TEXTURE_CUBE_MAP:e.is3D?this._gl.TEXTURE_3D:e.is2DArray||e.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D},_0x265690.prototype.updateTextureSamplingMode=function(e,t,i){void 0===i&&(i=!1);var n=this._getTextureTarget(t),r=this._getSamplingParameters(e,t.generateMipMaps||i);this._setTextureParameterInteger(n,this._gl.TEXTURE_MAG_FILTER,r.mag,t),this._setTextureParameterInteger(n,this._gl.TEXTURE_MIN_FILTER,r.min),i&&(t.generateMipMaps=!0,this._gl.generateMipmap(n)),this._bindTextureDirectly(n,null),t.samplingMode=e},_0x265690.prototype.updateTextureDimensions=function(e,t,i,n){},_0x265690.prototype.updateTextureWrappingMode=function(e,t,i,n){void 0===i&&(i=null),void 0===n&&(n=null);var r=this._getTextureTarget(e);null!==t&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t),e),e._cachedWrapU=t),null!==i&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(i),e),e._cachedWrapV=i),(e.is2DArray||e.is3D)&&null!==n&&(this._setTextureParameterInteger(r,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(n),e),e._cachedWrapR=n),this._bindTextureDirectly(r,null)},_0x265690.prototype._setupDepthStencilTexture=function(e,t,i,n,r,o){void 0===o&&(o=1);var a=t.width||t,s=t.height||t,l=t.layers||0;e.baseWidth=a,e.baseHeight=s,e.width=a,e.height=s,e.is2DArray=l>0,e.depth=l,e.isReady=!0,e.samples=o,e.generateMipMaps=!1,e.samplingMode=n?_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE:_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,e.type=_0x333f62.TEXTURETYPE_UNSIGNED_INT,e._comparisonFunction=r;var u=this._gl,c=this._getTextureTarget(e),h=this._getSamplingParameters(e.samplingMode,!1);u.texParameteri(c,u.TEXTURE_MAG_FILTER,h.mag),u.texParameteri(c,u.TEXTURE_MIN_FILTER,h.min),u.texParameteri(c,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(c,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),0===r?(u.texParameteri(c,u.TEXTURE_COMPARE_FUNC,_0x333f62.LEQUAL),u.texParameteri(c,u.TEXTURE_COMPARE_MODE,u.NONE)):(u.texParameteri(c,u.TEXTURE_COMPARE_FUNC,r),u.texParameteri(c,u.TEXTURE_COMPARE_MODE,u.COMPARE_REF_TO_TEXTURE))},_0x265690.prototype._uploadCompressedDataToTextureDirectly=function(e,t,i,n,r,o,a){void 0===o&&(o=0),void 0===a&&(a=0);var s=this._gl,l=s.TEXTURE_2D;if(e.isCube&&(l=s.TEXTURE_CUBE_MAP_POSITIVE_X+o),e._useSRGBBuffer)switch(t){case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2:case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL:this._caps.etc2?t=s.COMPRESSED_SRGB8_ETC2:e._useSRGBBuffer=!1;break;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC:this._caps.etc2?t=s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:e._useSRGBBuffer=!1;break;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM:t=s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;break;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4:t=s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;break;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1:this._caps.s3tc_srgb?t=s.COMPRESSED_SRGB_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1:this._caps.s3tc_srgb?t=s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5:this._caps.s3tc_srgb?t=s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:e._useSRGBBuffer=!1;break;default:e._useSRGBBuffer=!1}this._gl.compressedTexImage2D(l,a,t,i,n,0,r)},_0x265690.prototype._uploadDataToTextureDirectly=function(e,t,i,n,r,o){void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=!1);var a=this._gl,s=this._getWebGLTextureType(e.type),l=this._getInternalFormat(e.format),u=void 0===r?this._getRGBABufferInternalSizedFormat(e.type,e.format,e._useSRGBBuffer):this._getInternalFormat(r,e._useSRGBBuffer);this._unpackFlipY(e.invertY);var c=a.TEXTURE_2D;e.isCube&&(c=a.TEXTURE_CUBE_MAP_POSITIVE_X+i);var h=Math.round(Math.log(e.width)*Math.LOG2E),d=Math.round(Math.log(e.height)*Math.LOG2E),f=o?e.width:Math.pow(2,Math.max(h-n,0)),p=o?e.height:Math.pow(2,Math.max(d-n,0));a.texImage2D(c,n,u,f,p,0,l,s,t)},_0x265690.prototype.updateTextureData=function(e,t,i,n,r,o,a,s,l){void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=!1);var u=this._gl,c=this._getWebGLTextureType(e.type),h=this._getInternalFormat(e.format);this._unpackFlipY(e.invertY);var d=u.TEXTURE_2D;e.isCube&&(d=u.TEXTURE_CUBE_MAP_POSITIVE_X+a),this._bindTextureDirectly(d,e,!0),u.texSubImage2D(d,s,i,n,r,o,h,c,t),l&&this._gl.generateMipmap(d),this._bindTextureDirectly(d,null)},_0x265690.prototype._uploadArrayBufferViewToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=this._gl,o=e.isCube?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D;this._bindTextureDirectly(o,e,!0),this._uploadDataToTextureDirectly(e,t,i,n),this._bindTextureDirectly(o,null,!0)},_0x265690.prototype._prepareWebGLTextureContinuation=function(e,t,i,n,r){var o=this._gl;if(o){var a=this._getSamplingParameters(r,!i);o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,a.mag),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,a.min),!i&&!n&&o.generateMipmap(o.TEXTURE_2D),this._bindTextureDirectly(o.TEXTURE_2D,null),t&&t._removePendingData(e),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}},_0x265690.prototype._prepareWebGLTexture=function(e,t,i,n,r,o,a,s,l){var u=this;void 0===l&&(l=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE);var c=this.getCaps().maxTextureSize,h=Math.min(c,this.needPOTTextures?_0x265690.GetExponentOfTwo(n.width,c):n.width),d=Math.min(c,this.needPOTTextures?_0x265690.GetExponentOfTwo(n.height,c):n.height),f=this._gl;f&&(e._hardwareTexture?(this._bindTextureDirectly(f.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===r||!!r),e.baseWidth=n.width,e.baseHeight=n.height,e.width=h,e.height=d,e.isReady=!0,s(h,d,n,t,e,(function(){u._prepareWebGLTextureContinuation(e,i,o,a,l)}))||this._prepareWebGLTextureContinuation(e,i,o,a,l)):i&&i._removePendingData(e))},_0x265690.prototype._setupFramebufferDepthAttachments=function(e,t,i,n,r){void 0===r&&(r=1);var o=this._gl;if(e&&t)return this._createRenderBuffer(i,n,r,o.DEPTH_STENCIL,o.DEPTH24_STENCIL8,o.DEPTH_STENCIL_ATTACHMENT);if(t){var a=o.DEPTH_COMPONENT16;return this._webGLVersion>1&&(a=o.DEPTH_COMPONENT32F),this._createRenderBuffer(i,n,r,a,a,o.DEPTH_ATTACHMENT)}return e?this._createRenderBuffer(i,n,r,o.STENCIL_INDEX8,o.STENCIL_INDEX8,o.STENCIL_ATTACHMENT):null},_0x265690.prototype._createRenderBuffer=function(e,t,i,n,r,o,a){void 0===a&&(a=!0);var s=this._gl,l=s.createRenderbuffer();return s.bindRenderbuffer(s.RENDERBUFFER,l),i>1&&s.renderbufferStorageMultisample?s.renderbufferStorageMultisample(s.RENDERBUFFER,i,r,e,t):s.renderbufferStorage(s.RENDERBUFFER,n,e,t),s.framebufferRenderbuffer(s.FRAMEBUFFER,o,s.RENDERBUFFER,l),a&&s.bindRenderbuffer(s.RENDERBUFFER,null),l},_0x265690.prototype._releaseTexture=function(e){var t;this._deleteTexture(null===(t=e._hardwareTexture)||void 0===t?void 0:t.underlyingResource),this.unbindAllTextures();var i=this._internalTexturesCache.indexOf(e);-1!==i&&this._internalTexturesCache.splice(i,1),e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureLow&&e._lodTextureLow.dispose(),e._irradianceTexture&&e._irradianceTexture.dispose()},_0x265690.prototype._releaseRenderTargetWrapper=function(e){var t=this._renderTargetWrapperCache.indexOf(e);-1!==t&&this._renderTargetWrapperCache.splice(t,1)},_0x265690.prototype._deleteTexture=function(e){e&&this._gl.deleteTexture(e)},_0x265690.prototype._setProgram=function(e){this._currentProgram!==e&&(this._gl.useProgram(e),this._currentProgram=e)},_0x265690.prototype.bindSamplers=function(e){var t=e.getPipelineContext();this._setProgram(t.program);for(var i=e.getSamplers(),n=0;n<i.length;n++){var r=e.getUniform(i[n]);r&&(this._boundUniforms[n]=r)}this._currentEffect=null},_0x265690.prototype._activateCurrentTexture=function(){this._currentTextureChannel!==this._activeChannel&&(this._gl.activeTexture(this._gl.TEXTURE0+this._activeChannel),this._currentTextureChannel=this._activeChannel)},_0x265690.prototype._bindTextureDirectly=function(e,t,i,n){var r,o;void 0===i&&(i=!1),void 0===n&&(n=!1);var a=!1,s=t&&t._associatedChannel>-1;if(i&&s&&(this._activeChannel=t._associatedChannel),this._boundTexturesCache[this._activeChannel]!==t||n){if(this._activateCurrentTexture(),t&&t.isMultiview)throw console.error(e,t),"_bindTextureDirectly called with a multiview texture!";this._gl.bindTexture(e,null!==(o=null===(r=null==t?void 0:t._hardwareTexture)||void 0===r?void 0:r.underlyingResource)&&void 0!==o?o:null),this._boundTexturesCache[this._activeChannel]=t,t&&(t._associatedChannel=this._activeChannel)}else i&&(a=!0,this._activateCurrentTexture());return s&&!i&&this._bindSamplerUniformToChannel(t._associatedChannel,this._activeChannel),a},_0x265690.prototype._bindTexture=function(e,t,i){if(void 0!==e){t&&(t._associatedChannel=e),this._activeChannel=e;var n=t?this._getTextureTarget(t):this._gl.TEXTURE_2D;this._bindTextureDirectly(n,t)}},_0x265690.prototype.unbindAllTextures=function(){for(var e=0;e<this._maxSimultaneousTextures;e++)this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))},_0x265690.prototype.setTexture=function(e,t,i,n){void 0!==e&&(t&&(this._boundUniforms[e]=t),this._setTexture(e,i))},_0x265690.prototype._bindSamplerUniformToChannel=function(e,t){var i=this._boundUniforms[e];i&&i._currentState!==t&&(this._gl.uniform1i(i,t),i._currentState=t)},_0x265690.prototype._getTextureWrapMode=function(e){switch(e){case _0x333f62.TEXTURE_WRAP_ADDRESSMODE:return this._gl.REPEAT;case _0x333f62.TEXTURE_CLAMP_ADDRESSMODE:return this._gl.CLAMP_TO_EDGE;case _0x333f62.TEXTURE_MIRROR_ADDRESSMODE:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT},_0x265690.prototype._setTexture=function(e,t,i,n,r){if(void 0===i&&(i=!1),void 0===n&&(n=!1),!t)return null!=this._boundTexturesCache[e]&&(this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(t.video)this._activeChannel=e,t.update();else if(t.delayLoadState===_0x333f62.DELAYLOADSTATE_NOTLOADED)return t.delayLoad(),!1;var o;o=n?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!i&&o&&(o._associatedChannel=e);var a=!0;this._boundTexturesCache[e]===o&&(!i&&this._bindSamplerUniformToChannel(o._associatedChannel,e),a=!1),this._activeChannel=e;var s=this._getTextureTarget(o);if(a&&this._bindTextureDirectly(s,o,i),o&&!o.isMultiview){if(o.isCube&&o._cachedCoordinatesMode!==t.coordinatesMode){o._cachedCoordinatesMode=t.coordinatesMode;var l=t.coordinatesMode!==_0x333f62.TEXTURE_CUBIC_MODE&&t.coordinatesMode!==_0x333f62.TEXTURE_SKYBOX_MODE?_0x333f62.TEXTURE_WRAP_ADDRESSMODE:_0x333f62.TEXTURE_CLAMP_ADDRESSMODE;t.wrapU=l,t.wrapV=l}o._cachedWrapU!==t.wrapU&&(o._cachedWrapU=t.wrapU,this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t.wrapU),o)),o._cachedWrapV!==t.wrapV&&(o._cachedWrapV=t.wrapV,this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(t.wrapV),o)),o.is3D&&o._cachedWrapR!==t.wrapR&&(o._cachedWrapR=t.wrapR,this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(t.wrapR),o)),this._setAnisotropicLevel(s,o,t.anisotropicFilteringLevel)}return!0},_0x265690.prototype.setTextureArray=function(e,t,i,n){if(void 0!==e&&t){(!this._textureUnits||this._textureUnits.length!==i.length)&&(this._textureUnits=new Int32Array(i.length));for(var r=0;r<i.length;r++){var o=i[r].getInternalTexture();o?(this._textureUnits[r]=e+r,o._associatedChannel=e+r):this._textureUnits[r]=-1}this._gl.uniform1iv(t,this._textureUnits);for(var a=0;a<i.length;a++)this._setTexture(this._textureUnits[a],i[a],!0)}},_0x265690.prototype._setAnisotropicLevel=function(e,t,i){var n=this._caps.textureAnisotropicFilterExtension;t.samplingMode!==_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST&&t.samplingMode!==_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR&&t.samplingMode!==_0x333f62.TEXTURE_LINEAR_LINEAR&&(i=1),n&&t._cachedAnisotropicFilteringLevel!==i&&(this._setTextureParameterFloat(e,n.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(i,this._caps.maxAnisotropy),t),t._cachedAnisotropicFilteringLevel=i)},_0x265690.prototype._setTextureParameterFloat=function(e,t,i,n){this._bindTextureDirectly(e,n,!0,!0),this._gl.texParameterf(e,t,i)},_0x265690.prototype._setTextureParameterInteger=function(e,t,i,n){n&&this._bindTextureDirectly(e,n,!0,!0),this._gl.texParameteri(e,t,i)},_0x265690.prototype.unbindAllAttributes=function(){if(this._mustWipeVertexAttributes){this._mustWipeVertexAttributes=!1;for(var e=0;e<this._caps.maxVertexAttribs;e++)this.disableAttributeByIndex(e)}else{e=0;for(var t=this._vertexAttribArraysEnabled.length;e<t;e++)e>=this._caps.maxVertexAttribs||!this._vertexAttribArraysEnabled[e]||this.disableAttributeByIndex(e)}},_0x265690.prototype.releaseEffects=function(){for(var e in this._compiledEffects){var t=this._compiledEffects[e].getPipelineContext();this._deletePipelineContext(t)}this._compiledEffects={}},_0x265690.prototype.dispose=function(){var e;this.stopRenderLoop(),this.onBeforeTextureInitObservable&&this.onBeforeTextureInitObservable.clear(),this._emptyTexture&&(this._releaseTexture(this._emptyTexture),this._emptyTexture=null),this._emptyCubeTexture&&(this._releaseTexture(this._emptyCubeTexture),this._emptyCubeTexture=null),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.releaseEffects(),null===(e=this.releaseComputeEffects)||void 0===e||e.call(this),this.unbindAllAttributes(),this._boundUniforms=[],IsWindowObjectExist()&&this._renderingCanvas&&(!this._doNotHandleContextLost&&(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored)),window.removeEventListener("resize",this._checkForMobile)),this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers=[],this._renderingCanvas=null,this._currentProgram=null,this._boundRenderFunction=null,_Materials_effect__WEBPACK_IMPORTED_MODULE_2__.Effect.ResetCache();for(var t=0,i=this._activeRequests;t<i.length;t++){i[t].abort()}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear()},_0x265690.prototype.attachContextLostEvent=function(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextlost",e,!1)},_0x265690.prototype.attachContextRestoredEvent=function(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextrestored",e,!1)},_0x265690.prototype.getError=function(){return this._gl.getError()},_0x265690.prototype._canRenderToFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(_0x333f62.TEXTURETYPE_FLOAT)},_0x265690.prototype._canRenderToHalfFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(_0x333f62.TEXTURETYPE_HALF_FLOAT)},_0x265690.prototype._canRenderToFramebuffer=function(e){for(var t=this._gl;t.getError()!==t.NO_ERROR;);var i=!0,n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(e),1,1,0,t.RGBA,this._getWebGLTextureType(e),null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);var r=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,r),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0);var o=t.checkFramebufferStatus(t.FRAMEBUFFER);if((i=(i=i&&o===t.FRAMEBUFFER_COMPLETE)&&t.getError()===t.NO_ERROR)&&(t.clear(t.COLOR_BUFFER_BIT),i=i&&t.getError()===t.NO_ERROR),i){t.bindFramebuffer(t.FRAMEBUFFER,null);var a=t.RGBA,s=t.UNSIGNED_BYTE,l=new Uint8Array(4);t.readPixels(0,0,1,1,a,s,l),i=i&&t.getError()===t.NO_ERROR}for(t.deleteTexture(n),t.deleteFramebuffer(r),t.bindFramebuffer(t.FRAMEBUFFER,null);!i&&t.getError()!==t.NO_ERROR;);return i},_0x265690.prototype._getWebGLTextureType=function(e){if(1===this._webGLVersion){switch(e){case _0x333f62.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case _0x333f62.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT_OES;case _0x333f62.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(e){case _0x333f62.TEXTURETYPE_BYTE:return this._gl.BYTE;case _0x333f62.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case _0x333f62.TEXTURETYPE_SHORT:return this._gl.SHORT;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT:return this._gl.UNSIGNED_SHORT;case _0x333f62.TEXTURETYPE_INT:return this._gl.INT;case _0x333f62.TEXTURETYPE_UNSIGNED_INTEGER:return this._gl.UNSIGNED_INT;case _0x333f62.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case _0x333f62.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_24_8:return this._gl.UNSIGNED_INT_24_8;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case _0x333f62.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE},_0x265690.prototype._getInternalFormat=function(e,t){void 0===t&&(t=!1);var i=t?this._gl.SRGB8_ALPHA8:this._gl.RGBA;switch(e){case _0x333f62.TEXTUREFORMAT_ALPHA:i=this._gl.ALPHA;break;case _0x333f62.TEXTUREFORMAT_LUMINANCE:i=this._gl.LUMINANCE;break;case _0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA:i=this._gl.LUMINANCE_ALPHA;break;case _0x333f62.TEXTUREFORMAT_RED:i=this._gl.RED;break;case _0x333f62.TEXTUREFORMAT_RG:i=this._gl.RG;break;case _0x333f62.TEXTUREFORMAT_RGB:i=t?this._gl.SRGB:this._gl.RGB;break;case _0x333f62.TEXTUREFORMAT_RGBA:i=t?this._gl.SRGB8_ALPHA8:this._gl.RGBA}if(this._webGLVersion>1)switch(e){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:i=this._gl.RED_INTEGER;break;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:i=this._gl.RG_INTEGER;break;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:i=this._gl.RGB_INTEGER;break;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:i=this._gl.RGBA_INTEGER}return i},_0x265690.prototype._getRGBABufferInternalSizedFormat=function(e,t,i){if(void 0===i&&(i=!1),1===this._webGLVersion){if(void 0!==t)switch(t){case _0x333f62.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case _0x333f62.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case _0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;case _0x333f62.TEXTUREFORMAT_RGB:return i?this._gl.SRGB:this._gl.RGB}return this._gl.RGBA}switch(e){case _0x333f62.TEXTURETYPE_BYTE:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return this._gl.R8_SNORM;case _0x333f62.TEXTUREFORMAT_RG:return this._gl.RG8_SNORM;case _0x333f62.TEXTUREFORMAT_RGB:return this._gl.RGB8_SNORM;case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8I;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8I;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8I;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case _0x333f62.TEXTURETYPE_UNSIGNED_BYTE:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return this._gl.R8;case _0x333f62.TEXTUREFORMAT_RG:return this._gl.RG8;case _0x333f62.TEXTUREFORMAT_RGB:return i?this._gl.SRGB8:this._gl.RGB8;case _0x333f62.TEXTUREFORMAT_RGBA:return i?this._gl.SRGB8_ALPHA8:this._gl.RGBA8;case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8UI;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8UI;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8UI;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8UI;case _0x333f62.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case _0x333f62.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case _0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case _0x333f62.TEXTURETYPE_SHORT:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16I;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16I;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16I;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16I}case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16UI;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16UI;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16UI;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16UI}case _0x333f62.TEXTURETYPE_INT:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32I;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32I;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32I;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32I}case _0x333f62.TEXTURETYPE_UNSIGNED_INTEGER:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32UI;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32UI;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32UI;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32UI}case _0x333f62.TEXTURETYPE_FLOAT:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return this._gl.R32F;case _0x333f62.TEXTUREFORMAT_RG:return this._gl.RG32F;case _0x333f62.TEXTUREFORMAT_RGB:return this._gl.RGB32F;case _0x333f62.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA32F}case _0x333f62.TEXTURETYPE_HALF_FLOAT:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return this._gl.R16F;case _0x333f62.TEXTUREFORMAT_RG:return this._gl.RG16F;case _0x333f62.TEXTUREFORMAT_RGB:return this._gl.RGB16F;case _0x333f62.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA16F}case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.RGB565;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.R11F_G11F_B10F;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.RGB9_E5;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.RGBA4;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.RGB5_A1;case _0x333f62.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(t){case _0x333f62.TEXTUREFORMAT_RGBA:return this._gl.RGB10_A2;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGB10_A2UI;default:return this._gl.RGB10_A2}}return i?this._gl.SRGB8_ALPHA8:this._gl.RGBA8},_0x265690.prototype._getRGBAMultiSampleBufferFormat=function(e){return e===_0x333f62.TEXTURETYPE_FLOAT?this._gl.RGBA32F:e===_0x333f62.TEXTURETYPE_HALF_FLOAT?this._gl.RGBA16F:this._gl.RGBA8},_0x265690.prototype._loadFile=function(e,t,i,n,r,o){var a=this,s=_0x265690._FileToolsLoadFile(e,t,i,n,r,o);return this._activeRequests.push(s),s.onCompleteObservable.add((function(e){a._activeRequests.splice(a._activeRequests.indexOf(e),1)})),s},_0x265690._FileToolsLoadFile=function(e,t,i,n,r,o){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_3__._WarnImport)("FileTools")},_0x265690.prototype.readPixels=function(e,t,i,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!0);var a=r?4:3,s=r?this._gl.RGBA:this._gl.RGB,l=new Uint8Array(n*i*a);return o&&this.flushFramebuffer(),this._gl.readPixels(e,t,i,n,s,this._gl.UNSIGNED_BYTE,l),Promise.resolve(l)},Object.defineProperty(_0x265690,"IsSupportedAsync",{get:function(){return Promise.resolve(this.isSupported())},enumerable:!1,configurable:!0}),Object.defineProperty(_0x265690,"IsSupported",{get:function(){return this.isSupported()},enumerable:!1,configurable:!0}),_0x265690.isSupported=function(){if(null!==this._HasMajorPerformanceCaveat)return!this._HasMajorPerformanceCaveat;if(null===this._IsSupported)try{var e=this._CreateCanvas(1,1),t=e.getContext("webgl")||e.getContext("experimental-webgl");this._IsSupported=null!=t&&!!window.WebGLRenderingContext}catch(e){this._IsSupported=!1}return this._IsSupported},Object.defineProperty(_0x265690,"HasMajorPerformanceCaveat",{get:function(){if(null===this._HasMajorPerformanceCaveat)try{var e=this._CreateCanvas(1,1),t=e.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||e.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!t}catch(e){this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat},enumerable:!1,configurable:!0}),_0x265690.CeilingPOT=function(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},_0x265690.FloorPOT=function(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)},_0x265690.NearestPOT=function(e){var t=_0x265690.CeilingPOT(e),i=_0x265690.FloorPOT(e);return t-e>e-i?i:t},_0x265690.GetExponentOfTwo=function(e,t,i){var n;switch(void 0===i&&(i=_0x333f62.SCALEMODE_NEAREST),i){case _0x333f62.SCALEMODE_FLOOR:n=_0x265690.FloorPOT(e);break;case _0x333f62.SCALEMODE_NEAREST:n=_0x265690.NearestPOT(e);break;case _0x333f62.SCALEMODE_CEILING:default:n=_0x265690.CeilingPOT(e)}return Math.min(n,t)},_0x265690.QueueNewFrame=function(e,t){return IsWindowObjectExist()?(!t&&(t=window),t.requestPostAnimationFrame?t.requestPostAnimationFrame(e):t.requestAnimationFrame?t.requestAnimationFrame(e):t.msRequestAnimationFrame?t.msRequestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.mozRequestAnimationFrame?t.mozRequestAnimationFrame(e):t.oRequestAnimationFrame?t.oRequestAnimationFrame(e):window.setTimeout(e,16)):"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(e):setTimeout(e,16)},_0x265690.prototype.getHostDocument=function(){return this._renderingCanvas&&this._renderingCanvas.ownerDocument?this._renderingCanvas.ownerDocument:IsDocumentAvailable()?document:null},_0x265690.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:".*AppleWebKit.*(15.4).*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]},{key:".*(15.4).*AppleWebKit.*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]}],_0x265690._TextureLoaders=[],_0x265690.CollisionsEpsilon=.001,_0x265690._IsSupported=null,_0x265690._HasMajorPerformanceCaveat=null,_0x265690.prototype._createHardwareRenderTargetWrapper=function(e,t,i){var n=new _WebGL_webGLRenderTargetWrapper__WEBPACK_IMPORTED_MODULE_4__.WebGLRenderTargetWrapper(e,t,i,this,this._gl);return this._renderTargetWrapperCache.push(n),n},_0x265690.prototype.createDepthStencilTexture=function(e,t,i){if(t.isCube){var n=e.width||e;return this._createDepthStencilCubeTexture(n,t,i)}return this._createDepthStencilTexture(e,t,i)};var _0x1f6bd8=(_0x1bca23=!0,function(e,t){var i=_0x1bca23?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1bca23=!1,i}),_0x5373a8=_0x1f6bd8(void 0,(function(){return _0x5373a8.toString().search("(((.+)+)+)+$").toString().constructor(_0x5373a8).search("(((.+)+)+)+$")})),_0x1bca23;function allocateAndCopyTypedBuffer(e,t,i,n){switch(void 0===i&&(i=!1),e){case _0x333f62.TEXTURETYPE_BYTE:var r=(ArrayBuffer,new Int8Array(t));return n&&r.set(new Int8Array(n)),r;case _0x333f62.TEXTURETYPE_UNSIGNED_BYTE:var o=(ArrayBuffer,new Uint8Array(t));return n&&o.set(new Uint8Array(n)),o;case _0x333f62.TEXTURETYPE_SHORT:var a=t instanceof ArrayBuffer?new Int16Array(t):new Int16Array(i?t/2:t);return n&&a.set(new Int16Array(n)),a;case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT:case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:case _0x333f62.TEXTURETYPE_HALF_FLOAT:var s=t instanceof ArrayBuffer?new Uint16Array(t):new Uint16Array(i?t/2:t);return n&&s.set(new Uint16Array(n)),s;case _0x333f62.TEXTURETYPE_INT:var l=t instanceof ArrayBuffer?new Int32Array(t):new Int32Array(i?t/4:t);return n&&l.set(new Int32Array(n)),l;case _0x333f62.TEXTURETYPE_UNSIGNED_INTEGER:case _0x333f62.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:case _0x333f62.TEXTURETYPE_UNSIGNED_INT_24_8:case _0x333f62.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:case _0x333f62.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:case _0x333f62.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:var u=t instanceof ArrayBuffer?new Uint32Array(t):new Uint32Array(i?t/4:t);return n&&u.set(new Uint32Array(n)),u;case _0x333f62.TEXTURETYPE_FLOAT:var c=t instanceof ArrayBuffer?new Float32Array(t):new Float32Array(i?t/4:t);return n&&c.set(new Float32Array(n)),c}var h=(ArrayBuffer,new Uint8Array(t));return n&&h.set(new Uint8Array(n)),h}_0x5373a8(),_0x265690.prototype._readTexturePixelsSync=function(e,t,i,n,r,o,a,s,l,u){var c,h;void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===l&&(l=0),void 0===u&&(u=0);var d=this._gl;if(!d)throw new Error("Engine does not have gl rendering context.");if(!this._dummyFramebuffer){var f=d.createFramebuffer();if(!f)throw new Error("Unable to create dummy framebuffer");this._dummyFramebuffer=f}d.bindFramebuffer(d.FRAMEBUFFER,this._dummyFramebuffer),n>-1?d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+n,null===(c=e._hardwareTexture)||void 0===c?void 0:c.underlyingResource,r):d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,null===(h=e._hardwareTexture)||void 0===h?void 0:h.underlyingResource,r);var p=void 0!==e.type?this._getWebGLTextureType(e.type):d.UNSIGNED_BYTE;if(s)!o&&(o=allocateAndCopyTypedBuffer(e.type,4*t*i));else if(p===d.UNSIGNED_BYTE)!o&&(o=new Uint8Array(4*t*i)),p=d.UNSIGNED_BYTE;else!o&&(o=new Float32Array(4*t*i)),p=d.FLOAT;return a&&this.flushFramebuffer(),d.readPixels(l,u,t,i,d.RGBA,p,o),d.bindFramebuffer(d.FRAMEBUFFER,this._currentFramebuffer),o},_0x265690.prototype._readTexturePixels=function(e,t,i,n,r,o,a,s,l,u){return void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===l&&(l=0),void 0===u&&(u=0),Promise.resolve(this._readTexturePixelsSync(e,t,i,n,r,o,a,s,l,u))};var _0x2ee650=(_0x56e0d2=!0,function(e,t){var i=_0x56e0d2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56e0d2=!1,i}),_0x55bde0=_0x2ee650(void 0,(function(){return _0x55bde0.toString().search("(((.+)+)+)+$").toString().constructor(_0x55bde0).search("(((.+)+)+)+$")})),_0x56e0d2;function _0x430b74(e){this._deferredReleaseBuffers=[],this._device=e}_0x55bde0(),_0x430b74._IsGPUBuffer=function(e){return void 0===e.underlyingResource},_0x430b74.prototype.createRawBuffer=function(e,t,i){void 0===i&&(i=!1);var n={mappedAtCreation:i,size:void 0!==e.byteLength?e.byteLength+3&-4:e+3&-4,usage:t};return this._device.createBuffer(n)},_0x430b74.prototype.createBuffer=function(e,t){var i=void 0!==e.byteLength,n=new _0x4de77b(this.createRawBuffer(e,t));return n.references=1,n.capacity=i?e.byteLength:e,i&&this.setSubData(n,0,e),n},_0x430b74.prototype.setRawData=function(e,t,i,n,r){this._device.queue.writeBuffer(e,t,i.buffer,n,r)},_0x430b74.prototype.setSubData=function(e,t,i,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var o=e.underlyingResource;r=r||i.byteLength,r=Math.min(r,e.capacity-t);var a=i.byteOffset+n,s=a+r,l=r+3&-4;if(l!==r){var u=new Uint8Array(i.buffer.slice(a,s));(i=new Uint8Array(l)).set(u),n=0,a=0,s=l,r=l}for(var c=15728640,h=0;s-(a+h)>c;)this._device.queue.writeBuffer(o,t+h,i.buffer,a+h,c),h+=c;this._device.queue.writeBuffer(o,t+h,i.buffer,a+h,r-h)},_0x430b74.prototype.createBufferByMap=function(e,t){var i=void 0!==e.byteLength,n=new _0x4de77b(o=this.createRawBuffer(e,t,!0));if(n.references=1,n.capacity=i?e.byteLength:e,i){var r=e,o=n.underlyingResource,a=r.byteLength;a=Math.min(a,n.capacity-0);var s=r.byteOffset,l=s+a,u=a+3&-4;if(u!==a){var c=new Uint8Array(r.buffer.slice(s,l));(r=new Uint8Array(u)).set(c),s=0,l=u,a=u}var h=o.getMappedRange();new(0,r.constructor)(h).set(r),o.unmap()}return n},_0x430b74.prototype._getHalfFloatAsFloatRGBAArrayBuffer=function(e,t,i){!i&&(i=new Float32Array(e));for(var n=new Uint16Array(t);e--;)i[e]=_0x2314f2(n[e]);return i},_0x430b74.prototype.readDataFromBuffer=function(e,t,i,n,r,o,a,s,l,u,c){var h=this;void 0===a&&(a=_0x333f62.TEXTURETYPE_UNSIGNED_BYTE),void 0===s&&(s=0),void 0===l&&(l=null),void 0===u&&(u=!0),void 0===c&&(c=!1);var d=a===_0x333f62.TEXTURETYPE_FLOAT?2:a===_0x333f62.TEXTURETYPE_HALF_FLOAT?1:0;return new Promise((function(i,f){e.mapAsync(_0x5213c6.MapMode.Read,s,t).then((function(){var f=e.getMappedRange(s,t),p=l;if(c)p=null===p?allocateAndCopyTypedBuffer(a,t,!0,f):allocateAndCopyTypedBuffer(a,p.buffer,void 0,f);else if(null===p)switch(d){case 0:(p=new Uint8Array(t)).set(new Uint8Array(f));break;case 1:p=h._getHalfFloatAsFloatRGBAArrayBuffer(t/2,f);break;case 2:(p=new Float32Array(t/4)).set(new Float32Array(f))}else switch(d){case 0:(p=new Uint8Array(p.buffer)).set(new Uint8Array(f));break;case 1:p=h._getHalfFloatAsFloatRGBAArrayBuffer(t/2,f,l);break;case 2:(p=new Float32Array(p.buffer)).set(new Float32Array(f))}if(r!==o){1===d&&!c&&(r*=2,o*=2);for(var _=new Uint8Array(p.buffer),m=r,g=0,x=1;x<n;++x){g=x*o;for(var y=0;y<r;++y)_[m++]=_[g++]}p=0===d||c?new Uint8Array(_.buffer,0,m):new Float32Array(_.buffer,0,m/4)}e.unmap(),u&&h.releaseBuffer(e),i(p)}),(function(e){return f(e)}))}))},_0x430b74.prototype.releaseBuffer=function(e){return _0x430b74._IsGPUBuffer(e)?(this._deferredReleaseBuffers.push(e),!0):(e.references--,0===e.references&&(this._deferredReleaseBuffers.push(e.underlyingResource),!0))},_0x430b74.prototype.destroyDeferredBuffers=function(){for(var e=0;e<this._deferredReleaseBuffers.length;++e)this._deferredReleaseBuffers[e].destroy();this._deferredReleaseBuffers.length=0};var _0xb632be=(_0x5b7a76=!0,function(e,t){var i=_0x5b7a76?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b7a76=!1,i}),_0x2e8fd1=_0xb632be(void 0,(function(){return _0x2e8fd1.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e8fd1).search("(((.+)+)+)+$")})),_0x5b7a76;function _0x157d2f(e){void 0===e&&(e=null),this.format=_0x5213c6.TextureFormat.RGBA8Unorm,this.textureUsages=0,this.textureAdditionalUsages=0,this._webgpuTexture=e,this._webgpuMSAATexture=null,this.view=null,this.viewForWriting=null,this.msaaView=null}_0x2e8fd1(),Object.defineProperty(_0x157d2f.prototype,"underlyingResource",{get:function(){return this._webgpuTexture},enumerable:!1,configurable:!0}),Object.defineProperty(_0x157d2f.prototype,"msaaTexture",{get:function(){return this._webgpuMSAATexture},set:function(e){this._webgpuMSAATexture=e},enumerable:!1,configurable:!0}),_0x157d2f.prototype.set=function(e){this._webgpuTexture=e},_0x157d2f.prototype.setUsage=function(e,t,i,n,r){t=e!==_Materials_Textures_internalTexture__WEBPACK_IMPORTED_MODULE_0__.InternalTextureSource.RenderTarget&&t,this.createView({format:this.format,dimension:i?_0x5213c6.TextureViewDimension.Cube:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:t?_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__.Scalar.ILog2(Math.max(n,r))+1:1,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:i?6:1,aspect:_0x5213c6.TextureAspect.All})},_0x157d2f.prototype.createView=function(e,t){if(void 0===t&&(t=!1),this.view=this._webgpuTexture.createView(e),t&&e){var i=e.mipLevelCount;e.mipLevelCount=1,this.viewForWriting=this._webgpuTexture.createView(e),e.mipLevelCount=i}},_0x157d2f.prototype.createMSAAView=function(e){this.msaaView=this._webgpuMSAATexture.createView(e)},_0x157d2f.prototype.reset=function(){this._webgpuTexture=null,this._webgpuMSAATexture=null,this.view=null,this.viewForWriting=null,this.msaaView=null},_0x157d2f.prototype.release=function(){var e,t,i;null===(e=this._webgpuTexture)||void 0===e||e.destroy(),null===(t=this._webgpuMSAATexture)||void 0===t||t.destroy(),null===(i=this._copyInvertYTempTexture)||void 0===i||i.destroy(),this.reset()};var _0x4ebf2d=(_0x4a0a3c=!0,function(e,t){var i=_0x4a0a3c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a0a3c=!1,i}),_0x528fce=_0x4ebf2d(void 0,(function(){return _0x528fce.toString().search("(((.+)+)+)+$").toString().constructor(_0x528fce).search("(((.+)+)+)+$")})),_0x4a0a3c;function _0x528403(){}_0x528fce(),Object.defineProperty(_0x528403.prototype,"UniqueId",{get:function(){var e=this._UniqueIdCounter;return this._UniqueIdCounter++,e},enumerable:!1,configurable:!0}),_0x528403._UniqueIdCounter=0,_0x528403.add=function(){};var _0xc638eb=(_0x125c77=!0,function(e,t){var i=_0x125c77?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x125c77=!1,i}),_0x4fe2da=_0xc638eb(void 0,(function(){return _0x4fe2da.toString().search("(((.+)+)+)+$").toString().constructor(_0x4fe2da).search("(((.+)+)+)+$")})),_0x125c77;function _0x266979(){}_0x4fe2da(),_0x266979.GetShadersRepository=function(e){return void 0===e&&(e=_0x3b3a87.GLSL),e===_0x3b3a87.GLSL?_0x266979.ShadersRepository:_0x266979.ShadersRepositoryWGSL},_0x266979.GetShadersStore=function(e){return void 0===e&&(e=_0x3b3a87.GLSL),e===_0x3b3a87.GLSL?_0x266979.ShadersStore:_0x266979.ShadersStoreWGSL},_0x266979.GetIncludesShadersStore=function(e){return void 0===e&&(e=_0x3b3a87.GLSL),e===_0x3b3a87.GLSL?_0x266979.IncludesShadersStore:_0x266979.IncludesShadersStoreWGSL},_0x266979.ShadersRepository="Source/Shaders/",_0x266979.ShadersStore={},_0x266979.IncludesShadersStore={},_0x266979.ShadersRepositoryWGSL="Source/ShadersWGSL/",_0x266979.ShadersStoreWGSL={},_0x266979.IncludesShadersStoreWGSL={};var _0x4af1c1=(_0x551bdc=!0,function(e,t){var i=_0x551bdc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x551bdc=!1,i}),_0xdd9162=_0x4af1c1(void 0,(function(){return _0xdd9162.toString().search("(((.+)+)+)+$").toString().constructor(_0xdd9162).search("(((.+)+)+)+$")})),_0x551bdc;function _0xb0765d(e,t,i,n){var r,o,a=this;void 0===n&&(n=""),this.name=null,this.defines="",this.onCompiled=null,this.onError=null,this.uniqueId=0,this.onCompileObservable=new Observable,this.onErrorObservable=new Observable,this.onBindObservable=new Observable,this._wasPreviouslyReady=!1,this._isReady=!1,this._compilationError="",this._key="",this._computeSourceCodeOverride="",this._pipelineContext=null,this._computeSourceCode="",this._rawComputeSourceCode="",this._shaderLanguage=_0x3b3a87.WGSL,this.name=e,this._key=n,this._engine=i,this.uniqueId=_0xb0765d._uniqueIdSeed++,this.defines=null!==(r=t.defines)&&void 0!==r?r:"",this.onError=t.onError,this.onCompiled=t.onCompiled,this._entryPoint=null!==(o=t.entryPoint)&&void 0!==o?o:"main",this._shaderStore=_0x266979.GetShadersStore(this._shaderLanguage),this._shaderRepository=_0x266979.GetShadersRepository(this._shaderLanguage),this._includeShaderStore=_0x266979.GetIncludesShadersStore(this._shaderLanguage);var s,l=IsWindowObjectExist()?this._engine.getHostDocument():null;e.computeSource?s="source:"+e.computeSource:e.computeElement?!(s=l?l.getElementById(e.computeElement):null)&&(s=e.computeElement):s=e.compute||e;var u={defines:this.defines.split("\n"),indexParameters:void 0,isFragment:!1,shouldUseHighPrecisionShader:!1,processor:null,supportsUniformBuffers:this._engine.supportsUniformBuffers,shadersRepository:this._shaderRepository,includesShadersStore:this._includeShaderStore,version:(100*this._engine.version).toString(),platformName:this._engine.shaderPlatformName,processingContext:null,isNDCHalfZRange:this._engine.isNDCHalfZRange,useReverseDepthBuffer:this._engine.useReverseDepthBuffer};this._loadShader(s,"Compute","",(i=>{_0x56a2f1.Initialize(u),_0x56a2f1.PreProcess(i,u,(function(n){a._rawComputeSourceCode=i,t.processFinalCode&&(n=t.processFinalCode(n));var r=_0x56a2f1.Finalize(n,"",u);a._useFinalCode(r.vertexCode,e)}),a._engine)}))}_0xdd9162(),_0xb0765d.prototype._useFinalCode=function(e,t){if(t){var i=t.computeElement||t.compute||t.spectorName||t;this._computeSourceCode="//#define SHADER_NAME compute:"+i+"\n"+e}else this._computeSourceCode=e;this._prepareEffect()},Object.defineProperty(_0xb0765d.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),_0xb0765d.prototype.isReady=function(){try{return this._isReadyInternal()}catch(e){return!1}},_0xb0765d.prototype._isReadyInternal=function(){return!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady},_0xb0765d.prototype.getEngine=function(){return this._engine},_0xb0765d.prototype.getPipelineContext=function(){return this._pipelineContext},_0xb0765d.prototype.getCompilationError=function(){return this._compilationError},_0xb0765d.prototype.executeWhenCompiled=function(e){var t=this;this.isReady()?e(this):(this.onCompileObservable.add((function(t){e(t)})),(!this._pipelineContext||this._pipelineContext.isAsync)&&setTimeout((function(){t._checkIsReady(null)}),16))},_0xb0765d.prototype._checkIsReady=function(e){var t=this;try{if(this._isReadyInternal())return}catch(t){return void this._processCompilationErrors(t,e)}setTimeout((function(){t._checkIsReady(e)}),16)},_0xb0765d.prototype._loadShader=function(e,t,i,n){var r;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return void n(Object(_Misc_domManagement__WEBPACK_IMPORTED_MODULE_2__.GetDOMTextContent)(e));"source:"!==e.substr(0,7)?"base64:"!==e.substr(0,7)?this._shaderStore[e+t+"Shader"]?n(this._shaderStore[e+t+"Shader"]):i&&this._shaderStore[e+i+"Shader"]?n(this._shaderStore[e+i+"Shader"]):(r="."===e[0]||"/"===e[0]||e.indexOf("http")>-1?e:this._shaderRepository+e,this._engine._loadFile(r+"."+t.toLowerCase()+".fx",n)):n(window.atob(e.substr(7))):n(e.substr(7))},Object.defineProperty(_0xb0765d.prototype,"computeSourceCode",{get:function(){var e,t;return this._computeSourceCodeOverride?this._computeSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getComputeShaderCode())&&void 0!==t?t:this._computeSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0xb0765d.prototype,"rawComputeSourceCode",{get:function(){return this._rawComputeSourceCode},enumerable:!1,configurable:!0}),_0xb0765d.prototype._prepareEffect=function(){var e=this,t=this.defines,i=this._pipelineContext;this._isReady=!1;try{var n=this._engine;this._pipelineContext=n.createComputePipelineContext(),this._pipelineContext._name=this._key,n._prepareComputePipelineContext(this._pipelineContext,this._computeSourceCodeOverride?this._computeSourceCodeOverride:this._computeSourceCode,this._rawComputeSourceCode,this._computeSourceCodeOverride?null:t,this._entryPoint),n._executeWhenComputeStateIsCompiled(this._pipelineContext,(function(){e._compilationError="",e._isReady=!0,e.onCompiled&&e.onCompiled(e),e.onCompileObservable.notifyObservers(e),e.onCompileObservable.clear(),i&&e.getEngine()._deleteComputePipelineContext(i)})),this._pipelineContext.isAsync&&this._checkIsReady(i)}catch(e){this._processCompilationErrors(e,i)}},_0xb0765d.prototype._getShaderCodeAndErrorLine=function(e,t){var i=null;if(t&&e){var n=t.match(/COMPUTE SHADER ERROR: 0:(\d+?):/);if(n&&2===n.length){var r=parseInt(n[1]),o=e.split("\n",-1);o.length>=r&&(i="Offending line ["+r+"] in compute code: "+o[r-1])}}return[e,i]},_0xb0765d.prototype._processCompilationErrors=function(e,t){var i,n;if(void 0===t&&(t=null),this._compilationError=e.message,_0x50f23a.Error("Unable to compile compute effect:"),_0x50f23a.Error("Defines:\r\n"+this.defines),_0xb0765d.LogShaderCodeOnCompilationError){var r=null,o=null;(null===(n=this._pipelineContext)||void 0===n?void 0:n._getComputeShaderCode())&&(o=(i=this._getShaderCodeAndErrorLine(this._pipelineContext._getComputeShaderCode(),this._compilationError))[0],r=i[1],o&&(_0x50f23a.Error("Compute code:"),_0x50f23a.Error(o))),r&&_0x50f23a.Error(r)}_0x50f23a.Error("Error: "+this._compilationError),t&&(this._pipelineContext=t,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this))},_0xb0765d.prototype.dispose=function(){this._pipelineContext&&this._pipelineContext.dispose(),this._engine._releaseComputeEffect(this)},_0xb0765d.RegisterShader=function(e,t){_0x266979.GetShadersStore(_0x3b3a87.WGSL)[e+"ComputeShader"]=t},_0xb0765d._uniqueIdSeed=0,_0xb0765d.LogShaderCodeOnCompilationError=!0;var _0xf14603=(_0xdaf0e9=!0,function(e,t){var i=_0xdaf0e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xdaf0e9=!1,i}),_0x3fe45e=_0xf14603(void 0,(function(){return _0x3fe45e.toString().search("(((.+)+)+)+$").toString().constructor(_0x3fe45e).search("(((.+)+)+)+$")})),_0xdaf0e9;function _0x40ec3f(){}_0x3fe45e(),Object.defineProperty(_0x40ec3f,"LastCreatedEngine",{get:function(){return 0===this.Instances.length?null:this.Instances[this.Instances.length-1]},enumerable:!1,configurable:!0}),Object.defineProperty(_0x40ec3f,"LastCreatedScene",{get:function(){return this._LastCreatedScene},enumerable:!1,configurable:!0}),_0x40ec3f.Instances=new Array,_0x40ec3f._LastCreatedScene=null,_0x40ec3f.UseFallbackTexture=!0,_0x40ec3f.FallbackTexture="";var _0xeb7c68=(_0x4345dc=!0,function(e,t){var i=_0x4345dc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4345dc=!1,i}),_0x47645b=_0xeb7c68(void 0,(function(){return _0x47645b.toString().search("(((.+)+)+)+$").toString().constructor(_0x47645b).search("(((.+)+)+)+$")})),_0x4345dc;function _0x11e135(){}function _0x140968(){return"undefined"!=typeof window}_0x47645b(),Object.defineProperty(_0x11e135,"Now",{get:function(){return _0x140968()&&window.performance&&window.performance.now?window.performance.now():Date.now()},enumerable:!1,configurable:!0});var _0x2bcecc=(_0x3f1f3e=!0,function(e,t){var i=_0x3f1f3e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f1f3e=!1,i}),_0x1df889=_0x2bcecc(void 0,(function(){return _0x1df889.toString().search("(((.+)+)+)+$").toString().constructor(_0x1df889).search("(((.+)+)+)+$")})),_0x3f1f3e;function PerformanceMonitor(e){void 0===e&&(e=30),this._enabled=!0,this._rollingFrameTime=new RollingAverage(e)}function RollingAverage(e){this._samples=new Array(e),this.reset()}_0x1df889(),PerformanceMonitor.prototype.sampleFrame=function(e){if(void 0===e&&(e=_0x11e135.Now),this._enabled){if(null!=this._lastFrameTimeMs){var t=e-this._lastFrameTimeMs;this._rollingFrameTime.add(t)}this._lastFrameTimeMs=e}},Object.defineProperty(PerformanceMonitor.prototype,"averageFrameTime",{get:function(){return this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"averageFrameTimeVariance",{get:function(){return this._rollingFrameTime.variance},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"instantaneousFrameTime",{get:function(){return this._rollingFrameTime.history(0)},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"averageFPS",{get:function(){return 1e3/this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"instantaneousFPS",{get:function(){var e=this._rollingFrameTime.history(0);return 0===e?0:1e3/e},enumerable:!1,configurable:!0}),Object.defineProperty(PerformanceMonitor.prototype,"isSaturated",{get:function(){return this._rollingFrameTime.isSaturated()},enumerable:!1,configurable:!0}),PerformanceMonitor.prototype.enable=function(){this._enabled=!0},PerformanceMonitor.prototype.disable=function(){this._enabled=!1,this._lastFrameTimeMs=null},Object.defineProperty(PerformanceMonitor.prototype,"isEnabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),PerformanceMonitor.prototype.reset=function(){this._lastFrameTimeMs=null,this._rollingFrameTime.reset()},RollingAverage.prototype.add=function(e){var t;if(this.isSaturated()){var i=this._samples[this._pos];t=i-this.average,this.average-=t/(this._sampleCount-1),this._m2-=t*(i-this.average)}else this._sampleCount++;t=e-this.average,this.average+=t/this._sampleCount,this._m2+=t*(e-this.average),this.variance=this._m2/(this._sampleCount-1),this._samples[this._pos]=e,this._pos++,this._pos%=this._samples.length},RollingAverage.prototype.history=function(e){if(e>=this._sampleCount||e>=this._samples.length)return 0;var t=this._wrapPosition(this._pos-1);return this._samples[this._wrapPosition(t-e)]},RollingAverage.prototype.isSaturated=function(){return this._sampleCount>=this._samples.length},RollingAverage.prototype.reset=function(){this.average=0,this.variance=0,this._sampleCount=0,this._pos=0,this._m2=0},RollingAverage.prototype._wrapPosition=function(e){var t=this._samples.length;return(e%t+t)%t};var _0x442c1c=(_0x2d308e=!0,function(e,t){var i=_0x2d308e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d308e=!1,i}),_0x4121ae=_0x442c1c(void 0,(function(){return _0x4121ae.toString().search("(((.+)+)+)+$").toString().constructor(_0x4121ae).search("(((.+)+)+)+$")})),_0x2d308e;function _0x339417(){this._startMonitoringTime=0,this._min=0,this._max=0,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}_0x4121ae(),Object.defineProperty(_0x339417.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(_0x339417.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(_0x339417.prototype,"average",{get:function(){return this._average},enumerable:!1,configurable:!0}),Object.defineProperty(_0x339417.prototype,"lastSecAverage",{get:function(){return this._lastSecAverage},enumerable:!1,configurable:!0}),Object.defineProperty(_0x339417.prototype,"current",{get:function(){return this._current},enumerable:!1,configurable:!0}),Object.defineProperty(_0x339417.prototype,"total",{get:function(){return this._totalAccumulated},enumerable:!1,configurable:!0}),Object.defineProperty(_0x339417.prototype,"count",{get:function(){return this._totalValueCount},enumerable:!1,configurable:!0}),_0x339417.prototype.fetchNewFrame=function(){this._totalValueCount++,this._current=0,this._lastSecValueCount++},_0x339417.prototype.addCount=function(e,t){_0x339417.Enabled&&(this._current+=e,t&&this._fetchResult())},_0x339417.prototype.beginMonitoring=function(){_0x339417.Enabled&&(this._startMonitoringTime=_0x11e135.Now)},_0x339417.prototype.endMonitoring=function(e){if(void 0===e&&(e=!0),_0x339417.Enabled){e&&this.fetchNewFrame();var t=_0x11e135.Now;this._current=t-this._startMonitoringTime,e&&this._fetchResult()}},_0x339417.prototype._fetchResult=function(){this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current),this._average=this._totalAccumulated/this._totalValueCount;var e=_0x11e135.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)},_0x339417.Enabled=!0;var _0x4663bb=(_0x8d2701=!0,function(e,t){var i=_0x8d2701?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8d2701=!1,i}),_0x37c3e7=_0x4663bb(void 0,(function(){return _0x37c3e7.toString().search("(((.+)+)+)+$").toString().constructor(_0x37c3e7).search("(((.+)+)+)+$")})),_0x8d2701;function _0xf48096(e,t,i,n){void 0===n&&(n=!1);var r=_0x265690.call(this,e,t,i,n)||this;if(r.enableOfflineSupport=!1,r.disableManifestCheck=!1,r.scenes=new Array,r._virtualScenes=new Array,r.onNewSceneAddedObservable=new Observable,r.postProcesses=new Array,r.isPointerLock=!1,r.onResizeObservable=new Observable,r.onCanvasBlurObservable=new Observable,r.onCanvasFocusObservable=new Observable,r.onCanvasPointerOutObservable=new Observable,r.onBeginFrameObservable=new Observable,r.customAnimationFrameRequester=null,r.onEndFrameObservable=new Observable,r.onBeforeShaderCompilationObservable=new Observable,r.onAfterShaderCompilationObservable=new Observable,r._deterministicLockstep=!1,r._lockstepMaxSteps=4,r._timeStep=1/60,r._fps=60,r._deltaTime=0,r._drawCalls=new _0x339417,r.canvasTabIndex=1,r.disablePerformanceMonitorInBackground=!1,r._performanceMonitor=new PerformanceMonitor,r._compatibilityMode=!0,r.currentRenderPassId=_0x333f62.RENDERPASS_MAIN,r._renderPassNames=["main"],_0xf48096.Instances.push(r),!e)return r;if(r._features.supportRenderPasses=!0,i=r._creationOptions,e.getContext){var o=e;if(r._sharedInit(o,!!i.doNotHandleTouchAction,i.audioEngine),(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var a=document;r._onFullscreenChange=function(){void 0!==a.fullscreen?r.isFullscreen=a.fullscreen:void 0!==a.mozFullScreen?r.isFullscreen=a.mozFullScreen:void 0!==a.webkitIsFullScreen?r.isFullscreen=a.webkitIsFullScreen:void 0!==a.msIsFullScreen&&(r.isFullscreen=a.msIsFullScreen),r.isFullscreen&&r._pointerLockRequested&&o&&_0xf48096._RequestPointerlock(o)},document.addEventListener("fullscreenchange",r._onFullscreenChange,!1),document.addEventListener("mozfullscreenchange",r._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",r._onFullscreenChange,!1),document.addEventListener("msfullscreenchange",r._onFullscreenChange,!1),r._onPointerLockChange=function(){r.isPointerLock=a.mozPointerLockElement===o||a.webkitPointerLockElement===o||a.msPointerLockElement===o||a.pointerLockElement===o},document.addEventListener("pointerlockchange",r._onPointerLockChange,!1),document.addEventListener("mspointerlockchange",r._onPointerLockChange,!1),document.addEventListener("mozpointerlockchange",r._onPointerLockChange,!1),document.addEventListener("webkitpointerlockchange",r._onPointerLockChange,!1),!_0xf48096.audioEngine&&i.audioEngine&&_0xf48096.AudioEngineFactory&&(_0xf48096.audioEngine=_0xf48096.AudioEngineFactory(r.getRenderingCanvas(),r.getAudioContext(),r.getAudioDestination()))}r._connectVREvents(),r.enableOfflineSupport=void 0!==_0xf48096.OfflineProviderFactory,r._deterministicLockstep=!!i.deterministicLockstep,r._lockstepMaxSteps=i.lockstepMaxSteps||0,r._timeStep=i.timeStep||1/60}return r._prepareVRComponent(),i.autoEnableWebVR&&r.initWebVR(),r}_0x37c3e7(),_0x265690&&(_0xf48096.__proto__=_0x265690),_0xf48096.prototype=Object.create(_0x265690&&_0x265690.prototype),_0xf48096.prototype.constructor=_0x265690,Object.defineProperty(_0xf48096,"NpmPackage",{get:function(){return _thinEngine__WEBPACK_IMPORTED_MODULE_6__.ThinEngine.NpmPackage},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096,"Version",{get:function(){return _0x265690.Version},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096,"Instances",{get:function(){return _0x40ec3f.Instances},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096,"LastCreatedEngine",{get:function(){return _0x40ec3f.LastCreatedEngine},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096,"LastCreatedScene",{get:function(){return _0x40ec3f.LastCreatedScene},enumerable:!1,configurable:!0}),_0xf48096.prototype._createImageBitmapFromSource=function(e,t){var i=this;return new Promise((function(n,r){var o=new Image;o.onload=function(){o.decode().then((function(){i.createImageBitmap(o,t).then((function(e){n(e)}))}))},o.onerror=function(){r("Error loading image ".concat(o.src))},o.src=e}))},_0xf48096.prototype.createImageBitmap=function(e,t){return createImageBitmap(e,t)},_0xf48096.prototype.resizeImageBitmap=function(e,t,i){var n=this.createCanvas(t,i).getContext("2d");if(!n)throw new Error("Unable to get 2d context for resizeImageBitmap");return n.drawImage(e,0,0),n.getImageData(0,0,t,i).data},_0xf48096.MarkAllMaterialsAsDirty=function(e,t){for(var i=0;i<_0xf48096.Instances.length;i++)for(var n=_0xf48096.Instances[i],r=0;r<n.scenes.length;r++)n.scenes[r].markAllMaterialsAsDirty(e,t)},_0xf48096.DefaultLoadingScreenFactory=function(e){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_5__._WarnImport)("LoadingScreen")},Object.defineProperty(_0xf48096.prototype,"_supportsHardwareTextureRescaling",{get:function(){return!!_0xf48096._RescalePostProcessFactory},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096.prototype,"performanceMonitor",{get:function(){return this._performanceMonitor},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096.prototype,"compatibilityMode",{get:function(){return this._compatibilityMode},set:function(e){this._compatibilityMode=!0},enumerable:!1,configurable:!0}),_0xf48096.prototype.getInputElement=function(){return this._renderingCanvas},_0xf48096.prototype._sharedInit=function(e,t,i){var n=this;if(_0x265690.prototype._sharedInit.call(this,e,t,i),this._onCanvasFocus=function(){n.onCanvasFocusObservable.notifyObservers(n)},this._onCanvasBlur=function(){n.onCanvasBlurObservable.notifyObservers(n)},e.addEventListener("focus",this._onCanvasFocus),e.addEventListener("blur",this._onCanvasBlur),this._onBlur=function(){n.disablePerformanceMonitorInBackground&&n._performanceMonitor.disable(),n._windowIsBackground=!0},this._onFocus=function(){n.disablePerformanceMonitorInBackground&&n._performanceMonitor.enable(),n._windowIsBackground=!1},this._onCanvasPointerOut=function(t){document.elementFromPoint(t.clientX,t.clientY)!==e&&n.onCanvasPointerOutObservable.notifyObservers(t)},(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var r=this.getHostWindow();r&&(r.addEventListener("blur",this._onBlur),r.addEventListener("focus",this._onFocus))}e.addEventListener("pointerout",this._onCanvasPointerOut),!t&&this._disableTouchAction(),!_0xf48096.audioEngine&&i&&_0xf48096.AudioEngineFactory&&(_0xf48096.audioEngine=_0xf48096.AudioEngineFactory(this.getRenderingCanvas(),this.getAudioContext(),this.getAudioDestination()))},_0xf48096.prototype.getAspectRatio=function(e,t){void 0===t&&(t=!1);var i=e.viewport;return this.getRenderWidth(t)*i.width/(this.getRenderHeight(t)*i.height)},_0xf48096.prototype.getScreenAspectRatio=function(){return this.getRenderWidth(!0)/this.getRenderHeight(!0)},_0xf48096.prototype.getRenderingCanvasClientRect=function(){return this._renderingCanvas?this._renderingCanvas.getBoundingClientRect():null},_0xf48096.prototype.getInputElementClientRect=function(){return this._renderingCanvas?this.getInputElement().getBoundingClientRect():null},_0xf48096.prototype.isDeterministicLockStep=function(){return this._deterministicLockstep},_0xf48096.prototype.getLockstepMaxSteps=function(){return this._lockstepMaxSteps},_0xf48096.prototype.getTimeStep=function(){return 1e3*this._timeStep},_0xf48096.prototype.generateMipMapsForCubemap=function(e,t){if(void 0===t&&(t=!0),e.generateMipMaps){var i=this._gl;this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,e,!0),i.generateMipmap(i.TEXTURE_CUBE_MAP),t&&this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,null)}},_0xf48096.prototype.getDepthBuffer=function(){return this._depthCullingState.depthTest},_0xf48096.prototype.setDepthBuffer=function(e){this._depthCullingState.depthTest=e},_0xf48096.prototype.getDepthWrite=function(){return this._depthCullingState.depthMask},_0xf48096.prototype.setDepthWrite=function(e){this._depthCullingState.depthMask=e},_0xf48096.prototype.getStencilBuffer=function(){return this._stencilState.stencilTest},_0xf48096.prototype.setStencilBuffer=function(e){this._stencilState.stencilTest=e},_0xf48096.prototype.getStencilMask=function(){return this._stencilState.stencilMask},_0xf48096.prototype.setStencilMask=function(e){this._stencilState.stencilMask=e},_0xf48096.prototype.getStencilFunction=function(e){return e===_0x333f62.FRONT?this._stencilState.frontStencilFunc:this._stencilState.backStencilFunc},_0xf48096.prototype.getStencilFunctionReference=function(){return this._stencilState.stencilFuncRef},_0xf48096.prototype.getStencilFunctionMask=function(){return this._stencilState.stencilFuncMask},_0xf48096.prototype.setStencilFunction=function(e,t){e===_0x333f62.FRONT?this._stencilState.frontStencilFunc=t:this._stencilState.backStencilFunc=t},_0xf48096.prototype.setStencilFunctionReference=function(e){this._stencilState.stencilFuncRef=e},_0xf48096.prototype.setStencilFunctionMask=function(e){this._stencilState.stencilFuncMask=e},_0xf48096.prototype.getStencilOperationFail=function(e){return e===_0x333f62.FRONT?this._stencilState.frontStencilOpStencilFail:this._stencilState.backStencilOpStencilFail},_0xf48096.prototype.getStencilOperationDepthFail=function(e){return e===_0x333f62.FRONT?this._stencilState.frontStencilOpDepthFail:this._stencilState.backStencilOpDepthFail},_0xf48096.prototype.getStencilOperationPass=function(e){return e===_0x333f62.FRONT?this._stencilState.frontStencilOpStencilDepthPass:this._stencilState.backStencilOpStencilDepthPass},_0xf48096.prototype.setStencilOperationFail=function(e,t){e===_0x333f62.FRONT?this._stencilState.frontStencilOpStencilFail=t:this._stencilState.backStencilOpStencilFail=t},_0xf48096.prototype.setStencilOperationDepthFail=function(e,t){e===_0x333f62.FRONT?this._stencilState.frontStencilOpDepthFail=t:this._stencilState.backStencilOpDepthFail=t},_0xf48096.prototype.setStencilOperationPass=function(e,t){e===_0x333f62.FRONT?this._stencilState.frontStencilOpStencilDepthPass=t:this._stencilState.backStencilOpStencilDepthPass=t},_0xf48096.prototype.setDitheringState=function(e){e?this._gl.enable(this._gl.DITHER):this._gl.disable(this._gl.DITHER)},_0xf48096.prototype.setRasterizerState=function(e){e?this._gl.disable(this._gl.RASTERIZER_DISCARD):this._gl.enable(this._gl.RASTERIZER_DISCARD)},_0xf48096.prototype.getDepthFunction=function(){return this._depthCullingState.depthFunc},_0xf48096.prototype.setDepthFunction=function(e){this._depthCullingState.depthFunc=e},_0xf48096.prototype.setDepthFunctionToGreater=function(){this.setDepthFunction(_0x333f62.GREATER)},_0xf48096.prototype.setDepthFunctionToGreaterOrEqual=function(){this.setDepthFunction(_0x333f62.GEQUAL)},_0xf48096.prototype.setDepthFunctionToLess=function(){this.setDepthFunction(_0x333f62.LESS)},_0xf48096.prototype.setDepthFunctionToLessOrEqual=function(){this.setDepthFunction(_0x333f62.LEQUAL)},_0xf48096.prototype.setDirectViewport=function(e,t,i,n){var r=this._cachedViewport;return this._cachedViewport=null,this._viewport(e,t,i,n),r},_0xf48096.prototype.scissorClear=function(e,t,i,n,r){this.enableScissor(e,t,i,n),this.clear(r,!0,!0,!0),this.disableScissor()},_0xf48096.prototype.enableScissor=function(e,t,i,n){var r=this._gl;r.enable(r.SCISSOR_TEST),r.scissor(e,t,i,n)},_0xf48096.prototype.disableScissor=function(){var e=this._gl;e.disable(e.SCISSOR_TEST)},_0xf48096.prototype._reportDrawCall=function(e){void 0===e&&(e=1),this._drawCalls.addCount(e,!1)},_0xf48096.prototype.initWebVR=function(){throw(0,_Misc_devTools__WEBPACK_IMPORTED_MODULE_5__._WarnImport)("WebVRCamera")},_0xf48096.prototype._prepareVRComponent=function(){},_0xf48096.prototype._connectVREvents=function(e,t){},_0xf48096.prototype._submitVRFrame=function(){},_0xf48096.prototype.disableVR=function(){},_0xf48096.prototype.isVRPresenting=function(){return!1},_0xf48096.prototype._requestVRFrame=function(){},_0xf48096.prototype._loadFileAsync=function(e,t,i){var n=this;return new Promise((function(r,o){n._loadFile(e,(function(e){r(e)}),void 0,t,i,(function(e,t){o(t)}))}))},_0xf48096.prototype.getVertexShaderSource=function(e){var t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[0]):null},_0xf48096.prototype.getFragmentShaderSource=function(e){var t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[1]):null},_0xf48096.prototype.setDepthStencilTexture=function(e,t,i,n){void 0!==e&&(t&&(this._boundUniforms[e]=t),i&&i.depthStencilTexture?this._setTexture(e,i,!1,!0,n):this._setTexture(e,null,void 0,void 0,n))},_0xf48096.prototype.setTextureFromPostProcess=function(e,t,i){var n,r=null;t&&(t._textures.data[t._currentRenderTextureInd]?r=t._textures.data[t._currentRenderTextureInd]:t._forcedOutputTexture&&(r=t._forcedOutputTexture)),this._bindTexture(e,null!==(n=null==r?void 0:r.texture)&&void 0!==n?n:null,i)},_0xf48096.prototype.setTextureFromPostProcessOutput=function(e,t,i){var n,r;this._bindTexture(e,null!==(r=null===(n=null==t?void 0:t._outputTexture)||void 0===n?void 0:n.texture)&&void 0!==r?r:null,i)},_0xf48096.prototype._rebuildBuffers=function(){for(var e=0,t=this.scenes;e<t.length;e++){(r=t[e]).resetCachedMaterial(),r._rebuildGeometries(),r._rebuildTextures()}for(var i=0,n=this._virtualScenes;i<n.length;i++){var r;(r=n[i]).resetCachedMaterial(),r._rebuildGeometries(),r._rebuildTextures()}_0x265690.prototype._rebuildBuffers.call(this)},_0xf48096.prototype._renderFrame=function(){for(var e=0;e<this._activeRenderLoops.length;e++){(0,this._activeRenderLoops[e])()}},_0xf48096.prototype._renderLoop=function(){if(!this._contextWasLost){var e=!0;!this.renderEvenInBackground&&this._windowIsBackground&&(e=!1),e&&(this.beginFrame(),!this._renderViews()&&this._renderFrame(),this.endFrame())}this._activeRenderLoops.length>0?this.customAnimationFrameRequester?(this.customAnimationFrameRequester.requestID=this._queueNewFrame(this.customAnimationFrameRequester.renderFunction||this._boundRenderFunction,this.customAnimationFrameRequester),this._frameHandler=this.customAnimationFrameRequester.requestID):this.isVRPresenting()?this._requestVRFrame():this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},_0xf48096.prototype._renderViews=function(){return!1},_0xf48096.prototype.switchFullscreen=function(e){this.isFullscreen?this.exitFullscreen():this.enterFullscreen(e)},_0xf48096.prototype.enterFullscreen=function(e){!this.isFullscreen&&(this._pointerLockRequested=e,this._renderingCanvas&&_0xf48096._RequestFullscreen(this._renderingCanvas))},_0xf48096.prototype.exitFullscreen=function(){this.isFullscreen&&_0xf48096._ExitFullscreen()},_0xf48096.prototype.enterPointerlock=function(){this._renderingCanvas&&_0xf48096._RequestPointerlock(this._renderingCanvas)},_0xf48096.prototype.exitPointerlock=function(){_0xf48096._ExitPointerlock()},_0xf48096.prototype.beginFrame=function(){this._measureFps(),this.onBeginFrameObservable.notifyObservers(this),_0x265690.prototype.beginFrame.call(this)},_0xf48096.prototype.endFrame=function(){_0x265690.prototype.endFrame.call(this),this._submitVRFrame(),this.onEndFrameObservable.notifyObservers(this)},_0xf48096.prototype.resize=function(e){void 0===e&&(e=!1),this.isVRPresenting()||_0x265690.prototype.resize.call(this,e)},_0xf48096.prototype.setSize=function(e,t,i){if(void 0===i&&(i=!1),!this._renderingCanvas)return!1;if(!_0x265690.prototype.setSize.call(this,e,t,i))return!1;if(this.scenes){for(var n=0;n<this.scenes.length;n++)for(var r=this.scenes[n],o=0;o<r.cameras.length;o++){r.cameras[o]._currentRenderId=0}this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this)}return!0},_0xf48096.prototype._deletePipelineContext=function(e){var t=e;t&&t.program&&t.transformFeedback&&(this.deleteTransformFeedback(t.transformFeedback),t.transformFeedback=null),_0x265690.prototype._deletePipelineContext.call(this,e)},_0xf48096.prototype.createShaderProgram=function(e,t,i,n,r,o){void 0===o&&(o=null),r=r||this._gl,this.onBeforeShaderCompilationObservable.notifyObservers(this);var a=_0x265690.prototype.createShaderProgram.call(this,e,t,i,n,r,o);return this.onAfterShaderCompilationObservable.notifyObservers(this),a},_0xf48096.prototype._createShaderProgram=function(e,t,i,n,r){void 0===r&&(r=null);var o=n.createProgram();if(e.program=o,!o)throw new Error("Unable to create program");if(n.attachShader(o,t),n.attachShader(o,i),this.webGLVersion>1&&r){var a=this.createTransformFeedback();this.bindTransformFeedback(a),this.setTranformFeedbackVaryings(o,r),e.transformFeedback=a}return n.linkProgram(o),this.webGLVersion>1&&r&&this.bindTransformFeedback(null),e.context=n,e.vertexShader=t,e.fragmentShader=i,!e.isParallelCompiled&&this._finalizePipelineContext(e),o},_0xf48096.prototype._releaseTexture=function(e){_0x265690.prototype._releaseTexture.call(this,e)},_0xf48096.prototype._releaseRenderTargetWrapper=function(e){_0x265690.prototype._releaseRenderTargetWrapper.call(this,e),this.scenes.forEach((function(t){t.postProcesses.forEach((function(t){t._outputTexture===e&&(t._outputTexture=null)})),t.cameras.forEach((function(t){t._postProcesses.forEach((function(t){t&&t._outputTexture===e&&(t._outputTexture=null)}))}))}))},_0xf48096.prototype.getRenderPassNames=function(){return this._renderPassNames},_0xf48096.prototype.getCurrentRenderPassName=function(){return this._renderPassNames[this.currentRenderPassId]},_0xf48096.prototype.createRenderPassId=function(e){var t=++_0xf48096._RenderPassIdCounter;return this._renderPassNames[t]=null!=e?e:"NONAME",t},_0xf48096.prototype.releaseRenderPassId=function(e){this._renderPassNames[e]=void 0;for(var t=0;t<this.scenes.length;++t)for(var i=this.scenes[t],n=0;n<i.meshes.length;++n){var r=i.meshes[n];if(r.subMeshes)for(var o=0;o<r.subMeshes.length;++o){r.subMeshes[o]._removeDrawWrapper(e)}}},_0xf48096.prototype._rescaleTexture=function(e,t,i,n,r){var o=this;this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE);var a=this.createRenderTargetTexture({width:t.width,height:t.height},{generateMipMaps:!1,type:_0x333f62.TEXTURETYPE_UNSIGNED_INT,samplingMode:_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE,generateDepthBuffer:!1,generateStencilBuffer:!1});!this._rescalePostProcess&&_0xf48096._RescalePostProcessFactory&&(this._rescalePostProcess=_0xf48096._RescalePostProcessFactory(this)),this._rescalePostProcess.externalTextureSamplerBinding=!0,this._rescalePostProcess.getEffect().executeWhenCompiled((function(){o._rescalePostProcess.onApply=function(t){t._bindTexture("textureSampler",e)};var s=i;!s&&(s=o.scenes[o.scenes.length-1]),s.postProcessManager.directRender([o._rescalePostProcess],a,!0),o._bindTextureDirectly(o._gl.TEXTURE_2D,t,!0),o._gl.copyTexImage2D(o._gl.TEXTURE_2D,0,n,0,0,t.width,t.height,0),o.unBindFramebuffer(a),a.dispose(),r&&r()}))},_0xf48096.prototype.getFps=function(){return this._fps},_0xf48096.prototype.getDeltaTime=function(){return this._deltaTime},_0xf48096.prototype._measureFps=function(){this._performanceMonitor.sampleFrame(),this._fps=this._performanceMonitor.averageFPS,this._deltaTime=this._performanceMonitor.instantaneousFrameTime||0},_0xf48096.prototype.wrapWebGLTexture=function(e){var t=new _WebGL_webGLHardwareTexture__WEBPACK_IMPORTED_MODULE_12__.WebGLHardwareTexture(e,this._gl),i=new _Materials_Textures_internalTexture__WEBPACK_IMPORTED_MODULE_2__.InternalTexture(this,_Materials_Textures_internalTexture__WEBPACK_IMPORTED_MODULE_2__.InternalTextureSource.Unknown,!0);return i._hardwareTexture=t,i.isReady=!0,i},_0xf48096.prototype._uploadImageToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=this._gl,o=this._getWebGLTextureType(e.type),a=this._getInternalFormat(e.format),s=this._getRGBABufferInternalSizedFormat(e.type,a),l=e.isCube?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D;this._bindTextureDirectly(l,e,!0),this._unpackFlipY(e.invertY);var u=r.TEXTURE_2D;e.isCube&&(u=r.TEXTURE_CUBE_MAP_POSITIVE_X+i),r.texImage2D(u,n,s,a,o,t),this._bindTextureDirectly(l,null,!0)},_0xf48096.prototype.updateTextureComparisonFunction=function(e,t){if(1!==this.webGLVersion){var i=this._gl;e.isCube?(this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,e,!0),0===t?(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_FUNC,_0x333f62.LEQUAL),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_MODE,i.NONE)):(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_FUNC,t),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):(this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),0===t?(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_FUNC,_0x333f62.LEQUAL),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_MODE,i.NONE)):(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_FUNC,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),e._comparisonFunction=t}else _0x50f23a.Error("WebGL 1 does not support texture comparison.")},_0xf48096.prototype.createInstancesBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error("Unable to create instance buffer");var i=new _Meshes_WebGL_webGLDataBuffer__WEBPACK_IMPORTED_MODULE_10__.WebGLDataBuffer(t);return i.capacity=e,this.bindArrayBuffer(i),this._gl.bufferData(this._gl.ARRAY_BUFFER,e,this._gl.DYNAMIC_DRAW),i.references=1,i},_0xf48096.prototype.deleteInstancesBuffer=function(e){this._gl.deleteBuffer(e)},_0xf48096.prototype._clientWaitAsync=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=10);var n=this._gl;return new Promise((function(r,o){var a=function(){var s=n.clientWaitSync(e,t,0);s!=n.WAIT_FAILED?s!=n.TIMEOUT_EXPIRED?r():setTimeout(a,i):o()};a()}))},_0xf48096.prototype._readPixelsAsync=function(e,t,i,n,r,o,a){if(this._webGLVersion<2)throw new Error("_readPixelsAsync only work on WebGL2+");var s=this._gl,l=s.createBuffer();s.bindBuffer(s.PIXEL_PACK_BUFFER,l),s.bufferData(s.PIXEL_PACK_BUFFER,a.byteLength,s.STREAM_READ),s.readPixels(e,t,i,n,r,o,0),s.bindBuffer(s.PIXEL_PACK_BUFFER,null);var u=s.fenceSync(s.SYNC_GPU_COMMANDS_COMPLETE,0);return u?(s.flush(),this._clientWaitAsync(u,0,10).then((function(){return s.deleteSync(u),s.bindBuffer(s.PIXEL_PACK_BUFFER,l),s.getBufferSubData(s.PIXEL_PACK_BUFFER,0,a),s.bindBuffer(s.PIXEL_PACK_BUFFER,null),s.deleteBuffer(l),a}))):null},_0xf48096.prototype.dispose=function(){for(this.hideLoadingUI(),this.onNewSceneAddedObservable.clear();this.postProcesses.length;)this.postProcesses[0].dispose();for(this._rescalePostProcess&&this._rescalePostProcess.dispose();this.scenes.length;)this.scenes[0].dispose();for(;this._virtualScenes.length;)this._virtualScenes[0].dispose();1===_0xf48096.Instances.length&&_0xf48096.audioEngine&&(_0xf48096.audioEngine.dispose(),_0xf48096.audioEngine=null),this.disableVR(),(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()&&(window.removeEventListener("blur",this._onBlur),window.removeEventListener("focus",this._onFocus),this._renderingCanvas&&(this._renderingCanvas.removeEventListener("focus",this._onCanvasFocus),this._renderingCanvas.removeEventListener("blur",this._onCanvasBlur),this._renderingCanvas.removeEventListener("pointerout",this._onCanvasPointerOut)),(0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsDocumentAvailable)()&&(document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.removeEventListener("mozfullscreenchange",this._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullscreenChange),document.removeEventListener("msfullscreenchange",this._onFullscreenChange),document.removeEventListener("pointerlockchange",this._onPointerLockChange),document.removeEventListener("mspointerlockchange",this._onPointerLockChange),document.removeEventListener("mozpointerlockchange",this._onPointerLockChange),document.removeEventListener("webkitpointerlockchange",this._onPointerLockChange))),_0x265690.prototype.dispose.call(this);var e=_0xf48096.Instances.indexOf(this);e>=0&&_0xf48096.Instances.splice(e,1),this.onResizeObservable.clear(),this.onCanvasBlurObservable.clear(),this.onCanvasFocusObservable.clear(),this.onCanvasPointerOutObservable.clear(),this.onBeginFrameObservable.clear(),this.onEndFrameObservable.clear()},_0xf48096.prototype._disableTouchAction=function(){this._renderingCanvas&&this._renderingCanvas.setAttribute&&(this._renderingCanvas.setAttribute("touch-action","none"),this._renderingCanvas.style.touchAction="none",this._renderingCanvas.style.msTouchAction="none")},_0xf48096.prototype.displayLoadingUI=function(){if((0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var e=this.loadingScreen;e&&e.displayLoadingUI()}},_0xf48096.prototype.hideLoadingUI=function(){if((0,_Misc_domManagement__WEBPACK_IMPORTED_MODULE_3__.IsWindowObjectExist)()){var e=this._loadingScreen;e&&e.hideLoadingUI()}},Object.defineProperty(_0xf48096.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=_0xf48096.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(e){this._loadingScreen=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096.prototype,"loadingUIText",{set:function(e){this.loadingScreen.loadingUIText=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0xf48096.prototype,"loadingUIBackgroundColor",{set:function(e){this.loadingScreen.loadingUIBackgroundColor=e},enumerable:!1,configurable:!0}),_0xf48096.prototype.createVideoElement=function(e){return document.createElement("video")},_0xf48096._RequestPointerlock=function(e){e.requestPointerLock=e.requestPointerLock||e.msRequestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock&&(e.requestPointerLock(),e.focus())},_0xf48096._ExitPointerlock=function(){var e=document;document.exitPointerLock=document.exitPointerLock||e.msExitPointerLock||e.mozExitPointerLock||e.webkitExitPointerLock,document.exitPointerLock&&document.exitPointerLock()},_0xf48096._RequestFullscreen=function(e){var t=e.requestFullscreen||e.msRequestFullscreen||e.webkitRequestFullscreen||e.mozRequestFullScreen;t&&t.call(e)},_0xf48096._ExitFullscreen=function(){var e=document;document.exitFullscreen?document.exitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.msCancelFullScreen&&e.msCancelFullScreen()},_0xf48096.prototype.getFontOffset=function(e){var t=document.createElement("span");t.innerHTML="Hg",t.setAttribute("style","font: ".concat(e," !important"));var i=document.createElement("div");i.style.display="inline-block",i.style.width="1px",i.style.height="0px",i.style.verticalAlign="bottom";var n=document.createElement("div");n.style.whiteSpace="nowrap",n.appendChild(t),n.appendChild(i),document.body.appendChild(n);var r=0,o=0;try{o=i.getBoundingClientRect().top-t.getBoundingClientRect().top,i.style.verticalAlign="baseline",r=i.getBoundingClientRect().top-t.getBoundingClientRect().top}finally{document.body.removeChild(n)}return{ascent:r,height:o,descent:o-r}},_0xf48096.ALPHA_DISABLE=_0x333f62.ALPHA_DISABLE,_0xf48096.ALPHA_ADD=_0x333f62.ALPHA_ADD,_0xf48096.ALPHA_COMBINE=_0x333f62.ALPHA_COMBINE,_0xf48096.ALPHA_SUBTRACT=_0x333f62.ALPHA_SUBTRACT,_0xf48096.ALPHA_MULTIPLY=_0x333f62.ALPHA_MULTIPLY,_0xf48096.ALPHA_MAXIMIZED=_0x333f62.ALPHA_MAXIMIZED,_0xf48096.ALPHA_ONEONE=_0x333f62.ALPHA_ONEONE,_0xf48096.ALPHA_PREMULTIPLIED=_0x333f62.ALPHA_PREMULTIPLIED,_0xf48096.ALPHA_PREMULTIPLIED_PORTERDUFF=_0x333f62.ALPHA_PREMULTIPLIED_PORTERDUFF,_0xf48096.ALPHA_INTERPOLATE=_0x333f62.ALPHA_INTERPOLATE,_0xf48096.ALPHA_SCREENMODE=_0x333f62.ALPHA_SCREENMODE,_0xf48096.DELAYLOADSTATE_NONE=_0x333f62.DELAYLOADSTATE_NONE,_0xf48096.DELAYLOADSTATE_LOADED=_0x333f62.DELAYLOADSTATE_LOADED,_0xf48096.DELAYLOADSTATE_LOADING=_0x333f62.DELAYLOADSTATE_LOADING,_0xf48096.DELAYLOADSTATE_NOTLOADED=_0x333f62.DELAYLOADSTATE_NOTLOADED,_0xf48096.NEVER=_0x333f62.NEVER,_0xf48096.ALWAYS=_0x333f62.ALWAYS,_0xf48096.LESS=_0x333f62.LESS,_0xf48096.EQUAL=_0x333f62.EQUAL,_0xf48096.LEQUAL=_0x333f62.LEQUAL,_0xf48096.GREATER=_0x333f62.GREATER,_0xf48096.GEQUAL=_0x333f62.GEQUAL,_0xf48096.NOTEQUAL=_0x333f62.NOTEQUAL,_0xf48096.KEEP=_0x333f62.KEEP,_0xf48096.REPLACE=_0x333f62.REPLACE,_0xf48096.INCR=_0x333f62.INCR,_0xf48096.DECR=_0x333f62.DECR,_0xf48096.INVERT=_0x333f62.INVERT,_0xf48096.INCR_WRAP=_0x333f62.INCR_WRAP,_0xf48096.DECR_WRAP=_0x333f62.DECR_WRAP,_0xf48096.TEXTURE_CLAMP_ADDRESSMODE=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,_0xf48096.TEXTURE_WRAP_ADDRESSMODE=_0x333f62.TEXTURE_WRAP_ADDRESSMODE,_0xf48096.TEXTURE_MIRROR_ADDRESSMODE=_0x333f62.TEXTURE_MIRROR_ADDRESSMODE,_0xf48096.TEXTUREFORMAT_ALPHA=_0x333f62.TEXTUREFORMAT_ALPHA,_0xf48096.TEXTUREFORMAT_LUMINANCE=_0x333f62.TEXTUREFORMAT_LUMINANCE,_0xf48096.TEXTUREFORMAT_LUMINANCE_ALPHA=_0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA,_0xf48096.TEXTUREFORMAT_RGB=_0x333f62.TEXTUREFORMAT_RGB,_0xf48096.TEXTUREFORMAT_RGBA=_0x333f62.TEXTUREFORMAT_RGBA,_0xf48096.TEXTUREFORMAT_RED=_0x333f62.TEXTUREFORMAT_RED,_0xf48096.TEXTUREFORMAT_R=_0x333f62.TEXTUREFORMAT_R,_0xf48096.TEXTUREFORMAT_RG=_0x333f62.TEXTUREFORMAT_RG,_0xf48096.TEXTUREFORMAT_RED_INTEGER=_0x333f62.TEXTUREFORMAT_RED_INTEGER,_0xf48096.TEXTUREFORMAT_R_INTEGER=_0x333f62.TEXTUREFORMAT_R_INTEGER,_0xf48096.TEXTUREFORMAT_RG_INTEGER=_0x333f62.TEXTUREFORMAT_RG_INTEGER,_0xf48096.TEXTUREFORMAT_RGB_INTEGER=_0x333f62.TEXTUREFORMAT_RGB_INTEGER,_0xf48096.TEXTUREFORMAT_RGBA_INTEGER=_0x333f62.TEXTUREFORMAT_RGBA_INTEGER,_0xf48096.TEXTURETYPE_UNSIGNED_BYTE=_0x333f62.TEXTURETYPE_UNSIGNED_BYTE,_0xf48096.TEXTURETYPE_UNSIGNED_INT=_0x333f62.TEXTURETYPE_UNSIGNED_INT,_0xf48096.TEXTURETYPE_FLOAT=_0x333f62.TEXTURETYPE_FLOAT,_0xf48096.TEXTURETYPE_HALF_FLOAT=_0x333f62.TEXTURETYPE_HALF_FLOAT,_0xf48096.TEXTURETYPE_BYTE=_0x333f62.TEXTURETYPE_BYTE,_0xf48096.TEXTURETYPE_SHORT=_0x333f62.TEXTURETYPE_SHORT,_0xf48096.TEXTURETYPE_UNSIGNED_SHORT=_0x333f62.TEXTURETYPE_UNSIGNED_SHORT,_0xf48096.TEXTURETYPE_INT=_0x333f62.TEXTURETYPE_INT,_0xf48096.TEXTURETYPE_UNSIGNED_INTEGER=_0x333f62.TEXTURETYPE_UNSIGNED_INTEGER,_0xf48096.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=_0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4,_0xf48096.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=_0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1,_0xf48096.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=_0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,_0xf48096.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=_0x333f62.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV,_0xf48096.TEXTURETYPE_UNSIGNED_INT_24_8=_0x333f62.TEXTURETYPE_UNSIGNED_INT_24_8,_0xf48096.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=_0x333f62.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV,_0xf48096.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=_0x333f62.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV,_0xf48096.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=_0x333f62.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV,_0xf48096.TEXTURE_NEAREST_SAMPLINGMODE=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,_0xf48096.TEXTURE_BILINEAR_SAMPLINGMODE=_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE,_0xf48096.TEXTURE_TRILINEAR_SAMPLINGMODE=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE,_0xf48096.TEXTURE_NEAREST_NEAREST_MIPLINEAR=_0x333f62.TEXTURE_NEAREST_NEAREST_MIPLINEAR,_0xf48096.TEXTURE_LINEAR_LINEAR_MIPNEAREST=_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST,_0xf48096.TEXTURE_LINEAR_LINEAR_MIPLINEAR=_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR,_0xf48096.TEXTURE_NEAREST_NEAREST_MIPNEAREST=_0x333f62.TEXTURE_NEAREST_NEAREST_MIPNEAREST,_0xf48096.TEXTURE_NEAREST_LINEAR_MIPNEAREST=_0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST,_0xf48096.TEXTURE_NEAREST_LINEAR_MIPLINEAR=_0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR,_0xf48096.TEXTURE_NEAREST_LINEAR=_0x333f62.TEXTURE_NEAREST_LINEAR,_0xf48096.TEXTURE_NEAREST_NEAREST=_0x333f62.TEXTURE_NEAREST_NEAREST,_0xf48096.TEXTURE_LINEAR_NEAREST_MIPNEAREST=_0x333f62.TEXTURE_LINEAR_NEAREST_MIPNEAREST,_0xf48096.TEXTURE_LINEAR_NEAREST_MIPLINEAR=_0x333f62.TEXTURE_LINEAR_NEAREST_MIPLINEAR,_0xf48096.TEXTURE_LINEAR_LINEAR=_0x333f62.TEXTURE_LINEAR_LINEAR,_0xf48096.TEXTURE_LINEAR_NEAREST=_0x333f62.TEXTURE_LINEAR_NEAREST,_0xf48096.TEXTURE_EXPLICIT_MODE=_0x333f62.TEXTURE_EXPLICIT_MODE,_0xf48096.TEXTURE_SPHERICAL_MODE=_0x333f62.TEXTURE_SPHERICAL_MODE,_0xf48096.TEXTURE_PLANAR_MODE=_0x333f62.TEXTURE_PLANAR_MODE,_0xf48096.TEXTURE_CUBIC_MODE=_0x333f62.TEXTURE_CUBIC_MODE,_0xf48096.TEXTURE_PROJECTION_MODE=_0x333f62.TEXTURE_PROJECTION_MODE,_0xf48096.TEXTURE_SKYBOX_MODE=_0x333f62.TEXTURE_SKYBOX_MODE,_0xf48096.TEXTURE_INVCUBIC_MODE=_0x333f62.TEXTURE_INVCUBIC_MODE,_0xf48096.TEXTURE_EQUIRECTANGULAR_MODE=_0x333f62.TEXTURE_EQUIRECTANGULAR_MODE,_0xf48096.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=_0x333f62.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,_0xf48096.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=_0x333f62.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,_0xf48096.SCALEMODE_FLOOR=_0x333f62.SCALEMODE_FLOOR,_0xf48096.SCALEMODE_NEAREST=_0x333f62.SCALEMODE_NEAREST,_0xf48096.SCALEMODE_CEILING=_0x333f62.SCALEMODE_CEILING,_0xf48096._RescalePostProcessFactory=null,_0xf48096._RenderPassIdCounter=0;var _0x55e741=(_0x56532b=!0,function(e,t){var i=_0x56532b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56532b=!1,i}),_0x197e14=_0x55e741(void 0,(function(){return _0x197e14.toString().search("(((.+)+)+)+$").toString().constructor(_0x197e14).search("(((.+)+)+)+$")})),_0x56532b;function _0x57b60b(e,t,i,n,r,o,a,s,l,u,c,h){void 0===n&&(n=null),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null),void 0===c&&(c=""),void 0===h&&(h=_0x3b3a87.GLSL);var d,f,p,_=this;this.name=null,this.defines="",this.onCompiled=null,this.onError=null,this.onBind=null,this.uniqueId=0,this.onCompileObservable=new Observable,this.onErrorObservable=new Observable,this._onBindObservable=null,this._wasPreviouslyReady=!1,this._isDisposed=!1,this._bonesComputationForcedToCPU=!1,this._uniformBuffersNames={},this._multiTarget=!1,this._samplers={},this._isReady=!1,this._compilationError="",this._allFallbacksProcessed=!1,this._uniforms={},this._key="",this._fallbacks=null,this._vertexSourceCodeOverride="",this._fragmentSourceCodeOverride="",this._transformFeedbackVaryings=null,this._pipelineContext=null,this._vertexSourceCode="",this._fragmentSourceCode="",this._rawVertexSourceCode="",this._rawFragmentSourceCode="",this._compiledVertexWGSL="",this._compiledFragmentWGSL="",this.name=e,this._key=c;var m=void 0,g=null;if(t.attributes){var x=t;if(this._engine=i,this._attributesNames=x.attributes,this._uniformsNames=x.uniformsNames.concat(x.samplers),this._samplerList=x.samplers.slice(),this.defines=x.defines,this.onError=x.onError,this.onCompiled=x.onCompiled,this._fallbacks=x.fallbacks,this._indexParameters=x.indexParameters,this._transformFeedbackVaryings=x.transformFeedbackVaryings||null,this._multiTarget=!!x.multiTarget,this._shaderLanguage=null!==(d=x.shaderLanguage)&&void 0!==d?d:_0x3b3a87.GLSL,x.uniformBuffersNames){this._uniformBuffersNamesList=x.uniformBuffersNames.slice();for(var y=0;y<x.uniformBuffersNames.length;y++)this._uniformBuffersNames[x.uniformBuffersNames[y]]=y}g=null!==(f=x.processFinalCode)&&void 0!==f?f:null,m=null!==(p=x.processCodeAfterIncludes)&&void 0!==p?p:void 0}else this._engine=r,this.defines=null==o?"":o,this._uniformsNames=i.concat(n),this._samplerList=n?n.slice():[],this._attributesNames=t,this._uniformBuffersNamesList=[],this._shaderLanguage=h,this.onError=l,this.onCompiled=s,this._indexParameters=u,this._fallbacks=a;this._attributeLocationByName={},this.uniqueId=_0x57b60b._UniqueIdSeed++;var v,$,b=IsWindowObjectExist()?this._engine.getHostDocument():null;e.vertexSource?v="source:"+e.vertexSource:e.vertexElement?!(v=b?b.getElementById(e.vertexElement):null)&&(v=e.vertexElement):v=e.vertex||e,e.fragmentSource?$="source:"+e.fragmentSource:e.fragmentElement?!($=b?b.getElementById(e.fragmentElement):null)&&($=e.fragmentElement):$=e.fragment||e,this._processingContext=this._engine._getShaderProcessingContext(this._shaderLanguage);var T={defines:this.defines.split("\n"),indexParameters:this._indexParameters,isFragment:!1,shouldUseHighPrecisionShader:this._engine._shouldUseHighPrecisionShader,processor:this._engine._getShaderProcessor(this._shaderLanguage),supportsUniformBuffers:this._engine.supportsUniformBuffers,shadersRepository:_0x266979.GetShadersRepository(this._shaderLanguage),includesShadersStore:_0x266979.GetIncludesShadersStore(this._shaderLanguage),version:(100*this._engine.version).toString(),platformName:this._engine.shaderPlatformName,processingContext:this._processingContext,isNDCHalfZRange:this._engine.isNDCHalfZRange,useReverseDepthBuffer:this._engine.useReverseDepthBuffer,processCodeAfterIncludes:m};this._engine._getCompiledShaderFromIndexDB(this._shaderLanguage,c,((i,n,r)=>{i&&(_._compiledVertexWGSL=n,_._compiledFragmentWGSL=r),this._loadShaderAsNormal(e,v,$,g,t,T)}))}_0x197e14(),_0x57b60b.prototype._loadShaderAsNormal=function(e,t,i,n,r,o){var a=this,s=[void 0,void 0],l=function(){if(s[0]&&s[1]){o.isFragment=!0;var t=s[0],i=s[1];_0x56a2f1.Process(i,o,(function(i){n&&(i=n("fragment",i));var r=_0x56a2f1.Finalize(t,i,o);a._useFinalCode(r.vertexCode,r.fragmentCode,e)}),a._engine)}};r.vertexCode?(_0x56a2f1.Initialize(o),_0x56a2f1.Process(r.vertexCode,o,(function(e){a._rawVertexSourceCode=r.vertexCode,n&&(e=n("vertex",e)),s[0]=e,l()}),a._engine)):this._loadShader(t,"Vertex","",(function(e){_0x56a2f1.Initialize(o),_0x56a2f1.Process(e,o,(function(t){a._rawVertexSourceCode=e,n&&(t=n("vertex",t)),s[0]=t,l()}),a._engine)})),r.fragmentCode?(a._rawFragmentSourceCode=r.fragmentCode,s[1]=r.fragmentCode,l()):this._loadShader(i,"Fragment","Pixel",(function(e){a._rawFragmentSourceCode=e,s[1]=e,l()}))},Object.defineProperty(_0x57b60b,"ShadersRepository",{get:function(){return _0x266979.ShadersRepository},set:function(e){_0x266979.ShadersRepository=e},enumerable:!1,configurable:!0}),Object.defineProperty(_0x57b60b.prototype,"onBindObservable",{get:function(){return!this._onBindObservable&&(this._onBindObservable=new _Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable),this._onBindObservable},enumerable:!1,configurable:!0}),_0x57b60b.prototype._useFinalCode=function(e,t,i){if(i){var n=i.vertexElement||i.vertex||i.spectorName||i,r=i.fragmentElement||i.fragment||i.spectorName||i;this._vertexSourceCode=(this._shaderLanguage===_0x3b3a87.WGSL?"//":"")+"#define SHADER_NAME vertex:"+n+"\n"+e,this._fragmentSourceCode=(this._shaderLanguage===_0x3b3a87.WGSL?"//":"")+"#define SHADER_NAME fragment:"+r+"\n"+t}else this._vertexSourceCode=e,this._fragmentSourceCode=t;this._prepareEffect()},Object.defineProperty(_0x57b60b.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),_0x57b60b.prototype.isReady=function(){try{return this._isReadyInternal()}catch(e){return!1}},_0x57b60b.prototype._isReadyInternal=function(){return!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady},_0x57b60b.prototype.getEngine=function(){return this._engine},_0x57b60b.prototype.getPipelineContext=function(){return this._pipelineContext},_0x57b60b.prototype.getAttributesNames=function(){return this._attributesNames},_0x57b60b.prototype.getAttributeLocation=function(e){return this._attributes[e]},_0x57b60b.prototype.getAttributeLocationByName=function(e){return this._attributeLocationByName[e]},_0x57b60b.prototype.getAttributesCount=function(){return this._attributes.length},_0x57b60b.prototype.getUniformIndex=function(e){return this._uniformsNames.indexOf(e)},_0x57b60b.prototype.getUniform=function(e){return this._uniforms[e]},_0x57b60b.prototype.getSamplers=function(){return this._samplerList},_0x57b60b.prototype.getUniformNames=function(){return this._uniformsNames},_0x57b60b.prototype.getUniformBuffersNames=function(){return this._uniformBuffersNamesList},_0x57b60b.prototype.getIndexParameters=function(){return this._indexParameters},_0x57b60b.prototype.getCompilationError=function(){return this._compilationError},_0x57b60b.prototype.allFallbacksProcessed=function(){return this._allFallbacksProcessed},_0x57b60b.prototype.executeWhenCompiled=function(e){var t=this;this.isReady()?e(this):(this.onCompileObservable.add((function(t){e(t)})),(!this._pipelineContext||this._pipelineContext.isAsync)&&setTimeout((function(){t._checkIsReady(null)}),16))},_0x57b60b.prototype._checkIsReady=function(e){var t=this;try{if(this._isReadyInternal())return}catch(t){return void this._processCompilationErrors(t,e)}this._isDisposed||setTimeout((function(){t._checkIsReady(e)}),16)},_0x57b60b.prototype._loadShader=function(e,t,i,n){if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return void n(GetDOMTextContent(e));if("source:"!==e.substr(0,7))if("base64:"!==e.substr(0,7)){var r,o=_0x266979.GetShadersStore(this._shaderLanguage);if(o[e+t+"Shader"])n(o[e+t+"Shader"]);else if(i&&o[e+i+"Shader"])n(o[e+i+"Shader"]);else r="."===e[0]||"/"===e[0]||e.indexOf("http")>-1?e:_0x266979.GetShadersRepository(this._shaderLanguage)+e,this._engine._loadFile(r+"."+t.toLowerCase()+".fx",n)}else{n(window.atob(e.substr(7)))}else n(e.substr(7))},Object.defineProperty(_0x57b60b.prototype,"vertexSourceCode",{get:function(){var e,t;return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._vertexSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getVertexShaderCode())&&void 0!==t?t:this._vertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x57b60b.prototype,"fragmentSourceCode",{get:function(){var e,t;return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._fragmentSourceCodeOverride:null!==(t=null===(e=this._pipelineContext)||void 0===e?void 0:e._getFragmentShaderCode())&&void 0!==t?t:this._fragmentSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x57b60b.prototype,"rawVertexSourceCode",{get:function(){return this._rawVertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(_0x57b60b.prototype,"rawFragmentSourceCode",{get:function(){return this._rawFragmentSourceCode},enumerable:!1,configurable:!0}),_0x57b60b.prototype._rebuildProgram=function(e,t,i,n){var r=this;this._isReady=!1,this._vertexSourceCodeOverride=e,this._fragmentSourceCodeOverride=t,this.onError=function(e,t){n&&n(t)},this.onCompiled=function(){var e=r.getEngine().scenes;if(e)for(var t=0;t<e.length;t++)e[t].markAllMaterialsAsDirty(_0x333f62.MATERIAL_AllDirtyFlag);r._pipelineContext._handlesSpectorRebuildCallback(i)},this._fallbacks=null,this._prepareEffect()},_0x57b60b.prototype._prepareEffect=function(){var e=this,t=this._attributesNames,i=this.defines,n=this._pipelineContext;this._isReady=!1;try{var r=this._engine;this._pipelineContext=r.createPipelineContext(this._processingContext),this._pipelineContext._name=this._key;var o=this._rebuildProgram.bind(this);this._compiledVertexWGSL&&this._compiledFragmentWGSL?r._preparePipelineContext(this._pipelineContext,this._compiledVertexWGSL,this._compiledFragmentWGSL,!0,this._rawVertexSourceCode,this._rawFragmentSourceCode,o,null,this._transformFeedbackVaryings,this._key,_0x3b3a87.WGSL):this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?r._preparePipelineContext(this._pipelineContext,this._vertexSourceCodeOverride,this._fragmentSourceCodeOverride,!0,this._rawVertexSourceCode,this._rawFragmentSourceCode,o,null,this._transformFeedbackVaryings,this._key):r._preparePipelineContext(this._pipelineContext,this._vertexSourceCode,this._fragmentSourceCode,!1,this._rawVertexSourceCode,this._rawFragmentSourceCode,o,i,this._transformFeedbackVaryings,this._key),r._executeWhenRenderingStateIsCompiled(this._pipelineContext,(function(){if(e._attributes=[],e._pipelineContext._fillEffectInformation(e,e._uniformBuffersNames,e._uniformsNames,e._uniforms,e._samplerList,e._samplers,t,e._attributes),t)for(var i=0;i<t.length;i++){var o=t[i];e._attributeLocationByName[o]=e._attributes[i]}r.bindSamplers(e),e._compilationError="",e._isReady=!0,e.onCompiled&&e.onCompiled(e),e.onCompileObservable.notifyObservers(e),e.onCompileObservable.clear(),e._fallbacks&&e._fallbacks.unBindMesh(),n&&e.getEngine()._deletePipelineContext(n)})),this._pipelineContext.isAsync&&this._checkIsReady(n)}catch(e){this._processCompilationErrors(e,n)}},_0x57b60b.prototype._getShaderCodeAndErrorLine=function(e,t,i){var n=i?/FRAGMENT SHADER ERROR: 0:(\d+?):/:/VERTEX SHADER ERROR: 0:(\d+?):/,r=null;if(t&&e){var o=t.match(n);if(o&&2===o.length){var a=parseInt(o[1]),s=e.split("\n",-1);s.length>=a&&(r="Offending line [".concat(a,"] in ").concat(i?"fragment":"vertex"," code: ").concat(s[a-1]))}}return[e,r]},_0x57b60b.prototype._processCompilationErrors=function(e,t){var i,n,r,o,a;void 0===t&&(t=null),this._compilationError=e.message;var s=this._attributesNames,l=this._fallbacks;if(_0x50f23a.Error("Unable to compile compute effect:"),_0x50f23a.Error("Uniforms: "+this._uniformsNames.map((function(e){return" "+e}))),_0x50f23a.Error("Attributes: "+s.map((function(e){return" "+e}))),_0x50f23a.Error("Defines:\r\n"+this.defines),_0x57b60b.LogShaderCodeOnCompilationError){var u=null,c=null,h=null;(null===(r=this._pipelineContext)||void 0===r?void 0:r._getVertexShaderCode())&&(h=(i=this._getShaderCodeAndErrorLine(this._pipelineContext._getVertexShaderCode(),this._compilationError,!1))[0],u=i[1],h&&(_0x50f23a.Error("Vertex code:"),_0x50f23a.Error(h))),(null===(o=this._pipelineContext)||void 0===o?void 0:o._getFragmentShaderCode())&&(h=(n=this._getShaderCodeAndErrorLine(null===(a=this._pipelineContext)||void 0===a?void 0:a._getFragmentShaderCode(),this._compilationError,!0))[0],c=n[1],h&&(_0x50f23a.Error("Fragment code:"),_0x50f23a.Error(h))),u&&_0x50f23a.Error(u),c&&_0x50f23a.Error(c)}_0x50f23a.Error("Error: "+this._compilationError),t&&(this._pipelineContext=t,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this)),l?(this._pipelineContext=null,l.hasMoreFallbacks?(this._allFallbacksProcessed=!1,_0x50f23a.Error("Trying next fallback."),this.defines=l.reduce(this.defines,this),this._prepareEffect()):(this._allFallbacksProcessed=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this),this.onErrorObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh())):this._allFallbacksProcessed=!0},Object.defineProperty(_0x57b60b.prototype,"isSupported",{get:function(){return""===this._compilationError},enumerable:!1,configurable:!0}),_0x57b60b.prototype._bindTexture=function(e,t){this._engine._bindTexture(this._samplers[e],t,e)},_0x57b60b.prototype.setTexture=function(e,t){this._engine.setTexture(this._samplers[e],this._uniforms[e],t,e)},_0x57b60b.prototype.setDepthStencilTexture=function(e,t){this._engine.setDepthStencilTexture(this._samplers[e],this._uniforms[e],t,e)},_0x57b60b.prototype.setTextureArray=function(e,t){var i=e+"Ex";if(-1===this._samplerList.indexOf(i+"0")){for(var n=this._samplerList.indexOf(e),r=1;r<t.length;r++){var o=i+(r-1).toString();this._samplerList.splice(n+r,0,o)}for(var a=0,s=0,l=this._samplerList;s<l.length;s++){var u=l[s];this._samplers[u]=a,a+=1}}this._engine.setTextureArray(this._samplers[e],this._uniforms[e],t,e)},_0x57b60b.prototype.setTextureFromPostProcess=function(e,t){this._engine.setTextureFromPostProcess(this._samplers[e],t,e)},_0x57b60b.prototype.setTextureFromPostProcessOutput=function(e,t){this._engine.setTextureFromPostProcessOutput(this._samplers[e],t,e)},_0x57b60b.prototype.bindUniformBuffer=function(e,t){var i=this._uniformBuffersNames[t];void 0===i||_0x57b60b._BaseCache[i]===e&&this._engine._features.useUBOBindingCache||(_0x57b60b._BaseCache[i]=e,this._engine.bindUniformBufferBase(e,i,t))},_0x57b60b.prototype.bindUniformBlock=function(e,t){this._engine.bindUniformBlock(this._pipelineContext,e,t)},_0x57b60b.prototype.setInt=function(e,t){return this._pipelineContext.setInt(e,t),this},_0x57b60b.prototype.setInt2=function(e,t,i){return this._pipelineContext.setInt2(e,t,i),this},_0x57b60b.prototype.setInt3=function(e,t,i,n){return this._pipelineContext.setInt3(e,t,i,n),this},_0x57b60b.prototype.setInt4=function(e,t,i,n,r){return this._pipelineContext.setInt4(e,t,i,n,r),this},_0x57b60b.prototype.setIntArray=function(e,t){return this._pipelineContext.setIntArray(e,t),this},_0x57b60b.prototype.setIntArray2=function(e,t){return this._pipelineContext.setIntArray2(e,t),this},_0x57b60b.prototype.setIntArray3=function(e,t){return this._pipelineContext.setIntArray3(e,t),this},_0x57b60b.prototype.setIntArray4=function(e,t){return this._pipelineContext.setIntArray4(e,t),this},_0x57b60b.prototype.setFloatArray=function(e,t){return this._pipelineContext.setArray(e,t),this},_0x57b60b.prototype.setFloatArray2=function(e,t){return this._pipelineContext.setArray2(e,t),this},_0x57b60b.prototype.setFloatArray3=function(e,t){return this._pipelineContext.setArray3(e,t),this},_0x57b60b.prototype.setFloatArray4=function(e,t){return this._pipelineContext.setArray4(e,t),this},_0x57b60b.prototype.setArray=function(e,t){return this._pipelineContext.setArray(e,t),this},_0x57b60b.prototype.setArray2=function(e,t){return this._pipelineContext.setArray2(e,t),this},_0x57b60b.prototype.setArray3=function(e,t){return this._pipelineContext.setArray3(e,t),this},_0x57b60b.prototype.setArray4=function(e,t){return this._pipelineContext.setArray4(e,t),this},_0x57b60b.prototype.setMatrices=function(e,t){return this._pipelineContext.setMatrices(e,t),this},_0x57b60b.prototype.setMatrix=function(e,t){return this._pipelineContext.setMatrix(e,t),this},_0x57b60b.prototype.setMatrix3x3=function(e,t){return this._pipelineContext.setMatrix3x3(e,t),this},_0x57b60b.prototype.setMatrix2x2=function(e,t){return this._pipelineContext.setMatrix2x2(e,t),this},_0x57b60b.prototype.setFloat=function(e,t){return this._pipelineContext.setFloat(e,t),this},_0x57b60b.prototype.setBool=function(e,t){return this._pipelineContext.setInt(e,t?1:0),this},_0x57b60b.prototype.setVector2=function(e,t){return this._pipelineContext.setVector2(e,t),this},_0x57b60b.prototype.setFloat2=function(e,t,i){return this._pipelineContext.setFloat2(e,t,i),this},_0x57b60b.prototype.setVector3=function(e,t){return this._pipelineContext.setVector3(e,t),this},_0x57b60b.prototype.setFloat3=function(e,t,i,n){return this._pipelineContext.setFloat3(e,t,i,n),this},_0x57b60b.prototype.setVector4=function(e,t){return this._pipelineContext.setVector4(e,t),this},_0x57b60b.prototype.setFloat4=function(e,t,i,n,r){return this._pipelineContext.setFloat4(e,t,i,n,r),this},_0x57b60b.prototype.setColor3=function(e,t){return this._pipelineContext.setColor3(e,t),this},_0x57b60b.prototype.setColor4=function(e,t,i){return this._pipelineContext.setColor4(e,t,i),this},_0x57b60b.prototype.setDirectColor4=function(e,t){return this._pipelineContext.setDirectColor4(e,t),this},_0x57b60b.prototype.dispose=function(){this._pipelineContext&&this._pipelineContext.dispose(),this._engine._releaseEffect(this),this._isDisposed=!0},_0x57b60b.RegisterShader=function(e,t,i,n){void 0===n&&(n=_0x3b3a87.GLSL),t&&(_0x266979.GetShadersStore(n)["".concat(e,"PixelShader")]=t),i&&(_0x266979.GetShadersStore(n)["".concat(e,"VertexShader")]=i)},_0x57b60b.ResetCache=function(){_0x57b60b._BaseCache={}},_0x57b60b.LogShaderCodeOnCompilationError=!0,_0x57b60b._UniqueIdSeed=0,_0x57b60b._BaseCache={},_0x57b60b.ShadersStore=_0x266979.ShadersStore,_0x57b60b.IncludesShadersStore=_0x266979.IncludesShadersStore;var _0x662e7f=(_0x343b88=!0,function(e,t){var i=_0x343b88?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x343b88=!1,i}),_0x436079=_0x662e7f(void 0,(function(){return _0x436079.toString().search("(((.+)+)+)+$").toString().constructor(_0x436079).search("(((.+)+)+)+$")})),_0x343b88;function _0x29840c(){}_0x436079(),_0x29840c.prototype._addUniformToLeftOverUBO=function(e,t,i){var n,r;e=(n=this._getArraySize(e,t,i))[0],t=n[1],r=n[2];for(var o=0;o<this._webgpuProcessingContext.leftOverUniforms.length;o++)if(this._webgpuProcessingContext.leftOverUniforms[o].name===e)return;this._webgpuProcessingContext.leftOverUniforms.push({name:e,type:t,length:r})},_0x29840c.prototype._buildLeftOverUBO=function(){if(!this._webgpuProcessingContext.leftOverUniforms.length)return"";var e=_0x29840c.LeftOvertUBOName,t=this._webgpuProcessingContext.availableBuffers[e];return!t&&(t={binding:this._webgpuProcessingContext.getNextFreeUBOBinding()},this._webgpuProcessingContext.availableBuffers[e]=t,this._addBufferBindingDescription(e,t,_0x5213c6.BufferBindingType.Uniform,!0),this._addBufferBindingDescription(e,t,_0x5213c6.BufferBindingType.Uniform,!1)),this._generateLeftOverUBOCode(e,t)},_0x29840c.prototype._collectBindingNames=function(){for(var e=0;e<this._webgpuProcessingContext.bindGroupLayoutEntries.length;e++){var t=this._webgpuProcessingContext.bindGroupLayoutEntries[e];if(void 0!==t)for(var i=0;i<t.length;i++){var n=this._webgpuProcessingContext.bindGroupLayoutEntries[e][i],r=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[e][n.binding].name,o=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[e][n.binding].nameInArrayOfTexture;n&&(n.texture||n.externalTexture||n.storageTexture?this._webgpuProcessingContext.textureNames.push(o):n.sampler?this._webgpuProcessingContext.samplerNames.push(r):n.buffer&&this._webgpuProcessingContext.bufferNames.push(r))}else this._webgpuProcessingContext.bindGroupLayoutEntries[e]=[]}},_0x29840c.prototype._preCreateBindGroupEntries=function(){for(var e=this._webgpuProcessingContext.bindGroupEntries,t=0;t<this._webgpuProcessingContext.bindGroupLayoutEntries.length;t++){for(var i=this._webgpuProcessingContext.bindGroupLayoutEntries[t],n=[],r=0;r<i.length;r++){var o=this._webgpuProcessingContext.bindGroupLayoutEntries[t][r];o.sampler||o.texture||o.storageTexture||o.externalTexture?n.push({binding:o.binding,resource:void 0}):o.buffer&&n.push({binding:o.binding,resource:{buffer:void 0,offset:0,size:0}})}e[t]=n}},_0x29840c.prototype._addTextureBindingDescription=function(e,t,i,n,r,o){var a=t.textures[i],s=a.groupIndex,l=a.bindingIndex;if(!this._webgpuProcessingContext.bindGroupLayoutEntries[s]&&(this._webgpuProcessingContext.bindGroupLayoutEntries[s]=[],this._webgpuProcessingContext.bindGroupLayoutEntryInfo[s]=[]),!this._webgpuProcessingContext.bindGroupLayoutEntryInfo[s][l]){var u=void 0;u=null===n?this._webgpuProcessingContext.bindGroupLayoutEntries[s].push({binding:l,visibility:0,externalTexture:{}}):r?this._webgpuProcessingContext.bindGroupLayoutEntries[s].push({binding:l,visibility:0,storageTexture:{access:_0x5213c6.StorageTextureAccess.WriteOnly,format:r,viewDimension:n}}):this._webgpuProcessingContext.bindGroupLayoutEntries[s].push({binding:l,visibility:0,texture:{sampleType:t.sampleType,viewDimension:n,multisampled:t.isMultisampled}});var c=t.isTextureArray?e+i:e;this._webgpuProcessingContext.bindGroupLayoutEntryInfo[s][l]={name:e,index:u-1,nameInArrayOfTexture:c}}l=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[s][l].index,this._webgpuProcessingContext.bindGroupLayoutEntries[s][l].visibility|=o?_0x5213c6.ShaderStage.Vertex:_0x5213c6.ShaderStage.Fragment},_0x29840c.prototype._addSamplerBindingDescription=function(e,t,i){var n=t.binding,r=n.groupIndex,o=n.bindingIndex;if(!this._webgpuProcessingContext.bindGroupLayoutEntries[r]&&(this._webgpuProcessingContext.bindGroupLayoutEntries[r]=[],this._webgpuProcessingContext.bindGroupLayoutEntryInfo[r]=[]),!this._webgpuProcessingContext.bindGroupLayoutEntryInfo[r][o]){var a=this._webgpuProcessingContext.bindGroupLayoutEntries[r].push({binding:o,visibility:0,sampler:{type:t.type}});this._webgpuProcessingContext.bindGroupLayoutEntryInfo[r][o]={name:e,index:a-1}}o=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[r][o].index,this._webgpuProcessingContext.bindGroupLayoutEntries[r][o].visibility|=i?_0x5213c6.ShaderStage.Vertex:_0x5213c6.ShaderStage.Fragment},_0x29840c.prototype._addBufferBindingDescription=function(e,t,i,n){var r=t.binding,o=r.groupIndex,a=r.bindingIndex;if(!this._webgpuProcessingContext.bindGroupLayoutEntries[o]&&(this._webgpuProcessingContext.bindGroupLayoutEntries[o]=[],this._webgpuProcessingContext.bindGroupLayoutEntryInfo[o]=[]),!this._webgpuProcessingContext.bindGroupLayoutEntryInfo[o][a]){var s=this._webgpuProcessingContext.bindGroupLayoutEntries[o].push({binding:a,visibility:0,buffer:{type:i}});this._webgpuProcessingContext.bindGroupLayoutEntryInfo[o][a]={name:e,index:s-1}}a=this._webgpuProcessingContext.bindGroupLayoutEntryInfo[o][a].index,this._webgpuProcessingContext.bindGroupLayoutEntries[o][a].visibility|=n?_0x5213c6.ShaderStage.Vertex:_0x5213c6.ShaderStage.Fragment},_0x29840c.prototype._injectStartingAndEndingCode=function(e,t,i,n){if(i){var r=e.indexOf(t);if(r>=0){for(;r++<e.length&&"{"!=e.charAt(r););if(r<e.length){for(;r++<e.length&&"\n"!=e.charAt(r););if(r<e.length){var o=e.substring(0,r+1),a=e.substring(r+1);e=o+i+a}}}}if(n){var s=e.lastIndexOf("}");e=e.substring(0,s),e+=n+"\n}"}return e},_0x29840c.AutoSamplerSuffix="Sampler",_0x29840c.LeftOvertUBOName="LeftOver",_0x29840c.InternalsUBOName="Internals",_0x29840c.UniformSizes={bool:1,int:1,float:1,vec2:2,ivec2:2,vec3:3,ivec3:3,vec4:4,ivec4:4,mat2:4,mat3:12,mat4:16,i32:1,u32:1,f32:1,mat2x2:4,mat3x3:12,mat4x4:16},_0x29840c._SamplerFunctionByWebGLSamplerType={sampler2D:"sampler2D",sampler2DArray:"sampler2DArray",sampler2DShadow:"sampler2DShadow",sampler2DArrayShadow:"sampler2DArrayShadow",samplerCube:"samplerCube",sampler3D:"sampler3D"},_0x29840c._TextureTypeByWebGLSamplerType={sampler2D:"texture2D",sampler2DArray:"texture2DArray",sampler2DShadow:"texture2D",sampler2DArrayShadow:"texture2DArray",samplerCube:"textureCube",samplerCubeArray:"textureCubeArray",sampler3D:"texture3D"},_0x29840c._GpuTextureViewDimensionByWebGPUTextureType={textureCube:_0x5213c6.TextureViewDimension.Cube,textureCubeArray:_0x5213c6.TextureViewDimension.CubeArray,texture2D:_0x5213c6.TextureViewDimension.E2d,texture2DArray:_0x5213c6.TextureViewDimension.E2dArray,texture3D:_0x5213c6.TextureViewDimension.E3d},_0x29840c._SamplerTypeByWebGLSamplerType={sampler2DShadow:"samplerShadow",sampler2DArrayShadow:"samplerShadow"},_0x29840c._IsComparisonSamplerByWebGPUSamplerType={samplerShadow:!0,samplerArrayShadow:!0,sampler:!1};var _0x2ce34c=(_0xd7212b=!0,function(e,t){var i=_0xd7212b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd7212b=!1,i}),_0x30e683=_0x2ce34c(void 0,(function(){return _0x30e683.toString().search("(((.+)+)+)+$").toString().constructor(_0x30e683).search("(((.+)+)+)+$")})),_0xd7212b;function _0x2a8456(e,t){this._name="unnamed",this.shaderProcessingContext=e,this._leftOverUniformsByName={},this.engine=t}_0x30e683(),Object.defineProperty(_0x2a8456.prototype,"isAsync",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x2a8456.prototype,"isReady",{get:function(){return!!this.stages},enumerable:!1,configurable:!0}),_0x2a8456.prototype._handlesSpectorRebuildCallback=function(){},_0x2a8456.prototype._fillEffectInformation=function(e,t,i,n,r,o,a,s){var l=this.engine;e._fragmentSourceCode="",e._vertexSourceCode="";var u,c=this.shaderProcessingContext.availableTextures;for(u=0;u<r.length;u++){var h=r[u],d=c[r[u]];null==d||null==d?(r.splice(u,1),u--):o[h]=u}for(var f=0,p=l.getAttributes(this,a);f<p.length;f++){var _=p[f];s.push(_)}this.buildUniformLayout();var m=[],g=[];for(u=0;u<a.length;u++){var x=s[u];x>=0&&(m.push(a[u]),g.push(x))}this.shaderProcessingContext.attributeNamesFromEffect=m,this.shaderProcessingContext.attributeLocationsFromEffect=g},_0x2a8456.prototype.buildUniformLayout=function(){if(this.shaderProcessingContext.leftOverUniforms.length){this.uniformBuffer=new _0x5c4ccd(this.engine,void 0,void 0,"leftOver-"+this._name);for(var e=0,t=this.shaderProcessingContext.leftOverUniforms;e<t.length;e++){var i=t[e],n=i.type.replace(/^(.*?)(<.*>)?$/,"$1"),r=_0x29840c.UniformSizes[n];this.uniformBuffer.addUniform(i.name,r,i.length),this._leftOverUniformsByName[i.name]=i.type}this.uniformBuffer.create()}},_0x2a8456.prototype.dispose=function(){this.uniformBuffer&&this.uniformBuffer.dispose()},_0x2a8456.prototype.setInt=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt(e,t)},_0x2a8456.prototype.setInt2=function(e,t,i){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt2(e,t,i)},_0x2a8456.prototype.setInt3=function(e,t,i,n){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt3(e,t,i,n)},_0x2a8456.prototype.setInt4=function(e,t,i,n,r){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateInt4(e,t,i,n,r)},_0x2a8456.prototype.setIntArray=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateIntArray(e,t)},_0x2a8456.prototype.setIntArray2=function(e,t){this.setIntArray(e,t)},_0x2a8456.prototype.setIntArray3=function(e,t){this.setIntArray(e,t)},_0x2a8456.prototype.setIntArray4=function(e,t){this.setIntArray(e,t)},_0x2a8456.prototype.setArray=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateArray(e,t)},_0x2a8456.prototype.setArray2=function(e,t){this.setArray(e,t)},_0x2a8456.prototype.setArray3=function(e,t){this.setArray(e,t)},_0x2a8456.prototype.setArray4=function(e,t){this.setArray(e,t)},_0x2a8456.prototype.setMatrices=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrices(e,t)},_0x2a8456.prototype.setMatrix=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix(e,t)},_0x2a8456.prototype.setMatrix3x3=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix3x3(e,t)},_0x2a8456.prototype.setMatrix2x2=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateMatrix2x2(e,t)},_0x2a8456.prototype.setFloat=function(e,t){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat(e,t)},_0x2a8456.prototype.setVector2=function(e,t){this.setFloat2(e,t.x,t.y)},_0x2a8456.prototype.setFloat2=function(e,t,i){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat2(e,t,i)},_0x2a8456.prototype.setVector3=function(e,t){this.setFloat3(e,t.x,t.y,t.z)},_0x2a8456.prototype.setFloat3=function(e,t,i,n){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat3(e,t,i,n)},_0x2a8456.prototype.setVector4=function(e,t){this.setFloat4(e,t.x,t.y,t.z,t.w)},_0x2a8456.prototype.setFloat4=function(e,t,i,n,r){this.uniformBuffer&&this._leftOverUniformsByName[e]&&this.uniformBuffer.updateFloat4(e,t,i,n,r)},_0x2a8456.prototype.setColor3=function(e,t){this.setFloat3(e,t.r,t.g,t.b)},_0x2a8456.prototype.setColor4=function(e,t,i){this.setFloat4(e,t.r,t.g,t.b,i)},_0x2a8456.prototype.setDirectColor4=function(e,t){this.setFloat4(e,t.r,t.g,t.b,t.a)},_0x2a8456.prototype._getVertexShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.vertex},_0x2a8456.prototype._getFragmentShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.fragment};var _0x4f454c=(_0x3508a9=!0,function(e,t){var i=_0x3508a9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3508a9=!1,i}),_0x13efa0=_0x4f454c(void 0,(function(){return _0x13efa0.toString().search("(((.+)+)+)+$").toString().constructor(_0x13efa0).search("(((.+)+)+)+$")})),_0x3508a9;_0x13efa0();var _0x51aabd=4,_0x19e3c3=65536,_0x1d9cfd={mat2:2,mat3:3,mat4:4,mat2x2:2,mat3x3:3,mat4x4:4};function _0x27ae2e(e){this.shaderLanguage=e,this._attributeNextLocation=0,this._varyingNextLocation=0,this.freeGroupIndex=0,this.freeBindingIndex=0,this.availableVaryings={},this.availableAttributes={},this.availableBuffers={},this.availableTextures={},this.availableSamplers={},this.orderedAttributes=[],this.bindGroupLayoutEntries=[],this.bindGroupLayoutEntryInfo=[],this.bindGroupEntries=[],this.bufferNames=[],this.textureNames=[],this.samplerNames=[],this.leftOverUniforms=[],this._findStartingGroupBinding()}Object.defineProperty(_0x27ae2e,"KnownUBOs",{get:function(){return _0x27ae2e._SimplifiedKnownBindings?_0x27ae2e._SimplifiedKnownUBOs:_0x27ae2e._KnownUBOs},enumerable:!1,configurable:!0}),_0x27ae2e.prototype._findStartingGroupBinding=function(){var e=_0x27ae2e.KnownUBOs,t=[];for(var i in e){var n=e[i].binding;-1!==n.groupIndex&&(void 0===t[n.groupIndex]?t[n.groupIndex]=n.bindingIndex:t[n.groupIndex]=Math.max(t[n.groupIndex],n.bindingIndex))}this.freeGroupIndex=t.length-1,0===this.freeGroupIndex?(this.freeGroupIndex++,this.freeBindingIndex=0):this.freeBindingIndex=t[t.length-1]+1},_0x27ae2e.prototype.getAttributeNextLocation=function(e,t){var i;void 0===t&&(t=0);var n=this._attributeNextLocation;return this._attributeNextLocation+=(null!==(i=_0x1d9cfd[e])&&void 0!==i?i:1)*(t||1),n},_0x27ae2e.prototype.getVaryingNextLocation=function(e,t){var i;void 0===t&&(t=0);var n=this._varyingNextLocation;return this._varyingNextLocation+=(null!==(i=_0x1d9cfd[e])&&void 0!==i?i:1)*(t||1),n},_0x27ae2e.prototype.getNextFreeUBOBinding=function(){return this._getNextFreeBinding(1)},_0x27ae2e.prototype._getNextFreeBinding=function(e){if(this.freeBindingIndex>_0x19e3c3-e&&(this.freeGroupIndex++,this.freeBindingIndex=0),this.freeGroupIndex===_0x51aabd)throw"Too many textures or UBOs have been declared and it is not supported in WebGPU.";var t={groupIndex:this.freeGroupIndex,bindingIndex:this.freeBindingIndex};return this.freeBindingIndex+=e,t},_0x27ae2e._SimplifiedKnownBindings=!0,_0x27ae2e._SimplifiedKnownUBOs={Scene:{binding:{groupIndex:0,bindingIndex:0}},Light0:{binding:{groupIndex:-1,bindingIndex:-1}},Light1:{binding:{groupIndex:-1,bindingIndex:-1}},Light2:{binding:{groupIndex:-1,bindingIndex:-1}},Light3:{binding:{groupIndex:-1,bindingIndex:-1}},Light4:{binding:{groupIndex:-1,bindingIndex:-1}},Light5:{binding:{groupIndex:-1,bindingIndex:-1}},Light6:{binding:{groupIndex:-1,bindingIndex:-1}},Light7:{binding:{groupIndex:-1,bindingIndex:-1}},Light8:{binding:{groupIndex:-1,bindingIndex:-1}},Light9:{binding:{groupIndex:-1,bindingIndex:-1}},Light10:{binding:{groupIndex:-1,bindingIndex:-1}},Light11:{binding:{groupIndex:-1,bindingIndex:-1}},Light12:{binding:{groupIndex:-1,bindingIndex:-1}},Light13:{binding:{groupIndex:-1,bindingIndex:-1}},Light14:{binding:{groupIndex:-1,bindingIndex:-1}},Light15:{binding:{groupIndex:-1,bindingIndex:-1}},Light16:{binding:{groupIndex:-1,bindingIndex:-1}},Light17:{binding:{groupIndex:-1,bindingIndex:-1}},Light18:{binding:{groupIndex:-1,bindingIndex:-1}},Light19:{binding:{groupIndex:-1,bindingIndex:-1}},Light20:{binding:{groupIndex:-1,bindingIndex:-1}},Light21:{binding:{groupIndex:-1,bindingIndex:-1}},Light22:{binding:{groupIndex:-1,bindingIndex:-1}},Light23:{binding:{groupIndex:-1,bindingIndex:-1}},Light24:{binding:{groupIndex:-1,bindingIndex:-1}},Light25:{binding:{groupIndex:-1,bindingIndex:-1}},Light26:{binding:{groupIndex:-1,bindingIndex:-1}},Light27:{binding:{groupIndex:-1,bindingIndex:-1}},Light28:{binding:{groupIndex:-1,bindingIndex:-1}},Light29:{binding:{groupIndex:-1,bindingIndex:-1}},Light30:{binding:{groupIndex:-1,bindingIndex:-1}},Light31:{binding:{groupIndex:-1,bindingIndex:-1}},Material:{binding:{groupIndex:-1,bindingIndex:-1}},Mesh:{binding:{groupIndex:-1,bindingIndex:-1}},Internals:{binding:{groupIndex:-1,bindingIndex:-1}}},_0x27ae2e._KnownUBOs={Scene:{binding:{groupIndex:0,bindingIndex:0}},Light0:{binding:{groupIndex:1,bindingIndex:0}},Light1:{binding:{groupIndex:1,bindingIndex:1}},Light2:{binding:{groupIndex:1,bindingIndex:2}},Light3:{binding:{groupIndex:1,bindingIndex:3}},Light4:{binding:{groupIndex:1,bindingIndex:4}},Light5:{binding:{groupIndex:1,bindingIndex:5}},Light6:{binding:{groupIndex:1,bindingIndex:6}},Light7:{binding:{groupIndex:1,bindingIndex:7}},Light8:{binding:{groupIndex:1,bindingIndex:8}},Light9:{binding:{groupIndex:1,bindingIndex:9}},Light10:{binding:{groupIndex:1,bindingIndex:10}},Light11:{binding:{groupIndex:1,bindingIndex:11}},Light12:{binding:{groupIndex:1,bindingIndex:12}},Light13:{binding:{groupIndex:1,bindingIndex:13}},Light14:{binding:{groupIndex:1,bindingIndex:14}},Light15:{binding:{groupIndex:1,bindingIndex:15}},Light16:{binding:{groupIndex:1,bindingIndex:16}},Light17:{binding:{groupIndex:1,bindingIndex:17}},Light18:{binding:{groupIndex:1,bindingIndex:18}},Light19:{binding:{groupIndex:1,bindingIndex:19}},Light20:{binding:{groupIndex:1,bindingIndex:20}},Light21:{binding:{groupIndex:1,bindingIndex:21}},Light22:{binding:{groupIndex:1,bindingIndex:22}},Light23:{binding:{groupIndex:1,bindingIndex:23}},Light24:{binding:{groupIndex:1,bindingIndex:24}},Light25:{binding:{groupIndex:1,bindingIndex:25}},Light26:{binding:{groupIndex:1,bindingIndex:26}},Light27:{binding:{groupIndex:1,bindingIndex:27}},Light28:{binding:{groupIndex:1,bindingIndex:28}},Light29:{binding:{groupIndex:1,bindingIndex:29}},Light30:{binding:{groupIndex:1,bindingIndex:30}},Light31:{binding:{groupIndex:1,bindingIndex:31}},Material:{binding:{groupIndex:2,bindingIndex:0}},Mesh:{binding:{groupIndex:2,bindingIndex:1}},Internals:{binding:{groupIndex:2,bindingIndex:2}}};var _0x34223f=(_0x332c13=!0,function(e,t){var i=_0x332c13?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x332c13=!1,i}),_0x13203b=_0x34223f(void 0,(function(){return _0x13203b.toString().search("(((.+)+)+)+$").toString().constructor(_0x13203b).search("(((.+)+)+)+$")})),_0x332c13;function _0x4c4c07(){var e=_0x29840c.call(this,arguments)||this;return e._missingVaryings=[],e._textureArrayProcessing=[],e.shaderLanguage=_0x3b3a87.GLSL,e}function _0x4e0aea(e,t){for(var i=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),n=t.length,r=0;r<n;++r){var o=t[r];if(i.test(o))return!0}return!1}_0x13203b(),_0x4c4c07.prototype=Object.create(_0x29840c.prototype),_0x4c4c07.prototype.constructor=_0x29840c,_0x4c4c07.prototype._getArraySize=function(e,t,i){var n=0,r=e.indexOf("["),o=e.indexOf("]");if(r>0&&o>0){var a=e.substring(r+1,o);n=+a,isNaN(n)&&(n=+i[a.trim()]),e=e.substr(0,r)}return[e,t,n]},_0x4c4c07.prototype.initializeShaders=function(e){this._webgpuProcessingContext=e,this._missingVaryings.length=0,this._textureArrayProcessing.length=0},_0x4c4c07.prototype.preProcessShaderCode=function(e,t){var i="uniform ".concat(_0x29840c.InternalsUBOName," {\nfloat yFactor__;\nfloat textureOutputHeight__;\n};\n");return t?i+"##INJECTCODE##\n"+e:i+e},_0x4c4c07.prototype.varyingProcessor=function(e,t,i){this._preProcessors=i;var n=/\s*varying\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!=n){var r,o=n[1],a=n[2];t?(r=this._webgpuProcessingContext.availableVaryings[a],this._missingVaryings[r]="",void 0===r&&_0x50f23a.Warn('Invalid fragment shader: The varying named "'.concat(a,'" is not declared in the vertex shader! This declaration will be ignored.'))):(r=this._webgpuProcessingContext.getVaryingNextLocation(o,this._getArraySize(a,o,i)[2]),this._webgpuProcessingContext.availableVaryings[a]=r,this._missingVaryings[r]="layout(location = ".concat(r,") in ").concat(o," ").concat(a,";")),e=e.replace(n[0],void 0===r?"":"layout(location = ".concat(r,") ").concat(t?"in":"out"," ").concat(o," ").concat(a,";"))}return e},_0x4c4c07.prototype.attributeProcessor=function(e,t){this._preProcessors=t;var i=/\s*attribute\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!=i){var n=i[1],r=i[2],o=this._webgpuProcessingContext.getAttributeNextLocation(n,this._getArraySize(r,n,t)[2]);this._webgpuProcessingContext.availableAttributes[r]=o,this._webgpuProcessingContext.orderedAttributes[o]=r,e=e.replace(i[0],"layout(location = ".concat(o,") in ").concat(n," ").concat(r,";"))}return e},_0x4c4c07.prototype.uniformProcessor=function(e,t,i){var n,r;this._preProcessors=i;var o=/\s*uniform\s+(?:(?:highp)?|(?:mediump)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/gm.exec(e);if(null!=o){var a=o[1],s=o[2];if(0===a.indexOf("sampler")||1===a.indexOf("sampler")){var l=0;s=(n=this._getArraySize(s,a,i))[0],a=n[1],l=n[2];var u=this._webgpuProcessingContext.availableTextures[s];if(!u){u={autoBindSampler:!0,isTextureArray:l>0,isStorageTexture:!1,textures:[],sampleType:_0x5213c6.TextureSampleType.Float};for(var c=0;c<(l||1);++c)u.textures.push(this._webgpuProcessingContext.getNextFreeUBOBinding())}var h=null!==(r=_0x29840c._SamplerTypeByWebGLSamplerType[a])&&void 0!==r?r:"sampler",d=!!_0x29840c._IsComparisonSamplerByWebGPUSamplerType[h];s.indexOf("depth")>=0&&(d=!0);var f=d?_0x5213c6.SamplerBindingType.Comparison:_0x5213c6.SamplerBindingType.Filtering,p=s+_0x29840c.AutoSamplerSuffix,_=this._webgpuProcessingContext.availableSamplers[p];!_&&(_={binding:this._webgpuProcessingContext.getNextFreeUBOBinding(),type:f});var m="u"===a.charAt(0)?"u":"i"===a.charAt(0)?"i":"";m&&(a=a.substr(1));var g=d?_0x5213c6.TextureSampleType.Depth:"u"===m?_0x5213c6.TextureSampleType.Uint:"i"===m?_0x5213c6.TextureSampleType.Sint:_0x5213c6.TextureSampleType.Float;u.sampleType=g;var x=l>0,y=_.binding.groupIndex,v=_.binding.bindingIndex,$=_0x29840c._SamplerFunctionByWebGLSamplerType[a],b=_0x29840c._TextureTypeByWebGLSamplerType[a],T=_0x29840c._GpuTextureViewDimensionByWebGPUTextureType[b];if(x){var C=[];C.push("layout(set = ".concat(y,", binding = ").concat(v,") uniform ").concat(m).concat(h," ").concat(p,";")),e="\r\n";for(c=0;c<l;++c){var S=u.textures[c].groupIndex,w=u.textures[c].bindingIndex;C.push("layout(set = ".concat(S,", binding = ").concat(w,") uniform ").concat(b," ").concat(s,"Texture").concat(c,";")),e+="".concat(c>0?"\r\n":"","#define ").concat(s).concat(c," ").concat(m).concat($,"(").concat(s,"Texture").concat(c,", ").concat(p,")")}e=C.join("\r\n")+e,this._textureArrayProcessing.push(s)}else l=1,e="layout(set = ".concat(y,", binding = ").concat(v,") uniform ").concat(m).concat(h," ").concat(p,";\n layout(set = ").concat(u.textures[0].groupIndex,", binding = ").concat(u.textures[0].bindingIndex,") uniform ").concat(b," ").concat(s,"Texture;\n #define ").concat(s," ").concat(m).concat($,"(").concat(s,"Texture, ").concat(p,")");this._webgpuProcessingContext.availableTextures[s]=u,this._webgpuProcessingContext.availableSamplers[p]=_,this._addSamplerBindingDescription(p,_,!t);for(c=0;c<l;++c)this._addTextureBindingDescription(s,u,c,T,null,!t)}else this._addUniformToLeftOverUBO(s,a,i),e=""}return e},_0x4c4c07.prototype.uniformBufferProcessor=function(e,t){var i=/uniform\s+(\w+)/gm.exec(e);if(null!=i){var n=i[1],r=this._webgpuProcessingContext.availableBuffers[n];if(!r){var o=_0x27ae2e.KnownUBOs[n];r={binding:o&&-1!==o.binding.groupIndex?o.binding:this._webgpuProcessingContext.getNextFreeUBOBinding()},this._webgpuProcessingContext.availableBuffers[n]=r}this._addBufferBindingDescription(n,r,_0x5213c6.BufferBindingType.Uniform,!t),e=e.replace("uniform","layout(set = ".concat(r.binding.groupIndex,", binding = ").concat(r.binding.bindingIndex,") uniform"))}return e},_0x4c4c07.prototype.postProcessor=function(e,t,i,n,r){var o=e.search(/#extension.+GL_EXT_draw_buffers.+require/);o=-1!==e.search(/glFragData/);if(e=(e=e.replace(/#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g,"")).replace(/texture2D\s*\(/g,"texture("),i){var a,s,l=/##INJECTCODE##/,u=e.split("\n"),c=-1;for(a=0;a<u.length;++a)if(s=u[a],l.test(s)){c=a+1;break}if(c>-1&&_0x4e0aea("gl_FragColor",u)){var h=o?"":"layout(location = 0) out vec4 glFragColor;";u.splice(c,0,h),e=u.join("\n")}var d=e.indexOf("gl_FragCoord")>=0,f=d?"vec4 glFragCoord__;\n":"";e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/texture2DLodEXT\s*\(/g,"textureLod(")).replace(/textureCubeLodEXT\s*\(/g,"textureLod(")).replace(/textureCube\s*\(/g,"texture(")).replace(/gl_FragDepthEXT/g,"gl_FragDepth")).replace(/gl_FragColor/g,"glFragColor")).replace(/gl_FragData/g,"glFragData")).replace(/gl_FragCoord/g,"glFragCoord__")).replace(/dFdy/g,"(-yFactor__)*dFdy")).replace("##INJECTCODE##",f),d&&(e=this._injectStartingAndEndingCode(e,"void main","\n glFragCoord__ = gl_FragCoord;\n if (yFactor__ == 1.) {\n glFragCoord__.y = textureOutputHeight__ - glFragCoord__.y;\n }\n "))}else{if(e=(e=e.replace(/gl_InstanceID/g,"gl_InstanceIndex")).replace(/gl_VertexID/g,"gl_VertexIndex"),-1!==t.indexOf("#define MULTIVIEW"))return"#extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in;\n"+e}if(!i&&-1==e.indexOf("gl_Position.y *= yFactor__")){var p=e.lastIndexOf("}");e=e.substring(0,p),e+="gl_Position.y *= yFactor__;\n",!r.isNDCHalfZRange&&(e+="gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0;\n"),e+="}"}return e},_0x4c4c07.prototype._applyTextureArrayProcessing=function(e,t){for(var i=new RegExp(t+"\\s*\\[(.+)?\\]","gm"),n=i.exec(e);null!=n;){var r=n[1],o=+r;this._preProcessors&&isNaN(o)&&(o=+this._preProcessors[r.trim()]),e=e.replace(n[0],t+o),n=i.exec(e)}return e},_0x4c4c07.prototype._generateLeftOverUBOCode=function(e,t){for(var i="layout(set = ".concat(t.binding.groupIndex,", binding = ").concat(t.binding.bindingIndex,") uniform ").concat(e," {\n "),n=0,r=this._webgpuProcessingContext.leftOverUniforms;n<r.length;n++){var o=r[n];o.length>0?i+=" ".concat(o.type," ").concat(o.name,"[").concat(o.length,"];\n"):i+=" ".concat(o.type," ").concat(o.name,";\n")}return i+="};\n\n"},_0x4c4c07.prototype.finalizeShaders=function(e,t){for(var i=0;i<this._textureArrayProcessing.length;++i){var n=this._textureArrayProcessing[i];e=this._applyTextureArrayProcessing(e,n),t=this._applyTextureArrayProcessing(t,n)}for(i=0;i<this._missingVaryings.length;++i){var r=this._missingVaryings[i];r&&r.length>0&&(t=r+"\n"+t)}var o=this._buildLeftOverUBO();return e=o+e,t=o+t,this._collectBindingNames(),this._preCreateBindGroupEntries(),this._preProcessors=null,{vertexCode:e,fragmentCode:t}};var _0x12c200=(_0x40fc0d=!0,function(e,t){var i=_0x40fc0d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40fc0d=!1,i}),_0x8ca9f0=_0x12c200(void 0,(function(){return _0x8ca9f0.toString().search("(((.+)+)+)+$").toString().constructor(_0x8ca9f0).search("(((.+)+)+)+$")})),_0x40fc0d;function ExtractBetweenMarkers(e,t,i,n){for(var r=n,o=0,a="";r<i.length;){var s=i.charAt(r);if(a)s===a?'"'===a||"'"===a?"\\"!==i.charAt(r-1)&&(a=""):a="":"*/"===a&&"*"===s&&r+1<i.length&&("/"===i.charAt(r+1)&&(a=""),""===a&&r++);else switch(s){case e:o++;break;case t:o--;break;case'"':case"'":case"`":a=s;break;case"/":if(r+1<i.length){var l=i.charAt(r+1);"/"===l?a="\n":"*"===l&&(a="*/")}}if(r++,0===o)break}return 0===o?r-1:-1}function SkipWhitespaces(e,t){for(;t<e.length;){var i=e[t];if(" "!==i&&"\n"!==i&&"\r"!==i&&"\t"!==i&&"\n"!==i&&" "!==i)break;t++}return t}function IsIdentifierChar(e){var t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||95==t}function RemoveComments(e){for(var t=0,i="",n=!1,r=[];t<e.length;){var o=e.charAt(t);if(i)o===i?'"'===i||"'"===i?("\\"!==e.charAt(t-1)&&(i=""),r.push(o)):(i="",n=!1):"*/"===i&&"*"===o&&t+1<e.length?("/"===e.charAt(t+1)&&(i=""),""===i&&(n=!1,t++)):!n&&r.push(o);else{switch(o){case'"':case"'":case"`":i=o;break;case"/":if(t+1<e.length){var a=e.charAt(t+1);"/"===a?(i="\n",n=!0):"*"===a&&(i="*/",n=!0)}}!n&&r.push(o)}t++}return r.join("")}function FindBackward(e,t,i){for(;t>=0&&e.charAt(t)!==i;)t--;return t}function EscapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}_0x8ca9f0();var _0x43ecbd=(_0x260a68=!0,function(e,t){var i=_0x260a68?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x260a68=!1,i}),_0x2a22f3=_0x43ecbd(void 0,(function(){return _0x2a22f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a22f3).search("(((.+)+)+)+$")})),_0x260a68;_0x2a22f3();var _0x541e83="gl_VertexID",_0x1cea8e="gl_InstanceID",_0x51d2f3="gl_Position",_0x3356f5="gl_FragCoord",_0x9f8a66="gl_FrontFacing",_0x297cdd="gl_FragDepth",_0x518291="gl_FragColor",_0x2a42cf="gl_FragData",_0x340689=["gl_FragData0","gl_FragData1","gl_FragData2","gl_FragData3","gl_FragData4","gl_FragData5","gl_FragData6","gl_FragData7"],_0x579bde="uniforms",_0x30f05b="internals",_0x5b83a6={texture_1d:_0x5213c6.TextureViewDimension.E1d,texture_2d:_0x5213c6.TextureViewDimension.E2d,texture_2d_array:_0x5213c6.TextureViewDimension.E2dArray,texture_3d:_0x5213c6.TextureViewDimension.E3d,texture_cube:_0x5213c6.TextureViewDimension.Cube,texture_cube_array:_0x5213c6.TextureViewDimension.CubeArray,texture_multisampled_2d:_0x5213c6.TextureViewDimension.E2d,texture_depth_2d:_0x5213c6.TextureViewDimension.E2d,texture_depth_2d_array:_0x5213c6.TextureViewDimension.E2dArray,texture_depth_cube:_0x5213c6.TextureViewDimension.Cube,texture_depth_cube_array:_0x5213c6.TextureViewDimension.CubeArray,texture_depth_multisampled_2d:_0x5213c6.TextureViewDimension.E2d,texture_storage_1d:_0x5213c6.TextureViewDimension.E1d,texture_storage_2d:_0x5213c6.TextureViewDimension.E2d,texture_storage_2d_array:_0x5213c6.TextureViewDimension.E2dArray,texture_storage_3d:_0x5213c6.TextureViewDimension.E3d,texture_external:null};function _0x422dbd(){var e=_0x29840c.call(this,arguments)||this;return e.shaderLanguage=_0x3b3a87.WGSL,e.uniformRegexp=/uniform\s+(\w+)\s*:\s*(.+)\s*;/,e.textureRegexp=/var\s+(\w+)\s*:\s*((array<\s*)?(texture_\w+)\s*(<\s*(.+)\s*>)?\s*(,\s*\w+\s*>\s*)?);/,e.noPrecision=!0,e}_0x422dbd.prototype=Object.create(_0x29840c.prototype),_0x422dbd.prototype.constructor=_0x29840c,_0x422dbd.prototype._getArraySize=function(e,t,i){var n=0,r=t.lastIndexOf(">");if(t.indexOf("array")>=0&&r>0){for(var o=r;o>0&&" "!==t.charAt(o)&&","!==t.charAt(o);)o--;var a=t.substring(o+1,r);for(n=+a,isNaN(n)&&(n=+i[a.trim()]);o>0&&(" "===t.charAt(o)||","===t.charAt(o));)o--;t=t.substring(t.indexOf("<")+1,o+1)}return[e,t,n]},_0x422dbd.prototype.initializeShaders=function(e){this._webgpuProcessingContext=e,this._attributesWGSL=[],this._attributesDeclWGSL=[],this._attributeNamesWGSL=[],this._varyingsWGSL=[],this._varyingsDeclWGSL=[],this._varyingNamesWGSL=[],this._stridedUniformArrays=[]},_0x422dbd.prototype.preProcessShaderCode=function(e){return"struct ".concat(_0x29840c.InternalsUBOName," {\nyFactor__: f32,\ntextureOutputHeight__: f32,\n};\nvar<uniform> ").concat(_0x30f05b," : ").concat(_0x29840c.InternalsUBOName,";\n")+RemoveComments(e)},_0x422dbd.prototype.varyingProcessor=function(e,t,i){var n=/\s*varying\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s*:\s*(.+)\s*;/gm.exec(e);if(null!==n){var r,o=n[2],a=n[1];t?void 0===(r=this._webgpuProcessingContext.availableVaryings[a])&&_0x50f23a.Warn('Invalid fragment shader: The varying named "'.concat(a,'" is not declared in the vertex shader! This declaration will be ignored.')):(r=this._webgpuProcessingContext.getVaryingNextLocation(o,this._getArraySize(a,o,i)[2]),this._webgpuProcessingContext.availableVaryings[a]=r,this._varyingsWGSL.push("@location(".concat(r,") ").concat(a," : ").concat(o,",")),this._varyingsDeclWGSL.push("var<private> ".concat(a," : ").concat(o,";")),this._varyingNamesWGSL.push(a)),e=""}return e},_0x422dbd.prototype.attributeProcessor=function(e,t){var i=/\s*attribute\s+(\S+)\s*:\s*(.+)\s*;/gm.exec(e);if(null!==i){var n=i[2],r=i[1],o=this._webgpuProcessingContext.getAttributeNextLocation(n,this._getArraySize(r,n,t)[2]);this._webgpuProcessingContext.availableAttributes[r]=o,this._webgpuProcessingContext.orderedAttributes[o]=r,this._attributesWGSL.push("@location(".concat(o,") ").concat(r," : ").concat(n,",")),this._attributesDeclWGSL.push("var<private> ".concat(r," : ").concat(n,";")),this._attributeNamesWGSL.push(r),e=""}return e},_0x422dbd.prototype.uniformProcessor=function(e,t,i){var n=this.uniformRegexp.exec(e);if(null!==n){var r=n[2],o=n[1];this._addUniformToLeftOverUBO(o,r,i),e=""}return e},_0x422dbd.prototype.textureProcessor=function(e,t,i){var n=this.textureRegexp.exec(e);if(null!==n){var r=n[1],o=n[2],a=!!n[3],s=n[4],l=s.indexOf("storage")>0,u=n[6],c=l?u.substring(0,u.indexOf(",")).trim():null,h=a?this._getArraySize(r,o,i)[2]:0,d=this._webgpuProcessingContext.availableTextures[r];if(d)h=d.textures.length;else{d={isTextureArray:h>0,isStorageTexture:l,textures:[],sampleType:_0x5213c6.TextureSampleType.Float,isMultisampled:!1},h=h||1;for(var f=0;f<h;++f)d.textures.push(this._webgpuProcessingContext.getNextFreeUBOBinding())}this._webgpuProcessingContext.availableTextures[r]=d;var p=s.indexOf("depth")>0,_=_0x5b83a6[s],m=p?_0x5213c6.TextureSampleType.Depth:"u32"===u?_0x5213c6.TextureSampleType.Uint:"i32"===u?_0x5213c6.TextureSampleType.Sint:_0x5213c6.TextureSampleType.Float;d.sampleType=m;var g=!!p&&s.indexOf("multisampled")>0;if(d.isMultisampled=g,void 0===_)throw"Can't get the texture dimension corresponding to the texture function \"".concat(s,'"!');if(a){var x=[];for(f=0;f<h;++f){var y=d.textures[f].groupIndex,v=d.textures[f].bindingIndex;x.push("@group(".concat(y,") @binding(").concat(v,") ").concat("var ",r).concat(f," : ").concat(s,"<f32>;"))}e=x.join("\r\n")}else{h=1;var $=d.textures[0],b=$.groupIndex,T=$.bindingIndex;e="@group(".concat(b,") @binding(").concat(T,") ").concat(e)}for(f=0;f<h;++f)this._addTextureBindingDescription(r,d,f,_,c,!t)}return e},_0x422dbd.prototype.postProcessor=function(e){return e},_0x422dbd.prototype.finalizeShaders=function(e,t){var i=t.indexOf("gl_FragCoord")>=0?"\n if (internals.yFactor__ == 1.) {\n gl_FragCoord.y = internals.textureOutputHeight__ - gl_FragCoord.y;\n }\n ":"";e=this._processSamplers(e,!0),t=this._processSamplers(t,!1),e=this._processCustomBuffers(e,!0),t=this._processCustomBuffers(t,!1);var n=this._buildLeftOverUBO();t=n+t,e=(e=n+e).replace(/#define /g,"//#define "),e=this._processStridedUniformArrays(e);var r=this._varyingsDeclWGSL.join("\n")+"\n",o="var<private> ".concat(_0x541e83," : u32;\nvar<private> ").concat(_0x1cea8e," : u32;\nvar<private> ").concat(_0x51d2f3," : vec4<f32>;\n"),a=this._attributesDeclWGSL.join("\n")+"\n",s="struct VertexInputs {\n @builtin(vertex_index) vertexIndex : u32,\n @builtin(instance_index) instanceIndex : u32,\n";this._attributesWGSL.length>0&&(s+=this._attributesWGSL.join("\n")),s+="\n};\n";var l="struct FragmentInputs {\n @builtin(position) position : vec4<f32>,\n";this._varyingsWGSL.length>0&&(l+=this._varyingsWGSL.join("\n")),e=o+s+a+(l+="\n};\n")+r+e;for(var u=" var output : FragmentInputs;\n ".concat(_0x541e83," = input.vertexIndex;\n ").concat(_0x1cea8e," = input.instanceIndex;\n"),c=0;c<this._attributeNamesWGSL.length;++c){var h=this._attributeNamesWGSL[c];u+=" ".concat(h," = input.").concat(h,";\n")}var d=" output.position = ".concat(_0x51d2f3,";\n output.position.y = output.position.y * internals.yFactor__;\n");for(c=0;c<this._varyingNamesWGSL.length;++c){var f=this._varyingNamesWGSL[c];d+=" output.".concat(f," = ").concat(f,";\n")}d+=" return output;",e=this._injectStartingAndEndingCode(e,"fn main",u,d),t=t.replace(/#define /g,"//#define "),t=(t=this._processStridedUniformArrays(t)).replace(/dpdy/g,"(-internals.yFactor__)*dpdy");var p="var<private> ".concat(_0x3356f5," : vec4<f32>;\nvar<private> ").concat(_0x9f8a66," : bool;\nvar<private> ").concat(_0x518291," : vec4<f32>;\nvar<private> ").concat(_0x297cdd," : f32;\n");p+="var<private> ".concat(_0x340689[0]," : vec4<f32>;\nvar<private> ").concat(_0x340689[1]," : vec4<f32>;\nvar<private> ").concat(_0x340689[2]," : vec4<f32>;\nvar<private> ").concat(_0x340689[3]," : vec4<f32>;\nvar<private> ").concat(_0x340689[4]," : vec4<f32>;\nvar<private> ").concat(_0x340689[5]," : vec4<f32>;\nvar<private> ").concat(_0x340689[6]," : vec4<f32>;\nvar<private> ").concat(_0x340689[7]," : vec4<f32>;\n");var _="struct FragmentInputs {\n @builtin(position) position : vec4<f32>,\n @builtin(front_facing) frontFacing : bool,\n";this._varyingsWGSL.length>0&&(_+=this._varyingsWGSL.join("\n")),_+="\n};\n";for(var m,g=!1,x=0,y=-1;x>=0;)if((x=t.indexOf(_0x2a42cf,x))>=0){var v=x+_0x2a42cf.length,$=t.substring(v,v+1);$=parseInt($),y=Math.max($,y),g=!0,x+=_0x2a42cf.length}if(g){m="struct FragmentOutputs {\n";for(var b=0;b<y+1;b++)m+=" @location ("+b+") "+_0x340689[b]+" : vec4<f32>,\n"}else m="struct FragmentOutputs {\n @location(0) color : vec4<f32>,\n";for(var T=!1,C=0;!(T||(C=t.indexOf(_0x297cdd,C))<0);){var S=C;for(T=!0;C>1&&"\n"!==t.charAt(C);){if("/"===t.charAt(C)&&"/"===t.charAt(C-1)){T=!1;break}C--}C=S+_0x297cdd.length}T&&(m+=" @builtin(frag_depth) fragDepth: f32,\n"),t=p+_+r+(m+="};\n")+t;var w=" var output : FragmentOutputs;\n ".concat(_0x3356f5," = input.position;\n ").concat(_0x9f8a66," = input.frontFacing;\n")+i;for(c=0;c<this._varyingNamesWGSL.length;++c){var E=this._varyingNamesWGSL[c];w+=" ".concat(E," = input.").concat(E,";\n")}var P="";if(g)for(b=0;b<y+1;b++)P+=" output."+_0x340689[b]+" = "+_0x340689[b]+";\n";else P=" output.color = ".concat(_0x518291,";\n");return T&&(P+=" output.fragDepth = ".concat(_0x297cdd,";\n")),P+=" return output;",t=this._injectStartingAndEndingCode(t,"fn main",w,P),this._collectBindingNames(),this._preCreateBindGroupEntries(),{vertexCode:e,fragmentCode:t}},_0x422dbd.prototype._generateLeftOverUBOCode=function(e,t){for(var i="",n="struct ".concat(e," {\n"),r=0,o=this._webgpuProcessingContext.leftOverUniforms;r<o.length;r++){var a=o[r],s=a.type.replace(/^(.*?)(<.*>)?$/,"$1"),l=_0x29840c.UniformSizes[s];if(a.length>0)if(l<=2){var u="".concat(e,"_").concat(this._stridedUniformArrays.length,"_strided_arr");i+="struct ".concat(u," {\n @size(16)\n el: ").concat(s,",\n }"),this._stridedUniformArrays.push(a.name),n+=" @align(16) ".concat(a.name," : array<").concat(u,", ").concat(a.length,">,\n")}else n+=" ".concat(a.name," : array<").concat(a.type,", ").concat(a.length,">,\n");else n+=" ".concat(a.name," : ").concat(a.type,",\n")}return n+="};\n",n="".concat(i,"\n").concat(n),n+="@group(".concat(t.binding.groupIndex,") @binding(").concat(t.binding.bindingIndex,") var<uniform> ").concat(_0x579bde," : ").concat(e,";\n")},_0x422dbd.prototype._processSamplers=function(e,t){for(var i=/var\s+(\w+Sampler)\s*:\s*(sampler|sampler_comparison)\s*;/gm;;){var n=i.exec(e);if(null===n)break;var r=n[1],o=n[2],a=r.indexOf(_0x29840c.AutoSamplerSuffix)===r.length-_0x29840c.AutoSamplerSuffix.length?r.substring(0,r.indexOf(_0x29840c.AutoSamplerSuffix)):null,s="sampler_comparison"===o?_0x5213c6.SamplerBindingType.Comparison:_0x5213c6.SamplerBindingType.Filtering;if(a){var l=this._webgpuProcessingContext.availableTextures[a];l&&(l.autoBindSampler=!0)}var u=this._webgpuProcessingContext.availableSamplers[r];!u&&(u={binding:this._webgpuProcessingContext.getNextFreeUBOBinding(),type:s},this._webgpuProcessingContext.availableSamplers[r]=u),this._addSamplerBindingDescription(r,u,t);var c=e.substring(0,n.index),h="@group(".concat(u.binding.groupIndex,") @binding(").concat(u.binding.bindingIndex,") "),d=e.substring(n.index);e=c+h+d,i.lastIndex+=h.length}return e},_0x422dbd.prototype._processCustomBuffers=function(e,t){for(var i=/var<\s*(uniform|storage)\s*(,\s*(read|read_write)\s*)?>\s+(\S+)\s*:\s*(\S+)\s*;/gm;;){var n=i.exec(e);if(null===n)break;var r=n[1],o=n[3],a=n[4],s=n[5],l=this._webgpuProcessingContext.availableBuffers[a];if(!l){var u="uniform"===r?_0x27ae2e.KnownUBOs[s]:null,c=void 0;u?(a=s,-1===(c=u.binding).groupIndex&&(c=this._webgpuProcessingContext.getNextFreeUBOBinding())):c=this._webgpuProcessingContext.getNextFreeUBOBinding(),l={binding:c},this._webgpuProcessingContext.availableBuffers[a]=l}this._addBufferBindingDescription(a,this._webgpuProcessingContext.availableBuffers[a],"read_write"===o?_0x5213c6.BufferBindingType.Storage:"storage"===r?_0x5213c6.BufferBindingType.ReadOnlyStorage:_0x5213c6.BufferBindingType.Uniform,t);var h=l.binding.groupIndex,d=l.binding.bindingIndex,f=e.substring(0,n.index),p="@group(".concat(h,") @binding(").concat(d,") "),_=e.substring(n.index);e=f+p+_,i.lastIndex+=p.length}return e},_0x422dbd.prototype._processStridedUniformArrays=function(e){for(var t=0,i=this._stridedUniformArrays;t<i.length;t++){var n=i[t];e=e.replace(new RegExp("".concat(n,"\\s*\\[(.*)\\]"),"g"),"".concat(n,"[$1].el"))}return e};var _0x180f8a=(_0x1b1d21=!0,function(e,t){var i=_0x1b1d21?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b1d21=!1,i}),_0x23934e=_0x180f8a(void 0,(function(){return _0x23934e.toString().search("(((.+)+)+)+$").toString().constructor(_0x23934e).search("(((.+)+)+)+$")})),_0x1b1d21;function _0x2a893c(){this.colorAttachmentGPUTextures=[],this.reset()}_0x23934e(),_0x2a893c.prototype.reset=function(e){void 0===e&&(e=!1),this.renderPass=null,e&&(this.renderPassDescriptor=null,this.colorAttachmentViewDescriptor=null,this.depthAttachmentViewDescriptor=null,this.colorAttachmentGPUTextures=[],this.depthTextureFormat=void 0)};var _0x40a744=(_0x43a8cd=!0,function(e,t){var i=_0x43a8cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43a8cd=!1,i}),_0x99968d=_0x40a744(void 0,(function(){return _0x99968d.toString().search("(((.+)+)+)+$").toString().constructor(_0x99968d).search("(((.+)+)+)+$")})),_0x43a8cd;_0x99968d();var _0x2a8d7d=[0,0,3,7,0,2,6,2,4,1,5,3,1],_0x2f7342=[0,64,32,96,16,80,48,112,8],_0x335c5a=[0,128,128,0,0,0,0,128,0,0,0,0,128],_0x2855c3;function _0x2335eb(e){this._samplers={},this._device=e,this.disabled=!1}_0x2335eb.GetSamplerHashCode=function(e){var t,i,n,r=e._cachedAnisotropicFilteringLevel&&e._cachedAnisotropicFilteringLevel>1?4:1;return _0x2a8d7d[e.samplingMode]+_0x2f7342[(e._comparisonFunction||514)-512+1]+_0x335c5a[e.samplingMode]+((null!==(t=e._cachedWrapU)&&void 0!==t?t:1)<<8)+((null!==(i=e._cachedWrapV)&&void 0!==i?i:1)<<10)+((null!==(n=e._cachedWrapR)&&void 0!==n?n:1)<<12)+((e.useMipMaps?1:0)<<14)+(r<<15)},_0x2335eb._GetSamplerFilterDescriptor=function(e,t){var i,n,r,o,a,s=e.useMipMaps;switch(e.samplingMode){case _0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST:i=_0x5213c6.FilterMode.Linear,n=_0x5213c6.FilterMode.Linear,r=_0x5213c6.FilterMode.Nearest,!s&&(o=a=0);break;case _0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR:case _0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE:i=_0x5213c6.FilterMode.Linear,n=_0x5213c6.FilterMode.Linear,s?r=_0x5213c6.FilterMode.Linear:(r=_0x5213c6.FilterMode.Nearest,o=a=0);break;case _0x333f62.TEXTURE_NEAREST_NEAREST_MIPLINEAR:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Nearest,s?r=_0x5213c6.FilterMode.Linear:(r=_0x5213c6.FilterMode.Nearest,o=a=0);break;case _0x333f62.TEXTURE_NEAREST_NEAREST_MIPNEAREST:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Nearest,r=_0x5213c6.FilterMode.Nearest,!s&&(o=a=0);break;case _0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Linear,r=_0x5213c6.FilterMode.Nearest,!s&&(o=a=0);break;case _0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Linear,s?r=_0x5213c6.FilterMode.Linear:(r=_0x5213c6.FilterMode.Nearest,o=a=0);break;case _0x333f62.TEXTURE_NEAREST_LINEAR:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Linear,r=_0x5213c6.FilterMode.Nearest,o=a=0;break;case _0x333f62.TEXTURE_NEAREST_NEAREST:case _0x333f62.TEXTURE_NEAREST_SAMPLINGMODE:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Nearest,r=_0x5213c6.FilterMode.Nearest,o=a=0;break;case _0x333f62.TEXTURE_LINEAR_NEAREST_MIPNEAREST:i=_0x5213c6.FilterMode.Linear,n=_0x5213c6.FilterMode.Nearest,r=_0x5213c6.FilterMode.Nearest,!s&&(o=a=0);break;case _0x333f62.TEXTURE_LINEAR_NEAREST_MIPLINEAR:i=_0x5213c6.FilterMode.Linear,n=_0x5213c6.FilterMode.Nearest,s?r=_0x5213c6.FilterMode.Linear:(r=_0x5213c6.FilterMode.Nearest,o=a=0);break;case _0x333f62.TEXTURE_LINEAR_LINEAR:case _0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE:i=_0x5213c6.FilterMode.Linear,n=_0x5213c6.FilterMode.Linear,r=_0x5213c6.FilterMode.Nearest,o=a=0;break;case _0x333f62.TEXTURE_LINEAR_NEAREST:i=_0x5213c6.FilterMode.Linear,n=_0x5213c6.FilterMode.Nearest,r=_0x5213c6.FilterMode.Nearest,o=a=0;break;default:i=_0x5213c6.FilterMode.Nearest,n=_0x5213c6.FilterMode.Nearest,r=_0x5213c6.FilterMode.Nearest,o=a=0}return t>1&&(0!==o||0!==a)?{magFilter:_0x5213c6.FilterMode.Linear,minFilter:_0x5213c6.FilterMode.Linear,mipmapFilter:_0x5213c6.FilterMode.Linear,anisotropyEnabled:!0}:{magFilter:i,minFilter:n,mipmapFilter:r,lodMinClamp:o,lodMaxClamp:a}},_0x2335eb._GetWrappingMode=function(e){switch(e){case _0x333f62.TEXTURE_WRAP_ADDRESSMODE:return _0x5213c6.AddressMode.Repeat;case _0x333f62.TEXTURE_CLAMP_ADDRESSMODE:return _0x5213c6.AddressMode.ClampToEdge;case _0x333f62.TEXTURE_MIRROR_ADDRESSMODE:return _0x5213c6.AddressMode.MirrorRepeat}return _0x5213c6.AddressMode.Repeat},_0x2335eb._GetSamplerWrappingDescriptor=function(e){return{addressModeU:this._GetWrappingMode(e._cachedWrapU),addressModeV:this._GetWrappingMode(e._cachedWrapV),addressModeW:this._GetWrappingMode(e._cachedWrapR)}},_0x2335eb._GetSamplerDescriptor=function(e){var t=e.useMipMaps&&e._cachedAnisotropicFilteringLevel&&e._cachedAnisotropicFilteringLevel>1?4:1,i=this._GetSamplerFilterDescriptor(e,t),n=p$19(i,this._GetSamplerWrappingDescriptor(e));return n=p$19(n,{compare:e._comparisonFunction?_0x2335eb.GetCompareFunction(e._comparisonFunction):void 0,maxAnisotropy:i.anisotropyEnabled?t:1})},_0x2335eb.GetCompareFunction=function(e){switch(e){case _0x333f62.ALWAYS:return _0x5213c6.CompareFunction.Always;case _0x333f62.EQUAL:return _0x5213c6.CompareFunction.Equal;case _0x333f62.GREATER:return _0x5213c6.CompareFunction.Greater;case _0x333f62.GEQUAL:return _0x5213c6.CompareFunction.GreaterEqual;case _0x333f62.LESS:return _0x5213c6.CompareFunction.Less;case _0x333f62.LEQUAL:return _0x5213c6.CompareFunction.LessEqual;case _0x333f62.NEVER:return _0x5213c6.CompareFunction.Never;case _0x333f62.NOTEQUAL:return _0x5213c6.CompareFunction.NotEqual;default:return _0x5213c6.CompareFunction.Less}},_0x2335eb.prototype.getSampler=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=0),this.disabled)return this._device.createSampler(_0x2335eb._GetSamplerDescriptor(e));t?i=0:0===i&&(i=_0x2335eb.GetSamplerHashCode(e));var n=t?void 0:this._samplers[i];return!n&&(n=this._device.createSampler(_0x2335eb._GetSamplerDescriptor(e)),!t&&(this._samplers[i]=n)),n},function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.StencilReadMask=0]="StencilReadMask",e[e.StencilWriteMask=1]="StencilWriteMask",e[e.DepthBias=2]="DepthBias",e[e.DepthBiasSlopeScale=3]="DepthBiasSlopeScale",e[e.DepthStencilState=4]="DepthStencilState",e[e.MRTAttachments1=5]="MRTAttachments1",e[e.MRTAttachments2=6]="MRTAttachments2",e[e.RasterizationState=7]="RasterizationState",e[e.ColorStates=8]="ColorStates",e[e.ShaderStage=9]="ShaderStage",e[e.TextureStage=10]="TextureStage",e[e.VertexState=11]="VertexState",e[e.NumStates=12]="NumStates"}(_0x2855c3||(_0x2855c3={}));var _0x2d6853={0:1,1:2,768:3,769:4,770:5,771:6,772:7,773:8,774:9,775:10,776:11,32769:12,32770:13,32771:12,32772:13},_0x389b43={0:0,7680:1,7681:2,7682:3,7683:4,5386:5,34055:6,34056:7};function _0x3c1da5(e,t,i){this.mrtTextureCount=0,this._device=e,this._useTextureStage=i,this._states=new Array(30),this._statesLength=0,this._stateDirtyLowestIndex=0,this._emptyVertexBuffer=t,this._mrtFormats=[],this._parameter={token:void 0,pipeline:null},this.disabled=!1,this.vertexBuffers=[],this._kMaxVertexBufferStride=e.limits.maxVertexBufferArrayStride||2048,this.reset()}_0x3c1da5.prototype.reset=function(){this._isDirty=!0,this.vertexBuffers.length=0,this.setAlphaToCoverage(!1),this.resetDepthCullingState(),this.setClampDepth(!1),this.setDepthBias(0),this._webgpuColorFormat=[_0x5213c6.TextureFormat.BGRA8Unorm],this.setColorFormat(_0x5213c6.TextureFormat.BGRA8Unorm),this.setMRT([]),this.setAlphaBlendEnabled(!1),this.setAlphaBlendFactors([null,null,null,null],[null,null]),this.setWriteMask(15),this.setDepthStencilFormat(_0x5213c6.TextureFormat.Depth24PlusStencil8),this.setStencilEnabled(!1),this.resetStencilState(),this.setBuffers(null,null,null),this._setTextureState(0)},Object.defineProperty(_0x3c1da5.prototype,"colorFormats",{get:function(){return this._mrtAttachments1>0?this._mrtFormats:this._webgpuColorFormat},enumerable:!1,configurable:!0}),_0x3c1da5.prototype.getRenderPipeline=function(e,t,i,n){if(void 0===n&&(n=0),i>1&&(i=4),this.disabled){var r=_0x3c1da5._GetTopology(e);return this._setVertexState(t),this._parameter.pipeline=this._createRenderPipeline(t,r,i),_0x3c1da5.NumCacheMiss++,_0x3c1da5._NumPipelineCreationCurrentFrame++,this._parameter.pipeline}if(this._setShaderStage(t.uniqueId),this._setRasterizationState(e,i),this._setColorStates(),this._setDepthStencilState(),this._setVertexState(t),this._setTextureState(n),this.lastStateDirtyLowestIndex=this._stateDirtyLowestIndex,!this._isDirty&&this._parameter.pipeline)return this._stateDirtyLowestIndex=this._statesLength,_0x3c1da5.NumCacheHitWithoutHash++,this._parameter.pipeline;if(this._getRenderPipeline(this._parameter),this._isDirty=!1,this._stateDirtyLowestIndex=this._statesLength,this._parameter.pipeline)return _0x3c1da5.NumCacheHitWithHash++,this._parameter.pipeline;var o=_0x3c1da5._GetTopology(e);return this._parameter.pipeline=this._createRenderPipeline(t,o,i),this._setRenderPipeline(this._parameter),_0x3c1da5.NumCacheMiss++,_0x3c1da5._NumPipelineCreationCurrentFrame++,this._parameter.pipeline},_0x3c1da5.prototype.endFrame=function(){_0x3c1da5.NumPipelineCreationLastFrame=_0x3c1da5._NumPipelineCreationCurrentFrame,_0x3c1da5._NumPipelineCreationCurrentFrame=0},_0x3c1da5.prototype.setAlphaToCoverage=function(e){this._alphaToCoverageEnabled=e},_0x3c1da5.prototype.setFrontFace=function(e){this._frontFace=e},_0x3c1da5.prototype.setCullEnabled=function(e){this._cullEnabled=e},_0x3c1da5.prototype.setCullFace=function(e){this._cullFace=e},_0x3c1da5.prototype.setClampDepth=function(e){this._clampDepth=e},_0x3c1da5.prototype.resetDepthCullingState=function(){this.setDepthCullingState(!1,2,1,0,0,!0,!0,_0x333f62.ALWAYS)},_0x3c1da5.prototype.setDepthCullingState=function(e,t,i,n,r,o,a,s){this._depthWriteEnabled=a,this._depthTestEnabled=o,this._depthCompare=(null!=s?s:_0x333f62.ALWAYS)-512,this._cullFace=i,this._cullEnabled=e,this._frontFace=t,this.setDepthBiasSlopeScale(n),this.setDepthBias(r)},_0x3c1da5.prototype.setDepthBias=function(e){this._depthBias!==e&&(this._depthBias=e,this._states[_0x2855c3.DepthBias]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.DepthBias))},_0x3c1da5.prototype.setDepthBiasSlopeScale=function(e){this._depthBiasSlopeScale!==e&&(this._depthBiasSlopeScale=e,this._states[_0x2855c3.DepthBiasSlopeScale]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.DepthBiasSlopeScale))},_0x3c1da5.prototype.setColorFormat=function(e){this._webgpuColorFormat[0]=e,this._colorFormat=renderableTextureFormatToIndex[null!=e?e:""]},_0x3c1da5.prototype.setMRTAttachments=function(e){this.mrtAttachments=e;for(var t=0,i=0;i<e.length;++i)0!==e[i]&&(t+=1<<i);this._mrtEnabledMask!==t&&(this._mrtEnabledMask=t,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.MRTAttachments1))},_0x3c1da5.prototype.setMRT=function(e,t){var i,n;if((t=null!=t?t:e.length)>10)throw"Can't handle more than 10 attachments for a MRT in cache render pipeline!";this.mrtTextureArray=e,this.mrtTextureCount=t,this._mrtEnabledMask=65535;for(var r=[0,0],o=0,a=0,s=0,l=0;l<t;++l){var u=e[l],c=null==u?void 0:u._hardwareTexture;this._mrtFormats[s]=null!==(i=null==c?void 0:c.format)&&void 0!==i?i:this._webgpuColorFormat[0],r[o]+=renderableTextureFormatToIndex[null!==(n=this._mrtFormats[s])&&void 0!==n?n:""]<<a,s++,(a+=6)>=32&&(a=0,o++)}this._mrtFormats.length=s,(this._mrtAttachments1!==r[0]||this._mrtAttachments2!==r[1])&&(this._mrtAttachments1=r[0],this._mrtAttachments2=r[1],this._states[_0x2855c3.MRTAttachments1]=r[0],this._states[_0x2855c3.MRTAttachments2]=r[1],this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.MRTAttachments1))},_0x3c1da5.prototype.setAlphaBlendEnabled=function(e){this._alphaBlendEnabled=e},_0x3c1da5.prototype.setAlphaBlendFactors=function(e,t){this._alphaBlendFuncParams=e,this._alphaBlendEqParams=t},_0x3c1da5.prototype.setWriteMask=function(e){this._writeMask=e},_0x3c1da5.prototype.setDepthStencilFormat=function(e){this._webgpuDepthStencilFormat=e,this._depthStencilFormat=void 0===e?0:renderableTextureFormatToIndex[e]},_0x3c1da5.prototype.setDepthTestEnabled=function(e){this._depthTestEnabled=e},_0x3c1da5.prototype.setDepthWriteEnabled=function(e){this._depthWriteEnabled=e},_0x3c1da5.prototype.setDepthCompare=function(e){this._depthCompare=(null!=e?e:_0x333f62.ALWAYS)-512},_0x3c1da5.prototype.setStencilEnabled=function(e){this._stencilEnabled=e},_0x3c1da5.prototype.setStencilCompare=function(e,t){e===_0x333f62.FRONT?this._stencilFrontCompare=(null!=t?t:_0x333f62.ALWAYS)-512:this._stencilBackCompare=(null!=t?t:_0x333f62.ALWAYS)-512},_0x3c1da5.prototype.setStencilDepthFailOp=function(e,t){e===_0x333f62.FRONT?this._stencilFrontDepthFailOp=null===t?1:_0x389b43[t]:this._stencilBackDepthFailOp=null===t?1:_0x389b43[t]},_0x3c1da5.prototype.setStencilPassOp=function(e,t){e===_0x333f62.FRONT?this._stencilFrontPassOp=null===t?2:_0x389b43[t]:this._stencilBackPassOp=null===t?2:_0x389b43[t]},_0x3c1da5.prototype.setStencilFailOp=function(e,t){e===_0x333f62.FRONT?this._stencilFrontFailOp=null===t?1:_0x389b43[t]:this._stencilBackFailOp=null===t?1:_0x389b43[t]},_0x3c1da5.prototype.setStencilReadMask=function(e){this._stencilReadMask!==e&&(this._stencilReadMask=e,this._states[_0x2855c3.StencilReadMask]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.StencilReadMask))},_0x3c1da5.prototype.setStencilWriteMask=function(e){this._stencilWriteMask!==e&&(this._stencilWriteMask=e,this._states[_0x2855c3.StencilWriteMask]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.StencilWriteMask))},_0x3c1da5.prototype.resetStencilState=function(){this.setStencilState(_0x333f62.FRONT,!1,_0x333f62.ALWAYS,_0x333f62.KEEP,_0x333f62.REPLACE,_0x333f62.KEEP,255,255),this.setStencilState(_0x333f62.BACK,!1,_0x333f62.ALWAYS,_0x333f62.KEEP,_0x333f62.REPLACE,_0x333f62.KEEP,255,255)},_0x3c1da5.prototype.setStencilState=function(e,t,i,n,r,o,a,s){this._stencilEnabled=t,e===_0x333f62.FRONT?(this._stencilFrontCompare=(null!=i?i:_0x333f62.ALWAYS)-512,this._stencilFrontDepthFailOp=null===n?1:_0x389b43[n],this._stencilFrontPassOp=null===r?2:_0x389b43[r],this._stencilFrontFailOp=null===o?1:_0x389b43[o]):(this._stencilBackCompare=(null!=i?i:_0x333f62.ALWAYS)-512,this._stencilBackDepthFailOp=null===n?1:_0x389b43[n],this._stencilBackPassOp=null===r?2:_0x389b43[r],this._stencilBackFailOp=null===o?1:_0x389b43[o]),this.setStencilReadMask(a),this.setStencilWriteMask(s)},_0x3c1da5.prototype.setBuffers=function(e,t,i){this._vertexBuffers=e,this._overrideVertexBuffers=i,this._indexBuffer=t},_0x3c1da5._GetTopology=function(e){switch(e){case _0x333f62.MATERIAL_TriangleFillMode:return _0x5213c6.PrimitiveTopology.TriangleList;case _0x333f62.MATERIAL_PointFillMode:return _0x5213c6.PrimitiveTopology.PointList;case _0x333f62.MATERIAL_WireFrameFillMode:return _0x5213c6.PrimitiveTopology.LineList;case _0x333f62.MATERIAL_PointListDrawMode:return _0x5213c6.PrimitiveTopology.PointList;case _0x333f62.MATERIAL_LineListDrawMode:return _0x5213c6.PrimitiveTopology.LineList;case _0x333f62.MATERIAL_LineLoopDrawMode:throw"LineLoop is an unsupported fillmode in WebGPU";case _0x333f62.MATERIAL_LineStripDrawMode:return _0x5213c6.PrimitiveTopology.LineStrip;case _0x333f62.MATERIAL_TriangleStripDrawMode:return _0x5213c6.PrimitiveTopology.TriangleStrip;case _0x333f62.MATERIAL_TriangleFanDrawMode:throw"TriangleFan is an unsupported fillmode in WebGPU";default:return _0x5213c6.PrimitiveTopology.TriangleList}},_0x3c1da5._GetAphaBlendOperation=function(e){switch(e){case _0x333f62.GL_ALPHA_EQUATION_ADD:return _0x5213c6.BlendOperation.Add;case _0x333f62.GL_ALPHA_EQUATION_SUBTRACT:return _0x5213c6.BlendOperation.Subtract;case _0x333f62.GL_ALPHA_EQUATION_REVERSE_SUBTRACT:return _0x5213c6.BlendOperation.ReverseSubtract;case _0x333f62.GL_ALPHA_EQUATION_MIN:return _0x5213c6.BlendOperation.Min;case _0x333f62.GL_ALPHA_EQUATION_MAX:return _0x5213c6.BlendOperation.Max;default:return _0x5213c6.BlendOperation.Add}},_0x3c1da5._GetAphaBlendFactor=function(e){switch(e){case 0:return _0x5213c6.BlendFactor.Zero;case 1:return _0x5213c6.BlendFactor.One;case _0x333f62.GL_ALPHA_FUNCTION_SRC:return _0x5213c6.BlendFactor.Src;case _0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR:return _0x5213c6.BlendFactor.OneMinusSrc;case _0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA:return _0x5213c6.BlendFactor.SrcAlpha;case _0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA:return _0x5213c6.BlendFactor.OneMinusSrcAlpha;case _0x333f62.GL_ALPHA_FUNCTION_DST_ALPHA:return _0x5213c6.BlendFactor.DstAlpha;case _0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA:return _0x5213c6.BlendFactor.OneMinusDstAlpha;case _0x333f62.GL_ALPHA_FUNCTION_DST_COLOR:return _0x5213c6.BlendFactor.Dst;case _0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR:return _0x5213c6.BlendFactor.OneMinusDst;case _0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED:return _0x5213c6.BlendFactor.SrcAlphaSaturated;case _0x333f62.GL_ALPHA_FUNCTION_CONSTANT_COLOR:return _0x5213c6.BlendFactor.Constant;case _0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR:return _0x5213c6.BlendFactor.OneMinusConstant;case _0x333f62.GL_ALPHA_FUNCTION_CONSTANT_ALPHA:return _0x5213c6.BlendFactor.Constant;case _0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA:return _0x5213c6.BlendFactor.OneMinusConstant;default:return _0x5213c6.BlendFactor.One}},_0x3c1da5._GetCompareFunction=function(e){switch(e){case 0:return _0x5213c6.CompareFunction.Never;case 1:return _0x5213c6.CompareFunction.Less;case 2:return _0x5213c6.CompareFunction.Equal;case 3:return _0x5213c6.CompareFunction.LessEqual;case 4:return _0x5213c6.CompareFunction.Greater;case 5:return _0x5213c6.CompareFunction.NotEqual;case 6:return _0x5213c6.CompareFunction.GreaterEqual;case 7:return _0x5213c6.CompareFunction.Always}return _0x5213c6.CompareFunction.Never},_0x3c1da5._GetStencilOpFunction=function(e){switch(e){case 0:return _0x5213c6.StencilOperation.Zero;case 1:return _0x5213c6.StencilOperation.Keep;case 2:return _0x5213c6.StencilOperation.Replace;case 3:return _0x5213c6.StencilOperation.IncrementClamp;case 4:return _0x5213c6.StencilOperation.DecrementClamp;case 5:return _0x5213c6.StencilOperation.Invert;case 6:return _0x5213c6.StencilOperation.IncrementWrap;case 7:return _0x5213c6.StencilOperation.DecrementWrap}return _0x5213c6.StencilOperation.Keep},_0x3c1da5._GetVertexInputDescriptorFormat=function(e){var t=e.type,i=e.normalized,n=e.getSize();switch(t){case VertexBuffer.BYTE:switch(n){case 1:case 2:return i?_0x5213c6.VertexFormat.Snorm8x2:_0x5213c6.VertexFormat.Sint8x2;case 3:case 4:return i?_0x5213c6.VertexFormat.Snorm8x4:_0x5213c6.VertexFormat.Sint8x4}break;case VertexBuffer.UNSIGNED_BYTE:switch(n){case 1:case 2:return i?_0x5213c6.VertexFormat.Unorm8x2:_0x5213c6.VertexFormat.Uint8x2;case 3:case 4:return i?_0x5213c6.VertexFormat.Unorm8x4:_0x5213c6.VertexFormat.Uint8x4}break;case VertexBuffer.SHORT:switch(n){case 1:case 2:return i?_0x5213c6.VertexFormat.Snorm16x2:_0x5213c6.VertexFormat.Sint16x2;case 3:case 4:return i?_0x5213c6.VertexFormat.Snorm16x4:_0x5213c6.VertexFormat.Sint16x4}break;case VertexBuffer.UNSIGNED_SHORT:switch(n){case 1:case 2:return i?_0x5213c6.VertexFormat.Unorm16x2:_0x5213c6.VertexFormat.Uint16x2;case 3:case 4:return i?_0x5213c6.VertexFormat.Unorm16x4:_0x5213c6.VertexFormat.Uint16x4}break;case VertexBuffer.INT:switch(n){case 1:return _0x5213c6.VertexFormat.Sint32;case 2:return _0x5213c6.VertexFormat.Sint32x2;case 3:return _0x5213c6.VertexFormat.Sint32x3;case 4:return _0x5213c6.VertexFormat.Sint32x4}break;case VertexBuffer.UNSIGNED_INT:switch(n){case 1:return _0x5213c6.VertexFormat.Uint32;case 2:return _0x5213c6.VertexFormat.Uint32x2;case 3:return _0x5213c6.VertexFormat.Uint32x3;case 4:return _0x5213c6.VertexFormat.Uint32x4}break;case VertexBuffer.FLOAT:switch(n){case 1:return _0x5213c6.VertexFormat.Float32;case 2:return _0x5213c6.VertexFormat.Float32x2;case 3:return _0x5213c6.VertexFormat.Float32x3;case 4:return _0x5213c6.VertexFormat.Float32x4}}throw new Error("Invalid Format '".concat(e.getKind(),"' - type=").concat(t,", normalized=").concat(i,", size=").concat(n))},_0x3c1da5.prototype._getAphaBlendState=function(){return this._alphaBlendEnabled?{srcFactor:_0x3c1da5._GetAphaBlendFactor(this._alphaBlendFuncParams[2]),dstFactor:_0x3c1da5._GetAphaBlendFactor(this._alphaBlendFuncParams[3]),operation:_0x3c1da5._GetAphaBlendOperation(this._alphaBlendEqParams[1])}:null},_0x3c1da5.prototype._getColorBlendState=function(){return this._alphaBlendEnabled?{srcFactor:_0x3c1da5._GetAphaBlendFactor(this._alphaBlendFuncParams[0]),dstFactor:_0x3c1da5._GetAphaBlendFactor(this._alphaBlendFuncParams[1]),operation:_0x3c1da5._GetAphaBlendOperation(this._alphaBlendEqParams[0])}:null},_0x3c1da5.prototype._setShaderStage=function(e){this._shaderId!==e&&(this._shaderId=e,this._states[_0x2855c3.ShaderStage]=e,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.ShaderStage))},_0x3c1da5.prototype._setRasterizationState=function(e,t){var i=this._frontFace-1+((this._cullEnabled?this._cullFace:0)<<1)+((this._clampDepth?1:0)<<3)+((this._alphaToCoverageEnabled?1:0)<<4)+(e<<5)+(t<<8);this._rasterizationState!==i&&(this._rasterizationState=i,this._states[_0x2855c3.RasterizationState]=this._rasterizationState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.RasterizationState))},_0x3c1da5.prototype._setColorStates=function(){var e=((this._writeMask?1:0)<<22)+(this._colorFormat<<23)+((this._depthWriteEnabled?1:0)<<29);this._alphaBlendEnabled&&(e+=((null===this._alphaBlendFuncParams[0]?2:_0x2d6853[this._alphaBlendFuncParams[0]])<<0)+((null===this._alphaBlendFuncParams[1]?2:_0x2d6853[this._alphaBlendFuncParams[1]])<<4)+((null===this._alphaBlendFuncParams[2]?2:_0x2d6853[this._alphaBlendFuncParams[2]])<<8)+((null===this._alphaBlendFuncParams[3]?2:_0x2d6853[this._alphaBlendFuncParams[3]])<<12)+((null===this._alphaBlendEqParams[0]?1:this._alphaBlendEqParams[0]-32773)<<16)+((null===this._alphaBlendEqParams[1]?1:this._alphaBlendEqParams[1]-32773)<<19)),e!==this._colorStates&&(this._colorStates=e,this._states[_0x2855c3.ColorStates]=this._colorStates,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.ColorStates))},_0x3c1da5.prototype._setDepthStencilState=function(){var e=this._stencilEnabled?this._stencilFrontCompare+(this._stencilFrontDepthFailOp<<3)+(this._stencilFrontPassOp<<6)+(this._stencilFrontFailOp<<9)+(this._stencilBackCompare<<12)+(this._stencilBackDepthFailOp<<15)+(this._stencilBackPassOp<<18)+(this._stencilBackFailOp<<21):2449408,t=this._depthStencilFormat+((this._depthTestEnabled?this._depthCompare:7)<<6)+(e<<10);this._depthStencilState!==t&&(this._depthStencilState=t,this._states[_0x2855c3.DepthStencilState]=this._depthStencilState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.DepthStencilState))},_0x3c1da5.prototype._setVertexState=function(e){for(var t,i,n,r=this._statesLength,o=_0x2855c3.VertexState,a=e._pipelineContext,s=a.shaderProcessingContext.attributeNamesFromEffect,l=a.shaderProcessingContext.attributeLocationsFromEffect,u=0,c=0;c<s.length;c++){var h=l[c],d=null!==(t=this._overrideVertexBuffers&&this._overrideVertexBuffers[s[c]])&&void 0!==t?t:this._vertexBuffers[s[c]];!d&&(d=this._emptyVertexBuffer);var f=null===(i=d.getBuffer())||void 0===i?void 0:i.underlyingResource;if(void 0===d._validOffsetRange){var p=d.byteOffset,_=d.getSize(!0),m=d.byteStride;d._validOffsetRange=p<=this._kMaxVertexBufferStride-_&&(0===m||p+_<=m)}(!n||n!==f||!d._validOffsetRange)&&(this.vertexBuffers[u++]=d,n=d._validOffsetRange?f:null);var g=d.hashCode+(h<<7);this._isDirty=this._isDirty||this._states[o]!==g,this._states[o++]=g}this.vertexBuffers.length=u,this._statesLength=o,this._isDirty=this._isDirty||o!==r,this._isDirty&&(this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.VertexState))},_0x3c1da5.prototype._setTextureState=function(e){this._textureState!==e&&(this._textureState=e,this._states[_0x2855c3.TextureStage]=this._textureState,this._isDirty=!0,this._stateDirtyLowestIndex=Math.min(this._stateDirtyLowestIndex,_0x2855c3.TextureStage))},_0x3c1da5.prototype._createPipelineLayout=function(e){if(this._useTextureStage)return this._createPipelineLayoutWithTextureStage(e);for(var t=[],i=e.shaderProcessingContext.bindGroupLayoutEntries,n=0;n<i.length;n++){var r=i[n];t[n]=this._device.createBindGroupLayout({entries:r})}return e.bindGroupLayouts=t,this._device.createPipelineLayout({bindGroupLayouts:t})},_0x3c1da5.prototype._createPipelineLayoutWithTextureStage=function(e){for(var t,i=e.shaderProcessingContext,n=i.bindGroupLayoutEntries,r=1,o=0;o<n.length;o++)for(var a=n[o],s=0;s<a.length;s++){var l=n[o][s];if(l.texture){var u=i.bindGroupLayoutEntryInfo[o][l.binding].name,c=i.availableTextures[u],h=c.autoBindSampler?i.availableSamplers[u+_0x29840c.AutoSamplerSuffix]:null,d=c.sampleType,f=null!==(t=null==h?void 0:h.type)&&void 0!==t?t:_0x5213c6.SamplerBindingType.Filtering;if(this._textureState&r&&d!==_0x5213c6.TextureSampleType.Depth&&(c.autoBindSampler&&(f=_0x5213c6.SamplerBindingType.NonFiltering),d=_0x5213c6.TextureSampleType.UnfilterableFloat),l.texture.sampleType=d,h){var p=i.bindGroupLayoutEntryInfo[h.binding.groupIndex][h.binding.bindingIndex].index;n[h.binding.groupIndex][p].sampler.type=f}r<<=1}}var _=[];for(o=0;o<n.length;++o)_[o]=this._device.createBindGroupLayout({entries:n[o]});return e.bindGroupLayouts=_,this._device.createPipelineLayout({bindGroupLayouts:_})},_0x3c1da5.prototype._getVertexInputDescriptor=function(e){for(var t,i,n,r,o=[],a=e._pipelineContext,s=a.shaderProcessingContext.attributeNamesFromEffect,l=a.shaderProcessingContext.attributeLocationsFromEffect,u=0;u<s.length;u++){var c=l[u],h=null!==(t=this._overrideVertexBuffers&&this._overrideVertexBuffers[s[u]])&&void 0!==t?t:this._vertexBuffers[s[u]];!h&&(h=this._emptyVertexBuffer);var d=null===(i=h.getBuffer())||void 0===i?void 0:i.underlyingResource,f=h.byteOffset,p=!h._validOffsetRange;if(!n||!r||n!==d||p){var _={arrayStride:h.byteStride,stepMode:h.getIsInstanced()?_0x5213c6.InputStepMode.Instance:_0x5213c6.InputStepMode.Vertex,attributes:[]};o.push(_),r=_.attributes,p&&(f=0,d=null)}r.push({shaderLocation:c,offset:f,format:_0x3c1da5._GetVertexInputDescriptorFormat(h)}),n=d}return o},_0x3c1da5.prototype._createRenderPipeline=function(e,t,i){var n=e._pipelineContext,r=this._getVertexInputDescriptor(e),o=this._createPipelineLayout(n),a=[],s=this._getAphaBlendState(),l=this._getColorBlendState();if(this._mrtAttachments1>0)for(var u=0;u<this._mrtFormats.length;++u){var c=this._mrtFormats[u];if(c){var h={format:c,writeMask:0!=(this._mrtEnabledMask&1<<u)?this._writeMask:0};s&&l&&(h.blend={alpha:s,color:l}),a.push(h)}else a.push(null)}else if(this._webgpuColorFormat[0]){h={format:this._webgpuColorFormat[0],writeMask:this._writeMask};s&&l&&(h.blend={alpha:s,color:l}),a.push(h)}else a.push(null);var d={compare:_0x3c1da5._GetCompareFunction(this._stencilEnabled?this._stencilFrontCompare:7),depthFailOp:_0x3c1da5._GetStencilOpFunction(this._stencilEnabled?this._stencilFrontDepthFailOp:1),failOp:_0x3c1da5._GetStencilOpFunction(this._stencilEnabled?this._stencilFrontFailOp:1),passOp:_0x3c1da5._GetStencilOpFunction(this._stencilEnabled?this._stencilFrontPassOp:1)},f={compare:_0x3c1da5._GetCompareFunction(this._stencilEnabled?this._stencilBackCompare:7),depthFailOp:_0x3c1da5._GetStencilOpFunction(this._stencilEnabled?this._stencilBackDepthFailOp:1),failOp:_0x3c1da5._GetStencilOpFunction(this._stencilEnabled?this._stencilBackFailOp:1),passOp:_0x3c1da5._GetStencilOpFunction(this._stencilEnabled?this._stencilBackPassOp:1)},p=void 0;(t===_0x5213c6.PrimitiveTopology.LineStrip||t===_0x5213c6.PrimitiveTopology.TriangleStrip)&&(p=!this._indexBuffer||this._indexBuffer.is32Bits?_0x5213c6.IndexFormat.Uint32:_0x5213c6.IndexFormat.Uint16);var _=!!this._webgpuDepthStencilFormat&&WebGPUTextureHelper.HasStencilAspect(this._webgpuDepthStencilFormat);return this._device.createRenderPipeline({layout:o,vertex:{module:n.stages.vertexStage.module,entryPoint:n.stages.vertexStage.entryPoint,buffers:r},primitive:{topology:t,stripIndexFormat:p,frontFace:1===this._frontFace?_0x5213c6.FrontFace.CCW:_0x5213c6.FrontFace.CW,cullMode:this._cullEnabled?2===this._cullFace?_0x5213c6.CullMode.Front:_0x5213c6.CullMode.Back:_0x5213c6.CullMode.None},fragment:n.stages.fragmentStage?{module:n.stages.fragmentStage.module,entryPoint:n.stages.fragmentStage.entryPoint,targets:a}:void 0,multisample:{count:i},depthStencil:void 0===this._webgpuDepthStencilFormat?void 0:{depthWriteEnabled:this._depthWriteEnabled,depthCompare:this._depthTestEnabled?_0x3c1da5._GetCompareFunction(this._depthCompare):_0x5213c6.CompareFunction.Always,format:this._webgpuDepthStencilFormat,stencilFront:this._stencilEnabled&&_?d:void 0,stencilBack:this._stencilEnabled&&_?f:void 0,stencilReadMask:this._stencilEnabled&&_?this._stencilReadMask:void 0,stencilWriteMask:this._stencilEnabled&&_?this._stencilWriteMask:void 0,depthBias:this._depthBias,depthBiasClamp:this._depthBiasClamp,depthBiasSlopeScale:this._depthBiasSlopeScale}})},_0x3c1da5.NumCacheHitWithoutHash=0,_0x3c1da5.NumCacheHitWithHash=0,_0x3c1da5.NumCacheMiss=0,_0x3c1da5.NumPipelineCreationLastFrame=0,_0x3c1da5._NumPipelineCreationCurrentFrame=0;var _0x356dce=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));function n(){this.values={}}return i(),n.prototype.count=function(){var e=0,t=this.pipeline?1:0;for(var i in this.values){var n=this.values[i].count();e+=n[0],t+=n[1],e++}return[e,t]},n}();function _0x3a822c(e,t,i){var n=_0x3c1da5.call(this,e,t,i)||this;return n._nodeStack=[],n._nodeStack[0]=_0x3a822c._Cache,n}_0x3a822c.prototype=Object.create(_0x3c1da5.prototype),_0x3a822c.prototype.constructor=_0x3c1da5,_0x3a822c.GetNodeCounts=function(){var e=_0x3a822c._Cache.count();return{nodeCount:e[0],pipelineCount:e[1]}},_0x3a822c._GetPipelines=function(e,t,i,n){if(e.pipeline){var r=i.slice();r.length=n,t.push(r)}for(var o in e.values){var a=e.values[o];i[n]=parseInt(o),_0x3a822c._GetPipelines(a,t,i,n+1)}},_0x3a822c.GetPipelines=function(){var e=[];return _0x3a822c._GetPipelines(_0x3a822c._Cache,e,[],0),e},_0x3a822c.prototype._getRenderPipeline=function(e){for(var t=this._nodeStack[this._stateDirtyLowestIndex],i=this._stateDirtyLowestIndex;i<this._statesLength;++i){var n=t.values[this._states[i]];!n&&(n=new _0x356dce,t.values[this._states[i]]=n),t=n,this._nodeStack[i+1]=t}e.token=t,e.pipeline=t.pipeline},_0x3a822c.prototype._setRenderPipeline=function(e){e.token.pipeline=e.pipeline},_0x3a822c._Cache=new _0x356dce;var _0x548e0a=(_0x2473a2=!0,function(e,t){var i=_0x2473a2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2473a2=!1,i}),_0x55e1cb=_0x548e0a(void 0,(function(){return _0x55e1cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x55e1cb).search("(((.+)+)+)+$")})),_0x2473a2;function _0x32b365(e){var t=_0x588382.call(this,!1)||this;return t._cache=e,t.reset(),t}_0x55e1cb(),_0x32b365.prototype=Object.create(_0x588382.prototype),_0x32b365.prototype.constructor=_0x588382,Object.defineProperty(_0x32b365.prototype,"frontFunc",{get:function(){return this._frontFunc},set:function(e){this._frontFunc!==e&&(this._frontFunc=e,this._cache.setStencilCompare(_0x333f62.FRONT,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"backFunc",{get:function(){return this._backFunc},set:function(e){this._backFunc!==e&&(this._backFunc=e,this._cache.setStencilCompare(_0x333f62.BACK,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"funcMask",{get:function(){return this._funcMask},set:function(e){this._funcMask!==e&&(this._funcMask=e,this._cache.setStencilReadMask(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"frontOpStencilFail",{get:function(){return this._frontOpStencilFail},set:function(e){this._frontOpStencilFail!==e&&(this._frontOpStencilFail=e,this._cache.setStencilFailOp(_0x333f62.FRONT,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"backOpStencilFail",{get:function(){return this._backOpStencilFail},set:function(e){this._backOpStencilFail!==e&&(this._backOpStencilFail=e,this._cache.setStencilFailOp(_0x333f62.BACK,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"frontOpDepthFail",{get:function(){return this._frontOpDepthFail},set:function(e){this._frontOpDepthFail!==e&&(this._frontOpDepthFail=e,this._cache.setStencilDepthFailOp(_0x333f62.FRONT,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"backOpDepthFail",{get:function(){return this._backOpDepthFail},set:function(e){this._backOpDepthFail!==e&&(this._backOpDepthFail=e,this._cache.setStencilDepthFailOp(_0x333f62.BACK,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"frontOpStencilDepthPass",{get:function(){return this._frontOpStencilDepthPass},set:function(e){this._frontOpStencilDepthPass!==e&&(this._frontOpStencilDepthPass=e,this._cache.setStencilPassOp(_0x333f62.FRONT,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"backOpStencilDepthPass",{get:function(){return this._backOpStencilDepthPass},set:function(e){this._backOpStencilDepthPass!==e&&(this._backOpStencilDepthPass=e,this._cache.setStencilPassOp(_0x333f62.BACK,e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask!==e&&(this._mask=e,this._cache.setStencilWriteMask(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x32b365.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,this._cache.setStencilEnabled(e))},enumerable:!1,configurable:!0}),_0x32b365.prototype.reset=function(){var e;this.stencilMaterial=void 0,null===(e=this.stencilGlobal)||void 0===e||e.reset(),this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0,this._cache.resetStencilState()},_0x32b365.prototype.apply=function(){var e,t=null===(e=this.stencilMaterial)||void 0===e?void 0:e.enabled;this.enabled=t?this.stencilMaterial.enabled:this.stencilGlobal.enabled,this.enabled&&(this.frontFunc=t?this.stencilMaterial.frontFunc:this.stencilGlobal.frontFunc,this.backFunc=t?this.stencilMaterial.backFunc:this.stencilGlobal.backFunc,this.funcRef=t?this.stencilMaterial.funcRef:this.stencilGlobal.funcRef,this.funcMask=t?this.stencilMaterial.funcMask:this.stencilGlobal.funcMask,this.frontOpStencilFail=t?this.stencilMaterial.frontOpStencilFail:this.stencilGlobal.frontOpStencilFail,this.backOpStencilFail=t?this.stencilMaterial.backOpStencilFail:this.stencilGlobal.backOpStencilFail,this.frontOpDepthFail=t?this.stencilMaterial.frontOpDepthFail:this.stencilGlobal.frontOpDepthFail,this.backOpDepthFail=t?this.stencilMaterial.backOpDepthFail:this.stencilGlobal.backOpDepthFail,this.frontOpStencilDepthPass=t?this.stencilMaterial.frontOpStencilDepthPass:this.stencilGlobal.frontOpStencilDepthPass,this.backOpStencilDepthPass=t?this.stencilMaterial.backOpStencilDepthPass:this.stencilGlobal.backOpStencilDepthPass,this.mask=t?this.stencilMaterial.mask:this.stencilGlobal.mask)};var _0x40aa46=(_0x1dacf0=!0,function(e,t){var i=_0x1dacf0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1dacf0=!1,i}),_0x3f8cce=_0x40aa46(void 0,(function(){return _0x3f8cce.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f8cce).search("(((.+)+)+)+$")})),_0x1dacf0;function _0x5bc595(e){var t=_0x168153.call(this,!1)||this;return t._cache=e,t.reset(),t}_0x3f8cce(),_0x5bc595.prototype=Object.create(_0x168153.prototype),_0x5bc595.prototype.constructor=_0x168153,Object.defineProperty(_0x5bc595.prototype,"zOffset",{get:function(){return this._zOffset},set:function(e){this._zOffset!==e&&(this._zOffset=e,this._isZOffsetDirty=!0,this._cache.setDepthBiasSlopeScale(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"zOffsetUnits",{get:function(){return this._zOffsetUnits},set:function(e){this._zOffsetUnits!==e&&(this._zOffsetUnits=e,this._isZOffsetDirty=!0,this._cache.setDepthBias(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"cullFace",{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,this._isCullFaceDirty=!0,this._cache.setCullFace(null!=e?e:1))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"cull",{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this._isCullDirty=!0,this._cache.setCullEnabled(!!e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"depthFunc",{get:function(){return this._depthFunc},set:function(e){this._depthFunc!==e&&(this._depthFunc=e,this._isDepthFuncDirty=!0,this._cache.setDepthCompare(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"depthMask",{get:function(){return this._depthMask},set:function(e){this._depthMask!==e&&(this._depthMask=e,this._isDepthMaskDirty=!0,this._cache.setDepthWriteEnabled(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"depthTest",{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._isDepthTestDirty=!0,this._cache.setDepthTestEnabled(e))},enumerable:!1,configurable:!0}),Object.defineProperty(_0x5bc595.prototype,"frontFace",{get:function(){return this._frontFace},set:function(e){this._frontFace!==e&&(this._frontFace=e,this._isFrontFaceDirty=!0,this._cache.setFrontFace(null!=e?e:2))},enumerable:!1,configurable:!0}),_0x5bc595.prototype.reset=function(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._zOffsetUnits=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!0,this._isFrontFaceDirty=!1,this._cache.resetDepthCullingState()},_0x5bc595.prototype.apply=function(){};var _0x4f5a3f=(_0x201b27=!0,function(e,t){var i=_0x201b27?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x201b27=!1,i}),_0x6e438=_0x4f5a3f(void 0,(function(){return _0x6e438.toString().search("(((.+)+)+)+$").toString().constructor(_0x6e438).search("(((.+)+)+)+$")})),_0x201b27;function _0x5228e4$1(e){this.useMipMaps=!1,this.type=_0x333f62.TEXTURETYPE_UNDEFINED,this._video=e,this.uniqueId=InternalTexture._Counter++}_0x6e438(),_0x5228e4$1.IsExternalTexture=function(e){return void 0!==e.underlyingResource},_0x5228e4$1.prototype.getClassName=function(){return"ExternalTexture"},Object.defineProperty(_0x5228e4$1.prototype,"underlyingResource",{get:function(){return this._video},enumerable:!1,configurable:!0}),_0x5228e4$1.prototype.isReady=function(){return this._video.readyState>=this._video.HAVE_CURRENT_DATA},_0x5228e4$1.prototype.dispose=function(){};var _0x16d1db=(_0x2cfa12=!0,function(e,t){var i=_0x2cfa12?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2cfa12=!1,i}),_0x10f6bb=_0x16d1db(void 0,(function(){return _0x10f6bb.toString().search("(((.+)+)+)+$").toString().constructor(_0x10f6bb).search("(((.+)+)+)+$")})),_0x2cfa12;function _0x4aeff2(){this.uniqueId=_0x4aeff2._Counter++,this.updateId=0,this.reset()}_0x10f6bb(),Object.defineProperty(_0x4aeff2.prototype,"forceBindGroupCreation",{get:function(){return this._numExternalTextures>0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x4aeff2.prototype,"hasFloatTextures",{get:function(){return this._numFloatTextures>0},enumerable:!1,configurable:!0}),_0x4aeff2.prototype.reset=function(){this.samplers={},this.textures={},this.isDirty=!0,this._numFloatTextures=0,this._numExternalTextures=0},_0x4aeff2.prototype.setSampler=function(e,t){var i=this.samplers[e],n=-1;i?n=i.hashCode:this.samplers[e]=i={sampler:t,hashCode:0},i.sampler=t,i.hashCode=t?_0x2335eb.GetSamplerHashCode(t):0;var r=n!==i.hashCode;r&&this.updateId++,this.isDirty||(this.isDirty=r)},_0x4aeff2.prototype.setTexture=function(e,t){var i,n,r,o=this.textures[e],a=-1;o?a=null!==(n=null===(i=o.texture)||void 0===i?void 0:i.uniqueId)&&void 0!==n?n:-1:this.textures[e]=o={texture:t,isFloatTexture:!1,isExternalTexture:!1},o.isExternalTexture&&this._numExternalTextures--,o.isFloatTexture&&this._numFloatTextures--,t?(o.isFloatTexture=t.type===_0x333f62.TEXTURETYPE_FLOAT,o.isExternalTexture=_0x5228e4$1.IsExternalTexture(t),o.isFloatTexture&&this._numFloatTextures++,o.isExternalTexture&&this._numExternalTextures++):(o.isFloatTexture=!1,o.isExternalTexture=!1),o.texture=t;var s=a!==(null!==(r=null==t?void 0:t.uniqueId)&&void 0!==r?r:-1);s&&this.updateId++,this.isDirty||(this.isDirty=s)},_0x4aeff2._Counter=0;var _0x4bbd8f=(_0x81571a=!0,function(e,t){var i=_0x81571a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x81571a=!1,i}),_0x2811fd=_0x4bbd8f(void 0,(function(){return _0x2811fd.toString().search("(((.+)+)+)+$").toString().constructor(_0x2811fd).search("(((.+)+)+)+$")})),_0x81571a;function _0x1bd725(e){this._bufferManager=e,this.uniqueId=_0x1bd725._Counter++,this._useInstancing=!1,this._currentInstanceCount=0,this.reset()}_0x2811fd(),_0x1bd725.prototype.isDirty=function(e){return this._isDirty||this._materialContextUpdateId!==e},_0x1bd725.prototype.resetIsDirty=function(e){this._isDirty=!1,this._materialContextUpdateId=e},Object.defineProperty(_0x1bd725.prototype,"useInstancing",{get:function(){return this._useInstancing},set:function(e){this._useInstancing!==e&&(e?(this.indirectDrawBuffer=this._bufferManager.createRawBuffer(40,_0x5213c6.BufferUsage.CopyDst|_0x5213c6.BufferUsage.Indirect),this._indirectDrawData=new Uint32Array(5),this._indirectDrawData[3]=0,this._indirectDrawData[4]=0):(this.indirectDrawBuffer&&this._bufferManager.releaseBuffer(this.indirectDrawBuffer),this.indirectDrawBuffer=void 0,this._indirectDrawData=void 0),this._useInstancing=e,this._currentInstanceCount=-1)},enumerable:!1,configurable:!0}),_0x1bd725.prototype.reset=function(){this.buffers={},this._isDirty=!0,this._materialContextUpdateId=0,this.fastBundle=void 0,this.bindGroups=void 0},_0x1bd725.prototype.setBuffer=function(e,t){var i;this._isDirty||(this._isDirty=(null==t?void 0:t.uniqueId)!==(null===(i=this.buffers[e])||void 0===i?void 0:i.uniqueId)),this.buffers[e]=t},_0x1bd725.prototype.setIndirectData=function(e,t,i){t!==this._currentInstanceCount&&this.indirectDrawBuffer&&this._indirectDrawData&&(this._currentInstanceCount=t,this._indirectDrawData[0]=e,this._indirectDrawData[1]=t,this._indirectDrawData[2]=i,this._bufferManager.setRawData(this.indirectDrawBuffer,0,this._indirectDrawData,0,20))},_0x1bd725.prototype.dispose=function(){this.indirectDrawBuffer&&(this._bufferManager.releaseBuffer(this.indirectDrawBuffer),this.indirectDrawBuffer=void 0,this._indirectDrawData=void 0),this.fastBundle=void 0,this.bindGroups=void 0,this.buffers=void 0},_0x1bd725._Counter=0;var _0x3bb705=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));return i(),function(){this.values={}}}();function _0x10caf5(e,t,i){this.disabled=!1,this._device=e,this._cacheSampler=t,this._engine=i}Object.defineProperty(_0x10caf5,"Statistics",{get:function(){return{totalCreated:_0x10caf5.NumBindGroupsCreatedTotal,lastFrameCreated:_0x10caf5.NumBindGroupsCreatedLastFrame,lookupLastFrame:_0x10caf5.NumBindGroupsLookupLastFrame,noLookupLastFrame:_0x10caf5.NumBindGroupsNoLookupLastFrame}},enumerable:!1,configurable:!0}),_0x10caf5.prototype.endFrame=function(){_0x10caf5.NumBindGroupsCreatedLastFrame=_0x10caf5._NumBindGroupsCreatedCurrentFrame,_0x10caf5.NumBindGroupsLookupLastFrame=_0x10caf5._NumBindGroupsLookupCurrentFrame,_0x10caf5.NumBindGroupsNoLookupLastFrame=_0x10caf5._NumBindGroupsNoLookupCurrentFrame,_0x10caf5._NumBindGroupsCreatedCurrentFrame=0,_0x10caf5._NumBindGroupsLookupCurrentFrame=0,_0x10caf5._NumBindGroupsNoLookupCurrentFrame=0},_0x10caf5.prototype.getBindGroups=function(e,t,i,n){var r,o,a,s=void 0;if(!n&&!t.isDirty(i.updateId)&&!i.isDirty)return _0x10caf5._NumBindGroupsNoLookupCurrentFrame++,t.bindGroups;if(t.resetIsDirty(i.updateId),i.isDirty=!1,s)return t.bindGroups=s,_0x10caf5._NumBindGroupsLookupCurrentFrame++,s;s=[],t.bindGroups=s,_0x10caf5.NumBindGroupsCreatedTotal++,_0x10caf5._NumBindGroupsCreatedCurrentFrame++;for(var l=e.bindGroupLayouts,u=0;u<e.shaderProcessingContext.bindGroupLayoutEntries.length;u++){for(var c=e.shaderProcessingContext.bindGroupLayoutEntries[u],h=e.shaderProcessingContext.bindGroupEntries[u],d=0;d<c.length;d++){var f,p=e.shaderProcessingContext.bindGroupLayoutEntries[u][d],_=e.shaderProcessingContext.bindGroupLayoutEntryInfo[u][p.binding],m=null!==(r=_.nameInArrayOfTexture)&&void 0!==r?r:_.name;if(p.sampler)if(f=i.samplers[m]){var g=f.sampler;if(!g){this._engine.dbgSanityChecks&&_0x50f23a.Error("Trying to bind a null sampler! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}h[d].resource=this._cacheSampler.getSampler(g,!1,f.hashCode)}else _0x50f23a.Error('Sampler "'.concat(m,'" could not be bound. entry=').concat(JSON.stringify(p),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"<no dump>":t}))),50);else if(p.texture||p.storageTexture)if(f=i.textures[m]){if(this._engine.dbgSanityChecks&&null===f.texture){_0x50f23a.Error("Trying to bind a null texture! entry=".concat(JSON.stringify(p),", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}var x=f.texture._hardwareTexture;if(this._engine.dbgSanityChecks&&(!x||p.texture&&!x.view||p.storageTexture&&!x.viewForWriting)){_0x50f23a.Error("Trying to bind a null gpu texture or view! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", isReady=").concat(null===(o=f.texture)||void 0===o?void 0:o.isReady,", materialContext.uniqueId=").concat(i.uniqueId),50);continue}h[d].resource=p.storageTexture?x.viewForWriting:p.texture.multisampled?x.msaaView:x.view}else _0x50f23a.Error('Texture "'.concat(m,'" could not be bound. entry=').concat(JSON.stringify(p),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"<no dump>":t}))),50);else if(p.externalTexture)if(f=i.textures[m]){if(this._engine.dbgSanityChecks&&null===f.texture){_0x50f23a.Error("Trying to bind a null external texture! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", materialContext.uniqueId=").concat(i.uniqueId),50);continue}var y=f.texture.underlyingResource;if(this._engine.dbgSanityChecks&&!y){_0x50f23a.Error("Trying to bind a null gpu external texture! entry=".concat(JSON.stringify(p),", name=").concat(m,", bindingInfo=").concat(JSON.stringify(f,(function(e,t){return"texture"===e?"<no dump>":t})),", isReady=").concat(null===(a=f.texture)||void 0===a?void 0:a.isReady,", materialContext.uniqueId=").concat(i.uniqueId),50);continue}h[d].resource=this._device.importExternalTexture({source:y})}else _0x50f23a.Error('Texture "'.concat(m,'" could not be bound. entry=').concat(JSON.stringify(p),", materialContext=").concat(JSON.stringify(i,(function(e,t){return"texture"===e||"sampler"===e?"<no dump>":t}))),50);else if(p.buffer){var v=t.buffers[m];if(v){var $=v.underlyingResource;h[d].resource.buffer=$,h[d].resource.size=v.capacity}else _0x50f23a.Error("Can't find buffer \"".concat(m,'". entry=').concat(JSON.stringify(p),", buffers=").concat(JSON.stringify(t.buffers),", drawContext.uniqueId=").concat(t.uniqueId),50)}}var b=l[u];s[u]=this._device.createBindGroup({layout:b,entries:h})}return n&&(n.bindGroups=s),s},_0x10caf5.NumBindGroupsCreatedTotal=0,_0x10caf5.NumBindGroupsCreatedLastFrame=0,_0x10caf5.NumBindGroupsLookupLastFrame=0,_0x10caf5.NumBindGroupsNoLookupLastFrame=0,_0x10caf5._Cache=new _0x3bb705,_0x10caf5._NumBindGroupsCreatedCurrentFrame=0,_0x10caf5._NumBindGroupsLookupCurrentFrame=0,_0x10caf5._NumBindGroupsNoLookupCurrentFrame=0;var _0xcd16c5=(_0x47d059=!0,function(e,t){var i=_0x47d059?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47d059=!1,i}),_0x5341d6=_0xcd16c5(void 0,(function(){return _0x5341d6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5341d6).search("(((.+)+)+)+$")})),_0x47d059;_0x5341d6();var _0x2864d2="clearQuadVertexShader",_0x34aa3e="uniform float depthValue;\nconst vec2 pos[4]={\nvec2(-1.0,1.0),\n vec2(1.0,1.0),\nvec2(-1.0,-1.0),\n vec2(1.0,-1.0)\n};\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n #define CUSTOM_VERTEX_MAIN_BEGIN\n gl_Position=vec4(pos[gl_VertexID],depthValue,1.0);\n #define CUSTOM_VERTEX_MAIN_END\n}\n";_0x266979.ShadersStore[_0x2864d2]=_0x34aa3e;var _0x3d7917=(_0x412052=!0,function(e,t){var i=_0x412052?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x412052=!1,i}),_0x22523b=_0x3d7917(void 0,(function(){return _0x22523b.toString().search("(((.+)+)+)+$").toString().constructor(_0x22523b).search("(((.+)+)+)+$")})),_0x412052;_0x22523b();var _0xf6f5ce="clearQuadPixelShader",_0x4674d6="uniform vec4 color;\nvoid main() {\n\tgl_FragColor=color;\n}\n";_0x266979.ShadersStore[_0xf6f5ce]=_0x4674d6;var _0x3dd58d=(_0x359e60=!0,function(e,t){var i=_0x359e60?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x359e60=!1,i}),_0x3d5427=_0x3dd58d(void 0,(function(){return _0x3d5427.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d5427).search("(((.+)+)+)+$")})),_0x359e60;function _0x28ce94(e,t,i){this._bindGroups={},this._bundleCache={},this._keyTemp=[],this._device=e,this._engine=t,this._cacheRenderPipeline=new _0x3a822c(this._device,i,!t._caps.textureFloatLinearFiltering),this._cacheRenderPipeline.setDepthTestEnabled(!1),this._cacheRenderPipeline.setStencilReadMask(255),this._effect=t.createEffect("clearQuad",[],["color","depthValue"])}_0x3d5427(),_0x28ce94.prototype.setDepthStencilFormat=function(e){this._depthTextureFormat=e,this._cacheRenderPipeline.setDepthStencilFormat(e)},_0x28ce94.prototype.setColorFormat=function(e){this._cacheRenderPipeline.setColorFormat(e)},_0x28ce94.prototype.setMRTAttachments=function(e,t,i){this._cacheRenderPipeline.setMRT(t,i),this._cacheRenderPipeline.setMRTAttachments(e)},_0x28ce94.prototype.clear=function(e,t,i,n,r){var o,a;void 0===r&&(r=1);var s,l,u=null,c=!!this._engine._currentRenderTarget;if(e)s=e;else{var h=0;this._keyTemp.length=0;for(var d=0;d<this._cacheRenderPipeline.colorFormats.length;++d)this._keyTemp[h++]=renderableTextureFormatToIndex[null!==(o=this._cacheRenderPipeline.colorFormats[d])&&void 0!==o?o:""];var f=renderableTextureFormatToIndex[null!==(a=this._depthTextureFormat)&&void 0!==a?a:0];if(this._keyTemp[h]=(t?t.r+256*t.g+256*t.b*256+256*t.a*256*256:0)+(i?Math.pow(2,32):0)+(n?Math.pow(2,33):0)+(this._engine.useReverseDepthBuffer?Math.pow(2,34):0)+(c?Math.pow(2,35):0)+(r>1?Math.pow(2,36):0)+f*Math.pow(2,37),l=this._keyTemp.join("_"),u=this._bundleCache[l])return u;s=this._device.createRenderBundleEncoder({colorFormats:this._cacheRenderPipeline.colorFormats,depthStencilFormat:this._depthTextureFormat,sampleCount:r})}this._cacheRenderPipeline.setDepthWriteEnabled(!!i),this._cacheRenderPipeline.setStencilEnabled(!!n&&!!this._depthTextureFormat&&WebGPUTextureHelper.HasStencilAspect(this._depthTextureFormat)),this._cacheRenderPipeline.setStencilWriteMask(n?255:0),this._cacheRenderPipeline.setStencilCompare(_0x333f62.FRONT,n?_0x333f62.ALWAYS:_0x333f62.NEVER),this._cacheRenderPipeline.setStencilCompare(_0x333f62.BACK,n?_0x333f62.ALWAYS:_0x333f62.NEVER),this._cacheRenderPipeline.setStencilPassOp(_0x333f62.FRONT,n?_0x333f62.REPLACE:_0x333f62.KEEP),this._cacheRenderPipeline.setStencilPassOp(_0x333f62.BACK,n?_0x333f62.REPLACE:_0x333f62.KEEP),this._cacheRenderPipeline.setWriteMask(t?15:0);var p=this._cacheRenderPipeline.getRenderPipeline(_0x333f62.MATERIAL_TriangleStripDrawMode,this._effect,r),_=this._effect._pipelineContext;t&&this._effect.setDirectColor4("color",t),this._effect.setFloat("depthValue",this._engine.useReverseDepthBuffer?this._engine._clearReverseDepthValue:this._engine._clearDepthValue),_.uniformBuffer.update();var m=c?this._engine._ubInvertY:this._engine._ubDontInvertY,g=_.uniformBuffer.getBuffer(),x=g.uniqueId+"-"+m.uniqueId,y=this._bindGroups[x];if(!y){var v=_.bindGroupLayouts;(y=this._bindGroups[x]=[]).push(this._device.createBindGroup({layout:v[0],entries:[]})),!_0x27ae2e._SimplifiedKnownBindings&&y.push(this._device.createBindGroup({layout:v[1],entries:[]})),y.push(this._device.createBindGroup({layout:v[_0x27ae2e._SimplifiedKnownBindings?1:2],entries:[{binding:0,resource:{buffer:m.underlyingResource,size:m.capacity}},{binding:1,resource:{buffer:g.underlyingResource,size:g.capacity}}]}))}s.setPipeline(p);for(d=0;d<y.length;++d)s.setBindGroup(d,y[d]);return s.draw(4,1,0,0),!e&&(u=s.finish(),this._bundleCache[l]=u),u};var _0x559884=(_0x223cba=!0,function(e,t){var i=_0x223cba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x223cba=!1,i}),_0x4d5beb=_0x559884(void 0,(function(){return _0x4d5beb.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d5beb).search("(((.+)+)+)+$")})),_0x223cba;function WebGPURenderItemViewport(e,t,i,n){this.x=Math.floor(e),this.y=Math.floor(t),this.w=Math.floor(i),this.h=Math.floor(n)}function WebGPURenderItemScissor(e,t,i,n){this.x=e,this.y=t,this.w=i,this.h=n}function WebGPURenderItemStencilRef(e){this.ref=e}function WebGPURenderItemBlendColor(e){this.color=e}function WebGPURenderItemBeginOcclusionQuery(e){this.query=e}function WebGPURenderItemEndOcclusionQuery(){}function WebGPURenderItemBundles(){this.bundles=[]}function WebGPUBundleList(e){this.numDrawCalls=0,this._device=e,this._list=new Array(10),this._listLength=0}_0x4d5beb(),WebGPURenderItemViewport.prototype.run=function(e){e.setViewport(this.x,this.y,this.w,this.h,0,1)},WebGPURenderItemViewport.prototype.clone=function(){return new WebGPURenderItemViewport(this.x,this.y,this.w,this.h)},WebGPURenderItemScissor.prototype.run=function(e){e.setScissorRect(this.x,this.y,this.w,this.h)},WebGPURenderItemScissor.prototype.clone=function(){return new WebGPURenderItemScissor(this.x,this.y,this.w,this.h)},WebGPURenderItemStencilRef.prototype.run=function(e){e.setStencilReference(this.ref)},WebGPURenderItemStencilRef.prototype.clone=function(){return new WebGPURenderItemStencilRef(this.ref)},WebGPURenderItemBlendColor.prototype.run=function(e){e.setBlendConstant(this.color)},WebGPURenderItemBlendColor.prototype.clone=function(){return new WebGPURenderItemBlendColor(this.color)},WebGPURenderItemBeginOcclusionQuery.prototype.run=function(e){e.beginOcclusionQuery(this.query)},WebGPURenderItemBeginOcclusionQuery.prototype.clone=function(){return new WebGPURenderItemBeginOcclusionQuery(this.query)},WebGPURenderItemEndOcclusionQuery.prototype.run=function(e){e.endOcclusionQuery()},WebGPURenderItemEndOcclusionQuery.prototype.clone=function(){return new WebGPURenderItemEndOcclusionQuery},WebGPURenderItemBundles.prototype.run=function(e){e.executeBundles(this.bundles)},WebGPURenderItemBundles.prototype.clone=function(){var e=new WebGPURenderItemBundles;return e.bundles=this.bundles,e},WebGPUBundleList.prototype.addBundle=function(e){if(!this._currentItemIsBundle){var t=new WebGPURenderItemBundles;this._list[this._listLength++]=t,this._currentBundleList=t.bundles,this._currentItemIsBundle=!0}e&&this._currentBundleList.push(e)},WebGPUBundleList.prototype._finishBundle=function(){this._currentItemIsBundle&&this._bundleEncoder&&(this._currentBundleList.push(this._bundleEncoder.finish()),this._bundleEncoder=void 0,this._currentItemIsBundle=!1)},WebGPUBundleList.prototype.addItem=function(e){this._finishBundle(),this._list[this._listLength++]=e,this._currentItemIsBundle=!1},WebGPUBundleList.prototype.getBundleEncoder=function(e,t,i){return!this._currentItemIsBundle&&(this.addBundle(),this._bundleEncoder=this._device.createRenderBundleEncoder({colorFormats:e,depthStencilFormat:t,sampleCount:i})),this._bundleEncoder},WebGPUBundleList.prototype.close=function(){this._finishBundle()},WebGPUBundleList.prototype.run=function(e){this.close();for(var t=0;t<this._listLength;++t)this._list[t].run(e)},WebGPUBundleList.prototype.reset=function(){this._listLength=0,this._currentItemIsBundle=!1,this.numDrawCalls=0},WebGPUBundleList.prototype.clone=function(){this.close();var e=new WebGPUBundleList(this._device);e._list=new Array(this._listLength),e._listLength=this._listLength,e.numDrawCalls=this.numDrawCalls;for(var t=0;t<this._listLength;++t)e._list[t]=this._list[t].clone();return e};var _0xf90150=(_0x1aab44=!0,function(e,t){var i=_0x1aab44?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1aab44=!1,i}),_0x5d8b0c=_0xf90150(void 0,(function(){return _0x5d8b0c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d8b0c).search("(((.+)+)+)+$")})),_0x1aab44;function _0x17d952(e,t){this._enabled=!1,this._measureDurationState=0,this._device=e,this._bufferManager=t}_0x5d8b0c(),Object.defineProperty(_0x17d952.prototype,"gpuFrameTimeCounter",{get:function(){return this._gpuFrameTimeCounter},enumerable:!1,configurable:!0}),Object.defineProperty(_0x17d952.prototype,"enable",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,this._measureDurationState=0,e?this._measureDuration=new WebGPUDurationMeasure(this._device,this._bufferManager):this._measureDuration.dispose())},enumerable:!1,configurable:!0}),_0x17d952.prototype.startFrame=function(e){this._enabled&&0===this._measureDurationState&&(this._measureDuration.start(e),this._measureDurationState=1)},_0x17d952.prototype.endFrame=function(e){var t=this;1===this._measureDurationState&&(this._measureDurationState=2,this._measureDuration.stop(e).then((function(e){null!==e&&e>=0&&(t._gpuFrameTimeCounter.fetchNewFrame(),t._gpuFrameTimeCounter.addCount(e,!0)),t._measureDurationState=0})))};const _0xb6b0b3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3c9c1c=_0xb6b0b3(void 0,(function(){return _0x3c9c1c.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c9c1c).search("(((.+)+)+)+$")}));function _0x28476e(e,t,i,n,r){void 0===r&&(r=!0),this._dstBuffers=[],this._device=i,this._bufferManager=n,this._count=e,this._canUseMultipleBuffers=r,this._querySet=i.createQuerySet({type:t,count:e}),this._queryBuffer=n.createRawBuffer(8*e,_0x5213c6.BufferUsage.QueryResolve|_0x5213c6.BufferUsage.CopySrc),!r&&this._dstBuffers.push(this._bufferManager.createRawBuffer(8*this._count,_0x5213c6.BufferUsage.MapRead|_0x5213c6.BufferUsage.CopyDst))}_0x3c9c1c(),Object.defineProperty(_0x28476e.prototype,"querySet",{get:function(){return this._querySet},enumerable:!1,configurable:!0}),_0x28476e.prototype._getBuffer=function(e,t){if(!this._canUseMultipleBuffers&&0===this._dstBuffers.length)return null;var i,n=this._device.createCommandEncoder();return 0===this._dstBuffers.length?i=this._bufferManager.createRawBuffer(8*this._count,_0x5213c6.BufferUsage.MapRead|_0x5213c6.BufferUsage.CopyDst):(i=this._dstBuffers[this._dstBuffers.length-1],this._dstBuffers.length--),n.resolveQuerySet(this._querySet,e,t,this._queryBuffer,0),n.copyBufferToBuffer(this._queryBuffer,0,i,0,8*t),this._device.queue.submit([n.finish()]),i},_0x28476e.prototype.readValues=function(e,t,i){return void 0===e&&(e=0),void 0===t&&(t=1),new Promise(((n,r)=>{var o;return null===(o=this._getBuffer(e,t))?r(null):o.mapAsync(_0x5213c6.MapMode.Read).then((()=>{const e=new BigUint64Array(o.getMappedRange()).slice();o.unmap(),this._dstBuffers[this._dstBuffers.length]=o,n({data:e,frameId:i})}))}))},_0x28476e.prototype.readValue=function(e){return void 0===e&&(e=0),new Promise(((t,i)=>{const n=this._getBuffer(e,1);return null===n?t(null):n.mapAsync(_0x5213c6.MapMode.Read).then((()=>{const e=new BigUint64Array(n.getMappedRange()),i=Number(e[0]);return n.unmap(),this._dstBuffers[this._dstBuffers.length]=n,t(i)}))}))},_0x28476e.prototype.readTwoValuesAndSubtract=async function(e){return void 0===e&&(e=0),new Promise(((t,i)=>{const n=this._getBuffer(e,2);return null===n?t(null):n.mapAsync(_0x5213c6.MapMode.Read).then((()=>{const e=new BigUint64Array(n.getMappedRange()),i=Number(e[1]-e[0]);return n.unmap(),this._dstBuffers[this._dstBuffers.length]=n,t(i)}))}))},_0x28476e.prototype.dispose=function(){this._querySet.destroy(),this._bufferManager.releaseBuffer(this._queryBuffer);for(var e=0;e<this._dstBuffers.length;++e)this._bufferManager.releaseBuffer(this._dstBuffers[e])};var _0x3393f1=(_0x2fc0dd=!0,function(e,t){var i=_0x2fc0dd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2fc0dd=!1,i}),_0x11eb2b=_0x3393f1(void 0,(function(){return _0x11eb2b.toString().search("(((.+)+)+)+$").toString().constructor(_0x11eb2b).search("(((.+)+)+)+$")})),_0x2fc0dd;_0x11eb2b();var _0x3a255b=0;function _0x37a9d4(e,t,i,n,r){void 0===n&&(n=4096),void 0===r&&(r=100),this._availableIndices=[],this._engine=e,this._device=t,this._bufferManager=i,this._frameLastBuffer=-1,this._lastBufferFrameID=-1,this._currentTotalIndices=0,this._countIncrement=r,this._allocateNewIndices(n)}Object.defineProperty(_0x37a9d4.prototype,"querySet",{get:function(){return this._querySet.querySet},enumerable:!1,configurable:!0}),Object.defineProperty(_0x37a9d4.prototype,"hasQueries",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(_0x37a9d4.prototype,"canBeginQuery",{get:function(){switch(this._engine._getCurrentRenderPassIndex()){case 0:return void 0!==this._engine._mainRenderPassWrapper.renderPassDescriptor.occlusionQuerySet;case 1:return void 0!==this._engine._rttRenderPassWrapper.renderPassDescriptor.occlusionQuerySet}return!1},enumerable:!1,configurable:!0}),_0x37a9d4.prototype.createQuery=function(){0===this._availableIndices.length&&this._allocateNewIndices();var e=this._availableIndices[_0x3a255b];return _0x3a255b--,e},_0x37a9d4.prototype.deleteQuery=function(e){_0x3a255b++,this._availableIndices[_0x3a255b]=e},_0x37a9d4.prototype.isQueryResultAvailable=function(e){return this._retrieveQueryBuffer(),!!this._lastBuffer&&e<this._lastBuffer.length},_0x37a9d4.prototype.getQueryResult=function(e){var t,i;return Number(null!==(i=null===(t=this._lastBuffer)||void 0===t?void 0:t[e])&&void 0!==i?i:-1)},_0x37a9d4.prototype.getQueryResultFrameID=function(){return this._lastBufferFrameID},_0x37a9d4.prototype._retrieveQueryBuffer=function(){var e=this;this._lastBuffer&&this._frameLastBuffer===this._engine.frameId||this._frameLastBuffer!==this._engine.frameId&&(this._frameLastBuffer=this._engine.frameId,this._querySet.readValues(0,this._currentTotalIndices,this._engine.frameId).then((function(t){e._lastBuffer=t.data,e._lastBufferFrameID=t.frameId})).catch((t=>{e._lastBuffer=null})))},_0x37a9d4.prototype._allocateNewIndices=function(e){e=null!=e?e:this._countIncrement,this._delayQuerySetDispose();for(var t=0;t<e;++t)this._availableIndices.push(this._currentTotalIndices+t);_0x3a255b=this._availableIndices.length-1,this._currentTotalIndices+=e,this._querySet=new _0x28476e(this._currentTotalIndices,_0x5213c6.QueryType.Occlusion,this._device,this._bufferManager,!1)},_0x37a9d4.prototype._delayQuerySetDispose=function(){var e=this._querySet;e&&setTimeout((function(){return e.dispose}),1e3)},_0x37a9d4.prototype.dispose=function(){var e;null===(e=this._querySet)||void 0===e||e.dispose(),this._availableIndices=[]};var _0x5ca157=(_0x5db5d6=!0,function(e,t){var i=_0x5db5d6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5db5d6=!1,i}),_0x48f65d=_0x5ca157(void 0,(function(){return _0x48f65d.toString().search("(((.+)+)+)+$").toString().constructor(_0x48f65d).search("(((.+)+)+)+$")})),_0x5db5d6;function _0x12abee(e,t){void 0===t&&(t=20),this.debug=!1,this._sourceCode=e,this._numMaxIterations=t,this._functionDescr=[],this.inlineToken="#define inline"}_0x48f65d(),Object.defineProperty(_0x12abee.prototype,"code",{get:function(){return this._sourceCode},enumerable:!1,configurable:!0}),_0x12abee.prototype.processCode=function(){this.debug&&console.log("Start inlining process (code size=".concat(this._sourceCode.length,")...")),this._collectFunctions(),this._processInlining(this._numMaxIterations),this.debug&&console.log("End of inlining process.")},_0x12abee.prototype._collectFunctions=function(){for(var e=0;e<this._sourceCode.length;){var t=this._sourceCode.indexOf(this.inlineToken,e);if(t<0)break;var i=this._sourceCode.indexOf("(",t+this.inlineToken.length);if(i<0)this.debug&&console.warn("Could not find the opening parenthesis after the token. startIndex=".concat(e)),e=t+this.inlineToken.length;else{var n=_0x12abee._RegexpFindFunctionNameAndType.exec(this._sourceCode.substring(t+this.inlineToken.length,i));if(n){var r=[n[3],n[4]],o=r[0],a=r[1],s=ExtractBetweenMarkers("(",")",this._sourceCode,i);if(s<0)this.debug&&console.warn("Could not extract the parameters the function '".concat(a,"' (type=").concat(o,"). funcParamsStartIndex=").concat(i)),e=t+this.inlineToken.length;else{var l=this._sourceCode.substring(i+1,s),u=SkipWhitespaces(this._sourceCode,s+1);if(u!==this._sourceCode.length){var c=ExtractBetweenMarkers("{","}",this._sourceCode,u);if(c<0)this.debug&&console.warn("Could not extract the body of the function '".concat(a,"' (type=").concat(o,"). funcBodyStartIndex=").concat(u)),e=t+this.inlineToken.length;else{for(var h=this._sourceCode.substring(u,c+1),d=RemoveComments(l).split(","),f=[],p=0;p<d.length;++p){var _=d[p].trim(),m=_.lastIndexOf(" ");m>=0&&f.push(_.substring(m+1))}"void"!==o&&f.push("return"),this._functionDescr.push({name:a,type:o,parameters:f,body:h,callIndex:0}),e=c+1;var g=t>0?this._sourceCode.substring(0,t):"",x=c+1<this._sourceCode.length-1?this._sourceCode.substring(c+1):"";this._sourceCode=g+x,e-=c+1-t}}else this.debug&&console.warn("Could not extract the body of the function '".concat(a,"' (type=").concat(o,"). funcParamsEndIndex=").concat(s)),e=t+this.inlineToken.length}}else this.debug&&console.warn("Could not extract the name/type of the function from: ".concat(this._sourceCode.substring(t+this.inlineToken.length,i))),e=t+this.inlineToken.length}}this.debug&&console.log("Collect functions: ".concat(this._functionDescr.length," functions found. functionDescr="),this._functionDescr)},_0x12abee.prototype._processInlining=function(e){for(void 0===e&&(e=20);e-- >=0&&this._replaceFunctionCallsByCode(););return this.debug&&console.log("numMaxIterations is ".concat(e," after inlining process")),e>=0},_0x12abee.prototype._replaceFunctionCallsByCode=function(){for(var e=!1,t=0,i=this._functionDescr;t<i.length;t++)for(var n=i[t],r=n.name,o=n.type,a=n.parameters,s=n.body,l=0;l<this._sourceCode.length;){var u=this._sourceCode.indexOf(r,l);if(u<0)break;if(0===u||IsIdentifierChar(this._sourceCode.charAt(u-1)))l=u+r.length;else{var c=SkipWhitespaces(this._sourceCode,u+r.length);if(c!==this._sourceCode.length&&"("===this._sourceCode.charAt(c)){var h=ExtractBetweenMarkers("(",")",this._sourceCode,c);if(h<0)this.debug&&console.warn("Could not extract the parameters of the function call. Function '".concat(r,"' (type=").concat(o,"). callParamsStartIndex=").concat(c)),l=u+r.length;else{var d=this._sourceCode.substring(c+1,h),f=function(e){for(var t=[],i=0,n=0;i<e.length;){if("("===e.charAt(i)){var r=ExtractBetweenMarkers("(",")",e,i);if(r<0)return null;i=r}else","===e.charAt(i)&&(t.push(e.substring(n,i)),n=i+1);i++}return n<i&&t.push(e.substring(n,i)),t}(RemoveComments(d));if(null!==f){for(var p=[],_=0;_<f.length;++_){var m=f[_].trim();p.push(m)}var g="void"!==o?r+"_"+n.callIndex++:null;if(g&&p.push(g+" ="),p.length===a.length){l=h+1;var x=this._replaceNames(s,a,p),y=u>0?this._sourceCode.substring(0,u):"",v=h+1<this._sourceCode.length-1?this._sourceCode.substring(h+1):"";if(g){var $=FindBackward(this._sourceCode,u-1,"\n");y=this._sourceCode.substring(0,$+1);var b=this._sourceCode.substring($+1,u);this._sourceCode=y+o+" "+g+";\n"+x+"\n"+b+g+v,this.debug&&console.log("Replace function call by code. Function '".concat(r,"' (type=").concat(o,"). injectDeclarationIndex=").concat($,", call parameters=").concat(p))}else this._sourceCode=y+x+v,l+=x.length-(h+1-u),this.debug&&console.log("Replace function call by code. Function '".concat(r,"' (type=").concat(o,"). functionCallIndex=").concat(u,", call parameters=").concat(p));e=!0}else this.debug&&console.warn("Invalid function call: not the same number of parameters for the call than the number expected by the function. Function '".concat(r,"' (type=").concat(o,"). function parameters=").concat(a,", call parameters=").concat(p)),l=u+r.length}else this.debug&&console.warn("Invalid function call: can't extract the parameters of the function call. Function '".concat(r,"' (type=").concat(o,"). callParamsStartIndex=").concat(c,", callParams=")+d),l=u+r.length}}else l=u+r.length}}return e},_0x12abee.prototype._replaceNames=function(e,t,i){for(var n=function(n){var r=new RegExp(EscapeRegExp(t[n]),"g"),o=t[n].length,a=i[n];e=e.replace(r,(function(i){for(var r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];var l=r[0];return IsIdentifierChar(e.charAt(l-1))||IsIdentifierChar(e.charAt(l+o))?t[n]:a}))},r=0;r<t.length;++r)n(r);return e},_0x12abee._RegexpFindFunctionNameAndType=/((\s+?)(\w+)\s+(\w+)\s*?)$/;var _0x4be5d6=(_0x36cb1e=!0,function(e,t){var i=_0x36cb1e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x36cb1e=!1,i}),_0x5c4b62=_0x4be5d6(void 0,(function(){return _0x5c4b62.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c4b62).search("(((.+)+)+)+$")})),_0x36cb1e;function _0x1db2e9(){this._twgsl=null}_0x5c4b62(),_0x1db2e9.prototype.initTwgsl=function(e){var t=n$17((e=_0x1db2e9._TWgslDefaultOptions).jsPath),i=n$17(e.wasmPath),n=this;return _0xd79dde.LoadScriptAsync(t).then((function(){return self.twgsl(i)})).then((function(e){n._twgsl=e,Promise.resolve()}))},_0x1db2e9.prototype.convertSpirV2WGSL=function(e){var t=this._twgsl.convertSpirV2WGSL(e);return _0x1db2e9.ShowWGSLShaderCode&&(console.log(t),console.log("***********************************************")),t},_0x1db2e9._TWgslDefaultOptions={jsPath:"ThirdParty/twgsl.js",wasmPath:"ThirdParty/twgsl.wasm"},_0x1db2e9.ShowWGSLShaderCode=!1;var _0x41031f=(_0x2171f5=!0,function(e,t){var i=_0x2171f5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2171f5=!1,i}),_0x1ad99f=_0x41031f(void 0,(function(){return _0x1ad99f.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ad99f).search("(((.+)+)+)+$")})),_0x2171f5;function _0x1e8692(e,t,i,n){this._record=!1,this._play=!1,this._mainPassBundleList=[],this._enabled=!1,this._engine=e,this._mode=t,this._bundleList=i,this._bundleListRenderTarget=n}_0x1ad99f(),Object.defineProperty(_0x1e8692.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._mainPassBundleList.length=0,this._record=this._enabled=e,this._play=!1,e&&(this._modeSaved=this._mode,this._mode=Constants.SNAPSHOTRENDERING_STANDARD)},enumerable:!1,configurable:!0}),Object.defineProperty(_0x1e8692.prototype,"play",{get:function(){return this._play},enumerable:!1,configurable:!0}),Object.defineProperty(_0x1e8692.prototype,"record",{get:function(){return this._record},enumerable:!1,configurable:!0}),Object.defineProperty(_0x1e8692.prototype,"mode",{get:function(){return this._mode},set:function(e){this._record?this._modeSaved=e:this._mode=e},enumerable:!1,configurable:!0}),_0x1e8692.prototype.endMainRenderPass=function(){this._record&&this._mainPassBundleList.push(this._bundleList.clone())},_0x1e8692.prototype.endRenderTargetPass=function(e,t){var i,n,r,o;if(this._play)null===(n=null===(i=t._bundleLists)||void 0===i?void 0:i[t._currentLayer])||void 0===n||n.run(e),this._mode===Constants.SNAPSHOTRENDERING_FAST&&this._engine._reportDrawCall(null===(o=null===(r=t._bundleLists)||void 0===r?void 0:r[t._currentLayer])||void 0===o?void 0:o.numDrawCalls);else{if(!this._record)return!1;!t._bundleLists&&(t._bundleLists=[]),t._bundleLists[t._currentLayer]=this._bundleListRenderTarget.clone(),t._bundleLists[t._currentLayer].run(e),this._bundleListRenderTarget.reset()}return!0},_0x1e8692.prototype.endFrame=function(e){if(this._record&&(this._mainPassBundleList.push(this._bundleList.clone()),this._record=!1,this._play=!0,this._mode=this._modeSaved),null!==e&&this._play)for(var t=0;t<this._mainPassBundleList.length;++t)this._mainPassBundleList[t].run(e),this._mode===Constants.SNAPSHOTRENDERING_FAST&&this._engine._reportDrawCall(this._mainPassBundleList[t].numDrawCalls)},_0x1e8692.prototype.reset=function(){this.enabled=!1,this.enabled=!0};var d$1g={NONE:0,STORING:1,STORED:2,FAILED:3};function l$14(e){if(!e$2e(e.name))throw new t$15("options.name is required.");var t=o$1l.defer();this.dbname=e.name;var i=indexedDB.open(this.dbname),n=this;return i.onsuccess=function(e){n.db=e.target.result,n.version=n.db.version,e$2e(n.cachestatus)||(n.cachestatus={}),t.resolve(n)},i.onupgradeneeded=function(e){n.db=e.target.result,n.version=n.db.version,t.resolve(n)},i.onerror=function(e){n.db=null,t.reject("create database fail, error code : "+e.target.errorcode)},this.layer=e.layer||null,this.storageType=e.storageType||"arrayBuffer",this.creatingTable=!1,this.cachestatus={},t.promise}l$14.prototype.checkObjectStoreExit=function(e){return!!e$2e(this.db)&&this.db.objectStoreNames.contains(e)},l$14.prototype.createObjectStore=function(e){var t=o$1l.defer();if(this.creatingTable)t.reject(!1);else{if(this.db.objectStoreNames.contains(e))return t.reject(!1),t.promise;this.creatingTable=!0;var i=this,n=parseInt(i.db.version);i.db.close();var r=indexedDB.open(i.dbname,n+1);r.onupgradeneeded=function(r){var o=r.target.result;i.db=o;var a=o.createObjectStore(e,{keyPath:"id"});e$2e(a)?(a.createIndex("value","value",{unique:!1}),e$2e(i.cachestatus)||(i.cachestatus={}),i.cachestatus[e]={},indexedDB.open(i.dbname,n+2).onsuccess=function(e){var n=e.target.result;i.db=n,i.creatingTable=!1,t.resolve(!0)}):(i.creatingTable=!1,t.reject(!1))},r.onsuccess=function(e){i.creatingTable=!1,e.target.result.close(),t.resolve(!0)},r.onerror=function(e){i.creatingTable=!1,t.reject(!1)}}return t.promise},l$14.prototype.putElementInDB=function(e,t,i,n){var r=o$1l.defer();if(!e$2e(this.db))return r.reject(!1),r.promise;var o,a=this;if(e$2e(a.cachestatus[e])&&!e$2e(n)&&e$2e(a.cachestatus[e][t])&&(a.cachestatus[e][t]===d$1g.STORING||a.cachestatus[e][t]===d$1g.STORED))return r.resolve(!1),r.promise;if(this.db.objectStoreNames.contains(e)){var s;e$2e(a.cachestatus[e])||(a.cachestatus[e]={});try{s=this.db.transaction([e],"readwrite")}catch{return r.reject(null),r.promise}if(o=s.objectStore(e),e$2e(n))if(n instanceof Array){for(var l=0,u=n.length;l<u;l++)a.cachestatus[e][n[l].key]!==d$1g.STORED&&(o.add({id:n[l].key,value:n[l].value}),a.cachestatus[e][n[l].key]=d$1g.STORED);r.resolve(!0)}else{for(var t in n)isNaN(1*t)||o.add({id:t,value:n[t]});r.resolve(!0)}else{if(!e$2e(t)||!e$2e(i))return;if(t instanceof Array&&i instanceof Array){for(l=0,u=t.length;l<u;l++)a.cachestatus[e][t[l]]!==d$1g.STORED&&(o.add({id:t[l],value:i[l]}),a.cachestatus[e][t[l]]=d$1g.STORED);s.oncomplete=function(e){r.resolve(!0)},s.onerror=function(e){r.reject(!1)}}else{var c=o.add({id:t,value:i});a.cachestatus[e][t]=d$1g.STORING,c.onsuccess=function(i){a.cachestatus[e][t]=d$1g.STORED,r.resolve(!0)},c.onerror=function(i){a.cachestatus[e][t]=d$1g.FAILED,r.reject(!1)}}}}else this.createObjectStore(e).then((function(s){var l=a.db.transaction([e],"readwrite");if(o=l.objectStore(e),e$2e(n)){for(var u=0,c=n.length;u<c;u++)o.add({id:n[u].key,value:n[u].value});r.resolve(!0)}else{var h=o.add({id:t,value:i});h.onsuccess=function(e){r.resolve(!0)},h.onerror=function(e){r.reject(!1)}}}),(function(e){r.reject(!1)}));return r.promise},l$14.prototype.getRangeFromDB=function(e,t){var i,n,r=o$1l.defer();if(!e$2e(this.db)||!this.db.objectStoreNames.contains(e))return null;try{i=this.db.transaction([e])}catch{return r.reject(null),r.promise}try{n=i.objectStore(e)}catch{r.reject(null)}var o=n.openCursor(IDBKeyRange.bound(t[0],t[1])),a=[];return o.onsuccess=function(e){var t=e.target.result;e$2e(t)?(a.push(t.value),t.continue()):r.resolve(a)},o.onerror=function(e){r.reject(null)},r.promise},l$14.prototype.getElementFromDB=function(e,t){var i,n,r=o$1l.defer();if(!e$2e(this.db))return null;if(!this.db.objectStoreNames.contains(e))return r.reject(null),r.promise;try{i=this.db.transaction([e])}catch{return r.reject(null),r.promise}try{n=i.objectStore(e)}catch{r.reject(null)}var o=n.get(t);return o.onsuccess=function(e){e$2e(e.target.result)?r.resolve(e.target.result.value):r.reject(null)},o.onerror=function(e){r.reject(null)},r.promise},l$14.prototype.getAllElementFromDB=function(e){var t,i,n=o$1l.defer();if(!e$2e(this.db)||!this.db.objectStoreNames.contains(e))return null;if(null!=this.transaction)t=this.transaction;else try{t=this.db.transaction([e])}catch{return n.reject(null),n.promise}try{i=t.objectStore(e)}catch{n.reject(null)}var r=i.getAll();return r.onsuccess=function(e){e$2e(e.target.result)?n.resolve(e.target.result):n.reject(null)},r.onerror=function(e){n.reject(null)},n.promise},l$14.prototype.updateElementInDB=function(e,t,i,n){var r=o$1l.defer();if(!e$2e(this.db)||!this.db.objectStoreNames.contains(e))return r.resolve(!1),r.promise;var o,a=this.db.transaction([e],"readwrite");try{o=a.objectStore(e)}catch{r.resolve(!1)}var s=o.get(t);return s.onsuccess=function(e){var a=e.target.result;e$2e(a)||(a={id:t}),a.value=!0===n?Object.assign(a.value,i):i;var s=o.put(a);s.onsuccess=function(e){r.resolve(!0)},s.onerror=function(e){r.resolve(!1)}},s.onerror=function(e){r.resolve(!1)},r.promise},l$14.prototype.removeElementFromDB=function(e,t){var i=o$1l.defer();if(!e$2e(this.db)||!this.db.objectStoreNames.contains(e))return i.resolve(!1),i.promise;var n,r=this.db.transaction([e],"readwrite");try{n=r.objectStore(e)}catch{i.resolve(!1)}var o=n.delete(t);return o.onerror=function(e){i.resolve(!1)},o.onsuccess=function(e){i.resolve(!0)},i.promise},l$14.prototype.clear=function(e){var t=o$1l.defer();if(!e$2e(this.db)||!this.db.objectStoreNames.contains(e))return t.resolve(!1),t.promise;var i,n=this.db.transaction([e],"readwrite");try{i=n.objectStore(e)}catch{t.resolve(!1)}var r=i.clear();return r.onerror=function(e){t.resolve(!1)},r.onsuccess=function(e){t.resolve(!0)},t.promise};var _0x52af61=(_0x1d4073=!0,function(e,t){var i=_0x1d4073?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d4073=!1,i}),_0x62068c=_0x52af61(void 0,(function(){return _0x62068c.toString().search("(((.+)+)+)+$").toString().constructor(_0x62068c).search("(((.+)+)+)+$")})),_0x1d4073,_0x2c9aaf;function _0x4cd9cc(e,t){void 0===t&&(t={});var i,n,r,o,a=_0xf48096.call(this,null);if((a=this)._uploadEncoderDescriptor={label:"upload"},a._renderEncoderDescriptor={label:"render"},a._renderTargetEncoderDescriptor={label:"renderTarget"},a._clearDepthValue=1,a._clearReverseDepthValue=0,a._clearStencilValue=0,a._defaultSampleCount=4,a._glslang=null,a._tintWASM=null,a._compiledComputeEffects={},a._counters={numEnableEffects:0,numEnableDrawWrapper:0,numBundleCreationNonCompatMode:0,numBundleReuseNonCompatMode:0},a.countersLastFrame={numEnableEffects:0,numEnableDrawWrapper:0,numBundleCreationNonCompatMode:0,numBundleReuseNonCompatMode:0},a.numMaxUncapturedErrors=20,a._commandBuffers=[null,null,null],a._currentRenderPass=null,a._mainRenderPassWrapper=new _0x2a893c,a._rttRenderPassWrapper=new _0x2a893c,a._pendingDebugCommands=[],a._onAfterUnbindFrameBufferObservable=new Observable,a._currentOverrideVertexBuffers=null,a._currentIndexBuffer=null,a._colorWriteLocal=!0,a._forceEnableEffect=!1,a.dbgShowShaderCode=!1,a.dbgSanityChecks=!0,a.dbgVerboseLogsForFirstFrames=!1,a.dbgVerboseLogsNumFrames=10,a.dbgLogIfNotDrawWrapper=!0,a.dbgShowEmptyEnableEffectCalls=!0,a._viewportsCurrent=[{x:0,y:0,w:0,h:0},{x:0,y:0,w:0,h:0}],a._scissorsCurrent=[{x:0,y:0,w:0,h:0},{x:0,y:0,w:0,h:0}],a._scissorCached={x:0,y:0,z:0,w:0},a._stencilRefsCurrent=[-1,-1],a._blendColorsCurrent=[[null,null,null,null],[null,null,null,null]],a._name="WebGPU",a.isNDCHalfZRange=!0,a.hasOriginBottomLeft=!1,t.deviceDescriptor=t.deviceDescriptor||{},t.swapChainFormat=t.swapChainFormat||_0x5213c6.TextureFormat.BGRA8Unorm,t.antialiasing=void 0===t.antialiasing||t.antialiasing,t.stencil=null===(i=t.stencil)||void 0===i||i,t.enableGPUDebugMarkers=null!==(n=t.enableGPUDebugMarkers)&&void 0!==n&&n,!navigator.gpu)return console.log("WebGPU is not supported by your browser."),a;a._isWebGPU=!0,a._shaderPlatformName="WEBGPU",void 0===t.deterministicLockstep&&(t.deterministicLockstep=!1),void 0===t.lockstepMaxSteps&&(t.lockstepMaxSteps=4),void 0===t.audioEngine&&(t.audioEngine=!0),a._deterministicLockstep=t.deterministicLockstep,a._lockstepMaxSteps=t.lockstepMaxSteps,a._timeStep=t.timeStep||1/60,a._doNotHandleContextLost=!!t.doNotHandleContextLost,a._canvas=e,a._options=t,a.premultipliedAlpha=null===(r=t.premultipliedAlpha)||void 0===r||r;var s=window.devicePixelRatio||1,l=t.limitDeviceRatio||s,u=null!==(o=t.adaptToDeviceRatio)&&void 0!==o&&o;a._hardwareScalingLevel=u?1/Math.min(l,s):1,a._mainPassSampleCount=t.antialiasing?a._defaultSampleCount:1,a._isStencilEnable=t.stencil,a._shaderProcessor=new _0x4c4c07,a._shaderProcessorWGSL=new _0x422dbd;var c=a;return a.saveCompiledShaderInIndexDB=!0,new l$14({name:_0x4cd9cc.COMPILED_WGSL_STORE_NAME}).then((function(e){e.checkObjectStoreExit(_0x4cd9cc.COMPILED_WGSL_TABLE_NAME)?c._indexedDBScheduler=e:e.createObjectStore(_0x4cd9cc.COMPILED_WGSL_TABLE_NAME).then((function(){c._indexedDBScheduler=e}))})),a}_0x62068c(),_0xf48096&&(_0x4cd9cc.__proto__=_0xf48096),_0x4cd9cc.prototype=Object.create(_0xf48096&&_0xf48096.prototype),_0x4cd9cc.prototype.constructor=_0xf48096,Object.defineProperties(_0x4cd9cc.prototype,{snapshotRenderingMode:{get:function(){return this._snapshotRendering.mode},set:function(e){this._snapshotRendering.mode=e}},snapshotRendering:{get:function(){return this._snapshotRendering.enabled},set:function(e){this._snapshotRendering.enabled=e}},disableCacheSamplers:{get:function(){return!!this._cacheSampler&&this._cacheSampler.disabled},set:function(e){this._cacheSampler&&(this._cacheSampler.disabled=e)}},disableCacheRenderPipelines:{get:function(){return!!this._cacheRenderPipeline&&this._cacheRenderPipeline.disabled},set:function(e){this._cacheRenderPipeline&&(this._cacheRenderPipeline.disabled=e)}},disableCacheBindGroups:{get:function(){return!!this._cacheBindGroups&&this._cacheBindGroups.disabled},set:function(e){this._cacheBindGroups&&(this._cacheBindGroups.disabled=e)}},IsSupportedAsync:{get:function(){return navigator.gpu?navigator.gpu.requestAdapter().then((function(e){return!!e}),(function(){return!1})).catch((function(){return!1})):Promise.resolve(!1)}},IsSupported:{get:function(){return console.log("You must call IsSupportedAsync for WebGPU!"),!1}},supportsUniformBuffers:{get:function(){return!0}},supportedExtensions:{get:function(){return this._adapterSupportedExtensions}},enabledExtensions:{get:function(){return this._deviceEnabledExtensions}},description:{get:function(){return this.name+this.version}},version:{get:function(){return 1}},compatibilityMode:{get:function(){return this._compatibilityMode},set:function(e){this._compatibilityMode=e}},currentSampleCount:{get:function(){return this._currentRenderTarget?this._currentRenderTarget.samples:this._mainPassSampleCount}},caps:{get:function(){return this._caps}}}),_0x4cd9cc.prototype.snapshotRenderingReset=function(){this._snapshotRendering.reset()},_0x4cd9cc.prototype.getInfo=function(){return{vendor:"unknown vendor",renderer:"unknown renderer",version:"unknown version"}},_0x4cd9cc.CreateAsync=function(e,t){void 0===t&&(t={});var i=new _0x4cd9cc(e,t);return new Promise((function(e){i.initAsync(t.glslangOptions,t.twgslOptions).then((function(){return e(i)}))}))},_0x4cd9cc.prototype.initAsync=function(e,t){var i,n=this;return this._initGlslang(null!=e?e:null===(i=this._options)||void 0===i?void 0:i.glslangOptions).then((function(e){var i;return n._glslang=e,n._tintWASM=_0x4cd9cc.UseTWGSL?new _0x1db2e9:null,n._tintWASM?n._tintWASM.initTwgsl(null!=t?t:null===(i=n._options)||void 0===i?void 0:i.twgslOptions).then((function(){return navigator.gpu.requestAdapter(n._options)}),(function(e){throw console.log("Can not initialize twgsl!"),Error("WebGPU initializations stopped.")})):navigator.gpu.requestAdapter(n._options)}),(function(e){throw console.log("Can not initialize glslang!"),Error("WebGPU initializations stopped.")})).then((function(e){if(e){n._adapter=e,n._adapterSupportedExtensions=[],n._adapter.features.forEach((function(e){return n._adapterSupportedExtensions.push(e)}));var t=n._options.deviceDescriptor;if(null==t?void 0:t.requiredFeatures){for(var i=[],r=0,o=t.requiredFeatures;r<o.length;r++){var a=o[r];-1!==n._adapterSupportedExtensions.indexOf(a)&&i.push(a)}t.requiredFeatures=i}return n._adapter.requestDevice(n._options.deviceDescriptor)}throw"Could not retrieve a WebGPU adapter (adapter is null)."})).then((function(e){var t,i;n._device=e,n._deviceEnabledExtensions=[],null===(t=n._device.features)||void 0===t||t.forEach((function(e){return n._deviceEnabledExtensions.push(e)}));var r=-1;n._device.addEventListener("uncapturederror",(function(e){++r<n.numMaxUncapturedErrors?_0x50f23a.Warn("WebGPU uncaptured error (".concat(r+1,"): ").concat(e.error," - ").concat(e.error.message)):r++===n.numMaxUncapturedErrors&&_0x50f23a.Warn("WebGPU uncaptured error: too many warnings (".concat(n.numMaxUncapturedErrors,"), no more warnings will be reported to the console for this engine."))})),!n._doNotHandleContextLost&&(null===(i=n._device.lost)||void 0===i||i.then((function(e){n._contextWasLost=!0,_0x50f23a.Warn("WebGPU context lost. "+e),n.onContextLostObservable.notifyObservers(n),n._restoreEngineAfterContextLost(n.initAsync.bind(n))})))}),(function(e){console.log("Could not retrieve a WebGPU device.")})).then((function(){n._bufferManager=new _0x430b74(n._device),n._textureHelper=new WebGPUTextureHelper(n._device,n._glslang,n._tintWASM,n._bufferManager,n),n._cacheSampler=new _0x2335eb(n._device),n._cacheBindGroups=new _0x10caf5(n._device,n._cacheSampler,n),n._timestampQuery=new _0x17d952(n._device,n._bufferManager),n._occlusionQuery=n._device.createQuerySet?new _0x37a9d4(n,n._device,n._bufferManager):void 0,n._bundleList=new WebGPUBundleList(n._device),n._bundleListRenderTarget=new WebGPUBundleList(n._device),n._snapshotRendering=new _0x1e8692(n,n._snapshotRenderingMode,n._bundleList,n._bundleListRenderTarget),n._ubInvertY=n._bufferManager.createBuffer(new Float32Array([-1,0]),_0x5213c6.BufferUsage.Uniform|_0x5213c6.BufferUsage.CopyDst),n._ubDontInvertY=n._bufferManager.createBuffer(new Float32Array([1,0]),_0x5213c6.BufferUsage.Uniform|_0x5213c6.BufferUsage.CopyDst),n.dbgVerboseLogsForFirstFrames&&void 0===n._count&&(n._count=0,console.log("%c frame #"+n._count+" - begin","background: #ffff00")),n._uploadEncoder=n._device.createCommandEncoder(n._uploadEncoderDescriptor),n._renderEncoder=n._device.createCommandEncoder(n._renderEncoderDescriptor),n._renderTargetEncoder=n._device.createCommandEncoder(n._renderTargetEncoderDescriptor),n._emptyVertexBuffer=new VertexBuffer(n,[0],"",!1,!1,1,!1,0,1),n._initializeLimits(),n._cacheRenderPipeline=new _0x3a822c(n._device,n._emptyVertexBuffer,!n._caps.textureFloatLinearFiltering),n._depthCullingState=new _0x5bc595(n._cacheRenderPipeline),n._stencilStateComposer=new _0x32b365(n._cacheRenderPipeline),n._stencilStateComposer.stencilGlobal=n._stencilState,n._depthCullingState.depthTest=!0,n._depthCullingState.depthFunc=_0x333f62.LEQUAL,n._depthCullingState.depthMask=!0,n._textureHelper.setCommandEncoder(n._uploadEncoder),n._clearQuad=new _0x28ce94(n._device,n,n._emptyVertexBuffer),n._defaultDrawContext=n.createDrawContext(),n._currentDrawContext=n._defaultDrawContext,n._defaultMaterialContext=n.createMaterialContext(),n._currentMaterialContext=n._defaultMaterialContext,n._initializeContextAndSwapChain(),n._initializeMainAttachments(!0)})).catch((function(e){console.log("Can not create WebGPU Device and/or context."),console.trace&&console.trace()}))},_0x4cd9cc.prototype._initGlslang=function(e){if(e=e||{},(e=p$19(_0x4cd9cc._GLSLslangDefaultOptions,e)).glslang)return Promise.resolve(e.glslang);if(self.glslang)return self.glslang(e.wasmPath);if(e.jsPath&&e.wasmPath){var t=n$17(e.jsPath),i=n$17(e.wasmPath);return"undefined"!=typeof window?_0xd79dde.LoadScriptAsync(t).then((function(){return self.glslang(i)})):(importScripts(t),self.glslang(i))}return Promise.reject("gslang is not available.")},_0x4cd9cc.prototype._initializeLimits=function(){var e=this._adapter;this._caps={maxTexturesImageUnits:e.maxSampledTexturesPerShaderStage,maxVertexTextureImageUnits:e.maxSampledTexturesPerShaderStage,maxCombinedTexturesImageUnits:32,maxTextureSize:e.maxTextureDimension2D,maxCubemapTextureSize:e.maxTextureDimension3D,maxRenderTextureSize:e.maxTextureDimension2D,maxVertexAttribs:e.maxVertexAttributes,maxVaryingVectors:15,maxFragmentUniformVectors:1024,maxVertexUniformVectors:1024,standardDerivatives:!0,astc:this._deviceEnabledExtensions.indexOf(_0x5213c6.FeatureName.TextureCompressionASTC)>=0||void 0,s3tc:this._deviceEnabledExtensions.indexOf(_0x5213c6.FeatureName.TextureCompressionBC)>=0||void 0,pvrtc:null,etc1:null,etc2:this._deviceEnabledExtensions.indexOf(_0x5213c6.FeatureName.TextureCompressionETC2)>=0||void 0,bptc:this._deviceEnabledExtensions.indexOf(_0x5213c6.FeatureName.TextureCompressionBC)>=0||void 0,maxAnisotropy:4,uintIndices:!0,fragmentDepthSupported:!0,highPrecisionShaderSupported:!0,colorBufferFloat:!0,textureFloat:!0,textureFloatLinearFiltering:!1,textureFloatRender:!0,textureHalfFloat:!0,textureHalfFloatLinearFiltering:!0,textureHalfFloatRender:!0,textureLOD:!0,drawBuffersExtension:!0,depthTextureExtension:!0,vertexArrayObject:!1,instancedArrays:!0,timerQuery:"undefined"!=typeof BigUint64Array&&-1!==this.enabledExtensions.indexOf(_0x5213c6.FeatureName.TimestampQuery)||void 0,supportOcclusionQuery:"undefined"!=typeof BigUint64Array,canUseTimestampForTimerQuery:!0,multiview:!1,oculusMultiview:!1,parallelShaderCompile:void 0,blendMinMax:!0,maxMSAASamples:4,canUseGLInstanceID:!0,canUseGLVertexID:!0,supportComputeShaders:!0,supportSRGBBuffers:!0,supportTransformFeedbacks:!1,textureMaxLevel:!0,texture2DArrayMaxLayerCount:e.maxTextureArrayLayers,minUniformBufferOffsetAlignment:e.minUniformBufferOffsetAlignment,maxUniformBufferBindingSize:e.maxUniformBufferBindingSize},this._caps.parallelShaderCompile=null,this._features={forceBitmapOverHTMLImageElement:!0,supportRenderAndCopyToLodForFloatTextures:!0,supportDepthStencilTexture:!0,supportShadowSamplers:!0,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:!0,trackUbosInFrame:!0,checkUbosContentBeforeUpload:!0,supportCSM:!0,basisNeedsPOT:!1,support3DTextures:!0,needTypeSuffixInShaderConstants:!0,supportMSAA:!0,supportSSAO2:!0,supportExtendedTextureFormats:!0,supportSwitchCaseInShader:!0,supportSyncTextureRead:!1,needsInvertingBitmap:!1,useUBOBindingCache:!1,needShaderCodeInlining:!0,needToAlwaysBindUniformBuffers:!0,supportRenderPasses:!0,_collectUbosUpdatedInFrame:!1}},_0x4cd9cc.prototype._initializeContextAndSwapChain=function(){this._context=this._canvas.getContext("webgpu"),this._configureContext(),this._colorFormat=this._options.swapChainFormat,this._mainRenderPassWrapper.colorAttachmentGPUTextures=[new _0x157d2f],this._mainRenderPassWrapper.colorAttachmentGPUTextures[0].format=this._colorFormat},_0x4cd9cc.prototype._initializeMainAttachments=function(e){var t;void 0===e&&(e=!1),this._mainTextureExtends={width:this.getRenderWidth(e),height:this.getRenderHeight(e),depthOrArrayLayers:1};var i,n=new Float32Array([this.getRenderHeight()]);if(this._bufferManager.setSubData(this._ubInvertY,4,n),this._bufferManager.setSubData(this._ubDontInvertY,4,n),this._options.antialiasing){var r={size:this._mainTextureExtends,mipLevelCount:1,sampleCount:this._mainPassSampleCount,dimension:_0x5213c6.TextureDimension.E2d,format:this._options.swapChainFormat,usage:_0x5213c6.TextureUsage.RenderAttachment};null===(t=this._mainTexture)||void 0===t||t.destroy(),this._mainTexture=this._device.createTexture(r),i=[{view:this._mainTexture.createView(),clearValue:new e$1X(0,0,0,1),loadOp:_0x5213c6.LoadOp.Clear,storeOp:_0x5213c6.StoreOp.Store}]}else i=[{view:void 0,clearValue:new e$1X(0,0,0,1),loadOp:_0x5213c6.LoadOp.Clear,storeOp:_0x5213c6.StoreOp.Store}];this._mainRenderPassWrapper.depthTextureFormat=this.isStencilEnable?_0x5213c6.TextureFormat.Depth24PlusStencil8:_0x5213c6.TextureFormat.Depth32Float,this._setDepthTextureFormat(this._mainRenderPassWrapper);var o={size:this._mainTextureExtends,mipLevelCount:1,sampleCount:this._mainPassSampleCount,dimension:_0x5213c6.TextureDimension.E2d,format:this._mainRenderPassWrapper.depthTextureFormat,usage:_0x5213c6.TextureUsage.RenderAttachment};this._depthTexture&&this._depthTexture.destroy(),this._depthTexture=this._device.createTexture(o);var a={view:this._depthTexture.createView(),depthClearValue:this._clearDepthValue,depthLoadOp:_0x5213c6.LoadOp.Clear,depthStoreOp:_0x5213c6.StoreOp.Store,stencilClearValue:this._clearStencilValue,stencilLoadOp:this.isStencilEnable?_0x5213c6.LoadOp.Clear:void 0,stencilStoreOp:this.isStencilEnable?_0x5213c6.StoreOp.Store:void 0};this._mainRenderPassWrapper.renderPassDescriptor={colorAttachments:i,depthStencilAttachment:a},null!==this._mainRenderPassWrapper.renderPass&&this._endMainRenderPass()},_0x4cd9cc.prototype._configureContext=function(){this._context.configure({device:this._device,format:this._options.swapChainFormat,usage:_0x5213c6.TextureUsage.RenderAttachment|_0x5213c6.TextureUsage.CopySrc,alphaMode:this.premultipliedAlpha?_0x5213c6.CanvasCompositingAlphaMode.Premultiplied:_0x5213c6.CanvasCompositingAlphaMode.Opaque})},_0x4cd9cc.prototype.setSize=function(e,t,i){return void 0===i&&(i=!1),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - setSize called -",e,t)),this._initializeMainAttachments(i),this.snapshotRendering&&this.snapshotRenderingReset(),!0},_0x4cd9cc.prototype._getShaderProcessor=function(e){return e===_0x3b3a87.WGSL?this._shaderProcessorWGSL:this._shaderProcessor},_0x4cd9cc.prototype._getShaderProcessingContext=function(e){return new _0x27ae2e(e)},_0x4cd9cc.prototype.applyStates=function(){this._stencilStateComposer.apply(),this._cacheRenderPipeline.setAlphaBlendEnabled(this._alphaState.alphaBlend)},_0x4cd9cc.prototype.wipeCaches=function(e){this.preventCacheWipeBetweenFrames&&!e||(this._forceEnableEffect=!0,this._currentIndexBuffer=null,this._currentOverrideVertexBuffers=null,this._cacheRenderPipeline.setBuffers(null,null,null),e&&(this._stencilStateComposer.reset(),this._depthCullingState.reset(),this._depthCullingState.depthFunc=_0x333f62.LEQUAL,this._alphaState.reset(),this._alphaMode=_0x333f62.ALPHA_ADD,this._alphaEquation=_0x333f62.ALPHA_DISABLE,this._cacheRenderPipeline.setAlphaBlendFactors(this._alphaState._blendFunctionParameters,this._alphaState._blendEquationParameters),this._cacheRenderPipeline.setAlphaBlendEnabled(!1),this.setColorWrite(!0)),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null)},_0x4cd9cc.prototype.setColorWrite=function(e){this._colorWriteLocal=e,this._cacheRenderPipeline.setWriteMask(e?15:0)},_0x4cd9cc.prototype.getColorWrite=function(){return this._colorWriteLocal},_0x4cd9cc.prototype._resetCurrentViewport=function(e){this._viewportsCurrent[e].x=0,this._viewportsCurrent[e].y=0,this._viewportsCurrent[e].w=0,this._viewportsCurrent[e].h=0,1===e&&(this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0)},_0x4cd9cc.prototype._mustUpdateViewport=function(e){var t=e===this._mainRenderPassWrapper.renderPass?0:1,i=this._viewportCached.x,n=this._viewportCached.y,r=this._viewportCached.z,o=this._viewportCached.w,a=this._viewportsCurrent[t].x!==i||this._viewportsCurrent[t].y!==n||this._viewportsCurrent[t].w!==r||this._viewportsCurrent[t].h!==o;return a&&(this._viewportsCurrent[t].x=this._viewportCached.x,this._viewportsCurrent[t].y=this._viewportCached.y,this._viewportsCurrent[t].w=this._viewportCached.z,this._viewportsCurrent[t].h=this._viewportCached.w),a},_0x4cd9cc.prototype._applyViewport=function(e){var t=Math.floor(this._viewportCached.y),i=Math.floor(this._viewportCached.w);!this._currentRenderTarget&&(t=this.getRenderHeight()-t-i),e.setViewport(Math.floor(this._viewportCached.x),t,Math.floor(this._viewportCached.z),i,0,1),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - viewport applied - (",this._viewportCached.x,this._viewportCached.y,this._viewportCached.z,this._viewportCached.w,") current pass is main pass="+(e===this._mainRenderPassWrapper.renderPass)))},_0x4cd9cc.prototype._viewport=function(e,t,i,n){this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=i,this._viewportCached.w=n},_0x4cd9cc.prototype._resetCurrentScissor=function(e){this._scissorsCurrent[e].x=0,this._scissorsCurrent[e].y=0,this._scissorsCurrent[e].w=0,this._scissorsCurrent[e].h=0},_0x4cd9cc.prototype._mustUpdateScissor=function(e){var t=e===this._mainRenderPassWrapper.renderPass?0:1,i=this._scissorCached.x,n=this._scissorCached.y,r=this._scissorCached.z,o=this._scissorCached.w,a=this._scissorsCurrent[t].x!==i||this._scissorsCurrent[t].y!==n||this._scissorsCurrent[t].w!==r||this._scissorsCurrent[t].h!==o;return a&&(this._scissorsCurrent[t].x=this._scissorCached.x,this._scissorsCurrent[t].y=this._scissorCached.y,this._scissorsCurrent[t].w=this._scissorCached.z,this._scissorsCurrent[t].h=this._scissorCached.w),a},_0x4cd9cc.prototype._applyScissor=function(e){e.setScissorRect(this._scissorCached.x,this._currentRenderTarget?this._scissorCached.y:this.getRenderHeight()-this._scissorCached.w-this._scissorCached.y,this._scissorCached.z,this._scissorCached.w),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - scissor applied - (",this._scissorCached.x,this._scissorCached.y,this._scissorCached.z,this._scissorCached.w,") current pass is main pass="+(e===this._mainRenderPassWrapper.renderPass)))},_0x4cd9cc.prototype._scissorIsActive=function(){return 0!==this._scissorCached.x||0!==this._scissorCached.y||0!==this._scissorCached.z||0!==this._scissorCached.w},_0x4cd9cc.prototype.enableScissor=function(e,t,i,n){this._scissorCached.x=e,this._scissorCached.y=t,this._scissorCached.z=i,this._scissorCached.w=n},_0x4cd9cc.prototype.disableScissor=function(){this._scissorCached.x=0,this._scissorCached.y=0,this._scissorCached.z=0,this._scissorCached.w=0,this._resetCurrentScissor(0),this._resetCurrentScissor(1)},_0x4cd9cc.prototype._resetCurrentStencilRef=function(e){this._stencilRefsCurrent[e]=-1},_0x4cd9cc.prototype._mustUpdateStencilRef=function(e){var t=e===this._mainRenderPassWrapper.renderPass?0:1,i=this._stencilStateComposer.funcRef!==this._stencilRefsCurrent[t];return i&&(this._stencilRefsCurrent[t]=this._stencilStateComposer.funcRef),i},_0x4cd9cc.prototype._applyStencilRef=function(e){var t;e.setStencilReference(null!==(t=this._stencilStateComposer.funcRef)&&void 0!==t?t:0)},_0x4cd9cc.prototype._resetCurrentColorBlend=function(e){this._blendColorsCurrent[e][0]=this._blendColorsCurrent[e][1]=this._blendColorsCurrent[e][2]=this._blendColorsCurrent[e][3]=null},_0x4cd9cc.prototype._mustUpdateBlendColor=function(e){var t=e===this._mainRenderPassWrapper.renderPass?0:1,i=this._alphaState._blendConstants,n=i[0]!==this._blendColorsCurrent[t][0]||i[1]!==this._blendColorsCurrent[t][1]||i[2]!==this._blendColorsCurrent[t][2]||i[3]!==this._blendColorsCurrent[t][3];return n&&(this._blendColorsCurrent[t][0]=i[0],this._blendColorsCurrent[t][1]=i[1],this._blendColorsCurrent[t][2]=i[2],this._blendColorsCurrent[t][3]=i[3]),n},_0x4cd9cc.prototype._applyBlendColor=function(e){e.setBlendConstant(this._alphaState._blendConstants)},_0x4cd9cc.prototype.clear=function(e,t,i,n){void 0===n&&(n=!1),e&&void 0===e.a&&(e.a=1);var r=this._scissorIsActive();this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - clear called - backBuffer=",t," depth=",i," stencil=",n," scissor is active=",r)),this._currentRenderTarget?r?(!this._rttRenderPassWrapper.renderPass&&this._startRenderTargetRenderPass(this._currentRenderTarget,!1,t?e:null,i,n),this.compatibilityMode?this._applyScissor(this._currentRenderPass):this._bundleListRenderTarget.addItem(new WebGPURenderItemScissor(this._scissorCached.x,this._scissorCached.y,this._scissorCached.z,this._scissorCached.w)),this._clearFullQuad(t?e:null,i,n)):(this._currentRenderPass&&this._endRenderTargetRenderPass(),this._startRenderTargetRenderPass(this._currentRenderTarget,!0,t?e:null,i,n)):((!this._mainRenderPassWrapper.renderPass||!r)&&this._startMainRenderPass(!r,t?e:null,i,n),r&&(this.compatibilityMode?this._applyScissor(this._currentRenderPass):this._bundleList.addItem(new WebGPURenderItemScissor(this._scissorCached.x,this._scissorCached.y,this._scissorCached.z,this._scissorCached.w)),this._clearFullQuad(t?e:null,i,n)))},_0x4cd9cc.prototype._clearFullQuad=function(e,t,i){var n,r,o,a=this.compatibilityMode?this._getCurrentRenderPass():null,s=0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget;this._clearQuad.setColorFormat(this._colorFormat),this._clearQuad.setDepthStencilFormat(this._depthTextureFormat),this._clearQuad.setMRTAttachments(null!==(n=this._cacheRenderPipeline.mrtAttachments)&&void 0!==n?n:[],null!==(r=this._cacheRenderPipeline.mrtTextureArray)&&void 0!==r?r:[],this._cacheRenderPipeline.mrtTextureCount),this.compatibilityMode?a.setStencilReference(this._clearStencilValue):s.addItem(new WebGPURenderItemStencilRef(this._clearStencilValue));var l=this._clearQuad.clear(a,e,t,i,this.currentSampleCount);this.compatibilityMode?this._applyStencilRef(a):(s.addBundle(l),s.addItem(new WebGPURenderItemStencilRef(null!==(o=this._stencilStateComposer.funcRef)&&void 0!==o?o:0)),this._reportDrawCall())},_0x4cd9cc.prototype.createVertexBuffer=function(e){var t;return t=e instanceof Array?new Float32Array(e):e instanceof ArrayBuffer?new Uint8Array(e):e,this._bufferManager.createBufferByMap(t,_0x5213c6.BufferUsage.Vertex|_0x5213c6.BufferUsage.CopyDst)},_0x4cd9cc.prototype.createDynamicVertexBuffer=function(e){return this.createVertexBuffer(e)},_0x4cd9cc.prototype.createIndexBuffer=function(e){var t,i=!0;e instanceof Uint32Array||e instanceof Int32Array?t=e:e instanceof Uint16Array?(t=e,i=!1):e.length>65535?t=new Uint32Array(e):(t=new Uint16Array(e),i=!1);var n=this._bufferManager.createBufferByMap(t,_0x5213c6.BufferUsage.Index|_0x5213c6.BufferUsage.CopyDst);return n.is32Bits=i,n},_0x4cd9cc.prototype._createBuffer=function(e,t){var i;i=e instanceof Array?new Float32Array(e):e instanceof ArrayBuffer?new Uint8Array(e):e;var n=0;return t&_0x333f62.BUFFER_CREATIONFLAG_READ&&(n|=_0x5213c6.BufferUsage.CopySrc),t&_0x333f62.BUFFER_CREATIONFLAG_WRITE&&(n|=_0x5213c6.BufferUsage.CopyDst),t&_0x333f62.BUFFER_CREATIONFLAG_UNIFORM&&(n|=_0x5213c6.BufferUsage.Uniform),t&_0x333f62.BUFFER_CREATIONFLAG_VERTEX&&(n|=_0x5213c6.BufferUsage.Vertex),t&_0x333f62.BUFFER_CREATIONFLAG_INDEX&&(n|=_0x5213c6.BufferUsage.Index),t&_0x333f62.BUFFER_CREATIONFLAG_STORAGE&&(n|=_0x5213c6.BufferUsage.Storage),this._bufferManager.createBuffer(i,n)},_0x4cd9cc.prototype.bindBuffersDirectly=function(){throw"Not implemented on WebGPU"},_0x4cd9cc.prototype.updateAndBindInstancesBuffer=function(){throw"Not implemented on WebGPU"},_0x4cd9cc.prototype.bindBuffers=function(e,t,i,n){this._currentIndexBuffer=t,this._currentOverrideVertexBuffers=null!=n?n:null,this._cacheRenderPipeline.setBuffers(e,t,this._currentOverrideVertexBuffers)},_0x4cd9cc.prototype._releaseBuffer=function(e){return this._bufferManager.releaseBuffer(e)},_0x4cd9cc.prototype.createEffect=function(e,t,i,n,r,o,a,s,l,u){var c;void 0===u&&(u=_0x3b3a87.GLSL);var h=e.vertexElement||e.vertex||e.vertexToken||e.vertexSource||e,d=e.fragmentElement||e.fragment||e.fragmentToken||e.fragmentSource||e,f=this._getGlobalDefines(),p=null!==(c=null!=r?r:t.defines)&&void 0!==c?c:"";f&&(p+="\n"+f);var _=h+"+"+d+"@"+p;if(this._compiledEffects[_]){var m=this._compiledEffects[_];return a&&m.isReady()&&a(m),m}var g=new _0x57b60b(e,t,i,n,this,r,o,a,s,l,_,u);return this._compiledEffects[_]=g,g},_0x4cd9cc.prototype._compileRawShaderToSpirV=function(e,t){return this._glslang.compileGLSL(e,t)},_0x4cd9cc.prototype._compileShaderToSpirV=function(e,t,i,n){return this._compileRawShaderToSpirV(n+(i?i+"\n":"")+e,t)},_0x4cd9cc.prototype._getWGSLShader=function(e,t,i){return(i=i?"//"+i.split("\n").join("\n//")+"\n":"")+e},_0x4cd9cc.prototype._getCompiledShaderFromIndexDB=function(e,t,i){this.saveCompiledShaderInIndexDB&&e==_0x3b3a87.GLSL&&this._indexedDBScheduler?this._indexedDBScheduler.getElementFromDB(_0x4cd9cc.COMPILED_WGSL_TABLE_NAME,t).then((e=>{if(null!=e){var t=e[e.length-1],n=e.slice(0,t),r=e.slice(t,e.length-1);i(!0,n,r)}else console.log("shader text from indexDB is null."),i(!1,null,null)}),(e=>{i(!1,null,null)})):i(!1,null,null)},_0x4cd9cc.prototype._saveCompiledShaderToIndexDB=function(e,t,i){if(this._indexedDBScheduler&&this.saveCompiledShaderInIndexDB){var n=t.length+i.length,r=new Uint32Array(n+1);r.set(t,0),r.set(i,t.length),r[n]=t.length,this._indexedDBScheduler.putElementInDB(_0x4cd9cc.COMPILED_WGSL_TABLE_NAME,e,r)}},_0x4cd9cc.prototype._createPipelineStageDescriptor=function(e,t,i,n){return this._tintWASM&&n===_0x3b3a87.GLSL&&(t=this._tintWASM.convertSpirV2WGSL(t),i=this._tintWASM.convertSpirV2WGSL(i),t=t.replace(/type\s/g,"alias "),i=i.replace(/type\s/g,"alias ")),{vertexStage:{module:this._device.createShaderModule({code:t}),entryPoint:"main"},fragmentStage:{module:this._device.createShaderModule({code:i}),entryPoint:"main"}}},_0x4cd9cc.prototype._compileRawPipelineStageDescriptor=function(e,t,i,n){var r=n===_0x3b3a87.GLSL?this._compileRawShaderToSpirV(t,"vertex"):t,o=n===_0x3b3a87.GLSL?this._compileRawShaderToSpirV(i,"fragment"):i;return this._createPipelineStageDescriptor(e,r,o,n)},_0x4cd9cc.prototype._compilePipelineStageDescriptor=function(e,t,i,n,r){this.onBeforeShaderCompilationObservable.notifyObservers(this);var o="#version 450\n",a=r===_0x3b3a87.GLSL?this._compileShaderToSpirV(t,"vertex",n,o):this._getWGSLShader(t,"vertex",n),s=r===_0x3b3a87.GLSL?this._compileShaderToSpirV(i,"fragment",n,o):this._getWGSLShader(i,"fragment",n),l=this._createPipelineStageDescriptor(e,a,s,r);return this.onAfterShaderCompilationObservable.notifyObservers(this),l},_0x4cd9cc.prototype.createRawShaderProgram=function(){throw"Not available on WebGPU"},_0x4cd9cc.prototype.createShaderProgram=function(){throw"Not available on WebGPU"},_0x4cd9cc.prototype.inlineShaderCode=function(e){var t=new _0x12abee(e);return t.debug=!1,t.processCode(),t.code},_0x4cd9cc.prototype.createPipelineContext=function(e){return new _0x2a8456(e,this)},_0x4cd9cc.prototype.createMaterialContext=function(){return new _0x4aeff2},_0x4cd9cc.prototype.createDrawContext=function(){return new _0x1bd725(this._bufferManager)},_0x4cd9cc.prototype._preparePipelineContext=function(e,t,i,n,r,o,a,s,l,u,c){var h=e,d=c||h.shaderProcessingContext.shaderLanguage;this.dbgShowShaderCode&&(console.log(s),console.log(t),console.log(i)),h.sources={fragment:i,vertex:t,rawVertex:r,rawFragment:o};var f=e._name;h.stages=n?this._compileRawPipelineStageDescriptor(f,t,i,d):this._compilePipelineStageDescriptor(f,t,i,s,d)},_0x4cd9cc.prototype.getAttributes=function(e,t){for(var i=new Array(t.length),n=e,r=0;r<t.length;r++){var o=t[r],a=n.shaderProcessingContext.availableAttributes[o];void 0!==a&&(i[r]=a)}return i},_0x4cd9cc.prototype.enableEffect=function(e){if(e){var t=!0;if(_0x2da137.IsWrapper(e)){if(!e.effect||e.effect===this._currentEffect&&e.materialContext===this._currentMaterialContext&&e.drawContext===this._currentDrawContext&&!this._forceEnableEffect){if(!e.effect&&this.dbgShowEmptyEnableEffectCalls)throw console.error("drawWrapper=",e),"Invalid call to enableEffect: the effect property is empty!";return}if(t=e.effect!==this._currentEffect,this._currentEffect=e.effect,this._currentMaterialContext=e.materialContext,this._currentDrawContext=e.drawContext,this._counters.numEnableDrawWrapper++,!this._currentMaterialContext)throw console.error("drawWrapper=",e),"Invalid call to enableEffect: the materialContext property is empty!"}else t=e!==this._currentEffect,this._currentEffect=e,this._currentMaterialContext=this._defaultMaterialContext,this._currentDrawContext=this._defaultDrawContext,this._counters.numEnableEffects++,this.dbgLogIfNotDrawWrapper&&_0x50f23a.Warn("enableEffect has been called with an Effect and not a Wrapper! effect.uniqueId=".concat(e.uniqueId,", effect.name=").concat(e.name,", effect.name.vertex=").concat(e.name.vertex,", effect.name.fragment=").concat(e.name.fragment),10);this._stencilStateComposer.stencilMaterial=void 0,this._forceEnableEffect=!t&&!this._forceEnableEffect&&this._forceEnableEffect,t&&(this._currentEffect.onBind&&this._currentEffect.onBind(this._currentEffect),this._currentEffect._onBindObservable&&this._currentEffect._onBindObservable.notifyObservers(this._currentEffect))}},_0x4cd9cc.prototype._releaseEffect=function(e){this._compiledEffects[e._key]&&(delete this._compiledEffects[e._key],this._deletePipelineContext(e.getPipelineContext()))},_0x4cd9cc.prototype.releaseEffects=function(){for(var e in this._compiledEffects){var t=this._compiledEffects[e].getPipelineContext();this._deletePipelineContext(t)}this._compiledEffects={}},_0x4cd9cc.prototype._deletePipelineContext=function(e){e&&e.dispose()},Object.defineProperty(_0x4cd9cc.prototype,"needPOTTextures",{get:function(){return!1},enumerable:!1,configurable:!0}),_0x4cd9cc.prototype._createHardwareTexture=function(){return new _0x157d2f},_0x4cd9cc.prototype._releaseTexture=function(e){var t=this._internalTexturesCache.indexOf(e);-1!==t&&this._internalTexturesCache.splice(t,1),this._textureHelper.releaseTexture(e)},_0x4cd9cc.prototype._getRGBABufferInternalSizedFormat=function(){return _0x333f62.TEXTUREFORMAT_RGBA},_0x4cd9cc.prototype.updateTextureComparisonFunction=function(e,t){e._comparisonFunction=t},_0x4cd9cc.prototype._createInternalTexture=function(e,t,i,n){var r,o,a;void 0===i&&(i=!0),void 0===n&&(n=InternalTextureSource.Unknown);var s={};void 0!==t&&"object"==typeof t?(s.generateMipMaps=t.generateMipMaps,s.type=void 0===t.type?_0x333f62.TEXTURETYPE_UNSIGNED_INT:t.type,s.samplingMode=void 0===t.samplingMode?_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,s.format=void 0===t.format?_0x333f62.TEXTUREFORMAT_RGBA:t.format,s.samples=null!==(r=t.samples)&&void 0!==r?r:1,s.creationFlags=null!==(o=t.creationFlags)&&void 0!==o?o:0,s.useSRGBBuffer=null!==(a=t.useSRGBBuffer)&&void 0!==a&&a):(s.generateMipMaps=t,s.type=_0x333f62.TEXTURETYPE_UNSIGNED_INT,s.samplingMode=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE,s.format=_0x333f62.TEXTUREFORMAT_RGBA,s.samples=1,s.creationFlags=0,s.useSRGBBuffer=!1),s.type!==_0x333f62.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?s.type===_0x333f62.TEXTURETYPE_HALF_FLOAT&&!this._caps.textureHalfFloatLinearFiltering&&(s.samplingMode=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE):s.samplingMode=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,s.type===_0x333f62.TEXTURETYPE_FLOAT&&!this._caps.textureFloat&&(s.type=_0x333f62.TEXTURETYPE_UNSIGNED_INT,_0x50f23a.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));var l=new InternalTexture(this,n),u=e.width||e,c=e.height||e,h=e.layers||0;return l.baseWidth=u,l.baseHeight=c,l.width=u,l.height=c,l.depth=h,l.isReady=!0,l.samples=s.samples,l.generateMipMaps=!!s.generateMipMaps,l.samplingMode=s.samplingMode,l.type=s.type,l.format=s.format,l.is2DArray=h>0,l._cachedWrapU=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,l._cachedWrapV=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,l._useSRGBBuffer=s.useSRGBBuffer,this._internalTexturesCache.push(l),!i&&this._textureHelper.createGPUTextureForInternalTexture(l,u,c,h||1,s.creationFlags),l},_0x4cd9cc.prototype.createTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){var _=this;return void 0===r&&(r=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),this._createTextureBase(e,t,i,n,r,o,a,(function(e,t,i,n,r,o,a,s){var l,c=n;if(e.baseWidth=c.width,e.baseHeight=c.height,e.width=c.width,e.height=c.height,e.format=null!=u?u:-1,s(e.width,e.height,c,t,e,(function(){})),null===(l=e._hardwareTexture)||void 0===l?void 0:l.underlyingResource)!o&&!a&&_._generateMipmaps(e,_._uploadEncoder);else{var h=_._textureHelper.createGPUTextureForInternalTexture(e,c.width,c.height,void 0,f);WebGPUTextureHelper.IsImageBitmap(c)&&(_._textureHelper.updateTexture(c,e,c.width,c.height,e.depth,h.format,0,0,r,!1,0,0),!o&&!a&&_._generateMipmaps(e,_._uploadEncoder))}i&&i._removePendingData(e),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}),(function(){return!1}),s,l,u,c,h,d,p)},_0x4cd9cc.prototype.wrapWebGPUTexture=function(e){var t=new _0x157d2f(e),i=new InternalTexture(this,InternalTextureSource.Unknown,!0);return i._hardwareTexture=t,i.isReady=!0,i},_0x4cd9cc.prototype.wrapWebGLTexture=function(){throw new Error("wrapWebGLTexture is not supported, use wrapWebGPUTexture instead.")},_0x4cd9cc.prototype.generateMipMapsForCubemap=function(e){var t;e.generateMipMaps&&(!(null===(t=e._hardwareTexture)||void 0===t?void 0:t.underlyingResource)&&this._textureHelper.createGPUTextureForInternalTexture(e),this._generateMipmaps(e,e.source===InternalTextureSource.RenderTarget||e.source===InternalTextureSource.MultiRenderTarget?this._renderTargetEncoder:void 0))},_0x4cd9cc.prototype.updateTextureSamplingMode=function(e,t,i){void 0===i&&(i=!1),i&&(t.generateMipMaps=!0,this._generateMipmaps(t)),t.samplingMode=e},_0x4cd9cc.prototype.updateTextureWrappingMode=function(e,t,i,n){void 0===i&&(i=null),void 0===n&&(n=null),null!==t&&(e._cachedWrapU=t),null!==i&&(e._cachedWrapV=i),(e.is2DArray||e.is3D)&&null!==n&&(e._cachedWrapR=n)},_0x4cd9cc.prototype.updateTextureDimensions=function(e,t,i,n){if(void 0===n&&(n=1),e._hardwareTexture&&(e.width!==t||e.height!==i||e.depth!==n)){var r=e._hardwareTexture.textureAdditionalUsages;e._hardwareTexture.release(),this._textureHelper.createGPUTextureForInternalTexture(e,t,i,n,r)}},_0x4cd9cc.prototype._setInternalTexture=function(e,t,i){if(i=null!=i?i:e,this._currentEffect){var n=this._currentEffect._pipelineContext.shaderProcessingContext.availableTextures[i];if(this._currentMaterialContext.setTexture(e,t),n&&n.autoBindSampler){var r=i+_0x29840c.AutoSamplerSuffix;this._currentMaterialContext.setSampler(r,t)}}},_0x4cd9cc.prototype.setTexture=function(e,t,i,n){this._setTexture(e,i,!1,!1,n,n)},_0x4cd9cc.prototype.setTextureArray=function(e,t,i,n){for(var r=0;r<i.length;r++)this._setTexture(-1,i[r],!0,!1,n+r.toString(),n)},_0x4cd9cc.prototype._setTexture=function(e,t,i,n,r,o){if(void 0===n&&(n=!1),void 0===r&&(r=""),o=null!=o?o:r,this._currentEffect){if(!t)return this._currentMaterialContext.setTexture(r,null),!1;if(t.video)t.update();else if(t.delayLoadState===_0x333f62.DELAYLOADSTATE_NOTLOADED)return t.delayLoad(),!1;var a=null;if((a=n?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture)&&!a.isMultiview){if(a.isCube&&a._cachedCoordinatesMode!==t.coordinatesMode){a._cachedCoordinatesMode=t.coordinatesMode;var s=t.coordinatesMode!==_0x333f62.TEXTURE_CUBIC_MODE&&t.coordinatesMode!==_0x333f62.TEXTURE_SKYBOX_MODE?_0x333f62.TEXTURE_WRAP_ADDRESSMODE:_0x333f62.TEXTURE_CLAMP_ADDRESSMODE;t.wrapU=s,t.wrapV=s}a._cachedWrapU=t.wrapU,a._cachedWrapV=t.wrapV,a.is3D&&(a._cachedWrapR=t.wrapR),this._setAnisotropicLevel(0,a,t.anisotropicFilteringLevel)}this._setInternalTexture(r,a,o)}else this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - _setTexture called with a null _currentEffect! texture=",t));return!0},_0x4cd9cc.prototype._setAnisotropicLevel=function(e,t,i){t._cachedAnisotropicFilteringLevel!==i&&(t._cachedAnisotropicFilteringLevel=Math.min(i,this._caps.maxAnisotropy))},_0x4cd9cc.prototype._bindTexture=function(e,t,i){void 0!==e&&this._setInternalTexture(i,t)},_0x4cd9cc.prototype.generateMipmaps=function(e){this._generateMipmaps(e,this._renderTargetEncoder)},_0x4cd9cc.prototype._generateMipmaps=function(e,t){var i=e._hardwareTexture;if(i){t=null!=t?t:this._currentRenderTarget&&!this._currentRenderPass?this._renderTargetEncoder:this._currentRenderPass?this._uploadEncoder:this._renderEncoder;var n=e._hardwareTexture.format,r=WebGPUTextureHelper.ComputeNumMipmapLevels(e.width,e.height);this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - generate mipmaps called - width=",e.width,"height=",e.height,"isCube=",e.isCube)),e.isCube?this._textureHelper.generateCubeMipmaps(i,n,r,t):this._textureHelper.generateMipmaps(i,n,r,0,t)}},_0x4cd9cc.prototype.updateTextureData=function(e,t,i,n,r,o,a,s,l){var u;void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=!1);var c=e._hardwareTexture;!(null===(u=e._hardwareTexture)||void 0===u?void 0:u.underlyingResource)&&(c=this._textureHelper.createGPUTextureForInternalTexture(e));var h=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(h,e,r,o,e.depth,c.format,a,s,e.invertY,!1,i,n),l&&this._generateMipmaps(e,this._renderTargetEncoder)},_0x4cd9cc.prototype._uploadCompressedDataToTextureDirectly=function(e,t,i,n,r,o,a){var s;void 0===o&&(o=0),void 0===a&&(a=0);var l=e._hardwareTexture;!(null===(s=e._hardwareTexture)||void 0===s?void 0:s.underlyingResource)&&(e.format=t,l=this._textureHelper.createGPUTextureForInternalTexture(e,i,n));var u=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);this._textureHelper.updateTexture(u,e,i,n,e.depth,l.format,o,a,!1,!1,0,0)},_0x4cd9cc.prototype._uploadDataToTextureDirectly=function(e,t,i,n,r,o){var a;void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=!1);var s=Math.round(Math.log(e.width)*Math.LOG2E),l=Math.round(Math.log(e.height)*Math.LOG2E),u=o?e.width:Math.pow(2,Math.max(s-n,0)),c=o?e.height:Math.pow(2,Math.max(l-n,0)),h=e._hardwareTexture;!(null===(a=e._hardwareTexture)||void 0===a?void 0:a.underlyingResource)&&(h=this._textureHelper.createGPUTextureForInternalTexture(e,u,c));var d=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(d,e,u,c,e.depth,h.format,i,n,e.invertY,!1,0,0)},_0x4cd9cc.prototype._uploadArrayBufferViewToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this._uploadDataToTextureDirectly(e,t,i,n)},_0x4cd9cc.prototype._uploadImageToTexture=function(e,t,i,n){var r;void 0===i&&(i=0),void 0===n&&(n=0);var o=e._hardwareTexture;!(null===(r=e._hardwareTexture)||void 0===r?void 0:r.underlyingResource)&&(o=this._textureHelper.createGPUTextureForInternalTexture(e));var a=t,s=Math.ceil(e.width/(1<<n)),l=Math.ceil(e.height/(1<<n));this._textureHelper.updateTexture(a,e,s,l,e.depth,o.format,i,n,e.invertY,!1,0,0)},_0x4cd9cc.prototype.readPixels=function(e,t,i,n,r,o){void 0===o&&(o=!0);var a=(this._rttRenderPassWrapper.renderPass?this._rttRenderPassWrapper:this._mainRenderPassWrapper).colorAttachmentGPUTextures[0];if(!a)return Promise.resolve(new Uint8Array(0));var s=a.underlyingResource,l=a.format;return s?(o&&this.flushFramebuffer(),this._textureHelper.readPixels(s,e,t,i,n,l)):Promise.resolve(new Uint8Array(0))},_0x4cd9cc.prototype.beginFrame=function(){_0xf48096.prototype.beginFrame.call(this)},_0x4cd9cc.prototype.endFrame=function(){if(this._snapshotRendering.endFrame(this._mainRenderPassWrapper.renderPass),this._endMainRenderPass(),this._timestampQuery.endFrame(this._renderEncoder),this.flushFramebuffer(!1),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - counters")),this._textureHelper.destroyDeferredTextures(),this._bufferManager.destroyDeferredBuffers(),this._features._collectUbosUpdatedInFrame){if(this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),!this._count||this._count<this.dbgVerboseLogsNumFrames)){var e=[];for(var t in _0x5c4ccd._UpdatedUbosInFrame)e.push(t+":"+_0x5c4ccd._UpdatedUbosInFrame[t]);console.log("frame #"+this._count+" - updated ubos -",e.join(", "))}_0x5c4ccd._UpdatedUbosInFrame={}}this.countersLastFrame.numEnableEffects=this._counters.numEnableEffects,this.countersLastFrame.numEnableDrawWrapper=this._counters.numEnableDrawWrapper,this.countersLastFrame.numBundleCreationNonCompatMode=this._counters.numBundleCreationNonCompatMode,this.countersLastFrame.numBundleReuseNonCompatMode=this._counters.numBundleReuseNonCompatMode,this._counters.numEnableEffects=0,this._counters.numEnableDrawWrapper=0,this._counters.numBundleCreationNonCompatMode=0,this._counters.numBundleReuseNonCompatMode=0,this._cacheRenderPipeline.endFrame(),this._cacheBindGroups.endFrame(),this._pendingDebugCommands.length=0,_0xf48096.prototype.endFrame.call(this),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),this._count<this.dbgVerboseLogsNumFrames&&console.log("%c frame #"+this._count+" - end","background: #ffff00"),this._count<this.dbgVerboseLogsNumFrames&&(this._count++,this._count!==this.dbgVerboseLogsNumFrames&&console.log("%c frame #"+this._count+" - begin","background: #ffff00")))},_0x4cd9cc.prototype.flushFramebuffer=function(e){void 0===e&&(e=!0);var t=!this._currentRenderPass,i=0;this._currentRenderPass&&this._currentRenderTarget&&(i|=1,this._endRenderTargetRenderPass()),this._mainRenderPassWrapper.renderPass&&(i|=2,this._endMainRenderPass()),this._commandBuffers[0]=this._uploadEncoder.finish(),this._commandBuffers[1]=this._renderTargetEncoder.finish(),this._commandBuffers[2]=this._renderEncoder.finish(),this._device.queue.submit(this._commandBuffers),this._uploadEncoder=this._device.createCommandEncoder(this._uploadEncoderDescriptor),this._renderEncoder=this._device.createCommandEncoder(this._renderEncoderDescriptor),this._renderTargetEncoder=this._device.createCommandEncoder(this._renderTargetEncoderDescriptor),this._timestampQuery.startFrame(this._uploadEncoder),this._textureHelper.setCommandEncoder(this._uploadEncoder),this._bundleList.reset(),this._bundleListRenderTarget.reset(),e&&(2&i&&this._startMainRenderPass(!1),1&i&&this._startRenderTargetRenderPass(this._currentRenderTarget,!1,null,!1,!1),t&&this._currentRenderTarget&&(this._currentRenderPass=null))},_0x4cd9cc.prototype._currentFrameBufferIsDefaultFrameBuffer=function(){return null===this._currentRenderTarget},_0x4cd9cc.prototype._startRenderTargetRenderPass=function(e,t,i,n,r){var o,a,s,l=e,u=l._depthStencilTexture,c=null==u?void 0:u._hardwareTexture,h=null==c?void 0:c.underlyingResource,d=null==c?void 0:c.msaaTexture,f=null==h?void 0:h.createView(this._rttRenderPassWrapper.depthAttachmentViewDescriptor),p=null==d?void 0:d.createView(this._rttRenderPassWrapper.depthAttachmentViewDescriptor),_=!!c&&WebGPUTextureHelper.HasStencilAspect(c.format),m=[];this.useReverseDepthBuffer&&this.setDepthFunctionToGreaterOrEqual();var g=t&&i,x=t&&n,y=t&&r;if(l._attachments&&l.isMulti){(!this._mrtAttachments||0===this._mrtAttachments.length)&&(this._mrtAttachments=l._defaultAttachments);for(var v=0;v<this._mrtAttachments.length;++v){var $=this._mrtAttachments[v],b=l.textures[v],T=null==b?void 0:b._hardwareTexture,C=null==T?void 0:T.underlyingResource;if(T&&C){var S=p$19(this._rttRenderPassWrapper.colorAttachmentViewDescriptor,{format:T.format}),w=T.msaaTexture,E=C.createView(S),P=null==w?void 0:w.createView(S);m.push({view:P||E,resolveTarget:w?E:void 0,clearValue:0!==$&&g?i:void 0,loadOp:0!==$&&g?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load,storeOp:_0x5213c6.StoreOp.Store})}}this._cacheRenderPipeline.setMRT(l.textures,this._mrtAttachments.length),this._cacheRenderPipeline.setMRTAttachments(this._mrtAttachments)}else{if(M=l.texture){var A=M._hardwareTexture,L=A.underlyingResource;w=A.msaaTexture,E=L.createView(this._rttRenderPassWrapper.colorAttachmentViewDescriptor),P=null==w?void 0:w.createView(this._rttRenderPassWrapper.colorAttachmentViewDescriptor);m.push({view:P||E,resolveTarget:w?E:void 0,clearValue:g?i:void 0,loadOp:g?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load,storeOp:_0x5213c6.StoreOp.Store})}else m.push(null)}if(null===(o=this._debugPushGroup)||void 0===o||o.call(this,"render target pass",1),this._rttRenderPassWrapper.renderPassDescriptor={colorAttachments:m,depthStencilAttachment:u&&h?{view:p||f,depthClearValue:x?this.useReverseDepthBuffer?this._clearReverseDepthValue:this._clearDepthValue:void 0,depthLoadOp:x?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load,depthStoreOp:_0x5213c6.StoreOp.Store,stencilClearValue:l._depthStencilTextureWithStencil&&y?this._clearStencilValue:void 0,stencilLoadOp:_?l._depthStencilTextureWithStencil&&y?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load:void 0,stencilStoreOp:_?_0x5213c6.StoreOp.Store:void 0}:void 0,occlusionQuerySet:(null===(a=this._occlusionQuery)||void 0===a?void 0:a.hasQueries)?this._occlusionQuery.querySet:void 0},this._rttRenderPassWrapper.renderPass=this._renderTargetEncoder.beginRenderPass(this._rttRenderPassWrapper.renderPassDescriptor),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),!this._count||this._count<this.dbgVerboseLogsNumFrames)){var M=l.texture;console.log("frame #"+this._count+" - render target begin pass - internalTexture.uniqueId=",M.uniqueId,"width=",M.width,"height=",M.height,this._rttRenderPassWrapper.renderPassDescriptor)}this._currentRenderPass=this._rttRenderPassWrapper.renderPass,null===(s=this._debugFlushPendingCommands)||void 0===s||s.call(this),(!c||!WebGPUTextureHelper.HasStencilAspect(c.format))&&(this._stencilStateComposer.enabled=!1)},_0x4cd9cc.prototype._endRenderTargetRenderPass=function(){var e,t,i,n;if(this._currentRenderPass){var r=null===(e=this._currentRenderTarget.texture)||void 0===e?void 0:e._hardwareTexture;r&&!this._snapshotRendering.endRenderTargetPass(this._currentRenderPass,r)&&!this.compatibilityMode&&(this._bundleListRenderTarget.run(this._currentRenderPass),this._bundleListRenderTarget.reset()),this._currentRenderPass.end(),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - render target end pass - internalTexture.uniqueId=",null===(i=null===(t=this._currentRenderTarget)||void 0===t?void 0:t.texture)||void 0===i?void 0:i.uniqueId)),null===(n=this._debugPopGroup)||void 0===n||n.call(this,1),this._resetCurrentViewport(1),this._resetCurrentScissor(1),this._resetCurrentStencilRef(1),this._resetCurrentColorBlend(1),this._currentRenderPass=null,this._rttRenderPassWrapper.reset()}},_0x4cd9cc.prototype._getCurrentRenderPass=function(){return this._currentRenderTarget&&!this._currentRenderPass?this._startRenderTargetRenderPass(this._currentRenderTarget,!1,null,!1,!1):!this._currentRenderPass&&this._startMainRenderPass(!1),this._currentRenderPass},_0x4cd9cc.prototype._getCurrentRenderPassIndex=function(){return null===this._currentRenderPass?-1:this._currentRenderPass===this._mainRenderPassWrapper.renderPass?0:1},_0x4cd9cc.prototype._startMainRenderPass=function(e,t,i,n){var r,o,a;this._mainRenderPassWrapper.renderPass&&this._endMainRenderPass(),this.useReverseDepthBuffer&&this.setDepthFunctionToGreaterOrEqual();var s=e&&t,l=e&&i,u=e&&n;this._mainRenderPassWrapper.renderPassDescriptor.colorAttachments[0].clearValue=s?t:void 0,this._mainRenderPassWrapper.renderPassDescriptor.colorAttachments[0].loadOp=s?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load,this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.depthClearValue=l?this.useReverseDepthBuffer?this._clearReverseDepthValue:this._clearDepthValue:void 0,this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.depthLoadOp=l?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load,this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.stencilClearValue=u?this._clearStencilValue:void 0,this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.stencilLoadOp=this.isStencilEnable?u?_0x5213c6.LoadOp.Clear:_0x5213c6.LoadOp.Load:void 0,this._mainRenderPassWrapper.renderPassDescriptor.occlusionQuerySet=(null===(r=this._occlusionQuery)||void 0===r?void 0:r.hasQueries)?this._occlusionQuery.querySet:void 0,this._swapChainTexture=this._context.getCurrentTexture(),this._mainRenderPassWrapper.colorAttachmentGPUTextures[0].set(this._swapChainTexture),this._options.antialiasing?this._mainRenderPassWrapper.renderPassDescriptor.colorAttachments[0].resolveTarget=this._swapChainTexture.createView():this._mainRenderPassWrapper.renderPassDescriptor.colorAttachments[0].view=this._swapChainTexture.createView(),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - main begin pass - texture width="+this._mainTextureExtends.width," height="+this._mainTextureExtends.height,this._mainRenderPassWrapper.renderPassDescriptor)),null===(o=this._debugPushGroup)||void 0===o||o.call(this,"main pass",0),this._currentRenderPass=this._renderEncoder.beginRenderPass(this._mainRenderPassWrapper.renderPassDescriptor),this._mainRenderPassWrapper.renderPass=this._currentRenderPass,null===(a=this._debugFlushPendingCommands)||void 0===a||a.call(this),this._resetCurrentViewport(0),this._resetCurrentScissor(0),this._resetCurrentStencilRef(0),this._resetCurrentColorBlend(0),!this._isStencilEnable&&(this._stencilStateComposer.enabled=!1)},_0x4cd9cc.prototype._endMainRenderPass=function(){var e;null!==this._mainRenderPassWrapper.renderPass&&(this._snapshotRendering.endMainRenderPass(),!this.compatibilityMode&&!this._snapshotRendering.play&&(this._bundleList.run(this._mainRenderPassWrapper.renderPass),this._bundleList.reset()),this._mainRenderPassWrapper.renderPass.end(),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - main end pass")),null===(e=this._debugPopGroup)||void 0===e||e.call(this,0),this._resetCurrentViewport(0),this._resetCurrentScissor(0),this._resetCurrentStencilRef(0),this._resetCurrentColorBlend(0),this._mainRenderPassWrapper.renderPass===this._currentRenderPass&&(this._currentRenderPass=null),this._mainRenderPassWrapper.reset(!1))},_0x4cd9cc.prototype.bindFramebuffer=function(e,t,i,n,r,o,a){var s,l;void 0===t&&(t=0),void 0===o&&(o=0),void 0===a&&(a=0);var u=null===(s=e.texture)||void 0===s?void 0:s._hardwareTexture;this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,u&&(u._currentLayer=e.isCube?6*a+t:a),this._rttRenderPassWrapper.colorAttachmentGPUTextures[0]=u,this._rttRenderPassWrapper.depthTextureFormat=this._currentRenderTarget._depthStencilTexture?WebGPUTextureHelper.GetWebGPUTextureFormat(-1,this._currentRenderTarget._depthStencilTexture.format):void 0,this._setDepthTextureFormat(this._rttRenderPassWrapper),this._setColorFormat(this._rttRenderPassWrapper),this._rttRenderPassWrapper.colorAttachmentViewDescriptor={format:this._colorFormat,dimension:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:e.isCube?6*a+t:a,baseMipLevel:o,arrayLayerCount:1,aspect:_0x5213c6.TextureAspect.All},this._rttRenderPassWrapper.depthAttachmentViewDescriptor={format:this._depthTextureFormat,dimension:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:e.isCube?6*a+t:a,baseMipLevel:0,arrayLayerCount:1,aspect:_0x5213c6.TextureAspect.All},this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - bindFramebuffer called - internalTexture.uniqueId=",null===(l=e.texture)||void 0===l?void 0:l.uniqueId,"face=",t,"lodLevel=",o,"layer=",a,this._rttRenderPassWrapper.colorAttachmentViewDescriptor,this._rttRenderPassWrapper.depthAttachmentViewDescriptor)),this._currentRenderPass=null,this.snapshotRendering&&this.snapshotRenderingMode===_0x333f62.SNAPSHOTRENDERING_FAST&&this._getCurrentRenderPass(),this._cachedViewport&&!r?this.setViewport(this._cachedViewport,i,n):(!i&&(i=e.width,o&&(i/=Math.pow(2,o))),!n&&(n=e.height,o&&(n/=Math.pow(2,o))),this._viewport(0,0,i,n)),this.wipeCaches()},_0x4cd9cc.prototype.unBindFramebuffer=function(e,t,i){var n,r;void 0===t&&(t=!1);var o=this._currentRenderTarget;this._currentRenderTarget=null,i&&i(),this._currentRenderTarget=o,this._currentRenderPass&&this._currentRenderPass!==this._mainRenderPassWrapper.renderPass&&this._endRenderTargetRenderPass(),(null===(n=e.texture)||void 0===n?void 0:n.generateMipMaps)&&!t&&!e.isCube&&this._generateMipmaps(e.texture),this._currentRenderTarget=null,this._onAfterUnbindFrameBufferObservable.notifyObservers(this),this.dbgVerboseLogsForFirstFrames&&(void 0===this._count&&(this._count=0),(!this._count||this._count<this.dbgVerboseLogsNumFrames)&&console.log("frame #"+this._count+" - unBindFramebuffer called - internalTexture.uniqueId=",null===(r=e.texture)||void 0===r?void 0:r.uniqueId)),this._mrtAttachments=[],this._cacheRenderPipeline.setMRT([]),this._cacheRenderPipeline.setMRTAttachments(this._mrtAttachments),this._currentRenderPass=this._mainRenderPassWrapper.renderPass,this._setDepthTextureFormat(this._mainRenderPassWrapper),this._setColorFormat(this._mainRenderPassWrapper)},_0x4cd9cc.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):(this._currentRenderPass=this._mainRenderPassWrapper.renderPass,this._setDepthTextureFormat(this._mainRenderPassWrapper),this._setColorFormat(this._mainRenderPassWrapper)),this._currentRenderPass&&this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},_0x4cd9cc.prototype._setColorFormat=function(e){var t,i,n=null!==(i=null===(t=e.colorAttachmentGPUTextures[0])||void 0===t?void 0:t.format)&&void 0!==i?i:null;this._cacheRenderPipeline.setColorFormat(n),this._colorFormat!==n&&(this._colorFormat=n)},_0x4cd9cc.prototype._setDepthTextureFormat=function(e){this._cacheRenderPipeline.setDepthStencilFormat(e.depthTextureFormat),this._depthTextureFormat!==e.depthTextureFormat&&(this._depthTextureFormat=e.depthTextureFormat)},_0x4cd9cc.prototype.setDitheringState=function(){},_0x4cd9cc.prototype.setRasterizerState=function(){},_0x4cd9cc.prototype.setState=function(e,t,i,n,r,o,a){var s,l;void 0===t&&(t=0),void 0===n&&(n=!1),void 0===a&&(a=0),(this._depthCullingState.cull!==e||i)&&(this._depthCullingState.cull=e);var u=null===(l=null!==(s=this.cullBackFaces)&&void 0!==s?s:r)||void 0===l||l?1:2;(this._depthCullingState.cullFace!==u||i)&&(this._depthCullingState.cullFace=u),this.setZOffset(t),this.setZOffsetUnits(a);var c=n?this._currentRenderTarget?1:2:this._currentRenderTarget?2:1;(this._depthCullingState.frontFace!==c||i)&&(this._depthCullingState.frontFace=c),this._stencilStateComposer.stencilMaterial=o},_0x4cd9cc.prototype._applyRenderPassChanges=function(e,t){var i,n=this._mustUpdateViewport(e),r=this._mustUpdateScissor(e),o=!!this._stencilStateComposer.enabled&&this._mustUpdateStencilRef(e),a=!!this._alphaState.alphaBlend&&this._mustUpdateBlendColor(e);t?(n&&t.addItem(new WebGPURenderItemViewport(this._viewportCached.x,this._viewportCached.y,this._viewportCached.z,this._viewportCached.w)),r&&t.addItem(new WebGPURenderItemScissor(this._scissorCached.x,this._scissorCached.y,this._scissorCached.z,this._scissorCached.w)),o&&t.addItem(new WebGPURenderItemStencilRef(null!==(i=this._stencilStateComposer.funcRef)&&void 0!==i?i:0)),a&&t.addItem(new WebGPURenderItemBlendColor(this._alphaState._blendConstants.slice()))):(n&&this._applyViewport(e),r&&this._applyScissor(e),o&&this._applyStencilRef(e),a&&this._applyBlendColor(e))},_0x4cd9cc.prototype._draw=function(e,t,i,n,r,o){var a,s=this._getCurrentRenderPass(),l=0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget;this.applyStates();var u=this._currentEffect._pipelineContext;if(this.bindUniformBufferBase(this._currentRenderTarget?this._ubInvertY:this._ubDontInvertY,0,_0x29840c.InternalsUBOName),u.uniformBuffer&&(u.uniformBuffer.update(),this.bindUniformBufferBase(u.uniformBuffer.getBuffer(),0,_0x29840c.LeftOvertUBOName)),this._snapshotRendering.play)this._reportDrawCall();else{var c;c=o?o.getActiveBundle():this._currentDrawContext.fastBundle,!this.compatibilityMode&&(this._currentDrawContext.isDirty(this._currentMaterialContext.updateId)||this._currentMaterialContext.isDirty||this._currentMaterialContext.forceBindGroupCreation)&&(this._currentDrawContext.fastBundle=void 0);var h=s;if(!this.compatibilityMode&&c||this._snapshotRendering.record){if(this._applyRenderPassChanges(s,l),!this._snapshotRendering.record)return this._counters.numBundleReuseNonCompatMode++,this._currentDrawContext.indirectDrawBuffer&&this._currentDrawContext.setIndirectData(n,r||1,i),l.addBundle(c),void this._reportDrawCall();h=l.getBundleEncoder(this._cacheRenderPipeline.colorFormats,this._depthTextureFormat,this.currentSampleCount),l.numDrawCalls++}var d=0;if(!this._caps.textureFloatLinearFiltering&&this._currentMaterialContext.hasFloatTextures)for(var f=1,p=0;p<u.shaderProcessingContext.textureNames.length;++p){var _=u.shaderProcessingContext.textureNames[p],m=null===(a=this._currentMaterialContext.textures[_])||void 0===a?void 0:a.texture;(null==m?void 0:m.type)===_0x333f62.TEXTURETYPE_FLOAT&&(d|=f),f<<=1}var g,x=this._cacheRenderPipeline.getRenderPipeline(t,this._currentEffect,this.currentSampleCount,d);g=o.bindGroups?o.bindGroups:this._cacheBindGroups.getBindGroups(u,this._currentDrawContext,this._currentMaterialContext,o),!this._snapshotRendering.record&&(this._applyRenderPassChanges(s,this.compatibilityMode?null:l),!this.compatibilityMode&&(this._counters.numBundleCreationNonCompatMode++,h=this._device.createRenderBundleEncoder({colorFormats:this._cacheRenderPipeline.colorFormats,depthStencilFormat:this._depthTextureFormat,sampleCount:this.currentSampleCount}))),h.setPipeline(x),this._currentIndexBuffer&&h.setIndexBuffer(this._currentIndexBuffer.underlyingResource,this._currentIndexBuffer.is32Bits?_0x5213c6.IndexFormat.Uint32:_0x5213c6.IndexFormat.Uint16,0);for(var y=this._cacheRenderPipeline.vertexBuffers,v=0;v<y.length;v++){var $=y[v],b=$.getBuffer();b&&h.setVertexBuffer(v,b.underlyingResource,$._validOffsetRange?0:$.byteOffset)}for(p=0;p<g.length;p++)h.setBindGroup(p,g[p]);var T=!this.compatibilityMode&&!this._snapshotRendering.record;T&&this._currentDrawContext.indirectDrawBuffer?(this._currentDrawContext.setIndirectData(n,r||1,i),0===e?h.drawIndexedIndirect(this._currentDrawContext.indirectDrawBuffer,0):h.drawIndirect(this._currentDrawContext.indirectDrawBuffer,0)):0===e?h.drawIndexed(n,r||1,i,0,0):h.draw(n,r||1,i,0),T&&(this._currentDrawContext.fastBundle=h.finish(),l.addBundle(this._currentDrawContext.fastBundle),o.setFastBundle(this._currentDrawContext.fastBundle)),this._reportDrawCall()}},_0x4cd9cc.prototype.drawElementsType=function(e,t,i,n,r){void 0===n&&(n=1),this._draw(0,e,t,i,n,r)},_0x4cd9cc.prototype.drawArraysType=function(e,t,i,n,r){void 0===n&&(n=1),this._currentIndexBuffer=null,this._draw(1,e,t,i,n,r)},_0x4cd9cc.prototype.dispose=function(){var e,t,i;null===(e=this._mainTexture)||void 0===e||e.destroy(),null===(t=this._mainTextureLastCopy)||void 0===t||t.destroy(),null===(i=this._depthTexture)||void 0===i||i.destroy(),_0xf48096.prototype.dispose.call(this)},_0x4cd9cc.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._canvas.width},_0x4cd9cc.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._canvas.height},_0x4cd9cc.prototype.getRenderingCanvas=function(){return this._canvas},_0x4cd9cc.prototype.getError=function(){return 0},_0x4cd9cc.prototype.bindSamplers=function(){},_0x4cd9cc.prototype._bindTextureDirectly=function(){return!1},_0x4cd9cc.prototype.areAllEffectsReady=function(){return!0},_0x4cd9cc.prototype._executeWhenRenderingStateIsCompiled=function(e,t){t()},_0x4cd9cc.prototype._isRenderingStateCompiled=function(){return!0},_0x4cd9cc.prototype._getUnpackAlignement=function(){return 1},_0x4cd9cc.prototype._unpackFlipY=function(){},_0x4cd9cc.prototype._bindUnboundFramebuffer=function(){throw"_bindUnboundFramebuffer is not implementedin WebGPU! You probably want to use restoreDefaultFramebuffer or unBindFramebuffer instead"},_0x4cd9cc.prototype._getSamplingParameters=function(){throw"_getSamplingParameters is not available in WebGPU"},_0x4cd9cc.prototype.getUniforms=function(){return[]},_0x4cd9cc.prototype.setIntArray=function(){return!1},_0x4cd9cc.prototype.setIntArray2=function(){return!1},_0x4cd9cc.prototype.setIntArray3=function(){return!1},_0x4cd9cc.prototype.setIntArray4=function(){return!1},_0x4cd9cc.prototype.setArray=function(){return!1},_0x4cd9cc.prototype.setArray2=function(){return!1},_0x4cd9cc.prototype.setArray3=function(){return!1},_0x4cd9cc.prototype.setArray4=function(){return!1},_0x4cd9cc.prototype.setMatrices=function(){return!1},_0x4cd9cc.prototype.setMatrix3x3=function(){return!1},_0x4cd9cc.prototype.setMatrix2x2=function(){return!1},_0x4cd9cc.prototype.setFloat=function(){return!1},_0x4cd9cc.prototype.setFloat2=function(){return!1},_0x4cd9cc.prototype.setFloat3=function(){return!1},_0x4cd9cc.prototype.setFloat4=function(){return!1},_0x4cd9cc._GLSLslangDefaultOptions={jsPath:"ThirdParty/glslang.js",wasmPath:"ThirdParty/glslang.wasm"},_0x4cd9cc.UseTWGSL=!0,_0x4cd9cc.COMPILED_WGSL_STORE_NAME="wgslStore",_0x4cd9cc.COMPILED_WGSL_TABLE_NAME="wgsl",function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.Texture=0]="Texture",e[e.StorageTexture=1]="StorageTexture",e[e.UniformBuffer=2]="UniformBuffer",e[e.StorageBuffer=3]="StorageBuffer",e[e.TextureWithoutSampler=4]="TextureWithoutSampler",e[e.Sampler=5]="Sampler"}(_0x2c9aaf||(_0x2c9aaf={}));const ComputeBindingType$1=_0x2c9aaf;_0x265690.prototype.createComputeEffect=function(e,t){throw new Error("createComputeEffect: This engine does not support compute shaders!")},_0x265690.prototype.createComputePipelineContext=function(){throw new Error("createComputePipelineContext: This engine does not support compute shaders!")},_0x265690.prototype.createComputeContext=function(){},_0x265690.prototype.computeDispatch=function(e,t,i,n,r,o,a){throw new Error("computeDispatch: This engine does not support compute shaders!")},_0x265690.prototype.areAllComputeEffectsReady=function(){return!0},_0x265690.prototype.releaseComputeEffects=function(){},_0x265690.prototype._prepareComputePipelineContext=function(e,t,i,n,r){},_0x265690.prototype._rebuildComputeEffects=function(){},_0x265690.prototype._executeWhenComputeStateIsCompiled=function(e,t){t()},_0x265690.prototype._releaseComputeEffect=function(e){},_0x265690.prototype._deleteComputePipelineContext=function(e){};var _0x2a6391=(_0x56d489=!0,function(e,t){var i=_0x56d489?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56d489=!1,i}),_0x37ade0=_0x2a6391(void 0,(function(){return _0x37ade0.toString().search("(((.+)+)+)+$").toString().constructor(_0x37ade0).search("(((.+)+)+)+$")})),_0x56d489;function _0x5cd8c0(e,t){this._device=e,this._cacheSampler=t,this.uniqueId=_0x5cd8c0._Counter++,this._bindGroupEntries=[],this.clear()}_0x37ade0(),_0x5cd8c0.prototype.getBindGroups=function(e,t,i){if(!i)throw new Error("WebGPUComputeContext.getBindGroups: bindingsMapping is required until browsers support reflection for wgsl shaders!");if(0===this._bindGroups.length){var n=this._bindGroupEntries.length>0;for(var r in e){var o=e[r],a=i[r],s=a.group,l=a.binding,u=o.type,c=o.object,h=o.indexInGroupEntries;switch(!(x=this._bindGroupEntries[s])&&(x=this._bindGroupEntries[s]=[]),u){case ComputeBindingType$1.Sampler:var d=c;void 0!==h&&n?x[h].resource=this._cacheSampler.getSampler(d):(o.indexInGroupEntries=x.length,x.push({binding:l,resource:this._cacheSampler.getSampler(d)}));break;case ComputeBindingType$1.Texture:case ComputeBindingType$1.TextureWithoutSampler:var f=(p=c)._texture._hardwareTexture;void 0!==h&&n?(u===ComputeBindingType$1.Texture&&(x[h++].resource=this._cacheSampler.getSampler(p._texture)),x[h].resource=f.view):(o.indexInGroupEntries=x.length,u===ComputeBindingType$1.Texture&&x.push({binding:l-1,resource:this._cacheSampler.getSampler(p._texture)}),x.push({binding:l,resource:f.view}));break;case ComputeBindingType$1.StorageTexture:var p;0==((f=(p=c)._texture._hardwareTexture).textureAdditionalUsages&_0x5213c6.TextureUsage.StorageBinding)&&_0x50f23a.Error("computeDispatch: The texture (name=".concat(p.name,", uniqueId=").concat(p.uniqueId,") is not a storage texture!"),50),void 0!==h&&n?x[h].resource=f.viewForWriting:(o.indexInGroupEntries=x.length,x.push({binding:l,resource:f.viewForWriting}));break;case ComputeBindingType$1.UniformBuffer:case ComputeBindingType$1.StorageBuffer:var _=(ComputeBindingType$1.UniformBuffer,c).getBuffer(),m=_.underlyingResource;void 0!==h&&n?(x[h].resource.buffer=m,x[h].resource.size=_.capacity):(o.indexInGroupEntries=x.length,x.push({binding:l,resource:{buffer:m,offset:0,size:_.capacity}}))}}for(var g=0;g<this._bindGroupEntries.length;++g){var x;(x=this._bindGroupEntries[g])?this._bindGroups[g]=this._device.createBindGroup({layout:t.getBindGroupLayout(g),entries:x}):this._bindGroups[g]=void 0}this._bindGroups.length=this._bindGroupEntries.length}return this._bindGroups},_0x5cd8c0.prototype.clear=function(){this._bindGroups=[]},_0x5cd8c0._Counter=0;var _0x54f67f=(_0x57a6b2=!0,function(e,t){var i=_0x57a6b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57a6b2=!1,i}),_0x346ff8=_0x54f67f(void 0,(function(){return _0x346ff8.toString().search("(((.+)+)+)+$").toString().constructor(_0x346ff8).search("(((.+)+)+)+$")})),_0x57a6b2;function _0x37d0b3(e){this._name="unnamed",this.engine=e,this.computePipeline=null}_0x346ff8(),Object.defineProperty(_0x37d0b3.prototype,"isAsync",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(_0x37d0b3.prototype,"isReady",{get:function(){return!!this.stage},enumerable:!1,configurable:!0}),_0x37d0b3.prototype._getComputeShaderCode=function(){var e;return null===(e=this.sources)||void 0===e?void 0:e.compute},_0x37d0b3.prototype.dispose=function(){};var _0x3e865f=(_0xb5471c=!0,function(e,t){var i=_0xb5471c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb5471c=!1,i}),_0x280e88=_0x3e865f(void 0,(function(){return _0x280e88.toString().search("(((.+)+)+)+$").toString().constructor(_0x280e88).search("(((.+)+)+)+$")})),_0xb5471c;_0x280e88();const ComputeBindingType={Texture:0,StorageTexture:1,UniformBuffer:2,StorageBuffer:3,TextureWithoutSampler:4,Sampler:5};_0x4cd9cc.prototype.createComputeContext=function(){return new _0x5cd8c0(this._device,this._cacheSampler)},_0x4cd9cc.prototype.createComputeEffect=function(e,t){var i=(e.computeElement||e.compute||e.computeToken||e.computeSource||e)+"@"+t.defines;if(this._compiledComputeEffects[i]){var n=this._compiledComputeEffects[i];return t.onCompiled&&n.isReady()&&t.onCompiled(n),n}var r=new _0xb0765d(e,t,this,i);return this._compiledComputeEffects[i]=r,r},_0x4cd9cc.prototype.createComputePipelineContext=function(){return new _0x37d0b3(this)},_0x4cd9cc.prototype.areAllComputeEffectsReady=function(){for(var e in this._compiledComputeEffects){if(!this._compiledComputeEffects[e].isReady())return!1}return!0},_0x4cd9cc.prototype.computeDispatch=function(e,t,i,n,r,o,a){var s=this;if(this._currentRenderTarget)this._onAfterUnbindFrameBufferObservable.addOnce((function(){s.computeDispatch(e,t,i,n,r,o,a)}));else{var l=e._pipelineContext,u=t;!l.computePipeline&&(l.computePipeline=this._device.createComputePipeline({layout:_0x5213c6.AutoLayoutMode.Auto,compute:l.stage}));var c=this._renderTargetEncoder.beginComputePass();c.setPipeline(l.computePipeline);for(var h=u.getBindGroups(i,l.computePipeline,a),d=0;d<h.length;++d){var f=h[d];f&&c.setBindGroup(d,f)}c.dispatchWorkgroups(n,r,o),c.end()}},_0x4cd9cc.prototype.releaseComputeEffects=function(){for(var e in this._compiledComputeEffects){var t=this._compiledComputeEffects[e].getPipelineContext();this._deleteComputePipelineContext(t)}this._compiledComputeEffects={}},_0x4cd9cc.prototype._prepareComputePipelineContext=function(e,t,i,n,r){var o=e;this.dbgShowShaderCode&&(console.log(n),console.log(t)),o.sources={compute:t,rawCompute:i},o.stage=this._createComputePipelineStageDescriptor(t,n,r)},_0x4cd9cc.prototype._releaseComputeEffect=function(e){this._compiledComputeEffects[e._key]&&(delete this._compiledComputeEffects[e._key],this._deleteComputePipelineContext(e.getPipelineContext()))},_0x4cd9cc.prototype._rebuildComputeEffects=function(){for(var e in this._compiledComputeEffects){var t=this._compiledComputeEffects[e];t._pipelineContext=null,t._wasPreviouslyReady=!1,t._prepareEffect()}},_0x4cd9cc.prototype._deleteComputePipelineContext=function(e){e&&e.dispose()},_0x4cd9cc.prototype._createComputePipelineStageDescriptor=function(e,t,i){return t=t?"//"+t.split("\n").join("\n//")+"\n":"",{module:this._device.createShaderModule({code:t+e}),entryPoint:i}};var _0x146d50=(_0x42b00b=!0,function(e,t){var i=_0x42b00b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42b00b=!1,i}),_0xbfb67c=_0x146d50(void 0,(function(){return _0xbfb67c.toString().search("(((.+)+)+)+$").toString().constructor(_0xbfb67c).search("(((.+)+)+)+$")})),_0x42b00b;function _0x45d8f5(e,t,i,n){void 0===n&&(n={}),this._bindings={},this._samplers={},this._contextIsDirty=!1,this.onCompiled=null,this.onError=null,this.name=e,this._engine=t,this.uniqueId=_0x528403.UniqueId,this._engine.getCaps().supportComputeShaders?n.bindingsMapping?(this._context=t.createComputeContext(),this._shaderPath=i,this._options=n||{bindingsMapping:{},defines:[]}):console.log("You must provide the binding mappings as browsers don't support reflection for wgsl shaders yet!"):console.log("This engine does not support compute shaders!")}_0xbfb67c(),Object.defineProperty(_0x45d8f5.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(_0x45d8f5.prototype,"shaderPath",{get:function(){return this._shaderPath},enumerable:!1,configurable:!0}),_0x45d8f5.prototype.getClassName=function(){return"ComputeShader"},_0x45d8f5.prototype.setTexture=function(e,t,i){void 0===i&&(i=!0);var n=this._bindings[e];this._bindings[e]={type:i?ComputeBindingType.Texture:ComputeBindingType.TextureWithoutSampler,object:t,indexInGroupEntries:null==n?void 0:n.indexInGroupEntries},this._contextIsDirty||(this._contextIsDirty=!n||n.object!==t||n.type!==this._bindings[e].type)},_0x45d8f5.prototype.setStorageTexture=function(e,t){var i=this._bindings[e];this._contextIsDirty||(this._contextIsDirty=!i||i.object!==t),this._bindings[e]={type:ComputeBindingType.StorageTexture,object:t,indexInGroupEntries:null==i?void 0:i.indexInGroupEntries}},_0x45d8f5.prototype.setUniformBuffer=function(e,t){var i=this._bindings[e];this._contextIsDirty||(this._contextIsDirty=!i||i.object!==t),this._bindings[e]={type:ComputeBindingType.UniformBuffer,object:t,indexInGroupEntries:null==i?void 0:i.indexInGroupEntries}},_0x45d8f5.prototype.setStorageBuffer=function(e,t){var i=this._bindings[e];this._contextIsDirty||(this._contextIsDirty=!i||i.object!==t),this._bindings[e]={type:ComputeBindingType.StorageBuffer,object:t,indexInGroupEntries:null==i?void 0:i.indexInGroupEntries}},_0x45d8f5.prototype.setTextureSampler=function(e,t){var i=this._bindings[e];this._contextIsDirty||(this._contextIsDirty=!i||!t.compareSampler(i.object)),this._bindings[e]={type:ComputeBindingType.Sampler,object:t,indexInGroupEntries:null==i?void 0:i.indexInGroupEntries}},_0x45d8f5.prototype.isReady=function(){var e=this._effect;for(var t in this._bindings){var i=this._bindings[t],n=i.type,r=i.object;switch(n){case ComputeBindingType.Texture:case ComputeBindingType.TextureWithoutSampler:case ComputeBindingType.StorageTexture:if(!r.isReady)return!1}}var o=[],a=this._shaderPath;if(this._options.defines)for(var s=0;s<this._options.defines.length;s++)o.push(this._options.defines[s]);var l=o.join("\n");return this._cachedDefines!==l&&(this._cachedDefines=l,e=this._engine.createComputeEffect(a,{defines:l,entryPoint:this._options.entryPoint,onCompiled:this.onCompiled,onError:this.onError}),this._effect=e),!!e.isReady()},_0x45d8f5.prototype.dispatch=function(e,t,i){var n;if(!this.isReady())return!1;for(var r in this._bindings){var o=this._bindings[r];if(!this._options.bindingsMapping[r])throw new Error("ComputeShader ('"+this.name+"'): No binding mapping has been provided for the property '"+r+"'");if(o.type===ComputeBindingType.Texture){var a=this._samplers[r],s=o.object;(!a||!s._texture||!a.compareSampler(s._texture))&&(this._samplers[r]=(new _0x13d391).setParameters(s.wrapU,s.wrapV,s.wrapR,s.anisotropicFilteringLevel,s._texture.samplingMode,null===(n=s._texture)||void 0===n?void 0:n._comparisonFunction),this._contextIsDirty=!0)}}return this._contextIsDirty&&(this._contextIsDirty=!1,this._context.clear()),this._engine.computeDispatch(this._effect,this._context,this._bindings,e,t,i,this._options.bindingsMapping),!0},_0x45d8f5.prototype.dispatchWhenReady=function(e,t,i,n){var r=this;return void 0===n&&(n=10),new Promise((function(o){var a=function(){r.dispatch(e,t,i)?o():setTimeout(a,n)};a()}))};var _0x5ca06a="\nstruct Rgba {\n R : f32,\n G : f32,\n B : f32,\n A : f32,\n};\n\n\nstruct ColorBuffer {\n colors : array<Rgba>,\n};\n\nstruct Params {\n texelSize : vec2<f32>, \n};\n\nfn nearAverage(a : Rgba, b : Rgba, c : Rgba, d : Rgba) -> Rgba\n{\n let sumR = dot(vec4<f32>(a.R, b.R, c.R, d.R), vec4<f32>(1.0));\n let sumG = dot(vec4<f32>(a.G, b.G, c.G, d.G), vec4<f32>(1.0));\n let sumB = dot(vec4<f32>(a.B, b.B, c.B, d.B), vec4<f32>(1.0));\n let sumA = dot(vec4<f32>(a.A, b.A, c.A, d.A), vec4<f32>(1.0));\n\n return Rgba(sumR/4.0, sumG/4.0, sumB/4.0, sumA/4.0);\n}\n\nfn maxDepthValue(a : Rgba, b : Rgba, c : Rgba, d : Rgba) -> Rgba\n{\n var resColor : vec4<f32> = max(max(vec4<f32>(a.R, a.G, a.B, a.A), vec4<f32>(b.R, b.G, b.B, b.A)), max(vec4<f32>(c.R, c.G, c.B, c.A), vec4<f32>(d.R, d.G, d.B, d.A)));\n return Rgba(resColor.x, resColor.y, resColor.z, resColor.w);\n}\n\n@group(0) @binding(0) var<uniform> params : Params;\n@group(0) @binding(1) var<storage, read> buffer_in : ColorBuffer;\n@group(0) @binding(2) var<storage, read_write> buffer_out : ColorBuffer;\n@group(0) @binding(3) var mipMapsTexture : texture_storage_2d<rgba8unorm, write>;\n\n// pass1 颜色求均值写入mip\n@compute @workgroup_size(8, 8, 1)\nfn main(@builtin(global_invocation_id) global_id : vec3<u32>) \n{\n if(all(global_id.xy < vec2<u32>(textureDimensions(mipMapsTexture)))){\n let width = u32(params.texelSize.x);\n let dst_offSet = global_id.x + global_id.y * width;\n let src_offSet = global_id.x*2u + global_id.y*2u * width*2u;\n\n let texel1 : Rgba = buffer_in.colors[src_offSet + 0u];\n let texel2 : Rgba = buffer_in.colors[src_offSet + 1u];\n let texel3 : Rgba = buffer_in.colors[src_offSet + 0u + width*2u];\n let texel4 : Rgba = buffer_in.colors[src_offSet + 1u + width*2u];\n\n var resColor : Rgba = Rgba(1,1,1,1);\n #if _isHizDepthTex\n resColor = maxDepthValue(texel1, texel2, texel3, texel4);\n #else\n resColor = nearAverage(texel1, texel2, texel3, texel4);\n #endif\n buffer_out.colors[dst_offSet] = resColor;\n\n textureStore(mipMapsTexture, vec2<i32>(global_id.xy), vec4<f32>(resColor.R, resColor.G, resColor.B, resColor.A));\n }\n}\n",_0x4ba444="\nstruct Rgba {\n R : f32,\n G : f32,\n B : f32,\n A : f32,\n};\n\nstruct ColorBuffer {\n colors : array<Rgba>,\n};\n\nstruct Params {\n srcDimension : u32,\n texelSize : vec2<f32>, \n};\n\n\nfn linear2Gamma(linearRGB : vec3<f32>) -> vec3<f32>\n{\n if(linearRGB.x < 0.0031308 && linearRGB.y < 0.0031308\n && linearRGB.z < 0.0031308){\n return 12.92 * linearRGB;\n }else{\n return 1.13005 * sqrt(abs(linearRGB - vec3<f32>(0.00228,0.00228,0.00228))) - 0.13448 * linearRGB \n + vec3<f32>(0.005719,0.005719,0.005719); \n }\n}\n\nfn packColor(srcColor : vec4<f32>) -> vec4<f32>\n{\n#ifdef CONVERT_TO_SRGB\n return float4(linear2Gamma(srcColor.xyz), srcColor.w);\n#else\n return srcColor;\n#endif\n}\n\n@group(0) @binding(0) var<uniform> params : Params;\n@group(0) @binding(1) var<storage, read_write> buffer_out : ColorBuffer;\n@group(0) @binding(2) var oriDepthTexture : texture_depth_2d;\n@group(0) @binding(2) var oriTexture : texture_2d<f32>;\n@group(0) @binding(3) var mip0Texture : texture_storage_2d<rgba8unorm, write>;\n\n// pass0 原始Mip纹理采样\n@compute @workgroup_size(8, 8, 1)\nfn main(@builtin(global_invocation_id) global_id : vec3<u32>) \n{\n var texelSize = params.texelSize;\n\n // 若要对非2n纹理采样使用此分情况额外处理\n var srcDimension : u32 = params.srcDimension;\n var pix : vec4<f32> = vec4<f32>(0, 0, 0, 1);\n\n #if _useDepthTexture\n let depth : f32 = textureLoad(oriDepthTexture, vec2<i32>(global_id.xy), 0);\n pix = vec4<f32>(depth, 0., 0., 1.);\n #else\n pix= packColor(textureLoad(oriTexture, vec2<i32>(global_id.xy), 0));\n #endif\n \n let offSet = global_id.x + global_id.y * u32(texelSize.x);\n let rgba : Rgba = Rgba(pix.x, pix.y, pix.z, pix.w);\n buffer_out.colors[offSet] = rgba;\n textureStore(mip0Texture, vec2<i32>(global_id.xy), pix);\n}\n",_0x4fa5cf="\n const vec2 pos[4] = vec2[4](vec2(-1.0f, 1.0f), vec2(1.0f, 1.0f), vec2(-1.0f, -1.0f), vec2(1.0f, -1.0f));\n const vec2 tex[4] = vec2[4](vec2(0.0f, 0.0f), vec2(1.0f, 0.0f), vec2(0.0f, 1.0f), vec2(1.0f, 1.0f));\n\n layout(location = 0) out vec2 vTex;\n\n void main() {\n vTex = tex[gl_VertexIndex];\n gl_Position = vec4(pos[gl_VertexIndex], 0.0, 1.0);\n }\n ",_0x217baa="\n layout(set = 0, binding = 0) uniform sampler imgSampler;\n layout(set = 0, binding = 1) uniform texture2D img;\n\n layout(location = 0) in vec2 vTex;\n layout(location = 0) out vec4 outColor;\n\n void main() {\n outColor = texture(sampler2D(img, imgSampler), vTex);\n }\n ",_0xe8e3cd="\n #extension GL_EXT_samplerless_texture_functions : enable\n\n const vec2 pos[4] = vec2[4](vec2(-1.0f, 1.0f), vec2(1.0f, 1.0f), vec2(-1.0f, -1.0f), vec2(1.0f, -1.0f));\n const vec2 tex[4] = vec2[4](vec2(0.0f, 0.0f), vec2(1.0f, 0.0f), vec2(0.0f, 1.0f), vec2(1.0f, 1.0f));\n\n layout(set = 0, binding = 0) uniform texture2D img;\n\n #ifdef INVERTY\n layout(location = 0) out flat ivec2 vTextureSize;\n #endif\n\n void main() {\n #ifdef INVERTY\n vTextureSize = textureSize(img, 0);\n #endif\n gl_Position = vec4(pos[gl_VertexIndex], 0.0, 1.0);\n }\n ",_0x20e21e="\n #extension GL_EXT_samplerless_texture_functions : enable\n\n layout(set = 0, binding = 0) uniform texture2D img;\n\n #ifdef INVERTY\n layout(location = 0) in flat ivec2 vTextureSize;\n #endif\n layout(location = 0) out vec4 outColor;\n\n void main() {\n #ifdef INVERTY\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.x, vTextureSize.y - gl_FragCoord.y), 0);\n #else\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.xy), 0);\n #endif\n #ifdef PREMULTIPLYALPHA\n color.rgb *= color.a;\n #endif\n outColor = color;\n }\n ",_0x4779d8=_0xe8e3cd,_0xaf0375="\n #extension GL_EXT_samplerless_texture_functions : enable\n\n layout(set = 0, binding = 0) uniform texture2D img;\n layout(set = 0, binding = 1) uniform Params {\n float ofstX;\n float ofstY;\n float width;\n float height;\n };\n\n #ifdef INVERTY\n layout(location = 0) in flat ivec2 vTextureSize;\n #endif\n layout(location = 0) out vec4 outColor;\n\n void main() {\n if (gl_FragCoord.x < ofstX || gl_FragCoord.x >= ofstX + width) {\n discard;\n }\n if (gl_FragCoord.y < ofstY || gl_FragCoord.y >= ofstY + height) {\n discard;\n }\n #ifdef INVERTY\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.x, ofstY + height - (gl_FragCoord.y - ofstY)), 0);\n #else\n vec4 color = texelFetch(img, ivec2(gl_FragCoord.xy), 0);\n #endif\n #ifdef PREMULTIPLYALPHA\n color.rgb *= color.a;\n #endif\n outColor = color;\n }\n ",_0x15b0cd="\n const vec2 pos[4] = vec2[4](vec2(-1.0f, 1.0f), vec2(1.0f, 1.0f), vec2(-1.0f, -1.0f), vec2(1.0f, -1.0f));\n\n void main() {\n gl_Position = vec4(pos[gl_VertexIndex], 0.0, 1.0);\n }\n ",_0x26d64c="\n layout(set = 0, binding = 0) uniform Uniforms {\n uniform vec4 color;\n };\n\n layout(location = 0) out vec4 outColor;\n\n void main() {\n outColor = color;\n }\n ",_0x216b2d="\n struct VertexOutput {\n @builtin(position) Position : vec4<f32>,\n @location(0) fragUV : vec2<f32>\n }\n \n @vertex\n fn main(\n @builtin(vertex_index) VertexIndex : u32\n ) -> VertexOutput {\n var pos = array<vec2<f32>, 4>(\n vec2(-1.0, 1.0),\n vec2( 1.0, 1.0),\n vec2(-1.0, -1.0),\n vec2( 1.0, -1.0)\n );\n var tex = array<vec2<f32>, 4>(\n vec2(0.0, 0.0),\n vec2(1.0, 0.0),\n vec2(0.0, 1.0),\n vec2(1.0, 1.0)\n );\n\n var output: VertexOutput;\n\n output.Position = vec4<f32>(pos[VertexIndex], 0.0, 1.0);\n output.fragUV = tex[VertexIndex];\n\n return output;\n }\n ",_0x10f735="\n @group(0) @binding(0) var videoTexture: texture_external;\n\n @fragment\n fn main(\n @location(0) fragUV: vec2<f32>\n ) -> @location(0) vec4<f32> {\n let uv : vec2<i32> = vec2<i32>(i32(fragUV.x), i32(fragUV.y));\n return textureLoad(videoTexture, uv);\n }\n",_0x149974="\n @group(0) @binding(0) var videoTexture: texture_external;\n\n @fragment\n fn main(\n @location(0) fragUV: vec2<f32>\n ) -> @location(0) vec4<f32> {\n let uv : vec2<i32> = vec2<i32>(i32(fragUV.x), i32(1 - fragUV.y));\n return textureLoad(videoTexture, uv);\n }\n ",_0x5cecd5,_0x320ac9,_0x3698c0;!function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));n(),e[e.MipMap=0]="MipMap",e[e.InvertYPremultiplyAlpha=1]="InvertYPremultiplyAlpha",e[e.Clear=2]="Clear",e[e.InvertYPremultiplyAlphaWithOfst=3]="InvertYPremultiplyAlphaWithOfst"}(_0x5cecd5||(_0x5cecd5={})),_0x3698c0=_0x320ac9||(_0x320ac9={}),_0x3698c0[_0x3698c0.DontInvertY=0]="DontInvertY",_0x3698c0[_0x3698c0.InvertY=1]="InvertY";var _0x29d065=[{vertex:_0x4fa5cf,fragment:_0x217baa},{vertex:_0xe8e3cd,fragment:_0x20e21e},{vertex:_0x15b0cd,fragment:_0x26d64c},{vertex:_0x4779d8,fragment:_0xaf0375}];const renderableTextureFormatToIndex={"":0,r8unorm:1,r8uint:2,r8sint:3,r16uint:4,r16sint:5,r16float:6,rg8unorm:7,rg8uint:8,rg8sint:9,r32uint:10,r32sint:11,r32float:12,rg16uint:13,rg16sint:14,rg16float:15,rgba8unorm:16,"rgba8unorm-srgb":17,rgba8uint:18,rgba8sint:19,bgra8unorm:20,"bgra8unorm-srgb":21,rgb10a2unorm:22,rg32uint:23,rg32sint:24,rg32float:25,rgba16uint:26,rgba16sint:27,rgba16float:28,rgba32uint:29,rgba32sint:30,rgba32float:31,stencil8:32,depth16unorm:33,depth24plus:34,"depth24plus-stencil8":35,depth32float:36,"depth24unorm-stencil8":37,"depth32float-stencil8":38};function WebGPUTextureHelper(e,t,i,n,r){this._pipelines={},this._compiledShaders=[],this._deferredReleaseTextures=[],this._videoPipelines={},this._videoCompiledShaders=[],this._userEngine=r,this._device=e,this._glslang=t,this._tintWASM=i,this._bufferManager=n,this._mipmapSampler=e.createSampler({minFilter:_0x5213c6.FilterMode.Linear}),this._videoSampler=e.createSampler({minFilter:_0x5213c6.FilterMode.Linear}),this._ubCopyWithOfst=this._bufferManager.createBuffer(16,_0x5213c6.BufferUsage.Uniform|_0x5213c6.BufferUsage.CopyDst).underlyingResource,this._getPipeline(_0x5213c6.TextureFormat.RGBA8Unorm)}WebGPUTextureHelper.ComputeNumMipmapLevels=function(e,t){return _0x3ea109.ILog2(Math.max(e,t))+1},WebGPUTextureHelper.prototype._getPipeline=function(e,t,i){void 0===t&&(t=_0x5cecd5.MipMap);var n=t===_0x5cecd5.MipMap?1:t===_0x5cecd5.InvertYPremultiplyAlpha?((i.invertY?1:0)<<1)+((i.premultiplyAlpha?1:0)<<2):t===_0x5cecd5.Clear?8:t===_0x5cecd5.InvertYPremultiplyAlphaWithOfst?((i.invertY?1:0)<<4)+((i.premultiplyAlpha?1:0)<<5):0;!this._pipelines[e]&&(this._pipelines[e]=[]);var r=this._pipelines[e][n];if(!r){var o="#version 450\r\n";(t===_0x5cecd5.InvertYPremultiplyAlpha||t===_0x5cecd5.InvertYPremultiplyAlphaWithOfst)&&(i.invertY&&(o+="#define INVERTY\r\n"),i.premultiplyAlpha&&(o+="#define PREMULTIPLYALPHA\r\n"));var a=this._compiledShaders[n];if(!a){var s=this._glslang.compileGLSL(o+_0x29d065[t].vertex,"vertex"),l=this._glslang.compileGLSL(o+_0x29d065[t].fragment,"fragment");this._tintWASM&&(s=this._tintWASM.convertSpirV2WGSL(s),l=this._tintWASM.convertSpirV2WGSL(l));var u=this._device.createShaderModule({code:s}),c=this._device.createShaderModule({code:l});a=this._compiledShaders[n]=[u,c]}var h=this._device.createRenderPipeline({layout:_0x5213c6.AutoLayoutMode.Auto,vertex:{module:a[0],entryPoint:"main"},fragment:{module:a[1],entryPoint:"main",targets:[{format:e}]},primitive:{topology:_0x5213c6.PrimitiveTopology.TriangleStrip,stripIndexFormat:_0x5213c6.IndexFormat.Uint16}});r=this._pipelines[e][n]=[h,h.getBindGroupLayout(0)]}return r},WebGPUTextureHelper.prototype._getVideoPipeline=function(e,t){void 0===t&&(t=_0x320ac9.DontInvertY);var i=t===_0x320ac9.InvertY?1:0;!this._videoPipelines[e]&&(this._videoPipelines[e]=[]);var n=this._videoPipelines[e][i];if(!n){var r=this._videoCompiledShaders[i];if(!r){var o=this._device.createShaderModule({code:_0x216b2d}),a=this._device.createShaderModule({code:0===i?_0x10f735:_0x149974});r=this._videoCompiledShaders[i]=[o,a]}var s=this._device.createRenderPipeline({label:"CopyVideoToTexture_".concat(e,"_").concat(0===i?"DontInvertY":"InvertY"),layout:_0x5213c6.AutoLayoutMode.Auto,vertex:{module:r[0],entryPoint:"main"},fragment:{module:r[1],entryPoint:"main",targets:[{format:e}]},primitive:{topology:_0x5213c6.PrimitiveTopology.TriangleStrip,stripIndexFormat:_0x5213c6.IndexFormat.Uint16}});n=this._videoPipelines[e][i]=[s,s.getBindGroupLayout(0)]}return n},WebGPUTextureHelper._GetTextureTypeFromFormat=function(e){switch(e){case _0x5213c6.TextureFormat.R8Unorm:case _0x5213c6.TextureFormat.R8Snorm:case _0x5213c6.TextureFormat.R8Uint:case _0x5213c6.TextureFormat.R8Sint:case _0x5213c6.TextureFormat.RG8Unorm:case _0x5213c6.TextureFormat.RG8Snorm:case _0x5213c6.TextureFormat.RG8Uint:case _0x5213c6.TextureFormat.RG8Sint:case _0x5213c6.TextureFormat.RGBA8Unorm:case _0x5213c6.TextureFormat.RGBA8UnormSRGB:case _0x5213c6.TextureFormat.RGBA8Snorm:case _0x5213c6.TextureFormat.RGBA8Uint:case _0x5213c6.TextureFormat.RGBA8Sint:case _0x5213c6.TextureFormat.BGRA8Unorm:case _0x5213c6.TextureFormat.BGRA8UnormSRGB:case _0x5213c6.TextureFormat.RGB10A2Unorm:case _0x5213c6.TextureFormat.RGB9E5UFloat:case _0x5213c6.TextureFormat.RG11B10UFloat:case _0x5213c6.TextureFormat.Depth24UnormStencil8:case _0x5213c6.TextureFormat.Depth32FloatStencil8:case _0x5213c6.TextureFormat.BC7RGBAUnorm:case _0x5213c6.TextureFormat.BC7RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC6HRGBUFloat:case _0x5213c6.TextureFormat.BC6HRGBFloat:case _0x5213c6.TextureFormat.BC5RGUnorm:case _0x5213c6.TextureFormat.BC5RGSnorm:case _0x5213c6.TextureFormat.BC3RGBAUnorm:case _0x5213c6.TextureFormat.BC3RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC2RGBAUnorm:case _0x5213c6.TextureFormat.BC2RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC4RUnorm:case _0x5213c6.TextureFormat.BC4RSnorm:case _0x5213c6.TextureFormat.BC1RGBAUnorm:case _0x5213c6.TextureFormat.BC1RGBAUnormSRGB:case _0x5213c6.TextureFormat.ETC2RGB8Unorm:case _0x5213c6.TextureFormat.ETC2RGB8UnormSRGB:case _0x5213c6.TextureFormat.ETC2RGB8A1Unorm:case _0x5213c6.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x5213c6.TextureFormat.ETC2RGBA8Unorm:case _0x5213c6.TextureFormat.ETC2RGBA8UnormSRGB:case _0x5213c6.TextureFormat.EACR11Unorm:case _0x5213c6.TextureFormat.EACR11Snorm:case _0x5213c6.TextureFormat.EACRG11Unorm:case _0x5213c6.TextureFormat.EACRG11Snorm:case _0x5213c6.TextureFormat.ASTC4x4Unorm:case _0x5213c6.TextureFormat.ASTC4x4UnormSRGB:case _0x5213c6.TextureFormat.ASTC5x4Unorm:case _0x5213c6.TextureFormat.ASTC5x4UnormSRGB:case _0x5213c6.TextureFormat.ASTC5x5Unorm:case _0x5213c6.TextureFormat.ASTC5x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC6x5Unorm:case _0x5213c6.TextureFormat.ASTC6x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC6x6Unorm:case _0x5213c6.TextureFormat.ASTC6x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x5Unorm:case _0x5213c6.TextureFormat.ASTC8x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x6Unorm:case _0x5213c6.TextureFormat.ASTC8x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x8Unorm:case _0x5213c6.TextureFormat.ASTC8x8UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x5Unorm:case _0x5213c6.TextureFormat.ASTC10x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x6Unorm:case _0x5213c6.TextureFormat.ASTC10x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x8Unorm:case _0x5213c6.TextureFormat.ASTC10x8UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x10Unorm:case _0x5213c6.TextureFormat.ASTC10x10UnormSRGB:case _0x5213c6.TextureFormat.ASTC12x10Unorm:case _0x5213c6.TextureFormat.ASTC12x10UnormSRGB:case _0x5213c6.TextureFormat.ASTC12x12Unorm:case _0x5213c6.TextureFormat.ASTC12x12UnormSRGB:return _0x333f62.TEXTURETYPE_UNSIGNED_BYTE;case _0x5213c6.TextureFormat.R16Uint:case _0x5213c6.TextureFormat.R16Sint:case _0x5213c6.TextureFormat.RG16Uint:case _0x5213c6.TextureFormat.RG16Sint:case _0x5213c6.TextureFormat.RGBA16Uint:case _0x5213c6.TextureFormat.RGBA16Sint:case _0x5213c6.TextureFormat.Depth16Unorm:return _0x333f62.TEXTURETYPE_UNSIGNED_SHORT;case _0x5213c6.TextureFormat.R16Float:case _0x5213c6.TextureFormat.RG16Float:case _0x5213c6.TextureFormat.RGBA16Float:return _0x333f62.TEXTURETYPE_HALF_FLOAT;case _0x5213c6.TextureFormat.R32Uint:case _0x5213c6.TextureFormat.R32Sint:case _0x5213c6.TextureFormat.RG32Uint:case _0x5213c6.TextureFormat.RG32Sint:case _0x5213c6.TextureFormat.RGBA32Uint:case _0x5213c6.TextureFormat.RGBA32Sint:return _0x333f62.TEXTURETYPE_UNSIGNED_INTEGER;case _0x5213c6.TextureFormat.R32Float:case _0x5213c6.TextureFormat.RG32Float:case _0x5213c6.TextureFormat.RGBA32Float:case _0x5213c6.TextureFormat.Depth32Float:return _0x333f62.TEXTURETYPE_FLOAT;case _0x5213c6.TextureFormat.Stencil8:throw"No fixed size for Stencil8 format!";case _0x5213c6.TextureFormat.Depth24Plus:throw"No fixed size for Depth24Plus format!";case _0x5213c6.TextureFormat.Depth24PlusStencil8:throw"No fixed size for Depth24PlusStencil8 format!"}return _0x333f62.TEXTURETYPE_UNSIGNED_BYTE},WebGPUTextureHelper._GetBlockInformationFromFormat=function(e){switch(e){case _0x5213c6.TextureFormat.R8Unorm:case _0x5213c6.TextureFormat.R8Snorm:case _0x5213c6.TextureFormat.R8Uint:case _0x5213c6.TextureFormat.R8Sint:return{width:1,height:1,length:1};case _0x5213c6.TextureFormat.R16Uint:case _0x5213c6.TextureFormat.R16Sint:case _0x5213c6.TextureFormat.R16Float:case _0x5213c6.TextureFormat.RG8Unorm:case _0x5213c6.TextureFormat.RG8Snorm:case _0x5213c6.TextureFormat.RG8Uint:case _0x5213c6.TextureFormat.RG8Sint:return{width:1,height:1,length:2};case _0x5213c6.TextureFormat.R32Uint:case _0x5213c6.TextureFormat.R32Sint:case _0x5213c6.TextureFormat.R32Float:case _0x5213c6.TextureFormat.RG16Uint:case _0x5213c6.TextureFormat.RG16Sint:case _0x5213c6.TextureFormat.RG16Float:case _0x5213c6.TextureFormat.RGBA8Unorm:case _0x5213c6.TextureFormat.RGBA8UnormSRGB:case _0x5213c6.TextureFormat.RGBA8Snorm:case _0x5213c6.TextureFormat.RGBA8Uint:case _0x5213c6.TextureFormat.RGBA8Sint:case _0x5213c6.TextureFormat.BGRA8Unorm:case _0x5213c6.TextureFormat.BGRA8UnormSRGB:case _0x5213c6.TextureFormat.RGB9E5UFloat:case _0x5213c6.TextureFormat.RGB10A2Unorm:case _0x5213c6.TextureFormat.RG11B10UFloat:return{width:1,height:1,length:4};case _0x5213c6.TextureFormat.RG32Uint:case _0x5213c6.TextureFormat.RG32Sint:case _0x5213c6.TextureFormat.RG32Float:case _0x5213c6.TextureFormat.RGBA16Uint:case _0x5213c6.TextureFormat.RGBA16Sint:case _0x5213c6.TextureFormat.RGBA16Float:return{width:1,height:1,length:8};case _0x5213c6.TextureFormat.RGBA32Uint:case _0x5213c6.TextureFormat.RGBA32Sint:case _0x5213c6.TextureFormat.RGBA32Float:return{width:1,height:1,length:16};case _0x5213c6.TextureFormat.Stencil8:throw"No fixed size for Stencil8 format!";case _0x5213c6.TextureFormat.Depth16Unorm:return{width:1,height:1,length:2};case _0x5213c6.TextureFormat.Depth24Plus:throw"No fixed size for Depth24Plus format!";case _0x5213c6.TextureFormat.Depth24PlusStencil8:throw"No fixed size for Depth24PlusStencil8 format!";case _0x5213c6.TextureFormat.Depth32Float:case _0x5213c6.TextureFormat.Depth24UnormStencil8:return{width:1,height:1,length:4};case _0x5213c6.TextureFormat.Depth32FloatStencil8:return{width:1,height:1,length:5};case _0x5213c6.TextureFormat.BC7RGBAUnorm:case _0x5213c6.TextureFormat.BC7RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC6HRGBUFloat:case _0x5213c6.TextureFormat.BC6HRGBFloat:case _0x5213c6.TextureFormat.BC5RGUnorm:case _0x5213c6.TextureFormat.BC5RGSnorm:case _0x5213c6.TextureFormat.BC3RGBAUnorm:case _0x5213c6.TextureFormat.BC3RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC2RGBAUnorm:case _0x5213c6.TextureFormat.BC2RGBAUnormSRGB:return{width:4,height:4,length:16};case _0x5213c6.TextureFormat.BC4RUnorm:case _0x5213c6.TextureFormat.BC4RSnorm:case _0x5213c6.TextureFormat.BC1RGBAUnorm:case _0x5213c6.TextureFormat.BC1RGBAUnormSRGB:case _0x5213c6.TextureFormat.ETC2RGB8Unorm:case _0x5213c6.TextureFormat.ETC2RGB8UnormSRGB:case _0x5213c6.TextureFormat.ETC2RGB8A1Unorm:case _0x5213c6.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x5213c6.TextureFormat.EACR11Unorm:case _0x5213c6.TextureFormat.EACR11Snorm:return{width:4,height:4,length:8};case _0x5213c6.TextureFormat.ETC2RGBA8Unorm:case _0x5213c6.TextureFormat.ETC2RGBA8UnormSRGB:case _0x5213c6.TextureFormat.EACRG11Unorm:case _0x5213c6.TextureFormat.EACRG11Snorm:case _0x5213c6.TextureFormat.ASTC4x4Unorm:case _0x5213c6.TextureFormat.ASTC4x4UnormSRGB:return{width:4,height:4,length:16};case _0x5213c6.TextureFormat.ASTC5x4Unorm:case _0x5213c6.TextureFormat.ASTC5x4UnormSRGB:return{width:5,height:4,length:16};case _0x5213c6.TextureFormat.ASTC5x5Unorm:case _0x5213c6.TextureFormat.ASTC5x5UnormSRGB:return{width:5,height:5,length:16};case _0x5213c6.TextureFormat.ASTC6x5Unorm:case _0x5213c6.TextureFormat.ASTC6x5UnormSRGB:return{width:6,height:5,length:16};case _0x5213c6.TextureFormat.ASTC6x6Unorm:case _0x5213c6.TextureFormat.ASTC6x6UnormSRGB:return{width:6,height:6,length:16};case _0x5213c6.TextureFormat.ASTC8x5Unorm:case _0x5213c6.TextureFormat.ASTC8x5UnormSRGB:return{width:8,height:5,length:16};case _0x5213c6.TextureFormat.ASTC8x6Unorm:case _0x5213c6.TextureFormat.ASTC8x6UnormSRGB:return{width:8,height:6,length:16};case _0x5213c6.TextureFormat.ASTC8x8Unorm:case _0x5213c6.TextureFormat.ASTC8x8UnormSRGB:return{width:8,height:8,length:16};case _0x5213c6.TextureFormat.ASTC10x5Unorm:case _0x5213c6.TextureFormat.ASTC10x5UnormSRGB:return{width:10,height:5,length:16};case _0x5213c6.TextureFormat.ASTC10x6Unorm:case _0x5213c6.TextureFormat.ASTC10x6UnormSRGB:return{width:10,height:6,length:16};case _0x5213c6.TextureFormat.ASTC10x8Unorm:case _0x5213c6.TextureFormat.ASTC10x8UnormSRGB:return{width:10,height:8,length:16};case _0x5213c6.TextureFormat.ASTC10x10Unorm:case _0x5213c6.TextureFormat.ASTC10x10UnormSRGB:return{width:10,height:10,length:16};case _0x5213c6.TextureFormat.ASTC12x10Unorm:case _0x5213c6.TextureFormat.ASTC12x10UnormSRGB:return{width:12,height:10,length:16};case _0x5213c6.TextureFormat.ASTC12x12Unorm:case _0x5213c6.TextureFormat.ASTC12x12UnormSRGB:return{width:12,height:12,length:16}}return{width:1,height:1,length:4}},WebGPUTextureHelper._IsHardwareTexture=function(e){return!!e.release},WebGPUTextureHelper._IsInternalTexture=function(e){return!!e.dispose},WebGPUTextureHelper.IsImageBitmap=function(e){return void 0!==e.close},WebGPUTextureHelper.IsImageBitmapArray=function(e){return Array.isArray(e)&&void 0!==e[0].close},WebGPUTextureHelper.prototype.setCommandEncoder=function(e){this._commandEncoderForCreation=e},WebGPUTextureHelper.IsCompressedFormat=function(e){switch(e){case _0x5213c6.TextureFormat.BC7RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC7RGBAUnorm:case _0x5213c6.TextureFormat.BC6HRGBFloat:case _0x5213c6.TextureFormat.BC6HRGBUFloat:case _0x5213c6.TextureFormat.BC5RGSnorm:case _0x5213c6.TextureFormat.BC5RGUnorm:case _0x5213c6.TextureFormat.BC4RSnorm:case _0x5213c6.TextureFormat.BC4RUnorm:case _0x5213c6.TextureFormat.BC3RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC3RGBAUnorm:case _0x5213c6.TextureFormat.BC2RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC2RGBAUnorm:case _0x5213c6.TextureFormat.BC1RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC1RGBAUnorm:case _0x5213c6.TextureFormat.ETC2RGB8Unorm:case _0x5213c6.TextureFormat.ETC2RGB8UnormSRGB:case _0x5213c6.TextureFormat.ETC2RGB8A1Unorm:case _0x5213c6.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x5213c6.TextureFormat.ETC2RGBA8Unorm:case _0x5213c6.TextureFormat.ETC2RGBA8UnormSRGB:case _0x5213c6.TextureFormat.EACR11Unorm:case _0x5213c6.TextureFormat.EACR11Snorm:case _0x5213c6.TextureFormat.EACRG11Unorm:case _0x5213c6.TextureFormat.EACRG11Snorm:case _0x5213c6.TextureFormat.ASTC4x4Unorm:case _0x5213c6.TextureFormat.ASTC4x4UnormSRGB:case _0x5213c6.TextureFormat.ASTC5x4Unorm:case _0x5213c6.TextureFormat.ASTC5x4UnormSRGB:case _0x5213c6.TextureFormat.ASTC5x5Unorm:case _0x5213c6.TextureFormat.ASTC5x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC6x5Unorm:case _0x5213c6.TextureFormat.ASTC6x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC6x6Unorm:case _0x5213c6.TextureFormat.ASTC6x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x5Unorm:case _0x5213c6.TextureFormat.ASTC8x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x6Unorm:case _0x5213c6.TextureFormat.ASTC8x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x8Unorm:case _0x5213c6.TextureFormat.ASTC8x8UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x5Unorm:case _0x5213c6.TextureFormat.ASTC10x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x6Unorm:case _0x5213c6.TextureFormat.ASTC10x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x8Unorm:case _0x5213c6.TextureFormat.ASTC10x8UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x10Unorm:case _0x5213c6.TextureFormat.ASTC10x10UnormSRGB:case _0x5213c6.TextureFormat.ASTC12x10Unorm:case _0x5213c6.TextureFormat.ASTC12x10UnormSRGB:case _0x5213c6.TextureFormat.ASTC12x12Unorm:case _0x5213c6.TextureFormat.ASTC12x12UnormSRGB:return!0}return!1},WebGPUTextureHelper.GetWebGPUTextureFormat=function(e,t,i){switch(void 0===i&&(i=!1),t){case _0x333f62.TEXTUREFORMAT_DEPTH16:return _0x5213c6.TextureFormat.Depth16Unorm;case _0x333f62.TEXTUREFORMAT_DEPTH24:return _0x5213c6.TextureFormat.Depth24Plus;case _0x333f62.TEXTUREFORMAT_DEPTH24_STENCIL8:return _0x5213c6.TextureFormat.Depth24PlusStencil8;case _0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT:return _0x5213c6.TextureFormat.Depth32Float;case _0x333f62.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8:return _0x5213c6.TextureFormat.Depth24UnormStencil8;case _0x333f62.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8:return _0x5213c6.TextureFormat.Depth32FloatStencil8;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM:return i?_0x5213c6.TextureFormat.BC7RGBAUnormSRGB:_0x5213c6.TextureFormat.BC7RGBAUnorm;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT:return _0x5213c6.TextureFormat.BC6HRGBUFloat;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT:return _0x5213c6.TextureFormat.BC6HRGBFloat;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5:return i?_0x5213c6.TextureFormat.BC3RGBAUnormSRGB:_0x5213c6.TextureFormat.BC3RGBAUnorm;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3:return i?_0x5213c6.TextureFormat.BC2RGBAUnormSRGB:_0x5213c6.TextureFormat.BC2RGBAUnorm;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1:case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1:return i?_0x5213c6.TextureFormat.BC1RGBAUnormSRGB:_0x5213c6.TextureFormat.BC1RGBAUnorm;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4:return i?_0x5213c6.TextureFormat.ASTC4x4UnormSRGB:_0x5213c6.TextureFormat.ASTC4x4Unorm;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL:case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2:return i?_0x5213c6.TextureFormat.ETC2RGB8UnormSRGB:_0x5213c6.TextureFormat.ETC2RGB8Unorm;case _0x333f62.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC:return i?_0x5213c6.TextureFormat.ETC2RGBA8UnormSRGB:_0x5213c6.TextureFormat.ETC2RGBA8Unorm}switch(e){case _0x333f62.TEXTURETYPE_BYTE:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return _0x5213c6.TextureFormat.R8Snorm;case _0x333f62.TEXTUREFORMAT_RG:return _0x5213c6.TextureFormat.RG8Snorm;case _0x333f62.TEXTUREFORMAT_RGB:throw"RGB format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return _0x5213c6.TextureFormat.R8Sint;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return _0x5213c6.TextureFormat.RG8Sint;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:throw"RGB_INTEGER format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:return _0x5213c6.TextureFormat.RGBA8Sint;default:return _0x5213c6.TextureFormat.RGBA8Snorm}case _0x333f62.TEXTURETYPE_UNSIGNED_BYTE:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return _0x5213c6.TextureFormat.R8Unorm;case _0x333f62.TEXTUREFORMAT_RG:return _0x5213c6.TextureFormat.RG8Unorm;case _0x333f62.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA:return i?_0x5213c6.TextureFormat.RGBA8UnormSRGB:_0x5213c6.TextureFormat.RGBA8Unorm;case _0x333f62.TEXTUREFORMAT_BGRA:return i?_0x5213c6.TextureFormat.BGRA8UnormSRGB:_0x5213c6.TextureFormat.BGRA8Unorm;case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return _0x5213c6.TextureFormat.R8Uint;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return _0x5213c6.TextureFormat.RG8Uint;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:throw"RGB_INTEGER format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:return _0x5213c6.TextureFormat.RGBA8Uint;case _0x333f62.TEXTUREFORMAT_ALPHA:throw"TEXTUREFORMAT_ALPHA format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_LUMINANCE:throw"TEXTUREFORMAT_LUMINANCE format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_LUMINANCE_ALPHA:throw"TEXTUREFORMAT_LUMINANCE_ALPHA format not supported in WebGPU";default:return _0x5213c6.TextureFormat.RGBA8Unorm}case _0x333f62.TEXTURETYPE_SHORT:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return _0x5213c6.TextureFormat.R16Sint;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return _0x5213c6.TextureFormat.RG16Sint;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x5213c6.TextureFormat.RGBA16Sint}case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return _0x5213c6.TextureFormat.R16Uint;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return _0x5213c6.TextureFormat.RG16Uint;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x5213c6.TextureFormat.RGBA16Uint}case _0x333f62.TEXTURETYPE_INT:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return _0x5213c6.TextureFormat.R32Sint;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return _0x5213c6.TextureFormat.RG32Sint;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x5213c6.TextureFormat.RGBA32Sint}case _0x333f62.TEXTURETYPE_UNSIGNED_INTEGER:switch(t){case _0x333f62.TEXTUREFORMAT_RED_INTEGER:return _0x5213c6.TextureFormat.R32Uint;case _0x333f62.TEXTUREFORMAT_RG_INTEGER:return _0x5213c6.TextureFormat.RG32Uint;case _0x333f62.TEXTUREFORMAT_RGB_INTEGER:throw"TEXTUREFORMAT_RGB_INTEGER format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:default:return _0x5213c6.TextureFormat.RGBA32Uint}case _0x333f62.TEXTURETYPE_FLOAT:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return _0x5213c6.TextureFormat.R32Float;case _0x333f62.TEXTUREFORMAT_RG:return _0x5213c6.TextureFormat.RG32Float;case _0x333f62.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA:default:return _0x5213c6.TextureFormat.RGBA32Float}case _0x333f62.TEXTURETYPE_HALF_FLOAT:switch(t){case _0x333f62.TEXTUREFORMAT_RED:return _0x5213c6.TextureFormat.R16Float;case _0x333f62.TEXTUREFORMAT_RG:return _0x5213c6.TextureFormat.RG16Float;case _0x333f62.TEXTUREFORMAT_RGB:throw"TEXTUREFORMAT_RGB format not supported in WebGPU";case _0x333f62.TEXTUREFORMAT_RGBA:default:return _0x5213c6.TextureFormat.RGBA16Float}case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:throw"TEXTURETYPE_UNSIGNED_SHORT_5_6_5 format not supported in WebGPU";case _0x333f62.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:throw"TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV format not supported in WebGPU";case _0x333f62.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:throw"TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV format not supported in WebGPU";case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:throw"TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 format not supported in WebGPU";case _0x333f62.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:throw"TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 format not supported in WebGPU";case _0x333f62.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(t){case _0x333f62.TEXTUREFORMAT_RGBA:return _0x5213c6.TextureFormat.RGB10A2Unorm;case _0x333f62.TEXTUREFORMAT_RGBA_INTEGER:throw"TEXTUREFORMAT_RGBA_INTEGER format not supported in WebGPU when type is TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV";default:return _0x5213c6.TextureFormat.RGB10A2Unorm}}return i?_0x5213c6.TextureFormat.RGBA8UnormSRGB:_0x5213c6.TextureFormat.RGBA8Unorm},WebGPUTextureHelper.GetNumChannelsFromWebGPUTextureFormat=function(e){switch(e){case _0x5213c6.TextureFormat.R8Unorm:case _0x5213c6.TextureFormat.R8Snorm:case _0x5213c6.TextureFormat.R8Uint:case _0x5213c6.TextureFormat.R8Sint:case _0x5213c6.TextureFormat.BC4RUnorm:case _0x5213c6.TextureFormat.BC4RSnorm:case _0x5213c6.TextureFormat.R16Uint:case _0x5213c6.TextureFormat.R16Sint:case _0x5213c6.TextureFormat.Depth16Unorm:case _0x5213c6.TextureFormat.R16Float:case _0x5213c6.TextureFormat.R32Uint:case _0x5213c6.TextureFormat.R32Sint:case _0x5213c6.TextureFormat.R32Float:case _0x5213c6.TextureFormat.Depth32Float:case _0x5213c6.TextureFormat.Stencil8:case _0x5213c6.TextureFormat.Depth24Plus:case _0x5213c6.TextureFormat.EACR11Unorm:case _0x5213c6.TextureFormat.EACR11Snorm:return 1;case _0x5213c6.TextureFormat.RG8Unorm:case _0x5213c6.TextureFormat.RG8Snorm:case _0x5213c6.TextureFormat.RG8Uint:case _0x5213c6.TextureFormat.RG8Sint:case _0x5213c6.TextureFormat.Depth24UnormStencil8:case _0x5213c6.TextureFormat.Depth32FloatStencil8:case _0x5213c6.TextureFormat.BC5RGUnorm:case _0x5213c6.TextureFormat.BC5RGSnorm:case _0x5213c6.TextureFormat.RG16Uint:case _0x5213c6.TextureFormat.RG16Sint:case _0x5213c6.TextureFormat.RG16Float:case _0x5213c6.TextureFormat.RG32Uint:case _0x5213c6.TextureFormat.RG32Sint:case _0x5213c6.TextureFormat.RG32Float:case _0x5213c6.TextureFormat.Depth24PlusStencil8:case _0x5213c6.TextureFormat.EACRG11Unorm:case _0x5213c6.TextureFormat.EACRG11Snorm:return 2;case _0x5213c6.TextureFormat.RGB9E5UFloat:case _0x5213c6.TextureFormat.RG11B10UFloat:case _0x5213c6.TextureFormat.BC6HRGBUFloat:case _0x5213c6.TextureFormat.BC6HRGBFloat:case _0x5213c6.TextureFormat.ETC2RGB8Unorm:case _0x5213c6.TextureFormat.ETC2RGB8UnormSRGB:return 3;case _0x5213c6.TextureFormat.RGBA8Unorm:case _0x5213c6.TextureFormat.RGBA8UnormSRGB:case _0x5213c6.TextureFormat.RGBA8Snorm:case _0x5213c6.TextureFormat.RGBA8Uint:case _0x5213c6.TextureFormat.RGBA8Sint:case _0x5213c6.TextureFormat.BGRA8Unorm:case _0x5213c6.TextureFormat.BGRA8UnormSRGB:case _0x5213c6.TextureFormat.RGB10A2Unorm:case _0x5213c6.TextureFormat.BC7RGBAUnorm:case _0x5213c6.TextureFormat.BC7RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC3RGBAUnorm:case _0x5213c6.TextureFormat.BC3RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC2RGBAUnorm:case _0x5213c6.TextureFormat.BC2RGBAUnormSRGB:case _0x5213c6.TextureFormat.BC1RGBAUnorm:case _0x5213c6.TextureFormat.BC1RGBAUnormSRGB:case _0x5213c6.TextureFormat.RGBA16Uint:case _0x5213c6.TextureFormat.RGBA16Sint:case _0x5213c6.TextureFormat.RGBA16Float:case _0x5213c6.TextureFormat.RGBA32Uint:case _0x5213c6.TextureFormat.RGBA32Sint:case _0x5213c6.TextureFormat.RGBA32Float:case _0x5213c6.TextureFormat.ETC2RGB8A1Unorm:case _0x5213c6.TextureFormat.ETC2RGB8A1UnormSRGB:case _0x5213c6.TextureFormat.ETC2RGBA8Unorm:case _0x5213c6.TextureFormat.ETC2RGBA8UnormSRGB:case _0x5213c6.TextureFormat.ASTC4x4Unorm:case _0x5213c6.TextureFormat.ASTC4x4UnormSRGB:case _0x5213c6.TextureFormat.ASTC5x4Unorm:case _0x5213c6.TextureFormat.ASTC5x4UnormSRGB:case _0x5213c6.TextureFormat.ASTC5x5Unorm:case _0x5213c6.TextureFormat.ASTC5x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC6x5Unorm:case _0x5213c6.TextureFormat.ASTC6x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC6x6Unorm:case _0x5213c6.TextureFormat.ASTC6x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x5Unorm:case _0x5213c6.TextureFormat.ASTC8x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x6Unorm:case _0x5213c6.TextureFormat.ASTC8x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC8x8Unorm:case _0x5213c6.TextureFormat.ASTC8x8UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x5Unorm:case _0x5213c6.TextureFormat.ASTC10x5UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x6Unorm:case _0x5213c6.TextureFormat.ASTC10x6UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x8Unorm:case _0x5213c6.TextureFormat.ASTC10x8UnormSRGB:case _0x5213c6.TextureFormat.ASTC10x10Unorm:case _0x5213c6.TextureFormat.ASTC10x10UnormSRGB:case _0x5213c6.TextureFormat.ASTC12x10Unorm:case _0x5213c6.TextureFormat.ASTC12x10UnormSRGB:case _0x5213c6.TextureFormat.ASTC12x12Unorm:case _0x5213c6.TextureFormat.ASTC12x12UnormSRGB:return 4}throw"Unknown format ".concat(e,"!")},WebGPUTextureHelper.HasStencilAspect=function(e){switch(e){case _0x5213c6.TextureFormat.Stencil8:case _0x5213c6.TextureFormat.Depth24UnormStencil8:case _0x5213c6.TextureFormat.Depth32FloatStencil8:case _0x5213c6.TextureFormat.Depth24PlusStencil8:return!0}return!1},WebGPUTextureHelper.HasDepthAndStencilAspects=function(e){switch(e){case _0x5213c6.TextureFormat.Depth24UnormStencil8:case _0x5213c6.TextureFormat.Depth32FloatStencil8:case _0x5213c6.TextureFormat.Depth24PlusStencil8:return!0}return!1},WebGPUTextureHelper.prototype.copyVideoToTexture=function(e,t,i,n,r){var o,a,s,l;void 0===n&&(n=!1);var u=void 0===r,c=this._getVideoPipeline(i,n?_0x320ac9.InvertY:_0x320ac9.DontInvertY),h=c[0],d=c[1];u&&(r=this._device.createCommandEncoder({})),null===(a=(o=r).pushDebugGroup)||void 0===a||a.call(o,"copy video to texture - invertY=".concat(n));var f={colorAttachments:[{view:t._hardwareTexture.underlyingResource.createView({format:i,dimension:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:1,aspect:_0x5213c6.TextureAspect.All}),loadOp:_0x5213c6.LoadOp.Load,storeOp:_0x5213c6.StoreOp.Store}]},p=r.beginRenderPass(f),_={layout:d,entries:[{binding:0,resource:this._device.importExternalTexture({source:e.underlyingResource})}]},m=this._device.createBindGroup(_);p.setPipeline(h),p.setBindGroup(0,m),p.draw(4,1,0,0),p.end(),null===(l=(s=r).popDebugGroup)||void 0===l||l.call(s),u&&(this._device.queue.submit([r.finish()]),r=null)},WebGPUTextureHelper.prototype.invertYPreMultiplyAlpha=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){var _,m,g,x,y,v;void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=1),void 0===u&&(u=0),void 0===c&&(c=0),void 0===h&&(h=0),void 0===d&&(d=0);var $,b=0!==h,T=void 0===f,C=this._getPipeline(n,b?_0x5cecd5.InvertYPremultiplyAlphaWithOfst:_0x5cecd5.InvertYPremultiplyAlpha,{invertY:r,premultiplyAlpha:o}),S=C[0],w=C[1];if(a=Math.max(a,0),T&&(f=this._device.createCommandEncoder({})),null===(m=(_=f).pushDebugGroup)||void 0===m||m.call(_,"internal process texture - invertY=".concat(r," premultiplyAlpha=").concat(o)),WebGPUTextureHelper._IsHardwareTexture(e)?($=e.underlyingResource,(!r||o||1!==l||0!==a)&&(e=void 0)):($=e,e=void 0),$){b&&this._bufferManager.setRawData(this._ubCopyWithOfst,0,new Float32Array([u,c,h,d]),0,16);var E=e,P=null!==(g=null==E?void 0:E._copyInvertYTempTexture)&&void 0!==g?g:this.createTexture({width:t,height:i,layers:1},!1,!1,!1,!1,!1,n,1,f,_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.RenderAttachment|_0x5213c6.TextureUsage.TextureBinding),A=null!==(x=null==E?void 0:E._copyInvertYRenderPassDescr)&&void 0!==x?x:{colorAttachments:[{view:P.createView({format:n,dimension:_0x5213c6.TextureViewDimension.E2d,baseMipLevel:0,mipLevelCount:1,arrayLayerCount:1,baseArrayLayer:0}),loadOp:_0x5213c6.LoadOp.Load,storeOp:_0x5213c6.StoreOp.Store}]},L=f.beginRenderPass(A),M=b?null==E?void 0:E._copyInvertYBindGroupWithOfst:null==E?void 0:E._copyInvertYBindGroup;if(!M){var R={layout:w,entries:[{binding:0,resource:$.createView({format:n,dimension:_0x5213c6.TextureViewDimension.E2d,baseMipLevel:s,mipLevelCount:1,arrayLayerCount:l,baseArrayLayer:a})}]};b&&R.entries.push({binding:1,resource:{buffer:this._ubCopyWithOfst}}),M=this._device.createBindGroup(R)}L.setPipeline(S),L.setBindGroup(0,M),L.draw(4,1,0,0),L.end(),f.copyTextureToTexture({texture:P},{texture:$,mipLevel:s,origin:{x:0,y:0,z:a}},{width:t,height:i,depthOrArrayLayers:1}),E?(E._copyInvertYTempTexture=P,E._copyInvertYRenderPassDescr=A,b?E._copyInvertYBindGroupWithOfst=M:E._copyInvertYBindGroup=M):this._deferredReleaseTextures.push([P,null]),null===(v=(y=f).popDebugGroup)||void 0===v||v.call(y),T&&(this._device.queue.submit([f.finish()]),f=null)}},WebGPUTextureHelper.prototype.copyWithInvertY=function(e,t,i,n){var r,o,a,s,l=void 0===n,u=this._getPipeline(t,_0x5cecd5.InvertYPremultiplyAlpha,{invertY:!0,premultiplyAlpha:!1}),c=u[0],h=u[1];l&&(n=this._device.createCommandEncoder({})),null===(o=(r=n).pushDebugGroup)||void 0===o||o.call(r,"internal copy texture with invertY");var d=n.beginRenderPass(i),f=this._device.createBindGroup({layout:h,entries:[{binding:0,resource:e}]});d.setPipeline(c),d.setBindGroup(0,f),d.draw(4,1,0,0),d.end(),null===(s=(a=n).popDebugGroup)||void 0===s||s.call(a),l&&(this._device.queue.submit([n.finish()]),n=null)},WebGPUTextureHelper.prototype.createTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=_0x5213c6.TextureFormat.RGBA8Unorm),void 0===s&&(s=1),void 0===u&&(u=-1),void 0===c&&(c=0),void 0===h&&(h=1),s>1&&(s=4);var d=e.layers||1,f={width:e.width,height:e.height,depthOrArrayLayers:d},p=WebGPUTextureHelper.IsCompressedFormat(a),_=t?WebGPUTextureHelper.ComputeNumMipmapLevels(e.width,e.height):1;h>1&&(_=h);var m=u>=0?u:_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.CopyDst|_0x5213c6.TextureUsage.TextureBinding;c|=t&&!p?_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.RenderAttachment:0,!p&&!o&&(c|=_0x5213c6.TextureUsage.RenderAttachment|_0x5213c6.TextureUsage.CopyDst);var g=this._device.createTexture({size:f,dimension:o?_0x5213c6.TextureDimension.E3d:_0x5213c6.TextureDimension.E2d,format:a,usage:m|c,sampleCount:s,mipLevelCount:_});return WebGPUTextureHelper.IsImageBitmap(e)&&(this.updateTexture(e,g,e.width,e.height,d,a,0,0,n,r,0,0),t&&i&&this.generateMipmaps(g,a,_,0,l)),g},WebGPUTextureHelper.prototype.createCubeTexture=function(e,t,i,n,r,o,a,s,l,u){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o=_0x5213c6.TextureFormat.RGBA8Unorm),void 0===a&&(a=1),void 0===l&&(l=-1),void 0===u&&(u=0),a>1&&(a=4);var c=WebGPUTextureHelper.IsImageBitmapArray(e)?e[0].width:e.width,h=WebGPUTextureHelper.IsImageBitmapArray(e)?e[0].height:e.height,d=WebGPUTextureHelper.IsCompressedFormat(o),f=t?WebGPUTextureHelper.ComputeNumMipmapLevels(c,h):1,p=l>=0?l:_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.CopyDst|_0x5213c6.TextureUsage.TextureBinding;u|=t&&!d?_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.RenderAttachment:0,!d&&(u|=_0x5213c6.TextureUsage.RenderAttachment|_0x5213c6.TextureUsage.CopyDst);var _=this._device.createTexture({size:{width:c,height:h,depthOrArrayLayers:6},dimension:_0x5213c6.TextureDimension.E2d,format:o,usage:p|u,sampleCount:a,mipLevelCount:f});return WebGPUTextureHelper.IsImageBitmapArray(e)&&(this.updateCubeTextures(e,_,c,h,o,n,r,0,0),t&&i&&this.generateCubeMipmaps(_,o,f,s)),_},WebGPUTextureHelper.prototype.generateCubeMipmaps=function(e,t,i,n){var r,o,a,s,l=void 0===n;l&&(n=this._device.createCommandEncoder({})),null===(o=(r=n).pushDebugGroup)||void 0===o||o.call(r,"create cube mipmaps - ".concat(i," levels"));for(var u=0;u<6;++u)this.generateMipmaps(e,t,i,u,n);null===(s=(a=n).popDebugGroup)||void 0===s||s.call(a),l&&(this._device.queue.submit([n.finish()]),n=null)},WebGPUTextureHelper.prototype.generateMipmaps=function(e,t,i,n,r){var o,a,s,l,u,c,h,d;void 0===n&&(n=0);var f,p=void 0===r,_=this._getPipeline(t),m=_[0],g=_[1];if(n=Math.max(n,0),p&&(r=this._device.createCommandEncoder({})),null===(a=(o=r).pushDebugGroup)||void 0===a||a.call(o,"create mipmaps for face #".concat(n," - ").concat(i," levels")),WebGPUTextureHelper._IsHardwareTexture(e)?(f=e.underlyingResource,e._mipmapGenRenderPassDescr=e._mipmapGenRenderPassDescr||[],e._mipmapGenBindGroup=e._mipmapGenBindGroup||[]):(f=e,e=void 0),f){for(var x=e,y=1;y<i;++y){var v=null!==(l=null===(s=null==x?void 0:x._mipmapGenRenderPassDescr[n])||void 0===s?void 0:s[y-1])&&void 0!==l?l:{colorAttachments:[{view:f.createView({format:t,dimension:_0x5213c6.TextureViewDimension.E2d,baseMipLevel:y,mipLevelCount:1,arrayLayerCount:1,baseArrayLayer:n}),loadOp:_0x5213c6.LoadOp.Load,storeOp:_0x5213c6.StoreOp.Store}]};x&&(x._mipmapGenRenderPassDescr[n]=x._mipmapGenRenderPassDescr[n]||[],x._mipmapGenRenderPassDescr[n][y-1]=v);var $=r.beginRenderPass(v),b=null!==(c=null===(u=null==x?void 0:x._mipmapGenBindGroup[n])||void 0===u?void 0:u[y-1])&&void 0!==c?c:this._device.createBindGroup({layout:g,entries:[{binding:0,resource:this._mipmapSampler},{binding:1,resource:f.createView({format:t,dimension:_0x5213c6.TextureViewDimension.E2d,baseMipLevel:y-1,mipLevelCount:1,arrayLayerCount:1,baseArrayLayer:n})}]});x&&(x._mipmapGenBindGroup[n]=x._mipmapGenBindGroup[n]||[],x._mipmapGenBindGroup[n][y-1]=b),$.setPipeline(m),$.setBindGroup(0,b),$.draw(4,1,0,0),$.end()}null===(d=(h=r).popDebugGroup)||void 0===d||d.call(h),p&&(this._device.queue.submit([r.finish()]),r=null)}},WebGPUTextureHelper.prototype.generateMipmapsByCS=async function(e,t,i,n,r){var o=t._texture._hardwareTexture.underlyingResource,a=this._userEngine;const s=e,l=new _0x5c4ccd(a);l.addUniform("srcDimension",1),l.addUniform("texelSize",2);var u=new _0x5c4ccd(a);u.addUniform("texelSize",2);var c=s._texture.width,h=s._texture.height,d=new _0x556c47(a,c*h*4*4),f=new _0x556c47(a,c*h*4*4),p=new _0x45d8f5("texSamplerCS",a,{computeSource:_0x4ba444},{bindingsMapping:i?{params:{group:0,binding:0},buffer_out:{group:0,binding:1},oriDepthTexture:{group:0,binding:2},mip0Texture:{group:0,binding:3}}:{params:{group:0,binding:0},buffer_out:{group:0,binding:1},oriTexture:{group:0,binding:2},mip0Texture:{group:0,binding:3}},defines:[i?"_useDepthTexture":""]}),_=new _0x45d8f5("generateMipCS",a,{computeSource:_0x5ca06a},{bindingsMapping:{params:{group:0,binding:0},buffer_in:{group:0,binding:1},buffer_out:{group:0,binding:2},mipMapsTexture:{group:0,binding:3}},defines:[n?"_isHizDepthTex":""]}),m=p;for(let e=0;e<r;e++){let n=c>>e,p=h>>e;if(e>0&&(m=_),0==e){let e=(1&p)<<1|1&n;l.updateInt("srcDimension",e),l.updateFloat2("texelSize",n,p),l.update(),m.setUniformBuffer("params",l),i?m.setTexture("oriDepthTexture",s,!1):m.setTexture("oriTexture",s,!1),m.setStorageTexture("mip0Texture",t)}else{u.updateFloat2("texelSize",n,p),u.update(),m.setUniformBuffer("params",u);let i=o.createView({format:"rgba8unorm",dimension:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:e});t._texture._hardwareTexture.viewForWriting=i,m.setStorageTexture("mipMapsTexture",t)}1&e?(m.setStorageBuffer("buffer_in",d),m.setStorageBuffer("buffer_out",f)):(e>0&&m.setStorageBuffer("buffer_in",f),m.setStorageBuffer("buffer_out",d)),await m.dispatchWhenReady(Math.ceil(n/8),Math.ceil(p/8),1),e!=r-1&&a._currentRenderTarget&&a.unBindFramebuffer(a._currentRenderTarget)}d.dispose(),f.dispose(),u.dispose(),l.dispose()},WebGPUTextureHelper.prototype.createGPUTextureForInternalTexture=function(e,t,i,n,r){!e._hardwareTexture&&(e._hardwareTexture=new _0x157d2f),void 0===t&&(t=e.width),void 0===i&&(i=e.height),void 0===n&&(n=e.depth);var o=e._hardwareTexture,a=0!=((null!=r?r:0)&_0x333f62.TEXTURE_CREATIONFLAG_STORAGE);o.format=WebGPUTextureHelper.GetWebGPUTextureFormat(e.type,e.format,e._useSRGBBuffer),o.textureUsages=e._source===InternalTextureSource.RenderTarget||e.source===InternalTextureSource.MultiRenderTarget?_0x5213c6.TextureUsage.TextureBinding|_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.RenderAttachment:e._source===InternalTextureSource.DepthStencil?_0x5213c6.TextureUsage.TextureBinding|_0x5213c6.TextureUsage.RenderAttachment:-1,o.textureAdditionalUsages=a?_0x5213c6.TextureUsage.StorageBinding:0;var s,l=e.generateMipMaps,u=n||1;if(s=null!==e._maxLodLevel?e._maxLodLevel:e.mipmapCount>1?e.mipmapCount:l?WebGPUTextureHelper.ComputeNumMipmapLevels(t,i):1,e.isCube){var c=this.createCubeTexture({width:t,height:i},e.generateMipMaps,e.generateMipMaps,e.invertY,!1,o.format,1,this._commandEncoderForCreation,o.textureUsages,o.textureAdditionalUsages);o.set(c),o.createView({format:o.format,dimension:_0x5213c6.TextureViewDimension.Cube,mipLevelCount:s,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:6,aspect:WebGPUTextureHelper.HasDepthAndStencilAspects(o.format)?_0x5213c6.TextureAspect.DepthOnly:_0x5213c6.TextureAspect.All},a)}else{c=this.createTexture({width:t,height:i,layers:u},e.generateMipMaps,e.generateMipMaps,e.invertY,!1,e.is3D,o.format,1,this._commandEncoderForCreation,o.textureUsages,o.textureAdditionalUsages,s);o.set(c);var h=o.format;"depth24plus-stencil8"==h&&(h="depth24plus"),o.createView({format:h,dimension:e.is2DArray?_0x5213c6.TextureViewDimension.E2dArray:e.is3D?_0x5213c6.TextureDimension.E3d:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:s,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:e.is3D?1:u,aspect:WebGPUTextureHelper.HasDepthAndStencilAspects(o.format)?_0x5213c6.TextureAspect.DepthOnly:_0x5213c6.TextureAspect.All},a)}return e.width=e.baseWidth=t,e.height=e.baseHeight=i,e.depth=e.baseDepth=n,this.createMSAATexture(e,e.samples),o},WebGPUTextureHelper.prototype.createMSAATexture=function(e,t){var i=e._hardwareTexture;if((null==i?void 0:i.msaaTexture)&&(this.releaseTexture(i.msaaTexture),i.msaaTexture=null),i&&!((null!=t?t:1)<=1)){var n=e.width,r=e.height,o=e.depth||1;if(e.isCube){var a=this.createCubeTexture({width:n,height:r},!1,!1,e.invertY,!1,i.format,t,this._commandEncoderForCreation,i.textureUsages,i.textureAdditionalUsages);i.msaaTexture=a}else{a=this.createTexture({width:n,height:r,layers:o},!1,!1,e.invertY,!1,e.is3D,i.format,t,this._commandEncoderForCreation,i.textureUsages,i.textureAdditionalUsages);i.msaaTexture=a}var s=i.format;"depth24plus-stencil8"==s&&(s="depth24plus"),i.createMSAAView({format:s,dimension:e.is2DArray?_0x5213c6.TextureViewDimension.E2dArray:e.is3D?_0x5213c6.TextureDimension.E3d:_0x5213c6.TextureViewDimension.E2d,mipLevelCount:1,baseArrayLayer:0,baseMipLevel:0,arrayLayerCount:e.is3D?1:o,aspect:WebGPUTextureHelper.HasDepthAndStencilAspects(i.format)?_0x5213c6.TextureAspect.DepthOnly:_0x5213c6.TextureAspect.All})}},WebGPUTextureHelper.prototype.updateCubeTextures=function(e,t,i,n,r,o,a,s,l){void 0===o&&(o=!1),void 0===a&&(a=!1),void 0===s&&(s=0),void 0===l&&(l=0);for(var u=[0,3,1,4,2,5],c=0;c<u.length;++c){var h=e[u[c]];this.updateTexture(h,t,i,n,1,r,c,0,o,a,s,l)}},WebGPUTextureHelper.prototype.updateTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d){void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=!1),void 0===u&&(u=!1),void 0===c&&(c=0),void 0===h&&(h=0);var f=WebGPUTextureHelper._IsInternalTexture(t)?t._hardwareTexture.underlyingResource:t,p=WebGPUTextureHelper._GetBlockInformationFromFormat(o),_=WebGPUTextureHelper._IsInternalTexture(t)?t._hardwareTexture:t,m={texture:f,origin:{x:c,y:h,z:Math.max(a,0)},mipLevel:s,premultipliedAlpha:u},g={width:Math.ceil(i/p.width)*p.width,height:Math.ceil(n/p.height)*p.height,depthOrArrayLayers:r||1};if(void 0!==e.byteLength){e=e;var x=Math.ceil(i/p.width)*p.length,y=256*Math.ceil(x/256)===x;if(o==_0x5213c6.TextureFormat.RGBA16Float&&(y=!1),y){var v=this._device.createCommandEncoder({}),$=this._bufferManager.createRawBuffer(e.byteLength,_0x5213c6.BufferUsage.MapWrite|_0x5213c6.BufferUsage.CopySrc,!0),b=$.getMappedRange();new Uint8Array(b).set(e),$.unmap(),v.copyBufferToTexture({buffer:$,offset:0,bytesPerRow:x,rowsPerImage:n},m,g),this._device.queue.submit([v.finish()]),this._bufferManager.releaseBuffer($)}else this._device.queue.writeTexture(m,e,{offset:0,bytesPerRow:x,rowsPerImage:n},g);if(l||u){if(!WebGPUTextureHelper._IsInternalTexture(t))throw"updateTexture: Can't process the texture data because a GPUTexture was provided instead of an InternalTexture!";var T=0===c&&0===h&&i===t.width&&n===t.height;this.invertYPreMultiplyAlpha(_,t.width,t.height,o,l,u,a,s,r||1,c,h,T?0:i,T?0:n,void 0,d)}}else if(e=e,l)if(m.premultipliedAlpha=!1,WebGPUTextureHelper._IsInternalTexture(t)&&0===c&&0===h&&i===t.width&&n===t.height)this._device.queue.copyExternalImageToTexture({source:e},m,g),this.invertYPreMultiplyAlpha(_,i,n,o,l,u,a,s,r||1,0,0,0,0,void 0,d);else{v=this._device.createCommandEncoder({});var C=this.createTexture({width:i,height:n,layers:1},!1,!1,!1,!1,!1,o,1,v,_0x5213c6.TextureUsage.CopySrc|_0x5213c6.TextureUsage.TextureBinding);this._deferredReleaseTextures.push([C,null]),g.depthOrArrayLayers=1,this._device.queue.copyExternalImageToTexture({source:e},{texture:C},g),g.depthOrArrayLayers=r||1;this.invertYPreMultiplyAlpha(C,i,n,o,l,u,0,s,r||1,0,0,0,0,v,d),v.copyTextureToTexture({texture:C},m,g),this._device.queue.submit([v.finish()])}else this._device.queue.copyExternalImageToTexture({source:e},m,g)},WebGPUTextureHelper.prototype.readPixels=function(e,t,i,n,r,o,a,s,l,u){void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=null),void 0===u&&(u=!1);var c=WebGPUTextureHelper._GetBlockInformationFromFormat(o),h=Math.ceil(n/c.width)*c.length,d=256*Math.ceil(h/256),f=d*r,p=this._bufferManager.createRawBuffer(f,_0x5213c6.BufferUsage.MapRead|_0x5213c6.BufferUsage.CopyDst),_=this._device.createCommandEncoder({});return _.copyTextureToBuffer({texture:e,mipLevel:s,origin:{x:t,y:i,z:Math.max(a,0)}},{buffer:p,offset:0,bytesPerRow:d},{width:n,height:r,depthOrArrayLayers:1}),this._device.queue.submit([_.finish()]),this._bufferManager.readDataFromBuffer(p,f,n,r,h,d,WebGPUTextureHelper._GetTextureTypeFromFormat(o),0,l,!0,u)},WebGPUTextureHelper.prototype.releaseTexture=function(e){if(WebGPUTextureHelper._IsInternalTexture(e)){var t=e._hardwareTexture,i=e._irradianceTexture;this._deferredReleaseTextures.push([t,i])}else this._deferredReleaseTextures.push([e,null])},WebGPUTextureHelper.prototype.destroyDeferredTextures=function(){for(var e=0;e<this._deferredReleaseTextures.length;++e){var t=this._deferredReleaseTextures[e],i=t[0],n=t[1];i&&(WebGPUTextureHelper._IsHardwareTexture(i)?i.release():i.destroy()),null==n||n.dispose()}this._deferredReleaseTextures.length=0};var z$W=0;function u$R(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=e.width,n=e.height,r=e.source;e$2e(r)&&(e$2e(i)||(i=u$Z(r.videoWidth,r.width)),e$2e(n)||(n=u$Z(r.videoHeight,r.height)));var o=u$Z(e.pixelFormat,V$12.RGBA),a=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),s=o,l=V$12.isCompressedFormat(s);this._needGenerateMipmap=u$Z(e.generateMipmap,!1);var u=u$Z(e.flipY,!0),c=e.context.engine,h=R$12.toPixelFormat(o),d=R$12.toPixelType(a);this._sampler=e$2e(e.sampler)?e.sampler:new e$1S,this._samples=u$Z(e.samples,1);var f,p=R$12.toAddressMode(this._sampler.wrapS),_=R$12.toAddressMode(this._sampler.wrapT),m=R$12.toSamplerMode(a,this._sampler),g=null;if(e$2e(r))if(e$2e(r.arrayBufferView)){var x=r.arrayBufferView;!l&&u&&(x=V$12.flipY(x,o,a,i,n)),g=c.createRawTexture(x,i,n,h,this._needGenerateMipmap,!1,m,null,d,0,!1,1,this._samples),this._texture=new _0x4f1603(g),g.wrapU=p,g.wrapV=_}else if(e$2e(r.framebuffer))console.log("defined(source.framebuffer)");else if(H$13(r))u=!1,g=c.createTexture("",!this._needGenerateMipmap,u,null,m,null,null,r,null,s,"",null,null,null,null),this._texture=new _0x4f1603(g),g.wrapU=p,g.wrapV=_;else{var y=this;createImageBitmap(r).then((function(e){g=c.createTexture("",!y._needGenerateMipmap,u,null,m,null,null,e,null,s,"",null,null,null,null),y._texture=new _0x4f1603(g),g.wrapU=p,g.wrapV=_})).catch((e=>{console.log("createImageBitmap")}))}else{if(o==V$12.DEPTH_COMPONENT||o==V$12.DEPTH_COMPONENT16||o==V$12.DEPTH_COMPONENT32F||o==V$12.DEPTH_STENCIL){var v={width:i,height:n},$={generateStencil:o==V$12.DEPTH_STENCIL,bilinearFiltering:!0,isCube:!1,depthTextureFormat:h,samples:this._samples,comparisonFunction:this._sampler._comparisonFunction};g=c.createDepthStencilTexture(v,$),c._textureHelper.createGPUTextureForInternalTexture(g),this._texture=new _0x4f1603(g)}else g=c.createRawTexture(x,i,n,h,this._needGenerateMipmap,u,m,!1,d,0,!1,0,this._samples),this._texture=new _0x4f1603(g);g.wrapU=p,g.wrapV=_}f=l?V$12.compressedTextureSizeInBytes(o,i,n):V$12.textureSizeInBytes(o,a,i,n),this._id=z$W++,this._context=t,this._pixelFormat=o,this._pixelDatatype=a,this._width=i,this._height=n,this._dimensions=new o$1o(i,n),this._size=[i,n],this._mipmapTexture,this._sizeInBytes=f,this._flipY=u,t.memorySize+=f}function H$13(e){return void 0!==e.close}function t$U(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.webgpu?this._inner=new u$R(e):this._inner=new w$V(e)}u$R.fromFramebuffer=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context},Object.defineProperties(u$R.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},size:{get:function(){return this._size}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}},thinTexture:{get:function(){return this._texture}},internalTexture:{get:function(){return this._texture._texture}},GPUTexture:{get:function(){return this._texture._texture._hardwareTexture.underlyingResource}}}),u$R.prototype.copyFrom=function(e,t,i){var n=e.width,r=e.height,o=e.arrayBufferView;if(e$2e(o))this._context.engine.updateTextureData(this.internalTexture,o,t,i,n,r);else{var a=this.internalTexture,s=a._hardwareTexture;e instanceof HTMLVideoElement?this._context.engine.updateVideoTexture(a,e,!1):this._context.engine._textureHelper.updateTexture(e,a,n,r,a.depth,s.format,0,0,!0,!1,t,i)}},u$R.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){console.log("TextureGPU.prototype.copyFromFramebuffer")},u$R.prototype.copyFromTexture=function(e,t,i,n,r,o,a){var s=this._context.engine._device,l=this.GPUTexture,u=e._inner.GPUTexture,c=s.createCommandEncoder({});c.copyTextureToTexture({texture:u,origin:{x:n,y:r,z:0}},{texture:l,origin:{x:t,y:i,z:0}},{width:u.width,height:u.height,depthOrArrayLayers:1}),s.queue.submit([c.finish()])},u$R.prototype.generateMipmap=function(e){if(this._needGenerateMipmap&&e$2e(this._texture)){var t=WebGPUTextureHelper.ComputeNumMipmapLevels(this._width,this._height),i=this.GPUTexture;this._context.engine._textureHelper.generateMipmaps(i,i.format,t,0)}else this._needGenerateMipmap=!0},u$R.prototype.generateMipmapTextureByCS=function(){if(e$2e(this.thinTexture)){if(this._context.engine._currentRenderTarget){var e=this;return void this._context.engine._onAfterUnbindFrameBufferObservable.addOnce((function(){e._afterCreate(!1)}))}this._afterCreate(!1)}},u$R.prototype.generateHizDepthTextureByCS=function(){if(e$2e(this.thinTexture)){if(this._context.engine._currentRenderTarget){var e=this;return void this._context.engine._onAfterUnbindFrameBufferObservable.addOnce((function(){e._afterCreate(!0)}))}this._afterCreate(!0)}},u$R.prototype._afterCreate=function(e){var t=WebGPUTextureHelper.ComputeNumMipmapLevels(this._width,this._height),i=this.pixelFormat==V$12.DEPTH_COMPONENT||this.pixelFormat==V$12.DEPTH_STENCIL;let n=this._context.engine.createRawTexture(null,this._width,this._height,_0x333f62.TEXTUREFORMAT_RGBA,!0,this.internalTexture.invertY,this.internalTexture.samplingMode,!1,0,_0x333f62.TEXTURE_CREATIONFLAG_STORAGE,!1,t,this.internalTexture.samples);this._mipmapTexture=new _0x4f1603(n),this._context.engine._textureHelper.generateMipmapsByCS(this._texture,this._mipmapTexture,i,e,t)},u$R.prototype.isDestroyed=function(){return!1},u$R.prototype.destroy=function(){return this._context.memorySize-=this._sizeInBytes,this._texture.dispose(),i$11(this)},t$U.create=function(e){return new t$U(e)},t$U.fromFramebuffer=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=t._gl,n=u$Z(e.pixelFormat,V$12.RGB),r=u$Z(e.framebufferXOffset,0),o=u$Z(e.framebufferYOffset,0),a=u$Z(e.width,i.drawingBufferWidth),s=u$Z(e.height,i.drawingBufferHeight),l=e.framebuffer;if(!V$12.validate(n))throw new t$15("Invalid pixelFormat.");if(V$12.isDepthFormat(n)||V$12.isCompressedFormat(n))throw new t$15("pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.");if(o$1q.defined("options.context",e.context),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",r,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",o,0),r+a>i.drawingBufferWidth)throw new t$15("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(o+s>i.drawingBufferHeight)throw new t$15("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new t$U({context:t,width:a,height:s,pixelFormat:n,source:{framebuffer:e$2e(l)?l:t.defaultFramebuffer,xOffset:r,yOffset:o,width:a,height:s}})},Object.defineProperties(t$U.prototype,{id:{set:function(e){this._inner.id=e},get:function(){return this._inner.id}},sampler:{get:function(){return this._inner.sampler},set:function(e){this._inner.sampler=e}},pixelFormat:{get:function(){return this._inner.pixelFormat}},pixelDatatype:{get:function(){return this._inner.pixelDatatype}},dimensions:{get:function(){return this._inner.dimensions}},size:{get:function(){return this._inner.size}},preMultiplyAlpha:{get:function(){return this._inner.preMultiplyAlpha}},flipY:{get:function(){return this._inner.flipY}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},_target:{get:function(){return this._inner._target}},_texture:{get:function(){return this._inner._texture}}}),t$U.prototype.copyFrom=function(e,t,i){this._inner.copyFrom(e,t,i)},t$U.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){this._inner.copyFromFramebuffer(e,t,i,n,r,o)},t$U.prototype.copyFromTexture=function(e,t,i,n,r,o,a){this._inner.copyFromTexture(e,t,i,n,r,o,a)},t$U.prototype.generateMipmap=function(e){this._inner.generateMipmap(e)},t$U.prototype.isDestroyed=function(){return!1},t$U.prototype.destroy=function(){return this._inner.destroy(),i$11(this)};var E$16={NORMAL:0,REFLECT:1,DEPTH:2,NORMAL_AND_DEPTH:3,POSTEFFECT_FILTER:4,RASTER:5,CLAMP:6,PICKRECT:7,SQRESULT:8},Qe$c=Object.freeze(E$16),E$15={RGBA4:de$y.RGBA4,RGBA8:de$y.RGBA8,RGBA16F:de$y.RGBA16F,RGBA32F:de$y.RGBA32F,RGB5_A1:de$y.RGB5_A1,RGB565:de$y.RGB565,DEPTH_COMPONENT16:de$y.DEPTH_COMPONENT16,STENCIL_INDEX8:de$y.STENCIL_INDEX8,DEPTH_STENCIL:de$y.DEPTH_STENCIL,DEPTH24_STENCIL8:de$y.DEPTH24_STENCIL8,validate:function(e){return e===E$15.RGBA4||e===E$15.RGBA8||e===E$15.RGBA16F||e===E$15.RGBA32F||e===E$15.RGB5_A1||e===E$15.RGB565||e===E$15.DEPTH_COMPONENT16||e===E$15.STENCIL_INDEX8||e===E$15.DEPTH_STENCIL||e===E$15.DEPTH24_STENCIL8},getColorFormat:function(e){return e===de$y.FLOAT?E$15.RGBA32F:e===de$y.HALF_FLOAT_OES?E$15.RGBA16F:E$15.RGBA8}},M$13=Object.freeze(E$15);function o$19(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=t._gl,n=e$1W.maximumRenderbufferSize,r=u$Z(e.format,M$13.RGBA4),o=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),a=e$2e(e.width)?e.width:i.drawingBufferWidth,s=e$2e(e.height)?e.height:i.drawingBufferHeight,l=!1,u=u$Z(e.samples,0);u>0&&t.webgl2&&(l=!0);var c=G$1c(t,r,o);if(!M$13.validate(r))throw new t$15("Invalid format.");if(o$1q.typeOf.number.greaterThan("width",a,0),a>n)throw new t$15("Width must be less than or equal to the maximum renderbuffer size ("+n+"). Check maximumRenderbufferSize.");if(o$1q.typeOf.number.greaterThan("height",s,0),s>n)throw new t$15("Height must be less than or equal to the maximum renderbuffer size ("+n+"). Check maximumRenderbufferSize.");this._gl=i,this._format=r,this._width=a,this._height=s,this._renderbuffer=this._gl.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,this._renderbuffer),l?i.renderbufferStorageMultisample(i.RENDERBUFFER,u,c,a,s):i.renderbufferStorage(i.RENDERBUFFER,c,a,s),i.bindRenderbuffer(i.RENDERBUFFER,null)}function G$1c(e,t,i){if(!e.webgl2)return t;var n=t;return t===de$y.RED&&(i===de$y.FLOAT&&(n=de$y.R32F),i===de$y.HALF_FLOAT&&(n=de$y.R16F),i===de$y.UNSIGNED_BYTE&&(n=de$y.R8)),t===de$y.RGB&&(i===de$y.FLOAT&&(n=de$y.RGB32F),i===de$y.HALF_FLOAT&&(n=de$y.RGB16F),i===de$y.UNSIGNED_BYTE&&(n=de$y.RGB8)),t===de$y.RGBA&&(i===de$y.FLOAT&&(n=de$y.RGBA32F),i===de$y.HALF_FLOAT&&(n=de$y.RGBA16F),i===de$y.UNSIGNED_BYTE&&(n=de$y.RGBA8)),n===de$y.R16F||n===de$y.R32F||n===de$y.RGBA16F||n===de$y.RGBA32F?e.colorBufferFloat:(n===de$y.RGB16F||n===de$y.RGB32F)&&console.warn("WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),n===de$y.DEPTH_STENCIL?n=de$y.DEPTH24_STENCIL8:n===de$y.DEPTH_COMPONENT&&(i===de$y.UNSIGNED_SHORT?n=de$y.DEPTH_COMPONENT16:i===de$y.UNSIGNED_INT&&(n=de$y.DEPTH_COMPONENT24)),n}function r$11(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t=e.context,i=e$1W.maximumRenderbufferSize,n=u$Z(e.format,M$13.RGBA4);u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE);var r=e$2e(e.width)?e.width:t.drawingBufferWidth,o=e$2e(e.height)?e.height:t.drawingBufferHeight;if(u$Z(e.samples,0)>0&&t.webgl2,!M$13.validate(n))throw new t$15("Invalid format.");if(o$1q.typeOf.number.greaterThan("width",r,0),r>i)throw new t$15("Width must be less than or equal to the maximum renderbuffer size ("+i+"). Check maximumRenderbufferSize.");if(o$1q.typeOf.number.greaterThan("height",o,0),o>i)throw new t$15("Height must be less than or equal to the maximum renderbuffer size ("+i+"). Check maximumRenderbufferSize.");this._format=n,this._width=r,this._height=o}function r$10(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.webgpu?this._inner=new r$11(e):this._inner=new o$19(e)}Object.defineProperties(o$19.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),o$19.prototype._getRenderbuffer=function(){return this._renderbuffer},o$19.prototype.isDestroyed=function(){return!1},o$19.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),i$11(this)},Object.defineProperties(r$11.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),r$11.prototype._getRenderbuffer=function(){return null},r$11.prototype.isDestroyed=function(){return!1},r$11.prototype.destroy=function(){return i$11(this)},Object.defineProperties(r$10.prototype,{format:{get:function(){return this._inner.format}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}}}),r$10.prototype._getRenderbuffer=function(){return this._inner._getRenderbuffer()},r$10.prototype.isDestroyed=function(){return!1},r$10.prototype.destroy=function(){return this._inner.destroy(),i$11(this)};var v$O="uniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = czm_packDepth(texture2D(u_depthTexture, v_textureCoordinates).r);\n}\n",C$15="varying v_textureCoordinates : vec2<f32>;\nvar u_depthTexture : texture_depth_2d;\nvar u_depthTextureSampler : sampler;\nfn packDepth(depth : f32) -> vec4<f32> {\n var enc : vec4<f32> = (vec4<f32>(1.0, 255.0, 65025.0, 16581375.0) * depth);\n enc = fract(enc);\n enc = (enc - (vec4<f32>(enc.y, enc.z, enc.w, enc.w) * vec4<f32>(0.003921569, 0.003921569, 0.003921569, 0.0)));\n return enc;\n}\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n gl_FragColor = packDepth(textureSample(u_depthTexture, u_depthTextureSampler, v_textureCoordinates));\n}\n";function s$U(e){this._depthTexture=void 0,this._framebuffer=void 0,this._copyDepthCommand=void 0,this._viewport=new f$1a,this._rs=void 0,this._passState=new n$$(e),this._passState.viewport=this._viewport,this._context=e,this._isUpdate=!1,this._beginFunc=void 0,this._endFunc=void 0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!1,isUnderGlobeVisible:!1},this._depthTextureToCopy=void 0,this._manualDepth=!0;var t=new n$$(e);t.blendingEnabled=!1,t.viewport=new f$1a,this._passState=t}function S$U(e,t,i,n,r){(!e$2e(e._framebuffer)||e.width!==n||e.height!==r)&&(e.width=n,e.height=r,e._depthTexture=e._depthTexture&&e._depthTexture.destroy(),e._depthTexture=new t$U({context:t,width:n,height:r,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._framebuffer=new t$V({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1}),t.depthTexture||(e._depthTextureCopyFrom=e._depthTextureCopyFrom&&e._depthTextureCopyFrom.destroy(),e._depthTextureCopyFrom=new t$U({context:t,width:n,height:r,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),e._framebufferCopyFrom=e._framebufferCopyFrom&&e._framebufferCopyFrom.destroy(),e._framebufferCopyFrom=new t$V({context:t,colorTextures:[e._depthTextureCopyFrom],depthStencilRenderbuffer:new r$10({context:t,width:n,height:r,format:M$13.DEPTH_STENCIL}),destroyAttachments:!1})))}function P$$(e,t,i,n){if(e._viewport.width=i,e._viewport.height=n,(!e$2e(e._rs)||!f$1a.equals(e._viewport,e._rs.viewport))&&(e._rs=d$1m.fromCache({viewport:e._viewport})),t.depthTexture)e$2e(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(t.webgpu?C$15:v$O,{shaderProgramName:"depthFramebufferCopyDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e._depthTextureToCopy}},owner:e}));else{e._copyDepthCommand=t.createViewportQuadCommand("uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",{renderState:d$1m.fromCache(),uniformMap:{u_texture:function(){return e._depthTextureToCopy}},owner:e})}e$2e(e._clearCommand)||(e._clearCommand=new t$W({color:new e$1X(0,0,0,0),stencil:0,owner:e})),e._copyDepthCommand.renderState=e._rs,e._clearCommand.framebuffer=e._framebuffer,e._copyDepthCommand.framebuffer=e._framebuffer}Object.defineProperties(s$U.prototype,{framebuffer:{get:function(){return this._framebuffer}},depthTexture:{get:function(){return this._depthTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isManualDepth:{get:function(){return this._manualDepth},set:function(e){this._manualDepth!==e&&(this._manualDepth=e,this._isUpdate=!0)}},useType:{get:function(){return 1},set:function(e){}},frameBufferType:{get:function(){return Qe$c.DEPTH}}}),s$U.prototype.begin=function(e){var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._passState.viewport.width=i,this._passState.viewport.height=n,S$U(this,t,e,i,n),P$$(this,t,i,n),this._beginFunc&&this._beginFunc(e),t.depthTexture||(e.passes.depth=!0,e.passes.pick=!0,this._passState.framebuffer=this._framebufferCopyFrom),this._passState},s$U.prototype.end=function(e){e.context.depthTexture||(e.passes.depth=!1,e.passes.pick=!1),this._endFunc&&this._endFunc(e)},s$U.prototype.update=function(e,t,i){this._depthTextureToCopy=e.depthTexture?i.depthStencilTexture:this._depthTextureCopyFrom,e$2e(this._clearCommand)&&this._clearCommand.execute(e,t),e$2e(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t)},s$U.prototype.destroy=function(){return this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._depthTextureCopyFrom=this._depthTextureCopyFrom&&this._depthTextureCopyFrom.destroy(),this._framebufferCopyFrom=this._framebufferCopyFrom&&this._framebufferCopyFrom.destroy(),e$2e(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),this._depthTextureToCopy=void 0,i$11(this)},s$U.prototype.isDestroyed=function(){return!1};var e$1R={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3,getMorphTime:function(e){return e===e$1R.SCENE3D?1:e===e$1R.MORPHING?void 0:0}},C$14=Object.freeze(e$1R);function p$$(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.url",e.url);var t=e.url,i=e.responseType,n=u$Z(e.method,"GET"),r=e.data,o=e.headers,a=e.overrideMimeType;t=u$Z(t,e.url);var s=e$2e(e.request)?e.request:new r$1c;return s.url=t,s.requestFunction=function(e){var l=o$1l.defer(),u=p$$.load(u$Z(e,t),i,n,r,o,l,a);return e$2e(u)&&e$2e(u.abort)&&(s.cancelFunction=function(){u.abort()}),l.promise},r$1b.request(s)}var j$18=/^data:(.*?)(;base64)?,(.*)$/;function h$10(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function b$18(e,t){for(var i=h$10(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return n}function C$13(e,t){t=u$Z(t,"");var i=e[1],n=!!e[2],r=e[3];switch(t){case"":case"text":return h$10(n,r);case"arraybuffer":return b$18(n,r);case"blob":var o=b$18(n,r);return new Blob([o],{type:i});case"document":return(new DOMParser).parseFromString(h$10(n,r),i);case"json":return JSON.parse(h$10(n,r));default:throw new t$15("Unhandled responseType: "+t)}}function u$Q(e,t,i){return p$$({url:e,headers:t,request:i})}p$$.load=function(e,t,i,n,r,o,a){var s=j$18.exec(e);if(null===s){var l=new XMLHttpRequest;if(u$W.contains(e)&&(l.withCredentials=!0),e$2e(a)&&e$2e(l.overrideMimeType)&&l.overrideMimeType(a),l.open(i,e,!0),e$2e(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);e$2e(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,i=l.responseType;if(!e$2e(e)||e$2e(t)&&i!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===i||"document"===i)&&e$2e(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==i&&"text"!==i||!e$2e(l.responseText)?o.reject(new t$13("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new s$$(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new s$$)},l.send(n),l}o.resolve(C$13(s,t))},p$$.defaultLoad=p$$.load;var i$Y={Accept:"application/json,*/*;q=0.01"};function u$P(e,t,i){if(!e$2e(e))throw new t$15("url is required.");e$2e(t)?e$2e(t.Accept)||((t=l$1f(t)).Accept=i$Y.Accept):t=i$Y;var n=u$Q(e,t,i);if(e$2e(n))return n.then((function(e){return JSON.parse(e)}))}var ISERVER_BASIC=!1;function LicenseChecker(){this.urlMap=Object.create(null),this.pendingRequest=Object.create(null)}LicenseChecker.functionMap=Object.freeze({ViewShed3D:"可视域分析",SpatialQuery3D:"空间查询",ShadowQueryPoints:"阴影分析",Sightline:"通视分析",Skyline:"天际线分析",ViewDome:"开敞度分析",DirectionalLight:"平行光源",ParticleSystem:"粒子系统",Profile:"剖面分析",SpotLight:"聚光源",PointLight:"点光源",Scene_bloomEffect:"泛光",Scene_hdrEnabled:"HDR开关",Scene_scanEffect:"扫描线",Scene_addLightSource:"添加光源",S3MTilesLayer_hypsometricSetting:"分层设色",DynamicLayer3D:"动态图层",Globe_SlopeSetting:"地形坡度坡向",Globe_setPBRMaterial:"地形PBR材质",CloudBox:"云层",SkyBox:"天空盒",S3MTilesLayer_setPBRMaterial:"PBR材质",ProjectionImage:"视频投放"}),LicenseChecker.prototype.getLicense=function(e){var t,i=o$1l.defer();if(!e$2e(e)||0===e.length)return i.resolve(null),i.promise;if(-1==e.indexOf("http")&&(e=window.location.href.substring(0,window.location.href.indexOf(e))+e),e=new URL(e),t=-1!==e.href.indexOf("/iserver")?e.href.substring(0,e.href.indexOf("/iserver")+8):-1!==e.href.indexOf("/services/")?e.href.substring(0,e.href.indexOf("/services/")):e.origin,e$2e(this.urlMap[t]))return i.resolve(this.urlMap[t]),i.promise;if(e$2e(this.pendingRequest[t]))return i.reject(null),i.promise;var n=t+"/manager/license.json",r=this;return r.pendingRequest[t]=!0,u$P(n).then((function(n){r.urlMap[e]=n,delete r.pendingRequest[t],i.resolve(n)})).otherwise((function(){i.reject(null)})),i.promise},LicenseChecker.prototype.check=function(e){e$2e(e)&&(!0!==e.iServerBasic&&!0!==e.iServerBasicSpace||(e$2e(e.productType)?"iServerBasic"===e.productType&&(ISERVER_BASIC=!0):ISERVER_BASIC=!0))},LicenseChecker.prototype.isBasciServer=function(){return ISERVER_BASIC},LicenseChecker.prototype.verify=function(e){if(ISERVER_BASIC)throw e="iServerBasic版本,"+LicenseChecker.functionMap[e]+"不可用",console.warn(e),new t$15(e)},LicenseChecker.LICENSECHECKER=new LicenseChecker;var _0x23ea03=(_0x229541=!0,function(e,t){var i=_0x229541?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x229541=!1,i}),_0x2e32eb=_0x23ea03(void 0,(function(){return _0x2e32eb.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e32eb).search("(((.+)+)+)+$")})),_0x229541;function _0x3c54f4(e){if(!e$2e(e))throw new t$15("scene are required.");if(!e.context.depthTexture)throw new t$15("the depth buffer is not supported.");this._scene=e,this._depthBuffer=void 0,this._depthDownBuffer=void 0,this._depthDownReverBuffer=void 0,this._depthLeftBuffer=void 0,this._depthLeftReverBuffer=void 0,this._depthTopBuffer=void 0,this._depthValue=void 0,this._dataBuffer=void 0,this._frameState=void 0,this._textureWidth=1024,this._textureHeight=1024,this._startPoint3D=[0,0,0],this._endPoint3D=[0,0,0],this._extendHeight=0,this._bManualChangeExtendHeight=!1,this._v3ProfileDir=new o$1p(0,0,0),this._v3MiddlePosition=new o$1p(0,0,0),this._v3ProfileNormal=new o$1p(0,0,0),this._viewMatrix=new p$1d,this._projMatrix=new p$1d,this._update=!0,this._visibleViewport=4095,this._id=0,this._name="",this._downName="",this._downReverName="",this._leftName="",this._leftReverName="",this._topName="",this._func=void 0,this._isGetPositions=!1,this._positions=[]}function _0x5bf48f(e,t,i){var n=i.camera._projection,r=.5*(e.startPoint[2]+e.endPoint[2]),o=new o$1p;if(o.x=.5*(e.endPoint[0]-e.startPoint[0])+e.startPoint[0],o.y=.5*(e.endPoint[1]-e.startPoint[1])+e.startPoint[1],o.z=r,e._scene.mode===C$14.SCENE3D){var a=o$1p.fromDegreesArrayHeights([e.startPoint[0],e.startPoint[1],r])[0],s=o$1p.fromDegreesArrayHeights([e.endPoint[0],e.endPoint[1],r])[0];o$1p.subtract(s,a,e._v3ProfileDir),e._v3MiddlePosition=o$1p.fromDegreesArrayHeights([o.x,o.y,r])[0];var l=new o$1p;e._v3MiddlePosition.clone(l),o$1p.normalize(l,l)}else{a=n.project(a$18.fromDegrees(e.startPoint[0],e.startPoint[1],e.startPoint[2]),new o$1p),s=n.project(a$18.fromDegrees(e.endPoint[0],e.endPoint[1],e.startPoint[2]),new o$1p);o$1p.subtract(s,a,e._v3ProfileDir);var u=a$18.fromDegrees(o.x,o.y,r);e._v3MiddlePosition=n.project(u,new o$1p),e._oriPos=n.project(a$18.fromDegrees(o.x,o.y,-6378137),new o$1p);l=new o$1p;o$1p.subtract(e._v3MiddlePosition,e._oriPos,l),o$1p.normalize(l,l)}var c=new o$1p;e._v3ProfileDir.clone(c),o$1p.normalize(c,c),o$1p.cross(c,l,e._v3ProfileNormal),o$1p.normalize(e._v3ProfileNormal,e._v3ProfileNormal)}function _0x41a8f5(e,t,i){e._textureWidth=t.drawingBufferWidth,e._textureHeight=t.drawingBufferHeight,e._textureWidth=e._textureWidth<=1?1:e._textureWidth,e._textureHeight=e._textureHeight<=1?1:e._textureHeight;var n=e._textureWidth*e._textureHeight;e._depthValue=new Float32Array(n),e._dataBuffer=new Uint8Array(4*n);for(var r=0;r<n;r++)e._depthValue[r]=1,e._dataBuffer[4*r]=0,e._dataBuffer[4*r+1]=0,e._dataBuffer[4*r+2]=0,e._dataBuffer[4*r+3]=255}function _0x2de012(e,t){var i=t.depthData,n=t.viewProjection,r=t.invViewProjection;p$1d.multiply(e._projMatrix,e._viewMatrix,n);for(var o=new e$2c,a=new e$2c(1,1/255,1/65025,1/160581375),s=t.currentFrustum.x,l=t.currentFrustum.y,u=0;u<e._textureHeight;u++)for(var c=0;c<e._textureWidth;c++){var h=u*e._textureWidth+c,d=e$2c.unpack(i,4*h,o);e$2c.divideByScalar(d,255,d);var f=e$2c.dot(d,a);if(!(f<=0)){if(e._scene.frameState.useLogDepth){var p=f*t.log2FarDepthFromNearPlusOne;f=l*(1-s/(Math.pow(2,p)-1+s))/(l-s)}o.x=c/e._textureWidth*2-1,o.y=u/e._textureHeight*2-1,t.useWebGPU?o.z=f:o.z=2*f-1,o.w=1,p$1d.multiplyByVector(r,o,o),e$2c.divideByScalar(o,o.w,o);var _=new o$1p(o.x,o.y,o.z);p$1d.multiplyByVector(n,o,o),e$2c.divideByScalar(o,o.w,o),o.x=.5*o.x+.5,o.y=.5*o.y+.5;var m=Math.round(o.x*e._textureWidth),g=Math.round(o.y*e._textureHeight);if(m>=0&&m<e._textureWidth&&g>=0&&g<e._textureHeight){var x=o.z;if(x<=1&&x>=-1){var y=m+(e._textureHeight-g)*e._textureWidth;e._dataBuffer[4*y]=0,e._dataBuffer[4*y+1]=255,e._dataBuffer[4*y+2]=255,e._dataBuffer[4*y+3]=255;var v=e._depthValue[y];e._depthValue[y]=x<v?x:v,e._isGetPositions&&e._positions.push(_)}}}}}function _0x1834e4(e){for(var t=1;t<e._textureHeight-1;t++)for(var i=1;i<e._textureWidth-1;i++){var n=t*e._textureWidth+i,r=e._dataBuffer[4*n+1],o=e._dataBuffer[4*(n-e._textureWidth)+1],a=e._dataBuffer[4*(n+e._textureWidth)+1],s=e._dataBuffer[4*(n-e._textureWidth-1)+1],l=e._dataBuffer[4*(n+e._textureWidth+1)+1],u=e._dataBuffer[4*(n-e._textureWidth+1)+1],c=e._dataBuffer[4*(n+e._textureWidth-1)+1],h=e._dataBuffer[4*(n-1)+1],d=e._dataBuffer[4*(n+1)+1];if(0==r&&(255==o&&255==a||255==s&&255==l||255==u&&255==c||255==h&&255==d)){e._dataBuffer[4*n]=0,e._dataBuffer[4*n+1]=255,e._dataBuffer[4*n+2]=255,e._dataBuffer[4*n+3]=255;for(var f=-1;f<=1;f++)for(var p=-1;p<=1;p++)n+f*e._textureWidth+p>0&&(e._dataBuffer[4*(n+f*e._textureWidth+p)]=0,e._dataBuffer[4*(n+f*e._textureWidth+p)+1]=255,e._dataBuffer[4*(n+f*e._textureWidth+p)+2]=255,e._dataBuffer[4*(n+f*e._textureWidth+p)+3]=255)}}for(t=1;t<e._textureHeight-1;t++)for(i=1;i<e._textureWidth-1;i++){n=t*e._textureWidth+i,r=e._dataBuffer[4*n+1],o=e._dataBuffer[4*(n-e._textureWidth)+1],a=e._dataBuffer[4*(n+e._textureWidth)+1],s=e._dataBuffer[4*(n-e._textureWidth-1)+1],l=e._dataBuffer[4*(n+e._textureWidth+1)+1],u=e._dataBuffer[4*(n-e._textureWidth+1)+1],c=e._dataBuffer[4*(n+e._textureWidth-1)+1],h=e._dataBuffer[4*(n-1)+1],d=e._dataBuffer[4*(n+1)+1];if(r<255){var _=(u+l+s+c)/9+(o+h+d+a)/9+r/9;_=Math.round(_),e._dataBuffer[4*n]=0,e._dataBuffer[4*n+1]=_,e._dataBuffer[4*n+2]=_,e._dataBuffer[4*n+3]=255}}}function _0x10bd10(e,t,i,n){var r=e._scene,o=45*e$2d.RADIANS_PER_DEGREE,a=.5*o$1p.magnitude(e._v3ProfileDir),s=e._extendHeight,l=new o$1p;e._v3ProfileNormal.clone(l),o$1p.multiplyByScalar(l,a,l);var u=new o$1p;if(t.downOblique&&!t.leftOblique)o$1p.UNIT_Z.clone(u),t.secondDrawing?o$1p.subtract(e._v3MiddlePosition,l,u):o$1p.add(e._v3MiddlePosition,l,u),_0x7ba088(e,u,u),o$1p.multiplyByScalar(u,a*Math.tan(o),u),o$1p.add(l,u,u),t.secondDrawing&&o$1p.negate(u,u);else if(t.leftOblique&&!t.downOblique)e._v3ProfileDir.clone(u),o$1p.normalize(u,u),o$1p.multiplyByScalar(u,a*Math.tan(o),u),o$1p.add(l,u,u),t.secondDrawing||o$1p.negate(u,u);else if(t.leftOblique||t.downOblique){var c=new o$1p;_0x7ba088(e,e._v3MiddlePosition,c),o$1p.multiplyByScalar(c,.5*s,u)}else l.clone(u);var h=new o$1p;o$1p.add(e._v3MiddlePosition,u,h);var d=new o$1p;o$1p.subtract(e._v3MiddlePosition,h,d);var f=o$1p.magnitude(d),p=f-t.cameraWidth,_=f+t.cameraWidth;o$1p.normalize(d,d);var m=d.clone(),g=new o$1p;e._v3ProfileDir.clone(g),o$1p.negate(g,g);var x=new o$1p;o$1p.cross(m,g,x),x=o$1p.normalize(x,x),t.downOblique&&t.leftOblique&&(p=.5,_=s),p=p<.5?.5:p;var y=n.camera,v=y.frustum.near,$=y.frustum.far,b=y.frustum.fov,T=new o$1p,C=y.heading,S=y.pitch,w=y.frustum.aspectRatio,E=[],P=r.globe.showSkirts,A=r.globe.backFaceCulling;o$1p.clone(y.position,T),t.depthBuffer.isUpdate=!0,t.depthBuffer._beginFunc=function(){if((e._textureWidth!=i.drawingBufferWidth||e._textureHeight!=i.drawingBufferHeight)&&_0x41a8f5(e,i),v=y.frustum.near,$=y.frustum.far,b=y.frustum.fov,C=y.heading,S=y.pitch,w=y.frustum.aspectRatio,o$1p.clone(y.position,T),y.frustum.near=p,y.frustum.far=_,y.frustum.fov=90*e$2d.RADIANS_PER_DEGREE,y.frustum.aspectRatio=e._textureWidth/e._textureHeight,y.setView({destination:h,orientation:{direction:m,up:x},convert:!1}),!t.downOblique&&!t.leftOblique){var n=i.relativeOrigin,o=new o$1p;o$1p.subtract(y.positionWC,n,o);var a=new p$1d;p$1d.clone(y.inverseViewMatrix,a),p$1d.setTranslation(a,o,a),p$1d.inverse(a,e._viewMatrix),p$1d.clone(y.frustum.projectionMatrix,e._projMatrix)}for(var s=0;s<r.layers._layerQueue.length;s++){var l=r.layers._layerQueue[s];E[s]=l.clipLineColor,l.clipLineColor=new e$1X(1,1,1,1),l.setCustomClipBox(t.clipOptions)}r.globe.showSkirts=!1,r.globe.backFaceCulling=!1,r.globe.setCustomClipBox(t.clipOptions)},t.depthBuffer._endFunc=function(){if(t.downOblique||t.leftOblique){var n=i.uniformState,o=p$1d.clone(n.inverseViewProjection),a=p$1d.clone(n.viewProjection),s=o$1o.clone(n.currentFrustum),l=n.log2FarDepthFromNearPlusOne;i.readPixelsAsync({framebuffer:t.depthBuffer.framebuffer}).then((n=>{var r={invViewProjection:o,viewProjection:a,currentFrustum:s,log2FarDepthFromNearPlusOne:l,depthData:n,useWebGPU:i.webgpu};_0x2de012(e,r),t.leftOblique&&t.downOblique&&(_0x1834e4(e),!e._isGetPositions&&e._func(e._dataBuffer),e._isGetPositions&&e._getPositionsFunc(e._positions))}))}y.setView({destination:T,orientation:{heading:C,pitch:S,roll:y.roll},convert:!1}),y.frustum.near=v,y.frustum.far=$,y.frustum.fov=b,y.frustum.aspectRatio=w,t.depthBuffer.isUpdate=!1;for(var u=0;u<r.layers._layerQueue.length;u++){var c=r.layers._layerQueue[u];c.clipLineColor=E[u],c.clearCustomClipBox()}r.globe.clearCustomClipBox(),r.globe.showSkirts=P,r.globe.backFaceCulling=A}}function _0x7ba088(e,t,i){return e._scene.mode===C$14.SCENE3D?o$1p.normalize(t,i):(o$1p.subtract(t,e._oriPos,i),o$1p.normalize(i,i)),i}function _0x4a8812(e){var t=e.x;e.x=e.z,e.z=e.y,e.y=t}function _0x511e27(e,t,i){_0x5bf48f(e,t,i),_0x41a8f5(e,t);var n=o$1p.magnitude(e._v3ProfileDir);e._bManualChangeExtendHeight||(e._extendHeight=n);var r=e._extendHeight,o=Math.sqrt(2),a=n/e._textureWidth*o;a<.1&&(a=.1);var s=new o$1p;s.x=.5*(e.startPoint[0]+e.endPoint[0]),s.y=.5*(e.startPoint[1]+e.endPoint[1]),s.z=.5*(e.startPoint[2]+e.endPoint[2]);var l=[],u=[],c=new o$1p,h=e._v3ProfileNormal.clone(),d=o$1p.negate(h,new o$1p);u.push(d),o$1p.multiplyByScalar(e._v3ProfileNormal,a,c),o$1p.add(e._v3MiddlePosition,c,c),o$1p.subtract(c,t._relativeOrigin,c),l.push(c);var f=e._v3ProfileNormal.clone();f=o$1p.negate(f,f),d=o$1p.negate(f,new o$1p),u.push(d);var p=new o$1p;o$1p.multiplyByScalar(f,a,p),o$1p.add(e._v3MiddlePosition,p,p),o$1p.subtract(p,t._relativeOrigin,p),l.push(p),e._scene.mode!==C$14.SCENE3D&&(_0x4a8812(h),_0x4a8812(f),_0x4a8812(c),_0x4a8812(p));var _={planePos:l,planeNormal:u,clipMode:"clip_behind_any_plane"};_0x10bd10(e,{downOblique:!1,leftOblique:!1,secondDrawing:!1,cameraWidth:10*a,depthBuffer:e._depthBuffer,clipOptions:_},t,i);var m=(a+.5*r)/o;_0x10bd10(e,{downOblique:!0,leftOblique:!1,secondDrawing:!1,cameraWidth:m,depthBuffer:e._depthDownBuffer,clipOptions:_},t,i),_0x10bd10(e,{downOblique:!0,leftOblique:!1,secondDrawing:!0,cameraWidth:m,depthBuffer:e._depthDownReverBuffer,clipOptions:_},t,i),_0x10bd10(e,{downOblique:!1,leftOblique:!0,secondDrawing:!1,cameraWidth:m=(a+.5*n)/o,depthBuffer:e._depthLeftBuffer,clipOptions:_},t,i),_0x10bd10(e,{downOblique:!1,leftOblique:!0,secondDrawing:!0,cameraWidth:m,depthBuffer:e._depthLeftReverBuffer,clipOptions:_},t,i),_0x10bd10(e,{downOblique:!0,leftOblique:!0,secondDrawing:!1,cameraWidth:a,depthBuffer:e._depthTopBuffer,clipOptions:_},t,i)}function e$1Q(){this._array=[],this._hash={}}function f$Z(){this._bounds=new e$2c,this._command=void 0,this._geometry=void 0,this.heightBuffer=void 0,this.colorBuffer=void 0}_0x2e32eb(),Object.defineProperties(_0x3c54f4.prototype,{startPoint:{get:function(){return this._startPoint3D},set:function(e){this._startPoint3D=e,this._update=!0}},endPoint:{get:function(){return this._endPoint3D},set:function(e){this._endPoint3D=e,this._update=!0}},extendHeight:{get:function(){return this._extendHeight},set:function(e){this._extendHeight=e,this._bManualChangeExtendHeight=!0,this._update=!0}}}),_0x3c54f4.prototype.getPositions=function(e){this._positions=[],this._isGetPositions=!0,this._getPositionsFunc=function(t){e(t),this._isGetPositions=!1},this._update=!0},_0x3c54f4.prototype.update=function(e,t,i){LicenseChecker.LICENSECHECKER.verify("Profile"),!t._fboState.enabled&&this._update&&(this._frameState=t,e$2e(this._depthBuffer)||(this._depthBuffer=new s$U(e),this._depthBuffer.environmentVisible.isObjectVisible=!0,this._depthBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthBuffer.environmentVisible.isGlobalVisible=!0,this._depthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._name]=this._depthBuffer),e$2e(this._depthDownBuffer)||(this._depthDownBuffer=new s$U(e),this._depthDownBuffer.environmentVisible.isObjectVisible=!0,this._depthDownBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthDownBuffer.environmentVisible.isGlobalVisible=!0,this._depthDownBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._downName]=this._depthDownBuffer),e$2e(this._depthDownReverBuffer)||(this._depthDownReverBuffer=new s$U(e),this._depthDownReverBuffer.environmentVisible.isObjectVisible=!0,this._depthDownReverBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthDownReverBuffer.environmentVisible.isGlobalVisible=!0,this._depthDownReverBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._downReverName]=this._depthDownReverBuffer),e$2e(this._depthLeftBuffer)||(this._depthLeftBuffer=new s$U(e),this._depthLeftBuffer.environmentVisible.isObjectVisible=!0,this._depthLeftBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthLeftBuffer.environmentVisible.isGlobalVisible=!0,this._depthLeftBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._leftName]=this._depthLeftBuffer),e$2e(this._depthLeftReverBuffer)||(this._depthLeftReverBuffer=new s$U(e,this._scene.farToNearRatio),this._depthLeftReverBuffer.environmentVisible.isObjectVisible=!0,this._depthLeftReverBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthLeftReverBuffer.environmentVisible.isGlobalVisible=!0,this._depthLeftReverBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._leftReverName]=this._depthLeftReverBuffer),e$2e(this._depthTopBuffer)||(this._depthTopBuffer=new s$U(e),this._depthTopBuffer.environmentVisible.isObjectVisible=!0,this._depthTopBuffer.environmentVisible.isOnlyS3MObjectVisible=!0,this._depthTopBuffer.environmentVisible.isGlobalVisible=!0,this._depthTopBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._topName]=this._depthTopBuffer),this._update=!1,_0x511e27(this,e,t))},_0x3c54f4.prototype.getBuffer=function(e){this._func=e},_0x3c54f4.prototype.build=function(){""===this._name&&(this._name="profile"+this._scene._analyst3D._layerIndex,this._downName=this._name+"_down",this._downReverName=this._name+"_downRever",this._leftName=this._name+"_left",this._leftReverName=this._name+"_leftRever",this._topName=this._name+"_top",this._scene._analyst3D.add(this))},_0x3c54f4.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,e$2e(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport),e$2e(this._depthDownBuffer)&&(this._depthDownBuffer._visibleViewport=this._visibleViewport),e$2e(this._depthDownReverBuffer)&&(this._depthDownReverBuffer._visibleViewport=this._visibleViewport),e$2e(this._depthLeftBuffer)&&(this._depthLeftBuffer._visibleViewport=this._visibleViewport),e$2e(this._depthLeftReverBuffer)&&(this._depthLeftReverBuffer._visibleViewport=this._visibleViewport),e$2e(this._depthTopBuffer)&&(this._depthTopBuffer._visibleViewport=this._visibleViewport)},_0x3c54f4.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0x3c54f4.prototype.destroy=function(){return e$2e(this._frameState)&&(e$2e(this._depthBuffer)&&delete this._frameState._framebufferList[this._name],e$2e(this._depthDownBuffer)&&delete this._frameState._framebufferList[this._downName],e$2e(this._depthDownReverBuffer)&&delete this._frameState._framebufferList[this._downReverName],e$2e(this._depthLeftBuffer)&&delete this._frameState._framebufferList[this._leftName],e$2e(this._depthLeftReverBuffer)&&delete this._frameState._framebufferList[this._leftReverName],e$2e(this._depthTopBuffer)&&delete this._frameState._framebufferList[this._topName],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),this._depthDownBuffer=this._depthDownBuffer&&this._depthDownBuffer.destroy(),this._depthDownReverBuffer=this._depthDownReverBuffer&&this._depthDownReverBuffer.destroy(),this._depthLeftBuffer=this._depthLeftBuffer&&this._depthLeftBuffer.destroy(),this._depthLeftReverBuffer=this._depthLeftReverBuffer&&this._depthLeftReverBuffer.destroy(),this._depthTopBuffer=this._depthTopBuffer&&this._depthTopBuffer.destroy(),this._depthValue=null,this._dataBuffer=null,this._func=void 0,this._scene._analyst3D.remove(this._name,!0),i$11(this)},Object.defineProperties(e$1Q.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}}),e$1Q.prototype.contains=function(e){if("string"!=typeof e&&"number"!=typeof e)throw new t$15("key is required to be a string or number.");return e$2e(this._hash[e])},e$1Q.prototype.set=function(e,t){if("string"!=typeof e&&"number"!=typeof e)throw new t$15("key is required to be a string or number.");t!==this._hash[e]&&(this.remove(e),this._hash[e]=t,this._array.push(t))},e$1Q.prototype.get=function(e){if("string"!=typeof e&&"number"!=typeof e)throw new t$15("key is required to be a string or number.");return this._hash[e]},e$1Q.prototype.remove=function(e){if(e$2e(e)&&"string"!=typeof e&&"number"!=typeof e)throw new t$15("key is required to be a string or number.");var t=this._hash[e],i=e$2e(t);if(i){var n=this._array;n.splice(n.indexOf(t),1),delete this._hash[e]}return i},e$1Q.prototype.removeAll=function(){var e=this._array;e.length>0&&(this._hash={},e.length=0)},e$1Q.clone=function(e,t){if(e$2e(e)){for(var i in e$2e(t)?t.removeAll():t=new e$1Q,e._hash)e._hash.hasOwnProperty(i)&&t.set(i,e._hash[i]);return t}},f$Z.prototype.destroy=function(){delete this._bounds,this._bounds=null,e$2e(this._command)&&(this._command.vertexArray=this._command.vertexArray&&!this._command.vertexArray.isDestroyed()&&this._command.vertexArray.destroy(),this._command.shaderProgram=this._command.shaderProgram&&!this._command.shaderProgram.isDestroyed()&&this._command.shaderProgram.destroy(),this._command=null);var e=this.colorBuffer;e$2e(e)&&e.destroy(),this.colorBuffer=void 0;var t=this.heightBuffer;e$2e(t)&&t.destroy(),this.heightBuffer=void 0,this._geometry=null},f$Z.updateGeometry=function(e,t,i,n){if(e$2e(e))for(var r=new n$1d,o=r.ellipsoid,a=new a$18,s=e.attributes.position,l=new o$1p,u=s.values,c=0;c<u.length;c+=3)l.x=u[c],l.y=u[c+1],l.z=u[c+2],n&&(o.cartesianToCartographic(l,a),r.project(a,l),l=o$1p.fromElements(l.z,l.x,l.y)),p$1d.multiplyByPoint(i,l,l),u[c]=l.x,u[c+1]=l.y,u[c+2]=l.z},f$Z.updateGeoBounds=function(e){for(var t=e.attributes.position.values,i=new e$2c(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),n=0;n<t.length;n+=3){var r=t[n],o=t[n+1];i.x=Math.min(r,i.x),i.y=Math.min(o,i.y),i.z=Math.max(r,i.z),i.w=Math.max(o,i.w)}return i};var A$17={ADD:de$y.FUNC_ADD,SUBTRACT:de$y.FUNC_SUBTRACT,REVERSE_SUBTRACT:de$y.FUNC_REVERSE_SUBTRACT,MIN:de$y.MIN,MAX:de$y.MAX},b$17=Object.freeze(A$17),_$T={ZERO:de$y.ZERO,ONE:de$y.ONE,SOURCE_COLOR:de$y.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:de$y.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:de$y.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:de$y.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:de$y.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:de$y.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:de$y.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:de$y.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:de$y.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:de$y.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:de$y.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:de$y.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:de$y.SRC_ALPHA_SATURATE},l$13=Object.freeze(_$T),t$T={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.SOURCE_ALPHA,functionSourceAlpha:l$13.ONE,functionDestinationRgb:l$13.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:l$13.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.ONE,functionSourceAlpha:l$13.ONE,functionDestinationRgb:l$13.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:l$13.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.SOURCE_ALPHA,functionSourceAlpha:l$13.ONE,functionDestinationRgb:l$13.ONE,functionDestinationAlpha:l$13.ONE})},Ee$r=Object.freeze(t$T),R$Z={ZERO:de$y.ZERO,KEEP:de$y.KEEP,REPLACE:de$y.REPLACE,INCREMENT:de$y.INCR,DECREMENT:de$y.DECR,INVERT:de$y.INVERT,INCREMENT_WRAP:de$y.INCR_WRAP,DECREMENT_WRAP:de$y.DECR_WRAP},n$_=Object.freeze(R$Z),A$16={NEVER:de$y.NEVER,LESS:de$y.LESS,EQUAL:de$y.EQUAL,LESS_OR_EQUAL:de$y.LEQUAL,GREATER:de$y.GREATER,NOT_EQUAL:de$y.NOTEQUAL,GREATER_OR_EQUAL:de$y.GEQUAL,ALWAYS:de$y.ALWAYS},m$Z=Object.freeze(A$16);function t$S(e,t,i){return o$1q.defined("url",e),t=u$Z(t,!0),(i=e$2e(i)?i:new r$1c).url=e,i.requestFunction=function(){var i;i=!(e$26(e)||!t)&&i$19(e);var n=o$1l.defer();return t$S.createImage(e,i,n),n.promise},r$1b.request(i)}t$S.createImage=function(e,t,i){var n=new Image;n.onload=function(){i.resolve(n)},n.onerror=function(e){i.reject(e)},t&&(u$W.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e},t$S.defaultCreateImage=t$S.createImage;var _0x57794c=(_0x2d9468=!0,function(e,t){var i=_0x2d9468?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d9468=!1,i}),_0x32aba8=_0x57794c(void 0,(function(){return _0x32aba8.toString().search("(((.+)+)+)+$").toString().constructor(_0x32aba8).search("(((.+)+)+)+$")})),_0x2d9468;_0x32aba8();var _0x56b405="attribute vec4 aPosition;\n\nvarying vec4 vClip_pos;\nvoid main()\n{\n\tvClip_pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n\tgl_Position = czm_depthClampFarPlane(vClip_pos);\n}",_0x256db1=(_0x48fc7c=!0,function(e,t){var i=_0x48fc7c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x48fc7c=!1,i}),_0x40e94c=_0x256db1(void 0,(function(){return _0x40e94c.toString().search("(((.+)+)+)+$").toString().constructor(_0x40e94c).search("(((.+)+)+)+$")})),_0x48fc7c;_0x40e94c();var _0x287c41="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform mat4 uRenderTextureMatrix;\nuniform vec2 uTexture1_size;\nuniform sampler2D uTexture1;\nuniform sampler2D uDiffuseTexture;\nuniform float uFeatheringScale;\nuniform vec3 uV3AffineX;\nuniform vec3 uV3AffineY;\n#ifdef CLIPPOLYGON\nuniform sampler2D uPolygonTexture;\nuniform mat4 uPolygonTextureMatrix;\nuniform float uPolygonMode;\n#endif\n\nvarying vec4 vClip_pos;\n\nconst float oldFeatureingRadius = 0.707;\nvec4 feathering(vec4 oldColor, vec2 texCoord){\n float disToCenter = length(texCoord - vec2(0.5));\n float roundRadius = oldFeatureingRadius * (1.0 - uFeatheringScale);\n float disToRoundBounds = disToCenter - roundRadius;\n float featheringAlpha = min(1.0, 1.0 - disToRoundBounds / (oldFeatureingRadius - roundRadius));\n return vec4(oldColor.rgb, featheringAlpha);\n}\nfloat getDepth(in vec4 depth)\n{\n\tfloat z_window = czm_unpackDepth(depth);\n#ifdef WEBGPU\n\treturn z_window;\n#else\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n#endif\n}\n\nfloat getDepthFromShadowMap(in vec2 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(uTexture1, t00));\n\tfloat z10 = getDepth(texture2D(uTexture1, t01));\n\tfloat z01 = getDepth(texture2D(uTexture1, t10));\n\tfloat z11 = getDepth(texture2D(uTexture1, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n#ifdef CLIPPOLYGON\nbool isClipValid(vec2 texcoord)\n{\n bool clipInside = (uPolygonMode < 0.5);\n if(clipInside)\n {\n return texture2D(uPolygonTexture, texcoord).r > 0.5;\n }\n else\n {\n return texture2D(uPolygonTexture, texcoord).r < 0.5;\n }\n}\n#endif\n\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n\tfloat sceneDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, depthTexCoord.xy));\n\tsceneDepth = czm_reverseLogDepth(sceneDepth);\n#ifndef WEBGPU\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n#endif\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\tvec4 viewPos = czm_inverseProjection * pos;\n\tvec4 renderTextureCoord = uRenderTextureMatrix * viewPos;\n\tvec4 ndcInDepthScene = renderTextureCoord / renderTextureCoord.w;\n\tvec2 texCoord = ndcInDepthScene.xy * 0.5 + 0.5;\n\tif(texCoord.x < 0.0 || texCoord.x > 1.0 || texCoord.y < 0.0 || texCoord.y > 1.0)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIPPOLYGON\n vec4 polygonTextureCoord = uPolygonTextureMatrix * viewPos;\n\tvec4 texCoordPolygon = polygonTextureCoord / polygonTextureCoord.w;\n\ttexCoordPolygon.xyz = texCoordPolygon.xyz * 0.5 + 0.5;\n\tif(texCoordPolygon.x < 0.0 || texCoordPolygon.x > 1.0 || texCoordPolygon.y < 0.0 || texCoordPolygon.y > 1.0)\n\t{\n\t\tdiscard;\n }\n\tif(!isClipValid(texCoordPolygon.xy))\n {\n discard;\n }\n#endif\n\tfloat depth = getDepthFromShadowMap(texCoord);\n\tif(depth + 0.00002 < ndcInDepthScene.z)\n\t{\n\t\tdiscard;\n\t}\n\tvec2 finalTexCoord = texCoord.xy;\n texCoord.x = uV3AffineX.x * finalTexCoord.x + uV3AffineX.y * finalTexCoord.y + uV3AffineX.z;\n texCoord.y = uV3AffineY.x * finalTexCoord.x + uV3AffineY.y * finalTexCoord.y + uV3AffineY.z;\n if(texCoord.x > 1.0 || texCoord.y > 1.0 || texCoord.x < 0.0 || texCoord.y < 0.0)\n {\n discard;\n }\n\tgl_FragColor = texture2D(uDiffuseTexture, texCoord.xy);\n\tgl_FragColor = feathering(gl_FragColor, texCoord.xy);\n\tgl_FragColor.rgb = czm_adjustColor(gl_FragColor.rgb);\n}",_0x4435e2=(_0xf9843f=!0,function(e,t){var i=_0xf9843f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf9843f=!1,i}),_0x34184e=_0x4435e2(void 0,(function(){return _0x34184e.toString().search("(((.+)+)+)+$").toString().constructor(_0x34184e).search("(((.+)+)+)+$")})),_0xf9843f;_0x34184e();var _0x1b488f={CLIP_INSIDE:0,CLIP_OUTSIDE:1},_0x454473=Object.freeze(_0x1b488f);function d$1f(e,t,i){return p$$({url:e,responseType:"document",headers:t,overrideMimeType:"text/xml",request:i})}var s$T=function(){this.xmldom=null};s$T.prototype.read=function(e){var t,i=e.indexOf("<");return i>0&&(e=e.substring(i)),DOMParser?(this.xmldom||(this.xmldom=new DOMParser),(t=this.xmldom).parseFromString(e,"text/xml")):(this.xmldom||(this.xmldom=new ActiveXObject("Microsoft.XMLDOM")),(t=this.xmldom).loadXML(e),t)},s$T.getElementsByTagNameNS=function(e,t,i){var n=[];if(e.getElementsByTagNameNS)n=e.getElementsByTagNameNS(t,i);else for(var r,o,a=e.getElementsByTagName("*"),s=0,l=a.length;s<l;++s)o=(r=a[s]).prefix?r.prefix+":"+i:i,("*"===i||o===r.nodeName)&&("*"===t||t===r.namespaceURI)&&n.push(r);return n},s$T.getAttributeNodeNS=function(e,t,i){var n=null;if(e.getAttributeNodeNS)n=e.getAttributeNodeNS(t,i);else for(var r,o=e.attributes,a=0,s=o.length;a<s;++a)if((r=o[a]).namespaceURI===t&&(r.prefix?r.prefix+":"+i:i)===r.nodeName){n=r;break}return n},s$T.getChildValue=function(e,t){var i=t||"";if(e)for(var n=e.firstChild;n;n=n.nextSibling)switch(n.nodeType){case 3:case 4:i+=n.nodeValue}return i},s$T.queryNumericAttribute=function(e,t){if(e$2e(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}},s$T.queryStringAttribute=function(e,t){if(e$2e(e)){var i=e.getAttribute(t);return null!==i?i:void 0}},s$T.queryBooleanAttribute=function(e,t){if(e$2e(e)){var i=e.getAttribute(t);if("false"===(i=i.toLowerCase()))return!1;if("true"===i)return!0}},s$T.queryFirstNode=function(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(i){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}},s$T.queryNodes=function(e,t,i){if(e$2e(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];i?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}},s$T.queryChildNodes=function(e,t,i){if(!e$2e(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];i?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n},s$T.queryNumericValue=function(e,t,i){var n=s$T.queryFirstNode(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}},s$T.queryStringValue=function(e,t,i){var n=s$T.queryFirstNode(e,t,i);if(e$2e(n))return n.textContent.trim()},s$T.queryBooleanValue=function(e,t,i){var n=s$T.queryFirstNode(e,t,i);if(e$2e(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}};var _0x563cb4=(_0x54c7c0=!0,function(e,t){var i=_0x54c7c0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x54c7c0=!1,i}),_0x4067d7=_0x563cb4(void 0,(function(){return _0x4067d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x4067d7).search("(((.+)+)+)+$")})),_0x54c7c0;_0x4067d7();var _0x3d43b9={ProjectToScene:0,ProjectToPlane:1},_0x403af5=Object.freeze(_0x3d43b9);function i$X(e){this.planes=u$Z(e,[])}var T$_=[new o$1p,new o$1p,new o$1p];o$1p.clone(o$1p.UNIT_X,T$_[0]),o$1p.clone(o$1p.UNIT_Y,T$_[1]),o$1p.clone(o$1p.UNIT_Z,T$_[2]);var I$1d=new o$1p,y$U=new o$1p,l$12=new o$1m(new o$1p(1,0,0),0);function l$11(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=u$Z(e.near,1),this._near=this.near,this.far=u$Z(e.far,5e8),this._far=this.far,this._cullingVolume=new i$X,this._orthographicMatrix=new p$1d}function q$15(e){if(!(e$2e(e.right)&&e$2e(e.left)&&e$2e(e.top)&&e$2e(e.bottom)&&e$2e(e.near)&&e$2e(e.far)))throw new t$15("right, left, top, bottom, near, or far parameters are not set.");if(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far){if(e.left>e.right)throw new t$15("right must be greater than left.");if(e.bottom>e.top)throw new t$15("top must be greater than bottom.");if(e.near>e.far)throw new t$15("near must be greater than zero and less than far.");e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=p$1d.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}i$X.fromBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("boundingSphere is required.");e$2e(t)||(t=new i$X);var i=T$_.length,n=t.planes;n.length=2*i;for(var r=e.center,o=e.radius,a=0,s=0;s<i;++s){var l=T$_[s],u=n[a],c=n[a+1];e$2e(u)||(u=n[a]=new e$2c),e$2e(c)||(c=n[a+1]=new e$2c),o$1p.multiplyByScalar(l,-o,I$1d),o$1p.add(r,I$1d,I$1d),u.x=l.x,u.y=l.y,u.z=l.z,u.w=-o$1p.dot(l,I$1d),o$1p.multiplyByScalar(l,o,I$1d),o$1p.add(r,I$1d,I$1d),c.x=-l.x,c.y=-l.y,c.z=-l.z,c.w=-o$1p.dot(o$1p.negate(l,y$U),I$1d),a+=2}return t},i$X.prototype.computeVisibility=function(e){if(!e$2e(e))throw new t$15("boundingVolume is required.");for(var t=this.planes,i=!1,n=0,r=t.length;n<r;++n){var o=e.intersectPlane(o$1m.fromCartesian4(t[n],l$12));if(o===Ae$w.OUTSIDE)return Ae$w.OUTSIDE;o===Ae$w.INTERSECTING&&(i=!0)}return i?Ae$w.INTERSECTING:Ae$w.INSIDE},i$X.prototype.computeVisibilityWithPlaneMask=function(e,t){if(!e$2e(e))throw new t$15("boundingVolume is required.");if(!e$2e(t))throw new t$15("parentPlaneMask is required.");if(t===i$X.MASK_OUTSIDE||t===i$X.MASK_INSIDE)return t;for(var i=i$X.MASK_INSIDE,n=this.planes,r=0,o=n.length;r<o;++r){var a=r<31?1<<r:0;if(!(r<31&&0==(t&a))){var s=e.intersectPlane(o$1m.fromCartesian4(n[r],l$12));if(s===Ae$w.OUTSIDE)return i$X.MASK_OUTSIDE;s===Ae$w.INTERSECTING&&(i|=a)}}return i},i$X.MASK_OUTSIDE=4294967295,i$X.MASK_INSIDE=0,i$X.MASK_INDETERMINATE=2147483647,Object.defineProperties(l$11.prototype,{projectionMatrix:{get:function(){return q$15(this),this._orthographicMatrix}}});var B$Y=new o$1p,M$12=new o$1p,P$_=new o$1p,s$S=new o$1p;function a$V(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._offCenterFrustum=new l$11,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=u$Z(e.near,1),this._near=this.near,this.far=u$Z(e.far,5e8),this._far=this.far}function o$18(e){if(!(e$2e(e.width)&&e$2e(e.aspectRatio)&&e$2e(e.near)&&e$2e(e.far)))throw new t$15("width, aspectRatio, near, or far parameters are not set.");var t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){if(e.aspectRatio<0)throw new t$15("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new t$15("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;var i=1/e.aspectRatio;t.right=.5*e.width,t.left=-t.right,t.top=i*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}l$11.prototype.computeCullingVolume=function(e,t,i){if(!e$2e(e))throw new t$15("position is required.");if(!e$2e(t))throw new t$15("direction is required.");if(!e$2e(i))throw new t$15("up is required.");var n=this._cullingVolume.planes,r=this.top,o=this.bottom,a=this.right,s=this.left,l=this.near,u=this.far,c=o$1p.cross(t,i,B$Y);o$1p.normalize(c,c);var h=M$12;o$1p.multiplyByScalar(t,l,h),o$1p.add(e,h,h);var d=P$_;o$1p.multiplyByScalar(c,s,d),o$1p.add(h,d,d);var f=n[0];return e$2e(f)||(f=n[0]=new e$2c),f.x=c.x,f.y=c.y,f.z=c.z,f.w=-o$1p.dot(c,d),o$1p.multiplyByScalar(c,a,d),o$1p.add(h,d,d),e$2e(f=n[1])||(f=n[1]=new e$2c),f.x=-c.x,f.y=-c.y,f.z=-c.z,f.w=-o$1p.dot(o$1p.negate(c,s$S),d),o$1p.multiplyByScalar(i,o,d),o$1p.add(h,d,d),e$2e(f=n[2])||(f=n[2]=new e$2c),f.x=i.x,f.y=i.y,f.z=i.z,f.w=-o$1p.dot(i,d),o$1p.multiplyByScalar(i,r,d),o$1p.add(h,d,d),e$2e(f=n[3])||(f=n[3]=new e$2c),f.x=-i.x,f.y=-i.y,f.z=-i.z,f.w=-o$1p.dot(o$1p.negate(i,s$S),d),e$2e(f=n[4])||(f=n[4]=new e$2c),f.x=t.x,f.y=t.y,f.z=t.z,f.w=-o$1p.dot(t,h),o$1p.multiplyByScalar(t,u,d),o$1p.add(e,d,d),e$2e(f=n[5])||(f=n[5]=new e$2c),f.x=-t.x,f.y=-t.y,f.z=-t.z,f.w=-o$1p.dot(o$1p.negate(t,s$S),d),this._cullingVolume},l$11.prototype.getPixelDimensions=function(e,t,i,n,r){if(q$15(this),!e$2e(e)||!e$2e(t))throw new t$15("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new t$15("drawingBufferWidth must be greater than zero.");if(t<=0)throw new t$15("drawingBufferHeight must be greater than zero.");if(!e$2e(i))throw new t$15("distance is required.");if(!e$2e(n))throw new t$15("pixelRatio is required.");if(n<=0)throw new t$15("pixelRatio must be greater than zero.");if(!e$2e(r))throw new t$15("A result object is required.");var o=n*(this.right-this.left)/e,a=n*(this.top-this.bottom)/t;return r.x=o,r.y=a,r},l$11.prototype.clone=function(e){return e$2e(e)||(e=new l$11),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},l$11.prototype.equals=function(e){return e$2e(e)&&e instanceof l$11&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},l$11.prototype.equalsEpsilon=function(e,t,i){return e===this||e$2e(e)&&e instanceof l$11&&e$2d.equalsEpsilon(this.right,e.right,t,i)&&e$2d.equalsEpsilon(this.left,e.left,t,i)&&e$2d.equalsEpsilon(this.top,e.top,t,i)&&e$2d.equalsEpsilon(this.bottom,e.bottom,t,i)&&e$2d.equalsEpsilon(this.near,e.near,t,i)&&e$2d.equalsEpsilon(this.far,e.far,t,i)},a$V.packedLength=4,a$V.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.width,t[i++]=e.aspectRatio,t[i++]=e.near,t[i]=e.far,t},a$V.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new a$V),i.width=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t],i},Object.defineProperties(a$V.prototype,{projectionMatrix:{get:function(){return o$18(this),this._offCenterFrustum.projectionMatrix}}}),a$V.prototype.computeCullingVolume=function(e,t,i){return o$18(this),this._offCenterFrustum.computeCullingVolume(e,t,i)},a$V.prototype.getPixelDimensions=function(e,t,i,n,r){return o$18(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n,r)},a$V.prototype.clone=function(e){return e$2e(e)||(e=new a$V),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},a$V.prototype.equals=function(e){return!!(e$2e(e)&&e instanceof a$V)&&(o$18(this),o$18(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},a$V.prototype.equalsEpsilon=function(e,t,i){return!!(e$2e(e)&&e instanceof a$V)&&(o$18(this),o$18(e),e$2d.equalsEpsilon(this.width,e.width,t,i)&&e$2d.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))};var s$R={},Z$10=new e$2c(0,0,0,1),v$N=new e$2c,J$_=new f$1a,M$11=new o$1o,j$17=new o$1o;s$R.wgs84ToWindowCoordinates=function(e,t,i){return s$R.wgs84WithEyeOffsetToWindowCoordinates(e,t,o$1p.ZERO,i)};var F$11=new e$2c,L$18=new o$1p;function P$Z(e,t,i,n){var r=i._scene.context.curFusionViewMatrix||i.viewMatrix,o=p$1d.multiplyByVector(r,e$2c.fromElements(e.x,e.y,e.z,1,F$11),F$11),a=o$1p.multiplyComponents(t,o$1p.normalize(o,L$18),L$18);return o.x+=t.x+a.x,o.y+=t.y+a.y,o.z+=a.z,p$1d.multiplyByVector(i.frustum.projectionMatrix,o,n)}var K$V=new a$18(Math.PI,e$2d.PI_OVER_TWO),Q$10=new o$1p,X$Y=new o$1p;s$R.wgs84WithEyeOffsetToWindowCoordinates=function(e,t,i,n){if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(t))throw new t$15("position is required.");var r=e.frameState,o=s$R.computeActualWgs84Position(r,t,Z$10);if(e$2e(o)){var a=e.canvas,s=J$_;s.x=0,s.y=0,s.width=a.clientWidth,s.height=a.clientHeight;var l=e.camera,u=!1;if(r.mode===C$14.SCENE2D){var c=e.mapProjection,h=K$V,d=c.project(h,Q$10),f=o$1p.clone(l.position,X$Y),p=l.frustum.clone(),_=p$1d.computeViewportTransformation(s,0,1,new p$1d),m=l.frustum.projectionMatrix,g=l.positionWC.y,x=o$1p.fromElements(e$2d.sign(g)*d.x-g,0,-l.positionWC.x),y=m$19.pointToGLWindowCoordinates(m,_,x);if(0===g||y.x<=0||y.x>=a.clientWidth)u=!0;else{if(y.x>.5*a.clientWidth){s.width=y.x,l.frustum.right=d.x-g,v$N=P$Z(o,i,l,v$N),s$R.clipToGLWindowCoordinates(s,v$N,M$11),s.x+=y.x,l.position.x=-l.position.x;var v=l.frustum.right;l.frustum.right=-l.frustum.left,l.frustum.left=-v,v$N=P$Z(o,i,l,v$N),s$R.clipToGLWindowCoordinates(s,v$N,j$17)}else{s.x+=y.x,s.width-=y.x,l.frustum.left=-d.x-g,v$N=P$Z(o,i,l,v$N),s$R.clipToGLWindowCoordinates(s,v$N,M$11),s.x=s.x-s.width,l.position.x=-l.position.x;var $=l.frustum.left;l.frustum.left=-l.frustum.right,l.frustum.right=-$,v$N=P$Z(o,i,l,v$N),s$R.clipToGLWindowCoordinates(s,v$N,j$17)}o$1p.clone(f,l.position),l.frustum=p.clone(),((n=o$1o.clone(M$11,n)).x<0||n.x>a.clientWidth)&&(n.x=j$17.x)}}if(r.mode!==C$14.SCENE2D||u){if((v$N=P$Z(o,i,l,v$N)).z<0&&!(l.frustum instanceof a$V)&&!(l.frustum instanceof l$11))return;n=s$R.clipToGLWindowCoordinates(s,v$N,n)}return n.y=a.clientHeight-n.y,n}},s$R.wgs84ToDrawingBufferCoordinates=function(e,t,i){if(e$2e(i=s$R.wgs84ToWindowCoordinates(e,t,i)))return s$R.transformWindowToDrawingBuffer(e,i,i)};var h$$=new o$1p,Y$O=new a$18;s$R.computeActualWgs84Position=function(e,t,i){var n=e.mode;if(n===C$14.SCENE3D)return o$1p.clone(t,i);var r=e.mapProjection,o=r.ellipsoid.cartesianToCartographic(t,Y$O);if(e$2e(o)){if(r.project(o,h$$),n===C$14.COLUMBUS_VIEW)return o$1p.fromElements(h$$.z,h$$.x,h$$.y,i);if(n===C$14.SCENE2D)return o$1p.fromElements(0,h$$.x,h$$.y,i);var a=e.morphTime;return o$1p.fromElements(e$2d.lerp(h$$.z,t.x,a),e$2d.lerp(h$$.x,t.y,a),e$2d.lerp(h$$.y,t.z,a),i)}};var O$M=new o$1p,N$X=new o$1p,_$S=new p$1d;s$R.clipToGLWindowCoordinates=function(e,t,i){return o$1p.divideByScalar(t,t.w,O$M),p$1d.computeViewportTransformation(e,0,1,_$S),p$1d.multiplyByPoint(_$S,O$M,N$X),o$1o.fromCartesian3(N$X,i)},s$R.transformWindowToDrawingBuffer=function(e,t,i){var n=e.canvas,r=e.drawingBufferWidth/n.clientWidth,o=e.drawingBufferHeight/n.clientHeight;return o$1o.fromElements(t.x*r,t.y*o,i)};var $$Z=new e$2c,G$1b=new e$2c;s$R.drawingBufferToWgs84Coordinates=function(e,t,i,n){var r=e.context,o=r.uniformState,a=o.currentFrustum,s=a.x,l=a.y;if(e.frameState.useLogDepth){var u=i*o.log2FarDepthFromNearPlusOne;i=l*(1-s/(Math.pow(2,u)-1+s))/(l-s)}var c=e._view.passState.viewport,h=e$2c.clone(e$2c.UNIT_W,$$Z);h.x=(t.x-c.x)/c.width*2-1,h.y=(t.y-c.y)/c.height*2-1,r.webgpu?h.z=i:h.z=2*i-1,h.w=1;var d,f=e.camera.frustum;if(e$2e(f.fovy)){var p=1/(d=p$1d.multiplyByVector(o.inverseViewProjection,h,G$1b)).w;o$1p.multiplyByScalar(d,p,d)}else e$2e(f._offCenterFrustum)&&(f=f._offCenterFrustum),(d=G$1b).x=.5*(h.x*(f.right-f.left)+f.left+f.right),d.y=.5*(h.y*(f.top-f.bottom)+f.bottom+f.top),d.z=.5*(h.z*(s-l)-s-l),d.w=1,d=p$1d.multiplyByVector(o.inverseView,d,d);return d.x+=r.relativeOrigin.x,d.y+=r.relativeOrigin.y,d.z+=r.relativeOrigin.z,o$1p.fromCartesian4(d,n)},s$R.convert2DToCartesian=function(e,t){if(t){var i=t.x,n=t.y;i>20037508.342789244&&(i-=20037508.342789244*Math.floor(i/20037508.342789244)),n>10018754.171394622&&(n-=20037508.342789244*Math.floor((n+10018754.171394622)/20037508.342789244)),t.x=i,t.y=n}var r=e.mapProjection,o=r.ellipsoid,a=new o$1p,s=new a$18,l=r.unproject(t,s);return o.cartographicToCartesian(l,a),a};var _0x4ba172=(_0x41543a=!0,function(e,t){var i=_0x41543a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41543a=!1,i}),_0x82fa20=_0x4ba172(void 0,(function(){return _0x82fa20.toString().search("(((.+)+)+)+$").toString().constructor(_0x82fa20).search("(((.+)+)+)+$")})),_0x41543a;function _0x337a3e(e){if(!e$2e(e))throw new t$15("scene are required.");if(!e.context.depthTexture)throw new t$15("the depth buffer is not supported.");this._scene=e,this._cameraDepthBuffer=void 0,this._clearStencilCommand=new t$W({stencil:0}),this._clearStencilCommand.pass=Le$q.ANALYSIS,this._lineCommand=void 0,this._stencilCommand=void 0,this._colorCommand=void 0,this._boundingSphere=new i$1d,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._roll=0,this._horizontalFov=90,this._verticalFov=60,this._distance=200,this._hintLineColor=new e$2c(1,1,1,1),this._hintLineVisible=!0,this._texture=void 0,this._segmentCount=20,this._invertViewMatrix=new p$1d,this._viewProjMatrix=new p$1d,this._renderTextureMatrix=new p$1d,this._update=!0,this._id=0,this._name="",this._cameraName="",this._visibleViewport=4095,this._video=void 0,this._hasExcavation=!1,this._polygonTexture=void 0,this._polygonRegions=new e$1Q,this._polygonTextureMatrix=new p$1d,this._polygonViewProjMatrix=new p$1d,this._polygonUpdate=!1,this._polygonMode=_0x454473.CLIP_OUTSIDE,this._brightness=1,this._contrast=1,this._hue=0,this._saturation=1,this._gamma=1,this._featheringScale=0,this._v3AffineX=new o$1p(1,0,0),this._v3AffineY=new o$1p(0,1,0),this._visible=!0,this._boundingSphereFromXML=void 0,this._visibleDistanceMax=500,this._mode=_0x403af5.ProjectToScene,this._planeRegions=void 0,this._projectEvent=new o$1h,this._projectPlaneOffset=1,this._guid=e$1T(),this._fusionAlpha=1,this._minDepth=.9999}function _0x3d42bd(e){e$2e(e._stencilCommand)&&(e._stencilCommand.vertexArray=e._stencilCommand.vertexArray&&e._stencilCommand.vertexArray.destroy(),e._stencilCommand.shaderProgram=e._stencilCommand.shaderProgram&&e._stencilCommand.shaderProgram.destroy(),e._stencilCommand=void 0),e$2e(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),e$2e(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0),e$2e(e._planeCommand)&&(e._planeCommand.vertexArray=e._planeCommand.vertexArray&&e._planeCommand.vertexArray.destroy(),e._planeCommand.shaderProgram=e._planeCommand.shaderProgram&&e._planeCommand.shaderProgram.destroy(),e._planeCommand=void 0)}function _0x3480f4(e,t,i){var n=e._horizontalFov*e$2d.RADIANS_PER_DEGREE,r=e._verticalFov*e$2d.RADIANS_PER_DEGREE,o=Math.tan(.5*n)/Math.tan(.5*r);e._distance;var a=Math.max(e._distance,10),s=e._direction*e$2d.RADIANS_PER_DEGREE,l=e._pitch*e$2d.RADIANS_PER_DEGREE,u=e._roll*e$2d.RADIANS_PER_DEGREE,c=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0],h=i.camera,d=h.frustum.aspectRatio,f=h.frustum.fov,p=h.frustum.near,_=h.frustum.far,m=new o$1p,g=h.heading,x=h.pitch,y=h.roll;o$1p.clone(h.position,m),e._cameraDepthBuffer.isUpdate=!0;var v=i.useLogDepth;e._cameraDepthBuffer._beginFunc=function(){i.useLogDepth=!1,d=h.frustum.aspectRatio,f=h.frustum.fov,p=h.frustum.near,_=h.frustum.far,g=h.heading,x=h.pitch,y=h.roll,o$1p.clone(h.position,m),h.frustum.aspectRatio=o,h.frustum.fov=o>=1?n:r,h.frustum.near=1,h.frustum.far=a,v&&(h.frustum.near=.1,h.frustum.far=1e8),h.setView({destination:c,orientation:{heading:s,pitch:l,roll:u}}),p$1d.multiply(h.frustum.projectionMatrix,h.viewMatrix,e._viewProjMatrix),p$1d.clone(h.inverseViewMatrix,e._invertViewMatrix),o$1p.clone(o$1p.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,i$1d.transform(e._boundingSphere,e._invertViewMatrix,e._boundingSphere)},e._cameraDepthBuffer._endFunc=function(){h.setView({destination:m,orientation:{heading:g,pitch:x,roll:y},convert:!1}),h.frustum.aspectRatio=d,h.frustum.fov=f,h.frustum.near=p,h.frustum.far=_,i.useLogDepth=v,e._cameraDepthBuffer.isUpdate=!1}}_0x82fa20(),Object.defineProperties(_0x337a3e.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},roll:{get:function(){return this._roll},set:function(e){this._roll=e,this._update=!0}},horizontalFov:{get:function(){return this._horizontalFov},set:function(e){this._horizontalFov=e,this._update=!0}},verticalFov:{get:function(){return this._verticalFov},set:function(e){this._verticalFov=e,this._update=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$15("the distance is greater than 0.0");this._distance=e,this._update=!0}},featheringScale:{get:function(){return this._featheringScale},set:function(e){if(e<0||e>1)throw new t$15("the distance is greater than 0.0 an less than 1.0");this._featheringScale=e}},hintLineColor:{get:function(){var e=new e$1X;return e.red=this._hintLineColor.x,e.green=this._hintLineColor.y,e.blue=this._hintLineColor.z,e.alpha=this._hintLineColor.w,e},set:function(e){this._hintLineColor.x=e.red,this._hintLineColor.y=e.green,this._hintLineColor.z=e.blue,this._hintLineColor.w=e.alpha}},hintLineVisible:{get:function(){return this._hintLineVisible},set:function(e){this._hintLineVisible=e}},brightness:{get:function(){return this._brightness},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.brightness",e,0),this._brightness=e}},contrast:{get:function(){return this._contrast},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.contrast",e,0),this._contrast=e}},hue:{get:function(){return this._hue},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.hue",e,0),this._hue=e}},saturation:{get:function(){return this._saturation},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("ProjectionImage.saturation",e,0),this._saturation=e}},gamma:{get:function(){return this._gamma},set:function(e){o$1q.typeOf.number.greaterThan("ProjectionImage.gamma",e,0),this._gamma=e}},visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("ProjectionImage.visible",e),this._visible=e}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){o$1q.typeOf.number("ProjectionImage.visibleDistance",e),this._visibleDistanceMax=e}},mode:{get:function(){return this._mode},set:function(e){this._mode=e}},projectEvent:{get:function(){return this._projectEvent}},fusionAlpha:{get:function(){return this._fusionAlpha},set:function(e){this._fusionAlpha=e}}});var _0x1152f2=new e$2c,_0x2a0e7d=new e$2c(1,1/255,1/65025,1/16581375);function _0x3c0965(e,t,i,n,r,o){var a=t.context.readPixels({x:i,y:n,width:1,height:1,framebuffer:e._cameraDepthBuffer._framebuffer}),s=e$2c.unpack(a,0,_0x1152f2);e$2c.divideByScalar(s,255,s);var l=e$2c.dot(s,_0x2a0e7d);0!==l?e._minDepth=Math.min(e._minDepth,l):l=e._minDepth;var u=new e$2c(r,o,2*l-1,1),c=new e$2c,h=p$1d.inverse(e._viewProjMatrix,new p$1d),d=p$1d.multiplyByVector(h,u,c),f=1/d.w;return o$1p.multiplyByScalar(d,f,d)}function _0x3155cf(e,t){var i=e._scene,n=i.screenSpaceCameraController;n.enableFusion||(n.enableFusion=!0),e$2e(t.curFusionViewMatrix)||(t.curFusionViewMatrix=p$1d.clone(t.uniformState.view,new p$1d));var r=_0x3c0965(e,i,0,0,-1,-1),o=_0x3c0965(e,i,i.drawingBufferWidth-1,0,1,-1),a=_0x3c0965(e,i,i.drawingBufferWidth-1,i.drawingBufferHeight-1,1,1),s=_0x3c0965(e,i,0,i.drawingBufferHeight-1,-1,1);if(s$R.wgs84ToDrawingBufferCoordinates(i,r,r),s$R.wgs84ToDrawingBufferCoordinates(i,o,o),s$R.wgs84ToDrawingBufferCoordinates(i,a,a),s$R.wgs84ToDrawingBufferCoordinates(i,s,s),e$2e(r)&&e$2e(o)&&e$2e(a)&&e$2e(s)){e$2e(n.panOffset)&&(r.x+=n.panOffset.x,o.x+=n.panOffset.x,a.x+=n.panOffset.x,s.x+=n.panOffset.x,r.y+=n.panOffset.y,o.y+=n.panOffset.y,a.y+=n.panOffset.y,s.y+=n.panOffset.y),n.zoomDirty=!1,n.panDirty=!1;for(var l=[r.x,r.y,o.x,o.y,a.x,a.y,s.x,s.y],u=i.drawingBufferWidth,c=i.drawingBufferHeight,h=0,d=l.length;h<d;h++){var f=l[h];f=2*(f=h%2==0?f/u:1-f/c)-1,l[h]=f}var p=new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:l}),textureCoordinates:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:W$18.TRIANGLES}),_=new i$$({vertexArray:c$13.fromGeometry({context:t,geometry:p,attributeLocations:{position:0,textureCoordinates:1},bufferUsage:A$18.STATIC_DRAW,interleave:!0}),primitiveType:W$18.TRIANGLES,renderState:d$1m.fromCache({blending:Ee$r.ALPHA_BLEND}),shaderProgram:r$14.fromCache({name:"ProjectionImagePlane",context:t,vertexShaderSource:"\n attribute vec4 position;\n attribute vec2 textureCoordinates;\n varying vec2 v_textureCoordinates;\n void main() \n {\n gl_Position = position;\n v_textureCoordinates = textureCoordinates;\n }\n ",fragmentShaderSource:"\n uniform sampler2D u_Texture;\n uniform float uFusionAlpha;\n varying vec2 v_textureCoordinates;\n void main()\n {\n gl_FragColor = texture2D(u_Texture, v_textureCoordinates);\n gl_FragColor.a = uFusionAlpha;\n }\n ",attributeLocations:{position:0,textureCoordinates:1}}),uniformMap:{u_Texture:function(){return e._texture},uFusionAlpha:function(){return e._fusionAlpha}},owner:e});_.pass=Le$q.OVERLAY_AGAINST_DEPTH,e._planeCommand=_}}function _0x6cb510(e,t,i){for(var n=(e._segmentCount+1)*(e._segmentCount+1)+1,r=S$14.createTypedArray(S$14.FLOAT,3*n),o=3,a=e._horizontalFov*e$2d.RADIANS_PER_DEGREE,s=e._verticalFov*e$2d.RADIANS_PER_DEGREE,l=Math.tan(.5*a),u=Math.tan(.5*s),c=(e._distance,e._distance*u),h=Math.PI-.5*a,d=0,f=0,p=a/e._segmentCount,_=0;_<e._segmentCount+1;_++){d=h+_*p;for(var m=c/(e._distance/Math.cos(d)),g=Math.atan(m),x=-g,y=2*g/e._segmentCount,v=0;v<e._segmentCount+1;v++)f=x+v*y,r[o++]=e._distance*Math.cos(f)*Math.sin(d),r[o++]=e._distance*Math.sin(f),r[o++]=e._distance*Math.cos(f)*Math.cos(d)}var $=2*(4+5*e._segmentCount+2*e._segmentCount*3),b=e._segmentCount*e._segmentCount*3*2+3*e._segmentCount*4,T=S$14.createTypedArray(S$14.UNSIGNED_SHORT,$),C=S$14.createTypedArray(S$14.UNSIGNED_SHORT,b),S=0;for(_=0;_<e._segmentCount;_++)for(v=0;v<e._segmentCount;v++)C[S++]=1+_+v*(e._segmentCount+1),C[S++]=1+_+1+v*(e._segmentCount+1),C[S++]=1+_+(v+1)*(e._segmentCount+1),C[S++]=1+_+1+v*(e._segmentCount+1),C[S++]=1+_+1+(v+1)*(e._segmentCount+1),C[S++]=1+_+(v+1)*(e._segmentCount+1);for(_=0;_<e._segmentCount;_++)C[S++]=_+1+1,C[S++]=_+1,C[S++]=0,C[S++]=0,C[S++]=_+e._segmentCount*(e._segmentCount+1)+1,C[S++]=_+1+e._segmentCount*(e._segmentCount+1)+1;for(_=0;_<e._segmentCount;_++)C[S++]=0,C[S++]=_*(e._segmentCount+1)+1,C[S++]=(_+1)*(e._segmentCount+1)+1,C[S++]=e._segmentCount+(_+1)*(e._segmentCount+1)+1,C[S++]=e._segmentCount+_*(e._segmentCount+1)+1,C[S++]=0;S=0,T[S++]=0,T[S++]=1,T[S++]=0,T[S++]=e._segmentCount+1,T[S++]=0,T[S++]=e._segmentCount*(e._segmentCount+1)+1,T[S++]=0,T[S++]=(e._segmentCount+1)*(e._segmentCount+1);for(_=0;_<5;_++)for(v=0;v<e._segmentCount;v++)T[S++]=1+v+5*(e._segmentCount+1)*_,T[S++]=1+(v+1)+5*(e._segmentCount+1)*_;for(_=0;_<5;_++)for(v=0;v<e._segmentCount;v++)T[S++]=1+(e._segmentCount+1)*v+5*_,T[S++]=1+(e._segmentCount+1)*(v+1)+5*_;var w=t$X.createVertexBuffer({context:t,typedArray:r,usage:A$18.STATIC_DRAW}),E=[],P={aPosition:0};e._attributeLocations=P,E.push({name:"aPosition",index:P.aPosition,vertexBuffer:w,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var A=t$X.createIndexBuffer({context:t,typedArray:T,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),L=t$X.createIndexBuffer({context:t,typedArray:C,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});e._lineCommand=new i$$({primitiveType:W$18.LINES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!0}),e._lineCommand.vertexArray=new c$13({context:t,attributes:E,indexBuffer:A}),e._lineCommand.shaderProgram=r$14.fromCache({name:"ProjectionImageLine",context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:P}),e._lineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var M=[];for(_=0;_<6;_++)M[_]=new e$2c(0,0,0,0);e._lineCommand.uniformMap={uDiffuseColor:function(){return e._hintLineColor},clip_mode:function(){return 0},clip_planes:function(){return M},clip_line_color:function(){return e$2c.UNIT_W}},e._stencilCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ProjectionImage,owner:e,cull:!0}),e._stencilCommand.vertexArray=new c$13({context:t,attributes:E,indexBuffer:L}),e._stencilCommand.shaderProgram=r$14.fromCache({name:"ProjectionImageStencil",context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:P});var R=e._mode===_0x403af5.ProjectToPlane?{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},reference:0,mask:1}:{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.INCREMENT_WRAP},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:65535};e._stencilCommand.renderState=d$1m.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:R,stencilMask:1}),e._stencilCommand.uniformMap={uDiffuseColor:function(){return e$2c.UNIT_W},clip_mode:function(){return 0},clip_planes:function(){return M},clip_line_color:function(){return e$2c.UNIT_W}},e._colorCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ProjectionImage,owner:e,cull:!0}),e._colorCommand.vertexArray=new c$13({context:t,attributes:E,indexBuffer:L});var O=new s$V({name:"ViewShedAnalysisVp",sources:[_0x56b405]});e._colorCommand.shaderProgram=r$14.fromCache({name:"ProjectionImageColor",context:t,vertexShaderSource:O,fragmentShaderSource:_0x287c41,attributeLocations:P}),R=e._mode===_0x403af5.ProjectToPlane?{enabled:!0,frontFunction:m$Z.EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:3,mask:3}:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.NOT_EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:65535},e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:R,blending:Ee$r.ALPHA_BLEND}),e._colorCommand.uniformMap={uRenderTextureMatrix:function(){return e._renderTextureMatrix},uPolygonTextureMatrix:function(){return e._polygonTextureMatrix},uTexture1_size:function(){var t=e._cameraDepthBuffer.depthTexture;return new o$1o(t.width,t.height)},uTexture1:function(){return e._cameraDepthBuffer.depthTexture},uDiffuseTexture:function(){return e._texture},uPolygonTexture:function(){return e._polygonTexture},uPolygonMode:function(){return e._polygonMode},uBrightness:function(){return e._brightness},uContrast:function(){return e._contrast},uHue:function(){return e._hue},uSaturation:function(){return e._saturation},uOneOverGamma:function(){return 1/e._gamma},uFeatheringScale:function(){return e._featheringScale},uV3AffineX:function(){return e._v3AffineX},uV3AffineY:function(){return e._v3AffineY}}}function _0x895bc8(e,t,i){return o$1p.distance(e.positionWC,t.center)>i||e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC).computeVisibility(t)===Ae$w.OUTSIDE}function _0x3dee3a(e){var t=s$T.queryStringValue(e,"VideoName"),i=s$T.queryFirstNode(e,"Fov"),n=s$T.queryNumericValue(i,"Horizontal"),r=s$T.queryNumericValue(i,"Vertical"),o=s$T.queryNumericValue(e,"Distance"),a=s$T.queryNumericValue(e,"Heading"),s=s$T.queryNumericValue(e,"Pitch"),l=s$T.queryNumericValue(e,"Roll"),u=s$T.queryFirstNode(e,"ViewPosition"),c=[0,0,0];c[0]=s$T.queryNumericValue(u,"X"),c[1]=s$T.queryNumericValue(u,"Y"),c[2]=s$T.queryNumericValue(u,"Z");var h=s$T.queryFirstNode(e,"Matrix"),d=s$T.queryStringValue(h,"U"),f=s$T.queryStringValue(h,"V");s$T.queryStringValue(h,"W");var p=d.split(","),_=new o$1p(parseFloat(p[0]),parseFloat(p[1]),parseFloat(p[2])),m=f.split(","),g=new o$1p(parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])),x=s$T.queryFirstNode(e,"Bounds"),y=void 0;if(x){var v=e$2d.toRadians(s$T.queryNumericValue(x,"Left")),$=e$2d.toRadians(s$T.queryNumericValue(x,"Top")),b=e$2d.toRadians(s$T.queryNumericValue(x,"Right")),T=new h$18(v,e$2d.toRadians(s$T.queryNumericValue(x,"Bottom")),b,$),C=o*Math.cos(e$2d.toRadians(s));C=s<0?-C:C;var S=c[2]+C;y=i$1d.fromRectangle3D(T,void 0,S)}return{videoName:t,viewPosition:c,heading:a,pitch:s,roll:l,horizontalFov:n,verticalFov:r,matrixU:_,matrixV:g,distance:o,boundingSphere:y}}function _0x1eb5d1(e,t){var i=document.getElementById("projection-image");e$2e(i)||((i=document.createElement("div")).setAttribute("id","projection-image"),document.body.appendChild(i));var n=document.createElement("video");return n.style="visibility:hidden;position:absolute;top:0px;left:0px;",n.setAttribute("width","320"),n.setAttribute("height","240"),n.setAttribute("autoplay","autoplay"),n.setAttribute("loop","loop"),n.setAttribute("crossorigin","crossorigin"),n.setAttribute("src",e),n.setAttribute("id","projection-image-"+t),i.appendChild(n),n}function _0x735ac(e,t){for(var i=o$1p.fromDegreesArrayHeights(t),n=new U$18({polygonHierarchy:{positions:i},vertexFormat:{bitangent:!1,color:!1,normal:!1,position:!0,st:!1,tangent:!1},perPositionHeight:!0}),r=U$18.createGeometry(n),o=[],a=1;a<i.length-1;a++)o.push(0),o.push(a),o.push(a+1);r.indices=o;var s=new p$1d;p$1d.inverse(e._invertViewMatrix,s),f$Z.updateGeometry(r,t,s);var l=new f$Z;return l._geometry=r,l}function _0xec6f2e(e,t,i){if(e._polygonUpdate&&0!==e._polygonRegions.values.length){e._polygonUpdate=!1;var n=new t$W({color:new e$1X(0,0,0,0),depth:1});n.framebuffer=new t$V({context:t,colorTextures:[e._polygonTexture],destroyAttachments:!1}),n.renderState=d$1m.fromCache(),n.execute(t);for(var r=0;r<e._polygonRegions.values.length;r++){var o=e._polygonRegions.values[r];_0x3f2329(e,t,o,e._polygonTexture),o._command.execute(t)}n.framebuffer.destroy()}}function _0x3f2329(e,t,i,n){if(e$2e(i)&&!e$2e(i._command)){var r=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix});i._command=r;var o={position:0};r.vertexArray=c$13.fromGeometry({context:t,geometry:i._geometry,attributeLocations:o,bufferUsage:A$18.STATIC_DRAW,interleave:!0});var a=new s$V({sources:["attribute vec4 position;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n}\n"]}),s=new s$V({sources:["void main()\n{\n gl_FragColor = vec4(1.0);\n}\n"]});r.shaderProgram=r$14.fromCache({name:"ProjectionImageRasterRegion",context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:o}),r.framebuffer=new t$V({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=d$1m.fromCache({cull:{enabled:!1}})}}function _0x590c2a(e,t){if(e$2e(e._colorCommand)){var i=e._scene._context,n=e._colorCommand.shaderProgram.name,r=e._colorCommand.shaderProgram.fragmentShaderSource,o=e._colorCommand.shaderProgram.vertexShaderSource,a=r.defines.indexOf("CLIPPOLYGON");t?a<0&&r.defines.push("CLIPPOLYGON"):a>=0&&r.defines.splice(a,1),e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=r$14.fromCache({name:n,context:i,vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:e._attributeLocations})}}function p$_(){if(!e$2e(i$W._canTransferArrayBuffer)){var e=new Worker(w$U("Workers/transferTypedArrayTest.js"));e.postMessage=u$Z(e.webkitPostMessage,e.postMessage);var t=new Int8Array([99]);try{e.postMessage({array:t},[t.buffer])}catch{return i$W._canTransferArrayBuffer=!1,i$W._canTransferArrayBuffer}var i=o$1l.defer();e.onmessage=function(t){var n=t.data.array,r=e$2e(n)&&99===n[0];i.resolve(r),e.terminate(),i$W._canTransferArrayBuffer=r},i$W._canTransferArrayBuffer=i.promise}return i$W._canTransferArrayBuffer}_0x337a3e.prototype.update=function(e,t,i){if(!t._fboState.enabled&&this._visible){var n=t.camera;if(!n.bReflect&&(!e$2e(this._boundingSphereFromXML)||!_0x895bc8(n,this._boundingSphereFromXML,this._visibleDistanceMax))&&(0===this._boundingSphere.radius||this._update||!_0x895bc8(n,this._boundingSphere,this._visibleDistanceMax))&&(p$1d.multiply(this._viewProjMatrix,n.inverseViewMatrix,this._renderTextureMatrix),p$1d.multiply(this._polygonViewProjMatrix,n.inverseViewMatrix,this._polygonTextureMatrix),e$2e(this._video)&&this._video.readyState>=2&&(e$2e(this._texture)&&this._texture!==e.defaultTexture?this._texture.copyFrom(this._video):this._texture=new t$U({context:e,source:this._video})),e$2e(this._texture))){var r=this._scene;if(this._update&&(this._frameState=t,e$2e(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new s$U(e),this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),this._update=!1,_0x3d42bd(this),_0x3480f4(this,e,t),_0x6cb510(this,e)),this._polygonUpdate&&_0xec6f2e(this,e),e$2e(this._cameraDepthBuffer.depthTexture)){if(!e$2e(this._planeCommand)&&this._mode===_0x403af5.ProjectToPlane&&(_0x3155cf(this,e),e$2e(this._fusionLayers)&&this._fusionLayers.length>0))for(var o=0,a=this._fusionLayers.length;o<a;o++){var s=this._fusionLayers[o];s.enableFusion=!0,s.panOffset=r.screenSpaceCameraController.panOffset}if(e$2e(this._planeCommand)&&this._mode===_0x403af5.ProjectToPlane)return(r.screenSpaceCameraController.panDirty||r.screenSpaceCameraController.zoomDirty)&&(this._planeCommand.vertexArray=this._planeCommand.vertexArray&&this._planeCommand.vertexArray.destroy(),this._planeCommand.shaderProgram=this._planeCommand.shaderProgram&&this._planeCommand.shaderProgram.destroy(),_0x3155cf(this,e)),void i.push(this._planeCommand);e$2e(this._clearStencilCommand)&&i.push(this._clearStencilCommand),e$2e(this._stencilCommand)&&i.push(this._stencilCommand),e$2e(this._colorCommand)&&i.push(this._colorCommand),e$2e(this._lineCommand)&&this._hintLineVisible&&i.push(this._lineCommand)}}}},_0x337a3e.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~3");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,e$2e(this._cameraDepthBuffer)&&(this._cameraDepthBuffer._visibleViewport=this._visibleViewport)},_0x337a3e.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~3");return 1<<e&this._visibleViewport},_0x337a3e.prototype.setImage=function(e){if(LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.url)&&!e$2e(e.video)&&!e$2e(e.image))throw new t$15("options.url or options.video or options.image are required.");if(e$2e(e.url)){var t=e.url,i=this;o$1l(t$S(t),(function(e){i._texture!==i._scene._context.defaultTexture&&(i._texture=i._texture&&i._texture.destroy()),i._texture=new t$U({context:i._scene._context,source:e})}))}else e$2e(e.image)?e$2e(this._texture)?this._texture.copyFrom(e.image):this._texture=new t$U({context:this._scene._context,source:e.image}):this._video=e.video},_0x337a3e.prototype.setDistDirByPoint=function(e){if(LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),e[0]===this._viewPosition[0]&&e[1]===this._viewPosition[1]&&e[2]===this._viewPosition[2])throw new t$15("the position is [longitude, latitude ,height] and is not equals viewPosition");var t,i,n=(l=this._scene._frameState.camera)._projection;if(this._scene.mode===C$14.SCENE3D)t=o$1p.fromDegreesArrayHeights(e)[0],i=o$1p.fromDegreesArrayHeights(this._viewPosition)[0];else{var r=a$18.fromDegrees(e[0],e[1],e[2]);t=n.project(r,new o$1p);var o=a$18.fromDegrees(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]);i=n.project(o,new o$1p)}var a=new o$1p;o$1p.subtract(t,i,a);var s=o$1p.magnitude(a);o$1p.normalize(a,a),this.distance=s;var l,u=(l=this._scene._frameState.camera).heading,c=l.pitch,h=l.roll,d=new o$1p;o$1p.clone(l.position,d);var f=a.clone(),p=i.clone();p=o$1p.normalize(p,p),Math.abs(o$1p.dot(p,f))>=1&&(p=Math.abs(o$1p.dot(f,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,p):o$1p.clone(o$1p.UNIT_Z,p));var _=new o$1p;o$1p.cross(p,f,_),_=o$1p.normalize(_,_),o$1p.cross(f,_,p),p=o$1p.normalize(p,p),l.setView({destination:i,orientation:{direction:f,up:p},convert:!1}),this.direction=l.heading*e$2d.DEGREES_PER_RADIAN,this.pitch=l.pitch*e$2d.DEGREES_PER_RADIAN,l.setView({destination:d,orientation:{heading:u,pitch:c,roll:h},convert:!1})},_0x337a3e.prototype.pixelToWorldCoordinates=function(e,t){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");var i=this._scene.context,n=this._texture.width,r=this._texture.height,o=e/n*i.drawingBufferWidth,a=i.drawingBufferHeight-t/r*i.drawingBufferHeight;i.drawingBufferHeight;var s=i.readPixels({x:o,y:a,width:1,height:1,framebuffer:this._cameraDepthBuffer.framebuffer}),l=e$2c.unpack(s,0,_0x1152f2);e$2c.divideByScalar(l,255,l);var u=e$2c.dot(l,_0x2a0e7d),c=p$1d.inverse(this._viewProjMatrix,new p$1d),h=new e$2c,d=this._scene._view.passState.viewport;h.x=(o-d.x)/d.width*2-1,h.y=(a-d.y)/d.height*2-1,i.webgpu?h.z=u:h.z=2*u-1,h.w=1;var f=p$1d.multiplyByVector(c,h,new e$2c);n=1/f.w;return o$1p.multiplyByScalar(f,n,f),o$1p.fromCartesian4(f,new o$1p)},_0x337a3e.prototype.pixelToWorldCoordinates=function(e,t){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");var i=this._scene.context,n=this._texture.width,r=this._texture.height,o=e/n*i.drawingBufferWidth,a=i.drawingBufferHeight-t/r*i.drawingBufferHeight,s=this;return i.readPixelsAsync({x:o,y:a,width:1,height:1,framebuffer:s._cameraDepthBuffer.framebuffer}).then((e=>{var t=e$2c.unpack(e,0,_0x1152f2);e$2c.divideByScalar(t,255,t);var n=e$2c.dot(t,_0x2a0e7d),r=p$1d.inverse(s._viewProjMatrix,new p$1d),l=new e$2c,u=s._scene._view.passState.viewport;l.x=(o-u.x)/u.width*2-1,l.y=(a-u.y)/u.height*2-1,i.webgpu?l.z=n:l.z=2*n-1,l.w=1;var c=p$1d.multiplyByVector(r,l,new e$2c),h=1/c.w;o$1p.multiplyByScalar(c,h,c),Promise.resolve(o$1p.fromCartesian4(c,new o$1p))}))},_0x337a3e.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),""===this._name&&(this._name="projectionimage"+this._scene._analyst3D._layerIndex,this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},_0x337a3e.prototype.setInfo=function(e){if(LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),!e$2e(e))throw new t$15("No url provided.");var t=this;return d$1f(e).then((function(e){var i=_0x3dee3a(e.firstChild);t.direction=i.heading,t.pitch=u$Z(i.pitch,t.pitch),t._roll=u$Z(i.roll,t._roll),t.horizontalFov=i.horizontalFov,t.verticalFov=i.verticalFov,o$1p.clone(i.matrixU,t._v3AffineX),o$1p.clone(i.matrixV,t._v3AffineY),t.distance=i.distance,t.viewPosition=i.viewPosition,t._boundingSphereFromXML=i.boundingSphere})).otherwise((function(e){console.error(e)}))},_0x337a3e.fromInfo=function(e,t,i){if(!e$2e(e))throw new t$15("No scene provided.");if(!e$2e(t))throw new t$15("No url provided.");return d$1f(t).then((function(n){for(var r={},o=n.firstChild,a=0,s=o.children.length;a<s;a++){var l=_0x3dee3a(o.children[a]),u=l.videoName;u=e$2e(i)?n$1a(i)+l.videoName:t.slice(0,t.lastIndexOf("/")+1)+l.videoName;var c=new _0x337a3e(e),h=_0x1eb5d1(u,c._guid);c.viewPosition=l.viewPosition,c.direction=l.heading,c.pitch=l.pitch,c.horizontalFov=l.horizontalFov,c.verticalFov=l.verticalFov,o$1p.clone(l.matrixU,c._v3AffineX),o$1p.clone(l.matrixV,c._v3AffineY),c.distance=l.distance,c.setImage({video:h}),c._boundingSphereFromXML=l.boundingSphere,h.addEventListener("loadeddata",function(e){e.build()}.bind(h,c)),r[l.videoName]=c}return r})).otherwise((function(e){console.error(e)}))},_0x337a3e.prototype.destroy=function(){var e=document.getElementById("projection-image-"+this._guid);if(e){var t=e.parentNode;t.removeChild(e),0===t.children.length&&t.parentNode.removeChild(t)}e$2e(this._frameState)&&(e$2e(this._cameraDepthBuffer)&&delete this._frameState._framebufferList[this._cameraName],this._frameState=void 0),this._cameraDepthBuffer=this._cameraDepthBuffer&&this._cameraDepthBuffer.destroy(),_0x3d42bd(this),this._clearStencilCommand=void 0,this._texture!==this._scene._context.defaultTexture&&(this._texture=this._texture&&this._texture.destroy());for(var i=0;i<this._polygonRegions.values.length;i++)this._polygonRegions.values[i].destroy(),this._polygonRegions.values[i]=null;if(e$2e(this._polygonTexture)&&(this._polygonTexture.destroy(),this._polygonTexture=null),this._scene._analyst3D.remove(this._name,!0),this._scene.context.curFusionViewMatrix=void 0,this._scene.screenSpaceCameraController.enableFusion=!1,e$2e(this._fusionLayers)){i=0;for(var n=this._fusionLayers.length;i<n;i++){var r=this._fusionLayers[i];r.enableFusion&&(r.enableFusion=!1)}}return this._fusionLayers=void 0,i$11(this)},_0x337a3e.prototype.setClipMode=function(e){this._polygonMode=e},_0x337a3e.prototype.addClipRegion=function(e){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");var t=e.name,i=e.position;if(!e$2e(t)||!e$2e(i))return!1;if(e$2e(this._polygonRegions.get(t)))return!1;var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;e$2e(this._polygonTexture)||(this._polygonTexture=new t$U({context:this._scene._context,width:n,height:r,pixelFormat:V$12.RGBA}));var o=_0x735ac(this,i);this._polygonRegions.set(t,o),this._polygonUpdate=!0;var a=this._frameState.camera;return p$1d.multiply(a.frustum.projectionMatrix,a.viewMatrix,this._polygonViewProjMatrix),_0x590c2a(this,!0),!0},_0x337a3e.prototype.removeClipRegion=function(e){return LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),!!this._polygonRegions.remove(e)&&(this._polygonUpdate=!0,0===this._polygonRegions.values.length&&_0x590c2a(this,!1),!0)},_0x337a3e.prototype.removeAllClipRegion=function(){LicenseChecker.LICENSECHECKER.verify("ProjectionImage");for(var e=0;e<this._polygonRegions.values.length;e++)this._polygonRegions.values[e].destroy(),this._polygonRegions.values[e]=null;this._polygonRegions.removeAll(),this._polygonUpdate=!0,_0x590c2a(this,!1)},_0x337a3e.prototype.setFusionLayers=function(e){LicenseChecker.LICENSECHECKER.verify("ProjectionImage"),Array.isArray(e)||(e=[e]),this._fusionLayers=e};var c$12=new o$1h,k$X;function v$M(e,t){"indexedDBWorker"===e._workerName?--e._activeIndexedDBTasks:"websocketTaskProcessor"!=e._workerName&&--e._activeTasks;var i=t.id;if(e$2e(i)){var n=e._deferreds,r=n[i];if(e$2e(t.error)){var o=t.error;"RuntimeError"===o.name?(o=new t$13(t.error.message)).stack=t.error.stack:"DeveloperError"===o.name&&((o=new t$15(t.error.message)).stack=t.error.stack),c$12.raiseEvent(o),r.reject(o)}else c$12.raiseEvent(),r.resolve(t.result);delete n[i]}}function w$U(e){var t=n$17(e);if(i$19(t)){var i,n='importScripts("'+t+'");';try{i=new Blob([n],{type:"application/javascript"})}catch{var r=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);r.append(n),i=r.getBlob("application/javascript")}t=(window.URL||window.webkitURL).createObjectURL(i)}return t}function x$15(){return e$2e(k$X)||(k$X=w$U("Workers/workerBootstrapper.js")),k$X}function h$_(e){var t=new Worker(x$15());t.postMessage=u$Z(t.webkitPostMessage,t.postMessage);var i={loaderConfig:{paths:{Workers:n$17("Workers")},baseUrl:n$17.getCesiumBaseUrl().url},workerModule:i$W._workerModulePrefix+e._workerName};return t.postMessage(i),t.onmessage=function(t){v$M(e,t.data)},t}function P$Y(e,t){var i={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};return s$Z.supportsWebAssembly()?(i.modulePath=n$17(t.modulePath),i.wasmBinaryFile=n$17(t.wasmBinaryFile),t$10.fetchArrayBuffer({url:i.wasmBinaryFile}).then((function(e){return i.wasmBinary=e,i}))):(i.modulePath=n$17(t.fallbackModulePath),o$1l.resolve(i))}function i$W(e,t){this._workerName=e,this._maximumActiveTasks=u$Z(t,5),this._activeTasks=0,this._deferreds={},this._activeIndexedDBTasks=0,this._nextID=0}var D$_=[];i$W.prototype.scheduleTask=function(e,t){if(e$2e(this._worker)||(this._worker=h$_(this)),"indexedDBWorker"===this._workerName){if(this._activeIndexedDBTasks>=this._maximumActiveTasks)return;++this._activeIndexedDBTasks}else{if(this._activeTasks>=this._maximumActiveTasks)return;"websocketTaskProcessor"!=this._workerName&&++this._activeTasks}var i=this;return o$1l(p$_(),(function(n){e$2e(t)?n||(t.length=0):t=D$_;var r=i._nextID++,o=o$1l.defer();return i._deferreds[r]=o,i._worker.postMessage({id:r,parameters:e,canTransferArrayBuffer:n},t),o.promise}))},i$W.prototype.initWebAssemblyModule=function(e){e$2e(this._worker)||(this._worker=h$_(this));var t=o$1l.defer(),i=this,n=this._worker;return P$Y(this,e).then((function(e){return o$1l(p$_(),(function(r){var o,a=e.wasmBinary;e$2e(a)&&r&&(o=[a]),n.onmessage=function(e){n.onmessage=function(e){v$M(i,e.data)},t.resolve(e.data)},n.postMessage({webAssemblyConfig:e},o)}))})),t},i$W.prototype.isDestroyed=function(){return!1},i$W.prototype.destroy=function(){return e$2e(this._worker)&&this._worker.terminate(),i$11(this)},i$W.taskCompletedEvent=c$12,i$W._defaultWorkerModulePrefix="Workers/",i$W._workerModulePrefix=i$W._defaultWorkerModulePrefix,i$W._canTransferArrayBuffer=void 0;var _0x3993e9=(_0x376627=!0,function(e,t){var i=_0x376627?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x376627=!1,i}),_0x2bd584=_0x3993e9(void 0,(function(){return _0x2bd584.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bd584).search("(((.+)+)+)+$")})),_0x376627;_0x2bd584();var _0x126a39="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nattribute vec2 offset;\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying vec2 vOffset;\n\nfloat computerOnePixelLength(vec4 viewPos)\n{\n vec4 winPos = czm_projection * viewPos;\n float dwidth = czm_metersPerPixel(viewPos);\n winPos.x = winPos.x - 2.0 * dwidth;\n vec4 newViewPos = czm_inverseProjection * winPos;\n return length(viewPos - newViewPos);\n}\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n float radius = 10.0;\n vec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n viewPos.xy = viewPos.xy + offset * computerOnePixelLength(viewPos) * radius;\n gl_Position = czm_projection * viewPos;\n vTexCoord = aTexCoord0.xy;\n vOffset = offset;\n //clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n}",_0x230123=(_0x5ecb58=!0,function(e,t){var i=_0x5ecb58?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ecb58=!1,i}),_0x329bcc=_0x230123(void 0,(function(){return _0x329bcc.toString().search("(((.+)+)+)+$").toString().constructor(_0x329bcc).search("(((.+)+)+)+$")})),_0x5ecb58;_0x329bcc();var _0x46d19a="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uTexture0;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying vec2 vOffset;\n\nfloat fade(in float low, in float high, in float value)\n{\n\tfloat mid = (low + high) * 0.5;\n\tfloat range = (high - low) * 0.5;\n\tfloat x = 1.0 - clamp(abs(mid - value) / range, 0.0, 1.0);\n\treturn x;\n}\n\nvec3 getColor(in float intensity)\n{\n\tvec3 blue = vec3(0.0, 0.0, 1.0);\n\tvec3 cyan = vec3(0.0, 1.0, 1.0);\n\tvec3 green = vec3(0.0, 1.0, 0.0);\n\tvec3 yellow = vec3(1.0, 1.0, 0.0);\n\tvec3 red = vec3(1.0, 0.0, 0.0);\n\tvec3 color = fade(-0.25, 0.25, intensity) * blue + fade(0.0, 0.5, intensity) * cyan + fade(0.25, 0.75, intensity) * green + \n\t\t\t\tfade(0.5, 1.0, intensity) * yellow + smoothstep(0.75, 1.0, intensity) * red;\n\treturn color;\n}\n#ifdef COLOR_TABLE\nuniform sampler2D uHypsometricTexture;\nvec4 getContourMapColor(in float intensity){\n float count = floor(intensity * 16.0);\n float y = (count * 2.0 + 1.0) / 32.0;\n float x = fract(intensity * 16.0);\n return texture2D(uHypsometricTexture, vec2(x, y));\n}\n#endif\n\nvoid main()\n{\n\tvec2 texcoord = vTexCoord.xy * 0.5 + 0.5;\n\tfloat fIntensity = czm_unpackDepth(texture2D(uTexture0, texcoord.xy));\n float dist = 1.0 - length(vOffset);\n\tif(dist < 0.5)\n\t{\n\t\tdiscard;\n\t}\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef COLOR_TABLE\n\tgl_FragColor = getContourMapColor(fIntensity);\n#else\n\tgl_FragColor = vec4(getColor(fIntensity), 1.0);\n#endif\n}",_0x3afa7f=(_0x9c3677=!0,function(e,t){var i=_0x9c3677?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x9c3677=!1,i}),_0xd13cd1=_0x3afa7f(void 0,(function(){return _0xd13cd1.toString().search("(((.+)+)+)+$").toString().constructor(_0xd13cd1).search("(((.+)+)+)+$")})),_0x9c3677;_0xd13cd1();var _0x1f9203="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nattribute vec2 offset;\n\nvarying vec4 vPositionEC;\nvarying vec2 vTexcoord;\n\nfloat computerOnePixelLength(vec4 viewPos)\n{\n vec4 winPos = czm_projection * viewPos;\n float dwidth = czm_metersPerPixel(viewPos);\n winPos.x = winPos.x - 2.0 * dwidth;\n vec4 newViewPos = czm_inverseProjection * winPos;\n return length(viewPos - newViewPos);\n}\n\nvoid main()\n{\n\tvTexcoord = aTexCoord0.xy * 0.5 + 0.5;\n\t//vTexcoord.y = 1.0 - vTexcoord.y;\n\tvPositionEC = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec2 pixelLength = 1.0 / czm_viewport.zw;\n\tgl_Position = vec4(aTexCoord0.xy + pixelLength * offset * 4.0, 0.5, 1.0);\n}",_0x19dfbd=(_0x1a9262=!0,function(e,t){var i=_0x1a9262?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a9262=!1,i}),_0x33c12b=_0x19dfbd(void 0,(function(){return _0x33c12b.toString().search("(((.+)+)+)+$").toString().constructor(_0x33c12b).search("(((.+)+)+)+$")})),_0x1a9262;_0x33c12b();var _0x138bac="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform float uSpacing;\nuniform sampler2D shadowMap_texture;\nuniform sampler2D uAssisTexture;\n\nvarying vec4 vPositionEC;\nvarying vec2 vTexcoord;\n\n#define inline\nfloat sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture2D(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\n\n\n#define inline\nfloat shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, sampleShadowMap(shadowMap, uv));\n}\n\nvoid main()\n{\n\tgl_FragColor = texture2D(uAssisTexture, vTexcoord);\n\tvec4 positionEC = vPositionEC;\n\tfloat depth = -positionEC.z;\n\tvec4 weights = czm_cascadeWeights(depth);\n\tvec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;\n\tfloat visibility = shadowDepthCompare(shadowMap_texture, shadowPosition.xy, shadowPosition.z);\n\tif(visibility < 0.001)\n\t{\n\t\treturn;\n\t}\n\tif(depth > shadowMap_cascadeSplits[1].w)\n\t{\n\t\treturn;\n\t}\n\tfloat oldIntensity = czm_unpackDepth(gl_FragColor);\n\tfloat intensity = oldIntensity + uSpacing;\n\tintensity = clamp(intensity, 0.0, 0.9999);\n\tgl_FragColor = czm_packDepth(intensity);\n}",B$X=new o$1p;function o$17(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).minimum,i=e.maximum;if(o$1q.typeOf.object("min",t),o$1q.typeOf.object("max",i),e$2e(e.offsetAttribute)&&e.offsetAttribute===_0x39c22a.TOP)throw new t$15("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=o$1p.clone(t),this._max=o$1p.clone(i),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}o$17.fromDimensions=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).dimensions;o$1q.typeOf.object("dimensions",t),o$1q.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=o$1p.multiplyByScalar(t,.5,new o$1p);return new o$17({minimum:o$1p.negate(i,new o$1p),maximum:i,offsetAttribute:e.offsetAttribute})},o$17.fromAxisAlignedBoundingBox=function(e){return o$1q.typeOf.object("boundindBox",e),new o$17({minimum:e.minimum,maximum:e.maximum})},o$17.packedLength=2*o$1p.packedLength+1,o$17.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),o$1p.pack(e._min,t,i),o$1p.pack(e._max,t,i+o$1p.packedLength),t[i+2*o$1p.packedLength]=u$Z(e._offsetAttribute,-1),t};var y$T=new o$1p,A$15=new o$1p,v$L={minimum:y$T,maximum:A$15,offsetAttribute:void 0};function o$16(e,t,i,n){e=u$Z(e,1),t=u$Z(t,1),i=u$Z(i,1),n=u$Z(n,1),this.value=new Uint8Array([e$1X.floatToByte(e),e$1X.floatToByte(t),e$1X.floatToByte(i),e$1X.floatToByte(n)])}function l$10(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=u$Z(e.near,1),this._near=this.near,this.far=u$Z(e.far,5e8),this._far=this.far,this._cullingVolume=new i$X,this._perspectiveMatrix=new p$1d,this._infinitePerspective=new p$1d}function z$V(e){if(!(e$2e(e.right)&&e$2e(e.left)&&e$2e(e.top)&&e$2e(e.bottom)&&e$2e(e.near)&&e$2e(e.far)))throw new t$15("right, left, top, bottom, near, or far parameters are not set.");var t=e.top,i=e.bottom,n=e.right,r=e.left,o=e.near,a=e.far;if(t!==e._top||i!==e._bottom||r!==e._left||n!==e._right||o!==e._near||a!==e._far){if(e.near<=0||e.near>e.far)throw new t$15("near must be greater than zero and less than far.");e._left=r,e._right=n,e._top=t,e._bottom=i,e._near=o,e._far=a,e._perspectiveMatrix=p$1d.computePerspectiveOffCenter(r,n,i,t,o,a,e._perspectiveMatrix),e._infinitePerspective=p$1d.computeInfinitePerspectiveOffCenter(r,n,i,t,o,e._infinitePerspective)}}o$17.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=o$1p.unpack(e,t,y$T),r=o$1p.unpack(e,t+o$1p.packedLength,A$15),o=e[t+2*o$1p.packedLength];return e$2e(i)?(i._min=o$1p.clone(n,i._min),i._max=o$1p.clone(r,i._max),i._offsetAttribute=-1===o?void 0:o,i):(v$L.offsetAttribute=-1===o?void 0:o,new o$17(v$L))},o$17.createGeometry=function(e){var t=e._min,i=e._max;if(!o$1p.equals(t,i)){var n=new a$_,r=new Uint16Array(24),o=new Float64Array(24);o[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=i.x,o[4]=t.y,o[5]=t.z,o[6]=i.x,o[7]=i.y,o[8]=t.z,o[9]=t.x,o[10]=i.y,o[11]=t.z,o[12]=t.x,o[13]=t.y,o[14]=i.z,o[15]=i.x,o[16]=t.y,o[17]=i.z,o[18]=i.x,o[19]=i.y,o[20]=i.z,o[21]=t.x,o[22]=i.y,o[23]=i.z,n.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:o}),r[0]=4,r[1]=5,r[2]=5,r[3]=6,r[4]=6,r[5]=7,r[6]=7,r[7]=4,r[8]=0,r[9]=1,r[10]=1,r[11]=2,r[12]=2,r[13]=3,r[14]=3,r[15]=0,r[16]=0,r[17]=4,r[18]=1,r[19]=5,r[20]=2,r[21]=6,r[22]=3,r[23]=7;var a=o$1p.subtract(i,t,B$X),s=.5*o$1p.magnitude(a);if(e$2e(e._offsetAttribute)){var l=o.length,u=new Uint8Array(l/3);d$1s(u,e._offsetAttribute===_0x39c22a.NONE?0:1),n.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return new I$1p({attributes:n,indices:r,primitiveType:W$18.LINES,boundingSphere:new i$1d(o$1p.ZERO,s),offsetAttribute:e._offsetAttribute})}},Object.defineProperties(o$16.prototype,{componentDatatype:{get:function(){return S$14.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}}),o$16.fromColor=function(e){if(!e$2e(e))throw new t$15("color is required.");return new o$16(e.red,e.green,e.blue,e.alpha)},o$16.toValue=function(e,t){if(!e$2e(e))throw new t$15("color is required.");return e$2e(t)?e.toBytes(t):new Uint8Array(e.toBytes())},o$16.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]},Object.defineProperties(l$10.prototype,{projectionMatrix:{get:function(){return z$V(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return z$V(this),this._infinitePerspective}}});var B$W=new o$1p,O$L=new o$1p,S$T=new o$1p,V$V=new o$1p;function o$15(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._offCenterFrustum=new l$10,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=u$Z(e.near,1),this._near=this.near,this.far=u$Z(e.far,5e8),this._far=this.far,this.xOffset=u$Z(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=u$Z(e.yOffset,0),this._yOffset=this.yOffset,this.reflect=!1}function f$Y(e){if(!(e$2e(e.fov)&&e$2e(e.aspectRatio)&&e$2e(e.near)&&e$2e(e.far)))throw new t$15("fov, aspectRatio, near, or far parameters are not set.");var t=e._offCenterFrustum;if(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset){if(e.fov<0||e.fov>=Math.PI)throw new t$15("fov must be in the range [0, PI).");if(e.aspectRatio<0)throw new t$15("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new t$15("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset}}l$10.prototype.resetProjectionMatrix=function(){if(!(e$2e(this.right)&&e$2e(this.left)&&e$2e(this.top)&&e$2e(this.bottom)&&e$2e(this.near)&&e$2e(this.far)))throw new t$15("right, left, top, bottom, near, or far parameters are not set.");var e=this.top,t=this.bottom,i=this.right,n=this.left,r=this.near,o=this.far;if(this.near<=0||this.near>this.far)throw new t$15("near must be greater than zero and less than far.");this._left=n,this._right=i,this._top=e,this._bottom=t,this._near=r,this._far=o,this._perspectiveMatrix=p$1d.computePerspectiveOffCenter(n,i,t,e,r,o,this._perspectiveMatrix),this._infinitePerspective=p$1d.computeInfinitePerspectiveOffCenter(n,i,t,e,r,this._infinitePerspective)},l$10.prototype.computeCullingVolume=function(e,t,i,n){if(!e$2e(e))throw new t$15("position is required.");if(!e$2e(t))throw new t$15("direction is required.");if(!e$2e(i))throw new t$15("up is required.");var r=this._cullingVolume.planes,o=u$Z(n,0);o=Math.min(o,.5),o=Math.max(o,0);var a=this.top+this.top*o,s=this.bottom-this.top*o,l=this.right+this.right*o,u=this.left-this.right*o,c=this.near,h=this.far,d=o$1p.cross(t,i,B$W),f=O$L;o$1p.multiplyByScalar(t,c,f),o$1p.add(e,f,f);var p=S$T;o$1p.multiplyByScalar(t,h,p),o$1p.add(e,p,p);var _=V$V;o$1p.multiplyByScalar(d,u,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.normalize(_,_),o$1p.cross(_,i,_),o$1p.normalize(_,_);var m=r[0];return e$2e(m)||(m=r[0]=new e$2c),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),o$1p.multiplyByScalar(d,l,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.cross(i,_,_),o$1p.normalize(_,_),e$2e(m=r[1])||(m=r[1]=new e$2c),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),o$1p.multiplyByScalar(i,s,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.cross(d,_,_),o$1p.normalize(_,_),e$2e(m=r[2])||(m=r[2]=new e$2c),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),o$1p.multiplyByScalar(i,a,_),o$1p.add(f,_,_),o$1p.subtract(_,e,_),o$1p.cross(_,d,_),o$1p.normalize(_,_),e$2e(m=r[3])||(m=r[3]=new e$2c),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,e),e$2e(m=r[4])||(m=r[4]=new e$2c),m.x=t.x,m.y=t.y,m.z=t.z,m.w=-o$1p.dot(t,f),o$1p.negate(t,_),e$2e(m=r[5])||(m=r[5]=new e$2c),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-o$1p.dot(_,p),this._cullingVolume},l$10.prototype.getPixelDimensions=function(e,t,i,n,r){if(z$V(this),!e$2e(e)||!e$2e(t))throw new t$15("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new t$15("drawingBufferWidth must be greater than zero.");if(t<=0)throw new t$15("drawingBufferHeight must be greater than zero.");if(!e$2e(i))throw new t$15("distance is required.");if(!e$2e(n))throw new t$15("pixelRatio is required");if(n<=0)throw new t$15("pixelRatio must be greater than zero.");if(!e$2e(r))throw new t$15("A result object is required.");var o=1/this.near,a=this.top*o,s=2*n*i*a/t,l=2*n*i*(a=this.right*o)/e;return r.x=l,r.y=s,r},l$10.prototype.clone=function(e){return e$2e(e)||(e=new l$10),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},l$10.prototype.equals=function(e){return e$2e(e)&&e instanceof l$10&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},l$10.prototype.equalsEpsilon=function(e,t,i){return e===this||e$2e(e)&&e instanceof l$10&&e$2d.equalsEpsilon(this.right,e.right,t,i)&&e$2d.equalsEpsilon(this.left,e.left,t,i)&&e$2d.equalsEpsilon(this.top,e.top,t,i)&&e$2d.equalsEpsilon(this.bottom,e.bottom,t,i)&&e$2d.equalsEpsilon(this.near,e.near,t,i)&&e$2d.equalsEpsilon(this.far,e.far,t,i)},o$15.isNDCHalfZRange=!1,o$15.packedLength=6,o$15.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e.fov,t[i++]=e.aspectRatio,t[i++]=e.near,t[i++]=e.far,t[i++]=e.xOffset,t[i]=e.yOffset,t},o$15.unpack=function(e,t,i){return o$1q.defined("array",e),t=u$Z(t,0),e$2e(i)||(i=new o$15),i.fov=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t++],i.xOffset=e[t++],i.yOffset=e[t],i},Object.defineProperties(o$15.prototype,{projectionMatrix:{get:function(){return f$Y(this),this.reflect&&x$14(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return f$Y(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return f$Y(this),this._fovy}},sseDenominator:{get:function(){return f$Y(this),this._sseDenominator}}}),o$15.prototype.resetProjectionMatrix=function(){return this._offCenterFrustum.resetProjectionMatrix()},o$15.prototype.computeCullingVolume=function(e,t,i,n){return f$Y(this),this._offCenterFrustum.computeCullingVolume(e,t,i,n)},o$15.prototype.getPixelDimensions=function(e,t,i,n,r){return f$Y(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n,r)},o$15.prototype.clone=function(e){return e$2e(e)||(e=new o$15),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e.reflect=this.reflect,e.clipPlane=this.clipPlane,e.currentViewMatrix=this.currentViewMatrix,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},o$15.prototype.equals=function(e){return!!(e$2e(e)&&e instanceof o$15)&&(f$Y(this),f$Y(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},o$15.prototype.equalsEpsilon=function(e,t,i){return!!(e$2e(e)&&e instanceof o$15)&&(f$Y(this),f$Y(e),e$2d.equalsEpsilon(this.fov,e.fov,t,i)&&e$2d.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))};var r$$=new o$1m(o$1p.UNIT_Z,1),h$Z=new e$2c,c$11=new e$2c,s$Q=new e$2c;function x$14(e){if(e$2e(e.clipPlane)&&e$2e(e.currentViewMatrix)){var t=e.currentViewMatrix,i=e._offCenterFrustum.projectionMatrix;p$1d.multiplyByPlane(t,e.clipPlane,r$$),h$Z.x=(e$2d.sign(r$$.normal.x)+i[8])/i[0],h$Z.y=(e$2d.sign(r$$.normal.y)+i[9])/i[5],h$Z.z=-1,h$Z.w=(1+i[10])/i[14],c$11.x=r$$.normal.x,c$11.y=r$$.normal.y,c$11.z=r$$.normal.z,c$11.w=r$$.distance,e$2c.multiplyByScalar(c$11,2/e$2c.dot(c$11,h$Z),s$Q),i[2]=s$Q.x,i[6]=s$Q.y,i[10]=s$Q.z+1,i[14]=s$Q.w,p$1d.halfZRange&&p$1d.multiply(p$1d.ConvertNDCToHalfZRange,i,i)}}var mi$6=new o$1p(1,1,1),B$V=Math.cos,S$S=Math.sin;function x$13(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.radii,mi$6),i=u$Z(e.innerRadii,t),n=u$Z(e.minimumClock,0),r=u$Z(e.maximumClock,e$2d.TWO_PI),o=u$Z(e.minimumCone,0),a=u$Z(e.maximumCone,e$2d.PI),s=Math.round(u$Z(e.stackPartitions,10)),l=Math.round(u$Z(e.slicePartitions,8)),u=Math.round(u$Z(e.subdivisions,128));if(s<1)throw new t$15("options.stackPartitions cannot be less than 1");if(l<0)throw new t$15("options.slicePartitions cannot be less than 0");if(u<0)throw new t$15("options.subdivisions must be greater than or equal to zero.");if(e$2e(e.offsetAttribute)&&e.offsetAttribute===_0x39c22a.TOP)throw new t$15("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=o$1p.clone(t),this._innerRadii=o$1p.clone(i),this._minimumClock=n,this._maximumClock=r,this._minimumCone=o,this._maximumCone=a,this._stackPartitions=s,this._slicePartitions=l,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}x$13.packedLength=2*o$1p.packedLength+8,x$13.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),o$1p.pack(e._radii,t,i),i+=o$1p.packedLength,o$1p.pack(e._innerRadii,t,i),i+=o$1p.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i++]=e._subdivisions,t[i]=u$Z(e._offsetAttribute,-1),t};var K$U=new o$1p,Q$$=new o$1p,b$16={radii:K$U,innerRadii:Q$$,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};function a$U(e){var t=u$Z(e.radius,1),i={radii:new o$1p(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new x$13(i),this._workerName="createSphereOutlineGeometry"}x$13.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n=o$1p.unpack(e,t,K$U);t+=o$1p.packedLength;var r=o$1p.unpack(e,t,Q$$);t+=o$1p.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return e$2e(i)?(i._radii=o$1p.clone(n,i._radii),i._innerRadii=o$1p.clone(r,i._innerRadii),i._minimumClock=o,i._maximumClock=a,i._minimumCone=s,i._maximumCone=l,i._stackPartitions=u,i._slicePartitions=c,i._subdivisions=h,i._offsetAttribute=-1===d?void 0:d,i):(b$16.minimumClock=o,b$16.maximumClock=a,b$16.minimumCone=s,b$16.maximumCone=l,b$16.stackPartitions=u,b$16.slicePartitions=c,b$16.subdivisions=h,b$16.offsetAttribute=-1===d?void 0:d,new x$13(b$16))},x$13.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._subdivisions,l=t$12.fromCartesian3(t),u=e._slicePartitions+1,c=e._stackPartitions+1;(u=Math.round(u*Math.abs(r-n)/e$2d.TWO_PI))<2&&(u=2),(c=Math.round(c*Math.abs(a-o)/e$2d.PI))<2&&(c=2);var h=0,d=1,f=i.x!==t.x||i.y!==t.y||i.z!==t.z,p=!1,_=!1;f&&(d=2,o>0&&(p=!0,h+=u),a<Math.PI&&(_=!0,h+=u));var m,g,x,y,v=s*d*(c+u),$=new Float64Array(3*v),b=2*(v+h-(u+c)*d),T=ce$z.createTypedArray(v,b),C=0,S=new Array(c),w=new Array(c);for(m=0;m<c;m++)y=o+m*(a-o)/(c-1),S[m]=S$S(y),w[m]=B$V(y);var E=new Array(s),P=new Array(s);for(m=0;m<s;m++)x=n+m*(r-n)/(s-1),E[m]=S$S(x),P[m]=B$V(x);for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(S.length=s,w.length=s,m=0;m<s;m++)y=o+m*(a-o)/(s-1),S[m]=S$S(y),w[m]=B$V(y);for(E.length=u,P.length=u,m=0;m<u;m++)x=n+m*(r-n)/(u-1),E[m]=S$S(x),P[m]=B$V(x);for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(C=0,m=0;m<c*d;m++){var A=m*s;for(g=0;g<s-1;g++)T[C++]=A+g,T[C++]=A+g+1}var L=c*s*d;for(m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f)for(L=c*s*d+u*s,m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f){var M=c*s*d,R=M+s*u;if(p)for(m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m;if(_)for(M+=s*u-u,R+=s*u-u,m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m}var O=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:$})});if(e$2e(e._offsetAttribute)){var D=$.length,I=new Uint8Array(D/3);d$1s(I,e._offsetAttribute===_0x39c22a.NONE?0:1),O.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new I$1p({attributes:O,indices:T,primitiveType:W$18.LINES,boundingSphere:i$1d.fromEllipsoid(l),offsetAttribute:e._offsetAttribute})}}},a$U.packedLength=x$13.packedLength,a$U.pack=function(e,t,i){return o$1q.typeOf.object("value",e),x$13.pack(e._ellipsoidGeometry,t,i)};var l$$=new x$13,s$P={radius:void 0,radii:new o$1p,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};function c$10(e,t,i,n,r,o,a,s,l,u,c){this._context=e,this._texture=t,this._textureTarget=i,this._targetFace=n,this._pixelDatatype=a,this._internalFormat=r,this._pixelFormat=o,this._size=s,this._preMultiplyAlpha=l,this._flipY=u,this._initialized=c}function X$X(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t,i,n=e.context,r=e.source;if(e$2e(r)){var o=[r.positiveX,r.negativeX,r.positiveY,r.negativeY,r.positiveZ,r.negativeZ];if(!(o[0]&&o[1]&&o[2]&&o[3]&&o[4]&&o[5]))throw new t$15("options.source requires positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ faces.");t=o[0].width,i=o[0].height;for(var a=1;a<6;++a)if(Number(o[a].width)!==t||Number(o[a].height)!==i)throw new t$15("Each face in options.source must have the same width and height.")}else t=e.width,i=e.height;var s=t,l=u$Z(e.pixelFormat,V$12.RGBA),u=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),c=V$12.toInternalFormat(l,u,n);if(!e$2e(t)||!e$2e(i))throw new t$15("options requires a source field to create an initialized cube map or width and height fields to create a blank cube map.");if(t!==i)throw new t$15("Width must equal height.");if(s<=0)throw new t$15("Width and height must be greater than zero.");if(s>e$1W.maximumCubeMapSize)throw new t$15("Width and height must be less than or equal to the maximum cube map size ("+e$1W.maximumCubeMapSize+"). Check maximumCubeMapSize.");if(!V$12.validate(l))throw new t$15("Invalid options.pixelFormat.");if(V$12.isDepthFormat(l))throw new t$15("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!_$_.validate(u))throw new t$15("Invalid options.pixelDatatype.");if(u===_$_.FLOAT&&!n.floatingPointTexture)throw new t$15("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(u===_$_.HALF_FLOAT&&!n.halfFloatingPointTexture)throw new t$15("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");var h=6*V$12.textureSizeInBytes(l,u,s,s),d=e.preMultiplyAlpha||l===V$12.RGB||l===V$12.LUMINANCE,f=u$Z(e.flipY,!0);const p=u$Z(e.skipColorSpaceConversion,!1);var _=n._gl,m=_.TEXTURE_CUBE_MAP,g=_.createTexture();function x(e,i,r,o,a){var h=i.arrayBufferView;e$2e(h)||(h=i.bufferView);let d=4;e$2e(h)&&(d=V$12.alignmentInBytes(l,u,t)),_.pixelStorei(_.UNPACK_ALIGNMENT,d),a?_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,_.NONE):_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,_.BROWSER_DEFAULT_WEBGL),e$2e(h)?(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,!1),o&&(h=V$12.flipY(h,l,u,s,s)),_.texImage2D(e,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),h)):(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,o),_.texImage2D(e,0,c,l,_$_.toWebGLConstant(u,n),i))}_.activeTexture(_.TEXTURE0),_.bindTexture(m,g),e$2e(r)?(x(_.TEXTURE_CUBE_MAP_POSITIVE_X,r.positiveX,d,f,p),x(_.TEXTURE_CUBE_MAP_NEGATIVE_X,r.negativeX,d,f,p),x(_.TEXTURE_CUBE_MAP_POSITIVE_Y,r.positiveY,d,f,p),x(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,r.negativeY,d,f,p),x(_.TEXTURE_CUBE_MAP_POSITIVE_Z,r.positiveZ,d,f,p),x(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,r.negativeZ,d,f,p)):(_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_X,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_X,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Y,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Z,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,c,s,s,0,l,_$_.toWebGLConstant(u,n),null)),_.bindTexture(m,null),this._context=n,this._textureFilterAnisotropic=n._textureFilterAnisotropic,this._textureTarget=m,this._texture=g,this._pixelFormat=l,this._pixelDatatype=u,this._size=s,this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0;var y=e$2e(r);this._positiveX=new c$10(n,g,m,_.TEXTURE_CUBE_MAP_POSITIVE_X,c,l,u,s,d,f,y),this._negativeX=new c$10(n,g,m,_.TEXTURE_CUBE_MAP_NEGATIVE_X,c,l,u,s,d,f,y),this._positiveY=new c$10(n,g,m,_.TEXTURE_CUBE_MAP_POSITIVE_Y,c,l,u,s,d,f,y),this._negativeY=new c$10(n,g,m,_.TEXTURE_CUBE_MAP_NEGATIVE_Y,c,l,u,s,d,f,y),this._positiveZ=new c$10(n,g,m,_.TEXTURE_CUBE_MAP_POSITIVE_Z,c,l,u,s,d,f,y),this._negativeZ=new c$10(n,g,m,_.TEXTURE_CUBE_MAP_NEGATIVE_Z,c,l,u,s,d,f,y),this.sampler=e$2e(e.sampler)?e.sampler:new e$1S}function y$S(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context);var t,i,n=e.context,r=e.source;if(e$2e(r)){var o=[r.positiveX,r.negativeX,r.positiveY,r.negativeY,r.positiveZ,r.negativeZ];if(!(o[0]&&o[1]&&o[2]&&o[3]&&o[4]&&o[5]))throw new t$15("options.source requires positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ faces.");t=o[0].width,i=o[0].height;for(var a=1;a<6;++a)if(Number(o[a].width)!==t||Number(o[a].height)!==i)throw new t$15("Each face in options.source must have the same width and height.")}else t=e.width,i=e.height;var s=t,l=u$Z(e.pixelFormat,V$12.RGBA),u=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE);if(!e$2e(t)||!e$2e(i))throw new t$15("options requires a source field to create an initialized cube map or width and height fields to create a blank cube map.");if(t!==i)throw new t$15("Width must equal height.");if(s<=0)throw new t$15("Width and height must be greater than zero.");if(s>e$1W.maximumCubeMapSize)throw new t$15("Width and height must be less than or equal to the maximum cube map size ("+e$1W.maximumCubeMapSize+"). Check maximumCubeMapSize.");if(!V$12.validate(l))throw new t$15("Invalid options.pixelFormat.");if(V$12.isDepthFormat(l))throw new t$15("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!_$_.validate(u))throw new t$15("Invalid options.pixelDatatype.");if(u===_$_.FLOAT&&!n.floatingPointTexture)throw new t$15("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(u===_$_.HALF_FLOAT&&!n.halfFloatingPointTexture)throw new t$15("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");var c=6*V$12.textureSizeInBytes(l,u,s,s),h=e.preMultiplyAlpha||l===V$12.RGB||l===V$12.LUMINANCE,d=u$Z(e.flipY,!0);this._context=n,this._textureFilterAnisotropic=n._textureFilterAnisotropic,this._size=s,this._hasMipmap=!1,this._sizeInBytes=c,this._preMultiplyAlpha=h,this._flipY=d,this._sampler=e$2e(e.sampler)?e.sampler:new e$1S,this._pixelFormat=l,this._pixelDatatype=u,r&&r.positiveX&&r.positiveX.internalFormat&&(this._pixelFormat=r.positiveX.internalFormat),r&&r.positiveX&&r.positiveX.pixelDatatype&&(this._pixelDatatype=r.positiveX.pixelDatatype);var f=R$12.toPixelFormat(this._pixelFormat),p=R$12.toPixelType(this._pixelDatatype);R$12.toSamplerMode(this._pixelDatatype,this._sampler);var _=R$12.toAddressMode(this._sampler.wrapS),m=R$12.toAddressMode(this._sampler.wrapT);if(e$2e(r)){var g=e.context.engine,x=new InternalTexture(g,InternalTextureSource.Cube);if(x.wrapU=_,x.wrapV=m,this._texture=new _0x4f1603(x),x.isCube=!0,x.generateMipMaps=!1,x._useSRGBBuffer=!1,x.format=f,x.type=p,r.positiveX.bufferView||r.positiveX.arrayBufferView){var y=[];y.push(x$12(r.positiveX,d,l,u,s)),y.push(x$12(r.positiveY,d,l,u,s)),y.push(x$12(r.positiveZ,d,l,u,s)),y.push(x$12(r.negativeX,d,l,u,s)),y.push(x$12(r.negativeY,d,l,u,s)),y.push(x$12(r.negativeZ,d,l,u,s));var v=g._textureHelper.createGPUTextureForInternalTexture(x,t,i);g._textureHelper.updateCubeTextures(y,v.underlyingResource,t,i,v.format,!1,!1,0,0)}else{var $=[];$.push(createImageBitmap(r.positiveX)),$.push(createImageBitmap(r.positiveY)),$.push(createImageBitmap(r.positiveZ)),$.push(createImageBitmap(r.negativeX)),$.push(createImageBitmap(r.negativeY)),$.push(createImageBitmap(r.negativeZ)),Promise.all($).then((e=>{var n=g._textureHelper.createGPUTextureForInternalTexture(x,t,i);g._textureHelper.updateCubeTextures(e,n.underlyingResource,t,i,n.format,d,!1,0,0)})).catch((e=>{console.log("CubeMapGPU createImageBitmap failed")}))}}}function x$12(e,t,i,n,r){var o;return e.bufferView?o=e.bufferView:e.arrayBufferView&&(o=e.arrayBufferView),t&&(o=V$12.flipY(o,i,n,r,r)),o}function e$1P(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.context",e.context),e.context.webgpu?this._inner=new y$S(e):this._inner=new X$X(e)}a$U.unpack=function(e,t,i){var n=x$13.unpack(e,t,l$$);return s$P.stackPartitions=n._stackPartitions,s$P.slicePartitions=n._slicePartitions,s$P.subdivisions=n._subdivisions,e$2e(i)?(o$1p.clone(n._radii,s$P.radii),i._ellipsoidGeometry=new x$13(s$P),i):(s$P.radius=n._radii.x,new a$U(s$P))},a$U.createGeometry=function(e){return x$13.createGeometry(e._ellipsoidGeometry)},Object.defineProperties(c$10.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}}),c$10.prototype.copyFrom=function(e,t,i){if(t=u$Z(t,0),i=u$Z(i,0),o$1q.defined("source",e),o$1q.typeOf.number.greaterThanOrEquals("xOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",i,0),t+e.width>this._size)throw new t$15("xOffset + source.width must be less than or equal to width.");if(i+e.height>this._size)throw new t$15("yOffset + source.height must be less than or equal to height.");var n=this._gl,r=this._textureTarget,o=this._targetFace;n.activeTexture(n.TEXTURE0),n.bindTexture(r,this._texture);var a=e.width,s=e.height,l=e.arrayBufferView,u=this._size,c=this._pixelFormat,h=this._pixelDatatype,d=this._internalFormat;const f=this._preMultiplyAlpha,p=this._flipY;let _=4;e$2e(l)&&(_=V$12.alignmentInBytes(c,h,a)),n.pixelStorei(n.UNPACK_ALIGNMENT,_),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.BROWSER_DEFAULT_WEBGL);let m=!1;if(!this._initialized){if(0===t&&0===i&&a===u&&s===u)e$2e(l)?(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),p&&(l=V$12.flipY(l,c,h,u,u)),n.texImage2D(o,0,d,u,u,0,c,_$_.toWebGLConstant(h,this._context),l)):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,p),n.texImage2D(o,0,d,c,_$_.toWebGLConstant(h,this._context),e)),m=!0;else{n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const e=V$12.createTypedArray(c,h,u,u);n.texImage2D(o,0,d,u,u,0,c,_$_.toWebGLConstant(h,this._context),e)}this._initialized=!0}m||(e$2e(l)?(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),p&&(l=V$12.flipY(l,c,h,a,s)),n.texSubImage2D(o,0,t,i,a,s,c,_$_.toWebGLConstant(h,this._context),l)):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,p),n.texSubImage2D(o,0,t,i,c,_$_.toWebGLConstant(h,this._context),e))),n.bindTexture(r,null)},c$10.prototype.copyFromFramebuffer=function(e,t,i,n,r,o){if(e=u$Z(e,0),t=u$Z(t,0),i=u$Z(i,0),n=u$Z(n,0),r=u$Z(r,this._size),o=u$Z(o,this._size),o$1q.typeOf.number.greaterThanOrEquals("xOffset",e,0),o$1q.typeOf.number.greaterThanOrEquals("yOffset",t,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferXOffset",i,0),o$1q.typeOf.number.greaterThanOrEquals("framebufferYOffset",n,0),e+r>this._size)throw new t$15("xOffset + source.width must be less than or equal to width.");if(t+o>this._size)throw new t$15("yOffset + source.height must be less than or equal to height.");if(this._pixelDatatype===_$_.FLOAT)throw new t$15("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===_$_.HALF_FLOAT)throw new t$15("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");const a=this._context._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.copyTexSubImage2D(this._targetFace,0,e,t,i,n,r,o),a.bindTexture(s,null),this._initialized=!0},Object.defineProperties(X$X.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$i.NEAREST_MIPMAP_NEAREST||t===tt$i.NEAREST_MIPMAP_LINEAR||t===tt$i.LINEAR_MIPMAP_NEAREST||t===tt$i.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;(o===_$_.FLOAT&&!r.textureFloatLinear||o===_$_.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$i.NEAREST_MIPMAP_NEAREST:tt$i.NEAREST,i=rt$k.NEAREST);var a=r._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.texParameteri(s,a.TEXTURE_MIN_FILTER,t),a.texParameteri(s,a.TEXTURE_MAG_FILTER,i),a.texParameteri(s,a.TEXTURE_WRAP_S,e.wrapS),a.texParameteri(s,a.TEXTURE_WRAP_T,e.wrapT),e$2e(this._textureFilterAnisotropic)&&a.texParameteri(s,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),a.bindTexture(s,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),X$X.prototype.generateMipmap=function(e){if(e=u$Z(e,I$1e.DONT_CARE),this._size>1&&!e$2d.isPowerOfTwo(this._size))throw new t$15("width and height must be a power of two to call generateMipmap().");if(!I$1e.validate(e))throw new t$15("hint is invalid.");this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},X$X.prototype.isDestroyed=function(){return!1},X$X.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=i$11(this._positiveX),this._negativeX=i$11(this._negativeX),this._positiveY=i$11(this._positiveY),this._negativeY=i$11(this._negativeY),this._positiveZ=i$11(this._positiveZ),this._negativeZ=i$11(this._negativeZ),i$11(this)},Object.defineProperties(y$S.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),y$S.prototype.generateMipmap=function(e){console.log("CubeMapGPU.prototype.generateMipmap"),this._hasMipmap=!0},y$S.prototype.isDestroyed=function(){return!1},y$S.prototype.destroy=function(){return this._texture.dispose(),i$11(this)},Object.defineProperties(e$1P.prototype,{positiveX:{get:function(){return this._inner.positiveX}},negativeX:{get:function(){return this._inner.negativeX}},positiveY:{get:function(){return this._inner.positiveY}},negativeY:{get:function(){return this._inner.negativeY}},positiveZ:{get:function(){return this._inner.positiveZ}},negativeZ:{get:function(){return this._inner.negativeZ}},sampler:{get:function(){return this._inner.sampler},set:function(e){this._inner.sampler=e}},pixelFormat:{get:function(){return this._inner.pixelFormat}},pixelDatatype:{get:function(){return this._inner.pixelDatatype}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},preMultiplyAlpha:{get:function(){return this._inner.preMultiplyAlpha}},flipY:{get:function(){return this._inner.flipY}},_target:{get:function(){return this._inner._target}},_texture:{get:function(){return this._inner._texture}}}),e$1P.prototype.generateMipmap=function(e){if(e=u$Z(e,I$1e.DONT_CARE),this._size>1&&!e$2d.isPowerOfTwo(this._size))throw new t$15("width and height must be a power of two to call generateMipmap().");if(!I$1e.validate(e))throw new t$15("hint is invalid.");this._inner.generateMipmap(e)},e$1P.prototype.isDestroyed=function(){return!1},e$1P.prototype.destroy=function(){return this._inner.destroy(),i$11(this)},void 0===Date.now&&(Date.now=function(){return(new Date).valueOf()});var f$X=f$X||function(){var e=[];return{REVISION:"13",getAll:function(){return e},removeAll:function(){e=[]},add:function(t){e.push(t)},remove:function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)},update:function(t){if(0===e.length)return!1;var i=0;for(t=void 0!==t?t:typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now();i<e.length;)e[i].update(t)?i++:e.splice(i,1);return!0}}}();f$X.Tween=function(e){var t=e,i={},n={},r={},o=1e3,a=0,s=!1,l=!1,u=0,c=null,h=f$X.Easing.Linear.None,d=f$X.Interpolation.Linear,f=[],p=null,_=!1,m=null,g=null,x=null,y=0,v=0;for(var $ in e)i[$]=parseFloat(e[$],10);this.to=function(e,t){return void 0!==t&&(o=t),n=e,this},this.start=function(e){for(var o in f$X.add(this),l=!0,_=!1,c=void 0!==e?e:typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now(),c+=u,n){if(n[o]instanceof Array){if(0===n[o].length)continue;n[o]=[t[o]].concat(n[o])}i[o]=t[o],i[o]instanceof Array||(i[o]*=1),r[o]=i[o]||0}return this},this.stop=function(){return l?(f$X.remove(this),l=!1,null!==x&&x.call(t),this.stopChainedTweens(),this):this},this.pause=function(){return l?(l=!1,y=typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now(),this):this},this.endPause=function(){return l||(l=!0,y=(typeof window<"u"&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now())-y,v+=y),this},this.stopChainedTweens=function(){for(var e=0,t=f.length;e<t;e++)f[e].stop()},this.delay=function(e){return u=e,this},this.repeat=function(e){return a=e,this},this.yoyo=function(e){return s=e,this},this.easing=function(e){return h=e,this},this.interpolation=function(e){return d=e,this},this.chain=function(){return f=arguments,this},this.onStart=function(e){return p=e,this},this.onUpdate=function(e){return m=e,this},this.onComplete=function(e){return g=e,this},this.onStop=function(e){return x=e,this},this.update=function(e){var x;if(e<c||!l)return!0;!1===_&&(null!==p&&p.call(t),_=!0);var y=(e-c-v)/o,$=h(y=y>1?1:y);for(x in n){var b=i[x]||0,T=n[x];T instanceof Array?t[x]=d(T,$):("string"==typeof T&&(T=b+parseFloat(T,10)),"number"==typeof T&&(t[x]=b+(T-b)*$))}if(null!==m&&m.call(t,$),1==y){if(v=0,a>0){for(x in isFinite(a)&&a--,r){if("string"==typeof n[x]&&(r[x]=r[x]+parseFloat(n[x],10)),s){var C=r[x];r[x]=n[x],n[x]=C}i[x]=r[x]}return c=e+u,!0}null!==g&&g.call(t);for(var S=0,w=f.length;S<w;S++)f[S].start(e);return!1}return!0}},f$X.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},Out:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},InOut:function(e){var t,i=.1,n=.4;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=n*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-f$X.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*f$X.Easing.Bounce.In(2*e):.5*f$X.Easing.Bounce.Out(2*e-1)+.5}}},f$X.Interpolation={Linear:function(e,t){var i=e.length-1,n=i*t,r=Math.floor(n),o=f$X.Interpolation.Utils.Linear;return t<0?o(e[0],e[1],n):t>1?o(e[i],e[i-1],i-n):o(e[r],e[r+1>i?i:r+1],n-r)},Bezier:function(e,t){var i,n=0,r=e.length-1,o=Math.pow,a=f$X.Interpolation.Utils.Bernstein;for(i=0;i<=r;i++)n+=o(1-t,r-i)*o(t,i)*e[i]*a(r,i);return n},CatmullRom:function(e,t){var i=e.length-1,n=i*t,r=Math.floor(n),o=f$X.Interpolation.Utils.CatmullRom;return e[0]===e[i]?(t<0&&(r=Math.floor(n=i*(1+t))),o(e[(r-1+i)%i],e[r],e[(r+1)%i],e[(r+2)%i],n-r)):t<0?e[0]-(o(e[0],e[0],e[1],e[1],-n)-e[0]):t>1?e[i]-(o(e[i],e[i],e[i-1],e[i-1],n-i)-e[i]):o(e[r?r-1:0],e[r],e[i<r+1?i:r+1],e[i<r+2?i:r+2],n-r)},Utils:{Linear:function(e,t,i){return(t-e)*i+e},Bernstein:function(e,t){var i=f$X.Interpolation.Utils.Factorial;return i(e)/i(t)/i(e-t)},Factorial:function(){var e=[1];return function(t){var i,n=1;if(e[t])return e[t];for(i=t;i>1;i--)n*=i;return e[t]=n}}(),CatmullRom:function(e,t,i,n,r){var o=.5*(i-e),a=.5*(n-t),s=r*r;return(2*t-2*i+o+a)*(r*s)+(-3*t+3*i-2*o-a)*s+o*r+t}}};var I$1c={LINEAR_NONE:f$X.Easing.Linear.None,QUADRACTIC_IN:f$X.Easing.Quadratic.In,QUADRACTIC_OUT:f$X.Easing.Quadratic.Out,QUADRACTIC_IN_OUT:f$X.Easing.Quadratic.InOut,CUBIC_IN:f$X.Easing.Cubic.In,CUBIC_OUT:f$X.Easing.Cubic.Out,CUBIC_IN_OUT:f$X.Easing.Cubic.InOut,QUARTIC_IN:f$X.Easing.Quartic.In,QUARTIC_OUT:f$X.Easing.Quartic.Out,QUARTIC_IN_OUT:f$X.Easing.Quartic.InOut,QUINTIC_IN:f$X.Easing.Quintic.In,QUINTIC_OUT:f$X.Easing.Quintic.Out,QUINTIC_IN_OUT:f$X.Easing.Quintic.InOut,SINUSOIDAL_IN:f$X.Easing.Sinusoidal.In,SINUSOIDAL_OUT:f$X.Easing.Sinusoidal.Out,SINUSOIDAL_IN_OUT:f$X.Easing.Sinusoidal.InOut,EXPONENTIAL_IN:f$X.Easing.Exponential.In,EXPONENTIAL_OUT:f$X.Easing.Exponential.Out,EXPONENTIAL_IN_OUT:f$X.Easing.Exponential.InOut,CIRCULAR_IN:f$X.Easing.Circular.In,CIRCULAR_OUT:f$X.Easing.Circular.Out,CIRCULAR_IN_OUT:f$X.Easing.Circular.InOut,ELASTIC_IN:f$X.Easing.Elastic.In,ELASTIC_OUT:f$X.Easing.Elastic.Out,ELASTIC_IN_OUT:f$X.Easing.Elastic.InOut,BACK_IN:f$X.Easing.Back.In,BACK_OUT:f$X.Easing.Back.Out,BACK_IN_OUT:f$X.Easing.Back.InOut,BOUNCE_IN:f$X.Easing.Bounce.In,BOUNCE_OUT:f$X.Easing.Bounce.Out,BOUNCE_IN_OUT:f$X.Easing.Bounce.InOut},m$Y=Object.freeze(I$1c);function a$T(e,t,i){this.heading=u$Z(e,0),this.pitch=u$Z(t,0),this.range=u$Z(i,0)}a$T.clone=function(e,t){if(e$2e(e))return e$2e(t)||(t=new a$T),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var e$1O={NONE:0,CATMULL_ROM:1},j$16=Object.freeze(e$1O),mr$5={};function Nr$5(e,t,i){var n,r,o;if(e instanceof o$15){var a=Math.tan(.5*e.fovy);return n=e.near,r=e.near*a,o=e.aspectRatio*r,Math.max(t*n/o,i*n/r)}return e instanceof l$10?(n=e.near,r=e.top,o=e.right,Math.max(t*n/o,i*n/r)):Math.max(t,i)}var yr$5=new o$1p,pr$5=new o$1p;function Sr$5(e,t,i,n){if(e$2e(n)&&i(.5)>n){var r=i(0),o=i(1),a=i(.5),s=a-r,l=a-o;return function(n){var a=i(n);if(n<=.5){var u=(a-r)/s;return e$2d.lerp(e,-e$2d.PI_OVER_TWO,u)}var c=(a-o)/l;return e$2d.lerp(-e$2d.PI_OVER_TWO,t,1-c)}}return function(i){return e$2d.lerp(e,t,i)}}function er$a(e,t,i,n,r){var o=r,a=Math.max(i,n);if(!e$2e(o)){var s=e.position,l=t,u=e.up,c=e.right,h=e.frustum,d=o$1p.subtract(s,l,yr$5),f=o$1p.magnitude(o$1p.multiplyByScalar(u,o$1p.dot(d,u),pr$5)),p=o$1p.magnitude(o$1p.multiplyByScalar(c,o$1p.dot(d,c),pr$5));o=Math.min(.2*Nr$5(h,f,p),1e9)}if(a<o){var _=1e6,m=-Math.pow((o-i)*_,1/8),g=Math.pow((o-n)*_,1/8);return function(e){var t=e*(g-m)+m;return-Math.pow(t,8)/_+o}}return function(e){return e$2d.lerp(i,n,e)}}function x$11(e,t){return e$2d.equalsEpsilon(e,e$2d.TWO_PI,e$2d.EPSILON11)&&(e=0),t>e+Math.PI?e+=e$2d.TWO_PI:t<e-Math.PI&&(e-=e$2d.TWO_PI),e}var dr$6=new o$1p;function Lr$5(e,t,i,n,r,o,a){var s=e.camera,l=o$1p.clone(s.position,dr$6),u=s.pitch,c=x$11(s.heading,n),h=x$11(s.roll,o),d=er$a(s,i,l.z,i.z,a);return function(e){var a=e.time/t;s.setView({orientation:{heading:e$2d.lerp(c,n,a),pitch:e$2d.lerp(u,r,a),roll:e$2d.lerp(h,o,a)}}),o$1o.lerp(l,i,a,s.position),s.position.z=d(a)}}function Wr$2(e,t){e.longitude<t.longitude?e.longitude+=e$2d.TWO_PI:t.longitude+=e$2d.TWO_PI}function zr$6(e,t){var i=e.longitude-t.longitude;i<-e$2d.PI?e.longitude+=e$2d.TWO_PI:i>e$2d.PI&&(t.longitude+=e$2d.TWO_PI)}var br$3=new a$18,Vr$4=new a$18;function jr$4(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x){var y=e.camera,v=e.mapProjection.ellipsoid,$=a$18.clone(y.positionCartographic,br$3),b=y.pitch,T=x$11(y.heading,n),C=x$11(y.roll,o),S=v.cartesianToCartographic(i,Vr$4);$.longitude=e$2d.zeroToTwoPi($.longitude),S.longitude=e$2d.zeroToTwoPi(S.longitude);var w=!1;if(e$2e(s)){var E=e$2d.zeroToTwoPi(s),P=Math.min($.longitude,S.longitude),A=Math.max($.longitude,S.longitude),L=E>=P&&E<=A;if(e$2e(l)){var M=Math.abs($.longitude-S.longitude),R=e$2d.TWO_PI-M;(L?M:R)<(L?R:M)*l&&!L&&(w=!0)}else L||(w=!0)}w?Wr$2($,S):zr$6($,S);var O=er$a(y,i,$.height,S.height,a),D=Sr$5(b,r,O,u);return function(){var i=$.longitude,r=S.longitude,a=$.latitude,s=S.latitude;return function(l){var u,v,$=l.time/t,b=d?y.positionCartographic.height:O($);if(m!==j$16.NONE&&e$2e(x)){if((u=g._times[x]+l.time)>g._times[g._times.length-1])return;var S=g.evaluate(u),w=a$18.fromCartesian(S);v=o$1p.fromRadians(w.longitude,w.latitude,b)}else v=o$1p.fromRadians(e$2d.lerp(i,r,$),e$2d.lerp(a,s,$),b);if(f){var E=a$18.fromCartesian(v),P=e.globe.getHeight(E);if(!e$2e(P))return;(b<P||b-P>0&&b-P<p)&&(E.height=P+p,v=a$18.toCartesian(E))}var A=c?y.heading:e$2d.lerp(T,n,$),L=h?y.pitch:D($),M=e$2d.lerp(C,o,$);if(_&&(A=c?y.heading:n,M=o),m!==j$16.NONE&&e$2e(x)){var R=u+.001;if(R>g._times[g._times.length-1])y.setView({destination:v,orientation:{heading:A,pitch:L,roll:M}});else{var I=g.evaluate(R),B=a$18.fromCartesian(I);I=o$1p.fromRadians(B.longitude,B.latitude,b);var F=new o$1p(I.x-v.x,I.y-v.y,I.z-v.z);o$1p.normalize(F,F);var N=m$19.buildUp(v,F);y.setView({destination:v,orientation:{direction:F,up:N}})}}else y.setView({destination:v,orientation:{heading:A,pitch:L,roll:M}})}}()}function Rr$4(e,t,i,n,r,o,a){var s=e.camera,l=o$1p.clone(s.position,dr$6),u=x$11(s.heading,n),c=s.frustum.right-s.frustum.left,h=er$a(s,i,c,i.z,a);return function(e){var r=e.time/t;s.setView({orientation:{heading:e$2d.lerp(u,n,r)}}),o$1o.lerp(l,i,r,s.position);var o=h(r),a=s.frustum,c=a.top/a.right,d=.5*(o-(a.right-a.left));a.right+=d,a.left-=d,a.top=c*a.right,a.bottom=-a.top}}var hr$5=new a$18,Ur$5=new o$1p;function tr$8(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function gr$6(e,t){return function(){"function"==typeof t&&t(),e.enableInputs=!0}}mr$5.createTween=function(e,t){var i=(t=u$Z(t,u$Z.EMPTY_OBJECT)).destination;if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(i))throw new t$15("destination is required.");var n=e.mode;if(n===C$14.MORPHING)return tr$8();var r=u$Z(t.convert,!0),o=e.mapProjection,a=o.ellipsoid,s=t.maximumHeight,l=t.flyOverLongitude,u=t.flyOverLongitudeWeight,c=t.pitchAdjustHeight,h=t.easingFunction,d=t.flyClampToGround,f=t.flyRelativeHeight,p=t.interpolationMode,_=t.catmullRomSpline,m=t.preStopIndex;r&&n!==C$14.SCENE3D&&(a.cartesianToCartographic(i,hr$5),i=o.project(hr$5,Ur$5));var g=e.camera,x=t.endTransform;e$2e(x)&&g._setTransform(x);var y=t.duration;e$2e(y)||(y=Math.ceil(o$1p.distance(g.position,i)/1e6)+2,y=Math.min(y,3));var v=u$Z(t.heading,0),$=u$Z(t.pitch,-e$2d.PI_OVER_TWO),b=u$Z(t.roll,0),T=u$Z(t.headingFree,!1),C=u$Z(t.pitchFree,!1),S=u$Z(t.altitudeFree,!1),w=u$Z(t.directTurning,!1),E=e.screenSpaceCameraController;E.enableInputs=t.headingFree||t.pitchFree||t.altitudeFree;var P=gr$6(E,t.complete),A=gr$6(E,t.cancel),L=g.frustum,M=e.mode===C$14.SCENE2D;if(M=(M=(M=(M=M&&o$1o.equalsEpsilon(g.position,i,e$2d.EPSILON6))&&e$2d.equalsEpsilon(Math.max(L.right-L.left,L.top-L.bottom),i.z,e$2d.EPSILON6))||e.mode!==C$14.SCENE2D&&o$1p.equalsEpsilon(i,g.position,e$2d.EPSILON10))&&e$2d.equalsEpsilon(e$2d.negativePiToPi(v),e$2d.negativePiToPi(g.heading),e$2d.EPSILON10)&&e$2d.equalsEpsilon(e$2d.negativePiToPi($),e$2d.negativePiToPi(g.pitch),e$2d.EPSILON10)&&e$2d.equalsEpsilon(e$2d.negativePiToPi(b),e$2d.negativePiToPi(g.roll),e$2d.EPSILON10))return tr$8(P,A);var R=new Array(4);if(R[C$14.SCENE2D]=Rr$4,R[C$14.SCENE3D]=jr$4,R[C$14.COLUMBUS_VIEW]=Lr$5,y<=0){return tr$8((function(){R[n](e,1,i,v,$,b,s,l,u,c)({time:1}),"function"==typeof P&&P()}),A)}var O=R[n](e,y,i,v,$,b,s,l,u,c,T,C,S,d,f,w,p,_,m);if(!e$2e(h)){var D=g.positionCartographic.height;h=D>(n===C$14.SCENE3D?a.cartesianToCartographic(i).height:i.z)&&D>11500?m$Y.CUBIC_OUT:m$Y.QUINTIC_IN_OUT}return{duration:y,easingFunction:h,startObject:{time:0},stopObject:{time:y},update:O,complete:P,cancel:A}};var e$1N={ROTATE:0,INFINITE_SCROLL:1},Rr$3=Object.freeze(e$1N);function v$K(e){if(!e$2e(e))throw new t$15("scene is required.");this._scene=e,this._transform=p$1d.clone(p$1d.IDENTITY),this._invTransform=p$1d.clone(p$1d.IDENTITY),this._actualTransform=p$1d.clone(p$1d.IDENTITY),this._actualInvTransform=p$1d.clone(p$1d.IDENTITY),this._transformChanged=!1,this.position=new o$1p,this._position=new o$1p,this._positionWC=new o$1p,this._positionCartographic=new a$18,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.direction=new o$1p,this._direction=new o$1p,this._directionWC=new o$1p,this.up=new o$1p,this._up=new o$1p,this._upWC=new o$1p,this.right=new o$1p,this._right=new o$1p,this._rightWC=new o$1p,this.frustum=new o$15,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=e$2d.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new o$1h,this._moveEnd=new o$1h,this._changed=new o$1h,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this.percentageChanged=.5,this._refinePercentageChanged=.001,this._viewMatrix=new p$1d,this._invViewMatrix=new p$1d,zt$6(this),this._mode=C$14.SCENE3D,this._modeChanged=!0;var t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new a$18(Math.PI,e$2d.PI_OVER_TWO)),this._max2Dfrustum=void 0,this._suspendTerrainAdjustment=!1,Xt$4(this,v$K.DEFAULT_VIEW_RECTANGLE,this.position,!0);var i=o$1p.magnitude(this.position);i+=i*v$K.DEFAULT_VIEW_FACTOR,o$1p.normalize(this.position,this.position),o$1p.multiplyByScalar(this.position,i,this.position),this.bReflect=!1,this._bReflect=!1,this._reflectMatrix=new p$1d,this._reflectPosition=new o$1p,this._reflectUp=new o$1p,this._reflectDirection=new o$1p,this._reflectRight=new o$1p,this._isFlyCircle=!1,this._flyCircleCenter=new o$1p,this._flyCircleLoop=!1,this._isResetFlyCircleParm=!1,this._speedRatio=1,this._flyClampToGround=!1,this._flyRelativeHeight=10,this._sensitivePosition=void 0,this._sensitivePositionRatio=0,this._sensitiveRegionRatio=0,this._endLevel=22,this._stateChanged=!0,this._preciseSensitivePosition=!1,this._enableIndoorColliDetection=!1,this.zoomLevel=1}function zt$6(e){p$1d.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),p$1d.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),p$1d.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function ui$7(e){if(e$2e(e._oldPositionWC)){e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;var t=o$1p.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=o$1p.magnitude(t),e._oldPositionWC=o$1p.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=Et$c()):e.timeSinceMoved=Math.max(Et$c()-e._lastMovedTimestamp,0)/1e3}else e._oldPositionWC=o$1p.clone(e.positionWC,e._oldPositionWC)}v$K.TRANSFORM_2D=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),v$K.TRANSFORM_2D_INVERSE=p$1d.inverseTransformation(v$K.TRANSFORM_2D,new p$1d),v$K.DEFAULT_VIEW_RECTANGLE=h$18.fromDegrees(70,0,140,60),v$K.DEFAULT_VIEW_FACTOR=.5,v$K.DEFAULT_OFFSET=new a$T(0,-e$2d.PI_OVER_FOUR,0),v$K.prototype.canPreloadFlight=function(){return e$2e(this._currentFlight)&&this._mode!==C$14.SCENE2D},v$K.prototype._updateCameraChanged=function(){var e=this;if(ui$7(e),this._stateChanged=!1,0!==e._changed.numberOfListeners){var t=e.percentageChanged,i=e._refinePercentageChanged;if(e._mode===C$14.SCENE2D){if(!e$2e(e._changedFrustum))return e._changedPosition=o$1p.clone(e.position,e._changedPosition),void(e._changedFrustum=e.frustum.clone());var n,r=e.position,o=e._changedPosition,a=e.frustum,s=e._changedFrustum,l=r.x+a.left,u=r.x+a.right,c=o.x+s.left,h=o.x+s.right,d=r.y+a.bottom,f=r.y+a.top,p=o.y+s.bottom,_=o.y+s.top,m=Math.max(l,c),g=Math.min(u,h),x=Math.max(d,p),y=Math.min(f,_);if(m>=g||x>=f)n=1;else{var v=s;l<c&&u>h&&d<p&&f>_&&(v=a),n=1-(g-m)*(y-x)/((v.right-v.left)*(v.top-v.bottom))}return void(n>t&&(e._changed.raiseEvent(n),e._changedPosition=o$1p.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum)))}if(!e$2e(e._changedDirection))return e._changedPosition=o$1p.clone(e.positionWC,e._changedPosition),void(e._changedDirection=o$1p.clone(e.directionWC,e._changedDirection));var $,b=e$2d.acosClamped(o$1p.dot(e.directionWC,e._changedDirection));$=e$2e(e.frustum.fovy)?b/(.5*e.frustum.fovy):b;var T=o$1p.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;($>t||T>t)&&(e._changed.raiseEvent(Math.max($,T)),e._changedPosition=o$1p.clone(e.positionWC,e._changedPosition),e._changedDirection=o$1p.clone(e.directionWC,e._changedDirection)),($>i||T>i)&&(e._changed.raiseEvent(Math.max($,T)),this._stateChanged=!0,e._changedPosition=o$1p.clone(e.positionWC,e._changedPosition),e._changedDirection=o$1p.clone(e.directionWC,e._changedDirection))}};var ci$8=new p$1d,fi$7=new a$18;function di$7(e){m$19.basisTo2D(e._projection,e._transform,e._actualTransform)}v$K.prototype._adjustHeightForTerrain=function(){var e=this._scene,t=e.screenSpaceCameraController,i=t.enableCollisionDetection,n=t.minimumCollisionTerrainHeight,r=t.minimumZoomDistance;if(!this._suspendTerrainAdjustment&&i){var o=this._mode,a=e.globe;if(e$2e(a)&&o!==C$14.SCENE2D&&o!==C$14.MORPHING){var s,l,u=a.ellipsoid,c=e.mapProjection;p$1d.equals(this.transform,p$1d.IDENTITY)||(s=p$1d.clone(this.transform,ci$8),l=o$1p.magnitude(this.position),this._setTransform(p$1d.IDENTITY));var h=fi$7;o===C$14.SCENE3D?u.cartesianToCartographic(this.position,h):c.unproject(this.position,h);var d=!1;if(h.height<n){var f=a.getHeight(h);e$2e(f)&&(f+=r,h.height<f&&(h.height=f,o===C$14.SCENE3D?u.cartographicToCartesian(h,this.position):c.project(h,this.position),d=!0))}e$2e(s)&&(this._setTransform(s),d&&(o$1p.normalize(this.position,this.position),o$1p.negate(this.position,this.direction),o$1p.multiplyByScalar(this.position,Math.max(l,r),this.position),o$1p.normalize(this.direction,this.direction),o$1p.cross(this.direction,this.up,this.right),o$1p.cross(this.right,this.direction,this.up)))}}};var li$7=new a$18,vi$7=new o$1p,ut$d=new o$1p,pi$8=new e$2c,gi$8=new e$2c,_i$9=new e$2c,mi$5=new e$2c,Ci$7=new e$2c;function yi$7(e){var t=e._projection,i=t.ellipsoid,n=p$1d.getColumn(e._transform,3,pi$8),r=i.cartesianToCartographic(n,li$7),o=t.project(r,vi$7),a=gi$8;a.x=o.z,a.y=o.x,a.z=o.y,a.w=1;var s=e$2c.clone(e$2c.UNIT_X,Ci$7),l=e$2c.add(p$1d.getColumn(e._transform,0,ut$d),n,ut$d);i.cartesianToCartographic(l,r),t.project(r,o);var u=_i$9;u.x=o.z,u.y=o.x,u.z=o.y,u.w=0,o$1p.subtract(u,a,u),u.x=0;var c=mi$5;if(o$1p.magnitudeSquared(u)>e$2d.EPSILON10)o$1p.cross(s,u,c);else{var h=e$2c.add(p$1d.getColumn(e._transform,1,ut$d),n,ut$d);i.cartesianToCartographic(h,r),t.project(r,o),c.x=o.z,c.y=o.x,c.z=o.y,c.w=0,o$1p.subtract(c,a,c),c.x=0,o$1p.magnitudeSquared(c)<e$2d.EPSILON10&&(e$2c.clone(e$2c.UNIT_Y,u),e$2c.clone(e$2c.UNIT_Z,c))}o$1p.cross(c,s,u),o$1p.normalize(u,u),o$1p.cross(s,u,c),o$1p.normalize(c,c),p$1d.setColumn(e._actualTransform,0,u,e._actualTransform),p$1d.setColumn(e._actualTransform,1,c,e._actualTransform),p$1d.setColumn(e._actualTransform,2,s,e._actualTransform),p$1d.setColumn(e._actualTransform,3,a,e._actualTransform)}var Tt$c=new o$1p;function D$Z(e){var t=e._mode,i=!1,n=0;t===C$14.SCENE2D&&(i=(n=e.frustum.right-e.frustum.left)!==e._positionCartographic.height);var r=e._position,o=!o$1p.equals(r,e.position)||i;o&&(r=o$1p.clone(e.position,e._position));var a=e._direction,s=!o$1p.equals(a,e.direction);s&&(o$1p.normalize(e.direction,e.direction),a=o$1p.clone(e.direction,e._direction));var l=e._up,u=!o$1p.equals(l,e.up);u&&(o$1p.normalize(e.up,e.up),l=o$1p.clone(e.up,e._up));var c=e._right,h=!o$1p.equals(c,e.right);h&&(o$1p.normalize(e.right,e.right),c=o$1p.clone(e.right,e._right));var d=!1;e.bReflect!=e._bReflect&&(e._bReflect=e.bReflect,d=!0);var f=e._transformChanged||e._modeChanged;e._transformChanged=!1,f&&(p$1d.inverseTransformation(e._transform,e._invTransform),e._mode===C$14.COLUMBUS_VIEW||e._mode===C$14.SCENE2D?p$1d.equals(p$1d.IDENTITY,e._transform)?p$1d.clone(v$K.TRANSFORM_2D,e._actualTransform):e._mode===C$14.COLUMBUS_VIEW?di$7(e):yi$7(e):p$1d.clone(e._transform,e._actualTransform),p$1d.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);var p=e._actualTransform;if(o||f)if(e._positionWC=p$1d.multiplyByPoint(p,r,e._positionWC),t===C$14.SCENE3D||t===C$14.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{var _=Tt$c;_.x=e._positionWC.y,_.y=e._positionWC.z,_.z=e._positionWC.x,t===C$14.SCENE2D&&(_.z=n),e._projection.unproject(_,e._positionCartographic)}if(s||u||h){var m=o$1p.dot(a,o$1p.cross(l,c,Tt$c));if(Math.abs(1-m)>e$2d.EPSILON2){var g=1/o$1p.magnitudeSquared(l),x=o$1p.dot(l,a)*g,y=o$1p.multiplyByScalar(a,x,Tt$c);l=o$1p.normalize(o$1p.subtract(l,y,e._up),e._up),o$1p.clone(l,e.up),c=o$1p.cross(a,l,e._right),o$1p.clone(c,e.right)}}(s||f)&&(e._directionWC=p$1d.multiplyByPointAsVector(p,a,e._directionWC),o$1p.normalize(e._directionWC,e._directionWC)),(u||f)&&(e._upWC=p$1d.multiplyByPointAsVector(p,l,e._upWC),o$1p.normalize(e._upWC,e._upWC)),(h||f)&&(e._rightWC=p$1d.multiplyByPointAsVector(p,c,e._rightWC),o$1p.normalize(e._rightWC,e._rightWC)),(o||s||u||h||f||d)&&zt$6(e)}function Bt$a(e,t){var i;return i=e$2d.equalsEpsilon(Math.abs(e.z),1,e$2d.EPSILON3)?Math.atan2(t.y,t.x)-e$2d.PI_OVER_TWO:Math.atan2(e.y,e.x)-e$2d.PI_OVER_TWO,e$2d.TWO_PI-e$2d.zeroToTwoPi(i)}function bt$a(e){return e$2d.PI_OVER_TWO-e$2d.acosClamped(e.z)}function Lt$8(e,t,i){var n=0;return e$2d.equalsEpsilon(Math.abs(e.z),1,e$2d.EPSILON3)||(n=Math.atan2(-i.z,t.z),n=e$2d.zeroToTwoPi(n+e$2d.TWO_PI)),n}var ct$c=new p$1d,ft$b=new p$1d;Object.defineProperties(v$K.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return D$Z(this),this._invTransform}},viewMatrix:{get:function(){return D$Z(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return D$Z(this),this._invViewMatrix}},positionCartographic:{get:function(){return D$Z(this),this._positionCartographic}},positionWC:{get:function(){return D$Z(this),this._positionWC}},directionWC:{get:function(){return D$Z(this),this._directionWC}},upWC:{get:function(){return D$Z(this),this._upWC}},rightWC:{get:function(){return D$Z(this),this._rightWC}},heading:{get:function(){if(this._mode!==C$14.MORPHING){var e=this._projection.ellipsoid,t=p$1d.clone(this._transform,ct$c),i=m$19.eastNorthUpToFixedFrame(this.positionWC,e,ft$b);this._setTransform(i);var n=Bt$a(this.direction,this.up);return this._setTransform(t),n}}},pitch:{get:function(){if(this._mode!==C$14.MORPHING){var e=this._projection.ellipsoid,t=p$1d.clone(this._transform,ct$c),i=m$19.eastNorthUpToFixedFrame(this.positionWC,e,ft$b);this._setTransform(i);var n=bt$a(this.direction);return this._setTransform(t),n}}},roll:{get:function(){if(this._mode!==C$14.MORPHING){var e=this._projection.ellipsoid,t=p$1d.clone(this._transform,ct$c),i=m$19.eastNorthUpToFixedFrame(this.positionWC,e,ft$b);this._setTransform(i);var n=Lt$8(this.direction,this.up,this.right);return this._setTransform(t),n}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}},flyCircleLoop:{set:function(e){this._flyCircleLoop!==e&&(this._isResetFlyCircleParm=!0),this._flyCircleLoop=e},get:function(){return this._flyCircleLoop}},speedRatio:{get:function(){return this._speedRatio},set:function(e){this._speedRatio=e}},flyClampToGround:{set:function(e){this._flyClampToGround=e},get:function(){return this._flyClampToGround}},flyRelativeHeight:{set:function(e){this._flyRelativeHeight=e},get:function(){return this._flyRelativeHeight}},sensitivePositionRatio:{set:function(e){this._sensitivePositionRatio=e$2d.clamp(e,0,1)},get:function(){return this._sensitivePositionRatio}},preciseSensitivePosition:{set:function(e){e$2e(e)&&"boolean"==typeof e&&(this._preciseSensitivePosition=e)},get:function(){return this._preciseSensitivePosition}},sensitiveRegionRatio:{set:function(e){this._sensitiveRegionRatio=e},get:function(){return this._sensitiveRegionRatio}}}),v$K.prototype._computeSensitivePosition=function(){if(this._scene.mode===C$14.SCENE3D){var e=this._scene.canvas,t=this._scene.frameState;dt$c.x=e.clientWidth/2,dt$c.y=e.clientHeight/2;var i=void 0;if(e$2e(this._scene.globe)&&this._preciseSensitivePosition&&(e$2e(i=this._scene.pickPositionWorldCoordinates(dt$c,wi$6,!0))&&(this._sensitivePosition=i)),!e$2e(i)){var n=this.getPickRay(dt$c),r=t$12.WGS84,o=r.maximumRadius;e$2e(t.averageTerrainHeight)&&0!=t.averageTerrainHeight&&(r=new t$12(o+t.averageTerrainHeight,o+t.averageTerrainHeight,o+t.averageTerrainHeight));var a=g$1j.rayEllipsoid(n,r);if(e$2e(a)){Et$b.x=e.clientWidth/2,Et$b.y=0;var s=this.getPickRay(Et$b);if(e$2e(g$1j.rayEllipsoid(s,r)))this._sensitivePosition=f$19.getPoint(n,a.start);else{var l,u=o$1p.magnitude(this.position);l=u<o?e$2d.PI_OVER_TWO:Math.asin(o/u);var c=new f$19(this.position,new o$1p(-this.position.x,-this.position.y,-this.position.z)),h=new o$1p(c.origin.x+c.direction.x,c.origin.y+c.direction.y,c.origin.z+c.direction.z),d=new o$1p(n.origin.x+n.direction.x,n.origin.y+n.direction.y,n.origin.z+n.direction.z),f=o$1p.distance(h,d),p=2*Math.asin(.5*f),_=(.5*this.frustum.fov-(l-p))/this.frustum.fov,m=e.clientHeight*(1+_)*.5;if(!Number.isNaN(m)){var g=new o$1o(.5*e.clientWidth,m),x=this.getPickRay(g),y=g$1j.rayEllipsoid(x,r);e$2e(y)?this._sensitivePosition=f$19.getPoint(x,y.start):this._sensitivePosition=void 0}}}else this._sensitivePosition=void 0}var v=t._quadtree;if(e$2e(v)){m=t.context.drawingBufferHeight;var $=this.frustum.sseDenominator;if(this._positionCartographic.height,e$2e(this._sensitivePosition)){var b=o$1p.distance(this.positionWC,this._sensitivePosition),T=v._tileProvider.getLevelMaximumGeometricError(0);this.zoomLevel=e$2d.log2(T*m/(2*v.maximumScreenSpaceError*b*$))}}}};var Et$b=new o$1o,dt$c=new o$1o,wi$6=new o$1p;v$K.prototype.update=function(e){if(!e$2e(e))throw new t$15("mode is required.");if(e===C$14.SCENE2D&&!(this.frustum instanceof l$11))throw new t$15("An OrthographicOffCenterFrustum is required in 2D.");if(!(e!==C$14.SCENE3D&&e!==C$14.COLUMBUS_VIEW||this.frustum instanceof o$15||this.frustum instanceof a$V))throw new t$15("A PerspectiveFrustum or OrthographicFrustum is required in 3D and Columbus view");var t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==C$14.MORPHING,t=this._mode===C$14.SCENE2D),t){var i=this._max2Dfrustum=this.frustum.clone();if(!(i instanceof l$11))throw new t$15("The camera frustum is expected to be orthographic for 2D camera control.");var n=i.top/i.right;i.right=2*this._maxCoord.x,i.left=-i.right,i.top=n*i.right,i.bottom=-i.top}this._mode===C$14.SCENE2D&&jt$7(this,this.position);var r=this._scene.globe,o=!e$2e(r)||r._surface.tileProvider.ready&&0===r._surface._tileLoadQueueHigh.length&&0===r._surface._tileLoadQueueMedium.length&&0===r._surface._tileLoadQueueLow.length&&0===r._surface._debug.tilesWaitingForChildren;this._suspendTerrainAdjustment&&(this._suspendTerrainAdjustment=!o),o&&this._adjustHeightForTerrain(),this._isFlyCircle&&this._flyCircle(this._flyCircleCenter)};var Ti$6=new o$1p,Ei$6=new o$1p,Pi$7=new o$1p;v$K.prototype._setTransform=function(e){var t=o$1p.clone(this.positionWC,Ti$6),i=o$1p.clone(this.upWC,Ei$6),n=o$1p.clone(this.directionWC,Pi$7);p$1d.clone(e,this._transform),this._transformChanged=!0,D$Z(this);var r=this._actualInvTransform;p$1d.multiplyByPoint(r,t,this.position),p$1d.multiplyByPointAsVector(r,n,this.direction),p$1d.multiplyByPointAsVector(r,i,this.up),o$1p.cross(this.direction,this.up,this.right),D$Z(this)};var Ri$5=new o$1o,Si$6=new f$19,Ii$5=new o$1p,Mi$6=new o$1p;v$K.prototype._adjustOrthographicFrustum=function(e){if(this.frustum instanceof a$V&&(e||!(this._positionCartographic.height<15e4))){if(!p$1d.equals(p$1d.IDENTITY,this.transform))return void(this.frustum.width=o$1p.magnitude(this.position));var t,i,n=this._scene,r=n.globe;if(e$2e(r)){var o=Ri$5;o.x=n.drawingBufferWidth/2,o.y=n.drawingBufferHeight/2;var a=this.getPickRay(o,Si$6);if(t=r.pickWorldCoordinates(a,n,Ii$5),n.pickPositionSupported&&(i=n.pickPositionWorldCoordinates(o,Mi$6)),e$2e(t)&&e$2e(i)){var s=e$2e(i)?o$1p.distance(i,this.positionWC):Number.POSITIVE_INFINITY,l=e$2e(t)?o$1p.distance(t,this.positionWC):Number.POSITIVE_INFINITY;this.frustum.width=Math.min(s,l)}else e$2e(i)?this.frustum.width=o$1p.distance(i,this.positionWC):e$2e(t)&&(this.frustum.width=o$1p.distance(t,this.positionWC))}if(!e$2e(r)||!e$2e(t)&&!e$2e(i)){var u=Math.max(this.positionCartographic.height,0);this.frustum.width=u}}};var lt$7=new o$1p,Pt$8=new p$1d,Wi$5=new p$1d,Rt$a=new n$15,St$8=new p$1e,Ht$7=new a$18;function Di$7(e,t,i){var n=p$1d.clone(e.transform,Pt$8),r=m$19.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,Wi$5);e._setTransform(r),o$1p.clone(o$1p.ZERO,e.position),i.heading=i.heading-e$2d.PI_OVER_TWO;var o=n$15.fromHeadingPitchRoll(i,Rt$a),a=p$1e.fromQuaternion(o,St$8);p$1e.getColumn(a,0,e.direction),p$1e.getColumn(a,2,e.up),o$1p.cross(e.direction,e.up,e.right),e._setTransform(n),e._adjustOrthographicFrustum(!0)}function xi$7(e,t,i,n){var r=p$1d.clone(e.transform,Pt$8);if(e._setTransform(p$1d.IDENTITY),!o$1p.equals(t,e.positionWC)){if(n){var o=e._projection,a=o.ellipsoid.cartesianToCartographic(t,Ht$7);t=o.project(a,lt$7)}o$1p.clone(t,e.position)}i.heading=i.heading-e$2d.PI_OVER_TWO;var s=n$15.fromHeadingPitchRoll(i,Rt$a),l=p$1e.fromQuaternion(s,St$8);p$1e.getColumn(l,0,e.direction),p$1e.getColumn(l,2,e.up),o$1p.cross(e.direction,e.up,e.right),e._setTransform(r),e._adjustOrthographicFrustum(!0)}function Oi$5(e,t,i,n){var r=p$1d.clone(e.transform,Pt$8);if(e._setTransform(p$1d.IDENTITY),!o$1p.equals(t,e.positionWC)){if(n){var o=e._projection,a=o.ellipsoid.cartesianToCartographic(t,Ht$7);t=o.project(a,lt$7)}o$1o.clone(t,e.position);var s=.5*-t.z,l=-s,u=e.frustum;if(l>s){var c=u.top/u.right;u.right=l,u.left=s,u.top=u.right*c,u.bottom=-u.top}}if(e._scene.mapMode2D===Rr$3.ROTATE){i.heading=i.heading-e$2d.PI_OVER_TWO,i.pitch=-e$2d.PI_OVER_TWO,i.roll=0;var h=n$15.fromHeadingPitchRoll(i,Rt$a),d=p$1e.fromQuaternion(h,St$8);p$1e.getColumn(d,2,e.up),o$1p.cross(e.direction,e.up,e.right)}e._setTransform(r)}var Ni$6=new o$1p,Ai$5=new o$1p,Fi$4=new o$1p;function Ut$8(e,t,i,n){var r=o$1p.clone(i.direction,Ni$6),o=o$1p.clone(i.up,Ai$5);if(e._scene.mode===C$14.SCENE3D){var a=e._projection.ellipsoid,s=m$19.eastNorthUpToFixedFrame(t,a,ct$c),l=p$1d.inverseTransformation(s,ft$b);p$1d.multiplyByPointAsVector(l,r,r),p$1d.multiplyByPointAsVector(l,o,o)}var u=o$1p.cross(r,o,Fi$4);return n.heading=Bt$a(r,o),n.pitch=bt$a(r),n.roll=Lt$8(r,o,u),n}var It$c={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},tt$h=new i$16;v$K.prototype.setView=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.orientation,u$Z.EMPTY_OBJECT),i=this._mode;if(i!==C$14.MORPHING){e$2e(e.endTransform)&&this._setTransform(e.endTransform);var n=u$Z(e.convert,!0),r=u$Z(e.destination,o$1p.clone(this.positionWC,lt$7));e$2e(r)&&e$2e(r.west)&&(r=this.getRectangleCameraCoordinates(r,lt$7),n=!1),e$2e(t.direction)&&(t=Ut$8(this,r,t,It$c.orientation)),tt$h.heading=u$Z(t.heading,0),tt$h.pitch=u$Z(t.pitch,-e$2d.PI_OVER_TWO),tt$h.roll=u$Z(t.roll,0),this._suspendTerrainAdjustment=!0,i===C$14.SCENE3D?Di$7(this,r,tt$h):i===C$14.SCENE2D?Oi$5(this,r,tt$h,n):xi$7(this,r,tt$h,n)}};var Vi$6=new o$1p;function jt$7(e,t){var i,n,r=e._scene.mapMode2D===Rr$3.ROTATE,o=e._maxCoord.x,a=e._maxCoord.y;r?i=-(n=o):(n=t.x-2*o,i=t.x+2*o),t.x>o&&(t.x=n),t.x<-o&&(t.x=i),t.y>a&&(t.y=a),t.y<-a&&(t.y=-a)}v$K.prototype.flyHome=function(e){var t=this._mode;if(t===C$14.MORPHING&&this._scene.completeMorph(),t===C$14.SCENE2D)this.flyTo({destination:v$K.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:p$1d.IDENTITY});else if(t===C$14.SCENE3D){var i=this.getRectangleCameraCoordinates(v$K.DEFAULT_VIEW_RECTANGLE),n=o$1p.magnitude(i);n+=n*v$K.DEFAULT_VIEW_FACTOR,o$1p.normalize(i,i),o$1p.multiplyByScalar(i,n,i),this.flyTo({destination:i,duration:e,endTransform:p$1d.IDENTITY})}else if(t===C$14.COLUMBUS_VIEW){var r=this._projection.ellipsoid.maximumRadius,o=new o$1p(0,-1,1);o=o$1p.multiplyByScalar(o$1p.normalize(o,o),5*r,o),this.flyTo({destination:o,duration:e,orientation:{heading:0,pitch:-Math.acos(o$1p.normalize(o,Vi$6).z),roll:0},endTransform:p$1d.IDENTITY,convert:!1})}},v$K.prototype.worldToCameraCoordinates=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required.");return e$2e(t)||(t=new e$2c),D$Z(this),p$1d.multiplyByVector(this._actualInvTransform,e,t)},v$K.prototype.worldToCameraCoordinatesPoint=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required.");return e$2e(t)||(t=new o$1p),D$Z(this),p$1d.multiplyByPoint(this._actualInvTransform,e,t)},v$K.prototype.worldToCameraCoordinatesVector=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required.");return e$2e(t)||(t=new o$1p),D$Z(this),p$1d.multiplyByPointAsVector(this._actualInvTransform,e,t)},v$K.prototype.cameraToWorldCoordinates=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required.");return e$2e(t)||(t=new e$2c),D$Z(this),p$1d.multiplyByVector(this._actualTransform,e,t)},v$K.prototype.cameraToWorldCoordinatesPoint=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required.");return e$2e(t)||(t=new o$1p),D$Z(this),p$1d.multiplyByPoint(this._actualTransform,e,t)},v$K.prototype.cameraToWorldCoordinatesVector=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required.");return e$2e(t)||(t=new o$1p),D$Z(this),p$1d.multiplyByPointAsVector(this._actualTransform,e,t)};var vt$c=new o$1p;v$K.prototype.move=function(e,t){if(!e$2e(e))throw new t$15("direction is required.");var i=this._scene;if(this._enableIndoorColliDetection){o$1p.multiplyByScalar(e,Math.sign(t),vt$c);var n=i.collideDetection(vt$c);if(e$2e(n))if(o$1p.distance(this.position,n)<1)return}var r=this.position;o$1p.multiplyByScalar(e,t,vt$c),o$1p.add(r,vt$c,r),this._mode===C$14.SCENE2D&&jt$7(this,r),this._adjustOrthographicFrustum(!0)},v$K.prototype.moveForward=function(e){e=u$Z(e,this.defaultMoveAmount),this._mode===C$14.SCENE2D?pt$c(this,e):this.move(this.direction,e)},v$K.prototype.moveBackward=function(e){e=u$Z(e,this.defaultMoveAmount),this._mode===C$14.SCENE2D?pt$c(this,-e):this.move(this.direction,-e)},v$K.prototype.moveUp=function(e){e=u$Z(e,this.defaultMoveAmount),this.move(this.up,e)},v$K.prototype.moveDown=function(e){e=u$Z(e,this.defaultMoveAmount),this.move(this.up,-e)},v$K.prototype.moveRight=function(e){e=u$Z(e,this.defaultMoveAmount),this.move(this.right,e)},v$K.prototype.moveLeft=function(e){e=u$Z(e,this.defaultMoveAmount),this.move(this.right,-e)},v$K.prototype.lookLeft=function(e){e=u$Z(e,this.defaultLookAmount),this._mode!==C$14.SCENE2D&&this.look(this.up,-e)},v$K.prototype.lookRight=function(e){e=u$Z(e,this.defaultLookAmount),this._mode!==C$14.SCENE2D&&this.look(this.up,e)},v$K.prototype.lookUp=function(e){e=u$Z(e,this.defaultLookAmount),this._mode!==C$14.SCENE2D&&this.look(this.right,-e)},v$K.prototype.lookDown=function(e){e=u$Z(e,this.defaultLookAmount),this._mode!==C$14.SCENE2D&&this.look(this.right,e)};var zi$6=new n$15,Bi$4=new p$1e;v$K.prototype.look=function(e,t){if(!e$2e(e))throw new t$15("axis is required.");var i=u$Z(t,this.defaultLookAmount),n=n$15.fromAxisAngle(e,-i,zi$6),r=p$1e.fromQuaternion(n,Bi$4),o=this.direction,a=this.up,s=this.right;p$1e.multiplyByVector(r,o,o),p$1e.multiplyByVector(r,a,a),p$1e.multiplyByVector(r,s,s)},v$K.prototype.twistLeft=function(e){e=u$Z(e,this.defaultLookAmount),this.look(this.direction,e)},v$K.prototype.twistRight=function(e){e=u$Z(e,this.defaultLookAmount),this.look(this.direction,-e)};var bi$7=new n$15,Li$4=new p$1e;v$K.prototype.rotate=function(e,t){if(!e$2e(e))throw new t$15("axis is required.");var i=u$Z(t,this.defaultRotateAmount),n=n$15.fromAxisAngle(e,-i,bi$7),r=p$1e.fromQuaternion(n,Li$4);p$1e.multiplyByVector(r,this.position,this.position),p$1e.multiplyByVector(r,this.direction,this.direction),p$1e.multiplyByVector(r,this.up,this.up),o$1p.cross(this.direction,this.up,this.right),o$1p.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)},v$K.prototype.rotateDown=function(e){Zt$6(this,e=u$Z(e,this.defaultRotateAmount))},v$K.prototype.rotateUp=function(e){Zt$6(this,-(e=u$Z(e,this.defaultRotateAmount)))};var Hi$5=new o$1p,Ui$5=new o$1p,ji$5=new o$1p,kt$7=new o$1p;function Zt$6(e,t){var i=e.position,n=o$1p.normalize(i,Hi$5);if(e$2e(e.constrainedAxis)){var r=o$1p.equalsEpsilon(n,e.constrainedAxis,e$2d.EPSILON2),o=o$1p.equalsEpsilon(n,o$1p.negate(e.constrainedAxis,kt$7),e$2d.EPSILON2);if(r||o)(r&&t<0||o&&t>0)&&e.rotate(e.right,t);else{var a=o$1p.normalize(e.constrainedAxis,Ui$5),s=o$1p.dot(n,a),l=e$2d.acosClamped(s);t>0&&t>l&&(t=l-e$2d.EPSILON4),s=o$1p.dot(n,o$1p.negate(a,kt$7)),l=e$2d.acosClamped(s),t<0&&-t>l&&(t=-l+e$2d.EPSILON4);var u=o$1p.cross(a,n,ji$5),c=o$1p.dot(u,e.right);if(c<0&&t>0)return;u=c<0?o$1p.negate(u,u):u,e.rotate(u,t)}}else e.rotate(e.right,t)}function Yt$7(e,t){e$2e(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function pt$c(e,t){var i,n=e.frustum;if(!(n instanceof l$11&&e$2e(n.left)&&e$2e(n.right)&&e$2e(n.bottom)&&e$2e(n.top)))throw new t$15("The camera frustum is expected to be orthographic for 2D camera control.");if(t*=.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){var r=n.top-t,o=n.bottom+t,a=e._maxCoord.y;e._scene.mapMode2D===Rr$3.ROTATE&&(a*=e.maximumZoomFactor),o>a&&(o=a,r=-a),r<=o&&(r=1,o=-1),i=n.right/n.top,n.top=r,n.bottom=o,n.right=n.top*i,n.left=-n.right}else{var s=n.right-t,l=n.left+t,u=e._maxCoord.x;e._scene.mapMode2D===Rr$3.ROTATE&&(u*=e.maximumZoomFactor),s>u&&(s=u,l=-u),s<=l&&(s=1,l=-1),i=n.top/n.right,n.right=s,n.left=l,n.top=n.right*i,n.bottom=-n.top}}function Gt$6(e,t){e.move(e.direction,t)}v$K.prototype.rotateRight=function(e){Yt$7(this,-(e=u$Z(e,this.defaultRotateAmount)))},v$K.prototype.rotateLeft=function(e){Yt$7(this,e=u$Z(e,this.defaultRotateAmount))},v$K.prototype.zoomIn=function(e){e=u$Z(e,this.defaultZoomAmount),this._mode===C$14.SCENE2D?pt$c(this,e):Gt$6(this,e)},v$K.prototype.zoomOut=function(e){e=u$Z(e,this.defaultZoomAmount),this._mode===C$14.SCENE2D?pt$c(this,-e):Gt$6(this,-e)},v$K.prototype.getMagnitude=function(){return this._mode===C$14.SCENE3D?o$1p.magnitude(this.position):this._mode===C$14.COLUMBUS_VIEW?Math.abs(this.position.z):this._mode===C$14.SCENE2D?Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom):void 0};var ki$6=new p$1d;v$K.prototype.lookAt=function(e,t){if(!e$2e(e))throw new t$15("target is required");if(!e$2e(t))throw new t$15("offset is required");if(this._mode===C$14.MORPHING)throw new t$15("lookAt is not supported while morphing.");var i=m$19.eastNorthUpToFixedFrame(e,t$12.WGS84,ki$6);this.lookAtTransform(i,t)};var Zi$4=new o$1p,Yi$4=new n$15,Gi$3=new n$15,Qi$3=new p$1e;function Qt$7(e,t,i){t=e$2d.clamp(t,-e$2d.PI_OVER_TWO,e$2d.PI_OVER_TWO),e=e$2d.zeroToTwoPi(e)-e$2d.PI_OVER_TWO;var n=n$15.fromAxisAngle(o$1p.UNIT_Y,-t,Yi$4),r=n$15.fromAxisAngle(o$1p.UNIT_Z,-e,Gi$3),o=n$15.multiply(r,n,r),a=p$1e.fromQuaternion(o,Qi$3),s=o$1p.clone(o$1p.UNIT_X,Zi$4);return p$1e.multiplyByVector(a,s,s),o$1p.negate(s,s),o$1p.multiplyByScalar(s,i,s),s}v$K.prototype.lookAtTransform=function(e,t){if(!e$2e(e))throw new t$15("transform is required");if(this._mode===C$14.MORPHING)throw new t$15("lookAtTransform is not supported while morphing.");if(this._setTransform(e),e$2e(t)){var i;if(i=e$2e(t.heading)?Qt$7(t.heading,t.pitch,t.range):t,this._mode===C$14.SCENE2D){o$1o.clone(o$1o.ZERO,this.position),o$1p.negate(i,this.up),this.up.z=0,o$1p.magnitudeSquared(this.up)<e$2d.EPSILON10&&o$1p.clone(o$1p.UNIT_Y,this.up),o$1p.normalize(this.up,this.up),this._setTransform(p$1d.IDENTITY),o$1p.negate(o$1p.UNIT_Z,this.direction),o$1p.cross(this.direction,this.up,this.right),o$1p.normalize(this.right,this.right);var n=this.frustum,r=n.top/n.right;return n.right=.5*o$1p.magnitude(i),n.left=-n.right,n.top=r*n.right,n.bottom=-n.top,void this._setTransform(e)}o$1p.clone(i,this.position),o$1p.negate(this.position,this.direction),o$1p.normalize(this.direction,this.direction),o$1p.cross(this.direction,o$1p.UNIT_Z,this.right),o$1p.magnitudeSquared(this.right)<e$2d.EPSILON10&&o$1p.clone(o$1p.UNIT_X,this.right),o$1p.normalize(this.right,this.right),o$1p.cross(this.right,this.direction,this.up),o$1p.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)}};var rt$j=new a$18,qi$4=new a$18,Xi$3=new o$1p,Ji$3=new o$1p,Ki$3=new o$1p,$i$4=new o$1p,te$E=new o$1p,ie$F=new o$1p,ee$z=new o$1p,Mt$6=new o$1p,re$J={direction:new o$1p,right:new o$1p,up:new o$1p},qt$8;function N$W(e,t,i,n){return Math.abs(o$1p.dot(t,i))/n-o$1p.dot(e,i)}function Xt$4(e,t,i,n){var r=e._projection.ellipsoid,o=n?e:re$J,a=t.north,s=t.south,l=t.east,u=t.west;u>l&&(l+=e$2d.TWO_PI);var c,h=.5*(u+l);if(s<-e$2d.PI_OVER_TWO+e$2d.RADIANS_PER_DEGREE&&a>e$2d.PI_OVER_TWO-e$2d.RADIANS_PER_DEGREE)c=0;else{var d=rt$j;d.longitude=h,d.latitude=a,d.height=0;var f=qi$4;f.longitude=h,f.latitude=s,f.height=0;var p=qt$8;(!e$2e(p)||p.ellipsoid!==r)&&(qt$8=p=new E$1t(void 0,void 0,r)),p.setEndPoints(d,f),c=p.interpolateUsingFraction(.5,rt$j).latitude}var _=rt$j;_.longitude=h,_.latitude=c,_.height=0;var m=r.cartographicToCartesian(_,ee$z),g=rt$j;g.longitude=l,g.latitude=a;var x=r.cartographicToCartesian(g,Xi$3);g.longitude=u;var y=r.cartographicToCartesian(g,Ki$3);g.longitude=h;var v=r.cartographicToCartesian(g,te$E);g.latitude=s;var $=r.cartographicToCartesian(g,ie$F);g.longitude=l;var b=r.cartographicToCartesian(g,$i$4);g.longitude=u;var T=r.cartographicToCartesian(g,Ji$3);o$1p.subtract(y,m,y),o$1p.subtract(b,m,b),o$1p.subtract(x,m,x),o$1p.subtract(T,m,T),o$1p.subtract(v,m,v),o$1p.subtract($,m,$);var C=r.geodeticSurfaceNormal(m,o.direction);o$1p.negate(C,C);var S=o$1p.cross(C,o$1p.UNIT_Z,o.right);o$1p.normalize(S,S);var w,E=o$1p.cross(S,C,o.up);if(e.frustum instanceof a$V){var P,A,L=Math.max(o$1p.distance(x,y),o$1p.distance(b,T)),M=Math.max(o$1p.distance(x,b),o$1p.distance(y,T)),R=e.frustum._offCenterFrustum.right/e.frustum._offCenterFrustum.top,O=M*R;L>O?A=(P=L)/R:(A=M,P=O),w=Math.max(P,A)}else{var D=Math.tan(.5*e.frustum.fovy),I=e.frustum.aspectRatio*D;if(w=Math.max(N$W(C,E,y,D),N$W(C,E,b,D),N$W(C,E,x,D),N$W(C,E,T,D),N$W(C,E,v,D),N$W(C,E,$,D),N$W(C,S,y,I),N$W(C,S,b,I),N$W(C,S,x,I),N$W(C,S,T,I),N$W(C,S,v,I),N$W(C,S,$,I)),s<0&&a>0){var B=rt$j;B.longitude=u,B.latitude=0,B.height=0;var F=r.cartographicToCartesian(B,Mt$6);o$1p.subtract(F,m,F),w=Math.max(w,N$W(C,E,F,D),N$W(C,S,F,I)),B.longitude=l,F=r.cartographicToCartesian(B,Mt$6),o$1p.subtract(F,m,F),w=Math.max(w,N$W(C,E,F,D),N$W(C,S,F,I))}}return o$1p.add(m,o$1p.multiplyByScalar(C,-w,Mt$6),i)}var ne$H=new a$18,oe$u=new o$1p,se$z=new o$1p;function ae$z(e,t,i){var n=e._projection;t.west>t.east&&(t=h$18.MAX_VALUE);var r=e._actualTransform,o=e._actualInvTransform,a=ne$H;a.longitude=t.east,a.latitude=t.north;var s=n.project(a,oe$u);p$1d.multiplyByPoint(r,s,s),p$1d.multiplyByPoint(o,s,s),a.longitude=t.west,a.latitude=t.south;var l=n.project(a,se$z);if(p$1d.multiplyByPoint(r,l,l),p$1d.multiplyByPoint(o,l,l),i.x=.5*(s.x-l.x)+l.x,i.y=.5*(s.y-l.y)+l.y,e$2e(e.frustum.fovy)){var u=Math.tan(.5*e.frustum.fovy),c=e.frustum.aspectRatio*u;i.z=.5*Math.max((s.x-l.x)/c,(s.y-l.y)/u)}else{var h=s.x-l.x,d=s.y-l.y;i.z=Math.max(h,d)}return i}var he$v=new a$18,ue$D=new o$1p,ce$y=new o$1p;function fe$x(e,t,i){var n=e._projection;t.west>t.east&&(t=h$18.MAX_VALUE);var r=he$v;r.longitude=t.east,r.latitude=t.north;var o=n.project(r,ue$D);r.longitude=t.west,r.latitude=t.south;var a,s,l=n.project(r,ce$y),u=.5*Math.abs(o.x-l.x),c=.5*Math.abs(o.y-l.y),h=e.frustum.right/e.frustum.top,d=c*h;return u>d?s=(a=u)/h:(s=c,a=d),c=Math.max(2*a,2*s),i.x=.5*(o.x-l.x)+l.x,i.y=.5*(o.y-l.y)+l.y,(r=n.unproject(i,r)).height=c,i=n.project(r,i)}v$K.prototype.getRectangleCameraCoordinates=function(e,t){if(!e$2e(e))throw new t$15("rectangle is required");var i=this._mode;return e$2e(t)||(t=new o$1p),i===C$14.SCENE3D?Xt$4(this,e,t):i===C$14.COLUMBUS_VIEW?ae$z(this,e,t):i===C$14.SCENE2D?fe$x(this,e,t):void 0};var de$x=new f$19;function le$x(e,t,i,n){i=u$Z(i,t$12.WGS84);var r=e.getPickRay(t,de$x),o=g$1j.rayEllipsoid(r,i);if(o){var a=o.start>0?o.start:o.stop;return f$19.getPoint(r,a,n)}}var ve$w=new f$19;function pe$C(e,t,i,n){var r=e.getPickRay(t,ve$w).origin;r.z=0;var o=i.unproject(r);if(!(o.latitude<-e$2d.PI_OVER_TWO||o.latitude>e$2d.PI_OVER_TWO))return i.ellipsoid.cartographicToCartesian(o,n)}var ge$s=new f$19;function _e$v(e,t,i,n){var r=e.getPickRay(t,ge$s),o=-r.origin.x/r.direction.x;f$19.getPoint(r,o,n);var a=i.unproject(new o$1p(n.y,n.z,0));if(!(a.latitude<-e$2d.PI_OVER_TWO||a.latitude>e$2d.PI_OVER_TWO||a.longitude<-Math.PI||a.longitude>Math.PI))return i.ellipsoid.cartographicToCartesian(a,n)}v$K.prototype.pickEllipsoid=function(e,t,i){if(!e$2e(e))throw new t$15("windowPosition is required.");var n=this._scene.canvas;if(0!==n.clientWidth&&0!==n.clientHeight){if(e$2e(i)||(i=new o$1p),t=u$Z(t,t$12.WGS84),this._mode===C$14.SCENE3D)i=le$x(this,e,t,i);else if(this._mode===C$14.SCENE2D)i=pe$C(this,e,this._projection,i);else{if(this._mode!==C$14.COLUMBUS_VIEW)return;i=_e$v(this,e,this._projection,i)}return i}};var me$y=new o$1p,Ce$k=new o$1p,ye$q=new o$1p;function we$n(e,t,i){var n=e._scene.canvas,r=n.clientWidth,o=n.clientHeight,a=Math.tan(.5*e.frustum.fovy),s=e.frustum.aspectRatio*a,l=e.frustum.near,u=2/r*t.x-1,c=2/o*(o-t.y)-1,h=e.positionWC;o$1p.clone(h,i.origin);var d=o$1p.multiplyByScalar(e.directionWC,l,me$y);o$1p.add(h,d,d);var f=o$1p.multiplyByScalar(e.rightWC,u*l*s,Ce$k),p=o$1p.multiplyByScalar(e.upWC,c*l*a,ye$q),_=o$1p.add(d,f,i.direction);return o$1p.add(_,p,_),o$1p.subtract(_,h,_),o$1p.normalize(_,_),i}var gt$9=new o$1p;function Te$q(e,t,i){var n=e._scene.canvas,r=n.clientWidth,o=n.clientHeight,a=e.frustum;e$2e(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2/r*t.x-1;s*=.5*(a.right-a.left);var l=2/o*(o-t.y)-1;l*=.5*(a.top-a.bottom);var u=i.origin;return o$1p.clone(e.position,u),o$1p.multiplyByScalar(e.right,s,gt$9),o$1p.add(gt$9,u,u),o$1p.multiplyByScalar(e.up,l,gt$9),o$1p.add(gt$9,u,u),o$1p.clone(e.directionWC,i.direction),(e._mode===C$14.COLUMBUS_VIEW||e._mode===C$14.SCENE2D)&&o$1p.fromElements(i.origin.z,i.origin.x,i.origin.y,i.origin),i}v$K.prototype.getPickRay=function(e,t){if(!e$2e(e))throw new t$15("windowPosition is required.");e$2e(t)||(t=new f$19);const i=this._scene.canvas;if(!(i.clientWidth<=0||i.clientWidth<=0)){var n=this.frustum;return e$2e(n.aspectRatio)&&e$2e(n.fov)&&e$2e(n.near)?we$n(this,e,t):Te$q(this,e,t)}};var Ee$q=new o$1p,Pe$m=new o$1p;v$K.prototype.distanceToBoundingSphere=function(e){if(!e$2e(e))throw new t$15("boundingSphere is required.");var t=o$1p.subtract(this.positionWC,e.center,Ee$q),i=o$1p.multiplyByScalar(this.directionWC,o$1p.dot(t,this.directionWC),Pe$m);return Math.max(0,o$1p.magnitude(i)-e.radius)};var Re$m=new o$1o;function Se$h(e,t,i,n,r,o){var a=o$1p.clone(t);return i.y>n?a.y-=i.y-n:i.y<-n&&(a.y+=-n-i.y),i.z>r?a.z-=i.z-r:i.z<-r&&(a.z+=-r-i.z),{easingFunction:m$Y.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:o,update:function(i){var n=o$1p.lerp(t,a,i.time,new o$1p);e.worldToCameraCoordinatesPoint(n,e.position)}}}v$K.prototype.getPixelSize=function(e,t,i){if(!e$2e(e))throw new t$15("boundingSphere is required.");if(!e$2e(t))throw new t$15("drawingBufferWidth is required.");if(!e$2e(i))throw new t$15("drawingBufferHeight is required.");var n=this.distanceToBoundingSphere(e),r=this.frustum.getPixelDimensions(t,i,n,this._scene.pixelRatio,Re$m);return Math.max(r.x,r.y)};var Ie$n=new o$1p,Jt$6=new o$1p,Me$q=new o$1p,We$l=new o$1p;function De$n(e,t){var i=e.position,n=e.direction,r=e.worldToCameraCoordinatesVector(o$1p.UNIT_X,Ie$n),o=-o$1p.dot(r,i)/o$1p.dot(r,n),a=o$1p.add(i,o$1p.multiplyByScalar(n,o,Jt$6),Jt$6);e.cameraToWorldCoordinatesPoint(a,a),i=e.cameraToWorldCoordinatesPoint(e.position,Me$q);var s=Math.tan(.5*e.frustum.fovy),l=e.frustum.aspectRatio*s,u=o$1p.magnitude(o$1p.subtract(i,a,We$l)),c=l*u,h=s*u,d=e._maxCoord.x,f=e._maxCoord.y,p=Math.max(c-d,d),_=Math.max(h-f,f);if(i.z<-p||i.z>p||i.y<-_||i.y>_){var m=a.y<-p||a.y>p,g=a.z<-_||a.z>_;if(m||g)return Se$h(e,i,a,p,_,t)}}v$K.prototype.createCorrectPositionTween=function(e){if(!e$2e(e))throw new t$15("duration is required.");if(this._mode===C$14.COLUMBUS_VIEW)return De$n(this,e)};var xe$q=new o$1p,M$10={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};function Oe$p(e,t){var i=e.frustum,n=Math.tan(.5*i.fovy),r=i.aspectRatio*n;return Math.max(t/r,t/n)}function Ne$k(e,t){var i=e.frustum;e$2e(i._offCenterFrustum)&&(i=i._offCenterFrustum);var n,r,o=i.right/i.top,a=t*o;return t>a?r=(n=t)/o:(r=t,n=a),1.5*Math.max(n,r)}v$K.prototype.cancelFlight=function(){e$2e(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)},v$K.prototype.flyTo=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).destination;if(!e$2e(t))throw new t$15("destination is required.");if(this._mode!==C$14.MORPHING){this.cancelFlight();var i=u$Z(e.orientation,u$Z.EMPTY_OBJECT);if(e$2e(i.direction)&&(i=Ut$8(this,t,i,It$c.orientation)),e$2e(e.duration)&&e.duration<=0){var n=It$c;return n.destination=e.destination,n.orientation.heading=i.heading,n.orientation.pitch=i.pitch,n.orientation.roll=i.roll,n.convert=e.convert,n.endTransform=e.endTransform,this.setView(n),void("function"==typeof e.complete&&e.complete())}var r=e$2e(t.west);r&&(t=this.getRectangleCameraCoordinates(t,xe$q));var o,a=this;M$10.destination=t,M$10.heading=i.heading,M$10.pitch=i.pitch,M$10.roll=i.roll,M$10.duration=e.duration,M$10.complete=function(){o===a._currentFlight&&(a._currentFlight=void 0),e$2e(e.complete)&&e.complete()},M$10.cancel=e.cancel,M$10.endTransform=e.endTransform,M$10.convert=!r&&e.convert,M$10.maximumHeight=e.maximumHeight,M$10.pitchAdjustHeight=e.pitchAdjustHeight,M$10.flyOverLongitude=e.flyOverLongitude,M$10.flyOverLongitudeWeight=e.flyOverLongitudeWeight,M$10.easingFunction=e.easingFunction,M$10.headingFree=u$Z(e.headingFree,!1),M$10.pitchFree=u$Z(e.pitchFree,!1),M$10.altitudeFree=u$Z(e.altitudeFree,!1),M$10.directTurning=u$Z(e.directTurning,!1),M$10.interpolationMode=u$Z(e.interpolationMode,j$16.NONE),M$10.catmullRomSpline=e.catmullRomSpline,M$10.preStopIndex=e.preStopIndex,M$10.flyClampToGround=this._flyClampToGround,M$10.flyRelativeHeight=this._flyRelativeHeight;var s=this._scene,l=mr$5.createTween(s,M$10);if(0===l.duration)return void("function"==typeof l.complete&&l.complete());o=s.tweens.add(l),this._currentFlight=o;var u=this._scene.preloadFlightCamera;this._mode!==C$14.SCENE2D&&(e$2e(u)||(u=v$K.clone(this)),u.setView({destination:t,orientation:i}),this._scene.preloadFlightCullingVolume=u.frustum.computeCullingVolume(u.positionWC,u.directionWC,u.upWC))}};var Ae$u=100;function Kt$7(e,t,i){e$2e(i)||(i=a$T.clone(v$K.DEFAULT_OFFSET));var n=e._scene.screenSpaceCameraController.minimumZoomDistance,r=e._scene.screenSpaceCameraController.maximumZoomDistance,o=i.range;if(!e$2e(o)||0===o){var a=t.radius;0===a?i.range=Ae$u:e.frustum instanceof a$V||e._mode===C$14.SCENE2D?i.range=Ne$k(e,a):i.range=Oe$p(e,a),i.range=e$2d.clamp(i.range,n,r)}return i}v$K.prototype.viewBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("boundingSphere is required.");if(this._mode===C$14.MORPHING)throw new t$15("viewBoundingSphere is not supported while morphing.");t=Kt$7(this,e,t),this.lookAt(e.center,t)};var Fe$n=new p$1d,Ve$k=new o$1p,ze$g=new o$1p,Be$n=new o$1p,be$u=new o$1p,Le$p=new e$2c,He$g=new n$15,Ue$j=new p$1e;v$K.prototype.flyToBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("boundingSphere is required.");t=u$Z(t,u$Z.EMPTY_OBJECT);var i=this._mode===C$14.SCENE2D||this._mode===C$14.COLUMBUS_VIEW;this._setTransform(p$1d.IDENTITY);var n,r=Kt$7(this,e,t.offset);n=i?o$1p.multiplyByScalar(o$1p.UNIT_Z,r.range,Ve$k):Qt$7(r.heading,r.pitch,r.range);var o,a,s=m$19.eastNorthUpToFixedFrame(e.center,t$12.WGS84,Fe$n);if(p$1d.multiplyByPoint(s,n,n),!i){if(o=o$1p.subtract(e.center,n,ze$g),o$1p.normalize(o,o),a=p$1d.multiplyByPointAsVector(s,o$1p.UNIT_Z,Be$n),1-Math.abs(o$1p.dot(o,a))<e$2d.EPSILON6){var l=n$15.fromAxisAngle(o,r.heading,He$g),u=p$1e.fromQuaternion(l,Ue$j);o$1p.fromCartesian4(p$1d.getColumn(s,1,Le$p),a),p$1e.multiplyByVector(u,a,a)}var c=o$1p.cross(o,a,be$u);o$1p.cross(c,o,a),o$1p.normalize(a,a)}this.flyTo({destination:n,orientation:{direction:o,up:a},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var $t$6=new o$1p,ti$7=new o$1p,Wt$9=new o$1p,ii$7=new o$1p,nt$e=[new o$1p,new o$1p,new o$1p,new o$1p];function je$h(e,t){var i,n,r=t.radii,o=e.positionWC,a=o$1p.multiplyComponents(t.oneOverRadii,o,$t$6),s=o$1p.magnitude(a),l=o$1p.normalize(a,ti$7);o$1p.equalsEpsilon(l,o$1p.UNIT_Z,e$2d.EPSILON10)?(i=new o$1p(0,1,0),n=new o$1p(0,0,1)):(i=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,l,Wt$9),Wt$9),n=o$1p.normalize(o$1p.cross(l,i,ii$7),ii$7));var u=Math.sqrt(o$1p.magnitudeSquared(a)-1),c=o$1p.multiplyByScalar(l,1/s,$t$6),h=u/s,d=o$1p.multiplyByScalar(i,h,ti$7),f=o$1p.multiplyByScalar(n,h,Wt$9),p=o$1p.add(c,f,nt$e[0]);o$1p.subtract(p,d,p),o$1p.multiplyComponents(r,p,p);var _=o$1p.subtract(c,f,nt$e[1]);o$1p.subtract(_,d,_),o$1p.multiplyComponents(r,_,_);var m=o$1p.subtract(c,f,nt$e[2]);o$1p.add(m,d,m),o$1p.multiplyComponents(r,m,m);var g=o$1p.add(c,f,nt$e[3]);return o$1p.add(g,d,g),o$1p.multiplyComponents(r,g,g),nt$e}var Dt$b=new o$1o,ke$h=new o$1p,q$14=[new a$18,new a$18,new a$18,new a$18];function _t$a(e,t,i,n,r,o){Dt$b.x=e,Dt$b.y=t;var a=n.pickEllipsoid(Dt$b,r,ke$h);return e$2e(a)?(q$14[i]=r.cartesianToCartographic(a,q$14[i]),1):(q$14[i]=r.cartesianToCartographic(o[i],q$14[i]),0)}function Ze$8(e,t){var i=e.distance,n=e.normal;t[0]=-2*n.x*n.x+1,t[1]=-2*n.y*n.x,t[2]=-2*n.z*n.x,t[3]=0,t[4]=-2*n.x*n.y,t[5]=-2*n.y*n.y+1,t[6]=-2*n.z*n.y,t[7]=0,t[8]=-2*n.x*n.z,t[9]=-2*n.y*n.z,t[10]=-2*n.z*n.z+1,t[11]=0,t[12]=-2*n.x*i,t[13]=-2*n.y*i,t[14]=-2*n.z*i,t[15]=1}v$K.prototype.computeViewRectangle=function(e,t){e=u$Z(e,t$12.WGS84);var i=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),n=new i$1d(o$1p.ZERO,e.maximumRadius);if(i.computeVisibility(n)!==Ae$w.OUTSIDE){var r=this._scene.canvas,o=r.clientWidth,a=r.clientHeight,s=0,l=je$h(this,e);if(s+=_t$a(0,0,0,this,e,l),s+=_t$a(0,a,1,this,e,l),s+=_t$a(o,a,2,this,e,l),(s+=_t$a(o,0,3,this,e,l))<2)return h$18.MAX_VALUE;t=h$18.fromCartographicArray(q$14,t);for(var u=0,c=q$14[3].longitude,h=0;h<4;++h){var d=q$14[h].longitude,f=Math.abs(d-c);f>e$2d.PI?u+=e$2d.TWO_PI-f:u+=f,c=d}return e$2d.equalsEpsilon(Math.abs(u),e$2d.TWO_PI,e$2d.EPSILON9)&&(t.west=-e$2d.PI,t.east=e$2d.PI,q$14[0].latitude>=0?t.north=e$2d.PI_OVER_TWO:t.south=-e$2d.PI_OVER_TWO),t}},v$K.prototype.switchToPerspectiveFrustum=function(){if(!(this._mode===C$14.SCENE2D||this.frustum instanceof o$15)){var e=this._scene;this.frustum=new o$15,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=e$2d.toRadians(60)}},v$K.prototype.switchToOrthographicFrustum=function(){if(!(this._mode===C$14.SCENE2D||this.frustum instanceof a$V)){var e=this._scene;this.frustum=new a$V,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.width=o$1p.magnitude(this.position),e$2e(this.frustum.projectionMatrix)&&this._adjustOrthographicFrustum(!0)}},v$K.clone=function(e,t){return e$2e(t)||(t=new v$K(e._scene)),o$1p.clone(e.position,t.position),o$1p.clone(e.direction,t.direction),o$1p.clone(e.up,t.up),o$1p.clone(e.right,t.right),p$1d.clone(e._transform,t.transform),t._mode=e._mode,t._transformChanged=!0,t.frustum=e.frustum.clone(),t},v$K.prototype.enableReflection=function(e){this.bReflect=!0,Ze$8(e,this._reflectMatrix),D$Z(this),this.frustum.reflect=!0,this.frustum.clipPlane=e,this.frustum.currentViewMatrix=this._viewMatrix},v$K.prototype.disableReflection=function(){this.bReflect=!1,this.frustum.reflect=!1,this.frustum instanceof o$15&&this.frustum.resetProjectionMatrix(),D$Z(this)};var Ye$i=new p$1d,Ge$h=new p$1d,J$Z=0,mt$8=!1;v$K.prototype.flyCircle=function(e){J$Z=0,mt$8=!1,this._isFlyCircle=!1,this._flyCircle(e)},v$K.prototype._flyCircle=function(e){if(this._flyCircleLoop||!mt$8){(!this._isFlyCircle||this._isResetFlyCircleParm)&&(Et$c(),J$Z=0,mt$8=!1,this._flyCircleCenter=o$1p.clone(e),this._isFlyCircle=!0,this._isResetFlyCircleParm=!1);var t=this.constrainedAxis,i=p$1d.clone(this.transform,Ge$h),n=m$19.eastNorthUpToFixedFrame(e,t$12.WGS84,Ye$i);this._setTransform(n),this.constrainedAxis=o$1p.UNIT_Z,Et$c();var r=.01;r*=this._speedRatio;var o=2*Math.PI-Math.abs(J$Z);J$Z<0&&(o*=-1),!this._flyCircleLoop&&Math.abs(J$Z)>=2*Math.PI&&(r=o,mt$8=!0),J$Z+=r,this.rotateRight(-r),this.constrainedAxis=t,this._setTransform(i)}else J$Z=0},v$K.prototype.stopFlyCircle=function(){this._isFlyCircle=!1};var t$R={FRONT:de$y.FRONT,BACK:de$y.BACK,FRONT_AND_BACK:de$y.FRONT_AND_BACK},G$1a=Object.freeze(t$R),j$15=0,I$1b=1;function z$U(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.frustum",e.frustum),o$1q.typeOf.object("options.origin",e.origin),o$1q.typeOf.object("options.orientation",e.orientation);var t,i,n=e.frustum,r=e.orientation,o=e.origin,a=u$Z(e.vertexFormat,n$13.DEFAULT),s=u$Z(e._drawNearPlane,!0);n instanceof o$15?(t=j$15,i=o$15.packedLength):n instanceof a$V&&(t=I$1b,i=a$V.packedLength),this._frustumType=t,this._frustum=n.clone(),this._origin=o$1p.clone(o),this._orientation=n$15.clone(r),this._drawNearPlane=s,this._vertexFormat=a,this._workerName="createFrustumGeometry",this.packedLength=2+i+o$1p.packedLength+n$15.packedLength+n$13.packedLength}z$U.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0);var n=e._frustumType,r=e._frustum;return t[i++]=n,n===j$15?(o$15.pack(r,t,i),i+=o$15.packedLength):(a$V.pack(r,t,i),i+=a$V.packedLength),o$1p.pack(e._origin,t,i),i+=o$1p.packedLength,n$15.pack(e._orientation,t,i),i+=n$15.packedLength,n$13.pack(e._vertexFormat,t,i),t[i+=n$13.packedLength]=e._drawNearPlane?1:0,t};var ee$y=new o$15,re$I=new a$V,ae$y=new n$15,te$D=new o$1p,oe$t=new n$13;function R$Y(e,t,i,n,r,o,a,s){for(var l=e/3*2,u=0;u<4;++u)e$2e(t)&&(t[e]=o.x,t[e+1]=o.y,t[e+2]=o.z),e$2e(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e$2e(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),e+=3;r[l]=0,r[l+1]=0,r[l+2]=1,r[l+3]=0,r[l+4]=1,r[l+5]=1,r[l+6]=0,r[l+7]=1}z$U.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n,r=e[t++];r===j$15?(n=o$15.unpack(e,t,ee$y),t+=o$15.packedLength):(n=a$V.unpack(e,t,re$I),t+=a$V.packedLength);var o=o$1p.unpack(e,t,te$D);t+=o$1p.packedLength;var a=n$15.unpack(e,t,ae$y);t+=n$15.packedLength;var s=n$13.unpack(e,t,oe$t),l=1===e[t+=n$13.packedLength];if(!e$2e(i))return new z$U({frustum:n,origin:o,orientation:a,vertexFormat:s,_drawNearPlane:l});var u=r===i._frustumType?i._frustum:void 0;return i._frustum=n.clone(u),i._frustumType=r,i._origin=o$1p.clone(o,i._origin),i._orientation=n$15.clone(a,i._orientation),i._vertexFormat=n$13.clone(s,i._vertexFormat),i._drawNearPlane=l,i};var ie$E=new p$1e,ve$v=new p$1d,q$13=new p$1d,K$T=new o$1p,W$$=new o$1p,Z$$=new o$1p,pe$B=new o$1p,ce$x=new o$1p,me$x=new o$1p,C$12=new Array(3),Y$N=new Array(4);Y$N[0]=new e$2c(-1,-1,1,1),Y$N[1]=new e$2c(1,-1,1,1),Y$N[2]=new e$2c(1,1,1,1),Y$N[3]=new e$2c(-1,1,1,1);for(var $$Y=new Array(4),J$Y=0;J$Y<4;++J$Y)$$Y[J$Y]=new e$2c;z$U._computeNearFarPlanes=function(e,t,i,n,r,o,a,s){var l=p$1e.fromQuaternion(t,ie$E),u=u$Z(o,K$T),c=u$Z(a,W$$),h=u$Z(s,Z$$);u=p$1e.getColumn(l,0,u),c=p$1e.getColumn(l,1,c),h=p$1e.getColumn(l,2,h),o$1p.normalize(u,u),o$1p.normalize(c,c),o$1p.normalize(h,h),o$1p.negate(u,u);var d,f,p=p$1d.computeView(e,h,c,u,ve$v);if(i===j$15){var _=n.projectionMatrix,m=p$1d.multiply(_,p,q$13);f=p$1d.inverse(m,q$13)}else d=p$1d.inverseTransformation(p,q$13);e$2e(f)?(C$12[0]=n.near,C$12[1]=n.far):(C$12[0]=0,C$12[1]=n.near,C$12[2]=n.far);for(var g=0;g<2;++g)for(var x=0;x<4;++x){var y=e$2c.clone(Y$N[x],$$Y[x]);if(e$2e(f)){var v=1/(y=p$1d.multiplyByVector(f,y,y)).w;o$1p.multiplyByScalar(y,v,y),o$1p.subtract(y,e,y),o$1p.normalize(y,y);var $=o$1p.dot(h,y);o$1p.multiplyByScalar(y,C$12[g]/$,y),o$1p.add(y,e,y)}else{e$2e(n._offCenterFrustum)&&(n=n._offCenterFrustum);var b=C$12[g],T=C$12[g+1];y.x=.5*(y.x*(n.right-n.left)+n.left+n.right),y.y=.5*(y.y*(n.top-n.bottom)+n.bottom+n.top),y.z=.5*(y.z*(b-T)-b-T),y.w=1,p$1d.multiplyByVector(d,y,y)}r[12*g+3*x]=y.x,r[12*g+3*x+1]=y.y,r[12*g+3*x+2]=y.z}},z$U.createGeometry=function(e){var t=e._frustumType,i=e._frustum,n=e._origin,r=e._orientation,o=e._drawNearPlane,a=e._vertexFormat,s=o?6:5,l=new Float64Array(72);z$U._computeNearFarPlanes(n,r,t,i,l);var u=24;l[u]=l[12],l[u+1]=l[13],l[u+2]=l[14],l[u+3]=l[0],l[u+4]=l[1],l[u+5]=l[2],l[u+6]=l[9],l[u+7]=l[10],l[u+8]=l[11],l[u+9]=l[21],l[u+10]=l[22],l[u+11]=l[23],l[u+=12]=l[15],l[u+1]=l[16],l[u+2]=l[17],l[u+3]=l[3],l[u+4]=l[4],l[u+5]=l[5],l[u+6]=l[0],l[u+7]=l[1],l[u+8]=l[2],l[u+9]=l[12],l[u+10]=l[13],l[u+11]=l[14],l[u+=12]=l[3],l[u+1]=l[4],l[u+2]=l[5],l[u+3]=l[15],l[u+4]=l[16],l[u+5]=l[17],l[u+6]=l[18],l[u+7]=l[19],l[u+8]=l[20],l[u+9]=l[6],l[u+10]=l[7],l[u+11]=l[8],l[u+=12]=l[6],l[u+1]=l[7],l[u+2]=l[8],l[u+3]=l[18],l[u+4]=l[19],l[u+5]=l[20],l[u+6]=l[21],l[u+7]=l[22],l[u+8]=l[23],l[u+9]=l[9],l[u+10]=l[10],l[u+11]=l[11],o||(l=l.subarray(12));var c=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:l})});if(e$2e(a.normal)||e$2e(a.tangent)||e$2e(a.bitangent)||e$2e(a.st)){var h=e$2e(a.normal)?new Float32Array(12*s):void 0,d=e$2e(a.tangent)?new Float32Array(12*s):void 0,f=e$2e(a.bitangent)?new Float32Array(12*s):void 0,p=e$2e(a.st)?new Float32Array(8*s):void 0,_=K$T,m=W$$,g=Z$$,x=o$1p.negate(_,pe$B),y=o$1p.negate(m,ce$x),v=o$1p.negate(g,me$x);u=0,o&&(R$Y(u,h,d,f,p,v,_,m),u+=12),R$Y(u,h,d,f,p,g,x,m),R$Y(u+=12,h,d,f,p,x,v,m),R$Y(u+=12,h,d,f,p,y,v,x),R$Y(u+=12,h,d,f,p,_,g,m),R$Y(u+=12,h,d,f,p,m,g,x),e$2e(h)&&(c.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:h})),e$2e(d)&&(c.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:d})),e$2e(f)&&(c.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:f})),e$2e(p)&&(c.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:p}))}for(var $=new Uint16Array(6*s),b=0;b<s;++b){var T=6*b,C=4*b;$[T]=C,$[T+1]=C+1,$[T+2]=C+2,$[T+3]=C,$[T+4]=C+2,$[T+5]=C+3}return new I$1p({attributes:c,indices:$,primitiveType:W$18.TRIANGLES,boundingSphere:i$1d.fromVertices(l)})};var d$1e=0,A$14=1;function s$O(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.frustum",e.frustum),o$1q.typeOf.object("options.origin",e.origin),o$1q.typeOf.object("options.orientation",e.orientation);var t,i,n=e.frustum,r=e.orientation,o=e.origin,a=u$Z(e._drawNearPlane,!0);n instanceof o$15?(t=d$1e,i=o$15.packedLength):n instanceof a$V&&(t=A$14,i=a$V.packedLength),this._frustumType=t,this._frustum=n.clone(),this._origin=o$1p.clone(o),this._orientation=n$15.clone(r),this._drawNearPlane=a,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+i+o$1p.packedLength+n$15.packedLength}s$O.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0);var n=e._frustumType,r=e._frustum;return t[i++]=n,n===d$1e?(o$15.pack(r,t,i),i+=o$15.packedLength):(a$V.pack(r,t,i),i+=a$V.packedLength),o$1p.pack(e._origin,t,i),i+=o$1p.packedLength,n$15.pack(e._orientation,t,i),t[i+=n$15.packedLength]=e._drawNearPlane?1:0,t};var j$14=new o$15,C$11=new a$V,E$14=new n$15,G$19=new o$1p;s$O.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n,r=e[t++];r===d$1e?(n=o$15.unpack(e,t,j$14),t+=o$15.packedLength):(n=a$V.unpack(e,t,C$11),t+=a$V.packedLength);var o=o$1p.unpack(e,t,G$19);t+=o$1p.packedLength;var a=n$15.unpack(e,t,E$14),s=1===e[t+=n$15.packedLength];if(!e$2e(i))return new s$O({frustum:n,origin:o,orientation:a,_drawNearPlane:s});var l=r===i._frustumType?i._frustum:void 0;return i._frustum=n.clone(l),i._frustumType=r,i._origin=o$1p.clone(o,i._origin),i._orientation=n$15.clone(a,i._orientation),i._drawNearPlane=s,i},s$O.createGeometry=function(e){var t=e._frustumType,i=e._frustum,n=e._origin,r=e._orientation,o=e._drawNearPlane,a=new Float64Array(24);z$U._computeNearFarPlanes(n,r,t,i,a);for(var s,l,u=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:a})}),c=o?2:1,h=new Uint16Array(8*(c+1)),d=o?0:1;d<2;++d)l=4*d,h[s=o?8*d:0]=l,h[s+1]=l+1,h[s+2]=l+1,h[s+3]=l+2,h[s+4]=l+2,h[s+5]=l+3,h[s+6]=l+3,h[s+7]=l;for(d=0;d<2;++d)l=4*d,h[s=8*(c+d)]=l,h[s+1]=l+4,h[s+2]=l+1,h[s+3]=l+5,h[s+4]=l+2,h[s+5]=l+6,h[s+6]=l+3,h[s+7]=l+7;return new I$1p({attributes:u,indices:h,primitiveType:W$18.LINES,boundingSphere:i$1d.fromVertices(a)})};var d$1d="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nvec4 color = czm_gammaCorrect(v_color);\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}\n",h$Y="attribute vec3 position;\nattribute vec3 normal;\nattribute float batchId;\nattribute vec4 color;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = vec4(position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\nv_normalEC = czm_normal * normal;\nv_color = color;\ngl_Position = czm_modelViewProjection * p;\n}\n",F$10="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec4 color;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_color = color;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",d$1c="varying vec4 v_color;\nvoid main()\n{\ngl_FragColor = czm_gammaCorrect(v_color);\n}\n",i$V="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 color;\nattribute float batchId;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_color = color;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";function a$S(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.material=e.material,this.translucent=u$Z(e.translucent,!0),this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=u$Z(e.closed,!1)}function t$Q(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.translucent,!0),i=u$Z(e.closed,!1),n=u$Z(e.flat,!1),r=u$Z(e.materialSupport,t$Q.MaterialSupport.BASIC),o=u$Z(r.name,"PerInstanceColorAppearance no name"),a=r.vertexShaderSource,s=r.fragmentShaderSource,l=r.vertexFormat;n&&(a=i$V,s=d$1c,l=t$Q.FLAT_VERTEX_FORMAT,o="PerInstanceFlatColorAppearance"),this.material=void 0,this.translucent=t,this._vertexShaderSource=u$Z(e.vertexShaderSource,a),this._fragmentShaderSource=u$Z(e.fragmentShaderSource,s),this._renderState=a$S.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._vertexFormat=l,this._flat=n,this._faceForward=u$Z(e.faceForward,!i),this.name=o}function u$O(e,t){if(!e$2e(e))throw new t$15("array is required.");if(!e$2e(t)||t<1)throw new t$15("numberOfArrays must be greater than 0.");for(var i=[],n=e.length,r=0;r<n;){var o=Math.ceil((n-r)/t--);i.push(e.slice(r,r+o)),r+=o}return i}function e$1M(e,t){this.positions=e$2e(e)?e:[],this.holes=e$2e(t)?t:[]}function e$1L(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new o$1h,this.setValue(e)}function u$N(e,t,i,n,r){return{configurable:n,get:function(){return this[t]},set:function(n){var o=this[t],a=this[i];e$2e(a)&&(a(),this[i]=void 0),void 0!==n&&(!e$2e(n)||!e$2e(n.getValue))&&e$2e(r)&&(n=r(n)),o!==n&&(this[t]=n,this._definitionChanged.raiseEvent(this,e,n,o)),e$2e(n)&&e$2e(n.definitionChanged)&&(this[i]=n.definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this,e,n,n)}),this))}}}function p$Z(e){return new e$1L(e)}function C$10(e,t,i){return u$N(e,"_"+e.toString(),"_"+e.toString()+"Subscription",u$Z(t,!1),u$Z(i,p$Z))}function r$_(){t$15.throwInstantiationError()}function t$P(e){this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(a$S.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}}}),a$S.prototype.getFragmentShaderSource=function(){var e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),e$2e(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join("\n")},a$S.prototype.isTranslucent=function(){return e$2e(this.material)&&this.material.isTranslucent()||!e$2e(this.material)&&this.translucent},a$S.prototype.getRenderState=function(){var e=this.isTranslucent(),t=l$1f(this.renderState,!1);return e?(t.depthMask=!1,t.blending=Ee$r.ALPHA_BLEND):t.depthMask=!0,t},a$S.getDefaultRenderState=function(e,t,i){var n={depthTest:{enabled:!0}};return e&&(n.depthMask=!1,n.blending=Ee$r.ALPHA_BLEND),t&&(n.cull={enabled:!0,face:G$1a.BACK}),e$2e(i)&&(n=p$19(i,n,!0)),n},Object.defineProperties(t$Q.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),t$Q.VERTEX_FORMAT=n$13.POSITION_AND_NORMAL,t$Q.FLAT_VERTEX_FORMAT=n$13.POSITION_ONLY,t$Q.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,t$Q.prototype.isTranslucent=a$S.prototype.isTranslucent,t$Q.prototype.getRenderState=a$S.prototype.getRenderState,t$Q.MaterialSupport={BASIC:Object.freeze({vertexFormat:n$13.POSITION_AND_NORMAL,vertexShaderSource:F$10,fragmentShaderSource:d$1d,name:"PerInstanceColorAppearance"}),FLAT:Object.freeze({vertexFormat:n$13.POSITION_ONLY,vertexShaderSource:i$V,fragmentShaderSource:d$1c,name:"PerInstanceFlatColorAppearance"}),FLOAT_POSITION:Object.freeze({vertexFormat:n$13.POSITION_AND_NORMAL,vertexShaderSource:h$Y,fragmentShaderSource:d$1d,name:"PerInstanceColorAppearance"})},Object.defineProperties(e$1L.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}}),e$1L.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value},e$1L.prototype.setValue=function(e){var t=this._value;if(t!==e){var i=e$2e(e),n=i&&"function"==typeof e.clone,r=i&&"function"==typeof e.equals;(!r||!e.equals(t))&&(this._hasClone=n,this._hasEquals=r,this._value=n?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}},e$1L.prototype.equals=function(e){return this===e||e instanceof e$1L&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))},e$1L.prototype.valueOf=function(){return this._value},e$1L.prototype.toString=function(){return String(this._value)},Object.defineProperties(r$_.prototype,{isConstant:{get:t$15.throwInstantiationError},definitionChanged:{get:t$15.throwInstantiationError}}),r$_.prototype.getValue=t$15.throwInstantiationError,r$_.prototype.equals=t$15.throwInstantiationError,r$_.equals=function(e,t){return e===t||e$2e(e)&&e.equals(t)},r$_.arrayEquals=function(e,t){if(e===t)return!0;if(!e$2e(e)||!e$2e(t)||e.length!==t.length)return!1;for(var i=e.length,n=0;n<i;n++)if(!r$_.equals(e[n],t[n]))return!1;return!0},r$_.isConstant=function(e){return!e$2e(e)||e.isConstant},r$_.getValueOrUndefined=function(e,t,i){return e$2e(e)?e.getValue(t,i):void 0},r$_.getValueOrDefault=function(e,t,i,n){return e$2e(e)?u$Z(e.getValue(t,n),i):i},r$_.getValueOrClonedDefault=function(e,t,i,n){var r;return e$2e(e)&&(r=e.getValue(t,n)),e$2e(r)||(r=i.clone(r)),r},Object.defineProperties(t$P.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color")}),t$P.prototype.getType=function(e){return"Color"},t$P.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,e$1X.WHITE,t.color),t},t$P.prototype.equals=function(e){return this===e||e instanceof t$P&&r$_.equals(this._color,e._color)};var f$W=new o$1o(1,1),d$1b=!1,l$_=e$1X.WHITE;function a$R(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this._unique=!1,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent,this._unique=e.unique}function a$Q(e){if(e instanceof e$1X)return new t$P(e);if("string"==typeof e||e instanceof t$10||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof t$U){var t=new a$R;return t.image=e,t}throw new t$15("Unable to infer material type: "+e)}function c$$(e,t){return C$10(e,t,a$Q)}function r$Z(e,t){e=u$Z(e,0),this._near=e,t=u$Z(t,Number.MAX_VALUE),this._far=t}Object.defineProperties(a$R.prototype,{isConstant:{get:function(){return r$_.isConstant(this._image)&&r$_.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:C$10("image"),repeat:C$10("repeat"),color:C$10("color"),transparent:C$10("transparent")}),a$R.prototype.getType=function(e){return"Image"},a$R.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.image=r$_.getValueOrUndefined(this._image,e),t.repeat=r$_.getValueOrClonedDefault(this._repeat,e,f$W,t.repeat),t.color=r$_.getValueOrClonedDefault(this._color,e,l$_,t.color),r$_.getValueOrDefault(this._transparent,e,d$1b)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t},a$R.prototype.equals=function(e){return this===e||e instanceof a$R&&r$_.equals(this._image,e._image)&&r$_.equals(this._repeat,e._repeat)&&r$_.equals(this._color,e._color)&&r$_.equals(this._transparent,e._transparent)&&!this._unique&&!e._unique},Object.defineProperties(r$Z.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}}),r$Z.packedLength=2,r$Z.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),t[i++]=e.near,t[i]=e.far,t},r$Z.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");return t=u$Z(t,0),e$2e(i)||(i=new r$Z),i.near=e[t++],i.far=e[t],i},r$Z.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.near===t.near&&e.far===t.far},r$Z.clone=function(e,t){if(e$2e(e))return e$2e(t)||(t=new r$Z),t.near=e.near,t.far=e.far,t},r$Z.prototype.clone=function(e){return r$Z.clone(this,e)},r$Z.prototype.equals=function(e){return r$Z.equals(this,e)};var Z$_="void clipLineSegmentToNearPlane(\nvec3 p0,\nvec3 p1,\nout vec4 positionWC,\nout bool clipped,\nout bool culledByNearPlane,\nout vec4 clippedPositionEC)\n{\nculledByNearPlane = false;\nclipped = false;\nvec3 p0ToP1 = p1 - p0;\nfloat magnitude = length(p0ToP1);\nvec3 direction = normalize(p0ToP1);\nfloat endPoint0Distance = czm_currentFrustum.x + p0.z;\nfloat denominator = -direction.z;\nif (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n{\nculledByNearPlane = true;\n}\nelse if (endPoint0Distance > 0.0)\n{\nfloat t = endPoint0Distance / denominator;\nif (t < 0.0 || t > magnitude)\n{\nculledByNearPlane = true;\n}\nelse\n{\np0 = p0 + t * direction;\np0.z = min(p0.z, -czm_currentFrustum.x);\nclipped = true;\n}\n}\nclippedPositionEC = vec4(p0, 1.0);\npositionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n}\nvec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n{\n#ifdef POLYLINE_DASH\nvec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\nvec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\nvec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\nvec2 lineDir;\nif (usePrevious) {\nlineDir = normalize(positionWindow.xy - previousWindow.xy);\n}\nelse {\nlineDir = normalize(nextWindow.xy - positionWindow.xy);\n}\nangle = atan(lineDir.x, lineDir.y) - 1.570796327;\nangle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n#endif\nvec4 clippedPrevWC, clippedPrevEC;\nbool prevSegmentClipped, prevSegmentCulled;\nclipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\nvec4 clippedNextWC, clippedNextEC;\nbool nextSegmentClipped, nextSegmentCulled;\nclipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\nbool segmentClipped, segmentCulled;\nvec4 clippedPositionWC, clippedPositionEC;\nclipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\nif (segmentCulled)\n{\nreturn vec4(0.0, 0.0, 0.0, 1.0);\n}\nvec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\nvec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\nif (prevSegmentCulled)\n{\ndirectionToPrevWC = -directionToNextWC;\n}\nelse if (nextSegmentCulled)\n{\ndirectionToNextWC = -directionToPrevWC;\n}\nvec2 thisSegmentForwardWC, otherSegmentForwardWC;\nif (usePrevious)\n{\nthisSegmentForwardWC = -directionToPrevWC;\notherSegmentForwardWC = directionToNextWC;\n}\nelse\n{\nthisSegmentForwardWC = directionToNextWC;\notherSegmentForwardWC = -directionToPrevWC;\n}\nvec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\nvec2 leftWC = thisSegmentLeftWC;\nfloat expandWidth = width * 0.5;\nif (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n{\nvec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\nvec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\nfloat leftSumLength = length(leftSumWC);\nleftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\nvec2 u = -thisSegmentForwardWC;\nvec2 v = leftWC;\nfloat sinAngle = abs(u.x * v.y - u.y * v.x);\nexpandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n}\nvec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;\nreturn vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;\n}\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\nvec4 positionEC = czm_modelViewRelativeToEye * position;\nvec4 prevEC = czm_modelViewRelativeToEye * previous;\nvec4 nextEC = czm_modelViewRelativeToEye * next;\nreturn getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);\n}\n",be$t="#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvarying vec2 v_st;\nvarying float v_alpha;\nvarying float v_clipW;\n#ifdef TRAIL\n#ifdef WEBGPU\nuniform float spotIntensity_4;\n#else\nuniform float spotIntensity;\n#endif\nvarying float v_Percent;\nvarying float v_SpotPercent;\n#endif\nvoid main()\n{\nczm_materialInput materialInput;\nvec2 st = v_st;\nst.t = czm_readNonPerspective(st.t, 1.0 / v_clipW);\nmaterialInput.s = st.s;\nmaterialInput.st = st;\nmaterialInput.str = vec3(st, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#ifdef VECTOR_TILE\ngl_FragColor *= u_highlightColor;\n#endif\n#ifdef ENABLE_DYNAMIC\nfloat alpha = v_alpha;\nif(bAsy_4 != 1.0){\nalpha = 0.0;\n}\ngl_FragColor.a = pow(max(0.0, sin(3.14159 * (alpha + (1.0 - 2.0*v_time_3)))), 3.5);\n#endif\n#ifdef TRAIL\nif(v_Percent > 1.0 || v_Percent < 0.0)\n{\ndiscard;\n}\nfloat fade = v_Percent;\nif(v_Percent > (1.0 - v_SpotPercent))\n{\ngl_FragColor.rgb *= spotIntensity_4;\n}\ngl_FragColor.a *= fade;\n#endif\n}\n",sr$7="attribute vec3 positionHigh;\nattribute vec3 positionLow;\nattribute vec3 prevPositionHigh;\nattribute vec3 prevPositionLow;\nattribute vec3 nextPositionHigh;\nattribute vec3 nextPositionLow;\nattribute vec4 texCoordExpandAndBatchIndex;\nvarying vec2 v_st;\nvarying float v_width;\nvarying vec4 v_pickColor;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying vec4 vColor;\nvarying float fSelected;\nvarying float v_clipW;\nvoid main()\n{\nfloat texCoord = texCoordExpandAndBatchIndex.x;\nfloat expandDir = texCoordExpandAndBatchIndex.y;\nbool usePrev = texCoordExpandAndBatchIndex.z < 0.0;\nfloat batchTableIndex = texCoordExpandAndBatchIndex.w;\nvec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);\nfloat width = widthAndShow.x + 0.5;\nfloat show = widthAndShow.y;\nif (width < 1.0)\n{\nshow = 0.0;\n}\nvec4 pickColor = batchTable_getPickColor(batchTableIndex);\nvec4 p, prev, next;\n#ifdef SCENE_3D\np = czm_translateRelativeToEye(positionHigh.xyz, positionLow.xyz);\nprev = czm_translateRelativeToEye(prevPositionHigh.xyz, prevPositionLow.xyz);\nnext = czm_translateRelativeToEye(nextPositionHigh.xyz, nextPositionLow.xyz);\n#else\np = czm_translateRelativeToEye(positionHigh.zxy, positionLow.zxy);\nprev = czm_translateRelativeToEye(prevPositionHigh.zxy, prevPositionLow.zxy);\nnext = czm_translateRelativeToEye(nextPositionHigh.zxy, nextPositionLow.zxy);\n#endif\n#ifdef DISTANCE_DISPLAY_CONDITION\nvec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);\nvec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);\nvec3 centerLow = centerLowAndRadius.xyz;\nfloat radius = centerLowAndRadius.w;\nvec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nvec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);\nlengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);\n}\nfloat nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;\nfloat farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;\nif (lengthSq < nearSq || lengthSq > farSq)\n{\nshow = 0.0;\n}\n#endif\nfloat polylineAngle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\ngl_Position = czm_viewportOrthographic * positionWC * show;\nv_st.s = texCoord;\nv_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);\nv_width = width;\nv_pickColor = pickColor;\nv_polylineAngle = polylineAngle;\nv_clipW = gl_Position.w;\n}\n";function h$X(e,t,i){if(!e$2e(e))throw new t$15("context is required");if(!e$2e(t))throw new t$15("attributes is required");if(!e$2e(i))throw new t$15("numberOfInstances is required");if(this._attributes=t,this._numberOfInstances=i,0!==t.length){var n=U$10(t),r=e.floatingPointTexture,o=n===_$_.FLOAT&&!r,a=G$18(t,o),s=X$W(a,t,o),l=Math.floor(e$1W.maximumTextureSize/s),u=Math.min(i,l),c=s*u,h=Math.ceil(i/u),d=1/c,f=.5*d,p=1/h,_=.5*p;this._textureDimensions=new o$1o(c,h),this._textureStep=new e$2c(d,f,p,_),this._pixelDatatype=o?_$_.UNSIGNED_BYTE:n,this._packFloats=o,this._offsets=a,this._stride=s,this._texture=void 0;var m=4*c*h;this._batchValues=n!==_$_.FLOAT||o?new Uint8Array(m):new Float32Array(m),this._batchValuesDirty=!1,this._suffix="",this.useForMaterial=!1}}function U$10(e){for(var t=!1,i=e.length,n=0;n<i;++n)if(e[n].componentDatatype!==S$14.UNSIGNED_BYTE){t=!0;break}return t?_$_.FLOAT:_$_.UNSIGNED_BYTE}function g$16(e,t){var i=e[t].componentsPerAttribute;return 2===i?o$1o:3===i?o$1p:4===i?e$2c:Number}function G$18(e,t){for(var i=new Array(e.length),n=0,r=e.length,o=0;o<r;++o){var a=e[o].componentDatatype;i[o]=n,a!==S$14.UNSIGNED_BYTE&&t?n+=4:++n}return i}function X$W(e,t,i){var n=e.length,r=e[n-1];return t[n-1].componentDatatype!==S$14.UNSIGNED_BYTE&&i?r+4:r+1}Object.defineProperties(h$X.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}},suffix:{get:function(){return this._suffix},set:function(e){this._suffix=e}}});var _$R=new e$2c;function P$X(e,t,i){var n=e$2c.unpack(e,t,_$R),r=e$2c.unpackFloat(n);n=e$2c.unpack(e,t+4,_$R);var o=e$2c.unpackFloat(n);n=e$2c.unpack(e,t+8,_$R);var a=e$2c.unpackFloat(n);n=e$2c.unpack(e,t+12,_$R);var s=e$2c.unpackFloat(n);return e$2c.fromElements(r,o,a,s,i)}function L$17(e,t,i){var n=e$2c.packFloat(e.x,_$R);e$2c.pack(n,t,i),n=e$2c.packFloat(e.y,n),e$2c.pack(n,t,i+4),n=e$2c.packFloat(e.z,n),e$2c.pack(n,t,i+8),n=e$2c.packFloat(e.w,n),e$2c.pack(n,t,i+12)}var w$T=new e$2c;h$X.prototype.getBatchedAttribute=function(e,t,i){if(e<0||e>=this._numberOfInstances)throw new t$15("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new t$15("attributeIndex is out of range");var n,r=this._attributes,o=this._offsets[t],a=4*this._stride*e+4*o;n=this._packFloats&&r[t].componentDatatype!==_$_.UNSIGNED_BYTE?P$X(this._batchValues,a,w$T):e$2c.unpack(this._batchValues,a,w$T);var s=g$16(r,t);return e$2e(s.fromCartesian4)?s.fromCartesian4(n,i):e$2e(s.clone)?s.clone(n,i):n.x};var R$X=[void 0,void 0,new o$1o,new o$1p,new e$2c],q$12=new e$2c;function W$_(e,t){var i=e._textureDimensions;e._texture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:e._pixelDatatype,width:i.x,height:i.y,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1})}function j$13(e){var t=e._textureDimensions;e._texture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function H$12(e){var t=e.useUBO,i=e._stride;return 1===e._textureDimensions.y?(t?"":"uniform vec4 batchTextureStep{suffix}; \n")+"vec2 computeSt{suffix}(float batchId) \n{ \n float stepX = batchTextureStep{suffix}.x; \n float centerX = batchTextureStep{suffix}.y; \n float numberOfAttributes = float("+i+"); \n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5); \n} \n":(t?"":"uniform vec4 batchTextureStep{suffix}; \nuniform vec2 batchTextureDimensions{suffix}; \n")+"vec2 computeSt{suffix}(float batchId) \n{ \n float stepX = batchTextureStep{suffix}.x; \n float centerX = batchTextureStep{suffix}.y; \n float stepY = batchTextureStep{suffix}.z; \n float centerY = batchTextureStep{suffix}.w; \n float numberOfAttributes = float("+i+"); \n float xId = mod(batchId * numberOfAttributes, batchTextureDimensions{suffix}.x); \n float yId = floor(batchId * numberOfAttributes / batchTextureDimensions{suffix}.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function J$X(e){var t=e._stride;return 1===e._textureDimensions.y?""+"fn computeSt{suffix}(batchId : f32) -> vec2<f32> \n{ \n var stepX = Mesh.batchTextureStep{suffix}.x; \n var centerX = Mesh.batchTextureStep{suffix}.y; \n var numberOfAttributes = f32("+t+"); \n return vec2<f32>(centerX + (batchId * numberOfAttributes * stepX), 0.5f); \n} \n":""+"fn computeSt{suffix}(batchId : f32) -> vec2<f32> \n{ \n var stepX = Mesh.batchTextureStep{suffix}.x; \n var centerX = Mesh.batchTextureStep{suffix}.y; \n var stepY = Mesh.batchTextureStep{suffix}.z; \n var centerY = Mesh.batchTextureStep{suffix}.w; \n var numberOfAttributes = f32("+t+"); \n var d = floor((batchId * numberOfAttributes) / Mesh.batchTextureDimensions{suffix}.x); \n var xId = batchId * numberOfAttributes - d * Mesh.batchTextureDimensions{suffix}.x; \n var yId = floor(batchId * numberOfAttributes / Mesh.batchTextureDimensions{suffix}.x); \n return vec2<f32>(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function K$S(e){return 1===e?"float":"vec"+e}function Q$_(e){return 1===e?"f32":"vec"+e+"<f32>"}function F$$(e){return 1===e?".x":2===e?".xy":3===e?".xyz":""}function Z$Z(e,t){var i=e._attributes[t],n=i.componentsPerAttribute,r=i.functionName,o=K$S(n),a=F$$(n),s=o+" "+r+"(float batchId) \n{ \n vec2 st = computeSt{suffix}(batchId); \n st.x += batchTextureStep{suffix}.x * float("+e._offsets[t]+"); \n";return e._packFloats&&i.componentDatatype!==_$_.UNSIGNED_BYTE?s+="vec4 textureValue; \ntextureValue.x = czm_unpackFloat(texture2D(batchTexture{suffix}, st)); \ntextureValue.y = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x, 0.0))); \ntextureValue.z = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x * 2.0, 0.0))); \ntextureValue.w = czm_unpackFloat(texture2D(batchTexture{suffix}, st + vec2(batchTextureStep{suffix}.x * 3.0, 0.0))); \n":s+=" vec4 textureValue = texture2D(batchTexture{suffix}, st); \n",s+=" "+o+" value = textureValue"+a+"; \n",e._pixelDatatype!==_$_.UNSIGNED_BYTE||i.componentDatatype!==S$14.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===_$_.FLOAT&&i.componentDatatype===S$14.UNSIGNED_BYTE&&i.normalize&&(s+="value /= 255.0; \n"):s+="value *= 255.0; \n",s+=" return value; \n} \n"}function $$X(e,t){var i=e._attributes[t],n=i.componentsPerAttribute,r=i.functionName,o=Q$_(n),a=F$$(n),s="fn "+r+"(batchId : f32) ->"+o+"{ \n var st = computeSt{suffix}(batchId); \n st.x += Mesh.batchTextureStep{suffix}.x * f32("+e._offsets[t]+"); \n";return e._packFloats&&i.componentDatatype!==_$_.UNSIGNED_BYTE?s+="var textureValue : vec4<f32>; \ntextureValue.x = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st, 0.0f)); \ntextureValue.y = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st + vec2<f32>(Material.batchTextureStep{suffix}.x, 0.0f), 0.0f)); \ntextureValue.z = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st + vec2<f32>(Material.batchTextureStep{suffix}.x * 2.0f, 0.0f), 0.0f)); \ntextureValue.w = czm_unpackFloat(textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st + vec2<f32>(Material.batchTextureStep{suffix}.x * 3.0f, 0.0f), 0.0f)); \n":s+=" var textureValue = textureSampleLevel(batchTexture{suffix}, batchTexture{suffix}Sampler, st, 0.0f); \n",s+=" var value = textureValue"+a+"; \n",e._pixelDatatype!==_$_.UNSIGNED_BYTE||i.componentDatatype!==S$14.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===_$_.FLOAT&&i.componentDatatype===S$14.UNSIGNED_BYTE&&i.normalize&&(s+=" value /= 255.0f; \n"):s+=" value *= 255.0f; \n",s+=" return value; \n} \n"}function e$1K(e,t,i,n,r){this._format=e,this._width=t,this._height=i,this._buffer=n,this._datatype=r}h$X.prototype.setBatchedAttribute=function(e,t,i){if(e<0||e>=this._numberOfInstances)throw new t$15("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new t$15("attributeIndex is out of range");if(!e$2e(i))throw new t$15("value is required.");var n=this._attributes,r=R$X[n[t].componentsPerAttribute],o=this.getBatchedAttribute(e,t,r),a=g$16(this._attributes,t);if(!(e$2e(a.equals)?a.equals(o,i):o===i)){var s=q$12;s.x=e$2e(i.x)?i.x:i,s.y=e$2e(i.y)?i.y:0,s.z=e$2e(i.z)?i.z:0,s.w=e$2e(i.w)?i.w:0;var l=this._offsets[t],u=4*this._stride*e+4*l;this._packFloats&&n[t].componentDatatype!==_$_.UNSIGNED_BYTE?L$17(s,this._batchValues,u):e$2c.pack(s,this._batchValues,u),this._batchValuesDirty=!0}},h$X.prototype.update=function(e){e$2e(this._texture)&&!this._batchValuesDirty||0===this._attributes.length||(this._batchValuesDirty=!1,e$2e(this._texture)||W$_(this,e.context),j$13(this))},h$X.prototype.getUniformMapCallback=function(){var e=this;return function(t){if(0===e._attributes.length)return t;var i={};return i["batchTexture"+e._suffix]=function(){return e._texture},e.useUBO||(i["batchTextureDimensions"+e._suffix]=function(){return e._textureDimensions},i["batchTextureStep"+e._suffix]=function(){return e._textureStep}),p$19(t,i)}},h$X.prototype.getVertexShaderCallback=function(e){return(e=u$Z(e,!1))?this._getWgslVertexShaderCallback():this._getGlslVertexShaderCallback()},h$X.prototype._getGlslVertexShaderCallback=function(){var e=this._attributes;if(0===e.length)return function(e){return e};var t="uniform highp sampler2D batchTexture{suffix}; \n";s$Z.isPCBroswer()&&(t="uniform sampler2D batchTexture{suffix}; \n"),t+=H$12(this)+"\n";for(var i=e.length,n=0;n<i;++n)t+=Z$Z(this,n);return t=t.replace(/\{suffix\}/g,this._suffix),function(e){var i=e.indexOf("void main"),n=e.substring(0,i),r=e.substring(i);return n+"\n"+t+"\n"+r}},h$X.prototype._getWgslVertexShaderCallback=function(){var e=this._attributes;if(0===e.length)return function(e){return e};var t="var batchTexture{suffix} : texture_2d<f32>; \nvar batchTexture{suffix}Sampler : sampler; \n";t+=J$X(this)+"\n";for(var i=e.length,n=0;n<i;++n)t+=$$X(this,n);return t=t.replace(/\{suffix\}/g,this._suffix),this.useForMaterial&&(t=t.replace(/\Mesh./g,"Material.")),function(e){var i=e.indexOf("@vertex"),n=e.substring(0,i),r=e.substring(i);return n+"\n"+t+"\n"+r}},h$X.prototype.hasMultiRow=function(){return this._textureDimensions.y>1},h$X.prototype.isDestroyed=function(){return!1},h$X.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),i$11(this)},Object.defineProperties(e$1K.prototype,{internalFormat:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},pixelDatatype:{get:function(){return this._datatype}}}),e$1K.clone=function(e){if(e$2e(e))return new e$1K(e._format,e._width,e._height,e._buffer,e._datatype)},e$1K.prototype.clone=function(){return e$1K.clone(this)};var t$O,p$Y=!1,I$1a=new i$W("transcodeCRNToDXTprevious",Number.POSITIVE_INFINITY);function a$P(e,t,i){if(i){if(!e$2e(e))throw new t$15("resourceOrUrlOrBuffer is required.");if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))n=o$1l.resolve(e);else n=t$10.createIfNeeded(e).fetchArrayBuffer();return e$2e(n)?n.then((function(e){if(e$2e(e)){var t=[];return e instanceof ArrayBuffer?t.push(e):(0===e.byteOffset&&e.byteLength===e.buffer.byteLength||(e=e.slice(0,e.length)),t.push(e.buffer)),I$1a.scheduleTask(e,t)}})).then((function(e){return e$1K.clone(e)})):void 0}if(e$2e(t$O)||(t$O=new i$W("transcodeCRNToDXT",Number.POSITIVE_INFINITY)).initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){p$Y=!0})),p$Y){if(!e$2e(e))throw new t$15("resourceOrUrlOrBuffer is required.");var n;return e$2e(n=e instanceof ArrayBuffer||ArrayBuffer.isView(e)?o$1l.resolve(e):t$10.createIfNeeded(e).fetchArrayBuffer())?n.then((function(e){if(e$2e(e)){var i=[];e instanceof ArrayBuffer?i.push(e):(0===e.byteOffset&&e.byteLength===e.buffer.byteLength||(e=e.slice(0,e.length)),i.push(e.buffer));var n=u$Z(t,!1);return t$O.scheduleTask({data:e,bMipMap:n},i)}})).then((function(e){return e$1K.clone(e)})):void 0}}function k$W(e){var t;(o$1q.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?t=o$1l.resolve(e):t=t$10.createIfNeeded(e).fetchArrayBuffer();if(e$2e(t))return t.then((function(e){if(e$2e(e))return P$W(e)}))}var c$_=[171,75,84,88,32,49,49,187,13,10,26,10],L$16=67305985,F$_=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"],n$Z=4;function P$W(e){var t,i,n,r=new Uint8Array(e),o=!0;for(t=0;t<c$_.length;++t)if(c$_[t]!==r[t]){o=!1;break}if(!o)throw new t$13("Invalid KTX file.");e$2e(e.buffer)?(i=new DataView(e.buffer),n=e.byteOffset):(i=new DataView(e),n=0),n+=12;var a=i.getUint32(n,!0);if(n+=n$Z,a!==L$16)throw new t$13("File is the wrong endianness.");var s=i.getUint32(n,!0);n+=n$Z;var l=i.getUint32(n,!0);n+=n$Z;var u=i.getUint32(n,!0);n+=n$Z;var c=i.getUint32(n,!0);n+=n$Z;var h=i.getUint32(n,!0);n+=n$Z;var d=i.getUint32(n,!0);n+=n$Z;var f=i.getUint32(n,!0);n+=n$Z;var p=i.getUint32(n,!0);n+=n$Z;var _=i.getUint32(n,!0);n+=n$Z;var m=i.getUint32(n,!0);n+=n$Z;var g=i.getUint32(n,!0);n+=n$Z;var x=i.getUint32(n,!0);n+=n$Z,n+=x;var y,v=i.getUint32(n,!0);if(n+=n$Z,y=e$2e(e.buffer)?new Uint8Array(e.buffer,n,v):new Uint8Array(e,n,v),c===de$y.RGB8?c=V$12.RGB:c===de$y.RGBA8&&(c=V$12.RGBA),!V$12.validate(c))throw new t$13("glInternalFormat is not a valid format.");if(V$12.isCompressedFormat(c)){if(0!==s)throw new t$13("glType must be zero when the texture is compressed.");if(1!==l)throw new t$13("The type size for compressed textures must be 1.");if(0!==u)throw new t$13("glFormat must be zero when the texture is compressed.")}else{if(s!==de$y.UNSIGNED_BYTE)throw new t$13("Only unsigned byte buffers are supported.");if(h!==u)throw new t$13("The base internal format must be the same as the format for uncompressed textures.")}if(0!==p)throw new t$13("3D textures are unsupported.");if(0!==_)throw new t$13("Texture arrays are unsupported.");var $=y.byteOffset,b=new Array(g);for(t=0;t<g;++t){for(var T=b[t]={},C=0;C<m;++C){var S=d>>t,w=f>>t,E=V$12.isCompressedFormat(c)?V$12.compressedTextureSizeInBytes(c,S,w):V$12.textureSizeInBytes(c,s,S,w),P=new Uint8Array(y.buffer,$,E);T[F$_[C]]=new e$1K(c,S,w,P),$+=E}$+=3-($+3)%4+4}var A=b;if(1===m)for(t=0;t<g;++t)A[t]=A[t][F$_[0]];return 1===g&&(A=A[0]),A}var Z$Y="uniform sampler2D image;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 rampColor = texture2D(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",j$12="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nvec2 centerPixel = fract(repeat * st);\nfloat centerBump = texture2D(image, centerPixel).channel;\nfloat imageWidth = float(imageDimensions.x);\nvec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));\nfloat rightBump = texture2D(image, rightPixel).channel;\nfloat imageHeight = float(imageDimensions.y);\nvec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));\nfloat topBump = texture2D(image, leftPixel).channel;\nvec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));\nvec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\nmaterial.normal = normalEC;\nmaterial.diffuse = vec3(0.01);\nreturn material;\n}\n",J$W="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0);\nfloat scaledWidth = fract(repeat.s * st.s);\nscaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\nfloat scaledHeight = fract(repeat.t * st.t);\nscaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\nfloat value = min(scaledWidth, scaledHeight);\nvec4 currentColor = mix(lightColor, darkColor, b);\nvec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",$$W="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5));\nvec4 color = mix(lightColor, darkColor, b);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",q$11="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nuniform float spacing;\nuniform float width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat distanceToContour = mod(materialInput.height, spacing);\n#ifdef GL_OES_standard_derivatives\nfloat dxc = abs(dFdx(materialInput.height));\nfloat dyc = abs(dFdy(materialInput.height));\nfloat dF = max(dxc, dyc) * czm_pixelRatio * width;\nfloat alpha = (distanceToContour < dF) ? 1.0 : 0.0;\n#else\nfloat alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;\n#endif\nvec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha));\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",U$$="uniform sampler2D image;\nuniform float minimumHeight;\nuniform float maximumHeight;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);\nvec4 rampColor = texture2D(image, vec2(scaledHeight, 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",K$R="uniform vec4 fadeInColor;\nuniform vec4 fadeOutColor;\nuniform float maximumDistance;\nuniform bool repeat;\nuniform vec2 fadeDirection;\nuniform vec2 time;\nfloat getTime(float t, float coord)\n{\nfloat scalar = 1.0 / maximumDistance;\nfloat q = distance(t, coord) * scalar;\nif (repeat)\n{\nfloat r = distance(t, coord + 1.0) * scalar;\nfloat s = distance(t, coord - 1.0) * scalar;\nq = min(min(r, s), q);\n}\nreturn clamp(q, 0.0, 1.0);\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat s = getTime(time.x, st.s) * fadeDirection.s;\nfloat t = getTime(time.y, st.t) * fadeDirection.t;\nfloat u = length(vec2(s, t));\nvec4 color = mix(fadeInColor, fadeOutColor, u);\ncolor = czm_gammaCorrect(color);\nmaterial.emission = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",Q$Z="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nuniform float cellAlpha;\nuniform vec2 lineCount;\nuniform vec2 lineThickness;\nuniform vec2 lineOffset;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat scaledWidth = fract(lineCount.s * st.s - lineOffset.s);\nscaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\nfloat scaledHeight = fract(lineCount.t * st.t - lineOffset.t);\nscaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\nfloat value;\n#ifdef GL_OES_standard_derivatives\nconst float fuzz = 1.2;\nvec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;\nvec2 dx = abs(dFdx(st));\nvec2 dy = abs(dFdy(st));\nvec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\nvalue = min(\nsmoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\nsmoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n#else\nconst float fuzz = 0.05;\nvec2 range = 0.5 - (lineThickness * 0.05);\nvalue = min(\n1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),\n1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));\n#endif\nfloat dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));\nfloat sRim = smoothstep(0.8, 1.0, dRim);\nvalue *= (1.0 - sRim);\nvec4 halfColor;\nhalfColor.rgb = color.rgb * 0.5;\nhalfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));\nhalfColor = czm_gammaCorrect(halfColor);\nmaterial.diffuse = halfColor.rgb;\nmaterial.emission = halfColor.rgb;\nmaterial.alpha = halfColor.a;\nreturn material;\n}\n",V$U="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 textureValue = texture2D(image, fract(repeat * materialInput.st));\nvec3 normalTangentSpace = textureValue.channels;\nnormalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;\nnormalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);\nnormalTangentSpace = normalize(normalTangentSpace);\nvec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\nmaterial.normal = normalEC;\nreturn material;\n}\n",ee$x="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\nfloat slope = (p0.y - p1.y) / (p0.x - p1.x);\nreturn slope * (x - p0.x) + p0.y;\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\nfloat base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;\n#else\nfloat base = 0.975;\n#endif\nvec2 center = vec2(1.0, 0.5);\nfloat ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\nfloat ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\nfloat halfWidth = 0.15;\nfloat s = step(0.5 - halfWidth, st.t);\ns *= 1.0 - step(0.5 + halfWidth, st.t);\ns *= 1.0 - step(base, st.s);\nfloat t = step(base, materialInput.st.s);\nt *= 1.0 - step(ptOnUpperLine, st.t);\nt *= step(ptOnLowerLine, st.t);\nfloat dist;\nif (st.s < base)\n{\nfloat d1 = abs(st.t - (0.5 - halfWidth));\nfloat d2 = abs(st.t - (0.5 + halfWidth));\ndist = min(d1, d2);\n}\nelse\n{\nfloat d1 = czm_infinity;\nif (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n{\nd1 = abs(st.s - base);\n}\nfloat d2 = abs(st.t - ptOnUpperLine);\nfloat d3 = abs(st.t - ptOnLowerLine);\ndist = min(min(d1, d2), d3);\n}\nvec4 outsideColor = vec4(0.0);\nvec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));\nvec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);\noutColor = czm_gammaCorrect(outColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",te$C="uniform vec4 color;\nuniform vec4 gapColor;\nuniform float dashLength;\nuniform float dashPattern;\nvarying float v_polylineAngle;\nconst float maskLength = 16.0;\nmat2 rotate(float rad) {\nfloat c = cos(rad);\nfloat s = sin(rad);\nreturn mat2(\nc, s,\n-s, c\n);\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\nfloat dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));\nfloat maskIndex = floor(dashPosition * maskLength);\nfloat maskTest = floor(dashPattern / pow(2.0, maskIndex));\nvec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\nif (fragColor.a < 0.005) {\ndiscard;\n}\nfragColor = czm_gammaCorrect(fragColor);\nmaterial.emission = fragColor.rgb;\nmaterial.alpha = fragColor.a;\nreturn material;\n}\n",re$H="uniform vec4 color;\nuniform float glowPower;\nuniform float taperPower;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\nif (taperPower <= 0.99999) {\nglow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));\n}\nglow = clamp(0.0, 2.0, glow);\nvec4 fragColor;\nfragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);\nfragColor.a = clamp(0.0, 1.0, glow) * color.a;\nfragColor = czm_gammaCorrect(fragColor);\nmaterial.emission = fragColor.rgb;\nmaterial.alpha = fragColor.a;\nreturn material;\n}\n",R$W="uniform vec4 color;\nuniform vec4 outlineColor;\nuniform float outlineWidth;\nvarying float v_width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;\nfloat b = step(0.5 - halfInteriorWidth, st.t);\nb *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\nfloat d1 = abs(st.t - (0.5 - halfInteriorWidth));\nfloat d2 = abs(st.t - (0.5 + halfInteriorWidth));\nfloat dist = min(d1, d2);\nvec4 currentColor = mix(outlineColor, color, b);\nvec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);\noutColor = czm_gammaCorrect(outColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",ae$x="uniform vec4 color;\nuniform vec4 rimColor;\nuniform float width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));\nfloat s = smoothstep(1.0 - width, 1.0, d);\nvec4 outColor = czm_gammaCorrect(color);\nvec4 outRimColor = czm_gammaCorrect(rimColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.emission = outRimColor.rgb * s;\nmaterial.alpha = mix(outColor.a, outRimColor.a, s);\nreturn material;\n}\n",ie$D="uniform sampler2D image;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 rampColor = texture2D(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",ne$G="uniform vec4 evenColor;\nuniform vec4 oddColor;\nuniform float offset;\nuniform float repeat;\nuniform bool horizontal;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));\nfloat value = fract((coord - offset) * (repeat * 0.5));\nfloat dist = min(value, min(abs(value - 0.5), 1.0 - value));\nvec4 currentColor = mix(evenColor, oddColor, step(0.5, value));\nvec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",le$w="uniform sampler2D specularMap;\nuniform sampler2D normalMap;\nuniform vec4 baseWaterColor;\nuniform vec4 blendColor;\nuniform float frequency;\nuniform float animationSpeed;\nuniform float amplitude;\nuniform float specularIntensity;\nuniform float fadeFactor;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat time = czm_frameNumber * animationSpeed;\nfloat fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);\nfloat specularMapValue = texture2D(specularMap, materialInput.st).r;\nvec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);\nvec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));\nnormalTangentSpace.xy /= fade;\nnormalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);\nnormalTangentSpace = normalize(normalTangentSpace);\nfloat tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);\nmaterial.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;\nmaterial.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);\nmaterial.diffuse += (0.1 * tsPerturbationRatio);\nmaterial.diffuse = material.diffuse;\nmaterial.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);\nmaterial.specular = specularIntensity;\nmaterial.shininess = 10.0;\nreturn material;\n}\n",fe$w="uniform vec4 color;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = 1.0;\nreturn material;\n}\n",ue$C=0;function r$Y(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._minificationFilter=u$Z(e.minificationFilter,tt$i.LINEAR),this._magnificationFilter=u$Z(e.magnificationFilter,rt$k.LINEAR),this._strict=void 0,this._template=void 0,this._count=void 0,this._texturePaths={},this._loadedImages=[],this._loadedCubeMaps=[],this._textures={},this._updateFunctions=[],this._defaultTexture=void 0,this._wrapS=q$1a.CLAMP_TO_EDGE,this._wrapT=q$1a.CLAMP_TO_EDGE,pe$A(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1}}),e$2e(r$Y._uniformList[this.type])||(r$Y._uniformList[this.type]=Object.keys(this._uniforms)),this._id=ue$C++}function pe$A(e,t){e=u$Z(e,u$Z.EMPTY_OBJECT),t._strict=u$Z(e.strict,!1),t._count=u$Z(e.count,0),t._template=l$1f(u$Z(e.fabric,u$Z.EMPTY_OBJECT)),t._template.uniforms=l$1f(u$Z(t._template.uniforms,u$Z.EMPTY_OBJECT)),t._template.materials=l$1f(u$Z(t._template.materials,u$Z.EMPTY_OBJECT)),t.type=e$2e(t._template.type)?t._template.type:e$1T(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[];var i,n=r$Y._materialCache.getMaterial(t.type);if(e$2e(n)){var r=l$1f(n.fabric,!0);t._template=p$19(t._template,r,!0),i=n.translucent}de$w(t),e$2e(n)||r$Y._materialCache.addMaterial(t.type,t),_e$u(t),we$m(t),xe$p(t);var o=0===t._translucentFunctions.length||void 0;if(i=u$Z(i,o),e$2e(i=u$Z(e.translucent,i)))if("function"==typeof i){t._translucentFunctions.push((function(){return i(t)}))}else t._translucentFunctions.push(i)}function E$13(e,t,i,n){if(e$2e(e))for(var r in e)if(e.hasOwnProperty(r)){var o=-1!==t.indexOf(r);(n&&!o||!n&&o)&&i(r,t)}}function L$15(e,t){for(var i="fabric: property name '"+e+"' is not valid. It should be ",n=0;n<t.length;n++){var r="'"+t[n]+"'";i+=n===t.length-1?"or "+r+".":r+", "}throw new t$15(i)}function ce$w(e,t){throw new t$15("fabric: uniforms and materials cannot share the same property '"+e+"'")}r$Y._uniformList={},r$Y.fromType=function(e,t){if(!e$2e(r$Y._materialCache.getMaterial(e)))throw new t$15("material with type '"+e+"' does not exist.");var i=new r$Y({fabric:{type:e}});if(e$2e(t))for(var n in t)t.hasOwnProperty(n)&&(i.uniforms[n]=t[n]);return i},r$Y.prototype.isTranslucent=function(){if(e$2e(this.translucent))return"function"==typeof this.translucent?this.translucent():this.translucent;for(var e=!0,t=this._translucentFunctions,i=t.length,n=0;n<i;++n){var r=t[n];if(!(e="function"==typeof r?e&&r():e&&r))break}return e},r$Y.prototype.update=function(e){var t,i,n=this._loadedImages,r=n.length;for(t=0;t<r;++t){var o=n[t];i=o.id;var a,s=o.image,l=new e$1S({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter,wrapS:this._wrapS,wrapT:this._wrapT});a=e$2e(s.internalFormat)?new t$U({context:e,pixelFormat:s.internalFormat,width:s.width,height:s.height,source:{arrayBufferView:s.bufferView},sampler:l}):new t$U({context:e,source:s,sampler:l}),this._textures[i]=a;var u=i+"Dimensions";if(this.uniforms.hasOwnProperty(u)){var c=this.uniforms[u];c.x=a._width,c.y=a._height}}n.length=0;var h=this._loadedCubeMaps;for(r=h.length,t=0;t<r;++t){var d=h[t];i=d.id;var f=d.images,p=new e$1P({context:e,source:{positiveX:f[0],negativeX:f[1],positiveY:f[2],negativeY:f[3],positiveZ:f[4],negativeZ:f[5]},sampler:new e$1S({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter})});this._textures[i]=p}h.length=0;var _=this._updateFunctions;for(r=_.length,t=0;t<r;++t)_[t](this,e);var m=this.materials;for(var g in m)m.hasOwnProperty(g)&&m[g].update(e)},r$Y.prototype.isDestroyed=function(){return!1},r$Y.prototype.destroy=function(){var e=this._textures;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];i!==this._defaultTexture&&i.destroy()}var n=this.materials;for(var r in n)n.hasOwnProperty(r)&&n[r].destroy();return i$11(this)};var me$w=["type","materials","uniforms","components","source"],he$u=["diffuse","specular","shininess","normal","emission","alpha"];function de$w(e){var t=e._template,i=t.uniforms,n=t.materials,r=t.components;if(e$2e(r)&&e$2e(t.source))throw new t$15("fabric: cannot have source and components in the same template.");E$13(t,me$w,L$15,!0),E$13(r,he$u,L$15,!0);var o=[];for(var a in n)n.hasOwnProperty(a)&&o.push(a);E$13(i,o,ce$w,!1)}function ye$p(e,t){var i=t._template.materials;for(var n in i)if(i.hasOwnProperty(n)&&e.indexOf(n)>-1)return!0;return!1}function _e$u(e){var t=e._template.components,i=e._template.source;if(e$2e(i))e.shaderSource+=i+"\n";else{if(e.shaderSource+="czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n",e.shaderSource+="czm_material material = czm_getDefaultMaterial(materialInput);\n",e$2e(t)){var n=Object.keys(e._template.materials).length>0;for(var r in t)if(t.hasOwnProperty(r))if("diffuse"===r||"emission"===r){var o=n&&ye$p(t[r],e)?t[r]:"czm_gammaCorrect("+t[r]+")";e.shaderSource+="material."+r+" = "+o+"; \n"}else e.shaderSource+="alpha"===r?"material.alpha = "+t.alpha+"; \n":"material."+r+" = "+t[r]+";\n"}e.shaderSource+="return material;\n}\n"}}var k$V={mat2:f$15,mat3:p$1e,mat4:p$1d},ve$u=/\.ktx$/i,Te$p=/\.crn$/i;function ge$r(e){var t;return function(i,n){var r=i.uniforms,o=r[e],a=t!==o;t=o;var s,l,u=i._textures[e];if(o instanceof HTMLVideoElement)if(o.readyState>=2){if(a&&e$2e(u)&&(u!==n.defaultTexture&&u.destroy(),u=void 0),!e$2e(u)||u===n.defaultTexture)return u=new t$U({context:n,source:o,sampler:new e$1S({minificationFilter:i._minificationFilter,magnificationFilter:i._magnificationFilter})}),void(i._textures[e]=u);u.copyFrom(o)}else e$2e(u)||(i._textures[e]=n.defaultTexture);else{if(o instanceof t$U&&o!==u){i._texturePaths[e]=void 0;var c=i._textures[e];return c!==i._defaultTexture&&c.destroy(),i._textures[e]=o,s=e+"Dimensions",void(r.hasOwnProperty(s)&&(l=r[s],l.x=o._width,l.y=o._height))}if(e$2e(u)||(i._texturePaths[e]=void 0,e$2e(i._defaultTexture)||(i._defaultTexture=n.defaultTexture),u=i._textures[e]=i._defaultTexture,s=e+"Dimensions",r.hasOwnProperty(s)&&((l=r[s]).x=u._width,l.y=u._height)),o!==r$Y.DefaultImageId){var h=o instanceof t$10;if(!e$2e(i._texturePaths[e])||h&&o.url!==i._texturePaths[e].url||!h&&o!==i._texturePaths[e]){if("string"==typeof o||h){var d=h?o:t$10.createIfNeeded(o);o$1l(ve$u.test(d.url)?k$W(d):Te$p.test(d.url)?a$P(d):d.fetchImage(),(function(t){i._loadedImages.push({id:e,image:t})}))}else(o instanceof HTMLCanvasElement||o instanceof HTMLImageElement)&&i._loadedImages.push({id:e,image:o});i._texturePaths[e]=o}}}}}function Me$p(e){return function(t,i){var n=t.uniforms[e];if(n instanceof e$1P){var r=t._textures[e];return r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,void(t._textures[e]=n)}if(e$2e(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=i.defaultCubeMap),n!==r$Y.DefaultCubeMapId){var o=n.positiveX+n.negativeX+n.positiveY+n.negativeY+n.positiveZ+n.negativeZ;if(o!==t._texturePaths[e]){var a=[t$10.createIfNeeded(n.positiveX).fetchImage(),t$10.createIfNeeded(n.negativeX).fetchImage(),t$10.createIfNeeded(n.positiveY).fetchImage(),t$10.createIfNeeded(n.negativeY).fetchImage(),t$10.createIfNeeded(n.positiveZ).fetchImage(),t$10.createIfNeeded(n.negativeZ).fetchImage()];o$1l.all(a).then((function(i){t._loadedCubeMaps.push({id:e,images:i})})),t._texturePaths[e]=o}}}}function we$m(e){var t=e._template.uniforms;for(var i in t)t.hasOwnProperty(i)&&N$V(e,i)}function N$V(e,t){var i=e._strict,n=e._template.uniforms,r=n[t],o=Ce$j(r);if(!e$2e(o))throw new t$15("fabric: uniform '"+t+"' has invalid type.");if("channels"===o){if(0===C$$(e,t,r,!1)&&i)throw new t$15("strict: shader source does not use channels '"+t+"'.")}else{if("sampler2D"===o){var a=t+"Dimensions";be$s(e,a)>0&&(n[a]={type:"ivec3",x:1,y:1},N$V(e,a))}if(!new RegExp("uniform\\s+"+o+"\\s+"+t+"\\s*;").test(e.shaderSource)){var s="uniform "+o+" "+t+";";e.shaderSource=s+e.shaderSource}var l=t+"_"+e._count++;if(1===C$$(e,t,l)&&i)throw new t$15("strict: shader source does not use uniform '"+t+"'.");if(e.uniforms[t]=r,"sampler2D"===o)e._uniforms[l]=function(){var i=e._textures[t];return i&&i._texture?i:e._defaultTexture},e._updateFunctions.push(ge$r(t));else if("samplerCube"===o)e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(Me$p(t));else if(-1!==o.indexOf("mat")){var u=new k$V[o];e._uniforms[l]=function(){return k$V[o].fromColumnMajorArray(e.uniforms[t],u)}}else e._uniforms[l]=function(){return e.uniforms[t]}}}function Ce$j(e){var t=e.type;if(!e$2e(t)){var i=typeof e;if("number"===i)t="float";else if("boolean"===i)t="bool";else if("string"===i||e instanceof t$U||e instanceof t$10||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)t=/^([rgba]){1,4}$/i.test(e)?"channels":e===r$Y.DefaultCubeMapId?"samplerCube":"sampler2D";else if("object"===i)if(Array.isArray(e))(4===e.length||9===e.length||16===e.length)&&(t="mat"+Math.sqrt(e.length));else{var n=0;for(var r in e)e.hasOwnProperty(r)&&(n+=1);n>=2&&n<=4?t="vec"+n:6===n&&(t="samplerCube")}}return t}function xe$p(e){var t=e._strict,i=e._template.materials;for(var n in i)if(i.hasOwnProperty(n)){var r=new r$Y({strict:t,fabric:i[n],count:e._count});e._count=r._count,e._uniforms=p$19(e._uniforms,r._uniforms,!0),e.materials[n]=r,e._translucentFunctions=e._translucentFunctions.concat(r._translucentFunctions);var o="czm_getMaterial",a=o+"_"+e._count++;if(C$$(r,o,a),e.shaderSource=r.shaderSource+e.shaderSource,0===C$$(e,n,a+"(materialInput)")&&t)throw new t$15("strict: shader source does not use material '"+n+"'.")}}function C$$(e,t,i,n){n=u$Z(n,!0);var r=0,o=new RegExp("([\\w"+(n?".":"")+"])?"+t+"([\\w])?","g");return e.shaderSource=e.shaderSource.replace(o,(function(e,t,n){return t||n?e:(r+=1,i)})),r}function be$s(e,t,i){return C$$(e,t,t,i)}r$Y._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}},r$Y.DefaultImageId="czm_defaultImage",r$Y.DefaultCubeMapId="czm_defaultCubeMap",r$Y.ColorType="Color",r$Y._materialCache.addMaterial(r$Y.ColorType,{fabric:{type:r$Y.ColorType,uniforms:{color:new e$1X(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),r$Y.ImageType="Image",r$Y._materialCache.addMaterial(r$Y.ImageType,{fabric:{type:r$Y.ImageType,uniforms:{image:r$Y.DefaultImageId,repeat:new o$1o(1,1),color:new e$1X(1,1,1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture2D(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),r$Y.DiffuseMapType="DiffuseMap",r$Y._materialCache.addMaterial(r$Y.DiffuseMapType,{fabric:{type:r$Y.DiffuseMapType,uniforms:{image:r$Y.DefaultImageId,channels:"rgb",repeat:new o$1o(1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),r$Y.AlphaMapType="AlphaMap",r$Y._materialCache.addMaterial(r$Y.AlphaMapType,{fabric:{type:r$Y.AlphaMapType,uniforms:{image:r$Y.DefaultImageId,channel:"a",repeat:new o$1o(1,1)},components:{alpha:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!0}),r$Y.SpecularMapType="SpecularMap",r$Y._materialCache.addMaterial(r$Y.SpecularMapType,{fabric:{type:r$Y.SpecularMapType,uniforms:{image:r$Y.DefaultImageId,channel:"r",repeat:new o$1o(1,1)},components:{specular:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!1}),r$Y.EmissionMapType="EmissionMap",r$Y._materialCache.addMaterial(r$Y.EmissionMapType,{fabric:{type:r$Y.EmissionMapType,uniforms:{image:r$Y.DefaultImageId,channels:"rgb",repeat:new o$1o(1,1)},components:{emission:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),r$Y.BumpMapType="BumpMap",r$Y._materialCache.addMaterial(r$Y.BumpMapType,{fabric:{type:r$Y.BumpMapType,uniforms:{image:r$Y.DefaultImageId,channel:"r",strength:.8,repeat:new o$1o(1,1)},source:j$12},translucent:!1}),r$Y.NormalMapType="NormalMap",r$Y._materialCache.addMaterial(r$Y.NormalMapType,{fabric:{type:r$Y.NormalMapType,uniforms:{image:r$Y.DefaultImageId,channels:"rgb",strength:.8,repeat:new o$1o(1,1)},source:V$U},translucent:!1}),r$Y.GridType="Grid",r$Y._materialCache.addMaterial(r$Y.GridType,{fabric:{type:r$Y.GridType,uniforms:{color:new e$1X(0,1,0,1),cellAlpha:.1,lineCount:new o$1o(8,8),lineThickness:new o$1o(1,1),lineOffset:new o$1o(0,0)},source:Q$Z},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}}),r$Y.StripeType="Stripe",r$Y._materialCache.addMaterial(r$Y.StripeType,{fabric:{type:r$Y.StripeType,uniforms:{horizontal:!0,evenColor:new e$1X(1,1,1,.5),oddColor:new e$1X(0,0,1,.5),offset:0,repeat:5},source:ne$G},translucent:function(e){var t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}}),r$Y.CheckerboardType="Checkerboard",r$Y._materialCache.addMaterial(r$Y.CheckerboardType,{fabric:{type:r$Y.CheckerboardType,uniforms:{lightColor:new e$1X(1,1,1,.5),darkColor:new e$1X(0,0,0,.5),repeat:new o$1o(5,5)},source:J$W},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),r$Y.DotType="Dot",r$Y._materialCache.addMaterial(r$Y.DotType,{fabric:{type:r$Y.DotType,uniforms:{lightColor:new e$1X(1,1,0,.75),darkColor:new e$1X(0,1,1,.75),repeat:new o$1o(5,5)},source:$$W},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),r$Y.WaterType="Water",r$Y._materialCache.addMaterial(r$Y.WaterType,{fabric:{type:r$Y.WaterType,uniforms:{baseWaterColor:new e$1X(.2,.3,.6,1),blendColor:new e$1X(0,1,.699,1),specularMap:r$Y.DefaultImageId,normalMap:r$Y.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:le$w},translucent:function(e){var t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}}),r$Y.RimLightingType="RimLighting",r$Y._materialCache.addMaterial(r$Y.RimLightingType,{fabric:{type:r$Y.RimLightingType,uniforms:{color:new e$1X(1,0,0,.7),rimColor:new e$1X(1,1,1,.4),width:.3},source:ae$x},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}}),r$Y.FadeType="Fade",r$Y._materialCache.addMaterial(r$Y.FadeType,{fabric:{type:r$Y.FadeType,uniforms:{fadeInColor:new e$1X(1,0,0,1),fadeOutColor:new e$1X(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new o$1o(.5,.5)},source:K$R},translucent:function(e){var t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}}),r$Y.PolylineArrowType="PolylineArrow",r$Y._materialCache.addMaterial(r$Y.PolylineArrowType,{fabric:{type:r$Y.PolylineArrowType,uniforms:{color:new e$1X(1,1,1,1)},source:ee$x},translucent:!0}),r$Y.PolylineDashType="PolylineDash",r$Y._materialCache.addMaterial(r$Y.PolylineDashType,{fabric:{type:r$Y.PolylineDashType,uniforms:{color:new e$1X(1,0,1,1),gapColor:new e$1X(0,0,0,0),dashLength:16,dashPattern:255},source:te$C},translucent:!0}),r$Y.PolylineGlowType="PolylineGlow",r$Y._materialCache.addMaterial(r$Y.PolylineGlowType,{fabric:{type:r$Y.PolylineGlowType,uniforms:{color:new e$1X(0,.5,1,1),glowPower:.25,taperPower:1},source:re$H},translucent:!0}),r$Y.PolylineOutlineType="PolylineOutline",r$Y._materialCache.addMaterial(r$Y.PolylineOutlineType,{fabric:{type:r$Y.PolylineOutlineType,uniforms:{color:new e$1X(1,1,1,1),outlineColor:new e$1X(1,0,0,1),outlineWidth:1},source:R$W},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}}),r$Y.ElevationContourType="ElevationContour",r$Y._materialCache.addMaterial(r$Y.ElevationContourType,{fabric:{type:r$Y.ElevationContourType,uniforms:{spacing:100,color:new e$1X(1,0,0,1),width:1},source:q$11},translucent:!1}),r$Y.ElevationRampType="ElevationRamp",r$Y._materialCache.addMaterial(r$Y.ElevationRampType,{fabric:{type:r$Y.ElevationRampType,uniforms:{image:r$Y.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:U$$},translucent:!1}),r$Y.SlopeRampMaterialType="SlopeRamp",r$Y._materialCache.addMaterial(r$Y.SlopeRampMaterialType,{fabric:{type:r$Y.SlopeRampMaterialType,uniforms:{image:r$Y.DefaultImageId},source:ie$D},translucent:!1}),r$Y.AspectRampMaterialType="AspectRamp",r$Y._materialCache.addMaterial(r$Y.AspectRampMaterialType,{fabric:{type:r$Y.AspectRampMaterialType,uniforms:{image:r$Y.DefaultImageId},source:Z$Y},translucent:!1}),r$Y.EmissionColorType="EmissionColor",r$Y._materialCache.addMaterial(r$Y.EmissionColorType,{fabric:{type:r$Y.EmissionColorType,uniforms:{color:new e$1X(1,1,1,1)},source:fe$w},translucent:function(e){return e.uniforms.color.alpha<1}}),r$Y.PolylineDynamicType="PolylineDynamic",r$Y._materialCache.addMaterial(r$Y.PolylineDynamicType,{fabric:{type:r$Y.PolylineDynamicType,uniforms:{color:new e$1X(1,1,1,1),outlineColor:new e$1X(1,0,0,1),outlineWidth:0,v_time:1,bAsy:1},source:R$W},translucent:function(e){return!0}}),r$Y.PolylineTrailType="PolylineTrail",r$Y._materialCache.addMaterial(r$Y.PolylineTrailType,{fabric:{type:r$Y.PolylineTrailType,uniforms:{color:new e$1X(1,0,0,.5),trailTime:0,spotSize:1,trailLength:.03,spotIntensity:5,constantSpeed:0,period:1e3,startTime:0},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return!0}});var m$X={numberOfPoints:function(e,t,i){var n=o$1p.distance(e,t);return Math.ceil(n/i)},numberOfPointsRhumbLine:function(e,t,i){var n=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.ceil(Math.sqrt(n/(i*i)))}},F$Z=new a$18;m$X.extractHeights=function(e,t){for(var i=e.length,n=new Array(i),r=0;r<i;r++){var o=e[r];n[r]=t.cartesianToCartographic(o,F$Z).height}return n};var j$11=new p$1d,J$V=new o$1p,M$$=new o$1p,K$Q=new o$1m(o$1p.UNIT_X,0),X$V=new o$1p,Q$Y=new o$1m(o$1p.UNIT_X,0),$$V=new o$1p,rr$9=new o$1p,G$17=[];function Z$X(e,t,i){var n,r=G$17;if(r.length=e,t===i){for(n=0;n<e;n++)r[n]=t;return r}var o=(i-t)/e;for(n=0;n<e;n++){var a=t+n*o;r[n]=a}return r}function ar$7(e,t){var i=G$17;i.length=e;for(var n=0;n<e;n++)i[n]+=t*Math.sin(Math.PI*n/e);return i}var I$19=new a$18,N$U=new a$18,T$Z=new o$1p,B$U=new o$1p,V$T=new o$1p,H$11=new E$1t,E$12=new P$15;function er$9(e,t,i,n,r,o,a,s,l){var u=n.scaleToGeodeticSurface(e,B$U),c=n.scaleToGeodeticSurface(t,V$T),h=m$X.numberOfPoints(e,t,i),d=n.cartesianToCartographic(u,I$19),f=n.cartesianToCartographic(c,N$U),p=Z$X(h,r,o);l>0&&(p=ar$7(h,l)),H$11.setEndPoints(d,f);var _=H$11.surfaceDistance/h,m=s;d.height=r;var g=n.cartographicToCartesian(d,T$Z);o$1p.pack(g,a,m),m+=3;for(var x=1;x<h;x++){var y=H$11.interpolateUsingSurfaceDistance(x*_,N$U);y.height=p[x],g=n.cartographicToCartesian(y,T$Z),o$1p.pack(g,a,m),m+=3}return m}function tr$7(e,t,i,n,r,o,a,s){var l=n.scaleToGeodeticSurface(e,B$U),u=n.scaleToGeodeticSurface(t,V$T),c=n.cartesianToCartographic(l,I$19),h=n.cartesianToCartographic(u,N$U),d=m$X.numberOfPointsRhumbLine(c,h,i),f=Z$X(d,r,o);E$12.ellipsoid.equals(n)||(E$12=new P$15(void 0,void 0,n)),E$12.setEndPoints(c,h);var p=E$12.surfaceDistance/d,_=s;c.height=r;var m=n.cartographicToCartesian(c,T$Z);o$1p.pack(m,a,_),_+=3;for(var g=1;g<d;g++){var x=E$12.interpolateUsingSurfaceDistance(g*p,N$U);x.height=f[g],m=n.cartographicToCartesian(x,T$Z),o$1p.pack(m,a,_),_+=3}return _}m$X.wrapLongitude=function(e,t){var i=[],n=[];if(e$2e(e)&&e.length>0){t=u$Z(t,p$1d.IDENTITY);var r=p$1d.inverseTransformation(t,j$11),o=p$1d.multiplyByPoint(r,o$1p.ZERO,J$V),a=o$1p.normalize(p$1d.multiplyByPointAsVector(r,o$1p.UNIT_Y,M$$),M$$),s=o$1m.fromPointNormal(o,a,K$Q),l=o$1p.normalize(p$1d.multiplyByPointAsVector(r,o$1p.UNIT_X,X$V),X$V),u=o$1m.fromPointNormal(o,l,Q$Y),c=1;i.push(o$1p.clone(e[0]));for(var h=i[0],d=e.length,f=1;f<d;++f){var p=e[f];if(o$1m.getPointDistance(u,h)<0||o$1m.getPointDistance(u,p)<0){var _=g$1j.lineSegmentPlane(h,p,s,$$V);if(e$2e(_)){var m=o$1p.multiplyByScalar(a,5e-9,rr$9);o$1m.getPointDistance(s,h)<0&&o$1p.negate(m,m),i.push(o$1p.add(_,m,new o$1p)),n.push(c+1),o$1p.negate(m,m),i.push(o$1p.add(_,m,new o$1p)),c=1}}i.push(o$1p.clone(e[f])),c++,h=p}n.push(c)}return{positions:i,lengths:n}},m$X.generateArc=function(e){e$2e(e)||(e={});var t=e.positions;if(!e$2e(t))throw new t$15("options.positions is required.");var i=t.length,n=u$Z(e.ellipsoid,t$12.WGS84),r=u$Z(e.height,0),o=Array.isArray(r);if(i<1)return[];if(1===i){var a=n.scaleToGeodeticSurface(t[0],B$U);if(0!==(r=o?r[0]:r)){var s=n.geodeticSurfaceNormal(a,T$Z);o$1p.multiplyByScalar(s,r,s),o$1p.add(a,s,a)}return[a.x,a.y,a.z]}var l=e.minDistance;if(!e$2e(l)){var u=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE);l=e$2d.chordLength(u,n.maximumRadius)}var c,h=0;for(c=0;c<i-1;c++)h+=m$X.numberOfPoints(t[c],t[c+1],l);var d=e.hMax,f=3*(h+1),p=new Array(f),_=0;for(c=0;c<i-1;c++){_=er$9(t[c],t[c+1],l,n,o?r[c]:r,o?r[c+1]:r,p,_,d)}G$17.length=0;var m=t[i-1],g=n.cartesianToCartographic(m,I$19);g.height=o?r[i-1]:r;var x=n.cartographicToCartesian(g,T$Z);return o$1p.pack(x,p,f-3),p};var Y$M=new a$18,nr$9=new a$18;function o$14(e,t){e=u$Z(e,u$Z.EMPTY_OBJECT),this._show=u$Z(e.show,!0),this._width=u$Z(e.width,1),this._loop=u$Z(e.loop,!1),this._distanceDisplayCondition=e.distanceDisplayCondition,this._material=e.material,e$2e(this._material)||(this._material=r$Y.fromType(r$Y.ColorType,{color:new e$1X(1,1,1,1)}));var i,n=e.positions;e$2e(n)||(n=[]),this._positions=n,this._actualPositions=D$13(n,o$1p.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(o$1p.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id,e$2e(t)&&(i=p$1d.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=m$X.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(P$V),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=i$1d.fromPoints(this._actualPositions),this._boundingVolumeWC=i$1d.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new i$1d}m$X.generateRhumbArc=function(e){e$2e(e)||(e={});var t=e.positions;if(!e$2e(t))throw new t$15("options.positions is required.");var i=t.length,n=u$Z(e.ellipsoid,t$12.WGS84),r=u$Z(e.height,0),o=Array.isArray(r);if(i<1)return[];if(1===i){var a=n.scaleToGeodeticSurface(t[0],B$U);if(0!==(r=o?r[0]:r)){var s=n.geodeticSurfaceNormal(a,T$Z);o$1p.multiplyByScalar(s,r,s),o$1p.add(a,s,a)}return[a.x,a.y,a.z]}var l,u,c=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),h=0,d=n.cartesianToCartographic(t[0],Y$M);for(l=0;l<i-1;l++)u=n.cartesianToCartographic(t[l+1],nr$9),h+=m$X.numberOfPointsRhumbLine(d,u,c),d=a$18.clone(u,Y$M);var f=3*(h+1),p=new Array(f),_=0;for(l=0;l<i-1;l++){_=tr$7(t[l],t[l+1],c,n,o?r[l]:r,o?r[l+1]:r,p,_)}G$17.length=0;var m=t[i-1],g=n.cartesianToCartographic(m,I$19);g.height=o?r[i-1]:r;var x=n.cartographicToCartesian(g,T$Z);return o$1p.pack(x,p,f-3),p},m$X.generateCartesianArc=function(e){for(var t=m$X.generateArc(e),i=t.length/3,n=new Array(i),r=0;r<i;r++)n[r]=o$1p.unpack(t,3*r);return n},m$X.generateCartesianRhumbArc=function(e){for(var t=m$X.generateRhumbArc(e),i=t.length/3,n=new Array(i),r=0;r<i;r++)n[r]=o$1p.unpack(t,3*r);return n};var I$18=o$14.POSITION_INDEX=0,D$Y=o$14.SHOW_INDEX=1,w$S=o$14.WIDTH_INDEX=2,E$11=o$14.MATERIAL_INDEX=3,d$1a=o$14.POSITION_SIZE_INDEX=4,N$T=o$14.DISTANCE_DISPLAY_CONDITION=5,P$V=o$14.NUMBER_OF_PROPERTIES=6;function n$Y(e,t){++e._propertiesChanged[t];var i=e._polylineCollection;e$2e(i)&&(i._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(o$14.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2e(e))throw new t$15("value is required.");e!==this._show&&(this._show=e,n$Y(this,D$Y))}},positions:{get:function(){return this._positions},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=D$13(e,o$1p.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(o$1p.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&n$Y(this,d$1a),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=i$1d.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=i$1d.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),n$Y(this,I$18),this.update()}},material:{get:function(){return this._material},set:function(e){if(!e$2e(e))throw new t$15("material is required.");this._material!==e&&(this._material=e,n$Y(this,E$11))}},width:{get:function(){return this._width},set:function(e){if(!e$2e(e))throw new t$15("value is required.");e!==this._width&&(this._width=e,n$Y(this,w$S))}},loop:{get:function(){return this._loop},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(e!==this._loop){var t=this._actualPositions;e?t.length>2&&!o$1p.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(o$1p.clone(t[0]))):t.length>2&&o$1p.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,n$Y(this,d$1a)}}},id:{get:function(){return this._id},set:function(e){this._id=e,e$2e(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");r$Z.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=r$Z.clone(e,this._distanceDisplayCondition),n$Y(this,N$T))}}}),o$14.prototype.update=function(){var e=p$1d.IDENTITY;e$2e(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);var t=this._segments.positions.length,i=this._segments.lengths,n=this._propertiesChanged[I$18]>0||this._propertiesChanged[d$1a]>0;if((!p$1d.equals(e,this._modelMatrix)||n)&&(this._segments=m$X.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=i$1d.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=p$1d.clone(e,this._modelMatrix),this._segments.positions.length!==t)n$Y(this,d$1a);else for(var r=i.length,o=0;o<r;++o)if(i[o]!==this._segments.lengths[o]){n$Y(this,d$1a);break}},o$14.prototype.getPickId=function(e){if(!e$2e(this._pickId))if(this._polylineCollection._polygonEntityId){var t=e.getAllPickObjects();for(let i in t)t[i].id&&t[i].id.id&&t[i].id.id===this._polylineCollection._polygonEntityId&&(this._pickId=e.getPickIdByKey(i))}else this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id});return this._pickId},o$14.prototype._clean=function(){this._dirty=!1;for(var e=this._propertiesChanged,t=0;t<P$V-1;++t)e[t]=0},o$14.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var e$1J={OCCLUDED:0,OCCLUDED_TRANSLUCENT:1,NON_OCCLUDED:2},J$U=Object.freeze(e$1J),A$13={NEVER:de$y.NEVER,LESS:de$y.LESS,EQUAL:de$y.EQUAL,LESS_OR_EQUAL:de$y.LEQUAL,GREATER:de$y.GREATER,NOT_EQUAL:de$y.NOTEQUAL,GREATER_OR_EQUAL:de$y.GEQUAL,ALWAYS:de$y.ALWAYS},re$G=Object.freeze(A$13),d$19="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec2 st;\nattribute float batchId;\n#ifdef TRAIL\nuniform float trailTime_1;\nuniform float spotSize_2;\nuniform float constantSpeed_5;\nuniform float trailLength_3;\nuniform float period_6;\nuniform float startTime_7;\nattribute vec3 dist;\nvarying float v_Percent;\nvarying float v_SpotPercent;\n#endif\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying float v_clipW;\nvoid main()\n{\nfloat u = abs(expandAndWidth.x);\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = czm_computePosition();\nvec4 prev = czm_computePrevPosition();\nvec4 next = czm_computeNextPosition();\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\nv_width = width;\nv_st.s = st.s;\nv_st.t = czm_writeNonPerspective(st.t, gl_Position.w);\nv_polylineAngle = angle;\nv_alpha = u;\nv_clipW = gl_Position.w;\n#ifdef TRAIL\nfloat t = 0.0;\nif(abs(constantSpeed_5) > czm_epsilon7)\n{\nt = mod((constantSpeed_5 * trailTime_1 + dist.z) / dist.y, 1.0 + trailLength_3) - trailLength_3;\n}\nelse\n{\nt = mod((trailTime_1 - startTime_7) / period_6, 1.0 + trailLength_3) - trailLength_3;\n}\nfloat trailLen = dist.y * trailLength_3;\nv_Percent = (dist.x - t * dist.y) / trailLen;\nv_SpotPercent = spotSize_2 / dist.y;\n#endif\n}\n",i$U=Z$_+"\n"+d$19,p$X=be$t;function r$X(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.translucent,!0),i=r$X.VERTEX_FORMAT;this.material=e$2e(e.material)?e.material:r$Y.fromType(r$Y.ColorType),this.translucent=t,this._vertexShaderSource=u$Z(e.vertexShaderSource,i$U),this._fragmentShaderSource=u$Z(e.fragmentShaderSource,p$X),this._renderState=a$S.getDefaultRenderState(t,false,e.renderState),this._closed=false,this._vertexFormat=i,this._name="PolylineMaterialAppearance"}s$Z.isInternetExplorer()||(i$U="#define CLIP_POLYLINE \n"+i$U),Object.defineProperties(r$X.prototype,{vertexShaderSource:{get:function(){var e=this._vertexShaderSource;return-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&(e="#define POLYLINE_DASH\n"+e),"PolylineDynamic"==this.material.type&&(e="#define ENABLE_DYNAMIC\n"+e),"PolylineTrail"==this.material.type&&(e="#define TRAIL\n"+e),e}},fragmentShaderSource:{get:function(){var e=this._fragmentShaderSource;return"PolylineDynamic"==this.material.type&&(e="#define ENABLE_DYNAMIC\n"+e),"PolylineTrail"==this.material.type&&(e="#define TRAIL\n"+e),e}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},name:{get:function(){return this._name+"_"+this.material._id}}}),r$X.VERTEX_FORMAT=n$13.POSITION_AND_ST,r$X.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,r$X.prototype.isTranslucent=a$S.prototype.isTranslucent,r$X.prototype.getRenderState=a$S.prototype.getRenderState;var nr$8=o$14.SHOW_INDEX,lr$8=o$14.WIDTH_INDEX,Ae$t=o$14.POSITION_INDEX,_r$5=o$14.MATERIAL_INDEX,Be$m=o$14.POSITION_SIZE_INDEX,ur$6=o$14.DISTANCE_DISPLAY_CONDITION,Oe$o=o$14.NUMBER_OF_PROPERTIES,re$F={texCoordExpandAndBatchIndex:0,positionHigh:1,positionLow:2,prevPositionHigh:3,prevPositionLow:4,nextPositionHigh:5,nextPositionLow:6};function J$T(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this._opaqueRS=e.opaqueRS,this._translucentRS=e.translucentRS,this._colorCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(Oe$o),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:A$18.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=e$1X.clone(e$1X.WHITE);var t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}},this._lineDisplayType=e.lineDisplayType,this._canAlwaysPick=!1,this._polygonEntityId=u$Z(e.polygonEntityId,void 0)}function vr$5(e,t){e$2e(e._batchTable)&&e._batchTable.destroy();var i=[{functionName:"batchTable_getWidthAndShow",componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:S$14.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:S$14.FLOAT,componentsPerAttribute:2}];e._batchTable=new h$X(t,i,e._polylines.length)}Object.defineProperties(J$T.prototype,{length:{get:function(){return we$l(this),this._polylines.length}},lineDisplayType:{get:function(){return this._lineDisplayType},set:function(e){if(o$1q.typeOf.number.greaterThanOrEquals("PolylineCollection.lineDisplayType",e,0),o$1q.typeOf.number.lessThanOrEquals("PolylineCollection.lineDisplayType",e,2),this._lineDisplayType!==e){this._lineDisplayType=e;for(var t,i=this._polylines.length,n=0;n<i;n++){t=void 0;var r=this._polylines[n];if(e$2e(r)){for(var o=n+1;o<i;o++){var a=this._polylines[o];if(e$2e(a)&&a.id&&a.id===r._index+"-alpha"){t=a;break}}if(e$2e(t)||this._lineDisplayType!==J$U.OCCLUDED_TRANSLUCENT)e$2e(t)&&this._lineDisplayType!==J$U.OCCLUDED_TRANSLUCENT&&this.remove(t);else{var s={show:r.show,positions:r.positions,width:r.width,loop:r.loop,distanceDisplayCondition:r._distanceDisplayCondition},l=r$Y.fromType(r$Y.ColorType,{color:e$1X.clone(r.material.uniforms.color,new e$1X).withAlpha(.2)});l.uniforms.color.alpha=.2,s.material=l;var u=new o$14(s,this);u.material=l,u._index=this._polylines.length,u.id=r._index+"-alpha",this._polylines.push(u),this._createVertexArray=!0,this._createBatchTable=!0}}}this._lineDisplayType===J$U.OCCLUDED_TRANSLUCENT?(this._opaqueRS=d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}),this._translucentRS=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}})):this._lineDisplayType===J$U.NON_OCCLUDED?this._opaqueRS=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}}):this._lineDisplayType===J$U.OCCLUDED&&(this._opaqueRS=d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}))}}}}),J$T.prototype.add=function(e){var t=new o$14(e,this);if(t._index=this._polylines.length,this._polylines.push(t),this._lineDisplayType===J$U.OCCLUDED_TRANSLUCENT){this._opaqueRS=d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}),this._translucentRS=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}});var i=r$Y.fromType(r$Y.ColorType,{color:e$1X.clone(e.material.uniforms.color,new e$1X).withAlpha(.2)});i.uniforms.color.alpha=.2;var n=new o$14(e,this);n.material=i,n._index=this._polylines.length,n.id=t._index+"-alpha",this._polylines.push(n)}else this._lineDisplayType===J$U.NON_OCCLUDED?this._opaqueRS=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}}):this._lineDisplayType===J$U.OCCLUDED&&(this._opaqueRS=d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}));return this._createVertexArray=!0,this._createBatchTable=!0,t},J$T.prototype.remove=function(e){if(this.contains(e)){this._polylines[e._index]=void 0;var t=this._polylinesToUpdate.indexOf(e);if(-1!==t&&this._polylinesToUpdate.splice(t,1),this._polylinesRemoved=!0,this._createVertexArray=!0,this._createBatchTable=!0,e$2e(e._bucket)){var i=e._bucket;i.shaderProgram=i.shaderProgram&&i.shaderProgram.destroy()}e._destroy();for(var n,r=0,o=this._polylines.length;r<o;r++){var a=this._polylines[r];a&&a.id&&a.id===e._index+"-alpha"&&(n=a)}if(e$2e(n)){this._polylines[n._index]=void 0;var s=this._polylinesToUpdate.indexOf(e);-1!==s&&this._polylinesToUpdate.splice(s,1),n._destroy()}return!0}return!1},J$T.prototype.removeAll=function(){Ne$j(this),Ye$h(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0},J$T.prototype.contains=function(e){return e$2e(e)&&e._polylineCollection===this},J$T.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return we$l(this),this._polylines[e]};var Le$o=new i$12,Ue$i=new e$2c,Ve$j=new o$1o;J$T.prototype.update=function(e){if(we$l(this),0!==this._polylines.length){mr$4(this,e);var t,i=e.context,n=e.mapProjection,r=this._propertiesChanged;if(this._createBatchTable){if(0===e$1W.maximumVertexTextureImageUnits)throw new t$13("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");vr$5(this,i),this._createBatchTable=!1}if(this._createVertexArray||dr$5(this))ke$g(this,i,n);else if(this._polylinesUpdated){var o=this._polylinesToUpdate;if(this._mode!==C$14.SCENE3D)for(var a=o.length,s=0;s<a;++s)(t=o[s]).update();if(r[Be$m]||r[_r$5])ke$g(this,i,n);else for(var l=o.length,u=this._polylineBuckets,c=0;c<l;++c){r=(t=o[c])._propertiesChanged;var h=t._bucket,d=0;for(var f in u)if(u.hasOwnProperty(f)){if(u[f]===h){r[Ae$t]&&h.writeUpdate(d,t,this._positionBuffer,n);break}d+=u[f].lengthOfPositions}if((r[nr$8]||r[lr$8])&&this._batchTable.setBatchedAttribute(t._index,0,new o$1o(t._width,t._show)),this._batchTable.attributes.length>2){if(r[Ae$t]||r[Be$m]){var p=e.mode===C$14.SCENE2D?t._boundingVolume2D:t._boundingVolumeWC,_=i$12.fromCartesian(p.center,Le$o),m=e$2c.fromElements(_.low.x,_.low.y,_.low.z,p.radius,Ue$i);this._batchTable.setBatchedAttribute(t._index,2,_.high),this._batchTable.setBatchedAttribute(t._index,3,m)}if(r[ur$6]){var g=Ve$j;g.x=0,g.y=Number.MAX_VALUE;var x=t.distanceDisplayCondition;e$2e(x)&&(g.x=x.near,g.y=x.far),this._batchTable.setBatchedAttribute(t._index,4,g)}}t._clean()}o.length=0,this._polylinesUpdated=!1}r=this._propertiesChanged;for(var y=0;y<Oe$o;++y)r[y]=0;var v=p$1d.IDENTITY;e.mode===C$14.SCENE3D&&(v=this.modelMatrix);var $=e.passes,b=0!==e.morphTime;if(e$2e(this._opaqueRS)||(this._opaqueRS=d$1m.fromCache({depthMask:b,depthTest:{enabled:b}})),e$2e(this._translucentRS)||(this._translucentRS=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!b,depthTest:{enabled:b}})),this._batchTable.update(e),e._fboState.frameBufferType!=Qe$c.CLAMP&&($.render||$.pick))or$6(this,e,this._colorCommands,v)}};var _e$t=new i$1d,Ie$m=new i$1d;function or$6(e,t,i,n){for(var r=t.context,o=t.commandList,a=i.length,s=0,l=!0,u=e._vertexArrays,c=e.debugShowBoundingVolume,h=e._batchTable.getUniformMapCallback(),d=u.length,f=0;f<d;++f)for(var p=u[f],_=p.buckets,m=_.length,g=0;g<m;++g){for(var x,y,v,$,b,T,C=_[g],S=C.offset,w=C.bucket.shaderProgram,E=C.bucket._spDepthFail,P=C.bucket.polylines,A=P.length,L=0,M=0;M<A;++M){var R,O=P[M],D=gr$5(O._material);if(D!==x){if(e$2e(x)&&L>0){var I=y.isTranslucent();if(s>=a?(b=new i$$({owner:e}),i.push(b)):b=i[s],++s,T=p$19(h(y._uniforms),e._uniformMap),b.boundingVolume=i$1d.clone(_e$t,b.boundingVolume),b.modelMatrix=n,b.shaderProgram=w,b.vertexArray=p.va,b.renderState=I?e._translucentRS:e._opaqueRS,b.pass=y.isTranslucent()?Le$q.TRANSLUCENT:Le$q.OPAQUE,b.debugShowBoundingVolume=c,b.pickId="v_pickColor",b.uniformMap=T,b.count=L,b.offset=S,t.passes.pick&&e._canAlwaysPick&&(b.pass=Le$q.OVERLAY_AGAINST_DEPTH),o.push(b),e$2e(v)){s>=a?(b=new i$$({owner:e}),i.push(b)):b=i[s],++s;let r=new $({material:v,translucent:v.isTranslucent(),closed:!1}),l=p$19(h(v._uniforms),e._uniformMap),u=l$1f(r.getRenderState(),!1);u.depthTest.func=re$G.GREATER,b.boundingVolume=i$1d.clone(_e$t,b.boundingVolume),b.modelMatrix=n,b.vertexArray=p.va,b.renderState=d$1m.fromCache(u),b.shaderProgram=E,b.uniformMap=l,b.pass=y.isTranslucent()?Le$q.TRANSLUCENT:Le$q.OPAQUE,b.debugShowBoundingVolume=c,b.pickId="v_pickColor",b.count=L,b.offset=S,t.passes.pick&&e._canAlwaysPick&&(b.pass=Le$q.OVERLAY_AGAINST_DEPTH),o.push(b)}S+=L,L=0,l=!0}y=O._material,v=O._depthFailMaterial,$=O._depthFailMaterialAppearance,y.update(r),x=D}for(var B=O._locatorBuckets,F=B.length,N=0;N<F;++N){var G=B[N];G.locator===C&&(L+=G.count)}t.mode===C$14.SCENE3D?R=O._boundingVolumeWC:t.mode===C$14.COLUMBUS_VIEW?R=O._boundingVolume2D:t.mode===C$14.SCENE2D?e$2e(O._boundingVolume2D)&&((R=i$1d.clone(O._boundingVolume2D,Ie$m)).center.x=0):e$2e(O._boundingVolumeWC)&&e$2e(O._boundingVolume2D)&&(R=i$1d.union(O._boundingVolumeWC,O._boundingVolume2D,Ie$m)),l?(l=!1,i$1d.clone(R,_e$t)):i$1d.union(R,_e$t,_e$t)}if(e$2e(x)&&L>0){if(s>=a?(b=new i$$({owner:e}),i.push(b)):b=i[s],++s,T=p$19(h(y._uniforms),e._uniformMap),b.boundingVolume=i$1d.clone(_e$t,b.boundingVolume),b.modelMatrix=n,b.shaderProgram=w,b.vertexArray=p.va,b.renderState=y.isTranslucent()?e._translucentRS:e._opaqueRS,b.pass=y.isTranslucent()?Le$q.TRANSLUCENT:Le$q.OPAQUE,b.debugShowBoundingVolume=c,b.pickId="v_pickColor",b.uniformMap=T,b.count=L,b.offset=S,t.passes.pick&&e._canAlwaysPick&&(b.pass=Le$q.OVERLAY_AGAINST_DEPTH),o.push(b),e$2e(v)){s>=a?(b=new i$$({owner:e}),i.push(b)):b=i[s],++s;let r=new $({material:v,translucent:v.isTranslucent(),closed:!1}),l=p$19(h(v._uniforms),e._uniformMap),u=l$1f(r.getRenderState(),!1);u.depthTest.func=re$G.GREATER,b.boundingVolume=i$1d.clone(_e$t,b.boundingVolume),b.modelMatrix=n,b.vertexArray=p.va,b.renderState=d$1m.fromCache(u),b.shaderProgram=E,b.uniformMap=l,b.pass=y.isTranslucent()?Le$q.TRANSLUCENT:Le$q.OPAQUE,b.debugShowBoundingVolume=c,b.pickId="v_pickColor",b.count=L,b.offset=S,t.passes.pick&&e._canAlwaysPick&&(b.pass=Le$q.OVERLAY_AGAINST_DEPTH),o.push(b)}l=!0}x=void 0}i.length=s}function dr$5(e){var t=!1,i=e._propertiesChanged,n=e._positionBufferUsage;return i[Ae$t]?(n.bufferUsage!==A$18.STREAM_DRAW&&(t=!0,n.bufferUsage=A$18.STREAM_DRAW),n.frameCount=100):n.bufferUsage!==A$18.STATIC_DRAW&&(0===n.frameCount?(t=!0,n.bufferUsage=A$18.STATIC_DRAW):n.frameCount--),t}J$T.prototype.isDestroyed=function(){return!1},J$T.prototype.destroy=function(){return Fe$m(this),Ne$j(this),Ye$h(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$11(this)};var Me$o=[0,0,0];function ke$g(e,t,i){e._createVertexArray=!1,Ne$j(e),Fe$m(e),Tr$6(e);var n,r,o=[[]],a=o[0],s=e._batchTable,l=e._useHighlightColor,u=[0],c=0,h=[[]],d=0,f=e._polylineBuckets;for(n in f)f.hasOwnProperty(n)&&((r=f[n]).updateShader(t,s,l),d+=r.lengthOfPositions);if(d>0){var p,_=e._mode,m=new Float32Array(6*d*3),g=new Float32Array(4*d),x=0,y=0,v=0;for(n in f)if(f.hasOwnProperty(n)){(r=f[n]).write(m,g,x,y,v,s,t,i),_===C$14.MORPHING&&(e$2e(p)||(p=new Float32Array(6*d*3)),r.writeForMorph(p,x));var $=r.lengthOfPositions;x+=6*$*3,y+=4*$,v+=4*$,c=r.updateIndices(o,u,h,c)}var b,T=e._positionBufferUsage.bufferUsage,C=A$18.STATIC_DRAW;e._positionBuffer=t$X.createVertexBuffer({context:t,typedArray:m,usage:T}),e$2e(p)&&(b=t$X.createVertexBuffer({context:t,typedArray:p,usage:T})),e._texCoordExpandAndBatchIndexBuffer=t$X.createVertexBuffer({context:t,typedArray:g,usage:C});for(var S=3*Float32Array.BYTES_PER_ELEMENT,w=4*Float32Array.BYTES_PER_ELEMENT,E=0,P=o.length,A=0;A<P;++A)if((a=o[A]).length>0){var L=new Uint16Array(a),M=t$X.createIndexBuffer({context:t,typedArray:L,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});E+=u[A];var R,O,D,I,B=6*(A*(S*e$2d.SIXTY_FOUR_KILOBYTES)-E*S),F=S+B,N=S+F,G=S+N,z=S+G,U=S+z,V=A*(w*e$2d.SIXTY_FOUR_KILOBYTES)-E*w,k=[{name:"positionHigh",index:re$F.positionHigh,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:B,strideInBytes:6*S},{name:"positionLow",index:re$F.positionLow,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:F,strideInBytes:6*S},{name:"prevPositionHigh",index:re$F.prevPositionHigh,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:N,strideInBytes:6*S},{name:"prevPositionLow",index:re$F.prevPositionLow,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:G,strideInBytes:6*S},{name:"nextPositionHigh",index:re$F.nextPositionHigh,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:z,strideInBytes:6*S},{name:"nextPositionLow",index:re$F.nextPositionLow,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:U,strideInBytes:6*S},{name:"texCoordExpandAndBatchIndex",index:re$F.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:V}];_===C$14.SCENE3D?(R=e._positionBuffer,O="vertexBuffer",D=Me$o,I="value"):_===C$14.SCENE2D||_===C$14.COLUMBUS_VIEW?(R=Me$o,O="value",D=e._positionBuffer,I="vertexBuffer"):(R=b,O="vertexBuffer",D=e._positionBuffer,I="vertexBuffer"),_===C$14.SCENE3D?(k[0][O]=R,k[1][O]=R,k[2][O]=R,k[3][O]=R,k[4][O]=R,k[5][O]=R):(_===C$14.SCENE2D||_===C$14.COLUMBUS_VIEW)&&(k[0][I]=D,k[1][I]=D,k[2][I]=D,k[3][I]=D,k[4][I]=D,k[5][I]=D);var W=new c$13({context:t,attributes:k,indexBuffer:M});e._vertexArrays.push({va:W,buckets:h[A]})}}}function pr$4(e,t){return t instanceof t$U?t.id:t}var Ee$p=[];function gr$5(e){var t=r$Y._uniformList[e.type],i=t.length;Ee$p.length=2*i;for(var n=0,r=0;r<i;++r){var o=t[r];Ee$p[n]=o,Ee$p[n+1]=e._uniforms[o](),n+=2}return e.type+":"+JSON.stringify(Ee$p,pr$4)}function Tr$6(e){for(var t=e._mode,i=e._modelMatrix,n=e._polylineBuckets={},r=e._polylines,o=r.length,a=0;a<o;++a){var s=r[a];if(s._actualPositions.length>1){s.update();var l=s.material,u=s._depthFailMaterial,c=e$2e(u)?l.type+u.type:l.type,h=n[c];e$2e(h)||(h=n[c]=new j$10(l,t,i,u)),h.addPolyline(s)}}}function mr$4(e,t){var i=t.mode;(e._mode!==i||!p$1d.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=i,e._modelMatrix=p$1d.clone(e.modelMatrix),e._createVertexArray=!0)}function we$l(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;for(var t=[],i=e._polylines.length,n=0,r=0;n<i;++n){var o=e._polylines[n];e$2e(o)&&(o._index=r++,t.push(o))}e._polylines=t}}function Ne$j(e){for(var t=e._polylines,i=t.length,n=0;n<i;++n)if(e$2e(t[n])){var r=t[n]._bucket;e$2e(r)&&(r.shaderProgram=r.shaderProgram&&r.shaderProgram.destroy())}}function Fe$m(e){for(var t=e._vertexArrays.length,i=0;i<t;++i)e._vertexArrays[i].va.destroy();e._vertexArrays.length=0;var n=e._colorCommands;t=n.length;for(var r=0;r<t;++r){n[r].derivedCommands={}}}function Ye$h(e){for(var t=e._polylines,i=t.length,n=0;n<i;++n)e$2e(t[n])&&t[n]._destroy()}function Pe$l(e,t,i){this.count=e,this.offset=t,this.bucket=i}function j$10(e,t,i,n){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.depthFailMaterial=n,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=i}function We$k(e){return o$1p.dot(o$1p.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(o$1m.ORIGIN_ZX_PLANE)===Ae$w.INTERSECTING}J$T.prototype._updatePolyline=function(e,t){if("string"!=typeof e.id||"alpha"!==e.id.slice(-5)){if(this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),this._lineDisplayType===J$U.OCCLUDED_TRANSLUCENT)for(var i=0;i<this._polylines.length;i++){var n=this._polylines[i];n.id&&n.id===e._index+"-alpha"&&(n._dirty||this._polylinesToUpdate.push(n),n.positions=e.positions,++this._propertiesChanged[t])}++this._propertiesChanged[t]}},j$10.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this},j$10.prototype.updateShader=function(e,t,i){if(!e$2e(this.shaderProgram)){var n=["DISTANCE_DISPLAY_CONDITION"];i&&n.push("VECTOR_TILE"),-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&n.push("POLYLINE_DASH"),"PolylineDynamic"===this.material.type&&n.push("ENABLE_DYNAMIC"),s$Z.isInternetExplorer()||n.push("CLIP_POLYLINE"),this.mode===C$14.SCENE3D&&n.push("SCENE_3D");var r=new s$V({name:"PolylineFS",defines:n,sources:["varying vec4 v_pickColor;\n",this.material.shaderSource,be$t]}),o=t.getVertexShaderCallback()(sr$7),a=new s$V({name:"PolylineVS",defines:n,sources:[Z$_,o]});if(this.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:a,fragmentShaderSource:r,attributeLocations:re$F}),e$2e(this.depthFailMaterial)){r=new s$V({name:"PolylineFS",defines:n,sources:["varying vec4 v_pickColor;\n",this.depthFailMaterial.shaderSource,be$t]}),this._spDepthFail=r$14.fromCache({name:"depthFail_polyline",context:e,vertexShaderSource:a,fragmentShaderSource:r,attributeLocations:re$F})}}},j$10.prototype.getPolylinePositionsLength=function(e){var t;if(this.mode===C$14.SCENE3D||!We$k(e))return 4*(t=e._actualPositions.length)-4;var i=0,n=e._segments.lengths;t=n.length;for(var r=0;r<t;++r)i+=4*n[r]-4;return i};var D$X=new o$1p,W$Z=new o$1p,H$10=new o$1p,ce$v=new o$1p,Er$5=new e$2c,cr$5=new o$1o;j$10.prototype.write=function(e,t,i,n,r,o,a,s){for(var l=this.mode,u=s.ellipsoid.maximumRadius*e$2d.PI,c=this.polylines,h=c.length,d=0;d<h;++d){var f,p=c[d],_=p.width,m=p.show&&_>0,g=p._index,x=this.getSegments(p,s),y=x.positions,v=x.lengths,$=y.length,b=p.getPickId(a);f=e$2e(b)?b.color:e$1X.BLACK;for(var T,C=0,S=0,w=0;w<$;++w){0===w?p._loop?T=y[$-2]:(T=ce$v,o$1p.subtract(y[0],y[1],T),o$1p.add(y[0],T,T)):T=y[w-1],o$1p.clone(T,W$Z),o$1p.clone(y[w],D$X),w===$-1?p._loop?T=y[1]:(T=ce$v,o$1p.subtract(y[$-1],y[$-2],T),o$1p.add(y[$-1],T,T)):T=y[w+1],o$1p.clone(T,H$10);var E=v[C];w===S+E&&(S+=E,++C);var P=w-S==0,A=w===S+v[C]-1;l===C$14.SCENE2D&&(W$Z.z=0,D$X.z=0,H$10.z=0),(l===C$14.SCENE2D||l===C$14.MORPHING)&&(P||A)&&u-Math.abs(D$X.x)<1&&((D$X.x<0&&W$Z.x>0||D$X.x>0&&W$Z.x<0)&&o$1p.clone(D$X,W$Z),(D$X.x<0&&H$10.x>0||D$X.x>0&&H$10.x<0)&&o$1p.clone(D$X,H$10));for(var L=A?2:4,M=P?2:0;M<L;++M){i$12.writeElements(D$X,e,i),i$12.writeElements(W$Z,e,i+6),i$12.writeElements(H$10,e,i+12);var R=M-2<0?-1:1;t[r]=w/($-1),t[r+1]=M%2*2-1,t[r+2]=R,t[r+3]=g,i+=18,r+=4}}var O=Er$5;O.x=e$1X.floatToByte(f.red),O.y=e$1X.floatToByte(f.green),O.z=e$1X.floatToByte(f.blue),O.w=e$1X.floatToByte(f.alpha);var D=cr$5;D.x=_,D.y=m?1:0;var I=l===C$14.SCENE2D?p._boundingVolume2D:p._boundingVolumeWC,B=i$12.fromCartesian(I.center,Le$o),F=B.high,N=e$2c.fromElements(B.low.x,B.low.y,B.low.z,I.radius,Ue$i),G=Ve$j;G.x=0,G.y=Number.MAX_VALUE;var z=p.distanceDisplayCondition;e$2e(z)&&(G.x=z.near,G.y=z.far),o.setBatchedAttribute(g,0,D),o.setBatchedAttribute(g,1,O),o.attributes.length>2&&(o.setBatchedAttribute(g,2,F),o.setBatchedAttribute(g,3,N),o.setBatchedAttribute(g,4,G))}};var yr$4=new o$1p,Sr$4=new o$1p,Ar$4=new o$1p,He$f=new o$1p;j$10.prototype.writeForMorph=function(e,t){for(var i=this.modelMatrix,n=this.polylines,r=n.length,o=0;o<r;++o)for(var a=n[o],s=a._segments.positions,l=a._segments.lengths,u=s.length,c=0,h=0,d=0;d<u;++d){var f;0===d?a._loop?f=s[u-2]:(f=He$f,o$1p.subtract(s[0],s[1],f),o$1p.add(s[0],f,f)):f=s[d-1],f=p$1d.multiplyByPoint(i,f,Sr$4);var p,_=p$1d.multiplyByPoint(i,s[d],yr$4);d===u-1?a._loop?p=s[1]:(p=He$f,o$1p.subtract(s[u-1],s[u-2],p),o$1p.add(s[u-1],p,p)):p=s[d+1],p=p$1d.multiplyByPoint(i,p,Ar$4);var m=l[c];d===h+m&&(h+=m,++c);for(var g=d-h==0,x=d===h+l[c]-1?2:4,y=g?2:0;y<x;++y)i$12.writeElements(_,e,t),i$12.writeElements(f,e,t+6),i$12.writeElements(p,e,t+12),t+=18}};var wr$5=new Array(1);j$10.prototype.updateIndices=function(e,t,i,n){var r=i.length-1,o=new Pe$l(0,n,this);i[r].push(o);var a=0,s=e[e.length-1],l=0;s.length>0&&(l=s[s.length-1]+1);for(var u=this.polylines,c=u.length,h=0;h<c;++h){var d,f=u[h];if(f._locatorBuckets=[],this.mode===C$14.SCENE3D){d=wr$5;var p=f._actualPositions.length;if(!(p>0))continue;d[0]=p}else d=f._segments.lengths;var _=d.length;if(_>0){for(var m=0,g=0;g<_;++g)for(var x=d[g]-1,y=0;y<x;++y)l+4>e$2d.SIXTY_FOUR_KILOBYTES&&(f._locatorBuckets.push({locator:o,count:m}),m=0,t.push(4),s=[],e.push(s),l=0,o.count=a,a=0,n=0,o=new Pe$l(0,0,this),i[++r]=[o]),s.push(l,l+2,l+1),s.push(l+1,l+2,l+3),m+=6,a+=6,n+=6,l+=4;f._locatorBuckets.push({locator:o,count:m}),l+4>e$2d.SIXTY_FOUR_KILOBYTES&&(t.push(0),s=[],e.push(s),l=0,o.count=a,n=0,a=0,o=new Pe$l(0,0,this),i[++r]=[o])}f._clean()}return o.count=a,n},j$10.prototype.getPolylineStartIndex=function(e){for(var t=this.polylines,i=0,n=t.length,r=0;r<n;++r){var o=t[r];if(o===e)break;i+=o._actualLength}return i};var ve$t={positions:void 0,lengths:void 0},Xe$f=new Array(1),Nr$4=new o$1p,Pr$4=new a$18,qe$e;function e$1I(e){e=u$Z(e,!0),this.value=e$1I.toValue(e)}function g$15(e){e=u$Z(e,{}),this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._rectangle=u$Z(e.rectangle,h$18.MAX_VALUE),this._projection=new n$1d(this._ellipsoid),this._numberOfLevelZeroTilesX=u$Z(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=u$Z(e.numberOfLevelZeroTilesY,1),this._customDPI=e.customDPI,this._scaleDenominators=e.scaleDenominators,this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._beginLevel=u$Z(e.beginLevel,0),this._orgin=u$Z(e.orgin,void 0)}j$10.prototype.getSegments=function(e,t){var i=e._actualPositions;if(this.mode===C$14.SCENE3D)return Xe$f[0]=i.length,ve$t.positions=i,ve$t.lengths=Xe$f,ve$t;We$k(e)&&(i=e._segments.positions);for(var n,r=t.ellipsoid,o=[],a=this.modelMatrix,s=i.length,l=Nr$4,u=0;u<s;++u)n=i[u],l=p$1d.multiplyByPoint(a,n,l),o.push(t.project(r.cartesianToCartographic(l,Pr$4)));if(o.length>0){e._boundingVolume2D=i$1d.fromPoints(o,e._boundingVolume2D);var c=e._boundingVolume2D.center;e._boundingVolume2D.center=new o$1p(c.z,c.x,c.y)}return ve$t.positions=o,ve$t.lengths=e._segments.lengths,ve$t},j$10.prototype.writeUpdate=function(e,t,i,n){var r=this.mode,o=n.ellipsoid.maximumRadius*e$2d.PI,a=t._actualLength;if(a){e+=this.getPolylineStartIndex(t);var s=qe$e,l=6*a*3;!e$2e(s)||s.length<l?s=qe$e=new Float32Array(l):s.length>l&&(s=new Float32Array(s.buffer,0,l));var u,c=this.getSegments(t,n),h=c.positions,d=c.lengths,f=0,p=0,_=0;a=h.length;for(var m=0;m<a;++m){0===m?t._loop?u=h[a-2]:(u=ce$v,o$1p.subtract(h[0],h[1],u),o$1p.add(h[0],u,u)):u=h[m-1],o$1p.clone(u,W$Z),o$1p.clone(h[m],D$X),m===a-1?t._loop?u=h[1]:(u=ce$v,o$1p.subtract(h[a-1],h[a-2],u),o$1p.add(h[a-1],u,u)):u=h[m+1],o$1p.clone(u,H$10);var g=d[p];m===_+g&&(_+=g,++p);var x=m-_==0,y=m===_+d[p]-1;r===C$14.SCENE2D&&(W$Z.z=0,D$X.z=0,H$10.z=0),(r===C$14.SCENE2D||r===C$14.MORPHING)&&(x||y)&&o-Math.abs(D$X.x)<1&&((D$X.x<0&&W$Z.x>0||D$X.x>0&&W$Z.x<0)&&o$1p.clone(D$X,W$Z),(D$X.x<0&&H$10.x>0||D$X.x>0&&H$10.x<0)&&o$1p.clone(D$X,H$10));for(var v=y?2:4,$=x?2:0;$<v;++$)i$12.writeElements(D$X,s,f),i$12.writeElements(W$Z,s,f+6),i$12.writeElements(H$10,s,f+12),f+=18}i.copyFromArrayView(s,18*Float32Array.BYTES_PER_ELEMENT*e)}},Object.defineProperties(e$1I.prototype,{componentDatatype:{get:function(){return S$14.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}}),e$1I.toValue=function(e,t){if(!e$2e(e))throw new t$15("show is required.");return e$2e(t)?(t[0]=e,t):new Uint8Array([e])},Object.defineProperties(g$15.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}},beginLevel:{get:function(){return this._beginLevel}},orgin:{get:function(){return this._orgin}}}),g$15.prototype.getNumberOfXTilesAtLevel=function(e){if(e$2e(this._customDPI)&&e$2e(this._scaleDenominators)){var t=this.calculateResolution(e),i=this._tileWidth*t.x;return Math.ceil(this._rectangle.width/i)}return this._numberOfLevelZeroTilesX<<e-this._beginLevel},g$15.prototype.getNumberOfYTilesAtLevel=function(e){if(e$2e(this._customDPI)&&e$2e(this._scaleDenominators)){var t=this.calculateResolution(e),i=this._tileHeight*t.y;return Math.ceil(this._rectangle.height/i)}return this._numberOfLevelZeroTilesY<<e-this._beginLevel},g$15.prototype.rectangleToNativeRectangle=function(e,t){o$1q.defined("rectangle",e);var i=e$2d.toDegrees(e.west),n=e$2d.toDegrees(e.south),r=e$2d.toDegrees(e.east),o=e$2d.toDegrees(e.north);return e$2e(t)?(t.west=i,t.south=n,t.east=r,t.north=o,t):new h$18(i,n,r,o)},g$15.prototype.tileXYToNativeRectangle=function(e,t,i,n){var r=this.tileXYToRectangle(e,t,i,n);return r.west=e$2d.toDegrees(r.west),r.south=e$2d.toDegrees(r.south),r.east=e$2d.toDegrees(r.east),r.north=e$2d.toDegrees(r.north),r},g$15.prototype.tileXYToRectangle=function(e,t,i,n){var r=this._rectangle,o=e$2e(this._orgin)?this._orgin.longitude:r.west,a=e$2e(this._orgin)?this._orgin.latitude:r.north;if(e$2e(this._customDPI)&&e$2e(this._scaleDenominators)){var s=this.calculateResolution(i),l=o+e*this._tileWidth*s.x,u=o+(e+1)*this._tileWidth*s.x,c=a-t*this._tileHeight*s.y,h=a-(t+1)*this._tileHeight*s.y;return e$2e(n)?(n.west=l,n.south=h,n.east=u,n.north=c,n):new h$18(l,h,u,c)}var d=this.getNumberOfXTilesAtLevel(i),f=this.getNumberOfYTilesAtLevel(i),p=r.width/d,_=(l=e*p+r.west,u=(e+1)*p+r.west,r.height/f);c=r.north-t*_,h=r.north-(t+1)*_;return e$2e(n)||(n=new h$18(l,h,u,c)),n.west=l,n.south=h,n.east=u,n.north=c,n},g$15.prototype.positionToTileXY=function(e,t,i){var n=this._rectangle;if(h$18.contains(n,e)){var r=this.getNumberOfXTilesAtLevel(t),o=this.getNumberOfYTilesAtLevel(t),a=e$2e(this._orgin)?this._orgin.longitude:n.west,s=e$2e(this._orgin)?this._orgin.latitude:n.north,l=n.width/r,u=n.height/o;if(e$2e(this._customDPI)&&e$2e(this._scaleDenominators)){var c=this.calculateResolution(t);l=this._tileWidth*c.x,u=this._tileHeight*c.y}var h=e.longitude;n.east<n.west&&(h+=e$2d.TWO_PI),e$2e(this._orgin)&&(r+=this._orgin.longitude!=n.west?Math.ceil((e.longitude-this._orgin.longitude)/l):0,o+=this._orgin.latitude!=n.north?Math.ceil((this._orgin.latitude-e.latitude)/u):0);var d=(h-a)/l|0;d>=r&&(d=r-1);var f=(s-e.latitude)/u|0;return f>=o&&(f=o-1),e$2e(i)?(i.x=d,i.y=f,i):new o$1o(d,f)}},g$15.prototype.calculateResolution=function(e){var t=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.x,i=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.y,n=t$12.WGS84.maximumRadius;return new o$1o(t/n,i/n)};var _$Q=new o$1p,M$_=new o$1p,C$_=new a$18,d$18=new o$1p,X$U=new o$1p,S$R=new i$1d,z$T=new g$15,c$Z=[new a$18,new a$18,new a$18,new a$18],g$14=new o$1o,e$1H={};function L$14(e){a$18.fromRadians(e.east,e.north,0,c$Z[0]),a$18.fromRadians(e.west,e.north,0,c$Z[1]),a$18.fromRadians(e.east,e.south,0,c$Z[2]),a$18.fromRadians(e.west,e.south,0,c$Z[3]);var t,i=0,n=0,r=0,o=0,a=e$1H._terrainHeightsMaxLevel;for(t=0;t<=a;++t){for(var s=!1,l=0;l<4;++l){var u=c$Z[l];if(z$T.positionToTileXY(u,t,g$14),0===l)r=g$14.x,o=g$14.y;else if(r!==g$14.x||o!==g$14.y){s=!0;break}}if(s)break;i=r,n=o}if(0!==t)return{x:i,y:n,level:t>a?a:t-1}}function t$N(e){this._ellipsoid=u$Z(e,t$12.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}e$1H.initialize=function(){var e=e$1H._initPromise;return e$2e(e)||(e=t$10.fetchJson(n$17("Assets/approximateTerrainHeights.json")).then((function(e){e$1H._terrainHeights=e})),e$1H._initPromise=e),e},e$1H.getMinimumMaximumHeights=function(e,t){if(o$1q.defined("rectangle",e),!e$2e(e$1H._terrainHeights))throw new t$15("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=u$Z(t,t$12.WGS84);var i=L$14(e),n=e$1H._defaultMinTerrainHeight,r=e$1H._defaultMaxTerrainHeight;if(e$2e(i)){var o=i.level+"-"+i.x+"-"+i.y,a=e$1H._terrainHeights[o];e$2e(a)&&(n=a[0],r=a[1]),t.cartographicToCartesian(h$18.northeast(e,C$_),_$Q),t.cartographicToCartesian(h$18.southwest(e,C$_),M$_),o$1p.midpoint(M$_,_$Q,d$18);var s=t.scaleToGeodeticSurface(d$18,X$U);if(e$2e(s)){var l=o$1p.distance(d$18,s);n=Math.min(n,-l)}else n=e$1H._defaultMinTerrainHeight}return{minimumTerrainHeight:n=Math.max(e$1H._defaultMinTerrainHeight,n),maximumTerrainHeight:r}},e$1H.getBoundingSphere=function(e,t){if(o$1q.defined("rectangle",e),!e$2e(e$1H._terrainHeights))throw new t$15("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=u$Z(t,t$12.WGS84);var i=L$14(e),n=e$1H._defaultMaxTerrainHeight;if(e$2e(i)){var r=i.level+"-"+i.x+"-"+i.y,o=e$1H._terrainHeights[r];e$2e(o)&&(n=o[1])}var a=i$1d.fromRectangle3D(e,t,0);return i$1d.fromRectangle3D(e,t,n,S$R),i$1d.union(a,S$R,a)},e$1H._terrainHeightsMaxLevel=6,e$1H._defaultMaxTerrainHeight=9e3,e$1H._defaultMinTerrainHeight=-1e5,e$1H._terrainHeights=void 0,e$1H._initPromise=void 0,Object.defineProperties(e$1H,{initialized:{get:function(){return e$2e(e$1H._terrainHeights)}}}),Object.defineProperties(t$N.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),t$N.mercatorAngleToGeodeticLatitude=function(e){return e$2d.PI_OVER_TWO-2*Math.atan(Math.exp(-e))},t$N.geodeticLatitudeToMercatorAngle=function(e){e>t$N.MaximumLatitude?e=t$N.MaximumLatitude:e<-t$N.MaximumLatitude&&(e=-t$N.MaximumLatitude);var t=Math.sin(e);return.5*Math.log((1+t)/(1-t))},t$N.MaximumLatitude=t$N.mercatorAngleToGeodeticLatitude(Math.PI),t$N.prototype.project=function(e,t){var i=this._semimajorAxis,n=e.longitude*i,r=t$N.geodeticLatitudeToMercatorAngle(e.latitude)*i,o=e.height;return e$2e(t)?(t.x=n,t.y=r,t.z=o,t):new o$1p(n,r,o)},t$N.prototype.unproject=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=t$N.mercatorAngleToGeodeticLatitude(e.y*i),o=e.z;return e$2e(t)?(t.longitude=n,t.latitude=r,t.height=o,t):new a$18(n,r,o)};var Ua$4=[n$1d,t$N],Gr$3=Ua$4.length,ur$5=Math.cos(e$2d.toRadians(30)),Sr$3=Math.cos(e$2d.toRadians(150)),wr$4=0,gr$4=1e3;function aa$5(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions;if(!e$2e(t)||t.length<2)throw new t$15("At least two positions are required.");if(e$2e(e.arcType)&&e.arcType!==m$1h.GEODESIC&&e.arcType!==m$1h.RHUMB)throw new t$15("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=u$Z(e.width,1),this._positions=t,this.granularity=u$Z(e.granularity,9999),this.loop=u$Z(e.loop,!1),this.arcType=u$Z(e.arcType,m$1h.GEODESIC),this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(aa$5.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+t$12.packedLength+1+1}}}),aa$5.setProjectionAndEllipsoid=function(e,t){for(var i=0,n=0;n<Gr$3;n++)if(t instanceof Ua$4[n]){i=n;break}e._projectionIndex=i,e._ellipsoid=t.ellipsoid};var jr$3=new o$1p,Er$4=new o$1p,dr$4=new o$1p;function Xa$4(e,t,i,n,r){var o=N$S(n,e,0,jr$3),a=N$S(n,e,i,Er$4),s=N$S(n,t,0,dr$4),l=H$$(a,o,Er$4),u=H$$(s,o,dr$4);return o$1p.cross(u,l,r),o$1p.normalize(r,r)}var an$4=new a$18,rn$6=new o$1p,nn$6=new o$1p,en$5=new o$1p;function Ya$4(e,t,i,n,r,o,a,s,l,u,c){if(0!==r){var h;o===m$1h.GEODESIC?h=new E$1t(e,t,a):o===m$1h.RHUMB&&(h=new P$15(e,t,a));var d=h.surfaceDistance;if(!(d<r))for(var f=Xa$4(e,t,n,a,en$5),p=Math.ceil(d/r),_=d/p,m=_,g=p-1,x=s.length,y=0;y<g;y++){var v=h.interpolateUsingSurfaceDistance(m,an$4),$=N$S(a,v,i,rn$6),b=N$S(a,v,n,nn$6);o$1p.pack(f,s,x),o$1p.pack($,l,x),o$1p.pack(b,u,x),c.push(v.latitude),c.push(v.longitude),x+=3,m+=_}}}var Da$4=new a$18;function N$S(e,t,i,n){return a$18.clone(t,Da$4),Da$4.height=i,a$18.toCartesian(Da$4,e,n)}function H$$(e,t,i){return o$1p.subtract(e,t,i),o$1p.normalize(i,i),i}function mr$3(e,t,i,n){return n=H$$(e,t,n),n=o$1p.cross(n,i,n),n=o$1p.normalize(n,n),n=o$1p.cross(i,n,n)}aa$5.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.defined("array",t);var n=u$Z(i,0),r=e._positions,o=r.length;t[n++]=o;for(var a=0;a<o;++a){var s=r[a];o$1p.pack(s,t,n),n+=3}return t[n++]=e.granularity,t[n++]=e.loop?1:0,t[n++]=e.arcType,t$12.pack(e._ellipsoid,t,n),n+=t$12.packedLength,t[n++]=e._projectionIndex,t[n++]=e._scene3DOnly?1:0,t},aa$5.unpack=function(e,t,i){o$1q.defined("array",e);for(var n=u$Z(t,0),r=e[n++],o=new Array(r),a=0;a<r;a++)o[a]=o$1p.unpack(e,n),n+=3;var s=e[n++],l=1===e[n++],u=e[n++],c=t$12.unpack(e,n);n+=t$12.packedLength;var h=e[n++],d=1===e[n++];if(!e$2e(i)){var f=new aa$5({positions:o,granularity:s,loop:l,arcType:u,ellipsoid:c});return f._projectionIndex=h,f._scene3DOnly=d,f}return i._positions=o,i.granularity=s,i.loop=l,i.arcType=u,i._ellipsoid=c,i._projectionIndex=h,i._scene3DOnly=d,i};var cn$4=new o$1p,tn$6=new o$1p,on$4=new o$1p,Or$3=new o$1p,vn$4=0,pn$4=-1;function Ja$4(e,t,i,n,r){var o=H$$(i,t,Or$3),a=mr$3(e,t,o,cn$4),s=mr$3(n,t,o,tn$6);if(e$2d.equalsEpsilon(o$1p.dot(a,s),pn$4,e$2d.EPSILON5))return r=o$1p.cross(o,a,r),r=o$1p.normalize(r,r);r=o$1p.add(s,a,r),r=o$1p.normalize(r,r);var l=o$1p.cross(o,r,on$4);return o$1p.dot(s,l)<vn$4&&(r=o$1p.negate(r,r)),r}var ka$3=o$1m.fromPointNormal(o$1p.ZERO,o$1p.UNIT_Y),sn$5=new o$1p,fn$4=new o$1p,hn$5=new o$1p,ln$5=new o$1p,un$5=new o$1p,Aa$3=new o$1p,Ra$4=new a$18,Cr$4=new a$18,Ir$6=new a$18;aa$5.createGeometry=function(e){var t,i,n=!e._scene3DOnly,r=e.loop,o=e._ellipsoid,a=e.granularity,s=e.arcType,l=new Ua$4[e._projectionIndex](o),u=wr$4,c=gr$4,h=e._positions,d=h.length;2===d&&(r=!1);var f,p,_,m,g,x,y,v=new P$15(void 0,void 0,o),$=[h[0]];for(i=0;i<d-1;i++)f=h[i],p=h[i+1],e$2e(g=g$1j.lineSegmentPlane(f,p,ka$3,Aa$3))&&!o$1p.equalsEpsilon(g,f,e$2d.EPSILON7)&&!o$1p.equalsEpsilon(g,p,e$2d.EPSILON7)&&(e.arcType===m$1h.GEODESIC?$.push(o$1p.clone(g)):e.arcType===m$1h.RHUMB&&(y=o.cartesianToCartographic(g,Ra$4).longitude,_=o.cartesianToCartographic(f,Ra$4),m=o.cartesianToCartographic(p,Cr$4),v.setEndPoints(_,m),x=v.findIntersectionWithLongitude(y,Ir$6),e$2e(g=o.cartographicToCartesian(x,Aa$3))&&!o$1p.equalsEpsilon(g,f,e$2d.EPSILON7)&&!o$1p.equalsEpsilon(g,p,e$2d.EPSILON7)&&$.push(o$1p.clone(g)))),$.push(p);r&&(f=h[d-1],p=h[0],e$2e(g=g$1j.lineSegmentPlane(f,p,ka$3,Aa$3))&&!o$1p.equalsEpsilon(g,f,e$2d.EPSILON7)&&!o$1p.equalsEpsilon(g,p,e$2d.EPSILON7)&&(e.arcType===m$1h.GEODESIC?$.push(o$1p.clone(g)):e.arcType===m$1h.RHUMB&&(y=o.cartesianToCartographic(g,Ra$4).longitude,_=o.cartesianToCartographic(f,Ra$4),m=o.cartesianToCartographic(p,Cr$4),v.setEndPoints(_,m),x=v.findIntersectionWithLongitude(y,Ir$6),e$2e(g=o.cartographicToCartesian(x,Aa$3))&&!o$1p.equalsEpsilon(g,f,e$2d.EPSILON7)&&!o$1p.equalsEpsilon(g,p,e$2d.EPSILON7)&&$.push(o$1p.clone(g)))));var b=$.length,T=new Array(b);for(i=0;i<b;i++){var C=a$18.fromCartesian($[i],o);C.height=0,T[i]=C}if(!((b=(T=D$13(T,a$18.equalsEpsilon)).length)<2)){var S=[],w=[],E=[],P=[],A=sn$5,L=fn$4,M=hn$5,R=ln$5,O=un$5,D=T[0],I=T[1];for(A=N$S(o,T[b-1],u,A),R=N$S(o,I,u,R),L=N$S(o,D,u,L),M=N$S(o,D,c,M),O=r?Ja$4(A,L,M,R,O):Xa$4(D,I,c,o,O),o$1p.pack(O,w,0),o$1p.pack(L,E,0),o$1p.pack(M,P,0),S.push(D.latitude),S.push(D.longitude),Ya$4(D,I,u,c,a,s,o,w,E,P,S),i=1;i<b-1;++i){A=o$1p.clone(L,A),L=o$1p.clone(R,L);var B=T[i];N$S(o,B,c,M),N$S(o,T[i+1],u,R),Ja$4(A,L,M,R,O),t=w.length,o$1p.pack(O,w,t),o$1p.pack(L,E,t),o$1p.pack(M,P,t),S.push(B.latitude),S.push(B.longitude),Ya$4(T[i],T[i+1],u,c,a,s,o,w,E,P,S)}var F=T[b-1],N=T[b-2];if(L=N$S(o,F,u,L),M=N$S(o,F,c,M),r){var G=T[0];O=Ja$4(A=N$S(o,N,u,A),L,M,R=N$S(o,G,u,R),O)}else O=Xa$4(N,F,c,o,O);if(t=w.length,o$1p.pack(O,w,t),o$1p.pack(L,E,t),o$1p.pack(M,P,t),S.push(F.latitude),S.push(F.longitude),r){for(Ya$4(F,D,u,c,a,s,o,w,E,P,S),t=w.length,i=0;i<3;++i)w[t+i]=w[i],E[t+i]=E[i],P[t+i]=P[i];S.push(D.latitude),S.push(D.longitude)}return Wn$1(r,l,E,P,w,S,n)}};var Sn$3=new o$1p,wn$3=new p$1e,gn$4=new n$15;function Tr$5(e,t,i,n){var r=H$$(i,t,Sn$3),o=o$1p.dot(r,e);if(o>ur$5||o<Sr$3){var a=H$$(n,i,Or$3),s=o<Sr$3?e$2d.PI_OVER_TWO:-e$2d.PI_OVER_TWO,l=n$15.fromAxisAngle(a,s,gn$4),u=p$1e.fromQuaternion(l,wn$3);return p$1e.multiplyByVector(u,e,e),!0}return!1}var Lr$4=new a$18,En$4=new o$1p,_r$4=new o$1p;function da$1(e,t,i,n,r){var o=a$18.toCartesian(t,e._ellipsoid,En$4),a=o$1p.add(o,i,_r$4),s=!1,l=e._ellipsoid,u=l.cartesianToCartographic(a,Lr$4);Math.abs(t.longitude-u.longitude)>e$2d.PI_OVER_TWO&&(s=!0,a=o$1p.subtract(o,i,_r$4),u=l.cartesianToCartographic(a,Lr$4)),u.height=0;var c=e.project(u,r);return(r=o$1p.subtract(c,n,r)).z=0,r=o$1p.normalize(r,r),s&&o$1p.negate(r,r),r}var dn$4=new o$1p,kr$4=new o$1p;function Ar$3(e,t,i,n,r,o){var a=o$1p.subtract(t,e,dn$4);o$1p.normalize(a,a);var s=i-wr$4,l=o$1p.multiplyByScalar(a,s,kr$4);o$1p.add(e,l,r);var u=n-gr$4;l=o$1p.multiplyByScalar(a,u,kr$4),o$1p.add(t,l,o)}var mn$4=new o$1p;function Na$2(e,t){var i=o$1m.getPointDistance(ka$3,e),n=o$1m.getPointDistance(ka$3,t),r=mn$4;e$2d.equalsEpsilon(i,0,e$2d.EPSILON2)?(r=H$$(t,e,r),o$1p.multiplyByScalar(r,e$2d.EPSILON2,r),o$1p.add(e,r,e)):e$2d.equalsEpsilon(n,0,e$2d.EPSILON2)&&(r=H$$(e,t,r),o$1p.multiplyByScalar(r,e$2d.EPSILON2,r),o$1p.add(t,r,t))}function On$3(e,t){var i=Math.abs(e.longitude),n=Math.abs(t.longitude);if(e$2d.equalsEpsilon(i,e$2d.PI,e$2d.EPSILON11)){var r=e$2d.sign(t.longitude);return e.longitude=r*(i-e$2d.EPSILON11),1}if(e$2d.equalsEpsilon(n,e$2d.PI,e$2d.EPSILON11)){var o=e$2d.sign(e.longitude);return t.longitude=o*(n-e$2d.EPSILON11),2}return 0}var Rr$2=new a$18,Nr$3=new a$18,Pr$3=new o$1p,Ka$4=new o$1p,Fr$3=new o$1p,br$2=new o$1p,Cn$1=new o$1p,Mr$5=new o$1p,In$1=[Rr$2,Nr$3],Tn$4=new h$18,Ln$3=new o$1p,_n$4=new o$1p,kn$2=new o$1p,An$2=new o$1p,Rn$3=new o$1p,Nn$2=new o$1p,Qa$4=new o$1p,$a$4=new o$1p,Pn$2=new o$1p,Fn$2=new o$1p,bn$2=new o$1p,xr$5=new o$1p,Mn$2=new o$1p,xn$2=new o$1p,zn$1=new i$12,qn$1=new i$12,zr$5=new o$1p,yn$2=new o$1p,qr$2=new o$1p,Vn$1=[new i$1d,new i$1d],yr$3=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Vr$3=yr$3.length;function Wn$1(e,t,i,n,r,o,a){var s,l,u,c,h,d,f=t._ellipsoid,p=i.length/3-1,_=8*p,m=4*_,g=36*p,x=_>65535?new Uint32Array(g):new Uint16Array(g),y=new Float64Array(3*_),v=new Float32Array(m),$=new Float32Array(m),b=new Float32Array(m),T=new Float32Array(m),C=new Float32Array(m);a&&(u=new Float32Array(m),c=new Float32Array(m),h=new Float32Array(m),d=new Float32Array(2*_));var S=o.length/2,w=0,E=Rr$2;E.height=0;var P=Nr$3;P.height=0;var A=Pr$3,L=Ka$4;if(a)for(l=0,s=1;s<S;s++)E.latitude=o[l],E.longitude=o[l+1],P.latitude=o[l+2],P.longitude=o[l+3],A=t.project(E,A),L=t.project(P,L),w+=o$1p.distance(A,L),l+=2;var M=n.length/3;L=o$1p.unpack(n,0,L);var R,O=0;for(l=3,s=1;s<M;s++)A=o$1p.clone(L,A),L=o$1p.unpack(n,l,L),O+=o$1p.distance(A,L),l+=3;l=3;var D=0,I=0,B=0,F=0,N=!1,G=o$1p.unpack(i,0,br$2),z=o$1p.unpack(n,0,Ka$4),U=o$1p.unpack(r,0,Mr$5);e&&(Tr$5(U,o$1p.unpack(i,i.length-6,Fr$3),G,z)&&(U=o$1p.negate(U,U)));var V=0,k=0,W=0;for(s=0;s<p;s++){var H,q,j,X,Y=o$1p.clone(G,Fr$3),Z=o$1p.clone(z,Pr$3),K=o$1p.clone(U,Cn$1);if(N&&(K=o$1p.negate(K,K)),G=o$1p.unpack(i,l,br$2),z=o$1p.unpack(n,l,Ka$4),N=Tr$5(U=o$1p.unpack(r,l,Mr$5),Y,G,z),E.latitude=o[D],E.longitude=o[D+1],P.latitude=o[D+2],P.longitude=o[D+3],a){var Q=On$3(E,P);H=t.project(E,Rn$3);var J=H$$(q=t.project(P,Nn$2),H,zr$5);J.y=Math.abs(J.y),j=Qa$4,X=$a$4,0===Q||o$1p.dot(J,o$1p.UNIT_Y)>ur$5?(j=da$1(t,E,K,H,Qa$4),X=da$1(t,P,U,q,$a$4)):1===Q?(X=da$1(t,P,U,q,$a$4),j.x=0,j.y=e$2d.sign(E.longitude-Math.abs(P.longitude)),j.z=0):(j=da$1(t,E,K,H,Qa$4),X.x=0,X.y=e$2d.sign(E.longitude-P.longitude),X.z=0)}var ee=o$1p.distance(Z,z),te=i$12.fromCartesian(Y,zn$1),ie=o$1p.subtract(G,Y,Pn$2),ne=o$1p.normalize(ie,xr$5),re=o$1p.subtract(Z,Y,Fn$2);re=o$1p.normalize(re,re);var oe=o$1p.cross(ne,re,xr$5);oe=o$1p.normalize(oe,oe);var ae=o$1p.cross(re,K,Mn$2);ae=o$1p.normalize(ae,ae);var se=o$1p.subtract(z,G,bn$2);se=o$1p.normalize(se,se);var le=o$1p.cross(U,se,xn$2);le=o$1p.normalize(le,le);var ue,ce,he,de=ee/O,fe=V/O,pe=0,_e=0,me=0;if(a){pe=o$1p.distance(H,q),ue=i$12.fromCartesian(H,qn$1),ce=o$1p.subtract(q,H,zr$5);var ge=(he=o$1p.normalize(ce,yn$2)).x;he.x=he.y,he.y=-ge,_e=pe/w,me=k/w}for(R=0;R<8;R++){var xe=F+4*R,ye=I+2*R,ve=xe+3,$e=R<4?1:-1,be=2===R||3===R||6===R||7===R?1:-1;o$1p.pack(te.high,v,xe),v[ve]=ie.x,o$1p.pack(te.low,$,xe),$[ve]=ie.y,o$1p.pack(ae,b,xe),b[ve]=ie.z,o$1p.pack(le,T,xe),T[ve]=de*$e,o$1p.pack(oe,C,xe);var Te=fe*be;0===Te&&be<0&&(Te=Number.POSITIVE_INFINITY),C[ve]=Te,a&&(u[xe]=ue.high.x,u[xe+1]=ue.high.y,u[xe+2]=ue.low.x,u[xe+3]=ue.low.y,h[xe]=-j.y,h[xe+1]=j.x,h[xe+2]=X.y,h[xe+3]=-X.x,c[xe]=ce.x,c[xe+1]=ce.y,c[xe+2]=he.x,c[xe+3]=he.y,d[ye]=_e*$e,0===(Te=me*be)&&be<0&&(Te=Number.POSITIVE_INFINITY),d[ye+1]=Te)}var Ce=kn$2,Se=An$2,we=Ln$3,Ee=_n$4,Pe=h$18.fromCartographicArray(In$1,Tn$4),Ae=e$1H.getMinimumMaximumHeights(Pe,f),Le=Ae.minimumTerrainHeight,Me=Ae.maximumTerrainHeight;W+=Le,W+=Me,Ar$3(Y,Z,Le,Me,Ce,we),Ar$3(G,z,Le,Me,Se,Ee);var Re=o$1p.multiplyByScalar(oe,e$2d.EPSILON5,qr$2);o$1p.add(Ce,Re,Ce),o$1p.add(Se,Re,Se),o$1p.add(we,Re,we),o$1p.add(Ee,Re,Ee),Na$2(Ce,Se),Na$2(we,Ee),o$1p.pack(Ce,y,B),o$1p.pack(Se,y,B+3),o$1p.pack(Ee,y,B+6),o$1p.pack(we,y,B+9),Re=o$1p.multiplyByScalar(oe,-2*e$2d.EPSILON5,qr$2),o$1p.add(Ce,Re,Ce),o$1p.add(Se,Re,Se),o$1p.add(we,Re,we),o$1p.add(Ee,Re,Ee),Na$2(Ce,Se),Na$2(we,Ee),o$1p.pack(Ce,y,B+12),o$1p.pack(Se,y,B+15),o$1p.pack(Ee,y,B+18),o$1p.pack(we,y,B+21),D+=2,l+=3,I+=16,B+=24,F+=32,V+=ee,k+=pe}l=0;var Oe=0;for(s=0;s<p;s++){for(R=0;R<Vr$3;R++)x[l+R]=yr$3[R]+Oe;Oe+=8,l+=Vr$3}var De=Vn$1;i$1d.fromVertices(i,o$1p.ZERO,3,De[0]),i$1d.fromVertices(n,o$1p.ZERO,3,De[1]);var Ie=i$1d.fromBoundingSpheres(De);Ie.radius+=W/(2*p);var Be={position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,normalize:!1,values:y}),startHiAndForwardOffsetX:ra$5(v),startLoAndForwardOffsetY:ra$5($),startNormalAndForwardOffsetZ:ra$5(b),endNormalAndTextureCoordinateNormalizationX:ra$5(T),rightNormalAndTextureCoordinateNormalizationY:ra$5(C)};return a&&(Be.startHiLo2D=ra$5(u),Be.offsetAndRight2D=ra$5(c),Be.startEndNormals2D=ra$5(h),Be.texcoordNormalization2D=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,normalize:!1,values:d})),new I$1p({attributes:Be,indices:x,boundingSphere:Ie})}function ra$5(e){return new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}function o$13(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).componentDatatype))throw new t$15("options.componentDatatype is required.");if(!e$2e(e.componentsPerAttribute))throw new t$15("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new t$15("options.componentsPerAttribute must be between 1 and 4.");if(!e$2e(e.value))throw new t$15("options.value is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=u$Z(e.normalize,!1),this.value=e.value}aa$5._projectNormal=da$1;var Q$X="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\nvoid main(void)\n{\nfloat logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_globeDepthTextureDim.xy)));\nvec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\nif (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\ngl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\nreturn;\n#else // DEBUG_SHOW_VOLUME\ndiscard;\n#endif // DEBUG_SHOW_VOLUME\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\nfloat widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\nfloat distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\nfloat distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\nif (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\ngl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\nreturn;\n#else // DEBUG_SHOW_VOLUME\ndiscard;\n#endif // DEBUG_SHOW_VOLUME\n}\nvec3 alignedPlaneNormal;\nalignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\nalignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\ndistanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\nalignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\nalignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\ndistanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n#ifdef PER_INSTANCE_COLOR\ngl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\nfloat s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\ns = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\nfloat t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\nczm_materialInput materialInput;\nmaterialInput.s = s;\nmaterialInput.st = vec2(s, t);\nmaterialInput.str = vec3(s, t, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\nczm_writeDepthClampedToFarPlane();\n}\n",W$Y="varying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\nfloat rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {\nreturn (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);\n}\nvoid main(void)\n{\nvec4 eyeCoordinate = gl_FragCoord;\neyeCoordinate /= eyeCoordinate.w;\n#ifdef PER_INSTANCE_COLOR\ngl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\nfloat distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);\nfloat distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);\ndistanceFromStart = max(0.0, distanceFromStart);\ndistanceFromEnd = max(0.0, distanceFromEnd);\nfloat s = distanceFromStart / (distanceFromStart + distanceFromEnd);\ns = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;\nczm_materialInput materialInput;\nmaterialInput.s = s;\nmaterialInput.st = vec2(s, v_texcoordT);\nmaterialInput.str = vec3(s, v_texcoordT, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n}\n",Y$L="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\nattribute float batchId;\nvarying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\nvoid main()\n{\nv_batchId = batchId;\nvec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));\nvec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);\nvec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\nvec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\nvec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\nvec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\nvec4 startPlane2D;\nvec4 startPlane3D;\nstartPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\nstartPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\nstartPlane2D.w = -dot(startPlane2D.xyz, posEc2D);\nstartPlane3D.w = -dot(startPlane3D.xyz, posEc3D);\nvec4 rightPlane2D;\nvec4 rightPlane3D;\nrightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\nrightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\nrightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);\nrightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);\nposRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);\nposRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);\nposRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\nposEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\nposEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\nvec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\nvec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));\nvec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));\nvec4 endPlane2D;\nvec4 endPlane3D;\nendPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\nendPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\nendPlane2D.w = -dot(endPlane2D.xyz, posEc2D);\nendPlane3D.w = -dot(endPlane3D.xyz, posEc3D);\nv_forwardDirectionEC = normalize(endEC - startEC);\nvec2 cleanTexcoordNormalization2D;\ncleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);\ncleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));\nvec2 cleanTexcoordNormalization3D;\ncleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\ncleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;\ncleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));\nv_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#else // PER_INSTANCE_COLOR\nv_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);\nv_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);\n#endif // PER_INSTANCE_COLOR\n#ifdef WIDTH_VARYING\nfloat width = czm_batchTable_width(batchId);\nfloat halfWidth = width * 0.5;\nv_width = width;\nv_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#else\nfloat halfWidth = 0.5 * czm_batchTable_width(batchId);\nv_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#endif\nvec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow);\nfloat absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));\nfloat absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));\nvec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);\nvec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection));\nvec3 normalEC = normalize(cross(planeDirection, upOrDown));\nvec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));\ngeodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);\ngeodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\npositionEc3D.xyz += geodeticSurfaceNormal;\nnormalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\npositionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC;\nvec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);\nabsStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));\nabsEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));\nplaneDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);\nupOrDown = normalize(cross(rightPlane2D.xyz, planeDirection));\nnormalEC = normalize(cross(planeDirection, upOrDown));\ngeodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));\ngeodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);\ngeodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\npositionEc2D.xyz += geodeticSurfaceNormal;\nnormalEC *= sign(texcoordNormalization2D.x);\n#ifndef PER_INSTANCE_COLOR\nv_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);\n#endif\npositionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC;\ngl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);\n#ifdef ANGLE_VARYING\nvec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));\napproxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\nv_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n",q$10="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\n#ifndef COLUMBUS_VIEW_2D\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\n#else\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\n#endif\nattribute float batchId;\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\nvoid main()\n{\n#ifdef COLUMBUS_VIEW_2D\nvec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;\nvec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);\nvec3 ecEnd = forwardDirectionEC + ecStart;\nforwardDirectionEC = normalize(forwardDirectionEC);\nv_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\nv_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\nvec4 startPlaneEC;\nstartPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\nstartPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\nvec4 endPlaneEC;\nendPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\nendPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\nv_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);\nv_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;\n#else // COLUMBUS_VIEW_2D\nvec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\nvec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\nvec3 ecEnd = ecStart + offset;\nvec3 forwardDirectionEC = normalize(offset);\nvec4 startPlaneEC;\nstartPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\nstartPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\nvec4 endPlaneEC;\nendPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\nendPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\nv_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\nv_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\nv_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\nv_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n#endif // COLUMBUS_VIEW_2D\nv_endEcAndStartEcX.xyz = ecEnd;\nv_endEcAndStartEcX.w = ecStart.x;\nv_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#endif // PER_INSTANCE_COLOR\nvec4 positionRelativeToEye = czm_computePosition();\nvec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye;\nfloat absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\nfloat absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\nvec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\nvec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection));\nvec3 normalEC = normalize(cross(planeDirection, upOrDown));\nupOrDown = cross(forwardDirectionEC, normalEC);\nupOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;\nupOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\nupOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;\npositionEC.xyz += upOrDown;\nv_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\nfloat width = czm_batchTable_width(batchId);\n#ifdef WIDTH_VARYING\nv_width = width;\n#endif\nv_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\nv_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\nv_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\nv_endPlaneNormalEcAndBatchId.w = batchId;\nwidth = width * max(0.0, czm_metersPerPixel(positionEC));\nwidth = width / dot(normalEC, v_rightPlaneEC.xyz);\n#ifdef COLUMBUS_VIEW_2D\nnormalEC *= sign(texcoordNormalization2D.x);\n#else\nnormalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n#endif\npositionEC.xyz += width * normalEC;\ngl_Position = czm_depthClampFarPlane(czm_projection * positionEC);\n#ifdef ANGLE_VARYING\nvec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));\napproxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\nv_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n",e$1G={TERRAIN:0,CESIUM_3D_TILE:1,S3M_TILE:2,BOTH:3,NUMBER_OF_CLASSIFICATION_TYPES:4},_0x2b86ba=Object.freeze(e$1G),l$Z="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec4 color;\nattribute float batchId;\nvarying vec4 v_color;\nvoid main()\n{\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = czm_computePosition();\nvec4 prev = czm_computePrevPosition();\nvec4 next = czm_computeNextPosition();\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\nv_color = color;\n}\n",o$12=Z$_+"\n"+l$Z,p$W=d$1c;function e$1F(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.translucent,!0),i=e$1F.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=u$Z(e.vertexShaderSource,o$12),this._fragmentShaderSource=u$Z(e.fragmentShaderSource,p$W),this._renderState=a$S.getDefaultRenderState(t,false,e.renderState),this._closed=false,this._vertexFormat=i,this.name="PolylineColorAppearance"}s$Z.isInternetExplorer()||(o$12="#define CLIP_POLYLINE \n"+o$12),Object.defineProperties(e$1F.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),e$1F.VERTEX_FORMAT=n$13.POSITION_ONLY,e$1F.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,e$1F.prototype.isTranslucent=a$S.prototype.isTranslucent,e$1F.prototype.getRenderState=a$S.prototype.getRenderState;var t$M={CESIUM_3D_TILE_MASK:128,S3M_TILE:2,MODEL:6,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15,setCesium3DTileBit:function(){return{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.REPLACE},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.REPLACE},reference:t$M.CESIUM_3D_TILE_MASK,mask:t$M.CESIUM_3D_TILE_MASK}}},u$M=Object.freeze(t$M);function g$13(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;var t=e.appearance;e$2e(t)||(t=new r$X),this.appearance=t,this.show=u$Z(e.show,!0),this.classificationType=u$Z(e.classificationType,_0x2b86ba.BOTH),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this._debugShowShadowVolume=u$Z(e.debugShowShadowVolume,!1),this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:u$Z(e.interleave,!0),releaseGeometryInstances:u$Z(e.releaseGeometryInstances,!0),allowPicking:u$Z(e.allowPicking,!0),asynchronous:u$Z(e.asynchronous,!0),compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=G$16(0),this._renderState3DTiles=G$16(1),this._renderStateS3M=G$16(2),this._renderStateMorph=d$1m.fromCache({cull:{enabled:!0,face:G$1a.FRONT},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND,depthMask:!1}),this._polygonEntityId=u$Z(e.polygonEntityId,void 0)}function Z$W(e,t,i){var n=t.context,r=e._primitive,o=r._attributeLocations,a=r._batchTable.getVertexShaderCallback()(q$10);a=y$R._appendShowToShader(r,a),a=y$R._appendDistanceDisplayConditionToShader(r,a),a=y$R._modifyShaderPosition(e,a,t.scene3DOnly);var s=r._batchTable.getVertexShaderCallback()(Y$L);s=y$R._appendShowToShader(r,s),s=y$R._appendDistanceDisplayConditionToShader(r,s),s=y$R._modifyShaderPosition(e,s,t.scene3DOnly);var l=r._batchTable.getVertexShaderCallback()(Q$X),u=["GLOBE_MINIMUM_ALTITUDE "+t.mapProjection.ellipsoid.minimumRadius.toFixed(1)],c="",h="";e$2e(i.material)?(-1!==(h=e$2e(i.material)?i.material.shaderSource:"").search(/varying\s+float\s+v_polylineAngle;/g)&&u.push("ANGLE_VARYING"),-1!==h.search(/varying\s+float\s+v_width;/g)&&u.push("WIDTH_VARYING")):c="PER_INSTANCE_COLOR",u.push(c);var d=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",c]:[c],f=new s$V({defines:u,sources:[a],name:"PolylineShadowVolumeVS"}),p=new s$V({defines:d,sources:[h,l],name:"PolylineShadowVolumeFS"});e._sp=r$14.replaceCache({context:n,shaderProgram:r._sp,vertexShaderSource:f,fragmentShaderSource:p,attributeLocations:o});var _=n.shaderCache.getDerivedShaderProgram(e._sp,"2dColor");if(!e$2e(_)){var m=new s$V({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[a]});_=n.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:n,shaderProgram:e._sp2D,vertexShaderSource:m,fragmentShaderSource:p,attributeLocations:o})}e._sp2D=_;var g=n.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor");if(!e$2e(g)){var x=new s$V({defines:u.concat(["MAX_TERRAIN_HEIGHT "+e$1H._defaultMaxTerrainHeight.toFixed(1)]),sources:[s]}),y=new s$V({defines:d,sources:[h,l=r._batchTable.getVertexShaderCallback()(W$Y)]});g=n.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:n,shaderProgram:e._spMorph,vertexShaderSource:x,fragmentShaderSource:y,attributeLocations:o})}e._spMorph=g}function G$16(e){return d$1m.fromCache({cull:{enabled:!0},blending:Ee$r.ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e>0,frontFunction:m$Z.EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.KEEP},backFunction:m$Z.EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.KEEP},reference:2===e?u$M.S3M_TILE:u$M.CESIUM_3D_TILE_MASK,mask:u$M.CLASSIFICATION_MASK}})}function $$U(e,t,i,n,r,o){var a=e._primitive,s=a._va.length;r.length=s,o.length=s;for(var l=t instanceof e$1F?{}:i._uniforms,u=a._batchTable.getUniformMapCallback()(l),c=0;c<s;c++){var h=a._va[c],d=r[c];e$2e(d)||(d=r[c]=new i$$({owner:e,primitiveType:a._primitiveType})),d.vertexArray=h,d.renderState=e._renderState,d.shaderProgram=e._sp,d.uniformMap=u,d.pass=Le$q.TERRAIN_CLASSIFICATION,d.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";var f=i$$.shallowClone(d,d.derivedCommands.tileset);f.renderState=e._renderState3DTiles,f.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=f;var p=i$$.shallowClone(d,d.derivedCommands.S3M);p.renderState=e._renderStateS3M,p.pass=Le$q.ClampObject,d.derivedCommands.S3M=p;var _=i$$.shallowClone(d,d.derivedCommands.color2D);_.shaderProgram=e._sp2D,d.derivedCommands.color2D=_;var m=i$$.shallowClone(f,f.derivedCommands.color2D);m.shaderProgram=e._sp2D,f.derivedCommands.color2D=m;var g=i$$.shallowClone(p,p.derivedCommands.color2D);g.shaderProgram=e._sp2D,p.derivedCommands.color2D=g;var x=i$$.shallowClone(d,d.derivedCommands.colorMorph);x.renderState=e._renderStateMorph,x.shaderProgram=e._spMorph,x.pickId="czm_batchTable_pickColor(v_batchId)",d.derivedCommands.colorMorph=x}}function L$13(e,t,i,n,r,o,a){i.mode===C$14.MORPHING?t=t.derivedCommands.colorMorph:i.mode!==C$14.SCENE3D&&(t=t.derivedCommands.color2D),t&&(t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t))}function ee$w(e,t,i,n,r,o,a){var s,l=e._primitive;y$R._updateBoundingVolumes(l,t,r),t.mode===C$14.SCENE3D?s=l._boundingSphereWC:t.mode===C$14.COLUMBUS_VIEW?s=l._boundingSphereCV:t.mode===C$14.SCENE2D&&e$2e(l._boundingSphere2D)?s=l._boundingSphere2D:e$2e(l._boundingSphereMorph)&&(s=l._boundingSphereMorph);var u=t.mode===C$14.MORPHING,c=e.classificationType,h=c===_0x2b86ba.TERRAIN,d=c===_0x2b86ba.S3M_TILE,f=c===_0x2b86ba.CESIUM_3D_TILE&&!u;c===_0x2b86ba.BOTH&&(h=!0,d=!0,f=!0);var p=t.passes;if(p.render||p.pick&&l.allowPicking)for(var _=i.length,m=0;m<_;++m){var g=s[m];h&&L$13(e,i[m],t,r,o,g,a),f&&L$13(e,i[m].derivedCommands.tileset,t,r,o,g,a),d&&L$13(e,i[m].derivedCommands.S3M,t,r,o,g,a)}}function n$X(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new o$1h,this.setCallback(e,t)}function L$12(e){return Array.isArray(e)&&(e=new e$1M(e)),new e$1L(e)}function l$Y(e){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=e$1X.BLACK,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this._definitionChanged=new o$1h,this._fromDataSource=!1,this.groundBottomAltitude=void 0,this.groundExtrudedHeight=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function E$10(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}Object.defineProperties(g$13.prototype,{interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}}),g$13.initializeTerrainHeights=function(){return e$1H.initialize()},g$13.prototype.update=function(e){if(e$2e(this._primitive)||e$2e(this.geometryInstances)){if(!e$1H.initialized){if(!this.asynchronous)throw new t$15("For synchronous GroundPolylinePrimitives, you must call GroundPolylinePrimitives.initializeTerrainHeights() and wait for the returned promise to resolve.");return void g$13.initializeTerrainHeights()}var t,i=this,n=this._primitiveOptions;if(!e$2e(this._primitive)){var r,o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],a=o.length,s=new Array(a);for(t=0;t<a;++t)if(!e$2e(r=o[t].attributes)||!e$2e(r.color)){this._hasPerInstanceColors=!1;break}for(t=0;t<a;++t){var l=o[t];r={};var u=l.attributes;for(var c in u)u.hasOwnProperty(c)&&(r[c]=u[c]);e$2e(r.width)||(r.width=new o$13({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,value:[l.geometry.width]})),l.geometry._scene3DOnly=e.scene3DOnly,aa$5.setProjectionAndEllipsoid(l.geometry,e.mapProjection),s[t]=new d$1o({geometry:l.geometry,attributes:r,id:l.id,pickPrimitive:i})}n.geometryInstances=s,n.appearance=this.appearance,n._createShaderProgramFunction=function(e,t,n){Z$W(i,t,n)},n._createCommandsFunction=function(e,t,n,r,o,a,s){$$U(i,t,n,r,a,s)},n._updateAndQueueCommandsFunction=function(e,t,n,r,o,a,s,l){ee$w(i,t,n,r,o,a,s)},this._primitive=new y$R(n),this._primitive.readyPromise.then((function(e){i._ready=!0,i.releaseGeometryInstances&&(i.geometryInstances=void 0);var t=e._error;e$2e(t)?i._readyPromise.reject(t):i._readyPromise.resolve(i)}))}if(this.appearance instanceof e$1F&&!this._hasPerInstanceColors)throw new t$15("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},g$13.prototype.getGeometryInstanceAttributes=function(e){if(!e$2e(this._primitive))throw new t$15("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},g$13.isSupported=function(e){return e.frameState.context.depthTexture},g$13.prototype.isDestroyed=function(){return!1},g$13.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,i$11(this)},Object.defineProperties(n$X.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}}),n$X.prototype.getValue=function(e,t){return this._callback(e,t)},n$X.prototype.setCallback=function(e,t){if(!e$2e(e))throw new t$15("callback is required.");if(!e$2e(t))throw new t$15("isConstant is required.");var i=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,i&&this._definitionChanged.raiseEvent(this)},n$X.prototype.equals=function(e){return this===e||e instanceof n$X&&this._callback===e._callback&&this._isConstant===e._isConstant},Object.defineProperties(l$Y.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),material:c$$("material"),hierarchy:C$10("hierarchy",void 0,L$12),height:C$10("height"),heightReference:C$10("heightReference"),extrudedHeight:C$10("extrudedHeight"),extrudedHeightReference:C$10("extrudedHeightReference"),granularity:C$10("granularity"),stRotation:C$10("stRotation"),fill:C$10("fill"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),perPositionHeight:C$10("perPositionHeight"),closeTop:C$10("closeTop"),closeBottom:C$10("closeBottom"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),classificationType:C$10("classificationType"),arcType:C$10("arcType"),zIndex:C$10("zIndex"),groundBottomAltitude:C$10("groundBottomAltitude"),groundExtrudedHeight:C$10("groundExtrudedHeight")}),l$Y.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.material=this.material,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.granularity=this.granularity,e.stRotation=this.stRotation,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.arcType=this.arcType,e.zIndex=this.zIndex,e):new l$Y(this)},l$Y.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.material=u$Z(this.material,e.material),this.hierarchy=u$Z(this.hierarchy,e.hierarchy),this.height=u$Z(this.height,e.height),this.heightReference=u$Z(this.heightReference,e.heightReference),this.extrudedHeight=u$Z(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=u$Z(this.extrudedHeightReference,e.extrudedHeightReference),this.granularity=u$Z(this.granularity,e.granularity),this.stRotation=u$Z(this.stRotation,e.stRotation),this.fill=u$Z(this.fill,e.fill),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(e.outlineColor,this.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.perPositionHeight=u$Z(this.perPositionHeight,e.perPositionHeight),this.closeTop=u$Z(this.closeTop,e.closeTop),this.closeBottom=u$Z(this.closeBottom,e.closeBottom),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$Z(this.classificationType,e.classificationType),this.arcType=u$Z(this.arcType,e.arcType),this.zIndex=u$Z(this.zIndex,e.zIndex),this.groundBottomAltitude=u$Z(this.groundBottomAltitude,e.groundBottomAltitude),this.groundExtrudedHeight=u$Z(this.groundExtrudedHeight,e.groundExtrudedHeight)},l$Y.processWideOutline=function(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n._polygon;if(r instanceof l$Y){if(n.show&&e$2e(r._outline)&&r._outline._value&&r._outlineWidth>1&&!e$2e(r.outlines)){var o,a={width:r._outlineWidth._value,material:void 0,positions:[],loop:!0,distanceDisplayCondition:new r$Z(0,5e4)};if(r.definitionChanged.addEventListener((function(e,t,i,n){e$2e(r.outlines)&&r.outlines.removeAll(),r.outlines=void 0})),r.outlines=e.primitives.add(new J$T({polygonEntityId:n.id})),o=e$2e(r._hierarchy._value)?Array.isArray(r._hierarchy._value)?r._hierarchy._value:r._hierarchy._value.positions:r._hierarchy instanceof n$X?r._hierarchy.getValue(e.frameState.time).positions:r._hierarchy.polygon._positions._value,!r.perPositionHeight||r._height>0)for(var s=0;s<o.length;s++){(h=a$18.fromCartesian(o[s])).height=e$2e(r._height)?r._height._value:0,o[s]=a$18.toCartesian(h)}if(Math.abs(r._extrudedHeight)>0){var l=[];for(s=0;s<o.length;s++){(h=a$18.fromCartesian(o[s])).height=r._extrudedHeight._value;var u=a$18.toCartesian(h);l.push(u),r.outlines.add(p$19({positions:[o[s],u],loop:!1,material:r$Y.fromType(r$Y.ColorType,{color:r._outlineColor._value})},a))}r.outlines.add(p$19({positions:l,material:r$Y.fromType(r$Y.ColorType,{color:r._outlineColor._value})},a))}if(r.outlines.add(p$19({positions:o,material:r$Y.fromType(r$Y.ColorType,{color:r._outlineColor._value})},a)),e$2e(r._hierarchy._value&&r._hierarchy._value.holes))for(var c=0;c<r._hierarchy._value.holes.length;c++){if(o=r._hierarchy._value.holes[c].positions,!r.perPositionHeight||r._height>0)for(s=0;s<o.length;s++){(h=a$18.fromCartesian(o[s])).height=e$2e(r._height)?r._height._value:0,o[s]=a$18.toCartesian(h)}if(Math.abs(r._extrudedHeight)>0){for(l=[],s=0;s<o.length;s++){var h;(h=a$18.fromCartesian(o[s])).height=r._extrudedHeight._value;u=a$18.toCartesian(h);l.push(u),r.outlines.add(p$19({positions:[o[s],u],loop:!1,material:r$Y.fromType(r$Y.ColorType,{color:r._outlineColor._value})},a))}r.outlines.add(p$19({positions:l,material:r$Y.fromType(r$Y.ColorType,{color:r._outlineColor._value})},a))}r.outlines.add(p$19({positions:o,material:r$Y.fromType(r$Y.ColorType,{color:r._outlineColor._value})},a))}}if(e$2e(r.outlines))for(let e=0;e<r.outlines._polylines.length;e++)r.outlines._polylines[e].show=n.show,e$2e(n.geometry)&&(e$2e(n.geometry.outlineWidth)&&!isNaN(n.geometry.outlineWidth)&&(r.outlines._polylines[e].width=n.geometry.outlineWidth),e$2e(n.geometry.outlineColor)&&n.geometry.outlineColor instanceof e$1X&&(r.outlines._polylines[e].material.uniforms.color=n.geometry.outlineColor))}}},l$Y.processClampWideOutline=function(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n._polygon;if(!(r instanceof l$Y))return;var o=e.frameState.time;if(n.show&&e$2e(r._outline)&&r._outline.getValue(o)&&e$2e(r._outlineWidth)&&r._outlineWidth.getValue(o)>1&&!e$2e(r.clampOutlines)){var a;e$2e(r.outlineColor)||(r.outlineColor=e$1X.BLACK),r.definitionChanged.addEventListener((function(t,i,n,o){e$2e(r.clampOutlines)&&e.primitives.remove(r.clampOutlines),r.clampOutlines=void 0})),a=e$2e(r._hierarchy._value)?Array.isArray(r._hierarchy._value)?r._hierarchy._value:r._hierarchy._value.positions:r._hierarchy.polygon._positions._value;var s=new E$10;s.positions=a,o$1p.equals(a[0],a[a.length-1])||(s.loop=!0),s.width=r._outlineWidth.getValue(o)||1;var l={show:new e$1I(!0),color:o$16.fromColor(r._outlineColor.getValue(o)),width:new o$13({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,value:[s.width]})},u=new d$1o({id:n,geometry:new aa$5(s),attributes:l});r.clampOutlines=new g$13({show:!0,asynchronous:!0,geometryInstances:u,classificationType:r._classificationType?r._classificationType._value:_0x2b86ba.BOTH,appearance:new e$1F,polygonEntityId:n.id}),e.primitives.add(r.clampOutlines)}e$2e(r.clampOutlines)&&(r.clampOutlines.show=!r.show||r.show.getValue(o))}};var _0x37e91e=(_0x1102d7=!0,function(e,t){var i=_0x1102d7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1102d7=!1,i}),_0xc9206d=_0x37e91e(void 0,(function(){return _0xc9206d.toString().search("(((.+)+)+)+$").toString().constructor(_0xc9206d).search("(((.+)+)+)+$")})),_0x1102d7;function _0x49281f(){}function _0x2416bc(e){--e;for(var t=1;32>t;t<<=1)e|=e>>t;return e+1}_0xc9206d(),_0x49281f.computeNeighbors=function(e,t){for(var i=e.length/3,n=new Uint32Array(t+1),r=new Uint32Array(t+1),o=function(e,t){e<t?n[e+1]++:r[t+1]++},a=0;a<i;a++){var s=e[3*a],l=e[3*a+1],u=e[3*a+2];o(s,l),o(l,u),o(u,s)}for(a=l=s=0;a<t;a++)u=n[a+1],o=r[a+1],n[a+1]=s,r[a+1]=l,s+=u,l+=o;var c=new Uint32Array(6*i),h=n[t];for(o=function(e,t,i){if(e<t){var o=n[e+1]++;c[2*o]=t,c[2*o+1]=i}else o=r[t+1]++,c[2*h+2*o]=e,c[2*h+2*o+1]=i},a=0;a<i;a++)s=e[3*a],l=e[3*a+1],u=e[3*a+2],o(s,l,a),o(l,u,a),o(u,s,a);for(s=function(e,t){var i=2*e;for(e=t-e,t=1;t<e;t++){for(var n=c[i+2*t],r=c[i+2*t+1],o=t-1;0<=o&&c[i+2*o]>n;o--)c[i+2*o+2]=c[i+2*o],c[i+2*o+3]=c[i+2*o+1];c[i+2*o+2]=n,c[i+2*o+3]=r}},a=0;a<t;a++)s(n[a],n[a+1]),s(h+r[a],h+r[a+1]);var d=new Int32Array(3*i),f=function(t,i){return t===e[3*i]?0:t===e[3*i+1]?1:t===e[3*i+2]?2:-1};for(i=function(e,t){e=f(e,t),d[3*t+e]=-1},s=function(e,t,i,n){e=f(e,t),d[3*t+e]=n,i=f(i,n),d[3*n+i]=t},a=0;a<t;a++){l=n[a],u=n[a+1],o=r[a];for(var p=r[a+1];l<u&&o<p;){var _=c[2*l],m=c[2*h+2*o];_===m?(s(a,c[2*l+1],m,c[2*h+2*o+1]),l++,o++):_<m?(i(a,c[2*l+1]),l++):(i(m,c[2*h+2*o+1]),o++)}for(;l<u;)i(a,c[2*l+1]),l++;for(;o<p;)i(m=c[2*h+2*o],c[2*h+2*o+1]),o++}return d};var _0x52b739=null;function _0x511b25(){}function _0x5b01aa(e){return Math.acos(1<e?1:-1>e?-1:e)}function _0x1cf3a5(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),e*Math.PI/180}_0x49281f.deduplicate=function(e,t,i,n,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=e.byteLength/(4*t)),e=new Uint32Array(e,n,r*t),n=new Uint32Array(r);var o=Math.floor(1.1*r)+1;(null==_0x52b739||_0x52b739.length<2*o)&&(_0x52b739=new Uint32Array(_0x2416bc(2*o)));for(var a=0;a<2*o;a++)_0x52b739[a]=0;var s=0,l=0!==i?Math.ceil(7.84*1.96/(i*i)*i*(1-i)):r;for(a=0;a<r;a++){if(a===l){if((c=1-s/a)+1.96*Math.sqrt(c*(1-c)/a)<i)return null;l*=2}for(var u,c=a*t,h=u=0;h<t;h++)u=(u=e[c+h]+u|0)+(u<<11)+(u>>>2)|0;h=(u>>>=0)%o;for(var d=s;0!==_0x52b739[2*h+1];){if(_0x52b739[2*h]===u){var f=_0x52b739[2*h+1]-1,p=f*t;e:{for(var _=0;_<t;_++)if(e[c+_]!==e[p+_]){p=!1;break e}p=!0}if(p){d=n[f];break}}++h>=o&&(h-=o)}d===s&&(_0x52b739[2*h]=u,_0x52b739[2*h+1]=a+1,s++),n[a]=d}if(0!==i&&1-s/r<i)return null;for(i=new Uint32Array(t*s),a=s=0;a<r;a++)if(n[a]===s){for(o=e,l=a*t,c=i,u=s*t,h=t,d=0;d<h;d++)c[u+d]=o[l+d];s++}return{buffer:i.buffer,indices:n,uniqueCount:s}};var _0xa825ae=4,_0x4a3704=35,_0x436d97=_0x1cf3a5(_0xa825ae),_0x556d56=_0x1cf3a5(_0x4a3704),_0x5dbe08=Math.cos(_0x556d56),_0x190931=Math.cos(_0x436d97);function _0x29a5d6(e,t,i){var n=i.x-t.x,r=i.y-t.y;return(i=n*n+r*r+(t=i.z-t.z)*t)?(i=1/Math.sqrt(i),e.x=n*i,e.y=r*i,e.z=t*i,e):(e.x=0,e.y=0,e.z=0,e)}var _0xdae63b={position0:new o$1p,position1:new o$1p,faceNormal0:new o$1p,faceNormal1:new o$1p,cosAngle:0},_0x470f7d=new o$1p,_0x140f08=new o$1p;function _0x40c826(e,t){var i=_0x5b01aa(e.cosAngle);return _0x29a5d6(_0x140f08,e.position1,e.position0),o$1p.cross(e.faceNormal0,e.faceNormal1,_0x470f7d),i*(0<o$1p.dot(_0x470f7d,_0x140f08)?-1:1)>t}function _0x9b5d27(e){var t=e.faces.length/3,i=e.faces,n=e.neighbors,r=0,o=0;for(o=0;o<t;o++){var a=n[3*o+0],s=n[3*o+1],l=n[3*o+2],u=i[3*o+0],c=i[3*o+1],h=i[3*o+2];r+=-1===a||u<c?1:0,r+=-1===s||c<h?1:0,r+=-1===l||h<u?1:0}var d=new Int32Array(4*r),f=0;for(o=0;o<t;o++){a=n[3*o+0],s=n[3*o+1],l=n[3*o+2],u=i[3*o+0],c=i[3*o+1],h=i[3*o+2];(-1===a||u<c)&&(d[f++]=u,d[f++]=c,d[f++]=o,d[f++]=a),(-1===s||c<h)&&(d[f++]=c,d[f++]=h,d[f++]=o,d[f++]=s),(-1===l||h<u)&&(d[f++]=h,d[f++]=u,d[f++]=o,d[f++]=l)}return d}var _0x18d722=new o$1p,_0x215f18=new o$1p,_0x4c891d=new o$1p;function _0x591a3b(e){var t=e.x*e.x+e.y*e.y+e.z*e.z;t>0&&(t=1/Math.sqrt(t),e.x*=t,e.y*=t,e.z*=t)}function _0x29f326(e){for(var t=e.faces.length/3,i=e.vertices,n=e.dim,r=e.faces,o=new Float32Array(3*t),a=0;a<t;a++){var s=r[3*a+0],l=r[3*a+1],u=r[3*a+2];_0x18d722.x=i[n*s],_0x18d722.y=i[n*s+1],_0x18d722.z=i[n*s+2],_0x215f18.x=i[n*l],_0x215f18.y=i[n*l+1],_0x215f18.z=i[n*l+2],_0x4c891d.x=i[n*u],_0x4c891d.y=i[n*u+1],_0x4c891d.z=i[n*u+2],o$1p.subtract(_0x215f18,_0x18d722,_0x215f18),o$1p.subtract(_0x4c891d,_0x18d722,_0x4c891d),o$1p.cross(_0x215f18,_0x4c891d,_0x18d722),_0x591a3b(_0x18d722),o[3*a+0]=_0x18d722.x,o[3*a+1]=_0x18d722.y,o[3*a+2]=_0x18d722.z}return o}function _0x24f8d9(e,t){0===t&&(t=e,e=0);for(var i=Array(t-e),n=e;n<t;n++)i[n-e]=n;return i}_0x511b25.extractEdges=function(e){var t=e.vertices,i=e.dim,n=_0xdae63b,r=n.position0,o=n.position1,a=n.faceNormal0,s=n.faceNormal1,l=_0x29f326(e),u=_0x9b5d27(e),c=u.length/4,h=new Float32Array(9*c),d=0,f=new Float32Array(12*c),p=0,_=0,m=0,g=_0x24f8d9(0,c),x=new Float32Array(c);x.forEach((function(e,n,a){var s=u[4*n+0],l=u[4*n+1];r.x=t[s*i],r.y=t[s*i+1],r.z=t[s*i+2],o.x=t[l*i],o.y=t[l*i+1],o.z=t[l*i+2],a[n]=o$1p.distance(r,o)})),g.sort((function(e,t){return x[t]-x[e]}));for(var y=[],v=[],$=0;$<c;$++){var b=g[$],T=x[b],C=u[4*b+0],S=u[4*b+1],w=u[4*b+2],E=u[4*b+3],P=-1===E;if(r.x=t[C*i],r.y=t[C*i+1],r.z=t[C*i+2],o.x=t[S*i],o.y=t[S*i+1],o.z=t[S*i+2],P)a.x=l[3*w],a.y=l[3*w+1],a.z=l[3*w+2],s.x=a.x,s.y=a.y,s.z=a.z,n.cosAngle=o$1p.dot(a,s);else if(a.x=l[3*w],a.y=l[3*w+1],a.z=l[3*w+2],s.x=l[3*E],s.y=l[3*E+1],s.z=l[3*E+2],n.cosAngle=o$1p.dot(a,s),n.cosAngle>_0x190931)continue;_+=T,m++,P||n.cosAngle<_0x5dbe08?(h[d++]=n.position0.x,h[d++]=n.position0.y,h[d++]=n.position0.z,h[d++]=n.position1.x,h[d++]=n.position1.y,h[d++]=n.position1.z,h[d++]=n.faceNormal0.x,h[d++]=n.faceNormal0.y,h[d++]=n.faceNormal0.z,y.push(T)):_0x40c826(n,_0x436d97)&&(f[p++]=n.position0.x,f[p++]=n.position0.y,f[p++]=n.position0.z,f[p++]=n.position1.x,f[p++]=n.position1.y,f[p++]=n.position1.z,f[p++]=n.faceNormal0.x,f[p++]=n.faceNormal0.y,f[p++]=n.faceNormal0.z,f[p++]=n.faceNormal1.x,f[p++]=n.faceNormal1.y,f[p++]=n.faceNormal1.z,v.push(T))}h=h.slice(0,d),f=f.slice(0,p);var A=_/m,L=y.length,M=v.length;return{regular:{instancesData:h,instanceCount:L,edgeLength:L*A},silhouette:{instancesData:f,instanceCount:M,edgeLength:M*A},averageEdgeLength:A}};var _0x1b8b0e=(_0x2a728b=!0,function(e,t){var i=_0x2a728b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a728b=!1,i}),_0x45094d=_0x1b8b0e(void 0,(function(){return _0x45094d.toString().search("(((.+)+)+)+$").toString().constructor(_0x45094d).search("(((.+)+)+)+$")})),_0x2a728b;_0x45094d();var _0x585fdd={SVC_Vertex:1,SVC_Normal:2,SVC_VertexColor:4,SVC_SecondColor:8,SVC_TexutreCoord:16,SVC_TexutreCoordIsW:32},_0x64fca6=Object.freeze(_0x585fdd),_0x1ed676=(_0x463a03=!0,function(e,t){var i=_0x463a03?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x463a03=!1,i}),_0x142e8b=_0x1ed676(void 0,(function(){return _0x142e8b.toString().search("(((.+)+)+)+$").toString().constructor(_0x142e8b).search("(((.+)+)+)+$")})),_0x463a03;function _0x28a85f(e){}function _0x242aba(e){if(e$2e(e.cachedSidenessVertexBuffer))return e.cachedSidenessVertexBuffer;var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,e.cachedSidenessVertexBuffer=t$X.createVertexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW}),e.cachedSidenessVertexBuffer.vertexArrayDestroyable=!1,e.cachedSidenessVertexBuffer}function _0x50c0ef(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}function _0x2cb306(e,t){for(var i,n,r,o=t.componentsPerAttribute,a=e.vertCompressConstant,s=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),l=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),u=new Float32Array(3*e.verticesCount),c=0;c<e.verticesCount;c++)i=l[o*c]*a+s.x,n=l[o*c+1]*a+s.y,r=l[o*c+2]*a+s.z,u[3*c]=i,u[3*c+1]=n,u[3*c+2]=r;return u}_0x142e8b(),_0x28a85f.RegularInstanceStride=12,_0x28a85f.SilhouetteInstanceStride=15,_0x28a85f.createEdgeData=function(e,t,i){if(0==t.length)return null;var n,r=t[0];n=0===r.indexType?new Uint16Array(r.indicesTypedArray.buffer,r.indicesTypedArray.byteOffset,r.indicesTypedArray.byteLength/2):new Uint32Array(r.indicesTypedArray.buffer,r.indicesTypedArray.byteOffset,r.indicesTypedArray.byteLength/4);var o=_0x28a85f.extractEdgeInformation(e,!1,n),a=_0x511b25.extractEdges(o);return e$2e(i)&&(e$2e(a.regular.instancesData)&&i.push(a.regular.instancesData.buffer),e$2e(a.silhouette.instancesData)&&i.push(a.silhouette.instancesData.buffer)),a},_0x28a85f.createIndexBuffer=function(e){return e$2e(e.cachedSidenessIndexBuffer)||(e.cachedSidenessIndexBuffer=t$X.createIndexBuffer({context:e,typedArray:_0x50c0ef(),usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),e.cachedSidenessIndexBuffer.vertexArrayDestroyable=!1),e.cachedSidenessIndexBuffer},_0x28a85f.createRegularEdgeAttributes=function(e,t,i){if(e$2e(t.instancesData)&&0!=t.instancesData.length){var n={},r=[];t.attributeLocations=n,t.attributes=r;var o=t$X.createVertexBuffer({context:e,typedArray:t.instancesData,usage:A$18.STATIC_DRAW});t.instancesData=null;var a=S$14.getSizeInBytes(S$14.FLOAT),s=_0x242aba(e),l=0;n.aSideness=l++,r.push({name:"aSideness",index:n.aSideness,vertexBuffer:s,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:2*S$14.getSizeInBytes(S$14.FLOAT),normalize:!1});var u=i||_0x28a85f.RegularInstanceStride,c=0;n.aPosition0=l++,r.push({name:"aPosition0",index:n.aPosition0,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=3,n.aPosition1=l++,r.push({name:"aPosition1",index:n.aPosition1,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=3,n.aNormal=l++,r.push({name:"aNormal",index:n.aNormal,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=3,n.batchId=l++,r.push({name:"batchId",index:n.batchId,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=1,n.aVariantStroke=l++,r.push({name:"aVariantStroke",index:n.aVariantStroke,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=1,n.aVariantExtension=l++,r.push({name:"aVariantExtension",index:n.aVariantExtension,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:a*c,strideInBytes:a*u,instanceDivisor:1}),c+=1}},_0x28a85f.createSilhouetteEdgeAttributes=function(e,t){if(e$2e(t.instancesData)&&0!=t.instancesData.length){var i={},n=[];t.attributeLocations=i,t.attributes=n;var r=t$X.createVertexBuffer({context:e,typedArray:t.instancesData,usage:A$18.STATIC_DRAW});t.instancesData=null;var o=S$14.getSizeInBytes(S$14.FLOAT),a=0;i.aSideness=a++,n.push({name:"aSideness",index:i.aSideness,vertexBuffer:_0x242aba(e),componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:2*o,normalize:!1});var s=_0x28a85f.SilhouetteInstanceStride,l=0;i.aPosition0=a++,n.push({name:"aPosition0",index:i.aPosition0,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.aPosition1=a++,n.push({name:"aPosition1",index:i.aPosition1,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.aNormalA=a++,n.push({name:"aNormalA",index:i.aNormalA,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.aNormalB=a++,n.push({name:"aNormalB",index:i.aNormalB,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=3,i.batchId=a++,n.push({name:"batchId",index:i.batchId,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=1,i.aVariantStroke=a++,n.push({name:"aVariantStroke",index:i.aVariantStroke,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=1,i.aVariantExtension=a++,n.push({name:"aVariantExtension",index:i.aVariantExtension,vertexBuffer:r,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!0,offsetInBytes:o*l,strideInBytes:o*s,instanceDivisor:1}),l+=1}},_0x28a85f.extractEdgeInformation=function(e,t,i){var n,r=e.attrLocation.aPosition,o=e.vertexAttributes[r],a=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,s=o.componentsPerAttribute;a?(s=3,n=_0x2cb306(e,o)):n=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);var l=n.length/s;if(t&&i)return{faces:i,neighbors:_0x49281f.computeNeighbors(i,l),vertices:n,dim:s};var u,c=o.typedArray.buffer;u=a?n.buffer:c.slice(o.typedArray.byteOffset,o.typedArray.byteOffset+o.typedArray.byteLength);var h=_0x49281f.deduplicate(u,s),d=_0x28a85f.selectIndexData(h.indices,i);return{faces:d,neighbors:_0x49281f.computeNeighbors(d,h.uniqueCount),vertices:new Float32Array(h.buffer),dim:s}},_0x28a85f.selectIndexData=function(e,t){if(t){t=t.slice();for(var i=0;i<t.length;i++)t[i]=e[t[i]];return t}return e};var _0xa4737a=new o$1p,_0x471c03=new o$1p,_0xcce4e6=new o$1p,_0x1e3ac1=new o$1p,_0x3ee355=new o$1p,_0x3e00ee=new o$1p,_0x834020=new o$1p,_0x130aff=new o$1p;function _0x6a4059(e,t){function i(e,t,i){var n=48217*e%2147483647,r=t+n/2147483647*(i-=t);return{seed:n,result:Math.round(r)}}var n=function(e,t){var i=new Float32Array(6),n=new Uint32Array(i.buffer),r=new Uint32Array(1);i[0]=e.x,i[1]=e.y,i[2]=e.z,i[3]=t.x,i[4]=t.y,i[5]=t.z,r[0]=5381;for(var o=0;o<n.length;o++)r[0]=31*r[0]+n[o];return r[0]}(e,t);e$2e(n)||(n=2147483647*Math.random());var r=i(n,0,255);n=r.seed,r.result,n=(r=i(n,0,5)).seed;var o,a=r.result;n=(r={seed:o=48217*n%2147483647,result:o/2147483646}).seed;var s=r.result;return s=-(1-Math.min(s/.7,1))+Math.max(0,s-.7)/(1-.7),{variantStroke:a,variantExtension:s=255*(Math.abs(s)**1.2*(0>s?-1:1)*.5+.5)}}_0x28a85f.createEdgeDataByIndices=function(e,t){var i,n,r=e.attrLocation.aPosition,o=e.vertexAttributes[r],a=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,s=o.componentsPerAttribute;a?(s=3,i=_0x2cb306(e,o)):i=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var l=[],u=[],c=(n=0===t.indexType?new Uint16Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/2):new Uint32Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/4)).length,h=0,d=0,f=4*Math.floor(c/4);d<f;d+=4){var p=n[d],_=n[d+1],m=n[d+2],g=n[d+3];if(_0xa4737a.x=i[s*p],_0xa4737a.y=i[s*p+1],_0xa4737a.z=i[s*p+2],_0x471c03.x=i[s*_],_0x471c03.y=i[s*_+1],_0x471c03.z=i[s*_+2],_0xcce4e6.x=i[s*m],_0xcce4e6.y=i[s*m+1],_0xcce4e6.z=i[s*m+2],_0x1e3ac1.x=i[s*g],_0x1e3ac1.y=i[s*g+1],_0x1e3ac1.z=i[s*g+2],!(o$1p.equals(_0x471c03,_0xcce4e6)||o$1p.equals(_0x471c03,_0x1e3ac1)||o$1p.equals(_0x471c03,_0xa4737a)||o$1p.equals(_0xcce4e6,_0xa4737a)||o$1p.equals(_0x1e3ac1,_0xa4737a))){if(m===g){if(o$1p.subtract(_0x471c03,_0xa4737a,_0x3ee355),o$1p.subtract(_0xcce4e6,_0xa4737a,_0x3e00ee),o$1p.cross(_0x3ee355,_0x3e00ee,_0x3ee355),o$1p.equals(_0x3ee355,o$1p.ZERO))continue;o$1p.normalize(_0x3ee355,_0x3ee355),l.push(_0xa4737a.x),l.push(_0xa4737a.y),l.push(_0xa4737a.z),l.push(_0x471c03.x),l.push(_0x471c03.y),l.push(_0x471c03.z),l.push(_0x3ee355.x),l.push(_0x3ee355.y),l.push(_0x3ee355.z),l.push(p);var x=(v=_0x6a4059(_0xa4737a,_0x471c03)).variantStroke,y=v.variantExtension;l.push(x),l.push(y)}else{if(o$1p.subtract(_0x471c03,_0xa4737a,_0x3ee355),o$1p.subtract(_0xcce4e6,_0xa4737a,_0x3e00ee),o$1p.cross(_0x3ee355,_0x3e00ee,_0x3ee355),o$1p.equals(_0x3ee355,o$1p.ZERO)||(o$1p.normalize(_0x3ee355,_0x3ee355),o$1p.subtract(_0x471c03,_0xa4737a,_0x834020),o$1p.subtract(_0x1e3ac1,_0xa4737a,_0x130aff),o$1p.cross(_0x130aff,_0x834020,_0x834020),o$1p.equals(_0x834020,o$1p.ZERO)))continue;o$1p.normalize(_0x834020,_0x834020),u.push(_0xa4737a.x),u.push(_0xa4737a.y),u.push(_0xa4737a.z),u.push(_0x471c03.x),u.push(_0x471c03.y),u.push(_0x471c03.z),u.push(_0x3ee355.x),u.push(_0x3ee355.y),u.push(_0x3ee355.z),u.push(_0x834020.x),u.push(_0x834020.y),u.push(_0x834020.z),u.push(p);var v;x=(v=_0x6a4059(_0xa4737a,_0x471c03)).variantStroke,y=v.variantExtension;u.push(x),u.push(y)}h+=o$1p.distance(_0xa4737a,_0x471c03)}}var $=h/(c/4),b=l.length/_0x28a85f.RegularInstanceStride,T=u.length/_0x28a85f.SilhouetteInstanceStride;return{regular:{instancesData:new Float32Array(l),instanceCount:b,edgeLength:b*$},silhouette:{instancesData:new Float32Array(u),instanceCount:T,edgeLength:T},averageEdgeLength:$}};var _0x2a897a=(_0x145bdd=!0,function(e,t){var i=_0x145bdd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x145bdd=!1,i}),_0x42f995=_0x2a897a(void 0,(function(){return _0x42f995.toString().search("(((.+)+)+)+$").toString().constructor(_0x42f995).search("(((.+)+)+)+$")})),_0x145bdd;function _0x45bcf8(){}_0x42f995(),_0x45bcf8.createClampGroundColorRenderState=function(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.ZERO},backFunction:m$Z.NOT_EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.ZERO},reference:0,mask:65535},blending:Ee$r.ALPHA_BLEND}},_0x45bcf8.createClampGroundAndObjectLineRenderState=function(){return{cull:{enabled:!0},depthMask:!1}},_0x45bcf8.createClampGroundStencilRenderState=function(){return{depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0,func:re$G.GREATER},stencilTest:{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.INCREMENT_WRAP},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:65535}}},_0x45bcf8.createClampObjectColorRenderState=function(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$Z.EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:3,mask:3},blending:Ee$r.ALPHA_BLEND}},_0x45bcf8.createClampObjectStencilRenderState=function(){return{cull:{enabled:!1},depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},reference:0,mask:1},stencilMask:1}},_0x45bcf8.createClampPickStencilRenderState=function(e){var t=e?this.createClampGroundStencilRenderState():this.createClampObjectStencilRenderState();return t.blending={enabled:!1},t.polygonOffset={enabled:!0,factor:1,units:1},t},_0x45bcf8.createClampPickColorRenderState=function(e){var t=e?this.createClampGroundColorRenderState():this.createClampObjectColorRenderState();return t.blending={enabled:!1},t.depthTest={enabled:!0},t.polygonOffset={enabled:!0,factor:1,units:1},t},_0x45bcf8.createReceiveClampObjectStencilTest=function(e){return{enabled:e,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.REPLACE},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.REPLACE},reference:2,mask:2}},_0x45bcf8.createNormalColorRenderState=function(e){return{cull:{enabled:e!==W$13.NONE},depthTest:{enabled:!0,func:re$G.LESS_OR_EQUAL},blending:Ee$r.ALPHA_BLEND,frontFace:e!==W$13.NONE?e:W$13.COUNTER_CLOCKWISE}};var _0x47d8ce=(_0x441a94=!0,function(e,t){var i=_0x441a94?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x441a94=!1,i}),_0x929043=_0x47d8ce(void 0,(function(){return _0x929043.toString().search("(((.+)+)+)+$").toString().constructor(_0x929043).search("(((.+)+)+)+$")})),_0x441a94;_0x929043();var _e$s="precision highp float;\n\nvarying float vRadius;\nvarying vec3 vPosition;\nvarying vec3 vViewPosition;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\nvarying float vVariantExtension;\nvarying float fSelected;\nuniform vec4 uLineColor;\n\n// At which coverage threshold we discard a fragment completely\n#define COVERAGE_TEST_THRESHOLD 0.01\nconst float nearRange = 1000.0;\nconst float farRange = 20000.0;\n\n// Solid\nfloat calculateLineOffsetSolid()\n{\n return 0.0;\n}\nfloat calculateLinePressureSolid()\n{\n return 1.0;\n}\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSolid();\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSolid();\n}\nvec2 lineWithCapsDistance(float radius, vec2 position, float lineLength)\n{\n float lineOffset = calculateLineOffset();\n float positionX = position.x - lineOffset;\n if (radius < 1.0)\n {\n float coverageX = clamp(min(radius, positionX + 0.5) - max(-radius, positionX - 0.5), 0.0, 1.0);\n float coverageY = clamp(min(lineLength, position.y + 0.5) - max(0.0, position.y - 0.5), 0.0, 1.0);\n float coverage = min(coverageX, coverageY);\n return vec2(0.5 - coverage, 0.0);\n }\n else\n {\n // Between -radius -> 0 for start cap, 0 for line, 0 -> radius\n float positionOnCap = position.y - clamp(position.y, 0.0, lineLength);\n vec2 lineToPosition = vec2(positionX, positionOnCap);\n return vec2(length(lineToPosition) - radius, positionOnCap / radius);\n }\n}\n\nvoid main()\n{\n vec3 realPosition = czm_readNonPerspective(vPosition, gl_FragCoord.w);\n float radius = vRadius * calculateLinePressure();\n vec2 distance = lineWithCapsDistance(radius, realPosition.xy, vLineLengthPixels);\n float coverage = clamp(0.5 - distance.x, 0.0, 1.0);\n float coverageLimit = radius <= 0.5 ? COVERAGE_TEST_THRESHOLD : 0.75;\n \n if (coverage < coverageLimit || uLineColor.a < 0.1)\n {\n discard;\n }\n float alpha = uLineColor.a * coverage;\n gl_FragColor = vec4(uLineColor.rgb, alpha);\n float attenuation = 1.0 - smoothstep(nearRange, farRange, vDistanceFromEye);\n gl_FragColor.a *= attenuation;\n czm_writeLogDepth();\n}",_0x111c44=(_0x17fdcf=!0,function(e,t){var i=_0x17fdcf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17fdcf=!1,i}),_0x311fa4=_0x111c44(void 0,(function(){return _0x311fa4.toString().search("(((.+)+)+)+$").toString().constructor(_0x311fa4).search("(((.+)+)+)+$")})),_0x17fdcf;_0x311fa4();var ge$q="precision highp float;\nconst float uPixelRatio = 1.0;\n// Inputs\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\n\n#ifdef SILHOUETTE\nattribute vec3 aNormalA;\nattribute vec3 aNormalB;\n#else /* SILHOUETTE */\nattribute vec3 aNormal;\n#endif /* SILHOUETTE */\n\nattribute vec2 aSideness;\n//attribute vec2 aPackedAttributes;\n\nstruct UnpackedAttributes\n{\n vec2 sideness;\n vec2 sidenessNorm;\n float lineWidthPixels;\n float extensionLengthPixels;\n};\n\n// Output required to compute color\n// Output required to compute distance to line/caps\nvarying vec3 vPosition; \nvarying vec3 vViewPosition;\nvarying float vRadius;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\n\nuniform float uLineWidth;\nuniform vec4 uLineColor;\nuniform vec3 uTranslation;\nconst vec2 uDepthBias = vec2(0.5, -4e-4);\n\n// Utility function to check for NaN values\nbool isNaN(float val)\n{\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n // important: some nVidias failed to cope with version below.\n // Probably wrong optimization.\n /*return ( val <= 0.0 || 0.0 <= val ) ? false : true;*/\n}\n\nvec2 calculateProjectedBiasXY(vec4 projPos, vec3 worldNormal)\n{\n float offsetXY = uDepthBias.x;\n float offsetZ = uDepthBias.y;\n vec4 projNormal = czm_projection * czm_view * vec4(worldNormal, 0.0);\n return offsetXY * projPos.w * 2.0 / czm_viewport.zw * normalize(projNormal.xyz).xy;\n}\n\n// A z-offset, using a depth based heuristic.\nfloat calculateProjectedBiasZ(vec4 projPos)\n{\n float fProjZ = projPos.z / projPos.w;\n if(fProjZ < 0.1)\n {\n return 0.0;\n }\n float offsetZ = uDepthBias.y;\n return sqrt(projPos.z) * offsetZ;\n}\n\nvec4 adjustProjectedPosition(vec4 projPos, vec3 worldNormal, float lineWidth)\n{\n vec2 offsetXY = calculateProjectedBiasXY(projPos, worldNormal);\n // we currently have to do this check because some geometries come with 0 length edge normals.\n if (!isNaN(offsetXY.x) && !isNaN(offsetXY.y))\n {\n projPos.xy += offsetXY;\n }\n#ifdef LOG_DEPTH\n vDistanceFromEye = projPos.w;\n#else\n projPos.z += calculateProjectedBiasZ(projPos);\n#endif\n return projPos;\n}\n\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{}\n// Solid\nfloat calculateLineAmplitudeSolid()\n{\n return 0.0;\n}\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSolid();\n}\n\n\nuniform float uDistanceFalloffFactor;\nfloat distanceBasedPerspectiveFactor(float distance)\n{\n return clamp(sqrt(uDistanceFalloffFactor / distance), 0.0, 1.0);\n}\n\n#define COMPONENT_COLOR_FIELD_OFFSET 0.0\n#define COMPONENT_OTHER_FIELDS_OFFSET 1.0\n#define COMPONENT_FIELD_COUNT 2.0\n#define LINE_WIDTH_FRACTION_FACTOR 8.0\n#define EXTENSION_LENGTH_OFFSET 128.0\n#define COMPONENT_TEX_WIDTH 4096.0\n\nstruct ComponentData\n{\n float lineWidth;\n float extensionLength;\n float type;\n};\n\n\nComponentData readComponentData()\n{\n return ComponentData(uLineWidth, 0.0, 0.0);\n}\n\nvec3 modelToWorldNormal(vec3 normal)\n{\n return (czm_model * vec4(normal, 0.0)).xyz;\n}\n\nvec3 silhouetteWorldNormal(vec3 normalA, vec3 normalB)\n{\n return modelToWorldNormal(normalize(normalA + normalB));\n}\n\n// Fall-off extension length for shorter strokes, starting from strokes that are 256 size,\n// fall-off exponentially\nfloat calculateExtensionLength(float extensionLength, float lineLength)\n{\n return extensionLength / (log2(max(1.0, 256.0 / lineLength)) * 0.2 + 1.0);\n}\n\n#ifdef SILHOUETTE\n// #uniforms: czm_view, czm_model\nbool isSilhouetteEdge(vec4 viewPos, vec3 normalA, vec3 normalB)\n{\n// transform the two face normals\n vec3 viewNormalA = (czm_modelView * vec4(normalA, 0.0)).xyz;\n vec3 viewNormalB = (czm_modelView * vec4(normalB, 0.0)).xyz;\n// compute the direction from the edge to the camera\n vec3 viewDir = -viewPos.xyz;\n// check which of the two faces are visible\n// display the edge if exactly one of the two is visible\n float faceAVisible = dot(viewDir, viewNormalA);\n// positive if visible\n float faceBVisible = dot(viewDir, viewNormalB);\n// positive if visible\n// 1 if exactly one face visible, 0 otherwise\n return faceAVisible * faceBVisible < 0.0;\n}\n#endif /* SILHOUETTE */\n\nvoid clipLineSegmentToNearPlane(vec3 p0,vec3 p1,out bool clipped,out bool culledByNearPlane,out vec4 clippedPositionEC)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = czm_currentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -czm_currentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n}\nvec4 calculateGeometricOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vec2 sideness = unpackedAttributes.sideness;\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n vec4 clippedViewPosV0; bool clippedV0,culledV0; clipLineSegmentToNearPlane(viewPosV0.xyz, viewPosV1.xyz, clippedV0, culledV0, clippedViewPosV0); vec4 clippedViewPosV1; bool clippedV1, culledV1; clipLineSegmentToNearPlane(viewPosV1.xyz, viewPosV0.xyz, clippedV1, culledV1, clippedViewPosV1); vec4 viewPos = mix(clippedViewPosV0, clippedViewPosV1, sidenessNorm.y);\n vViewPosition = viewPos.xyz / viewPos.w;\n vec4 projPosV0 = czm_projection * clippedViewPosV0;\n vec4 projPosV1 = czm_projection * clippedViewPosV1;\n vec4 projPos = czm_projection * viewPos;\n vec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\n vec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\n vec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\n float lineLengthPixels = length(screenSpaceLinePixels);\n float dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\n vec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\n vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\n float falloffFactor = distanceBasedPerspectiveFactor(-viewPos.z) * uPixelRatio;\n float lineWidthPixels = unpackedAttributes.lineWidthPixels * falloffFactor;\n float extensionLengthPixels = calculateExtensionLength(unpackedAttributes.extensionLengthPixels, lineLengthPixels) * falloffFactor;\n float lineAmplitudePixels = calculateLineAmplitude(unpackedAttributes) * uPixelRatio;\n vSizeFalloffFactor = falloffFactor;\n float lineWidthAndAmplitudePixels = lineWidthPixels + lineAmplitudePixels + lineAmplitudePixels;\n float extendedLineLengthPixels = lineLengthPixels + extensionLengthPixels + extensionLengthPixels;\n#ifdef ANTIALIASING\n const float aaPaddingPixels = 1.0;\n // Line size with padding\n float halfAAPaddedLineWidthAndAmplitudePixels = lineWidthAndAmplitudePixels * 0.5 + aaPaddingPixels;\n float aaPaddedRoundedCapSizePixels = lineWidthPixels * 0.5 + aaPaddingPixels;\n // Line length with padding\n float aaPaddedLineLengthPixels = extendedLineLengthPixels + aaPaddingPixels + aaPaddingPixels;\n float halfAAPaddedLineLengthPixels = aaPaddedLineLengthPixels * 0.5;\n#else /* ANTIALIASING */\n // Even if there is no AA, we still want to do proper <1px rendering,\n // so we effectively clamp the pixel sizes to minimum of 1px and compute\n // coverage in the fragment shader \n float halfAAPaddedLineWidthAndAmplitudePixels = max(lineWidthAndAmplitudePixels, 1.0) * 0.5;\n float aaPaddedRoundedCapSizePixels = max(lineWidthPixels, 1.0) * 0.5;\n float halfAAPaddedLineLengthPixels = max(extendedLineLengthPixels, 1.0) * 0.5;\n#endif /* ANTIALIASING */\n // Half line width in NDC including padding for anti aliasing\n vec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\n vec2 halfAAPaddedLineWidthAndAmplitudeNDC = halfAAPaddedLineWidthAndAmplitudePixels * uPixelToNDC;\n vec2 aaPaddedRoundedCapSizeNDC = aaPaddedRoundedCapSizePixels * uPixelToNDC;\n vec2 extensionLengthNDC = extensionLengthPixels * uPixelToNDC;\n // Compute screen space position of vertex, offsetting for line size and end caps\n vec2 ndcOffset = (screenSpaceDirection * sideness.y * (aaPaddedRoundedCapSizeNDC + extensionLengthNDC) + perpendicularScreenSpaceDirection * halfAAPaddedLineWidthAndAmplitudeNDC);\n projPos.xy += ndcOffset * projPos.w;\n projPos.z += (dzPerPixel * (aaPaddedRoundedCapSizePixels + extensionLengthPixels)) * sideness.y * projPos.w;\n projPos = adjustProjectedPosition(projPos, worldNormal, 1.0 + max((lineWidthAndAmplitudePixels - 1.0) * 0.5, 0.0));\n // Line length with end caps\n float aaPaddedLineWithCapsLengthPixels = extendedLineLengthPixels + aaPaddedRoundedCapSizePixels + aaPaddedRoundedCapSizePixels;\n float pixelPositionAlongLine = aaPaddedLineWithCapsLengthPixels * sidenessNorm.y - aaPaddedRoundedCapSizePixels;\n // Position in pixels with origin at first vertex of line segment\n // The line width radius in pixels\n vRadius = lineWidthPixels * 0.5;\n vLineLengthPixels = extendedLineLengthPixels;\n vPosition = czm_writeNonPerspective(vec3(halfAAPaddedLineWidthAndAmplitudePixels * sideness.x, pixelPositionAlongLine, pixelPositionAlongLine / extendedLineLengthPixels), projPos.w);\n#ifdef SILHOUETTE\n gl_Position = isSilhouetteEdge(viewPosV0, aNormalA, aNormalB) ? projPos : vec4(10.0, 10.0, 10.0, 1.0);\n#else /* SILHOUETTE */\n gl_Position = projPos;\n#endif /* SILHOUETTE */\n\n return projPos;\n}\n\n\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float extensionLengthPixels = component.extensionLength;\n float lineWidth = component.lineWidth;\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels);\n}\nvarying float fSelected;\nvoid main()\n{\n fSelected = 0.0;\n ComponentData component = readComponentData();\n UnpackedAttributes unpackedAttributes = unpackAttributes(component);\n vec4 vertexPos0 = vec4(aPosition0, 1.0);\n vec4 vertexPos1 = vec4(aPosition1, 1.0);\n vec3 translate = uTranslation;\n vec4 worldPosV0 = czm_model * vertexPos0;\n vec4 worldPosV1 = czm_model * vertexPos1;\n vec4 viewPosV0 = czm_modelView * vertexPos0;\n vec4 viewPosV1 = czm_modelView * vertexPos1;\n#ifdef SILHOUETTE\n vec3 worldNormal = silhouetteWorldNormal(aNormalA, aNormalB);\n#else /* SILHOUETTE */\n vec3 worldNormal = modelToWorldNormal(aNormal);\n#endif /* SILHOUETTE */\n // General geometric computation for all types of edges\n vec4 projPos = calculateGeometricOutputs(viewPosV0, viewPosV1, worldPosV0, worldPosV1, worldNormal, unpackedAttributes);\n calculateStyleOutputs(unpackedAttributes);\n}";function e$1E(e,t,i){e=u$Z(e,0),t=u$Z(t,0),i=u$Z(i,0),this.value=new Float32Array([e,t,i])}function Q$W(e,t,i){var n,r=!i,o=e.length;if(!r&&o>1){var a=e[0].modelMatrix;for(n=1;n<o;++n)if(!p$1d.equals(a,e[n].modelMatrix)){r=!0;break}}if(r)for(n=0;n<o;++n)e$2e(e[n].geometry)&&k$14.transformToWorldCoordinates(e[n]);else p$1d.multiplyTransformation(t,e[0].modelMatrix,t)}function V$S(e,t){var i=e.attributes,n=i.position,r=n.values.length/n.componentsPerAttribute;i.batchId=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:1,values:new Float32Array(r)});for(var o=i.batchId.values,a=0;a<r;++a)o[a]=t}function X$T(e){for(var t=e.length,i=0;i<t;++i){var n=e[i];e$2e(n.geometry)?V$S(n.geometry,i):e$2e(n.westHemisphereGeometry)&&e$2e(n.eastHemisphereGeometry)&&(V$S(n.westHemisphereGeometry,i),V$S(n.eastHemisphereGeometry,i))}}function Y$K(e){var t,i,n,r=e.instances,o=e.projection,a=e.elementIndexUintSupported,s=e.scene3DOnly,l=e.vertexCacheOptimize,u=e.compressVertices,c=e.modelMatrix,h=r.length;for(t=0;t<h;++t)if(e$2e(r[t].geometry)){n=r[t].geometry.primitiveType;break}for(t=1;t<h;++t)if(e$2e(r[t].geometry)&&r[t].geometry.primitiveType!==n)throw new t$15("All instance geometries must have the same primitiveType.");if(Q$W(r,c,s),!s)for(t=0;t<h;++t)e$2e(r[t].geometry)&&k$14.splitLongitude(r[t]);if(X$T(r),l)for(t=0;t<h;++t){var d=r[t];e$2e(d.geometry)?(k$14.reorderForPostVertexCache(d.geometry),k$14.reorderForPreVertexCache(d.geometry)):e$2e(d.westHemisphereGeometry)&&e$2e(d.eastHemisphereGeometry)&&(k$14.reorderForPostVertexCache(d.westHemisphereGeometry),k$14.reorderForPreVertexCache(d.westHemisphereGeometry),k$14.reorderForPostVertexCache(d.eastHemisphereGeometry),k$14.reorderForPreVertexCache(d.eastHemisphereGeometry))}var f=k$14.combineInstances(r);for(h=f.length,t=0;t<h;++t){var p,_=(i=f[t]).attributes;if(s)for(p in _)_.hasOwnProperty(p)&&_[p].componentDatatype===S$14.DOUBLE&&k$14.encodeAttribute(i,p,p+"3DHigh",p+"3DLow");else for(p in _)if(_.hasOwnProperty(p)&&_[p].componentDatatype===S$14.DOUBLE){var m=p+"3D",g=p+"2D";k$14.projectTo2D(i,p,m,g,o),e$2e(i.boundingSphere)&&"position"===p&&(i.boundingSphereCV=i$1d.fromVertices(i.attributes.position2D.values)),k$14.encodeAttribute(i,m,m+"High",m+"Low"),k$14.encodeAttribute(i,g,g+"High",g+"Low")}u&&k$14.compressVertices(i)}if(!a){var x=[];for(h=f.length,t=0;t<h;++t)i=f[t],x=x.concat(k$14.fitToUnsignedShortIndices(i));f=x}return f}function I$17(e,t,i,n){var r,o,a,s=n.length-1;if(s>=0){var l=n[s];r=l.offset+l.count,o=i[a=l.index].indices.length}else r=0,o=i[a=0].indices.length;for(var u=e.length,c=0;c<u;++c){var h=e[c][t];if(e$2e(h)){var d=h.indices.length;r+d>o&&(r=0,o=i[++a].indices.length),n.push({index:a,offset:r,count:d}),r+=d}}}function Z$V(e,t){var i=[];return I$17(e,"geometry",t,i),I$17(e,"westHemisphereGeometry",t,i),I$17(e,"eastHemisphereGeometry",t,i),i}Object.defineProperties(e$1E.prototype,{componentDatatype:{get:function(){return S$14.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),e$1E.fromCartesian3=function(e){return o$1q.defined("offset",e),new e$1E(e.x,e.y,e.z)},e$1E.toValue=function(e,t){return o$1q.defined("offset",e),e$2e(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};var k$U={};function _$P(e,t){var i=e.attributes;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];e$2e(r)&&e$2e(r.values)&&t.push(r.values.buffer)}e$2e(e.indices)&&t.push(e.indices.buffer)}function $$T(e,t){for(var i=e.length,n=0;n<i;++n)_$P(e[n],t)}function q$$(e){for(var t=1,i=e.length,n=0;n<i;n++){var r=e[n];if(++t,e$2e(r)){var o=r.attributes;for(var a in t+=7+2*i$1d.packedLength+(e$2e(r.indices)?r.indices.length:0),o)if(o.hasOwnProperty(a)&&e$2e(o[a])){t+=6+o[a].values.length}}}return t}function ee$v(e,t){var i=e.length,n=new Float64Array(1+19*i),r=0;n[r++]=i;for(var o=0;o<i;o++){var a=e[o];if(p$1d.pack(a.modelMatrix,n,r),r+=p$1d.packedLength,e$2e(a.attributes)&&e$2e(a.attributes.offset)){var s=a.attributes.offset.value;n[r]=s[0],n[r+1]=s[1],n[r+2]=s[2]}r+=3}return t.push(n.buffer),n}function re$E(e){for(var t=e,i=new Array(t[0]),n=0,r=1;r<t.length;){var o,a=p$1d.unpack(t,r);e$2e(t[r+=p$1d.packedLength])&&(o={offset:new e$1E(t[r],t[r+1],t[r+2])}),r+=3,i[n++]={modelMatrix:a,attributes:o}}return i}function M$Z(e){var t=e.length,i=1+(i$1d.packedLength+1)*t,n=new Float32Array(i),r=0;n[r++]=t;for(var o=0;o<t;++o){e$2e(e[o])?(n[r++]=1,i$1d.pack(e[o],n,r)):n[r++]=0,r+=i$1d.packedLength}return n}function T$Y(e){for(var t=new Array(e[0]),i=0,n=1;n<e.length;)1===e[n++]&&(t[i]=i$1d.unpack(e,n)),++i,n+=i$1d.packedLength;return t}k$U.combineGeometry=function(e){var t,i,n,r,o=e.instances,a=o.length,s=!1;a>0&&((t=Y$K(e)).length>0&&(i=k$14.createAttributeLocations(t[0]),e.createPickOffsets&&(n=Z$V(o,t))),e$2e(o[0].attributes)&&e$2e(o[0].attributes.offset)&&(r=new Array(a),s=!0));for(var l=new Array(a),u=new Array(a),c=0;c<a;++c){var h=o[c],d=h.geometry;e$2e(d)&&(l[c]=d.boundingSphere,u[c]=d.boundingSphereCV,s&&(r[c]=h.geometry.offsetAttribute));var f=h.eastHemisphereGeometry,p=h.westHemisphereGeometry;e$2e(f)&&e$2e(p)&&(e$2e(f.boundingSphere)&&e$2e(p.boundingSphere)&&(l[c]=i$1d.union(f.boundingSphere,p.boundingSphere)),e$2e(f.boundingSphereCV)&&e$2e(p.boundingSphereCV)&&(u[c]=i$1d.union(f.boundingSphereCV,p.boundingSphereCV)))}return{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:i,pickOffsets:n,offsetInstanceExtend:r,boundingSpheres:l,boundingSpheresCV:u}},k$U.packCreateGeometryResults=function(e,t){var i=new Float64Array(q$$(e)),n=[],r={},o=e.length,a=0;i[a++]=o;for(var s=0;s<o;s++){var l=e[s],u=e$2e(l);if(i[a++]=u?1:0,u){i[a++]=l.primitiveType,i[a++]=l.geometryType,i[a++]=u$Z(l.offsetAttribute,-1);var c=e$2e(l.boundingSphere)?1:0;i[a++]=c,c&&i$1d.pack(l.boundingSphere,i,a),a+=i$1d.packedLength;var h=e$2e(l.boundingSphereCV)?1:0;i[a++]=h,h&&i$1d.pack(l.boundingSphereCV,i,a),a+=i$1d.packedLength;var d=l.attributes,f=[];for(var p in d)d.hasOwnProperty(p)&&e$2e(d[p])&&(f.push(p),e$2e(r[p])||(r[p]=n.length,n.push(p)));i[a++]=f.length;for(var _=0;_<f.length;_++){var m=f[_],g=d[m];i[a++]=r[m],i[a++]=g.componentDatatype,i[a++]=g.componentsPerAttribute,i[a++]=g.normalize?1:0,i[a++]=g.isInstanceAttribute?1:0,i[a++]=g.values.length,i.set(g.values,a),a+=g.values.length}var x=e$2e(l.indices)?l.indices.length:0;i[a++]=x,x>0&&(i.set(l.indices,a),a+=x)}}return t.push(i.buffer),{stringTable:n,packedData:i}},k$U.unpackCreateGeometryResults=function(e){for(var t,i=e.stringTable,n=e.packedData,r=new Array(n[0]),o=0,a=1;a<n.length;){if(1===n[a++]){var s,l,u=n[a++],c=n[a++],h=n[a++];-1===h&&(h=void 0),1===n[a++]&&(s=i$1d.unpack(n,a)),a+=i$1d.packedLength,1===n[a++]&&(l=i$1d.unpack(n,a)),a+=i$1d.packedLength;var d,f,p,_,m=new a$_,g=n[a++];for(t=0;t<g;t++){var x=i[n[a++]],y=n[a++];p=n[a++];var v=0!==n[a++],$=0!==n[a++];d=n[a++],f=S$14.createTypedArray(y,d);for(var b=0;b<d;b++)f[b]=n[a++];m[x]=new o$1c({componentDatatype:y,componentsPerAttribute:p,normalize:v,values:f}),$&&(m[x].isInstanceAttribute=!0)}if((d=n[a++])>0){var T=f.length/p;for(_=ce$z.createTypedArray(T,d),t=0;t<d;t++)_[t]=n[a++]}r[o++]=new I$1p({primitiveType:u,geometryType:c,boundingSphere:s,boundingSphereCV:l,indices:_,attributes:m,offsetAttribute:h})}else r[o++]=void 0}return r},k$U.packCombineGeometryParameters=function(e,t){for(var i=e.createGeometryResults,n=i.length,r=0;r<n;r++)t.push(i[r].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:ee$v(e.instances,t),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof n$1d,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}},k$U.unpackCombineGeometryParameters=function(e){for(var t=re$E(e.packedInstances),i=e.createGeometryResults,n=i.length,r=0,o=0;o<n;o++)for(var a=k$U.unpackCreateGeometryResults(i[o]),s=a.length,l=0;l<s;l++){var u=a[l];t[r].geometry=u,++r}var c=t$12.clone(e.ellipsoid);return{instances:t,ellipsoid:c,projection:e.isGeographic?new n$1d(c):new t$N(c),elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:p$1d.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}},k$U.packCombineGeometryResults=function(e,t){e$2e(e.geometries)&&$$T(e.geometries,t);var i=M$Z(e.boundingSpheres),n=M$Z(e.boundingSpheresCV);return t.push(i.buffer,n.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:i,boundingSpheresCV:n}},k$U.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:T$Y(e.boundingSpheres),boundingSpheresCV:T$Y(e.boundingSpheresCV)}};var e$1D={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6},_0x26a83e=Object.freeze(e$1D),E$$={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3,NUMBER_OF_SHADOW_MODES:4,castShadows:function(e){return e===E$$.ENABLED||e===E$$.CAST_ONLY},receiveShadows:function(e){return e===E$$.ENABLED||e===E$$.RECEIVE_ONLY},fromCastReceive:function(e,t){return e&&t?E$$.ENABLED:e?E$$.CAST_ONLY:t?E$$.RECEIVE_ONLY:E$$.DISABLED}},W$X=Object.freeze(E$$);function y$R(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.swipeEnabled=!1,this._swipeEnabled=!1,this._swipeRegion=new e$2c(0,0,1,1),this.depthFailAppearance=e.depthFailAppearance,this._depthFailAppearance=void 0,this._depthFailMaterial=void 0,this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=new p$1d,this.updateBoundingSphere=u$Z(e.updateBoundingSphere,!0),this.show=u$Z(e.show,!0),this._vertexCacheOptimize=u$Z(e.vertexCacheOptimize,!1),this._interleave=u$Z(e.interleave,!1),this._releaseGeometryInstances=u$Z(e.releaseGeometryInstances,!0),this._allowPicking=u$Z(e.allowPicking,!0),this._asynchronous=u$Z(e.asynchronous,!0),this._compressVertices=u$Z(e.compressVertices,!0),this.cull=u$Z(e.cull,!0),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.rtcCenter=e.rtcCenter,e$2e(this.rtcCenter)&&(!e$2e(this.geometryInstances)||Array.isArray(this.geometryInstances)&&1!==this.geometryInstances.length))throw new t$15("Relative-to-center rendering only supports one geometry instance.");this.shadows=u$Z(e.shadows,W$X.DISABLED),this._translucent=void 0,this._state=_0x26a83e.READY,this._geometries=[],this._error=void 0,this._numberOfInstances=0,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeCache=[],this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._depthFailAppearance=void 0,this._spDepthFail=void 0,this._frontFaceDepthFailRS=void 0,this._backFaceDepthFailRS=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._readOnlyInstanceAttributes=e._readOnlyInstanceAttributes,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._batchTable=void 0,this._batchTableAttributeIndices=void 0,this._offsetInstanceExtend=void 0,this._batchTableOffsetAttribute2DIndex=void 0,this._batchTableOffsetsUpdated=!1,this._instanceBoundingSpheres=void 0,this._instanceBoundingSpheresCV=void 0,this._tempBoundingSpheres=void 0,this._recomputeBoundingSpheres=!1,this._batchTableBoundingSpheresUpdated=!1,this._batchTableBoundingSphereAttributeIndices=void 0,this._twoPasses=e.twoPasses,this._polygonOffset={enabled:!1,value:new o$1o(0,0)},this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0,this._edgeDistanceFalloffFactor=0}function tt$g(e){var t,i=e.length,n=[],r=e[0].attributes;for(t in r)if(r.hasOwnProperty(t)&&e$2e(r[t])){for(var o=r[t],a=!0,s=1;s<i;++s){var l=e[s].attributes[t];if(!e$2e(l)||o.componentDatatype!==l.componentDatatype||o.componentsPerAttribute!==l.componentsPerAttribute||o.normalize!==l.normalize){a=!1;break}}a&&n.push(t)}return n}Object.defineProperties(y$R.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}});var nt$d=new o$1o,rt$i=new o$1p,ye$o=new e$2c;function ve$s(e){var t=e.length;return 1===t?e[0]:2===t?o$1o.unpack(e,0,nt$d):3===t?o$1p.unpack(e,0,rt$i):4===t?e$2c.unpack(e,0,ye$o):void 0}function at$e(e,t){var i=e.geometryInstances,n=Array.isArray(i)?i:[i],r=n.length;if(0!==r){var o,a,s,l,u=tt$g(n),c=u.length,h=[],d={},f={},p=n[0].attributes;for(a=0;a<c;++a)l=p[s=u[a]],d[s]=a,h.push({functionName:"czm_batchTable_"+s,componentDatatype:l.componentDatatype,componentsPerAttribute:l.componentsPerAttribute,normalize:l.normalize});-1!==u.indexOf("distanceDisplayCondition")&&(h.push({functionName:"czm_batchTable_boundingSphereCenter3DHigh",componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:S$14.FLOAT,componentsPerAttribute:1}),f.center3DHigh=h.length-5,f.center3DLow=h.length-4,f.center2DHigh=h.length-3,f.center2DLow=h.length-2,f.radius=h.length-1),-1!==u.indexOf("offset")&&(h.push({functionName:"czm_batchTable_offset2D",componentDatatype:S$14.FLOAT,componentsPerAttribute:3}),o=h.length-1),h.push({functionName:"czm_batchTable_pickColor",componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});var _=h.length,m=new h$X(t,h,r);for(a=0;a<r;++a){var g=n[a];p=g.attributes;for(var x=0;x<c;++x){var y=ve$s((l=p[s=u[x]]).value),v=d[s];m.setBatchedAttribute(a,v,y)}var $={primitive:u$Z(g.pickPrimitive,e)};e$2e(g.id)&&($.id=g.id);var b=void 0;if($.primitive._polygonEntityId){var T=t.getAllPickObjects();for(let e in T)T[e].id&&T[e].id.id&&T[e].id.id===$.primitive._polygonEntityId&&(b=t.getPickIdByKey(e))}else b=t.createPickId($);e$2e(b)&&e._pickIds.push(b);var C=e$2e(b)?b.color:e$1X.BLACK,S=ye$o;S.x=e$1X.floatToByte(C.red),S.y=e$1X.floatToByte(C.green),S.z=e$1X.floatToByte(C.blue),S.w=e$1X.floatToByte(C.alpha),m.setBatchedAttribute(a,_-1,S)}e._batchTable=m,e._batchTableAttributeIndices=d,e._batchTableBoundingSphereAttributeIndices=f,e._batchTableOffsetAttribute2DIndex=o}}function st$9(e){var t;return t=Array.isArray(e.values)?e.values.slice(0):new e.values.constructor(e.values),new o$1c({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function ot$b(e){var t,i=e.attributes,n=new a$_;for(var r in i)i.hasOwnProperty(r)&&e$2e(i[r])&&(n[r]=st$9(i[r]));if(e$2e(e.indices)){var o=e.indices;t=Array.isArray(o)?o.slice(0):new o.constructor(o)}return new I$1p({attributes:n,indices:t,primitiveType:e.primitiveType,boundingSphere:i$1d.clone(e.boundingSphere)})}function it$c(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:p$1d.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}var ct$b=/attribute\s+vec(?:3|4)\s+(.*)3DHigh;/g;function Ie$l(e){return s$V.replaceMain(e,"czm_non_pick_main")+"\nvarying vec4 v_pickColor; \nvoid main() \n{ \n czm_non_pick_main(); \n v_pickColor = czm_batchTable_pickColor(batchId); \n}"}function Ae$s(e){return"varying vec4 v_pickColor;\n"+e}function Te$o(e,t){if(!e.compressVertices)return t;var i=-1!==t.search(/attribute\s+vec3\s+normal;/g),n=-1!==t.search(/attribute\s+vec2\s+st;/g);if(!i&&!n)return t;var r=-1!==t.search(/attribute\s+vec3\s+tangent;/g),o=-1!==t.search(/attribute\s+vec3\s+bitangent;/g),a=n&&i?2:1,s="compressedAttributes",l="attribute "+((a+=r||o?1:0)>1?"vec"+a:"float")+" "+s+";",u="",c="";n&&(u+="vec2 st;\n",c+=" st = czm_decompressTextureCoordinates("+(a>1?s+".x":s)+");\n");i&&r&&o?(u+="vec3 normal;\nvec3 tangent;\nvec3 bitangent;\n",c+=" czm_octDecode("+s+"."+(n?"yz":"xy")+", normal, tangent, bitangent);\n"):(i&&(u+="vec3 normal;\n",c+=" normal = czm_octDecode("+s+(a>1?"."+(n?"y":"x"):"")+");\n"),r&&(u+="vec3 tangent;\n",c+=" tangent = czm_octDecode("+s+"."+(n&&i?"z":"y")+");\n"),o&&(u+="vec3 bitangent;\n",c+=" bitangent = czm_octDecode("+s+"."+(n&&i?"z":"y")+");\n"));var h=t;return h=(h=(h=(h=h.replace(/attribute\s+vec3\s+normal;/g,"")).replace(/attribute\s+vec2\s+st;/g,"")).replace(/attribute\s+vec3\s+tangent;/g,"")).replace(/attribute\s+vec3\s+bitangent;/g,""),[l,u,h=s$V.replaceMain(h,"czm_non_compressed_main"),"void main() \n{ \n"+c+" czm_non_compressed_main(); \n}"].join("\n")}function ut$c(e){var t=s$V.replaceMain(e,"czm_non_depth_clamp_main");return t+="varying float v_WindowZ;\nvoid main() {\n czm_non_depth_clamp_main();\n vec4 position = gl_Position;\n v_WindowZ = (0.5 * (position.z / position.w) + 0.5) * position.w;\n position.z = min(position.z, position.w);\n gl_Position = position;\n}\n"}function dt$b(e){var t=s$V.replaceMain(e,"czm_non_depth_clamp_main");return t="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n"+(t+="varying float v_WindowZ;\nvoid main() {\n czm_non_depth_clamp_main();\n#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\n gl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n#endif\n}\n")}function De$m(e,t){var i=e.vertexAttributes;for(var n in i)i.hasOwnProperty(n)&&(e$2e(t[n])||delete e.vertexAttributes[n])}function ht$a(e,t){return function(){return e[t]}}y$R._modifyShaderPosition=function(e,t,i){for(var n,r="",o="",a="";null!==(n=ct$b.exec(t));){var s=n[1],l="vec4 czm_compute"+s[0].toUpperCase()+s.substr(1)+"()";"vec4 czm_computePosition()"!==l&&(r+=l+";\n"),e$2e(e.rtcCenter)?(r+="uniform mat4 u_modifiedModelView;\n",o+="attribute vec4 position;\n",a+=l+"\n{\n return u_modifiedModelView * position;\n}\n\n",t=(t=(t=(t=t.replace(/attribute\s+vec(?:3|4)\s+position3DHigh;/g,"")).replace(/attribute\s+vec(?:3|4)\s+position3DLow;/g,"")).replace(/czm_modelViewRelativeToEye\s+\*\s+/g,"")).replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):i?a+=l+"\n{\n return czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow);\n}\n\n":(o+="attribute vec3 "+s+"2DHigh;\nattribute vec3 "+s+"2DLow;\n",a+=l+"\n{\n vec4 p;\n if (czm_morphTime == 1.0)\n {\n p = czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n p = czm_translateRelativeToEye("+s+"2DHigh.zxy, "+s+"2DLow.zxy);\n }\n else\n {\n p = czm_columbusViewMorph(\n czm_translateRelativeToEye("+s+"2DHigh.zxy, "+s+"2DLow.zxy),\n czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow),\n czm_morphTime);\n }\n return p;\n}\n\n")}return[r,o,t,a].join("\n")},y$R._appendShowToShader=function(e,t){if(!e$2e(e._batchTableAttributeIndices.show))return t;return s$V.replaceMain(t,"czm_non_show_main")+"\nvoid main() \n{ \n czm_non_show_main(); \n gl_Position *= czm_batchTable_show(batchId); \n}"},y$R._updateColorAttribute=function(e,t,i){if(!e$2e(e._batchTableAttributeIndices.color)&&!e$2e(e._batchTableAttributeIndices.depthFailColor)||-1===t.search(/attribute\s+vec4\s+color;/g))return t;if(i&&!e$2e(e._batchTableAttributeIndices.depthFailColor))throw new t$15("A depthFailColor per-instance attribute is required when using a depth fail appearance that uses a color attribute.");var n=t;return n=n.replace(/attribute\s+vec4\s+color;/g,""),n=i?n.replace(/(\b)color(\b)/g,"$1czm_batchTable_depthFailColor(batchId)$2"):n.replace(/(\b)color(\b)/g,"$1czm_batchTable_color(batchId)$2")},y$R._updatePickColorAttribute=function(e){var t=e.replace(/attribute\s+vec4\s+pickColor;/g,"");return t=t.replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2")},y$R._appendOffsetToShader=function(e,t){if(!e$2e(e._batchTableAttributeIndices.offset))return t;var i=t.replace(/attribute\s+float\s+batchId;/g,"attribute float batchId;\nattribute float applyOffset;");return" if (czm_sceneMode == czm_sceneMode3D)\n"," {\n"," $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);"," }\n"," else\n"," {\n"," $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);"," }\n",i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,"vec4 $1 = czm_computePosition();\n if (czm_sceneMode == czm_sceneMode3D)\n {\n $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0); }\n else\n {\n $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0); }\n")},y$R._appendDistanceDisplayConditionToShader=function(e,t,i){if(!e$2e(e._batchTableAttributeIndices.distanceDisplayCondition))return t;var n=s$V.replaceMain(t,"czm_non_distanceDisplayCondition_main"),r="void main() \n{ \n czm_non_distanceDisplayCondition_main(); \n vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);\n vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);\n vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);\n float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);\n";return e.updateBoundingSphere?r+=i?" vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n":" vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);\n vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);\n vec4 centerRTE;\n if (czm_morphTime == 1.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);\n }\n else\n {\n centerRTE = czm_columbusViewMorph(\n czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),\n czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),\n czm_morphTime);\n }\n":r+=" vec4 centerRTE = czm_view * vec4(boundingSphereCenter3DHigh + boundingSphereCenter3DLow, 1.0);\n",n+"\n"+(r+=" float radiusSq = boundingSphereRadius * boundingSphereRadius; \n float distanceSq; \n if (czm_sceneMode == czm_sceneMode2D) \n { \n distanceSq = czm_eyeHeight2D.y - radiusSq; \n } \n else \n { \n distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq; \n } \n distanceSq = max(distanceSq, 0.0); \n float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x; \n float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y; \n float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; \n gl_Position *= show; \n}")};var ce$u=Math.max(s$Z.hardwareConcurrency-1,1),Q$V,lt$6=new i$W("combineGeometry",Number.POSITIVE_INFINITY);function ft$a(e,t){var i,n,r,o,a=e._instanceIds;if(e._state===_0x26a83e.READY){i=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];var s,l=e._numberOfInstances=i.length,u=[],c=[];for(r=0;r<l;++r){if(n=i[r].geometry,a.push(i[r].id),!e$2e(n._workerName))throw new t$15("_workerName must be defined for asynchronous geometry.");c.push({moduleName:n._workerName,geometry:n})}if(!e$2e(Q$V))for(Q$V=new Array(ce$u),r=0;r<ce$u;r++)Q$V[r]=new i$W("createGeometry",Number.POSITIVE_INFINITY);for(c=u$O(c,ce$u),r=0;r<c.length;r++){var h,d=0,f=c[r],p=f.length;for(o=0;o<p;++o)e$2e((n=(s=f[o]).geometry).constructor.pack)&&(s.offset=d,d+=u$Z(n.constructor.packedLength,n.packedLength));if(d>0){var _=new Float64Array(d);for(h=[_.buffer],o=0;o<p;++o)e$2e((n=(s=f[o]).geometry).constructor.pack)&&(n.constructor.pack(n,_,s.offset),s.geometry=_)}u.push(Q$V[r].scheduleTask({subTasks:c[r]},h))}e._state=_0x26a83e.CREATING,o$1l.all(u,(function(t){e._createGeometryResults=t,e._state=_0x26a83e.CREATED})).otherwise((function(i){j$$(e,t,_0x26a83e.FAILED,i)}))}else if(e._state===_0x26a83e.CREATED){var m=[];i=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];var g=t.scene3DOnly,x=t.mapProjection,y=lt$6.scheduleTask(k$U.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:i,ellipsoid:x.ellipsoid,projection:x,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:g,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},m),m);e._createGeometryResults=void 0,e._state=_0x26a83e.COMBINING,o$1l(y,(function(i){var n=k$U.unpackCombineGeometryResults(i);e._geometries=n.geometries,e._attributeLocations=n.attributeLocations,e.modelMatrix=p$1d.clone(n.modelMatrix,e.modelMatrix),e._pickOffsets=n.pickOffsets,e._offsetInstanceExtend=n.offsetInstanceExtend,e._instanceBoundingSpheres=n.boundingSpheres,e._instanceBoundingSpheresCV=n.boundingSpheresCV,e$2e(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=_0x26a83e.COMBINED):j$$(e,t,_0x26a83e.FAILED,void 0)})).otherwise((function(i){j$$(e,t,_0x26a83e.FAILED,i)}))}}function pt$b(e,t){var i,n,r=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],o=e._numberOfInstances=r.length,a=new Array(o),s=e._instanceIds,l=0;for(n=0;n<o;n++){var u,c=(i=r[n]).geometry;u=e$2e(c.attributes)&&e$2e(c.primitiveType)?ot$b(c):c.constructor.createGeometry(c),a[l++]=it$c(i,u),s.push(i.id)}a.length=l;var h=t.scene3DOnly,d=t.mapProjection,f=k$U.combineGeometry({instances:a,ellipsoid:d.ellipsoid,projection:d,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:h,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets});e._geometries=f.geometries,e._attributeLocations=f.attributeLocations,e.modelMatrix=p$1d.clone(f.modelMatrix,e.modelMatrix),e._pickOffsets=f.pickOffsets,e._offsetInstanceExtend=f.offsetInstanceExtend,e._instanceBoundingSpheres=f.boundingSpheres,e._instanceBoundingSpheresCV=f.boundingSpheresCV,e$2e(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=_0x26a83e.COMBINED):j$$(e,t,_0x26a83e.FAILED,void 0)}function _t$9(e,t){var i=e._batchTableAttributeIndices.offset;if(e._recomputeBoundingSpheres&&e$2e(i)){var n,r=e._offsetInstanceExtend,o=e._instanceBoundingSpheres,a=o.length,s=e._tempBoundingSpheres;if(!e$2e(s)){for(s=new Array(a),n=0;n<a;n++)s[n]=new i$1d;e._tempBoundingSpheres=s}for(n=0;n<a;++n){var l=s[n],u=e._batchTable.getBatchedAttribute(n,i,new o$1p);ze$f(l=o[n].clone(l),u,r[n])}var c=[],h=[],d=[];for(n=0;n<a;++n){var f=s[n];f.center.x-f.radius>0||i$1d.intersectPlane(f,o$1m.ORIGIN_ZX_PLANE)!==Ae$w.INTERSECTING?c.push(f):(h.push(f),d.push(f))}var p=c[0],_=d[0],m=h[0];for(n=1;n<c.length;n++)p=i$1d.union(p,c[n]);for(n=1;n<d.length;n++)_=i$1d.union(_,d[n]);for(n=1;n<h.length;n++)m=i$1d.union(m,h[n]);var g=[];for(e$2e(p)&&g.push(p),e$2e(_)&&g.push(_),e$2e(m)&&g.push(m),n=0;n<g.length;n++){var x=g[n].clone(e._boundingSpheres[n]);e._boundingSpheres[n]=x,e._boundingSphereCV[n]=i$1d.projectTo2D(x,t.mapProjection,e._boundingSphereCV[n])}y$R._updateBoundingVolumes(e,t,e.modelMatrix,!0),e._recomputeBoundingSpheres=!1}else e._recomputeBoundingSpheres=!1}var we$k=new i$12,Se$g=new a$18,Ce$i=new o$1p,xe$o=new i$1d;function gt$8(e,t){if(e$2e(e._batchTableAttributeIndices.distanceDisplayCondition)&&!e._batchTableBoundingSpheresUpdated){for(var i=e._batchTableBoundingSphereAttributeIndices,n=i.center3DHigh,r=i.center3DLow,o=i.center2DHigh,a=i.center2DLow,s=i.radius,l=t.mapProjection,u=l.ellipsoid,c=e._batchTable,h=e._instanceBoundingSpheres,d=h.length,f=0;f<d;++f){var p=h[f];if(e$2e(p)){var _=e.modelMatrix;e$2e(_)&&e.updateBoundingSphere&&(p=i$1d.transform(p,_,xe$o));var m=p.center,g=p.radius,x=i$12.fromCartesian(m,we$k);if(c.setBatchedAttribute(f,n,x.high),c.setBatchedAttribute(f,r,x.low),!t.scene3DOnly){var y=u.cartesianToCartographic(m,Se$g),v=l.project(y,Ce$i);x=i$12.fromCartesian(v,we$k),c.setBatchedAttribute(f,o,x.high),c.setBatchedAttribute(f,a,x.low)}c.setBatchedAttribute(f,s,g)}}e._batchTableBoundingSpheresUpdated=!0}}var ue$B=new o$1p,bt$9=new o$1p;function Fe$l(e,t){if(e$2e(e._batchTableAttributeIndices.offset)&&!e._batchTableOffsetsUpdated&&!t.scene3DOnly){for(var i=e._batchTableOffsetAttribute2DIndex,n=t.mapProjection,r=n.ellipsoid,o=e._batchTable,a=e._instanceBoundingSpheres,s=a.length,l=0;l<s;++l){var u=a[l];if(e$2e(u)){var c=o.getBatchedAttribute(l,e._batchTableAttributeIndices.offset);if(o$1p.equals(c,o$1p.ZERO)){o.setBatchedAttribute(l,i,o$1p.ZERO);continue}var h=e.modelMatrix;e$2e(h)&&(u=i$1d.transform(u,h,xe$o));var d=u.center;d=r.scaleToGeodeticSurface(d,bt$9);var f=r.cartesianToCartographic(d,Se$g),p=n.project(f,Ce$i),_=o$1p.add(c,d,ue$B);f=r.cartesianToCartographic(_,f);var m=n.project(f,ue$B),g=o$1p.subtract(m,p,ue$B),x=g.x;g.x=g.z,g.z=g.y,g.y=x,o.setBatchedAttribute(l,i,g)}}e._batchTableOffsetsUpdated=!0}}function mt$7(e,t){for(var i=e._attributeLocations,n=e._geometries,r=t.scene3DOnly,o=t.context,a=[],s=n.length,l=0;l<s;++l){var u=n[l];if(Pe$k(e)){var c=U$_(o,u.attributes.batchId),h=yt$9(o),d=U$_(o,u.attributes.position2DHigh),f=U$_(o,u.attributes.position2DLow),p=U$_(o,u.attributes.position3DHigh),_=U$_(o,u.attributes.position3DLow),m=[];(i={}).sideness=0,m.push({index:i.sideness,vertexBuffer:h,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),i.position02DHigh=1,m.push({index:i.position02DHigh,vertexBuffer:d,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position12DHigh=2,m.push({index:i.position12DHigh,vertexBuffer:d,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position02DLow=3,m.push({index:i.position02DLow,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position12DLow=4,m.push({index:i.position12DLow,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position03DHigh=5,m.push({index:i.position03DHigh,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position13DHigh=6,m.push({index:i.position13DHigh,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position03DLow=7,m.push({index:i.position03DLow,vertexBuffer:_,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.position13DLow=8,m.push({index:i.position13DLow,vertexBuffer:_,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1}),i.batchId=9,m.push({index:i.batchId,vertexBuffer:c,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:4,instanceDivisor:1}),i.batchId1=10,m.push({index:i.batchId1,vertexBuffer:c,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:4,strideInBytes:4,instanceDivisor:1});var g=new c$13({context:o,attributes:m,indexBuffer:It$b(o)});g._instanceCount=u.attributes.position3DHigh.values.length/u.attributes.position3DHigh.componentsPerAttribute-1,e._attributeLocations=i,a.push(g)}else{var x=Object.keys(u.attributes).length,y=!!(o.webgpu&&x>8)||e._interleave;a.push(c$13.fromGeometry({context:o,geometry:u,attributeLocations:i,bufferUsage:A$18.STATIC_DRAW,interleave:y}))}if(e$2e(e._createBoundingVolumeFunction))e._createBoundingVolumeFunction(t,u);else if(e._boundingSpheres.push(i$1d.clone(u.boundingSphere)),e._boundingSphereWC.push(new i$1d),!r&&e$2e(u.boundingSphereCV)){var v=u.boundingSphereCV.center,$=v.x,b=v.y,T=v.z;v.x=T,v.y=$,v.z=b,e._boundingSphereCV.push(i$1d.clone(u.boundingSphereCV)),e._boundingSphere2D.push(new i$1d),e._boundingSphereMorph.push(new i$1d)}}e._va=a,e._primitiveType=n[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,j$$(e,t,_0x26a83e.COMPLETE,void 0)}function Pe$k(e){return e$2e(e._attributeLocations.sideness)}var de$v=null;function yt$9(e){var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,(de$v=t$X.createVertexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW})).vertexArrayDestroyable=!1,de$v}function U$_(e,t){return t$X.createVertexBuffer({context:e,typedArray:t.values,usage:A$18.STATIC_DRAW})}function vt$b(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}var W$W=null;function It$b(e){return e$2e(W$W)||((W$W=t$X.createIndexBuffer({context:e,typedArray:vt$b(),usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1),W$W}function At$8(e,t,i,n,r){var o,a=i.getRenderState();e$2e(r)&&r?a.stencilTest=_0x45bcf8.createReceiveClampObjectStencilTest(!0):a.stencilTest={enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.ZERO},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.ZERO},reference:0,mask:65535},n?((o=l$1f(a,!1)).cull={enabled:!0,face:G$1a.BACK},e._frontFaceRS=d$1m.fromCache(o),o.cull.face=G$1a.FRONT,e._backFaceRS=d$1m.fromCache(o)):(e._frontFaceRS=d$1m.fromCache(a),e._backFaceRS=e._frontFaceRS),o=l$1f(a,!1),e$2e(e._depthFailAppearance)&&(o.depthTest.enabled=!1),e$2e(e._depthFailAppearance)&&((o=l$1f(a=e._depthFailAppearance.getRenderState(),!1)).depthTest.func=re$G.GREATER,n?(o.cull={enabled:!0,face:G$1a.BACK},e._frontFaceDepthFailRS=d$1m.fromCache(o),o.cull.face=G$1a.FRONT,e._backFaceDepthFailRS=d$1m.fromCache(o)):(e._frontFaceDepthFailRS=d$1m.fromCache(o),e._backFaceDepthFailRS=e._frontFaceRS))}function Tt$b(e,t,i){var n=t.context,r=e._attributeLocations,o=Pe$k(e),a=e._batchTable.getVertexShaderCallback()(i.vertexShaderSource);a=y$R._appendOffsetToShader(e,a),a=y$R._appendShowToShader(e,a),a=Ie$l(a=y$R._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=Te$o(e,a=y$R._updateColorAttribute(e,a,!1)),a=y$R._modifyShaderPosition(e,a,t.scene3DOnly);var s=i.getFragmentShaderSource();s=Ae$s(s),a=new s$V({sources:[a],name:i.name}),o&&a.defines.push("APPLY_SIDENESS");var l=[];e._polygonOffset.enabled&&l.push("POLYGON_OFFSET"),s=new s$V({sources:[s],defines:l,name:i.name}),e._swipeEnabled&&s.defines.push("APPLY_SWIPE"),e._sp=r$14.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:r}),De$m(e._sp,r),e$2e(e._depthFailAppearance)&&(a=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),a=y$R._appendShowToShader(e,a),a=Ie$l(a=y$R._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=Te$o(e,a=y$R._updateColorAttribute(e,a,!0)),a=ut$c(a=y$R._modifyShaderPosition(e,a,t.scene3DOnly)),s=dt$b(s=Ae$s(s=e._depthFailAppearance.getFragmentShaderSource())),e._spDepthFail=r$14.replaceCache({name:"depthFail_"+e._depthFailAppearance.name,context:n,shaderProgram:e._spDepthFail,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:r}),De$m(e._spDepthFail,r))}var q$_=new p$1d;new o$1p;var Be$l=new o$1p;function Ee$o(e,t,i,n){var r=e$2e(i)?i._uniforms:void 0,o={},a=t.uniforms;if(e$2e(a))for(var s in a)if(a.hasOwnProperty(s)){if(e$2e(r)&&e$2e(r[s]))throw new t$15("Appearance and material have a uniform with the same name: "+s);o[s]=ht$a(a,s)}var l=p$19(o,r);return(l=e._batchTable.getUniformMapCallback()(l)).u_polygonOffset=function(){return e._polygonOffset.value},l.uLineWidth=function(){return u$Z(e._outlineWidth,1)},l.uSwipeRegion=function(){var t=e._swipeRegion,i=new e$2c;return e$2c.fromElements(t.x,t.y,t.x+t.z,t.y+t.w,i),i.x=i.x*n.context.drawingBufferWidth,i.y=(1-i.y)*n.context.drawingBufferHeight,i.z=i.z*n.context.drawingBufferWidth,i.w=(1-i.w)*n.context.drawingBufferHeight,i},e$2e(e.rtcCenter)&&(l.u_modifiedModelView=function(){var t=n.context.uniformState.view;return p$1d.multiply(t,e._modelMatrix,q$_),p$1d.multiplyByPoint(q$_,e.rtcCenter,Be$l),p$1d.setTranslation(q$_,Be$l,q$_),q$_}),l}function Dt$a(e,t,i,n,r,o,a,s){var l,u=Ee$o(e,t,i,s);e$2e(e._depthFailAppearance)&&(l=Ee$o(e,e._depthFailAppearance,e._depthFailAppearance.material,s));var c=n?Le$q.TRANSLUCENT:Le$q.OPAQUE,h=r?2:1;h*=e$2e(e._depthFailAppearance)?2:1,o.length=e._va.length*h;for(var d=o.length,f=0,p=0;p<d;++p){var _;r&&(e$2e(_=o[p])||(_=o[p]=new i$$({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._backFaceRS,_.shaderProgram=e._sp,_.uniformMap=u,_.pass=c,++p),e$2e(_=o[p])||(_=o[p]=new i$$({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._frontFaceRS,_.shaderProgram=e._sp,_.uniformMap=u,_.pass=c,_.instanceCount=u$Z(_.vertexArray._instanceCount,0),e$2e(e._depthFailAppearance)&&(r&&(e$2e(_=o[++p])||(_=o[p]=new i$$({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._backFaceDepthFailRS,_.shaderProgram=e._spDepthFail,_.uniformMap=l,_.pass=c),e$2e(_=o[++p])||(_=o[p]=new i$$({owner:e,primitiveType:e._primitiveType})),_.vertexArray=e._va[f],_.renderState=e._frontFaceDepthFailRS,_.shaderProgram=e._spDepthFail,_.uniformMap=l,_.pass=c),++f}}function wt$9(e,t,i,n,r,o,a,s){if(t.mode!==C$14.SCENE3D&&!p$1d.equals(r,p$1d.IDENTITY))throw new t$15("Primitive.modelMatrix is only supported in 3D mode.");var l;y$R._updateBoundingVolumes(e,t,r),t.mode===C$14.SCENE3D?l=e.updateBoundingSphere?e._boundingSphereWC:e._boundingSpheres:t.mode===C$14.COLUMBUS_VIEW?l=e._boundingSphereCV:t.mode===C$14.SCENE2D&&e$2e(e._boundingSphere2D)?l=e._boundingSphere2D:e$2e(e._boundingSphereMorph)&&(l=e._boundingSphereMorph);var u=!0;t._fboState.frameBufferType===Qe$c.NORMAL_AND_DEPTH&&(u=!1);var c=t.commandList,h=t.passes;if(u&&(h.render||h.pick)){var d=e.allowPicking,f=W$X.castShadows(e.shadows),p=W$X.receiveShadows(e.shadows),_=i.length,m=s?2:1;m*=e$2e(e._depthFailAppearance)?2:1;for(var g=0;g<_;++g){var x=Math.floor(g/m),y=i[g];y.modelMatrix=r,y.boundingVolume=l[x],y.cull=o,y.debugShowBoundingVolume=a,y.castShadows=f,y.receiveShadows=p,y.pickId=d?"v_pickColor":void 0,c.push(y)}}}function Oe$n(e,t,i,n,r,o){if(!e$2e(i.attributes)||0==i.attributes.length||!e$2e(i.instanceCount)||0==i.instanceCount)return null;var a,s=t.position.getValue(0);a=e$2e(t.orientation)?t.orientation.getValue(0):{heading:0,pitch:0,roll:0};var l=m$19.headingPitchRollToFixedFrame(o$1p.fromDegrees(s.x,s.y,s.z),new i$16(a.heading,a.pitch,a.roll),t$12.WGS84,m$19.eastNorthUpToFixedFrame);p$1d.multiplyByPoint(l,t.boundingSphere.center,t.boundingSphere.center);var u,c,h=Le$q.OPAQUE+1,d=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:l,boundingVolume:t.boundingSphere,pass:h,owner:o,cull:!0});if(d.vertexArray=new c$13({context:e,attributes:i.attributes,indexBuffer:n}),d.instanceCount=i.instanceCount,r){var f="RegularEdge_"+t.id,p="RegularEdge_"+t.id;u=new s$V({name:f,sources:[ge$q]}),c=new s$V({name:p,sources:[_e$s]})}else{f="SilhouetteEdge_"+t.id,p="SilhouetteEdge_"+t.id;u=new s$V({name:f,sources:[ge$q]}),c=new s$V({name:p,sources:[_e$s]}),u.defines.push("SILHOUETTE"),c.defines.push("SILHOUETTE")}u.defines.push("ANTIALIASING"),c.defines.push("ANTIALIASING"),c.defines.push("POLYGON_OFFSET"),u.defines.push("BatchTable");u.defines.push("MODE 0"),c.defines.push("MODE 0"),d.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:i.attributeLocations}),d.renderState=d$1m.fromCache({depthTest:{enabled:!0,func:re$G.LESS_OR_EQUAL},cull:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var _={uLineColor:function(){return u$Z(t.geometry.outlineColor,e$1X.BLACK)},uLineWidth:function(){return t.geometry.outlineWidth},uDistanceFalloffFactor:function(){return o._edgeDistanceFalloffFactor},u_polygonOffset:function(){return new o$1o(-5,-5)}};return d.uniformMap=_,d.edgeTotalLength=i.edgeLength,d.edgeCount=i.instanceCount,d.wireframeType=3,d}y$R._updateBoundingVolumes=function(e,t,i,n){if(e.updateBoundingSphere){var r,o,a;if(n||!p$1d.equals(i,e._modelMatrix))for(p$1d.clone(i,e._modelMatrix),o=e._boundingSpheres.length,r=0;r<o;++r)e$2e(a=e._boundingSpheres[r])&&(e._boundingSphereWC[r]=i$1d.transform(a,i,e._boundingSphereWC[r]),t.scene3DOnly||(e._boundingSphere2D[r]=i$1d.clone(e._boundingSphereCV[r],e._boundingSphere2D[r]),e._boundingSphere2D[r].center.x=0,e._boundingSphereMorph[r]=i$1d.union(e._boundingSphereWC[r],e._boundingSphereCV[r])));var s=e.appearance.pixelSize;if(e$2e(s))for(o=e._boundingSpheres.length,r=0;r<o;++r){a=e._boundingSpheres[r];var l=e._boundingSphereWC[r],u=t.camera.getPixelSize(a,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*s;l.radius=a.radius+u}}},y$R.prototype.update=function(e){if(!e._fboState||!0!==e._fboState.enabled||6!==e._fboState.frameBufferType){if(e.multiViewportIndex>-1&&this._instanceIds.length>0&&e$2e(this._instanceIds[0])&&e$2e(this._instanceIds[0].entityCollection)&&e$2e(this._instanceIds[0].entityCollection.owner)){var t=this._instanceIds[0].entityCollection.owner;if(typeof t.getVisibleInViewport<"u")if(!t.getVisibleInViewport(e.multiViewportIndex))return}if(!(!e$2e(this.geometryInstances)&&0===this._va.length||e$2e(this.geometryInstances)&&Array.isArray(this.geometryInstances)&&0===this.geometryInstances.length||!e$2e(this.appearance)||e.mode!==C$14.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)){if(e$2e(this._error))throw this._error;if(e$2e(this.rtcCenter)&&!e.scene3DOnly)throw new t$15("RTC rendering is only available for 3D only scenes.");if(this._state!==_0x26a83e.FAILED){var i=e.context;if(e$2e(this._batchTable)||at$e(this,i),this._state!==_0x26a83e.COMPLETE&&this._state!==_0x26a83e.COMBINED&&(this.asynchronous?ft$a(this,e):pt$b(this,e)),this._state===_0x26a83e.COMBINED&&(gt$8(this,e),Fe$l(this,e),mt$7(this,e)),this._batchTable.attributes.length>0){if(0===e$1W.maximumVertexTextureImageUnits)throw new t$13("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}if(this.show&&this._state===_0x26a83e.COMPLETE){this._batchTableOffsetsUpdated||Fe$l(this,e),this._recomputeBoundingSpheres&&_t$9(this,e);var n=this.appearance,r=n.material,o=!1,a=!1;this._appearance!==n?(this._appearance=n,this._material=r,o=!0,a=!0):this._material!==r?(this._material=r,a=!0):this._swipeEnabled!==this.swipeEnabled&&(this._swipeEnabled=this.swipeEnabled,a=!0);var s=this.depthFailAppearance,l=e$2e(s)?s.material:void 0;this._depthFailAppearance!==s?(this._depthFailAppearance=s,this._depthFailMaterial=l,o=!0,a=!0):this._depthFailMaterial!==l&&(this._depthFailMaterial=l,a=!0);var u=this._appearance.isTranslucent();this._translucent!==u&&(this._translucent=u,o=!0),e$2e(this._material)&&this._material.update(i);var c=e$2e(this._twoPasses)?this._twoPasses:n.closed&&u,h=!1;if(e$2e(this._instanceIds[0])&&e$2e(this._instanceIds[0].receiveObjectClamp)&&this._instanceIds[0].receiveObjectClamp&&(h=!0),o)u$Z(this._createRenderStatesFunction,At$8)(this,i,n,c,h);if(a)u$Z(this._createShaderProgramFunction,Tt$b)(this,e,n);if(o||a)u$Z(this._createCommandsFunction,Dt$a)(this,n,r,u,c,this._colorCommands,this._pickCommands,e);if(e$2e(this._instanceIds[0])){!e$2e(this._instanceIds[0].polygon)||e$2e(this._instanceIds[0].polygon._perPositionHeight)&&(!e$2e(this._instanceIds[0].polygon._perPositionHeight)||this._instanceIds[0].polygon._perPositionHeight._value)||e$2e(this._instanceIds[0].polygon._height)?l$Y.processWideOutline(e.camera._scene,this._instanceIds):l$Y.processClampWideOutline(e.camera._scene,this._instanceIds);for(var d=0,f=this._instanceIds.length;d<f;d++){var p=this._instanceIds[d];if(p.show&&e$2e(p.geometry)&&p.geometry.outline.getValue(1))if(e$2e(p.regularcommand))e.commandList.push(p.regularcommand),this._addRenderedEdge(p.regularcommand.edgeTotalLength,p.regularcommand.edgeCount),null!=p.silhouettecommand&&(e.commandList.push(p.silhouettecommand),this._addRenderedEdge(p.silhouettecommand.edgeTotalLength,p.silhouettecommand.edgeCount));else{i=e.context;var _=p.edgedata;if(e$2e(_)){_0x28a85f.createRegularEdgeAttributes(i,_.regular,9),_0x28a85f.createSilhouetteEdgeAttributes(i,_.silhouette);var m=_0x28a85f.createIndexBuffer(i);p.regularcommand=Oe$n(i,p,_.regular,m,!0,this),p.silhouettecommand=Oe$n(i,p,_.silhouette,m,!1,this),null!=p.regularcommand&&(e.commandList.push(p.regularcommand),this._addRenderedEdge(p.regularcommand.edgeTotalLength,p.regularcommand.edgeCount)),null!=p.silhouettecommand&&(e.commandList.push(p.silhouettecommand),this._addRenderedEdge(p.silhouettecommand.edgeTotalLength,p.silhouettecommand.edgeCount)),delete p.edgedata}}}}u$Z(this._updateAndQueueCommandsFunction,wt$9)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,c),this._updateEdgeDistanceFalloffFactor()}}}}},y$R.prototype._addRenderedEdge=function(e,t){this._edgeCurrentTotalLength+=e,this._edgeCurrentCount+=t},y$R.prototype._updateEdgeDistanceFalloffFactor=function(){0!=this._edgeCurrentCount?(this._edgeDistanceFalloffFactor=this._edgeCurrentTotalLength/this._edgeCurrentCount*40,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0):this._edgeCurrentTotalLength=0};var St$7=new i$1d,Ct$8=new i$1d;function ze$f(e,t,i){if(i===_0x39c22a.TOP){var n=i$1d.clone(e,St$7),r=i$1d.clone(e,Ct$8);r.center=o$1p.add(r.center,t,r.center),e=i$1d.union(n,r,e)}else i===_0x39c22a.ALL&&(e.center=o$1p.add(e.center,t,e.center));return e}function xt$9(e,t,i){return function(){var n=e.getBatchedAttribute(t,i),r=e.attributes[i],o=r.componentsPerAttribute,a=S$14.createTypedArray(r.componentDatatype,o);return e$2e(n.constructor.pack)?n.constructor.pack(n,a,0):a[0]=n,a}}function Ft$8(e,t,i,n,r){return function(o){if(!e$2e(o)||!e$2e(o.length)||o.length<1||o.length>4)throw new t$15("value must be and array with length between 1 and 4.");var a=ve$s(o);e.setBatchedAttribute(t,i,a),"offset"===r&&(n._recomputeBoundingSpheres=!0,n._batchTableOffsetsUpdated=!1)}}var Pt$7=new o$1p;function Bt$9(e,t,i){t.boundingSphere={get:function(){var n=e._instanceBoundingSpheres[i];if(e$2e(n)&&e.updateBoundingSphere){n=n.clone();var r=e.modelMatrix,o=t.offset;e$2e(o)&&ze$f(n,o$1p.fromArray(o.get(),0,Pt$7),e._offsetInstanceExtend[i]),e$2e(r)&&(n=i$1d.transform(n,r))}return n}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[i]}}}function Et$a(e,t,i){t.pickId={get:function(){return e._pickIds[i]}}}function j$$(e,t,i,n){e._error=n,e._state=i,t.afterRender.push((function(){e._ready=e._state===_0x26a83e.COMPLETE||e._state===_0x26a83e.FAILED,e$2e(n)?e._readyPromise.reject(n):e._readyPromise.resolve(e)}))}function p$V(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).camera))throw new t$15("options.camera is required.");this._camera=e.camera,this._color=u$Z(e.color,e$1X.CYAN),this._updateOnChange=u$Z(e.updateOnChange,!0),this.show=u$Z(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}y$R.prototype.getGeometryInstanceAttributes=function(e){if(!e$2e(e))throw new t$15("id is required");if(!e$2e(this._batchTable))throw new t$15("must call update before calling getGeometryInstanceAttributes");for(var t=-1,i=this._lastPerInstanceAttributeIndex,n=this._instanceIds,r=n.length,o=0;o<r;++o){var a=(i+o)%r;if(e===n[a]){t=a;break}}if(-1!==t){var s=this._perInstanceAttributeCache[t];if(e$2e(s))return s;var l=this._batchTable,u=this._batchTableAttributeIndices;s={};var c={};for(var h in u)if(u.hasOwnProperty(h)){var d=u[h];c[h]={get:xt$9(l,t,d)};var f=!0,p=this._readOnlyInstanceAttributes;if(f&&e$2e(p)){r=p.length;for(var _=0;_<r;++_)if(h===p[_]){f=!1;break}}f&&(c[h].set=Ft$8(l,t,d,this,h))}return Bt$9(this,c,t),Et$a(this,c,t),Object.defineProperties(s,c),this._lastPerInstanceAttributeIndex=t,this._perInstanceAttributeCache[t]=s,s}},y$R.prototype.isDestroyed=function(){return!1},y$R.prototype.destroy=function(){var e,t;this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy();var i=this._va;for(e=i.length,t=0;t<e;++t)i[t].destroy();this._va=void 0;var n=this._pickIds;for(e=n.length,t=0;t<e;++t)n[t].destroy();return this._pickIds=void 0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._instanceIds=void 0,this._perInstanceAttributeCache=void 0,this._attributeLocations=void 0,i$11(this)},y$R.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._polygonOffset.enabled=!0,o$1o.fromElements(e,t,this._polygonOffset.value)):(this._polygonOffset.enabled=!1,o$1o.fromElements(0,0,this._polygonOffset.value))};var k$T=new o$1p,T$X=new p$1e,Y$J=new n$15,j$_=new o$15,q$Z=new l$10,B$T=new a$V,J$S=new l$11,Q$U=new e$1X,V$R=[1,1e5];function g$12(){}function T$W(e,t,i,n,r,o){var a="";return t&&(n||(a+="varying vec3 v_positionEC; \n"),a+="uniform vec4 shadowMap_lightPositionEC; \n"),i&&"vSecondColor"!==o.pickId?a+="void main() \n{ \n":a+="void main() \n{ \n czm_shadow_cast_main(); \n if (gl_FragColor.a == 0.0) \n { \n discard; \n } \n",t?a+=" float distance = length("+r+"); \n if (distance >= shadowMap_lightPositionEC.w) \n { \n discard; \n } \n distance /= shadowMap_lightPositionEC.w; // radius \n gl_FragColor = czm_packDepth(distance); \n":(e&&e$2e(o.pickId)&&"vSecondColor"===o.pickId&&(a+=" if(vColor.a < 0.1)\n {\n discard;\n }\n"),a+=" gl_FragColor = czm_packDepth(gl_FragCoord.z); \n"),a+="} \n"}function H$_(e,t,i,n,r){var o="";return t&&(n||(o+="varying v_positionEC : vec3<f32>; \n"),o+="uniform shadowMap_lightPositionEC : vec4<f32>; \n"),o+=i?"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n":"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n czm_shadow_cast_main(); \n if (gl_FragColor.a == 0.0) \n { \n discard; \n } \n",t?o+=" var distance = length("+r+"); \n if (distance >= shadowMap_lightPositionEC.w) \n { \n discard; \n } \n distance /= shadowMap_lightPositionEC.w; // radius \n gl_FragColor = czm_packDepth(distance); \n":(o+=" var d = gl_FragCoord.z; \n",o+=" d = (d + 1.0) * 0.5; \n",o+=" gl_FragColor = czm_packDepth(d); \n"),o+="} \n"}function R$V(e,t,i,n){return"vec4 getPositionEC() \n{ \n"+(i?" return vec4("+n+", 1.0); \n":t?" return vec4(v_logPositionEC, 1.0); \n":" return czm_windowToEyeCoordinates(gl_FragCoord); \n")+"} \n"}function V$Q(e,t,i){return"vec3 getNormalEC() \n{ \n"+(e?" return normalize("+t+"); \n":i?" return normalize(czm_normal*czm_computeNormal(vPositionMC.xyz)); \n":" return vec3(1.0); \n")+"} \n"}function b$15(e,t,i,n){return"fn getPositionEC() -> vec4<f32> \n{ \n"+(i?" return vec4<f32>("+n+", 1.0); \n":t?" return vec4<f32>(v_logPositionEC, 1.0); \n":" return czm_windowToEyeCoordinates(gl_FragCoord); \n")+"} \n"}function x$10(e,t,i){return"fn getNormalEC() -> vec3<f32> \n{ \n"+(e?" return normalize("+t+"); \n":i?" return normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(vPositionMC.xyz)); \n":" return vec3<f32>(1.0); \n")+"} \n"}function M$Y(){return"void main()\n {\n vec4 positionEC = getPositionEC();\n vec3 normalEC = getNormalEC();\n float depth = -positionEC.z;\n czm_shadow_receive_main();\n float visibility = getShadowVisibility(positionEC, normalEC, depth);\n gl_FragColor.rgb *= visibility;\n }"}function U$Z(){return"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n var positionEC = getPositionEC(); \n var normalEC = getNormalEC(); \n var depth = -positionEC.z; \n var visibility = getShadowVisibility(positionEC, normalEC, depth); \n czm_shadow_receive_main(); \n var fragColor = vec3<f32>(gl_FragColor.rgb) * visibility; \n gl_FragColor = vec4<f32>(fragColor, gl_FragColor.a); \n} \n"}function e$1C(e,t,i,n,r,o){this._valueCache={},this._engine=e,this._noUBO=!e.context.webgl2,this._dynamic=i,this._name=n??"no-name",this._data=t||[],this._uniformLocations={},this._uniformSizes={},this._uniformArraySizes={},this._uniformLocationPointer=0,this._needSync=!1,this._trackUbosInFrame=!1,this._noUBO?(this.updateMatrix3x3=this._updateMatrix3x3ForEffect,this.updateMatrix2x2=this._updateMatrix2x2ForEffect,this.updateFloat=this._updateFloatForEffect,this.updateFloat2=this._updateFloat2ForEffect,this.updateFloat3=this._updateFloat3ForEffect,this.updateFloat4=this._updateFloat4ForEffect,this.updateFloatArray=this._updateFloatArrayForEffect,this.updateArray=this._updateArrayForEffect,this.updateIntArray=this._updateIntArrayForEffect,this.updateMatrix=this._updateMatrixForEffect,this.updateMatrices=this._updateMatricesForEffect,this.updateVector3=this._updateVector3ForEffect,this.updateVector4=this._updateVector4ForEffect,this.updateColor3=this._updateColor3ForEffect,this.updateColor4=this._updateColor4ForEffect,this.updateDirectColor4=this._updateDirectColor4ForEffect,this.updateInt=this._updateIntForEffect,this.updateInt2=this._updateInt2ForEffect,this.updateInt3=this._updateInt3ForEffect,this.updateInt4=this._updateInt4ForEffect):(this._engine._uniformBuffers.push(this),this.updateMatrix3x3=this._updateMatrix3x3ForUniform,this.updateMatrix2x2=this._updateMatrix2x2ForUniform,this.updateFloat=this._updateFloatForUniform,this.updateFloat2=this._updateFloat2ForUniform,this.updateFloat3=this._updateFloat3ForUniform,this.updateFloat4=this._updateFloat4ForUniform,this.updateFloatArray=this._updateFloatArrayForUniform,this.updateArray=this._updateArrayForUniform,this.updateIntArray=this._updateIntArrayForUniform,this.updateMatrix=this._updateMatrixForUniform,this.updateMatrices=this._updateMatricesForUniform,this.updateVector3=this._updateVector3ForUniform,this.updateVector4=this._updateVector4ForUniform,this.updateColor3=this._updateColor3ForUniform,this.updateColor4=this._updateColor4ForUniform,this.updateDirectColor4=this._updateDirectColor4ForUniform,this.updateInt=this._updateIntForUniform,this.updateInt2=this._updateInt2ForUniform,this.updateInt3=this._updateInt3ForUniform,this.updateInt4=this._updateInt4ForUniform)}p$V.prototype.update=function(e){if(this.show){var t,i,n=this._planesPrimitives,r=this._outlinePrimitives;if(this._updateOnChange){for(i=n.length,t=0;t<i;++t)r[t]=r[t]&&r[t].destroy(),n[t]=n[t]&&n[t].destroy();n.length=0,r.length=0}if(0===n.length){var o,a=this._camera,s=a.frustum;o=s instanceof o$15?j$_:s instanceof l$10?q$Z:s instanceof a$V?B$T:J$S,o=s.clone(o);var l=e.frustumSplits,u=l.length-1;u<=0&&((l=V$R)[0]=this._camera.frustum.near,l[1]=this._camera.frustum.far,u=1);var c=a.positionWC,h=a.directionWC,d=a.upWC,f=a.rightWC;f=o$1p.negate(f,k$T);var p=T$X;p$1e.setColumn(p,0,f,p),p$1e.setColumn(p,1,d,p),p$1e.setColumn(p,2,h,p);var _=n$15.fromRotationMatrix(p,Y$J);for(n.length=r.length=u,t=0;t<u;++t)o.near=l[t],o.far=l[t+1],n[t]=new y$R({geometryInstances:new d$1o({geometry:new z$U({origin:c,orientation:_,frustum:o,_drawNearPlane:0===t}),attributes:{color:o$16.fromColor(e$1X.fromAlpha(this._color,.1,Q$U))},id:this.id,pickPrimitive:this}),appearance:new t$Q({translucent:!0,flat:!0}),asynchronous:!1}),r[t]=new y$R({geometryInstances:new d$1o({geometry:new s$O({origin:c,orientation:_,frustum:o,_drawNearPlane:0===t}),attributes:{color:o$16.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new t$Q({translucent:!1,flat:!0}),asynchronous:!1})}for(i=n.length,t=0;t<i;++t)r[t].update(e),n[t].update(e)}},p$V.prototype.isDestroyed=function(){return!1},p$V.prototype.destroy=function(){for(var e=this._planesPrimitives.length,t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return i$11(this)},g$12.getShadowCastShaderKeyword=function(e,t,i,n){return"castShadow "+(e|t<<1|i<<2|n<<3)},g$12.createShadowCastVertexShader=function(e,t,i){var n=u$Z(e.useWGSL,!1),r=e.defines.slice(0),o=e.sources.slice(0);r.push("SHADOW_MAP"),i&&r.push("GENERATE_POSITION");var a=e$2e(s$V.findPositionVarying(e));if(t&&!a){for(var s=o.length,l=0;l<s;++l)o[l]=s$V.replaceMain(o[l],"czm_shadow_cast_main",n);o.push("varying vec3 v_positionEC; \nvoid main() \n{ \n czm_shadow_cast_main(); \n v_positionEC = (czm_inverseProjection * gl_Position).xyz; \n}")}return new s$V({name:e.name+"_shadowCast",defines:r,sources:o,useWGSL:e.useWGSL})},g$12.createShadowCastFragmentShader=function(e,t,i,n,r,o){var a=u$Z(e.useWGSL,!1),s=e.defines.slice(0),l=e.sources.slice(0),u=s$V.findPositionVarying(e),c=e$2e(u);c||(u="v_positionEC");for(var h=l.length,d=0;d<h;++d)l[d]=s$V.replaceMain(l[d],"czm_shadow_cast_main",a);var f="";return f=a?H$_(i,t,n,c,u):T$W(i,t,n,c,u,r),l.push(f),new s$V({name:e.name+"_shadowCast",defines:s,sources:l,useWGSL:e.useWGSL})},g$12.getShadowReceiveShaderKeyword=function(e,t,i,n){return"receiveShadow "+(e._usesDepthTexture|e._polygonOffsetSupported<<1|e._isPointLight<<2|e._isSpotLight<<3|(e._numberOfCascades>1)<<4|e.softShadows<<5|t<<6|i<<7|n<<8)},g$12.createShadowReceiveVertexShader=function(e,t,i){var n=e.defines.slice(0),r=e.sources.slice(0);return n.push("SHADOW_MAP"),t&&(i?n.push("GENERATE_POSITION_AND_NORMAL"):n.push("GENERATE_POSITION")),new s$V({name:e.name+"_shadowReceive",defines:n,sources:r,useWGSL:e.useWGSL})},g$12.createShadowReceiveFragmentShader=function(e,t,i,n,r,o){for(var a=u$Z(e.useWGSL,!1),s=s$V.findNormalVarying(e),l=!n&&e$2e(s)||n&&r,u=s$V.findPositionVarying(e),c=e$2e(u),h=t._usesDepthTexture,d=(t._polygonOffsetSupported,t._isPointLight),f=t._isSpotLight,p=t._numberOfCascades>1,_=(t.debugCascadeColors,t.softShadows),m=t._pcss,g=t._quality,x=d?t._pointBias:n?t._terrainBias:t._primitiveBias,y=e.defines.slice(0),v=e.sources.slice(0),$=!1,b=v.length,T=0;T<b;++T)if(v[T].indexOf("<shadowReceive>")>-1){$=!0;break}if(!$)for(T=0;T<b;++T)v[T]=s$V.replaceMain(v[T],"czm_shadow_receive_main",a);if(y.push("SHADOW_MAP"),d?y.push("USE_CUBE_MAP_SHADOW"):h&&y.push("USE_SHADOW_DEPTH_TEXTURE"),_&&!d&&(y.push("USE_SOFT_SHADOWS"),m&&(y.push("USE_PCSS"),0==g?y.push("LOW_QUALITY_SHADOW"):1==g?y.push("MEDIUM_QUALITY_SHADOW"):y.push("HIGH_QUALITY_SHADOW"))),f&&y.push("SPOT_LIGHT_SHADOW"),p?y.push("HAS_CASCADES"):y.push("NO_CASCADES"),n&&y.push("IS_TERRAIN"),p&&i&&n&&(l?y.push("ENABLE_VERTEX_LIGHTING"):y.push("ENABLE_DAYNIGHT_SHADING")),i&&x.normalShading&&(l||o)&&(y.push("USE_NORMAL_SHADING"),x.normalShadingSmooth>0&&y.push("USE_NORMAL_SHADING_SMOOTH")),(x.normalOffset&&l||o)&&y.push("APPLY_NORMAL_OFFSET"),!$){var C="",S=e.defines.indexOf("LOG_DEPTH")>-1,w=a?x$10:V$Q,E=a?U$Z:M$Y;C+=(S?a?"varying v_logPositionEC : vec3<f32>; \n":"varying vec3 v_logPositionEC; \n":"\n")+(a?b$15:R$V)(e,S,c,u)+w(l,s,o)+"#include <ShadowUboDecl> \n#include <shadowReceive> \n"+E(),v.push(C)}return new s$V({name:e.name+"shadowReceive",defines:y,sources:v,useWGSL:e.useWGSL})},Object.defineProperty(e$1C.prototype,"useUbo",{get:function(){return!this._noUBO},enumerable:!1,configurable:!0}),Object.defineProperty(e$1C.prototype,"isSync",{get:function(){return!this._needSync},enumerable:!1,configurable:!0}),e$1C.prototype.isDynamic=function(){return void 0!==this._dynamic},e$1C.prototype.getData=function(){return this._bufferData},e$1C.prototype.getBuffer=function(){return this._buffer},e$1C.prototype._fillAlignment=function(e){var t;if(t=e<=2?e:4,this._uniformLocationPointer%t!=0){var i=this._uniformLocationPointer;this._uniformLocationPointer+=t-this._uniformLocationPointer%t;for(var n=this._uniformLocationPointer-i,r=0;r<n;r++)this._data.push(0)}},e$1C.prototype.addUniform=function(e,t,i){if(void 0===i&&(i=0),!this._noUBO&&void 0===this._uniformLocations[e]){var n;if(i>0){if(t instanceof Array)throw"addUniform should not be use with Array in UBO: "+e;if(this._fillAlignment(4),this._uniformArraySizes[e]={strideSize:t,arraySize:i},16==t)t*=i;else t=t*i+(4-t)*i;n=[];for(var r=0;r<t;r++)n.push(0)}else{if(t instanceof Array)t=(n=t).length;else{t=t,n=[];for(r=0;r<t;r++)n.push(0)}this._fillAlignment(t)}this._uniformSizes[e]=t,this._uniformLocations[e]=this._uniformLocationPointer,this._uniformLocationPointer+=t;for(r=0;r<t;r++)this._data.push(n[r]);this._needSync=!0}},e$1C.prototype.addMatrix=function(e,t){this.addUniform(e,Array.prototype.slice.call(t.toArray()))},e$1C.prototype.addFloat2=function(e,t,i){var n=[t,i];this.addUniform(e,n)},e$1C.prototype.addFloat3=function(e,t,i,n){var r=[t,i,n];this.addUniform(e,r)},e$1C.prototype.addColor3=function(e,t){var i=[t.r,t.g,t.b];this.addUniform(e,i)},e$1C.prototype.addColor4=function(e,t,i){var n=[t.r,t.g,t.b,i];this.addUniform(e,n)},e$1C.prototype.addVector3=function(e,t){var i=[t.x,t.y,t.z];this.addUniform(e,i)},e$1C.prototype.addMatrix3x3=function(e){this.addUniform(e,12)},e$1C.prototype.addMatrix2x2=function(e){this.addUniform(e,8)},e$1C.prototype.create=function(){this._noUBO||this._buffer||(this._fillAlignment(4),this._bufferData=new Float32Array(this._data),this._rebuild(),this._needSync=!0)},e$1C.prototype._rebuild=function(){this._noUBO||!this._bufferData||(this._buffer=this._engine.createUniformBuffer(this._bufferData))},Object.defineProperty(e$1C.prototype,"_numBuffers",{get:function(){return this._buffers.length},enumerable:!1,configurable:!0}),Object.defineProperty(e$1C.prototype,"_indexBuffer",{get:function(){return this._bufferIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e$1C.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),e$1C.prototype._buffersEqual=function(e,t){for(var i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0},e$1C.prototype._copyBuffer=function(e,t){for(var i=0;i<e.length;++i)t[i]=e[i]},e$1C.prototype.update=function(){if(!this._noUBO){if(this.bindUniformBuffer(),!this._buffer)return void this.create();if(!this._needSync)return void(this._createBufferOnWrite=!1);if(this._buffers&&this._buffers.length>1&&this._buffers[this._bufferIndex][1]){if(this._buffersEqual(this._bufferData,this._buffers[this._bufferIndex][1]))return this._needSync=!1,void(this._createBufferOnWrite=!1);this._copyBuffer(this._bufferData,this._buffers[this._bufferIndex][1])}this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._needSync=!1,this._createBufferOnWrite=!1}},e$1C.prototype._createNewBuffer=function(){this._bufferIndex+1<this._buffers.length?(this._bufferIndex++,this._buffer=this._buffers[this._bufferIndex][0],this._createBufferOnWrite=!1,this._needSync=!0):this._rebuild()},e$1C.prototype._checkNewFrame=function(){},e$1C.prototype.updateUniform=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0===n){if(this._buffer)return void _0x50f23a.Error("Cannot add an uniform after UBO has been created.");this.addUniform(e,i),n=this._uniformLocations[e]}this._buffer||this.create();for(var r=!1,o=0;o<i;o++)(16===i||this._bufferData[n+o]!==_0xd79dde.FloatRound(t[o]))&&(r=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[n+o]=t[o]);this._needSync=this._needSync||r},e$1C.prototype.updateUniformArray=function(e,t,i){this._checkNewFrame();var n=this._uniformLocations[e];if(void 0!==n){this._buffer||this.create();for(var r=this._uniformArraySizes[e],o=!1,a=0,s=0,l=0;l<i;l++)if(this._bufferData[n+4*s+a]!==_0xd79dde.FloatRound(t[l])&&(o=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[n+4*s+a]=t[l]),++a===r.strideSize){for(;a<4;a++)this._bufferData[n+4*s+a]=0;a=0,s++}this._needSync=this._needSync||o}else _0x50f23a.Error("Cannot add an uniform Array dynamically. Please, add it using addUniform.")},e$1C.prototype._cacheMatrix=function(e,t){this._checkNewFrame();var i=this._valueCache[e],n=t.updateFlag;return(void 0===i||i!==n)&&(this._valueCache[e]=n,!0)},e$1C.prototype._updateMatrix3x3ForUniform=function(e,t){for(var i=0;i<3;i++)e$1C._TempBuffer[4*i]=t[3*i],e$1C._TempBuffer[4*i+1]=t[3*i+1],e$1C._TempBuffer[4*i+2]=t[3*i+2],e$1C._TempBuffer[4*i+3]=0;this.updateUniform(e,e$1C._TempBuffer,12)},e$1C.prototype._updateMatrix3x3ForEffect=function(e,t){this._currentEffect.setMatrix3x3(e,t)},e$1C.prototype._updateMatrix2x2ForEffect=function(e,t){this._currentEffect.setMatrix2x2(e,t)},e$1C.prototype._updateMatrix2x2ForUniform=function(e,t){for(var i=0;i<2;i++)e$1C._TempBuffer[4*i]=t[2*i],e$1C._TempBuffer[4*i+1]=t[2*i+1],e$1C._TempBuffer[4*i+2]=0,e$1C._TempBuffer[4*i+3]=0;this.updateUniform(e,e$1C._TempBuffer,8)},e$1C.prototype._updateFloatForEffect=function(e,t){this._currentEffect.setFloat(e,t)},e$1C.prototype._updateFloatForUniform=function(e,t){e$1C._TempBuffer[0]=t,this.updateUniform(e,e$1C._TempBuffer,1)},e$1C.prototype._updateFloat2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setFloat2(e+n,t,i)},e$1C.prototype._updateFloat2ForUniform=function(e,t,i){e$1C._TempBuffer[0]=t,e$1C._TempBuffer[1]=i,this.updateUniform(e,e$1C._TempBuffer,2)},e$1C.prototype._updateFloat3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setFloat3(e+r,t,i,n)},e$1C.prototype._updateFloat3ForUniform=function(e,t,i,n){e$1C._TempBuffer[0]=t,e$1C._TempBuffer[1]=i,e$1C._TempBuffer[2]=n,this.updateUniform(e,e$1C._TempBuffer,3)},e$1C.prototype._updateFloat4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setFloat4(e+o,t,i,n,r)},e$1C.prototype._updateFloat4ForUniform=function(e,t,i,n,r){e$1C._TempBuffer[0]=t,e$1C._TempBuffer[1]=i,e$1C._TempBuffer[2]=n,e$1C._TempBuffer[3]=r,this.updateUniform(e,e$1C._TempBuffer,4)},e$1C.prototype._updateFloatArrayForEffect=function(e,t){this._currentEffect.setFloatArray(e,t)},e$1C.prototype._updateFloatArrayForUniform=function(e,t){this.updateUniformArray(e,t,t.length)},e$1C.prototype._updateArrayForEffect=function(e,t){this._currentEffect.setArray(e,t)},e$1C.prototype._updateArrayForUniform=function(e,t){this.updateUniformArray(e,t,t.length)},e$1C.prototype._updateIntArrayForEffect=function(e,t){this._currentEffect.setIntArray(e,t)},e$1C.prototype._updateIntArrayForUniform=function(e,t){e$1C._TempBufferInt32View.set(t),this.updateUniformArray(e,e$1C._TempBuffer,t.length)},e$1C.prototype._updateMatrixForEffect=function(e,t){this._currentEffect.setMatrix(e,t)},e$1C.prototype._updateMatrixForUniform=function(e,t){this._cacheMatrix(e,t)&&this.updateUniform(e,t.toArray(),16)},e$1C.prototype._updateMatricesForEffect=function(e,t){this._currentEffect.setMatrices(e,t)},e$1C.prototype._updateMatricesForUniform=function(e,t){this.updateUniform(e,t,t.length)},e$1C.prototype._updateVector3ForEffect=function(e,t){this._currentEffect.setVector3(e,t)},e$1C.prototype._updateVector3ForUniform=function(e,t){e$1C._TempBuffer[0]=t.x,e$1C._TempBuffer[1]=t.y,e$1C._TempBuffer[2]=t.z,this.updateUniform(e,e$1C._TempBuffer,3)},e$1C.prototype._updateVector4ForEffect=function(e,t){this._currentEffect.setVector4(e,t)},e$1C.prototype._updateVector4ForUniform=function(e,t){e$1C._TempBuffer[0]=t.x,e$1C._TempBuffer[1]=t.y,e$1C._TempBuffer[2]=t.z,e$1C._TempBuffer[3]=t.w,this.updateUniform(e,e$1C._TempBuffer,4)},e$1C.prototype._updateColor3ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setColor3(e+i,t)},e$1C.prototype._updateColor3ForUniform=function(e,t){e$1C._TempBuffer[0]=t.r,e$1C._TempBuffer[1]=t.g,e$1C._TempBuffer[2]=t.b,this.updateUniform(e,e$1C._TempBuffer,3)},e$1C.prototype._updateColor4ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setColor4(e+n,t,i)},e$1C.prototype._updateDirectColor4ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setDirectColor4(e+i,t)},e$1C.prototype._updateColor4ForUniform=function(e,t,i){e$1C._TempBuffer[0]=t.red,e$1C._TempBuffer[1]=t.green,e$1C._TempBuffer[2]=t.blue,e$1C._TempBuffer[3]=i,this.updateUniform(e,e$1C._TempBuffer,4)},e$1C.prototype._updateDirectColor4ForUniform=function(e,t){e$1C._TempBuffer[0]=t.red,e$1C._TempBuffer[1]=t.green,e$1C._TempBuffer[2]=t.blue,e$1C._TempBuffer[3]=t.alpha,this.updateUniform(e,e$1C._TempBuffer,4)},e$1C.prototype._updateIntForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setInt(e+i,t)},e$1C.prototype._updateIntForUniform=function(e,t){e$1C._TempBufferInt32View[0]=t,this.updateUniform(e,e$1C._TempBuffer,1)},e$1C.prototype._updateInt2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setInt2(e+n,t,i)},e$1C.prototype._updateInt2ForUniform=function(e,t,i){e$1C._TempBufferInt32View[0]=t,e$1C._TempBufferInt32View[1]=i,this.updateUniform(e,e$1C._TempBuffer,2)},e$1C.prototype._updateInt3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setInt3(e+r,t,i,n)},e$1C.prototype._updateInt3ForUniform=function(e,t,i,n){e$1C._TempBufferInt32View[0]=t,e$1C._TempBufferInt32View[1]=i,e$1C._TempBufferInt32View[2]=n,this.updateUniform(e,e$1C._TempBuffer,3)},e$1C.prototype._updateInt4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setInt4(e+o,t,i,n,r)},e$1C.prototype._updateInt4ForUniform=function(e,t,i,n,r){e$1C._TempBufferInt32View[0]=t,e$1C._TempBufferInt32View[1]=i,e$1C._TempBufferInt32View[2]=n,e$1C._TempBufferInt32View[3]=r,this.updateUniform(e,e$1C._TempBuffer,4)},e$1C.prototype.setTexture=function(e,t){this._currentEffect.setTexture(e,t)},e$1C.prototype.updateUniformDirectly=function(e,t){this.updateUniform(e,t,t.length),this.update()},e$1C.prototype.bindToEffect=function(e,t){this._currentEffect=e,this._currentEffectName=t},e$1C.prototype.bindUniformBuffer=function(){!this._noUBO&&this._buffer&&this._currentEffect&&this._currentEffect.bindUniformBuffer(this._buffer,this._currentEffectName)},e$1C.prototype.unbindEffect=function(){this._currentEffect=void 0,this._currentEffectName=void 0},e$1C.prototype.setDataBuffer=function(e){if(!this._buffers)return this._buffer===e;for(var t=0;t<this._buffers.length;++t){if(this._buffers[t][0]===e)return this._bufferIndex=t,this._buffer=e,this._createBufferOnWrite=!1,this._currentEffect=void 0,!0}return!1},e$1C.prototype.dispose=function(){if(!this._noUBO){var e=this._engine._uniformBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)}},e$1C._UpdatedUbosInFrame={},e$1C._MAX_UNIFORM_SIZE=256,e$1C._TempBuffer=new Float32Array(e$1C._MAX_UNIFORM_SIZE),e$1C._TempBufferInt32View=new Uint32Array(e$1C._TempBuffer.buffer);var _0x1153cf=(_0x30a060=!0,function(e,t){var i=_0x30a060?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30a060=!1,i}),_0x43ec15=_0x1153cf(void 0,(function(){return _0x43ec15.toString().search("(((.+)+)+)+$").toString().constructor(_0x43ec15).search("(((.+)+)+)+$")})),_0x30a060;_0x43ec15();const _0x1a3179="shadowMap_texture",_0x1db7f3="shadowMap_textureCube",_0xcffe67="u_shadowDepth";function _0x32f9aa(e,t){var i=_0x37a515.call(this)||this;i._name=_0x2e0417.SHADOW,i._shadowMap=e,i._shadowMapTexture=void 0,i._shadowMapTextureCube=void 0,i._shadowMapDepthTexture=void 0,this._initUniformMap(t)}_0x37a515&&(_0x32f9aa.__proto__=_0x37a515),_0x32f9aa.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x32f9aa.prototype.constructor=_0x37a515,Object.defineProperties(_0x32f9aa.prototype,{}),_0x32f9aa.prototype._initUBOStruct=function(){this._ubo.addUniform("shadowMap_matrix",16),this._ubo.addUniform("shadowMap_texelSizeDepthBiasAndNormalShadingSmooth",4),this._ubo.addUniform("shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness",4),this._ubo.addUniform("shadowMap_cascadeMatrices",4,16),this._ubo.addUniform("shadowMap_cascadeSplits",4,2),this._ubo.addUniform("shadowMap_lightPositionEC",4),this._ubo.addUniform("shadowMap_lightDirectionEC",3),this._ubo.addUniform("shadowMap_penumbraRatio",1)},_0x32f9aa.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())};var _0x1d4426=new Float32Array(16),_0x5dbab2=new Matrix;_0x32f9aa.prototype.update=function(e){!e.webgpu&&!e.webgl2||(e$2e(this._ubo)||this._initUBO(e),this._updateUniforms(),this._updateTextures(),this._isValueDirty=!1)},_0x32f9aa.prototype._updateTextures=function(){var e=this._shadowMap;e._isPointLight?this._shadowMapTextureCube=e._shadowMapTexture:this._shadowMapTexture=e._shadowMapTexture,this._shadowMapDepthTexture=e._shadowMapDepthTexture},_0x32f9aa.prototype._updateUniforms=function(){var e=this._shadowMap;p$1d.toArray(e._shadowMapMatrix,_0x1d4426),Matrix.FromArrayToRef(_0x1d4426,0,_0x5dbab2),this._ubo.updateMatrix("shadowMap_matrix",_0x5dbab2);var t=[];e$2c.pack(e._cascadeSplits[0],t,0),e$2c.pack(e._cascadeSplits[1],t,4),this._ubo.updateFloatArray("shadowMap_cascadeSplits",t),t=[],p$1d.pack(e._cascadeMatrices[0],t,0),p$1d.pack(e._cascadeMatrices[1],t,16),p$1d.pack(e._cascadeMatrices[2],t,32),p$1d.pack(e._cascadeMatrices[3],t,48),this._ubo.updateFloatArray("shadowMap_cascadeMatrices",t),this._ubo.updateFloat3("shadowMap_lightDirectionEC",e._lightDirectionEC.x,e._lightDirectionEC.y,e._lightDirectionEC.z),this._ubo.updateFloat4("shadowMap_lightPositionEC",e._lightPositionEC.x,e._lightPositionEC.y,e._lightPositionEC.z,e._lightPositionEC.w);var i=e._primitiveBias,n=1/e._textureSize.x,r=1/e._textureSize.y;this._ubo.updateFloat4("shadowMap_texelSizeDepthBiasAndNormalShadingSmooth",n,r,i.depthBias,i.normalShadingSmooth),this._ubo.updateFloat4("shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness",i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness),this._ubo.updateFloat("shadowMap_penumbraRatio",e._pcssPenumbraRatio),this._ubo.update()},_0x32f9aa.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),this._setTextureToEffect(e,this._shadowMapTexture,_0x1a3179),this._setTextureToEffect(e,this._shadowMapTextureCube,_0x1db7f3),this._setTextureToEffect(e,this._shadowMapDepthTexture,_0xcffe67)},_0x32f9aa.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}};var _0x3c6e46=new e$2c,_0x554215=new e$2c,_0x20b6e1=new o$1o;function C$Z(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context;if(!e$2e(t))throw new t$15("context is required.");if(!e$2e(e.lightCamera))throw new t$15("lightCamera is required.");if(e$2e(e.numberOfCascades)&&1!==e.numberOfCascades&&4!==e.numberOfCascades)throw new t$15("Only one or four cascades are supported.");this._enabled=u$Z(e.enabled,!0),this._softShadows=u$Z(e.softShadows,!0),this._pcss=u$Z(e.pcss,!0),this._quality=u$Z(e.shadowQuality,0),this._normalOffset=u$Z(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=u$Z(e.fromLightSource,!0),this.darkness=u$Z(e.darkness,.5),this._darkness=this.darkness,this.maximumDistance=u$Z(e.maximumDistance,1e3),this.minimumDistance=void 0,this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;var i,n=!0;(s$Z.isInternetExplorer()||s$Z.isEdge()||(s$Z.isChrome()||s$Z.isFirefox())&&s$Z.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n,this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new p$1d,this._shadowMapTexture=void 0,this._lightDirectionEC=new o$1p,this._lightPositionEC=new e$2c,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new $$S,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new i$1d,this._isPointLight=u$Z(e.isPointLight,!1),this._pointLightRadius=u$Z(e.pointLightRadius,100),this._cascadesEnabled=!this._isPointLight&&u$Z(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?u$Z(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[5,50,500,Number.MAX_VALUE],this._textureSize=new o$1o,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new l$11:e$2e(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new e$2c,new e$2c],this._cascadeMatrices=[new p$1d,new p$1d,new p$1d,new p$1d],this._cascadeDistances=new e$2c,this._cascadeUVRange=[new e$2c,new e$2c,new e$2c,new e$2c],i=this._isPointLight?6:this._cascadesEnabled?this._numberOfCascades:1,this._passes=new Array(i);for(var r=0;r<i;++r)this._passes[r]=new et$f(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._webgpu=t.webgpu,this._usesDepthTexture=t.depthTexture&&!this._webgpu,this._isPointLight&&(this._usesDepthTexture=!1),t.webgl2,this._pcss?(this._lambda=.5,this.darkness=.2,this._darkness=this.darkness):this._lambda=.9,this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,ne$F(this),this._clearCommand=new t$W({depth:1,color:new e$1X}),this._clearPassState=new n$$(t),this._size=u$Z(e.size,2048),this.size=this._size,this._pcssPenumbraRatio=.1,this._ubo=new _0x32f9aa(this,t)}function et$f(e){this.camera=new $$S,this.passState=new n$$(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0,this.uvRange=new e$2c}function ie$C(e,t){return d$1m.fromCache({cull:{enabled:!0,face:G$1a.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function ne$F(e){var t=!e._usesDepthTexture||e._pcss;e._primitiveRenderState=ie$C(t,e._primitiveBias),e._terrainRenderState=ie$C(t,e._terrainBias),e._pointRenderState=ie$C(t,e._pointBias)}function ae$w(e){for(var t=e._passes.length,i=0;i<t;++i){var n=e._passes[i],r=n.framebuffer;e$2e(r)&&!r.isDestroyed()&&r.destroy(),n.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function X$S(e,t){return new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:e?tt$i.LINEAR:tt$i.NEAREST,magnificationFilter:e?rt$k.LINEAR:rt$k.NEAREST,comparisonFunction:t?de$y.LESS:void 0})}function tt$f(e,t){for(var i=new t$U({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$12.DEPTH_COMPONENT,pixelDatatype:_$_.UNSIGNED_SHORT}),n=new t$U({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:X$S(!0)}),r=new t$V({context:t,depthTexture:i,colorTextures:[n],destroyAttachments:!1}),o=e._passes.length,a=0;a<o;++a){var s=e._passes[a];s.framebuffer=r,s.passState.framebuffer=r}e._shadowMapTexture=n,e._depthAttachment=i,e._colorAttachment=n}function rt$h(e,t){for(var i=new t$U({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8,sampler:X$S()}),n=new t$V({context:t,depthStencilTexture:i,destroyAttachments:!1}),r=e._passes.length,o=0;o<r;++o){var a=e._passes[o];a.framebuffer=n,a.passState.framebuffer=n}e._shadowMapTexture=i,e._depthAttachment=i}function it$b(e,t){for(var i=new t$U({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:X$S(!1)}),n=new t$U({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:t.webgpu?V$12.DEPTH_COMPONENT32F:V$12.DEPTH_COMPONENT,pixelDatatype:_$_.FLOAT,sampler:X$S(!0,!0)}),r=new t$V({context:t,colorTextures:[i],depthTexture:n,destroyAttachments:!1}),o=e._passes.length,a=0;a<o;++a){var s=e._passes[a];s.framebuffer=r,s.passState.framebuffer=r}e._shadowMapDepthTexture=n,e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function nt$c(e,t){for(var i=new t$U({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$12.DEPTH_COMPONENT16,pixelDatatype:_$_.UNSIGNED_SHORT}),n=new e$1P({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:X$S(!0)}),r=[n.negativeX,n.negativeY,n.negativeZ,n.positiveX,n.positiveY,n.positiveZ],o=0;o<6;++o){var a=new t$V({context:t,depthTexture:i,colorTextures:[r[o]],destroyAttachments:!1}),s=e._passes[o];s.framebuffer=a,s.passState.framebuffer=a}e._shadowMapTexture=n,e._depthAttachment=depthRenderbuffer,e._colorAttachment=n}function we$j(e,t){e._isPointLight?nt$c(e,t):e._pcss?it$b(e,t):e._usesDepthTexture?rt$h(e,t):tt$f(e,t)}function at$d(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==de$y.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,ne$F(e),ae$w(e),we$j(e,t))}function st$8(e,t){(!e$2e(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(ae$w(e),we$j(e,t),at$d(e,t),Ee$n(e,t))}function Ee$n(e,t,i){i=u$Z(i,0),(e._isPointLight||0===i)&&(e._clearCommand.framebuffer=e._passes[i].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function ut$b(e,t){e._size=t;var i=e._passes,n=i.length,r=e._textureSize;if(e._isPointLight){t=e$1W.maximumCubeMapSize>=t?t:e$1W.maximumCubeMapSize,r.x=t,r.y=t;var o=new f$1a(0,0,t,t);i[0].passState.viewport=o,i[1].passState.viewport=o,i[2].passState.viewport=o,i[3].passState.viewport=o,i[4].passState.viewport=o,i[5].passState.viewport=o}else 1===n?(t=e$1W.maximumTextureSize>=t?t:e$1W.maximumTextureSize,r.x=t,r.y=t,i[0].passState.viewport=new f$1a(0,0,t,t)):4===n&&(t=e$1W.maximumTextureSize>=2*t?t:e$1W.maximumTextureSize/2,r.x=2*t,r.y=2*t,i[0].passState.viewport=new f$1a(0,0,t,t),i[1].passState.viewport=new f$1a(t,0,t,t),i[2].passState.viewport=new f$1a(0,t,t,t),i[3].passState.viewport=new f$1a(t,t,t,t));e._clearPassState.viewport=new f$1a(0,0,r.x,r.y);for(var a=0;a<n;++a){var s=i[a],l=s.passState.viewport,u=l.x/r.x,c=l.y/r.y,h=l.width/r.x,d=l.height/r.y;s.textureOffsets=new p$1d(h,0,0,u,0,d,0,c,0,0,1,0,0,0,0,1),s.uvRange.x=u,s.uvRange.y=u+.5,s.uvRange.z=c,s.uvRange.w=c+.5}}_0x32f9aa.prototype._initUniformMap=function(e){var t=this._shadowMap,i={};if(!e.webgl2&&!e.webgpu){var n=t._isPointLight?t._pointBias:t._primitiveBias;i.shadowMap_matrix=function(){return t._shadowMapMatrix},i.shadowMap_cascadeSplits=function(){return t._cascadeSplits},i.shadowMap_cascadeMatrices=function(){return t._cascadeMatrices},i.shadowMap_cascadeUVRange=function(){return t._cascadeUVRange},i.shadowMap_lightDirectionEC=function(){return t._lightDirectionEC},i.shadowMap_lightPositionEC=function(){return t._lightPositionEC},i.shadowMap_cascadeDistances=function(){return t._cascadeDistances},i.shadowMap_texelSizeDepthBiasAndNormalShadingSmooth=function(){var e=_0x20b6e1;return e.x=1/t._textureSize.x,e.y=1/t._textureSize.y,e$2c.fromElements(e.x,e.y,n.depthBias,n.normalShadingSmooth,_0x3c6e46)},i.shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness=function(){return e$2c.fromElements(n.normalOffsetScale,t._distance,t.maximumDistance,t._darkness,_0x554215)},i.shadowMap_penumbraRatio=function(){return t._pcssPenumbraRatio}}i.shadowMap_texture=function(){return t._shadowMapTexture},i.shadowMap_textureCube=function(){return t._shadowMapTexture},i.u_shadowDepth=function(){return t._shadowMapDepthTexture},this._uniformMap=i},_0x32f9aa.prototype.isDestroyed=function(){return!1},_0x32f9aa.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)},C$Z.MAXIMUM_DISTANCE=2e4,C$Z.NEAR_PLANE=1,C$Z.UPDATE_CASCADE_TOLERANCE_DISTANCE=1,C$Z.prototype.debugCreateRenderStates=function(){ne$F(this)},Object.defineProperties(C$Z.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){ut$b(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}},penumbraRatio:{get:function(){return this._pcssPenumbraRatio},set:function(e){this._pcssPenumbraRatio=e}}});var ot$a=new f$1a;function mt$6(e,t){var i;i=e._isPointLight?"uniform samplerCube shadowMap_textureCube; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n vec2 uv = v_textureCoordinates; \n vec3 dir; \n \n if (uv.y < 0.5) \n { \n if (uv.x < 0.333) \n { \n dir.x = -1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = -1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else \n { \n dir.z = -1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 1.0; \n } \n } \n else \n { \n if (uv.x < 0.333) \n { \n dir.x = 1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = 1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else \n { \n dir.z = 1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 3.0; \n } \n } \n \n float shadow = czm_unpackDepth(textureCube(shadowMap_textureCube, dir)); \n gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n":"uniform sampler2D shadowMap_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n"+(e._usesDepthTexture?" float shadow = texture2D(shadowMap_texture, v_textureCoordinates).r; \n":" float shadow = czm_unpackDepth(texture2D(shadowMap_texture, v_textureCoordinates)); \n")+" gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n";var n=t.createViewportQuadCommand(i,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return n.pass=Le$q.OVERLAY,n}function ft$9(e,t){var i=t.context,n=t.context.drawingBufferWidth,r=t.context.drawingBufferHeight,o=.3*Math.min(n,r),a=ot$a;a.x=n-o,a.y=0,a.width=o,a.height=o;var s=e._debugShadowViewCommand;e$2e(s)||(s=mt$6(e,i),e._debugShadowViewCommand=s),(!e$2e(s.renderState)||!f$1a.equals(s.renderState.viewport,a))&&(s.renderState=d$1m.fromCache({viewport:f$1a.clone(a)})),t.commandList.push(e._debugShadowViewCommand)}var A$12=new Array(8);A$12[0]=new e$2c(-1,-1,-1,1),A$12[1]=new e$2c(1,-1,-1,1),A$12[2]=new e$2c(1,1,-1,1),A$12[3]=new e$2c(-1,1,-1,1),A$12[4]=new e$2c(-1,-1,1,1),A$12[5]=new e$2c(1,-1,1,1),A$12[6]=new e$2c(1,1,1,1),A$12[7]=new e$2c(-1,1,1,1);for(var N$R=new p$1d,se$y=new Array(8),ue$A=0;ue$A<8;++ue$A)se$y[ue$A]=new e$2c;function ct$a(e,t){return new y$R({geometryInstances:[new d$1o({geometry:new o$17({minimum:new o$1p(-.5,-.5,-.5),maximum:new o$1p(.5,.5,.5)}),attributes:{color:o$16.fromColor(t)}}),new d$1o({geometry:new a$U({radius:.5}),attributes:{color:o$16.fromColor(t)}})],appearance:new t$Q({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var ht$9=[e$1X.RED,e$1X.GREEN,e$1X.BLUE,e$1X.MAGENTA],_t$8=new o$1p;function lt$5(e,t){ft$9(e,t);var i=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(i&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new p$V({camera:e._sceneCamera,color:e$1X.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){i&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new p$V({camera:e._shadowMapCamera,color:e$1X.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t);for(var n=0;n<e._numberOfCascades;++n)i&&(e._debugCascadeFrustums[n]=e._debugCascadeFrustums[n]&&e._debugCascadeFrustums[n].destroy(),e._debugCascadeFrustums[n]=new p$V({camera:e._passes[n].camera,color:ht$9[n],updateOnChange:!1})),e._debugCascadeFrustums[n].update(t)}}else if(e._isPointLight){if(!e$2e(e._debugLightFrustum)||e._needsUpdate){var r=e._shadowMapCamera.positionWC,o=n$15.IDENTITY,a=2*e._pointLightRadius,s=o$1p.fromElements(a,a,a,_t$8),l=p$1d.fromTranslationQuaternionRotationScale(r,o,s,N$R);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=ct$a(l,e$1X.YELLOW)}e._debugLightFrustum.update(t)}else(!e$2e(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new p$V({camera:e._shadowMapCamera,color:e$1X.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function $$S(){this.viewMatrix=new p$1d,this.inverseViewMatrix=new p$1d,this.frustum=void 0,this.positionCartographic=new a$18,this.positionWC=new o$1p,this.directionWC=o$1p.clone(o$1p.UNIT_Z),this.upWC=o$1p.clone(o$1p.UNIT_Y),this.rightWC=o$1p.clone(o$1p.UNIT_X),this.viewProjectionMatrix=new p$1d}$$S.prototype.clone=function(e){p$1d.clone(e.viewMatrix,this.viewMatrix),p$1d.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),a$18.clone(e.positionCartographic,this.positionCartographic),o$1p.clone(e.positionWC,this.positionWC),o$1p.clone(e.directionWC,this.directionWC),o$1p.clone(e.upWC,this.upWC),o$1p.clone(e.rightWC,this.rightWC)};var dt$a=new p$1d(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);$$S.prototype.getViewProjection=function(){var e=this.viewMatrix,t=this.frustum.projectionMatrix;return p$1d.multiply(t,e,this.viewProjectionMatrix),p$1d.multiply(dt$a,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var vt$a=new Array(5),gt$7=new Array(4),Ct$7=new Array(4),pt$a=new o$15,xt$8=new Array(4),Oe$m=new o$1p,Fe$k=new o$1p;function St$6(e,t){var i,n=e._shadowMapCamera,r=e._sceneCamera,o=r.frustum.near,a=r.frustum.far,s=e._numberOfCascades,l=a-o,u=a/o,c=e._lambda,h=!1;t.shadowState.closestObjectSize<200&&(h=!0,c=.95);var d=xt$8,f=vt$a;for(f[0]=o,f[s]=a,i=0;i<s;++i){var p=(i+1)/s,_=o*Math.pow(u,p),m=o+l*p,g=e$2d.lerp(m,_,c);f[i+1]=g,d[i]=g-f[i]}if(h){for(i=0;i<s;++i)d[i]=Math.min(d[i],e._maximumCascadeDistances[i]);var x=f[0];for(i=0;i<s-1;++i)x+=d[i],f[i+1]=x}var y=gt$7,v=Ct$7;for(i=0;i<s;++i)y[i]=f[i],v[i]=f[i+1],0==i?v[i]+=C$Z.UPDATE_CASCADE_TOLERANCE_DISTANCE:(y[i]-=C$Z.UPDATE_CASCADE_TOLERANCE_DISTANCE,v[i]+=2*C$Z.UPDATE_CASCADE_TOLERANCE_DISTANCE);e$2c.unpack(y,0,e._cascadeSplits[0]),e$2c.unpack(v,0,e._cascadeSplits[1]),e$2c.unpack(d,0,e._cascadeDistances);var $=n.frustum,b=$.left,T=$.right,C=$.bottom,S=$.top,w=$.near,E=$.far,P=n.positionWC,A=n.directionWC,L=n.upWC,M=r.frustum.clone(pt$a),R=n.getViewProjection();for(i=0;i<s;++i){M.near=y[i],M.far=v[i];for(var O=p$1d.multiply(M.projectionMatrix,r.viewMatrix,N$R),D=p$1d.inverse(O,N$R),I=p$1d.multiply(R,D,N$R),B=o$1p.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Oe$m),F=o$1p.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,Fe$k),N=0;N<8;++N){var G=e$2c.clone(A$12[N],se$y[N]);p$1d.multiplyByVector(I,G,G),o$1p.divideByScalar(G,G.w,G),o$1p.minimumByComponent(G,B,B),o$1p.maximumByComponent(G,F,F)}B.x=Math.max(B.x,0),B.y=Math.max(B.y,0),B.z=0,F.x=Math.min(F.x,1),F.y=Math.min(F.y,1),F.z=Math.min(F.z,1);var z=e._passes[i],U=z.camera;U.clone(n);var V=U.frustum;V.left=b+B.x*(T-b),V.right=b+F.x*(T-b),V.bottom=C+B.y*(S-C),V.top=C+F.y*(S-C),V.near=w+B.z*(E-w),V.far=w+F.z*(E-w),z.cullingVolume=U.frustum.computeCullingVolume(P,A,L)}}function bt$8(e){var t,i=e._sceneCamera,n=e._numberOfCascades;for(t=0;t<n;++t){var r=e._passes[t],o=r.camera,a=e._cascadeMatrices[t];p$1d.multiply(o.getViewProjection(),i.inverseViewMatrix,a),p$1d.multiply(r.textureOffsets,a,a),e$2c.clone(r.uvRange,e._cascadeUVRange[t])}}var yt$8=new p$1d,wt$8=new o$1p,Et$9=new o$1p,Te$n=new o$1p;function Ot$9(e,t){var i=e._shadowMapCamera,n=e._sceneCamera,r=p$1d.multiply(n.frustum.projectionMatrix,n.viewMatrix,N$R),o=p$1d.inverse(r,N$R),a=i.directionWC,s=n.directionWC,l=o$1p.cross(a,s,wt$8);s=o$1p.cross(l,a,Et$9),o$1p.normalize(s,s),o$1p.normalize(l,l);for(var u=o$1p.fromElements(0,0,0,Te$n),c=p$1d.computeView(u,a,s,l,yt$8),h=p$1d.multiply(c,o,N$R),d=o$1p.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Oe$m),f=o$1p.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,Fe$k),p=0;p<8;++p){var _=e$2c.clone(A$12[p],se$y[p]);p$1d.multiplyByVector(h,_,_),o$1p.divideByScalar(_,_.w,_),o$1p.minimumByComponent(_,d,d),o$1p.maximumByComponent(_,f,f)}f.z+=1e3,d.z-=10;var m=Te$n;m.x=-.5*(d.x+f.x),m.y=-.5*(d.y+f.y),m.z=-f.z;var g=p$1d.fromTranslation(m,N$R);c=p$1d.multiply(g,c,c);var x=.5*(f.x-d.x),y=.5*(f.y-d.y),v=f.z-d.z,$=i.frustum;$.left=-x,$.right=x,$.bottom=-y,$.top=y,$.near=e._webgpu?.01:-v,$.far=v,p$1d.clone(c,i.viewMatrix),p$1d.inverse(c,i.inverseViewMatrix),p$1d.getTranslation(i.inverseViewMatrix,i.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(i.positionWC,i.positionCartographic),o$1p.clone(a,i.directionWC),o$1p.clone(s,i.upWC),o$1p.clone(l,i.rightWC)}var Ft$7=[new o$1p(-1,0,0),new o$1p(0,-1,0),new o$1p(0,0,-1),new o$1p(1,0,0),new o$1p(0,1,0),new o$1p(0,0,1)],Tt$a=[new o$1p(0,-1,0),new o$1p(0,0,-1),new o$1p(0,-1,0),new o$1p(0,-1,0),new o$1p(0,0,1),new o$1p(0,-1,0)],At$7=[new o$1p(0,0,1),new o$1p(1,0,0),new o$1p(-1,0,0),new o$1p(0,0,-1),new o$1p(1,0,0),new o$1p(1,0,0)];function Pt$6(e,t){var i=new o$15;i.fov=e$2d.PI_OVER_TWO,i.near=1,i.far=e._pointLightRadius,i.aspectRatio=1;for(var n=0;n<6;++n){var r=e._passes[n].camera;r.positionWC=e._shadowMapCamera.positionWC,r.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(r.positionWC,r.positionCartographic),r.directionWC=Ft$7[n],r.upWC=Tt$a[n],r.rightWC=At$7[n],p$1d.computeView(r.positionWC,r.directionWC,r.upWC,r.rightWC,r.viewMatrix),p$1d.inverse(r.viewMatrix,r.inverseViewMatrix),r.frustum=i}}var Dt$9=new o$1p,Lt$7=new o$1p,Ae$r=new i$1d,Pe$j=Ae$r.center;function Vt$8(e,t){var i=e._sceneCamera,n=e._shadowMapCamera,r=Ae$r;if(e._cascadesEnabled){if(i.frustum.near>=e.maximumDistance)return e._outOfView=!0,void(e._needsUpdate=!1);var o=t.mapProjection.ellipsoid.geodeticSurfaceNormal(i.positionWC,Dt$9),a=o$1p.negate(n.directionWC,Lt$7),s=o$1p.dot(o,a),l=e$2d.clamp(s/.1,0,1);if(e._darkness=e$2d.lerp(1,e.darkness,l),s<0)return e._outOfView=!0,void(e._needsUpdate=!1);e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)r.center=n.positionWC,r.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(r)===Ae$w.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),i$1d.clone(r,e._boundingSphere);else{var u=n.frustum.far/2,c=o$1p.add(n.positionWC,o$1p.multiplyByScalar(n.directionWC,u,Pe$j),Pe$j);r.center=c,r.radius=u,e._outOfView=t.cullingVolume.computeVisibility(r)===Ae$w.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),i$1d.clone(r,e._boundingSphere)}}function Nt$8(e,t){var i=t.camera,n=e._lightCamera,r=e._sceneCamera,o=e._shadowMapCamera;e._cascadesEnabled?o$1p.clone(n.directionWC,o.directionWC):e._isPointLight?o$1p.clone(n.positionWC,o.positionWC):o.clone(n);var a,s,l=e._lightDirectionEC;p$1d.multiplyByPointAsVector(i.viewMatrix,o.directionWC,l),o$1p.normalize(l,l),o$1p.negate(l,l),p$1d.multiplyByPoint(i.viewMatrix,o.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius,e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),s=Math.min(t.shadowState.farPlane,e.maximumDistance+1),s=Math.max(s,a+1)):(a=i.frustum.near,s=e.maximumDistance),e._sceneCamera=v$K.clone(i,r),i.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=s,e._distance=s-a,Vt$8(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}function Rt$9(e,t,i,n,r,o){var a,s,l;if(e$2e(o)&&(a=o.shaderProgram,s=o.renderState,l=o.uniformMap),(o=i$$.shallowClone(i,o)).castShadows=!0,o.receiveShadows=!1,!e$2e(a)||r!==i.shaderProgram.id||t){var u=i.shaderProgram,c=i.pass===Le$q.GLOBE,h=i.pass!==Le$q.TRANSLUCENT,d=e._isPointLight,f=e._usesDepthTexture,p=i.selectCastShadows,_=g$12.getShadowCastShaderKeyword(d,c,f,h);if(!e$2e(a=n.shaderCache.getDerivedShaderProgram(u,_))){var m=u.vertexShaderSource,g=u.fragmentShaderSource,x=g$12.createShadowCastVertexShader(m,d,c),y=g$12.createShadowCastFragmentShader(g,d,f,h,o,p);a=n.shaderCache.createDerivedShaderProgram(u,_,{vertexShaderSource:x,fragmentShaderSource:y,attributeLocations:u._attributeLocations})}s=e._primitiveRenderState,d?s=e._pointRenderState:c&&(s=e._terrainRenderState),i.renderState.cull.enabled||((s=l$1f(s,!1)).cull=l$1f(s.cull,!1),s.cull.enabled=!1,s=d$1m.fromCache(s)),l=i.uniformMap}return o.shaderProgram=a,o.renderState=s,o.uniformMap=l,o}C$Z.prototype.update=function(e){if(Nt$8(this,e),this._needsUpdate)if(st$8(this,e.context),this._isPointLight&&Pt$6(this,e),this._cascadesEnabled&&(Ot$9(this,e),this._numberOfCascades>1&&St$6(this,e),this._numberOfCascades>1&&bt$8(this)),this._isPointLight)this._shadowMapCullingVolume=i$X.fromBoundingSphere(this._boundingSphere);else{var t=this._shadowMapCamera,i=t.positionWC,n=t.directionWC,r=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(i,n,r),1===this._passes.length&&this._passes[0].camera.clone(t)}if(1===this._passes.length){var o=this._sceneCamera.inverseViewMatrix;p$1d.multiply(this._shadowMapCamera.getViewProjection(),o,this._shadowMapMatrix)}this.debugShow&<$5(this,e),this._ubo.update(e.context)},C$Z.prototype.updatePass=function(e,t){Ee$n(this,e,t)},C$Z.createReceiveDerivedCommand=function(e,t,i,n,r){e$2e(r)||(r={});var o=e.length>0,a=t.shaderProgram,s=a.vertexShaderSource,l=a.fragmentShaderSource,u=t.pass===Le$q.GLOBE,c=t.pass===Le$q.S3MTiles,h=!1;if(u&&(h=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&o){var d,f;e$2e(r.receiveCommand)&&(d=r.receiveCommand.shaderProgram,f=r.receiveCommand.uniformMap);var p=!1;e$2e(r.receiveCommand)||(p=!0),r.receiveCommand=i$$.shallowClone(t,r.receiveCommand),r.castShadows=!1,r.receiveShadows=!0,p&&r.receiveCommand.addUniformBuffer(e[0]._ubo);var _=r.receiveShaderCastShadows!==t.castShadows,m=r.receiveShaderProgramId!==t.shaderProgram.id;if(!e$2e(d)||m||i||_){var g=g$12.getShadowReceiveShaderKeyword(e[0],t.castShadows,u,h);if(!e$2e(d=n.shaderCache.getDerivedShaderProgram(a,g))){var x=g$12.createShadowReceiveVertexShader(s,u,h),y=g$12.createShadowReceiveFragmentShader(l,e[0],t.castShadows,u,h,c);d=n.shaderCache.createDerivedShaderProgram(a,g,{vertexShaderSource:x,fragmentShaderSource:y,attributeLocations:a._attributeLocations})}f=e[0]._ubo._uniformMap?p$19(t.uniformMap,e[0]._ubo._uniformMap,!1):t.uniformMap}r.receiveCommand.shaderProgram=d,r.receiveCommand._uniformMap=f,r.receiveShaderProgramId=t.shaderProgram.id,r.receiveShaderCastShadows=t.castShadows}return r},C$Z.createCastDerivedCommand=function(e,t,i,n,r){if(e$2e(r)||(r={}),t.castShadows){var o=r.castCommands;e$2e(o)||(o=r.castCommands=[]);var a=r.castShaderProgramId,s=e.length;o.length=s;for(var l=0;l<s;++l)o[l]=Rt$9(e[l],i,t,n,a,o[l]);r.castShaderProgramId=t.shaderProgram.id}return r},C$Z.prototype.isDestroyed=function(){return!1},C$Z.prototype.destroy=function(){ae$w(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(var e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return i$11(this)};var _0x3dbd66=(_0x38dbd3=!0,function(e,t){var i=_0x38dbd3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38dbd3=!1,i}),_0x5ab207=_0x3dbd66(void 0,(function(){return _0x5ab207.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ab207).search("(((.+)+)+)+$")})),_0x38dbd3;_0x5ab207();var _0x352a7a=new i$W("computeShadowRatio");function _0x19393b(e){if(!e$2e(e))throw new t$15("scene are required.");if(!e.context.depthTexture)throw new t$15("the depth buffer is not supported.");this._scene=e,this._depthBuffer=void 0,this._globalDepthBuffer=void 0,this._frameState=void 0,this._qureyRegion=[],this._bottom=0,this._extend=0,this._arrPointCommand=[],this._arrRasterPointCommand=[],this._boundingSphere=new i$1d,this._bounds=[],this._worldMatrix=p$1d.IDENTITY.clone(),this._spacing=10,this._arrRasterTexture=[],this._arrAssisTexture=[],this._startTime=a$15.now(),this._endTime=a$15.now(),this._currentTime=0,this._timeInterval=1,this._timeUpdate=!1,this._update=!1,this._id=0,this._name="",this._sceneName="",this._checking=!1,this._visibleViewport=4095,this._points=[],this._queryPointsEvent=new o$1h,this._enuPoints=[],this._shadowMapParams={oriMaxDis:100,oriSize:128,analysisSize:Math.min(8192,e$1W.maximumTextureSize)},this.shadowMap=new C$Z({context:this._scene.context,lightCamera:this._scene._sunCamera,enabled:!0,maximumDistance:this._shadowMapParams.oriMaxDis,size:this._shadowMapParams.oriSize,pcss:!1,softShadows:!1}),this._shadowMapMaxDistance=this._shadowMapParams.oriMaxDis,this._isPointsVisible=!0,this._colorTable=void 0,this._hypsometricTexture=void 0,this._voxelData={},this._volDirty=!1}function _0x8baec9(e,t){var i=!1,n=t.split(" ");if(n.length>1){var r=n[0],o=n[1];for(var a in e.defines)if(-1!==e.defines[a].indexOf(r))return void(e.defines[a]=r+" "+o);e.defines.push(t)}else{for(var a in e.defines)if(e.defines[a]===t){i=!0;break}i||e.defines.push(t)}}function _0x353320(e,t,i){if(e$2e(t)){var n=t.shaderProgram.fragmentShaderSource,r=t.shaderProgram.vertexShaderSource;_0x8baec9(n,i);var o=t.shaderProgram._attributeLocations;t.shaderProgram.destroy(),t.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:o})}}function _0x36a950(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function _0x19b2b7(e,t,i){if(e$2e(t)){var n=t.shaderProgram.vertexShaderSource,r=t.shaderProgram.fragmentShaderSource;_0x36a950(r,i);var o=t.shaderProgram._attributeLocations;t.shaderProgram.destroy(),t.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:o})}}function _0x4ce7c2(e){for(var t=0;t<e._arrPointCommand.length;t++)e$2e(e._arrPointCommand[t])&&(e._arrPointCommand[t].vertexArray=e._arrPointCommand[t].vertexArray&&e._arrPointCommand[t].vertexArray.destroy(),e._arrPointCommand[t].shaderProgram=e._arrPointCommand[t].shaderProgram&&e._arrPointCommand[t].shaderProgram.destroy(),e._arrPointCommand[t]=void 0);e._arrPointCommand.length=0;for(t=0;t<e._arrRasterPointCommand.length;t++)e$2e(e._arrRasterPointCommand[t])&&(e._arrRasterPointCommand[t].vertexArray=e._arrRasterPointCommand[t].vertexArray&&e._arrRasterPointCommand[t].vertexArray.destroy(),e._arrRasterPointCommand[t].shaderProgram=e._arrRasterPointCommand[t].shaderProgram&&e._arrRasterPointCommand[t].shaderProgram.destroy(),e._arrRasterPointCommand[t]=void 0);e._arrRasterPointCommand.length=0}function _0x5afb42(e){for(var t=0;t<e._arrRasterTexture.length;t++)e$2e(e._arrRasterTexture[t])&&(e._arrRasterTexture[t].destroy(),e._arrRasterTexture[t]=null);e._arrRasterTexture.length=0;for(t=0;t<e._arrAssisTexture.length;t++)e$2e(e._arrAssisTexture[t])&&(e._arrAssisTexture[t].destroy(),e._arrAssisTexture[t]=null);e._arrAssisTexture.length=0}function _0x3c8d27(e,t){var i=t.length/2,n=0,r=0,o=0;for(n=0,r=i-1;n<i;r=n++){var a=t[2*n],s=t[2*n+1],l=t[2*r],u=t[2*r+1],c=Math.min(a,l),h=Math.max(a,l),d=Math.min(s,u),f=Math.max(s,u);if(u!=s){if(d>e.y==f<e.y){var p=(l-a)*(e.y-s)/(u-s)+a;if(e.x<p)o=!o;else if(e.x==p)return!0}}else if(e.y==s&&e.x>=c&&e.x<=h)return!0}return o}function _0x2442cc(e,t,i){var n=e._bounds[0],r=e._bounds[1],o=e._bounds[2],a=e._bounds[3],s=0,l=0,u=o$1p.fromDegrees(n,r,t),c=new i$16(0,0,0),h=new p$1d,d=new p$1d,f=new o$1p,p=new o$1p,_=new o$1p;m$19.headingPitchRollToFixedFrame(u,c,t$12.WGS84,m$19.eastNorthUpToFixedFrame,h),p$1d.inverse(h,d);var m=o$1p.fromDegrees(o,r,e._bottom);p$1d.multiplyByPoint(d,m,p);var g=o$1p.fromDegrees(n,a,e._bottom);p$1d.multiplyByPoint(d,g,_);for(var x=o$1p.distance(new o$1p(0,0,0),p),y=o$1p.distance(new o$1p(0,0,0),_),v=(Math.floor(y/e._spacing),0);v<x;v+=e._spacing){l=0;for(var $=0;$<y;$+=e._spacing){p$1d.multiplyByPoint(h,new o$1p(e._spacing*s,e._spacing*l,0),f);var b=a$18.fromCartesian(f),T=e._getVolValue(b,i);e._voxelData.values.push(T),l++}s++}e._voxelData.width=s,e._voxelData.height=l,e._voxelData.bounds={leftBottom:{x:n,y:r},rightTop:{x:o,y:a}}}function _0x3be050(e){if(0===e._qureyRegion.length/2||0===e._bounds.length)return[];if(e._enuPoints.length>0)return e._enuPoints;var t=e._bounds[0],i=e._bounds[1],n=e._bounds[2],r=e._bounds[3],o=0,a=0,s=0,l=o$1p.fromDegrees(t,i,e._bottom),u=new i$16(0,0,0),c=new p$1d,h=new p$1d,d=new o$1p,f=new o$1p,p=new o$1p;m$19.headingPitchRollToFixedFrame(l,u,t$12.WGS84,m$19.eastNorthUpToFixedFrame,c),p$1d.inverse(c,h);var _=o$1p.fromDegrees(n,i,e._bottom);p$1d.multiplyByPoint(h,_,f);var m=o$1p.fromDegrees(t,r,e._bottom);p$1d.multiplyByPoint(h,m,p);for(var g=o$1p.distance(new o$1p(0,0,0),f),x=o$1p.distance(new o$1p(0,0,0),p),y=0;y<g;y+=e._spacing){a++,s=0;for(var v=0;v<x;v+=e._spacing){s++,p$1d.multiplyByPoint(c,new o$1p(e._spacing*a,e._spacing*s,0),d);var $=a$18.fromCartesian(d),b=e$2d.toDegrees($.longitude),T=e$2d.toDegrees($.latitude);!_0x3c8d27({x:b,y:T},e._qureyRegion)||(e._enuPoints[o++]=b,e._enuPoints[o++]=T)}}return e._enuPoints}function _0x1af562(e){var t=e._qureyRegion.length/2;if(0===t)return[];if(t<3)return new i$1d;for(var i=Number.MAX_VALUE,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=-Number.MAX_VALUE,a=0;a<t;a++)i=Math.min(e._qureyRegion[2*a],i),n=Math.min(e._qureyRegion[2*a+1],n),r=Math.max(e._qureyRegion[2*a],r),o=Math.max(e._qureyRegion[2*a+1],o);e._bounds.length=0,e._bounds.push(i),e._bounds.push(n),e._bounds.push(r),e._bounds.push(o);var s=o$1p.fromDegrees(.5*(r+i),.5*(o+n),e._bottom+.5*e._extend);o$1p.clone(s,e._boundingSphere.center),p$1d.setTranslation(e._worldMatrix,s,e._worldMatrix);var l=o$1p.fromDegrees(i,n,e._bottom),u=o$1p.fromDegrees(r,o,e._bottom+e._extend);return o$1p.subtract(u,l,s),e._boundingSphere.radius=.5*o$1p.magnitude(s),e._boundingSphere}function _0x513a86(e,t,i,n){var r=i.length/2,o=S$14.createTypedArray(S$14.FLOAT,3*r),a=S$14.createTypedArray(S$14.FLOAT,2*r),s=null;ce$z.UNSIGNED_SHORT,r<65535?s=S$14.createTypedArray(S$14.UNSIGNED_SHORT,r):(s=S$14.createTypedArray(S$14.UNSIGNED_INT,r),ce$z.UNSIGNED_INT);var l=e._bounds[2]-e._bounds[0],u=e._bounds[3]-e._bounds[1],c=e._bounds[0]-.025*l,h=e._bounds[1]-.025*u;l+=.05*l,u+=.05*u;var d=new e$2c(0,0,0,1),f=new p$1d;p$1d.inverse(e._worldMatrix,f);for(var p=0;p<r;p++){var _=o$1p.fromDegrees(i[2*p],i[2*p+1],n);e._points.push(_),d.x=_.x,d.y=_.y,d.z=_.z,p$1d.multiplyByVector(f,d,d),o[3*p]=d.x,o[3*p+1]=d.y,o[3*p+2]=d.z,a[2*p]=(i[2*p]-c)/l*2-1,a[2*p+1]=(i[2*p+1]-h)/u*2-1,s[p]=p}var m=t$X.createVertexBuffer({context:t,typedArray:o,usage:A$18.STATIC_DRAW}),g=t$X.createVertexBuffer({context:t,typedArray:a,usage:A$18.STATIC_DRAW}),x=[],y={offset:0,aPosition:1,aTexCoord0:2},v=t.createBillboardOffsetVertexBuffer();x.push({name:"offset",index:y.offset,vertexBuffer:v,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var $=S$14.getSizeInBytes(S$14.FLOAT);x.push({name:"aPosition",index:y.aPosition,vertexBuffer:m,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*$,normalize:!1,instanceDivisor:1}),x.push({name:"aTexCoord0",index:y.aTexCoord0,vertexBuffer:g,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:2*$,normalize:!1,instanceDivisor:1});var b=t.createBillboardPointIndexBuffer(),T=new t$U({context:t,width:1024,height:1024,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1});e._arrRasterTexture.push(T);var C=new t$U({context:t,width:1024,height:1024,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1});e._arrAssisTexture.push(C);var S=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.OPAQUE,owner:e,cull:!0,instanceCount:r});e._arrPointCommand.push(S),S.vertexArray=new c$13({context:t,attributes:x,indexBuffer:b});var w=new s$V({name:"ShadowAnalysisVp",sources:[_0x126a39]});w.defines.push("RENDER_POINT");var E=new s$V({name:"ShadowAnalysisFp",sources:[_0x46d19a]});e$2e(e._colorTable)&&E.defines.push("COLOR_TABLE"),S.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:w,fragmentShaderSource:E,attributeLocations:y}),S.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),S.uniformMap={uPointSize:function(){return 10},uTexture0:function(){return T},uHypsometricTexture:function(){return e._hypsometricTexture}};var P=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.OPAQUE,owner:e,cull:!1,instanceCount:r});e._arrRasterPointCommand.push(P),P.vertexArray=new c$13({context:t,attributes:x,indexBuffer:b}),(w=new s$V({name:"ShadowQueryVp",sources:[_0x1f9203]})).defines.push("RENDER_POINT");var A=new s$V({name:"ShadowQueryFp",sources:[_0x138bac]});(M=e.shadowMap)._usesDepthTexture&&A.defines.push("USE_SHADOW_DEPTH_TEXTURE"),P.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:w,fragmentShaderSource:A,attributeLocations:y}),P.renderState=d$1m.fromCache({viewport:new f$1a(0,0,1024,1024),cull:{enabled:!1},depthTest:{enabled:!1}});var L=1/e._currentTime,M=e.shadowMap;P.uniformMap={uPointSize:function(){return 4},uSpacing:function(){return L},shadowMap_texture:function(){return M._shadowMapTexture},shadowMap_textureCube:function(){return M._shadowMapTexture},shadowMap_matrix:function(){return M._shadowMapMatrix},shadowMap_cascadeSplits:function(){return M._cascadeSplits},shadowMap_cascadeMatrices:function(){return M._cascadeMatrices},shadowMap_lightDirectionEC:function(){return M._lightDirectionEC},shadowMap_lightPositionEC:function(){return M._lightPositionEC},shadowMap_cascadeDistances:function(){return M._cascadeDistances},uAssisTexture:function(){return C}},P.framebuffer=new t$V({context:t,colorTextures:[T],destroyAttachments:!1})}function _0x362aaf(e,t,i){e._globalDepthBuffer.isUpdate=!0,i.camera,e._globalDepthBuffer._beginFunc=function(e){},e._globalDepthBuffer._endFunc=function(t){e._globalDepthBuffer.isUpdate=!1,e._depthBuffer.isUpdate=!0}}function _0x54d640(e,t,i){var n=i.time.clone(),r=0,o=i.useLogDepth;e._depthBuffer._beginFunc=function(){i.useLogDepth=!1,e.shadowMap.enabled=!0,n=i.time.clone(),i.time=a$15.addMinutes(e._startTime,r,new a$15),r+=e._timeInterval,i.passes.pick=!1},e._depthBuffer._endFunc=function(){i.useLogDepth=o;for(var r=[],a=0;a<e._arrRasterPointCommand.length;a++){e._arrRasterPointCommand[a].execute(t);var s=t.readPixelsAsync({x:0,y:0,width:1024,height:1024,framebuffer:e._arrRasterPointCommand[a].framebuffer});r.push(s),e._arrAssisTexture[a].copyFromTexture(e._arrRasterPointCommand[a].framebuffer.getColorTexture(0))}i.time=n,--e._currentTime<1&&(e._depthBuffer.isUpdate=!1,e._timeUpdate=!1,e.shadowMap.maximumDistance=e._shadowMapParams.oriMaxDis,e.shadowMap.minimumDistance=void 0,e.shadowMap.size=e._shadowMapParams.oriSize,Promise.all(r).then((t=>{if(e._points.length>0){var i={},n=_0x3be050(e);i.points=e._points,i.enuPoints=n,i.bounds=e._bounds,i.extend=e._extend,i.spacing=e._spacing,i.bottom=e._bottom,i.pixelsArray=t;var r=_0x352a7a.scheduleTask(i,[]);if(!e$2e(r))return[];r.then((function(t){var i=t.resultData;i.length>0&&e._queryPointsEvent.raiseEvent(i)})).otherwise((function(e){}))}else e._queryPointsEvent.raiseEvent({resultData:[]})})))}}Object.defineProperties(_0x19393b.prototype,{startTime:{get:function(){return this._startTime},set:function(e){this._startTime=e.clone(),this._update=!0}},endTime:{get:function(){return this._endTime},set:function(e){this._endTime=e.clone(),this._update=!0}},timeInterval:{get:function(){return this._timeInterval},set:function(e){this._timeInterval=e,this._update=!0}},spacing:{get:function(){return this._spacing},set:function(e){this._spacing=e,this._update=!0}},queryPointsEvent:{get:function(){return this._queryPointsEvent}},isPointsVisible:{get:function(){return this._isPointsVisible},set:function(e){this._isPointsVisible=e}},colorTable:{get:function(){return this._colorTable},set:function(e){if(e$2e(e)){e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:this._scene.context,width:1024,height:64,pixelFormat:V$12.RGBA,flipY:!1})),this._colorTable=e,this._colorTable.generateBuffer(),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._colorTable._imageBuffer});for(i=0,n=(t=this._arrPointCommand).length;i<n;i++)_0x353320(this._scene.context,t[i],"COLOR_TABLE")}else for(var t,i=0,n=(t=this._arrPointCommand).length;i<n;i++)_0x19b2b7(this._scene.context,t[i],"COLOR_TABLE")}},voxelData:{get:function(){return this._volDirty=!0,this._getVoxelData(),this._voxelData}}}),_0x19393b.prototype._getVolValue=function(e,t){var i=e.longitude,n=e.latitude,r=e.height;i=e$2d.toDegrees(i),n=e$2d.toDegrees(n);var o=this._bounds[2]-this._bounds[0],a=(r=this._bounds[3]-this._bounds[1],this._bounds[0]-.025*o),s=this._bounds[1]-.025*r;o+=.05*o,r+=.05*r;var l=parseInt((i-a)/o*1024),u=parseInt((n-s)/r*1024);l=l<1?1:l,u=u<1?1:u;for(var c=0,h=new e$2c(1,1/255,1/65025,1/160581375),d=-1;d<2;d++)for(var f=-1;f<2;f++){var p=this._scene.context.readPixels({x:l+d,y:u+f,width:1,height:1,framebuffer:this._arrRasterPointCommand[t].framebuffer}),_=e$2c.unpack(p,0);e$2c.divideByScalar(_,255,_),c=Math.max(c,e$2c.dot(_,h))}return 1-(c=c>.999?1:c)},_0x19393b.prototype.update=function(e,t,i){if(!t._fboState.enabled&&!t.camera.bReflect){if(this._update){if(!this.shadowMap.enabled)throw new t$15("ShadowQueryPoints must be shadow.");if(this._scene.mode!==C$14.SCENE3D)throw new t$15("Shadow anaylsis is not supported for non-3D scenes.");if(this._frameState=t,e$2e(this._depthBuffer)||(this._depthBuffer=new s$U(e),this._depthBuffer.environmentVisible.isSunVisible=!0,this._depthBuffer.environmentVisible.isGlobalVisible=!0,this._depthBuffer.environmentVisible.isObjectVisible=!0,this._depthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._sceneName]=this._depthBuffer),!e$2e(this._globalDepthBuffer)){this._globalDepthBuffer=new s$U(e),this._globalDepthBuffer.environmentVisible.isObjectVisible=!0,this._globalDepthBuffer.environmentVisible.isGlobalVisible=!0,this._globalDepthBuffer._visibleViewport=this._visibleViewport;var n=this._name+"_global";t._framebufferList[n]=this._globalDepthBuffer}this._update=!1,this._timeUpdate=!0,this._currentTime=1;var r=new a$15,o=0;for(this.shadowMap.maximumDistance=this._shadowMapMaxDistance;a$15.addMinutes(this._startTime,o,r),o+=this._timeInterval,!a$15.lessThan(this._endTime,r);)this._currentTime++;_0x4ce7c2(this),_0x5afb42(this);var a=_0x3be050(this);if(this._points.length=0,a.length>0){for(var s=0;s<=this._extend;s+=this._spacing)_0x513a86(this,e,a,this._bottom+s);_0x362aaf(this,e,t),_0x54d640(this,e,t)}}if(!this._timeUpdate&&this._isPointsVisible){for(var l=0;l<this._arrPointCommand.length;l++)i.push(this._arrPointCommand[l]);this._getVoxelData()}}},_0x19393b.prototype._getVoxelData=function(){if(this._arrPointCommand.length>0&&this._volDirty){this._volDirty=!1,this._voxelData={values:[]};for(var e=0,t=0;t<=this._extend;t+=this._spacing)_0x2442cc(this,t,e),e++;this._voxelData.values=new Float32Array(this._voxelData.values),this._voxelData.depth=Math.ceil(this._extend/this._spacing)+1,this._voxelData.minValue=0,this._voxelData.maxValue=1,this._voxelData.minHeight=this._bottom,this._voxelData.maxHeight=this._bottom+this._extend}},_0x19393b.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=1<<e,e$2e(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport)},_0x19393b.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0x19393b.prototype.getShadowRadio=function(e){if(!e$2e(e)||this._timeUpdate)return-1;var t=e.longitude,i=e.latitude,n=e.height;if(!e$2e(t)||!e$2e(i)||!e$2e(n)||(t=e$2d.toDegrees(t),i=e$2d.toDegrees(i),t<this._bounds[0]||t>this._bounds[2]||i<this._bounds[1]||i>this._bounds[3]))return-1;for(var r=!1,o=0,a=.1*this._spacing,s=0;s<=this._extend;s+=this._spacing){if(Math.abs(this._bottom+s-n)<a){r=!0;break}o++}if(!r)return-1;var l=_0x3be050(this);if(l.length<0)return-1;r=!1;for(var u=0;u<l.length;u+=2){var c=o$1p.fromDegrees(t,i,n),h=o$1p.fromDegrees(l[u+0],l[u+1],n);if(o$1p.distance(c,h)<a){r=!0;break}}if(!r||o>=this._arrRasterPointCommand.length)return-1;var d=this._bounds[2]-this._bounds[0],f=(n=this._bounds[3]-this._bounds[1],this._bounds[0]-.025*d),p=this._bounds[1]-.025*n;d+=.05*d,n+=.05*n;var _=parseInt((t-f)/d*1024),m=parseInt((i-p)/n*1024);_=_<1?1:_,m=m<1?1:m;var g=0,x=new e$2c(1,1/255,1/65025,1/160581375),y=this._arrRasterPointCommand[o].framebuffer;for(u=-1;u<2;u++)for(var v=-1;v<2;v++){var $=this._scene.context.readPixels({x:_+u,y:m+v,width:1,height:1,framebuffer:y}),b=e$2c.unpack($,0);e$2c.divideByScalar(b,255,b),g=Math.max(g,e$2c.dot(b,x))}return g=g>.999?1:g},_0x19393b.prototype.getShadowRadioAsync=function(e){if(!e$2e(e)||this._timeUpdate)return Promise.resolve(-1);var t=e.longitude,i=e.latitude,n=e.height;if(!e$2e(t)||!e$2e(i)||!e$2e(n)||(t=e$2d.toDegrees(t),i=e$2d.toDegrees(i),t<this._bounds[0]||t>this._bounds[2]||i<this._bounds[1]||i>this._bounds[3]))return Promise.resolve(-1);for(var r=!1,o=0,a=.1*this._spacing,s=0;s<=this._extend;s+=this._spacing){if(Math.abs(this._bottom+s-n)<a){r=!0;break}o++}if(!r||o>=this._arrRasterPointCommand.length)return Promise.resolve(-1);var l=_0x3be050(this);if(l.length<0)return Promise.resolve(-1);r=!1;for(var u=0;u<l.length;u+=2){var c=o$1p.fromDegrees(t,i,n),h=o$1p.fromDegrees(l[u+0],l[u+1],n);if(o$1p.distance(c,h)<a){r=!0;break}}if(!r)return Promise.resolve(-1);var d=this._bounds[2]-this._bounds[0],f=(n=this._bounds[3]-this._bounds[1],this._bounds[0]-.025*d),p=this._bounds[1]-.025*n;d+=.05*d,n+=.05*n;var _=parseInt((t-f)/d*1024),m=parseInt((i-p)/n*1024);_=_<1?1:_,m=m<1?1:m;var g=new e$2c(1,1/255,1/65025,1/160581375),x=[],y=this._arrRasterPointCommand[o].framebuffer;for(u=-1;u<2;u++)for(var v=-1;v<2;v++){var $=this._scene.context.readPixelsAsync({x:_+u,y:m+v,width:1,height:1,framebuffer:y});x.push($)}return Promise.all(x).then((e=>{for(var t=0,i=0;i<e.length;i++){var n=e[i],r=e$2c.unpack(n,0);e$2c.divideByScalar(r,255,r),t=Math.max(t,e$2c.dot(r,g))}return t=t>.999?1:t,Promise.resolve(t)}))},_0x19393b.prototype.qureyRegion=function(e){if(!e$2e(e)||!e$2e(e.position))throw new t$15("the options is required");this._qureyRegion=e.position,this._bottom=u$Z(e.bottom,this._bottom),this._extend=u$Z(e.extend,this._extend),this._update=!0,this._enuPoints=[];var t=_0x1af562(this),i=o$1p.distance(t.center,this._scene.camera.position);i+=this._boundingSphere.radius,this.shadowMap.maximumDistance=i,this.shadowMap.size=this._shadowMapParams.analysisSize,this._shadowMapMaxDistance=i},_0x19393b.prototype.clear=function(){_0x4ce7c2(this),this._scene._analyst3D.remove(this._name,!1)},_0x19393b.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("ShadowQueryPoints"),""!==this._name||this._checking?e$2e(this._scene._analyst3D.find(this._name))||this._scene._analyst3D.add(this):(this._name="ShadowQueryPoints"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._scene._analyst3D.add(this),this._scene._analysisShadowMap=this.shadowMap)},_0x19393b.prototype.destroy=function(){return e$2e(this._frameState)&&(e$2e(this._depthBuffer)&&delete this._frameState._framebufferList[this._sceneName],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),_0x4ce7c2(this),_0x5afb42(this),e$2e(this._hypsometricTexture)&&(this._hypsometricTexture=this._hypsometricTexture.destroy()),this._scene._analyst3D.remove(this._name,!0),e$2e(this.shadowMap)&&(this.shadowMap.destroy(),this.shadowMap=void 0,this._scene._analysisShadowMap=void 0),i$11(this)};var _0x36a553="attribute vec2 aSideness;\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\nuniform float uLineWidth;\nuniform mat4 uRenderTextureMatrix;\nvarying vec4 renderTextureCoord;\nvec4 resolvePosition(vec4 viewPosV0, vec4 viewPosV1, vec2 sidenessNorm) {\nvec2 sideness = sidenessNorm * 2.0 - 1.0;\nvec4 viewPos = mix(viewPosV0, viewPosV1, sidenessNorm.y);\nvec4 projPosV0 = czm_projection * viewPosV0;\nvec4 projPosV1 = czm_projection * viewPosV1;\nvec4 projPos = czm_projection * viewPos;\nvec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\nvec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\nvec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\nfloat lineLengthPixels = length(screenSpaceLinePixels);\nfloat dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\nvec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\nvec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\nvec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\nfloat halfLineWidth = max(uLineWidth, 1.0) * 0.5;\nvec2 halfLineWidthNDC = halfLineWidth * uPixelToNDC;\nvec2 ndcOffset = screenSpaceDirection * halfLineWidthNDC + perpendicularScreenSpaceDirection * halfLineWidthNDC;\nprojPos.xy += ndcOffset * projPos.w;\nprojPos.z += (dzPerPixel * halfLineWidth) * sideness.y * projPos.w;\nreturn projPos;\n}\nvoid main() {\nvec4 viewPosV0 = czm_modelView * vec4(aPosition0, 1.0);\nvec4 viewPosV1 = czm_modelView * vec4(aPosition1, 1.0);\ngl_Position = resolvePosition(viewPosV0, viewPosV1, aSideness);\nvec4 viewPos = czm_inverseProjection * gl_Position;\nrenderTextureCoord = uRenderTextureMatrix * viewPos;\n}\n",_0xca158e="uniform sampler2D uTexture0;\nuniform vec4 uVisibleColor;\nuniform vec4 uHiddenColor;\nvarying vec4 renderTextureCoord;\nvoid main() {\nvec4 resultColor = uVisibleColor;\nvec4 texCoord = renderTextureCoord / renderTextureCoord.w;\nfloat depth = texCoord.z * 0.5 + 0.5;\ntexCoord.xy = texCoord.xy * 0.5 + 0.5;\nfloat z_window = czm_unpackDepth(texture2D(uTexture0, texCoord.xy));\n#ifdef WEBGPU\nz_window = z_window * 0.5 + 0.5;\n#endif\nif(z_window < depth && z_window > 0.0 && z_window < 1.0)\n{\nresultColor = uHiddenColor;\n}\ngl_FragColor = resultColor;\n}\n",_0x2c1d58=(_0x1d4d19=!0,function(e,t){var i=_0x1d4d19?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d4d19=!1,i}),_0x13a59b=_0x2c1d58(void 0,(function(){return _0x13a59b.toString().search("(((.+)+)+)+$").toString().constructor(_0x13a59b).search("(((.+)+)+)+$")})),_0x1d4d19;_0x13a59b();var _0x35ab06="\nattribute vec3 aPosition0;\nuniform float uLineWidth;\nuniform mat4 uRenderTextureMatrix;\n\nvarying vec4 renderTextureCoord;\n\nvoid main() {\n vec4 viewPos = czm_modelView * vec4(aPosition0, 1.0);\n gl_Position = czm_projection * viewPos;\n renderTextureCoord = uRenderTextureMatrix * viewPos;\n}",_0x1aeb94=(_0x559c56=!0,function(e,t){var i=_0x559c56?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x559c56=!1,i}),_0x5dd3af=_0x1aeb94(void 0,(function(){return _0x5dd3af.toString().search("(((.+)+)+)+$").toString().constructor(_0x5dd3af).search("(((.+)+)+)+$")})),_0x559c56;function _0x393ad5(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._depthBuffer=void 0,this._command=void 0,this._frameState=void 0,this._viewPosition=[0,0,0],this._cameraDir=new o$1p,this._viewProjMatrix=new p$1d,this._viewProjMatrixs=new e$1Q,this._renderTextureMatrix=new p$1d,this._renderTextureMatrixs=new e$1Q,this._visibleColor=new e$2c(0,1,0,1),this._hiddenColor=new e$2c(1,0,0,1),this._targetPoints=new e$1Q,this._sightlineCameras=new e$1Q,this._update=!0,this._updateAll=!0,this._id=0,this._name="",this._visibleViewport=4095,this._barrierPointArray=new e$1Q,this._depthBuffers=new e$1Q,this._commands=new e$1Q,this._lineWidth=1}function _0x24b83f(e,t,i){var n,r=i.camera,o=r._projection;if(e._scene.mode===C$14.SCENE3D)n=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var a=a$18.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);n=o.project(a,new o$1p)}var s=new o$1p(0,0,0);e._targetPoints._hash;var l,u=0,c=e._currentTargetPoint;if(e._scene.mode===C$14.SCENE3D)l=o$1p.fromDegreesArrayHeights(c,e._scene._globe.ellipsoid)[0];else{var h=a$18.fromDegrees(c[0],c[1],c[2]);l=o.project(h,new o$1p)}var d=new o$1p;o$1p.subtract(l,n,d),o$1p.normalize(d,d),o$1p.add(s,d,s),u=Math.max(u,o$1p.distance(l,n)),o$1p.normalize(s,s),o$1p.clone(s,e._cameraDir);var f=new o$1p,p=new o$1p,_=new o$1p,m=r.frustum.fov;o$1p.clone(r.position,f),o$1p.clone(r.direction,p),o$1p.clone(r.up,_);var g=2*e$2d.PI/3,x=r.frustum.near,y=r.frustum.far,v=i.useLogDepth,$=e._currentTargetName,b=e._depthBuffers.get($);e$2e(b)||((b=new s$U(t)).environmentVisible.isObjectVisible=!0,b.environmentVisible.isGlobalVisible=!0,b._visibleViewport=e._visibleViewport,i._framebufferList[$]=b,e._depthBuffers.set($,b)),b.isUpdate=!0,b._beginFunc=function(){i.useLogDepth=!1,o$1p.clone(r.position,f),o$1p.clone(r.direction,p),o$1p.clone(r.up,_),m=r.frustum.fov,r.frustum.fov=g;var t=s,o=new o$1p;o=o$1p.clone(n,o),o=o$1p.normalize(o,o),Math.abs(o$1p.dot(o,t))>=1&&(o=Math.abs(o$1p.dot(t,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,o):o$1p.clone(o$1p.UNIT_Z,o));var a=new o$1p;o$1p.cross(o,t,a),a=o$1p.normalize(a,a),o$1p.cross(t,a,o),o=o$1p.normalize(o,o);var l={destination:n,orientation:{direction:t,up:o},convert:!1};r.setView(l),e._sightlineCameras.set($,l),r.frustum.near=1,r.frustum.far=Math.ceil(Math.max(u,10));var c=new p$1d;p$1d.multiply(r.frustum.projectionMatrix,r.viewMatrix,c),e._viewProjMatrixs.set($,c),e._renderTextureMatrixs.set($,new p$1d)},b._endFunc=function(){if(i.useLogDepth=v,r.frustum.fov=m,r.setView({destination:f,orientation:{direction:p,up:_},convert:!1}),r.frustum.near=x,r.frustum.far=y,b.isUpdate=!1,!e._update)if(t.webgpu)_0x663bac(e,$).then((t=>{e._barrierPointArray.set($,t)}));else{var n=_0x221e55(e,$);e._barrierPointArray.set($,n)}}}_0x5dd3af(),Object.defineProperties(_0x393ad5.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._updateAll=!0,this._update=!0}},visibleColor:{get:function(){var e=new e$1X;return e.red=this._visibleColor.x,e.green=this._visibleColor.y,e.blue=this._visibleColor.z,e.alpha=this._visibleColor.w,e},set:function(e){this._visibleColor.x=e.red,this._visibleColor.y=e.green,this._visibleColor.z=e.blue,this._visibleColor.w=e.alpha}},hiddenColor:{get:function(){var e=new e$1X;return e.red=this._hiddenColor.x,e.green=this._hiddenColor.y,e.blue=this._hiddenColor.z,e.alpha=this._hiddenColor.w,e},set:function(e){this._hiddenColor.x=e.red,this._hiddenColor.y=e.green,this._hiddenColor.z=e.blue,this._hiddenColor.w=e.alpha}},lineWidth:{get:function(){return this._lineWidth},set:function(e){o$1q.typeOf.number.greaterThan("Sightline.lineWidth",e,0),this._lineWidth=e}}}),_0x393ad5.prototype.addTargetPoint=function(e){LicenseChecker.LICENSECHECKER.verify("Sightline");var t=e.name,i=e.position;return!(!e$2e(t)||!e$2e(i))&&(this._targetPoints.set(t,i),this._currentTargetName=t,this._currentTargetPoint=i,this._update=!0,this._barrierPointArray.set(t,{}),!0)},_0x393ad5.prototype.removeTargetPoint=function(e){LicenseChecker.LICENSECHECKER.verify("Sightline"),this._barrierPointArray.remove(e);var t=this._targetPoints.remove(e);if(this._sightlineCameras.remove(e),!t)return!1;this._viewProjMatrixs.remove(e),this._renderTextureMatrixs.remove(e);var i=this._depthBuffers.get(e);e$2e(i)&&(i.destroy(),this._depthBuffers.remove(e),delete this._frameState._framebufferList[e]);var n=this._commands.get(e);if(e$2e(n)){for(var r=0;r<n.length;r++){var o=n[r];o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy(),o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy();var a=this._frameState.commandList.indexOf(o);-1!==a&&this._frameState.commandList.splice(a,1)}this._commands.remove(e)}return this._update=!0,!0},_0x393ad5.prototype.removeAllTargetPoint=function(){for(var e in LicenseChecker.LICENSECHECKER.verify("Sightline"),this._barrierPointArray.removeAll(),this._targetPoints.removeAll(),this._sightlineCameras.removeAll(),this._depthBuffers._hash)this._depthBuffers._hash.hasOwnProperty(e)&&(this._depthBuffers._hash[e].destroy(),delete this._frameState._framebufferList[e],delete this._frameState._framebufferList[e]);this._depthBuffers.removeAll();for(var t=0,i=this._commands.length;t<i;t++)for(var n=this._commands.values[t],r=0;r<n.length;r++){var o=n[r];o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy(),o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy()}this._commands.removeAll(),this._viewProjMatrixs.removeAll(),this._renderTextureMatrixs.removeAll(),this._update=!0};var _0x4c203c=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),_0x105576=null;function _0x4e66db(e){if(e$2e(_0x105576))return _0x105576;var t=new Float32Array(8),i=0;return t[i++]=0,t[i++]=0,t[i++]=0,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=1,t[i++]=0,(_0x105576=t$X.createVertexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW})).vertexArrayDestroyable=!1,_0x105576}function _0x54102d(e,t){var i=S$14.createTypedArray(S$14.FLOAT,6);return i[0]=0,i[1]=0,i[2]=0,i[3]=t.x,i[4]=t.y,i[5]=t.z,t$X.createVertexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW})}function _0x492920(){var e=new Uint16Array(6),t=0;return e[t++]=2,e[t++]=1,e[t++]=0,e[t++]=3,e[t++]=2,e[t++]=0,e}var _0x5465df=null;function _0x11ce83(e){return e$2e(_0x5465df)||((_0x5465df=t$X.createIndexBuffer({context:e,typedArray:_0x492920(),usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1),_0x5465df}var _0x27dbef=new e$2c,_0x5cdfa3=new e$2c;function _0x1d1c54(e,t,i){var n,r=i.camera._projection;if(e._scene.mode===C$14.SCENE3D)n=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var o=a$18.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);n=r.project(o,new o$1p)}var a,s=e._currentTargetPoint;if(e._scene.mode===C$14.SCENE3D)a=o$1p.fromDegreesArrayHeights(s,e._scene._globe.ellipsoid)[0];else{var l=a$18.fromDegrees(s[0],s[1],s[2]);a=r.project(l,new o$1p)}var u=new o$1p;o$1p.subtract(a,n,u);var c=[],h={},d=W$18.TRIANGLES,f=!0;if(t.webgpu){f=!1,d=W$18.LINES;var p=_0x54102d(t,u);h.aPosition0=0,c.push({name:"aPosition0",index:h.aPosition0,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}else{d=W$18.TRIANGLES;var _=_0x4e66db(t);p=_0x54102d(t,u);h.aSideness=0,c.push({name:"aSideness",index:h.aSideness,vertexBuffer:_,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),h.aPosition0=1,c.push({name:"aPosition0",index:h.aPosition0,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1,instanceDivisor:1}),h.aPosition1=2,c.push({name:"aPosition1",index:h.aPosition1,vertexBuffer:p,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:12,strideInBytes:12,normalize:!1,instanceDivisor:1})}var m=_0x11ce83(t),g=new i$$({primitiveType:d,pass:Le$q.OPAQUE,owner:e,cull:!1}),x=new p$1d;p$1d.clone(p$1d.IDENTITY,x),p$1d.setTranslation(x,n,x),e._scene.mode!==C$14.SCENE3D&&p$1d.multiply(_0x4c203c,x,x),g.modelMatrix=x,g.vertexArray=new c$13({context:t,attributes:c,indexBuffer:m}),g.shaderProgram=r$14.fromCache({name:f?"SightWideLine":"SightLine",context:t,vertexShaderSource:f?_0x36a553:_0x35ab06,fragmentShaderSource:_0xca158e,attributeLocations:h}),g.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var y=e._currentTargetName,v={uRenderTextureMatrix:function(){return e._renderTextureMatrixs.get(y)},uTexture0:function(){return e._depthBuffers.get(y).depthTexture},uVisibleColor:function(){return e._visibleColor},uHiddenColor:function(){return e._hiddenColor},uLineWidth:function(){return e._lineWidth}};g.uniformMap=v;var $=i$$.shallowClone(g);$.pass=Le$q.ANALYSIS,$.renderState=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),$.uniformMap.uHiddenColor=function(){return e$2c.clone(e._hiddenColor,_0x27dbef),_0x27dbef.w=.2,_0x27dbef},$.uniformMap.uVisibleColor=function(){return e$2c.clone(e._visibleColor,_0x5cdfa3),_0x5cdfa3.w=.2,_0x5cdfa3},e._commands.set(y,[$,g])}function _0x221e55(e,t){var i=e._targetPoints.get(t);if(e$2e(i)){var n={isViewer:!0},r=o$1p.fromDegreesArrayHeights(i,e._scene._globe.ellipsoid)[0],o=new e$2c(r.x,r.y,r.z,1),a=e._viewProjMatrixs.get(t);if(p$1d.multiplyByVector(a,o,o),e$2c.divideByScalar(o,o.w,o),o.x>1||o.x<-1||o.y>1||o.y<-1)return n;var s=e._scene.context,l=s.drawingBufferWidth,u=s.drawingBufferHeight,c=(.5*o.x+.5)*l-.5,h=(.5*o.y+.5)*u-.5;if(c<0||h<0)return n;for(var d=Math.floor(c),f=c-d,p=Math.floor(h),_=h-p,m=e._depthBuffers.get(t),g=s.readPixels({framebuffer:m.framebuffer,x:d,y:p,width:2,height:2}),x=new e$2c,y=(new o$1p,new e$2c(1/255,1/65025,1/160581375,1/4228250625)),v=[],$=(e._scene,s.uniformState.currentFrustum),b=($.x,$.y,0);b<4;b++){var T=e$2c.unpack(g,4*b,x),C=e$2c.dot(T,y);if(!(C<1&&C>0))return n;v[b]=2*C-1}var S=(1-_)*((1-f)*v[0]+f*v[1])+_*((1-f)*v[2]+f*v[3]);if(o.z-S>1e-6){var w=new p$1d;p$1d.inverse(a,w),o.z=S,p$1d.multiplyByVector(w,o,o),e$2c.divideByScalar(o,o.w,o);var E=a$18.fromCartesian(o,e._scene._globe.ellipsoid);n.position=E,n.isViewer=!1,n.st=new o$1o(d,p)}return n}}function _0x2a8fa2(e,t){LicenseChecker.LICENSECHECKER.verify("Sightline");var i=e._targetPoints.get(t);if(!e$2e(i))return Promise.resolve(null);var n={isViewer:!0},r=o$1p.fromDegreesArrayHeights(i,e._scene._globe.ellipsoid)[0],o=new e$2c(r.x,r.y,r.z,1),a=e._viewProjMatrixs.get(t);if(p$1d.multiplyByVector(a,o,o),e$2c.divideByScalar(o,o.w,o),o.x>1||o.x<-1||o.y>1||o.y<-1)return Promise.resolve(n);var s=e._scene.context,l=s.drawingBufferWidth,u=s.drawingBufferHeight,c=(.5*o.x+.5)*l-.5,h=(.5*o.y+.5)*u-.5;if(c<0||h<0)return Promise.resolve(n);var d=Math.floor(c),f=c-d,p=Math.floor(h),_=h-p,m=s.uniformState,g=o$1o.clone(m.currentFrustum),x=e._depthBuffers.get(t);return s.readPixelsAsync({framebuffer:x.framebuffer,x:d,y:p,width:2,height:2}).then((t=>{for(var i=new e$2c,r=(new o$1p,new e$2c(1/255,1/65025,1/160581375,1/4228250625)),l=[],u=(e._scene,g.x,g.y,0);u<4;u++){var c=e$2c.unpack(t,4*u,i),h=e$2c.dot(c,r);if(!(h<1&&h>0))return Promise.resolve(n);s.webgpu?l[u]=h:l[u]=2*h-1}var m=(1-f)*l[0]+f*l[1],x=(1-f)*l[2]+f*l[3],y=(1-_)*m+_*x;if(o.z-y>1e-6){var v=new p$1d;p$1d.inverse(a,v),o.z=y,p$1d.multiplyByVector(v,o,o),e$2c.divideByScalar(o,o.w,o);var $=a$18.fromCartesian(o,e._scene._globe.ellipsoid);n.position=$,n.isViewer=!1,n.st=new o$1o(d,p)}return Promise.resolve(n)}))}function _0x14a020(e,t){var i=_0x221e55(e,t);if(e$2e(i)&&e$2e(i.position)&&e$2e(i.st))return i.st}function _0x663bac(e,t){return _0x2a8fa2(e,t).then((e=>e$2e(e)&&e$2e(e.position)&&e$2e(e.st)?Promise.resolve(e.st):Promise.resolve(null)))}_0x393ad5.prototype.update=function(e,t,i){if(!t._fboState.enabled){var n=t.camera;for(var r in this._viewProjMatrixs._hash)p$1d.multiply(this._viewProjMatrixs.get(r),n.inverseViewMatrix,this._renderTextureMatrixs.get(r));if(this._update){if(this._update=!1,this._frameState=t,this._targetPoints.values.length<1)return;if(this._updateAll)for(var o in this._updateAll=!1,this._targetPoints._hash){var a=this._targetPoints.get(o);this._currentTargetPoint=a,this._currentTargetName=o,_0x24b83f(this,e,t),_0x1d1c54(this,e,t)}else _0x24b83f(this,e,t),_0x1d1c54(this,e,t)}if(!t.passes.pick){var s=this._commands.length;for(o=0;o<s;o++)if(e$2e(this._depthBuffers.values[o].framebuffer)){var l=this._commands.values[o];i.push(l[0]),i.push(l[1])}}}},_0x393ad5.prototype.setVisibleInViewport=function(e){if(LicenseChecker.LICENSECHECKER.verify("Sightline"),e>8)throw new t$15("the index is 0~8");this._visibleViewport=1<<e,e$2e(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport)},_0x393ad5.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0x393ad5.prototype.getBarrierPoint=function(e,t){var i=this._barrierPointArray.get(e);return e$2e(t)&&t.bind(null,i)(),i},_0x393ad5.prototype.getObjectIds=function(){LicenseChecker.LICENSECHECKER.verify("Sightline");for(var e={},t=Object.keys(this._targetPoints._hash),i=0,n=t.length;i<n;i++){var r=t[i];this._scene.renderIds(this._sightlineCameras.get(r));var o=this._scene._defaultView.pickFramebuffer,a=this._scene._context,s=_0x14a020(this,r);if(e$2e(s)){var l=a.readPixels({x:s.x,y:s.y,width:1,height:1,framebuffer:o._fb}),u=e$1X.byteToRgba(l[0],l[1],l[2],l[3]),c=a.getObjectByPickId(u);if(e$2e(c)){var h=c.primitive.id;u=c.id;e$2e(e[h])||(e[h]=[]),-1===e[h].indexOf(u)&&e[h].push(u)}}}return e},_0x393ad5.prototype.getObjectIdsAsync=function(){LicenseChecker.LICENSECHECKER.verify("Sightline");for(var e={},t=Object.keys(this._targetPoints._hash),i=[],n=0,r=t.length;n<r;n++){var o=t[n];this._scene.renderIds(this._sightlineCameras.get(o));var a=this._scene._defaultView.pickFramebuffer,s=this._scene._context,l=_0x663bac(this,o);i.push(l)}return Promise.all(i).then((t=>{for(var i=[],n=0;n<t.length;n++){var r=t[n];if(e$2e(r)){var o=s.readPixelsAsync({x:r.x,y:r.y,width:1,height:1,framebuffer:a._fb});i.push(o)}}return Promise.all(i).then((t=>{for(var i=0;i<t.length;i++){var n=t[i],r=e$1X.byteToRgba(n[0],n[1],n[2],n[3]),o=s.getObjectByPickId(r);if(e$2e(o)){var a=o.primitive.id;r=o.id;e$2e(e[a])||(e[a]=[]),-1===e[a].indexOf(r)&&e[a].push(r)}}return Promise.resolve(e)}))}))},_0x393ad5.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("Sightline"),""===this._name&&!this._checking&&(this._name="sightline"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},_0x393ad5.prototype.destroy=function(){return this.removeAllTargetPoint(),this._scene._analyst3D.remove(this._name,!0),i$11(this)};var _0x193cd0=(_0xd69d10=!0,function(e,t){var i=_0xd69d10?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd69d10=!1,i}),_0x259668=_0x193cd0(void 0,(function(){return _0x259668.toString().search("(((.+)+)+)+$").toString().constructor(_0x259668).search("(((.+)+)+)+$")})),_0xd69d10;_0x259668();var _0x88ad48="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\n\nvoid main()\n{\n gl_Position = czm_modelViewProjection * aPosition;\n}",_0xa8264e=(_0x270356=!0,function(e,t){var i=_0x270356?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x270356=!1,i}),_0x182123=_0xa8264e(void 0,(function(){return _0x182123.toString().search("(((.+)+)+)+$").toString().constructor(_0x182123).search("(((.+)+)+)+$")})),_0x270356;_0x182123();var _0x3315e4="uniform vec4 uSkylineColor;\n\nvoid main()\n{\n gl_FragColor = uSkylineColor;\n}",E$_={UNKNOWN:"UNKNOWN",GEOPOINT3D:"POINT3D",GEOLINE3D:"LINE3D",GEOREGION3D:"REGION3D",GEOMODEL3D:"GEOMODEL3D",GEOSPHERE:"GEOSPHERE",GEOBOX:"GEOBOX",GEOBILLBOARD:"GEOBILLBOARD",GEOELLIPSOID:"GEOELLIPSOID",GEOCYLINDER:"GEOCYLINDER",GEOCONE:"GEOCONE",GEOCIRCLE3D:"CIRCLE3D"},P$U=Object.freeze(E$_);function s$N(e,t,i){this.x=parseFloat(e)||0,this.y=parseFloat(t)||0,this.z=parseFloat(i)||0}s$N.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z};var e$1B={CENTER:0,APEX:1},O$K=Object.freeze(e$1B);function o$11(e){this.init(e)}function T$V(e,t,i,n,r){var o=t$X.createVertexBuffer({context:r,typedArray:S$14.createTypedArray(i.componentDatatype,i.values),usage:A$18.STATIC_DRAW});e.push({name:t,index:n,vertexBuffer:o,componentsPerAttribute:i.componentsPerAttribute,componentDatatype:i.componentDatatype,offsetInBytes:0,strideInBytes:0,normalize:!1})}function t$L(){this.pntArray=[]}function p$U(e){e=e||[],this.init(e)}Object.defineProperties(o$11.prototype,{geoRotationX:{get:function(){return this.rotationX},set:function(e){"number"==typeof e&&(this.rotationX=e,this._isMatrixDirty=!0)}},geoRotationY:{get:function(){return this.rotationY},set:function(e){"number"==typeof e&&(this.rotationY=e,this._isMatrixDirty=!0)}},geoRotationZ:{get:function(){return this.rotationZ},set:function(e){"number"==typeof e&&(this.rotationZ=e,this._isMatrixDirty=!0)}},geoScaleX:{get:function(){return this.scaleX},set:function(e){"number"==typeof e&&(this.scaleX=e,this._isMatrixDirty=!0)}},geoScaleY:{get:function(){return this.scaleY},set:function(e){"number"==typeof e&&(this.scaleY=e,this._isMatrixDirty=!0)}},geoScaleZ:{get:function(){return this.scaleZ},set:function(e){"number"==typeof e&&(this.scaleZ=e,this._isMatrixDirty=!0)}},geoId:{get:function(){return this.id},set:function(e){"number"==typeof e&&(this.id=e,this._isMatrixDirty=!0)}},geoType:{get:function(){return this.type},set:function(e){"number"==typeof e&&(this.type=e)}},geoPosition:{get:function(){return this.position},set:function(e){e instanceof s$N&&!s$N.equals(e,this.position)&&(this.position=e,this._isMatrixDirty=!0,this._isGeometryDirty=!0)}},modelMatrix:{get:function(){return this._isMatrixDirty&&this._computeMatrix(),this._modelMatrix}},isGeometryDirty:{get:function(){return this._isGeometryDirty},set:function(e){this._isGeometryDirty=e}},isLatLon:{get:function(){return this._isLatLon},set:function(e){this._isLatLon=e}}}),o$11.prototype.init=function(e){e=e||{},this.rotationX=u$Z(e.rotationX,0),this.rotationY=u$Z(e.rotationY,0),this.rotationZ=u$Z(e.rotationZ,0),this.scaleX=u$Z(e.scaleX,1),this.scaleY=u$Z(e.scaleY,1),this.scaleZ=u$Z(e.scaleZ,1),this.position=u$Z(e.position,new s$N(0,0,0)),this.id=u$Z(e.id,0),this.type=u$Z(e.type,P$U.UNKNOWN),this.point3Ds=[],this.parts=[],this._geometry=void 0,this._modelMatrix=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._isMatrixDirty=!0,this._isGeometryDirty=!0,this._isLatLon=!0},o$11.prototype.getBounds=function(){return null},o$11.prototype._getGeometry=function(){return(!e$2e(this._geometry)||this._isGeometryDirty)&&this._createGeometry(),this._geometry},o$11.prototype._computeMatrix=function(){if(this._isLatLon){var e=o$1p.fromDegrees(this.position.x,this.position.y,this.position.z),t=e$2d.toRadians(this.rotationX),i=e$2d.toRadians(this.rotationY),n=new i$16(e$2d.toRadians(this.rotationZ),t,i),r=new o$1p(this.scaleX,this.scaleY,this.scaleZ),o=new n$15,a=new p$1d,s=n$15.fromHeadingPitchRoll(n,o),l=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,s,r,a);if(this._modelMatrix=m$19.eastNorthUpToFixedFrame(e,t$12.WGS84,this._modelMatrix),"GEOCONE"===this.type&&this._rotateOrigin===O$K.APEX){var u,c,h;if(l=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,s,new o$1p(1,1,1),a),!e$2e(this._vertex))return void(this._isMatrixDirty=!1);var d=new p$1d;p$1d.inverse(this._modelMatrix,d);var f=p$1d.clone(this._modelMatrix),p=new p$1d;p$1d.fromScale(r,p);var _=p$1d.multiplyByPoint(d,this._vertex,new o$1p);_=p$1d.multiplyByPoint(p,_,new o$1p),_=p$1d.multiplyByPoint(f,_,new o$1p);var m=o$1p.subtract(_,e,new o$1p);u=p$1d.fromTranslation(m),p$1d.multiply(u,this._modelMatrix,this._modelMatrix),p$1d.multiply(l,this._modelMatrix,this._modelMatrix),p$1d.multiplyByScale(this._modelMatrix,r,this._modelMatrix),h=p$1d.multiplyByPoint(u,_,new o$1p),h=p$1d.multiplyByPoint(l,h,new o$1p);var g=o$1p.subtract(_,h,new o$1p);c=p$1d.fromTranslation(g),p$1d.multiply(c,this._modelMatrix,this._modelMatrix)}else p$1d.multiply(this._modelMatrix,l,this._modelMatrix)}else{e=new o$1p(this.position.x,this.position.y,this.position.z);p$1d.fromTranslation(e,this._modelMatrix,this._modelMatrix)}this._isMatrixDirty=!1},o$11.prototype._createGeometry=function(){},o$11.prototype._getVertexBuffer=function(e){let t=this._getGeometry();return(!e$2e(this._vertexBuffer)||this._vertexBuffer.isDestroyed())&&(this._vertexBuffer=t$X.createVertexBuffer({context:e,typedArray:S$14.createTypedArray(S$14.FLOAT,t.attributes.position.values),usage:A$18.STATIC_DRAW})),this._vertexBuffer},o$11.prototype.getVertexArray=function(e){let t=this._getGeometry(),i=[];i.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var n=t.attributes.normal;e$2e(n)&&T$V(i,"normal",n,1,e);var r=t.attributes.st;return e$2e(r)&&T$V(i,"st",r,2,e),new c$13({context:e,attributes:i,indexBuffer:t$X.createIndexBuffer({context:e,typedArray:t.indices,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})})},o$11.prototype.getOutlineVertexArray=function(e){},t$L.prototype.add=function(e){e instanceof s$N&&this.pntArray.push(e)},t$L.prototype.removeAll=function(){this.pntArray=[]},p$U.prototype=new o$11,p$U.prototype.constructor=p$U,p$U.prototype.parent=o$11.prototype,Object.defineProperties(p$U.prototype,{partCount:{get:function(){return this.parts.length}}}),p$U.prototype.init=function(e){this.parts=[],this.polyline={positions:[],width:10},this.points=[];for(var t=0,i=e.length;t<i;t++){var n=e[t].pntArray.length;if(this.parts.push(n),n>0)for(var r=0;r<n;r++){var o=e[t].pntArray[r];this.points.push(o),this.polyline.positions.push(o)}}this.type=P$U.GEOLINE3D},p$U.prototype.addPart=function(e){if(!(!e instanceof t$L)){for(var t=0,i=e.pntArray.length;t<i;t++)this.points.push(e.pntArray[t]),this.polyline.positions.push(e.pntArray[t]);this.parts.push(e.pntArray.length)}},p$U.prototype.getPart=function(e){if("number"!=typeof e||e>=this.partCount)return null;for(var t=new t$L,i=0,n=0;n<e;n++)i+=this.parts[n];for(n=i;n<this.parts[e];n++)t.add(new s$N(this.points[n].x,this.points[n].y,this.points[n].z));return t};var _0x328f77=(_0x38d620=!0,function(e,t){var i=_0x38d620?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38d620=!1,i}),_0x42ccb3=_0x328f77(void 0,(function(){return _0x42ccb3.toString().search("(((.+)+)+)+$").toString().constructor(_0x42ccb3).search("(((.+)+)+)+$")})),_0x38d620;function _0x733981(e){if(!e$2e(e))throw new t$15("scene are required.");if(!e.context.depthTexture)throw new t$15("the depth buffer is not supported.");if(e$1W.maximumVertexTextureImageUnits<1)throw new t$15("the max of vertexTextureImageUnits less 1, function is not supported.");this._displayMode={LINE:0,FACE:1},this._scene=e,this._depthBuffer=void 0,this._command=void 0,this._lineCommand=void 0,this._viewerCommand=void 0,this._viewerLineCommand=void 0,this._boundingSphere=new i$1d,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._displayStyle=this._displayMode.LINE,this._invertViewMatrix=new p$1d,this._invertViewProjectionMatrix=new p$1d,this._color=new e$2c(1,0,0,1),this._radius=-1,this._ignoreGlobe=!1,this._limitBodys=new e$1Q,this._update=!1,this._visibleViewport=4095,this._id=0,this._name="",this._points=[],this._lineWidth=1,this._lineStripCollection=e.primitives.add(new J$T)}function _0x5a40e5(e){e$2e(e._command)&&(e._command.vertexArray=e._command.vertexArray&&e._command.vertexArray.destroy(),e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e$2e(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0),e$2e(e._faceCommand)&&(e._faceCommand.vertexArray=e._faceCommand.vertexArray&&e._faceCommand.vertexArray.destroy(),e._faceCommand.shaderProgram=e._faceCommand.shaderProgram&&e._faceCommand.shaderProgram.destroy(),e._faceCommand=void 0)}function _0x90d6fc(e){e$2e(e._viewerCommand)&&(e._viewerCommand.vertexArray=e._viewerCommand.vertexArray&&e._viewerCommand.vertexArray.destroy(),e._viewerCommand.shaderProgram=e._viewerCommand.shaderProgram&&e._viewerCommand.shaderProgram.destroy(),e._viewerCommand=void 0),e$2e(e._viewerLineCommand)&&(e._viewerLineCommand.vertexArray=e._viewerLineCommand.vertexArray&&e._viewerLineCommand.vertexArray.destroy(),e._viewerLineCommand.shaderProgram=e._viewerLineCommand.shaderProgram&&e._viewerLineCommand.shaderProgram.destroy(),e._viewerLineCommand=void 0)}function _0x5c8249(e,t,i){var n=e._viewPosition[2],r=5e-4*n;r=r<1?1:r;var o=Math.abs(n)+6378137,a=Math.sqrt((o-6378137)*(o+6378137));n<0&&a<5e4?a=5e4:n<100&&n>0&&(a*=50);var s,l=e._direction*e$2d.RADIANS_PER_DEGREE,u=e._pitch*e$2d.RADIANS_PER_DEGREE,c=i.camera,h=c._projection;if(e._scene.mode===C$14.SCENE3D)s=o$1p.fromDegreesArrayHeights(e._viewPosition,e._scene._globe.ellipsoid)[0];else{var d=a$18.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]);s=h.project(d,new o$1p)}var f=c.frustum.near,p=c.frustum.far,_=new o$1p,m=c.heading,g=c.pitch;o$1p.clone(c.position,_),e._depthBuffer.isUpdate=!0,e._depthBuffer._beginFunc=function(){f=c.frustum.near,p=c.frustum.far,m=c.heading,g=c.pitch,o$1p.clone(c.position,_),c.frustum.near=r,c.frustum.far=a;var t={destination:s,orientation:{heading:l,pitch:u},convert:!1};if(c.setView(t),e.skylineCamera=t,p$1d.clone(c.inverseViewMatrix,e._invertViewMatrix),p$1d.multiply(c.frustum.projectionMatrix,c.viewMatrix,e._invertViewProjectionMatrix),p$1d.inverse(e._invertViewProjectionMatrix,e._invertViewProjectionMatrix),e._scene.mode===C$14.SCENE3D)o$1p.clone(s,e._boundingSphere.center);else{var i=m$19.convertToColumbusCartesian(o$1p.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]));o$1p.clone(i,e._boundingSphere.center)}e._boundingSphere.radius=a},e._depthBuffer._endFunc=function(){if(e$2e(e._lineCommand)){e._lineCommand.modelMatrix=e._invertViewMatrix,e._points.length=0;var i=t.uniformState,n=p$1d.clone(i.inverseProjection),r=p$1d.clone(i.viewProjection),o=o$1o.clone(i.currentFrustum),a=i.log2FarDepthFromNearPlusOne,s=a$18.clone(c.positionCartographic);t.readPixelsAsync({framebuffer:e._depthBuffer.framebuffer}).then((i=>{var l=e._lineCommand.vertexArray.getAttribute(0),u=4*(t.drawingBufferWidth+1),c=S$14.createTypedArray(l.componentDatatype,u);c[0]=0,c[1]=0,c[2]=0,c[3]=1,4*u!==l.vertexBuffer.sizeInBytes&&(_0x5a40e5(e),_0x485912(e,t),l=e._lineCommand.vertexArray.getAttribute(0));for(var h=new e$2c,d=new e$2c(1,1/255,1/65025,1/160581375),f=o.x,p=o.y,_=0;_<t.drawingBufferWidth;_++){for(var m=0,g=t.drawingBufferHeight-1;g>-1;g--){var x=4*(t.drawingBufferWidth*g+_),y=e$2c.unpack(i,x,h);if(e$2c.divideByScalar(y,255,y),(m=e$2c.dot(y,d))>0)break;m=0}if(e._scene.frameState.useLogDepth&&m>0){var v=m*a;m=p*(1-f/(Math.pow(2,v)-1+f))/(p-f)}h.x=_/t.drawingBufferWidth*2-1,h.y=g/t.drawingBufferHeight*2-1,t.webgpu?h.z=m:h.z=2*m-1,h.w=1,p$1d.multiplyByVector(n,h,h);var $=new o$1p(h.x,h.y,h.z);o$1p.divideByScalar($,h.w,$);var b=o$1p.magnitude($);e._radius>0&&b>e._radius&&(o$1p.normalize($,$),$.x*=e._radius,$.y*=e._radius,$.z*=e._radius),h.x=$.x,h.y=$.y,h.z=$.z,h.w=1;var T=o$1p.fromCartesian4(p$1d.multiplyByVector(e._invertViewMatrix,h,new e$2c));e._scene.mode===C$14.COLUMBUS_VIEW&&(T=m$19.convertTo3DCartesian(T)),e._points.push(T),c[4*(_+1)]=h.x,c[4*(_+1)+1]=h.y,c[4*(_+1)+2]=h.z,c[4*(_+1)+3]=h.w}l.vertexBuffer.copyFromArrayView(c,0);for(var C=0;C<e._limitBodys.values.length;C++)e._limitBodys.values[C].update(t,r,o,a,s);e._lineStripCollection.removeAll(),e._lineWidth>=2&&e._lineStripCollection.add({width:e._lineWidth,positions:e._points,material:r$Y.fromType(r$Y.ColorType,{color:e$1X.fromCartesian4(e._color)})})}))}e$2e(e._faceCommand)&&(e._faceCommand.modelMatrix=e._invertViewMatrix),c.setView({destination:_,orientation:{heading:m,pitch:g,roll:c.roll},convert:!1}),c.frustum.near=f,c.frustum.far=p,e._depthBuffer.isUpdate=!1}}function _0x3c37cd(e,t,i){var n=i.camera.frustum,r=10,o=2*Math.atan(n.aspectRatio*Math.tan(.5*n.fovy)),a=r*Math.tan(.5*o),s=r*Math.tan(.5*n.fovy),l=S$14.createTypedArray(S$14.UNSIGNED_SHORT,12),u=S$14.createTypedArray(S$14.UNSIGNED_SHORT,16);l[0]=0,l[1]=2,l[2]=1,l[3]=0,l[4]=4,l[5]=2,l[6]=0,l[7]=3,l[8]=4,l[9]=0,l[10]=1,l[11]=3,u[0]=0,u[1]=1,u[2]=0,u[3]=2,u[4]=0,u[5]=3,u[6]=0,u[7]=4,u[8]=1,u[9]=2,u[10]=1,u[11]=3,u[12]=2,u[13]=4,u[14]=3,u[15]=4;var c=S$14.createTypedArray(S$14.FLOAT,15);c[0]=c[1]=c[2]=0,c[3]=-a,c[4]=-s,c[5]=-10,c[6]=-a,c[7]=s,c[8]=-10,c[9]=a,c[10]=-s,c[11]=-10,c[12]=a,c[13]=s,c[14]=-10;var h=t$X.createVertexBuffer({context:t,typedArray:c,usage:A$18.STATIC_DRAW}),d=[],f={aPosition:0};d.push({name:"aPosition",index:f.aPosition,vertexBuffer:h,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var p=t$X.createIndexBuffer({context:t,typedArray:l,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),_=t$X.createIndexBuffer({context:t,typedArray:u,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});e._viewerLineCommand=new i$$({primitiveType:W$18.LINES,modelMatrix:e._invertViewMatrix,pass:Le$q.ANALYSIS,owner:e,cull:!1}),e._viewerLineCommand.vertexArray=new c$13({context:t,attributes:d,indexBuffer:_}),e._viewerLineCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:f}),e._viewerLineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});for(var m=[],g=0;g<6;g++)m[g]=new e$2c(0,0,0,0);var x=new e$2c(128/255,1,235/255,1);e._viewerLineCommand.uniformMap={uDiffuseColor:function(){return x},clip_mode:function(){return 0},clip_planes:function(){return m},clip_line_color:function(){return e$2c.UNIT_W}},e._viewerCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,pass:Le$q.ANALYSIS,owner:e,cull:!1}),e._viewerCommand.vertexArray=new c$13({context:t,attributes:d,indexBuffer:p}),e._viewerCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:f}),e._viewerCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}});var y=new e$2c(68/255,222/255,158/255,1);e._viewerCommand.uniformMap={uDiffuseColor:function(){return y},clip_mode:function(){return 0},clip_planes:function(){return m},clip_line_color:function(){return e$2c.UNIT_W}}}function _0x485912(e,t,i){var n=t.drawingBufferWidth+1,r=S$14.createTypedArray(S$14.FLOAT,4*n),o=S$14.createTypedArray(S$14.FLOAT,2*n),a=S$14.createTypedArray(S$14.UNSIGNED_SHORT,n-1),s=S$14.createTypedArray(S$14.UNSIGNED_SHORT,n);o[0]=-1;for(var l=1;l<n;l++)o[2*l]=l/(n-1),o[2*l+1]=0;for(l=0;l<n-1;l++)a[l]=l+1,s[l]=l;s[n-1]=n-1;var u=t$X.createVertexBuffer({context:t,typedArray:r,usage:A$18.STATIC_DRAW}),c=[],h={aPosition:0};c.push({name:"aPosition",index:h.aPosition,vertexBuffer:u,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),h.aTexCoord0=1;var d=t$X.createVertexBuffer({context:t,typedArray:o,usage:A$18.STATIC_DRAW});c.push({name:"aTexCoord0",index:h.aTexCoord0,vertexBuffer:d,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var f=t$X.createIndexBuffer({context:t,typedArray:a,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),p=t$X.createIndexBuffer({context:t,typedArray:s,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),_={uSkylineColor:function(){return e._color}};e._lineCommand=new i$$({primitiveType:W$18.LINE_STRIP,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!1}),e._lineCommand.vertexArray=new c$13({context:t,attributes:c,indexBuffer:f}),e._lineCommand.shaderProgram=r$14.fromCache({name:"Skyline",context:t,vertexShaderSource:_0x88ad48,fragmentShaderSource:_0x3315e4,attributeLocations:h}),e._lineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}}),e._lineCommand.uniformMap=_,e._faceCommand=new i$$({primitiveType:W$18.TRIANGLE_FAN,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!1}),e._faceCommand.vertexArray=new c$13({context:t,attributes:c,indexBuffer:p}),e._faceCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:_0x88ad48,fragmentShaderSource:_0x3315e4,attributeLocations:h}),e._faceCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0}}),e._faceCommand.uniformMap=_}_0x42ccb3(),Object.defineProperties(_0x733981.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},color:{get:function(){var e=new e$1X;return e.red=this._color.x,e.green=this._color.y,e.blue=this._color.z,e.alpha=this._color.w,e},set:function(e){this._color.x=e.red,this._color.y=e.green,this._color.z=e.blue,this._color.w=e.alpha,this._lineWidth>=2&&(this._update=!0)}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},displayMode:{get:function(){return this._displayMode}},displayStyle:{get:function(){return this._displayStyle},set:function(e){this._displayStyle=e}},radius:{get:function(){return this._radius},set:function(e){this._radius=e,this._update=!0}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e,this._update=!0}},ignoreGlobe:{get:function(){return this._ignoreGlobe},set:function(e){this._ignoreGlobe=e,e$2e(this._depthBuffer)&&(this._depthBuffer.environmentVisible.isGlobalVisible=!this._ignoreGlobe,this._update=!0)}}}),_0x733981.prototype.update=function(e,t,i){if(!t._fboState.enabled){this._update&&(e$2e(this._depthBuffer)||(this._depthBuffer=new s$U(e),this._depthBuffer.environmentVisible.isGlobalVisible=!this._ignoreGlobe,this._depthBuffer.environmentVisible.isObjectVisible=!0,t._framebufferList[this._name]=this._depthBuffer,this._frameState=t),this._update=!1,_0x5a40e5(this),_0x90d6fc(this),_0x5c8249(this,e,t),_0x3c37cd(this,e,t),_0x485912(this,e));for(var n=0;n<this._limitBodys.values.length;n++){var r=this._limitBodys.values[n];e$2e(r)&&e$2e(r._command)&&i.push(r._command)}e$2e(this._viewerCommand),e$2e(this._viewerLineCommand),this._depthBuffer.isUpdate||(this._displayStyle===this._displayMode.LINE?e$2e(this._lineCommand)&&this._lineWidth<2&&i.push(this._lineCommand):e$2e(this._faceCommand)&&i.push(this._faceCommand))}},_0x733981.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=1<<e,e$2e(this._depthBuffer)&&(this._depthBuffer._visibleViewport=this._visibleViewport)},_0x733981.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0x733981.prototype.getSkyline2D=function(){if(!this._update){for(var e=this._scene.context,t=e.readPixels({framebuffer:this._depthBuffer.framebuffer}),i=(e.drawingBufferWidth,[]),n=[],r=[],o=[],a=new e$2c,s=new e$2c(1,1/255,1/65025,1/160581375),l=0;l<e.drawingBufferWidth;l++)for(var u=e.drawingBufferHeight-1;u>-1;u--){var c=4*(e.drawingBufferWidth*u+l),h=e$2c.unpack(t,c,a);if(e$2c.divideByScalar(h,255,h),e$2c.dot(h,s)>0){i.push(l/e.drawingBufferWidth),n.push(u/e.drawingBufferHeight),r.push(l),o.push(u);break}}return{x:i,y:n,drawingBufferXArr:r,drawingBufferYArr:o}}},_0x733981.prototype.getSkyline2DAsync=function(){if(this._update)return Promise.resolve(void 0);var e=this._scene.context;return e.readPixelsAsync({framebuffer:this._depthBuffer.framebuffer}).then((t=>{e.drawingBufferWidth;for(var i=[],n=[],r=[],o=[],a=new e$2c,s=new e$2c(1,1/255,1/65025,1/160581375),l=0;l<e.drawingBufferWidth;l++)for(var u=e.drawingBufferHeight-1;u>-1;u--){var c=4*(e.drawingBufferWidth*u+l),h=e$2c.unpack(t,c,a);if(e$2c.divideByScalar(h,255,h),e$2c.dot(h,s)>0){i.push(l/e.drawingBufferWidth),n.push(u/e.drawingBufferHeight),r.push(l),o.push(u);break}}var d={x:i,y:n,drawingBufferXArr:r,drawingBufferYArr:o};return Promise.resolve(d)}))},_0x733981.prototype.getSkyline3D=function(){if(!this._update&&0!==this._points.length){for(var e,t=[],i=[],n=[],r=0,o=this._points.length;r<o;r++)e=a$18.fromCartesian(this._points[r]),t.push(e.longitude*e$2d.DEGREES_PER_RADIAN),i.push(e.latitude*e$2d.DEGREES_PER_RADIAN),n.push(e.height);return{x:t,y:i,z:n}}},_0x733981.prototype.addLimitbody=function(e){var t=e.name,i=e.position;if(!e$2e(t)||!e$2e(i))return!1;var n=this._limitBodys.get(t);if(e$2e(n))return!1;n=new _0x6cc60b(i,this),this._limitBodys.set(t,n),e$2e(this._depthBuffer)&&(this._depthBuffer.isUpdate=!0)},_0x733981.prototype.removeLimitbody=function(e){return!!this._limitBodys.remove(e)},_0x733981.prototype.removeAllLimitBody=function(){for(var e=0;e<this._limitBodys.values.length;e++)this._limitBodys.values[e].destroy(),this._limitBodys.values[e]=null;this._limitBodys.removeAll()},_0x733981.prototype.clear=function(){this.removeAllLimitBody(),this._update=!1,this._lineStripCollection.removeAll(),this._points=[],_0x5a40e5(this),_0x90d6fc(this)},_0x733981.prototype.getObjectIds=function(){this._scene.renderIds(this.skylineCamera);var e=this._scene._defaultView.pickFramebuffer;if(e$2e(e)){var t=this._scene._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=t.readPixels({x:0,y:0,width:i,height:n,framebuffer:e._fb}),o=this.getSkyline2D();if(e$2e(o)){for(var a,s,l=o.drawingBufferXArr,u=o.drawingBufferYArr,c=l.length,h={};c--;){a=l[c],s=u[c];var d=e$2c.fromArray(r,4*i*s+4*a),f=e$1X.byteToRgba(d.x,d.y,d.z,d.w),p=t.getObjectByPickId(f);if(e$2e(p)){var _=p.primitive.id;f=p.id;e$2e(h[_])||(h[_]=[]),-1===h[_].indexOf(f)&&h[_].push(f)}}return h}}},_0x733981.prototype.getObjectIdsAsync=function(){this._scene.renderIds(this.skylineCamera);var e=this._scene._defaultView.pickFramebuffer;if(!e$2e(e))return Promise.resolve(void 0);var t=this._scene._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return t.readPixelsAsync({x:0,y:0,width:i,height:n,framebuffer:e._fb}).then((e=>this.getSkyline2DAsync().then((n=>{if(!e$2e(n))return Promise.resolve(void 0);for(var r,o,a=n.drawingBufferXArr,s=n.drawingBufferYArr,l=a.length,u={};l--;){r=a[l],o=s[l];var c=e$2c.fromArray(e,4*i*o+4*r),h=e$1X.byteToRgba(c.x,c.y,c.z,c.w),d=t.getObjectByPickId(h);if(e$2e(d)){var f=d.primitive.id;h=d.id;e$2e(u[f])||(u[f]=[]),-1===u[f].indexOf(h)&&u[f].push(h)}}return Promise.resolve(u)}))))},_0x733981.prototype.getSkylineSectorParameter=function(){var e=this.getSkyline3D();if(e$2e(e)){for(var t,i,n,r=e.x,o=e.y,a=e.z,s=new t$L,l=0,u=r.length;l<u;l++)t=r[l],i=o[l],n=a[l],s.add(new s$N(t,i,n));return{geoLine3D:new p$U([s]),viewPos:new s$N(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2])}}},_0x733981.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("Skyline"),""===this._name&&(this._name="skyline"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},_0x733981.prototype.destroy=function(){return e$2e(this._frameState)&&(e$2e(this._depthBuffer)&&delete this._frameState._framebufferList[this._name],this._frameState=void 0),this._depthBuffer=this._depthBuffer&&this._depthBuffer.destroy(),_0x5a40e5(this),_0x90d6fc(this),this.removeAllLimitBody(),this._scene._analyst3D.remove(this._name,!0),i$11(this)};var _0x1d5ee6=(_0x196c38=!0,function(e,t){var i=_0x196c38?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x196c38=!1,i}),_0x542244=_0x1d5ee6(void 0,(function(){return _0x542244.toString().search("(((.+)+)+)+$").toString().constructor(_0x542244).search("(((.+)+)+)+$")})),_0x196c38;_0x542244();var _0x12eef8="\n#ifdef SQRESULT\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \nvarying vec4 vSecondColor; \nvarying vec4 vColor;\nvarying vec4 vSQ_clip_pos; \n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef SQRESULT\nbool isPointInObject(vec4 ndc)\n{\n vec2 depthTexCoord = ndc.xy * 0.5 + 0.5;\n bool bIn = false;\n vec4 color = texture2D(uFrontColorTexture, depthTexCoord);\n float pixelZWindow = 0.0;\n#ifdef WEBGPU\n pixelZWindow = ndc.z;\n#else\n pixelZWindow = ndc.z * 0.5 + 0.5;\n#endif\n if(color.r > 0.99 && color.g < 0.01 && color.b < 0.01)\n {\n float z_window_near = czm_unpackDepth(texture2D(uFrontDepthTexture, depthTexCoord.xy));\n z_window_near = czm_reverseLogDepth(z_window_near);\n float z_window_far = czm_unpackDepth(texture2D(uBackDepthTexture, depthTexCoord.xy));\n z_window_far = czm_reverseLogDepth(z_window_far);\n if(pixelZWindow - z_window_near > -0.0000001 && z_window_far - pixelZWindow > -0.0000001)\n {\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\n#endif\nvoid main() \n{\n#ifdef SQRESULT\n vec4 ndc = vSQ_clip_pos / vSQ_clip_pos.w; \n if(!isPointInObject(ndc)) \n { \n discard; \n } \n if(vColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = vSecondColor; \n#endif\n#ifdef DEPTH\n #ifdef LOG_DEPTH\n czm_writeLogDepth();\n gl_FragColor = czm_packDepth(gl_FragDepthEXT);\n #else\n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n #endif\n#endif\n#ifdef COLOR\n gl_FragColor = vec4(1.0,0.0,0.0,1.0);\n#endif\n}";function s$M(e){var t=new n$$(e);t.blendingEnabled=!0,t.viewport=new f$1a,this._context=e,this._pixelDatatype=_$_.UNSIGNED_BYTE,this._fb=new t$V({context:e,colorTextures:[new t$U({context:e,width:1,height:1})],depthStencilTexture:new t$U({context:e,width:1,height:1,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})}),this._passState=t,this.mrtSupport=e.drawBuffers&&e.colorBufferFloat&&e.depthTexture,this.mrt=!1,this._mrt=!1,this._width=1,this._height=1,this._clearCommand=new t$W({color:new e$1X(0,0,0,0),stencil:0,depth:1}),this._clearCommand.framebuffer=this._fb,this._generateMipmap=!1}function t$K(e){this._renderTexture=new s$M(e),this._renderTexture._passState.blendingEnabled=!1,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0},this._type=Qe$c.SQRESULT,this._beginFunc=void 0,this._endFunc=void 0}s$M.prototype.update=function(e){var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=de$y.FRAMEBUFFER_COMPLETE;if(!e$2e(this._fb)||this._width!==i||this._height!==n||this.mrt!==this._mrt){this._width=i,this._height=n,this._fb=this._fb&&this._fb.destroy();var o=[new t$U({context:t,width:i,height:n,pixelDatatype:this._pixelDatatype,sampler:new e$1S({minificationFilter:this._generateMipmap?tt$i.LINEAR_MIPMAP_LINEAR:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})];this.mrt!==this._mrt&&this.mrt&&this.mrtSupport&&o.push(new t$U({context:t,width:i,height:n,pixelDatatype:this._pixelDatatype,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}));var a=new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8});this._fb=new t$V({context:t,colorTextures:o,depthStencilTexture:a}),this._clearCommand.framebuffer=this._fb,this._passState.framebuffer=this._fb,this._mrt=this.mrt,this._fb.status!==r&&(this._fb=this._fb&&this._fb.destroy())}this._clearCommand.execute(t,this._passState)},s$M.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),i$11(this)},Object.defineProperties(t$K.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return this._type},set:function(e){this._type=e}}}),t$K.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._beginFunc&&this._beginFunc(e),this._renderTexture._passState},t$K.prototype.end=function(e){this._endFunc&&this._endFunc(e)},t$K.prototype.update=function(e,t){},t$K.prototype.isDestroyed=function(){return!1},t$K.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)};var e$1A={Disjoint:0,Intersects:1,Contains:2},j$Z=Object.freeze(e$1A),e$1z={Fill:0,WireFrame:1,Fill_And_WireFrame:2},fr$3=Object.freeze(e$1z),_0x220e1a=(_0x2e9c3a=!0,function(e,t){var i=_0x2e9c3a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e9c3a=!1,i}),_0x55ea1f=_0x220e1a(void 0,(function(){return _0x55ea1f.toString().search("(((.+)+)+)+$").toString().constructor(_0x55ea1f).search("(((.+)+)+)+$")})),_0x2e9c3a;_0x55ea1f();var _0x4c39c3="attribute vec4 aPosition;\nattribute vec4 aNormal;\nuniform vec4 uDiffuseColor;\nvarying vec4 vColor;\nvarying vec3 normalEC;\nvarying vec3 positionEC;\nvoid main()\n{\n normalEC = czm_normal * aNormal.xyz;\n positionEC = (czm_modelView * aPosition).xyz;\n vColor = uDiffuseColor;\n #ifdef USE_RelativeOrigin\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz - czm_relativeOrigin, 1.0);\n #else\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n #endif\n}",_0x407ef6=(_0xdb1c64=!0,function(e,t){var i=_0xdb1c64?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xdb1c64=!1,i}),_0x5370ec=_0x407ef6(void 0,(function(){return _0x5370ec.toString().search("(((.+)+)+)+$").toString().constructor(_0x5370ec).search("(((.+)+)+)+$")})),_0xdb1c64;_0x5370ec();var _0x37e2ae="varying vec4 vColor;\nvarying vec3 normalEC;\nvarying vec3 positionEC;\nvoid main()\n{\n vec3 positionToEyeEC = -positionEC;\n vec4 color = czm_gammaCorrect(vColor);\n czm_materialInput materialInput;\n materialInput.normalEC = normalize(normalEC);\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = vColor.rgb;\n material.alpha = vColor.a;\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}",_0x2d26af=(_0x1b1a73=!0,function(e,t){var i=_0x1b1a73?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b1a73=!1,i}),_0x4966a9=_0x2d26af(void 0,(function(){return _0x4966a9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4966a9).search("(((.+)+)+)+$")})),_0x1b1a73;_0x4966a9();var _0x4b6e8f="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TEXTURE\nattribute vec4 aTexCoord0;\n#endif\n#ifdef VertexColor\n #ifdef WEBGPU\n attribute uvec4 aColor;\n #else\n attribute vec4 aColor;\n #endif\n#endif\nattribute vec3 aPosHigh;\nattribute vec3 aPosLow;\nattribute vec4 aQuaternion;\nattribute vec4 aScaleAndRadius;\nattribute vec4 aColor2;\nattribute vec4 aPickColor;\nattribute vec3 aOffset;\n#ifdef LocalTransform\nattribute vec4 aLocalTranslation;\nattribute vec4 aLocalQuaternion;\n#endif\n#include <SceneUboDecl>\nuniform vec4 uFillColor;\nuniform mat4 uGeoMat;\nuniform float uRangeMode;\nuniform vec2 uVisibleDistance;\nuniform float uFilterPixel;\nuniform float uMixColorType;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec4 vPositionWC;\nvarying vec3 vNormalEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying mat4 vModelMatrix;\n#ifdef Volume\n attribute vec3 aRatio;\n varying vec3 vecRotioCoord;\n varying vec2 vecHypTexCoord;\n#endif\n\nmat4 transfromFromQuaternion(vec4 q, vec4 translation)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, translation.x, translation.y, translation.z, 1.0);\n}\nfloat filterTest(vec3 rte, float radius)\n{\n if(uRangeMode > 0.0)\n {\n float distance = length(rte);\n float theta = czm_piOverFour * 0.5;\n float screenPix = max(czm_globeDepthTextureDim.x, czm_globeDepthTextureDim.y) * 0.5;\n float lamat = screenPix / tan(theta);\n return lamat * radius / distance > uFilterPixel ? 1.0 : 0.0;\n }\n return length(rte) < uVisibleDistance.x && length(rte) > uVisibleDistance.y ? 1.0 : 0.0;\n}\nvec4 translateRelativeToEye(vec3 high,vec3 low) {\n vec3 highDifference = high - czm_encodedOriginCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedOriginCameraPositionMCLow;\n return vec4(highDifference + lowDifference, 1.0);\n}\nvoid main()\n{\n vec4 vertexPos = vec4(aPosition.xyz, 1.0) - vec4(aOffset.xyz,0.0);\n vec4 positionMC = uGeoMat*vertexPos;\n vec4 rte = translateRelativeToEye(aPosHigh,aPosLow);\n#ifdef TEXTURE\n vTexCoord = aTexCoord0.xy;\n#endif\n float show = filterTest(rte.xyz, aScaleAndRadius.w);\n mat4 rotationMat = transfromFromQuaternion(aQuaternion, vec4(0.0));\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMat[0].xyz,0.0);\n worldMatrix[1] = vec4(rotationMat[1].xyz,0.0);\n worldMatrix[2] = vec4(rotationMat[2].xyz,0.0);\n worldMatrix[3] = vec4(rte.x,rte.y,rte.z,1.0);\n mat4 scaleMatrix;\n vec3 scale = aScaleAndRadius.xyz;\n scaleMatrix[0] = vec4(scale.x,0,0,0.0);\n scaleMatrix[1] = vec4(0,scale.y,0,0.0);\n scaleMatrix[2] = vec4(0,0,scale.z,0.0);\n scaleMatrix[3] = vec4(0,0,0,1.0);\n mat4 modelMatrix = worldMatrix;\n#ifdef LocalTransform\n mat4 localTransformMat = transfromFromQuaternion(aLocalQuaternion, aLocalTranslation);\n modelMatrix *= localTransformMat;\n#endif\n modelMatrix *= scaleMatrix;\n mat3 rotationMatrix = mat3(modelMatrix);\n positionMC = modelMatrix * vec4(positionMC.xyz, 1.0);\n positionMC.w = 1.0;\n gl_Position = show * czm_modelViewProjectionRelativeToEye * positionMC;\n vPositionMC.xyz = positionMC.xyz;\n vPositionWC = modelMatrix * positionMC;\n vPositionMC.w = 0.0;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = aColor / 255.0;\n #endif\n#endif\n if(abs(uMixColorType) < 0.1)\n {\n vColor = vertexColor * aColor2;\n }\n else\n {\n vColor = aColor2;\n }\n vPickColor = aPickColor / 255.0;\n vModelMatrix = modelMatrix * uGeoMat;\n vPositionEC = (czm_modelViewRelativeToEye * vec4(vPositionMC.xyz, 1.0)).xyz;\n#ifdef HAS_NORMAL\n if(length(aNormal) > 0.8)\n {\n mat4 modelView = uView * vModelMatrix;\n mat4 invModelView = czm_inverseMatrix(modelView);\n mat3 invModelViewRotation = mat3(invModelView);\n mat3 normalMatrix = czm_transpose(invModelViewRotation);\n vNormalEC = normalize(normalMatrix * aNormal);\n vPositionMC.w = 1.0;\n }\n#endif\n#ifdef Volume\nvecRotioCoord = aRatio;\n#endif\n#ifdef ClampObject\n gl_Position = czm_depthClampFarPlane(czm_modelViewProjectionRelativeToEye*positionMC);\n vColor = vColor * uFillColor;\n#endif\n}\n";function o$10(e,t,i){return p$$({url:e,responseType:"arraybuffer",headers:t,request:i})}var g$11=273;function P$T(e,t,i){switch(e){case de$y.COMPRESSED_RGB_S3TC_DXT1_EXT:case de$y.COMPRESSED_RGB_ETC1_WEBGL:return(t+3>>2)*(i+3>>2)*8;case de$y.COMPRESSED_RGBA_S3TC_DXT5_EXT:return(t+3>>2)*(i+3>>2)*16;case de$y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG:case de$y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case de$y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG:case de$y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case g$11:return t*i*2;case V$12.RGBA:return t*i*4;case V$12.LUMINANCE_ALPHA:return t*i*2;default:return 0}}var o$$=function(e,t,i,n,r,o,a,s,l,u,c,h){this._context=t,this._gl=t._gl,this._width=i,this._height=n,this._imageBuffer=o,this._oriCompressType=h,this._texture=null,this._internalFormat=r,this._isCompressed=V$12.isCompressedFormat(r),this._wrapS=u$Z(s,q$1a.CLAMP_TO_EDGE),this._wrapT=u$Z(l,q$1a.CLAMP_TO_EDGE),this._pixelDataType=u$Z(u,_$_.UNSIGNED_BYTE),this._pixelDataType===_$_.FLOAT&&(this._wrapS=q$1a.CLAMP_TO_EDGE,this._wrapT=q$1a.CLAMP_TO_EDGE),this.ready=!1,this.is3D=a,this.id=e,this._target=this._gl.TEXTURE_2D,this._size=o.length,this._mipmapEnabled=u$Z(c,!0),1==this.is3D?this.init3DTexture():(this._target=this._gl.TEXTURE_2D,this._initTexture2D()),V$12.isCompressedFormat(this._internalFormat)?this._sizeInBytes=V$12.compressedTextureSizeInBytes(this._internalFormat,this._width,this._height):this._sizeInBytes=this._width*this._height*4,this._context.memorySize+=this._sizeInBytes};function M$X(e,t,i,n){var r=1;if(!e$2d.isPowerOfTwo(i)||!e$2d.isPowerOfTwo(n))return 1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=V$12.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l==o?r:1}function d$17(e,t,i){var n=e.length,r=Math.ceil(Math.sqrt(n)),o=document.createElement("canvas");o.width=t*r,o.height=i*r;var a=o.getContext("2d");a.fillStyle="#00f",a.fillRect(0,0,o.width,o.height);for(var s=0;s<n;s++){var l=e[s%n],u=s%r,c=Math.floor(s/r);a.drawImage(l,u*t,c*i)}return a.getImageData(0,0,t*r,i*r)}function g$10(e,t,i){switch(e){case de$y.COMPRESSED_RGB_S3TC_DXT1_EXT:case de$y.COMPRESSED_RGB_ETC1_WEBGL:return(t+3>>2)*(i+3>>2)*8;case de$y.COMPRESSED_RGBA_S3TC_DXT5_EXT:return(t+3>>2)*(i+3>>2)*16;case de$y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG:case de$y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case de$y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG:case de$y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case V$12.RGB:return t*i*3;case V$12.RGBA:return t*i*4;case V$12.LUMINANCE_ALPHA:return t*i*2;default:return 0}}Object.defineProperties(o$$.prototype,{width:{get:function(){return this._width}},height:{get:function(){return this._height}},size:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._sizeInBytes}},pixelDataType:{get:function(){return this._pixelDataType}}}),o$$.prototype._initTexture2D=function(){var e=this._gl;this._texture=e.createTexture(),this._uploadImageData(!1),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$$.prototype.generateMipmap=function(){var e=I$1e.NICEST;if(this._width>1&&!e$2d.isPowerOfTwo(this._width))throw new DeveloperError("width must be a power of two to call generateMipmap().");if(this._height>1&&!e$2d.isPowerOfTwo(this._height))throw new DeveloperError("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},o$$.prototype.updateTexture=function(e,t,i){this.ready=!1,this._width=i.width,this._height=i.height,this._internalFormat=i.internalFormat,this._pixelDataType=i.pixelDataType,this._wrapS=i.wrapS,this._wrapT=i.wrapT,this._mipmapEnabled=u$Z(i.mipmapEnabled,!0);var n=this._gl;this.id=e,this._size=t.length,this._target=n.TEXTURE_2D,this._imageBuffer=t,this._uploadImageData(!0),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$$.prototype._uploadImageData=function(e){var t=this._internalFormat,i=this._width,n=this._height,r=this._imageBuffer,o=this._gl;o.bindTexture(o.TEXTURE_2D,this._texture),t===V$12.LUMINANCE_ALPHA||0===this._oriCompressType?o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1):(t==V$12.RGB||t==V$12.RGBA||t===g$11)&&o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!0);var a,s=M$X(r,t,i,n);this._context.webgl2&&!e&&t!==de$y.LUMINANCE_ALPHA&&(a=t===g$11?o.RGB565:V$12.toInternalFormat(t,this._pixelDataType,this._context),o.texStorage2D(o.TEXTURE_2D,s,a,i,n));var l=s>1&&this._mipmapEnabled,u=0,c=0;do{var h,d=P$T(t,i,n);h=t==V$12.RGBA&&this._pixelDataType===_$_.FLOAT?new Float32Array(r.buffer,r.byteOffset+u,d):new Uint8Array(r.buffer,r.byteOffset+u,d),this._isCompressed?this._context.webgl2?o.compressedTexSubImage2D(o.TEXTURE_2D,c++,0,0,i,n,t,h):o.compressedTexImage2D(o.TEXTURE_2D,c++,t,i,n,0,h):this._context.webgl2?t===g$11?(o.texSubImage2D(o.TEXTURE_2D,0,0,0,i,n,o.RGB,o.UNSIGNED_SHORT_5_6_5,r),d/=2):t===V$12.LUMINANCE_ALPHA?o.texImage2D(o.TEXTURE_2D,0,t,i,n,0,t,o.UNSIGNED_BYTE,h):o.texSubImage2D(o.TEXTURE_2D,c++,0,0,i,n,t,this._pixelDataType,h):t===g$11?(o.texImage2D(o.TEXTURE_2D,0,o.RGB,i,n,0,o.RGB,o.UNSIGNED_SHORT_5_6_5,r),d/=2):o.texImage2D(o.TEXTURE_2D,c++,t,i,n,0,t,this._pixelDataType,h),i=Math.max(i>>1,1),n=Math.max(n>>1,1),u+=d}while(u<r.length&&l);c>1?(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),e$2d.isPowerOfTwo(this._width)&&e$2d.isPowerOfTwo(this._height)?o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR_MIPMAP_LINEAR):o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR)):e$2d.isPowerOfTwo(this._width)&&e$2d.isPowerOfTwo(this._height)&&t==V$12.RGBA?(this.generateMipmap(),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR_MIPMAP_LINEAR)):(o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR)),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,this._wrapS),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,this._wrapT),o.bindTexture(o.TEXTURE_2D,null)},o$$.prototype.init3DTexture=function(){for(var e=this._imageBuffer,t=this._gl,i=d$17(e,this._width,this._height),n=i.width*i.height*4,r=new Uint8Array(n),o=0;o<n;o++)r[o]=i.data[o];t=this._gl;this._texture=t.createTexture(),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,this._texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),e.length,t.texImage2D(t.TEXTURE_2D,0,t.RGBA,i.width,i.height,0,t.RGBA,t.UNSIGNED_BYTE,r),t.bindTexture(t.TEXTURE_2D,null),this.ready=!0},o$$.prototype.destroy=function(){this._gl.deleteTexture(this._texture),this._texture=null,this.ready=!1,this.id=0,this._context.memorySize-=this._sizeInBytes},o$$.prototype.enable=function(){this.ready&&(this._gl.activeTexture(this._gl.TEXTURE0),this._gl.bindTexture(this._target,this._texture))},o$$.prototype.disable=function(){this.ready&&this._gl.bindTexture(this._target,null)};var o$_=function(e,t,i,n,r,o,a,s,l,u,c,h){this._context=t,this._width=i,this._height=n,this._imageBuffer=o,this._oriCompressType=h,this._texture=null,this._internalFormat=r,this._isCompressed=V$12.isCompressedFormat(r),this._wrapS=u$Z(s,q$1a.CLAMP_TO_EDGE),this._wrapT=u$Z(l,q$1a.CLAMP_TO_EDGE),this._pixelDataType=u$Z(u,_$_.UNSIGNED_BYTE),this._pixelDataType===_$_.FLOAT&&(this._wrapS=q$1a.CLAMP_TO_EDGE,this._wrapT=q$1a.CLAMP_TO_EDGE),this.ready=!1,this.is3D=a,this.id=e,this._size=o.length,this._mipmapEnabled=u$Z(c,!0),1==this.is3D||this._initTexture2D(),V$12.isCompressedFormat(this._internalFormat)?this._sizeInBytes=V$12.compressedTextureSizeInBytes(this._internalFormat,this._width,this._height):this._sizeInBytes=this._width*this._height*4,this._context.memorySize+=this._sizeInBytes};function G$15(e,t,i,n){var r=1;if(!e$2d.isPowerOfTwo(i)||!e$2d.isPowerOfTwo(n))return!1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=V$12.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l==o?r:1}Object.defineProperties(o$_.prototype,{width:{get:function(){return this._width}},height:{get:function(){return this._height}},size:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._sizeInBytes}},pixelDataType:{get:function(){return this._pixelDataType}},thinTexture:{get:function(){return this._texture}},internalTexture:{get:function(){return this._texture._texture}}}),o$_.prototype._initTexture2D=function(){this._uploadImageData(),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$_.prototype.generateMipmap=function(){console.log("DDSTextureGPU.prototype.generateMipmap")},o$_.prototype.updateTexture=function(e,t,i){this.ready=!1,this._width=i.width,this._height=i.height,this._internalFormat=i.internalFormat,this._pixelDataType=i.pixelDataType,this._wrapS=i.wrapS,this._wrapT=i.wrapT,this._mipmapEnabled=u$Z(i.mipmapEnabled,!0),this.id=e,this._size=t.length,this._imageBuffer=t,this._uploadImageData(),delete this._imageBuffer,this._imageBuffer=null,this.ready=!0},o$_.prototype._uploadImageData=function(){var e=this._context.engine,t=this._internalFormat,i=this._width,n=this._height,r=this._imageBuffer,o=G$15(r,t,i,n),a=o>1&&this._mipmapEnabled;t!==V$12.LUMINANCE_ALPHA&&0!==this._oriCompressType&&(t==V$12.RGB||V$12.RGBA);var s=R$12.toPixelFormat(t),l=R$12.toPixelType(this._pixelDataType),u=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE;if((this._pixelDataType==_$_.FLOAT||this._pixelDataType==_$_.HALF_FLOAT)&&(u=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE),!e$2e(this._texture)){var c=e.createRawTexture(null,i,n,s,!1,!1,u,null,l,0,!1,o);this._texture=new _0x4f1603(c)}var h=0,d=0;do{var f,p=g$10(t,i,n);f=t==V$12.RGBA&&this._pixelDataType===_$_.FLOAT?new Float32Array(r.buffer,r.byteOffset+h,p):new Uint8Array(r.buffer,r.byteOffset+h,p),e.updateSubRawTexture(this._texture._texture,f,s,!1,null,l,!1,i,n,0,0,d++),i=Math.max(i>>1,1),n=Math.max(n>>1,1),h+=p}while(h<r.length&&a)},o$_.prototype.destroy=function(){this._texture.dispose(),this.ready=!1,this.id=0,this._context.memorySize-=this._sizeInBytes},o$_.prototype.enable=function(){console.log("DDSTextureGPU.prototype.enable")},o$_.prototype.disable=function(){console.log("DDSTextureGPU.prototype.disable")};var _0x4e788a=(_0x2b528d=!0,function(e,t){var i=_0x2b528d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b528d=!1,i}),_0x14653d=_0x4e788a(void 0,(function(){return _0x14653d.toString().search("(((.+)+)+)+$").toString().constructor(_0x14653d).search("(((.+)+)+)+$")})),_0x2b528d;_0x14653d();var _0x5e76de=function(e,t,i,n,r,o,a,s,l,u,c,h){t.webgpu?this._inner=new o$_(e,t,i,n,r,o,a,s,l,u,c,h):this._inner=new o$$(e,t,i,n,r,o,a,s,l,u,c,h)};Object.defineProperties(_0x5e76de.prototype,{width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},size:{get:function(){return this._inner.size}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},pixelDataType:{get:function(){return this._inner.pixelDataType}},ready:{get:function(){return this._inner.ready}},is3D:{get:function(){return this._inner.is3D}},id:{get:function(){return this._inner.id}},context:{get:function(){return this._inner._context}},_target:{get:function(){return this._inner._target}},_texture:{get:function(){return this._inner._texture}}}),_0x5e76de.prototype.generateMipmap=function(){this._inner.generateMipmap()},_0x5e76de.prototype.updateTexture=function(e,t,i){this._inner.updateTexture(e,t,i)},_0x5e76de.prototype.init3DTexture=function(){this._inner.init3DTexture()},_0x5e76de.prototype.destroy=function(){this._inner.destroy()},_0x5e76de.prototype.enable=function(){this._inner.enable()},_0x5e76de.prototype.disable=function(){this._inner.disable()};var _0x5cc7a6=(_0x5199b2=!0,function(e,t){var i=_0x5199b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5199b2=!1,i}),_0x5ac9fa=_0x5cc7a6(void 0,(function(){return _0x5ac9fa.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ac9fa).search("(((.+)+)+)+$")})),_0x5199b2;_0x5ac9fa();var _0x128e14={encNONE:0,enrS3TCDXTN:14,enrPVRTPF_PVRTC2:19,enrPVRTPF_PVRTC:20,enrPVRTPF_PVRTC_4bpp:21,enrPVRTPF_ETC1:22},_0x22a8f5=Object.freeze(_0x128e14),_0x1e44bc=(_0x4792b6=!0,function(e,t){var i=_0x4792b6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4792b6=!1,i}),_0x31f3d0=_0x1e44bc(void 0,(function(){return _0x31f3d0.toString().search("(((.+)+)+)+$").toString().constructor(_0x31f3d0).search("(((.+)+)+)+$")})),_0x4792b6;_0x31f3d0();var _0x3d1e8e={LUMINANCE_8:1,LUMINANCE_16:2,ALPHA:3,ALPHA_4_LUMINANCE_4:4,LUMINANCE_ALPHA:5,RGB_565:6,BGR565:7,RGB:10,BGR:11,ARGB:12,ABGR:13,BGRA:14,WEBP:25,RGBA:28,DXT1:17,DXT2:18,DXT3:19,DXT4:20,DXT5:21,CRN_DXT5:26,STANDARD_CRN:27,KTX2:31},_0x2ddc8c=Object.freeze(_0x3d1e8e),e$1y={DisplayMode:{NONE:0,FACE:1,LINE:2,FACE_AND_LINE:3},AnalysisRegionMode:{ARM_NONE:0,ARM_ALL:1,ARM_REGION:2},FilterMode:{LINEAR:0,NEAREST:1}},k$S=Object.freeze(e$1y),_0x2d571e=(_0x5b25db=!0,function(e,t){var i=_0x5b25db?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b25db=!1,i}),_0x28ba46=_0x2d571e(void 0,(function(){return _0x28ba46.toString().search("(((.+)+)+)+$").toString().constructor(_0x28ba46).search("(((.+)+)+)+$")})),_0x5b25db;_0x28ba46();var _0x418acb={MIX:0,REPLACE:1,SILHOUETTE:2,ALWAYS_SHOW_SILHOUETTE:3,SILHOUETTE_EDGE:4,WIREFRAME:5},Zr$3=Object.freeze(_0x418acb);function i$T(){this._dictTable=new e$1Q,this._imageBuffer=new Uint8Array(262144),this._sortKey=[]}function d$16(e,t){return e-t}function u$L(){this._maxVisibleValue=17976931348623157e292,this._minVisibleValue=-17976931348623157e292,this._floor=0,this._ceiling=0,this._opacity=1,this._updateColorDictTable=!1,this._coverageArea=[],this._linesInterval=100,this._updatePolygon=!0,this._lineColor=new e$1X(0,1,1,1),this._displayMode=k$S.DisplayMode.FACE,this._dictColorTable=void 0,this._emissionTextureUrl="",this._emissionTextureChanged=!1,this._emissionTexCoordSpeed=new o$1p(0,0),this._emissionTexCoordScale=new o$1p(50,50),this._emissionTextureArray=[],this._loadedEmissionTexture=0,this._noValueColor=new e$1X(1,1,1,1),this._textureFilterMode=k$S.FilterMode.LINEAR,this._visibleDistanceMax=Number.MAX_VALUE,this._visibleDistanceMin=0,this._minVisibleAltitude=0,this._maxVisibleAltitude=Number.MAX_VALUE}i$T.prototype.destroy=function(){this._dictTable.removeAll(),this._imageBuffer=null,this._sortKey=null},i$T.prototype.getItem=function(e){if(e>this._dictTable.values.length-1)return null;var t=[];for(var i in this._dictTable._hash)t.push(parseFloat(i));t.sort(d$16);var n=t[e];return e$2e(n)?{altitude:n,color:this._dictTable.get(n)}:null},i$T.prototype.count=function(){return this._dictTable.values.length},i$T.prototype.insert=function(e,t){if(!e$2e(this._dictTable.get(e))){var i=e$1X.clone(t,i);this._dictTable.set(e,i)}},i$T.prototype.remove=function(e){return this._dictTable.remove(e)},i$T.prototype.clear=function(){this._dictTable.values.length=0},i$T.clone=function(e,t){if(e$2e(e)){e$2e(t)||(t=new i$T),e$1Q.clone(e._dictTable,t._dictTable);for(var i=0;i<e._imageBuffer.length;i++)t._imageBuffer[i]=e._imageBuffer[i];return t}},i$T.prototype.generateBuffer=function(){var e=[],t=0;for(var i in this._dictTable._hash)if(e$2e(i)){var n=this._dictTable.get(i);e[t++]={value:parseFloat(i),color:n}}if(!(e.length<2)){for(t=0;t<e.length-1;t++)for(var r=e[t],o=t+1;o<e.length;o++){var a=e[o];if(r.value>a.value){var s=l$1f(e[t],!0);e[t]=l$1f(e[o],!0),e[o]=s,r=e[t]}}var l=e[0].value,u=e[e.length-1].value-l,c=document.createElement("canvas");c.width=16384,c.height=1;var h=c.getContext("2d");h.beginPath();var d=h.createLinearGradient(0,0,16384,0);for(t=0;t<e.length;t++)d.addColorStop((e[t].value-l)/u,e[t].color.toCssColorString());h.fillStyle=d,h.rect(0,0,c.width,c.height),h.fill();var f=h.getImageData(0,0,c.width,1).data;for(o=0;o<16;o++)for(t=0;t<4096;t++)this._imageBuffer[t+1024*o*4*4]=f[t+1024*o*4],this._imageBuffer[t+1024*o*4*4+4096]=f[t+1024*o*4],this._imageBuffer[t+1024*o*4*4+8192]=f[t+1024*o*4],this._imageBuffer[t+1024*o*4*4+12288]=f[t+1024*o*4];for(var i in this._dictTable._hash)this._sortKey.push(parseFloat(i));return this._sortKey.sort(d$16),c}},i$T.prototype.getColor=function(e){for(var t=0;t<this._sortKey.length;t++)if(this._sortKey[t]>=e||Math.abs(this._sortKey[t]-e)<e$2d.EPSILON6)return this._dictTable.get(this._sortKey[t])},u$L.prototype.destroy=function(){this._coverageArea.length=0,e$2e(this._dictColorTable)&&this._dictColorTable.destroy()},Object.defineProperties(u$L.prototype,{MinVisibleValue:{get:function(){return this._minVisibleValue},set:function(e){this._minVisibleValue=e}},MaxVisibleValue:{get:function(){return this._maxVisibleValue},set:function(e){this._maxVisibleValue=e}},ColorTableMaxKey:{get:function(){return this._ceiling},set:function(e){this._ceiling=e}},ColorTableMinKey:{get:function(){return this._floor},set:function(e){this._floor=e}},ColorTable:{get:function(){return this._dictColorTable},set:function(e){if(e$2e(e)){this._dictColorTable=i$T.clone(e,this._dictColorTable),this._updateColorDictTable=!0;var t=this._dictColorTable.count();if(!(t<1)){new e$1X;var i=0,n=0,r=this._dictColorTable.getItem(0);e$2e(r)&&e$2e(r.altitude)&&(i=parseFloat(r.altitude)),e$2e(r=this._dictColorTable.getItem(t-1))&&e$2e(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n)}}else e$2e(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null)}},Opacity:{get:function(){return this._opacity},set:function(e){this._opacity=e}},CoverageArea:{get:function(){return this._coverageArea},set:function(e){if(this._updatePolygon=!0,this._coverageArea.length=0,e$2e(e))for(var t=0;t<e.length;t++)this._coverageArea[t]=e[t]}},DisplayMode:{get:function(){return this._displayMode},set:function(e){this._displayMode=e}},LineColor:{get:function(){return this._lineColor},set:function(e){e$1X.clone(e,this._lineColor)}},LineInterval:{get:function(){return this._linesInterval},set:function(e){this._linesInterval=e}},UpdateColorDictTable:{get:function(){return this._updateColorDictTable},set:function(e){this._updateColorDictTable=e}},UpdatePolygonRegion:{get:function(){return this._updatePolygon},set:function(e){this._updatePolygon=e}},emissionTextureUrl:{get:function(){return this._emissionTextureUrl},set:function(e){this._emissionTextureUrl=e,this._emissionTextureArray=[];var t={url:e,USpeed:this._emissionTexCoordSpeed.x,VSpeed:this._emissionTexCoordSpeed.y,UTiling:this._emissionTexCoordScale.x,VTiling:this._emissionTexCoordScale.y};this._emissionTextureArray.push(t),this._emissionTextureChanged=!0,this._loadedEmissionTexture=0}},emissionTexCoordUSpeed:{get:function(){return this._emissionTexCoordSpeed.x},set:function(e){e$2e(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].USpeed=e),this._emissionTexCoordSpeed.x=e}},emissionTexCoordVSpeed:{get:function(){return this._emissionTexCoordSpeed.y},set:function(e){e$2e(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].VSpeed=e),this._emissionTexCoordSpeed.y=e}},emissionTexCoordScale:{get:function(){return this._emissionTexCoordScale},set:function(e){e$2e(this._emissionTextureArray)&&this._emissionTextureArray.length>0&&(this._emissionTextureArray[0].UTiling=e.x,this._emissionTextureArray[0].VTiling=e.y),this._emissionTexCoordScale=e}},emissionTextureArray:{get:function(){return this._emissionTextureArray},set:function(e){this._emissionTextureArray=e,this._emissionTextureChanged=!0,this._loadedEmissionTexture=0}},noValueColor:{get:function(){return this._noValueColor},set:function(e){!e$2e(e)||(this._noValueColor=e$1X.clone(e,this._noValueColor))}},filterMode:{get:function(){return this._textureFilterMode},set:function(e){this._textureFilterMode=e}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}},visibleDistanceMin:{get:function(){return this._visibleDistanceMin},set:function(e){this._visibleDistanceMin=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){this._maxVisibleAltitude=e}}}),u$L.clone=function(e,t){if(e$2e(e)){e$2e(t)||(t=new u$L),t._maxVisibleValue=e._maxVisibleValue,t._minVisibleValue=e._minVisibleValue,t._floor=e._floor,t._ceiling=e._ceiling,t._opacity=e._opacity,t._updateColorDictTable=e._updateColorDictTable,t._linesInterval=e._linesInterval,t._updatePolygon=e._updatePolygon,t._displayMode=e._displayMode,t._lineColor=e$1X.clone(e._lineColor,t._lineColor),t._dictColorTable=i$T.clone(e._dictColorTable,t._dictColorTable),t._emissionTexCoordSpeed=o$1p.clone(e._emissionTexCoordSpeed,t._emissionTexCoordSpeed),t._emissionTexCoordScale=o$1p.clone(e._emissionTexCoordScale,t._emissionTexCoordScale),t._emissionTextureUrl=e._emissionTextureUrl,t._emissionTextureArray=e._emissionTextureArray,t._loadedEmissionTexture=e._loadedEmissionTexture,t._noValueColor=e$1X.clone(e._noValueColor,t._noValueColor),t._coverageArea.length=0;for(var i=0;i<e._coverageArea.length;i++)t._coverageArea[i]=e._coverageArea[i];return t._textureFilterMode=e._textureFilterMode,t._visibleDistanceMax=e._visibleDistanceMax,t._visibleDistanceMin=e._visibleDistanceMin,t._maxVisibleAltitude=e._maxVisibleAltitude,t._minVisibleAltitude=e._minVisibleAltitude,t}};var r$W=[];u$L.prototype._getEmissionAtlasTextureRects=function(){var e=this._emissionTextureAtlas;if(!e$2e(e))return r$W;var t,i=this._emissionTextureArray.length;if(r$W.length!=i)for(r$W=[],t=0;t<i;t++)r$W.push(new e$2c);for(t=0;t<i;t++){var n=this._emissionTextureArray[t],r=e.textureCoordinates[n.textureAtlasID];e$2e(r)&&(r$W[t].x=r.x,r$W[t].y=r.y,r$W[t].z=r.x+r.width,r$W[t].w=r.y+r.height)}return r$W};var l$X=[];u$L.prototype._getEmissionTexAtlasTilingAndOffset=function(){if(!e$2e(this._emissionTextureArray))return l$X;var e,t=this._emissionTextureArray.length;if(l$X.length!=t)for(l$X=[],e=0;e<t;e++)l$X.push(new e$2c);var i=performance.now()/1e3;for(e=0;e<t;e++){var n=this._emissionTextureArray[e];l$X[e].x=n.UTiling,l$X[e].y=n.VTiling,l$X[e].z=n.USpeed*i,l$X[e].w=n.VSpeed*i}return l$X};var _0x33e8b2=(_0x176645=!0,function(e,t){var i=_0x176645?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x176645=!1,i}),_0x15ed26=_0x33e8b2(void 0,(function(){return _0x15ed26.toString().search("(((.+)+)+)+$").toString().constructor(_0x15ed26).search("(((.+)+)+)+$")})),_0x176645;_0x15ed26();var _0x302e68="attribute vec4 position;\n\nuniform vec4 uRect;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.0, 1.0);\n}",e$1x={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2},k$R=Object.freeze(e$1x),e$1w={None:0,FixedZ:1,FixedXYZ:2},yr$2=Object.freeze(e$1w),e$1v=function(){this._fillForeColor=new e$1X,this._fillStyle=fr$3.Fill,this._lineColor=new e$1X,this._lineWidth=1,this._bottomAltitude=0,this._pointSize=1,this._pointColor=new e$1X,this._altitudeMode=k$R.NONE,this._emissionColor=new e$1X(1,1,1,1),this._owner=void 0,this._dirty=!1,this._image=void 0,this._imageReady=!0,this._calloutColor=e$1X.RED,this._calloutWidth=1,this._billboardMode=yr$2.SCREEN_ALIGNED};Object.defineProperties(e$1v.prototype,{fillForeColor:{get:function(){return this._fillForeColor},set:function(e){o$1q.typeOf.object("fillForeColor value",e),e$1X.clone(e,this._fillForeColor)}},bottomAltitude:{get:function(){return this._bottomAltitude},set:function(e){o$1q.typeOf.number("bottomAltitude value",e),this._bottomAltitude!==e&&(this._bottomAltitude=e,this._dirty=!0)}},altitudeMode:{get:function(){return this._altitudeMode},set:function(e){o$1q.typeOf.number("altitudeMode value",e),this._altitudeMode=e}},fillStyle:{get:function(){return this._fillStyle},set:function(e){o$1q.typeOf.number("fillStyle value",e),this._fillStyle=e}},lineColor:{get:function(){return this._lineColor},set:function(e){o$1q.typeOf.object("line color",e),e$1X.clone(e,this._lineColor)}},lineWidth:{get:function(){return this._lineWidth},set:function(e){o$1q.typeOf.number("line width",e),this._lineWidth=e}},pointSize:{get:function(){return this._pointSize},set:function(e){o$1q.typeOf.number("point size",e),this._pointSize=e}},pointColor:{get:function(){return this._pointColor},set:function(e){o$1q.typeOf.object("point color",e),e$1X.clone(e,this._pointColor)}},emissionColor:{get:function(){return this._emissionColor},set:function(e){o$1q.typeOf.object("emission color",e),e$1X.clone(e,this._emissionColor)}},image:{get:function(){return this._image},set:function(e){this._imageReady=!1,this._image=e,"string"==typeof e?this._loadImage():this._imageReady=!0}},imageReady:{get:function(){return this._imageReady}},calloutColor:{get:function(){return this._calloutColor},set:function(e){this._calloutColor!==e&&(this._calloutColor=e)}},calloutWidth:{get:function(){return this._calloutWidth},set:function(e){this._calloutWidth!==e&&(this._calloutWidth=e)}},billboardMode:{get:function(){return this._billboardMode},set:function(e){this._billboardMode!==e&&(this._billboardMode=e)}}}),e$1v.prototype._loadImage=function(){var e=this._image;e=t$10.createIfNeeded(e).fetchImage();var t=this;o$1l(e,(function(e){t._image=e,t._imageReady=!0}))};var _0x27f7f7=(_0x291930=!0,function(e,t){var i=_0x291930?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x291930=!1,i}),_0x2aded6=_0x27f7f7(void 0,(function(){return _0x2aded6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2aded6).search("(((.+)+)+)+$")})),_0x291930;_0x2aded6();var _0x3d8f6e="attribute vec4 position;\n\nuniform vec4 uRect;\n\nvarying float fHeight;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.5, 1.0);\n fHeight = vPos.z;\n}",_0x5d1ff7=(_0x18a239=!0,function(e,t){var i=_0x18a239?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x18a239=!1,i}),_0x19d0c3=_0x5d1ff7(void 0,(function(){return _0x19d0c3.toString().search("(((.+)+)+)+$").toString().constructor(_0x19d0c3).search("(((.+)+)+)+$")})),_0x18a239;_0x19d0c3();var _0x51e90e="\n#ifdef Mode_Height\nvarying float fHeight;\n#endif\n#ifdef OVERLAY\n varying vec2 vTexCoord;\n uniform sampler2D uTexture;\n#endif\n\nvoid main()\n{\n gl_FragColor = vec4(1.0);\n#ifdef Mode_Height\n #ifdef UseFloatTexture\n gl_FragColor = vec4(fHeight, 0.0, 0.0, 1.0);\n #else\n gl_FragColor = czm_packValue(fHeight);\n #endif\n#endif\n#ifdef OVERLAY\n gl_FragColor = texture2D(uTexture,vTexCoord);\n#endif\n}";function e$1u(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}Object.defineProperties(e$1u.prototype,{style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}}}),e$1u.prototype.makeDirty=function(){this._styleDirty=!0},e$1u.prototype.applyStyle=function(e,t){if(e.ready&&(!e$2e(this._style)||this._style.ready)){var i=this._styleDirty;t.isRender&&(this._styleDirty=!1),i&&++this._lastStyleTime;for(var n=this._lastStyleTime,r=e._statistics,o=i?e._selectedTiles:e._selectedTilesToStyle,a=o.length,s=0;s<a;++s){var l=o[s];if(l.lastStyleTime!==n){var u=l.content;l.lastStyleTime=n,u.applyStyle(this._style),r.numberOfFeaturesStyled+=u.featuresLength,++r.numberOfTilesStyled}}}};var I$16="#extension GL_EXT_frag_depth : enable\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthGBuffer;\nuniform vec2 u_distanceAndEdlStrength;\nvarying vec2 v_textureCoordinates;\nvec2 neighborContribution(float log2Depth, vec2 offset)\n{\nfloat dist = u_distanceAndEdlStrength.x;\nvec2 texCoordOrig = v_textureCoordinates + offset * dist;\nvec2 texCoord0 = v_textureCoordinates + offset * floor(dist);\nvec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);\nfloat depthOrLogDepth0 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord0));\nfloat depthOrLogDepth1 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord1));\nif (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {\nreturn vec2(0.0);\n}\nfloat depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);\nreturn vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\nvoid main()\n{\nfloat depthOrLogDepth = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, v_textureCoordinates));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat log2Depth = log2(-eyeCoordinate.z);\nif (depthOrLogDepth == 0.0)\n{\ndiscard;\n}\nvec4 color = texture2D(u_pointCloud_colorGBuffer, v_textureCoordinates);\nvec2 texelSize = 1.0 / czm_viewport.zw;\nvec2 responseAndCount = vec2(0.0);\nresponseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));\nresponseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));\nresponseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));\nresponseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));\nfloat response = responseAndCount.x / responseAndCount.y;\nfloat strength = u_distanceAndEdlStrength.y;\nfloat shade = exp(-response * 300.0 * strength);\ncolor.rgb *= shade;\ngl_FragColor = vec4(color);\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + (czm_projection * vec4(eyeCoordinate.xyz, 1.0)).w);\n#else\ngl_FragDepthEXT = czm_eyeToWindowCoordinates(vec4(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n";function m$W(){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthGBuffer=void 0,this._depthTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}function s$L(){return new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}function T$U(e){var t=e._framebuffer;!e$2e(t)||(e._colorGBuffer.destroy(),e._depthGBuffer.destroy(),e._depthTexture.destroy(),t.destroy(),e._framebuffer=void 0,e._colorGBuffer=void 0,e._depthGBuffer=void 0,e._depthTexture=void 0,e._drawCommand=void 0,e._clearCommand=void 0)}function R$U(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:s$L()}),o=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:s$L()}),a=new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_COMPONENT,pixelDatatype:_$_.UNSIGNED_INT,sampler:s$L()});e._framebuffer=new t$V({context:t,colorTextures:[r,o],depthTexture:a,destroyAttachments:!1}),e._colorGBuffer=r,e._depthGBuffer=o,e._depthTexture=a}var c$Y=new o$1o;function U$Y(e,t){var i=I$16,n={u_pointCloud_colorGBuffer:function(){return e._colorGBuffer},u_pointCloud_depthGBuffer:function(){return e._depthGBuffer},u_distanceAndEdlStrength:function(){return c$Y.x=e._radius,c$Y.y=e._strength,c$Y}},r=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:u$M.setCesium3DTileBit(),stencilMask:u$M.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:Le$q.CESIUM_3D_TILE,owner:e}),e._clearCommand=new t$W({framebuffer:e._framebuffer,color:new e$1X(0,0,0,0),depth:1,renderState:d$1m.fromCache(),pass:Le$q.CESIUM_3D_TILE,owner:e})}function z$S(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=e._colorGBuffer,o=!1,a=e$2e(r)&&(r.width!==i||r.height!==n);return(!e$2e(r)||a)&&(T$U(e),R$U(e,t),U$Y(e,t),o=!0),o}function E$Z(e){return e.drawBuffers&&e.fragmentDepth}function H$Z(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"EC");if(!e$2e(i)){var n=t._attributeLocations,r=t.fragmentShaderSource.clone();r.sources=r.sources.map((function(e){return e=(e=s$V.replaceMain(e,"czm_point_cloud_post_process_main")).replace(/gl_FragColor/g,"gl_FragData[0]")})),r.sources.unshift("#extension GL_EXT_draw_buffers : enable \n"),r.sources.push("void main() \n{ \n czm_point_cloud_post_process_main(); \n#ifdef LOG_DEPTH\n czm_writeLogDepth();\n gl_FragData[1] = czm_packDepth(gl_FragDepthEXT); \n#else\n gl_FragData[1] = czm_packDepth(gl_FragCoord.z);\n#endif\n}"),i=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function o$Z(e){var t=u$Z(e,{});this.attenuation=u$Z(t.attenuation,!1),this.geometricErrorScale=u$Z(t.geometricErrorScale,1),this.maximumAttenuation=t.maximumAttenuation,this.baseResolution=t.baseResolution,this.eyeDomeLighting=u$Z(t.eyeDomeLighting,!0),this.eyeDomeLightingStrength=u$Z(t.eyeDomeLightingStrength,1),this.eyeDomeLightingRadius=u$Z(t.eyeDomeLightingRadius,1),this.backFaceCulling=u$Z(t.backFaceCulling,!1),this.normalShading=u$Z(t.normalShading,!0)}m$W.isSupported=E$Z,m$W.prototype.update=function(e,t,i){if(E$Z(e.context)){this._strength=i.eyeDomeLightingStrength,this._radius=i.eyeDomeLightingRadius*e.pixelRatio;var n,r=z$S(this,e.context),o=e.commandList,a=o.length;for(n=t;n<a;++n){var s=o[n];if(s.primitiveType===W$18.POINTS&&s.pass!==Le$q.TRANSLUCENT){var l=s.derivedCommands.pointCloudProcessor;(!e$2e(l)||s.dirty||r||l.framebuffer!==this._framebuffer)&&(l=i$$.shallowClone(s),s.derivedCommands.pointCloudProcessor=l,l.framebuffer=this._framebuffer,l.shaderProgram=H$Z(e.context,s.shaderProgram),l.castShadows=!1,l.receiveShadows=!1),o[n]=l}}var u=this._clearCommand,c=this._drawCommand;o.push(c),o.push(u)}},m$W.prototype.isDestroyed=function(){return!1},m$W.prototype.destroy=function(){return T$U(this),i$11(this)},o$Z.isSupported=function(e){return m$W.isSupported(e.context)};var e$1t={Triangle:0,Quad:1,Sketch:2,EffectOutline:3},_0x1d226a=Object.freeze(e$1t),_0x5d03bc=(_0x2a42d5=!0,function(e,t){var i=_0x2a42d5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a42d5=!1,i}),_0x530aa3=_0x5d03bc(void 0,(function(){return _0x530aa3.toString().search("(((.+)+)+)+$").toString().constructor(_0x530aa3).search("(((.+)+)+)+$")})),_0x2a42d5;_0x530aa3();var _0x1ce889={OSGBFile:0,OSGBCacheFile:1,ClampGroundPolygon:2,ClampObjectPolygon:3,ClampGroundLine:4,ClampObjectLine:5,IconPoint:6,Text:7,PointCloudFile:8,ExtendRegion3D:9,ExtendClampPolygonCache:10,PolylineEffect:11,RegionEffect:12,ClampGroundAndObjectLineCache:13,ClampGroundRealtimeRasterCache:14},p$T=Object.freeze(_0x1ce889),e$1s={ISERVER_TOKEN:"token",IPORTAL_KEY:"key"},E$Y=Object.freeze(e$1s);function n$W(e,t,i){if(!e$2e(e))throw new t$15("first is required");if(!e$2e(t))throw new t$15("second is required");if(i=u$Z(i,!0),e instanceof h$16||(e=new h$16(e)),t instanceof h$16||(t=new h$16(t)),"data"===e.scheme)return e.toString();if("data"===t.scheme)return t.toString();e$2e(t.authority)&&!e$2e(t.scheme)&&(typeof document<"u"&&e$2e(document.location)&&e$2e(document.location.href)?t.scheme=new h$16(document.location.href).scheme:t.scheme=e.scheme);var n=e;t.isAbsolute()&&(n=t);var r="";e$2e(n.scheme)&&(r+=n.scheme+":"),e$2e(n.authority)&&(r+="//"+n.authority,""!==n.path&&"/"!==n.path&&(r=r.replace(/\/?$/,"/"),n.path=n.path.replace(/^\/?/g,""),""===n.authority&&(r+="/"))),r+=n===e?i?e.path.replace(/\/?$/,"/")+t.path.replace(/^\/?/g,""):e.path+t.path:t.path;var o=e$2e(e.query),a=e$2e(t.query);o&&a?r+="?"+e.query+"&"+t.query:o&&!a?r+="?"+e.query:!o&&a&&(r+="?"+t.query);var s=e$2e(t.fragment);return e$2e(e.fragment)&&!s?r+="#"+e.fragment:s&&(r+="#"+t.fragment),r}function a$O(e,t){this._keymap={},this.addCredential(e,t)}Object.defineProperties(a$O.prototype,{value:{get:function(){return this._value},set:function(e){this._value=e}},name:{get:function(){return this._name},set:function(e){this._name=e}}}),a$O.addToken=function(e){var t,i=e.substring(0,e.indexOf("/realspace")+10);if(e$2e(a$O.CREDENTIAL._keymap[i]))switch(a$O.CREDENTIAL._keymap[i].type){case E$Y.ISERVER_TOKEN:t="?"+m$1d({token:a$O.CREDENTIAL._keymap[i].value});break;case E$Y.IPORTAL_KEY:t="?"+m$1d({key:a$O.CREDENTIAL._keymap[i].value});break;default:t=""}else switch(a$O.CREDENTIAL.name){case E$Y.ISERVER_TOKEN:t="?"+m$1d({token:a$O.CREDENTIAL.value});break;case E$Y.IPORTAL_KEY:t="?"+m$1d({key:a$O.CREDENTIAL.value});break;default:t="?"+a$O.CREDENTIAL.name+"="+a$O.CREDENTIAL.value}return n$W(e,t,!1)},a$O.addTokenWithKey=function(e,t){var i;if(e$2e(a$O.CREDENTIAL._keymap[e])){if(a$O.CREDENTIAL._keymap[e].type instanceof Array){var n,r=a$O.CREDENTIAL._keymap[e].type,o=a$O.CREDENTIAL._keymap[e].value;(s={})[r[0]]=o[0],n=n$W(t,"?"+m$1d(s),!1);for(var a=1;a<r.length;a++){(s={})[r[a]]=o[a],n=n+"&"+m$1d(s)}return n}switch(a$O.CREDENTIAL._keymap[e].type){case E$Y.ISERVER_TOKEN:i="?"+m$1d({token:a$O.CREDENTIAL._keymap[e].value});break;case E$Y.IPORTAL_KEY:i="?"+m$1d({key:a$O.CREDENTIAL._keymap[e].value});break;default:var s;(s={})[a$O.CREDENTIAL._keymap[e].type]=a$O.CREDENTIAL._keymap[e].value,i="?"+m$1d(s)}}else switch(a$O.CREDENTIAL.name){case E$Y.ISERVER_TOKEN:i="?"+m$1d({token:a$O.CREDENTIAL.value});break;case E$Y.IPORTAL_KEY:i="?"+m$1d({key:a$O.CREDENTIAL.value});break;default:i="?"+a$O.CREDENTIAL.name+"="+a$O.CREDENTIAL.value}return n$W(t,i,!1)},a$O.prototype.addCredential=function(e,t){if(e instanceof Array){for(var i=0,n=e.length;i<n;i++)if(this._keymap[e[i].rooturl]={type:e[i].type||E$Y.ISERVER_TOKEN,value:e[i].value},-1!==e[i].rooturl.indexOf("/realspace")){var r=e[i].rooturl.substring(0,e[i].rooturl.lastIndexOf("/realspace")+10);this._keymap[r]={type:e[i].type||E$Y.ISERVER_TOKEN,value:e[i].value}}}else{if(this._value=u$Z(e,""),null==e)throw new t$15("Credential.value is necessory.");this._name=u$Z(t,E$Y.ISERVER_TOKEN),this._keymap.default={type:this._name,value:this._value}}},a$O.CREDENTIAL=null;var _0x5390a8=(_0xf586dc=!0,function(e,t){var i=_0xf586dc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf586dc=!1,i}),_0x4e61da=_0x5390a8(void 0,(function(){return _0x4e61da.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e61da).search("(((.+)+)+)+$")})),_0xf586dc;_0x4e61da();var _0x4d7fda={UNLOAD:0,LOADING:1,LOADED:2,VOLLOADED:3,PARSING:4,PARSED:5,TRANSFORMING:6,TRANSFORMED:7,LOST:8,LOADVOL:9,FAILED:10,VOLFAILED:11},N$Q=Object.freeze(_0x4d7fda),E$X={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7,RENDERING:8,RENDERED:9},wt$7=Object.freeze(E$X);function o$Y(e,t,i,n){this.near=u$Z(e,0),this.nearValue=u$Z(t,0),this.far=u$Z(i,1),this.farValue=u$Z(n,0)}o$Y.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new o$Y(e.near,e.nearValue,e.far,e.farValue)},o$Y.packedLength=4,o$Y.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),t[i++]=e.near,t[i++]=e.nearValue,t[i++]=e.far,t[i]=e.farValue,t},o$Y.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");return t=u$Z(t,0),e$2e(i)||(i=new o$Y),i.near=e[t++],i.nearValue=e[t++],i.far=e[t++],i.farValue=e[t],i},o$Y.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue},o$Y.prototype.clone=function(e){return o$Y.clone(this,e)},o$Y.prototype.equals=function(e){return o$Y.equals(this,e)};var X$R="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n#ifdef EXTRUDED_GEOMETRY\nattribute vec3 extrudeDirection;\nuniform float u_globeMinimumAltitude;\n#endif // EXTRUDED_GEOMETRY\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif // PER_INSTANCE_COLOR\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n#if defined(TEXTURE_COORDINATES) && !defined(SPHERICAL) && defined(UINT8_PACKING)\nvec4 clampAndMagnitude(vec4 sd)\n{\nvec4 d = sd;\nd.x = czm_branchFreeTernary(sd.x < 128.0, d.x, (255.0 - sd.x));\nd.x = floor(0.5 + d.x);\nd.y = floor(0.5 + d.y);\nd.z = floor(0.5 + d.z);\nd.w = floor(0.5 + d.w);\nreturn d;\n}\nfloat unpackLowLessThan100k(vec4 sd)\n{\nvec4 d = clampAndMagnitude(sd);\nreturn (1000.0 * d.x + 10.0 * d.y + 0.1 * d.z + 0.001 * d.w) * czm_branchFreeTernary(sd.x < 128.0, 1.0, -1.0);\n}\nvec3 southwest_LOW(vec4 x, vec4 y, vec4 z)\n{\nvec3 value;\nvalue.x = unpackLowLessThan100k(x);\nvalue.y = unpackLowLessThan100k(y);\nvalue.z = unpackLowLessThan100k(z);\nreturn value;\n}\nfloat unpackHighMagLessThan100Million(vec4 sd)\n{\nvec4 d = clampAndMagnitude(sd);\nreturn (1000000.0 * d.x + 10000.0 * d.y + 100.0 * d.z + d.w) * czm_branchFreeTernary(sd.x < 128.0, 1.0, -1.0);\n}\nvec3 southwest_HIGH(vec4 x, vec4 y, vec4 z)\n{\nvec3 value;\nvalue.x = unpackHighMagLessThan100Million(x);\nvalue.y = unpackHighMagLessThan100Million(y);\nvalue.z = unpackHighMagLessThan100Million(z);\nreturn value;\n}\n#ifdef COLUMBUS_VIEW_2D\nvec4 unpackPlanes2D_HIGH(vec4 x, vec4 y, vec4 z, vec4 w)\n{\nvec4 value;\nvalue.x = unpackHighMagLessThan100Million(x);\nvalue.y = unpackHighMagLessThan100Million(y);\nvalue.z = unpackHighMagLessThan100Million(z);\nvalue.w = unpackHighMagLessThan100Million(w);\nreturn value;\n}\nvec4 unpackPlanes2D_LOW(vec4 x, vec4 y, vec4 z, vec4 w)\n{\nvec4 value;\nvalue.x = unpackLowLessThan100k(x);\nvalue.y = unpackLowLessThan100k(y);\nvalue.z = unpackLowLessThan100k(z);\nvalue.w = unpackLowLessThan100k(w);\nreturn value;\n}\n#else\nfloat unpackLowLessThan1000k(vec4 sd)\n{\nvec4 d = clampAndMagnitude(sd);\nreturn (10000.0 * d.x + 100.0 * d.y + d.z + 0.01 * d.w) * czm_branchFreeTernary(sd.x < 128.0, 1.0, -1.0);\n}\nvec3 unpackExtent(vec4 x, vec4 y, vec4 z)\n{\nvec3 value;\nvalue.x = unpackLowLessThan1000k(x);\nvalue.y = unpackLowLessThan1000k(y);\nvalue.z = unpackLowLessThan1000k(z);\nreturn value;\n}\n#endif\n#endif\nvoid main()\n{\nvec4 position = czm_computePosition();\n#ifdef EXTRUDED_GEOMETRY\nfloat delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));\ndelta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;\nposition = position + vec4(extrudeDirection * delta, 0.0);\n#endif\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nv_sphericalExtents = czm_batchTable_sphericalExtents(batchId);\nv_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);\n#else // SPHERICAL\n#ifdef COLUMBUS_VIEW_2D\n#ifdef UINT8_PACKING\nvec4 planes2D_high = unpackPlanes2D_HIGH(czm_batchTable_planes2D_HIGH_x(batchId),\nczm_batchTable_planes2D_HIGH_y(batchId),\nczm_batchTable_planes2D_HIGH_z(batchId),\nczm_batchTable_planes2D_HIGH_w(batchId));\nvec4 planes2D_low = unpackPlanes2D_LOW(czm_batchTable_planes2D_LOW_x(batchId),\nczm_batchTable_planes2D_LOW_y(batchId),\nczm_batchTable_planes2D_LOW_z(batchId),\nczm_batchTable_planes2D_LOW_w(batchId));\n#else // UINT8_PACKING\nvec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);\nvec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);\n#endif // UINT8_PACKING\nvec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));\nbool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;\nplanes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);\nplanes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);\nidlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;\nidlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));\nplanes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);\nplanes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;\nvec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;\nvec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;\n#else // COLUMBUS_VIEW_2D\n#ifdef UINT8_PACKING\nvec3 low = southwest_LOW(czm_batchTable_southWest_LOW_x(batchId), czm_batchTable_southWest_LOW_y(batchId), czm_batchTable_southWest_LOW_z(batchId));\nvec3 high = southwest_HIGH(czm_batchTable_southWest_HIGH_x(batchId), czm_batchTable_southWest_HIGH_y(batchId), czm_batchTable_southWest_HIGH_z(batchId));\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(high, low)).xyz;\nvec3 northWestCorner = czm_normal * unpackExtent(\nczm_batchTable_northward_x(batchId),\nczm_batchTable_northward_y(batchId),\nczm_batchTable_northward_z(batchId)) + southWestCorner;\nvec3 southEastCorner = czm_normal * unpackExtent(\nczm_batchTable_eastward_x(batchId),\nczm_batchTable_eastward_y(batchId),\nczm_batchTable_eastward_z(batchId)) + southWestCorner;\n#else // UINT8_PACKING\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;\nvec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;\nvec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;\n#endif // UINT8_PACKING\n#endif // COLUMBUS_VIEW_2D\nvec3 eastWard = southEastCorner - southWestCorner;\nfloat eastExtent = length(eastWard);\neastWard /= eastExtent;\nvec3 northWard = northWestCorner - southWestCorner;\nfloat northExtent = length(northWard);\nnorthWard /= northExtent;\nv_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\nv_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\nv_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n#endif // SPHERICAL\nvec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);\nvec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);\nv_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);\nv_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);\nv_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;\n#endif // TEXTURE_COORDINATES\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#endif\ngl_Position = czm_depthClampFarPlane(czm_modelViewProjectionRelativeToEye * position);\n}\n",Q$T="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvoid main(void)\n{\n#ifdef VECTOR_TILE\ngl_FragColor = czm_gammaCorrect(u_highlightColor);\n#else\ngl_FragColor = vec4(1.0);\n#endif\nczm_writeDepthClampedToFarPlane();\n}\n",V$P="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n#ifdef NORMAL_EC\nvec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth)\n{\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);\nreturn eyeCoordinate.xyz / eyeCoordinate.w;\n}\nvec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset)\n{\nvec2 glFragCoordXY = gl_FragCoord.xy;\nfloat upOrRightLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));\nfloat downOrLeftLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));\nbvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);\nfloat useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);\nfloat useDownOrLeft = float(useUpOrRight == 0.0);\nvec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);\nvec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);\nreturn (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;\n}\n#endif // NORMAL_EC\nvoid main(void)\n{\n#ifdef REQUIRES_EC\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_globeDepthTextureDim.xy));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n#endif\n#ifdef REQUIRES_WC\nvec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\nvec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n#endif\n#ifdef TEXTURE_COORDINATES\nvec2 uv;\n#ifdef SPHERICAL\nworldCoordinate += czm_relativeOrigin;\nvec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);\nsphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;\nsphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);\nuv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;\nuv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;\n#else // SPHERICAL\nuv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\nuv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n#endif // SPHERICAL\n#endif // TEXTURE_COORDINATES\n#ifdef PICK\n#ifdef CULL_FRAGMENTS\nif (0.0 <= uv.x && uv.x <= 1.0 && 0.0 <= uv.y && uv.y <= 1.0)\n{\ngl_FragColor.a = 1.0;\nczm_writeDepthClampedToFarPlane();\n}\n#else // CULL_FRAGMENTS\ngl_FragColor.a = 1.0;\n#endif // CULL_FRAGMENTS\n#else // PICK\n#ifdef CULL_FRAGMENTS\nif (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y)\n{\ndiscard;\n}\n#endif\n#ifdef NORMAL_EC\nvec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));\nvec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));\nvec3 normalEC = normalize(cross(leftRight, downUp));\n#endif\n#ifdef PER_INSTANCE_COLOR\nvec4 color = czm_gammaCorrect(v_color);\n#ifdef FLAT\ngl_FragColor = color;\n#else // FLAT\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = -eyeCoordinate.xyz;\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\ngl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n#else // PER_INSTANCE_COLOR\nczm_materialInput materialInput;\n#ifdef USES_NORMAL_EC\nmaterialInput.normalEC = normalEC;\n#endif\n#ifdef USES_POSITION_TO_EYE_EC\nmaterialInput.positionToEyeEC = -eyeCoordinate.xyz;\n#endif\n#ifdef USES_TANGENT_TO_EYE\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);\n#endif\n#ifdef USES_ST\nmaterialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;\nmaterialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;\n#endif\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else // FLAT\ngl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n#endif // PER_INSTANCE_COLOR\nczm_writeDepthClampedToFarPlane();\n#endif // PICK\n}\n";function y$Q(e,t,i,n){o$1q.typeOf.bool("extentsCulling",e),o$1q.typeOf.bool("planarExtents",t),o$1q.typeOf.object("appearance",i),o$1q.typeOf.bool("useFloatBatchTable",n),this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""},this._useFloatBatchTable=n;var r=new Y$I;r.requiresTextureCoordinates=e,r.requiresEC=!i.flat;var o=new Y$I;if(o.requiresTextureCoordinates=e,i instanceof t$Q)r.requiresNormalEC=!i.flat;else{var a=i.material.shaderSource+"\n"+i.fragmentShaderSource;r.normalEC=-1!==a.indexOf("materialInput.normalEC")||-1!==a.indexOf("czm_getDefaultMaterial"),r.positionToEyeEC=-1!==a.indexOf("materialInput.positionToEyeEC"),r.tangentToEyeMatrix=-1!==a.indexOf("materialInput.tangentToEyeMatrix"),r.st=-1!==a.indexOf("materialInput.st")}this._colorShaderDependencies=r,this._pickShaderDependencies=o,this._appearance=i,this._extentsCulling=e,this._planarExtents=t}y$Q.prototype.createFragmentShader=function(e){o$1q.typeOf.bool("columbusView2D",e);var t=this._appearance,i=this._colorShaderDependencies,n=[];!e&&!this._planarExtents&&n.push("SPHERICAL"),i.requiresEC&&n.push("REQUIRES_EC"),i.requiresWC&&n.push("REQUIRES_WC"),i.requiresTextureCoordinates&&n.push("TEXTURE_COORDINATES"),this._extentsCulling&&n.push("CULL_FRAGMENTS"),i.requiresNormalEC&&n.push("NORMAL_EC"),t instanceof t$Q&&n.push("PER_INSTANCE_COLOR"),i.normalEC&&n.push("USES_NORMAL_EC"),i.positionToEyeEC&&n.push("USES_POSITION_TO_EYE_EC"),i.tangentToEyeMatrix&&n.push("USES_TANGENT_TO_EYE"),i.st&&n.push("USES_ST"),t.flat&&n.push("FLAT");var r="";return t instanceof t$Q||(r=t.material.shaderSource),new s$V({name:"ShadowVolumeAppearanceFS",defines:n,sources:[r,V$P]})},y$Q.prototype.createPickFragmentShader=function(e){o$1q.typeOf.bool("columbusView2D",e);var t=this._pickShaderDependencies,i=["PICK"];return!e&&!this._planarExtents&&i.push("SPHERICAL"),t.requiresEC&&i.push("REQUIRES_EC"),t.requiresWC&&i.push("REQUIRES_WC"),t.requiresTextureCoordinates&&i.push("TEXTURE_COORDINATES"),this._extentsCulling&&i.push("CULL_FRAGMENTS"),new s$V({defines:i,sources:[V$P],pickColorQualifier:"varying"})},y$Q.prototype.createVertexShader=function(e,t,i,n){return o$1q.defined("defines",e),o$1q.typeOf.string("vertexShaderSource",t),o$1q.typeOf.bool("columbusView2D",i),o$1q.defined("mapProjection",n),K$P(this._colorShaderDependencies,this._planarExtents,i,e,t,this._appearance,n,this._useFloatBatchTable,this._projectionExtentDefines)},y$Q.prototype.createPickVertexShader=function(e,t,i,n){return o$1q.defined("defines",e),o$1q.typeOf.string("vertexShaderSource",t),o$1q.typeOf.bool("columbusView2D",i),o$1q.defined("mapProjection",n),K$P(this._pickShaderDependencies,this._planarExtents,i,e,t,void 0,n,this._useFloatBatchTable,this._projectionExtentDefines)};var B$S=new o$1p,j$Y=new a$18,Q$S={high:0,low:0};function K$P(e,t,i,n,r,o,a,s,l){var u=n.slice();if(""===l.eastMostYhighDefine){var c=j$Y;c.longitude=e$2d.PI,c.latitude=0,c.height=0;var h=a.project(c,B$S),d=i$12.encode(h.x,Q$S);l.eastMostYhighDefine="EAST_MOST_X_HIGH "+d.high.toFixed((d.high+"").length+1),l.eastMostYlowDefine="EAST_MOST_X_LOW "+d.low.toFixed((d.low+"").length+1);var f=j$Y;f.longitude=-e$2d.PI,f.latitude=0,f.height=0;var p=a.project(f,B$S);d=i$12.encode(p.x,Q$S),l.westMostYhighDefine="WEST_MOST_X_HIGH "+d.high.toFixed((d.high+"").length+1),l.westMostYlowDefine="WEST_MOST_X_LOW "+d.low.toFixed((d.low+"").length+1)}return i&&(u.push(l.eastMostYhighDefine),u.push(l.eastMostYlowDefine),u.push(l.westMostYhighDefine),u.push(l.westMostYlowDefine)),e$2e(o)&&o instanceof t$Q&&u.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(u.push("TEXTURE_COORDINATES"),t||i||u.push("SPHERICAL"),i&&u.push("COLUMBUS_VIEW_2D")),s||u.push("UINT8_PACKING"),new s$V({name:"shadowVolume_Vp",defines:u,sources:[r]})}function Y$I(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}function J$R(e,t,i){return Math.abs((t.y-e.y)*i.x-(t.x-e.x)*i.y+t.x*e.y-t.y*e.x)/o$1o.distance(t,e)}Object.defineProperties(Y$I.prototype,{requiresEC:{get:function(){return this._requiresEC},set:function(e){this._requiresEC=e||this._requiresEC}},requiresWC:{get:function(){return this._requiresWC},set:function(e){this._requiresWC=e||this._requiresWC,this.requiresEC=this._requiresWC}},requiresNormalEC:{get:function(){return this._requiresNormalEC},set:function(e){this._requiresNormalEC=e||this._requiresNormalEC,this.requiresEC=this._requiresNormalEC}},requiresTextureCoordinates:{get:function(){return this._requiresTextureCoordinates},set:function(e){this._requiresTextureCoordinates=e||this._requiresTextureCoordinates,this.requiresWC=this._requiresTextureCoordinates}},normalEC:{set:function(e){this.requiresNormalEC=e,this._usesNormalEC=e},get:function(){return this._usesNormalEC}},tangentToEyeMatrix:{set:function(e){this.requiresWC=e,this.requiresNormalEC=e,this._usesTangentToEyeMat=e},get:function(){return this._usesTangentToEyeMat}},positionToEyeEC:{set:function(e){this.requiresEC=e,this._usesPositionToEyeEC=e},get:function(){return this._usesPositionToEyeEC}},st:{set:function(e){this.requiresTextureCoordinates=e,this._usesSt=e},get:function(){return this._usesSt}}});var se$x=[new o$1o,new o$1o,new o$1o,new o$1o];function Z$U(e,t){var i=se$x,n=o$1o.unpack(t,0,i[0]),r=o$1o.unpack(t,2,i[1]),o=o$1o.unpack(t,4,i[2]);e.uMaxVmax=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r.x,r.y,o.x,o.y]});var a=1/J$R(n,r,o),s=1/J$R(n,o,r);e.uvMinAndExtents=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:4,normalize:!1,value:[n.x,n.y,a,s]})}function g$$(e,t,i){var n=Math.abs(e),r=Math.floor(n/1e3);n-=1e3*r;var o=Math.floor(n/10);n-=10*o;var a=Math.floor(10*n);n-=.1*a;var s=Math.floor(1e3*n);e<0&&(r=255-r),i[t]=new o$13({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!1,value:[r,o,a,s]})}function L$11(e,t,i){var n=Math.abs(e),r=Math.floor(n/1e6);n-=1e6*r;var o=Math.floor(n/1e4);n-=1e4*o;var a=Math.floor(n/100);n-=100*a;var s=Math.floor(n);e<0&&(r=255-r),i[t]=new o$13({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!1,value:[r,o,a,s]})}function N$P(e,t,i){var n=Math.abs(e),r=Math.floor(n/1e4);n-=1e4*r;var o=Math.floor(n/100);n-=100*o;var a=Math.floor(n);n-=a;var s=Math.floor(n/.001);e<0&&(r=255-r),i[t]=new o$13({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!1,value:[r,o,a,s]})}var $$R=new a$18,b$14=new o$1p,ie$B=new o$1p,he$t=new o$1p,O$J={high:0,low:0};function U$X(e,t,i,n){var r=$$R;r.height=0,r.longitude=e.west,r.latitude=e.south;var o=t.project(r,b$14);r.latitude=e.north;var a=t.project(r,ie$B);r.longitude=e.east,r.latitude=e.south;var s,l=t.project(r,he$t);if(!n)return L$11((s=i$12.encode(o.x,O$J)).high,"planes2D_HIGH_x",i),g$$(s.low,"planes2D_LOW_x",i),L$11((s=i$12.encode(o.y,O$J)).high,"planes2D_HIGH_y",i),g$$(s.low,"planes2D_LOW_y",i),L$11((s=i$12.encode(a.y,O$J)).high,"planes2D_HIGH_z",i),g$$(s.low,"planes2D_LOW_z",i),L$11((s=i$12.encode(l.x,O$J)).high,"planes2D_HIGH_w",i),void g$$(s.low,"planes2D_LOW_w",i);var u=[0,0,0,0],c=[0,0,0,0];s=i$12.encode(o.x,O$J),u[0]=s.high,c[0]=s.low,s=i$12.encode(o.y,O$J),u[1]=s.high,c[1]=s.low,s=i$12.encode(a.y,O$J),u[2]=s.high,c[2]=s.low,s=i$12.encode(l.x,O$J),u[3]=s.high,c[3]=s.low,i.planes2D_HIGH=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:4,normalize:!1,value:u}),i.planes2D_LOW=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:4,normalize:!1,value:c})}var ue$z=new p$1d,le$v=new p$1d,ee$u=new o$1p,_e$r=new a$18,pe$z=[new a$18,new a$18,new a$18,new a$18,new a$18,new a$18,new a$18,new a$18];function fe$v(e,t,i,n,r,o){var a=h$18.center(e,_e$r);a.height=i;var s=a$18.toCartesian(a,t,ee$u),l=m$19.eastNorthUpToFixedFrame(s,t,ue$z),u=p$1d.inverse(l,le$v),c=e.west,h=e.east,d=e.north,f=e.south,p=pe$z;p[0].latitude=f,p[0].longitude=c,p[1].latitude=d,p[1].longitude=c,p[2].latitude=d,p[2].longitude=h,p[3].latitude=f,p[3].longitude=h;var _=.5*(c+h),m=.5*(d+f);p[4].latitude=f,p[4].longitude=_,p[5].latitude=d,p[5].longitude=_,p[6].latitude=m,p[6].longitude=c,p[7].latitude=m,p[7].longitude=h;for(var g=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,$=0;$<8;$++){p[$].height=i;var b=a$18.toCartesian(p[$],t,ee$u);p$1d.multiplyByPoint(u,b,b),b.z=0,g=Math.min(g,b.x),x=Math.max(x,b.x),y=Math.min(y,b.y),v=Math.max(v,b.y)}var T=n;T.x=g,T.y=y,T.z=0,p$1d.multiplyByPoint(l,T,T);var C=r;C.x=x,C.y=y,C.z=0,p$1d.multiplyByPoint(l,C,C),o$1p.subtract(C,T,r);var S=o;S.x=g,S.y=v,S.z=0,p$1d.multiplyByPoint(l,S,S),o$1p.subtract(S,T,o)}var ce$t=new o$1p,de$u=new o$1p,Ee$m=new i$12;y$Q.getPlanarTextureCoordinateAttributes=function(e,t,i,n,r,o){o$1q.typeOf.object("boundingRectangle",e),o$1q.defined("textureCoordinateRotationPoints",t),o$1q.typeOf.object("ellipsoid",i),o$1q.typeOf.object("projection",n),o$1q.typeOf.bool("useFloatBatchTable",r);var a=b$14,s=ce$t,l=de$u;fe$v(e,i,u$Z(o,0),a,s,l);var u={};Z$U(u,t);var c=i$12.fromCartesian(a,Ee$m);if(!r){var h=c.high;L$11(h.x,"southWest_HIGH_x",u),L$11(h.y,"southWest_HIGH_y",u),L$11(h.z,"southWest_HIGH_z",u);var d=c.low;return g$$(d.x,"southWest_LOW_x",u),g$$(d.y,"southWest_LOW_y",u),g$$(d.z,"southWest_LOW_z",u),N$P(s.x,"eastward_x",u),N$P(s.y,"eastward_y",u),N$P(s.z,"eastward_z",u),N$P(l.x,"northward_x",u),N$P(l.y,"northward_y",u),N$P(l.z,"northward_z",u),U$X(e,n,u,!1),u}return u.southWest_HIGH=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,normalize:!1,value:o$1p.pack(c.high,[0,0,0])}),u.southWest_LOW=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,normalize:!1,value:o$1p.pack(c.low,[0,0,0])}),u.eastward=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,normalize:!1,value:o$1p.pack(s,[0,0,0])}),u.northward=new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,normalize:!1,value:o$1p.pack(l,[0,0,0])}),U$X(e,n,u,!0),u};var me$v=new o$1p;function te$B(e,t,i,n){var r=$$R;r.latitude=e,r.longitude=t,r.height=0;var o=a$18.toCartesian(r,i,me$v),a=Math.sqrt(o.x*o.x+o.y*o.y),s=e$2d.fastApproximateAtan2(a,o.z),l=e$2d.fastApproximateAtan2(o.x,o.y);return n.x=s,n.y=l,n}var re$D=new o$1o;function ve$r(e){return Math.max(e.width,e.height)>y$Q.MAX_WIDTH_FOR_PLANAR_EXTENTS}function x$$(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).geometryInstances;if(this.geometryInstances=t,this.show=u$Z(e.show,!0),this.classificationType=u$Z(e.classificationType,_0x2b86ba.BOTH),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=u$Z(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=u$Z(e._extruded,!1),this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._readyPromise=o$1l.defer(),this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:u$Z(e.vertexCacheOptimize,!1),interleave:u$Z(e.interleave,!1),releaseGeometryInstances:u$Z(e.releaseGeometryInstances,!0),allowPicking:u$Z(e.allowPicking,!0),asynchronous:u$Z(e.asynchronous,!0),compressVertices:u$Z(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0},e.geometryInstances&&e.geometryInstances.length){var i=e.geometryInstances[0].id;e$2e(i)&&i._clampToS3M&&(this.classificationType=_0x2b86ba.S3M_TILE)}}function M$W(e,t){var i=t?m$Z.EQUAL:m$Z.ALWAYS,n=u$M.CESIUM_3D_TILE_MASK;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:i,frontOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},backFunction:i,backOperation:{fail:n$_.KEEP,zFail:n$_.INCREMENT_WRAP,zPass:n$_.KEEP},reference:n,mask:n},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:re$G.LESS_OR_EQUAL},depthMask:!1}}function te$A(){return{cull:{enabled:!1},depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},stencilTest:{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.KEEP},reference:0,mask:1},stencilMask:1}}function U$W(e,t){var i=t?m$Z.EQUAL:m$Z.NOT_EQUAL,n=t?u$M.S3M_TILE+1:0;return{stencilTest:{enabled:e,frontFunction:i,frontOperation:{fail:n$_.ZERO,zFail:n$_.ZERO,zPass:n$_.ZERO},backFunction:i,backOperation:{fail:n$_.ZERO,zFail:n$_.ZERO,zPass:n$_.ZERO},reference:n,mask:u$M.CLASSIFICATION_MASK},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Ee$r.ALPHA_BLEND}}function ae$v(){return{cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$Z.EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:3,mask:3},blending:Ee$r.ALPHA_BLEND}}y$Q.getSphericalExtentGeometryInstanceAttributes=function(e,t,i,n,r){o$1q.typeOf.object("boundingRectangle",e),o$1q.defined("textureCoordinateRotationPoints",t),o$1q.typeOf.object("ellipsoid",i),o$1q.typeOf.object("projection",n),o$1q.typeOf.bool("useFloatBatchTable",r);var o=te$B(e.south,e.west,i,re$D),a=o.x,s=o.y,l=te$B(e.north,e.east,i,re$D),u=l.x,c=l.y,h=0;s>c&&(h=e$2d.PI-s,s=-e$2d.PI,c+=h),a-=e$2d.EPSILON5,s-=e$2d.EPSILON5,u+=e$2d.EPSILON5;var d=1/((c+=e$2d.EPSILON5)-s),f=1/(u-a),p={sphericalExtents:new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:4,normalize:!1,value:[a,s,f,d]}),longitudeRotation:new o$13({componentDatatype:S$14.FLOAT,componentsPerAttribute:1,normalize:!1,value:[h]})};return Z$U(p,t),U$X(e,n,p,r),p},y$Q.hasAttributesForTextureCoordinatePlanes=function(e){var t=e$2e(e.southWest_HIGH)&&e$2e(e.southWest_LOW)&&e$2e(e.northward)&&e$2e(e.eastward)&&e$2e(e.planes2D_HIGH)&&e$2e(e.planes2D_LOW)&&e$2e(e.uMaxVmax)&&e$2e(e.uvMinAndExtents),i=e$2e(e.southWest_HIGH_x)&&e$2e(e.southWest_LOW_x)&&e$2e(e.southWest_HIGH_y)&&e$2e(e.southWest_LOW_y)&&e$2e(e.southWest_HIGH_z)&&e$2e(e.southWest_LOW_z)&&e$2e(e.northward_x)&&e$2e(e.eastward_x)&&e$2e(e.northward_y)&&e$2e(e.eastward_y)&&e$2e(e.northward_z)&&e$2e(e.eastward_z)&&e$2e(e.planes2D_HIGH_x)&&e$2e(e.planes2D_LOW_x)&&e$2e(e.planes2D_HIGH_y)&&e$2e(e.planes2D_LOW_y)&&e$2e(e.planes2D_HIGH_z)&&e$2e(e.planes2D_LOW_z)&&e$2e(e.planes2D_HIGH_w)&&e$2e(e.planes2D_LOW_w)&&e$2e(e.uMaxVmax)&&e$2e(e.uvMinAndExtents);return t||i},y$Q.hasAttributesForSphericalExtents=function(e){var t=e$2e(e.sphericalExtents)&&e$2e(e.longitudeRotation)&&e$2e(e.planes2D_HIGH)&&e$2e(e.planes2D_LOW)&&e$2e(e.uMaxVmax)&&e$2e(e.uvMinAndExtents),i=e$2e(e.sphericalExtents)&&e$2e(e.longitudeRotation)&&e$2e(e.planes2D_HIGH_x)&&e$2e(e.planes2D_LOW_x)&&e$2e(e.planes2D_HIGH_y)&&e$2e(e.planes2D_LOW_y)&&e$2e(e.planes2D_HIGH_z)&&e$2e(e.planes2D_LOW_z)&&e$2e(e.planes2D_HIGH_w)&&e$2e(e.planes2D_LOW_w)&&e$2e(e.uMaxVmax)&&e$2e(e.uvMinAndExtents);return t||i},y$Q.shouldUseSphericalCoordinates=function(e){return o$1q.typeOf.object("rectangle",e),ve$r(e)},y$Q.MAX_WIDTH_FOR_PLANAR_EXTENTS=e$2d.toRadians(1),Object.defineProperties(x$$.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}}),x$$.isSupported=function(e){return e.context.stencilBuffer};var ne$E={stencilTest:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.ZERO,zFail:n$_.ZERO,zPass:n$_.ZERO},backFunction:m$Z.NOT_EQUAL,backOperation:{fail:n$_.ZERO,zFail:n$_.ZERO,zPass:n$_.ZERO},reference:0,mask:u$M.CLASSIFICATION_MASK},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function se$w(e,t,i,n){if(!e$2e(e._rsColorPass)){var r=!e.debugShowShadowVolume;e._rsStencilDepthPass=d$1m.fromCache(M$W(r,!1)),e._rsStencilDepthPass3DTiles=d$1m.fromCache(M$W(r,!0)),e._rsStencilDepthPassS3M=d$1m.fromCache(te$A()),e._rsColorPass=d$1m.fromCache(U$W(r,!1)),e._rsColorPassS3M=d$1m.fromCache(ae$v()),e._rsPickPass=d$1m.fromCache(ne$E)}}function oe$s(e,t){if(!e.compressVertices)return t;if(-1!==t.search(/attribute\s+vec3\s+extrudeDirection;/g)){var i="compressedAttributes",n="attribute vec2 "+i+";",r="vec3 extrudeDirection;\n",o=t;return o=o.replace(/attribute\s+vec3\s+extrudeDirection;/g,""),[n,r,o=s$V.replaceMain(o,"czm_non_compressed_main"),"void main() \n{ \n extrudeDirection = czm_octDecode(compressedAttributes, 65535.0);\n czm_non_compressed_main(); \n}"].join("\n")}}function ie$A(e,t){var i=t.context,n=e._primitive,r=X$R;r=e._primitive._batchTable.getVertexShaderCallback()(r),r=y$R._appendDistanceDisplayConditionToShader(n,r),r=y$R._modifyShaderPosition(e,r,t.scene3DOnly),r=y$R._updateColorAttribute(n,r);var o=e._hasPlanarExtentsAttributes,a=o||e._hasSphericalExtentsAttribute;e._extruded&&(r=oe$s(n,r));var s=e._extruded?"EXTRUDED_GEOMETRY":"",l=new s$V({defines:[s],sources:[r]}),u=new s$V({sources:[Q$T]});e._primitive._swipeEnabled&&u.defines.push("APPLY_SWIPE");var c=e._primitive._attributeLocations,h=new y$Q(a,o,e.appearance,i.floatTextureSixPlaces);if(e._spStencil=r$14.replaceCache({context:i,shaderProgram:e._spStencil,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c}),e._primitive.allowPicking){var d=s$V.createPickVertexShaderSource(r);d=y$R._appendShowToShader(n,d),d=y$R._updatePickColorAttribute(d);var f=h.createPickFragmentShader(!1),p=h.createPickVertexShader([s],d,!1,t.mapProjection);if(e._spPick=r$14.replaceCache({name:"ClassificationPrimitive_spPick",context:i,shaderProgram:e._spPick,vertexShaderSource:p,fragmentShaderSource:f,attributeLocations:c}),a){var _=i.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!e$2e(_)){var m=h.createPickFragmentShader(!0),g=h.createPickVertexShader([s],d,!0,t.mapProjection);_=i.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:g,fragmentShaderSource:m,attributeLocations:c})}e._spPick2D=_}}else e._spPick=r$14.fromCache({name:"ClassificationPrimitive_spPick",context:i,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});l=new s$V({defines:[s],sources:[r=y$R._appendShowToShader(n,r)]}),e._sp=r$14.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});var x=h.createFragmentShader(!1),y=h.createVertexShader([s],r,!1,t.mapProjection);if(e._spColor=r$14.replaceCache({context:i,shaderProgram:e._spColor,vertexShaderSource:y,fragmentShaderSource:x,attributeLocations:c}),a){var v=i.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!e$2e(v)){var $=h.createFragmentShader(!0),b=h.createVertexShader([s],r,!0,t.mapProjection);v=i.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:b,fragmentShaderSource:$,attributeLocations:c})}e._spColor2D=v}}function de$t(e,t,i){var n=e._primitive,r=2*n._va.length;t.length=r;var o,a,s,l=0,u=n._batchTable.getUniformMapCallback()(e._uniformMap);u.uSwipeRegion=function(){var t=e._primitive._swipeRegion,n=new e$2c;return e$2c.fromElements(t.x,t.y,t.x+t.z,t.y+t.w,n),n.x=n.x*i.context.drawingBufferWidth,n.y=(1-n.y)*i.context.drawingBufferHeight,n.z=n.z*i.context.drawingBufferWidth,n.w=(1-n.w)*i.context.drawingBufferHeight,n};var c=e._needs2DShader;for(o=0;o<r;o+=2){var h=n._va[l++];e$2e(a=t[o])||(a=t[o]=new i$$({owner:e,primitiveType:n._primitiveType})),a.vertexArray=h,a.renderState=e._rsStencilDepthPass,a.shaderProgram=e._sp,a.uniformMap=u,a.pass=Le$q.TERRAIN_CLASSIFICATION,(s=i$$.shallowClone(a,a.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,s.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,a.derivedCommands.tileset=s,(s=i$$.shallowClone(a,a.derivedCommands.s3mtiles)).renderState=e._rsStencilDepthPassS3M,s.pass=Le$q.ClampObject,a.derivedCommands.s3mtiles=s,e$2e(a=t[o+1])||(a=t[o+1]=new i$$({owner:e,primitiveType:n._primitiveType})),a.vertexArray=h,a.renderState=e._rsColorPass,a.shaderProgram=e._spColor,a.pass=Le$q.TERRAIN_CLASSIFICATION;var d=e.appearance.material;if(e$2e(d)&&(u=p$19(u,d._uniforms)),a.uniformMap=u,(s=i$$.shallowClone(a,a.derivedCommands.tileset)).pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,a.derivedCommands.tileset=s,(s=i$$.shallowClone(a,a.derivedCommands.s3mtiles)).pass=Le$q.ClampObject,s.renderState=e._rsColorPassS3M,a.derivedCommands.s3mtiles=s,c){var f=i$$.shallowClone(a,a.derivedCommands.appearance2D);f.shaderProgram=e._spColor2D,a.derivedCommands.appearance2D=f,(f=i$$.shallowClone(s,s.derivedCommands.appearance2D)).shaderProgram=e._spColor2D,s.derivedCommands.appearance2D=f}}var p=e._commandsIgnoreShow,_=e._spStencil,m=0;r=p.length=r/2;for(var g=0;g<r;++g){var x=p[g]=i$$.shallowClone(t[m],p[g]);x.shaderProgram=_,x.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,m+=2}}function ue$y(e,t){var i,n,r=e._usePickOffsets,o=Le$q.TERRAIN_CLASSIFICATION,a=Le$q.CESIUM_3D_TILE_CLASSIFICATION,s=Le$q.ClampObject,l=e._primitive,u=2*l._va.length,c=0;r&&(u=2*(i=l._pickOffsets).length),t.length=u;var h,d,f,p=0,_=l._batchTable.getUniformMapCallback()(e._uniformMap),m=e._needs2DShader;for(h=0;h<u;h+=2){var g,x=l._va[p++];if(r&&(n=i[c++],x=l._va[n.index]),e$2e(d=t[h])||(d=t[h]=new i$$({owner:e,primitiveType:l._primitiveType,pickOnly:!0})),d.vertexArray=x,d.renderState=e._rsStencilDepthPass,d.shaderProgram=e._sp,d.uniformMap=_,d.pass=o,r&&(d.offset=n.offset,d.count=n.count),(f=i$$.shallowClone(d,d.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,f.pass=a,d.derivedCommands.tileset=f,(f=i$$.shallowClone(d,d.derivedCommands.s3mtiles)).renderState=e._rsStencilDepthPassS3M,f.pass=s,d.derivedCommands.s3mtiles=f,e$2e(d=t[h+1])||(d=t[h+1]=new i$$({owner:e,primitiveType:l._primitiveType,pickOnly:!0})),d.vertexArray=x,d.renderState=e._rsPickPass,d.shaderProgram=e._spPick,d.uniformMap=_,d.pass=o,r&&(d.offset=n.offset,d.count=n.count),(f=i$$.shallowClone(d,d.derivedCommands.tileset)).pass=a,d.derivedCommands.tileset=f,m)(g=i$$.shallowClone(d,d.derivedCommands.pick2D)).shaderProgram=e._spPick2D,d.derivedCommands.pick2D=g,(g=i$$.shallowClone(f,f.derivedCommands.pick2D)).shaderProgram=e._spPick2D,f.derivedCommands.pick2D=g;if((f=i$$.shallowClone(d,d.derivedCommands.s3mtiles)).pass=s,d.derivedCommands.s3mtiles=f,m)(g=i$$.shallowClone(d,d.derivedCommands.pick2D)).shaderProgram=e._spPick2D,d.derivedCommands.pick2D=g,(g=i$$.shallowClone(f,f.derivedCommands.pick2D)).shaderProgram=e._spPick2D,f.derivedCommands.pick2D=g}}function pe$y(e,t,i,n,r,o,a,s){de$t(e,o,s),ue$y(e,a)}function Z$T(e,t){return Math.floor(e%t/3)}function K$O(e,t,i,n,r,o){e.modelMatrix=i,e.boundingVolume=r,e.cull=n,e.debugShowBoundingVolume=o,t.commandList.push(e)}function j$X(e,t,i,n,r){e.modelMatrix=i,e.boundingVolume=r,e.cull=n,t.commandList.push(e)}function he$s(e,t,i,n,r,o,a,s){var l,u=e._primitive;y$R._updateBoundingVolumes(u,t,r),t.mode===C$14.SCENE3D?l=u._boundingSphereWC:t.mode===C$14.COLUMBUS_VIEW?l=u._boundingSphereCV:t.mode===C$14.SCENE2D&&e$2e(u._boundingSphere2D)?l=u._boundingSphere2D:e$2e(u._boundingSphereMorph)&&(l=u._boundingSphereMorph);var c,h,d=e.classificationType,f=d!==_0x2b86ba.CESIUM_3D_TILE,p=d!==_0x2b86ba.TERRAIN,_=t.passes;if(_.render){var m=i.length;for(c=0;c<m;++c)h=l[Z$T(c,m)],f&&K$O(i[c],t,r,o,h,a),p&&K$O(i[c].derivedCommands.tileset,t,r,o,h,a);if(t.invertClassification){var g=e._commandsIgnoreShow,x=g.length;for(c=0;c<x;++c)h=l[Math.floor(c/2)],K$O(g[c],t,r,o,h,a)}}if(_.pick){var y=n.length,v=u._pickOffsets;for(c=0;c<y;++c){h=l[v[Z$T(c,y)].index],f&&j$X(n[c],t,r,o,h),p&&j$X(n[c].derivedCommands.tileset,t,r,o,h)}}}x$$.prototype.update=function(e){if(e$2e(this._primitive)||e$2e(this.geometryInstances)){var t=this.appearance;e$2e(t)&&e$2e(t.material)&&t.material.update(e.context);var i=this,n=this._primitiveOptions;if(!e$2e(this._primitive)){var r,o,a,s,l=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],u=l.length,c=!1,h=!0,d=!1,f=!1;for(u>0&&(a=l[0].attributes,d=y$Q.hasAttributesForSphericalExtents(a),f=y$Q.hasAttributesForTextureCoordinatePlanes(a),s=a.color),r=0;r<u;r++){var p=(o=l[r]).attributes.color;if(e$2e(p))c=!0;else if(c)throw new t$15("All GeometryInstances must have color attributes to use per-instance color.");h=h&&e$2e(p)&&o$16.equals(s,p)}if(!h&&!d&&!f)throw new t$15("All GeometryInstances must have the same color attribute except via GroundPrimitives");if(c&&!e$2e(t)&&(t=new t$Q({flat:!0}),this.appearance=t),!c&&t instanceof t$Q)throw new t$15("PerInstanceColorAppearance requires color GeometryInstanceAttributes on all GeometryInstances");if(e$2e(t.material)&&!d&&!f)throw new t$15("Materials on ClassificationPrimitives are not supported except via GroundPrimitives");this._usePickOffsets=!d&&!f,this._hasSphericalExtentsAttribute=d,this._hasPlanarExtentsAttributes=f,this._hasPerColorAttribute=c;var _=new Array(u);for(r=0;r<u;++r)o=l[r],_[r]=new d$1o({geometry:o.geometry,attributes:o.attributes,modelMatrix:o.modelMatrix,id:o.id,pickPrimitive:u$Z(this._pickPrimitive,i)});n.appearance=t,n.geometryInstances=_,e$2e(this._createBoundingVolumeFunction)&&(n._createBoundingVolumeFunction=function(e,t){i._createBoundingVolumeFunction(e,t)}),n._createRenderStatesFunction=function(e,t,n,r){se$w(i)},n._createShaderProgramFunction=function(e,t,n){ie$A(i,t)},n._createCommandsFunction=function(e,t,n,r,o,a,s,l){pe$y(i,void 0,void 0,!0,!1,a,s,l)},e$2e(this._updateAndQueueCommandsFunction)?n._updateAndQueueCommandsFunction=function(e,t,n,r,o,a,s,l){i._updateAndQueueCommandsFunction(e,t,n,r,o,a,s,l)}:n._updateAndQueueCommandsFunction=function(e,t,n,r,o,a,s,l){he$s(i,t,n,r,o,a,s)},this._primitive=new y$R(n),this._primitive.readyPromise.then((function(e){i._ready=!0,i.releaseGeometryInstances&&(i.geometryInstances=void 0);var t=e._error;e$2e(t)?i._readyPromise.reject(t):i._readyPromise.resolve(i)}))}if(this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=d$1m.fromCache(M$W(!1,!1)),this._rsStencilDepthPass3DTiles=d$1m.fromCache(M$W(!1,!0)),this._rsColorPass=d$1m.fromCache(U$W(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=d$1m.fromCache(M$W(!0,!1)),this._rsStencilDepthPass3DTiles=d$1m.fromCache(M$W(!0,!0)),this._rsColorPass=d$1m.fromCache(U$W(!0))),this._primitive.appearance!==t){if(!this._hasSphericalExtentsAttribute&&!this._hasPlanarExtentsAttributes&&e$2e(t.material))throw new t$15("Materials on ClassificationPrimitives are not supported except via GroundPrimitive");if(!this._hasPerColorAttribute&&t instanceof t$Q)throw new t$15("PerInstanceColorAppearance requires color GeometryInstanceAttribute");this._primitive.appearance=t}this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},x$$.prototype.getGeometryInstanceAttributes=function(e){if(!e$2e(this._primitive))throw new t$15("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},x$$.prototype.isDestroyed=function(){return!1},x$$.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,i$11(this)};var te$z={u_globeMinimumAltitude:function(){return 55e3}};function d$15(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).appearance,i=e.geometryInstances;if(!e$2e(t)&&e$2e(i))for(var n=Array.isArray(i)?i:[i],r=n.length,o=0;o<r;o++){var a=n[o].attributes;if(e$2e(a)&&e$2e(a.color)){t=new t$Q({flat:!0});break}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=u$Z(e.show,!0),this.classificationType=u$Z(e.classificationType,_0x2b86ba.BOTH),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=u$Z(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._readyPromise=o$1l.defer(),this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=e$1H._defaultMaxTerrainHeight,this._minTerrainHeight=e$1H._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:u$Z(e.vertexCacheOptimize,!1),interleave:u$Z(e.interleave,!1),releaseGeometryInstances:u$Z(e.releaseGeometryInstances,!0),allowPicking:u$Z(e.allowPicking,!0),asynchronous:u$Z(e.asynchronous,!0),compressVertices:u$Z(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:te$z,classificationType:this.classificationType}}function z$R(e){return function(t,i){var n=i.maximumRadius,r=n/Math.cos(.5*t)-n;return e._maxHeight+r}}function L$10(e){return function(t,i){return e._minHeight}}Object.defineProperties(d$15.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),d$15.isSupported=x$$.isSupported;var se$v=new o$1p,ae$u=new o$1p,ne$D=new o$1p,oe$r=new a$18,ue$x=new h$18;function G$14(e,t){var i=e.mapProjection.ellipsoid;if(!e$2e(t.attributes)||!e$2e(t.attributes.position3DHigh))return e$2e(t.rectangle)?t.rectangle:void 0;for(var n=t.attributes.position3DHigh.values,r=t.attributes.position3DLow.values,o=n.length,a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=0;c<o;c+=3){var h=o$1p.unpack(n,c,se$v),d=o$1p.unpack(r,c,ae$u),f=o$1p.add(h,d,ne$D),p=i.cartesianToCartographic(f,oe$r),_=p.latitude,m=p.longitude;a=Math.min(a,_),s=Math.min(s,m),l=Math.max(l,_),u=Math.max(u,m)}var g=ue$x;return g.north=l,g.south=a,g.east=u,g.west=s,g}function he$r(e,t,i){var n=e$1H.getMinimumMaximumHeights(t,i);e._minTerrainHeight=n.minimumTerrainHeight,e._maxTerrainHeight=n.maximumTerrainHeight}function pe$x(e,t,i){var n=t.mapProjection.ellipsoid,r=G$14(t,i);if(e.geometryInstances){var o=Number.MIN_VALUE,a=Number.MAX_VALUE,s=!1;for(let t=0;t<e.geometryInstances.length>0;t++){var l=e.geometryInstances[t].geometry._groundBottomAltitude,u=e.geometryInstances[t].geometry._groundExtrudedHeight;if(e$2e(l)&&e$2e(u)&&(0!==l||0!==u)){var c=l+u;o=Math.max(o,c),a=Math.min(a,l),s=!0}}e._maxHeight=s?o:e._maxHeight,e._minHeight=s?a:e._minHeight}var h=(Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances])[0].geometry._granularity,d=y$Y.fromRectangle(r,L$10(e)(h,n),z$R(e)(h,n),n);if(e._boundingVolumes.push(d),!t.scene3DOnly){var f=t.mapProjection,p=i$1d.fromRectangleWithHeights2D(r,f,e._maxHeight,e._minHeight);o$1p.fromElements(p.center.z,p.center.x,p.center.y,p.center),e._boundingVolumes2D.push(p)}}function j$W(e,t){return Math.floor(e%t/3)}function O$I(e,t,i,n,r,o,a){var s=e._primitive;i.mode!==C$14.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&t.derivedCommands&&t.derivedCommands.appearance2D&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t)}function R$T(e,t,i,n,r,o){var a=e._primitive;i.mode!==C$14.SCENE3D&&t.shaderProgram===a._spPick&&a._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,i.commandList.push(t)}function me$u(e,t,i,n,r,o,a,s){var l;l=t.mode===C$14.SCENE3D?e._boundingVolumes:e._boundingVolumes2D;var u,c,h=e.classificationType,d=h!==_0x2b86ba.CESIUM_3D_TILE&&h!==_0x2b86ba.S3M_TILE,f=h!==_0x2b86ba.TERRAIN&&h!==_0x2b86ba.S3M_TILE,p=h!==_0x2b86ba.TERRAIN&&h!==_0x2b86ba.CESIUM_3D_TILE,_=t.passes,m=e._primitive;if(_.render){var g=i.length;for(u=0;u<g;++u)c=l[j$W(u,g)],d&&O$I(e,i[u],t,r,o,c,a),f&&O$I(e,i[u].derivedCommands.tileset,t,r,o,c,a),p&&O$I(e,i[u].derivedCommands.s3mtiles,t,r,o,c,a);if(t.invertClassification){var x=m._commandsIgnoreShow,y=x.length;for(u=0;u<y;++u)c=l[Math.floor(u/2)],O$I(e,x[u],t,r,o,c,a)}}if(_.pick){var v,$=n.length;for(e._useFragmentCulling||(v=m._primitive._pickOffsets),u=0;u<$;++u){if(c=l[j$W(u,$)],!e._useFragmentCulling)c=l[v[j$W(u,$)].index];d&&R$T(e,n[u],t,r,o,c),f&&R$T(e,n[u].derivedCommands.tileset,t,r,o,c),p&&O$I(e,n[u].derivedCommands.s3mtiles,t,r,o,c,a)}}}function n$V(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function n$U(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}d$15.initializeTerrainHeights=function(){return e$1H.initialize()},d$15.prototype.update=function(e){if(e$2e(this._primitive)||e$2e(this.geometryInstances)){if(!e$1H.initialized){if(!this.asynchronous)throw new t$15("For synchronous GroundPrimitives, you must call GroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");return void d$15.initializeTerrainHeights()}var t=this,i=this._classificationPrimitiveOptions;if(!e$2e(this._primitive)){var n,r,o,a,s,l=e.mapProjection.ellipsoid,u=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=u.length,h=new Array(c);for(a=0;a<c;++a){var d=G$14(e,r=(n=u[a]).geometry);e$2e(s)?e$2e(d)&&h$18.union(s,d,s):s=h$18.clone(d);var f=n.id;if(e$2e(f)&&e$2e(d)){var p=e$1H.getBoundingSphere(d,l);this._boundingSpheresKeys.push(f),this._boundingSpheres.push(p)}if(!e$2e(o=r.constructor)||!e$2e(o.createShadowVolume))throw new t$15("Not all of the geometry instances have GroundPrimitive support.")}he$r(this,s,l);var _=e.terrainExaggeration;this._minHeight=this._minTerrainHeight*_,this._maxHeight=this._maxTerrainHeight*_;var m=d$15._supportsMaterials(e.context);if(this._useFragmentCulling=m,m){var g,x=!0;for(a=0;a<c;++a)if(s=G$14(e,r=(n=u[a]).geometry),y$Q.shouldUseSphericalCoordinates(s)){x=!1;break}for(a=0;a<c;++a){o=(r=(n=u[a]).geometry).constructor;var y=G$14(e,r),v=r.textureCoordinateRotationPoints,$=e.context.floatTextureSixPlaces;g=x?y$Q.getPlanarTextureCoordinateAttributes(y,v,l,e.mapProjection,$,this._maxHeight):y$Q.getSphericalExtentGeometryInstanceAttributes(y,v,l,e.mapProjection,$);var b=n.attributes;for(var T in b)b.hasOwnProperty(T)&&(g[T]=b[T]);n.created?h[a]=new d$1o({geometry:n._groundGeometry,attributes:g,id:n.id}):(h[a]=new d$1o({geometry:o.createShadowVolume(r,L$10(this),z$R(this)),attributes:g,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0)}}else for(a=0;a<c;++a)o=(r=(n=u[a]).geometry).constructor,n.created?h[a]=new d$1o({geometry:r,attributes:n.attributes,id:n.id}):(h[a]=new d$1o({geometry:o.createShadowVolume(r,L$10(this),z$R(this)),attributes:n.attributes,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0);i.geometryInstances=h,i.appearance=this.appearance,i._createBoundingVolumeFunction=function(e,i){pe$x(t,e,i)},i._updateAndQueueCommandsFunction=function(e,i,n,r,o,a,s,l){me$u(t,i,n,r,o,a,s)},this._primitive=new x$$(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0);var i=e._error;e$2e(i)?t._readyPromise.reject(i):t._readyPromise.resolve(t)}))}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},d$15.prototype.getBoundingSphere=function(e){var t=this._boundingSpheresKeys.indexOf(e);if(-1!==t)return this._boundingSpheres[t]},d$15.prototype.getGeometryInstanceAttributes=function(e){if(!e$2e(this._primitive))throw new t$15("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},d$15.prototype.isDestroyed=function(){return!1},d$15.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$11(this)},d$15._supportsMaterials=function(e){return e.depthTexture},d$15.supportsMaterials=function(e){return o$1q.typeOf.object("scene",e),d$15._supportsMaterials(e.frameState.context)},Object.defineProperties(n$V.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),image:C$10("image"),scale:C$10("scale"),pixelOffset:C$10("pixelOffset"),eyeOffset:C$10("eyeOffset"),horizontalOrigin:C$10("horizontalOrigin"),verticalOrigin:C$10("verticalOrigin"),heightReference:C$10("heightReference"),color:C$10("color"),rotation:C$10("rotation"),alignedAxis:C$10("alignedAxis"),sizeInMeters:C$10("sizeInMeters"),width:C$10("width"),height:C$10("height"),scaleByDistance:C$10("scaleByDistance"),translucencyByDistance:C$10("translucencyByDistance"),pixelOffsetScaleByDistance:C$10("pixelOffsetScaleByDistance"),imageSubRegion:C$10("imageSubRegion"),distanceDisplayCondition:C$10("distanceDisplayCondition"),disableDepthTestDistance:C$10("disableDepthTestDistance")}),n$V.prototype.clone=function(e){return e$2e(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e):new n$V(this)},n$V.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this._show,e.show),this.image=u$Z(this._image,e.image),this.scale=u$Z(this._scale,e.scale),this.pixelOffset=u$Z(this._pixelOffset,e.pixelOffset),this.eyeOffset=u$Z(this._eyeOffset,e.eyeOffset),this.horizontalOrigin=u$Z(this._horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=u$Z(this._verticalOrigin,e.verticalOrigin),this.heightReference=u$Z(this._heightReference,e.heightReference),this.color=u$Z(this._color,e.color),this.rotation=u$Z(this._rotation,e.rotation),this.alignedAxis=u$Z(this._alignedAxis,e.alignedAxis),this.sizeInMeters=u$Z(this._sizeInMeters,e.sizeInMeters),this.width=u$Z(this._width,e.width),this.height=u$Z(this._height,e.height),this.scaleByDistance=u$Z(this._scaleByDistance,e.scaleByDistance),this.translucencyByDistance=u$Z(this._translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=u$Z(this._pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.imageSubRegion=u$Z(this._imageSubRegion,e.imageSubRegion),this.distanceDisplayCondition=u$Z(this._distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=u$Z(this._disableDepthTestDistance,e.disableDepthTestDistance)},Object.defineProperties(n$U.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),dimensions:C$10("dimensions"),heightReference:C$10("heightReference"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition")}),n$U.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.dimensions=this.dimensions,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new n$U(this)},n$U.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.dimensions=u$Z(this.dimensions,e.dimensions),this.heightReference=u$Z(this.heightReference,e.heightReference),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition)};var e$1r={FIXED:0,INERTIAL:1},Re$l=Object.freeze(e$1r);function t$J(){t$15.throwInstantiationError()}Object.defineProperties(t$J.prototype,{isConstant:{get:t$15.throwInstantiationError},definitionChanged:{get:t$15.throwInstantiationError},referenceFrame:{get:t$15.throwInstantiationError}}),t$J.prototype.getValue=t$15.throwInstantiationError,t$J.prototype.getValueInReferenceFrame=t$15.throwInstantiationError,t$J.prototype.equals=t$15.throwInstantiationError;var p$S=new p$1e;function r$V(e,t){this._definitionChanged=new o$1h,this._value=o$1p.clone(e),this._referenceFrame=u$Z(t,Re$l.FIXED)}function n$T(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function o$X(e){return e}function c$X(e,t){return C$10(e,t,o$X)}function n$S(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function n$R(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function e$1q(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._innerRadii=void 0,this._innerRadiiSubscription=void 0,this._minimumClock=void 0,this._minimumClockSubscription=void 0,this._maximumClock=void 0,this._maximumClockSubscription=void 0,this._minimumCone=void 0,this._minimumConeSubscription=void 0,this._maximumCone=void 0,this._maximumConeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function n$Q(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._showBackground=void 0,this._showBackgroundSubscription=void 0,this._backgroundColor=void 0,this._backgroundColorSubscription=void 0,this._backgroundPadding=void 0,this._backgroundPaddingSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}t$J.convertToReferenceFrame=function(e,t,i,n,r){if(!e$2e(t))return t;if(e$2e(r)||(r=new o$1p),i===n)return o$1p.clone(t,r);var o=m$19.computeIcrfToFixedMatrix(e,p$S);return e$2e(o)||(o=m$19.computeTemeToPseudoFixedMatrix(e,p$S)),i===Re$l.INERTIAL?p$1e.multiplyByVector(o,t,r):i===Re$l.FIXED?p$1e.multiplyByVector(p$1e.transpose(o,p$S),t,r):void 0},Object.defineProperties(r$V.prototype,{isConstant:{get:function(){return!e$2e(this._value)||this._referenceFrame===Re$l.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),r$V.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$l.FIXED,t)},r$V.prototype.setValue=function(e,t){var i=!1;o$1p.equals(this._value,e)||(i=!0,this._value=o$1p.clone(e)),e$2e(t)&&this._referenceFrame!==t&&(i=!0,this._referenceFrame=t),i&&this._definitionChanged.raiseEvent(this)},r$V.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2e(e))throw new t$15("time is required.");if(!e$2e(t))throw new t$15("referenceFrame is required.");return t$J.convertToReferenceFrame(e,this._value,this._referenceFrame,t,i)},r$V.prototype.equals=function(e){return this===e||e instanceof r$V&&o$1p.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame},Object.defineProperties(n$T.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),positions:C$10("positions"),width:C$10("width"),height:C$10("height"),heightReference:C$10("heightReference"),extrudedHeight:C$10("extrudedHeight"),extrudedHeightReference:C$10("extrudedHeightReference"),cornerType:C$10("cornerType"),granularity:C$10("granularity"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),classificationType:C$10("classificationType"),zIndex:C$10("zIndex")}),n$T.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new n$T(this)},n$T.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.positions=u$Z(this.positions,e.positions),this.width=u$Z(this.width,e.width),this.height=u$Z(this.height,e.height),this.heightReference=u$Z(this.heightReference,e.heightReference),this.extrudedHeight=u$Z(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=u$Z(this.extrudedHeightReference,e.extrudedHeightReference),this.cornerType=u$Z(this.cornerType,e.cornerType),this.granularity=u$Z(this.granularity,e.granularity),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$Z(this.classificationType,e.classificationType),this.zIndex=u$Z(this.zIndex,e.zIndex)},Object.defineProperties(n$S.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),length:C$10("length"),topRadius:C$10("topRadius"),bottomRadius:C$10("bottomRadius"),heightReference:C$10("heightReference"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),numberOfVerticalLines:C$10("numberOfVerticalLines"),slices:C$10("slices"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition")}),n$S.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.length=this.length,e.topRadius=this.topRadius,e.bottomRadius=this.bottomRadius,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new n$S(this)},n$S.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.length=u$Z(this.length,e.length),this.topRadius=u$Z(this.topRadius,e.topRadius),this.bottomRadius=u$Z(this.bottomRadius,e.bottomRadius),this.heightReference=u$Z(this.heightReference,e.heightReference),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=u$Z(this.numberOfVerticalLines,e.numberOfVerticalLines),this.slices=u$Z(this.slices,e.slices),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(n$R.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),semiMajorAxis:C$10("semiMajorAxis"),semiMinorAxis:C$10("semiMinorAxis"),height:C$10("height"),heightReference:C$10("heightReference"),extrudedHeight:C$10("extrudedHeight"),extrudedHeightReference:C$10("extrudedHeightReference"),rotation:C$10("rotation"),stRotation:C$10("stRotation"),granularity:C$10("granularity"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),numberOfVerticalLines:C$10("numberOfVerticalLines"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),classificationType:C$10("classificationType"),zIndex:C$10("zIndex")}),n$R.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new n$R(this)},n$R.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.semiMajorAxis=u$Z(this.semiMajorAxis,e.semiMajorAxis),this.semiMinorAxis=u$Z(this.semiMinorAxis,e.semiMinorAxis),this.height=u$Z(this.height,e.height),this.heightReference=u$Z(this.heightReference,e.heightReference),this.extrudedHeight=u$Z(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=u$Z(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=u$Z(this.rotation,e.rotation),this.stRotation=u$Z(this.stRotation,e.stRotation),this.granularity=u$Z(this.granularity,e.granularity),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=u$Z(this.numberOfVerticalLines,e.numberOfVerticalLines),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$Z(this.classificationType,e.classificationType),this.zIndex=u$Z(this.zIndex,e.zIndex)},Object.defineProperties(e$1q.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),radii:C$10("radii"),innerRadii:C$10("innerRadii"),minimumClock:C$10("minimumClock"),maximumClock:C$10("maximumClock"),minimumCone:C$10("minimumCone"),maximumCone:C$10("maximumCone"),heightReference:C$10("heightReference"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),stackPartitions:C$10("stackPartitions"),slicePartitions:C$10("slicePartitions"),subdivisions:C$10("subdivisions"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition")}),e$1q.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new e$1q(this)},e$1q.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.radii=u$Z(this.radii,e.radii),this.innerRadii=u$Z(this.innerRadii,e.innerRadii),this.minimumClock=u$Z(this.minimumClock,e.minimumClock),this.maximumClock=u$Z(this.maximumClock,e.maximumClock),this.minimumCone=u$Z(this.minimumCone,e.minimumCone),this.maximumCone=u$Z(this.maximumCone,e.maximumCone),this.heightReference=u$Z(this.heightReference,e.heightReference),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.stackPartitions=u$Z(this.stackPartitions,e.stackPartitions),this.slicePartitions=u$Z(this.slicePartitions,e.slicePartitions),this.subdivisions=u$Z(this.subdivisions,e.subdivisions),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(n$Q.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),text:C$10("text"),font:C$10("font"),style:C$10("style"),scale:C$10("scale"),showBackground:C$10("showBackground"),backgroundColor:C$10("backgroundColor"),backgroundPadding:C$10("backgroundPadding"),pixelOffset:C$10("pixelOffset"),eyeOffset:C$10("eyeOffset"),horizontalOrigin:C$10("horizontalOrigin"),verticalOrigin:C$10("verticalOrigin"),heightReference:C$10("heightReference"),fillColor:C$10("fillColor"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),translucencyByDistance:C$10("translucencyByDistance"),pixelOffsetScaleByDistance:C$10("pixelOffsetScaleByDistance"),scaleByDistance:C$10("scaleByDistance"),distanceDisplayCondition:C$10("distanceDisplayCondition"),disableDepthTestDistance:C$10("disableDepthTestDistance")}),n$Q.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.text=this.text,e.font=this.font,e.style=this.style,e.scale=this.scale,e.showBackground=this.showBackground,e.backgroundColor=this.backgroundColor,e.backgroundPadding=this.backgroundPadding,e.pixelOffset=this.pixelOffset,e.eyeOffset=this.eyeOffset,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.heightReference=this.heightReference,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e.scaleByDistance=this.scaleByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new n$Q(this)},n$Q.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.text=u$Z(this.text,e.text),this.font=u$Z(this.font,e.font),this.style=u$Z(this.style,e.style),this.scale=u$Z(this.scale,e.scale),this.showBackground=u$Z(this.showBackground,e.showBackground),this.backgroundColor=u$Z(this.backgroundColor,e.backgroundColor),this.backgroundPadding=u$Z(this.backgroundPadding,e.backgroundPadding),this.pixelOffset=u$Z(this.pixelOffset,e.pixelOffset),this.eyeOffset=u$Z(this.eyeOffset,e.eyeOffset),this.horizontalOrigin=u$Z(this.horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=u$Z(this.verticalOrigin,e.verticalOrigin),this.heightReference=u$Z(this.heightReference,e.heightReference),this.fillColor=u$Z(this.fillColor,e.fillColor),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.translucencyByDistance=u$Z(this.translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=u$Z(this.pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.scaleByDistance=u$Z(this.scaleByDistance,e.scaleByDistance),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=u$Z(this.disableDepthTestDistance,e.disableDepthTestDistance)};var e$1p=new e$1_,a$N=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=e.translation,this.rotation=e.rotation,this.scale=e.scale};Object.defineProperties(a$N.prototype,{isConstant:{get:function(){return r$_.isConstant(this._translation)&&r$_.isConstant(this._rotation)&&r$_.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:C$10("translation"),rotation:C$10("rotation"),scale:C$10("scale")}),a$N.prototype.getValue=function(e,t){return e$2e(t)||(t=new e$1_),t.translation=r$_.getValueOrClonedDefault(this._translation,e,e$1p.translation,t.translation),t.rotation=r$_.getValueOrClonedDefault(this._rotation,e,e$1p.rotation,t.rotation),t.scale=r$_.getValueOrClonedDefault(this._scale,e,e$1p.scale,t.scale),t},a$N.prototype.equals=function(e){return this===e||e instanceof a$N&&r$_.equals(this._translation,e._translation)&&r$_.equals(this._rotation,e._rotation)&&r$_.equals(this._scale,e._scale)};var f$V=function(e,t){this._propertyNames=[],this._definitionChanged=new o$1h,e$2e(e)&&this.merge(e,t)};function g$_(e){return new e$1L(e)}function _$O(e,t){var i=e._propertyNames,n=t._propertyNames,r=i.length;if(r!==n.length)return!1;for(var o=0;o<r;++o){var a=i[o];if(-1===n.indexOf(a)||!r$_.equals(e[a],t[a]))return!1}return!0}function a$M(e){return new a$N(e)}function c$W(e){return new f$V(e,a$M)}function t$I(e){this._show=void 0,this._showSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._runAnimations=void 0,this._clampAnimations=void 0,this._runAnimationsSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._silhouetteColor=void 0,this._silhouetteColorSubscription=void 0,this._silhouetteSize=void 0,this._silhouetteSizeSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._colorBlendMode=void 0,this._colorBlendModeSubscription=void 0,this._colorBlendAmount=void 0,this._colorBlendAmountSubscription=void 0,this._clippingPlanes=void 0,this._clippingPlanesSubscription=void 0,this._imageBasedLightingFactor=void 0,this._imageBasedLightingFactorSubscription=void 0,this._lightColor=void 0,this._lightColorSubscription=void 0,this._definitionChanged=new o$1h,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function i$S(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._maximumScreenSpaceError=void 0,this._maximumScreenSpaceErrorSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function n$P(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function e$1o(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function n$O(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function a$L(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function e$1n(e){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._enuCenter=void 0,this._shapeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubsription=void 0,this._definitionChanged=new o$1h,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function n$N(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distancedisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}function e$1m(e){this._definitionChanged=new o$1h,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._enuCenter=void 0,this.merge(u$Z(e,u$Z.EMPTY_OBJECT))}Object.defineProperties(f$V.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){for(var e=this._propertyNames,t=0,i=e.length;t<i;t++)if(!r$_.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),f$V.prototype.hasProperty=function(e){return-1!==this._propertyNames.indexOf(e)},f$V.prototype.addProperty=function(e,t,i){var n=this._propertyNames;if(!e$2e(e))throw new t$15("propertyName is required.");if(-1!==n.indexOf(e))throw new t$15(e+" is already a registered property.");n.push(e),Object.defineProperty(this,e,C$10(e,!0,u$Z(i,g$_))),e$2e(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)},f$V.prototype.removeProperty=function(e){var t=this._propertyNames.indexOf(e);if(!e$2e(e))throw new t$15("propertyName is required.");if(-1===t)throw new t$15(e+" is not a registered property.");this._propertyNames.splice(t,1),delete this[e],this._definitionChanged.raiseEvent(this)},f$V.prototype.getValue=function(e,t){if(!e$2e(e))throw new t$15("time is required.");e$2e(t)||(t={});for(var i=this._propertyNames,n=0,r=i.length;n<r;n++){var o=i[n];t[o]=r$_.getValueOrUndefined(this[o],e,t[o])}return t},f$V.prototype.merge=function(e,t){if(!e$2e(e))throw new t$15("source is required.");for(var i=this._propertyNames,n=e$2e(e._propertyNames)?e._propertyNames:Object.keys(e),r=0,o=n.length;r<o;r++){var a=n[r],s=this[a],l=e[a];void 0===s&&-1===i.indexOf(a)&&this.addProperty(a,void 0,t),void 0!==l&&(void 0!==s?e$2e(s)&&e$2e(s.merge)&&s.merge(l):e$2e(l)&&e$2e(l.merge)&&e$2e(l.clone)?this[a]=l.clone():this[a]=l)}},f$V.prototype.equals=function(e){return this===e||e instanceof f$V&&_$O(this,e)},Object.defineProperties(t$I.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),scale:C$10("scale"),minimumPixelSize:C$10("minimumPixelSize"),maximumScale:C$10("maximumScale"),incrementallyLoadTextures:C$10("incrementallyLoadTextures"),shadows:C$10("shadows"),uri:C$10("uri"),runAnimations:C$10("runAnimations"),clampAnimations:C$10("clampAnimations"),nodeTransformations:C$10("nodeTransformations",void 0,c$W),heightReference:C$10("heightReference"),distanceDisplayCondition:C$10("distanceDisplayCondition"),silhouetteColor:C$10("silhouetteColor"),silhouetteSize:C$10("silhouetteSize"),color:C$10("color"),colorBlendMode:C$10("colorBlendMode"),colorBlendAmount:C$10("colorBlendAmount"),clippingPlanes:C$10("clippingPlanes"),imageBasedLightingFactor:C$10("imageBasedLightingFactor"),lightColor:C$10("lightColor")}),t$I.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.scale=this.scale,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.shadows=this.shadows,e.uri=this.uri,e.runAnimations=this.runAnimations,e.clampAnimations=this.clampAnimations,e.nodeTransformations=this.nodeTransformations,e.heightReference=this._heightReference,e.distanceDisplayCondition=this.distanceDisplayCondition,e.silhouetteColor=this.silhouetteColor,e.silhouetteSize=this.silhouetteSize,e.color=this.color,e.colorBlendMode=this.colorBlendMode,e.colorBlendAmount=this.colorBlendAmount,e.clippingPlanes=this.clippingPlanes,e.imageBasedLightingFactor=this.imageBasedLightingFactor,e.lightColor=this.lightColor,e):new t$I(this)},t$I.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.scale=u$Z(this.scale,e.scale),this.minimumPixelSize=u$Z(this.minimumPixelSize,e.minimumPixelSize),this.maximumScale=u$Z(this.maximumScale,e.maximumScale),this.incrementallyLoadTextures=u$Z(this.incrementallyLoadTextures,e.incrementallyLoadTextures),this.shadows=u$Z(this.shadows,e.shadows),this.uri=u$Z(this.uri,e.uri),this.runAnimations=u$Z(this.runAnimations,e.runAnimations),this.clampAnimations=u$Z(this.clampAnimations,e.clampAnimations),this.heightReference=u$Z(this.heightReference,e.heightReference),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.silhouetteColor=u$Z(this.silhouetteColor,e.silhouetteColor),this.silhouetteSize=u$Z(this.silhouetteSize,e.silhouetteSize),this.color=u$Z(this.color,e.color),this.colorBlendMode=u$Z(this.colorBlendMode,e.colorBlendMode),this.colorBlendAmount=u$Z(this.colorBlendAmount,e.colorBlendAmount),this.clippingPlanes=u$Z(this.clippingPlanes,e.clippingPlanes),this.imageBasedLightingFactor=u$Z(this.imageBasedLightingFactor,e.imageBasedLightingFactor),this.lightColor=u$Z(this.lightColor,e.lightColor);var t=e.nodeTransformations;if(e$2e(t)){var i=this.nodeTransformations;e$2e(i)?i.merge(t):this.nodeTransformations=new f$V(t,a$M)}},Object.defineProperties(i$S.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),uri:C$10("uri"),maximumScreenSpaceError:C$10("maximumScreenSpaceError")}),i$S.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new i$S(this)},i$S.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.uri=u$Z(this.uri,e.uri),this.maximumScreenSpaceError=u$Z(this.maximumScreenSpaceError,e.maximumScreenSpaceError)},Object.defineProperties(n$P.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),leadTime:C$10("leadTime"),trailTime:C$10("trailTime"),width:C$10("width"),resolution:C$10("resolution"),material:c$$("material"),distanceDisplayCondition:C$10("distanceDisplayCondition")}),n$P.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e.width=this.width,e.resolution=this.resolution,e.material=this.material,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new n$P(this)},n$P.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.leadTime=u$Z(this.leadTime,e.leadTime),this.trailTime=u$Z(this.trailTime,e.trailTime),this.width=u$Z(this.width,e.width),this.resolution=u$Z(this.resolution,e.resolution),this.material=u$Z(this.material,e.material),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(e$1o.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),plane:C$10("plane"),dimensions:C$10("dimensions"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition")}),e$1o.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new e$1o(this)},e$1o.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.plane=u$Z(this.plane,e.plane),this.dimensions=u$Z(this.dimensions,e.dimensions),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(n$O.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),pixelSize:C$10("pixelSize"),heightReference:C$10("heightReference"),color:C$10("color"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),scaleByDistance:C$10("scaleByDistance"),translucencyByDistance:C$10("translucencyByDistance"),distanceDisplayCondition:C$10("distanceDisplayCondition"),disableDepthTestDistance:C$10("disableDepthTestDistance")}),n$O.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.pixelSize=this.pixelSize,e.heightReference=this.heightReference,e.color=this.color,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new n$O(this)},n$O.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.pixelSize=u$Z(this.pixelSize,e.pixelSize),this.heightReference=u$Z(this.heightReference,e.heightReference),this.color=u$Z(this.color,e.color),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.scaleByDistance=u$Z(this.scaleByDistance,e.scaleByDistance),this.translucencyByDistance=u$Z(this._translucencyByDistance,e.translucencyByDistance),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=u$Z(this.disableDepthTestDistance,e.disableDepthTestDistance)},Object.defineProperties(a$L.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),positions:C$10("positions"),width:C$10("width"),hMax:C$10("hMax"),granularity:C$10("granularity"),material:c$$("material"),depthFailMaterial:c$$("depthFailMaterial"),arcType:C$10("arcType"),clampToGround:C$10("clampToGround"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),classificationType:C$10("classificationType"),zIndex:C$10("zIndex")}),a$L.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.hMax=this.hMax,e.granularity=this.granularity,e.material=this.material,e.depthFailMaterial=this.depthFailMaterial,e.arcType=this.arcType,e.clampToGround=this.clampToGround,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new a$L(this)},a$L.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.positions=u$Z(this.positions,e.positions),this.width=u$Z(this.width,e.width),this.granularity=u$Z(this.granularity,e.granularity),this.material=u$Z(this.material,e.material),this.depthFailMaterial=u$Z(this.depthFailMaterial,e.depthFailMaterial),this.arcType=u$Z(this.arcType,e.arcType),this.clampToGround=u$Z(this.clampToGround,e.clampToGround),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$Z(this.classificationType,e.classificationType),this.zIndex=u$Z(this.zIndex,e.zIndex),this.hMax=u$Z(this.hMax,e.hMax)},Object.defineProperties(e$1n.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),material:c$$("material"),positions:C$10("positions"),shape:C$10("shape"),granularity:C$10("granularity"),fill:C$10("fill"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),cornerType:C$10("cornerType"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),enuCenter:C$10("enuCenter")}),e$1n.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.material=this.material,e.positions=this.positions,e.shape=this.shape,e.granularity=this.granularity,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.cornerType=this.cornerType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.enuCenter=this.enuCenter,e):new e$1n(this)},e$1n.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.material=u$Z(this.material,e.material),this.positions=u$Z(this.positions,e.positions),this.shape=u$Z(this.shape,e.shape),this.granularity=u$Z(this.granularity,e.granularity),this.fill=u$Z(this.fill,e.fill),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.cornerType=u$Z(this.cornerType,e.cornerType),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.enuCenter=u$Z(this.enuCenter,e.enuCenter)},Object.defineProperties(n$N.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),coordinates:C$10("coordinates"),height:C$10("height"),heightReference:C$10("heightReference"),extrudedHeight:C$10("extrudedHeight"),extrudedHeightReference:C$10("extrudedHeightReference"),rotation:C$10("rotation"),stRotation:C$10("stRotation"),granularity:C$10("granularity"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),classificationType:C$10("classificationType"),zIndex:C$10("zIndex")}),n$N.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.coordinates=this.coordinates,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new n$N(this)},n$N.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.coordinates=u$Z(this.coordinates,e.coordinates),this.height=u$Z(this.height,e.height),this.heightReference=u$Z(this.heightReference,e.heightReference),this.extrudedHeight=u$Z(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=u$Z(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=u$Z(this.rotation,e.rotation),this.stRotation=u$Z(this.stRotation,e.stRotation),this.granularity=u$Z(this.granularity,e.granularity),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=u$Z(this.classificationType,e.classificationType),this.zIndex=u$Z(this.zIndex,e.zIndex)},Object.defineProperties(e$1m.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:C$10("show"),positions:C$10("positions"),minimumHeights:C$10("minimumHeights"),maximumHeights:C$10("maximumHeights"),granularity:C$10("granularity"),fill:C$10("fill"),material:c$$("material"),outline:C$10("outline"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth"),shadows:C$10("shadows"),distanceDisplayCondition:C$10("distanceDisplayCondition"),enuCenter:C$10("enuCenter")}),e$1m.prototype.clone=function(e){return e$2e(e)?(e.show=this.show,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.enuCenter=this.enuCenter,e):new e$1m(this)},e$1m.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.show=u$Z(this.show,e.show),this.positions=u$Z(this.positions,e.positions),this.minimumHeights=u$Z(this.minimumHeights,e.minimumHeights),this.maximumHeights=u$Z(this.maximumHeights,e.maximumHeights),this.granularity=u$Z(this.granularity,e.granularity),this.fill=u$Z(this.fill,e.fill),this.material=u$Z(this.material,e.material),this.outline=u$Z(this.outline,e.outline),this.outlineColor=u$Z(this.outlineColor,e.outlineColor),this.outlineWidth=u$Z(this.outlineWidth,e.outlineWidth),this.shadows=u$Z(this.shadows,e.shadows),this.distanceDisplayCondition=u$Z(this.distanceDisplayCondition,e.distanceDisplayCondition),this.enuCenter=u$Z(this.enuCenter,e.enuCenter)};var $$Q=new a$18;function ii$6(e){return new r$V(e)}function ei$6(e){return C$10(e,void 0,ii$6)}function o$W(e,t){return C$10(e,void 0,(function(e){return e instanceof t?e:new t(e)}))}function h$W(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).id;e$2e(t)||(t=e$1T()),this._availability=void 0,this._id=t,this._definitionChanged=new o$1h,this._name=e.name,this._show=u$Z(e.show,!0),this._depthTestEnabled=u$Z(e.depthTestEnabled,!0),this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall"],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._orientation=void 0,this._scale=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this._polygonOffset={enabled:!1,value:new o$1o(0,0)},this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function v$J(e,t,i){for(var n=t.length,r=0;r<n;r++){var o=t[r],a=i;o._show!==a&&(o.show=a,v$J(o,o._children,i))}e._definitionChanged.raiseEvent(e,"isShowing",i,!i)}Object.defineProperties(h$W.prototype,{availability:c$X("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:c$X("name"),show:{get:function(){return this._show},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(e!==this._show){var t=this.isShowing;this._show=e;var i=this.isShowing;t!==i&&v$J(this,this._children,i),this._definitionChanged.raiseEvent(this,"show",e,!e)}}},isShowing:{get:function(){return this._show&&(!e$2e(this.entityCollection)||this.entityCollection.show)&&(!e$2e(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){var t=this._parent;if(t!==e){var i=this.isShowing;if(e$2e(t)){var n=t._children.indexOf(this);t._children.splice(n,1)}this._parent=e,e$2e(e)&&e._children.push(this);var r=this.isShowing;i!==r&&v$J(this,this._children,r),this._definitionChanged.raiseEvent(this,"parent",e,t)}}},children:{get:function(){return this._children},set:function(e){this._children=e}},propertyNames:{get:function(){return this._propertyNames}},billboard:o$W("billboard",n$V),box:o$W("box",n$U),corridor:o$W("corridor",n$T),cylinder:o$W("cylinder",n$S),description:C$10("description"),ellipse:o$W("ellipse",n$R),ellipsoid:o$W("ellipsoid",e$1q),label:o$W("label",n$Q),model:o$W("model",t$I),orientation:C$10("orientation"),scale:C$10("scale"),path:o$W("path",n$P),plane:o$W("plane",e$1o),point:o$W("point",n$O),polygon:o$W("polygon",l$Y),polyline:o$W("polyline",a$L),polylineVolume:o$W("polylineVolume",e$1n),properties:o$W("properties",f$V),position:ei$6("position"),rectangle:o$W("rectangle",n$N),viewFrom:C$10("viewFrom"),wall:o$W("wall",e$1m)}),h$W.prototype.isAvailable=function(e){if(!e$2e(e))throw new t$15("time is required.");var t=this._availability;return!e$2e(t)||t.contains(e)},h$W.prototype.addProperty=function(e){var t=this._propertyNames;if(!e$2e(e))throw new t$15("propertyName is required.");if(-1!==t.indexOf(e))throw new t$15(e+" is already a registered property.");if(e in this)throw new t$15(e+" is a reserved property name.");t.push(e),Object.defineProperty(this,e,c$X(e,!0))},h$W.prototype.removeProperty=function(e){var t=this._propertyNames.indexOf(e);if(!e$2e(e))throw new t$15("propertyName is required.");if(-1===t)throw new t$15(e+" is not a registered property.");this._propertyNames.splice(t,1),delete this[e]},h$W.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.name=u$Z(this.name,e.name),this.availability=u$Z(e.availability,this.availability);for(var t=this._propertyNames,i=e$2e(e._propertyNames)?e._propertyNames:Object.keys(e),n=i.length,r=0;r<n;r++){var o=i[r];if("parent"!==o){var a=this[o],s=e[o];!e$2e(a)&&-1===t.indexOf(o)&&this.addProperty(o),e$2e(s)&&(e$2e(a)?e$2e(a.merge)&&a.merge(s):e$2e(s.merge)&&e$2e(s.clone)?this[o]=s.clone():this[o]=s)}}};var P$S=new p$1e,G$13=new o$1p,x$_=new n$15;h$W.prototype.computeModelMatrix=function(e,t){o$1q.typeOf.object("time",e);var i=r$_.getValueOrUndefined(this._position,e,G$13);if(e$2e(i)){var n=r$_.getValueOrUndefined(this._orientation,e,x$_);return t=e$2e(n)?p$1d.fromRotationTranslation(p$1e.fromQuaternion(n,P$S),i,t):m$19.eastNorthUpToFixedFrame(i,void 0,t)}},h$W.prototype.computeModelMatrixForHeightReference=function(e,t,i,n,r){o$1q.typeOf.object("time",e);var o=r$_.getValueOrDefault(t,e,k$R.NONE),a=r$_.getValueOrUndefined(this._position,e,G$13);if(o===k$R.NONE||!e$2e(a)||o$1p.equalsEpsilon(a,o$1p.ZERO,e$2d.EPSILON8))return this.computeModelMatrix(e,r);var s=n.cartesianToCartographic(a,$$Q);o===k$R.CLAMP_TO_GROUND?s.height=i:s.height+=i,a=n.cartographicToCartesian(s,a);var l=r$_.getValueOrUndefined(this._orientation,e,x$_);return r=e$2e(l)?p$1d.fromRotationTranslation(p$1e.fromQuaternion(l,P$S),a,r):m$19.eastNorthUpToFixedFrame(a,void 0,r)},h$W.supportsMaterialsforEntitiesOnTerrain=function(e){return d$15.supportsMaterials(e)},h$W.supportsPolylinesOnTerrain=function(e){return g$13.isSupported(e)},h$W.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._polygonOffset.enabled=!0,o$1o.fromElements(e,t,this._polygonOffset.value)):(this._polygonOffset.enabled=!1,o$1o.fromElements(0,0,this._polygonOffset.value))};var e$1l={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2},R$S=Object.freeze(e$1l),e$1k={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},S$Q=Object.freeze(e$1k),e$1j={CENTER:0,LEFT:1,RIGHT:-1},j$V=Object.freeze(e$1j);function n$M(e,t,i,n,r){if(this.imageryLayer=e,this.x=t,this.y=i,this.level=n,this.request=void 0,0!==n){var o=t/2|0,a=i/2|0,s=n-1;this.parent=e.getImageryFromCache(o,a,s)}(this.state=wt$7.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,this.isMvtTexture=!1,this.cancelCount=0,!e$2e(r)&&e.imageryProvider.ready)&&(r=e.imageryProvider.tilingScheme.tileXYToRectangle(t,i,n));this.rectangle=r,this.discard=!1}function x$Z(e,t,i,n){var r=t.getGeometry().getFlatCoordinates(),o=r[0],a=r[1],s=i[0]*o+i[2]*a+i[4],l=i[1]*o+i[3]*a+i[5],u=s/e._canvasWidth,c=l/e._canvasWidth,h=n.west+n.width*u,d=n.south+n.height*(1-c);return o$1p.fromRadians(h,d,100)}n$M.createPlaceholder=function(e){var t=new n$M(e,0,0,0);return t.addReference(),t.state=wt$7.PLACEHOLDER,t},n$M.prototype.addReference=function(){++this.referenceCount},n$M.prototype.releaseReference=function(){if(--this.referenceCount,0===this.referenceCount){if(this.imageryLayer.removeImageryFromCache(this),e$2e(this.parent)&&this.parent.releaseReference(),e$2e(this.image)&&e$2e(this.image.destroy)&&this.image.destroy(),this.release(),e$2e(this.texture)&&this.texture.destroy(),e$2e(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),e$2e(this.labelParent)){this.imageryLayer.kmlLayer.entities.remove(this.labelParent);for(var e=0,t=this.labelParent._children.length;e<t;e++)this.imageryLayer.kmlLayer.entities.remove(this.labelParent._children[e]);this.labelParent=void 0}if(e$2e(this.billboardParent)){this.imageryLayer.kmlLayer.entities.remove(this.billboardParent);for(e=0,t=this.billboardParent._children.length;e<t;e++)this.imageryLayer.kmlLayer.entities.remove(this.billboardParent._children[e]);this.billboardParent=void 0}return i$11(this),0}return this.referenceCount},new o$1o,new o$1p;var T$T=new o$Y;function m$V(e,t,i,n,r){this.bottomLeft=u$Z(e,o$1o.ZERO),this.topRight=u$Z(t,o$1o.ZERO),this.childNode1=i,this.childNode2=n,this.imageIndex=r}n$M.prototype.createLabel=function(e,t){for(var i=this.rectangle,n=this.transform,r=(t.length,0),o=t.length;r<o;r++){var a=t[r],s=a.feature,l=a.style,u=l.getText(),c=l.textSize,h=u.getText();if(""!==h){var d,f,p,_,m=u.getFont(m),g=c+"px "+m,x=u.getFill(),y=u.getStroke();e$2e(x)&&(d=x.getColor(),(d=e$1X.unpack(d)).alpha=1),e$2e(y)&&(f=y.getColor(),f=e$1X.unpack(f),p=y.getWidth(),_=R$S.FILL_AND_OUTLINE);var v=this.labelParent;e$2e(v)||(this.labelParent=v=new h$W,this.labelParent.show=!1,e.kmlLayer.entities.add(v)),T$T.near=15e3,T$T.nearValue=2,T$T.far=1e7,T$T.farValue=0,e.kmlLayer.entities.add({parent:v,position:x$Z(e.imageryProvider,s,n,i),label:{text:h,font:g,verticalOrigin:S$Q.TOP,horizontalOrigin:j$V.LEFT,fillColor:d,outlineColor:f,outlineWidth:p,style:_,pixelOffset:new o$1o(0,2*-c),heightReference:k$R.CLAMP_TO_GROUND,scaleByDistance:T$T}})}}},n$M.prototype.createBillboard=function(e,t){for(var i=this.rectangle,n=this.transform,r=(t.length,0),o=t.length;r<o;r++){var a,s=t[r],l=s.feature,u=s.style.layout;if(e$2e(u)&&e$2e(u["icon-image"])){var c=u["icon-image"],h=u$Z(u["icon-size"],1);if(e$2e(e._imageCanvas[c]))a=e._imageCanvas[c];else{var d=e.imageryProvider._subSpriteImage[c];if(!e$2e(d))continue;(a=document.createElement("canvas")).width=d.width,a.height=d.height,a.getContext("2d").putImageData(d,0,0),e._imageCanvas[c]=a}var f=this.billboardParent;e$2e(f)||(this.billboardParent=f=new h$W,e.kmlLayer.entities.add(f)),e.kmlLayer.entities.add({parent:f,position:x$Z(e.imageryProvider,l,n,i),billboard:{image:a,scale:h,heightReference:k$R.CLAMP_TO_GROUND,pixelOffset:new o$1o(0,-a.height),scaleByDistance:new o$Y(1500,1.5,8e6,0)}})}}},n$M.prototype.processStateMachine=function(e,t,i){this.state===wt$7.UNLOADED&&!i&&!this.imageryLayer._pausing&&(this.state=wt$7.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===wt$7.TRANSITIONING&&e$2e(this.request)&&e$2e(this.beginRequestTime)&&performance.now()-this.beginRequestTime>r$1b.TIMEOUT&&this.request.cancel(),this.state===wt$7.RECEIVED&&(this.state=wt$7.TRANSITIONING,this.image,this.imageryLayer._createTexture(e.context,this,e));var n=this.state===wt$7.READY&&t&&!this.texture;(this.state===wt$7.TEXTURE_LOADED||n)&&(this.state=wt$7.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))},n$M.prototype.isDestroyed=function(){return!1},n$M.prototype.showLabelAndIcon=function(e){},n$M.prototype.setVisible=function(e){},n$M.prototype.release=function(){},n$M.prototype.onAlphaChanged=function(){};var G$12=new o$1o(16,16);function v$I(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.borderWidthInPixels,1),i=u$Z(e.initialSize,G$12);if(!e$2e(e.context))throw new t$15("context is required.");if(t<0)throw new t$15("borderWidthInPixels must be greater than or equal to zero.");if(i.x<1||i.y<1)throw new t$15("initialSize must be greater than zero.");this._context=e.context,this._pixelFormat=u$Z(e.pixelFormat,V$12.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=e$1T(),this._idHash={},this._initialSize=i,this._root=void 0}function Z$S(e,t){e._context;var i=e.numberOfImages,n=e._borderWidthInPixels;if(i>0){for(var r=e._texture.width,o=e._texture.height,a=2*(r+t.width+n),s=2*(o+t.height+n),l=r/a,u=o/s,c=new m$V(new o$1o(r+n,n),new o$1o(a,o)),h=new m$V(new o$1o,new o$1o(a,o),e._root,c),d=new m$V(new o$1o(n,o+n),new o$1o(a,s)),f=new m$V(new o$1o,new o$1o(a,s),h,d),p=0;p<e._textureCoordinates.length;p++){var _=e._textureCoordinates[p];e$2e(_)&&(_.x*=l,_.y*=u,_.width*=l,_.height*=u)}var m=new t$U({context:e._context,width:a,height:s,pixelFormat:e._pixelFormat});m.copyFromTexture(e._texture,0,0,0,0,a,s),e._texture=e._texture&&e._texture.destroy(),e._texture=m,e._root=f}else{var g=2*(t.width+2*n),x=2*(t.height+2*n);g<e._initialSize.x&&(g=e._initialSize.x),x<e._initialSize.y&&(x=e._initialSize.y),e._texture=e._texture&&e._texture.destroy(),e._texture=new t$U({context:e._context,width:g,height:x,pixelFormat:e._pixelFormat}),e._root=new m$V(new o$1o(n,n),new o$1o(g,x))}}function I$15(e,t,i){if(e$2e(t)){if(!e$2e(t.childNode1)&&!e$2e(t.childNode2)){if(e$2e(t.imageIndex))return;var n=t.topRight.x-t.bottomLeft.x,r=t.topRight.y-t.bottomLeft.y,o=n-i.width,a=r-i.height;if(o<0||a<0)return;if(0===o&&0===a)return t;if(o>a){t.childNode1=new m$V(new o$1o(t.bottomLeft.x,t.bottomLeft.y),new o$1o(t.bottomLeft.x+i.width,t.topRight.y));var s=t.bottomLeft.x+i.width+e._borderWidthInPixels;s<t.topRight.x&&(t.childNode2=new m$V(new o$1o(s,t.bottomLeft.y),new o$1o(t.topRight.x,t.topRight.y)))}else{t.childNode1=new m$V(new o$1o(t.bottomLeft.x,t.bottomLeft.y),new o$1o(t.topRight.x,t.bottomLeft.y+i.height));var l=t.bottomLeft.y+i.height+e._borderWidthInPixels;l<t.topRight.y&&(t.childNode2=new m$V(new o$1o(t.bottomLeft.x,l),new o$1o(t.topRight.x,t.topRight.y)))}return I$15(e,t.childNode1,i)}return I$15(e,t.childNode1,i)||I$15(e,t.childNode2,i)}}function C$Y(e,t,i){var n=I$15(e,e._root,t);if(e$2e(n)){n.imageIndex=i;var r=e._texture.width,o=e._texture.height,a=n.topRight.x-n.bottomLeft.x,s=n.topRight.y-n.bottomLeft.y,l=n.bottomLeft.x/r,u=n.bottomLeft.y/o,c=a/r,h=s/o;e._textureCoordinates[i]=new f$1a(l,u,c,h),e._texture.copyFrom(t,n.bottomLeft.x,n.bottomLeft.y)}else Z$S(e,t),C$Y(e,t,i);e._guid=e$1T()}Object.defineProperties(v$I.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},textureCoordinates:{get:function(){return this._textureCoordinates}},texture:{get:function(){return e$2e(this._texture)||(this._texture=new t$U({context:this._context,width:this._initialSize.x,height:this._initialSize.y,pixelFormat:this._pixelFormat})),this._texture}},numberOfImages:{get:function(){return this._textureCoordinates.length}},guid:{get:function(){return this._guid}}}),v$I.prototype.addImage=function(e,t){if(!e$2e(e))throw new t$15("id is required.");if(!e$2e(t))throw new t$15("image is required.");var i=this._idHash[e];if(e$2e(i))return i;if("function"==typeof t){if(!e$2e(t=t(e)))throw new t$15("image is required.")}else if("string"==typeof t||t instanceof t$10){t=t$10.createIfNeeded(t).fetchImage({preferImageBitmap:!!this._context.webgpu})}var n=this;return i=o$1l(t,(function(e){if(n.isDestroyed())return-1;var t=n.numberOfImages;return C$Y(n,e,t),t})),this._idHash[e]=i,i},v$I.prototype.addSubRegion=function(e,t){if(!e$2e(e))throw new t$15("id is required.");if(!e$2e(t))throw new t$15("subRegion is required.");var i=this._idHash[e];if(!e$2e(i))throw new t$13('image with id "'+e+'" not found in the atlas.');var n=this;return o$1l(i,(function(e){if(-1===e)return-1;var i=n._texture.width,r=n._texture.height,o=n.numberOfImages,a=n._textureCoordinates[e],s=a.x+t.x/i,l=a.y+t.y/r,u=t.width/i,c=t.height/r;return n._textureCoordinates.push(new f$1a(s,l,u,c)),n._guid=e$1T(),o}))},v$I.prototype.addTextureCoordBounds=function(e){this._textureCoordinates.push(e)},v$I.prototype.isDestroyed=function(){return!1},v$I.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),i$11(this)};var _0x52a681=(_0x452b59=!0,function(e,t){var i=_0x452b59?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x452b59=!1,i}),_0x43054d=_0x52a681(void 0,(function(){return _0x43054d.toString().search("(((.+)+)+)+$").toString().constructor(_0x43054d).search("(((.+)+)+)+$")})),_0x452b59;_0x43054d();var _0x28ac7b=1,_0x9f22a4=function(e,t){var i=t.pixelRatio,n=t.version,r=t.stretchX,o=t.stretchY,a=t.content;this.paddedRect=e,this.pixelRatio=i,this.stretchX=r,this.stretchY=o,this.content=a,this.version=n},_0x3fdfe2={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};_0x3fdfe2.tl.get=function(){return[this.paddedRect.x+_0x28ac7b,this.paddedRect.y+_0x28ac7b]},_0x3fdfe2.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-_0x28ac7b,this.paddedRect.y+this.paddedRect.h-_0x28ac7b]},_0x3fdfe2.tlbr.get=function(){return this.tl.concat(this.br)},_0x3fdfe2.displaySize.get=function(){return[(this.paddedRect.w-2*_0x28ac7b)/this.pixelRatio,(this.paddedRect.h-2*_0x28ac7b)/this.pixelRatio]},Object.defineProperties(_0x9f22a4.prototype,_0x3fdfe2);var _0x511ee7=(_0x554279=!0,function(e,t){var i=_0x554279?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x554279=!1,i}),_0x45f9a8=_0x511ee7(void 0,(function(){return _0x45f9a8.toString().search("(((.+)+)+)+$").toString().constructor(_0x45f9a8).search("(((.+)+)+)+$")})),_0x554279;_0x45f9a8();var _0x224c0e=function(e,t){_0x2661b7(this,e,4,t)};function _0x2661b7(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function _0x4e498a(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=_0x2661b7({},{width:n,height:r},i);_0x4d7c6f(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function _0x4d7c6f(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)return console.log("out of range source coordinates for image copy"),t;if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)return console.log("out of range destination coordinates for image copy"),t;for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}function W$V(e){for(var t=0,i=0,n=0,r=e;n<r.length;n+=1){var o=r[n];t+=o.w*o.h,i=Math.max(i,o.w)}e.sort((function(e,t){return t.h-e.h}));for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}],s=0,l=0,u=0,c=e;u<c.length;u+=1)for(var h=c[u],d=a.length-1;d>=0;d--){var f=a[d];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var p=a.pop();d<a.length&&(a[d]=p)}else h.h===f.h?(f.x+=h.w,f.w-=h.w):h.w===f.w?(f.y+=h.h,f.h-=h.h):(a.push({x:f.x+h.w,y:f.y,w:f.w-h.w,h:h.h}),f.y+=h.h,f.h-=h.h);break}}return{w:s,h:l,fill:t/(s*l)||0}}_0x224c0e.prototype.resize=function(e){_0x4e498a(this,e,4)},_0x224c0e.prototype.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},_0x224c0e.prototype.clone=function(){return new _0x224c0e({width:this.width,height:this.height},new Uint8Array(this.data))},_0x224c0e.copy=function(e,t,i,n,r){_0x4d7c6f(e,t,i,n,r,4)};var _0x4628c2=(_0x320852=!0,function(e,t){var i=_0x320852?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x320852=!1,i}),_0x415dc3=_0x4628c2(void 0,(function(){return _0x415dc3.toString().search("(((.+)+)+)+$").toString().constructor(_0x415dc3).search("(((.+)+)+)+$")})),_0x320852;_0x415dc3();var _0x2d1841=1,_0x299a0f=function(e,t){var i={},n={};this.haveRenderCallbacks=[];var r=[];this.addImages(e,i,r),this.addImages(t,n,r);var o=W$V(r),a=o.w,s=o.h,l=new _0x224c0e({width:a||1,height:s||1});for(var u in e){var c=e[u],h=i[u].paddedRect;_0x224c0e.copy(c.data,l,{x:0,y:0},{x:h.x+_0x2d1841,y:h.y+_0x2d1841},c.data)}for(var d in t){var f=t[d],p=n[d].paddedRect,_=p.x+_0x2d1841,m=p.y+_0x2d1841,g=f.data.width,x=f.data.height;_0x224c0e.copy(f.data,l,{x:0,y:0},{x:_,y:m},f.data),_0x224c0e.copy(f.data,l,{x:0,y:x-1},{x:_,y:m-1},{width:g,height:1}),_0x224c0e.copy(f.data,l,{x:0,y:0},{x:_,y:m+x},{width:g,height:1}),_0x224c0e.copy(f.data,l,{x:g-1,y:0},{x:_-1,y:m},{width:1,height:x}),_0x224c0e.copy(f.data,l,{x:0,y:0},{x:_+g,y:m},{width:1,height:x})}this.image=l,this.iconPositions=i,this.patternPositions=n};_0x299a0f.prototype.addImages=function(e,t,i){for(var n in e){var r=e[n],o={x:0,y:0,w:r.data.width+2*_0x2d1841,h:r.data.height+2*_0x2d1841};i.push(o),t[n]=new _0x9f22a4(o,r),r.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},_0x299a0f.prototype.patchUpdatedImages=function(e,t){for(var i in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[i],e.getImage(i),t),this.patchUpdatedImage(this.patternPositions[i],e.getImage(i),t)},_0x299a0f.prototype.patchUpdatedImage=function(e,t,i){if(e&&t&&e.version!==t.version){e.version=t.version;var n=e.tl,r=n[0],o=n[1];i.update(t.data,void 0,{x:r,y:o})}};var _0x242da6=(_0x397148=!0,function(e,t){var i=_0x397148?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x397148=!1,i}),_0x4a54a9=_0x242da6(void 0,(function(){return _0x4a54a9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a54a9).search("(((.+)+)+)+$")})),_0x397148;_0x4a54a9();var _0x2c7795={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function _0x311f25(e){return(e=Math.round(e))<0?0:e>255?255:e}function _0x52e73e(e){return e<0?0:e>1?1:e}function _0x14e416(e){return"%"===e[e.length-1]?_0x311f25(parseFloat(e)/100*255):_0x311f25(parseInt(e))}function _0x26f5b8(e){return"%"===e[e.length-1]?_0x52e73e(parseFloat(e)/100):_0x52e73e(parseFloat(e))}function _0x2fee71(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function _0x28bc80(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in _0x2c7795)return _0x2c7795[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===i.length){var o=i.substr(0,n),a=i.substr(n+1,r-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=_0x26f5b8(a.pop());case"rgb":return 3!==a.length?null:[_0x14e416(a[0]),_0x14e416(a[1]),_0x14e416(a[2]),s];case"hsla":if(4!==a.length)return null;s=_0x26f5b8(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=_0x26f5b8(a[1]),c=_0x26f5b8(a[2]),h=c<=.5?c*(u+1):c+u-c*u,d=2*c-h;return[_0x311f25(255*_0x2fee71(d,h,l+1/3)),_0x311f25(255*_0x2fee71(d,h,l)),_0x311f25(255*_0x2fee71(d,h,l-1/3)),s];default:return null}}return null}const _0x2629c3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1c56cb=_0x2629c3(void 0,(function(){return _0x1c56cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c56cb).search("(((.+)+)+)+$")}));_0x1c56cb();class _0x546352{constructor(e,t,i,n=1){this.r=e,this.g=t,this.b=i,this.a=n}static parse(e){if(!e)return;if(e instanceof _0x546352)return e;if("string"!=typeof e)return;const t=_0x28bc80(e);return t?new _0x546352(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,i,n]=this.toArray();return"rgba("+Math.round(e)+","+Math.round(t)+","+Math.round(i)+","+n+")"}toArray(){const{r:e,g:t,b:i,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*i/n,n]}}_0x546352.black=new _0x546352(0,0,0,1),_0x546352.white=new _0x546352(1,1,1,1),_0x546352.transparent=new _0x546352(0,0,0,0),_0x546352.red=new _0x546352(1,0,0,1);var _0x20388c={kind:"null"},_0x42b4fa={kind:"number"},_0x6b311c={kind:"string"},_0x117b37={kind:"boolean"},_0x33457e={kind:"color"},_0xea11bc={kind:"object"},_0x13f247={kind:"value"},_0x73514b={kind:"formatted"},_0x305334={kind:"resolvedImage"};function _0x30a580(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));return r(),{kind:"array",itemType:e,N:t}}function _0x1d8b7b(e){if("array"===e.kind){var t=_0x1d8b7b(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var _0x58c023=[_0x20388c,_0x42b4fa,_0x6b311c,_0x117b37,_0x33457e,_0x73514b,_0xea11bc,_0x30a580(_0x13f247),_0x305334];function _0x40e569(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!_0x40e569(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var i=0,n=_0x58c023;i<n.length;i+=1){if(!_0x40e569(n[i],t))return null}}return"Expected "+_0x1d8b7b(e)+" but found "+_0x1d8b7b(t)+" instead."}var _0x5962d3=(_0x30f963=!0,function(e,t){var i=_0x30f963?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30f963=!1,i}),_0x2b2968=_0x5962d3(void 0,(function(){return _0x2b2968.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b2968).search("(((.+)+)+)+$")})),_0x30f963;_0x2b2968();var _0x53bf3c=function(e,t,i){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};_0x53bf3c.prototype.compare=function(e,t){return this.collator.compare(e,t)},_0x53bf3c.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var _0xfc81af=(_0x1e07a8=!0,function(e,t){var i=_0x1e07a8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e07a8=!1,i}),_0x4834b4=_0xfc81af(void 0,(function(){return _0x4834b4.toString().search("(((.+)+)+)+$").toString().constructor(_0x4834b4).search("(((.+)+)+)+$")})),_0x1e07a8;_0x4834b4();var _0x34c68a=function(e,t,i,n,r){this.text=e,this.image=t,this.scale=i,this.fontStack=n,this.textColor=r},_0x5eb17e=(_0x563c8c=!0,function(e,t){var i=_0x563c8c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x563c8c=!1,i}),_0x258de6=_0x5eb17e(void 0,(function(){return _0x258de6.toString().search("(((.+)+)+)+$").toString().constructor(_0x258de6).search("(((.+)+)+)+$")})),_0x563c8c;_0x258de6();var _0x4dced4=function(e){this.sections=e};_0x4dced4.fromString=function(e){return new _0x4dced4([new _0x34c68a(e,null,null,null,null)])},_0x4dced4.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},_0x4dced4.factory=function(e){return e instanceof _0x4dced4?e:_0x4dced4.fromString(e)},_0x4dced4.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},_0x4dced4.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];if(n.image)e.push(["image",n.image.name]);else{e.push(n.text);var r={};n.fontStack&&(r["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(r["font-scale"]=n.scale),n.textColor&&(r["text-color"]=["rgba"].concat(n.textColor.toArray())),e.push(r)}}return e};var _0x42eed7=(_0x5232fe=!0,function(e,t){var i=_0x5232fe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5232fe=!1,i}),_0x48ccd6=_0x42eed7(void 0,(function(){return _0x48ccd6.toString().search("(((.+)+)+)+$").toString().constructor(_0x48ccd6).search("(((.+)+)+)+$")})),_0x5232fe;_0x48ccd6();var _0x287856=function(e){this.name=e.name,this.available=e.available};_0x287856.prototype.toString=function(){return this.name},_0x287856.fromString=function(e){return new _0x287856({name:e,available:!1})},_0x287856.prototype.serialize=function(){return["image",this.name]};var _0x31c2e4=(_0x1e07cf=!0,function(e,t){var i=_0x1e07cf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e07cf=!1,i}),_0x40a697=_0x31c2e4(void 0,(function(){return _0x40a697.toString().search("(((.+)+)+)+$").toString().constructor(_0x40a697).search("(((.+)+)+)+$")})),_0x1e07cf;_0x40a697();var _0x4b84e9={kind:"null"},_0x124020={kind:"number"},_0xd6e534={kind:"string"},_0x55da2d={kind:"boolean"},_0x183590={kind:"color"},_0x4d3e31={kind:"object"},_0x1bed1c={kind:"value"},_0x568bce={kind:"collator"},_0x1e5478={kind:"formatted"},_0x1dcb54={kind:"resolvedImage"};function _0x3dbcd4(e,t){return{kind:"array",itemType:e,N:t}}function _0x2eeeb8(){}_0x2eeeb8.validateRGBA=function(e,t,i,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,i,n]:[e,t,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."},_0x2eeeb8.isValue=function(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof _0x546352)return!0;if(e instanceof _0x53bf3c)return!0;if(e instanceof _0x4dced4)return!0;if(e instanceof _0x287856)return!0;if(Array.isArray(e)){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(!_0x2eeeb8.isValue(n))return!1}return!0}if("object"==typeof e){for(var r in e)if(!_0x2eeeb8.isValue(e[r]))return!1;return!0}return!1},_0x2eeeb8.typeOf=function(e){if(null===e)return _0x4b84e9;if("string"==typeof e)return _0xd6e534;if("boolean"==typeof e)return _0x55da2d;if("number"==typeof e)return _0x124020;if(e instanceof _0x546352)return _0x183590;if(e instanceof _0x53bf3c)return _0x568bce;if(e instanceof _0x4dced4)return _0x1e5478;if(e instanceof _0x287856)return _0x1dcb54;if(Array.isArray(e)){for(var t,i=e.length,n=0,r=e;n<r.length;n+=1){var o=r[n],a=_0x2eeeb8.typeOf(o);if(t){if(t===a)continue;t=_0x1bed1c;break}t=a}return _0x3dbcd4(t||_0x1bed1c,i)}return _0x4d3e31},_0x2eeeb8.toString$1=function(e){var t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof _0x546352||e instanceof _0x4dced4||e instanceof _0x287856?e.toString():JSON.stringify(e)};var _0x197b00=(_0x5d16bf=!0,function(e,t){var i=_0x5d16bf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d16bf=!1,i}),_0x452c82=_0x197b00(void 0,(function(){return _0x452c82.toString().search("(((.+)+)+)+$").toString().constructor(_0x452c82).search("(((.+)+)+)+$")})),_0x5d16bf;_0x452c82();var _0x14c812={kind:"number"},_0x58df65={kind:"string"},_0x3ea9e2={kind:"boolean"},_0x2f3859={kind:"object"},_0x26d2ba={kind:"value"};function _0x253d9f(e,t){return{kind:"array",itemType:e,N:t}}var _0x379723={string:_0x58df65,number:_0x14c812,boolean:_0x3ea9e2,object:_0x2f3859},_0x141c3d=function(e,t){this.type=e,this.args=t};_0x141c3d.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i,n=1,r=e[0];if("array"===r){var o,a;if(e.length>2){var s=e[1];if("string"!=typeof s||!(s in _0x379723)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=_0x379723[s],n++}else o=_0x26d2ba;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}i=_0x253d9f(o,a)}else i=_0x379723[r];for(var l=[];n<e.length;n++){var u=t.parse(e[n],n,_0x26d2ba);if(!u)return null;l.push(u)}return new _0x141c3d(i,l)},_0x141c3d.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var i=this.args[t].evaluate(e);if(!_0x40e569(this.type,_0x2eeeb8.typeOf(i)))return i;if(t===this.args.length-1)throw new RuntimeError("Expected value to be of type "+toString(this.type)+", but found "+toString(_0x2eeeb8.typeOf(i))+" instead.")}return null},_0x141c3d.prototype.eachChild=function(e){this.args.forEach(e)},_0x141c3d.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},_0x141c3d.prototype.serialize=function(){var e=this.type,t=[e.kind];if("array"===e.kind){var i=e.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){t.push(i.kind);var n=e.N;("number"==typeof n||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var _0x753a62=(_0x1eb40e=!0,function(e,t){var i=_0x1eb40e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1eb40e=!1,i}),_0x158d02=_0x753a62(void 0,(function(){return _0x158d02.toString().search("(((.+)+)+)+$").toString().constructor(_0x158d02).search("(((.+)+)+)+$")})),_0x1eb40e;_0x158d02();var _0x23e35a={kind:"number"},_0x420313={kind:"value"};function _0x50284e(e,t){return{kind:"array",itemType:e,N:t}}var _0x7317eb=function(e,t,i){this.type=e,this.index=t,this.input=i};_0x7317eb.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,_0x23e35a),n=t.parse(e[2],2,_0x50284e(t.expectedType||_0x420313));if(!i||!n)return null;var r=n.type;return new _0x7317eb(r.itemType,i,n)},_0x7317eb.prototype.evaluate=function(e){var t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new RuntimeError("Array index out of bounds: "+t+" < 0.");if(t>=i.length)throw new RuntimeError("Array index out of bounds: "+t+" > "+(i.length-1)+".");if(t!==Math.floor(t))throw new RuntimeError("Array index must be an integer, but found "+t+" instead.");return i[t]},_0x7317eb.prototype.eachChild=function(e){e(this.index),e(this.input)},_0x7317eb.prototype.possibleOutputs=function(){return[void 0]},_0x7317eb.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var _0xa3cadc=(_0x2305e5=!0,function(e,t){var i=_0x2305e5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2305e5=!1,i}),_0x20ac1f=_0xa3cadc(void 0,(function(){return _0x20ac1f.toString().search("(((.+)+)+)+$").toString().constructor(_0x20ac1f).search("(((.+)+)+)+$")})),_0x2305e5;_0x20ac1f();var _0x5ef17c={kind:"boolean"},_0x39eefc=function(e,t,i){this.type=e,this.branches=t,this.otherwise=i};_0x39eefc.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var i;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(var n=[],r=1;r<e.length-1;r+=2){var o=t.parse(e[r],r,_0x5ef17c);if(!o)return null;var a=t.parse(e[r+1],r+1,i);if(!a)return null;n.push([o,a]),i=i||a.type}var s=t.parse(e[e.length-1],e.length-1,i);return s?new _0x39eefc(i,n,s):null},_0x39eefc.prototype.evaluate=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];if(r.evaluate(e))return o.evaluate(e)}return this.otherwise.evaluate(e)},_0x39eefc.prototype.eachChild=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e(r),e(o)}e(this.otherwise)},_0x39eefc.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.branches.map((function(e){return e[0],e[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},_0x39eefc.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x15517a=(_0x3a6c21=!0,function(e,t){var i=_0x3a6c21?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a6c21=!1,i}),_0x2bce66=_0x15517a(void 0,(function(){return _0x2bce66.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bce66).search("(((.+)+)+)+$")})),_0x3a6c21;_0x2bce66();var _0x1ad80f={kind:"value"},_0x457bfd=function(e,t){this.type=e,this.args=t};_0x457bfd.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var i=null,n=t.expectedType;n&&"value"!==n.kind&&(i=n);for(var r=[],o=0,a=e.slice(1);o<a.length;o+=1){var s=a[o],l=t.parse(s,1+r.length,i,void 0,{typeAnnotation:"omit"});if(!l)return null;i=i||l.type,r.push(l)}var u=n&&r.some((function(e){return _0x40e569(n,e.type)}));return new _0x457bfd(u?_0x1ad80f:i,r)},_0x457bfd.prototype.evaluate=function(e){for(var t,i=null,n=0,r=0,o=this.args;r<o.length;r+=1){if(n++,(i=o[r].evaluate(e))&&i instanceof _0x287856&&!i.available&&(!t&&(t=i.name),i=null,n===this.args.length&&(i=t)),null!==i)break}return i},_0x457bfd.prototype.eachChild=function(e){this.args.forEach(e)},_0x457bfd.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},_0x457bfd.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x320c21=(_0x3a23d8=!0,function(e,t){var i=_0x3a23d8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a23d8=!1,i}),_0x3966d7=_0x320c21(void 0,(function(){return _0x3966d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x3966d7).search("(((.+)+)+)+$")})),_0x3a23d8;_0x3966d7();var _0x16c341={kind:"number"},_0x4b1d3d={kind:"string"},_0x155046={kind:"boolean"},_0x6fbbc={kind:"color"},_0x4529c4={kind:"value"},_0x1570fb={"to-boolean":_0x155046,"to-color":_0x6fbbc,"to-number":_0x16c341,"to-string":_0x4b1d3d},_0x3b95f6=function(e,t){this.type=e,this.args=t};_0x3b95f6.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[0];if(("to-boolean"===i||"to-string"===i)&&2!==e.length)return t.error("Expected one argument.");for(var n=_0x1570fb[i],r=[],o=1;o<e.length;o++){var a=t.parse(e[o],o,_0x4529c4);if(!a)return null;r.push(a)}return new _0x3b95f6(n,r)},_0x3b95f6.prototype.evaluate=function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){for(var t,i,n=0,r=this.args;n<r.length;n+=1){if(i=null,(t=r[n].evaluate(e))instanceof _0x546352)return t;if("string"==typeof t){var o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&!(i=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":validateRGBA(t[0],t[1],t[2],t[3])))return new _0x546352(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new RuntimeError(i||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null===(a=l[s].evaluate(e)))return 0;var u=Number(a);if(!isNaN(u))return u}throw new RuntimeError("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?Formatted.fromString(_0x2eeeb8.toString$1(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?_0x287856.fromString(_0x2eeeb8.toString$1(this.args[0].evaluate(e))):_0x2eeeb8.toString$1(this.args[0].evaluate(e))},_0x3b95f6.prototype.eachChild=function(e){this.args.forEach(e)},_0x3b95f6.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},_0x3b95f6.prototype.serialize=function(){if("formatted"===this.type.kind)return new FormatExpression([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ImageExpression(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x54055a=(_0x3b98ab=!0,function(e,t){var i=_0x3b98ab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b98ab=!1,i}),_0x4a46d8=_0x54055a(void 0,(function(){return _0x4a46d8.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a46d8).search("(((.+)+)+)+$")})),_0x3b98ab;_0x4a46d8();var _0x18fe7c={kind:"string"},_0x3f34f0={kind:"boolean"},_0x262703={kind:"collator"},_0x3aa7d3=function(e,t,i){this.type=_0x262703,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=t};_0x3aa7d3.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var i=e[1];if("object"!=typeof i||Array.isArray(i))return t.error("Collator options argument must be an object.");var n=t.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,_0x3f34f0);if(!n)return null;var r=t.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,_0x3f34f0);if(!r)return null;var o=null;return i.locale&&!(o=t.parse(i.locale,1,_0x18fe7c))?null:new _0x3aa7d3(n,r,o)},_0x3aa7d3.prototype.evaluate=function(e){return new _0x53bf3c(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},_0x3aa7d3.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},_0x3aa7d3.prototype.possibleOutputs=function(){return[void 0]},_0x3aa7d3.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var _0x56fe45={kind:"boolean"},_0x5a2186={kind:"value"},_0x461c89={kind:"collator"};function _0x1157a1(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function _0xd24ca4(e,t,i){return t===i}function _0x304a91(e,t,i){return t!==i}function _0x294908(e,t,i){return t<i}function _0x37614f(e,t,i){return t>i}function _0x382484(e,t,i){return t<=i}function _0x4d6869(e,t,i){return t>=i}function _0xdff470(e,t,i,n){return 0===n.compare(t,i)}function _0x12cf4a(e,t,i,n){return!_0xdff470(e,t,i,n)}function _0xeba83e(e,t,i,n){return n.compare(t,i)<0}function _0x3b245f(e,t,i,n){return n.compare(t,i)>0}function _0x4aedfa(e,t,i,n){return n.compare(t,i)<=0}function _0x53fe01(e,t,i,n){return n.compare(t,i)>=0}function _0x45fb2f(e,t,i){var n,r=(n=!0,function(e,t){var i=n?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return n=!1,i}),o="=="!==e&&"!="!==e;return function(){var n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function a(e,t,i){this.type=_0x56fe45,this.lhs=e,this.rhs=t,this.collator=i,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return n(),a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var i=e[0],n=t.parse(e[1],1,_0x5a2186);if(!n)return null;if(!_0x1157a1(i,n.type))return t.concat(1).error('"'+i+"\" comparisons are not supported for type '"+toString(n.type)+"'.");var r=t.parse(e[2],2,_0x5a2186);if(!r)return null;if(!_0x1157a1(i,r.type))return t.concat(2).error('"'+i+"\" comparisons are not supported for type '"+toString(r.type)+"'.");if(n.type.kind!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot compare types '"+toString(n.type)+"' and '"+toString(r.type)+"'.");o&&("value"===n.type.kind&&"value"!==r.type.kind?n=new _0x141c3d(r.type,[n]):"value"!==n.type.kind&&"value"===r.type.kind&&(r=new _0x141c3d(n.type,[r])));var s=null;if(4===e.length){if("string"!==n.type.kind&&"string"!==r.type.kind&&"value"!==n.type.kind&&"value"!==r.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,_0x461c89)))return null}return new a(n,r,s)},a.prototype.evaluate=function(n){var r=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(o&&this.hasUntypedArgument){var s=_0x2eeeb8.typeOf(r),l=_0x2eeeb8.typeOf(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new RuntimeError('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!o&&this.hasUntypedArgument){var u=_0x2eeeb8.typeOf(r),c=_0x2eeeb8.typeOf(a);if("string"!==u.kind||"string"!==c.kind)return t(n,r,a)}return this.collator?i(n,r,a,this.collator.evaluate(n)):t(n,r,a)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.possibleOutputs=function(){return[!0,!1]},a.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},a}()}var _0x22804e={};_0x22804e.Equals=_0x45fb2f("==",_0xd24ca4,_0xdff470),_0x22804e.NotEquals=_0x45fb2f("!=",_0x304a91,_0x12cf4a),_0x22804e.LessThan=_0x45fb2f("<",_0x294908,_0xeba83e),_0x22804e.GreaterThan=_0x45fb2f(">",_0x37614f,_0x3b245f),_0x22804e.LessThanOrEqual=_0x45fb2f("<=",_0x382484,_0x4aedfa),_0x22804e.GreaterThanOrEqual=_0x45fb2f(">=",_0x4d6869,_0x53fe01);var _0x222016=(_0x4057df=!0,function(e,t){var i=_0x4057df?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4057df=!1,i}),_0xed221e=_0x222016(void 0,(function(){return _0xed221e.toString().search("(((.+)+)+)+$").toString().constructor(_0xed221e).search("(((.+)+)+)+$")})),_0x4057df;_0xed221e();var _0x35347d={kind:"number"},_0x2a88c7={kind:"string"},_0x3e05e4={kind:"color"},_0x20892a={kind:"value"},_0x225755={kind:"formatted"},_0x335f64={kind:"resolvedImage"};function _0x443e62(e,t){return{kind:"array",itemType:e,N:t}}var _0x3903ec=function(e){this.type=_0x225755,this.sections=e};_0x3903ec.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[1];if(!Array.isArray(i)&&"object"==typeof i)return t.error("First argument must be an image or text section.");for(var n=[],r=!1,o=1;o<=e.length-1;++o){var a=e[o];if(r&&"object"==typeof a&&!Array.isArray(a)){r=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,_0x35347d)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,_0x443e62(_0x2a88c7))))return null;var u=null;if(a["text-color"]&&!(u=t.parse(a["text-color"],1,_0x3e05e4)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var h=t.parse(e[o],1,_0x20892a);if(!h)return null;var d=h.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new _0x3903ec(n)},_0x3903ec.prototype.evaluate=function(e){return new _0x4dced4(this.sections.map((function(t){var i=t.content.evaluate(e);return _0x2eeeb8.typeOf(i)===_0x335f64?new _0x34c68a("",i,null,null,null):new _0x34c68a(_0x2eeeb8.toString$1(i),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},_0x3903ec.prototype.eachChild=function(e){for(var t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e(n.content),n.scale&&e(n.scale),n.font&&e(n.font),n.textColor&&e(n.textColor)}},_0x3903ec.prototype.possibleOutputs=function(){return[void 0]},_0x3903ec.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e.push(n.content.serialize());var r={};n.scale&&(r["font-scale"]=n.scale.serialize()),n.font&&(r["text-font"]=n.font.serialize()),n.textColor&&(r["text-color"]=n.textColor.serialize()),e.push(r)}return e};var _0x13bad8=(_0x216afb=!0,function(e,t){var i=_0x216afb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x216afb=!1,i}),_0x4c9249=_0x13bad8(void 0,(function(){return _0x4c9249.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c9249).search("(((.+)+)+)+$")})),_0x216afb;_0x4c9249();var _0x4127a4={kind:"string"},_0x4c7f4d={kind:"resolvedImage"},_0x6ee878=function(e){this.type=_0x4c7f4d,this.input=e};_0x6ee878.parse=function(e,t){if(2!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,_0x4127a4);return i?new _0x6ee878(i):t.error("No image name provided.")},_0x6ee878.prototype.evaluate=function(e){var t=this.input.evaluate(e),i=!1;return e.availableImages&&e.availableImages.indexOf(t)>-1&&(i=!0),new _0x287856({name:t,available:i})},_0x6ee878.prototype.eachChild=function(e){e(this.input)},_0x6ee878.prototype.possibleOutputs=function(){return[void 0]},_0x6ee878.prototype.serialize=function(){return["image",this.input.serialize()]};var _0x558b17=(_0x503c79=!0,function(e,t){var i=_0x503c79?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x503c79=!1,i}),_0x1039b9=_0x558b17(void 0,(function(){return _0x1039b9.toString().search("(((.+)+)+)+$").toString().constructor(_0x1039b9).search("(((.+)+)+)+$")})),_0x503c79;_0x1039b9();var _0x29541f=function(e,t,i,n,r){this.type=e,this.operator=t,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=r;o<a.length;o+=1){var s=a[o],l=s[0],u=s[1];this.labels.push(l),this.outputs.push(u)}},_0x33a8c8={kind:"number"},_0x37a093={kind:"color"};function _0x3901e0(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}_0x29541f.interpolationFactor=function(e,t,i,n){var r=0;if("exponential"===e.name)r=_0x3901e0(t,e.base,i,n);else if("linear"===e.name)r=_0x3901e0(t,1,i,n);else if("cubic-bezier"===e.name){var o=e.controlPoints;r=new unitbezier(o[0],o[1],o[2],o[3]).solve(_0x3901e0(t,1,i,n))}return r},_0x29541f.parse=function(e,t){var i=e[0],n=e[1],r=e[2],o=e.slice(3);if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var a=n[1];if("number"!=typeof a)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:a}}else{if("cubic-bezier"!==n[0])return t.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some((function(e){return"number"!=typeof e||e<0||e>1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(r=t.parse(r,2,_0x33a8c8)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=_0x37a093:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c<o.length;c+=2){var h=o[c],d=o[c+1],f=c+3,p=c+4;if("number"!=typeof h)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var _=t.parse(d,p,u);if(!_)return null;u=u||_.type,l.push([h,_])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new _0x29541f(u,i,n,r,l):t.error("Type "+toString(u)+" is not interpolatable.")},_0x29541f.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;if(n>=t[r-1])return i[r-1].evaluate(e);var o=findStopLessThanOrEqualTo(t,n),a=t[o],s=t[o+1],l=_0x29541f.interpolationFactor(this.interpolation,n,a,s),u=i[o].evaluate(e),c=i[o+1].evaluate(e);return"interpolate"===this.operator?interpolate[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?hcl.reverse(hcl.interpolate(hcl.forward(u),hcl.forward(c),l)):lab.reverse(lab.interpolate(lab.forward(u),lab.forward(c),l))},_0x29541f.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1){e(i[t])}},_0x29541f.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},_0x29541f.prototype.serialize=function(){var e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],i=0;i<this.labels.length;i++)t.push(this.labels[i],this.outputs[i].serialize());return t};var _0x2866d7=(_0x2c2cb3=!0,function(e,t){var i=_0x2c2cb3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c2cb3=!1,i}),_0x6b442b=_0x2866d7(void 0,(function(){return _0x6b442b.toString().search("(((.+)+)+)+$").toString().constructor(_0x6b442b).search("(((.+)+)+)+$")})),_0x2c2cb3;_0x6b442b();var _0x525912={kind:"boolean"},_0x1b3d6d={kind:"value"};function _0x3e6e0e(e){return"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind}function _0x50a69e(e){return"boolean"==typeof e||"string"==typeof e||"number"==typeof e}function _0x315a18(e){return Array.isArray(e)||"string"==typeof e}var _0x30f82c=function(e,t){this.type=_0x525912,this.needle=e,this.haystack=t};_0x30f82c.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,_0x1b3d6d),n=t.parse(e[2],2,_0x1b3d6d);return i&&n?_0x3e6e0e(i.type)?new _0x30f82c(i,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+toString(i.type)+" instead"):null},_0x30f82c.prototype.evaluate=function(e){var t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!t||!i)return!1;if(!_0x50a69e(t))throw new RuntimeError("Expected first argument to be of type boolean, string or number, but found "+toString(typeOf(t))+" instead.");if(!_0x315a18(i))throw new RuntimeError("Expected second argument to be of type array or string, but found "+toString(typeOf(i))+" instead.");return i.indexOf(t)>=0},_0x30f82c.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},_0x30f82c.prototype.possibleOutputs=function(){return[!0,!1]},_0x30f82c.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var _0x1bc73a=(_0xd310af=!0,function(e,t){var i=_0xd310af?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd310af=!1,i}),_0x3b017d=_0x1bc73a(void 0,(function(){return _0x3b017d.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b017d).search("(((.+)+)+)+$")})),_0xd310af;_0x3b017d();var _0x82e6f7=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};_0x82e6f7.prototype.evaluate=function(e){return this.result.evaluate(e)},_0x82e6f7.prototype.eachChild=function(e){for(var t=0,i=this.bindings;t<i.length;t+=1){e(i[t][1])}e(this.result)},_0x82e6f7.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var i=[],n=1;n<e.length-1;n+=2){var r=e[n];if("string"!=typeof r)return t.error("Expected string, but found "+typeof r+" instead.",n);if(/[^a-zA-Z0-9_]/.test(r))return t.error("Variable names must contain only alphanumeric characters or '_'.",n);var o=t.parse(e[n+1],n+1);if(!o)return null;i.push([r,o])}var a=t.parse(e[e.length-1],e.length-1,t.expectedType,i);return a?new _0x82e6f7(i,a):null},_0x82e6f7.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},_0x82e6f7.prototype.serialize=function(){for(var e=["let"],t=0,i=this.bindings;t<i.length;t+=1){var n=i[t],r=n[0],o=n[1];e.push(r,o.serialize())}return e.push(this.result.serialize()),e};var _0x13adbe=(_0x13da80=!0,function(e,t){var i=_0x13da80?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13da80=!1,i}),_0xf24a27=_0x13adbe(void 0,(function(){return _0xf24a27.toString().search("(((.+)+)+)+$").toString().constructor(_0xf24a27).search("(((.+)+)+)+$")})),_0x13da80;_0xf24a27();var _0x323aa6={kind:"number"},_0x14dc1b=function(e){this.type=_0x323aa6,this.input=e};_0x14dc1b.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?t.error("Expected argument of type string or array, but found "+toString(i.type)+" instead."):new _0x14dc1b(i):null},_0x14dc1b.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new RuntimeError("Expected value to be of type string or array, but found "+toString(typeOf(t))+" instead.")},_0x14dc1b.prototype.eachChild=function(e){e(this.input)},_0x14dc1b.prototype.possibleOutputs=function(){return[void 0]},_0x14dc1b.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _0x566909=(_0x2456d9=!0,function(e,t){var i=_0x2456d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2456d9=!1,i}),_0x311cc1=_0x566909(void 0,(function(){return _0x311cc1.toString().search("(((.+)+)+)+$").toString().constructor(_0x311cc1).search("(((.+)+)+)+$")})),_0x2456d9;_0x311cc1();var _0x23876d=function(e,t){this.type=e,this.value=t};_0x23876d.parse=function(e,t){if(2!==e.length)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!_0x2eeeb8.isValue(e[1]))return t.error("invalid value");var i=e[1],n=_0x2eeeb8.typeOf(i),r=t.expectedType;return"array"===n.kind&&0===n.N&&r&&"array"===r.kind&&("number"!=typeof r.N||0===r.N)&&(n=r),new _0x23876d(n,i)},_0x23876d.prototype.evaluate=function(){return this.value},_0x23876d.prototype.eachChild=function(){},_0x23876d.prototype.possibleOutputs=function(){return[this.value]},_0x23876d.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Color?["rgba"].concat(this.value.toArray()):this.value instanceof _0x4dced4?this.value.serialize():this.value};var _0xba2a2e=(_0x4d23b7=!0,function(e,t){var i=_0x4d23b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d23b7=!1,i}),_0x3e8cf6=_0xba2a2e(void 0,(function(){return _0x3e8cf6.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e8cf6).search("(((.+)+)+)+$")})),_0x4d23b7;_0x3e8cf6();var _0x24ecb2={kind:"value"},_0x1cfadd=function(e,t,i,n,r,o){this.inputType=e,this.type=t,this.input=i,this.cases=n,this.outputs=r,this.otherwise=o};_0x1cfadd.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var i,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var r={},o=[],a=2;a<e.length-1;a+=2){var s=e[a],l=e[a+1];!Array.isArray(s)&&(s=[s]);var u=t.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,h=s;c<h.length;c+=1){var d=h[c];if("number"!=typeof d&&"string"!=typeof d)return u.error("Branch labels must be numbers or strings.");if("number"==typeof d&&Math.abs(d)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,_0x2eeeb8.typeOf(d)))return null}else i=_0x2eeeb8.typeOf(d);if(void 0!==r[String(d)])return u.error("Branch labels must be unique.");r[String(d)]=o.length}var f=t.parse(l,a,n);if(!f)return null;n=n||f.type,o.push(f)}var p=t.parse(e[1],1,_0x24ecb2);if(!p)return null;var _=t.parse(e[e.length-1],e.length-1,n);return _?"value"!==p.type.kind&&t.concat(1).checkSubtype(i,p.type)?null:new _0x1cfadd(i,n,p,r,o,_):null},_0x1cfadd.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(_0x2eeeb8.typeOf(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},_0x1cfadd.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},_0x1cfadd.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},_0x1cfadd.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],i=[],n={},r=0,o=Object.keys(this.cases).sort();r<o.length;r+=1){var a=o[r];void 0===(h=n[this.cases[a]])?(n[this.cases[a]]=i.length,i.push([this.cases[a],[a]])):i[h][1].push(a)}for(var s=function(t){return"number"===e.inputType.kind?Number(t):t},l=0,u=i;l<u.length;l+=1){var c=u[l],h=c[0],d=c[1];1===d.length?t.push(s(d[0])):t.push(d.map(s)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var _0x5022e3=(_0x15dbea=!0,function(e,t){var i=_0x15dbea?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x15dbea=!1,i}),_0x892ae3=_0x5022e3(void 0,(function(){return _0x892ae3.toString().search("(((.+)+)+)+$").toString().constructor(_0x892ae3).search("(((.+)+)+)+$")})),_0x15dbea;_0x892ae3();var _0x27be0e={kind:"number"},_0x1f4809={kind:"string"},_0x5caeda=function(e,t,i,n,r){this.type=_0x1f4809,this.number=e,this.locale=t,this.currency=i,this.minFractionDigits=n,this.maxFractionDigits=r};_0x5caeda.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,_0x27be0e);if(!i)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var r=null;if(n.locale&&!(r=t.parse(n.locale,1,_0x1f4809)))return null;var o=null;if(n.currency&&!(o=t.parse(n.currency,1,_0x1f4809)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=t.parse(n["min-fraction-digits"],1,_0x27be0e)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,_0x27be0e))?null:new _0x5caeda(i,r,o,a,s)},_0x5caeda.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},_0x5caeda.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},_0x5caeda.prototype.possibleOutputs=function(){return[void 0]},_0x5caeda.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var _0x22ce25=(_0x179c66=!0,function(e,t){var i=_0x179c66?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x179c66=!1,i}),_0x3641d3=_0x22ce25(void 0,(function(){return _0x3641d3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3641d3).search("(((.+)+)+)+$")})),_0x179c66;function _0x23bf59(e,t){for(var i,n,r=e.length-1,o=0,a=r,s=0;o<=a;)if(i=e[s=Math.floor((o+a)/2)],n=e[s+1],i<=t){if(s===r||t<n)return s;o=s+1}else{if(!(i>t))throw new RuntimeError("Input is not a number.");a=s-1}return 0}_0x3641d3();var _0x5cf533=(_0x3a82a9=!0,function(e,t){var i=_0x3a82a9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a82a9=!1,i}),_0x17f064=_0x5cf533(void 0,(function(){return _0x17f064.toString().search("(((.+)+)+)+$").toString().constructor(_0x17f064).search("(((.+)+)+)+$")})),_0x3a82a9;_0x17f064();var _0x462dc3={kind:"number"},_0x3d29d0=function(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,r=i;n<r.length;n+=1){var o=r[n],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};_0x3d29d0.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var i=t.parse(e[1],1,_0x462dc3);if(!i)return null;var n=[],r=null;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var o=1;o<e.length;o+=2){var a=1===o?-1/0:e[o],s=e[o+1],l=o,u=o+1;if("number"!=typeof a)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,r);if(!c)return null;r=r||c.type,n.push([a,c])}return new _0x3d29d0(r,i,n)},_0x3d29d0.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var r=t.length;return n>=t[r-1]?i[r-1].evaluate(e):i[_0x23bf59(t,n)].evaluate(e)},_0x3d29d0.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1){e(i[t])}},_0x3d29d0.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},_0x3d29d0.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var _0x173d4a=(_0x3ffa22=!0,function(e,t){var i=_0x3ffa22?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ffa22=!1,i}),_0x1aef97=_0x173d4a(void 0,(function(){return _0x1aef97.toString().search("(((.+)+)+)+$").toString().constructor(_0x1aef97).search("(((.+)+)+)+$")})),_0x3ffa22;_0x1aef97();var _0x44348c=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};_0x44348c.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var i=e[1];return t.scope.has(i)?new _0x44348c(i,t.scope.get(i)):t.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},_0x44348c.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},_0x44348c.prototype.eachChild=function(){},_0x44348c.prototype.possibleOutputs=function(){return[void 0]},_0x44348c.prototype.serialize=function(){return["var",this.name]};var _0x41a77b=(_0x429ee6=!0,function(e,t){var i=_0x429ee6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x429ee6=!1,i}),_0xc029d5=_0x41a77b(void 0,(function(){return _0xc029d5.toString().search("(((.+)+)+)+$").toString().constructor(_0xc029d5).search("(((.+)+)+)+$")})),_0x429ee6;_0xc029d5();var _0x2c803e={"==":_0x22804e.Equals,"!=":_0x22804e.NotEquals,">":_0x22804e.GreaterThan,"<":_0x22804e.LessThan,">=":_0x22804e.GreaterThanOrEqual,"<=":_0x22804e.LessThanOrEqual,array:_0x141c3d,at:_0x7317eb,boolean:_0x141c3d,case:_0x39eefc,coalesce:_0x457bfd,collator:_0x3aa7d3,format:_0x3903ec,image:_0x6ee878,in:_0x30f82c,interpolate:_0x29541f,"interpolate-hcl":_0x29541f,"interpolate-lab":_0x29541f,length:_0x14dc1b,let:_0x82e6f7,literal:_0x23876d,match:_0x1cfadd,number:_0x141c3d,"number-format":_0x5caeda,object:_0x141c3d,step:_0x3d29d0,string:_0x141c3d,"to-boolean":_0x3b95f6,"to-color":_0x3b95f6,"to-number":_0x3b95f6,"to-string":_0x3b95f6,var:_0x44348c},_0x1fcf5b=(_0x1c7d1b=!0,function(e,t){var i=_0x1c7d1b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c7d1b=!1,i}),_0x52da8c=_0x1fcf5b(void 0,(function(){return _0x52da8c.toString().search("(((.+)+)+)+$").toString().constructor(_0x52da8c).search("(((.+)+)+)+$")})),_0x1c7d1b;function _0x3abd5c(){}_0x52da8c();var _0x5088cf={};for(var _0x5a9f3a in _0x3abd5c.register=function(e,t,i){void 0===i&&(i={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),_0x5088cf[e]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}},_0x3abd5c.register("Object",Object),_0x3abd5c.register("Color",_0x546352),_0x3abd5c.register("Error",Error),_0x3abd5c.register("ResolvedImage",_0x287856),_0x3abd5c.register("ImageAtlas",_0x299a0f),_0x3abd5c.register("ImagePosition",_0x9f22a4),_0x3abd5c.register("RGBAImage",_0x224c0e),_0x3abd5c.register("Formatted",_0x4dced4),_0x3abd5c.register("FormattedSection",_0x34c68a),_0x2c803e)_0x2c803e[_0x5a9f3a]._classRegistryKey||_0x3abd5c.register("Expression_"+_0x5a9f3a,_0x2c803e[_0x5a9f3a]);function _0x2eecfa(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}_0x3abd5c.serialize=function(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(_0x2eecfa(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var i=e;return t&&t.push(i.buffer),i}if(e instanceof ImageData)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var n=[],r=0,o=e;r<o.length;r+=1){var a=o[r];n.push(_0x3abd5c.serialize(a,t))}return n}if("object"==typeof e){var s=e.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var u=s.serialize?s.serialize(e,t):{};if(!s.serialize){for(var c in e)if(e.hasOwnProperty(c)&&!(_0x5088cf[l].omit.indexOf(c)>=0)){var h=e[c];"function"!=typeof h&&(u[c]=_0x5088cf[l].shallow.indexOf(c)>=0?h:_0x3abd5c.serialize(h,t))}e instanceof Error&&(u.message=e.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof e)},_0x3abd5c.deserialize=function(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||_0x2eecfa(e)||ArrayBuffer.isView(e)||e instanceof ImageData)return e;if(Array.isArray(e))return e.map(_0x3abd5c.deserialize);if("object"==typeof e){var t=e.$name||"Object",i=_0x5088cf[t].klass;if(!i)throw new Error("can't deserialize unregistered class "+t);if(i.deserialize)return i.deserialize(e);for(var n=Object.create(i.prototype),r=0,o=Object.keys(e);r<o.length;r+=1){var a=o[r];if("$name"!==a){var s=e[a];n[a]=_0x5088cf[t].shallow.indexOf(a)>=0?s:_0x3abd5c.deserialize(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)};var _0xe70410=(_0x22fb44=!0,function(e,t){var i=_0x22fb44?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x22fb44=!1,i}),_0xf38481=_0xe70410(void 0,(function(){return _0xf38481.toString().search("(((.+)+)+)+$").toString().constructor(_0xf38481).search("(((.+)+)+)+$")})),_0x22fb44;_0xf38481();var ne$C=8192,_0x2e5bee=(_0x27e253=!0,function(e,t){var i=_0x27e253?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27e253=!1,i}),_0x1ab110=_0x2e5bee(void 0,(function(){return _0x1ab110.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ab110).search("(((.+)+)+)+$")})),_0x27e253;function number(e,t,i){return e*(1-i)+t*i}_0x1ab110();const _0x2c0949=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x171789=_0x2c0949(void 0,(function(){return _0x171789.toString().search("(((.+)+)+)+$").toString().constructor(_0x171789).search("(((.+)+)+)+$")}));function _0x5cbed6(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!_0x5cbed6(e[i],t[i]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!_0x5cbed6(e[i],t[i]))return!1;return!0}return e===t}function bezier(e,t,i,n){const r=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),o=r(this,(function(){return o.toString().search("(((.+)+)+)+$").toString().constructor(o).search("(((.+)+)+)+$")}));o()}function clamp(e,t,i){return Math.min(i,Math.max(t,e))}function wrap(e,t,i){const n=i-t,r=((e-t)%n+n)%n+t;return r===t?i:r}function asyncAll(e,t,i){if(!e.length)return i(null,[]);let n=e.length;const r=new Array(e.length);let o=null;e.forEach(((e,a)=>{t(e,((e,t)=>{e&&(o=e),r[a]=t,0==--n&&i(o,r)}))}))}function extend$1(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}_0x171789(),bezier();let _0x4da47a=1;function uniqueId(){return _0x4da47a++}function endsWith(e,t){return-1!==e.indexOf(t,e.length-t.length)}function mapObject(e,t,i){const n={};for(const r in e)n[r]=t.call(i||this,e[r],r,e);return n}function filterObject(e,t,i){const n={};for(const r in e)t.call(i||this,e[r],r,e)&&(n[r]=e[r]);return n}function clone(e){return Array.isArray(e)?e.map(clone):"object"==typeof e&&e?mapObject(e,clone):e}function arraysIntersect(e,t){for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>=0)return!0;return!1}const _0x2d891b={};function warnOnce(e){_0x2d891b[e]||("undefined"!=typeof console&&console.warn(e),_0x2d891b[e]=!0)}function isCounterClockwise(e,t,i){return(i.y-e.y)*(t.x-e.x)>(t.y-e.y)*(i.x-e.x)}function isWorker(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function parseCacheControl(e){const t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,i,n,r)=>{const o=n||r;return t[i]=!o||o.toLowerCase(),""})),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}var _0x4f7cc8=(_0x2c6f3a=!0,function(e,t){var i=_0x2c6f3a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c6f3a=!1,i}),_0x5623f8=_0x4f7cc8(void 0,(function(){return _0x5623f8.toString().search("(((.+)+)+)+$").toString().constructor(_0x5623f8).search("(((.+)+)+)+$")})),_0x2c6f3a;_0x5623f8();var _0xa2ce27=function(){this.first=!0};_0xa2ce27.prototype.update=function(e,t){var i=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<i&&(this.lastIntegerZoom=i,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=i,!0))},_0x3abd5c.register("ZoomHistory",_0xa2ce27);var _0x3d6cf5=(_0x5ecaf0=!0,function(e,t){var i=_0x5ecaf0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ecaf0=!1,i}),_0x1fbcaa=_0x3d6cf5(void 0,(function(){return _0x1fbcaa.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fbcaa).search("(((.+)+)+)+$")})),_0x5ecaf0;_0x1fbcaa();var _0x47eac1=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new _0xa2ce27,this.transition={})};_0x47eac1.prototype.isSupportedScript=function(e){return!1},_0x47eac1.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},_0x47eac1.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),i=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*t}},_0x3abd5c.register("EvaluationParameters",_0x47eac1);const _0x16a653=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2b0d5d=_0x16a653(void 0,(function(){return _0x2b0d5d.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b0d5d).search("(((.+)+)+)+$")}));_0x2b0d5d();const _0x36d5e2=128;function _0x471d9f(e,t){const{expression:i}=t;if("constant"===i.kind){return{kind:"constant",layoutSize:i.evaluate(new _0x47eac1(e+1))}}if("source"===i.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:n}=i;let r=0;for(;r<t.length&&t[r]<=e;)r++;r=Math.max(0,r-1);let o=r;for(;o<t.length&&t[o]<e+1;)o++;o=Math.min(t.length-1,o);const a=t[r],s=t[o];if("composite"===i.kind)return{kind:"composite",minZoom:a,maxZoom:s,interpolationType:n};return{kind:"camera",minZoom:a,maxZoom:s,minSize:i.evaluate(new _0x47eac1(a)),maxSize:i.evaluate(new _0x47eac1(s)),interpolationType:n}}}function _0x448d94(e,{uSize:t,uSizeT:i},{lowerSize:n,upperSize:r}){return"source"===e.kind?n/_0x36d5e2:"composite"===e.kind?number(n/_0x36d5e2,r/_0x36d5e2,i):t}function _0x45c464(e,t){let i=0,n=0;if("constant"===e.kind)n=e.layoutSize;else if("source"!==e.kind){const{interpolationType:r,minZoom:o,maxZoom:a}=e,s=r?clamp(_0x29541f.interpolationFactor(r,t,o,a),0,1):0;"camera"===e.kind?n=number(e.minSize,e.maxSize,s):i=s}return{uSizeT:i,uSize:n}}var _0x45a106=(_0x22ebf2=!0,function(e,t){var i=_0x22ebf2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x22ebf2=!1,i}),_0x5184c2=_0x45a106(void 0,(function(){return _0x5184c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x5184c2).search("(((.+)+)+)+$")})),_0x22ebf2;function _0x529807(){this.text={},this.icon={}}function _0x1a5135(e){this._provider=e,this._billboardsByLayers={},this._symbolInstancesInfoByLayers={}}_0x5184c2(),_0x529807.prototype.init=function(e,t,i,n){for(var r={},o=0;o<t.length;o++){r[t[o].index]=t[o]}for(o=0;o<e.length;o++){var a=e.get(o),s=a.rightJustifiedTextSymbolIndex;const t=r[a.featureIndex];var l;l=n?a.key+" "+i:t.icon.name+" "+t.id+" "+i,s>=0&&(this.text[s]={key:l,feature:t}),(s=a.centerJustifiedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.leftJustifiedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.verticalPlacedTextSymbolIndex)>=0&&(this.text[s]={key:l,feature:t}),(s=a.placedIconSymbolIndex)>=0&&(this.icon[s]={key:l,feature:t}),(s=a.verticalPlacedIconSymbolIndex)>=0&&(this.icon[s]={key:l,feature:t})}};var _0x32b5ac=new o$1p,_0x1ad0ff=new e$1X,_0x5afe2b=new e$1X,_0x30957e=new e$1X,_0x1992d9=new o$1o,_0xa5a327=new o$1o,_0x3e1e17=new o$1o,_0x139c48=new o$1o,_0x11e0f6=new o$1o,_0x4296ef=new o$1o,_0xbd33e4=new o$1o,_0x5d91bd=new o$1o,_0x46c09b=new o$1o,_0x40011d=new o$1o;function _0x250b96(e,t,i,n){var r=Math.floor(.5*n.x);return t||i?t&&!i?r/128:e.uSize:mix(r,n.y,e?e.uSizeT:0)/128}function _0x5642f4(e,t,i,n){const r=e.layoutVertexArray.bytesPerElement/2,o=t+4*i+n;return{tileX:e.layoutVertexArray.int16[o*r],tileY:e.layoutVertexArray.int16[o*r+1],offsetX:e.layoutVertexArray.int16[o*r+2]/32,offsetY:e.layoutVertexArray.int16[o*r+3]/32,texCoordX:e.layoutVertexArray.uint16[o*r+4],texCoordY:e.layoutVertexArray.uint16[o*r+5],sizeX:e.layoutVertexArray.uint16[o*r+6],sizeY:e.layoutVertexArray.uint16[o*r+7],pixeloffsetX:e.layoutVertexArray.int16[o*r+8],pixeloffsetY:e.layoutVertexArray.int16[o*r+9]}}function _0x3c346b(e){var t=j$V.LEFT,i=S$Q.CENTER;return"center"===e?(t=j$V.CENTER,i=S$Q.CENTER):"left"===e?(t=j$V.LEFT,i=S$Q.CENTER):"right"===e?(t=j$V.RIGHT,i=S$Q.CENTER):"top"===e||"bottom"===e?(t=j$V.CENTER,i=S$Q.TOP):"top-left"==e?(t=j$V.LEFT,i=S$Q.TOP):"top-right"==e?(t=j$V.RIGHT,i=S$Q.TOP):"bottom-left"==e?(t=j$V.LEFT,i=S$Q.BOTTOM):"bottom-right"==e&&(t=j$V.RIGHT,i=S$Q.BOTTOM),{horizontalOrigin:t,verticalOrigin:i}}function _0x3e8431(e,t,i){var n=i.rectangle;return{longtitude:e*n.width/ne$C+n.west,lattitude:t*n.height/ne$C+n.south}}_0x1a5135.prototype.drawLayerSymbols=function(e,t,i){var n=e.getBucket(t);if(!n)return;var r,o,a=i?n.text:n.icon;if(!a||!a.segments.get().length)return;r=this._billboardsByLayers[t.bucketName]?this._billboardsByLayers[t.bucketName]:this._billboardsByLayers[t.bucketName]={},this._symbolInstancesInfoByLayers[t.bucketName]?o=this._symbolInstancesInfoByLayers[t.bucketName]:(o=this._symbolInstancesInfoByLayers[t.bucketName]=new _0x529807).init(n.symbolInstances,n.features,e.level,i),i?(this._textCollection=this._textCollection||this._provider._billboardCollectionPool.getOne(),this._textCollection.destroyTextureAtlas=!1,this._textCollection._sdf=!0,this._textCollection.textureAtlas=e.cesiumGlyphAtlas):(this._iconCollection=this._iconCollection||this._provider._billboardCollectionPool.getOne(),this._iconCollection.destroyTextureAtlas=!1,this._iconCollection._sdf=!1,this._iconCollection.textureAtlas=e.cesiumImageAtlas);var s=t.paint,l=t.layout,u=s.get("text-color").value.value;u=e$2e(u)?u:s.get("text-color").value.evaluate(),_0x1ad0ff.red=u.r,_0x1ad0ff.green=u.g,_0x1ad0ff.blue=u.b;var c=s.get("text-halo-color").value.value,h=s.get("text-halo-width").value.value;s.get("text-halo-blur").value.value,s.get("text-show-background").value.value;var d=i?s.get("text-translate"):s.get("icon-translate");_0x5afe2b.red=c.r,_0x5afe2b.green=c.g,_0x5afe2b.blue=c.b,_0x5afe2b.alpha=c.a,_0x3c346b(l.get("text-anchor").value.value);(i||n.sdfIcons)&&t.paint.get(i?"text-halo-width":"icon-halo-width").constantOr(1);var f,p,_=i?n.textSizeData:n.iconSizeData,m=_0x45c464(_,e.level),g=_.kind,x="constant"===g||"source"===g,y="constant"===g||"camera"===g,v=void 0;i?(f=this._textCollection,p=e.cesiumGlyphAtlas,v=e.glyphAtlasTexture.size,n.iconsInText&&(e.imageAtlasTexture.size,e.imageAtlasTexture)):(f=this._iconCollection,p=e.cesiumImageAtlas,v=e.imageAtlasTexture.size);for(var $=a.placedSymbolArray.length,b=0;b<$;b++){var T,C=a.placedSymbolArray.get(b),S=i?o.text[b]:o.icon[b],w=S.feature,E=S.key,P=w.id;!r[E]&&(r[E]=[]),T=r[E];for(var A=C.numGlyphs,L=C.vertexStartIndex,M=0;M<A;M++){var R,O,D=_0x5642f4(a,L,M,0);_0x3e1e17.x=D.texCoordX/v[0],_0x3e1e17.y=D.texCoordY/v[1],_0xbd33e4.x=D.offsetX,_0xbd33e4.y=D.offsetY,_0x40011d.x=D.sizeX,_0x40011d.y=D.sizeY,R=_0x3e8431(D.tileX,D.tileY,e),O=o$1p.fromRadians(R.longtitude,R.lattitude,0);D=_0x5642f4(a,L,M,1);_0x139c48.x=D.texCoordX/v[0],_0x139c48.y=D.texCoordY/v[1],_0x5d91bd.x=D.offsetX,_0x5d91bd.y=D.offsetY;D=_0x5642f4(a,L,M,2);_0x1992d9.x=D.texCoordX/v[0],_0x1992d9.y=D.texCoordY/v[1],_0x11e0f6.x=D.offsetX,_0x11e0f6.y=D.offsetY;D=_0x5642f4(a,L,M,3);_0xa5a327.x=D.texCoordX/v[0],_0xa5a327.y=D.texCoordY/v[1],_0x4296ef.x=D.offsetX,_0x4296ef.y=D.offsetY;var I=_0x139c48.y-_0xa5a327.y,B=_0xa5a327.x-_0x1992d9.x;p.addTextureCoordBounds(new f$1a(_0x1992d9.x,_0x1992d9.y,B,I));var F,N=_0x250b96(m,x,y,_0x40011d),G=i?N/24:N,z=_0x4296ef.x-_0x11e0f6.x,U=_0x11e0f6.y-_0xbd33e4.y;e$2e(w)&&e$2e(w.properties)&&e$2e(w.properties.TEXT_COLOR)&&(F=new e$1X.fromCssColorString(w.properties.TEXT_COLOR));var V=e.mvtProvider.innerLayer.alpha;i?(e$1X.clone(u$Z(F,_0x1ad0ff),_0x30957e),_0x30957e.alpha*=V):e$1X.unpack([1,1,1,V],0,_0x30957e),z*=G,U*=G,_0x46c09b.x=_0x11e0f6.x*G+.5*z+d[0],_0x46c09b.y=_0x11e0f6.y*G-.5*U+d[1];var k=f.add({id:P,scale:1,position:O,heightReference:k$R.NONE,eyeOffset:_0x32b5ac,width:z,height:U,pixelOffset:_0x46c09b,verticalOrigin:S$Q.CENTER,horizontalOrigin:j$V.CENTER,isMVT:!0,color:_0x30957e,outlineColor:_0x5afe2b,outlineWidth:h,mvtLayerID:this._layerID,mapName:this._provider._owner._name,mvtProperties:w.properties,show:!0});k._imageIndex=p.numberOfImages-1,k._billboardsBySymbol=T,T.push(k)}}},_0x1a5135.prototype._setNeedReRender=function(e){if(e){for(var t in this._billboardsByLayers){var i=this._billboardsByLayers[t];for(var n in i)for(var r=i[n],o=0;o<r.length;o++){var a=r[o];a._billboardCollection.remove(a)}}this._billboardsByLayers={}}},_0x1a5135.prototype.release=function(){this._iconCollection&&!this._iconCollection.isDestroyed()&&(this._iconCollection.removeAll(),this._provider._billboardCollectionPool.pushBack(this._iconCollection)),this._textCollection&&!this._textCollection.isDestroyed()&&(this._textCollection.removeAll(),this._provider._billboardCollectionPool.pushBack(this._textCollection))};var _0x19cdc3=(_0x5120ce=!0,function(e,t){var i=_0x5120ce?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5120ce=!1,i}),_0x5932e0=_0x19cdc3(void 0,(function(){return _0x5932e0.toString().search("(((.+)+)+)+$").toString().constructor(_0x5932e0).search("(((.+)+)+)+$")})),_0x5120ce;_0x5932e0();var _0x46ddef=window.HTMLImageElement,_0x81e8c9=window.HTMLCanvasElement,_0x5ba463=window.HTMLVideoElement,_0x2d9725=window.ImageData,_0x556fd4=function(e,t,i,n,r){this.context=e,this.cesiumContext=t,this.format=n,this.update(i,r)};_0x556fd4.prototype.update=function(e,t,i){var n=e.width,r=e.height;this.useMipmap=Boolean(t&&t.useMipmap),!(this.size&&this.size[0]===n&&this.size[1]===r||i)&&(this.size=[n,r],this.cesiumTexture&&this.cesiumTexture.destroy());var o=e;if(o=e instanceof _0x46ddef||e instanceof _0x81e8c9||e instanceof _0x5ba463||e instanceof _0x2d9725?e:e.data,this.cesiumTexture){var a=i||{x:0,y:0},s=a.x,l=a.y;this.cesiumTexture.copyFrom({width:n,height:r,arrayBufferView:e},s,l)}else this.cesiumTexture=new t$U({context:this.cesiumContext,source:{arrayBufferView:o},width:n,height:r,pixelFormat:this.format,flipY:!1});this.useMipmap&&this.isSizePowerOfTwo()&&this.cesiumTexture.generateMipmap()},_0x556fd4.prototype.bind=function(e,t,i){i===tt$i.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(i=tt$i.LINEAR),(e!==this.filter||i!==this.minFilter||t!==this.wrap)&&(this.filter=e,this.minFilter=i,this.wrap=t,this.sampler&&this.sampler.destroy(),this.sampler=new e$1S({wrapS:t,wrapT:t,minificationFilter:i,magnificationFilter:e}),this.cesiumTexture.sampler=this.sampler)},_0x556fd4.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},_0x556fd4.prototype.destroy=function(){this.cesiumTexture&&(this.cesiumTexture.destroy(),this.cesiumTexture=null)};const _0x32e037=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x29a7c2=_0x32e037(void 0,(function(){return _0x29a7c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x29a7c2).search("(((.+)+)+)+$")}));_0x29a7c2();var _0x291530=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8};const _0x4e84bd=128,_0x4f4f70=5;var _0x2caf9a=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};_0x2caf9a.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},_0x2caf9a.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},_0x2caf9a.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},_0x2caf9a.prototype.clear=function(){this.length=0},_0x2caf9a.prototype.resize=function(e){this.reserve(e),this.length=e},_0x2caf9a.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*_0x4f4f70),_0x4e84bd),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&(0==t.length&&console.log("oldUint8Array.length == 0"),this.uint8.set(t))}},_0x2caf9a.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var _0x2680f0=(_0x41a724=!0,function(e,t){var i=_0x41a724?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41a724=!1,i}),_0x1c3512=_0x2680f0(void 0,(function(){return _0x1c3512.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c3512).search("(((.+)+)+)+$")})),_0x41a724;function _0x4f59fa(e,t){this.x=e,this.y=t}_0x1c3512(),_0x4f59fa.prototype={clone:function(){return new _0x4f59fa(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,i=e.y-this.y;return t*t+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,i=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=i,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),i=Math.sin(e),n=t*this.x-i*this.y,r=i*this.x+t*this.y;return this.x=n,this.y=r,this},_rotateAround:function(e,t){var i=Math.cos(e),n=Math.sin(e),r=t.x+i*(this.x-t.x)-n*(this.y-t.y),o=t.y+n*(this.x-t.x)+i*(this.y-t.y);return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},_0x4f59fa.convert=function(e){return e instanceof _0x4f59fa?e:Array.isArray(e)?new _0x4f59fa(e[0],e[1]):e};var _0x5ca07d=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=i,e},t}(_0x2caf9a);_0x5ca07d.prototype.bytesPerElement=4,_0x3abd5c.register("StructArrayLayout2i4",_0x5ca07d);var _0x5d0101=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=i,this.int16[o+2]=n,this.int16[o+3]=r,e},t}(_0x2caf9a);_0x5d0101.prototype.bytesPerElement=8,_0x3abd5c.register("StructArrayLayout4i8",_0x5d0101);var _0x3a714d=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(_0x2caf9a);_0x3a714d.prototype.bytesPerElement=12,_0x3abd5c.register("StructArrayLayout2i4i12",_0x3a714d);var _0x188af9=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.uint8[l+4]=n,this.uint8[l+5]=r,this.uint8[l+6]=o,this.uint8[l+7]=a,e},t}(_0x2caf9a);_0x188af9.prototype.bytesPerElement=8,_0x3abd5c.register("StructArrayLayout2i4ub8",_0x188af9);var _0x3e67de=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=i,this.uint16[u+2]=n,this.uint16[u+3]=r,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,e},t}(_0x2caf9a);_0x3e67de.prototype.bytesPerElement=16,_0x3abd5c.register("StructArrayLayout8ui16",_0x3e67de);var _0x2a61c9=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},r.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},r.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.int16[f+0]=t,this.int16[f+1]=i,this.int16[f+2]=n,this.int16[f+3]=r,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=d,e},r}(_0x2caf9a);_0x2a61c9.prototype.bytesPerElement=24,_0x3abd5c.register("StructArrayLayout4i4ui4i24",_0x2a61c9);var _0x2ef918=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.float32[r+0]=t,this.float32[r+1]=i,this.float32[r+2]=n,e},t}(_0x2caf9a);_0x2ef918.prototype.bytesPerElement=12,_0x3abd5c.register("StructArrayLayout3f12",_0x2ef918);var _0x4fd342=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint32[i+0]=t,e},t}(_0x2caf9a);_0x4fd342.prototype.bytesPerElement=4,_0x3abd5c.register("StructArrayLayout1ul4",_0x4fd342);var _0x98595f=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c){var h=this.length;return this.resize(h+1),this.emplace(h,e,t,i,n,r,o,a,s,l,u,c)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=12*e,f=6*e;return this.int16[d+0]=t,this.int16[d+1]=i,this.int16[d+2]=n,this.int16[d+3]=r,this.int16[d+4]=o,this.int16[d+5]=a,this.uint32[f+3]=s,this.uint16[d+8]=l,this.uint16[d+9]=u,this.int16[d+10]=c,this.int16[d+11]=h,e},t}(_0x2caf9a);_0x98595f.prototype.bytesPerElement=24,_0x3abd5c.register("StructArrayLayout6i1ul2ui2i24",_0x98595f);var _0x5105bd=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=i,this.int16[s+2]=n,this.int16[s+3]=r,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(_0x2caf9a);_0x5105bd.prototype.bytesPerElement=12,_0x3abd5c.register("StructArrayLayout2i2i2i12",_0x5105bd);var _0x503e36=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=i,this.float32[a+1]=n,this.float32[a+2]=r,e},t}(_0x2caf9a);_0x503e36.prototype.bytesPerElement=12,_0x3abd5c.register("StructArrayLayout2ub2f12",_0x503e36);var _0x4a583c=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){var g=this.length;return this.resize(g+1),this.emplace(g,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g){var x=24*e,y=12*e,v=48*e;return this.int16[x+0]=t,this.int16[x+1]=i,this.uint16[x+2]=n,this.uint16[x+3]=r,this.uint32[y+2]=o,this.uint32[y+3]=a,this.uint32[y+4]=s,this.uint16[x+10]=l,this.uint16[x+11]=u,this.uint16[x+12]=c,this.float32[y+7]=h,this.float32[y+8]=d,this.uint8[v+36]=f,this.uint8[v+37]=p,this.uint8[v+38]=_,this.uint32[y+10]=m,this.int16[x+22]=g,e},t}(_0x2caf9a);_0x4a583c.prototype.bytesPerElement=48,_0x3abd5c.register("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",_0x4a583c);var _0x488ada=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S){var w=this.length;return this.resize(w+1),this.emplace(w,e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S,w){var E=30*e,P=15*e;return this.int16[E+0]=t,this.int16[E+1]=i,this.int16[E+2]=n,this.int16[E+3]=r,this.int16[E+4]=o,this.int16[E+5]=a,this.int16[E+6]=s,this.int16[E+7]=l,this.uint16[E+8]=u,this.uint16[E+9]=c,this.uint16[E+10]=h,this.uint16[E+11]=d,this.uint16[E+12]=f,this.uint16[E+13]=p,this.uint16[E+14]=_,this.uint16[E+15]=m,this.uint16[E+16]=g,this.uint16[E+17]=x,this.uint16[E+18]=y,this.uint16[E+19]=v,this.uint16[E+20]=$,this.uint16[E+21]=b,this.uint32[P+11]=T,this.float32[P+12]=C,this.float32[P+13]=S,this.float32[P+14]=w,e},t}(_0x2caf9a);_0x488ada.prototype.bytesPerElement=60,_0x3abd5c.register("StructArrayLayout8i14ui1ul3f60",_0x488ada);var _0x21d029=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.float32[i+0]=t,e},t}(_0x2caf9a);_0x21d029.prototype.bytesPerElement=4,_0x3abd5c.register("StructArrayLayout1f4",_0x21d029);var _0x1059db=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.int16[r+0]=t,this.int16[r+1]=i,this.int16[r+2]=n,e},t}(_0x2caf9a);_0x1059db.prototype.bytesPerElement=6,_0x3abd5c.register("StructArrayLayout3i6",_0x1059db);var _0x205c03=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=2*e,o=4*e;return this.uint32[r+0]=t,this.uint16[o+2]=i,this.uint16[o+3]=n,e},t}(_0x2caf9a);_0x205c03.prototype.bytesPerElement=8,_0x3abd5c.register("StructArrayLayout1ul2ui8",_0x205c03);var _0x48dae8=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i)},t.prototype.emplace=function(e,t,i,n){var r=3*e;return this.uint16[r+0]=t,this.uint16[r+1]=i,this.uint16[r+2]=n,e},t}(_0x2caf9a);_0x48dae8.prototype.bytesPerElement=6,_0x3abd5c.register("StructArrayLayout3ui6",_0x48dae8);var _0x3e3135=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=i,e},t}(_0x2caf9a);_0x3e3135.prototype.bytesPerElement=4,_0x3abd5c.register("StructArrayLayout2ui4",_0x3e3135);var _0x459120=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var i=1*e;return this.uint16[i+0]=t,e},t}(_0x2caf9a);_0x459120.prototype.bytesPerElement=2,_0x3abd5c.register("StructArrayLayout1ui2",_0x459120);var _0x145fb7=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)},t.prototype.emplace=function(e,t,i){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=i,e},t}(_0x2caf9a);_0x145fb7.prototype.bytesPerElement=8,_0x3abd5c.register("StructArrayLayout2f8",_0x145fb7);var _0x214a88=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i,n)},t.prototype.emplace=function(e,t,i,n,r){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=i,this.float32[o+2]=n,this.float32[o+3]=r,e},t}(_0x2caf9a);_0x214a88.prototype.bytesPerElement=16,_0x3abd5c.register("StructArrayLayout4f16",_0x214a88);var _0xdb9a49=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,n,r,o)},t.prototype.emplace=function(e,t,i,n,r,o,a){var s=6*e;return this.float32[s+0]=t,this.float32[s+1]=i,this.float32[s+2]=n,this.float32[s+3]=r,this.float32[s+4]=o,this.float32[s+5]=a,e},t}(_0x2caf9a);_0xdb9a49.prototype.bytesPerElement=24,_0x3abd5c.register("StructArrayLayout6f24",_0xdb9a49);var _0x48bcfe=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,i,n,r,o,a,s)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l){var u=8*e;return this.float32[u+0]=t,this.float32[u+1]=i,this.float32[u+2]=n,this.float32[u+3]=r,this.float32[u+4]=o,this.float32[u+5]=a,this.float32[u+6]=s,this.float32[u+7]=l,e},t}(_0x2caf9a);_0x48bcfe.prototype.bytesPerElement=32,_0x3abd5c.register("StructArrayLayout8f32",_0x48bcfe);var _0x5eb737=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,n,r,o,a,s,l,u,c,h)},t.prototype.emplace=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=12*e;return this.float32[f+0]=t,this.float32[f+1]=i,this.float32[f+2]=n,this.float32[f+3]=r,this.float32[f+4]=o,this.float32[f+5]=a,this.float32[f+6]=s,this.float32[f+7]=l,this.float32[f+8]=u,this.float32[f+9]=c,this.float32[f+10]=h,this.float32[f+11]=d,e},t}(_0x2caf9a);_0x5eb737.prototype.bytesPerElement=48,_0x3abd5c.register("StructArrayLayout12f48",_0x5eb737);var _0x1f44f3=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return i.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.x1.get=function(){return this._structArray.int16[this._pos2+2]},i.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},i.y1.get=function(){return this._structArray.int16[this._pos2+3]},i.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},i.x2.get=function(){return this._structArray.int16[this._pos2+4]},i.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},i.y2.get=function(){return this._structArray.int16[this._pos2+5]},i.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.radius.get=function(){return this._structArray.int16[this._pos2+10]},i.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},i.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},i.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},i.anchorPoint.get=function(){return new pointGeometry(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,i),t}(_0x291530);_0x1f44f3.prototype.size=24;var _0x32bafd=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x1f44f3(this,e)},t}(_0x98595f);_0x3abd5c.register("CollisionBoxArray",_0x32bafd);var _0x125988=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},i.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},i.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},i.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},i.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},i.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},i.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},i.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},i.segment.get=function(){return this._structArray.uint16[this._pos2+10]},i.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},i.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},i.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},i.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},i.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},i.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},i.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},i.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},i.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},i.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},i.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},i.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},i.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},i.associatedIconIndex.set=function(e){this._structArray.int16[this._pos2+22]=e},Object.defineProperties(t.prototype,i),t}(_0x291530);_0x125988.prototype.size=48;var _0x11df68=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x125988(this,e)},t}(_0x4a583c);_0x3abd5c.register("PlacedSymbolArray",_0x11df68);var _0x32522f=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0}};return i.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},i.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},i.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},i.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},i.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},i.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},i.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},i.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},i.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},i.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},i.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},i.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},i.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},i.placedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+6]=e},i.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},i.verticalPlacedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+7]=e},i.key.get=function(){return this._structArray.uint16[this._pos2+8]},i.key.set=function(e){this._structArray.uint16[this._pos2+8]=e},i.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},i.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},i.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},i.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},i.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},i.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},i.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},i.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},i.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},i.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},i.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},i.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+14]=e},i.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},i.verticalIconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+15]=e},i.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},i.verticalIconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+16]=e},i.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},i.featureIndex.set=function(e){this._structArray.uint16[this._pos2+17]=e},i.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},i.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+18]=e},i.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},i.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+19]=e},i.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},i.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+20]=e},i.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},i.numVerticalIconVertices.set=function(e){this._structArray.uint16[this._pos2+21]=e},i.crossTileID.get=function(){return this._structArray.uint32[this._pos4+11]},i.crossTileID.set=function(e){this._structArray.uint32[this._pos4+11]=e},i.textBoxScale.get=function(){return this._structArray.float32[this._pos4+12]},i.textBoxScale.set=function(e){this._structArray.float32[this._pos4+12]=e},i.textOffset0.get=function(){return this._structArray.float32[this._pos4+13]},i.textOffset0.set=function(e){this._structArray.float32[this._pos4+13]=e},i.textOffset1.get=function(){return this._structArray.float32[this._pos4+14]},i.textOffset1.set=function(e){this._structArray.float32[this._pos4+14]=e},Object.defineProperties(t.prototype,i),t}(_0x291530);_0x32522f.prototype.size=60;var _0x6e09ce=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x32522f(this,e)},t}(_0x488ada);_0x3abd5c.register("SymbolInstanceArray",_0x6e09ce);var _0x3da18b=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={offsetX:{configurable:!0}};return i.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},i.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,i),t}(_0x291530);_0x3da18b.prototype.size=4;var _0x57c4ef=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new _0x3da18b(this,e)},t}(_0x21d029);_0x3abd5c.register("GlyphOffsetArray",_0x57c4ef);var _0x39375f=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return i.x.get=function(){return this._structArray.int16[this._pos2+0]},i.x.set=function(e){this._structArray.int16[this._pos2+0]=e},i.y.get=function(){return this._structArray.int16[this._pos2+1]},i.y.set=function(e){this._structArray.int16[this._pos2+1]=e},i.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},i.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,i),t}(_0x291530);_0x39375f.prototype.size=6;var _0x4822d1=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new _0x39375f(this,e)},t}(_0x1059db);_0x3abd5c.register("SymbolLineVertexArray",_0x4822d1);var _0x28b108=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return i.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},i.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},i.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},i.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},i.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},i.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,i),t}(_0x291530);_0x28b108.prototype.size=8;var _0x3b6dea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _0x28b108(this,e)},t}(_0x205c03);function _0x1c84a6(e,t,i){return Math.min(i,Math.max(t,e))}function _0x28f1a3(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),{min:-1*Math.pow(2,e-1),max:Math.pow(2,e-1)-1}}_0x3abd5c.register("FeatureIndexArray",_0x3b6dea);var _0x15f91f=_0x28f1a3(15);function _0x182c2a(e){for(var t=ne$C/e.extent,i=e.loadGeometry(),n=0;n<i.length;n++)for(var r=i[n],o=0;o<r.length;o++){var a=r[o];a.x=Math.round(a.x*t),a.y=ne$C-Math.round(a.y*t),(a.x<_0x15f91f.min||a.x>_0x15f91f.max||a.y<_0x15f91f.min||a.y>_0x15f91f.max)&&(a.x=_0x1c84a6(a.x,_0x15f91f.min,_0x15f91f.max),a.y=_0x1c84a6(a.y,_0x15f91f.min,_0x15f91f.max))}return i}var _0x4bbf33=(_0x2796b8=!0,function(e,t){var i=_0x2796b8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2796b8=!1,i}),_0x30477b=_0x4bbf33(void 0,(function(){return _0x30477b.toString().search("(((.+)+)+)+$").toString().constructor(_0x30477b).search("(((.+)+)+)+$")})),_0x2796b8;function _0x536dbd(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t<e.length;t++){var i=e[t];this._stringToNumber[i]=t,this._numberToString[t]=i}}_0x30477b(),_0x536dbd.prototype.encode=function(e){return this._stringToNumber[e]},_0x536dbd.prototype.decode=function(e){return this._numberToString[e]};var _0x4372f5=(_0x1f04f7=!0,function(e,t){var i=_0x1f04f7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f04f7=!1,i}),_0x71baa3=_0x4372f5(void 0,(function(){return _0x71baa3.toString().search("(((.+)+)+)+$").toString().constructor(_0x71baa3).search("(((.+)+)+)+$")})),_0x1f04f7;function _0x275233(e,t,i,n,r){this.properties={},this.extent=i,this.type=0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=r,e.readFields(_0x15f993,this,t)}function _0x15f993(e,t,i){1==e?t.id=i.readVarint():2==e?_0xd2d73e(i,t):3==e?t.type=i.readVarint():4==e&&(t._geometry=i.pos)}function _0xd2d73e(e,t){for(var i=e.readVarint()+e.pos;e.pos<i;){var n=t._keys[e.readVarint()],r=t._values[e.readVarint()];t.properties[n]=r}}function _0x106e31(e){var t=e.length;if(t<=1)return[e];for(var i,n,r=[],o=0;o<t;o++){var a=_0x8b5c6(e[o]);0!==a&&(void 0===n&&(n=a<0),n===a<0?(i&&r.push(i),i=[e[o]]):i.push(e[o]))}return i&&r.push(i),r}function _0x8b5c6(e){for(var t,i,n=0,r=0,o=e.length,a=o-1;r<o;a=r++)t=e[r],n+=((i=e[a]).x-t.x)*(t.y+i.y);return n}_0x71baa3(),_0x275233.types=["Unknown","Point","LineString","Polygon"],_0x275233.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,i=e.readVarint()+e.pos,n=1,r=0,o=0,a=0,s=[];e.pos<i;){if(r<=0){var l=e.readVarint();n=7&l,r=l>>3}r--,1===n||2===n?(o+=e.readSVarint(),a+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new _0x4f59fa(o,a))):7===n?t&&t.push(t[0].clone()):console.log("VectorTileFeature loadGeometry unknown command "+n)}return t&&s.push(t),s},_0x275233.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,n=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos<t;){if(n<=0){var c=e.readVarint();i=7&c,n=c>>3}if(n--,1===i||2===i)(r+=e.readSVarint())<a&&(a=r),r>s&&(s=r),(o+=e.readSVarint())<l&&(l=o),o>u&&(u=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,u]},_0x275233.prototype.toGeoJSON=function(e,t,i){var n,r,o=this.extent*Math.pow(2,i),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=_0x275233.types[this.type];function c(e){for(var t=0;t<e.length;t++){var i=e[t],n=180-360*(i.y+s)/o;e[t]=[360*(i.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(n=0;n<l.length;n++)h[n]=l[n][0];c(l=h);break;case 2:for(n=0;n<l.length;n++)c(l[n]);break;case 3:for(l=_0x106e31(l),n=0;n<l.length;n++)for(r=0;r<l[n].length;r++)c(l[n][r])}1===l.length?l=l[0]:u="Multi"+u;var d={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(d.id=this.id),d};var _0x1a2e88=(_0x5399e7=!0,function(e,t){var i=_0x5399e7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5399e7=!1,i}),_0x4a9b8f=_0x1a2e88(void 0,(function(){return _0x4a9b8f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a9b8f).search("(((.+)+)+)+$")})),_0x5399e7;function _0x299209(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(_0x3bd86b,this,t),this.length=this._features.length}function _0x3bd86b(e,t,i){15===e?t.version=i.readVarint():1===e?t.name=i.readString():5===e?t.extent=i.readVarint():2===e?t._features.push(i.pos):3===e?t._keys.push(i.readString()):4===e&&t._values.push(_0x49b654(i))}function _0x49b654(e){for(var t=null,i=e.readVarint()+e.pos;e.pos<i;){var n=e.readVarint()>>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}_0x4a9b8f(),_0x299209.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new _0x275233(this._pbf,t,this.extent,this._keys,this._values)};var _0x3b784e=(_0x5c1506=!0,function(e,t){var i=_0x5c1506?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c1506=!1,i}),_0x84e1e4=_0x3b784e(void 0,(function(){return _0x84e1e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x84e1e4).search("(((.+)+)+)+$")})),_0x5c1506;function _0x424242(e,t){this.layers=e.readFields(_0x1c640d,{},t)}function _0x1c640d(e,t,i){if(3===e){var n=new _0x299209(i,i.readVarint()+i.pos);n.length&&(t[n.name]=n)}}_0x84e1e4();var _0x564cb4=(_0x864fce=!0,function(e,t){var i=_0x864fce?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x864fce=!1,i}),_0x271b16=_0x564cb4(void 0,(function(){return _0x271b16.toString().search("(((.+)+)+)+$").toString().constructor(_0x271b16).search("(((.+)+)+)+$")})),_0x864fce;_0x271b16();var _0x4bd3ee=3;function _0x34e302(e,t,i){var n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var r=new Int32Array(this.arrayBuffer);e=r[0],t=r[1],i=r[2],this.d=t+2*i;for(var o=0;o<this.d*this.d;o++){var a=r[_0x4bd3ee+o],s=r[_0x4bd3ee+o+1];n.push(a===s?null:r.subarray(a,s))}var l=r[_0x4bd3ee+n.length],u=r[_0x4bd3ee+n.length+1];this.keys=r.subarray(l,u),this.bboxes=r.subarray(u),this.insert=this._insertReadonly}else{this.d=t+2*i;for(var c=0;c<this.d*this.d;c++)n.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=i,this.scale=t/e,this.uid=0;var h=i/t*e;this.min=-h,this.max=e+h}_0x34e302.prototype.insert=function(e,t,i,n,r){this._forEachCell(t,i,n,r,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)},_0x34e302.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},_0x34e302.prototype._insertCell=function(e,t,i,n,r,o){this.cells[r].push(o)},_0x34e302.prototype.query=function(e,t,i,n,r){var o=this.min,a=this.max;if(e<=o&&t<=o&&a<=i&&a<=n&&!r)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(e,t,i,n,this._queryCell,s,{},r),s},_0x34e302.prototype._queryCell=function(e,t,i,n,r,o,a,s){var l=this.cells[r];if(null!==l)for(var u=this.keys,c=this.bboxes,h=0;h<l.length;h++){var d=l[h];if(void 0===a[d]){var f=4*d;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):e<=c[f+2]&&t<=c[f+3]&&i>=c[f+0]&&n>=c[f+1])?(a[d]=!0,o.push(u[d])):a[d]=!1}}},_0x34e302.prototype._forEachCell=function(e,t,i,n,r,o,a,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(i),h=this._convertToCellCoord(n),d=l;d<=c;d++)for(var f=u;f<=h;f++){var p=this.d*f+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(f),this._convertFromCellCoord(d+1),this._convertFromCellCoord(f+1)))&&r.call(this,e,t,i,n,p,o,a,s))return}},_0x34e302.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},_0x34e302.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},_0x34e302.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=_0x4bd3ee+this.cells.length+1+1,i=0,n=0;n<this.cells.length;n++)i+=this.cells[n].length;var r=new Int32Array(t+i+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;for(var o=t,a=0;a<e.length;a++){var s=e[a];r[_0x4bd3ee+a]=o,r.set(s,o),o+=s.length}return r[_0x4bd3ee+e.length]=o,r.set(this.keys,o),o+=this.keys.length,r[_0x4bd3ee+e.length+1]=o,r.set(this.bboxes,o),o+=this.bboxes.length,r.buffer},_0x3abd5c.register("GridIndex",_0x34e302,{omit:["layers","patternFeatures"]});var _0x9a8dc8=(_0x21f505=!0,function(e,t){var i=_0x21f505?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x21f505=!1,i}),_0x586fee=_0x9a8dc8(void 0,(function(){return _0x586fee.toString().search("(((.+)+)+)+$").toString().constructor(_0x586fee).search("(((.+)+)+)+$")})),_0x21f505;_0x586fee();var _0x54e28f=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var i=0,n=t;i<n.length;i+=1){var r=n[i],o=r[0],a=r[1];this.bindings[o]=a}};_0x54e28f.prototype.concat=function(e){return new _0x54e28f(this,e)},_0x54e28f.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},_0x54e28f.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var _0x1f8aa8=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,i),this.message=i,this.key=t}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r}(Error),_0x1aed97=(_0x1be3c4=!0,function(e,t){var i=_0x1be3c4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1be3c4=!1,i}),_0x26238b=_0x1aed97(void 0,(function(){return _0x26238b.toString().search("(((.+)+)+)+$").toString().constructor(_0x26238b).search("(((.+)+)+)+$")})),_0x1be3c4;_0x26238b();var _0x1cca77=["Unknown","Point","LineString","Polygon"],_0x515247=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null};_0x515247.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},_0x515247.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?_0x1cca77[this.feature.type]:this.feature.type:null},_0x515247.prototype.properties=function(){return this.feature&&this.feature.properties||{}},_0x515247.prototype.parseColor=function(e){var t=this._parseColorCache[e];return!t&&(t=this._parseColorCache[e]=_0x546352.parse(e)),t},_0x3abd5c.register("EvaluationContext",_0x515247);var _0x2e3501=(_0x47821a=!0,function(e,t){var i=_0x47821a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47821a=!1,i}),_0x4ba51d=_0x2e3501(void 0,(function(){return _0x4ba51d.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ba51d).search("(((.+)+)+)+$")})),_0x47821a;function _0x28ba7d(){}_0x4ba51d(),_0x28ba7d.isFeatureConstant=function(e){if(e instanceof _0x3563dd.CompoundExpression){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}var t=!0;return e.eachChild((function(e){t&&!_0x28ba7d.isFeatureConstant(e)&&(t=!1)})),t},_0x28ba7d.isStateConstant=function(e){if(e instanceof _0x3563dd.CompoundExpression&&"feature-state"===e.name)return!1;var t=!0;return e.eachChild((function(e){t&&!_0x28ba7d.isStateConstant(e)&&(t=!1)})),t},_0x28ba7d.isGlobalPropertyConstant=function(e,t){if(e instanceof _0x3563dd.CompoundExpression&&t.indexOf(e.name)>=0)return!1;var i=!0;return e.eachChild((function(e){i&&!_0x28ba7d.isGlobalPropertyConstant(e,t)&&(i=!1)})),i};var _0x521651=(_0x1ac6a0=!0,function(e,t){var i=_0x1ac6a0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ac6a0=!1,i}),_0x117d94=_0x521651(void 0,(function(){return _0x117d94.toString().search("(((.+)+)+)+$").toString().constructor(_0x117d94).search("(((.+)+)+)+$")})),_0x1ac6a0;_0x117d94();var _0x3563dd=function(e,t,i,n,r){void 0===t&&(t=[]),void 0===n&&(n=new _0x54e28f),void 0===r&&(r=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=r,this.expectedType=i};function _0x92631a(e,t){const i=t[e];return void 0===i?null:i}_0x3563dd.prototype.parse=function(e,t,i,n,r){return void 0===r&&(r={}),t?this.concat(t,i,n)._parse(e,r):this._parse(e,r)},_0x3563dd.prototype._parse=function(e,t){function i(e,t,i){return"assert"===i?new _0x141c3d(t,[e]):"coerce"===i?new _0x3b95f6(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var o=r.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=i(o,a,t.typeAnnotation||"coerce");else o=i(o,a,t.typeAnnotation||"assert")}if(!(o instanceof _0x23876d)&&"resolvedImage"!==o.type.kind&&_0x28ba7d()){var l=new _0x515247;try{o=new _0x23876d(o.type,o.evaluate(l))}catch(e){return this.error(e.message),null}}return o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},_0x3563dd.prototype.concat=function(e,t,i){var n="number"==typeof e?this.path.concat(e):this.path,r=i?this.scope.concat(i):this.scope;return new _0x3563dd(this.registry,n,t||null,r,this.errors)},_0x3563dd.prototype.error=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new _0x1f8aa8(n,e))},_0x3563dd.prototype.checkSubtype=function(e,t){var i=_0x40e569(e,t);return i&&this.error(i),i};var _0x429724=function(e,t,i,n){this.name=e,this.type=t,this._evaluate=i,this.args=n};function _0xe52bac(e){return Array.isArray(e)?"("+e.map(toString).join(", ")+")":"("+toString(e.type)+"...)"}_0x429724.prototype.evaluate=function(e,t){return this._evaluate(e,this.args,t)},_0x429724.prototype.eachChild=function(e){this.args.forEach(e)},_0x429724.prototype.possibleOutputs=function(){return[void 0]},_0x429724.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},_0x429724.parse=function(e,t){var i,n=e[0],r=_0x429724.definitions[n];if(!r)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(r)?r[0]:r.type,a=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,s=a.filter((function(t){var i=t[0];return!Array.isArray(i)||i.length===e.length-1})),l=null,u=0,c=s;u<c.length;u+=1){var h=c[u],d=h[0],f=h[1];l=new _0x3563dd(t.registry,t.path,null,t.scope);for(var p=[],_=!1,m=1;m<e.length;m++){var g=e[m],x=Array.isArray(d)?d[m-1]:d.type,y=l.parse(g,1+p.length,x);if(!y){_=!0;break}p.push(y)}if(!_)if(Array.isArray(d)&&d.length!==p.length)l.error("Expected "+d.length+" arguments, but found "+p.length+" instead.");else{for(var v=0;v<p.length;v++){var $=Array.isArray(d)?d[v]:d.type,b=p[v];l.concat(v+1).checkSubtype($,b.type)}if(0===l.errors.length)return new _0x429724(n,o,f,p)}}if(1===s.length)(i=t.errors).push.apply(i,l.errors);else{for(var T=(s.length?s:a).map((function(e){return _0xe52bac(e[0])})).join(" | "),C=[],S=1;S<e.length;S++){var w=t.parse(e[S],1+C.length);if(!w)return null;C.push(toString(w.type))}t.error("Expected arguments of type "+T+", but found ("+C.join(", ")+") instead.")}return null},_0x429724.register=function(e,t){for(var i in _0x429724.definitions=t,t)e[i]=_0x429724},_0x3abd5c.register("CompoundExpression",_0x429724);var _0x2b756f={kind:"number"},_0x4b0955={kind:"string"},_0x4e86b9={kind:"boolean"},_0x35c334={kind:"color"},_0x48c097={kind:"object"},_0xa1bc6b={kind:"value"},_0x359d41={kind:"error"},_0x199f00={kind:"collator"};function _0x391df1(e,t){return{kind:"array",itemType:e,N:t}}function _0x205d70(e){return{type:e}}function _0x2e0859(e,t){var i=t[0],n=t[1],r=t[2],o=t[3];i=i.evaluate(e),n=n.evaluate(e),r=r.evaluate(e);var a=o?o.evaluate(e):1,s=Values.validateRGBA(i,n,r,a);if(s)throw new RuntimeError(s);return new Color(i/255*a,n/255*a,r/255*a,a)}_0x429724.register(_0x2c803e,{error:[_0x359d41,[_0x4b0955],function(e,t){var i=t[0];throw new RuntimeError(i.evaluate(e))}],typeof:[_0x4b0955,[_0xa1bc6b],function(e,t){var i=t[0];return toString(Values.typeOf(i.evaluate(e)))}],"to-rgba":[_0x391df1(_0x2b756f,4),[_0x35c334],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[_0x35c334,[_0x2b756f,_0x2b756f,_0x2b756f],_0x2e0859],rgba:[_0x35c334,[_0x2b756f,_0x2b756f,_0x2b756f,_0x2b756f],_0x2e0859],has:{type:_0x4e86b9,overloads:[[[_0x4b0955],function(e,t){var i=t[0];return has(i.evaluate(e),e.properties())}],[[_0x4b0955,_0x48c097],function(e,t){var i=t[0],n=t[1];return has(i.evaluate(e),n.evaluate(e))}]]},get:{type:_0xa1bc6b,overloads:[[[_0x4b0955],function(e,t){return _0x92631a(t[0].evaluate(e),e.properties())}],[[_0x4b0955,_0x48c097],function(e,t){var i=t[0],n=t[1];return _0x92631a(i.evaluate(e),n.evaluate(e))}]]},"feature-state":[_0xa1bc6b,[_0x4b0955],function(e,t){return _0x92631a(t[0].evaluate(e),e.featureState||{})}],properties:[_0x48c097,[],function(e){return e.properties()}],"geometry-type":[_0x4b0955,[],function(e){return e.geometryType()}],id:[_0xa1bc6b,[],function(e){return e.id()}],zoom:[_0x2b756f,[],function(e){return e.globals.zoom}],"heatmap-density":[_0x2b756f,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[_0x2b756f,[],function(e){return e.globals.lineProgress||0}],accumulated:[_0xa1bc6b,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[_0x2b756f,_0x205d70(_0x2b756f),function(e,t){for(var i=0,n=0,r=t;n<r.length;n+=1){i+=r[n].evaluate(e)}return i}],"*":[_0x2b756f,_0x205d70(_0x2b756f),function(e,t){for(var i=1,n=0,r=t;n<r.length;n+=1){i*=r[n].evaluate(e)}return i}],"-":{type:_0x2b756f,overloads:[[[_0x2b756f,_0x2b756f],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)-n.evaluate(e)}],[[_0x2b756f],function(e,t){return-t[0].evaluate(e)}]]},"/":[_0x2b756f,[_0x2b756f,_0x2b756f],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)/n.evaluate(e)}],"%":[_0x2b756f,[_0x2b756f,_0x2b756f],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)%n.evaluate(e)}],ln2:[_0x2b756f,[],function(){return Math.LN2}],pi:[_0x2b756f,[],function(){return Math.PI}],e:[_0x2b756f,[],function(){return Math.E}],"^":[_0x2b756f,[_0x2b756f,_0x2b756f],function(e,t){var i=t[0],n=t[1];return Math.pow(i.evaluate(e),n.evaluate(e))}],sqrt:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.sqrt(i.evaluate(e))}],log10:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN10}],ln:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.log(i.evaluate(e))}],log2:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.log(i.evaluate(e))/Math.LN2}],sin:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.sin(i.evaluate(e))}],cos:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.cos(i.evaluate(e))}],tan:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.tan(i.evaluate(e))}],asin:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.asin(i.evaluate(e))}],acos:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.acos(i.evaluate(e))}],atan:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.atan(i.evaluate(e))}],min:[_0x2b756f,_0x205d70(_0x2b756f),function(e,t){return Math.min.apply(Math,t.map((function(t){return t.evaluate(e)})))}],max:[_0x2b756f,_0x205d70(_0x2b756f),function(e,t){return Math.max.apply(Math,t.map((function(t){return t.evaluate(e)})))}],abs:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.abs(i.evaluate(e))}],round:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0].evaluate(e);return i<0?-Math.round(-i):Math.round(i)}],floor:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.floor(i.evaluate(e))}],ceil:[_0x2b756f,[_0x2b756f],function(e,t){var i=t[0];return Math.ceil(i.evaluate(e))}],"filter-==":[_0x4e86b9,[_0x4b0955,_0xa1bc6b],function(e,t,i){var n=t[0],r=t[1];if(i){var o,a,s=n.value,l=r.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":o=c+d;break;case"-":o=c-d}return o===(a=r.value)}if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(o="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);a="left"==g?d.substring(0,x):d.substring(d.length-x)}else a=r.value;return o===a}return e.properties()[n.value]===e.properties()[r.value]}return e.properties()[n.value]===r.value}],"filter-id-==":[_0x4e86b9,[_0xa1bc6b],function(e,t){var i=t[0];return e.id()===i.value}],"filter-like":[_0x4e86b9,[_0x4b0955,_0x4b0955],function(e,t){var i=t[0].value,n=t[1].value,r=e.properties();return i in r&&(/^%.*[^%]$/.test(n)?(n=n.replace("%",""),r[i].endsWith(n)):/^(?!%).+%$/.test(n)?(n=n.replace("%",""),r[i].startsWith(n)):(n=n.replace(/%/g,""),r[i].indexOf(n)>-1))}],"filter-type-==":[_0x4e86b9,[_0x4b0955],function(e,t){var i=t[0];return e.geometryType()===i.value}],"filter-<":[_0x4e86b9,[_0x4b0955,_0xa1bc6b],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<r}],"filter-id-<":[_0x4e86b9,[_0xa1bc6b],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<r}],"filter->":[_0x4e86b9,[_0x4b0955,_0xa1bc6b],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>r}],"filter-id->":[_0x4e86b9,[_0xa1bc6b],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[_0x4e86b9,[_0x4b0955,_0xa1bc6b],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n<=r}],"filter-id-<=":[_0x4e86b9,[_0xa1bc6b],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[_0x4e86b9,[_0x4b0955,_0xa1bc6b],function(e,t,i){var n,r,o=t[0],a=t[1],s=o.value,l=a.value;if(/(\S*)\s*([+-])\s*(\S*)/.test(s)){var u=s.match(/(\S*)\s*([+-])\s*(\S*)/),c=e.properties()[u[1]],h=u[2],d=e.properties()[u[3]];switch(h){case"+":n=c+d;break;case"-":n=c-d}r=a.value}else if(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(s)){var f=s.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),p=f[1],_=(c=e.properties()[f[2]],f[3]);if(n="left"==p?c.substring(0,_):c.substring(c.length-_),/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/.test(l)){var m=l.match(/^(left|right)\s*\((.+)\s*,\s*(\d+)\)/),g=m[1],x=(d=e.properties()[m[2]],m[3]);r="left"==g?d.substring(0,x):d.substring(d.length-x)}else r=a.value}else n=e.properties()[o.value],r=a.value,i&&(r=e.properties()[r]);return"number"==typeof r&&!isNaN(Number(n))&&(n=Number(n)),typeof n==typeof r&&n>=r}],"filter-id->=":[_0x4e86b9,[_0xa1bc6b],function(e,t){var i=t[0],n=e.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[_0x4e86b9,[_0xa1bc6b],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[_0x4e86b9,[],function(e){return null!==e.id()}],"filter-type-in":[_0x4e86b9,[_0x391df1(_0x4b0955)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[_0x4e86b9,[_0x391df1(_0xa1bc6b)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[_0x4e86b9,[_0x4b0955,_0x391df1(_0xa1bc6b)],function(e,t){var i=t[0];return t[1].value.indexOf(e.properties()[i.value])>=0}],"filter-in-large":[_0x4e86b9,[_0x4b0955,_0x391df1(_0xa1bc6b)],function(e,t){var i=t[0],n=t[1];return binarySearch(e.properties()[i.value],n.value,0,n.value.length-1)}],all:{type:_0x4e86b9,overloads:[[[_0x4e86b9,_0x4e86b9],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)&&n.evaluate(e)}],[_0x205d70(_0x4e86b9),function(e,t){for(var i=0,n=t;i<n.length;i+=1){if(!n[i].evaluate(e))return!1}return!0}]]},crossFields:{type:_0x4e86b9,overloads:[[[_0x4e86b9,_0x4e86b9],function(e,t){var i=t[0],n=t[1];return i.evaluate(e,!0)&&n.evaluate(e,!0)}],[_0x205d70(_0x4e86b9),function(e,t){for(var i=0,n=t;i<n.length;i+=1){if(!n[i].evaluate(e,!0))return!1}return!0}]]},any:{type:_0x4e86b9,overloads:[[[_0x4e86b9,_0x4e86b9],function(e,t){var i=t[0],n=t[1];return i.evaluate(e)||n.evaluate(e)}],[_0x205d70(_0x4e86b9),function(e,t){for(var i=0,n=t;i<n.length;i+=1){if(n[i].evaluate(e))return!0}return!1}]]},"!":[_0x4e86b9,[_0x4e86b9],function(e,t,i){return!t[0].evaluate(e,i)}],"is-supported-script":[_0x4e86b9,[_0x4b0955],function(e,t){var i=t[0],n=e.globals&&e.globals.isSupportedScript;return!n||n(i.evaluate(e))}],upcase:[_0x4b0955,[_0x4b0955],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[_0x4b0955,[_0x4b0955],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[_0x4b0955,_0x205d70(_0xa1bc6b),function(e,t){return t.map((function(t){return Values.toString$1(t.evaluate(e))})).join("")}],"resolved-locale":[_0x4b0955,[_0x199f00],function(e,t){return t[0].evaluate(e).resolvedLocale()}]}),_0x3563dd.CompoundExpression=_0x429724;var _0x3f06c7=(_0x5c5659=!0,function(e,t){var i=_0x5c5659?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c5659=!1,i}),_0x1de03d=_0x3f06c7(void 0,(function(){return _0x1de03d.toString().search("(((.+)+)+)+$").toString().constructor(_0x1de03d).search("(((.+)+)+)+$")})),_0x5c5659;_0x1de03d();var _0x234ad3=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new _0x515247,this._defaultValue=t?_0x505996(t):null,this._enumValues=t&&"enum"===t.type?t.values:null};function _0x50804d(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function _0x505996(e){return"color"===e.type&&_0x50804d(e.default)?new _0x546352(0,0,0,0):"color"===e.type?_0x546352.parse(e.default)||null:void 0===e.default?null:e.default}_0x234ad3.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r,this.expression.evaluate(this._evaluator)},_0x234ad3.prototype.evaluate=function(e,t,i,n,r){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=i||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=r||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new RuntimeError("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(e){return!this._warningHistory[e.message]&&(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}},_0x3abd5c.register("StyleExpression",_0x234ad3);var _0x24c90b=(_0x24c6b2=!0,function(e,t){var i=_0x24c6b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24c6b2=!1,i}),_0x2836cf=_0x24c90b(void 0,(function(){return _0x2836cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x2836cf).search("(((.+)+)+)+$")})),_0x24c6b2;function supportsPropertyExpression(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function supportsZoomExpression(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function supportsInterpolation(e){return!!e.expression&&e.expression.interpolated}_0x2836cf();var _0x1fe4e2=(_0x174668=!0,function(e,t){var i=_0x174668?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x174668=!1,i}),_0x4f48f4=_0x1fe4e2(void 0,(function(){return _0x4f48f4.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f48f4).search("(((.+)+)+)+$")})),_0x174668;function _0x8808b2(){}function _0x57af88(e){return{result:"success",value:e}}function _0x1b2024(e){return{result:"error",value:e}}_0x4f48f4(),_0x8808b2.isExpression=function(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in _0x2c803e};var _0x320c01={kind:"number"},_0x5f9851={kind:"string"},_0x73c6b0={kind:"boolean"},_0x2c75b5={kind:"color"},_0x396d0d={kind:"value"},_0x372eda={kind:"formatted"},_0x14a7d2={kind:"resolvedImage"};function _0x1e45b5(e,t){return{kind:"array",itemType:e,N:t}}function _0x1e6445(e){var t=null;if(e instanceof _0x82e6f7)t=_0x1e6445(e.result);else if(e instanceof _0x457bfd){for(var i of e.args)if(t=_0x1e6445(i))break}else(e instanceof _0x3d29d0||e instanceof _0x29541f)&&e.input instanceof _0x3563dd.CompoundExpression&&"zoom"===e.input.name&&(t=e);return t instanceof _0x1f8aa8||e.eachChild((e=>{var i=_0x1e6445(e);i instanceof _0x1f8aa8?t=i:!t&&i?t=new _0x1f8aa8("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new _0x1f8aa8("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function _0x4e4a91(e){var t={color:_0x2c75b5,string:_0x5f9851,number:_0x320c01,enum:_0x5f9851,boolean:_0x73c6b0,formatted:_0x372eda,resolvedImage:_0x14a7d2};return"array"===e.type?_0x1e45b5(t[e.value]||_0x396d0d,e.length):t[e.type]}function _0x206239(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function _0xe42afc(e){return e}function _0x57e3fc(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];for(var n=0,r=t;n<r.length;n+=1){var o=r[n];for(var a in o)e[a]=o[a]}return e}function _0x4e8867(e,t,i){var n=void 0!==e.base?e.base:1;if("number"!==_0x3532cf(i))return _0x15a0e7(e.default,t.default);var r=e.stops.length;if(1===r)return e.stops[0][1];if(i<=e.stops[0][0])return e.stops[0][1];if(i>=e.stops[r-1][0])return e.stops[r-1][1];var o=_0x23bf59(e.stops.map((e=>e[0])),i),a=_0x1f06a0(i,n,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],u=interpolate[t.type]||_0xe42afc;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=colorSpaces[e.colorSpace];u=(e,t)=>c.reverse(c.interpolate(c.forward(e),c.forward(t),a))}return"function"==typeof s.evaluate?{evaluate(...e){var t=s.evaluate.apply(void 0,e),i=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==i)return u(t,i,a)}}:u(s,l,a)}function _0x2e5eff(e,t,i){return"color"===t.type?i=_0x546352.parse(i):"formatted"===t.type?i=Formatted.fromString(i.toString()):"resolvedImage"===t.type?i=ResolvedImage.fromString(i.toString()):_0x3532cf(i)!==t.type&&("enum"!==t.type||!t.values[i])&&(i=void 0),_0x15a0e7(i,e.default,t.default)}function _0x7a84ef(e,t){var i=new _0x3563dd(_0x2c803e,[],t?_0x4e4a91(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?_0x57af88(new _0x234ad3(n,t)):_0x1b2024(i.errors)}function _0xfb1bec(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!_0x28ba7d.isStateConstant(t.expression)}function _0x3000cb(e,t,i,n){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent="camera"!==e&&!_0x28ba7d.isStateConstant(t.expression),this.interpolationType=n}function _0x5dbb9d(e,t){if("error"===(e=_0x7a84ef(e,t)).result)return e;var i=e.value.expression,n=_0x28ba7d.isFeatureConstant(i);if(!n&&!supportsPropertyExpression(t))return _0x1b2024([new _0x1f8aa8("","data expressions not supported")]);var r=_0x28ba7d.isGlobalPropertyConstant(i,["zoom"]);if(!r&&!supportsZoomExpression(t))return _0x1b2024([new _0x1f8aa8("","zoom expressions not supported")]);var o=_0x1e6445(i);if(!o&&!r)return _0x1b2024([new _0x1f8aa8("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof _0x1f8aa8)return _0x1b2024([o]);if(o instanceof _0x29541f&&!supportsInterpolation(t))return _0x1b2024([new _0x1f8aa8("",'"interpolate" expressions cannot be used with this property')]);if(!o)return _0x57af88(new _0xfb1bec(n?"constant":"source",e.value));var a=o instanceof _0x29541f?o.interpolation:void 0;return _0x57af88(new _0x3000cb(n?"camera":"composite",e.value,o.labels,a))}function _0x12ce3b(e,t){var i,n,r,o="color"===t.type,a=e.stops&&"object"==typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,u=e.type||(supportsInterpolation(t)?"exponential":"interval");if(o&&((e=_0x57e3fc({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],_0x546352.parse(e[1])]}))),e.default?e.default=_0x546352.parse(e.default):e.default=_0x546352.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!colorSpaces[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)i=_0x4e8867;else if("interval"===u)i=evaluateIntervalFunction;else if("categorical"===u){i=evaluateCategoricalFunction,n=Object.create(null);for(var c=0,h=e.stops;c<h.length;c+=1){var d=h[c];n[d[0]]=d[1]}r=typeof e.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');i=_0x2e5eff}if(a){for(var f={},p=[],_=0;_<e.stops.length;_++){var m=e.stops[_],g=m[0].zoom;void 0===f[g]&&(f[g]={zoom:g,type:e.type,property:e.property,default:e.default,stops:[]},p.push(g)),f[g].stops.push([m[0].value,m[1]])}for(var x=[],y=0,v=p;y<v.length;y+=1){var $=v[y];x.push([f[$].zoom,_0x12ce3b(f[$],t)])}var b={name:"linear"};return{kind:"composite",interpolationType:b,interpolationFactor:_0x29541f.interpolationFactor.bind(void 0,b),zoomStops:x.map((function(e){return e[0]})),evaluate:function(i,n){var r=i.zoom;return _0x4e8867({stops:x,base:e.base},t,r).evaluate(r,n)}}}if(l){var T="exponential"===u?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:T,interpolationFactor:_0x29541f.interpolationFactor.bind(void 0,T),zoomStops:e.stops.map((function(e){return e[0]})),evaluate:function(o){var a=o.zoom;return i(e,t,a,n,r)}}}return{kind:"source",evaluate:function(o,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?_0x15a0e7(e.default,t.default):i(e,t,s,n,r)}}}function _0x15a0e7(e,t,i){return void 0!==e?e:void 0!==t?t:void 0!==i?i:void 0}function _0x1f06a0(e,t,i,n){var r=n-i,o=e-i;return 0===r?0:1===t?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}_0x8808b2.createExpression=function(e,t){var i=new _0x3563dd(_0x2c803e,[],t?_0x4e4a91(t):void 0),n=i.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?_0x57af88(new _0x234ad3(n,t)):_0x1b2024(i.errors)},_0xfb1bec.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},_0xfb1bec.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},_0x3abd5c.register("ZoomConstantExpression",_0xfb1bec),_0x3000cb.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,r,o)},_0x3000cb.prototype.evaluate=function(e,t,i,n,r,o){return this._styleExpression.evaluate(e,t,i,n,r,o)},_0x3000cb.prototype.interpolationFactor=function(e,t,i){return this.interpolationType?_0x29541f.interpolationFactor(this.interpolationType,e,t,i):0},_0x3abd5c.register("ZoomDependentExpression",_0x3000cb);var _0x1d026f=function(e,t){this._parameters=e,this._specification=t,_0x57e3fc(this,_0x12ce3b(this._parameters,this._specification))};function _0x3532cf(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}_0x1d026f.deserialize=function(e){return new _0x1d026f(e._parameters,e._specification)},_0x1d026f.serialize=function(e){return{_parameters:e._parameters,_specification:e._specification}},_0x3abd5c.register("StylePropertyFunction",_0x1d026f),_0x8808b2.normalizePropertyExpression=function(e,t){if(_0x206239(e))return new _0x1d026f(e,t);if(_0x8808b2.isExpression(e)){var i=_0x5dbb9d(e,t);if("error"===i.result)throw new Error(i.value.map((function(e){return e.key+": "+e.message})).join(", "));return i.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=_0x546352.parse(e)),{kind:"constant",evaluate:function(){return n}}};var _0x2830bd=(_0x351148=!0,function(e,t){var i=_0x351148?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x351148=!1,i}),_0x3da2f6=_0x2830bd(void 0,(function(){return _0x3da2f6.toString().search("(((.+)+)+)+$").toString().constructor(_0x3da2f6).search("(((.+)+)+)+$")})),_0x351148;function _0x51a3ff(){}_0x3da2f6(),_0x51a3ff.isExpressionFilter=function(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&Array.isArray(e[2]);case"!in":case"!has":case"none":case"crossFields":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":case"like":case"!like":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,i=e.slice(1);t<i.length;t+=1){var n=i[t];if(!_0x51a3ff.isExpressionFilter(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}};var _0xaa07c9={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function _0x1f360b(e,t){return e<t?-1:e>t?1:0}function _0x4cfc26(e){if(!e)return!0;var t=e[0];return e.length<=1?"any"!==t:"=="===t?_0x997504(e[1],e[2],"=="):"!="===t?_0x3c1664(_0x997504(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?_0x997504(e[1],e[2],t):"any"===t?_0x32e2d3(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(_0x4cfc26)):"crossFields"===t?["crossFields"].concat(e.slice(1).map(_0x4cfc26)):"none"===t?["all"].concat(e.slice(1).map(_0x4cfc26).map(_0x3c1664)):"in"===t?_0x47a7e5(e[1],e.slice(2)):"!in"===t?_0x3c1664(_0x47a7e5(e[1],e.slice(2))):"has"===t?_0x5ae72d(e[1]):"!has"===t?_0x3c1664(_0x5ae72d(e[1])):"like"===t?_0x997504(e[1],e[2],"like"):"!like"!==t||_0x3c1664(_0x997504(e[1],e[2],"like"))}function _0x997504(e,t,i){switch(e){case"$type":return["filter-type-"+i,t];case"$id":return["filter-id-"+i,t];default:return["filter-"+i,e,t]}}function _0x32e2d3(e){return["any"].concat(e.map(_0x4cfc26))}function _0x47a7e5(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(_0x1f360b)]]:["filter-in-small",e,["literal",t]]}}function _0x5ae72d(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function _0x3c1664(e){return["!",e]}_0x51a3ff.createFilter=function(e){if(null==e)return function(){return!0};!_0x51a3ff.isExpressionFilter(e)&&(e=_0x4cfc26(e));var t=_0x8808b2.createExpression(e,_0xaa07c9);if("error"===t.result)throw new Error(t.value.map((function(e){return e.key+": "+e.message})).join(", "));return function(e,i){return t.value.evaluate(e,i)}};var D$W=function(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},y$P=function(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_},g$Z={read:D$W,write:y$P};function h$V(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}h$V.Varint=0,h$V.Fixed64=1,h$V.Bytes=2,h$V.Fixed32=5;var B$R=4294967296,M$V=1/B$R;function C$X(e,t,i){var n,r,o=i.buf;if(n=(112&(r=o[i.pos++]))>>4,r<128||(n|=(127&(r=o[i.pos++]))<<3,r<128)||(n|=(127&(r=o[i.pos++]))<<10,r<128)||(n|=(127&(r=o[i.pos++]))<<17,r<128)||(n|=(127&(r=o[i.pos++]))<<24,r<128)||(n|=(1&(r=o[i.pos++]))<<31,r<128))return c$V(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function F$Y(e){return e.type===h$V.Bytes?e.readVarint()+e.pos:e.pos+1}function c$V(e,t,i){return i?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function T$S(e,t){var i,n;if(e>=0?(i=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(i=~(-e%4294967296))?i=i+1|0:(i=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),E$W(i,n,t),N$O(n,t)}function E$W(e,t,i){i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}function N$O(e,t){var i=(7&e)<<4;t.buf[t.pos++]|=i|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function k$Q(e,t,i){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=e;r--)i.buf[r+n]=i.buf[r]}function I$14(e,t){for(var i=0;i<e.length;i++)t.writeVarint(e[i])}function U$V(e,t){for(var i=0;i<e.length;i++)t.writeSVarint(e[i])}function A$11(e,t){for(var i=0;i<e.length;i++)t.writeFloat(e[i])}function R$R(e,t){for(var i=0;i<e.length;i++)t.writeDouble(e[i])}function H$Y(e,t){for(var i=0;i<e.length;i++)t.writeBoolean(e[i])}function _$N(e,t){for(var i=0;i<e.length;i++)t.writeFixed32(e[i])}function m$U(e,t){for(var i=0;i<e.length;i++)t.writeSFixed32(e[i])}function G$11(e,t){for(var i=0;i<e.length;i++)t.writeFixed64(e[i])}function j$U(e,t){for(var i=0;i<e.length;i++)t.writeSFixed64(e[i])}function V$O(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function p$R(e,t,i){e[i]=t,e[i+1]=t>>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function S$P(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function z$Q(e,t,i){for(var n="",r=t;r<i;){var o,a,s,l=e[r],u=null,c=l>239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[r+1]))&&((u=(31&l)<<6|63&o)<=127&&(u=null)):3===c?(o=e[r+1],a=e[r+2],128==(192&o)&&128==(192&a)&&(((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null))):4===c&&(o=e[r+1],a=e[r+2],s=e[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null))),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=c}return n}function J$Q(e,t,i){for(var n,r,o=0;o<t.length;o++){if((n=t.charCodeAt(o))>55295&&n<57344){if(!r){n>56319||o+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):r=n;continue}if(n<56320){e[i++]=239,e[i++]=191,e[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(e[i++]=239,e[i++]=191,e[i++]=189,r=null);n<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:(n<65536?e[i++]=n>>12|224:(e[i++]=n>>18|240,e[i++]=n>>12&63|128),e[i++]=n>>6&63|128),e[i++]=63&n|128)}return i}h$V.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=7&n,e(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=V$O(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=S$P(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=V$O(this.buf,this.pos)+V$O(this.buf,this.pos+4)*B$R;return this.pos+=8,e},readSFixed64:function(){var e=V$O(this.buf,this.pos)+S$P(this.buf,this.pos+4)*B$R;return this.pos+=8,e},readFloat:function(){var e=g$Z.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=g$Z.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,n=this.buf;return t=127&(i=n[this.pos++]),i<128||(t|=(127&(i=n[this.pos++]))<<7,i<128)||(t|=(127&(i=n[this.pos++]))<<14,i<128)||(t|=(127&(i=n[this.pos++]))<<21,i<128)?t:C$X(t|=(15&(i=n[this.pos]))<<28,e,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=z$Q(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var i=F$Y(this);for(e=e||[];this.pos<i;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){var t=F$Y(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===h$V.Varint)for(;this.buf[this.pos++]>127;);else if(t===h$V.Bytes)this.pos=this.readVarint()+this.pos;else if(t===h$V.Fixed32)this.pos+=4;else{if(t!==h$V.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var i=new Uint8Array(t);i.set(this.buf),this.buf=i,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),p$R(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),p$R(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),p$R(this.buf,-1&e,this.pos),p$R(this.buf,Math.floor(e*M$V),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),p$R(this.buf,-1&e,this.pos),p$R(this.buf,Math.floor(e*M$V),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?T$S(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=J$Q(this.buf,e,this.pos);var i=this.pos-t;i>=128&&k$Q(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),g$Z.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),g$Z.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i<t;i++)this.buf[this.pos++]=e[i]},writeRawMessage:function(e,t){this.pos++;var i=this.pos;e(t,this);var n=this.pos-i;n>=128&&k$Q(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,i){this.writeTag(e,h$V.Bytes),this.writeRawMessage(t,i)},writePackedVarint:function(e,t){this.writeMessage(e,I$14,t)},writePackedSVarint:function(e,t){this.writeMessage(e,U$V,t)},writePackedBoolean:function(e,t){this.writeMessage(e,H$Y,t)},writePackedFloat:function(e,t){this.writeMessage(e,A$11,t)},writePackedDouble:function(e,t){this.writeMessage(e,R$R,t)},writePackedFixed32:function(e,t){this.writeMessage(e,_$N,t)},writePackedSFixed32:function(e,t){this.writeMessage(e,m$U,t)},writePackedFixed64:function(e,t){this.writeMessage(e,G$11,t)},writePackedSFixed64:function(e,t){this.writeMessage(e,j$U,t)},writeBytesField:function(e,t){this.writeTag(e,h$V.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,h$V.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,h$V.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,h$V.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,h$V.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,h$V.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,h$V.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,h$V.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,h$V.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,h$V.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var _0x322d3d=(_0x4680e9=!0,function(e,t){var i=_0x4680e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4680e9=!1,i}),_0x202d25=_0x322d3d(void 0,(function(){return _0x202d25.toString().search("(((.+)+)+)+$").toString().constructor(_0x202d25).search("(((.+)+)+)+$")})),_0x4680e9;_0x202d25();var _0x1f7179=function(e,t,i){this.x=e.x,this.y=e.y,this.z=e.z,this.grid=t||new _0x34e302(ne$C,16,0),this.featureIndexArray=i||new _0x3b6dea};function _0x361652(e){for(var t=1/0,i=1/0,n=-1/0,r=-1/0,o=0,a=e;o<a.length;o+=1){var s=a[o];t=Math.min(t,s.x),i=Math.min(i,s.y),n=Math.max(n,s.x),r=Math.max(r,s.y)}return{minX:t,minY:i,maxX:n,maxY:r}}function _0x545dd7(e,t){return t-e}function _0x56535c(e,t,i){if(e$2e(i)&&i.realtime&&e$2e(i.zoom)){var n=i.zoom-e,r=ne$C/(t*Math.pow(2,n));return r*=t/512}return ne$C/t}_0x1f7179.prototype.insert=function(e,t,i,n,r,o,a){var s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(i,n,r);var l=this.grid;a=a||0;for(var u=0;u<t.length;u++){for(var c=t[u],h=[1/0,1/0,-1/0,-1/0],d=0;d<c.length;d++){var f=c[d];h[0]=Math.min(h[0],f.x),h[1]=Math.min(h[1],f.y),h[2]=Math.max(h[2],f.x),h[3]=Math.max(h[3],f.y)}h[0]<ne$C&&h[1]<ne$C&&h[2]>=0&&h[3]>=0&&l.insert(s,h[0]-a,h[1]-a,h[2]+a,h[3]+a)}},_0x1f7179.prototype.loadVTLayers=function(){return!this.vtLayers&&(this.vtLayers=new _0x424242(new h$V(this.rawTileData)).layers,this.sourceLayerCoder=new _0x536dbd(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},_0x1f7179.prototype.query=function(e,t,i){var n=this;this.loadVTLayers();var r=e.params||{},o=_0x56535c(this.z,e.tileSize,r),a=_0x51a3ff.createFilter(r.filter),s=e.queryGeometry,l=5,u=_0x361652(s),c=[];e$2e(r.selectTolerance)&&(l+=o*r.selectTolerance),(c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l)).sort(_0x545dd7);for(var h,d={},f=function(i){var l=c[i];if(l!==h){h=l;var u=n.featureIndexArray.get(l),f=null;n.loadMatchingFeature(d,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,a,r.layers,t,(function(t,i){!f&&(f=_0x182c2a(t));return i.queryIntersectsFeature(s,t,{},f,n.z,e.transform,o,e.pixelPosMatrix,e.adjustScale)}))}},p=0;p<c.length;p++)f(p);return d},_0x1f7179.prototype.loadMatchingFeature=function(e,t,i,n,r,o,a,s){if(e$2e(t)&&e$2e(i)&&e$2e(n)){var l=this.bucketLayerIDs[t];if(!o||arraysIntersect(o,l)){var u=this.sourceLayerCoder.decode(i),c=this.vtLayers[u].feature(n);if(r(new _0x47eac1(this.z),c))for(var h=0;h<l.length;h++){var d=l[h];if(!(o&&o.indexOf(d)<0)){var f=a[d];if(f){var p=!s||s(c,f);if(p){c.layer=f.serialize();var _=e[d];void 0===_&&(_=e[d]=[]),_.push({featureIndex:n,feature:c,intersectionZ:p})}}}}}}},_0x1f7179.prototype.lookupSymbolFeatures=function(e,t,i,n,r,o){var a={};this.loadVTLayers();for(var s=createFilter(n),l=0,u=e;l<u.length;l+=1){var c=u[l];this.loadMatchingFeature(a,t,i,c,s,r,o)}return a},_0x1f7179.prototype.hasLayer=function(e){for(var t=0,i=this.bucketLayerIDs;t<i.length;t+=1)for(var n=0,r=i[t];n<r.length;n+=1){if(e===r[n])return!0}return!1},_0x3abd5c.register("FeatureIndex",_0x1f7179,{omit:["rawTileData","sourceLayerCoder","vtLayers"]});var _0x2e57b2=(_0x4824bf=!0,function(e,t){var i=_0x4824bf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4824bf=!1,i}),_0x310027=_0x2e57b2(void 0,(function(){return _0x310027.toString().search("(((.+)+)+)+$").toString().constructor(_0x310027).search("(((.+)+)+)+$")})),_0x4824bf;_0x310027();var _0x1a19cf={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};function _0x2c23ed(e,t){void 0===t&&(t=1);var i=0,n=0;return{members:e.map((function(e){var r=_0x25e008(e.type),o=i=_0x34a9f1(i,Math.max(t,r)),a=e.components||1;return n=Math.max(n,r),i+=r*a,{name:e.name,type:e.type,components:a,offset:o}})),size:_0x34a9f1(i,Math.max(n,t)),alignment:t}}function _0x25e008(e){return _0x1a19cf[e].BYTES_PER_ELEMENT}function _0x34a9f1(e,t){return Math.ceil(e/t)*t}var _0xc03f44=(_0x4552ff=!0,function(e,t){var i=_0x4552ff?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4552ff=!1,i}),_0x410df6=_0xc03f44(void 0,(function(){return _0x410df6.toString().search("(((.+)+)+)+$").toString().constructor(_0x410df6).search("(((.+)+)+)+$")})),_0x4552ff;_0x410df6();var _0x1e8367=function(e){void 0===e&&(e=[]),this.segments=e};_0x1e8367.prototype.prepareSegment=function(e,t,i,n){var r=this.segments[this.segments.length-1];return(!r||r.vertexLength+e>_0x1e8367.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==n)&&(r={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},void 0!==n&&(r.sortKey=n),this.segments.push(r)),r},_0x1e8367.prototype.get=function(){return this.segments},_0x1e8367.prototype.destroy=function(){for(var e=0,t=this.segments;e<t.length;e+=1){var i=t[e];for(var n in i.cesiumVaos)i.cesiumVaos[n].destroy()}},_0x1e8367.simpleSegment=function(e,t,i,n){return new _0x1e8367([{vertexOffset:e,primitiveOffset:t,vertexLength:i,primitiveLength:n,vaos:{},cesiumVaos:{},drawCommands:{},sortKey:0}])},_0x1e8367.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,_0x3abd5c.register("SegmentVector",_0x1e8367);var _0x3ece5e=(_0x3cc752=!0,function(e,t){var i=_0x3cc752?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3cc752=!1,i}),_0x39c314=_0x3ece5e(void 0,(function(){return _0x39c314.toString().search("(((.+)+)+)+$").toString().constructor(_0x39c314).search("(((.+)+)+)+$")})),_0x3cc752;_0x39c314();var _0xab3045=function(e,t,i){this.property=e,this.value=t,this.parameters=i};_0xab3045.prototype.isConstant=function(){return"constant"===this.value.kind},_0xab3045.prototype.constantOr=function(e){return"constant"===this.value.kind?this.value.value:e},_0xab3045.prototype.evaluate=function(e,t,i){return this.property.evaluate(this.value,this.parameters,e,t,i)};var _0x3d809b={},_0xafdf4=function(e,t){this.gl=e.gl,this.location=t};_0x3d809b.Uniform1i=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){e.call(this,t,i),this.current=0}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},r}(_0xafdf4),_0x3d809b.Uniform1f=function(e){function t(t,i){e.call(this,t,i),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(_0xafdf4),_0x3d809b.Uniform2f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(_0xafdf4),_0x3d809b.Uniform3f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(_0xafdf4),_0x3d809b.Uniform4f=function(e){function t(t,i){e.call(this,t,i),this.current=[0,0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},t}(_0xafdf4),_0x3d809b.UniformColor=function(e){function t(t,i){e.call(this,t,i),this.current=_0x546352.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(_0xafdf4);var _0x152617=new Float32Array(16);_0x3d809b.UniformMatrix4f=function(e){function t(t,i){e.call(this,t,i),this.current=_0x152617}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.gl.uniformMatrix4fv(this.location,!1,e)},t}(_0xafdf4);var _0x33a3f9=(_0x16985b=!0,function(e,t){var i=_0x16985b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16985b=!1,i}),_0x5599a9=_0x33a3f9(void 0,(function(){return _0x5599a9.toString().search("(((.+)+)+)+$").toString().constructor(_0x5599a9).search("(((.+)+)+)+$")})),_0x16985b;function _0x42145e(){}_0x5599a9(),_0x42145e.toVertexBuffer=function(e,t,i,n){var r=t$X.createVertexBuffer({context:e,typedArray:t.arrayBuffer,usage:n?A$18.DYNAMIC_DRAW:A$18.STATIC_DRAW});return r.vertexArrayDestroyable=!1,r.bytesPerElement=t.bytesPerElement,r.length=t.length,r.attributes=i,r.itemSize=t.bytesPerElement,r.dynamicDraw=n,!n&&delete t.arrayBuffer,r},_0x42145e.toIndexBuffer=function(e,t,i){if(0!==t.length){var n=t$X.createIndexBuffer({context:e,typedArray:t.arrayBuffer,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});return n.vertexArrayDestroyable=!1,n.dynamicDraw=i,!n.dynamicDraw&&delete t.arrayBuffer,n}},_0x42145e.toRenderState=function(e,t,i){var n=Ee$r.DISABLED;e.blendFunction[0]==de$y.ONE&&e.blendFunction[1]==de$y.ONE_MINUS_SRC_ALPHA&&(n=Ee$r.ALPHA_BLEND);var r={frontFace:i.frontFace,cull:{enabled:i.enable,face:i.mode},depthRange:{near:t.range[0],far:t.range[1]},depthTest:{enabled:t.func!==de$y.ALWAYS,func:t.func},depthMask:t.mask,colorMask:{red:e.mask[0],green:e.mask[1],blue:e.mask[2],alpha:e.mask[3]},blending:n};return d$1m.fromCache(r)},_0x42145e.toComponentDatatype=function(e){switch(e){case"Int8":return S$14.BYTE;case"Uint8":return S$14.UNSIGNED_BYTE;case"Int16":return S$14.SHORT;case"Uint16":return S$14.UNSIGNED_SHORT;case"Int32":return S$14.INT;case"Uint32":return S$14.UNSIGNED_INT;default:return S$14.FLOAT}},_0x42145e.mbxAttributeToCesiumVertexArrtribute=function(e,t,i,n){var r=this.toComponentDatatype(e.type);S$14.getSizeInBytes(r);var o=t.bytesPerElement,a=e.offset+o*(n||0);return{name:e.name,index:i,vertexBuffer:t,componentsPerAttribute:e.components,componentDatatype:r,offsetInBytes:a,strideInBytes:o,normalize:!1}};var _0x4b28a0=(_0x111c5d=!0,function(e,t){var i=_0x111c5d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x111c5d=!1,i}),_0x6e98c4=_0x4b28a0(void 0,(function(){return _0x6e98c4.toString().search("(((.+)+)+)+$").toString().constructor(_0x6e98c4).search("(((.+)+)+)+$")})),_0x111c5d;_0x6e98c4();var _0x1dfe29=function(){this.ids=[],this.positions=[],this.indexed=!1};function _0x2e7ec5(e,t,i,n){if(!(i>=n)){for(var r=e[i+n>>1],o=i-1,a=n+1;;){do{o++}while(e[o]<r);do{a--}while(e[a]>r);if(o>=a)break;_0x4a53f8(e,o,a),_0x4a53f8(t,3*o,3*a),_0x4a53f8(t,3*o+1,3*a+1),_0x4a53f8(t,3*o+2,3*a+2)}_0x2e7ec5(e,t,i,a),_0x2e7ec5(e,t,a+1,n)}}function _0x4a53f8(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}_0x1dfe29.prototype.add=function(e,t,i,n){this.ids.push(e),this.positions.push(t,i,n)},_0x1dfe29.prototype.getPositions=function(e){for(var t=0,i=this.ids.length-1;t<i;){var n=t+i>>1;this.ids[n]>=e?i=n:t=n+1}for(var r=[];this.ids[t]===e;){var o=this.positions[3*t],a=this.positions[3*t+1],s=this.positions[3*t+2];r.push({index:o,start:a,end:s}),t++}return r},_0x1dfe29.serialize=function(e,t){var i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return _0x2e7ec5(i,n,0,i.length-1),t&&t.push(i.buffer,n.buffer),{ids:i,positions:n}},_0x1dfe29.deserialize=function(e){var t=new _0x1dfe29;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},_0x3abd5c.register("FeaturePositionMap",_0x1dfe29);var _0x5d8abd=(_0x18230e=!0,function(e,t){var i=_0x18230e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x18230e=!1,i}),_0x1f138b=_0x5d8abd(void 0,(function(){return _0x1f138b.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f138b).search("(((.+)+)+)+$")})),_0x18230e;function _0x3fe2f3(e,t,i){return Math.min(i,Math.max(t,e))}function _0x5976b6(e,t){return 256*(e=_0x3fe2f3(Math.floor(e),0,255))+(t=_0x3fe2f3(Math.floor(t),0,255))}function _0x4b5c07(e){return[_0x5976b6(255*e.r,255*e.g),_0x5976b6(255*e.b,255*e.a)]}_0x1f138b();var _0x576981=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0};_0x576981.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},_0x576981.prototype.setConstantPatternPositions=function(){},_0x576981.prototype.populatePaintArray=function(){},_0x576981.prototype.updatePaintArray=function(){},_0x576981.prototype.upload=function(){},_0x576981.prototype.destroy=function(){},_0x576981.prototype.setUniforms=function(e,t,i,n){t.set(n.constantOr(this.value))},_0x576981.prototype.getBinding=function(e,t){return"color"===this.type?new _0x3d809b.UniformColor(e,t):new _0x3d809b.Uniform1f(e,t)},_0x576981.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){var e=n.get(i).constantOr(r.value);return"color"===r.type&&(e.red=e.r,e.green=e.g,e.blue=e.b,e.alpha=e.a),e}},_0x576981.serialize=function(e){var t=e.value,i=e.names,n=e.type;return{value:_0x3abd5c.serialize(t),names:i,type:n}},_0x576981.deserialize=function(e){var t=e.value,i=e.names,n=e.type;return new _0x576981(_0x3abd5c.deserialize(t),i,n)};var _0x4110f2=function(e,t,i){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=i,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};_0x4110f2.prototype.defines=function(){return this.names.map((function(e){return"HAS_UNIFORM_u_"+e}))},_0x4110f2.prototype.populatePaintArray=function(){},_0x4110f2.prototype.updatePaintArray=function(){},_0x4110f2.prototype.upload=function(){},_0x4110f2.prototype.destroy=function(){},_0x4110f2.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},_0x4110f2.prototype.setUniforms=function(e,t,i,n,r){var o=this.patternPositions;"u_pattern_to"===r&&o.patternTo&&t.set(e$2c(o.patternTo[0],o.patternTo[1],o.patternTo[2],o.patternTo[3])),"u_pattern_from"===r&&o.patternFrom&&t.set(e$2c(o.patternFrom[0],o.patternFrom[1],o.patternFrom[2],o.patternFrom[3]))},_0x4110f2.prototype.getBinding=function(e,t){return new _0x3d809b.Uniform4f(e,t)},_0x4110f2.prototype.setUniformMap=function(e,t,i,n){var r=this.patternPositions;e[t]=function(){return"u_pattern_to"===t&&r.patternTo?new e$2c(r.patternTo[0],r.patternTo[1],r.patternTo[2],r.patternTo[3]):"u_pattern_from"===t&&r.patternFrom?new e$2c(r.patternFrom[0],r.patternFrom[1],r.patternFrom[2],r.patternFrom[3]):void console.log("CrossFadedConstantBinder is not support")}};var _0x5ae778=function(e,t,i,n){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?2:1,offset:0}})),this.paintVertexArray=new n};_0x5ae778.prototype.defines=function(){return[]},_0x5ae778.prototype.setConstantPatternPositions=function(){},_0x5ae778.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new _0x47eac1(0),t,{},[],n);if("color"===this.type)for(var s=_0x4b5c07(a),l=o;l<e;l++)r.emplaceBack(s[0],s[1]);else{for(var u=o;u<e;u++)r.emplaceBack(a);this.maxValue=Math.max(this.maxValue,a)}},_0x5ae778.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:0},i,n);if("color"===this.type)for(var a=_0x4b5c07(o),s=e;s<t;s++)r.emplace(s,a[0],a[1]);else{for(var l=e;l<t;l++)r.emplace(l,o);this.maxValue=Math.max(this.maxValue,o)}},_0x5ae778.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=_0x42145e.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},_0x5ae778.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},_0x5ae778.prototype.setUniforms=function(e,t){t.set(0)},_0x5ae778.prototype.getBinding=function(e,t){return new _0x3d809b.Uniform1f(e,t)},_0x5ae778.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};var _0x3ba7f7=function(e,t,i,n,r,o){this.expression=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.type=i,this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===i?4:2,offset:0}})),this.paintVertexArray=new a};_0x3ba7f7.prototype.defines=function(){return[]},_0x3ba7f7.prototype.setConstantPatternPositions=function(){},_0x3ba7f7.prototype.populatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=r.length;r.reserve(e);var a=this.expression.evaluate(new _0x47eac1(this.zoom),t,{},[],n),s=this.expression.evaluate(new _0x47eac1(this.zoom+1),t,{},[],n);if("color"===this.type)for(var l=_0x4b5c07(a),u=_0x4b5c07(s),c=o;c<e;c++)r.emplaceBack(l[0],l[1],u[0],u[1]);else{for(var h=o;h<e;h++)r.emplaceBack(a,s);this.maxValue=Math.max(this.maxValue,a,s)}},_0x3ba7f7.prototype.updatePaintArray=function(e,t,i,n){var r=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},i,n),a=this.expression.evaluate({zoom:this.zoom+1},i,n);if("color"===this.type)for(var s=_0x4b5c07(o),l=_0x4b5c07(a),u=e;u<t;u++)r.emplace(u,s[0],s[1],l[0],l[1]);else{for(var c=e;c<t;c++)r.emplace(c,o,a);this.maxValue=Math.max(this.maxValue,o,a)}},_0x3ba7f7.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=_0x42145e.toVertexBuffer(e,this.paintVertexArray,this.paintVertexAttributes))},_0x3ba7f7.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},_0x3ba7f7.prototype.interpolationFactor=function(e){return this.useIntegerZoom&&(e=Math.floor(e)),_0x3fe2f3(this.expression.interpolationFactor(e,this.zoom,this.zoom+1),0,1)},_0x3ba7f7.prototype.setUniforms=function(e,t,i){t.set(this.interpolationFactor(i.zoom))},_0x3ba7f7.prototype.getBinding=function(e,t){return new _0x3d809b.Uniform1f(e,t)},_0x3ba7f7.prototype.setUniformMap=function(e,t,i,n){var r=this;e[t]=function(){return r.interpolationFactor(0)}};var _0x417f45=function(e,t,i,n,r,o,a){this.expression=e,this.names=t,this.type=i,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.useIntegerZoom=n,this.zoom=r,this.maxValue=-1/0,this.layerId=a,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:4,offset:0}})),this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o};_0x417f45.prototype.defines=function(){return[]},_0x417f45.prototype.setConstantPatternPositions=function(){},_0x417f45.prototype.populatePaintArray=function(e,t,i){var n=this.zoomInPaintVertexArray,r=this.zoomOutPaintVertexArray,o=this.layerId,a=n.length;if(n.reserve(e),r.reserve(e),i&&t.patterns&&t.patterns[o]){var s=t.patterns[o],l=s.min,u=s.mid,c=s.max,h=i[l],d=i[u],f=i[c];if(!h||!d||!f)return;for(var p=a;p<e;p++)n.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1]),r.emplaceBack(d.tl[0],d.tl[1],d.br[0],d.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},_0x417f45.prototype.updatePaintArray=function(e,t,i,n,r){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(r&&i.patterns&&i.patterns[s]){var l=i.patterns[s],u=l.min,c=l.mid,h=l.max,d=r[u],f=r[c],p=r[h];if(!d||!f||!p)return;for(var _=e;_<t;_++)o.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],d.tl[0],d.tl[1],d.br[0],d.br[1]),a.emplace(_,f.tl[0],f.tl[1],f.br[0],f.br[1],p.tl[0],p.tl[1],p.br[0],p.br[1])}},_0x417f45.prototype.upload=function(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=_0x42145e.toVertexBuffer(e,this.zoomInPaintVertexArray,this.paintVertexAttributes),this.zoomOutPaintVertexBuffer=_0x42145e.toVertexBuffer(e,this.zoomOutPaintVertexArray,this.paintVertexAttributes))},_0x417f45.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},_0x417f45.prototype.setUniforms=function(e,t){t.set(0)},_0x417f45.prototype.getBinding=function(e,t){return new Uniform1f(e,t)},_0x417f45.prototype.setUniformMap=function(e,t,i,n){e[t]=function(){return 0}};class _0x2241e8{constructor(){this.binders={},this.cacheKey="",this._buffers=[]}static createDynamic(e,t,i){const n=new _0x2241e8,r=[];for(const o in e.paint._values){if(!i(o))continue;const a=e.paint.get(o);if(!(a instanceof _0xab3045&&supportsPropertyExpression(a.property.specification)))continue;const s=_0x1a0893(o,e.type),l=a.property.specification.type,u=a.property.useIntegerZoom;if("cross-faded"===a.property.specification["property-type"]||"cross-faded-data-driven"===a.property.specification["property-type"])if("constant"===a.value.kind)n.binders[o]=new _0x4110f2(a.value.value,s,l),r.push("/u_"+o);else{const i=_0x46c714(o,l,"source");n.binders[o]=new _0x417f45(a.value,s,l,u,t,i,e.id),r.push("/a_"+o)}else if("constant"===a.value.kind)n.binders[o]=new _0x576981(a.value.value,s,l),r.push("/u_"+o);else if("source"===a.value.kind){const e=_0x46c714(o,l,"source");n.binders[o]=new _0x5ae778(a.value,s,l,e),r.push("/a_"+o)}else{const e=_0x46c714(o,l,"composite");n.binders[o]=new _0x3ba7f7(a.value,s,l,u,t,e),r.push("/z_"+o)}}return n.cacheKey=r.sort().join(""),n}populatePaintArrays(e,t,i,n,r){for(const i in this.binders){this.binders[i].populatePaintArray(e,t,n,r)}}setConstantPatternPositions(e,t){for(const i in this.binders){this.binders[i].setConstantPatternPositions(e,t)}}updatePaintArrays(e,t,i,n,r){let o=!1;for(const a in e){const s=t.getPositions(+a);for(const t of s){const s=i.feature(t.index);for(const i in this.binders){const l=this.binders[i];if(!(l instanceof _0x576981||l instanceof _0x4110f2)&&!0===l.expression.isStateDependent){const u=n.paint.get(i);l.expression=u.value,l.updatePaintArray(t.start,t.end,s,e[a],r),o=!0}}}}return o}defines(){var e=[];for(var t in this.binders)e.push.apply(e,this.binders[t].defines());return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){const i=[];for(const n in this.binders){const r=this.binders[n];for(const o of r.uniformNames)if(t[o]){const a=r.getBinding(e,t[o]);i.push({name:o,property:n,binding:a})}}return i}setUniforms(e,t,i,n){for(const{name:r,property:o,binding:a}of t)this.binders[o].setUniforms(e,a,n,i.get(o),r)}updatePatternPaintBuffers(e){const t=[];for(const i in this.binders){const n=this.binders[i];if(n instanceof _0x417f45){const i=2===e.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;i&&t.push(i)}else(n instanceof _0x5ae778||n instanceof _0x3ba7f7)&&n.paintVertexBuffer&&t.push(n.paintVertexBuffer)}this._buffers=t}upload(e){for(const t in this.binders)this.binders[t].upload(e);const t=[];for(const e in this.binders){const i=this.binders[e];(i instanceof _0x5ae778||i instanceof _0x3ba7f7)&&i.paintVertexBuffer&&t.push(i.paintVertexBuffer)}this._buffers=t}getAttributeLocation(){for(var e=0,t={},i=0;i<this.layoutAttributes.length;i++){t[this.layoutAttributes[i].name]=i,e++}for(var n=this.getPaintVertexBuffers(),r=0;n&&r<n.length;r++)for(var o=n[r],a=0;a<o.attributes.length;a++){t[o.attributes[a].name]=e++}return t}getUniformMaps(e,t,i){for(var n in this.binders)for(var r=this.binders[n],o=0,a=r.uniformNames;o<a.length;o+=1){var s=a[o];e[s]&&r.setUniformMap(i,s,n,t)}for(var l in e)!i[l]&&l.indexOf("_t")>-1&&(i[l]=function(){return 0});return i}destroy(){for(const e in this.binders)this.binders[e].destroy()}}class ProgramConfigurationSet{constructor(e,t,i,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=_0x2241e8.createDynamic(r,i,n),this.programConfigurations[r.id].layoutAttributes=e;this.needsUpload=!1,this._featureMap=new _0x1dfe29,this._bufferOffset=0}populatePaintArrays(e,t,i,n,r){for(const o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(e,t,i,n,r);void 0!==t.id&&this._featureMap.add(+t.id,i,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,i,n){for(const r of i)this.needsUpload=this.programConfigurations[r.id].updatePaintArrays(e,this._featureMap,t,r,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function _0x1a0893(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"text-show-background":["show-background"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function _0x2ded44(e){return{"line-pattern":{source:_0x48bcfe,composite:_0x48bcfe},"fill-pattern":{source:_0x48bcfe,composite:_0x48bcfe},"fill-extrusion-pattern":{source:_0x48bcfe,composite:_0x48bcfe}}[e]}function _0x46c714(e,t,i){var n={color:{source:_0x145fb7,composite:_0x214a88},number:{source:_0x21d029,composite:_0x145fb7}},r=_0x2ded44(e);return r&&r[i]||n[t][i]}_0x3abd5c.register("ConstantBinder",_0x576981),_0x3abd5c.register("CrossFadedConstantBinder",_0x4110f2),_0x3abd5c.register("SourceExpressionBinder",_0x5ae778),_0x3abd5c.register("CrossFadedCompositeBinder",_0x417f45),_0x3abd5c.register("CompositeExpressionBinder",_0x3ba7f7),_0x3abd5c.register("ProgramConfiguration",_0x2241e8,{omit:["_buffers"]}),_0x3abd5c.register("ProgramConfigurationSet",ProgramConfigurationSet);var _0x53d274=(_0x16da73=!0,function(e,t){var i=_0x16da73?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16da73=!1,i}),_0x1bc63e=_0x53d274(void 0,(function(){return _0x1bc63e.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bc63e).search("(((.+)+)+)+$")})),_0x16da73;_0x1bc63e();var _0x208b93=_0x2c23ed([{name:"a_pos",components:2,type:"Int16"}],4),_0xc2a501=_0x208b93.members,_0x33a3a8=_0x2c23ed([{name:"a_pos",components:2,type:"Float32"}],4),_0x113bf4=_0x33a3a8.members;function _0x1164b8(e,t,i,n,r){e.emplaceBack(2*t+(n+1)/2,2*i+(r+1)/2)}var _0x159258=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this._sourceLayerIds={};var t=this;this.layerIds=this.layers.map((function(e,i){return t._sourceLayerIds[e.sourceLayer]=i,e.sourceLayer})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new _0x5ca07d,this.indexArray=new _0x48dae8,this.segments=new _0x1e8367,this.programConfigurations=new ProgramConfigurationSet(_0xc2a501,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x159258.prototype.populate=function(e,t){var i=this.layers[0],n=[],r=null;"circle"===i.type&&(r=i.layout.get("circle-sort-key"));for(var o=0,a=e;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.index,c=s.sourceLayerIndex,h=s.sourceLayerId,d=this._sourceLayerIds[h],f=this.layers[d];if(f){var p=ne$C/512,_=f.paint.get("circle-radius").value.value*p;if(this.layers[0]._featureFilter(new _0x47eac1(0),l)){var m=_0x182c2a(l),g=r?r.evaluate(l,{}):void 0,x={id:l.id,properties:l.properties,type:l.type,sourceLayerIndex:c,index:u,geometry:m,patterns:{},sortKey:g,circleRadius:_};n.push(x)}}}r&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var y=0,v=n;y<v.length;y+=1){var $=v[y],b=$,T=b.geometry,C=b.index,S=b.sourceLayerIndex,w=e[C].feature;this.addFeature($,T,C),t.featureIndex.insert(w,T,C,S,this.index,void 0,b.circleRadius)}},_0x159258.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},_0x159258.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_0x159258.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_0x159258.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=e.webgpu?_0x113bf4:_0xc2a501;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=_0x42145e.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0x42145e.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},_0x159258.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},_0x159258.prototype.clear=function(){e$2e(this.layoutVertexArray)&&(this.layoutVertexArray=null),e$2e(this.indexArray)&&(this.indexArray=null)},_0x159258.prototype.addFeature=function(e,t,i){for(var n=0,r=t;n<r.length;n+=1)for(var o=0,a=r[n];o<a.length;o+=1){var s=a[o],l=s.x,u=s.y;if(!(l<0||l>=ne$C||u<0||u>=ne$C)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),h=c.vertexLength;_0x1164b8(this.layoutVertexArray,l,u,-1,-1),_0x1164b8(this.layoutVertexArray,l,u,1,-1),_0x1164b8(this.layoutVertexArray,l,u,1,1),_0x1164b8(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,{})},_0x3abd5c.register("CircleBucket",_0x159258,{omit:["layers"]});var _0x4b0e87=(_0x2e7326=!0,function(e,t){var i=_0x2e7326?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e7326=!1,i}),_0x3c0748=_0x4b0e87(void 0,(function(){return _0x3c0748.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c0748).search("(((.+)+)+)+$")})),_0x2e7326;_0x3c0748();var _0x55570d=function(e){this.specification=e};_0x55570d.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},_0x55570d.prototype.interpolate=function(e,t,i){var n=interpolate[this.specification.type];return n?n(e,t,i):e},_0x3abd5c.register("DataConstantProperty",_0x55570d);var _0x41f8f6=(_0x2c55a8=!0,function(e,t){var i=_0x2c55a8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c55a8=!1,i}),_0xd65267=_0x41f8f6(void 0,(function(){return _0xd65267.toString().search("(((.+)+)+)+$").toString().constructor(_0xd65267).search("(((.+)+)+)+$")})),_0x2c55a8;_0xd65267();var _0xe8091e=function(e,t){this.specification=e,this.overrides=t};_0xe8091e.prototype.possiblyEvaluate=function(e,t,i){return"constant"===e.expression.kind||"camera"===e.expression.kind?new _0xab3045(this,{kind:"constant",value:e.expression.evaluate(t,null,{},i)},t):new _0xab3045(this,e.expression,t)},_0xe8091e.prototype.interpolate=function(e,t,i){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new _0xab3045(this,{kind:"constant",value:void 0},e.parameters);var n=interpolate[this.specification.type];return n?new _0xab3045(this,{kind:"constant",value:n(e.value.value,t.value.value,i)},e.parameters):e},_0xe8091e.prototype.evaluate=function(e,t,i,n,r){return"constant"===e.kind?e.value:e.evaluate(t,i,n,r)},_0x3abd5c.register("DataDrivenProperty",_0xe8091e);var _0x1a3204=(_0x472ac5=!0,function(e,t){var i=_0x472ac5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x472ac5=!1,i}),_0x508aed=_0x1a3204(void 0,(function(){return _0x508aed.toString().search("(((.+)+)+)+$").toString().constructor(_0x508aed).search("(((.+)+)+)+$")})),_0x472ac5;_0x508aed();var _0x42d187=function(e,t){this.property=e,this.value=t,this.expression=_0x8808b2.normalizePropertyExpression(void 0===t?e.specification.default:t,e.specification)};_0x42d187.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},_0x42d187.prototype.possiblyEvaluate=function(e,t){return this.property.possiblyEvaluate(this,e,t)};var _0x32472b=(_0x387fe3=!0,function(e,t){var i=_0x387fe3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x387fe3=!1,i}),_0x56000c=_0x32472b(void 0,(function(){return _0x56000c.toString().search("(((.+)+)+)+$").toString().constructor(_0x56000c).search("(((.+)+)+)+$")})),_0x387fe3;function _0x3a8331(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,i=t*e;return 4*(e<.5?i:3*(e-t)+i-.75)}_0x56000c();var _0x4a210e=function(e,t,i,n,r){this.property=e,this.value=t,this.begin=r+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=i)};_0x4a210e.prototype.possiblyEvaluate=function(e,t){var i=e.now||0,n=this.value.possiblyEvaluate(e,t),r=this.prior;if(r){if(i>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(i<this.begin)return r.possiblyEvaluate(e,t);var o=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(r.possiblyEvaluate(e,t),n,_0x3a8331(o))}return n};var _0x5e559f=(_0x379623=!0,function(e,t){var i=_0x379623?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x379623=!1,i}),_0x1a7c3c=_0x5e559f(void 0,(function(){return _0x1a7c3c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a7c3c).search("(((.+)+)+)+$")})),_0x379623;_0x1a7c3c();var _0x4e5a47=function(e){this.property=e,this.value=new _0x42d187(e,void 0)};_0x4e5a47.prototype.transitioned=function(e,t){return new _0x4a210e(this.property,this.value,t,extend$1({},e.transition,this.transition),e.now)},_0x4e5a47.prototype.untransitioned=function(){return new _0x4a210e(this.property,this.value,null,{},0)};var _0x322359=(_0xb68442=!0,function(e,t){var i=_0xb68442?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb68442=!1,i}),_0xe7325=_0x322359(void 0,(function(){return _0xe7325.toString().search("(((.+)+)+)+$").toString().constructor(_0xe7325).search("(((.+)+)+)+$")})),_0xb68442;_0xe7325();var _0x183b6f=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var i=e[t];i.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new _0x42d187(i,void 0),r=this.defaultTransitionablePropertyValues[t]=new _0x4e5a47(i);this.defaultTransitioningPropertyValues[t]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}},_0x5538dc=(_0x7a5be2=!0,function(e,t){var i=_0x7a5be2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x7a5be2=!1,i}),_0x41a94e=_0x5538dc(void 0,(function(){return _0x41a94e.toString().search("(((.+)+)+)+$").toString().constructor(_0x41a94e).search("(((.+)+)+)+$")})),_0x7a5be2;function _0x20fd4c(){}_0x41a94e(),_0x20fd4c.getMaximumPaintValue=function(e,t,i){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:i.programConfigurations.get(t.id).binders[e].maxValue},_0x20fd4c.translateDistance=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},_0x20fd4c.translate=function(e,t,i,n,r){if(!t||!t[0]&&!t[1])return e;var o=_0x4f59fa.convert(t)._mult(r);"viewport"===i&&o._rotate(-n);for(var a=[],s=0;s<e.length;s++){var l=e[s];a.push(l.sub(o))}return a};var _0x42c2f8=(_0x45de28=!0,function(e,t){var i=_0x45de28?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45de28=!1,i}),_0x544a57=_0x42c2f8(void 0,(function(){return _0x544a57.toString().search("(((.+)+)+)+$").toString().constructor(_0x544a57).search("(((.+)+)+)+$")})),_0x45de28;_0x544a57();var _0x75086b=function(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)};_0x75086b.prototype.get=function(e){return this._values[e]};var _0x4e78a6=(_0x27532a=!0,function(e,t){var i=_0x27532a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27532a=!1,i}),_0x5271cb=_0x4e78a6(void 0,(function(){return _0x5271cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x5271cb).search("(((.+)+)+)+$")})),_0x27532a;_0x5271cb();var _0x14aaff=function(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)};_0x14aaff.prototype.getValue=function(e){return clone(this._values[e].value)},_0x14aaff.prototype.setValue=function(e,t){this._values[e]=new _0x42d187(this._values[e].property,null===t?void 0:clone(t))},_0x14aaff.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r)}return e},_0x14aaff.prototype.possiblyEvaluate=function(e,t){for(var i=new _0x75086b(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i};var _0x5824de=(_0x294f0b=!0,function(e,t){var i=_0x294f0b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x294f0b=!1,i}),_0x593ee1=_0x5824de(void 0,(function(){return _0x593ee1.toString().search("(((.+)+)+)+$").toString().constructor(_0x593ee1).search("(((.+)+)+)+$")})),_0x294f0b;_0x593ee1();var _0x2448fe=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};_0x2448fe.prototype.possiblyEvaluate=function(e,t){for(var i=new _0x75086b(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].possiblyEvaluate(e,t)}return i},_0x2448fe.prototype.hasTransition=function(){for(var e=0,t=Object.keys(this._values);e<t.length;e+=1){var i=t[e];if(this._values[i].prior)return!0}return!1};var _0xf6514=(_0x79cbb8=!0,function(e,t){var i=_0x79cbb8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x79cbb8=!1,i}),_0x1c4532=_0xf6514(void 0,(function(){return _0x1c4532.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c4532).search("(((.+)+)+)+$")})),_0x79cbb8;_0x1c4532();var _0x43def0=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};_0x43def0.prototype.getValue=function(e){return clone(this._values[e].value.value)},_0x43def0.prototype.setValue=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new _0x4e5a47(this._values[e].property)),this._values[e].value=new _0x42d187(this._values[e].property,null===t?void 0:clone(t))},_0x43def0.prototype.getTransition=function(e){return clone(this._values[e].transition)},_0x43def0.prototype.setTransition=function(e,t){!this._values.hasOwnProperty(e)&&(this._values[e]=new _0x4e5a47(this._values[e].property)),this._values[e].transition=clone(t)||void 0},_0x43def0.prototype.serialize=function(){for(var e={},t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t],r=this.getValue(n);void 0!==r&&(e[n]=r);var o=this.getTransition(n);void 0!==o&&(e[n+"-transition"]=o)}return e},_0x43def0.prototype.transitioned=function(e,t){for(var i=new _0x2448fe(this._properties),n=0,r=Object.keys(this._values);n<r.length;n+=1){var o=r[n];i._values[o]=this._values[o].transitioned(e,t._values[o])}return i},_0x43def0.prototype.untransitioned=function(){for(var e=new _0x2448fe(this._properties),t=0,i=Object.keys(this._values);t<i.length;t+=1){var n=i[t];e._values[n]=this._values[n].untransitioned()}return e};var _0x1b490c=(_0x46b961=!0,function(e,t){var i=_0x46b961?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x46b961=!1,i}),_0x506d5b=_0x1b490c(void 0,(function(){return _0x506d5b.toString().search("(((.+)+)+)+$").toString().constructor(_0x506d5b).search("(((.+)+)+)+$")})),_0x46b961;_0x506d5b();var _0x1c5838="-transition";function _0x5aba43(e,t){if(this.id=e.id,this.type=e.type,"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new _0x14aaff(t.layout)),t.paint)){for(var i in this._transitionablePaint=new _0x43def0(t.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var n in e.layout)this.setLayoutProperty(n,e.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}_0x5aba43.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},_0x5aba43.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},_0x5aba43.prototype.setLayoutProperty=function(e,t,i){if(null!=t)this.id;if("visibility"===e)return this.visibility=t,void(this.config&&this.config.layout&&(this.config.layout.visibility=t));this._unevaluatedLayout.setValue(e,t)},_0x5aba43.prototype.getPaintProperty=function(e){return endsWith(e,_0x1c5838)?this._transitionablePaint.getTransition(e.slice(0,-_0x1c5838.length)):this._transitionablePaint.getValue(e)},_0x5aba43.prototype.setPaintProperty=function(e,t,i){if(null!=t)this.id;if(endsWith(e,_0x1c5838))return this._transitionablePaint.setTransition(e.slice(0,-_0x1c5838.length),t||void 0),!1;var n=this._transitionablePaint._values[e],r="cross-faded-data-driven"===n.property.specification["property-type"],o=n.value.isDataDriven(),a=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var s=this._transitionablePaint._values[e].value;return s.isDataDriven()||o||r||this._handleOverridablePaintPropertyUpdate(e,a,s)},_0x5aba43.prototype._handleSpecialPaintPropertyUpdate=function(e){},_0x5aba43.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!1},_0x5aba43.prototype.isHidden=function(e){return!!(this.minzoom&&e<this.minzoom)||(!!(this.maxzoom&&e>=this.maxzoom)||"none"===this.visibility)},_0x5aba43.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},_0x5aba43.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},_0x5aba43.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,t)},_0x5aba43.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),filterObject(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},_0x5aba43.prototype._validate=function(e,t,i,n,r){return!0},_0x5aba43.prototype.is3D=function(){return!1},_0x5aba43.prototype.isTileClipped=function(){return!1},_0x5aba43.prototype.hasOffscreenPass=function(){return!1},_0x5aba43.prototype.resize=function(){},_0x5aba43.prototype.isStateDependent=function(){return!0};var _0x1b4df7=(_0x4951d4=!0,function(e,t){var i=_0x4951d4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4951d4=!1,i}),_0x4b5ecc=_0x1b4df7(void 0,(function(){return _0x4b5ecc.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b5ecc).search("(((.+)+)+)+$")})),_0x4951d4;_0x4b5ecc();var _0x4f6965=8,_0x47f7cc={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},_0x396795={"*":{type:"source"}},_0x1d8ed3=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],_0x49f57={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},_0x2a5735={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},_0xfaf5de={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},_0x27e02e={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},_0x1f12e1={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},_0x5bcfe7={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},_0x71d783={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},_0x57f5b0=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],_0x3b46aa={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x81e45b={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0xf36542={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x5f15e9={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x10627e={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x2ec865={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x35e110={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0xf9a5e={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_0x44e1a6={type:"array",value:"*"},_0x1eafe1={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},_0x33b855={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},_0x310134={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},_0x3a5696={type:"array",value:"*",minimum:1},_0x5698da={type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},_0x1763b2={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},_0x5800e6=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],_0x5e0f21={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},_0x4639a1={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},_0x5e8c43={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},_0x268cf5={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x1e67bc={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-show-background":{type:"boolean",default:!1,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},_0x3cf53c={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x1816ba={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x130ec7={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},_0x31d3fb={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},_0x3d343c={$version:_0x4f6965,$root:_0x47f7cc,sources:_0x396795,source:_0x1d8ed3,source_vector:_0x49f57,source_raster:_0x2a5735,source_raster_dem:_0xfaf5de,source_geojson:_0x27e02e,source_video:_0x1f12e1,source_image:_0x5bcfe7,layer:_0x71d783,layout:_0x57f5b0,layout_background:_0x3b46aa,layout_fill:_0x81e45b,layout_circle:_0xf36542,layout_heatmap:_0x5f15e9,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:_0x10627e,layout_symbol:_0x2ec865,layout_raster:_0x35e110,layout_hillshade:_0xf9a5e,filter:_0x44e1a6,filter_operator:_0x1eafe1,geometry_type:_0x33b855,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:_0x310134,expression:_0x3a5696,expression_name:_0x5698da,light:_0x1763b2,paint:_0x5800e6,paint_fill:_0x5e0f21,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:_0x4639a1,paint_circle:_0x5e8c43,paint_heatmap:_0x268cf5,paint_symbol:_0x1e67bc,paint_raster:_0x3cf53c,paint_hillshade:_0x1816ba,paint_background:_0x130ec7,transition:_0x31d3fb,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},_0x51c853=(_0x449841=!0,function(e,t){var i=_0x449841?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x449841=!1,i}),_0x524859=_0x51c853(void 0,(function(){return _0x524859.toString().search("(((.+)+)+)+$").toString().constructor(_0x524859).search("(((.+)+)+)+$")})),_0x449841;function _0x22dd4b(){}function _0x45f458(e,t,i){if(e.length>1){if(_0x2cf157(e,t))return!0;for(var n=0;n<t.length;n++)if(_0x524860(t[n],e,i))return!0}for(var r=0;r<e.length;r++)if(_0x524860(e[r],t,i))return!0;return!1}function _0x2cf157(e,t){if(0===e.length||0===t.length)return!1;for(var i=0;i<e.length-1;i++)for(var n=e[i],r=e[i+1],o=0;o<t.length-1;o++){if(_0x67de90(n,r,t[o],t[o+1]))return!0}return!1}function _0x67de90(e,t,i,n){return isCounterClockwise(e,i,n)!==isCounterClockwise(t,i,n)&&isCounterClockwise(e,t,i)!==isCounterClockwise(e,t,n)}function _0x524860(e,t,i){var n=i*i;if(1===t.length)return e.distSqr(t[0])<n;for(var r=1;r<t.length;r++){var o=t[r-1],a=t[r];if(_0x22dd4b.distToSegmentSquared(e,o,a)<n)return!0}return!1}function _0x43133b(e,t){for(var i,n,r,o=!1,a=0;a<e.length;a++)for(var s=0,l=(i=e[a]).length-1;s<i.length;l=s++)n=i[s],r=i[l],n.y>t.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(o=!o);return o}function _0x545e12(e,t){for(var i=!1,n=0,r=e.length-1;n<e.length;r=n++){var o=e[n],a=e[r];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}_0x524859(),_0x22dd4b.polygonIntersectsPolygon=function(e,t){for(var i=0;i<e.length;i++)if(_0x545e12(t,e[i]))return!0;for(var n=0;n<t.length;n++)if(_0x545e12(e,t[n]))return!0;return!!_0x2cf157(e,t)},_0x22dd4b.polygonIntersectsBufferedPoint=function(e,t,i){return!!_0x545e12(e,t)||!!_0x524860(t,e,i)},_0x22dd4b.polygonIntersectsMultiPolygon=function(e,t){if(1===e.length)return _0x43133b(t,e[0]);for(var i=0;i<t.length;i++)for(var n=t[i],r=0;r<n.length;r++)if(_0x545e12(e,n[r]))return!0;for(var o=0;o<e.length;o++)if(_0x43133b(t,e[o]))return!0;for(var a=0;a<t.length;a++)if(_0x2cf157(e,t[a]))return!0;return!1},_0x22dd4b.polygonIntersectsBufferedMultiLine=function(e,t,i){for(var n=0;n<t.length;n++){var r=t[n];if(e.length>=3)for(var o=0;o<r.length;o++)if(_0x545e12(e,r[o]))return!0;if(_0x45f458(e,r,i))return!0}return!1},_0x22dd4b.distToSegmentSquared=function(e,t,i){var n=t.distSqr(i);if(0===n)return e.distSqr(t);var r=((e.x-t.x)*(i.x-t.x)+(e.y-t.y)*(i.y-t.y))/n;return r<0?e.distSqr(t):r>1?e.distSqr(i):e.distSqr(i.sub(t)._mult(r)._add(t))},_0x22dd4b.polygonIntersectPoint=function(e,t){return _0x545e12(e,t)};var _0x3db580=new _0x183b6f({"circle-sort-key":new _0xe8091e(_0x3d343c.layout_circle["circle-sort-key"])}),_0x18b3b3=new _0x183b6f({"circle-radius":new _0xe8091e(_0x3d343c.paint_circle["circle-radius"]),"circle-color":new _0xe8091e(_0x3d343c.paint_circle["circle-color"]),"circle-blur":new _0xe8091e(_0x3d343c.paint_circle["circle-blur"]),"circle-opacity":new _0xe8091e(_0x3d343c.paint_circle["circle-opacity"]),"circle-translate":new _0x55570d(_0x3d343c.paint_circle["circle-translate"]),"circle-translate-anchor":new _0x55570d(_0x3d343c.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new _0x55570d(_0x3d343c.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new _0x55570d(_0x3d343c.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new _0xe8091e(_0x3d343c.paint_circle["circle-stroke-width"]),"circle-stroke-color":new _0xe8091e(_0x3d343c.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new _0xe8091e(_0x3d343c.paint_circle["circle-stroke-opacity"])}),_0x5a4dd1={paint:_0x18b3b3,layout:_0x3db580},_0x45533e=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x5a4dd1)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.createBucket=function(e){return new _0x159258(e)},r.prototype.queryRadius=function(e){var t=e;return _0x20fd4c.getMaximumPaintValue("circle-radius",this,t)+_0x20fd4c.getMaximumPaintValue("circle-stroke-width",this,t)+_0x20fd4c.translateDistance(this.paint.get("circle-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a,s,l){s=_0x927af8();for(var u=_0x20fd4c.translate(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),0,a),c=this.paint.get("circle-radius")?.evaluate(t,i),h=this.paint.get("circle-stroke-width")?.evaluate(t,i),d=c+h,f="map"===this.paint.get("circle-pitch-alignment"),p=f?u:_0x2cb43e(u,s),_=f?d*a:d,m=0,g=n;m<g.length;m+=1)for(var x=0,y=g[m];x<y.length;x+=1){var v=y[x],$=f?v:_0x4ce250(v,s),b=_;if(_0x417195([],[v.x,v.y,0,1],s),"viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")||"map"===this.paint.get("circle-pitch-scale")&&this.paint.get("circle-pitch-alignment"),l=e$2e(l)?l:10,_0x22dd4b.polygonIntersectsBufferedPoint(p,$,b*l))return!0}return!1},r}(_0x5aba43);function _0x4ce250(e,t){var i=_0x417195([],[e.x,e.y,0,1],t);return new _0x4f59fa(i[0],i[1])}function _0x2cb43e(e,t){return e.map((function(e){return _0x4ce250(e,t)}))}function _0x927af8(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function _0x417195(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,e[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,e[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,e[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,e}const _0x2649e6=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4a1776=_0x2649e6(void 0,(function(){return _0x4a1776.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a1776).search("(((.+)+)+)+$")}));function _0x32573f(e,t){this._transformRequestFn=e,this._customAccessToken=t}function _0x86b94a(e){return 0===e.indexOf("mapbox:")}_0x4a1776(),_0x32573f.prototype._createSkuToken=function(){const e=createSkuToken();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},_0x32573f.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},_0x32573f.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},_0x32573f.prototype.normalizeStyleURL=function(e,t){if(!_0x86b94a(e))return e;const i=_0x3a2cd8(e);return i.path="/styles/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||t)},_0x32573f.prototype.normalizeGlyphsURL=function(e,t){if(!_0x86b94a(e))return e;const i=_0x3a2cd8(e);return i.path="/fonts/v1"+i.path,this._makeAPIURL(i,this._customAccessToken||t)},_0x32573f.prototype.normalizeSourceURL=function(e,t){if(!_0x86b94a(e))return e;const i=_0x3a2cd8(e);return i.path="/v4/"+i.authority+".json",i.params.push("secure"),this._makeAPIURL(i,this._customAccessToken||t)},_0x32573f.prototype.normalizeSpriteURL=function(e,t,i,n){const r=_0x3a2cd8(e);return _0x86b94a(e)?(r.path="/styles/v1"+r.path+"/sprite"+t+i,this._makeAPIURL(r,this._customAccessToken||n)):(r.path+=""+t+i,_0xe08040(r))},_0x32573f.prototype.normalizeTileURL=function(e,t,i){if(this._isSkuTokenExpired()&&this._createSkuToken(),!t||!_0x86b94a(t))return e;const n=_0x3a2cd8(e),r=browser.devicePixelRatio>=2||512===i?"@2x":"",o=webpSupported.supported?".webp":"$1";return n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+r+o),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path,config.REQUIRE_ACCESS_TOKEN&&(config.ACCESS_TOKEN||this._customAccessToken)&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,this._customAccessToken)},_0x32573f.prototype.canonicalizeTileURL=function(e){const t=_0x3a2cd8(e);if(!t.path.match(/(^\/v4\/)/)||!t.path.match(/\.[\w]+$/))return e;let i="mapbox://tiles/";i+=t.path.replace("/v4/","");const n=t.params.filter((e=>!e.match(/^access_token=/)));return n.length&&(i+="?"+n.join("&")),i},_0x32573f.prototype.canonicalizeTileset=function(e,t){if(!_0x86b94a(t))return e.tiles||[];const i=[];for(const t of e.tiles){const e=this.canonicalizeTileURL(t);i.push(e)}return i},_0x32573f.prototype._makeAPIURL=function(e,t){const i=_0x3a2cd8(config.API_URL);if(e.protocol=i.protocol,e.authority=i.authority,"/"!==i.path&&(e.path=""+i.path+e.path),!config.REQUIRE_ACCESS_TOKEN)return _0xe08040(e);if(!(t=t||config.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. ");if("s"===t[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ");return e.params=e.params.filter((e=>-1===e.indexOf("access_token"))),e.params.push("access_token="+t),_0xe08040(e)};const _0x39cc93=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function _0x5cbcf2(e){return _0x39cc93.test(e)}function _0x3fee28(e){return e.indexOf("sku=")>0&&_0x5cbcf2(e)}const _0x5bdb84=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function _0x3a2cd8(e){const t=e.match(_0x5bdb84);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function _0xe08040(e){const t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}const _0x47e513=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1d4013=_0x47e513(void 0,(function(){return _0x1d4013.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d4013).search("(((.+)+)+)+$")}));_0x1d4013();const _0x4658ba="mapbox-tiles",_0x10cc94=42e4;let _0x1373f1;function _0x262968(e,t){if(void 0===_0x1373f1)try{new Response(new ReadableStream),_0x1373f1=!0}catch(e){_0x1373f1=!1}_0x1373f1?t(e.body):e.blob().then(t)}function cachePut(e,t,i){if(!window.caches)return;const n={status:t.status,statusText:t.statusText,headers:new window.Headers};t.headers.forEach(((e,t)=>n.headers.set(t,e)));const r=parseCacheControl(t.headers.get("Cache-Control")||"");if(r["no-store"])return;r["max-age"]&&n.headers.set("Expires",new Date(i+1e3*r["max-age"]).toUTCString());new Date(n.headers.get("Expires")).getTime()-i<_0x10cc94||_0x262968(t,(t=>{const i=new window.Response(t,n);window.caches.open(_0x4658ba).then((t=>t.put(_0x1a5839(e.url),i)))}))}function _0x1a5839(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function cacheGet(e,t){if(!window.caches)return t(null);const i=_0x1a5839(e.url);window.caches.open(_0x4658ba).catch(t).then((e=>{e.match(i).catch(t).then((n=>{const r=_0x205fe3(n);e.delete(i),r&&e.put(i,n.clone()),t(null,n,r)}))}))}function _0x205fe3(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")),i=parseCacheControl(e.headers.get("Cache-Control")||"");return t>Date.now()&&!i["no-cache"]}const _0x436057=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2ccc6a=_0x436057(void 0,(function(){return _0x2ccc6a.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ccc6a).search("(((.+)+)+)+$")}));_0x2ccc6a();const _0x3c9422={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(_0x3c9422);class _0x4104b6 extends Error{constructor(e,t,i){401===t&&_0x5cbcf2(i)&&(e+=": you may have provided an invalid Mapbox access token."),super(e),this.status=t,this.url=i,this.name=this.constructor.name,this.message=e}toString(){return this.name+": "+this.message+" ("+this.status+"): "+this.url}}const getReferrer=isWorker()?()=>self.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href,_0x4df7c9=e=>/^file:/.test(e)||/^file:/.test(getReferrer())&&!/^\w+:/.test(e);function _0x3aa81f(e,t){const i=isWorker()?self:window,n=new i.AbortController,r=new i.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:getReferrer(),signal:n.signal});let o=!1,a=!1;const s=_0x3fee28(r.url);"json"===e.type&&r.headers.set("Accept","application/json");const l=(n,o,l)=>{if(a)return;if(n&&"SecurityError"!==n.message&&warnOnce(n),o&&l)return u(o);const c=Date.now();i.fetch(r).then((i=>{if(i.ok){const e=s?i.clone():null;return u(i,e,c)}return t(new _0x4104b6(i.statusText,i.status,e.url))})).catch((e=>{20!==e.code&&t(new Error(e.message))}))},u=(i,n,s)=>{("arrayBuffer"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text()).then((e=>{a||(n&&s&&cachePut(r,n,s),o=!0,t(null,e,i.headers.get("Cache-Control"),i.headers.get("Expires")))})).catch((e=>t(new Error(e.message))))};return s?cacheGet(r,l):l(null,null),{cancel:()=>{a=!0,o||n.abort()}}}function _0x5ebdb0(e,t){const i=new((isWorker()?self:window).XMLHttpRequest);i.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(i.responseType="arraybuffer");for(const t in e.headers)i.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=()=>{t(new Error(i.statusText))},i.onload=()=>{if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){let n=i.response;if("json"===e.type)try{n=JSON.parse(i.response)}catch(e){return t(e)}t(null,n,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else t(new _0x4104b6(i.statusText,i.status,e.url))},i.send(e.body),{cancel:()=>i.abort()}}const makeRequest=function(e,t){const i=isWorker()?self:window;if(!_0x4df7c9(e.url)){if(i.fetch&&i.Request&&i.AbortController&&i.Request.prototype.hasOwnProperty("signal"))return _0x3aa81f(e,t);if(isWorker()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}return _0x5ebdb0(e,t)},getJSON=function(e,t){return makeRequest(extend$1(e,{type:"json"}),t)},getArrayBuffer=function(e,t){return makeRequest(extend$1(e,{type:"arrayBuffer"}),t)},_0x193ad4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let _0x221de9,_0x2b82c4;const resetImageRequestQueue=()=>{_0x221de9=[],_0x2b82c4=0};resetImageRequestQueue();const _0x3c9f90=16,getImage=function(e,t){if(_0x2b82c4>=_0x3c9f90){const i={requestParameters:e,callback:t,cancelled:!1,cancel(){this.cancelled=!0}};return _0x221de9.push(i),i}_0x2b82c4++;let i=!1;const n=()=>{if(!i)for(i=!0,_0x2b82c4--;_0x221de9.length&&_0x2b82c4<_0x3c9f90;){const e=_0x221de9.shift(),{requestParameters:t,callback:i,cancelled:n}=e;!n&&(e.cancel=getImage(t,i).cancel)}},r=getArrayBuffer(e,((e,i,r,o)=>{if(n(),e)t(e);else if(i){const e=new window.Image,n=window.URL||window.webkitURL;e.onload=()=>{t(null,e),n.revokeObjectURL(e.src)},e.onerror=()=>t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const a=new window.Blob([new Uint8Array(i)],{type:"image/png"});e.cacheControl=r,e.expires=o,e.src=i.byteLength?n.createObjectURL(a):_0x193ad4}}));return{cancel:()=>{r.cancel(),n()}}},_0x405c5e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x8e8f39=_0x405c5e(void 0,(function(){return _0x8e8f39.toString().search("(((.+)+)+)+$").toString().constructor(_0x8e8f39).search("(((.+)+)+)+$")}));_0x8e8f39();const symbolLayoutAttributes=_0x2c23ed([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),dynamicLayoutAttributes=_0x2c23ed([{name:"a_projected_pos",components:3,type:"Float32"}],4);_0x2c23ed([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),_0x2c23ed([{name:"a_fade_opacity",components:1,type:"Float32"}],4);const collisionVertexAttributes=_0x2c23ed([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);_0x2c23ed([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]);const collisionBoxLayout=_0x2c23ed([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),collisionCircleLayout=_0x2c23ed([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);_0x2c23ed([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),_0x2c23ed([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"}]),_0x2c23ed([{type:"Float32",name:"offsetX"}]),_0x2c23ed([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var _0x4bae1e=(_0x38506e=!0,function(e,t){var i=_0x38506e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38506e=!1,i}),_0x131229=_0x4bae1e(void 0,(function(){return _0x131229.toString().search("(((.+)+)+)+$").toString().constructor(_0x131229).search("(((.+)+)+)+$")})),_0x38506e;_0x131229();var _0x3de98d={"Latin-1 Supplement":function(e){return e>=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};const _0x5021b7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x50d670=_0x5021b7(void 0,(function(){return _0x50d670.toString().search("(((.+)+)+)+$").toString().constructor(_0x50d670).search("(((.+)+)+)+$")}));function allowsVerticalWritingMode(e){for(const t of e)if(charHasUprightVerticalOrientation(t.charCodeAt(0)))return!0;return!1}function charHasUprightVerticalOrientation(e){return 746===e||747===e||!(e<4352)&&(!!_0x3de98d["Bopomofo Extended"](e)||(!!_0x3de98d.Bopomofo(e)||(!(!_0x3de98d["CJK Compatibility Forms"](e)||e>=65097&&e<=65103)||(!!_0x3de98d["CJK Compatibility Ideographs"](e)||(!!_0x3de98d["CJK Compatibility"](e)||(!!_0x3de98d["CJK Radicals Supplement"](e)||(!!_0x3de98d["CJK Strokes"](e)||(!(!_0x3de98d["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||(!!_0x3de98d["CJK Unified Ideographs Extension A"](e)||(!!_0x3de98d["CJK Unified Ideographs"](e)||(!!_0x3de98d["Enclosed CJK Letters and Months"](e)||(!!_0x3de98d["Hangul Compatibility Jamo"](e)||(!!_0x3de98d["Hangul Jamo Extended-A"](e)||(!!_0x3de98d["Hangul Jamo Extended-B"](e)||(!!_0x3de98d["Hangul Jamo"](e)||(!!_0x3de98d["Hangul Syllables"](e)||(!!_0x3de98d.Hiragana(e)||(!!_0x3de98d["Ideographic Description Characters"](e)||(!!_0x3de98d.Kanbun(e)||(!!_0x3de98d["Kangxi Radicals"](e)||(!!_0x3de98d["Katakana Phonetic Extensions"](e)||(!(!_0x3de98d.Katakana(e)||12540===e)||(!(!_0x3de98d["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||(!(!_0x3de98d["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||(!!_0x3de98d["Unified Canadian Aboriginal Syllabics"](e)||(!!_0x3de98d["Unified Canadian Aboriginal Syllabics Extended"](e)||(!!_0x3de98d["Vertical Forms"](e)||(!!_0x3de98d["Yijing Hexagram Symbols"](e)||(!!_0x3de98d["Yi Syllables"](e)||!!_0x3de98d["Yi Radicals"](e))))))))))))))))))))))))))))))}function charInRTLScript(e){return e>=1424&&e<=2303||_0x3de98d["Arabic Presentation Forms-A"](e)||_0x3de98d["Arabic Presentation Forms-B"](e)}function stringContainsRTLText(e){for(const t of e)if(charInRTLScript(t.charCodeAt(0)))return!0;return!1}_0x50d670();const _0x1d4b39=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1d4b87=_0x1d4b39(void 0,(function(){return _0x1d4b87.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d4b87).search("(((.+)+)+)+$")}));_0x1d4b87();const verticalizedCharacterMap={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var _0x435140=(_0x23f07c=!0,function(e,t){var i=_0x23f07c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23f07c=!1,i}),_0x4e4ee4=_0x435140(void 0,(function(){return _0x4e4ee4.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e4ee4).search("(((.+)+)+)+$")})),_0x23f07c;_0x4e4ee4();var _0xa42d39=(_0x23a592=!0,function(e,t){var i=_0x23a592?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23a592=!1,i}),_0x5c59a7=_0xa42d39(void 0,(function(){return _0x5c59a7.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c59a7).search("(((.+)+)+)+$")})),_0x23a592;function _0x17ce8d(e){var t={},i={},n=[],r=0;function o(t){n.push(e[t]),r++}function a(e,t,r){var o=i[e];return delete i[e],i[t]=o,n[o].geometry[0].pop(),n[o].geometry[0]=n[o].geometry[0].concat(r[0]),o}function s(e,i,r){var o=t[i];return delete t[i],t[e]=o,n[o].geometry[0].shift(),n[o].geometry[0]=r[0].concat(n[o].geometry[0]),o}function l(e,t,i){var n=i?t[0][t[0].length-1]:t[0][0];return e+":"+n.x+":"+n.y}for(var u=0;u<e.length;u++){var c=e[u],h=c.geometry,d=c.text?c.text.toString():null;if(d){var f=l(d,h),p=l(d,h,!0);if(f in i&&p in t&&i[f]!==t[p]){var _=s(f,p,h),m=a(f,p,n[_].geometry);delete t[f],delete i[p],i[l(d,n[m].geometry,!0)]=m,n[_].geometry=null}else f in i?a(f,p,h):p in t?s(f,p,h):(o(u),t[f]=r-1,i[p]=r-1)}else o(u)}return n.filter((function(e){return e.geometry}))}_0x5c59a7();var _0x3bd6a0=function(e,t){void 0===t&&(t={}),extend$1(this,t),this.type=e};!function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i){void 0===i&&(i={}),e.call(this,"error",extend$1({error:t},i))}n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r}(_0x3bd6a0);const _0x4993f0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x50ad45=_0x4993f0(void 0,(function(){return _0x50ad45.toString().search("(((.+)+)+)+$").toString().constructor(_0x50ad45).search("(((.+)+)+)+$")}));let _0xc1901a,_0x26bd65;_0x50ad45();const _0x3ba476={getImageData(e,t){const i=window.document.createElement("canvas"),n=i.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return i.width=e.width,i.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:e=>(_0xc1901a||(_0xc1901a=window.document.createElement("a")),_0xc1901a.href=e,_0xc1901a.href),hardwareConcurrency:window.navigator.hardwareConcurrency||4,get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(null==_0x26bd65&&(_0x26bd65=window.matchMedia("(prefers-reduced-motion: reduce)")),_0x26bd65.matches)}},_0x38fe05=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5f2188=_0x38fe05(void 0,(function(){return _0x5f2188.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f2188).search("(((.+)+)+)+$")}));_0x5f2188();var _0x4a15d8=(_0x480a64=!0,function(e,t){var i=_0x480a64?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x480a64=!1,i}),_0x31e1b5=_0x4a15d8(void 0,(function(){return _0x31e1b5.toString().search("(((.+)+)+)+$").toString().constructor(_0x31e1b5).search("(((.+)+)+)+$")})),_0x480a64;_0x31e1b5();var _0x1e70b4=(_0x4eea67=!0,function(e,t){var i=_0x4eea67?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4eea67=!1,i}),_0x4fdf64=_0x1e70b4(void 0,(function(){return _0x4fdf64.toString().search("(((.+)+)+)+$").toString().constructor(_0x4fdf64).search("(((.+)+)+)+$")})),_0x4eea67;_0x4fdf64();var _0x18147d=function(e,t){_0x3ce6f9(this,e,1,t)};function _0x3ce6f9(e,t,i,n){var r=t.width,o=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==r*o*i)throw new RangeError("mismatched image size")}else n=new Uint8Array(r*o*i);return e.width=r,e.height=o,e.data=n,e}function _0x1aefb(e,t,i){var n=t.width,r=t.height;if(n!==e.width||r!==e.height){var o=_0x3ce6f9({},{width:n,height:r},i);_0x28d709(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,r)},i),e.width=n,e.height=r,e.data=o.data}}function _0x28d709(e,t,i,n,r,o){if(0===r.width||0===r.height)return t;if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>t.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l<r.height;l++)for(var u=((i.y+l)*e.width+i.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<r.width*o;h++)s[c+h]=a[u+h];return t}_0x18147d.prototype.resize=function(e){_0x1aefb(this,e,1)},_0x18147d.prototype.clone=function(){return new _0x18147d({width:this.width,height:this.height},new Uint8Array(this.data))},_0x18147d.copy=function(e,t,i,n,r){_0x28d709(e,t,i,n,r,1)},_0x3abd5c.register("AlphaImage",_0x18147d);const _0xd14542=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3c0aa8=_0xd14542(void 0,(function(){return _0x3c0aa8.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c0aa8).search("(((.+)+)+)+$")}));_0x3c0aa8();const _0x53727f=3;function _0x2190fd(e,t,i){1===e&&i.readMessage(_0x5bb137,t)}function _0x5bb137(e,t,i){if(3===e){const{id:e,bitmap:n,width:r,height:o,left:a,top:s,advance:l}=i.readMessage(_0x282bfb,{});t.push({id:e,bitmap:new _0x18147d({width:r+2*_0x53727f,height:o+2*_0x53727f},n),metrics:{width:r,height:o,left:a,top:s,advance:l}})}}function _0x282bfb(e,t,i){1===e?t.id=i.readVarint():2===e?t.bitmap=i.readBytes():3===e?t.width=i.readVarint():4===e?t.height=i.readVarint():5===e?t.left=i.readSVarint():6===e?t.top=i.readSVarint():7===e&&(t.advance=i.readVarint())}function _0x7f378d(e){return new h$V(e).readFields(_0x2190fd,[])}const _0x206565=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2bb0f5=_0x206565(void 0,(function(){return _0x2bb0f5.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bb0f5).search("(((.+)+)+)+$")}));_0x2bb0f5();const _0x2e52db={horizontal:1,vertical:2,horizontalOnly:3};var _0x50d70d=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n,r){e.call(this,t,i),this.angle=n,void 0!==r&&(this.segment=r)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.clone=function(){return new r(this.x,this.y,this.angle,this.segment)},r}(_0x4f59fa);_0x3abd5c.register("Anchor",_0x50d70d);var _0x133948=(_0x4ee099=!0,function(e,t){var i=_0x4ee099?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4ee099=!1,i}),_0x392708=_0x133948(void 0,(function(){return _0x392708.toString().search("(((.+)+)+)+$").toString().constructor(_0x392708).search("(((.+)+)+)+$")})),_0x4ee099;_0x392708();var _0x245488=(_0x5a1b90=!0,function(e,t){var i=_0x5a1b90?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a1b90=!1,i}),_0x1b6324=_0x245488(void 0,(function(){return _0x1b6324.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b6324).search("(((.+)+)+)+$")})),_0x5a1b90;_0x1b6324();var _0x2c3838=(_0x53ad5d=!0,function(e,t){var i=_0x53ad5d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53ad5d=!1,i}),_0x22a4fa=_0x2c3838(void 0,(function(){return _0x22a4fa.toString().search("(((.+)+)+)+$").toString().constructor(_0x22a4fa).search("(((.+)+)+)+$")})),_0x53ad5d;_0x22a4fa();var _0x197fdb=(_0x2acd76=!0,function(e,t){var i=_0x2acd76?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2acd76=!1,i}),_0x1eaf8e=_0x197fdb(void 0,(function(){return _0x1eaf8e.toString().search("(((.+)+)+)+$").toString().constructor(_0x1eaf8e).search("(((.+)+)+)+$")})),_0x2acd76;_0x1eaf8e();var _0x220a8c=(_0x5af0b4=!0,function(e,t){var i=_0x5af0b4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5af0b4=!1,i}),_0x1bee88=_0x220a8c(void 0,(function(){return _0x1bee88.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bee88).search("(((.+)+)+)+$")})),_0x5af0b4;_0x1bee88();var _0x5703b9=(_0x4438fd=!0,function(e,t){var i=_0x4438fd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4438fd=!1,i}),_0x5d7800=_0x5703b9(void 0,(function(){return _0x5d7800.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d7800).search("(((.+)+)+)+$")})),_0x4438fd;function s$K(e,t,i,n,r){x$Y(e,t,i||0,n||e.length-1,r||C$W)}function x$Y(e,t,i,n,r){for(;n>i;){if(n-i>600){var o=n-i+1,a=t-i+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);x$Y(e,t,Math.max(i,Math.floor(t-a*l/o+u)),Math.min(n,Math.floor(t+(o-a)*l/o+u)),r)}var c=e[t],h=i,d=n;for(e$1i(e,i,t),r(e[n],c)>0&&e$1i(e,i,n);h<d;){for(e$1i(e,h,d),h++,d--;r(e[h],c)<0;)h++;for(;r(e[d],c)>0;)d--}0===r(e[i],c)?e$1i(e,i,d):e$1i(e,++d,n),d<=t&&(i=d+1),t<=d&&(n=d-1)}}function e$1i(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function C$W(e,t){return e<t?-1:e>t?1:0}_0x5d7800();var _0x28b959=(_0x4fe302=!0,function(e,t){var i=_0x4fe302?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fe302=!1,i}),_0x181fc4=_0x28b959(void 0,(function(){return _0x181fc4.toString().search("(((.+)+)+)+$").toString().constructor(_0x181fc4).search("(((.+)+)+)+$")})),_0x4fe302;function _0xa07c1a(e){for(var t=0,i=0,n=e.length,r=n-1,o=void 0,a=void 0;i<n;r=i++)o=e[i],t+=((a=e[r]).x-o.x)*(o.y+a.y);return t}function _0x1294f3(e,t){var i=e.length;if(i<=1)return[e];for(var n,r,o=[],a=0;a<i;a++){var s=_0xa07c1a(e[a]);0!==s&&(e[a].area=Math.abs(s),void 0===r&&(r=s<0),r===s<0?(n&&o.push(n),n=[e[a]]):n.push(e[a]))}if(n&&o.push(n),t>1)for(var l=0;l<o.length;l++)o[l].length<=t||(s$K(o[l],t,1,o[l].length-1,_0x335cbf),o[l]=o[l].slice(0,t));return o}function _0x335cbf(e,t){return t.area-e.area}_0x181fc4();var _0x410e75=(_0x5a315a=!0,function(e,t){var i=_0x5a315a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a315a=!1,i}),_0x2fde92=_0x410e75(void 0,(function(){return _0x2fde92.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fde92).search("(((.+)+)+)+$")})),_0x5a315a;_0x2fde92();const _0x586b27=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xdf9ae9=_0x586b27(void 0,(function(){return _0xdf9ae9.toString().search("(((.+)+)+)+$").toString().constructor(_0xdf9ae9).search("(((.+)+)+)+$")}));_0xdf9ae9();const _0x57d579=255,_0x50f556=_0x57d579*_0x36d5e2;var _0x47de9c=(_0x3ba186=!0,function(e,t){var i=_0x3ba186?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ba186=!1,i}),_0x4a5431=_0x47de9c(void 0,(function(){return _0x4a5431.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a5431).search("(((.+)+)+)+$")})),_0x3ba186;function _0x591b8a(e,t,i){var n=t.layout.get("text-transform").evaluate(i,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),e}function _0x3f1769(e,t,i){return e.sections.forEach((function(e){e.text=_0x591b8a(e.text,t,i)})),e}_0x4a5431();var _0x40d4ff=(_0x179f05=!0,function(e,t){var i=_0x179f05?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x179f05=!1,i}),_0x411ac9=_0x40d4ff(void 0,(function(){return _0x411ac9.toString().search("(((.+)+)+)+$").toString().constructor(_0x411ac9).search("(((.+)+)+)+$")})),_0x179f05;function _0x223d44(e,t){return t.replace(/{([^{}]+)}/g,((t,i)=>i in e?String(e[i]):""))}_0x411ac9();var _0x40b324={kind:"color"},_0x3634c4={kind:"formatted"},_0x59cfe0=new _0x183b6f({"symbol-placement":new _0x55570d(_0x3d343c.layout_symbol["symbol-placement"]),"symbol-spacing":new _0x55570d(_0x3d343c.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new _0x55570d(_0x3d343c.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new _0xe8091e(_0x3d343c.layout_symbol["symbol-sort-key"]),"symbol-z-order":new _0x55570d(_0x3d343c.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new _0x55570d(_0x3d343c.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new _0x55570d(_0x3d343c.layout_symbol["icon-ignore-placement"]),"icon-optional":new _0x55570d(_0x3d343c.layout_symbol["icon-optional"]),"icon-rotation-alignment":new _0x55570d(_0x3d343c.layout_symbol["icon-rotation-alignment"]),"icon-size":new _0xe8091e(_0x3d343c.layout_symbol["icon-size"]),"icon-text-fit":new _0x55570d(_0x3d343c.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new _0x55570d(_0x3d343c.layout_symbol["icon-text-fit-padding"]),"icon-image":new _0xe8091e(_0x3d343c.layout_symbol["icon-image"]),"icon-rotate":new _0xe8091e(_0x3d343c.layout_symbol["icon-rotate"]),"icon-padding":new _0x55570d(_0x3d343c.layout_symbol["icon-padding"]),"icon-keep-upright":new _0x55570d(_0x3d343c.layout_symbol["icon-keep-upright"]),"icon-offset":new _0xe8091e(_0x3d343c.layout_symbol["icon-offset"]),"icon-anchor":new _0xe8091e(_0x3d343c.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new _0x55570d(_0x3d343c.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new _0x55570d(_0x3d343c.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new _0x55570d(_0x3d343c.layout_symbol["text-rotation-alignment"]),"text-field":new _0xe8091e(_0x3d343c.layout_symbol["text-field"]),"text-font":new _0xe8091e(_0x3d343c.layout_symbol["text-font"]),"text-size":new _0xe8091e(_0x3d343c.layout_symbol["text-size"]),"text-max-width":new _0xe8091e(_0x3d343c.layout_symbol["text-max-width"]),"text-line-height":new _0x55570d(_0x3d343c.layout_symbol["text-line-height"]),"text-letter-spacing":new _0xe8091e(_0x3d343c.layout_symbol["text-letter-spacing"]),"text-justify":new _0xe8091e(_0x3d343c.layout_symbol["text-justify"]),"text-radial-offset":new _0xe8091e(_0x3d343c.layout_symbol["text-radial-offset"]),"text-variable-anchor":new _0x55570d(_0x3d343c.layout_symbol["text-variable-anchor"]),"text-anchor":new _0xe8091e(_0x3d343c.layout_symbol["text-anchor"]),"text-max-angle":new _0x55570d(_0x3d343c.layout_symbol["text-max-angle"]),"text-writing-mode":new _0x55570d(_0x3d343c.layout_symbol["text-writing-mode"]),"text-rotate":new _0xe8091e(_0x3d343c.layout_symbol["text-rotate"]),"text-padding":new _0x55570d(_0x3d343c.layout_symbol["text-padding"]),"text-keep-upright":new _0x55570d(_0x3d343c.layout_symbol["text-keep-upright"]),"text-transform":new _0xe8091e(_0x3d343c.layout_symbol["text-transform"]),"text-offset":new _0xe8091e(_0x3d343c.layout_symbol["text-offset"]),"text-allow-overlap":new _0x55570d(_0x3d343c.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new _0x55570d(_0x3d343c.layout_symbol["text-ignore-placement"]),"text-optional":new _0x55570d(_0x3d343c.layout_symbol["text-optional"])}),_0x59894c=new _0x183b6f({"icon-opacity":new _0xe8091e(_0x3d343c.paint_symbol["icon-opacity"]),"icon-color":new _0xe8091e(_0x3d343c.paint_symbol["icon-color"]),"icon-halo-color":new _0xe8091e(_0x3d343c.paint_symbol["icon-halo-color"]),"icon-halo-width":new _0xe8091e(_0x3d343c.paint_symbol["icon-halo-width"]),"icon-halo-blur":new _0xe8091e(_0x3d343c.paint_symbol["icon-halo-blur"]),"icon-translate":new _0x55570d(_0x3d343c.paint_symbol["icon-translate"]),"icon-translate-anchor":new _0x55570d(_0x3d343c.paint_symbol["icon-translate-anchor"]),"text-opacity":new _0xe8091e(_0x3d343c.paint_symbol["text-opacity"]),"text-color":new _0xe8091e(_0x3d343c.paint_symbol["text-color"],{runtimeType:_0x40b324,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new _0xe8091e(_0x3d343c.paint_symbol["text-halo-color"]),"text-halo-width":new _0xe8091e(_0x3d343c.paint_symbol["text-halo-width"]),"text-halo-blur":new _0xe8091e(_0x3d343c.paint_symbol["text-halo-blur"]),"text-show-background":new _0xe8091e(_0x3d343c.paint_symbol["text-show-background"]),"text-translate":new _0x55570d(_0x3d343c.paint_symbol["text-translate"]),"text-translate-anchor":new _0x55570d(_0x3d343c.paint_symbol["text-translate-anchor"])}),_0x397123={paint:_0x59894c,layout:_0x59cfe0},_0x1a13f5=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x397123)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){if(e.prototype.recalculate.call(this,t,i),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"line"==this.layout.get("symbol-placement")&&"viewport"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="map"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var r=[],o=0,a=n;o<a.length;o+=1){var s=a[o];r.indexOf(s)<0&&r.push(s)}this.layout._values["text-writing-mode"]=r}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},r.prototype.getValueAndResolveTokens=function(e,t,i){var n=this.layout.get(e).evaluate(t,{},i),r=this._unevaluatedLayout._values[e];return r.isDataDriven()||_0x8808b2.isExpression(r.value)||!n?n:_0x223d44(t.properties,n)},r.prototype.createBucket=function(e){return new _0xe0cd88(e)},r.prototype.queryRadius=function(){return 0},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){return _0x22dd4b.polygonIntersectPoint(e,n[0][0])},r.prototype._setPaintOverrides=function(){for(var e=0,t=_0x397123.paint.overridableProperties;e<t.length;e+=1){var i=t[e];if(r.hasPaintOverride(this.layout,i)){var n=this.paint.get(i);new FormatSectionOverride(n);"constant"===n.value.kind||n.value.kind,this.paint._values[i]=new PossiblyEvaluatedPropertyValue(n.property,null,n.parameters)}}},r.prototype._handleOverridablePaintPropertyUpdate=function(e,t,i){return!(!this.layout||t.isDataDriven()||i.isDataDriven())&&r.hasPaintOverride(this.layout,e)},r.hasPaintOverride=function(e,t){var i=e.get("text-field"),n=_0x397123.paint.properties[t],r=!1,o=function(e){for(var t=0,i=e;t<i.length;t+=1){var o=i[t];if(n.overrides&&n.overrides.hasOverride(o))return void(r=!0)}};if("constant"===i.value.kind&&i.value.value instanceof _0x4dced4)o(i.value.value.sections);else if("source"===i.value.kind){var a=function(e){if(!r)if(e instanceof _0x23876d&&_0x2eeeb8.typeOf(e.value)===_0x3634c4){var t=e.value;o(t.sections)}else e instanceof _0x3903ec?o(e.sections):e.eachChild(a)},s=i.value;s._styleExpression&&a(s._styleExpression.expression)}return r},r.hasPaintOverrides=function(e){for(var t=0,i=_0x397123.paint.overridableProperties;t<i.length;t+=1){var n=i[t];if(r.hasPaintOverride(e,n))return!0}return!1},r}(_0x5aba43),_0x248740=(_0x4994a5=!0,function(e,t){var i=_0x4994a5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4994a5=!1,i}),_0x30012f=_0x248740(void 0,(function(){return _0x30012f.toString().search("(((.+)+)+)+$").toString().constructor(_0x30012f).search("(((.+)+)+)+$")})),_0x4994a5;_0x30012f();var _0x203056=["Unknown","Point","LineString","Polygon"],_0x282e77=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function _0x34f077(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=s?Math.min(_0x50f556,Math.round(s[0])):0,p=s?Math.min(_0x50f556,Math.round(s[1])):0;e.emplaceBack(t,i,Math.round(32*n),Math.round(32*r),o,a,(f<<1)+(l?1:0),p,16*u,16*c,256*h,256*d)}function _0x3b8a98(e,t,i){e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i),e.emplaceBack(t.x,t.y,i)}function _0x31cd0c(e){for(var t=0,i=e.sections;t<i.length;t+=1){if(stringContainsRTLText(i[t].text))return!0}return!1}var _0x1ea804=function(e){this.layoutVertexArray=new _0x2a61c9,this.indexArray=new _0x48dae8,this.programConfigurations=e,this.segments=new _0x1e8367,this.dynamicLayoutVertexArray=new _0x2ef918,this.opacityVertexArray=new _0x4fd342,this.placedSymbolArray=new _0x11df68};_0x1ea804.prototype.upload=function(e,t,i,n){i&&(this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=_0x42145e.toVertexBuffer(e,this.layoutVertexArray,symbolLayoutAttributes.members)),this.indexArray.length>0&&(this.indexBuffer=_0x42145e.toIndexBuffer(e,this.indexArray,t)),this.dynamicLayoutVertexArray.length>0&&(this.dynamicLayoutVertexBuffer=_0x42145e.toVertexBuffer(e,this.dynamicLayoutVertexArray,dynamicLayoutAttributes.members,!0)),this.opacityVertexArray.length>0&&(this.opacityVertexBuffer=_0x42145e.toVertexBuffer(e,this.opacityVertexArray,_0x282e77,!0),this.opacityVertexBuffer.itemSize=1)),(i||n)&&this.programConfigurations.upload(e)},_0x1ea804.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.dynamicLayoutVertexBuffer&&(this.dynamicLayoutVertexBuffer.destroy(),this.dynamicLayoutVertexBuffer=null),this.opacityVertexBuffer&&(this.opacityVertexBuffer.destroy(),this.opacityVertexBuffer=null),this.programConfigurations.destroy(),this.segments.destroy()},_0x1ea804.prototype.clear=function(){},_0x3abd5c.register("SymbolBuffers",_0x1ea804);var _0x2fc634=function(e,t,i){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new i,this.segments=new _0x1e8367,this.collisionVertexArray=new _0x503e36};_0x2fc634.prototype.upload=function(e){this.layoutVertexArray.length>0&&(this.layoutVertexBuffer=_0x42145e.toVertexBuffer(e,this.layoutVertexArray,this.layoutAttributes)),this.indexArray.length>0&&(this.indexBuffer=_0x42145e.toIndexBuffer(e,this.indexArray)),this.collisionVertexArray.length>0&&(this.collisionVertexBuffer=_0x42145e.toVertexBuffer(e,this.collisionVertexArray,collisionVertexAttributes.members,!0))},_0x2fc634.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.layoutVertexBuffer=null),this.collisionVertexBuffer&&(this.collisionVertexBuffer.destroy(),this.collisionVertexBuffer=null),this.indexBuffer&&(this.indexBuffer.destroy(),this.indexBuffer=null),this.segments.destroy()},_0x3abd5c.register("CollisionBuffers",_0x2fc634);var _0x13c6f8=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasPaintOverrides=!1,this.hasRTLText=!1;var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=_0x471d9f(this.zoom,t["text-size"]),this.iconSizeData=_0x471d9f(this.zoom,t["icon-size"]);var i=this.layers[0].layout,n=i.get("symbol-sort-key"),r=i.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==r&&void 0!==n.constantOr(1);var o="viewport-y"===r||"auto"===r&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement")),"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map((function(e){return _0x2e52db[e]}))),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id})),this.sourceID=e.sourceID,this.overscaling=1};_0x13c6f8.prototype.createArrays=function(){const e=this.layers[0].layout;this.hasPaintOverrides=_0x1a13f5.hasPaintOverrides(e);var t=symbolLayoutAttributes.members;this.text=new _0x1ea804(new ProgramConfigurationSet(t,this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new _0x1ea804(new ProgramConfigurationSet(t,this.layers,this.zoom,(e=>/^icon/.test(e)))),this.textCollisionBox=new _0x2fc634(_0x5105bd,collisionBoxLayout.members,_0x3e3135),this.iconCollisionBox=new _0x2fc634(_0x5105bd,collisionBoxLayout.members,_0x3e3135),this.textCollisionCircle=new _0x2fc634(_0x5105bd,collisionCircleLayout.members,_0x48dae8),this.iconCollisionCircle=new _0x2fc634(_0x5105bd,collisionCircleLayout.members,_0x48dae8),this.glyphOffsetArray=new _0x57c4ef,this.lineVertexArray=new _0x4822d1,this.symbolInstances=new _0x6e09ce},_0x13c6f8.prototype.calculateGlyphDependencies=function(e,t,i,n,r){for(let o=0;o<e.length;o++)if(t[e.charCodeAt(o)]=!0,(i||n)&&r){const i=verticalizedCharacterMap[e.charAt(o)];i&&(t[i.charCodeAt(0)]=!0)}},_0x13c6f8.prototype.populate=function(e,t){var i=this.layers[0],n=i.layout,r=n.get("text-font"),o=n.get("text-field"),a=n.get("icon-image"),s=("constant"!==o.value.kind||o.value.value instanceof _0x4dced4&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&("constant"!==r.value.kind||r.value.value.length>0),l=("constant"!==a.value.kind||!!a.value.value)&&Object.keys(a.parameters).length>0,u=n.get("symbol-sort-key");if(this.features=[],s||l){for(var c=t.iconDependencies,h=t.glyphDependencies,d=t.availableImages,f=new _0x47eac1(this.zoom),p=0,_=e;p<_.length;p+=1){var m=_[p],g=m.feature,x=m.index,y=m.sourceLayerIndex;if(i._featureFilter(f,g)){var v=void 0;if(s){var $=i.getValueAndResolveTokens("text-field",g,d),b=_0x4dced4.factory($);_0x31cd0c(b)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===getRTLTextPluginStatus()||this.hasRTLText&&plugin.isParsed())&&(v=_0x3f1769(b,i,g))}var T=void 0;if(l){var C=i.getValueAndResolveTokens("icon-image",g,d);T=C instanceof _0x287856?C:_0x287856.fromString(C)}if(v||T){var S=this.sortFeaturesByKey?u.evaluate(g,{}):void 0,w={text:v,icon:T,index:x,sourceLayerIndex:y,geometry:_0x182c2a(g),properties:g.properties,type:_0x203056[g.type],sortKey:S};if(void 0!==g.id&&(w.id=g.id),this.features.push(w),T&&(c[T.name]=!0),v){var E=r.evaluate(g,{}).join(","),P="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(_0x2e52db.vertical)>=0;for(var A=0,L=v.sections;A<L.length;A+=1){var M=L[A];if(M.image)c[M.image.name]=!0;else{var R=allowsVerticalWritingMode(v.toString()),O=M.fontStack||E,D=h[O]=h[O]||{};this.calculateGlyphDependencies(M.text,D,P,this.allowVerticalPlacement,R)}}}}}}if("point"===n.get("symbol-placement"))for(p=0,_=this.features;p<_.length;p+=1){var I=_[p],B=I.geometry,F=I.index,N=I.sourceLayerIndex,G=e[F].feature;t.featureIndex.insert(G,B,F,N,this.index)}"line"===n.get("symbol-placement")&&(this.features=_0x17ce8d(this.features)),this.sortFeaturesByKey&&this.features.sort((function(e,t){return e.sortKey-t.sortKey}))}},_0x13c6f8.prototype.update=function(e,t,i){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,i),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,i))},_0x13c6f8.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},_0x13c6f8.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},_0x13c6f8.prototype.upload=function(e){this.text&&(!this.uploaded&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e),this.textCollisionCircle.upload(e),this.iconCollisionCircle.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0)},_0x13c6f8.prototype.destroy=function(){this.text&&(this.text.destroy(),this.icon.destroy(),this.textCollisionBox.destroy(),this.iconCollisionBox.destroy(),this.textCollisionCircle.destroy(),this.iconCollisionCircle.destroy())},_0x13c6f8.prototype.clear=function(){},_0x13c6f8.prototype.addToLineVertexArray=function(e,t){var i=this.lineVertexArray.length;if(void 0!==e.segment){for(var n=e.dist(t[e.segment+1]),r=e.dist(t[e.segment]),o={},a=e.segment+1;a<t.length;a++)o[a]={x:t[a].x,y:t[a].y,tileUnitDistanceFromAnchor:n},a<t.length-1&&(n+=t[a+1].dist(t[a]));for(var s=e.segment||0;s>=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:r},s>0&&(r+=t[s-1].dist(t[s]));for(var l=0;l<t.length;l++){var u=o[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:i,lineLength:this.lineVertexArray.length-i}},_0x13c6f8.prototype.addSymbols=function(e,t,i,n,r,o,a,s,l,u,c){var h=this,d=e.indexArray,f=e.layoutVertexArray,p=e.dynamicLayoutVertexArray,_=e.segments.prepareSegment(4*t.length,e.layoutVertexArray,e.indexArray,o.sortKey),m=this.glyphOffsetArray.length,g=_.vertexLength,x=this.allowVerticalPlacement&&a===_0x2e52db.vertical?Math.PI/2:0,y=function(e){var t=e.tl,n=e.tr,r=e.bl,o=e.br,a=e.tex,l=e.pixelOffsetTL,u=e.pixelOffsetBR,c=e.minFontScaleX,m=e.minFontScaleY,g=_.vertexLength,y=e.glyphOffset[1];_0x34f077(f,s.x,s.y,t.x,y+t.y,a.x,a.y+a.h,i,e.isSDF,l.x,l.y,c,m),_0x34f077(f,s.x,s.y,n.x,y+n.y,a.x+a.w,a.y+a.h,i,e.isSDF,u.x,l.y,c,m),_0x34f077(f,s.x,s.y,r.x,y+r.y,a.x,a.y,i,e.isSDF,l.x,u.y,c,m),_0x34f077(f,s.x,s.y,o.x,y+o.y,a.x+a.w,a.y,i,e.isSDF,u.x,u.y,c,m),_0x3b8a98(p,s,x),d.emplaceBack(g,g+1,g+2),d.emplaceBack(g+1,g+2,g+3),_.vertexLength+=4,_.primitiveLength+=2,h.glyphOffsetArray.emplaceBack(e.glyphOffset[0])};if(o.text&&o.text.sections){var v=o.text.sections;if(this.hasPaintOverrides){for(var $,b=function(t,i){void 0!==$&&($!==t||i)&&e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},v[$]),$=t},T=0,C=t;T<C.length;T+=1){var S=C[T];b(S.sectionIndex,!1),y(S)}b($,!0)}else{for(var w=0,E=t;w<E.length;w+=1){y(E[w])}e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{},v[0])}}else{for(var P=0,A=t;P<A.length;P+=1){y(A[P])}e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,o,o.index,{})}e.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,g,l,u,s.segment,i?i[0]:0,i?i[1]:0,n[0],n[1],a,0,!1,0,c)},_0x13c6f8.prototype._addCollisionDebugVertex=function(e,t,i,n,r,o){return t.emplaceBack(0,0),e.emplaceBack(i.x,i.y,n,r,Math.round(o.x),Math.round(o.y))},_0x13c6f8.prototype.addCollisionDebugVertices=function(e,t,i,n,r,o,a,s){var l=r.segments.prepareSegment(4,r.layoutVertexArray,r.indexArray),u=l.vertexLength,c=r.layoutVertexArray,h=r.collisionVertexArray,d=a.anchorX,f=a.anchorY;if(this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,t)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(i,n)),this._addCollisionDebugVertex(c,h,o,d,f,new pointGeometry(e,n)),l.vertexLength+=4,s){var p=r.indexArray;p.emplaceBack(u,u+1,u+2),p.emplaceBack(u,u+2,u+3),l.primitiveLength+=2}else{var _=r.indexArray;_.emplaceBack(u,u+1),_.emplaceBack(u+1,u+2),_.emplaceBack(u+2,u+3),_.emplaceBack(u+3,u),l.primitiveLength+=4}},_0x13c6f8.prototype.addDebugCollisionBoxes=function(e,t,i,n){for(var r=e;r<t;r++){var o=this.collisionBoxArray.get(r),a=o.x1,s=o.y1,l=o.x2,u=o.y2,c=o.radius>0;this.addCollisionDebugVertices(a,s,l,u,c?n?this.textCollisionCircle:this.iconCollisionCircle:n?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,i,c)}},_0x13c6f8.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e<this.symbolInstances.length;e++){var t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}},_0x13c6f8.prototype._deserializeCollisionBoxesForSymbol=function(e,t,i,n,r,o,a,s,l){for(var u={},c=t;c<i;c++){var h=e.get(c);if(0===h.radius){u.textBox={x1:h.x1,y1:h.y1,x2:h.x2,y2:h.y2,anchorPointX:h.anchorPointX,anchorPointY:h.anchorPointY},u.textFeatureIndex=h.featureIndex;break}!u.textCircles&&(u.textCircles=[],u.textFeatureIndex=h.featureIndex);u.textCircles.push(h.anchorPointX,h.anchorPointY,h.radius,h.signedDistanceFromAnchor,1)}for(var d=n;d<r;d++){var f=e.get(d);if(0===f.radius){u.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalTextFeatureIndex=f.featureIndex;break}}for(var p=o;p<a;p++){var _=e.get(p);if(0===_.radius){u.iconBox={x1:_.x1,y1:_.y1,x2:_.x2,y2:_.y2,anchorPointX:_.anchorPointX,anchorPointY:_.anchorPointY},u.iconFeatureIndex=_.featureIndex;break}}for(var m=s;m<l;m++){var g=e.get(m);if(0===g.radius){u.verticalIconBox={x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,anchorPointX:g.anchorPointX,anchorPointY:g.anchorPointY},u.verticalIconFeatureIndex=g.featureIndex;break}}return u},_0x13c6f8.prototype.deserializeCollisionBoxes=function(e){this.collisionArrays=[];for(var t=0;t<this.symbolInstances.length;t++){var i=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,i.textBoxStartIndex,i.textBoxEndIndex,i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i.iconBoxStartIndex,i.iconBoxEndIndex,i.verticalIconBoxStartIndex,i.verticalIconBoxEndIndex))}},_0x13c6f8.prototype.hasTextData=function(){return this.text.segments.get().length>0},_0x13c6f8.prototype.hasIconData=function(){return this.icon.segments.get().length>0},_0x13c6f8.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},_0x13c6f8.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},_0x13c6f8.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},_0x13c6f8.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},_0x13c6f8.prototype.addIndicesForPlacedSymbol=function(e,t){for(var i=e.placedSymbolArray.get(t),n=i.vertexStartIndex+4*i.numGlyphs,r=i.vertexStartIndex;r<n;r+=4)e.indexArray.emplaceBack(r,r+1,r+2),e.indexArray.emplaceBack(r+1,r+2,r+3)},_0x13c6f8.prototype.getSortedSymbolIndexes=function(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var t=Math.sin(e),i=Math.cos(e),n=[],r=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);n.push(0|Math.round(t*s.anchorX+i*s.anchorY)),r.push(s.featureIndex)}return o.sort((function(e,t){return n[e]-n[t]||r[t]-r[e]})),o},_0x13c6f8.prototype.sortFeatures=function(e){var t=this;if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var i=0,n=this.symbolInstanceIndexes;i<n.length;i+=1){var r=n[i],o=this.symbolInstances.get(r);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(e,i,n){e>=0&&n.indexOf(e)===i&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},_0x3abd5c.register("SymbolBucket",_0x13c6f8,{omit:["layers","collisionBoxArray","compareText"]}),_0x13c6f8.MAX_GLYPHS=65535,_0x13c6f8.addDynamicAttributes=_0x3b8a98;var _0xe0cd88=_0x13c6f8,_0x2a5b18=!1,_0x2415f5=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t,i,n,r,o){this.isMVT=!0,this.mvtProvider=t.imageryProvider,this.tileSize=this.mvtProvider._canvasWidth,this._painter=this.mvtProvider._painter,this._MVTStyle=this.mvtProvider._MVTStyle,this.dispatcher=this._MVTStyle.dispatcher,this._MVTLabel=new _0x1a5135(this.mvtProvider),this.highLighting=!1,this._visible=!1,this.working=!1,this.repaintWorking=!1,this.layersToUpdate=[],this.removedIds=[],this.imageryNeedToRender={},e.call(this,t,i,n,r,o),this._isToReRender=!1,this.frameState=null,this.realtime=this.mvtProvider.realtime,this.zoomLevel=-1,this.lastCameraZoomLevel=-1,this._passState=new n$$,this._passState.viewport=new f$1a,this.hasRawData=!1,this.uid=uniqueId()}function o(e){var t=e.mvtProvider._maxImageCacheLevel-e.level,i=0,n=!1,r=e.imageryLayer._detailLevelOffset;if(t<r&&(n=!0,i=r-t),!e.hasRawData||n){var o=function(e,t){var i=e.parent,n=1,r=e.hasRawData;t>0&&(r=!1);var o=null;for(;!r&&e$2e(i);)n>=t&&((r=i.hasRawData)&&(o=i)),i=i.parent,n++;return o}(e,i);return!e$2e(o)&&e.hasRawData?e:o}return e}function a(e){return{param:{featureIndex:e.featureIndex,tileID:{x:e.requestX,y:e.requestY,z:e.requestZ},indexData:e.indexData,pickId:e.pickId,webgpu:_0x2a5b18,type:"vector",source:e.mvtProvider.name,uid:e.uid,request:e.mvtProvider._requestManager.transformRequest(e.requestUrl,_0x3c9422.Tile)},transferableObjects:[]}}function s(e,t,i){e.setBuckets(t.buckets),e.imageAtlas=t.imageAtlas,e.featureIndex=t.featureIndex,e.featureIndex.rawTileData=t.rawTileData,e.glyphAtlasImage=t.glyphAtlasImage,i?e.repaintWorking=!1:e.working=!1}function l(e,t){var i=m(e.rectangle,t.rectangle),n=e.level,r=1;if(t.realtime){var o=t.frameState.camera;e$2e(o.zoomLevel)&&o.zoomLevel!=1/0&&(n=o.zoomLevel,t.zoomLevel=n)}else r=Math.pow(2,t.level-e.level);e.targetTileSize=e.tileSize*r,u(e,t,i,n),t.state!=wt$7.READY&&(t.state=wt$7.RENDERED),c(t)}function u(e,t,i,n){var r=e._painter;for(var o in e.buckets){var a=e.buckets[o];if(a instanceof _0xe0cd88)if(!("point"!==e._MVTStyle._layers[o].layout.get("symbol-placement")))continue;a.upload(r.cesiumContext)}e$2e(e.imageAtlas)&&(e.imageAtlasTexture=new _0x556fd4(r.context,r.cesiumContext,e.imageAtlas.image,V$12.RGBA),e.cesiumImageAtlas=new v$I({pixelFormat:V$12.RGBA,context:r.cesiumContext}),e.cesiumImageAtlas._texture=e.imageAtlasTexture.cesiumTexture),e.glyphAtlasImage&&(e.glyphAtlasTexture=new _0x556fd4(r.context,r.cesiumContext,e.glyphAtlasImage,r.cesiumContext.webgpu?V$12.RED:V$12.ALPHA),e.glyphAtlasImage=null,e.cesiumGlyphAtlas=new v$I({pixelFormat:V$12.ALPHA,context:r.cesiumContext}),e.cesiumGlyphAtlas._texture=e.glyphAtlasTexture.cesiumTexture),e.viewProjection=i;var s=e$2e(e.context)?e.context:t.context,l=t.level,u=t.texture||t.textureWebMercator;t._passState.context=s,t._passState.viewport.x=0,t._passState.viewport.y=0,t._passState.viewport.width=u.width,t._passState.viewport.height=u.height;var c=u.width+"_"+u.height;!e$2e(e.mvtProvider._renderTextureList[c])&&(e.mvtProvider._renderTextureList[c]=new t$U({context:s,width:u.width,height:u.height,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8}));var h=e.mvtProvider._renderTextureList[c];!t._framebuffer&&(t._framebuffer=new t$V({context:s,colorTextures:[u],depthStencilTexture:h})),t._passState.framebuffer=t._framebuffer;try{r.renderOneTile(e._MVTStyle,e,{targetTileLevel:l,finestRenderLevel:e.mvtProvider.maximumLevel,zoom:n,lineAntialiasing:e.mvtProvider.lineAntialiasing?1:0,passState:t._passState})}catch(e){console.log(e)}s.webgpu&&s.engine.flushFramebuffer()}function c(e){e.highLighting=!1,e.imageryLayer._finalizeReprojectTexture(e.context,e.texture||e.textureWebMercator)}n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.processStateMachine=function(e,t,i){this.frameState=e,this.context=e.context,_0x2a5b18=e.context.webgpu,this.state===wt$7.UNLOADED&&!i&&!this.imageryLayer._pausing&&(this.state=wt$7.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===wt$7.RECEIVED&&(this.state=wt$7.TRANSITIONING,this.indexData=this.image.indexData,this.image,this.imageryLayer._createTexture(e.context,this,e)),this.state===wt$7.TEXTURE_LOADED&&function(e){var t=o(e);if(!e$2e(t))return e.highLighting=!1,void console.log("MVTImagery has no rawData.");var i=g(e.x,e.y,e.level);if(t.imageryNeedToRender[i]=e,e$2e(t.buckets)&&!t.repaintWorking&&!t._isToReRender)return void l(t,e);if(!t.working){if(t.repaintWorking||t._isToReRender)return;var n=a(t);function r(e,i){delete t.request,e?(console.log("loadTile tile error in worker"),t.state=wt$7.FAILED):s(t,i,!1)}t.working=!0,!t.actor&&(t.actor=t.dispatcher.getActor()),t.request=t.actor.send("loadTile",n.param,r.bind(this))}}(this);var n=this.state===wt$7.READY&&t&&!this.texture;(this.state===wt$7.RENDERED||n)&&(this.state=wt$7.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))},r.prototype.addRepaintTask=function(e,t,i){var n={};this.layersToUpdate.map((function(e){n[e.id]=!0}));var r=this;e.map((function(e){!e$2e(n[e.id])&&r.layersToUpdate.push(e)})),this.removedIds=t,this.highLighting=i},r.prototype.clearRepaintTask=function(){this.layersToUpdate=[],this.removedIds=[]},r.prototype.update=function(){this.repaint()},r.prototype.setBuckets=function(e){var t=this.buckets;if(e$2e(t))for(var i in e){if(e$2e(t[i]))t[i].destroy(),t[i]=e[i];else t[i]=e[i]}else this.buckets=e},r.prototype.repaint=function(){this.state===wt$7.READY&&(this._isToReRender&&function(e){var t=o(e);if(!e$2e(t))return;var i=g(e.x,e.y,e.level);if(e._isToReRender&&!e.working&&(l(t,e),e._setNeedReRender(!1),e$2e(t.imageryNeedToRender[i])&&delete t.imageryNeedToRender[i],0==Object.getOwnPropertyNames(t.imageryNeedToRender).length&&e$2e(t.buckets)))for(var n in t.buckets){t.buckets[n].clear()}}(this),(this.layersToUpdate.length>0||this.removedIds.length>0)&&function(e){var t=o(e);if(!e$2e(t))return e.clearRepaintTask(),void(e.highLighting=!1);var i=g(e.x,e.y,e.level),n=e.layersToUpdate;if(t.imageryNeedToRender[i]=e,t.repaintWorking){if(!t.IsPickIdSameWithCurrentPickID())return;e.clearRepaintTask()}else{if(t.working)return;n.length>0&&n[0].id.indexOf("_highlight")>-1?t.pickId=n[0].id+n[0].filter[2]:t.pickId=void 0;var r=a(t);e.clearRepaintTask(),t.repaintWorking=!0,!t.actor&&(t.actor=t.dispatcher.getActor());var l=t.featureIndex.rawTileData;function u(i,n){if(delete t.request,i)console.log("reloadTile tile error in worker");else{if(s(t,n,!0),e.featureIndex.rawTileData=l,!t.IsPickIdSameWithCurrentPickID())return;if(!t.isDestroyed())for(var r in t.imageryNeedToRender)!t.imageryNeedToRender[r].isDestroyed()&&t.imageryNeedToRender[r]._setNeedReRender(!0)}}t.request=t.actor.send("reloadTile",r.param,u.bind(this))}}(this))},r.prototype._setNeedReRender=function(e){this._isToReRender=e,this._MVTLabel._setNeedReRender(e)},r.prototype.realtimeRender=function(){if(this.state===wt$7.READY&&this.realtime&&function(e){var t=e.frameState.camera;if(!e$2e(t.zoomLevel)||t.zoomLevel==1/0)return!1;var i=!1;e.lastCameraZoomLevel!=t.zoomLevel&&(i=!0),e.lastCameraZoomLevel=t.zoomLevel;var n=Math.abs(e.zoomLevel-t.zoomLevel);return!(n<.2&&i)&&0!=n}(this)){var e=o(this);e$2e(e)&&e$2e(e.buckets)&&!this.working&&function(e,t){var i=t.frameState.camera,n=void 0;if(!e$2e(i.zoomLevel))return;n=i.zoomLevel;var r=m(e.rectangle,t.rectangle);e.mvtProvider._context,e.targetTileSize=e.tileSize,u(e,t,r,n),c(t),t.zoomLevel=n}(e,this)}},r.prototype.IsPickIdSameWithCurrentPickID=function(){return!e$2e(this.mvtProvider._currentPickID)||!e$2e(this.pickId)||this.mvtProvider._currentPickID===this.pickId},r.prototype.setVisible=function(e){this._visible=e},r.prototype.getBucket=function(e){return e$2e(e.bucketName)?this.buckets[e.bucketName]:this.buckets[e.id]};var h=new p$1d,d=new p$1d,f=new o$1p(0,0,-1),p=new o$1p(0,1,0),_=new o$1p;function m(e,t){var i=t.width/e.width;t.height,e.height;var n=ne$C*i,r=.5*-n,o=.5*n,a=.5*-n,s=.5*n;h=p$1d.computeOrthographicOffCenter(r,o,a,s,-1,400,h);var l=new o$1p(.5*((t.west-e.west)/e.width*ne$C+(t.east-e.west)/e.width*ne$C),.5*((t.north-e.south)/e.height*ne$C+(t.south-e.south)/e.height*ne$C),200);d=p$1d.computeView(l,f,p,_,d);var u=new p$1d;return p$1d.multiply(h,d,u),u}function g(e,t,i){return JSON.stringify([e,t,i])}return _=o$1p.cross(f,p,_),r.prototype.queryRenderedFeatures=function(e,t,i){if(!e$2e(this.featureIndex)||!e$2e(this.featureIndex.rawTileData))return null;var n=this.featureIndex.query({queryGeometry:t,tileSize:this.tileSize,params:i},e,null),r=!1;for(var o in n)if(e[o]instanceof _0x45533e&&n[o].length>1){r=!0;break}return r&&(n=this.featureIndex.query({queryGeometry:t,tileSize:this.tileSize,params:i,adjustScale:.1},e,null)),n},r.prototype.querySourceFeatures=function(e,t){if(e$2e(this.featureIndex)&&e$2e(this.featureIndex.rawTileData)){var i=this.featureIndex.loadVTLayers(),n=e?e.sourceLayer:"";""!==n&&(n=n.replace(/(.*)(#\d.*)/,"$1"),e.sourceLayer=n);var r=i[n];if(r)for(var o=_0x51a3ff.createFilter(e&&e.filter),a=0;a<r.length;a++){var s=r.feature(a);o(new _0x47eac1(0),s)&&t.push(s)}}},r.prototype.isTileIDLessThan=function(e){return this.level<e.level||!(this.level>e.level)&&(this.x<e.x||!(this.x>e.x)&&this.y<e.y)},r.prototype.onAlphaChanged=function(){this._setNeedReRender(!0)},r.prototype.release=function(){if(this.request&&(this.request.cancel(),delete this.request),this.actor&&(this.actor.send("abortTile",{type:"vector",source:this.mvtProvider.name,uid:this.uid},void 0),this.actor.send("removeTile",{type:"vector",source:this.mvtProvider.name,uid:this.uid},void 0)),e$2e(this.buckets)){for(var e in this.buckets){this.buckets[e].destroy()}this.buckets=null}e$2e(this.imageAtlasTexture)&&(this.imageAtlasTexture.destroy(),this.imageAtlasTexture=null),e$2e(this.glyphAtlasTexture)&&(this.glyphAtlasTexture.destroy(),this.glyphAtlasTexture=null),this._MVTLabel.release()},r}(n$M),_0x4b68b7=(_0x6e9a07=!0,function(e,t){var i=_0x6e9a07?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6e9a07=!1,i}),_0x187e93=_0x4b68b7(void 0,(function(){return _0x187e93.toString().search("(((.+)+)+)+$").toString().constructor(_0x187e93).search("(((.+)+)+)+$")})),_0x6e9a07;function _0x29d1c7(){}_0x187e93();var _0x4c9f6d=20;function _0x41f8fb(e,t){return e.priority-t.priority}s$Z.supportsWebAssembly();var _0x1aac46=new o$1g({comparator:_0x41f8fb});function _0x1e9324(e){e$2e(e.priorityFunction)&&(e.priority=e.priorityFunction())}_0x1aac46.maximumLength=_0x4c9f6d,_0x1aac46.reserve(_0x4c9f6d);var _0x3f0d35={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5};function _0x7e60ae(e){return e.state===_0x3f0d35.UNISSUED&&(e.state=_0x3f0d35.ISSUED,e.deferred=o$1l.defer()),e.deferred.promise}function _0x4957fd(e){var t=_0x29d1c7.taskProcessorMap[e.processorName];if(!_0x29d1c7.taskProcessorReady)return!1;"S3MBTilesParser"===e.processorName&&t._activeTasks>=2&&_0x29d1c7.secTaskProcessorReady&&_0x29d1c7.useMultiWebWorker&&(t=_0x29d1c7.taskProcessorMap.S3MBTilesParserSec);var i=t.scheduleTask(e.data);return!!e$2e(i)&&(e.state=_0x3f0d35.ACTIVE,i.then((function(t){e.state!==_0x3f0d35.CANCELLED&&(e.state=_0x3f0d35.RECEIVED,e.deferred.resolve(t))})).otherwise((function(t){e.state!==_0x3f0d35.CANCELLED&&(e.state=_0x3f0d35.FAILED,e.deferred.reject(t))})),!0)}_0x29d1c7.cancelTask=function(e){e.state=_0x3f0d35.CANCELLED,e$2e(e.deferred)&&e.deferred.reject()},_0x29d1c7.startTask=function(e){_0x1e9324(e);var t=_0x1aac46.insert(e);if(e$2e(t)){if(t===e)return;_0x29d1c7.cancelTask(t)}return _0x7e60ae(e)},_0x29d1c7.processTasks=function(){for(var e=_0x1aac46.internalArray,t=_0x1aac46.length,i=0;i<t;++i)_0x1e9324(e[i]);_0x1aac46.resort();for(var n;_0x1aac46.length>0;)if((n=_0x1aac46.pop()).state!==_0x3f0d35.CANCELLED&&!_0x4957fd(n))return void _0x1aac46.insert(n)},_0x29d1c7.initWebAssembly=function(){if(_0x29d1c7.init=!0,0==s$Z.supportsWebAssembly())return _0x29d1c7.taskProcessorReady=!0,void(_0x29d1c7.CRNTaskProcessorReady=!0);_0x29d1c7.S3MBTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper_new.js",wasmBinaryFile:"ThirdParty/draco_decoder_new.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(e){_0x29d1c7.taskProcessorReady=e})),_0x29d1c7.S3MBTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(e){_0x29d1c7.taskProcessorReady=e})),_0x29d1c7.S3MBTaskProcessorSec.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper_new.js",wasmBinaryFile:"ThirdParty/draco_decoder_new.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(e){_0x29d1c7.secTaskProcessorReady=e})),_0x29d1c7.S3MBTaskProcessorSec.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(e){_0x29d1c7.secTaskProcessorReady=e})),_0x29d1c7.CRNProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){_0x29d1c7.CRNTaskProcessorReady=!0})),_0x29d1c7.unzipDataTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/crunch.js",wasmBinaryFile:"ThirdParty/crunch.wasm"}).then((function(){_0x29d1c7.CRNTaskProcessorReady=!0}))},_0x29d1c7.S3MTaskProcessor=new i$W("S3MTilesParser"),_0x29d1c7.S3MBTaskProcessor=new i$W("S3MBTilesParser"),_0x29d1c7.S3MBTaskProcessorSec=new i$W("S3MBTilesParser"),_0x29d1c7.indexTaskProcessor=new i$W("indexedDBWorker"),_0x29d1c7.CRNProcessor=new i$W("transcodeCRNToDXT",Number.POSITIVE_INFINITY),_0x29d1c7.unzipDataTaskProcessor=new i$W("UnZipData"),_0x29d1c7.taskProcessorReady=!1,_0x29d1c7.CRNTaskProcessorReady=!1,_0x29d1c7.init=!1,_0x29d1c7.taskProcessorMap={UnZipData:_0x29d1c7.unzipDataTaskProcessor,S3MBTilesParser:_0x29d1c7.S3MBTaskProcessor,S3MBTilesParserSec:_0x29d1c7.S3MBTaskProcessorSec},_0x29d1c7.useMultiWebWorker=!1;var _0x2386f0=(_0x47b58c=!0,function(e,t){var i=_0x47b58c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47b58c=!1,i}),_0x3c4c23=_0x2386f0(void 0,(function(){return _0x3c4c23.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c4c23).search("(((.+)+)+)+$")})),_0x47b58c;function _0x128750(){this._fileName=void 0,this._relativePath=void 0,this._orientedBoundingBox=void 0,this._boundingSphere=new i$1d,this._childrenPageLod=[],this._pagelodMap={},this._isLeafTile=!1,this._isRootTile=!1,this._hasLeafChild=!1,this._isEmptyTree=!0,this._s3mLoadState=N$Q.UNLOAD,this._attrLoadState=N$Q.UNLOAD,this._leafAttrLoadState=N$Q.UNLOAD,this._attrAppend=[],this._isParsed=!1,this._configLoadState=N$Q.UNLOAD,this._avgPix=0,this._disFromCamera=0,this._nLODLev=0,this._ready=!1,this._configReady=!1,this._isVisible=!0,this._owner=void 0,this.s3mBuffer=null,this.volBuffer=null,this.volImage=null,this._visibilityPlaneMask=0,this._texturesByteLength=0,this._replacementNode=null,this._volObj=null,this._volTexture=null,this._volTextures={},this.skeletonState=void 0,this.skeletonPackages=void 0,this.instancePackage=void 0,this._reloadVol=!1,this._oriBoundingSphere=null,this._isAncestorBlock=!1,this._isChildBlock=!1,this._blockKey=void 0,this._priority=1e3,this._rootBatchIdMap={},this._ancestorMap={},this._shouldSelect=!1,this._stackLength=0,this._needRefine=!0,this._selected=!1,this._readyAncestor=void 0,this._parent=void 0,this._depth=1,this._needRequest=!0,this._parentPagelod=void 0,this._leafChildren=[],this._centerZDepth=0,this._foveatedFactor=0,this._priority=0,this._hasConfig=!1,this._needLoad=!1,this._skipLevel=0,this._subdomainIndex=0,this._prepareLoad=!1,this._tmpMaterialArr=[],this.hasTranslate=!1,this.isFlatten=!1}function _0x7a4543(e,t,i){return Math.max(e$2d.normalize(e,t,i)-e$2d.EPSILON7,0)}function _0x3cdce1(e,t,i){var n=e*Math.pow(10,t);return parseInt(n)*Math.pow(10,i)}_0x3c4c23(),Object.defineProperties(_0x128750.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox||this._boundingSphere}}}),_0x128750.prototype.updatePriority=function(e){var t=e._minimumPriority,i=e._maximumPriority,n=4,r=_0x3cdce1(_0x7a4543(this._foveatedFactor,t.foveatedFactor,i.foveatedFactor),4,n);n=0;var o=_0x3cdce1(1-_0x7a4543(this._avgPix,t.pixel,i.pixel),4,n);n=8;var a=_0x3cdce1(_0x7a4543(this._disFromCamera,t.distance,i.distance),4,n);this._priority=r+o+a},_0x128750.prototype.memoryUsage=function(){for(var e=this._texturesByteLength,t=0;t<this._childrenPageLod.length;t++)for(var i=0;i<this._childrenPageLod[t]._renderEntityList.length;i++)e+=this._childrenPageLod[t]._renderEntityList[i]._geometryByteLength,e$2e(this._childrenPageLod[t]._entity)&&this._childrenPageLod[t]._entity._isChildBlock&&(e+=this._childrenPageLod[t]._entity.memoryUsage());return e},_0x128750.prototype.memoryUsageEx=function(e){e.texSize+=this._texturesByteLength;for(var t=0;t<this._childrenPageLod.length;t++)for(var i=0;i<this._childrenPageLod[t]._renderEntityList.length;i++)e.geoSize+=this._childrenPageLod[t]._renderEntityList[i]._geometryByteLength,e$2e(this._childrenPageLod[t]._entity)&&this._childrenPageLod[t]._entity._isChildBlock&&this._childrenPageLod[t]._entity.memoryUsageEx(e);return e.geoSize+e.texSize},Object.defineProperties(_0x128750.prototype,{attrLoadState:{get:function(){return this._attrLoadState},set:function(e){this._attrLoadState=e}},leafAttrLoadState:{get:function(){return this._leafAttrLoadState},set:function(e){this._leafAttrLoadState=e}}}),_0x128750.prototype.setEmptyTreeFlag=function(e){for(var t=[this];t.length;){var i=t.pop();i._isEmptyTree=e;for(var n=0,r=i._childrenPageLod.length;n<r;n++){var o=i._childrenPageLod[n];e$2e(o._entity)&&o._entity._isEmptyTree&&t.push(o._entity)}}},_0x128750.prototype.traverse=function(e){for(var t=0,i=this._childrenPageLod.length;t<i;t++){var n=this._childrenPageLod[t];e(n),n._entity&&(n._entity._s3mLoadState===N$Q.LOADING||n._entity._s3mLoadState===N$Q.LOADVOL?n._entity._s3mLoadState=N$Q.LOST:n._entity.traverse(e))}},_0x128750.prototype.transformResource=function(e,t,i){var n=e.context,r=!0;let o=!1;for(var a=0,s=this._childrenPageLod.length;a<s;a++){for(var l=!0,u=0,c=(d=this._childrenPageLod[a])._renderEntityList.length;u<c;u++){var h=d._renderEntityList[u];if(n.memorySize>i)return o=!0,o;if(!h.renderable){r=!1,l=!1;try{h.transformResource(e,t)}catch(e){console.log(e)}}}d._ready=l}for(a=0,s=this._leafChildren.length;a<s;a++){var d;for(l=!0,u=0,c=(d=this._leafChildren[a])._renderEntityList.length;u<c;u++){h=d._renderEntityList[u];if(n.memorySize>i)return o=!0,o;if(!h.renderable){r=!1,l=!1;try{h.transformResource(e,t)}catch(e){console.log(e)}}}d._ready=l}return r&&(this._ready=!0,this._s3mLoadState=N$Q.TRANSFORMED),o},_0x128750.prototype.freeResource=function(e){for(var t=0,i=this._childrenPageLod.length;t<i;t++){this._childrenPageLod[t].freeResource(e)}for(t=0,i=this._leafChildren.length;t<i;t++){this._leafChildren[t].freeResource(e)}this._leafChildren.length=0,this._ready=!1,this._s3mLoadState=N$Q.UNLOAD,this._replacementNode=void 0},_0x128750.prototype.isDestroyed=function(){return!1},_0x128750.prototype.destroy=function(e,t){for(var i=0,n=this._childrenPageLod.length;i<n;i++)this._childrenPageLod[i]=this._childrenPageLod[i]&&!this._childrenPageLod[i].isDestroyed()&&this._childrenPageLod[i].destroy(e,t);for(var r in this._childrenPageLod.length=0,this._ready=!1,this._s3mLoadState=N$Q.UNLOAD,this._avgPix=0,this._disFromCamera=0,this.s3mBuffer=null,this.volBuffer=null,this.volImage=null,this._replacementNode=null,this.skeletonState=void 0,this.skeletonPackage=void 0,this.instancePackage=void 0,e$2e(this._volObj)&&Se$e.DestroyTexture(this._volObj.id),this._volObj=null,e$2e(this._volTexture)&&this._volTexture.destroy(),this._volTexture=null,this._volTextures)if(this._volTextures.hasOwnProperty(r)){var o=this._volTextures[r];e$2e(o)&&o.destroy()}this._volTextures={},this.request=void 0,e$2e(this.task)&&_0x29d1c7.cancelTask(this.task),this.task=void 0;for(i=0,n=this._tmpMaterialArr.length;i<n;i++){var a=this._tmpMaterialArr[i];a.isDestroyed()||a.destroy()}},_0x128750.prototype.isImageryLoaded=function(e){if(!e$2e(e._imageryLayer))return!0;for(var t=!0,i=this._childrenPageLod.length,n=0;n<i;n++)for(var r=this._childrenPageLod[n]._renderEntityList,o=r.length,a=0;a<o;a++){var s=r[a]._imagerys;if(e$2e(s))for(var l=s.length,u=0;u<l;u++)s[u]instanceof _0x2415f5?s[u].state===wt$7.RENDERED||s[u].state===wt$7.READY||s[u].state===wt$7.FAILED||(t=!1):s[u].state<wt$7.TEXTURE_LOADED&&(t=!1)}return t},_0x128750.prototype.extendRadius=function(e){e*=1.5,e$2e(this._oriBoundingSphere)||(this._oriBoundingSphere=this._boundingSphere.clone()),this._boundingSphere.radius=this._oriBoundingSphere.radius+e;for(var t=0,i=this._childrenPageLod.length;t<i;t++){var n=this._childrenPageLod[t];n._boundingSphere.radius=this._oriBoundingSphere.radius+e;for(var r=0;r<n._renderEntityList.length;r++){var o=n._renderEntityList[r];o._boundingVolume.radius=this._oriBoundingSphere.radius+e,e$2e(o._colorCommand)&&(o._colorCommand._boundingVolume.radius=this._oriBoundingSphere.radius+e)}}},_0x128750.prototype.loadImagery=function(e,t){if(e$2e(e._imageryLayer)){for(var i=0,n=this._childrenPageLod.length,r=0;r<n;r++)for(var o=this._childrenPageLod[r]._renderEntityList,a=o.length,s=0;s<a;s++)if(!o[s]._imageRasterFinish){var l=o[s]._imagerys;if(e$2e(l))for(var u=l.length,c=0;c<u;c++)l[c].state<wt$7.TEXTURE_LOADED&&(l[c].processStateMachine(t,!1),i+=1)}return i}};var _0x3e466d=(_0x43a26e=!0,function(e,t){var i=_0x43a26e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43a26e=!1,i}),_0x55e22a=_0x3e466d(void 0,(function(){return _0x55e22a.toString().search("(((.+)+)+)+$").toString().constructor(_0x55e22a).search("(((.+)+)+)+$")})),_0x43a26e;_0x55e22a();var _0x336f72={DISTANCE_FROM_EYE_POINT:0,PIXEL_SIZE_ON_SCREEN:1,GEOMETRY_ERROR:2},_0x219958=Object.freeze(_0x336f72),_0x155c91=(_0x278f61=!0,function(e,t){var i=_0x278f61?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x278f61=!1,i}),_0x2d1862=_0x155c91(void 0,(function(){return _0x2d1862.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d1862).search("(((.+)+)+)+$")})),_0x278f61;_0x2d1862();var _0xe20b57={Root_Priority:0,Child_Priority:1,UsePagedLodInfo:2,Child_Priority_NonLinear:3},_0x539352=Object.freeze(_0xe20b57),_0x1b3603=(_0x534085=!0,function(e,t){var i=_0x534085?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x534085=!1,i}),_0x2a5b14=_0x1b3603(void 0,(function(){return _0x2a5b14.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a5b14).search("(((.+)+)+)+$")})),_0x534085;function _0x4d13e0(){this._orientedBoundingBox=void 0,this._boundingSphere=void 0,this._rangeList=0,this._rangeDataList=void 0,this._isLeafNode=!1,this._isLessLodDis=!0,this._entity=null,this._renderEntityList=[],this._ready=!1,this._pix=0,this._rangeMode=_0x219958.DISTANCE_FROM_EYE_POINT,this._processFileType=0,this._renderEntityVisible=[],this._fileType=p$T.OSGBFile,this._shouldSelect=!1,this._selectionDepth=0,this._stackLength=0,this._finalResolution=!0,this._isVisible=!0,this._centerZDepth=0,this._needRefine=!0}function _0x122ec7(e,t,i,n){var r=t.uniformState.resolutionScale,o=i._boundingSphere,a=o.radius,s=o.center,l=t.drawingBufferHeight,u=e$2e(i._orientedBoundingBox)?Math.sqrt(i._orientedBoundingBox.distanceSquaredTo(e.positionWC)):Math.max(o$1p.distance(e.positionWC,s)-a,1e-5),c=i._rangeList*l/(u*e.frustum.sseDenominator);if(c/=r,e$2e(n)&&(n===_0x539352.Child_Priority_NonLinear||n===_0x539352.UsePagedLodInfo)){var h=i._fileType===p$T.OSGBFile?800:300,d=Math.max(a,h);if(e$2e(i._orientedBoundingBox)&&(s=i._orientedBoundingBox.center),(u=o$1p.distance(e.positionWC,s))>d){var f=2*d/u;f<1&&(c*=f)}}return c}function pixelsPerMeter(e,t){var i=e.uniformState.resolutionScale,n=e.drawingBufferHeight/(2*Math.tan(.5*e$2d.PI_OVER_FOUR))/t;return n/=i}function _0x39256e(e,t,i,n,r){var o=0,a=i._boundingSphere,s=a.radius,l=a.center,u=o$1p.distance(e.positionWC,l);if(u=Math.max(1e-5,u),e._mode===C$14.SCENE2D&&(u=e.positionCartographic.height),o=pixelsPerMeter(t,u)*s,e$2e(n)&&(n==_0x539352.Child_Priority_NonLinear||n===_0x539352.UsePagedLodInfo)){var c=Math.max(a.radius,r);u>c&&(o*=c/u)}return Math.ceil(o)}_0x2a5b14(),_0x4d13e0.prototype.calcPixFromCam=function(e,t,i,n,r){if(this._boundingSphere){var o=e.positionWC,a=o$1p.clone(this._boundingSphere.center),s=o$1p.distance(a,o);e._mode==C$14.SCENE2D&&(s=e.positionCartographic.height),this._disFromCamera=s-this._boundingSphere.radius;var l=0;if(i/=ti$4.getQuality(),this._rangeMode==_0x219958.DISTANCE_FROM_EYE_POINT)l=s-this._boundingSphere.radius,this._isLessLodDis=l>this._rangeList*i,l=-l;else if(this._rangeMode===_0x219958.GEOMETRY_ERROR)l=_0x122ec7(e,t,this,r),this._isLessLodDis=l<=16*i;else l=2*_0x39256e(e,t,this,r,this._fileType===p$T.OSGBFile?800:300),this._isLessLodDis=l<=this._rangeList*i;this._pix=l,this._entity&&(this._entity._avgPix=l,this._entity._disFromCamera=this._disFromCamera,this._entity._isRootTile||(this._entity._disFromCamera*=n))}},_0x4d13e0.prototype.calcImageryScaleLevel=function(e,t,i,n,r){if(this._boundingSphere){var o=e.positionWC,a=o$1p.clone(this._boundingSphere.center),s=o$1p.distance(a,o);e._mode==C$14.SCENE2D&&(s=e.positionCartographic.height),this._disFromCamera=s-this._boundingSphere.radius;var l=0;return i/=ti$4.getQuality(),r==_0x219958.DISTANCE_FROM_EYE_POINT?(l=s-this._boundingSphere.radius,this._isLessLodDis=l>this._rangeList*i,l=-l,this._pix=l,Math.sqrt(this._rangeList*i/l)):r===_0x219958.GEOMETRY_ERROR?(this._rangeList=16*this._boundingSphere.radius/256,l=_0x122ec7(e,t,this,n),this._isLessLodDis=l<=16*i,this._pix=l,Math.sqrt(l/(16*i))):(l=2*_0x39256e(e,t,this,n,this._fileType===p$T.OSGBFile?800:300),this._isLessLodDis=l<=this._rangeList*i,this._pix=l,Math.sqrt(l/(this._rangeList*i)))}},_0x4d13e0.prototype.freeResource=function(e){for(var t=0,i=this._renderEntityList.length;t<i;t++){this._renderEntityList[t].destroy(!0)}this._renderEntityList.length=0,this._ready=!1},_0x4d13e0.prototype.isDestroyed=function(){return!1},_0x4d13e0.prototype.destroy=function(e,t){for(var i=0,n=this._renderEntityList.length;i<n;i++)e$2e(e)&&this._renderEntityList[i].refreshRaster(e),this._renderEntityList[i]=this._renderEntityList[i]&&!this._renderEntityList[i].isDestroyed()&&this._renderEntityList[i].destroy();return this._renderEntityList.length=0,e$2e(this._entity)&&(t||this._entity._isChildBlock)&&this._entity.destroy(e,t),this._entity=void 0,i$11(this)};var _0x300f0f=(_0xf5f8d7=!0,function(e,t){var i=_0xf5f8d7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf5f8d7=!1,i}),_0x5b97cb=_0x300f0f(void 0,(function(){return _0x5b97cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b97cb).search("(((.+)+)+)+$")})),_0xf5f8d7;_0x5b97cb();var _0x2787b1=function(){this.context=void 0,this.model=void 0,this.index=void 0};_0x2787b1.prototype.set=function(e,t,i){this.context=e,this.model=t,this.index=i},_0x2787b1.prototype.execute=function(){var e=this.context,t=this.model._layer,i=this.index,n=this.model._vertexPackage,r=n.vertexAttributes[i];if(!e$2e(r))throw new t$15("attribute is not exit");if(-1!==n.instanceIndex&&!e$2e(this.model._instanceBuffer)){if(!e$2e(n.instanceBuffer))throw new t$15("instance buffer is null");this.model._instanceBuffer=t$X.createVertexBuffer({context:e,typedArray:n.instanceBuffer,usage:A$18.STATIC_DRAW}),this.model._geometryByteLength+=this.model._instanceBuffer.sizeInBytes,ti$4._memGeometryAdded(this.model._instanceBuffer.sizeInBytes)}1!==r.instanceDivisor||e$2e(r.typedArray)?e$2e(r.vertexBuffer)||(e$2e(r.vertexBuffer)||(r.vertexBuffer=t$X.createVertexBuffer({context:e,typedArray:r.typedArray,usage:A$18.STATIC_DRAW})),t._totalMemoryUsageInBytes+=r.vertexBuffer.sizeInBytes,this.model._geometryByteLength+=r.vertexBuffer.sizeInBytes,ti$4._memGeometryAdded(r.vertexBuffer.sizeInBytes),r.typedArray=null,delete r.typedArray):r.vertexBuffer=this.model._instanceBuffer};var _0x46a054=(_0x42968f=!0,function(e,t){var i=_0x42968f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42968f=!1,i}),_0xdb0c82=_0x46a054(void 0,(function(){return _0xdb0c82.toString().search("(((.+)+)+)+$").toString().constructor(_0xdb0c82).search("(((.+)+)+)+$")})),_0x42968f;_0xdb0c82();var _0x5659c7=function(){this.model=void 0,this.context=void 0,this.index=0};_0x5659c7.prototype.set=function(e,t,i,n){this.model=t,this.context=e,this.index=i,this.verticesCount=n},_0x5659c7.prototype.execute=function(){var e=this.context,t=this.model._layer,i=this.model._arrIndexPackage[this.index];if(!e$2e(i))throw new t$15("index package is null");if(!e$2e(i.indexBuffer)){if(!e$2e(i.indicesTypedArray))throw new t$15("index buffer is null");var n=ce$z.UNSIGNED_SHORT;(1===i.indexType||this.verticesCount>=e$2d.SIXTY_FOUR_KILOBYTES)&&this.context.elementIndexUint&&(n=ce$z.UNSIGNED_INT),e$2e(i.indexBuffer)||(i.indexBuffer=t$X.createIndexBuffer({context:e,typedArray:i.indicesTypedArray,usage:A$18.STATIC_DRAW,indexDatatype:n}),t._totalMemoryUsageInBytes+=i.indexBuffer.sizeInBytes,this.model._geometryByteLength+=i.indexBuffer.sizeInBytes,ti$4._memGeometryAdded(i.indexBuffer.sizeInBytes)),i.indicesTypedArray=null,delete i.indicesTypedArray}};var _0x5d8fc7=(_0x3afe78=!0,function(e,t){var i=_0x3afe78?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3afe78=!1,i}),_0x37e381=_0x5d8fc7(void 0,(function(){return _0x37e381.toString().search("(((.+)+)+)+$").toString().constructor(_0x37e381).search("(((.+)+)+)+$")})),_0x3afe78;function _0x1451be(){this.textures={},this.textureRefCounts={},this._context=void 0}_0x37e381(),_0x1451be.createTexture=function(e){var t=e.imageUrl,i=u$Z(e.wrapS,q$1a.REPEAT),n=u$Z(e.wrapT,q$1a.REPEAT),r=u$Z(e.minificationFilter,tt$i.LINEAR),o=u$Z(e.magnificationFilter,rt$k.LINEAR),a=u$Z(e.pixelFormat,V$12.RGBA),s=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE);if(e$2e(t)){var l=t;_0xff1c43.textureRefCounts[l]?_0xff1c43.textureRefCounts[l]++:(_0xff1c43.textureRefCounts[l]=1,o$1l(t$S(t),(function(e){var t=new e$1S({wrapS:i,wrapT:n,minificationFilter:r,magnificationFilter:o}),u=new t$U({context:_0xff1c43._context,source:e,pixelFormat:a,pixelDatatype:s,sampler:t});u.generateMipmap(),_0xff1c43.textures[l]=u})))}},_0x1451be.getTexture=function(e){if(e$2e(e))return _0xff1c43.textures[e]},_0x1451be.removeTexture=function(e){e$2e(e)&&(e$2e(_0xff1c43.textureRefCounts[e])&&(_0xff1c43.textureRefCounts[e]--,0===_0xff1c43.textureRefCounts[e])&&(_0xff1c43.textures[e].destroy(),delete _0xff1c43.textures[e],delete _0xff1c43.textureRefCounts[e]))},_0x1451be.update=function(e){_0xff1c43._context=e};var _0xff1c43=new _0x1451be,_0xc1c7c8=(_0x3ccfb1=!0,function(e,t){var i=_0x3ccfb1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ccfb1=!1,i}),_0x31211f=_0xc1c7c8(void 0,(function(){return _0x31211f.toString().search("(((.+)+)+)+$").toString().constructor(_0x31211f).search("(((.+)+)+)+$")})),_0x3ccfb1;_0x31211f();var _0x1165e8={NONE:0,SELECTION:1,ALL:2},_0x325616=Object.freeze(_0x1165e8),_0x30e7e9=(_0x438dc4=!0,function(e,t){var i=_0x438dc4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x438dc4=!1,i}),_0x45940c=_0x30e7e9(void 0,(function(){return _0x45940c.toString().search("(((.+)+)+)+$").toString().constructor(_0x45940c).search("(((.+)+)+)+$")})),_0x438dc4;function _0x2c7aca(){}_0x45940c();var _0x3f12d4=[];_0x2c7aca.createUniformMapsForCompressAttributes=function(e,t){var i=e._vertexPackage,n=i.nCompressOptions;(n&_0x64fca6.SVC_Vertex)==_0x64fca6.SVC_Vertex&&(t.decode_position_min=function(){return i.minVerticesValue},t.decode_position_normConstant=function(){return i.vertCompressConstant}),(n&_0x64fca6.SVC_Normal)==_0x64fca6.SVC_Normal&&(t.normal_rangeConstant=function(){return i.normalRangeConstant}),(n&_0x64fca6.SVC_TexutreCoord)==_0x64fca6.SVC_TexutreCoord&&(i.texCoordCompressConstant.length>0&&(t.decode_texCoord0_min=function(){return i.minTexCoordValue[0]},t.decode_texCoord0_normConstant=function(){return i.texCoordCompressConstant[0]},t.decode_texCoord0_vNormConstant=function(){return i.texCoordCompressConstant[0]}),i.texCoordCompressConstant.length>1&&(t.decode_texCoord1_min=function(){return i.minTexCoordValue[1]},t.decode_texCoord1_normConstant=function(){return i.texCoordCompressConstant[1]},t.decode_texCoord1_vNormConstant=function(){return i.texCoordCompressConstant[1]}),i.texCoordCompressConstant.length>2&&(t.decode_texCoord2_min=function(){return i.minTexCoordValue[2]},t.decode_texCoord2_normConstant=function(){return i.texCoordCompressConstant[2]}),i.texCoordCompressConstant.length>3&&(t.decode_texCoord3_min=function(){return i.minTexCoordValue[3]},t.decode_texCoord3_normConstant=function(){return i.texCoordCompressConstant[3]}),i.texCoordCompressConstant.length>4&&(t.decode_texCoord4_min=function(){return i.minTexCoordValue[4]},t.decode_texCoord4_normConstant=function(){return i.texCoordCompressConstant[4]}),i.texCoordCompressConstant.length>5&&(t.decode_texCoord5_min=function(){return i.minTexCoordValue[5]},t.decode_texCoord5_normConstant=function(){return i.texCoordCompressConstant[5]}),i.texCoordCompressConstant.length>6&&(t.decode_texCoord6_min=function(){return i.minTexCoordValue[6]},t.decode_texCoord6_normConstant=function(){return i.texCoordCompressConstant[6]}),i.texCoordCompressConstant.length>7&&(t.decode_texCoord7_min=function(){return i.minTexCoordValue[7]},t.decode_texCoord7_normConstant=function(){return i.texCoordCompressConstant[7]}))};let _0x3f6919=0,_0x1e5e48=0;_0x2c7aca.createWaterUniform=function(e,t,i){if(e$2e(e.waterEffectSet)&&e.multiTemporalUseWater){var n=e._frameState._framebufferList.water;i.uReflectMap=function(){return n.renderTexture._fb.getColorTexture(0)},i.uUseRefectMap=function(){return n&&n.isUpdate?1:0},i.uNoiseMap=function(){return n._waterNormalMap},i.uTimeVal=function(){return _0x1e5e48!=e._frameState.frameNumber&&(_0x3f6919+=1/60,_0x1e5e48=e._frameState.frameNumber),_0x3f6919},i.uBumpSpeed=function(){return e.waterParameter.bumpSpeed},i.uWaterColour=function(){return e.waterParameter.waterColour},i.uWaterBrightness=function(){return e.waterParameter.waterBrightness},i.uSunColor=function(){return e._frameState.lightSource.sunLightColor}}};var _0x59e131=new o$1o,_0x54bcd5=new o$1o;const _0xf41b78=new e$2c;_0x2c7aca.createCommonLayerUniform=function(e,t){if(t.uSelColor=function(){return e.selectedColor},t.uTranslationAndBottom=function(){return _0xf41b78.x=e.selectedTranslate.x,_0xf41b78.y=e.selectedTranslate.y,_0xf41b78.z=e.selectedTranslate.z,_0xf41b78.w=e.style3D.bottomAltitude,e.selectedTranslate},t.uFillForeColor=function(){return e.style3D.fillForeColor},t.uPolygonOffset=function(){var t=e._rsColor.polygonOffset;return e$2e(t)?(_0x54bcd5.x=t.factor,_0x54bcd5.y=t.units):(_0x54bcd5.x=0,_0x54bcd5.y=0),_0x54bcd5},t.u_polygonOffset=function(){var t=0,i=0,n=e._rsColor.polygonOffset;return e$2e(n)?(t=n.factor,i=n.units):(t=0,i=0),{x:t,y:i}},t.uPointSize=function(){return e.style3D.pointSize},t.uMinMaxTransparent=function(){return _0x59e131.x=e.minTransparentAlpha,_0x59e131.y=e.maxTransparentAlpha,_0x59e131},t.uTransparentFilter=function(){return e.selectionFiltrateByTransparency},e.hasHyp){t.uHypHasAnalysisRegion=function(){return e._bUseHypRegion},t.uMixColorType=function(){return e$2e(e._mixColorType)?e._mixColorType:0},t.uDataFloor=function(){return e._fMinValue===e._fMaxValue?0:e._fMinValue},t.uDataCeil=function(){return e._fMinValue===e._fMaxValue?1:e._fMaxValue},t.uEmissionTexAtlas=function(){return e$2e(e._hypsometricSetting._emissionTextureAtlas)?e._hypsometricSetting._emissionTextureAtlas.texture:e._context.defaultTexture},t.uEmissionTexAtlasRects=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting._getEmissionAtlasTextureRects():_0x3f12d4},t.uEmissionTexAtlasTilingAndOffset=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting._getEmissionTexAtlasTilingAndOffset():_0x3f12d4},t.uHypsometricTexture=function(){return e._hypsometricTexture},t.uHypsometricRenderTexture=function(){return e._hypsometricRenderTexture},t.uHypOpacity=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.Opacity:1},t.uHypContourInterval=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.LineInterval:100};var i=new e$2c;t.uHypLineColor=function(){return e$2e(e._hypsometricSetting)?(i.x=e._hypsometricSetting.LineColor.red,i.y=e._hypsometricSetting.LineColor.green,i.z=e._hypsometricSetting.LineColor.blue,i.w=e._hypsometricSetting.LineColor.alpha,i):e$2c.ZERO},t.uHypContourFillMode=function(){var t=1;if(e$2e(e._hypsometricSetting))switch(e._hypsometricSetting.DisplayMode){case k$S.DisplayMode.NONE:t=0;break;case k$S.DisplayMode.FACE:t=1;break;case k$S.DisplayMode.LINE:t=2;break;case k$S.DisplayMode.FACE_AND_LINE:t=3}return t},t.uHypFloor=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMinKey:0},t.uHypCeil=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMaxKey:0},t.uHypMaxVisibleValue=function(){return(e$2e(e._hypsometricSetting)?e._hypsometricSetting.MaxVisibleValue:0)+e$2d.EPSILON5},t.uHypMinVisibleValue=function(){return(e$2e(e._hypsometricSetting)?e._hypsometricSetting.MinVisibleValue:0)-e$2d.EPSILON5},t.uHypRect=function(){return e._hypsometricBound},t.uNoValueColor=function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.noValueColor:e$1X.WHITE},t.uHypsometricVisible=function(){return ro._isLeaf&&ro._isHypsometricVisible||e._hypsometricSetting._visibleDistanceMax===Number.MAX_VALUE&&0===e._hypsometricSetting._visibleDistanceMin&&e._hypsometricSetting._maxVisibleAltitude===Number.MAX_VALUE&&0===e._hypsometricSetting._minVisibleAltitude?1:0}}if(e._hasOverlay&&(t.uOverlayRect=function(){return e._overlayBounds},t.uOverlayTexture=function(){return e._overlayTexture}),e.hasWVisible&&(t.uMaxCategory=function(){return e._hypMaxCategory},t.uMinCategory=function(){return e._hypMinCategory},t.uCategoryWidht=function(){return e._categorieTexture&&e._categorieTexture.width||256},t.uCategoryHeight=function(){return e._categorieTexture&&e._categorieTexture.height||1},t.uCategorieTexture=function(){return e._categorieTexture}),e.hasSketch&&(t.uLineColor=function(){return e.style3D.lineColor},t.uLineWidth=function(){return e.style3D.lineWidth},t.uFillStyle=function(){return e.style3D.fillStyle},t.uNormalDepthTexture=function(){return e._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0)}),e.hasAdjustColor&&(t.uBrightness=function(){return e._brightness},t.uContrast=function(){return e._contrast},t.uHue=function(){return e._hue},t.uSaturation=function(){return e._saturation},t.uOneOverGamma=function(){return 1/e._gamma}),e.hasTransparentBackColor&&(t.uTransparentBackColor=function(){return e._transparentBackColor},t.uTransparentBackColorTolerance=function(){return e._transparentBackColorTolerance}),e.hasExcavation&&(t.uExcavationTexture=function(){return e._excavationTexture},t.uExcavationMode=function(){return e._excavationMode},t.uExcavationRect=function(){return e._excavationBounds},t.uServerExcavationMode=function(){return e._serverExcavationMode},t.uServerExcavationRect=function(){return e._serverExcavationBounds},t.uServerExcavationTexture=function(){return e._excavationTexture}),e.hasClip&&(t.clip_mode=function(){return e._clipMode},t.clip_planes=function(){return e._clipPlane},t.clip_line_color=function(){return e._clipLineColor}),e.hasSplit){t.uSplitDirection=function(){return e.splitDirection},t.uSplitPosition=function(){return e.splitPosition};var n=new e$2c;t.uSwipeRegion=function(){return n.x=e._swipeRegion.x*e._frameState.context.drawingBufferWidth,n.y=(1-e._swipeRegion.y)*e._frameState.context.drawingBufferHeight,n.z=e._swipeRegion.z*e._frameState.context.drawingBufferWidth,n.w=(1-e._swipeRegion.w)*e._frameState.context.drawingBufferHeight,n}}if(e.hasPolylineEffect&&isPolylineEffect&&(t.uEffectLineWidth=function(){return e$2e(e._effect)?e._effect._lineWidth:e.style3D.lineWidth},t.uColor=function(){return e$2e(e._effect)?e._effect._color:e.style3D.lineColor},t.uType=function(){return e$2e(e._effect)?e._effect._type:0},t.uOutlineColor=function(){return e$2e(e._effect)?e._effect._outlineColor:e.style3D.lineColor},t.uOutlineWidth=function(){return e$2e(e._effect)?e._effect._outlineWidth:0},t.uGapColor=function(){return e$2e(e._effect)?e._effect._gapColor:e.style3D.lineColor},t.uDashLength=function(){return e$2e(e._effect)?e._effect._dashLength:0},t.uDashPattern=function(){if(e$2e(e._effect)){if(e._effect._isMove){e._effect._frame>159&&(e._effect._frame=0);var t=Math.floor(e._effect._frame/10),i=e._effect._dashPattern<<t,n=e._effect._dashPattern>>16-t;return e._effect._frame++,i+n}return e._effect._dashPattern}return 0},t.uGlowPower=function(){return e$2e(e._effect)?e._effect._glowPower:0},t.uIsArrow=function(){return!!e$2e(e._effect)&&e._effect._isArrow}),e.hasRegionEffect&&isRegionEffect&&(t.uRotationAngle=function(){return e._effect._rotationAngle},t.uType=function(){return e._effect._type},t.uForeColor=function(){return e._effect._foreColor},t.uBackColor=function(){return e._effect._backColor},t.uLineWidthX=function(){return e._effect._lineWidthX},t.uLineWidthY=function(){return e._effect._lineWidthY},t.uRepeatX=function(){return e._effect._repeatX},t.uRepeatY=function(){return e._effect._repeatY},t.uOffsetX=function(){return e._effect._offsetX},t.uOffsetY=function(){return e._effect._offsetY}),e.hasFusion){var r={x:0,y:0};t.uPanOffset=function(){return e$2e(e._context.curFusionViewMatrix)?(e$2e(e.panOffset)&&(r.x=e.panOffset.x/e._context.drawingBufferWidth,r.y=e.panOffset.y/e._context.drawingBufferHeight),r):(r.x=0,r.y=0,r)},t.uModelView=function(){return e$2e(e._context.curFusionViewMatrix)?p$1d.multiply(e._context.curFusionViewMatrix,ro._matModel,_0x428705):p$1d.multiply(e._context.uniformState.view3D,ro._matModel,_0x428705)}}e.hasHorizontalLine&&(t.uHorizontalLine=function(){return e$2e(e._fHorizontalLine)?e._fHorizontalLine:0},t.uHorizontalColor=function(){return e$2e(e$2e(e._HorizontalColor))?e._HorizontalColor:new e$2c(1,1,0,0)}),e.hasFlood&&(t.uFloodFlagTexture=function(){if(e$2e(e._floodFlagTexture))return e._floodFlagTexture},t.uFloodRect=function(){if(e$2e(e._floodRect))return e._floodRect},t.uFloodMatrixInvert=function(){var t=new p$1d;return p$1d.multiply(e._matFloodInvertMatrix,ro._matModel,t),t})},_0x2c7aca.createMaterialUniform=function(e,t,i,n){const r=t._flag,o=1&r,a=r>>1&1,s=r>>2&1;if(n.uDiffuseColor=function(){return i._diffuseColor},n.uAmbientColor=function(){return i._ambientColor},a){n.uTexture=function(){var n;return e$2e(t._symbolTextureUrl)?e$2e(n=_0x1451be.getTexture(t._symbolTextureUrl))?n:e._context.defaultTexture:e$2e(i._textures[0])?(n=i._textures[0]).isTexBlock?n.renderable&&n.ready?n:e$2e(i._ancestorTexture)?i._ancestorTexture:n:n:e._context.defaultTexture},n.uTexMatrix=function(){return i._texMatrix},n.uTexture0Width=function(){return e$2e(i._textures[0])?i._textures[0]._width:1},n.uTexture1Width=function(){return e$2e(i._textures[1])?i._textures[1]._width:1};var l=new e$2c;n.uTexUVOffset=function(){l.x=0,l.y=0,l.z=1,l.w=1;var t=i._baseColorTextureMotion;if(e$2e(t)){var n=t.OffsetPeriod,r=t.OffsetSpeedU,o=t.OffsetSpeedV,a=t.TilingPeriod,s=t.TilingSpeedU,u=t.TilingSpeedV,c=performance.now()/1e3;if(n>0){var h=c%n;l.x=h*r,l.y=h*o}if(a>0){var d=c%a;l.z=1+d*s,l.w=1+d*u}}else if(0!==e._textureUVSpeed.x||0!==e._textureUVSpeed.y){var f=performance.now()/1e3;l.x=e._textureUVSpeed.x*f,l.y=e._textureUVSpeed.y*f}return l}}if(s&&(n.uSecTexture=function(){var t=i._textures[1];return t.isTexBlock?t.renderable&&t.ready?t:e$2e(i._ancestorTextureBake)?i._ancestorTextureBake:e._context.defaultTexture:t}),o){n.uBaseColorTextureIndex=function(){return i._baseColorTextureIndex>-1?i._baseColorTextureIndex:e._PBRMaterialParams.pbrMetallicRoughness.baseColorTextureIndex},n.uBaseColorFactor=function(){return i._baseColor||e._PBRMaterialParams.pbrMetallicRoughness.baseColor},n.uMetallicFactor=function(){return i._metallicFactor||e._PBRMaterialParams.pbrMetallicRoughness.metallicFactor},n.uRoughnessFactor=function(){return u$Z(i._roughnessFactor,e._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor)},n.uEmissiveFactor=function(){return i._emissiveFactor||e._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},n.uEmissionTexture=function(){if(e$2e(i.emissiveTexture))return i.emissiveTexture;var t=i._emissiveTextureIndex;return t>-1&&e$2e(i._textures[t])?i._textures[t]:e._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},n.uMetallicRoughnessTexture=function(){return e$2e(i._metallicRoughnessTextureIndex)&&i._metallicRoughnessTextureIndex>-1?e$2e(i.metallicRoughnessTexture)?i.metallicRoughnessTexture:i._textures[i._metallicRoughnessTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},n.uNormalTexture=function(){return e$2e(i._normalTextureIndex)&&i._normalTextureIndex>-1?i.normalTexture?i.normalTexture:i._textures[i._normalTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.normalTexture},n.uNormalTextureScale=function(){return e$2e(i._normalTextureScale)?i._normalTextureScale:e._PBRMaterialParams.pbrMetallicRoughness.normalTextureScale},n.uOcclusionTexture=function(){return e$2e(i._occlusionTextureIndex)&&i._occlusionTextureIndex>-1?i.occlusionTexture?i.occlusionTexture:e$2e(i._textures[i._occlusionTextureIndex])?i._textures[i._occlusionTextureIndex]:e._context.defaultTexture:e._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},n.uIndexOfRefraction=function(){return e$2e(i._indexOfRefraction)&&i._indexOfRefraction>0?i._indexOfRefraction:e._PBRMaterialParams.pbrMetallicRoughness.indexOfRefraction},n.uTransmissionFactor=function(){return e$2e(i._transmissionFactor)&&i._transmissionFactor>0?i._transmissionFactor:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.volume)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.volume.transmissionFactor)?e._PBRMaterialParams.pbrMetallicRoughness.volume.transmissionFactor:1},n.uThickness=function(){return e$2e(i._volume)?i._volume._thickness:e._PBRMaterialParams.pbrMetallicRoughness.volume.thickness},n.uSnowCoverageFactor=function(){return e$2e(i.snowEffect)&&i.snowEffect._snow_coverage>0?i.snowEffect._snow_coverage:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.snowEffect)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage)&&e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage>0?e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage:.5},n.uSnowMaskTexture=function(){return e$2e(i.snowEffect)&&e$2e(i.snowEffect._snowMaskTexture)?i.snowEffect._snowMaskTexture:e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture},n.uSnowNormalTexture=function(){return e$2e(i.snowEffect)&&e$2e(i.snowEffect._snowNormalTexture)?i.snowEffect._snowNormalTexture:e._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture},n.uIntensityScale=function(){return e$2e(i._intensityScale)&&i.rainEffect._intensityScale>0?i._intensityScale:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&e._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0?e._PBRMaterialParams.pbrMetallicRoughness.intensityScale:1},n.uAnimationSpeed=function(){return e$2e(i.rainEffect)&&e$2e(i.rainEffect._animationSpeed)?i.rainEffect._animationSpeed:e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.animationSpeed},n.uRippleTexture=function(){return e$2e(i.rainEffect)&&e$2e(i.rainEffect._rippleTexture)?i.rainEffect._rippleTexture:e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture},n.uWetnessFactor=function(){return e$2e(i.rainEffect)&&i.rainEffect._wetnessFactor>0?i.rainEffect._wetnessFactor:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor:0},n.uRippleScale=function(){return e$2e(i.rainEffect)&&i.rainEffect._ripple_scale>0?i.rainEffect._ripple_scale:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.ripple_scale:5},n.uWindIntensity=function(){return e$2e(i.rainEffect)&&i.rainEffect._wind_intensity>0?i.rainEffect._wind_intensity:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity:0},n.uRain=function(){return e$2e(i.rainEffect)&&i.rainEffect._rain>0?i.rainEffect._rain:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rain:200},n.uCameraDepth=function(){return e$2e(i.rainEffect)&&i.rainEffect._cameraDepth>0?i.rainEffect._cameraDepth:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2e(e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth)&&e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth>0?e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.cameraDepth:.8},n.uTintColor=function(){return e$2e(i._volume)?i._volume._tintColor:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.volume)?e._PBRMaterialParams.pbrMetallicRoughness.volume.tintColor:e$1X.WHITE},n.uDiffusionDistance=function(){return e$2e(i._volume)?i._volume._diffusionDistance:e$2e(e._PBRMaterialParams.pbrMetallicRoughness.volume)?e._PBRMaterialParams.pbrMetallicRoughness.volume.diffusionDistance:e$1X.WHITE},n.uClearcoatFactor=function(){return e$2e(i._clearcoat)?i._clearcoat._clearcoatFactor:e._PBRMaterialParams.pbrMetallicRoughness.clearcoat.clearcoatFactor},n.uClearcoatRoughnessFactor=function(){return e$2e(i._clearcoat)?i._clearcoat._clearcoatRoughnessFactor:e._PBRMaterialParams.pbrMetallicRoughness.clearcoat.clearcoatRoughnessFactor},n.uAnisotropy=function(){return e$2e(i._anisotropy)?i._anisotropy:e._PBRMaterialParams.pbrMetallicRoughness.anisotropy},n.uBaseTexture=function(){return e$2e(i._baseColorTextureIndex)&&i._baseColorTextureIndex>-1?i.baseColorTexture:e._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture};var u=i._emissiveTextureMotion||e._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion,c=new e$2c;if(n.uEmissiveUVOffsetAndTiling=function(){var e=performance.now()/1e3,t=u.OffsetPeriod,i=u.OffsetSpeedU,n=u.OffsetSpeedV,r=u.TilingPeriod,o=u.TilingSpeedU,a=u.TilingSpeedV;if(u&&t>0){var s=e%t;c.x=s*i,c.y=s*n}else c.x=0,c.y=0;if(u&&r>0){var l=e%u._tilingPeriod;c.z=1+l*o,c.w=1+l*a}else c.z=1,c.w=1;return c},i._usePBRTextureBatch){var h=new o$1o;n.uPBRTexture=function(){return i.pbrParamTexture},n.uPBRTexWH=function(){var e=i.pbrParamTexture;return h.x=e._width,h.y=e._height,h}}n.uAlphaCutoff=function(){return i._alphaCutoff}}return n},_0x2c7aca.createMeshUniform=function(e,t){e$2e(e._batchTable);return t.uModelMatrix=function(){return e._relativeModelMatrix},t.uGeoMatrix=function(){return e._geoMatrix},t};var _0x428705=new p$1d;_0x2c7aca.create=function(e,t,i,n){var r=t._fileType;r===p$T.PolylineEffect||r===p$T.ClampGroundRealtimeRasterCache&&e$2e(i._attributeLocations.aTexCoord1),p$T.RegionEffect,r===p$T.ClampGroundRealtimeRasterCache&&e$2e(i._attributeLocations.aTexCoord1),p$T.PointCloudFile;var o=i._material;if(n.uTexture=function(){var e;return e$2e(i._symbolTextureUrl)?e$2e(e=_0x1451be.getTexture(i._symbolTextureUrl))?e:t._context.defaultTexture:e$2e(o._textures[0])?(e=o._textures[0]).isTexBlock?e.renderable&&e.ready?e:e$2e(o._ancestorTexture)?o._ancestorTexture:e:e:t._context.defaultTexture},n.uSecTexture=function(){var e=o._textures[1];return e.isTexBlock?e.renderable&&e.ready?e:e$2e(o._ancestorTextureBake)?o._ancestorTextureBake:t._context.defaultTexture:e},t.isSilhouette&&(n.uNormalDepthTexture=function(){return t._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0)}),t._bUseHypColorTable&&(n.uHypsometricTexture=function(){return t._hypsometricTexture},n.uHypsometricRenderTexture=function(){return t._hypsometricRenderTexture}),t._flattening&&(n.uFlattenTexture=function(){return e.multiViewportIndex>-1?1<<e.multiViewportIndex&t._flattenVisibleViewport?t._flattenTexture:t._context.defaultTexture:t._flattenTexture}),t._hasExcavation&&(n.uExcavationTexture=function(){return t._excavationTexture}),t._hasServerExcavation&&(n.uServerExcavationTexture=function(){return t._excavationTexture}),e$2e(t._categorieTexture)&&(n.uCategorieTexture=function(){return t._categorieTexture}),(o._usePBR||t._usePBR)&&(n.uBaseTexture=function(){return e$2e(o._baseColorTextureIndex)&&o._baseColorTextureIndex>-1?o.baseColorTexture:t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture},n.uNormalTexture=function(){return e$2e(o._normalTextureIndex)&&o._normalTextureIndex>-1?o.normalTexture?o.normalTexture:o._textures[o._normalTextureIndex]:t._PBRMaterialParams.pbrMetallicRoughness.normalTexture},n.uEmissionTexture=function(){if(e$2e(o.emissiveTexture))return o.emissiveTexture;var e=o._emissiveTextureIndex;return e>-1&&e$2e(o._textures[e])?o._textures[e]:t._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},n.uMetallicRoughnessTexture=function(){return e$2e(o._metallicRoughnessTextureIndex)&&o._metallicRoughnessTextureIndex>-1?e$2e(o.metallicRoughnessTexture)?o.metallicRoughnessTexture:o._textures[o._metallicRoughnessTextureIndex]:t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},n.uOcclusionTexture=function(){return e$2e(o._occlusionTextureIndex)&&o._occlusionTextureIndex>-1?o.occlusionTexture?o.occlusionTexture:e$2e(o._textures[o._occlusionTextureIndex])?o._textures[o._occlusionTextureIndex]:t._context.defaultTexture:t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},o._usePBRTextureBatch&&(n.uPBRTexture=function(){return o.pbrParamTexture})),(e$2e(i._volTexture)||e$2e(i._volObj))&&(n.uVolumeTexture=function(){return"png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt?i._volTexture:i._volObj.volTexture}),e$2e(t._imageryLayer)&&e$2e(i._attributeLocations.img)&&(n.uImgTexture=function(){return e$2e(i._rasterImageTexture)?i._rasterImageTexture:t._context.defaultTransparentTexture}),e$2e(t.waterEffectSet)||t.multiTemporalUseWater){var a=t._frameState._framebufferList.water;n.uReflectMap=function(){return a.renderTexture._fb.getColorTexture(0)},n.uNoiseMap=function(){return a._waterNormalMap}}t._hasOverlay&&(n.uOverlayTexture=function(){return t._overlayTexture}),t._hasEmissiveTexAtlas&&(n.uEmissionTexAtlas=function(){return e$2e(t._hypsometricSetting._emissionTextureAtlas)?t._hypsometricSetting._emissionTextureAtlas.texture:t._context.defaultTexture}),t._hasSnowEffect&&(n.uSnowMaskTexture=function(){return t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture},n.uSnowNormalTexture=function(){return t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture}),t._hasRainEffect&&(n.uRippleTexture=function(){return t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture}),e$2e(i._batchTable)&&(n=i._batchTable.getUniformMapCallback()(n)),e$2e(o._batchTable)&&(o._batchTable.update(e),n=o._batchTable.getUniformMapCallback()(n)),e$2e(o._batchTableBake)&&(o._batchTableBake.update(e),n=o._batchTableBake.getUniformMapCallback()(n)),e$2e(i._dayTextures)&&i._dayTextures.length>0&&(n.uMapTexture=function(){if(e$2e(o._textures[0])){var e=o._textures[0],i=o._mapTextures[e.id];return e$2e(i)?i:e}return t._context.defaultTexture},n.uImgTexture=function(){return e$2e(i._rasterImageTexture)?i._rasterImageTexture:t._context.defaultTransparentTexture},n.uImgTextureAlpha=function(){return e$2e(t._imageryLayer)?t._imageryLayer instanceof Array?t._imageryLayer[t._imageryLayer.length-1].alpha:t._imageryLayer.show&&i._showImagerysImmediate?t._imageryLayer.alpha:0:1},n.uImgTextureBound=function(){return i._imageryTextureBound},n.u_dayTextures=function(){return i._dayTextures},n.u_dayTextureUseWebMercatorT=function(){return i._dayTextureUseWebMercatorT},n.u_dayTextureTexCoordsRectangle=function(){return i._dayTextureTexCoordsRectangle},n.u_dayTextureTranslationAndScale=function(){return i._dayTextureTranslationAndScale},n.u_transparentBackColor=function(){return i._transparentBackColor},n.u_imageryClipEnable=function(){return i._imageryClipEnable},n.u_dayTextureFlipY=function(){return i._dayTextureFlipY},n.u_dayTextureAlpha=function(){return i._dayTextureAlpha},n.u_dayTextureSize=function(){return i._dayTextureTranslationAndScale}),i._uniformMap=n};var _0x75e2f4=(_0x51f818=!0,function(e,t){var i=_0x51f818?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51f818=!1,i}),_0x432002=_0x75e2f4(void 0,(function(){return _0x432002.toString().search("(((.+)+)+)+$").toString().constructor(_0x432002).search("(((.+)+)+)+$")})),_0x51f818;_0x432002();var _0x53b856="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MeshUboDecl>\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\n#ifdef DepthEXT\nvarying float vWindowZ;\n#endif\n#include <clip>\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n #ifdef DepthEXT\n\t gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n #endif\n#endif\n#ifdef WEBGL2\n #ifdef DepthEXT\n\t gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n #endif\n#endif\n\tif(vColor.a < uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIP\n gl_FragColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n gl_FragColor = vSecondColor;\n}\n",_0x2fe254=(_0x9b9ab=!0,function(e,t){var i=_0x9b9ab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x9b9ab=!1,i}),_0x19bf0b=_0x2fe254(void 0,(function(){return _0x19bf0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x19bf0b).search("(((.+)+)+)+$")})),_0x9b9ab;_0x19bf0b();var _0x4f0656="\n#include <LayerUboDecl>\nvarying vec4 vSecondColor; \nvarying vec4 vColor;\nvoid main() \n{\n\tif(vColor.a < uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n gl_FragColor = vSecondColor; \n}",_0x3e027d=(_0x2863a4=!0,function(e,t){var i=_0x2863a4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2863a4=!1,i}),_0x2332d6=_0x3e027d(void 0,(function(){return _0x2332d6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2332d6).search("(((.+)+)+)+$")})),_0x2863a4;_0x2332d6();var _0xcc5af2="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\nvarying vSecondColor : vec4<f32>; \nvarying vColor : vec4<f32>;\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n\tif(vColor.a < Layer.uTransparentFilter)\n\t{\n\t\tdiscard;\n\t}\n gl_FragColor = vSecondColor; \n}",_0x2261f0=(_0x2951bf=!0,function(e,t){var i=_0x2951bf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2951bf=!1,i}),_0x11d924=_0x2261f0(void 0,(function(){return _0x11d924.toString().search("(((.+)+)+)+$").toString().constructor(_0x11d924).search("(((.+)+)+)+$")})),_0x2951bf;_0x11d924();var _0x115b1e="\nprecision highp float;\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MeshUboDecl>\n#include <vertexLogDepthDecl>\n// Inputs\nattribute vec3 aPosition0;\nattribute vec3 aPosition1;\nattribute float batchId;\n// attribute float aVariantOffset;\nattribute float aVariantStroke;\nattribute float aVariantExtension;\n\n#ifdef SILHOUETTE\nattribute vec3 aNormalA;\nattribute vec3 aNormalB;\n#else /* SILHOUETTE */\nattribute vec3 aNormal;\n#endif /* SILHOUETTE */\n\nattribute vec2 aSideness;\n//attribute vec2 aPackedAttributes;\n\nstruct UnpackedAttributes\n{\n vec2 sideness;\n vec2 sidenessNorm;\n float lineWidthPixels;\n float extensionLengthPixels;\n#if (MODE == 2)\n float edgeType;\n#endif\n};\n\n// Output required to compute color\nvarying vec4 vColor;\n// Output required to compute distance to line/caps\nvarying vec3 vPosition; \nvarying vec3 vViewPosition;\nvarying float vRadius;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\n\nvarying vec2 vStrokeUV;\n\nconst vec2 uDepthBias = vec2(0.5, -4e-4);\n\n// Utility function to check for NaN values\nbool isNaN(float val)\n{\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n // important: some nVidias failed to cope with version below.\n // Probably wrong optimization.\n /*return ( val <= 0.0 || 0.0 <= val ) ? false : true;*/\n}\n\nvec2 calculateProjectedBiasXY(vec4 projPos, vec3 worldNormal)\n{\n float offsetXY = uDepthBias.x;\n float offsetZ = uDepthBias.y;\n vec4 projNormal = czm_projection * czm_view * vec4(worldNormal, 0.0);\n return offsetXY * projPos.w * 2.0 / czm_viewport.zw * normalize(projNormal.xyz).xy;\n}\n\n// A z-offset, using a depth based heuristic.\nfloat calculateProjectedBiasZ(vec4 projPos)\n{\n float fProjZ = projPos.z / projPos.w;\n if(fProjZ < 0.1)\n {\n return 0.0;\n }\n float offsetZ = uDepthBias.y;\n return sqrt(projPos.z) * offsetZ;\n}\n\nvec4 adjustProjectedPosition(vec4 projPos, vec3 worldNormal, float lineWidth)\n{\n vec2 offsetXY = calculateProjectedBiasXY(projPos, worldNormal);\n // we currently have to do this check because some geometries come with 0 length edge normals.\n if (!isNaN(offsetXY.x) && !isNaN(offsetXY.y))\n {\n projPos.xy += offsetXY;\n }\n#ifdef LOG_DEPTH\n vDistanceFromEye = projPos.w;\n#else\n projPos.z += calculateProjectedBiasZ(projPos);\n#endif\n return projPos;\n}\n\n#if (MODE == 0)\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{}\n#elif (MODE == 1)\nfloat strokeVariants = 6.0;\nvoid calculateStyleOutputsSketch(float lineLength, UnpackedAttributes unpackedAttributes) {\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n float lineIndex = clamp(ceil(log2(lineLength)), 0.0, uStrokesLog2Resolution);\n vStrokeUV = vec2(exp2(lineIndex) * sidenessNorm.y, lineIndex * strokeVariants + aVariantStroke + 0.5) * uStrokesTextureScale;\n}\nvoid calculateStyleOutputs(UnpackedAttributes unpackedAttributes)\n{\n calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);\n}\n#elif (MODE == 2)\nvarying float vType;\nvoid calculateStyleOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec4 projPos, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vType = unpackedAttributes.edgeType;\n if (unpackedAttributes.edgeType <= 0.0)\n {\n calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);\n }\n}\n#endif\n\n\n// Solid\n#if (MODE == 2 || MODE == 0)\nfloat calculateLineAmplitudeSolid()\n{\n return 0.0;\n}\n#endif\n#if (MODE == 0)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSolid();\n}\n#endif\n// Sketch\n#if (MODE == 2 || MODE == 1)\nfloat calculateLineAmplitudeSketch()\n{\n float strokesAmplitude = 6.0;\n return strokesAmplitude;\n}\n#endif\n#if (MODE == 1)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n return calculateLineAmplitudeSketch();\n}\n#endif\n// Uber\n#if (MODE == 2)\nfloat calculateLineAmplitude(UnpackedAttributes unpackedAttributes)\n{\n float edgeType = unpackedAttributes.edgeType;\n if (edgeType <= 0.0)\n {\n return calculateLineAmplitudeSketch();\n }\n else\n {\n return calculateLineAmplitudeSolid();\n }\n}\n#endif\n\n\nfloat distanceBasedPerspectiveFactor(float distance)\n{\n return clamp(sqrt(uDistanceFalloffFactor / distance), 0.0, 1.0);\n}\n\n#define COMPONENT_COLOR_FIELD_OFFSET 0.0\n#define COMPONENT_OTHER_FIELDS_OFFSET 1.0\n#define COMPONENT_FIELD_COUNT 2.0\n#define LINE_WIDTH_FRACTION_FACTOR 8.0\n#define EXTENSION_LENGTH_OFFSET 128.0\n#define COMPONENT_TEX_WIDTH 4096.0\n\nstruct ComponentData\n{\n float lineWidth;\n float extensionLength;\n float edgeType;\n};\n\n\nComponentData readComponentData()\n{\n return ComponentData(uLineWidth, 0.0, 0.0);\n}\n\nvec3 modelToWorldNormal(vec3 normal)\n{\n return (czm_model * vec4(normal, 0.0)).xyz;\n}\n\nvec3 silhouetteWorldNormal(vec3 normalA, vec3 normalB)\n{\n return modelToWorldNormal(normalize(normalA + normalB));\n}\n\n// Fall-off extension length for shorter strokes, starting from strokes that are 256 size,\n// fall-off exponentially\nfloat calculateExtensionLength(float extensionLength, float lineLength)\n{\n return extensionLength / (log2(max(1.0, 256.0 / lineLength)) * 0.2 + 1.0);\n}\n\n#ifdef SILHOUETTE\n// #uniforms: czm_view, czm_model\nbool isSilhouetteEdge(vec4 viewPos, vec3 normalA, vec3 normalB)\n{\n// transform the two face normals\n vec3 viewNormalA = (czm_modelView * vec4(normalA, 0.0)).xyz;\n vec3 viewNormalB = (czm_modelView * vec4(normalB, 0.0)).xyz;\n// compute the direction from the edge to the camera\n vec3 viewDir = -viewPos.xyz;\n// check which of the two faces are visible\n// display the edge if exactly one of the two is visible\n float faceAVisible = dot(viewDir, viewNormalA);\n// positive if visible\n float faceBVisible = dot(viewDir, viewNormalB);\n// positive if visible\n// 1 if exactly one face visible, 0 otherwise\n return faceAVisible * faceBVisible < 0.0;\n}\n#endif /* SILHOUETTE */\n\nvoid clipLineSegmentToNearPlane(vec3 p0,vec3 p1,out bool clipped,out bool culledByNearPlane,out vec4 clippedPositionEC)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = czm_currentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -czm_currentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n}\n\nvec4 calculateGeometricOutputs(vec4 viewPosV0, vec4 viewPosV1, vec4 worldPosV0, vec4 worldPosV1, vec3 worldNormal, UnpackedAttributes unpackedAttributes)\n{\n vec2 sideness = unpackedAttributes.sideness;\n vec2 sidenessNorm = unpackedAttributes.sidenessNorm;\n vec4 clippedViewPosV0; bool clippedV0,culledV0; clipLineSegmentToNearPlane(viewPosV0.xyz, viewPosV1.xyz, clippedV0, culledV0, clippedViewPosV0); vec4 clippedViewPosV1; bool clippedV1, culledV1; clipLineSegmentToNearPlane(viewPosV1.xyz, viewPosV0.xyz, clippedV1, culledV1, clippedViewPosV1); vec4 viewPos = mix(clippedViewPosV0, clippedViewPosV1, sidenessNorm.y);\n vViewPosition = viewPos.xyz / viewPos.w;\n vec4 projPosV0 = czm_projection * clippedViewPosV0;\n vec4 projPosV1 = czm_projection * clippedViewPosV1;\n vec4 projPos = czm_projection * viewPos;\n vec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);\n vec2 uNDCToPixel = vec2(czm_viewport.z / 2.0, czm_viewport.w / 2.0);\n vec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * uNDCToPixel;\n float lineLengthPixels = length(screenSpaceLinePixels);\n float dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;\n vec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;\n vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;\n float falloffFactor = distanceBasedPerspectiveFactor(-viewPos.z) * uPixelRatio;\n float lineWidthPixels = unpackedAttributes.lineWidthPixels * falloffFactor;\n float extensionLengthPixels = calculateExtensionLength(unpackedAttributes.extensionLengthPixels, lineLengthPixels) * falloffFactor;\n float lineAmplitudePixels = calculateLineAmplitude(unpackedAttributes) * uPixelRatio;\n vSizeFalloffFactor = falloffFactor;\n float lineWidthAndAmplitudePixels = lineWidthPixels + lineAmplitudePixels + lineAmplitudePixels;\n float extendedLineLengthPixels = lineLengthPixels + extensionLengthPixels + extensionLengthPixels;\n#ifdef ANTIALIASING\n const float aaPaddingPixels = 1.0;\n // Line size with padding\n float halfAAPaddedLineWidthAndAmplitudePixels = lineWidthAndAmplitudePixels * 0.5 + aaPaddingPixels;\n float aaPaddedRoundedCapSizePixels = lineWidthPixels * 0.5 + aaPaddingPixels;\n // Line length with padding\n float aaPaddedLineLengthPixels = extendedLineLengthPixels + aaPaddingPixels + aaPaddingPixels;\n float halfAAPaddedLineLengthPixels = aaPaddedLineLengthPixels * 0.5;\n#else /* ANTIALIASING */\n // Even if there is no AA, we still want to do proper <1px rendering,\n // so we effectively clamp the pixel sizes to minimum of 1px and compute\n // coverage in the fragment shader \n float halfAAPaddedLineWidthAndAmplitudePixels = max(lineWidthAndAmplitudePixels, 1.0) * 0.5;\n float aaPaddedRoundedCapSizePixels = max(lineWidthPixels, 1.0) * 0.5;\n float halfAAPaddedLineLengthPixels = max(extendedLineLengthPixels, 1.0) * 0.5;\n#endif /* ANTIALIASING */\n // Half line width in NDC including padding for anti aliasing\n vec2 uPixelToNDC = vec2(2.0 / czm_viewport.z, 2.0 / czm_viewport.w);\n vec2 halfAAPaddedLineWidthAndAmplitudeNDC = halfAAPaddedLineWidthAndAmplitudePixels * uPixelToNDC;\n vec2 aaPaddedRoundedCapSizeNDC = aaPaddedRoundedCapSizePixels * uPixelToNDC;\n vec2 extensionLengthNDC = extensionLengthPixels * uPixelToNDC;\n // Compute screen space position of vertex, offsetting for line size and end caps\n vec2 ndcOffset = (screenSpaceDirection * sideness.y * (aaPaddedRoundedCapSizeNDC + extensionLengthNDC) + perpendicularScreenSpaceDirection * halfAAPaddedLineWidthAndAmplitudeNDC);\n projPos.xy += ndcOffset * projPos.w;\n projPos.z += (dzPerPixel * (aaPaddedRoundedCapSizePixels + extensionLengthPixels)) * sideness.y * projPos.w;\n projPos = adjustProjectedPosition(projPos, worldNormal, 1.0 + max((lineWidthAndAmplitudePixels - 1.0) * 0.5, 0.0));\n // Line length with end caps\n float aaPaddedLineWithCapsLengthPixels = extendedLineLengthPixels + aaPaddedRoundedCapSizePixels + aaPaddedRoundedCapSizePixels;\n float pixelPositionAlongLine = aaPaddedLineWithCapsLengthPixels * sidenessNorm.y - aaPaddedRoundedCapSizePixels;\n // Position in pixels with origin at first vertex of line segment\n // The line width radius in pixels\n vRadius = lineWidthPixels * 0.5;\n vLineLengthPixels = extendedLineLengthPixels;\n vPosition = czm_writeNonPerspective(vec3(halfAAPaddedLineWidthAndAmplitudePixels * sideness.x, pixelPositionAlongLine, pixelPositionAlongLine / extendedLineLengthPixels), projPos.w);\n#ifdef SILHOUETTE\n gl_Position = isSilhouetteEdge(viewPosV0, aNormalA, aNormalB) ? projPos : vec4(10.0, 10.0, 10.0, 1.0);\n#else /* SILHOUETTE */\n gl_Position = projPos;\n#endif /* SILHOUETTE */\n\n#if (MODE == 2)\n if (unpackedAttributes.edgeType <= 0.0 && lineLengthPixels <= 3.0)\n {\n gl_Position = vec4(10.0, 10.0, 10.0, 1.0);\n }\n#elif (MODE == 1)\n if (lineLengthPixels <= 3.0)\n {\n gl_Position = vec4(10.0, 10.0, 10.0, 1.0); \n }\n#endif\n return projPos;\n}\n\n\n#if (MODE == 2)\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float fType = component.edgeType;\n float extensionLengthPixels = component.extensionLength;\n float lineWidth = component.lineWidth;\n if (fType <= 0.0)\n {\n extensionLengthPixels *= aVariantExtension * 2.0 - 1.0;\n }\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels, fType);\n}\n#else /* (MODE == 2) */\nUnpackedAttributes unpackAttributes(ComponentData component)\n{\n vec2 sidenessNorm = aSideness;\n vec2 sideness = sidenessNorm * 2.0 - 1.0;\n float extensionLengthPixels = component.extensionLength;\n#if (MODE == 1)\n // extensionLengthPixels = 0.05 * aVariantExtension * 2.0 - 1.0;\n extensionLengthPixels = 5.0;\n#endif\n float lineWidth = component.lineWidth;\n return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels);\n}\n#endif /* (MODE == 2) */\n\nvarying vec2 fSelected;\n#ifdef BatchTable\nuniform sampler2D batchTexture; \nvec2 computeSt(float batchId)\n{\n float stepX = batchTextureStep.x;\n float centerX = batchTextureStep.y;\n float numberOfAttributes = float(5);\n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);\n}\nvec4 czm_batchTable_operation(float batchId)\n{\n vec2 st = computeSt(batchId);\n st.x += batchTextureStep.x * float(1);\n vec4 textureValue = texture2D(batchTexture, st);\n vec4 value = textureValue;\n return value;\n}\nvec3 czm_batchTable_translate(float batchId) \n{\n vec2 st = computeSt(batchId); \n st.x += batchTextureStep.x * float(3); \n vec4 textureValue = texture2D(batchTexture, st); \n vec3 value = textureValue.xyz; \n return value; \n} \n#endif\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\nvoid s3mBatchOperation(vec4 operationType, inout vec4 vertexColor, inout vec4 vertexPos_0, inout vec4 vertexPos_1, vec3 translation, inout float fSelected)\n{\n operationType.x += 0.001;\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n fSelected = 1.0;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fSelected = 1.0;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n float isOffset = fract(floor(right_8)* 0.5);\n if(isOffset > 0.1)\n {\n vertexPos_0.xyz += translation;\n vertexPos_1.xyz += translation;\n }\n}\nvoid main()\n{\n fSelected = vec2(0.0);\n ComponentData component = readComponentData();\n UnpackedAttributes unpackedAttributes = unpackAttributes(component);\n vec4 vertexPos0 = vec4(aPosition0, 1.0);\n vec4 vertexPos1 = vec4(aPosition1, 1.0);\n vec3 translate = uTranslationAndBottom.xyz;\n#ifdef BatchTable\n #ifdef Translation\n translate = czm_batchTable_translate(batchId);\n #endif\n vColor = uLineColor;\n vec4 operationType = czm_batchTable_operation(batchId);\n s3mBatchOperation(operationType, vColor, vertexPos0, vertexPos1, translate, fSelected.x);\n#endif\n vec4 worldPosV0 = czm_model * vertexPos0;\n vec4 worldPosV1 = czm_model * vertexPos1;\n vec4 viewPosV0 = czm_modelView * vertexPos0;\n vec4 viewPosV1 = czm_modelView * vertexPos1;\n#ifdef SILHOUETTE\n vec3 worldNormal = silhouetteWorldNormal(aNormalA, aNormalB);\n#else /* SILHOUETTE */\n vec3 worldNormal = modelToWorldNormal(aNormal);\n#endif /* SILHOUETTE */\n // General geometric computation for all types of edges\n vec4 projPos = calculateGeometricOutputs(viewPosV0, viewPosV1, worldPosV0, worldPosV1, worldNormal, unpackedAttributes);\n calculateStyleOutputs(unpackedAttributes);\n#ifdef EXCAVATION\n vec3 vertexPos = mix(aPosition0.xyz, aPosition1.xyz, aSideness.y);\n vExcavationVertexPos = uGeoMatrix * vec4(vertexPos.xyz, 1.0);\n#endif\n vertexLogDepth();\n}\n",_0x39cceb=(_0x1a183c=!0,function(e,t){var i=_0x1a183c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a183c=!1,i}),_0x2a774b=_0x39cceb(void 0,(function(){return _0x2a774b.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a774b).search("(((.+)+)+)+$")})),_0x1a183c;_0x2a774b();var _0x59e865="\nprecision highp float;\n\n#include <SceneUboDecl>\n#include <LayerUboDecl>\nvarying vec4 vColor;\nvarying float vRadius;\nvarying vec3 vPosition;\nvarying vec3 vViewPosition;\nvarying float vLineLengthPixels;\nvarying float vSizeFalloffFactor;\nvarying float vDistanceFromEye;\nvarying vec2 vStrokeUV;\nuniform sampler2D uStrokesTexture;\nvarying vec2 fSelected;\n#include <calculatePolyTexCoord>\n#include <executeExcavation>\n#include <splitClip>\n#include <clip>\n#include <writeLogDepthDecl>\n\n// At which coverage threshold we discard a fragment completely\n#define COVERAGE_TEST_THRESHOLD 0.01\nconst float nearRange = 1000.0;\nconst float farRange = 20000.0;\n\n// Sketch\n#if (MODE == 1)\nconst vec4 RGBA_2_FLOAT_FACTORS = vec4(\n 255.0 / (256.0),\n 255.0 / (256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\n return dot(rgba, RGBA_2_FLOAT_FACTORS);\n}\nfloat calculateLineOffsetSketch()\n{\n float strokesNormalizationScale = 16.0;\n float offsetNorm = rgba2float(texture2D(uStrokesTexture, vStrokeUV));\n return (offsetNorm - 0.5) * strokesNormalizationScale;\n}\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSketch();\n}\nfloat calculateLinePressureSketch() {\n return rgba2float(texture2D(uStrokesTexture, vStrokeUV + vec2(0.0, 0.5)));\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSketch();\n}\n#endif\n\n// Solid\n#if (MODE == 2 || MODE == 0)\nfloat calculateLineOffsetSolid()\n{\n return 0.0;\n}\nfloat calculateLinePressureSolid()\n{\n return 1.0;\n}\n#endif\n\n#if (MODE == 0)\nfloat calculateLineOffset()\n{\n return calculateLineOffsetSolid();\n}\nfloat calculateLinePressure()\n{\n return calculateLinePressureSolid();\n}\n#endif\n\n// Uber\n#if (MODE == 2)\nvarying float vType;\nfloat calculateLineOffset()\n{\n if (vType <= 0.0)\n {\n return calculateLineOffsetSketch();\n }\n else\n {\n return calculateLineOffsetSolid();\n }\n}\n\nfloat calculateLinePressure()\n{\n if (vType <= 0.0)\n {\n return calculateLinePressureSketch();\n }\n else\n {\n return calculateLinePressureSolid();\n }\n}\n#endif\n\nvec2 lineWithCapsDistance(float radius, vec2 position, float lineLength)\n{\n float lineOffset = calculateLineOffset();\n float positionX = position.x - lineOffset;\n if (radius < 1.0)\n {\n float coverageX = clamp(min(radius, positionX + 0.5) - max(-radius, positionX - 0.5), 0.0, 1.0);\n float coverageY = clamp(min(lineLength, position.y + 0.5) - max(0.0, position.y - 0.5), 0.0, 1.0);\n float coverage = min(coverageX, coverageY);\n return vec2(0.5 - coverage, 0.0);\n }\n else\n {\n // Between -radius -> 0 for start cap, 0 for line, 0 -> radius\n float positionOnCap = position.y - clamp(position.y, 0.0, lineLength);\n vec2 lineToPosition = vec2(positionX, positionOnCap);\n return vec2(length(lineToPosition) - radius, positionOnCap / radius);\n }\n}\n\nvoid main()\n{\n#ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n#ifdef EXCAVATION\n if(executeExcavation())\n {\n discard;\n }\n#endif\n vec3 realPosition = czm_readNonPerspective(vPosition, 1.0 / vDistanceFromEye);\n float radius = vRadius * calculateLinePressure();\n vec2 distance = lineWithCapsDistance(radius, realPosition.xy, vLineLengthPixels);\n float coverage = clamp(0.5 - distance.x, 0.0, 1.0);\n#ifdef ANTIALIASING\n const float coverageLimit = COVERAGE_TEST_THRESHOLD;\n#else\n /* ANTIALIASING */\n // Use subpixel coverage computation when lines get subpixel widths\n // so we still render them appropriately. Otherwise discard anything\n // that is not fully within the line\n float coverageLimit = radius <= 0.5 ? COVERAGE_TEST_THRESHOLD : 0.75;\n#endif /* ANTIALIASING */\n if (coverage < coverageLimit || vColor.a < 0.1)\n {\n discard;\n }\n#ifdef WIREFRAME_SELECT_TYPE\n if(fSelected.x < 0.1)\n {\n discard;\n }\n#endif\n float alpha = vColor.a * coverage;\n gl_FragColor = vec4(vColor.rgb, alpha);\n#ifdef CLIP\n gl_FragColor *= clip(vec4(vViewPosition, 1.0), 1.0);\n#endif\n float attenuation = 1.0 - smoothstep(nearRange, farRange, vDistanceFromEye);\n gl_FragColor.a *= attenuation;\n#ifdef LOG_DEPTH\n writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",tmp$1={};tmp$1=function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,(function(e){var i=t[a][1][e];return r(i||e)}),c,c.exports,e,t,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])}}return e},i.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,i,n,r){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+n),r);else for(var o=0;o<n;o++)e[r+o]=t[i+o]},flattenChunks:function(e){var t,i,n,r,o,a;for(n=0,t=0,i=e.length;t<i;t++)n+=e[t].length;for(a=new Uint8Array(n),r=0,t=0,i=e.length;t<i;t++)o=e[t],a.set(o,r),r+=o.length;return a}},o={arraySet:function(e,t,i,n,r){for(var o=0;o<n;o++)e[r+o]=t[i+o]},flattenChunks:function(e){return[].concat.apply([],e)}};i.setTyped=function(e){e?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,r)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,o))},i.setTyped(n)},{}],2:[function(e,t,i){var n=e("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var i="",a=0;a<t;a++)i+=String.fromCharCode(e[a]);return i}a[254]=a[254]=1,i.string2buf=function(e){var t,i,r,o,a,s=e.length,l=0;for(o=0;o<s;o++)55296==(64512&(i=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(r-56320),o++),l+=i<128?1:i<2048?2:i<65536?3:4;for(t=new n.Buf8(l),a=0,o=0;a<l;o++)55296==(64512&(i=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(i=65536+(i-55296<<10)+(r-56320),o++),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t},i.buf2binstring=function(e){return l(e,e.length)},i.binstring2buf=function(e){for(var t=new n.Buf8(e.length),i=0,r=t.length;i<r;i++)t[i]=e.charCodeAt(i);return t},i.buf2string=function(e,t){var i,n,r,o,s=t||e.length,u=new Array(2*s);for(n=0,i=0;i<s;)if((r=e[i++])<128)u[n++]=r;else if((o=a[r])>4)u[n++]=65533,i+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&i<s;)r=r<<6|63&e[i++],o--;o>1?u[n++]=65533:r<65536?u[n++]=r:(r-=65536,u[n++]=55296|r>>10&1023,u[n++]=56320|1023&r)}return l(u,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+a[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){function n(e,t,i,n){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==i;){i-=a=i>2e3?2e3:i;do{o=o+(r=r+t[n++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}t.exports=n},{}],4:[function(e,t,i){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,i){function n(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}var r=n();function o(e,t,i,n){var o=r,a=n+i;e^=-1;for(var s=n;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}t.exports=o},{}],6:[function(e,t,i){function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=n},{}],7:[function(e,t,i){var n=30,r=12;t.exports=function(e,t){var i,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S,w,E,P;i=e.state,o=e.next_in,E=e.input,a=o+(e.avail_in-5),s=e.next_out,P=e.output,l=s-(t-e.avail_out),u=s+(e.avail_out-257),c=i.dmax,h=i.wsize,d=i.whave,f=i.wnext,p=i.window,_=i.hold,m=i.bits,g=i.lencode,x=i.distcode,y=(1<<i.lenbits)-1,v=(1<<i.distbits)-1;e:do{m<15&&(_+=E[o++]<<m,m+=8,_+=E[o++]<<m,m+=8),$=g[_&y];t:for(;;){if(_>>>=b=$>>>24,m-=b,0==(b=$>>>16&255))P[s++]=65535&$;else{if(!(16&b)){if(0==(64&b)){$=g[(65535&$)+(_&(1<<b)-1)];continue t}if(32&b){i.mode=r;break e}e.msg="invalid literal/length code",i.mode=n;break e}T=65535&$,(b&=15)&&(m<b&&(_+=E[o++]<<m,m+=8),T+=_&(1<<b)-1,_>>>=b,m-=b),m<15&&(_+=E[o++]<<m,m+=8,_+=E[o++]<<m,m+=8),$=x[_&v];i:for(;;){if(_>>>=b=$>>>24,m-=b,!(16&(b=$>>>16&255))){if(0==(64&b)){$=x[(65535&$)+(_&(1<<b)-1)];continue i}e.msg="invalid distance code",i.mode=n;break e}if(C=65535&$,m<(b&=15)&&(_+=E[o++]<<m,(m+=8)<b&&(_+=E[o++]<<m,m+=8)),(C+=_&(1<<b)-1)>c){e.msg="invalid distance too far back",i.mode=n;break e}if(_>>>=b,m-=b,C>(b=s-l)){if((b=C-b)>d&&i.sane){e.msg="invalid distance too far back",i.mode=n;break e}if(S=0,w=p,0===f){if(S+=h-b,b<T){T-=b;do{P[s++]=p[S++]}while(--b);S=s-C,w=P}}else if(f<b){if(S+=h+f-b,(b-=f)<T){T-=b;do{P[s++]=p[S++]}while(--b);if(S=0,f<T){T-=b=f;do{P[s++]=p[S++]}while(--b);S=s-C,w=P}}}else if(S+=f-b,b<T){T-=b;do{P[s++]=p[S++]}while(--b);S=s-C,w=P}for(;T>2;)P[s++]=w[S++],P[s++]=w[S++],P[s++]=w[S++],T-=3;T&&(P[s++]=w[S++],T>1&&(P[s++]=w[S++]))}else{S=s-C;do{P[s++]=P[S++],P[s++]=P[S++],P[s++]=P[S++],T-=3}while(T>2);T&&(P[s++]=P[S++],T>1&&(P[s++]=P[S++]))}break}}break}}while(o<a&&s<u);o-=T=m>>3,_&=(1<<(m-=T<<3))-1,e.next_in=o,e.next_out=s,e.avail_in=o<a?a-o+5:5-(o-a),e.avail_out=s<u?u-s+257:257-(s-u),i.hold=_,i.bits=m}},{}],8:[function(e,t,i){var n=e("../utils/common"),r=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees"),l=0,u=1,c=2,h=4,d=5,f=6,p=0,_=1,m=2,g=-2,x=-3,y=-4,v=-5,$=8,b=1,T=2,C=3,S=4,w=5,E=6,P=7,A=8,L=9,M=10,R=11,O=12,D=13,I=14,B=15,F=16,N=17,G=18,z=19,U=20,V=21,k=22,W=23,H=24,q=25,j=26,X=27,Y=28,Z=29,K=30,Q=31,J=852,ee=592,te=15;function ie(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ne(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function re(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=b,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(J),t.distcode=t.distdyn=new n.Buf32(ee),t.sane=1,t.back=-1,p):g}function oe(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,re(e)):g}function ae(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?g:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,oe(e))):g}function se(e,t){var i,n;return e?(n=new ne,e.state=n,n.window=null,(i=ae(e,t))!==p&&(e.state=null),i):g}function le(e){return se(e,te)}var ue,ce,he=!0;function de(e){if(he){var t;for(ue=new n.Buf32(512),ce=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(u,e.lens,0,288,ue,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(c,e.lens,0,32,ce,0,e.work,{bits:5}),he=!1}e.lencode=ue,e.lenbits=9,e.distcode=ce,e.distbits=5}function fe(e,t,i,r){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),r>=a.wsize?(n.arraySet(a.window,t,i-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),n.arraySet(a.window,t,i-r,o,a.wnext),(r-=o)?(n.arraySet(a.window,t,i-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}function pe(e,t){var i,J,ee,te,ne,re,oe,ae,se,le,ue,ce,he,pe,_e,me,ge,xe,ye,ve,$e,be,Te,Ce,Se=0,we=new n.Buf8(4),Ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return g;(i=e.state).mode===O&&(i.mode=D),ne=e.next_out,ee=e.output,oe=e.avail_out,te=e.next_in,J=e.input,re=e.avail_in,ae=i.hold,se=i.bits,le=re,ue=oe,be=p;e:for(;;)switch(i.mode){case b:if(0===i.wrap){i.mode=D;break}for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(2&i.wrap&&35615===ae){i.check=0,we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0),ae=0,se=0,i.mode=T;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",i.mode=K;break}if((15&ae)!==$){e.msg="unknown compression method",i.mode=K;break}if(se-=4,$e=8+(15&(ae>>>=4)),0===i.wbits)i.wbits=$e;else if($e>i.wbits){e.msg="invalid window size",i.mode=K;break}i.dmax=1<<$e,e.adler=i.check=1,i.mode=512&ae?M:O,ae=0,se=0;break;case T:for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(i.flags=ae,(255&i.flags)!==$){e.msg="unknown compression method",i.mode=K;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=K;break}i.head&&(i.head.text=ae>>8&1),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0)),ae=0,se=0,i.mode=C;case C:for(;se<32;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.head&&(i.head.time=ae),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,we[2]=ae>>>16&255,we[3]=ae>>>24&255,i.check=o(i.check,we,4,0)),ae=0,se=0,i.mode=S;case S:for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.head&&(i.head.xflags=255&ae,i.head.os=ae>>8),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0)),ae=0,se=0,i.mode=w;case w:if(1024&i.flags){for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.length=ae,i.head&&(i.head.extra_len=ae),512&i.flags&&(we[0]=255&ae,we[1]=ae>>>8&255,i.check=o(i.check,we,2,0)),ae=0,se=0}else i.head&&(i.head.extra=null);i.mode=E;case E:if(1024&i.flags&&((ce=i.length)>re&&(ce=re),ce&&(i.head&&($e=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,J,te,ce,$e)),512&i.flags&&(i.check=o(i.check,J,ce,te)),re-=ce,te+=ce,i.length-=ce),i.length))break e;i.length=0,i.mode=P;case P:if(2048&i.flags){if(0===re)break e;ce=0;do{$e=J[te+ce++],i.head&&$e&&i.length<65536&&(i.head.name+=String.fromCharCode($e))}while($e&&ce<re);if(512&i.flags&&(i.check=o(i.check,J,ce,te)),re-=ce,te+=ce,$e)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=A;case A:if(4096&i.flags){if(0===re)break e;ce=0;do{$e=J[te+ce++],i.head&&$e&&i.length<65536&&(i.head.comment+=String.fromCharCode($e))}while($e&&ce<re);if(512&i.flags&&(i.check=o(i.check,J,ce,te)),re-=ce,te+=ce,$e)break e}else i.head&&(i.head.comment=null);i.mode=L;case L:if(512&i.flags){for(;se<16;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(ae!==(65535&i.check)){e.msg="header crc mismatch",i.mode=K;break}ae=0,se=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=O;break;case M:for(;se<32;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}e.adler=i.check=ie(ae),ae=0,se=0,i.mode=R;case R:if(0===i.havedict)return e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,m;e.adler=i.check=1,i.mode=O;case O:if(t===d||t===f)break e;case D:if(i.last){ae>>>=7&se,se-=7&se,i.mode=X;break}for(;se<3;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}switch(i.last=1&ae,se-=1,3&(ae>>>=1)){case 0:i.mode=I;break;case 1:if(de(i),i.mode=U,t===f){ae>>>=2,se-=2;break e}break;case 2:i.mode=N;break;case 3:e.msg="invalid block type",i.mode=K}ae>>>=2,se-=2;break;case I:for(ae>>>=7&se,se-=7&se;se<32;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if((65535&ae)!=(ae>>>16^65535)){e.msg="invalid stored block lengths",i.mode=K;break}if(i.length=65535&ae,ae=0,se=0,i.mode=B,t===f)break e;case B:i.mode=F;case F:if(ce=i.length){if(ce>re&&(ce=re),ce>oe&&(ce=oe),0===ce)break e;n.arraySet(ee,J,te,ce,ne),re-=ce,te+=ce,oe-=ce,ne+=ce,i.length-=ce;break}i.mode=O;break;case N:for(;se<14;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(i.nlen=257+(31&ae),ae>>>=5,se-=5,i.ndist=1+(31&ae),ae>>>=5,se-=5,i.ncode=4+(15&ae),ae>>>=4,se-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=K;break}i.have=0,i.mode=G;case G:for(;i.have<i.ncode;){for(;se<3;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.lens[Ee[i.have++]]=7&ae,ae>>>=3,se-=3}for(;i.have<19;)i.lens[Ee[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,Te={bits:i.lenbits},be=s(l,i.lens,0,19,i.lencode,0,i.work,Te),i.lenbits=Te.bits,be){e.msg="invalid code lengths set",i.mode=K;break}i.have=0,i.mode=z;case z:for(;i.have<i.nlen+i.ndist;){for(;me=(Se=i.lencode[ae&(1<<i.lenbits)-1])>>>16&255,ge=65535&Se,!((_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(ge<16)ae>>>=_e,se-=_e,i.lens[i.have++]=ge;else{if(16===ge){for(Ce=_e+2;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(ae>>>=_e,se-=_e,0===i.have){e.msg="invalid bit length repeat",i.mode=K;break}$e=i.lens[i.have-1],ce=3+(3&ae),ae>>>=2,se-=2}else if(17===ge){for(Ce=_e+3;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}se-=_e,$e=0,ce=3+(7&(ae>>>=_e)),ae>>>=3,se-=3}else{for(Ce=_e+7;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}se-=_e,$e=0,ce=11+(127&(ae>>>=_e)),ae>>>=7,se-=7}if(i.have+ce>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=K;break}for(;ce--;)i.lens[i.have++]=$e}}if(i.mode===K)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=K;break}if(i.lenbits=9,Te={bits:i.lenbits},be=s(u,i.lens,0,i.nlen,i.lencode,0,i.work,Te),i.lenbits=Te.bits,be){e.msg="invalid literal/lengths set",i.mode=K;break}if(i.distbits=6,i.distcode=i.distdyn,Te={bits:i.distbits},be=s(c,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,Te),i.distbits=Te.bits,be){e.msg="invalid distances set",i.mode=K;break}if(i.mode=U,t===f)break e;case U:i.mode=V;case V:if(re>=6&&oe>=258){e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,a(e,ue),ne=e.next_out,ee=e.output,oe=e.avail_out,te=e.next_in,J=e.input,re=e.avail_in,ae=i.hold,se=i.bits,i.mode===O&&(i.back=-1);break}for(i.back=0;me=(Se=i.lencode[ae&(1<<i.lenbits)-1])>>>16&255,ge=65535&Se,!((_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(me&&0==(240&me)){for(xe=_e,ye=me,ve=ge;me=(Se=i.lencode[ve+((ae&(1<<xe+ye)-1)>>xe)])>>>16&255,ge=65535&Se,!(xe+(_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}ae>>>=xe,se-=xe,i.back+=xe}if(ae>>>=_e,se-=_e,i.back+=_e,i.length=ge,0===me){i.mode=j;break}if(32&me){i.back=-1,i.mode=O;break}if(64&me){e.msg="invalid literal/length code",i.mode=K;break}i.extra=15&me,i.mode=k;case k:if(i.extra){for(Ce=i.extra;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.length+=ae&(1<<i.extra)-1,ae>>>=i.extra,se-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=W;case W:for(;me=(Se=i.distcode[ae&(1<<i.distbits)-1])>>>16&255,ge=65535&Se,!((_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(0==(240&me)){for(xe=_e,ye=me,ve=ge;me=(Se=i.distcode[ve+((ae&(1<<xe+ye)-1)>>xe)])>>>16&255,ge=65535&Se,!(xe+(_e=Se>>>24)<=se);){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}ae>>>=xe,se-=xe,i.back+=xe}if(ae>>>=_e,se-=_e,i.back+=_e,64&me){e.msg="invalid distance code",i.mode=K;break}i.offset=ge,i.extra=15&me,i.mode=H;case H:if(i.extra){for(Ce=i.extra;se<Ce;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}i.offset+=ae&(1<<i.extra)-1,ae>>>=i.extra,se-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=K;break}i.mode=q;case q:if(0===oe)break e;if(ce=ue-oe,i.offset>ce){if((ce=i.offset-ce)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=K;break}ce>i.wnext?(ce-=i.wnext,he=i.wsize-ce):he=i.wnext-ce,ce>i.length&&(ce=i.length),pe=i.window}else pe=ee,he=ne-i.offset,ce=i.length;ce>oe&&(ce=oe),oe-=ce,i.length-=ce;do{ee[ne++]=pe[he++]}while(--ce);0===i.length&&(i.mode=V);break;case j:if(0===oe)break e;ee[ne++]=i.length,oe--,i.mode=V;break;case X:if(i.wrap){for(;se<32;){if(0===re)break e;re--,ae|=J[te++]<<se,se+=8}if(ue-=oe,e.total_out+=ue,i.total+=ue,ue&&(e.adler=i.check=i.flags?o(i.check,ee,ue,ne-ue):r(i.check,ee,ue,ne-ue)),ue=oe,(i.flags?ae:ie(ae))!==i.check){e.msg="incorrect data check",i.mode=K;break}ae=0,se=0}i.mode=Y;case Y:if(i.wrap&&i.flags){for(;se<32;){if(0===re)break e;re--,ae+=J[te++]<<se,se+=8}if(ae!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=K;break}ae=0,se=0}i.mode=Z;case Z:be=_;break e;case K:be=x;break e;case Q:return y;default:return g}return e.next_out=ne,e.avail_out=oe,e.next_in=te,e.avail_in=re,i.hold=ae,i.bits=se,(i.wsize||ue!==e.avail_out&&i.mode<K&&(i.mode<X||t!==h))&&fe(e,e.output,e.next_out,ue-e.avail_out),le-=e.avail_in,ue-=e.avail_out,e.total_in+=le,e.total_out+=ue,i.total+=ue,i.wrap&&ue&&(e.adler=i.check=i.flags?o(i.check,ee,ue,e.next_out-ue):r(i.check,ee,ue,e.next_out-ue)),e.data_type=i.bits+(i.last?64:0)+(i.mode===O?128:0)+(i.mode===U||i.mode===B?256:0),(0===le&&0===ue||t===h)&&be===p&&(be=v),be}function _e(e){if(!e||!e.state)return g;var t=e.state;return t.window&&(t.window=null),e.state=null,p}function me(e,t){var i;return e&&e.state?0==(2&(i=e.state).wrap)?g:(i.head=t,t.done=!1,p):g}function ge(e,t){var i,n=t.length;return e&&e.state?0!==(i=e.state).wrap&&i.mode!==R?g:i.mode===R&&r(1,t,n,0)!==i.check?x:fe(e,t,n,n)?(i.mode=Q,y):(i.havedict=1,p):g}i.inflateReset=oe,i.inflateReset2=ae,i.inflateResetKeep=re,i.inflateInit=le,i.inflateInit2=se,i.inflate=pe,i.inflateEnd=_e,i.inflateGetHeader=me,i.inflateSetDictionary=ge,i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,i){var n=e("../utils/common"),r=15,o=852,a=592,s=0,l=1,u=2,c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],d=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],f=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,i,p,_,m,g,x){var y,v,$,b,T,C,S,w,E,P=x.bits,A=0,L=0,M=0,R=0,O=0,D=0,I=0,B=0,F=0,N=0,G=null,z=0,U=new n.Buf16(r+1),V=new n.Buf16(r+1),k=null,W=0;for(A=0;A<=r;A++)U[A]=0;for(L=0;L<p;L++)U[t[i+L]]++;for(O=P,R=r;R>=1&&0===U[R];R--);if(O>R&&(O=R),0===R)return _[m++]=20971520,_[m++]=20971520,x.bits=1,0;for(M=1;M<R&&0===U[M];M++);for(O<M&&(O=M),B=1,A=1;A<=r;A++)if(B<<=1,(B-=U[A])<0)return-1;if(B>0&&(e===s||1!==R))return-1;for(V[1]=0,A=1;A<r;A++)V[A+1]=V[A]+U[A];for(L=0;L<p;L++)0!==t[i+L]&&(g[V[t[i+L]]++]=L);if(e===s?(G=k=g,C=19):e===l?(G=c,z-=257,k=h,W-=257,C=256):(G=d,k=f,C=-1),N=0,L=0,A=M,T=m,D=O,I=0,$=-1,b=(F=1<<O)-1,e===l&&F>o||e===u&&F>a)return 1;for(;;){S=A-I,g[L]<C?(w=0,E=g[L]):g[L]>C?(w=k[W+g[L]],E=G[z+g[L]]):(w=96,E=0),y=1<<A-I,M=v=1<<D;do{_[T+(N>>I)+(v-=y)]=S<<24|w<<16|E|0}while(0!==v);for(y=1<<A-1;N&y;)y>>=1;if(0!==y?(N&=y-1,N+=y):N=0,L++,0==--U[A]){if(A===R)break;A=t[i+g[L]]}if(A>O&&(N&b)!==$){for(0===I&&(I=O),T+=M,B=1<<(D=A-I);D+I<R&&!((B-=U[D+I])<=0);)D++,B<<=1;if(F+=1<<D,e===l&&F>o||e===u&&F>a)return 1;_[$=N&b]=O<<24|D<<16|T-m|0}}return 0!==N&&(_[T+N]=A-I<<24|64<<16|0),x.bits=O,0}},{"../utils/common":1}],10:[function(e,t,i){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,i){function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=n},{}],"/lib/inflate.js":[function(e,t,i){var n=e("./zlib/inflate"),r=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),l=e("./zlib/zstream"),u=e("./zlib/gzheader"),c=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,t.windowBits);if(i!==a.Z_OK)throw new Error(s[i]);this.header=new u,n.inflateGetHeader(this.strm,this.header)}function d(e,t){var i=new h(t);if(i.push(e,!0),i.err)throw i.msg||s[i.err];return i.result}function f(e,t){return(t=t||{}).raw=!0,d(e,t)}h.prototype.push=function(e,t){var i,s,l,u,h,d,f=this.strm,p=this.options.chunkSize,_=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=o.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(p),f.next_out=0,f.avail_out=p),(i=n.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&_&&(d="string"==typeof _?o.string2buf(_):"[object ArrayBuffer]"===c.call(_)?new Uint8Array(_):_,i=n.inflateSetDictionary(this.strm,d)),i===a.Z_BUF_ERROR&&!0===m&&(i=a.Z_OK,m=!1),i!==a.Z_STREAM_END&&i!==a.Z_OK)return this.onEnd(i),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&i!==a.Z_STREAM_END&&(0!==f.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(f.output,f.next_out),u=f.next_out-l,h=o.buf2string(f.output,l),f.next_out=u,f.avail_out=p-u,u&&r.arraySet(f.output,f.output,l,u,0),this.onData(h)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&i!==a.Z_STREAM_END);return i===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=h,i.inflate=d,i.inflateRaw=f,i.ungzip=d},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js");var nt$b=tmp$1,n$L;function w$R(e){var t=e.uint8Array,i=e.format,n=e.request,r=u$Z(e.flipY,!1);o$1q.typeOf.object("uint8Array",t),o$1q.typeOf.string("format",i);var o,a=new Blob([t],{type:i});return t$10.supportsImageBitmapOptions().then((function(e){return e?o$1l(t$10.createImageBitmapFromBlob(a,{flipY:r,premultiplyAlpha:!1})):new t$10({url:o=window.URL.createObjectURL(a),request:n}).fetchImage({flipY:r})})).then((function(e){return e$2e(o)&&window.URL.revokeObjectURL(o),e})).otherwise((function(e){return e$2e(o)&&window.URL.revokeObjectURL(o),o$1l.reject(e)}))}function h$U(e,t,i){if(!e$2e(t))throw new t$15("resourceOrUrlOrBuffer is required.");var n;t instanceof ArrayBuffer||ArrayBuffer.isView(t)?n=o$1l.resolve(t):n=t$10.createIfNeeded(t).fetchArrayBuffer();if(e$2e(n))return n.then((function(t){if(e$2e(t)){var n=[];t instanceof ArrayBuffer?n.push(t):(0===t.byteOffset&&t.byteLength===t.buffer.byteLength||(t=t.slice(0,t.length)),n.push(t.buffer));var r=u$Z(i,!1);return e.scheduleTask({data:t,bMipMap:r},n)}})).then((function(e){return e$1K.clone(e)}))}function o$V(){}function P$R(){var e=o$V._transcodeTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/basis_transcoder.js",wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then((function(){return o$V._transcodeTaskProcessor}));o$V._readyPromise=e}function f$U(e,t){var i;(o$1q.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?i=o$1l.resolve(e):i=t$10.createIfNeeded(e).fetchArrayBuffer();return i.then((function(e){return o$V.transcode(e,n$L,t)}))}o$V._transcodeTaskProcessor=new i$W("transcodeKTX2",Number.POSITIVE_INFINITY),o$V._readyPromise=void 0,o$V.transcode=function(e,t,i){return o$1q.defined("supportedTargetFormats",t),e$2e(o$V._readyPromise)||P$R(),o$V._readyPromise.then((function(n){var r;if(e instanceof ArrayBuffer){var o=new Uint8Array(e);return r={supportedTargetFormats:t,ktx2Buffer:o,testId:i},n.scheduleTask(r,[e])}return r={supportedTargetFormats:t,ktx2Buffer:e},n.scheduleTask(r)})).then((function(e){var t,i=e.length,n=Object.keys(e[0]),r=n.length;for(t=0;t<i;t++)for(var o=e[t],a=0;a<r;a++){var s=o[n[a]];o[n[a]]=new e$1K(s.internalFormat,s.width,s.height,s.levelBuffer,s.datatype)}if(1===r){for(t=0;t<i;++t)e[t]=e[t][n[0]];1===i&&(e=e[0])}return e})).otherwise((function(e){throw e}))},f$U.setKTX2SupportedFormats=function(e,t,i,n,r,o){n$L={s3tc:e,pvrtc:t,astc:i,etc:n,etc1:r,bc7:o}};var _0x4bab9e=(_0x58d183=!0,function(e,t){var i=_0x58d183?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x58d183=!1,i}),_0x1bd7f3=_0x4bab9e(void 0,(function(){return _0x1bd7f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bd7f3).search("(((.+)+)+)+$")})),_0x58d183;function _0xf77618(e){this._ambientColor=new e$1X(1,1,1,1),this._diffuseColor=new e$1X(1,1,1,1),this._specularColor=new e$1X(0,0,0,0),this._shininess=50,this._bTransparentSorting=!1,this._textures=[],this._texMatrix=p$1d.clone(p$1d.IDENTITY),this._usePBR=!1,this._isInvalidOblique=!1,this._usePBRTextureBatch=!1,this._alphaMode=void 0,this._isKTK2=!1,this._RGBTOBGR=!1,e$2e(e)&&(e$2e(e.ambient)&&(this._ambientColor=e$2c.clone(e.ambient)),e$2e(e.diffuse)&&(this._diffuseColor=e$2c.clone(e.diffuse)),e$2e(e.specular)&&(this._specularColor=e$2c.clone(e.specular)),this._shininess=e.shininess||50,this._bTransparentSorting=e.bTransparentSorting||!1,this._textures=e.textures||[]),this._mapTextures={},this.isAssociateMaterial=!1}_0x1bd7f3(),Object.defineProperties(_0xf77618.prototype,{hasTexture:{get:function(){return this._textures.length>0||(e$2e(this.baseColorTexture)||e$2e(this.normalTexture)||e$2e(this.emissiveTexture)||e$2e(this.metallicRoughnessTexture)||e$2e(this.occlusionTexture))}}}),_0xf77618.prototype.clone=function(e){for(var t in e$2e(e)||(e=new _0xf77618({})),e._ambientColor=e$1X.clone(this._ambientColor),e._diffuseColor=e$1X.clone(this._diffuseColor),e._specularColor=e$1X.clone(this._specularColor),e._bTransparentSorting=this._bTransparentSorting,e._shininess=this._shininess,e._texMatrix=p$1d.clone(this._texMatrix),e._usePBR=this._usePBR,e._alphaMode=this._alphaMode,e._isInvalidOblique=this._isInvalidOblique,e._isKTK2=this._isKTK2,e._RGBTOBGR=this._RGBTOBGR,e.isAssociateMaterial=this.isAssociateMaterial,this._usePBR&&(e._alphaCutoff=this._alphaCutoff,e._baseColor=e$1X.clone(this._baseColor),e._baseColorTextureIndex=this._baseColorTextureIndex,e._baseColorTextureCoordIndex=this._baseColorTextureCoordIndex,e._doubleSided=this._doubleSided,e._emissiveFactor=e$1X.clone(this._emissiveFactor),e._emissiveTextureIndex=this._emissiveTextureIndex,e._emissiveTextureCoordIndex=this._emissiveTextureCoordIndex,e._roughnessFactor=this._roughnessFactor,e._metallicFactor=this._metallicFactor,e._metallicRoughnessTextureIndex=this._metallicRoughnessTextureIndex,e._metallicRoughnessTextureCoordIndex=this._metallicRoughnessTextureCoordIndex,e._normalTextureIndex=this._normalTextureIndex,e._normalTextureCoordIndex=this._normalTextureCoordIndex,e._normalTextureScale=this._normalTextureScale,e._occlusionTextureIndex=this._occlusionTextureIndex,e._occlusionTextureCoordIndex=this._occlusionTextureCoordIndex,e._occlusionTextureStrength=this._occlusionTextureStrength,e._baseColorTextureMotion=new _0x3e7ab8,e._baseColorTextureMotion.clone(this._baseColorTextureMotion),e._emissiveTextureMotion=new _0x3e7ab8,e._emissiveTextureMotion.clone(this._emissiveTextureMotion),e._usePBRTextureBatch=this._usePBRTextureBatch,e.baseColorTexture=this.baseColorTexture,e.normalTexture=this.normalTexture,e.emissiveTexture=this.emissiveTexture,e.metallicRoughnessTexture=this.metallicRoughnessTexture,e.occlusionTexture=this.occlusionTexture,e.pbrParamTexture=this.pbrParamTexture),this._textures){!e$2e(i=this._textures[t])||(this._isKTK2?i._inner._context._textureCache.getTexture(i.keyword):Se$e.AddRef(i.id),e._textures[t]=this._textures[t])}for(var t in this._mapTextures){var i;!e$2e(i=this._mapTextures[t])||(Se$e.AddRef(i.id),e._mapTextures[t]=this._mapTextures[t])}},_0xf77618.prototype.requestSharedTexture=function(e,t,i,n,r,o,a,s){var l=Se$e._shareTextureCache[e];e$2e(l)||(l=o$10(e,o),Se$e._shareTextureCache[e]=l);var u=this;return o$1l(l,(function(i){var o;if(i instanceof ArrayBuffer){var l,c=new Uint32Array(i,0,6),h=c[0],d=c[1],f=c[2],p=c[3],_=c[4],m=c[5],g=new Uint8Array(i,24,m);if(m===_)l=g;else{var x=nt$b.inflate(g).buffer;l=new Uint8Array(x,0,_)}(o=Se$e.CreateTexture(t,n,d,f,p,h,l,!1,a,s)).isShared=!0,o.sharedKey=e}else o=i;var y=u._baseColorTextureIndex===r,v=u._emissiveTextureIndex===r,$=u._normalTextureIndex===r,b=u._metallicRoughnessTextureIndex===r,T=u._occlusionTextureIndex===r;y?u.baseColorTexture=o:v?u.emissiveTexture=o:$?u.normalTexture=o:b?u.metallicRoughnessTexture=o:T&&(u.occlusionTexture=o),0==r&&u._textures.length>0?u._textures.splice(0,0,o):u._textures.push(o),Se$e._shareTextureCache[e]=o})),l},_0xf77618.prototype.createWebp=function(e,t,i,n,r,o,a,s,l,u,c){var h=Se$e.textureManager.textures[e];if(c=u$Z(c,!0),e$2e(h))return this._textures.push(h),Se$e.textureManager.refCounts[e]++,h;for(var d=r.length,f=r.byteOffset,p=new DataView(r.buffer),_=0,m=[];_<d;){var g=p.getUint32(f,!0);f+=Uint32Array.BYTES_PER_ELEMENT,_+=Uint32Array.BYTES_PER_ELEMENT;var x=r.subarray(_,_+g);f+=g,_+=g;var y=w$R({uint8Array:x,format:"image/webp"});m.push(y)}var v=this;return o$1l.all(m,(function(t){var r=t[0];if(e$2e(r)){var o=!0;(!e$2d.isPowerOfTwo(r.width)||!e$2d.isPowerOfTwo(r.height))&&(s=q$1a.CLAMP_TO_EDGE,l=q$1a.CLAMP_TO_EDGE,o=!1),o=o&&c;var a=t.slice(1),u=new t$U({context:i,source:r,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({wrapS:s,wrapT:l,minificationFilter:0!==t.length&&o?tt$i.LINEAR_MIPMAP_LINEAR:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR}),mipLevels:a});u.id=e,Se$e.textureManager.textures[e]=u,Se$e.textureManager.refCounts[e]=1,0===n&&v._textures.length>0?v._textures.splice(0,0,u):v._textures.push(u)}})).otherwise((function(e){console.error(e)}))},_0xf77618.prototype.createJPGPNG=function(e,t,i,n,r,o,a){var s=Se$e.textureManager.textures[e];if(e$2e(s))return this._textures.push(s),Se$e.textureManager.refCounts[e]++,s;var l=[],u="image/jpeg";"png"===a&&(u="image/png");var c=w$R({uint8Array:n,format:u});l.push(c);var h=this,d=o$1l.defer();return o$1l.all(l,(function(n){var a=n[0];if(e$2e(a)){(!e$2d.isPowerOfTwo(a.width)||!e$2d.isPowerOfTwo(a.height))&&(r=q$1a.CLAMP_TO_EDGE,o=q$1a.CLAMP_TO_EDGE);var s=new t$U({context:t,source:a,pixelFormat:V$12.RGBA,flipY:!0,sampler:new e$1S({wrapS:r,wrapT:o,minificationFilter:(n.length,tt$i.LINEAR),magnificationFilter:rt$k.LINEAR})});s.id=e,Se$e.textureManager.textures[e]=s,Se$e.textureManager.refCounts[e]=1,ti$4._memTextureAdded(s._sizeInBytes),0===i&&h._textures.length>0?h._textures.splice(0,0,s):h._textures.push(s),d.resolve(s)}})).otherwise((function(e){console.error(e)})),d.promise},_0xf77618.prototype.createPBRParamter=function(e){if(e$2e(e.pbrMetallicRoughness)){var t=e.pbrMetallicRoughness;this._usePBR=!0,this._alphaCutoff=u$Z(t.alphaCutoff,e.alphaCutoff),this._alphaMode=u$Z(t.alphaMode,e.alphaMode),this._baseColor=new e$1X(t.baseColor.x,t.baseColor.y,t.baseColor.z,t.baseColor.w),this._baseColorTextureIndex=t.baseColorTextureIndex,this._baseColorTextureCoordIndex=t.baseColorTextureCoordIndex,this._doubleSided=t.doubleSided,this._emissiveFactor=new e$1X(t.emissiveFactor.x,t.emissiveFactor.y,t.emissiveFactor.z,1),this._emissiveTextureIndex=t.emissiveTextureIndex,this._emissiveTextureCoordIndex=t.emissiveTextureCoordIndex,this._roughnessFactor=t.roughnessFactor,this._metallicFactor=t.metallicFactor,this._metallicRoughnessTextureIndex=t.metallicRoughnessTextureIndex,this._metallicRoughnessTextureCoordIndex=t.metallicRoughnessTextureCoordIndex,this._normalTextureIndex=t.normalTextureIndex,this._normalTextureCoordIndex=t.normalTextureCoordIndex,this._normalTextureScale=t.normalTextureScale,this._occlusionTextureIndex=t.occlusionTextureIndex,this._occlusionTextureCoordIndex=t.occlusionTextureCoordIndex,this._occlusionTextureStrength=t.occlusionTextureStrength,this._baseColorTextureMotion=new _0x3e7ab8(t.baseColorTextureMotion),this._emissiveTextureMotion=new _0x3e7ab8(t.emissiveTextureMotion),this.baseColorTexture=t.baseColorTexture,this.normalTexture=t.normalTexture,this.emissiveTexture=t.emissiveTexture,this.metallicRoughnessTexture=t.metallicRoughnessTexture,this.occlusionTexture=t.occlusionTexture}},_0xf77618.prototype.createCRN=function(e,t,i,n,r,o,a,s,l,u){var c;if(l=u$Z(l,!0),s?c=a$P(r.imageBuffer,!0,!0):_0x29d1c7.CRNTaskProcessorReady&&(c=h$U(_0x29d1c7.CRNProcessor,r.imageBuffer,!0)),e$2e(c)){var h=this;return c.then((function(t){if(!h.isDestroyed()){u=u$Z(u,{});var s=Se$e.CreateTexture(e,i,r.width,r.height,r.nFormat,_0x22a8f5.enrS3TCDXTN,t.bufferView,!1,o,a,l);u.isEmissiveTex?h.emissiveTexture=s:u.isNormalTexture?h.normalTexture=s:u.isMetallicRoughnessTexture?h.metallicRoughnessTexture=s:u.isBaseColorTexture?h.baseColorTexture=s:0===n&&h._textures.length>0?h._textures.splice(0,0,s):h._textures.push(s)}})),c}},_0xf77618.prototype.createKTX2=function(e,t,i,n,r,o,a,s){this._isKTK2=!0;var l=i._textureCache.getTexture(e);if(s=u$Z(s,!0),e$2e(l))return this._textures.push(l),l;var u=f$U(r.imageBuffer,r.id);if(e$2e(u)){var c=this;return u.then((function(t){var n=i._textureCache.getTexture(e);if(e$2e(n))c._textures.push(n);else{var r,l=0;Array.isArray(t)&&(l=t.length,r=t.slice(1,t.length).map((function(e){return e.bufferView})),t=t[0]);var u=!0;(!e$2d.isPowerOfTwo(t.width)||!e$2d.isPowerOfTwo(t.height))&&(o=q$1a.CLAMP_TO_EDGE,a=q$1a.CLAMP_TO_EDGE,u=!1),s||(l=0,r=void 0,u=!1);var h=new e$1S({wrapS:o,wrapT:a,minificationFilter:0!==l&&u?tt$i.LINEAR_MIPMAP_LINEAR:tt$i.LINEAR,magnificationFilter:tt$i.LINEAR});(n=e$2e(t.internalFormat)?new t$U({context:i,pixelFormat:t.internalFormat,width:t.width,height:t.height,source:{arrayBufferView:t.bufferView,mipLevels:r},sampler:h}):new t$U({context:i,source:t,sampler:h})).keyword=e,c._textures.push(n),i._textureCache.addTexture(e,n)}})).otherwise((function(e){console.log(e)})),u}},_0xf77618.prototype.createCommonParamter=function(e){var t=u$Z(e.ambient,e$1X.WHITE);this._ambientColor=new e$1X(t.r,t.g,t.b,t.a);var i=u$Z(e.diffuse,e$1X.WHITE);this._diffuseColor=new e$1X(i.r,i.g,i.b,i.a);var n=u$Z(e.specular,e$1X.WHITE);this._specularColor=new e$1X(n.r,n.g,n.b,n.a),this._shininess=u$Z(e.shininess,10),this._bTransparentSorting=u$Z(e.transparentsorting,!1)};var _0x484e80=new e$2c;function _0x3e7ab8(e){if(!e$2e(e))return this.OffsetPeriod=0,this.OffsetSpeedU=0,this.OffsetSpeedV=0,this.TilingPeriod=0,this.TilingSpeedU=0,void(this.TilingSpeedV=0);this.OffsetPeriod=e.offsetPeriod,this.OffsetSpeedU=e.offsetSpeedU,this.OffsetSpeedV=e.offsetSpeedV,this.TilingPeriod=e.tilingPeriod,this.TilingSpeedU=e.tilingSpeedU,this.TilingSpeedV=e.tilingSpeedV}_0xf77618.prototype.createPBRUniformMap=function(){var e={};if(!this._usePBR)return e;var t=this;e.u_metallicFactor=function(){return t._metallicFactor},e.u_roughnessFactor=function(){return t._roughnessFactor},e.u_emissiveFactor=function(){return t._emissiveFactor},e.u_baseColorFactor=function(){return t._baseColor},e.u_alphaCutoff=function(){return t._alphaCutoff},e.u_baseColorTexture=function(){return t._textures[t._baseColorTextureIndex]},e.u_metallicRoughnessTexture=function(){return t._textures[t._metallicRoughnessTextureIndex]},e.u_normalTexture=function(){return t._textures[t._normalTextureIndex]},e.u_occlusionTexture=function(){return t._textures[t._occlusionTextureIndex]},e.u_emissiveTexture=function(){return t._textures[t._emissiveTextureIndex]};var i=t._emissiveTextureMotion;e.u_emissiveUVOffsetAndTiling=function(){var e=performance.now()/1e3;if(i._offsetPeriod>0){var t=e%i._offsetPeriod;_0x484e80.x=t*i._offsetSpeedU,_0x484e80.y=t*i._offsetSpeedV}else _0x484e80.x=0,_0x484e80.y=0;if(i._tilingPeriod>0){var n=e%i._tilingPeriod;_0x484e80.z=1+n*i._tilingSpeedU,_0x484e80.w=1+n*i._tilingSpeedV}else _0x484e80.z=1,_0x484e80.w=1;return _0x484e80};var n=t._baseColorTextureMotion;return e.u_baseColorUVOffsetAndTiling=function(){var e=performance.now()/1e3;if(n._offsetPeriod>0){var t=e%n._offsetPeriod;_0x484e80.x=t*n._offsetSpeedU,_0x484e80.y=t*n._offsetSpeedV}else _0x484e80.x=0,_0x484e80.y=0;if(n._tilingPeriod>0){var i=e%n._tilingPeriod;_0x484e80.z=1+i*n._tilingSpeedU,_0x484e80.w=1+i*n._tilingSpeedV}else _0x484e80.z=1,_0x484e80.w=1;return _0x484e80},e},_0xf77618.prototype.appendPBRMacroToShader=function(e,t){!this._usePBR||(e.defines.push("USE_PBR"),t.defines.push("USE_PBR"),this._baseColorTextureIndex>=0&&t.defines.push("HAS_BASECOLOR_TEXTURE"),this._normalTextureIndex>=0&&t.defines.push("HAS_NORMAL_TEXTURE"),this._metallicRoughnessTextureIndex>=0&&t.defines.push("HAS_METALLICROUGHNESS_TEXTURE"),this._occlusionTextureIndex>=0&&t.defines.push("HAS_OCCLUSION_TEXTURE"),this._emissiveTextureIndex>=0&&t.defines.push("HAS_EMISSIVE_TEXTURE"),this._doubleSided&&t.defines.push("DOUBLE_SIDED"))},_0xf77618.Default=new _0xf77618,_0xf77618.prototype.isDestroyed=function(){return!1},_0xf77618.prototype.destroy=function(){for(var e in this._ambientColor=null,this._diffuseColor=null,this._specularColor=null,this._textures){e$2e(t=this._textures[e])&&(this._isKTK2?t.destroy():Se$e.DestroyTexture(t.id))}for(var e in this._mapTextures){var t;e$2e(t=this._mapTextures[e])&&Se$e.DestroyTexture(t.id)}return i$11(this)},_0x3e7ab8.prototype.clone=function(e){this.OffsetPeriod=e.OffsetPeriod,this.OffsetSpeedU=e.OffsetSpeedU,this.OffsetSpeedV=e.OffsetSpeedV,this.TilingPeriod=e.TilingPeriod,this.TilingSpeedU=e.TilingSpeedU,this.TilingSpeedV=e.TilingSpeedV};var _0x16cd4e=(_0x3f1cb1=!0,function(e,t){var i=_0x3f1cb1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f1cb1=!1,i}),_0x23fdc8=_0x16cd4e(void 0,(function(){return _0x23fdc8.toString().search("(((.+)+)+)+$").toString().constructor(_0x23fdc8).search("(((.+)+)+)+$")})),_0x3f1cb1;_0x23fdc8();var _0x3d75a9={EXCAVATION:"EXCAVATION",FALTTEN:"FALTTEN",OVERLAY:"OVERLAY",HYPSOMETRIC:"HYPSOMETRIC",ADJUST_COLOR:"ADJUST_COLOR",TRANSPARENT_BACK_COLOR:"TRANSPARENT_BACK_COLOR",HORIZONTAL_LINE:"HORIZONTAL_LINE",COMPUTE_W_VALUE:"COMPUTE_W_VALUE",COMPUTE_TEXCOORD:"COMPUTE_TEXCOORD",HAS_LIGHT:"HAS_LIGHT",HAS_NORMAL:"HAS_NORMAL",REPLACE_SELECT_TYPE:"REPLACE_SELECT_TYPE",SILHOUETTE_SELECT_TYPE:"SILHOUETTE_SELECT_TYPE",MULTI_TEX:"MULTI_TEX",APPLY_SPLIT:"APPLY_SPLIT",APPLY_SWIPE:"APPLY_SWIPE",TEXCOORD:"TexCoord",TEXCOORD2:"TexCoord2",COMPRESS_VERTEX:"COMPRESS_VERTEX",COMPRESS_NORMAL:"COMPRESS_NORMAL",COMPRESS_COLOR:"COMPRESS_COLOR",COMPRESS_TEXCOORD:"COMPRESS_TEXCOORD",SKETCH_MODE:"SKETCH_MODE",NORMAL_AND_DEPTH:"NORMAL_AND_DEPTH",POST_EFFECT:"POST_EFFECT",CLIP_FILT_BY_ID:"CLIP_FILT_BY_ID",CLIP:"CLIP",CLIPPLANE:"CLIPPLANE",PBR:"PBR",PT_CLOUD:"PT_CLOUD",DIR_LIGHTS:"DIR_LIGHTS ",POINT_LIGHTS:"POINT_LIGHTS ",SPOT_LIGHTS:"SPOT_LIGHTS ",HEMISPHERE_LIGHTS:"HEMISPHERE_LIGHTS ",W_VISIBLE:"W_VISIBLE",EMISSION_TEXTURE_ATLAS:"EMISSION_TEXTURE_ATLAS",EMISSION_TEXTURE_COUNT:"EMISSION_TEXTURE_COUNT ",TEXTURE_MOVE:"TEXTURE_MOVE",VOLUME:"Volume",VOLUME2:"Volume2",TEXTURE_COORD_ONE_IS_W:"TEXTURE_COORD_ONE_IS_W",TRIANGLE_FILTRATE:"TRIANGLE_FILTRATE",UseInstanceSkeletonMatrix:"UseInstanceSkeletonMatrix",RGBTOBGR:"RGBTOBGR",HAS_SKELETONSELECTED:"HAS_SKELETONSELECTED",SKELETONSELECT_ENABLE:"SKELETONSELECT_ENABLE",REPLACE_COLOR_TYPE:"REPLACE_COLOR_TYPE",INVALID_OBLIQUE:"INVALID_OBLIQUE",IGNORE_NORMAL:"IGNORE_NORMAL",TextureBatch:"TextureBatch",Translation:"Translation",VOL_AND_HYP:"VOL_AND_HYP",VERTEX_CAPTURE:"VERTEX_CAPTURE",SEC_TEX_EMISSION:"SEC_TEX_EMISSION",BRDF:"BRDF",PBR_THEME:"PBR_THEME",IBL:"IBL",POINT:"POINT",HAS_BASE_TEXTURE:"HAS_BASE_TEXTURE",HAS_NORMAL_TEXTURE:"HAS_NORMAL_TEXTURE",HAS_OCCLUSION_TEXTURE:"HAS_OCCLUSION_TEXTURE",HAS_EMISSIVE_TEXTURE:"HAS_EMISSIVE_TEXTURE",USE_BatchPBR:"USE_BatchPBR",HAS_DIR_LIGHTS:"HAS_DIR_LIGHTS",HAS_POINT_LIGHTS:"HAS_POINT_LIGHTS",HAS_SPOT_LIGHTS:"HAS_SPOT_LIGHTS",HAS_HEMISPHERE_LIGHTS:"HAS_HEMISPHERE_LIGHTS",NO_TEXCOORD:"NO_TEXCOORD",FLOOD_ANALYSIS:"FLOOD_ANALYSIS",HAS_RAIN:"HAS_RAIN",HAS_WETNESS:"HAS_WETNESS",HAS_SNOW:"HAS_SNOW",HAS_MetallicRoughness_TEXTURE:"HAS_MetallicRoughness_TEXTURE",FusionMode:"FusionMode",VISIBLEDISTANCEMAX:"VISIBLEDISTANCEMAX",MASK:"MASK",LineVector:"LineVector",KtxEnvMap:"KtxEnvMap",WIREFRAME_SELECT_TYPE:"WIREFRAME_SELECT_TYPE",Has_Texture:"Has_Texture",UseFloatTexture:"UseFloatTexture",HypColorByZValue:"HypColorByZValue"},D$V=Object.freeze(_0x3d75a9),e$1h={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3},i$R=Object.freeze(e$1h),_0xd6a068=(_0xea8fab=!0,function(e,t){var i=_0xea8fab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xea8fab=!1,i}),_0x2d9fb1=_0xd6a068(void 0,(function(){return _0x2d9fb1.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d9fb1).search("(((.+)+)+)+$")})),_0xea8fab;_0x2d9fb1();var _0x2fd7a8={S3M:49,S3M4:1},_0x43b37d=Object.freeze(_0x2fd7a8),_0x1d9588=(_0x306ce1=!0,function(e,t){var i=_0x306ce1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x306ce1=!1,i}),_0x172550=_0x1d9588(void 0,(function(){return _0x172550.toString().search("(((.+)+)+)+$").toString().constructor(_0x172550).search("(((.+)+)+)+$")})),_0x306ce1;_0x172550();var _0x2ae437={RESET:0,SetColor:1,SELECTED:2,HIDE:4,OFFSET:8,CLIP:16,BLOOM:32,ALL:255},_0x27a6bb=Object.freeze(_0x2ae437),_0x35c032=(_0x1806ec=!0,function(e,t){var i=_0x1806ec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1806ec=!1,i}),_0xdf2bc4=_0x35c032(void 0,(function(){return _0xdf2bc4.toString().search("(((.+)+)+)+$").toString().constructor(_0xdf2bc4).search("(((.+)+)+)+$")})),_0x1806ec;_0xdf2bc4();var _0x31152b={MIX:0,REPLACE:1},_0x2b839f=Object.freeze(_0x31152b),_0x30bd73=(_0x27a409=!0,function(e,t){var i=_0x27a409?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27a409=!1,i}),_0x2d3b09=_0x30bd73(void 0,(function(){return _0x2d3b09.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d3b09).search("(((.+)+)+)+$")})),_0x27a409;_0x2d3b09();var _0xebc218={DIRECTIONAL:0,POINT:1,SPOT:2,HEMISPHERE:3},_0x4970c2=Object.freeze(_0xebc218),_0x9ff2bc=(_0x37706f=!0,function(e,t){var i=_0x37706f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37706f=!1,i}),_0x3f5454=_0x9ff2bc(void 0,(function(){return _0x3f5454.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f5454).search("(((.+)+)+)+$")})),_0x37706f;_0x3f5454();var _0x381996={POINT:0,VOXEL:1},_0x2c4f4b=Object.freeze(_0x381996),_0x5d57e8=(_0x3133d4=!0,function(e,t){var i=_0x3133d4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3133d4=!1,i}),_0x12c502=_0x5d57e8(void 0,(function(){return _0x12c502.toString().search("(((.+)+)+)+$").toString().constructor(_0x12c502).search("(((.+)+)+)+$")})),_0x3133d4;_0x12c502();var _0x45a114={NONE:0,TITANIUM_SCUFFED:1,METAL_PLATE:2,EMISSION:4,ROUGHNESS:8},Xe$e=Object.freeze(_0x45a114),_0x13e07d=(_0x4d0a17=!0,function(e,t){var i=_0x4d0a17?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d0a17=!1,i}),_0x4835ab=_0x13e07d(void 0,(function(){return _0x4835ab.toString().search("(((.+)+)+)+$").toString().constructor(_0x4835ab).search("(((.+)+)+)+$")})),_0x4d0a17;_0x4835ab();var _0xaa057c="\n#include <SceneUboDecl>\n\nvar uFrontColorTexture : texture_2d<f32>;\nvar uFrontColorTextureSampler : sampler;\nvar uFrontDepthTexture : texture_2d<f32>;\nvar uFrontDepthTextureSampler : sampler;\nvar uBackDepthTexture : texture_2d<f32>;\nvar uBackDepthTextureSampler : sampler;\n\nuniform uSQMode : f32;\n\nvarying vSecondColor : vec4<f32>; \nvarying vColor : vec4<f32>;\nvarying vSQ_clip_pos : vec4<f32>;\n\nfn reverseLogDepth(logZ : f32) -> f32\n{\n#ifdef LOG_DEPTH\n var near = Scene.uCurrentFrustum.x;\n var far = Scene.uCurrentFrustum.y;\n var log2Depth = logZ * Scene.uLog2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#else\n return logZ;\n#endif\n}\n\nfn unpackDepth(packedDepth : vec4<f32>) -> f32\n{\n return dot(packedDepth, vec4<f32>(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n}\n\nfn isPointInObject(ndc : vec4<f32>) -> bool\n{\n var depthTexCoord = ndc.xy * 0.5 + 0.5;\n var bIn = false;\n var color = textureSample(uFrontColorTexture, uFrontColorTextureSampler, depthTexCoord.xy);\n var pixelZWindow = ndc.z;\n if(color.r > 0.99 && color.g < 0.01 && color.b < 0.01)\n {\n var z_window_near = unpackDepth(textureSampleLevel(uFrontDepthTexture, uFrontDepthTextureSampler, depthTexCoord.xy, 0.0));\n z_window_near = reverseLogDepth(z_window_near);\n var z_window_far = unpackDepth(textureSampleLevel(uBackDepthTexture, uBackDepthTextureSampler, depthTexCoord.xy, 0.0));\n z_window_far = reverseLogDepth(z_window_far);\n if(pixelZWindow - z_window_near > -0.0000001 && z_window_far - pixelZWindow > -0.0000001)\n {\n bIn = true;\n }\n }\n if(uniforms.uSQMode < 0.5){\n return !bIn;\n }\n else{\n return bIn;\n }\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var ndc = vSQ_clip_pos / vSQ_clip_pos.w; \n if(!isPointInObject(ndc)) \n { \n discard; \n } \n if(vColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = vSecondColor; \n}",_0x23f71b=(_0x4d152c=!0,function(e,t){var i=_0x4d152c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d152c=!1,i}),_0x17db64=_0x23f71b(void 0,(function(){return _0x17db64.toString().search("(((.+)+)+)+$").toString().constructor(_0x17db64).search("(((.+)+)+)+$")})),_0x4d152c;function _0xee2f65(e,t){this._content=e,this._id=t,this._batchId=t,this._color=new e$1X(1,1,1,1),this._imageUrl="",this._vertexOffset=[],this._instanceIds=void 0,this._pbrMaterialIndex=void 0}_0x17db64(),Object.defineProperties(_0xee2f65.prototype,{show:{get:function(){return!0},set:function(e){}},color:{get:function(){return e$2e(this._color)||(this._color=new e$1X),this._color},set:function(e){this._color=e}},pbrMaterialIndex:{get:function(){return e$2e(this._pbrMaterialIndex)||(this._pbrMaterialIndex=0),this._pbrMaterialIndex},set:function(e){this._pbrMaterialIndex=e}},imageUrl:{get:function(){return this._imageUrl},set:function(e){this._imageUrl=e}},id:{get:function(){return this._id},set:function(e){this._id=e}},batchId:{get:function(){return this._batchId},set:function(e){this._batchId=e}},instanceIds:{get:function(){return this._instanceIds},set:function(e){this._instanceIds=e}}}),_0xee2f65.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},_0xee2f65.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},_0xee2f65.prototype.getProperty=function(e){return this[e]},_0xee2f65.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},_0xee2f65.prototype.addVertexOffset=function(e,t){this._vertexOffset.push({vertexCount:e,vertexOffset:t})},_0xee2f65.prototype.getVertexOffset=function(){return this._vertexOffset},_0xee2f65.prototype.getRenderBatchKey=function(){var e=this._color.toCssColorString();return this._imageUrl+"_"+e};var _0x37d1c6=(_0x3a54e1=!0,function(e,t){var i=_0x3a54e1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a54e1=!1,i}),_0x365e3b=_0x37d1c6(void 0,(function(){return _0x365e3b.toString().search("(((.+)+)+)+$").toString().constructor(_0x365e3b).search("(((.+)+)+)+$")})),_0x3a54e1;_0x365e3b();var _0x2445e0=function(){this.model=void 0,this.context=void 0,this.texture=void 0,this.subTextureInfo=void 0};_0x2445e0.prototype.set=function(e,t,i,n,r){this.model=t,this.context=e,this.texture=i,this.subTextureInfo=n,this.textureLod=r},_0x2445e0.prototype.execute=function(){var e=this.subTextureInfo;if(!this.texture.ready){if(!this.textureLod)return this.texture.arrayBufferView=e.arrayBufferView,void this.texture.init();this.texture.init()}this.texture.copyFrom({xOffset:e.xOffset,yOffset:e.yOffset,width:e.width,height:e.height,arrayBufferView:e.arrayBufferView})};var _0x2e1a14=(_0x3eba8d=!0,function(e,t){var i=_0x3eba8d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3eba8d=!1,i}),_0x23597d=_0x2e1a14(void 0,(function(){return _0x23597d.toString().search("(((.+)+)+)+$").toString().constructor(_0x23597d).search("(((.+)+)+)+$")})),_0x3eba8d;_0x23597d();var _0x21e433="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nattribute vec4 aPosition; \n#ifdef USE_VertexWeight \n attribute float aVertexWeight; \n #ifdef MultiTemporalWeight \n attribute float aVertexWeight_1; \n #endif \n#endif \n#ifdef HAS_NORMAL \n attribute vec3 aNormal; \n#endif \n#ifdef TexCoord \n attribute vec4 aTexCoord0; \n#endif \n#ifdef VertexColor \nattribute vec4 aColor; \n#endif \nvarying float v_pixelDistance; \nvarying vec4 vPosition; \n#ifdef COMPRESS_TEXCOORD \n#ifdef TexCoord \n attribute vec4 aTexCoordZ0; \n#endif \n#endif \n#ifdef COMPUTE_W_VALUE \n varying float wValue; \n#endif \n#ifdef HYPSOMETRIC \n uniform sampler2D uHypsometricTexture; \n#endif \n varying vec4 vColor; \n varying vec4 vPositionMC; \n#include <computeWValue>\n#ifdef HYPSOMETRIC \nvec4 computeContourMapColor(float fValue) \n{ \n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0); \n float contourRate = (fValue - uHypFloor) / threshold; \n float finalCoord = clamp(contourRate, 0.0, 1.0); \n float count = floor(finalCoord * 16.0); \n float y = (count*2.0 + 1.0)/32.0; \n float x = fract(finalCoord*16.0); \n if(y > 1.0) \n { \n x = 1.0; \n } \n vec2 contourCoord = vec2(x, y); \n return texture2D(uHypsometricTexture, contourCoord).rgba; \n} \nvec4 getHypsometricColor(vec4 oriColor, float fValue) \n{ \n vec4 contourMapColor = vec4(0.0); \n float finalOpacity = uHypOpacity; \n if(fValue > uHypMaxVisibleValue || fValue < uHypMinVisibleValue) \n { \n return uNoValueColor * oriColor; \n } \n contourMapColor = computeContourMapColor(fValue); \n finalOpacity *= sign(uHypContourFillMode); \n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity); \n return mixColor; \n} \n#endif \n \nvec3 realNormal; \nvoid main() \n{ \n#ifdef COMPRESS_VERTEX \n vec4 vertexPos = vec4(1.0); \n vertexPos = decode_position_min + aPosition * decode_position_normConstant; \n#else \n vec4 vertexPos = aPosition; \n#endif \n#ifdef HAS_NORMAL \n realNormal = aNormal; \n #ifdef COMPRESS_NORMAL \n realNormal = czm_octDecode(aNormal.xy, normal_rangeConstant).zxy; \n #endif \n#endif \n float oriVertexW = computeWValue(vertexPos); \n vertexPos.w = 1.0; \nvec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n #ifdef COMPRESS_COLOR \n #ifdef MeshOPT_Compress \n vertexColor = aColor; \n #else \n vertexColor = aColor / 255.0; \n #endif \n #else \n vertexColor = aColor; \n #endif \n#endif \n vColor = vertexColor*uFillForeColor; \n vPositionMC.xyz = vertexPos.xyz; \n vPositionMC.w = 0.0; \n gl_Position = uViewProjection * uModelMatrix * vertexPos; \n#ifdef HYPSOMETRIC \n vColor = getHypsometricColor(vColor, wValue); \n#endif \n v_pixelDistance = 2.0 / uPointSize;\n gl_PointSize = uPointSize; \n vPosition = uView * uModelMatrix * vertexPos; \n}",_0x58d074=(_0x38dd62=!0,function(e,t){var i=_0x38dd62?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38dd62=!1,i}),_0x5201dc=_0x58d074(void 0,(function(){return _0x5201dc.toString().search("(((.+)+)+)+$").toString().constructor(_0x5201dc).search("(((.+)+)+)+$")})),_0x38dd62;_0x5201dc();var _0x589347="#ifdef GL_OES_standard_derivatives \n#extension GL_OES_standard_derivatives : enable \n#endif \n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#ifdef COMPUTE_W_VALUE \n varying float wValue; \n#endif \nvarying vec4 vColor; \nvarying vec4 vPositionMC; \nvarying vec4 vPosition; \nvarying float v_pixelDistance; \n#include <preClipFS>\n#include <adjustColor>\n#include <clip>\nvoid main() \n{ \n preClip();\n vec4 finalColor = vColor; \n#ifdef ADJUST_COLOR \n finalColor.rgb = adjustColor(finalColor.rgb);\n#endif \n float distanceToCenter = length(gl_PointCoord - vec2(0.5)); \n float maxDistance = max(0.0, 0.5 - v_pixelDistance); \n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter); \n finalColor.a *= wholeAlpha; \n\tif(finalColor.a < 0.1) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef CLIP \n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n#ifdef PREPASS\n gl_FragData[0] = vPosition;\n gl_FragData[1] = vec4(0.0, 0.0, 0.0, 1.0);\n gl_FragData[2] = vec4(0.0, 0.0, 0.0, 1.0);\n#else\n gl_FragColor = czm_gammaCorrect(finalColor); \n#endif\n \n}",_0x467489=(_0x236f57=!0,function(e,t){var i=_0x236f57?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x236f57=!1,i}),_0x451ed6=_0x467489(void 0,(function(){return _0x451ed6.toString().search("(((.+)+)+)+$").toString().constructor(_0x451ed6).search("(((.+)+)+)+$")})),_0x236f57;_0x451ed6();var _0x2cd408="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <getMetersPerPixel>\n\n#ifdef COMPRESS_VERTEX\n attribute aPosition : vec4<u32>;\n#else\n attribute aPosition : vec4<f32>;\n#endif\n#ifdef HAS_NORMAL\n #ifdef COMPRESS_NORMAL\n attribute aNormal : vec2<i32>;\n #else\n attribute aNormal : vec3<f32>;\n #endif\n#endif\n#ifdef TexCoord\n attribute aTexCoord0 : vec4<f32>;\n#endif\n#ifdef VertexColor\n attribute aColor : vec4<u32>;\n#endif\n#ifdef USE_VertexWeight\n attribute aVertexWeight : f32;\n#endif\nattribute offset : vec2<f32>;\nvarying v_pixelDistance : f32;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vPosition : vec4<f32>;\nvarying vOffset : vec2<f32>;\n// #ifdef COMPUTE_W_VALUE\n// uniform float uHypHasColorByHeight;\n// varying float wValue;\n// #endif\n// #ifdef HYPSOMETRIC\n// uniform sampler2D uHypsometricTexture;\n// uniform float uHypOpacity;\n// uniform float uHypContourFillMode;\n// uniform float uHypFloor;\n// uniform float uHypCeil;\n// uniform float uHypMaxVisibleValue;\n// uniform float uHypMinVisibleValue;\n// uniform vec4 uNoValueColor;\n// #endif\n// #ifdef EXCAVATION\n// varying vec4 vExcavationVertexPos;\n// #endif\n// #ifdef W_VISIBLE\n// uniform sampler2D uCategorieTexture;\n// uniform float uMaxCategory;\n// uniform float uMinCategory;\n// uniform float uCategoryWidht;\n// #endif\n#ifdef COMPUTE_W_VALUE \n varying wValue : f32; \n#endif \n#ifdef HYPSOMETRIC \n var uHypsometricTexture : texture_2d<f32>;\n var uHypsometricTextureSampler : sampler;\n#endif\n#include <computeWValue> \n#ifdef HYPSOMETRIC \nfn computeContourMapColor(fValue : f32) -> vec4<f32> \n{ \n var threshold = clamp(abs(Layer.uHypCeil - Layer.uHypFloor), 0.000001, 20000.0); \n var contourRate = (fValue - Layer.uHypFloor) / threshold; \n var finalCoord = clamp(contourRate, 0.0, 1.0); \n var count = floor(finalCoord * 16.0); \n var y = (count*2.0 + 1.0)/32.0; \n var x = fract(finalCoord*16.0); \n if(y > 1.0) \n { \n x = 1.0; \n } \n var contourCoord = vec2(x, y); \n return textureSampleLevel(uHypsometricTexture, uHypsometricTextureSampler, contourCoord, 0.0f).rgba; \n} \nfn getHypsometricColor(oriColor : vec4<f32>, fValue : f32) -> vec4<f32> \n{ \n var contourMapColor = vec4<f32>(0.0); \n var finalOpacity = Layer.uHypOpacity; \n if(fValue > Layer.uHypMaxVisibleValue || fValue < Layer.uHypMinVisibleValue) \n { \n return Layer.uNoValueColor * oriColor; \n } \n contourMapColor = computeContourMapColor(fValue); \n finalOpacity *= sign(Layer.uHypContourFillMode); \n var mixColor : vec4<f32> = mix(vec4<f32>(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity); \n return mixColor; \n} \n#endif \n\n//计算偏移\nfn addScreenSpaceOffset(positionEC : vec4<f32>, offset : vec2<f32>) -> vec4<f32>\n{\n var result = positionEC;\n var width=vec2<f32>(Layer.uPointSize);\n var halfsize:vec2<f32>=width*0.5;\n halfsize*=offset*2.0;\n halfsize*=getMetersPerPixel(positionEC,Scene.uPixelRatio);\n result.x=positionEC.x+halfsize.x;\n result.y=positionEC.y+halfsize.y;\n return result;\n}\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs {\n#ifdef COMPRESS_VERTEX\n var iAPosition = vec4<f32>(aPosition);\n var vertexPos : vec4<f32>;\n vertexPos = Mesh.decode_position_min + vec4<f32>(iAPosition.xyz, 1.0f) * Mesh.decode_position_normConstant;\n#else\n var vertexPos = aPosition;\n#endif\n vOffset = offset;\n var realNormal : vec3<f32>;\n#ifdef HAS_NORMAL\n realNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n var fANormal = vec2<f32>(aNormal.xy);\n realNormal = czm_octDecode(fANormal.xy, Mesh.normal_rangeConstant).zxy;\n #endif\n#endif\n var oriVertexW = computeWValue(&vertexPos);\n vertexPos.w = 1.0;\n// #ifdef EXCAVATION\n// vExcavationVertexPos = uGeoMatrix * vertexPos;\n// #endif\n var vertexColor = vec4<f32>(1.0);\n#ifdef VertexColor\n var fColor = vec4<f32>(aColor);\n vertexColor = vec4<f32>(fColor.r / 255.0f, fColor.g / 255.0f, fColor.b / 255.0f, fColor.a / 255.0f);\n#endif\n vColor = vertexColor * Layer.uFillForeColor;\n // vPositionMC.xyz = vertexPos.xyz;\n // vPositionMC.w = 0.0;\n //point\n var positionEC= Scene.uView * Mesh.uModelMatrix *vertexPos;\n positionEC=addScreenSpaceOffset(positionEC,offset);\n vPositionMC = vec4<f32>(positionEC.xyz, 1.0f);//positionMC不能一致,否者计算法向量返回为0,导致颜色为黑色\n var originPos=Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n gl_Position=Scene.uProjection * positionEC;\n //gl_Position = Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n#ifdef HYPSOMETRIC \n vColor = getHypsometricColor(vColor, wValue); \n#endif \n// #ifdef W_VISIBLE\n// vec2 categoryTexCoord = vec2(abs(oriVertexW - uMinCategory) / uCategoryWidht + 0.5 /uCategoryWidht , 0.5);\n// float category = texture2D(uCategorieTexture, categoryTexCoord).a;\n// vColor.a *= 1.0 - category;\n// #endif\n v_pixelDistance = 2.0 / Layer.uPointSize;\n vPosition = Scene.uView * Mesh.uModelMatrix * vertexPos;\n\n czm_vertexLogDepth();\n}",_0x369158=(_0x469388=!0,function(e,t){var i=_0x469388?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x469388=!1,i}),_0x56a022=_0x369158(void 0,(function(){return _0x56a022.toString().search("(((.+)+)+)+$").toString().constructor(_0x56a022).search("(((.+)+)+)+$")})),_0x469388;_0x56a022();var _0x138829="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\n#ifdef COMPUTE_W_VALUE \n varying wValue : f32; \n#endif \nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vPosition : vec4<f32>;\nvarying vOffset : vec2<f32>;\nvarying v_pixelDistance : f32;\n// #ifdef APPLY_SWIPE\n// uniform vec4 uSwipeRegion;\n// #endif\n\nfn sRGBToLinear(srgbIn : vec4<f32>) -> vec4<f32> {\n var linearOut = pow(vec3<f32>(srgbIn.x, srgbIn.y, srgbIn.z), vec3<f32>(2.200000048f, 2.200000048f, 2.200000048f));\n return vec4<f32>(linearOut.x, linearOut.y, linearOut.z, srgbIn.w);\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n// #ifdef APPLY_SPLIT\n// czm_splitClip();\n// #endif\n// #ifdef APPLY_SWIPE \n// czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n// #endif\n// #ifdef EXCAVATION\n// if(czm_executeExcavation())\n// {\n// discard;\n// }\n// #endif\n\t// if(vColor.a < 0.1)\n\t// {\n\t// \tdiscard;\n\t// }\n gl_FragColor = vColor;\n#ifdef ADJUST_COLOR\n\t//gl_FragColor.rgb = czm_adjustColor(gl_FragColor.rgb);\n#endif\n var distanceToCenter = length(vOffset);\n var maxDistance = max(0.0, 0.5 - v_pixelDistance);\n var wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n gl_FragColor.a *= wholeAlpha;\n\tif(gl_FragColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n// #ifdef CLIP\n// gl_FragColor *= czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n// #endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n\n#ifdef PREPASS\n // 相机坐标系坐标\n gl_FragData0 = vec4<f32>(0.0, 0.0, 0.0, 1.0);\n // 相机坐标系法线\n gl_FragData1 = vec4<f32>(0.0, 0.0, 1.0, 1.0);\n // 反射率\n gl_FragData2 = vec4<f32>(0.0, 0.0, 0.0, 1.0);\n#else\n //gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}",_0x569faf=(_0x5f573b=!0,function(e,t){var i=_0x5f573b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f573b=!1,i}),_0x4f89c2=_0x569faf(void 0,(function(){return _0x4f89c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f89c2).search("(((.+)+)+)+$")})),_0x5f573b;_0x4f89c2();var _0x359ef7="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <S3MVertexFactory>\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec2 fSelected;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvarying vec4 vIsFiltByID;\nvarying vec3 v_positionEC;\nvarying vec3 vNormalEC;\nvarying vec4 vPosition;\n\n#ifdef NORMAL_AND_DEPTH\n varying vec4 oriVertex;\n varying vec3 perVertexNormals;\n varying float depthInCamera;\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n varying float fSelectedForSilh;\n#endif\n \n#ifdef PBR_THEME\n varying float vPBRIndex;\n#endif\n\n#ifdef POINT\n varying float v_pixelDistance;\n#endif\n\n#ifdef COMPUTE_W_VALUE\n uniform float uHypHasColorByHeight;\n varying float wValue;\n#endif\n\n#include <calculatePolyTexCoord>\n#include <computeWValue>\n#include <getVertexByFlatten>\n#include <getFusionModePosition>\n#include <getUVMatrixDecl>\n#include <setAlphaByWValue>\n#include <getPBRParamFromTexture>\n#include <s3mComputeVaryings>\n#include <getNormalMatrix>\n#include <vertexLogDepthDecl>\n\nvoid main()\n{\n VertexFactoryIntermediates intermediates = getVertexFactoryIntermediates();\n vec4 vertexPos = intermediates.position;\n vec3 realNormal = intermediates.normal;\n vTexCoord.xy = intermediates.uv0.xy;\n vTexCoord.zw = intermediates.uv1.xy;\n vec4 vertexColor = intermediates.vertexColor;\n\n#ifdef FALTTEN\n vertexPos = getVertexByFlatten(vertexPos, uTranslationAndBottom.w);\n#endif\n\n vec4 localPos = uGeoMatrix * vertexPos;\n vec4 oriLocalPos = localPos;\n float oriVertexW = computeWValue(localPos);\n #ifdef MultiTemporalWeight\n vertexPos.z += localPos.z - oriLocalPos.z;\n #endif\n vertexPos.w = 1.0;\n\n#ifdef REPLACE_COLOR_TYPE\n vertexColor = uFillForeColor;\n#else\n vertexColor *= uFillForeColor;\n#endif\n vIsFiltByID = vec4(0.0);\n#ifdef BatchTable\n float batchTableID = intermediates.batchTableID;\n vSecondColor = czm_batchTable_pickColor(batchTableID);\n vec4 operationType = czm_batchTable_operation(batchTableID);\n vec4 objsColor = czm_batchTable_color(batchTableID);\n vec3 translate = uTranslationAndBottom.xyz;\n #ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(batchTableID).x + 0.1;\n #endif\n #ifdef Translation\n translate = czm_batchTable_translate(batchTableID);\n #endif\n #ifdef SILHOUETTE_SELECT_TYPE\n fSelectedForSilh = 0.0;\n czm_s3mBatchOperation(operationType, objsColor, vertexColor, vertexPos, vIsFiltByID, translate, fSelectedForSilh);\n #endif\n #ifndef SILHOUETTE_SELECT_TYPE\n fSelected = vec2(0.0);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor, vertexPos, vIsFiltByID, translate, fSelected);\n #endif\n#endif // BatchTable\n vColor = vertexColor;\n vPositionMC.xyz = vertexPos.xyz;\n vPositionMC.w = 0.0;\n vPosition = uViewProjection * uModelMatrix * vertexPos;\n#ifdef FusionMode\n gl_Position = getFusionModePosition(vertexPos);\n#else\n gl_Position = vPosition;\n#endif\n#ifdef COMPUTE_TEXCOORD\n #ifdef TextureBatch\n vec4 xywh = czm_batchTable_xywh_BaseTex(getTextureBatchId0(aTextureBatchId));\n vec4 xywh2 = vec4(0.0);\n #ifdef MULTI_TEX\n xywh2 = czm_batchTable_xywh_BakeTex(getTextureBatchId1(aTextureBatchId));\n #endif\n getUVMatrixForBatch(xywh, xywh2);\n #else\n getUVMatrix(intermediates.uv0, intermediates.uv1);\n #endif\n#endif // COMPUTE_TEXCOORD \n vec4 ec = (uView * uModelMatrix * vertexPos);\n v_positionEC = (ec / ec.w).xyz;\n vNormalEC = vec3(0.0);\n#ifdef HAS_LIGHT\n #ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n vPositionMC.w = 1.0;\n mat3 normalMatrix = getNormalMatrix(uView, uModelMatrix);\n #ifdef Instance\n vNormalEC = normalMatrix * intermediates.normalInstance;\n #else\n vNormalEC = normalMatrix * realNormal;\n #endif\n }\n #endif\n#endif\n#ifdef NORMAL_AND_DEPTH\n oriVertex = vertexPos;\n vec4 position = uView * vertexPos;\n depthInCamera = (position.z - czm_depthRange.near) / (czm_depthRange.far - czm_depthRange.near);\n perVertexNormals = vec3(0.0,0.0,0.0);\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n perVertexNormals = normalize(mat3(uView * uModelMatrix) * realNormal);\n }\n#endif\n#endif\n#ifdef W_VISIBLE\n setAlphaByWValue(oriVertexW, vColor);\n#endif\n\n#ifdef VERTEX_CAPTURE\n vSecondColor = uView * uModelMatrix * vertexPos;\n gl_PointSize = 12.0;\n#endif\n\n#ifdef POINT\n #ifndef WEBGPU\n gl_PointSize = uPointSize;\n #endif\n v_pixelDistance = 2.0 / uPointSize;\n#endif\n\n#ifdef USE_BatchPBR\n getPBRParamFromTexture(intermediates.pbrTextureUV.xy);\n#endif\n\n s3mComputeVaryings(vertexPos);\n \n vertexLogDepth();\n}",_0x5b8fb7=(_0x328a9a=!0,function(e,t){var i=_0x328a9a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x328a9a=!1,i}),_0x87854b=_0x5b8fb7(void 0,(function(){return _0x87854b.toString().search("(((.+)+)+)+$").toString().constructor(_0x87854b).search("(((.+)+)+)+$")})),_0x328a9a;_0x87854b();var _0x1931a7="#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n#endif\n#ifdef PREPASS\n#extension GL_EXT_draw_buffers : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <S3MVolumeUboDecl>\n#include <LightUboDecl>\n\nvarying vec4 vIsFiltByID;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvarying vec3 v_positionEC;\nvarying vec4 vSecondColor;\nvarying vec3 vNormalEC;\n \n#ifdef COMPUTE_W_VALUE\n varying float wValue;\n#endif\n\n#if defined(REPLACE_SELECT_TYPE) || defined(REPLACE_COLOR_TYPE)\n varying vec2 fSelected;\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n varying float fSelectedForSilh;\n#endif\n\n#ifdef SKETCH_MODE\n uniform vec4 uLineColor;\n uniform float uLineWidth;\n#endif\n\n#ifdef Height_Map\nvec4 renderHeightMap()\n{\n return czm_packValue(wValue);\n}\n#endif\n\n#include <SRGBtoLINEAR>\n#include <renderNormal>\n#include <renderNormalAndDepth>\n#include <renderPrePass>\n#include <preClipFS>\n#include <calcTexCoordDecl>\n#include <getTextureColorDecl>\n#include <getNormalMatrix>\n#include <getNormalEC>\n\n#ifdef SHADOW_MAP\n #include <ShadowUboDecl>\n #include <shadowReceive>\n#endif\n\n#ifdef HAS_LIGHT\n #include <shaderModelBase>\n #ifdef BRDF\n #include <brdf>\n #else\n #include <blinnPhong>\n #endif\n#endif\n\n#include <S3MOperationFSDecl>\n#include <HypSometric>\n#include <getEmissiveTextureAtlasColor>\n#include <adjustColor>\n#include <clip>\n#include <sketchMode>\n#include <writeLogDepthDecl>\n\nvec4 shaderModel(vec4 baseColor, vec4 realTexCoord, vec2 oriTexCoord)\n{\n#ifndef HAS_LIGHT\n #ifdef SHADOW_MAP\n float shadow = getShadowVisibility(vec4(v_positionEC, 1.0), getNormalEC(vNormalEC, uModelMatrix, vPositionMC.xyz), -v_positionEC.z);\n return vec4(LINEARtoSRGB(baseColor.rgb * shadow), baseColor.a);\n #else\n return vec4(LINEARtoSRGB(baseColor.rgb), baseColor.a);\n #endif\n#else\n #ifdef BRDF\n return brdf(baseColor, realTexCoord.xy, oriTexCoord, v_positionEC, vPositionMC.xyz, vNormalEC, uModelMatrix);\n #else\n return blinnPhong(baseColor, realTexCoord.xy, oriTexCoord, v_positionEC, vPositionMC.xyz, vNormalEC, uModelMatrix);\n #endif\n#endif\n \n}\n\nvec4 renderColor()\n{\n preClip();\n vec4 realTexCoord = vec4(0.0);\n vec2 oriTexCoord = vec2(0.0);\n vec4 baseColor = vColor;\n vec4 baseTexColor = vec4(1.0);\n vec4 finalColor;\n#ifdef Has_Texture\n baseTexColor = getTextureColorForS3M(realTexCoord);\n#endif\n\n baseColor *= baseTexColor * uDiffuseColor;\n vec2 texCoord = vec2(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n\n finalColor = shaderModel(baseColor, realTexCoord, texCoord); \n\n#ifdef ADJUST_COLOR\n finalColor.rgb = adjustColor(finalColor.rgb);\n#endif\n\n#ifdef REPLACE_COLOR_TYPE\n if(fSelected.y > 0.9)\n {\n finalColor = vColor;\n }\n#endif\n\n#ifdef REPLACE_SELECT_TYPE\n if(fSelected.x > 0.9)\n {\n finalColor = vColor;\n }\n#endif\n\n#ifdef HYPSOMETRIC\n\tif(uHypsometricVisible>0.5)\n\t{\n #ifdef Volume2\n vec4 volColor = texture2D(uVolumeTexture, vec2(vTexCoord.x, 1.0 - vTexCoord.y));\n finalColor = getHypsometricColor(finalColor, volColor);\n #else\n finalColor = getHypsometricColor(finalColor, wValue);\n #endif\n }\n#endif\n\n#ifdef VISIBLEDISTANCEMAX\n getAlphaByDistance(v_positionEC, finalColor);\n#endif\n\n#ifdef OVERLAY\n getOverlayColor(finalColor);\n#endif\n\n#ifdef HORIZONTAL_LINE\n finalColor = getHorizontalColor(finalColor, wValue);\n#endif\n\n#ifdef IMAGERY\n getImageryColor(finalColor);\n#endif\n\n#ifdef FLOOD_ANALYSIS\n getFloodWaterColor(finalColor);\n#endif\n\n#ifdef TRANSPARENT_BACK_COLOR\n transparentColorClip(finalColor);\n#endif\n\n#ifdef SKETCH_MODE\n finalColor = sketchMode(finalColor, uLineColor, uLineWidth);\n#endif // SKETCH_MODE\n\n#ifdef CLIP\n #ifdef CLIP_FILT_BY_ID\n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n #else\n finalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n #endif\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n if(uSelectColorType == 2.)\n {\n if(fSelectedForSilh > 0.9)\n {\n finalColor = sketchMode(finalColor, uSelColor, 3.0);\n }\n }\n else\n {\n finalColor = sketchMode(finalColor, uSelColor, 3.0);\n }\n#endif // SILHOUETTE_SELECT_TYPE\n\n#ifdef Only_LineColor\n finalColor = uLineColor;\n#endif\n\n#ifdef EMISSION_TEXTURE_ATLAS\n #ifdef TexCoord\n finalColor.rgb += getEmissiveTextureAtlasColor(wValue, vTexCoord.xy);\n #else\n finalColor.rgb += getEmissiveTextureAtlasColor(wValue);\n #endif\n#else\n finalColor.rgb *= uEmissionColor.rgb;\n#endif\n\n if(finalColor.a == 0.0)\n {\n discard;\n }\n return finalColor;\n}\nvoid main()\n{\n#ifdef Height_Map \n gl_FragColor = renderHeightMap();\n return;\n#endif\n#ifdef NORMAL\n gl_FragColor = renderNormal(vPositionMC.xyz);\n return;\n#endif\n#ifdef NORMAL_AND_DEPTH\n gl_FragColor = renderNormalAndDepth(vPositionMC.xyz);\n return;\n#endif\n\n#ifdef PREPASS\n vec2 texCoord = vec2(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n float roughness = getRoughness(texCoord);\n renderPrePass(roughness);\n#else\n gl_FragColor = renderColor();\n#endif\n#ifdef LOG_DEPTH\n writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}",_0x490ac3=(_0x5a04cc=!0,function(e,t){var i=_0x5a04cc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a04cc=!1,i}),_0x5dae44=_0x490ac3(void 0,(function(){return _0x5dae44.toString().search("(((.+)+)+)+$").toString().constructor(_0x5dae44).search("(((.+)+)+)+$")})),_0x5a04cc;_0x5dae44();var _0x36d142="\n\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\n#ifdef USE_VertexWeight\n attribute aVertexWeight : f32;\n#endif\n\n#include <S3MVertexFactory>\n\nvarying vSecondColor : vec4<f32>;\nvarying vTexCoord : vec4<f32>;\nvarying fSelected : f32;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vIsFiltByID : vec4<f32>;\nvarying v_positionEC : vec3<f32>;\nvarying vNormalEC : vec3<f32>;\n#ifdef COMPUTE_W_VALUE\n varying wValue : f32;\n#endif\n#ifdef W_VISIBLE\n #include <setAlphaByWValue>\n#endif\n#ifdef NORMAL_AND_DEPTH\n varying oriVertex : vec4<f32>;\n varying perVertexNormals : vec3<f32>;\n#endif\n#ifdef SILHOUETTE_SELECT_TYPE\n varying fSelectedForSilh : f32;\n#endif\n#include <calculatePolyTexCoord>\n#include <getUVMatrixDecl>\n#include <computeWValue>\n#include <getVertexByFlatten>\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs {\n var intermediates = GetVertexFactoryIntermediates();\n var vertexPos = intermediates.position;\n var realNormal = intermediates.normal;\n vTexCoord = vec4<f32>(intermediates.uv0.x, intermediates.uv0.y, intermediates.uv1.x, intermediates.uv1.y);\n\n var vertexColor = intermediates.vertexColor;\n\n#ifdef FALTTEN\n vertexPos = getVertexByFlatten(vertexPos, Layer.uTranslationAndBottom.w);\n#endif\n\n var localPos = Mesh.uGeoMatrix * vertexPos;\n var oriLocalPos = localPos;\n var oriVertexW = computeWValue(&localPos);\n\n vertexPos.w = 1.0f;\n\n var oldVertexColor = vertexColor;\n vertexColor = oldVertexColor * Layer.uFillForeColor;\n vIsFiltByID = vec4<f32>(0.0f);\n\n#ifdef BatchTable\n var batchTableID = intermediates.batchTableID;\n vSecondColor = czm_batchTable_pickColor(batchTableID);\n var operationType = czm_batchTable_operation(batchTableID);\n var objsColor = czm_batchTable_color(batchTableID);\n var translate = Layer.uTranslationAndBottom.xyz;\n #ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(batchTableID).x + 0.1f;\n #endif\n #ifdef Translation\n translate = czm_batchTable_translate(batchTableID);\n #endif\n var outIsFiltByID = vIsFiltByID;\n var outSelected = fSelected;\n #ifdef SILHOUETTE_SELECT_TYPE\n var outFSelectedForSilh = fSelectedForSilh;\n fSelectedForSilh = 0.0;\n czm_s3mBatchOperationForSilhouette(operationType, objsColor, &vertexColor, &vertexPos, &outIsFiltByID, translate, &outFSelectedForSilh);\n fSelectedForSilh = outFSelectedForSilh;\n #endif\n #ifndef SILHOUETTE_SELECT_TYPE\n fSelected = 0.0f;\n czm_s3mBatchOperation(operationType, objsColor, Layer.uSelColor, translate, &vertexColor, &vertexPos, &outIsFiltByID, &outSelected);\n vIsFiltByID = outIsFiltByID;\n fSelected = outSelected;\n #endif\n#endif // BatchTable\n#ifdef NORMAL_AND_DEPTH\n oriVertex = vertexPos;\n var position : vec4<f32> = Scene.uView * vertexPos;\n perVertexNormals = vec3<f32>(0.0,0.0,0.0);\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n var modelViewMat4 = Scene.uView * Mesh.uModelMatrix;\n var modelViewMat3 = mat3x3<f32>(modelViewMat4[0][0], modelViewMat4[1][0], modelViewMat4[2][0], modelViewMat4[0][1], modelViewMat4[1][1], modelViewMat4[2][1], modelViewMat4[0][2], modelViewMat4[1][2], modelViewMat4[2][2]);\n perVertexNormals = normalize(modelViewMat3 * realNormal);\n }\n#endif\n#endif\n#ifdef W_VISIBLE\n setAlphaByWValue(oriVertexW, &vertexColor);\n#endif\n\n vColor = vertexColor;\n vPositionMC = vec4<f32>(vertexPos.xyz, 1.0f);\n\n gl_Position = Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n#ifdef COMPUTE_TEXCOORD\n #ifdef TextureBatch\n var xywh = czm_batchTable_xywh_BaseTex(getTextureBatchId0(aTextureBatchId));\n var xywh2 = vec4(0.0);\n #ifdef MULTI_TEX\n xywh2 = czm_batchTable_xywh_BakeTex(getTextureBatchId1(aTextureBatchId));\n #endif\n getUVMatrixForBatch(xywh, xywh2);\n #else\n getUVMatrix(intermediates.uv0, intermediates.uv1);\n #endif\n#endif // COMPUTE_TEXCOORD\n var ec = (Scene.uView * Mesh.uModelMatrix * vertexPos);\n v_positionEC = (ec / ec.w).xyz;\n vNormalEC = vec3(0.0);\n#ifdef HAS_LIGHT\n #ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n vPositionMC.w = 1.0;\n var normalMatrix = czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix);\n #ifdef Instance\n vNormalEC = normalMatrix * intermediates.normalInstance;\n #else\n vNormalEC = normalMatrix * realNormal;\n #endif\n }\n #endif\n#endif\n\n#ifdef USE_BatchPBR\n czm_getPBRParamFromTexture(intermediates.pbrTextureUV);\n#endif\n\n czm_s3mComputeVaryings(vertexPos);\n \n czm_vertexLogDepth();\n}",_0x5a01fc=(_0x924c40=!0,function(e,t){var i=_0x924c40?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x924c40=!1,i}),_0x29e37c=_0x5a01fc(void 0,(function(){return _0x29e37c.toString().search("(((.+)+)+)+$").toString().constructor(_0x29e37c).search("(((.+)+)+)+$")})),_0x924c40;_0x29e37c();var _0x355815="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <LightUBODecl>\n\nvarying vSecondColor : vec4<f32>;\nvarying vTexCoord : vec4<f32>;\nvarying fSelected : f32;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vIsFiltByID : vec4<f32>;\nvarying v_positionEC : vec3<f32>;\nvarying vNormalEC : vec3<f32>;\nvarying vOffset : vec2<f32>;\n#include <preClipFS>\n#include <getNormalMatrix>\n#include <getNormalEC>\n\n#ifdef HAS_LIGHT\n #include <shaderModelBase>\n #ifdef BRDF\n #include <brdf>\n #else\n #include <blinnPhong>\n #endif\n#endif\n\nfn shaderModel(baseColor : vec4<f32>, realTexCoord : vec4<f32>) -> vec4<f32>\n{\n#ifndef HAS_LIGHT\n return baseColor;\n#else\n #ifdef BRDF\n return brdf(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #else\n return blinnPhong(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #endif\n#endif\n}\n\n#include <getTextureColorDecl>\n\nfn renderColor() -> vec4<f32> {\n \n var realTexCoord = vec4<f32>(0.0);\n var baseColor = vColor;\n var baseTexColor = vec4<f32>(1.0);\n var finalColor = vec4<f32>(1.0);\n#ifdef COMPUTE_TEXCOORD\n var firstColor = vec4<f32>(1.0);\n var secColor = vec4<f32>(1.0);\n baseTexColor = getTextureColorForS3M(&(realTexCoord), &(firstColor), &(secColor));\n#endif\n baseColor *= baseTexColor;\n baseColor *= Material.uDiffuseColor;\n finalColor = shaderModel(baseColor, realTexCoord);\n\n preClip();\n\n#ifdef CLIP\n #ifdef CLIP_FILT_BY_ID\n finalColor *= czm_clip(Scene.uView * Mesh.uModelMatrix * vec4<f32>(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n #else\n finalColor *= czm_clip(Scene.uView * Mesh.uModelMatrix * vec4<f32>(vPositionMC.xyz, 1.0), 1.0);\n #endif // CLIP_FILT_BY_ID\n#endif // CLIP\n\n if(vColor.a == 0.0)\n {\n discard;\n }\n\n var disFromCenter = length(vOffset);\n if(disFromCenter > 0.5){\n discard;\n }\n return finalColor;\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n#ifdef PREPASS\n var texCoord = vec2<f32>(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n var reflectivity = 0.0;\n // 相机坐标系坐标\n gl_FragData0 = vec4<f32>(v_positionEC, 1.0);\n // 相机坐标系法线\n gl_FragData1 = vec4<f32>(0.0, 0.0, 1.0, 1.0);\n // 反射率\n gl_FragData2 = vec4<f32>(reflectivity, reflectivity, reflectivity, 1.0);\n#else\n gl_FragColor = renderColor();\n#endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}",_0x545649=(_0x53194e=!0,function(e,t){var i=_0x53194e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53194e=!1,i}),_0x53f630=_0x545649(void 0,(function(){return _0x53f630.toString().search("(((.+)+)+)+$").toString().constructor(_0x53f630).search("(((.+)+)+)+$")})),_0x53194e;_0x53f630();var _0x108a30="\n\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\n#ifdef USE_VertexWeight\n attribute aVertexWeight : f32;\n#endif\n\n#include <S3MVertexFactory>\n\nattribute offset:vec2<f32>;\nvarying vSecondColor : vec4<f32>;\nvarying vTexCoord : vec4<f32>;\nvarying fSelected : f32;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vIsFiltByID : vec4<f32>;\nvarying v_positionEC : vec3<f32>;\nvarying vNormalEC : vec3<f32>;\nvarying vOffset : vec2<f32>;\n\n#include <getUVMatrixDecl>\n#include <getMetersPerPixel>\n\n//计算偏移\nfn addScreenSpaceOffset(positionWC : vec4<f32>, offset : vec2<f32>) -> vec4<f32>\n{\n var result = positionWC;\n var width=vec2<f32>(Layer.uPointSize);\n var halfsize:vec2<f32>=width*0.5;\n halfsize*=offset*2.0;\n halfsize*=getMetersPerPixel(positionWC,Scene.uPixelRatio);\n result.x=positionWC.x+halfsize.x;\n result.y=positionWC.y+halfsize.y;\n return result;\n}\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs {\n var intermediates = GetVertexFactoryIntermediates();\n var vertexPos = intermediates.position;\n var realNormal = intermediates.normal;\n vTexCoord = vec4<f32>(intermediates.uv0.x, intermediates.uv0.y, intermediates.uv1.x, intermediates.uv1.y);\n vOffset = offset;\n \n var vertexColor = intermediates.vertexColor;\n vertexPos.w = 1.0f;\n\n var oldVertexColor = vertexColor;\n vertexColor = oldVertexColor * Layer.uFillForeColor;\n vIsFiltByID = vec4<f32>(0.0f);\n\n#ifdef BatchTable\n var batchTableID = intermediates.batchTableID;\n vSecondColor = czm_batchTable_pickColor(batchTableID);\n var operationType = czm_batchTable_operation(batchTableID);\n var objsColor = czm_batchTable_color(batchTableID);\n var translate = Layer.uTranslationAndBottom.xyz;\n #ifdef PBR_THEME\n vPBRIndex = czm_batchTable_pbrMaterialIndex(batchTableID).x + 0.1f;\n #endif\n #ifdef Translation\n translate = czm_batchTable_translate(batchTableID);\n #endif\n fSelected = 0.0f;\n var outIsFiltByID = vIsFiltByID;\n var outSelected = fSelected;\n czm_s3mBatchOperation(operationType, objsColor, Layer.uSelColor, translate, &vertexColor, &vertexPos, &outIsFiltByID, &outSelected);\n vIsFiltByID = outIsFiltByID;\n fSelected = outSelected;\n#endif // BatchTable\n\n //vColor = vertexColor;\n vColor = vertexColor;\n fSelected = 0.0f;\n //point\n var positionEC= Scene.uView * Mesh.uModelMatrix *vertexPos;\n positionEC=addScreenSpaceOffset(positionEC,offset);\n vPositionMC = vec4<f32>(positionEC.xyz, 1.0f);//positionMC不能一致,否者计算法向量返回为0,导致颜色为黑色\n var originPos=Scene.uViewProjection * Mesh.uModelMatrix * vertexPos;\n gl_Position=Scene.uProjection * positionEC;\n#ifdef COMPUTE_TEXCOORD\n getUVMatrix(intermediates.uv0, intermediates.uv1);\n#endif // COMPUTE_TEXCOORD\n var ec = (Scene.uView * Mesh.uModelMatrix * vertexPos);\n v_positionEC = (ec / ec.w).xyz;\n#ifdef HAS_NORMAL\n if(length(realNormal) > 0.8)\n {\n vNormalEC = czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * realNormal;\n }\n#endif\n\n#ifdef USE_BatchPBR\n czm_getPBRParamFromTexture(intermediates.pbrTextureUV);\n#endif\n\n czm_s3mComputeVaryings(vertexPos);\n \n czm_vertexLogDepth();\n}",_0x2e904c=(_0x51609b=!0,function(e,t){var i=_0x51609b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51609b=!1,i}),_0x1f7540=_0x2e904c(void 0,(function(){return _0x1f7540.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f7540).search("(((.+)+)+)+$")})),_0x51609b;_0x1f7540();var _0x4c43d7="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n#include <LightUBODecl>\n#ifdef Volume\n#include <S3MVolumeUboDecl>\n#endif\n\nvarying vSecondColor : vec4<f32>;\nvarying vTexCoord : vec4<f32>;\nvarying vColor : vec4<f32>;\nvarying vPositionMC : vec4<f32>;\nvarying vIsFiltByID : vec4<f32>;\nvarying v_positionEC : vec3<f32>;\nvarying vNormalEC : vec3<f32>;\n#ifdef COMPUTE_W_VALUE\n varying wValue : f32;\n#endif\n\n#if defined(REPLACE_SELECT_TYPE) || defined(REPLACE_COLOR_TYPE)\n varying fSelected : f32;\n#endif\n\n#ifdef SILHOUETTE_SELECT_TYPE\n varying fSelectedForSilh : f32;\n #include <sketchMode>\n#endif\n\n#include <S3MOperationFSDecl>\n#include <HypSometric>\n#include <preClipFS>\n#include <clip>\n#include <renderNormal>\n#include <renderNormalAndDepth>\n\n#ifdef SHADOW_MAP\n #include <ShadowUboDecl>\n #include <shadowReceive>\n#endif\n\n#ifdef HAS_LIGHT\n #include <shaderModelBase>\n #ifdef BRDF\n #include <brdf>\n #else\n #include <blinnPhong>\n #endif\n#else\nfn sRGBToLinear(srgbIn : vec4<f32>) -> vec4<f32> {\n var linearOut = pow(vec3<f32>(srgbIn.x, srgbIn.y, srgbIn.z), vec3<f32>(2.200000048f, 2.200000048f, 2.200000048f));\n return vec4<f32>(linearOut.x, linearOut.y, linearOut.z, srgbIn.w);\n}\n\nfn LINEARtoSRGB(linearIn : vec3<f32>) -> vec3<f32>\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\n\n#endif\n\nfn shaderModel(baseColor : vec4<f32>, realTexCoord : vec4<f32>) -> vec4<f32>\n{\n#ifndef HAS_LIGHT\n #ifdef SHADOW_MAP\n var shadow = getShadowVisibility(vec4<f32>(v_positionEC, 1.0), getNormalEC(vNormalEC, Mesh.uModelMatrix, vPositionMC.xyz), -v_positionEC.z);\n return vec4(LINEARtoSRGB(baseColor.rgb * shadow), baseColor.a);\n #else\n return vec4(LINEARtoSRGB(baseColor.rgb), baseColor.a);\n #endif\n#else\n #ifdef BRDF\n return brdf(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #else\n return blinnPhong(baseColor, realTexCoord.xy, vTexCoord.xy, v_positionEC, vPositionMC, vNormalEC);\n #endif\n#endif\n}\n\n#include <calcTexCoordDecl>\n#include <getTextureColorDecl>\n#include <getNormalMatrix>\n#include <getNormalEC>\n#include <getEmissiveTextureAtlasColor>\n#include <adjustColor>\n\nfn renderColor() -> vec4<f32> {\n \n var realTexCoord = vec4<f32>(0.0);\n var baseColor = vColor;\n var baseTexColor = vec4<f32>(1.0);\n var finalColor = vec4<f32>(1.0);\n#ifdef Has_Texture\n var firstColor = vec4<f32>(1.0);\n var secColor = vec4<f32>(1.0);\n baseTexColor = getTextureColorForS3M(&(realTexCoord), &(firstColor), &(secColor));\n #if !defined(INVALID_OBLIQUE) && !defined(NO_TEXCOORD)\n #ifndef TextureBatch\n if(vTexMatrix.z < 0.0){\n baseTexColor = vec4<f32>(1.0);\n }\n #endif\n #endif\n#endif\n baseColor *= baseTexColor;\n baseColor *= Material.uDiffuseColor;\n finalColor = shaderModel(baseColor, realTexCoord);\n\n preClip();\n#ifdef ADJUST_COLOR\n finalColor.r = adjustColor(finalColor.rgb).r;\n finalColor.g = adjustColor(finalColor.rgb).g;\n finalColor.b = adjustColor(finalColor.rgb).b;\n#endif\n\n\n#ifdef CLIP\n #ifdef CLIP_FILT_BY_ID\n var clipResult = clip(Scene.uView * Mesh.uModelMatrix * vec4<f32>(vPositionMC.xyz, 1.0), vIsFiltByID.x);\n #else\n var clipResult = clip(Scene.uView * Mesh.uModelMatrix * vec4<f32>(vPositionMC.xyz, 1.0), 1.0);\n #endif // CLIP_FILT_BY_ID\n if(clipResult < -0.5){\n discard;\n }\n#endif // CLIP\n\n#ifdef SILHOUETTE_SELECT_TYPE\n var sketchModeColor = sketchMode(finalColor, Layer.uSelColor, 3.0);\n if(Layer.uSelectColorType == 2.0)\n {\n if(fSelectedForSilh > 0.9)\n {\n finalColor = sketchModeColor;\n }\n }\n else\n {\n finalColor = sketchModeColor;\n }\n#endif // SILHOUETTE_SELECT_TYPE\n\n#ifdef EMISSION_TEXTURE_ATLAS\n finalColor.r += getEmissiveTextureAtlasColor(wValue).r;\n finalColor.g += getEmissiveTextureAtlasColor(wValue).g;\n finalColor.b += getEmissiveTextureAtlasColor(wValue).b;\n#else\n finalColor.r *= Layer.uEmissionColor.r;\n finalColor.g *= Layer.uEmissionColor.g;\n finalColor.b *= Layer.uEmissionColor.b;\n#endif\n\n#ifdef HYPSOMETRIC\n\tif(Layer.uHypsometricVisible > 0.5)\n\t{\n #ifdef Volume2\n var volColor = textureSample(uVolumeTexture, uVolumeTextureSampler, vec2(vTexCoord.x, 1.0 - vTexCoord.y));\n finalColor = getHypsometricColor(finalColor, volColor);\n #else\n finalColor = getHypsometricColor(finalColor, wValue);\n #endif\n }\n#endif\n\n#ifdef OVERLAY\n getOverlayColor(&finalColor);\n#endif\n\n#ifdef IMAGERY\n getImageryColor(&finalColor);\n#endif\n\n if(finalColor.a == 0.0)\n {\n discard;\n }\n\n return finalColor;\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n\n#ifdef PREPASS\n var texCoord = vec2<f32>(0.0);\n#ifdef TexCoord\n texCoord = vTexCoord.xy;\n#endif\n var roughness = getRoughness(texCoord);\n var reflectivity = 1.0 - roughness;\n var normalEC = normalize(czm_getNormalMatrix(Scene.uView, Mesh.uModelMatrix) * czm_computeNormal(vPositionMC.xyz));\n // 相机坐标系坐标\n gl_FragData0 = vec4<f32>(v_positionEC, 1.0);\n // 相机坐标系法线\n gl_FragData1 = vec4<f32>(normalEC, 1.0);\n // 反射率\n gl_FragData2 = vec4<f32>(reflectivity, reflectivity, reflectivity, 1.0);\n#else\n gl_FragColor = renderColor();\n#endif\n#ifdef NORMAL\n gl_FragColor = renderNormal(vPositionMC.xyz);\n#endif\n#ifdef NORMAL_AND_DEPTH\n gl_FragColor = renderNormalAndDepth(vPositionMC.xyz);\n#endif\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}",_0x373b97=(_0x38c9e6=!0,function(e,t){var i=_0x38c9e6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38c9e6=!1,i}),_0x5bc7ea=_0x373b97(void 0,(function(){return _0x5bc7ea.toString().search("(((.+)+)+)+$").toString().constructor(_0x5bc7ea).search("(((.+)+)+)+$")})),_0x38c9e6;_0x5bc7ea();var _0x903893="\n#include <SceneUboDecl> \n#include <LayerUboDecl> \n#include <MeshUboDecl>\nattribute vec4 aPosition; \n#ifdef TexCoord \n varying vec4 vTexCoord; \n#endif \n\n#ifdef VertexColor\n\t#ifdef WEBGPU\n\t attribute uvec4 aColor;\n\t#else\n\t attribute vec4 aColor;\n\t#endif\n#endif\n\n#ifdef BatchTable \nattribute float batchId; \n#endif \nvarying vec4 vSecondColor; \n#ifdef REPLACE_SELECT_TYPE \nvarying float fSelected; \n#endif \n#ifdef COMPRESS_VERTEX \n uniform vec4 decode_position_min; \n uniform float decode_position_normConstant; \n#endif \nvarying vec4 vColor; \nvoid main() \n{ \n#ifdef COMPRESS_VERTEX \n vec4 vertexPos = vec4(1.0); \n vertexPos = decode_position_min + aPosition * decode_position_normConstant; \n#else \n vec4 vertexPos = aPosition; \n#endif \n#ifdef TexCoord \n vTexCoord.xy = vertexPos.xy * textureRepeat; \n#endif \n vertexPos.w = 1.0; \n vec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n vertexColor = aColor; \n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif\n#endif \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n vec4 operationType = czm_batchTable_operation(batchId); \n vec4 objsColor = czm_batchTable_color(batchId); \n#ifdef REPLACE_SELECT_TYPE \n fSelected = 0.0; \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor, fSelected); \n#else \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor); \n#endif \n#endif \n vColor = vertexColor*uFillForeColor; \n gl_Position = uViewProjection * uModelMatrix * vertexPos;\n}",_0x59d822=(_0x5edddc=!0,function(e,t){var i=_0x5edddc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5edddc=!1,i}),_0x4f4bce=_0x59d822(void 0,(function(){return _0x4f4bce.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f4bce).search("(((.+)+)+)+$")})),_0x5edddc;_0x4f4bce();var _0xb37562="\n#include <LayerUboDecl>\n#ifdef TexCoord \n uniform sampler2D uTexture; \n varying vec4 vTexCoord; \n#endif \n varying vec4 vColor; \n varying vec4 vSecondColor; \n#ifdef REPLACE_SELECT_TYPE \n varying float fSelected; \n#endif \nvoid main() \n{ \n\tif(vColor.a == 0.0) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef TexCoord \n vec4 texColor = texture2D(uTexture, vTexCoord.xy); \n gl_FragColor = texColor * vColor; \n#else \n gl_FragColor = vColor;\n#endif \n#ifdef REPLACE_SELECT_TYPE \n if(fSelected > 0.9) \n { \n gl_FragColor = vColor; \n } \n#endif \n\tif(gl_FragColor.a == 0.0) \n\t{ \n\t\tdiscard; \n\t}\n}",_0x2870bd=(_0x41186e=!0,function(e,t){var i=_0x41186e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41186e=!1,i}),_0x272702=_0x2870bd(void 0,(function(){return _0x272702.toString().search("(((.+)+)+)+$").toString().constructor(_0x272702).search("(((.+)+)+)+$")})),_0x41186e;_0x272702();var _0x43476e="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\nattribute vec3 aPosition;\n#ifdef HAS_NORMAL \nattribute vec3 aNormal;\n#endif \nattribute vec4 aTexCoord0;\n\n#ifdef TexCoord2\nattribute vec4 aTexCoord1;\n#endif \n \n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n#ifdef BatchTable \nattribute float batchId; \n#endif \n \nvarying vec4 vColor; \nvarying vec4 vSecondColor; \nvarying vec4 vTexCoord; \nvarying vec4 clip_vertex; \n \nfloat computerOnePixelLength() \n{ \n\tvec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0); \n\tviewPos.xyz *= 0.9; \n\tvec4 winPos = uProjection * viewPos; \n\tfloat dwidth = czm_metersPerPixel(viewPos); \n\t#ifdef EYE_DISTANCE_SCALING \n\t dwidth = 1.0; \n\t#endif \n\twinPos.x = winPos.x - 2.0 * dwidth; \n\tvec4 newViewPos = uInverseProjection * winPos; \n\treturn length(viewPos - newViewPos); \n} \n \nvec4 computePos(vec3 v3Normal) \n{ \n vec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0); \n\tviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength(); \n\tviewPos.xyz = viewPos.xyz * 0.9; \n\tclip_vertex = viewPos; \n\tvec4 pos = czm_projection * viewPos; \n\treturn pos; \n} \n \nvoid main() \n{ \n vTexCoord.xy = aTexCoord0.xy; \n vec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif \n#endif \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n vec4 operationType = czm_batchTable_operation(batchId); \n vec4 objsColor = czm_batchTable_color(batchId); \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor); \n#endif \n vColor = vertexColor * uDiffuseColor; \n#ifdef ICON\n#ifdef TexCoord2\n gl_Position = computePos(aTexCoord1.xyz); \n#endif\n#else \n\n#ifdef TexCoord2 \n vTexCoord.zw = aTexCoord1.xy;\n#endif \n \n #ifdef HAS_NORMAL \n \tgl_Position = computePos(aNormal);\n #else\n gl_Position = computePos(aTexCoord1.xyz);\n #endif\n#endif \n}",_0xf89e07=(_0x5c7849=!0,function(e,t){var i=_0x5c7849?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c7849=!1,i}),_0x7b884=_0xf89e07(void 0,(function(){return _0x7b884.toString().search("(((.+)+)+)+$").toString().constructor(_0x7b884).search("(((.+)+)+)+$")})),_0x5c7849;_0x7b884();var _0x258e9c="attribute vec3 aPosition;\n\n#ifndef ICON\nattribute vec3 aNormal;\n#endif\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\nattribute vec4 uv0;\n\n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\nuniform vec4 uSelColor;\nuniform vec4 uDiffuseColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nmat3 RotateZ(in float angle)\n{\n float sina = sin(angle);\n float cosa = cos(angle);\n mat3 rotMatrix = mat3(cosa, sina, 0, -sina, cosa, 0, 0, 0, 1);\n return rotMatrix;\n}\n\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = czm_modelView * vec4(aPosition, 1.0);\n vec4 origViewPos = czm_view * vec4(0.0, 0.0, 0.0, 1.0);\n vec4 cameraViewPos = vec4(0.0, 0.0, 0.0, 1.0);\n vec4 fixedAxis = vec4(1.0);\n vec3 xAxis = vec3(1.0);\n vec3 yAxis = vec3(1.0);\n vec3 zAxis = vec3(1.0);\n vec4 cameraViewVector = vec4(1.0);\n if (czm_sceneMode != czm_sceneMode3D)\n {\n fixedAxis = czm_view * vec4(1.0, 0.0, 0.0, 1.0);\n fixedAxis = fixedAxis - origViewPos;\n zAxis = normalize(fixedAxis.xyz);\n cameraViewVector = viewPos - cameraViewPos;\n yAxis = normalize(cameraViewVector.xyz);\n xAxis = normalize(cross(yAxis, zAxis));\n yAxis = cross(zAxis, xAxis);\n }\n else\n {\n fixedAxis = viewPos - origViewPos;\n yAxis = normalize(fixedAxis.xyz);\n cameraViewVector = cameraViewPos - viewPos;\n zAxis = normalize(cameraViewVector.xyz);\n xAxis = normalize(cross(yAxis, zAxis));\n zAxis = cross(xAxis, yAxis);\n }\n mat3 matrix = mat3(xAxis, yAxis, zAxis) * RotateZ(aTexCoord0.z);\n vec3 offset = czm_sceneMode != czm_sceneMode3D ? v3Normal.xzy : v3Normal;\n offset = matrix * offset;\n\tviewPos.xyz = viewPos.xyz + offset;\n\tclip_vertex = viewPos;\n\tvec4 pos = czm_projection * viewPos;\n\treturn pos;\n}\n\nvoid main()\n{\n vTexCoord.xy = aTexCoord0.xy;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor * uDiffuseColor;\n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz);\n#else\n vTexCoord.zw = aTexCoord1.xy;\n gl_Position = computePos(aNormal);\n#endif\n}",_0xc29113=(_0x1ff7f1=!0,function(e,t){var i=_0x1ff7f1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ff7f1=!1,i}),_0x262dbe=_0xc29113(void 0,(function(){return _0x262dbe.toString().search("(((.+)+)+)+$").toString().constructor(_0x262dbe).search("(((.+)+)+)+$")})),_0x1ff7f1;_0x262dbe();var _0xe606d6="\nattribute vec3 aPosition;\n#ifndef ICON\nattribute vec3 aNormal;\n#endif\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\n\n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying vec4 vTexCoord;\nvarying vec4 clip_vertex;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0);\n\tvec4 winPos = uProjection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = uInverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\n\nmat3 rotateZ(in float angle)\n{\n float sina = sin(angle);\n float cosa = cos(angle);\n mat3 rotMatrix = mat3(cosa, sina, 0.0, -sina, cosa, 0.0, 0.0, 0.0, 1.0);\n return rotMatrix;\n}\nvec4 computePos(vec3 v3Normal)\n{\n vec4 viewPos = uView * uModelMatrix * vec4(aPosition, 1.0);\n vec4 origViewPos = uView * vec4(0.0, 0.0, 0.0, 1.0);\n vec4 fixedAxis = viewPos - origViewPos;\n vec3 zAxis = normalize(fixedAxis.xyz);\n vec4 upView = vec4(0.0, 1.0, 0.0, 1.0);\n upView = uView * upView;\n vec3 upViewVector = normalize(upView.xyz - origViewPos.xyz);\n vec3 xAxis = normalize(cross(upViewVector, zAxis));\n vec3 yAxis = cross(zAxis, xAxis);\n yAxis = normalize(yAxis);\n mat3 matrix = mat3(xAxis,yAxis,zAxis);\n vec3 offset = matrix * rotateZ(-czm_piOverFour * 3.0 + aTexCoord0.z) * v3Normal;\n\tviewPos.xyz = viewPos.xyz + offset * computerOnePixelLength();\n\tclip_vertex = viewPos;\n\tvec4 pos = uProjection * viewPos;\n\treturn pos;\n}\n\nvoid main()\n{\n vTexCoord.xy = aTexCoord0.xy;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor * uDiffuseColor;\n#ifdef ICON\n gl_Position = computePos(aTexCoord1.xyz);\n#else\n vTexCoord.zw = aTexCoord1.xy;\n gl_Position = computePos(aNormal);\n#endif\n}\n",_0x2d8163=(_0x12f53f=!0,function(e,t){var i=_0x12f53f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12f53f=!1,i}),_0x4e0062=_0x2d8163(void 0,(function(){return _0x4e0062.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e0062).search("(((.+)+)+)+$")})),_0x12f53f;_0x4e0062();var _0xf44c9d="\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\nuniform sampler2D uTexture; \nuniform sampler2D uSecTexture; \n \nvarying vec4 vColor; \nvarying vec4 vTexCoord; \nvarying vec4 clip_vertex; \nvarying vec4 vSecondColor; \n#include <preClipFS>\n#include <clip>\n\nvoid main() \n{ \n preClip(); \n\tvec4 texColor = vec4(vColor.rgb, min(texture2D(uTexture, vTexCoord.xy).a, vColor.a)); \n\tvec4 haloTexColor = vec4(uAmbientColor.rgb, min(texture2D(uSecTexture, vTexCoord.zw).a, uAmbientColor.a)); \n\tif(texColor.a + haloTexColor.a < 0.2) \n\t{ \n\t\tdiscard; \n\t} \n\tvec3 v3Color = mix(haloTexColor.rgb, texColor.rgb, texColor.a + 0.2); \n\tgl_FragColor = vec4(v3Color.rgb, min(1.0, texColor.a + haloTexColor.a)); \n\tif(gl_FragColor.a < 0.1) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef CLIP \n\tgl_FragColor *= clip(clip_vertex, 1.0); \n#endif \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n}",_0x19725b=(_0xc88548=!0,function(e,t){var i=_0xc88548?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc88548=!1,i}),_0x167f87=_0x19725b(void 0,(function(){return _0x167f87.toString().search("(((.+)+)+)+$").toString().constructor(_0x167f87).search("(((.+)+)+)+$")})),_0xc88548;_0x167f87();var _0x357523="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nuniform sampler2D uTexture; \nvarying vec4 vColor; \nvarying vec4 vTexCoord; \nvarying vec4 clip_vertex; \nvarying vec4 vSecondColor; \n#include <preClipFS>\n#include <clip>\n \nvoid main() \n{ \n\tpreClip();\n\tvec4 texColor = texture2D(uTexture, vTexCoord.xy); \n#ifdef RGBTOBGR \n texColor = vec4(texColor.b, texColor.g, texColor.r, texColor.a); \n#endif \n\tgl_FragColor = vColor * texColor; \n\tif(gl_FragColor.a < 0.1) \n\t{ \n\t\tdiscard; \n\t} \n#ifdef CLIP\n gl_FragColor *= clip(uView * uModelMatrix * vec4(clip_vertex.xyz, 1.0), 1.0); \n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n}",_0x387d18=(_0x5c62f0=!0,function(e,t){var i=_0x5c62f0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c62f0=!1,i}),_0x278767=_0x387d18(void 0,(function(){return _0x278767.toString().search("(((.+)+)+)+$").toString().constructor(_0x278767).search("(((.+)+)+)+$")})),_0x5c62f0;_0x278767();var _0x4faa00="attribute vec4 aPosition;\n\nattribute vec4 aTexCoord0;\n\nattribute vec4 aTexCoord1;\n\nattribute vec4 aTexCoord2;\n\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nuniform float uLineWidth;\nuniform float uIsPicking;\nuniform vec4 uPickPosition;\nuniform mat4 uMatrixInvert;\nuniform vec4 uDiffuseColor;\nuniform vec4 uSelColor;\n#ifdef SELECTED\nvarying float fSelected;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nconst float SCREEN_VALUE = 1.0 / (2.0 * 1236.077);\n\nfloat ComputerLineWidth()\n{\n\tvec4 worldPos = czm_model * aPosition;\n\treturn uLineWidth * length(czm_viewerPositionWC - worldPos.xyz) * SCREEN_VALUE;\n}\n\nvoid main()\n{\n float shadowVolumeWidth = ComputerLineWidth();\n vec4 vertexPos = aPosition;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n if(uIsPicking > 0.0)\n {\n\t\tshadowVolumeWidth = shadowVolumeWidth * 3.0;\n\t\tvertexPos.xyz = vertexPos.xyz + aTexCoord2.xyz * shadowVolumeWidth + normalize(aTexCoord1.xyz) * uPickPosition.z;\n }\n else\n {\n\t\tvertexPos.xyz = vertexPos.xyz + aTexCoord2.xyz * shadowVolumeWidth + aTexCoord1.xyz;\n }\n vec4 v_Position = czm_modelViewProjection * vertexPos;\n vColor = vertexColor * uDiffuseColor;\n#ifdef SELECTED\n vColor = uSelColor;\n fSelected = aTexCoord0.x;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}",_0x21f257=(_0x12c76d=!0,function(e,t){var i=_0x12c76d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12c76d=!1,i}),_0x18801c=_0x21f257(void 0,(function(){return _0x18801c.toString().search("(((.+)+)+)+$").toString().constructor(_0x18801c).search("(((.+)+)+)+$")})),_0x12c76d;_0x18801c();var _0x5099e1="\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n\n#ifdef VertexColor\n #ifdef WEBGPU\n \tattribute uvec4 aColor;\n #else\n \tattribute vec4 aColor;\n #endif\n#endif\n\n#ifdef BatchTable\nattribute float batchId;\n#endif\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\nvarying vec2 v_inversePlaneExtents;\nvarying float fSelected;\n\nvoid ComputeBounds()\n{\n vec3 southWestCorner = (czm_modelView * vec4(uSouthWest, 1.0)).xyz;\n vec3 northWestCorner = czm_normal * uNorthDir + southWestCorner;\n vec3 southEastCorner = czm_normal * uEastDir + southWestCorner;\n vec3 eastWard = southEastCorner - southWestCorner;\n float eastExtent = length(eastWard);\n eastWard /= eastExtent;\n vec3 northWard = northWestCorner - southWestCorner;\n float northExtent = length(northWard);\n northWard /= northExtent;\n v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\n v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\n v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n}\nvoid main()\n{\n#ifdef HAS_TEXTURE\n ComputeBounds();\n#endif\n vec4 realPosition = aPosition;\n#ifdef COMPRESS_VERTEX\n realPosition = decode_position_min + aPosition * decode_position_normConstant;\n#endif\n vec3 vertexPos = realPosition.xyz;\n vec3 zDir = aTexCoord1.xyz;\n bool hasBaseHeight = false;\n if(length(realPosition) > 0.1){\n hasBaseHeight = true;\n }\n float topOrBottom = dot(zDir, vec3(0.0, 0.0, 1.0)) > 0.0 ? 1.0 : -1.0;\n vec3 upDir = zDir * topOrBottom;\n float fExtendHeight = 0.0;\n float minTerrainHeight = uMinMaxTerrainHeightAndPickInfo.x;\n float maxTerrainHeight = uMinMaxTerrainHeightAndPickInfo.y;\n float isPicking = uMinMaxTerrainHeightAndPickInfo.z;\n float pickPositionHeight = uMinMaxTerrainHeightAndPickInfo.w;\n if(isPicking > 0.0){\n // 顶点保存了高度,在拾取时在原始的顶点高度附近进行上下拉伸\n if(hasBaseHeight){\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, -50.0, 100.0);\n }\n else{\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, pickPositionHeight - 2.0, pickPositionHeight + 10.0);\n }\n }\n else{\n fExtendHeight = czm_branchFreeTernary(topOrBottom < 0.0, minTerrainHeight, maxTerrainHeight);\n }\n vertexPos.xyz = realPosition.xyz + upDir * fExtendHeight;\n vec4 v_Position = uViewProjection * uModelMatrix * vec4(vertexPos, 1.0);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor \n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif \n#endif \nfSelected = 0.0;\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, vec4(1.0), vertexColor, fSelected);\n#endif\n#ifdef SELECTED\n vColor = uSelColor;\n#else\n vColor = vertexColor * uDiffuseColor * uFillForeColor;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}\n",_0x4903f3=(_0x437d42=!0,function(e,t){var i=_0x437d42?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x437d42=!1,i}),_0x363003=_0x4903f3(void 0,(function(){return _0x363003.toString().search("(((.+)+)+)+$").toString().constructor(_0x363003).search("(((.+)+)+)+$")})),_0x437d42;_0x363003();var _0xb2d90="attribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\n\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float vWindowZ;\n\nuniform float uIsPicking;\nuniform mat4 uMatrixInvert;\nuniform vec4 uPickPosition;\nuniform vec4 uDiffuseColor;\nuniform vec4 uSelColor;\n#ifdef SELECTED\nvarying float fSelected;\n#endif\n\nvoid main()\n{\n vec3 vertexPos = aPosition;\n vertexPos.xyz = vertexPos.xyz + aTexCoord1.xyz;\n vec4 v_Position = czm_modelViewProjection * vec4(vertexPos, 1.0);\n if(uIsPicking > 0.0)\n {\n#ifdef EXTEND_OBJECT\n\t\tvec4 modelBottomPos = uMatrixInvert * czm_model * vec4(aPosition, 1.0);\n\t\tvec4 modelTopPos = uMatrixInvert * czm_model * vec4(vertexPos, 1.0);\n\t\tif(uPickPosition.z < modelBottomPos.z || uPickPosition.z > modelTopPos.z)\n\t\t{\n\t\t\tvColor.a = 0.0;\n\t\t}\n#else\n\t\tvertexPos.xyz = aPosition.xyz + normalize(aTexCoord1.xyz) * (uPickPosition.z + 10.0);\n\t\tvec4 v_Position = czm_modelViewProjection * vec4(vertexPos, 1.0);\n#endif\n }\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n#ifdef SELECTED\n vColor = uSelColor;\n fSelected = aTexCoord0.x;\n#else\n vColor = vertexColor * uDiffuseColor;\n#endif\n vWindowZ = (0.5 * (v_Position.z / v_Position.w) + 0.5) * v_Position.w;\n v_Position.z = min(v_Position.z, v_Position.w);\n gl_Position = v_Position;\n}",_0x27f2b4=(_0xbf9d44=!0,function(e,t){var i=_0xbf9d44?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xbf9d44=!1,i}),_0x5276aa=_0x27f2b4(void 0,(function(){return _0x5276aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x5276aa).search("(((.+)+)+)+$")})),_0xbf9d44;_0x5276aa();var _0x4a0943="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec4 vColor;\nvarying float vWindowZ;\nvarying float fSelected;\nvarying vec4 vSecondColor;\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#ifdef HAS_TEXTURE\nuniform sampler2D uTexture;\nuniform vec2 uLevelScale;\nuniform vec2 uRepeatTimes;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\nvarying vec2 v_inversePlaneExtents;\n#endif\n\n#ifdef HAS_TEXTURE\nvec4 getTextureColor()\n{\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n vec2 uv;\n uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\n uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n vec2 st;\n st.x = czm_lineDistance(vec2(0.0), vec2(0.0, 1.0), uv);\n st.y = czm_lineDistance(vec2(0.0), vec2(1.0, 0.0), uv);\n st.xy *= uLevelScale * uRepeatTimes;\n vec4 texColor = texture2D(uTexture, st);\n if(texColor.a < 0.01) {\n texColor.a = 1.0;\n }\n return texColor;\n}\n#endif\n#include <preClipFS>\nvoid main()\n{\npreClip();\n#ifdef SELECTED\n if(fSelected < 0.5)\n {\n discard;\n }\n#endif\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(vWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec4 texColor = vec4(1.0);\n#ifdef HAS_TEXTURE\n texColor = getTextureColor();\n#endif\n gl_FragColor = vColor * texColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}\n",_0x5854b2="#include <SceneUboDecl>\n#include <MeshUboDecl>\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\nuniform sampler2D batchTexture;\nvec2 computeSt(float batchId)\n{\nfloat stepX = batchTextureStep.x;\nfloat centerX = batchTextureStep.y;\nfloat numberOfAttributes = float(5);\nreturn vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);\n}\nvec4 czm_batchTable_pickColor(float batchId)\n{\nvec2 st = computeSt(batchId);\nst.x += batchTextureStep.x * float(2);\nvec4 textureValue = texture2D(batchTexture, st);\nvec4 value = textureValue;\nvalue /= 255.0;\nreturn value;\n}\nvec4 czm_batchTable_operation(float batchId)\n{\nvec2 st = computeSt(batchId);\nst.x += batchTextureStep.x * float(1);\nvec4 textureValue = texture2D(batchTexture, st);\nvec4 value = textureValue;\nreturn value;\n}\n#endif\nvarying vec4 vMirrorCoord;\nvarying vec4 vSecondColor;\nvarying vec4 vPostionEC;\nvarying vec4 vPositionMC;\nvarying vec4 vColor;\nvarying vec2 fSelected;\n#ifdef EXCAVATION\nvarying vec4 vExcavationVertexPos;\n#endif\nvoid s3mBatchOperation(vec4 operationType, inout vec4 vertexColor)\n{\noperationType.x += 0.001;\nfloat right_2 = operationType.x * 0.5;\nfloat right_4 = right_2 * 0.5;\nfloat right_8 = right_4 * 0.5;\nfloat right_16 = right_8 * 0.5;\nfloat isHide = fract(floor(right_4)* 0.5);\nif(isHide > 0.1)\n{\nvertexColor.a = 0.0;\n}\n}\nvoid main()\n{\n#ifdef EXCAVATION\nvExcavationVertexPos = uGeoMatrix * vec4(aPosition.xyz, 1.0);\n#endif\nvec4 oPos = czm_modelViewProjection * aPosition;\nvPositionMC = uGeoMatrix * aPosition;\nmat4 textureMatrix = mat4(0.5, 0.0, 0.0, 0.0,\n0.0, 0.5, 0.0, 0.0,\n0.0, 0.0, 0.5, 0.0,\n0.5, 0.5, 0.5, 1.0);\nvMirrorCoord = textureMatrix * oPos;\ngl_Position = oPos;\nvPostionEC = czm_modelView * aPosition;\n#ifdef BatchTable\nvSecondColor = czm_batchTable_pickColor(batchId);\n#endif\nvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\nvertexColor = aColor;\n#endif\n#ifdef BatchTable\nvSecondColor = czm_batchTable_pickColor(batchId);\nvec4 operationType = czm_batchTable_operation(batchId);\ns3mBatchOperation(operationType, vertexColor);\n#endif\nvColor = vertexColor;\n}\n",_0x120def="#extension GL_EXT_draw_buffers : enable\n#if defined(PREPASS) && defined(WEBGPU)\nlayout(location = 0) out vec4 glFragData[3];\n#endif\n#include <LayerUboDecl>\n#include <WaterLayerUboDecl>\n#include <SceneUboDecl>\n#include <MeshUboDecl>\n#include <clip>\nuniform sampler2D uReflectMap;\nuniform sampler2D uNoiseMap;\nvarying vec4 vMirrorCoord;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\nvarying vec4 vPostionEC;\nvarying vec4 vColor;\nvec4 getNoise( vec2 uv ) {\nvec2 uv0 = ( uv / 103.0 ) * uWaveScale + vec2(uTimeVal / 17.0, uTimeVal / 29.0) * uFlowParameter.xy * uFlowParameter.z;\nvec2 uv1 = uv / 107.0 * uReflowWaveScale - vec2( uTimeVal / -19.0, uTimeVal / 31.0 ) * uFlowParameter.xy * uFlowParameter.z * uFlowParameter.w;\nvec2 uv2 = uv / vec2( 8907.0, 9803.0 ) * uWaveScale + vec2( uTimeVal / 101.0, uTimeVal / 97.0 ) * uFlowParameter.xy * uFlowParameter.z;\nvec2 uv3 = uv / vec2( 1091.0, 1027.0 ) * uReflowWaveScale - vec2( uTimeVal / 109.0, uTimeVal / -113.0 ) * uFlowParameter.xy * uFlowParameter.z * uFlowParameter.w;\nvec4 noise = texture2D( uNoiseMap, uv0 ) +\ntexture2D( uNoiseMap, uv1 ) +\ntexture2D( uNoiseMap, uv2 ) +\ntexture2D( uNoiseMap, uv3 );\nreturn noise * 0.5 - 1.0;\n}\nvoid sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor )\n{\nvec3 sunDirection = czm_lightDirectionEC;\nvec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) );\nfloat direction = max( 0.0, dot( eyeDirection, reflection ) );\nspecularColor += pow( direction, shiny ) * uSunColor.rgb * spec;\ndiffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * uSunColor.rgb * diffuse;\n}\nvec3 RRTAndODTFit( vec3 v ) {\nvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\nvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\nreturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\nconst mat3 ACESInputMat = mat3(\nvec3( 0.59719, 0.07600, 0.02840 ),\nvec3( 0.35458, 0.90834, 0.13383 ),\nvec3( 0.04823, 0.01566, 0.83777 )\n);\nconst mat3 ACESOutputMat = mat3(\nvec3( 1.60475, -0.10208, -0.00327 ),\nvec3( -0.53108, 1.10813, -0.07276 ),\nvec3( -0.07367, -0.00605, 1.07602 )\n);\nconst float toneMappingExposure = 1.0;\ncolor *= toneMappingExposure / 0.6;\ncolor = ACESInputMat * color;\ncolor = RRTAndODTFit( color );\ncolor = ACESOutputMat * color;\nreturn clamp( color, 0.0, 1.0);\n}\n#include <preClipFS>\nvoid main()\n{\npreClip();\n#ifdef LOG_DEPTH\nczm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\nvec3 worldToEye = -vPostionEC.xyz;\nfloat distance = length(worldToEye);\nvec4 noise = getNoise(vPositionMC.xy);\nnoise.xy *= uNoiseStrength;\nvec3 surfaceNormalEC = czm_normal * normalize( noise.xyz * vec3( 1.5, 1.5, 1.0 ) );\nvec3 diffuseLight = vec3(0.0);\nvec3 specularLight = vec3(0.0);\nvec3 eyeDirection = normalize( worldToEye.xyz );\nsunLight( surfaceNormalEC, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );\nvec2 distortion = surfaceNormalEC.xy * ( 0.001 + 1.0 / distance ) * 3.7;\nvec2 mirrorCoord = vMirrorCoord.xy / vMirrorCoord.w;\nvec3 reflectionSample = vec3( textureLod( uReflectMap, mirrorCoord + distortion, uReflectMapLod));\nfloat theta = max( dot( eyeDirection, surfaceNormalEC ), 0.0 );\nfloat rf0 = 0.3;\nvec3 waterColor = uWaterColor.rgb * uWaterBrightness;\nfloat reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 );\nvec3 scatter = max( 0.0, dot( surfaceNormalEC, eyeDirection ) ) * waterColor;\nreflectionSample *= uUseRefectMap;\nvec3 albedo = mix((uSunColor.rgb * diffuseLight * 0.3 + scatter), (vec3(0.1) + reflectionSample * 0.9 + reflectionSample * specularLight), reflectance);\nvec4 finalColor = vec4(albedo, 1.0);\nfinalColor.a = uWaterColor.a;\n#ifndef HDR\nfinalColor.rgb = ACESFilmicToneMapping(finalColor.rgb);\n#endif\nif(finalColor.a < 0.1)\n{\ndiscard;\n}\n#ifdef CLIP\nfinalColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n#ifdef PREPASS\nvec3 normalEC = normalize(czm_normal * czm_computeNormal(vPositionMC.xyz));\nnormalEC += noise.xyz * 0.05;\ngl_FragData[0] = vec4(vPostionEC.xyz, 1.0);\ngl_FragData[1] = vec4(normalEC, 1.0);\ngl_FragData[2] = vec4(1.0);\n#else\ngl_FragColor = finalColor;\n#endif\n}\n",_0x521f0d=(_0x56ebcf=!0,function(e,t){var i=_0x56ebcf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56ebcf=!1,i}),_0x29cf3e=_0x521f0d(void 0,(function(){return _0x29cf3e.toString().search("(((.+)+)+)+$").toString().constructor(_0x29cf3e).search("(((.+)+)+)+$")})),_0x56ebcf;_0x29cf3e();var _0x1dd94="\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vSecondColor;\nvarying vec2 oUV;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nuniform mat4 uTexMatrix;\nvoid main()\n{\n float fExtendHeight = aTexCoord1.x;\n\tvec3 Postion = aPosition.xyz + (aNormal.xyz * fExtendHeight).xyz;\n\tfloat u = aTexCoord0.x;\n\tfloat v = aTexCoord0.y;\n if ( aTexCoord1.y > 0.2 && aTexCoord1.y < 0.8)\n {\n if (uTexMatrix[0].x > 0.0)\n {\n float fRealSize = uTexMatrix[1].y;\n v = fExtendHeight / fRealSize;\n }\n else\n {\n float fRepeatNum = uTexMatrix[1].y;\n v = fRepeatNum;\n }\n }\n oUV = vec2(u, v);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n vColor = vertexColor;\n\tgl_Position = czm_modelViewProjection * vec4(Postion, 1.0);\n\tvPositionMC = vec4(Postion, 0.0);\n}",_0x3f60ab=(_0x2adff3=!0,function(e,t){var i=_0x2adff3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2adff3=!1,i}),_0x2dbc73=_0x3f60ab(void 0,(function(){return _0x2dbc73.toString().search("(((.+)+)+)+$").toString().constructor(_0x2dbc73).search("(((.+)+)+)+$")})),_0x2adff3;_0x2dbc73();var _0x507f80="\n#ifdef HAS_TEXTURE\nuniform sampler2D uTexture;\n#endif\nvarying vec2 oUV;\nvarying vec4 vColor;\nvarying vec4 vPositionMC;\nvoid main()\n{\n\tvec4 mixColor = vec4(1.0);\n#ifdef HAS_TEXTURE\n mixColor = mixColor * texture2D( uTexture, oUV );\n#endif\n gl_FragColor = mixColor * vColor;\n#ifdef HAS_LIGHT\n\tgl_FragColor *= czm_computeLightColorInFP(vPositionMC.xyz, vPositionMC.w, vec3(0.0));\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x3a7302=(_0x47fc9c=!0,function(e,t){var i=_0x47fc9c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47fc9c=!1,i}),_0x1f5c0a=_0x3a7302(void 0,(function(){return _0x1f5c0a.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f5c0a).search("(((.+)+)+)+$")})),_0x47fc9c;_0x1f5c0a();var _0x33ffa2="\n#include <SceneUboDecl>\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aColor;\nvarying vec2 vTexCoord;\nvarying vec4 selectionColor;\nvarying vec3 oriVertex;\nvarying vec3 vPositionToEyeEC;\nvoid main()\n{\n vTexCoord = aTexCoord0.xy;\n oriVertex = aPosition.xyz;\n\tvec4 vVertex = vec4(aPosition.xyz, 1.0);\n\tgl_Position = uViewProjection * uModelMatrix * vVertex;\n\tselectionColor = vec4(aColor.rgb, 1.0);\n\tvec4 positionEC = uView * uModelMatrix * vVertex;\n vPositionToEyeEC = -normalize(positionEC.xyz);\n}\n",_0x32912a=(_0x2694cb=!0,function(e,t){var i=_0x2694cb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2694cb=!1,i}),_0x25eb08=_0x32912a(void 0,(function(){return _0x25eb08.toString().search("(((.+)+)+)+$").toString().constructor(_0x25eb08).search("(((.+)+)+)+$")})),_0x2694cb;_0x25eb08();var _0x3c68b9="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <MaterialUboDecl>\n#include <RegionEffectUboDecl>\nvarying vec3 oriVertex;\nvarying vec2 vTexCoord;\nvarying vec4 selectionColor;\nvarying vec3 vPositionToEyeEC;\nconst float horizontal = 0.0;\nconst float PI = 3.1415926535897932384626;\nvec2 rotateTexCoord(vec2 oriTexCoord)\n{\n\tfloat rotationRadian = uRotationAngle * PI;\n\tvec2 n = vec2(cos(rotationRadian),-sin(rotationRadian));\n\tvec2 t = vec2(sin(rotationRadian),cos(rotationRadian));\n\tmat2 rotateZMatrix = mat2(n,t);\n\treturn rotateZMatrix * oriTexCoord;\n}\nvec4 getGridMaterial(vec2 texCoord)\n{\n\tvec2 lineCount = vec2(uRepeatX, uRepeatY);\n\tvec2 lineOffset = vec2(uOffsetX, uOffsetY);\n\tvec2 lineThickness = vec2(uLineWidthX, uLineWidthY);\n\n float scaledWidth = fract(lineCount.s * texCoord.s - lineOffset.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n\n float scaledHeight = fract(lineCount.t * texCoord.t - lineOffset.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n\n float value;\n\n const float fuzz = 1.2;\n vec2 thickness = (lineThickness * 1.0) - 1.0;\n\n vec2 dx = abs(dFdx(texCoord));\n vec2 dy = abs(dFdy(texCoord));\n vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\n\n\tif(uRepeatX < 0.5)\n\t{\n\t\tvalue = smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight);\n\t}\n\telse if(uRepeatY < 0.5)\n\t{\n\t\tvalue = smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth);\n\t}\n\telse\n\t{\n\t\tvalue = min(\n\t\t\tsmoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\n\t\t\tsmoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n\t}\n\n\tif(value < 0.5)\n\t{\n\t\treturn uForeColor;\n\t}\n\treturn uBackColor;\n}\nvec4 getStripMaterial(vec2 texCoord)\n{\n\tfloat repeat = uRepeatX;\n\tfloat offset = uOffsetX;\n\n float coord = mix(texCoord.s, texCoord.t, horizontal);\n float value = fract((coord - offset) * (repeat * 0.5));\n\n vec4 currentColor = mix(uForeColor, uBackColor, step(0.5, value)); \n\n return currentColor;\n}\nvec4 getDotMaterial(vec2 texCoord)\n{\n\tfloat dotRepeat = uRepeatX;\n\n float b = smoothstep(0.3, 0.32, length(fract(dotRepeat * texCoord.st) - 0.5));\n vec4 color = mix(uForeColor, uBackColor, b);\n return color;\n}\nvec4 getCheckBoardMaterial(vec2 texCoord)\n{\n\tvec2 checkBoardRepeat = vec2(uRepeatX, uRepeatY); \n\n float b = mod(floor(checkBoardRepeat.s * texCoord.s) + floor(checkBoardRepeat.t * texCoord.t), 2.0);\n vec4 currentColor = mix(uForeColor, uBackColor, b);\n return currentColor;\n}\n\nvoid main()\n{\n vec3 newNormal = vec3( czm_normal * czm_computeNormal( oriVertex ) );\n newNormal = normalize( newNormal );\n\tvec4 mixColor = czm_directionLight(newNormal,vPositionToEyeEC,oriVertex);\n\n\tvec2 rotateCoord = rotateTexCoord(vTexCoord);\n\n vec4 color = uForeColor;\n \n if(uType > 3.5)\n {\n \tcolor = getGridMaterial(rotateCoord);\n }\n else if(uType > 2.5)\n {\n \tcolor = getCheckBoardMaterial(rotateCoord);\n }\n else if(uType > 1.5)\n {\n \tcolor = getDotMaterial(rotateCoord);\n }\n else if(uType > 0.5)\n {\n \tcolor = getStripMaterial(rotateCoord);\n }\n \n gl_FragColor = color * mixColor * selectionColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n}\n",_0x256e03=(_0x5d7399=!0,function(e,t){var i=_0x5d7399?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d7399=!1,i}),_0x4a0957=_0x256e03(void 0,(function(){return _0x4a0957.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a0957).search("(((.+)+)+)+$")})),_0x5d7399;_0x4a0957();var _0x1568b2="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <PolylineEffectUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\n#ifdef TexCoord2\n attribute vec4 aTexCoord1;\n#endif\n#ifdef VertexColor\n #ifdef WEBGPU\n attribute uvec4 aColor;\n #else\n attribute vec4 aColor;\n #endif\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying vec4 vPositionMC;\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\nvoid clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane,\n out vec4 clippedPositionEC)\n {\n culledByNearPlane = false;\n clipped = false;\n vec3 p0ToP1 = p1 - p0;\n float magnitude = length(p0ToP1);\n vec3 direction = normalize(p0ToP1);\n float endPoint0Distance = uCurrentFrustum.x + p0.z;\n float denominator = -direction.z;\n if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance > 0.0)\n {\n float t = endPoint0Distance / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n p0.z = min(p0.z, -uCurrentFrustum.x);\n clipped = true;\n }\n }\n clippedPositionEC = vec4(p0, 1.0);\n positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n }\n vec4 getPolylineWindowCoordinates(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n {\n #ifdef POLYLINE_DASH\n vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\n vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\n vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\n vec2 lineDir;\n if (usePrevious) {\n lineDir = normalize(positionWindow.xy - previousWindow.xy);\n }\n else {\n lineDir = normalize(nextWindow.xy - positionWindow.xy);\n }\n angle = atan(lineDir.x, lineDir.y) - 1.570796327;\n angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n #endif\n vec4 clippedPrevWC, clippedPrevEC;\n bool prevSegmentClipped, prevSegmentCulled;\n clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\n vec4 clippedNextWC, clippedNextEC;\n bool nextSegmentClipped, nextSegmentCulled;\n clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\n bool segmentClipped, segmentCulled;\n vec4 clippedPositionWC, clippedPositionEC;\n clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\n if (segmentCulled)\n {\n return vec4(0.0, 0.0, 0.0, 1.0);\n }\n vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\n vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\n if (prevSegmentCulled)\n {\n directionToPrevWC = -directionToNextWC;\n }\n else if (nextSegmentCulled)\n {\n directionToNextWC = -directionToPrevWC;\n }\n vec2 thisSegmentForwardWC, otherSegmentForwardWC;\n if (usePrevious)\n {\n thisSegmentForwardWC = -directionToPrevWC;\n otherSegmentForwardWC = directionToNextWC;\n }\n else\n {\n thisSegmentForwardWC = directionToNextWC;\n otherSegmentForwardWC = -directionToPrevWC;\n }\n vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\n vec2 leftWC = thisSegmentLeftWC;\n float expandWidth = width * 0.5;\n if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n {\n vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\n vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\n float leftSumLength = length(leftSumWC);\n leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\n vec2 u = -thisSegmentForwardWC;\n vec2 v = leftWC;\n float sinAngle = abs(u.x * v.y - u.y * v.x);\n expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n }\n vec2 offset = leftWC * expandDirection * expandWidth * uPixelRatio;\n return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (uProjection * clippedPositionEC).w;\n }\nvoid main()\n{ \n vec4 texCoord2 = vec4(0.0);\n #ifdef TexCoord2\n texCoord2 = aTexCoord1;\n #endif\n\tvec2 expandAndWidth = texCoord2.zw;\n\texpandAndWidth.y = expandAndWidth.y * uEffectLineWidth;\n\tfloat u = abs(expandAndWidth.x);\n\tfloat expandDir = sign(expandAndWidth.x);\n#ifdef ENABLE_DYNAMIC\n\tfloat w = 0.2 + 0.3*(1.0 - pow(2.0*abs(u - 0.5), 2.0));\n\tfloat width = abs(expandAndWidth.y*w) + 0.5;\n#else\n\tfloat width = abs(expandAndWidth.y) + 0.5;\n#endif\n\tbool usePrev = expandAndWidth.y < 0.0;\n\tvPositionMC.xyz = aPosition.xyz;\n vPositionMC.w = 0.0;\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vec4(aPosition.xyz, 1.0);\n#endif\n mat4 modelView = uView * uModelMatrix;\n\tvec4 p = modelView * aPosition;\n\tvec4 prev = modelView * vec4(aNormal, 1.0);\n\tvec4 next = modelView * aTexCoord0;\n\tv_st.s = texCoord2.x;\n\tv_width = width;\n\tv_alpha = u;\n\tfloat polylineAngle;\n\tvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\n\tv_polylineAngle = polylineAngle;\n\tgl_Position = czm_viewportOrthographic * positionWC;\n\tv_st.t = czm_writeNonPerspective(clamp(texCoord2.y, 0.0, 1.0), gl_Position.w);\n\tvec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n\tvColor = vertexColor;\n}\n",_0xdc0c9b=(_0x50d2af=!0,function(e,t){var i=_0x50d2af?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x50d2af=!1,i}),_0x1c8e20=_0xdc0c9b(void 0,(function(){return _0x1c8e20.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c8e20).search("(((.+)+)+)+$")})),_0x50d2af;_0x1c8e20();var _0x501956="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <PolylineEffectUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nvarying vec4 vColor;\nvarying vec2 v_st;\nvarying float v_width;\nvarying float v_polylineAngle;\nvarying vec4 vSecondColor;\nconst float maskLength = 16.0;\nvarying vec4 vPositionMC;\n\nmat2 rotate(float rad)\n{\n\tfloat c = cos(rad);\n\tfloat s = sin(rad);\n\treturn mat2(\n\t\tc, s,\n\t\t-s, c\n\t);\n}\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\n\tfloat slope = (p0.y - p1.y) / (p0.x - p1.x);\n\treturn slope * (x - p0.x) + p0.y;\n}\n\n#include <preClipFS>\n#include <clip>\nvoid main()\n{\n vec2 st = v_st;\n st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);\n preClip();\n#ifdef GL_OES_standard_derivatives\n\tfloat base = 1.0 - abs(fwidth(st.s)) * 10.0;\n#else\n\tfloat base = 0.99;\n#endif\n\tvec2 center = vec2(1.0, 0.5);\n\tfloat ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\n\tfloat ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\n\tfloat halfWidth = 0.15;\n\tfloat s = step(0.5 - halfWidth, st.t);\n\ts *= 1.0 - step(0.5 + halfWidth, st.t);\n\ts *= 1.0 - step(base, st.s);\n\tfloat t = step(base, st.s);\n\tt *= 1.0 - step(ptOnUpperLine, st.t);\n\tt *= step(ptOnLowerLine, st.t);\n\tfloat dist;\n\n\tvec4 outsideColor = vec4(0.0);\n\tvec4 currentColor;\n\tif (uIsArrow < 0.5 || st.s < base)\n\t{\n\t\tif(uType > 2.5)\n\t\t{\n\t\t\tfloat glow = uGlowPower / abs(st.t - 0.3) - (uGlowPower / 0.5);\n\t\t\tvec3 emission = max(vec3(glow - 1.0 + uColor.rgb), uColor.rgb);\n\t\t\tfloat alpha = clamp(0.0, 1.0, glow) * uColor.a;\n\t\t\tvec4 fragColor = vec4(emission, alpha);\n\t\t\tif(uIsArrow > 0.5)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, fragColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, fragColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = fragColor;\n\t\t\t}\n\t\t}\n\t\telse if(uType > 1.5)\n\t\t{\n\t\t float halfInteriorWidth = 0.5 * (v_width - uOutlineWidth) / v_width;\n\t\t\tfloat b = step(0.5 - halfInteriorWidth, st.t);\n\t\t\tb *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\n\t\t\tfloat d1 = abs(st.t - (0.5 - halfInteriorWidth));\n\t\t\tfloat d2 = abs(st.t - (0.5 + halfInteriorWidth));\n\t\t\tfloat dist = min(d1, d2);\n\t\t\tcurrentColor = mix(uOutlineColor, uColor, b);\n\t\t\tgl_FragColor = czm_antialias(uOutlineColor, uColor, currentColor, dist, 0.1);\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse if(uType == 1.0)\n\t\t{\n\t\t\tvec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n\t\t\tfloat dashPosition = fract(pos.x / uDashLength);\n\t\t\tfloat maskIndex = floor(dashPosition * maskLength);\n\t\t\tfloat maskTest = floor(uDashPattern / pow(2.0, maskIndex));\n\t\t\tvec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? uGapColor : uColor;\n\t\t\tif (fragColor.a < 0.005)\n\t\t\t{\n\t\t\t\tdiscard;\n\t\t\t}\n\t\t\tif(uIsArrow > 0.5)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, fragColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, fragColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = fragColor;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(uIsArrow > 0.5)\n\t\t\t{\n\t\t\t\tfloat d1 = abs(st.t - (0.5 - halfWidth));\n\t\t\t\tfloat d2 = abs(st.t - (0.5 + halfWidth));\n\t\t\t\tdist = min(d1, d2);\n\t\t\t\tcurrentColor = mix(outsideColor, uColor, clamp(s + t, 0.0, 1.0));\n\t\t\t\tgl_FragColor = czm_antialias(outsideColor, uColor, currentColor, dist, 0.1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgl_FragColor = uColor;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tfloat d1 = czm_infinity;\n\t\tif (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n\t\t{\n\t\t\td1 = abs(st.s - base);\n\t\t}\n\t\tfloat d2 = abs(st.t - ptOnUpperLine);\n\t\tfloat d3 = abs(st.t - ptOnLowerLine);\n\t\tdist = min(min(d1, d2), d3);\n\t\tcurrentColor = mix(outsideColor, uColor, clamp(s + t, 0.0, 1.0));\n\t\tgl_FragColor = czm_antialias(outsideColor, uColor, currentColor, dist, 0.1);\n\t}\n#ifndef REPLACE_COLOR_TYPE\n gl_FragColor = gl_FragColor * vColor;\n#endif\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n if(gl_FragColor.a < 0.1){discard;}\n#ifdef LOG_DEPTH\n if(uPolygonOffset.x != 0.0 || uPolygonOffset.y != 0.0){\n float logZ = 1.0 / gl_FragCoord.w + 1.0;\n float DZ = max(dFdx(logZ), dFdy(logZ));\n logZ += DZ * uPolygonOffset.x + 0.0000001 * uPolygonOffset.y;\n czm_writeLogDepth(logZ);\n }\n else{\n czm_writeLogDepth();\n }\n#endif\n#ifdef CLIP\n gl_FragColor *= clip(uView * uModelMatrix * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n}\n",_0x1aa566=(_0x3dd136=!0,function(e,t){var i=_0x3dd136?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3dd136=!1,i}),_0x247309=_0x1aa566(void 0,(function(){return _0x247309.toString().search("(((.+)+)+)+$").toString().constructor(_0x247309).search("(((.+)+)+)+$")})),_0x3dd136;_0x247309();var _0x4bddb0="\n#include <SceneUboDecl>\n#include <LayerUboDecl>\n#include <PolylineEffectUboDecl>\n#include <MaterialUboDecl>\n#include <MeshUboDecl>\nattribute vec4 aPosition;\nattribute vec3 aNormal;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n#ifdef VertexColor\n\t#ifdef WEBGPU\n\tattribute uvec4 aColor;\n\t#else\n\tattribute vec4 aColor;\n\t#endif\n#endif\n#ifdef BatchTable\nattribute float batchId;\n#endif\nvarying vec4 vColor;\nvarying vec4 vSecondColor;\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvarying float v_alpha;\nvarying float fWindowZ;\nvarying vec4 vPositionMC;\n\nvec4 eyeToWindowCoordinates(vec4 positionEC)\n{\n vec4 q = uProjection * positionEC; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n\nvoid clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane)\n{\n culledByNearPlane = false;\n clipped = false;\n vec3 p1ToP0 = p1 - p0;\n float magnitude = length(p1ToP0);\n vec3 direction = normalize(p1ToP0);\n float endPoint0Distance = -(uCurrentFrustum.x + p0.z);\n float denominator = -direction.z;\n if (endPoint0Distance < 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance < 0.0 && abs(denominator) > czm_epsilon7)\n {\n float t = (uCurrentFrustum.x + p0.z) / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n clipped = true;\n }\n }\n positionWC = eyeToWindowCoordinates(vec4(p0, 1.0));\n}\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\n\tvec4 endPointWC, p0, p1;\n\tbool culledByNearPlane, clipped;\n\tvec4 positionEC = position;\n\tvec4 prevEC = previous;\n\tvec4 nextEC = next;\n\tvec4 positionWindow = eyeToWindowCoordinates(positionEC);\n\tvec4 previousWindow = eyeToWindowCoordinates(prevEC);\n\tvec4 nextWindow = eyeToWindowCoordinates(nextEC);\n\n\tvec2 lineDir;\n\tif (usePrevious)\n\t{\n\t\tlineDir = normalize(positionWindow.xy - previousWindow.xy);\n\t}\n\telse\n\t{\n\t\tlineDir = normalize(nextWindow.xy - positionWindow.xy);\n\t}\n\tangle = atan(lineDir.x, lineDir.y) - 1.570796327;\n\tangle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n\n\tclipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, p0, clipped, culledByNearPlane);\n\tclipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, p1, clipped, culledByNearPlane);\n\tclipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, endPointWC, clipped, culledByNearPlane);\n\tif (culledByNearPlane)\n\t{\n\t\treturn vec4(0.0, 0.0, 0.0, 1.0);\n\t}\n\tvec2 prevWC = normalize(p0.xy - endPointWC.xy);\n\tvec2 nextWC = normalize(p1.xy - endPointWC.xy);\n\tfloat expandWidth = width * 0.5;\n\tvec2 direction;\n\tif (czm_equalsEpsilon(previous.xyz - position.xyz, vec3(0.0), czm_epsilon7) || czm_equalsEpsilon(prevWC, -nextWC, czm_epsilon7))\n\t{\n\t\tdirection = vec2(-nextWC.y, nextWC.x);\n\t}\n\telse if (czm_equalsEpsilon(next.xyz - position.xyz, vec3(0.0), czm_epsilon7) || clipped)\n\t{\n\t\tdirection = vec2(prevWC.y, -prevWC.x);\n\t}\n\telse\n\t{\n\t\tvec2 normal = vec2(-nextWC.y, nextWC.x);\n\t\tdirection = normalize((nextWC + prevWC) * 0.5);\n\t\tif (dot(direction, normal) < 0.0)\n\t\t{\n\t\t\tdirection = -direction;\n\t\t}\n\t\tfloat sinAngle = abs(direction.x * nextWC.y - direction.y * nextWC.x);\n\t\texpandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n\t}\n\tvec2 offset = direction * expandDirection * expandWidth * czm_resolutionScale;\n\treturn vec4(endPointWC.xy + offset, -endPointWC.z, 1.0);\n}\nvoid main()\n{\n\tvec2 expandAndWidth = aTexCoord1.zw;\n\texpandAndWidth.y = expandAndWidth.y * uEffectLineWidth;\n\tfloat u = abs(expandAndWidth.x);\n\tfloat expandDir = sign(expandAndWidth.x);\n#ifdef ENABLE_DYNAMIC\n\tfloat w = 0.2 + 0.3*(1.0 - pow(2.0*abs(u - 0.5), 2.0));\n\tfloat width = abs(expandAndWidth.y*w) + 0.5;\n#else\n\tfloat width = abs(expandAndWidth.y) + 0.5;\n#endif\n\tbool usePrev = expandAndWidth.y < 0.0;\n\tvPositionMC.xyz = aPosition.xyz;\n vPositionMC.w = 0.0;\n mat4 modelView = uView * uModelMatrix;\n\tvec4 p = modelView * aPosition;\n\tvec4 prev = modelView * vec4(aNormal, 1.0);\n\tvec4 next = modelView * aTexCoord0;\n\tv_st = aTexCoord1.xy;\n\tv_width = width;\n\tv_alpha = u;\n\tvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, v_polylineAngle);\n\tvec4 pos = uProjection * p;\n\tfWindowZ = (0.5 * (pos.z / pos.w) + 0.5);\n\tgl_Position = czm_viewportOrthographic * positionWC;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n\t#ifdef WEBGPU\n vertexColor = vec4(aColor.r / 255.0, aColor.g / 255.0, aColor.b / 255.0, aColor.a / 255.0);\n #endif\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n float right_2 = operationType.x * 0.5;\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n fWindowZ = -1.0;\n }\n#endif\n\tvColor = vertexColor;\n}\n",_0x5b1e30=(_0x234bd6=!0,function(e,t){var i=_0x234bd6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x234bd6=!1,i}),_0x2ee6f6=_0x5b1e30(void 0,(function(){return _0x2ee6f6.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ee6f6).search("(((.+)+)+)+$")})),_0x234bd6;_0x2ee6f6();var _0x48d945="\nattribute vec4 aPosition;\n#include <LayerUboDecl>\n#include <MeshUboDecl>\n#ifdef VertexColor\n attribute vec4 aColor;\n#endif\n#ifdef BatchTable\n attribute float batchId;\n#endif\n attribute vec4 aTexCoord0;\n attribute vec4 aTexCoord1;\n attribute vec4 aTexCoord2;\n attribute vec4 aTexCoord3;\n attribute vec4 aTexCoord4;\n attribute vec4 aTexCoord5;\n varying vec4 v_startPlaneNormalEcAndHalfWidth;\n varying vec4 v_endPlaneNormalEcAndBatchId;\n varying vec4 v_rightPlaneEC;\n varying vec4 v_endEcAndStartEcX;\n varying vec4 v_texcoordNormalizationAndStartEcYZ;\n varying vec4 v_vertexColor;\n varying vec4 vSecondColor;\n#ifdef COMPRESS_VERTEX\n uniform vec4 decode_position_min;\n uniform float decode_position_normConstant;\n#endif\n#ifdef COMPRESS_TEXCOORD\n uniform float decode_texCoord0_normConstant;\n uniform float decode_texCoord1_normConstant;\n uniform float decode_texCoord2_normConstant;\n uniform float decode_texCoord3_normConstant;\n uniform float decode_texCoord4_normConstant;\n uniform float decode_texCoord5_normConstant;\n uniform vec4 decode_texCoord0_min;\n uniform vec4 decode_texCoord1_min;\n uniform vec4 decode_texCoord2_min;\n uniform vec4 decode_texCoord3_min;\n uniform vec4 decode_texCoord4_min;\n uniform vec4 decode_texCoord5_min;\n#endif\n void main()\n {\n vec3 position3DHigh = aPosition.xyz;\n vec4 uncompress = vec4(1.0);\n#ifdef COMPRESS_VERTEX\n uncompress = decode_position_min + aPosition * decode_position_normConstant;\n position3DHigh = uncompress.xyz;\n#endif\n vec3 position3DLow = aTexCoord5.xyz;\n#ifdef COMPRESS_TEXCOORD\n uncompress = decode_texCoord5_min + aTexCoord5 * decode_texCoord5_normConstant;\n position3DLow = uncompress.xyz;\n#endif\n vec4 startHiAndForwardOffsetX = aTexCoord0;\n vec4 startLoAndForwardOffsetY = aTexCoord1;\n vec4 startNormalAndForwardOffsetZ = aTexCoord2;\n vec4 endNormalAndTextureCoordinateNormalizationX = aTexCoord3;\n vec4 rightNormalAndTextureCoordinateNormalizationY = aTexCoord4;\n#ifdef COMPRESS_TEXCOORD\n uncompress = decode_texCoord0_min + aTexCoord0 * decode_texCoord0_normConstant;\n startHiAndForwardOffsetX = uncompress;\n uncompress = decode_texCoord1_min + aTexCoord1 * decode_texCoord1_normConstant;\n startLoAndForwardOffsetY = uncompress;\n uncompress = decode_texCoord2_min + aTexCoord2 * decode_texCoord2_normConstant;\n startNormalAndForwardOffsetZ = uncompress;\n uncompress = decode_texCoord3_min + aTexCoord3 * decode_texCoord3_normConstant;\n endNormalAndTextureCoordinateNormalizationX = uncompress;\n uncompress = decode_texCoord4_min + aTexCoord4 * decode_texCoord4_normConstant;\n rightNormalAndTextureCoordinateNormalizationY = uncompress;\n#endif\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\n vec3 forwardOffset = vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\n vec3 offset = czm_normal * forwardOffset;\n vec3 ecEnd = ecStart + offset;\n vec3 forwardDirectionEC = normalize(offset);\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n v_endEcAndStartEcX.xyz = ecEnd;\n v_endEcAndStartEcX.w = ecStart.x;\n v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n vec4 positionRelativeToEye = czm_translateRelativeToEye(position3DHigh, position3DLow);\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye;\n float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\n vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection));\n vec3 normalEC = normalize(cross(planeDirection, upOrDown));\n upOrDown = cross(forwardDirectionEC, normalEC);\n upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\n positionEC.xyz += upOrDown;\n v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\n float width = uLineWidth;\n v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\n v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\n v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\n v_endPlaneNormalEcAndBatchId.w = 0.0;\n width = width * max(0.0, czm_metersPerPixel(positionEC));\n width = width / dot(normalEC, v_rightPlaneEC.xyz);\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n positionEC.xyz += width * normalEC;\n gl_Position = czm_depthClampFarPlane(czm_projection * positionEC);\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n#ifdef BatchTable\n vSecondColor = czm_batchTable_pickColor(batchId);\n vec4 operationType = czm_batchTable_operation(batchId);\n vec4 objsColor = czm_batchTable_color(batchId);\n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor);\n#endif\n v_vertexColor = vertexColor * uLineColor;\n }\n ",_0x36c782=(_0x1c51f5=!0,function(e,t){var i=_0x1c51f5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c51f5=!1,i}),_0x23408c=_0x36c782(void 0,(function(){return _0x23408c.toString().search("(((.+)+)+)+$").toString().constructor(_0x23408c).search("(((.+)+)+)+$")})),_0x1c51f5;_0x23408c();var _0xfeefe2="\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#include <LayerUboDecl>\n varying vec4 v_startPlaneNormalEcAndHalfWidth;\n varying vec4 v_endPlaneNormalEcAndBatchId;\n varying vec4 v_rightPlaneEC; // Technically can compute distance for this here\n varying vec4 v_endEcAndStartEcX;\n varying vec4 v_texcoordNormalizationAndStartEcYZ;\n varying vec4 v_vertexColor;\n varying vec4 vSecondColor;\n void main(void)\n {\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n discard;\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0)\n {\n discard;\n }\n gl_FragColor = v_vertexColor;\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n// vec3 alignedPlaneNormal;\n// // start aligned plane\n// alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\n// alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n// distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\n// // end aligned plane\n// alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\n// alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n// distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n// // Clamp - distance to aligned planes may be negative due to mitering,\n// // so fragment texture coordinate might be out-of-bounds.\n// float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\n// s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\n// float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\n// czm_writeDepthClampedToFarPlane();\n }\n ",_0x591510=(_0xfe30a2=!0,function(e,t){var i=_0xfe30a2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xfe30a2=!1,i}),_0x23bbf9=_0x591510(void 0,(function(){return _0x23bbf9.toString().search("(((.+)+)+)+$").toString().constructor(_0x23bbf9).search("(((.+)+)+)+$")})),_0xfe30a2;_0x23bbf9();var _0xbba6e0={SIZE_PER_INSTANCE:20,SIZE_PER_DM_INSTANCE:35,S3MB_BIM_INSTANCE:17,S3MB_BIM_INSTANCE_2:16,S3MB_PIPE_INSTANCE:29},_0x14dd8d=Object.freeze(_0xbba6e0),_0x42537c=(_0x2c613d=!0,function(e,t){var i=_0x2c613d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c613d=!1,i}),_0x39eede=_0x42537c(void 0,(function(){return _0x39eede.toString().search("(((.+)+)+)+$").toString().constructor(_0x39eede).search("(((.+)+)+)+$")})),_0x2c613d;_0x39eede();var _0x2f187f={NONE:0,LEFT:1,RIGHT:2,TOP:-1,BOTTOM:-2},_0x2d4a08=Object.freeze(_0x2f187f),_0x2cec42=(_0x45d4e4=!0,function(e,t){var i=_0x45d4e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45d4e4=!1,i}),_0x562e10=_0x2cec42(void 0,(function(){return _0x562e10.toString().search("(((.+)+)+)+$").toString().constructor(_0x562e10).search("(((.+)+)+)+$")})),_0x45d4e4;_0x562e10();var _0x32c02e={DatasetField:0,EdgeLengthMin:1},_0x132759=Object.freeze(_0x32c02e),_0x17b0db=(_0x1f90da=!0,function(e,t){var i=_0x1f90da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f90da=!1,i}),_0x337b1d=_0x17b0db(void 0,(function(){return _0x337b1d.toString().search("(((.+)+)+)+$").toString().constructor(_0x337b1d).search("(((.+)+)+)+$")})),_0x1f90da;_0x337b1d();var _0x30f528={OPAQUE:"opaque",BLEND:"blend",MASK:"mask"},_0x36a597=Object.freeze(_0x30f528),_0x3cb69e=(_0x272257=!0,function(e,t){var i=_0x272257?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x272257=!1,i}),_0x33fe5a=_0x3cb69e(void 0,(function(){return _0x33fe5a.toString().search("(((.+)+)+)+$").toString().constructor(_0x33fe5a).search("(((.+)+)+)+$")})),_0x272257;function _0x8dd7b2(e){var t=_0x37a515.call(this)||this;t._layer=e,t._name=_0x2e0417.Polyline,this._initUniformMap()}function s$J(e){this._lightList={},this._lightList[_0x4970c2.DIRECTIONAL]=new e$1Q,this._lightList[_0x4970c2.POINT]=new e$1Q,this._lightList[_0x4970c2.SPOT]=new e$1Q,this._lightList[_0x4970c2.HEMISPHERE]=new e$1Q,this._visibleLightList={},this._visibleLightList[_0x4970c2.POINT]=new e$1Q,this._visibleLightList[_0x4970c2.SPOT]=new e$1Q,this._visiblePointLightCount=0,this._visibleSpotLightCount=0,this._visibleDirectionalLightCount=0,this._visibleHemisphereLightCount=0,this._ambientLightColor=new e$1X(0,0,0,1),this._sunLightColor=new e$1X(.8,.8,.8,1),this._sunLightON=1,this._changedLightList=new e$1Q,this._pointLightDistanceDecay=[],this._spotLightDistanceDecayCosPenumbra=[],this._context=e,this._visibleDistanceMax=1e4,this._visibleCountAllowed=100,this._enableAmbientLightColor=!1,this._enableSunLightColor=!1}_0x33fe5a(),_0x37a515&&(_0x8dd7b2.__proto__=_0x37a515),_0x8dd7b2.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x8dd7b2.prototype.constructor=_0x37a515,Object.defineProperties(_0x8dd7b2.prototype,{}),_0x8dd7b2.prototype._initUBOStruct=function(){const e=this._ubo;e.addUniform("uColor",4),e.addUniform("uOutlineColor",4),e.addUniform("uGapColor",4),e.addUniform("uEffectLineWidth",1),e.addUniform("uType",1),e.addUniform("uOutlineWidth",1),e.addUniform("uDashLength",1),e.addUniform("uDashPattern",1),e.addUniform("uGlowPower",1),e.addUniform("uIsArrow",1)},_0x8dd7b2.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),this._initUBOStruct(),this._ubo.create()},_0x8dd7b2.prototype.update=function(e){if(!e.webgpu&&!e.webgl2)return;e$2e(this._ubo)||this._initUBO(e);const t=this._layer,i=this._ubo,n=t._effect;let r=n._dashPattern;if(n._isMove){n._frame>159&&(n._frame=0);var o=Math.floor(n._frame/10),a=n._dashPattern<<o,s=n._dashPattern>>16-o;n._frame++,r=a+s}i.updateDirectColor4("uColor",n._color),i.updateDirectColor4("uOutlineColor",n._outlineColor),i.updateDirectColor4("uGapColor",n._gapColor),i.updateFloat("uEffectLineWidth",n._lineWidth),i.updateFloat("uType",n._type),i.updateFloat("uOutlineWidth",n._outlineWidth),i.updateFloat("uDashLength",n._dashLength),i.updateFloat("uDashPattern",r),i.updateFloat("uGlowPower",n._glowPower),i.updateFloat("uIsArrow",n._isArrow?1:0),i.update()},_0x8dd7b2.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(t.webgl2||t.webgpu)return;var i={};const n=e._effect;i.uColor=function(){return n._color},i.uOutlineColor=function(){return n._outlineColor},i.uGapColor=function(){return n._gapColor},i.uEffectLineWidth=function(){return n._lineWidth},i.uType=function(){return n._type},i.uOutlineWidth=function(){return n._outlineWidth},i.uDashLength=function(){return n._dashLength},i.uDashPattern=function(){let e=n._dashPattern;if(n._isMove){n._frame>159&&(n._frame=0);var t=Math.floor(n._frame/10),i=n._dashPattern<<t,r=n._dashPattern>>16-t;n._frame++,e=i+r}return e},i.uGlowPower=function(){return n._glowPower},i.uIsArrow=function(){return n._isArrow?1:0},this._uniformMap=i},_0x8dd7b2.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x8dd7b2.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x8dd7b2.prototype.isDestroyed=function(){return!1},_0x8dd7b2.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)},s$J.MaxPointLightCount=16,s$J.MaxSpotLightCount=16,s$J.MaxDirectionLightCount=4,Object.defineProperties(s$J.prototype,{pointLight:{get:function(){return this._lightList[_0x4970c2.POINT]}},spotLight:{get:function(){return this._lightList[_0x4970c2.SPOT]}},directionalLight:{get:function(){return this._lightList[_0x4970c2.DIRECTIONAL]}},hemisphereLight:{get:function(){return this._lightList[_0x4970c2.HEMISPHERE]}},ambientLightColor:{get:function(){return this._ambientLightColor},set:function(e){o$1q.defined("Light source ambientLightColor",e),e$1X.clone(e,this._ambientLightColor),this._enableAmbientLightColor=!0}},sunLightColor:{get:function(){return this._sunLightColor},set:function(e){o$1q.defined("Light source sunLightColor",e),e$1X.clone(e,this._sunLightColor),this._enableSunLightColor=!0}},sunLightON:{get:function(){return this._sunLightON},set:function(e){o$1q.typeOf.bool("Light source sun light on",e),this._sunLightON=e?1:0}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}}}),s$J.prototype.addLightSource=function(e){var t=this._lightList[e.lightType];return t.set(e.id,e),t.length},s$J.prototype.removeLightSource=function(e){var t=this._lightList[e.lightType];return t.get(e.id)?(t.remove(e.id),t.length):-1},s$J.prototype.updateVisiblities=function(e){var t,i=this._lightList[_0x4970c2.POINT].values;for(t=0;t<i.length;t++)i[t].computeVisiblityInCullingVolume(e);for(i=this._lightList[_0x4970c2.SPOT].values,t=0;t<i.length;t++)i[t].computeVisiblityInCullingVolume(e)},s$J.prototype.hasChange=function(){return this._changedLightList.values.length>0},s$J.prototype.resetChange=function(){this._changedLightList.removeAll()},s$J.prototype.combineUniformValue=function(){this._pointLightDistanceDecay=[],this._spotLightDistanceDecayCosPenumbra=[];var e,t=this._visibleLightList[_0x4970c2.POINT].values,i=t.length;for(e=0;e<i;e++){var n=new o$1o;n.x=t[e].cutoffDistance,n.y=t[e].decay,this._pointLightDistanceDecay.push(n)}var r=this._visibleLightList[_0x4970c2.SPOT].values;for(i=r.length,e=0;e<i;e++){var o=new e$2c;o.x=r[e].distance,o.y=r[e].decay,o.z=r[e].angleCos,o.w=r[e].penumbraCos,this._spotLightDistanceDecayCosPenumbra.push(o)}},s$J.prototype.createUniformMap=function(){var e={},t=this;return e.uAmbientLightColor=function(){return t.ambientLightColor},e.uSunLightColor=function(){return t.sunLightColor},e.uSunLightON=function(){return t.sunLightON},e.uDirectionalLightDirectionEC=function(){for(var e=[],i=t.directionalLight.values,n=i.length,r=0;r<n;r++)e.push(i[r].directionEC);return e},e.uDirectionalLightColor=function(){for(var e=[],i=t.directionalLight.values,n=i.length,r=0;r<n;r++)e.push(i[r].lightColor);return e},e.uPointLightPositionEC=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.POINT].values,n=i.length,r=0;r<n;r++)e.push(i[r].positionEC);return e},e.uPointLightColor=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.POINT].values,n=i.length,r=0;r<n;r++)e.push(i[r].lightColor);return e},e.uDirectionalLightDirection=function(){for(var e=[],i=t.directionalLight.values,n=0;n<i.length;n++)e.push(i[n].direction);return e},e.uPointLightDistanceAndDecay=function(){return t._pointLightDistanceDecay},e.uSpotLightColor=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].lightColor);return e},e.uSpotLightPositionEC=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].positionEC);return e},e.uSpotLightPosition=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].position);return e},e.uSpotLightDirection=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].direction);return e},e.uSpotLightDirectionEC=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].directionEC);return e},e.uSpotLightDistanceDecayCosPenumbra=function(){return t._spotLightDistanceDecayCosPenumbra},e.uSpotLightExponent=function(){for(var e=[],i=t._visibleLightList[_0x4970c2.SPOT].values,n=i.length,r=0;r<n;r++)e.push(i[r].exponent);return e},e.uSkyColor=function(){for(var e=[],i=t._lightList[_0x4970c2.HEMISPHERE].values,n=i.length,r=0;r<n;r++)e.push(i[r].skyColor);return e},e.uGroundColor=function(){for(var e=[],i=t._lightList[_0x4970c2.HEMISPHERE].values,n=i.length,r=0;r<n;r++)e.push(i[r].groundColor);return e},e};var _0x56ab24=(_0x1349fc=!0,function(e,t){var i=_0x1349fc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1349fc=!1,i}),_0x280e51=_0x56ab24(void 0,(function(){return _0x280e51.toString().search("(((.+)+)+)+$").toString().constructor(_0x280e51).search("(((.+)+)+)+$")})),_0x1349fc;_0x280e51();var _0x3489f1="\n#extension GL_EXT_draw_buffers : enable\n#include <LayerUboDecl>\n#include <WaterLayerUboDecl>\n#include <MeshUboDecl>\nuniform sampler2D uReflectMap;\nuniform sampler2D uNoiseMap;\nvarying vec4 vSecondColor;\nvarying vec4 vPositionMC;\nvarying vec3 v_positionEC;\nvarying vec4 vPosition;\n\n\n\nvec4 getNoise( vec2 uv ) {\n vec2 uv0 = ( uv / 103.0 ) + vec2(uTimeVal / 17.0, uTimeVal / 29.0) * uFlowParameter.z;\n vec2 uv1 = uv / 107.0 - vec2( uTimeVal / -19.0, uTimeVal / 31.0 ) * uFlowParameter.z;\n vec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( uTimeVal / 101.0, uTimeVal / 97.0 ) * uFlowParameter.z;\n vec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( uTimeVal / 109.0, uTimeVal / -113.0 ) * uFlowParameter.z;\n vec4 noise = texture2D( uNoiseMap, uv0 ) +\n texture2D( uNoiseMap, uv1 ) +\n texture2D( uNoiseMap, uv2 ) +\n texture2D( uNoiseMap, uv3 );\n return noise * 0.5 - 1.0;\n}\n \nvoid sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) \n{\n vec3 sunDirection = czm_lightDirectionEC; \n vec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) ); \n float direction = max( 0.0, dot( eyeDirection, reflection ) ); \n specularColor += pow( direction, shiny ) * uSunColor.rgb * spec; \n diffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * uSunColor.rgb * diffuse; \n} \n\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\n\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ),\n vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ),\n vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n const float toneMappingExposure = 1.0;\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return clamp( color, 0.0, 1.0);\n}\n\n#ifdef COMPUTE_W_VALUE\n varying float wValue;\n#endif\n\nvoid main()\n{\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n vec4 v_PositionMC = vPositionMC; \n v_PositionMC.w = 1.0;\n v_PositionMC = uGeoMatrix * v_PositionMC;\n mat4 scalemat = mat4(0.5, 0.0, 0.0, 0.0, \n 0.0, 0.5, 0.0, 0.0, \n 0.0, 0.0, 0.5, 0.0, \n 0.5, 0.5, 0.5, 1.0); \n vec4 proj = scalemat * vPosition; \n vec3 vMirrorCoord = proj.xyw; \n vec3 worldToEye = -v_positionEC.xyz; \n float distance = length(worldToEye);\n vec4 noise = getNoise(v_PositionMC.xy); \n noise.xy *= uNoiseStrength;\n vec3 surfaceNormalEC = czm_normal * normalize( noise.xyz * vec3( 1.5, 1.5, 1.0 ) );\n vec3 diffuseLight = vec3(0.0); \n vec3 specularLight = vec3(0.0); \n vec3 eyeDirection = normalize( worldToEye.xyz ); \n sunLight( surfaceNormalEC, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );\n\n vec2 distortion = surfaceNormalEC.xy * ( 0.001 + 1.0 / distance ) * 3.7;\n vec2 mirrorCoord = vMirrorCoord.xy / vMirrorCoord.z;\n vec3 reflectionSample = vec3( textureLod( uReflectMap, mirrorCoord + distortion, uReflectMapLod));\n float theta = max( dot( eyeDirection, surfaceNormalEC ), 0.0 ); \n float rf0 = 0.3; \n vec3 waterColor = uWaterColor.rgb * uWaterBrightness;\n float reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 ); \n vec3 scatter = max( 0.0, dot( surfaceNormalEC, eyeDirection ) ) * waterColor;\n reflectionSample *= uUseRefectMap;\n vec3 albedo = mix((uSunColor.rgb * diffuseLight * 0.3 + scatter), (vec3(0.1) + reflectionSample * 0.9 + reflectionSample * specularLight), reflectance); \n vec4 finalColor = vec4(albedo, 1.0); \n finalColor.a = uWaterColor.a;\n #ifndef HDR\n finalColor.rgb = ACESFilmicToneMapping(finalColor.rgb);\n #endif\n if(finalColor.a < 0.1)\n {\n discard;\n }\n\n#ifdef HYPSOMETRIC\n if(wValue > uMaxVisibleValue || wValue < uMinVisibleValue)\n {\n finalColor.a = 0.0;\n }\n#endif\n gl_FragColor = finalColor;\n}",_0x225fe1=(_0x2579c2=!0,function(e,t){var i=_0x2579c2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2579c2=!1,i}),_0x1c3bbc=_0x225fe1(void 0,(function(){return _0x1c3bbc.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c3bbc).search("(((.+)+)+)+$")})),_0x2579c2;function _0x273cff(e){}function _0x5342d0(e){return e.verticesCount<=8||16==e.verticesCount}function _0x25eac9(e){return 1!==e._brightness||1!==e._contrast||0!==e._hue||1!==e._saturation||1!==e._gamma}_0x1c3bbc(),_0x273cff.createShaderProgram=function(e,t,i){var n=t.layer,r=n._context;r.webgl2;var o=!1,a=n._style3D,s="S3MTilesVectex_",l="S3MTilesFragment_",u=new s$V({name:s,sources:[r.webgpu?_0x36d142:_0x359ef7],useWGSL:r.webgpu}),c=new s$V({name:l,sources:[r.webgpu?_0x4c43d7:_0x1931a7],useWGSL:r.webgpu});switch(t.fileType){case p$T.PointCloudFile:l="S3MPointCloudFp_",u=new s$V({name:s="S3MPointCloudVp_",sources:[(o=r.webgpu)?_0x2cd408:_0x21e433],useWGSL:o}),(c=new s$V({name:l,sources:[o?_0x138829:_0x589347],useWGSL:o})).defines.push(D$V.PT_CLOUD),u.defines.push(D$V.PT_CLOUD);var h=t.volTexture||t.volObj;if((n._bUseHypColorTable||h&&n._bUseHypColorTable)&&(u.defines.push(D$V.COMPUTE_W_VALUE),u.defines.push(D$V.HYPSOMETRIC),u.defines.push(D$V.VOL_AND_HYP),c.defines.push(D$V.HYPSOMETRIC),c.defines.push(D$V.COMPUTE_W_VALUE),c.defines.push(D$V.VOL_AND_HYP)),e$2e((_=t.vertexPackage).nCompressOptions))((m=_.nCompressOptions)&_0x64fca6.SVC_Vertex)==_0x64fca6.SVC_Vertex&&u.defines.push(D$V.COMPRESS_VERTEX),(m&_0x64fca6.SVC_Normal)==_0x64fca6.SVC_Normal&&u.defines.push(D$V.COMPRESS_NORMAL),((m&_0x64fca6.SVC_VertexColor)==_0x64fca6.SVC_VertexColor||"MESHOPT"===n._vertexCompressionType)&&u.defines.push(D$V.COMPRESS_COLOR),(m&_0x64fca6.SVC_TexutreCoord)==_0x64fca6.SVC_TexutreCoord&&u.defines.push(D$V.COMPRESS_TEXCOORD);e$2e(_.textureCoordIsW)&&t.hasTexCoord&&u.defines.push(D$V.TEXTURE_COORD_ONE_IS_W),n._clipping&&c.defines.push("CLIP"),n._section&&c.defines.push("CLIPPLANE");break;case p$T.OSGBFile:case p$T.OSGBCacheFile:u=new s$V({name:s,sources:[(o=r.webgpu)?_0x36d142:_0x359ef7],useWGSL:o});var d=t.materialPass._textures.length;if(t.materialPass._isInvalidOblique)(c=new s$V({name:l="S3MTilesFragment_",sources:[o?_0x4c43d7:_0x1931a7],useWGSL:o})).defines.push(D$V.INVALID_OBLIQUE);else if(t.hasTexCoord){if(d>0){if(c=new s$V({name:l="S3MTilesFragment_",sources:[o?_0x4c43d7:_0x1931a7],useWGSL:o}),e$2e(t.materialPass._batchTable)){var f=t.materialPass._batchTable.getVertexShaderCallback(o)(o?_0x36d142:_0x359ef7);(u=new s$V({name:s,sources:[f],useWGSL:o})).defines.push(D$V.TextureBatch),c.defines.push(D$V.TextureBatch)}c.defines.push(D$V.Has_Texture),d>1&&t.hasTexCoord2&&(e$2e(t.materialPass._batchTableBake)&&(u=new s$V({name:s,sources:[f=t.materialPass._batchTableBake.getVertexShaderCallback(o)(f)],useWGSL:o})).defines.push(D$V.TextureBatch),u.defines.push(D$V.MULTI_TEX),c.defines.push(D$V.MULTI_TEX),2===n.textureEmissionUnit&&c.defines.push(D$V.SEC_TEX_EMISSION))}t.materialPass.hasTexture&&(u.defines.push(D$V.COMPUTE_TEXCOORD),c.defines.push(D$V.COMPUTE_TEXCOORD)),o&&1===t.primitiveType&&(l="S3MTilesPointFragmentWGSL",u=new s$V({name:s="S3MTilesPointVectexWGSL",sources:[_0x108a30],useWGSL:o}),c=new s$V({name:s,sources:[_0x355815],useWGSL:o}))}!t.hasTexCoord&&d>0&&(c.defines.push(D$V.Has_Texture),c.defines.push(D$V.NO_TEXCOORD)),t.materialPass._usePBRTextureBatch&&(u.defines.push(D$V.USE_BatchPBR),c.defines.push(D$V.USE_BatchPBR)),n.shadowType===_0x325616.NONE&&(u.defines.push("NormalVertex"),c.defines.push("NormalVertex")),!r.webgpu&&e$1W.maximumVertexTextureImageUnits>0&&u.defines.push("VertexTextureSupport"),n._isS3MB?((t.instanceMode===_0x14dd8d.S3MB_BIM_INSTANCE||t.instanceMode===_0x14dd8d.S3MB_BIM_INSTANCE_2)&&(u.defines.push("InstanceRenderBIM"),u.defines.push("InstanceS3MB")),t.instanceMode===_0x14dd8d.S3MB_PIPE_INSTANCE&&(u.defines.push("InstanceRenderPipeline"),c.defines.push("InstanceRenderPipeline"),u.defines.push("InstanceS3MB"),_0x5342d0(i._vertexPackage)&&(u.defines.push("IS_SQUARE_PIPE"),c.defines.push("IS_SQUARE_PIPE"))),(t.instanceMode===_0x14dd8d.S3MB_BIM_INSTANCE||t.instanceMode===_0x14dd8d.S3MB_BIM_INSTANCE_2||t.instanceMode===_0x14dd8d.S3MB_PIPE_INSTANCE)&&(u.defines.push("Instance"),c.defines.push("Instance"))):(t.instanceMode===_0x14dd8d.SIZE_PER_INSTANCE&&u.defines.push("InstanceRenderBIM"),t.instanceMode===_0x14dd8d.SIZE_PER_DM_INSTANCE&&(u.defines.push("InstanceRenderPipeline"),_0x5342d0(i._vertexPackage)&&(u.defines.push("IS_SQUARE_PIPE"),c.defines.push("IS_SQUARE_PIPE"))),(t.instanceMode===_0x14dd8d.SIZE_PER_DM_INSTANCE||t.instanceMode===_0x14dd8d.SIZE_PER_INSTANCE)&&(u.defines.push("Instance"),c.defines.push("Instance"))),n._clipping&&c.defines.push("CLIP"),n._section&&c.defines.push("CLIPPLANE"),t.volObj?(u.defines.push(D$V.VOLUME),c.defines.push(D$V.VOLUME)):t.volTexture&&(u.defines.push(D$V.VOLUME2),c.defines.push(D$V.VOLUME2)),e$2e(t.materialPass._mapTextures)&&Object.getOwnPropertyNames(t.materialPass._mapTextures).length>0&&c.defines.push("Map"),_0x25eac9(n)&&c.defines.push(D$V.ADJUST_COLOR),n._hasLight&&4===t.primitiveType&&(u.defines.push(D$V.HAS_LIGHT),c.defines.push(D$V.HAS_LIGHT)),t.hasNormal&&!t.ignoreNormal&&(u.defines.push(D$V.HAS_NORMAL),c.defines.push(D$V.HAS_NORMAL)),t.ignoreNormal&&c.defines.push(D$V.IGNORE_NORMAL),n._selectColorType===Zr$3.REPLACE?(u.defines.push(D$V.REPLACE_SELECT_TYPE),c.defines.push(D$V.REPLACE_SELECT_TYPE)):n.isSilhouette()&&(u.defines.push(D$V.SILHOUETTE_SELECT_TYPE),c.defines.push(D$V.SILHOUETTE_SELECT_TYPE)),(n._operationType&_0x27a6bb.CLIP)===_0x27a6bb.CLIP&&c.defines.push(D$V.CLIP_FILT_BY_ID),n._PBRMaterialType!==Xe$e.NONE&&(u.defines.push(D$V.PBR),c.defines.push(D$V.PBR)),n._flattening&&(u.defines.push(D$V.FALTTEN),r.floatingPointTexture&&u.defines.push(D$V.UseFloatTexture)),n._hasOverlay&&(u.defines.push(D$V.OVERLAY),c.defines.push(D$V.OVERLAY));h=t.volTexture||t.volObj;if((!n._bVolume&&n._bUseHypColorTable||h&&n._bUseHypColorTable)&&(u.defines.push(D$V.COMPUTE_W_VALUE),c.defines.push(D$V.COMPUTE_W_VALUE),u.defines.push(D$V.HYPSOMETRIC),c.defines.push(D$V.HYPSOMETRIC),u.defines.push(D$V.VOL_AND_HYP),c.defines.push(D$V.VOL_AND_HYP)),n._hasEmissiveTexAtlas&&(u.defines.push(D$V.COMPUTE_W_VALUE),c.defines.push(D$V.COMPUTE_W_VALUE),u.defines.push(D$V.EMISSION_TEXTURE_ATLAS),c.defines.push(D$V.EMISSION_TEXTURE_ATLAS)),e$2e(n._categorieTexture)&&u.defines.push(D$V.W_VISIBLE),e$2e(n._vertexWeightMode)&&n._vertexWeightMode===_0x132759.EdgeLengthMin&&n._triangleFiltratePixel>0&&u.defines.push(D$V.TRIANGLE_FILTRATE),e$2e((_=t.vertexPackage).nCompressOptions))((m=_.nCompressOptions)&_0x64fca6.SVC_Vertex)==_0x64fca6.SVC_Vertex&&u.defines.push(D$V.COMPRESS_VERTEX),(m&_0x64fca6.SVC_Normal)==_0x64fca6.SVC_Normal&&u.defines.push(D$V.COMPRESS_NORMAL),((m&_0x64fca6.SVC_VertexColor)==_0x64fca6.SVC_VertexColor||"MESHOPT"===n._vertexCompressionType)&&u.defines.push(D$V.COMPRESS_COLOR),(m&_0x64fca6.SVC_TexutreCoord)==_0x64fca6.SVC_TexutreCoord&&(u.defines.push(D$V.COMPRESS_TEXCOORD),"MESHOPT"===n._vertexCompressionType&&u.defines.push("UINT_TEXCOORD0"));n._lastSelectSkeletonId>-1&&u.defines.push("HAS_SKELETONSELECTED"),(e$2e(n._imageryLayer)||n._needCoverImageryLayer)&&e$2e(i._imagerys)&&i._imagerys.length>0&&e$2e(t.attributeLocations.img)&&(u.defines.push("IMAGERY"),c.defines.push("IMAGERY")),n.partlyTransparent&&e$2e(t.materialPass._bTransparentSorting)&&c.defines.push("PARTLY_TRANSPARENT"),n._scene.pickPointEnabled&&(u.defines.push(D$V.VERTEX_CAPTURE),c.defines.push(D$V.VERTEX_CAPTURE));var p=e$2e(n.themeStyle)&&e$2e(n.themeStyle.pbrMaterialIndex);(t.materialPass._usePBR||n._usePBR||p)&&(c.defines.push(D$V.BRDF),t.context.textureFloatLinear&&c.defines.push("OES_texture_float_linear"),p&&(u.defines.push(D$V.PBR_THEME),c.defines.push(D$V.PBR_THEME),c.defines.push("NUM_PBR_MATERIALS "+e.pbrMaterialsArr.length)),(t.materialPass._baseColorTextureIndex>-1&&e$2e(t.materialPass.baseColorTexture)||e$2e(n._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture))&&t.hasTexCoord&&c.defines.push(D$V.HAS_BASE_TEXTURE),(t.materialPass._metallicRoughnessTextureIndex>-1&&e$2e(t.materialPass.metallicRoughnessTexture)||e$2e(n._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture))&&t.hasTexCoord&&c.defines.push(D$V.HAS_MetallicRoughness_TEXTURE),(t.materialPass._normalTextureIndex>-1&&e$2e(t.materialPass.normalTexture)||e$2e(n._PBRMaterialParams.pbrMetallicRoughness.normalTexture))&&t.hasTexCoord&&c.defines.push(D$V.HAS_NORMAL_TEXTURE),(t.materialPass._emissiveTextureIndex>-1&&e$2e(t.materialPass.emissiveTexture)||e$2e(n._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture))&&c.defines.push(D$V.HAS_EMISSIVE_TEXTURE),(t.materialPass._occlusionTextureIndex>-1||e$2e(n._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)&&n._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture instanceof t$U)&&t.hasTexCoord&&c.defines.push(D$V.HAS_OCCLUSION_TEXTURE),n._hasSnowEffect&&c.defines.push(D$V.HAS_SNOW),e$2e(n._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&n._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture&&n._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof t$U&&c.defines.push(D$V.HAS_RAIN),e$2e(t.materialPass._alphaMode)&&t.materialPass._alphaMode===_0x36a597.MASK&&c.defines.push(D$V.MASK),(e$2e(e.specularEnvironmentMaps)||e$2e(e.hdrEnvMap))&&(c.defines.push(D$V.IBL),e$2e(e.specularEnvironmentMaps)&&c.defines.push(D$V.KtxEnvMap)),i._isPBR=!0),n._PBRMaterialParams.pbrMetallicRoughness.emissionTextureIndex>0&&c.defines.push(D$V.SEC_TEX_EMISSION),n.visibleDistanceMax<6378137&&n.translucencyByDistance&&c.defines.push(D$V.VISIBLEDISTANCEMAX),e$2e(t.unFinalResolution)&&t.unFinalResolution&&(u.defines.push("FINAL_RESOLUTION_CLIP"),c.defines.push("FINAL_RESOLUTION_CLIP"));break;case p$T.ClampGroundPolygon:case p$T.ClampObjectPolygon:var _,m;if(e$2e((_=t.vertexPackage).clampRegionEdge))l="S3MTilesShadowVolumeFP_",u=new s$V({name:s="S3MTilesLineShadowVectex_",sources:[_0x48d945]}),c=new s$V({name:l,sources:[_0xfeefe2]});else{var g=t.materialPass._textures.length>0||t.hasSymbolTexture;l="S3MTilesShadowVolumeFP_",u=new s$V({name:s="S3MTilesRegionShadowVectex_",sources:[_0x5099e1]}),c=new s$V({name:l,sources:[_0x4a0943]}),g&&(u.defines.push("HAS_TEXTURE"),c.defines.push("HAS_TEXTURE"))}if(e$2e(_.nCompressOptions))((m=_.nCompressOptions)&_0x64fca6.SVC_Vertex)==_0x64fca6.SVC_Vertex&&u.defines.push(D$V.COMPRESS_VERTEX),(m&_0x64fca6.SVC_Normal)==_0x64fca6.SVC_Normal&&u.defines.push(D$V.COMPRESS_NORMAL),(m&_0x64fca6.SVC_TexutreCoord)==_0x64fca6.SVC_TexutreCoord&&u.defines.push(D$V.COMPRESS_TEXCOORD);break;case p$T.ExtendClampPolygonCache:l="S3MTilesShadowVolumeFP_",u=new s$V({name:s="S3MTilesExtendPolygonShadowVP_",sources:[_0xb2d90]}),c=new s$V({name:l,sources:[_0x4a0943]});break;case p$T.ClampGroundLine:l="S3MTilesClampGroundLineFP_",u=new s$V({name:s="S3MTilesClampGroundLineVectex_",sources:[_0x4faa00]}),c=new s$V({name:l,sources:[_0x4a0943]});break;case p$T.ClampGroundAndObjectLineCache:l="S3MTilesShadowVolumeFP_",u=new s$V({name:s="S3MTilesLineShadowVectex_",sources:[_0x48d945]}),c=new s$V({name:l,sources:[_0xfeefe2]});break;case p$T.ClampObjectLine:l="S3MTilesShadowVolumeFP_",u=new s$V({name:s="S3MTilesLineShadowVectex_",sources:[_0x4faa00]}),c=new s$V({name:l,sources:[_0x4a0943]});break;case p$T.IconPoint:a.billboardMode===yr$2.FixedZ?u=new s$V({name:s="BillboardAxialVp_",sources:[_0x258e9c]}):a.billboardMode===yr$2.FixedXYZ?u=new s$V({name:s="BillboardPixelSizeWithAngleVp_",sources:[_0xe606d6]}):u=new s$V({name:s="S3MTilesBillboardPixelSizeVp_",sources:[_0x43476e]}),c=new s$V({name:l="S3MTilesCommonOntTextureFP_",sources:[_0x357523]}),u.defines.push("ICON"),e$2e(a.fixedPixelSize)&&!a.fixedPixelSize&&u.defines.push("EYE_DISTANCE_SCALING"),n._clipping&&c.defines.push("CLIP"),n._section&&c.defines.push("CLIPPLANE"),t.hasNormal&&!t.ignoreNormal&&(u.defines.push(D$V.HAS_NORMAL),c.defines.push(D$V.HAS_NORMAL)),t.hasTexCoord2&&u.defines.push(D$V.TEXCOORD2);break;case p$T.Text:s="S3MTilesBillboardPixelSizeVp_",u=a.billboardMode===yr$2.FixedXYZ?new s$V({name:s,sources:[_0xe606d6]}):new s$V({name:s,sources:[_0x43476e]}),t.materialPass._textures.length>1?c=new s$V({name:l="S3MTilesFontWithHaloFp_",sources:[_0xf44c9d]}):t.materialPass._textures.length>0?c=new s$V({name:l="S3MTilesCommonOntTextureFP_",sources:[_0x357523]}):c=new s$V({name:l="S3MTilesCommonOneTextureFP_",sources:[_0x357523]}),n._clipping&&c.defines.push("CLIP"),t.layer._section&&c.defines.push("CLIPPLANE"),t.hasNormal&&!t.ignoreNormal&&(u.defines.push(D$V.HAS_NORMAL),c.defines.push(D$V.HAS_NORMAL)),t.hasTexCoord2&&(u.defines.push(D$V.TEXCOORD2),c.defines.push(D$V.TEXCOORD2));break;case p$T.ExtendRegion3D:l="DynamicExtendRegionFp_",u=new s$V({name:s="DynamicExtendRegionVp_",sources:[_0x1dd94]}),c=new s$V({name:l,sources:[_0x507f80]}),t.materialPass._textures.length>0&&c.defines.push("HAS_TEXTURE"),n._hasLight&&(u.defines.push(D$V.HAS_LIGHT),c.defines.push(D$V.HAS_LIGHT));break;case p$T.RegionEffect:l="RegionMaterialFp_",u=new s$V({name:s="RegionMaterialVp_",sources:[_0x33ffa2]}),c=new s$V({name:l,sources:[_0x3c68b9]}),n._clipping&&c.defines.push("CLIP"),n._hasExcavation&&(u.defines.push(D$V.EXCAVATION),c.defines.push(D$V.EXCAVATION)),n._hasServerExcavation&&(u.defines.push("SERVEREXCAVATION"),c.defines.push("SERVEREXCAVATION"));break;case p$T.PolylineEffect:l="PolylineFp_",u=new s$V({name:s="PolylineVp_",sources:[_0x1568b2]}),c=new s$V({name:l,sources:[_0x501956]}),n._clipping&&c.defines.push("CLIP"),n._hasExcavation&&(u.defines.push(D$V.EXCAVATION),c.defines.push(D$V.EXCAVATION)),n._hasServerExcavation&&(u.defines.push("SERVEREXCAVATION"),c.defines.push("SERVEREXCAVATION"));break;case p$T.ClampGroundRealtimeRasterCache:c=new s$V({name:l="S3MTilesFragmentRaster_",sources:[_0xb37562]}),u=new s$V({name:s="S3MTilesVectexRaster_",sources:[_0x903893]}),n._selectColorType===Zr$3.REPLACE&&(u.defines.push(D$V.REPLACE_SELECT_TYPE),c.defines.push(D$V.REPLACE_SELECT_TYPE)),(t.hasSymbolTexture||t.materialPass._textures.length>0)&&(u.defines.push(D$V.TEXCOORD),c.defines.push(D$V.TEXCOORD))}(t.fileType===p$T.ClampGroundRealtimeRasterCache&&t.hasTexCoord2&&(e$2e(n._polylineEffectUbo)||(n._polylineEffectUbo=new _0x8dd7b2(n)),l="PolylineFp_",u=new s$V({name:s="PolylineVp_",sources:[_0x4bddb0]}),c=new s$V({name:l,sources:[_0x501956]})),t.hasTexCoord&&(u.defines.push(D$V.TEXCOORD),c.defines.push(D$V.TEXCOORD)),t.hasTexCoord2&&(u.defines.push(D$V.TEXCOORD2),c.defines.push(D$V.TEXCOORD2)),n.horizontalline&&(u.defines.push(D$V.COMPUTE_W_VALUE),c.defines.push(D$V.COMPUTE_W_VALUE),c.defines.push(D$V.HORIZONTAL_LINE)),n._transparentBackColorTolerance>0&&c.defines.push(D$V.TRANSPARENT_BACK_COLOR),(n.swipeEnabled||n.splitDirection!==_0x2d4a08.NONE)&&c.defines.push(D$V.APPLY_SWIPE),"MESHOPT"===n._vertexCompressionType?u.defines.push("MeshOPT_Compress"):"DRACO"===n._vertexCompressionType&&u.defines.push("DRACO_Compress"),e$2e(t.vertexPackage.customVertexAttribute)&&e$2e(t.vertexPackage.customVertexAttribute.TextureCoordMatrix)&&u.defines.push("USE_TextureCoordMatrix"),e$2e(t.vertexPackage.customVertexAttribute)&&e$2e(t.vertexPackage.customVertexAttribute.VertexWeight)&&u.defines.push("USE_VertexWeight"),i._bMultiTemporalWeight&&(u.defines.push("MultiTemporalWeight"),c.defines.push("MultiTemporalWeight"),n.temporalSetting.changeZValue&&u.defines.push("ChangeZValue")),e$2e(e.lightSource))&&(c.defines.push("MAX_POINT_LIGHT_COUNT "+s$J.MaxPointLightCount),c.defines.push("MAX_SPOT_LIGHT_COUNT "+s$J.MaxSpotLightCount),c.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$J.MaxDirectionLightCount),e.lightSource.directionalLight.length>0&&c.defines.push(D$V.HAS_DIR_LIGHTS),e.lightSource._visibleLightList[_0x4970c2.POINT].length>0&&c.defines.push(D$V.HAS_POINT_LIGHTS),e.lightSource._visibleLightList[_0x4970c2.SPOT].length>0&&c.defines.push(D$V.HAS_SPOT_LIGHTS),e.lightSource.hemisphereLight.length>0&&c.defines.push(D$V.HAS_HEMISPHERE_LIGHTS));if(n._hasExcavation&&(u.defines.push(D$V.EXCAVATION),c.defines.push(D$V.EXCAVATION)),n._hasServerExcavation&&(u.defines.push("SERVEREXCAVATION"),c.defines.push("SERVEREXCAVATION")),t.hasInstanceSkeletonMatrix&&u.defines.push(D$V.UseInstanceSkeletonMatrix),n.mixColorType===_0x2b839f.REPLACE&&(u.defines.push(D$V.REPLACE_COLOR_TYPE),c.defines.push(D$V.REPLACE_COLOR_TYPE)),t.hasVertexColor&&u.defines.push("VertexColor"),t.isInstanceModel&&u.defines.push("InstanceModel"),t.hasTranslation&&u.defines.push(D$V.Translation),1===t.primitiveType&&(u.defines.push(D$V.POINT),c.defines.push(D$V.POINT)),2===t.primitiveType&&c.defines.push(D$V.LineVector),t.materialPass._RGBTOBGR&&c.defines.push(D$V.RGBTOBGR),n.enableFusion&&u.defines.push(D$V.FusionMode),e$2e(i._batchTable)&&(u.defines.push("BatchTable"),i._batchTable.hasMultiRow()&&u.defines.push("BatchTableMultiRow")),e$2e(n._floodFlagTexture)&&(u.defines.push(D$V.FLOOD_ANALYSIS),c.defines.push(D$V.FLOOD_ANALYSIS)),e$2e(i._batchTable)){for(var x=[f=i._batchTable.getVertexShaderCallback(o)(u.sources[0])],y=1;y<u.sources.length;y++)x.push(u.sources[y]);u=new s$V({name:s,defines:u.defines,sources:x,useWGSL:o})}return e$2e(n._effect)&&1===n._effect._type&&u.defines.push("POLYLINE_DASH"),e$2e(n._associateMaterialUrl)&&i._material.isAssociateMaterial&&c.defines.push("BaseColorReplace"),o&&(u.defines.push("WEBGPU"),c.defines.push("WEBGPU")),3===t.nVertexDim&&u.defines.push(D$V.HypColorByZValue),i._specularEnvironmentMaps=e.specularEnvironmentMaps,i._hdrEnvMap=e.hdrEnvMap,i._createImageryShader(n,c),r$14.fromCache({context:t.context,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:t.attributeLocations,useWGSL:o})},_0x273cff.createWaterShaderProgram=function(e,t,i,n){var r=new s$V({name:"FresnelVp",sources:[_0x5854b2]}),o=new s$V({name:"FresnelFp",sources:[_0x120def]});return t._clipping&&o.defines.push("CLIP"),t._section&&o.defines.push("CLIPPLANE"),e$2e(n._batchTable)&&(r.defines.push("BatchTable"),n._batchTable.hasMultiRow()&&r.defines.push("BatchTableMultiRow")),e$2e(t._rsColor.polygonOffset)&&t._rsColor.polygonOffset.enabled&&o.defines.push("POLYGON_OFFSET"),t._hasExcavation&&(r.defines.push(D$V.EXCAVATION),o.defines.push(D$V.EXCAVATION)),t._hasServerExcavation&&(r.defines.push("SERVEREXCAVATION"),o.defines.push("SERVEREXCAVATION")),(t.swipeEnabled||t.splitDirection!==_0x2d4a08.NONE)&&o.defines.push(D$V.APPLY_SWIPE),e$2e(t._effect)&&1===t._effect._type&&r.defines.push("POLYLINE_DASH"),r$14.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:i})},_0x273cff.createMultiTemporalWaterShaderProgram=function(e,t,i,n,r){var o=new s$V({name:"S3MTilesVectex",sources:[e.webgpu?_0x36d142:_0x359ef7]}),a=new s$V({name:"MultiTemporalFresnelFp",sources:[_0x3489f1]});return e$2e(n._batchTable)&&(o.defines.push("BatchTable"),n._batchTable.hasMultiRow()&&o.defines.push("BatchTableMultiRow")),e$2e(r.vertexPackage.customVertexAttribute)&&e$2e(r.vertexPackage.customVertexAttribute.VertexWeight)&&o.defines.push("USE_VertexWeight"),n._bMultiTemporalWeight&&(o.defines.push("MultiTemporalWeight"),a.defines.push("MultiTemporalWeight"),t.temporalSetting.changeZValue&&o.defines.push("ChangeZValue")),t.multiTemporalUseWater&&(o.defines.push(D$V.COMPUTE_W_VALUE),a.defines.push(D$V.COMPUTE_W_VALUE),o.defines.push(D$V.HYPSOMETRIC),a.defines.push(D$V.HYPSOMETRIC),o.defines.push(D$V.VOL_AND_HYP),a.defines.push(D$V.VOL_AND_HYP)),r$14.fromCache({context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:i})};var _0x55498e=(_0x133721=!0,function(e,t){var i=_0x133721?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x133721=!1,i}),_0x442d00=_0x55498e(void 0,(function(){return _0x442d00.toString().search("(((.+)+)+)+$").toString().constructor(_0x442d00).search("(((.+)+)+)+$")})),_0x133721;_0x442d00();var _0x5adff0=function(){this.model=void 0,this.frameState=void 0,this.layer=void 0};function o$U(){this._fProgress=0,this._nLocation=-1,this._changeZValue=!0}_0x5adff0.prototype.set=function(e,t,i){this.frameState=e,this.layer=t,this.model=i},_0x5adff0.prototype.execute=function(){var e,t=this.frameState,i=t.context,n=this.model,r=this.layer,o=n._vertexPackage,a=o.attrLocation,s=r._fileType,l=n._arrIndexPackage&&n._arrIndexPackage[0];e$2e(n._material)?e=n._material:(e$2e(l)&&"string"==typeof l.materialCode&&(l.materialCode=l.materialCode.replace(/\0/,"")),e=e$2e(l)&&e$2e(l.materialCode)?n._mapPass[l.materialCode]:_0xf77618.Default);var u={};u.primitiveType=s===p$T.PointCloudFile?W$18.POINTS:e$2e(l)?l.primitiveType:W$18.TRIANGLES,u.context=i,u.fileType=s,u.layer=r,u.instanceMode=o.instanceMode,u.volObj=n._volObj,u.volTexture=n._volTexture,u.materialPass=e,u.attributeLocations=a,u.nVertexDim=n._vertexDim,u.vertexPackage=o,u.hasNormal=e$2e(a.aNormal)&&!r._ignoreNormal,u.hasTexCoord=e$2e(a.aTexCoord0),u.hasTexCoord2=e$2e(a.aTexCoord1),u.hasSymbolTexture=e$2e(n._symbolTextureUrl),u.hasInstanceSkeletonMatrix=e$2e(n._instanceSkeletonMatrix),u.hasVertexColor=e$2e(a.aColor),u.isInstanceModel=n._isInstanceModel,u.hasTranslation=n._idsTranslateMap.length>0,u.ignoreNormal=r.ignoreNormal,e$2e(r.waterEffectSet)?n._sp=_0x273cff.createWaterShaderProgram(i,r,a,n):r.multiTemporalUseWater?n._sp=_0x273cff.createMultiTemporalWaterShaderProgram(i,r,a,n,u):(n._sp=_0x273cff.createShaderProgram(t,u,n),r.LoadingPriority===_0x539352.UsePagedLodInfo&&(u.unFinalResolution=!0,n._spUnFinalResolution=_0x273cff.createShaderProgram(t,u,n)))},Object.defineProperties(o$U.prototype,{progress:{get:function(){return this._fProgress},set:function(e){this._fProgress=e}},location:{get:function(){return this._nLocation},set:function(e){this._nLocation=e}},changeZValue:{get:function(){return this._changeZValue},set:function(e){this._changeZValue=e}}}),o$U.clone=function(e,t){if(e$2e(e))return e$2e(t)||(t=new o$U),t._fTemporalPercentage=e._fTemporalPercentage,t._nTemporalPos=e._nTemporalPos,t};var _0x23d40a=(_0x183740=!0,function(e,t){var i=_0x183740?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x183740=!1,i}),_0x32df24=_0x23d40a(void 0,(function(){return _0x32df24.toString().search("(((.+)+)+)+$").toString().constructor(_0x32df24).search("(((.+)+)+)+$")})),_0x183740;_0x32df24();const _0x144e7a="uTexture",_0x3391b3="uSecTexture",_0x167570="batchTexture",_0x5cbc58="uPBRTexture",_0x417038="uBaseTexture",_0xbeac04="uNormalTexture",_0x4a928c="uMetallicRoughnessTexture",_0x1c6db2="uEmissionTexture",_0x162a35="uOcclusionTexture",_0x38e2e4="uSnowMaskTexture",_0x64912a="uSnowNormalTexture",_0x205d5d="uRippleTexture",_0x4a1693="batchTexture_baseTex",_0x56499d="batchTexture_bakeTex",_0x4117c3="u_dayTextures",_0x43c5c0=5;function _0x4f8f70(e,t,i){var n=_0x37a515.call(this)||this;n._ro=e,n._materialPass=t,n._layer=i,n._name=_0x2e0417.MATERIAL,n._context=i._context,n._uniformState=n._context.uniformState,n._textures={},n._dayTextures=[],n._textureDirtyFrameCount=-1,this._initUniformMap()}_0x37a515&&(_0x4f8f70.__proto__=_0x37a515),_0x4f8f70.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x4f8f70.prototype.constructor=_0x37a515,Object.defineProperties(_0x4f8f70.prototype,{}),_0x4f8f70.prototype._initUBOStruct=function(){this._ubo.addUniform("uTexMatrix",16),this._ubo.addUniform("uDiffuseColor",4),this._ubo.addUniform("uAmbientColor",4),this._ubo.addUniform("uSpecularColor",4),this._ubo.addUniform("uTexUVOffset",4),this._ubo.addUniform("uTextureDim",4),this._ubo.addUniform("uTextureWidths",2),this._ubo.addUniform("batchTextureStep_baseTex",4),this._ubo.addUniform("batchTextureDimensions_baseTex",2),this._ubo.addUniform("batchTextureStep_bakeTex",4),this._ubo.addUniform("batchTextureDimensions_bakeTex",2),this._ubo.addUniform("uBaseColorFactor",4),this._ubo.addUniform("uEmissiveFactor",4),this._ubo.addUniform("uEmissiveUVOffsetAndTiling",4),this._ubo.addUniform("uMetallicRoughnessIntensityScale",3),this._ubo.addUniform("uPBRTexWH",2),this._ubo.addUniform("uNormalTextureScale",1),this._ubo.addUniform("uAlphaMode",1),this._ubo.addUniform("uAlphaCutoff",1),this._ubo.addUniform("uPbrParTextureWidth",1)},_0x4f8f70.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())};var _0x5a7513=new e$2c;_0x4f8f70.prototype._updateTexUVOffset=function(){_0x5a7513.x=0,_0x5a7513.y=0,_0x5a7513.z=1,_0x5a7513.w=1;var e=this._materialPass,t=this._layer,i=e._baseColorTextureMotion;if(e$2e(i)){var n=i.OffsetPeriod,r=i.OffsetSpeedU,o=i.OffsetSpeedV,a=i.TilingPeriod,s=i.TilingSpeedU,l=i.TilingSpeedV,u=performance.now()/1e3;if(n>0){var c=u%n;_0x5a7513.x=c*r,_0x5a7513.y=c*o}if(a>0){var h=u%a;_0x5a7513.z=1+h*s,_0x5a7513.w=1+h*l}}else if(e$2e(t._textureUVSpeed)&&(0!==t._textureUVSpeed.x||0!==t._textureUVSpeed.y)){var d=performance.now()/1e3;_0x5a7513.x=t._textureUVSpeed.x*d,_0x5a7513.y=t._textureUVSpeed.y*d}this._ubo.updateFloat4("uTexUVOffset",_0x5a7513.x,_0x5a7513.y,_0x5a7513.z,_0x5a7513.w)},_0x4f8f70.prototype._updateEmissiveUVOffsetAndTiling=function(){const e=this._materialPass,t=this._layer._PBRMaterialParams.pbrMetallicRoughness;_0x5a7513.x=0,_0x5a7513.y=0,_0x5a7513.z=1,_0x5a7513.w=1;const i=u$Z(e._emissiveTextureMotion,t.emissiveTextureMotion);if(e$2e(i)){var n=performance.now()/1e3,r=i.OffsetPeriod,o=i.OffsetSpeedU,a=i.OffsetSpeedV,s=i.TilingPeriod,l=i.TilingSpeedU,u=i.TilingSpeedV;if(i&&r>0){var c=n%r;_0x5a7513.x=c*o,_0x5a7513.y=c*a}if(i&&s>0){var h=n%s;_0x5a7513.z=1+h*l,_0x5a7513.w=1+h*u}}this._ubo.updateFloat4("uEmissiveUVOffsetAndTiling",_0x5a7513.x,_0x5a7513.y,_0x5a7513.z,_0x5a7513.w)},_0x4f8f70.prototype._updateTextureBatchTable=function(){const e=this._ubo,t=this._materialPass,i=t._batchTable;if(!e$2e(i))return;this._setTextureByType(_0x4a1693,i._texture);const n=i._textureStep;e.updateFloat4("batchTextureStep_baseTex",n.x,n.y,n.z,n.w);const r=i._textureDimensions;e.updateFloat2("batchTextureDimensions_baseTex",r.x,r.y);const o=t._batchTableBake;if(!e$2e(o))return;this._setTextureByType(_0x56499d,o._texture);const a=o._textureStep;e.updateFloat4("batchTextureStep_bakeTex",a.x,a.y,a.z,a.w);const s=o._textureDimensions;e.updateFloat2("batchTextureDimensions_bakeTex",s.x,s.y)};var _0x4afe12=new o$1p;_0x4f8f70.prototype._updateMetallicRoughnessIntensityScale=function(){var e=this._materialPass,t=this._layer;_0x4afe12.x=u$Z(e._metallicFactor,t._PBRMaterialParams.pbrMetallicRoughness.metallicFactor),_0x4afe12.y=u$Z(e._roughnessFactor,t._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor),_0x4afe12.z=1,e$2e(e._intensityScale)&&e._intensityScale>0?_0x4afe12.z=e._intensityScale:e$2e(t._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&t._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0&&(_0x4afe12.z=t._PBRMaterialParams.pbrMetallicRoughness.intensityScale),this._ubo.updateFloat3("uMetallicRoughnessIntensityScale",_0x4afe12.x,_0x4afe12.y,_0x4afe12.z)};var _0x4e0631=new o$1o;_0x4f8f70.prototype._updateTextureWidths=function(){var e=this._materialPass;e$2e(e.baseColorTexture)?this._ubo.updateFloat2("uTextureWidths",e.baseColorTexture.width,e.baseColorTexture.height):(e$2e(e._textures[0])?_0x4e0631.x=e._textures[0].width:_0x4e0631.x=1,e$2e(e._textures[1])?_0x4e0631.y=e._textures[1].width:_0x4e0631.y=1,this._ubo.updateFloat2("uTextureWidths",_0x4e0631.x,_0x4e0631.y))};var _0x1f8b4e=new e$2c;_0x4f8f70.prototype._updateBatchTextureWidths=function(){const e=this._materialPass;if(!e$2e(e._batchTable))return;let t=e._textures[0];t=t.renderable?t:e$2e(e._ancestorTexture)?e._ancestorTexture:t,_0x1f8b4e.x=t._width,_0x1f8b4e.y=t._height;let i=e._textures[1];e$2e(i)&&(i=i.renderable?i:e$2e(e._ancestorTextureBake)?e._ancestorTextureBake:i,_0x1f8b4e.z=i._width,_0x1f8b4e.w=i._height),this._ubo.updateFloat4("uTextureDim",_0x1f8b4e.x,_0x1f8b4e.y,_0x1f8b4e.z,_0x1f8b4e.w)},_0x4f8f70.prototype._updatePbrParTextureValue=function(){var e=this._materialPass,t=e.pbrParamTexture;this._ubo.updateFloat2("uPBRTexWH",t.width,t.height);let i=1;e$2e(e.baseColorTexture)?i=e.baseColorTexture.width:e$2e(e.normalTexture)?i=e.normalTexture.width:e$2e(e.metallicRoughnessTexture)?i=e.metallicRoughnessTexture.width:e$2e(e.emissiveTexture)&&(i=e.emissiveTexture.width),this._ubo.updateFloat("uPbrParTextureWidth",i)},_0x4f8f70.prototype._getFirstTexture=function(){var e;e$2e(this._ro._symbolTextureUrl)?e$2e(e=_0x1451be.getTexture(this._ro._symbolTextureUrl))?this._setTextureByType(_0x144e7a,e):this._setTextureByType(_0x144e7a,this._layer._context.defaultTexture):e$2e(this._materialPass._textures[0])?((e=this._materialPass._textures[0]).isTexBlock&&(e=e.renderable&&e.ready?e:e$2e(this._materialPass._ancestorTexture)?this._materialPass._ancestorTexture:e),this._setTextureByType(_0x144e7a,e)):this._setTextureByType(_0x144e7a,this._layer._context.defaultTexture)},_0x4f8f70.prototype._getSecTexture=function(){if(!(this._materialPass._textures.length<2)){var e=this._materialPass._textures[1];e.isTexBlock&&(e=e.renderable&&e.ready?e:e$2e(this._materialPass._ancestorTextureBake)?this._materialPass._ancestorTextureBake:this._layer._context.defaultTexture),this._setTextureByType(_0x3391b3,e)}},_0x4f8f70.prototype._getBaseColorTexture=function(){e$2e(this._materialPass._baseColorTextureIndex)&&this._materialPass._baseColorTextureIndex>-1?this._setTextureByType(_0x417038,this._materialPass.baseColorTexture):this._setTextureByType(_0x417038,this._layer._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture)},_0x4f8f70.prototype._getNormalTexture=function(){if(e$2e(this._materialPass._normalTextureIndex)&&this._materialPass._normalTextureIndex>-1)return this._materialPass.normalTexture?void this._setTextureByType(_0xbeac04,this._materialPass.normalTexture):void this._setTextureByType(_0xbeac04,this._materialPass._textures[this._materialPass._normalTextureIndex]);this._setTextureByType(_0xbeac04,this._layer._PBRMaterialParams.pbrMetallicRoughness.normalTexture)},_0x4f8f70.prototype._getEmissiveTexture=function(){if(e$2e(this._materialPass.emissiveTexture))this._setTextureByType(_0x1c6db2,this._materialPass.emissiveTexture);else{var e=this._materialPass._emissiveTextureIndex;e>-1&&e$2e(this._materialPass._textures[e])?this._setTextureByType(_0x1c6db2,this._materialPass._textures[e]):this._setTextureByType(_0x1c6db2,this._layer._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture)}},_0x4f8f70.prototype._getMetalicRoughnessTexture=function(){if(e$2e(this._materialPass._metallicRoughnessTextureIndex)&&this._materialPass._metallicRoughnessTextureIndex>-1)return e$2e(this._materialPass.metallicRoughnessTexture)?void this._setTextureByType(_0x4a928c,this._materialPass.metallicRoughnessTexture):void this._setTextureByType(_0x4a928c,this._materialPass._textures[this._materialPass._metallicRoughnessTextureIndex]);e$2e(this._layer._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture)&&this._layer._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture instanceof t$U?this._setTextureByType(_0x4a928c,this._layer._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture):this._setTextureByType(_0x4a928c,this._context.defaultTexture)},_0x4f8f70.prototype._getOcclusionTexture=function(){if(e$2e(this._materialPass._occlusionTextureIndex)&&this._materialPass._occlusionTextureIndex>-1)return this._materialPass.occlusionTexture?void this._setTextureByType(_0x162a35,this._materialPass.occlusionTexture):e$2e(this._materialPass._textures[this._materialPass._occlusionTextureIndex])?void this._setTextureByType(_0x162a35,this._materialPass._textures[this._materialPass._occlusionTextureIndex]):void this._setTextureByType(_0x162a35,this._layer._context.defaultTexture);this._setTextureByType(_0x162a35,this._layer._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)},_0x4f8f70.prototype._getSnowMaskTexture=function(){this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect&&this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture instanceof t$U?this._setTextureByType(_0x38e2e4,this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture):this._setTextureByType(_0x38e2e4,this._context.defaultTexture)},_0x4f8f70.prototype._getSnowNormalTexture=function(){this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect&&this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture instanceof t$U?this._setTextureByType(_0x64912a,this._layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture):this._setTextureByType(_0x64912a,this._context.defaultTexture)},_0x4f8f70.prototype._getRippleTexture=function(){this._layer._PBRMaterialParams.pbrMetallicRoughness.rainEffect&&this._layer._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof t$U?this._setTextureByType(_0x205d5d,this._layer._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture):this._setTextureByType(_0x205d5d,this._context.defaultTexture)},_0x4f8f70.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x4f8f70.prototype._isBatchTextureRenderable=function(){const e=this._materialPass;if(!e$2e(e._batchTable))return!1;let t=e._textures[0];if(!e$2e(t))return!1;let i=t.renderable,n=e._textures[1];return e$2e(n)&&(i=i&&n.renderable),!i},_0x4f8f70.prototype.update=function(e){if(!e.webgpu&&!e.webgl2||!this._isValueDirty)return;var t=this._ro;this._isTextureDirty=!1,e$2e(this._ubo)||this._initUBO(e);var i=this._materialPass,n=this._layer;_0x37a515.writeMatrix4ToUBO("uTexMatrix",this._ubo,i._texMatrix),_0x37a515.writeColorToUBO("uDiffuseColor",this._ubo,i._diffuseColor),_0x37a515.writeColorToUBO("uAmbientColor",this._ubo,i._ambientColor),_0x37a515.writeColorToUBO("uSpecularColor",this._ubo,i._specularColor);var r=i._baseColor||n._PBRMaterialParams.pbrMetallicRoughness.baseColor;e$2e(r.x)?_0x37a515.writeCartesian4ToUBO("uBaseColorFactor",this._ubo,r):e$2e(r.red)&&_0x37a515.writeColorToUBO("uBaseColorFactor",this._ubo,r);var o=i._emissiveFactor||n._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor;e$2e(o.x)?this._ubo.updateFloat4("uEmissiveFactor",o.x,o.y,o.z,o.w):e$2e(o.red)&&this._ubo.updateFloat4("uEmissiveFactor",o.red,o.green,o.blue,o.alpha),e$2e(i.pbrParamTexture)&&this._updatePbrParTextureValue(),this._ubo.updateFloat("uNormalTextureScale",1);var a=1;switch(i._alphaMode){case"opaque":a=1;break;case"mask":a=2;break;case"blend":a=3}this._ubo.updateFloat("uAlphaMode",a),this._ubo.updateFloat("uAlphaCutoff",u$Z(i._alphaCutoff,0)),this._updateMetallicRoughnessIntensityScale(),this._updateTexUVOffset(),this._updateBatchTextureWidths(),this._updateTextureWidths(),this._updateEmissiveUVOffsetAndTiling(),this._updateTextureBatchTable(),this._ubo.update(),this._getFirstTexture(),this._getSecTexture(),e$2e(this._ro._batchTable)&&this._setTextureByType(_0x167570,this._ro._batchTable._texture),this._setTextureByType(_0x5cbc58,this._materialPass.pbrParamTexture),this._getBaseColorTexture(),this._getNormalTexture(),this._getMetalicRoughnessTexture(),this._getEmissiveTexture(),this._getOcclusionTexture(),this._getSnowMaskTexture(),this._getSnowNormalTexture(),this._getRippleTexture();const s=u$Z(i._emissiveTextureMotion,n._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion);var l=e$2e(n._textureUVSpeed)&&(0!==n._textureUVSpeed.x||0!==n._textureUVSpeed.y);l=l||e$2e(s)&&(s.OffsetPeriod>0||s.TilingPeriod>0||e$2e(this._materialPass._baseColorTextureMotion)),this._isValueDirty=l||this._isBatchTextureRenderable(),e$2e(t._dayTextures)&&t._dayTextures.length>0&&(this._dayTextures!==t._dayTextures&&(this._isTextureDirty=!0),this._dayTextures=t._dayTextures)},_0x4f8f70.prototype._setTextureByType=function(e,t){var i=this._textures[e]!==t;i&&t.isTexBlock&&(this._textureDirtyFrameCount=0),this._textures[e]=t,this._isTextureDirty=this._isTextureDirty||i},_0x4f8f70.prototype._getTextureByType=function(e){return this._textures[e]},_0x4f8f70.prototype.setToEffect=function(e){(e.bindUniformBuffer(this._ubo.getBuffer(),this._name),e$2e(this._ro._batchTable))&&(this._textures[_0x167570]!==this._ro._batchTable._texture&&(this._textures[_0x167570]=this._ro._batchTable._texture));e$2e(this._ro._dayTextures)&&this._ro._dayTextures.length>0&&_0x37a515.setTextureArrayToEffect(e,this._dayTextures,_0x4117c3);for(const t in this._textures)this._setTextureToEffect(e,this._textures[t],t);this._textureDirtyFrameCount>=0?this._textureDirtyFrameCount>_0x43c5c0?(this._isTextureDirty=!1,this._textureDirtyFrameCount=-1):this._textureDirtyFrameCount++:this._isTextureDirty=!1};var _0x931668=new e$2c,_0x4d1ff9=new o$1o;_0x4f8f70.prototype._initUniformMap=function(){var e=this._context;if(!e.webgl2&&!e.webgpu){var t=this._materialPass,i=this._layer,n={uTexMatrix:function(){return t._texMatrix},uDiffuseColor:function(){return t._diffuseColor},uSpecularColor:function(){return t._specularColor},uAmbientColor:function(){return t._ambientColor},uTexUVOffset:function(){_0x5a7513.x=0,_0x5a7513.y=0,_0x5a7513.z=1,_0x5a7513.w=1;var e=t._baseColorTextureMotion;if(e$2e(e)){var n=e.OffsetPeriod,r=e.OffsetSpeedU,o=e.OffsetSpeedV,a=e.TilingPeriod,s=e.TilingSpeedU,l=e.TilingSpeedV,u=performance.now()/1e3;if(n>0){var c=u%n;_0x5a7513.x=c*r,_0x5a7513.y=c*o}if(a>0){var h=u%a;_0x5a7513.z=1+h*s,_0x5a7513.w=1+h*l}}else if(0!==i._textureUVSpeed.x||0!==i._textureUVSpeed.y){var d=performance.now()/1e3;_0x5a7513.x=i._textureUVSpeed.x*d,_0x5a7513.y=i._textureUVSpeed.y*d}return _0x5a7513},uTextureDim:function(){var e=t._textures[0].renderable?t._textures[0]:e$2e(t._ancestorTexture)?t._ancestorTexture:t._textures[0];if(_0x931668.x=e._width,_0x931668.y=e._height,e$2e(t._textures[1])){var i=t._textures[1].renderable?t._textures[1]:e$2e(t._ancestorTextureBake)?t._ancestorTextureBake:t._textures[1];_0x931668.z=i._width,_0x931668.w=i._height}return _0x931668},uTextureWidths:function(){return e$2e(t.baseColorTexture)?(_0x4d1ff9.x=t.baseColorTexture.width,_0x4d1ff9.y=t.baseColorTexture.height):(e$2e(t._textures[0])?_0x4d1ff9.x=t._textures[0].width:_0x4d1ff9.x=1,e$2e(t._textures[1])?_0x4d1ff9.y=t._textures[1].width:_0x4d1ff9.y=1),_0x4d1ff9},batchTextureStep_baseTex:function(){return t._batchTable._textureStep},batchTextureDimensions_baseTex:function(){return t._batchTable._textureDimensions},batchTextureStep_bakeTex:function(){return t._batchTableBake._textureStep},batchTextureDimensions_bakeTex:function(){return t._batchTableBake._textureDimensions},uBaseColorFactor:function(){return t._baseColor||i._PBRMaterialParams.pbrMetallicRoughness.baseColor},uEmissiveFactor:function(){return t._emissiveFactor||i._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},uEmissiveUVOffsetAndTiling:function(){var e=t._emissiveTextureMotion||i._PBRMaterialParams.pbrMetallicRoughness.emissiveTextureMotion,n=performance.now()/1e3,r=e.OffsetPeriod,o=e.OffsetSpeedU,a=e.OffsetSpeedV,s=e.TilingPeriod,l=e.TilingSpeedU,u=e.TilingSpeedV;if(e&&r>0){var c=n%r;_0x931668.x=c*o,_0x931668.y=c*a}else _0x931668.x=0,_0x931668.y=0;if(e&&s>0){var h=n%e._tilingPeriod;_0x931668.z=1+h*l,_0x931668.w=1+h*u}else _0x931668.z=1,_0x931668.w=1;return _0x931668},uMetallicRoughnessIntensityScale:function(){return _0x4afe12.x=u$Z(t._metallicFactor,i._PBRMaterialParams.pbrMetallicRoughness.metallicFactor),_0x4afe12.y=u$Z(t._roughnessFactor,i._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor),_0x4afe12.z=1,e$2e(t._intensityScale)&&t._intensityScale>0?_0x4afe12.z=t._intensityScale:e$2e(i._PBRMaterialParams.pbrMetallicRoughness.intensityScale)&&i._PBRMaterialParams.pbrMetallicRoughness.intensityScale>0&&(_0x4afe12.z=i._PBRMaterialParams.pbrMetallicRoughness.intensityScale),_0x4afe12},uPBRTexWH:function(){var e=t.pbrParamTexture;return _0x4d1ff9.x=e.width,_0x4d1ff9.y=e.height,_0x4d1ff9},uNormalTextureScale:function(){return 1},uAlphaMode:function(){var e=1;switch(t._alphaMode){case"opaque":e=1;break;case"mask":e=2;break;case"blend":e=3}return e},uAlphaCutoff:function(){return u$Z(t._alphaCutoff,0)},uPbrParTextureWidth:function(){let e=1;return e$2e(t.baseColorTexture)?e=t.baseColorTexture.width:e$2e(t.normalTexture)?e=t.normalTexture.width:e$2e(t.metallicRoughnessTexture)?e=t.metallicRoughnessTexture.width:e$2e(t.emissiveTexture)&&(e=t.emissiveTexture.width),e}};this._uniformMap=n}},_0x4f8f70.prototype.isDestroyed=function(){return!1},_0x4f8f70.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};var _0x735bb6=(_0xd41f26=!0,function(e,t){var i=_0xd41f26?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd41f26=!1,i}),_0x35f977=_0x735bb6(void 0,(function(){return _0x35f977.toString().search("(((.+)+)+)+$").toString().constructor(_0x35f977).search("(((.+)+)+)+$")})),_0xd41f26;function _0x35e02f(e){var t=_0x37a515.call(this)||this;t._ro=e,t._name=_0x2e0417.MESH,this._initUniformMap()}_0x35f977(),_0x37a515&&(_0x35e02f.__proto__=_0x37a515),_0x35e02f.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x35e02f.prototype.constructor=_0x37a515,Object.defineProperties(_0x35e02f.prototype,{}),_0x35e02f.prototype._initUBOStruct=function(){this._ubo.addUniform("uModelMatrix",16),this._ubo.addUniform("uGeoMatrix",16),this._ubo.addUniform("batchTextureStep",4),this._ubo.addUniform("batchTextureDimensions",2),this._ubo.addUniform("decode_texCoord0_min",2),this._ubo.addUniform("decode_texCoord1_min",2),this._ubo.addUniform("decode_texCoord0_vNormConstant",3),this._ubo.addUniform("decode_texCoord1_vNormConstant",3),this._ubo.addUniform("decode_position_min",4),this._ubo.addUniform("decode_position_normConstant",1),this._ubo.addUniform("normal_rangeConstant",1),this._ubo.addUniform("uInverseGeoMatrix",16),this._ubo.addUniform("uSkeletonMatrix",16),this._ubo.addUniform("uSkeletonCount",1),this._ubo.addUniform("uImgTextureBound",2),this._ubo.addUniform("uImgTextureAlpha",1),this._ubo.addUniform("fMultiTemporalFactor",1),this._ubo.addUniform("uSouthWest",3),this._ubo.addUniform("uNorthDir",3),this._ubo.addUniform("uEastDir",3),this._ubo.addUniform("textureRepeat",2)},_0x35e02f.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,_0x2e0417.MESH,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,_0x2e0417.MESH,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x35e02f.prototype._updateImageryValue=function(){const e=this._ubo,t=this._ro,i=t._layer,n=t._imageryTextureBound;let r=1;const o=i._imageryLayer;Array.isArray(o)&&(r=o[o.length-1].alpha),o.show||(r=0),r=o.alpha,e.updateFloat2("uImgTextureBound",n.x,n.y),e.updateFloat("uImgTextureAlpha",r)};var _0xfe74cf=new Float32Array(16),_0x2650e2=new Matrix;_0x35e02f.prototype.update=function(e){if(!e.webgpu&&!e.webgl2||(e$2e(this._ubo)||this._initUBO(e),!this._isValueDirty))return;var t=this._ro;const i=t._layer;var n=t._vertexPackage;const r=i._fileType===p$T.ClampGroundRealtimeRasterCache&&!e$2e(t._attributeLocations.aTexCoord1);if(e$2e(t._relativeModelMatrix)&&(p$1d.toArray(t._relativeModelMatrix,_0xfe74cf),Matrix.FromArrayToRef(_0xfe74cf,0,_0x2650e2),this._ubo.updateMatrix("uModelMatrix",_0x2650e2)),e$2e(t._geoMatrix)&&(p$1d.toArray(t._geoMatrix,_0xfe74cf),Matrix.FromArrayToRef(_0xfe74cf,0,_0x2650e2),this._ubo.updateMatrix("uGeoMatrix",_0x2650e2)),e$2e(n)){var o=n.minTexCoordValue;o&&o.length>0&&(this._ubo.updateFloat2("decode_texCoord0_min",n.minTexCoordValue[0].x,n.minTexCoordValue[0].y),this._ubo.updateFloat2("decode_texCoord1_min",n.minTexCoordValue[1].x,n.minTexCoordValue[1].y));var a=n.texCoordCompressConstant;if(a&&a.length>0){var s=n.texCoordCompressConstant[0],l=n.texCoordCompressConstant[1];this._ubo.updateFloat3("decode_texCoord0_vNormConstant",s.x,s.y,s.z),this._ubo.updateFloat3("decode_texCoord1_vNormConstant",l.x,l.y,l.z)}var u=n.minVerticesValue,c=n.vertCompressConstant,h=n.normalRangeConstant;e$2e(n.minVerticesValue)&&this._ubo.updateFloat4("decode_position_min",u.x,u.y,u.z,u.w),e$2e(n.vertCompressConstant)&&this._ubo.updateFloat("decode_position_normConstant",c),e$2e(n.normalRangeConstant)&&this._ubo.updateFloat("normal_rangeConstant",h)}if(e$2e(t._batchTable)){var d=t._batchTable._textureStep;this._ubo.updateFloat4("batchTextureStep",d.x,d.y,d.z,d.w);var f=t._batchTable._textureDimensions;this._ubo.updateFloat2("batchTextureDimensions",f.x,f.y)}i._flattening&&(p$1d.toArray(t._inverseGeoMatrix,_0xfe74cf),Matrix.FromArrayToRef(_0xfe74cf,0,_0x2650e2),this._ubo.updateMatrix("uInverseGeoMatrix",_0x2650e2)),e$2e(t._instanceSkeletonMatrix)&&(p$1d.toArray(t._instanceSkeletonMatrix,_0xfe74cf),Matrix.FromArrayToRef(_0xfe74cf,0,_0x2650e2),this._ubo.updateMatrix("uSkeletonMatrix",_0x2650e2)),t._isInstanceModel&&this._ubo.updateFloat("uSkeletonCount",t.skeletonCount),e$2e(i._imageryLayer)&&e$2e(t._attributeLocations.img)&&this._updateImageryValue(),t._bMultiTemporalWeight&&this._ubo.updateFloat("fMultiTemporalFactor",t._fMultiTemporalFactor),t._isClamp&&i._fileType===p$T.ClampGroundPolygon&&(this._ubo.updateVector3("uSouthWest",t._southWestCorner),this._ubo.updateVector3("uNorthDir",t._northVector),this._ubo.updateVector3("uEastDir",t._eastVector)),r&&this._ubo.updateFloat2("textureRepeat",t._symbolTextureRepeat.x,t._symbolTextureRepeat.y),this._ubo.update(),this._isValueDirty=t._bMultiTemporalWeight},_0x35e02f.prototype._initUniformMap=function(){var e=this._ro;const t=e._layer;var i=t._context;if(!i.webgl2&&!i.webgpu){var n={},r=e._vertexPackage,o=r.nCompressOptions;n.uModelMatrix=function(){return e._relativeModelMatrix},n.uGeoMatrix=function(){return e._geoMatrix},(o&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex&&(n.decode_position_min=function(){return r.minVerticesValue},n.decode_position_normConstant=function(){return r.vertCompressConstant}),(o&_0x64fca6.SVC_Normal)===_0x64fca6.SVC_Normal&&(n.normal_rangeConstant=function(){return r.normalRangeConstant}),(o&_0x64fca6.SVC_TexutreCoord)===_0x64fca6.SVC_TexutreCoord&&(r.texCoordCompressConstant.length>0&&(n.decode_texCoord0_min=function(){return r.minTexCoordValue[0]},n.decode_texCoord0_normConstant=function(){return r.texCoordCompressConstant[0]},n.decode_texCoord0_vNormConstant=function(){return r.texCoordCompressConstant[0]}),r.texCoordCompressConstant.length>1&&(n.decode_texCoord1_min=function(){return r.minTexCoordValue[1]},n.decode_texCoord1_normConstant=function(){return r.texCoordCompressConstant[1]},n.decode_texCoord1_vNormConstant=function(){return r.texCoordCompressConstant[1]})),n.batchTextureStep=function(){return e._batchTable._textureStep},n.batchTextureDimensions=function(){return e._batchTable._textureDimensions},n.uInverseGeoMatrix=function(){return e._inverseGeoMatrix},n.uSkeletonMatrix=function(){return e._instanceSkeletonMatrix},n.uSkeletonCount=function(){return e.skeletonCount},n.fMultiTemporalFactor=function(){return e._fMultiTemporalFactor},n.uSouthWest=function(){return e._southWestCorner},n.uNorthDir=function(){return e._northVector},n.uEastDir=function(){return e._eastVector},n.textureRepeat=function(){return e._symbolTextureRepeat},n.uImgTextureBound=function(){return e._imageryTextureBound},n.uImgTextureAlpha=function(){return e$2e(t._imageryLayer)?t._imageryLayer instanceof Array?t._imageryLayer[t._imageryLayer.length-1].alpha:t._imageryLayer.show&&e._showImagerysImmediate?t._imageryLayer.alpha:0:1},this._uniformMap=n}},_0x35e02f.prototype.isDestroyed=function(){return!1},_0x35e02f.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};const _0x40b74d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x52a969=_0x40b74d(void 0,(function(){return _0x52a969.toString().search("(((.+)+)+)+$").toString().constructor(_0x52a969).search("(((.+)+)+)+$")}));_0x52a969();const _0x163288="uVolumeTexture";function _0x1f4c64(e){var t=_0x37a515.call(this)||this;t._ro=e,t._name=_0x2e0417.S3MVolume,t._textures={},this._initUniformMap()}_0x37a515&&(_0x1f4c64.__proto__=_0x37a515),_0x1f4c64.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x1f4c64.prototype.constructor=_0x37a515,Object.defineProperties(_0x1f4c64.prototype,{}),_0x1f4c64.prototype._updateVolumeValue=function(){const e=this._ubo,t=this._ro,i=t._layer,n=t._volObj;e$2e(n)&&(e.updateFloat("uVolSideBlockCount",n.nSideBlockCount),e.updateFloat("uVolBlockLength",n.nBlockLength),e.updateFloat("uVolTexLength",n.nLength),e.updateFloat("uVolWidth",n.nWidth),e.updateFloat("uVolHeight",n.nHeight),e.updateFloat("uVolDepth",n.nDepth));let r=0;const o=i._hypsometricSetting;e$2e(o)&&o.filterMode===k$S.FilterMode.NEAREST&&(r=1);const a=n.nFormat;let s=0;e$2e(a)&&(3200===a?s=0:e$2e(o)?o.filterMode===k$S.FilterMode.LINEAR&&(s=0):s=1),e.updateFloat("uVolFilterMode",r),e.updateFloat("uVolumeType",s)},_0x1f4c64.prototype._initUBOStruct=function(){this._ubo.addUniform("uVolSideBlockCount",1),this._ubo.addUniform("uVolBlockLength",1),this._ubo.addUniform("uVolTexLength",1),this._ubo.addUniform("uVolWidth",1),this._ubo.addUniform("uVolHeight",1),this._ubo.addUniform("uVolDepth",1),this._ubo.addUniform("uVolFilterMode",1),this._ubo.addUniform("uVolumeType",1)},_0x1f4c64.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x1f4c64.prototype.update=function(e){if(!e.webgpu&&!e.webgl2||(e$2e(this._ubo)||this._initUBO(e),!this._isValueDirty))return;var t=this._ro;const i=t._layer;var n;(e$2e(t._volObj)||e$2e(t._volTexture))&&this._updateVolumeValue(),this._ubo.update(),this._isValueDirty=!1,n="png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt?t._volTexture:t._volObj.volTexture,this._isLayerTextureChanged(_0x163288,n)},_0x1f4c64.prototype._isLayerTextureChanged=function(e,t){this._isTextureDirty=this._textures[e]!==t,this._textures[e]=t},_0x1f4c64.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name);for(const t in this._textures)this._setTextureToEffect(e,this._textures[t],t)},_0x1f4c64.prototype._initUniformMap=function(){var e=this._ro;const t=e._layer;var i=t._context;if(i.webgl2||i.webgpu)return;const n=e._volObj;var r={uVolSideBlockCount:function(){return n.nSideBlockCount},uVolBlockLength:function(){return n.nBlockLength},uVolTexLength:function(){return n.nLength},uVolWidth:function(){return n.nWidth},uVolHeight:function(){return n.nHeight},uVolDepth:function(){return n.nDepth},uVolFilterMode:function(){let e=0;const i=t._hypsometricSetting;return e$2e(i)&&i.filterMode===k$S.FilterMode.NEAREST&&(e=1),e},uVolumeType:function(){const e=n.nFormat;let t=0;return e$2e(e)&&(3200===e?t=0:e$2e(hypSetting)?hypSetting.filterMode===k$S.FilterMode.LINEAR&&(t=0):t=1),t}};this._uniformMap=r},_0x1f4c64.prototype.isDestroyed=function(){return!1},_0x1f4c64.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};var _0x5796de=(_0x404da3=!0,function(e,t){var i=_0x404da3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x404da3=!1,i}),_0x2e1c99=_0x5796de(void 0,(function(){return _0x2e1c99.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e1c99).search("(((.+)+)+)+$")})),_0x404da3;function _0x21df38(e,t){this._id=e,this._worldPosLeftBottom=void 0,this._worldPosLBRelativeOrigin=void 0,this._windowCoordRect=new h$18,this._weight=1e3,this._heigtRangeMax=-1,this._distanceRangeSquare=Number.POSITIVE_INFINITY,this._pixelWidth=-1,this._pixelHeight=-1,this._layer=t,this._visible=void 0}_0x2e1c99(),Object.defineProperties(_0x21df38.prototype,{windowCoordRect:{get:function(){return this._windowCoordRect}},heigtRangeMax:{get:function(){return this._heigtRangeMax},set:function(e){this._heigtRangeMax=e}},weight:{get:function(){return this._weight},set:function(e){this._weight=e}},pixelWidth:{get:function(){return this._pixelWidth},set:function(e){this._pixelWidth=e}},pixelHeight:{get:function(){return this._pixelHeight},set:function(e){this._pixelHeight=e}},worldPosLeftBottom:{get:function(){return this._worldPosLeftBottom},set:function(e){this._worldPosLeftBottom=e}},worldPosLBRelativeOrigin:{get:function(){return this._worldPosLBRelativeOrigin},set:function(e){this._worldPosLBRelativeOrigin=e}},layerName:{get:function(){return this._layer.name}},layer:{get:function(){return this._layer}},id:{get:function(){return this._id}},visible:{get:function(){return this._visible},set:function(e){(!e$2e(this._visible)||e!==this._visible)&&_0x21df38.addToChangeQueue(this,e),this._visible=e}}});var _0x2c4147=new o$1o;_0x21df38.prototype.calcWindowCoordRect=function(e,t){m$19.pointToWindowCoordinates(e,t,this._worldPosLBRelativeOrigin,_0x2c4147),this._windowCoordRect.west=_0x2c4147.x,this._windowCoordRect.east=_0x2c4147.x+this._pixelWidth,this._windowCoordRect.south=_0x2c4147.y,this._windowCoordRect.north=_0x2c4147.y-this._pixelHeight},_0x21df38.prototype.isInViewport=function(e){return this._windowCoordRect.west+200>=e.x&&this._windowCoordRect.east-this._pixelWidth<=e.x+e.width&&this._windowCoordRect.north+200>=e.y&&this._windowCoordRect.south-this._pixelHeight<=e.y+e.height},_0x21df38.prototype.isInHeightRange=function(e){return!this._layer._hasHeightRangeAttributeName||e<this._heigtRangeMax},_0x21df38.prototype.isInVisibleRange=function(e){return!this._layer._hasHeightRangeAttributeName||o$1p.distanceSquared(e,this._worldPosLeftBottom)<this._distanceRangeSquare};var _0x2da45a=new h$18,_0x3a97d2=new h$18;function _0x2fe707(e,t){e.east+=t,e.west-=t,e.south+=t,e.north-=t}_0x21df38.isIntersectionTest=function(e,t,i){h$18.clone(e,_0x2da45a),h$18.clone(t,_0x3a97d2),_0x2fe707(_0x2da45a,i),_0x2fe707(_0x3a97d2,i);var n=Math.max(_0x2da45a.west,_0x3a97d2.west),r=Math.min(_0x2da45a.south,_0x3a97d2.south),o=Math.min(_0x2da45a.east,_0x3a97d2.east);return!(r<=Math.max(_0x2da45a.north,_0x3a97d2.north)||n>=o)};var _0x4a438d=[],_0x14a147=[];function _0x2bc70b(e,t){for(var i=0,n=e._layerQueue.length;i<n;i++){var r=e._layerQueue[i];if(r.id===t)return r}}function _0x306aa2(e,t){for(var i in t){var n=e.find(i),r=n?n.iconRelatedTextLayerID:void 0;if(r){var o=i,a=_0x2bc70b(e,r);if(a){var s=t[a.name];s&&s.length>0&&(t[o]=s)}}}}_0x21df38.meetVisible=function(e,t,i){_0x4a438d.length=0,_0x14a147.length=0;e.sort((function(e,t){return e.weight-t.weight}));for(var n=[],r=0,o=e.length;r<o;r++){(p=e[r]).layerName;var a=p.layer;if(!a.iconRelatedTextLayerID||!i){var s=p.id;if(a._hasObjsVisibleMap&&!0===a._objsVisibleMap[s]){n.push(p),p.visible=!0;continue}if(a._hasObjsVisibleMap&&!1===a._objsVisibleMap[s]||a.allObjsHide){p.visible=!1;continue}for(var l=p.windowCoordRect,u=!1,c=0,h=_0x4a438d.length;c<h;c++){var d=_0x4a438d[c],f=d.windowCoordRect;if(!(p.id===d.id&&p.layer.id===d.layer.id)&&_0x21df38.isIntersectionTest(l,f,t)){u=!0;break}}u?p.visible=!1:(_0x4a438d.push(p),p.visible=!0)}}if(n.length>0)for(o=0;o<n.length;o++){(p=n[o]).layerName,l=p.windowCoordRect,u=!1;for(var p,_=0;_<_0x14a147.length;_++){f=_0x14a147[_];if(_0x21df38.isIntersectionTest(l,f,t)){s=p.id;p.visible=!1,u=!0;break}}u||_0x14a147.push(l)}},_0x21df38._visibleChangedQueue={},_0x21df38._invisibleChangedQueue={},_0x21df38.addToChangeQueue=function(e,t){var i,n=e.layerName;(i=t?_0x21df38._visibleChangedQueue:_0x21df38._invisibleChangedQueue)[n]||(i[n]=[]),i[n].push(e.id)},_0x21df38.addPotentialVisibiltyChangedLayer=function(e){_0x21df38._visibleChangedQueue[e]||(_0x21df38._visibleChangedQueue[e]=[]),_0x21df38._invisibleChangedQueue[e]||(_0x21df38._invisibleChangedQueue[e]=[])},_0x21df38.setVisibiltyChangedToLayer=function(e,t){for(var i in t&&(_0x306aa2(e,_0x21df38._visibleChangedQueue),_0x306aa2(e,_0x21df38._invisibleChangedQueue)),_0x21df38._visibleChangedQueue){var n=e.find(i);(r=_0x21df38._visibleChangedQueue[i]).length>0&&n.setOnlyObjsVisible(r,!0,!1)}for(var i in _0x21df38._invisibleChangedQueue){var r;n=e.find(i);(r=_0x21df38._invisibleChangedQueue[i]).length>0&&n.setOnlyObjsVisible(r,!1,!1)}},_0x21df38.resetVisibleChangedQueue=function(){_0x21df38._visibleChangedQueue={},_0x21df38._invisibleChangedQueue={}},_0x21df38.prototype.isDestroyed=function(){return!1},_0x21df38.prototype.destroy=function(){return i$11(this)};var _0x1ed4f5=(_0x296067=!0,function(e,t){var i=_0x296067?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x296067=!1,i}),_0x532e9a=_0x1ed4f5(void 0,(function(){return _0x532e9a.toString().search("(((.+)+)+)+$").toString().constructor(_0x532e9a).search("(((.+)+)+)+$")})),_0x296067;function _0x4881fc(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;if(!(e.arrIndexPackage&&e.vertexPackage&&e.mapPass&&e$2e(e.context)))throw new t$15("gl texture indexes vertexes is required to create RenderEntityPagelod");if(this._layer=e.layer,this._entity=e.entity,this._context=e.context,this._arrIndexPackage=t,this._vertexPackage=i,this._attributeLocations=this._vertexPackage.attrLocation,this._vertexDim=4,e$2e(i)&&e$2e(i.vertexAttributes)&&i.vertexAttributes.length>0&&(this._vertexDim=i.vertexAttributes[0].componentsPerAttribute),this._edgeGeometry=e.edgeGeometry,this._pickInfo=u$Z(e.pickInfo,{}),this._ids=Object.keys(this._pickInfo),this._vertexBufferToCreate=new r$17,this._vertexWeightBuffers=[],this._bMultiTemporalWeight=!1,this._fMultiTemporalFactor=0,this._fMultiTemporalPercentage=0,this._nFirstMultiTemporalPos=-1,this._nSecondMultiTemporalPos=-1,this._nSpecificTemporalPos=-1,this._layer._temporalCount>0&&(this._bMultiTemporalWeight=!0),this._bMultiTemporalWeight){for(var r=[],o=Object.keys(i.attrLocation),a=o.length,s=0;s<a;++s){var l=o[s];r.push(i.attrLocation[l])}r.sort((function(e,t){return e-t})),this._nFirstMultiTemporalPos=i.attrLocation.aVertexWeight,this._nSecondMultiTemporalPos=i.attrLocation.aVertexWeight_1;var u=[],c=r.length;for(s=0;s<this._vertexPackage.vertexAttributes.length;s++){if(s===i.attrLocation.aVertexWeight||s===i.attrLocation.aVertexWeight_1||s>r[c-1]){var h=new Uint8Array(this._vertexPackage.vertexAttributes[s].typedArray,0,this._vertexPackage.vertexAttributes[s].byteLength);if(this._vertexWeightBuffers.push(h),s>r[c-1])continue}u.push(this._vertexPackage.vertexAttributes[s]),this._vertexBufferToCreate.enqueue(s)}this._vertexPackage.vertexAttributes=u}else{this.isBillboardPoint(e.fileType)&&this.convertToInstanceBillboardPoint();for(s=0;s<this._vertexPackage.vertexAttributes.length;s++)this._vertexBufferToCreate.enqueue(s)}for(this._indexBufferToCreate=new r$17,s=0;s<this._arrIndexPackage.length;s++)13!==this._arrIndexPackage[s].primitiveType&&this._arrIndexPackage[s].indicesCount>0&&this._indexBufferToCreate.enqueue(s);this._subTexturesToUpload=new r$17,this._shaderProgramToCreate=new r$17,this._shaderProgramToCreate.enqueue(0),this._version=e.version||_0x43b37d.S3M,this._isS3MBlock=u$Z(e.isS3MBlock,!1),this._initialize=!1,this._matModel=e.matModel,this._iblReferenceFrameMatrix=p$1e.clone(p$1e.IDENTITY),this._tranlateMatrix=p$1d.clone(p$1d.IDENTITY),this._mapPass=n;var d=this._arrIndexPackage[0];if(this._material=e$2e(d)&&e$2e(d.materialCode)?n[d.materialCode]:_0xf77618.Default,this._colorCommand=void 0,this._pickCommand=void 0,this._wireFrameCommands={},this._stencilCommand=void 0,this._clampColorCommand=void 0,this._clipStencilCommand=void 0,this._pickRectCommand=void 0,this._spatialQueryCommand=void 0,this._waterIndex=-1,this._waterTime=0,this._boundingVolume=e.boundingVolume,this._instanceCount=i.instanceCount,this._instanceMode=i.instanceMode,this._isS3MB=u$Z(e.isS3MB,!1),this._volObj=e.volObj,this._volTexture=e.volTexture,this._geoMatrix=u$Z(e.geoMatrix,p$1d.IDENTITY),this._inverseGeoMatrix=p$1d.inverse(this._geoMatrix,new p$1d),this._instanceSkeletonMatrix=e.instanceSkeletonMatrix,this._wireFrameIndexBuffers=void 0,this._bufferPrepared=!1,this._fileType=e.fileType,e.fileType===p$T.ExtendRegion3D&&e$2e(i.attrLocation.aTexCoord1)){var f=i.vertexAttributes[i.attrLocation.aTexCoord1].typedArray,p=f.slice(f.buffer,f.byteOffset,f.byteLength);this._texCoord1=new Float32Array(p.buffer,0,p.byteLength/4)}this._selectionInforMap=void 0,this._geometryByteLength=0,this._intersectWithClipPlane=!1,this._boundingRectangle=e.boundingRectangle,this._symbolTextureUrl=e.symbolTextureUrl,this._symbolColor=e.symbolColor,this._symbolTextureRepeat=e.symbolTextureRepeat,e$2e(this._symbolTextureRepeat)||(this._symbolTextureRepeat=new o$1o(600,600)),this._clampRegionEdge=u$Z(i.clampRegionEdge,!1),e$2e(e.level)&&(this._level=e.level,this._row=e.row,this._col=e.col),this._rasterized=!1,this._groupName=e.groupName,this._ptIndexGroup=e.ptIndexGroup,this._geoName=e.geoName,this.oriPassGroup=Le$q.S3MTiles,this._labelPosArray=[],this._labelTextArray=[],this._pickIDArray=[],this._labelsCreated={},this._labelIndexs={},this._labelPromiseArr=[],this._labelReady=!1,this._batchTable=void 0,this._updateBatchTable=!0,this._idsOperationMap=new e$1Q,this._idsColorMap=new e$1Q,this._idsTranslateMap=new e$1Q,this._idsPBRIndexMap=new e$1Q,this._hasBloomOperation=!1,this._isInstanceModel=this._layer.skeletonSelectEnable&&"InstanceModel"===this._layer._dataType&&i.skeletonCount>0,this.skeletonCount=i.skeletonCount,this._imagerys=[],this._imageryLevels=[],this._showImagerysImmediate=!0,this._imageryTextureBound=new o$1o,this._isLeaf=!1,this._isHypsometricVisible=!0,this._themeDirty=!1,this._passIncrement=0,this._clipCommand=void 0,this._disFromCamera=0,this.materialPass=void 0,this.useWValue=!1,this.useLineColor=!1,this._polygons=void 0,this._polygonId=void 0,this._polygonCommands=[],this._imageRasterFinish=!1,this._isSelected=!1,this._isPBR=!1,this._specularEnvironmentMaps=void 0,this._clipBounds=[],this._scaleImagerys=[],this._visibleScaleImageryIndex=void 0,this._plusRoArray=[],this._modelMatrixDirty=!1,this._relativeOrigin=new o$1p,this._relativeModelMatrix=new p$1d,p$1d.clone(this._matModel,this._relativeModelMatrix),this._meshUBO=new _0x35e02f(this),this._materialUBO=new _0x4f8f70(this,this._material,this._layer),(e$2e(this._volObj)||e$2e(this._volTexture))&&(this._volumeUBO=new _0x1f4c64(this))}_0x532e9a(),Object.defineProperties(_0x4881fc.prototype,{renderable:{get:function(){if(!this._isS3MBlock||!e$2e(this._mapPass))return this._bufferPrepared;for(var e in this._mapPass)if(this._mapPass.hasOwnProperty(e)){var t=this._mapPass[e],i=t._textures[0];return e$2e(i)?this._bufferPrepared&&(i.renderable&&i.ready||e$2e(t._ancestorTexture)):this._bufferPrepared}return this._bufferPrepared}}}),_0x4881fc.prototype.initialize=function(){if(!this._initialize){if(this.createSelectionMap(),this.createBoundingBoxForInstance(),this._fileType===p$T.Text||this._fileType===p$T.IconPoint?this.createBillboardsBounds(this._layer):this._fileType===p$T.ClampGroundPolygon&&this.createClampGroundBounds(),e$2e(this._symbolTextureUrl)&&_0x1451be.createTexture({imageUrl:this._symbolTextureUrl}),this.prepareLabels(),!e$2e(this._batchTable)&&Object.keys(this._pickInfo).length>0){var e=this._layer,t=e._context;_0x120d8(t,this),_0x876d97(t,this,e)}this._initialize=!0}},_0x4881fc.prototype.createSelectionMap=function(){var e=this._pickInfo;if(e$2e(e)&&_0x43b37d.S3M4===this._version)for(var t in this._selectionInforMap=new e$1Q,e)!e.hasOwnProperty(t)||-1===this._vertexPackage.instanceIndex&&"0"===t||this._selectionInforMap.set(t,e[t])},_0x4881fc.prototype.createBoundingBoxForInstance=function(){var e=this._vertexPackage;if(e$2e(e)&&-1!==e.instanceIndex&&e$2e(e.instanceBounds)){var t=e.instanceBounds,i=new o$1p(t[0],t[1],t[2]),n=new o$1p(t[3],t[4],t[5]),r=o$1p.lerp(i,n,.5,new o$1p),o=o$1p.distance(r,i),a=new o$1p;p$1d.multiplyByPoint(this._matModel,r,a),this._boundingVolume.center=a,this._boundingVolume.radius=o>this._boundingVolume.radius?o:this._boundingVolume.radius,e.instanceBounds=void 0}},_0x4881fc.prototype.createClampGroundBounds=function(){var e=this._boundingRectangle.x,t=this._boundingRectangle.y,i=this._boundingRectangle.x+this._boundingRectangle.width,n=this._boundingRectangle.y+this._boundingRectangle.height,r=new o$1p(i,t,0),o=new o$1p(e,n,0);this._southWestCorner=new o$1p(e,t,0),this._eastVector=new o$1p,this._northVector=new o$1p,o$1p.subtract(r,this._southWestCorner,this._eastVector),o$1p.subtract(o,this._southWestCorner,this._northVector)},_0x4881fc.prototype.createBillboardsBounds=function(e){this._arrtextOverlapInfo=[];var t=this._matModel,i=this._selectionInforMap.values,n=this._vertexPackage.vertexAttributes[0].typedArray,r=this._vertexPackage.vertexAttributes[0].componentsPerAttribute||3;if(e$2e(n)&&e$2e(n.buffer)){var o,a,s=new Float32Array(n.buffer,n.byteOffset,n.byteLength/4);this._fileType===p$T.Text?(o=this._vertexPackage.vertexAttributes[1].typedArray,a=new Float32Array(o.buffer,o.byteOffset,o.byteLength/4)):(o=this._vertexPackage.vertexAttributes[3].typedArray,a=new Float32Array(o.buffer,o.byteOffset,o.byteLength/4));for(var l=new o$1p,u=[],c=0;c<this._vertexPackage.verticesCount;c++)o$1p.fromArray(a,3*c,l),u.push(o$1p.clone(l));for(var h,d,f,p=e$2e(e._overlapWeightAttributeName),_=e$2e(e._heightRangeAttributeName),m=a$18.toCartesian(h$18.southwest(e.layerBounds)),g=a$18.toCartesian(h$18.northeast(e.layerBounds)),x=o$1p.distance(m,g),y=x*x,v=0,$=i.length;v<$;v++){var b=new _0x21df38(this._ids[v],e);d=(h=i[v]).vertexColorOffset,f=u$Z(h.vertexCount,h.vertexColorCount);for(var T=Number.MAX_VALUE,C=Number.MIN_VALUE,S=Number.MAX_VALUE,w=Number.MIN_VALUE,E=d;E<d+f;E++){var P=u[E];T=Math.min(P.x,T),C=Math.max(P.x,C),S=Math.min(P.y,S),w=Math.max(P.y,w)}b.pixelWidth=C-T,b.pixelHeight=w-S;var A=new o$1p(s[d*r],s[d*r+1],s[d*r+2]);p$1d.multiplyByPoint(t,A,A),b.worldPosLeftBottom=A;var L=new o$1p;if(o$1p.subtract(A,this._context.relativeOrigin,L),b.worldPosLBRelativeOrigin=L,p||_){var M=this._ids[v],R=e.getAttributesById(M);e$2e(R)&&e$2e(R.then)&&this._getLabelWeightOrHeight(b,R,e._overlapWeightAttributeName,e._heightRangeAttributeName)}b._distanceRangeSquare=y,this._arrtextOverlapInfo.push(b)}}else console.log("createBillboardsBounds")},_0x4881fc.prototype._getLabelWeightOrHeight=function(e,t,i,n){t.then((t=>{if(i&&(e.weight=u$Z(t[i],1e3),e.heigtRangeMax=-1),n){var r=parseInt(t[n].split(",")[0]);e.heigtRangeMax=u$Z(r,-1)}}))};var _0x568913=new p$1d;_0x4881fc.prototype.updateBillboardsBounds=function(e,t,i){if(!e.isOverlapDisplayed){var n,r={},o=!0;if(0!=e._scene._multiViewportMode){var a=e._scene._multiViewportInfo[i.multiViewportIndex];0==a.x&&0==a.y?(o=!0,r.x=this._context.drawingBufferWidth*a.x,r.y=this._context.drawingBufferHeight*a.y,r.width=this._context.drawingBufferWidth*a.width,r.height=this._context.drawingBufferHeight*a.height,p$1d.computeViewportTransformation(r,0,1,_0x568913),n=_0x568913):o=!1}else o=!0,r=t.viewport,n=t.viewportTransformation;for(var s=this._arrtextOverlapInfo,l=i.camera._positionCartographic.height,u=i.camera.positionWC,c=t.viewProjection,h=0,d=s.length;h<d;h++){var f=s[h];f.isInHeightRange(l)?f.isInVisibleRange(u)&&(!o||(f.calcWindowCoordRect(c,n),f.isInViewport(r)))?e._scene.layers._allTextOverlap.push(f):f.visible=!1:f.visible=!1}}};var _0x518c7b=new e$2c;function _0xcca22c(e){var t,i,n,r=e._idsColorMap,o=[];if(r.length>0)for(t=0,i=r.length;t<i;t++)(n=r.values[t]).dirty&&(n.dirty=!1,o=n.color.toBytes(),_0x518c7b.x=o[0],_0x518c7b.y=o[1],_0x518c7b.z=o[2],_0x518c7b.w=o[3],e$2e(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,0,_0x518c7b):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,0,_0x518c7b)})));var a=e._idsTranslateMap;if(a.length>0)for(var s in a._hash)(n=a._hash[s]).dirty&&(n.dirty=!1,e$2e(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,3,n.translate):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,3,n.translate)})),o$1p.equals(n.translate,o$1p.ZERO)&&a.remove(s));var l=e._idsPBRIndexMap;if(l.length>0)for(t=0,i=l.length;t<i;t++)(n=l.values[t]).dirty&&(n.dirty=!1,e$2e(n.batchId)?e._batchTable.setBatchedAttribute(n.batchId,4,n.pbrMaterialIndex):Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,4,n.pbrMaterialIndex)})));var u=e._idsOperationMap;if(u.length>0)for(t=0,i=u.length;t<i;t++)if((n=u.values[t]).dirty)if(n.dirty=!1,e._isInstanceModel){if(n.skeletonId>-1){var c=n.instanceIds[0]*e.skeletonCount+n.skeletonId;e._batchTable.setBatchedAttribute(c,1,n.operationValue)}}else e._instanceCount>0?Array.isArray(n.instanceIds)&&n.instanceIds.map((function(t){e._batchTable.setBatchedAttribute(t,1,n.operationValue)})):e$2e(n.batchId)&&e._batchTable.setBatchedAttribute(n.batchId,1,n.operationValue)}function _0x120d8(e,t){var i=[];i.push({functionName:"czm_batchTable_color",componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"czm_batchTable_operation",componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4},{functionName:"czm_batchTable_pickColor",componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"czm_batchTable_translate",componentDatatype:S$14.FLOAT,componentsPerAttribute:3,normalize:!0},{functionName:"czm_batchTable_pbrMaterialIndex",componentDatatype:S$14.FLOAT,componentsPerAttribute:3,normalize:!0});var n=t._pickInfo,r=Object.keys(n),o=new h$X(e,i,t._isInstanceModel?t._instanceCount*t.skeletonCount:t._instanceCount>0?t._instanceCount:r.length);o.useUBO=!0,t._batchTable=o}function _0x876d97(e,t,i){var n=t._batchTable,r=t._selectionInforMap,o=t._selectionInforMap._hash;for(var a in o)if(o.hasOwnProperty(a)){var s=r.get(a);if(t._isInstanceModel){var l=s.instanceIds[0],u=Object.keys(s.skeletonIds).length;for(var c in s.skeletonIds)if(s.skeletonIds.hasOwnProperty(c)){var h=l*u+Number(c),d=(f=e.createPickId({primitive:i,id:a,skeletonId:Number(c)})).color;_0x518c7b.x=e$1X.floatToByte(d.red),_0x518c7b.y=e$1X.floatToByte(d.green),_0x518c7b.z=e$1X.floatToByte(d.blue),_0x518c7b.w=e$1X.floatToByte(d.alpha),n.setBatchedAttribute(h,2,_0x518c7b)}}else{var f;e$2e(f=i._pickObjs[a])||(f=e.createPickId({primitive:i,id:a}),i._pickObjs[a]=f);d=f.color;if(_0x518c7b.x=e$1X.floatToByte(d.red),_0x518c7b.y=e$1X.floatToByte(d.green),_0x518c7b.z=e$1X.floatToByte(d.blue),_0x518c7b.w=e$1X.floatToByte(d.alpha),t._instanceCount>0){s.instanceIds.map((function(e){n.setBatchedAttribute(e,2,_0x518c7b)}))}else{var p=s.batchId;n.setBatchedAttribute(p,2,_0x518c7b)}}}}function _0x12f028(e,t){for(var i=e.position.values,n=e.position.componentsPerAttribute,r=i.length/n,o=new Float32Array(3*r),a=0;a<r;a++){var s=new o$1p(i[a*n],i[a*n+1],i[a*n+2]),l=a$18.fromCartesian(s),u=e$2d.toDegrees(l.longitude),c=e$2d.toDegrees(l.latitude),h=l.height,d=(u-t.left)/t.width,f=(c-t.bottom)/t.length,p=(h-t.minHeight)/t.height;o[3*a]=d,o[3*a+1]=f,o[3*a+2]=p}e.aRatio=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:o})}_0x4881fc.prototype.updateBatchTable=function(e,t,i){_0xcca22c(this),this._batchTable.update(e),this._updateBatchTable=!1},_0x4881fc.prototype.transformResource=function(e,t){this.initialize(),this.createResources(e,t),this._bufferPrepared&&e$2e(this._sp)&&(this.createAllCommands(e,t),this.createNormalAndDepthCommand(t),this.createPostEffectCommand(t),this.createClampColorCommand(t),this.createTransparentCommand(t),(t._fileType===p$T.ClampGroundPolygon||t._fileType===p$T.ClampObjectPolygon||t._fileType===p$T.ClampGroundLine||t._fileType===p$T.ExtendClampPolygonCache)&&this.cloneSelectCommand(t))},_0x4881fc.prototype.createLazyCommand=function(e,t){if(this._bufferPrepared&&(this.createPickRectCommand(t),t.LoadingPriority===_0x539352.UsePagedLodInfo&&t._hasMixedContent&&e.context.stencilBuffer)){var i=this._colorCommand;if(!e$2e(i))return;var n=i.derivedCommands;e$2e(n)||(n=i.derivedCommands={}),this.ownerPagelod._finalResolution||(e$2e(n.zback)||(n.zback=_0x137a76(e.context,i)),t._backfaceCommands.push(n.zback)),(!e$2e(n.stencil)||this.ownerPagelod._selectionDepth!==_0x5e4157(n.stencil))&&(n.stencil=_0x486fb9(i,this.ownerPagelod._selectionDepth))}};var _0x6e0379=new o$1p(0,0,0);_0x4881fc.prototype.setPolygonOffset=function(e){for(var t=this,i=function(){return e$2e(t._layer._polygonsTranslate[t._polygonId])?t._layer._polygonsTranslate[t._polygonId]:_0x6e0379},n=function(){return _0x6e0379},r=0;r<this._polygonCommands.length;r++){var o=this._polygonCommands[r];o.uniformMap.uTranslate=i,o.uniformMap.uTranslate=r==e?i:n}},_0x4881fc.prototype.updatePolygons=function(e,t,i){if(e$2e(this._polygons)){this._polygonCommands=[];for(var n=this,r=0;r<this._polygons.length;r++)!function(){var t=U$18.createGeometry(n._polygons[r]);e$2e(n._volObj)&&_0x12f028(t.attributes,n._volObj.volBounds);for(var o=new e$2c,a=new e$2c,s=p$1d.inverse(n._matModel,new p$1d),l=t.attributes.position.values.length/t.attributes.position.componentsPerAttribute,u=0;u<l;u++)o.x=t.attributes.position.values[3*u],o.y=t.attributes.position.values[3*u+1],o.z=t.attributes.position.values[3*u+2],o.w=1,p$1d.multiplyByVector(s,o,a),t.attributes.position.values[3*u]=a.x,t.attributes.position.values[3*u+1]=a.y,t.attributes.position.values[3*u+2]=a.z;var c=new i$$({primitiveType:t.primitiveType,modelMatrix:n._matModel,boundingVolume:t.boundingSphere,pass:Le$q.S3MTiles,cull:!0}),h=n._polygonId+"_"+r,d=e.createPickId({primitive:n,id:h}).color;c.pickId="vSecondColor";c.uniformMap=l$1f(n._uniformMap),e$2e(c.uniformMap)&&(c.uniformMap.uSecondColor=function(){return d},c.uniformMap.uTranslate=function(){return _0x6e0379}),c.vertexArray=c$13.fromGeometry({context:e,geometry:t,attributeLocations:{aPosition:0,aTexCoord0:1,aNormal:2,aRatio:3},bufferUsage:A$18.STATIC_DRAW,interleave:!0});var f=["attribute vec4 aPosition;","attribute vec3 aRatio;","uniform vec4 uSecondColor;","uniform vec3 uTranslate;","varying vec4 vSecondColor;","varying vec3 vecRotioCoord;","varying vec2 vecHypTexCoord;","varying vec4 vPositionMC;","void main()","{"," vPositionMC.xyz = aPosition.xyz;"," vPositionMC.w = 0.0;"," vSecondColor = uSecondColor;"," vecRotioCoord = aRatio;"," vec4 pos = aPosition;"," pos.xyz += uTranslate;"," gl_Position = czm_modelViewProjection * pos;","}"].join("\n"),p=["#extension GL_EXT_shader_texture_lod : enable","#extension GL_OES_standard_derivatives : enable","varying vec4 vSecondColor;","varying vec4 vPositionMC;","vec4 LinearTosRGB( in vec4 value )","{"," return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );","}","void main()","{"," gl_FragColor = czm_getHypsometricColor(vec4(1.0,1.0,1.0,1.0), 0.0);"," gl_FragColor *= czm_computeLightColorInFP(vPositionMC.xyz, vPositionMC.w, vec3(0.0,0.0,0.0));"," gl_FragColor = LinearTosRGB(gl_FragColor);","}"].join("\n"),_=new s$V({sources:[f]}),m=new s$V({sources:[p]});_.defines.push("Volume"),m.defines.push("Volume"),_.defines.push("HYPSOMETRIC"),m.defines.push("HYPSOMETRIC"),m.defines.push(D$V.DIR_LIGHTS+0),m.defines.push(D$V.POINT_LIGHTS+0),m.defines.push(D$V.SPOT_LIGHTS+0),m.defines.push(D$V.HEMISPHERE_LIGHTS+0),c.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:_,fragmentShaderSource:m,attributeLocations:{aPosition:0,aTexCoord0:1,aNormal:2,aRatio:3}}),c.renderState=i._rsColor,n._polygonCommands.push(c)}();this._polygons=void 0}if(this._polygonCommands.length>0){var o={};o[this._polygonId]=4,this.updateObjsOperation(o)}for(r=0;r<this._polygonCommands.length;r++)t.push(this._polygonCommands[r])},_0x4881fc.prototype.updateVertexWeight=function(){if(this._bMultiTemporalWeight&&e$2e(this._layer._temporalSetting)){var e=this._layer._temporalSetting;if(!(this._fMultiTemporalPercentage===e.progress&&e.location<0)){var t=this._vertexWeightBuffers,i=t.length,n=this._colorCommand;if(this._nSpecificTemporalPos!==e.location){var r=t[e$2d.clamp(0,e.location,i-1)],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight)).strideInBytes+c.offsetInBytes;return c.vertexBuffer.copyFromArrayView(r,o),this._fMultiTemporalFactor=0,void(this._nSpecificTemporalPos=e.location)}if(this._nSpecificTemporalPos>-1)return;this._fMultiTemporalPercentage=e.progress;var a=this._fMultiTemporalPercentage,s=a*i,l=Math.floor(s);a=s-(l=e$2d.clamp(0,l,i-1)),this._fMultiTemporalFactor=e$2d.clamp(0,a,1);var u=Math.ceil(s);if(u=e$2d.clamp(0,u,i-1),this._nFirstMultiTemporalPos!==l){r=t[l],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight)).strideInBytes+c.offsetInBytes;c.vertexBuffer.copyFromArrayView(r,o),this._nFirstMultiTemporalPos=l}if(this._nSecondMultiTemporalPos!==u){var c;r=t[u],o=0*(c=n.vertexArray.getAttribute(this._attributeLocations.aVertexWeight_1)).strideInBytes+c.offsetInBytes;c.vertexBuffer.copyFromArrayView(r,o),this._nSecondMultiTemporalPos=u}}}};var _0x2cde77=new o$1p;function _0x346b31(e,t){if(!e$2e(t._matModel))return p$1d.IDENTITY;var i,n;if(t._layer._fileType!==p$T.ClampGroundRealtimeRasterCache&&(p$1d.clone(t._matModel,t._relativeModelMatrix),p$1d.getTranslation(t._matModel,_0x2cde77),o$1p.subtract(_0x2cde77,e.relativeOrigin,_0x2cde77),p$1d.setTranslation(t._relativeModelMatrix,_0x2cde77,t._relativeModelMatrix)),t._arrtextOverlapInfo&&t._arrtextOverlapInfo.length>0)for(n=t._arrtextOverlapInfo.length,i=0;i<n;i++){var r=t._arrtextOverlapInfo[i];o$1p.subtract(r.worldPosLeftBottom,e.relativeOrigin,r.worldPosLBRelativeOrigin)}}function _0x71477a(e,t,i){!e$2e(i._colorCommand)||(_0x535eba.set(e,t,i),_0x535eba.execute())}function _0x532448(e,t,i,n){let r=0;const o=n._material;return r=(o._usePBR||i._usePBR)|(o._textures.length>0)<<1|(o._textures.length>1)<<2|i._flattening<<3|i._hasExcavation<<4|e$2e(i._categorieTexture)<<5|(e$2e(i._imageryLayer)&&e$2e(n._attributeLocations.img))<<6|i._hasOverlay<<7|i._hasEmissiveTexAtlas<<8|i._hasSnowEffect<<9|i._hasRainEffect<<10|i._bUseHypColorTable<<11,r}function _0x4b8c1b(e){if(!e$2e(e._colorCommand))return;const t=e._colorCommand;t.shaderProgram=e._sp,t.uniformMap=e._uniformMap,e._uniformMap=t.uniformMap,e._stencilCommand&&(e._stencilCommand.uniformMap=t.uniformMap)}var _0xd5a1a0=new p$1d;_0x4881fc.prototype.update=function(e,t,i,n){_0x44c957(this,t,n);const r=_0x532448(e,t,n,this);if(this._flag!==r&&(this._flag=r,this._uniformMap={},_0x2c7aca.create(t,n,this,this._uniformMap),e$2e(this._regularEdgeCommand)&&(this._regularEdgeCommand.uniformMap=p$19(this._regularEdgeCommand.uniformMap,this._uniformMap)),e$2e(this._silhouetteEdgeCommand)&&(this._silhouetteEdgeCommand.uniformMap=p$19(this._silhouetteEdgeCommand.uniformMap,this._uniformMap)),e$2e(this._normalAndDepthCommand)&&(this._normalAndDepthCommand.uniformMap=p$19(this._normalAndDepthCommand.uniformMap,this._uniformMap)),this._meshUBO._isValueDirty=!0),e$2e(this._volumeUBO)&&this._volumeUBO.update(e),this._bufferPrepared&&this.createPickRectCommand(n),n._fileType===p$T.ClampGroundRealtimeRasterCache&&_0x1451be.getTexture(this._symbolTextureUrl)!=this._materialUBO._getTextureByType("uTexture")&&(this._materialUBO._isValueDirty=!0,this.refreshRaster(t)),this._materialUBO.update(e),this._meshUBO.update(e),e$2e(this._colorCommand)&&e$2e(this._vertexPackage)&&e$2e(this._vertexPackage.vertexAttributes)&&(delete this._vertexPackage.vertexAttributes,this._arrIndexPackage=null),this._arrIndexPackage=null,this._isPBR&&(this._specularEnvironmentMaps!==t.specularEnvironmentMaps||this._hdrEnvMap!==t.hdrEnvMap)&&_0x71477a(t,n,this),_0x4b8c1b(this),n._fileType===p$T.PointCloudFile&&e$2e(n._pointCloudLayerVisible))if(e$2e(this._ptIndexGroup)){for(var o in this._ptIndexGroup)if(this._ptIndexGroup.hasOwnProperty(o)&&n._pointCloudLayerVisible[n._pointCloudLayerNames[o]]){this.pushCommands(t,i,n);break}}else e$2e(this._groupName)&&n._pointCloudLayerVisible[this._groupName]&&this.pushCommands(t,i,n);else this.pushCommands(t,i,n);n._fileType===p$T.PointCloudFile&&e$2e(this._colorCommand)&&(n._pointCloudShading.renderMode==_0x2c4f4b.VOXEL?this._colorCommand.renderState=d$1m.fromCache({depthTest:{enabled:!1}}):(n._pointCloudShading.eyeDomeLighting||n._pointCloudShading.performance)&&(this._colorCommand.renderState=d$1m.fromCache({depthTest:{enabled:!0}}))),(n._fileType===p$T.Text||n._fileType===p$T.IconPoint)&&this.updateBillboardsBounds(n,e.uniformState,t),this._themeDirty&&_0x38ba9a(n,this),this._layer._showLabel&&this.updateLabels(t),this._updateBatchTable&&Object.keys(this._pickInfo).length>0&&e$2e(this._batchTable)&&this.updateBatchTable(t,t.context,n),this.updatePolygons(e,i,n),e$2e(t.specularEnvironmentMaps)&&(_0xd5a1a0=p$1d.multiply(n._context.uniformState.view3D,this._matModel,_0xd5a1a0),this._iblReferenceFrameMatrix=p$1d.getMatrix3(_0xd5a1a0,this._iblReferenceFrameMatrix),this._iblReferenceFrameMatrix=p$1e.getRotation(this._iblReferenceFrameMatrix,this._iblReferenceFrameMatrix),this._iblReferenceFrameMatrix=p$1e.transpose(this._iblReferenceFrameMatrix,this._iblReferenceFrameMatrix)),this.updateVertexWeight(),(!o$1p.equals(this._relativeOrigin,n._context.relativeOrigin)||this._modelMatrixDirty)&&(this._modelMatrixDirty=!1,_0x346b31(n._context,this),e$2e(this._meshUBO)&&(this._meshUBO.valueDirty=!0,this._meshUBO.update(n._context)),o$1p.clone(n._context.relativeOrigin,this._relativeOrigin))};var _0x535eba=new _0x5adff0;function _0x1dc467(e,t,i){for(var n=i._shaderProgramToCreate;n.length&&(n.peek(),_0x535eba.set(e,t,i),e.jobScheduler.execute(_0x535eba,i$R.PROGRAM));)n.dequeue()}function _0x15e8bc(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!e$2e(i)){var n=t.fragmentShaderSource.clone();n.defines=e$2e(n.defines)?n.defines.slice(0):[],n.defines.push("POLYGON_OFFSET"),n.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),i=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:t._attributeLocations})}return i}function _0x137a76(e,t){var i=i$$.shallowClone(t),n=l$1f(i.renderState,!0);n.cull.enabled=!0,n.cull.face=G$1a.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5},n.stencilTest=u$M.setCesium3DTileBit(),n.stencilMask=u$M.CESIUM_3D_TILE_MASK,i.renderState=d$1m.fromCache(n),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=l$1f(t.uniformMap);var r=new o$1o(5,5);return i.uniformMap.u_polygonOffset=function(){return r},i.shaderProgram=_0x15e8bc(e,t.shaderProgram),i}function _0x5e4157(e){return(e.renderState.stencilTest.reference&u$M.SKIP_LOD_MASK)>>>u$M.SKIP_LOD_BIT_SHIFT}function _0x486fb9(e,t){var i=i$$.shallowClone(e),n=l$1f(i.renderState,!0);return n.cull.enabled=!0,n.stencilTest.enabled=!0,n.stencilTest.mask=u$M.SKIP_LOD_MASK,n.stencilTest.reference=u$M.CESIUM_3D_TILE_MASK|t<<u$M.SKIP_LOD_BIT_SHIFT|2,n.stencilTest.frontFunction=m$Z.GREATER_OR_EQUAL,n.stencilTest.frontOperation.zPass=n$_.REPLACE,n.stencilTest.backFunction=m$Z.GREATER_OR_EQUAL,n.stencilTest.backOperation.zPass=n$_.REPLACE,n.stencilMask=u$M.CESIUM_3D_TILE_MASK|u$M.SKIP_LOD_MASK|2,i.renderState=d$1m.fromCache(n),i}function _0xda32c8(e,t){return{uMaxClip:function(){return e},uMinClip:function(){return t}}}function _0xe2a67e(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1Q;for(var a in e$1Q.clone(n,o),r._hash)if(r._hash.hasOwnProperty(a)){var s=r.get(a),l=u$Z(o.get(a),new e$1X),u=e$1X.multiply(l,s,new e$1X);o.set(a,u)}for(var a in i._hash)if(i._hash.hasOwnProperty(a)){var c=i._hash[a],h=(l=u$Z(o.get(a),new e$1X),e$1X.multiply(c,l,new e$1X));o.set(a,h)}o.length>0&&t.updateObjsColor(o,e.selectColorType,!0)}function _0x445d61(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1Q,a=e$1Q.clone(r);for(var s in n._hash)if(n._hash.hasOwnProperty(s)){var l=n._hash[s];e$1X.equals(e$1X.WHITE,l)?a.set(s,l):o.set(s,l)}for(var s in i._hash)if(i._hash.hasOwnProperty(s)){l=i._hash[s];e$1X.equals(e$1X.WHITE,l)?a.set(s,l):o.set(s,l)}for(var s in o._hash)if(o._hash.hasOwnProperty(s)&&r.contains(s)){var u=o.get(s),c=(l=r.get(s),e$1X.multiply(u,l,new e$1X));o.set(s,c),a.remove(s)}a.length>0&&t.updateObjsColor(a,Zr$3.MIX,!0),o.length>0&&t.updateObjsColor(o,Zr$3.REPLACE,!0)}function _0x193cbb(e,t){var i=e._selections,n=e._objsColorList,r=e._objsOnlyVisibleList,o=new e$1Q;for(var a in e$1Q.clone(n,o),r._hash)if(r._hash.hasOwnProperty(a)){var s=r.get(a),l=u$Z(o.get(a),new e$1X),u=e$1X.multiply(l,s,new e$1X);o.set(a,u)}o.length>0&&t.updateObjsColor(o,Zr$3.MIX,!0),i.length>0&&t.updateObjsColor(i,e.selectColorType,!0)}function _0x109c04(e,t){var i=t._pickInfo,n=[];for(var r in i)if(i.hasOwnProperty(r)&&"0"!==r){var o=new _0xee2f65(t,r);Object.assign(o,e._layerScheduler._attributes[r]),o.id=r,o.batchId=i[r].batchId,o.instanceIds=i[r].instanceIds,n.push(o)}return n}_0x4881fc.prototype.createResources=function(e,t){if(this._bufferPrepared||_0x416d97(this,e,t,t._context),e$2e(this._sp)||_0x1dc467(e,t,this),_0x44c957(this,e,t),t._fileType===p$T.ClampGroundRealtimeRasterCache)return this._bufferPrepared},_0x4881fc.prototype.pushClampCommands=function(e,t,i){var n=this._colorCommand;e$2e(this._clampSelected)&&this._clampSelected?(i._fileType===p$T.ClampGroundPolygon||i._fileType===p$T.ClampGroundLine?(n.pass=Le$q.GLOBE+1,this._stencilCommand.pass=Le$q.GLOBE+1,e$2e(this._selectedStencilCommand)&&e$2e(this._selectedColorCommand)&&(this._selectedStencilCommand.pass=Le$q.GLOBE+1,this._selectedColorCommand.pass=Le$q.GLOBE+1)):i._fileType===p$T.ClampObjectPolygon&&(n.pass=Le$q.ClampObject,this._stencilCommand.pass=Le$q.ClampObject,e$2e(this._selectedStencilCommand)&&e$2e(this._selectedColorCommand)&&(this._selectedStencilCommand.pass=Le$q.ClampObject,this._selectedColorCommand.pass=Le$q.ClampObject)),t.push(this._stencilCommand),t.push(n),e$2e(this._selectedStencilCommand)&&e$2e(this._selectedColorCommand)&&(t.push(this._selectedStencilCommand),t.push(this._selectedColorCommand))):(i._fileType===p$T.ClampGroundPolygon||i._fileType===p$T.ClampGroundLine?(n.pass=Le$q.GLOBE+1,this._stencilCommand.pass=Le$q.GLOBE+1):i._fileType===p$T.ClampObjectPolygon&&(n.pass=Le$q.ClampObject,this._stencilCommand.pass=Le$q.ClampObject),t.push(this._stencilCommand),t.push(n))},_0x4881fc.prototype.isTransparent=function(e){return e._style3D.fillForeColor.alpha<e.maxTransparentAlpha&&e._pointCloudShading.renderMode!==_0x2c4f4b.VOXEL&&e.orderIndependentTranslucency},_0x4881fc.prototype.pushCommandsForNormalAndDepthFrameBuffer=function(e,t){!e$2e(this._normalAndDepthCommand)||(e.isSilhouette()?e$2e(this._hasSilhouette)&&this._hasSilhouette&&t.push(this._normalAndDepthCommand):t.push(this._normalAndDepthCommand))},_0x4881fc.prototype.pushCommandsForPostEffectFrameBuffer=function(e,t){!e.bloomEnable||!e$2e(this._postEffectCommand)||(e.bloomEnable&&e$2e(this._postEffectCommand)||this._hasBloomOperation)&&t.push(this._postEffectCommand)},_0x4881fc.prototype.pushCommandsForClampFrameBuffer=function(e,t){!this._intersectWithClipPlane||!e$2e(this._clampColorCommand)||(t.push(this._clipStencilCommand),t.push(this._clampColorCommand))},_0x4881fc.prototype.pushCommandsForFrameBuffer=function(e,t,i,n){t==Qe$c.NORMAL_AND_DEPTH?this.pushCommandsForNormalAndDepthFrameBuffer(e,i):t==Qe$c.POSTEFFECT_FILTER?this.pushCommandsForPostEffectFrameBuffer(e,i):t==Qe$c.CLAMP?this.pushCommandsForClampFrameBuffer(e,i):t==Qe$c.PICKRECT?this.pushCommandsForPickRectBuffer(e,i):t==Qe$c.SQRESULT?this.pushCommandsForSpatialQueryBuffer(e,i):t==Qe$c.RASTER&&this.pushCommandsForRasterHeightMap(n,e,i)},_0x4881fc.prototype.isNeedRasterized=function(e){for(var t in e){if(!e$2e(this._layerImagerys[t])||this._layerImagerys[t].length!=e[t].length)return!0;for(var i=0;i<e[t].length;i++)if(this._layerImagerys[t][i].level!=e[t][i].level||this._layerImagerys[t][i].x!=e[t][i].x||this._layerImagerys[t][i].y!=e[t][i].y)return!0}return!1},_0x4881fc.prototype.pushCommands=function(e,t,i){if(e$2e(this._colorCommand)){if(e$2e(i._imageryLayer)&&e$2e(this._cartographic)&&e$2e(this._imagerys)&&!this._imageRasterFinish&&this.updateImageryTexture(i,e),e$2e(this._dayTextureAlpha)&&e$2e(this._imagerys))for(var n=0;n<this._imagerys.length;n++){var r=this._imagerys[n].imageryLayer;this._dayTextureAlpha[n]=r.alpha}if(e.passes.pick&&e$2e(this._stencilCommand))return t.push(this._stencilCommand),void(this._pickCommand&&t.push(this._pickCommand));if(i._spatialClipEnable)return e$2e(this._clipCommand)||this.createSpatialClipCommand(e,i),void t.push(this._clipCommand);if(!e.passes.depth||i._fileType!==p$T.IconPoint&&i._fileType!==p$T.Text){var o=e._fboState.frameBufferType;if(e$2e(o)&&(o===Qe$c.NORMAL_AND_DEPTH||o===Qe$c.POSTEFFECT_FILTER||o===Qe$c.CLAMP||o===Qe$c.PICKRECT||o===Qe$c.SQRESULT||o===Qe$c.RASTER&&(4&e.useType)>0))return void this.pushCommandsForFrameBuffer(i,o,t,e);if(i._style3D.fillStyle!==fr$3.WireFrame||i._fileType===p$T.ClampGroundPolygon){i.LoadingPriority,_0x539352.UsePagedLodInfo;var a=this._colorCommand,s=Le$q.S3MTiles,l=this._mapPass,u=!1;if(a.renderState=i._rsColor,e$2e(this.materialPass)&&this.materialPass._alphaMode===_0x36a597.BLEND&&!e$2e(i.waterEffectSet))u=!0;else if(i._isTransparencyOptimization){for(var c in l)if(l[c]._bTransparentSorting){u=!0;break}}else for(var c in l)if(l[c]._bTransparentSorting){s+=1;break}if(this._isSelected&&i.selectedColor.alpha<1&&(u=!0),!(e.passes.pick&&i._scene.pickPointEnabled)&&(this.isTransparent(i)||u)&&(i.partlyTransparent?t.push(this._transparentCommand):s=i.orderIndependentTranslucency?Le$q.TRANSLUCENT:s),i._fileType===p$T.IconPoint||i._fileType===p$T.Text?s=Le$q.Label_Billboard:i._pointCloudShading.renderMode==_0x2c4f4b.VOXEL&&(s=Le$q.Voxel_Billboard),e$2e(this._stencilCommand))this.pushClampCommands(e,t,i);else if(this.oriPassGroup!==Le$q.OVERLAY&&(a.pass=i.receiveObjectClamp?s:Le$q.NonClampObject,a.pass+=this._passIncrement),i._fileType===p$T.ClampGroundRealtimeRasterCache)e$2e(this._level)&&(a._globeIndex={level:this._level,row:this._row,col:this._col}),e$2e(a)&&this._updateBatchTable&&Object.keys(this._pickInfo).length>0&&this.updateBatchTable(e,e.context,i),a&&e.commandListRealtimeRaster.push(a);else if(this._clipBounds.length>0)for(n=0;n<this._clipBounds.length;n++){var h=this._clipBounds[n].max,d=this._clipBounds[n].min,f=i$$.shallowClone(a);if(void 0!==h&&void 0!==d){var p=_0xda32c8(h,d);f._uniformMap=p$19(p,a._uniformMap),f.shaderProgram=this._spUnFinalResolution,t.push(f)}}else if(this._plusRoArray.length>0){var _=this._plusRoArray.length-1,m=this._plusRoArray[_];for(n=0;n<m.length;n++)t.push(m[n].command)}else a&&t.push(a)}i._style3D.fillStyle!==fr$3.Fill?i.wireFrameMode===_0x1d226a.EffectOutline||i.wireFrameMode===_0x1d226a.Sketch?(e$2e(this._regularEdgeCommand)&&(t.push(this._regularEdgeCommand),i._addRenderedEdge(this._regularEdgeCommand.edgeTotalLength,this._regularEdgeCommand.edgeCount)),e$2e(this._silhouetteEdgeCommand)&&(t.push(this._silhouetteEdgeCommand),i._addRenderedEdge(this._silhouetteEdgeCommand.edgeTotalLength,this._silhouetteEdgeCommand.edgeCount))):i.wireFrameMode===_0x1d226a.Quad?e$2e(this._wireFrameCommands.quad)&&t.push(this._wireFrameCommands.quad):i.wireFrameMode===_0x1d226a.Triangle&&e$2e(this._wireFrameCommands.triangle)&&t.push(this._wireFrameCommands.triangle):e$2e(this._regularEdgeCommand)&&this._isSelected&&i._selectColorType===Zr$3.WIREFRAME&&(t.push(this._regularEdgeCommand),i._addRenderedEdge(this._regularEdgeCommand.edgeTotalLength,this._regularEdgeCommand.edgeCount)),this._rasterized||i._fileType===p$T.ClampGroundRealtimeRasterCache&&this.refreshRaster(e),this._rasterized=!0}}};var _0x2c07df=new e$1X;function _0x38ba9a(e,t){var i=e.themeStyle;if(e$2e(i)){if(!e$2e(i.color)&&e$2e(i.pbrMaterialIndex)){e$2e(t._featureArray)||(t._featureArray=_0x109c04(e,t));for(var n=t._featureArray,r=0;r<n.length;r++){var o=n[r];Object.assign(o,e._layerScheduler._attributes[o.id]);var a=i.pbrMaterialIndex.evaluate(o);e$2e(a)||(a=-1),t._idsPBRIndexMap.set(o.id,{batchId:o.batchId,instanceIds:o.instanceIds,pbrMaterialIndex:a,dirty:!0})}t._updateBatchTable=!0,t._themeDirty=!1}e$2e(t._featureArray)||(t._featureArray=_0x109c04(e,t));for(n=t._featureArray,r=0;r<n.length;r++){o=n[r];Object.assign(o,e._layerScheduler._attributes[o.id]);var s=void 0;e$2e(i.color)&&(s=i.color.evaluateColor(o,_0x2c07df));var l=void 0;e$2e(i.show)&&(l=i.show.evaluate(o));var u=t._idsOperationMap.get(o.id);if(e$2e(u)||(u={batchId:o.batchId,instanceIds:o.instanceIds,skeletonId:-1,operationValue:new e$2c,dirty:!0},t._idsOperationMap.set(o.id,u)),e$2e(s)&&(t._idsColorMap.set(o.id,{batchId:o.batchId,instanceIds:o.instanceIds,color:e$1X.clone(s),dirty:!0}),u.operationValue.x=1&u.operationValue.x|_0x27a6bb.SetColor,u.dirty=!0),e$2e(l)){if(l){var c=_0x27a6bb.ALL^_0x27a6bb.HIDE;u.operationValue.x&=c}else u.operationValue.x=1&u.operationValue.x|_0x27a6bb.HIDE;u.dirty=!0}}t._updateBatchTable=!0,t._themeDirty=!1}}function _0x416d97(e,t,i,n){_0x2f7f72(e,t,n),_0x24bc87(e,t,i,n),0===e._vertexBufferToCreate.length&&0===e._indexBufferToCreate.length&&(e._bufferPrepared=!0,e._instanceBuffer=void 0)}_0x4881fc.prototype.initLayerSetting=function(e){if(this._isClamp=_0x454d12(e,this),e$2e(e.waterEffectSet)||e.multiTemporalUseWater){let i=e.multiTemporalUseWater?e.waterParameter.averageHeight:e.waterEffectSet[0].averageHeight;var t={boundingVolume:this._boundingVolume,distance:e.height+e.style3D.bottomAltitude+i};this._waterIndex=e.addWaterPlane(t)}e.allObjsHide&&this.updateAllObjsVisible(e,!e.allObjsHide),Object.keys(e._objsOperationList).length>0&&this.updateObjsOperation(e._objsOperationList),e.themeStyle&&_0x38ba9a(e,this),Object.keys(e._objsColorList).length>0&&this.updateObjsColor(e._objsColorList),Object.keys(e._objsOffsetList).length>0&&this.updateObjsTranslate(e._objsOffsetList)},_0x4881fc.prototype.initLayerSettingBak=function(e){if(this._isClamp=_0x454d12(e,this),e$2e(e.waterEffectSet)){var t={boundingVolume:this._boundingVolume,distance:e.height+e.style3D.bottomAltitude+e.waterEffectSet[0].averageHeight};this._waterIndex=e.addWaterPlane(t)}if(e.allObjsHide&&this.updateAllObjsVisible(!e.allObjsHide),e.selectColorType===Zr$3.REPLACE?_0x445d61(e,this):e.selectColorType===Zr$3.MIX?_0xe2a67e(e,this):(this.updateObjsColor(e._selections,e.selectColorType,!0),_0x193cbb(e,this)),e._objsVisibleList.length>0&&this.updateObjsVisible(e._objsVisibleList,e._objsVisibleList.values[0]),e$2e(e._objsHeightList)&&e._objsHeightList.length>0&&this.updateExtendHeight(e._objsHeightList),Object.keys(e._objsOperationList).length>0){var i=Math.max(Math.abs(e.selectedTranslate.x),Math.abs(e.selectedTranslate.y),Math.abs(e.selectedTranslate.z));this.updateObjsOperation(e._objsOperationList,i)}},_0x4881fc.prototype.createAllCommands=function(e,t){e$2e(this._colorCommand)||(e$2e(t.waterEffectSet)||t.multiTemporalUseWater?this.createWater(t):this.createCommand(e,t),this.initLayerSetting(t))};var _0x3ad3ec=new _0x2787b1,_0x57d2e7=new _0x5659c7;function _0x2f7f72(e,t,i){for(var n=e._vertexBufferToCreate;n.length;){var r=n.peek();if(_0x3ad3ec.set(i,e,r),!t.jobScheduler.execute(_0x3ad3ec,i$R.BUFFER))break;n.dequeue()}}function _0x24bc87(e,t,i,n){!e$2e(e._wireFrameIndexBuffers)&&i.wireFrameMode===_0x1d226a.Triangle&&i.style3D.fillStyle!==fr$3.Fill&&(e._wireFrameIndexBuffers=e.createWireframeIndexBuffer(n));for(var r=e._vertexPackage.verticesCount,o=e._indexBufferToCreate;o.length;){var a=o.peek();if(_0x57d2e7.set(n,e,a,r),!t.jobScheduler.execute(_0x57d2e7,i$R.BUFFER))break;o.dequeue()}}var _0x318374=new _0x2445e0;function _0x44c957(e,t,i){if(i._isS3MBlock){for(var n in e._mapPass)if(e._mapPass.hasOwnProperty(n)){(l=e._mapPass[n]).initTexture(),l.initBakeTexture(),l.requestSubTextures(t,t.context,i,e._subTexturesToUpload),l.requestBakeSubTextures(t,t.context,i,e._subTexturesToUpload)}for(var r=e._subTexturesToUpload;r.length;){var o=r.peek(),a=o.texture,s=o.subTextureInfo;if(_0x318374.set(t.context,e,a,s,i._textureLod),!t.jobScheduler.execute(_0x318374,i$R.TEXTURE))break;r.dequeue()}if(0===r.length)for(var n in e._mapPass)if(e._mapPass.hasOwnProperty(n)){var l;(l=e._mapPass[n]).enableTextureRenderable(),l.enableBakeTextureRenderable()}}}function _0x12c8b7(e){var t=e._fileType;return e.shadowType!=_0x325616.NONE&&(t===p$T.OSGBFile||t===p$T.OSGBCacheFile||t===p$T.PointCloudFile)}function _0x454d12(e,t){var i=e._fileType,n=i==p$T.ClampGroundPolygon||i==p$T.ClampObjectPolygon||i==p$T.ExtendClampPolygonCache||i==p$T.ClampGroundLine||i==p$T.ClampObjectLine;return t._clampRegionEdge&&(n=!1),n}_0x4881fc.prototype.createWater=function(e){var t=this._arrIndexPackage[0];if(e$2e(t)){var i=e._context,n=this._vertexPackage,r=n.vertexAttributes;this._instanceCount=n.instanceCount,this._instanceMode=n.instanceMode,this._attributeLocations=n.attrLocation;var o=Le$q.S3MTiles;_0x1a3769(n);var a=this._mapPass[t.materialCode],s=W$18.TRIANGLES;switch(t.primitiveType){case 1:s=W$18.POINTS;break;case 2:s=W$18.LINES;break;case 4:s=W$18.TRIANGLES}var l=new i$$({primitiveType:s,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:o,count:t.indicesCount,cull:!0});l.addUniformBuffer(e._context.uniformState._sceneUBO),l.addUniformBuffer(e._layerUBO),l.addUniformBuffer(e._waterLayerUbo),l.addUniformBuffer(this._meshUBO),l.addUniformBuffer(this._materialUBO),l.pickId="vSecondColor",l.vertexArray=new c$13({context:i,attributes:r,indexBuffer:t.indexBuffer}),this.materialPass=a,l.shaderProgram=this._sp,l.renderState=e._rsColor,l.castShadows=!1,l.receiveShadows=!1,l.selectCastShadows=!1,this._uniformMap={},_0x2c7aca.create(e._frameState,e,this,this._uniformMap),l.uniformMap=this._uniformMap,this._colorCommand=l}},_0x4881fc.prototype.createWireframeIndexBuffer=function(e){var t,i,n;if(e$2e(t=this._arrIndexPackage[0])&&e$2e(t.indicesTypedArray)){i={indices:0===t.indexType?new Uint16Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesCount):new Uint32Array(t.indicesTypedArray),primitiveType:W$18.TRIANGLES},k$14.toWireframe(i),n=i.indices;var r=ce$z.UNSIGNED_SHORT;return this._vertexPackage.verticesCount>e$2d.SIXTY_FOUR_KILOBYTES?(r=ce$z.UNSIGNED_INT,n=new Uint32Array(n)):n=new Uint16Array(n),t$X.createIndexBuffer({context:e,typedArray:n,usage:A$18.STATIC_DRAW,indexDatatype:r})}},_0x4881fc.prototype.createStencilCommandForClampLayer=function(e,t){var i=void 0;(i=i$$.shallowClone(e)).renderState=t,this._stencilCommand=i},_0x4881fc.prototype.createClampColorCommand=function(e){e._context;var t=this._colorCommand;if(e$2e(t)&&e.isRenderClipSection()&&!e$2e(this._clampColorCommand)){this._intersectWithClipPlane=this.isIntersectWithClipPlane(e);var i=i$$.shallowClone(t);i.renderState=e._rsClampColor,this._clampColorCommand=i;var n=i$$.shallowClone(t);n.renderState=e._rsStencil,this._clipStencilCommand=n}};var _0x5147ab=new h$18;function _0x1a3769(e){for(var t in e.attrLocation){var i=e.attrLocation[t];e.vertexAttributes[i].name=t}}_0x4881fc.prototype.refreshRasterTile=function(e,t){var i=e._rectangle;e$2e(h$18.intersection(t,i,_0x5147ab))&&(e._rasterized=!1),e$2e(e._southwestChild)&&this.refreshRasterTile(e._southwestChild,t),e$2e(e._southeastChild)&&this.refreshRasterTile(e._southeastChild,t),e$2e(e._northwestChild)&&this.refreshRasterTile(e._northwestChild,t),e$2e(e._northeastChild)&&this.refreshRasterTile(e._northeastChild,t)},_0x4881fc.prototype.refreshRasterTile2=function(e,t,i,n){var r=!1;if(e._level>=t){var o=Math.pow(2,e._level-t),a=Math.floor(e.y/o),s=Math.floor(e.x/o);a===i&&s===n&&(r=!0)}else{o=Math.pow(2,t-e._level),a=Math.floor(i/o),s=Math.floor(n/o);a===e.y&&s===e.x&&(r=!0)}r&&(e._rasterized=!1,e$2e(e._southwestChild)&&this.refreshRasterTile2(e._southwestChild,t,i,n),e$2e(e._southeastChild)&&this.refreshRasterTile2(e._southeastChild,t,i,n),e$2e(e._northwestChild)&&this.refreshRasterTile2(e._northwestChild,t,i,n),e$2e(e._northeastChild)&&this.refreshRasterTile2(e._northeastChild,t,i,n))},_0x4881fc.prototype.refreshRaster=function(e,t){if(this._layer._fileType===p$T.ClampGroundRealtimeRasterCache)if(e$2e(this._level)&&!e$2e(t))this.refreshRasterTile2(e._quadtree._levelZeroTiles[0],this._level,this._row,this._col),this.refreshRasterTile2(e._quadtree._levelZeroTiles[1],this._level,this._row,this._col);else if(e$2e(e._quadtree._levelZeroTiles)){var i=new h$18(this._boundingVolume.center.x-this._boundingVolume.radius,this._boundingVolume.center.y-this._boundingVolume.radius,this._boundingVolume.center.x+this._boundingVolume.radius,this._boundingVolume.center.y+this._boundingVolume.radius);i.west=e$2d.toRadians(i.west),i.north=e$2d.toRadians(i.north),i.east=e$2d.toRadians(i.east),i.south=e$2d.toRadians(i.south),this.refreshRasterTile(e._quadtree._levelZeroTiles[0],i),this.refreshRasterTile(e._quadtree._levelZeroTiles[1],i)}},_0x4881fc.prototype.createSpatialClipCommand=function(e,t){if(!e$2e(this._clipCommand)){var i=this._colorCommand,n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push("SQCLIP"),r.defines.push("SQCLIP"),e.useLogDepth&&r.defines.push("LOG_DEPTH");var o=i$$.shallowClone(i);o.uniformMap.uFrontDepthTexture=function(){return t._sqTextures[0]},o.uniformMap.uBackDepthTexture=function(){return t._sqTextures[1]},o.uniformMap.uFrontColorTexture=function(){return t._sqTextures[2]},o.uniformMap.uSQMode=function(){return t._sqMode},o.shaderProgram=r$14.fromCache({context:t._context,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),this._clipCommand=o}},_0x4881fc.prototype.createCommand=function(e,t){if(e$2e(this._sp)){var i=t._context;if(!i.webgpu||!this._clampRegionEdge){var n=this._vertexPackage;if(e$2e(n.vertexAttributes)){e$2e(this._vertexArray)||_0x1a3769(n);var r=n.vertexAttributes;this._instanceCount=n.instanceCount,this._instanceMode=n.instanceMode,this._attributeLocations=n.attrLocation;var o=Le$q.S3MTiles,a=this._clampRegionEdge?t._rsClampLineColor:t._rsColor,s=t._fileType,l=this._arrIndexPackage[0];t._hasWireframe||this._arrIndexPackage.length>1&&(t._hasWireframe=!0);var u,c=_0xf77618.Default,h=n.verticesCount,d=W$18.POINTS;if(e$2e(l))switch(!0===(c=u$Z(this._mapPass[l.materialCode],_0xf77618.Default))._bTransparentSorting&&(o=Le$q.S3MTiles+1),u=l.indexBuffer,l.primitiveType){case 1:d=W$18.POINTS;break;case 2:d=W$18.LINES;break;case 4:d=W$18.TRIANGLES}else if(e$2e(this._ptIndexGroup)){var f,p,_,m,g,x=0;for(g in this._ptIndexGroup)this._ptIndexGroup.hasOwnProperty(g)&&(p=t._pointCloudLayerNames[g],t._pointCloudLayerVisible[p]&&(_=this._ptIndexGroup[g].start,x+=(m=this._ptIndexGroup[g].end)-_+1));if(x>0){var y=ce$z.createTypedArray(n.verticesCount,x),v=0;for(g in this._ptIndexGroup)if(this._ptIndexGroup.hasOwnProperty(g)&&(p=t._pointCloudLayerNames[g],t._pointCloudLayerVisible[p]))for(_=this._ptIndexGroup[g].start,m=this._ptIndexGroup[g].end,f=_;f<=m;)y[v++]=f++;var $=n.verticesCount>=e$2d.SIXTY_FOUR_KILOBYTES&&i.elementIndexUint?ce$z.UNSIGNED_INT:ce$z.UNSIGNED_SHORT;u=t$X.createIndexBuffer({context:i,typedArray:y,usage:A$18.STATIC_DRAW,indexDatatype:$}),this.isBillboardPoint()&&(u=this._context.createBillboardPointIndexBuffer())}else h=1}this.isBillboardPoint()&&(d=W$18.TRIANGLES),this.materialPass=c,this.useWValue=4===r[0].componentsPerAttribute,e$2e(this._attributeLocations.aVertexWeight)&&(this.useWValue=1),(1===d||s===p$T.ClampGroundRealtimeRasterCache&&e$2e(this._attributeLocations.aTexCoord1))&&(this.useLineColor=!0),this.oriPassGroup=o;var b=new i$$({primitiveType:d,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:o,count:e$2e(u)?void 0:h,cull:!0,occlude:!1});this._entity&&this._entity.isFlatten&&(b.cull=!1),b.opaquePass=Le$q.S3MTiles,t._fileType===p$T.ClampGroundRealtimeRasterCache&&(b.layerId=t.id),b.pickId="vSecondColor",s===p$T.PointCloudFile&&(b.pickId="vPosition"),b.instanceCount=this._instanceCount,this.isBillboardPoint()&&(b.instanceCount=this._vertexPackage.verticesCount),b.vertexArray=new c$13({context:i,attributes:r,indexBuffer:u}),b.shaderProgram=this._sp,_0x454d12(t,this)&&((t._fileType===p$T.ClampGroundPolygon||t._fileType===p$T.ClampObjectPolygon||t._fileType===p$T.ClampGroundLine||t._fileType===p$T.ExtendClampPolygonCache)&&(b.pickId=void 0),this._isClamp=!0),b.renderState=a,b.uniformMap=this._uniformMap,s===p$T.ClampGroundRealtimeRasterCache&&(b.useRelativeOrigin=!1),b.addUniformBuffer(t._context.uniformState._sceneUBO),b.addUniformBuffer(t._context.uniformState._lightUBO),b.addUniformBuffer(t._layerUBO),b.addUniformBuffer(this._meshUBO),b.addUniformBuffer(this._materialUBO),e$2e(t._polylineEffectUbo)?b.addUniformBuffer(t._polylineEffectUbo):e$2e(t._regionEffectUbo)&&b.addUniformBuffer(t._regionEffectUbo),e$2e(this._volumeUBO)&&b.addUniformBuffer(this._volumeUBO),_0x454d12(t,this)&&this.createStencilCommandForClampLayer(b,t._rsStencil);var T=_0x12c8b7(t);b.castShadows=T,b.receiveShadows=T,b.selectCastShadows=!0,b.owner=this,(s==p$T.IconPoint||s===p$T.Text)&&(b.cull=!1),this._colorCommand=b,this.createWireFrameCommand(t,r)}}}},_0x4881fc.prototype.createOneEdgeCommand=function(e,t,i,n,r){if(!e$2e(i.attributes)||0==i.attributes.length||!e$2e(i.instanceCount)||0==i.instanceCount)return null;var o,a,s=Le$q.OPAQUE+1,l=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matModel,boundingVolume:this._boundingVolume,pass:s,owner:this,cull:!0});if(l.vertexArray=new c$13({context:e,attributes:i.attributes,indexBuffer:n}),l.instanceCount=i.instanceCount,r){var u="RegularEdge_"+t.id,c="RegularEdge_"+t.id;o=new s$V({name:u,sources:[_0x115b1e]}),a=new s$V({name:c,sources:[_0x59e865]})}else{u="SilhouetteEdge_"+t.id,c="SilhouetteEdge_"+t.id;o=new s$V({name:u,sources:[_0x115b1e]}),a=new s$V({name:c,sources:[_0x59e865]}),o.defines.push("SILHOUETTE"),a.defines.push("SILHOUETTE")}o.defines.push("ANTIALIASING"),a.defines.push("ANTIALIASING"),a.defines.push("POLYGON_OFFSET"),t._hasExcavation&&(o.defines.push(D$V.EXCAVATION),a.defines.push(D$V.EXCAVATION)),t._hasServerExcavation&&(o.defines.push("SERVEREXCAVATION"),a.defines.push("SERVEREXCAVATION")),t.swipeEnabled&&a.defines.push(D$V.APPLY_SWIPE),t._clipping&&a.defines.push("CLIP"),t._section&&a.defines.push("CLIPPLANE"),this._batchTable&&(o.defines.push("BatchTable"),-1===o.defines.indexOf("BatchTableMultiRow")&&o.defines.push("BatchTableMultiRow")),t._selectColorType===Zr$3.WIREFRAME&&t._style3D.fillStyle===fr$3.Fill&&a.defines.push(D$V.WIREFRAME_SELECT_TYPE);var h=0;t.wireFrameMode===_0x1d226a.Sketch&&(h=1),o.defines.push("MODE "+h),a.defines.push("MODE "+h),l.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:i.attributeLocations}),l.renderState=d$1m.fromCache({depthTest:{enabled:!0,func:re$G.LESS_OR_EQUAL},cull:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var d={uStrokesTexture:function(){return e$2e(t._edgeStrokesTexture)||t._initEdgeTexture(),t._edgeStrokesTexture}};return l.uniformMap=p$19(d,this._colorCommand.uniformMap),l.edgeTotalLength=i.edgeLength,l.edgeCount=i.instanceCount,l.wireframeType=t.wireFrameMode,l.addUniformBuffer(t._context.uniformState._sceneUBO),l.addUniformBuffer(t._layerUBO),l.addUniformBuffer(this._meshUBO),l},_0x4881fc.prototype.createEdgeCommands=function(e){if(e$2e(this._edgeGeometry)){var t=e._context,i=this._edgeGeometry;_0x28a85f.createRegularEdgeAttributes(t,i.regular),_0x28a85f.createSilhouetteEdgeAttributes(t,i.silhouette);var n=_0x28a85f.createIndexBuffer(t);this._regularEdgeCommand=this.createOneEdgeCommand(t,e,i.regular,n,!0),this._silhouetteEdgeCommand=this.createOneEdgeCommand(t,e,i.silhouette,n,!1),(e$2e(this._regularEdgeCommand)||e$2e(this._silhouetteEdgeCommand))&&e.wireFrameMode===_0x1d226a.Quad&&(e.wireFrameMode=_0x1d226a.EffectOutline)}},_0x4881fc.prototype.createTrangleWireFrameCommand=function(e,t){if(e$2e(this._arrIndexPackage[0])&&e$2e(this._colorCommand)){var i=e._context;this._arrIndexPackage[0].indicesCount;var n=i$$.shallowClone(this._colorCommand);n.primitiveType=W$18.LINES,n.vertexArray=new c$13({context:i,attributes:t,indexBuffer:this._wireFrameIndexBuffers}),this._wireFrameCommands.triangle=n}},_0x4881fc.prototype.createQuadWireFrameCommand=function(e,t,i){var n=e._context,r=2===i.primitiveType?W$18.LINES:W$18.LINE_STRIP,o=i$$.shallowClone(this._colorCommand);o.pass=Le$q.LOG_DEPTH_OVERLAY,o.count=void 0,o.primitiveType=r,o.vertexArray=new c$13({context:n,attributes:t,indexBuffer:i.indexBuffer});var a=this._colorCommand.shaderProgram.vertexShaderSource.clone(),s=this._colorCommand.shaderProgram.fragmentShaderSource.clone(),l=a.defines.indexOf(D$V.SKETCH_MODE);l>0&&a.defines.splice(l,1),(l=a.defines.indexOf(D$V.COMPUTE_W_VALUE))>0&&a.defines.splice(l,1),(l=a.defines.indexOf(D$V.EMISSION_TEXTURE_ATLAS))>0&&a.defines.splice(l,1),(l=s.defines.indexOf(D$V.SKETCH_MODE))>0&&s.defines.splice(l,1),(l=s.defines.indexOf(D$V.COMPUTE_W_VALUE))>0&&s.defines.splice(l,1),(l=s.defines.indexOf(D$V.EMISSION_TEXTURE_ATLAS))>0&&s.defines.splice(l,1),a.defines.push("QUAD_OUTLINE"),s.defines.push("QUAD_OUTLINE"),s.defines.push("Only_LineColor"),o.shaderProgram=r$14.fromCache({context:n,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations}),o.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),this._wireFrameCommands.quad=o},_0x4881fc.prototype.createWireFrameCommand=function(e,t){if(!this._isClamp&&e._fileType!==p$T.ClampGroundPolygon){if(this._arrIndexPackage.length>1)if(13==this._arrIndexPackage[1].primitiveType)this.createEdgeCommands(e);else if(2==this._arrIndexPackage[1].primitiveType){var i=this._arrIndexPackage[1];this.createQuadWireFrameCommand(e,t,i)}e.wireFrameMode===_0x1d226a.Triangle&&e.style3D.fillStyle!==fr$3.Fill&&this.createTrangleWireFrameCommand(e,t)}},_0x4881fc.prototype.updateTheme=function(e){_0x38ba9a(e,this)},_0x4881fc.prototype.updateObjsColor=function(e){if(this._initialize&&e$2e(this._selectionInforMap)&&_0x43b37d.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&e$2e(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)){var n=e[i];if(e$2e(n)){var r=t[i];this._updateBatchTable=!0;var o=r.batchId,a=r.instanceIds;this._idsColorMap.set(i,{batchId:o,instanceIds:a,color:n,dirty:!0});var s=this._idsOperationMap.get(i);e$2e(s)||(s={batchId:o,instanceIds:a,operationValue:new e$2c,dirty:!0}),s.dirty=!0,s.operationValue.x=n===e$1X.TRANSPARENT?254&s.operationValue.x:1|s.operationValue.x,this._passIncrement=n.alpha<1?1:0,this._idsOperationMap.set(i,s)}}}},_0x4881fc.prototype._radiusToExpand=function(e){if(!this._selectionInforMap||!this._initialize||!e$2e(this._colorCommand))return 0;var t=this._selectionInforMap._hash,i=0;for(var n in t)!t.hasOwnProperty(n)||!e[n]||(i=Math.max(o$1p.magnitude(e[n]),i),this._oriBoundingSphere||(this._oriBoundingSphere=this._boundingVolume.clone()),this._colorCommand.boundingVolume.radius=this._oriBoundingSphere.radius+i,this._boundingVolume.radius=this._oriBoundingSphere.radius+i);return i},_0x4881fc.prototype.updateObjsTranslate=function(e){if(this._initialize&&e$2e(this._selectionInforMap)&&_0x43b37d.S3M!==this._version){var t=this._selectionInforMap.length,i=this._colorCommand;if(!(t<1)&&e$2e(i)){var n=this._selectionInforMap._hash,r=this._idsTranslateMap.length,o=!1;for(var a in n)if(n.hasOwnProperty(a)){var s=e[a];if(s){var l=n[a];this._updateBatchTable=!0;var u=l.batchId,c=l.instanceIds;this._idsTranslateMap.set(a,{batchId:u,instanceIds:c,translate:s,dirty:!0});var h=this._idsOperationMap.get(a);e$2e(h)||(h={batchId:u,instanceIds:c,operationValue:new o$1p,dirty:!0}),h.dirty=!0,o$1p.equals(s,o$1p.ZERO)?(h.operationValue.x=h.operationValue.x&(_0x27a6bb.ALL^_0x27a6bb.OFFSET),this._idsOperationMap.set(a,h)):(h.operationValue.x=h.operationValue.x|_0x27a6bb.OFFSET,o=!0)}}e$2e(this._entity)&&(this._entity.hasTranslate=o),i.cull=!o;var d=this._idsTranslateMap.length;(d>0&&0===r||r>0&&0===d)&&d>0&&0===r&&this.appendProgramDefine({layer:this._layer},!0,!1,D$V.Translation,!0,!1)}}},_0x4881fc.prototype.updateAllObjsVisible=function(e,t){if(this._initialize&&e$2e(this._selectionInforMap)&&_0x43b37d.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&e$2e(this._colorCommand))){var i=this._selectionInforMap._hash;for(var n in i)if(i.hasOwnProperty(n)&&!e._objsVisibleList.contains(n)){var r=i[n];this._updateBatchTable=!0;var o=r.batchId,a=r.instanceIds,s=this._idsOperationMap.get(n);e$2e(s)||(s={batchId:o,instanceIds:a,operationValue:new e$2c,dirty:!0}),s.dirty=!0,s.operationValue.x=t?s.operationValue.x&(_0x27a6bb.ALL^_0x27a6bb.HIDE):s.operationValue.x|_0x27a6bb.HIDE,this._idsOperationMap.set(n,s),s.operationValue.x===_0x27a6bb.RESET?delete e._objsOperationList[n]:(e._objsOperationList[n]=s.operationValue.x,e._objsHideList.set(n,!0))}}},_0x4881fc.prototype.removeAllExtendHeight=function(){this._initialize&&e$2e(this._texCoord1)&&e$2e(this._colorCommand)&&this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1).vertexBuffer.copyFromArrayView(this._texCoord1)},_0x4881fc.prototype.removeExtendHeight=function(e){if(this._initialize&&e$2e(this._texCoord1)&&(!(this._selectionInforMap.length<1)&&e$2e(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)&&-1!=e.indexOf(parseInt(i))){var n,r,o,a,s=t[i];n=this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1),r=(a=s.vertexColorOffset*n.componentsPerAttribute)*S$14.getSizeInBytes(n.componentDatatype),o=s.vertexColorCount*n.componentsPerAttribute;var l=this._texCoord1.slice(a,o);n.vertexBuffer.copyFromArrayView(l,r)}}},_0x4881fc.prototype.updateExtendHeight=function(e){if(this._initialize&&e$2e(this._texCoord1)&&(!(this._selectionInforMap.length<1)&&e$2e(this._colorCommand))){var t=this._selectionInforMap._hash;for(var i in t)if(t.hasOwnProperty(i)&&e.contains(i)){var n,r,o,a,s=t[i],l=e.get(i);n=this._colorCommand.vertexArray.getAttribute(this._attributeLocations.aTexCoord1),r=(a=s.vertexColorOffset*n.componentsPerAttribute)*S$14.getSizeInBytes(n.componentDatatype),o=s.vertexColorCount*n.componentsPerAttribute;for(var u=S$14.createTypedArray(n.componentDatatype,o),c=0;c<s.vertexColorCount;c++)this._texCoord1[2*c+1+a]>.3&&this._texCoord1[2*c+1+a]<.8?(u[2*c]=l,u[2*c+1]=.5):this._texCoord1[2*c+1+a]>.8?(u[2*c]=l,u[2*c+1]=1):(u[2*c]=this._texCoord1[2*c+a],u[2*c+1]=0);n.vertexBuffer.copyFromArrayView(u,r)}}},_0x4881fc.prototype.updateObjsOperation=function(e,t){if(this._initialize&&e$2e(this._selectionInforMap)&&_0x43b37d.S3M!==this._version&&(!(this._selectionInforMap.length<1)&&e$2e(this._colorCommand))){var i=this._selectionInforMap._hash,n=!1,r=_0x454d12(this._layer,this),o=!1,a=this._layer.isSilhouette(),s=!1,l=!1;for(var u in i)if(i.hasOwnProperty(u)){var c=e[u];if(e$2e(c)){var h=i[u];this._updateBatchTable=!0;var d=this._layer._lastSelectSkeletonId,f=d>-1?u+"_"+d:u,p=h.batchId,_=h.instanceIds,m=this._idsOperationMap.get(f);e$2e(m)||(m={batchId:p,instanceIds:_,skeletonId:d,operationValue:new e$2c,dirty:!0}),m.dirty=!0,m.operationValue.x=1&m.operationValue.x|c,this._idsOperationMap.set(f,m),(m.operationValue.x&_0x27a6bb.BLOOM)>0&&(n=!0),r&&(m.operationValue.x&_0x27a6bb.SELECTED)>0&&(o=!0),a&&(m.operationValue.x&_0x27a6bb.SELECTED)>0&&(s=!0),(m.operationValue.x&_0x27a6bb.SELECTED)>0&&(l=!0)}}this._hasBloomOperation=n,this._clampSelected=o,this._hasSilhouette=s,this._isSelected=l}};var _0x3d7a57=new o$1m(new o$1p(1,0,0),0);function _0x88c4f6(e,t){return o$1p.distance(e.center,t.center)<=e.radius+t.radius}function _0xb28f92(e,t){var i=!1,n=t.split(" "),r=!1;if(n.length>1){var o=n[0],a=n[1];for(var s in e.defines)if(-1!==e.defines[s].indexOf(o))return e.defines[s]=o+" "+a,!0;r=!0,e.defines.push(t)}else{for(var l=0,u=e.defines.length;l<u;l++)if(e.defines[l]===t){i=!0;break}i||(r=!0,e.defines.push(t))}return r}function _0x2cb26f(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function _0x3c43ee(e,t){e$2e(t)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),t.renderState=void 0,t.uniformMap=void 0,t.removeAllUniformBuffer())}function _0x13e4b7(e,t,i,n){if(!e$2e(i._labelPromiseArr[n])){var r=e._s3MTilesLabelStyle._textField;e.getAttributesById(t).then((function(e){if(i._labelPromiseArr[n]=void 0,e.hasOwnProperty(r)){var o=e[r];i._labelTextArray[n]=o,i._labelsCreated[t]=!0}}))}}_0x4881fc.prototype.isIntersectWithClipPlane=function(e){return!!e.isRenderClipSection()&&this._boundingVolume.intersectPlane(o$1m.fromCartesian4(e._oriClipPlane[0],_0x3d7a57))===Ae$w.INTERSECTING},_0x4881fc.prototype.setCustomClipBox=function(e,t){var i={layer:e};t?(this.appendProgramDefine(i,!1,!0,D$V.CLIP),e._section&&this.appendProgramDefine(i,!1,!0,D$V.CLIPPLANE)):(this.removeProgramDefine(i,!1,!0,D$V.CLIP),e._section&&this.removeProgramDefine(i,!1,!0,D$V.CLIPPLANE)),e$2e(this._clampColorCommand)&&(!this._clampColorCommand.shaderProgram.isDestroyed()&&this._clampColorCommand.shaderProgram.destroy(),this._clampColorCommand=void 0),e$2e(this._clipStencilCommand)&&(!this._clipStencilCommand.shaderProgram.isDestroyed()&&this._clipStencilCommand.shaderProgram.destroy(),this._clipStencilCommand=void 0)},_0x4881fc.prototype.updateShadow=function(e){var t=_0x12c8b7(this),i=this._colorCommand;!e$2e(i)||(i.castShadows=t,i.receiveShadows=t,i.selectCastShadows=!e$2e(e.waterEffectSet))},_0x4881fc.prototype.cloneSelectCommand=function(e){var t=e._context,i=new s$V({name:"S3MTilesSelection",sources:[_0x53b856]});e._clipping&&i.defines.push("CLIP"),i.defines.push("DepthEXT");var n=this._colorCommand;if(e$2e(n)){var r=n.shaderProgram.vertexShaderSource.clone(),o=void 0;if((o=i$$.shallowClone(n,o)).shaderProgram=r$14.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:i,attributeLocations:this._attributeLocations}),this._pickCommand=o,this._pickCommand.pass=Le$q.ClampObject,e$2e(this._stencilCommand)){var a=this._stencilCommand.shaderProgram.vertexShaderSource.clone(),s=this._stencilCommand.shaderProgram.fragmentShaderSource.clone();a.defines.push("SELECTED"),s.defines.push("SELECTED"),this._selectedStencilCommand=i$$.shallowClone(this._stencilCommand),this._selectedStencilCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations}),this._selectedColorCommand=i$$.shallowClone(this._colorCommand),this._selectedColorCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:this._attributeLocations})}}},_0x4881fc.prototype.createNormalAndDepthCommand=function(e){var t=e._context,i=this._colorCommand;if(e.isSilhouette()&&e$2e(i)&&!e$2e(this._normalAndDepthCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push(D$V.NORMAL_AND_DEPTH),r.defines.push(D$V.NORMAL_AND_DEPTH),e.isSilhouette()&&(n.defines.push(D$V.SILHOUETTE_SELECT_TYPE),r.defines.push(D$V.SILHOUETTE_SELECT_TYPE));var o=void 0;(o=i$$.shallowClone(i,o)).shaderProgram=r$14.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),this._normalAndDepthCommand=o}},_0x4881fc.prototype.createTransparentCommand=function(e){var t=e._context,i=this._colorCommand;if(e.partlyTransparent&&e$2e(i)&&!e$2e(this._transparentCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();r.defines.push("TRANSPARENT_PASS");var o=void 0;(o=i$$.shallowClone(i,o)).shaderProgram=r$14.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.pass=Le$q.TRANSLUCENT,this._transparentCommand=o}},_0x4881fc.prototype.createPostEffectCommand=function(e){var t=e._context,i=this._colorCommand;if(e.bloomEnable&&e$2e(i)&&!e$2e(this._postEffectCommand)){var n=i.shaderProgram.vertexShaderSource.clone(),r=i.shaderProgram.fragmentShaderSource.clone();n.defines.push(D$V.POST_EFFECT),r.defines.push(D$V.POST_EFFECT);var o=void 0;(o=i$$.shallowClone(i,o)).shaderProgram=r$14.fromCache({context:t,vertexShaderSource:n,fragmentShaderSource:r,attributeLocations:this._attributeLocations}),o.pass=Le$q.S3MTiles,this._postEffectCommand=o}},_0x4881fc.prototype.enableAjustTransparentBackColor=function(e){this.appendProgramDefine(e,!1,!0,D$V.TRANSPARENT_BACK_COLOR)},_0x4881fc.prototype.disableAjustTransparentBackColor=function(e){this.removeProgramDefine(e,!1,!0,D$V.TRANSPARENT_BACK_COLOR)},_0x4881fc.prototype.enableAdjustColor=function(e){this.appendProgramDefine(e,!1,!0,D$V.ADJUST_COLOR)},_0x4881fc.prototype.enableVertexCapture=function(e){this.appendProgramDefine(e,!0,!0,D$V.VERTEX_CAPTURE)},_0x4881fc.prototype.disableVertexCapture=function(e){this.removeProgramDefine(e,!0,!0,D$V.VERTEX_CAPTURE)},_0x4881fc.prototype.enableExcavation=function(e){this.appendProgramDefine(e,!0,!0,D$V.EXCAVATION)},_0x4881fc.prototype.disableExcavation=function(e){this.removeProgramDefine(e,!0,!0,D$V.EXCAVATION)},_0x4881fc.prototype.enableServerExcavation=function(e){this.appendProgramDefine(e,!0,!0,"SERVEREXCAVATION")},_0x4881fc.prototype.disableServerExcavation=function(e){this.removeProgramDefine(e,!0,!0,"SERVEREXCAVATION")},_0x4881fc.prototype.enableFlatten=function(e){e$2e(e.entity)&&e$2e(e.entity._boundingSphere)&&e$2e(e.boundingSphere)&&(_0x88c4f6(e.entity._boundingSphere,e.boundingSphere)&&(e.entity.isFlatten=!0,e$2e(this._colorCommand)&&(this._colorCommand.cull=!1)));this.appendProgramDefine(e,!0,!1,D$V.FALTTEN),this.appendProgramDefine(e,!0,!1,D$V.UseFloatTexture)},_0x4881fc.prototype.enableOverlay=function(e){this.appendProgramDefine(e,!0,!0,D$V.OVERLAY)},_0x4881fc.prototype.disableOverlay=function(e){this.removeProgramDefine(e,!1,!0,D$V.OVERLAY)},_0x4881fc.prototype.disableFlatten=function(e){e$2e(e.entity)&&(e.entity.isFlatten=!1),e$2e(this._colorCommand)&&(this._colorCommand.cull=!0),this.removeProgramDefine(e,!0,!1,D$V.FALTTEN),this.removeProgramDefine(e,!0,!1,D$V.UseFloatTexture)},_0x4881fc.prototype.enableHypsometric=function(e){this.appendProgramDefine(e,!0,!0,D$V.COMPUTE_W_VALUE),this.appendProgramDefine(e,!0,!0,D$V.HYPSOMETRIC)},_0x4881fc.prototype.disableHypsometric=function(e){this.removeProgramDefine(e,!0,!0,D$V.COMPUTE_W_VALUE),this.removeProgramDefine(e,!0,!0,D$V.EMISSION_TEXTURE_ATLAS),this.removeProgramDefine(e,!0,!0,D$V.HYPSOMETRIC)},_0x4881fc.prototype.hasLightChange=function(e){e.enable?this.appendProgramDefine(e,!0,!0,D$V.HAS_LIGHT):this.removeProgramDefine(e,!0,!0,D$V.HAS_LIGHT)},_0x4881fc.prototype.skeletonSelectedChange=function(e){e.enable?this.appendProgramDefine(e,!0,!0,D$V.HAS_SKELETONSELECTED):this.removeProgramDefine(e,!0,!0,D$V.HAS_SKELETONSELECTED)},_0x4881fc.prototype.skeletonSelectEnable=function(e){e.enable?this.appendProgramDefine(e,!0,!0,D$V.SKELETONSELECT_ENABLE):this.removeProgramDefine(e,!0,!0,D$V.SKELETONSELECT_ENABLE)},_0x4881fc.prototype.selectColorTypeChange=function(e){e.selectColorType==Zr$3.REPLACE?(this.appendProgramDefine(e,!0,!0,D$V.REPLACE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,D$V.SILHOUETTE_SELECT_TYPE)):e.selectColorType==Zr$3.SILHOUETTE||e.selectColorType==Zr$3.ALWAYS_SHOW_SILHOUETTE?(this.appendProgramDefine(e,!0,!0,D$V.SILHOUETTE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,D$V.REPLACE_SELECT_TYPE)):(this.removeProgramDefine(e,!0,!0,D$V.REPLACE_SELECT_TYPE),this.removeProgramDefine(e,!0,!0,D$V.SILHOUETTE_SELECT_TYPE))},_0x4881fc.prototype.mixColorTypeChange=function(e){e.mixColorType===_0x2b839f.REPLACE?this.appendProgramDefine(e,!0,!0,D$V.REPLACE_COLOR_TYPE):this.removeProgramDefine(e,!0,!0,D$V.REPLACE_COLOR_TYPE)},_0x4881fc.prototype.splitDirectionChange=function(e){e.enableSplit?this.appendProgramDefine(e,!1,!0,D$V.APPLY_SPLIT):this.removeProgramDefine(e,!1,!0,D$V.APPLY_SPLIT)},_0x4881fc.prototype.swipeStateChange=function(e){e.enableSwipe?this.appendProgramDefine(e,!1,!0,D$V.APPLY_SWIPE):this.removeProgramDefine(e,!1,!0,D$V.APPLY_SWIPE)},_0x4881fc.prototype.edgeWireFrameModeChange=function(e){this.appendProgramDefineForCommand(this._regularEdgeCommand,e,!0,!0,"MODE "+e.edgeMode,!1),this.appendProgramDefineForCommand(this._silhouetteEdgeCommand,e,!0,!0,"MODE "+e.edgeMode,!1)},_0x4881fc.prototype.PBRMaterialTypeChange=function(e){e.PBRType===Xe$e.NONE?this.removeProgramDefine(e,!0,!0,D$V.PBR):this.appendProgramDefine(e,!0,!0,D$V.PBR)},_0x4881fc.prototype.emissionTextureChange=function(e){e.enable?(this.appendProgramDefine(e,!0,!0,D$V.COMPUTE_W_VALUE),this.appendProgramDefine(e,!0,!0,D$V.EMISSION_TEXTURE_ATLAS)):this.removeProgramDefine(e,!0,!0,D$V.EMISSION_TEXTURE_ATLAS)},_0x4881fc.prototype.enableTextureMove=function(e){e.enable?this.appendProgramDefine(e,!0,!0,D$V.TEXTURE_MOVE):this.removeProgramDefine(e,!0,!0,D$V.TEXTURE_MOVE)},_0x4881fc.prototype.enableTriangleFiltrate=function(e){e.enable?this.appendProgramDefine(e,!0,!1,D$V.TRIANGLE_FILTRATE):this.removeProgramDefine(e,!0,!1,D$V.TRIANGLE_FILTRATE)},_0x4881fc.prototype.enableClipFilt=function(e){e.enable?this.appendProgramDefine(e,!1,!0,D$V.CLIP_FILT_BY_ID):this.removeProgramDefine(e,!1,!0,D$V.CLIP_FILT_BY_ID)},_0x4881fc.prototype.enableFlood=function(e){this.appendProgramDefine(e,!0,!0,D$V.FLOOD_ANALYSIS)},_0x4881fc.prototype.disableFlood=function(e){this.removeProgramDefine(e,!0,!0,D$V.FLOOD_ANALYSIS)},_0x4881fc.prototype.emissionTextureUnitChange=function(e){e.enable?this.appendProgramDefine(e,!0,!1,D$V.SEC_TEX_EMISSION):this.removeProgramDefine(e,!0,!1,D$V.SEC_TEX_EMISSION)},_0x4881fc.prototype.pbrParameterChange=function(e){if(e.enable){this._materialUBO.valueDirty=!0,this._materialUBO.update(e.layer._context);var t=e.layer,i=(t._pbrParameter&Xe$e.ROUGHNESS)>0||t._PBRMaterialParams.loadingTexture,n=e$2e(t.themeStyle)&&e$2e(t.themeStyle.pbrMaterialIndex),r=[];if(i||n){r.push(D$V.BRDF);var o=e$2e(this._attributeLocations.aTexCoord0);n&&(r.push(D$V.PBR_THEME),r.push("NUM_PBR_MATERIALS "+t._frameState.pbrMaterialsArr.length)),e$2e(t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture instanceof t$U&&o&&r.push(D$V.HAS_BASE_TEXTURE),o&&e$2e(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect)&&e$2e(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wetnessFactor)&&e$2e(t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.rainEffect.rippleTexture instanceof t$U&&r.push(D$V.HAS_RAIN),o&&e$2e(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect)&&e$2e(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowMaskTexture instanceof t$U&&e$2e(t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snowNormalTexture instanceof t$U&&r.push(D$V.HAS_SNOW),(e$2e(this.materialPass)&&this.materialPass._metallicRoughnessTextureIndex>-1||e$2e(t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture instanceof t$U)&&o&&r.push(D$V.HAS_MetallicRoughness_TEXTURE),(e$2e(this.materialPass)&&this.materialPass._normalTextureIndex>-1||e$2e(t._PBRMaterialParams.pbrMetallicRoughness.normalTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.normalTexture instanceof t$U)&&o&&r.push(D$V.HAS_NORMAL_TEXTURE),(e$2e(this.materialPass)&&this.materialPass._occlusionTextureIndex>-1||e$2e(t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture)&&t._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture instanceof t$U)&&o&&r.push(D$V.HAS_OCCLUSION_TEXTURE),e$2e(this.materialPass)&&this.materialPass._emissiveTextureIndex>-1&&r.push(D$V.HAS_EMISSIVE_TEXTURE),e$2e(t._frameState.specularEnvironmentMaps)&&r.push(D$V.IBL),this.appendProgramDefinesForCommand(this._colorCommand,e,!1,!0,r,!0,!0)}else r=[D$V.BRDF,"NUM_PBR_MATERIALS "+t._frameState.pbrMaterialsArr.length,D$V.HAS_BASE_TEXTURE,D$V.HAS_NORMAL_TEXTURE,D$V.HAS_EMISSIVE_TEXTURE,D$V.IBL,D$V.HAS_MetallicRoughness_TEXTURE,D$V.HAS_SNOW,D$V.HAS_RAIN],this.removeProgramDefinesForCommand(this._colorCommand,e,!1,!0,r)}},_0x4881fc.prototype.enableFusionChange=function(e){e.enable?this.appendProgramDefine(e,!0,!1,D$V.FusionMode):this.removeProgramDefine(e,!0,!1,D$V.FusionMode)},_0x4881fc.prototype.appendProgramDefine=function(e,t,i,n,r,o){r=u$Z(r,!0),o=u$Z(o,!0),this.appendProgramDefineForCommand(this._colorCommand,e,t,i,n,r,o),this.appendProgramDefineForCommand(this._regularEdgeCommand,e,t,i,n,!1,o),this.appendProgramDefineForCommand(this._silhouetteEdgeCommand,e,t,i,n,!1,o),this.appendProgramDefineForCommand(this._wireFrameCommands.quad,e,!1,!0,n,!1,o),this.appendProgramDefineForCommand(this._wireFrameCommands.triangle,e,!1,!0,n,!1,o)},_0x4881fc.prototype.appendProgramDefineForCommand=function(e,t,i,n,r,o,a){if(o=u$Z(o,!0),a=u$Z(a,!0),e$2e(e)){l=t.layer._context,u=e.shaderProgram.fragmentShaderSource.clone(),c=e.shaderProgram.vertexShaderSource.clone();e$2e(u.name)||(u.name="fpCustomName"+t.layer.id),e$2e(c.name)||(c.name="vpCustomName"+t.layer.id),i&&_0xb28f92(c,r),n&&_0xb28f92(u,r);h=e.shaderProgram._attributeLocations;a&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());var s=r$14.fromCache({context:l,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h});o&&(this._sp=s),e.shaderProgram=s,e$2e(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x15e8bc(l,e.shaderProgram))}else if(o&&e$2e(this._sp)){var l=t.layer._context,u=this._sp.fragmentShaderSource.clone(),c=this._sp.vertexShaderSource.clone();e$2e(u.name)||(u.name="fpCustomName"+t.layer.id),e$2e(c.name)||(c.name="vpCustomName"+t.layer.id),i&&_0xb28f92(c,r),n&&_0xb28f92(u,r);var h=this._attributeLocations;this._sp.destroy(),this._sp=r$14.fromCache({context:l,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h})}},_0x4881fc.prototype.appendProgramDefinesForCommand=function(e,t,i,n,r,o,a){o=u$Z(o,!0),a=u$Z(a,!0);var s=t.layer._context;if(e$2e(e)){u=e.shaderProgram.fragmentShaderSource.clone(),c=e.shaderProgram.vertexShaderSource.clone();e$2e(u.name)||(u.name="fpCustomName"+t.layer.id),e$2e(c.name)||(c.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0xb28f92(c,e),n&&_0xb28f92(u,e)}));h=e.shaderProgram._attributeLocations;a&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());var l=r$14.fromCache({context:s,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h});o&&(this._sp=l),e.shaderProgram=l,e$2e(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x15e8bc(s,e.shaderProgram))}else if(o&&e$2e(this._sp)){var u=this._sp.fragmentShaderSource.clone(),c=this._sp.vertexShaderSource.clone();e$2e(u.name)||(u.name="fpCustomName"+t.layer.id),e$2e(c.name)||(c.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0xb28f92(c,e),n&&_0xb28f92(u,e)}));var h=this._attributeLocations;this._sp.destroy(),this._sp=r$14.fromCache({context:s,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:h})}},_0x4881fc.prototype.removeProgramDefine=function(e,t,i,n){this.removeProgramDefineForCommand(this._colorCommand,e,t,i,n),e$2e(this._regularEdgeCommand)&&this.removeProgramDefineForCommand(this._regularEdgeCommand,e,t,i,n,!1),e$2e(this._silhouetteEdgeCommand)&&this.removeProgramDefineForCommand(this._silhouetteEdgeCommand,e,t,i,n,!1),e$2e(this._wireFrameCommands.quad)&&this.removeProgramDefineForCommand(this._wireFrameCommands.quad,e,!1,!0,n,!1),e$2e(this._wireFrameCommands.triangle)&&this.removeProgramDefineForCommand(this._wireFrameCommands.triangle,e,!1,!0,n,!1)},_0x4881fc.prototype.removeProgramDefineForCommand=function(e,t,i,n,r,o){if(o=u$Z(o,!0),e$2e(e)){s=t.layer._context,l=e.shaderProgram.fragmentShaderSource.clone(),u=e.shaderProgram.vertexShaderSource.clone();e$2e(l.name)||(l.name="fpCustomName"+t.layer.id),e$2e(u.name)||(u.name="vpCustomName"+t.layer.id),i&&_0x2cb26f(u,r),n&&_0x2cb26f(l,r);c=e.shaderProgram._attributeLocations;e.shaderProgram.destroy();var a=r$14.fromCache({context:s,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c});e.shaderProgram=a,o&&(this._sp=a),e$2e(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x15e8bc(s,e.shaderProgram))}else if(o&&e$2e(this._sp)){var s=t.layer._context,l=this._sp.fragmentShaderSource.clone(),u=this._sp.vertexShaderSource.clone();e$2e(l.name)||(l.name="fpCustomName"+t.layer.id),e$2e(u.name)||(u.name="vpCustomName"+t.layer.id),i&&_0x2cb26f(u,r),n&&_0x2cb26f(l,r);var c=this._attributeLocations;this._sp.destroy(),this._sp=r$14.fromCache({context:s,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c})}},_0x4881fc.prototype.removeProgramDefinesForCommand=function(e,t,i,n,r,o){var a=t.layer._context;if(o=u$Z(o,!0),e$2e(e)){l=e.shaderProgram.fragmentShaderSource.clone(),u=e.shaderProgram.vertexShaderSource.clone();e$2e(l.name)||(l.name="fpCustomName"+t.layer.id),e$2e(u.name)||(u.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x2cb26f(u,e),n&&_0x2cb26f(l,e)}));c=e.shaderProgram._attributeLocations;e.shaderProgram.destroy();var s=r$14.fromCache({context:a,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c});e.shaderProgram=s,o&&(this._sp=s),e$2e(this._stencilCommand)&&(this._stencilCommand.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.stencil)&&(e.derivedCommands.stencil.shaderProgram=e.shaderProgram),e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.zback)&&(e.derivedCommands.zback.shaderProgram=_0x15e8bc(a,e.shaderProgram))}else if(o&&e$2e(this._sp)){var l=this._sp.fragmentShaderSource.clone(),u=this._sp.vertexShaderSource.clone();e$2e(l.name)||(l.name="fpCustomName"+t.layer.id),e$2e(u.name)||(u.name="vpCustomName"+t.layer.id),r.forEach((function(e){i&&_0x2cb26f(u,e),n&&_0x2cb26f(l,e)}));var c=this._attributeLocations;this._sp.destroy(),this._sp=r$14.fromCache({context:a,vertexShaderSource:u,fragmentShaderSource:l,attributeLocations:c})}},_0x4881fc.prototype.lightSourceChanged=function(e){if(e$2e(this._colorCommand)){var t=e.changedList,i=this._layer._scene._lightSource;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n],o=r.type,a=r.count;switch(o){case _0x4970c2.DIRECTIONAL:i.directionalLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_DIR_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_DIR_LIGHTS);break;case _0x4970c2.POINT:i.pointLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_POINT_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_POINT_LIGHTS);break;case _0x4970c2.SPOT:i.spotLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_SPOT_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_SPOT_LIGHTS);break;case _0x4970c2.HEMISPHERE:i.hemisphereLight.length>0&&a>0?this.appendProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_HEMISPHERE_LIGHTS):this.removeProgramDefineForCommand(this._colorCommand,e,!0,!0,D$V.HAS_HEMISPHERE_LIGHTS)}}}},_0x4881fc.prototype.enableCategoryVisible=function(e){this.appendProgramDefine(e,!0,!1,D$V.W_VISIBLE)},_0x4881fc.prototype.isDestroyed=function(){return!1},_0x4881fc.prototype.destroyScaleImagerys=function(){if(e$2e(this._scaleImagerys)){for(var e=0;e<this._scaleImagerys.length;e++){var t=this._scaleImagerys[e];if(e$2e(t))for(var i=0;i<t.length;i++)t[i].releaseReference()}this._scaleImagerys.length=0}},_0x4881fc.prototype.destroy=function(){var e=e$2e(this._layer.instanceSkeletonManager)&&"InstanceModel"===this._layer._dataType;if(e$2e(this._vertexPackage)&&e$2e(this._vertexPackage.vertexAttributes)&&!e)for(var t=this._vertexPackage.vertexAttributes,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.vertexBuffer)&&!r.vertexBuffer.isDestroyed()&&r.vertexBuffer.vertexArrayDestroyable&&!r.vertexBuffer.isDestroyed()&&r.vertexBuffer.destroy()}if(e$2e(this._arrIndexPackage)&&!e)for(i=0,n=this._arrIndexPackage.length;i<n;i++){var o=this._arrIndexPackage[i];e$2e(o.indexBuffer)&&!o.indexBuffer.isDestroyed()&&o.indexBuffer.destroy()}e$2e(this._wireFrameIndexBuffers)&&this._wireFrameIndexBuffers.destroy();var a=this._context,s=this._layer;if(s._isS3MBlock)for(var l in this._mapPass)this._mapPass.hasOwnProperty(l)&&s.materialManager.free(s,l);else for(var l in this._mapPass)if(this._mapPass.hasOwnProperty(l)){var u=this._mapPass[l];!u.isDestroyed()&&u.destroy()}if(this._mapPass=void 0,this._sp=void 0,this._instanceMode>0){if(e$2e(this._colorCommand)){var c=this._colorCommand;c.vertexArray=c.vertexArray&&!c.vertexArray.isDestroyed()&&c.vertexArray.destroy(),c.shaderProgram=c.shaderProgram&&!c.shaderProgram.isDestroyed()&&c.shaderProgram.destroy(),c.renderState=void 0,c.uniformMap=void 0,this._colorCommand=void 0}}else _0x3c43ee(a,this._colorCommand),this._colorCommand=void 0,this._wireFrameCommands.triangle&&_0x3c43ee(a,this._wireFrameCommands.triangle),this._wireFrameCommands.quad&&_0x3c43ee(this._wireFrameCommands.quad),this._wireFrameCommands={},_0x3c43ee(a,this._pickCommand),this._pickCommand=void 0,this._stencilCommand=void 0,_0x3c43ee(a,this._selectedStencilCommand),this._selectedStencilCommand=void 0,_0x3c43ee(a,this._selectedColorCommand),this._selectedColorCommand=void 0,_0x3c43ee(a,this._normalAndDepthCommand),this._normalAndDepthCommand=void 0,_0x3c43ee(a,this._postEffectCommand),this._postEffectCommand=void 0,_0x3c43ee(a,this._pickRectCommand),this._pickRectCommand=void 0,_0x3c43ee(a,this._clipCommand),this._clipCommand=void 0,_0x3c43ee(a,this._regularEdgeCommand),this._regularEdgeCommand=void 0,_0x3c43ee(a,this._silhouetteEdgeCommand),this._silhouetteEdgeCommand=void 0;if(this._clampColorCommand=void 0,this._clipStencilCommand=void 0,e$2e(this._selectionInforMap)&&this._selectionInforMap.removeAll(),this._vertexPackage=void 0,this._vertexColor=void 0,this._texCoord1=void 0,this._vertexColorInstance=void 0,this._arrIndexPackage=void 0,e$2e(this._volObj)&&(this._volObj=void 0),e$2e(this._volTexture)&&(this._volTexture=void 0),e$2e(this._symbolTextureUrl)&&_0x1451be.removeTexture(this._symbolTextureUrl),this._waterIndex,this.s3mbuffer&&(this.s3mbuffer=null),e$2e(this._batchTable)&&(this._batchTable=this._batchTable.destroy()),e$2e(this._imagerys)){for(var h=this._imagerys,d=(i=0,h.length);i<d;++i)h[i].releaseReference();this._imagerys.length=0}if(this.destroyScaleImagerys(),e$2e(this._plusRoArray)){for(i=0;i<this._plusRoArray.length;i++){var f=this._plusRoArray[i];if(e$2e(f))for(n=0;n<f.length;n++)f[n].shaderProgram.destroy(),f[n].uniformMap=void 0}this._plusRoArray.length=0}return this._vertexWeightBuffers.length=0,e$2e(this._meshUBO)&&(this._meshUBO.destroy(),this._meshUBO=null),e$2e(this._materialUBO)&&(this._materialUBO.destroy(),this._materialUBO=null),this._layer._totalMemoryUsageInBytes-=this._geometryByteLength,i$11(this)},_0x4881fc.prototype.createPickRectCommand=function(e){if(e$2e(this._colorCommand)&&!e$2e(this._pickRectCommand)&&"FresnelVp"!==this._colorCommand.shaderProgram.vertexShaderSource.name&&"FresnelFp"!==this._colorCommand.shaderProgram.fragmentShaderSource.name){var t=this._colorCommand.shaderProgram._useWGSL;if(e._selectUpdate){var i=e._context,n=new s$V({name:"S3MTilesRectSelection",sources:[t?_0xcc5af2:_0x4f0656],useWGSL:t}),r=this._colorCommand;if(!e$2e(r))return;var o=r.shaderProgram.vertexShaderSource.clone(),a=void 0;(a=i$$.shallowClone(r,a)).shaderProgram=r$14.fromCache({context:i,vertexShaderSource:o,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._pickRectCommand=a}}},_0x4881fc.prototype.prepareLabels=function(){if(!this._labelReady){var e=this._pickInfo,t=this._vertexPackage;if(e$2e(e)&&Object.keys(e).length===t.verticesCount&&"InstanceModel"!==this._layer._dataType){for(var i in e)!e.hasOwnProperty(i)||"0"===i||(this._pickIDArray.push(i),this._labelsCreated[i]=!1);this._layer._labelCollection;var n,r,o=new o$1p,a=t.vertexAttributes[0],s=a.componentsPerAttribute,l=e$2e(t.nCompressOptions)&&(t.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,u=1;if(e$2e(a.typedArray)){l?(u=t.vertCompressConstant,n=new o$1p(t.minVerticesValue.x,t.minVerticesValue.y,t.minVerticesValue.z),r=new Uint16Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/2)):r=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var c=this._matModel,h=0;h<t.verticesCount;h++)o$1p.fromArray(r,s*h,o),l&&(o=o$1p.multiplyByScalar(o,u,o),o=o$1p.add(o,n,o)),p$1d.multiplyByPoint(c,o,o),this._labelPosArray.push(o$1p.clone(o));this._labelTextArray=new Array(this._labelPosArray.length),this._labelReady=!0}}}},_0x4881fc.prototype.isNoExistAllLabels=function(){var e=this._layer._labelCollection;if(0===e._labels.length)return!0;for(var t=!0,i=0;i<this._labelPosArray.length;i++){var n=this._pickIDArray[i];if(e._labelsID.hasOwnProperty(n)){t=!1;break}}return t};var _0x198196=new o$1o;_0x4881fc.prototype.updateLabels=function(e){if(e.camera,this.isNoExistAllLabels()&&e$2e(this._labelIndexs)&&Object.keys(this._labelIndexs).length>0&&(this._labelIndexs={}),e$2e(this._layer._layerScheduler._indexedDBScheduler)&&0!==this._pickIDArray.length&&0!==this._labelPosArray.length&&!(this._labelPosArray.length<=Object.keys(this._labelIndexs).length)){var t=this._layer,i=t._labelCollection,n=[],r=t._iconCollection,o=[],a=k$R.RELATIVE_TO_GROUND;if(t.showIcon){if(!e$2e(t.style3D)||!t.style3D.imageReady)return;a=t.style3D.altitudeMode,t._showLabel&&(_0x198196.y=-t.style3D.image.height/2,a=t._s3MTilesLabelStyle.heightReference)}t._s3MTilesLabelStyle._textField;for(var s=0;s<this._labelPosArray.length;s++){var l=this._pickIDArray[s];if(l=Number(l),this._labelsCreated[l]){var u=this._labelPosArray[s],c=this._labelTextArray[s];if(i.containsLabel(l))this._labelIndexs.hasOwnProperty(l)||(this._labelIndexs[l]=!0);else{var h=r.add({position:u,id:l,image:t.style3D.image,billboardStyle:t.style3D,heightReference:a,show:!0});o.push(h._index);var d=i.add({position:u,id:l,text:c,s3MTilesLabelStyle:t._s3MTilesLabelStyle,pixelOffset:_0x198196,show:!1});n.push(d._index)}}else _0x13e4b7(t,l,this,s)}for(var f=0,p=n.length;f<p;f++)this._labelIndexs[l]=!0}},_0x4881fc.prototype.pushCommandsForPickRectBuffer=function(e,t){"FresnelVp"===this._colorCommand.shaderProgram.vertexShaderSource.name||"FresnelFp"===this._colorCommand.shaderProgram.fragmentShaderSource.name||!e$2e(this._pickRectCommand)||t.push(this._pickRectCommand)},_0x4881fc.prototype.pushCommandsForSpatialQueryBuffer=function(e,t,i){if(e._spatialQueryEnable&&"FresnelVp"!==this._colorCommand.shaderProgram.vertexShaderSource.name&&"FresnelFp"!==this._colorCommand.shaderProgram.fragmentShaderSource.name){if(!e$2e(this._spatialQueryCommand)){var n=this._colorCommand,r=n.shaderProgram.vertexShaderSource.clone();r.defines.push("SQRESULT");var o=new s$V({name:"SpatialQueryFp",sources:[r.useWGSL?_0xaa057c:_0x12eef8],useWGSL:r.useWGSL});o.defines.push("SQRESULT");var a=i$$.shallowClone(n);a.uniformMap.uTransparentFilter=function(){return e.selectionFiltrateByTransparency},a.uniformMap.uFrontDepthTexture=function(){return e._sqTextures[0]},a.uniformMap.uBackDepthTexture=function(){return e._sqTextures[1]},a.uniformMap.uFrontColorTexture=function(){return e._sqTextures[2]},a.uniformMap.uSQMode=function(){return e._sqMode};var s=new p$1d,l=this._matModel;a.uniformMap.uSQViewProj=function(){var t=new p$1d;return p$1d.multiply(e._sqViewMatirx,l,t),p$1d.multiply(e._sqPrjMatirx,t,s),s},a.shaderProgram=r$14.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),this._spatialQueryCommand=a,a.owner="sqResultTexture"}t.push(this._spatialQueryCommand)}},_0x4881fc.prototype.pushCommandsForRasterHeightMap=function(e,t,i){if(e$2e(this._colorCommand)){if(!e$2e(this._rasterHeightCommand)){var n=i$$.shallowClone(this._colorCommand,new i$$),r=this._colorCommand.shaderProgram.vertexShaderSource.clone(),o=this._colorCommand.shaderProgram.fragmentShaderSource.clone();r.defines.push("Height_Map"),o.defines.push("Height_Map"),r.defines.push("COMPUTE_W_VALUE"),o.defines.push("COMPUTE_W_VALUE"),n.shaderProgram=r$14.fromCache({context:e.context,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),this._rasterHeightCommand=n}i.push(this._rasterHeightCommand)}},_0x4881fc.prototype.setImagerys=function(e,t){if(this._cartographic=t,this._imagerys=e,e$2e(e))if(e$2e(this._sp)){for(var i=this._sp.fragmentShaderSource,n=-1,r=0;r<i.defines.length;r++)if(i.defines[r].includes("TEXTURE_UNITS")){n=r;break}n<0&&this._imagerys.length>0||e$2e(this._dayTextures)&&e.length>this._dayTextures.length||!e$2e(this._dayTextures)?this._refreshImageryShader():this._computeImageryParameter(this._layer)}else this._computeImageryParameter(this._layer)},_0x4881fc.prototype.hasScaleImagerys=function(e){return e$2e(this._scaleImagerys[e-1])},_0x4881fc.prototype.setScaleImagerys=function(e,t){!e$2e(e)||t<1||(this._scaleImagerys[t-1]=e)},_0x4881fc.prototype.resetScaleImagerys=function(e,t){if(this._imageRasterFinish&&e$2e(this._sp)){if(this._scaleImagerys.length>e){for(var i=e;i<this._scaleImagerys.length;i++){if(e$2e(a=this._scaleImagerys[i]))for(var n=0;n<a.length;n++)a[n].releaseReference()}this._scaleImagerys.length=e}if(this._plusRoArray.length>e){for(i=e;i<this._plusRoArray.length;i++){if(e$2e(H=this._plusRoArray[i]))for(n=0;n<H.length;n++)H[n].uniformMap=void 0,H[n].shaderProgram.destroy()}this._plusRoArray.length=e}var r=void 0;for(i=0;i<this._scaleImagerys.length;i++){if(e$2e(a=this._scaleImagerys[i])){var o=!0;for(n=0;n<a.length;n++)a[n].processStateMachine(t,!1),a[n]instanceof _0x2415f5?a[n].state===wt$7.RENDERED||a[n].state===wt$7.READY||a[n].state===wt$7.FAILED||(o=!1):a[n].state<wt$7.TEXTURE_LOADED&&(o=!1);o&&(r=i)}}if(r!=this._visibleScaleImageryIndex){var a=void 0;if(e$2e(r)&&(a=this._scaleImagerys[r]),e$2e(r)&&e$2e(a)&&a.length>0){if(this._visibleScaleImageryIndex=r,!e$2e(this._plusRoArray[r])){var s=this._layer,l=this._sp.fragmentShaderSource.clone();for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("GRIDTEXTURE_UNITS")){l.defines.splice(i,1);break}for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("TEXTURE_UNITS")){l.defines.splice(i,1);break}for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("APPLY_ALPHA")){l.defines.splice(i,1);break}for(i=0;i<l.sources.length;i++)if(l.sources[i].includes("czm_sampleAndBlend")){l.sources.splice(i,1);break}var u=this._sp.vertexShaderSource.clone(),c=!1;for(i=0;i<u.defines.length;i++)if(u.defines[i].includes("IMAGERY")){c=!0;break}c||u.defines.push("IMAGERY");for(var h=0,d=a.length,f=0;d>0;){var p,_=d;p=0===(d-=_=Math.min(_,e$1W._maximumTextureImageUnits-2))?l:l.clone(),h>0&&p.defines.push("MULTIBATCH");var m=[],g=[],x=[],y=[],v=[],$=[],b=[],T=[],C=!1;e$2e(_0xcfbbe9)||(_0xcfbbe9=new h$18),_0xcfbbe9.west=this._cartographic.min.longitude,_0xcfbbe9.east=this._cartographic.max.longitude,_0xcfbbe9.north=this._cartographic.max.latitude,_0xcfbbe9.south=this._cartographic.min.latitude,this._imageryTextureBound.x=this._cartographic.max.longitude-this._cartographic.min.longitude,this._imageryTextureBound.y=this._cartographic.max.latitude-this._cartographic.min.latitude;for(i=0;i<_;i++){var S=a[f+i],w=S.imageryLayer,E=w._imageryProvider.tilingScheme.projection instanceof t$N&&_0xcfbbe9.north<t$N.MaximumLatitude&&_0xcfbbe9.south>-t$N.MaximumLatitude;g.push(E);var P=E?S.textureWebMercator:S.texture;e$2e(P)||(P=s._context.defaultTransparentTexture),m.push(P);var A=u$Z(w._imageryProvider.flipY,!1);b.push(A);var L=this._calculateTextureTranslationAndScale(_0xcfbbe9,S.rectangle,E,w._imageryProvider._tilingScheme),M=this._calculateTextureTexCoordsRectangle(_0xcfbbe9,S.rectangle,E,w._imageryProvider._tilingScheme);x.push(M),y.push(L);var R=new e$2c;R.x=w.transparentBackColor.red,R.y=w.transparentBackColor.green,R.z=w.transparentBackColor.blue,R.w=w.transparentBackColorTolerance,v.push(R),$.push(w.enableImageryClip),T.push(w.alpha),C=C||w.alpha<.999}f+=_;var O="",D="";(I=!1)&&(D="APPLY_IMAGERY_CUTOUT");var I,B=[],F={mixIndex:!0,mixDirection:0},N="#ifdef IMAGERY\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\nvec4 color = initialColor;\n";N+="vec2 realTextureCoord;\nvec4 currentTextureColor;\n",(I=!1)&&(N+="vec4 cutoutAndColorResult;\nbool texelUnclipped;\n");for(i=0;i<_;++i){if(N+="realTextureCoord = computeTextureCoord(\n",N+="u_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTranslationAndScale["+i+"],\nu_dayTextureSize["+i+"],\nu_dayTextureFlipY["+i+"]);\ncurrentTextureColor = texture2D(u_dayTextures["+i+"], realTextureCoord);\n\n",e$2e(z=_0xc579c6(B,i)))(U=i+1)==_&&(U=i),N+="color = mvtTextureSampleAndBlend(\ncolor,\nu_dayTextures["+i+"],\nu_dayTextures["+U+"],\nu_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTexCoordsRectangle["+i+"],\nu_dayTextureTranslationAndScale["+i+"],\n"+converColorToVec4(z)+",\n"+(this._applyAlpha?"u_dayTextureAlpha["+i+"]":"1.0")+",\n0.0,\nvec4(0.0,0.0,0.0,0.0)\n);\n",i++;else N+=I?"cutoutAndColorResult = u_dayTextureCutoutRectangles["+i+"];\ntexelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\ncutoutAndColorResult = czm_sampleAndBlend(\n":i===F.mixIndex&&F.mixDirection>0?"color = sampleAndBlendParent(\n":"color = czm_sampleAndBlend(\n",N+="currentTextureColor,\ncolor,\nu_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTexCoordsRectangle["+i+"],\nu_transparentBackColor["+i+"],\nu_imageryClipEnable["+i+"],\n"+(this._applyAlpha?"u_dayTextureAlpha["+i+"]":"1.0")+",\n0.0,\n0.0,\n0.0,\n0.0,\n0.0,\nvec2(0.0,0.0),\nvec4(0.0,0.0,0.0,0.0)\n);\n",I&&(N+="color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(i=0;i<0;++i)N+="color = gridTextureSampleAndBlend(\ncolor,\nu_gridTextures["+i+"],\nu_gridTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_gridTextureTexCoordsRectangle["+i+"],\nu_gridTextureTranslationAndScale["+i+"]);\n";if(N+="return color;\n}\n#endif",this._context.webgpu){var G=" #ifdef IMAGERY\n fn computeDayColor(initialColor : vec4<f32>, textureCoordinates : vec3<f32>) -> vec4<f32>\n {\n var color : vec4<f32> = initialColor;\n";G+=" var realTextureCoord : vec2<f32>;\n var currentTextureColor : vec4<f32>;\n",I&&(G+=" var cutoutAndColorResult : vec4<f32>;\n var texelUnclipped : bool;\n");for(i=0;i<_;++i){var z,U;if(G+=" realTextureCoord = computeTextureCoord(\n",G+=" select(textureCoordinates.xy, textureCoordinates.xz, vec2<bool>(bool(uniforms.u_dayTextureUseWebMercatorT["+i+"]))),\n uniforms.u_dayTextureTranslationAndScale["+i+"],\n uniforms.u_dayTextureSize["+i+"],\n bool(uniforms.u_dayTextureFlipY["+i+"]));\n currentTextureColor = textureSample(u_dayTextures"+i+", u_dayTexturesSampler, realTextureCoord);\n \n",e$2e(z=_0xc579c6(B,i)))(U=i+1)==_&&(U=i),G+=" color = mvtTextureSampleAndBlend(\n color,\n u_dayTextures["+i+"],\n u_dayTextures["+U+"],\n u_dayTextureUseWebMercatorT["+i+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+i+"],\n u_dayTextureTranslationAndScale["+i+"],\n "+converColorToVec4(z)+",\n "+(this._applyAlpha?"u_dayTextureAlpha["+i+"]":"1.0")+",\n 0.0,\n vec4(0.0,0.0,0.0,0.0)\n );\n",i++;else G+=I?" cutoutAndColorResult = uniforms.u_dayTextureCutoutRectangles["+i+"];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = czm_sampleAndBlend(\n":i===F.mixIndex&&F.mixDirection>0?" color = sampleAndBlendParent(\n":" color = czm_sampleAndBlend(\n",G+=" currentTextureColor,\n color,\n select(textureCoordinates.xy, textureCoordinates.xz, vec2<bool>(bool(uniforms.u_dayTextureUseWebMercatorT["+i+"]))),\n uniforms.u_dayTextureTexCoordsRectangle["+i+"],\n uniforms.u_transparentBackColor["+i+"],\n bool(uniforms.u_imageryClipEnable["+i+"]),\n "+(this._applyAlpha?"uniforms.u_dayTextureAlpha["+i+"]":"1.0")+",\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n vec2(0.0,0.0),\n vec4(0.0,0.0,0.0,0.0)\n );\n",I&&(G+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(i=0;i<0;++i)G+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+i+"],\n select(textureCoordinates.xy, textureCoordinates.xz, u_dayTextureUseWebMercatorT["+i+"]),\n u_gridTextureTexCoordsRectangle["+i+"],\n u_gridTextureTranslationAndScale["+i+"]);\n";G+=" return color;\n }\n #endif ",p.sources.unshift(G)}else p.sources.push(N);for(c=!1,i=0;i<p.defines.length;i++)if(p.defines[i].includes("IMAGERY")){c=!0;break}c||p.defines.push("IMAGERY"),this._applyAlpha&&p.defines.push("APPLY_ALPHA"),p.defines.push("TEXTURE_UNITS "+_),""!=O&&p.defines.push(O),""!=D&&p.defines.push(D),p.defines.push("GRIDTEXTURE_UNITS 0");var V=this._sp._attributeLocations,k=r$14.fromCache({context:s._context,vertexShaderSource:u,fragmentShaderSource:p,attributeLocations:V}),W=this;(function(e){var t=l$1f(W._colorCommand._uniformMap),i=W._plusRoArray;t.u_dayTextures=function(){return i[r][e].dayTextures},t.u_dayTextureUseWebMercatorT=function(){return W._context.webgpu&&(W._dayTextures=i[r][e].dayTextures,W._materialUBO._isValueDirty=!0,W._materialUBO.update(s._context)),i[r][e].dayTextureUseWebMercatorT},t.u_dayTextureTexCoordsRectangle=function(){return i[r][e].dayTextureTexCoordsRectangle},t.u_dayTextureTranslationAndScale=function(){return i[r][e].dayTextureTranslationAndScale},t.u_transparentBackColor=function(){return i[r][e].transparentBackColor},t.u_imageryClipEnable=function(){return i[r][e].imageryClipEnable},t.u_dayTextureFlipY=function(){return i[r][e].dayTextureFlipY},t.u_dayTextureAlpha=function(){return i[r][e].dayTextureAlpha};var n=i$$.shallowClone(W._colorCommand);n.shaderProgram=k,n._uniformMap=t;var o={command:n,shaderProgram:k,uniformMap:t,dayTextures:m,dayTextureUseWebMercatorT:g,dayTextureTexCoordsRectangle:x,dayTextureTranslationAndScale:y,transparentBackColor:R,imageryClipEnable:$,dayTextureFlipY:b,dayTextureAlpha:T};e$2e(W._plusRoArray[r])||(W._plusRoArray[r]=[]),W._plusRoArray[r].push(o)})(h),h+=1}}}else{this._visibleScaleImageryIndex=void 0;for(i=0;i<this._plusRoArray.length;i++){var H;if(e$2e(H=this._plusRoArray[i]))for(n=0;n<H.length;n++)H[n].shaderProgram.destroy(),H[n].uniformMap=void 0}this._plusRoArray=[];l=this._sp.fragmentShaderSource;var q=-1;for(i=0;i<l.defines.length;i++)if(l.defines[i].includes("TEXTURE_UNITS")){q=i;break}q<0&&this._imagerys.length>0||e$2e(this._dayTextures)&&this._imagerys.length>this._dayTextures.length||!e$2e(this._dayTextures)?this._refreshImageryShader():this._computeImageryParameter(this._layer)}}}};var _0x1812a6=new o$1p,_0x469234=new o$1p,_0x33eeb9=new o$1p;_0x4881fc.prototype.setRealtimeRasterCamera=function(e,t){var i=f$1a.clone(t.context.uniformState._viewport);this._imageryTextureBound.x=e.max.longitude-e.min.longitude,this._imageryTextureBound.y=e.max.latitude-e.min.latitude;var n=e$2d.toDegrees(e.min.longitude),r=e$2d.toDegrees(e.max.longitude),o=e$2d.toDegrees(e.max.latitude),a=e$2d.toDegrees(e.min.latitude),s=r-n,l=o-a,u=t.camera,c=u.frustum.clipPlane;1===t._fboState.frameBufferType&&u.disableReflection(),o$1p.clone(u.position,_0x1812a6),o$1p.clone(u.direction,_0x469234),o$1p.clone(u.up,_0x33eeb9);var h=u._scene._mode;u._mode=C$14.SCENE3D,u._scene._mode=C$14.SCENE3D,u.setView({destination:new o$1p(.5*(n+r),.5*(o+a),50),orientation:{direction:new o$1p(0,0,-1),up:new o$1p(0,1,0)},convert:!1}),u._mode=h,u._scene._mode=h;var d=new a$V({width:s,aspectRatio:s/l,near:1,far:100});return t.context.uniformState.update(t),t.context.uniformState.updateFrustum(d),{position:_0x1812a6,direction:_0x469234,upDirection:_0x33eeb9,viewport:i,waterPlane:c}},_0x4881fc.prototype.resetCamera=function(e,t){var i=t.camera;1===t._fboState.frameBufferType&&e.waterPlane&&i.enableReflection(e.waterPlane),i.setView({destination:e.position,orientation:{direction:e.direction,up:e.upDirection},convert:!1}),t.context.uniformState.update(t),t.context.uniformState.updateFrustum(i.frustum),t.context.uniformState.viewport=e.viewport},_0x4881fc.prototype.isImageryLoaded=function(e){for(var t=!0,i=this._imagerys.length,n=0;n<i;n++)this._imagerys[n]instanceof _0x2415f5?this._imagerys[n].state===wt$7.RENDERED||this._imagerys[n].state===wt$7.READY||this._imagerys[n].state===wt$7.FAILED||(t=!1):this._imagerys[n].state<wt$7.TEXTURE_LOADED&&(t=!1);return t},_0x4881fc.prototype.updateImageryTexture=function(e,t){if(this.isImageryLoaded(t)){for(var i=[],n=0;n<this._imagerys.length;n++)e$2e(this._imagerys[n].texture)&&i.push(this._imagerys[n]);i.length>0&&(this._imageRasterFinish=!0,this._computeImageryParameter(e))}else{this._imageryLevels.length!=this._imagerys.length&&(this._imageryLevels.length=this._imagerys.length);i=[];var r=[];for(n=0;n<this._imagerys.length;n++){for(var o=this._imagerys[n],a=o.rectangle;o.state!=wt$7.READY&&e$2e(o.parent)&&o.imageryLayer._imageryProvider.minimumLevel<o.level;)o=o.parent;e$2e(o.texture)&&o.state==wt$7.READY&&(i.push(o),r.push(a))}var s=!1;if(i.length==this._imagerys.length)for(n=0;n<i.length;n++)i[n].level!=this._imageryLevels[n]&&(s=!0,this._imageryLevels[n]=i[n].level);s&&i.length>0&&this._computeImageryParameter(e,i,r)}},_0x4881fc.prototype.convertToInstanceBillboardPoint=function(){const e=this._vertexPackage,t=e.vertexAttributes;for(var i=0;i<t.length;i++)t[i].instanceDivisor=1;e.attrLocation.offset=e.vertexAttributes.length,e.vertexAttributes.push({name:"offset",index:e.vertexAttributes.length,componentDatatype:S$14.FLOAT,componentsPerAttribute:2,vertexBuffer:this._context.createBillboardOffsetVertexBuffer(),normalize:!1,offsetInBytes:0,strideInBytes:8});const n=new Uint16Array([0,1,2,0,2,3]),r=this._arrIndexPackage;for(i=0;i<r.length;i++)r[i].indicesTypedArray=n},_0x4881fc.prototype.isBillboardPoint=function(e){const t=e|this._fileType,i=this._arrIndexPackage[0];return this._context.webgpu&&(i&&1===i.primitiveType||t==p$T.PointCloudFile)};var _0x1ad686=new h$18,_0x312651=new h$18;_0x4881fc.prototype._calculateTextureTranslationAndScale=function(e,t,i,n){var r=t,o=e;i&&(r=n.rectangleToNativeRectangle(r,_0x1ad686),o=n.rectangleToNativeRectangle(o,_0x312651));var a=o.width,s=o.height,l=a/r.width,u=s/r.height;return new e$2c(l*(o.west-r.west)/a,u*(o.south-r.south)/s,l,u)},_0x4881fc.prototype._calculateTextureTexCoordsRectangle=function(e,t,i,n){var r=t,o=e;i&&(r=n.rectangleToNativeRectangle(r,_0x1ad686),o=n.rectangleToNativeRectangle(o,_0x312651));var a=o.width,s=o.height;return new e$2c((r.west-o.west)/a,(r.south-o.south)/s,(r.east-o.west)/a,(r.north-o.south)/s)};var _0xcfbbe9=void 0,_0xd953f1=new e$2c;function _0xc579c6(e,t){if(!e$2e(e)||0==e.length)return null;for(var i=e.length,n=0;n<i;n++)if(e[n].textureIndex===t)return e[n].selectColor;return null}_0x4881fc.prototype._computeImageryParameter=function(e,t,i){var n=t;e$2e(n)||(n=this._imagerys);var r=0;e$2e(this._dayTextures)&&this._dayTextures.length>0&&(r=this._dayTextures.length-n.length),this._dayTextures=[],this._dayTextureUseWebMercatorT=[],this._dayTextureTexCoordsRectangle=[],this._dayTextureTranslationAndScale=[],this._transparentBackColor=[],this._imageryClipEnable=[],this._dayTextureFlipY=[],this._dayTextureAlpha=[],this._applyAlpha=!1,e$2e(_0xcfbbe9)||(_0xcfbbe9=new h$18),_0xcfbbe9.west=this._cartographic.min.longitude,_0xcfbbe9.east=this._cartographic.max.longitude,_0xcfbbe9.north=this._cartographic.max.latitude,_0xcfbbe9.south=this._cartographic.min.latitude,this._imageryTextureBound.x=this._cartographic.max.longitude-this._cartographic.min.longitude,this._imageryTextureBound.y=this._cartographic.max.latitude-this._cartographic.min.latitude;for(var o=0;o<n.length;o++){var a=n[o].imageryLayer,s=a._imageryProvider.tilingScheme.projection instanceof t$N&&_0xcfbbe9.north<t$N.MaximumLatitude&&_0xcfbbe9.south>-t$N.MaximumLatitude;this._dayTextureUseWebMercatorT.push(s);var l=s?n[o].textureWebMercator:n[o].texture;(!e$2e(l)||n[o]instanceof _0x2415f5&&n[o].state!==wt$7.READY)&&(l=e._context.defaultTransparentTexture),this._dayTextures.push(l);var u=u$Z(a._imageryProvider.flipY,!1);this._dayTextureFlipY.push(u);var c,h=this._calculateTextureTranslationAndScale(_0xcfbbe9,n[o].rectangle,s,a._imageryProvider._tilingScheme);c=e$2e(i)?this._calculateTextureTexCoordsRectangle(_0xcfbbe9,i[o],s,a._imageryProvider._tilingScheme):this._calculateTextureTexCoordsRectangle(_0xcfbbe9,n[o].rectangle,s,a._imageryProvider._tilingScheme),this._dayTextureTexCoordsRectangle.push(c),this._dayTextureTranslationAndScale.push(h);var d=new e$2c;d.x=a.transparentBackColor.red,d.y=a.transparentBackColor.green,d.z=a.transparentBackColor.blue,d.w=a.transparentBackColorTolerance,this._transparentBackColor.push(d),this._imageryClipEnable.push(a.enableImageryClip),this._dayTextureAlpha.push(a.alpha),this._applyAlpha=this._applyAlpha||a.alpha<.999}if(r>0)for(o=0;o<r;o++)this._dayTextures.push(e._context.defaultTransparentTexture),this._dayTextureUseWebMercatorT.push(!1),this._dayTextureTexCoordsRectangle.push(_0xd953f1),this._dayTextureTranslationAndScale.push(_0xd953f1),this._transparentBackColor.push(_0xd953f1),this._imageryClipEnable.push(!1),this._dayTextureFlipY.push(!1),this._dayTextureAlpha.push(1);this._context.webgpu&&(this._materialUBO._isValueDirty=!0,this._materialUBO.update(this._context))},_0x4881fc.prototype._createImageryShader=function(e,t){if(e$2e(this._imagerys)&&this._imagerys.length>0){this._computeImageryParameter(e);var i="",n="";(o=!1)&&(n="APPLY_IMAGERY_CUTOUT");var r=this._imagerys.length;r=Math.min(r,e$1W._maximumTextureImageUnits-2);var o,a=[],s={mixIndex:!0,mixDirection:0},l="#ifdef IMAGERY\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\n vec4 color = initialColor;\n";l+=" vec2 realTextureCoord;\n vec4 currentTextureColor;\n",(o=!1)&&(l+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(var u=0;u<r;++u){if(l+="realTextureCoord = computeTextureCoord(\n",l+="u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTranslationAndScale["+u+"],\nu_dayTextureSize["+u+"],\nu_dayTextureFlipY["+u+"]);\ncurrentTextureColor = texture2D(u_dayTextures["+u+"], realTextureCoord);\n\n",e$2e(h=_0xc579c6(a,u)))(d=u+1)==r&&(d=u),l+=" color = mvtTextureSampleAndBlend(\n color,\n u_dayTextures["+u+"],\n u_dayTextures["+d+"],\n u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+u+"],\n u_dayTextureTranslationAndScale["+u+"],\n "+converColorToVec4(h)+",\n "+(this._applyAlpha?"u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n vec4(0.0,0.0,0.0,0.0)\n );\n",u++;else l+=o?" cutoutAndColorResult = u_dayTextureCutoutRectangles["+u+"];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = czm_sampleAndBlend(\n":u===s.mixIndex&&s.mixDirection>0?" color = sampleAndBlendParent(\n":" color = czm_sampleAndBlend(\n",l+=" currentTextureColor,\n color,\n u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+u+"],\n u_transparentBackColor["+u+"],\n u_imageryClipEnable["+u+"],\n "+(this._applyAlpha?"u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n vec2(0.0,0.0),\n vec4(0.0,0.0,0.0,0.0)\n );\n",o&&(l+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(u=0;u<0;++u)l+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+u+"],\n u_gridTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_gridTextureTexCoordsRectangle["+u+"],\n u_gridTextureTranslationAndScale["+u+"]);\n";if(l+=" return color;\n}\n#endif",this._context.webgpu){var c=" #ifdef IMAGERY\n fn computeDayColor(initialColor : vec4<f32>, textureCoordinates : vec3<f32>) -> vec4<f32>\n {\n var color : vec4<f32> = initialColor;\n";c+=" var realTextureCoord : vec2<f32>;\n var currentTextureColor : vec4<f32>;\n",o&&(c+=" var cutoutAndColorResult : vec4<f32>;\n var texelUnclipped : bool;\n");for(u=0;u<r;++u){var h,d;if(c+=" realTextureCoord = computeTextureCoord(\n",c+=" select(textureCoordinates.xy, textureCoordinates.xz, vec2<bool>(bool(uniforms.u_dayTextureUseWebMercatorT["+u+"]))),\n uniforms.u_dayTextureTranslationAndScale["+u+"],\n uniforms.u_dayTextureSize["+u+"],\n bool(uniforms.u_dayTextureFlipY["+u+"]));\n currentTextureColor = textureSample(u_dayTextures"+u+", u_dayTexturesSampler, realTextureCoord);\n \n",e$2e(h=_0xc579c6(a,u)))(d=u+1)==r&&(d=u),c+=" color = mvtTextureSampleAndBlend(\n color,\n u_dayTextures["+u+"],\n u_dayTextures["+d+"],\n u_dayTextureUseWebMercatorT["+u+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+u+"],\n u_dayTextureTranslationAndScale["+u+"],\n "+converColorToVec4(h)+",\n "+(this._applyAlpha?"u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n vec4(0.0,0.0,0.0,0.0)\n );\n",u++;else c+=o?" cutoutAndColorResult = uniforms.u_dayTextureCutoutRectangles["+u+"];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = czm_sampleAndBlend(\n":u===s.mixIndex&&s.mixDirection>0?" color = sampleAndBlendParent(\n":" color = czm_sampleAndBlend(\n",c+=" currentTextureColor,\n color,\n select(textureCoordinates.xy, textureCoordinates.xz, vec2<bool>(bool(uniforms.u_dayTextureUseWebMercatorT["+u+"]))),\n uniforms.u_dayTextureTexCoordsRectangle["+u+"],\n uniforms.u_transparentBackColor["+u+"],\n bool(uniforms.u_imageryClipEnable["+u+"]),\n "+(this._applyAlpha?"uniforms.u_dayTextureAlpha["+u+"]":"1.0")+",\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n vec2(0.0,0.0),\n vec4(0.0,0.0,0.0,0.0)\n );\n",o&&(c+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n")}for(u=0;u<0;++u)c+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+u+"],\n select(textureCoordinates.xy, textureCoordinates.xz, u_dayTextureUseWebMercatorT["+u+"]),\n u_gridTextureTexCoordsRectangle["+u+"],\n u_gridTextureTranslationAndScale["+u+"]);\n";c+=" return color;\n }\n #endif ",t.sources.unshift(c)}else t.sources.push(l);var f=!1;for(u=0;u<t.defines.length;u++)if(t.defines[u].includes("IMAGERY")){f=!0;break}f||t.defines.push("IMAGERY"),this._applyAlpha&&t.defines.push("APPLY_ALPHA"),t.defines.push("TEXTURE_UNITS "+r),""!=i&&t.defines.push(i),""!=n&&t.defines.push(n),t.defines.push("GRIDTEXTURE_UNITS 0")}},_0x4881fc.prototype._refreshImageryShader=function(){for(var e=this._layer,t=this._sp.fragmentShaderSource.clone(),i=this._sp.vertexShaderSource.clone(),n=0;n<t.defines.length;n++)if(t.defines[n].includes("GRIDTEXTURE_UNITS")){t.defines.splice(n,1);break}for(n=0;n<t.defines.length;n++)if(t.defines[n].includes("TEXTURE_UNITS")){t.defines.splice(n,1);break}for(n=0;n<t.defines.length;n++)if(t.defines[n].includes("APPLY_ALPHA")){t.defines.splice(n,1);break}for(n=0;n<t.sources.length;n++)if(t.sources[n].includes("czm_sampleAndBlend")){t.sources.splice(n,1);break}this._createImageryShader(e,t);var r=!1;for(n=0;n<i.defines.length;n++)if(i.defines[n].includes("IMAGERY")){r=!0;break}r||i.defines.push("IMAGERY");var o=this._sp._attributeLocations;this._sp=this._sp&&this._sp.destroy();var a=r$14.fromCache({context:e._context,vertexShaderSource:i,fragmentShaderSource:t,attributeLocations:o});this._sp=a,e$2e(this._colorCommand)&&(this._colorCommand.shaderProgram=a)};var _0x1b3e66=(_0x3b35a0=!0,function(e,t){var i=_0x3b35a0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b35a0=!1,i}),_0x17f2d3=_0x1b3e66(void 0,(function(){return _0x17f2d3.toString().search("(((.+)+)+)+$").toString().constructor(_0x17f2d3).search("(((.+)+)+)+$")})),_0x3b35a0;function _0x3ad44f(){}function _0x29cef1(e){var t=new i$1d,i=e.instanceBounds;if(!e$2e(i))return t;var n=new o$1p(i[0],i[1],i[2]),r=new o$1p(i[3],i[4],i[5]),o=o$1p.lerp(n,r,.5,new o$1p),a=o$1p.distance(o,n);return t.center=o,t.radius=a,t}function _0x318266(e){var t,i,n=new i$1d,r=new o$1p,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,l=1;s?(l=e.vertCompressConstant,t=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),i=new Uint16Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/2)):i=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var u=[],c=0;c<e.verticesCount;c++)o$1p.fromArray(i,a*c,r),s&&(r=o$1p.multiplyByScalar(r,l,r),r=o$1p.add(r,t,r)),u.push(o$1p.clone(r));return i$1d.fromPoints(u,n),u.length=0,n}function _0x1bbafd(e){var t,i,n=new i$1d,r=new o$1p,o=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,a=e.vertexAttributes[0],s=a.componentsPerAttribute,l=1;o?(l=e.vertCompressConstant,i=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),t=new Uint16Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/2)):t=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var u=[],c=0;c<e.verticesCount;c++)o$1p.fromArray(t,s*c,r),o&&(r=o$1p.multiplyByScalar(r,l,r),r=o$1p.add(r,i,r)),u.push(o$1p.clone(r));return i$1d.fromPoints(u,n),u.length=0,n}function _0x9da2f5(e){var t,i,n=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,r=new f$1a,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=1;n?(s=e.vertCompressConstant,i=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),t=new Uint16Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/2)):t=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);for(var l=[],u=0;u<e.verticesCount;u++){var c=t[a*u],h=t[a*u+1];n&&(c=s*c+i.x,h=s*h+i.y),l.push(new o$1o(c,h))}return f$1a.fromPoints(l,r),l.length=0,r}function _0x40b3fa(e){var t,i,n=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,r=new i$1d,o=new o$1p,a=new o$1p,s=e.vertexAttributes[0],l=s.componentsPerAttribute,u=e.attrLocation.aPosition,c=e.vertexAttributes[u],h=e.attrLocation.aTexCoord5,d=e.vertexAttributes[h],f=d.componentsPerAttribute;n?(l=3,f=3,t=_0x35ba52(e,c),i=_0x351395(e,d,5)):(t=new Float32Array(s.typedArray.buffer,s.typedArray.byteOffset,s.typedArray.byteLength/4),i=new Float32Array(d.typedArray.buffer,d.typedArray.byteOffset,d.typedArray.byteLength/4));for(var p=[],_=0;_<e.verticesCount;_++)o$1p.fromArray(t,l*_,o),o$1p.fromArray(i,f*_,a),o$1p.add(o,a,o),p.push(o$1p.clone(o));return i$1d.fromPoints(p,r),p.length=0,r}function _0x18cd5c(e){var t=W$18.TRIANGLES;switch(e){case 1:t=W$18.POINTS;break;case 2:t=W$18.LINES;break;case 3:t=W$18.LINE_STRIP;break;case 4:t=W$18.TRIANGLES}return t}function _0x307853(e,t,i,n){var r,o={};o.indicesCount=6*(e-t),o.indexType=n>65535?1:0,o.primitiveType=W$18.TRIANGLES,r=0===o.indexType?new Uint16Array(o.indicesCount):new Uint32Array(o.indicesCount);for(var a=0,s=0;s<t;s++){for(var l=0;l<i[s]-1;l++)r[6*(a-s+l)]=4*(a-s+l),r[6*(a-s+l)+1]=4*(a-s+l)+2,r[6*(a-s+l)+2]=4*(a-s+l)+1,r[6*(a-s+l)+3]=4*(a-s+l)+1,r[6*(a-s+l)+4]=4*(a-s+l)+2,r[6*(a-s+l)+5]=4*(a-s+l)+3;a+=i[s]}return o.indicesTypedArray=r,o}function _0x35ba52(e,t){for(var i,n,r,o=t.componentsPerAttribute,a=e.vertCompressConstant,s=new o$1p(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),l=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),u=new Float32Array(3*e.verticesCount),c=0;c<e.verticesCount;c++)i=l[o*c]*a+s.x,n=l[o*c+1]*a+s.y,r=l[o*c+2]*a+s.z,u[3*c]=i,u[3*c+1]=n,u[3*c+2]=r;return u}function _0x351395(e,t,i){for(var n,r,o,a=t.componentsPerAttribute,s=e.texCoordCompressConstant[i],l=new e$2c(e.minTexCoordValue[i].x,e.minTexCoordValue[i].y,e.minTexCoordValue[i].z,e.minTexCoordValue[i].w),u=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),c=new Float32Array(3*e.verticesCount),h=0;h<e.verticesCount;h++)n=u[a*h]*s+l.x,r=u[a*h+1]*s+l.y,o=u[a*h+2]*s+l.z,c[3*h]=n,c[3*h+1]=r,c[3*h+2]=o;return c}function _0x117f68(e){for(var t=[],i=e.length,n=0;n<i;n++){var r=_0x18cd5c(e[n].primitiveType);(r===W$18.LINES||r===W$18.LINE_STRIP)&&t.push(e[n])}return t}function _0x31d251(e){for(var t=0,i=e.length,n=0;n<i;n++){var r=e[n],o=_0x18cd5c(r.primitiveType);o==W$18.LINES?t+=r.indicesCount/2:o==W$18.LINE_STRIP&&t++}return t}function _0x475f06(e){for(var t=0,i=e.length,n=0;n<i;n++){t+=e[n].indicesCount}return t}function _0x5deb75(e,t,i){for(var n,r=[],o=i.length,a=0;a<o;a++){var s,l=i[a];s=0===l.indexType?new Uint16Array(l.indicesTypedArray.buffer,l.indicesTypedArray.byteOffset,l.indicesTypedArray.byteLength/2):new Uint32Array(l.indicesTypedArray.buffer,l.indicesTypedArray.byteOffset,l.indicesTypedArray.byteLength/4);var u=_0x18cd5c(l.primitiveType);if(u==W$18.LINES)for(n=0;n<l.indicesCount;n+=2){var c=[],h=new o$1p;h.x=e[s[n]*t],h.y=e[s[n]*t+1],h.z=e[s[n]*t+2],c.push(h);var d=new o$1p;d.x=e[s[n+1]*t],d.y=e[s[n+1]*t+1],d.z=e[s[n+1]*t+2],c.push(d),r.push(c)}else if(u==W$18.LINE_STRIP){c=[];for(n=0;n<l.indicesCount;n++){var f=new o$1p;f.x=e[s[n]*t],f.y=e[s[n]*t+1],f.z=e[s[n]*t+2],c.push(f)}r.push(c)}}return r}_0x17f2d3(),_0x3ad44f.calcBoundingSphereInWorker=function(e,t){return t.instanceIndex>-1?_0x29cef1(t):e$2e(t.clampRegionEdge)?_0x40b3fa(t):e>=p$T.ClampGroundPolygon&&e<=p$T.ClampObjectLine?_0x1bbafd(t):e==p$T.ClampGroundAndObjectLineCache?_0x40b3fa(t):_0x318266(t)},_0x3ad44f.calcBoundingSphere=function(e,t,i){var n,r=e._fileType;return n=t.instanceIndex>-1?_0x29cef1(t):e$2e(t.clampRegionEdge)?_0x40b3fa(t):r>=p$T.ClampGroundPolygon&&r<=p$T.ClampObjectLine?_0x1bbafd(t):r==p$T.ClampGroundAndObjectLineCache?_0x40b3fa(t):_0x318266(t),i$1d.transform(n,i,n),n},_0x3ad44f.calcBoundingRectangle=function(e,t){var i;return e._fileType===p$T.ClampGroundPolygon&&(i=_0x9da2f5(t)),i},_0x3ad44f.createEdge=function(e,t){if(!(t.length<1)){var i=_0x117f68(t);if(0!=i.length){var n,r=_0x31d251(i),o=e.attrLocation.aPosition,a=e.vertexAttributes[o],s=e$2e(e.nCompressOptions)&&(e.nCompressOptions&_0x64fca6.SVC_Vertex)===_0x64fca6.SVC_Vertex,l=a.componentsPerAttribute;s?(l=3,n=_0x35ba52(e,a)):n=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);for(var u=_0x475f06(i),c=_0x5deb75(n,l,i),h=4*u-4*r,d=new Float32Array(3*h),f=new Float32Array(3*h),p=new Float32Array(3*h),_=new Int8Array(2*h),m=0,g=0;g<r;g++){for(var x=c[g].length,y=0;y<x;y++){var v=4*m-4*g,$=3*v+12*y,b=c[g][y];0!=y&&(d[$-6]=b.x,d[$-5]=b.y,d[$-4]=b.z,d[$-3]=b.x,d[$-2]=b.y,d[$-1]=b.z),y!=x-1&&(d[$]=b.x,d[$+1]=b.y,d[$+2]=b.z,d[$+3]=b.x,d[$+4]=b.y,d[$+5]=b.z);var T=b;y+1<x&&(T=c[g][y+1]),0!=y&&(p[$-6]=T.x,p[$-5]=T.y,p[$-4]=T.z,p[$-3]=T.x,p[$-2]=T.y,p[$-1]=T.z),y!=x-1&&(p[$]=T.x,p[$+1]=T.y,p[$+2]=T.z,p[$+3]=T.x,p[$+4]=T.y,p[$+5]=T.z);var C=b;y>=1&&(C=c[g][y-1]),0!=y&&(f[$-6]=C.x,f[$-5]=C.y,f[$-4]=C.z,f[$-3]=C.x,f[$-2]=C.y,f[$-1]=C.z),y!=x-1&&(f[$]=C.x,f[$+1]=C.y,f[$+2]=C.z,f[$+3]=C.x,f[$+4]=C.y,f[$+5]=C.z),$=2*v+8*y,0!=y&&(_[$-4]=-1,_[$-3]=-1,_[$-2]=1,_[$-1]=-1),y!=x-1&&(_[$]=-1,_[$+1]=1,_[$+2]=1,_[$+3]=1)}m+=c[g].length}var S={vertexAttributes:[],attrLocation:{}},w=S.vertexAttributes,E=S.attrLocation;S.instanceCount=0,S.instanceMode=0,E.aPosition=0,w.push({index:E.aPosition,typedArray:d,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),E.aNormal=1,w.push({index:E.aNormal,typedArray:f,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),E.aTexCoord0=2,w.push({index:E.aTexCoord0,typedArray:p,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),E.aTexCoord1=3,w.push({index:E.aTexCoord1,typedArray:_,componentsPerAttribute:2,componentDatatype:S$14.BYTE,offsetInBytes:0,strideInBytes:2*Int8Array.BYTES_PER_ELEMENT,normalize:!1});for(var P=[],A=0;A<c.length;A++)P.push(c[A].length);return{vertexPackage:S,indexPackage:_0x307853(u,r,P,h)}}}};var _0x494be5=(_0x27c74b=!0,function(e,t){var i=_0x27c74b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27c74b=!1,i}),_0x27ee63=_0x494be5(void 0,(function(){return _0x27ee63.toString().search("(((.+)+)+)+$").toString().constructor(_0x27ee63).search("(((.+)+)+)+$")})),_0x27c74b;function _0x1a0b3c(){}_0x27ee63(),Object.defineProperties(_0x1a0b3c.prototype,{});var _0x37c972=new e$1X,_0x298bda=e$1X.WHITE,_0x33fafd=void 0,_0x1a5e14=600;function _0x475a4b(e,t){var i=[];for(var n in e)if(e.hasOwnProperty(n)&&"0"!==n){var r=new _0xee2f65(this,n);Object.assign(r,t._layerScheduler._attributes[n]);var o=e[n];Array.isArray(o)||(o=[o]);for(var a=0,s=o.length;a<s;a++)r.addVertexOffset(o[a].vertexColorCount,o[a].vertexColorOffset);i.push(r)}return i}function _0x3ad7ec(e,t){for(var i=t.length,n=!1,r=0;r<i&&!n;r++)for(var o=t[r],a=o.span,s=0;s<a.length;s++){var l=a[s],u=l.vertexOffset,c=l.vertexOffset+l.vertexCount;if(e>=u&&e<c){o.indexValue.push(e),n=!0;break}}}function _0x4296e0(e,t){if(1!=t.length){var i=0,n=e.indicesCount,r=0===e.indexType?Uint16Array:Uint32Array,o=new r(e.indicesTypedArray.buffer,e.indicesTypedArray.byteOffset,n);for(i=0;i<n;i++){_0x3ad7ec(o[i],t)}for(i=0;i<t.length;i++){var a,s=t[i],l=s.indexValue.length;a=new r(l);for(var u=0;u<l;u++)a[u]=s.indexValue[u];s.indexPackage={indexType:e.indexType,indicesCount:l,indicesTypedArray:a,materialCode:e.materialCode,primitiveType:e.primitiveType}}}else t[0].indexPackage=e}function _0x153eb3(e){for(var t=e._array,i=0;i<t.length;i++){var n=t[i],r=n.batchFeatures;if(e$2e(r)&&!(r.length<1))for(var o=0;o<r.length;o++){var a=r[o];n.span=n.span.concat(a.getVertexOffset())}}}_0x1a0b3c.createRenderEntityPageLOD=function(e,t){var i=t.themeStyle,n=e.pickInfo,r=e.arrIndexPackage;if(this._fileType===p$T.Text&&this.createBillboardsBounds(),!e$2e(i)||!e$2e(n))return[new _0x4881fc(e)];if(e$2e(i.image)){for(var o=_0x475a4b(n,t),a=new e$1Q,s=0;s<o.length;s++){var l=o[s],u=e$2e(i.color)?i.color.evaluateColor(l,_0x37c972):_0x298bda,c=e$2e(i.image)?i.image.evaluate(l):_0x33fafd,h=e$2e(i.imageRepeatX)?i.imageRepeatX.evaluate(l):_0x1a5e14,d=e$2e(i.imageRepeatY)?i.imageRepeatY.evaluate(l):_0x1a5e14;e$2e(h)||(h=_0x1a5e14),e$2e(d)||(d=_0x1a5e14);var f=new o$1o(h,d);l.color=u,l.imageUrl=c;var p=l.getRenderBatchKey();if(!a.contains(p)){var _=new e$1X;_=e$1X.clone(u),a.set(p,{color:_,imageUrl:c,imageRepeat:f,batchFeatures:[],span:[],indexValue:[]})}a.get(p).batchFeatures.push(l)}var m=a._array;_0x153eb3(a),_0x4296e0(r[0],m);for(var g=[],x=0;x<m.length;x++){e.symbolTextureUrl=m[x].imageUrl,e.symbolColor=m[x].color,e.arrIndexPackage=[m[x].indexPackage],e.symbolTextureRepeat=m[x].imageRepeat;var y=new _0x4881fc(e);g.push(y)}return g}};var c$U={};function d$14(e,t,i){e$2e(t)||(t=e.width),e$2e(i)||(i=e.height);var n=c$U[t];e$2e(n)||(n={},c$U[t]=n);var r=n[i];if(!e$2e(r)){var o=document.createElement("canvas");o.width=t,o.height=i,(r=o.getContext("2d")).globalCompositeOperation="copy",n[i]=r}return r.drawImage(e,0,0,t,i),r.getImageData(0,0,t,i).data}if(typeof WebAssembly<"u"){let e=function(e){return n$K.locateFile?n$K.locateFile(e,v$H):v$H+e},t=function(e,t){e||R("Assertion failed: "+t)},i=function(e){var i=n$K["_"+e];return t(i,"Cannot call unknown function "+e+", make sure it is exported"),i},n=function(e,t,n,r,o){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=en$4(i),l(e,t,i)}return t},array:function(e){var t=en$4(e.length);return u(e,t),t}};var c=i(e),h=[],d=0;if(r)for(var f=0;f<r.length;f++){var p=s[n[f]];p?(0===d&&(d=Kn$1()),h[f]=p(r[f])):h[f]=r[f]}var _=c.apply(null,h);return _=function(e){return"string"===t?a(e):"boolean"===t?Boolean(e):e}(_),0!==d&&Fn$1(d),_},r=function(e,t,r,o){var a=(r=r||[]).every((function(e){return"number"===e}));return"string"!==t&&a&&!o?i(e):function(){return n(e,t,r,arguments)}},o=function(e,t,i){for(var n=t+i,r=t;e[r]&&!(r>=n);)++r;if(r-t>16&&e.subarray&&O$H)return O$H.decode(e.subarray(t,r));for(var o="";t<r;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var l=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|l:(7&a)<<18|s<<12|l<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var u=a-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},a=function(e,t){return e?o(X$Q,e,t):""},s=function(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+3>=o)break;t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r},l=function(e,t,i){return s(e,X$Q,t,i)},u=function(e,t){W$U.set(e,t)},c=function(e,t){return e%t>0&&(e+=t-e%t),e},h=function(){n$K.HEAP8=W$U=new Int8Array(c$T),n$K.HEAP16=new Int16Array(c$T),n$K.HEAP32=x$X=new Int32Array(c$T),n$K.HEAPU8=X$Q=new Uint8Array(c$T),n$K.HEAPU16=new Uint16Array(c$T),n$K.HEAPU32=new Uint32Array(c$T),n$K.HEAPF32=new Float32Array(c$T),n$K.HEAPF64=new Float64Array(c$T)},d=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?n$K.dynCall_v(i):n$K.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},f=function(){if(n$K.preRun)for("function"==typeof n$K.preRun&&(n$K.preRun=[n$K.preRun]);n$K.preRun.length;)g(n$K.preRun.shift());d(N$N)},p=function(){nn$5||(nn$5=!0,d(Qn$1))},_=function(){d(Zn$1)},m=function(){if(n$K.postRun)for("function"==typeof n$K.postRun&&(n$K.postRun=[n$K.postRun]);n$K.postRun.length;)x(n$K.postRun.shift());d(M$U)},g=function(e){N$N.unshift(e)},x=function(e){M$U.unshift(e)},y=function(e){b$13++,n$K.monitorRunDependencies&&n$K.monitorRunDependencies(b$13)},v=function(e){if(b$13--,n$K.monitorRunDependencies&&n$K.monitorRunDependencies(b$13),0==b$13&&(null!==J$P&&(clearInterval(J$P),J$P=null),R$Q)){var t=R$Q;R$Q=null,t()}},$=function(e){return String.prototype.startsWith?e.startsWith(rn$5):0===e.indexOf(rn$5)},b=function(){try{if(n$K.wasmBinary)return new Uint8Array(n$K.wasmBinary);if(n$K.readBinary)return n$K.readBinary(m$T);throw"both async and sync fetching of the wasm failed"}catch(e){R(e)}},T=function(){return n$K.wasmBinary||!_$M&&!h$T||"function"!=typeof fetch?new Promise((function(e,t){e(b())})):fetch(m$T,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+m$T+"'";return e.arrayBuffer()})).catch((function(){return b()}))},C=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Bn$2};function i(e,t){var i=e.exports;n$K.asm=i,v()}function n(e){i(e.instance)}function r(e){return T().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(y(),n$K.instantiateWasm)try{return n$K.instantiateWasm(t,i)}catch{return!1}return function(){if(n$K.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||$(m$T)||"function"!=typeof fetch)return r(n);fetch(m$T,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(n,(function(e){r(n)}))}))}(),{}},S=function(){return W$U.length},w=function(e){return n$K.___errno_location&&(x$X[n$K.___errno_location()>>2]=e),e},E=function(e){R("OOM")},P=function(e){e=c(e,65536);var t=c$T.byteLength;try{return-1!==P$Q.grow((e-t)/65536)&&(c$T=P$Q.buffer,!0)}catch{return!1}},A=function(e){var t=S(),i=65536,n=2147418112;if(e>n)return!1;for(var r=Math.max(t,16777216);r<e;)r=r<=536870912?c(2*r,i):Math.min(c((3*r+2147483648)/4,i),n);return!!P(r)&&(h(),!0)},L=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},M=function(e){function t(){n$K.calledRun||(n$K.calledRun=!0,!d$13&&(p(),_(),n$K.onRuntimeInitialized&&n$K.onRuntimeInitialized(),m()))}e=e||n$K.arguments,b$13>0||(f(),b$13>0)||n$K.calledRun||(n$K.setStatus?(n$K.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n$K.setStatus("")}),1),t()}),1)):t())},R=function(e){n$K.onAbort&&n$K.onAbort(e),e=void 0!==e?'"'+e+'"':"",d$13=!0};var n$K=typeof n$K<"u"?n$K:{},A$10={},l$W;for(l$W in n$K)n$K.hasOwnProperty(l$W)&&(A$10[l$W]=n$K[l$W]);n$K.arguments=[],n$K.thisProgram="./this.program",n$K.quit=function(e,t){throw t},n$K.preRun=[],n$K.postRun=[];var _$M=!1,h$T=!1,L$$=!1,D$U=!1,V$N=!1;_$M="object"==typeof window,h$T="function"==typeof importScripts,D$U="object"==typeof process&&"function"==typeof require,L$$=D$U&&!_$M&&!h$T,V$N=!_$M&&!L$$&&!h$T;var v$H="",H$X,U$U;if(L$$)v$H=__dirname+"/",n$K.read=function(e,t){var i;return H$X||(H$X=require("fs")),U$U||(U$U=require("path")),e=U$U.normalize(e),i=H$X.readFileSync(e),t?i:i.toString()},n$K.readBinary=function(e){var i=n$K.read(e,!0);return i.buffer||(i=new Uint8Array(i)),t(i.buffer),i},process.argv.length>1&&(n$K.thisProgram=process.argv[1].replace(/\\/g,"/")),n$K.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=n$K),process.on("uncaughtException",(function(e){if(!(e instanceof L))throw e})),process.on("unhandledRejection",R),n$K.quit=function(e){process.exit(e)},n$K.inspect=function(){return"[Emscripten Module object]"};else V$N?(typeof read<"u"&&(n$K.read=function(e){return read(e)}),n$K.readBinary=function(e){var i;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(i=read(e,"binary"),t("object"==typeof i),i)},typeof scriptArgs<"u"?n$K.arguments=scriptArgs:typeof arguments<"u"&&(n$K.arguments=arguments),"function"==typeof quit&&(n$K.quit=function(e){quit(e)})):(_$M||h$T)&&(h$T?v$H=self.location.href:document.currentScript&&(v$H=document.currentScript.src),v$H=0!==v$H.indexOf("blob:")?v$H.substr(0,v$H.lastIndexOf("/")+1):"",n$K.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h$T&&(n$K.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),n$K.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},n$K.setWindowTitle=function(e){document.title=e});var Sn$2=n$K.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),Gn$1=n$K.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||Sn$2);for(l$W in A$10)A$10.hasOwnProperty(l$W)&&(n$K[l$W]=A$10[l$W]);A$10=void 0;var Bn$2={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var P$Q,d$13=!1,O$H=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Ln$2=65536,c$T,W$U,X$Q,x$X,Jn$1=5246e3,E$V=3088,I$13=5242880,S$O=n$K.TOTAL_MEMORY||16777216;S$O<I$13&&Gn$1("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+S$O+"! (TOTAL_STACK="+I$13+")"),n$K.buffer?c$T=n$K.buffer:"object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(P$Q=new WebAssembly.Memory({initial:S$O/Ln$2}),c$T=P$Q.buffer):c$T=new ArrayBuffer(S$O),h(),x$X[E$V>>2]=Jn$1;var N$N=[],Qn$1=[],Zn$1=[],M$U=[],nn$5=!1,b$13=0,J$P=null,R$Q=null;n$K.preloadedImages={},n$K.preloadedAudios={};var rn$5="data:application/octet-stream;base64,",m$T,$n$1=typeof window>"u"?self:window;m$T=$n$1.location.href.endsWith(".openrealspace")?"../../static/Build/SuperMap3D/ThirdParty/Module.wasm":"ThirdParty/Module.wasm",$(m$T)||(m$T=e(m$T)),n$K.asm=function(e,t,i){return t.memory=P$Q,t.table=new WebAssembly.Table({initial:23,maximum:23,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0,C(t)};var Yn$1={},kn$1={b:R,c:w,f:S,e:A,d:E,a:E$V},tn$5=n$K.asm(Yn$1,kn$1,c$T);n$K.asm=tn$5,n$K.___errno_location=function(){return n$K.asm.g.apply(null,arguments)},n$K._floatToTextureColor=function(){return n$K.asm.h.apply(null,arguments)},n$K._free=function(){return n$K.asm.i.apply(null,arguments)},n$K._free_result=function(){return n$K.asm.j.apply(null,arguments)},n$K._malloc=function(){return n$K.asm.k.apply(null,arguments)};var en$4=n$K.stackAlloc=function(){return n$K.asm.n.apply(null,arguments)},Fn$1=n$K.stackRestore=function(){return n$K.asm.o.apply(null,arguments)},Kn$1=n$K.stackSave=function(){return n$K.asm.p.apply(null,arguments)};if(n$K.dynCall_v=function(){return n$K.asm.l.apply(null,arguments)},n$K.dynCall_vi=function(){return n$K.asm.m.apply(null,arguments)},n$K.asm=tn$5,n$K.cwrap=r,L.prototype=new Error,L.prototype.constructor=L,R$Q=function e(){n$K.calledRun||M(),n$K.calledRun||(R$Q=e)},n$K.run=M,n$K.abort=R,n$K.preInit)for("function"==typeof n$K.preInit&&(n$K.preInit=[n$K.preInit]);n$K.preInit.length>0;)n$K.preInit.pop()();n$K.noExitRuntime=!0,M()}else var n$K=null;var _0x3c481f=n$K;function I$12(){t$15.throwInstantiationError()}Object.defineProperties(I$12.prototype,{errorEvent:{get:t$15.throwInstantiationError},credit:{get:t$15.throwInstantiationError},tilingScheme:{get:t$15.throwInstantiationError},ready:{get:t$15.throwInstantiationError},readyPromise:{get:t$15.throwInstantiationError},hasWaterMask:{get:t$15.throwInstantiationError},hasVertexNormals:{get:t$15.throwInstantiationError},availability:{get:t$15.throwInstantiationError}});var A$$=[];I$12.getRegularGridIndices=function(e,t){if(e*t>=e$2d.FOUR_GIGABYTES)throw new t$15("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=A$$[e];e$2e(i)||(A$$[e]=i=[]);var n=i[t];return e$2e(n)||b$12(e,t,n=e*t<e$2d.SIXTY_FOUR_KILOBYTES?i[t]=new Uint16Array((e-1)*(t-1)*6+3*(e+t-2)):i[t]=new Uint32Array((e-1)*(t-1)*6+3*(e+t-2)),0),n},I$12.getRegularGridIndicesForReproject=function(e,t){if(e*t>=e$2d.FOUR_GIGABYTES)throw new t$15("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=A$$[e];e$2e(i)||(A$$[e]=i=[]);var n=i[t];return e$2e(n)||b$12(e,t,n=e*t<e$2d.SIXTY_FOUR_KILOBYTES?i[t]=new Uint16Array((e-1)*(t-1)*6):i[t]=new Uint32Array((e-1)*(t-1)*6),0),n};var U$T=[];I$12.getRegularGridIndicesAndEdgeIndices=function(e,t){if(e*t>=e$2d.FOUR_GIGABYTES)throw new t$15("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=U$T[e];e$2e(i)||(U$T[e]=i=[]);var n=i[t];if(!e$2e(n)){var r=I$12.getRegularGridIndices(e,t),o=O$G(e,t),a=o.westIndicesSouthToNorth,s=o.southIndicesEastToWest,l=o.eastIndicesNorthToSouth,u=o.northIndicesWestToEast;n=i[t]={indices:r,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:l,northIndicesWestToEast:u}}return n};var N$M=[];function O$G(e,t){var i,n=new Array(t),r=new Array(e),o=new Array(t),a=new Array(e);for(i=0;i<e;++i)a[i]=i,r[i]=e*t-1-i;for(i=0;i<t;++i)o[i]=(i+1)*e-1,n[i]=(t-i-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:r,eastIndicesNorthToSouth:o,northIndicesWestToEast:a}}function b$12(e,t,i,n){for(var r=0,o=0;o<t-1;++o){for(var a=0;a<e-1;++a){var s=r,l=s+e,u=l+1,c=s+1;i[n++]=s,i[n++]=l,i[n++]=c,i[n++]=c,i[n++]=l,i[n++]=u,++r}++r}var h=(t-1)/2,d=(e-1)/2;r=0;for(a=0;a<d;a++)i[n++]=r,i[n++]=r+1,i[n++]=r+2,r+=2;r=e*(t-1);for(a=0;a<d;a++)i[n++]=r+1,i[n++]=r,i[n++]=r+2,r+=2;r=0;for(a=0;a<h;a++)i[n++]=r+e,i[n++]=r,i[n++]=r+2*e,r+=2*e;r=e-1;for(a=0;a<h;a++)i[n++]=r,i[n++]=r+e,i[n++]=r+2*e,r+=2*e}function S$N(e,t,i,n,r){for(var o=e$2e(r),a=e[0],s=e.length,l=1;l<s;++l){var u=e[l];!o||r[a+"_"+u]?(i[n++]=a,i[n++]=u,i[n++]=t,i[n++]=t,i[n++]=u,i[n++]=t+1,a=u,++t):(a=u,++t)}return n}function f$T(e){var t,i=e.name,n=e.message;t=e$2e(i)&&e$2e(n)?i+": "+n:e.toString();var r=e.stack;return e$2e(r)&&(t+="\n"+r),t}function l$V(e,t,i,n,r,o,a){this.provider=e,this.message=t,this.x=i,this.y=n,this.level=r,this.timesRetried=u$Z(o,0),this.retry=!1,this.error=a}function t$H(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.persists=u$Z(e.persists,!1),this.pass=Le$q.COMPUTE,this.renderState=e.renderState,this.clear=u$Z(e.clear,!0),this.owner=e.owner,this.name=u$Z(e.name,""),e.name||console.log("ComputeCommand need a name.")}I$12.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){if(e*t>=e$2d.FOUR_GIGABYTES)throw new t$15("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=N$M[e];e$2e(i)||(N$M[e]=i=[]);var n=i[t];if(!e$2e(n)){var r=e*t,o=(e-1)*(t-1)*6,a=2*e+2*t,s=r+a,l=3*(e+t-2),u=o+6*Math.max(0,a-4)+l,c=O$G(e,t),h=c.westIndicesSouthToNorth,d=c.southIndicesEastToWest,f=c.eastIndicesNorthToSouth,p=c.northIndicesWestToEast,_=ce$z.createTypedArray(s,u);b$12(e,t,_,0),I$12.addSkirtIndices(h,d,f,p,r,_,o+l),n=i[t]={indices:_,westIndicesSouthToNorth:h,southIndicesEastToWest:d,eastIndicesNorthToSouth:f,northIndicesWestToEast:p,indexCountWithoutSkirts:o}}return n},I$12.addSkirtIndices=function(e,t,i,n,r,o,a,s){var l=r;a=S$N(e,l,o,a,s),a=S$N(t,l+=e.length,o,a,s),a=S$N(i,l+=t.length,o,a,s),S$N(n,l+=i.length,o,a,s)},I$12.heightmapTerrainQuality=.25,I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,i){return 2*e.maximumRadius*Math.PI*I$12.heightmapTerrainQuality/(t*i)},I$12.prototype.requestTileGeometry=t$15.throwInstantiationError,I$12.prototype.getLevelMaximumGeometricError=t$15.throwInstantiationError,I$12.prototype.getTileDataAvailable=t$15.throwInstantiationError,I$12.prototype.loadTileDataAvailability=t$15.throwInstantiationError,l$V.handleError=function(e,t,i,n,r,o,a,s,l){var u=e;return e$2e(e)?(u.provider=t,u.message=n,u.x=r,u.y=o,u.level=a,u.retry=!1,u.error=l,++u.timesRetried):u=new l$V(t,n,r,o,a,0,l),i.numberOfListeners>0?i.raiseEvent(u):console.log('An error occurred in "'+t.constructor.name+'": '+f$T(n)),u.retry&&e$2e(s)&&s(),u},l$V.handleSuccess=function(e){e$2e(e)&&(e.timesRetried=-1)},t$H.prototype.execute=function(e){e.execute(this)};var Ve$i="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",je$g="attribute vec4 position;\nattribute float webMercatorT;\nuniform vec2 u_textureDimensions;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nv_textureCoordinates = vec2(position.x, webMercatorT);\ngl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));\n}\n",e$1g={LEFT:-1,BOTTOM:-1,NONE:0,RIGHT:1,TOP:1},Xe$d=Object.freeze(e$1g);function o$T(e,t,i,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i,this.flipY=n,this.imageryLayer=void 0,this.morphingAlpha=void 0}function c$S(e){if(e=u$Z(e,{}),this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._numberOfLevelZeroTilesX=u$Z(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=u$Z(e.numberOfLevelZeroTilesY,1),this._projection=u$Z(e.projection,new t$N(this._ellipsoid)),e$2e(e.rectangleSouthwestInMeters)&&e$2e(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{var t=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new o$1o(-t,-t),this._rectangleNortheastInMeters=new o$1o(t,t)}var i=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new h$18(i.longitude,i.latitude,n.longitude,n.latitude),this._customDPI=e.customDPI,this._scaleDenominators=e.scaleDenominators,this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._orgin=u$Z(e.orgin,void 0)}o$T.prototype.freeResources=function(){e$2e(this.readyImagery)&&this.readyImagery.releaseReference(),e$2e(this.loadingImagery)&&this.loadingImagery.releaseReference()},o$T.prototype.processStateMachine=function(e,t,i){var n=this.loadingImagery,r=n.imageryLayer;if(n.processStateMachine(t,!this.useWebMercatorT,i),n.state===wt$7.READY)return e$2e(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this),this.morphingBeginTime=performance.now(),!0;for(var o,a=n.parent;e$2e(a)&&(a.state!==wt$7.READY||!this.useWebMercatorT&&!e$2e(a.texture));)a.state!==wt$7.FAILED&&a.state!==wt$7.INVALID&&(o=o||a),a=a.parent;return this.readyImagery!==a&&(e$2e(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=a,e$2e(a)&&(a.addReference(),this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this))),(n.state===wt$7.FAILED||n.state===wt$7.INVALID)&&(e$2e(o)?(o.processStateMachine(t,!this.useWebMercatorT,i),!1):(n.imageryLayer&&!1===n.imageryLayer.enableUpsample&&(this.discard=!0),!0))},Object.defineProperties(c$S.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}},orgin:{get:function(){return this._orgin}}}),c$S.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},c$S.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},c$S.prototype.rectangleToNativeRectangle=function(e,t){var i=this._projection,n=i.project(h$18.southwest(e)),r=i.project(h$18.northeast(e));return e$2e(t)?(t.west=n.x,t.south=n.y,t.east=r.x,t.north=r.y,t):new h$18(n.x,n.y,r.x,r.y)},c$S.prototype.tileXYToNativeRectangle=function(e,t,i,n){var r=e$2e(this._orgin)?this._orgin.x:this._rectangleSouthwestInMeters.x,o=e$2e(this._orgin)?this._orgin.y:this._rectangleNortheastInMeters.y;if(e$2e(this._customDPI)&&e$2e(this._scaleDenominators)){var a=this.calculateResolution(i),s=r+e*this._tileWidth*a.x,l=r+(e+1)*this._tileWidth*a.x,u=o-t*this._tileHeight*a.y,c=o-(t+1)*this._tileHeight*a.y;return e$2e(n)?(n.west=s,n.south=c,n.east=l,n.north=u,n):new h$18(s,c,l,u)}var h=this.getNumberOfXTilesAtLevel(i),d=this.getNumberOfYTilesAtLevel(i),f=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/h,p=(s=this._rectangleSouthwestInMeters.x+e*f,l=this._rectangleSouthwestInMeters.x+(e+1)*f,(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/d);u=this._rectangleNortheastInMeters.y-t*p,c=this._rectangleNortheastInMeters.y-(t+1)*p;return e$2e(n)?(n.west=s,n.south=c,n.east=l,n.north=u,n):new h$18(s,c,l,u)},c$S.prototype.tileXYToRectangle=function(e,t,i,n){var r=this.tileXYToNativeRectangle(e,t,i,n),o=this._projection,a=o.unproject(new o$1o(r.west,r.south)),s=o.unproject(new o$1o(r.east,r.north));return r.west=a.longitude,r.south=a.latitude,r.east=s.longitude,r.north=s.latitude,r},c$S.prototype.positionToTileXY=function(e,t,i){var n=this._rectangle;if(h$18.contains(n,e)){var r=this.getNumberOfXTilesAtLevel(t),o=this.getNumberOfYTilesAtLevel(t),a=e$2e(this._orgin)?this._orgin.x:this._rectangleSouthwestInMeters.x,s=e$2e(this._orgin)?this._orgin.y:this._rectangleNortheastInMeters.y,l=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/r,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/o;if(e$2e(this._customDPI)&&e$2e(this._scaleDenominators)){var c=this.calculateResolution(t);l=this._tileWidth*c.x,u=this._tileHeight*c.y}var h=this._projection.project(e),d=h.x-a,f=s-h.y;e$2e(this._orgin)&&(r+=this._orgin.x!=this._rectangleSouthwestInMeters.x?Math.ceil((h.x-this._orgin.x)/l):0,o+=this._orgin.y!=this._rectangleSouthwestInMeters.y?Math.ceil((this._orgin.y-h.y)/u):0);var p=d/l|0;p>=r&&(p=r-1);var _=f/u|0;return _>=o&&(_=o-1),e$2e(i)?(i.x=p,i.y=_,i):new o$1o(p,_)}},c$S.prototype.calculateResolution=function(e){return new o$1o(.0254*this._scaleDenominators[e]/this._customDPI.x,.0254*this._scaleDenominators[e]/this._customDPI.y)};var _0xe11a5c=(_0xc405e0=!0,function(e,t){var i=_0xc405e0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc405e0=!1,i}),_0x373afc=_0xe11a5c(void 0,(function(){return _0x373afc.toString().search("(((.+)+)+)+$").toString().constructor(_0x373afc).search("(((.+)+)+)+$")})),_0xc405e0;_0x373afc();var _0x21acd2=1029,_0x55a76b=2305,_0x14ded5=function(e,t,i){this.enable=e,this.mode=t,this.frontFace=i};_0x14ded5.disabled=new _0x14ded5(!1,_0x21acd2,_0x55a76b),_0x14ded5.backCCW=new _0x14ded5(!0,_0x21acd2,_0x55a76b);var _0x52bf7b=(_0x13d174=!0,function(e,t){var i=_0x13d174?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13d174=!1,i}),_0x31d34a=_0x52bf7b(void 0,(function(){return _0x31d34a.toString().search("(((.+)+)+)+$").toString().constructor(_0x31d34a).search("(((.+)+)+)+$")})),_0x13d174;_0x31d34a();var _0x1fcde5=519,_0x4a9140=function(e,t,i){this.func=e,this.mask=t,this.range=i};_0x4a9140.ReadOnly=!1,_0x4a9140.ReadWrite=!0,_0x4a9140.disabled=new _0x4a9140(_0x1fcde5,_0x4a9140.ReadOnly,[0,1]);var _0x32ed41=(_0x23de7e=!0,function(e,t){var i=_0x23de7e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23de7e=!1,i}),_0x4856b3=_0x32ed41(void 0,(function(){return _0x4856b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x4856b3).search("(((.+)+)+)+$")})),_0x23de7e;function _0x2ddbe2(e,t,i){if(e.realtime&&e$2e(i)&&e$2e(i.zoom)){var n=i.zoom;e$2e(i.drawFillPattern)&&(n=Math.floor(n+.5));var r=i.zoom-e.level,o=t*(ne$C/(e.targetTileSize*Math.pow(2,r)));o*=e.targetTileSize/512;var a=i.zoom-i.finestRenderLevel;return a>0&&(o*=Math.pow(2,a)),o}return t*(ne$C/e.targetTileSize)}_0x4856b3();var _0x1ea0f2=(_0x15d7c2=!0,function(e,t){var i=_0x15d7c2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x15d7c2=!1,i}),_0x5b63a6=_0x1ea0f2(void 0,(function(){return _0x5b63a6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b63a6).search("(((.+)+)+)+$")})),_0x15d7c2;_0x5b63a6();var _0x36a80a={circleUniforms:function(e,t){return{u_camera_to_center_distance:new _0x3d809b.Uniform1f(e,t.u_camera_to_center_distance),u_scale_with_map:new _0x3d809b.Uniform1i(e,t.u_scale_with_map),u_pitch_with_map:new _0x3d809b.Uniform1i(e,t.u_pitch_with_map),u_extrude_scale:new _0x3d809b.Uniform2f(e,t.u_extrude_scale),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix)}},circleUniformValues:function(e,t,i){var n,r;if(e.transform,"map"===i.paint.get("circle-pitch-alignment")){var o=_0x2ddbe2(t,1);n=!0,r=[o,o]}else n=!1,r=_0x8a287b(t);return{u_camera_to_center_distance:1,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:_0x199f61(t),u_pitch_with_map:+n,u_device_pixel_ratio:1,u_extrude_scale:r}},circleUniformMap:function(e,t,i){var n,r;if("map"===i.paint.get("circle-pitch-alignment")){var o=_0x2ddbe2(t,1);n=!0,r=[o,o]}else n=!1,r=_0x8a287b(t);var a={u_camera_to_center_distance:function(){return 1},u_scale_with_map:function(){return+("map"===i.paint.get("circle-pitch-scale"))},u_matrix:function(){return _0x199f61(t)},u_pitch_with_map:function(){return+n},u_device_pixel_ratio:function(){return 1},u_extrude_scale:function(){return r},u_mapbox_alpha:function(){return void 0===e.alpha?1:e.alpha}};return a}},_0x25d54b=new Float32Array(16);function _0x199f61(e){var t=e.viewProjection;return p$1d.toArray(t,_0x25d54b)}function _0x8a287b(e){return[2/e.tileSize,-2/e.tileSize]}var _0x3edba8=(_0x34a075=!0,function(e,t){var i=_0x34a075?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x34a075=!1,i}),_0x4b957a=_0x3edba8(void 0,(function(){return _0x4b957a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b957a).search("(((.+)+)+)+$")})),_0x34a075;function _0x3ac934(e,t,i,n){if("translucent"===e.renderPass){var r=i.paint.get("circle-opacity"),o=i.paint.get("circle-stroke-width"),a=i.paint.get("circle-stroke-opacity"),s=void 0!==i.layout.get("circle-sort-key").constantOr(1);if(0!==r.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1)){var l=e.depthModeForSublayer(0,_0x4a9140.ReadOnly),u=e.colorModeForRenderPass(),c=[],h=t.getBucket(i);if(h){var d=h.programConfigurations.get(i.id),f=e.useProgram("circle",d),p=f.program,_=h.layoutVertexBuffer,m=h.indexBuffer,g=_0x36a80a.circleUniformMap(e,t,i),x=f.cesiumProgram,y=x.allUniforms;g=d.getUniformMaps(y,i.paint,g);var v={programConfiguration:d,program:p,layoutVertexBuffer:_,indexBuffer:m,uniformMap:g};if(s)for(var $=0,b=h.segments.get();$<b.length;$+=1){var T=b[$];c.push({segments:new _0x1e8367([T]),sortKey:T.sortKey,state:v})}else c.push({segments:h.segments,sortKey:0,state:v});s&&c.sort((function(e,t){return e.sortKey-t.sortKey}));for(var C=0,S=c;C<S.length;C+=1){var w=0;for(b=S[C].segments.get();w<b.length;w+=1){var E=((T=b[w]).drawCommands||(T.drawCommands={}))[i.id];if(!E){E=new i$$({cull:!1,primitiveType:W$18.TRIANGLES,count:3*T.primitiveLength,offset:3*T.primitiveOffset}),T.drawCommands[i.id]=E;for(var P=T.cesiumVaos||(T.cesiumVaos={}),A=[],L=(_=h.layoutCesiumVertexBuffer,0);L<_.attributes.length;L++){var M=_.attributes[L],R=_0x42145e.mbxAttributeToCesiumVertexArrtribute(M,_,L,T.vertexOffset);A.push(R)}var O=P[i.id]||(P[i.id]=new c$13({context:e.cesiumContext,attributes:A,indexBuffer:h.cesiumIndexBuffer}));E.vertexArray=O}g.u_depthRange=function(){return l.range[0]},E.uniformMap=g,E.renderState=_0x42145e.toRenderState(u,l,_0x14ded5.disabled),E.shaderProgram=x,E.execute(e.cesiumContext,n.passState)}}}}}}_0x4b957a();var _0x5f1873=(_0x4ffecc=!0,function(e,t){var i=_0x4ffecc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4ffecc=!1,i}),_0x112047=_0x5f1873(void 0,(function(){return _0x112047.toString().search("(((.+)+)+)+$").toString().constructor(_0x112047).search("(((.+)+)+)+$")})),_0x4ffecc;_0x112047();var _0x18cbef={lineUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_ratio:new _0x3d809b.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_units_to_pixels:new _0x3d809b.Uniform2f(e,t.u_units_to_pixels),u_antialiasing:new _0x3d809b.Uniform1f(e,t.u_antialiasing)}},lineGradientUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_ratio:new _0x3d809b.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_units_to_pixels:new _0x3d809b.Uniform2f(e,t.u_units_to_pixels),u_image:new _0x3d809b.Uniform1i(e,t.u_image)}},linePatternUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_ratio:new _0x3d809b.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_image:new _0x3d809b.Uniform1i(e,t.u_image),u_units_to_pixels:new _0x3d809b.Uniform2f(e,t.u_units_to_pixels),u_scale:new _0x3d809b.Uniform4f(e,t.u_scale),u_fade:new _0x3d809b.Uniform1f(e,t.u_fade)}},lineSDFUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_ratio:new _0x3d809b.Uniform1f(e,t.u_ratio),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_units_to_pixels:new _0x3d809b.Uniform2f(e,t.u_units_to_pixels),u_patternscale_a:new _0x3d809b.Uniform2f(e,t.u_patternscale_a),u_patternscale_b:new _0x3d809b.Uniform2f(e,t.u_patternscale_b),u_sdfgamma:new _0x3d809b.Uniform1f(e,t.u_sdfgamma),u_image:new _0x3d809b.Uniform1i(e,t.u_image),u_tex_y_a:new _0x3d809b.Uniform1f(e,t.u_tex_y_a),u_tex_y_b:new _0x3d809b.Uniform1f(e,t.u_tex_y_b),u_mix:new _0x3d809b.Uniform1f(e,t.u_mix)}},lineUniformValues:function(e,t,i,n){e.transform;var r=_0x1d8a3d(t),o=_0x2ddbe2(t,1,n);return{u_matrix:_0x8da6b4(e,t),u_ratio:1/o,u_device_pixel_ratio:1,u_units_to_pixels:[1/r[0],1/r[1]],u_antialiasing:n.lineAntialiasing}},lineGradientUniformValues:function(e,t,i,n){return extend$1(_0x18cbef.lineUniformValues(e,t,i,n),{u_image:0})},linePatternUniformValues:function(e,t,i,n,r){e.transform;var o=_0x175659(t,r);return{u_matrix:_0x8da6b4(e,t),u_texsize:t.imageAtlasTexture.size,u_ratio:1/_0x2ddbe2(t,1,r),u_device_pixel_ratio:1,u_image:0,u_scale:[ref_properties.browser.devicePixelRatio,o,n.fromScale,n.toScale],u_fade:n.t,u_units_to_pixels:_0x1d8a3d(t)}},lineSDFUniformValues:function(e,t,i,n,r,o){e.transform;var a=e.lineAtlas,s=_0x175659(t,o),l="round"===i.layout.get("line-cap"),u=a.getDash(n.from,l),c=a.getDash(n.to,l),h=u.width*r.fromScale,d=c.width*r.toScale;return extend$1(_0x18cbef.lineUniformValues(e,t,i,o),{u_patternscale_a:[s/h,-u.height/2],u_patternscale_b:[s/d,-c.height/2],u_sdfgamma:a.width/(256*Math.min(h,d))/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:c.y,u_mix:r.t})}},_0x55a21f=new o$1o;_0x18cbef.lineUniformMap=function(e,t,i,n){e.transform;var r=_0x1d8a3d(t),o=_0x2ddbe2(t,1,n),a={u_matrix:function(){return _0x8da6b4(e,t)},u_ratio:function(){return 1/o},u_device_pixel_ratio:function(){return 1},u_units_to_pixels:function(){return _0x55a21f.x=1/r[0],_0x55a21f.y=1/r[1],_0x55a21f},u_antialiasing:function(){return e.lineAntialiasing?1:0}};return a},_0x18cbef.lineGradientUniformMap=function(e,t,i,n){var r=_0x18cbef.lineUniformMap(e,t,i,n);return r.u_image=function(){return n.image},r};var _0x1e6e9b=new e$2c;_0x18cbef.linePatternUniformMap=function(e,t,i,n,r){e.transform;var o=_0x175659(t,r),a={u_matrix:function(){return _0x8da6b4(e,t)},u_texsize:function(){return t.imageAtlasTexture.size},u_ratio:function(){return 1/_0x2ddbe2(t,1,r)},u_device_pixel_ratio:function(){return 1},u_image:function(){return r.image},u_scale:function(){return _0x1e6e9b.x=ref_properties.browser.devicePixelRatio,_0x1e6e9b.y=o,_0x1e6e9b.z=n.fromScale,_0x1e6e9b.w=n.toScale,_0x1e6e9b},u_fade:function(){return n.t},u_units_to_pixels:function(){return _0x1d8a3d(t)}};return a};var _0x5cb7fd=new o$1o,_0x36383d=new o$1o;function _0x175659(e,t){return 1/_0x2ddbe2(e,1,t)}function _0x1d8a3d(e){return[2/e.tileSize,-2/e.tileSize]}_0x18cbef.lineSDFUniformMap=function(e,t,i,n,r,o){var a=_0x18cbef.lineUniformMap(e,t,i,o);e.transform;var s=e.lineAtlas,l=_0x175659(t,o),u="round"===i.layout.get("line-cap"),c=s.getDash(n.from,u),h=s.getDash(n.to,u),d=c.width*r.fromScale,f=h.width*r.toScale;return a.u_patternscale_a=function(){return _0x5cb7fd.x=l/d,_0x5cb7fd.y=-c.height/2,_0x5cb7fd},a.u_patternscale_b=function(){return _0x36383d.x=l/f,_0x36383d.y=-h.height/2,_0x36383d},a.u_sdfgamma=function(){return s.width/(256*Math.min(d,f))/2},a.u_image=function(){return o.image},a.u_tex_y_a=function(){return c.y},a.u_tex_y_b=function(){return h.y},a.u_mix=function(){return r.t},a};var _0x9bd56c=new Float32Array(16);function _0x8da6b4(e,t,i){var n=t.viewProjection;return p$1d.toArray(n,_0x9bd56c)}var _0x586e66=(_0x1c18ca=!0,function(e,t){var i=_0x1c18ca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c18ca=!1,i}),_0xdd5153=_0x586e66(void 0,(function(){return _0xdd5153.toString().search("(((.+)+)+)+$").toString().constructor(_0xdd5153).search("(((.+)+)+)+$")})),_0x1c18ca;function _0x32f715(e,t,i,n){if("translucent"===e.renderPass&&e$2e(i)&&e$2e(i.paint)){var r=i.paint.get("line-opacity"),o=i.paint.get("line-width");if(0!==r.constantOr(1)&&0!==o.constantOr(1)){var a=e.depthModeForSublayer(0,_0x4a9140.ReadOnly),s=e.colorModeForRenderPass(),l=i.paint.get("line-dasharray"),u=i.paint.get("line-pattern"),c=u&&u.constantOr(1),h=i.paint.get("line-gradient"),d=i.getCrossfadeParameters(),f=l?"lineSDF":c?"linePattern":h?"lineGradient":"line",p=e.context,_=e.cesiumContext;if(h){var m=i.gradientTexture;if(!i.gradient)return;!m&&(m=i.gradientTexture=new _0x556fd4(p,_,i.gradient,de$y.RGBA)),m.bind(de$y.LINEAR,de$y.CLAMP_TO_EDGE)}var g=t.getBucket(i);if(g){var x=g.programConfigurations.get(i.id),y=e.useProgram(f,x).cesiumProgram,v=u.constantOr(null);if(v&&t.imageAtlas){var $=t.imageAtlas,b=$.patternPositions[v.to.toString()],T=$.patternPositions[v.from.toString()];b&&T&&x.setConstantPatternPositions(b,T)}var C=o.value.value,S=C;S*=e._globalLineWidthScale,i.paint._values["line-width"].value.value=S,l?n.image=e.lineAtlas.getTexture(_):c&&(t.imageAtlasTexture.bind(de$y.LINEAR,de$y.CLAMP_TO_EDGE),n.image=t.imageAtlasTexture.cesiumTexture,x.updatePatternPaintBuffers(d));var w=l?_0x18cbef.lineSDFUniformMap(e,t,i,l,d,n):c?_0x18cbef.linePatternUniformMap(e,t,i,d,n):h?_0x18cbef.lineGradientUniformMap(e,t,i,n):_0x18cbef.lineUniformMap(e,t,i,n),E=y.allUniforms;w=x.getUniformMaps(E,i.paint,w);for(var P=x.getAttributeLocation(),A=0,L=g.segments.get();A<L.length;A+=1){var M=L[A],R=(M.drawCommands||(M.drawCommands={}))[i.id];if(!R){R=new i$$({cull:!1,primitiveType:W$18.TRIANGLES,count:3*M.primitiveLength,offset:3*M.primitiveOffset}),M.drawCommands[i.id]=R;for(var O=M.cesiumVaos||(M.cesiumVaos={}),D=[],I=0;I<g.layoutCesiumVertexBuffer.attributes.length;I++){var B=g.layoutCesiumVertexBuffer.attributes[I],F=_0x42145e.mbxAttributeToCesiumVertexArrtribute(B,g.layoutCesiumVertexBuffer,P[B.name],M.vertexOffset);D.push(F)}var N=x.getPaintVertexBuffers();if(e$2e(N))for(var G=0;G<N.length;G++)for(var z=N[G],U=0;U<z.attributes.length;U++){var V=z.attributes[U];F=_0x42145e.mbxAttributeToCesiumVertexArrtribute(V,z,P[V.name],M.vertexOffset);D.push(F)}var k=O[i.id]||(O[i.id]=new c$13({context:_,attributes:D,indexBuffer:g.cesiumIndexBuffer}));R.vertexArray=k}w.u_depthRange=function(){return 1-a.range[0]},R.uniformMap=w,R.renderState=_0x42145e.toRenderState(s,a,_0x14ded5.disabled),R.shaderProgram=y,R.execute(_,n.passState)}i.paint._values["line-width"].value.value=C}}}}_0xdd5153();var _0x2f0753=(_0x93273f=!0,function(e,t){var i=_0x93273f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x93273f=!1,i}),_0x15f9b0=_0x2f0753(void 0,(function(){return _0x15f9b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x15f9b0).search("(((.+)+)+)+$")})),_0x93273f;function _0x3430ce(e,t,i,n){n.drawFillPattern=!0;var r=1/_0x2ddbe2(i,1,n);i.realtime&&(r*=2);var o=i.targetTileSize*i.x,a=i.targetTileSize*i.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[1,r,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[o>>16,a>>16],u_pixel_coord_lower:[65535&o,65535&a]}}_0x15f9b0();var _0x5f0fff=new e$2c,_0x13af2=new o$1o,_0x89f934=new o$1o,_0x6d75ff=new o$1o;function _0x21ea54(e,t,i,n){n.drawFillPattern=!0;var r=1/_0x2ddbe2(i,1,n);i.realtime&&(r*=2);var o=i.targetTileSize*i.x,a=i.targetTileSize*i.y;return e.u_image=function(){return n.image},e.u_texsize=function(){return _0x6d75ff.x=i.imageAtlasTexture.size[0],_0x6d75ff.y=i.imageAtlasTexture.size[1],_0x6d75ff},e.u_scale=function(){return _0x5f0fff.x=1,_0x5f0fff.y=r,_0x5f0fff.z=t.fromScale,_0x5f0fff.w=t.toScale,_0x5f0fff},e.u_fade=function(){return t.t},e.u_pixel_coord_lower=function(){return _0x13af2.x=65535&o,_0x13af2.y=65535&a,_0x13af2},e.u_pixel_coord_upper=function(){return _0x89f934.x=o>>16,_0x89f934.y=a>>16,_0x89f934},e}var _0x33b7f1={fillUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix)}},fillPatternUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_image:new _0x3d809b.Uniform1i(e,t.u_image),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_pixel_coord_upper:new _0x3d809b.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x3d809b.Uniform2f(e,t.u_pixel_coord_lower),u_scale:new _0x3d809b.Uniform4f(e,t.u_scale),u_fade:new _0x3d809b.Uniform1f(e,t.u_fade)}},fillOutlineUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_world:new _0x3d809b.Uniform2f(e,t.u_world)}},fillOutlinePatternUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_world:new _0x3d809b.Uniform2f(e,t.u_world),u_image:new _0x3d809b.Uniform1i(e,t.u_image),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_pixel_coord_upper:new _0x3d809b.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x3d809b.Uniform2f(e,t.u_pixel_coord_lower),u_scale:new _0x3d809b.Uniform4f(e,t.u_scale),u_fade:new _0x3d809b.Uniform1f(e,t.u_fade)}},fillUniformValues:function(e){return{u_matrix:e}},fillPatternUniformValues:function(e,t,i,n,r){return extend$1(_0x33b7f1.fillUniformValues(e),_0x3430ce(i,t,n,r))},fillOutlineUniformValues:function(e,t){return{u_matrix:e,u_world:t}},fillOutlinePatternUniformValues:function(e,t,i,n,r,o){return extend$1(_0x33b7f1.fillPatternUniformValues(e,t,i,n,o),{u_world:r})},fillUniformMap:function(e){var t={u_matrix:function(){return e}};return t},fillPatternUniformMap:function(e,t,i,n,r){var o=_0x33b7f1.fillUniformMap(e);return o=_0x21ea54(o,i,n,r)}},_0x4ad45b=new o$1o;_0x33b7f1.fillOutlineUniformMap=function(e,t){var i={u_matrix:function(){return e},u_world:function(){return _0x4ad45b.x=t[0],_0x4ad45b.y=t[1],_0x4ad45b}};return i},_0x33b7f1.fillOutlinePatternUniformMap=function(e,t,i,n,r,o){var a={};return(a=_0x33b7f1.fillPatternUniformMap(e,t,i,n,o)).u_world=function(){return _0x4ad45b.x=r[0],_0x4ad45b.y=r[1],_0x4ad45b},a};var _0x40efea=(_0x155751=!0,function(e,t){var i=_0x155751?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x155751=!1,i}),_0x435bd3=_0x40efea(void 0,(function(){return _0x435bd3.toString().search("(((.+)+)+)+$").toString().constructor(_0x435bd3).search("(((.+)+)+)+$")})),_0x155751;_0x435bd3();var _0xe6a69b=new Float32Array(16),_0x62ca62={};function _0x2f9946(e,t,i,n,r,o,a){var s,l,u,c,h=i.paint.get("fill-pattern"),d=h&&h.constantOr(1),f=i.getCrossfadeParameters(),p={};o?(l=d&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=W$18.LINES):(l=d?"fillPattern":"fill",s=W$18.TRIANGLES);var _=t.getBucket(i);if(_){var m=_.programConfigurations.get(i.id);d&&(t.imageAtlasTexture.bind(de$y.LINEAR,de$y.CLAMP_TO_EDGE),a.image=t.imageAtlasTexture.cesiumTexture,m.updatePatternPaintBuffers(f));var g=h.constantOr(null);if(g&&t.imageAtlas){var x=t.imageAtlas,y=x.patternPositions[g.to.toString()],v=x.patternPositions[g.from.toString()];y&&v&&m.setConstantPatternPositions(y,v)}var $=e.useProgram(l,m).cesiumProgram,b=t.viewProjection,T=p$1d.toArray(b,_0xe6a69b);if(o){c=_.cesiumIndexBuffer2,u=_.segments2;var C=[t.tileSize,t.tileSize];p="fillOutlinePattern"===l&&d?_0x33b7f1.fillOutlinePatternUniformMap(T,e,f,t,C,a):_0x33b7f1.fillOutlineUniformMap(T,C)}else c=_.cesiumIndexBuffer,u=_.segments,p=d?_0x33b7f1.fillPatternUniformMap(T,e,f,t,a):_0x33b7f1.fillUniformMap(T);var S=$.allUniforms;p=m.getUniformMaps(S,i.paint,p);for(var w=m.getPaintVertexBuffers(),E=m.getAttributeLocation(),P=0,A=u.get();P<A.length;P+=1){var L=A[P],M=(L.drawCommands||(L.drawCommands={}))[i.id];if(!M){var R=_0x62ca62[s];M=new i$$({cull:!1,primitiveType:s,count:L.primitiveLength*R,offset:L.primitiveOffset*R}),L.drawCommands[i.id]=M;for(var O=L.cesiumVaos||(L.cesiumVaos={}),D=[],I=0;I<_.layoutCesiumVertexBuffer.attributes.length;I++){var B=_.layoutCesiumVertexBuffer.attributes[I],F=_0x42145e.mbxAttributeToCesiumVertexArrtribute(B,_.layoutCesiumVertexBuffer,E[B.name],L.vertexOffset);D.push(F)}D.length;for(var N=0;N<w.length;N++)for(var G=w[N],z=0;z<G.attributes.length;z++){B=G.attributes[z],F=_0x42145e.mbxAttributeToCesiumVertexArrtribute(B,G,E[B.name],L.vertexOffset);D.push(F)}var U=O[i.id]||(O[i.id]=new c$13({context:e.cesiumContext,attributes:D,indexBuffer:c}));M.vertexArray=U}p.u_depthRange=function(){return 1-n.range[0]},M.uniformMap=p,M.renderState=_0x42145e.toRenderState(r,n,_0x14ded5.disabled),M.shaderProgram=$,M.execute(e.cesiumContext,a.passState)}}}function _0x107c4c(e,t,i,n){var r=i.paint.get("fill-color"),o=i.paint.get("fill-opacity"),a=o.value.value;if(o.value.value=0!==o.value.value?.5*o.value.value+.5:0,0!==o.constantOr(1)){var s=e.colorModeForRenderPass(),l=i.paint.get("fill-pattern").constantOr(1)||1!==r.constantOr(_0x546352.transparent).a||1!==o.constantOr(0)?"translucent":"opaque";if(e.renderPass===l){var u=e.depthModeForSublayer(1,"opaque"===e.renderPass?_0x4a9140.ReadWrite:_0x4a9140.ReadOnly);_0x2f9946(e,t,i,u,s,!1,n)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){var c=e.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,_0x4a9140.ReadOnly);_0x2f9946(e,t,i,c,s,!0,n)}o.value.value=a}}_0x62ca62[W$18.LINES]=2,_0x62ca62[W$18.TRIANGLES]=3,_0x62ca62[W$18.LINE_STRIP]=1;var _0x1d8edc=(_0xb25c9=!0,function(e,t){var i=_0xb25c9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb25c9=!1,i}),_0x472cf9=_0x1d8edc(void 0,(function(){return _0x472cf9.toString().search("(((.+)+)+)+$").toString().constructor(_0x472cf9).search("(((.+)+)+)+$")})),_0xb25c9;_0x472cf9();var _0x59678c=519,_0x55d1a3=7680,_0x7ad9f8=function(e,t,i,n,r,o){this.test=e,this.ref=t,this.mask=i,this.fail=n,this.depthFail=r,this.pass=o};_0x7ad9f8.disabled=new _0x7ad9f8({func:_0x59678c,mask:0},0,0,_0x55d1a3,_0x55d1a3,_0x55d1a3);var _0x2431d9=(_0x5d9ef5=!0,function(e,t){var i=_0x5d9ef5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d9ef5=!1,i}),_0x146408=_0x2431d9(void 0,(function(){return _0x146408.toString().search("(((.+)+)+)+$").toString().constructor(_0x146408).search("(((.+)+)+)+$")})),_0x5d9ef5;function _0x3fdff7(){}_0x146408();var _0x5709ba=1e-6,_0x478b64="undefined"!=typeof Float32Array?Float32Array:Array,_0x25d59d=Math.random;function _0x8ad248(e){_0x478b64=e}var _0x5efcb1=Math.PI/180;function _0x5657ed(e){return e*_0x5efcb1}function _0x161e6f(e,t){return Math.abs(e-t)<=_0x5709ba*Math.max(1,Math.abs(e),Math.abs(t))}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var _0xacb5eb=Object.freeze({EPSILON:_0x5709ba,get ARRAY_TYPE(){return _0x478b64},RANDOM:_0x25d59d,setMatrixArrayType:_0x8ad248,toRadian:_0x5657ed,equals:_0x161e6f});function _0x4d0990(){var e=new _0x478b64(4);return _0x478b64!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function _0x50eef9(e){var t=new _0x478b64(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function _0x2c70cf(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function _0x15bb2a(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e}function _0x1fca77(e,t,i,n){var r=new _0x478b64(4);return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function _0x44aafd(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e}function _0x3a2bc0(e,t){if(e===t){var i=t[1];e[1]=t[2],e[2]=i}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e}function _0x1b8ca3(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*o-r*n;return a?(a=1/a,e[0]=o*a,e[1]=-n*a,e[2]=-r*a,e[3]=i*a,e):null}function _0x59c235(e,t){var i=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=i,e}function _0x428c8d(e){return e[0]*e[3]-e[2]*e[1]}function _0xdc17a9(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*s+o*l,e[1]=r*s+a*l,e[2]=n*u+o*c,e[3]=r*u+a*c,e}function _0x40e99c(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+o*s,e[1]=r*l+a*s,e[2]=n*-s+o*l,e[3]=r*-s+a*l,e}function _0xdcb2c9(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1];return e[0]=n*s,e[1]=r*s,e[2]=o*l,e[3]=a*l,e}function _0xeca681(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=-i,e[3]=n,e}function _0x3e1fb5(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e}function _0x4e2ec4(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function _0x241736(e){return Math.hypot(e[0],e[1],e[2],e[3])}function _0xaabb0d(e,t,i,n){return e[2]=n[2]/n[0],i[0]=n[0],i[1]=n[1],i[3]=n[3]-e[2]*i[1],[e,t,i]}function _0x2e9752(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e}function _0x32e372(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e}function _0x43a072(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function _0x2c4b9e(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t[2],u=t[3];return Math.abs(i-a)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-s)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-l)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-u)<=_0x5709ba*Math.max(1,Math.abs(o),Math.abs(u))}function _0x6dcad9(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e}function _0xf83d92(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e}var _0x257578=_0xdc17a9,_0x8082eb=_0x32e372,_0x1b6186=Object.freeze({create:_0x4d0990,clone:_0x50eef9,copy:_0x2c70cf,identity:_0x15bb2a,fromValues:_0x1fca77,set:_0x44aafd,transpose:_0x3a2bc0,invert:_0x1b8ca3,adjoint:_0x59c235,determinant:_0x428c8d,multiply:_0xdc17a9,rotate:_0x40e99c,scale:_0xdcb2c9,fromRotation:_0xeca681,fromScaling:_0x3e1fb5,str:_0x4e2ec4,frob:_0x241736,LDU:_0xaabb0d,add:_0x2e9752,subtract:_0x32e372,exactEquals:_0x43a072,equals:_0x2c4b9e,multiplyScalar:_0x6dcad9,multiplyScalarAndAdd:_0xf83d92,mul:_0x257578,sub:_0x8082eb});function _0x58480f(){var e=new _0x478b64(6);return _0x478b64!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function _0x53e1b7(e){var t=new _0x478b64(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function _0x264847(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function _0x384039(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function _0x58bce6(e,t,i,n,r,o){var a=new _0x478b64(6);return a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=r,a[5]=o,a}function _0x387d13(e,t,i,n,r,o,a){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e}function _0x97989f(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=i*o-n*r;return l?(l=1/l,e[0]=o*l,e[1]=-n*l,e[2]=-r*l,e[3]=i*l,e[4]=(r*s-o*a)*l,e[5]=(n*a-i*s)*l,e):null}function _0x25a4d4(e){return e[0]*e[3]-e[1]*e[2]}function _0x53a372(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=i[0],c=i[1],h=i[2],d=i[3],f=i[4],p=i[5];return e[0]=n*u+o*c,e[1]=r*u+a*c,e[2]=n*h+o*d,e[3]=r*h+a*d,e[4]=n*f+o*p+s,e[5]=r*f+a*p+l,e}function _0x12385a(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=Math.sin(i),c=Math.cos(i);return e[0]=n*c+o*u,e[1]=r*c+a*u,e[2]=n*-u+o*c,e[3]=r*-u+a*c,e[4]=s,e[5]=l,e}function _0xb2e115(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=i[0],c=i[1];return e[0]=n*u,e[1]=r*u,e[2]=o*c,e[3]=a*c,e[4]=s,e[5]=l,e}function _0x374caa(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=i[0],c=i[1];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=n*u+o*c+s,e[5]=r*u+a*c+l,e}function _0xfc544(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=-i,e[3]=n,e[4]=0,e[5]=0,e}function _0x575621(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function _0x22d373(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function _0x505322(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function _0x524e35(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],1)}function _0x421cd8(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e}function _0x4f19e5(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e}function _0xddec23(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e}function _0x3a41e8(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e}function _0x2ff38a(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function _0x44c514(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],u=t[1],c=t[2],h=t[3],d=t[4],f=t[5];return Math.abs(i-l)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(n-u)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(r-c)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(o-h)<=_0x5709ba*Math.max(1,Math.abs(o),Math.abs(h))&&Math.abs(a-d)<=_0x5709ba*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(s-f)<=_0x5709ba*Math.max(1,Math.abs(s),Math.abs(f))}var _0x19a1df=_0x53a372,_0x4c3476=_0x4f19e5,_0x376082=Object.freeze({create:_0x58480f,clone:_0x53e1b7,copy:_0x264847,identity:_0x384039,fromValues:_0x58bce6,set:_0x387d13,invert:_0x97989f,determinant:_0x25a4d4,multiply:_0x53a372,rotate:_0x12385a,scale:_0xb2e115,translate:_0x374caa,fromRotation:_0xfc544,fromScaling:_0x575621,fromTranslation:_0x22d373,str:_0x505322,frob:_0x524e35,add:_0x421cd8,subtract:_0x4f19e5,multiplyScalar:_0xddec23,multiplyScalarAndAdd:_0x3a41e8,exactEquals:_0x2ff38a,equals:_0x44c514,mul:_0x19a1df,sub:_0x4c3476});function _0x165677(){var e=new _0x478b64(9);return _0x478b64!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function _0x3cc0e4(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function _0x263ce8(e){var t=new _0x478b64(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function _0x500b24(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function _0x2ec246(e,t,i,n,r,o,a,s,l){var u=new _0x478b64(9);return u[0]=e,u[1]=t,u[2]=i,u[3]=n,u[4]=r,u[5]=o,u[6]=a,u[7]=s,u[8]=l,u}function _0x51ce8d(e,t,i,n,r,o,a,s,l,u){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e[8]=u,e}function _0x11a5d2(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _0x405464(e,t){if(e===t){var i=t[1],n=t[2],r=t[5];e[1]=t[3],e[2]=t[6],e[3]=i,e[5]=t[7],e[6]=n,e[7]=r}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function _0xe55b52(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=c*a-s*u,d=-c*o+s*l,f=u*o-a*l,p=i*h+n*d+r*f;return p?(p=1/p,e[0]=h*p,e[1]=(-c*n+r*u)*p,e[2]=(s*n-r*a)*p,e[3]=d*p,e[4]=(c*i-r*l)*p,e[5]=(-s*i+r*o)*p,e[6]=f*p,e[7]=(-u*i+n*l)*p,e[8]=(a*i-n*o)*p,e):null}function _0x5b8a66(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8];return e[0]=a*c-s*u,e[1]=r*u-n*c,e[2]=n*s-r*a,e[3]=s*l-o*c,e[4]=i*c-r*l,e[5]=r*o-i*s,e[6]=o*u-a*l,e[7]=n*l-i*u,e[8]=i*a-n*o,e}function _0x1bbb27(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8];return t*(u*o-a*l)+i*(-u*r+a*s)+n*(l*r-o*s)}function _0x330f12(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=i[0],f=i[1],p=i[2],_=i[3],m=i[4],g=i[5],x=i[6],y=i[7],v=i[8];return e[0]=d*n+f*a+p*u,e[1]=d*r+f*s+p*c,e[2]=d*o+f*l+p*h,e[3]=_*n+m*a+g*u,e[4]=_*r+m*s+g*c,e[5]=_*o+m*l+g*h,e[6]=x*n+y*a+v*u,e[7]=x*r+y*s+v*c,e[8]=x*o+y*l+v*h,e}function _0x1fcec8(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=i[0],f=i[1];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=d*n+f*a+u,e[7]=d*r+f*s+c,e[8]=d*o+f*l+h,e}function _0x3d4eb8(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=Math.sin(i),f=Math.cos(i);return e[0]=f*n+d*a,e[1]=f*r+d*s,e[2]=f*o+d*l,e[3]=f*a-d*n,e[4]=f*s-d*r,e[5]=f*l-d*o,e[6]=u,e[7]=c,e[8]=h,e}function _0x278612(e,t,i){var n=i[0],r=i[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function _0x5c0771(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function _0x115457(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=0,e[3]=-i,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _0x1d0d22(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function _0xd27f02(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function _0x43e84e(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i+i,s=n+n,l=r+r,u=i*a,c=n*a,h=n*s,d=r*a,f=r*s,p=r*l,_=o*a,m=o*s,g=o*l;return e[0]=1-h-p,e[3]=c-g,e[6]=d+m,e[1]=c+g,e[4]=1-u-p,e[7]=f-_,e[2]=d-m,e[5]=f+_,e[8]=1-u-h,e}function _0x284203(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15],x=i*s-n*a,y=i*l-r*a,v=i*u-o*a,$=n*l-r*s,b=n*u-o*s,T=r*u-o*l,C=c*_-h*p,S=c*m-d*p,w=c*g-f*p,E=h*m-d*_,P=h*g-f*_,A=d*g-f*m,L=x*A-y*P+v*E+$*w-b*S+T*C;return L?(L=1/L,e[0]=(s*A-l*P+u*E)*L,e[1]=(l*w-a*A-u*S)*L,e[2]=(a*P-s*w+u*C)*L,e[3]=(r*P-n*A-o*E)*L,e[4]=(i*A-r*w+o*S)*L,e[5]=(n*w-i*P-o*C)*L,e[6]=(_*T-m*b+g*$)*L,e[7]=(m*v-p*T-g*y)*L,e[8]=(p*b-_*v+g*x)*L,e):null}function _0x168004(e,t,i){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/i,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function _0x123a99(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function _0x25589f(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function _0xae246e(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e[8]=t[8]+i[8],e}function _0x3bcbe6(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e[6]=t[6]-i[6],e[7]=t[7]-i[7],e[8]=t[8]-i[8],e}function _0x4660c6(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*i,e}function _0x37c2dc(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e[6]=t[6]+i[6]*n,e[7]=t[7]+i[7]*n,e[8]=t[8]+i[8]*n,e}function _0x236319(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]}function _0x19ed66(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=t[0],d=t[1],f=t[2],p=t[3],_=t[4],m=t[5],g=t[6],x=t[7],y=t[8];return Math.abs(i-h)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(n-d)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(r-f)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(o-p)<=_0x5709ba*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-_)<=_0x5709ba*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(s-m)<=_0x5709ba*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(l-g)<=_0x5709ba*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(u-x)<=_0x5709ba*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(c-y)<=_0x5709ba*Math.max(1,Math.abs(c),Math.abs(y))}var _0x404431=_0x330f12,_0xcd49f7=_0x3bcbe6,_0x499ef9=Object.freeze({create:_0x165677,fromMat4:_0x3cc0e4,clone:_0x263ce8,copy:_0x500b24,fromValues:_0x2ec246,set:_0x51ce8d,identity:_0x11a5d2,transpose:_0x405464,invert:_0xe55b52,adjoint:_0x5b8a66,determinant:_0x1bbb27,multiply:_0x330f12,translate:_0x1fcec8,rotate:_0x3d4eb8,scale:_0x278612,fromTranslation:_0x5c0771,fromRotation:_0x115457,fromScaling:_0x1d0d22,fromMat2d:_0xd27f02,fromQuat:_0x43e84e,normalFromMat4:_0x284203,projection:_0x168004,str:_0x123a99,frob:_0x25589f,add:_0xae246e,subtract:_0x3bcbe6,multiplyScalar:_0x4660c6,multiplyScalarAndAdd:_0x37c2dc,exactEquals:_0x236319,equals:_0x19ed66,mul:_0x404431,sub:_0xcd49f7});function _0x148135(){var e=new _0x478b64(16);return _0x478b64!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function _0x2485dc(e){var t=new _0x478b64(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function _0x1e89b9(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function _0x48a726(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=new _0x478b64(16);return m[0]=e,m[1]=t,m[2]=i,m[3]=n,m[4]=r,m[5]=o,m[6]=a,m[7]=s,m[8]=l,m[9]=u,m[10]=c,m[11]=h,m[12]=d,m[13]=f,m[14]=p,m[15]=_,m}function _0x8dbbe7(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e[8]=u,e[9]=c,e[10]=h,e[11]=d,e[12]=f,e[13]=p,e[14]=_,e[15]=m,e}function _0x39dd51(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x23fe50(e,t){if(e===t){var i=t[1],n=t[2],r=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=i,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=o,e[11]=t[14],e[12]=r,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function _0x641fbd(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15],x=i*s-n*a,y=i*l-r*a,v=i*u-o*a,$=n*l-r*s,b=n*u-o*s,T=r*u-o*l,C=c*_-h*p,S=c*m-d*p,w=c*g-f*p,E=h*m-d*_,P=h*g-f*_,A=d*g-f*m,L=x*A-y*P+v*E+$*w-b*S+T*C;return L?(L=1/L,e[0]=(s*A-l*P+u*E)*L,e[1]=(r*P-n*A-o*E)*L,e[2]=(_*T-m*b+g*$)*L,e[3]=(d*b-h*T-f*$)*L,e[4]=(l*w-a*A-u*S)*L,e[5]=(i*A-r*w+o*S)*L,e[6]=(m*v-p*T-g*y)*L,e[7]=(c*T-d*v+f*y)*L,e[8]=(a*P-s*w+u*C)*L,e[9]=(n*w-i*P-o*C)*L,e[10]=(p*b-_*v+g*x)*L,e[11]=(h*v-c*b-f*x)*L,e[12]=(s*S-a*E-l*C)*L,e[13]=(i*E-n*S+r*C)*L,e[14]=(_*y-p*$-m*x)*L,e[15]=(c*$-h*y+d*x)*L,e):null}function _0x5b852d(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],_=t[13],m=t[14],g=t[15];return e[0]=s*(d*g-f*m)-h*(l*g-u*m)+_*(l*f-u*d),e[1]=-(n*(d*g-f*m)-h*(r*g-o*m)+_*(r*f-o*d)),e[2]=n*(l*g-u*m)-s*(r*g-o*m)+_*(r*u-o*l),e[3]=-(n*(l*f-u*d)-s*(r*f-o*d)+h*(r*u-o*l)),e[4]=-(a*(d*g-f*m)-c*(l*g-u*m)+p*(l*f-u*d)),e[5]=i*(d*g-f*m)-c*(r*g-o*m)+p*(r*f-o*d),e[6]=-(i*(l*g-u*m)-a*(r*g-o*m)+p*(r*u-o*l)),e[7]=i*(l*f-u*d)-a*(r*f-o*d)+c*(r*u-o*l),e[8]=a*(h*g-f*_)-c*(s*g-u*_)+p*(s*f-u*h),e[9]=-(i*(h*g-f*_)-c*(n*g-o*_)+p*(n*f-o*h)),e[10]=i*(s*g-u*_)-a*(n*g-o*_)+p*(n*u-o*s),e[11]=-(i*(s*f-u*h)-a*(n*f-o*h)+c*(n*u-o*s)),e[12]=-(a*(h*m-d*_)-c*(s*m-l*_)+p*(s*d-l*h)),e[13]=i*(h*m-d*_)-c*(n*m-r*_)+p*(n*d-r*h),e[14]=-(i*(s*m-l*_)-a*(n*m-r*_)+p*(n*l-r*s)),e[15]=i*(s*d-l*h)-a*(n*d-r*h)+c*(n*l-r*s),e}function _0x548f9f(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],f=e[12],p=e[13],_=e[14],m=e[15];return(t*a-i*o)*(h*m-d*_)-(t*s-n*o)*(c*m-d*p)+(t*l-r*o)*(c*_-h*p)+(i*s-n*a)*(u*m-d*f)-(i*l-r*a)*(u*_-h*f)+(n*l-r*s)*(u*p-c*f)}function _0x3f870d(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=t[9],f=t[10],p=t[11],_=t[12],m=t[13],g=t[14],x=t[15],y=i[0],v=i[1],$=i[2],b=i[3];return e[0]=y*n+v*s+$*h+b*_,e[1]=y*r+v*l+$*d+b*m,e[2]=y*o+v*u+$*f+b*g,e[3]=y*a+v*c+$*p+b*x,y=i[4],v=i[5],$=i[6],b=i[7],e[4]=y*n+v*s+$*h+b*_,e[5]=y*r+v*l+$*d+b*m,e[6]=y*o+v*u+$*f+b*g,e[7]=y*a+v*c+$*p+b*x,y=i[8],v=i[9],$=i[10],b=i[11],e[8]=y*n+v*s+$*h+b*_,e[9]=y*r+v*l+$*d+b*m,e[10]=y*o+v*u+$*f+b*g,e[11]=y*a+v*c+$*p+b*x,y=i[12],v=i[13],$=i[14],b=i[15],e[12]=y*n+v*s+$*h+b*_,e[13]=y*r+v*l+$*d+b*m,e[14]=y*o+v*u+$*f+b*g,e[15]=y*a+v*c+$*p+b*x,e}function _0x42cc51(e,t,i){var n,r,o,a,s,l,u,c,h,d,f,p,_=i[0],m=i[1],g=i[2];return t===e?(e[12]=t[0]*_+t[4]*m+t[8]*g+t[12],e[13]=t[1]*_+t[5]*m+t[9]*g+t[13],e[14]=t[2]*_+t[6]*m+t[10]*g+t[14],e[15]=t[3]*_+t[7]*m+t[11]*g+t[15]):(n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=n*_+s*m+h*g+t[12],e[13]=r*_+l*m+d*g+t[13],e[14]=o*_+u*m+f*g+t[14],e[15]=a*_+c*m+p*g+t[15]),e}function _0x7eea2a(e,t,i){var n=i[0],r=i[1],o=i[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function _0x51a64c(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S,w,E,P=n[0],A=n[1],L=n[2],M=Math.hypot(P,A,L);return M<_0x5709ba?null:(P*=M=1/M,A*=M,L*=M,r=Math.sin(i),a=1-(o=Math.cos(i)),s=t[0],l=t[1],u=t[2],c=t[3],h=t[4],d=t[5],f=t[6],p=t[7],_=t[8],m=t[9],g=t[10],x=t[11],y=P*P*a+o,v=A*P*a+L*r,$=L*P*a-A*r,b=P*A*a-L*r,T=A*A*a+o,C=L*A*a+P*r,S=P*L*a+A*r,w=A*L*a-P*r,E=L*L*a+o,e[0]=s*y+h*v+_*$,e[1]=l*y+d*v+m*$,e[2]=u*y+f*v+g*$,e[3]=c*y+p*v+x*$,e[4]=s*b+h*T+_*C,e[5]=l*b+d*T+m*C,e[6]=u*b+f*T+g*C,e[7]=c*b+p*T+x*C,e[8]=s*S+h*w+_*E,e[9]=l*S+d*w+m*E,e[10]=u*S+f*w+g*E,e[11]=c*S+p*w+x*E,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function _0x42f943(e,t,i){var n=Math.sin(i),r=Math.cos(i),o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*r+u*n,e[5]=a*r+c*n,e[6]=s*r+h*n,e[7]=l*r+d*n,e[8]=u*r-o*n,e[9]=c*r-a*n,e[10]=h*r-s*n,e[11]=d*r-l*n,e}function _0x3a801d(e,t,i){var n=Math.sin(i),r=Math.cos(i),o=t[0],a=t[1],s=t[2],l=t[3],u=t[8],c=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*r-u*n,e[1]=a*r-c*n,e[2]=s*r-h*n,e[3]=l*r-d*n,e[8]=o*n+u*r,e[9]=a*n+c*r,e[10]=s*n+h*r,e[11]=l*n+d*r,e}function _0x29a78d(e,t,i){var n=Math.sin(i),r=Math.cos(i),o=t[0],a=t[1],s=t[2],l=t[3],u=t[4],c=t[5],h=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*r+u*n,e[1]=a*r+c*n,e[2]=s*r+h*n,e[3]=l*r+d*n,e[4]=u*r-o*n,e[5]=c*r-a*n,e[6]=h*r-s*n,e[7]=d*r-l*n,e}function _0x5dba4d(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function _0x3066b8(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x296965(e,t,i){var n,r,o,a=i[0],s=i[1],l=i[2],u=Math.hypot(a,s,l);return u<_0x5709ba?null:(a*=u=1/u,s*=u,l*=u,n=Math.sin(t),o=1-(r=Math.cos(t)),e[0]=a*a*o+r,e[1]=s*a*o+l*n,e[2]=l*a*o-s*n,e[3]=0,e[4]=a*s*o-l*n,e[5]=s*s*o+r,e[6]=l*s*o+a*n,e[7]=0,e[8]=a*l*o+s*n,e[9]=s*l*o-a*n,e[10]=l*l*o+r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function _0xc4ed47(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=i,e[7]=0,e[8]=0,e[9]=-i,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x114fe9(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-i,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=i,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x547bdd(e,t){var i=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=i,e[2]=0,e[3]=0,e[4]=-i,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x4c1ff5(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=n+n,l=r+r,u=o+o,c=n*s,h=n*l,d=n*u,f=r*l,p=r*u,_=o*u,m=a*s,g=a*l,x=a*u;return e[0]=1-(f+_),e[1]=h+x,e[2]=d-g,e[3]=0,e[4]=h-x,e[5]=1-(c+_),e[6]=p+m,e[7]=0,e[8]=d+g,e[9]=p-m,e[10]=1-(c+f),e[11]=0,e[12]=i[0],e[13]=i[1],e[14]=i[2],e[15]=1,e}function _0x5d2f5a(e,t){var i=new _0x478b64(3),n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=n*n+r*r+o*o+a*a;return h>0?(i[0]=2*(s*a+c*n+l*o-u*r)/h,i[1]=2*(l*a+c*r+u*n-s*o)/h,i[2]=2*(u*a+c*o+s*r-l*n)/h):(i[0]=2*(s*a+c*n+l*o-u*r),i[1]=2*(l*a+c*r+u*n-s*o),i[2]=2*(u*a+c*o+s*r-l*n)),_0x4c1ff5(e,t,i),e}function _0x13f7d5(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function _0x13b0ab(e,t){var i=t[0],n=t[1],r=t[2],o=t[4],a=t[5],s=t[6],l=t[8],u=t[9],c=t[10];return e[0]=Math.hypot(i,n,r),e[1]=Math.hypot(o,a,s),e[2]=Math.hypot(l,u,c),e}function _0x390d2d(e,t){var i=new _0x478b64(3);_0x13b0ab(i,t);var n=1/i[0],r=1/i[1],o=1/i[2],a=t[0]*n,s=t[1]*r,l=t[2]*o,u=t[4]*n,c=t[5]*r,h=t[6]*o,d=t[8]*n,f=t[9]*r,p=t[10]*o,_=a+c+p,m=0;return _>0?(m=2*Math.sqrt(_+1),e[3]=.25*m,e[0]=(h-f)/m,e[1]=(d-l)/m,e[2]=(s-u)/m):a>c&&a>p?(m=2*Math.sqrt(1+a-c-p),e[3]=(h-f)/m,e[0]=.25*m,e[1]=(s+u)/m,e[2]=(d+l)/m):c>p?(m=2*Math.sqrt(1+c-a-p),e[3]=(d-l)/m,e[0]=(s+u)/m,e[1]=.25*m,e[2]=(h+f)/m):(m=2*Math.sqrt(1+p-a-c),e[3]=(s-u)/m,e[0]=(d+l)/m,e[1]=(h+f)/m,e[2]=.25*m),e}function _0x4e6248(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=t[3],l=r+r,u=o+o,c=a+a,h=r*l,d=r*u,f=r*c,p=o*u,_=o*c,m=a*c,g=s*l,x=s*u,y=s*c,v=n[0],$=n[1],b=n[2];return e[0]=(1-(p+m))*v,e[1]=(d+y)*v,e[2]=(f-x)*v,e[3]=0,e[4]=(d-y)*$,e[5]=(1-(h+m))*$,e[6]=(_+g)*$,e[7]=0,e[8]=(f+x)*b,e[9]=(_-g)*b,e[10]=(1-(h+p))*b,e[11]=0,e[12]=i[0],e[13]=i[1],e[14]=i[2],e[15]=1,e}function _0x565c90(e,t,i,n,r){var o=t[0],a=t[1],s=t[2],l=t[3],u=o+o,c=a+a,h=s+s,d=o*u,f=o*c,p=o*h,_=a*c,m=a*h,g=s*h,x=l*u,y=l*c,v=l*h,$=n[0],b=n[1],T=n[2],C=r[0],S=r[1],w=r[2],E=(1-(_+g))*$,P=(f+v)*$,A=(p-y)*$,L=(f-v)*b,M=(1-(d+g))*b,R=(m+x)*b,O=(p+y)*T,D=(m-x)*T,I=(1-(d+_))*T;return e[0]=E,e[1]=P,e[2]=A,e[3]=0,e[4]=L,e[5]=M,e[6]=R,e[7]=0,e[8]=O,e[9]=D,e[10]=I,e[11]=0,e[12]=i[0]+C-(E*C+L*S+O*w),e[13]=i[1]+S-(P*C+M*S+D*w),e[14]=i[2]+w-(A*C+R*S+I*w),e[15]=1,e}function _0x146f85(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i+i,s=n+n,l=r+r,u=i*a,c=n*a,h=n*s,d=r*a,f=r*s,p=r*l,_=o*a,m=o*s,g=o*l;return e[0]=1-h-p,e[1]=c+g,e[2]=d-m,e[3]=0,e[4]=c-g,e[5]=1-u-p,e[6]=f+_,e[7]=0,e[8]=d+m,e[9]=f-_,e[10]=1-u-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _0x3aac28(e,t,i,n,r,o,a){var s=1/(i-t),l=1/(r-n),u=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(i+t)*s,e[9]=(r+n)*l,e[10]=(a+o)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*u,e[15]=0,e}function _0x39f49a(e,t,i,n,r){var o,a=1/Math.tan(t/2);return e[0]=a/i,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=r&&r!==1/0?(o=1/(n-r),e[10]=(r+n)*o,e[14]=2*r*n*o):(e[10]=-1,e[14]=-2*n),e}function _0x3642c0(e,t,i,n){var r=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(r+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(r-o)*u*.5,e[10]=n/(i-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*i/(i-n),e[15]=0,e}function _0x786534(e,t,i,n,r,o,a){var s=1/(t-i),l=1/(n-r),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+i)*s,e[13]=(r+n)*l,e[14]=(a+o)*u,e[15]=1,e}function _0x3f49b6(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p=t[0],_=t[1],m=t[2],g=n[0],x=n[1],y=n[2],v=i[0],$=i[1],b=i[2];return Math.abs(p-v)<_0x5709ba&&Math.abs(_-$)<_0x5709ba&&Math.abs(m-b)<_0x5709ba?_0x39dd51(e):(c=p-v,h=_-$,d=m-b,r=x*(d*=f=1/Math.hypot(c,h,d))-y*(h*=f),o=y*(c*=f)-g*d,a=g*h-x*c,(f=Math.hypot(r,o,a))?(r*=f=1/f,o*=f,a*=f):(r=0,o=0,a=0),s=h*a-d*o,l=d*r-c*a,u=c*o-h*r,(f=Math.hypot(s,l,u))?(s*=f=1/f,l*=f,u*=f):(s=0,l=0,u=0),e[0]=r,e[1]=s,e[2]=c,e[3]=0,e[4]=o,e[5]=l,e[6]=h,e[7]=0,e[8]=a,e[9]=u,e[10]=d,e[11]=0,e[12]=-(r*p+o*_+a*m),e[13]=-(s*p+l*_+u*m),e[14]=-(c*p+h*_+d*m),e[15]=1,e)}function _0x1e920f(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=n[0],l=n[1],u=n[2],c=r-i[0],h=o-i[1],d=a-i[2],f=c*c+h*h+d*d;f>0&&(c*=f=1/Math.sqrt(f),h*=f,d*=f);var p=l*d-u*h,_=u*c-s*d,m=s*h-l*c;return(f=p*p+_*_+m*m)>0&&(p*=f=1/Math.sqrt(f),_*=f,m*=f),e[0]=p,e[1]=_,e[2]=m,e[3]=0,e[4]=h*m-d*_,e[5]=d*p-c*m,e[6]=c*_-h*p,e[7]=0,e[8]=c,e[9]=h,e[10]=d,e[11]=0,e[12]=r,e[13]=o,e[14]=a,e[15]=1,e}function _0x3bb774(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function _0x1a9bc2(e){return Math.hypot(e[0],e[1],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function _0x5e7983(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e[8]=t[8]+i[8],e[9]=t[9]+i[9],e[10]=t[10]+i[10],e[11]=t[11]+i[11],e[12]=t[12]+i[12],e[13]=t[13]+i[13],e[14]=t[14]+i[14],e[15]=t[15]+i[15],e}function _0x1520e1(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e[6]=t[6]-i[6],e[7]=t[7]-i[7],e[8]=t[8]-i[8],e[9]=t[9]-i[9],e[10]=t[10]-i[10],e[11]=t[11]-i[11],e[12]=t[12]-i[12],e[13]=t[13]-i[13],e[14]=t[14]-i[14],e[15]=t[15]-i[15],e}function _0x3c83c6(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12]*i,e[13]=t[13]*i,e[14]=t[14]*i,e[15]=t[15]*i,e}function _0x2b17e7(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e[4]=t[4]+i[4]*n,e[5]=t[5]+i[5]*n,e[6]=t[6]+i[6]*n,e[7]=t[7]+i[7]*n,e[8]=t[8]+i[8]*n,e[9]=t[9]+i[9]*n,e[10]=t[10]+i[10]*n,e[11]=t[11]+i[11]*n,e[12]=t[12]+i[12]*n,e[13]=t[13]+i[13]*n,e[14]=t[14]+i[14]*n,e[15]=t[15]+i[15]*n,e}function _0x64253b(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function _0x5428fd(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],p=e[12],_=e[13],m=e[14],g=e[15],x=t[0],y=t[1],v=t[2],$=t[3],b=t[4],T=t[5],C=t[6],S=t[7],w=t[8],E=t[9],P=t[10],A=t[11],L=t[12],M=t[13],R=t[14],O=t[15];return Math.abs(i-x)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(n-y)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-v)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(o-$)<=_0x5709ba*Math.max(1,Math.abs(o),Math.abs($))&&Math.abs(a-b)<=_0x5709ba*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(s-T)<=_0x5709ba*Math.max(1,Math.abs(s),Math.abs(T))&&Math.abs(l-C)<=_0x5709ba*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(u-S)<=_0x5709ba*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-w)<=_0x5709ba*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(h-E)<=_0x5709ba*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-P)<=_0x5709ba*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(f-A)<=_0x5709ba*Math.max(1,Math.abs(f),Math.abs(A))&&Math.abs(p-L)<=_0x5709ba*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(_-M)<=_0x5709ba*Math.max(1,Math.abs(_),Math.abs(M))&&Math.abs(m-R)<=_0x5709ba*Math.max(1,Math.abs(m),Math.abs(R))&&Math.abs(g-O)<=_0x5709ba*Math.max(1,Math.abs(g),Math.abs(O))}var _0x58ecd9=_0x3f870d,_0x5f2858=_0x1520e1,_0x479473=Object.freeze({create:_0x148135,clone:_0x2485dc,copy:_0x1e89b9,fromValues:_0x48a726,set:_0x8dbbe7,identity:_0x39dd51,transpose:_0x23fe50,invert:_0x641fbd,adjoint:_0x5b852d,determinant:_0x548f9f,multiply:_0x3f870d,translate:_0x42cc51,scale:_0x7eea2a,rotate:_0x51a64c,rotateX:_0x42f943,rotateY:_0x3a801d,rotateZ:_0x29a78d,fromTranslation:_0x5dba4d,fromScaling:_0x3066b8,fromRotation:_0x296965,fromXRotation:_0xc4ed47,fromYRotation:_0x114fe9,fromZRotation:_0x547bdd,fromRotationTranslation:_0x4c1ff5,fromQuat2:_0x5d2f5a,getTranslation:_0x13f7d5,getScaling:_0x13b0ab,getRotation:_0x390d2d,fromRotationTranslationScale:_0x4e6248,fromRotationTranslationScaleOrigin:_0x565c90,fromQuat:_0x146f85,frustum:_0x3aac28,perspective:_0x39f49a,perspectiveFromFieldOfView:_0x3642c0,ortho:_0x786534,lookAt:_0x3f49b6,targetTo:_0x1e920f,str:_0x3bb774,frob:_0x1a9bc2,add:_0x5e7983,subtract:_0x1520e1,multiplyScalar:_0x3c83c6,multiplyScalarAndAdd:_0x2b17e7,exactEquals:_0x64253b,equals:_0x5428fd,mul:_0x58ecd9,sub:_0x5f2858});function _0x1ed7cc(){var e=new _0x478b64(3);return _0x478b64!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function _0x2565bd(e){var t=new _0x478b64(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function _0x70ae2b(e){var t=e[0],i=e[1],n=e[2];return Math.hypot(t,i,n)}function _0x4da1cb(e,t,i){var n=new _0x478b64(3);return n[0]=e,n[1]=t,n[2]=i,n}function _0x4382b2(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function _0x4983a6(e,t,i,n){return e[0]=t,e[1]=i,e[2]=n,e}function _0x5b4689(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e}function _0x4a4fe0(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e}function _0x560fbd(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e}function _0x6fb566(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e}function _0x465caf(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function _0x5280ed(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function _0x354fa8(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e}function _0x3d057f(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e}function _0x4b35d9(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function _0x35de5d(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function _0x25afdb(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e}function _0x46578a(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return Math.hypot(i,n,r)}function _0x50140c(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return i*i+n*n+r*r}function _0x27de00(e){var t=e[0],i=e[1],n=e[2];return t*t+i*i+n*n}function _0x4f2176(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function _0x38c858(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function _0x4ab974(e,t){var i=t[0],n=t[1],r=t[2],o=i*i+n*n+r*r;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function _0x1dd150(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function _0x2cf175(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[0],s=i[1],l=i[2];return e[0]=r*l-o*s,e[1]=o*a-n*l,e[2]=n*s-r*a,e}function _0x4f5131(e,t,i,n){var r=t[0],o=t[1],a=t[2];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e[2]=a+n*(i[2]-a),e}function _0x38746a(e,t,i,n,r,o){var a=o*o,s=a*(2*o-3)+1,l=a*(o-2)+o,u=a*(o-1),c=a*(3-2*o);return e[0]=t[0]*s+i[0]*l+n[0]*u+r[0]*c,e[1]=t[1]*s+i[1]*l+n[1]*u+r[1]*c,e[2]=t[2]*s+i[2]*l+n[2]*u+r[2]*c,e}function _0x5d4752(e,t,i,n,r,o){var a=1-o,s=a*a,l=o*o,u=s*a,c=3*o*s,h=3*l*a,d=l*o;return e[0]=t[0]*u+i[0]*c+n[0]*h+r[0]*d,e[1]=t[1]*u+i[1]*c+n[1]*h+r[1]*d,e[2]=t[2]*u+i[2]*c+n[2]*h+r[2]*d,e}function _0x4886b6(e,t){t=t||1;var i=2*_0x25d59d()*Math.PI,n=2*_0x25d59d()-1,r=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(i)*r,e[1]=Math.sin(i)*r,e[2]=n*t,e}function _0x1fd49b(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,e[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,e[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,e[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,e}function _0x3b721b(e,t,i){var n=t[0],r=t[1],o=t[2];return e[0]=n*i[0]+r*i[3]+o*i[6],e[1]=n*i[1]+r*i[4]+o*i[7],e[2]=n*i[2]+r*i[5]+o*i[8],e}function _0x4856c5(e,t,i){var n=i[0],r=i[1],o=i[2],a=i[3],s=t[0],l=t[1],u=t[2],c=r*u-o*l,h=o*s-n*u,d=n*l-r*s,f=r*d-o*h,p=o*c-n*d,_=n*h-r*c,m=2*a;return c*=m,h*=m,d*=m,f*=2,p*=2,_*=2,e[0]=s+c+f,e[1]=l+h+p,e[2]=u+d+_,e}function _0xaeb89d(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[0],o[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),o[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x117593(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),o[1]=r[1],o[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x13f5a0(e,t,i,n){var r=[],o=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],o[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),o[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),o[2]=r[2],e[0]=o[0]+i[0],e[1]=o[1]+i[1],e[2]=o[2]+i[2],e}function _0x3cd2cd(e,t){var i=_0x4da1cb(e[0],e[1],e[2]),n=_0x4da1cb(t[0],t[1],t[2]);_0x4ab974(i,i),_0x4ab974(n,n);var r=_0x1dd150(i,n);return r>1?0:r<-1?Math.PI:Math.acos(r)}function _0x41cff5(e){return e[0]=0,e[1]=0,e[2]=0,e}function _0x4caa61(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function _0x1f5072(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function _0x5ed1fd(e,t){var i=e[0],n=e[1],r=e[2],o=t[0],a=t[1],s=t[2];return Math.abs(i-o)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-a)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(s))}var _0x19d537=_0x4a4fe0,_0xcac922=_0x560fbd,_0x55e30e=_0x6fb566,_0x5df16c=_0x46578a,_0x98693a=_0x50140c,_0x68b465=_0x70ae2b,_0x2a3068=_0x27de00,_0x168a10=(_0xae561a=_0x1ed7cc(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=3),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a<s;a+=t)_0xae561a[0]=e[a],_0xae561a[1]=e[a+1],_0xae561a[2]=e[a+2],r(_0xae561a,_0xae561a,o),e[a]=_0xae561a[0],e[a+1]=_0xae561a[1],e[a+2]=_0xae561a[2];return e}),_0x56f8e5=Object.freeze({create:_0x1ed7cc,clone:_0x2565bd,length:_0x70ae2b,fromValues:_0x4da1cb,copy:_0x4382b2,set:_0x4983a6,add:_0x5b4689,subtract:_0x4a4fe0,multiply:_0x560fbd,divide:_0x6fb566,ceil:_0x465caf,floor:_0x5280ed,min:_0x354fa8,max:_0x3d057f,round:_0x4b35d9,scale:_0x35de5d,scaleAndAdd:_0x25afdb,distance:_0x46578a,squaredDistance:_0x50140c,squaredLength:_0x27de00,negate:_0x4f2176,inverse:_0x38c858,normalize:_0x4ab974,dot:_0x1dd150,cross:_0x2cf175,lerp:_0x4f5131,hermite:_0x38746a,bezier:_0x5d4752,random:_0x4886b6,transformMat4:_0x1fd49b,transformMat3:_0x3b721b,transformQuat:_0x4856c5,rotateX:_0xaeb89d,rotateY:_0x117593,rotateZ:_0x13f5a0,angle:_0x3cd2cd,zero:_0x41cff5,str:_0x4caa61,exactEquals:_0x1f5072,equals:_0x5ed1fd,sub:_0x19d537,mul:_0xcac922,div:_0x55e30e,dist:_0x5df16c,sqrDist:_0x98693a,len:_0x68b465,sqrLen:_0x2a3068,forEach:_0x168a10}),_0xae561a;function _0x436525(){var e=new _0x478b64(4);return _0x478b64!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function _0x433c65(e){var t=new _0x478b64(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function _0x53d10d(e,t,i,n){var r=new _0x478b64(4);return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function _0x3d5978(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function _0x806771(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e}function _0x54364d(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e}function _0x471a58(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e}function _0xb85b76(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e[3]=t[3]*i[3],e}function _0x53b3af(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e[3]=t[3]/i[3],e}function _0x29e796(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e}function _0x58e4df(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e}function _0xb76ff6(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e[3]=Math.min(t[3],i[3]),e}function _0x121a7f(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e[3]=Math.max(t[3],i[3]),e}function _0x494bd4(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function _0x37329b(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e}function _0x851f28(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e[3]=t[3]+i[3]*n,e}function _0x4ccef9(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2],o=t[3]-e[3];return Math.hypot(i,n,r,o)}function _0x53e554(e,t){var i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2],o=t[3]-e[3];return i*i+n*n+r*r+o*o}function _0x4597fa(e){var t=e[0],i=e[1],n=e[2],r=e[3];return Math.hypot(t,i,n,r)}function _0x33ce4b(e){var t=e[0],i=e[1],n=e[2],r=e[3];return t*t+i*i+n*n+r*r}function _0x6eb73f(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}function _0x5394dc(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}function _0x2ed8cd(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*i+n*n+r*r+o*o;return a>0&&(a=1/Math.sqrt(a)),e[0]=i*a,e[1]=n*a,e[2]=r*a,e[3]=o*a,e}function _0xa4f7e9(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function _0x1b8947(e,t,i,n){var r=i[0]*n[1]-i[1]*n[0],o=i[0]*n[2]-i[2]*n[0],a=i[0]*n[3]-i[3]*n[0],s=i[1]*n[2]-i[2]*n[1],l=i[1]*n[3]-i[3]*n[1],u=i[2]*n[3]-i[3]*n[2],c=t[0],h=t[1],d=t[2],f=t[3];return e[0]=h*u-d*l+f*s,e[1]=-c*u+d*a-f*o,e[2]=c*l-h*a+f*r,e[3]=-c*s+h*o-d*r,e}function _0x133150(e,t,i,n){var r=t[0],o=t[1],a=t[2],s=t[3];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e[2]=a+n*(i[2]-a),e[3]=s+n*(i[3]-s),e}function _0x1b67e2(e,t){var i,n,r,o,a,s;t=t||1;do{a=(i=2*_0x25d59d()-1)*i+(n=2*_0x25d59d()-1)*n}while(a>=1);do{s=(r=2*_0x25d59d()-1)*r+(o=2*_0x25d59d()-1)*o}while(s>=1);var l=Math.sqrt((1-a)/s);return e[0]=t*i,e[1]=t*n,e[2]=t*r*l,e[3]=t*o*l,e}function _0x275420(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3];return e[0]=i[0]*n+i[4]*r+i[8]*o+i[12]*a,e[1]=i[1]*n+i[5]*r+i[9]*o+i[13]*a,e[2]=i[2]*n+i[6]*r+i[10]*o+i[14]*a,e[3]=i[3]*n+i[7]*r+i[11]*o+i[15]*a,e}function _0x267a1b(e,t,i){var n=t[0],r=t[1],o=t[2],a=i[0],s=i[1],l=i[2],u=i[3],c=u*n+s*o-l*r,h=u*r+l*n-a*o,d=u*o+a*r-s*n,f=-a*n-s*r-l*o;return e[0]=c*u+f*-a+h*-l-d*-s,e[1]=h*u+f*-s+d*-a-c*-l,e[2]=d*u+f*-l+c*-s-h*-a,e[3]=t[3],e}function _0x445147(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function _0x500aa7(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function _0x2ece3d(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function _0x1186c6(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t[2],u=t[3];return Math.abs(i-a)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-s)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-l)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-u)<=_0x5709ba*Math.max(1,Math.abs(o),Math.abs(u))}var _0xfaf62f=_0x471a58,_0x36e185=_0xb85b76,_0x4e1cf5=_0x53b3af,_0x3b7a4f=_0x4ccef9,_0xc29a8=_0x53e554,_0x4ec86a=_0x4597fa,_0x530e2c=_0x33ce4b,_0x282b2e=(_0x492b83=_0x436525(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=4),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a<s;a+=t)_0x492b83[0]=e[a],_0x492b83[1]=e[a+1],_0x492b83[2]=e[a+2],_0x492b83[3]=e[a+3],r(_0x492b83,_0x492b83,o),e[a]=_0x492b83[0],e[a+1]=_0x492b83[1],e[a+2]=_0x492b83[2],e[a+3]=_0x492b83[3];return e}),_0x281f3d=Object.freeze({create:_0x436525,clone:_0x433c65,fromValues:_0x53d10d,copy:_0x3d5978,set:_0x806771,add:_0x54364d,subtract:_0x471a58,multiply:_0xb85b76,divide:_0x53b3af,ceil:_0x29e796,floor:_0x58e4df,min:_0xb76ff6,max:_0x121a7f,round:_0x494bd4,scale:_0x37329b,scaleAndAdd:_0x851f28,distance:_0x4ccef9,squaredDistance:_0x53e554,length:_0x4597fa,squaredLength:_0x33ce4b,negate:_0x6eb73f,inverse:_0x5394dc,normalize:_0x2ed8cd,dot:_0xa4f7e9,cross:_0x1b8947,lerp:_0x133150,random:_0x1b67e2,transformMat4:_0x275420,transformQuat:_0x267a1b,zero:_0x445147,str:_0x500aa7,exactEquals:_0x2ece3d,equals:_0x1186c6,sub:_0xfaf62f,mul:_0x36e185,div:_0x4e1cf5,dist:_0x3b7a4f,sqrDist:_0xc29a8,len:_0x4ec86a,sqrLen:_0x530e2c,forEach:_0x282b2e}),_0x492b83;function _0x204a1a(){var e=new _0x478b64(4);return _0x478b64!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function _0x544935(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function _0x550603(e,t,i){i*=.5;var n=Math.sin(i);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(i),e}function _0x37eacf(e,t){var i=2*Math.acos(t[3]),n=Math.sin(i/2);return n>_0x5709ba?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),i}function _0x5c7f68(e,t){var i=_0x428f89(e,t);return Math.acos(2*i*i-1)}function _0x15320a(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*c+a*s+r*u-o*l,e[1]=r*c+a*l+o*s-n*u,e[2]=o*c+a*u+n*l-r*s,e[3]=a*c-n*s-r*l-o*u,e}function _0x25bc96(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+a*s,e[1]=r*l+o*s,e[2]=o*l-r*s,e[3]=a*l-n*s,e}function _0x53eb22(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l-o*s,e[1]=r*l+a*s,e[2]=o*l+n*s,e[3]=a*l-r*s,e}function _0x183f85(e,t,i){i*=.5;var n=t[0],r=t[1],o=t[2],a=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=n*l+r*s,e[1]=r*l-n*s,e[2]=o*l+a*s,e[3]=a*l-o*s,e}function _0x5011ef(e,t){var i=t[0],n=t[1],r=t[2];return e[0]=i,e[1]=n,e[2]=r,e[3]=Math.sqrt(Math.abs(1-i*i-n*n-r*r)),e}function _0x2c56c6(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=Math.sqrt(i*i+n*n+r*r),s=Math.exp(o),l=a>0?s*Math.sin(a)/a:0;return e[0]=i*l,e[1]=n*l,e[2]=r*l,e[3]=s*Math.cos(a),e}function _0x451869(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=Math.sqrt(i*i+n*n+r*r),s=a>0?Math.atan2(a,o)/a:0;return e[0]=i*s,e[1]=n*s,e[2]=r*s,e[3]=.5*Math.log(i*i+n*n+r*r+o*o),e}function _0xf75c0f(e,t,i){return _0x451869(e,t),_0x3bd2dd(e,e,i),_0x2c56c6(e,e),e}function _0x30a7cb(e,t,i,n){var r,o,a,s,l,u=t[0],c=t[1],h=t[2],d=t[3],f=i[0],p=i[1],_=i[2],m=i[3];return(o=u*f+c*p+h*_+d*m)<0&&(o=-o,f=-f,p=-p,_=-_,m=-m),1-o>_0x5709ba?(r=Math.acos(o),a=Math.sin(r),s=Math.sin((1-n)*r)/a,l=Math.sin(n*r)/a):(s=1-n,l=n),e[0]=s*u+l*f,e[1]=s*c+l*p,e[2]=s*h+l*_,e[3]=s*d+l*m,e}function _0x501f36(e){var t=_0x25d59d(),i=_0x25d59d(),n=_0x25d59d(),r=Math.sqrt(1-t),o=Math.sqrt(t);return e[0]=r*Math.sin(2*Math.PI*i),e[1]=r*Math.cos(2*Math.PI*i),e[2]=o*Math.sin(2*Math.PI*n),e[3]=o*Math.cos(2*Math.PI*n),e}function _0x3b046e(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=i*i+n*n+r*r+o*o,s=a?1/a:0;return e[0]=-i*s,e[1]=-n*s,e[2]=-r*s,e[3]=o*s,e}function _0x1a34f1(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function _0x4fa40f(e,t){var i,n=t[0]+t[4]+t[8];if(n>0)i=Math.sqrt(n+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{var r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*a+a]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+a]-t[3*a+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[a]=(t[3*a+r]+t[3*r+a])*i}return e}function _0x160fb3(e,t,i,n){var r=.5*Math.PI/180;t*=r,i*=r,n*=r;var o=Math.sin(t),a=Math.cos(t),s=Math.sin(i),l=Math.cos(i),u=Math.sin(n),c=Math.cos(n);return e[0]=o*l*c-a*s*u,e[1]=a*s*c+o*l*u,e[2]=a*l*u-o*s*c,e[3]=a*l*c+o*s*u,e}function _0x262611(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var _0x5d36c6=_0x433c65,_0x271c4c=_0x53d10d,_0x32c848=_0x3d5978,_0x3a88c4=_0x806771,_0x1850e7=_0x54364d,_0x565697=_0x15320a,_0x3bd2dd=_0x37329b,_0x428f89=_0xa4f7e9,_0x49124b=_0x133150,_0x389f9f=_0x4597fa,_0xc68334=_0x389f9f,_0x51efdf=_0x33ce4b,_0x341797=_0x51efdf,_0x5e82da=_0x2ed8cd,_0x4bae90=_0x2ece3d,_0x3e6b79=_0x1186c6,_0x30574b=(_0x260b9e=_0x1ed7cc(),_0x454875=_0x4da1cb(1,0,0),_0x57496b=_0x4da1cb(0,1,0),function(e,t,i){var n=_0x1dd150(t,i);return n<-.999999?(_0x2cf175(_0x260b9e,_0x454875,t),_0x68b465(_0x260b9e)<1e-6&&_0x2cf175(_0x260b9e,_0x57496b,t),_0x4ab974(_0x260b9e,_0x260b9e),_0x550603(e,_0x260b9e,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(_0x2cf175(_0x260b9e,t,i),e[0]=_0x260b9e[0],e[1]=_0x260b9e[1],e[2]=_0x260b9e[2],e[3]=1+n,_0x5e82da(e,e))}),_0x28e103=(_0x457f90=_0x204a1a(),_0x4b5b55=_0x204a1a(),function(e,t,i,n,r,o){return _0x30a7cb(_0x457f90,t,r,o),_0x30a7cb(_0x4b5b55,i,n,o),_0x30a7cb(e,_0x457f90,_0x4b5b55,2*o*(1-o)),e}),_0x2aff5b=(_0x2072d9=_0x165677(),function(e,t,i,n){return _0x2072d9[0]=i[0],_0x2072d9[3]=i[1],_0x2072d9[6]=i[2],_0x2072d9[1]=n[0],_0x2072d9[4]=n[1],_0x2072d9[7]=n[2],_0x2072d9[2]=-t[0],_0x2072d9[5]=-t[1],_0x2072d9[8]=-t[2],_0x5e82da(e,_0x4fa40f(e,_0x2072d9))}),_0x2523a8=Object.freeze({create:_0x204a1a,identity:_0x544935,setAxisAngle:_0x550603,getAxisAngle:_0x37eacf,getAngle:_0x5c7f68,multiply:_0x15320a,rotateX:_0x25bc96,rotateY:_0x53eb22,rotateZ:_0x183f85,calculateW:_0x5011ef,exp:_0x2c56c6,ln:_0x451869,pow:_0xf75c0f,slerp:_0x30a7cb,random:_0x501f36,invert:_0x3b046e,conjugate:_0x1a34f1,fromMat3:_0x4fa40f,fromEuler:_0x160fb3,str:_0x262611,clone:_0x5d36c6,fromValues:_0x271c4c,copy:_0x32c848,set:_0x3a88c4,add:_0x1850e7,mul:_0x565697,scale:_0x3bd2dd,dot:_0x428f89,lerp:_0x49124b,length:_0x389f9f,len:_0xc68334,squaredLength:_0x51efdf,sqrLen:_0x341797,normalize:_0x5e82da,exactEquals:_0x4bae90,equals:_0x3e6b79,rotationTo:_0x30574b,sqlerp:_0x28e103,setAxes:_0x2aff5b}),_0x2072d9,_0x457f90,_0x4b5b55,_0x260b9e,_0x454875,_0x57496b;function _0x4cd018(){var e=new _0x478b64(8);return _0x478b64!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0),e[3]=1,e}function _0x4f49dc(e){var t=new _0x478b64(8);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function _0x183693(e,t,i,n,r,o,a,s){var l=new _0x478b64(8);return l[0]=e,l[1]=t,l[2]=i,l[3]=n,l[4]=r,l[5]=o,l[6]=a,l[7]=s,l}function _0x200f43(e,t,i,n,r,o,a){var s=new _0x478b64(8);s[0]=e,s[1]=t,s[2]=i,s[3]=n;var l=.5*r,u=.5*o,c=.5*a;return s[4]=l*n+u*i-c*t,s[5]=u*n+c*e-l*i,s[6]=c*n+l*t-u*e,s[7]=-l*e-u*t-c*i,s}function _0x2e26f6(e,t,i){var n=.5*i[0],r=.5*i[1],o=.5*i[2],a=t[0],s=t[1],l=t[2],u=t[3];return e[0]=a,e[1]=s,e[2]=l,e[3]=u,e[4]=n*u+r*l-o*s,e[5]=r*u+o*a-n*l,e[6]=o*u+n*s-r*a,e[7]=-n*a-r*s-o*l,e}function _0x9ef73e(e,t){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=.5*t[0],e[5]=.5*t[1],e[6]=.5*t[2],e[7]=0,e}function _0x3c738f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function _0x5d6255(e,t){var i=_0x204a1a();_0x390d2d(i,t);var n=new _0x478b64(3);return _0x13f7d5(n,t),_0x2e26f6(e,i,n),e}function _0x24b9fc(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e}function _0x461fdd(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function _0x6ad5b8(e,t,i,n,r,o,a,s,l){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e}var _0xb6f463=_0x32c848;function _0x4c3e27(e,t){return e[0]=t[4],e[1]=t[5],e[2]=t[6],e[3]=t[7],e}var _0x5ee0fa=_0x32c848;function _0x3538f8(e,t){return e[4]=t[0],e[5]=t[1],e[6]=t[2],e[7]=t[3],e}function _0x21d245(e,t){var i=t[4],n=t[5],r=t[6],o=t[7],a=-t[0],s=-t[1],l=-t[2],u=t[3];return e[0]=2*(i*u+o*a+n*l-r*s),e[1]=2*(n*u+o*s+r*a-i*l),e[2]=2*(r*u+o*l+i*s-n*a),e}function _0x429d4b(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=.5*i[0],l=.5*i[1],u=.5*i[2],c=t[4],h=t[5],d=t[6],f=t[7];return e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=a*s+r*u-o*l+c,e[5]=a*l+o*s-n*u+h,e[6]=a*u+n*l-r*s+d,e[7]=-n*s-r*l-o*u+f,e}function _0x3231de(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x25bc96(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x475433(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x53eb22(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0x17e092(e,t,i){var n=-t[0],r=-t[1],o=-t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=s*a+c*n+l*o-u*r,d=l*a+c*r+u*n-s*o,f=u*a+c*o+s*r-l*n,p=c*a-s*n-l*r-u*o;return _0x183f85(e,t,i),n=e[0],r=e[1],o=e[2],a=e[3],e[4]=h*a+p*n+d*o-f*r,e[5]=d*a+p*r+f*n-h*o,e[6]=f*a+p*o+h*r-d*n,e[7]=p*a-h*n-d*r-f*o,e}function _0xb32012(e,t,i){var n=i[0],r=i[1],o=i[2],a=i[3],s=t[0],l=t[1],u=t[2],c=t[3];return e[0]=s*a+c*n+l*o-u*r,e[1]=l*a+c*r+u*n-s*o,e[2]=u*a+c*o+s*r-l*n,e[3]=c*a-s*n-l*r-u*o,s=t[4],l=t[5],u=t[6],c=t[7],e[4]=s*a+c*n+l*o-u*r,e[5]=l*a+c*r+u*n-s*o,e[6]=u*a+c*o+s*r-l*n,e[7]=c*a-s*n-l*r-u*o,e}function _0x19bd04(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],l=i[1],u=i[2],c=i[3];return e[0]=n*c+a*s+r*u-o*l,e[1]=r*c+a*l+o*s-n*u,e[2]=o*c+a*u+n*l-r*s,e[3]=a*c-n*s-r*l-o*u,s=i[4],l=i[5],u=i[6],c=i[7],e[4]=n*c+a*s+r*u-o*l,e[5]=r*c+a*l+o*s-n*u,e[6]=o*c+a*u+n*l-r*s,e[7]=a*c-n*s-r*l-o*u,e}function _0x5d6eb4(e,t,i,n){if(Math.abs(n)<_0x5709ba)return _0x24b9fc(e,t);var r=Math.hypot(i[0],i[1],i[2]);n*=.5;var o=Math.sin(n),a=o*i[0]/r,s=o*i[1]/r,l=o*i[2]/r,u=Math.cos(n),c=t[0],h=t[1],d=t[2],f=t[3];e[0]=c*u+f*a+h*l-d*s,e[1]=h*u+f*s+d*a-c*l,e[2]=d*u+f*l+c*s-h*a,e[3]=f*u-c*a-h*s-d*l;var p=t[4],_=t[5],m=t[6],g=t[7];return e[4]=p*u+g*a+_*l-m*s,e[5]=_*u+g*s+m*a-p*l,e[6]=m*u+g*l+p*s-_*a,e[7]=g*u-p*a-_*s-m*l,e}function _0x20723a(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e}function _0x488b7c(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[4],l=i[5],u=i[6],c=i[7],h=t[4],d=t[5],f=t[6],p=t[7],_=i[0],m=i[1],g=i[2],x=i[3];return e[0]=n*x+a*_+r*g-o*m,e[1]=r*x+a*m+o*_-n*g,e[2]=o*x+a*g+n*m-r*_,e[3]=a*x-n*_-r*m-o*g,e[4]=n*c+a*s+r*u-o*l+h*x+p*_+d*g-f*m,e[5]=r*c+a*l+o*s-n*u+d*x+p*m+f*_-h*g,e[6]=o*c+a*u+n*l-r*s+f*x+p*g+h*m-d*_,e[7]=a*c-n*s-r*l-o*u+p*x-h*_-d*m-f*g,e}var _0x4af7d7=_0x488b7c;function _0x36c4b7(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e}var _0xe1e00=_0x428f89;function _0x754b92(e,t,i,n){var r=1-n;return _0xe1e00(t,i)<0&&(n=-n),e[0]=t[0]*r+i[0]*n,e[1]=t[1]*r+i[1]*n,e[2]=t[2]*r+i[2]*n,e[3]=t[3]*r+i[3]*n,e[4]=t[4]*r+i[4]*n,e[5]=t[5]*r+i[5]*n,e[6]=t[6]*r+i[6]*n,e[7]=t[7]*r+i[7]*n,e}function _0x19e509(e,t){var i=_0x34f0b6(t);return e[0]=-t[0]/i,e[1]=-t[1]/i,e[2]=-t[2]/i,e[3]=t[3]/i,e[4]=-t[4]/i,e[5]=-t[5]/i,e[6]=-t[6]/i,e[7]=t[7]/i,e}function _0x30b687(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=t[7],e}var _0x57e1bb=_0x389f9f,_0x829123=_0x57e1bb,_0x34f0b6=_0x51efdf,_0x43dbf5=_0x34f0b6;function _0x4c35d4(e,t){var i=_0x34f0b6(t);if(i>0){i=Math.sqrt(i);var n=t[0]/i,r=t[1]/i,o=t[2]/i,a=t[3]/i,s=t[4],l=t[5],u=t[6],c=t[7],h=n*s+r*l+o*u+a*c;e[0]=n,e[1]=r,e[2]=o,e[3]=a,e[4]=(s-n*h)/i,e[5]=(l-r*h)/i,e[6]=(u-o*h)/i,e[7]=(c-a*h)/i}return e}function _0x7f6559(e){return"quat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+")"}function _0x4ea65a(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]}function _0xca66ed(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=t[0],h=t[1],d=t[2],f=t[3],p=t[4],_=t[5],m=t[6],g=t[7];return Math.abs(i-c)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(n-h)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-d)<=_0x5709ba*Math.max(1,Math.abs(r),Math.abs(d))&&Math.abs(o-f)<=_0x5709ba*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(a-p)<=_0x5709ba*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(s-_)<=_0x5709ba*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(l-m)<=_0x5709ba*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(u-g)<=_0x5709ba*Math.max(1,Math.abs(u),Math.abs(g))}var _0x170acc=Object.freeze({create:_0x4cd018,clone:_0x4f49dc,fromValues:_0x183693,fromRotationTranslationValues:_0x200f43,fromRotationTranslation:_0x2e26f6,fromTranslation:_0x9ef73e,fromRotation:_0x3c738f,fromMat4:_0x5d6255,copy:_0x24b9fc,identity:_0x461fdd,set:_0x6ad5b8,getReal:_0xb6f463,getDual:_0x4c3e27,setReal:_0x5ee0fa,setDual:_0x3538f8,getTranslation:_0x21d245,translate:_0x429d4b,rotateX:_0x3231de,rotateY:_0x475433,rotateZ:_0x17e092,rotateByQuatAppend:_0xb32012,rotateByQuatPrepend:_0x19bd04,rotateAroundAxis:_0x5d6eb4,add:_0x20723a,multiply:_0x488b7c,mul:_0x4af7d7,scale:_0x36c4b7,dot:_0xe1e00,lerp:_0x754b92,invert:_0x19e509,conjugate:_0x30b687,length:_0x57e1bb,len:_0x829123,squaredLength:_0x34f0b6,sqrLen:_0x43dbf5,normalize:_0x4c35d4,str:_0x7f6559,exactEquals:_0x4ea65a,equals:_0xca66ed});function _0x79b23f(){var e=new _0x478b64(2);return _0x478b64!=Float32Array&&(e[0]=0,e[1]=0),e}function _0x923ff7(e){var t=new _0x478b64(2);return t[0]=e[0],t[1]=e[1],t}function _0x3830a7(e,t){var i=new _0x478b64(2);return i[0]=e,i[1]=t,i}function _0x185d48(e,t){return e[0]=t[0],e[1]=t[1],e}function _0x224ad6(e,t,i){return e[0]=t,e[1]=i,e}function _0x23c67a(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e}function _0x884672(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e}function _0x32a79e(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e}function _0x561673(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e}function _0x39e646(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function _0x37784a(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function _0x38c8bb(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e}function _0x31feef(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e}function _0xa0558e(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function _0x31bb20(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e}function _0x2d0d90(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e}function _0x5b2ddf(e,t){var i=t[0]-e[0],n=t[1]-e[1];return Math.hypot(i,n)}function _0x5d9e91(e,t){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function _0x4e36e0(e){var t=e[0],i=e[1];return Math.hypot(t,i)}function _0x3560af(e){var t=e[0],i=e[1];return t*t+i*i}function _0x4e545d(e,t){return e[0]=-t[0],e[1]=-t[1],e}function _0x18c22f(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function _0x41d38e(e,t){var i=t[0],n=t[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r)),e[0]=t[0]*r,e[1]=t[1]*r,e}function _0x552e0f(e,t){return e[0]*t[0]+e[1]*t[1]}function _0x225134(e,t,i){var n=t[0]*i[1]-t[1]*i[0];return e[0]=e[1]=0,e[2]=n,e}function _0x203c84(e,t,i,n){var r=t[0],o=t[1];return e[0]=r+n*(i[0]-r),e[1]=o+n*(i[1]-o),e}function _0x1a609c(e,t){t=t||1;var i=2*_0x25d59d()*Math.PI;return e[0]=Math.cos(i)*t,e[1]=Math.sin(i)*t,e}function _0x49ce96(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[2]*r,e[1]=i[1]*n+i[3]*r,e}function _0x5dd6bf(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[2]*r+i[4],e[1]=i[1]*n+i[3]*r+i[5],e}function _0x88bea8(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[3]*r+i[6],e[1]=i[1]*n+i[4]*r+i[7],e}function _0x135bd1(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[4]*r+i[12],e[1]=i[1]*n+i[5]*r+i[13],e}function _0xacba30(e,t,i,n){var r=t[0]-i[0],o=t[1]-i[1],a=Math.sin(n),s=Math.cos(n);return e[0]=r*s-o*a+i[0],e[1]=r*a+o*s+i[1],e}function _0x43105b(e,t){var i=e[0],n=e[1],r=t[0],o=t[1],a=i*i+n*n;a>0&&(a=1/Math.sqrt(a));var s=r*r+o*o;s>0&&(s=1/Math.sqrt(s));var l=(i*r+n*o)*a*s;return l>1?0:l<-1?Math.PI:Math.acos(l)}function _0x293330(e){return e[0]=0,e[1]=0,e}function _0x5cc1a8(e){return"vec2("+e[0]+", "+e[1]+")"}function _0x27dede(e,t){return e[0]===t[0]&&e[1]===t[1]}function _0x4472ab(e,t){var i=e[0],n=e[1],r=t[0],o=t[1];return Math.abs(i-r)<=_0x5709ba*Math.max(1,Math.abs(i),Math.abs(r))&&Math.abs(n-o)<=_0x5709ba*Math.max(1,Math.abs(n),Math.abs(o))}var _0xa6fe00=_0x4e36e0,_0x90c598=_0x884672,_0x1ad3b7=_0x32a79e,_0x3f5f08=_0x561673,_0x27dcf4=_0x5b2ddf,_0xda44a2=_0x5d9e91,_0x23151f=_0x3560af,_0x5b17ba=(_0x42caa8=_0x79b23f(),function(e,t,i,n,r,o){var a,s;for(!t&&(t=2),!i&&(i=0),s=n?Math.min(n*t+i,e.length):e.length,a=i;a<s;a+=t)_0x42caa8[0]=e[a],_0x42caa8[1]=e[a+1],r(_0x42caa8,_0x42caa8,o),e[a]=_0x42caa8[0],e[a+1]=_0x42caa8[1];return e}),_0x50cf07=Object.freeze({create:_0x79b23f,clone:_0x923ff7,fromValues:_0x3830a7,copy:_0x185d48,set:_0x224ad6,add:_0x23c67a,subtract:_0x884672,multiply:_0x32a79e,divide:_0x561673,ceil:_0x39e646,floor:_0x37784a,min:_0x38c8bb,max:_0x31feef,round:_0xa0558e,scale:_0x31bb20,scaleAndAdd:_0x2d0d90,distance:_0x5b2ddf,squaredDistance:_0x5d9e91,length:_0x4e36e0,squaredLength:_0x3560af,negate:_0x4e545d,inverse:_0x18c22f,normalize:_0x41d38e,dot:_0x552e0f,cross:_0x225134,lerp:_0x203c84,random:_0x1a609c,transformMat2:_0x49ce96,transformMat2d:_0x5dd6bf,transformMat3:_0x88bea8,transformMat4:_0x135bd1,rotate:_0xacba30,angle:_0x43105b,zero:_0x293330,str:_0x5cc1a8,exactEquals:_0x27dede,equals:_0x4472ab,len:_0xa6fe00,sub:_0x90c598,mul:_0x1ad3b7,div:_0x3f5f08,dist:_0x27dcf4,sqrDist:_0xda44a2,sqrLen:_0x23151f,forEach:_0x5b17ba}),_0x42caa8;_0x3fdff7.glMatrix=_0xacb5eb,_0x3fdff7.mat2=_0x1b6186,_0x3fdff7.mat2d=_0x376082,_0x3fdff7.mat3=_0x499ef9,_0x3fdff7.mat4=_0x479473,_0x3fdff7.quat=_0x2523a8,_0x3fdff7.quat2=_0x170acc,_0x3fdff7.vec2=_0x50cf07,_0x3fdff7.vec3=_0x56f8e5,_0x3fdff7.vec4=_0x281f3d;const _0x3e0ce0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x156524=_0x3e0ce0(void 0,(function(){return _0x156524.toString().search("(((.+)+)+)+$").toString().constructor(_0x156524).search("(((.+)+)+)+$")}));function _0x32124d(e,t,i,n,r){const o=_0x3fdff7.mat4.create();return t?(_0x3fdff7.mat4.scale(o,o,[1/r,1/r,1]),!i&&_0x3fdff7.mat4.rotateZ(o,o,n.angle)):_0x3fdff7.mat4.multiply(o,n.labelPlaneMatrix,e),o}function _0x5e9fcb(e,t,i,n,r){if(t){const t=_0x3fdff7.mat4.clone(e);return _0x3fdff7.mat4.scale(t,t,[r,r,1]),!i&&_0x3fdff7.mat4.rotateZ(t,t,-n.angle),t}return n.glCoordMatrix}function _0x88ac55(e,t){const i=[e.x,e.y,0,1];_0xfe5cb(i,i,t);const n=i[3];return{point:new _0x4f59fa(i[0]/n,i[1]/n),signedDistanceFromCamera:n}}function _0x3475cf(e,t){const i=e[0]/e[3],n=e[1]/e[3];return i>=-t[0]&&i<=t[0]&&n>=-t[1]&&n<=t[1]}function _0x3ca165(e,t,i,n,r,o,a,s){const l=n?e.textSizeData:e.iconSizeData,u=_0x45c464(l,i.transform.zoom),c=[256/i.width*2+1,256/i.height*2+1],h=n?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();const d=e.lineVertexArray,f=n?e.text.placedSymbolArray:e.icon.placedSymbolArray,p=i.transform.width/i.transform.height;let _=!1;for(let n=0;n<f.length;n++){const a=f.get(n);if(a.hidden||a.writingMode===_0x2e52db.vertical&&!_){_0x5ecf1c(a.numGlyphs,h);continue}_=!1;const m=[a.anchorX,a.anchorY,0,1];if(_0x3fdff7.vec4.transformMat4(m,m,t),!_0x3475cf(m,c)){_0x5ecf1c(a.numGlyphs,h);continue}m[3];i.transform.cameraToCenterDistance;const g=1.5*_0x448d94(l,u,a),x=new _0x4f59fa(a.anchorX,a.anchorY),y=_0x88ac55(x,r).point,v={},$=_0x3ac321(a,g,!1,s,t,r,o,e.glyphOffsetArray,d,h,y,x,v,p);_=$.useVertical,($.notEnoughRoom||_||$.needsFlipping&&_0x3ac321(a,g,!0,s,t,r,o,e.glyphOffsetArray,d,h,y,x,v,p).notEnoughRoom)&&_0x5ecf1c(a.numGlyphs,h)}n?e.text.dynamicLayoutVertexBuffer.copyFromArrayView(h.arrayBuffer):e.icon.dynamicLayoutVertexBuffer.copyFromArrayView(h.arrayBuffer)}function _0x51b7d0(e,t,i,n,r,o,a,s,l,u,c,h){const d=s.glyphStartIndex+s.numGlyphs,f=s.lineStartIndex,p=s.lineStartIndex+s.lineLength,_=t.getoffsetX(s.glyphStartIndex),m=t.getoffsetX(d-1),g=_0x5cc47b(e*_,i,n,r,o,a,s.segment,f,p,l,u,c,h);if(!g)return null;const x=_0x5cc47b(e*m,i,n,r,o,a,s.segment,f,p,l,u,c,h);return x?{first:g,last:x}:null}function _0x227f82(e,t,i,n){if(e===_0x2e52db.horizontal){if(Math.abs(i.y-t.y)>Math.abs(i.x-t.x)*n)return{useVertical:!0}}return(e===_0x2e52db.vertical?t.y<i.y:t.x>i.x)?{needsFlipping:!0}:null}function _0x3ac321(e,t,i,n,r,o,a,s,l,u,c,h,d,f){const p=t/24,_=e.lineOffsetX*p,m=e.lineOffsetY*p;let g;if(e.numGlyphs>1){const t=e.glyphStartIndex+e.numGlyphs,r=e.lineStartIndex,u=e.lineStartIndex+e.lineLength,x=_0x51b7d0(p,s,_,m,i,c,h,e,l,o,d,!1);if(!x)return{notEnoughRoom:!0};const y=_0x88ac55(x.first.point,a).point,v=_0x88ac55(x.last.point,a).point;n&&!i&&_0x227f82(e.writingMode,y,v,f),g=[x.first];for(let n=e.glyphStartIndex+1;n<t-1;n++)g.push(_0x5cc47b(p*s.getoffsetX(n),_,m,i,c,h,e.segment,r,u,l,o,d,!1));g.push(x.last)}else{if(n&&!i){const t=_0x88ac55(h,r).point,i=e.lineStartIndex+e.segment+1,n=new _0x4f59fa(l.getx(i),l.gety(i)),o=_0x88ac55(n,r),a=o.signedDistanceFromCamera>0?o.point:_0x157240(h,n,t,1,r),s=_0x227f82(e.writingMode,t,a,f);if(s)return s}const t=_0x5cc47b(p*s.getoffsetX(e.glyphStartIndex),_,m,i,c,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,l,o,d,!1);if(!t)return{notEnoughRoom:!0};g=[t]}for(const e of g){_0x3b8a98(u,_0x88ac55(e.point,a).point,e.angle)}return{}}function _0x157240(e,t,i,n,r){const o=_0x88ac55(e.add(e.sub(t)._unit()),r).point,a=i.sub(o);return i.add(a._mult(n/a.mag()))}function _0x5cc47b(e,t,i,n,r,o,a,s,l,u,c,h,d){const f=n?e-t:e+t;let p=f>0?1:-1,_=0;n&&(p*=-1,_=Math.PI),p<0&&(_+=Math.PI);let m=p>0?s+a:s+a+1;const g=m;let x=r,y=r,v=0,$=0;const b=Math.abs(f);for(;v+$<=b;){if(m+=p,m<s||m>=l)return null;if(y=x,x=h[m],void 0===x){const e=new _0x4f59fa(u.getx(m),u.gety(m)),t=_0x88ac55(e,c);if(t.signedDistanceFromCamera>0)x=h[m]=t.point;else{const t=m-p;x=_0x157240(0===v?o:new _0x4f59fa(u.getx(t),u.gety(t)),e,y,b-v+1,c)}}v+=$,$=y.dist(x)}const T=(b-v)/$,C=x.sub(y),S=C.mult(T)._add(y);S._add(C._unit()._perp()._mult(i*p));return{point:S,angle:_+Math.atan2(x.y-y.y,x.x-y.x),tileDistance:d?{prevTileDistance:m-p===g?0:u.gettileUnitDistanceFromAnchor(m-p),lastSegmentViewportDistance:b-v}:null}}_0x156524();const _0x42ca22=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function _0x5ecf1c(e,t){for(let i=0;i<e;i++){const e=t.length;t.resize(e+4),t.float32.set(_0x42ca22,3*e)}}function _0xfe5cb(e,t,i){const n=t[0],r=t[1];return e[0]=i[0]*n+i[4]*r+i[12],e[1]=i[1]*n+i[5]*r+i[13],e[3]=i[3]*n+i[7]*r+i[15],e}var _0x20edb8=(_0x13fc96=!0,function(e,t){var i=_0x13fc96?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13fc96=!1,i}),_0x3593c5=_0x20edb8(void 0,(function(){return _0x3593c5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3593c5).search("(((.+)+)+)+$")})),_0x13fc96;_0x3593c5();var _0x1c04ac={symbolIconUniforms:function(e,t){return{u_is_size_zoom_constant:new _0x3d809b.Uniform1i(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new _0x3d809b.Uniform1i(e,t.u_is_size_feature_constant),u_size_t:new _0x3d809b.Uniform1f(e,t.u_size_t),u_size:new _0x3d809b.Uniform1f(e,t.u_size),u_camera_to_center_distance:new _0x3d809b.Uniform1f(e,t.u_camera_to_center_distance),u_pitch:new _0x3d809b.Uniform1f(e,t.u_pitch),u_rotate_symbol:new _0x3d809b.Uniform1i(e,t.u_rotate_symbol),u_aspect_ratio:new _0x3d809b.Uniform1f(e,t.u_aspect_ratio),u_fade_change:new _0x3d809b.Uniform1f(e,t.u_fade_change),u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_label_plane_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_label_plane_matrix),u_coord_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_coord_matrix),u_is_text:new _0x3d809b.Uniform1f(e,t.u_is_text),u_pitch_with_map:new _0x3d809b.Uniform1i(e,t.u_pitch_with_map),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_texture:new _0x3d809b.Uniform1i(e,t.u_texture)}},symbolSDFUniforms:function(e,t){return{u_is_size_zoom_constant:new _0x3d809b.Uniform1i(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new _0x3d809b.Uniform1i(e,t.u_is_size_feature_constant),u_size_t:new _0x3d809b.Uniform1f(e,t.u_size_t),u_size:new _0x3d809b.Uniform1f(e,t.u_size),u_camera_to_center_distance:new _0x3d809b.Uniform1f(e,t.u_camera_to_center_distance),u_pitch:new _0x3d809b.Uniform1f(e,t.u_pitch),u_rotate_symbol:new _0x3d809b.Uniform1i(e,t.u_rotate_symbol),u_aspect_ratio:new _0x3d809b.Uniform1f(e,t.u_aspect_ratio),u_fade_change:new _0x3d809b.Uniform1f(e,t.u_fade_change),u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_label_plane_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_label_plane_matrix),u_coord_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_coord_matrix),u_is_text:new _0x3d809b.Uniform1f(e,t.u_is_text),u_pitch_with_map:new _0x3d809b.Uniform1i(e,t.u_pitch_with_map),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_texture:new _0x3d809b.Uniform1i(e,t.u_texture),u_gamma_scale:new _0x3d809b.Uniform1f(e,t.u_gamma_scale),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_is_halo:new _0x3d809b.Uniform1f(e,t.u_is_halo)}},symbolTextAndIconUniforms:function(e,t){return{u_is_size_zoom_constant:new _0x3d809b.Uniform1i(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new _0x3d809b.Uniform1i(e,t.u_is_size_feature_constant),u_size_t:new _0x3d809b.Uniform1f(e,t.u_size_t),u_size:new _0x3d809b.Uniform1f(e,t.u_size),u_camera_to_center_distance:new _0x3d809b.Uniform1f(e,t.u_camera_to_center_distance),u_pitch:new _0x3d809b.Uniform1f(e,t.u_pitch),u_rotate_symbol:new _0x3d809b.Uniform1i(e,t.u_rotate_symbol),u_aspect_ratio:new _0x3d809b.Uniform1f(e,t.u_aspect_ratio),u_fade_change:new _0x3d809b.Uniform1f(e,t.u_fade_change),u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_label_plane_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_label_plane_matrix),u_coord_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_coord_matrix),u_is_text:new _0x3d809b.Uniform1f(e,t.u_is_text),u_pitch_with_map:new _0x3d809b.Uniform1i(e,t.u_pitch_with_map),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_texsize_icon:new _0x3d809b.Uniform2f(e,t.u_texsize_icon),u_texture:new _0x3d809b.Uniform1i(e,t.u_texture),u_texture_icon:new _0x3d809b.Uniform1i(e,t.u_texture_icon),u_gamma_scale:new _0x3d809b.Uniform1f(e,t.u_gamma_scale),u_device_pixel_ratio:new _0x3d809b.Uniform1f(e,t.u_device_pixel_ratio),u_is_halo:new _0x3d809b.Uniform1f(e,t.u_is_halo)}},symbolIconUniformValues:function(e,t,i,n,r,o,a,s,l,u){var c=r.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:c.width/c.height,u_fade_change:r.options.fadeDuration?r.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:u,u_texture:0}},symbolSDFUniformValues:function(e,t,i,n,r,o,a,s,l,u,c){var h=r.transform;return extend$1(_0x1c04ac.symbolIconUniformValues(e,t,i,n,r,o,a,s,l,u),{u_gamma_scale:n?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:1,u_is_halo:+c})},symbolTextAndIconUniformValues:function(e,t,i,n,r,o,a,s,l,u){return extend$1(_0x1c04ac.symbolSDFUniformValues(e,t,i,n,r,o,a,s,!0,l,!0),{u_texsize_icon:u,u_texture_icon:1})}},_0x7e032e=new o$1o;_0x1c04ac.symbolIconUniformMap=function(e,t,i,n,r,o,a,s,l,u){var c={},h=r.transform;return c.u_is_size_zoom_constant=function(){return+("constant"===e||"source"===e)},c.u_is_size_feature_constant=function(){return+("constant"===e||"camera"===e)},c.u_size_t=function(){return t?t.uSizeT:0},c.u_size=function(){return t?t.uSize:0},c.u_camera_to_center_distance=function(){return h.cameraToCenterDistance},c.u_pitch=function(){return h.pitch/360*2*Math.PI},c.u_rotate_symbol=function(){return+i},c.u_aspect_ratio=function(){return h.width/h.height},c.u_fade_change=function(){return r.options.fadeDuration?r.symbolFadeChange:1},c.u_matrix=function(){return o},c.u_label_plane_matrix=function(){return a},c.u_coord_matrix=function(){return s},c.u_is_text=function(){return+l},c.u_pitch_with_map=function(){return+n},c.u_texsize=function(){return _0x7e032e.x=u[0],_0x7e032e.y=u[1],_0x7e032e},c.u_texture=function(){return 0},c},_0x1c04ac.symbolSDFUniformMap=function(e,t,i,n,r,o,a,s,l,u,c){var h=_0x1c04ac.symbolIconUniformMap(e,t,i,n,r,o,a,s,l,u),d=r.transform;return h.u_gamma_scale=function(){return n?Math.cos(d._pitch)*d.cameraToCenterDistance:1},h.u_device_pixel_ratio=function(){return 1},h.u_is_halo=function(){return+c},h},_0x1c04ac.symbolTextAndIconUniformMap=function(e,t,i,n,r,o,a,s,l,u){var c=_0x1c04ac.symbolIconUniformMap(e,t,i,n,r,o,a,s,!0,l,!0);return c.u_texsize_icon=function(){return u},c.u_texture_icon=function(){return 1},c};var _0x3a2a53=_0x324df6(new Float32Array(16)),_0x27bfa3=new Float32Array(16);function _0x13d16f(e,t,i,n){if("translucent"===e.renderPass){var r=_0x7ad9f8.disabled,o=e.colorModeForRenderPass();i.layout.get("text-variable-anchor"),0!==i.paint.get("icon-opacity").constantOr(1)&&_0x5af0f9(e,t,i,!1,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),i.layout.get("icon-rotation-alignment"),i.layout.get("icon-pitch-alignment"),i.layout.get("icon-keep-upright"),r,o,n),0!==i.paint.get("text-opacity").constantOr(1)&&_0x5af0f9(e,t,i,!0,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.layout.get("text-keep-upright"),r,o,n)}}function _0x2772e9(e,t,i){return i.iconsInText&&t?"symbolTextAndIcon":e?"symbolSDF":"symbolIcon"}function _0x5af0f9(e,t,i,n,r,o,a,s,l,u,c,h){var d="map"===a,f="map"===s,p=d&&"point"!==i.layout.get("symbol-placement");if(p){var _,m=d&&!f&&!p,g=void 0!==i.layout.get("symbol-sort-key").constantOr(1),x=e.depthModeForSublayer(0,_0x4a9140.ReadOnly),y=i.layout.get("text-variable-anchor"),v=[],$=t.getBucket(i);if($){var b=n?$.text:$.icon;if(b&&b.segments.get().length){for(var T=b.programConfigurations.get(i.id),C=T.getAttributeLocation(),S=Object.keys(C).length,w=0;w<b.dynamicLayoutVertexBuffer.attributes.length;w++){C[b.dynamicLayoutVertexBuffer.attributes[w].name]=S++}var E=n||$.sdfIcons,P=n?$.textSizeData:$.iconSizeData,A=e.useProgram(_0x2772e9(E,n,$),T,C).cesiumProgram;_=_0x45c464(P,t.level);var L=void 0,M=[0,0],R=void 0,O=void 0,D=null,I=void 0;if(n){if(R=t.glyphAtlasTexture,O=de$y.LINEAR,L=t.glyphAtlasTexture.size,$.iconsInText){M=t.imageAtlasTexture.size,D=t.imageAtlasTexture;var B="composite"===P.kind||"camera"===P.kind;I=e.options.rotating||e.options.zooming||B?de$y.LINEAR:de$y.NEAREST}}else{var F=1!==i.layout.get("icon-size").constantOr(0)||$.iconsNeedLinear;R=t.imageAtlasTexture,O=E||e.options.rotating||e.options.zooming||F?de$y.LINEAR:de$y.NEAREST,L=t.imageAtlasTexture.size}var N=_0x2ddbe2(t,1,t.level),G=p$1d.toArray(t.viewProjection,_0x27bfa3);_0x32124d(G,f,d,e.transform,N);var z=_0x5e9fcb(G,f,d,e.transform,N),U=y&&$.hasTextData();if("none"!==i.layout.get("icon-text-fit")&&U&&$.hasIconData(),p)_0x3ca165($,G,e,n,_0x32124d(_0x3a2a53,f,d,e.transform,N),_0x5e9fcb(_0x3a2a53,f,d,e.transform,N),f,l);var V=p$1d.toArray(G,_0x27bfa3),k=_0x3a2a53,W=e.translatePosMatrix(z,t,r,o,!0),H=E&&0!==i.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(1);_.uSize=512*_.uSize/t.targetTileSize,_.uSizeT=512*_.uSizeT/t.targetTileSize;var q={},j={program:A,buffers:b,uniformMap:q=E?$.iconsInText?_0x1c04ac.symbolTextAndIconUniformMap(P.kind,_,m,f,e,V,k,W,L,M):_0x1c04ac.symbolSDFUniformMap(P.kind,_,m,f,e,V,k,W,n,L,!0):_0x1c04ac.symbolIconUniformMap(P.kind,_,m,f,e,V,k,W,n,L),atlasTexture:R,atlasTextureIcon:D,atlasInterpolation:O,atlasInterpolationIcon:I,isSDF:E,hasHalo:H};if(g){w=0;for(var X=b.segments.get();w<X.length;w+=1){var Y=X[w];v.push({segments:new _0x1e8367([Y]),sortKey:Y.sortKey,state:j})}}else v.push({segments:b.segments,sortKey:0,state:j});g&&v.sort((function(e,t){return e.sortKey-t.sortKey}));for(var Z=0,K=v;Z<K.length;Z+=1){var Q=K[Z],J=Q.state;if(J.atlasTexture.bind(J.atlasInterpolation,de$y.CLAMP_TO_EDGE),q.u_texture=function(){return J.atlasTexture.cesiumTexture},J.atlasTextureIcon&&(J.atlasTextureIcon.bind(J.atlasInterpolationIcon,de$y.CLAMP_TO_EDGE),q.u_texture_icon=function(){return J.atlasInterpolationIcon.cesiumTexture}),J.isSDF){q=J.uniformMap;J.hasHalo&&(q.u_is_halo=function(){return 1},_0x32bb51(J.buffers,Q.segments,i,e,J.program,x,u,c,q,h.passState,C)),q.u_is_halo=function(){return 0}}_0x32bb51(J.buffers,Q.segments,i,e,J.program,x,u,c,J.uniformMap,h.passState,C)}}}}else t._MVTLabel.drawLayerSymbols(t,i,n)}function _0x32bb51(e,t,i,n,r,o,a,s,l,u,c){var h=e.programConfigurations.get(i.id),d=r.allUniforms;l=h.getUniformMaps(d,i.paint,l);for(var f=h.getPaintVertexBuffers(),p=0,_=t.get();p<_.length;p+=1){var m=_[p],g=(m.drawCommands||(m.drawCommands={}))[i.id];if(!g){g=new i$$({cull:!1,primitiveType:de$y.TRIANGLES,count:3*m.primitiveLength,offset:3*m.primitiveOffset}),m.drawCommands[i.id]=g;for(var x=m.cesiumVaos||(m.cesiumVaos={}),y=[],v=0;v<e.layoutVertexBuffer.attributes.length;v++){var $=e.layoutVertexBuffer.attributes[v],b=_0x42145e.mbxAttributeToCesiumVertexArrtribute($,e.layoutVertexBuffer,c[$.name],m.vertexOffset);y.push(b)}for(v=0;v<e.dynamicLayoutVertexBuffer.attributes.length;v++){$=e.dynamicLayoutVertexBuffer.attributes[v],b=_0x42145e.mbxAttributeToCesiumVertexArrtribute($,e.dynamicLayoutVertexBuffer,c[$.name],m.vertexOffset);y.push(b)}for(var T=0;T<f.length;T++)for(var C=f[T],S=0;S<C.attributes.length;S++){$=C.attributes[S],b=_0x42145e.mbxAttributeToCesiumVertexArrtribute($,C,c[$.name],m.vertexOffset);y.push(b)}var w=x[i.id]||(x[i.id]=new c$13({context:n.cesiumContext,attributes:y,indexBuffer:e.indexBuffer}));g.vertexArray=w}l.u_depthRange=function(){return 1-o.range[0]},g.uniformMap=l,g.renderState=_0x42145e.toRenderState(s,o,_0x14ded5.disabled),g.shaderProgram=r,g.execute(n.cesiumContext,u)}}function _0x324df6(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}var _0x2c9f95=(_0x303666=!0,function(e,t){var i=_0x303666?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x303666=!1,i}),_0x1a3163=_0x2c9f95(void 0,(function(){return _0x1a3163.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a3163).search("(((.+)+)+)+$")})),_0x303666;_0x1a3163();var _0x2be876=(_0x874b62=!0,function(e,t){var i=_0x874b62?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x874b62=!1,i}),_0x3896c6=_0x2be876(void 0,(function(){return _0x3896c6.toString().search("(((.+)+)+)+$").toString().constructor(_0x3896c6).search("(((.+)+)+)+$")})),_0x874b62;_0x3896c6();var _0x444986="\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n",_0xb56ce9=(_0x3d651d=!0,function(e,t){var i=_0x3d651d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3d651d=!1,i}),_0x3979a0=_0xb56ce9(void 0,(function(){return _0x3979a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x3979a0).search("(((.+)+)+)+$")})),_0x3d651d;_0x3979a0();var _0x2c690e="\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main() {\n gl_FragColor = u_color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x191425=(_0x437ec3=!0,function(e,t){var i=_0x437ec3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x437ec3=!1,i}),_0x10add8=_0x191425(void 0,(function(){return _0x10add8.toString().search("(((.+)+)+)+$").toString().constructor(_0x10add8).search("(((.+)+)+)+$")})),_0x437ec3;_0x10add8();var _0x1303ea="\nuniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n",_0xee945=(_0x4f190d=!0,function(e,t){var i=_0x4f190d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f190d=!1,i}),_0x175a5d=_0xee945(void 0,(function(){return _0x175a5d.toString().search("(((.+)+)+)+$").toString().constructor(_0x175a5d).search("(((.+)+)+)+$")})),_0x4f190d;_0x175a5d();var _0x4754b3="\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x2f0f54=(_0x52ddbc=!0,function(e,t){var i=_0x52ddbc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x52ddbc=!1,i}),_0xc573a5=_0x2f0f54(void 0,(function(){return _0xc573a5.toString().search("(((.+)+)+)+$").toString().constructor(_0xc573a5).search("(((.+)+)+)+$")})),_0x52ddbc;_0xc573a5();var _0x359195="\nattribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\nattribute vec2 a_shift;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = clamp(\n 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n 0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\n 4.0);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n gl_Position.xy += (a_extrude + a_shift) * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n}\n",_0x1b6472=(_0x15dc99=!0,function(e,t){var i=_0x15dc99?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x15dc99=!1,i}),_0x1726cb=_0x1b6472(void 0,(function(){return _0x1726cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x1726cb).search("(((.+)+)+)+$")})),_0x15dc99;_0x1726cb();var _0x3eaba3="\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n\n float alpha = 0.5;\n\n // Red = collision, hide label\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n // Blue = no collision, label is showing\n if (v_placed > 0.5) {\n gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n gl_FragColor *= .1;\n }\n}\n",_0x2899dd=(_0x4307c1=!0,function(e,t){var i=_0x4307c1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4307c1=!1,i}),_0x268267=_0x2899dd(void 0,(function(){return _0x268267.toString().search("(((.+)+)+)+$").toString().constructor(_0x268267).search("(((.+)+)+)+$")})),_0x4307c1;_0x268267();var _0x2bc406="\nattribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\n\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n highp float collision_perspective_ratio = clamp(\n 0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n 0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\n 4.0);\n\n gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n\n highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\n gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\n\n v_placed = a_placed.x;\n v_notUsed = a_placed.y;\n v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\n\n v_extrude = a_extrude * padding_factor;\n v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\n}\n",_0x44f8bc=(_0x40bcc4=!0,function(e,t){var i=_0x40bcc4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40bcc4=!1,i}),_0x40fb0a=_0x44f8bc(void 0,(function(){return _0x40fb0a.toString().search("(((.+)+)+)+$").toString().constructor(_0x40fb0a).search("(((.+)+)+)+$")})),_0x40bcc4;_0x40fb0a();var _0x500184="\nuniform float u_overscale_factor;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n float alpha = 0.5;\n\n // Red = collision, hide label\n vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n // Blue = no collision, label is showing\n if (v_placed > 0.5) {\n color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n }\n\n if (v_notUsed > 0.5) {\n // This box not used, fade it out\n color *= .2;\n }\n\n float extrude_scale_length = length(v_extrude_scale);\n float extrude_length = length(v_extrude) * extrude_scale_length;\n float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor;\n float radius = v_radius * extrude_scale_length;\n\n float distance_to_edge = abs(extrude_length - radius);\n float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\n\n gl_FragColor = opacity_t * color;\n}\n",_0x216d83=(_0x22c31e=!0,function(e,t){var i=_0x22c31e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x22c31e=!1,i}),_0x30f3a0=_0x216d83(void 0,(function(){return _0x30f3a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x30f3a0).search("(((.+)+)+)+$")})),_0x22c31e;_0x30f3a0();var _0x3cca03="uniform mat4 u_matrix;\n uniform bool u_scale_with_map;\n uniform bool u_pitch_with_map;\n uniform vec2 u_extrude_scale;\n uniform lowp float u_device_pixel_ratio;\n uniform highp float u_camera_to_center_distance;\n\n attribute vec2 a_pos;\n\n varying vec3 v_data;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\n void main(void) {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec2 circle_center = floor(a_pos * 0.5);\n\n vec2 corner_position = circle_center;\n \n corner_position += extrude * (radius + stroke_width) * 16.0;\n gl_Position = u_matrix * vec4(corner_position, 0.0, 1.0);\n \n // if (u_pitch_with_map) {\n // vec2 corner_position = circle_center;\n // if (u_scale_with_map) {\n // corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\n // } else {\n // // Pitching the circle with the map effectively scales it with the map\n // // To counteract the effect for pitch-scale: viewport, we rescale the\n // // whole circle based on the pitch scaling effect at its central point\n // vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\n // corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\n // }\n\n // gl_Position = u_matrix * vec4(circle_center, 0, 1);\n // } else {\n // gl_Position = u_matrix * vec4(circle_center, 0, 1);\n\n // if (u_scale_with_map) {\n // gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\n // } else {\n // gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\n // }\n // }\n\n // This is a minimum blur distance that serves as a faux-antialiasing for\n // the circle. since blur is a ratio of the circle's size and the intent is\n // to keep the blur at roughly 1px, the two are inversely related.\n lowp float antialiasblur = 1.0 / u_device_pixel_ratio / (radius + stroke_width);\n\n v_data = vec3(extrude.x, extrude.y, antialiasblur);\n }\n",_0x4aca20=(_0x5a8f80=!0,function(e,t){var i=_0x5a8f80?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a8f80=!1,i}),_0x135e5b=_0x4aca20(void 0,(function(){return _0x135e5b.toString().search("(((.+)+)+)+$").toString().constructor(_0x135e5b).search("(((.+)+)+)+$")})),_0x5a8f80;_0x135e5b();var _0x3ed702="varying vec3 v_data;\nuniform float u_mapbox_alpha;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize mediump float radius\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize highp vec4 stroke_color\n #pragma mapbox: initialize mediump float stroke_width\n #pragma mapbox: initialize lowp float stroke_opacity\n\n vec2 extrude = v_data.xy;\n float extrude_length = length(extrude);\n\n lowp float antialiasblur = v_data.z;\n float antialiased_blur = -max(blur, antialiasblur);\n\n float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\n\n float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\n antialiased_blur,\n 0.0,\n extrude_length - radius * 16.0 / (radius * 16.0 + stroke_width * 16.0)\n );\n\n gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t) * u_mapbox_alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x4f5e0f=(_0x2915de=!0,function(e,t){var i=_0x2915de?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2915de=!1,i}),_0x298c31=_0x4f5e0f(void 0,(function(){return _0x298c31.toString().search("(((.+)+)+)+$").toString().constructor(_0x298c31).search("(((.+)+)+)+$")})),_0x2915de;_0x298c31();var _0x5efcb0="\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n",_0x54b170=(_0x5ecf4a=!0,function(e,t){var i=_0x5ecf4a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ecf4a=!1,i}),_0x48d869=_0x54b170(void 0,(function(){return _0x48d869.toString().search("(((.+)+)+)+$").toString().constructor(_0x48d869).search("(((.+)+)+)+$")})),_0x5ecf4a;_0x48d869();var _0x11df66="\nvoid main() {\n gl_FragColor = vec4(1.0);\n}\n",_0x5cf356=(_0x129098=!0,function(e,t){var i=_0x129098?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x129098=!1,i}),_0x41b5c=_0x5cf356(void 0,(function(){return _0x41b5c.toString().search("(((.+)+)+)+$").toString().constructor(_0x41b5c).search("(((.+)+)+)+$")})),_0x129098;_0x41b5c();var _0xbbc853="\nattribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n",_0x1fd143=(_0x299f77=!0,function(e,t){var i=_0x299f77?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x299f77=!1,i}),_0x2284c7=_0x1fd143(void 0,(function(){return _0x2284c7.toString().search("(((.+)+)+)+$").toString().constructor(_0x2284c7).search("(((.+)+)+)+$")})),_0x299f77;_0x2284c7();var _0x2b8ca3="\nuniform highp vec4 u_color;\n\nvoid main() {\n gl_FragColor = u_color;\n}\n",_0xf469d5=(_0x3e41be=!0,function(e,t){var i=_0x3e41be?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3e41be=!1,i}),_0x1c48f0=_0xf469d5(void 0,(function(){return _0x1c48f0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c48f0).search("(((.+)+)+)+$")})),_0x3e41be;_0x1c48f0();var _0x13f02c="\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n uniform mat4 u_matrix;\n uniform float u_depthRange;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\n gl_Position = u_matrix * vec4(float(a_pos.x), float(a_pos.y), u_depthRange, 1);\n }\n",_0x20fc3c=(_0x30502e=!0,function(e,t){var i=_0x30502e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30502e=!1,i}),_0x37b0a0=_0x20fc3c(void 0,(function(){return _0x37b0a0.toString().search("(((.+)+)+)+$").toString().constructor(_0x37b0a0).search("(((.+)+)+)+$")})),_0x30502e;_0x37b0a0();var _0x3e9c32="#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float opacity\n gl_FragColor = color * opacity;\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x54c62b=(_0x5e10c0=!0,function(e,t){var i=_0x5e10c0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e10c0=!1,i}),_0x209442=_0x54c62b(void 0,(function(){return _0x209442.toString().search("(((.+)+)+)+$").toString().constructor(_0x209442).search("(((.+)+)+)+$")})),_0x5e10c0;_0x209442();var _0x1bc3a8="\nuniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\nuniform float u_vertical_gradient;\nuniform lowp float u_opacity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n #pragma mapbox: initialize highp float base\n #pragma mapbox: initialize highp float height\n #pragma mapbox: initialize highp vec4 color\n\n vec3 normal = a_normal_ed.xyz;\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(normal.x, 2.0);\n\n gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\n\n // Relative luminance (how dark/bright is the surface color?)\n float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\n\n v_color = vec4(0.0, 0.0, 0.0, 1.0);\n\n // Add slight ambient lighting so no extrusions are totally black\n vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\n color += ambientlight;\n\n // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\n float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);\n\n // Adjust directional so that\n // the range of values for highlight/shading is narrower\n // with lower light intensity\n // and with lighter/brighter surface colors\n directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\n\n // Add gradient along z axis of side surfaces\n if (normal.y != 0.0) {\n // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient,\n // and otherwise calculates the gradient based on base + height\n directional *= (\n (1.0 - u_vertical_gradient) +\n (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0)));\n }\n\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n // with lower bounds adjusted to hue of light\n // so that shading is tinted with the complementary (opposite) color to the light color\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n v_color *= u_opacity;\n}\n",_0x4d01bb=(_0x2883a9=!0,function(e,t){var i=_0x2883a9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2883a9=!1,i}),_0x388652=_0x4d01bb(void 0,(function(){return _0x388652.toString().search("(((.+)+)+)+$").toString().constructor(_0x388652).search("(((.+)+)+)+$")})),_0x2883a9;_0x388652();var _0xe7dc5e="\nvarying vec4 v_color;\n\nvoid main() {\n gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x522f07=(_0x52191e=!0,function(e,t){var i=_0x52191e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x52191e=!1,i}),_0x33eac6=_0x522f07(void 0,(function(){return _0x33eac6.toString().search("(((.+)+)+)+$").toString().constructor(_0x33eac6).search("(((.+)+)+)+$")})),_0x52191e;_0x33eac6();var _0xeadf54="\nuniform mat4 u_matrix;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_height_factor;\nuniform vec4 u_scale;\nuniform float u_vertical_gradient;\nuniform lowp float u_opacity;\n\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec3 normal = a_normal_ed.xyz;\n float edgedistance = a_normal_ed.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n base = max(0.0, base);\n height = max(0.0, height);\n\n float t = mod(normal.x, 2.0);\n float z = t > 0.0 ? height : base;\n\n gl_Position = u_matrix * vec4(a_pos, z, 1);\n\n vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0\n ? a_pos // extrusion top\n : vec2(edgedistance, z * u_height_factor); // extrusion side\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, pos);\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, pos);\n\n v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\n float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);\n directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\n\n if (normal.y != 0.0) {\n // This avoids another branching statement, but multiplies by a constant of 0.84 if no vertical gradient,\n // and otherwise calculates the gradient based on base + height\n directional *= (\n (1.0 - u_vertical_gradient) +\n (u_vertical_gradient * clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0)));\n }\n\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n v_lighting *= u_opacity;\n}\n",_0x441aec=(_0x64d099=!0,function(e,t){var i=_0x64d099?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x64d099=!1,i}),_0x550c25=_0x441aec(void 0,(function(){return _0x550c25.toString().search("(((.+)+)+)+$").toString().constructor(_0x550c25).search("(((.+)+)+)+$")})),_0x64d099;_0x550c25();var _0x517460="\nuniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float base\n #pragma mapbox: initialize lowp float height\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n vec4 mixedColor = mix(color1, color2, u_fade);\n\n gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x43b54d=(_0x51f838=!0,function(e,t){var i=_0x51f838?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51f838=!1,i}),_0x5b6229=_0x43b54d(void 0,(function(){return _0x5b6229.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b6229).search("(((.+)+)+)+$")})),_0x51f838;_0x5b6229();var _0x2f636c="\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n uniform mat4 u_matrix;\n uniform vec2 u_world;\n uniform float u_depthRange;\n varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n void main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n gl_Position = u_matrix * vec4(vec2(a_pos), u_depthRange, 1);\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n }\n",_0x27233f=(_0x441f7a=!0,function(e,t){var i=_0x441f7a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x441f7a=!1,i}),_0xb5b95f=_0x27233f(void 0,(function(){return _0xb5b95f.toString().search("(((.+)+)+)+$").toString().constructor(_0xb5b95f).search("(((.+)+)+)+$")})),_0x441f7a;_0xb5b95f();var _0x2afea5="varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n void main() {\n #pragma mapbox: initialize highp vec4 outline_color\n #pragma mapbox: initialize lowp float opacity\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x382558=(_0x233585=!0,function(e,t){var i=_0x233585?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x233585=!1,i}),_0x17da4d=_0x382558(void 0,(function(){return _0x17da4d.toString().search("(((.+)+)+)+$").toString().constructor(_0x17da4d).search("(((.+)+)+)+$")})),_0x233585;_0x17da4d();var _0x33b767="uniform mat4 u_matrix;\n uniform vec2 u_pixel_coord_upper;\n uniform vec2 u_pixel_coord_lower;\n uniform vec4 u_scale;\n uniform float u_depthRange;\n\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = vec2(pattern_from.xy);\n vec2 pattern_br_a = vec2(pattern_from.zw);\n vec2 pattern_tl_b = vec2(pattern_to.xy);\n vec2 pattern_br_b = vec2(pattern_to.zw);\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n gl_Position = u_matrix * vec4(vec2(a_pos), u_depthRange, 1);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileZoomRatio, vec2(a_pos));\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileZoomRatio, vec2(a_pos));\n }\n",_0x39d68d=(_0xce6505=!0,function(e,t){var i=_0xce6505?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xce6505=!1,i}),_0x43b45a=_0x39d68d(void 0,(function(){return _0x43b45a.toString().search("(((.+)+)+)+$").toString().constructor(_0x43b45a).search("(((.+)+)+)+$")})),_0xce6505;_0x43b45a();var _0x25229e="uniform vec2 u_texsize;\n uniform float u_fade;\n\n uniform sampler2D u_image;\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n gl_FragColor = mix(color1, color2, u_fade) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x102a7e=(_0x3fd86f=!0,function(e,t){var i=_0x3fd86f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3fd86f=!1,i}),_0x4c2c14=_0x102a7e(void 0,(function(){return _0x4c2c14.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c2c14).search("(((.+)+)+)+$")})),_0x3fd86f;_0x4c2c14();var _0x4faa5e="uniform mat4 u_matrix;\n uniform vec2 u_world;\n uniform vec2 u_pixel_coord_upper;\n uniform vec2 u_pixel_coord_lower;\n uniform vec4 u_scale;\n uniform float u_depthRange;\n\n#ifdef WEBGPU\n attribute ivec2 a_pos;\n#else\n attribute vec2 a_pos;\n#endif\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n varying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n gl_Position = u_matrix * vec4(vec2(a_pos), u_depthRange, 1);\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, fromScale * display_size_a, tileRatio, vec2(a_pos));\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, toScale * display_size_b, tileRatio, vec2(a_pos));\n\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n }\n",_0x30c2d4=(_0x1974b1=!0,function(e,t){var i=_0x1974b1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1974b1=!1,i}),_0x388c39=_0x30c2d4(void 0,(function(){return _0x388c39.toString().search("(((.+)+)+)+$").toString().constructor(_0x388c39).search("(((.+)+)+)+$")})),_0x1974b1;_0x388c39();var _0x27c613="uniform vec2 u_texsize;\n uniform sampler2D u_image;\n uniform float u_fade;\n\n varying vec2 v_pos_a;\n varying vec2 v_pos_b;\n varying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\n void main() {\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n vec2 imagecoord = mod(v_pos_a, 1.0);\n vec2 pos = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, imagecoord);\n vec4 color1 = texture2D(u_image, pos);\n\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\n vec2 pos2 = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, imagecoord_b);\n vec4 color2 = texture2D(u_image, pos2);\n\n // find distance to outline for alpha interpolation\n\n float dist = length(v_pos - gl_FragCoord.xy);\n float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n gl_FragColor = mix(color1, color2, u_fade) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x154d28=(_0x5020fe=!0,function(e,t){var i=_0x5020fe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5020fe=!1,i}),_0x557059=_0x154d28(void 0,(function(){return _0x557059.toString().search("(((.+)+)+)+$").toString().constructor(_0x557059).search("(((.+)+)+)+$")})),_0x5020fe;_0x557059();var _0x28d69d="\nuniform mat4 u_matrix;\nuniform float u_extrude_scale;\nuniform float u_opacity;\nuniform float u_intensity;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_extrude;\n\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\n\n// Effective \"0\" in the kernel density texture to adjust the kernel size to;\n// this empirically chosen number minimizes artifacts on overlapping kernels\n// for typical heatmap cases (assuming clustered source)\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main(void) {\n #pragma mapbox: initialize highp float weight\n #pragma mapbox: initialize mediump float radius\n\n // unencode the extrusion vector that we snuck into the a_pos vector\n vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n // This 'extrude' comes in ranging from [-1, -1], to [1, 1]. We'll use\n // it to produce the vertices of a square mesh framing the point feature\n // we're adding to the kernel density texture. We'll also pass it as\n // a varying, so that the fragment shader can determine the distance of\n // each fragment from the point feature.\n // Before we do so, we need to scale it up sufficiently so that the\n // kernel falls effectively to zero at the edge of the mesh.\n // That is, we want to know S such that\n // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\n // Which solves to:\n // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\n float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\n\n // Pass the varying in units of radius\n v_extrude = S * unscaled_extrude;\n\n // Scale by radius and the zoom-based scale factor to produce actual\n // mesh position\n vec2 extrude = v_extrude * radius * u_extrude_scale;\n\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n // in extrusion data\n vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\n\n gl_Position = u_matrix * pos;\n}\n",_0x5a1374=(_0x5695af=!0,function(e,t){var i=_0x5695af?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5695af=!1,i}),_0x39b599=_0x5a1374(void 0,(function(){return _0x39b599.toString().search("(((.+)+)+)+$").toString().constructor(_0x39b599).search("(((.+)+)+)+$")})),_0x5695af;_0x39b599();var _0x259751="\nuniform highp float u_intensity;\n\nvarying vec2 v_extrude;\n\n#pragma mapbox: define highp float weight\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main() {\n #pragma mapbox: initialize highp float weight\n\n // Kernel density estimation with a Gaussian kernel of size 5x5\n float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\n float val = weight * u_intensity * GAUSS_COEF * exp(d);\n\n gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x1069d8=(_0x4453ed=!0,function(e,t){var i=_0x4453ed?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4453ed=!1,i}),_0x39bd4a=_0x1069d8(void 0,(function(){return _0x39bd4a.toString().search("(((.+)+)+)+$").toString().constructor(_0x39bd4a).search("(((.+)+)+)+$")})),_0x4453ed;_0x39bd4a();var _0x1e1a3d="\nuniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n v_pos.x = a_pos.x;\n v_pos.y = 1.0 - a_pos.y;\n}\n",_0x5a6dbb=(_0xb594f3=!0,function(e,t){var i=_0xb594f3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb594f3=!1,i}),_0x25cb2c=_0x5a6dbb(void 0,(function(){return _0x25cb2c.toString().search("(((.+)+)+)+$").toString().constructor(_0x25cb2c).search("(((.+)+)+)+$")})),_0xb594f3;_0x25cb2c();var _0x945930="\nuniform sampler2D u_image;\nuniform sampler2D u_color_ramp;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n float t = texture2D(u_image, v_pos).r;\n vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\n gl_FragColor = color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(0.0);\n#endif\n}\n",_0x3aa5c5=(_0xa540a=!0,function(e,t){var i=_0xa540a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa540a=!1,i}),_0x505a62=_0x3aa5c5(void 0,(function(){return _0x505a62.toString().search("(((.+)+)+)+$").toString().constructor(_0x505a62).search("(((.+)+)+)+$")})),_0xa540a;_0x505a62();var _0x5d667b="\nuniform mat4 u_matrix;\nuniform vec2 u_dimension;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n highp vec2 epsilon = 1.0 / u_dimension;\n float scale = (u_dimension.x - 2.0) / u_dimension.x;\n v_pos = (a_texture_pos / 8192.0) * scale + epsilon;\n}\n",_0x31fb74=(_0x448062=!0,function(e,t){var i=_0x448062?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x448062=!1,i}),_0x51c46d=_0x31fb74(void 0,(function(){return _0x51c46d.toString().search("(((.+)+)+)+$").toString().constructor(_0x51c46d).search("(((.+)+)+)+$")})),_0x448062;_0x51c46d();var _0x417ed7="\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D u_image;\nvarying vec2 v_pos;\nuniform vec2 u_dimension;\nuniform float u_zoom;\nuniform float u_maxzoom;\nuniform vec4 u_unpack;\n\nfloat getElevation(vec2 coord, float bias) {\n // Convert encoded elevation value to meters\n vec4 data = texture2D(u_image, coord) * 255.0;\n data.a = -1.0;\n return dot(data, u_unpack) / 4.0;\n}\n\nvoid main() {\n vec2 epsilon = 1.0 / u_dimension;\n\n // queried pixels:\n // +-----------+\n // | | | |\n // | a | b | c |\n // | | | |\n // +-----------+\n // | | | |\n // | d | e | f |\n // | | | |\n // +-----------+\n // | | | |\n // | g | h | i |\n // | | | |\n // +-----------+\n\n float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\n float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\n float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\n float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\n float e = getElevation(v_pos, 0.0);\n float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\n float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\n float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\n float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\n\n // here we divide the x and y slopes by 8 * pixel size\n // where pixel size (aka meters/pixel) is:\n // circumference of the world / (pixels per tile * number of tiles)\n // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\n // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\n // we want to vertically exaggerate the hillshading though, because otherwise\n // it is barely noticeable at low zooms. to do this, we multiply this by some\n // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value\n // Here we use a=0.3 which works out to the expression below. see \n // nickidlugash's awesome breakdown for more info\n float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;\n\n vec2 deriv = vec2(\n (c + f + f + i) - (a + d + d + g),\n (g + h + h + i) - (a + b + b + c)\n ) / pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom);\n\n gl_FragColor = clamp(vec4(\n deriv.x / 2.0 + 0.5,\n deriv.y / 2.0 + 0.5,\n 1.0,\n 1.0), 0.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x405919=(_0x58f8a4=!0,function(e,t){var i=_0x58f8a4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x58f8a4=!1,i}),_0x374232=_0x405919(void 0,(function(){return _0x374232.toString().search("(((.+)+)+)+$").toString().constructor(_0x374232).search("(((.+)+)+)+$")})),_0x58f8a4;_0x374232();var _0x383025="\nuniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n v_pos = a_texture_pos / 8192.0;\n}\n",_0x2f6903=(_0x57508a=!0,function(e,t){var i=_0x57508a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57508a=!1,i}),_0x3b837e=_0x2f6903(void 0,(function(){return _0x3b837e.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b837e).search("(((.+)+)+)+$")})),_0x57508a;_0x3b837e();var _0x59637f="\nuniform sampler2D u_image;\nvarying vec2 v_pos;\n\nuniform vec2 u_latrange;\nuniform vec2 u_light;\nuniform vec4 u_shadow;\nuniform vec4 u_highlight;\nuniform vec4 u_accent;\n\n#define PI 3.141592653589793\n\nvoid main() {\n vec4 pixel = texture2D(u_image, v_pos);\n\n vec2 deriv = ((pixel.rg * 2.0) - 1.0);\n\n // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\n // to account for mercator projection distortion. see #4807 for details\n float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\n // We also multiply the slope by an arbitrary z-factor of 1.25\n float slope = atan(1.25 * length(deriv) / scaleFactor);\n float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0);\n\n float intensity = u_light.x;\n // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\n // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\n // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\n float azimuth = u_light.y + PI;\n\n // We scale the slope exponentially based on intensity, using a calculation similar to\n // the exponential interpolation function in the style spec:\n // so that higher intensity values create more opaque hillshading.\n float base = 1.875 - intensity * 1.75;\n float maxValue = 0.5 * PI;\n float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\n\n // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\n // so that the accent color's rate of change eases in while the shade color's eases out.\n float accent = cos(scaledSlope);\n // We multiply both the accent and shade color by a clamped intensity value\n // so that intensities >= 0.5 do not additionally affect the color values\n // while intensity values < 0.5 make the overall color more transparent.\n vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\n float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\n vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\n gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x5a2ceb=(_0xbec1=!0,function(e,t){var i=_0xbec1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xbec1=!1,i}),_0x3acd60=_0x5a2ceb(void 0,(function(){return _0x3acd60.toString().search("(((.+)+)+)+$").toString().constructor(_0x3acd60).search("(((.+)+)+)+$")})),_0xbec1;_0x3acd60();var _0x1a380c="// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also special normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n #define scale 0.015873016\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\n uniform mat4 u_matrix;\n uniform mediump float u_ratio;\n uniform vec2 u_units_to_pixels;\n uniform lowp float u_device_pixel_ratio;\n uniform float u_depthRange;\n\n varying vec2 v_normal;\n varying vec2 v_width2;\n varying float v_gamma_scale;\n varying highp float v_linesofar;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n\n v_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * 2.0;\n\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, u_depthRange, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n }\n",_0x2cd255=(_0x543b15=!0,function(e,t){var i=_0x543b15?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x543b15=!1,i}),_0x112cfb=_0x2cd255(void 0,(function(){return _0x112cfb.toString().search("(((.+)+)+)+$").toString().constructor(_0x112cfb).search("(((.+)+)+)+$")})),_0x543b15;_0x112cfb();var _0x3141f6="uniform lowp float u_device_pixel_ratio;\n\n varying vec2 v_width2;\n varying vec2 v_normal;\n varying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0xe1e943=(_0xd33752=!0,function(e,t){var i=_0xd33752?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd33752=!1,i}),_0x4a38d0=_0xe1e943(void 0,(function(){return _0x4a38d0.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a38d0).search("(((.+)+)+)+$")})),_0xd33752;_0x4a38d0();var _0x5a8c9b="// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also special normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n #define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n #define LINE_DISTANCE_SCALE 2.0\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\n uniform mat4 u_matrix;\n uniform mediump float u_ratio;\n uniform lowp float u_device_pixel_ratio;\n uniform vec2 u_patternscale_a;\n uniform float u_tex_y_a;\n uniform vec2 u_patternscale_b;\n uniform float u_tex_y_b;\n uniform vec2 u_units_to_pixels;\n uniform float u_depthRange;\n\n varying vec2 v_normal;\n varying vec2 v_width2;\n varying vec2 v_tex_a;\n varying vec2 v_tex_b;\n varying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n float a_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * LINE_DISTANCE_SCALE;\n\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist =outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, u_depthRange, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n #ifndef WEBGPU\n v_tex_a.y = 1.0 - v_tex_a.y;\n v_tex_b.y = 1.0 - v_tex_b.y;\n#endif\n\n v_width2 = vec2(outset, inset);\n }\n",_0x4ed1c3=(_0x29684b=!0,function(e,t){var i=_0x29684b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29684b=!1,i}),_0x14f01b=_0x4ed1c3(void 0,(function(){return _0x14f01b.toString().search("(((.+)+)+)+$").toString().constructor(_0x14f01b).search("(((.+)+)+)+$")})),_0x29684b;_0x14f01b();var _0xebc087="uniform lowp float u_device_pixel_ratio;\n uniform sampler2D u_image;\n uniform float u_sdfgamma;\n uniform float u_mix;\n uniform lowp float u_antialiasing;\n\n varying vec2 v_normal;\n varying vec2 v_width2;\n varying vec2 v_tex_a;\n varying vec2 v_tex_b;\n varying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\n void main() {\n #pragma mapbox: initialize highp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize lowp float floorwidth\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\n\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n if(alpha > 0.1){\n alpha = max(1.0 - u_antialiasing, alpha);\n }\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n }\n",_0x4c869e=(_0x253277=!0,function(e,t){var i=_0x253277?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x253277=!1,i}),_0x334cde=_0x4c869e(void 0,(function(){return _0x334cde.toString().search("(((.+)+)+)+$").toString().constructor(_0x334cde).search("(((.+)+)+)+$")})),_0x253277;_0x334cde();var _0x5d2796="\n// the attribute conveying progress along a line is scaled to [0, 2^15)\n#define MAX_LINE_DISTANCE 32767.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec2 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform lowp float u_device_pixel_ratio;\nuniform vec2 u_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float width\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\n\n vec2 pos = floor(a_pos_normal * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = a_pos_normal - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_width2 = vec2(outset, inset);\n}\n",_0x5ef3a3=(_0x3db86d=!0,function(e,t){var i=_0x3db86d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3db86d=!1,i}),_0x244d02=_0x5ef3a3(void 0,(function(){return _0x244d02.toString().search("(((.+)+)+)+$").toString().constructor(_0x244d02).search("(((.+)+)+)+$")})),_0x3db86d;_0x244d02();var _0x26549d="\nuniform lowp float u_device_pixel_ratio;\nuniform sampler2D u_image;\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n // For gradient lines, v_lineprogress is the ratio along the entire line,\n // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\n vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\n\n gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x1d100f=(_0x5b3e56=!0,function(e,t){var i=_0x5b3e56?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b3e56=!1,i}),_0x983f5f=_0x1d100f(void 0,(function(){return _0x983f5f.toString().search("(((.+)+)+)+$").toString().constructor(_0x983f5f).search("(((.+)+)+)+$")})),_0x5b3e56;_0x983f5f();var _0x2f0b1a="\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n#ifdef WEBGPU\n attribute ivec2 a_pos_normal;\n attribute uvec4 a_data;\n#else\n attribute vec2 a_pos_normal;\n attribute vec4 a_data;\n#endif\n\nuniform mat4 u_matrix;\nuniform vec2 u_units_to_pixels;\nuniform mediump float u_ratio;\nuniform lowp float u_device_pixel_ratio;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n\nvoid main() {\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float offset\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize mediump float width\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n // the distance over which the line edge fades out.\n // Retina devices need a smaller distance to avoid aliasing.\n float ANTIALIASING = 1.0 / u_device_pixel_ratio / 2.0;\n\n vec2 a_extrude = vec2(a_data.xy) - 128.0;\n float a_direction = mod(float(a_data.z), 4.0) - 1.0;\n float a_linesofar = (floor(float(a_data.z) / 4.0) + float(a_data.w) * 64.0) * LINE_DISTANCE_SCALE;\n // float tileRatio = u_scale.y;\n vec2 pos = floor(vec2(a_pos_normal) * 0.5);\n\n // x is 1 if it's a round cap, 0 otherwise\n // y is 1 if the normal points up, and -1 if it points down\n // We store these in the least significant bit of a_pos_normal\n mediump vec2 normal = vec2(a_pos_normal) - 2.0 * pos;\n normal.y = normal.y * 2.0 - 1.0;\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases.\n // moved them into the shader for clarity and simplicity.\n gapwidth = gapwidth / 2.0;\n float halfwidth = width / 2.0;\n offset = -1.0 * offset;\n\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist = outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_linesofar = a_linesofar;\n v_width2 = vec2(outset, inset);\n}\n",_0x327ffa=(_0xa9ed13=!0,function(e,t){var i=_0xa9ed13?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa9ed13=!1,i}),_0x17908c=_0x327ffa(void 0,(function(){return _0x17908c.toString().search("(((.+)+)+)+$").toString().constructor(_0x17908c).search("(((.+)+)+)+$")})),_0xa9ed13;_0x17908c();var _0xf358a8="\nuniform lowp float u_device_pixel_ratio;\nuniform vec2 u_texsize;\nuniform float u_fade;\nuniform mediump vec4 u_scale;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize mediump vec4 pattern_from\n #pragma mapbox: initialize mediump vec4 pattern_to\n\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n\n vec2 pattern_tl_a = pattern_from.xy;\n vec2 pattern_br_a = pattern_from.zw;\n vec2 pattern_tl_b = pattern_to.xy;\n vec2 pattern_br_b = pattern_to.zw;\n\n float pixelRatio = u_scale.x;\n float tileZoomRatio = u_scale.y;\n float fromScale = u_scale.z;\n float toScale = u_scale.w;\n\n vec2 display_size_a = vec2((pattern_br_a.x - pattern_tl_a.x) / pixelRatio, (pattern_br_a.y - pattern_tl_a.y) / pixelRatio);\n vec2 display_size_b = vec2((pattern_br_b.x - pattern_tl_b.x) / pixelRatio, (pattern_br_b.y - pattern_tl_b.y) / pixelRatio);\n\n vec2 pattern_size_a = vec2(display_size_a.x * fromScale / tileZoomRatio, display_size_a.y);\n vec2 pattern_size_b = vec2(display_size_b.x * toScale / tileZoomRatio, display_size_b.y);\n\n // Calculate the distance of the pixel from the line in pixels.\n float dist = length(v_normal) * v_width2.s;\n\n // Calculate the antialiasing fade factor. This is either when fading in\n // the line in case of an offset line (v_width2.t) or when fading out\n // (v_width2.s)\n float blur2 = (blur + 1.0 / u_device_pixel_ratio) * v_gamma_scale;\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n float x_a = mod(v_linesofar / pattern_size_a.x, 1.0);\n float x_b = mod(v_linesofar / pattern_size_b.x, 1.0);\n\n // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\n // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\n // to ensure we don't sample outside the designated symbol on the sprite sheet.\n // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\n // the texture coordinate\n float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_a.y + 2.0) / 2.0) / pattern_size_a.y);\n float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (pattern_size_b.y + 2.0) / 2.0) / pattern_size_b.y);\n vec2 pos_a = mix(pattern_tl_a / u_texsize, pattern_br_a / u_texsize, vec2(x_a, y_a));\n vec2 pos_b = mix(pattern_tl_b / u_texsize, pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0xf21aa8=(_0x2b68d7=!0,function(e,t){var i=_0x2b68d7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b68d7=!1,i}),_0x245c5f=_0xf21aa8(void 0,(function(){return _0x245c5f.toString().search("(((.+)+)+)+$").toString().constructor(_0x245c5f).search("(((.+)+)+)+$")})),_0x2b68d7;_0x245c5f();var _0x132eff="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\nattribute ivec4 a_pixeloffset;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec4 a_pixeloffset;\n#endif\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform float u_fade_change;\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\nuniform float u_depthRange;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n vec2 a_pxoffset = vec2(a_pixeloffset.xy);\n vec2 a_minFontScale = vec2(a_pixeloffset.zw) / 256.0;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // See comments in symbol_sdf.vertex\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // See comments in symbol_sdf.vertex\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * max(a_minFontScale, fontScale) + a_pxoffset / 16.0), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n\n v_tex = a_tex / u_texsize;\n // vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n // float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n // v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n v_fade_opacity = 1.0;\n}\n",_0x2768b0=(_0xc58fb3=!0,function(e,t){var i=_0xc58fb3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc58fb3=!1,i}),_0x522fa0=_0x2768b0(void 0,(function(){return _0x522fa0.toString().search("(((.+)+)+)+$").toString().constructor(_0x522fa0).search("(((.+)+)+)+$")})),_0xc58fb3;_0x522fa0();var _0x5d1a62="\nuniform sampler2D u_texture;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n #pragma mapbox: initialize lowp float opacity\n\n //lowp float alpha = opacity * v_fade_opacity;\n gl_FragColor = texture2D(u_texture, vec2(v_tex.x, 1.0 - v_tex.y)) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x24fc1f=(_0x2a405f=!0,function(e,t){var i=_0x2a405f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a405f=!1,i}),_0x37ca53=_0x24fc1f(void 0,(function(){return _0x37ca53.toString().search("(((.+)+)+)+$").toString().constructor(_0x37ca53).search("(((.+)+)+)+$")})),_0x2a405f;_0x37ca53();var _0x25e36e="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\nattribute ivec4 a_pixeloffset;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec4 a_pixeloffset;\n#endif\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\nuniform vec2 u_texsize;\nuniform float u_depthRange;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n vec2 a_pxoffset = vec2(a_pixeloffset.xy);\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n //vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale + a_pxoffset), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n float gamma_scale = gl_Position.w;\n\n //vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n //float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n //float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0 = a_tex / u_texsize;\n v_data1 = vec3(gamma_scale, size, 1.0);\n}\n",_0x5dacf2=(_0x3c3270=!0,function(e,t){var i=_0x3c3270?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3c3270=!1,i}),_0x5912df=_0x5dacf2(void 0,(function(){return _0x5912df.toString().search("(((.+)+)+)+$").toString().constructor(_0x5912df).search("(((.+)+)+)+$")})),_0x3c3270;_0x5912df();var _0x59e3ab="\n#define SDF_PX 8.0\n\nuniform bool u_is_halo;\nuniform sampler2D u_texture;\nuniform highp float u_gamma_scale;\nuniform lowp float u_device_pixel_ratio;\nuniform bool u_is_text;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n float EDGE_GAMMA = 0.105 / u_device_pixel_ratio;\n\n vec2 tex = v_data0.xy;\n float gamma_scale = v_data1.x;\n float size = v_data1.y;\n float fade_opacity = v_data1[2];\n\n float fontScale = u_is_text ? size / 24.0 : size;\n\n lowp vec4 color = fill_color;\n highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n lowp float buff = (256.0 - 64.0) / 256.0;\n if (u_is_halo) {\n color = halo_color;\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n buff = (6.0 - halo_width / fontScale) / SDF_PX;\n }\n\n#ifdef WEBGPU\n float dist = texture2D(u_texture, tex).r;\n#else\n float dist = texture2D(u_texture, tex).a;\n#endif\n highp float gamma_scaled = gamma * gamma_scale;\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n //gl_FragColor = color * (alpha * opacity * fade_opacity);\n gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x220de6=(_0x3cab7b=!0,function(e,t){var i=_0x3cab7b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3cab7b=!1,i}),_0x5cfb87=_0x220de6(void 0,(function(){return _0x5cfb87.toString().search("(((.+)+)+)+$").toString().constructor(_0x5cfb87).search("(((.+)+)+)+$")})),_0x3cab7b;_0x5cfb87();var _0x52c4e1="\nconst float PI = 3.141592653589793;\n\n#ifdef WEBGPU\nattribute ivec4 a_pos_offset;\nattribute uvec4 a_data;\n#else\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\n#endif\n\nattribute vec3 a_projected_pos;\n//attribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n// text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_coord_matrix;\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\nuniform vec2 u_texsize;\nuniform vec2 u_texsize_icon;\nuniform float u_depthRange;\n\nvarying vec4 v_data0;\nvarying vec4 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n vec2 a_pos = vec2(a_pos_offset.xy);\n vec2 a_offset = vec2(a_pos_offset.zw);\n\n vec2 a_tex = vec2(a_data.xy);\n vec2 a_size = vec2(a_data.zw);\n\n float a_size_min = floor(a_size[0] * 0.5);\n float is_sdf = a_size[0] - 2.0 * a_size_min;\n\n highp float segment_angle = -a_projected_pos[2];\n float size;\n\n if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = mix(a_size_min, a_size[1], u_size_t) / 128.0;\n } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n size = a_size_min / 128.0;\n } else {\n size = u_size;\n }\n\n vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n highp float camera_to_anchor_distance = projectedPoint.w;\n // If the label is pitched with the map, layout is done in pitched space,\n // which makes labels in the distance smaller relative to viewport space.\n // We counteract part of that effect by multiplying by the perspective ratio.\n // If the label isn't pitched with the map, we do layout in viewport space,\n // which makes labels in the distance larger relative to the features around\n // them. We counteract part of that effect by dividing by the perspective ratio.\n highp float distance_ratio = u_pitch_with_map ?\n camera_to_anchor_distance / u_camera_to_center_distance :\n u_camera_to_center_distance / camera_to_anchor_distance;\n highp float perspective_ratio = clamp(\n 0.5 + 0.5 * distance_ratio,\n 0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n 4.0);\n\n size *= perspective_ratio;\n\n float fontScale = size / 24.0;\n\n highp float symbol_rotation = 0.0;\n if (u_rotate_symbol) {\n // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n // To figure out that angle in projected space, we draw a short horizontal line in tile\n // space, project it, and measure its angle in projected space.\n vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n vec2 a = projectedPoint.xy / projectedPoint.w;\n vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n }\n\n highp float angle_sin = sin(segment_angle + symbol_rotation);\n highp float angle_cos = cos(segment_angle + symbol_rotation);\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n //gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n gl_Position = u_matrix * vec4(a_projected_pos.xy + rotation_matrix * (a_offset / 32.0 * u_size + a_pxoffset), u_depthRange, 1.0);\n float gamma_scale = gl_Position.w;\n\n // vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n // float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n // float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n v_data0.xy = a_tex / u_texsize;\n v_data0.zw = a_tex / u_texsize_icon;\n //v_data1 = vec4(gamma_scale, size, interpolated_fade_opacity, is_sdf);\n v_data1 = vec4(gamma_scale, size, 1.0, is_sdf); \n}\n",_0x214f06=(_0x1bd117=!0,function(e,t){var i=_0x1bd117?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1bd117=!1,i}),_0x275bad=_0x214f06(void 0,(function(){return _0x275bad.toString().search("(((.+)+)+)+$").toString().constructor(_0x275bad).search("(((.+)+)+)+$")})),_0x1bd117;_0x275bad();var _0x438ae7="\n#define SDF_PX 8.0\n\n#define SDF 1.0\n#define ICON 0.0\n\nuniform bool u_is_halo;\nuniform sampler2D u_texture;\nuniform sampler2D u_texture_icon;\nuniform highp float u_gamma_scale;\nuniform lowp float u_device_pixel_ratio;\n\nvarying vec4 v_data0;\nvarying vec4 v_data1;\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nvoid main() {\n #pragma mapbox: initialize highp vec4 fill_color\n #pragma mapbox: initialize highp vec4 halo_color\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize lowp float halo_width\n #pragma mapbox: initialize lowp float halo_blur\n\n// float fade_opacity = v_data1[2];\n\n// if (v_data1.w == ICON) {\n// vec2 tex_icon = v_data0.zw;\n// lowp float alpha = opacity * fade_opacity;\n// gl_FragColor = texture2D(u_texture_icon, tex_icon) * alpha;\n\n// #ifdef OVERDRAW_INSPECTOR\n// gl_FragColor = vec4(1.0);\n// #endif\n// return;\n// }\n\n// vec2 tex = v_data0.xy;\n\n// float EDGE_GAMMA = 0.105 / u_device_pixel_ratio;\n\n// float gamma_scale = v_data1.x;\n// float size = v_data1.y;\n\n// float fontScale = size / 24.0;\n\n// lowp vec4 color = fill_color;\n// highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n// lowp float buff = (256.0 - 64.0) / 256.0;\n// if (u_is_halo) {\n// color = halo_color;\n// gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n// buff = (6.0 - halo_width / fontScale) / SDF_PX;\n// }\n\n// lowp float dist = texture2D(u_texture, tex).a;\n// highp float gamma_scaled = gamma * gamma_scale;\n// highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n// gl_FragColor = color * (alpha * opacity * fade_opacity);\n\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x164064=(_0x3a0033=!0,function(e,t){var i=_0x3a0033?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a0033=!1,i}),_0x58695b=_0x164064(void 0,(function(){return _0x58695b.toString().search("(((.+)+)+)+$").toString().constructor(_0x58695b).search("(((.+)+)+)+$")})),_0x3a0033;_0x58695b();var _0x1b5d6a="\n#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n int packedIntValue = int(packedValue);\n int v0 = packedIntValue / 256;\n return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec2 unpack_opacity(const float packedOpacity) {\n int intOpacity = int(packedOpacity) / 2;\n return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\n}\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n// floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n return vec4(\n unpack_float(encodedColor[0]) / 255.0,\n unpack_float(encodedColor[1]) / 255.0\n );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_color(const vec4 packedColors, const float t) {\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n",_0x5bb18e=(_0x5b14d9=!0,function(e,t){var i=_0x5b14d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b14d9=!1,i}),_0x4cf219=_0x5bb18e(void 0,(function(){return _0x4cf219.toString().search("(((.+)+)+)+$").toString().constructor(_0x4cf219).search("(((.+)+)+)+$")})),_0x5b14d9;_0x4cf219();var _0x3c7324="\n#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n",_0x4e054d=(_0x395baf=!0,function(e,t){var i=_0x395baf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x395baf=!1,i}),_0x498396=_0x4e054d(void 0,(function(){return _0x498396.toString().search("(((.+)+)+)+$").toString().constructor(_0x498396).search("(((.+)+)+)+$")})),_0x395baf;_0x498396();var _0x4cc805="\nuniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\n // We are using Int16 for texture position coordinates to give us enough precision for\n // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n // as an arbitrarily high number to preserve adequate precision when rendering.\n // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n // so math for modifying either is consistent.\n v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n",_0x19308f=(_0xaf8521=!0,function(e,t){var i=_0xaf8521?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xaf8521=!1,i}),_0x1a8f40=_0x19308f(void 0,(function(){return _0x1a8f40.toString().search("(((.+)+)+)+$").toString().constructor(_0x1a8f40).search("(((.+)+)+)+$")})),_0xaf8521;_0x1a8f40();var _0x17b5bc="\nuniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n // read and cross-fade colors from the main and parent tiles\n vec4 color0 = texture2D(u_image0, v_pos0);\n vec4 color1 = texture2D(u_image1, v_pos1);\n if (color0.a > 0.0) {\n color0.rgb = color0.rgb / color0.a;\n }\n if (color1.a > 0.0) {\n color1.rgb = color1.rgb / color1.a;\n }\n vec4 color = mix(color0, color1, u_fade_t);\n color.a *= u_opacity;\n vec3 rgb = color.rgb;\n\n // spin\n rgb = vec3(\n dot(rgb, u_spin_weights.xyz),\n dot(rgb, u_spin_weights.zxy),\n dot(rgb, u_spin_weights.yzx));\n\n // saturation\n float average = (color.r + color.g + color.b) / 3.0;\n rgb += (average - rgb) * u_saturation_factor;\n\n // contrast\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n // brightness\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n gl_FragColor = vec4(1.0);\n#endif\n}\n",_0x59d184=(_0xab264a=!0,function(e,t){var i=_0xab264a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xab264a=!1,i}),_0x2f9e04=_0x59d184(void 0,(function(){return _0x2f9e04.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f9e04).search("(((.+)+)+)+$")})),_0xab264a;_0x2f9e04(),_0x2c23ed([{name:"a_pos",type:"Int16",components:2}]);var _0x94ffbf=_0x39d2e1(_0x3c7324,_0x1b5d6a),_0xda7a9a=_0x39d2e1(_0x2c690e,_0x444986),_0x249cc1=_0x39d2e1(_0x4754b3,_0x1303ea),_0x10e65c=_0x39d2e1(_0x3ed702,_0x3cca03),_0x5f2183=_0x39d2e1(_0x11df66,_0x5efcb0),_0x4097cd=_0x39d2e1(_0x259751,_0x28d69d),_0x13f5c5=_0x39d2e1(_0x945930,_0x1e1a3d),_0x2fcd71=_0x39d2e1(_0x3eaba3,_0x359195),_0x3d7132=_0x39d2e1(_0x500184,_0x2bc406),_0x106f83=_0x39d2e1(_0x2b8ca3,_0xbbc853),_0x252baa=_0x39d2e1(_0x3e9c32,_0x13f02c),_0x40f8b7=_0x39d2e1(_0x2afea5,_0x2f636c),_0xe56400=_0x39d2e1(_0x27c613,_0x4faa5e),_0x101022=_0x39d2e1(_0x25229e,_0x33b767),_0x47b03f=_0x39d2e1(_0xe7dc5e,_0x1bc3a8),_0xb0b111=_0x39d2e1(_0x517460,_0xeadf54),_0xf72395=_0x39d2e1(_0x417ed7,_0x5d667b),_0x4da50c=_0x39d2e1(_0x59637f,_0x383025),_0x366a41=_0x39d2e1(_0x3141f6,_0x1a380c),_0x535500=_0x39d2e1(_0x26549d,_0x5d2796),_0x274d09=_0x39d2e1(_0xf358a8,_0x2f0b1a),_0x22c7d7=_0x39d2e1(_0xebc087,_0x5a8c9b),_0x4d57f1=_0x39d2e1(_0x17b5bc,_0x4cc805),_0x40678a=_0x39d2e1(_0x5d1a62,_0x132eff),_0x13077c=_0x39d2e1(_0x59e3ab,_0x25e36e),_0x4e001c=_0x39d2e1(_0x438ae7,_0x52c4e1);function _0x39d2e1(e,t){var i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:e=e.replace(i,(function(e,t,i,r,o){return n[o]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+i+" "+r+" "+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n"})),vertexSource:t=t.replace(i,(function(e,t,i,r,o){var a="float"===r?"vec2":"vec4",s=o.match(/color/)?"color":a;return n[o]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\nvarying "+i+" "+r+" "+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\n#else\nuniform "+i+" "+r+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = a_"+o+";\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+i+" "+r+" "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+i+" "+r+" "+o+" = u_"+o+";\n#endif\n"}))}}var _0xc7a06=Object.freeze({__proto__:null,prelude:_0x94ffbf,background:_0xda7a9a,backgroundPattern:_0x249cc1,circle:_0x10e65c,clippingMask:_0x5f2183,heatmap:_0x4097cd,heatmapTexture:_0x13f5c5,collisionBox:_0x2fcd71,collisionCircle:_0x3d7132,debug:_0x106f83,fill:_0x252baa,fillOutline:_0x40f8b7,fillOutlinePattern:_0xe56400,fillPattern:_0x101022,fillExtrusion:_0x47b03f,fillExtrusionPattern:_0xb0b111,hillshadePrepare:_0xf72395,hillshade:_0x4da50c,line:_0x366a41,lineGradient:_0x535500,linePattern:_0x274d09,lineSDF:_0x22c7d7,raster:_0x4d57f1,symbolIcon:_0x40678a,symbolSDF:_0x13077c,symbolTextAndIcon:_0x4e001c}),_0x183689=(_0x2f5d66=!0,function(e,t){var i=_0x2f5d66?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f5d66=!1,i}),_0x3b948b=_0x183689(void 0,(function(){return _0x3b948b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b948b).search("(((.+)+)+)+$")})),_0x2f5d66;_0x3b948b();var _0x3a6e82=(_0x12a61f=!0,function(e,t){var i=_0x12a61f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12a61f=!1,i}),_0x434206=_0x3a6e82(void 0,(function(){return _0x434206.toString().search("(((.+)+)+)+$").toString().constructor(_0x434206).search("(((.+)+)+)+$")})),_0x12a61f;_0x434206();var _0x2f0fc8={clippingMaskUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix)}},clippingMaskUniformValues:function(e){return{u_matrix:e}}},_0x46945f=(_0x1ca51f=!0,function(e,t){var i=_0x1ca51f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ca51f=!1,i}),_0xdbd80d=_0x46945f(void 0,(function(){return _0xdbd80d.toString().search("(((.+)+)+)+$").toString().constructor(_0xdbd80d).search("(((.+)+)+)+$")})),_0x1ca51f;_0xdbd80d();var _0x4e49d6={backgroundUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_opacity:new _0x3d809b.Uniform1f(e,t.u_opacity),u_color:new _0x3d809b.UniformColor(e,t.u_color)}},backgroundPatternUniforms:function(e,t){return{u_matrix:new _0x3d809b.UniformMatrix4f(e,t.u_matrix),u_opacity:new _0x3d809b.Uniform1f(e,t.u_opacity),u_image:new _0x3d809b.Uniform1i(e,t.u_image),u_pattern_tl_a:new _0x3d809b.Uniform2f(e,t.u_pattern_tl_a),u_pattern_br_a:new _0x3d809b.Uniform2f(e,t.u_pattern_br_a),u_pattern_tl_b:new _0x3d809b.Uniform2f(e,t.u_pattern_tl_b),u_pattern_br_b:new _0x3d809b.Uniform2f(e,t.u_pattern_br_b),u_texsize:new _0x3d809b.Uniform2f(e,t.u_texsize),u_mix:new _0x3d809b.Uniform1f(e,t.u_mix),u_pattern_size_a:new _0x3d809b.Uniform2f(e,t.u_pattern_size_a),u_pattern_size_b:new _0x3d809b.Uniform2f(e,t.u_pattern_size_b),u_scale_a:new _0x3d809b.Uniform1f(e,t.u_scale_a),u_scale_b:new _0x3d809b.Uniform1f(e,t.u_scale_b),u_pixel_coord_upper:new _0x3d809b.Uniform2f(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new _0x3d809b.Uniform2f(e,t.u_pixel_coord_lower),u_tile_units_to_pixels:new _0x3d809b.Uniform1f(e,t.u_tile_units_to_pixels)}},backgroundUniformValues:function(e,t,i){return{u_matrix:e,u_opacity:t,u_color:i}},backgroundPatternUniformValues:function(e,t,i,n,r,o){return extend$1(bgPatternUniformValues(n,o,i,r),{u_matrix:e,u_opacity:t})}},_0x2666d5=(_0x438993=!0,function(e,t){var i=_0x438993?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x438993=!1,i}),_0x2e985c=_0x2666d5(void 0,(function(){return _0x2e985c.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e985c).search("(((.+)+)+)+$")})),_0x438993;_0x2e985c(),_0x33b7f1.fillUniforms,_0x33b7f1.fillPatternUniforms,_0x33b7f1.fillOutlineUniforms,_0x33b7f1.fillOutlinePatternUniforms,_0x36a80a.circleUniforms,_0x2f0fc8.clippingMaskUniforms,_0x18cbef.lineUniforms,_0x18cbef.lineGradientUniforms,_0x18cbef.linePatternUniforms,_0x18cbef.lineSDFUniforms,_0x1c04ac.symbolIconUniforms,_0x1c04ac.symbolSDFUniforms,_0x1c04ac.symbolTextAndIconUniforms,_0x4e49d6.backgroundUniforms,_0x4e49d6.backgroundPatternUniforms;var _0x1eeb0d=(_0x1b8562=!0,function(e,t){var i=_0x1b8562?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b8562=!1,i}),_0x403c61=_0x1eeb0d(void 0,(function(){return _0x403c61.toString().search("(((.+)+)+)+$").toString().constructor(_0x403c61).search("(((.+)+)+)+$")})),_0x1b8562;_0x403c61();var _0x457823=0,_0x53ebd8=1,_0x31f0f3=771,_0x2441d7=function(e,t,i){this.blendFunction=e,this.blendColor=t,this.mask=i};_0x2441d7.Replace=[_0x53ebd8,_0x457823],_0x2441d7.disabled=new _0x2441d7(_0x2441d7.Replace,_0x546352.transparent,[!1,!1,!1,!1]),_0x2441d7.unblended=new _0x2441d7(_0x2441d7.Replace,_0x546352.transparent,[!0,!0,!0,!0]),_0x2441d7.alphaBlended=new _0x2441d7([_0x53ebd8,_0x31f0f3],_0x546352.transparent,[!0,!0,!0,!0]);var _0x4a3410=(_0x533646=!0,function(e,t){var i=_0x533646?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x533646=!1,i}),_0x4ab52a=_0x4a3410(void 0,(function(){return _0x4ab52a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ab52a).search("(((.+)+)+)+$")})),_0x533646;_0x4ab52a();var _0x386772=function(e,t,i){this.context=e;var n=e.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(i),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),!this.dynamicDraw&&delete t.arrayBuffer};_0x386772.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},_0x386772.prototype.updateData=function(e){var t=this.context.gl;this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)},_0x386772.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var _0x5c652c=(_0x4e1def=!0,function(e,t){var i=_0x4e1def?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e1def=!1,i}),_0x657459=_0x5c652c(void 0,(function(){return _0x657459.toString().search("(((.+)+)+)+$").toString().constructor(_0x657459).search("(((.+)+)+)+$")})),_0x4e1def;_0x657459();var _0x129318={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},_0x4246eb=function(e,t,i,n){this.length=t.length,this.attributes=i,this.itemSize=t.bytesPerElement,this.dynamicDraw=n,this.context=e;var r=e.gl;this.buffer=r.createBuffer(),e.bindVertexBuffer.set(this.buffer),r.bufferData(r.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),!this.dynamicDraw&&delete t.arrayBuffer};_0x4246eb.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},_0x4246eb.prototype.updateData=function(e){var t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)},_0x4246eb.prototype.enableAttributes=function(e,t){for(var i=0;i<this.attributes.length;i++){var n=this.attributes[i],r=t.attributes[n.name];void 0!==r&&e.enableVertexAttribArray(r)}},_0x4246eb.prototype.setVertexAttribPointers=function(e,t,i){for(var n=0;n<this.attributes.length;n++){var r=this.attributes[n],o=t.attributes[r.name];void 0!==o&&e.vertexAttribPointer(o,r.components,e[_0x129318[r.type]],!1,this.itemSize,r.offset+this.itemSize*(i||0))}},_0x4246eb.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var _0x43d3ae=function(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};_0x43d3ae.prototype.get=function(){return this.current},_0x43d3ae.prototype.set=function(e){},_0x43d3ae.prototype.getDefault=function(){return this.default},_0x43d3ae.prototype.setDefault=function(){this.set(this.default)};var _0x256146={};_0x256146.ClearColor=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return _0x546352.transparent},t.prototype.set=function(e){this.current,this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1},t}(_0x43d3ae),_0x256146.ClearDepth=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 1},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.ClearStencil=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.ColorMask=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[!0,!0,!0,!0]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.DepthMask=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.StencilMask=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 255},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.StencilFunc=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return{func:de$y.ALWAYS,ref:0,mask:255}},t.prototype.set=function(e){var t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.StencilOp=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl,[de$y.KEEP,de$y.KEEP,de$y.KEEP]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.StencilTest=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$y.STENCIL_TEST):t.disable(de$y.STENCIL_TEST),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.DepthRange=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[0,1]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.DepthTest=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$y.DEPTH_TEST):t.disable(de$y.DEPTH_TEST),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.DepthFunc=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$y.LESS},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.Blend=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$y.BLEND):t.disable(de$y.BLEND),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.BlendFunc=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return[de$y.ONE,de$y.ZERO]},r.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)},r}(_0x43d3ae),_0x256146.BlendColor=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return _0x546352.transparent},t.prototype.set=function(e){var t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.BlendEquation=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$y.FUNC_ADD},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.CullFace=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(de$y.CULL_FACE):t.disable(de$y.CULL_FACE),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.CullFaceSide=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$y.BACK},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.FrontFace=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$y.CCW},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.Program=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.ActiveTextureUnit=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return de$y.TEXTURE0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.Viewport=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[0,0,1,1]},t.prototype.set=function(e){this.current,this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1},t}(_0x43d3ae),_0x256146.BindFramebuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.BindRenderbuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.BindTexture=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.BindVertexBuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.BindElementBuffer=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1},t}(_0x43d3ae),_0x256146.BindVertexArrayOES=function(e){function t(t){e.call(this,t),this.vao=t.extVertexArrayObject}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){this.vao&&(e!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.BindVertexArray=function(e){function t(t){e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.bindVertexArray(e),this.current=e,this.dirty=!1)},t}(_0x43d3ae),_0x256146.PixelStoreUnpack=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 4},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.PixelStoreUnpackPremultiplyAlpha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.PixelStoreUnpackFlipY=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}},t}(_0x43d3ae),_0x256146.FramebufferAttachment=function(e){function t(t,i){e.call(this,t),this.context=t,this.parent=i}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t}(_0x43d3ae),_0x256146.ColorAttachment=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setDirty=function(){this.dirty=!0},t.prototype.set=function(e){if(e!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}},t}(_0x256146.FramebufferAttachment),_0x256146.DepthAttachment=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){if(e!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t}(_0x256146.FramebufferAttachment);var _0x116d19=(_0x1a0991=!0,function(e,t){var i=_0x1a0991?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a0991=!1,i}),_0x404c8c=_0x116d19(void 0,(function(){return _0x404c8c.toString().search("(((.+)+)+)+$").toString().constructor(_0x404c8c).search("(((.+)+)+)+$")})),_0x1a0991;_0x404c8c();var _0x2b0751=function(e){var t=e._gl;this.webgl2=e.webgl2,this.gl=t,this.clearColor=new _0x256146.ClearColor(this),this.clearDepth=new _0x256146.ClearDepth(this),this.clearStencil=new _0x256146.ClearStencil(this),this.colorMask=new _0x256146.ColorMask(this),this.depthMask=new _0x256146.DepthMask(this),this.stencilMask=new _0x256146.StencilMask(this),this.stencilFunc=new _0x256146.StencilFunc(this),this.stencilOp=new _0x256146.StencilOp(this),this.stencilTest=new _0x256146.StencilTest(this),this.depthRange=new _0x256146.DepthRange(this),this.depthTest=new _0x256146.DepthTest(this),this.depthFunc=new _0x256146.DepthFunc(this),this.blend=new _0x256146.Blend(this),this.blendFunc=new _0x256146.BlendFunc(this),this.blendColor=new _0x256146.BlendColor(this),this.blendEquation=new _0x256146.BlendEquation(this),this.cullFace=new _0x256146.CullFace(this),this.cullFaceSide=new _0x256146.CullFaceSide(this),this.frontFace=new _0x256146.FrontFace(this),this.program=new _0x256146.Program(this),this.activeTexture=new _0x256146.ActiveTextureUnit(this),this.viewport=new _0x256146.Viewport(this),this.bindFramebuffer=new _0x256146.BindFramebuffer(this),this.bindRenderbuffer=new _0x256146.BindRenderbuffer(this),this.bindTexture=new _0x256146.BindTexture(this),this.bindVertexBuffer=new _0x256146.BindVertexBuffer(this),this.bindElementBuffer=new _0x256146.BindElementBuffer(this),this.webgl2?this.bindVertexArray=new _0x256146.BindVertexArray(this):this.bindVertexArray=this.extVertexArrayObject&&new _0x256146.BindVertexArrayOES(this),this.pixelStoreUnpack=new _0x256146.PixelStoreUnpack(this),this.pixelStoreUnpackPremultiplyAlpha=new _0x256146.PixelStoreUnpackPremultiplyAlpha(this),this.pixelStoreUnpackFlipY=new _0x256146.PixelStoreUnpackFlipY(this),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTimerQuery=!1};function _0x213a3c(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!_0x213a3c(e[i],t[i]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!_0x213a3c(e[n],t[n]))return!1;return!0}return e===t}_0x2b0751.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},_0x2b0751.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray&&(this.bindVertexArray.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},_0x2b0751.prototype.createIndexBuffer=function(e,t){return new _0x386772(this,e,t)},_0x2b0751.prototype.createVertexBuffer=function(e,t,i){return new _0x4246eb(this,e,t,i)},_0x2b0751.prototype.createRenderbuffer=function(e,t,i){var n=this.gl,r=n.createRenderbuffer();return this.bindRenderbuffer.set(r),n.renderbufferStorage(n.RENDERBUFFER,e,t,i),this.bindRenderbuffer.set(null),r},_0x2b0751.prototype.createFramebuffer=function(e,t){return new Framebuffer(this,e,t)},_0x2b0751.prototype.clear=function(e){var t=e.color,i=e.depth,n=this.gl,r=0;t&&(r|=n.COLOR_BUFFER_BIT,this.clearColor.set(t),this.colorMask.set([!0,!0,!0,!0])),void 0!==i&&(r|=n.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(i),this.depthMask.set(!0)),n.clear(r)},_0x2b0751.prototype.setCullFace=function(e){!1===e.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))},_0x2b0751.prototype.setDepthMode=function(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)},_0x2b0751.prototype.setStencilMode=function(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)},_0x2b0751.prototype.setColorMode=function(e){_0x213a3c(e.blendFunction,_0x2441d7.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},_0x2b0751.prototype.unbindVAO=function(){this.bindVertexArray&&this.bindVertexArray.set(null)};var _0x3ef04a=(_0x42cff6=!0,function(e,t){var i=_0x42cff6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42cff6=!1,i}),_0xb6f098=_0x3ef04a(void 0,(function(){return _0xb6f098.toString().search("(((.+)+)+)+$").toString().constructor(_0xb6f098).search("(((.+)+)+)+$")})),_0x42cff6;_0xb6f098();var _0x225ec4={circle:_0x3ac934,line:_0x32f715,fill:_0x107c4c,symbol:_0x13d16f},_0x24cf89=_0x2c23ed([{name:"a_pos",type:"Int16",components:2}]),_0x3fc49d=function(e,t,i){this.cesiumContext=e,this.context=new _0x2b0751(e),this.width=i,this.height=i,this.transform=t,this.transform.resize(this.width,this.height),this._globalLineWidthScale=1,this.setup(),this.numSublayers=1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new _0x2241e8,this.clearCommand=new t$W({color:new e$1X(0,0,0,0),depth:1})};function _0x4530c9(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function _0x195096(e,t,i,n,r,o,a){var s=1/(t-i),l=1/(n-r),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+i)*s,e[13]=(r+n)*l,e[14]=(a+o)*u,e[15]=1,e}function _0x232e8d(e,t,i){var n=i[0],r=i[1],o=i[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}_0x3fc49d.prototype.resize=function(e,t){var i=this.context.gl;if(this.width=e,this.height=t,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,r=this.style._order;n<r.length;n+=1){var o=r[n];this.style._layers[o].resize()}this.depthRbo&&(i.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},_0x3fc49d.prototype.setup=function(){this.context;var e=new _0x5ca07d;e.emplaceBack(0,0),e.emplaceBack(ne$C,0),e.emplaceBack(0,ne$C),e.emplaceBack(ne$C,ne$C),this.tileExtentBuffer=_0x42145e.toVertexBuffer(this.cesiumContext,e,_0x24cf89.members),this.tileExtentSegments=_0x1e8367.simpleSegment(0,0,4,2);var t=new _0x5ca07d;t.emplaceBack(0,0),t.emplaceBack(ne$C,0),t.emplaceBack(0,ne$C),t.emplaceBack(ne$C,ne$C),this.debugBuffer=_0x42145e.toVertexBuffer(this.cesiumContext,t,_0x24cf89.members),this.debugSegments=_0x1e8367.simpleSegment(0,0,4,5);var i=new _0x5ca07d;i.emplaceBack(0,0),i.emplaceBack(1,0),i.emplaceBack(0,1),i.emplaceBack(1,1),this.viewportBuffer=_0x42145e.toVertexBuffer(this.cesiumContext,i,_0x24cf89.members),this.viewportSegments=_0x1e8367.simpleSegment(0,0,4,2);var n=new _0x459120;n.emplaceBack(0),n.emplaceBack(1),n.emplaceBack(3),n.emplaceBack(2),n.emplaceBack(0),this.tileBorderIndexBuffer=_0x42145e.toIndexBuffer(this.cesiumContext,n);var r=new _0x48dae8;r.emplaceBack(0,1,2),r.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=_0x42145e.toIndexBuffer(this.cesiumContext,r),this.context.gl,this.stencilClearMode=new _0x7ad9f8({func:de$y.ALWAYS,mask:0},0,255,de$y.ZERO,de$y.ZERO,de$y.ZERO)},_0x3fc49d.prototype.clearStencil=function(){var e=this.context,t=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var i=_0x4530c9();_0x195096(i,0,this.width,this.height,0,0,1),_0x232e8d(i,i,[this.width,this.height,0]),this.useProgram("clippingMask").draw(e,t.TRIANGLES,_0x4a9140.disabled,this.stencilClearMode,_0x2441d7.disabled,_0x14ded5.disabled,_0x2f0fc8.clippingMaskUniformValues(i),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},_0x3fc49d.prototype._renderTileClippingMasks=function(e,t){if(this.currentStencilSource!==e.source&&e.isTileClipped()&&t&&t.length){this.currentStencilSource=e.source;var i=this.context,n=i.gl;this.nextStencilID+t.length>256&&this.clearStencil(),i.setColorMode(_0x2441d7.disabled),i.setDepthMode(_0x4a9140.disabled);var r=this.useProgram("clippingMask").program;this._tileClippingMaskIDs={};for(var o=0,a=t;o<a.length;o+=1){var s=a[o],l=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;r.draw(i,n.TRIANGLES,_0x4a9140.disabled,new _0x7ad9f8({func:n.ALWAYS,mask:0},l,255,n.KEEP,n.KEEP,n.REPLACE),_0x2441d7.disabled,_0x14ded5.disabled,_0x2f0fc8.clippingMaskUniformValues(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},_0x3fc49d.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new _0x7ad9f8({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},_0x3fc49d.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new _0x7ad9f8({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},_0x3fc49d.prototype.colorModeForRenderPass=function(){var e=this.context.gl;if(this._showOverdrawInspector){var t=1/8;return new _0x2441d7([e.CONSTANT_COLOR,e.ONE],new _0x546352(t,t,t,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?_0x2441d7.unblended:_0x2441d7.alphaBlended},_0x3fc49d.prototype.depthModeForSublayer=function(e,t,i){if(!this.opaquePassEnabledForLayer())return _0x4a9140.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new _0x4a9140(i||de$y.LEQUAL,t,[n,n])},_0x3fc49d.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},_0x3fc49d.prototype.renderOneTile=function(e,t,i){this.style=e,this.options=i,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager;var n=this.style._order;for(this.clearCommand.execute(this.cesiumContext,i.passState),this._showOverdrawInspector=!1,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.opaquePassCutoff=1/0,this.renderPass="opaque",this.currentLayer=n.length-1;this.currentLayer>=0;this.currentLayer--){var r=this.style._layers[n[this.currentLayer]];this.renderLayerForOneTile(this,t,r,i)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<n.length;this.currentLayer++){var o=this.style._layers[n[this.currentLayer]];this.renderLayerForOneTile(this,t,o,i)}},_0x3fc49d.prototype.render=function(e,t){this.style=e,this.options=t,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(ref_properties.browser.now()),this.imageManager.beginFrame();var i=this.style._order,n=this.style.sourceCaches;for(var r in n){var o=n[r];o.used&&o.prepare(this.context)}var a={},s={},l={};for(var u in n){var c=n[u];a[u]=c.getVisibleCoordinates(),s[u]=a[u].slice().reverse(),l[u]=c.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var h=0;h<i.length;h++){var d=i[h];if(this.style._layers[d].is3D()){this.opaquePassCutoff=h;break}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:t.showOverdrawInspector?_0x546352.black:_0x546352.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=t.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){var f=this.style._layers[i[this.currentLayer]],p=n[f.source],_=a[f.source];this._renderTileClippingMasks(f,_),this.renderLayer(this,p,f,_)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<i.length;this.currentLayer++){var m=this.style._layers[i[this.currentLayer]],g=n[m.source],x=("symbol"===m.type?l:s)[m.source];this._renderTileClippingMasks(m,a[m.source]),this.renderLayer(this,g,m,x)}this.context.setDefault()},_0x3fc49d.prototype.setupOffscreenDepthRenderbuffer=function(){var e=this.context;!this.depthRbo&&(this.depthRbo=e.createRenderbuffer(e.gl.DEPTH_COMPONENT16,this.width,this.height))},_0x3fc49d.prototype.renderLayerForOneTile=function(e,t,i,n){null!=i&&(i.isHidden(t.requestZ)||(this.id=i.id,_0x225ec4[i.type](e,t,i,n)))},_0x3fc49d.prototype.renderLayer=function(e,t,i,n){i.isHidden(this.transform.zoom)||("background"===i.type||"custom"===i.type||n.length)&&(this.id=i.id,_0x225ec4[i.type](e,t,i,n,this.style.placement.variableOffsets))},_0x3fc49d.prototype.translatePosMatrix=function(e,t,i,n,r){if(!i[0]&&!i[1])return e;var o=r?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(o){var a=Math.sin(o),s=Math.cos(o);i=[i[0]*s-i[1]*a,i[0]*a+i[1]*s]}var l=[r?i[0]:pixelsToTileUnits(t,i[0],this.transform.zoom),r?i[1]:pixelsToTileUnits(t,i[1],this.transform.zoom),0],u=new Float32Array(16);return _0x3fdff7.mat4.translate(u,e,l),u},_0x3fc49d.prototype.isPatternMissing=function(e){if(!e)return!1;var t=this.imageManager.getPattern(e.from.toString()),i=this.imageManager.getPattern(e.to.toString());return!t||!i},_0x3fc49d.prototype.useProgram=function(e,t,i){void 0===t&&(t=this.emptyProgramConfiguration),this.cache=this.cache||{};var n=""+e+(t.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");if(!this.cache[n]){var r=_0xc7a06[e];this.cache[n]={};var o=t.defines(),a=_0xc7a06.prelude.vertexSource.concat(r.vertexSource),s=_0xc7a06.prelude.fragmentSource.concat(r.fragmentSource),l=new s$V({name:e+"_vp",defines:o,sources:[a]}),u=new s$V({name:e+"_fp",defines:o,sources:[s]}),c=i||t.getAttributeLocation(),h=r$14.fromCache({name:n,context:this.cesiumContext,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:c});this.cache[n].cesiumProgram=h}return this.cache[n]},_0x3fc49d.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},_0x3fc49d.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)};var _0x466ead=(_0x42d0cf=!0,function(e,t){var i=_0x42d0cf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42d0cf=!1,i}),_0x5b2e15=_0x466ead(void 0,(function(){return _0x5b2e15.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b2e15).search("(((.+)+)+)+$")})),_0x42d0cf;function _0x23b08c(e,t,i,n,r){for(var o=r.patternDependencies,a=0,s=t;a<s.length;a+=1){var l=s[a],u=l.paint.get(e+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:n-1},i,{},r.availableImages),h=u.evaluate({zoom:n},i,{},r.availableImages),d=u.evaluate({zoom:n+1},i,{},r.availableImages);c=c&&c.name?c.name:c,h=h&&h.name?h.name:h,d=d&&d.name?d.name:d,o[c]=!0,o[h]=!0,o[d]=!0,i.patterns[l.id]={min:c,mid:h,max:d}}}return i}_0x5b2e15();var _0x39f71c=(_0x23f518=!0,function(e,t){var i=_0x23f518?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23f518=!1,i}),_0x3d2877=_0x39f71c(void 0,(function(){return _0x3d2877.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d2877).search("(((.+)+)+)+$")})),_0x23f518;function _0x4db9cd(e,t,i){for(var n=i.patternDependencies,r=!1,o=0,a=t;o<a.length;o+=1){var s=a[o].paint.get(e+"-pattern");!s.isConstant()&&(r=!0);var l=s.constantOr(null);l&&(r=!0,n[l.to]=!0,n[l.from]=!0)}return r}if(_0x3d2877(),typeof WebAssembly<"u"){let e=function(e){return t$G.locateFile?t$G.locateFile(e,O$F):O$F+e},t=function(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1)},i=function(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return _$L[e>>0];case"i16":return A$_[e>>1];case"i32":case"i64":return w$Q[e>>2];case"float":return _e$q[e>>2];case"double":return pe$w[e>>3];default:de("invalid type for getValue: "+t)}return null},n=function(e,t){e||de("Assertion failed: "+t)},r=function(e){var t=t$G["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=z$P(i),c(e,t,i)}return t},array:function(e){var t=z$P(e.length);return h(e,t),t}};var u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p<o.length;p++){var _=s[i[p]];_?(0===f&&(f=de$s()),d[p]=_(o[p])):d[p]=o[p]}var m=u.apply(null,d);return m=function(e){return"string"===t?l(e):"boolean"===t?Boolean(e):e}(m),0!==f&&Je$9(f),m},a=function(e,t,i,n){return function(){return o(e,t,i,arguments)}},s=function(e,i,n){for(var r=i+n,o=i;e[o]&&!(o>=r);)++o;if(o-i>16&&e.subarray&&ke$f)return ke$f.decode(e.subarray(i,o));for(var a="";i<o;){var s=e[i++];if(128&s){var l=63&e[i++];if(192!=(224&s)){var u=63&e[i++];if(224==(240&s)?s=(15&s)<<12|l<<6|u:(240!=(248&s)&&t("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),s=(7&s)<<18|l<<12|u<<6|63&e[i++]),s<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(b$11,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343)l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s);if(l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,b$11,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),_$L.set(e,t)},d=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))},f=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},p=function(){var e=f();return t$G.extraStackTrace&&(e+="\n"+t$G.extraStackTrace()),d(e)},_=function(e,t){return e%t>0&&(e+=t-e%t),e},m=function(){t$G.HEAP8=_$L=new Int8Array(E$U),t$G.HEAP16=A$_=new Int16Array(E$U),t$G.HEAP32=w$Q=new Int32Array(E$U),t$G.HEAPU8=b$11=new Uint8Array(E$U),t$G.HEAPU16=new Uint16Array(E$U),t$G.HEAPU32=D$T=new Uint32Array(E$U),t$G.HEAPF32=_e$q=new Float32Array(E$U),t$G.HEAPF64=pe$w=new Float64Array(E$U)},g=function(){n(0==(3&N$L)),D$T[(N$L>>2)-1]=34821223,D$T[(N$L>>2)-2]=2310721022},x=function(){(34821223!=D$T[(N$L>>2)-1]||2310721022!=D$T[(N$L>>2)-2])&&de("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+D$T[(N$L>>2)-2].toString(16)+" "+D$T[(N$L>>2)-1].toString(16)),1668509029!==w$Q[0]&&de("Runtime error: The application has corrupted its heap memory area (address zero)!")},y=function(e){de("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(N$L-de$s()+e)+" bytes available!")},v=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?t$G.dynCall_v(i):t$G.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}},$=function(){if(t$G.preRun)for("function"==typeof t$G.preRun&&(t$G.preRun=[t$G.preRun]);t$G.preRun.length;)S(t$G.preRun.shift());v(je$f)},b=function(){x(),!u$K&&(u$K=!0,v(Ge$g))},T=function(){x(),v(We$j)},C=function(){if(x(),t$G.postRun)for("function"==typeof t$G.postRun&&(t$G.postRun=[t$G.postRun]);t$G.postRun.length;)w(t$G.postRun.shift());v(qe$d)},S=function(e){je$f.unshift(e)},w=function(e){qe$d.unshift(e)},E=function(e){C$V++,t$G.monitorRunDependencies&&t$G.monitorRunDependencies(C$V),e&&(n(!P$P[e]),P$P[e]=1,null===k$P&&typeof setInterval<"u"&&(k$P=setInterval((function(){if(ne$B)return clearInterval(k$P),void(k$P=null)}),1e4)))},P=function(e){if(C$V--,t$G.monitorRunDependencies&&t$G.monitorRunDependencies(C$V),e&&(n(P$P[e]),delete P$P[e]),0==C$V&&(null!==k$P&&(clearInterval(k$P),k$P=null),$$P)){var t=$$P;$$P=null,t()}},A=function(e){return String.prototype.startsWith?e.startsWith(Ve$h):0===e.indexOf(Ve$h)},L=function(){try{if(t$G.wasmBinary)return new Uint8Array(t$G.wasmBinary);if(t$G.readBinary)return t$G.readBinary(S$M);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}},M=function(){return t$G.wasmBinary||!V$M&&!I$11||"function"!=typeof fetch?new Promise((function(e,t){e(L())})):fetch(S$M,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+S$M+"'";return e.arrayBuffer()})).catch((function(){return L()}))},R=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:Yt$6};function i(e,t){var i=e.exports;t$G.asm=i,P("wasm-instantiate")}E("wasm-instantiate");var r=t$G;function o(e){n(t$G===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,i(e.instance)}function a(e){return M().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(t$G.instantiateWasm)try{return t$G.instantiateWasm(t,i)}catch{return!1}return function(){if(t$G.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||A(S$M)||"function"!=typeof fetch)return a(o);fetch(S$M,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},O=function(e){return ie$z(e)},D=function(e){e&&B$Q[e].refcount++},I=function(e){if(!e||B$Q[e])return e;for(var t in B$Q)for(var i=+t,n=B$Q[i].adjusted,r=n.length,o=0;o<r;o++)if(n[o]===e)return i;return e},B=function(e){var t=B$Q[e];return t&&!t.caught&&(t.caught=!0,K$N.uncaught_exception--),t&&(t.rethrown=!1),rn$4.push(e),D(I(e)),e},F=function(e,t,i){throw B$Q[e]={ptr:e,adjusted:[e],type:t,destructor:i,refcount:0,caught:!1,rethrown:!1},"uncaught_exception"in K$N?K$N.uncaught_exception++:K$N.uncaught_exception=1,e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."},N=function(){return!!K$N.uncaught_exception},G=function(){},z=function(){},U=function(e,t){d$12.varargs=t;try{d$12.getStreamFromFD(),d$12.get(),d$12.get(),d$12.get(),d$12.get();return de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$O>"u"||!(e instanceof y$O.ErrnoError))&&de(e),-e.errno}},V=function(){var e=t$G._fflush;e&&e(0);var t=d$12.buffers;t[1].length&&d$12.printChar(1,10),t[2].length&&d$12.printChar(2,10)},k=function(e,t){d$12.varargs=t;try{for(var i=d$12.get(),n=d$12.get(),r=d$12.get(),o=0,a=0;a<r;a++){for(var s=w$Q[n+8*a>>2],l=w$Q[n+(8*a+4)>>2],u=0;u<l;u++)d$12.printChar(i,b$11[s+u]);o+=l}return o}catch(e){return(typeof y$O>"u"||!(e instanceof y$O.ErrnoError))&&de(e),-e.errno}},W=function(e,t){d$12.varargs=t;try{return 0}catch(e){return(typeof y$O>"u"||!(e instanceof y$O.ErrnoError))&&de(e),-e.errno}},H=function(e,t){d$12.varargs=t;try{d$12.getStreamFromFD();return de("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof y$O>"u"||!(e instanceof y$O.ErrnoError))&&de(e),-e.errno}},q=function(){},j=function(){t$G.abort()},X=function(){return _$L.length},Y=function(e,t,i){b$11.set(b$11.subarray(t,t+i),e)},Z=function(e){if(!t$G.___errno_location)return e;w$Q[t$G.___errno_location()>>2]=e},K=function(e){de("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+_$L.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},Q=function(e){e=_(e,65536);var t=E$U.byteLength;try{return-1!==Y$H.grow((e-t)/65536)&&(E$U=Y$H.buffer,!0)}catch(i){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+i),!1}},J=function(e){var i=X();n(e>i);var r=65536,o=2147418112;if(e>o)return!1;for(var a=Math.max(i,16777216);a<e;)(a=a<=536870912?_(2*a,r):Math.min(_((3*a+2147483648)/4,r),o))===i&&t("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+_$L.length);return!!Q(a)&&(m(),!0)},ee=function(e){T$R("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},te=function(e){T$R("Invalid function pointer called with signature 'iidiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},ie=function(e){T$R("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},ne=function(e){T$R("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},re=function(e){T$R("Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},oe=function(e){T$R("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},ae=function(e){T$R("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},se=function(e){T$R("Invalid function pointer called with signature 'viiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},le=function(e){T$R("Invalid function pointer called with signature 'viiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},ue=function(e){T$R("Invalid function pointer called with signature 'viiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),T$R("Build with ASSERTIONS=2 for more info."),de(e)},ce=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},he=function(e){function t(){t$G.calledRun||(t$G.calledRun=!0,!ne$B&&(b(),T(),t$G.onRuntimeInitialized&&t$G.onRuntimeInitialized(),n(!t$G._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),C()))}e=e||t$G.arguments,C$V>0||(g(),$(),C$V>0)||t$G.calledRun||(t$G.setStatus?(t$G.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t$G.setStatus("")}),1),t()}),1)):t(),x())},de=function(e){t$G.onAbort&&t$G.onAbort(e),ne$B=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+p();throw Ye$g&&Ye$g.forEach((function(i){t=i(t,e)})),t};var t$G=typeof t$G<"u"?t$G:{},q$Y={},U$S;for(U$S in t$G)t$G.hasOwnProperty(U$S)&&(q$Y[U$S]=t$G[U$S]);t$G.arguments=[],t$G.thisProgram="./this.program",t$G.quit=function(e,t){throw t},t$G.preRun=[],t$G.postRun=[];var V$M=!1,I$11=!1,fe$u=!1,Ae$q=!1,Ne$i=!1;if(V$M="object"==typeof window,I$11="function"==typeof importScripts,Ae$q="object"==typeof process&&"function"==typeof require,fe$u=Ae$q&&!V$M&&!I$11,Ne$i=!V$M&&!fe$u&&!I$11,t$G.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var O$F="",ce$s,le$u;if(fe$u)O$F=__dirname+"/",t$G.read=function(e,t){var i;return ce$s||(ce$s=require("fs")),le$u||(le$u=require("path")),e=le$u.normalize(e),i=ce$s.readFileSync(e),t?i:i.toString()},t$G.readBinary=function(e){var t=t$G.read(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&(t$G.thisProgram=process.argv[1].replace(/\\/g,"/")),t$G.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=t$G),process.on("uncaughtException",(function(e){if(!(e instanceof ce))throw e})),process.on("unhandledRejection",de),t$G.quit=function(e){process.exit(e)},t$G.inspect=function(){return"[Emscripten Module object]"};else if(Ne$i)typeof read<"u"&&(t$G.read=function(e){return read(e)}),t$G.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"?t$G.arguments=scriptArgs:typeof arguments<"u"&&(t$G.arguments=arguments),"function"==typeof quit&&(t$G.quit=function(e){quit(e)});else{if(!V$M&&!I$11)throw new Error("environment detection error");I$11?O$F=self.location.href:document.currentScript&&(O$F=document.currentScript.src),O$F=0!==O$F.indexOf("blob:")?O$F.substr(0,O$F.lastIndexOf("/")+1):"",t$G.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},I$11&&(t$G.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),t$G.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},t$G.setWindowTitle=function(e){document.title=e}}var J$O=t$G.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),T$R=t$G.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||J$O);for(U$S in q$Y)q$Y.hasOwnProperty(U$S)&&(t$G[U$S]=q$Y[U$S]);q$Y=void 0,n(typeof t$G.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$G.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$G.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$G.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),de$s=Je$9=z$P=function(){de("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Yt$6={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var Ie$k=0,Zt$5=function(e){Ie$k=e},$t$5=function(){return Ie$k};"object"!=typeof WebAssembly&&de("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Y$H,ne$B=!1,ke$f=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var Qe$b=65536,E$U,_$L,b$11,A$_,w$Q,D$T,_e$q,pe$w,Pe$i=5872,N$L=5248752,Be$k=5248752,Z$R=5840;n(Pe$i%16==0,"stack must start aligned"),n(Be$k%16==0,"heap must start aligned");var Te$m=5242880;t$G.TOTAL_STACK&&n(Te$m===t$G.TOTAL_STACK,"the stack size can no longer be determined at runtime");var X$P=t$G.TOTAL_MEMORY||16777216;if(X$P<Te$m&&T$R("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+X$P+"! (TOTAL_STACK="+Te$m+")"),n(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),t$G.buffer?(E$U=t$G.buffer,n(E$U.byteLength===X$P,"provided buffer should be "+X$P+" bytes, but it is "+E$U.byteLength)):("object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(n(X$P%Qe$b==0),Y$H=new WebAssembly.Memory({initial:X$P/Qe$b}),E$U=Y$H.buffer):E$U=new ArrayBuffer(X$P),n(E$U.byteLength===X$P)),m(),w$Q[Z$R>>2]=Be$k,w$Q[0]=1668509029,A$_[1]=25459,115!==b$11[2]||99!==b$11[3])throw"Runtime error: expected the system to be little-endian!";var je$f=[],Ge$g=[],We$j=[],qe$d=[],u$K=!1,h$S=!1;n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var C$V=0,k$P=null,$$P=null,P$P={};t$G.preloadedImages={},t$G.preloadedAudios={};var y$O={error:function(){de("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){y$O.error()},createDataFile:function(){y$O.error()},createPreloadedFile:function(){y$O.error()},createLazyFile:function(){y$O.error()},open:function(){y$O.error()},mkdev:function(){y$O.error()},registerDevice:function(){y$O.error()},analyzePath:function(){y$O.error()},loadFilesFromDB:function(){y$O.error()},ErrnoError:function(){y$O.error()}};t$G.FS_createDataFile=y$O.createDataFile,t$G.FS_createPreloadedFile=y$O.createPreloadedFile;var Ve$h="data:application/octet-stream;base64,",S$M,nn$4=typeof window>"u"?self:window;S$M=nn$4.location.href.endsWith(".openrealspace")?"../../static/Build/SuperMap3D/ThirdParty/earcut.wasm":"ThirdParty/earcut.wasm",A(S$M)||(S$M=e(S$M)),t$G.asm=function(e,t,i){t.memory=Y$H,t.table=new WebAssembly.Table({initial:260,maximum:260,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=R(t);return n(r,"binaryen setup failed (no wasm support?)"),r};var F$X=5856;n(F$X%8==0);var B$Q={},rn$4=[],d$12={buffers:[null,[],[]],printChar:function(e,t){var i=d$12.buffers[e];n(i),0===t||10===t?((1===e?J$O:T$R)(s(i,0)),i.length=0):i.push(t)},varargs:0,get:function(e){return d$12.varargs+=4,w$Q[d$12.varargs-4>>2]},getStr:function(){return l(d$12.get())},get64:function(){var e=d$12.get(),t=d$12.get();return n(e>=0?0===t:-1===t),e},getZero:function(){n(0===d$12.get())}},sn$4={},fn$3={abort:de,setTempRet0:Zt$5,getTempRet0:$t$5,abortStackOverflow:y,nullFunc_ii:ee,nullFunc_iidiiii:te,nullFunc_iiii:ie,nullFunc_jiji:ne,nullFunc_v:re,nullFunc_vi:oe,nullFunc_vii:ae,nullFunc_viiii:se,nullFunc_viiiii:le,nullFunc_viiiiii:ue,___cxa_allocate_exception:O,___cxa_begin_catch:B,___cxa_throw:F,___cxa_uncaught_exception:N,___exception_addRef:D,___exception_deAdjust:I,___gxx_personality_v0:G,___lock:z,___setErrNo:Z,___syscall140:U,___syscall146:k,___syscall54:W,___syscall6:H,___unlock:q,_abort:j,_emscripten_get_heap_size:X,_emscripten_memcpy_big:Y,_emscripten_resize_heap:J,abortOnCannotGrowMemory:K,emscripten_realloc_buffer:Q,flush_NO_FILESYSTEM:V,tempDoublePtr:F$X,DYNAMICTOP_PTR:Z$R},p$Q=t$G.asm(sn$4,fn$3,E$U),cn$3=p$Q.__ZSt18uncaught_exceptionv;p$Q.__ZSt18uncaught_exceptionv=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),cn$3.apply(null,arguments)};var ln$4=p$Q.___cxa_can_catch;p$Q.___cxa_can_catch=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ln$4.apply(null,arguments)};var un$4=p$Q.___cxa_is_pointer_type;p$Q.___cxa_is_pointer_type=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),un$4.apply(null,arguments)};var hn$4=p$Q.___errno_location;p$Q.___errno_location=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),hn$4.apply(null,arguments)};var _n$3=p$Q._earcut;p$Q._earcut=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),_n$3.apply(null,arguments)};var pn$3=p$Q._fflush;p$Q._fflush=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),pn$3.apply(null,arguments)};var Tn$3=p$Q._free;p$Q._free=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Tn$3.apply(null,arguments)};var dn$3=p$Q._llvm_maxnum_f64;p$Q._llvm_maxnum_f64=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),dn$3.apply(null,arguments)};var gn$3=p$Q._llvm_minnum_f64;p$Q._llvm_minnum_f64=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),gn$3.apply(null,arguments)};var vn$3=p$Q._malloc;p$Q._malloc=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),vn$3.apply(null,arguments)};var mn$3=p$Q._sbrk;p$Q._sbrk=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),mn$3.apply(null,arguments)};var yn$1=p$Q.establishStackSpace;p$Q.establishStackSpace=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),yn$1.apply(null,arguments)};var wn$2=p$Q.stackAlloc;p$Q.stackAlloc=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wn$2.apply(null,arguments)};var En$3=p$Q.stackRestore;p$Q.stackRestore=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),En$3.apply(null,arguments)};var Rn$2=p$Q.stackSave;p$Q.stackSave=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Rn$2.apply(null,arguments)},t$G.asm=p$Q;var K$N=t$G.__ZSt18uncaught_exceptionv=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.__ZSt18uncaught_exceptionv.apply(null,arguments)};t$G.___cxa_can_catch=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.___cxa_can_catch.apply(null,arguments)},t$G.___cxa_is_pointer_type=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.___cxa_is_pointer_type.apply(null,arguments)},t$G.___errno_location=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.___errno_location.apply(null,arguments)},t$G._earcut=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._earcut.apply(null,arguments)},t$G._emscripten_replace_memory=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._emscripten_replace_memory.apply(null,arguments)},t$G._fflush=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._fflush.apply(null,arguments)},t$G._free=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._free.apply(null,arguments)},t$G._llvm_maxnum_f64=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._llvm_maxnum_f64.apply(null,arguments)},t$G._llvm_minnum_f64=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._llvm_minnum_f64.apply(null,arguments)};var ie$z=t$G._malloc=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._malloc.apply(null,arguments)};t$G._memcpy=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._memcpy.apply(null,arguments)},t$G._memset=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._memset.apply(null,arguments)},t$G._sbrk=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm._sbrk.apply(null,arguments)},t$G.establishStackSpace=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.establishStackSpace.apply(null,arguments)};var z$P=t$G.stackAlloc=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.stackAlloc.apply(null,arguments)},Je$9=t$G.stackRestore=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.stackRestore.apply(null,arguments)},de$s=t$G.stackSave=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.stackSave.apply(null,arguments)};t$G.dynCall_ii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_ii.apply(null,arguments)},t$G.dynCall_iidiiii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_iidiiii.apply(null,arguments)},t$G.dynCall_iiii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_iiii.apply(null,arguments)},t$G.dynCall_jiji=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_jiji.apply(null,arguments)},t$G.dynCall_v=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_v.apply(null,arguments)},t$G.dynCall_vi=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_vi.apply(null,arguments)},t$G.dynCall_vii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_vii.apply(null,arguments)},t$G.dynCall_viiii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_viiii.apply(null,arguments)},t$G.dynCall_viiiii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_viiiii.apply(null,arguments)},t$G.dynCall_viiiiii=function(){return n(u$K,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),n(!h$S,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t$G.asm.dynCall_viiiiii.apply(null,arguments)},t$G.asm=p$Q,t$G.intArrayFromString||(t$G.intArrayFromString=function(){de("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.intArrayToString||(t$G.intArrayToString=function(){de("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.ccall=o,t$G.cwrap=a,t$G.setValue||(t$G.setValue=function(){de("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getValue=i,t$G.allocate||(t$G.allocate=function(){de("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getMemory||(t$G.getMemory=function(){de("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.AsciiToString||(t$G.AsciiToString=function(){de("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToAscii||(t$G.stringToAscii=function(){de("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF8ArrayToString||(t$G.UTF8ArrayToString=function(){de("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF8ToString||(t$G.UTF8ToString=function(){de("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF8Array||(t$G.stringToUTF8Array=function(){de("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF8||(t$G.stringToUTF8=function(){de("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.lengthBytesUTF8||(t$G.lengthBytesUTF8=function(){de("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF16ToString||(t$G.UTF16ToString=function(){de("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF16||(t$G.stringToUTF16=function(){de("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.lengthBytesUTF16||(t$G.lengthBytesUTF16=function(){de("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.UTF32ToString||(t$G.UTF32ToString=function(){de("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stringToUTF32||(t$G.stringToUTF32=function(){de("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.lengthBytesUTF32||(t$G.lengthBytesUTF32=function(){de("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.allocateUTF8||(t$G.allocateUTF8=function(){de("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackTrace||(t$G.stackTrace=function(){de("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnPreRun||(t$G.addOnPreRun=function(){de("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnInit||(t$G.addOnInit=function(){de("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnPreMain||(t$G.addOnPreMain=function(){de("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnExit||(t$G.addOnExit=function(){de("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addOnPostRun||(t$G.addOnPostRun=function(){de("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.writeStringToMemory||(t$G.writeStringToMemory=function(){de("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.writeArrayToMemory||(t$G.writeArrayToMemory=function(){de("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.writeAsciiToMemory||(t$G.writeAsciiToMemory=function(){de("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addRunDependency||(t$G.addRunDependency=function(){de("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.removeRunDependency||(t$G.removeRunDependency=function(){de("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.ENV||(t$G.ENV=function(){de("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.FS||(t$G.FS=function(){de("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.FS_createFolder||(t$G.FS_createFolder=function(){de("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createPath||(t$G.FS_createPath=function(){de("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createDataFile||(t$G.FS_createDataFile=function(){de("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createPreloadedFile||(t$G.FS_createPreloadedFile=function(){de("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createLazyFile||(t$G.FS_createLazyFile=function(){de("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createLink||(t$G.FS_createLink=function(){de("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_createDevice||(t$G.FS_createDevice=function(){de("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.FS_unlink||(t$G.FS_unlink=function(){de("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),t$G.GL||(t$G.GL=function(){de("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.dynamicAlloc||(t$G.dynamicAlloc=function(){de("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.warnOnce||(t$G.warnOnce=function(){de("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.loadDynamicLibrary||(t$G.loadDynamicLibrary=function(){de("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.loadWebAssemblyModule||(t$G.loadWebAssemblyModule=function(){de("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getLEB||(t$G.getLEB=function(){de("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getFunctionTables||(t$G.getFunctionTables=function(){de("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.alignFunctionTables||(t$G.alignFunctionTables=function(){de("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.registerFunctions||(t$G.registerFunctions=function(){de("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.addFunction||(t$G.addFunction=function(){de("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.removeFunction||(t$G.removeFunction=function(){de("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getFuncWrapper||(t$G.getFuncWrapper=function(){de("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.prettyPrint||(t$G.prettyPrint=function(){de("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.makeBigInt||(t$G.makeBigInt=function(){de("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.dynCall||(t$G.dynCall=function(){de("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getCompilerSetting||(t$G.getCompilerSetting=function(){de("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackSave||(t$G.stackSave=function(){de("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackRestore||(t$G.stackRestore=function(){de("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.stackAlloc||(t$G.stackAlloc=function(){de("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.establishStackSpace||(t$G.establishStackSpace=function(){de("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.print||(t$G.print=function(){de("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.printErr||(t$G.printErr=function(){de("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.getTempRet0||(t$G.getTempRet0=function(){de("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.setTempRet0||(t$G.setTempRet0=function(){de("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.Pointer_stringify||(t$G.Pointer_stringify=function(){de("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$G.ALLOC_NORMAL||Object.defineProperty(t$G,"ALLOC_NORMAL",{get:function(){de("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$G.ALLOC_STACK||Object.defineProperty(t$G,"ALLOC_STACK",{get:function(){de("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$G.ALLOC_DYNAMIC||Object.defineProperty(t$G,"ALLOC_DYNAMIC",{get:function(){de("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),t$G.ALLOC_NONE||Object.defineProperty(t$G,"ALLOC_NONE",{get:function(){de("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),ce.prototype=new Error,ce.prototype.constructor=ce,$$P=function e(){t$G.calledRun||he(),t$G.calledRun||($$P=e)},t$G.run=he;var Ye$g=[];if(t$G.abort=de,t$G.preInit)for("function"==typeof t$G.preInit&&(t$G.preInit=[t$G.preInit]);t$G.preInit.length>0;)t$G.preInit.pop()();t$G.noExitRuntime=!0,he()}else var t$G=null;var _0x53e246=t$G,_0x55912a=(_0x34e54c=!0,function(e,t){var i=_0x34e54c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x34e54c=!1,i}),_0x30e2da=_0x55912a(void 0,(function(){return _0x30e2da.toString().search("(((.+)+)+)+$").toString().constructor(_0x30e2da).search("(((.+)+)+)+$")})),_0x34e54c;_0x30e2da();var _0x491cd4=!1;if(e$2e(_0x53e246)){_0x53e246.onRuntimeInitialized=function(){_0x491cd4=!0};var _0x54c521=_0x53e246.cwrap("earcut","number",["number","number","number","number","number","number"])}var _0x784323=_0x2c23ed([{name:"a_pos",components:2,type:"Int16"}],4),_0x151ffd=_0x784323.members,_0x7cc9d8=500,_0x2c9633=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _0x5ca07d,this.indexArray=new _0x48dae8,this.indexArray2=new _0x3e3135,this.programConfigurations=new ProgramConfigurationSet(_0x151ffd,e.layers,e.zoom),this.segments=new _0x1e8367,this.segments2=new _0x1e8367,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x2c9633.prototype.populate=function(e,t){this.hasPattern=_0x4db9cd("fill",this.layers,t);for(var i=[],n=0,r=e;n<r.length;n+=1){var o=r[n],a=o.feature,s=o.index,l=o.sourceLayerIndex;if(this.layers[0]._featureFilter(new _0x47eac1(0),a)){var u=_0x182c2a(a),c={id:a.id,properties:a.properties,type:a.type,sourceLayerIndex:l,index:s,geometry:u,patterns:{},sortKey:undefined};i.push(c)}}for(var h=0,d=i;h<d.length;h+=1){var f=d[h],p=f,_=p.geometry,m=p.index,g=p.sourceLayerIndex;if(this.hasPattern){var x=_0x23b08c("fill",this.layers,f,this.zoom,t);this.patternFeatures.push(x)}else this.addFeature(f,_,m,{},t.indexData);var y=e[m].feature;t.featureIndex.insert(y,_,m,g,this.index)}},_0x2c9633.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},_0x2c9633.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},_0x2c9633.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_0x2c9633.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_0x2c9633.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=_0x151ffd;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=_0x42145e.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0x42145e.toIndexBuffer(e,this.indexArray),this.cesiumIndexBuffer2=_0x42145e.toIndexBuffer(e,this.indexArray2))}this.programConfigurations.upload(e),this.uploaded=!0},_0x2c9633.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer?.destroy(),this.cesiumIndexBuffer2?.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},_0x2c9633.prototype.clear=function(){e$2e(this.layoutVertexArray)&&(this.layoutVertexArray=null),e$2e(this.indexArray)&&(this.indexArray=null),e$2e(this.indexArray2)&&(this.indexArray2=null)},_0x2c9633.prototype.addFeature=function(e,t,i,n,r){for(var o=0,a=_0x1294f3(t,_0x7cc9d8);o<a.length;o+=1){for(var s=a[o],l=0,u=0,c=s;u<c.length;u+=1){l+=c[u].length}for(var h,d=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),f=d.vertexLength,p=[],_=[],m=0,g=s;m<g.length;m+=1){var x=g[m];if(0!==x.length){x!==s[0]&&_.push(p.length/2);var y=this.segments2.prepareSegment(x.length,this.layoutVertexArray,this.indexArray2),v=y.vertexLength;this.layoutVertexArray.emplaceBack(x[0].x,x[0].y),this.indexArray2.emplaceBack(v+x.length-1,v),p.push(x[0].x),p.push(x[0].y);for(var $=1;$<x.length;$++)this.layoutVertexArray.emplaceBack(x[$].x,x[$].y),this.indexArray2.emplaceBack(v+$-1,v+$),p.push(x[$].x),p.push(x[$].y);y.vertexLength+=x.length,y.primitiveLength+=x.length}}if(e$2e(r)&&e$2e(r[e.id]))h=r[e.id];else if(!0===_0x491cd4){var b=new Int32Array(p),T=b.length,C=_0x53e246._malloc(Int32Array.BYTES_PER_ELEMENT*T);_0x53e246.HEAP32.set(b,C/Int32Array.BYTES_PER_ELEMENT);var S=new Int32Array(_),w=S.length,E=_0x53e246._malloc(Int32Array.BYTES_PER_ELEMENT*w);_0x53e246.HEAP32.set(S,E/Int32Array.BYTES_PER_ELEMENT);var P=new Int32Array(10*T),A=_0x53e246._malloc(Int32Array.BYTES_PER_ELEMENT*T*10);_0x53e246.HEAP32.set(P,A/Int32Array.BYTES_PER_ELEMENT);var L=_0x54c521(C,T,E,w,2,A),M=new Int32Array(_0x53e246.HEAP32.buffer,A,L);h=new Int32Array(M),_0x53e246._free(C),_0x53e246._free(E),_0x53e246._free(A)}else h=z$$(p,_);for(var R=0;R<h.length;R+=3)this.indexArray.emplaceBack(f+h[R],f+h[R+1],f+h[R+2]);d.vertexLength+=l,d.primitiveLength+=h.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,n)},_0x3abd5c.register("FillBucket",_0x2c9633,{omit:["layers","patternFeatures"]});var _0x512a93=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(){e.apply(this,arguments)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.possiblyEvaluate=function(e,t,i){if(void 0===e.value)return new _0xab3045(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i),r="resolvedImage"===e.property.specification.type&&"string"!=typeof n?n.name:n,o=this._calculate(r,r,r,t);return new _0xab3045(this,{kind:"constant",value:o},t)}if("camera"===e.expression.kind){var a=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new _0xab3045(this,{kind:"constant",value:a},t)}return new _0xab3045(this,e.expression,t)},r.prototype.evaluate=function(e,t,i,n,r){if("source"===e.kind){var o=e.evaluate(t,i,n,r);return this._calculate(o,o,o,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},i,n),e.evaluate({zoom:Math.floor(t.zoom)},i,n),e.evaluate({zoom:Math.floor(t.zoom)+1},i,n),t):e.value},r.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},r.prototype.interpolate=function(e){return e},r}(_0xe8091e);_0x3abd5c.register("DataDrivenProperty",_0xe8091e);var _0x13acff=new _0x183b6f({"fill-sort-key":new _0xe8091e(_0x3d343c.layout_fill["fill-sort-key"])}),_0x2d51df=new _0x183b6f({"fill-antialias":new _0x55570d(_0x3d343c.paint_fill["fill-antialias"]),"fill-opacity":new _0xe8091e(_0x3d343c.paint_fill["fill-opacity"]),"fill-color":new _0xe8091e(_0x3d343c.paint_fill["fill-color"]),"fill-outline-color":new _0xe8091e(_0x3d343c.paint_fill["fill-outline-color"]),"fill-translate":new _0x55570d(_0x3d343c.paint_fill["fill-translate"]),"fill-translate-anchor":new _0x55570d(_0x3d343c.paint_fill["fill-translate-anchor"]),"fill-pattern":new _0x512a93(_0x3d343c.paint_fill["fill-pattern"])}),_0x949536={paint:_0x2d51df,layout:_0x13acff},_0x304cf3=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x949536)}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},r.prototype.createBucket=function(e){return new _0x2c9633(e)},r.prototype.queryRadius=function(){return _0x20fd4c.translateDistance(this.paint.get("fill-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,o,a){var s=_0x20fd4c.translate(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),0,a);return _0x22dd4b.polygonIntersectsMultiPolygon(s,n)},r.prototype.isTileClipped=function(){return!0},r}(_0x5aba43),_0x2879f5=(_0x26c053=!0,function(e,t){var i=_0x26c053?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x26c053=!1,i}),_0x35ca25=_0x2879f5(void 0,(function(){return _0x35ca25.toString().search("(((.+)+)+)+$").toString().constructor(_0x35ca25).search("(((.+)+)+)+$")})),_0x26c053;_0x35ca25();var _0x25eb6b=["Unknown","Point","LineString","Polygon"],_0x4ed5c8=_0x2c23ed([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),_0x14cb06=_0x4ed5c8.members,_0x57641e=63,_0xd010a=Math.cos(Math.PI/180*37.5),_0x12e7d5=15,_0x51440d=20,_0x44ecdd=15,_0x5a6889=.5,_0x482ea4=Math.pow(2,_0x44ecdd-1)/_0x5a6889,_0x3ef083=function(e){this.zoom=e.zoom,this.overscaling=1,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _0x188af9,this.indexArray=new _0x48dae8,this.programConfigurations=new ProgramConfigurationSet(_0x14cb06,e.layers,e.zoom),this.segments=new _0x1e8367,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};_0x3ef083.prototype.populate=function(e,t){this.hasPattern=!1;for(var i=this.layers[0].layout.get("line-sort-key"),n=[],r=0,o=e;r<o.length;r+=1){var a=o[r],s=a.feature,l=a.index,u=a.sourceLayerIndex;if(this.layers[0]._featureFilter(new _0x47eac1(0),s)){var c=_0x182c2a(s),h=i?i.evaluate(s,{}):void 0,d={id:s.id,properties:s.properties,type:s.type,sourceLayerIndex:u,index:l,geometry:c,patterns:{},sortKey:h};n.push(d)}}i&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var f=0,p=n;f<p.length;f+=1){var _=p[f],m=_,g=m.geometry,x=m.index,y=m.sourceLayerIndex;if(this.hasPattern){var v=_0x23b08c("line",this.layers,_,this.zoom,t);this.patternFeatures.push(v)}else this.addFeature(_,g,x,{});var $=e[x].feature;t.featureIndex.insert($,g,x,y,this.index)}},_0x3ef083.prototype.update=function(e,t,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,i)},_0x3ef083.prototype.addFeatures=function(e,t){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var r=n[i];this.addFeature(r,r.geometry,r.index,t)}},_0x3ef083.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_0x3ef083.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_0x3ef083.prototype.upload=function(e){if(!this.uploaded){if(null==this.layoutVertexArray)return;var t=_0x14cb06;this.layoutVertexArray.length>0&&(this.layoutCesiumVertexBuffer=_0x42145e.toVertexBuffer(e,this.layoutVertexArray,t),this.cesiumIndexBuffer=_0x42145e.toIndexBuffer(e,this.indexArray))}this.programConfigurations.upload(e),this.uploaded=!0},_0x3ef083.prototype.destroy=function(){this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer&&(this.layoutCesiumVertexBuffer.destroy(),this.cesiumIndexBuffer.destroy()),this.programConfigurations.destroy(),this.segments.destroy())},_0x3ef083.prototype.clear=function(){e$2e(this.layoutVertexArray)&&(this.layoutVertexArray=null),e$2e(this.indexArray)&&(this.indexArray=null)},_0x3ef083.prototype.addFeature=function(e,t,i,n){for(var r=this.layers[0].layout,o=r.get("line-join").evaluate(e,{}),a=r.get("line-cap"),s=r.get("line-miter-limit"),l=r.get("line-round-limit"),u=0,c=t;u<c.length;u+=1){var h=c[u];this.addLine(h,e,o,a,s,l,i,n)}},_0x3ef083.prototype.addLine=function(e,t,i,n,r,o,a,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+t.properties.mapbox_clip_start,this.clipEnd=+t.properties.mapbox_clip_end;for(var l=0;l<e.length-1;l++)this.totalDistance+=e[l].dist(e[l+1])}for(var u="Polygon"===_0x25eb6b[t.type],c=e.length;c>=2&&e[c-1].equals(e[c-2]);)c--;for(var h=0;h<c-1&&e[h].equals(e[h+1]);)h++;if(!(c<(u?3:2))){"bevel"===i&&(r=1.05);var d,f=this.overscaling<=16?_0x12e7d5*ne$C/(512*this.overscaling):0,p=this.segments.prepareSegment(10*c,this.layoutVertexArray,this.indexArray),_=void 0,m=void 0,g=void 0,x=void 0;this.e1=this.e2=-1,u&&(d=e[c-2],x=e[h].sub(d)._unit()._perp());for(var y=h;y<c;y++)if(!(m=u&&y===c-1?e[h+1]:e[y+1])||!e[y].equals(m)){x&&(g=x),d&&(_=d),d=e[y],x=m?m.sub(d)._unit()._perp():g;var v=(g=g||x).add(x);(0!==v.x||0!==v.y)&&v._unit();var $=g.x*x.x+g.y*x.y,b=v.x*x.x+v.y*x.y,T=0!==b?1/b:1/0,C=2*Math.sqrt(2-2*b),S=b<_0xd010a&&_&&m,w=g.x*x.y-g.y*x.x>0;if(S&&y>h){var E=d.dist(_);if(E>2*f){var P=d.sub(d.sub(_)._mult(f/E)._round());this.updateDistance(_,P),this.addCurrentVertex(P,g,0,0,p),_=P}}var A=_&&m,L=A?i:u?"butt":n;if(A&&"round"===L&&(T<o?L="miter":T<=2&&(L="fakeround")),"miter"===L&&T>r&&(L="bevel"),"bevel"===L&&(T>2&&(L="flipbevel"),T<r&&(L="miter")),_&&this.updateDistance(_,d),"miter"===L)v._mult(T),this.addCurrentVertex(d,v,0,0,p);else if("flipbevel"===L){if(T>100)v=x.mult(-1);else{var M=T*g.add(x).mag()/g.sub(x).mag();v._perp()._mult(M*(w?-1:1))}this.addCurrentVertex(d,v,0,0,p),this.addCurrentVertex(d,v.mult(-1),0,0,p)}else if("bevel"===L||"fakeround"===L){var R=-Math.sqrt(T*T-1),O=w?R:0,D=w?0:R;if(_&&this.addCurrentVertex(d,g,O,D,p),"fakeround"===L)for(var I=Math.round(180*C/Math.PI/_0x51440d),B=1;B<I;B++){var F=B/I;if(.5!==F){var N=F-.5;F+=F*N*(F-1)*((1.0904+$*($*(3.55645-1.43519*$)-3.2452))*N*N+(.848013+$*(.215638*$-1.06021)))}var G=x.sub(g)._mult(F)._add(g)._unit()._mult(w?-1:1);this.addHalfVertex(d,G.x,G.y,!1,w,0,p)}m&&this.addCurrentVertex(d,x,-O,-D,p)}else if("butt"===L)this.addCurrentVertex(d,v,0,0,p);else if("square"===L){var z=_?1:-1;this.addCurrentVertex(d,v,z,z,p)}else"round"===L&&(_&&(this.addCurrentVertex(d,g,0,0,p),this.addCurrentVertex(d,g,1,1,p,!0)),m&&(this.addCurrentVertex(d,x,-1,-1,p,!0),this.addCurrentVertex(d,x,0,0,p)));if(S&&y<c-1){var U=d.dist(m);if(U>2*f){var V=d.add(m.sub(d)._mult(f/U)._round());this.updateDistance(d,V),this.addCurrentVertex(V,x,0,0,p),d=V}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,a,s)}},_0x3ef083.prototype.addCurrentVertex=function(e,t,i,n,r,o){void 0===o&&(o=!1);var a=t.x+t.y*i,s=t.y-t.x*i,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,a,s,o,!1,i,r),this.addHalfVertex(e,l,u,o,!0,-n,r),this.distance>_0x482ea4/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,i,n,r,o))},_0x3ef083.prototype.addHalfVertex=function(e,t,i,n,r,o,a){var s=e.x,l=e.y,u=this.scaledDistance*_0x5a6889;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(r?1:0),Math.round(_0x57641e*t)+128,Math.round(_0x57641e*i)+128,1+(0===o?0:o<0?-1:1)|(63&u)<<2,u>>6);var c=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),a.primitiveLength++),r?this.e2=c:this.e1=c},_0x3ef083.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(_0x482ea4-1):this.distance},_0x3abd5c.register("LineBucket",_0x3ef083,{omit:["layers","patternFeatures"]});var _0x57fb6e=(_0x500589=!0,function(e,t){var i=_0x500589?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x500589=!1,i}),_0x12ec8e=_0x57fb6e(void 0,(function(){return _0x12ec8e.toString().search("(((.+)+)+)+$").toString().constructor(_0x12ec8e).search("(((.+)+)+)+$")})),_0x500589;_0x12ec8e();var _0x20f347=function(e){this.specification=e};_0x20f347.prototype.possiblyEvaluate=function(e,t,i){if(void 0!==e.value){if("constant"===e.expression.kind){var n=e.expression.evaluate(t,null,{},i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new _0x47eac1(Math.floor(t.zoom-1),t)),e.expression.evaluate(new _0x47eac1(Math.floor(t.zoom),t)),e.expression.evaluate(new _0x47eac1(Math.floor(t.zoom+1),t)),t)}},_0x20f347.prototype._calculate=function(e,t,i,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:i,to:t}},_0x20f347.prototype.interpolate=function(e){return e},_0x3abd5c.register("CrossFadedProperty",_0x20f347);var _0x3a29b2=(_0x55aac5=!0,function(e,t){var i=_0x55aac5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55aac5=!1,i}),_0x3e4118=_0x3a29b2(void 0,(function(){return _0x3e4118.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e4118).search("(((.+)+)+)+$")})),_0x55aac5;_0x3e4118();var _0x32c87a=function(e){this.specification=e};_0x32c87a.prototype.possiblyEvaluate=function(e,t,i){return!!e.expression.evaluate(t,null,{},i)},_0x32c87a.prototype.interpolate=function(){return!1},_0x3abd5c.register("ColorRampProperty",_0x32c87a);var _0x2ec976=new _0x183b6f({"line-cap":new _0x55570d(_0x3d343c.layout_line["line-cap"]),"line-join":new _0xe8091e(_0x3d343c.layout_line["line-join"]),"line-miter-limit":new _0x55570d(_0x3d343c.layout_line["line-miter-limit"]),"line-round-limit":new _0x55570d(_0x3d343c.layout_line["line-round-limit"]),"line-sort-key":new _0xe8091e(_0x3d343c.layout_line["line-sort-key"])}),_0x172f28=new _0x183b6f({"line-opacity":new _0xe8091e(_0x3d343c.paint_line["line-opacity"]),"line-color":new _0xe8091e(_0x3d343c.paint_line["line-color"]),"line-translate":new _0x55570d(_0x3d343c.paint_line["line-translate"]),"line-translate-anchor":new _0x55570d(_0x3d343c.paint_line["line-translate-anchor"]),"line-width":new _0xe8091e(_0x3d343c.paint_line["line-width"]),"line-gap-width":new _0xe8091e(_0x3d343c.paint_line["line-gap-width"]),"line-offset":new _0xe8091e(_0x3d343c.paint_line["line-offset"]),"line-blur":new _0xe8091e(_0x3d343c.paint_line["line-blur"]),"line-dasharray":new _0x20f347(_0x3d343c.paint_line["line-dasharray"]),"line-pattern":new _0x512a93(_0x3d343c.paint_line["line-pattern"]),"line-gradient":new _0x32c87a(_0x3d343c.paint_line["line-gradient"])}),_0x15c6fd={paint:_0x172f28,layout:_0x2ec976},_0x549103=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,i){return i=new _0x47eac1(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),e.prototype.possiblyEvaluate.call(this,t,i)},t.prototype.evaluate=function(t,i,n,r){return i=extend({},i,{zoom:Math.floor(i.zoom)}),e.prototype.evaluate.call(this,t,i,n,r)},t}(_0xe8091e),_0x22cf1d=new _0x549103(_0x15c6fd.paint.properties["line-width"].specification);_0x22cf1d.useIntegerZoom=!0;var _0x11ec06=function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));function r(t){e.call(this,t,_0x15c6fd)}function o(e,t){return t>0?t+2*e:e}return n(),e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},r.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=renderColorRamp(e,"lineProgress"),this.gradientTexture=null},r.prototype.recalculate=function(t,i){e.prototype.recalculate.call(this,t,i),this.paint._values["line-floorwidth"]=_0x22cf1d.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},r.prototype.createBucket=function(e){return new _0x3ef083(e)},r.prototype.queryRadius=function(e){var t=e,i=o(_0x20fd4c.getMaximumPaintValue("line-width",this,t),_0x20fd4c.getMaximumPaintValue("line-gap-width",this,t)),n=_0x20fd4c.getMaximumPaintValue("line-offset",this,t);return i/2+Math.abs(n)+_0x20fd4c.translateDistance(this.paint.get("line-translate"))},r.prototype.queryIntersectsFeature=function(e,t,i,n,r,a,s){var l=_0x20fd4c.translate(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),0,s),u=o(this.paint.get("line-width")?.evaluate(t,i),this.paint.get("line-gap-width")?.evaluate(t,i)),c=s/2*(u=Math.max(u,5)),h=this.paint.get("line-offset")?.evaluate(t,i);return h&&(n=function(e,t){for(var i=[],n=new _0x4f59fa(0,0),r=0;r<e.length;r++){for(var o=e[r],a=[],s=0;s<o.length;s++){var l=o[s-1],u=o[s],c=o[s+1],h=0===s?n:u.sub(l)._unit()._perp(),d=s===o.length-1?n:c.sub(u)._unit()._perp(),f=h._add(d)._unit(),p=f.x*d.x+f.y*d.y;f._mult(1/p),a.push(f._mult(t)._add(u))}i.push(a)}return i}(n,h*s)),_0x22dd4b.polygonIntersectsBufferedMultiLine(l,n,c)},r.prototype.isTileClipped=function(){return!0},r}(_0x5aba43),_0x33b736=(_0x33ff51=!0,function(e,t){var i=_0x33ff51?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33ff51=!1,i}),_0x7a86c9=_0x33b736(void 0,(function(){return _0x7a86c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x7a86c9).search("(((.+)+)+)+$")})),_0x33ff51;_0x7a86c9();var _0x4af8ae={circle:_0x45533e,fill:_0x304cf3,line:_0x11ec06,symbol:_0x1a13f5};function _0x1f5d3a(e){return _0x4af8ae[e.type]?new _0x4af8ae[e.type](e):null}const _0x49e65b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x10a9d7=_0x49e65b(void 0,(function(){return _0x10a9d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x10a9d7).search("(((.+)+)+)+$")}));function _0x1fe793(e,t,i){let n,r,o;const a=_0x3ba476.devicePixelRatio>1?"@2x":"";let s=getJSON(t.transformRequest(t.normalizeSpriteURL(e,a,".json"),_0x3c9422.SpriteJSON),((e,t)=>{s=null,!o&&(o=e,n=t,u())})),l=getImage(t.transformRequest(t.normalizeSpriteURL(e,a,".png"),_0x3c9422.SpriteImage),((e,t)=>{l=null,!o&&(o=e,r=t,u())}));function u(){if(o)i(o);else if(n&&r){const e=_0x3ba476.getImageData(r,0),t={};for(const i in n){const{width:r,height:o,x:a,y:s,sdf:l,pixelRatio:u,stretchX:c,stretchY:h,content:d}=n[i],f=new _0x224c0e({width:r,height:o});_0x224c0e.copy(e,f,{x:a,y:s},{x:0,y:0},{width:r,height:o}),t[i]={data:f,pixelRatio:u,sdf:l,stretchX:c,stretchY:h,content:d}}i(null,t)}}return{cancel(){s&&(s.cancel(),s=null),l&&(l.cancel(),l=null)}}}_0x10a9d7();var _0x3845bc=(_0x3cbf3e=!0,function(e,t){var i=_0x3cbf3e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3cbf3e=!1,i}),_0xaf65e3=_0x3845bc(void 0,(function(){return _0xaf65e3.toString().search("(((.+)+)+)+$").toString().constructor(_0xaf65e3).search("(((.+)+)+)+$")})),_0x3cbf3e;_0xaf65e3();var _0x404faf=1;function _0x2fed99(){this.images={},this.imageCount=0,this.imageList=[],this.imagesCanvas={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new _0x224c0e({width:1,height:1}),this.dirty=!0}_0x2fed99.prototype.isLoaded=function(){return this.loaded},_0x2fed99.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,i=this.requestors;t<i.length;t+=1){var n=i[t],r=n.ids,o=n.callback;this._notify(r,o)}this.requestors=[]}},_0x2fed99.prototype.getImage=function(e){return this.images[e]},_0x2fed99.prototype.addImage=function(e,t){this._validate(e,t)&&(this.images[e]=t,this.imageCount++)},_0x2fed99.prototype.getImageCanvas=function(e){if(!e$2e(this.images[e]))return null;if(!e$2e(this.imagesCanvas[e])){var t=document.createElement("canvas"),i=this.images[e].data;t.width=i.width,t.height=i.height;for(var n=t.getContext("2d"),r=n.createImageData(i.width,i.height),o=i.width*i.height,a=0;a<o;a++)r.data[4*a]=i.data[4*a],r.data[4*a+1]=i.data[4*a+1],r.data[4*a+2]=i.data[4*a+2],r.data[4*a+3]=i.data[4*a+3];n.putImageData(r,0,0),this.imagesCanvas[e]=t}return this.imagesCanvas[e]},_0x2fed99.prototype._validate=function(e,t){var i=!0;return!this._validateStretch(t.stretchX,t.data&&t.data.width)&&(i=!1),!this._validateStretch(t.stretchY,t.data&&t.data.height)&&(i=!1),!this._validateContent(t.content,t)&&(i=!1),i},_0x2fed99.prototype._validateStretch=function(e,t){if(!e)return!0;for(var i=0,n=0,r=e;n<r.length;n+=1){var o=r[n];if(o[0]<i||o[1]<o[0]||t<o[1])return!1;i=o[1]}return!0},_0x2fed99.prototype._validateContent=function(e,t){return!e||4===e.length&&(!(e[0]<0||t.data.width<e[0])&&(!(e[1]<0||t.data.height<e[1])&&(!(e[2]<0||t.data.width<e[2])&&(!(e[3]<0||t.data.height<e[3])&&(!(e[2]<e[0])&&!(e[3]<e[1]))))))},_0x2fed99.prototype.updateImage=function(e,t){var i=this.images[e];t.version=i.version+1,this.images[e]=t,this.updatedImages[e]=!0},_0x2fed99.prototype.removeImage=function(e){var t=this.images[e];delete this.images[e],delete this.patterns[e],this.imageCount--,this.imageCount<0&&(this.imageCount=0),t.userImage&&t.userImage.onRemove&&t.userImage.onRemove()},_0x2fed99.prototype.listImages=function(){return this.imageList.length!=this.imageCount&&(this.imageList=Object.keys(this.images)),this.imageList},_0x2fed99.prototype.getImages=function(e,t){var i=!0;if(!this.isLoaded())for(var n=0,r=e;n<r.length;n+=1){var o=r[n];!this.images[o]&&(i=!1)}this.isLoaded()||i?this._notify(e,t):this.requestors.push({ids:e,callback:t})},_0x2fed99.prototype._notify=function(e,t){for(var i={},n=0,r=e;n<r.length;n+=1){var o=r[n];!this.images[o]&&console.log("styleimagemissing",{id:o});var a=this.images[o];a?i[o]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf,version:a.version,stretchX:a.stretchX,stretchY:a.stretchY,content:a.content,hasRenderCallback:Boolean(a.userImage&&a.userImage.render)}:console.warn('Image "'+o+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}t(null,i)},_0x2fed99.prototype.getAllImages=function(e){var t={};for(var i in this.images){var n=this.images[i],r=n.data.clone();e.push(r.data.buffer),t[i]={data:r,pixelRatio:n.pixelRatio,hasRenderCallback:Boolean(n.userImage&&n.userImage.render)}}return t},_0x2fed99.prototype.getPixelSize=function(){var e=this.atlasImage;return{width:e.width,height:e.height}},_0x2fed99.prototype.getPattern=function(e){var t=this.patterns[e],i=this.getImage(e);if(!i)return null;if(t&&t.position.version===i.version)return t.position;if(t)t.position.version=i.version;else{var n={w:i.data.width+2*_0x404faf,h:i.data.height+2*_0x404faf,x:0,y:0},r=new _0x9f22a4(n,i);this.patterns[e]={bin:n,position:r}}return this._updatePatternAtlas(),this.patterns[e].position},_0x2fed99.prototype.bind=function(e){e.gl,this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):(console.log("ImageManager.prototype.bind"),this.atlasTexture=new _0x556fd4(e,this.atlasImage,de$y.RGBA)),this.atlasTexture.bind(de$y.LINEAR,de$y.CLAMP_TO_EDGE)},_0x2fed99.prototype._updatePatternAtlas=function(){var e=[];for(var t in this.patterns)e.push(this.patterns[t].bin);var i=W$V(e),n=i.w,r=i.h,o=this.atlasImage;for(var a in o.resize({width:n||1,height:r||1}),this.patterns){var s=this.patterns[a].bin,l=s.x+_0x404faf,u=s.y+_0x404faf,c=this.images[a].data,h=c.width,d=c.height;_0x224c0e.copy(c,o,{x:0,y:0},{x:l,y:u},{width:h,height:d}),_0x224c0e.copy(c,o,{x:0,y:d-1},{x:l,y:u-1},{width:h,height:1}),_0x224c0e.copy(c,o,{x:0,y:0},{x:l,y:u+d},{width:h,height:1}),_0x224c0e.copy(c,o,{x:h-1,y:0},{x:l-1,y:u},{width:1,height:d}),_0x224c0e.copy(c,o,{x:0,y:0},{x:l+h,y:u},{width:1,height:d})}this.dirty=!0},_0x2fed99.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},_0x2fed99.prototype.dispatchRenderCallbacks=function(e){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(!this.callbackDispatchedThisFrame[n]){this.callbackDispatchedThisFrame[n]=!0;var r=this.images[n];renderStyleImage(r)&&this.updateImage(n,r)}}};const _0x5efefa=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x342929=_0x5efefa(void 0,(function(){return _0x342929.toString().search("(((.+)+)+)+$").toString().constructor(_0x342929).search("(((.+)+)+)+$")}));function _0x37a872(e,t,i,n,r){const o=256*t,a=o+255,s=n.transformRequest(n.normalizeGlyphsURL(i).replace("{fontstack}",e).replace("{range}",o+"-"+a),_0x3c9422.Glyphs);getArrayBuffer(s,((e,t)=>{if(e)r(e);else if(t){const e={};for(const i of _0x7f378d(t))e[i.id]=i;r(null,e)}}))}_0x342929();var _0x46b9da=(_0x3e7c08=!0,function(e,t){var i=_0x3e7c08?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3e7c08=!1,i}),_0x587b82=_0x46b9da(void 0,(function(){return _0x587b82.toString().search("(((.+)+)+)+$").toString().constructor(_0x587b82).search("(((.+)+)+)+$")})),_0x3e7c08;_0x587b82();var _0x4666a2=1e20;function _0x2f5430(e,t,i,n,r,o){this.fontSize=e||24,this.buffer=void 0===t?3:t,this.cutoff=n||.25,this.fontFamily=r||"sans-serif",this.fontWeight=o||"normal",this.radius=i||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function _0x1ea437(e,t,i,n,r,o,a){for(var s=0;s<t;s++){for(var l=0;l<i;l++)n[l]=e[l*t+s];for(_0xa41da4(n,r,o,a,i),l=0;l<i;l++)e[l*t+s]=r[l]}for(l=0;l<i;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(_0xa41da4(n,r,o,a,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(r[s])}}function _0xa41da4(e,t,i,n,r){i[0]=0,n[0]=-_0x4666a2,n[1]=+_0x4666a2;for(var o=1,a=0;o<r;o++){for(var s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);s<=n[a];)a--,s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);i[++a]=o,n[a]=s,n[a+1]=+_0x4666a2}for(o=0,a=0;o<r;o++){for(;n[a+1]<o;)a++;t[o]=(o-i[a])*(o-i[a])+e[i[a]]}}_0x2f5430.prototype.draw=function(e){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(e,this.buffer,this.middle);for(var t=this.ctx.getImageData(0,0,this.size,this.size),i=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var r=t.data[4*n+3]/255;this.gridOuter[n]=1===r?0:0===r?_0x4666a2:Math.pow(Math.max(0,.5-r),2),this.gridInner[n]=1===r?_0x4666a2:0===r?0:Math.pow(Math.max(0,r-.5),2)}for(_0x1ea437(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),_0x1ea437(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var o=this.gridOuter[n]-this.gridInner[n];i[n]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return i};const _0xf52bfb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x23fa6a=_0xf52bfb(void 0,(function(){return _0x23fa6a.toString().search("(((.+)+)+)+$").toString().constructor(_0x23fa6a).search("(((.+)+)+)+$")}));function _0x175ad1(e,t){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={}}_0x23fa6a(),_0x175ad1.prototype.setURL=function(e){this.url=e},_0x175ad1.prototype.getGlyphs=function(e,t){const i=[];for(const t in e)for(const n of e[t])i.push({stack:t,id:n});asyncAll(i,(({stack:e,id:t},i)=>{let n=this.entries[e];!n&&(n=this.entries[e]={glyphs:{},requests:{}});let r=n.glyphs[t];if(void 0!==r)return void i(null,{stack:e,id:t,glyph:r});if(r=this._tinySDF(n,e,t),r)return n.glyphs[t]=r,void i(null,{stack:e,id:t,glyph:r});const o=Math.floor(t/256);if(256*o>65535)return void i(new Error("glyphs > 65535 not supported"));let a=n.requests[o];!a&&(a=n.requests[o]=[],_0x175ad1.loadGlyphRange(e,o,this.url,this.requestManager,((e,t)=>{if(t)for(const e in t)!this._doesCharSupportLocalGlyph(+e)&&(n.glyphs[+e]=t[+e]);for(const i of a)i(e,t);delete n.requests[o]}))),a.push(((n,r)=>{n?i(n):r&&i(null,{stack:e,id:t,glyph:r[t]||null})}))}),((e,i)=>{if(e)t(e);else if(i){const e={};for(const{stack:t,id:n,glyph:r}of i)(e[t]||(e[t]={}))[n]=r&&{id:r.id,bitmap:r.bitmap.clone(),metrics:r.metrics};t(null,e)}}))},_0x175ad1.prototype._doesCharSupportLocalGlyph=function(e){return!!this.localIdeographFontFamily&&(_0x3de98d["CJK Unified Ideographs"](e)||_0x3de98d["Hangul Syllables"](e)||_0x3de98d.Hiragana(e)||_0x3de98d.Katakana(e))},_0x175ad1.prototype._tinySDF=function(e,t,i){const n=this.localIdeographFontFamily;if(!n)return;if(!this._doesCharSupportLocalGlyph(i))return;let r=e.tinySDF;if(!r){let i="400";/bold/i.test(t)?i="900":/medium/i.test(t)?i="500":/light/i.test(t)&&(i="200"),r=e.tinySDF=new _0x175ad1.TinySDF(24,3,8,.25,n,i)}return{id:i,bitmap:new _0x18147d({width:30,height:30},r.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}},_0x175ad1.loadGlyphRange=_0x37a872,_0x175ad1.TinySDF=_0x2f5430;var _0x3d095b=(_0x412162=!0,function(e,t){var i=_0x412162?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x412162=!1,i}),_0x7e61c2=_0x3d095b(void 0,(function(){return _0x7e61c2.toString().search("(((.+)+)+)+$").toString().constructor(_0x7e61c2).search("(((.+)+)+)+$")})),_0x412162;_0x7e61c2();var _0x262d0c=function(e,t){this.width=e,this.height=t,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};_0x262d0c.prototype.getDash=function(e,t){var i=e.join(",")+String(t);return!this.positions[i]&&(this.positions[i]=this.addDash(e,t)),this.positions[i]},_0x262d0c.prototype.addDash=function(e,t){var i=t?7:0,n=2*i+1;if(this.nextRow+n>this.height)return null;for(var r=0,o=0;o<e.length;o++)r+=e[o];for(var a=this.width/r,s=a/2,l=e.length%2==1,u=-i;u<=i;u++)for(var c=this.nextRow+i+u,h=this.width*c,d=l?-e[e.length-1]:0,f=e[0],p=1,_=0;_<this.width;_++){for(;f<_/a;)d=f,f+=e[p],l&&p===e.length-1&&(f+=e[0]),p++;var m=Math.abs(_-d*a),g=Math.abs(_-f*a),x=Math.min(m,g),y=p%2==1,v=void 0;if(t){var $=i?u/i*(s+1):0;if(y){var b=s-Math.abs($);v=Math.sqrt(x*x+b*b)}else v=s-Math.sqrt(x*x+$*$)}else v=(y?1:-1)*x;this.data[3+4*(h+_)]=Math.max(0,Math.min(255,v+128))}var T={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:r};return this.nextRow+=n,this.dirty=!0,T},_0x262d0c.prototype.bind=function(e){var t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.RGBA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,this.data))},_0x262d0c.prototype.getTexture=function(e){return this.cesiumTexture?this.dirty&&(this.dirty=!1,this.cesiumTexture.copyFrom({width:this.width,height:this.height,arrayBufferView:this.data})):this.cesiumTexture=new t$U({context:e,source:{arrayBufferView:this.data},width:this.width,height:this.height,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT})}),this.cesiumTexture};var _0x5e2a8a=(_0xeb37d9=!0,function(e,t){var i=_0xeb37d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xeb37d9=!1,i}),_0x4c8b9f=_0x5e2a8a(void 0,(function(){return _0x4c8b9f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c8b9f).search("(((.+)+)+)+$")})),_0xeb37d9;_0x4c8b9f();const _0x5e1e07=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function _0x262613(e){var t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var i="[",n=0,r=e;n<r.length;n+=1){i+=_0x262613(r[n])+","}return i+"]"}for(var o=Object.keys(e).sort(),a="{",s=0;s<o.length;s++)a+=JSON.stringify(o[s])+":"+_0x262613(e[o[s]])+",";return a+"}"}function _0x33986e(e){for(var t="",i=0,n=_0x5e1e07;i<n.length;i+=1){t+="/"+_0x262613(e[n[i]])}return t}function _0x1c61c4(e,t){for(var i={},n=0;n<e.length;n++){var r=t&&t[e[n].id]||_0x33986e(e[n]);t&&(t[e[n].id]=r);var o=i[r];!o&&(o=i[r]=[]),o.push(e[n])}var a=[];for(var s in i)a.push(i[s]);return a}var _0x4b2039=(_0x2bef37=!0,function(e,t){var i=_0x2bef37?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2bef37=!1,i}),_0x39d2be=_0x4b2039(void 0,(function(){return _0x39d2be.toString().search("(((.+)+)+)+$").toString().constructor(_0x39d2be).search("(((.+)+)+)+$")})),_0x2bef37;_0x39d2be();var _0x30db1c=function(e){this.keyCache={},e&&this.replace(e)};function _0x3a0046(e){var t=[];for(var i in e)t.push(e[i]);return t}_0x30db1c.prototype.replace=function(e){this._layerConfigs={},this._layers={},this.update(e,[])},_0x30db1c.prototype.update=function(e,t){for(var i=this,n=0,r=e;n<r.length;n+=1){var o=r[n];this._layerConfigs[o.id]=o;var a=_0x1f5d3a(o);null!=a&&(this._layers[o.id]=a,a._featureFilter=_0x51a3ff.createFilter(a.filter),this.keyCache[o.id]&&delete this.keyCache[o.id])}for(var s=0,l=t;s<l.length;s+=1){var u=l[s];delete this.keyCache[u],delete this._layerConfigs[u],delete this._layers[u]}this.familiesBySource={};for(var c=0,h=_0x1c61c4(_0x3a0046(this._layerConfigs),this.keyCache);c<h.length;c+=1){var d=h[c].map((function(e){return i._layers[e.id]})),f=d[0];if(null!=f&&"none"!==f.visibility){var p=f.source||"",_=this.familiesBySource[p];!_&&(_=this.familiesBySource[p]={});var m=f.sourceLayer,g=_[m];!g&&(g=_[m]=[]),g.push(d)}}};var _0x49b963=(_0x2b23b9=!0,function(e,t){var i=_0x2b23b9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2b23b9=!1,i}),_0x5056ff=_0x49b963(void 0,(function(){return _0x5056ff.toString().search("(((.+)+)+)+$").toString().constructor(_0x5056ff).search("(((.+)+)+)+$")})),_0x2b23b9;function _0x361a0e(e){this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}_0x5056ff(),_0x361a0e.prototype.trigger=function(){!this._triggered&&(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))};const _0x13475f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4589a8=_0x13475f(void 0,(function(){return _0x4589a8.toString().search("(((.+)+)+)+$").toString().constructor(_0x4589a8).search("(((.+)+)+)+$")}));function _0x3cc294(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function _0x83f691(e,t,i){this.target=e,this.parent=t,this.mapId=i,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},_0x3cc294(["receive","process"],this),this.invoker=new _0x361a0e(this.process),this.target.addEventListener("message",this.receive,!1)}_0x4589a8(),_0x83f691.prototype.send=function(e,t,i,n){const r=++_0x83f691.taskId;i&&(this.callbacks[r]=i);const o=[];return this.target.postMessage({id:r,type:e,hasCallback:!!i,targetMapId:n,sourceMapId:this.mapId,data:_0x3abd5c.serialize(t,o)},o),{cancel:()=>{i&&delete this.callbacks[r],this.target.postMessage({id:r,type:"<cancel>",targetMapId:n,sourceMapId:this.mapId})}}},_0x83f691.prototype.receive=function(e){const t=e.data,i=t.id;if(i&&(!t.targetMapId||this.mapId===t.targetMapId))if("<cancel>"===t.type){delete this.tasks[i];const e=this.cancelCallbacks[i];delete this.cancelCallbacks[i],e&&e()}else this.tasks[i]=t,this.taskQueue.push(i),this.invoker.trigger()},_0x83f691.prototype.process=function(){if(!this.taskQueue.length)return;const e=this.taskQueue.shift(),t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t)if("<response>"===t.type){const i=this.callbacks[e];delete this.callbacks[e],i&&(t.error?i(_0x3abd5c.deserialize(t.error)):i(null,_0x3abd5c.deserialize(t.data)))}else{let i=!1;const n=t.hasCallback?(t,n)=>{i=!0,delete this.cancelCallbacks[e];const r=[];this.target.postMessage({id:e,type:"<response>",sourceMapId:this.mapId,error:t?_0x3abd5c.serialize(t):null,data:_0x3abd5c.serialize(n,r)},r)}:e=>{i=!0};let r=null;const o=_0x3abd5c.deserialize(t.data);if(this.parent[t.type])r=this.parent[t.type](t.sourceMapId,o,n);else if(this.parent.getWorkerSource){const e=t.type.split(".");r=this.parent.getWorkerSource(t.sourceMapId,e[0],o.source)[e[1]](o,n)}else n(new Error("Could not find function "+t.type));!i&&r&&r.cancel&&(this.cancelCallbacks[e]=r.cancel)}},_0x83f691.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)},_0x83f691.taskId=0;const _0x55f1ab=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x53ab15=_0x55f1ab(void 0,(function(){return _0x53ab15.toString().search("(((.+)+)+)+$").toString().constructor(_0x53ab15).search("(((.+)+)+)+$")}));function _0x184837(e,t){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=uniqueId();const i=this.workerPool.acquire(this.id);for(let e=0;e<i.length;e++){const n=i[e],r=new _0x184837.Actor(n,t,this.id);r.name="Worker "+e,this.actors.push(r)}}_0x53ab15(),_0x184837.prototype.broadcast=function(e,t,i){i=i||function(){},asyncAll(this.actors,((i,n)=>{i.send(e,t,n)}),i)},_0x184837.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},_0x184837.prototype.remove=function(){this.actors.forEach((e=>{e.remove()})),this.actors=[],this.workerPool.release(this.id)},_0x184837.Actor=_0x83f691;const _0x3cd6f6=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1210b8=_0x3cd6f6(void 0,(function(){return _0x1210b8.toString().search("(((.+)+)+)+$").toString().constructor(_0x1210b8).search("(((.+)+)+)+$")}));function _0x4790f0(){this.active={}}_0x1210b8(),_0x4790f0.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length<_0x4790f0.workerCount;)this.workers.push(new window.Worker(window.mvtWorkerUrl));return this.active[e]=!0,this.workers.slice()},_0x4790f0.prototype.release=function(e){delete this.active[e],0===Object.keys(this.active).length&&(this.workers.forEach((e=>{e.terminate()})),this.workers=[])};const _0x311dfe=Math.floor(s$Z.hardwareConcurrency/2);_0x4790f0.workerCount=Math.max(Math.min(_0x311dfe,6),1);const _0x3b31ab=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2c28f3=_0x3b31ab(void 0,(function(){return _0x2c28f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c28f3).search("(((.+)+)+)+$")}));let _0x1c008f;function _0x194ba2(){return!_0x1c008f&&(_0x1c008f=new _0x4790f0),_0x1c008f}function n$J(e,t){if(e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).billboardStyle)){var i=e.billboardStyle;e.image=u$Z(i.image,void 0)}if(e$2e(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$15("disableDepthTestDistance must be greater than or equal to 0.0.");var n=e.translucencyByDistance,r=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,a=e.distanceDisplayCondition;if(e$2e(n)){if(n.far<=n.near)throw new t$15("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=o$Y.clone(n)}if(e$2e(r)){if(r.far<=r.near)throw new t$15("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");r=o$Y.clone(r)}if(e$2e(o)){if(o.far<=o.near)throw new t$15("scaleByDistance.far must be greater than scaleByDistance.near.");o=o$Y.clone(o)}if(e$2e(a)){if(a.far<=a.near)throw new t$15("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");a=r$Z.clone(a)}this._show=u$Z(e.show,!0),this._position=o$1p.clone(u$Z(e.position,o$1p.ZERO)),this._actualPosition=o$1p.clone(this._position),this._volTexCoord=o$1p.clone(u$Z(e.volTexCoord,o$1p.ZERO)),this._pixelOffset=o$1o.clone(u$Z(e.pixelOffset,o$1o.ZERO)),this._translate=new o$1o(0,0),this._eyeOffset=o$1p.clone(u$Z(e.eyeOffset,o$1p.ZERO)),this._heightReference=u$Z(e.heightReference,k$R.NONE),this._verticalOrigin=u$Z(e.verticalOrigin,S$Q.CENTER),this._horizontalOrigin=u$Z(e.horizontalOrigin,j$V.CENTER),this._scale=u$Z(e.scale,1),this._color=e$1X.clone(u$Z(e.color,e$1X.WHITE)),this._rotation=u$Z(e.rotation,0),this._alignedAxis=o$1p.clone(u$Z(e.alignedAxis,o$1p.ZERO)),this._width=e.width,this._height=e.height,this._scaleByDistance=o,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=r,this._sizeInMeters=u$Z(e.sizeInMeters,!1),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=u$Z(e.collection,t),this._pickId=void 0,this._pickPrimitive=u$Z(e._pickPrimitive,this),this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageIndex=-1,this._imageIndexPromise=void 0,this._imageId=void 0,this._image=u$Z(e.image,void 0),this._imageSubRegion=void 0,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0,this._mvtLayerID=e.mvtLayerID,this._mapName=e.mapName,this._mvtProperties=e.mvtProperties,this._associativeMvtLabel=void 0;var s=e.image,l=e.imageId;e$2e(s)&&(e$2e(l)||(l="string"==typeof s?s:e$2e(s.src)?s.src:e$1T()),this._imageId=l,this._image=s),e$2e(e.imageSubRegion)&&(this._imageId=l,this._imageSubRegion=e.imageSubRegion),e$2e(this._billboardCollection._textureAtlas)&&this._loadImage(),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=C$14.SCENE3D,this._clusterShow=!0,this._outlineColor=e$1X.clone(u$Z(e.outlineColor,e$1X.BLACK)),this._outlineWidth=u$Z(e.outlineWidth,0),this._updateClamping(),this._screenSpacePosition=new o$1o,this._opacityState={opacity:0,placed:!1}}_0x2c28f3();var L$_=n$J.SHOW_INDEX=0,T$Q=n$J.POSITION_INDEX=1,F$W=n$J.PIXEL_OFFSET_INDEX=2,Z$Q=n$J.EYE_OFFSET_INDEX=3,U$R=n$J.HORIZONTAL_ORIGIN_INDEX=4,j$T=n$J.VERTICAL_ORIGIN_INDEX=5,J$N=n$J.SCALE_INDEX=6,w$P=n$J.IMAGE_INDEX_INDEX=7,z$O=n$J.COLOR_INDEX=8,K$M=n$J.ROTATION_INDEX=9,Q$R=n$J.ALIGNED_AXIS_INDEX=10,$$O=n$J.SCALE_BY_DISTANCE_INDEX=11,ii$5=n$J.TRANSLUCENCY_BY_DISTANCE_INDEX=12,ei$5=n$J.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,ti$6=n$J.DISTANCE_DISPLAY_CONDITION=14,ni$5=n$J.DISABLE_DEPTH_DISTANCE=15;n$J.TEXTURE_COORDINATE_BOUNDS=16;var si$6=n$J.VOL_TEXCOORD_INDEX=17,W$T=n$J.SDF_INDEX=18,ai$6=n$J.OPACITY_STATE_INDEX=19;function o$S(e,t){var i=e._billboardCollection;e$2e(i)&&(i._updateBillboard(e,t),e._dirty=!0)}n$J.NUMBER_OF_PROPERTIES=20,Object.defineProperties(n$J.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._show!==e&&(this._show=e,o$S(this,L$_))}},position:{get:function(){return this._position},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._position;o$1p.equals(t,e)||(o$1p.clone(e,t),o$1p.clone(e,this._actualPosition),this._updateClamping(),o$S(this,T$Q))}},heightReference:{get:function(){return this._heightReference},set:function(e){if(!e$2e(e))throw new t$15("value is required.");e!==this._heightReference&&(this._heightReference=e,this._updateClamping(),o$S(this,T$Q))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._pixelOffset;o$1o.equals(t,e)||(o$1o.clone(e,t),o$S(this,F$W))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._scaleByDistance;o$Y.equals(t,e)||(this._scaleByDistance=o$Y.clone(e,t),o$S(this,$$O))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._translucencyByDistance;o$Y.equals(t,e)||(this._translucencyByDistance=o$Y.clone(e,t),o$S(this,ii$5))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._pixelOffsetScaleByDistance;o$Y.equals(t,e)||(this._pixelOffsetScaleByDistance=o$Y.clone(e,t),o$S(this,ei$5))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._eyeOffset;o$1p.equals(t,e)||(o$1p.clone(e,t),o$S(this,Z$Q))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._horizontalOrigin!==e&&(this._horizontalOrigin=e,o$S(this,U$R))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._verticalOrigin!==e&&(this._verticalOrigin=e,o$S(this,j$T))}},scale:{get:function(){return this._scale},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._scale!==e&&(this._scale=e,o$S(this,J$N))}},color:{get:function(){return this._color},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._color;e$1X.equals(t,e)||(e$1X.clone(e,t),o$S(this,z$O))}},rotation:{get:function(){return this._rotation},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._rotation!==e&&(this._rotation=e,o$S(this,K$M))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._alignedAxis;o$1p.equals(t,e)||(o$1p.clone(e,t),o$S(this,Q$R))}},width:{get:function(){return u$Z(this._width,this._imageWidth)},set:function(e){this._width!==e&&(this._width=e,o$S(this,w$P))}},height:{get:function(){return u$Z(this._height,this._imageHeight)},set:function(e){this._height!==e&&(this._height=e,o$S(this,w$P))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,o$S(this,z$O))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!r$Z.equals(e,this._distanceDisplayCondition)){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");this._distanceDisplayCondition=r$Z.clone(e,this._distanceDisplayCondition),o$S(this,ti$6)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(e$2e(e)&&e<0)throw new t$15("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,o$S(this,ni$5)}}},volTextureCoord:{get:function(){return this._volTexCoord},set:function(e){this._volTexCoord!==e&&(this._volTexCoord=e,o$S(this,si$6))}},id:{get:function(){return this._id},set:function(e){this._id=e,e$2e(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,e$2e(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageId},set:function(e){e$2e(e)?"string"==typeof e?this.setImage(e,e):e instanceof t$10?this.setImage(e.url,e):e$2e(e.src)?this.setImage(e.src,e):this.setImage(e$1T(),e):(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=void 0,this._image=void 0,this._imageIndexPromise=void 0,o$S(this,w$P))}},ready:{get:function(){return-1!==this._imageIndex}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=o$1p.clone(e,this._actualClampedPosition),o$S(this,T$Q)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,o$S(this,L$_))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._outlineColor;e$1X.equals(t,e)||(e$1X.clone(e,t),o$S(this,W$T))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,o$S(this,W$T))}},opacityState:{get:function(){return this._opacityState},set:function(e){(this._opacityState.opacity!==e.opacity||this._opacityState.placed!==e.placed)&&(this._opacityState={opacity:e.opacity,placed:e.placed},o$S(this,ai$6))}}}),n$J.prototype.getPickId=function(e){return e$2e(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId},n$J.prototype._updateClamping=function(){n$J._updateClamping(this._billboardCollection,this)};var C$U=new a$18,b$10=new o$1p;n$J._updateClamping=function(e,t){var i=e._scene;if(e$2e(i)&&e$2e(i.globe)){var n=i.globe,r=n.ellipsoid,o=n._surface,a=i.frameState.mode,s=a!==t._mode;if(t._mode=a,(t._heightReference===k$R.NONE||s)&&e$2e(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference!==k$R.NONE&&e$2e(t._position)){var l=r.cartesianToCartographic(t._position);if(e$2e(l)){e$2e(t._removeCallbackFunc)&&t._removeCallbackFunc();e=u$Z(t._labelCollection,t._billboardCollection);t._removeCallbackFunc=o.updateHeight(l,c,e$2e(e)&&e._isMVT?void 0:i),a$18.clone(l,C$U);var u=n.getHeight(l);e$2e(u)&&(C$U.height=u),r.cartographicToCartesian(C$U,b$10),a!==C$14.SCENE3D&&(b$10=m$19.convertToColumbusCartesian(b$10)),c(b$10)}else t._actualClampedPosition=void 0}}else if(t._heightReference!==k$R.NONE)throw new t$15("Height reference is not supported without a scene and globe.");function c(e){if(t._heightReference===k$R.RELATIVE_TO_GROUND)if(t._mode===C$14.SCENE3D){var i=r.cartesianToCartographic(e,C$U);i.height+=l.height,r.cartographicToCartesian(i,e)}else e.x+=l.height;t._clampedPosition=o$1p.clone(e,t._clampedPosition)}},n$J.prototype._loadImage=function(){var e,t=this._billboardCollection._textureAtlas,i=this._imageId,n=this._image,r=this._imageSubRegion;if(e$2e(n)&&(e=t.addImage(i,n)),e$2e(r)&&(e=t.addSubRegion(i,r)),this._imageIndexPromise=e,e$2e(e)){var o=this;e.then((function(e){if(o._imageId===i&&o._image===n&&f$1a.equals(o._imageSubRegion,r)){var a=t.textureCoordinates[e];o._imageWidth=t.texture.width*a.width,o._imageHeight=t.texture.height*a.height,o._imageIndex=e,o._ready=!0,o._image=void 0,o._imageIndexPromise=void 0,o$S(o,w$P)}})).otherwise((function(e){console.error("Error loading image for billboard: "+e),o._imageIndexPromise=void 0}))}},n$J.prototype.setImage=function(e,t){if(!e$2e(e))throw new t$15("id is required.");if(!e$2e(t))throw new t$15("image is required.");this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,e$2e(this._billboardCollection._textureAtlas)&&this._loadImage())},n$J.prototype.setImageSubRegion=function(e,t){if(!e$2e(e))throw new t$15("id is required.");if(!e$2e(t))throw new t$15("subRegion is required.");this._imageId===e&&f$1a.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=f$1a.clone(t),e$2e(this._billboardCollection._textureAtlas)&&this._loadImage())},n$J.prototype._setTranslate=function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._translate;o$1o.equals(t,e)||(o$1o.clone(e,t),o$S(this,F$W))},n$J.prototype._getActualPosition=function(){return e$2e(this._clampedPosition)?this._clampedPosition:this._actualPosition},n$J.prototype._setActualPosition=function(e){e$2e(this._clampedPosition)||o$1p.clone(e,this._actualPosition),o$S(this,T$Q)};var H$W=new e$2c;n$J._computeActualPosition=function(e,t,i,n){return e$2e(e._clampedPosition)?(i.mode!==e._mode&&e._updateClamping(),e._clampedPosition):i.mode===C$14.SCENE3D?t:(p$1d.multiplyByPoint(n,t,H$W),s$R.computeActualWgs84Position(i,H$W))};var M$T=new o$1p;n$J._computeScreenSpacePosition=function(e,t,i,n,r,o){var a=p$1d.multiplyByPoint(e,t,M$T),s=s$R.wgs84WithEyeOffsetToWindowCoordinates(r,a,i,o);if(e$2e(s))return o$1o.add(s,n,s),s};var v$G=new o$1o(0,0);n$J.prototype.computeScreenSpacePosition=function(e,t){var i=this._billboardCollection;if(e$2e(t)||(t=this._screenSpacePosition),!e$2e(i))throw new t$15("Billboard must be in a collection. Was it removed?");if(!e$2e(e))throw new t$15("scene is required.");o$1o.clone(this._pixelOffset,v$G),o$1o.add(v$G,this._translate,v$G);var n=i.modelMatrix,r=this._position;if(e$2e(this._clampedPosition)&&(r=this._clampedPosition,e.mode!==C$14.SCENE3D)){var o=e.mapProjection,a=o.ellipsoid,s=o.unproject(r,C$U);r=a.cartographicToCartesian(s,M$T),n=p$1d.IDENTITY}return n$J._computeScreenSpacePosition(n,r,this._eyeOffset,v$G,e,t)},n$J.getScreenSpaceBoundingBox=function(e,t,i){var n=e.width,r=e.height,o=e.scale;n*=o,r*=o;var a=t.x;e.horizontalOrigin===j$V.RIGHT?a-=n:e.horizontalOrigin===j$V.CENTER&&(a-=.5*n);var s=t.y;return e.verticalOrigin===S$Q.BOTTOM||e.verticalOrigin===S$Q.BASELINE?s-=r:e.verticalOrigin===S$Q.CENTER&&(s-=.5*r),e$2e(i)||(i=new f$1a),i.x=a,i.y=s,i.width=n,i.height=r,i},n$J.prototype.equals=function(e){return this===e||e$2e(e)&&this._id===e._id&&o$1p.equals(this._position,e._position)&&this._imageId===e._imageId&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&f$1a.equals(this._imageSubRegion,e._imageSubRegion)&&e$1X.equals(this._color,e._color)&&o$1o.equals(this._pixelOffset,e._pixelOffset)&&o$1o.equals(this._translate,e._translate)&&o$1p.equals(this._eyeOffset,e._eyeOffset)&&o$Y.equals(this._scaleByDistance,e._scaleByDistance)&&o$Y.equals(this._translucencyByDistance,e._translucencyByDistance)&&o$Y.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&r$Z.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},n$J.prototype._destroy=function(){e$2e(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),e$2e(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0},n$J.prototype.setBillboardStyle=function(e){!e$2e(e)||(this.image=u$Z(e.image,this._image))};const _0x13b492=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3c1aea=_0x13b492(void 0,(function(){return _0x3c1aea.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c1aea).search("(((.+)+)+)+$")}));_0x3c1aea();class _0x694f71{constructor(e,t,i){const n=this.boxCells=[],r=this.circleCells=[];this.xCellCount=Math.ceil(e/i),this.yCellCount=Math.ceil(t/i);for(let e=0;e<this.xCellCount*this.yCellCount;e++)n.push([]),r.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=t,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/t,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,t,i,n,r){this._forEachCell(t,i,n,r,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(r)}insertCircle(e,t,i,n){this._forEachCell(t-n,i-n,t+n,i+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(i),this.circles.push(n)}_insertBoxCell(e,t,i,n,r,o){this.boxCells[r].push(o)}_insertCircleCell(e,t,i,n,r,o){this.circleCells[r].push(o)}_query(e,t,i,n,r,o){if(i<0||e>this.width||n<0||t>this.height)return!r&&[];const a=[];if(e<=0&&t<=0&&this.width<=i&&this.height<=n){if(r)return!0;for(let e=0;e<this.boxKeys.length;e++)a.push({key:this.boxKeys[e],x1:this.bboxes[4*e],y1:this.bboxes[4*e+1],x2:this.bboxes[4*e+2],y2:this.bboxes[4*e+3]});for(let e=0;e<this.circleKeys.length;e++){const t=this.circles[3*e],i=this.circles[3*e+1],n=this.circles[3*e+2];a.push({key:this.circleKeys[e],x1:t-n,y1:i-n,x2:t+n,y2:i+n})}return o?a.filter(o):a}{const s={hitTest:r,seenUids:{box:{},circle:{}}};return this._forEachCell(e,t,i,n,this._queryCell,a,s,o),r?a.length>0:a}}_queryCircle(e,t,i,n,r){const o=e-i,a=e+i,s=t-i,l=t+i;if(a<0||o>this.width||l<0||s>this.height)return!n&&[];const u=[],c={hitTest:n,circle:{x:e,y:t,radius:i},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,u,c,r),n?u.length>0:u}query(e,t,i,n,r){return this._query(e,t,i,n,!1,r)}hitTest(e,t,i,n,r){return this._query(e,t,i,n,!0,r)}hitTestCircle(e,t,i,n){return this._queryCircle(e,t,i,!0,n)}_queryCell(e,t,i,n,r,o,a,s){const l=a.seenUids,u=this.boxCells[r];if(null!==u){const r=this.bboxes;for(const c of u)if(!l.box[c]){l.box[c]=!0;const u=4*c;if(e<=r[u+2]&&t<=r[u+3]&&i>=r[u+0]&&n>=r[u+1]&&(!s||s(this.boxKeys[c]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[c],x1:r[u],y1:r[u+1],x2:r[u+2],y2:r[u+3]})}}}const c=this.circleCells[r];if(null!==c){const r=this.circles;for(const u of c)if(!l.circle[u]){l.circle[u]=!0;const c=3*u;if(this._circleAndRectCollide(r[c],r[c+1],r[c+2],e,t,i,n)&&(!s||s(this.circleKeys[u]))){if(a.hitTest)return o.push(!0),!0;{const e=r[c],t=r[c+1],i=r[c+2];o.push({key:this.circleKeys[u],x1:e-i,y1:t-i,x2:e+i,y2:t+i})}}}}}_queryCellCircle(e,t,i,n,r,o,a,s){const l=a.circle,u=a.seenUids,c=this.boxCells[r];if(null!==c){const e=this.bboxes;for(const t of c)if(!u.box[t]){u.box[t]=!0;const i=4*t;if(this._circleAndRectCollide(l.x,l.y,l.radius,e[i+0],e[i+1],e[i+2],e[i+3])&&(!s||s(this.boxKeys[t])))return o.push(!0),!0}}const h=this.circleCells[r];if(null!==h){const e=this.circles;for(const t of h)if(!u.circle[t]){u.circle[t]=!0;const i=3*t;if(this._circlesCollide(e[i],e[i+1],e[i+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[t])))return o.push(!0),!0}}}_forEachCell(e,t,i,n,r,o,a,s){const l=this._convertToXCellCoord(e),u=this._convertToYCellCoord(t),c=this._convertToXCellCoord(i),h=this._convertToYCellCoord(n);for(let d=l;d<=c;d++)for(let l=u;l<=h;l++){const u=this.xCellCount*l+d;if(r.call(this,e,t,i,n,u,o,a,s))return}}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,i,n,r,o){const a=n-e,s=r-t,l=i+o;return l*l>a*a+s*s}_circleAndRectCollide(e,t,i,n,r,o,a){const s=(o-n)/2,l=Math.abs(e-(n+s));if(l>s+i)return!1;const u=(a-r)/2,c=Math.abs(t-(r+u));if(c>u+i)return!1;if(l<=s||c<=u)return!0;const h=l-s,d=c-u;return h*h+d*d<=i*i}}const _0x52cda4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2ea4d3=_0x52cda4(void 0,(function(){return _0x2ea4d3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ea4d3).search("(((.+)+)+)+$")}));_0x2ea4d3();const _0xe23e71=100;class _0x5091d4{constructor(e,t,i,n,r){this.transform=i,this.grid=n||new _0x694f71(e+2*_0xe23e71,t+2*_0xe23e71,25),this.ignoredGrid=r||new _0x694f71(e+2*_0xe23e71,t+2*_0xe23e71,25),this.pitchfactor=Math.cos(i._pitch)*i.cameraToCenterDistance,this.screenRightBoundary=e+_0xe23e71,this.screenBottomBoundary=t+_0xe23e71,this.gridRightBoundary=e+2*_0xe23e71,this.gridBottomBoundary=t+2*_0xe23e71}placeCollisionBox(e,t,i){const n=e.x1,r=e.y1,o=e.x2,a=e.y2;return!this.isInsideGrid(n,r,o,a)||!t&&this.grid.hitTest(n,r,o,a,i)?{box:[],offscreen:!1}:{box:[n,r,o,a],offscreen:this.isOffscreen(n,r,o,a)}}approximateTileDistance(e,t,i,n,r){const o=r?1:n/this.pitchfactor,a=e.lastSegmentViewportDistance*i;return e.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(t))}placeCollisionCircles(e,t,i,n,r,o,a,s,l,u,c,h,d){const f=[],p=this.projectAnchor(l,r.anchorX,r.anchorY),_=s/24,m=r.lineOffsetX*s,g=r.lineOffsetY*s,x=new Point(r.anchorX,r.anchorY),y=projection.project(x,u).point,v=projection.placeFirstAndLastGlyph(_,a,m,g,!1,y,x,r,o,u,{},!0);let $=!1,b=!1,T=!0;const C=p.perspectiveRatio*n,S=1/(n*i);let w=0,E=0;v&&(w=this.approximateTileDistance(v.first.tileDistance,v.first.angle,S,p.cameraDistance,h),E=this.approximateTileDistance(v.last.tileDistance,v.last.angle,S,p.cameraDistance,h));for(let i=0;i<e.length;i+=5){const n=e[i],r=e[i+1],o=e[i+2],a=e[i+3];if(!v||a<-w||a>E){_0x4ce3c2(e,i,!1);continue}const s=this.projectPoint(l,n,r),u=o*C;if(f.length>0){const t=s.x-f[f.length-4],n=s.y-f[f.length-3];if(u*u*2>t*t+n*n){if(i+8<e.length){const t=e[i+8];if(t>-w&&t<E){_0x4ce3c2(e,i,!1);continue}}}}const h=i/5;f.push(s.x,s.y,u,h),_0x4ce3c2(e,i,!0);const p=s.x-u,_=s.y-u,m=s.x+u,g=s.y+u;if(T=T&&this.isOffscreen(p,_,m,g),b=b||this.isInsideGrid(p,_,m,g),!t&&this.grid.hitTestCircle(s.x,s.y,u,d)){if(!c)return{circles:[],offscreen:!1};$=!0}}return{circles:$||!b?[]:f,offscreen:T}}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const t=[];let i=1/0,n=1/0,r=-1/0,o=-1/0;for(const a of e){const e=new Point(a.x+_0xe23e71,a.y+_0xe23e71);i=Math.min(i,e.x),n=Math.min(n,e.y),r=Math.max(r,e.x),o=Math.max(o,e.y),t.push(e)}const a=this.grid.query(i,n,r,o).concat(this.ignoredGrid.query(i,n,r,o)),s={},l={};for(const e of a){const i=e.key;if(void 0===s[i.bucketInstanceId]&&(s[i.bucketInstanceId]={}),s[i.bucketInstanceId][i.featureIndex])continue;(void 0)(t,[new Point(e.x1,e.y1),new Point(e.x2,e.y1),new Point(e.x2,e.y2),new Point(e.x1,e.y2)])&&(s[i.bucketInstanceId][i.featureIndex]=!0,void 0===l[i.bucketInstanceId]&&(l[i.bucketInstanceId]=[]),l[i.bucketInstanceId].push(i.featureIndex))}return l}insertCollisionBox(e,t,i,n,r){const o={bucketInstanceId:i,featureIndex:n,collisionGroupID:r};(t?this.ignoredGrid:this.grid).insert(o,e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,i,n,r){const o=t?this.ignoredGrid:this.grid,a={bucketInstanceId:i,featureIndex:n,collisionGroupID:r};for(let t=0;t<e.length;t+=4)o.insertCircle(a,e[t],e[t+1],e[t+2])}projectAnchor(e,t,i){const n=[t,i,0,1];return projection.xyTransformMat4(n,n,e),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5,cameraDistance:n[3]}}projectPoint(e,t,i){const n=[t,i,0,1];return projection.xyTransformMat4(n,n,e),new Point((n[0]/n[3]+1)/2*this.transform.width+_0xe23e71,(-n[1]/n[3]+1)/2*this.transform.height+_0xe23e71)}projectAndGetPerspectiveRatio(e,t,i){const n=[t,i,0,1];projection.xyTransformMat4(n,n,e);return{point:new Point((n[0]/n[3]+1)/2*this.transform.width+_0xe23e71,(-n[1]/n[3]+1)/2*this.transform.height+_0xe23e71),perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5}}isOffscreen(e,t,i,n){return i<_0xe23e71||e>=this.screenRightBoundary||n<_0xe23e71||t>this.screenBottomBoundary}isInsideGrid(e,t,i,n){return i>=0&&e<this.gridRightBoundary&&n>=0&&t<this.gridBottomBoundary}}function _0x4ce3c2(e,t,i){e[t+4]=i?1:0}var _0x26ef01=(_0x4b4d1e=!0,function(e,t){var i=_0x4b4d1e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4b4d1e=!1,i}),_0x37ef62=_0x26ef01(void 0,(function(){return _0x37ef62.toString().search("(((.+)+)+)+$").toString().constructor(_0x37ef62).search("(((.+)+)+)+$")})),_0x4b4d1e;_0x37ef62(),new e$1X;class _0xc33885{constructor(e,t,i,n){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):n&&i?1:0,this.placed=i}isHidden(){return 0===this.opacity&&!this.placed}}class _0x46372e{constructor(e,t,i,n,r){this.text=new _0xc33885(e?e.text:null,t,i,r),this.icon=new _0xc33885(e?e.icon:null,t,n,r)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class _0x1e2b8c{constructor(e,t,i){this.text=e,this.icon=t,this.skipFade=i}}class Placement{constructor(e,t,i,n,r){this.scene=e,this.transform=t.clone(),this.collisionIndex=new _0x5091d4(e.drawingBufferWidth,e.drawingBufferHeight,this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=i,this.isOverlapDisplayed=r,this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}placeLayerTile(e,t){var i=this,n=t._MVTLabel._billboardsByLayers[e.id],r=this.isOverlapDisplayed,o=this.scene.frameState.frameNumber;for(var a in n){for(var s=n[a],l=void 0,u=0;u<s.length;u++){var c=s[u];if(c.collisionFrameNumber!==o){c.collisionFrameNumber=o;var h=c.computeScreenSpacePosition(i.scene);if(h)if(l){var d=n$J.getScreenSpaceBoundingBox(c,h);f$1a.union(l,d,l)}else l=new f$1a,n$J.getScreenSpaceBoundingBox(c,h,l)}}if(!l)continue;var f={x1:l.x,y1:l.y,x2:l.x+l.width,y2:l.y+l.height,anchorPointX:0,anchorPointY:0};const e=i.collisionIndex.placeCollisionBox(f,r);if(e.box&&e.box.length>0&&t._visible){i.collisionIndex.insertCollisionBox(e.box,!1,a),this.placements[a]=new _0x1e2b8c(!0,!1,e.offscreen)}}}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const t=this.prevPlacement;let i=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;const n=t?t.symbolFadeChange(e):1,r=t?t.opacities:{};for(const e in this.placements){const t=this.placements[e],o=r[e];o?(this.opacities[e]=new _0x46372e(o,n,t.text,t.icon),i=i||t.text!==o.text.placed||t.icon!==o.icon.placed):(this.opacities[e]=new _0x46372e(null,n,t.text,t.icon,t.skipFade),i=i||t.text||t.icon)}for(const e in r){const t=r[e];if(!this.opacities[e]){const r=new _0x46372e(t,n,!1,!1);!r.isHidden()&&(this.opacities[e]=r,i=i||t.text.placed||t.icon.placed)}}i?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){const i=new _0x46372e(null,0,!1,!1,!0);for(var n=0;n<t.length;n++){var r=t[n]._MVTLabel._billboardsByLayers[e.id];if(r)for(var o in r){var a=r[o];let e=this.opacities[o];!e&&(e=i,this.opacities[o]=e);for(var s=0;s<a.length;s++){a[s].opacityState=e.text}}}}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,t){let i;if(this.zoomAtLastRecencyCheck===t){i=1-this.zoomAdjustment(t)}else i=1;this.zoomAtLastRecencyCheck=t;return this.commitTime+this.fadeDuration*i>e}setStale(){this.stale=!0}}const _0x1b6945=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x198816=_0x1b6945(void 0,(function(){return _0x198816.toString().search("(((.+)+)+)+$").toString().constructor(_0x198816).search("(((.+)+)+)+$")}));_0x198816();class _0x2c3885{constructor(){this._currentTileIndex=0}continuePlacement(e,t,i,n){for(;this._currentTileIndex<e.length;){const r=e[this._currentTileIndex];if(t.placeLayerTile(i,r),this._currentTileIndex++,n())return!0}}}class _0x23011e{constructor(e,t,i,n,r,o,a){this.placement=new Placement(e,t,r,o,a),this._currentPlacementIndex=i.length-1,this._forceFullPlacement=n,this._done=!1}isDone(){return this._done}continuePlacement(e,t,i){const n=performance.now(),r=()=>{const e=performance.now()-n;return!this._forceFullPlacement&&e>2};for(;this._currentPlacementIndex>=0;){const n=t[e[this._currentPlacementIndex]];if(n){if(this.placement.collisionIndex.transform.zoom,"symbol"===n.type){if("point"!==n.layout.get("symbol-placement")){this._currentPlacementIndex--;continue}!this._inProgressLayer&&(this._inProgressLayer=new _0x2c3885);if(this._inProgressLayer.continuePlacement(i,this.placement,n,r))return;delete this._inProgressLayer}this._currentPlacementIndex--}else this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}var _0xd3ba80=(_0x2dcfb2=!0,function(e,t){var i=_0x2dcfb2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2dcfb2=!1,i}),_0x5666d6=_0xd3ba80(void 0,(function(){return _0x5666d6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5666d6).search("(((.+)+)+)+$")})),_0x2dcfb2;function _0x2e0b01(e){this.dispatcher=new _0x184837(_0x194ba2(),this),this._layers={},this._order=[],this.sourceCaches={},this._loaded=!1,this.highLighting=!1,this.imageManager=new _0x2fed99,this.glyphManager=new _0x175ad1(e._requestManager,e._localIdeographFontFamily),this.lineAtlas=new _0x262d0c(256,512),this.map=e,this._resetUpdates()}_0x5666d6(),_0x2e0b01.prototype._load=function(e){for(var t in this._loaded=!0,this.stylesheet=e,e.sources);var i;e$2e(e.sprite)?i=e.sprite.slice(0,e.sprite.indexOf("/sprites/sprite")):e$2e(e.glyphs)&&(i=e.glyphs.slice(0,e.glyphs.indexOf("/fonts/{fontstack}/{range}"))),e$2e(a$O.CREDENTIAL)&&(e$2e(a$O.CREDENTIAL._keymap[i])?(e.sprite=a$O.addTokenWithKey(i,e.sprite),e.glyphs=a$O.addTokenWithKey(i,e.glyphs)):(e.sprite=a$O.addToken(e.sprite),e.glyphs=a$O.addToken(e.glyphs))),e.sprite?this._spriteRequest=_0x1fe793(e.sprite,this.map._requestManager,((e,t)=>{if(this._spriteRequest=null,e);else if(t)for(const e in t)this.imageManager.addImage(e,t[e]);this.imageManager.setLoaded(!0),this.dispatcher.broadcast("setImages",this.imageManager.listImages()),this.map._resourceReady=!0})):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var n=this.stylesheet.layers;this._order=n.map((function(e){return e.id})),this._layers={};for(var r=0,o=n;r<o.length;r+=1){var a=f=o[r];if(null!=(f=_0x1f5d3a(f))){f.config=a,f.config.originalFilter=clone(f.filter);var s=new _0x47eac1(0);f.recalculate(s),this._layers[f.id]=f}}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order));var l=this._layers,u=new _0x30db1c(n);for(var c in u.familiesBySource){var h=u.familiesBySource[c];for(var d in h)for(r=0,o=h[d];r<o.length;r+=1){var f,p=o[r],_=(f=p[0]).id;p.map((function(e){l[e.id].bucketName=_}))}}},_0x2e0b01.prototype.update=function(e){if(this._loaded){var t=new _0x47eac1(0);if(this._changed,this._changed){var i=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var r in(i.length||n.length)&&this._updateWorkerLayers(e,i,n),this._updatedPaintProps)this._layers[r].updateTransitions(t);this._resetUpdates()}for(var o in this.sourceCaches)this.sourceCaches[o].used=!1;for(var a=0,s=this._order;a<s.length;a+=1){var l=s[a],u=this._layers[l];null!=u&&null!=u&&u.recalculate(t,this.imageManager.listImages())}}},_0x2e0b01.prototype._updateWorkerLayers=function(e,t,i){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:i});for(var n=[],r=0;r<t.length;r++){var o=t[r],a=this._layers[o];e$2e(a)&&n.push(a.config)}for(var s in e){e[s].addRepaintTask(n,i,this.highLighting)}this.highLighting=!1},_0x2e0b01.prototype.addLayer=function(e,t,i){var n=e.id;if(this.getLayer(n))console.log('Layer with id "'+n+'" already exists on this map');else{var r=_0x1f5d3a(e);r.config=e;var o=t?this._order.indexOf(t):this._order.length;t&&-1===o?console.log('Layer with id "'+t+'" does not exist on this map.'):(this._order.splice(o,0,n),this._layerOrderChanged=!0,this._layers[n]=r,this._updateLayer(r))}},_0x2e0b01.prototype.moveLayer=function(e,t){if(this._changed=!0,this._layers[e]){if(e!==t){var i=this._order.indexOf(e);this._order.splice(i,1);var n=t?this._order.indexOf(t):this._order.length;t&&-1===n?console.log('Layer with id "'+t+'" does not exist on this map.'):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}}else console.log("The layer '"+e+"' does not exist in the map's style and cannot be moved.")},_0x2e0b01.prototype.loaded=function(){if(!this._loaded)return!1;if(id!==before){var e=this._order.indexOf(id);this._order.splice(e,1);var t=before?this._order.indexOf(before):this._order.length;before&&-1===t||(this._order.splice(t,0,id),this._layerOrderChanged=!0)}},_0x2e0b01.prototype.removeLayer=function(e){var t=this._layers[e];if(t){var i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],t.onRemove&&t.onRemove(this.map)}else console.log("The layer '"+e+"' does not exist in the map's style and cannot be removed.")},_0x2e0b01.prototype.getLayer=function(e){return this._layers[e]},_0x2e0b01.prototype.setFilter=function(e,t,i){var n=this.getLayer(e);if(n){if(!_0x5cbed6(n.filter,t)){if(null==t)e$2e(n.config.originalFilter)?(n.filter=n.config.originalFilter,n.config.filter=n.config.originalFilter):(n.filter=void 0,n.config.filter=null);else if(e$2e(n.filter)&&Array.isArray(n.filter)&&"all"===n.filter[0]){var r=!1;if("in"===t[0])for(var o=0;o<n.filter.length;o++)"in"===n.filter[o][0]&&(n.filter[o]=t,r=!0);!r&&(n.filter.push(t),n.config.filter=n.filter)}else n.filter=clone(t),n.config.filter=n.filter;this._updateLayer(n)}}else console.log("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")},_0x2e0b01.prototype.getFilter=function(e){return clone(this.getLayer(e).filter)},_0x2e0b01.prototype.setLayoutProperty=function(e,t,i,n){void 0===n&&(n={});var r=this.getLayer(e);r?_0x5cbed6(r.getLayoutProperty(t),i)||(r.setLayoutProperty(t,i,n),this._updateLayer(r)):console.log("The layer '"+e+"' does not exist in the map's style and cannot be styled.")},_0x2e0b01.prototype.getLayoutProperty=function(e,t){var i=this.getLayer(e);if(i)return i.getLayoutProperty(t);console.log("The layer '"+e+"' does not exist in the map's style.")},_0x2e0b01.prototype.setPaintProperty=function(e,t,i,n){void 0===n&&(n={});var r=this.getLayer(e);r?_0x5cbed6(r.getPaintProperty(t),i)||(r.setPaintProperty(t,i,n),this._updateLayer(r),this._changed=!0,this._updatedPaintProps[e]=!0):console.log("The layer '"+e+"' does not exist in the map's style and cannot be styled.")},_0x2e0b01.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},_0x2e0b01.prototype._serializeLayers=function(e){for(var t=[],i=0,n=e;i<n.length;i+=1){var r=n[i],o=this._layers[r];e$2e(o)&&("custom"!==o.type&&t.push(o.serialize()))}return t},_0x2e0b01.prototype.serialize=function(){return filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},_0x2e0b01.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},_0x2e0b01.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,this._changed=!0},_0x2e0b01.prototype.setHighLight=function(e,t){var i=this._findHighLightFeature(e);if(!e$2e(i))return e$2e(this.lastHighLightLayerID)&&(this.removeLayer(this.lastHighLightLayerID),this.lastHighLightLayerID=null,this.highLighting=!0),void(t._currentPickID=void 0);e.featureID=i.id,e.layerID=i.layer.id;var n=i.layer,r=n["source-layer"]+"_"+n.type+"_highlight",o=this._layers[r];if(t._currentPickID=r+e.featureID,!e$2e(o)){var a={};a["source-layer"]=n["source-layer"],a.source=n.source,a.id=r;var s=n.paint["fill-color"]&&0===e$1X.fromCssColorString(n.paint["fill-color"]).alpha||0===n.paint["fill-opacity"],l={};"circle"==n.type?(a.type="circle",l["circle-color"]=t._selectedColor.toCssColorString(),l["circle-radius"]=n.paint["circle-radius"]||5):"fill"!=n.type||s?(a.type="line",l["line-color"]=t._selectedColor.toCssColorString(),l["line-width"]=2):(a.type="fill",l["fill-color"]=t._selectedColor.toCssColorString()),a.paint=l,this.addLayer(a)}var u=["in","$id",i.id];this.setFilter(r,u),e$2e(this.lastHighLightLayerID)&&this.lastHighLightLayerID!==r&&this.removeLayer(this.lastHighLightLayerID),this.lastHighLightLayerID=r,this.highLighting=!0},_0x2e0b01.prototype.cancelHighLight=function(e){e$2e(this.lastHighLightLayerID)&&(this.removeLayer(this.lastHighLightLayerID),this.lastHighLightLayerID=null,this.highLighting=!0),e._currentPickID=void 0},_0x2e0b01.prototype._findHighLightFeature=function(e){for(var t={},i=0;i<this._order.length;i++){t[this._order[i]]=i}var n=null,r=0;for(var o in e)for(var a=e[o],s=0;s<a.length;s++){var l=a[s].feature;if(1==l.type||2==l.type||3==l.type){var u=t[l.layer.id];u>=r&&(n=l,r=u)}}return n},_0x2e0b01.prototype._updatePlacement=function(e,t,i){let n=!1;var r=this.map.innerLayer._imageryCache,o=[];for(var a in r)o.push(r[a]);o.sort((function(e,t){return t.level-e.level||(e.isTileIDLessThan(t)?-1:1)}));const s=this._layerOrderChanged||0===i;if((s||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(window.performance.now(),t.zoom))&&(this.pauseablePlacement=new _0x23011e(e,t,this._order,s,i,this.placement,this.map._isOverlapDisplayed),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,o),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(window.performance.now()),n=!0)),n)for(const e of this._order){const t=this._layers[e];t&&"symbol"===t.type&&this.placement.updateLayerOpacities(t,o)}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(performance.now())},_0x2e0b01.prototype.getImages=function(e,t,i){this.imageManager.getImages(t.icons,i)},_0x2e0b01.prototype.getGlyphs=function(e,t,i){this.glyphManager.getGlyphs(t.stacks,i)},_0x2e0b01.prototype.getResource=function(e,t,i){return makeRequest(t,i)};const _0x2e891d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x38dc1c=_0x2e891d(void 0,(function(){return _0x38dc1c.toString().search("(((.+)+)+)+$").toString().constructor(_0x38dc1c).search("(((.+)+)+)+$")}));_0x38dc1c();class _0x493221{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))}setNorthEast(e){return this._ne=e instanceof _0x30fc78?new _0x30fc78(e.lng,e.lat):_0x30fc78.convert(e),this}setSouthWest(e){return this._sw=e instanceof _0x30fc78?new _0x30fc78(e.lng,e.lat):_0x30fc78.convert(e),this}extend(e){const t=this._sw,i=this._ne;let n,r;if(e instanceof _0x30fc78)n=e,r=e;else{if(!(e instanceof _0x493221))return Array.isArray(e)?e.every(Array.isArray)?this.extend(_0x493221.convert(e)):this.extend(_0x30fc78.convert(e)):this;if(n=e._sw,r=e._ne,!n||!r)return this}return t||i?(t.lng=Math.min(n.lng,t.lng),t.lat=Math.min(n.lat,t.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new _0x30fc78(n.lng,n.lat),this._ne=new _0x30fc78(r.lng,r.lat)),this}getCenter(){return new _0x30fc78((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new _0x30fc78(this.getWest(),this.getNorth())}getSouthEast(){return new _0x30fc78(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"}isEmpty(){return!(this._sw&&this._ne)}contains(e){const{lng:t,lat:i}=_0x30fc78.convert(e),n=this._sw.lat<=i&&i<=this._ne.lat;let r=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(r=this._sw.lng>=t&&t>=this._ne.lng),n&&r}static convert(e){return!e||e instanceof _0x493221?e:new _0x493221(e)}}const _0x50f535=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5b9948=_0x50f535(void 0,(function(){return _0x5b9948.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b9948).search("(((.+)+)+)+$")}));_0x5b9948();class _0x30fc78{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new _0x30fc78(wrap(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return"LngLat("+this.lng+", "+this.lat+")"}toBounds(e){const t=360*e/40075017,i=t/Math.cos(Math.PI/180*this.lat);return new _0x493221(new _0x30fc78(this.lng-i,this.lat-t),new _0x30fc78(this.lng+i,this.lat+t))}static convert(e){if(e instanceof _0x30fc78)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new _0x30fc78(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new _0x30fc78(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const _0x194165=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5b084d=_0x194165(void 0,(function(){return _0x5b084d.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b084d).search("(((.+)+)+)+$")}));_0x5b084d();const _0x5d9e20=2*Math.PI*6378137;function _0x28fee4(e){return _0x5d9e20*Math.cos(e*Math.PI/180)}function mercatorXfromLng(e){return(180+e)/360}function mercatorYfromLat(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function mercatorZfromAltitude(e,t){return e/_0x28fee4(t)}function lngFromMercatorX(e){return 360*e-180}function latFromMercatorY(e){const t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}function altitudeFromMercatorZ(e,t){return e*_0x28fee4(latFromMercatorY(t))}function mercatorScale(e){return 1/Math.cos(e*Math.PI/180)}class _0x3c4a3b{constructor(e,t,i=0){this.x=+e,this.y=+t,this.z=+i}static fromLngLat(e,t=0){const i=_0x30fc78.convert(e);return new _0x3c4a3b(mercatorXfromLng(i.lng),mercatorYfromLat(i.lat),mercatorZfromAltitude(t,i.lat))}toLngLat(){return new _0x30fc78(lngFromMercatorX(this.x),latFromMercatorY(this.y))}toAltitude(){return altitudeFromMercatorZ(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/_0x5d9e20*mercatorScale(latFromMercatorY(this.y))}}const _0x840ad5=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x120a05=_0x840ad5(void 0,(function(){return _0x120a05.toString().search("(((.+)+)+)+$").toString().constructor(_0x120a05).search("(((.+)+)+)+$")}));_0x120a05();class _0x36e095{constructor(e,t,i,n,r){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===r||r,this._minZoom=e||0,this._maxZoom=t||26,this._minPitch=null==i?0:i,this._maxPitch=null==n?60:n,this.setMaxBounds(),this.width=0,this.height=0,this._center=new _0x30fc78(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const e=new _0x36e095(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._calcMatrices(),e}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get centerPoint(){return this.size._div(2)}get size(){return new _0x4f59fa(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(e){const t=-wrap(e,-180,180)*Math.PI/180;this.angle!==t&&(this._unmodified=!1,this.angle=t,this._calcMatrices(),this.rotationMatrix=mat2.create(),mat2.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(e){const t=clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==t&&(this._unmodified=!1,this._pitch=t,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(e){const t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())}get center(){return this._center}set center(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}coveringZoomLevel(e){const t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)}getVisibleUnwrappedCoordinates(e){const t=[new UnwrappedTileID(0,e)];if(this._renderWorldCopies){const i=this.pointCoordinate(new _0x4f59fa(0,0)),n=this.pointCoordinate(new _0x4f59fa(this.width,0)),r=this.pointCoordinate(new _0x4f59fa(this.width,this.height)),o=this.pointCoordinate(new _0x4f59fa(0,this.height)),a=Math.floor(Math.min(i.x,n.x,r.x,o.x)),s=Math.floor(Math.max(i.x,n.x,r.x,o.x)),l=1;for(let i=a-l;i<=s+l;i++)0!==i&&t.push(new UnwrappedTileID(i,e))}return t}coveringTiles(e){let t=this.coveringZoomLevel(e);const i=t;if(void 0!==e.minzoom&&t<e.minzoom)return[];void 0!==e.maxzoom&&t>e.maxzoom&&(t=e.maxzoom);const n=_0x3c4a3b.fromLngLat(this.center),r=Math.pow(2,t),o=new _0x4f59fa(r*n.x-.5,r*n.y-.5),a=[this.pointCoordinate(new _0x4f59fa(0,0)),this.pointCoordinate(new _0x4f59fa(this.width,0)),this.pointCoordinate(new _0x4f59fa(this.width,this.height)),this.pointCoordinate(new _0x4f59fa(0,this.height))];return tileCover(t,a,e.reparseOverscaled?i:t,this._renderWorldCopies).sort(((e,t)=>o.dist(e.canonical)-o.dist(t.canonical)))}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(e){const t=clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new _0x4f59fa(mercatorXfromLng(e.lng)*this.worldSize,mercatorYfromLat(t)*this.worldSize)}unproject(e){return new _0x3c4a3b(e.x/this.worldSize,e.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}setLocationAtPoint(e,t){const i=this.pointCoordinate(t),n=this.pointCoordinate(this.centerPoint),r=this.locationCoordinate(e),o=new _0x3c4a3b(r.x-(i.x-n.x),r.y-(i.y-n.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(e){return this.coordinatePoint(this.locationCoordinate(e))}pointLocation(e){return this.coordinateLocation(this.pointCoordinate(e))}locationCoordinate(e){return _0x3c4a3b.fromLngLat(e)}coordinateLocation(e){return e.toLngLat()}pointCoordinate(e){const t=[e.x,e.y,0,1],i=[e.x,e.y,1,1];vec4.transformMat4(t,t,this.pixelMatrixInverse),vec4.transformMat4(i,i,this.pixelMatrixInverse);const n=t[3],r=i[3],o=t[1]/n,a=i[1]/r,s=t[2]/n,l=i[2]/r,u=s===l?0:(0-s)/(l-s);return new _0x3c4a3b(interpolate(t[0]/n,i[0]/r,u)/this.worldSize,interpolate(o,a,u)/this.worldSize)}coordinatePoint(e){const t=[e.x*this.worldSize,e.y*this.worldSize,0,1];return vec4.transformMat4(t,t,this.pixelMatrix),new _0x4f59fa(t[0]/t[3],t[1]/t[3])}getBounds(){return(new _0x493221).extend(this.pointLocation(new _0x4f59fa(0,0))).extend(this.pointLocation(new _0x4f59fa(this.width,0))).extend(this.pointLocation(new _0x4f59fa(this.width,this.height))).extend(this.pointLocation(new _0x4f59fa(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new _0x493221([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}setMaxBounds(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(e,t=!1){const i=e.key,n=t?this._alignedPosMatrixCache:this._posMatrixCache;if(n[i])return n[i];const r=e.canonical,o=this.worldSize/this.zoomScale(r.z),a=r.x+Math.pow(2,r.z)*e.wrap,s=_0x3fdff7.mat4.identity(new Float64Array(16));return _0x3fdff7.mat4.translate(s,s,[a*o,r.y*o,0]),_0x3fdff7.mat4.scale(s,s,[o/ne$C,o/ne$C,1]),_0x3fdff7.mat4.multiply(s,t?this.alignedProjMatrix:this.projMatrix,s),n[i]=new Float32Array(s),n[i]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let e,t,i,n,r=-90,o=90,a=-180,s=180;const l=this.size,u=this._unmodified;if(this.latRange){const t=this.latRange;r=mercatorYfromLat(t[1])*this.worldSize,o=mercatorYfromLat(t[0])*this.worldSize,e=o-r<l.y?l.y/(o-r):0}if(this.lngRange){const e=this.lngRange;a=mercatorXfromLng(e[0])*this.worldSize,s=mercatorXfromLng(e[1])*this.worldSize,t=s-a<l.x?l.x/(s-a):0}const c=this.point,h=Math.max(t||0,e||0);if(h)return this.center=this.unproject(new _0x4f59fa(t?(s+a)/2:c.x,e?(o+r)/2:c.y)),this.zoom+=this.scaleZoom(h),this._unmodified=u,void(this._constraining=!1);if(this.latRange){const e=c.y,t=l.y/2;e-t<r&&(n=r+t),e+t>o&&(n=o-t)}if(this.lngRange){const e=c.x,t=l.x/2;e-t<a&&(i=a+t),e+t>s&&(i=s-t)}(void 0!==i||void 0!==n)&&(this.center=this.unproject(new _0x4f59fa(void 0!==i?i:c.x,void 0!==n?n:c.y))),this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;const e=this._fov/2,t=Math.PI/2+this._pitch,i=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-t-e),n=this.point,r=n.x,o=n.y,a=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),s=this.height/50;let l=new Float64Array(16);_0x3fdff7.mat4.perspective(l,this._fov,this.width/this.height,s,a),_0x3fdff7.mat4.scale(l,l,[1,-1,1]),_0x3fdff7.mat4.translate(l,l,[0,0,-this.cameraToCenterDistance]),_0x3fdff7.mat4.rotateX(l,l,this._pitch),_0x3fdff7.mat4.rotateZ(l,l,this.angle),_0x3fdff7.mat4.translate(l,l,[-r,-o,0]),this.mercatorMatrix=_0x3fdff7.mat4.scale([],l,[this.worldSize,this.worldSize,this.worldSize]),_0x3fdff7.mat4.scale(l,l,[1,1,mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=l;const u=this.width%2/2,c=this.height%2/2,h=Math.cos(this.angle),d=Math.sin(this.angle),f=r-Math.round(r)+h*u+d*c,p=o-Math.round(o)+h*c+d*u,_=new Float64Array(l);if(_0x3fdff7.mat4.translate(_,_,[f>.5?f-1:f,p>.5?p-1:p,0]),this.alignedProjMatrix=_,l=_0x3fdff7.mat4.create(),_0x3fdff7.mat4.scale(l,l,[this.width/2,-this.height/2,1]),_0x3fdff7.mat4.translate(l,l,[1,-1,0]),this.labelPlaneMatrix=l,l=_0x3fdff7.mat4.create(),_0x3fdff7.mat4.scale(l,l,[1,-1,1]),_0x3fdff7.mat4.translate(l,l,[-1,-1,0]),_0x3fdff7.mat4.scale(l,l,[2/this.width,2/this.height,1]),this.glCoordMatrix=l,this.pixelMatrix=_0x3fdff7.mat4.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),l=_0x3fdff7.mat4.invert(new Float64Array(16),this.pixelMatrix),!l)throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const e=this.pointCoordinate(new _0x4f59fa(0,0)),t=[e.x*this.worldSize,e.y*this.worldSize,0,1];return vec4.transformMat4(t,t,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const e=this._pitch,t=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new _0x4f59fa(0,t))}getCameraQueryGeometry(e){const t=this.getCameraPoint();if(1===e.length)return[e[0],t];{let i=t.x,n=t.y,r=t.x,o=t.y;for(const t of e)i=Math.min(i,t.x),n=Math.min(n,t.y),r=Math.max(r,t.x),o=Math.max(o,t.y);return[new _0x4f59fa(i,n),new _0x4f59fa(r,n),new _0x4f59fa(r,o),new _0x4f59fa(i,o),new _0x4f59fa(i,n)]}}}function i$Q(e,t){return 0!=(e&t)}var e$1f={None:0,QuadKey:1},Z$P=Object.freeze(e$1f);function a$K(e,t,i,n){if(!e$2e(e))throw new t$15("uint8Array is required.");if(t<0)throw new t$15("byteOffset cannot be negative.");if(i<0)throw new t$15("byteLength cannot be negative.");if(t+i>e.byteLength)throw new t$15("sub-region exceeds array bounds.");return t=u$Z(t,0),i=u$Z(i,e.byteLength-t),n=u$Z(n,"utf-8"),e=e.subarray(t,t+i),a$K.decode(e,n)}function f$S(e,t,i){return t<=e&&e<=i}function g$Y(e){for(var t=0,i=0,n=0,r=128,o=191,a=[],s=e.length,l=0;l<s;++l){var u=e[l];if(0===n){if(f$S(u,0,127)){a.push(u);continue}if(f$S(u,194,223)){n=1,t=31&u;continue}if(f$S(u,224,239)){224===u&&(r=160),237===u&&(o=159),n=2,t=15&u;continue}if(f$S(u,240,244)){240===u&&(r=144),244===u&&(o=143),n=3,t=7&u;continue}throw new t$13("String decoding failed.")}f$S(u,r,o)?(r=128,o=191,t=t<<6|63&u,++i===n&&(a.push(t),t=n=i=0)):(t=n=i=0,r=128,o=191,--l)}return a}a$K.decodeWithTextDecoder=function(e,t){return new TextDecoder(t).decode(e)},a$K.decodeWithFromCharCode=function(e){for(var t="",i=g$Y(e),n=i.length,r=0;r<n;++r){var o=i[r];o<=65535?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode(55296+(o>>10),56320+(1023&o)))}return t},typeof TextDecoder<"u"?a$K.decode=a$K.decodeWithTextDecoder:a$K.decode=a$K.decodeWithFromCharCode;var ke$e=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642478e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],B$P=0;function M$S(e,t){t=u$Z(t,{}),this._name=t.name,this._tilingScheme=t.tilingScheme,this._owner=void 0,this._hasTileWith=!1,e$2e(t.tileWidth)&&e$2e(t.tileHeight)&&(this._hasTileWith=!0),this._tileWidth=u$Z(parseInt(t.tileWidth)||void 0,512),this._tileHeight=u$Z(parseInt(t.tileHeight)||void 0,512),this._canvasWidth=u$Z(parseInt(t.canvasWidth)||void 0,512),this._canvasWidth=e$2d.clamp(this._canvasWidth,128,1024),e$2e(t.minimumLevel)&&e$2e(t.maximumLevel)&&(this._hasLevel=!0),this._minimumLevel=u$Z(parseInt(t.minimumLevel)||void 0,0),this._maximumLevel=parseInt(t.maximumLevel)||void 0,this.minimumTerrainLevel=parseInt(t.minimumTerrainLevel)||void 0,this.maximumTerrainLevel=parseInt(t.maximumTerrainLevel)||void 0,this._styleName=u$Z(t.styleName,""),this._mapboxStyle=t.mapboxStyle,this._colDiff=0,this._rowDiff=0,this._ready=!1,this._resourceReady=!1,this._requestMetadataSuccess=!1,this._requestStyleSuccess=!1,this._readyPromise=o$1l.defer(),this._layers={},this._selectEnabled=u$Z(t.selectEnabled,!0),this._selectedColor=u$Z(t.selectedColor,e$1X.fromCssColorString("#00FFFF")),this._overlapDisplayedThreshold=0,this._localIdeographFontFamily=u$Z(t.localIdeographFontFamily,!1),this._key=u$Z(t.key,""),this._url=u$Z(t.url,""),this._url.length>0&&0===this._url.indexOf("//")&&(this._url=window.location.protocol+this._url),this._labelScaleByDistance=t.labelScaleByDistance,this._resource=t$10.createIfNeeded(this._url),this._context=e,this._transform=new _0x36e095(0,22,0,60),this._painter=new _0x3fc49d(e,this._transform,this._canvasWidth),this._painter.lineAntialiasing=t.lineAntialiasing,this._requestManager=new _0x32573f((e=>({url:e,headers:t.customRequestHeaders}))),this._MVTStyle=new _0x2e0b01(this),this._viewer=t.viewer,this._iswmts=-1!==this._url.indexOf("wmts"),this._isgeoserver=-1!==this._url.indexOf("/geoserver/"),this._isRealspace=-1!==this._url.indexOf("rest/realspace"),this._isTdt=u$Z(t.isTdt,!1),this._packingRequest=this._isRealspace?t.packingRequest:void 0,this._hasIndex=t.hasIndex||!1,this._isTdt?(this._urlTiles=this._url+"?t=vt&z={z}&x={x}&y={y}",this.tablename=this._url):this._iswmts?(this._layer=u$Z(t.layer,""),this._format=u$Z(t.format,"mvt"),this._tilematrixset=u$Z(t.tilematrixset,""),this._minimumLevel=u$Z(parseInt(t.minimumLevel)||void 0,0),this._maximumLevel=u$Z(parseInt(t.maximumLevel)||void 0,0),this.tablename=this._layer+this._tilematrixset):this._isRealspace?(this._urlTiles=this._url+"/data/index/{y}/{x}.mvt?level={z}",this.tablename=this._url):(this._urlTiles=this._url+"/tiles/{z}/{x}/{y}.mvt",this.tablename=this._url),this._tileCache={},this._scales=u$Z(t.scales,ke$e),this._id=-1,this._errorEvent=new o$1h,this._pausing=!1,this._selectEnabled=!0,this._maxImageCacheLevel=0,this.minificationFilter=t.minificationFilter,this.magnificationFilter=t.magnificationFilter,this._renderTextureList={"512_512":new t$U({context:e,width:512,height:512,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})},this._isOverlapDisplayed=u$Z(t.isOverlapDisplayed,!1),this._enableMorphing=!1,this.realtime=u$Z(t.realtime,!1),this._billboardMode=u$Z(t.billboardMode,yr$2.None),this.selectTolerance=.2,this._customRequestHeaders=t.customRequestHeaders;var i=this;function n(){if(i._iswmts){var e=t.url+"?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities";e$2e(a$O.CREDENTIAL)&&(e=e$2e(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),o$1l(d$1f(e,i._customRequestHeaders),a,u)}else if(i._isRealspace){e=t.url+"/config";e$2e(a$O.CREDENTIAL)&&(e=e$2e(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),o$1l(u$Q(e,i._customRequestHeaders),r,u)}else{var n=t.url+".json";e$2e(a$O.CREDENTIAL)&&(n=e$2e(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,n):a$O.addToken(n)),o$1l(u$P(n,i._customRequestHeaders),l,u)}}function r(e){var t=function(e){e=o.parseFromString(e,"application/xml");for(var t="http://www.supermap.com/SuperMapCache/sci3d",n=e.childNodes[0],r=Qe$a(j$S(n,"Levels",t),"Level",t),a=[],s=0,l=r.length;s<l;s++)a.push(parseInt(r[s].textContent,10));var u=j$S(n,"Bounds",t),c=D$S(u,"Left",t),h=D$S(u,"Right",t),d=D$S(u,"Top",t),f=D$S(u,"Bottom",t),p=de$r(n,"FileExtentName",t),_=D$S(n,"CellWidth",t),m=D$S(n,"CellHeight",t),g=de$r(n,"CacheName",t);return i._name||(i._name=g||""),{left:c,right:h,top:d,bottom:f,fileExtentName:p,levels:a,imageSizeWidth:_,imageSizeHeight:m}}(e);i._fileExtension=u$Z(t.fileExtentName,"mvt"),i._tileWidth=u$Z(t.imageSizeWidth,256),i._tileHeight=u$Z(t.imageSizeHeight,256),i._coordUnit="DEGREE";var n=t.levels,r=n.length;i._minimumLevel=u$Z(n[0],0),i._maximumLevel=u$Z(n[r-1],r-1),e$2e(i._tilingScheme)||(i._tilingScheme=new g$15);var a,s,l,u,c=i._tilingScheme;e$2e(i._rectangle)||t.left&&t.right&&t.top&&t.bottom&&(a=e$2d.toRadians(t.left),l=e$2d.toRadians(t.right),s=e$2d.toRadians(t.bottom),u=e$2d.toRadians(t.top),i._rectangle=new h$18(a,s,l,u));i._rectangle.west<c.rectangle.west&&(i._rectangle.west=c.rectangle.west),i._rectangle.east>c.rectangle.east&&(i._rectangle.east=c.rectangle.east),i._rectangle.south<c.rectangle.south&&(i._rectangle.south=c.rectangle.south),i._rectangle.north>c.rectangle.north&&(i._rectangle.north=c.rectangle.north),i._tilingScheme=c,i._urlTemplate=i._url+"data/index/{y}/{x}.{fileExtension}?level={level}",i._ready=!0,i._requestMetadataSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}this._subdomains=t.subdomains,e$2e(this._subdomains)&&(t.url=t.url.replace(/({.*?})/g,(function(e,t){if(!e$2e(i._subdomains.length))throw new t$15("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?i._subdomains[0]:e}))),this._isTdt?function(e){if(!e._hasLevel){var t=30,i=-1;if(!e$2e(e._mapboxStyle))throw new t$15("tdt mapbox style should be passed.");for(var n in e._mapboxStyle.sources){var r=e._mapboxStyle.sources[n];t=Math.min(r.minZoom,t),i=Math.max(r.maxZoom,i)}e._minimumLevel=t,e._maximumLevel=i}e$2e(e._tilingScheme)||(e._tilingScheme=new g$15),e._coordUnit=e._tilingScheme instanceof g$15?"DEGREE":"METER",e._rectangle=h$18.clone(e._tilingScheme._rectangle),e._urlTemplate=e._url+"?t=vt&z={z}&x={x}&y={y}",e._requestMetadataSuccess=!0,A$Z(e,e._mapboxStyle),e._requestStyleSuccess=!0,e._readyPromise.resolve(!0)}(this):(n(),this._isgeoserver||function(){var e;if(e$2e(i._mapboxStyle))A$Z(i,i._mapboxStyle);else if(i._isRealspace)e=t.url+"/data/path/style.json",e$2e(a$O.CREDENTIAL)&&(e=e$2e(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),n=u$P(e,i._customRequestHeaders);else{var n;e=i._iswmts?t.url+"?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetStyle&STYLENAME="+i._styleName:t.url+"/style.json",e$2e(a$O.CREDENTIAL)&&(e=e$2e(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),n=u$P(e,i._customRequestHeaders)}o$1l(n,(function(e){e$2e(e)?(i._mapboxStyle=e,A$Z(i,e),i._requestStyleSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)):console.log("style request failed")}),(function(n){e=t.url+"/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true",e$2e(a$O.CREDENTIAL)&&(e=e$2e(a$O.CREDENTIAL._keymap[i._url])?a$O.addTokenWithKey(i._url,e):a$O.addToken(e)),u$P(e,i._customRequestHeaders).then((function(e){i._mapboxStyle=e,A$Z(i,e),i._tileFeature=!0,i._urlTiles=i._url+"/tileFeature.mvt?returnAttributes=true&x={x}&y={y}&width=512&height=512&scale={scale}&origin={'x':-180,'y':90}"})),u()}))}());var o=new DOMParser;function a(e){var n=function(e){var t,n,r=e.firstChild,o=r.namespace,a=s$T.queryFirstNode(r,"Contents",o),s=s$T.queryNodes(a,"Layer",o);if(s.length>1)for(var l=0,u=s.length;l<u;l++){var c=s$T.queryFirstNode(s[l],"Title",o),h=s$T.queryStringValue(c),d=s$T.queryFirstNode(s[l],"Identifier",o),f=s$T.queryStringValue(d);if(h===i._layer||f===i._layer){t=s[l],n=h;break}}else t=s$T.queryFirstNode(a,"Layer",o);var p,_,m,g,x=s$T.queryFirstNode(t,"WGS84BoundingBox",o),y=s$T.queryStringValue(x,"LowerCorner",o),v=s$T.queryStringValue(x,"UpperCorner",o),$=y.split(" "),b=v.split(" ");m=parseFloat(b[0]),g=parseFloat(b[1]),p=parseFloat($[0]),_=parseFloat($[1]);var T=s$T.queryFirstNode(a,"TileMatrixSet",o),C=s$T.queryFirstNode(T,"TileMatrix",o),S=s$T.queryNumericValue(C,"TileWidth",o),w=s$T.queryNumericValue(C,"TileHeight",o);return{left:p,right:m,top:g,bottom:_,width:S,height:w,styleName:n}}(e);e$2e(i._tilingScheme)||(i._tilingScheme=new g$15);var r={};r.left=e$2d.clamp(n.left,-180,180),r.bottom=e$2d.clamp(n.bottom,-90,90),r.right=e$2d.clamp(n.right,-180,180),r.top=e$2d.clamp(n.top,-90,90),i._rectangle=h$18.fromDegrees(r.left,r.bottom,r.right,r.top),i._hasTileWith||(i._tileWidth=n.width,i._tileHeight=n.height),i._urlTiles=i._url+"?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER="+i._layer+"&FORMAT="+i._format+"&TILEMATRIXSET="+i._tilematrixset+"&WIDTH="+i._tileWidth+"&HEIGHT="+i._tileHeight+"&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}",i._rectangle||(i._rectangle=u$Z(t.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._requestMetadataSuccess=!0,i._isgeoserver&&(e$2e(i._mapboxStyle)||(i._mapboxStyle={version:8,name:n.styleName,layers:[{id:n.styleName+"_fill",source:n.styleName,"source-layer":n.styleName,type:"fill",layout:{visibility:"visible"},paint:{"fill-color":"rgba(224,207,226,1.00)","fill-antialias":!0},filter:["all",["==","$type","Polygon"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}},{id:n.styleName+"_outline",source:n.styleName,"source-layer":n.styleName,type:"line",layout:{visibility:"visible"},paint:{"line-width":1,"line-color":"rgba(102,102,102,1.00)"},filter:["all",["==","$type","Polygon"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}},{id:n.styleName+"line",source:n.styleName,"source-layer":n.styleName,type:"line",layout:{visibility:"visible"},paint:{"line-width":.38,"line-color":"rgba(149,55,52,1.00)"},filter:["all",["==","$type","LineString"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}},{id:n.styleName+"point",source:n.styleName,"source-layer":n.styleName,type:"circle",layout:{visibility:"visible"},paint:{"circle-radius":2.27,"circle-color":"rgba(54,96,146,1.00)"},filter:["all",["==","$type","Point"]],metadata:{"layer:name":n.styleName,"layer:caption":n.styleName}}]}),A$Z(i,i._mapboxStyle),i._requestStyleSuccess=!0,i._urlTiles=i._url+"?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER="+i._layer+"&FORMAT="+i._format+"&TILEMATRIXSET="+i._tilematrixset+"&WIDTH="+i._tileWidth+"&HEIGHT="+i._tileHeight+"&TILEMATRIX=EPSG:4326:{z}&TILEROW={y}&TILECOL={x}&&STYLE="),i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}function s(e,t){var i=[],n=Math.abs(e)/512;n=function(e,t,i){var n=e*t*39.37007874015748*Xe$c(i);return 1/n}(n,96,t);for(var r=0;r<22;r++)0!=r?(n*=2,i[r]=n):i[r]=n;return i}function l(e){var n=e.prjCoordSys.coordUnit;i._coordUnit=n;var r=e.bounds,o=e.viewer.width,a=e.viewer.height;if(i._hasTileWith||(i._tileWidth=o,i._tileHeight=a),i._hasLevel||function(e,t){e._minimumLevel=0,e._maximumLevel=22;var i,n=[];if(i=3857==t.prjCoordSys.epsgCode?[1/295829355.454566,1/147914677.727283,1/73957338.8636414,1/36978669.4318207,1/18489334.7159103,1/9244667.35795517,1/4622333.67897759,1/2311166.83948879,1/1155583.4197444,1/577791.709872198,1/288895.854936099,1/144447.92746805,1/72223.9637340248,1/36111.9818670124,1/18055.9909335062,1/9027.9954667531,1/4513.99773337655,1/2256.99886668828,1/1128.49943334414,1/564.249716672069,1/282.124858336034,1/141.062429168017]:"DEGREE"==t.prjCoordSys.coordUnit?s(360,t.prjCoordSys.coordUnit):s(40075016.6855785,t.prjCoordSys.coordUnit),t.visibleScales&&t.visibleScales.length>0){for(var r,o=null,a=null,l=0;l<t.visibleScales.length;l++){for(var u=0;u<=i.length-1;u++)if(0!=u){if(!(a>(r=Math.abs(t.visibleScales[l]-i[u]))))break;a=r,o=u}else a=Math.abs(t.visibleScales[l]-i[u]),o=0;o>=0&&n.push(o)}e._minimumLevel=n[0],e._maximumLevel=n[n.length-1]}}(i,e),"DEGREE"==n)e$2e(i._tilingScheme)||(i._tilingScheme=new g$15),r.left=e$2d.clamp(r.left,-180,180),r.bottom=e$2d.clamp(r.bottom,-90,90),r.right=e$2d.clamp(r.right,-180,180),r.top=e$2d.clamp(r.top,-90,90),i._rectangle=h$18.fromDegrees(r.left,r.bottom,r.right,r.top),i._urlTemplate=i._url+"/tiles/{z}/{x}/{y}.mvt";else{var l=new o$1p(r.left,r.bottom,0);l.x=Math.max(-20037508.342789244,l.x),l.y=Math.max(-20037508.342789244,l.y);var u=new o$1p(r.right,r.top,0);if(u.x=Math.min(20037508.342789244,u.x),u.y=Math.min(20037508.342789244,u.y),!e$2e(i._tilingScheme)){var c=e$2e(e.prjCoordSys)&&(3857==e.prjCoordSys.epsgCode||e$2e(e.prjCoordSys.projection)&&("PRJ_SPHERE_MERCATOR"===e.prjCoordSys.projection.type||"PRJ_TRANSVERSE_MERCATOR"===e.prjCoordSys.projection.type));i._tilingScheme=new c$S({rectangleSouthwestInMeters:c?void 0:l,rectangleNortheastInMeters:c?void 0:u})}var h=i._tilingScheme._projection.unproject(l),d=i._tilingScheme._projection.unproject(u);i._rectangle=new h$18(h.longitude,h.latitude,d.longitude,d.latitude),i._urlTemplate=i._url+"/tiles/{z}/{x}/{y}.mvt"}i._rectangle||(i._rectangle=u$Z(t.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._requestMetadataSuccess=!0,i._requestMetadataSuccess&&i._requestStyleSuccess&&i._readyPromise.resolve(!0)}function u(e){var t,r="An error occurred while accessing "+i._url+".";t=l$V.handleError(t,i,i._errorEvent,r,void 0,void 0,void 0,n),i._readyPromise.reject(new RuntimeError(r))}}function Oe$l(e,t){if(e$2e(t.metadata)&&e$2e(t.metadata.indexbounds)){var i=-180,n=90,r=360;e$2e(t.metadata.epsgcode)&&("3857"==t.metadata.epsgcode||t.metadata.indexbounds[0]<-180)&&(i=-20037508.3427892,n="METER"==e._coordUnit?20037508.3427892:30056262.5141838,r=40075016.6855784);var o=t.metadata.indexbounds,a=(o[0]-i)/r,s=(o[3]-n)/r;e._colDiff=a,e._rowDiff=s}}function A$Z(e,t){e._MVTStyle._load(t),Oe$l(e,t)}function he$q(e,t,i){var n=Math.pow(2,t);return e+Math.round(n*i)}function He$e(e){e.priority=B$P,e.throttle=!0,(B$P+=.001)>100&&(B$P=0)}function fe$t(e,t,i){return{mvt:!0,colorTexture:new t$U({context:e._context,width:e._canvasWidth,height:e._canvasWidth,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,generateMipmap:!0,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:u$Z(e.minificationFilter,tt$i.LINEAR_MIPMAP_LINEAR),magnificationFilter:u$Z(e.magnificationFilter,rt$k.LINEAR)})}),rawData:t,indexData:i}}Object.defineProperties(M$S.prototype,{name:{get:function(){return this._name}},proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel>18?this._maximumLevel:18}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},isOverlapDisplayed:{get:function(){return this._isOverlapDisplayed},set:function(e){this._isOverlapDisplayed=e}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready&&this._resourceReady}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}},mapboxStyle:{get:function(){return this._mapboxStyle},set:function(e){this._mapboxStyle=e,e$2e(this._mapboxStyle)&&A$Z(this,this._mapboxStyle)}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2e(e)&&!e$2e(e.length))throw new t$15("Excepted MvtProvider.subdomains to be type of Array.");this._subdomains=e}},globalLineWidthScale:{get:function(){return this._painter._globalLineWidthScale},set:function(e){this._painter._globalLineWidthScale=e}},lineAntialiasing:{get:function(){return this._painter._lineAntialiasing},set:function(e){this._painter._lineAntialiasing=e}},enableMorphing:{get:function(){return this._enableMorphing},set:function(e){this._enableMorphing=e}},billboardMode:{get:function(){return this._billboardMode}},selectedColor:{get:function(){return this._selectedColor},set:function(e){this._selectedColor=e}}}),M$S.prototype.getTileCredits=function(e,t,i){},M$S.prototype.resetVisible=function(){var e=this.innerLayer._imageryCache;for(var t in e)e[t]._visible=!1},M$S.prototype.update=function(e,t,i){var n=this.innerLayer._imageryCache;this._MVTStyle.update(n);var r=[];for(var o in n)r.push(n[o]);r.sort((function(e,t){return e.level<t.level?1:e.level>t.level?-1:0})),this._maxImageCacheLevel=0;for(var a=[],s=[],l=r.length,u=0;u<l;u++){var c=r[u];if(this._maxImageCacheLevel=Math.max(this._maxImageCacheLevel,c.level),c.update(),c._visible&&this.realtime&&(c.realtimeRender(),a.push(c)),t.passes.pick||c._visible){var h=c._MVTLabel;h._textCollection&&s.push(h._textCollection),h._iconCollection&&s.push(h._iconCollection)}}var d=1;t.passes.pick||(this._transform.zoom=this._viewer.scene.camera.zoomLevel,this._MVTStyle._updatePlacement(this._viewer.scene,this._transform,500),d=this._MVTStyle.placement.symbolFadeChange(performance.now()));for(u=0;u<s.length;u++)t.passes.pick||(s[u].fadeChage=d),s[u].update(t,e,i)},M$S.prototype.removeTile=function(e,t,i){},M$S.prototype.requestImage=function(e,t,i,n,r,o){He$e(n);var a=this,s=i+1;return this.tilingScheme instanceof c$S&&(s=i),this._tileFeature&&(s+=1),this._isgeoserver&&(s-=1),i>a._maximumLevel?(o.hasRawData=!1,fe$t(a,null)):(o.hasRawData=!0,ze$e(o,n,e,t,s,a),fe$t(a))};var Ve$g=/({.*?})/g;function ze$e(e,t,i,n,r,o){var a=o._urlTiles;if(-1===a.indexOf("http://")&&-1===a.indexOf("https://")&&(a=a.startsWith("/")?window.origin+a:window.origin+"/"+a),o.tilingScheme instanceof c$S||(i=he$q(i,r,o._colDiff),n=he$q(n,r,o._rowDiff)),e.requestX=i,e.requestY=n,e.requestZ=r,t.quadKey=Ye$f(i,n,r),o._packingRequest===Z$P.QuadKey&&(t.type=U$1f.PACK,t.providerName=o._name,t.throttle=!0),o._tileFeature){var s=o._scales[r];a=a.replace("{x}",i).replace("{y}",n).replace("{scale}",s)}else a=a.replace("{x}",i).replace("{y}",n).replace("{z}",r);if(e$2e(o._subdomains)){var l=o._subdomains,u=l[(i+n+r)%l.length];a=a.replace(Ve$g,(function(e,t){return"{s}"===t?u:e}))}e$2e(a$O.CREDENTIAL)&&(e$2e(a$O.CREDENTIAL._keymap[o._url])?o._isTdt?a+="&tk="+a$O.CREDENTIAL._keymap[o._url]:a=a$O.addTokenWithKey(o._url,a):o._isTdt?a+="&tk="+a$O.CREDENTIAL._value:a=a$O.addToken(a)),e.requestUrl=a}function Ue$h(e,t){for(var i=!1,n=0,r=e.length-1;n<e.length;r=n++){var o=e[n],a=e[r];o.latitude>t.latitude!=a.latitude>t.latitude&&t.longitude<(a.longitude-o.longitude)*(t.latitude-o.latitude)/(a.latitude-o.latitude)+o.longitude&&(i=!i)}return i}function Be$j(e,t,i){var n=i[0],r=i[2];if(e.longitude<n.longitude&&t.longitude<n.longitude||e.longitude>r.longitude&&t.longitude>r.longitude||e.latitude<n.latitude&&t.latitude<n.latitude||e.latitude>r.latitude&&t.latitude>r.latitude)return!1;var o=G$10(e,t,i[0]);return o!==G$10(e,t,i[1])||o!==G$10(e,t,i[2])||o!==G$10(e,t,i[3])}function Ge$f(e,t){for(var i=0,n=e;i<n.length;i+=1){var r=n[i];if(t.south<=r.latitude&&t.west<=r.longitude&&t.north>=r.latitude&&t.east>=r.longitude)return!0}var o=[new a$18(t.west,t.north),new a$18(t.east,t.north),new a$18(t.east,t.south),new a$18(t.west,t.south)];if(e.length>2)for(var a=0,s=o;a<s.length;a+=1){if(Ue$h(e,s[a]))return!0}for(var l=0;l<e.length-1;l++){if(Be$j(e[l],e[l+1],o))return!0}}function G$10(e,t,i){return(i.latitude-e.latitude)*(t.longitude-e.longitude)>(t.latitude-e.latitude)*(i.longitude-e.longitude)}function je$e(e,t,i){var n=[];for(var r in t){var o=t[r];o.level==i._maxImageCacheLevel&&Ge$f(e,o.rectangle)&&e$2e(o.featureIndex)&&n.push(o)}return n}function Ke$c(e,t){Array.isArray(e)||(e=[e]);var i=null;for(var n in t){for(var r=t[n],o=!0,a=0;a<e.length;a++)if(!h$18.contains(r.rectangle,e[a])){o=!1;break}if(o)if(null==i)i=r;else{var s=i.rectangle.width;r.rectangle.width<s&&(i=r)}}for(;e$2e(i)&&!e$2e(i.featureIndex);)i=i.parent;return i}function ce$r(e,t,i){var n=i.rectangle;return new _0x4f59fa((e-n.west)/n.width*ne$C,(t-n.south)/n.height*ne$C)}function Xe$c(e){var t;return"METER"==e?t=1:"DEGREE"==e?t=2*Math.PI*6378137/360:"KILOMETER"==e?t=.001:"INCH"==e?t=1/.025399999918:"FOOT"==e&&(t=.3048),t}function Ye$f(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function j$S(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function Qe$a(e,t,i){if(e$2e(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function D$S(e,t,i){var n=j$S(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function de$r(e,t,i){var n=j$S(e,t,i);if(e$2e(n))return n.textContent.trim()}function e$1e(e,t,i,n){this.quadKey=t,this.data=i,this.provider=e,this.promise=n}function v$F(e,t,i,n){if(o$1q.defined("context",e),!t||0===t.length)throw new t$15("At least one attribute is required.");var r=v$F._verifyAttributes(t);i=u$Z(i,0);for(var o,a,s=[],l={},u=r.length,c=0;c<u;++c){var h=r[c];h.vertexBuffer?s.push(h):(e$2e(o=l[a=h.usage])||(o=l[a]=[]),o.push(h))}function d(e,t){return S$14.getSizeInBytes(t.componentDatatype)-S$14.getSizeInBytes(e.componentDatatype)}for(a in this._allBuffers=[],l)if(l.hasOwnProperty(a)){(o=l[a]).sort(d);var f=v$F._vertexSizeInBytes(o),p={vertexSizeInBytes:f,vertexBuffer:void 0,usage:o[0].usage,needsCommit:!1,arrayBuffer:void 0,arrayViews:v$F._createArrayViews(o,f)};this._allBuffers.push(p)}this._size=0,this._instanced=u$Z(n,!1),this._precreated=s,this._context=e,this.writers=void 0,this.va=void 0,this.resize(i)}M$S.prototype.pick=function(e){var t=Ke$c(e,this.innerLayer._imageryCache);if(null!=t&&e$2e(t.featureIndex)){var i=[];i.push(ce$r(e.longitude,e.latitude,t));var n={};for(var r in this._MVTStyle._layers){var o=this._MVTStyle._layers[r];e$2e(o)&&(e$2e(o.visibility)?"none"!=o.visibility&&(n[r]=o):n[r]=o)}var a=null;if(e$2e(t.frameState)){var s=t.frameState.camera;e$2e(s)&&e$2e(s.zoomLevel)&&s.zoomLevel!=1/0&&(a=s.zoomLevel)}var l={realtime:this.realtime,zoom:a,selectTolerance:this.selectTolerance},u=t.queryRenderedFeatures(n,i,l);if(this._MVTStyle.setHighLight(u,this),e$2e(u))return Object.keys(u).length>0?u:void 0}},M$S.prototype.queryRenderedFeatures=function(e,t){var i=[],n=je$e(e,this.innerLayer._imageryCache,this);if(!e$2e(n))return i;for(var r,o,a,s=0;s<n.length;s++){var l=n[s],u=[];for(r=0,a=e.length;r<a;r++)u.push(ce$r(e[r].longitude,e[r].latitude,l));i.push(l.queryRenderedFeatures(this._MVTStyle._layers,u,t))}var c=[],h=[];for(r=0,a=i.length;r<a;r++){var d=i[r];for(var f in d){var p=d[f];for(o=0;o<p.length;o++)-1==h.indexOf(p[o].feature.id)&&(c.push(p[o]),h.push(p[o].feature.id))}}return c},M$S.prototype.onAlphaChanged=function(){this._painter.alpha=this.innerLayer.alpha;let e=this.innerLayer._imageryCache;for(let t in e)e[t].onAlphaChanged()},M$S.prototype.querySourceFeatures=function(e){var t=[];if("string"==typeof e.filter[2]&&e.filter[2].indexOf("%")>-1){var i=this._viewer.scene.camera.computeViewRectangle();if(!e$2e(i))return t;for(var n=h$18.southwest(i),r=h$18.southeast(i),o=h$18.northeast(i),a=h$18.northwest(i),s=this.queryRenderedFeatures([n,r,o,a],{layers:[e.sourceLayer]}),l=_0x51a3ff.createFilter(e&&e.filter),u=0;u<s.length;u++){var c=s[u].feature;l(new _0x47eac1(0),c)&&t.push(c)}}else{var h=this.innerLayer._imageryCache;for(var d in h){h[d].querySourceFeatures(e,t)}}return t},e$1e.prototype.free=function(){delete this.provider.blockCache[this.quadKey]},v$F._verifyAttributes=function(e){for(var t=[],i=0;i<e.length;++i){var n=e[i],r={index:u$Z(n.index,i),name:u$Z(n.name,""),enabled:u$Z(n.enabled,!0),componentsPerAttribute:n.componentsPerAttribute,componentDatatype:u$Z(n.componentDatatype,S$14.FLOAT),normalize:u$Z(n.normalize,!1),vertexBuffer:n.vertexBuffer,usage:u$Z(n.usage,A$18.STATIC_DRAW)};if(t.push(r),1!==r.componentsPerAttribute&&2!==r.componentsPerAttribute&&3!==r.componentsPerAttribute&&4!==r.componentsPerAttribute)throw new t$15("attribute.componentsPerAttribute must be in the range [1, 4].");var o=r.componentDatatype;if(!S$14.validate(o))throw new t$15("Attribute must have a valid componentDatatype or not specify it.");if(!A$18.validate(r.usage))throw new t$15("Attribute must have a valid usage or not specify it.")}for(var a=new Array(t.length),s=0;s<t.length;++s){var l=t[s].index;if(a[l])throw new t$15("Index "+l+" is used by more than one attribute.");a[l]=!0}return t},v$F._vertexSizeInBytes=function(e){for(var t=0,i=e.length,n=0;n<i;++n){var r=e[n];t+=r.componentsPerAttribute*S$14.getSizeInBytes(r.componentDatatype)}var o=i>0?S$14.getSizeInBytes(e[0].componentDatatype):0,a=o>0?t%o:0;return t+=0===a?0:o-a},v$F._createArrayViews=function(e,t){for(var i=[],n=0,r=e.length,o=0;o<r;++o){var a=e[o],s=a.componentDatatype;i.push({index:a.index,name:a.name,enabled:a.enabled,componentsPerAttribute:a.componentsPerAttribute,componentDatatype:s,normalize:a.normalize,offsetInBytes:n,vertexSizeInComponentType:t/S$14.getSizeInBytes(s),view:void 0}),n+=a.componentsPerAttribute*S$14.getSizeInBytes(s)}return i},v$F.prototype.resize=function(e){this._size=e;var t=this._allBuffers;this.writers=[];for(var i=0,n=t.length;i<n;++i){var r=t[i];v$F._resize(r,this._size),v$F._appendWriters(this.writers,r)}B$O(this)},v$F._resize=function(e,t){if(e.vertexSizeInBytes>0){var i=new ArrayBuffer(t*e.vertexSizeInBytes);if(e$2e(e.arrayBuffer))for(var n=new Uint8Array(i),r=new Uint8Array(e.arrayBuffer),o=r.length,a=0;a<o;++a)n[a]=r[a];for(var s=e.arrayViews,l=s.length,u=0;u<l;++u){var c=s[u];c.view=S$14.createArrayBufferView(c.componentDatatype,i,c.offsetInBytes)}e.arrayBuffer=i}};var T$P=[function(e,t,i){return function(n,r){t[n*i]=r,e.needsCommit=!0}},function(e,t,i){return function(n,r,o){var a=n*i;t[a]=r,t[a+1]=o,e.needsCommit=!0}},function(e,t,i){return function(n,r,o,a){var s=n*i;t[s]=r,t[s+1]=o,t[s+2]=a,e.needsCommit=!0}},function(e,t,i){return function(n,r,o,a,s){var l=n*i;t[l]=r,t[l+1]=o,t[l+2]=a,t[l+3]=s,e.needsCommit=!0}}];function U$Q(e,t){if(t.needsCommit&&t.vertexSizeInBytes>0){t.needsCommit=!1;var i=t.vertexBuffer,n=e._size*t.vertexSizeInBytes,r=e$2e(i);if(!r||i.sizeInBytes<n)return r&&i.destroy(),t.vertexBuffer=t$X.createVertexBuffer({context:e._context,typedArray:t.arrayBuffer,usage:t.usage}),t.vertexBuffer.vertexArrayDestroyable=!1,!0;t.vertexBuffer.copyFromArrayView(t.arrayBuffer)}return!1}function O$E(e,t,i){if(e.needsCommit&&e.vertexSizeInBytes>0){var n=e.vertexSizeInBytes*t,r=e.vertexSizeInBytes*i;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,n,r),n)}}function B$O(e){var t=e.va;if(e$2e(t)){for(var i=t.length,n=0;n<i;++n)t[n].va.destroy();e.va=void 0}}v$F._appendWriters=function(e,t){for(var i=t.arrayViews,n=i.length,r=0;r<n;++r){var o=i[r];e[o.index]=T$P[o.componentsPerAttribute-1](t,o.view,o.vertexSizeInComponentType)}},v$F.prototype.commit=function(e){var t,i,n,r=!1,o=this._allBuffers;for(i=0,n=o.length;i<n;++i)r=U$Q(this,t=o[i])||r;if(r||!e$2e(this.va)){B$O(this);for(var a=this.va=[],s=e$2e(e)?Math.ceil(this._size/(e$2d.SIXTY_FOUR_KILOBYTES-1)):1,l=0;l<s;++l){var u=[];for(i=0,n=o.length;i<n;++i){var c=l*((t=o[i]).vertexSizeInBytes*(e$2d.SIXTY_FOUR_KILOBYTES-1));v$F._appendAttributes(u,t,c,this._instanced)}u=u.concat(this._precreated),a.push({va:new c$13({context:this._context,attributes:u,indexBuffer:e}),indicesCount:1.5*(l!==s-1?e$2d.SIXTY_FOUR_KILOBYTES-1:this._size%(e$2d.SIXTY_FOUR_KILOBYTES-1))})}}},v$F._appendAttributes=function(e,t,i,n){for(var r=t.arrayViews,o=r.length,a=0;a<o;++a){var s=r[a];e.push({index:s.index,name:s.name,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:s.componentDatatype,normalize:s.normalize,vertexBuffer:t.vertexBuffer,offsetInBytes:i+s.offsetInBytes,strideInBytes:t.vertexSizeInBytes,instanceDivisor:n?1:0})}},v$F.prototype.subCommit=function(e,t){if(e<0||e>=this._size)throw new t$15("offsetInVertices must be greater than or equal to zero and less than the vertex array size.");if(e+t>this._size)throw new t$15("offsetInVertices + lengthInVertices cannot exceed the vertex array size.");for(var i=this._allBuffers,n=0,r=i.length;n<r;++n)O$E(i[n],e,t)},v$F.prototype.endSubCommits=function(){for(var e=this._allBuffers,t=0,i=e.length;t<i;++t)e[t].needsCommit=!1},v$F.prototype.isDestroyed=function(){return!1},v$F.prototype.destroy=function(){for(var e=this._allBuffers,t=0,i=e.length;t<i;++t){var n=e[t];n.vertexBuffer=n.vertexBuffer&&n.vertexBuffer.destroy()}return B$O(this),i$11(this)};var Lt$6="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D u_atlas;\n#ifdef APPLY_SWIPE\nuniform vec4 uSwipeRegion;\n#endif\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvarying float v_depth;\nvarying vec2 v_textureCoordinates;\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed;\nvarying mat2 v_rotationMatrix;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT1 = 2.0;\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\nfloat getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, vec2 dimensions, vec2 imageSize)\n{\nvec2 lookupVector = imageSize * (depthLookupST - adjustedST);\nlookupVector = v_rotationMatrix * lookupVector;\nvec2 labelOffset = (dimensions - imageSize) * (depthLookupST - vec2(0.0, v_originTextureCoordinateAndTranslate.y));\nvec2 translation = v_originTextureCoordinateAndTranslate.zw;\nif (applyTranslate)\n{\ntranslation += (dimensions * v_originTextureCoordinateAndTranslate.xy * vec2(1.0, 0.0));\n}\nvec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw;\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, st));\nif (logDepthOrDepth == 0.0)\n{\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\n#ifdef SDF\nfloat getDistance(vec2 position)\n{\n#if defined(MVT) && !defined(WEBGPU)\nreturn texture2D(u_atlas, position).a;\n#else\nreturn texture2D(u_atlas, position).r;\n#endif\n}\nvec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)\n{\nfloat distance = getDistance(position);\nif (outlineWidth > 0.0)\n{\nfloat outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);\nfloat outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\nvec4 sdfColor = mix(outlineColor, v_color, outlineFactor);\nfloat alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);\nreturn vec4(sdfColor.rgb, sdfColor.a * alpha);\n}\nelse\n{\nfloat alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\nreturn vec4(v_color.rgb, v_color.a * alpha);\n}\n}\n#endif\nvoid main()\n{\n#ifdef APPLY_SWIPE\nczm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\nvec4 color = texture2D(u_atlas, v_textureCoordinates);\n#ifdef SDF\nfloat outlineWidth = v_outlineWidth;\nvec4 outlineColor = v_outlineColor;\nfloat distance = getDistance(v_textureCoordinates);\n#if defined(GL_OES_standard_derivatives) || defined(WEBGL2) || defined(WEBGPU)\nfloat smoothing = fwidth(distance);\nvec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));\nvec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\nvec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\ncolor = (center + color1 + color2 + color3 + color4)/5.0;\n#else\nfloat smoothing = 1.0/32.0;\ncolor = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n#endif\ncolor = czm_gammaCorrect(color);\n#else\ncolor = czm_gammaCorrect(color);\ncolor *= czm_gammaCorrect(v_color);\n#endif\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\nif (color.a < 0.005)\n{\ndiscard;\n}\n#else\n#ifdef OPAQUE\nif (color.a < 0.995)\n{\ndiscard;\n}\n#else\nif (color.a >= 0.995)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef VECTOR_TILE\ncolor *= u_highlightColor;\n#endif\n#ifdef PARTICLESYSTEM\n#ifdef LOG_DEPTH\nfloat fDepth = log2(v_depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\nfloat fDepth = gl_FragCoord.z;\n#endif\ngl_FragColor = vec4(fDepth, fDepth * fDepth, 1.0, 1.0);\n#else\ngl_FragColor = color;\n#endif\n#ifdef LOG_DEPTH\nczm_writeLogDepth();\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nfloat temp = v_compressed.y;\ntemp = temp * SHIFT_RIGHT1;\nfloat temp2 = (temp - floor(temp)) * SHIFT_LEFT1;\nbool enableDepthTest = temp2 != 0.0;\nbool applyTranslate = floor(temp) != 0.0;\nif (enableDepthTest) {\ntemp = v_compressed.z;\ntemp = temp * SHIFT_RIGHT12;\nvec2 dimensions;\ndimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\ndimensions.x = floor(temp);\ntemp = v_compressed.w;\ntemp = temp * SHIFT_RIGHT12;\nvec2 imageSize;\nimageSize.y = (temp - floor(temp)) * SHIFT_LEFT12;\nimageSize.x = floor(temp);\nvec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy;\nadjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y);\nfloat epsilonEyeDepth = v_compressed.x + czm_epsilon1;\nfloat globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize);\nif (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth)\n{\nfloat globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize);\nif (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth)\n{\nfloat globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize);\nif (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth)\n{\ndiscard;\n}\n}\n}\n}\n#endif\n}\n",Vt$7="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nattribute vec4 compressedAttribute0;\nattribute vec4 compressedAttribute1;\nattribute vec4 compressedAttribute2;\nattribute vec4 eyeOffset;\nattribute vec4 scaleByDistance;\nattribute vec4 pixelOffsetScaleByDistance;\nattribute vec4 compressedAttribute3;\nattribute vec2 sdf;\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\nattribute vec4 textureCoordinateBoundsOrLabelTranslate;\n#endif\n#ifdef VECTOR_TILE\nattribute float a_batchId;\n#endif\n#ifdef MVT\nattribute vec4 a_fade_opacity;\n#endif\nuniform float u_eyeOffsetZ;\nuniform float u_fade_change;\nvarying float v_depth;\nvarying vec2 v_textureCoordinates;\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed;\nvarying mat2 v_rotationMatrix;\n#endif\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\nconst float UPPER_BOUND = 32768.0;\nconst float SHIFT_LEFT16 = 65536.0;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_LEFT7 = 128.0;\nconst float SHIFT_LEFT5 = 32.0;\nconst float SHIFT_LEFT3 = 8.0;\nconst float SHIFT_LEFT2 = 4.0;\nconst float SHIFT_LEFT1 = 2.0;\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT7 = 1.0 / 128.0;\nconst float SHIFT_RIGHT5 = 1.0 / 32.0;\nconst float SHIFT_RIGHT3 = 1.0 / 8.0;\nconst float SHIFT_RIGHT2 = 1.0 / 4.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)\n{\nvec2 halfSize = imageSize * scale * 0.5;\nhalfSize *= ((direction * 2.0) - 1.0);\nvec2 originTranslate = origin * abs(halfSize);\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nif (validAlignedAxis || rotation != 0.0)\n{\nfloat angle = rotation;\nif (validAlignedAxis)\n{\nvec4 projectedAlignedAxis = czm_modelViewProjection * vec4(alignedAxis, 0.0);\nangle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /\n(projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));\n}\nfloat cosTheta = cos(angle);\nfloat sinTheta = sin(angle);\nrotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\nhalfSize = rotationMatrix * halfSize;\n}\nelse\n{\nrotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n}\n#endif\nmpp = czm_metersPerPixel(positionEC);\n#ifdef FixedXYZ\nvec4 origViewPos = czm_view * vec4(0.0, 0.0, 0.0, 1.0);\nvec4 fixedAxis = positionEC - origViewPos;\nvec3 zAxis = normalize(fixedAxis.xyz);\nvec3 upViewVector = vec3(0.0, 1.0, 0.0);\nvec3 xAxis = normalize(cross(upViewVector, zAxis));\nvec3 yAxis = cross(zAxis, xAxis);\nyAxis = normalize(yAxis);\nmat3 matrix = mat3(xAxis,yAxis,zAxis);\nvec3 tmp = matrix * vec3((originTranslate + halfSize + translate + pixelOffset), 0.0);\ntmp *= czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\npositionEC.xy += tmp.xy;\n#else\npositionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\npositionEC.xy += (translate + pixelOffset) * mpp;\n#endif\nreturn positionEC;\n}\n#ifdef VERTEX_DEPTH_CHECK\nfloat getGlobeDepth(vec4 positionEC)\n{\nvec4 posWC = czm_eyeToWindowCoordinates(positionEC);\nfloat globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\nif (globeDepth == 0.0)\n{\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\nvoid main()\n{\nvec3 positionHigh = positionHighAndScale.xyz;\nvec3 positionLow = positionLowAndRotation.xyz;\nfloat scale = positionHighAndScale.w;\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nfloat rotation = positionLowAndRotation.w;\n#else\nfloat rotation = 0.0;\n#endif\nfloat compressed = compressedAttribute0.x;\nvec2 pixelOffset;\npixelOffset.x = floor(compressed * SHIFT_RIGHT7);\ncompressed -= pixelOffset.x * SHIFT_LEFT7;\npixelOffset.x -= UPPER_BOUND;\nvec2 origin;\norigin.x = floor(compressed * SHIFT_RIGHT5);\ncompressed -= origin.x * SHIFT_LEFT5;\norigin.y = floor(compressed * SHIFT_RIGHT3);\ncompressed -= origin.y * SHIFT_LEFT3;\n#ifdef FRAGMENT_DEPTH_CHECK\nvec2 depthOrigin = origin.xy;\n#endif\norigin -= vec2(1.0);\nfloat show = floor(compressed * SHIFT_RIGHT2);\ncompressed -= show * SHIFT_LEFT2;\n#ifdef INSTANCED\nvec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\nvec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\n#ifdef MVT\nvec2 textureCoordinates;\ntextureCoordinates.x = textureCoordinatesBottomLeft.x + direction.x * textureCoordinatesRange.x;\ntextureCoordinates.y = textureCoordinatesBottomLeft.y - direction.y * textureCoordinatesRange.y;\n#else\nvec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n#endif\n#else\nvec2 direction;\ndirection.x = floor(compressed * SHIFT_RIGHT1);\ndirection.y = compressed - direction.x * SHIFT_LEFT1;\nvec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n#endif\nfloat temp = compressedAttribute0.y * SHIFT_RIGHT8;\npixelOffset.y = -(floor(temp) - UPPER_BOUND);\nvec2 translate;\ntranslate.y = (temp - floor(temp)) * SHIFT_LEFT16;\ntemp = compressedAttribute0.z * SHIFT_RIGHT8;\ntranslate.x = floor(temp) - UPPER_BOUND;\ntranslate.y += (temp - floor(temp)) * SHIFT_LEFT8;\ntranslate.y -= UPPER_BOUND;\ntemp = compressedAttribute1.x * SHIFT_RIGHT8;\nfloat temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);\nvec2 imageSize = vec2(floor(temp), temp2);\n#ifdef FRAGMENT_DEPTH_CHECK\nfloat labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));\nfloat applyTranslate = 0.0;\nif (labelHorizontalOrigin != 0.0)\n{\napplyTranslate = 1.0;\nlabelHorizontalOrigin -= 2.0;\ndepthOrigin.x = labelHorizontalOrigin + 1.0;\n}\ndepthOrigin = vec2(1.0) - (depthOrigin * 0.5);\n#endif\n#ifdef EYE_DISTANCE_TRANSLUCENCY\nvec4 translucencyByDistance;\ntranslucencyByDistance.x = compressedAttribute1.z;\ntranslucencyByDistance.z = compressedAttribute1.w;\ntranslucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\ntemp = compressedAttribute1.y * SHIFT_RIGHT8;\ntranslucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\ntemp = compressedAttribute3.w;\ntemp = temp * SHIFT_RIGHT12;\nvec2 dimensions;\ndimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\ndimensions.x = floor(temp);\n#endif\n#ifdef ALIGNED_AXIS\nvec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\ntemp = compressedAttribute2.z * SHIFT_RIGHT5;\nbool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n#else\nvec3 alignedAxis = vec3(0.0);\nbool validAlignedAxis = false;\n#endif\nvec4 pickColor;\nvec4 color;\ntemp = compressedAttribute2.y;\ntemp = temp * SHIFT_RIGHT8;\npickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor.r = floor(temp);\ntemp = compressedAttribute2.x;\ntemp = temp * SHIFT_RIGHT8;\ncolor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\ncolor.g = (temp - floor(temp)) * SHIFT_LEFT8;\ncolor.r = floor(temp);\ntemp = compressedAttribute2.z * SHIFT_RIGHT8;\nbool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor /= 255.0;\ncolor.a = floor(temp);\ncolor /= 255.0;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\n#if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK)\nfloat eyeDepth = positionEC.z;\n#endif\n#ifdef MVT\nvec2 fade_opacity = a_fade_opacity.xy;\nfloat placed = fade_opacity.x;\nfloat fade_change = placed > 0.5 ? u_fade_change : -u_fade_change;\nfloat interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity.y + fade_change));\ncolor.a *= interpolated_fade_opacity;\nvec3 realEyeOffset = eyeOffset.xyz;\nfloat meterPerPixel = czm_metersPerPixel(positionEC);\nrealEyeOffset.y = meterPerPixel * eyeOffset.y;\nrealEyeOffset.z = u_eyeOffsetZ;\npositionEC = czm_eyeOffset(positionEC, realEyeOffset.xyz);\nif (interpolated_fade_opacity == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#else\npositionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\n#endif\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nlengthSq = dot(positionEC.xyz, positionEC.xyz);\n}\n#endif\n#ifdef EYE_DISTANCE_SCALING\nfloat distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);\nscale *= distanceScale;\ntranslate *= distanceScale;\nif (scale == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\nfloat translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\ntranslucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\nif (translucency == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\n#ifdef EYE_DISTANCE_PIXEL_OFFSET\nfloat pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\npixelOffset *= pixelOffsetScale;\n#endif\n#ifdef DISTANCE_DISPLAY_CONDITION\nfloat nearSq = compressedAttribute3.x;\nfloat farSq = compressedAttribute3.y;\nif (lengthSq < nearSq || lengthSq > farSq)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\nmat2 rotationMatrix;\nfloat mpp;\n#ifdef DISABLE_DEPTH_DISTANCE\nfloat disableDepthTestDistance = compressedAttribute3.z;\n#endif\n#ifdef VERTEX_DEPTH_CHECK\nif (lengthSq < disableDepthTestDistance) {\nfloat depthsilon = 10.0;\nvec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy;\nvec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth1 = getGlobeDepth(pEC1);\nif (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)\n{\nvec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth2 = getGlobeDepth(pEC2);\nif (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)\n{\nvec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth3 = getGlobeDepth(pEC3);\nif (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)\n{\npositionEC.xyz = vec3(0.0);\n}\n}\n}\n}\n#endif\npositionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\npositionEC.xyz *= show;\ngl_Position = czm_projection * positionEC;\nv_textureCoordinates = textureCoordinates;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth();\nv_depth = 1.0 - czm_currentFrustum.x + gl_Position.w;\n#endif\n#ifdef DISABLE_DEPTH_DISTANCE\nif (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n{\ndisableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n}\nif (disableDepthTestDistance != 0.0)\n{\nfloat zclip = gl_Position.z / gl_Position.w;\n#ifdef WEBGPU\nbool clipped = (zclip < 0.0 || zclip > 1.0);\n#else\nbool clipped = (zclip < -1.0 || zclip > 1.0);\n#endif\nif (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n{\n#ifdef WEBGPU\ngl_Position.z = 0.0;\n#else\ngl_Position.z = -gl_Position.w;\n#endif\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = 1.0;\n#endif\n}\n}\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nif (sizeInMeters) {\ntranslate /= mpp;\ndimensions /= mpp;\nimageSize /= mpp;\n}\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nv_rotationMatrix = rotationMatrix;\n#else\nv_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n#endif\nfloat enableDepthCheck = 0.0;\nif (lengthSq < disableDepthTestDistance)\n{\nenableDepthCheck = 1.0;\n}\nfloat dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12));\nfloat dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12));\nfloat iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12));\nfloat ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12));\nv_compressed.x = eyeDepth;\nv_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck;\nv_compressed.z = dw * SHIFT_LEFT12 + dh;\nv_compressed.w = iw * SHIFT_LEFT12 + ih;\nv_originTextureCoordinateAndTranslate.xy = depthOrigin;\nv_originTextureCoordinateAndTranslate.zw = translate;\nv_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate;\n#endif\n#ifdef SDF\nvec4 outlineColor;\nfloat outlineWidth;\ntemp = sdf.x;\ntemp = temp * SHIFT_RIGHT8;\noutlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.r = floor(temp);\ntemp = sdf.y;\ntemp = temp * SHIFT_RIGHT8;\nfloat temp3 = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.a = floor(temp);\noutlineColor /= 255.0;\nv_outlineWidth = outlineWidth / 255.0;\nv_outlineColor = outlineColor;\n#endif\nv_pickColor = pickColor;\nv_color = color;\nv_color.a *= translucency;\n}\n",e$1d={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2},S$L=Object.freeze(e$1d),e$1c={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},V$L=Object.freeze(e$1c);function O$D(e,t,i,n,r){return new F$V(e,t,i,n,r)}function F$V(e,t,i,n,r){t=t||P$O,i=i||Q$Q,r=r||Array,this.nodeSize=n||64,this.points=e,this.ids=new r(e.length),this.coords=new r(2*e.length);for(var o=0;o<e.length;o++)this.ids[o]=o,this.coords[2*o]=t(e[o]),this.coords[2*o+1]=i(e[o]);K$L(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function P$O(e){return e[0]}function Q$Q(e){return e[1]}function J$M(e,t,i,n,r,o){var a=r-i,s=o-n,l={x:e-.5*a,y:t-.5*s,width:a,height:s},u={x:i,y:n,width:a,height:s},c=l.x,h=l.y,d=u.x,f=u.y;return!(c>d+u.width||c+l.width<d||h+l.height<f||h>f+u.height)}function R$P(e,t,i,n,r,o,a,s,l,u,c){for(var h,d,f=[0,e.length-1,0],p=[];f.length;){var _=f.pop(),m=f.pop(),g=f.pop(),x=void 0;if(m-g<=a)for(var y=g;y<=m;y++)h=t[2*y],d=t[2*y+1],void 0!==s&&s.length>y&&(x=l(s[e[y]])),void 0!==u?u(h,d,i,n,r,o,s[e[y]],x,c)&&p.push(e[y]):J$M(h,d,i,n,r,o)&&p.push(e[y]);else{var v=Math.floor((g+m)/2);h=t[2*v],d=t[2*v+1],void 0!==s&&s.length>v&&(x=l(s[e[v]])),void 0!==u?u(h,d,i,n,r,o,s[e[v]],x,c)&&p.push(e[v]):J$M(h,d,i,n,r,o)&&p.push(e[v]);var $=(_+1)%2;(0===_?i<=h:n<=d)&&(f.push(g),f.push(v-1),f.push($)),(0===_?r>=h:o>=d)&&(f.push(v+1),f.push(m),f.push($))}}return p}function U$P(e,t,i,n,r,o,a){for(var s,l,u=[0,e.length-1,0],c=[];u.length;){var h=u.pop(),d=u.pop(),f=u.pop();if(d-f<=a)for(var p=f;p<=d;p++)s=t[2*p],l=t[2*p+1],s>=i&&s<=r&&l>=n&&l<=o&&c.push(e[p]);else{var _=Math.floor((f+d)/2);s=t[2*_],l=t[2*_+1],s>=i&&s<=r&&l>=n&&l<=o&&c.push(e[_]);var m=(h+1)%2;(0===h?i<=s:n<=l)&&(u.push(f),u.push(_-1),u.push(m)),(0===h?r>=s:o>=l)&&(u.push(_+1),u.push(d),u.push(m))}}return c}function K$L(e,t,i,n,r,o){if(!(r-n<=i)){var a=Math.floor((n+r)/2);L$Z(e,t,a,n,r,o%2),K$L(e,t,i,n,a-1,o+1),K$L(e,t,i,a+1,r,o+1)}}function L$Z(e,t,i,n,r,o){for(;r>n;){if(r-n>600){var a=r-n+1,s=i-n+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);L$Z(e,t,i,Math.max(n,Math.floor(i-s*u/a+c)),Math.min(r,Math.floor(i+(a-s)*u/a+c)),o)}var h=t[2*i+o],d=n,f=r;for(B$N(e,t,n,i),t[2*r+o]>h&&B$N(e,t,n,r);d<f;){for(B$N(e,t,d,f),d++,f--;t[2*d+o]<h;)d++;for(;t[2*f+o]>h;)f--}t[2*n+o]===h?B$N(e,t,n,f):B$N(e,t,++f,r),f<=i&&(n=f+1),i<=f&&(r=f-1)}}function B$N(e,t,i,n){C$T(e,i,n),C$T(t,2*i,2*n),C$T(t,2*i+1,2*n+1)}function C$T(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function V$K(e,t,i,n,r,o){for(var a=[0,e.length-1,0],s=[],l=r*r;a.length;){var u=a.pop(),c=a.pop(),h=a.pop();if(c-h<=o)for(var d=h;d<=c;d++)N$K(t[2*d],t[2*d+1],i,n)<=l&&s.push(e[d]);else{var f=Math.floor((h+c)/2),p=t[2*f],_=t[2*f+1];N$K(p,_,i,n)<=l&&s.push(e[f]);var m=(u+1)%2;(0===u?i-r<=p:n-r<=_)&&(a.push(h),a.push(f-1),a.push(m)),(0===u?i+r>=p:n+r>=_)&&(a.push(f+1),a.push(c),a.push(m))}}return s}function N$K(e,t,i,n){var r=e-i,o=t-n;return r*r+o*o}F$V.prototype={range:function(e,t,i,n){return U$P(this.ids,this.coords,e,t,i,n,this.nodeSize)},within:function(e,t,i){return V$K(this.ids,this.coords,e,t,i,this.nodeSize)},intersect:function(e,t,i,n,r,o,a,s){return R$P(this.ids,this.coords,e,t,i,n,this.nodeSize,r,o,a,s)}};var _0x325d8b=(_0x219d28=!0,function(e,t){var i=_0x219d28?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x219d28=!1,i}),_0x3fcd1b=_0x325d8b(void 0,(function(){return _0x3fcd1b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3fcd1b).search("(((.+)+)+)+$")})),_0x219d28;_0x3fcd1b();var X$O="\nattribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute float aColor;\nuniform float uLineWidth;\nvarying float vColor;\n\nfloat computerOnePixelLength()\n{\n\tvec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tvec4 winPos = czm_projection * viewPos;\n\tfloat dwidth = czm_metersPerPixel(viewPos);\n\twinPos.x = winPos.x - 2.0 * dwidth;\n\tvec4 newViewPos = czm_inverseProjection * winPos;\n\treturn length(viewPos - newViewPos);\n}\nvoid main()\n{\n bool bUsePre = aTexCoord0.x < 0.1;\n float offset = bUsePre ? -uLineWidth : uLineWidth;\n vec4 viewPos1 = czm_modelView * vec4(aPosition.xyz, 1.0);\n\tviewPos1.x = viewPos1.x + offset * computerOnePixelLength();\n\tgl_Position = czm_projection * viewPos1;\n\tvColor = aColor;\n}";function _$K(e){this._point3Ds={},this._points=[],this._style=void 0,this._billboardCollection=void 0,this._isInitialize=!1,this._pointsChanged=!0,this._colorCommand=void 0,this._worldMatrix=p$1d.clone(p$1d.IDENTITY),this._boundingSphere=new i$1d,this._isVisible=!1,this._frameState=void 0,this._colors=void 0,this._isUpdateColor=!1}function G$$(e,t,i){A$Y(e);var n=q$X(e,i.mode);H$V(e),Y$G(e,t,n),e._isInitialize=!0}function A$Y(e){e$2e(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0)}function Y$G(e,t,i){A$Y(e);var n=t$X.createVertexBuffer({context:t,typedArray:i.vertices,usage:A$18.STATIC_DRAW}),r=t$X.createVertexBuffer({context:t,typedArray:i.texcoords,usage:A$18.STATIC_DRAW}),o=t$X.createVertexBuffer({context:t,typedArray:i.colors,usage:A$18.STATIC_DRAW}),a=[],s={aPosition:0,aTexCoord0:1,aColor:2};a.push({index:s.aPosition,vertexBuffer:n,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),a.push({index:s.aTexCoord0,vertexBuffer:r,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),a.push({index:s.aColor,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:S$14.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:1,normalize:!1});var l=t$X.createIndexBuffer({context:t,typedArray:i.indexPackage,usage:A$18.STATIC_DRAW,indexDatatype:i.indexDataType});e._colorCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.S3MTiles,owner:e}),e._colorCommand.vertexArray=new c$13({context:t,attributes:a,indexBuffer:l});var u=new s$V({sources:[X$O]}),c=new s$V({sources:["uniform vec4 uFillColor;\nvarying float vColor;\nvoid main()\n{\n if(vColor < 0.1)\n {\n discard;\n return;\n }\n gl_FragColor = uFillColor;\n}\n"]});e._colorCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:s}),e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),e._colorCommand.uniformMap={uLineWidth:function(){return e._style._calloutWidth},uFillColor:function(){return e._style._calloutColor}}}function q$X(e){for(var t=0,i=0,n=0,r=0,o=2*e._points.length,a=S$14.createTypedArray(S$14.FLOAT,3*o),s=S$14.createTypedArray(S$14.FLOAT,2*o),l=new Uint8Array(o),u=o/2*3,c=o>65535?ce$z.UNSIGNED_INT:ce$z.UNSIGNED_SHORT,h=S$14.createTypedArray(c,u),d=0;d<e._points.length/2;d++){var f=e._points[2*d],p=e._points[2*d+1],_=t/3;a[t++]=p.x,a[t++]=p.y,a[t++]=p.z;var m=t/3;a[t++]=p.x,a[t++]=p.y,a[t++]=p.z;var g=t/3;a[t++]=f.x,a[t++]=f.y,a[t++]=f.z;var x=t/3;a[t++]=f.x,a[t++]=f.y,a[t++]=f.z,s[i++]=0,s[i++]=0,s[i++]=1,s[i++]=0,s[i++]=1,s[i++]=1,s[i++]=0,s[i++]=1,h[n++]=_,h[n++]=m,h[n++]=g,h[n++]=_,h[n++]=g,h[n++]=x}for(d=0;d<o;d++)l[r++]=255;return e._colors=l,{vertices:a,texcoords:s,colors:l,indexPackage:h,indexDataType:c}}function H$V(e,t){for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0;l<e._points.length;l++){var u=e._points[l];n=Math.max(n,u.x),i=Math.min(i,u.x),o=Math.max(o,u.y),r=Math.min(r,u.y),s=Math.max(s,u.z),a=Math.min(a,u.z)}SuperMap3D.Math.equalsEpsilon(n,i,SuperMap3D.Math.EPSILON6)&&(n=i+.1),SuperMap3D.Math.equalsEpsilon(o,r,SuperMap3D.Math.EPSILON6)&&(o=r+.1),SuperMap3D.Math.equalsEpsilon(s,a,SuperMap3D.Math.EPSILON6)&&(s=a+.1);var c=new o$1p((n+i)/2,(o+r)/2,(s+a)/2),h=Math.max(Math.max(s-a,o-r),n-i);e._boundingSphere=new i$1d(c,h/2)}function E$T(e){if(e._pointsChanged){if(e._points=[],e._frameState.mode===C$14.SCENE3D)for(var t in e._point3Ds)for(var i=e._point3Ds[t],n=0;n<i.length;n++){var r=i[n].position,o=new o$1p;o$1p.normalize(r,o),o$1p.multiplyByScalar(o,6378137,o),i[n].dataIndex=2*e._points.length,e._points.push(r),e._points.push(o)}else for(var t in e._point3Ds)for(i=e._point3Ds[t],n=0;n<i.length;n++){o=new o$1p((r=i[n].position).x,r.y,0);i[n].dataIndex=2*e._points.length,e._points.push(r),e._points.push(o)}e._pointsChanged=!1}}function Z$O(e){if(e._isUpdateColor&&e$2e(e._colors)){for(var t in e._point3Ds)for(var i=e._point3Ds[t],n=0;n<i.length;n++){var r=i[n].dataIndex;e._colors[r]=i[n].show?255:0,e._colors[r+1]=e._colors[r],e._colors[r+2]=e._colors[r],e._colors[r+3]=e._colors[r]}e._colorCommand.vertexArray.getAttribute(2).vertexBuffer.copyFromArrayView(e._colors),e._isUpdateColor=!1}}Object.defineProperties(_$K.prototype,{style:{get:function(){return this._style},set:function(e){this._style=e}},count:{get:function(){return this._points.length}},isVisible:{get:function(){return this._isVisible},set:function(e){this._isVisible=e}}}),_$K.prototype.destroy=function(){return A$Y(this),i$11(this)},_$K.prototype.addPoint=function(e,t,i){var n={id:e,position:o$1p.clone(i),index:t,dataIndex:0,show:!0};e$2e(this._point3Ds[e])||(this._point3Ds[e]=[]),this._point3Ds[e].push(n),this._isInitialize=!1,this._pointsChanged=!0},_$K.prototype.remove=function(e,t){var i=this.getByID(e);if(null!=i){for(var n=0;n<i.length;n++)i[n].index===t&&(delete i[n],i[n]=null);var r=[];for(n=0;n<i.length;n++)null!==i[n]&&r.push(i[n]);0===r.length?delete this._point3Ds[e]:this._point3Ds[e]=r}this._pointsChanged=!0,this._isInitialize=!0},_$K.prototype.getByID=function(e){return e$2e(this._point3Ds[e])?this._point3Ds[e]:null},_$K.prototype._setVisibleByID=function(e,t,i){if(E$T(this),!e$2e(this._point3Ds[e])||0===this._point3Ds[e].length)return null;for(var n=this._point3Ds[e],r=0;r<n.length;r++)n[r].index===t&&n[r].show!==i&&(n[r].show=i,this._isUpdateColor=!0)},_$K.prototype._updateIndex=function(e,t,i){var n=this._point3Ds[e];if(e$2e(n))for(var r=0;r<n.length;r++)n[r].index===t&&(n[r].index=i)},_$K.prototype.update=function(e,t,i){this._frameState=t,this._pointsChanged&&E$T(this),0!==this._points.length&&this._points.length%2==0&&this._isVisible&&(this._isInitialize||G$$(this,e,t),Z$O(this),e$2e(this._colorCommand)&&i.push(this._colorCommand))};var it$a=n$J.SHOW_INDEX,re$C=n$J.POSITION_INDEX,Le$n=n$J.PIXEL_OFFSET_INDEX,Ve$f=n$J.EYE_OFFSET_INDEX,st$7=n$J.HORIZONTAL_ORIGIN_INDEX,rt$g=n$J.VERTICAL_ORIGIN_INDEX,at$c=n$J.SCALE_INDEX,ae$t=n$J.IMAGE_INDEX_INDEX,be$r=n$J.COLOR_INDEX,nt$a=n$J.ROTATION_INDEX,ht$8=n$J.ALIGNED_AXIS_INDEX,Fe$j=n$J.SCALE_BY_DISTANCE_INDEX,Me$n=n$J.TRANSLUCENCY_BY_DISTANCE_INDEX,Ue$g=n$J.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,He$d=n$J.DISTANCE_DISPLAY_CONDITION,Gt$5=n$J.DISABLE_DEPTH_DISTANCE,ot$9=n$J.TEXTURE_COORDINATE_BOUNDS,_t$7=n$J.SDF_INDEX,dt$9=n$J.OPACITY_STATE_INDEX,Ae$p=n$J.NUMBER_OF_PROPERTIES,m$S,Wt$8={positionHighAndScale:0,positionLowAndRotation:1,compressedAttribute0:2,compressedAttribute1:3,compressedAttribute2:4,eyeOffset:5,scaleByDistance:6,pixelOffsetScaleByDistance:7,compressedAttribute3:8,textureCoordinateBoundsOrLabelTranslate:9,a_batchId:10,sdf:11,a_fade_opacity:12},zt$5={direction:0,positionHighAndScale:1,positionLowAndRotation:2,compressedAttribute0:3,compressedAttribute1:4,compressedAttribute2:5,eyeOffset:6,scaleByDistance:7,pixelOffsetScaleByDistance:8,compressedAttribute3:9,textureCoordinateBoundsOrLabelTranslate:10,a_batchId:11,sdf:12,a_fade_opacity:13},Yt$5={enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.SOURCE_ALPHA,functionDestinationRgb:l$13.ONE,functionSourceAlpha:l$13.ONE,functionDestinationAlpha:l$13.ONE},Ge$e;function w$O(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._spTranslucent=void 0,this._spParticleSystem=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._rsParticleSystem=void 0,this._vaf=void 0,this._billboardsID={},this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._shaderRotation=!1,this._compiledShaderRotation=!1,this._shaderAlignedAxis=!1,this._compiledShaderAlignedAxis=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderPixelOffsetScaleByDistance=!1,this._compiledShaderPixelOffsetScaleByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._shaderClampToGround=!1,this._compiledShaderClampToGround=!1,this._propertiesChanged=new Uint32Array(Ae$p),this._maxSize=0,this._maxEyeOffset=0,this._maxScale=1,this._maxPixelOffset=0,this._allHorizontalCenter=!0,this._allVerticalCenter=!0,this._allSizedInMeters=!0,this._baseVolume=new i$1d,this._baseVolumeWC=new i$1d,this._baseVolume2D=new i$1d,this._boundingVolume=new i$1d,this._boundingVolumeDirty=!1,this._colorCommands=[],this._depthTestEnable=u$Z(e.depthTestEnable,!0),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.debugShowTextureAtlas=u$Z(e.debugShowTextureAtlas,!1),this.blendOption=u$Z(e.blendOption,S$L.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._isParticleSystem=e.particleSystem,this._isMVT=u$Z(e.isMVT,!1),this._ignoreShow=e.ignoreShow,this._fadeChange=1,this._mode=C$14.SCENE3D,this._buffersUsage=new Array(Ae$p),this._buffersUsage[it$a]=A$18.STATIC_DRAW,this._buffersUsage[re$C]=A$18.STATIC_DRAW,this._buffersUsage[Le$n]=A$18.STATIC_DRAW,this._buffersUsage[Ve$f]=A$18.STATIC_DRAW,this._buffersUsage[st$7]=A$18.STATIC_DRAW,this._buffersUsage[rt$g]=A$18.STATIC_DRAW,this._buffersUsage[at$c]=A$18.STATIC_DRAW,this._buffersUsage[ae$t]=A$18.STATIC_DRAW,this._buffersUsage[be$r]=A$18.STATIC_DRAW,this._buffersUsage[nt$a]=A$18.STATIC_DRAW,this._buffersUsage[ht$8]=A$18.STATIC_DRAW,this._buffersUsage[Fe$j]=A$18.STATIC_DRAW,this._buffersUsage[Me$n]=A$18.STATIC_DRAW,this._buffersUsage[Ue$g]=A$18.STATIC_DRAW,this._buffersUsage[He$d]=A$18.STATIC_DRAW,this._buffersUsage[ot$9]=A$18.STATIC_DRAW,this._buffersUsage[dt$9]=A$18.DYNAMIC_DRAW,this._highlightColor=e$1X.clone(e$1X.WHITE);var t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture},u_highlightColor:function(){return t._highlightColor},u_eyeOffsetZ:function(){if(!e$2e(t._scene)||!e$2e(t._scene.camera))return 0;var e=t._scene.camera;return.01*e.positionCartographic.height*Math.sin(e.pitch)},u_fade_change:function(){return t._fadeChange}};var i=this._scene;e$2e(i)&&e$2e(i.terrainProviderChanged)&&(this._removeCallbackFunc=i.terrainProviderChanged.addEventListener((function(){for(var e=this._billboards,t=e.length,i=0;i<t;++i)e[i]._updateClamping()}),this)),this._lineCallout=new _$K,this._style3D=u$Z(e.style3D,void 0),this._lineCallout.style=this._style3D,this._visibleViewport=4095,this._swipeEnabled=u$Z(e.swipeEnabled,!1),this._swipeRegion=u$Z(e.swipeRegion,new f$1a(0,0,1,1)),this._compiledSwipeEnabled=!1,this._compiledSwipeRegion=new f$1a(0,0,1,1),this._billboardMode=u$Z(e.billboardMode,yr$2.None)}function ft$8(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function Xe$b(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;for(var t=[],i=e._billboards,n=i.length,r=0,o=0;r<n;++r){var a=i[r];if(a){var s=a._index;a._index=o++,t.push(a),e._lineCallout._updateIndex(a.id,s,a._index)}}e._billboards=t}}function kt$6(e){var t=e.cache.billboardCollection_indexBufferBatched;if(e$2e(t))return t;for(var i=new Uint16Array(98298),n=0,r=0;n<98298;n+=6,r+=4)i[n]=r,i[n+1]=r+1,i[n+2]=r+2,i[n+3]=r+0,i[n+4]=r+2,i[n+5]=r+3;return(t=t$X.createIndexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=t,t}function Kt$6(e){var t=e.cache.billboardCollection_indexBufferInstanced;return e$2e(t)||((t=t$X.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function Qt$6(e){var t=e.cache.billboardCollection_vertexBufferInstanced;return e$2e(t)||((t=t$X.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:A$18.STATIC_DRAW})).vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}function qt$7(e,t,i,n,r,o,a){var s=[{index:m$S.positionHighAndScale,name:"positionHighAndScale",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[re$C]},{index:m$S.positionLowAndRotation,name:"positionLowAndRotation",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[re$C]},{index:m$S.compressedAttribute0,name:"compressedAttribute0",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Le$n]},{index:m$S.compressedAttribute1,name:"compressedAttribute1",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Me$n]},{index:m$S.compressedAttribute2,name:"compressedAttribute2",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[be$r]},{index:m$S.eyeOffset,name:"eyeOffset",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Ve$f]},{index:m$S.scaleByDistance,name:"scaleByDistance",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Fe$j]},{index:m$S.pixelOffsetScaleByDistance,name:"pixelOffsetScaleByDistance",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Ue$g]},{index:m$S.compressedAttribute3,name:"compressedAttribute3",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[He$d]},{index:m$S.textureCoordinateBoundsOrLabelTranslate,name:"textureCoordinateBoundsOrLabelTranslate",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[ot$9]}];return n&&s.push({index:m$S.direction,name:"direction",componentsPerAttribute:2,componentDatatype:S$14.FLOAT,vertexBuffer:Qt$6(e)}),e$2e(r)&&s.push({index:m$S.a_batchId,name:"a_batchId",componentsPerAttribute:1,componentDatatyps:S$14.FLOAT,bufferUsage:A$18.STATIC_DRAW}),o&&s.push({index:m$S.sdf,name:"sdf",componentsPerAttribute:2,componentDatatype:S$14.FLOAT,usage:i[_t$7]}),a&&s.push({index:m$S.a_fade_opacity,name:"a_fade_opacity",componentsPerAttribute:2,componentDatatype:S$14.FLOAT,usage:A$18.STATIC_DRAW}),new v$F(e,s,n?t:4*t,n)}Object.defineProperties(w$O.prototype,{length:{get:function(){return Xe$b(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}},style3D:{get:function(){return this._style3D},set:function(e){this._style3D=e,this.setBillboardImage(this._style3D),this._lineCallout.style=e}},showCallout:{get:function(){return this._lineCallout.isVisible},set:function(e){this._lineCallout.isVisible=e}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(e$2e(e)&&e instanceof f$1a))throw new t$15("Expected BillboardCollection.swipeRegion to be type of BoundingRectangle.");f$1a.equals(e,this._swipeRegion)||f$1a.clone(e,this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){o$1q.typeOf.bool("BillboardCollection.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e)}},fadeChage:{get:function(){return this._fadeChange},set:function(e){e!==this._fadeChange&&(this._fadeChange=e)}}}),w$O.prototype.add=function(e){var t=new n$J(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,e$2e(t.id)&&(this._billboardsID[t.id]=t),e$2e(e)&&e$2e(e.position)&&this._lineCallout.addPoint(t.id,t._index,e.position),t},w$O.prototype.remove=function(e){return!!this.contains(e)&&(e$2e(e.id)&&delete this._billboardsID[e.id],this._billboards[e._index]=null,this._billboardsRemoved=!0,this._createVertexArray=!0,this._lineCallout.remove(e.id,e._index),e._destroy(),!0)},w$O.prototype.removeAll=function(){ft$8(this._billboards),this._billboards=[],this._billboardsID={},this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},w$O.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},w$O.prototype.contains=function(e){return e$2e(e)&&e._billboardCollection===this},w$O.prototype.containsByID=function(e){return this._billboardsID.hasOwnProperty(e)},w$O.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return Xe$b(this),this._billboards[e]},w$O.prototype.getById=function(e){if(!e$2e(e))throw new t$15("id is required.");return e$2e(this._billboardsID[e])?this._billboardsID[e]:null},w$O.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,n=0;n<Ae$p;++n){var r=0===i[n]?A$18.STATIC_DRAW:A$18.STREAM_DRAW;t=t||e[n]!==r,e[n]=r}return t};var We$i=new i$12;function ut$a(e,t,i,n,r){var o,a=n[m$S.positionHighAndScale],s=n[m$S.positionLowAndRotation],l=r._getActualPosition();e._mode===C$14.SCENE3D&&(i$1d.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),i$12.fromCartesian(l,We$i);var u=r.scale,c=r.rotation;0!==c&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,u);var h=We$i.high,d=We$i.low;e._instanced?(a(o=r._index,h.x,h.y,h.z,u),s(o,d.x,d.y,d.z,c)):(a((o=4*r._index)+0,h.x,h.y,h.z,u),a(o+1,h.x,h.y,h.z,u),a(o+2,h.x,h.y,h.z,u),a(o+3,h.x,h.y,h.z,u),s(o+0,d.x,d.y,d.z,c),s(o+1,d.x,d.y,d.z,c),s(o+2,d.x,d.y,d.z,c),s(o+3,d.x,d.y,d.z,c))}var b$$=new o$1o,F$U=32768,ne$A=65536,ze$d=4096,z$N=256,Zt$4=128,Jt$5=32,$t$4=8,pt$9=4,jt$6=1/256,ct$9=0,lt$4=2,mt$5=3,Tt$9=1;function vt$9(e,t,i,n,r){var o,a=n[m$S.compressedAttribute0],s=r.pixelOffset,l=s.x,u=s.y,c=r._translate,h=c.x,d=c.y;e._maxPixelOffset=Math.max(e._maxPixelOffset,Math.abs(l+h),Math.abs(-u+d));var f=r.horizontalOrigin,p=r._verticalOrigin,_=r.show&&r.clusterShow;0===r.color.alpha&&(_=!1),p===S$Q.BASELINE&&(p=S$Q.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&f===j$V.CENTER,e._allVerticalCenter=e._allVerticalCenter&&p===S$Q.CENTER;var m=0,g=0,x=0,y=0,v=r._imageIndex;if(-1!==v){var $=i[v];if(!e$2e($))throw new t$15("Invalid billboard image index: "+v);m=$.x,g=$.y,x=$.width,y=$.height}var b=m+x,T=g+y,C=Math.floor(e$2d.clamp(l,-F$U,F$U)+F$U)*Zt$4;C+=(f+1)*Jt$5,C+=(p+1)*$t$4,C+=(_?1:0)*pt$9;var S=Math.floor(e$2d.clamp(u,-F$U,F$U)+F$U)*z$N,w=Math.floor(e$2d.clamp(h,-F$U,F$U)+F$U)*z$N,E=(e$2d.clamp(d,-F$U,F$U)+F$U)*jt$6,P=Math.floor(E);if(S+=P,w+=Math.floor((E-P)*z$N),e._isMVT){var A=T;T=g,g=A}b$$.x=m,b$$.y=g;var L=t$$.compressTextureCoordinates(b$$);b$$.x=b;var M=t$$.compressTextureCoordinates(b$$);b$$.y=T;var R=t$$.compressTextureCoordinates(b$$);b$$.x=m;var O=t$$.compressTextureCoordinates(b$$);e._instanced?a(o=r._index,C,S,w,L):(a((o=4*r._index)+0,C+ct$9,S,w,L),a(o+1,C+lt$4,S,w,M),a(o+2,C+mt$5,S,w,R),a(o+3,C+Tt$9,S,w,O))}function xt$7(e,t,i,n,r){var o,a=n[m$S.compressedAttribute1],s=r.alignedAxis;o$1p.equals(s,o$1p.ZERO)||(e._shaderAlignedAxis=!0);var l=0,u=1,c=1,h=1,d=r.translucencyByDistance;e$2e(d)&&(l=d.near,u=d.nearValue,c=d.far,h=d.farValue,(1!==u||1!==h)&&(e._shaderTranslucencyByDistance=!0));var f=0,p=r._imageIndex;if(-1!==p){var _=i[p];if(!e$2e(_))throw new t$15("Invalid billboard image index: "+p);f=_.width}var m=e._textureAtlas.texture.width,g=Math.round(u$Z(r.width,m*f));e._maxSize=Math.max(e._maxSize,g);var x=e$2d.clamp(g,0,ne$A),y=0;Math.abs(o$1p.magnitudeSquared(s)-1)<e$2d.EPSILON6&&(y=t$$.octEncodeFloat(s)),u=e$2d.clamp(u,0,1),x=x*z$N+(u=1===u?255:255*u|0),h=e$2d.clamp(h,0,1),y=y*z$N+(h=1===h?255:255*h|0),e._instanced?a(o=r._index,x,y,l,c):(a((o=4*r._index)+0,x,y,l,c),a(o+1,x,y,l,c),a(o+2,x,y,l,c),a(o+3,x,y,l,c))}function Ye$e(e,t,i,n,r){var o,a=n[m$S.compressedAttribute2],s=r.color,l=e$2e(e._batchTable)?e$1X.WHITE:r.getPickId(t).color,u=r.sizeInMeters?1:0,c=Math.abs(o$1p.magnitudeSquared(r.alignedAxis)-1)<e$2d.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&1===u;var h=0,d=r._imageIndex;if(-1!==d){var f=i[d];if(!e$2e(f))throw new t$15("Invalid billboard image index: "+d);h=f.height}var p=e._textureAtlas.texture.dimensions,_=Math.round(u$Z(r.height,p.y*h));e._maxSize=Math.max(e._maxSize,_);var m=u$Z(r._labelHorizontalOrigin,-2),g=_*pt$9+(m+=2),x=e$1X.floatToByte(s.red),y=e$1X.floatToByte(s.green),v=e$1X.floatToByte(s.blue),$=x*ne$A+y*z$N+v;x=e$1X.floatToByte(l.red),y=e$1X.floatToByte(l.green),v=e$1X.floatToByte(l.blue);var b=x*ne$A+y*z$N+v,T=e$1X.floatToByte(s.alpha)*ne$A+e$1X.floatToByte(l.alpha)*z$N;T+=2*u+c,e._instanced?a(o=r._index,$,b,T,g):(a((o=4*r._index)+0,$,b,T,g),a(o+1,$,b,T,g),a(o+2,$,b,T,g),a(o+3,$,b,T,g))}function ke$d(e,t,i,n,r){var o,a=n[m$S.eyeOffset],s=r.eyeOffset,l=s.z;if(r._heightReference!==k$R.NONE&&(l*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(s.x),Math.abs(s.y),Math.abs(l)),e._instanced){var u=0,c=0,h=r._imageIndex;if(-1!==h){var d=i[h];if(!e$2e(d))throw new t$15("Invalid billboard image index: "+h);u=d.width,c=d.height}b$$.x=u,b$$.y=c;var f=t$$.compressTextureCoordinates(b$$);a(o=r._index,s.x,s.y,l,f)}else a((o=4*r._index)+0,s.x,s.y,l,0),a(o+1,s.x,s.y,l,0),a(o+2,s.x,s.y,l,0),a(o+3,s.x,s.y,l,0)}function Dt$8(e,t,i,n,r){var o,a=n[m$S.scaleByDistance],s=0,l=1,u=1,c=1,h=r.scaleByDistance;e$2e(h)&&(s=h.near,l=h.nearValue,u=h.far,c=h.farValue,(1!==l||1!==c)&&(e._shaderScaleByDistance=!0)),e._instanced?a(o=r._index,s,l,u,c):(a((o=4*r._index)+0,s,l,u,c),a(o+1,s,l,u,c),a(o+2,s,l,u,c),a(o+3,s,l,u,c))}function At$6(e,t,i,n,r){var o,a=n[m$S.pixelOffsetScaleByDistance],s=0,l=1,u=1,c=1,h=r.pixelOffsetScaleByDistance;e$2e(h)&&(s=h.near,l=h.nearValue,u=h.far,c=h.farValue,(1!==l||1!==c)&&(e._shaderPixelOffsetScaleByDistance=!0)),e._instanced?a(o=r._index,s,l,u,c):(a((o=4*r._index)+0,s,l,u,c),a(o+1,s,l,u,c),a(o+2,s,l,u,c),a(o+3,s,l,u,c))}function Et$8(e,t,i,n,r){var o,a=n[m$S.compressedAttribute3],s=0,l=Number.MAX_VALUE,u=r.distanceDisplayCondition;e$2e(u)&&(s=u.near,l=u.far,s*=s,l*=l,e._shaderDistanceDisplayCondition=!0);var c,h,d=r.disableDepthTestDistance,f=r.heightReference===k$R.CLAMP_TO_GROUND&&e._scene.context.depthTexture;if(e$2e(d)||(d=f?5e3:0),d*=d,(f||d>0)&&(e._shaderDisableDepthDistance=!0,d===Number.POSITIVE_INFINITY&&(d=-1)),e$2e(r._labelDimensions))h=r._labelDimensions.x,c=r._labelDimensions.y;else{var p=0,_=0,m=r._imageIndex;if(-1!==m){var g=i[m];if(!e$2e(g))throw new t$15("Invalid billboard image index: "+m);p=g.height,_=g.width}c=Math.round(u$Z(r.height,e._textureAtlas.texture.dimensions.y*p));var x=e._textureAtlas.texture.width;h=Math.round(u$Z(r.width,x*_))}var y=Math.floor(e$2d.clamp(h,0,ze$d)),v=Math.floor(e$2d.clamp(c,0,ze$d)),$=y*ze$d+v;e._instanced?a(o=r._index,s,l,d,$):(a((o=4*r._index)+0,s,l,d,$),a(o+1,s,l,d,$),a(o+2,s,l,d,$),a(o+3,s,l,d,$))}function St$5(e,t,i,n,r){r.heightReference===k$R.CLAMP_TO_GROUND&&(e._shaderClampToGround=e._scene.context.depthTexture);var o,a=n[m$S.textureCoordinateBoundsOrLabelTranslate];if(e$1W.maximumVertexTextureImageUnits>0){var s=0,l=0;return e$2e(r._labelTranslate)&&(s=r._labelTranslate.x,l=r._labelTranslate.y),void(e._instanced?(o=r._index,a(o,s,l,0,0)):(o=4*r._index,a(o+0,s,l,0,0),a(o+1,s,l,0,0),a(o+2,s,l,0,0),a(o+3,s,l,0,0)))}var u=0,c=0,h=0,d=0,f=r._imageIndex;if(-1!==f){var p=i[f];if(!e$2e(p))throw new t$15("Invalid billboard image index: "+f);u=p.x,c=p.y,h=p.width,d=p.height}var _=u+h,m=c+d;e._instanced?a(o=r._index,u,c,_,m):(a((o=4*r._index)+0,u,c,_,m),a(o+1,u,c,_,m),a(o+2,u,c,_,m),a(o+3,u,c,_,m))}function ei$4(e,t,i,n,r){if(e$2e(e._batchTable)){var o,a=n[m$S.a_batchId],s=r._batchIndex;e._instanced?a(o=r._index,s):(a((o=4*r._index)+0,s),a(o+1,s),a(o+2,s),a(o+3,s))}}function yt$7(e,t,i,n,r){if(e._sdf){var o,a=n[m$S.sdf],s=r.outlineColor,l=r.outlineWidth,u=e$1X.floatToByte(s.red),c=e$1X.floatToByte(s.green),h=e$1X.floatToByte(s.blue),d=u*ne$A+c*z$N+h,f=l/V$L.RADIUS,p=e$1X.floatToByte(s.alpha)*ne$A+e$1X.floatToByte(f)*z$N;e._instanced?a(o=r._index,d,p):(o=4*r._index,t.webgpu?(a(o+0,d,p),a(o+1,d,p),a(o+2,d,p),a(o+3,d,p)):(a(o+0,d+ct$9,p),a(o+1,d+lt$4,p),a(o+2,d+mt$5,p),a(o+3,d+Tt$9,p)))}}function It$a(e,t,i,n,r){if(e._isMVT){var o,a=n[m$S.a_fade_opacity],s=r.opacityState,l=s.placed?1:0,u=s.opacity;e._instanced?a(o=r._index,l,u):(a((o=4*r._index)+0,l,u),a(o+1,l,u),a(o+2,l,u),a(o+3,l,u))}}function ti$5(e,t,i,n,r){ut$a(e,t,i,n,r),vt$9(e,t,i,n,r),xt$7(e,t,i,n,r),Ye$e(e,t,i,n,r),ke$d(e,t,i,n,r),Dt$8(e,t,i,n,r),At$6(e,t,i,n,r),Et$8(e,t,i,n,r),St$5(e,t,i,n,r),ei$4(e,t,i,n,r),yt$7(e,t,i,n,r),It$a(e,t,i,n,r)}function Ke$b(e,t,i,n,r,o){var a;n.mode===C$14.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=n$J._computeActualPosition(u,c,n,r);e$2e(h)&&(u._setActualPosition(h),o?s.push(h):i$1d.expand(a,h,a))}o&&i$1d.fromPoints(s,a)}function ii$4(e,t){var i=t.mode,n=e._billboards,r=e._billboardsToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==C$14.SCENE3D&&!p$1d.equals(o,e.modelMatrix)?(e._mode=i,p$1d.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===C$14.SCENE3D||i===C$14.SCENE2D||i===C$14.COLUMBUS_VIEW)&&Ke$b(e,n,n.length,t,o,!0)):i===C$14.MORPHING?Ke$b(e,n,n.length,t,o,!0):(i===C$14.SCENE2D||i===C$14.COLUMBUS_VIEW)&&Ke$b(e,r,e._billboardsToUpdateIndex,t,o,!1)}function si$5(e,t,i){var n=1;(!e._allSizedInMeters||0!==e._maxPixelOffset)&&(n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight));var r=n*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(r*=.5);var o=n*e._maxPixelOffset+e._maxEyeOffset;i.radius+=r+o}function ri$4(e,t){var i=t.createViewportQuadCommand("uniform sampler2D billboard_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n gl_FragColor = texture2D(billboard_texture, v_textureCoordinates); \n} \n",{uniformMap:{billboard_texture:function(){return e._textureAtlas.texture}}});return i.pass=Le$q.OVERLAY,i}w$O.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},w$O.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport};var ai$5=[],Y$F=new e$2c;w$O.prototype.update=function(e,t,i){if(!e.passes.offscreen&&!e.camera.bReflect){if(this._lineCallout.update(t,e,i),e.multiViewportIndex>-1&&this._billboards.length>0){if(e$2e(this._billboards[0])&&e$2e(this._billboards[0]._id)&&e$2e(this._billboards[0]._id.entityCollection)){var n=this._billboards[0]._id.entityCollection.owner;if(typeof n.getVisibleInViewport<"u")if(!n.getVisibleInViewport(e.multiViewportIndex))return}if(!this.getVisibleInViewport(e.multiViewportIndex))return}Xe$b(this);var r=this._billboards,o=r.length;t=e.context;this._instanced=t.instancedArrays,m$S=this._instanced?zt$5:Wt$8,Ge$e=this._instanced?Kt$6:kt$6;var a=this._textureAtlas;if(!e$2e(a)){a=this._textureAtlas=new v$I({context:t});for(var s=0;s<o;++s)r[s]._loadImage()}var l=a.textureCoordinates;if(0!==l.length){ii$4(this,e),o=(r=this._billboards).length;var u=this._billboardsToUpdate,c=this._billboardsToUpdateIndex,h=this._propertiesChanged,d=a.guid,f=this._createVertexArray||this._textureAtlasGUID!==d;this._textureAtlasGUID=d;var p,_=e.passes,m=_.pick;if(f||!m&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var g=0;g<Ae$p;++g)h[g]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),o>0){this._vaf=qt$7(t,o,this._buffersUsage,this._instanced,this._batchTable,this._sdf,this._isMVT),p=this._vaf.writers;for(var x=0;x<o;++x){var y=this._billboards[x];y._dirty=!1,ti$5(this,t,l,p,y)}this._vaf.commit(Ge$e(t))}this._billboardsToUpdateIndex=0}else if(c>0){var v=ai$5;v.length=0,(h[re$C]||h[nt$a]||h[at$c])&&v.push(ut$a),(h[ae$t]||h[Le$n]||h[st$7]||h[rt$g]||h[it$a])&&(v.push(vt$9),this._instanced&&v.push(ke$d)),(h[ae$t]||h[ht$8]||h[Me$n])&&(v.push(xt$7),v.push(Ye$e)),(h[ae$t]||h[be$r])&&v.push(Ye$e),h[Ve$f]&&v.push(ke$d),h[Fe$j]&&v.push(Dt$8),h[Ue$g]&&v.push(At$6),(h[He$d]||h[Gt$5]||h[ae$t]||h[re$C])&&v.push(Et$8),(h[ae$t]||h[re$C])&&v.push(St$5),h[_t$7]&&v.push(yt$7),h[dt$9]&&v.push(It$a);var $=v.length;if(p=this._vaf.writers,c/o>.1){for(var b=0;b<c;++b){var T=u[b];T._dirty=!1;for(var C=0;C<$;++C)v[C](this,t,l,p,T)}this._vaf.commit(Ge$e(t))}else{for(var S=0;S<c;++S){var w=u[S];w._dirty=!1;for(var E=0;E<$;++E)v[E](this,t,l,p,w);this._instanced?this._vaf.subCommit(w._index,1):this._vaf.subCommit(4*w._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(c>1.5*o&&(u.length=o),e$2e(this._vaf)&&e$2e(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,i$1d.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var P,A=p$1d.IDENTITY;e.mode===C$14.SCENE3D?(A=this.modelMatrix,P=i$1d.clone(this._baseVolumeWC,this._boundingVolume)):P=i$1d.clone(this._baseVolume2D,this._boundingVolume),si$5(this,e,P);var L=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,L){this._blendOption===S$L.OPAQUE||this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=d$1m.fromCache({depthTest:{enabled:this._depthTestEnable,func:de$y.LESS},depthMask:!0}):this._rsOpaque=void 0;var M=this._blendOption===S$L.TRANSLUCENT;this._blendOption===S$L.TRANSLUCENT||this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=d$1m.fromCache({depthTest:{enabled:this._depthTestEnable,func:M?de$y.LEQUAL:de$y.LESS},depthMask:M,blending:Ee$r.ALPHA_BLEND}):this._rsTranslucent=void 0}this._isParticleSystem&&(this._rsParticleSystem=d$1m.fromCache({depthTest:{enabled:!1,func:de$y.LESS},depthMask:!1,blending:Yt$5})),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance;var R,O,D,I,B,F=e$1W.maximumVertexTextureImageUnits>0;if(L||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF||this._swipeEnabled!==this._compiledSwipeEnabled||!e$2c.equals(this._swipeRegion,this._compiledSwipeRegion)){R=Vt$7,O=Lt$6,B=[],e$2e(this._batchTable)&&(B.push("VECTOR_TILE"),R=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(R),O=this._batchTable.getFragmentShaderCallback(!1,void 0)(O)),D=new s$V({defines:B,sources:[R],name:"BillboardCollectionVS"}),this._instanced&&D.defines.push("INSTANCED"),this._shaderRotation&&D.defines.push("ROTATION"),this._shaderAlignedAxis&&D.defines.push("ALIGNED_AXIS"),this._billboardMode===yr$2.FixedXYZ&&D.defines.push("FixedXYZ"),this._shaderScaleByDistance&&D.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&D.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&D.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&D.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&D.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(F?D.defines.push("VERTEX_DEPTH_CHECK"):D.defines.push("FRAGMENT_DEPTH_CHECK")),this._ignoreShow&&D.defines.push("IGNORE_SHOW"),this._isMVT&&D.defines.push("MVT");var N=1-V$L.CUTOFF;this._sdf&&D.defines.push("SDF");var G=e$2e(this._batchTable)?"VECTOR_TILE":"";if(this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT&&(I=new s$V({defines:["OPAQUE",G],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(F?I.defines.push("VERTEX_DEPTH_CHECK"):I.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(I.defines.push("SDF"),I.defines.push("SDF_EDGE "+N)),this._isMVT&&I.defines.push("MVT"),this._swipeEnabled&&I.defines.push("APPLY_SWIPE"),this._sp=r$14.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:D,fragmentShaderSource:I,attributeLocations:m$S}),I=new s$V({defines:["TRANSLUCENT",G],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(F?I.defines.push("VERTEX_DEPTH_CHECK"):I.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(I.defines.push("SDF"),I.defines.push("SDF_EDGE "+N)),this._isMVT&&I.defines.push("MVT"),this._swipeEnabled&&I.defines.push("APPLY_SWIPE"),this._spTranslucent=r$14.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:D,fragmentShaderSource:I,attributeLocations:m$S})),this._blendOption===S$L.OPAQUE&&(I=new s$V({defines:[G],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(F?I.defines.push("VERTEX_DEPTH_CHECK"):I.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(I.defines.push("SDF"),I.defines.push("SDF_EDGE "+N)),this._isMVT&&I.defines.push("MVT"),this._swipeEnabled&&I.defines.push("APPLY_SWIPE"),this._sp=r$14.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:D,fragmentShaderSource:I,attributeLocations:m$S})),this._blendOption===S$L.TRANSLUCENT&&(I=new s$V({defines:[G],sources:[O],name:"BillboardCollectionFS"}),this._shaderClampToGround&&(F?I.defines.push("VERTEX_DEPTH_CHECK"):I.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(I.defines.push("SDF"),I.defines.push("SDF_EDGE "+N)),this._isMVT&&I.defines.push("MVT"),this._swipeEnabled&&I.defines.push("APPLY_SWIPE"),this._spTranslucent=r$14.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:D,fragmentShaderSource:I,attributeLocations:m$S})),this._swipeEnabled&&!e$2e(this._uniforms.uSwipeRegion)){var z=this;this._uniforms.uSwipeRegion=function(){var t=z._swipeRegion;return e$2c.fromElements(t.x,t.y,t.x+t.width,t.y+t.height,Y$F),Y$F.x=Y$F.x*e.context.drawingBufferWidth,Y$F.y=(1-Y$F.y)*e.context.drawingBufferHeight,Y$F.z=Y$F.z*e.context.drawingBufferWidth,Y$F.w=(1-Y$F.w)*e.context.drawingBufferHeight,Y$F}}this._isParticleSystem&&(I=new s$V({defines:[G],sources:[O],name:"BillboardCollectionFS"}),this._spParticleSystem=r$14.replaceCache({context:t,shaderProgram:this._spParticleSystem,vertexShaderSource:D,fragmentShaderSource:I,attributeLocations:m$S})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf,this._compiledSwipeEnabled=this._swipeEnabled,f$1a.clone(this._swipeRegion,this._compiledSwipeRegion)}i=e.commandList;var U=!0;if(e._fboState.frameBufferType===Qe$c.NORMAL_AND_DEPTH&&(U=!1),U&&(_.render||_.pick)){var V,k=this._colorCommands,W=this._blendOption===S$L.OPAQUE,H=this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT,q=this._vaf.va,j=q.length,X=this._uniforms;e$2e(this._batchTable)?(X=this._batchTable.getUniformMapCallback()(X),V=this._batchTable.getPickId()):V="v_pickColor",k.length=j;for(var Y=H?2*j:j,Z=0;Z<Y;++Z){var K=k[Z];e$2e(K)||(K=k[Z]=new i$$);var Q=W||H&&Z%2==0;K.owner=this;var J=H?Math.floor(Z/2):Z;K.boundingVolume=P,K.modelMatrix=A,K.count=q[J].indicesCount,K.uniformMap=X,K.vertexArray=q[J].va,this._isParticleSystem?(K.pass=Le$q.Particle,K.renderState=this._rsParticleSystem,K.shaderProgram=this._spParticleSystem,K.pickId=void 0):(K.pass=Q||!H?Le$q.Label_Billboard:Le$q.TRANSLUCENT,K.renderState=Q?this._rsOpaque:this._rsTranslucent,K.shaderProgram=Q?this._sp:this._spTranslucent,K.pickId=V),K.debugShowBoundingVolume=this.debugShowBoundingVolume,this._instanced&&(K.count=6,K.instanceCount=o),i.push(K)}this.debugShowTextureAtlas&&(e$2e(this.debugCommand)||(this.debugCommand=ri$4(this,e.context)),i.push(this.debugCommand))}}}}},w$O.prototype.isDestroyed=function(){return!1},w$O.prototype.destroy=function(){return e$2e(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),ft$8(this._billboards),i$11(this)},w$O.prototype.setBillboardImage=function(e){for(var t=this._billboards.length,i=0;i<t;++i){var n=this._billboards[i];n.isDestroyed()||n.setBillboardStyle(e)}};var u$J=function(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},F$T=function(e,t,i,n){var r=e.measureText(t),o=u$J(e.canvas,"font-family"),a=u$J(e.canvas,"font-size").replace("px",""),s=u$J(e.canvas,"font-style"),l=u$J(e.canvas,"font-weight"),u=!/\S/.test(t);r.fontsize=a;var c=document.createElement("div");c.style.position="absolute",c.style.opacity=0,c.style.font=s+" "+l+" "+a+"px "+o,c.innerHTML=t+"<br/>"+t,document.body.appendChild(c),r.leading=1.2*a;var h=u$J(c,"height");if((h=h.replace("px",""))>=2*a&&(r.leading=h/2|0),document.body.removeChild(c),u)r.ascent=0,r.descent=0,r.bounds={minx:0,maxx:r.width,miny:0,maxy:0},r.height=0;else{var d=document.createElement("canvas"),f=100;d.width=r.width+f,d.height=3*a,d.style.opacity=1,d.style.fontFamily=o,d.style.fontSize=a,d.style.fontStyle=s,d.style.fontWeight=l;var p=d.getContext("2d");p.font=s+" "+l+" "+a+"px "+o;var _=d.width,m=d.height,g=m/2;p.fillStyle="white",p.fillRect(-1,-1,_+2,m+2),i&&(p.strokeStyle="black",p.lineWidth=e.lineWidth,p.strokeText(t,50,g)),n&&(p.fillStyle="black",p.fillText(t,50,g));for(var x=p.getImageData(0,0,_,m).data,y=0,v=4*_,$=x.length;++y<$&&255===x[y];);var b=y/v|0;for(y=$-1;--y>0&&255===x[y];);var T=y/v|0;for(y=0;y<$&&255===x[y];)(y+=v)>=$&&(y=y-$+4);var C=y%v/4|0,S=1;for(y=$-3;y>=0&&255===x[y];)(y-=v)<0&&(y=$-3-4*S++);var w=y%v/4+1|0;r.ascent=g-b,r.descent=T-g,r.bounds={minx:C-50,maxx:w-50,miny:0,maxy:T-b},r.height=T-b+1}return r},o$R;function x$W(e,t){if(!e$2e(e))throw new t$15("text is required.");if(""!==e){t=u$Z(t,u$Z.EMPTY_OBJECT);var i=u$Z(t.font,"10px sans-serif"),n=u$Z(t.stroke,!1),r=u$Z(t.fill,!0),o=u$Z(t.strokeWidth,1),a=u$Z(t.backgroundColor,e$1X.TRANSPARENT),s=u$Z(t.padding,0),l=2*s,u=document.createElement("canvas");u.width=1,u.height=1,u.style.font=i;var c=u.getContext("2d",{willReadFrequently:!0});e$2e(o$R)||(e$2e(c.imageSmoothingEnabled)?o$R="imageSmoothingEnabled":e$2e(c.mozImageSmoothingEnabled)?o$R="mozImageSmoothingEnabled":e$2e(c.webkitImageSmoothingEnabled)?o$R="webkitImageSmoothingEnabled":e$2e(c.msImageSmoothingEnabled)&&(o$R="msImageSmoothingEnabled")),c.font=i,c.lineJoin="round",c.lineWidth=o,c[o$R]=!1,c.textBaseline=u$Z(t.textBaseline,"bottom"),u.style.visibility="hidden",document.body.appendChild(u);var h=F$T(c,e,n,r);u.dimensions=h,document.body.removeChild(u),u.style.visibility="";var d=-h.bounds.minx,f=Math.ceil(h.width)+d+l,p=h.height+l,_=p-(p-h.ascent+s)+l;if(u.width=f,u.height=p,c.font=i,c.lineJoin="round",c.lineWidth=o,c[o$R]=!1,a!==e$1X.TRANSPARENT&&(c.fillStyle=a.toCssColorString(),c.fillRect(0,0,u.width,u.height)),n){var m=u$Z(t.strokeColor,e$1X.BLACK);c.strokeStyle=m.toCssColorString(),c.strokeText(e,d+s,_)}if(r){var g=u$Z(t.fillColor,e$1X.WHITE);c.fillStyle=g.toCssColorString(),c.fillText(e,d+s,_)}return u}}var c$R=1e20;function R$O(e,t,i){return t<i?e<t?t:e>i?i:e:e<i?i:e>t?t:e}function b$_(e,t){t||(t={});var i,n,r,o,a,s,l,u,c,h,d,f=null==t.cutoff?.25:t.cutoff,p=null==t.radius?8:t.radius,_=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,n=t.height,o=e,s=t.stride?t.stride:Math.floor(e.length/i/n)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(l=(u=e).getContext("2d"),i=u.width,n=u.height,o=(c=l.getImageData(0,0,i,n)).data,s=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(l=e,i=(u=e.canvas).width,n=u.height,o=(c=l.getImageData(0,0,i,n)).data,s=4):window.ImageData&&e instanceof window.ImageData&&(c=e,i=e.width,n=e.height,o=c.data,s=4);if(r=Math.max(i,n),window.Uint8ClampedArray&&o instanceof window.Uint8ClampedArray||window.Uint8Array&&o instanceof window.Uint8Array)for(a=o,o=Array(i*n),h=0,d=a.length;h<d;h++)o[h]=a[h*s+_]/255;else if(1!==s)throw Error("Raw data can have only 1 value per pixel");var m=Array(i*n),g=Array(i*n),x=Array(r),y=Array(r),v=Array(r+1),$=Array(r);for(h=0,d=i*n;h<d;h++){var b=o[h];m[h]=1===b?0:0===b?c$R:Math.pow(Math.max(0,.5-b),2),g[h]=1===b?c$R:0===b?0:Math.pow(Math.max(0,b-.5),2)}U$O(m,i,n,x,y,$,v),U$O(g,i,n,x,y,$,v);var T=window.Float32Array?new Float32Array(i*n):new Array(i*n);for(h=0,d=i*n;h<d;h++)T[h]=R$O(1-((m[h]-g[h])/p+f),0,1);return T}function U$O(e,t,i,n,r,o,a){for(var s=0;s<t;s++){for(var l=0;l<i;l++)n[l]=e[l*t+s];for(s$I(n,r,o,a,i),l=0;l<i;l++)e[l*t+s]=r[l]}for(l=0;l<i;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(s$I(n,r,o,a,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(r[s])}}function s$I(e,t,i,n,r){i[0]=0,n[0]=-c$R,n[1]=+c$R;for(var o=1,a=0;o<r;o++){for(var s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);s<=n[a];)a--,s=(e[o]+o*o-(e[i[a]]+i[a]*i[a]))/(2*o-2*i[a]);i[++a]=o,n[a]=s,n[a+1]=+c$R}for(o=0,a=0;o<r;o++){for(;n[a+1]<o;)a++;t[o]=(o-i[a])*(o-i[a])+e[i[a]]}}var g$X=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function w$N(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function q$W(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function x$V(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function I$10(e){var t=document.createElement("div");t.style.position="absolute",t.style.opacity=0,/bold/i.test(e._font)?(e._font=e._font.replace(/\sbold/i,""),t.style.font=e._font,t.style.fontWeight="bold"):t.style.font=e._font,document.body.appendChild(t),e._fontFamily=x$V(t,"font-family"),e._fontSize=(e$2e(t.style.fontSize)&&""!==t.style.fontSize&&/\d+px/.test(t.style.fontSize)?t.style.fontSize:x$V(t,"font-size")).replace("px",""),e._fontStyle=x$V(t,"font-style"),e._fontWeight=x$V(t,"font-weight"),document.body.removeChild(t)}function D$R(e,t){if(e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).s3MTilesLabelStyle)){var i=e.s3MTilesLabelStyle;e.font=i.font,e.fillColor=i.fillColor,e.outlineColor=i.outlineColor,e.outlineWidth=i.outlineWidth,e.showBackground=i.showBackground,e.backgroundColor=i.backgroundColor,e.backgroundPadding=i.backgroundPadding,e.style=i.fillStyle,e.verticalOrigin=i.verticalOrigin,e.horizontalOrigin=i.horizontalOrigin,e.pixelOffset=i.pixelOffset,e.eyeOffset=i.eyeOffset,e.scale=i.scale,e.translucencyByDistance=i.translucencyByDistance,e.pixelOffsetScaleByDistance=i.pixelOffsetScaleByDistance,e.scaleByDistance=i.scaleByDistance,e.heightReference=i.heightReference,e.distanceDisplayCondition=i.distanceDisplayCondition,e.disableDepthTestDistance=i.disableDepthTestDistance}if(e$2e(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$15("disableDepthTestDistance must be greater than 0.0.");var n=e.translucencyByDistance,r=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,a=e.distanceDisplayCondition;if(e$2e(n)){if(n.far<=n.near)throw new t$15("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=o$Y.clone(n)}if(e$2e(r)){if(r.far<=r.near)throw new t$15("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");r=o$Y.clone(r)}if(e$2e(o)){if(o.far<=o.near)throw new t$15("scaleByDistance.far must be greater than scaleByDistance.near.");o=o$Y.clone(o)}if(e$2e(a)){if(a.far<=a.near)throw new t$15("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");a=r$Z.clone(a)}this._renderedText=void 0,this._text=void 0,this._show=u$Z(e.show,!0),this._font=u$Z(e.font,"30px sans-serif"),this._fillColor=e$1X.clone(u$Z(e.fillColor,e$1X.WHITE)),this._oriFillColor=e$1X.clone(this._fillColor),this._outlineColor=e$1X.clone(u$Z(e.outlineColor,e$1X.BLACK)),this._outlineWidth=u$Z(e.outlineWidth,1),this._showBackground=u$Z(e.showBackground,!1),this._backgroundColor=u$Z(e.backgroundColor,new e$1X(.165,.165,.165,.8)),this._backgroundPadding=u$Z(e.backgroundPadding,new o$1o(7,5)),this._backgroundImage=u$Z(e.backgroundImage,null),this._style=u$Z(e.style,R$S.FILL),this._verticalOrigin=u$Z(e.verticalOrigin,S$Q.BASELINE),this._horizontalOrigin=u$Z(e.horizontalOrigin,j$V.CENTER),this._pixelOffset=o$1o.clone(u$Z(e.pixelOffset,o$1o.ZERO)),this._eyeOffset=o$1p.clone(u$Z(e.eyeOffset,o$1p.ZERO)),this._position=o$1p.clone(u$Z(e.position,o$1p.ZERO)),this._scale=u$Z(e.scale,1),this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=r,this._scaleByDistance=o,this._heightReference=u$Z(e.heightReference,k$R.NONE),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=u$Z(e.text,""),this._relativeSize=1,this._index=u$Z(e.index,0),this._isPicked=!1,this._screenSpacePosition=new o$1o,this._localScreenSpaceBBox=new f$1a,this._mvtLayerID=e.mvtLayerID,this._mapName=e.mapName,this._mvtProperties=e.mvtProperties,I$10(this),this._updateClamping(),this._opacityState={opacity:0,placed:!1}}function j$R(e,t){for(var i=/[a-zA-Z0-9]/,n=/[()[\]{}<>]/,r=[],o="",a=g$X.LTR,s="",l=e.length,u=0;u<l;++u){var c=e.charAt(u);s=t.test(c)?g$X.RTL:i.test(c)?g$X.LTR:n.test(c)?g$X.BRACKETS:g$X.WEAK,0===u&&(a=s),a===s&&s!==g$X.BRACKETS?o+=c:(""!==o&&r.push({Type:a,Word:o}),a=s,o=c)}return r.push({Type:s,Word:o}),r}function J$L(e){return e.split("").reverse().join("")}function A$X(e,t,i){return e.slice(0,t)+i+e.slice(t)}function Q$P(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}Object.defineProperties(D$R.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(this._show!==e){this._show=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i].billboard;e$2e(r)&&(r.show=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.show=e)}}},position:{get:function(){return this._position},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._position;if(!o$1p.equals(t,e)){o$1p.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n].billboard;e$2e(o)&&(o.position=e)}var a=this._backgroundBillboard;e$2e(a)&&(a.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(e!==this._heightReference){this._heightReference=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i].billboard;e$2e(r)&&(r.heightReference=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.heightReference=e),q$W(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._text!==e&&(this._text=e,this._renderedText=D$R.enableRightToLeftDetection?X$N(e):e,w$N(this))}},font:{get:function(){return this._font},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._font!==e&&(this._font=e,w$N(this),I$10(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._fillColor;e$1X.equals(t,e)||(this._oriFillColor=e$1X.clone(t),e$1X.clone(e,t),w$N(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._outlineColor;e$1X.equals(t,e)||(e$1X.clone(e,t),w$N(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,w$N(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._showBackground!==e&&(this._showBackground=e,w$N(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._backgroundColor;if(!e$1X.equals(t,e)){e$1X.clone(e,t);var i=this._backgroundBillboard;e$2e(i)&&(i.color=t)}}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._backgroundPadding;o$1o.equals(t,e)||(o$1o.clone(e,t),q$W(this))}},style:{get:function(){return this._style},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._style!==e&&(this._style=e,w$N(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._pixelOffset;if(!o$1o.equals(t,e)){o$1o.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2e(o.billboard)&&(o.billboard.pixelOffset=e)}var a=this._backgroundBillboard;e$2e(a)&&(a.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._translucencyByDistance;if(!o$Y.equals(t,e)){this._translucencyByDistance=o$Y.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2e(o.billboard)&&(o.billboard.translucencyByDistance=e)}var a=this._backgroundBillboard;e$2e(a)&&(a.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._pixelOffsetScaleByDistance;if(!o$Y.equals(t,e)){this._pixelOffsetScaleByDistance=o$Y.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2e(o.billboard)&&(o.billboard.pixelOffsetScaleByDistance=e)}var a=this._backgroundBillboard;e$2e(a)&&(a.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._scaleByDistance;if(!o$Y.equals(t,e)){this._scaleByDistance=o$Y.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2e(o.billboard)&&(o.billboard.scaleByDistance=e)}var a=this._backgroundBillboard;e$2e(a)&&(a.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._eyeOffset;if(!o$1p.equals(t,e)){o$1p.clone(e,t);for(var i=this._glyphs,n=0,r=i.length;n<r;n++){var o=i[n];e$2e(o.billboard)&&(o.billboard.eyeOffset=e)}var a=this._backgroundBillboard;e$2e(a)&&(a.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._horizontalOrigin!==e&&(this._horizontalOrigin=e,q$W(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(this._verticalOrigin!==e){this._verticalOrigin=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.verticalOrigin=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.verticalOrigin=e),q$W(this)}}},scale:{get:function(){return this._scale},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(this._scale!==e){this._scale=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.scale=e*this._relativeSize)}var o=this._backgroundBillboard;e$2e(o)&&(o.scale=e*this._relativeSize),q$W(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far must be greater than near");if(!r$Z.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=r$Z.clone(e,this._distanceDisplayCondition);for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.distanceDisplayCondition=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(e$2e(e)&&e<0)throw new t$15("disableDepthTestDistance must be greater than 0.0.");this._disableDepthTestDistance=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.disableDepthTestDistance=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.id=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.id=e)}}},pickId:{get:function(){if(0!==this._glyphs.length&&e$2e(this._glyphs[0].billboard))return this._glyphs[0].billboard.pickId}},isPicked:{get:function(){return this._isPicked},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._isPicked=e}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=o$1p.clone(e,this._actualClampedPosition),e$2e(e)&&this._mode===C$14.COLUMBUS_VIEW&&(e=m$19.convertToColumbusCartesian(e));for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard._clampedPosition=e)}var o=this._backgroundBillboard;e$2e(o)&&(o._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.clusterShow=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.clusterShow=e)}}},opacityState:{get:function(){return this._opacityState},set:function(e){if(this._opacityState.opacity!==e.opacity||this._opacityState.placed!==e.placed){this._opacityState=e;for(var t=this._glyphs,i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r.billboard)&&(r.billboard.opacityState=e)}var o=this._backgroundBillboard;e$2e(o)&&(o.opacityState=e)}}}}),D$R.prototype._updateClamping=function(){n$J._updateClamping(this._labelCollection,this)},D$R.prototype.computeScreenSpacePosition=function(e,t){if(!e$2e(e))throw new t$15("scene is required.");e$2e(t)||(t=this._screenSpacePosition);var i=this._labelCollection.modelMatrix,n=e$2e(this._actualClampedPosition)?this._actualClampedPosition:this._position;return n$J._computeScreenSpacePosition(i,n,this._eyeOffset,this._pixelOffset,e,t)},D$R.prototype.computeLocalScreenSpaceBoundingBox=function(e,t){var i=0,n=0,r=0,o=0,a=e.totalScale,s=e._backgroundBillboard;if(e$2e(s))i=s._translate.x,n=-s._translate.y,r=s.width*a,o=s.height*a,e.verticalOrigin===S$Q.BOTTOM||e.verticalOrigin===S$Q.BASELINE?n-=o:e.verticalOrigin===S$Q.CENTER&&(n-=.5*o);else{i=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(var l=0,u=0,c=e._glyphs,h=c.length,d=0;d<h;++d){var f=c[d],p=f.billboard;if(e$2e(p)){var _=p._translate.x,m=-p._translate.y,g=f.dimensions.width*a,x=f.dimensions.height*a;e.verticalOrigin===S$Q.BOTTOM||e.verticalOrigin===S$Q.BASELINE?m-=x:e.verticalOrigin===S$Q.CENTER&&(m-=.5*x),e._verticalOrigin===S$Q.TOP?m+=V$L.PADDING*a:(e._verticalOrigin===S$Q.BOTTOM||e._verticalOrigin===S$Q.BASELINE)&&(m-=V$L.PADDING*a),i=Math.min(i,_),n=Math.min(n,m),l=Math.max(l,_+g),u=Math.max(u,m+x)}}r=l-i,o=u-n}return e$2e(t)||(t=new f$1a),t.x=i,t.y=n,t.width=r,t.height=o,e._text.indexOf("\n")>-1&&(t.height*=e._text.split("\n").length),t},D$R.prototype.getScreenSpaceBoundingBox=function(e,t,i){return e$2e(i)||(i=new f$1a),this.computeLocalScreenSpaceBoundingBox(e,i),i.x+=t.x,i.y+=t.y,i},D$R.getScreenSpaceBoundingBox=function(e,t,i){var n=0,r=0,o=0,a=0,s=e.totalScale,l=e._backgroundBillboard;if(e$2e(l))n=t.x+l._translate.x,r=t.y-l._translate.y,o=l.width*s,a=l.height*s,e.verticalOrigin===S$Q.BOTTOM||e.verticalOrigin===S$Q.BASELINE?r-=a:e.verticalOrigin===S$Q.CENTER&&(r-=.5*a);else{n=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(var u=0,c=0,h=e._glyphs,d=h.length,f=0;f<d;++f){var p=h[f],_=p.billboard;if(e$2e(_)){var m=t.x+_._translate.x,g=t.y-_._translate.y,x=p.dimensions.width*s,y=p.dimensions.height*s;e.verticalOrigin===S$Q.BOTTOM||e.verticalOrigin===S$Q.BASELINE?g-=y:e.verticalOrigin===S$Q.CENTER&&(g-=.5*y),e._verticalOrigin===S$Q.TOP?g+=V$L.PADDING*s:(e._verticalOrigin===S$Q.BOTTOM||e._verticalOrigin===S$Q.BASELINE)&&(g-=V$L.PADDING*s),n=Math.min(n,m),r=Math.min(r,g),u=Math.max(u,m+x),c=Math.max(c,g+y)}}o=u-n,a=c-r}return e$2e(i)||(i=new f$1a),i.x=n,i.y=r,i.width=o,i.height=a,i},D$R.prototype.equals=function(e){return this===e||e$2e(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&o$1p.equals(this._position,e._position)&&e$1X.equals(this._fillColor,e._fillColor)&&e$1X.equals(this._outlineColor,e._outlineColor)&&e$1X.equals(this._backgroundColor,e._backgroundColor)&&o$1o.equals(this._backgroundPadding,e._backgroundPadding)&&o$1o.equals(this._pixelOffset,e._pixelOffset)&&o$1p.equals(this._eyeOffset,e._eyeOffset)&&o$Y.equals(this._translucencyByDistance,e._translucencyByDistance)&&o$Y.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&o$Y.equals(this._scaleByDistance,e._scaleByDistance)&&r$Z.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id},D$R.prototype.isDestroyed=function(){return!1},D$R.prototype.restFillColor=function(){var e=e$1X.clone(this._fillColor),t=this._oriFillColor;e$1X.equals(e,t)||(this._fillColor=e$1X.clone(t),w$N(this))},D$R.prototype.setLabelStyle=function(e){!e$2e(e)||(this._font=u$Z(e.font,this._font),this._fillColor=e$1X.clone(u$Z(e.fillColor,this._fillColor)),this._oriFillColor=e$1X.clone(this._fillColor),this._outlineColor=e$1X.clone(u$Z(e.outlineColor,this._outlineColor)),this._outlineWidth=u$Z(e.outlineWidth,this._outlineWidth),this._showBackground=u$Z(e.showBackground,this._showBackground),this._backgroundColor=e$1X.clone(u$Z(e.backgroundColor,this._backgroundColor)),this._backgroundPadding=u$Z(e.backgroundPadding,this._backgroundPadding),this._style=u$Z(e.fillStyle,this._style),this._verticalOrigin=u$Z(e.verticalOrigin,this._verticalOrigin),this._horizontalOrigin=u$Z(e.horizontalOrigin,this._horizontalOrigin),this._pixelOffset=o$1o.clone(u$Z(e.pixelOffset,this._pixelOffset)),this._eyeOffset=o$1p.clone(u$Z(e.eyeOffset,this._eyeOffset)),this._scale=u$Z(e.scale,this._scale),this._translucencyByDistance=o$Y.clone(u$Z(e.translucencyByDistance,this._translucencyByDistance)),this._pixelOffsetScaleByDistance=o$Y.clone(u$Z(e.pixelOffsetScaleByDistance,this._pixelOffsetScaleByDistance)),this._scaleByDistance=o$Y.clone(u$Z(e.scaleByDistance,this._scaleByDistance)),this._heightReference=u$Z(e.heightReference,this._heightReference),this._distanceDisplayCondition=r$Z.clone(u$Z(e.distanceDisplayCondition,this._distanceDisplayCondition)),this._disableDepthTestDistance=u$Z(e.disableDepthTestDistance,this._disableDepthTestDistance),I$10(this),w$N(this))},D$R.enableRightToLeftDetection=!1;var $$N="א-ת",H$U="؀-ۿݐ-ݿࢠ-ࣿ",L$Y=new RegExp("["+$$N+H$U+"]");function X$N(e){for(var t=e.split("\n"),i="",n=0;n<t.length;n++){for(var r=t[n],o=L$Y.test(r.charAt(0)),a=j$R(r,L$Y),s=0,l="",u=0;u<a.length;++u){var c=a[u],h=c.Type===g$X.BRACKETS?Q$P(c.Word):J$L(c.Word);o?c.Type===g$X.RTL?(l=h+l,s=0):c.Type===g$X.LTR?(l=A$X(l,s,c.Word),s+=c.Word.length):(c.Type===g$X.WEAK||c.Type===g$X.BRACKETS)&&(c.Type===g$X.WEAK&&a[u-1].Type===g$X.BRACKETS?l=h+l:a[u-1].Type===g$X.RTL?(l=h+l,s=0):a.length>u+1?a[u+1].Type===g$X.RTL?(l=h+l,s=0):(l=A$X(l,s,c.Word),s+=c.Word.length):l=A$X(l,0,h)):c.Type===g$X.RTL?l=A$X(l,s,h):c.Type===g$X.LTR?s=(l+=c.Word).length:(c.Type===g$X.WEAK||c.Type===g$X.BRACKETS)&&(u>0&&a[u-1].Type===g$X.RTL?a.length>u+1?a[u+1].Type===g$X.RTL?l=A$X(l,s,h):s=(l+=c.Word).length:l+=c.Word:s=(l+=c.Word).length)}i+=l,n<t.length-1&&(i+="\n")}return i}function T$O(){var e=3,t=4,i=12,n=13,r=16,o=17;function a(e,t){return 55296<=e.charCodeAt(t)&&e.charCodeAt(t)<=56319&&56320<=e.charCodeAt(t+1)&&e.charCodeAt(t+1)<=57343}function s(e,t){void 0===t&&(t=0);var i=e.charCodeAt(t);if(55296<=i&&i<=56319&&t<e.length-1){var n=i;return 56320<=(r=e.charCodeAt(t+1))&&r<=57343?1024*(n-55296)+(r-56320)+65536:n}if(56320<=i&&i<=57343&&t>=1){var r=i;return 55296<=(n=e.charCodeAt(t-1))&&n<=56319?1024*(n-55296)+(r-56320)+65536:r}return i}function l(a,s,l){var u=[a].concat(s).concat([l]),c=u[u.length-2],h=l,d=u.lastIndexOf(14);if(d>1&&u.slice(1,d).every((function(t){return t==e}))&&-1==[e,n,o].indexOf(a))return 2;var f=u.lastIndexOf(t);if(f>0&&u.slice(1,f).every((function(e){return e==t}))&&-1==[i,t].indexOf(c))return u.filter((function(e){return e==t})).length%2==1?3:4;if(0==c&&1==h)return 0;if(2==c||0==c||1==c)return 14==h&&s.every((function(t){return t==e}))?2:1;if(2==h||0==h||1==h)return 1;if(6==c&&(6==h||7==h||9==h||10==h))return 0;if(!(9!=c&&7!=c||7!=h&&8!=h))return 0;if((10==c||8==c)&&8==h)return 0;if(h==e||15==h)return 0;if(5==h)return 0;if(c==i)return 0;var p=-1!=u.indexOf(e)?u.lastIndexOf(e)-1:u.length-2;return-1!=[n,o].indexOf(u[p])&&u.slice(p+1,-1).every((function(t){return t==e}))&&14==h||15==c&&-1!=[r,o].indexOf(h)?0:-1!=s.indexOf(t)?2:c==t&&h==t?0:1}function u(a){return 1536<=a&&a<=1541||1757==a||1807==a||2274==a||3406==a||69821==a||70082<=a&&a<=70083||72250==a||72326<=a&&a<=72329||73030==a?i:13==a?0:10==a?1:0<=a&&a<=9||11<=a&&a<=12||14<=a&&a<=31||127<=a&&a<=159||173==a||1564==a||6158==a||8203==a||8206<=a&&a<=8207||8232==a||8233==a||8234<=a&&a<=8238||8288<=a&&a<=8292||8293==a||8294<=a&&a<=8303||55296<=a&&a<=57343||65279==a||65520<=a&&a<=65528||65529<=a&&a<=65531||113824<=a&&a<=113827||119155<=a&&a<=119162||917504==a||917505==a||917506<=a&&a<=917535||917632<=a&&a<=917759||918e3<=a&&a<=921599?2:768<=a&&a<=879||1155<=a&&a<=1159||1160<=a&&a<=1161||1425<=a&&a<=1469||1471==a||1473<=a&&a<=1474||1476<=a&&a<=1477||1479==a||1552<=a&&a<=1562||1611<=a&&a<=1631||1648==a||1750<=a&&a<=1756||1759<=a&&a<=1764||1767<=a&&a<=1768||1770<=a&&a<=1773||1809==a||1840<=a&&a<=1866||1958<=a&&a<=1968||2027<=a&&a<=2035||2070<=a&&a<=2073||2075<=a&&a<=2083||2085<=a&&a<=2087||2089<=a&&a<=2093||2137<=a&&a<=2139||2260<=a&&a<=2273||2275<=a&&a<=2306||2362==a||2364==a||2369<=a&&a<=2376||2381==a||2385<=a&&a<=2391||2402<=a&&a<=2403||2433==a||2492==a||2494==a||2497<=a&&a<=2500||2509==a||2519==a||2530<=a&&a<=2531||2561<=a&&a<=2562||2620==a||2625<=a&&a<=2626||2631<=a&&a<=2632||2635<=a&&a<=2637||2641==a||2672<=a&&a<=2673||2677==a||2689<=a&&a<=2690||2748==a||2753<=a&&a<=2757||2759<=a&&a<=2760||2765==a||2786<=a&&a<=2787||2810<=a&&a<=2815||2817==a||2876==a||2878==a||2879==a||2881<=a&&a<=2884||2893==a||2902==a||2903==a||2914<=a&&a<=2915||2946==a||3006==a||3008==a||3021==a||3031==a||3072==a||3134<=a&&a<=3136||3142<=a&&a<=3144||3146<=a&&a<=3149||3157<=a&&a<=3158||3170<=a&&a<=3171||3201==a||3260==a||3263==a||3266==a||3270==a||3276<=a&&a<=3277||3285<=a&&a<=3286||3298<=a&&a<=3299||3328<=a&&a<=3329||3387<=a&&a<=3388||3390==a||3393<=a&&a<=3396||3405==a||3415==a||3426<=a&&a<=3427||3530==a||3535==a||3538<=a&&a<=3540||3542==a||3551==a||3633==a||3636<=a&&a<=3642||3655<=a&&a<=3662||3761==a||3764<=a&&a<=3769||3771<=a&&a<=3772||3784<=a&&a<=3789||3864<=a&&a<=3865||3893==a||3895==a||3897==a||3953<=a&&a<=3966||3968<=a&&a<=3972||3974<=a&&a<=3975||3981<=a&&a<=3991||3993<=a&&a<=4028||4038==a||4141<=a&&a<=4144||4146<=a&&a<=4151||4153<=a&&a<=4154||4157<=a&&a<=4158||4184<=a&&a<=4185||4190<=a&&a<=4192||4209<=a&&a<=4212||4226==a||4229<=a&&a<=4230||4237==a||4253==a||4957<=a&&a<=4959||5906<=a&&a<=5908||5938<=a&&a<=5940||5970<=a&&a<=5971||6002<=a&&a<=6003||6068<=a&&a<=6069||6071<=a&&a<=6077||6086==a||6089<=a&&a<=6099||6109==a||6155<=a&&a<=6157||6277<=a&&a<=6278||6313==a||6432<=a&&a<=6434||6439<=a&&a<=6440||6450==a||6457<=a&&a<=6459||6679<=a&&a<=6680||6683==a||6742==a||6744<=a&&a<=6750||6752==a||6754==a||6757<=a&&a<=6764||6771<=a&&a<=6780||6783==a||6832<=a&&a<=6845||6846==a||6912<=a&&a<=6915||6964==a||6966<=a&&a<=6970||6972==a||6978==a||7019<=a&&a<=7027||7040<=a&&a<=7041||7074<=a&&a<=7077||7080<=a&&a<=7081||7083<=a&&a<=7085||7142==a||7144<=a&&a<=7145||7149==a||7151<=a&&a<=7153||7212<=a&&a<=7219||7222<=a&&a<=7223||7376<=a&&a<=7378||7380<=a&&a<=7392||7394<=a&&a<=7400||7405==a||7412==a||7416<=a&&a<=7417||7616<=a&&a<=7673||7675<=a&&a<=7679||8204==a||8400<=a&&a<=8412||8413<=a&&a<=8416||8417==a||8418<=a&&a<=8420||8421<=a&&a<=8432||11503<=a&&a<=11505||11647==a||11744<=a&&a<=11775||12330<=a&&a<=12333||12334<=a&&a<=12335||12441<=a&&a<=12442||42607==a||42608<=a&&a<=42610||42612<=a&&a<=42621||42654<=a&&a<=42655||42736<=a&&a<=42737||43010==a||43014==a||43019==a||43045<=a&&a<=43046||43204<=a&&a<=43205||43232<=a&&a<=43249||43302<=a&&a<=43309||43335<=a&&a<=43345||43392<=a&&a<=43394||43443==a||43446<=a&&a<=43449||43452==a||43493==a||43561<=a&&a<=43566||43569<=a&&a<=43570||43573<=a&&a<=43574||43587==a||43596==a||43644==a||43696==a||43698<=a&&a<=43700||43703<=a&&a<=43704||43710<=a&&a<=43711||43713==a||43756<=a&&a<=43757||43766==a||44005==a||44008==a||44013==a||64286==a||65024<=a&&a<=65039||65056<=a&&a<=65071||65438<=a&&a<=65439||66045==a||66272==a||66422<=a&&a<=66426||68097<=a&&a<=68099||68101<=a&&a<=68102||68108<=a&&a<=68111||68152<=a&&a<=68154||68159==a||68325<=a&&a<=68326||69633==a||69688<=a&&a<=69702||69759<=a&&a<=69761||69811<=a&&a<=69814||69817<=a&&a<=69818||69888<=a&&a<=69890||69927<=a&&a<=69931||69933<=a&&a<=69940||70003==a||70016<=a&&a<=70017||70070<=a&&a<=70078||70090<=a&&a<=70092||70191<=a&&a<=70193||70196==a||70198<=a&&a<=70199||70206==a||70367==a||70371<=a&&a<=70378||70400<=a&&a<=70401||70460==a||70462==a||70464==a||70487==a||70502<=a&&a<=70508||70512<=a&&a<=70516||70712<=a&&a<=70719||70722<=a&&a<=70724||70726==a||70832==a||70835<=a&&a<=70840||70842==a||70845==a||70847<=a&&a<=70848||70850<=a&&a<=70851||71087==a||71090<=a&&a<=71093||71100<=a&&a<=71101||71103<=a&&a<=71104||71132<=a&&a<=71133||71219<=a&&a<=71226||71229==a||71231<=a&&a<=71232||71339==a||71341==a||71344<=a&&a<=71349||71351==a||71453<=a&&a<=71455||71458<=a&&a<=71461||71463<=a&&a<=71467||72193<=a&&a<=72198||72201<=a&&a<=72202||72243<=a&&a<=72248||72251<=a&&a<=72254||72263==a||72273<=a&&a<=72278||72281<=a&&a<=72283||72330<=a&&a<=72342||72344<=a&&a<=72345||72752<=a&&a<=72758||72760<=a&&a<=72765||72767==a||72850<=a&&a<=72871||72874<=a&&a<=72880||72882<=a&&a<=72883||72885<=a&&a<=72886||73009<=a&&a<=73014||73018==a||73020<=a&&a<=73021||73023<=a&&a<=73029||73031==a||92912<=a&&a<=92916||92976<=a&&a<=92982||94095<=a&&a<=94098||113821<=a&&a<=113822||119141==a||119143<=a&&a<=119145||119150<=a&&a<=119154||119163<=a&&a<=119170||119173<=a&&a<=119179||119210<=a&&a<=119213||119362<=a&&a<=119364||121344<=a&&a<=121398||121403<=a&&a<=121452||121461==a||121476==a||121499<=a&&a<=121503||121505<=a&&a<=121519||122880<=a&&a<=122886||122888<=a&&a<=122904||122907<=a&&a<=122913||122915<=a&&a<=122916||122918<=a&&a<=122922||125136<=a&&a<=125142||125252<=a&&a<=125258||917536<=a&&a<=917631||917760<=a&&a<=917999?e:127462<=a&&a<=127487?t:2307==a||2363==a||2366<=a&&a<=2368||2377<=a&&a<=2380||2382<=a&&a<=2383||2434<=a&&a<=2435||2495<=a&&a<=2496||2503<=a&&a<=2504||2507<=a&&a<=2508||2563==a||2622<=a&&a<=2624||2691==a||2750<=a&&a<=2752||2761==a||2763<=a&&a<=2764||2818<=a&&a<=2819||2880==a||2887<=a&&a<=2888||2891<=a&&a<=2892||3007==a||3009<=a&&a<=3010||3014<=a&&a<=3016||3018<=a&&a<=3020||3073<=a&&a<=3075||3137<=a&&a<=3140||3202<=a&&a<=3203||3262==a||3264<=a&&a<=3265||3267<=a&&a<=3268||3271<=a&&a<=3272||3274<=a&&a<=3275||3330<=a&&a<=3331||3391<=a&&a<=3392||3398<=a&&a<=3400||3402<=a&&a<=3404||3458<=a&&a<=3459||3536<=a&&a<=3537||3544<=a&&a<=3550||3570<=a&&a<=3571||3635==a||3763==a||3902<=a&&a<=3903||3967==a||4145==a||4155<=a&&a<=4156||4182<=a&&a<=4183||4228==a||6070==a||6078<=a&&a<=6085||6087<=a&&a<=6088||6435<=a&&a<=6438||6441<=a&&a<=6443||6448<=a&&a<=6449||6451<=a&&a<=6456||6681<=a&&a<=6682||6741==a||6743==a||6765<=a&&a<=6770||6916==a||6965==a||6971==a||6973<=a&&a<=6977||6979<=a&&a<=6980||7042==a||7073==a||7078<=a&&a<=7079||7082==a||7143==a||7146<=a&&a<=7148||7150==a||7154<=a&&a<=7155||7204<=a&&a<=7211||7220<=a&&a<=7221||7393==a||7410<=a&&a<=7411||7415==a||43043<=a&&a<=43044||43047==a||43136<=a&&a<=43137||43188<=a&&a<=43203||43346<=a&&a<=43347||43395==a||43444<=a&&a<=43445||43450<=a&&a<=43451||43453<=a&&a<=43456||43567<=a&&a<=43568||43571<=a&&a<=43572||43597==a||43755==a||43758<=a&&a<=43759||43765==a||44003<=a&&a<=44004||44006<=a&&a<=44007||44009<=a&&a<=44010||44012==a||69632==a||69634==a||69762==a||69808<=a&&a<=69810||69815<=a&&a<=69816||69932==a||70018==a||70067<=a&&a<=70069||70079<=a&&a<=70080||70188<=a&&a<=70190||70194<=a&&a<=70195||70197==a||70368<=a&&a<=70370||70402<=a&&a<=70403||70463==a||70465<=a&&a<=70468||70471<=a&&a<=70472||70475<=a&&a<=70477||70498<=a&&a<=70499||70709<=a&&a<=70711||70720<=a&&a<=70721||70725==a||70833<=a&&a<=70834||70841==a||70843<=a&&a<=70844||70846==a||70849==a||71088<=a&&a<=71089||71096<=a&&a<=71099||71102==a||71216<=a&&a<=71218||71227<=a&&a<=71228||71230==a||71340==a||71342<=a&&a<=71343||71350==a||71456<=a&&a<=71457||71462==a||72199<=a&&a<=72200||72249==a||72279<=a&&a<=72280||72343==a||72751==a||72766==a||72873==a||72881==a||72884==a||94033<=a&&a<=94078||119142==a||119149==a?5:4352<=a&&a<=4447||43360<=a&&a<=43388?6:4448<=a&&a<=4519||55216<=a&&a<=55238?7:4520<=a&&a<=4607||55243<=a&&a<=55291?8:44032==a||44060==a||44088==a||44116==a||44144==a||44172==a||44200==a||44228==a||44256==a||44284==a||44312==a||44340==a||44368==a||44396==a||44424==a||44452==a||44480==a||44508==a||44536==a||44564==a||44592==a||44620==a||44648==a||44676==a||44704==a||44732==a||44760==a||44788==a||44816==a||44844==a||44872==a||44900==a||44928==a||44956==a||44984==a||45012==a||45040==a||45068==a||45096==a||45124==a||45152==a||45180==a||45208==a||45236==a||45264==a||45292==a||45320==a||45348==a||45376==a||45404==a||45432==a||45460==a||45488==a||45516==a||45544==a||45572==a||45600==a||45628==a||45656==a||45684==a||45712==a||45740==a||45768==a||45796==a||45824==a||45852==a||45880==a||45908==a||45936==a||45964==a||45992==a||46020==a||46048==a||46076==a||46104==a||46132==a||46160==a||46188==a||46216==a||46244==a||46272==a||46300==a||46328==a||46356==a||46384==a||46412==a||46440==a||46468==a||46496==a||46524==a||46552==a||46580==a||46608==a||46636==a||46664==a||46692==a||46720==a||46748==a||46776==a||46804==a||46832==a||46860==a||46888==a||46916==a||46944==a||46972==a||47e3==a||47028==a||47056==a||47084==a||47112==a||47140==a||47168==a||47196==a||47224==a||47252==a||47280==a||47308==a||47336==a||47364==a||47392==a||47420==a||47448==a||47476==a||47504==a||47532==a||47560==a||47588==a||47616==a||47644==a||47672==a||47700==a||47728==a||47756==a||47784==a||47812==a||47840==a||47868==a||47896==a||47924==a||47952==a||47980==a||48008==a||48036==a||48064==a||48092==a||48120==a||48148==a||48176==a||48204==a||48232==a||48260==a||48288==a||48316==a||48344==a||48372==a||48400==a||48428==a||48456==a||48484==a||48512==a||48540==a||48568==a||48596==a||48624==a||48652==a||48680==a||48708==a||48736==a||48764==a||48792==a||48820==a||48848==a||48876==a||48904==a||48932==a||48960==a||48988==a||49016==a||49044==a||49072==a||49100==a||49128==a||49156==a||49184==a||49212==a||49240==a||49268==a||49296==a||49324==a||49352==a||49380==a||49408==a||49436==a||49464==a||49492==a||49520==a||49548==a||49576==a||49604==a||49632==a||49660==a||49688==a||49716==a||49744==a||49772==a||49800==a||49828==a||49856==a||49884==a||49912==a||49940==a||49968==a||49996==a||50024==a||50052==a||50080==a||50108==a||50136==a||50164==a||50192==a||50220==a||50248==a||50276==a||50304==a||50332==a||50360==a||50388==a||50416==a||50444==a||50472==a||50500==a||50528==a||50556==a||50584==a||50612==a||50640==a||50668==a||50696==a||50724==a||50752==a||50780==a||50808==a||50836==a||50864==a||50892==a||50920==a||50948==a||50976==a||51004==a||51032==a||51060==a||51088==a||51116==a||51144==a||51172==a||51200==a||51228==a||51256==a||51284==a||51312==a||51340==a||51368==a||51396==a||51424==a||51452==a||51480==a||51508==a||51536==a||51564==a||51592==a||51620==a||51648==a||51676==a||51704==a||51732==a||51760==a||51788==a||51816==a||51844==a||51872==a||51900==a||51928==a||51956==a||51984==a||52012==a||52040==a||52068==a||52096==a||52124==a||52152==a||52180==a||52208==a||52236==a||52264==a||52292==a||52320==a||52348==a||52376==a||52404==a||52432==a||52460==a||52488==a||52516==a||52544==a||52572==a||52600==a||52628==a||52656==a||52684==a||52712==a||52740==a||52768==a||52796==a||52824==a||52852==a||52880==a||52908==a||52936==a||52964==a||52992==a||53020==a||53048==a||53076==a||53104==a||53132==a||53160==a||53188==a||53216==a||53244==a||53272==a||53300==a||53328==a||53356==a||53384==a||53412==a||53440==a||53468==a||53496==a||53524==a||53552==a||53580==a||53608==a||53636==a||53664==a||53692==a||53720==a||53748==a||53776==a||53804==a||53832==a||53860==a||53888==a||53916==a||53944==a||53972==a||54e3==a||54028==a||54056==a||54084==a||54112==a||54140==a||54168==a||54196==a||54224==a||54252==a||54280==a||54308==a||54336==a||54364==a||54392==a||54420==a||54448==a||54476==a||54504==a||54532==a||54560==a||54588==a||54616==a||54644==a||54672==a||54700==a||54728==a||54756==a||54784==a||54812==a||54840==a||54868==a||54896==a||54924==a||54952==a||54980==a||55008==a||55036==a||55064==a||55092==a||55120==a||55148==a||55176==a?9:44033<=a&&a<=44059||44061<=a&&a<=44087||44089<=a&&a<=44115||44117<=a&&a<=44143||44145<=a&&a<=44171||44173<=a&&a<=44199||44201<=a&&a<=44227||44229<=a&&a<=44255||44257<=a&&a<=44283||44285<=a&&a<=44311||44313<=a&&a<=44339||44341<=a&&a<=44367||44369<=a&&a<=44395||44397<=a&&a<=44423||44425<=a&&a<=44451||44453<=a&&a<=44479||44481<=a&&a<=44507||44509<=a&&a<=44535||44537<=a&&a<=44563||44565<=a&&a<=44591||44593<=a&&a<=44619||44621<=a&&a<=44647||44649<=a&&a<=44675||44677<=a&&a<=44703||44705<=a&&a<=44731||44733<=a&&a<=44759||44761<=a&&a<=44787||44789<=a&&a<=44815||44817<=a&&a<=44843||44845<=a&&a<=44871||44873<=a&&a<=44899||44901<=a&&a<=44927||44929<=a&&a<=44955||44957<=a&&a<=44983||44985<=a&&a<=45011||45013<=a&&a<=45039||45041<=a&&a<=45067||45069<=a&&a<=45095||45097<=a&&a<=45123||45125<=a&&a<=45151||45153<=a&&a<=45179||45181<=a&&a<=45207||45209<=a&&a<=45235||45237<=a&&a<=45263||45265<=a&&a<=45291||45293<=a&&a<=45319||45321<=a&&a<=45347||45349<=a&&a<=45375||45377<=a&&a<=45403||45405<=a&&a<=45431||45433<=a&&a<=45459||45461<=a&&a<=45487||45489<=a&&a<=45515||45517<=a&&a<=45543||45545<=a&&a<=45571||45573<=a&&a<=45599||45601<=a&&a<=45627||45629<=a&&a<=45655||45657<=a&&a<=45683||45685<=a&&a<=45711||45713<=a&&a<=45739||45741<=a&&a<=45767||45769<=a&&a<=45795||45797<=a&&a<=45823||45825<=a&&a<=45851||45853<=a&&a<=45879||45881<=a&&a<=45907||45909<=a&&a<=45935||45937<=a&&a<=45963||45965<=a&&a<=45991||45993<=a&&a<=46019||46021<=a&&a<=46047||46049<=a&&a<=46075||46077<=a&&a<=46103||46105<=a&&a<=46131||46133<=a&&a<=46159||46161<=a&&a<=46187||46189<=a&&a<=46215||46217<=a&&a<=46243||46245<=a&&a<=46271||46273<=a&&a<=46299||46301<=a&&a<=46327||46329<=a&&a<=46355||46357<=a&&a<=46383||46385<=a&&a<=46411||46413<=a&&a<=46439||46441<=a&&a<=46467||46469<=a&&a<=46495||46497<=a&&a<=46523||46525<=a&&a<=46551||46553<=a&&a<=46579||46581<=a&&a<=46607||46609<=a&&a<=46635||46637<=a&&a<=46663||46665<=a&&a<=46691||46693<=a&&a<=46719||46721<=a&&a<=46747||46749<=a&&a<=46775||46777<=a&&a<=46803||46805<=a&&a<=46831||46833<=a&&a<=46859||46861<=a&&a<=46887||46889<=a&&a<=46915||46917<=a&&a<=46943||46945<=a&&a<=46971||46973<=a&&a<=46999||47001<=a&&a<=47027||47029<=a&&a<=47055||47057<=a&&a<=47083||47085<=a&&a<=47111||47113<=a&&a<=47139||47141<=a&&a<=47167||47169<=a&&a<=47195||47197<=a&&a<=47223||47225<=a&&a<=47251||47253<=a&&a<=47279||47281<=a&&a<=47307||47309<=a&&a<=47335||47337<=a&&a<=47363||47365<=a&&a<=47391||47393<=a&&a<=47419||47421<=a&&a<=47447||47449<=a&&a<=47475||47477<=a&&a<=47503||47505<=a&&a<=47531||47533<=a&&a<=47559||47561<=a&&a<=47587||47589<=a&&a<=47615||47617<=a&&a<=47643||47645<=a&&a<=47671||47673<=a&&a<=47699||47701<=a&&a<=47727||47729<=a&&a<=47755||47757<=a&&a<=47783||47785<=a&&a<=47811||47813<=a&&a<=47839||47841<=a&&a<=47867||47869<=a&&a<=47895||47897<=a&&a<=47923||47925<=a&&a<=47951||47953<=a&&a<=47979||47981<=a&&a<=48007||48009<=a&&a<=48035||48037<=a&&a<=48063||48065<=a&&a<=48091||48093<=a&&a<=48119||48121<=a&&a<=48147||48149<=a&&a<=48175||48177<=a&&a<=48203||48205<=a&&a<=48231||48233<=a&&a<=48259||48261<=a&&a<=48287||48289<=a&&a<=48315||48317<=a&&a<=48343||48345<=a&&a<=48371||48373<=a&&a<=48399||48401<=a&&a<=48427||48429<=a&&a<=48455||48457<=a&&a<=48483||48485<=a&&a<=48511||48513<=a&&a<=48539||48541<=a&&a<=48567||48569<=a&&a<=48595||48597<=a&&a<=48623||48625<=a&&a<=48651||48653<=a&&a<=48679||48681<=a&&a<=48707||48709<=a&&a<=48735||48737<=a&&a<=48763||48765<=a&&a<=48791||48793<=a&&a<=48819||48821<=a&&a<=48847||48849<=a&&a<=48875||48877<=a&&a<=48903||48905<=a&&a<=48931||48933<=a&&a<=48959||48961<=a&&a<=48987||48989<=a&&a<=49015||49017<=a&&a<=49043||49045<=a&&a<=49071||49073<=a&&a<=49099||49101<=a&&a<=49127||49129<=a&&a<=49155||49157<=a&&a<=49183||49185<=a&&a<=49211||49213<=a&&a<=49239||49241<=a&&a<=49267||49269<=a&&a<=49295||49297<=a&&a<=49323||49325<=a&&a<=49351||49353<=a&&a<=49379||49381<=a&&a<=49407||49409<=a&&a<=49435||49437<=a&&a<=49463||49465<=a&&a<=49491||49493<=a&&a<=49519||49521<=a&&a<=49547||49549<=a&&a<=49575||49577<=a&&a<=49603||49605<=a&&a<=49631||49633<=a&&a<=49659||49661<=a&&a<=49687||49689<=a&&a<=49715||49717<=a&&a<=49743||49745<=a&&a<=49771||49773<=a&&a<=49799||49801<=a&&a<=49827||49829<=a&&a<=49855||49857<=a&&a<=49883||49885<=a&&a<=49911||49913<=a&&a<=49939||49941<=a&&a<=49967||49969<=a&&a<=49995||49997<=a&&a<=50023||50025<=a&&a<=50051||50053<=a&&a<=50079||50081<=a&&a<=50107||50109<=a&&a<=50135||50137<=a&&a<=50163||50165<=a&&a<=50191||50193<=a&&a<=50219||50221<=a&&a<=50247||50249<=a&&a<=50275||50277<=a&&a<=50303||50305<=a&&a<=50331||50333<=a&&a<=50359||50361<=a&&a<=50387||50389<=a&&a<=50415||50417<=a&&a<=50443||50445<=a&&a<=50471||50473<=a&&a<=50499||50501<=a&&a<=50527||50529<=a&&a<=50555||50557<=a&&a<=50583||50585<=a&&a<=50611||50613<=a&&a<=50639||50641<=a&&a<=50667||50669<=a&&a<=50695||50697<=a&&a<=50723||50725<=a&&a<=50751||50753<=a&&a<=50779||50781<=a&&a<=50807||50809<=a&&a<=50835||50837<=a&&a<=50863||50865<=a&&a<=50891||50893<=a&&a<=50919||50921<=a&&a<=50947||50949<=a&&a<=50975||50977<=a&&a<=51003||51005<=a&&a<=51031||51033<=a&&a<=51059||51061<=a&&a<=51087||51089<=a&&a<=51115||51117<=a&&a<=51143||51145<=a&&a<=51171||51173<=a&&a<=51199||51201<=a&&a<=51227||51229<=a&&a<=51255||51257<=a&&a<=51283||51285<=a&&a<=51311||51313<=a&&a<=51339||51341<=a&&a<=51367||51369<=a&&a<=51395||51397<=a&&a<=51423||51425<=a&&a<=51451||51453<=a&&a<=51479||51481<=a&&a<=51507||51509<=a&&a<=51535||51537<=a&&a<=51563||51565<=a&&a<=51591||51593<=a&&a<=51619||51621<=a&&a<=51647||51649<=a&&a<=51675||51677<=a&&a<=51703||51705<=a&&a<=51731||51733<=a&&a<=51759||51761<=a&&a<=51787||51789<=a&&a<=51815||51817<=a&&a<=51843||51845<=a&&a<=51871||51873<=a&&a<=51899||51901<=a&&a<=51927||51929<=a&&a<=51955||51957<=a&&a<=51983||51985<=a&&a<=52011||52013<=a&&a<=52039||52041<=a&&a<=52067||52069<=a&&a<=52095||52097<=a&&a<=52123||52125<=a&&a<=52151||52153<=a&&a<=52179||52181<=a&&a<=52207||52209<=a&&a<=52235||52237<=a&&a<=52263||52265<=a&&a<=52291||52293<=a&&a<=52319||52321<=a&&a<=52347||52349<=a&&a<=52375||52377<=a&&a<=52403||52405<=a&&a<=52431||52433<=a&&a<=52459||52461<=a&&a<=52487||52489<=a&&a<=52515||52517<=a&&a<=52543||52545<=a&&a<=52571||52573<=a&&a<=52599||52601<=a&&a<=52627||52629<=a&&a<=52655||52657<=a&&a<=52683||52685<=a&&a<=52711||52713<=a&&a<=52739||52741<=a&&a<=52767||52769<=a&&a<=52795||52797<=a&&a<=52823||52825<=a&&a<=52851||52853<=a&&a<=52879||52881<=a&&a<=52907||52909<=a&&a<=52935||52937<=a&&a<=52963||52965<=a&&a<=52991||52993<=a&&a<=53019||53021<=a&&a<=53047||53049<=a&&a<=53075||53077<=a&&a<=53103||53105<=a&&a<=53131||53133<=a&&a<=53159||53161<=a&&a<=53187||53189<=a&&a<=53215||53217<=a&&a<=53243||53245<=a&&a<=53271||53273<=a&&a<=53299||53301<=a&&a<=53327||53329<=a&&a<=53355||53357<=a&&a<=53383||53385<=a&&a<=53411||53413<=a&&a<=53439||53441<=a&&a<=53467||53469<=a&&a<=53495||53497<=a&&a<=53523||53525<=a&&a<=53551||53553<=a&&a<=53579||53581<=a&&a<=53607||53609<=a&&a<=53635||53637<=a&&a<=53663||53665<=a&&a<=53691||53693<=a&&a<=53719||53721<=a&&a<=53747||53749<=a&&a<=53775||53777<=a&&a<=53803||53805<=a&&a<=53831||53833<=a&&a<=53859||53861<=a&&a<=53887||53889<=a&&a<=53915||53917<=a&&a<=53943||53945<=a&&a<=53971||53973<=a&&a<=53999||54001<=a&&a<=54027||54029<=a&&a<=54055||54057<=a&&a<=54083||54085<=a&&a<=54111||54113<=a&&a<=54139||54141<=a&&a<=54167||54169<=a&&a<=54195||54197<=a&&a<=54223||54225<=a&&a<=54251||54253<=a&&a<=54279||54281<=a&&a<=54307||54309<=a&&a<=54335||54337<=a&&a<=54363||54365<=a&&a<=54391||54393<=a&&a<=54419||54421<=a&&a<=54447||54449<=a&&a<=54475||54477<=a&&a<=54503||54505<=a&&a<=54531||54533<=a&&a<=54559||54561<=a&&a<=54587||54589<=a&&a<=54615||54617<=a&&a<=54643||54645<=a&&a<=54671||54673<=a&&a<=54699||54701<=a&&a<=54727||54729<=a&&a<=54755||54757<=a&&a<=54783||54785<=a&&a<=54811||54813<=a&&a<=54839||54841<=a&&a<=54867||54869<=a&&a<=54895||54897<=a&&a<=54923||54925<=a&&a<=54951||54953<=a&&a<=54979||54981<=a&&a<=55007||55009<=a&&a<=55035||55037<=a&&a<=55063||55065<=a&&a<=55091||55093<=a&&a<=55119||55121<=a&&a<=55147||55149<=a&&a<=55175||55177<=a&&a<=55203?10:9757==a||9977==a||9994<=a&&a<=9997||127877==a||127938<=a&&a<=127940||127943==a||127946<=a&&a<=127948||128066<=a&&a<=128067||128070<=a&&a<=128080||128110==a||128112<=a&&a<=128120||128124==a||128129<=a&&a<=128131||128133<=a&&a<=128135||128170==a||128372<=a&&a<=128373||128378==a||128400==a||128405<=a&&a<=128406||128581<=a&&a<=128583||128587<=a&&a<=128591||128675==a||128692<=a&&a<=128694||128704==a||128716==a||129304<=a&&a<=129308||129310<=a&&a<=129311||129318==a||129328<=a&&a<=129337||129341<=a&&a<=129342||129489<=a&&a<=129501?n:127995<=a&&a<=127999?14:8205==a?15:9792==a||9794==a||9877<=a&&a<=9878||9992==a||10084==a||127752==a||127806==a||127859==a||127891==a||127908==a||127912==a||127979==a||127981==a||128139==a||128187<=a&&a<=128188||128295==a||128300==a||128488==a||128640==a||128658==a?r:128102<=a&&a<=128105?o:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var i=u(s(e,t)),n=[],r=t+1;r<e.length;r++)if(!a(e,r-1)){var o=u(s(e,r));if(l(i,n,o))return r;n.push(o)}return e.length},this.splitGraphemes=function(e){for(var t,i=[],n=0;(t=this.nextBreak(e,n))<e.length;)i.push(e.slice(n,t)),n=t;return n<e.length&&i.push(e.slice(n)),i},this.iterateGraphemes=function(e){var t=0,i={next:function(){var i,n;return(n=this.nextBreak(e,t))<e.length?(i=e.slice(t,n),t=n,{value:i,done:!1}):t<e.length?(i=e.slice(t),t=e.length,{value:i,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(i[Symbol.iterator]=function(){return i}),i},this.countGraphemes=function(e){for(var t,i=0,n=0;(t=this.nextBreak(e,n))<e.length;)n=t,i++;return n<e.length&&i++,i},this}function ue$w(){this.textureInfo=void 0,this.dimensions=void 0,this.billboard=void 0}function pe$v(e,t,i){this.labelCollection=e,this.index=t,this.dimensions=i}var ge$p=1.2,ie$y="ID_WHITE_PIXEL",q$V=new o$1o(4,4),ve$q=new f$1a(1,1,1,1);function ye$n(e,t){var i=document.createElement("canvas");i.width=q$V.x,i.height=q$V.y;var n=i.getContext("2d");n.fillStyle="#fff",n.fillRect(0,0,i.width,i.height),e.addImage(ie$y,i).then((function(e){t._whitePixelIndex=e}))}var D$Q={};function me$t(e,t,i,n,r,o,a){return D$Q.font=t,D$Q.fillColor=i,D$Q.strokeColor=n,D$Q.strokeWidth=r,D$Q.padding=V$L.PADDING,a===S$Q.CENTER?D$Q.textBaseline="middle":a===S$Q.TOP?D$Q.textBaseline="top":D$Q.textBaseline="bottom",D$Q.fill=o===R$S.FILL||o===R$S.FILL_AND_OUTLINE,D$Q.stroke=o===R$S.OUTLINE||o===R$S.FILL_AND_OUTLINE,D$Q.backgroundColor=e$1X.BLACK,x$W(e,D$Q)}function Z$N(e,t){t.textureInfo=void 0,t.dimensions=void 0;var i=t.billboard;e$2e(i)&&(i.show=!1,i.image=void 0,e$2e(i._removeCallbackFunc)&&(i._removeCallbackFunc(),i._removeCallbackFunc=void 0),e._spareBillboards.push(i),t.billboard=void 0)}function xe$n(e,t,i,n){e.addImage(t,i).then((function(e){n.index=e}))}var we$i=new T$O,J$K=new o$1p;function be$q(e,t){var i,n,r,o=t._renderedText,a=we$i.splitGraphemes(o),s=a.length,l=t._glyphs,u=l.length;if(t._relativeSize=t._fontSize/V$L.FONT_SIZE,s<u)for(n=s;n<u;++n)Z$N(e,l[n]);l.length=s;var c=t._showBackground&&o.split("\n").join("").length>0,h=t._backgroundBillboard,d=e._backgroundBillboardCollection;c?(e$2e(h)||(h=e$2e(t._backgroundImage)?d.add({collection:e,image:t._backgroundImage}):d.add({collection:e,image:ie$y,imageSubRegion:ve$q}),t._backgroundBillboard=h),e$2e(t._backgroundImage)||(h.color=t._backgroundColor),h.show=t._show,h.position=t._position,h.eyeOffset=t._eyeOffset,h.pixelOffset=t._pixelOffset,h.horizontalOrigin=j$V.LEFT,h.verticalOrigin=t._verticalOrigin,h.heightReference=t._heightReference,h.scale=t.totalScale,h.pickPrimitive=t,h.id=t._id,h.translucencyByDistance=t._translucencyByDistance,h.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,h.scaleByDistance=t._scaleByDistance,h.distanceDisplayCondition=t._distanceDisplayCondition,h.disableDepthTestDistance=t._disableDepthTestDistance,h.opacityState=t._opacityState):e$2e(h)&&(d.remove(h),t._backgroundBillboard=h=void 0);var f=e._glyphTextureCache,p=[0],_=0;for(r=0;r<s;++r){var m=a[r],g=t._verticalOrigin,x=JSON.stringify([m,t._fontFamily,t._fontStyle,t._fontWeight,+g]),y=f[x];if(!e$2e(y)){var v=me$t(m,t._fontStyle+" "+t._fontWeight+" "+V$L.FONT_SIZE+"px "+t._fontFamily,e$1X.WHITE,e$1X.WHITE,0,R$S.FILL,g);if(y=new pe$v(e,-1,v.dimensions),f[x]=y,v.width>0&&v.height>0){for(var $=b$_(v,{cutoff:V$L.CUTOFF,radius:V$L.RADIUS}),b=v.getContext("2d"),T=v.width,C=v.height,S=b.getImageData(0,0,T,C),w=0;w<T;w++)for(var E=0;E<C;E++){var P=E*T+w,A=255*$[P],L=4*P;S.data[L+0]=A,S.data[L+1]=A,S.data[L+2]=A,S.data[L+3]=A}b.putImageData(S,0,0)," "!==m&&xe$n(e._textureAtlas,x,v,y)}}if("\n"===m?p[++_]=0:p[_]=Math.max(p[_],y.dimensions.height),e$2e(i=l[r])?-1===y.index?Z$N(e,i):e$2e(i.textureInfo)&&(i.textureInfo=void 0):(i=new ue$w,l[r]=i),i.textureInfo=y,i.dimensions=y.dimensions,-1!==y.index){var M=i.billboard,R=e._spareBillboards;e$2e(M)||(R.length>0?M=R.pop():((M=e._billboardCollection.add({collection:e}))._labelDimensions=new o$1o,M._labelTranslate=new o$1o),i.billboard=M),M.show=t._show,M._heightReference=t._heightReference,M.position=t._position,M.eyeOffset=t._eyeOffset,M.pixelOffset=t._pixelOffset,M.horizontalOrigin=j$V.LEFT,M.verticalOrigin=t._verticalOrigin,M.scale=t.totalScale,M.pickPrimitive=t,M.id=t._id,M.image=x,M.translucencyByDistance=t._translucencyByDistance,M.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,M.scaleByDistance=t._scaleByDistance,M.distanceDisplayCondition=t._distanceDisplayCondition,M.disableDepthTestDistance=t._disableDepthTestDistance,M._batchIndex=t._batchIndex,M.outlineColor=t.outlineColor,M.opacityState=t._opacityState,t.style===R$S.FILL_AND_OUTLINE?(M.color=t._fillColor,M.outlineWidth=t.outlineWidth):t.style===R$S.FILL?(M.color=t._fillColor,M.outlineWidth=0):t.style===R$S.OUTLINE&&(M.color=e$1X.TRANSPARENT,M.outlineWidth=t.outlineWidth)}}e._isMVT&&Te$l(t,h,l,s,p),t._repositionAllGlyphs=!0}function Te$l(e,t,i,n,r){for(var o=0,a=0;a<r.length;a++)o+=r[a];for(var s=0;s<n;++s){var l=i[s];if(e$2e(l)&&e$2e(l.billboard)){var u=l.billboard,c=.2*o;J$K.y=c,u.eyeOffset=J$K,e$2e(t)&&(t.eyeOffset=J$K)}}}function ne$z(e,t,i){return t===j$V.CENTER?-e/2:t===j$V.RIGHT?-(e+i.x):i.x}var c$Q=new o$1o,Ce$h=new o$1o;function Ie$j(e){var t,i,n,r=e._glyphs,o=e._renderedText,a=0,s=0,l=[],u=Number.NEGATIVE_INFINITY,c=0,h=1,d=r.length,f=e._backgroundBillboard,p=o$1o.clone(e$2e(f)?e._backgroundPadding:o$1o.ZERO,Ce$h);for(p.x/=e._relativeSize,p.y/=e._relativeSize,n=0;n<d;++n)"\n"===o.charAt(n)?(l.push(a),++h,a=0):(i=(t=r[n]).dimensions,c=Math.max(c,i.height-i.descent),u=Math.max(u,i.descent),a+=i.width-i.bounds.minx,n<d-1&&(a+=r[n+1].dimensions.bounds.minx),s=Math.max(s,a));l.push(a);var _=c+u,m=e.totalScale,g=e._horizontalOrigin,x=e._verticalOrigin,y=0,v=l[y],$=ne$z(v,g,p),b=ge$p*_,T=b*(h-1),C=s,S=_+T;e$2e(f)&&(C+=2*p.x,S+=2*p.y,f._labelHorizontalOrigin=g),c$Q.x=$*m,c$Q.y=0;var w=!0,E=0;for(n=0;n<d;++n)if("\n"===o.charAt(n))E+=b,$=ne$z(v=l[++y],g,p),c$Q.x=$*m,w=!0;else if(i=(t=r[n]).dimensions,x===S$Q.TOP?(c$Q.y=i.height-c-p.y,c$Q.y+=V$L.PADDING):x===S$Q.CENTER?c$Q.y=(T+i.height-c)/2:x===S$Q.BASELINE?(c$Q.y=T,c$Q.y-=V$L.PADDING):(c$Q.y=T+u+p.y,c$Q.y-=V$L.PADDING),c$Q.y=(c$Q.y-i.descent-E)*m,w&&(c$Q.x-=V$L.PADDING*m,w=!1),e$2e(t.billboard)&&(t.billboard._setTranslate(c$Q),t.billboard._labelDimensions.x=C,t.billboard._labelDimensions.y=S,t.billboard._labelHorizontalOrigin=g),n<d-1){var P=r[n+1];c$Q.x+=(i.width-i.bounds.minx+P.dimensions.bounds.minx)*m}if(e$2e(f)&&o.split("\n").join("").length>0&&($=g===j$V.CENTER?-s/2-p.x:g===j$V.RIGHT?-(s+2*p.x):0,c$Q.x=$*m,x===S$Q.TOP?c$Q.y=_-c-u:x===S$Q.CENTER?c$Q.y=(_-c)/2-u:x===S$Q.BASELINE?c$Q.y=-p.y-u:c$Q.y=0,c$Q.y=c$Q.y*m,f.width=C,f.height=S,f._setTranslate(c$Q),f._labelTranslate=o$1o.clone(c$Q,f._labelTranslate)),e.heightReference===k$R.CLAMP_TO_GROUND)for(n=0;n<d;++n){var A=(t=r[n]).billboard;e$2e(A)&&(A._labelTranslate=o$1o.clone(c$Q,A._labelTranslate))}}function se$u(e,t){for(var i=t._glyphs,n=0,r=i.length;n<r;++n)Z$N(e,i[n]);e$2e(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,e$2e(t._removeCallbackFunc)&&t._removeCallbackFunc(),i$11(t)}function g$W(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._id=e.id,this._s3MlayerId=-1,this._scene=e.scene,this._isMVT=e.isMVT,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._backgroundTextureAtlas=void 0,this._whitePixelIndex=void 0,this._swipeEnabled=u$Z(e.swipeEnabled,!1),this._swipeRegion=u$Z(e.swipeRegion,new f$1a(0,0,1,1)),this._billboardMode=u$Z(e.billboardMode,yr$2.None),this._backgroundBillboardCollection=new w$O({scene:this._scene,isMVT:this._isMVT,depthTestEnable:e.depthTestEnable,swipeEnabled:this._swipeEnabled,swipeRegion:this._swipeRegion,billboardMode:this._billboardMode}),this._backgroundBillboardCollection.destroyTextureAtlas=!1,this._billboardCollection=new w$O({scene:this._scene,batchTable:this._batchTable,isMVT:this._isMVT,depthTestEnable:e.depthTestEnable,swipeEnabled:this._swipeEnabled,swipeRegion:this._swipeRegion,billboardMode:this._billboardMode}),this._billboardCollection.destroyTextureAtlas=!1,this._billboardCollection._sdf=!0,this._spareBillboards=[],this._glyphTextureCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=e$1X.clone(e$1X.WHITE),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.blendOption=u$Z(e.blendOption,S$L.OPAQUE_AND_TRANSLUCENT),this._isS3MTileLabels=u$Z(e.isS3MTileLabels,!1),this._labelsID={},this._pickedlabelsID=[],this._isPicked=!1,this._selectedColor=e$1X.clone(u$Z(e.selectedColor,new e$1X(.7,.7,1,1))),this._labelSelected=new o$1h,this._visibleViewport=4095}function De$l(e){return e.coord.x}function Oe$k(e){return e.coord.y}Object.defineProperties(g$W.prototype,{length:{get:function(){return this._labels.length}},s3MlayerId:{get:function(){return this._s3MlayerId},set:function(e){o$1q.defined("labelCollection Id value",e),this._s3MlayerId=e}},selectedColor:{get:function(){return this._selectedColor},set:function(e){o$1q.defined("selectedColor value",e),e$1X.clone(e,this._selectedColor)}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(e$2e(e)&&e instanceof f$1a))throw new t$15("Expected LabelCollection.swipeRegion to be type of BoundingRectangle.");f$1a.equals(e,this._swipeRegion)||(f$1a.clone(e,this._swipeRegion),this._billboardCollection.swipeRegion=this._swipeRegion,this._backgroundBillboardCollection.swipeRegion=this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){o$1q.typeOf.bool("LabelCollection.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e,this._billboardCollection.swipeEnabled=e,this._backgroundBillboardCollection.swipeEnabled=e)}},billboardMode:{get:function(){return this._billboardMode}},fadeChage:{get:function(){return this._billboardCollection.fadeChage},set:function(e){this._billboardCollection.fadeChage=e}}}),g$W.prototype.add=function(e){e=u$Z(e,{});var t=this._labels.length;e.index=t;var i=new D$R(e,this);return this._labels.push(i),this._labelsToUpdate.push(i),e$2e(i.id)&&(this._labelsID[i.id]=i),i},g$W.prototype.remove=function(e){if(e$2e(e)&&e._labelCollection===this){var t=this._labels.indexOf(e);if(-1!==t)return this._labels.splice(t,1),se$u(this,e),e$2e(e.id)&&Object.keys(this._labelsID).length>0&&delete this._labelsID[e.id],!0}return!1},g$W.prototype.removeAll=function(){for(var e=this._labels,t=0,i=e.length;t<i;++t)se$u(this,e[t]);e.length=0,this._labelsID={},this._pickedlabelsID.length=0,this._isPicked=!1},g$W.prototype.contains=function(e){return e$2e(e)&&e._labelCollection===this},g$W.prototype.containsLabel=function(e){return this._labelsID.hasOwnProperty(e)},g$W.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return this._labels[e]},g$W.prototype.getById=function(e){if(!e$2e(e))throw new t$15("id is required.");return e$2e(this._labelsID[e])?this._labelsID[e]:null},g$W.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},g$W.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},g$W.prototype.update=function(e,t,i){if(e.multiViewportIndex>-1&&this._labels.length>0){if(e$2e(this._labels[0]._id)&&e$2e(this._labels[0]._id.entityCollection)){var n=this._labels[0]._id.entityCollection.owner;if(typeof n.getVisibleInViewport<"u")if(!n.getVisibleInViewport(e.multiViewportIndex))return}if(!this.getVisibleInViewport(e.multiViewportIndex))return}var r=this._billboardCollection,o=this._backgroundBillboardCollection;r.modelMatrix=this.modelMatrix,r.debugShowBoundingVolume=this.debugShowBoundingVolume,o.modelMatrix=this.modelMatrix,o.debugShowBoundingVolume=this.debugShowBoundingVolume;t=e.context;e$2e(this._textureAtlas)||(this._textureAtlas=new v$I({context:t}),r.textureAtlas=this._textureAtlas),e$2e(this._backgroundTextureAtlas)||(this._backgroundTextureAtlas=new v$I({context:t,initialSize:q$V}),o.textureAtlas=this._backgroundTextureAtlas,ye$n(this._backgroundTextureAtlas,this));for(var a=this._labelsToUpdate.length,s=0;s<a;++s){var l=this._labelsToUpdate[s];if(!l.isDestroyed()){var u=l._glyphs.length;l._rebindAllGlyphs&&(be$q(this,l),l._rebindAllGlyphs=!1),l._repositionAllGlyphs&&(Ie$j(l),l._repositionAllGlyphs=!1),l.computeLocalScreenSpaceBoundingBox(l,l._localScreenSpaceBBox);var c=l._glyphs.length-u;this._totalGlyphCount+=c}}var h=o.length>0?S$L.TRANSLUCENT:this.blendOption;r.blendOption=h,o.blendOption=h,r._highlightColor=this._highlightColor,o._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,o.update(e,t,i),r.update(e,t,i)},g$W.prototype.isDestroyed=function(){return!1},g$W.prototype.destroy=function(){return this.removeAll(),this._billboardCollection=this._billboardCollection.destroy(),this._textureAtlas=this._textureAtlas&&this._textureAtlas.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),this._backgroundTextureAtlas=this._backgroundTextureAtlas&&this._backgroundTextureAtlas.destroy(),i$11(this)},g$W.prototype.setLabelStyle=function(e){for(var t=this._labels.length,i=0;i<t;++i){var n=this._labels[i];n.isDestroyed()||n.setLabelStyle(e)}},g$W.prototype.setLabelVisible=function(e,t){if(!e$2e(e))throw new t$15("index is required.");this._labels[e].show=t},g$W.prototype.setAllLabelsVisible=function(e){for(var t=this._labels.length,i=0;i<t;++i){var n=this._labels[i];n.isDestroyed()||(n.show=e)}},g$W.prototype.setVisibleIndex=function(e){for(var t={},i=0,n=e.length;i<n;i++)t[e[i]]=!0;for(var r in this._labelsID)e$2e(t[r])?this._labelsID[r].show=!0:this._labelsID[r].show=!1},g$W.prototype.setVisibleLabels=function(e){if(0!==e.length&&0!==this._labels.length){for(var t=this._scene._view.viewport,i=t.x,n=t.x+t.width,r=t.y,o=t.y+t.height,a=[],s=0,l=e.length;s<l;++s){var u=e[s];if(e$2e(this._labelsID[u])){var c,h=(_=this._labelsID[u]).computeScreenSpacePosition(this._scene,c);!e$2e(h)||h.x>=i&&h.x<=n&&h.y>=r&&h.y<=o&&a.push({index:u,clustered:!0,coord:h})}}var d=O$D(a,De$l,Oe$k,4096,Int32Array),f=[],p=a.length;for(s=0;s<p;++s){for(var _,m=a[s],g=m.index,x=m.coord,y=(_=this._labelsID[g]).getScreenSpaceBoundingBox(_,x,c),v=d.intersect(y.x,y.y,y.x+y.width,y.y+y.height),$=v.length,b=0,T=0;T<$;++T){var C=v[T],S=a[C];s!==C&&!S.clustered&&++b}b<1&&(m.clustered=!1,f.push(g))}this.setVisibleIndex(f)}},g$W.prototype.setSelection=function(e){if(this.releaseSelection(),0!==Object.keys(this._labelsID).length){if(this._labelsID.hasOwnProperty(e)){var t=this._labelsID[e];if(t.isDestroyed())return;if(t.id===e){t.isPicked=!0;var i=e$1X.clone(this._selectedColor);t.fillColor=i,this._pickedlabelsID.push(e),this._labelSelected.raiseEvent({id:t.id,text:t.text,scale:t.scale,font:t.font,fillColor:t.fillColor})}}this._isPicked=!0}},g$W.prototype.releaseSelection=function(){if(this._isPicked&&0!==Object.keys(this._labelsID).length){for(var e=this._pickedlabelsID.length,t=0;t<e;++t){var i=this._pickedlabelsID[t];if(this._labelsID.hasOwnProperty(i)){var n=this._labelsID[i];n.isDestroyed()||(n.isPicked&&n.restFillColor(),n.isPicked=!1)}}this._pickedlabelsID=[]}};const _0x542d63=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3e5512=_0x542d63(void 0,(function(){return _0x3e5512.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e5512).search("(((.+)+)+)+$")}));function BillboardCollectionPool(e,t){this._use=[],this._unUse=[],this._owner=t,this._scene=e.scene,this._showCallout=u$Z(e.showCallout,!1)}function i$P(e){if(!e$2e(e.provider))throw new t$15("options.provder and options.viewer is required.");this._layerConfig=e.layerConfig,this._provider=e.provider,this._provider.lineAntialiasing=e.lineAntialiasing||!1,this._inner=e.layer,this._imagelayerCollection=e.imagelayerCollection,this._name=e.name,e$2e(e.layerConfig)&&e$2e(e.layerConfig.id)&&(this._name=e.layerConfig.id),this._style3D=u$Z(e.style3D,new e$1v),this._swipeEnabled=u$Z(e.swipeEnabled,!1),this._billboardMode=u$Z(e.billboardMode,yr$2.None),this._labelDepthTestEnabled=u$Z(e.labelDepthTestEnabled,!0),this._swipeRegion=u$Z(e.swipeRegion,new f$1a(0,0,1,1)),this._provider.enableMorphing=u$Z(e.enableMorphing,!1),this._isTdt=!1,this._inner.swipeEnabled=this._swipeEnabled,this._inner.swipeRegion=this._swipeRegion,this._provider._style3D=this._style3D,this.labelSelected=new o$1h,this._visibleViewport=4095,this._selectedColor=this._provider._selectedColor,this._overlapDisplayedThreshold=this._provider._overlapDisplayedThreshold,this._billboardCollectionPool=new BillboardCollectionPool(e,this),this._provider._billboardCollectionPool=this._billboardCollectionPool}_0x3e5512(),Object.defineProperties(BillboardCollectionPool.prototype,{showCallout:{get:function(){return!1},set:function(e){}},swipeRegion:{get:function(){return!1},set:function(e){}},swipeEnabled:{get:function(){return!1},set:function(e){}}}),BillboardCollectionPool.prototype.pushBack=function(e){let t=this._use.indexOf(e);-1!=t&&(this._use.splice(t,1),this._unUse.push(e))},BillboardCollectionPool.prototype.getOne=function(){let e;return this._unUse.length>0?(e=this._unUse[0],this._unUse.splice(0,1),this._use.push(e),e):(e=new w$O({scene:this._scene,style3D:this._owner._style3D,isMVT:!0,swipeEnabled:this._owner._swipeEnabled,swipeRegion:this._owner._swipeRegion,billboardMode:this._owner._billboardMode,depthTestEnable:!1}),e.showCallout=this._showCallout,this._use.push(e),e)},BillboardCollectionPool.prototype.setVisibleInViewport=function(e,t){},BillboardCollectionPool.prototype.getVisibleInViewport=function(e){return 0},BillboardCollectionPool.prototype.destroy=function(){for(var e=0;e<this._use.length;e++)this._use[e].destroy();for(e=0;e<this._unUse.length;e++)this._unUse[e].destroy();this._use=[],this._unUse=[]},Object.defineProperties(i$P.prototype,{detailLevelOffset:{get:function(){return this._inner._detailLevelOffset},set:function(e){e$2e(e)&&"number"==typeof e&&(this._inner._detailLevelOffset=e)}},tileWidth:{get:function(){return this._provider._tileWidth}},tileHeight:{get:function(){return this._provider._tileHeight}},maximumLevel:{get:function(){return this._provider._ready?this._provider._maximumLevel:-1}},minimumLevel:{get:function(){return this._provider._ready?this._provider._minimumLevel:-1}},tilingScheme:{get:function(){return this._provider._tilingScheme}},rectangle:{get:function(){return this._provider._ready?this._provider._rectangle:null}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._provider._errorEvent}},ready:{get:function(){return this._provider._ready}},readyPromise:{get:function(){return this._provider.readyPromise}},hasAlphaChannel:{get:function(){return!0}},show:{get:function(){return this._inner.show},set:function(e){this._inner.show=e}},mapboxStyle:{get:function(){return this._provider instanceof M$S?this._provider._MVTStyle.serialize():this._provider.mapboxStyle},set:function(e){this._provider.mapboxStyle=e}},alpha:{get:function(){return this._inner.alpha},set:function(e){o$1q.defined("alpha",e),o$1q.typeOf.number("alpha",e),this._inner.alpha=e$2d.clamp(e,0,1)}},selectedColor:{get:function(){return this._provider._selectedColor},set:function(e){e instanceof e$1X&&(this._provider._selectedColor=e)}},overlapDisplayedThreshold:{get:function(){return this._provider._overlapDisplayedThreshold},set:function(e){o$1q.typeOf.number("vectortilesmap overlapDisplayedThreshold",e),this._provider._overlapDisplayedThreshold=e}},name:{get:function(){return this._name},set:function(e){this._name=e}},pausing:{get:function(){return this._inner._pausing},set:function(e){this._inner._pausing=e,this._provider._pausing=e}},indexedDBSetting:{get:function(){return this._provider._indexedDBSetting},set:function(e){e$2e(e)&&"boolean"==typeof e.isOpen&&(this._provider._indexedDBSetting.isOpen=e.isOpen)}},layerConfig:{get:function(){return this._layerConfig}},selectEnabled:{get:function(){return this._selectEnabled},set:function(e){this._selectEnabled=e,this._provider._selectEnabled=e}},showCallout:{get:function(){return this._showCallout},set:function(e){this._billboardCollectionPool.showCallout=e}},style3D:{get:function(){return this._style3D},set:function(e){this._style3D=e,this._provider._style3D=this._style3D,this._billboardCollectionPool.style3D=this._style3D}},globalLineWidthExpand:{get:function(){return 0},set:function(e){}},globalLineWidthScale:{get:function(){return this._provider.globalLineWidthScale},set:function(e){e<=0&&(e=.01),e>100&&(e=100),this._provider.globalLineWidthScale=e}},lineAntialiasing:{get:function(){return this._provider.lineAntialiasing},set:function(e){this._provider.lineAntialiasing=e}},swipeRegion:{get:function(){return this._swipeRegion},set:function(e){if(!(e$2e(e)&&e instanceof f$1a))throw new t$15("Expected VectorTilesMap.swipeRegion to be type of BoundingRectangle.");f$1a.equals(e,this._swipeRegion)||(f$1a.clone(e,this._swipeRegion),this._billboardCollectionPool.swipeRegion=this._swipeRegion,this._inner.swipeRegion=this._swipeRegion)}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){o$1q.typeOf.bool("VectorTilesMap.swipeEnabled",e),e!==this._swipeEnabled&&(this._swipeEnabled=e,this._billboardCollectionPool.swipeEnabled=e,this._inner.swipeEnabled=this._swipeEnabled)}},isOverlapDisplayed:{get:function(){return this._provider.isOverlapDisplayed},set:function(e){this._provider.isOverlapDisplayed=e}},enableMorphing:{get:function(){return this._provider.enableMorphing},set:function(e){this._provider.enableMorphing=e}},queryTolerance:{get:function(){return this._provider.selectTolerance},set:function(e){this._provider.selectTolerance=e}},imageryLayer:{get:function(){return this._inner}}}),i$P.prototype.addLayer=function(e,t,i){this._provider._MVTStyle.addLayer(e,t,i)},i$P.prototype.removeLayer=function(e){this._provider._MVTStyle.removeLayer(e)},i$P.prototype.setFilter=function(e,t,i){if(!0===i){var n=[],r=this._provider._viewer.scene.camera.computeViewRectangle();if(e$2e(r)){var o=h$18.southwest(r),a=h$18.southeast(r),s=h$18.northeast(r),l=h$18.northwest(r);n=this._provider.queryRenderedFeatures([o,a,s,l],{layers:[e.replace(/(.*)(_highlight)/,"$1")]});for(var u=["in","$id"],c=(t=_0x51a3ff.createFilter(t),0);c<n.length;c++){var h=n[c].feature;t(new _0x47eac1(0),h)&&u.push(h.id)}this.setFilter(e,u)}}else this._provider._currentPickID=void 0,this._provider._MVTStyle.setFilter(e,t)},i$P.prototype.getFilter=function(e){return this._provider._MVTStyle.getFilter(e)},i$P.prototype.setLayoutProperty=function(e,t,i,n){this._provider._MVTStyle.setLayoutProperty(e,t,i,n)},i$P.prototype.getLayoutProperty=function(e,t){return this._provider._MVTStyle.getLayoutProperty(e,t)},i$P.prototype.setPaintProperty=function(e,t,i,n){this._provider._MVTStyle.setPaintProperty(e,t,i,n)},i$P.prototype.getPaintProperty=function(e,t){return this._provider._MVTStyle.getPaintProperty(e,t)},i$P.prototype.queryRenderedFeatures=function(e,t){for(var i=[],n=0,r=e.length;n<r;n++){var o=e[n],a=a$18.fromCartesian(o);i.push(a)}return this._provider.queryRenderedFeatures(i,t)},i$P.prototype.querySourceFeatures=function(e){return this._provider.querySourceFeatures(e)},i$P.prototype.update=function(e,t){},i$P.prototype.getProperty=function(e){return this._provider.getProperty(e)},i$P.prototype.setVisibleInViewport=function(e,t){e$2e(this._inner)&&this._inner.setVisibleInViewport(e,t),this._billboardCollectionPool.setVisibleInViewport(e,t)},i$P.prototype.getVisibleInViewport=function(e){e$2e(this._inner)&&this._inner.getVisibleInViewport(e),this._billboardCollectionPool.getVisibleInViewport(e)},i$P.prototype.refresh=function(){var e=this._inner._imageryCache;for(var t in e)e[t].isRendered=!1;for(var i of(this._imagelayerCollection.remove(this._inner,!0,!0),this._inner=this._imagelayerCollection.addImageryProvider(this._provider),this._provider.innerLayer=this._inner,this._provider._viewer.scene.layers.layerQueue))i._imageryLayer===this&&(i._removeCoverImageryLayer(),i.coverImageryLayer=this)},i$P.prototype.isDestroyed=function(){return!1},i$P.prototype.destroy=function(){return this._provider._billboardCollectionPool=null,e$2e(this._billboardCollectionPool)&&(this._billboardCollectionPool.destroy(),this._billboardCollectionPool=null),this._imagelayerCollection.remove(this._inner,!0,!0),i$11(this)},i$P.prototype.releaseSelection=function(){this._provider._MVTStyle.cancelHighLight(this._provider)};var ce$q=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],ve$p=["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"],he$p=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"],Te$k=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],Ae$o=["#text"],_e$p=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],q$U=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"],ge$o=["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"],M$R=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"];function o$Q(e,t){for(var i=t.length;i--;)"string"==typeof t[i]&&(t[i]=t[i].toLowerCase()),e[t[i]]=!0;return e}function ye$m(e){var t={},i=void 0;for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}var We$h=/\{\{[\s\S]*|[\s\S]*\}\}/gm,Be$i=/<%[\s\S]*|[\s\S]*%>/gm,Ge$d=/^data-[\-\w.\u00B7-\uFFFF]/,$e$b=/^aria-[\-\w]+$/,qe$c=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,Ve$e=/^(?:\w+script|data):/i,Xe$a=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,x$U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function c$P(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var Ye$d=function(){return typeof window>"u"?null:window};function Ee$l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ye$d(),t=function(e){return Ee$l(e)};if(t.version="1.0.8",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var i=e.document,n=!1,r=!1,o=e.document,a=e.DocumentFragment,s=e.HTMLTemplateElement,l=e.Node,u=e.NodeFilter,c=e.NamedNodeMap,h=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,d=e.Text,f=e.Comment,p=e.DOMParser;if("function"==typeof s){var _=o.createElement("template");_.content&&_.content.ownerDocument&&(o=_.content.ownerDocument)}var m=o,g=m.implementation,x=m.createNodeIterator,y=m.getElementsByTagName,v=m.createDocumentFragment,$=i.importNode,b={};t.isSupported=g&&typeof g.createHTMLDocument<"u"&&9!==o.documentMode;var T=We$h,C=Be$i,S=Ge$d,w=$e$b,E=Ve$e,P=Xe$a,A=qe$c,L=null,M=o$Q({},[].concat(c$P(ce$q),c$P(ve$p),c$P(he$p),c$P(Te$k),c$P(Ae$o))),R=null,O=o$Q({},[].concat(c$P(_e$p),c$P(q$U),c$P(ge$o),c$P(M$R))),D=null,I=null,B=!0,F=!0,N=!1,G=!1,z=!1,U=!1,V=!1,k=!1,W=!1,H=!1,q=!1,j=!0,X=!0,Y=!1,Z={},K=o$Q({},["audio","head","math","script","style","template","svg","video"]),Q=o$Q({},["audio","video","img","source","image"]),J=o$Q({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ee=null,te=o.createElement("form"),ie=function(e){"object"!==(typeof e>"u"?"undefined":x$U(e))&&(e={}),L="ALLOWED_TAGS"in e?o$Q({},e.ALLOWED_TAGS):M,R="ALLOWED_ATTR"in e?o$Q({},e.ALLOWED_ATTR):O,D="FORBID_TAGS"in e?o$Q({},e.FORBID_TAGS):{},I="FORBID_ATTR"in e?o$Q({},e.FORBID_ATTR):{},Z="USE_PROFILES"in e&&e.USE_PROFILES,B=!1!==e.ALLOW_ARIA_ATTR,F=!1!==e.ALLOW_DATA_ATTR,N=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=e.SAFE_FOR_JQUERY||!1,z=e.SAFE_FOR_TEMPLATES||!1,U=e.WHOLE_DOCUMENT||!1,W=e.RETURN_DOM||!1,H=e.RETURN_DOM_FRAGMENT||!1,q=e.RETURN_DOM_IMPORT||!1,k=e.FORCE_BODY||!1,j=!1!==e.SANITIZE_DOM,X=!1!==e.KEEP_CONTENT,Y=e.IN_PLACE||!1,A=e.ALLOWED_URI_REGEXP||A,z&&(F=!1),H&&(W=!0),Z&&(L=o$Q({},[].concat(c$P(Ae$o))),R=[],!0===Z.html&&(o$Q(L,ce$q),o$Q(R,_e$p)),!0===Z.svg&&(o$Q(L,ve$p),o$Q(R,q$U),o$Q(R,M$R)),!0===Z.svgFilters&&(o$Q(L,he$p),o$Q(R,q$U),o$Q(R,M$R)),!0===Z.mathMl&&(o$Q(L,Te$k),o$Q(R,ge$o),o$Q(R,M$R))),e.ADD_TAGS&&(L===M&&(L=ye$m(L)),o$Q(L,e.ADD_TAGS)),e.ADD_ATTR&&(R===O&&(R=ye$m(R)),o$Q(R,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&o$Q(J,e.ADD_URI_SAFE_ATTR),X&&(L["#text"]=!0),U&&o$Q(L,["html","head","body"]),L.table&&o$Q(L,["tbody"]),Object&&"freeze"in Object&&Object.freeze(e),ee=e},ne=function(e){t.removed.push({element:e});try{e.parentNode.removeChild(e)}catch{e.outerHTML=""}},re=function(e,i){try{t.removed.push({attribute:i.getAttributeNode(e),from:i})}catch{t.removed.push({attribute:null,from:i})}i.removeAttribute(e)},oe=function(e){var t=void 0,i=void 0;if(k)e="<remove></remove>"+e;else{var a=e.match(/^[\s]+/);(i=a&&a[0])&&(e=e.slice(i.length))}if(n)try{t=(new p).parseFromString(e,"text/html")}catch{}if(r&&o$Q(D,["title"]),!t||!t.documentElement){var s=(t=g.createHTMLDocument("")).body;s.parentNode.removeChild(s.parentNode.firstElementChild),s.outerHTML=e}return i&&t.body.insertBefore(o.createTextNode(i),t.body.childNodes[0]||null),y.call(t,U?"html":"body")[0]};t.isSupported&&(function(){try{oe('<svg><p><style><img src="</style><img src=x onerror=alert(1)//">').querySelector("svg img")&&(n=!0)}catch{}}(),function(){try{oe("<x/><title></title><img>").querySelector("title").textContent.match(/<\/title/)&&(r=!0)}catch{}}());var ae=function(e){return x.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},se=function(e){return!(e instanceof d||e instanceof f)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute)},le=function(e){return"object"===(typeof l>"u"?"undefined":x$U(l))?e instanceof l:e&&"object"===(typeof e>"u"?"undefined":x$U(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ue=function(e,i,n){!b[e]||b[e].forEach((function(e){e.call(t,i,n,ee)}))},ce=function(e){var i=void 0;if(ue("beforeSanitizeElements",e,null),se(e))return ne(e),!0;var n=e.nodeName.toLowerCase();if(ue("uponSanitizeElement",e,{tagName:n,allowedTags:L}),!L[n]||D[n]){if(X&&!K[n]&&"function"==typeof e.insertAdjacentHTML)try{e.insertAdjacentHTML("AfterEnd",e.innerHTML)}catch{}return ne(e),!0}return G&&!e.firstElementChild&&(!e.content||!e.content.firstElementChild)&&/</g.test(e.textContent)&&(t.removed.push({element:e.cloneNode()}),e.innerHTML?e.innerHTML=e.innerHTML.replace(/</g,"<"):e.innerHTML=e.textContent.replace(/</g,"<")),z&&3===e.nodeType&&(i=(i=(i=e.textContent).replace(T," ")).replace(C," "),e.textContent!==i&&(t.removed.push({element:e.cloneNode()}),e.textContent=i)),ue("afterSanitizeElements",e,null),!1},he=function(e,t,i){if(j&&("id"===t||"name"===t)&&(i in o||i in te))return!1;if(!(z&&(i=i.replace(T," "),i=i.replace(C," ")),F&&S.test(t)||B&&w.test(t))){if(!R[t]||I[t])return!1;if(!J[t]&&!A.test(i.replace(P,""))&&("src"!==t&&"xlink:href"!==t||"script"===e||0!==i.indexOf("data:")||!Q[e])&&(!N||E.test(i.replace(P,"")))&&i)return!1}return!0},de=function(e){var i=void 0,n=void 0,r=void 0,o=void 0,a=void 0;ue("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R};for(a=s.length;a--;){var u=i=s[a],c=u.name,h=u.namespaceURI;if(n=i.value.trim(),r=c.toLowerCase(),l.attrName=r,l.attrValue=n,l.keepAttr=!0,ue("uponSanitizeAttribute",e,l),n=l.attrValue,"name"===r&&"IMG"===e.nodeName&&s.id)o=s.id,s=Array.prototype.slice.apply(s),re("id",e),re(c,e),s.indexOf(o)>a&&e.setAttribute("id",o.value);else{if("INPUT"===e.nodeName&&"type"===r&&"file"===n&&(R[r]||!I[r]))continue;"id"===c&&e.setAttribute(c,""),re(c,e)}if(l.keepAttr){var d=e.nodeName.toLowerCase();if(he(d,r,n))try{h?e.setAttributeNS(h,c,n):e.setAttribute(c,n),t.removed.pop()}catch{}}}ue("afterSanitizeAttributes",e,null)}},fe=function e(t){var i=void 0,n=ae(t);for(ue("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)ue("uponSanitizeShadowNode",i,null),!ce(i)&&(i.content instanceof a&&e(i.content),de(i));ue("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(n,r){var o=void 0,s=void 0,u=void 0,c=void 0,h=void 0;if(n||(n="\x3c!--\x3e"),"string"!=typeof n&&!le(n)){if("function"!=typeof n.toString)throw new TypeError("toString is not a function");if("string"!=typeof(n=n.toString()))throw new TypeError("dirty is not a string, aborting")}if(!t.isSupported){if("object"===x$U(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof n)return e.toStaticHTML(n);if(le(n))return e.toStaticHTML(n.outerHTML)}return n}if(V||ie(r),t.removed=[],!Y)if(n instanceof l)1===(s=(o=oe("\x3c!--\x3e")).ownerDocument.importNode(n,!0)).nodeType&&"BODY"===s.nodeName?o=s:o.appendChild(s);else{if(!W&&!U&&-1===n.indexOf("<"))return n;if(!(o=oe(n)))return W?null:""}o&&k&&ne(o.firstChild);for(var d=ae(Y?n:o);u=d.nextNode();)3===u.nodeType&&u===c||ce(u)||(u.content instanceof a&&fe(u.content),de(u),c=u);if(Y)return n;if(W){if(H)for(h=v.call(o.ownerDocument);o.firstChild;)h.appendChild(o.firstChild);else h=o;return q&&(h=$.call(i,h,!0)),h}return U?o.outerHTML:o.innerHTML},t.setConfig=function(e){ie(e),V=!0},t.clearConfig=function(){ee=null,V=!1},t.isValidAttribute=function(e,t,i){ee||ie({});var n=e.toLowerCase(),r=t.toLowerCase();return he(n,r,i)},t.addHook=function(e,t){"function"==typeof t&&(b[e]=b[e]||[],b[e].push(t))},t.removeHook=function(e){b[e]&&b[e].pop()},t.removeHooks=function(e){b[e]&&(b[e]=[])},t.removeAllHooks=function(){b={}},t}var je$d=Ee$l(),a$J=0,l$U={};function r$U(e,t){o$1q.typeOf.string("html",e);var i,n=e;e$2e(l$U[n])?i=l$U[n]:(i=a$J++,l$U[n]=i),t=u$Z(t,!1),this._id=i,this._html=e,this._showOnScreen=t,this._element=void 0}function f$R(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.typeOf.object("options.clock",e.clock),o$1q.typeOf.object("options.times",e.times),o$1q.typeOf.func("options.requestImageFunction",e.requestImageFunction),o$1q.typeOf.func("options.reloadFunction",e.reloadFunction),this._tileCache={},this._tilesRequestedForInterval=[];var t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}function _$J(e,t,i){return e+"-"+t+"-"+i}function F$S(e){var t=e.split("-");if(3===t.length)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function k$O(e){var t=e._times;if(e$2e(t)){var i=e._clock,n=i.currentTime,r=i.canAnimate&&i.shouldAnimate,o=i.multiplier;if(r||0===o){var a,s=t.indexOf(n);if(!(s<0)){var l=t.get(s);return o>0?(a=a$15.secondsDifference(l.stop,n),++s):(a=a$15.secondsDifference(l.start,n),--s),a/=o,s>=0&&a<=5?t.get(s):void 0}}}}function I$$(e,t,i){var n=e._times.indexOf(i.start),r=e._tileCache,o=r[n];e$2e(o)||(o=r[n]={});var a=t.key;if(e$2e(o[a]))return!0;var s=F$S(a),l=new r$1c({throttle:!0,throttleByServer:!0,type:U$1f.IMAGERY,priorityFunction:t.priorityFunction}),u=e._requestImageFunction(s.x,s.y,s.level,l,i);return!!e$2e(u)&&(o[a]={promise:u,request:l},!0)}function B$M(e){var t;(o$1q.defined("resourceOrUrlOrBuffer",e),e instanceof ArrayBuffer||ArrayBuffer.isView(e))?t=o$1l.resolve(e):t=t$10.createIfNeeded(e).fetchArrayBuffer();if(e$2e(t))return t.then((function(e){if(e$2e(e))return U$N(e)}))}function U$N(e){var t=new DataView(e),i=0,n=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT,t.getUint32(i,!0),i+=Uint32Array.BYTES_PER_ELEMENT;var r=32===n?V$12.RGBA_DXT5:V$12.RGB_DXT1,o=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var a=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT,t.getUint32(i,!0),i+=Uint32Array.BYTES_PER_ELEMENT;var s=t.getUint32(i,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var l=new Uint8Array(e,i,s),u=nt$b.inflate(l).buffer;return new e$1K(r,o,a,new Uint8Array(u))}Object.defineProperties(r$U.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen}},element:{get:function(){if(!e$2e(this._element)){var e=je$d.sanitize(this._html),t=document.createElement("div");t._creditId=this._id,t.style.display="inline",t.innerHTML=e;for(var i=t.querySelectorAll("a"),n=0;n<i.length;n++)i[n].setAttribute("target","_blank");this._element=t}return this._element}}}),r$U.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e._id===t._id},r$U.prototype.equals=function(e){return r$U.equals(this,e)},r$U.getIonCredit=function(e){var t=e$2e(e.collapsible)&&!e.collapsible,i=new r$U(e.html,t);return i._isIon=-1!==i.html.indexOf("logo.png"),i},r$U.clone=function(e){if(e$2e(e))return new r$U(e.html,e.showOnScreen)},Object.defineProperties(f$R.prototype,{clock:{get:function(){return this._clock},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}}),f$R.prototype.getFromCache=function(e,t,i,n){var r,o=_$J(e,t,i),a=this._tileCache[this._currentIntervalIndex];if(e$2e(a)&&e$2e(a[o])){var s=a[o];r=s.promise.otherwise((function(e){throw n.state=s.request.state,e})),delete a[o]}return r},f$R.prototype.checkApproachingInterval=function(e,t,i,n){var r=_$J(e,t,i),o=this._tilesRequestedForInterval,a=k$O(this),s={key:r,priorityFunction:n.priorityFunction};(!e$2e(a)||!I$$(this,s,a))&&o.push(s),o.length>=512&&o.splice(0,256)},f$R.prototype._clockOnTick=function(e){var t=e.currentTime,i=this._times.indexOf(t),n=this._currentIntervalIndex;if(i!==n){var r=this._tileCache[n];for(var o in r)r.hasOwnProperty(o)&&r[o].request.cancel();return delete this._tileCache[n],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,void this._reloadFunction()}var a=k$O(this);if(e$2e(a))for(var s=this._tilesRequestedForInterval,l=!0;l&&0!==s.length;){var u=s.pop();(l=I$$(this,u,a))||s.push(u)}};var Y$E=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function v$E(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url))throw new t$15("options.url is required.");if(!e$2e(e.layer))throw new t$15("options.layer is required.");if(!e$2e(e.style))throw new t$15("options.style is required.");if(!e$2e(e.tileMatrixSetID))throw new t$15("options.tileMatrixSetID is required.");if(e$2e(e.times)&&!e$2e(e.clock))throw new t$15("options.times was specified, so options.clock is required.");this._baseUrl=e.url;var t=t$10.createIfNeeded(e.url),i=e.style,n=e.tileMatrixSetID;if(t.url.indexOf("{")>=0){var r={style:i,Style:i,TileMatrixSet:n};t.setTemplateValues(r),this._useKvp=!1}else t.setQueryParameters(Y$E),this._useKvp=!0;this._resource=t,this._layer=e.layer,this._style=i,this._tileMatrixSetID=n,this._tileMatrixLabels=e.tileMatrixLabels,this._format=u$Z(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=e$2e(e.tilingScheme)?e.tilingScheme:new c$S({ellipsoid:e.ellipsoid}),this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._minimumLevel=u$Z(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=u$Z(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;var o=this;this._reload=void 0;var a=this._baseUrl;this.tablename=this._layer,new l$14({name:a}).then((function(e){e.checkObjectStoreExit(o.tablename)?o._indexedDBScheduler=e:e.createObjectStore(o.tablename).then((function(){o._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){o._indexedDBScheduler.clear(o.tablename)},cache:[]},e$2e(e.times)&&(this._timeDynamicImagery=new f$R({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,n,r){return D$P(o,e,t,i,n,r)},reloadFunction:function(){e$2e(o._reload)&&o._reload()}})),this._readyPromise=o$1l.resolve(!0);var s=this._tilingScheme.positionToTileXY(h$18.southwest(this._rectangle),this._minimumLevel),l=this._tilingScheme.positionToTileXY(h$18.northeast(this._rectangle),this._minimumLevel);Math.abs(l.x-s.x),Math.abs(l.y-s.y),u$Z(e.limitLevelZeroTilesCount,!0),this._errorEvent=new o$1h;var u=e.credit;this._credit="string"==typeof u?new r$U(u):u,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():e$2e(this._subdomains)&&this._subdomains.length>0?this._subdomains=[this._subdomains]:this._subdomains=["a","b","c"],this._customRequestHeaders=e.customRequestHeaders}function D$P(e,t,i,n,r,o){var a,s=e._tileMatrixLabels,l=e$2e(s)?s[n]:n.toString(),u=e._subdomains,c=e._dimensions,h=e$2e(o)?o.data:void 0;if(e._useKvp){var d={};d.tilematrix=l,d.layer=e._layer,d.style=e._style,d.tilerow=i,d.tilecol=t,d.tilematrixset=e._tileMatrixSetID,d.format=e._format,e$2e(c)&&(d=p$19(d,c)),e$2e(h)&&(d=p$19(d,h)),a=e._resource.getDerivedResource({queryParameters:d,request:r})}else{var f={TileMatrix:l,TileRow:i.toString(),TileCol:t.toString(),s:u[(t+i+n)%u.length]};(a=e._resource.getDerivedResource({request:r})).setTemplateValues(f),e$2e(c)&&a.setTemplateValues(c),e$2e(h)&&a.setTemplateValues(h)}return e$2e(a$O.CREDENTIAL)&&(e$2e(a$O.CREDENTIAL._keymap[e._baseUrl])?a.url=a$O.addTokenWithKey(e._baseUrl,a.url):a.url=a$O.addToken(a.url)),V$J(e,a)}function A$W(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(v$E.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},format:{get:function(){return this._format}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,e$2e(this._reload)&&this._reload())}}}),v$E.prototype.getTileCredits=function(e,t,i){},v$E.prototype.requestImage=function(e,t,i,n){var r,o,a=this._timeDynamicImagery;if(e$2e(a)&&(o=a.currentInterval,r=a.getFromCache(e,t,i,n)),n.quadKey=A$W(e,t,i),!0===this._indexedDBSetting.isOpen&&!e$2e(r)&&!0===n.cacheEnable){if(e$2e(this._indexedDBScheduler)){var s=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2e(s)?s.then((function(e){return e$2e(e)?e:"cacheError"}),(function(e){return"cacheError"})):D$P(this,e,t,i,n,o)}return D$P(this,e,t,i,n,o)}return e$2e(r)||(n.cacheEnable=!1,r=D$P(this,e,t,i,n,o)),e$2e(r)&&e$2e(a)&&a.checkApproachingInterval(e,t,i,n),r},v$E.prototype.pickFeatures=function(e,t,i,n,r){};var j$Q=/\.ktx$/i,F$R=/\.crn$/i,N$J=/\.dxtz$/i;function V$J(e,t){o$1q.defined("url",t);var i=t$10.createIfNeeded(t);return j$Q.test(i.url)?k$W(i):F$R.test(i.url)?a$P(i):N$J.test(i.url)?(e.flipY=!0,B$M(i)):e$2e(e.tileDiscardPolicy)?i.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(e$2e(e._customRequestHeaders)&&(i.headers=p$19(i.headers,e._customRequestHeaders)),!0===e._indexedDBSetting.isOpen?i.fetchBlob():i.fetchImage({preferImageBitmap:!0,flipY:!0}))}var W$S=new i$W("indexedDBWorker"),Ee$k=-1;function h$R(e,t){this._imageryProvider=e,t=u$Z(t,{}),this._alpha=u$Z(t.alpha,u$Z(e.defaultAlpha,1)),this.brightness=u$Z(t.brightness,u$Z(e.defaultBrightness,h$R.DEFAULT_BRIGHTNESS)),this.contrast=u$Z(t.contrast,u$Z(e.defaultContrast,h$R.DEFAULT_CONTRAST)),this.hue=u$Z(t.hue,u$Z(e.defaultHue,h$R.DEFAULT_HUE)),this.saturation=u$Z(t.saturation,u$Z(e.defaultSaturation,h$R.DEFAULT_SATURATION)),this.gamma=u$Z(t.gamma,u$Z(e.defaultGamma,h$R.DEFAULT_GAMMA)),this.transparentBackColor=u$Z(t.transparentBackColor,u$Z(e.defaultTransparentBackColor,h$R.DEFAULT_TRANSPARENTBACKCOLOR)),this.transparentBackColorTolerance=u$Z(t.transparentBackColorTolerance,u$Z(e.defaultTransparentBackColorTolerance,h$R.DEFAULT_TRANSPARENTBACKCOLORTOLERANCE));var i=u$Z(t.splitDirection,u$Z(e.defaultSplit,h$R.DEFAULT_SPLIT)),n=u$Z(t.splitDirection,u$Z(e.defaultSplit,h$R.DEFAULT_SPLIT));this.splitDirection=new o$1o(i,n),this.minificationFilter=u$Z(t.minificationFilter,u$Z(e.defaultMinificationFilter,h$R.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=u$Z(t.magnificationFilter,u$Z(e.defaultMagnificationFilter,h$R.DEFAULT_MAGNIFICATION_FILTER)),this.show=u$Z(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=u$Z(t.rectangle,h$18.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new o$T(n$M.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this._visibleViewport=4095,this.colorToAlpha=t.colorToAlpha,this._selectColor=new e$1X(0,0,1,1),this.colorToAlphaThreshold=u$Z(t.colorToAlphaThreshold,h$R.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD),this._pausing=!1,e$2e(e._indexedDBSetting)?this._indexedDBSetting=e._indexedDBSetting:this._indexedDBSetting={isOpen:!1},this._imageCanvas={},this._swipeRegion=new e$2c(0,0,1,1),this._swipeEnabled=!1,this._lodOffset=0,this._detailLevelOffset=0,this._featherEdgesEnabled=!1,this._minHeight=Number.NEGATIVE_INFINITY,this._maxHeight=1/0,this._inVisibleHeightRange=1,this.enableUpsample=!0,this.enableImageryClip=!1}Object.defineProperties(h$R.prototype,{alpha:{get:function(){return this._alpha},set:function(e){this._alpha!==e&&(this._alpha=e,this._imageryProvider.onAlphaChanged&&this._imageryProvider.onAlphaChanged())}},featherEdgesEnabled:{get:function(){return this._featherEdgesEnabled},set:function(e){e$2e(e)&&"boolean"==typeof e&&(this._featherEdgesEnabled=e)}},lodOffset:{get:function(){return this._lodOffset},set:function(e){e$2e(e)&&"number"==typeof e&&(this._lodOffset=e)}},imageryProvider:{get:function(){return this._imageryProvider}},rectangle:{get:function(){return this._rectangle}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){e$2e(e)&&"boolean"==typeof e.isOpen&&(this._indexedDBSetting.isOpen=e.isOpen)}},swipeRegion:{get:function(){return new f$1a(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2e(e)){if(!(e instanceof f$1a))throw new t$15("swipeRegion must be a instance of BoundingRectangle.");e$2c.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?o$1o.fromElements(0,0,this.splitDirection):e$2c.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e)}},minHeight:{get:function(){return this._minHeight},set:function(e){this._minHeight=e}},maxHeight:{get:function(){return this._maxHeight},set:function(e){return this._maxHeight=e}}}),h$R.DEFAULT_BRIGHTNESS=1,h$R.DEFAULT_CONTRAST=1,h$R.DEFAULT_HUE=0,h$R.DEFAULT_SATURATION=1,h$R.DEFAULT_GAMMA=1,h$R.DEFAULT_TRANSPARENTBACKCOLOR=e$1X.BLACK,h$R.DEFAULT_TRANSPARENTBACKCOLORTOLERANCE=0,h$R.DEFAULT_SPLIT=Xe$d.NONE,h$R.DEFAULT_MINIFICATION_FILTER=tt$i.LINEAR,h$R.DEFAULT_MAGNIFICATION_FILTER=rt$k.LINEAR,h$R.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004,h$R.prototype.isBaseLayer=function(){return this._isBaseLayer&&!e$2e(this._imageryProvider._scales)&&!e$2e(this._imageryProvider._useKvp)},h$R.prototype.isDestroyed=function(){return!1},h$R.prototype.destroy=function(){return i$11(this)};var Ae$n=new h$18,Le$m=new h$18,se$t=new h$18,xe$m=new h$18;function ye$l(e,t,i){if(e$2e(e._imageryProvider._indexedDBScheduler)){var n={blob:i,key:t.quadKey,tablename:e._imageryProvider.tablename,dbname:e._imageryProvider._indexedDBScheduler.dbname};W$S.scheduleTask(n,[])}}function Re$k(e,t,i,n,r){var o=new DataView(e),a=0,s=o.getUint32(a,!0);if(t>s-1||s>256)throw new t$15("pack imagery index invalid");a+=4;var l,u,c=[];for(l=0;l<s;l++)u=o.getUint32(a,!0),c.push(u),a+=4;for(l=0;l<s;l++){if(u=c[l],l===t){if(0===u)return void(!0===i._indexedDBSetting.isOpen&&ye$l(i,n,Ee$k));if(!e$2e(r)){var h=new Uint8Array(e,a,u);return new Uint8Array(h).buffer}return et$e({uint8Array:new Uint8Array(e,a,u),format:r,flipY:!0,layer:i,imagery:n})}a+=u}}h$R.prototype.getViewableRectangle=function(){var e=this._imageryProvider,t=this._rectangle;return e.readyPromise.then((function(){return h$18.intersection(e.rectangle,t)}))},h$R.prototype._createTileImagerySkeletons=function(e,t,i){var n=e.data;if(e$2e(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||e$2e(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;var r=this._imageryProvider;if(e$2e(i)||(i=n.imagery.length),!r.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),n.imagery.splice(i,0,this._skeletonPlaceholder),!0;var o=r.tilingScheme.projection instanceof t$N&&e.rectangle.north<t$N.MaximumLatitude&&e.rectangle.south>-t$N.MaximumLatitude,a=h$18.intersection(r.rectangle,this._rectangle,Ae$n),s=h$18.intersection(e.rectangle,a,Le$m);if(!e$2e(s)){if(!this.isBaseLayer())return!1;var l=a,u=e.rectangle;s=Le$m,u.south>=l.north?s.north=s.south=l.north:u.north<=l.south?s.north=s.south=l.south:(s.south=Math.max(u.south,l.south),s.north=Math.min(u.north,l.north)),u.west>=l.east?s.west=s.east=l.east:u.east<=l.west?s.west=s.east=l.west:(s.west=Math.max(u.west,l.west),s.east=Math.min(u.east,l.east))}var c=0;s.south>0?c=s.south:s.north<0&&(c=s.north);var h=nt$9(this,1*t.getLevelMaximumGeometricError(e.level),c,e$2e(this._imageryProvider.resolution)?this._imageryProvider.resolution:1);h=Math.max(0,h);var d=r.maximumLevel;if(h>d&&(h=d),e$2e(r.minimumLevel)&&!(r instanceof M$S)){var f=r.minimumLevel;h<f&&(h=f)}var p=r.tilingScheme,_=p.positionToTileXY(h$18.northwest(s),h),m=p.positionToTileXY(h$18.southeast(s),h),g=e.rectangle.width/512,x=e.rectangle.height/512,y=p.tileXYToRectangle(_.x,_.y,h);Math.abs(y.south-e.rectangle.north)<x&&_.y<m.y&&++_.y,Math.abs(y.east-e.rectangle.west)<g&&_.x<m.x&&++_.x;var v=p.tileXYToRectangle(m.x,m.y,h);Math.abs(v.north-e.rectangle.south)<x&&m.y>_.y&&--m.y,Math.abs(v.west-e.rectangle.east)<g&&m.x>_.x&&--m.x,y.east<r.rectangle.west&&++_.x,y.south>r.rectangle.north&&++_.y,v.west>r.rectangle.east&&--m.x,v.north<r.rectangle.south&&--m.y;var $,b=h$18.clone(e.rectangle,xe$m),T=p.tileXYToRectangle(_.x,_.y,h),C=h$18.intersection(T,a,se$t);o?(p.rectangleToNativeRectangle(b,b),p.rectangleToNativeRectangle(T,T),p.rectangleToNativeRectangle(C,C),p.rectangleToNativeRectangle(a,a),$=p.tileXYToNativeRectangle.bind(p),g=b.width/512,x=b.height/512):$=p.tileXYToRectangle.bind(p);var S,w,E=0,P=1;!this.isBaseLayer()&&Math.abs(C.west-b.west)>=g&&(E=Math.min(1,(C.west-b.west)/b.width)),!this.isBaseLayer()&&Math.abs(C.north-b.north)>=x&&(P=Math.max(0,(C.north-b.south)/b.height));for(var A=P,L=u$Z(this._imageryProvider.flipY,!1),M=_.x;M<=m.x;M++)if(S=E,T=$(M,_.y,h),e$2e(C=h$18.simpleIntersection(T,a,se$t))){E=Math.min(1,(C.east-b.west)/b.width),M===m.x&&(this.isBaseLayer()||Math.abs(C.east-b.east)<g)&&(E=1),P=A;for(var R=_.y;R<=m.y;R++)if(w=P,T=$(M,R,h),e$2e(C=h$18.simpleIntersection(T,a,se$t))){P=Math.max(0,(C.south-b.south)/b.height),R===m.y&&(this.isBaseLayer()||Math.abs(C.south-b.south)<x)&&(P=0);var O=new e$2c(S,P,E,w),D=this.getImageryFromCache(M,R,h);if(n.imagery.splice(i,0,new o$T(D,O,o,L)),++i,this._imageryProvider.enableMorphing&&e$2e(D.mvtProvider)&&e$2e(D.parent)){var I=new o$T(this.getImageryFromCache(D.parent.x,D.parent.y,D.parent.level),O,o,L);I.morphingAlpha=.9,n.imagery.splice(i,0,I),++i}}}return!0},h$R.prototype._calculateTextureTranslationAndScale=function(e,t){var i=t.readyImagery.rectangle,n=e.rectangle;if(t.useWebMercatorT){var r=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;i=r.rectangleToNativeRectangle(i,Ae$n),n=r.rectangleToNativeRectangle(n,xe$m)}var o=n.width,a=n.height,s=o/i.width,l=a/i.height;return new e$2c(s*(n.west-i.west)/o,l*(n.south-i.south)/a,s,l)};var Je$8=/\.dxtz/i;function be$p(e,t,i){var n=new DataView(e),r=0;n.getUint32(r,!0),r+=4;var o=n.getUint32(r,!0);r+=4;for(var a=t.col,s=t.row*t.blockSize+a,l=0,u=0,c=0;c<o;c++){if(c<s)l+=n.getUint32(r,!0);else if(c===s){u=n.getUint32(r,!0),r+=4;break}r+=4}if(r=8+4*o,0!==u){r+=l;var h=o$1l.defer(),d=t.url;return Je$8.test(d)?h.resolve($e$a(e,r,u)):w$R({uint8Array:new Uint8Array(e,r,u),format:i,flipY:!0})}}function $e$a(e,t,i){var n=new DataView(e,t,i),r=0,o=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var a=32===o?V$12.RGBA_DXT5:V$12.RGB_DXT1,s=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var l=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var u=n.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var c=new Uint8Array(e,r+t,u),h=nt$b.inflate(c).buffer;return new e$1K(a,s,l,new Uint8Array(h))}function et$e(e){var t=e.uint8Array,i=e.format,n=e.request,r=u$Z(e.flipY,!1),o=e.layer,a=e.imagery;o$1q.typeOf.object("uint8Array",t),o$1q.typeOf.string("format",i);var s,l=new Blob([t],{type:i});return!0===o._indexedDBSetting.isOpen&&ye$l(o,a,l),t$10.supportsImageBitmapOptions().then((function(e){return e?o$1l(t$10.createImageBitmapFromBlob(l,{flipY:r,premultiplyAlpha:!1})):new t$10({url:s=window.URL.createObjectURL(l),request:n}).fetchImage({flipY:r})})).then((function(e){return e$2e(s)&&window.URL.revokeObjectURL(s),e})).otherwise((function(e){return e$2e(s)&&window.URL.revokeObjectURL(s),o$1l.reject(e)}))}function tt$e(e,t){var i=document.createElement("canvas");i.getContext("bitmaprenderer").transferFromImageBitmap(e),i.toBlob(t)}function De$k(e,t){var i=e.slice(0),n=new Int8Array(i);for(var r=t.split("").map((function(e){return e.charCodeAt(0)})),o=0;o<r.length;o++)n[o]=n[o]^r[o];return n.buffer}var rt$f={webp:"image/webp",png:"image/png"};function Ie$i(e,t,i){return e+":"+t+":"+i}function ue$v(e,t,i){return JSON.stringify([e,t,i])}h$R.prototype._requestImagery=function(e){var t=this._imageryProvider,i=this;function n(n){if(!e.isDestroyed()){if(!e$2e(n))return r();if(n===Ee$k)return void(e.state=wt$7.FAILED);if("cacheError"===n)return void o(!1);if(n instanceof ArrayBuffer&&e$2e(t._cacheKey)&&t._cacheKey.length>0&&e.request.type!==U$1f.BLOCK){var a=De$k(n,t._cacheKey);n=e.request.type===U$1f.PACK?a:new Blob([new Uint8Array(a,0,a.byteLength)],{type:t._fileExtension||"image/png"})}if(e.request.type!==U$1f.PACK&&!n.mvt&&e.request.type!==U$1f.BLOCK&&e.request.type!==U$1f.BLOCKPACK){if(n instanceof Blob){if(!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2e(i._imageryProvider._indexedDBScheduler)){e.quadKey=e.request.quadKey;var s={blob:n,key:e.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};W$S.scheduleTask(s,[])}return void t$10.supportsImageBitmapOptions().then((function(t){if(t)t$10.createImageBitmapFromBlob(n,{flipY:!0,premultiplyAlpha:!1}).then((function(t){e.image=t,e.state=wt$7.RECEIVED,e.request=void 0,l$V.handleSuccess(i._requestImageError)}));else{var r=window.URL.createObjectURL(n);t$S(r,!1).then((function(e){return window.URL.revokeObjectURL(r),e}),(function(e){return window.URL.revokeObjectURL(r),o$1l.reject(e)})).then((function(t){e.image=t,e.state=wt$7.RECEIVED,e.request=void 0,l$V.handleSuccess(i._requestImageError)}))}}))}!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2e(i._imageryProvider._indexedDBScheduler)&&(e.quadKey=e.request.quadKey,createImageBitmap(n,{imageOrientation:"flipY",premultiplyAlpha:"none"}).then((function(t){tt$e(t,(function(t){var n={blob:t,key:e.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};W$S.scheduleTask(n,[])}))})))}var l=rt$f[t._fileExtension];if(e.request.type!==U$1f.BLOCKPACK||n.mvt)if(e.request.type!==U$1f.PACK||n.mvt)if(e.request.type===U$1f.BLOCK){if(!e$2e((c=t.blockCache[e.request.quadKey]).data)&&(c.data=n,!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2e(i._imageryProvider._indexedDBScheduler))){s={blob:n.slice(0),key:e.request.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:30};W$S.scheduleTask(s,[])}t.blockCacheQueue.touch(c),t.blockCacheQueue.trim(t.blockCacheSize),e$2e(t._cacheKey)&&t._cacheKey.length>0&&(n=De$k(n,t._cacheKey)),e$2e(h=be$p(n,e.request.blockInfo,l))||(e.state=wt$7.FAILED),h.then((function(t){e.image=t,e.state=wt$7.RECEIVED})).otherwise((function(t){e.state=wt$7.FAILED}))}else e.image=n,e.state=wt$7.RECEIVED;else{if(n instanceof Blob&&e.request.cacheEnable&&!0===i._indexedDBSetting.isOpen)return void t$10.supportsImageBitmapOptions().then((function(t){if(t)t$10.createImageBitmapFromBlob(n,{flipY:!0,premultiplyAlpha:!1}).then((function(t){e.image=t,e.state=wt$7.RECEIVED,e.request=void 0,l$V.handleSuccess(i._requestImageError)}));else{var r=window.URL.createObjectURL(n);t$S(r,!1).then((function(e){return window.URL.revokeObjectURL(r),e}),(function(e){return window.URL.revokeObjectURL(r),o$1l.reject(e)})).then((function(t){e.image=t,e.state=wt$7.RECEIVED,e.request=void 0,l$V.handleSuccess(i._requestImageError)}))}}));e.quadKey=e.request.quadKey,l=u$Z(l,"image/png");var u=Re$k(n,e.request.quadKeyIndex,i,e,l);if(!e$2e(u))return void(e.state=wt$7.FAILED);u.then((function(t){e.image=t,e.state=wt$7.RECEIVED})).otherwise((function(t){e.state=wt$7.FAILED}))}else if(!e$2e(e.request.quadKeyIndex)&&e$2e(e.request.blockRequest)&&(e.request.quadKeyIndex=e.request.blockRequest.quadKeyIndex),e$2e(e.request.quadKeyIndex)&&(n=Re$k(n,e.request.quadKeyIndex,i,e)),e$2e(n)){var c,h;if(!e$2e(c=t.blockCache[e.request.quadKey])&&(c=new e$1e(t,e.request.quadKey,n),t.blockCache[e.request.quadKey]=c,!0===i._indexedDBSetting.isOpen&&!e.request.cacheEnable&&e$2e(i._imageryProvider._indexedDBScheduler))){var s={blob:n.slice(0),key:e.request.quadKey,tablename:i._imageryProvider.tablename,dbname:i._imageryProvider._indexedDBScheduler.dbname,cacheSize:5};W$S.scheduleTask(s,[])}t.blockCacheQueue.touch(c),t.blockCacheQueue.trim(t.blockCacheSize),e$2e(h=be$p(n,e.request.blockInfo,l))||(e.state=wt$7.FAILED),h.then((function(t){e.image=t,e.state=wt$7.RECEIVED})).otherwise((function(t){e.state=wt$7.FAILED}))}else e.state=wt$7.FAILED;e.request=void 0,l$V.handleSuccess(i._requestImageError)}}function r(n){if(!e.isDestroyed()){if(e.request.state===W$1c.CANCELLED)return e.state=wt$7.UNLOADED,void(e.request=void 0);e.state=wt$7.FAILED,e.request=void 0;var r="Failed to obtain image tile X: "+e.x+" Y: "+e.y+" Level: "+e.level+".";i._requestImageError=l$V.handleError(i._requestImageError,t,t.errorEvent,r,e.x,e.y,e.level,o,n)}}function o(i){var o=new r$1c({throttle:!1,throttleByServer:!0,type:U$1f.IMAGERY});o.cacheEnable=i,e.request=o,e.state=wt$7.TRANSITIONING;var a=t.requestImage(e.x,e.y,e.level,o,e.rectangle,e);if(!e$2e(a))return e.state=wt$7.UNLOADED,void(e.request=void 0);e$2e(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),e.beginRequestTime=performance.now(),o$1l(a,n,r)}o(!0)},h$R.prototype._createTextureWebGL=function(e,t){var i=new e$1S({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),n=t.image;return e$2e(n.internalFormat)?new t$U({context:e,pixelFormat:n.internalFormat,width:n.width,height:n.height,source:{arrayBufferView:n.bufferView},sampler:i}):e$2e(n.mvt)?n.colorTexture:new t$U({context:e,source:n,pixelFormat:this._imageryProvider.hasAlphaChannel?V$12.RGBA:V$12.RGB,sampler:i})},h$R.prototype._createTexture=function(e,t,i){var n=this._imageryProvider,r=t.image;if(e$2e(n.tileDiscardPolicy)){var o=n.tileDiscardPolicy;if(e$2e(o)){if(!o.isReady())return void(t.state=wt$7.RECEIVED);if(o.shouldDiscardImage(r))return void(t.state=wt$7.INVALID)}}if(this.minificationFilter!==tt$i.NEAREST&&this.minificationFilter!==tt$i.LINEAR)throw new t$15("ImageryLayer minification filter must be NEAREST or LINEAR");var a=this._createTextureWebGL(e,t);e$2e(r.mvt)&&(t.isMvtTexture=!0,t.iconImageObjects=r.iconImageObjects,t.textObjects=r.textObjects,t.tile=r.tile,t.transform=r.transform,t.isRendered=!1),n.tilingScheme.projection instanceof t$N?t.textureWebMercator=a:t.texture=a,t.image=void 0,t.state=wt$7.TEXTURE_LOADED},h$R.prototype._finalizeReprojectTexture=function(e,t){var i=this.minificationFilter,n=this.magnificationFilter;if(i===tt$i.LINEAR&&n===rt$k.LINEAR&&!V$12.isCompressedFormat(t.pixelFormat)&&e$2d.isPowerOfTwo(t.width)&&e$2d.isPowerOfTwo(t.height)){i=tt$i.LINEAR_MIPMAP_LINEAR;var r=e$1W.maximumTextureFilterAnisotropy,o=Math.min(r,u$Z(this._maximumAnisotropy,r)),a=Ie$i(i,n,o),s=e.cache.imageryLayerMipmapSamplers;e$2e(s)||(s={},e.cache.imageryLayerMipmapSamplers=s);var l=s[a];e$2e(l)||(l=s[a]=new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n,maximumAnisotropy:o})),t.generateMipmap(I$1e.NICEST),t.sampler=l,t.samplerKey=a}else{var u=Ie$i(i,n,0),c=e.cache.imageryLayerNonMipmapSamplers;e$2e(c)||(c={},e.cache.imageryLayerNonMipmapSamplers=c);var h=c[u];e$2e(h)||(h=c[u]=new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n})),t.sampler=h,t.samplerKey=u}},h$R.prototype._reprojectTexture=function(e,t,i){var n=t.textureWebMercator||t.texture,r=t.rectangle,o=e.context;if((i=u$Z(i,!0))&&!(this._imageryProvider.tilingScheme.projection instanceof n$1d)&&r.width/n.width>1e-5){var a=this;t.addReference();var s=new t$H({name:"imageReprojectTexture",persists:!0,owner:this,preExecute:function(e){at$b(e,o,n,t.rectangle)},postExecute:function(e){o.webgpu&&o.engine.flushFramebuffer(),t.texture=e,a._finalizeReprojectTexture(o,e),t.state=wt$7.READY,t.releaseReference()}});this._reprojectComputeCommands.push(s)}else i&&(t.texture=n),this._finalizeReprojectTexture(o,n),t.state=wt$7.READY},h$R.prototype.queueReprojectionCommands=function(e){for(var t=this._reprojectComputeCommands,i=t.length,n=0;n<i;++n)e.commandList.push(t[n]);t.length=0},h$R.prototype.cancelReprojections=function(){this._reprojectComputeCommands.length=0},h$R.prototype.getImageryFromCache=function(e,t,i,n){var r=ue$v(e,t,i),o=this._imageryCache[r];return e$2e(o)||(o=this._imageryProvider instanceof M$S?new _0x2415f5(this,e,t,i,n):new n$M(this,e,t,i,n),this._imageryCache[r]=o),o.addReference(),o},h$R.prototype.getReadyImageryFromCache=function(e,t,i){for(var n=void 0,r=i;r>0&&!e$2e(n);){r--;var o=ue$v(e,t,i);e$2e(n=this._imageryCache[o])&&n.state!=wt$7.READY&&(n=void 0)}return n},h$R.prototype.removeImageryFromCache=function(e){var t=ue$v(e.x,e.y,e.level);delete this._imageryCache[t]};var te$y={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new o$1o,texture:void 0},it$9=s$Z.supportsTypedArrays()?new Float32Array(128):void 0;function at$b(e,t,i,n){var r=t.cache.imageryLayer_reproject;if(!e$2e(r)){r=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){e$2e(this.framebuffer)&&this.framebuffer.destroy(),e$2e(this.vertexArray)&&this.vertexArray.destroy(),e$2e(this.shaderProgram)&&this.shaderProgram.destroy()}};for(var o=new Float32Array(256),a=0,s=0;s<64;++s){var l=s/63;o[a++]=0,o[a++]=l,o[a++]=1,o[a++]=l}var u={position:0,webMercatorT:1},c=I$12.getRegularGridIndicesForReproject(2,64),h=t$X.createIndexBuffer({context:t,typedArray:c,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});r.vertexArray=new c$13({context:t,attributes:[{name:"position",index:u.position,vertexBuffer:t$X.createVertexBuffer({context:t,typedArray:o,usage:A$18.STATIC_DRAW}),componentsPerAttribute:2},{name:"webMercatorT",index:u.webMercatorT,vertexBuffer:t$X.createVertexBuffer({context:t,sizeInBytes:512,usage:A$18.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:h});var d=new s$V({sources:[je$g]});r.shaderProgram=r$14.fromCache({name:"ReprojectWebMercator",context:t,vertexShaderSource:d,fragmentShaderSource:Ve$i,attributeLocations:u}),r.sampler=new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}i.sampler=r.sampler;var f=i.width,p=i.height;te$y.textureDimensions.x=f,te$y.textureDimensions.y=p,te$y.texture=i;var _=Math.sin(n.south),m=.5*Math.log((1+_)/(1-_));_=Math.sin(n.north);var g=1/(.5*Math.log((1+_)/(1-_))-m),x=new t$U({context:t,width:f,height:p,pixelFormat:t.webgpu&&i.pixelFormat===V$12.RGB?V$12.RGBA:i.pixelFormat,pixelDatatype:i.pixelDatatype,preMultiplyAlpha:i.preMultiplyAlpha,generateMipmap:e$2d.isPowerOfTwo(f)&&e$2d.isPowerOfTwo(p)});e$2d.isPowerOfTwo(f)&&e$2d.isPowerOfTwo(p)&&x.generateMipmap(I$1e.NICEST);for(var y=n.south,v=n.north,$=it$9,b=0,T=0;T<64;++T){var C=T/63,S=e$2d.lerp(y,v,C);_=Math.sin(S);var w=(.5*Math.log((1+_)/(1-_))-m)*g;$[b++]=w,$[b++]=w}r.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView($),e.shaderProgram=r.shaderProgram,e.outputTexture=x,e.uniformMap=te$y,e.vertexArray=r.vertexArray}function nt$9(e,t,i,n){var r=e._imageryProvider,o=r.tilingScheme,a=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof n$1d?1:Math.cos(i),l=o.rectangle,u=o.getNumberOfXTilesAtLevel(0);e$2e(o._suggest)&&o._suggest?u=o._numberOfLevelZeroTilesX:0!==e._lodOffset&&(e._lodOffset>0?u/=1<<Math.floor(e._lodOffset):u*=1<<Math.floor(-e._lodOffset));var c=l.width,h=a.maximumRadius*c*s/(r.tileWidth*u/n);if(e$2e(o._scaleDenominators)&&o._scaleDenominators.length>0){var d;d=o.tileXYToRectangle(0,0,0,d);var f=o.getNumberOfXTilesAtLevel(0)*d.width;h=a.maximumRadius*c*s/(c/f*r.tileWidth*u/n)}var p=h/t,_=Math.log(p)/Math.log(2);return 0|Math.round(_)}h$R.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},h$R.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},h$R.prototype.saveLocalCache=function(){if(!0===this._indexedDBSetting.isOpen&&e$2e(this._imageryProvider._indexedDBScheduler)){var e={tablename:this._imageryProvider.tablename,dbname:this._imageryProvider._indexedDBScheduler.dbname};W$S.scheduleTask(e,[])}};var L$X=void 0,b$Z=void 0;h$R.prototype.getImagery=function(e,t){var i=1;e$2e(t)&&(i<<=t);var n=[],r=this._imageryProvider;if(e$2e(b$Z)||(b$Z=new h$18),!e$2e(e)||(b$Z.west=e.min.longitude,b$Z.south=e.min.latitude,b$Z.east=e.max.longitude,b$Z.north=e.max.latitude,!e$2e(h$18.intersection(r.rectangle,b$Z))))return n;var o,a,s=0,l=23;for(e$2e(r._maximumLevel)&&(l=r._maximumLevel);s<=l&&(o=r._tilingScheme.positionToTileXY(e.max,s),a=r._tilingScheme.positionToTileXY(e.min,s),e$2e(o)||(o=new o$1o(r._tilingScheme.getNumberOfXTilesAtLevel(s),0)),e$2e(a)||(a=new o$1o(0,r._tilingScheme.getNumberOfYTilesAtLevel(s))),s!==l&&(e$2e(L$X)||(L$X=new h$18),r._tilingScheme.tileXYToRectangle(a.x,a.y,s,L$X),!e$2e(L$X)||!(L$X.width*i<2*(e.max.longitude-e.min.longitude)||L$X.height*i<2*(e.max.latitude-e.min.latitude))));s++);for(var u=a.x;u<=o.x;u++)for(var c=a.y;c>=o.y;c--)e$2e(L$X)||(L$X=new h$18),r._tilingScheme.tileXYToRectangle(u,c,s,L$X),e$2e(h$18.intersection(L$X,r.rectangle))&&e$2e(h$18.intersection(L$X,b$Z))&&n.push(this.getImageryFromCache(u,c,s));return n},h$R.prototype.getMaxScaleLevel=function(e){var t=1,i=0,n=this._imageryProvider;if(e$2e(b$Z)||(b$Z=new h$18),b$Z.west=e.min.longitude,b$Z.south=e.min.latitude,b$Z.east=e.max.longitude,b$Z.north=e.max.latitude,!e$2e(h$18.intersection(n.rectangle,b$Z)))return[];var r,o,a=0,s=23;for(e$2e(n._maximumLevel)&&(s=n._maximumLevel);a<=s&&(r=n._tilingScheme.positionToTileXY(e.max,a),o=n._tilingScheme.positionToTileXY(e.min,a),e$2e(r)||(r=new o$1o(n._tilingScheme.getNumberOfXTilesAtLevel(a),0)),e$2e(o)||(o=new o$1o(0,n._tilingScheme.getNumberOfYTilesAtLevel(a))),a!==s);a++)e$2e(L$X)||(L$X=new h$18),n._tilingScheme.tileXYToRectangle(o.x,o.y,a,L$X),e$2e(L$X)&&(L$X.width*t<2*(e.max.longitude-e.min.longitude)||L$X.height*t<2*(e.max.latitude-e.min.latitude))&&(i+=1,t*=2);return i},h$R.prototype.refresh=function(){var e=this._imageryLayers;if(e$2e(e)){for(var t in this._imageryCache){var i=this._imageryCache[t];this.removeImageryFromCache(i)}var n=e.indexOf(this);e.remove(this,!1,!0),e.add(this,n)}},h$R.prototype.setLayerStatusParameters=function(e){var t=o$1l.defer();return this._imageryProvider.setLayerStatusParameters(e).then((e=>{this.refresh(),t.resolve(e)})).otherwise((e=>{t.reject(e)})),t.promise};var _0x335aae=(_0x21ead8=!0,function(e,t){var i=_0x21ead8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x21ead8=!1,i}),_0x55d25e=_0x335aae(void 0,(function(){return _0x55d25e.toString().search("(((.+)+)+)+$").toString().constructor(_0x55d25e).search("(((.+)+)+)+$")})),_0x21ead8;_0x55d25e();var _0x5258fa=null,_0x393f86=null;function _0x46f77a(){}null!==_0x3c481f&&(_0x5258fa=_0x3c481f.cwrap("floatToTextureColor","number",["number","number","number","number","number","number","number"]),_0x393f86=_0x3c481f.cwrap("free_result",null,["number"]));var _0x3ab573=new s$T;function _0x53e3f1(e,t){for(var i=new Uint8Array(4*e.length),n=t._ceiling-t._floor,r=0,o=e.length;r<o;r++){var a=e[r],s=4*r;if(a<0||a>1)i[s+0]=255,i[s+1]=255,i[s+2]=255,i[s+3]=255;else{a=a*n+t._floor;var l=t._dictColorTable.getColor(a);i[s+0]=255*l.red,i[s+1]=255*l.green,i[s+2]=255*l.blue,i[s+3]=255*l.alpha}}return i}function _0x3637eb(e,t){var i=e,n=i.length,r=_0x3c481f._malloc(Float32Array.BYTES_PER_ELEMENT*n);_0x3c481f.HEAPF32.set(i,r/Float32Array.BYTES_PER_ELEMENT);var o=t._ceiling,a=t._floor,s=t._dictColorTable._dictTable._hash,l=[],u=[];for(var c in s)l.push(parseFloat(c));l.sort((function(e,t){return e-t}));for(var h=0,d=l.length;h<d;h++)u.push(s[l[h]]);var f=new ArrayBuffer(4*l.length),p=new Uint8Array(f),_=0;for(d=l.length;_<d;_++){var m=u[_];p[4*_]=255*m.red,p[4*_+1]=255*m.green,p[4*_+2]=255*m.blue,p[4*_+3]=255*m.alpha}var g=new Float32Array(f),x=(c=new Float32Array(l)).length,y=_0x3c481f._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x3c481f.HEAPF32.set(c,y/Float32Array.BYTES_PER_ELEMENT);var v=_0x3c481f._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x3c481f.HEAPF32.set(g,v/Float32Array.BYTES_PER_ELEMENT);var $=_0x5258fa(r,n,o,a,y,v,x),b=new Uint8Array(_0x3c481f.HEAPU8.buffer,$,4*n);return _0x393f86($),_0x3c481f._free(r),_0x3c481f._free(y),_0x3c481f._free(v),b}function _0x39510f(e,t){var i=e.length/4;return _0x3637eb(new Float32Array(e.buffer,e.byteOffset,i),t)}function _0x4212ce(e,t){for(var i=e.length/4,n=new Float32Array(e.buffer,e.byteOffset,i),r=0;r<n.length;r++){var o=n[r],a=4*r;if(o<0||o>1)e[a+0]=255,e[a+1]=255,e[a+2]=255,e[a+3]=255;else{o=o*(t._ceiling-t._floor)+t._floor;var s=t._dictColorTable.getColor(o);e[a+0]=255*s.red,e[a+1]=255*s.green,e[a+2]=255*s.blue,e[a+3]=255*s.alpha}}return new Uint8Array(e.buffer,0,e.length)}function _0x28d8f1(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function _0x36c972(e,t,i){for(var n=new Uint8Array(4*e.length),r=0;r<e.length;r++){var o,a,s,l,u=e[r],c=4*r,h=new e$2c(0,0,0,0);if(u>=0&&u<=1){var d=_0x28d8f1(u);h.x=d.x,h.y=d.y,h.z=d.z,h.w=1}o=255*h.x,a=255*h.y,s=255*h.z,l=255*h.w,e$2e(i)&&!0===i?(n[c+0]=parseInt(s),n[c+1]=parseInt(a),n[c+2]=parseInt(o),n[c+3]=parseInt(l)):(n[c+0]=parseInt(o),n[c+1]=parseInt(a),n[c+2]=parseInt(s),n[c+3]=parseInt(l))}return n}function _0xc4b138(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a,s,l,u,c=r[o],h=4*o,d=new e$2c(0,0,0,0);if(c>=0&&c<=1){c<e$2d.EPSILON9?c=e$2d.EPSILON9:1-c<e$2d.EPSILON9&&(c=1-e$2d.EPSILON9);var f=_0x28d8f1(c);d.x=f.x,d.y=f.y,d.z=f.z,d.w=1}a=255*d.x,s=255*d.y,l=255*d.z,u=255*d.w,e$2e(i)&&!0===i?(e[h+0]=l,e[h+1]=s,e[h+2]=a,e[h+3]=u):(e[h+0]=a,e[h+1]=s,e[h+2]=l,e[h+3]=u)}return new Uint8Array(e.buffer,0,e.length)}function _0x331de8(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(e$2e(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function _0x5972bf(e,t,i){if(!e$2e(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];e$2e(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function _0x22be74(e,t,i){var n=_0x331de8(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function _0x32cd4c(e,t,i){var n=_0x331de8(e,t,i);if(e$2e(n))return n.textContent.trim()}function _0x1a3be2(e,t,i){var n=_0x331de8(e,t,i);if(e$2e(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function _0x8415d6(e,t,i,n){var r=p$1d.multiply(t,i,new p$1d),o=e.vertexAttributes[0],a=o.typedArray,s=new Float32Array(a.buffer,a.byteOffset,a.byteLength/4),l=o.componentsPerAttribute,u=e.verticesCount,c=new Float32Array(3*u),h=e.attrLocation;h.aRatio=Object.keys(h).length;for(var d=0;d<u;d++){var f=new o$1p(s[d*l],s[d*l+1],s[d*l+2]),p=new o$1p;p$1d.multiplyByPoint(r,f,p);var _=a$18.fromCartesian(p),m=e$2d.toDegrees(_.longitude),g=e$2d.toDegrees(_.latitude),x=_.height,y=(m-n.left)/n.width,v=(g-n.bottom)/n.length,$=(x-n.minHeight)/n.height;c[3*d]=y,c[3*d+1]=v,c[3*d+2]=$}e.vertexAttributes.push({index:h.aRatio,typedArray:c,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0x1347ff(e,t){for(var i=[],n=Math.max(t.max.longitude-t.min.longitude,t.max.latitude-t.min.latitude),r=0,o=Math.PI;r<23&&!(n>o);)o*=.5,r++;r--;var a=e,s=a._imageryProvider;e instanceof i$P&&(s=a._provider,a=a._inner);var l=new g$15,u=l.positionToTileXY(t.max,r),c=l.positionToTileXY(t.min,r);if(!e$2e(s._minimumLevel)||r>s._minimumLevel){var h=s._maximumLevel;if(e instanceof i$P&&h--,e$2e(h)){var d=r-h;d>0&&(c.x=Math.floor(c.x/Math.pow(2,d)),c.y=Math.floor(c.y/Math.pow(2,d)),u.x=Math.floor(u.x/Math.pow(2,d)),u.y=Math.floor(u.y/Math.pow(2,d)),r=h)}for(var f=c.x;f<=u.x;f++)for(var p=c.y;p>=u.y;p--)i.push(a.getImageryFromCache(f,p,r))}return i}_0x46f77a.convertFloat=function(e,t,i){i===k$S.FilterMode.NEAREST?null===_0x5258fa?_0x4212ce(e.imageArray,t):e.imageArray=_0x39510f(e.imageArray,t):_0xc4b138(e.imageArray)},_0x46f77a.convertFloatTexture=function(e,t,i){return i===k$S.FilterMode.LINEAR?_0x36c972(e.imageArray,t,!0):null===_0x5258fa?_0x53e3f1(e.imageArray,t):_0x3637eb(e.imageArray,t)},_0x46f77a.parseResult=function(e,t,i,n){if(i.isDestroyed())return i.s3mBuffer=null,i.volBuffer=null,void(i.task=void 0);var r=i._fileName.split("_"),o=parseInt(r[1]),a=parseInt(r[2]);o=Math.pow(2,t._level)-o-1,t._version=e.version;for(var s=t._gl,l=_0x3ab573.read(e.xmlDoc).firstChild,u=l.namespaceURI,c=_0x5972bf(_0x331de8(l,"Material3Ds",u),"material",u),h={},d=[],f=t._context,p=0,_=c.length;p<_;p++){var m=c[p],g=_0x32cd4c(m,"name",u),x=new _0xf77618({});h[g]=x;var y=_0x331de8(m,"Ambient",u),v=u$Z(_0x22be74(y,"AmbientR",u),_0x22be74(y,"R",u)),$=u$Z(_0x22be74(y,"AmbientG",u),_0x22be74(y,"G",u)),b=u$Z(_0x22be74(y,"AmbientB",u),_0x22be74(y,"B",u)),T=u$Z(_0x22be74(y,"AmbientA",u),_0x22be74(y,"A",u));x._ambientColor=new e$1X(v,$,b,T);var C=_0x331de8(m,"Diffuse",u);v=u$Z(_0x22be74(C,"DiffuseR",u),_0x22be74(C,"R",u)),$=u$Z(_0x22be74(C,"DiffuseG",u),_0x22be74(C,"G",u)),b=u$Z(_0x22be74(C,"DiffuseB",u),_0x22be74(C,"B",u)),T=u$Z(_0x22be74(C,"DiffuseA",u),_0x22be74(C,"A",u)),x._diffuseColor=new e$1X(v,$,b,T);var S=_0x331de8(m,"Specular",u);v=u$Z(_0x22be74(S,"SpecularR",u),_0x22be74(S,"R",u)),$=u$Z(_0x22be74(S,"SpecularG",u),_0x22be74(S,"G",u)),b=u$Z(_0x22be74(S,"SpecularB",u),_0x22be74(S,"B",u)),T=u$Z(_0x22be74(S,"SpecularA",u),_0x22be74(S,"A",u)),x._specularColor=new e$1X(v,$,b,T);var w=_0x22be74(m,"Shininess",u);x._shininess=w,x._bTransparentSorting=_0x1a3be2(m,"TransparentSorting",u);var E=_0x5972bf(m,"texture",u);0===E.length&&t._fileType===p$T.OSGBFile&&(x._isInvalidOblique=!0);for(var P=0;P<E.length;P++){var A=E[P],L=_0x32cd4c(A,"name",u),M=_0x32cd4c(A,"TextureName",u),R=_0x331de8(A,"AddressMode",u),O=_0x32cd4c(R,"u",u),D=_0x32cd4c(R,"v",u);O="TAM_WRAP"===O?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,D="TAM_WRAP"===D?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;for(var I=_0x32cd4c(A,"TexModMatrix",u).split(","),B=16;B--;)I[B]=parseFloat(I[B]);x._texMatrix=p$1d.unpack(I);var F=e.texturePackage[L],N=L+t._id+f._id+i._relativePath.path;if(e$2e(F)&&(N+=F.imageBuffer.length),e$2e(F)&&F.width>0&&F.height>0&&e$2e(F.imageBuffer)&&F.imageBuffer.byteLength>0)switch(0===F.compressType&&(t._supportCompressType=0),i._texturesByteLength+=F.imageBuffer.length,F.compressType){case _0x2ddc8c.WEBP:var G=x.createWebp(N,M,f,P,F.imageBuffer,F.width,F.height,t.mipmapEnabled);d.push(G),x._isWEBP=!0;break;case _0x2ddc8c.CRN_DXT5:var z=x.createCRN(N,M,f,P,F,O,D,t.mipmapEnabled);d.push(z);break;default:var U=Se$e.CreateTexture(N,f,F.width,F.height,F.nFormat,F.compressType,F.imageBuffer,!1,O,D,t.mipmapEnabled);x._textures.push(U)}else if(t._isTextureShare){var V=t._baseUri+"Texture/"+M;e$2e(a$O.CREDENTIAL)&&(V=a$O.addToken(V));var k=x.requestSharedTexture(V,L,M,f,P,t.customRequestHeaders,O,D);d.push(k)}if("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt){var W=L+"_"+i._fileName;W=""!==t._volName?W+"_"+t._volName:W,"vol_texture_mapping"===t._strVolumeExt?W+=".vol":W+=".png";var H=i._relativePath.resolve(t._baseUri)+W;if(0!=t.urlType){var q=t._urlArguments,j=H.indexOf("datas")+5,X=q.layer3DName,Y=H.substring(H.indexOf("/path/")+6).split("/"),Z=q.scene3DName,K=Y[0],Q=Y[1].substring(0,Y[1].indexOf(".")),J=Y[1].substring(Y[1].indexOf(".")+1,Y[1].length);H=H.substring(0,j)+"?layerName="+X+"&rootTile="+K+"&tile="+Q+"&suffix="+J+"&scene3DName="+Z+"&layer3DName="+X}var ee=void 0;"vol_texture_mapping"===t._strVolumeExt?e$2e(ee=o$10(H,void 0))&&function(e,n,r){e.then((function(e){var o;if(e$2e(e)){var a=void 0,s=new Uint8Array(e,8),l=nt$b.inflate(s).buffer;if(1===new Float64Array(l,0,1)[0]){var u=new Uint32Array(l,8,4),c=u[0],h=u[1],d=u[2];a={nFormat:c,nWidth:h,nHeight:d,nPixelSize:u[3],imageArray:new Float32Array(l,24,h*d)}}if(e$2e(a)){var f,p=tt$i.LINEAR,_=rt$k.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(p=tt$i.NEAREST,_=rt$k.NEAREST),f=t._hypsometricSetting.filterMode===k$S.FilterMode.LINEAR?_0x36c972(a.imageArray,t._hypsometricSetting,!0):null===_0x5258fa?_0x53e3f1(a.imageArray,t._hypsometricSetting):_0x3637eb(a.imageArray,t._hypsometricSetting),(o=new t$U({context:t._context,width:a.nWidth,height:a.nHeight,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({minificationFilter:p,magnificationFilter:_})})).copyFrom({width:a.nWidth,height:a.nHeight,arrayBufferView:f}),i._volTextures[n]=o,r.texID2Vol=n}e=null}}),(function(e){}))}(ee,N,x):"png"===t._strVolumeExt&&(e$2e(ee=t$S(H))&&function(e,n,r){e.then((function(e){var o;if(e$2e(e)){var a,s=tt$i.LINEAR,l=rt$k.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(s=tt$i.NEAREST,l=rt$k.NEAREST),a=t._hypsometricSetting.filterMode===k$S.FilterMode.LINEAR?_0xc4b138(d$14(e),t._hypsometricSetting,!0):null===_0x5258fa?_0x4212ce(d$14(e),t._hypsometricSetting):_0x39510f(d$14(e),t._hypsometricSetting),(o=new t$U({context:t._context,width:e.width,height:e.height,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({minificationFilter:s,magnificationFilter:l})})).copyFrom({width:e.width,height:e.height,arrayBufferView:a}),e=null,i._volTextures[n]=o,r.texID2Vol=n}}),(function(e){}))}(ee,N,x)),d.push(ee)}}}o$1l.all(d,(function(){var n,r;if(e$2e(t._volData)){n=t._volData._volBounds;var c=t._context._id+"_"+t.id+"_layerVol",d=k$S.FilterMode.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(d=k$S.FilterMode.NEAREST),e$2e(t._hypsometricSetting)&&e$2e(t._volData._buffer)&&(d===k$S.FilterMode.NEAREST?null===_0x5258fa?_0x4212ce(t._volData._buffer,t._hypsometricSetting):t._volData._buffer=_0x39510f(t._volData._buffer,t._hypsometricSetting):_0xc4b138(t._volData._buffer,t._hypsometricSetting));var f={};f.nLength=t._volData._nLength,f.imageArray=t._volData._buffer;var p=Se$e.CreateVolumeTexture(c,s,t._context,f,d);delete t._volData._buffer,t._volData._buffer=void 0,r={volTexture:p,nFormat:3201,nSideBlockCount:t._volData._nSideBlockCount,nBlockLength:t._volData._nBlockLength,nLength:t._volData._nLength,nWidth:t._volData._width,nHeight:t._volData._height,nDepth:t._volData._depth,id:c,dataFloor:t._volData._minValue,dataCeil:t._volData._maxValue,volBounds:n},i._volObj=r}else if("vol"===t._strVolumeExt)if(e.volImageBuffer){n=e.volBounds;c=t._context._id+"_"+t.id+"_"+i._relativePath.resolve(t._baseUri)+"_"+i._fileName,d=k$S.FilterMode.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(d=k$S.FilterMode.NEAREST),3201===e.volImageBuffer.nFormat&&e$2e(t._hypsometricSetting)&&(d===k$S.FilterMode.NEAREST?null===_0x5258fa?_0x4212ce(e.volImageBuffer.imageArray,t._hypsometricSetting):e.volImageBuffer.imageArray=_0x39510f(e.volImageBuffer.imageArray,t._hypsometricSetting):_0xc4b138(e.volImageBuffer.imageArray,t._hypsometricSetting)),r={volTexture:p=Se$e.CreateVolumeTexture(c,s,t._context,e.volImageBuffer,d),nFormat:e.volImageBuffer.nFormat,nSideBlockCount:e.volImageBuffer.nSideBlockCount,nBlockLength:e.volImageBuffer.nBlockLength,nLength:e.volImageBuffer.nLength,nWidth:e.volImageBuffer.nWidth,nHeight:e.volImageBuffer.nHeight,nDepth:e.volImageBuffer.nDepth,id:c,dataFloor:t._fMinValue,dataCeil:t._fMaxValue,volBounds:n},delete e.volImageBuffer.imageArray,e.volImageBuffer.imageArray=null,e$2e(i._volObj)&&Se$e.DecRef(i._volObj.id),i._volObj=r}else t._bVolume&&(e$2e(r=i._volObj)&&(n=i._volObj.volBounds));var _=_0x331de8(l,"PageLods",u),m=_0x5972bf(_,"PagedLOD",u),g=t._matModel;if(m.length>0){for(var x=0;x<m.length;x++){(re=new _0x4d13e0)._fileType=t._fileType;var y=m[x],v=_0x32cd4c(y,"RangeDataList",u);v?v=v.replace(/.osgb$/,"").replace(/.s3m$/,""):i._isLeafTile=!0;var $=_0x32cd4c(y,"RangeMode",u),b=_0x22be74(y,"RangeList",u),T=_0x331de8(y,"BoundingSphere",u),C=_0x22be74(T,"x",u),S=_0x22be74(T,"y",u),w=_0x22be74(T,"z",u),E=_0x22be74(T,"radius",u),P=new o$1p(C,S,w);re._rangeMode="DISTANCE_FROM_EYE_POINT"==$?_0x219958.DISTANCE_FROM_EYE_POINT:_0x219958.PIXEL_SIZE_ON_SCREEN,re._rangeDataList=v,0===re._rangeDataList.indexOf("Root")&&(re._processFileType=1),re._rangeList=b,re._boundingSphere=new i$1d(P,E),re._originalBS=new i$1d(P,E),i$1d.transform(re._boundingSphere,t._matModel,re._boundingSphere);for(var A=_0x5972bf(y,"Geode",u),L=[],M=[],R=0;R<A.length;R++){for(var O=_0x32cd4c(ae=A[R],"GeoDeModMatrix",u).split(","),D=0;D<16;D++)O[D]=parseFloat(O[D]);if(O=p$1d.unpack(O),1===t._heightScale)se=p$1d.multiply(g,O,new p$1d);else{var I=p$1d.multiplyByScale(O,new o$1p(1,1,t._heightScale),new p$1d);se=p$1d.multiply(g,I,new p$1d)}for(var B=_0x5972bf(ae,"GeoName"),F=0;F<B.length;F++){var N=B[F].textContent.trim();if(!((ue=(le=e.geoPackage[N]).vertexPackage).verticesCount<1)){var G=le.arrIndexPackage,z=le.pickInfo,U={};for(R=0;R<G.length;R++){if(e$2e(ce=G[R])){var V=ce.materialCode,k=h[V],W=new _0xf77618({});e$2e(k)&&k.clone(W),U[V]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&e$2e(k.texID2Vol)&&(p=i._volTextures[k.texID2Vol])}}r&&(_0x8415d6(ue,t._oriMatModel,O,n),Se$e.AddRef(i._fileName));var H=re._boundingSphere;if(re._boundingSphere.radius<0){H=_0x3ad44f.calcBoundingSphere(t,ue,se);var q=i$1d.transform(H,p$1d.inverse(se,new p$1d),new i$1d);i$1d.transform(q,O,q),L.push(H),M.push(q)}var j={context:t._context,vertexPackage:ue,arrIndexPackage:G,edgeGeometry:le.edgeGeometry,pickInfo:z,version:e.version,mapPass:U,layer:t,matModel:se,boundingVolume:H,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:O,level:t._level,row:o,col:a,geoName:N,entity:i};if(e$2e(t.themeStyle)&&e$2e(t.themeStyle._image)){var X=_0x1a0b3c.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(X)}else{var Y=new _0x4881fc(j);if(t._imageryLayer instanceof Array){for(var Z=[],K=0;K<t._imageryLayer.length;K++){if(e$2e(he=t._imageryLayer[K])&&(he instanceof h$R||he instanceof i$P)){var Q=_0x1347ff(he,le.cartographicBounds);Z=Z.concat(Q)}}Z.length>0&&Y.setImagerys(Z,le.cartographicBounds)}else{if(e$2e(t._imageryLayer)&&(t._imageryLayer instanceof h$R||t._imageryLayer instanceof i$P))(Z=_0x1347ff(t._imageryLayer,le.cartographicBounds)).length>0&&Y.setImagerys(Z,le.cartographicBounds)}re._renderEntityList.push(Y)}}}}re._boundingSphere.radius<0&&(re._boundingSphere=i$1d.fromBoundingSpheres(L,new i$1d),re._originalBS=i$1d.fromBoundingSpheres(M,new i$1d)),e$2e(i._pagelodMap[v])?(i._pagelodMap[v]._renderEntityList=re._renderEntityList,i._pagelodMap[v]._ready=!0):(i._childrenPageLod.push(re),t.LoadingPriority===_0x539352.UsePagedLodInfo&&(re._isLeafNode=!0))}if((A=_0x5972bf(_,"Geode",u)).length>0){L=[],M=[];(re=new _0x4d13e0)._fileType=t._fileType,re._isLeafNode=!0;for(R=0;R<A.length;R++){for(O=_0x32cd4c(ae=A[R],"GeoDeModMatrix",u).split(","),D=0;D<16;D++)O[D]=parseFloat(O[D]);if(1===t._heightScale)se=p$1d.multiply(g,O,new p$1d);else{I=p$1d.multiplyByScale(O,new o$1p(1,1,t._heightScale),new p$1d);se=p$1d.multiply(g,I,new p$1d)}for(var J=_0x5972bf(ae,"GeoName",u),ee=0;ee<J.length;ee++){N=J[ee].textContent.trim();if(!((ue=(le=e.geoPackage[N]).vertexPackage).verticesCount<1)){z=le.pickInfo;var te=_0x3ad44f.calcBoundingSphere(t,ue,se);q=i$1d.transform(te,p$1d.inverse(se,new p$1d),new i$1d);i$1d.transform(q,O,q),L.push(te),M.push(q);var ie=_0x3ad44f.calcBoundingRectangle(t,ue);G=le.arrIndexPackage,U={};for(var ne in G){if(e$2e(ce=G[ne])){V=ce.materialCode,k=h[V],W=new _0xf77618({});e$2e(k)&&k.clone(W),U[V]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&e$2e(k.texID2Vol)&&(p=i._volTextures[k.texID2Vol])}}r&&(_0x8415d6(ue,t._oriMatModel,O,n),Se$e.AddRef(i._fileName));j={context:t._context,vertexPackage:ue,arrIndexPackage:G,edgeGeometry:le.edgeGeometry,pickInfo:z,version:e.version,mapPass:U,layer:t,matModel:se,boundingVolume:te,boundingRectangle:ie,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:O,level:t._level,row:o,col:a,geoName:N,entity:i};if(e$2e(t.themeStyle)){X=_0x1a0b3c.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(X)}else{Y=new _0x4881fc(j);if(t._imageryLayer instanceof Array){for(Z=[],K=0;K<t._imageryLayer.length;K++){if(e$2e(he=t._imageryLayer[K])&&(he instanceof h$R||he instanceof i$P)){Q=_0x1347ff(he,le.cartographicBounds);Z=Z.concat(Q)}}Z.length>0&&Y.setImagerys(Z,le.cartographicBounds)}else{if(e$2e(t._imageryLayer)&&(t._imageryLayer instanceof h$R||t._imageryLayer instanceof i$P))(Z=_0x1347ff(t._imageryLayer,le.cartographicBounds)).length>0&&Y.setImagerys(Z,le.cartographicBounds)}re._renderEntityList.push(Y)}}}}re._boundingSphere=i$1d.fromBoundingSpheres(L,new i$1d),re._originalBS=i$1d.fromBoundingSpheres(M,new i$1d),re._ready=!0,i._childrenPageLod.push(re)}}else{var re;i._isLeafTile=!0,(re=new _0x4d13e0)._isLeafNode=!0,re._fileType=t._fileType;var oe=_0x5972bf(_,"Geode");for(L=[],M=[],x=0;x<oe.length;x++){var ae;for(O=_0x32cd4c(ae=oe[x],"GeoDeModMatrix",u).split(","),D=0;D<16;D++)O[D]=parseFloat(O[D]);var se;if(O=p$1d.unpack(O),1===t._heightScale)se=p$1d.multiply(g,O,new p$1d);else{I=p$1d.multiplyByScale(O,new o$1p(1,1,t._heightScale),new p$1d);se=p$1d.multiply(g,I,new p$1d)}for(J=_0x5972bf(ae,"GeoName",u),ee=0;ee<J.length;ee++){var le,ue;N=J[ee].textContent.trim();if(!((ue=(le=e.geoPackage[N]).vertexPackage).verticesCount<1)){z=le.pickInfo,te=_0x3ad44f.calcBoundingSphere(t,ue,se),q=i$1d.transform(te,p$1d.inverse(se,new p$1d),new i$1d);i$1d.transform(q,O,q),L.push(te),M.push(te);for(ie=_0x3ad44f.calcBoundingRectangle(t,ue),G=le.arrIndexPackage,U={},R=0;R<G.length;R++){var ce;if(e$2e(ce=G[R])){V=ce.materialCode,k=h[V],W=new _0xf77618({});e$2e(k)&&k.clone(W),U[V]=W,("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt)&&e$2e(k.texID2Vol)&&(p=i._volTextures[k.texID2Vol])}}r&&(_0x8415d6(ue,t._oriMatModel,O,n),Se$e.AddRef(i._fileName));j={context:t._context,vertexPackage:ue,arrIndexPackage:G,edgeGeometry:le.edgeGeometry,pickInfo:z,version:e.version,mapPass:U,layer:t,matModel:se,boundingVolume:te,boundingRectangle:ie,volObj:r,volTexture:p,fileType:t._fileType,geoMatrix:O,level:t._level,row:o,col:a,geoName:N,entity:i};if(e$2e(t.themeStyle)&&e$2e(t.themeStyle._image)){X=_0x1a0b3c.createRenderEntityPageLOD(j,t);re._renderEntityList=re._renderEntityList.concat(X)}else{Y=new _0x4881fc(j);if(t._imageryLayer instanceof Array){for(Z=[],K=0;K<t._imageryLayer.length;K++){var he;if(e$2e(he=t._imageryLayer[K])&&(he instanceof h$R||he instanceof i$P)){Q=_0x1347ff(he,le.cartographicBounds);Z=Z.concat(Q)}}Z.length>0&&Y.setImagerys(Z,le.cartographicBounds)}else{if(e$2e(t._imageryLayer)&&(t._imageryLayer instanceof h$R||t._imageryLayer instanceof i$P))(Z=_0x1347ff(t._imageryLayer,le.cartographicBounds)).length>0&&Y.setImagerys(Z,le.cartographicBounds)}re._renderEntityList.push(Y)}}}}re._boundingSphere=i$1d.fromBoundingSpheres(L,new i$1d),re._originalBS=i$1d.fromBoundingSpheres(M,new i$1d),re._ready=!0,i._childrenPageLod.push(re)}if(!e$2e(i._boundingSphere)||i._isLeafTile){for(var de=[],fe=0;fe<i._childrenPageLod.length;fe++)de.push(i._childrenPageLod[fe]._boundingSphere);i._boundingSphere=i$1d.fromBoundingSpheres(de),i._oriBoundingSphere=i$1d.clone(i._boundingSphere)}if(!o$1p.equals(t._boundingSphereOffset,o$1p.ZERO)){var pe=Math.max(Math.abs(t._boundingSphereOffset.x),Math.abs(t._boundingSphereOffset.y),Math.abs(t._boundingSphereOffset.z));i.extendRadius(pe)}for(var _e in h){var me=h[_e];!e$2e(me)||(me.destroy(),h[_e]=null)}r&&Se$e.DecRef(i._fileName),i._s3mLoadState=N$Q.PARSED,i._isParsed=!0,t.LoadingPriority===_0x539352.UsePagedLodInfo&&i._isEmptyTree&&i.setEmptyTreeFlag(!1)}))},_0x46f77a.binaryDataParser=function(e,t,i,n){if(t._s3mLoadState===N$Q.UNLOAD)return t.s3mBuffer=null,t.volBuffer=null,void(t.task=void 0);var r;e$2e(e._imageryLayer)&&(r=e._fileType!==p$T.OSGBFile&&e._fileType!==p$T.OSGBCacheFile||e$2e(e.waterEffectSet)?void 0:p$1d.pack(e._matModel,new Array(16)));var o={buffer:i,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,bVolume:!1,modelMatrix:r,isCoverImageryLayer:e$2e(e._imageryLayer)},a=[i];e$2e(n)&&"vol"===e._strVolumeExt&&(o.bVolume=!0,o.volbuffer=n,a.push(n)),_0x29d1c7.init||_0x29d1c7.initWebAssembly();var s=_0x29d1c7.S3MTaskProcessor.scheduleTask(o,a);!e$2e(s)||(t._s3mLoadState=N$Q.PARSING,e._layerScheduler._statistics.numberOfProcessingAttempted=0,e._layerScheduler._statistics.numberOfTilesProcessing++,t.s3mBuffer=null,t.volBuffer=null,s.then((function(i){if(e$2e(window.Proxy)){var r=t._relativePath.toString()+t._fileName;if((!0===e._indexedDBSetting.isGeoTilesSave||e._indexedDBSetting.isGeoTilesRootNodeSave&&e._layerScheduler._isRootNode(r))&&e$2e(e._layerScheduler._indexedDBScheduler)){if(e$2e(e._layerScheduler._indexedDBScheduler.cachestatus)&&e$2e(e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename])&&(1===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]||2===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]))return;var o={blob:i,key:r,tablename:e._layerScheduler.tablename,dbname:e._layerScheduler._indexedDBScheduler.dbname};_0x29d1c7.indexTaskProcessor.scheduleTask(o,[])}}e._layerScheduler._statistics.numberOfTilesProcessing--,_0x46f77a.parseResult(i,e,t,n)})).otherwise((function(i){if(e._layerScheduler._statistics.numberOfTilesProcessing--,t.task=void 0,t._s3mLoadState==N$Q.UNLOAD)return t.s3mBuffer=null,void(t.volBuffer=null);e$2e(i)?(t.s3mBuffer=null,t.volBuffer=null,t._s3mLoadState=N$Q.FAILED,console.log(i)):t._s3mLoadState=N$Q.LOADED})))};var _0x1aa04c=(_0x7562d6=!0,function(e,t){var i=_0x7562d6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x7562d6=!1,i}),_0x364884=_0x1aa04c(void 0,(function(){return _0x364884.toString().search("(((.+)+)+)+$").toString().constructor(_0x364884).search("(((.+)+)+)+$")})),_0x7562d6;function _0x13fd1b(){this.skeletons=new e$1Q,this.bufferCache={},this.vertexJob=new _0x1ecee2,this.indexJob=new _0x2894b0}_0x364884(),_0x13fd1b.STATE={SkeletonParsing:0,SkeletonReady:1};var _0x2b550f={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,PARSED:4,CREATING:5,READY:6,LOADFAILED:7,PARSFAILED:8};function _0x1ecee2(){this.context=void 0,this.geoPackage=void 0,this.index=0}function _0x2894b0(){this.geoPackage=void 0,this.context=void 0,this.index=0}function _0x411a6b(e,t,i){if(!e$2e(t.request)){let o=i.split("#");var n=new h$16("./ModelFile/"+(encodeURIComponent(o[0])+(o[1]?"#"+o[1]:""))).resolve(e._baseUri).toString();e$2e(a$O.CREDENTIAL)&&(n=a$O.addToken(n));var r=new r$1c({url:n,throttle:!0,throttleByServer:!0,serverKey:r$1b.getServerKey(n),priorityFunction:function(){return 1e3}});t.request=r}var o=o$10(t.request.url,void 0,t.request);!e$2e(o)||(t.state=_0x2b550f.LOADING,o.then((function(e){t.request=void 0,t.buffer=e,t.state=_0x2b550f.LOADED})).otherwise((function(e){e$2e(e)?t.state=_0x2b550f.LOADFAILED:(t.state=_0x2b550f.UNLOAD,t.request=void 0)})))}function _0x2c7158(e,t,i){var n={buffer:i,isS3MZ:!1,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,isJsonScp:e._isJsonScp,createEdge:!1},r=[i];if(_0x29d1c7.init||_0x29d1c7.initWebAssembly(),_0x29d1c7.taskProcessorReady){var o=_0x29d1c7.S3MBTaskProcessor.scheduleTask(n,r);!e$2e(o)||(t.buffer=void 0,t.state=_0x2b550f.PARSING,o.then((function(e){t.state=_0x2b550f.PARSED,t.skeletonPackage=e})).otherwise((function(e){t.state=_0x2b550f.PARSFAILED})))}}function _0x46ee09(e,t,i,n){var r=e._context,o=i.skeletonPackage.geoPackage;for(var a in delete o.ignoreNormal,o)if(o.hasOwnProperty(a)){for(var s=o[a],l=s.vertexPackage.vertexAttributes.length,u=new r$17,c=0;c<l;c++)u.enqueue(c);i.vertexBufferToCreate.set(a,u);var h=s.arrIndexPackage[0];if(e$2e(h)){ce$z.UNSIGNED_SHORT,(1===h.indexType||s.vertexPackage.verticesCount>=e$2d.SIXTY_FOUR_KILOBYTES)&&r.elementIndexUint&&ce$z.UNSIGNED_INT;var d=new r$17;d.enqueue(0),i.indexBufferToCreate.set(a,d)}t.bufferCache[n+"_"+a]=1}i.state=_0x2b550f.CREATING}function _0x1b6118(e,t,i,n){var r=!0;for(var o in i.vertexBufferToCreate._hash){for(var a=i.vertexBufferToCreate._hash[o];a.length;){var s=a.peek();if(t.vertexJob.set(e._context,i.skeletonPackage.geoPackage[o],s),!e._frameState.jobScheduler.execute(t.vertexJob,i$R.BUFFER))break;a.dequeue()}r=r&&0===a.length}for(var o in i.indexBufferToCreate._hash){for(a=i.indexBufferToCreate._hash[o];a.length;){s=a.peek();if(t.indexJob.set(e._context,i.skeletonPackage.geoPackage[o],s),!e._frameState.jobScheduler.execute(t.indexJob,i$R.BUFFER))break;a.dequeue()}r=r&&0===a.length}r&&(i.vertexBufferToCreate=void 0,i.indexBufferToCreate=void 0,i.state=_0x2b550f.READY)}_0x1ecee2.prototype.set=function(e,t,i){this.context=e,this.geoPackage=t,this.index=i},_0x1ecee2.prototype.execute=function(){var e=this.context,t=this.index,i=this.geoPackage.vertexPackage.vertexAttributes[t];e$2e(i.vertexBuffer)||(i.vertexBuffer=t$X.createVertexBuffer({context:e,typedArray:i.typedArray,usage:A$18.STATIC_DRAW}),delete i.typedArray,i.vertexBuffer.vertexArrayDestroyable=!1)},_0x2894b0.prototype.set=function(e,t,i){this.geoPackage=t,this.context=e,this.index=i},_0x2894b0.prototype.execute=function(){var e=this.context;this.index;var t=this.geoPackage.arrIndexPackage[0],i=this.geoPackage.vertexPackage.verticesCount,n=ce$z.UNSIGNED_SHORT;(1===t.indexType||i>=e$2d.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(n=ce$z.UNSIGNED_INT);var r=t$X.createIndexBuffer({context:e,typedArray:t.indicesTypedArray,usage:A$18.STATIC_DRAW,indexDatatype:n});r.vertexArrayDestroyable=!1,delete t.indicesTypedArray,t.indexBuffer=r},_0x13fd1b.prototype.getSkeleton=function(e,t,i){var n=t.skeletonPackages,r=i.indexOf("#"),o=i;r>-1&&(o=i.substring(0,r));var a=this.skeletons.get(o);return e$2e(a)||(a={state:_0x2b550f.UNLOAD,skeletonPackage:void 0,vertexBufferToCreate:new e$1Q,indexBufferToCreate:new e$1Q},this.skeletons.set(o,a)),a.state===_0x2b550f.UNLOAD?_0x411a6b(e,a,i):a.state===_0x2b550f.LOADED?_0x2c7158(e,a,a.buffer):a.state===_0x2b550f.PARSED?_0x46ee09(e,this,a,o):a.state===_0x2b550f.CREATING&&_0x1b6118(e,this,a),a.state===_0x2b550f.READY&&(n.contains(o)||n.set(o,a.skeletonPackage)),a},_0x13fd1b.prototype.remove=function(e){var t=this.skeletons.get(e);if(e$2e(t)&&e$2e(t.skeletonPackage)){var i=t.skeletonPackage.geoPackage;for(var n in i)if(i.hasOwnProperty(n)){for(var r=i[n],o=r.vertexPackage.vertexAttributes,a=o.length,s=0;s<a;s++){var l=o[s];if(e$2e(l.vertexBuffer)){var u=l.vertexBuffer;l.vertexBuffer.vertexArrayDestroyable=!0,e$2e(u)&&!u.isDestroyed()&&u.vertexArrayDestroyable&&u.destroy(),l.vertexBuffer=void 0}}var c=r.arrIndexPackage[0];if(e$2e(c)){var h=c.indexBuffer;h.vertexArrayDestroyable=!0,e$2e(h)&&!h.isDestroyed()&&h.vertexArrayDestroyable&&h.destroy(),c.indexBuffer=void 0}delete this.bufferCache[e+"_"+n]}this.skeletons.remove(e)}},_0x13fd1b.parse=function(e,t){var i=t.instancePackage.geoPackage;delete i.ignoreNormal;var n=!0;for(var r in e$2e(t.skeletonPackages)||(t.skeletonPackages=new e$1Q),i)if(i.hasOwnProperty(r)){n=e.instanceSkeletonManager.getSkeleton(e,t,r).state===_0x2b550f.READY&&n}n&&(t.skeletonState=_0x13fd1b.STATE.SkeletonReady)};var y$N=1,l$T=2,B$L=4,P$N=32;function H$T(e,t,i,n){var r=e|t<<8,o=r>>11&31,a=r>>5&63,s=31&r;return i[n+0]=o<<3|o>>2,i[n+1]=a<<2|a>>4,i[n+2]=s<<3|s>>2,i[n+3]=255,r}function M$Q(e,t,i,n){for(var r=new Uint8Array(16),o=H$T(t[i+0],t[i+1],r,0),a=H$T(t[i+2],t[i+3],r,4),s=0;s<3;s++){var l=r[s],u=r[4+s];n&&o<=a?(r[8+s]=(l+u)/2,r[12+s]=0):(r[8+s]=(2*l+u)/3,r[12+s]=(l+2*u)/3)}r[11]=255,r[15]=n&&o<=a?0:255;var c=new Uint8Array(16);for(s=0;s<4;++s){var h=t[i+4+s];c[4*s+0]=3&h,c[4*s+1]=h>>2&3,c[4*s+2]=h>>4&3,c[4*s+3]=h>>6&3}for(s=0;s<16;++s)for(var d=4*c[s],f=0;f<4;++f)e[4*s+f]=r[d+f]}function N$I(e,t,i){for(var n=0;n<8;++n){var r=bytes[i+n],o=15&r,a=240&r;e[8*n+3]=o|o<<4,e[8*n+7]=a|a>>4}}function W$R(e,t,i){var n=t[i+0],r=t[i+1],o=new Uint8Array(8);if(o[0]=n,o[1]=r,n<=r){for(var a=1;a<5;++a)o[1+a]=((5-a)*n+a*r)/5;o[6]=0,o[7]=255}else for(a=1;a<7;++a)o[1+a]=((7-a)*n+a*r)/7;var s=new Uint8Array(16),l=(i=i+2,0);for(a=0;a<2;++a){for(var u=0,c=0;c<3;++c){u|=t[i++]<<8*c}for(c=0;c<8;++c){var h=u>>3*c&7;s[l++]=h}}for(a=0;a<16;++a)e[4*a+3]=o[s[a]]}function E$S(e,t,i,n){var r=0;0!=(n&(l$T|B$L))&&(r=8),M$Q(e,t,i+r,0!=(n&y$N)),0!=(n&l$T)?N$I(e,t,i):0!=(n&B$L)&&W$R(e,t,i)}function G$_(e,t,i,n){for(var r=new Uint16Array(4),o=e,a=0,s=0,l=0,u=0,c=0,h=0,d=0,f=0,p=0,_=t/4,m=i/4,g=0;g<m;g++)for(var x=0;x<_;x++)l=4*((m-g)*_+x),r[0]=n[l],r[1]=n[l+1],u=31&r[0],c=2016&r[0],h=63488&r[0],d=31&r[1],f=2016&r[1],p=63488&r[1],r[2]=5*u+3*d>>3|5*c+3*f>>3&2016|5*h+3*p>>3&63488,r[3]=5*d+3*u>>3|5*f+3*c>>3&2016|5*p+3*h>>3&63488,a=n[l+2],o[s=4*g*t+4*x]=r[3&a],o[s+1]=r[a>>2&3],o[s+2]=r[a>>4&3],o[s+3]=r[a>>6&3],o[s+=t]=r[a>>8&3],o[s+1]=r[a>>10&3],o[s+2]=r[a>>12&3],o[s+3]=r[a>>14],a=n[l+3],o[s+=t]=r[3&a],o[s+1]=r[a>>2&3],o[s+2]=r[a>>4&3],o[s+3]=r[a>>6&3],o[s+=t]=r[a>>8&3],o[s+1]=r[a>>10&3],o[s+2]=r[a>>12&3],o[s+3]=r[a>>14];return o}function R$N(e,t,i,n,r){for(var o=0!=(r&y$N)?8:16,a=0,s=0;s<i;s+=4)for(var l=0;l<t;l+=4){var u=new Uint8Array(64);E$S(u,n,a,r);for(var c=0,h=0;h<4;++h)for(var d=0;d<4;++d){var f=l+d,p=s+h;if(f<t&&p<i)for(var _=4*(t*(i-p)+f),m=0;m<4;++m)e[_++]=u[c++];else c+=4}a+=o}}function L$W(e){}L$W.decode=function(e,t,i,n,r){if(null!=e&&null!=n&&0!=i&&0!=t){var o=0;(o=r>_0x2ddc8c.BGR||r===_0x2ddc8c.LUMINANCE_ALPHA?B$L:y$N|P$N)&y$N&&o&P$N?G$_(e,t,i,n):R$N(e,t,i,n,o)}};var _0xa2c5a2=(_0x56f058=!0,function(e,t){var i=_0x56f058?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56f058=!1,i}),_0x35fb8c=_0xa2c5a2(void 0,(function(){return _0x35fb8c.toString().search("(((.+)+)+)+$").toString().constructor(_0x35fb8c).search("(((.+)+)+)+$")})),_0x56f058;_0x35fb8c();var _0x296c30=4369,_0x5c81a4=6410;function _0x5c31bd(e){this.context=e.context,this.contextId=e.context.id,this.layerId=e.layerId,this.rootName=e.rootName,this.textureId=e.textureId,this._width=e.width,this._height=e.height,this._compressType=e.compressType,this._supportCompressType=e.supportCompressType,this._pixelFormat=e.pixelFormat,this._internalFormat=e.internalFormat,this.wrapS=u$Z(e.wrapS,q$1a.CLAMP_TO_EDGE),this.wrapT=u$Z(e.wrapT,q$1a.CLAMP_TO_EDGE),this.arrayBufferView=e.arrayBufferView,this._inner=void 0,this.size=this._width*this._height,this.refCount=1,this.ready=!1,this.renderable=!1,this.isTexBlock=!0,e$2e(this.arrayBufferView)&&this.init(),this._sizeInBytes=V$12.compressedTextureSizeInBytes(this._internalFormat,this._width,this._height),this.context.memorySize+=this._sizeInBytes}function _0x16f9db(e,t,i,n){var r=1;if(!e$2d.isPowerOfTwo(i)||!e$2d.isPowerOfTwo(n))return!1;for(var o=e.length,a=i,s=n,l=0;;){if(l+=V$12.compressedTextureSizeInBytes(t,a,s),s>>=1,0==(a>>=1)&&0==s)break;r++,a=Math.max(a,1),s=Math.max(s,1)}return l===o?r:1}Object.defineProperties(_0x5c31bd.prototype,{_texture:{get:function(){return this._inner._texture}},_target:{get:function(){return this._inner._target}}}),_0x5c31bd.prototype.init=function(){if(this._compressType===_0x22a8f5.enrS3TCDXTN&&1!=this._supportCompressType){if(e$2e(this.arrayBufferView)){var e=null;L$W.decode(e,this._width,this._height,this.arrayBufferView,this._pixelFormat),e=this._pixelFormat>_0x2ddc8c.BGR||this._pixelFormat===_0x2ddc8c.LUMINANCE_ALPHA?new Uint8Array(this._width*this._height*4):new Uint16Array(this._width*this._height),L$W.decode(e,this._width,this._height,this.arrayBufferView,this._pixelFormat),this.arrayBufferView=e}this._internalFormat=_0x296c30}var t,i,n,r=!1,o=this._internalFormat,a=0,s={};if(e$2e(this.arrayBufferView)){var l=this._width,u=this._height,c=_0x16f9db(this.arrayBufferView,o,this._width,this._height)>1,h=this.arrayBufferView.byteLength,d=0;(o===_0x5c81a4||o===_0x296c30)&&(r=!0);var f=[];do{var p=V$12.compressedTextureSizeInBytes(o,l,u),_=new Uint8Array(this.arrayBufferView.buffer,this.arrayBufferView.byteOffset+d,p);0==a?s.arrayBufferView=_:f.push(_),a++,l=Math.max(l>>1,1),u=Math.max(u>>1,1),d+=p}while(c&&d<h);s.mipLevels=f}else{var m=V$12.compressedTextureSizeInBytes(o,this._width,this._height);s.arrayBufferView=o===_0x296c30?new Uint8Array(this._width*this._height*4):new Uint8Array(m)}a>1?(i=rt$k.LINEAR,t=e$2d.isPowerOfTwo(this._width)&&e$2d.isPowerOfTwo(this._height)?tt$i.LINEAR_MIPMAP_LINEAR:tt$i.LINEAR):(i=rt$k.LINEAR,t=tt$i.LINEAR),n=this._internalFormat==_0x296c30?V$12.RGBA:this._internalFormat==_0x5c81a4?V$12.LUMINANCE_ALPHA:this._internalFormat,this._inner=new t$U({context:this.context,width:this._width,height:this._height,pixelFormat:n,pixelDatatype:_$_.UNSIGNED_BYTE,flipY:r,source:s,sampler:new e$1S({wrapS:this.wrapS,wrapT:this.wrapT,minificationFilter:t,magnificationFilter:i,maximumAnisotropy:e$1W.maximumTextureFilterAnisotropy})}),this.arrayBufferView=void 0,this.ready=!0},_0x5c31bd.prototype.copyFrom=function(e){var t=e.xOffset,i=e.yOffset,n=e.width,r=e.height,o=e.arrayBufferView,a=this._internalFormat;if(this._compressType===_0x22a8f5.enrS3TCDXTN&&1!=this._supportCompressType){var s=null;a=this._pixelFormat;L$W.decode(s,n,r,o,a),s=a>_0x2ddc8c.BGR||a===_0x2ddc8c.LUMINANCE_ALPHA?new Uint8Array(n*r*4):new Uint16Array(n*r),L$W.decode(s,n,r,o,a),o=s,this._internalFormat=_0x296c30,this._inner.copyFrom({width:n,height:r,arrayBufferView:o},t,i)}else{var l=V$12.compressedTextureSizeInBytes(a,n,r),u=new Uint8Array(o.buffer,o.byteOffset,l);this._inner.copyFrom({width:n,height:r,arrayBufferView:u},t,i)}},_0x5c31bd.prototype.update=function(e){this.context=e.context,this.contextId=e.context.id,this.layerId=e.layerId,this.rootName=e.rootName,this.textureId=e.textureId,this._width=e.width,this._height=e.height,this._internalFormat=e.internalFormat,this.arrayBufferView=e.arrayBufferView,this.refCount=1,this.ready=!1,this.renderable=!1,e$2e(this.arrayBufferView)&&this.init()},_0x5c31bd.prototype.destroy=function(){this._inner&&this._inner.destroy(),this._inner=null,this.refCount=0,this.ready=!1,this.renderable=!1,this.context.memorySize-=this._sizeInBytes};var _0x576c50=(_0x41c7b7=!0,function(e,t){var i=_0x41c7b7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x41c7b7=!1,i}),_0x505f5e=_0x576c50(void 0,(function(){return _0x505f5e.toString().search("(((.+)+)+)+$").toString().constructor(_0x505f5e).search("(((.+)+)+)+$")})),_0x41c7b7;_0x505f5e();var _0xa08fda={cache:{},cacheSize:0,freeCache:{},freeQueue:new r$17,freeCacheSize:0,throttleSize:52428800,getCache:function(e,t,i){var n=this.cache[e];e$2e(n)||(n=this.cache[e]={});var r=n[t];e$2e(r)||(r=n[t]={});var o=r[i];return e$2e(o)||(o=r[i]={}),o},get:function(e,t,i,n){var r=this.getCache(e,t,i)[n];if(e$2e(r))return r.refCount++,r},create:function(e){var t=e.context,i=t.id,n=e.layerId,r=e.rootName,o=e.textureId,a=this.getCache(i,n,r),s=a[o];if(e$2e(s))return s.refCount++,s;var l=e.width,u=e.height,c=e.compressType,h=e.supportCompressType,d=e.pixelFormat,f=e.arrayBufferView;return s=new _0x5c31bd({context:t,layerId:n,rootName:r,textureId:o,width:l,height:u,compressType:c,supportCompressType:h,pixelFormat:d,internalFormat:e.internalFormat,arrayBufferView:f}),a[o]=s,s},del:function(e){if(e$2e(e.contextId)){var t=this.getCache(e.contextId,e.layerId,e.rootName);!e$2e(t[e.textureId])||0==--e.refCount&&(delete t[e.textureId],e.destroy())}}},_0x20af70=(_0xc35db5=!0,function(e,t){var i=_0xc35db5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc35db5=!1,i}),_0x21575e=_0x20af70(void 0,(function(){return _0x21575e.toString().search("(((.+)+)+)+$").toString().constructor(_0x21575e).search("(((.+)+)+)+$")})),_0xc35db5;function _0x1772f5(){this.isRoot=!1,this.isLeaf=!1,this.ownerLayerName=void 0,this._refCount=0,this.ownerEntity=void 0,this._ambientColor=new e$2c(1,1,1,1),this._diffuseColor=new e$2c(1,1,1,1),this._specularColor=new e$2c(0),this._texMatrix=p$1d.clone(p$1d.IDENTITY,new p$1d),this._shininess=50,this._bTransparentSorting=!1,this._textures=[],this._created=!1,this._createdBaker=!1,this._subRequested=!1,this._subRequestedBaker=!1,this._subRequestNames=void 0,this._subRequestNamesBake=void 0,this._subTextureNames=void 0,this._subTextureNamesBake=void 0,this._subBatchValues=void 0,this._oriTextureBake=void 0,this._batchTable=void 0,this._batchTableBake=void 0,this._ancestorTexture=void 0,this._oriTexture=void 0,this.textureParameter=void 0,this.textureParameterBake=void 0,this.textureInitilized=!1,this.textureBakeInitilized=!1,this.textureRenderableFlag=!1,this.textureBakeRenderableFlag=!1,this.isCrnTexture=!1,this.taskMap={},this._usePBR=!1}function _0x44af5c(e){if(!e$2e(e))return this._offsetPeriod=0,this._offsetSpeedU=0,this._offsetSpeedV=0,this._tilingPeriod=0,this._tilingSpeedU=0,void(this._tilingSpeedV=0);this._offsetPeriod=e.OffsetPeriod,this._offsetSpeedU=e.OffsetSpeedU,this._offsetSpeedV=e.OffsetSpeedV,this._tilingPeriod=e.TilingPeriod,this._tilingSpeedU=e.TilingSpeedU,this._tilingSpeedV=e.TilingSpeedV}_0x21575e(),Object.defineProperties(_0x1772f5.prototype,{hasTexture:{get:function(){return this._textures.length>0||(e$2e(this.baseColorTexture)||e$2e(this.normalTexture)||e$2e(this.emissiveTexture)||e$2e(this.metallicRoughnessTexture)||e$2e(this.occlusionTexture))}}}),_0x1772f5.prototype.createPBRParamter=function(e){if(e$2e(e.pbrMetallicRoughness)&&!this._usePBR){var t=e.pbrMetallicRoughness;this._usePBR=!0,this._alphaCutoff=u$Z(t.alphaCutoff,e.alphaCutoff),this._alphaMode=u$Z(t.alphaMode,e.alphaMode),this._baseColor=new e$1X(t.baseColor.x,t.baseColor.y,t.baseColor.z,t.baseColor.w),this._baseColorTextureIndex=t.baseColorTextureIndex,this._baseColorTextureCoordIndex=t.baseColorTextureCoordIndex,this._doubleSided=t.doubleSided,this._emissiveFactor=new e$1X(t.emissiveFactor.x,t.emissiveFactor.y,t.emissiveFactor.z,1),this._emissiveTextureIndex=t.emissiveTextureIndex,this._emissiveTextureCoordIndex=t.emissiveTextureCoordIndex,this._roughnessFactor=t.roughnessFactor,this._metallicFactor=t.metallicFactor,this._metallicRoughnessTextureIndex=t.metallicRoughnessTextureIndex,this._metallicRoughnessTextureCoordIndex=t.metallicRoughnessTextureCoordIndex,this._normalTextureIndex=t.normalTextureIndex,this._normalTextureCoordIndex=t.normalTextureCoordIndex,this._normalTextureScale=t.normalTextureScale,this._occlusionTextureIndex=t.occlusionTextureIndex,this._occlusionTextureCoordIndex=t.occlusionTextureCoordIndex,this._occlusionTextureStrength=t.occlusionTextureStrength,this._baseColorTextureMotion=new _0x44af5c(t.baseColorTextureMotion),this._emissiveTextureMotion=new _0x44af5c(t.emissiveTextureMotion)}};var _0x408d87={};function _0x4656d1(e,t,i){for(var n in i)if(i.hasOwnProperty(n)){var r=i[n],o=Number(n);t.setBatchedAttribute(o,0,r)}t.update(e)}function _0x244ea9(e,t,i,n,r,o){var a=r[n];if(e$2e(a)){for(var s=_0xa08fda.get(e,t,i,a);e$2e(a)&&e$2e(s)&&!s.renderable;)s.refCount--,a=r[a],s=_0xa08fda.get(e,t,i,a);return o.name=a,s}}function _0x4e95ec(e){var t=e.indexOf(".");return e.substr(0,t)}_0x1772f5.prototype.createBakeTexture=function(e,t,i,n,r,o,a,s){if(!this._createdBaker){this.textureParameterBake={context:e,layer:t,isRoot:i,rootName:n,curTextureName:r,textureInfo:o,rootBatchIdMap:a,ancestorMap:s};var l=t._textureLod;this._createdBaker=!0,this._subRequestedBaker=i&&l;var u=o.textureData,c=V$12.RGBA_DXT5,h=_0xa08fda.create({context:e,layerId:t.id,rootName:n,textureId:o.id,width:o.width,height:o.height,compressType:o.compressType,supportCompressType:t._supportCompressType,pixelFormat:o.format,internalFormat:c,arrayBufferView:u});h.renderable=i&&l;var d=o.subTexInfos.length,f=a[o.rootTextureName];if(this._textures.push(h),l){var p=[{functionName:"czm_batchTable_xywh_BakeTex",componentDatatype:S$14.FLOAT,componentsPerAttribute:4}],_=e$2e(f)?Object.keys(f).length:d;this._batchTableBake=new h$X(e,p,_),this._batchTableBake.useUBO=!0,this._batchTableBake.useForMaterial=!0,this._batchTableBake.suffix="_bakeTex";var m=_0x408d87[t.name];e$2e(m)||(m=_0x408d87[t.name]={});var g=m[n];e$2e(g)||(g=m[n]={});var x=g[r];e$2e(x)||(x=g[r]={});for(var y=o.subTexInfos,v=0;v<d;v++){var $=y[v],b=$.subName.split("_")[0],T=new e$2c($.offsetX,$.offsetY,$.width,$.height);x[b]=T}}if(!i||!l){this._subRequestNamesBake=[];for(v=0;v<o.requestNames.length;v++){var C=o.requestNames[v],S=_0x4e95ec(C);if("Tex"===S.split("_")[0]){var w=C.split("#"),E=_0x4e95ec(w[0]);if(w.length>1)for(var P=w[1],A=P.length,L=0;L<A;L+=3){var M=E+"_"+P.substring(L,L+3);this._subRequestNamesBake.push(M)}}else this._subRequestNamesBake.push(S)}}return this._oriTextureBake=h,h}},_0x1772f5.prototype.initTexture=function(){if(!this.textureInitilized&&e$2e(this.textureParameter)){this.textureInitilized=!0;var e=this.textureParameter.context,t=this.textureParameter.layer,i=this.textureParameter.isRoot,n=this.textureParameter.rootName,r=this.textureParameter.curTextureName,o=this.textureParameter.textureInfo,a=this.textureParameter.rootBatchIdMap,s=this.textureParameter.ancestorMap;this.textureParameter=void 0;var l={},u=a[o.rootTextureName],c=i||!t._textureLod?void 0:_0x244ea9(e.id,t.id,n,r,s,l),h=_0x408d87[t.name];e$2e(h)||(h=_0x408d87[t.name]={});var d=h[n];e$2e(d)||(d=h[n]={});var f=d[r];e$2e(f)||(f=d[r]={});for(var p=i?void 0:e$2e(l.name)?d[l.name]:void 0,_={},m=o.subTexInfos,g=[],x=o.subTexInfos.length,y=0;y<x;y++){var v=m[y];if(g.push(v.subName),t._textureLod){var $=v.subName.split("_")[0],b=new e$2c(v.offsetX,v.offsetY,v.width,v.height),T=e$2e(u)?u[$]:y,C=i?void 0:e$2e(p)?p[$]:void 0,S=e$2e(C)?C:b;this._batchTable.setBatchedAttribute(T,0,S),_[T]=b,f[$]=b}}this._subTexInfos=m,this._subTextureNames=g,this._subBatchValues=_,this._ancestorTexture=c}},_0x1772f5.prototype.initBakeTexture=function(){if(!this.textureBakeInitilized&&e$2e(this.textureParameterBake)){this.textureBakeInitilized=!0;var e=this.textureParameterBake.context,t=this.textureParameterBake.layer,i=this.textureParameterBake.isRoot,n=this.textureParameterBake.rootName,r=this.textureParameterBake.curTextureName,o=this.textureParameterBake.textureInfo,a=this.textureParameterBake.rootBatchIdMap,s=this.textureParameterBake.ancestorMap;this.textureParameterBake=void 0;var l={},u=a[o.rootTextureName],c=i||!t._textureLod?void 0:_0x244ea9(e.id,t.id,n,r,s,l),h=_0x408d87[t.name];e$2e(h)||(h=_0x408d87[t.name]={});var d=h[n];e$2e(d)||(d=h[n]={});var f=d[r];e$2e(f)||(f=d[r]={});for(var p=i?void 0:e$2e(l.name)?d[l.name]:void 0,_={},m=o.subTexInfos,g=[],x=o.subTexInfos.length,y=0;y<x;y++){var v=m[y];if(g.push(v.subName),t._textureLod){var $=v.subName.split("_")[0],b=new e$2c(v.offsetX,v.offsetY,v.width,v.height),T=e$2e(u)?u[$]:y,C=i?void 0:e$2e(p)?p[$]:void 0,S=e$2e(C)?C:b;this._batchTableBake.setBatchedAttribute(T,0,S),_[T]=b,f[$]=b}}this._subTexInfosBake=m,this._subTextureNamesBake=g,this._subBatchValuesBake=_,this._ancestorTextureBake=c}},_0x1772f5.prototype.createTexture=function(e,t,i,n,r,o,a,s){if(!this._created){this.isCrnTexture=o.compressType===_0x2ddc8c.CRN_DXT5,this.textureParameter={context:e,layer:t,isRoot:i,rootName:n,curTextureName:r,textureInfo:o,rootBatchIdMap:a,ancestorMap:s};var l=t._textureLod;this.isRoot=i&&l,this._created=!0,this._subRequested=i&&l;var u=o.textureData,c=V$12.RGBA_DXT5,h=_0xa08fda.create({context:e,layerId:t.id,rootName:n,textureId:o.id,width:o.width,height:o.height,compressType:o.compressType,supportCompressType:t._supportCompressType,pixelFormat:o.format,internalFormat:c,arrayBufferView:u});h.renderable=i&&l;var d=o.subTexInfos.length,f=a[o.rootTextureName];if(this._textures.push(h),l){var p=[{functionName:"czm_batchTable_xywh_BaseTex",componentDatatype:S$14.FLOAT,componentsPerAttribute:4}],_=e$2e(f)?Object.keys(f).length:d;this._batchTable=new h$X(e,p,_),this._batchTable.useUBO=!0,this._batchTable.useForMaterial=!0,this._batchTable.suffix="_baseTex";var m=_0x408d87[t.name];e$2e(m)||(m=_0x408d87[t.name]={});var g=m[n];e$2e(g)||(g=m[n]={});var x=g[r];e$2e(x)||(x=g[r]={});for(var y=o.subTexInfos,v=0;v<d;v++){var $=y[v],b=$.subName.split("_")[0],T=new e$2c($.offsetX,$.offsetY,$.width,$.height);x[b]=T}}if(!i||!l){this._subRequestNames=[];for(v=0;v<o.requestNames.length;v++){var C=o.requestNames[v],S=_0x4e95ec(C);if("Tex"===S.split("_")[0]){var w=C.split("#"),E=_0x4e95ec(w[0]);if(w.length>1)for(var P=w[1],A=P.length,L=0;L<A;L+=3){var M=E+"_"+P.substring(L,L+3);this._subRequestNames.push(M)}}else this._subRequestNames.push(S)}}return this.isLeaf=!(i&&l||1===o.requestNames.length&&o.requestNames[0]===r),this._oriTexture=h,h}},_0x1772f5.prototype.requestSubTextures=function(e,t,i,n){if(!this._subRequested&&e$2e(this._subRequestNames)){for(var r=this._subRequestNames,o=this._subTexInfos,a=this._subTextureNames,s=this._subBatchValues,l=this._oriTexture,u=[],c=i._baseUri,h=t._subTextureManager,d=0,f=r.length;d<f;d++){var p=r[d];if(e$2e(g=h.get(i._id,c,p,this))){var _=g.result;for(var m in u.push(d),_)if(_.hasOwnProperty(m)){var g=_[m],x=a.indexOf(m);if(x<0&&this.isLeaf)continue;var y=0,v=0,$=g.width,b=g.height;if(x>=0){var T=o[x];y=T.offsetX,v=T.offsetY}this.isLeaf?n.enqueue({texture:l,subTextureInfo:{xOffset:y,yOffset:v,width:$,height:b,arrayBufferView:g.arrayBufferView}}):l.arrayBufferView=g.arrayBufferView}}}if(u.length===r.length)r.length=0;else{var C=0;for(d=0,f=u.length;d<f;d++)r.splice(u[d]-C,1),C++}0===r.length&&(this.textureRenderableFlag=!0,this.isLeaf||l.init(),i._textureLod&&_0x4656d1(e,this._batchTable,s),this._subRequested=!0,this._subRequestNames=void 0,this._subTextureNames=void 0,this._subBatchValues=void 0,this._subTexInfos=void 0)}},_0x1772f5.prototype.requestBakeSubTextures=function(e,t,i,n){if(!this._subRequestedBaker&&e$2e(this._subRequestNamesBake)){for(var r=this._subRequestNamesBake,o=this._subTexInfosBake,a=this._subTextureNamesBake,s=this._subBatchValuesBake,l=this._oriTextureBake,u=[],c=i._baseUri,h=t._subTextureManager,d=0,f=r.length;d<f;d++){var p=r[d];if(e$2e(g=h.get(i._id,c,p,this))){var _=g.result;for(var m in u.push(d),_)if(_.hasOwnProperty(m)){var g=_[m],x=a.indexOf(m);if(x<0&&this.isLeaf)continue;var y=0,v=0,$=g.width,b=g.height;if(x>=0){var T=o[x];y=T.offsetX,v=T.offsetY}n.enqueue({texture:l,subTextureInfo:{xOffset:y,yOffset:v,width:$,height:b,arrayBufferView:g.arrayBufferView}})}}}if(u.length===r.length)r.length=0;else{var C=0;for(d=0,f=u.length;d<f;d++)r.splice(u[d]-C,1),C++}0===r.length&&(this.textureBakeRenderableFlag=!0,this.isLeaf||l.init(),this._subRequestedBaker=!0,this._subRequestNamesBake=void 0,this._subTextureNamesBake=void 0,this._subBatchValuesBake=void 0,this._subTexInfosBake=void 0,i._textureLod&&_0x4656d1(e,this._batchTableBake,s))}},_0x1772f5.prototype.enableTextureRenderable=function(){if(this.textureRenderableFlag){this.textureRenderableFlag=!1;var e=this._oriTexture;e.renderable=!0,e$2e(this._ancestorTexture)&&this._ancestorTexture.textureId!==e.textureId&&_0xa08fda.del(this._ancestorTexture),this._textures[0]=e,this._oriTexture=void 0,this._ancestorTexture=void 0}},_0x1772f5.prototype.enableBakeTextureRenderable=function(){if(this.textureBakeRenderableFlag){this.textureBakeRenderableFlag=!1;var e=this._oriTextureBake;e.renderable=!0,e$2e(this._ancestorTextureBake)&&this._ancestorTextureBake.textureId!==e.textureId&&_0xa08fda.del(this._ancestorTextureBake),this._textures[1]=e,this._oriTextureBake=void 0,this._ancestorTextureBake=void 0}},_0x1772f5.prototype.isDestroyed=function(){return!1},_0x1772f5.prototype.destroy=function(e){this._ambientColor=null,this._diffuseColor=null,this._specularColor=null;for(var t=0,i=this._textures.length;t<i;t++){var n=this._textures[t];_0xa08fda.del(n)}this._textures.length=0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._batchTableBake=this._batchTableBake&&this._batchTableBake.destroy(),this._subTexInfos=void 0,this._subTextureNames=void 0,this._subBatchValues=void 0,this._subTextureNamesBake=void 0,this._subTexInfosBake=void 0,e$2e(this._ancestorTexture)&&this._ancestorTexture.textureId!==this._oriTexture.textureId&&_0xa08fda.del(this._ancestorTexture),this._oriTexture=void 0,this._ancestorTexture=void 0,this.ownerEntity=void 0,this.textureParameter=void 0,this._oriTextureBake=void 0;var r=e._context;if(e$2e(this._subRequestNames)){for(t=0,i=this._subRequestNames.length;t<i;t++){var o=(a=this._subRequestNames[t]).split(".")[0];o=(s=a.indexOf("%23"))>-1?o+a.substring(s):o,r._subTextureManager.del(e._id,o)}this._subRequestNames=void 0}if(e$2e(this._subRequestNamesBake)){for(t=0,i=this._subRequestNamesBake.length;t<i;t++){var a,s;o=(a=this._subRequestNamesBake[t]).split(".")[0];o=(s=a.indexOf("%23"))>-1?o+a.substring(s):o,r._subTextureManager.del(e._id,o)}this._subRequestNames=void 0}if(e$2e(this.taskMap))for(var l in this.taskMap)if(this.taskMap.hasOwnProperty(l)){var u=this.taskMap[l];_0x29d1c7.cancelTask(u)}return this.taskMap=void 0,i$11(this)};var _0x1d7c4a=(_0x3892d7=!0,function(e,t){var i=_0x3892d7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3892d7=!1,i}),_0x1e6a32=_0x1d7c4a(void 0,(function(){return _0x1e6a32.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e6a32).search("(((.+)+)+)+$")})),_0x3892d7;function _0x27114a(){this.cache={}}function h$Q(){this.head=void 0,this.tail=void 0,this._length=0}function r$T(e,t,i){this.item=e,this.previous=t,this.next=i}function n$I(e,t){e$2e(t.previous)&&e$2e(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):e$2e(t.previous)?(t.previous.next=void 0,e.tail=t.previous):e$2e(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}_0x1e6a32(),_0x27114a.prototype.create=function(e){var t=this.cache[e];return e$2e(t)?t._refCount++:(t=new _0x1772f5,this.cache[e]=t),t},_0x27114a.prototype.free=function(e,t){var i=this.cache[t];!e$2e(i)||0==--i._refCount&&(delete this.cache[t],i.destroy(e))},Object.defineProperties(h$Q.prototype,{length:{get:function(){return this._length}}}),h$Q.prototype.add=function(e){var t=new r$T(e,this.tail,void 0);return e$2e(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t},h$Q.prototype.addToHead=function(e){var t=new r$T(e,void 0,this.head);return e$2e(this.head)?(this.head.previous=t,this.head=t):(this.head=t,this.tail=t),++this._length,t},h$Q.prototype.remove=function(e){!e$2e(e)||(n$I(this,e),--this._length)},h$Q.prototype.splice=function(e,t){if(e!==t&&e$2e(e)){n$I(this,t);var i=e.next;e.next=t,this.tail===e?this.tail=t:e$2e(i)&&(i.previous=t),t.next=i,t.previous=e}},h$Q.prototype.moveNodeBefore=function(e,t){if(e!==t){n$I(this,t);var i=e.previous;e.previous=t,this.head===e?this.head=t:i.next=t,t.next=e,t.previous=i}};var _0x52c300=(_0x30fb2d=!0,function(e,t){var i=_0x30fb2d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30fb2d=!1,i}),_0xff0221=_0x52c300(void 0,(function(){return _0xff0221.toString().search("(((.+)+)+)+$").toString().constructor(_0xff0221).search("(((.+)+)+)+$")})),_0x30fb2d;_0xff0221();var _0x3b8128={UnLoad:0,Loading:1,Loaded:2,Parsing:3,Ready:4,Failed:5};function _0x57fbd1(){this.state={},this.cache={},this.zipBufferCache={},this.list=new h$Q,this.requests=[],this.requestPriorityMap={},this.requestMap={},this.parseTaskMap={},this.tablenames=[],this.indexedDBSchedulers=[]}var _0x5f224e=0,_0x49c5af=209715200;_0x57fbd1.prototype.prepareRequest=function(e,t,i,n,r){var o=e+"_"+i;if(!e$2e(this.requestMap[o])){var a=t+i+".texblock",s=new r$1c({url:a,throttle:!0,throttleByServer:!0,type:4,priorityFunction:function(){return n._disFromCamera}});s.quadKey=i,s.providerName=r.ownerLayerName;var l=this.requestPriorityMap[n._priority];e$2e(l)||(l=this.requestPriorityMap[n._priority]=[]),l.push({request:s,url:a,keyWord:o,priority:s.priorityFunction()}),this.requestMap[o]=s}};var _0x5d4209=function(e,t){return e.priority-t.priority};function _0x5b7899(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(!(t>r-1||r>256)){n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e).slice(n,n+a).buffer;n+=a}}}function _0x113d87(e){return function(){return e._disFromCamera}}function f$Q(e){if(!e$2e(e))throw new t$15("uri is required.");var t=new h$16(e);t.normalize();var i=t.path,n=i.lastIndexOf("/");return-1!==n&&(i=i.substr(n+1)),i}_0x57fbd1.prototype.processRequests=function(e){var t=0;for(var i in this.requestPriorityMap)if(this.requestPriorityMap.hasOwnProperty(i)){if(t===r$1b.perPacketCount){for(var n=0,r=(a=this.requestPriorityMap[i]).length;n<r;n++){var o=a[n];delete this.requestMap[o.keyWord]}continue}var a;(a=this.requestPriorityMap[i]).sort(_0x5d4209);for(n=0,r=a.length;n<r;n++){o=a[n];if(this.load(o,e),++t===r$1b.perPacketCount)break}for(;n<r;n++){o=a[n];delete this.requestMap[o.keyWord]}}this.requestPriorityMap={}},_0x57fbd1.prototype.load=function(e,t){var i=this.tablenames[t.id];if(!e$2e(i))return this.request(e,t);var n=e.keyWord,r=this,o=n.indexOf("_"),a=this.indexedDBSchedulers[t.id].getElementFromDB(i,n.slice(o+1));return e$2e(a)?a.then((function(i){if(!e$2e(i))return r.request(e,t);var o={keyWord:t.id+"_"+i.keyWord,result:i.result,byteLength:i.byteLength},a=r.list.add(o);r.cache[n]=a,r.state[n]=_0x3b8128.Ready,delete r.state[n],delete r.parseTaskMap[n],_0x5f224e+=i.byteLength;for(var s=r.list.head;_0x5f224e>_0x49c5af;){var l=s,u=s.item.keyWord,c=r.cache[u].item;_0x5f224e-=c.byteLength,delete r.cache[u],s=s.next,r.list.remove(l)}}),(function(i){return r.request(e,t)})):r.request(e,t)},_0x57fbd1.prototype.request=function(e,t){var i=e.keyWord,n=e.request,r=o$10(e.url,void 0,n);if(e$2e(r)){this.state[i]=_0x3b8128.Loading;var o=this;r.then((function(e){if(t._layerScheduler._prepareLoaded||t._layerScheduler.dealWithPrepareLoad(e.byteLength),delete o.requestMap[i],e$2e(o.state[i])){o.state[i]=_0x3b8128.Loaded;var r=_0x5b7899(e,n.quadKeyIndex);if(!e$2e(r))return delete o.requestMap[i],void(o.state[i]=_0x3b8128.Failed);var a=new Uint8Array(r),s=new DataView(r),l=0,u=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT,o.zipBufferCache[i]=[];for(var c=0;c<u;c++){var h=s.getUint32(l,!0),d=a$K(a,l+=Uint32Array.BYTES_PER_ELEMENT,h);l+=h;var f=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var p=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var _=new Uint8Array(r).slice(l,l+p);o.zipBufferCache[i].push({unzipLength:f,zippedLength:p,zipBuffer:_,name:d}),l+=p}}}),(function(e){delete o.requestMap[i],o.state[i]=e$2e(e)?_0x3b8128.Failed:_0x3b8128.UnLoad}))}else delete this.requestMap[i]},_0x57fbd1.prototype.parse=function(e,t){if(!this.parseTaskMap[e]){var i=this.zipBufferCache[e];if(!e$2e(i))return void(this.state[e]=_0x3b8128.UnLoad);var n=t.taskMap[e];e$2e(n)||(n=t.taskMap[e]={data:{data:i,isCRN:t.isCrnTexture},priority:t.ownerEntity._disFromCamera,state:0,priorityFunction:_0x113d87(t.ownerEntity),processorName:"UnZipData"});var r=_0x29d1c7.startTask(n);if(e$2e(r)){this.parseTaskMap[e]=!0,this.state[e]=_0x3b8128.Parsing;var o=this;r.then((function(i){try{delete o.zipBufferCache[e],delete t.taskMap[e];for(var n=i.data,r={},a=0;a<n.length;a++){var s=n[a],l=s.name,u=new Uint8Array(s.unzipBuffer).buffer,c=new DataView(u),h=0;c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var d=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var f=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var p=c.getUint32(h,!0);h+=Uint32Array.BYTES_PER_ELEMENT;var _=new Uint8Array(u,h,p);h+=p,r[l]={width:d,height:f,arrayBufferView:_}}var m={keyWord:e,result:r,byteLength:u.byteLength},g=o.list.add(m);o.cache[e]=g,o.state[e]=_0x3b8128.Ready;var x=e.indexOf("_"),y=e.slice(0,x),v=e.slice(x+1);if(e$2e(o.indexedDBSchedulers[y])){var $={blob:{keyWord:v,result:r,byteLength:u.byteLength},key:v,tablename:o.tablenames[y],dbname:o.indexedDBSchedulers[y].dbname};_0x29d1c7.indexTaskProcessor.scheduleTask($,[])}delete o.state[e],delete t.taskMap[e],delete o.parseTaskMap[e],_0x5f224e+=u.byteLength;for(var b=o.list.head;_0x5f224e>_0x49c5af;){var T=b.item,C=b,S=T.keyWord,w=o.cache[S].item;_0x5f224e-=w.byteLength,delete o.cache[S],b=b.next,o.list.remove(C)}}catch(e){console.log(e),console.log(t.ownerEntity)}})).otherwise((function(i){delete t.taskMap[e],delete o.parseTaskMap[e],e$2e(o.state)&&(e$2e(i)?(console.log(i),o.state[e]=_0x3b8128.Failed):o.state[e]=_0x3b8128.Loaded)}))}}},_0x57fbd1.prototype.get=function(e,t,i,n){var r=e+"_"+i,o=this.cache[r];if(e$2e(o))return this.list.splice(this.list.tail,o),o.item;var a=this.state[r];e$2e(a)||(a=this.state[r]=_0x3b8128.UnLoad),a===_0x3b8128.UnLoad&&this.prepareRequest(e,t,i,n.ownerEntity,n),a===_0x3b8128.Loaded&&this.parse(r,n)},_0x57fbd1.prototype.del=function(e,t){var i=e+"_"+t;delete this.state[i],delete this.zipBufferCache[i];var n=this.requestMap[i];e$2e(n)&&(n.cancelled=!0,delete this.requestMap[i])};var _0x32121c=(_0x4d1aeb=!0,function(e,t){var i=_0x4d1aeb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d1aeb=!1,i}),_0x4f506a=_0x32121c(void 0,(function(){return _0x4f506a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f506a).search("(((.+)+)+)+$")})),_0x4d1aeb;_0x4f506a();var _0x4650ab=null,_0x3fb3db=null;function _0x1393e5(){this._taskProcessorReady=!1}function _0x374b51(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a,s,l,u,c=r[o],h=4*o,d=new e$2c(0,0,0,0);if(c>=0&&c<=1){c<e$2d.EPSILON9?c=e$2d.EPSILON9:1-c<e$2d.EPSILON9&&(c=1-e$2d.EPSILON9);var f=_0x3544ae(c);d.x=f.x,d.y=f.y,d.z=f.z,d.w=1}a=255*d.x,s=255*d.y,l=255*d.z,u=255*d.w,e$2e(i)&&!0===i?(e[h+0]=l,e[h+1]=s,e[h+2]=a,e[h+3]=u):(e[h+0]=a,e[h+1]=s,e[h+2]=l,e[h+3]=u)}return new Uint8Array(e.buffer,0,e.length)}function _0x1f936b(e,t,i){for(var n=new Uint8Array(4*e.length),r=0;r<e.length;r++){var o,a,s,l,u=e[r],c=4*r,h=new e$2c(0,0,0,0);if(u>=0&&u<=1){var d=_0x3544ae(u);h.x=d.x,h.y=d.y,h.z=d.z,h.w=1}o=255*h.x,a=255*h.y,s=255*h.z,l=255*h.w,e$2e(i)&&!0===i?(n[c+0]=parseInt(s),n[c+1]=parseInt(a),n[c+2]=parseInt(o),n[c+3]=parseInt(l)):(n[c+0]=parseInt(o),n[c+1]=parseInt(a),n[c+2]=parseInt(s),n[c+3]=parseInt(l))}return n}function _0x5cba00(e,t){for(var i=e.length/4,n=new Float32Array(e.buffer,e.byteOffset,i),r=0;r<n.length;r++){var o=n[r],a=4*r;if(o<0||o>1)e[a+0]=255,e[a+1]=255,e[a+2]=255,e[a+3]=255;else{o=o*(t._ceiling-t._floor)+t._floor;var s=t._dictColorTable.getColor(o);e[a+0]=255*s.red,e[a+1]=255*s.green,e[a+2]=255*s.blue,e[a+3]=255*s.alpha}}return new Uint8Array(e.buffer,0,e.length)}function _0x1529b5(e,t){var i=e.length/4;return _0x170c57(new Float32Array(e.buffer,e.byteOffset,i),t)}function _0x3544ae(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function _0x38d644(e,t){for(var i=new Uint8Array(4*e.length),n=t._ceiling-t._floor,r=0,o=e.length;r<o;r++){var a=e[r],s=4*r;if(a<0||a>1)i[s+0]=255,i[s+1]=255,i[s+2]=255,i[s+3]=255;else{a=a*n+t._floor;var l=t._dictColorTable.getColor(a);i[s+0]=255*l.red,i[s+1]=255*l.green,i[s+2]=255*l.blue,i[s+3]=255*l.alpha}}return i}function _0x170c57(e,t){var i=e,n=i.length,r=_0x3c481f._malloc(Float32Array.BYTES_PER_ELEMENT*n);_0x3c481f.HEAPF32.set(i,r/Float32Array.BYTES_PER_ELEMENT);var o=t._ceiling,a=t._floor,s=t._dictColorTable._dictTable._hash,l=[],u=[];for(var c in s)l.push(parseFloat(c));l.sort((function(e,t){return e-t}));for(var h=0,d=l.length;h<d;h++)u.push(s[l[h]]);var f=new ArrayBuffer(4*l.length),p=new Uint8Array(f),_=0;for(d=l.length;_<d;_++){var m=u[_];p[4*_]=255*m.red,p[4*_+1]=255*m.green,p[4*_+2]=255*m.blue,p[4*_+3]=255*m.alpha}var g=new Float32Array(f),x=(c=new Float32Array(l)).length,y=_0x3c481f._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x3c481f.HEAPF32.set(c,y/Float32Array.BYTES_PER_ELEMENT);var v=_0x3c481f._malloc(Float32Array.BYTES_PER_ELEMENT*x);_0x3c481f.HEAPF32.set(g,v/Float32Array.BYTES_PER_ELEMENT);var $=_0x4650ab(r,n,o,a,y,v,x),b=new Uint8Array(_0x3c481f.HEAPU8.buffer,$,4*n);return _0x3fb3db($),_0x3c481f._free(r),_0x3c481f._free(y),_0x3c481f._free(v),b}function _0x38792f(e,t,i,n){var r=p$1d.multiply(t,i,new p$1d),o=e.vertexAttributes[0],a=o.typedArray,s=new Float32Array(a.buffer,a.byteOffset,a.byteLength/4),l=o.componentsPerAttribute,u=e.verticesCount,c=new Float32Array(3*u),h=e.attrLocation;h.aRatio=Object.keys(h).length;for(var d=0;d<u;d++){var f=new o$1p(s[d*l],s[d*l+1],s[d*l+2]),p=new o$1p;p$1d.multiplyByPoint(r,f,p);var _=a$18.fromCartesian(p),m=e$2d.toDegrees(_.longitude),g=e$2d.toDegrees(_.latitude),x=_.height,y=(m-n.left)/n.width,v=(g-n.bottom)/n.length,$=(x-n.minHeight)/n.height;c[3*d]=y,c[3*d+1]=v,c[3*d+2]=$}e.vertexAttributes.push({index:h.aRatio,typedArray:c,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0x5d6a23(e,t,i){e._version=i.version,e._dataVersion=i.dataVersion,e._gl;var n=i.groupNode,r=i.geoPackage,o=i.matrials.material,a=e._context,s=e.materialManager;if(e$2e(s)||(s=e.materialManager=new _0x27114a),e$2e(a._subTextureManager)||(a._subTextureManager=new _0x57fbd1),e.indexedDBSetting.isGeoTilesSave&&!e$2e(a._subTextureManager.indexedDBSchedulers[e.id])&&e$2e(e._layerScheduler._indexedDBScheduler)&&(a._subTextureManager.indexedDBSchedulers[e.id]=e._layerScheduler._indexedDBScheduler,a._subTextureManager.tablenames[e.id]=e._layerScheduler.tablename+"Texture"),e._layerScheduler._prepareLoaded||!t._prepareLoad)for(var l=0,u=o.length;l<u;l++){var c=o[l].material,h=c.id,d=s.create(h);d.createPBRParamter(c),d.ownerLayerName=e.name,d.ownerEntity=t;var f=c.ambient;e$2e(f)&&(d._ambientColor=new e$1X(f.r,f.g,f.b,f.a));var p=c.diffuse;e$2e(p)&&(d._diffuseColor=new e$1X(p.r,p.g,p.b,p.a));var _=c.specular;e$2e(_)&&(d._specularColor=new e$1X(_.r,_.g,_.b,_.a)),d._shininess=u$Z(c.shininess,d._shininess),d._bTransparentSorting=u$Z(c.transparentsorting,!1),d.id=h;for(var m=c.textureunitstates,g=0;g<m.length;g++){var x=m[g].textureunitstate,y=x.id;0===x.addressmode.u?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,0===x.addressmode.v?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;var v,$=i.texturePackage[y];if(e$2e($))e$2e(v=0===g?d.createTexture(a,e,t._isRootTile,t._rootName,y,$,i.rootBatchIdMap,i.ancestorMap):d.createBakeTexture(a,e,t._isRootTile,t._rootName,y,$,i.rootBatchIdMap,i.ancestorMap))&&(t._texturesByteLength+=v._sizeInBytes)}}var b=e._matModel,T=n.pageLods,C=!0;for(l=0;l<T.length;l++){var S=new _0x4d13e0;S._fileType=e._fileType;var w=T[l];if(""===w.childTile?S._isLeafNode=!0:C=!1,S._rangeMode=w.rangeMode,S._rangeDataList=w.childTile,S._rangeList=w.rangeList,-1===w.boundingSphere.radius&&(w.boundingSphere.radius=6378137),S._isLeafNode||(S._boundingSphere=new i$1d(w.boundingSphere.center,w.boundingSphere.radius),i$1d.transform(S._boundingSphere,e._matModel,S._boundingSphere)),e$2e(w._obb)){var E=o$1p.fromElements(w._obb.obbCenter.x,w._obb.obbCenter.y,w._obb.obbCenter.z);p$1d.multiplyByPoint(e._matModel,E,E);var P=e$2c.fromElements(w._obb.xExtent.x,w._obb.xExtent.y,w._obb.xExtent.z,0),A=e$2c.fromElements(w._obb.yExtent.x,w._obb.yExtent.y,w._obb.yExtent.z,0),L=e$2c.fromElements(w._obb.zExtent.x,w._obb.zExtent.y,w._obb.zExtent.z,0);p$1d.multiplyByVector(e._matModel,P,P),p$1d.multiplyByVector(e._matModel,A,A),p$1d.multiplyByVector(e._matModel,L,L),e$2c.equals(P,e$2c.ZERO)&&(P=new e$2c(1,0,0,0)),e$2c.equals(A,e$2c.ZERO)&&(A=new e$2c(0,1,0,0)),e$2c.equals(L,e$2c.ZERO)&&(L=new e$2c(0,0,1,0));var M=new p$1e(P.x,A.x,L.x,P.y,A.y,L.y,P.z,A.z,L.z);S._orientedBoundingBox=new y$Y(E,M)}var R=w.geodes,O=[];if(e._layerScheduler._prepareLoaded||!t._prepareLoad)for(var D=0;D<R.length;D++){var I,B=R[D],F=B.matrix;if(1===e._heightScale)I=p$1d.multiply(b,F,new p$1d);else{var N=p$1d.multiplyByScale(F,new o$1p(1,1,e._heightScale),new p$1d);I=p$1d.multiply(b,N,new p$1d)}F=p$1d.unpack(F);for(var G=B.skeletonNames,z=0;z<G.length;z++){var U=G[z],V=r[U],k=V.vertexPackage;if(_0x22f70b(V,e)){var W;if(S._isLeafNode){var H=k.boundingSphere;e$2e(H)?(W=new i$1d(H.center,H.radius),i$1d.transform(W,I,W)):W=_0x3ad44f.calcBoundingSphere(e,k,I),O.push(W)}var q=_0x3ad44f.calcBoundingRectangle(e,k),j=V.arrIndexPackage,X=V.pickInfo,Y={};for(u=0;u<j.length&&u<1;u++){var Z=j[u];if(e$2e(Z)){h=Z.materialCode;var K=s.create(h);Y[h]=K}}var Q={context:e._context,vertexPackage:k,arrIndexPackage:j,edgeGeometry:V.edgeGeometry,pickInfo:X,version:i.version,mapPass:Y,layer:e,entity:t,matModel:I,boundingVolume:S._boundingSphere?S._boundingSphere:W,boundingRectangle:q,volObj:null,fileType:e._fileType,isS3MB:e._isS3MB,geoMatrix:F,dataType:e._dataType,level:e._level,geoName:U,isS3MBlock:!0};if(e$2e(e.themeStyle)){var J=_0x1a0b3c.createRenderEntityPageLOD(Q,e);S._renderEntityList=S._renderEntityList.concat(J)}else{var ee=new _0x4881fc(Q);if(e._imageryLayer instanceof Array){for(var te=[],ie=0;ie<e._imageryLayer.length;ie++){var ne=e._imageryLayer[ie];if(e$2e(ne)&&(ne instanceof h$R||ne instanceof i$P)){var re=ne.getImagery(V.cartographicBounds);te=te.concat(re)}}te.length>0&&ee.setImagerys(te,V.cartographicBounds)}else{if(e$2e(e._imageryLayer)&&(e._imageryLayer instanceof h$R||e._imageryLayer instanceof i$P))((te=e._imageryLayer.getImagery(V.cartographicBounds)).length>0||e._needCoverImageryLayer)&&ee.setImagerys(te,V.cartographicBounds)}S._renderEntityList.push(ee)}}}}S._isLeafNode&&(S._boundingSphere=i$1d.fromBoundingSpheres(O,new i$1d)),e$2e(t._pagelodMap[w.childTile])?(t._pagelodMap[w.childTile]._renderEntityList=S._renderEntityList,t._pagelodMap[w.childTile]._ready=!0):(t._childrenPageLod.push(S),e.LoadingPriority===_0x539352.UsePagedLodInfo&&(S._ready=!0,t._childrenPageLod.shift(),S._isLeafNode=!0))}if(t._isLeafTile=C,!e$2e(t._boundingSphere)||t._isLeafTile){for(var oe=[],ae=t._childrenPageLod.length;ae--;)oe.push(t._childrenPageLod[ae]._boundingSphere);t._boundingSphere=i$1d.fromBoundingSpheres(oe),t._oriBoundingSphere=i$1d.clone(t._boundingSphere)}t._s3mLoadState=N$Q.PARSED}function _0x23f2b5(e,t,i){var n=e[i._fileName];if(e$2e(n)){i._blockKey=i._fileName,i._isAncestorBlock=!0,i._rootBatchIdMap=n.rootBatchIdMap,i._ancestorMap=n.ancestorMap,_0x5d6a23(t,i,n);for(var r=[i];r.length;)for(var o=r.pop(),a=o._childrenPageLod,s=0,l=a.length;s<l;s++){var u=a[s],c=u._rangeDataList;if(""!==c){var h=new _0x128750;if(h.layer=o.layer,h._subdomainIndex=o._subdomainIndex+s+1,h._priority=o._priority-1,h._rootBatchIdMap=e$2e(n)?n.rootBatchIdMap:o._rootBatchIdMap,h._ancestorMap=e$2e(n)?n.ancestorMap:o._ancestorMap,h._rootName=o._rootName,c.indexOf("/")>-1){var d=c.lastIndexOf("/"),f=c.substring(0,d+1);h._fileName=c.substring(d+1),h._relativePath=new Uri(f).resolve(o._relativePath)}else h._relativePath=o._relativePath,h._fileName=c;h._boundingSphere=u._boundingSphere,h._originalBS=u._originalBS,h._orientedBoundingBox=u._orientedBoundingBox,u._entity=h,e$2e(n=e[h._fileName])?(h._blockKey=o._blockKey,h._isChildBlock=!0,_0x5d6a23(t,h,n),r.push(h)):(h._isAncestorBlock=!0,h._blockKey=h._fileName)}}}}function _0x428e80(e){return function(){return e._disFromCamera}}function _0x59d604(e){return e$2e(e.clampRegionEdge)&&e.clampRegionEdge}function _0x22f70b(e,t){var i=e.vertexPackage;if(i.verticesCount<1)return!1;if(t._fileType===p$T.ClampGroundPolygon){var n=t.style3D.fillStyle;return n===fr$3.WireFrame?_0x59d604(i):n!==fr$3.Fill||!_0x59d604(i)}return!0}null!==_0x3c481f&&(_0x4650ab=_0x3c481f.cwrap("floatToTextureColor","number",["number","number","number","number","number","number","number"]),_0x3fb3db=_0x3c481f.cwrap("free_result",null,["number"])),_0x1393e5.parseResult=function(e,t,i,n){t._version=e.version,t._dataVersion=e.dataVersion;var r=t._gl,o=e.groupNode,a=e.geoPackage,s=e.matrials.material,l={},u=[],c=t._context;t._RGBTOBGR;var h=i._fileName.split("_"),d=parseInt(h[1]),f=parseInt(h[2]);if(d=Math.pow(2,t._level)-d-1,t._layerScheduler._prepareLoaded||!i._prepareLoad){if(e$2e(t._imageryLayer))if(t._imageryLayer instanceof Array)for(var p=0;p<t._imageryLayer.length;p++)u.push(t._imageryLayer[p]._imageryProvider._readyPromise);else(t._imageryLayer instanceof h$R||t._imageryLayer instanceof i$P)&&u.push(t._imageryLayer._imageryProvider._readyPromise);for(var _=0,m=s.length;_<m;_++){var g=s[_].material,x=g.id,y=!1;if(e$2e(t._materialMap)){var v=t._materialMap[x];e$2e(v)&&(g=v.material,y=!0)}var $=new _0xf77618({});$.isAssociateMaterial=y,i._tmpMaterialArr.push($),$.createPBRParamter(g),l[x]=$;var b=u$Z(g.ambient,e$1X.WHITE);$._ambientColor=new e$1X(b.r,b.g,b.b,b.a);var T=u$Z(g.diffuse,e$1X.WHITE);$._diffuseColor=new e$1X(T.r,T.g,T.b,T.a);var C=u$Z(g.specular,e$1X.WHITE);$._specularColor=new e$1X(C.r,C.g,C.b,C.a),$._shininess=u$Z(g.shininess,10),$._bTransparentSorting=u$Z(g.transparentsorting,!1),$._alphaMode=g.alphaMode;var S=g.textureunitstates;0===S.length&&t._fileType===p$T.OSGBFile&&($._isInvalidOblique=!0);for(var w=0;w<S.length;w++){var E=S[w].textureunitstate,P=E.id,A=P.indexOf("PBRMaterialParam")>-1,L=$._baseColorTextureIndex===w,M=$._emissiveTextureIndex===w,R=$._normalTextureIndex===w,O=$._metallicRoughnessTextureIndex===w,D=$._occlusionTextureIndex===w;A&&($._usePBRTextureBatch=!0);var I=0===E.addressmode.u?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,B=0===E.addressmode.v?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;0===w&&($._texMatrix=p$1d.unpack(E.texmodmatrix));var F=e.texturePackage[P]||e.texturePackage[P+"\0"],N=P+t._id+t._context._id+i._relativePath.path+i._fileName;if(e$2e(F)&&(N+=F.imageBuffer.length),e$2e(F)&&F.width>0&&F.height>0&&F.imageBuffer.length>0){var G={isPBRMaterialParam:A,isEmissiveTex:M,isNormalTexture:R,isMetallicRoughnessTexture:O,isBaseColorTexture:L};switch(F.compressType){case _0x2ddc8c.WEBP:$._RGBTOBGR=F.nFormat===_0x2ddc8c.ABGR;var z=$.createWebp(N,P,c,w,F.imageBuffer,F.width,F.height,I,B,F.mipmapLevel,t.mipmapEnabled);u.push(z);break;case _0x2ddc8c.CRN_DXT5:if(!e$2e(U=$.createCRN(N,P,c,w,F,I,B,!1,t.mipmapEnabled,G)))return void i.parsingResult;u.push(U);break;case _0x2ddc8c.STANDARD_CRN:var U;if(!e$2e(U=$.createCRN(N,P,c,w,F,I,B,!0,t.mipmapEnabled)))return void i.parsingResult;u.push(U);break;case _0x2ddc8c.KTX2:var V=$.createKTX2(N,P,c,w,F,I,B,t.mipmapEnabled);e$2e(V)&&u.push(V);break;default:var k=Se$e.CreateTexture(N,c,F.width,F.height,F.nFormat,F.compressType,F.imageBuffer,!1,I,B,t.mipmapEnabled,F.oriCompressType);A?$.pbrParamTexture=k:M?$.emissiveTexture=k:R?$.normalTexture=k:O?$.metallicRoughnessTexture=k:D?$.occlusionTexture=k:L?$.baseColorTexture=k:$._textures.push(k)}}else if(t._isTextureShare&&!e$2e(t._materialMap)){N=P+t._id+t._context._id,P.lastIndexOf("\\")>-1&&(P=f$Q(P.replace(/\\/g,"/").replace("png","dxtz"))),P.lastIndexOf("/")>-1&&(P=f$Q(P.replace("png","dxtz")));var W=t._baseUri+"Texture/"+P;e$2e(a$O.CREDENTIAL)&&(W=a$O.addToken(W));var H=$.requestSharedTexture(W,N,P,c,w,t.customRequestHeaders,I,B);if(e$2e(H)&&H instanceof _0x5e76de){k=H;L?$.baseColorTexture=k:M?$.emissiveTexture=k:R?$.normalTexture=k:O?$.metallicRoughnessTexture=k:D&&($.occlusionTexture=k),0==w&&$._textures.length>0?$._textures.splice(0,0,k):$._textures.push(k)}else e$2e(H)&&u.push(H)}if(e$2e(t._maps)&&t._maps.mapNames.length>0){var q=P.substring(0,P.indexOf("."))+"_"+i._fileName+"."+t._maps.mapExts[0],j=i._relativePath.path;i._relativePath.path=t._maps.mapNames[0]+"/"+i._relativePath.path;var X=i._relativePath.resolve(t._baseUri)+q;i._relativePath.path=j,X=X.replace(/\+/g,"%2b");var Y=o$1l.defer(),Z=Y.promise;u.push(Z);var K=o$10(X,void 0);e$2e(K)?function(e,t,i,n){e.then((function(e){if(e$2e(e)){var r=w$R({uint8Array:e,format:"image/webp"});e$2e(r)?(o=t,a=i,s=n,r.then((function(e){if(e$2e(e)){var t=new t$U({context:c,source:e,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({wrapS:I,wrapT:B,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})});t.id=o+"map",a._mapTextures[o]=t,Se$e.textureManager.textures[t.id]=t,Se$e.textureManager.refCounts[t.id]=1}s.resolve(X)}),(function(e){s.resolve()}))):n.resolve(),e=null}else n.resolve();var o,a,s}),(function(e){n.resolve()}))}(K,N,$,Y):Y.resolve()}if("png"===t._strVolumeExt||"vol_texture_mapping"===t._strVolumeExt){var Q=x+"_"+i._fileName;Q=""!==t._volName?Q+"_"+t._volName:Q,"vol_texture_mapping"===t._strVolumeExt?Q+=".vol":Q+=".png";var J=i._relativePath.resolve(t._baseUri)+Q;if(0!==t.urlType){var ee=t._urlArguments,te=J.indexOf("datas")+5,ie=ee.layer3DName,ne=J.substring(J.indexOf("/path/")+6).split("/"),re=ee.scene3DName,oe=ne[0],ae=ne[1].substring(0,ne[1].indexOf(".")),se=ne[1].substring(ne[1].indexOf(".")+1,ne[1].length);J=J.substring(0,te)+"?layerName="+ie+"&rootTile="+oe+"&tile="+ae+"&suffix="+se+"&scene3DName="+re+"&layer3DName="+ie}var le=void 0;"vol_texture_mapping"===t._strVolumeExt?e$2e(le=o$10(J,void 0))&&function(e,n,r){e.then((function(e){var o;if(e$2e(e)){var a=void 0,s=new Uint8Array(e,8),l=nt$b.inflate(s).buffer;if(1===new Float64Array(l,0,1)[0]){var u=new Uint32Array(l,8,4),c=u[0],h=u[1];u[2];var d=u[3];a={nFormat:c,nWidth:h,nHeight:d,nPixelSize:d,imageArray:new Float32Array(l,24,nCount)}}if(e$2e(a)){var f,p=tt$i.LINEAR,_=rt$k.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(p=tt$i.NEAREST,_=rt$k.NEAREST),t._hypsometricSetting.filterMode===k$S.FilterMode.LINEAR?f=_0x1f936b(a.imageArray,t._hypsometricSetting,!0):(f=null===_0x4650ab?_0x38d644(a.imageArray,t._hypsometricSetting):_0x170c57(a.imageArray,t._hypsometricSetting),(o=new t$U({context:t._context,width:a.nWidth,height:a.nHeight,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({minificationFilter:p,magnificationFilter:_})})).copyForm({width:a.nWidth,height:a.nHeight,arrayBufferView:f}),i._volTexures[n]=o,r.texID2Vol=texureId),e=null}}}),(function(e){}))}(le,N,$):"png"===t._strVolumeExt&&(e$2e(le=t$S(J))&&(e$2e(le=t$S(J))&&function(e,n,r){e.then((function(e){var o;if(e$2e(e)){var a,s=tt$i.LINEAR,l=rt$k.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(s=tt$i.NEAREST,l=rt$k.NEAREST),a=t._hypsometricSetting.filterMode===k$S.FilterMode.LINEAR?_0x1f936b(d$14(e),t._hypsometricSetting,!0):null==_0x4650ab?_0x5cba00(d$14(e),t._hypsometricSetting):_0x1529b5(d$14(e),t._hypsometricSetting),(o=new t$U({context:t._context,width:e.width,height:e.height,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({minificationFilter:s,magnificationFilter:l})})).copyFrom({width:e.width,height:e.height,arrayBufferView:a}),e=null,i._volTextures[n]=o,r.texID2Vol=n}}),(function(e){}))}(le,N,$)))}}}}o$1l.all(u,(function(){if(i._tmpMaterialArr.length=0,i._s3mLoadState!==N$Q.UNLOAD){var n,s;if(e$2e(t._volData)){n=t._volData._volBounds;var u=t._context._id+"_"+t.id+"_layerVol",c=k$S.FilterMode.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(c=k$S.FilterMode.NEAREST),e$2e(t._hypsometricSetting)&&e$2e(t._volData._buffer)&&(c===k$S.FilterMode.NEAREST?null===_0x4650ab?_0x5cba00(t._volData._buffer,t._hypsometricSetting):t._volData._buffer=_0x1529b5(t._volData._buffer,t._hypsometricSetting):_0x374b51(t._volData._buffer,t._hypsometricSetting));var h={};h.nLength=t._volData._nLength,h.imageArray=t._volData._buffer;var p=Se$e.CreateVolumeTexture(u,r,t._context,h,c);delete t._volData._buffer,t._volData._buffer=void 0,s={volTexture:p,nFormat:3201,nSideBlockCount:t._volData._nSideBlockCount,nBlockLength:t._volData._nBlockLength,nLength:t._volData._nLength,nWidth:t._volData._width,nHeight:t._volData._height,nDepth:t._volData._depth,id:u,dataFloor:t._volData._minValue,dataCeil:t._volData._maxValue,volBounds:n},i._volObj=s}else if("vol"===t._strVolumeExt)if(e.volImageBuffer){n=e.volBounds;u=t._context._id+"_"+t.id+"_"+i._relativePath.resolve(t._baseUri)+"_"+i._fileName,c=k$S.FilterMode.LINEAR;e$2e(t._hypsometricSetting)&&t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(c=k$S.FilterMode.NEAREST),3201===e.volImageBuffer.nFormat&&e$2e(t._hypsometricSetting)&&(c===k$S.FilterMode.NEAREST?null===_0x4650ab?_0x5cba00(e.volImageBuffer.imageArray,t._hypsometricSetting):e.volImageBuffer.imageArray=_0x1529b5(e.volImageBuffer.imageArray,t._hypsometricSetting):_0x374b51(e.volImageBuffer.imageArray,t._hypsometricSetting)),s={volTexture:p=Se$e.CreateVolumeTexture(u,r,t._context,e.volImageBuffer,c),nFormat:e.volImageBuffer.nFormat,nSideBlockCount:e.volImageBuffer.nSideBlockCount,nBlockLength:e.volImageBuffer.nBlockLength,nLength:e.volImageBuffer.nLength,nWidth:e.volImageBuffer.nWidth,nHeight:e.volImageBuffer.nHeight,nDepth:e.volImageBuffer.nDepth,id:u,dataFloor:t._fMinValue,dataCeil:t._fMaxValue,volBounds:n},delete e.volImageBuffer.imageArray,e.volImageBuffer.imageArray=null,e$2e(i._volObj)&&Se$e.DecRef(i._volObj.id),i._volObj=s}else t._bVolume&&(e$2e(s=i._volObj)&&(n=i._volObj.volBounds));for(var _=t._matModel,m=o.pageLods,g=!0,x=0;x<m.length;x++){var y=new _0x4d13e0;y._fileType=t._fileType;var v=m[x];if(""===v.childTile?y._isLeafNode=!0:g=!1,y._rangeMode=v.rangeMode,y._rangeDataList=v.childTile,y._rangeList=v.rangeList,-1===v.boundingSphere.radius&&(v.boundingSphere.radius=6378137),v.boundingSphere&&(t._dataVersion>2||!y._isLeafNode)&&(y._boundingSphere=new i$1d(v.boundingSphere.center,v.boundingSphere.radius),y._originalBS=new i$1d(v.boundingSphere.center,v.boundingSphere.radius),i$1d.transform(y._boundingSphere,t._matModel,y._boundingSphere)),e$2e(v._obb)){var $=o$1p.fromElements(v._obb.obbCenter.x,v._obb.obbCenter.y,v._obb.obbCenter.z),b=e$2c.fromElements(v._obb.xExtent.x,v._obb.xExtent.y,v._obb.xExtent.z,0),T=e$2c.fromElements(v._obb.yExtent.x,v._obb.yExtent.y,v._obb.yExtent.z,0),C=e$2c.fromElements(v._obb.zExtent.x,v._obb.zExtent.y,v._obb.zExtent.z,0),S=new p$1e(b.x,T.x,C.x,b.y,T.y,C.y,b.z,T.z,C.z);y._orientedBoundingBox=new y$Y($,S),y._orientedBoundingBox._updateBBox(),y.min=y._orientedBoundingBox.bbox[0].clone(),y.max=y._orientedBoundingBox.bbox[0].clone();for(var w,E=1;E<8;E++)w=y._orientedBoundingBox.bbox[E],y.min.x>w.x&&(y.min.x=w.x),y.min.y>w.y&&(y.min.y=w.y),y.min.z>w.z&&(y.min.z=w.z),y.max.x<w.x&&(y.max.x=w.x),y.max.y<w.y&&(y.max.y=w.y),y.max.z<w.z&&(y.max.z=w.z);p$1d.multiplyByPoint(t._matModel,$,$),p$1d.multiplyByVector(t._matModel,b,b),p$1d.multiplyByVector(t._matModel,T,T),p$1d.multiplyByVector(t._matModel,C,C),S[0]=b.x,S[1]=b.y,S[2]=b.z,S[3]=T.x,S[4]=T.y,S[5]=T.z,S[6]=C.x,S[7]=C.y,S[8]=C.z,y._orientedBoundingBox.center=$,y._orientedBoundingBox.halfAxes=S,y._orientedBoundingBox.areaDirty=1}else if(e$2e(v.min)){var P=[];P.push(new o$1p(v.min.x,v.min.y,v.min.z)),P.push(new o$1p(v.min.x,v.min.y,v.max.z)),P.push(new o$1p(v.min.x,v.max.y,v.min.z)),P.push(new o$1p(v.min.x,v.max.y,v.max.z)),P.push(new o$1p(v.max.x,v.min.y,v.min.z)),P.push(new o$1p(v.max.x,v.min.y,v.max.z)),P.push(new o$1p(v.max.x,v.max.y,v.min.z)),P.push(new o$1p(v.max.x,v.max.y,v.max.z)),y.obbMin=v.min,y.obbMax=v.max;for(var A=0;A<8;A++)P[A]=p$1d.multiplyByPoint(t._matModel,P[A],P[A]);y._orientedBoundingBox=y$Y.fromPoints(P,y._orientedBoundingBox)}var L=v.geodes,M=[],R=[];if(t._layerScheduler._prepareLoaded||!i._prepareLoad)for(var O=0;O<L.length;O++){var D,I=L[O],B=I.matrix;if(1===t._heightScale)D=p$1d.multiply(_,B,new p$1d);else{var F=p$1d.multiplyByScale(B,new o$1p(1,1,t._heightScale),new p$1d);D=p$1d.multiply(_,F,new p$1d)}B=p$1d.unpack(B);for(var N=I.skeletonNames,G=0;G<N.length;G++){var z=N[G],U=a[z],V=U.vertexPackage;if(_0x22f70b(U,t)){var k,W;if(y._isLeafNode&&!e$2e(y._boundingSphere)){var H=V.boundingSphere;e$2e(H)?(W=new i$1d(H.center,H.radius),k=i$1d.transform(W,D,new i$1d),W=i$1d.transform(W,B,W)):(k=_0x3ad44f.calcBoundingSphere(t,V,D),W=i$1d.transform(k,p$1d.inverse(D,new p$1d),new i$1d),i$1d.transform(W,B,W)),M.push(k),R.push(W)}for(var q=_0x3ad44f.calcBoundingRectangle(t,V),j=U.arrIndexPackage,X=U.pickInfo,Y={},Z=0;Z<j.length;Z++){var K=j[Z];if(e$2e(K)){var Q=K.materialCode;if(e$2e(Q)){var J=new _0xf77618({});Q=Q.replace(/\0/,"");var ee=l[Q];e$2e(ee)&&ee.clone(J),Y[Q]=J;for(let e=0;e<J._textures.length;e++){let t=J._textures[e];i._texturesByteLength+=t.sizeInBytes,e$2e(J.normalTexture)&&(i._texturesByteLength+=J.normalTexture._sizeInBytes),e$2e(J.baseColorTexture)&&(i._texturesByteLength+=J.baseColorTexture._sizeInBytes),e$2e(J.emissiveTexture)&&(i._texturesByteLength+=J.emissiveTexture._sizeInBytes),e$2e(J.metallicRoughnessTexture)&&(i._texturesByteLength+=J.metallicRoughnessTexture._sizeInBytes),e$2e(J.occlusionTexture)&&(i._texturesByteLength+=J.occlusionTexture._sizeInBytes)}}}}s&&(_0x38792f(V,t._oriMatModel,B,n),Se$e.AddRef(i._fileName));var te=u$Z(y$Y.clone(y._orientedBoundingBox),i$1d.clone(y._boundingSphere));te=u$Z(te,k);var ie={context:t._context,vertexPackage:V,arrIndexPackage:j,edgeGeometry:U.edgeGeometry,pickInfo:X,version:e.version,mapPass:Y,layer:t,entity:i,matModel:D,boundingVolume:te,boundingRectangle:q,volObj:s,volTexture:p,fileType:t._fileType,isS3MB:t._isS3MB,geoMatrix:B,dataType:t._dataType,level:t._level,row:d,col:f,geoName:z};if(t._fileType===p$T.PointCloudFile){var ne=z.split("#");if(ne.length>0&&"SupermapPointCloud"===ne[0]){for(var re={},oe=1;oe<ne.length;oe++){var ae=ne[oe].split("%");if(2===ae.length){var se=ae[0],le=ae[1].split("_");if(2===le.length){var ue=le[0],ce=le[1];re[se]={start:parseInt(ue),end:parseInt(ce)}}}}ie.ptIndexGroup=re}else if(z.lastIndexOf("_")>-1){var he=z.substring(0,z.lastIndexOf("_"));ie.groupName=he}}if(e$2e(t.themeStyle)&&e$2e(t.themeStyle._image)){var de=_0x1a0b3c.createRenderEntityPageLOD(ie,t);y._renderEntityList=y._renderEntityList.concat(de)}else if(V.vertexAttributes.length>0){var fe=new _0x4881fc(ie);if(t._imageryLayer instanceof Array){for(var pe=[],_e=0;_e<t._imageryLayer.length;_e++){var me=t._imageryLayer[_e];if(e$2e(me)&&(me instanceof h$R||me instanceof i$P)){var ge=me.getImagery(U.cartographicBounds);pe=pe.concat(ge)}}pe.length>0&&fe.setImagerys(pe,U.cartographicBounds)}else{if(e$2e(t._imageryLayer)&&(t._imageryLayer instanceof h$R||t._imageryLayer instanceof i$P))((pe=t._imageryLayer.getImagery(U.cartographicBounds)).length>0||t._needCoverImageryLayer)&&fe.setImagerys(pe,U.cartographicBounds)}y._renderEntityList.push(fe)}}}}if(y._isLeafNode&&!e$2e(y._boundingSphere)&&(y._boundingSphere=i$1d.fromBoundingSpheres(M,new i$1d),y._originalBS=i$1d.fromBoundingSpheres(R,new i$1d)),t.LoadingPriority===_0x539352.UsePagedLodInfo){var xe=i._fileName;0===xe.indexOf("./")&&(xe=xe.substring(2));_e=xe.lastIndexOf("/");var ye=v.childTile;_e>0&&""!=ye&&(ye=xe.substring(0,_e+1)+ye),e$2e(i._pagelodMap[ye])?i._pagelodMap[ye]._renderEntityList=y._renderEntityList:(i._leafChildren.push(y),y._isLeafNode=!0)}else i._childrenPageLod.push(y)}if(i._isLeafTile=g,!e$2e(i._boundingSphere)||i._isLeafTile||i._hasLeafChild){for(var ve=[],$e=i._childrenPageLod.length;$e--;)ve.push(i._childrenPageLod[$e]._boundingSphere);for(var be=i._leafChildren.length;be--;)ve.push(i._leafChildren[be]._boundingSphere);i._boundingSphere=i$1d.fromBoundingSpheres(ve),i._oriBoundingSphere=i$1d.clone(i._boundingSphere)}for(var Te in l)if(l.hasOwnProperty(Te)){var Ce=l[Te];if(!e$2e(Ce))continue;Ce.destroy(),l[Te]=null}i._s3mLoadState=N$Q.PARSED}}))},_0x1393e5.parseResultInstance=function(e,t){var i=t.instancePackage,n=t.skeletonPackages;e._version=i.version,e._gl;var r={},o=e._context,a=i.groupNode;for(C=0;C<n.length;C++){var s=(H=n.values[C]).matrials.material;for(N=0;N<s.length;N++){var l=s[N].material,u=l.id;(Se=new _0xf77618({})).createPBRParamter(l),r[u]=Se;var c=l.ambient;e$2e(c)&&(Se._ambientColor=new e$1X(c.r,c.g,c.b,c.a));var h=l.diffuse;e$2e(h)&&(Se._diffuseColor=new e$1X(h.r,h.g,h.b,h.a));var d=l.specular;e$2e(d)&&(Se._specularColor=new e$1X(d.r,d.g,d.b,d.a)),Se._shininess=u$Z(l.shininess,Se._shininess),Se._bTransparentSorting=u$Z(l.transparentsorting,Se._bTransparentSorting);var f=l.textureunitstates;for(X=0;X<f.length;X++){var p=f[X].textureunitstate,_=p.id,m=0===p.addressmode.u?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,g=0===p.addressmode.v?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;Se._texMatrix=p$1d.unpack(p.texmodmatrix);var x=H.texturePackage[_],y=_+e._id+e._context._id;if(e$2e(x)&&x.width>0&&x.height>0&&x.imageBuffer.length>0){0===x.compressType&&(e._supportCompressType=0);var v=Se$e.CreateTexture(y,o,x.width,x.height,x.nFormat,x.compressType,x.imageBuffer,!1,m,g);Se._textures.push(v)}}}}for(var $=e._matModel,b=a.pageLods,T=!0,C=0;C<b.length;C++){var S=new _0x4d13e0;S._fileType=e._fileType;var w=b[C];if(""===w.childTile?S._isLeafNode=!0:T=!1,S._rangeMode=w.rangeMode,S._rangeDataList=w.childTile,S._rangeList=w.rangeList,-1===w.boundingSphere.radius&&(w.boundingSphere.radius=6378137),w.boundingSphere&&(S._boundingSphere=new i$1d(w.boundingSphere.center,w.boundingSphere.radius),S._originalBS=new i$1d(w.boundingSphere.center,w.boundingSphere.radius),i$1d.transform(S._boundingSphere,e._matModel,S._boundingSphere)),e$2e(w._obb)){var E=o$1p.fromElements(w._obb.obbCenter.x,w._obb.obbCenter.y,w._obb.obbCenter.z),P=e$2c.fromElements(w._obb.xExtent.x,w._obb.xExtent.y,w._obb.xExtent.z,0),A=e$2c.fromElements(w._obb.yExtent.x,w._obb.yExtent.y,w._obb.yExtent.z,0),L=e$2c.fromElements(w._obb.zExtent.x,w._obb.zExtent.y,w._obb.zExtent.z,0),M=new p$1e(P.x,A.x,L.x,P.y,A.y,L.y,P.z,A.z,L.z);if(o$1p.equals(o$1p.ZERO,P)||o$1p.equals(o$1p.ZERO,A)||o$1p.equals(o$1p.ZERO,L))S._orientedBoundingBox=void 0;else{S._orientedBoundingBox=new y$Y(E,M),S._orientedBoundingBox._updateBBox(),S.min=S._orientedBoundingBox.bbox[0].clone(),S.max=S._orientedBoundingBox.bbox[0].clone();for(var R,O=1;O<8;O++)R=S._orientedBoundingBox.bbox[O],S.min.x>R.x&&(S.min.x=R.x),S.min.y>R.y&&(S.min.y=R.y),S.min.z>R.z&&(S.min.z=R.z),S.max.x<R.x&&(S.max.x=R.x),S.max.y<R.y&&(S.max.y=R.y),S.max.z<R.z&&(S.max.z=R.z);p$1d.multiplyByPoint(e._matModel,E,E),p$1d.multiplyByVector(e._matModel,P,P),p$1d.multiplyByVector(e._matModel,A,A),p$1d.multiplyByVector(e._matModel,L,L),M[0]=P.x,M[1]=P.y,M[2]=P.z,M[3]=A.x,M[4]=A.y,M[5]=A.z,M[6]=L.x,M[7]=L.y,M[8]=L.z,S._orientedBoundingBox.center=E,S._orientedBoundingBox.halfAxes=M,S._orientedBoundingBox.areaDirty=1}}else if(e$2e(w.min)){var D=[];D.push(new o$1p(w.min.x,w.min.y,w.min.z)),D.push(new o$1p(w.min.x,w.min.y,w.max.z)),D.push(new o$1p(w.min.x,w.max.y,w.min.z)),D.push(new o$1p(w.min.x,w.max.y,w.max.z)),D.push(new o$1p(w.max.x,w.min.y,w.min.z)),D.push(new o$1p(w.max.x,w.min.y,w.max.z)),D.push(new o$1p(w.max.x,w.max.y,w.min.z)),D.push(new o$1p(w.max.x,w.max.y,w.max.z)),S.obbMin=w.min,S.obbMax=w.max;for(var I=0;I<8;I++)D[I]=p$1d.multiplyByPoint(e._matModel,D[I],D[I]);S._orientedBoundingBox=y$Y.fromPoints(D,S._orientedBoundingBox)}S._isLeafNode||(S._boundingSphere=new i$1d(w.boundingSphere.center,w.boundingSphere.radius),i$1d.transform(S._boundingSphere,e._matModel,S._boundingSphere));for(var B=w.geodes,F=[],N=0;N<B.length;N++){var G,z=B[N],U=z.matrix;if(1===e._heightScale)G=p$1d.multiply($,U,new p$1d);else{var V=p$1d.multiplyByScale(U,new o$1p(1,1,e._heightScale),new p$1d);G=p$1d.multiply($,V,new p$1d)}U=p$1d.unpack(U);for(var k=z.skeletonNames,W=0;W<k.length;W++){var H,q=k[W],j=q;if((Me=q.indexOf("#"))>-1&&(j=q.substring(0,Me)),e$2e(H=n.get(j))){var X,Y,Z=[],K={};for(X=0;X<H.groupNode.pageLods.length;X++){var Q=H.groupNode.pageLods[X].geodes;for(Y=0;Y<Q.length;Y++)for(var J=Q[Y],ee=p$1d.unpack(J.matrix,0,new p$1d),te=0;te<J.skeletonNames.length;te++){var ie=J.skeletonNames[te];K[ie]=ee,Z.push(ie)}}for(X=0;X<Z.length;X++){var ne=Z[X],re=K[ne],oe=H.geoPackage[ne];if(e$2e(oe)){var ae=i.geoPackage[q],se=l$1f(ae.pickInfo),le=e$2e(oe.pickInfo)?Object.keys(oe.pickInfo):[],ue=le.length;for(var ce in se)se.hasOwnProperty(ce)&&(se[ce].skeletonIds=le);var he=ae.vertexPackage,de=oe.vertexPackage,fe={},pe=[],_e=de.vertexAttributes.length;for(Y=0;Y<de.vertexAttributes.length;Y++){var me=p$19({},ge=de.vertexAttributes[Y]);pe.push(me)}for(Y=0;Y<he.vertexAttributes.length;Y++){var ge;if((ge=he.vertexAttributes[Y]).instanceDivisor>0)(me=p$19({},ge)).index=_e++,pe.push(me)}for(var xe in _e=de.vertexAttributes.length,delete he.attrLocation.aColor,fe=p$19({},de.attrLocation),he.attrLocation)fe[xe]=he.attrLocation[xe]+_e;var ye,ve={attrLocation:fe,minVerticesValue:de.minVerticesValue,nCompressOptions:de.nCompressOptions,vertCompressConstant:de.vertCompressConstant,vertexAttributes:pe,vertexColor:de.vertexColor,verticesCount:de.verticesCount,skeletonCount:ue};if(ve.instanceIndex=he.instanceIndex,ve.instanceCount=he.instanceCount,ve.instanceMode=he.instanceMode,ve.instanceBuffer=he.instanceBuffer,ve.instanceBounds=he.instanceBounds,delete he.attrLocation.aColor,S._isLeafNode&&!e$2e(S._boundingSphere)){var $e=ve.boundingSphere;e$2e($e)?(ye=new i$1d($e.center,$e.radius),i$1d.transform(ye,G,ye)):ye=_0x3ad44f.calcBoundingSphere(e,ve,G),F.push(ye),_0x3ad44f.calcBoundingRectangle(e,ve)}var be=u$Z(e$2e(S._orientedBoundingBox)?y$Y.clone(S._orientedBoundingBox):void 0,i$1d.clone(S._boundingSphere));be=u$Z(be,ye);var Te=oe.arrIndexPackage,Ce={},Se=r[u=Te[0].materialCode],we=new _0xf77618({});e$2e(Se)&&Se.clone(we),Ce[u]=we;var Ee={context:e._context,version:i.version,vertexPackage:ve,arrIndexPackage:Te,pickInfo:se,mapPass:Ce,layer:e,entity:t,matModel:G,boundingVolume:be,fileType:e._fileType,isS3MB:e._isS3MB,geoMatrix:U,instanceSkeletonMatrix:re,dataType:e._dataType,instanceSkeletonManager:e.instanceSkeletonManager,geoName:ne,skeletonUrl:j};if(e$2e(e.themeStyle)){var Pe=_0x1a0b3c.createRenderEntityPageLOD(Ee,e);S._renderEntityList=S._renderEntityList.concat(Pe)}else{var Ae=new _0x4881fc(Ee);if(e._imageryLayer instanceof Array){for(var Le=[],Me=0;Me<e._imageryLayer.length;Me++){var Re=e._imageryLayer[Me];if(e$2e(Re)&&(Re instanceof h$R||Re instanceof i$P)){var Oe=Re.getImagery(oe.cartographicBounds);Le=Le.concat(Oe)}}Le.length>0&&Ae.setImagerys(Le,oe.cartographicBounds)}else{if(e$2e(e._imageryLayer)&&(e._imageryLayer instanceof h$R||e._imageryLayer instanceof i$P))((Le=e._imageryLayer.getImagery(oe.cartographicBounds)).length>0||e._needCoverImageryLayer)&&Ae.setImagerys(Le,oe.cartographicBounds)}S._renderEntityList.push(Ae)}}}}}}if(S._isLeafNode&&!e$2e(S._boundingSphere)){S._boundingSphere=i$1d.fromBoundingSpheres(F,new i$1d);for(var De=0;De<S._renderEntityList.length;De++)S._renderEntityList[De]._boundingVolume=S._boundingSphere}t._childrenPageLod.push(S)}if(t._isLeafTile=T,!e$2e(t._boundingSphere)||t._isLeafTile){for(var Ie=[],Be=t._childrenPageLod.length;Be--;)Ie.push(t._childrenPageLod[Be]._boundingSphere);t._boundingSphere=i$1d.fromBoundingSpheres(Ie)}if(!o$1p.equals(e._boundingSphereOffset,o$1p.ZERO)){var Fe=Math.max(Math.abs(e._boundingSphereOffset.x),Math.abs(e._boundingSphereOffset.y),Math.abs(e._boundingSphereOffset.z));t.extendRadius(Fe)}for(var Ne in r)if(r.hasOwnProperty(Ne)){var Ge=r[Ne];if(!e$2e(Ge))continue;Ge.destroy(),r[Ne]=null}t._s3mLoadState=N$Q.PARSED,t.instancePackage=void 0,t.skeletonPackages=void 0,t.skeletonState=void 0},_0x1393e5.parseChildGroup=_0x23f2b5,_0x1393e5.binaryDataParser=function(e,t,i,n){if(t._s3mLoadState===N$Q.UNLOAD)return t.s3mBuffer=null,t.volBuffer=null,void(t.task=void 0);var r;(e._computeHeight||e._needCoverImageryLayer)&&(r=e._fileType!==p$T.OSGBFile&&e._fileType!==p$T.OSGBCacheFile||e$2e(e.waterEffectSet)?void 0:p$1d.pack(e._matModel,new Array(16)));var o,a=e._frameState.mode===C$14.SCENE3D&&e._fileType!=p$T.ClampGroundRealtimeRasterCache&&e._fileType!=p$T.PolylineEffect;if(6378137!==t$12.WGS84.radii.z&&"Ellipsoid_WGS84"!==e._globeType&&a&&!e$2e(e._animationInfo.duration)){var s=new t$12(6378137,6378137,6378137),l=o$1p.fromDegrees(e.lon,e.lat,e.height+e.style3D.bottomAltitude,s);o={sphereMatrix:m$19.eastNorthUpToFixedFrame(l,s),ellipsoidMatrix:e._matModel}}var u={buffer:i,isS3MZ:e._isS3MZ,fileType:e._fileType,supportCompressType:e._supportCompressType,ignoreNormal:e._ignoreNormal,isJsonScp:e._isJsonScp,isRoot:t._isRootTile,rootBatchIdMap:t._rootBatchIdMap,ancestorMap:t._ancestorMap,isS3MBlock:e._isS3MBlock,modelMatrix:r,materialType:e._materialType,isOSGB:e._isOSGB,isCoverImageryLayer:e._needCoverImageryLayer,fileName:t._fileName,transformPar:o,ellipsoid:6378137!==t$12.WGS84.radii.z&&"Ellipsoid_WGS84"===e._globeType},c=[i];if(e$2e(n)&&(u.bVolume=!0,u.volbuffer=n,c.push(n)),_0x29d1c7.init||_0x29d1c7.initWebAssembly(),_0x29d1c7.taskProcessorReady){e$2e(t.task)||(t.task={data:u,transferableObjects:e._isS3MBlock?void 0:c,priority:t._disFromCamera,state:0,priorityFunction:_0x428e80(t),processorName:"S3MBTilesParser"});var h=_0x29d1c7.startTask(t.task);!e$2e(h)||(t._s3mLoadState=N$Q.PARSING,e._layerScheduler._statistics.numberOfProcessingAttempted=0,e._layerScheduler._statistics.numberOfTilesProcessing++,h.then((function(i){if(t.s3mBuffer=null,t.volBuffer=null,t.task=void 0,t._s3mLoadState!==N$Q.UNLOAD){if(e$2e(window.Proxy)){var r=t._relativePath.toString()+t._fileName;if((!0===e._indexedDBSetting.isGeoTilesSave||e._indexedDBSetting.isGeoTilesRootNodeSave&&e._layerScheduler._isRootNode(r))&&e$2e(e._layerScheduler._indexedDBScheduler)){if(e$2e(e._layerScheduler._indexedDBScheduler.cachestatus)&&e$2e(e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename])&&(1===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]||2===e._layerScheduler._indexedDBScheduler.cachestatus[e._layerScheduler.tablename][r]))return;var o={blob:i,key:r,tablename:e._layerScheduler.tablename,dbname:e._layerScheduler._indexedDBScheduler.dbname,reserveCount:e._localCacheMemoryReserveCount};_0x29d1c7.indexTaskProcessor.scheduleTask(o,[])}e.offlineDownload&&e$2e(e._layerScheduler._indexedDBScheduler)&&(sumEntity++,e._layerScheduler._indexedDBScheduler.putElementInDB(e._layerScheduler.tablename,r,i).then((function(){savedEntity++,sumEntity===savedEntity&&console.log("complete")})).otherwise((function(e){})))}e._layerScheduler._statistics.numberOfTilesProcessing--,null==i&&(t._s3mLoadState,N$Q.UNLOAD),"InstanceModel"===e._dataType?(t.skeletonState=_0x13fd1b.STATE.SkeletonParsing,t.instancePackage=i):e._isS3MBlock?_0x23f2b5(i,e,t):_0x1393e5.parseResult(i,e,t,n)}})).otherwise((function(i){if(e._layerScheduler._statistics.numberOfTilesProcessing--,t.task=void 0,t._s3mLoadState==N$Q.UNLOAD)return t.s3mBuffer=null,void(t.volBuffer=null);e$2e(i)?(t.s3mBuffer=null,t.volBuffer=null,t._s3mLoadState=N$Q.FAILED,console.log(i)):t._s3mLoadState=N$Q.LOADED})))}},_0x1393e5.saveLocalCache=function(e,t){var i={tablename:e,dbname:t};_0x29d1c7.indexTaskProcessor.scheduleTask(i,[])};var _0x4e8b5c=(_0x30e964=!0,function(e,t){var i=_0x30e964?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30e964=!1,i}),_0x3d6306=_0x4e8b5c(void 0,(function(){return _0x3d6306.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d6306).search("(((.+)+)+)+$")})),_0x30e964;_0x3d6306();var _0x10c72e={REST:0,KEY_VALUE:1},Tr$4=Object.freeze(_0x10c72e);if(typeof WebAssembly<"u"&&"object"!=typeof window){let e=function(e){return t$F.locateFile?t$F.locateFile(e,g$V):g$V+e},t=function(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1,p$P(e))},i=function(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return D$O[e>>0];case"i16":return m$R[e>>1];case"i32":case"i64":return w$M[e>>2];case"float":return ct$8[e>>2];case"double":return Et$7[e>>3];default:C("invalid type for getValue: "+t)}return null},n=function(e,t){e||C("Assertion failed: "+t)},r=function(e){var t=t$F["_"+e];return n(t,"Cannot call unknown function "+e+", make sure it is exported"),t},o=function(e,t,i,o,a){var s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);t=K$K(i),c(e,t,i)}return t},array:function(e){var t=K$K(e.length);return h(e,t),t}};var u=r(e),d=[],f=0;if(n("array"!==t,'Return type should not be "array".'),o)for(var p=0;p<o.length;p++){var _=s[i[p]];_?(0===f&&(f=Se$f()),d[p]=_(o[p])):d[p]=o[p]}var m=u.apply(null,d);return m=function(e){return"string"===t?l(e):"boolean"===t?Boolean(e):e}(m),0!==f&&le$t(f),m},a=function(e,t,i,n){return function(){return o(e,t,i,arguments)}},s=function(e,i,n){for(var r=i+n,o=i;e[o]&&!(o>=r);)++o;if(o-i>16&&e.subarray&&ut$9)return ut$9.decode(e.subarray(i,o));for(var a="";i<o;){var s=e[i++];if(128&s){var l=63&e[i++];if(192!=(224&s)){var u=63&e[i++];if(224==(240&s)?s=(15&s)<<12|l<<6|u:(240!=(248&s)&&t("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),s=(7&s)<<18|l<<12|u<<6|63&e[i++]),s<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|l)}else a+=String.fromCharCode(s)}return a},l=function(e,t){return e?s(P$M,e,t):""},u=function(e,i,n,r){if(!(r>0))return 0;for(var o=n,a=n+r-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343)l=65536+((1023&l)<<10)|1023&e.charCodeAt(++s);if(l<=127){if(n>=a)break;i[n++]=l}else if(l<=2047){if(n+1>=a)break;i[n++]=192|l>>6,i[n++]=128|63&l}else if(l<=65535){if(n+2>=a)break;i[n++]=224|l>>12,i[n++]=128|l>>6&63,i[n++]=128|63&l}else{if(n+3>=a)break;l>=2097152&&t("Invalid Unicode code point 0x"+l.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x1FFFFF)."),i[n++]=240|l>>18,i[n++]=128|l>>12&63,i[n++]=128|l>>6&63,i[n++]=128|63&l}}return i[n]=0,n-o},c=function(e,t,i){return n("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),u(e,P$M,t,i)},h=function(e,t){n(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),D$O.set(e,t)},d=function(e,t){return e%t>0&&(e+=t-e%t),e},f=function(e){st$6=e,t$F.HEAP8=D$O=new Int8Array(e),t$F.HEAP16=m$R=new Int16Array(e),t$F.HEAP32=w$M=new Int32Array(e),t$F.HEAPU8=P$M=new Uint8Array(e),t$F.HEAPU16=new Uint16Array(e),t$F.HEAPU32=G$Z=new Uint32Array(e),t$F.HEAPF32=ct$8=new Float32Array(e),t$F.HEAPF64=Et$7=new Float64Array(e)},p=function(){var e=Rt$8();n(0==(3&e)),G$Z[1+(e>>2)]=34821223,G$Z[2+(e>>2)]=2310721022,w$M[0]=1668509029},_=function(){if(!L$V){var e=Rt$8(),t=G$Z[1+(e>>2)],i=G$Z[2+(e>>2)];(34821223!=t||2310721022!=i)&&C("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+i.toString(16)+" "+t.toString(16)),1668509029!==w$M[0]&&C("Runtime error: The application has corrupted its heap memory area (address zero)!")}},m=function(){if(t$F.preRun)for("function"==typeof t$F.preRun&&(t$F.preRun=[t$F.preRun]);t$F.preRun.length;)v(t$F.preRun.shift());R(It$9)},g=function(){_(),n(!Ot$8),Ot$8=!0,R(pt$8)},x=function(){_(),R(Ut$7)},y=function(){if(_(),t$F.postRun)for("function"==typeof t$F.postRun&&(t$F.postRun=[t$F.postRun]);t$F.postRun.length;)$(t$F.postRun.shift());R(Nt$7)},v=function(e){It$9.unshift(e)},$=function(e){Nt$7.unshift(e)},b=function(e){v$D++,t$F.monitorRunDependencies&&t$F.monitorRunDependencies(v$D),e?(n(!I$_[e]),I$_[e]=1,null===X$M&&typeof setInterval<"u"&&(X$M=setInterval((function(){if(L$V)return clearInterval(X$M),void(X$M=null);var e=!1;for(var t in I$_)e||(e=!0,p$P("still waiting on run dependencies:")),p$P("dependency: "+t);e&&p$P("(end of list)")}),1e4))):p$P("warning: run dependency added without ID")},T=function(e){if(v$D--,t$F.monitorRunDependencies&&t$F.monitorRunDependencies(v$D),e?(n(I$_[e]),delete I$_[e]):p$P("warning: run dependency removed without ID"),0==v$D&&(null!==X$M&&(clearInterval(X$M),X$M=null),W$Q)){var t=W$Q;W$Q=null,t()}},C=function(e){throw t$F.onAbort&&t$F.onAbort(e),p$P(e+=""),L$V=!0,e="abort("+e+") at "+B(),new WebAssembly.RuntimeError(e)},S=function(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)},w=function(e){return S(e,ye$k)},E=function(e){return S(e,be$o)},P=function(e,t){return function(){var i=e,r=t;return t||(r=t$F.asm),n(Ot$8,"native function `"+i+"` called before runtime initialization"),n(!jt$5,"native function `"+i+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),r[e]||n(r[e],"exported native function `"+i+"` not found"),r[e].apply(null,arguments)}},A=function(e){try{if(e==O$C&&H$S)return new Uint8Array(H$S);if(Q$O)return Q$O(e);throw"both async and sync fetching of the wasm failed"}catch(e){C(e)}},L=function(){if(!H$S&&(q$T||S$K)){if("function"==typeof fetch&&!E(O$C))return fetch(O$C,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+O$C+"'";return e.arrayBuffer()})).catch((function(){return A(O$C)}));if(rt$e)return new Promise((function(e,t){rt$e(O$C,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return A(O$C)}))},M=function(){var e={env:Ct$6,wasi_snapshot_preview1:Ct$6};function t(e,t){var i=e.exports;t$F.asm=i,k$N=t$F.asm.memory,n(k$N,"memory not found in wasm exports"),f(k$N.buffer),h$P=t$F.asm.__indirect_function_table,n(h$P,"table not found in wasm exports"),T("wasm-instantiate")}b("wasm-instantiate");var i=t$F;function r(e){n(t$F===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,t(e.instance)}function o(t){return L().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){p$P("failed to asynchronously prepare wasm: "+e),E(O$C)&&p$P("warning: Loading from a file URI ("+O$C+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),C(e)}))}if(t$F.instantiateWasm)try{return t$F.instantiateWasm(e,t)}catch(e){return p$P("Module.instantiateWasm callback failed with error: "+e),!1}return H$S||"function"!=typeof WebAssembly.instantiateStreaming||w(O$C)||E(O$C)||"function"!=typeof fetch?o(r):fetch(O$C,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return p$P("wasm streaming compile failed: "+e),p$P("falling back to ArrayBuffer instantiation"),o(r)}))})),{}},R=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?h$P.get(i)():h$P.get(i)(t.arg):i(void 0===t.arg?null:t.arg)}else t(t$F)}},O=function(e){return t("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e},D=function(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=O(e);return e===t?e:t+" ["+e+"]"}))},I=function(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},B=function(){var e=I();return t$F.extraStackTrace&&(e+="\n"+t$F.extraStackTrace()),D(e)},F=function(e,t,i){P$M.copyWithin(e,t,t+i)},N=function(){return P$M.length},G=function(e){try{return k$N.grow(e-st$6.byteLength+65535>>>16),f(k$N.buffer),1}catch(t){console.error("emscripten_realloc_buffer: Attempted to grow heap from "+st$6.byteLength+" bytes to "+e+" bytes, but got error: "+t)}},z=function(e){var t=N();n(e>t);var i=2147483648;if(e>i)return p$P("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+i+" bytes!"),!1;for(var r=1;r<=4;r*=2){var o=t*(1+.2/r);o=Math.min(o,e+100663296);var a=Math.min(i,d(Math.max(e,o),65536));if(G(a))return!0}return p$P("Failed to grow the heap from "+t+" bytes to "+a+" bytes, not enough memory!"),!1},U=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},V=function(){Ht$6(),p()},k=function(e){function t(){Z$M||(Z$M=!0,t$F.calledRun=!0,!L$V&&(g(),x(),t$F.onRuntimeInitialized&&t$F.onRuntimeInitialized(),n(!t$F._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),y()))}v$D>0||(V(),m(),v$D>0)||(t$F.setStatus?(t$F.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t$F.setStatus("")}),1),t()}),1)):t(),_())};var t$F=typeof t$F<"u"?t$F:{},j$P={},F$Q;for(F$Q in t$F)t$F.hasOwnProperty(F$Q)&&(j$P[F$Q]=t$F[F$Q]);var q$T=!1,S$K=!1,et$d=!1,St$4=!1;if(q$T="object"==typeof window,S$K="function"==typeof importScripts,et$d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,St$4=!q$T&&!et$d&&!S$K,t$F.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var g$V="",J$J,rt$e,Q$O,nt$8,it$8;if(et$d)g$V=S$K?require("path").dirname(g$V)+"/":__dirname+"/",J$J=function(e,t){return nt$8||(nt$8=require("fs")),it$8||(it$8=require("path")),e=it$8.normalize(e),nt$8.readFileSync(e,t?null:"utf8")},Q$O=function(e){var t=J$J(e,!0);return t.buffer||(t=new Uint8Array(t)),n(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),typeof module<"u"&&(module.exports=t$F),process.on("uncaughtException",(function(e){if(!(e instanceof U))throw e})),process.on("unhandledRejection",C),t$F.inspect=function(){return"[Emscripten Module object]"};else if(St$4)typeof read<"u"&&(J$J=function(e){return read(e)}),Q$O=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),n("object"==typeof t),t)},typeof scriptArgs<"u"&&scriptArgs,typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print);else{if(!q$T&&!S$K)throw new Error("environment detection error");S$K?g$V=self.location.href:typeof document<"u"&&document.currentScript&&(g$V=document.currentScript.src),g$V=0!==g$V.indexOf("blob:")?g$V.substr(0,g$V.lastIndexOf("/")+1):"",J$J=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},S$K&&(Q$O=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),rt$e=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)}}t$F.print||console.log.bind(console);var p$P=t$F.printErr||console.warn.bind(console),H$S;for(F$Q in j$P)j$P.hasOwnProperty(F$Q)&&(t$F[F$Q]=j$P[F$Q]);j$P=null,t$F.arguments&&t$F.arguments,Object.getOwnPropertyDescriptor(t$F,"arguments")||Object.defineProperty(t$F,"arguments",{configurable:!0,get:function(){C("Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),t$F.thisProgram&&t$F.thisProgram,Object.getOwnPropertyDescriptor(t$F,"thisProgram")||Object.defineProperty(t$F,"thisProgram",{configurable:!0,get:function(){C("Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),t$F.quit&&t$F.quit,Object.getOwnPropertyDescriptor(t$F,"quit")||Object.defineProperty(t$F,"quit",{configurable:!0,get:function(){C("Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),n(typeof t$F.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$F.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$F.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),n(typeof t$F.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),n(typeof t$F.read>"u","Module.read option was removed (modify read_ in JS)"),n(typeof t$F.readAsync>"u","Module.readAsync option was removed (modify readAsync in JS)"),n(typeof t$F.readBinary>"u","Module.readBinary option was removed (modify readBinary in JS)"),n(typeof t$F.setWindowTitle>"u","Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),n(typeof t$F.TOTAL_MEMORY>"u","Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Object.getOwnPropertyDescriptor(t$F,"read")||Object.defineProperty(t$F,"read",{configurable:!0,get:function(){C("Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(t$F,"readAsync")||Object.defineProperty(t$F,"readAsync",{configurable:!0,get:function(){C("Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(t$F,"readBinary")||Object.defineProperty(t$F,"readBinary",{configurable:!0,get:function(){C("Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(t$F,"setWindowTitle")||Object.defineProperty(t$F,"setWindowTitle",{configurable:!0,get:function(){C("Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),t$F.wasmBinary&&(H$S=t$F.wasmBinary),Object.getOwnPropertyDescriptor(t$F,"wasmBinary")||Object.defineProperty(t$F,"wasmBinary",{configurable:!0,get:function(){C("Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),t$F.noExitRuntime,Object.getOwnPropertyDescriptor(t$F,"noExitRuntime")||Object.defineProperty(t$F,"noExitRuntime",{configurable:!0,get:function(){C("Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),"object"!=typeof WebAssembly&&C("no native wasm support detected");var k$N,L$V=!1,ut$9=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var st$6,D$O,P$M,m$R,w$M,G$Z,ct$8,Et$7,ft$7=5242880;t$F.TOTAL_STACK&&n(ft$7===t$F.TOTAL_STACK,"the stack size can no longer be determined at runtime");var Tt$8=t$F.INITIAL_MEMORY||16777216,h$P;Object.getOwnPropertyDescriptor(t$F,"INITIAL_MEMORY")||Object.defineProperty(t$F,"INITIAL_MEMORY",{configurable:!0,get:function(){C("Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),n(Tt$8>=ft$7,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+Tt$8+"! (TOTAL_STACK="+ft$7+")"),n(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),n(!t$F.wasmMemory,"Use of `wasmMemory` detected. Use -s IMPORTED_MEMORY to define wasmMemory externally"),n(16777216==Tt$8,"Detected runtime INITIAL_MEMORY setting. Use -s IMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!"}();var It$9=[],pt$8=[],Ut$7=[],Nt$7=[],Ot$8=!1,jt$5=!1;pt$8.push({func:function(){Fe$i()}}),n(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),n(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var v$D=0,X$M=null,W$Q=null,I$_={};t$F.preloadedImages={},t$F.preloadedAudios={};var d$11={error:function(){C("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){d$11.error()},createDataFile:function(){d$11.error()},createPreloadedFile:function(){d$11.error()},createLazyFile:function(){d$11.error()},open:function(){d$11.error()},mkdev:function(){d$11.error()},registerDevice:function(){d$11.error()},analyzePath:function(){d$11.error()},loadFilesFromDB:function(){d$11.error()},ErrnoError:function(){d$11.error()}};t$F.FS_createDataFile=d$11.createDataFile,t$F.FS_createPreloadedFile=d$11.createPreloadedFile;var ye$k="data:application/octet-stream;base64,",be$o="file://",O$C="ThirdParty/unzip.wasm";w(O$C)||(O$C=e(O$C));var Ct$6={emscripten_memcpy_big:F,emscripten_resize_heap:z};M();var Fe$i=t$F.___wasm_call_ctors=P("__wasm_call_ctors");t$F._unzip=P("unzip"),t$F._freePointer=P("freePointer"),t$F._malloc=P("malloc"),t$F._free=P("free"),t$F.___errno_location=P("__errno_location"),t$F._fflush=P("fflush");var Se$f=t$F.stackSave=P("stackSave"),le$t=t$F.stackRestore=P("stackRestore"),K$K=t$F.stackAlloc=P("stackAlloc"),Ht$6=t$F._emscripten_stack_init=function(){return(Ht$6=t$F._emscripten_stack_init=t$F.asm.emscripten_stack_init).apply(null,arguments)};t$F._emscripten_stack_get_free=function(){return(t$F._emscripten_stack_get_free=t$F.asm.emscripten_stack_get_free).apply(null,arguments)};var Rt$8=t$F._emscripten_stack_get_end=function(){return(Rt$8=t$F._emscripten_stack_get_end=t$F.asm.emscripten_stack_get_end).apply(null,arguments)},Z$M;if(Object.getOwnPropertyDescriptor(t$F,"intArrayFromString")||(t$F.intArrayFromString=function(){C("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"intArrayToString")||(t$F.intArrayToString=function(){C("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$F.ccall=o,t$F.cwrap=a,Object.getOwnPropertyDescriptor(t$F,"setValue")||(t$F.setValue=function(){C("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$F.getValue=i,Object.getOwnPropertyDescriptor(t$F,"allocate")||(t$F.allocate=function(){C("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"UTF8ArrayToString")||(t$F.UTF8ArrayToString=function(){C("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"UTF8ToString")||(t$F.UTF8ToString=function(){C("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stringToUTF8Array")||(t$F.stringToUTF8Array=function(){C("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stringToUTF8")||(t$F.stringToUTF8=function(){C("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"lengthBytesUTF8")||(t$F.lengthBytesUTF8=function(){C("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stackTrace")||(t$F.stackTrace=function(){C("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addOnPreRun")||(t$F.addOnPreRun=function(){C("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addOnInit")||(t$F.addOnInit=function(){C("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addOnPreMain")||(t$F.addOnPreMain=function(){C("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addOnExit")||(t$F.addOnExit=function(){C("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addOnPostRun")||(t$F.addOnPostRun=function(){C("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeStringToMemory")||(t$F.writeStringToMemory=function(){C("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeArrayToMemory")||(t$F.writeArrayToMemory=function(){C("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeAsciiToMemory")||(t$F.writeAsciiToMemory=function(){C("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addRunDependency")||(t$F.addRunDependency=function(){C("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"removeRunDependency")||(t$F.removeRunDependency=function(){C("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"FS_createFolder")||(t$F.FS_createFolder=function(){C("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"FS_createPath")||(t$F.FS_createPath=function(){C("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"FS_createDataFile")||(t$F.FS_createDataFile=function(){C("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"FS_createPreloadedFile")||(t$F.FS_createPreloadedFile=function(){C("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"FS_createLazyFile")||(t$F.FS_createLazyFile=function(){C("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"FS_createLink")||(t$F.FS_createLink=function(){C("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"FS_createDevice")||(t$F.FS_createDevice=function(){C("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"FS_unlink")||(t$F.FS_unlink=function(){C("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(t$F,"getLEB")||(t$F.getLEB=function(){C("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getFunctionTables")||(t$F.getFunctionTables=function(){C("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"alignFunctionTables")||(t$F.alignFunctionTables=function(){C("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerFunctions")||(t$F.registerFunctions=function(){C("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"addFunction")||(t$F.addFunction=function(){C("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"removeFunction")||(t$F.removeFunction=function(){C("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getFuncWrapper")||(t$F.getFuncWrapper=function(){C("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"prettyPrint")||(t$F.prettyPrint=function(){C("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"makeBigInt")||(t$F.makeBigInt=function(){C("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"dynCall")||(t$F.dynCall=function(){C("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getCompilerSetting")||(t$F.getCompilerSetting=function(){C("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"print")||(t$F.print=function(){C("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"printErr")||(t$F.printErr=function(){C("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getTempRet0")||(t$F.getTempRet0=function(){C("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"setTempRet0")||(t$F.setTempRet0=function(){C("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"callMain")||(t$F.callMain=function(){C("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"abort")||(t$F.abort=function(){C("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stringToNewUTF8")||(t$F.stringToNewUTF8=function(){C("'stringToNewUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"setFileTime")||(t$F.setFileTime=function(){C("'setFileTime' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"emscripten_realloc_buffer")||(t$F.emscripten_realloc_buffer=function(){C("'emscripten_realloc_buffer' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"ENV")||(t$F.ENV=function(){C("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"ERRNO_CODES")||(t$F.ERRNO_CODES=function(){C("'ERRNO_CODES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"ERRNO_MESSAGES")||(t$F.ERRNO_MESSAGES=function(){C("'ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"setErrNo")||(t$F.setErrNo=function(){C("'setErrNo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"inetPton4")||(t$F.inetPton4=function(){C("'inetPton4' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"inetNtop4")||(t$F.inetNtop4=function(){C("'inetNtop4' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"inetPton6")||(t$F.inetPton6=function(){C("'inetPton6' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"inetNtop6")||(t$F.inetNtop6=function(){C("'inetNtop6' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"readSockaddr")||(t$F.readSockaddr=function(){C("'readSockaddr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeSockaddr")||(t$F.writeSockaddr=function(){C("'writeSockaddr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"DNS")||(t$F.DNS=function(){C("'DNS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getHostByName")||(t$F.getHostByName=function(){C("'getHostByName' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"GAI_ERRNO_MESSAGES")||(t$F.GAI_ERRNO_MESSAGES=function(){C("'GAI_ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"Protocols")||(t$F.Protocols=function(){C("'Protocols' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"Sockets")||(t$F.Sockets=function(){C("'Sockets' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getRandomDevice")||(t$F.getRandomDevice=function(){C("'getRandomDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"traverseStack")||(t$F.traverseStack=function(){C("'traverseStack' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"UNWIND_CACHE")||(t$F.UNWIND_CACHE=function(){C("'UNWIND_CACHE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"withBuiltinMalloc")||(t$F.withBuiltinMalloc=function(){C("'withBuiltinMalloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"readAsmConstArgsArray")||(t$F.readAsmConstArgsArray=function(){C("'readAsmConstArgsArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"readAsmConstArgs")||(t$F.readAsmConstArgs=function(){C("'readAsmConstArgs' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"mainThreadEM_ASM")||(t$F.mainThreadEM_ASM=function(){C("'mainThreadEM_ASM' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"jstoi_q")||(t$F.jstoi_q=function(){C("'jstoi_q' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"jstoi_s")||(t$F.jstoi_s=function(){C("'jstoi_s' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getExecutableName")||(t$F.getExecutableName=function(){C("'getExecutableName' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"listenOnce")||(t$F.listenOnce=function(){C("'listenOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"autoResumeAudioContext")||(t$F.autoResumeAudioContext=function(){C("'autoResumeAudioContext' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"dynCallLegacy")||(t$F.dynCallLegacy=function(){C("'dynCallLegacy' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getDynCaller")||(t$F.getDynCaller=function(){C("'getDynCaller' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"dynCall")||(t$F.dynCall=function(){C("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"callRuntimeCallbacks")||(t$F.callRuntimeCallbacks=function(){C("'callRuntimeCallbacks' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"reallyNegative")||(t$F.reallyNegative=function(){C("'reallyNegative' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"unSign")||(t$F.unSign=function(){C("'unSign' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"reSign")||(t$F.reSign=function(){C("'reSign' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"formatString")||(t$F.formatString=function(){C("'formatString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"PATH")||(t$F.PATH=function(){C("'PATH' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"PATH_FS")||(t$F.PATH_FS=function(){C("'PATH_FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SYSCALLS")||(t$F.SYSCALLS=function(){C("'SYSCALLS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"syscallMmap2")||(t$F.syscallMmap2=function(){C("'syscallMmap2' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"syscallMunmap")||(t$F.syscallMunmap=function(){C("'syscallMunmap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getSocketFromFD")||(t$F.getSocketFromFD=function(){C("'getSocketFromFD' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getSocketAddress")||(t$F.getSocketAddress=function(){C("'getSocketAddress' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"JSEvents")||(t$F.JSEvents=function(){C("'JSEvents' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerKeyEventCallback")||(t$F.registerKeyEventCallback=function(){C("'registerKeyEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"specialHTMLTargets")||(t$F.specialHTMLTargets=function(){C("'specialHTMLTargets' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"maybeCStringToJsString")||(t$F.maybeCStringToJsString=function(){C("'maybeCStringToJsString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"findEventTarget")||(t$F.findEventTarget=function(){C("'findEventTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"findCanvasEventTarget")||(t$F.findCanvasEventTarget=function(){C("'findCanvasEventTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getBoundingClientRect")||(t$F.getBoundingClientRect=function(){C("'getBoundingClientRect' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillMouseEventData")||(t$F.fillMouseEventData=function(){C("'fillMouseEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerMouseEventCallback")||(t$F.registerMouseEventCallback=function(){C("'registerMouseEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerWheelEventCallback")||(t$F.registerWheelEventCallback=function(){C("'registerWheelEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerUiEventCallback")||(t$F.registerUiEventCallback=function(){C("'registerUiEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerFocusEventCallback")||(t$F.registerFocusEventCallback=function(){C("'registerFocusEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillDeviceOrientationEventData")||(t$F.fillDeviceOrientationEventData=function(){C("'fillDeviceOrientationEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerDeviceOrientationEventCallback")||(t$F.registerDeviceOrientationEventCallback=function(){C("'registerDeviceOrientationEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillDeviceMotionEventData")||(t$F.fillDeviceMotionEventData=function(){C("'fillDeviceMotionEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerDeviceMotionEventCallback")||(t$F.registerDeviceMotionEventCallback=function(){C("'registerDeviceMotionEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"screenOrientation")||(t$F.screenOrientation=function(){C("'screenOrientation' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillOrientationChangeEventData")||(t$F.fillOrientationChangeEventData=function(){C("'fillOrientationChangeEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerOrientationChangeEventCallback")||(t$F.registerOrientationChangeEventCallback=function(){C("'registerOrientationChangeEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillFullscreenChangeEventData")||(t$F.fillFullscreenChangeEventData=function(){C("'fillFullscreenChangeEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerFullscreenChangeEventCallback")||(t$F.registerFullscreenChangeEventCallback=function(){C("'registerFullscreenChangeEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerRestoreOldStyle")||(t$F.registerRestoreOldStyle=function(){C("'registerRestoreOldStyle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"hideEverythingExceptGivenElement")||(t$F.hideEverythingExceptGivenElement=function(){C("'hideEverythingExceptGivenElement' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"restoreHiddenElements")||(t$F.restoreHiddenElements=function(){C("'restoreHiddenElements' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"setLetterbox")||(t$F.setLetterbox=function(){C("'setLetterbox' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"currentFullscreenStrategy")||(t$F.currentFullscreenStrategy=function(){C("'currentFullscreenStrategy' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"restoreOldWindowedStyle")||(t$F.restoreOldWindowedStyle=function(){C("'restoreOldWindowedStyle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"softFullscreenResizeWebGLRenderTarget")||(t$F.softFullscreenResizeWebGLRenderTarget=function(){C("'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"doRequestFullscreen")||(t$F.doRequestFullscreen=function(){C("'doRequestFullscreen' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillPointerlockChangeEventData")||(t$F.fillPointerlockChangeEventData=function(){C("'fillPointerlockChangeEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerPointerlockChangeEventCallback")||(t$F.registerPointerlockChangeEventCallback=function(){C("'registerPointerlockChangeEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerPointerlockErrorEventCallback")||(t$F.registerPointerlockErrorEventCallback=function(){C("'registerPointerlockErrorEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"requestPointerLock")||(t$F.requestPointerLock=function(){C("'requestPointerLock' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillVisibilityChangeEventData")||(t$F.fillVisibilityChangeEventData=function(){C("'fillVisibilityChangeEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerVisibilityChangeEventCallback")||(t$F.registerVisibilityChangeEventCallback=function(){C("'registerVisibilityChangeEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerTouchEventCallback")||(t$F.registerTouchEventCallback=function(){C("'registerTouchEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillGamepadEventData")||(t$F.fillGamepadEventData=function(){C("'fillGamepadEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerGamepadEventCallback")||(t$F.registerGamepadEventCallback=function(){C("'registerGamepadEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerBeforeUnloadEventCallback")||(t$F.registerBeforeUnloadEventCallback=function(){C("'registerBeforeUnloadEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"fillBatteryEventData")||(t$F.fillBatteryEventData=function(){C("'fillBatteryEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"battery")||(t$F.battery=function(){C("'battery' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"registerBatteryEventCallback")||(t$F.registerBatteryEventCallback=function(){C("'registerBatteryEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"setCanvasElementSize")||(t$F.setCanvasElementSize=function(){C("'setCanvasElementSize' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getCanvasElementSize")||(t$F.getCanvasElementSize=function(){C("'getCanvasElementSize' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"polyfillSetImmediate")||(t$F.polyfillSetImmediate=function(){C("'polyfillSetImmediate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"demangle")||(t$F.demangle=function(){C("'demangle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"demangleAll")||(t$F.demangleAll=function(){C("'demangleAll' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"jsStackTrace")||(t$F.jsStackTrace=function(){C("'jsStackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stackTrace")||(t$F.stackTrace=function(){C("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getEnvStrings")||(t$F.getEnvStrings=function(){C("'getEnvStrings' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"checkWasiClock")||(t$F.checkWasiClock=function(){C("'checkWasiClock' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"flush_NO_FILESYSTEM")||(t$F.flush_NO_FILESYSTEM=function(){C("'flush_NO_FILESYSTEM' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeI53ToI64")||(t$F.writeI53ToI64=function(){C("'writeI53ToI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeI53ToI64Clamped")||(t$F.writeI53ToI64Clamped=function(){C("'writeI53ToI64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeI53ToI64Signaling")||(t$F.writeI53ToI64Signaling=function(){C("'writeI53ToI64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeI53ToU64Clamped")||(t$F.writeI53ToU64Clamped=function(){C("'writeI53ToU64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeI53ToU64Signaling")||(t$F.writeI53ToU64Signaling=function(){C("'writeI53ToU64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"readI53FromI64")||(t$F.readI53FromI64=function(){C("'readI53FromI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"readI53FromU64")||(t$F.readI53FromU64=function(){C("'readI53FromU64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"convertI32PairToI53")||(t$F.convertI32PairToI53=function(){C("'convertI32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"convertU32PairToI53")||(t$F.convertU32PairToI53=function(){C("'convertU32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"uncaughtExceptionCount")||(t$F.uncaughtExceptionCount=function(){C("'uncaughtExceptionCount' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"exceptionLast")||(t$F.exceptionLast=function(){C("'exceptionLast' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"exceptionCaught")||(t$F.exceptionCaught=function(){C("'exceptionCaught' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"ExceptionInfoAttrs")||(t$F.ExceptionInfoAttrs=function(){C("'ExceptionInfoAttrs' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"ExceptionInfo")||(t$F.ExceptionInfo=function(){C("'ExceptionInfo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"CatchInfo")||(t$F.CatchInfo=function(){C("'CatchInfo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"exception_addRef")||(t$F.exception_addRef=function(){C("'exception_addRef' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"exception_decRef")||(t$F.exception_decRef=function(){C("'exception_decRef' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"Browser")||(t$F.Browser=function(){C("'Browser' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"funcWrappers")||(t$F.funcWrappers=function(){C("'funcWrappers' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"getFuncWrapper")||(t$F.getFuncWrapper=function(){C("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"setMainLoop")||(t$F.setMainLoop=function(){C("'setMainLoop' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"FS")||(t$F.FS=function(){C("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"mmapAlloc")||(t$F.mmapAlloc=function(){C("'mmapAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"MEMFS")||(t$F.MEMFS=function(){C("'MEMFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"TTY")||(t$F.TTY=function(){C("'TTY' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"PIPEFS")||(t$F.PIPEFS=function(){C("'PIPEFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SOCKFS")||(t$F.SOCKFS=function(){C("'SOCKFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"_setNetworkCallback")||(t$F._setNetworkCallback=function(){C("'_setNetworkCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"tempFixedLengthArray")||(t$F.tempFixedLengthArray=function(){C("'tempFixedLengthArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"miniTempWebGLFloatBuffers")||(t$F.miniTempWebGLFloatBuffers=function(){C("'miniTempWebGLFloatBuffers' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"heapObjectForWebGLType")||(t$F.heapObjectForWebGLType=function(){C("'heapObjectForWebGLType' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"heapAccessShiftForWebGLHeap")||(t$F.heapAccessShiftForWebGLHeap=function(){C("'heapAccessShiftForWebGLHeap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"GL")||(t$F.GL=function(){C("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"emscriptenWebGLGet")||(t$F.emscriptenWebGLGet=function(){C("'emscriptenWebGLGet' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"computeUnpackAlignedImageSize")||(t$F.computeUnpackAlignedImageSize=function(){C("'computeUnpackAlignedImageSize' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"emscriptenWebGLGetTexPixelData")||(t$F.emscriptenWebGLGetTexPixelData=function(){C("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"emscriptenWebGLGetUniform")||(t$F.emscriptenWebGLGetUniform=function(){C("'emscriptenWebGLGetUniform' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"emscriptenWebGLGetVertexAttrib")||(t$F.emscriptenWebGLGetVertexAttrib=function(){C("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"writeGLArray")||(t$F.writeGLArray=function(){C("'writeGLArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"AL")||(t$F.AL=function(){C("'AL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SDL_unicode")||(t$F.SDL_unicode=function(){C("'SDL_unicode' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SDL_ttfContext")||(t$F.SDL_ttfContext=function(){C("'SDL_ttfContext' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SDL_audio")||(t$F.SDL_audio=function(){C("'SDL_audio' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SDL")||(t$F.SDL=function(){C("'SDL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"SDL_gfx")||(t$F.SDL_gfx=function(){C("'SDL_gfx' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"GLUT")||(t$F.GLUT=function(){C("'GLUT' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"EGL")||(t$F.EGL=function(){C("'EGL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"GLFW_Window")||(t$F.GLFW_Window=function(){C("'GLFW_Window' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"GLFW")||(t$F.GLFW=function(){C("'GLFW' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"GLEW")||(t$F.GLEW=function(){C("'GLEW' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"IDBStore")||(t$F.IDBStore=function(){C("'IDBStore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"runAndAbortIfError")||(t$F.runAndAbortIfError=function(){C("'runAndAbortIfError' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"warnOnce")||(t$F.warnOnce=function(){C("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stackSave")||(t$F.stackSave=function(){C("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stackRestore")||(t$F.stackRestore=function(){C("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stackAlloc")||(t$F.stackAlloc=function(){C("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"AsciiToString")||(t$F.AsciiToString=function(){C("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stringToAscii")||(t$F.stringToAscii=function(){C("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"UTF16ToString")||(t$F.UTF16ToString=function(){C("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stringToUTF16")||(t$F.stringToUTF16=function(){C("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"lengthBytesUTF16")||(t$F.lengthBytesUTF16=function(){C("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"UTF32ToString")||(t$F.UTF32ToString=function(){C("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"stringToUTF32")||(t$F.stringToUTF32=function(){C("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"lengthBytesUTF32")||(t$F.lengthBytesUTF32=function(){C("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"allocateUTF8")||(t$F.allocateUTF8=function(){C("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(t$F,"allocateUTF8OnStack")||(t$F.allocateUTF8OnStack=function(){C("'allocateUTF8OnStack' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),t$F.writeStackCookie=p,t$F.checkStackCookie=_,Object.getOwnPropertyDescriptor(t$F,"ALLOC_NORMAL")||Object.defineProperty(t$F,"ALLOC_NORMAL",{configurable:!0,get:function(){C("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(t$F,"ALLOC_STACK")||Object.defineProperty(t$F,"ALLOC_STACK",{configurable:!0,get:function(){C("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),W$Q=function e(){Z$M||k(),Z$M||(W$Q=e)},t$F.run=k,t$F.preInit)for("function"==typeof t$F.preInit&&(t$F.preInit=[t$F.preInit]);t$F.preInit.length>0;)t$F.preInit.pop()();k()}else var t$F=null;var _0x5f4c81=t$F;function r$S(e){e=u$Z(e,0),this._array=new Array(e),this._length=e}Object.defineProperties(r$S.prototype,{length:{get:function(){return this._length},set:function(e){this._length=e,e>this._array.length&&(this._array.length=e)}},values:{get:function(){return this._array}}}),r$S.prototype.get=function(e){return o$1q.typeOf.number.lessThan("index",e,this._array.length),this._array[e]},r$S.prototype.set=function(e,t){o$1q.typeOf.number("index",e),e>=this.length&&(this.length=e+1),this._array[e]=t},r$S.prototype.peek=function(){return this._array[this._length-1]},r$S.prototype.push=function(e){var t=this.length++;this._array[t]=e},r$S.prototype.pop=function(){return this._array[--this.length]},r$S.prototype.reserve=function(e){o$1q.typeOf.number.greaterThanOrEquals("length",e,0),e>this._array.length&&(this._array.length=e)},r$S.prototype.resize=function(e){o$1q.typeOf.number.greaterThanOrEquals("length",e,0),this.length=e},r$S.prototype.trim=function(e){e=u$Z(e,this.length),this._array.length=e};var _0x1f7052=(_0xec5e62=!0,function(e,t){var i=_0xec5e62?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xec5e62=!1,i}),_0x26a353=_0x1f7052(void 0,(function(){return _0x26a353.toString().search("(((.+)+)+)+$").toString().constructor(_0x26a353).search("(((.+)+)+)+$")})),_0xec5e62;_0x26a353();var _0x549321={Normal:0,Add:1};function _0x50b7d6(e){return function(){return e._disFromCamera}}function _0x496421(e){return function(){return e._priority}}function _0x52d5dd(e,t){return function(){var i=t._currentMaxLevel,n=1/Math.pow(2,i-e._nLODLev);return e._disFromCamera*n}}var _0x408010=function(e){e=e||{},this._context=e.context,this._layer=e.layer,this._customRequestHeaders=e.customRequestHeaders,this._renderQueue=[],this._cache=new e$1Q,this._rootEntities=[],this._cameraPos=new o$1p,this._cameraDir=new o$1p,this._cameraUp=new o$1p,this._cacheEntityCount=u$Z(e.cacheEntityCount,0),this._sceneMode=C$14.SCENE3D,this._projection=null,this._oriRootEntities=e.rootEntities,this._initializeRootEntities(e.rootEntities),this._nLoadingPriority=_0x539352.Child_Priority_NonLinear,this.createPriorityFunction=_0x50b7d6,this._currentMaxLevel=0,this._replacementList=new h$Q,this._replacementSentinel=this._replacementList.add(),this._cacheKey=e.cacheKey;var t=this._layer._baseUri.toString(),i=t.substring(0,t.indexOf("/datas"));this.tablename=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),this._indexedDBSetting=this._layer._indexedDBSetting;var n=this,r=o$1l.defer();if(n._attributes={_errorNum:0,_reStoreTimes:0,_memoryCache:0,_redownload:!1,status:{promise:r.promise,needDownload:void 0}},this._scpUrl=e.scpUrl,e$2e(window.Proxy)){var o=o$1l.defer();n._dpPromise=o.promise,new l$14({name:i+this.tablename}).then((function(e){e.checkObjectStoreExit(n.tablename)?e.checkObjectStoreExit(n.tablename+"Texture")?(_0x4b0aca(e,n,r),n._indexedDBScheduler=e,o.resolve(!0)):(_0x4b0aca(e,n,r),e.createObjectStore(n.tablename+"Texture"),n._indexedDBScheduler=e,o.resolve(!0)):e.createObjectStore(n.tablename).then((function(){e.checkObjectStoreExit(n.tablename+"Texture")?(_0x4b0aca(e,n,r),n._indexedDBScheduler=e,o.resolve(!0)):(_0x4b0aca(e,n,r),e.createObjectStore(n.tablename+"Texture"),n._indexedDBScheduler=e,o.resolve(!0))}))}))}this._rasterFrequency=0,this._statistics={numberOfPendingRequests:0,numberOfAttemptedRequests:0,numberOfTilesProcessing:0,numberOfProcessingAttempted:0,lastLoadedTrigger:{time:Date.now(),done:!1},numberOfColorChangePending:0,numberOfColorChangeAttempted:0,numberOfColorChangeProcessing:0,lastColorChangeTrigger:{time:Date.now(),done:!1}},this._statisticsLastRender=p$19({},this._statistics),this._packingRequest=!1,this._packRequestEntities=[],this._parsingEntities=[],this._attrloaded=!1,this._selectEntities=[],this._requestEntities=[],this.attrsave=!1,this._extrudedId=void 0,this._polygons=void 0,this._indexedDBRequestNum=0,this._indexedDBRequestLimit=3,this._requestByteLength=0,this._prepareLoaded=!0,this._prepareRatio=0,this._associatedFieldName=void 0,this._entityObjectId={},this._objectIdChange=!1,this._isFineLayer=!1,this._entityModelId={},this._stopLoadImagery=!1,this._savetoIndexDBDatas=[]};function _0x4b0aca(e,t,i){e.checkObjectStoreExit("attributes")?!0===t._indexedDBSetting.isAttributesSave&&e.getElementFromDB("attributes","queryFieldNames").then((function(n){if("ALL"===n&&(t._attributes.status.needDownload=!1,i.resolve(!0)),e$2e(t._layer.queryFieldNames)){for(var r=0;r<t._layer.queryFieldNames.length;r++)if(-1===n.indexOf(t._layer.queryFieldNames[r]))return t._attributes.status.needDownload=!0,e.updateElementInDB("attributes","queryFieldNames",n.concat(t._layer.queryFieldNames)),void i.resolve(!0);t._attributes.status.needDownload=!1,i.resolve(!0)}})).otherwise((function(){!0===t._indexedDBSetting.isAttributesSave&&(e$2e(t._layer.queryFieldNames)?e.putElementInDB("attributes","queryFieldNames",t._layer.queryFieldNames):e.putElementInDB("attributes","queryFieldNames","ALL"),t._attributes.status.needDownload=!0,i.resolve(!0))})):e.createObjectStore("attributes").then((function(){i.resolve(!0),!0===t._indexedDBSetting.isAttributesSave&&(e$2e(t._layer.queryFieldNames)?e.putElementInDB("attributes","queryFieldNames",t._layer.queryFieldNames):e.putElementInDB("attributes","queryFieldNames","ALL"),t._attributes.status.needDownload=!0)}))}function _0x28571b(e,t){!e._indexedDBSetting.isAttributesSave||(e$2e(e._indexedDBScheduler)?_0x3f2724(e,t):e._dpPromise.then((function(){_0x3f2724(e,t)})))}function _0x3f2724(e,t){var i=new TextEncoder("utf-8"),n=[],r=o$1l.defer();if(e._indexedDBScheduler.checkObjectStoreExit("attributes")){for(var o in t){try{var a=JSON.stringify(t[o]);a=i.encode(a).join(256)}catch{return r.reject(null),r.promise}n.push(e._indexedDBScheduler.putElementInDB("attributes",o,a))}o$1l.all(n,(function(t){0===e._savetoIndexDBDatas.length&&e._indexedDBScheduler.putElementInDB("attributes","saved",!0)}),(function(i){t._reStoreTimes<=3&&(t._reStoreTimes++,setTimeout((function(){_0x28571b(e,t)}),2e3))}))}else e._indexedDBScheduler.createObjectStore("attributes").then((function(){for(var o in t){try{var a=JSON.stringify(t[o]);a=i.encode(a).join(256)}catch{return r.reject(null),r.promise}n.push(e._indexedDBScheduler.putElementInDB("attributes",o,a))}o$1l.all(n,(function(t){0===e._savetoIndexDBDatas.length&&e._indexedDBScheduler.putElementInDB("attributes","saved",!0)}),(function(i){t._reStoreTimes<=3&&(t._reStoreTimes++,setTimeout((function(){_0x28571b(e,t)}),2e3))}))}))}function _0x6716ca(e,t){if(Array.isArray(e)){for(var i={},n=e.length,r=0;r<n;r++){o=e$2e(t._layer.idFieldName)?e[r][t._layer.idFieldName]:e[r].id||e[r].SmID||e[r].SMID||e[r].smid,!t._attributes.hasOwnProperty(o)&&(t._attributes[o]=e[r],i[o]=e[r],n>500&&r&&r%500==0&&(t._savetoIndexDBDatas.push(i),i={}))}t._savetoIndexDBDatas.push(i)}else{var o;e$2e(o=e.id||e.SmID||e.SMID)&&(t._attributes[o]=e)}t._attributes._memoryCache=1}function _0x1aa4b7(e,t){var i=[],n=e._layer,r="attribute"===n._attributeExtentName?".attribute":n._isS3MB?".s3md":".scvd",o=()=>{};e$2e(a$O.CREDENTIAL)&&(o=e$2e(a$O.CREDENTIAL._keymap[e._scpUrl])?t=>a$O.addTokenWithKey(e._scpUrl,t):e=>a$O.addToken(e));var a="";".attribute"===r&&(a=Object.keys(n._fieldsInfo._hash).join(";"),a=n._fieldsInfo._hash.hasOwnProperty("smid")?"?fields=smid;"+a.replace("smid;",""):"?fields=SmID;"+a.replace("SmID;",""));var s="",l=n._indexInfoAttributeMap;if(e$2e(l)){var u=n._baseUri.toString();for(var c in l)for(var h=l[c],d=0;d<h.length;d++)o(s=u+h[d].url+a),i.push(o$10(s,e._customRequestHeaders))}else for(var f=0,p=e._rootEntities.length;f<p;f++)s=n._isS3MBlock?e._rootEntities[f]._relativePath.resolve(n._baseUri).toString()+e._rootEntities[f]._fileName:e._rootEntities[f]._relativePath.resolve(n._baseUri).toString()+f$Q(e._rootEntities[f]._relativePath.toString().replace(/\/$/,"")),o(s+=r+a),i.push(o$10(s,e._customRequestHeaders));o$1l.all(i,(function(e){n.attrDatas=e}),(function(t){for(var i=0,o=e._rootEntities.length;i<o;i++){var a;if(a=n._isS3MBlock?e._rootEntities[i]._relativePath.resolve(n._baseUri).toString()+e._rootEntities[i]._fileName+r:e._rootEntities[i]._relativePath.resolve(n._baseUri).toString()+f$Q(e._rootEntities[i]._relativePath.toString().replace(/\/$/,""))+r,".attribute"===r){var s=Object.keys(n._fieldsInfo._hash).join(";");n._fieldsInfo._hash.hasOwnProperty("smid")?a=a+"?fields=smid;"+(s=s.replace("smid;","")):a=a+"?fields=SmID;"+(s=s.replace("SmID;",""))}e$2e(a$O.CREDENTIAL)&&(a=e$2e(a$O.CREDENTIAL._keymap[e._scpUrl])?a$O.addTokenWithKey(e._scpUrl,a):a$O.addToken(a)),o$10(a,e._customRequestHeaders).then((function(e){n.attrDatas=[e]}))}}))}Object.defineProperties(_0x408010.prototype,{LoadingPriority:{get:function(){return this._nLoadingPriority},set:function(e){this._nLoadingPriority=e,this.createPriorityFunction=this._nLoadingPriority===_0x539352.Root_Priority?_0x52d5dd:_0x50b7d6,this._nLoadingPriority===_0x539352.UsePagedLodInfo&&(this.createPriorityFunction=_0x496421)}}}),_0x408010.prototype._updatingTiles=function(){return this._statistics.numberOfPendingRequests+this._statistics.numberOfAttemptedRequests+this._statistics.numberOfTilesProcessing},_0x408010.prototype._requestAllScvd=function(){var e=this;e$2e(this._indexedDBScheduler)?_0x1aa4b7(e,e._layer._isS3MB):this._dpPromise.then((function(){_0x1aa4b7(e,e._layer._isS3MB)}))},_0x408010.prototype.getAttributesById=function(e){var t=new TextDecoder("utf-8"),i=o$1l.defer();if(e$2e(this._attributes[e]))return i.resolve(this._attributes[e]),i.promise;if(!this._indexedDBSetting.isAttributesSave&&!this._layer._showLabel||!e$2e(this._indexedDBScheduler)||!this._indexedDBScheduler.checkObjectStoreExit("attributes"))return i.resolve(null),i.promise;var n=this;return this._indexedDBScheduler.getElementFromDB("attributes",e.toString()).then((function(r){if(null!==r){r=r.split(256);var o=new Uint8Array(r);r=t.decode(o),r=JSON.parse(r)}else n._attributes._errorNum++,n._attributes._errorNum>3&&(_0x1aa4b7(n,n._layer._isS3MB),n._attributes._errorNum=0);n._attributes[e]=r,i.resolve(r)}),(function(e){n._attributes._errorNum++,n._attributes._errorNum>3&&!n._attributes._redownload&&(_0x1aa4b7(n,n._layer._isS3MB),n._attributes._redownload=!0),i.resolve(null)})),i.promise},_0x408010.prototype._downloadAttributes=function(){for(var e=[],t=o$1l.defer(),i="attribute"===this._layer._attributeExtentName?".attribute":this._layer._isS3MB?".s3md":".scvd",n=this,r=this._layer,o=0,a=this._rootEntities.length;o<a;o++){var s=this._rootEntities[o];if(e$2e(r._indexInfoMap)){var l=s._fileName,u=r._indexInfoMap[l];if(e$2e(u))for(var c=0;c<u.length;c++){var h=new h$16(u[c].url).resolve(r._baseUri).toString(),d=Object.keys(this._layer._fieldsInfo._hash).join(";");r._fieldsInfo._hash.hasOwnProperty("smid")?h=h+"?fields=smid;"+(d=d.replace("smid;","")):h=h+"?fields=SmID;"+(d=d.replace("SmID;","")),e$2e(a$O.CREDENTIAL)&&(h=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,h):a$O.addToken(h)),e.push(o$10(h,this._customRequestHeaders))}}else{h=this._rootEntities[o]._relativePath.resolve(this._layer._baseUri).toString()+f$Q(this._rootEntities[o]._relativePath.toString().replace(/\/$/,""))+i,d=Object.keys(this._layer._fieldsInfo._hash).join(";");this._layer._fieldsInfo._hash.hasOwnProperty("smid")?h=h+"?fields=smid;"+(d=d.replace("smid;","")):h=h+"?fields=SmID;"+(d=d.replace("SmID;","")),e$2e(a$O.CREDENTIAL)&&(h=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,h):a$O.addToken(h)),e.push(o$10(h,this._customRequestHeaders))}}return o$1l.all(e,(function(e){for(var r=[],o=0,a=e.length;o<a;o++)r.push(_0x276877(e[o],i,n._layer._fieldsInfo));for(var s=0;s<r.length;s++)_0x6716ca(r[s],n);n._attrloaded||(n._attrloaded=!0,n._layer.attributeDownloaded.raiseEvent(n._layer.name+" attribute downloaded.")),t.resolve(!0)}),(function(e){for(var r=0,o=n._rootEntities.length;r<o;r++){var a=n._rootEntities[r]._relativePath.resolve(n._layer._baseUri).toString()+f$Q(n._rootEntities[r]._relativePath.toString().replace(/\/$/,""))+i;e$2e(a$O.CREDENTIAL)&&(a=e$2e(a$O.CREDENTIAL._keymap[n._scpUrl])?a$O.addTokenWithKey(n._scpUrl,a):a$O.addToken(a)),o$10(a,n._customRequestHeaders).then((function(e){var r=[];r.push(_0x276877(e,i,n._layer._fieldsInfo)),_0x6716ca(r[0],n),t.resolve(!0)}))}})),t.promise};var _0xec343c=null,_0x5862de=null,_0x3673b8=!1;function _0x385a58(e){var t=4*e.length,i=_0x5f4c81._malloc(Uint8Array.BYTES_PER_ELEMENT*t),n=new Uint8Array(t);_0x5f4c81.HEAPU8.set(n,i/Uint8Array.BYTES_PER_ELEMENT);var r,o=_0x5f4c81._malloc(Uint8Array.BYTES_PER_ELEMENT*e.length);for(_0x5f4c81.HEAPU8.set(e,o/Uint8Array.BYTES_PER_ELEMENT);0==(r=_0xec343c(i,t,o,e.length));)_0x5862de(i),t*=4,i=_0x5f4c81._malloc(Uint8Array.BYTES_PER_ELEMENT*t),n=new Uint8Array(t),_0x5f4c81.HEAPU8.set(n,i/Uint8Array.BYTES_PER_ELEMENT);var a=new Uint8Array(_0x5f4c81.HEAPU8.buffer,i,r);e=null,n=null;var s=new Uint8Array(a).buffer;return _0x5862de(i),_0x5862de(o),s}function _0x276877(e,t,i){if(".attribute"===t){var n=new Int32Array(e,0,1);n=n[0];for(var r=new Int32Array(e,4,n),o=[],a=0;a<n;a++)o.push(r[a]);var s=Math.floor(o[0]/4.125),l=g=Math.ceil(s/8),u=new Int8Array(e,4*(n+1)+g,4*s),c=u.subarray(0,4*s),h=new Int8Array(c);u=new Int32Array(h.buffer);var d=4*(n+1)+o[0],f=[];for(a=1;a<n;a++){var p=(i=i)._array[a],_=p.type,m=Number(p.size);s=Math.floor(o[a]/(m+.125));var g=Math.ceil(s/8);(10==_||"ntext"===_||"text"===_)&&(m=1,g=l,s=o[a]-g);var x=new Int8Array(e,d+g,s*m).subarray(0,s*m);h=new Int8Array(x);if(4==_||"int32"===_)x=new Int32Array(h.buffer);else if(16==_||"int64"===_)x=new BigInt64Array(h.buffer);else if(6==_||"float"===_)x=new Float32Array(h.buffer);else if(7==_||"double"===_)x=new Float64Array(h.buffer);else if(10==_||"ntext"===_||"text"===_){for(var y=new DataView(x.buffer),v=0,$=[];v+x.byteOffset<y.byteLength;){var b=y.getInt32(v+x.byteOffset,!0);if((v+=4)+b>h.buffer.byteLength||b<0)break;var T=new Uint8Array(h.buffer,v,b);v+=b;var C=a$K(T,void 0,void 0,"gbk");$.push(C)}x=$}d+=o[a],f.push(x)}var S=Object.keys(i._hash),w=[];for(a=0;a<u.length;a++){(O={})[S[0]]=u[a];for(var E=0;E<f.length;E++)O[S[E+1]]=f[E][a];w.push(O)}return w}var P,A=new Uint8Array(e,8);if(null!==_0xec343c&&!0===_0x3673b8)try{P=_0x385a58(A)}catch{return[]}else P=nt$b.inflate(A).buffer;h=new Uint8Array(P);var L=new TextDecoder("utf-8").decode(h);if(".s3md"===t){var M,R=L.substring(4);try{M=JSON.parse(R)}catch{R=L.substring(L.indexOf("{")),M=JSON.parse(R)}for(var O=[],D=0,I=M.layerInfos.length;D<I;D++)for(var B=M.layerInfos[D].records,F=(a=0,B.length);a<F;a++){for(var N={},G=(E=0,(U=B[a]).values.length);E<G;E++)N[U.values[E].name]=U.values[E].field,N[U.values[E].name]=!isNaN(1*N[U.values[E].name])&1*N[U.values[E].name]<Number.MAX_SAFE_INTEGER?1*N[U.values[E].name]:N[U.values[E].name];O.push(N)}return O}O=[];var z=(new s$T).read(L).getElementsByTagName("Record");for(a=0,F=z.length;a<F;a++){for(N={},h=z[a].innerHTML.split("\n"),E=0;E<h.length;E++){var U;if(""!==(U=h[E]))if(-1!==U.indexOf("<ID>"))N.id=U.substring(U.indexOf(">")+1,U.indexOf("</"));else{var V=U.indexOf('"');V=U.indexOf('"',V+1);var k=U.substring(U.indexOf("Name=")+6,V);-1!==U.indexOf("/>")?N[k]="":N[k]=U.substring(U.indexOf(">")+1,U.indexOf("</"))}}O.push(N)}return O}function _0x2a3c92(e,t){var i=new Int8Array(e);for(var n=t.split("").map((function(e){return e.charCodeAt(0)})),r=0;r<n.length;r++)i[r]=i[r]^n[r];return i.buffer}typeof WebAssembly<"u"&&e$2e(_0x5f4c81)&&(_0x5f4c81.onRuntimeInitialized=function(){_0x3673b8=!0},_0xec343c=_0x5f4c81.cwrap("unzip","number",["number","number","number","number"]),_0x5862de=_0x5f4c81.cwrap("freePointer",null,["number"])),_0x408010.prototype._updateRootBoundingSphere=function(e,t){for(var i=0,n=e.length;i<n;i++){var r=e[i],o=this._rootEntities[i];if(e$2e(r.bSphere)&&r.bSphere.radius>0&&(o._boundingSphere=i$1d.transform(r.bSphere,t,new i$1d),e$2e(r.min))){var a=[];a.push(new o$1p(r.min.x,r.min.y,r.min.z)),a.push(new o$1p(r.min.x,r.min.y,r.max.z)),a.push(new o$1p(r.min.x,r.max.y,r.min.z)),a.push(new o$1p(r.min.x,r.max.y,r.max.z)),a.push(new o$1p(r.max.x,r.min.y,r.min.z)),a.push(new o$1p(r.max.x,r.min.y,r.max.z)),a.push(new o$1p(r.max.x,r.max.y,r.min.z)),a.push(new o$1p(r.max.x,r.max.y,r.max.z));for(var s=0;s<8;s++)a[s]=p$1d.multiplyByPoint(t,a[s],a[s]);o._orientedBoundingBox=y$Y.fromPoints(a,o._orientedBoundingBox)}}},_0x408010.prototype._initializeRootEntities=function(e){if(e$2e(e)){this._rootNodeNameList=[];for(var t=this._layer,i=t._fileType,n=i===p$T.ClampGroundPolygon||i===p$T.ClampObjectPolygon||i===p$T.ClampGroundLine||i===p$T.ClampObjectLine,r=new o$1p,o=new o$1p,a=!1,s=[],l=0,u=e.length;l<u;l++){var c=e[l],h=new _0x128750;h.layer=t,h._isAncestorBlock=t._isS3MBlock,h._fileName=c.name,h._relativePath=c.relativePath,h._isRootTile=!0,h._nLODLev=0;var d=h._relativePath.toString()+h._fileName;if(this._rootNodeNameList.push(d),e$2e(c.bSphere)&&c.bSphere.radius>0){if(h._originalBS=c.bSphere,h._boundingSphere=i$1d.transform(c.bSphere,t._matModel,new i$1d),h._oriBoundingSphere=i$1d.clone(h._boundingSphere),s.push(h._boundingSphere),e$2e(c.min)&&!t._isS3MBlock){var f=[];f.push(new o$1p(c.min.x,c.min.y,c.min.z)),f.push(new o$1p(c.min.x,c.min.y,c.max.z)),f.push(new o$1p(c.min.x,c.max.y,c.min.z)),f.push(new o$1p(c.min.x,c.max.y,c.max.z)),f.push(new o$1p(c.max.x,c.min.y,c.min.z)),f.push(new o$1p(c.max.x,c.min.y,c.max.z)),f.push(new o$1p(c.max.x,c.max.y,c.min.z)),f.push(new o$1p(c.max.x,c.max.y,c.max.z));for(var p=0;p<8;p++)f[p]=p$1d.multiplyByPoint(t._matModel,f[p],f[p]);h._orientedBoundingBox=y$Y.fromPoints(f,h._orientedBoundingBox),h.obbMin=c.min,h.obbMax=c.max,0==l?(r=c.max.clone(),o=c.min.clone()):(r.x=Math.max(r.x,c.max.x),r.y=Math.max(r.y,c.max.y),r.z=Math.max(r.z,c.max.z),o.x=Math.min(o.x,c.min.x),o.y=Math.min(o.y,c.min.y),o.z=Math.min(o.z,c.min.z),a=!0)}}else if(e$2e(c.obb)){var _=c.obb,m=new p$1e,g=new o$1p(_.center.x,_.center.y,_.center.z),x=new e$2c(_.xExtent.x,_.xExtent.y,_.xExtent.z,0),y=new e$2c(_.yExtent.x,_.yExtent.y,_.yExtent.z,0),v=new e$2c(_.zExtent.x,_.zExtent.y,_.zExtent.z,0);p$1e.setColumn(m,0,x,m),p$1e.setColumn(m,1,y,m),p$1e.setColumn(m,2,v,m);var $=new y$Y(g,m);h._oriBoundingSphere=i$1d.fromOrientedBoundingBox($,new i$1d),h._boundingSphere=i$1d.transform(h._oriBoundingSphere,t._matModel,new i$1d),g=p$1d.multiplyByPoint(t._matModel,g,g),x=p$1d.multiplyByVector(t._matModel,x,x),y=p$1d.multiplyByVector(t._matModel,y,y),v=p$1d.multiplyByVector(t._matModel,v,v),p$1e.setColumn(m,0,x,m),p$1e.setColumn(m,1,y,m),p$1e.setColumn(m,2,v,m),h._orientedBoundingBox=new y$Y(g,m),h.obbMin=x,h.obbMax=y}n&&e$2e(h._boundingSphere)&&(h._boundingSphere.radius+=9e3),h._subdomainIndex=l,this._rootEntities.push(h)}this._layer.max=r,this._layer.min=o,t._oriBoundingSphere=new i$1d,a?i$1d.fromCornerPoints(o,r,t._oriBoundingSphere):s.length>0&&i$1d.fromBoundingSpheres(s,t._oriBoundingSphere),t._boundingSphere=i$1d.transform(t._oriBoundingSphere,t._matModel,new i$1d)}},_0x408010.prototype._isRootNode=function(e){return!!e$2e(this._rootNodeNameList)&&-1!==this._rootNodeNameList.indexOf(e)},_0x408010.prototype.appendQueryFieldName=function(e){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i],o="attribute"===e._attributeExtentName?".attribute":this._layer._isS3MB?".s3md":".scvd",a=r._relativePath.resolve(this._layer._baseUri).toString()+f$Q(r._relativePath.toString().replace(/\/$/,""))+o,s=e._queryFieldNames,l=s.join(";"),u=this;if("attribute"===e._attributeExtentName){var c;if(e._fieldsInfo._hash.hasOwnProperty("smid")?(a=a+"?fields=smid;"+l,c="smid"):(a=a+"?fields=SmID;"+l,c="SmID"),e._urlType===Tr$4.KEY_VALUE){var h=r._relativePath.path.replace(/\//g,"").replace(".",""),d=e._urlArguments,f={layerName:e.name,rootTile:h,tile:r._fileName,suffix:"attribute",fields:c+";"+l},p=m$1d(f=Object.assign(f,d),!0);(g=a.match(/(\S*)\/datas/)).length>0&&(a=g[0]+"?"+p)}e$2e(a$O.CREDENTIAL)&&(a=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,a):a$O.addToken(a));var _=new r$1c({url:a,throttle:!1,throttleByServer:!1,serverKey:r$1b.getServerKey(a)}),m=o$10(a,this._customRequestHeaders,_);e$2e(promies)&&(m.then((function(e){var t=new Int32Array(e,0,1);t=t[0];for(var i=new Int32Array(e,4,t),n=[],r=0;r<t;r++)n.push(i[r]);var o=Math.floor(n[0]/4.125),a=Math.ceil(o/8),l=new Int8Array(e,4*(t+1)+a,4*o),c=l.subarray(0,4*o),h=new Int8Array(c);l=new Int32Array(h.buffer);var d=4*(t+1)+n[0],f=[];for(r=1;r<t;r++){var p=u._layer._fieldsInfo._array[r],_=p.type,m=Number(p.size);o=Math.floor(n[r]/(m+.125));a=Math.ceil(o/8);var g=new Int8Array(e,d+a,o*m).subarray(0,o*m);h=new Int8Array(g);4==_||16==_?g=new Int32Array(h.buffer):6==_?g=new Float32Array(h.buffer):7==_&&(g=new Float64Array(h.buffer)),d+=n[r],f.push(g)}for(r=0;r<l.length;r++){for(var x={},y=0;y<f.length;y++)x[s[y]]=f[y][r];Object.assign(u._attributes[l[r]],x)}})),t.push(m))}else{if(a=a+"?fields="+l,e._urlType===Tr$4.KEY_VALUE){var g;h=r._relativePath.path.replace(/\//g,"").replace(".",""),d=e._urlArguments,f={layerName:e.name,rootTile:h,tile:r._fileName,suffix:e._attributeExtentName,fields:l},p=m$1d(f=Object.assign(f,d),!0);(g=a.match(/(\S*)\/datas/)).length>0&&(a=g[0]+"?"+p)}e$2e(a$O.CREDENTIAL)&&(a=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,a):a$O.addToken(a));m=u$P(a,this._customRequestHeaders).then((function(e){for(var t=e.Records,i=0;i<t.length;i++){var n=t[i].ID||t[i].id||t[i].SmID||t[i].SMID;u._attributes.hasOwnProperty(n)||Object.assign(u._attributes[n],t[i])}}));t.push(m)}}return t};var _0x1d7821=void 0;function _0x4ff005(e,t){if(e$2e(e.xExtent)){var i=o$1p.fromElements(e.center.x,e.center.y,e.center.z),n=e$2c.fromElements(e.xExtent.x,e.xExtent.y,e.xExtent.z,0),r=e$2c.fromElements(e.yExtent.x,e.yExtent.y,e.yExtent.z,0),o=e$2c.fromElements(e.zExtent.x,e.zExtent.y,e.zExtent.z,0);if(e$2c.equals(n,e$2c.ZERO)&&(n=new e$2c(1,0,0,0)),e$2c.equals(r,e$2c.ZERO)&&(r=new e$2c(0,1,0,0)),e$2c.equals(o,e$2c.ZERO)&&(o=new e$2c(0,0,1,0)),p$1d.multiplyByPoint(t,i,i),p$1d.multiplyByVector(t,n,n),p$1d.multiplyByVector(t,r,r),p$1d.multiplyByVector(t,o,o),e$2e(_0x1d7821))_0x1d7821.center=i,_0x1d7821.halfAxes[0]=n.x,_0x1d7821.halfAxes[1]=n.y,_0x1d7821.halfAxes[2]=n.z,_0x1d7821.halfAxes[3]=r.x,_0x1d7821.halfAxes[4]=r.y,_0x1d7821.halfAxes[5]=r.z,_0x1d7821.halfAxes[6]=o.x,_0x1d7821.halfAxes[7]=o.y,_0x1d7821.halfAxes[8]=o.z,_0x1d7821.areaDirty=1;else{var a=new p$1e(n.x,r.x,o.x,n.y,r.y,o.y,n.z,r.z,o.z);_0x1d7821=new y$Y(i,a)}_0x1d7821._updateBBox();var s=o$1p.distance(_0x1d7821.center,_0x1d7821.bbox[0]);return m=new i$1d(_0x1d7821.center,s)}var l=e.min.x,u=e.min.y,c=e.min.z,h=e.max.x,d=e.max.y,f=e.max.z,p=new o$1p(l,u,c),_=new o$1p(h,d,f),m=new i$1d;return i$1d.fromCornerPoints(p,_,m),i$1d.transform(m,t,m),m}function _0x51a487(e,t){var i,n=[];n.push(new o$1p(e.min.x,e.min.y,e.min.z)),n.push(new o$1p(e.min.x,e.min.y,e.max.z)),n.push(new o$1p(e.min.x,e.max.y,e.min.z)),n.push(new o$1p(e.min.x,e.max.y,e.max.z)),n.push(new o$1p(e.max.x,e.min.y,e.min.z)),n.push(new o$1p(e.max.x,e.min.y,e.max.z)),n.push(new o$1p(e.max.x,e.max.y,e.min.z)),n.push(new o$1p(e.max.x,e.max.y,e.max.z));for(var r=0;r<8;r++)n[r]=p$1d.multiplyByPoint(t,n[r],n[r]);return i=y$Y.fromPoints(n,i)}function _0x49af2f(e,t,i,n,r,o){if(e$2e(n)){var a=new _0x128750;if(i._entity=a,a._parent=t,a._relativePath=o,a._boundingSphere=i._boundingSphere,a._orientedBoundingBox=i._orientedBoundingBox,a._fileName=n.modelPath,a._fileName=a._fileName.replace(/.s3mb*|.s3m*../g,""),a._parentPagelod=i,a._depth=i._depth+1,a._index=t._childrenPageLod.length-1,a._rootName=t._rootName,a._subdomainIndex=t._subdomainIndex+a._index+1,a._indexFilePath=n.indexFilePath,e$2e(n.state)&&"PartLeaf"===n.state&&(a._hasLeafChild=!0),e$2e(n.state)&&"AllLeaf"===n.state)return void(a._isLeafTile=!0);if(e$2e(n.indexFilePath))return void(a._hasConfig=!0);var s=n.children;if(!e$2e(s))return a._isLeafTile=!0,void(a._boundingSphere=void 0);for(var l=0,u=s.length;l<u;l++){var c=s[l];if(e$2e(c.tileInfo)){if(""===c.tileInfo.modelPath){a._hasLeafChild=!0;continue}var h=new _0x4d13e0;if(h._fileType=e._fileType,h._rangeList=c.tileInfo.rangeValue,h._rangeDataList=c.tileInfo.modelPath,h._rangeDataList=h._rangeDataList.replace(/.s3mb*|.s3m*../g,""),0===h._rangeDataList.indexOf("./")&&(h._rangeDataList=h._rangeDataList.substring(2)),"pixelSizeOnScreen"===c.tileInfo.rangeMode?h._rangeMode=_0x219958.PIXEL_SIZE_ON_SCREEN:"geometricError"===c.tileInfo.rangeMode&&(h._rangeMode=_0x219958.GEOMETRY_ERROR),c.tileInfo.boundingBox.xExtent){var d=c.tileInfo.boundingBox,f=o$1p.fromElements(d.center.x,d.center.y,d.center.z),p=e$2c.fromElements(d.xExtent.x,d.xExtent.y,d.xExtent.z,0),_=e$2c.fromElements(d.yExtent.x,d.yExtent.y,d.yExtent.z,0),m=e$2c.fromElements(d.zExtent.x,d.zExtent.y,d.zExtent.z,0);e$2c.equals(p,e$2c.ZERO)&&(p=new e$2c(1,0,0,0)),e$2c.equals(_,e$2c.ZERO)&&(_=new e$2c(0,1,0,0)),e$2c.equals(m,e$2c.ZERO)&&(m=new e$2c(0,0,1,0));var g=new p$1e(p.x,_.x,m.x,p.y,_.y,m.y,p.z,_.z,m.z);h._orientedBoundingBox=new y$Y(f,g),h._orientedBoundingBox._updateBBox(),h.min=h._orientedBoundingBox.bbox[0].clone(),h.max=h._orientedBoundingBox.bbox[0].clone();for(var x,y=1;y<8;y++)x=h._orientedBoundingBox.bbox[y],h.min.x>x.x&&(h.min.x=x.x),h.min.y>x.y&&(h.min.y=x.y),h.min.z>x.z&&(h.min.z=x.z),h.max.x<x.x&&(h.max.x=x.x),h.max.y<x.y&&(h.max.y=x.y),h.max.z<x.z&&(h.max.z=x.z);var v=o$1p.distance(h._orientedBoundingBox.center,h._orientedBoundingBox.bbox[0]);p$1d.multiplyByPoint(r,f,f),p$1d.multiplyByVector(r,p,p),p$1d.multiplyByVector(r,_,_),p$1d.multiplyByVector(r,m,m),h._orientedBoundingBox.center=f,h._orientedBoundingBox.halfAxes[0]=p.x,h._orientedBoundingBox.halfAxes[1]=p.y,h._orientedBoundingBox.halfAxes[2]=p.z,h._orientedBoundingBox.halfAxes[3]=_.x,h._orientedBoundingBox.halfAxes[4]=_.y,h._orientedBoundingBox.halfAxes[5]=_.z,h._orientedBoundingBox.halfAxes[6]=m.x,h._orientedBoundingBox.halfAxes[7]=m.y,h._orientedBoundingBox.halfAxes[8]=m.z,h._orientedBoundingBox.areaDirty=1,h._boundingSphere=new i$1d(f,v)}else h._boundingSphere=_0x4ff005(c.tileInfo.boundingBox,r),h._orientedBoundingBox=_0x51a487(c.tileInfo.boundingBox,r),h.max=o$1p.fromElements(c.tileInfo.boundingBox.max.x,c.tileInfo.boundingBox.max.y,c.tileInfo.boundingBox.max.z),h.min=o$1p.fromElements(c.tileInfo.boundingBox.min.x,c.tileInfo.boundingBox.min.y,c.tileInfo.boundingBox.min.z);h._parent=a._parentPagelod,h._depth=a._depth,(!e$2e(n.state)||"AllLeaf"!=n.state)&&(a._childrenPageLod.push(h),a._pagelodMap[h._rangeDataList]=h,_0x49af2f(e,a,h,c.tileInfo,r,o))}}}}function _0xc3aea2(e,t,i){for(var n=[],r=0;r<e._childrenPageLod.length;r++)e._childrenPageLod[r]._entity._skipLevel=i,n.push(e._childrenPageLod[r]._entity);for(;n.length<t&&n.length>0;){for(var o=[],a=0;a<n.length;a++)for(var s=0;s<n[a]._childrenPageLod.length;s++)n[a]._childrenPageLod[s]._entity._skipLevel=i,o.push(n[a]._childrenPageLod[s]._entity);n=o}if(n.length>0)for(s=0;s<n.length;s++)n[s]._needLoad=!0,_0xc3aea2(n[s],t,i+1)}function _0x549b26(e){1==e._childrenPageLod.length?_0x549b26(e._childrenPageLod[0]._entity):e._needLoad=!0}function _0x4f4bd4(e,t,i){var n=i._matModel;t._configReady=!0,t._configLoadState=N$Q.LOADED;var r=t._relativePath;if(e$2e(e.lodTreeExport.tileInfo.children))for(var o=0,a=e.lodTreeExport.tileInfo.children.length;o<a;o++){t._boundingSphere=_0x4ff005(e.lodTreeExport.tileInfo.boundingBox,n);var s=e.lodTreeExport.tileInfo.children[o];if(e$2e(s.tileInfo)&&(""===s.tileInfo.modelPath&&(t._hasLeafChild=!0),""!==s.tileInfo.modelPath)){var l=new _0x4d13e0;if(l._fileType=i._fileType,l._rangeList=s.tileInfo.rangeValue,l._rangeDataList=s.tileInfo.modelPath,l._rangeDataList=l._rangeDataList.replace(/.s3mb*/g,""),0===l._rangeDataList.indexOf("./")&&(l._rangeDataList=l._rangeDataList.substring(2)),"pixelSizeOnScreen"===s.tileInfo.rangeMode?l._rangeMode=_0x219958.PIXEL_SIZE_ON_SCREEN:"geometricError"===s.tileInfo.rangeMode&&(l._rangeMode=_0x219958.GEOMETRY_ERROR),s.tileInfo.boundingBox.xExtent){var u=s.tileInfo.boundingBox,c=o$1p.fromElements(u.center.x,u.center.y,u.center.z),h=e$2c.fromElements(u.xExtent.x,u.xExtent.y,u.xExtent.z,0),d=e$2c.fromElements(u.yExtent.x,u.yExtent.y,u.yExtent.z,0),f=e$2c.fromElements(u.zExtent.x,u.zExtent.y,u.zExtent.z,0);e$2c.equals(h,e$2c.ZERO)&&(h=new e$2c(1,0,0,0)),e$2c.equals(d,e$2c.ZERO)&&(d=new e$2c(0,1,0,0)),e$2c.equals(f,e$2c.ZERO)&&(f=new e$2c(0,0,1,0));var p=new p$1e(h.x,d.x,f.x,h.y,d.y,f.y,h.z,d.z,f.z);l._orientedBoundingBox=new y$Y(c,p),l._orientedBoundingBox._updateBBox(),l.min=l._orientedBoundingBox.bbox[0].clone(),l.max=l._orientedBoundingBox.bbox[0].clone();for(var _,m=1;m<8;m++)_=l._orientedBoundingBox.bbox[m],l.min.x>_.x&&(l.min.x=_.x),l.min.y>_.y&&(l.min.y=_.y),l.min.z>_.z&&(l.min.z=_.z),l.max.x<_.x&&(l.max.x=_.x),l.max.y<_.y&&(l.max.y=_.y),l.max.z<_.z&&(l.max.z=_.z);var g=o$1p.distance(l._orientedBoundingBox.center,l._orientedBoundingBox.bbox[0]);p$1d.multiplyByPoint(n,c,c),p$1d.multiplyByVector(n,h,h),p$1d.multiplyByVector(n,d,d),p$1d.multiplyByVector(n,f,f),l._orientedBoundingBox.center=c,l._orientedBoundingBox.halfAxes[0]=h.x,l._orientedBoundingBox.halfAxes[1]=h.y,l._orientedBoundingBox.halfAxes[2]=h.z,l._orientedBoundingBox.halfAxes[3]=d.x,l._orientedBoundingBox.halfAxes[4]=d.y,l._orientedBoundingBox.halfAxes[5]=d.z,l._orientedBoundingBox.halfAxes[6]=f.x,l._orientedBoundingBox.halfAxes[7]=f.y,l._orientedBoundingBox.halfAxes[8]=f.z,l._orientedBoundingBox.areaDirty=1,l._boundingSphere=new i$1d(c,g)}else l._boundingSphere=_0x4ff005(s.tileInfo.boundingBox,n),l._orientedBoundingBox=_0x51a487(s.tileInfo.boundingBox,n),l.max=o$1p.fromElements(s.tileInfo.boundingBox.max.x,s.tileInfo.boundingBox.max.y,s.tileInfo.boundingBox.max.z),l.min=o$1p.fromElements(s.tileInfo.boundingBox.min.x,s.tileInfo.boundingBox.min.y,s.tileInfo.boundingBox.min.z);l._parent=void 0,l._depth=t._depth,t._childrenPageLod.push(l),t._pagelodMap[l._rangeDataList]=l,e$2e(t._parent)?t._rootName=t._parent._rootName:t._rootName=t._fileName,l._rootName=t._rootName,_0x49af2f(i,t,l,s.tileInfo,n,r)}}_0xc3aea2(t,i._maxSkipNum,t._skipLevel),t._isRootTile&&_0x549b26(t)}function _0x484265(e,t){var i=u$Z(e._indexFilePath,e._fileName);i=i.replace(".json","");var n,r,o=e._relativePath.resolve(t._baseUri)+i+".json";(o=o.replace(/\+/g,"%2B"),e$2e(t._wstTaskProcessor))?(r=t._isS3MBlock?o.substring(o.indexOf("data/path/")+9):o.substring(o.indexOf("/data/")+5),r=decodeURIComponent(r),n=t._wstTaskProcessor.scheduleTask({data:r,dataType:"json"})):(e$2e(a$O.CREDENTIAL)&&(o=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,o):a$O.addToken(o)),n=u$P(o,void 0,new r$1c({url:o,throttle:!1,throttleByServer:!0,serverKey:r$1b.getServerKey(o)})));e$2e(n)&&(e._configLoadState=N$Q.LOADING,n.then((function(i){if(e$2e(i)){if(e._needLoad=!1,_0x4f4bd4(i,e,t),e$2e(t._layerScheduler._indexedDBScheduler)){var n={blob:i,key:e._relativePath.toString()+e._fileName+".json",tablename:t._layerScheduler.tablename,dbname:t._layerScheduler._indexedDBScheduler.dbname};_0x29d1c7.indexTaskProcessor.scheduleTask(n,[])}}else e._configLoadState=N$Q.UNLOAD}),(function(t){e$2e(t)?e._configLoadState=N$Q.FAILED:e._configLoadState=N$Q.UNLOAD})))}_0x408010.prototype.loadConfig=function(e){if(e._configLoadState===N$Q.UNLOAD){var t=this._layer,i=u$Z(e._indexFilePath,e._fileName);i=i.replace(".json","");var n=e._relativePath.toString()+i+".json";if(e$2e(window.Proxy)&&(!0===this._indexedDBSetting.isGeoTilesSave||this._indexedDBSetting.isGeoTilesRootNodeSave&&this._isRootNode(n)))if(e$2e(this._indexedDBScheduler)){var r=this._indexedDBScheduler.getElementFromDB(this.tablename,n);e$2e(r)?(e._configLoadState=N$Q.LOADING,r.then((function(i){e$2e(i)?_0x4f4bd4(i,e,t):(e._configLoadState=N$Q.UNLOAD,_0x484265(e,t))}),(function(i){e._configLoadState=N$Q.UNLOAD,_0x484265(e,t)}))):(e._configLoadState=N$Q.UNLOAD,_0x484265(e,t))}else _0x484265(e,t);else _0x484265(e,t)}},_0x408010.prototype.loadEntity=function(e){var t=e._s3mLoadState,i=this._layer;this._cacheKey;var n,r,o,a,s=this;if(_0x2f6e82(e,i._frameState)){if(N$Q.UNLOAD===t)if(i._isS3MBlock&&i._blockCache.contains(i._id,e._blockKey))e.s3mBuffer=i._blockCache.get(i._id,e._blockKey),t=e._s3mLoadState=N$Q.LOADED;else{if(!e$2e(e.request)){var l=".s3m",u="s3m";i._isS3MBlock?l=".s3mblock":i._isS3MB?(l=i._isS3MZ?".s3mbz":".s3mb",u=i._isS3MZ?"s3mbz":"s3mb"):i._isOSGB&&(l=".osgb",l=".osgb"),e._fileName=e._fileName.replace(/\0/,"");var c=e._relativePath.resolve(i._baseUri)+e._fileName+l;if(i.subdomains&&(c=c.replace(/(.*realspace)/,i._subdomainsUrlScheme)),c=c.replace(/\+/g,"%2B"),i._urlType===Tr$4.KEY_VALUE){n=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),r=i._urlArguments;var h={layerName:i.name,rootTile:n,tile:e._fileName,suffix:u};o=m$1d(h=Object.assign(h,r),!0),(a=c.match(/(\S*)\/datas/)).length>0&&(c=a[0]+"?"+o)}e.request=new r$1c({url:c,throttle:!0,throttleByServer:!0,serverKey:r$1b.getServerKey(c),priorityFunction:this.createPriorityFunction(e,this)})}var d=e._relativePath.toString()+e._fileName;if(e$2e(window.Proxy)&&(!0===this._indexedDBSetting.isGeoTilesSave||this._indexedDBSetting.isGeoTilesRootNodeSave&&this._isRootNode(d)))if(e$2e(this._indexedDBScheduler)&&this._indexedDBRequestNum<this._indexedDBRequestLimit){this._indexedDBRequestNum++;s=this;var f=this._indexedDBScheduler.getElementFromDB(this.tablename,d);e$2e(f)?(e._s3mLoadState=N$Q.LOADING,f.then((function(t){s._indexedDBRequestNum--,e$2e(t)?(e._s3mLoadState=N$Q.PARSING,e.s3mBuffer=null,e.volBuffer=null,i._isS3MB?i._isS3MBlock?_0x1393e5.parseChildGroup(t,s._layer,e):_0x1393e5.parseResult(t,s._layer,e):_0x46f77a.parseResult(t,s._layer,e,e.volBuffer)):(e._s3mLoadState=N$Q.UNLOAD,_0x42e6cd(e,s))}),(function(t){s._indexedDBRequestNum--,e._s3mLoadState=N$Q.UNLOAD,_0x42e6cd(e,s)}))):(this._indexedDBRequestNum--,e._s3mLoadState=N$Q.UNLOAD,_0x42e6cd(e,s))}else _0x42e6cd(e,s);else this._packingRequest?this._packRequestEntities.push(e):_0x42e6cd(e,s)}if(N$Q.PARSING===t&&"InstanceModel"===i._dataType&&(e.skeletonState===_0x13fd1b.STATE.SkeletonParsing?_0x13fd1b.parse(i,e):e.skeletonState===_0x13fd1b.STATE.SkeletonReady&&_0x1393e5.parseResultInstance(i,e)),N$Q.PARSING===t&&e$2e(e.parsingResult)&&(i._isS3MB?i._isS3MBlock?_0x1393e5.parseChildGroup(e.parsingResult,i,e):_0x1393e5.parseResult(e.parsingResult,i,e):_0x46f77a.parseResult(e.parsingResult,i,e,e.volBuffer),e.parsingResult=null),N$Q.LOADED===t&&(!1!==i._bVolume&&i.loadVolumeData?e._s3mLoadState===N$Q.LOST?e._s3mLoadState=N$Q.UNLOAD:e._s3mLoadState=N$Q.LOADVOL:this._packingRequest?this._parsingEntities.push(e):i._isS3MB||i._isOSGB?_0x1393e5.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer):_0x46f77a.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer),i._S3MTileLoadedEvent.raiseEvent(e._boundingSphere)),N$Q.PARSED===t&&e.transformResource(i._frameState,i,Number.MAX_VALUE),N$Q.LOADVOL===t&&"vol"===i._strVolumeExt){var p,_,m;if(""===i._volName?(p=e._relativePath.resolve(i._baseUri)+e._fileName+"."+i._strVolumeExt,_=e._fileName):(p=e._relativePath.resolve(i._baseUri)+e._fileName+"_"+i._volName+"."+i._strVolumeExt,_=e._fileName+"_"+i._volName),i._urlType===Tr$4.KEY_VALUE){n=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),r=i._urlArguments;h={layerName:i.name,rootTile:n,tile:_,suffix:i._strVolumeExt};o=m$1d(h=Object.assign(h,r),!0),(a=p.match(/(\S*)\/datas/)).length>0&&(p=a[0]+"?"+o)}e$2e(a$O.CREDENTIAL)&&(p=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,p):a$O.addToken(p)),e$2e(e.request)||(e.request=new r$1c({url:p,throttle:!0,throttleByServer:!0,serverKey:r$1b.getServerKey(p),priorityFunction:this.createPriorityFunction(e,this)})),e$2e(m="png"===i._strVolumeExt?t$S(e.request.url,this._customRequestHeaders,e.request):o$10(e.request.url,this._customRequestHeaders,e.request))&&(e._s3mLoadState=N$Q.LOADING,this._statistics.numberOfPendingRequests++,e.request=null,m.then((function(t){e._s3mLoadState=N$Q.VOLLOADED,"png"===i._strVolumeExt?e.volImage=t:e.volBuffer=t,s._statistics.numberOfPendingRequests--,s._statistics.numberOfProcessingAttempted++}),(function(t){e$2e(t)?(s._statistics.numberOfPendingRequests--,e._s3mLoadState=N$Q.VOLFAILED):(s._statistics.numberOfAttemptedRequests++,s._statistics.numberOfPendingRequests--,e._s3mLoadState=N$Q.LOADVOL)})))}else N$Q.LOADVOL===t&&("png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt)&&(e._s3mLoadState=N$Q.VOLLOADED);(N$Q.VOLLOADED===t||N$Q.VOLFAILED===t)&&e$2e(e.s3mBuffer)&&("png"===i._strVolumeExt||"vol_texture_mapping"===i._strVolumeExt?i._isS3MB?_0x1393e5.binaryDataParser(i,e,e.s3mBuffer,e.volImage):_0x46f77a.binaryDataParser(i,e,e.s3mBuffer,e.volImage):i._isS3MB?_0x1393e5.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer):_0x46f77a.binaryDataParser(i,e,e.s3mBuffer,e.volBuffer))}},_0x408010.prototype.reloadVol=function(e){var t,i,n,r,o=this._layer;if(this._cacheKey,"vol"===o._strVolumeExt){var a,s,l;if(""===o._volName?(a=e._relativePath.resolve(o._baseUri)+e._fileName+"."+o._strVolumeExt,s=e._fileName):(a=e._relativePath.resolve(o._baseUri)+e._fileName+"_"+o._volName+"."+o._strVolumeExt,s=e._fileName+"_"+o._volName),o._urlType===Tr$4.KEY_VALUE){t=e._relativePath.path.replace(/\//g,"").replace(".",""),i=o._urlArguments;var u={layerName:o.name,rootTile:t,tile:s,suffix:o._strVolumeExt};n=m$1d(u=Object.assign(u,i),!0),(r=a.match(/(\S*)\/datas/)).length>0&&(a=r[0]+"?"+n)}if(e$2e(a$O.CREDENTIAL)&&(a=e$2e(a$O.CREDENTIAL._keymap[this._scpUrl])?a$O.addTokenWithKey(this._scpUrl,a):a$O.addToken(a)),e$2e(e.request)||(e.request=new r$1c({url:a,throttle:!0,throttleByServer:!0,serverKey:r$1b.getServerKey(a),priorityFunction:this.createPriorityFunction(e,this)})),l="png"===o._strVolumeExt?t$S(e.request.url,this._customRequestHeaders,e.request):o$10(e.request.url,this._customRequestHeaders,e.request),this._statistics.numberOfColorChangeProcessing++,e$2e(l)){e.request=null,e._reloadVol=!1,this._statistics.numberOfColorChangePending++;var c=this;l.then((function(t){if(c._statistics.numberOfColorChangePending--,"vol"===o._strVolumeExt&&e$2e(t)&&t.byteLength>7&&e$2e(e._volObj)){var i,n=new Uint8Array(t,8);i=null!=_0xec343c?_0x385a58(n):nt$b.inflate(n).buffer;var r=new Float64Array(i,0,1),a=new Uint32Array(i,48,1);if(0===r[0]||3200===a[0]||3201===a[0]){var s=0;0===r[0]&&(s=8);var l=new Float64Array(i,s,6),u=l[0],h=l[1],d=l[2],f=l[3],p=l[4]<l[5]?l[4]:l[5],_=l[4]>l[5]?l[4]:l[5],m={left:u,top:h,right:d,bottom:f,minHeight:p,maxHeight:_,width:d-u,length:h-f,height:_-p},g=new Uint32Array(i,48+s,7),x=g[0],y=g[1],v=g[2],$=g[3],b={nFormat:x,nSideBlockCount:y,nBlockLength:v,nLength:$,nWidth:g[4],nHeight:g[5],nDepth:g[6],imageArray:new Uint8Array(i,76+s,$*$*4)},T=o._context._id+"_"+o.id+"_"+e._relativePath.resolve(o._baseUri)+"_"+e._fileName,C=k$S.FilterMode.LINEAR;e$2e(o._hypsometricSetting)&&o._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(C=k$S.FilterMode.NEAREST),3201===b.nFormat&&e$2e(o._hypsometricSetting)&&_0x46f77a.convertFloat(b,o._hypsometricSetting,C);var S=Se$e.ReloadVolumeTexture(T,o._gl,o._context,b,C);e._volObj.volTexture=S,e._volObj.nFormat=b.nFormat,e._volObj.nSideBlockCount=b.nSideBlockCount,e._volObj.nBlockLength=b.nBlockLength,e._volObj.nLength=b.nLength,e._volObj.nWidth=b.nWidth,e._volObj.nHeight=b.nHeight,e._volObj.nDepth=b.nDepth,e._volObj.id=T,e._volObj.dataFloor=o._fMinValue,e._volObj.dataCeil=o._fMaxValue,e._volObj.volBounds=m}}c._statistics.numberOfColorChangeProcessing--}),(function(t){e$2e(t)||(c._statistics.numberOfColorChangeAttempted++,e._reloadVol=!0),c._statistics.numberOfColorChangePending--,c._statistics.numberOfColorChangeProcessing--}))}else this._statistics.numberOfColorChangeProcessing--}},_0x408010.prototype.reloadVolMapping=function(e){var t=this._layer;if("vol_texture_mapping"===t._strVolumeExt){var i=t._context;for(var n in e._volTextures){this._statistics.numberOfColorChangeProcessing++;var r=n,o=e._volTextures[r],a=t._id+i._id,s=r.substring(0,r.length-a.length)+"_"+e._fileName;s=""!==t._volName?s+"_"+t._volName:s,s+=".vol";var l=e._relativePath.resolve(t._baseUri)+s;if(0!=t.urlType){var u=t._urlArguments,c=l.indexOf("datas")+5,h=u.layer3DName,d=l.substring(l.indexOf("/path/")+6).split("/"),f=d[0],p=d[1].substring(0,d[1].indexOf(".")),_=d[1].substring(d[1].indexOf(".")+1,d[1].length);for(var n in l=l.substring(0,c)+"?layerName="+h+"&rootTile="+f+"&tile="+p+"&suffix="+_,u)l=l+"&"+n+"="+u[n]}var m=o$10(l,this._customRequestHeaders);if(e$2e(m)){this._statistics.numberOfColorChangePending++;var g=this;m.then((function(i){if(g._statistics.numberOfColorChangePending--,e$2e(i)){var n,r=void 0,a=new Uint8Array(i,8);if(n=null!=_0xec343c?_0x385a58(a):nt$b.inflate(a).buffer,1===new Float64Array(n,0,1)[0]){var s=new Uint32Array(n,8,4),l=s[0],u=s[1],c=s[2];r={nFormat:l,nWidth:u,nHeight:c,nPixelSize:s[3],imageArray:new Float32Array(n,24,u*c)}}if(e$2e(r)){var h=_0x46f77a.convertFloatTexture(r,t._hypsometricSetting,t._hypsometricSetting.filterMode);o.copyFrom({width:r.nWidth,height:r.nHeight,arrayBufferView:h})}g._statistics.numberOfColorChangeProcessing--,i=null,e._reloadVol=!1}}),(function(e){g._statistics.numberOfColorChangePending--,g._statistics.numberOfColorChangeAttempted++,g._statistics.numberOfColorChangeProcessing--}))}else this._statistics.numberOfColorChangeProcessing--}}},_0x408010.prototype.dealWithPrepareLoad=function(e){if(this._requestByteLength+=e,this._requestByteLength>this._layer._prepareLoadSize)this._layer._prepareLoadEvent.raiseEvent(100),this._prepareLoaded=!0,this.refreshPrepareLoad();else{var t=Math.floor(100*this._requestByteLength/this._layer._prepareLoadSize);t>this._prepareRatio&&(this._prepareRatio=t,this._layer._prepareLoadEvent.raiseEvent(t))}};var _0x432792=/({.*?})/g;function _0x42e6cd(e,t){var i,n=e.request.url;if(e$2e(t._layer._wstTaskProcessor)){var r;r=t._layer._isS3MBlock?e.request.url.substring(e.request.url.indexOf("data/path/")+9):e.request.url.substring(e.request.url.indexOf("/data/")+5),r=decodeURIComponent(r),i=t._layer._wstTaskProcessor.scheduleTask({dataType:"arraybuffer",data:r})}else{if(e$2e(t._layer._subdomains)){var o=t._layer._subdomains,a=o[e._subdomainIndex%o.length];n=n.replace(_0x432792,(function(e,t){return"{s}"===t?a:e}))}e$2e(a$O.CREDENTIAL)&&(n=e$2e(a$O.CREDENTIAL._keymap[n])?a$O.addTokenWithKey(t._scpUrl,n):a$O.addToken(n)),i=o$10(n,t._customRequestHeaders,e.request)}e$2e(i)?(e._s3mLoadState=N$Q.LOADING,t._statistics.numberOfPendingRequests++,i.then((function(i){if(e$2e(t._layer._wstTaskProcessor)&&(!e$2e(i)||!e._isVisible||!ti$4.update(t._layer._context.memorySize)))return e._s3mLoadState=N$Q.UNLOAD,void(e.request=null);t._prepareLoaded||t.dealWithPrepareLoad(i.byteLength),e.request=null,t._statistics.numberOfPendingRequests--,e._s3mLoadState===N$Q.LOADING&&(t._layer._isS3MBlock&&t._layer._blockCache.set(t._layer._id,e._blockKey,i),0!=t._cacheKey.length?e.s3mBuffer=_0x2a3c92(i,t._cacheKey):e.s3mBuffer=i,e._s3mLoadState=N$Q.LOADED,t._statistics.numberOfProcessingAttempted++)}),(function(i){e.request=null,e$2e(i)?(t._statistics.numberOfPendingRequests--,e._s3mLoadState=N$Q.FAILED):(t._statistics.numberOfAttemptedRequests++,t._statistics.numberOfPendingRequests--,e._s3mLoadState=N$Q.UNLOAD)}))):e.request=null}function _0x1ec436(e,t,i){var n=t._layer;if(n.hasAttributeIndex&&i){if(e.leafAttrLoadState===N$Q.LOADED)return}else if(t.attrsave||e.attrLoadState===N$Q.LOADED)return;var r=t;e$2e(n._queryFieldNames)&&"attribute"===n._attributeExtentName&&(i||(e.attrLoadState=N$Q.LOADING),r._indexedDBSetting.isAttributesSave?r._indexedDBScheduler.checkObjectStoreExit(e._fileName)?r._indexedDBScheduler.getElementFromDB(e._fileName,"saved").then((function(i){1==i?r._indexedDBScheduler.db.transaction(e._fileName).objectStore(e._fileName).get("obj").onsuccess=function(i){var n=i.target.result.value,r=new FileReader;r.onload=function(){var i=JSON.parse(r.result);t._attributes=Object.assign(t._attributes,i),e.attrLoadState=N$Q.LOADED},r.readAsText(n)}:_0x417972(e,t)})).otherwise((function(){_0x417972(e,t)})):_0x417972(e,t):_0x417972(e,t,i))}function _0x417972(e,t,i){var n=t._layer;if((!t.attrsave||n.hasAttributeIndex)&&e$2e(n._queryFieldNames)){var r="attribute"===n._attributeExtentName?".attribute":n._isS3MB?".s3md":".scvd",o=t,a=e._attrAppend.length>0?e._attrAppend:n._queryFieldNames,s=a.join(";"),l=()=>{};e$2e(a$O.CREDENTIAL)&&(l=e$2e(a$O.CREDENTIAL._keymap[o._scpUrl])?e=>a$O.addTokenWithKey(o._scpUrl,e):e=>a$O.addToken(e));var u=r;if(n.hasAttributeIndex&&i&&(u="_1"+r),".attribute"===r){var c="";c=n._fieldsInfo._hash.hasOwnProperty("smid")?"?fields=smid;"+s:"?fields=SmID;"+s;var h="",d=[],f=n._baseUri.toString(),p=n._indexInfoAttributeMap;if(e$2e(p))for(var _=p[e._relativePath.path+e._fileName],m=0;m<_.length;m++)l(h=f+_[m].url+c),d.push(o$10(h,o._customRequestHeaders));else{if(h=""===e._relativePath.toString()?f+e._rootName:e._relativePath.resolve(n._baseUri).toString()+f$Q(e._relativePath.toString().replace(/\/$/,"")),h+=u+c,n._urlType===Tr$4.KEY_VALUE){var g=e._relativePath.path.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),x=n._urlArguments,y={layerName:n.name,rootTile:g,tile:e._fileName,suffix:"attribute",fields:s},v=m$1d(y=Object.assign(y,x),!0),$=h.match(/(\S*)\/datas/);$.length>0&&(h=$[0]+"?"+v)}l(h),d.push(o$10(h,o._customRequestHeaders))}d.length>0?(n.hasAttributeIndex&&i?e.leafAttrLoadState=N$Q.LOADING:e.attrLoadState=N$Q.LOADING,o$1l.all(d,(function(t){o.attrsave=!0,n.hasAttributeIndex&&i?e.leafAttrLoadState=N$Q.LOADED:e.attrLoadState=N$Q.LOADED,e._attrAppend=[];for(let i=0;i<t.length;i++){var r=t[i],s=new Int32Array(r,0,1);s=s[0];for(var l=new Int32Array(r,4,s),u=[],c=0;c<s;c++)u.push(l[c]);var h=Math.floor(u[0]/4.125),d=C=Math.ceil(h/8),f=new Int8Array(r,4*(s+1)+C,4*h),p=f.subarray(0,4*h),_=new Int8Array(p);f=new Int32Array(_.buffer);var m=4*(s+1)+u[0],g=[],x=[];for(c=1;c<=a.length;c++){var y=o._layer._fieldsInfo,v=a[c-1],$=y.get(v),b=$.type,T=Number($.size);h=Math.floor(u[c]/(T+.125));var C=Math.ceil(h/8);(10==b||"ntext"===b||"text"===b)&&(T=1,C=d,h=u[c]-C);var S=new Uint8Array(r,m,C);g.push(S);var w=new Int8Array(r,m+C,h*T).subarray(0,h*T);_=new Int8Array(w);if(4==b||"int32"===b)w=new Int32Array(_.buffer);else if("int16"===b)w=new Int16Array(_.buffer);else if(16==b||"int64"===b)w=new BigInt64Array(_.buffer);else if(6==b||"float"===b)w=new Float32Array(_.buffer);else if(7==b||"double"===b)w=new Float64Array(_.buffer);else if(10==b||"ntext"===b||"text"===b){for(var E=new DataView(w.buffer.slice(m+C,m+C+h*T)),P=0,A=[];P<E.byteLength;){var L=E.getInt32(P,!0);if((P+=4)+L>_.buffer.byteLength||L<0)break;var M=new Uint8Array(_.buffer,P,L);P+=L;var R=a$K(M,void 0,void 0,"gbk");A.push(R)}w=A}m+=u[c],x.push(w)}var O={};for(c=0;c<f.length;c++){for(var D={},I=0;I<x.length;I++){0!=(g[I][Math.floor(c/8)]>>7-c%8&1)?D[a[I]]=x[I][c]:D[a[I]]=null}e$2e(o._attributes[f[c]])&&(D=p$19(D,o._attributes[f[c]])),o._attributes[f[c]]=D,O[f[c]]=D}if(o._indexedDBSetting.isAttributesSave){var B=new Blob([JSON.stringify(O)],{type:"application/json"});if(o._indexedDBScheduler.checkObjectStoreExit(e._fileName))o._indexedDBScheduler.putElementInDB(e._fileName,"obj",B).then((function(){o.attrsave=!1,o._indexedDBScheduler.putElementInDB(e._fileName,"saved",!0),f=null})).otherwise((function(){o._indexedDBScheduler.clear(e._fileName),o.attrsave=!1,f=null}));else o._indexedDBScheduler.createObjectStore(e._fileName).then((function(){o._indexedDBScheduler.putElementInDB(e._fileName,"obj",B).then((function(){o.attrsave=!1,o._indexedDBScheduler.putElementInDB(e._fileName,"saved",!0),f=null})).otherwise((function(){o.attrsave=!1,f=null}))})).otherwise((function(e){o.attrsave=!1,f=null}))}else o.attrsave=!1}if(e$2e(n.themeStyle))for(var F,N=[e];F=N.pop();)for(var G=0;G<F._childrenPageLod.length;G++)for(var z=F._childrenPageLod[G],U=0;U<z._renderEntityList.length;U++){z._renderEntityList[U].updateTheme(n),e$2e(z._entity)&&N.push(z._entity)}})).otherwise((function(t){o.attrsave=!1,e$2e(t)?n.hasAttributeIndex&&i?e.leafAttrLoadState=N$Q.FAILED:e.attrLoadState=N$Q.FAILED:n.hasAttributeIndex&&i?e.leafAttrLoadState=N$Q.UNLOAD:e.attrLoadState=N$Q.UNLOAD}))):n.hasAttributeIndex&&i?e.leafAttrLoadState=N$Q.UNLOAD:e.attrLoadState=N$Q.UNLOAD}}}function _0xa2e6cb(e,t){if(e$2e(t._cartographic))if(e instanceof Array){for(var i=[],n=0;n<e.length;n++){var r=e[n];if(e$2e(r)&&(r instanceof h$R||r instanceof i$P)){var o=r.getImagery(t._cartographic);i=i.concat(o)}}i.length>0&&(t.setImagerys(i,t._cartographic),t._imageRasterFinish=!1,t._imageryLevels=[])}else{if(e$2e(e)&&(e instanceof h$R||e instanceof i$P))(i=e.getImagery(t._cartographic)).length>0&&(t.setImagerys(i,t._cartographic),t._imageRasterFinish=!1,t._imageryLevels=[])}}function _0x45bc09(e){const t=e._layer,i=t.attrDatas;if(!e$2e(i)||0===i.length)return;const n=t._fieldsInfo,r="attribute"===t._attributeExtentName?".attribute":t._isS3MB?".s3md":".scvd",o=performance.now();for(;i.length;){if(_0x6716ca(_0x276877(i.pop(),r,n),e),performance.now()-o>10)break}}function _0x1bcd86(e){const t=e._layer,i=t.attrDatas,n=e._savetoIndexDBDatas;if(e$2e(i)&&0===i.length&&0!==n.length&&0===i.length){e._attrloaded||(e._attrloaded=!0,t.attributeDownloaded.raiseEvent(t.name+" attribute downloaded."));const i=performance.now();for(;n.length;){if(_0x28571b(e,n.pop()),performance.now()-i>1)break}}}function _0x417359(e,t){var i=e._statistics,n=e._statisticsLastRender,r=i.numberOfPendingRequests,o=i.numberOfTilesProcessing,a=n.numberOfPendingRequests,s=n.numberOfTilesProcessing,l=r!==a||o!==s,u=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests&&0===i.numberOfProcessingAttempted,c=i.numberOfColorChangePending,h=n.numberOfColorChangePending,d=i.numberOfColorChangeProcessing,f=n.numberOfColorChangeProcessing,p=(c!==h||d!==f)&&0===i.numberOfColorChangeAttempted&&0===c&&0===d;Date.now()-i.lastLoadedTrigger.time>2e3&&i.lastLoadedTrigger.done&&t.afterRender.push((function(){e._layer._allTilesLoaded.raiseEvent(),i.lastLoadedTrigger.done=!1})),l&&u&&(i.lastLoadedTrigger.done=!0,i.lastLoadedTrigger.time=Date.now()),Date.now()-i.lastColorChangeTrigger.time>2e3&&i.lastColorChangeTrigger.done&&t.afterRender.push((function(){e._layer._colorTableChanged.raiseEvent(),i.lastColorChangeTrigger.done=!1})),p&&u&&(i.lastColorChangeTrigger.done=!0,i.lastColorChangeTrigger.time=Date.now())}_0x408010.prototype._clearIndexedDBCache=function(){e$2e(this._indexedDBScheduler)&&this._indexedDBScheduler.clear(this.tablename)},_0x408010.prototype._refreshVolume=function(){if(this._layer._bVolume){var e=[],t={};if("vol"===this._layer._strVolumeExt){for(var i=0,n=this._rootEntities.length;i<n;i++){e$2e(r=this._rootEntities[i])&&e$2e(r._fileName)&&(t[r._relativePath.resolve(this._layer._baseUri)+r._fileName]=r,e.push(r))}for(;s=e.pop();)for(i=0,n=s._childrenPageLod.length;i<n;i++){if(e$2e((o=s._childrenPageLod[i])._entity)&&e$2e(o._entity._fileName))e$2e(t[u=o._entity._relativePath.resolve(this._layer._baseUri)+o._entity._fileName])||(t[u]=o._entity),e.push(o._entity)}}else if("vol_texture_mapping"===this._layer._strVolumeExt){for(i=0,n=this._rootEntities.length;i<n;i++){var r;e$2e((r=this._rootEntities[i])._volTextures)&&(t[r.name]=r,e.push(r))}for(;s=e.pop();)for(i=0,n=s._childrenPageLod.length;i<n;i++){var o;e$2e((o=s._childrenPageLod[i])._entity)&&e$2e(o._entity._volTextures)&&(t[r.name]=o._entity,e.push(o._entity))}}if(this._layer._refreshVolume)for(var a in this._layer._refreshVolume=!1,t)t[a]._reloadVol=!0;if("vol"===this._layer._strVolumeExt)for(var a in t){var s;if(e$2e(s=t[a])&&s._isParsed&&e$2e(s._volObj)&&s._reloadVol){var l=this._layer,u=l._context._id+"_"+l.id+"_"+s._relativePath.resolve(l._baseUri)+"_"+s._fileName;s._volObj.id==u&&this.reloadVol(s)}}else if("vol_texture_mapping"===this._layer._strVolumeExt)for(var a in t)t[a]._reloadVol&&this.reloadVolMapping(t[a]);e.length=0,t=[]}},_0x408010.prototype._refreshImage=function(){if(e$2e(this._layer._imageryLayer)){for(var e=[],t={},i=0;i<this._rootEntities.length;i++){var n=this._rootEntities[i];if(e$2e(n)&&e$2e(n._fileName))for(var r=0;r<n._childrenPageLod.length;r++)for(var o=n._childrenPageLod[r],a=0;a<o._renderEntityList.length;a++){_0xa2e6cb(this._layer._imageryLayer,o._renderEntityList[a]);for(var s=o._renderEntityList[a]._imagerys.length,l=0;l<s;l++){for(var u=o._renderEntityList[a]._imagerys[l];e$2e(u.parent)&&u.level>u.imageryLayer._imageryProvider.minimumLevel&&!(u=u.parent).rectangle.contains(this._layer.layerBounds););t[JSON.stringify([u.x,u.y,u.level,u.imageryLayer._layerIndex])]=u}e$2e(o._entity)&&e$2e(o._entity._fileName)&&e.push(o._entity)}}for(var c in t)t[c].processStateMachine(this._layer._frameState,!1);for(var h;h=e.pop();)for(i=0,r=h._childrenPageLod.length;i<r;i++){for(o=h._childrenPageLod[i],a=0;a<o._renderEntityList.length;a++)_0xa2e6cb(this._layer._imageryLayer,o._renderEntityList[a]);e$2e(o._entity)&&e$2e(o._entity._fileName)&&e.push(o._entity)}e.length=0}},_0x408010.prototype._hideImage=function(e){if(e$2e(this._layer._imageryLayer)){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i];e$2e(r)&&e$2e(r._fileName)&&t.push(r)}for(var o;o=t.pop();)for(i=0,n=o._childrenPageLod.length;i<n;i++){for(var a=o._childrenPageLod[i],s=0;s<a._renderEntityList.length;s++)a._renderEntityList[s]._showImagerysImmediate=!1;e$2e(a._entity)&&e$2e(a._entity._fileName)&&t.push(a._entity)}t.length=0}},_0x408010.prototype.update=function(e,t,i){this._updateSceneMode(t.camera);var n=t.passes.pick;this._statistics.numberOfAttemptedRequests=0,this._statistics.numberOfColorChangeAttempted=0,!n&&!t._fboState.enabled&&(this.LoadingPriority===_0x539352.UsePagedLodInfo?this._scheduleSkip(t):this._schedule(t)),this._refreshVolume(),this._updatePolygons(),this._updateRenderQueue(e,t,i),t.passes.render&&_0x417359(this,t),this._statisticsLastRender=p$19({},this._statistics),this.traverseRenderEntityRecursionForObjsTranslate(),_0x45bc09(this),_0x1bcd86(this)},_0x408010.prototype._updateRenderQueue=function(e,t,i){if(this.LoadingPriority,_0x539352.UsePagedLodInfo,i.length,this._layer._fileType===p$T.ClampGroundRealtimeRasterCache){this._rasterFrequency++,40==this._rasterFrequency&&(this._rasterFrequency=0),t.rasterPerFrame=this._layer.rasterPerFrame;for(var n=0,r=this._renderQueue.length;n<r;n++){(o=this._renderQueue[n]).isDestroyed()||o.update(e,t,i,this._layer)}}else for(n=0,r=this._renderQueue.length;n<r;n++){var o;(o=this._renderQueue[n]).isDestroyed()||o.update(e,t,i,this._layer)}},_0x408010.prototype._updatePolygons=function(){if(e$2e(this._extrudedId)&&e$2e(this._polygons)){for(var e=0,t=this._renderQueue.length;e<t;e++){var i=this._renderQueue[e],n=i._selectionInforMap._hash;if(e$2e(i._polygonId)){var r={};r[i._polygonId]=0,i.updateObjsOperation(r)}e$2e(n[this._extrudedId])?(i._polygons=this._polygons,i._polygonId=this._extrudedId):(i._polygons=void 0,i._polygonId=void 0,i._polygonCommands=[])}this._polygons=void 0}},_0x408010.prototype.saveLocalCache=function(e){if((!0===this._layer._indexedDBSetting.isGeoTilesSave||!0===this._layer._indexedDBSetting.isGeoTilesRootNodeSave||!0===this._layer._indexedDBSetting.isAttributesSave)&&e$2e(this._indexedDBScheduler)){var t={tablename:this.tablename,dbname:this._indexedDBScheduler.dbname};if(e.push(t),this._layer._isS3MBlock){t={tablename:this.tablename+"Texture",dbname:this._indexedDBScheduler.dbname};e.push(t)}}};var _0x933fa2=function(e,t){return e._disFromCamera-t._disFromCamera};function _0xfdd3f2(e){e._readyAncestor=void 0;var t=e._parentPagelod;if(e$2e(t)){e._readyAncestor=t._ready?t:t._readyAncestor;for(var i=e._childrenPageLod,n=i.length,r=0;r<n;r++){i[r]._readyAncestor=e._readyAncestor}var o=e._leafChildren;for(n=o.length,r=0;r<n;r++){o[r]._readyAncestor=e._readyAncestor}}}function _0x1de79c(e){return!e._isLeafTile&&e._needRefine}var _0x3a9378=new o$1p,_0x49699b=new o$1p;function _0x131171(e,t,i){var n=i._boundingSphere;if(e$2e(n)){var r;if(i._isRootTile){var o=e.cullingVolume,a=e$2e(i._orientedBoundingBox)?i._orientedBoundingBox:n,s=i$X.MASK_INDETERMINATE;i._visibilityPlaneMask=o.computeVisibilityWithPlaneMask(a,s),r=i._visibilityPlaneMask!==i$X.MASK_OUTSIDE}else r=!0;var l=o$1p.distance(n.center,e.camera.position)-n.radius;l=Math.max(0,l),i._disFromCamera=l;var u=o$1p.subtract(n.center,e.camera.positionWC,_0x3a9378);i._centerZDepth=o$1p.dot(e.camera.directionWC,u),i._isVisible=r&&l<=t._visibleDistanceMax&&l>=t._visibleDistanceMin;var c=e.camera,h=n.radius,d=o$1p.multiplyByScalar(c.directionWC,i._centerZDepth,_0x49699b),f=o$1p.add(c.positionWC,d,_0x49699b),p=o$1p.subtract(f,n.center,_0x49699b);if(o$1p.magnitude(p)>h){var _=o$1p.normalize(p,_0x49699b),m=o$1p.multiplyByScalar(_,h,_0x49699b),g=o$1p.add(n.center,m,_0x49699b),x=o$1p.subtract(g,c.positionWC,_0x49699b),y=o$1p.normalize(x,_0x49699b);i._foveatedFactor=1-Math.abs(o$1p.dot(c.directionWC,y))}else i._foveatedFactor=0}else i._isVisible=!0}function _0x163866(e,t,i,n){if(e$2e(i._boundingSphere)){var r=e$2e(i._orientedBoundingBox)?i._orientedBoundingBox:i._boundingSphere,o=e.cullingVolume.computeVisibilityWithPlaneMask(r,n),a=o!==i$X.MASK_OUTSIDE;e$2e(i._entity)&&(i._entity._visibilityPlaneMask=o);var s=o$1p.subtract(i._boundingSphere.center,e.camera.positionWC,_0x3a9378);i._centerZDepth=o$1p.dot(e.camera.directionWC,s),i._isVisible=a}else i._isVisible=!0}function _0xd98a24(e,t){e._maximumPriority.distance=Math.max(t._disFromCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t._disFromCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t._skipLevel,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t._skipLevel,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t._foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t._foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.pixel=Math.max(t._avgPix,e._maximumPriority.pixel),e._minimumPriority.pixel=Math.min(t._avgPix,e._minimumPriority.pixel)}function _0x209987(e,t,i){var n=e.positionWC,r=t.radius,o=t.center,a=o$1p.distance(o,n),s=.5*e$2d.PI_OVER_FOUR;return 2*(.5*i/Math.tan(s)*r/a)}function _0x443088(e,t,i){_0x131171(e,t,i),i._shouldSelect=!1,i._selected=!1,i._needRequest=!0,i._needRefine=!1;for(var n=i._childrenPageLod,r=n.length,o=0;o<r;o++){(s=n[o])._selected=!1,s._shouldSelect=!1,s._selectionDepth=0,s._stackLength=0,s._finalResolution=!0,s._needRefine=!1,_0x163866(e,t,s,i._visibilityPlaneMask),s._isVisible&&(s.calcPixFromCam(e.camera,t._context,t._lodRangeScale,t._fileType,t.LoadingPriority),t._layerScheduler._prepareLoaded||(pageLod._isLessLodDis&&(i._prepareLoad=!0),pageLod._isLessLodDis=!1),s._isLessLodDis||(i._needRefine=!0,s._needRefine=!0))}i._isRootTile&&(i._avgPix=_0x209987(e.camera,i._boundingSphere,t._context.drawingBufferHeight));var a=i._leafChildren;for(r=a.length,o=0;o<r;o++){var s;(s=a[o])._shouldSelect=!1,_0x163866(e,t,s,i._visibilityPlaneMask),s._selected=!1,s._needRefine=!1}_0xd98a24(t,i)}function _0x453b8c(e){return e._isVisible}function _0x2fe368(e,t,i,n){var r=t._layer;if(n._depth>r._maxSkipLevel&&!n._ready)return!0;var o,a=n._childrenPageLod,s=a.length,l=[],u=!1;for(o=0;o<s;o++){var c=a[o];if(c._isVisible){var h=c._entity;e$2e(h)?(_0x443088(e,r,h),c._isLessLodDis?u=!0:l.push(h)):u=!0}}n._childrenPageLod.sort(_0x17e86b),s=(a=n._leafChildren).length,n._leafChildren.sort(_0x17e86b),(n._hasLeafChild||n._leafChildren.length>0)&&(u=!0),s=l.length;var d,f=!1;for(o=0;o<s;o++)_0x453b8c(d=l[o])&&(i.push(d),f=!0);return!f||u}function _0xf82594(e,t,i){var n=i._boundingVolume;i._isVisible=e.cullingVolume.computeVisibility(n)!==Ae$w.OUTSIDE}function _0x104d84(e){if(e._renderEntityList.length>0&&e._ready)return{state:0};var t=[];if(_0x6cce0e(e)){for(var i=!1,n=e._entity._childrenPageLod,r=n.length,o=0,a=0,s=0;s<r;++s){if((u=n[s])._isVisible)1===(c=_0x104d84(u)).state?(t=t.concat(c.clipBounds),o++):2===c.state&&(t=t.concat(c.clipBounds),i=!0);else o++,a++}var l=(n=e._entity._leafChildren).length;for(s=0;s<l;++s){var u,c;if((u=n[s])._isVisible)0===r&&!e$2e(u.max)&&(u.max=e.max,u.min=e.min),1===(c=_0x104d84(u)).state?(t=t.concat(c.clipBounds),o++):2===c.state&&(t=t.concat(c.clipBounds),i=!0);else o++,a++}var h=l+r;return 0===l&&0===r||h===a?((t=[]).push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t}):0===t.length?{state:0}:i||o!==h?{state:2,clipBounds:t}:((t=[]).push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t})}return t.push({max:e.max,min:e.min,name:e._rangeDataList}),{state:1,clipBounds:t}}function _0x22f6e1(e,t,i){if(!i._selected){i._selected=!0;for(var n=i._renderEntityList,r=n.length,o=0;o<r;o++){var a=n[o];if(a.ownerPagelod=i,_0xf82594(e,t,a),a._isVisible)if(a._clipBounds=[],i._finalResolution)t._renderQueue.push(a);else{for(var s=i._entity._childrenPageLod,l=s.length,u=0;u<l;++u){var c=s[u];if(c._isVisible){var h=_0x104d84(c);0!=h.state&&(a._clipBounds=a._clipBounds.concat(h.clipBounds))}}a._clipBounds.length>0&&t._renderQueue.push(a)}}}}function _0x212a16(e,t,i){var n=t._layer,r=[];r.push(i);for(var o=!1;r.length>0;)for(var a=r.pop(),s=a._childrenPageLod,l=s.length,u=0;u<l;++u){_0x163866(e,n,s[u],a._visibilityPlaneMask);var c=s[u]._entity;e$2e(c)&&_0x453b8c(s[u])&&(s[u]._needRefine=!0,_0x3eb61f(t,c),c._ready?(o=!0,_0x443088(e,n,c),_0x3f755a(e,t,c)):r.push(c))}return o}function _0x3f755a(e,t,i){if(!i._selected){i._selected=!0;for(var n=i._childrenPageLod,r=n.length,o=0;o<r;o++){!(s=n[o])._isVisible||(s._isLessLodDis||!e$2e(s._entity)||s._shouldSelect)&&(s._shouldSelect=!0)}var a=i._leafChildren;for(r=a.length,o=0;o<r;o++){var s;(s=a[o])._isVisible&&(s._shouldSelect=!0)}}}function _0x212b5d(e,t,i){if(i._ready)_0x3f755a(e,t,i);else{var n=i._readyAncestor;e$2e(n)&&(n._shouldSelect=!0),_0x212a16(e,t,i)}}function _0x2f6e82(e,t){var i=e._boundingSphere;if(!e$2e(i))return!0;!e$2e(i)&&e$2e(e._orientedBoundingBox)&&(i=e._boundingSphere=i$1d.fromOrientedBoundingBox(e._orientedBoundingBox));var n=Math.max(2*i.radius,1),r=t.camera;return 60*(0!==r.positionWCDeltaMagnitude?r.positionWCDeltaMagnitude:r.positionWCDeltaMagnitudeLastFrame)/n<1}function _0x414a3b(e,t,i){!i._ready&&i._needRequest&&_0x2f6e82(i,e)&&(i._hasConfig&&!i._configReady&&(i._needLoad=!0,t.loadConfig(i)),e$2e(i._parent)&&0==i._skipLevel&&(i._parent._hasConfig?i._skipLevel=i._parent._skipLevel+1:i._skipLevel=i._parent._skipLevel),i._needRequest=!1,t._requestEntities.push({entity:i,priority:i._priority,owner:t}))}function _0x3eb61f(e,t){var i=e._replacementList,n=e._replacementSentinel;e$2e(t._replacementNode)?i.splice(n,t._replacementNode):t._replacementNode=i.add(t)}function _0x6cce0e(e){if(e$2e(e._entity)&&e._entity._hasLeafChild)for(var t=0;t<e._entity._leafChildren.length;t++){if(!e._entity._leafChildren[t]._ready)return!1}return e._needRefine&&!e._isLeafNode}var _0x5db3c7={stack:new r$S,stackMaximumLength:0,ancestorStack:new r$S,ancestorStackMaximumLength:0};function _0x519f69(e,t,i){var n,r=e._layer,o=_0x5db3c7.stack,a=_0x5db3c7.ancestorStack;for(o.push(i);o.length>0||a.length>0;){if(_0x5db3c7.stackMaximumLength=Math.max(_0x5db3c7.stackMaximumLength,o.length),_0x5db3c7.ancestorStackMaximumLength=Math.max(_0x5db3c7.ancestorStackMaximumLength,a.length),a.length>0){var s=a.peek();if(s._stackLength===o.length){a.pop(),s!==n&&(s._finalResolution=!1),_0x22f6e1(t,e,s);continue}}var l=o.pop(),u=l._shouldSelect,c=_0x6cce0e(l);if(u){if(l._selectionDepth=a.length,l._selectionDepth>0&&(r._hasMixedContent=!0),n=l,!c){_0x22f6e1(t,e,l);continue}a.push(l),l._stackLength=o.length}if(c){for(var h=l._entity._childrenPageLod,d=h.length,f=0;f<d;++f){(p=h[f])._isVisible&&o.push(p)}d=(h=l._entity._leafChildren).length;for(f=0;f<d;++f){var p;(p=h[f])._isVisible&&o.push(p)}}}}var _0x17e86b=function(e,t){return 0===e._disFromCamera&&0===t._disFromCamera?e._centerZDepth-t._centerZDepth:e._disFromCamera-t._disFromCamera};function _0x45dc9c(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function _0x54b0d0(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(!(t>r-1)){n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e,n,a);n+=a}}}function _0x165f50(e,t){var i=t._fileName.split("_"),n=t.request.url;t.request.throttle=!0,t.request.throttleByServer=!0,t.request.type=U$1f.PACK,t.request.quadKey=_0x45dc9c(i[2],i[1],i[0]),t.request.providerName=n.substring(n.indexOf("datas/")+6,n.indexOf("/data/"));var r=t$10.createIfNeeded(n).getDerivedResource({url:n,request:t.request}).fetchArrayBuffer();e$2e(r)?(t._s3mLoadState=N$Q.LOADING,e._statistics.numberOfPendingRequests++,r.then((function(i){var n=_0x54b0d0(i,t.request.quadKeyIndex);e$2e(n)?(i=new Uint8Array(n).buffer,0!=e._cacheKey.length?t.s3mBuffer=_0x2a3c92(i,e._cacheKey):t.s3mBuffer=i,t._s3mLoadState=N$Q.LOADED,e._statistics.numberOfPendingRequests--,e._statistics.numberOfProcessingAttempted++,t.request=null):t._s3mLoadState=N$Q.FAILED}),(function(i){e$2e(i)?(e._statistics.numberOfPendingRequests--,t._s3mLoadState=N$Q.FAILED):(e._statistics.numberOfAttemptedRequests++,e._statistics.numberOfPendingRequests--,t._s3mLoadState=N$Q.UNLOAD,t.request=null)}))):t.request=null}function _0x635350(e,t,i){e._isS3MBlock&&!i._isAncestorBlock||(e$2e(i._replacementNode)?t.splice(t.tail,i._replacementNode):i._replacementNode=t.add(i))}function _0x4555bd(e,t,i){var n=e._nLODLev;const r=new _0x128750;r.layer=e.layer,r._subdomainIndex=e._subdomainIndex+i+1,!e$2e(r._volObj)&&e$2e(e._volObj)&&(r._volObj=e._volObj,Se$e.AddRef(e._volObj.id));var o=t._rangeDataList;if(o.indexOf("/")>-1){var a=o.lastIndexOf("/"),s=o.substring(0,a+1);r._fileName=o.substring(a+1),r._relativePath=new h$16(s).resolve(e._relativePath)}else r._relativePath=e._relativePath,r._fileName=o;return r._avgPix=t._pix,r._disFromCamera=t._disFromCamera,r._nLODLev=n+1,r._boundingSphere=t._boundingSphere,r._originalBS=t._originalBS,r._orientedBoundingBox=t._orientedBoundingBox,r}function _0x397cfd(e,t){e$2e(e._entityObjectId[t._fileName])&&(e._entityObjectId[t._fileName]=void 0,e._objectIdChange=!0),e$2e(e._entityModelId[t._fileName])&&(e._entityModelId[t._fileName]=void 0,e._objectIdChange=!0)}function _0x5edf26(e,t){if(e$2e(e._associatedFieldName)&&e$2e(e._entityObjectId[t._fileName])){for(var i={},n=0;n<t._childrenPageLod.length;n++)for(var r=0;r<t._childrenPageLod[n]._renderEntityList.length;r++){var o=t._childrenPageLod[n]._renderEntityList[r];for(var a in o._selectionInforMap._hash)i[a]=e._attributes[a][e._associatedFieldName]}e._entityObjectId[t._fileName]=i,e._objectIdChange=!0}}function _0x1054cd(e,t){if(e._isFineLayer&&e$2e(e._entityModelId[t._fileName])){for(var i={},n=0;n<t._childrenPageLod.length;n++)for(var r=0;r<t._childrenPageLod[n]._renderEntityList.length;r++){var o=t._childrenPageLod[n]._renderEntityList[r];for(var a in o._selectionInforMap._hash)i[a]=a}e._entityModelId[t._fileName]=i,e._objectIdChange=!0}}function _0x3e9a4b(e,t,i){if(e$2e(t._hypsometricSetting))for(var n=e.positionWC,r=_0x4ba37f(i,t._hypsometricSetting,n)&&_0x45183e(t._hypsometricSetting,e),o=0;o<i._renderEntityList.length;o++){i._renderEntityList[o]._isHypsometricVisible=r}}function _0x509541(e,t){!e$2e(t._entity._volObj)&&e$2e(e._volObj)&&(t._entity._volObj=e._volObj,Se$e.AddRef(e._volObj.id))}function _0x57331c(e,t){return o$1p.distance(e.center,t.center)<=e.radius+t.radius}function _0xa25db0(e,t){if(e._flattening){var i=t._boundingSphere;if(e$2e(i))for(var n=e._flattenRegions.values,r=0,o=n.length;r<o;r++){var a=n[r].boundingSphere;if(e$2e(a)&&_0x57331c(i,a)){t.isFlatten=!0;break}}}}function _0x43c2ea(e,t,i,n){var r,o=[];if(t instanceof Array)for(var a=0;a<t.length;a++){if(!t[a].imageryProvider.ready)return;var s=t[a].getMaxScaleLevel(e._cartographic);o.push(s),r=0===a?s:Math.max(r,s)}else{if(!t.imageryProvider.ready)return;r=t.getMaxScaleLevel(e._cartographic)}var l=Math.min(i,r);if(l>0&&!e.hasScaleImagerys(l)){var u=[];if(t instanceof Array)for(a=0;a<t.length;a++){var c=t[a].getImagery(e._cartographic,Math.min(o[a],l));u=u.concat(c)}else u=t.getImagery(e._cartographic,l);u.length>0&&e.setScaleImagerys(u,l)}e.resetScaleImagerys(l,n)}function _0x3e93d8(e,t,i,n){var r=t._layer;0===e._rangeList&&(e._rangeList=2*n._parentPagelod._rangeList);var o=e.calcImageryScaleLevel(i.camera,i.context,r._lodRangeScale,t._nLoadingPriority,e._rangeMode);o=Math.ceil(o)-1;for(var a=0;a<e._renderEntityList.length;a++){var s=e._renderEntityList[a];if(i.cullingVolume.computeVisibility(s._boundingVolume)!=Ae$w.OUTSIDE&&e$2e(s._cartographic))_0x43c2ea(s,r._imageryLayer instanceof i$P?r._imageryLayer._inner:r._imageryLayer,o,i)}}function _0x4a17eb(e,t){if(!e)return 0;for(var i=0,n=0,r=e._childrenPageLod.length;n<r;n++){var o=e._childrenPageLod[n],a=_0x143942(o,t);o._oriBoundingSphere||(o._oriBoundingSphere=o._boundingSphere.clone()),o._boundingSphere.radius=o._oriBoundingSphere.radius+a,i+=a=Math.max(a,_0x4a17eb(o._entity,t))}return i}function _0x143942(e,t){for(var i=0,n=0;n<e._renderEntityList.length;n++)if(e$2e(e._renderEntityList[n])){var r=e._renderEntityList[n];i=Math.max(r._radiusToExpand(t),i)}return i}function _0x4f2327(e,t){var i=t.positionCartographic.height;return(i=i<0?0:i)<=e._maxVisibleAltitude&&i>=e._minVisibleAltitude}function _0x4ba37f(e,t,i){var n=o$1p.distance(e._boundingSphere.center,i)-e._boundingSphere.radius;return(n=n<0?0:n)<=t._visibleDistanceMax&&n>=t._visibleDistanceMin}function _0x45183e(e,t){var i=t.positionCartographic.height;return(i=i<0?0:i)<=e._maxVisibleAltitude&&i>=e._minVisibleAltitude}function _0x555b86(e,t,i){const n=t._maximumScreenSpaceError;var r,o=t._context,a=e._boundingSphere,s=e._orientedBoundingBox,l=1;if(t._fileType===p$T.ClampGroundRealtimeRasterCache){var u=a.center,c=a.radius,h=o$1p.fromRadians(e$2d.toRadians(u.x),e$2d.toRadians(u.y),u.z),d=o$1p.fromRadians(e$2d.toRadians(u.x),e$2d.toRadians(u.y-c),u.z),f=o$1p.distance(h,d);r=o$1p.distance(h,i)-f,l=f}else e$2e(a)?(r=o$1p.distance(a.center,i)-a.radius,l=a.radius):r=Math.sqrt(y$Y.distanceSquaredTo(s,i));if(r<0)return!0;var p=pixelsPerMeter(o,r)*l;e._disFromCamera=r;var _=t._translucencyByDistance?t._visibleDistanceMax+2e3:t._visibleDistanceMax;return r>=t._visibleDistanceMin&&r<=_&&p>n}_0x408010.prototype._scheduleSkip=function(e){var t=this._layer;this._selectEntities.length=0,this._renderQueue.length=0,this._replacementList.splice(this._replacementList.tail,this._replacementSentinel);var i,n,r,o=[],a=[];for(i=0,n=this._rootEntities.length;i<n;i++){var s=this._rootEntities[i];if(_0x443088(e,t,s),t.residentRootTile||_0x453b8c(s)){if(!s._configReady){this.loadConfig(s);continue}o.push(s),a.push(s)}}for(a.sort(_0x17e86b),o.sort(_0x933fa2);r=o.pop();){_0xfdd3f2(r);var l=!0;_0x1de79c(r)&&(l=_0x2fe368(e,this,o,r)),r._isLeafTile&&_0x443088(e,t,r),(l||r._needLoad||t.residentRootTile&&r._isRootTile)&&(_0x212b5d(e,this,r),_0x414a3b(e,this,r)),_0x3eb61f(this,r)}for(i=0,n=a.length;i<n;i++){for(var u=a[i],c=0,h=u._childrenPageLod.length;c<h;c++){_0x519f69(this,e,u._childrenPageLod[c])}for(var d=0,f=u._leafChildren.length;d<f;d++){_0x519f69(this,e,u._leafChildren[d])}}this.freeResource(e);var p=this._requestEntities.length;for(i=0;i<p;i++)this._requestEntities[i].entity.updatePriority(t),e.requests.push(this._requestEntities[i]);this._requestEntities.length=0},_0x408010.prototype._processPackRequests=function(){var e=this._packRequestEntities,t=e.length;if(!(t<1)){e.sort(_0x933fa2);for(var i=0;i<t;i++){_0x165f50(this,e[i])}this._packRequestEntities.length=0}},_0x408010.prototype._processParsingEntities=function(){var e=this._parsingEntities,t=e.length;if(!(t<1)){e.sort(_0x933fa2);for(var i=this._layer,n=i._isS3MB?_0x1393e5.binaryDataParser:_0x46f77a.binaryDataParser,r=0;r<t;r++){var o=e[r];n(i,o,o.s3mBuffer,o.volBuffer)}this._parsingEntities.length=0}},_0x408010.prototype._schedule=function(e){this._renderQueue.length=0;var t=e.camera,i=t.positionWC,n=e.cullingVolume,r=this._layer,o=this._context,a=_0x4f2327(r,t),s=[],l=e.requests;const u=[],c=e.processingTiles,h=e.replacementList;var d=this;if(!a)return void(r._fileType===p$T.ClampGroundRealtimeRasterCache&&this.refreshRaster(e));var f=0,p=[];const _=i$X.MASK_INDETERMINATE,m=r._fileType===p$T.ClampGroundRealtimeRasterCache,g=e$2e(r.themeStyle)&&e$2e(r.queryFieldNames);for(var x=0,y=this._rootEntities.length;x<y;x++){if((T=this._rootEntities[x])._rootName=T._fileName,T._blockKey=T._fileName,!_0x555b86(T,r,i)){_0x397cfd(this,T);continue}const e=T.boundingVolume;(T._visibilityPlaneMask=n.computeVisibilityWithPlaneMask(e,_),T.isVisible=T.isFlatten||T.hasTranslate||T._visibilityPlaneMask!==i$X.MASK_OUTSIDE||m,T.isVisible)?(e$2e(r._queryFieldNames)&&T.attrLoadState!=N$Q.LOADED&&T.attrLoadState!=N$Q.LOADING&&(!0===d._indexedDBSetting.isAttributesSave?d._attributes.status.promise.then((function(){T.attrLoadState!=N$Q.LOADED&&T.attrLoadState!=N$Q.LOADING&&_0x1ec436(T,d)})):p.push(T)),T.attrLoadState===N$Q.LOADED&&f++,g&&T.attrLoadState!==N$Q.LOADED?T.isVisible=!1:(_0x635350(r,h,T),T._s3mLoadState!==N$Q.PARSED?T._ready?(s.push(T),_0x5edf26(this,T),_0x1054cd(this,T)):(l.push({entity:T,priority:T._disFromCamera,owner:this}),_0x397cfd(this,T)):c.push(T))):_0x397cfd(this,T)}f===y&&!this._attrloaded&&(this._attrloaded=!0,r.attributeDownloaded.raiseEvent(r.name+" attribute downloaded."));for(var v;v=s.pop();){_0x635350(r,h,v);const i=v._visibilityPlaneMask;for(let a=0,d=v._childrenPageLod.length;a<d;a++){const d=v._childrenPageLod[a];if(_0x3e9a4b(t,r,d),d._isLeafNode){e$2e(r._imageryLayer)&&_0x3e93d8(d,this,e,v),u.push(d);continue}if(d.calcPixFromCam(t,o,r._lodRangeScale,r._adjustedLodRangeScale,this._nLoadingPriority),this._prepareLoaded||(d._isLessLodDis&&e$2e(d._entity)&&(d._entity._prepareLoad=!0),d._isLessLodDis=!1),d._isLessLodDis){u.push(d);continue}if(!e$2e(d._entity)){var $=_0x4555bd(v,d,a);$._parentPagelod=d,_0xa25db0(r,$),this._currentMaxLevel=Math.max(this._currentMaxLevel,$._nLODLev),d._entity=$,u.push(d),_0x635350(r,h,$);continue}const f=d._entity,p=f.boundingVolume;if(f._visibilityPlaneMask=n.computeVisibilityWithPlaneMask(p,i),f.isVisible=f.isFlatten||f.hasTranslate||f._visibilityPlaneMask!==i$X.MASK_OUTSIDE,this._beginToLoadLeaf=!0,this._prepareLoaded||(f.isVisible||(d._entity._prepareLoad=!0),f.isVisible=!0),f.isVisible){if(_0x635350(r,h,f),f._s3mLoadState===N$Q.PARSED){c.push(f),u.push(d);continue}if(f._s3mLoadState===N$Q.TRANSFORMED){r._nProcessType===_0x549321.Add&&u.push(d),s.push(f);continue}_0x509541(v,d),u.push(d),l.push({entity:f,priority:f._disFromCamera,owner:this})}}}let b=[];for(let e=0,t=u.length;e<t;e++){const t=u[e];b=b.concat(t._renderEntityList)}if(this._renderQueue=b,!this._indexedDBSetting.isAttributesSave){for(p.sort(_0x933fa2),x=0;x<p.length;x++)p[x].attrLoadState===N$Q.UNLOAD&&_0x1ec436(p[x],this,!1);if(this._beginToLoadLeaf&&r.hasAttributeIndex)for(x=0,y=this._rootEntities.length;x<y;x++){var T;((T=this._rootEntities[x]).leafAttrLoadState===N$Q.UNLOAD||T.leafAttrLoadState===N$Q.FAILED)&&_0x1ec436(T,this,!0)}}if(r._showLabel||r._showIcon){const e=[];for(let t=0,i=b.length;t<i;t++){const i=b[t];for(let t in i._labelIndexs)i._labelIndexs.hasOwnProperty(t)&&e.push(t)}r._showLabel&&this._layer._labelCollection.setVisibleLabels(e),r._showIcon&&this._layer._iconCollection.setVisibleLabels(e)}this._packingRequest&&(this._processPackRequests(),this._processParsingEntities())},_0x408010.prototype.loadImagery=function(e,t){if(!this._stopLoadImagery){for(var i=0,n=[],r=0,o=this._rootEntities.length;r<o;r++){var a=this._rootEntities[r];n.push(a)}for(var s;s=n.pop();){if((i+=s.loadImagery(e,t))>10)return;for(r=0,o=s._childrenPageLod.length;r<o;r++){var l=s._childrenPageLod[r];e$2e(l._entity)&&(l._entity.loadImagery(e,t),n.push(l._entity))}}}},_0x408010.prototype._getCameraChanged=function(e){var t=!o$1p.equals(this._cameraPos,e.positionWC)||!o$1p.equals(this._cameraDir,e.directionWC)||!o$1p.equals(this._cameraUp,e.upWC);(this._cameraPos=o$1p.clone(e.position,this._cameraPos),this._cameraDir=o$1p.clone(e.direction,this._cameraDir),this._cameraUp=o$1p.clone(e.up,this._cameraUp),t)?e._clockStart=(new Date).getTime():(new Date).getTime()-e._clockStart<200&&(t=!0);return t},_0x408010.prototype.refresh=function(){this._renderQueue.length=0;for(var e=0,t=this._rootEntities.length;e<t;e++){for(var i=this._rootEntities[e],n=0;n<i._childrenPageLod.length;n++){var r=i._childrenPageLod[n];r=r&&!r.isDestroyed()&&r.destroy()}i._childrenPageLod.length=0,i.attributeBuffer=i.attributeBuffer&&!i.attributeBuffer.isDestroyed()&&i.attributeBuffer.destroy(),i._ready=!1,i._s3mLoadState=N$Q.UNLOAD}},_0x408010.prototype.refreshPrepareLoad=function(){for(var e=[],t=0,i=this._rootEntities.length;t<i;t++){var n=this._rootEntities[t];n._ready&&e.push(n)}for(var r;r=e.pop();)if(r._prepareLoad){for(var o=0;o<r._childrenPageLod.length;o++){var a=r._childrenPageLod[o];a=a&&!a.isDestroyed()&&a.destroy()}r._childrenPageLod.length=0,r.attributeBuffer=r.attributeBuffer&&!r.attributeBuffer.isDestroyed()&&r.attributeBuffer.destroy(),r._ready=!1,r._s3mLoadState=N$Q.UNLOAD}else for(t=0,i=r._childrenPageLod.length;t<i;t++){var s=r._childrenPageLod[t];r._isLeafTile||s._entity&&e.push(s._entity)}},_0x408010.prototype.getRenderQueueSize=function(){return this._renderQueue.length},_0x408010.prototype._updateSceneMode=function(e){if(e._mode!==this._sceneMode){var t=this._layer,i=new p$1d;p$1d.inverse(t._matModel,i),this._sceneMode=e._mode,this._projection=e._projection,t.refresh();for(var n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];!e$2e(o)||!e$2e(o._boundingSphere)||(i$1d.transform(o._boundingSphere,i,o._boundingSphere),i$1d.transform(o._boundingSphere,t._matModel,o._boundingSphere),e$2e(o._orientedBoundingBox)&&(p$1d.multiplyByPoint(i,o._orientedBoundingBox.center,o._orientedBoundingBox.center),p$1d.multiplyByPoint(t._matModel,o._orientedBoundingBox.center,o._orientedBoundingBox.center)))}}},_0x408010.prototype.traverseRenderEntity=function(e,t){for(var i=[],n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];i.push(o)}for(var a;a=i.pop();)for(n=0,r=a._childrenPageLod.length;n<r;n++){for(var s=a._childrenPageLod[n],l=0;l<s._renderEntityList.length;l++)!e$2e(s._renderEntityList[l])||(e.entity=a,t(s._renderEntityList[l],e));s._entity&&i.push(s._entity)}},_0x408010.prototype.traverseRenderEntityRecursionForObjsTranslate=function(){if(!(Object.keys(this._layer._objsOffsetList).length<1))for(var e=0,t=this._rootEntities.length;e<t;e++){var i=this._rootEntities[e];if(i._ready){var n=_0x4a17eb(i,this._layer._objsOffsetList);i._oriBoundingSphere||(i._oriBoundingSphere=i._boundingSphere.clone()),i._boundingSphere.radius=i._oriBoundingSphere.radius+n}}},_0x408010.prototype.refreshRasterById=function(e,t){for(var i=[],n=0,r=this._rootEntities.length;n<r;n++){var o=this._rootEntities[n];o._ready&&i.push(o)}for(var a;a=i.pop();)for(n=0,r=a._childrenPageLod.length;n<r;n++){for(var s=a._childrenPageLod[n],l=0;l<s._renderEntityList.length;l++)if(e$2e(s._renderEntityList[l])){var u=s._renderEntityList[l]._selectionInforMap;if(e$2e(u))for(var c in u._hash){if(parseInt(c)===parseInt(e)){s._renderEntityList[l].refreshRaster(t,!0);break}}}a._isLeafTile||s._entity&&i.push(s._entity)}},_0x408010.prototype.refreshRaster=function(e){for(var t=[],i=0,n=this._rootEntities.length;i<n;i++){var r=this._rootEntities[i];r._ready&&t.push(r)}for(var o;o=t.pop();)for(i=0,n=o._childrenPageLod.length;i<n;i++){for(var a=o._childrenPageLod[i],s=0;s<a._renderEntityList.length;s++)!e$2e(a._renderEntityList[s])||a._renderEntityList[s].refreshRaster(e,!0);o._isLeafTile||a._entity&&t.push(a._entity)}},_0x408010.prototype._getMemoryUsageInBytes=function(){for(var e=0,t=this._replacementList.head;e$2e(t)&&(e$2e(t.item)||e$2e(t.next));){var i=t.item;e$2e(i)&&(e+=i.memoryUsage()),t=t.next}return e},_0x408010.prototype._getCacheMemoryUsageInBytes=function(){for(var e=0,t=this._replacementList.head;t!==this._replacementSentinel;){var i=t.item;e$2e(i)&&(e+=i.memoryUsage()),t=t.next}return e},_0x408010.prototype.freeResource=function(e){for(var t=this._getCacheMemoryUsageInBytes(),i=1024*ti$4.getCacheSize()*1024,n=this._replacementList.head;e$2e(n)&&n!==this._replacementSentinel&&(this._layer._clearMemoryImmediately||t>i);){var r=n.item;if(n=n.next,e$2e(r)&&(this._replacementList.remove(r._replacementNode),r._replacementNode=null,!r._isRootTile||!this._layer.residentRootTile)){var o={geoSize:0,texSize:0},a=r.memoryUsageEx(o);ti$4._memGeometryRemoved(o.geoSize),r.freeResource(e),t-=a}}},_0x408010.prototype.isDestroyed=function(){return!1},_0x408010.prototype.destroy=function(){this._renderQueue.length=0,this._replacementList.splice(this._replacementList.tail,this._replacementSentinel);var e=this._layer,t=void 0;e._fileType===p$T.ClampGroundRealtimeRasterCache&&(t=e._frameState);for(var i=this._replacementList.head;i!==this._replacementSentinel;){var n=i.item,r={geoSize:0,texSize:0};n.memoryUsageEx(r),ti$4._memGeometryRemoved(r.geoSize),i=i.next,this._replacementList.remove(n._replacementNode),n.destroy(t)}return i$11(this)};var _0x188a6c=(_0x340ddf=!0,function(e,t){var i=_0x340ddf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x340ddf=!1,i}),_0x469949=_0x188a6c(void 0,(function(){return _0x469949.toString().search("(((.+)+)+)+$").toString().constructor(_0x469949).search("(((.+)+)+)+$")})),_0x340ddf;_0x469949();var _0x57c608="attribute vec4 position;\nuniform vec4 uRect;\nuniform vec4 uSingleRegion;\nvarying float fHeight;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n vec4 vPos = position;\n vec2 vBounds = uRect.zw - uRect.xy;\n vTexCoord = (vPos.xy - uSingleRegion.xy) / (uSingleRegion.zw - uSingleRegion.xy);\n vPos.xy = (vPos.xy - uRect.xy) / vBounds.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos.xy, 0.5, 1.0);\n fHeight = vPos.z;\n}",k$M=Math.cos,z$M=Math.sin,H$R=Math.sqrt,j$O={computePosition:function(e,t,i,n,r,o,a){var s=t.radiiSquared,l=e.nwCorner,u=e.boundingRectangle,c=l.latitude-e.granYCos*n+r*e.granXSin,h=k$M(c),d=z$M(c),f=s.z*d,p=l.longitude+n*e.granYSin+r*e.granXCos,_=h*k$M(p),m=h*z$M(p),g=s.x*_,x=s.y*m,y=H$R(g*_+x*m+f*d);if(o.x=g/y,o.y=x/y,o.z=f/y,i){var v=e.stNwCorner;e$2e(v)?(c=v.latitude-e.stGranYCos*n+r*e.stGranXSin,p=v.longitude+n*e.stGranYSin+r*e.stGranXCos,a.x=(p-e.stWest)*e.lonScalar,a.y=(c-e.stSouth)*e.latScalar):(a.x=(p-u.west)*e.lonScalar,a.y=(c-u.south)*e.latScalar)}}},J$I=new f$15,h$O=new o$1p,K$J=new a$18,E$R=new o$1p,q$S=new n$1d;function Z$L(e,t,i,n,r,o,a){var s=Math.cos(t),l=n*s,u=i*s,c=Math.sin(t),h=n*c,d=i*c;h$O=q$S.project(e,h$O),h$O=o$1p.subtract(h$O,E$R,h$O);var f=f$15.fromRotation(t,J$I);h$O=f$15.multiplyByVector(f,h$O,h$O),h$O=o$1p.add(h$O,E$R,h$O),o-=1,a-=1;var p=(e=q$S.unproject(h$O,e)).latitude,_=p+o*d,m=p-l*a,g=p-l*a+o*d,x=Math.max(p,_,m,g),y=Math.min(p,_,m,g),v=e.longitude,$=v+o*u,b=v+a*h,T=v+a*h+o*u;return{north:x,south:y,east:Math.max(v,$,b,T),west:Math.min(v,$,b,T),granYCos:l,granYSin:h,granXCos:u,granXSin:d,nwCorner:e}}j$O.computeOptions=function(e,t,i,n,r,o,a){var s=e.east,l=e.west,u=e.north,c=e.south,h=!1,d=!1;u===e$2d.PI_OVER_TWO&&(h=!0),c===-e$2d.PI_OVER_TWO&&(d=!0);var f,p,_,m,g,x=u-c;_=(g=l>s?e$2d.TWO_PI-l+s:s-l)/((f=Math.ceil(g/t)+1)-1),m=x/((p=Math.ceil(x/t)+1)-1);var y=h$18.northwest(e,o),v=h$18.center(e,K$J);(0!==i||0!==n)&&(v.longitude<y.longitude&&(v.longitude+=e$2d.TWO_PI),E$R=q$S.project(v,E$R));var $=m,b=_,T=h$18.clone(e,r),C={granYCos:$,granYSin:0,granXCos:b,granXSin:0,nwCorner:y,boundingRectangle:T,width:f,height:p,northCap:h,southCap:d};if(0!==i){var S=Z$L(y,i,_,m,v,f,p);if(u=S.north,c=S.south,s=S.east,l=S.west,u<-e$2d.PI_OVER_TWO||u>e$2d.PI_OVER_TWO||c<-e$2d.PI_OVER_TWO||c>e$2d.PI_OVER_TWO)throw new t$15("Rotated rectangle is invalid. It crosses over either the north or south pole.");C.granYCos=S.granYCos,C.granYSin=S.granYSin,C.granXCos=S.granXCos,C.granXSin=S.granXSin,T.north=u,T.south=c,T.east=s,T.west=l}if(0!==n){i-=n;var w=h$18.northwest(T,a),E=Z$L(w,i,_,m,v,f,p);C.stGranYCos=E.granYCos,C.stGranXCos=E.granXCos,C.stGranYSin=E.granYSin,C.stGranXSin=E.granXSin,C.stNwCorner=w,C.stWest=E.west,C.stSouth=E.south}return C};var Lt$5=new o$1p,Bt$8=new o$1p,Yt$4=new o$1p,qt$6=new o$1p,Xt$3=new h$18,ne$y=new o$1o,ie$x=new i$1d,oe$q=new i$1d;function Wt$7(e,t){var i=new I$1p({attributes:new a$_,primitiveType:W$18.TRIANGLES});return i.attributes.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(i.attributes.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(i.attributes.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(i.attributes.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:t.bitangents})),i}function ue$u(e,t,i,n){var r=e.length,o=t.normal?new Float32Array(r):void 0,a=t.tangent?new Float32Array(r):void 0,s=t.bitangent?new Float32Array(r):void 0,l=0,u=qt$6,c=Yt$4,h=Bt$8;if(t.normal||t.tangent||t.bitangent)for(var d=0;d<r;d+=3){var f=o$1p.fromArray(e,d,Lt$5),p=l+1,_=l+2;h=i.geodeticSurfaceNormal(f,h),(t.tangent||t.bitangent)&&(o$1p.cross(o$1p.UNIT_Z,h,c),p$1e.multiplyByVector(n,c,c),o$1p.normalize(c,c),t.bitangent&&o$1p.normalize(o$1p.cross(h,c,u),u)),t.normal&&(o[l]=h.x,o[p]=h.y,o[_]=h.z),t.tangent&&(a[l]=c.x,a[p]=c.y,a[_]=c.z),t.bitangent&&(s[l]=u.x,s[p]=u.y,s[_]=u.z),l+=3}return Wt$7(t,{positions:e,normals:o,tangents:a,bitangents:s})}var Tt$7=new o$1p,jt$4=new o$1p;function se$s(e,t,i){var n=e.length,r=t.normal?new Float32Array(n):void 0,o=t.tangent?new Float32Array(n):void 0,a=t.bitangent?new Float32Array(n):void 0,s=0,l=0,u=0,c=!0,h=qt$6,d=Yt$4,f=Bt$8;if(t.normal||t.tangent||t.bitangent)for(var p=0;p<n;p+=6){var _=o$1p.fromArray(e,p,Lt$5),m=o$1p.fromArray(e,(p+6)%n,Tt$7);if(c){var g=o$1p.fromArray(e,(p+3)%n,jt$4);o$1p.subtract(m,_,m),o$1p.subtract(g,_,g),f=o$1p.normalize(o$1p.cross(g,m,f),f),c=!1}o$1p.equalsEpsilon(m,_,e$2d.EPSILON10)&&(c=!0),(t.tangent||t.bitangent)&&(h=i.geodeticSurfaceNormal(_,h),t.tangent&&(d=o$1p.normalize(o$1p.cross(h,f,d),d))),t.normal&&(r[s++]=f.x,r[s++]=f.y,r[s++]=f.z,r[s++]=f.x,r[s++]=f.y,r[s++]=f.z),t.tangent&&(o[l++]=d.x,o[l++]=d.y,o[l++]=d.z,o[l++]=d.x,o[l++]=d.y,o[l++]=d.z),t.bitangent&&(a[u++]=h.x,a[u++]=h.y,a[u++]=h.z,a[u++]=h.x,a[u++]=h.y,a[u++]=h.z)}return Wt$7(t,{positions:e,normals:r,tangents:o,bitangents:a})}function Jt$4(e,t){var i=e._vertexFormat,n=e._ellipsoid,r=t.height,o=t.width,a=t.northCap,s=t.southCap,l=0,u=r,c=r,h=0;a&&(l=1,c-=1,h+=1),s&&(u-=1,c-=1,h+=1),h+=o*c;for(var d=i.position?new Float64Array(3*h):void 0,f=i.st?new Float32Array(2*h):void 0,p=0,_=0,m=Lt$5,g=ne$y,x=Number.MAX_VALUE,y=Number.MAX_VALUE,v=-Number.MAX_VALUE,$=-Number.MAX_VALUE,b=l;b<u;++b)for(var T=0;T<o;++T)j$O.computePosition(t,n,i.st,b,T,m,g),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(f[_++]=g.x,f[_++]=g.y,x=Math.min(x,g.x),y=Math.min(y,g.y),v=Math.max(v,g.x),$=Math.max($,g.y));if(a&&(j$O.computePosition(t,n,i.st,0,0,m,g),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(f[_++]=g.x,f[_++]=g.y,x=g.x,y=g.y,v=g.x,$=g.y)),s&&(j$O.computePosition(t,n,i.st,r-1,0,m,g),d[p++]=m.x,d[p++]=m.y,d[p]=m.z,i.st&&(f[_++]=g.x,f[_]=g.y,x=Math.min(x,g.x),y=Math.min(y,g.y),v=Math.max(v,g.x),$=Math.max($,g.y))),i.st&&(x<0||y<0||v>1||$>1))for(var C=0;C<f.length;C+=2)f[C]=(f[C]-x)/(v-x),f[C+1]=(f[C+1]-y)/($-y);var S=ue$u(d,i,n,t.tangentRotationMatrix),w=6*(o-1)*(c-1);a&&(w+=3*(o-1)),s&&(w+=3*(o-1));var E,P=ce$z.createTypedArray(h,w),A=0,L=0;for(E=0;E<c-1;++E){for(var M=0;M<o-1;++M){var R=A,O=R+o,D=O+1,I=R+1;P[L++]=R,P[L++]=O,P[L++]=I,P[L++]=I,P[L++]=O,P[L++]=D,++A}++A}if(a||s){var B,F,N=h-1,G=h-1;if(a&&s&&(N=h-2),A=0,a)for(E=0;E<o-1;E++)F=(B=A)+1,P[L++]=N,P[L++]=B,P[L++]=F,++A;if(s)for(A=(c-1)*o,E=0;E<o-1;E++)F=(B=A)+1,P[L++]=B,P[L++]=G,P[L++]=F,++A}return S.indices=P,i.st&&(S.attributes.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:f})),S}function ct$7(e,t,i,n,r){return e[t++]=n[i],e[t++]=n[i+1],e[t++]=n[i+2],e[t++]=r[i],e[t++]=r[i+1],e[t]=r[i+2],e}function ht$7(e,t,i,n){return e[t++]=n[i],e[t++]=n[i+1],e[t++]=n[i],e[t]=n[i+1],e}var Ht$5=new n$13;function fe$s(e,t){var i,n=e._shadowVolume,r=e._offsetAttribute,o=e._vertexFormat,a=e._extrudedHeight,s=e._surfaceHeight,l=e._ellipsoid,u=t.height,c=t.width;if(n){var h=n$13.clone(o,Ht$5);h.normal=!0,e._vertexFormat=h}var d=Jt$4(e,t);n&&(e._vertexFormat=o);var f=A$1f.scaleToGeodeticHeight(d.attributes.position.values,s,l,!1),p=(f=new Float64Array(f)).length,_=2*p,m=new Float64Array(_);m.set(f);var g=A$1f.scaleToGeodeticHeight(d.attributes.position.values,a,l);m.set(g,p),d.attributes.position.values=m;var x,y,v=o.normal?new Float32Array(_):void 0,$=o.tangent?new Float32Array(_):void 0,b=o.bitangent?new Float32Array(_):void 0,T=o.st?new Float32Array(_/3*2):void 0;if(o.normal){for(y=d.attributes.normal.values,v.set(y),i=0;i<p;i++)y[i]=-y[i];v.set(y,p),d.attributes.normal.values=v}if(n){y=d.attributes.normal.values,o.normal||(d.attributes.normal=void 0);var C=new Float32Array(_);for(i=0;i<p;i++)y[i]=-y[i];C.set(y,p),d.attributes.extrudeDirection=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:C})}var S=e$2e(r);if(S){var w=p/3*2,E=new Uint8Array(w);r===_0x39c22a.TOP?E=d$1s(E,1,0,w/2):E=d$1s(E,r===_0x39c22a.NONE?0:1),d.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}if(o.tangent){var P=d.attributes.tangent.values;for($.set(P),i=0;i<p;i++)P[i]=-P[i];$.set(P,p),d.attributes.tangent.values=$}if(o.bitangent){var A=d.attributes.bitangent.values;b.set(A),b.set(A,p),d.attributes.bitangent.values=b}o.st&&(x=d.attributes.st.values,T.set(x),T.set(x,p/3*2),d.attributes.st.values=T);var L=d.indices,M=L.length,R=p/3,O=ce$z.createTypedArray(_/3,2*M);for(O.set(L),i=0;i<M;i+=3)O[i+M]=L[i+2]+R,O[i+1+M]=L[i+1]+R,O[i+2+M]=L[i]+R;d.indices=O;var D=t.northCap,I=t.southCap,B=u,F=2,N=0,G=4,z=4;D&&(F-=1,B-=1,N+=1,G-=2,z-=1),I&&(F-=1,B-=1,N+=1,G-=2,z-=1);var U=2*((N+=F*c+2*B-G)+z),V=new Float64Array(3*U),k=n?new Float32Array(3*U):void 0,W=S?new Uint8Array(U):void 0,H=o.st?new Float32Array(2*U):void 0,q=r===_0x39c22a.TOP;S&&!q&&(W=d$1s(W,r===_0x39c22a.ALL?1:0));var j,X=0,Y=0,Z=0,K=0,Q=c*B;for(i=0;i<Q;i+=c)V=ct$7(V,X,j=3*i,f,g),X+=6,o.st&&(H=ht$7(H,Y,2*i,x),Y+=4),n&&(Z+=3,k[Z++]=y[j],k[Z++]=y[j+1],k[Z++]=y[j+2]),q&&(W[K++]=1,K+=1);if(I){var J=D?Q+1:Q;for(j=3*J,i=0;i<2;i++)V=ct$7(V,X,j,f,g),X+=6,o.st&&(H=ht$7(H,Y,2*J,x),Y+=4),n&&(Z+=3,k[Z++]=y[j],k[Z++]=y[j+1],k[Z++]=y[j+2]),q&&(W[K++]=1,K+=1)}else for(i=Q-c;i<Q;i++)V=ct$7(V,X,j=3*i,f,g),X+=6,o.st&&(H=ht$7(H,Y,2*i,x),Y+=4),n&&(Z+=3,k[Z++]=y[j],k[Z++]=y[j+1],k[Z++]=y[j+2]),q&&(W[K++]=1,K+=1);for(i=Q-1;i>0;i-=c)V=ct$7(V,X,j=3*i,f,g),X+=6,o.st&&(H=ht$7(H,Y,2*i,x),Y+=4),n&&(Z+=3,k[Z++]=y[j],k[Z++]=y[j+1],k[Z++]=y[j+2]),q&&(W[K++]=1,K+=1);if(D){var ee=Q;for(j=3*ee,i=0;i<2;i++)V=ct$7(V,X,j,f,g),X+=6,o.st&&(H=ht$7(H,Y,2*ee,x),Y+=4),n&&(Z+=3,k[Z++]=y[j],k[Z++]=y[j+1],k[Z++]=y[j+2]),q&&(W[K++]=1,K+=1)}else for(i=c-1;i>=0;i--)V=ct$7(V,X,j=3*i,f,g),X+=6,o.st&&(H=ht$7(H,Y,2*i,x),Y+=4),n&&(Z+=3,k[Z++]=y[j],k[Z++]=y[j+1],k[Z++]=y[j+2]),q&&(W[K++]=1,K+=1);var te=se$s(V,o,l);o.st&&(te.attributes.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:H})),n&&(te.attributes.extrudeDirection=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:k})),S&&(te.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:W}));var ie,ne,re,oe,ae=ce$z.createTypedArray(U,6*N);p=V.length/3;var se=0;for(i=0;i<p-1;i+=2){oe=((ie=i)+2)%p;var le=o$1p.fromArray(V,3*ie,Tt$7),ue=o$1p.fromArray(V,3*oe,jt$4);o$1p.equalsEpsilon(le,ue,e$2d.EPSILON10)||(re=((ne=(ie+1)%p)+2)%p,ae[se++]=ie,ae[se++]=ne,ae[se++]=oe,ae[se++]=oe,ae[se++]=ne,ae[se++]=re)}return te.indices=ae,(te=k$14.combineInstances([new d$1o({geometry:d}),new d$1o({geometry:te})]))[0]}var ve$o=[new o$1p,new o$1p,new o$1p,new o$1p],Qt$5=new a$18,le$s=new a$18;function Ot$7(e,t,i,n,r){if(0===i)return h$18.clone(e,r);var o=j$O.computeOptions(e,t,i,0,Xt$3,Qt$5),a=o.height,s=o.width,l=ve$o;return j$O.computePosition(o,n,!1,0,0,l[0]),j$O.computePosition(o,n,!1,0,s-1,l[1]),j$O.computePosition(o,n,!1,a-1,0,l[2]),j$O.computePosition(o,n,!1,a-1,s-1,l[3]),h$18.fromCartesianArray(l,n,r)}function j$N(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).rectangle;if(o$1q.typeOf.object("rectangle",t),h$18.validate(t),t.north<t.south)throw new t$15("options.rectangle.north must be greater than or equal to options.rectangle.south");var i=u$Z(e.height,0),n=u$Z(e.extrudedHeight,i);this._rectangle=h$18.clone(t),this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._surfaceHeight=Math.max(i,n),this._rotation=u$Z(e.rotation,0),this._stRotation=u$Z(e.stRotation,0),this._vertexFormat=n$13.clone(u$Z(e.vertexFormat,n$13.DEFAULT)),this._extrudedHeight=Math.min(i,n),this._shadowVolume=u$Z(e.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}j$N.packedLength=h$18.packedLength+t$12.packedLength+n$13.packedLength+7,j$N.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),h$18.pack(e._rectangle,t,i),i+=h$18.packedLength,t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=u$Z(e._offsetAttribute,-1),t};var Zt$3=new h$18,Kt$5=t$12.clone(t$12.UNIT_SPHERE),tt$d={rectangle:Zt$3,ellipsoid:Kt$5,vertexFormat:Ht$5,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};j$N.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=h$18.unpack(e,t,Zt$3);t+=h$18.packedLength;var r=t$12.unpack(e,t,Kt$5);t+=t$12.packedLength;var o=n$13.unpack(e,t,Ht$5);t+=n$13.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=1===e[t++],d=e[t];return e$2e(i)?(i._rectangle=h$18.clone(n,i._rectangle),i._ellipsoid=t$12.clone(r,i._ellipsoid),i._vertexFormat=n$13.clone(o,i._vertexFormat),i._granularity=a,i._surfaceHeight=s,i._rotation=l,i._stRotation=u,i._extrudedHeight=c,i._shadowVolume=h,i._offsetAttribute=-1===d?void 0:d,i):(tt$d.granularity=a,tt$d.height=s,tt$d.rotation=l,tt$d.stRotation=u,tt$d.extrudedHeight=c,tt$d.shadowVolume=h,tt$d.offsetAttribute=-1===d?void 0:d,new j$N(tt$d))},j$N.computeRectangle=function(e,t){var i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).rectangle;if(o$1q.typeOf.object("rectangle",i),h$18.validate(i),i.north<i.south)throw new t$15("options.rectangle.north must be greater than or equal to options.rectangle.south");var n=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),r=u$Z(e.ellipsoid,t$12.WGS84);return Ot$7(i,n,u$Z(e.rotation,0),r,t)};var ce$p=new p$1e,$t$3=new n$15,he$o=new a$18;j$N.createGeometry=function(e){if(!e$2d.equalsEpsilon(e._rectangle.north,e._rectangle.south,e$2d.EPSILON10)&&!e$2d.equalsEpsilon(e._rectangle.east,e._rectangle.west,e$2d.EPSILON10)){var t=e._rectangle,i=e._ellipsoid,n=e._rotation,r=e._stRotation,o=e._vertexFormat,a=j$O.computeOptions(t,e._granularity,n,r,Xt$3,Qt$5,le$s),s=ce$p;if(0!==r||0!==n){var l=h$18.center(t,he$o),u=i.geodeticSurfaceNormalCartographic(l,Tt$7);n$15.fromAxisAngle(u,-r,$t$3),p$1e.fromQuaternion($t$3,s)}else p$1e.clone(p$1e.IDENTITY,s);var c,h,d=e._surfaceHeight,f=e._extrudedHeight,p=!e$2d.equalsEpsilon(d,f,0,e$2d.EPSILON2);if(a.lonScalar=1/e._rectangle.width,a.latScalar=1/e._rectangle.height,a.tangentRotationMatrix=s,t=e._rectangle,p){c=fe$s(e,a);var _=i$1d.fromRectangle3D(t,i,d,oe$q),m=i$1d.fromRectangle3D(t,i,f,ie$x);h=i$1d.union(_,m)}else{if((c=Jt$4(e,a)).attributes.position.values=A$1f.scaleToGeodeticHeight(c.attributes.position.values,d,i,!1),e$2e(e._offsetAttribute)){var g=c.attributes.position.values.length,x=new Uint8Array(g/3);d$1s(x,e._offsetAttribute===_0x39c22a.NONE?0:1),c.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}h=i$1d.fromRectangle3D(t,i,d)}return o.position||delete c.attributes.position,new I$1p({attributes:c.attributes,indices:c.indices,primitiveType:c.primitiveType,boundingSphere:h,offsetAttribute:e._offsetAttribute})}},j$N.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new j$N({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:r,stRotation:e._stRotation,granularity:n,extrudedHeight:a,height:o,vertexFormat:n$13.POSITION_ONLY,shadowVolume:!0})};var It$8=new h$18,de$q=[new o$1o,new o$1o,new o$1o],me$s=new f$15,ge$n=new a$18;function pe$u(e){if(0===e._stRotation)return[0,0,0,1,1,0];var t=h$18.clone(e._rectangle,It$8),i=e._granularity,n=e._ellipsoid,r=Ot$7(t,i,e._rotation-e._stRotation,n,It$8),o=de$q;o[0].x=r.west,o[0].y=r.south,o[1].x=r.west,o[1].y=r.north,o[2].x=r.east,o[2].y=r.south;for(var a=e.rectangle,s=f$15.fromRotation(e._stRotation,me$s),l=h$18.center(a,ge$n),u=0;u<3;++u){var c=o[u];c.x-=l.longitude,c.y-=l.latitude,f$15.multiplyByVector(s,c,c),c.x+=l.longitude,c.y+=l.latitude,c.x=(c.x-a.west)/a.width,c.y=(c.y-a.south)/a.height}var h=o[0],d=o[1],f=o[2],p=new Array(6);return o$1o.pack(h,p),o$1o.pack(d,p,2),o$1o.pack(f,p,4),p}Object.defineProperties(j$N.prototype,{rectangle:{get:function(){return e$2e(this._rotatedRectangle)||(this._rotatedRectangle=Ot$7(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return e$2e(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=pe$u(this)),this._textureCoordinateRotationPoints}}});var _0x4a1361=(_0x305cad=!0,function(e,t){var i=_0x305cad?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x305cad=!1,i}),_0x9b13db=_0x4a1361(void 0,(function(){return _0x9b13db.toString().search("(((.+)+)+)+$").toString().constructor(_0x9b13db).search("(((.+)+)+)+$")})),_0x305cad;function _0x3c2cd7(e){e=e||{},this._font=u$Z(e.font,"30px sans-serif"),this._fillColor=u$Z(e.fillColor,e$1X.WHITE),this._outlineColor=u$Z(e.outlineColor,e$1X.BLACK),this._outlineWidth=u$Z(e.outlineWidth,1),this._showBackground=u$Z(e.showBackground,!1),this._backgroundColor=u$Z(e.backgroundColor,new e$1X(.165,.165,.165,.8)),this._style=u$Z(e.fillStyle,R$S.FILL),this._pixelOffset=o$1o.clone(u$Z(e.pixelOffset,o$1o.ZERO)),this._scale=u$Z(e.scale,1),this._textField=u$Z(e.textField,"Name"),this._heightReference=u$Z(e.heightReference,k$R.NONE),this._distanceDisplayCondition=e.distanceDisplayCondition,this._textFieldChanged=!1}_0x9b13db(),Object.defineProperties(_0x3c2cd7.prototype,{font:{get:function(){return this._font},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._font!==e&&(this._font=e)}},fillColor:{get:function(){return this._fillColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._fillColor=e}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._outlineColor=e}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e)}},showBackground:{get:function(){return this._showBackground},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._showBackground!==e&&(this._showBackground=e)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._backgroundColor=e}},fillStyle:{get:function(){return this._style},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._style!==e&&(this._style=e)}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._pixelOffset=e}},scale:{get:function(){return this._scale},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._scale!==e&&(this._scale=e)}},textField:{get:function(){return this._textField},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._textField!==e?(this._textField=e,this._textFieldChanged=!0):this._textFieldChanged=!1}},heightReference:{get:function(){return this._heightReference},set:function(e){this._heightReference=e}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=e}}});var _0x5c6037=(_0x2ce1f9=!0,function(e,t){var i=_0x2ce1f9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ce1f9=!1,i}),_0x1c7009=_0x5c6037(void 0,(function(){return _0x1c7009.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c7009).search("(((.+)+)+)+$")})),_0x2ce1f9;_0x1c7009();var _0x13b412={Hide:0,Visible:1,ResetAll:2},_0x70e866=Object.freeze(_0x13b412),_0x17d2a3=(_0x1f6bec=!0,function(e,t){var i=_0x1f6bec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f6bec=!1,i}),_0x5cf334=_0x17d2a3(void 0,(function(){return _0x5cf334.toString().search("(((.+)+)+)+$").toString().constructor(_0x5cf334).search("(((.+)+)+)+$")})),_0x1f6bec;function _0x2226fe(e,t,i){this._id=e,this._type=t,this._pointCounts=i}_0x5cf334(),Object.defineProperties(_0x2226fe.prototype,{id:{get:function(){return this._id},set:function(e){o$1q.defined("PointCloudClassificationInfo id",e),this._id=e}},type:{get:function(){return this._type},set:function(e){o$1q.defined("PointCloudClassificationInfo type",e),this._type=e}},pointCounts:{get:function(){return this._pointCounts},set:function(e){o$1q.defined("PointCloudClassificationInfo pointCounts",e),this._pointCounts=e}}}),_0x2226fe.prototype.isDestroyed=function(){return!1},_0x2226fe.prototype.destroy=function(){return i$11(this)};var _0x141923=(_0x59204f=!0,function(e,t){var i=_0x59204f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59204f=!1,i}),_0x2cd2de=_0x141923(void 0,(function(){return _0x2cd2de.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cd2de).search("(((.+)+)+)+$")})),_0x59204f;_0x2cd2de();var _0x596e07={NONE:0,COLOR:1,MODEL_COLOR:2},_0x1f23e7=Object.freeze(_0x596e07),_0x3526ca=(_0x42d7ca=!0,function(e,t){var i=_0x42d7ca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42d7ca=!1,i}),_0x381168=_0x3526ca(void 0,(function(){return _0x381168.toString().search("(((.+)+)+)+$").toString().constructor(_0x381168).search("(((.+)+)+)+$")})),_0x42d7ca;_0x381168();var _0x104159={NONE:0,STRIP:1,DOT:2,CHECKBOARD:3,GRID:4};function _0x2adae6(){this._rotationAngle=0,this._foreColor=new e$2c(1,1,0,1),this._backColor=new e$2c(1,0,1,1),this._type=_0x104159.DOT,this._lineWidthX=2,this._lineWidthY=2,this._offsetX=0,this._offsetY=0,this._repeatX=20,this._repeatY=20}_0x2adae6.prototype.setValue=function(e,t){"ForeColor"===e&&(this._foreColor=t),"BackColor"===e&&(this._backColor=t),"RegionType"===e&&(this._type=t),"RotationAngle"===e&&(this._rotationAngle=t),"WidthX"===e&&(this._lineWidthX=t),"WidthY"===e&&(this._lineWidthY=t),"OffsetX"===e&&(this._offsetX=t),"OffsetY"===e&&(this._offsetY=t),"RepeatX"===e&&(this._repeatX=t),"RepeatY"===e&&(this._repeatY=t)},_0x2adae6.prototype.getEffectSetting=function(){return[{name:"ForeColor",value:new e$2c(1,1,0,1),description:"Region Fore Color",max:new e$2c(1,1,1,1),min:new e$2c(0,0,0,0),type:e$2c},{name:"BackColor",value:new e$2c(1,0,1,1),description:"Region Back Color",max:new e$2c(1,1,1,1),min:new e$2c(0,0,0,0),type:e$2c},{name:"RegionType",value:_0x104159.DOT,description:"Region Effect Type",max:4,min:0,type:_0x104159},{name:"RotationAngle",value:0,description:"Region RotationAngle",max:0,min:1,type:Number},{name:"WidthX",value:2,description:"Region horizontal Line Width",max:20,min:1,type:Number},{name:"WidthY",value:2,description:"Region vertical Line Width",max:20,min:1,type:Number},{name:"OffsetX",value:0,description:"Region horizontal Offset",max:20,min:0,type:Number},{name:"OffsetY",value:0,description:"Region vertical Offset",max:20,min:0,type:Number},{name:"RepeatX",value:20,description:"Region horizontal Repeat",max:20,min:1,type:Number},{name:"RepeatY",value:20,description:"Region vertical Repeat",max:20,min:1,type:Number}]};var _0x1c7d3f=(_0x3785c4=!0,function(e,t){var i=_0x3785c4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3785c4=!1,i}),_0x5829e4=_0x1c7d3f(void 0,(function(){return _0x5829e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x5829e4).search("(((.+)+)+)+$")})),_0x3785c4;_0x5829e4();var _0x5771a6={NONE:0,DASH:1,OUTLINE:2,GLOW:3};function _0x5175d0(){this._lineWidth=1,this._color=new e$2c(1,1,1,1),this._type=_0x5771a6.NONE,this._outlineColor=new e$2c(0,0,0,1),this._outlineWidth=1,this._gapColor=new e$2c(1,1,1,0),this._dashLength=16,this._dashPattern=255,this._glowPower=.25,this._isArrow=!1,this._isMove=!1,this._frame=0}_0x5175d0.prototype.setValue=function(e,t){"Color"===e&&(this._color=t),"Width"===e&&(this._lineWidth=t),"PolylineType"===e&&(this._type=t),"OutlineColor"===e&&(this._outlineColor=t),"OutlineWidth"===e&&(this._outlineWidth=t),"GapColor"===e&&(this._gapColor=t),"DashLength"===e&&(this._dashLength=t),"DashPattern"===e&&(this._dashPattern=t),"GlowPower"===e&&(this._glowPower=t),"IsArrow"===e&&(this._isArrow=t),"IsMove"===e&&(this._isMove=t)},_0x5175d0.prototype.getEffectSetting=function(){return[{name:"Color",value:new e$2c(1,1,1,1),description:"Polyline Color",max:new e$2c(1,1,1,1),min:new e$2c(0,0,0,0),type:e$2c},{name:"Width",value:5,description:"Polyline Width",max:20,min:1,type:Number},{name:"PolylineType",value:_0x5771a6.DASH,description:"Polyline Type",max:3,min:0,type:_0x5771a6},{name:"OutlineColor",value:new e$2c(0,0,0,1),description:"Polyline Outline Color",max:new e$2c(1,1,1,1),min:new e$2c(0,0,0,0),type:e$2c},{name:"OutlineWidth",value:1,description:"Polyline Outline Width",max:10,min:1,type:Number},{name:"GapColor",value:new e$2c(1,1,1,0),description:"Polyline Gap Color",max:new e$2c(1,1,1,1),min:new e$2c(0,0,0,0),type:e$2c},{name:"DashLength",value:16,description:"Polyline Gap Dash Length",max:64,min:1,type:Number},{name:"DashPattern",value:255,description:"Polyline Gap Dash Pattern",max:65535,min:0,type:Number},{name:"GlowPower",value:.25,description:"Polyline Glow Power",max:1,min:0,type:Number},{name:"IsArrow",value:!1,description:"Polyline Is Have Arrow",max:!0,min:!1,type:Boolean},{name:"IsMove",value:!1,description:"Polyline Is Moving",max:!0,min:!1,type:Boolean}]};var _0x25fadc=(_0x49877c=!0,function(e,t){var i=_0x49877c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49877c=!1,i}),_0x450160=_0x25fadc(void 0,(function(){return _0x450160.toString().search("(((.+)+)+)+$").toString().constructor(_0x450160).search("(((.+)+)+)+$")})),_0x49877c;function _0x3b1e53(){}_0x450160();var _0x571646="Assets/Textures/PBR_Material/",_0x12c529="",_0x1833e9="",_0x885ad5="",_0x343ca9="",_0xa04845="",_0x26383a="";_0x3b1e53.getMaterial=function(e){return e===Xe$e.TITANIUM_SCUFFED?(_0x12c529="titanium_scuffed/Titanium-Scuffed_metallic.png",_0x1833e9="titanium_scuffed/Titanium-Scuffed_roughness.png",_0x885ad5="titanium_scuffed/Titanium-Scuffed_basecolor.png"):e===Xe$e.METAL_PLATE&&(_0x12c529="metal_plate/metal_plate_disp_1k.jpg",_0x1833e9="metal_plate/metal_plate_rough_1k.jpg",_0x885ad5="metal_plate/metal_plate_diff_1k.jpg"),_0x343ca9=n$17(_0x571646+_0x12c529),_0xa04845=n$17(_0x571646+_0x1833e9),_0x26383a=n$17(_0x571646+_0x885ad5),{metalTextureUrl:_0x343ca9,roughTextureUrl:_0xa04845,albedoTextureUrl:_0x26383a}};var _0x275445=(_0x17bd83=!0,function(e,t){var i=_0x17bd83?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17bd83=!1,i}),_0x188c28=_0x275445(void 0,(function(){return _0x188c28.toString().search("(((.+)+)+)+$").toString().constructor(_0x188c28).search("(((.+)+)+)+$")})),_0x17bd83;_0x188c28();var _0x23a343="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthTexture;\nuniform vec3 u_distancesAndEdlStrength;\nvarying vec2 v_textureCoordinates;\n\nvec2 neighborContribution(float log2Depth, vec2 padding)\n{\nfloat depthOrLogDepth = texture2D(u_pointCloud_depthTexture, v_textureCoordinates + padding).r;\nif (depthOrLogDepth == 1.0) {\nreturn vec2(0.0);\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(v_textureCoordinates + padding, depthOrLogDepth);\nreturn vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\nvoid main()\n{\nfloat depthOrLogDepth = texture2D(u_pointCloud_depthTexture, v_textureCoordinates).r;\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat log2Depth = log2(-eyeCoordinate.z);\nif (depthOrLogDepth == 1.0)\n{\ndiscard;\n}\nvec4 color = texture2D(u_pointCloud_colorGBuffer, v_textureCoordinates);\n#ifdef EDL_SHADING\nfloat distX = u_distancesAndEdlStrength.x;\nfloat distY = u_distancesAndEdlStrength.y;\nvec2 responseAndCount = vec2(0.0);\nresponseAndCount += neighborContribution(log2Depth, vec2(0, distY));\nresponseAndCount += neighborContribution(log2Depth, vec2(distX, 0));\nresponseAndCount += neighborContribution(log2Depth, vec2(0, -distY));\nresponseAndCount += neighborContribution(log2Depth, vec2(-distX, 0));\nfloat response = responseAndCount.x / responseAndCount.y;\nfloat shade = exp(-response * 300.0 * u_distancesAndEdlStrength.z);\ncolor.rgb *= shade;\n#endif\ngl_FragColor = vec4(color);\ngl_FragColor.a = 1.0;\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + (czm_projection * vec4(eyeCoordinate.xyz, 1.0)).w);\n#else\ngl_FragDepthEXT = czm_eyeToWindowCoordinates(vec4(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n",_0x29d426=(_0x22379c=!0,function(e,t){var i=_0x22379c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x22379c=!1,i}),_0x54edea=_0x29d426(void 0,(function(){return _0x54edea.toString().search("(((.+)+)+)+$").toString().constructor(_0x54edea).search("(((.+)+)+)+$")})),_0x22379c;_0x54edea();var _0x248cf1="\n#include <SceneUboDecl>\nvar u_pointCloud_colorGBuffer : texture_2d<f32>;\nvar u_pointCloud_colorGBufferSampler : sampler;\n\nvar u_pointCloud_depthTexture : texture_depth_2d;\nvar u_pointCloud_depthTextureSampler : sampler;\n\nuniform u_distancesAndEdlStrength : vec3<f32>;\nvarying v_textureCoordinates : vec2<f32>;\n\nfn windowToEyeCoordinates_v4(fragmentCoordinate : vec4<f32>) -> vec4<f32>\n{\n // Reconstruct NDC coordinates\n var x = 2.0 * (fragmentCoordinate.x - Scene.uViewport.x) / Scene.uViewport.z - 1.0;\n var y = 2.0 * (fragmentCoordinate.y - Scene.uViewport.y) / Scene.uViewport.w - 1.0;\n var z = (fragmentCoordinate.z - uniforms.czm_viewportTransformation[3][2]) / uniforms.czm_viewportTransformation[2][2];\n var q = vec4<f32>(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= fragmentCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n q = Scene.uInverseProjection * q;\n\n return q;\n}\n\n\nfn windowToEyeCoordinates(fragmentCoordinateXY : vec2<f32>, depthOrLogDepth : f32) -> vec4<f32>\n{\n var eyeCoordinate : vec4<f32>;\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#ifdef LOG_DEPTH\n var near = Scene.uCurrentFrustum.x;\n var far = Scene.uCurrentFrustum.y;\n var log2Depth = depthOrLogDepth * Scene.uLog2FarDepthFromNearPlusOne;\n var depthFromNear = pow(2.0, log2Depth) - 1.0;\n var depthFromCamera = depthFromNear + near;\n var windowCoord = vec4<f32>(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n eyeCoordinate = windowToEyeCoordinates_v4(windowCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n#else\n var windowCoord = vec4<f32>(fragmentCoordinateXY, depthOrLogDepth, 1.0);\n eyeCoordinate = windowToEyeCoordinates_v4(windowCoord);\n#endif\n return eyeCoordinate;\n}\n\nfn eyeToWindowCoordinates(positionEC : vec4<f32>) -> vec4<f32>\n{\n var q = Scene.uProjection * positionEC; // clip coordinates\n var qxyz = q.xyz;\n q = vec4<f32>(qxyz / q.w, q.w); // normalized device coordinates\n q = vec4<f32>((uniforms.czm_viewportTransformation * vec4<f32>(q.xyz, 1.0)).xyz, q.w); // window coordinates\n return q;\n}\n\nfn neighborContribution(log2Depth : f32, padding : vec2<f32>) -> vec2<f32>\n{\n var depthOrLogDepth = textureSample(u_pointCloud_depthTexture, u_pointCloud_depthTextureSampler, v_textureCoordinates + padding);\n if (depthOrLogDepth == 1.0) \n {\n return vec2<f32>(0.0);\n }\n var eyeCoordinate = windowToEyeCoordinates(v_textureCoordinates + padding, depthOrLogDepth);\n return vec2<f32>(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var depthOrLogDepth = textureSample(u_pointCloud_depthTexture, u_pointCloud_depthTextureSampler, v_textureCoordinates);\n var eyeCoordinate = windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\n eyeCoordinate /= eyeCoordinate.w;\n var log2Depth = log2(-eyeCoordinate.z);\n if (depthOrLogDepth == 1.0)\n {\n discard;\n }\n var color = textureSample(u_pointCloud_colorGBuffer, u_pointCloud_colorGBufferSampler, v_textureCoordinates);\n#ifdef EDL_SHADING\n var distX = uniforms.u_distancesAndEdlStrength.x;\n var distY = uniforms.u_distancesAndEdlStrength.y;\n var responseAndCount = vec2<f32>(0.0);\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(0, distY));\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(distX, 0));\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(0, -distY));\n responseAndCount += neighborContribution(log2Depth, vec2<f32>(-distX, 0));\n var response = responseAndCount.x / responseAndCount.y;\n var shade = exp(-response * 300.0 * uniforms.u_distancesAndEdlStrength.z);\n color.r *= shade;\n color.g *= shade;\n color.b *= shade;\n#endif\n gl_FragColor = vec4<f32>(color);\n gl_FragColor.a = 1.0;\n#ifdef LOG_DEPTH\n czm_writeLogDepth(1.0 + (Scene.uProjection * vec4<f32>(eyeCoordinate.xyz, 1.0)).w);\n#else\n gl_FragDepth = czm_eyeToWindowCoordinates(vec4<f32>(eyeCoordinate.xyz, 1.0)).z;\n#endif\n}\n",y$M="#define SAMPLES 8\nuniform float delta;\nuniform float sigma;\nuniform float direction;\nuniform sampler2D colorTexture;\n#ifdef USE_STEP_SIZE\nuniform float stepSize;\n#else\nuniform vec2 step;\n#endif\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec2 st = v_textureCoordinates;\nvec2 dir = vec2(1.0 - direction, direction);\n#ifdef USE_STEP_SIZE\nvec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));\n#else\nvec2 step = step;\n#endif\nvec3 g;\ng.x = 1.0 / (sqrt(czm_twoPi) * sigma);\ng.y = exp((-0.5 * delta * delta) / (sigma * sigma));\ng.z = g.y * g.y;\nvec4 result = texture2D(colorTexture, st) * g.x;\nfor (int i = 1; i < SAMPLES; ++i)\n{\ng.xy *= g.yz;\nvec2 offset = float(i) * dir * step;\nresult += texture2D(colorTexture, st - offset) * g.x;\nresult += texture2D(colorTexture, st + offset) * g.x;\n}\ngl_FragColor = result;\n}\n",_0x17cb2c=(_0x599782=!0,function(e,t){var i=_0x599782?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x599782=!1,i}),_0x47686a=_0x17cb2c(void 0,(function(){return _0x47686a.toString().search("(((.+)+)+)+$").toString().constructor(_0x47686a).search("(((.+)+)+)+$")})),_0x599782,_0x23f6b7;function _0x50e2f4(e){return new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:e,magnificationFilter:e})}function _0x460335(){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthTexture=void 0,this._blurXFrameBuffer=void 0,this._blurXTexture=void 0,this._blurYFrameBuffer=void 0,this._blurYTexture=void 0,this._useCount=0}_0x47686a(),_0x460335._useCount=0,_0x460335.addRef=function(){this._useCount++},_0x460335.removeRef=function(){if(this._useCount--,0==this._useCount){var e=_0x23f6b7._framebuffer;if(!e$2e(e))return;_0x23f6b7._colorGBuffer.destroy(),_0x23f6b7._depthTexture.destroy(),e.destroy()}this._useCount=Math.max(0,this._useCount)},_0x460335.setCurrentFrameBuffer=function(e){_0x23f6b7=e},_0x460335.createFrameBuffer=function(e,t){var i=e.drawingBufferWidth*t,n=e.drawingBufferHeight*t,r=new t$U({context:e,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:_0x50e2f4(tt$i.LINEAR)});new t$U({context:e,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:_0x50e2f4(tt$i.NEAREST)});var o=new t$U({context:e,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8,sampler:_0x50e2f4(tt$i.NEAREST)});_0x23f6b7._framebuffer=new t$V({context:e,colorTextures:[r],depthStencilTexture:o,destroyAttachments:!1}),_0x23f6b7._colorGBuffer=r,_0x23f6b7._depthTexture=o,_0x23f6b7._blurXTexture=new t$U({context:e,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:_0x50e2f4(tt$i.LINEAR)}),_0x23f6b7._blurXFrameBuffer=new t$V({context:e,colorTextures:[_0x23f6b7._blurXTexture],destroyAttachments:!1}),_0x23f6b7._blurYTexture=new t$U({context:e,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:_0x50e2f4(tt$i.LINEAR)}),_0x23f6b7._blurYFrameBuffer=new t$V({context:e,colorTextures:[_0x23f6b7._blurYTexture],destroyAttachments:!1})},_0x460335.getColorGBuffer=function(){return _0x23f6b7._colorGBuffer},_0x460335.getDepthTexture=function(){return _0x23f6b7._depthTexture},_0x460335.getFrameBuffer=function(){return _0x23f6b7._framebuffer},_0x460335.getBlurXFrameBuffer=function(){return _0x23f6b7._blurXFrameBuffer},_0x460335.getBlurYFrameBuffer=function(){return _0x23f6b7._blurYFrameBuffer},_0x460335.getBlurXTexture=function(){return _0x23f6b7._blurXTexture},_0x460335.getBlurYTexture=function(){return _0x23f6b7._blurYTexture},_0x460335.destroyFrameBuffer=function(){var e=_0x23f6b7._framebuffer;!e$2e(e)||(_0x23f6b7._colorGBuffer.destroy(),_0x23f6b7._depthTexture.destroy(),e.destroy(),_0x23f6b7._blurXTexture.destroy(),_0x23f6b7._blurYTexture.destroy(),_0x23f6b7._blurXFrameBuffer.destroy(),_0x23f6b7._blurYFrameBuffer.destroy())};var _0x366566=(_0x474513=!0,function(e,t){var i=_0x474513?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x474513=!1,i}),_0x82bc90=_0x366566(void 0,(function(){return _0x82bc90.toString().search("(((.+)+)+)+$").toString().constructor(_0x82bc90).search("(((.+)+)+)+$")})),_0x474513;_0x82bc90();var _0x3a2989=.5;function _0x153701(e){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthTexture=void 0,this._blurXFrameBuffer=void 0,this._blurXTexture=void 0,this._blurYFrameBuffer=void 0,this._blurYTexture=void 0,this._blurXCommand=void 0,this._blurYCommand=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this.edlShading=!1,this._edlShading=!1,this._performance=!1,this._strength=1,this._radius=1,this._passType=Le$q.S3MTiles,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},_0x460335.addRef(),this.textureScale=_0x3a2989}var _0x36ef61=new o$1p,_0x3c2395=new o$1o;function _0x8921e(e,t){_0x3c2395.x=1/e._colorGBuffer.width,_0x3c2395.y=1/e._colorGBuffer.height;var i={delta:function(){return 1},sigma:function(){return 2},stepSize:function(){return 1},direction:function(){return 0},colorTexture:function(){return e._colorGBuffer}},n={delta:function(){return 1},sigma:function(){return 2},stepSize:function(){return 1},direction:function(){return 1},colorTexture:function(){return e._blurXTexture}},r="#define USE_STEP_SIZE\n"+y$M;e._blurXCommand=t.createViewportQuadCommand(r,{shaderProgramName:"blurX",uniformMap:i,pass:e._passType,owner:e}),e._blurXCommand.framebuffer=e._blurXFrameBuffer,e._blurXCommand.renderState=d$1m.fromCache({viewport:_0x19328b}),e._blurYCommand=t.createViewportQuadCommand(r,{shaderProgramName:"blurY",uniformMap:n,pass:e._passType,owner:e}),e._blurYCommand.framebuffer=e._blurYFrameBuffer,e._blurYCommand.renderState=d$1m.fromCache({viewport:_0x19328b});var o={u_pointCloud_colorGBuffer:function(){return e._performance?e._blurYTexture:e._colorGBuffer},u_pointCloud_depthTexture:function(){return e._depthTexture},u_distancesAndEdlStrength:function(){return _0x36ef61.x=e._radius/(t.drawingBufferWidth*_0x3a2989),_0x36ef61.y=e._radius/(t.drawingBufferHeight*_0x3a2989),_0x36ef61.z=e._strength,_0x36ef61}},a=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0}}),s=new s$V({name:"S3MPointCloudEDLFp",sources:[t.webgpu?_0x248cf1:_0x23a343],useWGSL:t.webgpu});e._edlShading&&s.defines.push("EDL_SHADING"),e._drawCommand=t.createViewportQuadCommand(s,{shaderProgramName:"S3MPointCloudEDL",uniformMap:o,renderState:a,pass:e._passType,owner:e,useWGSL:t.webgpu}),e._drawCommand.addUniformBuffer(t.uniformState._sceneUBO),e._clearCommand=new t$W({framebuffer:e._framebuffer,color:new e$1X(0,0,0,0),depth:1,renderState:d$1m.fromCache(),pass:e._passType,owner:e})}function _0x3f9fa3(e,t){var i=t.drawingBufferWidth*_0x3a2989,n=t.drawingBufferHeight*_0x3a2989;_0x19328b.width=i,_0x19328b.height=n;var r=_0x460335.getColorGBuffer(),o=!1,a=e$2e(r)&&(r.width!==i||r.height!==n);(!e$2e(r)||a)&&(_0x460335.destroyFrameBuffer(),_0x460335.createFrameBuffer(t,_0x3a2989));var s=e._edlShading!=e.edlShading;e._edlShading=e.edlShading;var l=e._colorGBuffer;return a=e._screenWidth!==i||e._screenHeight!==n,(!e$2e(l)||a||s)&&(e._colorGBuffer=_0x460335.getColorGBuffer(),e._depthTexture=_0x460335.getDepthTexture(),e._framebuffer=_0x460335.getFrameBuffer(),e._blurXFrameBuffer=_0x460335.getBlurXFrameBuffer(),e._blurYFrameBuffer=_0x460335.getBlurYFrameBuffer(),e._blurXTexture=_0x460335.getBlurXTexture(),e._blurYTexture=_0x460335.getBlurYTexture(),_0x8921e(e,t),o=!0),e._screenWidth=i,e._screenHeight=n,o}function _0xab2b55(e){return e.drawBuffers&&e.fragmentDepth}_0x153701.isSupported=_0xab2b55;var _0x19328b=new f$1a;function _0x3968fe(e,t){var i=e[t.id];if(!e$2e(i)||i.viewport.width!=_0x19328b.width||i.viewport.height!=_0x19328b.height){var n=d$1m.getState(t);n.viewport=_0x19328b,i=d$1m.fromCache(n),e[t.id]=i}return i}_0x153701.prototype.update=function(e,t,i){if(_0xab2b55(e.context)){_0x460335.setCurrentFrameBuffer(e.context._sharedEDL),this._strength=i.eyeDomeLightingStrength,this._radius=i.eyeDomeLightingRadius,this._performance=i.performance,this.edlShading=i.eyeDomeLighting,_0x3a2989=i.performance?.5:1,this.textureScale=_0x3a2989;var n,r=_0x3f9fa3(this,e.context),o=e.commandList,a=o.length;for(n=t;n<a;++n){var s=o[n];if(s.owner._layer._fileType===p$T.PointCloudFile){var l=s.derivedCommands.pointCloudProcessor;(!e$2e(l)||s.dirty||r||l.framebuffer!==this._framebuffer)&&(l=i$$.shallowClone(s),s.derivedCommands.pointCloudProcessor=l,l.framebuffer=this._framebuffer,l.renderState=_0x3968fe(this._renderStateCache,l.renderState),l.castShadows=!1,l.receiveShadows=!1,l._pointCloudEyeDomeLighting=!0),o[n]=l}}var u=this._clearCommand,c=this._drawCommand;i.performance&&(o.push(this._blurXCommand),o.push(this._blurYCommand)),o.push(c),o.push(u)}},_0x153701.prototype.isDestroyed=function(){return!1},_0x153701.prototype.destroy=function(){return _0x460335.removeRef(),i$11(this)};var _0x490c14=(_0x8d87c0=!0,function(e,t){var i=_0x8d87c0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8d87c0=!1,i}),_0x1ac57f=_0x490c14(void 0,(function(){return _0x1ac57f.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ac57f).search("(((.+)+)+)+$")})),_0x8d87c0;_0x1ac57f();var R$M="attribute vec4 aPosition;\n#ifdef HAS_TEXTURECOORD\nattribute vec3 aTexCoord;\n#endif\n#ifdef Volume\n attribute vec3 aRatio;\n varying vec3 vecRotioCoord;\n\tvarying vec2 vecHypTexCoord;\n#endif\n#ifdef GEOCYLINDER\n uniform float uGeometryHeight;\n#endif\nvarying vec2 v_texCoord;\nvarying float v_face;\nvoid main()\n{\n#ifdef HAS_TEXTURECOORD\n v_texCoord = aTexCoord.xy;\n v_face = aTexCoord.z;\n#endif\n#ifdef GEOCYLINDER\n v_texCoord.y = aPosition.z / uGeometryHeight;\n#endif\n#ifdef Volume\nvecRotioCoord = aRatio;\n#endif\n#ifdef USE_RelativeOrigin\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz - czm_relativeOrigin, 1.0);\n#else\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n#endif\n}",_0x5a115b=(_0x1a1d1d=!0,function(e,t){var i=_0x1a1d1d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a1d1d=!1,i}),_0x4eda50=_0x5a115b(void 0,(function(){return _0x4eda50.toString().search("(((.+)+)+)+$").toString().constructor(_0x4eda50).search("(((.+)+)+)+$")})),_0x1a1d1d;_0x4eda50();var _0x2e70eb="uniform sampler2D uClampTexture;\nuniform vec4 uClipPlaneColor;\nuniform float uUseColor;\nvoid main()\n{\nvec2 center = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\nvec4 clampColor = texture2D(uClampTexture, center);\nif(clampColor.r < 0.01 && clampColor.g < 0.01 && clampColor.b < 0.01)\n{\n discard;\n}\ngl_FragColor = mix(clampColor, uClipPlaneColor, uUseColor);\n}",_0x215925=(_0x5d23e8=!0,function(e,t){var i=_0x5d23e8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d23e8=!1,i}),_0x5db693=_0x215925(void 0,(function(){return _0x5db693.toString().search("(((.+)+)+)+$").toString().constructor(_0x5db693).search("(((.+)+)+)+$")})),_0x5d23e8;_0x5db693();var _0x162bd8="void main()\n{\ngl_FragColor = vec4(1.0);\n}",_0x51a843=(_0x315704=!0,function(e,t){var i=_0x315704?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x315704=!1,i}),_0x3a8f07=_0x51a843(void 0,(function(){return _0x3a8f07.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a8f07).search("(((.+)+)+)+$")})),_0x315704;function _0x597498(e){this._layer=e,this._colorCommand=void 0,this._depthCommand=void 0,this._firstPoint=void 0,this._secondPoint=void 0,this._thirdPoint=void 0,this._boundingSphere=new i$1d(new o$1p(0,0,0),6378137),this._matModel=p$1d.IDENTITY,this._attributeLocations={}}_0x3a8f07(),Object.defineProperties(_0x597498.prototype,{}),_0x597498.prototype.initialize=function(e,t){this._initialize||(this.createCommand(e,t),this._initialize=!0)},_0x597498.prototype.update=function(e,t,i){if(this.initialize(e,t),!t.passes.pick&&!t.passes.depth){if(t._fboState.frameBufferType==Qe$c.CLAMP)return void(e$2e(this._depthCommand)&&i.push(this._depthCommand));e$2e(this._colorCommand)&&i.push(this._colorCommand)}};var _0x372e0e=new o$1p;function _0x3b3f51(e){e$2e(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}_0x597498.prototype.createVertices=function(e){var t=S$14.createTypedArray(S$14.FLOAT,9),i=0,n=1e3;return t[i++]=(this._firstPoint.x-e.x)*n,t[i++]=(this._firstPoint.y-e.y)*n,t[i++]=(this._firstPoint.z-e.z)*n,t[i++]=(this._secondPoint.x-e.x)*n,t[i++]=(this._secondPoint.y-e.y)*n,t[i++]=(this._secondPoint.z-e.z)*n,t[i++]=(this._thirdPoint.x-e.x)*n,t[i++]=(this._thirdPoint.y-e.y)*n,t[i++]=(this._thirdPoint.z-e.z)*n,t},_0x597498.prototype.createCommand=function(e,t){_0x3b3f51(this._colorCommand),_0x3b3f51(this._depthCommand);var i=S$14.createTypedArray(S$14.UNSIGNED_SHORT,3);i[0]=0,i[1]=1,i[2]=2,_0x372e0e.x=(this._firstPoint.x+this._secondPoint.x+this._thirdPoint.x)/3,_0x372e0e.y=(this._firstPoint.y+this._secondPoint.y+this._thirdPoint.y)/3,_0x372e0e.z=(this._firstPoint.z+this._secondPoint.z+this._thirdPoint.z)/3;var n=this.createVertices(_0x372e0e),r=t$X.createVertexBuffer({context:e,typedArray:n,usage:A$18.STATIC_DRAW}),o=[];this._attributeLocations.aPosition=0,o.push({name:"aPosition",index:this._attributeLocations.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var a=t$X.createIndexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),s={};p$1d.fromRotationTranslation(p$1e.IDENTITY,_0x372e0e,s),this._matModel=s,this._depthCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matModel,boundingVolume:this._boundingSphere,pass:Le$q.S3MTiles,cull:!1}),this._depthCommand.vertexArray=new c$13({context:e,attributes:o,indexBuffer:a}),this._depthCommand.shaderProgram=r$14.fromCache({name:"ClipPlaneDepth",context:e,vertexShaderSource:R$M,fragmentShaderSource:_0x162bd8,attributeLocations:this._attributeLocations}),this._depthCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!0,colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this.createColorCommand(e,t)},_0x597498.prototype.createColorCommand=function(e,t){var i=i$$.shallowClone(this._depthCommand),n=this._depthCommand.shaderProgram.vertexShaderSource.clone();i.shaderProgram=r$14.fromCache({name:"ClipPlaneColor",context:e,vertexShaderSource:n,fragmentShaderSource:_0x2e70eb,attributeLocations:this._attributeLocations});var r=this;i.uniformMap={uClampTexture:function(){var i=t._framebufferList.clampTexture;return e$2e(i)?i.renderTexture._fb.getColorTexture(0):e.defaultTexture},uClipPlaneColor:function(){return r._layer._clipPlaneColor},uUseColor:function(){var e=r._layer._clipPlaneMode;return e===_0x1f23e7.COLOR?1:(_0x1f23e7.MODEL_COLOR,0)}},i.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!0}),i.pass=Le$q.S3MTiles-1,this._colorCommand=i},_0x597498.prototype.setPoints=function(e,t,i){this._initialize=!1,this._firstPoint=e,this._secondPoint=t,this._thirdPoint=i},_0x597498.prototype.destroy=function(){return _0x3b3f51(this._colorCommand),this._colorCommand=void 0,_0x3b3f51(this._depthCommand),this._depthCommand=void 0,i$11(this)};var _0x4700ba=(_0x31f322=!0,function(e,t){var i=_0x31f322?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31f322=!1,i}),_0x9c4c7a=_0x4700ba(void 0,(function(){return _0x9c4c7a.toString().search("(((.+)+)+)+$").toString().constructor(_0x9c4c7a).search("(((.+)+)+)+$")})),_0x31f322;function _0x37a6f4(e){this._enable=!1,this._speed=100,this._period=0,this._layer=e}_0x9c4c7a(),Object.defineProperties(_0x37a6f4.prototype,{enable:{get:function(){return this._enable},set:function(e){e!=this._enable&&(this._enable=e,this._layer.bloomEnableChange(e))}},speed:{get:function(){return this._speed},set:function(e){this._speed=e}},period:{get:function(){return this._period/1e3},set:function(e){this._period=1e3*e}},maxBloomHeight:{get:function(){if(0==this._period)return Number.MAX_VALUE;var e=performance.now()%this._period;return this._speed*e/1e3}}});var _0x5afab0=(_0x44c4fa=!0,function(e,t){var i=_0x44c4fa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x44c4fa=!1,i}),_0x3ddfa3=_0x5afab0(void 0,(function(){return _0x3ddfa3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ddfa3).search("(((.+)+)+)+$")})),_0x44c4fa;function _0x24cbe4(){this._cache={},this._queue=new r$17}_0x3ddfa3();var _0x37c9e4=0,_0x3ffe9d=104857600;_0x24cbe4.prototype.set=function(e,t,i){var n=e+"_"+t;if(!e$2e(this._cache[n])){var r={id:n,buffer:i};for(this._cache[n]=r,this._queue.enqueue(n),_0x37c9e4+=i.byteLength;_0x37c9e4>_0x3ffe9d;){var o=this._queue.dequeue(),a=this._cache[o];_0x37c9e4-=a.buffer.byteLength,delete this._cache[o]}}},_0x24cbe4.prototype.get=function(e,t){var i=e+"_"+t,n=this._cache[i];if(e$2e(n))return n.buffer},_0x24cbe4.prototype.contains=function(e,t){var i=e+"_"+t;return e$2e(this._cache[i])},_0x24cbe4._singleInstance=void 0,_0x24cbe4.getSingleInstance=function(){return e$2e(_0x24cbe4._singleInstance)||(_0x24cbe4._singleInstance=new _0x24cbe4),_0x24cbe4._singleInstance};var e$1b={KeepOutside:1,KeepInside:2},R$L=Object.freeze(e$1b),_0x153f6b=(_0x4776fe=!0,function(e,t){var i=_0x4776fe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4776fe=!1,i}),_0x25401f=_0x153f6b(void 0,(function(){return _0x25401f.toString().search("(((.+)+)+)+$").toString().constructor(_0x25401f).search("(((.+)+)+)+$")})),_0x4776fe;_0x25401f();var Z$K="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nattribute vec2 aTexCoord1;\nvarying float vHeight;\nvarying float regionHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vHeight = aPosition.w;\n vTexCoord0 = aTexCoord0.xy;\n vTexCoord1 = aTexCoord1;\n regionHeight = aTexCoord0.z;\n gl_Position = pos;\n v_positionMC = vec4(aPosition.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\n}",_0x1dec54=(_0x23333c=!0,function(e,t){var i=_0x23333c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x23333c=!1,i}),_0x541741=_0x1dec54(void 0,(function(){return _0x541741.toString().search("(((.+)+)+)+$").toString().constructor(_0x541741).search("(((.+)+)+)+$")})),_0x23333c;_0x541741();var $$M="uniform sampler2D uColorTexture;\nuniform sampler2D uRasterTexture;\n#ifdef IsExtract\nuniform float uExtractHeight;\n#endif\nvarying float vHeight;\nvarying vec2 vTexCoord0;\nvarying vec2 vTexCoord1;\nvarying float regionHeight;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uRasterTexture, vTexCoord0));\n if(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n }\n if (vHeight > terrainHeight || vHeight < regionHeight) { \n discard;\n }\n#ifdef IsExtract\n if (vHeight < uExtractHeight) { \n discard;\n }\n#endif\n vec4 baseColorWithAlpha = texture2D(uColorTexture, vTexCoord1);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(vTexCoord1.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(vTexCoord1.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, vTexCoord1.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n if(gl_FrontFacing)\n {\n n = -n;\n }\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}";function t$E(e){if(this._renderTexture=new s$M(e),this._context=e,this._isUpdate=!0,this._beginFunc=void 0,this._endFunc=void 0,this._useColor=!0,this._useHeight=!0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!1,isUnderGlobeVisible:!1,isOnlyS3MObjectVisible:!1},!e.webgpu){var t=e._gl,i=e$2e(e._currentFramebuffer)?e._currentFramebuffer._inner._framebuffer:null;e.webgpu||t.bindFramebuffer(t.FRAMEBUFFER,i)}}Object.defineProperties(t$E.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},useType:{get:function(){return this._useHeight<<2|this._useColor<<1|this._isDepth},set:function(e){this._useHeight=(4&e)>0?1:0,this._useColor=(2&e)>0?1:0,this._isDepth=1&e}},frameBufferType:{get:function(){return Qe$c.RASTER}}}),t$E.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._beginFunc&&this._beginFunc(e),this._renderTexture._passState},t$E.prototype.end=function(e){this._endFunc&&this._endFunc(e)},t$E.prototype.update=function(e,t){},t$E.prototype.isDestroyed=function(){return!1},t$E.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)};var e$1a={NONE:0,BITS12:1},ye$j=Object.freeze(e$1a),e$19={NONE:-1,PARTIAL:0,FULL:1},fe$r=Object.freeze(e$19),e$18={DisplayMode:{NONE:0,FACE:1,ARROW:2,FACE_AND_ARROW:3}},_0x25bb47=Object.freeze(e$18),e$17={NONE:0,LERC:1},T$N=Object.freeze(e$17);function s$H(e,t){o$1q.typeOf.object("ellipsoid",e),this._ellipsoid=e,this._cameraPosition=new o$1p,this._cameraPositionInScaledSpace=new o$1p,this._distanceToLimbInScaledSpaceSquared=0,e$2e(t)&&(this.cameraPosition=t)}Object.defineProperties(s$H.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){var t=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=o$1p.magnitudeSquared(t)-1;o$1p.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=t,this._distanceToLimbInScaledSpaceSquared=i}}});var _$I=new o$1p;s$H.prototype.isPointVisible=function(e){return h$N(this._ellipsoid.transformPositionToScaledSpace(e,_$I),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},s$H.prototype.isScaledSpacePointVisible=function(e){return h$N(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var w$L=new o$1p;s$H.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){var i,n,r=this._ellipsoid;return e$2e(t)&&t<0&&r.minimumRadius>-t?((n=w$L).x=this._cameraPosition.x/(r.radii.x+t),n.y=this._cameraPosition.y/(r.radii.y+t),n.z=this._cameraPosition.z/(r.radii.z+t),i=n.x*n.x+n.y*n.y+n.z*n.z-1):(n=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),h$N(e,n,i)},s$H.prototype.computeHorizonCullingPoint=function(e,t,i){return q$R(this._ellipsoid,e,t,i)};var b$Y=t$12.clone(t$12.UNIT_SPHERE);s$H.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,i,n){return q$R(z$L(this._ellipsoid,i,b$Y),e,t,n)},s$H.prototype.computeHorizonCullingPointFromVertices=function(e,t,i,n,r){return E$Q(this._ellipsoid,e,t,i,n,r)},s$H.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,i,n,r,o){return E$Q(z$L(this._ellipsoid,r,b$Y),e,t,i,n,o)};var O$B=[];s$H.prototype.computeHorizonCullingPointFromRectangle=function(e,t,i){o$1q.typeOf.object("rectangle",e);var n=h$18.subsample(e,t,0,O$B),r=i$1d.fromPoints(n);if(!(o$1p.magnitude(r.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(r.center,n,i)};var R$K=new o$1p;function z$L(e,t,i){if(e$2e(t)&&t<0&&e.minimumRadius>-t){var n=o$1p.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,R$K);e=t$12.fromCartesian3(n,i)}return e}function q$R(e,t,i,n){o$1q.typeOf.object("directionToPoint",t),o$1q.defined("positions",i),e$2e(n)||(n=new o$1p);for(var r=C$S(e,t),o=0,a=0,s=i.length;a<s;++a){var l=g$U(e,i[a],r);if(l<0)return;o=Math.max(o,l)}return x$T(r,o,n)}var m$Q=new o$1p;function E$Q(e,t,i,n,r,o){o$1q.typeOf.object("directionToPoint",t),o$1q.defined("vertices",i),o$1q.typeOf.number("stride",n),e$2e(o)||(o=new o$1p),n=u$Z(n,3),r=u$Z(r,o$1p.ZERO);for(var a=C$S(e,t),s=0,l=0,u=i.length;l<u;l+=n){m$Q.x=i[l]+r.x,m$Q.y=i[l+1]+r.y,m$Q.z=i[l+2]+r.z;var c=g$U(e,m$Q,a);if(c<0)return;s=Math.max(s,c)}return x$T(a,s,o)}function h$N(e,t,i){var n=t,r=i,o=o$1p.subtract(e,n,_$I),a=-o$1p.dot(o,n);return!(r<0?a>0:a>r&&a*a/o$1p.magnitudeSquared(o)>r)}var V$I=new o$1p,k$L=new o$1p;function g$U(e,t,i){var n=e.transformPositionToScaledSpace(t,V$I),r=o$1p.magnitudeSquared(n),o=Math.sqrt(r),a=o$1p.divideByScalar(n,o,k$L);r=Math.max(1,r);var s=1/(o=Math.max(1,o));return 1/(o$1p.dot(a,i)*s-o$1p.magnitude(o$1p.cross(a,i,a))*(Math.sqrt(r-1)*s))}function x$T(e,t,i){if(!(t<=0||t===1/0||t!=t))return o$1p.multiplyByScalar(e,t,i)}var P$L=new o$1p;function C$S(e,t){return o$1p.equals(t,o$1p.ZERO)?t:(e.transformPositionToScaledSpace(t,P$L),o$1p.normalize(P$L,P$L))}var N$H=new o$1p,B$K=new o$1p,c$O=new o$1o,M$P=new p$1d,I$Z=new p$1d,g$T=Math.pow(2,12);function h$M(e,t,i,n,r,o){var a,s,l,u=ye$j.NONE;if(e$2e(e)&&e$2e(t)&&e$2e(i)&&e$2e(n)){var c=e.minimum,h=e.maximum,d=o$1p.subtract(h,c,B$K),f=i-t;u=Math.max(o$1p.maximumComponent(d),f)<g$T-1?ye$j.BITS12:ye$j.NONE,u=ye$j.NONE,a=e.center,s=p$1d.inverseTransformation(n,new p$1d);var p=o$1p.negate(c,N$H);p$1d.multiply(p$1d.fromTranslation(p,M$P),s,s);var _=N$H;_.x=1/d.x,_.y=1/d.y,_.z=1/d.z,p$1d.multiply(p$1d.fromScale(_,M$P),s,s),l=p$1d.clone(n),p$1d.setTranslation(l,o$1p.ZERO,l),n=p$1d.clone(n,new p$1d);var m=p$1d.fromTranslation(c,M$P),g=p$1d.fromScale(d,I$Z),x=p$1d.multiply(m,g,M$P);p$1d.multiply(n,x,n),p$1d.multiply(l,x,l)}this.quantization=u,this.minimumHeight=t,this.maximumHeight=i,this.center=a,this.toScaledENU=s,this.fromScaledENU=n,this.matrix=l,this.hasVertexNormals=r,this.hasWebMercatorT=u$Z(o,!1)}h$M.prototype.encode=function(e,t,i,n,r,o,a){var s=n.x,l=n.y;if(this.quantization===ye$j.BITS12){(i=p$1d.multiplyByPoint(this.toScaledENU,i,N$H)).x=e$2d.clamp(i.x,0,1),i.y=e$2d.clamp(i.y,0,1),i.z=e$2d.clamp(i.z,0,1);var u=this.maximumHeight-this.minimumHeight,c=e$2d.clamp((r-this.minimumHeight)/u,0,1);o$1o.fromElements(i.x,i.y,c$O);var h=t$$.compressTextureCoordinates(c$O);o$1o.fromElements(i.z,c,c$O);var d=t$$.compressTextureCoordinates(c$O);o$1o.fromElements(s,l,c$O);var f=t$$.compressTextureCoordinates(c$O);if(e[t++]=h,e[t++]=d,e[t++]=f,this.hasWebMercatorT){o$1o.fromElements(a,0,c$O);var p=t$$.compressTextureCoordinates(c$O);e[t++]=p}}else o$1p.subtract(i,this.center,N$H),e[t++]=N$H.x,e[t++]=N$H.y,e[t++]=N$H.z,e[t++]=r,e[t++]=s,e[t++]=l,this.hasWebMercatorT&&(e[t++]=a);return this.hasVertexNormals&&(e[t++]=t$$.octPackFloat(o)),t},h$M.prototype.decodePosition=function(e,t,i){if(e$2e(i)||(i=new o$1p),t*=this.getStride(),this.quantization===ye$j.BITS12){var n=t$$.decompressTextureCoordinates(e[t],c$O);i.x=n.x,i.y=n.y;var r=t$$.decompressTextureCoordinates(e[t+1],c$O);return i.z=r.x,p$1d.multiplyByPoint(this.fromScaledENU,i,i)}return i.x=e[t],i.y=e[t+1],i.z=e[t+2],o$1p.add(i,this.center,i)},h$M.prototype.decodeTextureCoordinates=function(e,t,i){return e$2e(i)||(i=new o$1o),t*=this.getStride(),this.quantization===ye$j.BITS12?t$$.decompressTextureCoordinates(e[t+2],i):o$1o.fromElements(e[t+4],e[t+5],i)},h$M.prototype.decodeHeight=function(e,t){return t*=this.getStride(),this.quantization===ye$j.BITS12?t$$.decompressTextureCoordinates(e[t+1],c$O).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]},h$M.prototype.decodeWebMercatorT=function(e,t){return t*=this.getStride(),this.quantization===ye$j.BITS12?t$$.decompressTextureCoordinates(e[t+3],c$O).x:e[t+6]},h$M.prototype.getOctEncodedNormal=function(e,t,i){var n=e[t=(t+1)*this.getStride()-1]/256,r=Math.floor(n),o=256*(n-r);return o$1o.fromElements(r,o,i)},h$M.prototype.getStride=function(){var e;if(this.quantization===ye$j.BITS12)e=3;else e=6;return this.hasWebMercatorT&&++e,this.hasVertexNormals&&++e,e};var H$Q={position3DAndHeight:0,textureCoordAndEncodedNormals:1},F$P={compressed0:0,compressed1:1};h$M.prototype.getAttributes=function(e){var t,i=S$14.FLOAT,n=S$14.getSizeInBytes(i);if(this.quantization===ye$j.NONE){var r=2;this.hasWebMercatorT&&++r,this.hasVertexNormals&&++r,t=(4+r)*n;var o=[{index:H$Q.position3DAndHeight,name:"position3DAndHeight",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:4,offsetInBytes:0,strideInBytes:t},{index:H$Q.textureCoordAndEncodedNormals,name:"textureCoordAndEncodedNormals",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:r,offsetInBytes:4*n,strideInBytes:t}];return o}var a=3,s=0;return(this.hasWebMercatorT||this.hasVertexNormals)&&++a,this.hasWebMercatorT&&this.hasVertexNormals?(t=(a+ ++s)*n,[{index:o.compressed0,name:"compressed0",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a,offsetInBytes:0,strideInBytes:t},{index:o.compressed1,name:"compressed1",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:s,offsetInBytes:a*n,strideInBytes:t}]):[{index:o.compressed0,name:"compressed0",vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a}]},h$M.prototype.getAttributeLocations=function(){return this.quantization===ye$j.NONE?H$Q:F$P},h$M.clone=function(e,t){return e$2e(t)||(t=new h$M),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=o$1p.clone(e.center),t.toScaledENU=p$1d.clone(e.toScaledENU),t.fromScaledENU=p$1d.clone(e.fromScaledENU),t.matrix=p$1d.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t};var m$P={};m$P.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var lr$7=new o$1p,sa$4=new p$1d,ua$3=new o$1p,Ta$3=new o$1p;function T$M(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x){this.center=e,this.vertices=t,this.stride=u$Z(u,6),this.indexCountWithoutSkirts=n,this.vertexCountWithoutSkirts=r,this.indices=i,this.minimumHeight=o,this.maximumHeight=a,this.boundingSphere3D=s,this.occludeePointInScaledSpace=l,this.orientedBoundingBox=c,this.validOrientedBoundingBox=x,this.encoding=h,this.exaggeration=d,this.westIndicesSouthToNorth=f,this.southIndicesEastToWest=p,this.eastIndicesNorthToSouth=_,this.northIndicesWestToEast=m,this.invalid=u$Z(g,!1)}function T$L(e){if(!e$2e(e)||!e$2e(e.buffer))throw new t$15("options.buffer is required.");if(!e$2e(e.width))throw new t$15("options.width is required.");if(!e$2e(e.height))throw new t$15("options.height is required.");this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=u$Z(e.childTileMask,15),this._encoding=u$Z(e.encoding,T$N.NONE),this._valid=u$Z(e.valid,!0),e$2e(e.childTileMaskExt)&&(this._childTileMaskExt=e.childTileMaskExt,this._level=e.level,this._x=e.x,this._y=e.y);var t=m$P.DEFAULT_STRUCTURE,i=e.structure;e$2e(i)?i!==t&&(i.heightScale=u$Z(i.heightScale,t.heightScale),i.heightOffset=u$Z(i.heightOffset,t.heightOffset),i.elementsPerHeight=u$Z(i.elementsPerHeight,t.elementsPerHeight),i.stride=u$Z(i.stride,t.stride),i.elementMultiplier=u$Z(i.elementMultiplier,t.elementMultiplier),i.isBigEndian=u$Z(i.isBigEndian,t.isBigEndian)):i=t,this._structure=i,this._createdByUpsampling=u$Z(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===T$N.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0,this._skirtMode=u$Z(e.skirtMode,!0),this._skirtScale=u$Z(e.skirtScale,.1),this._releaseBuffer=!0,e$2e(e.releaseBuffer)&&(this._releaseBuffer=e.releaseBuffer),this._normalTexture=e.normalTexture}m$P.computeVertices=function(e){if(!e$2e(e)||!e$2e(e.heightmap))throw new t$15("options.heightmap is required.");if(!e$2e(e.width)||!e$2e(e.height))throw new t$15("options.width and options.height are required.");if(!e$2e(e.nativeRectangle))throw new t$15("options.nativeRectangle is required.");if(!e$2e(e.skirtHeight))throw new t$15("options.skirtHeight is required.");var t,i,n,r,o=Math.cos,a=Math.sin,s=Math.sqrt,l=Math.atan,u=Math.exp,c=e$2d.PI_OVER_TWO,h=e$2d.toRadians,d=e.heightmap,f=e.width,p=e.height,_=e.skirtHeight,m=u$Z(e.isGeographic,!0),g=u$Z(e.ellipsoid,t$12.WGS84),x=1/g.maximumRadius,y=e.nativeRectangle,v=e.rectangle;e$2e(v)?(t=v.west,i=v.south,n=v.east,r=v.north):m?(t=h(y.west),i=h(y.south),n=h(y.east),r=h(y.north)):(t=y.west*x,i=c-2*l(u(-y.south*x)),n=y.east*x,r=c-2*l(u(-y.north*x)));var $=e.relativeToCenter,b=e$2e($);$=b?$:o$1p.ZERO;var T=u$Z(e.exaggeration,1),C=u$Z(e.includeWebMercatorT,!1),S=u$Z(e.structure,m$P.DEFAULT_STRUCTURE),w=u$Z(S.heightScale,m$P.DEFAULT_STRUCTURE.heightScale),E=u$Z(S.heightOffset,m$P.DEFAULT_STRUCTURE.heightOffset),P=u$Z(S.elementsPerHeight,m$P.DEFAULT_STRUCTURE.elementsPerHeight),A=u$Z(S.stride,m$P.DEFAULT_STRUCTURE.stride),L=u$Z(S.elementMultiplier,m$P.DEFAULT_STRUCTURE.elementMultiplier),M=u$Z(S.isBigEndian,m$P.DEFAULT_STRUCTURE.isBigEndian),R=h$18.computeWidth(y),O=h$18.computeHeight(y),D=R/(f-1),I=O/(p-1);m||(R*=x,O*=x);var B,F,N=g.radiiSquared,G=N.x,z=N.y,U=N.z,V=65536,k=-65536,W=m$19.eastNorthUpToFixedFrame($,g),H=p$1d.inverseTransformation(W,sa$4);C&&(B=t$N.geodeticLatitudeToMercatorAngle(i),F=1/(t$N.geodeticLatitudeToMercatorAngle(r)-B));var q=ua$3;q.x=Number.POSITIVE_INFINITY,q.y=Number.POSITIVE_INFINITY,q.z=Number.POSITIVE_INFINITY;var j=Ta$3;j.x=Number.NEGATIVE_INFINITY,j.y=Number.NEGATIVE_INFINITY,j.z=Number.NEGATIVE_INFINITY;var X=Number.POSITIVE_INFINITY,Y=f*p,Z=Y+(_>0?2*f+2*p:0),K=new Array(Z),Q=new Array(Z),J=new Array(Z),ee=C?new Array(Z):[],te=0,ie=p,ne=0,re=f;_>0&&(--te,++ie,--ne,++re);for(var oe=1e-5,ae=te;ae<ie;++ae){var se=ae;se<0&&(se=0),se>=p&&(se=p-1);var le=y.north-I*se,ue=((le=m?h(le):c-2*l(u(-le*x)))-i)/(r-i);ue=e$2d.clamp(ue,0,1);var ce=ae===te,he=ae===ie-1;_>0&&(ce?le+=oe*O:he&&(le-=oe*O));var de,fe=o(le),pe=a(le),_e=U*pe;C&&(de=(t$N.geodeticLatitudeToMercatorAngle(le)-B)*F);for(var me=ne;me<re;++me){var ge=me;ge<0&&(ge=0),ge>=f&&(ge=f-1);var xe,ye,ve=se*(f*A)+ge*A;if(1===P)xe=d[ve];else if(xe=0,M)for(ye=0;ye<P;++ye)xe=xe*L+d[ve+ye];else for(ye=P-1;ye>=0;--ye)xe=xe*L+d[ve+ye];xe=(xe*w+E)*T,k=Math.max(k,xe),V=Math.min(V,xe);var $e=y.west+D*ge;m?$e=h($e):$e*=x;var be=($e-t)/(n-t);be=e$2d.clamp(be,0,1);var Te=se*f+ge;if(_>0){var Ce=me===ne,Se=me===re-1,we=ce||he||Ce||Se;if((ce||he)&&(Ce||Se))continue;we&&(xe-=_,Ce?(Te=Y+(p-se-1),$e-=oe*R):he?Te=Y+p+(f-ge-1):Se?(Te=Y+p+f+se,$e+=oe*R):ce&&(Te=Y+p+f+p+ge))}var Ee=fe*o($e),Pe=fe*a($e),Ae=G*Ee,Le=z*Pe,Me=1/s(Ae*Ee+Le*Pe+_e*pe),Re=Ae*Me,Oe=Le*Me,De=_e*Me,Ie=new o$1p;Ie.x=Re+Ee*xe,Ie.y=Oe+Pe*xe,Ie.z=De+pe*xe,K[Te]=Ie,Q[Te]=xe,J[Te]=new o$1o(be,ue),C&&(ee[Te]=de),p$1d.multiplyByPoint(H,Ie,lr$7),o$1p.minimumByComponent(lr$7,q,q),o$1p.maximumByComponent(lr$7,j,j),X=Math.min(X,xe)}}var Be,Fe,Ne=i$1d.fromPoints(K);(e$2e(v)&&(Be=y$Y.fromRectangle(v,V,k,g)),b)&&(Fe=new s$H(g).computeHorizonCullingPointPossiblyUnderEllipsoid($,K,V));for(var Ge=new h$M(new e$29(q,j,$),X,k,W,!1,C),ze=new Float32Array(Z*Ge.getStride()),Ue=0,Ve=0;Ve<Z;++Ve)Ue=Ge.encode(ze,Ue,K[Ve],J[Ve],Q[Ve],void 0,ee[Ve]);return{vertices:ze,maximumHeight:k,minimumHeight:V,encoding:Ge,boundingSphere3D:Ne,orientedBoundingBox:Be,occludeePointInScaledSpace:Fe}},Object.defineProperties(T$L.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return e$2e(this._mesh)}},normalTexture:{get:function(){return this._normalTexture}}});var Q$N=new i$W("createVerticesFromHeightmap");T$L.prototype.createMesh=function(e,t,i,n,r){if(!e$2e(e))throw new t$15("tilingScheme is required.");if(!e$2e(t))throw new t$15("x is required.");if(!e$2e(i))throw new t$15("y is required.");if(!e$2e(n))throw new t$15("level is required.");var o=e.ellipsoid,a=e.tileXYToNativeRectangle(t,i,n),s=e.tileXYToRectangle(t,i,n);r=u$Z(r,1);var l=o.cartographicToCartesian(h$18.center(s)),u=this._structure,c=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<n);if(this._skirtMode)if(e.isSct){var h=Math.min.apply(null,this._buffer),d=Math.max.apply(null,this._buffer);this._skirtHeight=this._skirtScale*(d-h),0===this._skirtHeight&&(this._skirtHeight=Math.min(4*c,1e3))}else this._skirtHeight=Math.min(4*c,1e3);else this._skirtHeight=0;var f=Q$N.scheduleTask({heightmap:this._buffer,structure:u,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:a,rectangle:s,relativeToCenter:l,ellipsoid:o,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof n$1d,exaggeration:r,encoding:this._encoding});if(e$2e(f)){var p=this;return o$1l(f,(function(e){var t;t=p._skirtHeight>0?I$12.getRegularGridAndSkirtIndicesAndEdgeIndices(e.gridWidth,e.gridHeight):I$12.getRegularGridIndicesAndEdgeIndices(e.gridWidth,e.gridHeight);var i=e.gridWidth*e.gridHeight;return p._mesh=new T$M(l,new Float32Array(e.vertices),t.indices,t.indexCountWithoutSkirts,i,e.minimumHeight,e.maximumHeight,i$1d.clone(e.boundingSphere3D),o$1p.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,y$Y.clone(e.orientedBoundingBox),h$M.clone(e.encoding),r,t.westIndicesSouthToNorth,t.southIndicesEastToWest,t.eastIndicesNorthToSouth,t.northIndicesWestToEast),p._buffer=void 0,p._mesh}))}},T$L.prototype._createMeshSync=function(e,t,i,n,r){if(!e$2e(e))throw new t$15("tilingScheme is required.");if(!e$2e(t))throw new t$15("x is required.");if(!e$2e(i))throw new t$15("y is required.");if(!e$2e(n))throw new t$15("level is required.");var o=e.ellipsoid,a=e.tileXYToNativeRectangle(t,i,n),s=e.tileXYToRectangle(t,i,n);r=u$Z(r,1);var l=o.cartographicToCartesian(h$18.center(s)),u=this._structure,c=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<n);this._skirtHeight=Math.min(4*c,1e3);var h,d=m$P.computeVertices({heightmap:this._buffer,structure:u,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:a,rectangle:s,relativeToCenter:l,ellipsoid:o,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof n$1d,exaggeration:r});this._buffer=void 0,h=this._skirtHeight>0?I$12.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):I$12.getRegularGridIndicesAndEdgeIndices(this._width,this._height);var f=d.gridWidth*d.gridHeight;return new T$M(l,d.vertices,h.indices,h.indexCountWithoutSkirts,f,d.minimumHeight,d.maximumHeight,d.boundingSphere3D,d.occludeePointInScaledSpace,d.encoding.getStride(),d.orientedBoundingBox,d.encoding,r,h.westIndicesSouthToNorth,h.southIndicesEastToWest,h.eastIndicesNorthToSouth,h.northIndicesWestToEast)},T$L.prototype.interpolateHeight=function(e,t,i){var n,r=this._width,o=this._height,a=this._structure,s=a.stride,l=a.elementsPerHeight,u=a.elementMultiplier,c=a.isBigEndian,h=a.heightOffset,d=a.heightScale;e$2e(this._mesh)?n=G$Y(this._mesh.vertices,this._mesh.encoding,h,d,e,r,o,t,i,this._mesh.exaggeration):n=(n=ee$t(this._buffer,l,u,s,c,e,r,o,t,i))*d+h;return n};var y$L=33,$$L=new Float32Array(y$L*y$L);function ee$t(e,t,i,n,r,o,a,s,l,u){var c=(l-o.west)*(a-1)/(o.east-o.west),h=(u-o.south)*(s-1)/(o.north-o.south),d=0|c,f=d+1;f>=a&&(f=a-1,d=a-2);var p=0|h,_=p+1;return _>=s&&(_=s-1,p=s-2),_=s-1-_,D$N(c-d,h-p,A$V(e,t,i,n,r,(p=s-1-p)*a+d),A$V(e,t,i,n,r,p*a+f),A$V(e,t,i,n,r,_*a+d),A$V(e,t,i,n,r,_*a+f))}function G$Y(e,t,i,n,r,o,a,s,l,u){var c=(s-r.west)*(o-1)/(r.east-r.west),h=(l-r.south)*(a-1)/(r.north-r.south),d=0|c,f=d+1;f>=o&&(f=o-1,d=o-2);var p=0|h,_=p+1;_>=a&&(_=a-1,p=a-2);var m=h-p;return p=a-1-p,_=a-1-_,D$N(c-d,m,(t.decodeHeight(e,p*o+d)/u-i)/n,(t.decodeHeight(e,p*o+f)/u-i)/n,(t.decodeHeight(e,_*o+d)/u-i)/n,(t.decodeHeight(e,_*o+f)/u-i)/n)}function D$N(e,t,i,n,r,o){return t<e?i+e*(n-i)+t*(o-n):i+e*(o-r)+t*(r-i)}function A$V(e,t,i,n,r,o){o*=n;var a,s=0;if(r)for(a=0;a<t;++a)s=s*i+e[o+a];else for(a=t-1;a>=0;--a)s=s*i+e[o+a];return s}function re$B(e,t,i,n,r,o,a,s){var l;if(a*=r,o)for(l=0;l<t-1;++l)e[a+l]=s/n|0,s-=e[a+l]*n,n/=i;else for(l=t-1;l>0;--l)e[a+l]=s/n|0,s-=e[a+l]*n,n/=i;e[a+l]=s}function r$R(){this.head=void 0,this.tail=void 0,this.count=0}function t$D(e,t){var i=t.previous,n=t.next;t===e.head?e.head=n:i.next=n,t===e.tail?e.tail=i:n.previous=i,t.previous=void 0,t.next=void 0,--e.count}function se$r(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).urls))throw new t$15("options.urls is required.");this._urls=e.urls;for(var t=0;t<this._urls.length;t++)this._urls[t].length>0&&"/"!==this._urls[t][this._urls[t].length-1]&&(this._urls[t]+="/");var i=e.urls[0].indexOf("wmts100");this._useConfigFile=u$Z(e.useConfigFile,!0),this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer(),this._isCreateSkirt=e.isCreateSkirt,this._skirtScale=e.skirtScale,this._isSkirtDirty=!1,this._proxy=e.proxy,this._terrainDataStructure={heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1};var n=e.credit;"string"==typeof n&&(n=new r$U({text:n})),this._credit=n,this._tilingScheme=void 0,this._rectangles=[],this._levels=[],this._compressType="NONE",this._quadtree=void 0,this._packingRequest=e.packingRequest,this._combiInfo={},this._isBlock=!1,this._blockCache={},this._blockCacheQueue=new r$R,this._blockCacheSize=100,this._blockScale=0;var r,o=this,a=u$Z(e.ellipsoid,t$12.WGS84);this._hasNormalBuffer=!1,this._requestVertexNormals=u$Z(e.requestVertexNormals,!1);var s=0;function l(e){if(1===parseFloat(e.getElementsByTagName("sml:Version")[0].textContent)){var t=e.getElementsByTagName("sml:StoreType",void 0);o._blockScale=t[0].getAttribute("BlockScale"),e$2e(o._blockScale)&&o._blockScale>0&&(o._isBlock=!0)}o._compressType=e.getElementsByTagName("sml:CompressType")[0].textContent,o._heightmapWidth=parseInt(e.getElementsByTagName("sml:CellWidth")[0].textContent),o._heightmapHeight=parseInt(e.getElementsByTagName("sml:CellHeight")[0].textContent),o._tilingScheme=new g$15({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,2*Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0));var i=e.getElementsByTagName("sml:Bounds")[0],n=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Left")[0].textContent)),r=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Bottom")[0].textContent)),u=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Right")[0].textContent)),h=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Top")[0].textContent));o._rectangles.push(new h$18(n,r,u,h));for(var d=e.getElementsByTagName("sml:Levels")[0].getElementsByTagName("sml:Level"),f=[],p=0;p<d.length;++p){var _=d[p];f.push(parseInt(_.textContent))}if(o._levels.push(f),o._ready=!0,o._readyPromise.resolve(!0),s<o._urls.length){var m=o._urls[s++],g=m.substring(0,m.length-1),x=m+"config";e$2e(a$O.CREDENTIAL)&&(x=e$2e(a$O.CREDENTIAL._keymap[g])?a$O.addTokenWithKey(g,x):a$O.addToken(x)),o$1l(d$1f(x),l,c)}}function u(t){var i=(new s$T).read(t).documentElement,n=s$T.queryFirstNode(i,"Contents",void 0),r=s$T.queryFirstNode(n,"Layer",void 0);o._tempLayerName=s$T.queryStringValue(r,"Title",void 0);var h=s$T.queryFirstNode(n,"TileMatrixSet",void 0);o._wmtstileMatrixSet=s$T.queryStringValue(h,"Identifier",void 0);var d=s$T.queryFirstNode(r,"BoundingBox",void 0),f=s$T.queryStringValue(d,"LowerCorner",void 0),p=s$T.queryStringValue(d,"UpperCorner",void 0),_=f.split(" "),m=p.split(" "),g=parseFloat(_[0]),x=parseFloat(m[0]),y=parseFloat(_[1]),v=parseFloat(m[1]);g&&x&&y&&v&&o._rectangles.push(new h$18(g,y,x,v));var $=s$T.queryFirstNode(n,"TileMatrixSet",void 0),b=(h=s$T.queryChildNodes($,"TileMatrix",void 0),s$T.queryNumericValue(h[0],"ScaleDenominator",void 0)),T=s$T.queryNumericValue(h[h.length-1],"ScaleDenominator",void 0),C=s$T.queryNumericValue(h[0],"Identifier",void 0);b=1/b,T=1/T;var S=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],w=S.indexOf(b),E=S.indexOf(T);for(let e=0;e<S.length;e++)b>S[e]&&S[e+1]&&b<S[e+1]&&(w=e-1),T>S[e]&&S[e+1]&&T<S[e+1]&&(E=e-1);w=Math.max(w,0),o.wmts_sub=u$Z(w-C,0);for(var P=[],A=w;A<=E;A++)P.push(A);if(o._levels.push(P),e.blockscale>0&&(o._blockScale=1*e.blockscale,o._isBlock=!0),o._compressType="ZIP",o._heightmapWidth=e.cellWidth||32,o._heightmapHeight=e.cellHeight||32,o._tilingScheme=new g$15({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,2*Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0)),o._ready=!0,o._readyPromise.resolve(!0),s<o._urls.length){var L=o._urls[s++];if(-1!==L.indexOf("wmts100")){o$1l(u$Q(R=L+"1.0.0/WMTSCapabilities.xml"),u,c)}else{var M=L.substring(0,L.length-1),R=L+"config";e$2e(a$O.CREDENTIAL)&&(R=e$2e(a$O.CREDENTIAL._keymap[M])?a$O.addTokenWithKey(M,R):a$O.addToken(R)),o$1l(d$1f(R),l,c)}}}function c(e){var t=u$Z(e,"An error occurred while accessing "+o._url+".");r=l$V.handleError(r,o,o._errorEvent,t,void 0,void 0,void 0,h)}function h(){if(!e$2e(e.rectangles)||!e$2e(e.levels))throw new t$15("options.rectangles,options.levels is required.");o._compressType=u$Z(e.compressType,"ZIP"),o._heightmapWidth=u$Z(e.heightmapWidth,32),o._heightmapHeight=u$Z(e.heightmapHeight,32),o._tilingScheme=new g$15({ellipsoid:a}),o._tilingScheme.isSct=!0,o._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,Math.min(o._heightmapWidth,o._heightmapHeight),o._tilingScheme.getNumberOfXTilesAtLevel(0)),o._rectangles=e.rectangles,o._levels=e.levels,o._ready=!0,o._readyPromise.resolve(!0)}this._useConfigFile?function(){if(-1!==i){o$1l(u$Q(n=(e=o._urls[s++])+"1.0.0/WMTSCapabilities.xml"),u,c)}else{var e,t=(e=o._urls[s++]).substring(0,e.length-1),n=e+"config";e$2e(a$O.CREDENTIAL)&&(n=e$2e(a$O.CREDENTIAL._keymap[t])?a$O.addTokenWithKey(t,n):a$O.addToken(n)),o$1l(d$1f(n),l,c)}}():h()}function qe$b(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function Me$m(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(t>r-1)throw new t$15("pack imagery index invalid");n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?void 0:new Uint8Array(e,n,a);n+=a}}function Re$j(e,t,i,n){var r=Math.min(e._blockScale,n),o=Math.pow(2,r),a=t%o;return{x:Math.floor(t/o),y:Math.floor(i/o),col:a,row:i%o,level:n,blockSize:o}}function We$g(e,t){var i=new DataView(e),n=0;i.getUint32(n,!0),n+=4;var r=i.getUint32(n,!0);n+=4;for(var o=t.col,a=t.row*t.blockSize+o,s=0,l=0,u=0;u<r;u++){if(u<a)s+=i.getUint32(n,!0);else if(u===a){l=i.getUint32(n,!0),n+=4;break}n+=4}if(n=8+4*r,0!==l)return n+=s,new Uint8Array(e).slice(n,n+l).buffer}T$L.prototype.upsample=function(e,t,i,n,r,o,a){if(!e$2e(e))throw new t$15("tilingScheme is required.");if(!e$2e(t))throw new t$15("thisX is required.");if(!e$2e(i))throw new t$15("thisY is required.");if(!e$2e(n))throw new t$15("thisLevel is required.");if(!e$2e(r))throw new t$15("descendantX is required.");if(!e$2e(o))throw new t$15("descendantY is required.");if(!e$2e(a))throw new t$15("descendantLevel is required.");if(a-n>1)throw new t$15("Upsampling through more than one level at a time is not currently supported.");if(!this._valid){var s=16,l=16;return new T$L({buffer:new Uint8Array(s*l),width:s,height:l,skirtMode:this._skirtMode,skirtScale:this._skirtScale,childTileMask:0,structure:this._structure,createdByUpsampling:!0,valid:!1})}var u=this._mesh;if(e$2e(u)){s=this._width,l=this._height;e$2e(this._valid)&&!this._valid&&(s=Math.max(Math.floor(.5*this._width+1),y$L),l=Math.max(Math.floor(.5*this._height+1),y$L));for(var c=this._structure,h=c.stride,d=new this._bufferType(s*l*h),f=u.vertices,p=u.encoding,_=e.tileXYToRectangle(t,i,n),m=e.tileXYToRectangle(r,o,a),g=c.heightOffset,x=c.heightScale,y=u.exaggeration,v=c.elementsPerHeight,$=c.elementMultiplier,b=c.isBigEndian,T=Math.pow($,v-1),C=0;C<l;++C)for(var S=e$2d.lerp(m.north,m.south,C/(l-1)),w=0;w<s;++w){var E=G$Y(f,p,g,x,_,s,l,e$2d.lerp(m.west,m.east,w/(s-1)),S,y);re$B(d,v,$,T,h,b,C*s+w,E=(E=E<c.lowestEncodedHeight?c.lowestEncodedHeight:E)>c.highestEncodedHeight?c.highestEncodedHeight:E)}if(!this._structure.isBigEndian){var P=!1;for(w=0;w<d.length;w++)if(Math.abs(d[w])>e$2d.EPSILON3){P=!0;break}P||(l=y$L,s=y$L,d=$$L)}return new T$L({buffer:d,width:s,height:l,skirtMode:this._skirtMode,skirtScale:this._skirtScale,childTileMask:0,structure:this._structure,createdByUpsampling:!0,valid:this._valid})}},T$L.prototype.isChildAvailable=function(e,t,i,n){if(!e$2e(e))throw new t$15("thisX is required.");if(!e$2e(t))throw new t$15("thisY is required.");if(!e$2e(i))throw new t$15("childX is required.");if(!e$2e(n))throw new t$15("childY is required.");var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},T$L.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling},r$R.prototype.trim=function(e){for(var t=this.tail;this.count>e&&e$2e(t);){var i=t.previous;t.free(),t$D(this,t),t=i}},r$R.prototype.touch=function(e){var t=this.head;if(t!==e){if(++this.count,!e$2e(t))return e.previous=void 0,e.next=void 0,this.head=e,void(this.tail=e);(e$2e(e.previous)||e$2e(e.next))&&t$D(this,e),e.previous=void 0,e.next=t,t.previous=e,this.head=e}},Object.defineProperties(se$r.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$15("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}},skirtScale:{get:function(){return this._skirtScale},set:function(e){e!==this._skirtScale&&(this._isSkirtDirty=!0),this._skirtScale=e}},hasNormalBuffer:{get:function(){return this._hasNormalBuffer}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}}}),se$r.prototype.division=function(e,t,i,n,r){for(var o=[],a=0;a<r;a++)for(var s=0;s<r;s++){var l=(i+n*(r-1-a)/(r-1))*(r-1),u=(t+n*s/(r-1))*(r-1),c=Math.floor(l),h=Math.ceil(l),d=Math.floor(u),f=Math.ceil(u),p=e[(r-1-c)*r+d],_=e[(r-1-c)*r+f],m=e[(r-1-h)*r+d],g=e[(r-1-h)*r+f],x=m*(l-c)+p*(h-l),y=g*(l-c)+_*(h-l);c===h&&(x=m,y=g);var v=y*(u-d)+x*(f-u);d===f&&(v=y),o[a*r+s]=v}return o};var ue$t=new h$18;function Qe$9(e,t,i,n,r){if(null!=e){for(var o=new Uint8Array(t*i*3),a=6378137,s=n.width,l=n.height,u=e,c=0;c<t;c++)for(var h=0;h<i;h++){var d=h*t+c;u[h*t+c];var f=c,p=h;r>13&&(c=(c=0==c?c+1:c)==t-1?t-2:c,h=(h=0==h?h+1:h)==i-1?i-2:h);var _=Math.max(c-1,0),m=h,g=u[m*t+_],x=u[(m=h)*t+(_=Math.min(c+1,t-1))];_=c;var y=u[(m=Math.min(h+1,i-1))*t+_];_=c;var v=u[(m=Math.max(h-1,0))*t+_];c=f,h=p;var $=n.south+l*(512-2*h-1)/512,b=new o$1p((g-x)/(a*Math.cos($)*s/t),(v-y)/(a*l/i),2);o$1p.normalize(b,b),o[3*d+0]=255*(.5*b.x+.5),o[3*d+1]=255*(.5*b.y+.5),o[3*d+2]=255*(.5*b.z+.5)}return o}}se$r.prototype.requestTileGeometry=function(e,t,i,n,r){if(!this.ready)throw new t$15("requestTileGeometry must not be called before ready returns true.");if(0===i){var o=new Array(this._heightmapWidth*this._heightmapHeight);return o.fill(0),this._hasNormalBuffer=!1,new T$L({buffer:o,width:this._heightmapWidth,height:this._heightmapHeight,skirtMode:this._isCreateSkirt,skirtScale:this._skirtScale,childTileMask:Ie$h(this,e,t,i),structure:this._terrainDataStructure,valid:!1})}var a=[],s=this._tilingScheme.tileXYToRectangle(e,t,i),l=this,u=!1,c=this._rectangles.length-1,h=this._levels[c][this._levels[c].length-1];c=0;var d=this._levels[c][this._levels[c].length-1];if(e$2e(r)||!(i>d)){var f=this,p=!1;(e$2e(f._packingRequest)&&f._packingRequest===Z$P.QuadKey||f._isBlock)&&(p=!0);for(var _=0;_<this._rectangles.length;_++){var m=h$18.intersection(this._rectangles[_],s,ue$t);if(e$2e(r)&&!p){var g=r[this._urls[_]];if(e$2e(g)&&(1===g&&(u=!0),0===g||2===g))continue}if(0===a.length&&_===this._rectangles.length-1&&i>h)break;if(e$2e(m)){var x=this._levels[_][0],y=this._levels[_][this._levels[_].length-1],v=!1;if(i>=x&&i<=d&&(v=!0),v){var $=0,b=0,T=1,C=e,S=t,w=i;w>y&&(T=1/Math.pow(2,w-y));for(var E=T;w>y;)C%2==1&&($+=E),S%2==0&&(b+=E),E*=2,w--,C=Math.floor(.5*C),S=Math.floor(.5*S);var P={srcX:$,srcY:b,width:T,dataName:l._urls[_]},A=i+"_"+e+"_"+t;e$2e(l._combiInfo[A])?l._combiInfo[A].push(P):l._combiInfo[A]=[P],function(e){var t,i=l._urls[e];if(-1!==i.indexOf("wmts100")){var n=w-l.wmts_sub;t=i.substring(0,i.lastIndexOf("/"))+"?tilematrix="+n+"&layer="+l._tempLayerName+"&tilerow="+S+"&tilecol="+C+"&tilematrixset="+l._wmtstileMatrixSet+"&service=WMTS&request=GetTile"}else{var r=i.substring(0,i.length-1);t=l._urls[e]+"data/index/"+S+"/"+C+".bil?level="+w}var o=l._proxy;e$2e(o)&&(t=o.getURL(t));var s=new r$1c({throttle:!0,throttleByServer:!1,type:U$1f.TERRAIN}),u=void 0;if(e$2e(f._packingRequest)&&f._packingRequest===Z$P.QuadKey&&f._isBlock){s.type=U$1f.BLOCKPACK;var c=Re$j(f,C,S,w);s.quadKey=qe$b(c.x,c.y,c.level),s.blockInfo=c,s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),e$2e(h=f.blockCache[s.quadKey+"_"+s.providerName])&&(f.blockCacheQueue.touch(h),u={buffer:h.data})}else if(e$2e(f._packingRequest)&&f._packingRequest===Z$P.QuadKey)s.type=U$1f.PACK,s.quadKey=qe$b(C,S,w),s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/"));else if(f._isBlock){s.type=U$1f.BLOCK;var h;c=Re$j(f,C,S,w);s.quadKey=qe$b(c.x,c.y,c.level),s.blockInfo=c,s.providerName=t.substring(t.indexOf("datas/")+6,t.indexOf("/data/")),e$2e(h=f.blockCache[s.quadKey+"_"+s.providerName])&&(f.blockCacheQueue.touch(h),u={buffer:h.data})}if(!e$2e(u)){e$2e(a$O.CREDENTIAL)&&(t=e$2e(a$O.CREDENTIAL._keymap[r])?a$O.addTokenWithKey(r,t):a$O.addToken(t));var d=t$10.createIfNeeded(t),p=t;e$2e(s.blockInfo)&&(p=l._urls[e]+"data/index/"+c.y+"/"+c.x+".bil?level="+w),u=d.getDerivedResource({url:p,request:s}).fetchArrayBuffer()}e$2e(u)&&(u.id=e,u.url=t,u.subRequest=s),a.push(u)}(_)}if(u)break}}if(!(a.indexOf(void 0)>-1))return this._hasNormalBuffer=!0,o$1l.allSettled(a,(function(n){if(!(n.length<1)){for(var r=[],o=0;o<n.length;o++){var u=n[o];if(e$2e(u)){if(e$2e(u.buffer)&&(u=u.buffer),0!==i){if(f._isBlock&&e$2e(f._packingRequest)&&f._packingRequest===Z$P.QuadKey)!e$2e(a[o].subRequest.quadKeyIndex)&&e$2e(a[o].subRequest.blockRequest)&&(a[o].subRequest.quadKeyIndex=a[o].subRequest.blockRequest.quadKeyIndex),e$2e(a[o].subRequest.quadKeyIndex)&&(u=Me$m(u,a[o].subRequest.quadKeyIndex),u=new Uint8Array(u).buffer),e$2e(c=f.blockCache[a[o].subRequest.quadKey])||(c=new e$1e(f,a[o].subRequest.quadKey,u),f.blockCache[a[o].subRequest.quadKey+"_"+a[o].subRequest.providerName]=c),f.blockCacheQueue.touch(c),f.blockCacheQueue.trim(f.blockCacheSize),u=We$g(u,a[o].subRequest.blockInfo);else if(e$2e(f._packingRequest)&&f._packingRequest===Z$P.QuadKey)u=Me$m(u,a[o].subRequest.quadKeyIndex);else if(f._isBlock){var c;e$2e(c=f.blockCache[a[o].subRequest.quadKey])||(c=new e$1e(f,a[o].subRequest.quadKey,u),f.blockCache[a[o].subRequest.quadKey+"_"+a[o].subRequest.providerName]=c),f.blockCacheQueue.touch(c),f.blockCacheQueue.trim(f.blockCacheSize),u=We$g(u,a[o].subRequest.blockInfo)}if(!e$2e(u)){if(0===o&&n.length>1){var h=i+"_"+e+"_"+t;if(1!=(g=l._combiInfo[h])[o+1].width)return void delete l._combiInfo[h]}continue}}var d,p;if(2===(d="ZIP"===l._compressType?nt$b.inflate(u).buffer:u).byteLength/(l._heightmapWidth*l._heightmapHeight)){var _=new Int16Array(d,0,l._heightmapWidth*l._heightmapHeight);p=[];for(var m=0;m<_.length;m++)p.push(parseFloat(_[m]))}else p=new Float32Array(d,0,l._heightmapWidth*l._heightmapHeight);r.push(p)}else r.push(void 0)}h=i+"_"+e+"_"+t;var g=l._combiInfo[h];if(delete l._combiInfo[h],r.length>1)for(o=0;o<r.length;o++)if(e$2e(r[o])&&(0!=g[o].srcX||0!=g[o].srcY||1!=g[o].width)){_=l.division(r[o],g[o].srcX,g[o].srcY,g[o].width,l._heightmapWidth);r[o]=_}var x=[{},{},{},{}];for(o=0;o<r.length;o++)if(e$2e(r[o])){var y=g[o].dataName,v=-1,$=-1,b=-1,T=-1;v=0==r[o][0]?2:1,$=0==r[o][l._heightmapWidth-1]?2:1,b=0==r[o][(l._heightmapHeight-1)*l._heightmapWidth]?2:1,T=0==r[o][l._heightmapHeight*l._heightmapWidth-1]?2:1;for(var C=.5*l._heightmapWidth,S=.5*l._heightmapHeight,w=0;w<r[o].length;w++){var E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E<S&&P<C){var A=r[o][w];if(1===v){if(0==A){v=3;break}}else if(0!=A){v=3;break}}}x[0][y]=v;for(w=0;w<r[o].length;w++){E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E<S&&P>=C){A=r[o][w];if(1===$){if(0==A){$=3;break}}else if(0!=A){$=3;break}}}x[1][y]=$;for(w=0;w<r[o].length;w++){E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E>=S&&P<C){A=r[o][w];if(1===b){if(0==A){b=3;break}}else if(0!=A){b=3;break}}}x[2][y]=b;for(w=0;w<r[o].length;w++){E=Math.floor(w/l._heightmapWidth),P=w%l._heightmapWidth;if(E>=S&&P>=C){A=r[o][w];if(1===T){if(0==A){T=3;break}}else if(0!=A){T=3;break}}}if(x[3][y]=T,1===v&&1===$&&1===b&&1===T)break}var L=[];for(o=0;o<r.length;o++)e$2e(r[o])&&L.push(r[o]);if(0!==L.length){var M=L[0];if(L.length>1)for(w=0;w<M.length;w++)if(0==M[w])for(o=1;o<L.length;o++)if(0!=L[o][w]){M[w]=L[o][w];break}var R=!1;for(o=0;o<M.length;o++)if(Math.abs(M[o])>e$2d.EPSILON3){R=!0;break}var O=l._heightmapWidth,D=l._heightmapHeight,I=void 0;return l._requestVertexNormals&&(I=Qe$9(M,O,D,s,i)),new T$L({buffer:M,width:O,height:D,skirtMode:l._isCreateSkirt,skirtScale:l._skirtScale,childTileMask:Ie$h(l,e,t,i),structure:l._terrainDataStructure,valid:R,childTileMaskExt:x,normalTexture:I,level:i,x:e,y:t})}}}),(function(e){return o$1l.reject(e)}))}},se$r.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var ue$t=new h$18;function Ie$h(e,t,i,n){for(var r=e._tilingScheme,o=r.tileXYToRectangle(t,i,n),a=0,s=0;s<e._rectangles.length;s++){var l=e._rectangles[s];e$2e(h$18.intersection(l,o,ue$t))&&(ge$m(r,l,2*t,2*i,n+1)&&(a|=4),ge$m(r,l,2*t+1,2*i,n+1)&&(a|=8),ge$m(r,l,2*t,2*i+1,n+1)&&(a|=1),ge$m(r,l,2*t+1,2*i+1,n+1)&&(a|=2))}return a}function ge$m(e,t,i,n,r){var o=e.tileXYToRectangle(i,n,r);return e$2e(h$18.intersection(o,t,ue$t))}se$r.prototype.getTileDataAvailable=function(e,t,i){if(0===i)return!0;for(var n=this._tilingScheme.tileXYToRectangle(e,t,i),r=0;r<this._rectangles.length;r++){if(e$2e(h$18.intersection(this._rectangles[r],n,ue$t))&&i>=this._levels[r][0]&&i<=this._levels[r][this._levels[r].length-1])return!0}return!1},se$r.prototype.loadTileDataAvailability=function(e,t,i){};var ot$8="attribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_Position = aPosition;\nv_textureCoordinates = textureCoordinates;\n}\n",fa$3="uniform sampler2D u_LineTexture;\nuniform float u_texelOffset;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 maxValues = vec4(0.0);\nfloat halfCoreSize = float(CORESIZE) / 2.0;\nfor(int y = 0; y < CORESIZE; y++){\nfor(int x = 0; x < CORESIZE; x++){\nfloat offsetX = (-halfCoreSize + float(x)) * u_texelOffset;\nfloat offsetY = (-halfCoreSize + float(y)) * u_texelOffset;\nvec2 realTexCoord = v_textureCoordinates + vec2(offsetX, offsetY);\nif(realTexCoord.x > 1.0 || realTexCoord.x < 0.0 || realTexCoord.y > 1.0 || realTexCoord.y < 0.0){\ncontinue;\n}\nvec4 color = texture2D(u_LineTexture, realTexCoord);\nmaxValues = max(maxValues, color);\n}\n}\nif(maxValues.a < 0.01){\ndiscard;\n}\ngl_FragColor = maxValues;\n}\n",pa$2="varying vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nvoid main()\n{\nvec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\nvec4 color = FxaaPixelShader(\nv_textureCoordinates,\ncolorTexture,\nfxaaQualityRcpFrame,\nfxaaQualitySubpix,\nfxaaQualityEdgeThreshold,\nfxaaQualityEdgeThresholdMin);\nfloat alpha = texture2D(colorTexture, v_textureCoordinates).a;\ngl_FragColor = vec4(color.rgb, alpha);\n}\n",k$K="#if (FXAA_QUALITY_PRESET == 10)\n#define FXAA_QUALITY_PS 3\n#define FXAA_QUALITY_P0 1.5\n#define FXAA_QUALITY_P1 3.0\n#define FXAA_QUALITY_P2 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 11)\n#define FXAA_QUALITY_PS 4\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 3.0\n#define FXAA_QUALITY_P3 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 12)\n#define FXAA_QUALITY_PS 5\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 4.0\n#define FXAA_QUALITY_P4 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 13)\n#define FXAA_QUALITY_PS 6\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 4.0\n#define FXAA_QUALITY_P5 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 14)\n#define FXAA_QUALITY_PS 7\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 4.0\n#define FXAA_QUALITY_P6 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 15)\n#define FXAA_QUALITY_PS 8\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 4.0\n#define FXAA_QUALITY_P7 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 20)\n#define FXAA_QUALITY_PS 3\n#define FXAA_QUALITY_P0 1.5\n#define FXAA_QUALITY_P1 2.0\n#define FXAA_QUALITY_P2 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 21)\n#define FXAA_QUALITY_PS 4\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 22)\n#define FXAA_QUALITY_PS 5\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 23)\n#define FXAA_QUALITY_PS 6\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 24)\n#define FXAA_QUALITY_PS 7\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 3.0\n#define FXAA_QUALITY_P6 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 25)\n#define FXAA_QUALITY_PS 8\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 4.0\n#define FXAA_QUALITY_P7 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 26)\n#define FXAA_QUALITY_PS 9\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 4.0\n#define FXAA_QUALITY_P8 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 27)\n#define FXAA_QUALITY_PS 10\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 4.0\n#define FXAA_QUALITY_P9 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 28)\n#define FXAA_QUALITY_PS 11\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 4.0\n#define FXAA_QUALITY_P10 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 29)\n#define FXAA_QUALITY_PS 12\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 2.0\n#define FXAA_QUALITY_P10 4.0\n#define FXAA_QUALITY_P11 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 39)\n#define FXAA_QUALITY_PS 12\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.0\n#define FXAA_QUALITY_P2 1.0\n#define FXAA_QUALITY_P3 1.0\n#define FXAA_QUALITY_P4 1.0\n#define FXAA_QUALITY_P5 1.5\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 2.0\n#define FXAA_QUALITY_P10 4.0\n#define FXAA_QUALITY_P11 8.0\n#endif\n#define FxaaBool bool\n#define FxaaFloat float\n#define FxaaFloat2 vec2\n#define FxaaFloat3 vec3\n#define FxaaFloat4 vec4\n#define FxaaHalf float\n#define FxaaHalf2 vec2\n#define FxaaHalf3 vec3\n#define FxaaHalf4 vec4\n#define FxaaInt2 vec2\n#define FxaaTex sampler2D\n#define FxaaSat(x) clamp(x, 0.0, 1.0)\n#define FxaaTexTop(t, p) texture2D(t, p)\n#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r))\nFxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }\nFxaaFloat4 FxaaPixelShader(\nFxaaFloat2 pos,\nFxaaTex tex,\nFxaaFloat2 fxaaQualityRcpFrame,\nFxaaFloat fxaaQualitySubpix,\nFxaaFloat fxaaQualityEdgeThreshold,\nFxaaFloat fxaaQualityEdgeThresholdMin\n) {\nFxaaFloat2 posM;\nposM.x = pos.x;\nposM.y = pos.y;\nFxaaFloat4 rgbyM = FxaaTexTop(tex, posM);\n#define lumaM rgbyM.y\nFxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));\nFxaaFloat maxSM = max(lumaS, lumaM);\nFxaaFloat minSM = min(lumaS, lumaM);\nFxaaFloat maxESM = max(lumaE, maxSM);\nFxaaFloat minESM = min(lumaE, minSM);\nFxaaFloat maxWN = max(lumaN, lumaW);\nFxaaFloat minWN = min(lumaN, lumaW);\nFxaaFloat rangeMax = max(maxWN, maxESM);\nFxaaFloat rangeMin = min(minWN, minESM);\nFxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\nFxaaFloat range = rangeMax - rangeMin;\nFxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\nFxaaBool earlyExit = range < rangeMaxClamped;\nif(earlyExit)\nreturn rgbyM;\nFxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaNS = lumaN + lumaS;\nFxaaFloat lumaWE = lumaW + lumaE;\nFxaaFloat subpixRcpRange = 1.0/range;\nFxaaFloat subpixNSWE = lumaNS + lumaWE;\nFxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\nFxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\nFxaaFloat lumaNESE = lumaNE + lumaSE;\nFxaaFloat lumaNWNE = lumaNW + lumaNE;\nFxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\nFxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\nFxaaFloat lumaNWSW = lumaNW + lumaSW;\nFxaaFloat lumaSWSE = lumaSW + lumaSE;\nFxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\nFxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\nFxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\nFxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\nFxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\nFxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;\nFxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;\nFxaaFloat lengthSign = fxaaQualityRcpFrame.x;\nFxaaBool horzSpan = edgeHorz >= edgeVert;\nFxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\nif(!horzSpan) lumaN = lumaW;\nif(!horzSpan) lumaS = lumaE;\nif(horzSpan) lengthSign = fxaaQualityRcpFrame.y;\nFxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;\nFxaaFloat gradientN = lumaN - lumaM;\nFxaaFloat gradientS = lumaS - lumaM;\nFxaaFloat lumaNN = lumaN + lumaM;\nFxaaFloat lumaSS = lumaS + lumaM;\nFxaaBool pairN = abs(gradientN) >= abs(gradientS);\nFxaaFloat gradient = max(abs(gradientN), abs(gradientS));\nif(pairN) lengthSign = -lengthSign;\nFxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);\nFxaaFloat2 posB;\nposB.x = posM.x;\nposB.y = posM.y;\nFxaaFloat2 offNP;\noffNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\noffNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\nif(!horzSpan) posB.x += lengthSign * 0.5;\nif( horzSpan) posB.y += lengthSign * 0.5;\nFxaaFloat2 posN;\nposN.x = posB.x - offNP.x * FXAA_QUALITY_P0;\nposN.y = posB.y - offNP.y * FXAA_QUALITY_P0;\nFxaaFloat2 posP;\nposP.x = posB.x + offNP.x * FXAA_QUALITY_P0;\nposP.y = posB.y + offNP.y * FXAA_QUALITY_P0;\nFxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;\nFxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));\nFxaaFloat subpixE = subpixC * subpixC;\nFxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));\nif(!pairN) lumaNN = lumaSS;\nFxaaFloat gradientScaled = gradient * 1.0/4.0;\nFxaaFloat lumaMM = lumaM - lumaNN * 0.5;\nFxaaFloat subpixF = subpixD * subpixE;\nFxaaBool lumaMLTZero = lumaMM < 0.0;\nlumaEndN -= lumaNN * 0.5;\nlumaEndP -= lumaNN * 0.5;\nFxaaBool doneN = abs(lumaEndN) >= gradientScaled;\nFxaaBool doneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;\nFxaaBool doneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;\n#if (FXAA_QUALITY_PS > 3)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;\n#if (FXAA_QUALITY_PS > 4)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;\n#if (FXAA_QUALITY_PS > 5)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;\n#if (FXAA_QUALITY_PS > 6)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;\n#if (FXAA_QUALITY_PS > 7)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;\n#if (FXAA_QUALITY_PS > 8)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;\n#if (FXAA_QUALITY_PS > 9)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;\n#if (FXAA_QUALITY_PS > 10)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;\n#if (FXAA_QUALITY_PS > 11)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;\n#if (FXAA_QUALITY_PS > 12)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\nFxaaFloat dstN = posM.x - posN.x;\nFxaaFloat dstP = posP.x - posM.x;\nif(!horzSpan) dstN = posM.y - posN.y;\nif(!horzSpan) dstP = posP.y - posM.y;\nFxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\nFxaaFloat spanLength = (dstP + dstN);\nFxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\nFxaaFloat spanLengthRcp = 1.0/spanLength;\nFxaaBool directionN = dstN < dstP;\nFxaaFloat dst = min(dstN, dstP);\nFxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;\nFxaaFloat subpixG = subpixF * subpixF;\nFxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\nFxaaFloat subpixH = subpixG * fxaaQualitySubpix;\nFxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\nFxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\nif(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;\nif( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;\nreturn FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);\n}\n";function a$I(e,t){o$1q.typeOf.object("normal",e),o$1q.typeOf.number("distance",t),this._distance=t,this._normal=new s$G(e,this),this.onChangeCallback=void 0,this.index=-1}function s$G(e,t){this._clippingPlane=t,this._cartesian3=o$1p.clone(e)}function h$L(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=u$Z(e.enabled,!0),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this.edgeColor=e$1X.clone(u$Z(e.edgeColor,e$1X.WHITE)),this.edgeWidth=u$Z(e.edgeWidth,0),this.planeAdded=new o$1h,this.planeRemoved=new o$1h,this._owner=void 0;var t=u$Z(e.unionClippingRegions,!1);this._unionClippingRegions=t,this._testIntersection=t?C$R:P$K,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;var i=e.planes;if(e$2e(i))for(var n=i.length,r=0;r<n;++r)this.add(i[r])}function C$R(e){return e===Ae$w.OUTSIDE}function P$K(e){return e===Ae$w.INSIDE}function F$O(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||-1!==e._dirtyIndex&&e._dirtyIndex!==t,e._dirtyIndex=t}function D$M(e,t){for(var i=e.length,n=0;n<i;++n)if(o$1m.equals(e[n],t))return n;return-1}Object.defineProperties(a$I.prototype,{distance:{get:function(){return this._distance},set:function(e){o$1q.typeOf.number("value",e),e$2e(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){o$1q.typeOf.object("value",e),e$2e(this.onChangeCallback)&&!o$1p.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),o$1p.clone(e,this._normal._cartesian3)}}}),a$I.fromPlane=function(e,t){return o$1q.typeOf.object("plane",e),e$2e(t)?(t.normal=e.normal,t.distance=e.distance):t=new a$I(e.normal,e.distance),t},a$I.clone=function(e,t){return e$2e(t)?(t.normal=e.normal,t.distance=e.distance,t):new a$I(e.normal,e.distance)},Object.defineProperties(s$G.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){o$1q.typeOf.number("value",e),e$2e(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){o$1q.typeOf.number("value",e),e$2e(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){o$1q.typeOf.number("value",e),e$2e(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}}),Object.defineProperties(h$L.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?C$R:P$K)}},enabled:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e)}},texture:{get:function(){return this._clippingPlanesTexture}},owner:{get:function(){return this._owner}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}}),h$L.prototype.add=function(e){var t=this._planes.length,i=this;e.onChangeCallback=function(e){F$O(i,e)},e.index=t,F$O(this,t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)},h$L.prototype.get=function(e){return o$1q.typeOf.number("index",e),this._planes[e]},h$L.prototype.contains=function(e){return-1!==D$M(this._planes,e)},h$L.prototype.remove=function(e){var t=this._planes,i=D$M(t,e);if(-1===i)return!1;e instanceof a$I&&(e.onChangeCallback=void 0,e.index=-1);for(var n=t.length-1,r=i;r<n;++r){var o=t[r+1];t[r]=o,o instanceof a$I&&(o.index=r)}return this._multipleDirtyPlanes=!0,t.length=n,this.planeRemoved.raiseEvent(e,i),!0},h$L.prototype.removeAll=function(){for(var e=this._planes,t=e.length,i=0;i<t;++i){var n=e[i];n instanceof a$I&&(n.onChangeCallback=void 0,n.index=-1),this.planeRemoved.raiseEvent(n,i)}this._multipleDirtyPlanes=!0,this._planes=[]};var j$M=new e$2c,k$J=new e$2c;function V$H(e,t,i){for(var n=e._uint8View,r=e._planes,o=0,a=t;a<i;++a){var s=r[a],l=t$$.octEncodeToCartesian4(s.normal,k$J);n[o]=l.x,n[o+1]=l.y,n[o+2]=l.z,n[o+3]=l.w;var u=e$2c.packFloat(s.distance,j$M);n[o+4]=u.x,n[o+5]=u.y,n[o+6]=u.z,n[o+7]=u.w,o+=8}}function M$O(e,t,i){for(var n=e._float32View,r=e._planes,o=0,a=t;a<i;++a){var s=r[a],l=s.normal;n[o]=l.x,n[o+1]=l.y,n[o+2]=l.z,n[o+3]=s.distance,o+=4}}function b$X(e,t){var i=e$1W.maximumTextureSize;return t.x=Math.min(e,i),t.y=Math.ceil(e/t.x),t}var H$P=new o$1o;h$L.prototype.update=function(e){var t=this._clippingPlanesTexture,i=e.context,n=h$L.useFloatTexture(i),r=n?this.length:2*this.length;if(e$2e(t)){var o=t.width*t.height;(o<r||r<.25*o)&&(t.destroy(),t=void 0,this._clippingPlanesTexture=void 0)}if(0!==this.length){if(!e$2e(t)){var a=b$X(r,H$P);a.y*=2;var s=new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST});n?(t=new t$U({context:i,width:a.x,height:a.y,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT,sampler:s,flipY:!1}),this._float32View=new Float32Array(a.x*a.y*4)):(t=new t$U({context:i,width:a.x,height:a.y,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:s,flipY:!1}),this._uint8View=new Uint8Array(a.x*a.y*4)),this._clippingPlanesTexture=t,this._multipleDirtyPlanes=!0}var l=this._dirtyIndex;if(this._multipleDirtyPlanes||-1!==l){if(this._multipleDirtyPlanes)n?(M$O(this,0,this._planes.length),t.copyFrom({width:t.width,height:t.height,arrayBufferView:this._float32View})):(V$H(this,0,this._planes.length),t.copyFrom({width:t.width,height:t.height,arrayBufferView:this._uint8View}));else{var u=0,c=0;n?(c=Math.floor(l/t.width),u=Math.floor(l-c*t.width),M$O(this,l,l+1),t.copyFrom({width:1,height:1,arrayBufferView:this._float32View},u,c)):(c=Math.floor(2*l/t.width),u=Math.floor(2*l-c*t.width),V$H(this,l,l+1),t.copyFrom({width:2,height:1,arrayBufferView:this._uint8View},u,c))}this._multipleDirtyPlanes=!1,this._dirtyIndex=-1}}};var J$H=new p$1d,S$J=new o$1m(o$1p.UNIT_X,0);h$L.prototype.computeIntersectionWithBoundingVolume=function(e,t){var i=this._planes,n=i.length,r=this.modelMatrix;e$2e(t)&&(r=p$1d.multiply(t,r,J$H));var o=Ae$w.INSIDE;!this.unionClippingRegions&&n>0&&(o=Ae$w.OUTSIDE);for(var a=0;a<n;++a){var s=i[a];o$1m.transform(s,r,S$J);var l=e.intersectPlane(S$J);if(l===Ae$w.INTERSECTING)o=l;else if(this._testIntersection(l))return l}return o},h$L.setOwner=function(e,t,i){if(e!==t[i]&&(t[i]=t[i]&&t[i].destroy(),e$2e(e))){if(e$2e(e._owner))throw new t$15("ClippingPlaneCollection should only be assigned to one object");e._owner=t,t[i]=e}},h$L.useFloatTexture=function(e){return e.floatingPointTexture},h$L.getTextureResolution=function(e,t,i){var n=e.texture;if(e$2e(n))return i.x=n.width,i.y=n.height,i;var r=b$X(h$L.useFloatTexture(t)?e.length:2*e.length,i);return r.y*=2,r},h$L.prototype.isDestroyed=function(){return!1},h$L.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),i$11(this)};var e$16={START:0,LOADING:1,DONE:2,FAILED:3},re$A=Object.freeze(e$16),I$Y={FAILED:0,UNLOADED:1,RECEIVING:2,UNZIP:3,UNZIPING:4,RECEIVED:5,TRANSFORMING:6,TRANSFORMED:7,READY:8,INVALID:9},Ee$j=Object.freeze(I$Y),Q$M=new i$1d,X$L=new i$1d,Z$J=new o$1p,$$K=new h$18;function Y$D(e,t){var i=e._ellipsoid,n=t.height,r=t.width,o=t.northCap,a=t.southCap,s=n,l=2,u=0,c=4;o&&(l-=1,s-=1,u+=1,c-=2),a&&(l-=1,s-=1,u+=1,c-=2),u+=l*r+2*s-c;var h,d=new Float64Array(3*u),f=0,p=0,_=Z$J;if(o)j$O.computePosition(t,i,!1,p,0,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;else for(h=0;h<r;h++)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(h=r-1,p=1;p<n;p++)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;if(p=n-1,!a)for(h=r-2;h>=0;h--)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(h=0,p=n-2;p>0;p--)j$O.computePosition(t,i,!1,p,h,_),d[f++]=_.x,d[f++]=_.y,d[f++]=_.z;for(var m=d.length/3*2,g=ce$z.createTypedArray(d.length/3,m),x=0,y=0;y<d.length/3-1;y++)g[x++]=y,g[x++]=y+1;g[x++]=d.length/3-1,g[x++]=0;var v=new I$1p({attributes:new a$_,primitiveType:W$18.LINES});return v.attributes.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:d}),v.indices=g,v}function G$X(e,t){var i=e._surfaceHeight,n=e._extrudedHeight,r=e._ellipsoid,o=n,a=i,s=Y$D(e,t),l=t.height,u=t.width,c=A$1f.scaleToGeodeticHeight(s.attributes.position.values,a,r,!1),h=c.length,d=new Float64Array(2*h);d.set(c);var f=A$1f.scaleToGeodeticHeight(s.attributes.position.values,o,r);d.set(f,h),s.attributes.position.values=d;var p=t.northCap,_=t.southCap,m=4;p&&(m-=1),_&&(m-=1);var g,x=2*(d.length/3+m),y=ce$z.createTypedArray(d.length/3,x);h=d.length/6;for(var v=0,$=0;$<h-1;$++)y[v++]=$,y[v++]=$+1,y[v++]=$+h,y[v++]=$+h+1;if(y[v++]=h-1,y[v++]=0,y[v++]=h+h-1,y[v++]=h,y[v++]=0,y[v++]=h,p)g=l-1;else{var b=u-1;y[v++]=b,y[v++]=b+h,g=u+l-2}if(y[v++]=g,y[v++]=g+h,!_){var T=u+g-1;y[v++]=T,y[v]=T+h}return s.indices=y,s}function k$I(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).rectangle,i=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),n=u$Z(e.ellipsoid,t$12.WGS84),r=u$Z(e.rotation,0);if(!e$2e(t))throw new t$15("rectangle is required.");if(h$18.validate(t),t.north<t.south)throw new t$15("options.rectangle.north must be greater than options.rectangle.south");var o=u$Z(e.height,0),a=u$Z(e.extrudedHeight,o);this._rectangle=h$18.clone(t),this._granularity=i,this._ellipsoid=n,this._surfaceHeight=Math.max(o,a),this._rotation=r,this._extrudedHeight=Math.min(o,a),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}k$I.packedLength=h$18.packedLength+t$12.packedLength+5,k$I.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),h$18.pack(e._rectangle,t,i),i+=h$18.packedLength,t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._extrudedHeight,t[i]=u$Z(e._offsetAttribute,-1),t};var V$G=new h$18,J$G=t$12.clone(t$12.UNIT_SPHERE),D$L={rectangle:V$G,ellipsoid:J$G,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};k$I.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n=h$18.unpack(e,t,V$G);t+=h$18.packedLength;var r=t$12.unpack(e,t,J$G);t+=t$12.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t];return e$2e(i)?(i._rectangle=h$18.clone(n,i._rectangle),i._ellipsoid=t$12.clone(r,i._ellipsoid),i._surfaceHeight=a,i._rotation=s,i._extrudedHeight=l,i._offsetAttribute=-1===u?void 0:u,i):(D$L.granularity=o,D$L.height=a,D$L.rotation=s,D$L.extrudedHeight=l,D$L.offsetAttribute=-1===u?void 0:u,new k$I(D$L))};var I$X=new a$18;function y$K(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.rectangle",e.rectangle),this.rectangle=h$18.clone(e.rectangle),this.minimumHeight=u$Z(e.minimumHeight,0),this.maximumHeight=u$Z(e.maximumHeight,0),this.southwestCornerCartesian=new o$1p,this.northeastCornerCartesian=new o$1p,this.westNormal=new o$1p,this.southNormal=new o$1p,this.eastNormal=new o$1p,this.northNormal=new o$1p;var t=u$Z(e.ellipsoid,t$12.WGS84);tt$c(this,e.rectangle,t),u$Z(e.computeBoundingVolumes,!0)&&(this._orientedBoundingBox=y$Y.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,t),this._boundingSphere=i$1d.fromOrientedBoundingBox(this._orientedBoundingBox))}k$I.createGeometry=function(e){var t,i,n=e._rectangle,r=e._ellipsoid,o=j$O.computeOptions(n,e._granularity,e._rotation,0,$$K,I$X);if(!e$2d.equalsEpsilon(n.north,n.south,e$2d.EPSILON10)&&!e$2d.equalsEpsilon(n.east,n.west,e$2d.EPSILON10)){var a=e._surfaceHeight,s=e._extrudedHeight;if(!e$2d.equalsEpsilon(a,s,0,e$2d.EPSILON2)){if(t=G$X(e,o),e$2e(e._offsetAttribute)){var l=t.attributes.position.values.length/3,u=new Uint8Array(l);e._offsetAttribute===_0x39c22a.TOP?u=d$1s(u,1,0,l/2):u=d$1s(u,e._offsetAttribute===_0x39c22a.NONE?0:1),t.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}var c=i$1d.fromRectangle3D(n,r,a,X$L),h=i$1d.fromRectangle3D(n,r,s,Q$M);i=i$1d.union(c,h)}else{if((t=Y$D(e,o)).attributes.position.values=A$1f.scaleToGeodeticHeight(t.attributes.position.values,a,r,!1),e$2e(e._offsetAttribute)){var d=t.attributes.position.values.length,f=new Uint8Array(d/3);d$1s(f,e._offsetAttribute===_0x39c22a.NONE?0:1),t.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}i=i$1d.fromRectangle3D(n,r,a)}return new I$1p({attributes:t.attributes,indices:t.indices,primitiveType:W$18.LINES,boundingSphere:i,offsetAttribute:e._offsetAttribute})}},Object.defineProperties(y$K.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});var z$K=new o$1p,M$N=new o$1p,E$P=new o$1p,$$J=new o$1p,F$N=new o$1p,B$J=new o$1p,o$P=new a$18,G$W=new o$1m(o$1p.UNIT_X,0),f$P=new f$19;function tt$c(e,t,i){i.cartographicToCartesian(h$18.southwest(t),e.southwestCornerCartesian),i.cartographicToCartesian(h$18.northeast(t),e.northeastCornerCartesian),o$P.longitude=t.west,o$P.latitude=.5*(t.south+t.north),o$P.height=0;var n=i.cartographicToCartesian(o$P,F$N),r=o$1p.cross(n,o$1p.UNIT_Z,z$K);o$1p.normalize(r,e.westNormal),o$P.longitude=t.east;var o=i.cartographicToCartesian(o$P,B$J),a=o$1p.cross(o$1p.UNIT_Z,o,z$K);o$1p.normalize(a,e.eastNormal);var s,l=o$1p.subtract(n,o,z$K),u=o$1p.normalize(l,$$J),c=t.south;if(c>0){o$P.longitude=.5*(t.west+t.east),o$P.latitude=c;var h=i.cartographicToCartesian(o$P,f$P.origin);o$1p.clone(u,f$P.direction);var d=o$1m.fromPointNormal(e.southwestCornerCartesian,e.westNormal,G$W);g$1j.rayPlane(f$P,d,e.southwestCornerCartesian),s=i.geodeticSurfaceNormal(h,M$N)}else s=i.geodeticSurfaceNormalCartographic(h$18.southeast(t),M$N);var f=o$1p.cross(s,l,E$P);o$1p.normalize(f,e.southNormal);var p,_=t.north;if(_<0){o$P.longitude=.5*(t.west+t.east),o$P.latitude=_;var m=i.cartographicToCartesian(o$P,f$P.origin);o$1p.negate(u,f$P.direction);var g=o$1m.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,G$W);g$1j.rayPlane(f$P,g,e.northeastCornerCartesian),p=i.geodeticSurfaceNormal(m,M$N)}else p=i.geodeticSurfaceNormalCartographic(h$18.northwest(t),M$N);var x=o$1p.cross(l,p,E$P);o$1p.normalize(x,e.northNormal)}var rt$d=new o$1p,et$c=new o$1p,it$7=new o$1p(0,-1,0),at$a=new o$1p(0,0,-1),Z$I=new o$1p;y$K.prototype.distanceToCamera=function(e){o$1q.defined("frameState",e);var t=e.camera,i=new o$1p,n=new a$18;if(e$2e(t._sensitivePosition)&&t._sensitivePositionRatio>0){var r=a$18.fromCartesian(t._sensitivePosition);n.latitude=r.latitude*t._sensitivePositionRatio+t.positionCartographic.latitude*(1-t._sensitivePositionRatio),n.longitude=r.longitude*t._sensitivePositionRatio+t.positionCartographic.longitude*(1-t._sensitivePositionRatio),n.height=t.positionCartographic.height,i=a$18.toCartesian(n)}else i=t.positionWC,n=t.positionCartographic;var o,a,s,l=0;if(!h$18.contains(this.rectangle,n)){var u=this.southwestCornerCartesian,c=this.northeastCornerCartesian,h=this.westNormal,d=this.southNormal,f=this.eastNormal,p=this.northNormal;e.mode!==C$14.SCENE3D&&((u=e.mapProjection.project(h$18.southwest(this.rectangle),rt$d)).z=u.y,u.y=u.x,u.x=0,(c=e.mapProjection.project(h$18.northeast(this.rectangle),et$c)).z=c.y,c.y=c.x,c.x=0,h=it$7,f=o$1p.UNIT_Y,d=at$a,p=o$1p.UNIT_Z);var _=o$1p.subtract(i,u,Z$I),m=o$1p.dot(_,h),g=o$1p.dot(_,d),x=o$1p.subtract(i,c,Z$I),y=o$1p.dot(x,f),v=o$1p.dot(x,p);m>0?l+=m*m:y>0&&(l+=y*y),g>0?l+=g*g:v>0&&(l+=v*v)}e.mode===C$14.SCENE3D?(o=n.height,a=this.minimumHeight,s=this.maximumHeight):(o=i.x,a=this.minimumHeight,s=this.maximumHeight);var $=0;if(o>s){var b=o-s;$=b*b}else if(o<a){var T=a-o;$=T*T}return l>t._sensitiveRegionRatio*$?l+=$:l=$,Math.sqrt(l)},y$K.prototype.intersectPlane=function(e){return o$1q.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)},y$K.prototype.createDebugVolume=function(e){o$1q.defined("color",e);var t=new p$1d.clone(p$1d.IDENTITY);return new y$R({geometryInstances:new d$1o({geometry:new k$I({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),id:"outline",modelMatrix:t,attributes:{color:o$16.fromColor(e)}}),appearance:new t$Q({translucent:!1,flat:!0}),asynchronous:!1})};var d$10={};function p$O(e){if(!e$2e(e)||!e$2e(e.quantizedVertices))throw new t$15("options.quantizedVertices is required.");if(!e$2e(e.indices))throw new t$15("options.indices is required.");if(!e$2e(e.minimumHeight))throw new t$15("options.minimumHeight is required.");if(!e$2e(e.maximumHeight))throw new t$15("options.maximumHeight is required.");if(!e$2e(e.boundingSphere))throw new t$15("options.boundingSphere is required.");if(!e$2e(e.horizonOcclusionPoint))throw new t$15("options.horizonOcclusionPoint is required.");if(!e$2e(e.westIndices))throw new t$15("options.westIndices is required.");if(!e$2e(e.southIndices))throw new t$15("options.southIndices is required.");if(!e$2e(e.eastIndices))throw new t$15("options.eastIndices is required.");if(!e$2e(e.northIndices))throw new t$15("options.northIndices is required.");if(!e$2e(e.westSkirtHeight))throw new t$15("options.westSkirtHeight is required.");if(!e$2e(e.southSkirtHeight))throw new t$15("options.southSkirtHeight is required.");if(!e$2e(e.eastSkirtHeight))throw new t$15("options.eastSkirtHeight is required.");if(!e$2e(e.northSkirtHeight))throw new t$15("options.northSkirtHeight is required.");this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;var t=this._quantizedVertices.length/3,i=this._uValues=this._quantizedVertices.subarray(0,t),n=this._vValues=this._quantizedVertices.subarray(t,2*t);function r(e,t){return n[e]-n[t]}function o(e,t){return i[e]-i[t]}this._heightValues=this._quantizedVertices.subarray(2*t,3*t),this._westIndices=y$J(e.westIndices,r,t),this._southIndices=y$J(e.southIndices,o,t),this._eastIndices=y$J(e.eastIndices,r,t),this._northIndices=y$J(e.northIndices,o,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=u$Z(e.childTileMask,15),this._createdByUpsampling=u$Z(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0,this._normalTexture=e.normalTexture,this.invalid=u$Z(e.invalid,!1),0===this._maximumHeight&&(this.invalid=!0),this.rasterIndex=e.rasterIndex,this.rasterVertex=e.rasterVertex,this.modelMatrix=e.modelMatrix,this.hasInvalid=e.hasInvalid,this._validMinimumHeight=e.validMinimumHeight,this._validMaximumHeight=e.validMaximumHeight,this._validOrientedBoundingBox=e.validOrientedBoundingBox}d$10.clipTriangleAtAxisAlignedThreshold=function(e,t,i,n,r,o){if(!e$2e(e))throw new t$15("threshold is required.");if(!e$2e(t))throw new t$15("keepAbove is required.");if(!e$2e(i))throw new t$15("u0 is required.");if(!e$2e(n))throw new t$15("u1 is required.");if(!e$2e(r))throw new t$15("u2 is required.");var a,s,l;e$2e(o)?o.length=0:o=[],t?(a=i<e,s=n<e,l=r<e):(a=i>e,s=n>e,l=r>e);var u,c,h,d,f,p,_=a+s+l;return 1===_?a?(u=(e-i)/(n-i),c=(e-i)/(r-i),o.push(1),o.push(2),1!==c&&(o.push(-1),o.push(0),o.push(2),o.push(c)),1!==u&&(o.push(-1),o.push(0),o.push(1),o.push(u))):s?(h=(e-n)/(r-n),d=(e-n)/(i-n),o.push(2),o.push(0),1!==d&&(o.push(-1),o.push(1),o.push(0),o.push(d)),1!==h&&(o.push(-1),o.push(1),o.push(2),o.push(h))):l&&(f=(e-r)/(i-r),p=(e-r)/(n-r),o.push(0),o.push(1),1!==p&&(o.push(-1),o.push(2),o.push(1),o.push(p)),1!==f&&(o.push(-1),o.push(2),o.push(0),o.push(f))):2===_?a||i===e?s||n===e?!l&&r!==e&&(c=(e-i)/(r-i),h=(e-n)/(r-n),o.push(2),o.push(-1),o.push(0),o.push(2),o.push(c),o.push(-1),o.push(1),o.push(2),o.push(h)):(p=(e-r)/(n-r),u=(e-i)/(n-i),o.push(1),o.push(-1),o.push(2),o.push(1),o.push(p),o.push(-1),o.push(0),o.push(1),o.push(u)):(d=(e-n)/(i-n),f=(e-r)/(i-r),o.push(0),o.push(-1),o.push(1),o.push(0),o.push(d),o.push(-1),o.push(2),o.push(0),o.push(f)):3!==_&&(o.push(0),o.push(1),o.push(2)),o},d$10.computeBarycentricCoordinates=function(e,t,i,n,r,o,a,s,l){if(!e$2e(e))throw new t$15("x is required.");if(!e$2e(t))throw new t$15("y is required.");if(!e$2e(i))throw new t$15("x1 is required.");if(!e$2e(n))throw new t$15("y1 is required.");if(!e$2e(r))throw new t$15("x2 is required.");if(!e$2e(o))throw new t$15("y2 is required.");if(!e$2e(a))throw new t$15("x3 is required.");if(!e$2e(s))throw new t$15("y3 is required.");var u=i-a,c=a-r,h=o-s,d=n-s,f=1/(h*u+c*d),p=t-s,_=e-a,m=(h*_+c*p)*f,g=(-d*_+u*p)*f,x=1-m-g;return e$2e(l)?(l.x=m,l.y=g,l.z=x,l):new o$1p(m,g,x)},d$10.computeLineSegmentLineSegmentIntersection=function(e,t,i,n,r,o,a,s,l){o$1q.typeOf.number("x00",e),o$1q.typeOf.number("y00",t),o$1q.typeOf.number("x01",i),o$1q.typeOf.number("y01",n),o$1q.typeOf.number("x10",r),o$1q.typeOf.number("y10",o),o$1q.typeOf.number("x11",a),o$1q.typeOf.number("y11",s);var u=(s-o)*(i-e)-(a-r)*(n-t);if(0!==u){var c=((a-r)*(t-o)-(s-o)*(e-r))/u,h=((i-e)*(t-o)-(n-t)*(e-r))/u;if(c>=0&&c<=1&&h>=0&&h<=1)return e$2e(l)||(l=new o$1o),l.x=e+c*(i-e),l.y=t+c*(n-t),l}},Object.defineProperties(p$O.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return e$2e(this._mesh)}},normalTexture:{get:function(){return this._normalTexture}}});var B$I=[];function y$J(e,t,i){B$I.length=e.length;for(var n=!1,r=0,o=e.length;r<o;++r)B$I[r]=e[r],n=n||r>0&&t(e[r-1],e[r])>0;return n?(B$I.sort(t),ce$z.createTypedArray(i,B$I)):e}var F$M=new i$W("createVerticesFromQuantizedTerrainMesh");p$O.prototype.createMesh=function(e,t,i,n,r){if(!e$2e(e))throw new t$15("tilingScheme is required.");if(!e$2e(t))throw new t$15("x is required.");if(!e$2e(i))throw new t$15("y is required.");if(!e$2e(n))throw new t$15("level is required.");var o=e.ellipsoid,a=e.tileXYToRectangle(t,i,n);r=u$Z(r,1);var s=F$M.scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,validMinimumHeight:this._validMinimumHeight,validMaximumHeight:this._validMaximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:a,relativeToCenter:this._boundingSphere.center,ellipsoid:o,exaggeration:r,level:n});if(e$2e(s)){var l=this;return o$1l(s,(function(e){var t=l._quantizedVertices.length/3,i=t+l._westIndices.length+l._southIndices.length+l._eastIndices.length+l._northIndices.length,n=ce$z.createTypedArray(i,e.indices),o=new Float32Array(e.vertices),a=e.center,s=e.minimumHeight,u=e.maximumHeight,c=u$Z(i$1d.clone(e.boundingSphere),l._boundingSphere),h=u$Z(y$Y.clone(e.orientedBoundingBox),l._orientedBoundingBox),d=u$Z(y$Y.clone(e.validOrientedBoundingBox),l._validOrientedBoundingBox),f=u$Z(o$1p.clone(e.occludeePointInScaledSpace),l._horizonOcclusionPoint),p=e.vertexStride,_=h$M.clone(e.encoding),m=0===n.length||0===u||l.invalid;return l._mesh=new T$M(a,o,n,e.indexCountWithoutSkirts,t,s,u,c,f,p,h,_,r,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast,m,d),l._quantizedVertices=void 0,l._encodedNormals=void 0,l._indices=void 0,l._uValues=void 0,l._vValues=void 0,l._heightValues=void 0,l._westIndices=void 0,l._southIndices=void 0,l._eastIndices=void 0,l._northIndices=void 0,l._mesh}))}};var X$K=new i$W("upsampleQuantizedTerrainMesh");p$O.prototype.upsample=function(e,t,i,n,r,o,a){if(!e$2e(e))throw new t$15("tilingScheme is required.");if(!e$2e(t))throw new t$15("thisX is required.");if(!e$2e(i))throw new t$15("thisY is required.");if(!e$2e(n))throw new t$15("thisLevel is required.");if(!e$2e(r))throw new t$15("descendantX is required.");if(!e$2e(o))throw new t$15("descendantY is required.");if(!e$2e(a))throw new t$15("descendantLevel is required.");if(a-n>1)throw new t$15("Upsampling through more than one level at a time is not currently supported.");var s=this._mesh;if(e$2e(this._mesh)){var l=2*t!==r,u=2*i===o,c=e.ellipsoid,h=e.tileXYToRectangle(r,o,a),d=X$K.scheduleTask({vertices:s.vertices,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,validMinimumHeight:this._validMinimumHeight,validMaximumHeight:this._validMaximumHeight,isEastChild:l,isNorthChild:u,childRectangle:h,ellipsoid:c,exaggeration:s.exaggeration});if(e$2e(d)){var f=Math.min(this._westSkirtHeight,this._eastSkirtHeight);f=Math.min(f,this._southSkirtHeight),f=Math.min(f,this._northSkirtHeight);var p=l?.5*f:this._westSkirtHeight,_=u?.5*f:this._southSkirtHeight,m=l?this._eastSkirtHeight:.5*f,g=u?this._northSkirtHeight:.5*f,x=this._credits;return o$1l(d).then((function(e){var t,i=new Uint16Array(e.vertices),n=ce$z.createTypedArray(i.length/3,e.indices);if(e$2e(e.encodedNormals)&&(t=new Uint8Array(e.encodedNormals)),e$2e(e.horizonOcclusionPoint))return new p$O({quantizedVertices:i,indices:n,encodedNormals:t,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:i$1d.clone(e.boundingSphere),orientedBoundingBox:y$Y.clone(e.orientedBoundingBox),horizonOcclusionPoint:o$1p.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:p,southSkirtHeight:_,eastSkirtHeight:m,northSkirtHeight:g,childTileMask:0,credits:x,createdByUpsampling:!0,validMaximumHeight:e.validMaximumHeight,validMinimumHeight:e.validMinimumHeight,validOrientedBoundingBox:e.validOrientedBoundingBox})}))}}};var N$G=32767,E$O=new o$1p;function R$J(e,t,i,n,r,o,a,s){var l=Math.min(i,r,a),u=Math.max(i,r,a),c=Math.min(n,o,s),h=Math.max(n,o,s);return e>=l&&e<=u&&t>=c&&t<=h}p$O.prototype.interpolateHeight=function(e,t,i){var n=e$2d.clamp((t-e.west)/e.width,0,1),r=n*N$G,o=e$2d.clamp((i-e.south)/e.height,0,1),a=o*N$G;return e$2e(this._mesh)?J$F(this,n,o):K$I(this,r,a)};var Y$C=new o$1o,D$K=new o$1o,G$V=new o$1o;function J$F(e,t,i){for(var n=e._mesh,r=n.vertices,o=n.encoding,a=n.indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=o.decodeTextureCoordinates(r,u,Y$C),f=o.decodeTextureCoordinates(r,c,D$K),p=o.decodeTextureCoordinates(r,h,G$V);if(R$J(t,i,d.x,d.y,f.x,f.y,p.x,p.y)){var _=d$10.computeBarycentricCoordinates(t,i,d.x,d.y,f.x,f.y,p.x,p.y,E$O);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){var m=o.decodeHeight(r,u),g=o.decodeHeight(r,c),x=o.decodeHeight(r,h);return _.x*m+_.y*g+_.z*x}}}}function K$I(e,t,i){for(var n=e._uValues,r=e._vValues,o=e._heightValues,a=e._indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=n[u],f=n[c],p=n[h],_=r[u],m=r[c],g=r[h];if(R$J(t,i,d,_,f,m,p,g)){var x=d$10.computeBarycentricCoordinates(t,i,d,_,f,m,p,g,E$O);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){var y=x.x*o[u]+x.y*o[c]+x.z*o[h];return e$2d.lerp(e._minimumHeight,e._maximumHeight,y/N$G)}}}}p$O.prototype.isChildAvailable=function(e,t,i,n){if(!e$2e(e))throw new t$15("thisX is required.");if(!e$2e(t))throw new t$15("thisY is required.");if(!e$2e(i))throw new t$15("childX is required.");if(!e$2e(n))throw new t$15("childY is required.");var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},p$O.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var D$J={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=D$J.RENDERED_AND_KICKED},originalResult:function(e){return 3&e},kick:function(e){return 4|e}},w$K=32767,P$J=w$K/2|0,ie$w=new o$1p,ot$7=new o$1p,ht$6=new o$1p,h$K=new a$18,qe$a=new o$1o,dt$8=[],Ge$c=[],ut$8=[],ft$6=[],ct$6=[],vt$8=[],gt$6=[],lt$3=new o$1p,mt$4=new i$1d,pt$7=new y$Y,It$7=new o$1o;function Ne$h(){}function wt$6(e){var t,i=e.length,n=0;for(t=0;t<i;t++){n+=(s=e[t]).indices.length}var r=new Uint16Array(n),o=0,a=0;for(t=0;t<i;t++){for(var s,l=(s=e[t]).indices.length,u=0;u<l;u++)r[o+u]=s.indices[u]+a;o+=l,a+=s.attributes.position.values.length/3}return r}function Be$h(e,t){var i;return"function"==typeof e.slice&&("function"!=typeof(i=e.slice()).sort&&(i=void 0)),e$2e(i)||(i=Array.prototype.slice.call(e)),i.sort(t),i}function Ae$m(e,t,i,n,r,o,a,s,l,u,c){var h=s.north,d=s.south,f=s.east,p=s.west;f<p&&(f+=e$2d.TWO_PI);for(var _=i.length,m=0;m<_;++m){var g=i[m],x=r[g],y=o[g];h$K.longitude=e$2d.lerp(p,f,y.x)+u,h$K.latitude=e$2d.lerp(d,h,y.y)+c,h$K.height=x-l;var v=a.cartographicToCartesian(h$K,ie$w);t=n.encode(e,t,v,y,h$K.height,qe$a,0)}}function x$S(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}x$S.prototype.clone=function(e){return e$2e(e)||(e=new x$S),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},x$S.prototype.initializeIndexed=function(e,t,i,n){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=i,this.index=n,this.first=void 0,this.second=void 0,this.ratio=void 0},x$S.prototype.initializeFromClipResult=function(e,t,i){var n=t+1;return-1!==e[t]?i[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=i[e[n]],++n,this.second=i[e[n]],++n,this.ratio=e[n],++n),n},x$S.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},x$S.prototype.isIndexed=function(){return e$2e(this.index)},x$S.prototype.getH=function(){return e$2e(this.index)?this.heightBuffer[this.index]:e$2d.lerp(this.first.getH(),this.second.getH(),this.ratio)},x$S.prototype.getU=function(){return e$2e(this.index)?this.uBuffer[this.index]:e$2d.lerp(this.first.getU(),this.second.getU(),this.ratio)},x$S.prototype.getV=function(){return e$2e(this.index)?this.vBuffer[this.index]:e$2d.lerp(this.first.getV(),this.second.getV(),this.ratio)};var N$F=[];function We$f(e,t,i,n,r,o,a){if(0!==o.length){for(var s=0,l=0;l<o.length;)l=N$F[s++].initializeFromClipResult(o,l,a);for(var u=0;u<s;++u){var c=N$F[u];if(c.isIndexed())c.newIndex=r[c.index],c.uBuffer=e,c.vBuffer=t,c.heightBuffer=i;else{var h=c.getKey();if(e$2e(r[h]))c.newIndex=r[h];else{var d=e.length;e.push(c.getU()),t.push(c.getV()),i.push(c.getH()),c.newIndex=d,r[h]=d}}}3===s?(n.push(N$F[0].newIndex),n.push(N$F[1].newIndex),n.push(N$F[2].newIndex)):4===s&&(n.push(N$F[0].newIndex),n.push(N$F[1].newIndex),n.push(N$F[2].newIndex),n.push(N$F[0].newIndex),n.push(N$F[2].newIndex),n.push(N$F[3].newIndex))}}N$F.push(new x$S),N$F.push(new x$S),N$F.push(new x$S),N$F.push(new x$S),Ne$h.createTerrainMesh=function(e,t){var i=e.tilingScheme.ellipsoid,n=e.rectangle,r=t._quantizedVertices,o=r.length/3,a=t._westIndices.length+t._eastIndices.length+t._southIndices.length+t._northIndices.length,s=n.west,l=n.south,u=n.east,c=n.north,h=1*t._minimumHeight,d=1*t._maximumHeight,f=t$N.geodeticLatitudeToMercatorAngle(l),p=1/(t$N.geodeticLatitudeToMercatorAngle(c)-f),_=t._boundingSphere.center,m=r.subarray(0,o),g=r.subarray(o,2*o),x=r.subarray(2*o,3*o),y=new Array(o),v=new Array(o),$=new Array(o),b=new Array(o),T=ot$7;T.x=Number.POSITIVE_INFINITY,T.y=Number.POSITIVE_INFINITY,T.z=Number.POSITIVE_INFINITY;var C=ht$6;C.x=Number.NEGATIVE_INFINITY,C.y=Number.NEGATIVE_INFINITY,C.z=Number.NEGATIVE_INFINITY;for(var S=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,E=Number.POSITIVE_INFINITY,P=Number.NEGATIVE_INFINITY,A=0;A<o;++A){var L,M;if(t.wasCreatedByUpsampling()){var R=m[A],O=g[A];L=R/w$K,M=O/w$K,h$K.longitude=e$2d.lerp(s,u,L),h$K.latitude=e$2d.lerp(l,c,M),h$K.height=x[A]}else h$K.longitude=m[A],h$K.latitude=g[A],h$K.height=x[A],L=(h$K.longitude-s)/n.width,M=(h$K.latitude-l)/n.height;S=Math.min(h$K.longitude,S),w=Math.max(h$K.longitude,w),E=Math.min(h$K.latitude,E),P=Math.max(h$K.latitude,P);var D=i.cartographicToCartesian(h$K);y[A]=new o$1o(L,M),v[A]=h$K.height,$[A]=D,b[A]=(t$N.geodeticLatitudeToMercatorAngle(h$K.latitude)-f)*p}var I,B,F=Be$h(t._westIndices,(function(e,t){return y[e].y-y[t].y})),N=Be$h(t._eastIndices,(function(e,t){return y[t].y-y[e].y})),G=Be$h(t._southIndices,(function(e,t){return y[t].x-y[e].x})),z=Be$h(t._northIndices,(function(e,t){return y[e].x-y[t].x}));B=i$1d.fromPoints($),I=y$Y.fromRectangle(n,h,d,i),_=o$1p.clone(B.center);var U=m$19.eastNorthUpToFixedFrame(_,i),V=p$1d.inverseTransformation(U,new p$1d);for(A=0;A<o;A++){D=$[A];p$1d.multiplyByPoint(V,D,ie$w),o$1p.minimumByComponent(ie$w,T,T),o$1p.maximumByComponent(ie$w,C,C)}for(var k=new h$M(new e$29(T,C,_),h,d,U,!1,!0),W=k.getStride(),H=new Float32Array(o*W+a*W),q=0,j=0;j<o;++j)q=k.encode(H,q,$[j],y[j],v[j],qe$a,b[j]);var X=Math.max(0,2*(a-4)),Y=t._indices.length+3*X,Z=ce$z.createTypedArray(o+a,Y);Z.set(t._indices,0);var K=1e-4,Q=(w-S)*K,J=(P-E)*K,ee=-Q,te=Q,ie=J,ne=-J,re=o*W;Ae$m(H,re,F,k,v,y,i,n,t._westSkirtHeight,ee,0),Ae$m(H,re+=t._westIndices.length*W,G,k,v,y,i,n,t._southSkirtHeight,0,ne),Ae$m(H,re+=t._southIndices.length*W,N,k,v,y,i,n,t._eastSkirtHeight,te,0),Ae$m(H,re+=t._eastIndices.length*W,z,k,v,y,i,n,t._northSkirtHeight,0,ie),I$12.addSkirtIndices(F,G,N,z,o,Z,t._indices.length,void 0);var oe=t._quantizedVertices.length/3,ae=oe+t._westIndices.length+t._southIndices.length+t._eastIndices.length+t._northIndices.length,se=ce$z.createTypedArray(ae,Z.buffer),le=0===se.length;return t._mesh=new T$M(_,H,se,t._indices.length,oe,h,d,B,void 0,W,I,k,1,F,G,N,z,le),t._quantizedVertices=void 0,t._encodedNormals=void 0,t._indices=void 0,t._uValues=void 0,t._vValues=void 0,t._heightValues=void 0,t._westIndices=void 0,t._southIndices=void 0,t._eastIndices=void 0,t._northIndices=void 0,t._mesh},Ne$h.upsampleTerrainData=function(e){var t=e.parent;if(e$2e(t)&&e$2e(t.data)&&e$2e(t.data.modifyTerrainData)){var i=t.data.modifyTerrainData,n=t.x,r=t.y;t.level;var o=i._mesh;if(e$2e(o)){var a=2*n!==e.x,s=2*r===e.y,l=e.tilingScheme,u=l.ellipsoid,c=l.tileXYToRectangle(e.x,e.y,e.level),h=a?P$J:0,d=a?w$K:P$J,f=s?P$J:0,p=s?w$K:P$J,_=ft$6,m=ct$6,g=vt$8;_.length=0,m.length=0,g.length=0;var x=gt$6;x.length=0;var y={},v=o.vertices,$=o.indices;$=$.subarray(0,o.indexCountWithoutSkirts);var b=o.encoding,T=o.exaggeration,C=0,S=o.vertexCountWithoutSkirts;i._minimumHeight,i._maximumHeight;var w,E,P,A,L,M=new Array(S),R=new Array(S),O=new Array(S);for(E=0,P=0;E<S;++E,P+=2){var D=b.decodeTextureCoordinates(v,E,It$7);w=b.decodeHeight(v,E)/T,A=e$2d.clamp(D.x*w$K|0,0,w$K),L=e$2d.clamp(D.y*w$K|0,0,w$K),O[E]=w,A<20&&(A=0),L<20&&(L=0),w$K-A<20&&(A=w$K),w$K-L<20&&(L=w$K),M[E]=A,R[E]=L,(a&&A>=P$J||!a&&A<=P$J)&&(s&&L>=P$J||!s&&L<=P$J)&&(y[E]=C,_.push(A),m.push(L),g.push(O[E]),++C)}var I=[];I.push(new x$S),I.push(new x$S),I.push(new x$S);var B,F=[];for(F.push(new x$S),F.push(new x$S),F.push(new x$S),E=0;E<$.length;E+=3){var N=$[E],G=$[E+1],z=$[E+2],U=M[N],V=M[G],k=M[z];I[0].initializeIndexed(M,R,O,N),I[1].initializeIndexed(M,R,O,G),I[2].initializeIndexed(M,R,O,z);var W=d$10.clipTriangleAtAxisAlignedThreshold(P$J,a,U,V,k,dt$8);!((B=0)>=W.length)&&(!((B=F[0].initializeFromClipResult(W,B,I))>=W.length)&&(!((B=F[1].initializeFromClipResult(W,B,I))>=W.length)&&(B=F[2].initializeFromClipResult(W,B,I),We$f(_,m,g,x,y,d$10.clipTriangleAtAxisAlignedThreshold(P$J,s,F[0].getV(),F[1].getV(),F[2].getV(),Ge$c),F),B<W.length&&(F[2].clone(F[1]),F[2].initializeFromClipResult(W,B,I),We$f(_,m,g,x,y,d$10.clipTriangleAtAxisAlignedThreshold(P$J,s,F[0].getV(),F[1].getV(),F[2].getV(),Ge$c),F)))))}var H=a?-w$K:0,q=s?-w$K:0,j=[],X=[],Y=[],Z=[],K=Number.MAX_VALUE,Q=-K,J=ut$8;J.length=0;var ee=c,te=ee.north,ie=ee.south,ne=ee.east,re=ee.west;for(ne<re&&(ne+=e$2d.TWO_PI),E=0;E<_.length;++E)(A=Math.round(_[E]))<=h?(j.push(E),A=0):A>=d?(Y.push(E),A=w$K):A=2*A+H,_[E]=A,(L=Math.round(m[E]))<=f?(X.push(E),L=0):L>=p?(Z.push(E),L=w$K):L=2*L+q,m[E]=L,(w=g[E])<K&&(K=w),w>Q&&(Q=w),g[E]=w,h$K.longitude=e$2d.lerp(re,ne,A/w$K),h$K.latitude=e$2d.lerp(ie,te,L/w$K),h$K.height=w,u.cartographicToCartesian(h$K,ie$w),J.push(ie$w.x),J.push(ie$w.y),J.push(ie$w.z);var oe=i$1d.fromVertices(J,o$1p.ZERO,3,mt$4),ae=y$Y.fromRectangle(ee,K,Q,u,pt$7),se=new s$H(u).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(oe.center,J,3,oe.center,K,lt$3),le=new Float64Array(_.length+m.length+g.length);for(E=0;E<_.length;++E)le[E]=_[E];var ue=_.length;for(E=0;E<m.length;++E)le[ue+E]=m[E];for(ue+=m.length,E=0;E<g.length;++E)le[ue+E]=g[E];var ce=ce$z.createTypedArray(_.length,x),he=new Float64Array(le.buffer),de=ce$z.createTypedArray(he.length/3,ce.buffer),fe=Math.min(i._westSkirtHeight,i._eastSkirtHeight);fe=Math.min(fe,i._southSkirtHeight),fe=Math.min(fe,i._northSkirtHeight);var pe=a?.5*fe:i._westSkirtHeight,_e=s?.5*fe:i._southSkirtHeight,me=a?i._eastSkirtHeight:.5*fe,ge=s?i._northSkirtHeight:.5*fe,xe=i._credits;if(0!==he.length)return new p$O({quantizedVertices:he,indices:de,minimumHeight:K,maximumHeight:Q,boundingSphere:oe,orientedBoundingBox:ae,horizonOcclusionPoint:se,westIndices:j,southIndices:X,eastIndices:Y,northIndices:Z,westSkirtHeight:pe,southSkirtHeight:_e,eastSkirtHeight:me,northSkirtHeight:ge,childTileMask:0,credits:xe,createdByUpsampling:!0})}}},Ne$h.createTerrainData=function(e,t,i,n,r){var o=t.length;if(!(o<1)){e.data,e.rectangle;for(var a=[],s=0;s<o;s++){var l=t[s].attributes;a=a.concat(o$1p.unpackArray(l.position.values))}var u=a.length,c=new Float64Array(3*u);for(s=0;s<u;s++){var h=a[s];a$18.fromCartesian(h,void 0,h$K);var d=h$K.height;if(e$2e(r)){var f=yt$6(e,h$K);d=r+(f>0?f:0)}c[s]=h$K.longitude,c[u+s]=h$K.latitude,c[2*u+s]=d}return new p$O({quantizedVertices:c,indices:o>1?wt$6(t):t[0].indices,encodedNormals:void 0,minimumHeight:i,maximumHeight:n,boundingSphere:new i$1d,orientedBoundingBox:new y$Y,horizonOcclusionPoint:new o$1p,westIndices:[],southIndices:[],eastIndices:[],northIndices:[],westSkirtHeight:0,southSkirtHeight:0,eastSkirtHeight:0,northSkirtHeight:0,childTileMask:0,credits:void 0,createdByUpsampling:!1})}};var xt$6=new o$1p,Ke$a=new o$1p,St$3=new a$18,Tt$6=new f$19;function yt$6(e,t){if(!e$2e(t))throw new DeveloperError("cartographic is required");for(;e._lastSelectionResult===D$J.REFINED;)e=Ye$c(e.southwestChild,t)||Ye$c(e.southeastChild,t)||Ye$c(e.northwestChild,t)||e.northeastChild;if(e$2e(e.data)&&e$2e(e.data.renderedMesh)){var i=e.tilingScheme.ellipsoid,n=o$1p.fromRadians(t.longitude,t.latitude,0,i,xt$6),r=Tt$6,o=i.geodeticSurfaceNormal(n,r.direction);if(!e$2e(i.getSurfaceNormalIntersectionWithZAxis(n,11500,r.origin))){var a=Math.min(defaultValue(e.data.minimumHeight,0),-11500),s=o$1p.multiplyByScalar(o,Math.abs(a)+1,Ke$a);o$1p.subtract(n,s,r.origin)}if(e$2e(e.data.terrainData)&&e.data.terrainData instanceof p$O)return e.data.terrainData.interpolateHeight(e.rectangle,t.longitude,t.latitude);var l=e.data.pick(r,void 0,void 0,!1,Ke$a);if(e$2e(l))return i.cartesianToCartographic(l,St$3).height}}function Ye$c(e,t){return h$18.contains(e.rectangle,t)?e:void 0}function x$R(e){this.terrainLayer=e,this.terrainData=void 0,this.vertexArray=void 0,this.terrainState=Ee$j.UNLOADED,this.mesh=void 0,this.orientedBoundingBox=void 0,this.occludeePointInScaledSpace=new o$1p,this._rasterTerrainFBO=void 0,this._rasterTerrainTexture=void 0,this._rasterized=!1,this._rasterTextureSize=256}function $$I(e,t,i,n,r){function o(i){e.request=void 0,e$2e(i)?"cacheError"!==i?"cacheInvalid"!==i?(e.terrainData=i,e.terrainState=Ee$j.RECEIVED,t._isTerrainZ&&0!==r&&(e.terrainState=Ee$j.UNZIP,e.zipTerrainData=i,e.terrainData=void 0)):e.terrainState=Ee$j.FAILED:s(!1):e.terrainState=Ee$j.FAILED}function a(){if(e.request.state===W$1c.CANCELLED)return e.terrainData=void 0,e.terrainState=Ee$j.UNLOADED,void(e.request=void 0);e.terrainState=Ee$j.FAILED,e.request=void 0;var o="Failed to obtain terrain tile X: "+i+" Y: "+n+" Level: "+r+".";t._requestError=l$V.handleError(t._requestError,t,t.errorEvent,o,i,n,r,s)}function s(s){var l=new r$1c({throttle:!1,throttleByServer:!0,type:U$1f.TERRAIN});l.cacheEnable=s,e.request=l;var u=t.requestTileGeometry(i,n,r,l);e$2e(u)?(e.terrainState=Ee$j.RECEIVING,o$1l(u,o,a)):(e.terrainState=Ee$j.UNLOADED,e.request=void 0)}s(!0)}function ee$s(e,t,i,n,r,o,a){var s=t.parent;if(s){var l=s.data.terrain[e.terrainLayer.terrainProvider.tablename];if(e$2e(l)){var u=l.terrainData,c=s.x,h=s.y,d=s.level;if(e$2e(u)){var f=u.upsample(n.tilingScheme,c,h,d,r,o,a);!e$2e(f)||(e.terrainState=Ee$j.RECEIVING,o$1l(f,(function(t){if(e$2e(t)){var i=u.rasterVertex,n=u.rasterIndex,a=void 0,s=u.hasInvalid;if(e$2e(i)){var l=new p$1d(2,0,0,0,0,2,0,0,0,0,1,0,0,0,0,1);r%c==1&&(l[12]=-32767),o%h==0&&(l[13]=-32767),e$2e(u.modelMatrix)?(a=new p$1d,a=p$1d.multiply(l,u.modelMatrix,a)):a=l,t.rasterVertex=i,t.rasterIndex=n,t.modelMatrix=a,t.hasInvalid=s}e.terrainData=t,e.terrainState=Ee$j.RECEIVED}else e.terrainState=Ee$j.INVALID}),(function(){e.terrainState=Ee$j.FAILED})))}}}else t.state=QuadtreeTileLoadState.FAILED}function re$z(e,t,i,n,r){var o=t.unzip(e.zipTerrainData.buffer);e$2e(o)&&(e.terrainState=Ee$j.UNZIPING,o$1l(o,(function(i){if(!e$2e(i))return e.terrainState=Ee$j.FAILED,e.zipTerrainData=void 0,void(e.terrainData=void 0);e.terrainState=Ee$j.RECEIVED,e.terrainData=t.createTerrainData(e.zipTerrainData,i.data.buffer,!0),e.zipTerrainData=void 0}),(function(t){e.terrainState=Ee$j.FAILED})))}function te$x(e,t,i,n,r,o){var a=i.tilingScheme,s=e.terrainData.createMesh(a,n,r,o,t.terrainExaggeration);!e$2e(s)||(e.terrainState=Ee$j.TRANSFORMING,o$1l(s,(function(t){e.mesh=t,e.orientedBoundingBox=y$Y.clone(t.orientedBoundingBox,e.orientedBoundingBox),e.occludeePointInScaledSpace=o$1p.clone(t.occludeePointInScaledSpace,e.occludeePointInScaledSpace),e.terrainState=Ee$j.TRANSFORMED}),(function(){e.terrainState=Ee$j.FAILED})))}function R$I(){this.context=void 0,this.tileTerrain=void 0,this.mesh=void 0}x$R.prototype.freeResources=function(){this._rasterTerrainTexture=this._rasterTerrainTexture&&!this._rasterTerrainTexture.isDestroyed()&&this._rasterTerrainTexture.destroy(),this._rasterTerrainFBO=this._rasterTerrainFBO&&!this._rasterTerrainFBO.isDestroyed()&&this._rasterTerrainFBO.destroy(),this._rasterTerrainFBO=void 0},Object.defineProperties(x$R.prototype,{name:{get:function(){return this.terrainLayer.terrainProvider.tablename}}}),x$R.prototype.processStateMachine=function(e,t){var i=this.terrainLayer.terrainProvider;if(i._ready){var n=e.parent;if(e$2e(n)&&e$2e(n.data)){var r=n.data.terrain[i.tablename];if(e$2e(r)&&this.terrainState===Ee$j.FAILED)void 0!==r.terrainData&&!1!==r.terrainData.canUpsample||r.processStateMachine(n,t)}this.terrainState===Ee$j.FAILED&&ee$s(this,e,t,i,e.x,e.y,e.level),this.terrainState===Ee$j.UNLOADED&&$$I(this,i,e.x,e.y,e.level),this.terrainState===Ee$j.UNZIP&&re$z(this,i,e.x,e.y,e.level),this.terrainState===Ee$j.RECEIVED&&te$x(this,t,i,e.x,e.y,e.level),this.terrainState===Ee$j.TRANSFORMED&&ae$s(t,this,t.context,i,e.x,e.y,e.level),this.terrainState,Ee$j.INVALID}},R$I.prototype.set=function(e,t,i,n){this.context=e,this.tileTerrain=t,this.mesh=i,this.terrainProvider=n},R$I.prototype.execute=function(){var e=this.context,t=this.mesh,i=this.tileTerrain;!1===this.terrainProvider.isShowGlobe&&t.invalid?i.vertexArray=void 0:i.vertexArray=v$C._createVertexArrayForMesh(e,t)};var C$Q=new R$I;function ae$s(e,t,i,n,r,o,a){C$Q.set(i,t,t.mesh,n),e.jobScheduler.execute(C$Q,2)&&(t.terrainState=Ee$j.READY)}x$R.prototype.createRealtimeRasterTerrainFBO=function(e){this._rasterTerrainTexture=new t$U({context:e.context,width:this._rasterTextureSize,height:this._rasterTextureSize,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}),this._rasterTerrainFBO=new t$V({context:e.context,colorTextures:[this._rasterTerrainTexture],destroyAttachments:!1})};var ie$v=new f$1a(0,0,256,256);function v$C(){this.terrain={},this.imagery=[],this.gridImagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new e$2c(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.orientedBoundingBox=void 0,this.boundingVolumeSourceTile=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new o$1p,this.tileTerrainOrientedBoundingBox=void 0,this.terrainState=Ee$j.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new i$1d,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1,this.normalTexture=void 0,this.normalTextureTranslationAndScale=new e$2c(0,0,1,1),this.modifyTerrainData=void 0,this.modifyTerrainMesh=void 0,this.modifyTerrainVertexArray=void 0,this.modifyOrientedBoundingBox=void 0,this.subDivisionMesh=void 0,this.subDivisionVertexArray=void 0,this.invalid=!1,this.invalidMesh=void 0,this.invalidOrientedBoundingBox=void 0,this.invalidOccludeePointInScaledSpace=void 0,this.invalidVertexArray=void 0,this.invalidTerrainData=void 0}function C$P(e,t,i,n,r,o){if(e.decodePosition(n,r,o),e$2e(t)&&t!==C$14.SCENE3D){var a=i.ellipsoid.cartesianToCartographic(o);i.project(a,o),o$1p.fromElements(o.z,o.x,o.y,o)}return o}x$R.prototype.realtimeRasterValidTerrain=function(e,t,i){if(!(this._rasterized||i.level<2)&&e$2e(this.terrainData)){this._rasterized=!0;var n=void 0,r=void 0,o=p$1d.IDENTITY;if(e$2e(this.terrainData)){n=this.terrainData.rasterIndex,r=this.terrainData.rasterVertex;e$2e(this.terrainData.modelMatrix)&&(o=this.terrainData.modelMatrix)}if(!e$2e(r))return void(e$2e(this._rasterTerrainFBO)&&(i._clearCommand.framebuffer=this._rasterTerrainFBO,i._clearCommand.execute(e.context)));e$2e(this._rasterTerrainTexture)||this.createRealtimeRasterTerrainFBO(e);var a=t._rasterAAFBOs[0];i._clearCommand.framebuffer=a,i._clearCommand.execute(e.context),i._clearCommand.framebuffer=this._rasterTerrainFBO,i._clearCommand.execute(e.context);var s=i.setRasterValidTerrainCamera(i,e);if(e$2e(r)){var l=t$X.createVertexBuffer({context:e.context,typedArray:r,usage:A$18.STATIC_DRAW}),u=t$X.createIndexBuffer({context:e.context,typedArray:n,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.fromSizeInBytes(n.BYTES_PER_ELEMENT)});u.vertexArrayDestroyable=!1,u.referenceCount=1;var c,h=[{index:0,vertexBuffer:l,componentDatatype:S$14.SHORT,componentsPerAttribute:3,offsetInBytes:0,strideInBytes:3*S$14.getSizeInBytes(S$14.SHORT)}],d=new c$13({context:e.context,attributes:h,indexBuffer:u}),f=["attribute vec4 position;","void main()","{"," gl_Position = czm_modelViewProjection * vec4(position.xy, 0.0, 1.0);","}"].join("\n"),p=["void main()","{"," gl_FragColor = czm_packValue(0.0);","}"].join("\n"),_=new s$V({sources:[f]}),m=new s$V({sources:[p]});(c=new i$$).cull=!1,c.boundingVolume=new i$1d(o$1p.ZERO,65535),c.shaderProgram=r$14.fromCache({context:e.context,vertexShaderSource:_,fragmentShaderSource:m,attributeLocations:{position:0}}),c.modelMatrix=o,c.primitiveType=W$18.TRIANGLES,c.vertexArray=d,c.count=n.length,c.pass=2,c.renderState=d$1m.fromCache({viewport:ie$v}),c.framebuffer=this._rasterTerrainFBO,c.execute(e.context)}i.resetCamera(e,s)}},Object.defineProperties(v$C.prototype,{eligibleForUnloading:{get:function(){for(var e=this.terrainState,t=!(e===Ee$j.RECEIVING||e===Ee$j.TRANSFORMING),i=this.imagery,n=0,r=i.length;t&&n<r;++n){var o=i[n];t=!e$2e(o.loadingImagery)||o.loadingImagery.state!==wt$7.TRANSITIONING}return t}},renderedMesh:{get:function(){return e$2e(this.subDivisionVertexArray)?this.subDivisionMesh:e$2e(this.vertexArray)?this.mesh:e$2e(this.fill)?this.fill.mesh:void 0}}});var ae$r=new o$1p,te$w=new o$1p,ie$u=new o$1p;function ne$x(e,t,i,n){var r=t.getTileDataAvailable(e.x,e.y,e.level);if(!e$2e(r)&&e$2e(e.parent)){var o=e.parent,a=o.data;e$2e(a)&&e$2e(a.terrainData)&&(r=a.terrainData.isChildAvailable(o.x,o.y,e.x,e.y))}!1===r&&(e.data.terrainState=Ee$j.FAILED);for(var s=0,l=n.length;s<l;++s){var u=n.get(s);u.show&&u._createTileImagerySkeletons(e,t)}}function oe$p(e){var t=void 0;return e$2e(e.parent)&&e$2e(e.parent._childTileMaskExt)&&(t=e.x%e.parent.x==0?e.y%e.parent.y==0?e.parent._childTileMaskExt[0]:e.parent._childTileMaskExt[2]:e.y%e.parent.y==0?e.parent._childTileMaskExt[1]:e.parent._childTileMaskExt[3]),t}function de$p(e,t,i,n,r,o){var a=e.data,s=e.parent,l=!1;for(var u in a.terrain)a.terrain[u].processStateMachine(e,t),a.terrain[u].terrainState===Ee$j.FAILED&&(l=!0);if((a.terrainState===Ee$j.FAILED||l)&&void 0!==s)if(void 0!==s.data&&void 0!==s.data.terrainData&&!1!==s.data.terrainData.canUpsample){if(l)for(var u in s.data.terrain)(!e$2e(s.data.terrain[u].terrainData)||0==s.data.terrain[u].terrainData.canUpsample)&&s.data.terrain[u].processStateMachine(s,t)}else v$C.processStateMachine(s,t,i,n,r,!0);if(a.terrainState===Ee$j.FAILED&&se$q(a,e,t,i,e.x,e.y,e.level),a.terrainState===Ee$j.UNLOADED){var c=oe$p(e);fe$q(a,i,e.x,e.y,e.level,c)}if(a.terrainState===Ee$j.UNZIP&&ue$s(a,i,e.x,e.y,e.level),a.terrainState===Ee$j.RECEIVED&&(e$2e(a.terrainData)&&(e._childTileMaskExt=a.terrainData._childTileMaskExt),e.showInvalid&&!a.invalid&&a.setShowInvalid(),he$n(a,t,i,e.x,e.y,e.level)),a.terrainState===Ee$j.TRANSFORMED&&me$r(t,a,t.context,i,e.x,e.y,e.level,o),a.terrainState!==Ee$j.INVALID){var h;if(a.terrainState>=Ee$j.RECEIVED&&void 0===a.waterMaskTexture&&i.hasWaterMask)if(void 0!==a.terrainData.waterMask)ce$o(t.context,a);else e$2e(h=a._findAncestorTileWithTerrainData(e))&&e$2e(h.data.waterMaskTexture)&&(a.waterMaskTexture=h.data.waterMaskTexture,++a.waterMaskTexture.referenceCount,a._computeWaterMaskTranslationAndScale(e,h,a.waterMaskTranslationAndScale));if(a.terrainState>=Ee$j.RECEIVED&&void 0===a.normalTexture&&i.hasNormalBuffer)if(void 0!==a.terrainData._normalTexture)xe$l(t.context,a);else e$2e(h=a._findAncestorTileWithTerrainData(e))&&e$2e(h.data.normalTexture)&&(a.normalTexture=h.data.normalTexture,++a.normalTexture.referenceCount,a._computeNormalTextureTranslationAndScale(e,h,a.normalTextureTranslationAndScale))}}function se$q(e,t,i,n,r,o,a){var s=t.parent;if(s){var l=s.data.terrainData,u=s.x,c=s.y,h=s.level;if(e$2e(l)){var d=l.upsample(n.tilingScheme,u,c,h,r,o,a);!e$2e(d)||(e.terrainState=Ee$j.RECEIVING,o$1l(d,(function(t){if(e$2e(t)){e.terrainData=t;var i=s.data.invalidTerrainData;if(e$2e(i)){var l=i.upsample(n.tilingScheme,u,c,h,r,o,a);if(!e$2e(l))return void(e.terrainState=Ee$j.FAILED);o$1l(l,(function(t){e$2e(t)?(e.invalidTerrainData=t,e.terrainState=Ee$j.RECEIVED,e.invalid=s.data.invalid):e.terrainState=Ee$j.INVALID}))}else e.terrainState=Ee$j.RECEIVED,e.invalid=s.data.invalid}else e.terrainState=Ee$j.INVALID}),(function(){e.terrainState=Ee$j.FAILED})))}}else t.state=re$A.FAILED}function fe$q(e,t,i,n,r,o){function a(i){e.request=void 0,e$2e(i)?"cacheError"!==i?"cacheInvalid"!==i?(e.terrainData=i,e.terrainState=Ee$j.RECEIVED,t._isTerrainZ&&0!==r&&(e.terrainState=Ee$j.UNZIP,e.zipTerrainData=i,e.terrainData=void 0)):e.terrainState=Ee$j.FAILED:l(!1):e.terrainState=Ee$j.FAILED}function s(){if(e.request.state===W$1c.CANCELLED)return e.terrainData=void 0,e.terrainState=Ee$j.UNLOADED,void(e.request=void 0);e.terrainState=Ee$j.FAILED,e.request=void 0;var o="Failed to obtain terrain tile X: "+i+" Y: "+n+" Level: "+r+".";t._requestError=l$V.handleError(t._requestError,t,t.errorEvent,o,i,n,r,l)}function l(l){var u=new r$1c({throttle:!1,throttleByServer:!0,type:U$1f.TERRAIN});u.cacheEnable=l,e.request=u;var c=t.requestTileGeometry(i,n,r,u,o);e$2e(c)?(e.terrainState=Ee$j.RECEIVING,o$1l(c,a,s)):(e.terrainState=Ee$j.UNLOADED,e.request=void 0)}l(!0)}function ue$s(e,t,i,n,r){var o=t.unzip(e.zipTerrainData.buffer);e$2e(o)&&(e.terrainState=Ee$j.UNZIPING,o$1l(o,(function(i){if(!e$2e(i))return e.terrainState=Ee$j.FAILED,e.zipTerrainData=void 0,void(e.terrainData=void 0);e.terrainState=Ee$j.RECEIVED,e.terrainData=t.createTerrainData(e.zipTerrainData,i.data.buffer),t._invisibility&&(e.invalidTerrainData=new T$L({buffer:new Uint8Array(256),width:16,height:16,skirtMode:!0,valid:!1})),e.zipTerrainData=void 0}),(function(t){e.terrainState=Ee$j.FAILED})))}function he$n(e,t,i,n,r,o){var a=i.tilingScheme,s=e.terrainData.createMesh(a,n,r,o,t.terrainExaggeration);!e$2e(s)||(e.terrainState=Ee$j.TRANSFORMING,o$1l(s,(function(s){if(i._isSct&&i._extrudeTileBoundingBox&&i._levels[0]>12&&s.maximumHeight<1&&(s.maximumHeight=Math.max(i._maxHeight,s.maximumHeight)),e.mesh=s,e.orientedBoundingBox=y$Y.clone(s.orientedBoundingBox,e.orientedBoundingBox),e.occludeePointInScaledSpace=o$1p.clone(s.occludeePointInScaledSpace,e.occludeePointInScaledSpace),i._enablePrjArea&&(e$2e(s.validOrientedBoundingBox)?e.tileBoundingRegion._orientedBoundingBox=y$Y.clone(s.validOrientedBoundingBox,e.tileBoundingRegion._orientedBoundingBox):e.tileBoundingRegion._orientedBoundingBox=y$Y.clone(e.orientedBoundingBox,e.tileBoundingRegion._orientedBoundingBox),e.tileBoundingRegion._boundingSphere=i$1d.fromOrientedBoundingBox(e.tileBoundingRegion._orientedBoundingBox)),e$2e(e.invalidTerrainData)){var l=e.invalidTerrainData.createMesh(a,n,r,o,t.terrainExaggeration);if(!e$2e(l))return void(e.terrainState=Ee$j.RECEIVED);o$1l(l,(function(t){e.invalidMesh=t,e.invalidOrientedBoundingBox=y$Y.clone(t.orientedBoundingBox,e.invalidOrientedBoundingBox),e.invalidOccludeePointInScaledSpace=o$1p.clone(t.occludeePointInScaledSpace,e.invalidOccludeePointInScaledSpace),e.terrainState=Ee$j.TRANSFORMED}))}else e.terrainState=Ee$j.TRANSFORMED}),(function(){e.terrainState=Ee$j.FAILED})))}function b$W(){this.context=void 0,this.surfaceTile=void 0,this.mesh=void 0}v$C.prototype.pick=function(e,t,i,n,r){var o=this.renderedMesh;if(e$2e(o)){for(var a=o.vertices,s=o.indices,l=o.encoding,u=s.length,c=Number.MAX_VALUE,h=0;h<u;h+=3){var d=s[h],f=s[h+1],p=s[h+2],_=C$P(l,t,i,a,d,ae$r),m=C$P(l,t,i,a,f,te$w),g=C$P(l,t,i,a,p,ie$u),x=g$1j.rayTriangleParametric(e,_,m,g,n);e$2e(x)&&x<c&&x>=0&&(c=x)}return c!==Number.MAX_VALUE?f$19.getPoint(e,c,r):void 0}},v$C.prototype.freeResources=function(){e$2e(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),e$2e(this.normalTexture)&&(--this.normalTexture.referenceCount,0===this.normalTexture.referenceCount&&this.normalTexture.destroy(),this.normalTexture=void 0),this.terrainData=void 0,this.modifyTerrainData=void 0,this.terrainState=Ee$j.UNLOADED,this.mesh=void 0,this.modifyTerrainMesh=void 0,this.subDivisionMesh=void 0,this.fill=this.fill&&this.fill.destroy();for(var e=this.imagery,t=0,i=e.length;t<i;++t)e[t].freeResources();for(var n in this.imagery.length=0,this.terrain)this.terrain[n].freeResources();this.terrain={};var r=this.gridImagery;for(t=0,i=r.length;t<i;++t)r[t].freeResources();this.gridImagery.length=0,this.freeVertexArray(),this.invalid=!1,this.invalidMesh=void 0,this.invalidOrientedBoundingBox=void 0,this.invalidOccludeePointInScaledSpace=void 0,this.invalidVertexArray=void 0,this.invalidTerrainData=void 0},v$C.prototype.freeVertexArray=function(){v$C._freeVertexArray(this.vertexArray),this.vertexArray=void 0,v$C._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0,v$C._freeVertexArray(this.modifyTerrainVertexArray),this.modifyTerrainVertexArray=void 0,v$C._freeVertexArray(this.subDivisionVertexArray),this.subDivisionVertexArray=void 0},v$C.initialize=function(e,t,i,n){var r=e.data;e$2e(r)||(r=e.data=new v$C),e.state===re$A.START&&(ne$x(e,t,i,n),e.state=re$A.LOADING)},v$C.processStateMachine=function(e,t,i,n,r,o,a){v$C.initialize(e,i,n,r);var s=e.data;if(e.state===re$A.LOADING&&de$p(e,t,i,n,r,o),!a||0==e.level){var l=e.renderable;e.renderable=e$2e(s.vertexArray)||!1===i.isShowGlobe&&e$2e(s.mesh)&&s.mesh.invalid;var u=s.terrainState===Ee$j.READY;for(var c in s.terrain)if(s.terrain[c].terrainState!==Ee$j.READY){u=!1;break}e.upsampledFromParent=e$2e(s.terrainData)&&s.terrainData.wasCreatedByUpsampling();var h=!0,d=r._maxDetailLevelOffset();if(d>0){var f=e.level-d;f=Math.max(0,f);for(var p=e.level,_=e;p>f&&e$2e(_);)e$2e(_=_.parent)&&(v$C.initialize(_,i,n,r),h=s.processImagery(_,i,t)&&h),p=_.level}var m=s.processImagery(e,i,t)&&h,g=s.processGridTile(e,t);if(u&&m&&g||s.terrainState===Ee$j.INVALID){var x=e._loadedCallbacks,y={};for(var v in x)x.hasOwnProperty(v)&&(x[v](e)||(y[v]=x[v]));e._loadedCallbacks=y,e.state=re$A.DONE}l&&(e.renderable=!0)}},v$C.prototype.processImagery=function(e,t,i,n){var r,o,a=e.data,s=e.upsampledFromParent,l=!1,u=!0,c=a.imagery,h=!1,d=!1;for(r=0,o=c.length;r<o;++r){var f=c[r];if(!e$2e(f.loadingImagery)&&!e$2e(f.readyImagery)&&e$2e(f.imageryLayer)&&(f.loadingImagery=f.imageryLayer.getImageryFromCache(e.x,e.y,e.level),f.imageryLayer=void 0),e$2e(f.loadingImagery)){if(f.loadingImagery.state===wt$7.PLACEHOLDER){var p=f.loadingImagery.imageryLayer;if(p.imageryProvider.ready){f.freeResources(),c.splice(r,1),p._createTileImagerySkeletons(e,t,r),--r,o=c.length;continue}s=!1}var _,m=void 0;if(f.loadingImagery.imageryLayer._imageryProvider instanceof M$S&&(m=f.loadingImagery.imageryLayer._imageryProvider,h=!0),i.camera._scene._mvtVisibleControl){var g=i.camera._scene._mvtVisibleLevel;!e$2e(m)||e._level>i.camera._endLevel-g?(_=f.processStateMachine(e,i,n))&&e$2e(m)&&(d=!0):_=!0}else _=f.processStateMachine(e,i,n);u=u&&_,l=l||_||e$2e(f.readyImagery),s=s&&e$2e(f.loadingImagery)&&(f.loadingImagery.state===wt$7.FAILED||f.loadingImagery.state===wt$7.INVALID)}else s=!1}return(!h||d)&&(e._mvtLoaded=!0),e.upsampledFromParent=s,e.renderable=e.renderable&&(l||u),u},new h$18,b$W.prototype.set=function(e,t,i,n){this.context=e,this.surfaceTile=t,this.mesh=i,this.terrainProvider=n},b$W.prototype.execute=function(){var e=this.context,t=this.mesh,i=this.surfaceTile;!1===this.terrainProvider.isShowGlobe&&t.invalid?i.vertexArray=void 0:(i.vertexArray=v$C._createVertexArrayForMesh(e,t),e$2e(i.invalidMesh)&&(i.invalidVertexArray=v$C._createVertexArrayForMesh(e,i.invalidMesh)))};var H$O=new b$W;function me$r(e,t,i,n,r,o,a,s){H$O.set(i,t,t.mesh,n),e.jobScheduler.execute(H$O,2)&&(t.terrainState=Ee$j.READY,t.fill=t.fill&&t.fill.destroy(s))}function ve$n(e){var t=e.cache.tile_waterMaskData;if(!e$2e(t)){var i=t$U.create({context:e,pixelFormat:e.webgpu?V$12.RED:V$12.LUMINANCE,pixelDatatype:_$_.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});i.referenceCount=1,t={allWaterTexture:i,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR}),destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function ce$o(e,t){var i,n=t.terrainData.waterMask,r=ve$n(e),o=n.length;if(1===o){if(0===n[0])return;i=r.allWaterTexture}else{var a=Math.sqrt(o);(i=t$U.create({context:e,pixelFormat:e.webgpu?V$12.RED:V$12.LUMINANCE,pixelDatatype:_$_.UNSIGNED_BYTE,source:{width:a,height:a,arrayBufferView:n},sampler:r.sampler,flipY:!1})).referenceCount=0}++i.referenceCount,t.waterMaskTexture=i,e$2c.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}function le$r(e){var t=e.cache.tile_normalTextureData;if(!e$2e(t)){var i=new t$U({context:e,pixelFormat:e.webgpu?V$12.RGBA:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([0,0,255]),width:1,height:1}});i.referenceCount=1,t={allNormalTexture:i,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR}),destroy:function(){this.allNormalTexture.destroy()}},e.cache.tile_normalTextureData=t}return t}function xe$l(e,t){var i=t.normalTexture;if(e$2e(i)&&(--i.referenceCount,0===i.referenceCount&&i.destroy(),t.normalTexture=void 0),e$2e(t.terrainData)){var n=t.terrainData.normalTexture;if(e$2e(n)){var r,o=le$r(e),a=n.length/3,s=Math.sqrt(a);e.webgpu&&(n=V$12.RGBToRGBA(n,_$_.UNSIGNED_BYTE,s,s)),(r=new t$U({context:e,pixelFormat:e.webgpu?V$12.RGBA:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:o.sampler})).referenceCount=0,++r.referenceCount,t.normalTexture=r,e$2c.fromElements(0,0,1,1,t.normalTextureTranslationAndScale)}}}function pe$t(e,t){for(var i=(t=e.data).modifyTerrainMesh.minimumHeight,n=t.modifyTerrainMesh.maximumHeight,r=t.mesh,o=e.parent;!e$2e(r)&&e$2e(o)&&e$2e(o.data);)r=(t=o.data).mesh,o=o.parent;if(!e$2e(r))return t.modifyTerrainMesh.orientedBoundingBox;var a=Math.min(r.minimumHeight,i),s=Math.max(r.maximumHeight,n);return y$Y.fromRectangle(e.rectangle,a,s)}function ge$l(e,t){var i=t.data;i.modifyTerrainVertexArray=v$C._createVertexArrayForMesh(e,i.modifyTerrainMesh),i.modifyOrientedBoundingBox=pe$t(t,i),t.isModified=!0}v$C.prototype.processGridTile=function(e,t,i){for(var n=!0,r=e.data.gridImagery,o=0;o<r.length;o++){var a=r[o]._processStateMachine(e,t,i);n=n&&a}return n},v$C._createVertexArrayForMesh=function(e,t){var i=t.vertices,n=t$X.createVertexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW}),r=t.encoding.getAttributes(n),o=t.indices.indexBuffers||{},a=o[e.id];if(!e$2e(a)||a.isDestroyed()){var s=t.indices;(a=t$X.createIndexBuffer({context:e,typedArray:s,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.fromSizeInBytes(s.BYTES_PER_ELEMENT)})).vertexArrayDestroyable=!1,a.referenceCount=1,o[e.id]=a,t.indices.indexBuffers=o}else++a.referenceCount;return new c$13({context:e,attributes:r,indexBuffer:a})},v$C._freeVertexArray=function(e){if(e$2e(e)){var t=e.indexBuffer;e.destroy(),e$2e(t)&&!t.isDestroyed()&&e$2e(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}},v$C.prototype._findAncestorTileWithTerrainData=function(e){for(var t=e.parent;e$2e(t)&&(!e$2e(t.data)||!e$2e(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t},v$C.prototype._computeWaterMaskTranslationAndScale=function(e,t,i){var n=t.rectangle,r=e.rectangle,o=r.width,a=r.height,s=o/n.width,l=a/n.height;return i.x=s*(r.west-n.west)/o,i.y=l*(r.south-n.south)/a,i.z=s,i.w=l,i},v$C.prototype._computeNormalTextureTranslationAndScale=function(e,t,i){var n=t.rectangle,r=e.rectangle,o=r.width,a=r.height,s=o/n.width,l=a/n.height;return i.x=s*(r.west-n.west)/o,i.y=l*(r.south-n.south)/a,i.z=s,i.w=l,i},v$C.prototype.createModifyVertexArray=function(e,t,i,n,r,o,a){var s;if(e$2e(this.modifyTerrainVertexArray)&&(this.modifyTerrainData=void 0,this.modifyTerrainMesh=void 0,this.modifyTerrainVertexArray=!this.modifyTerrainVertexArray.isDestroyed()&&this.modifyTerrainVertexArray.destroy()),e$2e(s=a?Ne$h.upsampleTerrainData(i):Ne$h.createTerrainData(i,n,r,o,t._extractExtendHeight))){this.modifyTerrainData=s,this.modifyTerrainMesh=Ne$h.createTerrainMesh(i,s),ge$l(e,i);var l=i._level+" "+i._x+i._y;t._modifyTilesMap[l]=i}},v$C.prototype.freeModifyResource=function(){v$C._freeVertexArray(this.modifyTerrainVertexArray),this.modifyTerrainVertexArray=void 0,v$C._freeVertexArray(this.subDivisionVertexArray),this.subDivisionVertexArray=void 0,this.modifyTerrainData=void 0,this.modifyOrientedBoundingBox=void 0,this.subDivisionMesh=void 0},v$C.prototype.setShowInvalid=function(e){if(this.invalid!==e){if(e$2e(this.vertexArray)&&e$2e(this.invalidVertexArray)){var t=this.invalidOrientedBoundingBox,i=this.invalidOccludeePointInScaledSpace,n=this.invalidVertexArray,r=this.invalidMesh,o=this.invalidTerrainData;this.invalidOrientedBoundingBox=this.orientedBoundingBox,this.invalidOccludeePointInScaledSpace=this.occludeePointInScaledSpace,this.invalidVertexArray=this.vertexArray,this.invalidMesh=this.mesh,this.invalidTerrainData=this.terrainData,this.orientedBoundingBox=t,this.occludeePointInScaledSpace=i,this.vertexArray=n,this.mesh=r,this.terrainData=o,this.invalid=e}else if(this.terrainState===Ee$j.RECEIVED){if(e$2e(this.terrainData)&&e$2e(this.invalidTerrainData)){o=this.invalidTerrainData;this.invalidTerrainData=this.terrainData,this.terrainData=o,this.invalid=e}}else if(this.terrainState===Ee$j.TRANSFORMED&&e$2e(this.mesh)&&e$2e(this.invalidMesh)){t=this.invalidOrientedBoundingBox,i=this.invalidOccludeePointInScaledSpace,r=this.invalidMesh,o=this.invalidTerrainData;this.invalidOrientedBoundingBox=this.orientedBoundingBox,this.invalidOccludeePointInScaledSpace=this.occludeePointInScaledSpace,this.invalidMesh=this.mesh,this.invalidTerrainData=this.terrainData,this.orientedBoundingBox=t,this.occludeePointInScaledSpace=i,this.mesh=r,this.terrainData=o,this.invalid=e}this.boundingVolumeSourceTile=void 0}};var T$K={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7};function Q$L(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new e$2c}Q$L.prototype.update=function(e,t,i){this.changedThisFrame&&(Le$l(e,t,this.tile,i),this.changedThisFrame=!1)},Q$L.prototype.destroy=function(e){e$2e(this.vertexArray)&&(e$2e(e)?e.push(this.vertexArray):v$C._freeVertexArray(this.vertexArray,e),this.vertexArray=void 0),e$2e(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};var Qe$8=new r$17;function k$H(e,t,i,n,r,o,a,s,l){if(void 0!==n){for(var u=n;u&&(u._lastSelectionResultFrame!==r||D$J.wasKicked(u._lastSelectionResult)||D$J.originalResult(u._lastSelectionResult)===D$J.CULLED);){if(a)return;var c=u.parent;if(o>=T$K.NORTHWEST&&void 0!==c)switch(o){case T$K.NORTHWEST:u=u===c.northwestChild?c:void 0;break;case T$K.NORTHEAST:u=u===c.northeastChild?c:void 0;break;case T$K.SOUTHWEST:u=u===c.southwestChild?c:void 0;break;case T$K.SOUTHEAST:u=u===c.southeastChild?c:void 0}else u=c}if(void 0!==u){if(u._lastSelectionResult===D$J.RENDERED){if(e$2e(u.data.vertexArray))return;return void De$j(e,t,i,u,o,r,s,l)}if(D$J.originalResult(n._lastSelectionResult)!==D$J.CULLED)switch(o){case T$K.WEST:k$H(e,t,i,n.northwestChild,r,o,!0,s,l),k$H(e,t,i,n.southwestChild,r,o,!0,s,l);break;case T$K.EAST:k$H(e,t,i,n.southeastChild,r,o,!0,s,l),k$H(e,t,i,n.northeastChild,r,o,!0,s,l);break;case T$K.SOUTH:k$H(e,t,i,n.southwestChild,r,o,!0,s,l),k$H(e,t,i,n.southeastChild,r,o,!0,s,l);break;case T$K.NORTH:k$H(e,t,i,n.northeastChild,r,o,!0,s,l),k$H(e,t,i,n.northwestChild,r,o,!0,s,l);break;case T$K.NORTHWEST:k$H(e,t,i,n.northwestChild,r,o,!0,s,l);break;case T$K.NORTHEAST:k$H(e,t,i,n.northeastChild,r,o,!0,s,l);break;case T$K.SOUTHWEST:k$H(e,t,i,n.southwestChild,r,o,!0,s,l);break;case T$K.SOUTHEAST:k$H(e,t,i,n.southeastChild,r,o,!0,s,l);break;default:throw new t$15("Invalid edge")}}}}function De$j(e,t,i,n,r,o,a,s){var l=n.data;if(void 0===l.fill)l.fill=new Q$L(n);else if(l.fill.visitedFrame===o)return;l.fill.enqueuedFrame!==o&&(l.fill.enqueuedFrame=o,l.fill.changedThisFrame=!1,a.enqueue(n)),ye$i(e,t,i,n,r,s)}function ye$i(e,t,i,n,r,o){var a,s,l,u=n.data.fill,c=i.data.fill;switch(e$2e(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(Le$l(e,t,i,o),c.changedThisFrame=!1),a=i.data.fill.mesh):a=i.data.mesh,r){case T$K.WEST:s=u.westMeshes,l=u.westTiles;break;case T$K.SOUTH:s=u.southMeshes,l=u.southTiles;break;case T$K.EAST:s=u.eastMeshes,l=u.eastTiles;break;case T$K.NORTH:s=u.northMeshes,l=u.northTiles;break;case T$K.NORTHWEST:return u.changedThisFrame=u.changedThisFrame||u.northwestMesh!==a,u.northwestMesh=a,void(u.northwestTile=i);case T$K.NORTHEAST:return u.changedThisFrame=u.changedThisFrame||u.northeastMesh!==a,u.northeastMesh=a,void(u.northeastTile=i);case T$K.SOUTHWEST:return u.changedThisFrame=u.changedThisFrame||u.southwestMesh!==a,u.southwestMesh=a,void(u.southwestTile=i);case T$K.SOUTHEAST:return u.changedThisFrame=u.changedThisFrame||u.southeastMesh!==a,u.southeastMesh=a,void(u.southeastTile=i)}if(i.level<=n.level)return u.changedThisFrame=u.changedThisFrame||s[0]!==a||1!==s.length,s[0]=a,l[0]=i,s.length=1,void(l.length=1);var h,d,f,p,_=i.rectangle,m=n.rectangle;switch(r){case T$K.WEST:for(p=(m.north-m.south)*e$2d.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2d.greaterThan(_.north,f.south,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2d.greaterThanOrEquals(_.south,f.north,p));++d);break;case T$K.SOUTH:for(p=(m.east-m.west)*e$2d.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2d.lessThan(_.west,f.east,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2d.lessThanOrEquals(_.east,f.west,p));++d);break;case T$K.EAST:for(p=(m.north-m.south)*e$2d.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2d.lessThan(_.south,f.north,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2d.lessThanOrEquals(_.north,f.south,p));++d);break;case T$K.NORTH:for(p=(m.east-m.west)*e$2d.EPSILON5,h=0;h<l.length&&(f=l[h].rectangle,!e$2d.greaterThan(_.east,f.west,p));++h);for(d=h;d<l.length&&(f=l[d].rectangle,!e$2d.greaterThanOrEquals(_.west,f.east,p));++d);}d-h==1?(u.changedThisFrame=u.changedThisFrame||s[h]!==a,s[h]=a,l[h]=i):(u.changedThisFrame=!0,s.splice(h,d-h,a),l.splice(h,d-h,i))}Q$L.updateFillTiles=function(e,t,i,n){var r=e._quadtree,o=r._levelZeroTiles,a=r._lastSelectionFrameNumber,s=Qe$8;s.clear();for(var l=0;l<t.length;++l){e$2e(t[l].data.vertexArray)&&s.enqueue(t[l])}for(var u=s.dequeue();void 0!==u;){var c=u.findTileToWest(o),h=u.findTileToSouth(o),d=u.findTileToEast(o),f=u.findTileToNorth(o);k$H(e,i,u,c,a,T$K.EAST,!1,s,n),k$H(e,i,u,h,a,T$K.NORTH,!1,s,n),k$H(e,i,u,d,a,T$K.WEST,!1,s,n),k$H(e,i,u,f,a,T$K.SOUTH,!1,s,n);var p=c.findTileToNorth(o),_=c.findTileToSouth(o),m=d.findTileToNorth(o),g=d.findTileToSouth(o);k$H(e,i,u,p,a,T$K.SOUTHEAST,!1,s,n),k$H(e,i,u,m,a,T$K.SOUTHWEST,!1,s,n),k$H(e,i,u,_,a,T$K.NORTHEAST,!1,s,n),k$H(e,i,u,g,a,T$K.NORTHWEST,!1,s,n),u=s.dequeue()}};var G$U=new a$18,xe$k=new a$18,$$H=new o$1p,ke$c=new o$1p,de$o=new o$1o,Te$j=new o$1o,C$O=new o$1o;function re$y(){this.height=0,this.encodedNormal=new o$1o}function he$m(e,t,i,n,r,o,a,s,l){if(e$2e(r))return r;var u;if(e$2e(o)&&e$2e(a))u=.5*(o.height+a.height);else if(e$2e(o))u=o.height;else if(e$2e(a))u=a.height;else if(e$2e(s))u=s.height;else{var c=e.tile.data.tileBoundingRegion,h=0,d=0;e$2e(c)&&(h=c.minimumHeight,d=c.maximumHeight),u=.5*(h+d)}return Ce$g(e,t,i,n,u,l),l}var et$b={minimumHeight:0,maximumHeight:0},pe$s=new re$y,We$e=new re$y,be$n=new re$y,Ue$f=new re$y,tt$b=typeof Uint8Array<"u"?new Uint8Array(81):void 0;function Le$l(e,t,i,n){v$C.initialize(i,e.terrainProvider,e._terrainLayers,e._imageryLayers);var r=i.data,o=r.fill,a=i.rectangle,s=i.tilingScheme.ellipsoid,l=ne$w(o,s,0,1,o.northwestTile,o.northwestMesh,o.northTiles,o.northMeshes,o.westTiles,o.westMeshes,be$n),u=ne$w(o,s,0,0,o.southwestTile,o.southwestMesh,o.westTiles,o.westMeshes,o.southTiles,o.southMeshes,pe$s),c=ne$w(o,s,1,0,o.southeastTile,o.southeastMesh,o.southTiles,o.southMeshes,o.eastTiles,o.eastMeshes,We$e),h=ne$w(o,s,1,1,o.northeastTile,o.northeastMesh,o.eastTiles,o.eastMeshes,o.northTiles,o.northMeshes,Ue$f);l=he$m(o,s,0,1,l,u,h,c,be$n),u=he$m(o,s,0,0,u,l,c,h,pe$s),c=he$m(o,s,1,1,c,u,h,l,We$e),h=he$m(o,s,1,1,h,c,l,u,Ue$f);var d,f,p=u.height,_=c.height,m=l.height,g=h.height,x=Math.min(p,_,m,g),y=Math.max(p,_,m,g),v=.5*(x+y),$=e.getLevelMaximumGeometricError(i.level),b=s.maximumRadius-$,T=4*Math.acos(b/s.maximumRadius);if(T*=1.5,a.width>T&&y-x<=$){var C=new T$L({width:9,height:9,buffer:tt$b,structure:{heightOffset:y}});o.mesh=C._createMeshSync(i.tilingScheme,i.x,i.y,i.level,1)}else{var S=new h$M(void 0,void 0,void 0,void 0,!0,!0),w=xe$k;w.longitude=.5*(a.east+a.west),w.latitude=.5*(a.north+a.south),w.height=v,S.center=s.cartographicToCartesian(w,S.center);var E,P=5;for(d=0,f=(E=o.westMeshes).length;d<f;++d)e$2e(E[d])&&(P+=E[d].eastIndicesNorthToSouth.length);for(d=0,f=(E=o.southMeshes).length;d<f;++d)e$2e(E[d])&&(P+=E[d].northIndicesWestToEast.length);for(d=0,f=(E=o.eastMeshes).length;d<f;++d)e$2e(E[d])&&(P+=E[d].westIndicesSouthToNorth.length);for(d=0,f=(E=o.northMeshes).length;d<f;++d)e$2e(E[d])&&(P+=E[d].southIndicesEastToWest.length);var A=et$b;A.minimumHeight=x,A.maximumHeight=y;var L=S.getStride(),M=new Float32Array(P*L),R=0,O=R;e$2e(l.height)&&!isNaN(l.height)&&(R=ce$n(o,s,S,M,R=ie$t(s,a,S,M,R,0,1,l.height,l.encodedNormal,1,A),o.westTiles,o.westMeshes,T$K.EAST,A));var D=R;e$2e(u.height)&&!isNaN(u.height)&&(R=ce$n(o,s,S,M,R=ie$t(s,a,S,M,R,0,0,u.height,u.encodedNormal,0,A),o.southTiles,o.southMeshes,T$K.NORTH,A));var I=R;e$2e(c.height)&&!isNaN(c.height)&&(R=ce$n(o,s,S,M,R=ie$t(s,a,S,M,R,1,0,c.height,c.encodedNormal,0,A),o.eastTiles,o.eastMeshes,T$K.WEST,A));var B=R;e$2e(h.height)&&!isNaN(h.height)&&(R=ce$n(o,s,S,M,R=ie$t(s,a,S,M,R,1,1,h.height,h.encodedNormal,1,A),o.northTiles,o.northMeshes,T$K.SOUTH,A)),x=isNaN(A.minimumHeight)?0:A.minimumHeight,y=isNaN(A.maximumHeight)?0:A.maximumHeight;var F=y$Y.fromRectangle(a,x,y,i.tilingScheme.ellipsoid),N=t$N.geodeticLatitudeToMercatorAngle(a.south),G=1/(t$N.geodeticLatitudeToMercatorAngle(a.north)-N),z=(t$N.geodeticLatitudeToMercatorAngle(w.latitude)-N)*G;s.geodeticSurfaceNormalCartographic(G$U,ke$c);var U=t$$.octEncode(ke$c,de$o),V=R;S.encode(M,R*L,F.center,o$1o.fromElements(.5,.5,C$O),v,U,z);var k,W=++R,H=3*(W-1),q=H*(W<256?1:2);if((M.length-W*L)*Float32Array.BYTES_PER_ELEMENT>=q){var j=W*L*Float32Array.BYTES_PER_ELEMENT;k=W<256?new Uint8Array(M.buffer,j,H):new Uint16Array(M.buffer,j,H)}else k=W<256?new Uint8Array(H):new Uint16Array(H);M=new Float32Array(M.buffer,0,W*L);var X=0;for(d=0;d<W-2;++d)k[X++]=V,k[X++]=d,k[X++]=d+1;k[X++]=V,k[X++]=d,k[X++]=0;var Y=[];for(d=D;d>=O;--d)Y.push(d);var Z=[];for(d=I;d>=D;--d)Z.push(d);var K=[];for(d=B;d>=I;--d)K.push(d);var Q=[];for(Q.push(0),d=V-1;d>=B;--d)Q.push(d);o.mesh=new T$M(S.center,M,k,H,W,x,y,i$1d.fromOrientedBoundingBox(F),nt$7(e,F.center,a,x,y),S.getStride(),F,S,t.terrainExaggeration,Y,Z,K,Q)}var J=t.context;e$2e(o.vertexArray)&&(e$2e(n)?0!==o.mesh.vertices.length&&0!==o.mesh.indices.length&&n.push(o.vertexArray):v$C._freeVertexArray(o.vertexArray)),0!==o.mesh.vertices.length&&0!==o.mesh.indices.length&&(o.vertexArray=v$C._createVertexArrayForMesh(J,o.mesh)),r.processImagery(i,e.terrainProvider,t,!0);var ee=o.waterMaskTexture;if(o.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){var te=r._findAncestorTileWithTerrainData(i);e$2e(te)&&e$2e(te.data.waterMaskTexture)&&(o.waterMaskTexture=te.data.waterMaskTexture,++o.waterMaskTexture.referenceCount,r._computeWaterMaskTranslationAndScale(i,te,o.waterMaskTranslationAndScale))}e$2e(ee)&&(--ee.referenceCount,0===ee.referenceCount&&ee.destroy())}function ie$t(e,t,i,n,r,o,a,s,l,u,c){var h=G$U;h.longitude=e$2d.lerp(t.west,t.east,o),h.latitude=e$2d.lerp(t.south,t.north,a),h.height=s;var d=e.cartographicToCartesian(h,$$H),f=Te$j;return f.x=o,f.y=a,i.encode(n,r*i.getStride(),d,f,s,l,u),c.minimumHeight=Math.min(c.minimumHeight,s),c.maximumHeight=Math.max(c.maximumHeight,s),r+1}var oe$o=new h$18;function D$I(e,t,i,n){var r=e.rectangle,o=t.rectangle;0===t.x&&1===i.x&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?((r=h$18.clone(e.rectangle,oe$o)).west-=e$2d.TWO_PI,r.east-=e$2d.TWO_PI):0===e.x&&0===i.x&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&((r=h$18.clone(e.rectangle,oe$o)).west+=e$2d.TWO_PI,r.east+=e$2d.TWO_PI);var a=r.east-r.west,s=(o.west-r.west)/a,l=(o.east-r.west)/a,u=r.north-r.south,c=(o.south-r.south)/u,h=(o.north-r.south)/u,d=(i.x-s)/(l-s),f=(i.y-c)/(h-c);return Math.abs(d)<Math.EPSILON5?d=0:Math.abs(d-1)<Math.EPSILON5&&(d=1),Math.abs(f)<Math.EPSILON5?f=0:Math.abs(f-1)<Math.EPSILON5&&(f=1),n.x=d,n.y=f,n}var at$9=new o$1o;function ge$k(e,t,i,n,r){var o=e.encoding,a=e.vertices;if(r.height=o.decodeHeight(a,t),o.hasVertexNormals)o.getOctEncodedNormal(a,t,r.encodedNormal);else{var s=r.encodedNormal;s.x=0,s.y=0}}var st$5=new o$1o,rt$c=new o$1p;function ht$5(e,t,i,n,r,o,a,s,l,u){var c,h=n.encoding,d=n.vertices,f=D$I(t,i,h.decodeTextureCoordinates(d,r,C$O),C$O),p=D$I(t,i,h.decodeTextureCoordinates(d,o,Te$j),Te$j);c=l?(a-f.x)/(p.x-f.x):(s-f.y)/(p.y-f.y);var _,m=h.decodeHeight(d,r),g=h.decodeHeight(d,o),x=i.rectangle;if(G$U.longitude=e$2d.lerp(x.west,x.east,a),G$U.latitude=e$2d.lerp(x.south,x.north,s),u.height=G$U.height=e$2d.lerp(m,g,c),!h.isModify)if(h.hasVertexNormals){var y=h.getOctEncodedNormal(d,r,at$9),v=h.getOctEncodedNormal(d,o,st$5),$=t$$.octDecode(y.x,y.y,$$H),b=t$$.octDecode(v.x,v.y,rt$c);_=o$1p.lerp($,b,c,$$H),o$1p.normalize(_,_),t$$.octEncode(_,u.encodedNormal)}else _=e.geodeticSurfaceNormalCartographic(G$U,$$H),t$$.octEncode(_,u.encodedNormal)}function Ce$g(e,t,i,n,r,o){o.height=r;var a=t.geodeticSurfaceNormalCartographic(G$U,$$H);t$$.octEncode(a,o.encodedNormal)}function ne$w(e,t,i,n,r,o,a,s,l,u,c){var h;return _e$o(e,t,s,a,!1,i,n,c)||_e$o(e,t,u,l,!0,i,n,c)?c:ve$m(r,o)?(ge$k(o,0===i?0===n?o.eastIndicesNorthToSouth[0]:o.southIndicesEastToWest[0]:0===n?o.northIndicesWestToEast[0]:o.westIndicesSouthToNorth[0],i,n,c),c):e$2e(h=0===i?0===n?fe$p(e.westMeshes,e.westTiles,T$K.EAST,e.southMeshes,e.southTiles,T$K.NORTH):fe$p(e.northMeshes,e.northTiles,T$K.SOUTH,e.westMeshes,e.westTiles,T$K.EAST):0===n?fe$p(e.southMeshes,e.southTiles,T$K.NORTH,e.eastMeshes,e.eastTiles,T$K.WEST):fe$p(e.eastMeshes,e.eastTiles,T$K.WEST,e.northMeshes,e.northTiles,T$K.SOUTH))?(Ce$g(e,t,i,n,h,c),c):void 0}function fe$p(e,t,i,n,r,o,a,s){var l=Re$i(e,t,!1,i),u=Re$i(n,r,!0,o);return e$2e(l)&&e$2e(u)?.5*(l+u):e$2e(l)?l:u}function ce$n(e,t,i,n,r,o,a,s,l){for(var u=0;u<o.length;++u)e$2e(a[u])&&(r=it$6(e,t,i,n,r,o[u],a[u],s,l));return r}function it$6(e,t,i,n,r,o,a,s,l){var u=o.rectangle;s===T$K.EAST&&0===e.tile.x?((u=h$18.clone(o.rectangle,oe$o)).west-=e$2d.TWO_PI,u.east-=e$2d.TWO_PI):s===T$K.WEST&&0===o.x&&((u=h$18.clone(o.rectangle,oe$o)).west+=e$2d.TWO_PI,u.east+=e$2d.TWO_PI);var c,h,d,f,p=e.tile.rectangle;switch(r>0&&(i.decodeTextureCoordinates(n,r-1,C$O),c=C$O.x,h=C$O.y),s){case T$K.WEST:d=a.westIndicesSouthToNorth,f=!1;break;case T$K.NORTH:d=a.northIndicesWestToEast,f=!0;break;case T$K.EAST:d=a.eastIndicesNorthToSouth,f=!1;break;case T$K.SOUTH:d=a.southIndicesEastToWest,f=!0}var _,m,g=o,x=e.tile,y=a.encoding,v=a.vertices,$=i.getStride();y.hasWebMercatorT&&(_=t$N.geodeticLatitudeToMercatorAngle(p.south),m=1/(t$N.geodeticLatitudeToMercatorAngle(p.north)-_));for(var b=0;b<d.length;++b){var T=d[b],C=y.decodeTextureCoordinates(v,T,C$O);D$I(g,x,C,C);var S=C.x,w=C.y,E=f?S:w;if(!(E<0||E>1||Math.abs(S-c)<e$2d.EPSILON5&&Math.abs(w-h)<e$2d.EPSILON5)){var P=Math.abs(S)<e$2d.EPSILON5||Math.abs(S-1)<e$2d.EPSILON5,A=Math.abs(w)<e$2d.EPSILON5||Math.abs(w-1)<e$2d.EPSILON5;if(!P||!A){var L,M=y.decodePosition(v,T,$$H),R=y.decodeHeight(v,T);y.hasVertexNormals?L=y.getOctEncodedNormal(v,T,de$o):((L=de$o).x=0,L.y=0);var O=w;if(y.hasWebMercatorT){var D=e$2d.lerp(p.south,p.north,w);O=(t$N.geodeticLatitudeToMercatorAngle(D)-_)*m}i.encode(n,r*$,M,C,R,L,O),l.minimumHeight=Math.min(l.minimumHeight,R),l.maximumHeight=Math.max(l.maximumHeight,R),++r}}}return r}function Re$i(e,t,i,n,r,o){var a,s,l;i?(a=0,s=e.length,l=1):(a=e.length-1,s=-1,l=-1);for(var u=a;u!==s;u+=l){var c=e[u];if(ve$m(t[u],c)){var h;switch(n){case T$K.WEST:h=c.westIndicesSouthToNorth;break;case T$K.SOUTH:h=c.southIndicesEastToWest;break;case T$K.EAST:h=c.eastIndicesNorthToSouth;break;case T$K.NORTH:h=c.northIndicesWestToEast}var d=h[i?0:h.length-1];if(e$2e(d))return c.encoding.decodeHeight(c.vertices,d)}}}function ve$m(e,t){return e$2e(t)&&(!e$2e(e.data.fill)||!e.data.fill.changedThisFrame)}function _e$o(e,t,i,n,r,o,a,s){var l,u,c,h,d,f=n[r?0:i.length-1],p=i[r?0:i.length-1];if(ve$m(f,p)&&(0===o?0===a?(l=r?p.northIndicesWestToEast:p.eastIndicesNorthToSouth,u=r,c=r):(l=r?p.eastIndicesNorthToSouth:p.southIndicesEastToWest,u=!r,c=!1):0===a?(l=r?p.westIndicesSouthToNorth:p.northIndicesWestToEast,u=!r,c=!0):(l=r?p.southIndicesEastToWest:p.westIndicesSouthToNorth,u=r,c=!r),l.length>0)){d=l[h=r?0:l.length-1],p.encoding.decodeTextureCoordinates(p.vertices,d,C$O);var _=D$I(f,e.tile,C$O,C$O);if(_.x===o&&_.y===a)return ge$k(p,d,o,a,s),!0;if(h=a$17(l,u?o:a,(function(t,i){p.encoding.decodeTextureCoordinates(p.vertices,t,C$O);var n=D$I(f,e.tile,C$O,C$O);return c?u?n.x-o:n.y-a:u?o-n.x:a-n.y})),!(h<0))return ge$k(p,l[h],o,a,s),!0;if((h=~h)>0&&h<l.length)return ht$5(t,f,e.tile,p,l[h-1],l[h],o,a,u,s),!0}return!1}var ot$6=[new o$1p,new o$1p,new o$1p,new o$1p];function nt$7(e,t,i,n,r,o){var a=e.quadtree._occluders.ellipsoid,s=a.ellipsoid,l=ot$6;return o$1p.fromRadians(i.west,i.south,r,s,l[0]),o$1p.fromRadians(i.east,i.south,r,s,l[1]),o$1p.fromRadians(i.west,i.north,r,s,l[2]),o$1p.fromRadians(i.east,i.north,r,s,l[3]),a.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,n,o)}var _0x587024=(_0xe55824=!0,function(e,t){var i=_0xe55824?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe55824=!1,i}),_0x4d586f=_0x587024(void 0,(function(){return _0x4d586f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d586f).search("(((.+)+)+)+$")})),_0xe55824;_0x4d586f();var Ra$3="attribute vec4 position;\nattribute vec2 st;\nvarying vec2 v_texCoord;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\nvoid main()\n{\n v_texCoord = st;\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n v_positionMC = vec4(position.xyz, 1.0);\n v_positionEC = (czm_modelView * vec4(position.xyz, 1.0)).xyz;\n}",_0x39cac9=(_0x8dc155=!0,function(e,t){var i=_0x8dc155?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8dc155=!1,i}),_0x98a45a=_0x39cac9(void 0,(function(){return _0x98a45a.toString().search("(((.+)+)+)+$").toString().constructor(_0x98a45a).search("(((.+)+)+)+$")})),_0x8dc155;_0x98a45a();var Ca$2="varying vec2 v_texCoord;\nuniform sampler2D texture1;\nvarying vec4 v_positionMC;\nvarying vec3 v_positionEC;\n#ifdef NormalTexture\n uniform sampler2D uNormalTexture;\n#endif\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\nvec4 SRGBtoLINEAR4(vec4 srgbIn)\n{\n srgbIn = srgbIn;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n vec3 LINEARtoSRGB(vec3 linearIn)\n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else\n return linearIn;\n#endif\n}\nconst float M_PI = 3.141592653589793;\nvec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\nfloat smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\nfloat GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\nvec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR\n return czm_acesTonemapping(linearIn);\n#else\n return linearIn;\n#endif\n}\nvoid main()\n{\n vec4 baseColorWithAlpha = texture2D(texture1, v_texCoord);\n baseColorWithAlpha = SRGBtoLINEAR4(baseColorWithAlpha);\n vec3 ng = normalize(czm_normal * czm_computeNormal(v_positionMC.xyz));\n#ifdef NormalTexture\n vec3 pos_dx = dFdx(v_positionEC);\n vec3 pos_dy = dFdy(v_positionEC);\n vec3 tex_dx = dFdx(vec3(v_texCoord.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(v_texCoord.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, v_texCoord.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n#else\n vec3 n = ng;\n#endif\n vec3 baseColor = baseColorWithAlpha.rgb;\n float roughness = 1.0;\n float metalness = 0.0;\n vec3 v = -normalize(v_positionEC);\n vec3 lightColorHdr = vec3(5.0);\n vec3 l = normalize(czm_lightDirectionEC);\n vec3 h = normalize(v + l);\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n vec3 specularColor = mix(f0, baseColor, metalness);\n float alpha = roughness * roughness;\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 r0 = specularColor.rgb;\n vec3 F = fresnelSchlick2(r0, r90, VdotH);\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n float vertexRadius = length(positionWC);\n float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n float reflectionDotNadir = dot(r, normalize(positionWC));\n r.x = -r.x;\n r = -normalize(czm_temeToPseudoFixed * r);\n r.x = -r.x;\n float inverseRoughness = 1.04 - roughness;\n inverseRoughness *= inverseRoughness;\n vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n float atmosphereHeight = 0.05;\n float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n float blendRegionOffset = roughness * -1.0;\n float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n vec3 nadirColor = belowHorizonColor * 0.5;\n vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n float S = acos(LdotZenith);\n float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n float gamma = acos(NdotL);\n float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n float luminance = 0.2 * (numerator / denominator);\n vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n vec3 IBLColor = (diffuseIrradiance * diffuseColor * 1.0) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * 1.0);\n float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n IBLColor *= lightColor;\n color += IBLColor * luminance;\n color = applyTonemapping(color);\n color = LINEARtoSRGB(color);\n gl_FragColor = vec4(color, 1.0);\n}",_0x5711ba=(_0x2f871f=!0,function(e,t){var i=_0x2f871f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f871f=!1,i}),_0x3eafe7=_0x5711ba(void 0,(function(){return _0x3eafe7.toString().search("(((.+)+)+)+$").toString().constructor(_0x3eafe7).search("(((.+)+)+)+$")})),_0x2f871f;_0x3eafe7();const _0x4621a7="u_dayTextures",_0x4aa0d3="u_gridTextures",_0x1e2c4f="u_waterMask",_0x3ca47e="u_oceanNormalMap",_0x136868="uModifyRasterTexture",_0x3be577="TileUBO",_0x55be02=16;function _0x5c8da9(e){var t=_0x37a515.call(this)||this;t._context=e,t._dayTextures=[],t._dayTexturesSampleKey=[],t._gridTextures=[],t._waterMask=void 0,t._oceanNormalMap=void 0,t._modifyRasterTexture=void 0,t._center=new o$1p,t._tileBounds=new e$2c,t._modifiedModelView=new p$1d,t._modifiedModelViewProjection=new p$1d,t._dayTextureTranslationAndScale=[];for(var i=0;i<_0x55be02;i++)t._dayTextureTranslationAndScale.push(0),t._dayTextureTranslationAndScale.push(0),t._dayTextureTranslationAndScale.push(0),t._dayTextureTranslationAndScale.push(0);t._dayTextureSize=[];for(i=0;i<_0x55be02;i++)t._dayTextureSize.push(0),t._dayTextureSize.push(0),t._dayTextureSize.push(0),t._dayTextureSize.push(0);t._dayTextureTexCoordsRectangle=[];for(i=0;i<_0x55be02;i++)t._dayTextureTexCoordsRectangle.push(0),t._dayTextureTexCoordsRectangle.push(0),t._dayTextureTexCoordsRectangle.push(0),t._dayTextureTexCoordsRectangle.push(0);t._name=_0x3be577}_0x37a515&&(_0x5c8da9.__proto__=_0x37a515),_0x5c8da9.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x5c8da9.prototype.constructor=_0x37a515,Object.defineProperties(_0x5c8da9.prototype,{}),_0x5c8da9.prototype._initUBO=function(e){this._ubo=new _0x5c4ccd(e.engine,void 0,!1,_0x3be577,!1,!1),this._ubo.addUniform("u_modifiedModelView",16),this._ubo.addUniform("u_modifiedModelViewProjection",16),this._ubo.addUniform("u_dayTextureTranslationAndScale",4,_0x55be02),this._ubo.addUniform("u_dayTextureSize",4,_0x55be02),this._ubo.addUniform("u_dayTextureTexCoordsRectangle",4,_0x55be02),this._ubo.addUniform("u_dayTextureUseWebMercatorT",1,_0x55be02),this._ubo.addUniform("u_dayTextureFlipY",1,_0x55be02),this._ubo.addUniform("u_normalTextureTranslationAndScale",4),this._ubo.addUniform("uTileBounds",4),this._ubo.addUniform("u_tileRectangle",4),this._ubo.addUniform("u_center3D",3),this._ubo.addUniform("u_southAndNorthLatitude",2),this._ubo.addUniform("u_southMercatorYAndOneOverHeight",2),this._ubo.addUniform("u_useNormalTexture",1),this._ubo.create()},_0x5c8da9.prototype._textureDirty=function(e){if(this._dayTextures.length!=e.dayTextures.length)return!0;var t;for(t=0;t<this._dayTextures.length;t++)if(this._dayTextures[t].id!=e.dayTextures[t].id||this._dayTexturesSampleKey[t]!=e.dayTextures[t].samplerKey)return!0;if(this._gridTextures.length!=e.gridTextures.length)return!0;for(t=0;t<this._gridTextures.length;t++)if(this._gridTextures[t].id!=e.gridTextures[t].id)return!0;return this._waterMask!=e.waterMask||this._oceanNormalMap!=e.oceanNormalMap},_0x5c8da9.prototype.updateFromProperties=function(e){if(this._context.webgpu){var t;for(e$2e(this._ubo)||this._initUBO(this._context),this._updateUniform(e),this._ubo.updateFloatArray("u_dayTextureTranslationAndScale",this._dayTextureTranslationAndScale),this._ubo.updateFloatArray("u_dayTextureSize",this._dayTextureSize),this._ubo.updateFloatArray("u_dayTextureTexCoordsRectangle",this._dayTextureTexCoordsRectangle),this._ubo.updateFloatArray("u_dayTextureUseWebMercatorT",e.dayTextureUseWebMercatorT),this._ubo.updateFloatArray("u_dayTextureFlipY",e.dayTextureFlipY),_0x37a515.writeCartesian4ToUBO("u_normalTextureTranslationAndScale",this._ubo,e.normalTextureTranslationAndScale),_0x37a515.writeMatrix4ToUBO("u_modifiedModelView",this._ubo,this._modifiedModelView),_0x37a515.writeMatrix4ToUBO("u_modifiedModelViewProjection",this._ubo,this._modifiedModelViewProjection),_0x37a515.writeCartesian4ToUBO("uTileBounds",this._ubo,e.tileBounds),_0x37a515.writeCartesian4ToUBO("u_tileRectangle",this._ubo,e.tileRectangle),_0x37a515.writeCartesian3ToUBO("u_center3D",this._ubo,e.center3D),_0x37a515.writeCartesian2ToUBO("u_southAndNorthLatitude",this._ubo,e.southAndNorthLatitude),_0x37a515.writeCartesian2ToUBO("u_southMercatorYAndOneOverHeight",this._ubo,e.southMercatorYAndOneOverHeight),this._ubo.updateFloat("u_useNormalTexture",e.normalTexture?1:0),this._ubo.update(),this._isTextureDirty=this._textureDirty(e),this._dayTextures=e.dayTextures,this._dayTexturesSampleKey=[],t=0;t<this._dayTextures.length;t++)this._dayTexturesSampleKey.push(this._dayTextures[t].samplerKey);this._gridTextures=e.gridTextures,this._waterMask=e.waterMask,this._oceanNormalMap=e.oceanNormalMap,this._modifyRasterTexture=e.modifyRasterTexture}};var _0x29fe17=new o$1p,_0x46b2ff=new o$1p;_0x5c8da9.prototype._updateUniform=function(e){var t=this._context.uniformState.view;_0x46b2ff=o$1p.subtract(e.rtc,this._context.relativeOrigin,_0x46b2ff);var i=p$1d.multiplyByPoint(t,_0x46b2ff,_0x29fe17);p$1d.setTranslation(t,i,this._modifiedModelView);var n=this._context.uniformState.projection;p$1d.multiply(n,this._modifiedModelView,this._modifiedModelViewProjection),e.dayTextureTranslationAndScale.length>_0x55be02&&console.log("GlobeTileUBO max day texture is "+_0x55be02+", used day textures is "+e.dayTextureTranslationAndScale.length);for(var r=0;r<e.dayTextureTranslationAndScale.length;r++){var o=e.dayTextureTranslationAndScale[r];e$2c.pack(o,this._dayTextureTranslationAndScale,4*r)}for(r=0;r<e.dayTextureSize.length;r++){var a=e.dayTextureSize[r];e$2c.pack(a,this._dayTextureSize,4*r)}for(r=0;r<e.dayTextureTexCoordsRectangle.length;r++){var s=e.dayTextureTexCoordsRectangle[r];e$2c.pack(s,this._dayTextureTexCoordsRectangle,4*r)}},_0x5c8da9.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),_0x37a515.setTextureArrayToEffect(e,this._dayTextures,_0x4621a7),_0x37a515.setTextureArrayToEffect(e,this._gridTextures,_0x4aa0d3),_0x37a515.setTextureToEffect(e,this._waterMask,_0x1e2c4f),_0x37a515.setTextureToEffect(e,this._oceanNormalMap,_0x3ca47e),_0x37a515.setTextureToEffect(e,this._modifyRasterTexture,_0x136868)},_0x5c8da9.prototype.isDestroyed=function(){return!1},_0x5c8da9.prototype.destroy=function(){return i$11(this)};var L$U="varying vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nconst float fxaaQualitySubpix = 1.0;\nconst float fxaaQualityEdgeThreshold = 0.166;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nconst vec3 kLumaCoefficients = vec3(0.2126, 0.7152, 0.0722);\n#define FxaaLuma(rgba) dot(rgba.rgb, kLumaCoefficients)\nvoid main(){\nvec2 texelSize = vec2(1.0) / czm_viewport.zw;\nvec2 sampleCoordS = v_textureCoordinates + vec2( 0.0, 1.0) * texelSize;\nvec2 sampleCoordE = v_textureCoordinates + vec2( 1.0, 0.0) * texelSize;\nvec2 sampleCoordN = v_textureCoordinates + vec2( 0.0,-1.0) * texelSize;\nvec2 sampleCoordW = v_textureCoordinates + vec2(-1.0, 0.0) * texelSize;\nvec2 sampleCoordNW = v_textureCoordinates + vec2(-1.0,-1.0) * texelSize;\nvec2 sampleCoordSE = v_textureCoordinates + vec2( 1.0, 1.0) * texelSize;\nvec2 sampleCoordNE = v_textureCoordinates + vec2( 1.0,-1.0) * texelSize;\nvec2 sampleCoordSW = v_textureCoordinates + vec2(-1.0, 1.0) * texelSize;\nvec2 posM;\nposM.x = v_textureCoordinates.x;\nposM.y = v_textureCoordinates.y;\nvec4 rgbyM = texture2D(colorTexture, v_textureCoordinates, 0.0);\nfloat lumaM = FxaaLuma(rgbyM);\nfloat lumaS = FxaaLuma(texture2D(colorTexture, sampleCoordS, 0.0));\nfloat lumaE = FxaaLuma(texture2D(colorTexture, sampleCoordE, 0.0));\nfloat lumaN = FxaaLuma(texture2D(colorTexture, sampleCoordN, 0.0));\nfloat lumaW = FxaaLuma(texture2D(colorTexture, sampleCoordW, 0.0));\nfloat maxSM = max(lumaS, lumaM);\nfloat minSM = min(lumaS, lumaM);\nfloat maxESM = max(lumaE, maxSM);\nfloat minESM = min(lumaE, minSM);\nfloat maxWN = max(lumaN, lumaW);\nfloat minWN = min(lumaN, lumaW);\nfloat rangeMax = max(maxWN, maxESM);\nfloat rangeMin = min(minWN, minESM);\nfloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\nfloat range = rangeMax - rangeMin;\nfloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\nfloat lumaNW = FxaaLuma(texture2D(colorTexture, sampleCoordNW, 0.0));\nfloat lumaSE = FxaaLuma(texture2D(colorTexture, sampleCoordSE, 0.0));\nfloat lumaNE = FxaaLuma(texture2D(colorTexture, sampleCoordNE, 0.0));\nfloat lumaSW = FxaaLuma(texture2D(colorTexture, sampleCoordSW, 0.0));\nfloat lumaNS = lumaN + lumaS;\nfloat lumaWE = lumaW + lumaE;\nfloat subpixRcpRange = 1.0 / range;\nfloat subpixNSWE = lumaNS + lumaWE;\nfloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\nfloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\nfloat lumaNESE = lumaNE + lumaSE;\nfloat lumaNWNE = lumaNW + lumaNE;\nfloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\nfloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\nfloat lumaNWSW = lumaNW + lumaSW;\nfloat lumaSWSE = lumaSW + lumaSE;\nfloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\nfloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\nfloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\nfloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\nfloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\nfloat edgeVert = abs(edgeVert3) + edgeVert4;\nfloat subpixNWSWNESE = lumaNWSW + lumaNESE;\nfloat lengthSign = texelSize.x;\nbool horzSpan = edgeHorz >= edgeVert;\nfloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\nif (!horzSpan)\n{\nlumaN = lumaW;\n}\nif (!horzSpan)\n{\nlumaS = lumaE;\n}\nif (horzSpan)\n{\nlengthSign = texelSize.y;\n}\nfloat subpixB = (subpixA * (1.0 / 12.0)) - lumaM;\nfloat gradientN = lumaN - lumaM;\nfloat gradientS = lumaS - lumaM;\nfloat lumaNN = lumaN + lumaM;\nfloat lumaSS = lumaS + lumaM;\nbool pairN = abs(gradientN) >= abs(gradientS);\nfloat gradient = max(abs(gradientN), abs(gradientS));\nif (pairN)\n{\nlengthSign = -lengthSign;\n}\nfloat subpixC = clamp(abs(subpixB) * subpixRcpRange, 0.0, 1.0);\nvec2 posB;\nposB.x = posM.x;\nposB.y = posM.y;\nvec2 offNP;\noffNP.x = (!horzSpan) ? 0.0 : texelSize.x;\noffNP.y = (horzSpan) ? 0.0 : texelSize.y;\nif (!horzSpan)\n{\nposB.x += lengthSign * 0.5;\n}\nif (horzSpan)\n{\nposB.y += lengthSign * 0.5;\n}\nvec2 posN;\nposN.x = posB.x - offNP.x * 1.5;\nposN.y = posB.y - offNP.y * 1.5;\nvec2 posP;\nposP.x = posB.x + offNP.x * 1.5;\nposP.y = posB.y + offNP.y * 1.5;\nfloat subpixD = ((-2.0) * subpixC) + 3.0;\nfloat lumaEndN = FxaaLuma(texture2D(colorTexture, posN, 0.0));\nfloat subpixE = subpixC * subpixC;\nfloat lumaEndP = FxaaLuma(texture2D(colorTexture, posP, 0.0));\nif (!pairN)\n{\nlumaNN = lumaSS;\n}\nfloat gradientScaled = gradient * 1.0 / 4.0;\nfloat lumaMM = lumaM - lumaNN * 0.5;\nfloat subpixF = subpixD * subpixE;\nbool lumaMLTZero = lumaMM < 0.0;\nlumaEndN -= lumaNN * 0.5;\nlumaEndP -= lumaNN * 0.5;\nbool doneN = abs(lumaEndN) >= gradientScaled;\nbool doneP = abs(lumaEndP) >= gradientScaled;\nif (!doneN)\n{\nposN.x -= offNP.x * 3.0;\n}\nif (!doneN)\n{\nposN.y -= offNP.y * 3.0;\n}\nbool doneNP = (!doneN) || (!doneP);\nif (!doneP)\n{\nposP.x += offNP.x * 3.0;\n}\nif (!doneP)\n{\nposP.y += offNP.y * 3.0;\n}\nvec4 t0 = texture2D(colorTexture, posN.xy, 0.0);\nvec4 t1 = texture2D(colorTexture, posN.xy, 0.0);\nif (doneNP)\n{\nif (!doneN) lumaEndN = FxaaLuma(t0);\nif (!doneP) lumaEndP = FxaaLuma(t1);\nif (!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif (!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif (!doneN) posN.x -= offNP.x * 12.0;\nif (!doneN) posN.y -= offNP.y * 12.0;\ndoneNP = (!doneN) || (!doneP);\nif (!doneP) posP.x += offNP.x * 12.0;\nif (!doneP) posP.y += offNP.y * 12.0;\n}\nfloat dstN = posM.x - posN.x;\nfloat dstP = posP.x - posM.x;\nif (!horzSpan)\n{\ndstN = posM.y - posN.y;\n}\nif (!horzSpan)\n{\ndstP = posP.y - posM.y;\n}\nbool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\nfloat spanLength = (dstP + dstN);\nbool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\nfloat spanLengthRcp = 1.0 / spanLength;\nbool directionN = dstN < dstP;\nfloat dst = min(dstN, dstP);\nbool goodSpan = directionN ? goodSpanN : goodSpanP;\nfloat subpixG = subpixF * subpixF;\nfloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\nfloat subpixH = subpixG * fxaaQualitySubpix;\nfloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\nfloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\nif (!horzSpan)\n{\nposM.x += pixelOffsetSubpix * lengthSign;\n}\nif (horzSpan)\n{\nposM.y += pixelOffsetSubpix * lengthSign;\n}\n#ifdef MALI\nif(range < rangeMaxClamped)\n{\ngl_FragColor = rgbyM;\n}\nelse\n{\ngl_FragColor = texture2D(colorTexture, posM, 0.0);\n}\n#else\ngl_FragColor = texture2D(colorTexture, posM, 0.0);\n#endif\n}\n";function R$H(e){if(!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.terrainProvider))throw new t$15("options.terrainProvider is required.");if(!e$2e(e.imageryLayers))throw new t$15("options.imageryLayers is required.");if(!e$2e(e.surfaceShaderSet))throw new t$15("options.surfaceShaderSet is required.");this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=W$X.RECEIVE_ONLY,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=0,this.undergroundColorAlphaByDistance=0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._terrainLayers=e.terrainLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._pickRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new o$1h,this._imageryLayers.layerAdded.addEventListener(R$H.prototype._onLayerAdded,this),this._imageryLayers.layerRemoved.addEventListener(R$H.prototype._onLayerRemoved,this),this._imageryLayers.layerMoved.addEventListener(R$H.prototype._onLayerMoved,this),this._imageryLayers.layerShownOrHidden.addEventListener(R$H.prototype._onLayerShownOrHidden,this),this._imageryLayers.layerUpdate.addEventListener(R$H.prototype._onLayerUpdate,this),this._tileLoadedEvent=new o$1h,this._imageryLayersUpdatedEvent=new o$1h,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._pickCommands=[],this._usedDrawCommands=0,this._usedPickCommands=0,this._drawCommandsByTile={},this._modifyDrawCommandsByTile={},this._uniformMapsByTile={},this._modifyUniformMapsByTile={},this._modifyUsedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new e$1X(0,0,.5,1),this._clippingPlanes=void 0,this.cartographicLimitRectangle=h$18.clone(h$18.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._flattenTextureWidth=1024,this._flattenTexture=void 0,this._hypsometricSetting=void 0,this._hypsometricTexture=void 0,this._hypsometricRenderTexture=void 0,this._hypsometricRegion=void 0,this._hypsometricBound=new e$2c,this._bUseHypColorTable=!1,this._bUseHypRegion=!1,this._hypsometricRegionUpdate=!1,this._hypAnalysisMode=k$S.AnalysisRegionMode.ARM_NONE,this._hypMaxInstensity=e.MaxInstensity,this._hypMinInstensity=e.MinInstensity,this._hypMaxHeight=e.MaxHeight,this._hypMinHeight=e.MinHeight,this._hypUseColorByHeight=!0,this._geoBounds=new e$2c,this._style3D=new e$1v,this._slopeSetting=void 0,this._slopeColorTexture=void 0,this._slopeArrowsTexture=void 0,this._slopePolygonTexture=void 0,this._slopeRegion=void 0,this._slopeBound=new e$2c,this._bUseSlopeColorTable=!1,this._slopeRegionUpdate=!1,this._slopeAnalysisMode=k$S.AnalysisRegionMode.ARM_NONE,this._slopeArrowUrl=n$17("Assets/Textures/arrow.png"),this._excavateRectangle=new h$18,this._clipRasterTilesMap={},this._modifyRegions=new e$1Q,this._modifyTilesMap={},this._modifyRegionUpdate=!1,this.clippingType=R$L.KeepOutside,this._excavateRegions=new e$1Q,this._excavateRegionUpdate=!1,this._extractRegions=new e$1Q,this._extractRegionsUpdate=!1,this._imageryClipRegions=new e$1Q,this._imageryClipRegionUpate=!1,this._oriClipPlane=[],this._clipPlane=[];for(var t=0;t<6;t++)this._clipPlane[t]=new e$2c(0,0,0,0),this._oriClipPlane[t]=new e$2c(0,0,0,0);this._clipMode=0,this._clipLineColor=new e$2c(1,0,0,1),this._clipping=!1,this._splitDirection=new o$1o,this._cullEnabled=!0,this._rasterTextureSizes=[256,512],this._rasterLineWidth=1,this._rasterLineFBOs=[],this._rasterAAFBOs=[],this._rasterCurrentFBOIdx=0,this._lineExpandCommand=void 0,this._lineFXAACommand=void 0,this._swipeRegion=new e$2c(0,0,1,1),this._swipeEnabled=!1,this._polygonOffset={enabled:!1,value:new o$1o(0,0)},this._excavateRegionCommands=new e$1Q,this._pbrParameter=Xe$e.NONE,this._PBRMaterialParams={metallic:0,roughness:0,baseColorFactor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissionFactor:o$1p.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1},this._excavationSideTextureUrl=n$17("Assets/Textures/excavationregion_side.jpg"),this._excavationBottomTextureUrl=n$17("Assets/Textures/excavationregion_top.jpg")}function Fa$3(e,t){var i=e.loadingImagery;e$2e(i)||(i=e.readyImagery);var n=t.loadingImagery;return e$2e(n)||(n=t.readyImagery),i.imageryLayer._layerIndex-n.imageryLayer._layerIndex}function Da$3(e){var t=e.indexBuffer;e.destroy(),!t.isDestroyed()&&e$2e(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}function Ia$3(e,t){var i=t.creditDisplay;e._terrainProvider.ready&&e$2e(e._terrainProvider.credit)&&i.addCredit(e._terrainProvider.credit);for(var n=e._imageryLayers,r=0,o=n.length;r<o;++r){var a=n.get(r).imageryProvider;e$2e(a)&&a.ready&&e$2e(a.credit)&&i.addCredit(a.credit);var s=n.get(r).gridProvider;e$2e(s)&&s.ready&&e$2e(s.credit)&&i.addCredit(s.credit)}}function oi$4(e,t){var i=t.data.mesh;if(e$2e(i)&&!i.isModified){for(var n=e.context,r=i.encoding,o=i.vertices,a=(new o$1o,new o$1p),s=new o$1p,l=i.center,u=new a$18,c=i.stride,h=o.length,d=new Array(h/c),f=0;f<h;f+=c){var p=f/c;d[p]=o$1p.unpack(o,f,d[p]),d[p]=o$1p.add(d[p],l,d[p])}for(var _=t.rectangle.width/50,m=new Array(i.indices.length),g=(f=0,m.length);f<g;f++)m[f]=i.indices[f];var x=A$1f.computeSubdivision(t$12.WGS84,d,m,_,!0),y=x.attributes.position.values;h=y.length;var v=t.rectangle,$=v.width,b=v.height,T=new Float32Array(h/3*c),C=t$N.geodeticLatitudeToMercatorAngle(v.south),S=1/(t$N.geodeticLatitudeToMercatorAngle(v.north)-C),w=0;for(f=0;f<h;f+=3){o$1p.unpack(y,f,a),a$18.fromCartesian(a,void 0,u);var E=(u.longitude-v.west)/$,P=(u.latitude-v.south)/b,A={x:E=e$2d.clamp(E,0,1),y:P=e$2d.clamp(P,0,1)};o$1p.fromRadians(u.longitude,u.latitude,0,void 0,s);var L=(t$N.geodeticLatitudeToMercatorAngle(u.latitude)-C)*S;w=r.encode(T,w,a,A,u.height,new o$1o,L)}var M=new T$M;M.encoding=i.encoding,M.vertices=T,M.indices=new Uint16Array(x.indices),M.center=o$1p.clone(l),t.data.subDivisionMesh=M,t.data.subDivisionVertexArray=t.data.subDivisionVertexArray&&t.data.subDivisionVertexArray.destroy(),t.data.subDivisionVertexArray=v$C._createVertexArrayForMesh(n,t.data.subDivisionMesh),i.isModified=!0}}Object.defineProperties(R$H.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._baseColor=e,this._firstPassInitialColor=e$2c.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._quadtree=e}},ready:{get:function(){return this._terrainProvider.ready&&(0===this._imageryLayers.length||this._imageryLayers.get(0).imageryProvider.ready)}},tilingScheme:{get:function(){return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},tileLoadedEvent:{get:function(){return this._tileLoadedEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){if(this._terrainProvider!==e||e._isSkirtDirty){if(!e$2e(e))throw new t$15("terrainProvider is required.");this._terrainProvider=e,this._terrainProvider instanceof se$r&&(this._terrainProvider._quadtree=this._quadtree),e$2e(this._quadtree)&&this._quadtree.invalidateAllTiles()}}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){h$L.setOwner(e,this,"_clippingPlanes")}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection.x=e.x,this._splitDirection.y=e.y}},excavationSideTextureUrl:{get:function(){return this._excavationSideTextureUrl},set:function(e){this._excavationSideTextureUrl=e}},excavationBottomTextureUrl:{get:function(){return this._excavationBottomTextureUrl},set:function(e){this._excavationBottomTextureUrl=e}}}),R$H.prototype.update=function(e){this._imageryLayers._update(),this.terrainProvider._isSkirtDirty&&(this.terrainProvider=this.terrainProvider,this.terrainProvider._isSkirtDirty=!1)},R$H.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile((function(e){e.data.imagery.sort(Fa$3)}))),Ia$3(this,e);for(var t=this._vertexArraysToDestroy,i=t.length,n=0;n<i;++n)Da$3(t[n]);t.length=0,e._quadtree=this._quadtree},R$H.prototype.beginUpdate=function(e){for(var t=this._tilesToRenderByTextureCount,i=0,n=t.length;i<n;++i){var r=t[i];e$2e(r)&&(r.length=0)}var o=this._clippingPlanes;e$2e(o)&&o.enabled&&o.update(e),this._usedDrawCommands=0,this._modifyUsedDrawCommands=0,this._drawCommands=[]},R$H.prototype.createTexture=function(e){if(e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:e,width:1024,height:64,pixelFormat:V$12.RGBA,flipY:!1}),e$2e(this._hypsometricSetting)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer})),e$2e(this._slopeColorTexture)||(this._slopeColorTexture=new t$U({context:e,width:1024,height:64,pixelFormat:V$12.RGBA,flipY:!1}),e$2e(this._slopeSetting)&&this._slopeColorTexture.copyFrom({width:1024,height:64,arrayBufferView:this._slopeSetting.ColorTable._imageBuffer})),!e$2e(this._slopeArrowsTexture)&&(this._slopeArrowsTexture=this._slopeArrowsTexture&&this._slopeArrowsTexture.destroy(),e$2e(this._slopeArrowUrl))){var t=this;o$1l(t$S(this._slopeArrowUrl),(function(i){t._slopeArrowUrl==t._slopeArrowUrl&&(t._slopeArrowsTexture=new t$U({context:e,source:i,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT})}))}))}},R$H.prototype.updateHypRegionFrameBuffer=function(e){if(this._hypsometricRegionUpdate){if(!e$2e(this._hypsometricRegion))return void(this._bUseHypRegion=!1);this._hypsometricRegionUpdate=!1,this._bUseHypRegion=!0,Ie$g(e.context,this._hypsometricRegion)}},R$H.prototype.updateSlopeRegionFrameBuffer=function(e){if(this._slopeRegionUpdate){if(!e$2e(this._slopeRegion))return void(this._bUseSlopeRegion=!1);this._slopeRegionUpdate=!1,this._bUseSlopeRegion=!0,Ie$g(e.context,this._slopeRegion)}},R$H.prototype.endUpdate=function(e){if(!e$2e(this._renderState)){this._renderState=d$1m.fromCache({cull:{enabled:this._cullEnabled},depthTest:{enabled:!0,func:re$G.LESS}}),this._blendRenderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:re$G.LESS_OR_EQUAL},blending:Ee$r.ALPHA_BLEND});let e=l$1f(this._renderState,!0);e.cull.enabled=!1,this._disableCullingRenderState=d$1m.fromCache(e),e=l$1f(this._blendRenderState,!0),e.cull.enabled=!1,this._disableCullingBlendRenderState=d$1m.fromCache(e)}if(e._fboState.frameBufferType!=Qe$c.CLAMP){this.createTexture(e.context),this.updateHypRegionFrameBuffer(e),this.updateSlopeRegionFrameBuffer(e),this._updateExcavateRegions(e),this._updateModifyRegions(e),this._updateImageryClipRegions(e),this._updateExtractRegions(e),dn$2(this,e),hn$3(this,e),e.rasterLineWidth>1&&e$2e(e.commandListRealtimeRaster)&&e.commandListRealtimeRaster.length>0&&(un$3(this,e),ln$3(this,e)),this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&!1!==this.terrainProvider.isShowGlobe&&Q$L.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);for(var t=0,i=this._tilesToRenderByTextureCount,n=0,r=i.length;n<r;++n){var o=i[n];if(e$2e(o)){var a=0;o.length>0&&(a=o[o.length-1]._level);for(var s=0,l=o.length;s<l;++s){o[s].realtimeRasterVectors(e,this),o[s].renderVectorBy2DCanvas(e,this);var u=o[s],c=u.data.tileBoundingRegion;if(u.data.terrainState!==Ee$j.INVALID){u.rasterClipRegion(e,this),e$2e(u.data.modifyTerrainVertexArray)&&(!e._fboState.enabled||e._fboState.name.indexOf("_excavationGlobeHeight2")>-1)&&(sr$6(this,u,void 0,a,e,!0),oi$4(e,u));for(var h=void 0,d=!1,f=e.camera._scene.terrainLayers._layers,p=1;p<f.length;p++){var _=f[p]._terrainProvider.tablename,m=u.data.terrain[_];if(e$2e(m)){if(e$2e(m.terrainData)&&e$2e(m.terrainData.hasInvalid)){if(!m.terrainData.hasInvalid){e$2e(m.terrainData)&&e$2e(m.vertexArray)&&e$2e(m.mesh)&&(u.data.terrainData=m.terrainData,u.data.vertexArray=m.vertexArray,u.data.mesh=m.mesh);break}d=!0}sr$6(this,u,m,a,e,!1,h),e$2e(m)&&(e$2e(m.mesh)&&!m.mesh.invalid&&e$2e(m.vertexArray)?(m.realtimeRasterValidTerrain(e,this,u),h=m._rasterTerrainTexture):h=void 0)}}d&&oi$4(e,u),sr$6(this,u,void 0,a,e,!1,h),e$2e(u.data)&&e$2e(u.data.terrainData)&&e$2e(u.data.terrainData._maximumHeight)&&e$2e(u.data.terrainData._minimumHeight)&&(0==s?t=.5*(u.data.terrainData._maximumHeight+u.data.terrainData._minimumHeight):t+=.5*(u.data.terrainData._maximumHeight+u.data.terrainData._minimumHeight))}e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,c.minimumHeight)}l>1&&(t/=l,e.averageTerrainHeight=t)}}if(e.commandListRealtimeRaster.length=0,!e.camera.bReflect)for(var g in this._excavateRegionCommands._hash)if((e$2e(this._excavationSideTextureUrl)||!(g.indexOf("side")>-1))&&(e$2e(this._excavationBottomTextureUrl)||!(g.indexOf("bottom")>-1))){var x=this._excavateRegionCommands._hash[g];e.commandList.push(x)}if(this._clipping){var y=e.camera.inverseViewMatrix,v=new p$1d;p$1d.transpose(y,v);for(p=0;p<6;p++)p$1d.multiplyByVector(v,this._oriClipPlane[p],this._clipPlane[p])}}},R$H.prototype.updateForPick=function(e){for(var t=this._drawCommands,i=0,n=this._usedDrawCommands;i<n;++i)e.commandList.push(t[i])},R$H.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()},R$H.prototype.getLevelMaximumGeometricError=function(e){return this._terrainProvider.getLevelMaximumGeometricError(e)},R$H.prototype.loadTile=function(e,t){var i=t.parent,n=t.data;if(e$2e(i)&&e$2e(i.data)&&i.data.terrainState===Ee$j.INVALID)return n.terrainState=Ee$j.INVALID,void(t.state=re$A.DONE);var r,o=!0;e$2e(n)&&(o=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===D$J.CULLED_BUT_NEEDED,r=n.terrainState),v$C.processStateMachine(t,e,this.terrainProvider,this._terrainLayers,this._imageryLayers,this._vertexArraysToDestroy,o),n=t.data,o&&r!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)&&n.boundingVolumeSourceTile===t&&(o=!1,v$C.processStateMachine(t,e,this.terrainProvider,this._terrainLayers,this._imageryLayers,this._vertexArraysToDestroy,o)),t.renderable&&this._tileLoadedEvent.raiseEvent(t)};var Ha$2=new i$1d,si$4=new h$18,Ma$3=new h$18,Ua$3=new a$18;function nr$7(e,t){if(t.west<t.east)return t;var i=h$18.clone(t,Ma$3);return h$18.center(e,Ua$3).longitude>0?i.east=e$2d.PI:i.west=-e$2d.PI,i}function ui$6(e,t){if(t.cameraUnderground||t.globeTranslucencyState.translucent)return!0;if(e.backFaceCulling)return!1;const i=e._clippingPlanes;return!!(e$2e(i)&&i.enabled||!h$18.equals(e.cartographicLimitRectangle,h$18.MAX_VALUE))}R$H.prototype.computeTileVisibility=function(e,t,i){var n=this.computeDistanceToTile(e,t);e._distance=n;const r=ui$6(this,t);if(t.fog.enabled&&!r&&e$2d.fog(n,t.fog.density)>=1)return fe$r.NONE;var o=e.data,a=o.tileBoundingRegion;if(void 0===o.boundingVolumeSourceTile)return fe$r.PARTIAL;var s=t.cullingVolume,l=u$Z(o.modifyOrientedBoundingBox,o.orientedBoundingBox);if(!e$2e(l)&&e$2e(o.renderedMesh))for(var u in l=o.renderedMesh.boundingSphere3D,o.terrain)l=i$1d.union(e,o.terrain[u].mesh.boundingSphere3D,l,l);o.clippedByBoundaries=!1;var c=nr$7(e.rectangle,this.cartographicLimitRectangle),h=h$18.simpleIntersection(c,e.rectangle,si$4);if(!e$2e(h))return fe$r.NONE;if(h$18.equals(h,e.rectangle)||(o.clippedByBoundaries=!0),t.mode!==C$14.SCENE3D)for(var u in l=Ha$2,i$1d.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,a.minimumHeight,a.maximumHeight,l),o$1p.fromElements(l.center.z,l.center.x,l.center.y,l.center),t.mode===C$14.MORPHING&&e$2e(o.renderedMesh)&&(l=i$1d.union(o.renderedMesh.boundingSphere3D,l,l)),o.terrain)l=i$1d.union(e,o.terrain[u].mesh.boundingSphere3D,l,l);var d=this._clippingPlanes;if(e$2e(d)&&d.enabled&&e$2e(l)){var f=d.computeIntersectionWithBoundingVolume(l);if(e.isClipped=f!==Ae$w.INSIDE,f===Ae$w.OUTSIDE)return fe$r.NONE}var p=Ae$w.INTERSECTING;if(e$2e(l)){if((p=s.computeVisibility(l))===Ae$w.OUTSIDE)for(var u in o.terrain)if(e$2e(l=o.terrain[u].orientedBoundingBox)||(l=o.tileTerrainOrientedBoundingBox),e$2e(l)&&(p=s.computeVisibility(l))!==Ae$w.OUTSIDE)break;if(p===Ae$w.OUTSIDE)return e$2e(e.parent)&&e$2e(e.parent.data.modifyOrientedBoundingBox)?s.computeVisibility(e.parent.data.modifyOrientedBoundingBox):fe$r.NONE}if(e.isModified)return p;var _=t.mode===C$14.SCENE3D&&t.camera.frustum instanceof a$V;if(t.mode===C$14.SCENE3D&&!_&&e$2e(i)&&!r){var m=o.occludeePointInScaledSpace;return!e$2e(m)||i.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(m,a.minimumHeight)?p:fe$r.NONE}return p},R$H.prototype.canRefine=function(e){return!!e$2e(e.data.terrainData)||void 0!==this.terrainProvider.getTileDataAvailable(2*e.x,2*e.y,e.level+1)};var Va$2=[],Na$1=[];R$H.prototype.canRenderWithoutLosingDetail=function(e,t){var i=e.data,n=Va$2;n.length=this._imageryLayers.length;var r,o,a,s=!1,l=!1;for(e$2e(i)&&(s=i.terrainState===Ee$j.READY,l=!0,r=i.imagery),o=0,a=n.length;o<a;++o)n[o]=l;if(e$2e(r))for(o=0,a=r.length;o<a;++o){var u=r[o];if(!e$2e(u.imageryLayer)){var c=u.loadingImagery,h=!e$2e(c)||c.state===wt$7.FAILED||c.state===wt$7.INVALID,d=(u.loadingImagery||u.readyImagery).imageryLayer._layerIndex;n[d]=h&&n[d]}}var f=this.quadtree._lastSelectionFrameNumber,p=Na$1;for(p.length=0,p.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);p.length>0;){var _=p.pop(),m=_._lastSelectionResultFrame===f?_._lastSelectionResult:D$J.NONE;if(m===D$J.RENDERED){if(!e$2e(_.data))continue;if(!s&&_.data.terrainState===Ee$j.READY)return!1;var g=_.data.imagery;for(o=0,a=g.length;o<a;++o){var x=g[o];if(!e$2e(x.imageryLayer)){var y=x.loadingImagery,v=!e$2e(y)||y.state===wt$7.FAILED||y.state===wt$7.INVALID,$=(x.loadingImagery||x.readyImagery).imageryLayer._layerIndex;if(v&&!n[$])return!1}}}else m===D$J.REFINED&&p.push(_.southwestChild,_.southeastChild,_.northwestChild,_.northeastChild)}return!0};var Oa$2=new o$1p;R$H.prototype.computeTileLoadPriority=function(e,t){var i=e.data;if(void 0===i)return 0;var n=i.orientedBoundingBox;if(void 0===n)return 0;var r=t.camera.positionWC,o=t.camera.directionWC,a=o$1p.subtract(n.center,r,Oa$2),s=o$1p.magnitude(a);return s<e$2d.EPSILON5?0:(o$1p.divideByScalar(a,s,a),(1-o$1p.dot(a,o))*e._distance)};var di$6=new p$1d,Rt$7=new p$1d,za$3=new e$2c,Ga$3=new e$2c,Wa$2=new o$1p,li$6=new o$1p,ka$2=new o$1p,qa$3=new o$1p,De$i=new o$1p;R$H.prototype.showTileThisFrame=function(e,t){for(var i=0,n=e.data.imagery,r=0,o=n.length;r<o;++r){var a=n[r];e$2e(a.readyImagery)&&0!==a.readyImagery.imageryLayer.alpha&&++i}var s=this._tilesToRenderByTextureCount[i];e$2e(s)||(s=[],this._tilesToRenderByTextureCount[i]=s),s.push(e),e$2e(e.data.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;var l=this._debug;++l.tilesRendered,l.texturesRendered+=i};var Ya$3=[new o$1p,new o$1p,new o$1p,new o$1p];function Xa$3(e,t,i,n,r,o){var a=e.quadtree._occluders.ellipsoid,s=a.ellipsoid,l=Ya$3;return o$1p.fromRadians(i.west,i.south,r,s,l[0]),o$1p.fromRadians(i.east,i.south,r,s,l[1]),o$1p.fromRadians(i.west,i.north,r,s,l[2]),o$1p.fromRadians(i.east,i.north,r,s,l[3]),a.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,n,o)}function Qa$3(e,t,i){var n=e.data;void 0===n&&(n=e.data=new v$C),void 0===n.tileBoundingRegion&&(n.tileBoundingRegion=new y$K({computeBoundingVolumes:t._enablePrjArea,rectangle:e.rectangle,ellipsoid:e.tilingScheme.ellipsoid,minimumHeight:0,maximumHeight:.1}));var r=n.terrainData,o=n.mesh,a=n.tileBoundingRegion,s=!1;for(var l in void 0!==o&&void 0!==o.minimumHeight&&void 0!==o.maximumHeight?(a.minimumHeight=o.minimumHeight,a.maximumHeight=o.maximumHeight,s=!0):void 0!==r&&void 0!==r._minimumHeight&&void 0!==r._maximumHeight?(a.minimumHeight=r._minimumHeight*i.terrainExaggeration,a.maximumHeight=r._maximumHeight*i.terrainExaggeration,s=!0):e.showInvalid&&(a.minimumHeight=0,a.maximumHeight=0,s=!0),n.terrain)e$2e(n.terrain[l].mesh)?(a.minimumHeight=Math.min(n.terrain[l].mesh.minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(n.terrain[l].mesh.maximumHeight,a.maximumHeight)):e$2e(n.terrain[l].terrainData)?(a.minimumHeight=Math.min(n.terrain[l].terrainData._minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(n.terrain[l].terrainData._maximumHeight,a.maximumHeight)):s=!1;if(s)return e;a.minimumHeight=Number.NaN,a.maximumHeight=Number.NaN;for(var u=e.parent;void 0!==u;){var c=u.data;if(void 0!==c){var h=c.mesh;if(void 0!==h&&void 0!==h.minimumHeight&&void 0!==h.maximumHeight)a.minimumHeight=h.minimumHeight,a.maximumHeight=h.maximumHeight,s=!0;else{var d=c.terrainData;void 0!==d&&void 0!==d._minimumHeight&&void 0!==d._maximumHeight&&(a.minimumHeight=d._minimumHeight*i.terrainExaggeration,a.maximumHeight=d._maximumHeight*i.terrainExaggeration,s=!0)}for(var l in c.terrain)e$2e(c.terrain[l].mesh)?(a.minimumHeight=Math.min(c.terrain[l].mesh.minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(c.terrain[l].mesh.maximumHeight,a.maximumHeight)):e$2e(c.terrain[l].terrainData)?(a.minimumHeight=Math.min(c.terrain[l].terrainData._minimumHeight,a.minimumHeight),a.maximumHeight=Math.max(c.terrain[l].terrainData._maximumHeight,a.maximumHeight)):s=!1;if(s)return u}u=u.parent}}function hi$6(e,t,i){return function(n){var r,o,a,s=-1,l=n.data.imagery,u=l.length;for(a=0;a<u;++a)if((o=u$Z((r=l[a]).readyImagery,r.loadingImagery)).imageryLayer===t){s=a;break}if(-1!==s){var c=s+e;if(o=e$2e(r=l[c])?u$Z(r.readyImagery,r.loadingImagery):void 0,!e$2e(o)||o.imageryLayer!==t)return!t._createTileImagerySkeletons(n,i,c);for(a=s;a<c;++a)l[a].freeResources();l.splice(s,e)}return!0}}R$H.prototype.computeDistanceToTile=function(e,t){var i=Qa$3(e,this.terrainProvider,t),n=e.data,r=n.tileBoundingRegion;if(void 0===i)return 9999999999;n.boundingVolumeSourceTile!==i&&(n.boundingVolumeSourceTile=i,e$2e(e.rectangle)&&(n.orientedBoundingBox=y$Y.fromRectangle(e.rectangle,r.minimumHeight,r.maximumHeight,e.tilingScheme.ellipsoid,n.orientedBoundingBox),n.occludeePointInScaledSpace=Xa$3(this,n.orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,n.occludeePointInScaledSpace),n.tileTerrainOrientedBoundingBox=new y$Y(n.orientedBoundingBox.center,n.orientedBoundingBox.halfAxes)));var o=r.minimumHeight,a=r.maximumHeight;if(n.boundingVolumeSourceTile!==e){var s=t.camera.positionCartographic.height;Math.abs(s-o)>Math.abs(s-a)?(r.minimumHeight=o,r.maximumHeight=o):(r.minimumHeight=a,r.maximumHeight=a)}var l=r.distanceToCamera(t);return r.minimumHeight=o,r.maximumHeight=a,l},R$H.prototype._onLayerAdded=function(e,t){e.show&&(this._terrainProvider,this._imageLayerAdded(e,t),this._gridLayerAdded(e,t))},R$H.prototype._onLayerRemoved=function(e,t){e$2e(e.imageryProvider)&&(this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.imagery,n=-1,r=0,o=0,a=i.length;o<a;++o){var s=i[o],l=s.loadingImagery;if(e$2e(l)||(l=s.readyImagery),l.imageryLayer===e)-1===n&&(n=o),s.freeResources(),++r;else if(-1!==n)break}-1!==n&&i.splice(n,r)})),e$2e(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()),e$2e(e.gridProvider)&&(this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.gridImagery,n=-1,r=0,o=0,a=i.length;o<a;++o){var s=i[o],l=s.loadingGrid;if(e$2e(l)||(l=s.readyGrid),l.gridLayer===e)-1===n&&(n=o),s.freeResources(),++r;else if(-1!==n)break}-1!==n&&i.splice(n,r)})),e$2e(e.gridProvider)&&(e.gridProvider._reload=void 0))},R$H.prototype._onLayerMoved=function(e,t,i){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()},R$H.prototype._onLayerShownOrHidden=function(e,t,i){i?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)},R$H.prototype._imageLayerAdded=function(e,t){var i=this._terrainProvider,n=this,r=e.imageryProvider;if(e$2e(r)){var o=this._imageryLayersUpdatedEvent;r._reload=function(){e._imageryCache={},n._quadtree.forEachLoadedTile((function(t){if(!e$2e(t._loadedCallbacks[e._layerIndex])){var n,r=t.data.imagery,o=r.length,a=-1,s=0;for(n=0;n<o;++n){var l=r[n];if(u$Z(l.readyImagery,l.loadingImagery).imageryLayer===e)-1===a&&(a=n),++s;else if(-1!==a)break}if(-1!==a){var u=a+s;e._createTileImagerySkeletons(t,i,u)&&(t._loadedCallbacks[e._layerIndex]=hi$6(s,e,i),t.state=re$A.LOADING)}}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=re$A.LOADING,0!==t.level&&(t._lastSelectionResultFrame!==n.quadtree._lastSelectionFrameNumber||t._lastSelectionResult!==D$J.RENDERED)&&(t.renderable=!1))})),this._layerOrderChanged=!0,o.raiseEvent()}},R$H.prototype._gridLayerAdded=function(e,t){var i=this._terrainProvider,n=this,r=e.gridProvider;if(e$2e(r)){var o=this._imageryLayersUpdatedEvent;r._reload=function(){e._gridCache={},n._quadtree.forEachLoadedTile((function(t){if(!e$2e(t._loadedCallbacks[e._layerIndex])){var n,r=t.data.gridImagery,o=r.length,a=-1,s=0;for(n=0;n<o;++n){var l=r[n];if(u$Z(l.readyGrid,l.loadingGrid).gridLayer===e)-1===a&&(a=n),++s;else if(-1!==a)break}if(-1!==a){var u=a+s;e._createTileImagerySkeletons(t,i,u)&&(t._loadedCallbacks[e._layerIndex]=hi$6(s,e,i),t.state=re$A.LOADING)}}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=re$A.LOADING,0!==t.level&&(t._lastSelectionResultFrame!==n.quadtree._lastSelectionFrameNumber||t._lastSelectionResult!==D$J.RENDERED)&&(t.renderable=!1))})),this._layerOrderChanged=!0,o.raiseEvent()}},R$H.prototype._onLayerUpdate=function(e,t){e$2e(e.gridProvider)&&(this._quadtree.forEachLoadedTile((function(e){e.data.gridImagery.length>0&&(e.state=re$A.LOADING)})),e._isUpdate=!1)};var Ka$3=new p$1d,$e$9=new e$2c,ci$7,fi$6,Ct$5;function Za$3(e,t){var i={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){var t=e.context.uniformState.view;De$i=o$1p.subtract(this.properties.rtc,e.context.relativeOrigin,De$i);var i=p$1d.multiplyByPoint(t,De$i,li$6);return p$1d.setTranslation(t,i,di$6),di$6},u_modifiedModelViewProjection:function(){var t=e.context.uniformState.view,i=e.context.uniformState.projection;De$i=o$1p.subtract(this.properties.rtc,e.context.relativeOrigin,De$i);var n=p$1d.multiplyByPoint(t,De$i,li$6);return p$1d.setTranslation(t,n,Rt$7),p$1d.multiply(i,Rt$7,Rt$7),Rt$7},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureSize:function(){return this.properties.dayTextureSize},u_transparentBackColor:function(){return this.properties.transparentBackColor},u_imageryClipEnable:function(){return this.properties.imageryClipEnable},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureFlipY:function(){return this.properties.dayTextureFlipY},u_dayTextureAlpha:function(){var e=this.properties.morphingParentIndex;if(e>0){this.properties.morphingBeginTime<0&&(this.properties.morphingBeginTime=performance.now());var t=(performance.now()-this.properties.morphingBeginTime)/1e3;t=Math.min(t,1),this.properties.dayTextureAlpha[e]=1-t}return this.properties.dayTextureAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureSwipeRegion:function(){return this.properties.dayTextureSwipeRegion},u_normalTexture:function(){return this.properties.normalTexture?this.properties.normalTexture:e.context.defaultTexture},u_useNormalTexture:function(){return e$2e(this.properties.normalTexture)?1:0},u_normalTextureTranslationAndScale:function(){return this.properties.normalTextureTranslationAndScale},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){var i=t._clippingPlanes;return e$2e(i)&&e$2e(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){var i=t._clippingPlanes;return e$2e(i)?p$1d.multiply(e.context.uniformState.view,i.modelMatrix,Ka$3):p$1d.IDENTITY},u_clippingPlanesEdgeStyle:function(){var e=this.properties.clippingPlanesEdgeColor;return e.alpha=this.properties.clippingPlanesEdgeWidth,e},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_GlobeSplitDirection:function(){return this.properties.globeSplitDirection},u_GlobeSwipeRegion:function(){return $e$9.x=this.properties.globeSwipeRegion.x*e.context.drawingBufferWidth,$e$9.y=(1-this.properties.globeSwipeRegion.y)*e.context.drawingBufferHeight,$e$9.z=this.properties.globeSwipeRegion.z*e.context.drawingBufferWidth,$e$9.w=(1-this.properties.globeSwipeRegion.w)*e.context.drawingBufferHeight,$e$9},u_polygonOffset:function(){return this.properties.polygonOffset},uHypContourFillMode:function(){return this.properties.hypContourFillMode},uHypContourInterval:function(){return this.properties.hypContourInterval},uHypFloor:function(){return this.properties.hypFloor},uHypCeil:function(){return this.properties.hypCeil},uHypOpacity:function(){return this.properties.hypOpacity},uHypLineColor:function(){return this.properties.hypLineColor},uHypsometricTexture:function(){return this.properties.hypsometricTexture},uHypsometricRenderTexture:function(){return this.properties.hypsometricRenderTexture},uHypHasAnalysisRegion:function(){return this.properties.hypHasAnalysisRegion},uHypRect:function(){return this.properties.hypRect},uHypMaxVisibleValue:function(){return this.properties.hypMaxVisibleValue},uHypMinVisibleValue:function(){return this.properties.hypMinVisibleValue},uHypHasColorTable:function(){return this.properties.hypHasColorTable},uSlopeFillMode:function(){return this.properties.slopeFillMode},uSlopeRect:function(){return this.properties.slopeRect},uSlopeFloor:function(){return this.properties.slopeFloor},uSlopeCeil:function(){return this.properties.slopeCeil},uSlopeOpacity:function(){return this.properties.slopeOpacity},uSlopeColorTexture:function(){return this.properties.slopeColorTexture},uSlopePolygonTexture:function(){return this.properties.slopePolygonTexture},uSlopeArrowsTexture:function(){return this.properties.slopeArrowsTexture},uHasSlopeRegion:function(){return this.properties.hasSlopeRegion},uSlopeMaxVisibleValue:function(){return this.properties.slopeMaxVisibleValue},uSlopeMinVisibleValue:function(){return this.properties.slopeMinVisibleValue},uSlopeHasColorTable:function(){return this.properties.slopeHasColorTable},uLevel:function(){return this.properties.level},uTopLevel:function(){return this.properties.topLevel},clip_mode:function(){return this.properties.clip_mode},clip_planes:function(){return this.properties.clip_planes},clip_line_color:function(){return this.properties.clip_line_color},flattenTexture:function(){return this.properties.flattenTexture},uTileBounds:function(){return this.properties.tileBounds},u_gridTextures:function(){return this.properties.gridTextures},u_gridTextureTranslationAndScale:function(){return this.properties.gridTextureTranslationAndScale},u_gridTextureUseWebMercatorT:function(){return this.properties.gridTextureUseWebMercatorT},u_gridTextureTexCoordsRectangle:function(){return this.properties.gridTextureTexCoordsRectangle},uModifyRasterTexture:function(){return this.properties.modifyRasterTexture},uParentMixDirection:function(){return this.properties.parentMixDirection},uBaseColorFactor:function(){return this.properties.baseColorFactor},uMetallicFactor:function(){return this.properties.metallic},uRoughnessFactor:function(){return this.properties.roughness},uEmissionFactor:function(){return this.properties.emissionFactor},uFloodTexture:function(){return this.properties.floodTexture},uFloodRect:function(){return this.properties.floodRect},u_sunLightColor:function(){return this.properties.sunLightColor},u_ambientLightColor:function(){return this.properties.ambientLightColor},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},properties:{tileUBO:new _0x5c8da9(e.context),initialColor:new e$2c(0,0,.5,1),fillHighlightColor:new e$1X(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new o$1o(65e5,9e6),nightFadeDistance:new o$1o(1e7,4e7),hsbShift:new o$1p,center3D:void 0,rtc:new o$1p,modifiedModelView:new p$1d,tileRectangle:new e$2c,dayTextures:[],dayTextureTranslationAndScale:[],dayTextureSize:[],transparentBackColor:[],imageryClipEnable:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureFlipY:[],dayTextureAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureSwipeRegion:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new o$1o,southMercatorYAndOneOverHeight:new o$1o,waterMask:void 0,waterMaskTranslationAndScale:new e$2c,minMaxHeight:new o$1o,scaleAndBias:new p$1d,clippingPlanesEdgeColor:e$1X.clone(e$1X.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new e$2c,normalTexture:void 0,normalTextureTranslationAndScale:new e$2c,tileBounds:new e$2c,hypContourFillMode:0,uHypContourInterval:0,hypFloor:0,hypCeil:0,hypOpacity:1,hypLineColor:new e$1X,hypsometricTexture:void 0,hypsometricRenderTexture:void 0,hypHasAnalysisRegion:new e$2c,hypRect:new e$2c,hypMaxVisibleValue:0,hypMinVisibleValue:0,hypHasColorTable:!1,slopeFillMode:0,slopeRect:new e$2c,slopeFloor:0,slopeCeil:0,slopeOpacity:1,slopeColorTexture:void 0,slopePolygonTexture:void 0,slopeArrowsTexture:void 0,hasSlopeRegion:!1,slopeMaxVisibleValue:0,slopeMinVisibleValue:0,slopeHasColorTable:!1,level:0,topLevel:0,clip_mode:0,clip_planes:void 0,clip_line_color:new e$1X,flattenTexture:void 0,gridTextures:[],gridTextureTranslationAndScale:[],gridTextureTexCoordsRectangle:[],gridTextureUseWebMercatorT:[],modifyRasterTexture:void 0,morphingParentIndex:-1,morphingBeginTime:-1,parentMixDirection:0,baseColorFactor:new e$2c(1,1,1,1),metallic:0,roughness:0,emissionFactor:o$1p.UNIT_XYZ,floodRect:new e$2c,floodTexture:void 0,sunLightColor:new e$1X,ambientLightColor:new e$1X,frontFaceAlphaByDistance:new e$2c,backFaceAlphaByDistance:new e$2c,undergroundColor:e$1X.clone(e$1X.TRANSPARENT),undergroundColorAlphaByDistance:new e$2c}};return i}function $a$3(e,t,i){var n,r,o=i.data;if(e$2e(o.vertexArray)?(n=o.mesh,r=o.vertexArray):e$2e(o.fill)&&e$2e(o.fill.vertexArray)&&(n=o.fill.mesh,r=o.fill.vertexArray),e$2e(n)&&e$2e(r)){if(e$2e(o.wireframeVertexArray)){if(o.wireframeVertexArray.mesh===n)return;o.wireframeVertexArray.destroy(),o.wireframeVertexArray=void 0}o.wireframeVertexArray=ja$2(e,r,n),o.wireframeVertexArray.mesh=n}}function ja$2(e,t,i){var n={indices:i.indices,primitiveType:W$18.TRIANGLES};k$14.toWireframe(n);var r=n.indices,o=t$X.createIndexBuffer({context:e,typedArray:r,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new c$13({context:e,attributes:t._attributes,indexBuffer:o})}!function(){var e,t,i=new d$1o({geometry:o$17.fromDimensions({dimensions:new o$1p(2,2,2)})}),n=new d$1o({geometry:new a$U({radius:1})}),r=new p$1d;function o(e){return new y$R({geometryInstances:e,appearance:new t$Q({translucent:!1,flat:!0}),asynchronous:!1})}ci$7=function(n,a){return n===e||(Ct$5(),e=n,r=p$1d.fromRotationTranslation(n.halfAxes,n.center,r),i.modelMatrix=r,i.attributes.color=o$16.fromColor(a),t=o(i)),t},fi$6=function(i,a){return i===e||(Ct$5(),e=i,r=p$1d.fromTranslation(i.center,r),r=p$1d.multiplyByUniformScale(r,i.radius,r),n.modelMatrix=r,n.attributes.color=o$16.fromColor(a),t=o(n)),t},Ct$5=function(){e$2e(t)&&(t.destroy(),t=void 0,e=void 0)}}();var Ja$3=new e$2c(0,0,0,0),Pa$2={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applySplit:void 0,applySwipe:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,numberOfGridTextures:void 0,gridUpdate:!1};function en$3(e,t){const i=t.globeTranslucencyState;if(i.translucent){const n=e.renderState.blending.enabled;i.pushDerivedCommands(e,n,t)}else t.commandList.push(e)}var je$c=new e$2c,tn$4=e$1X.TRANSPARENT,rn$3=new o$Y;function sr$6(e,t,i,n,r,o,a){var s=t.data;if(s.terrainState===Ee$j.INVALID||!1===e.terrainProvider.isShowGlobe&&(!e$2e(s.mesh)||s.mesh.invalid)||e$2e(i)&&(!e$2e(i.mesh)||i.mesh.invalid||!e$2e(i.vertexArray))||!e$2e(s.vertexArray)&&(void 0===s.fill&&(s.fill=new Q$L(t)),s.fill.update(e,r),!e$2e(t.data.fill.vertexArray)))return;var l=r.creditDisplay,u=s.terrainData;if(e$2e(i))u=i.terrainData;if(e$2e(u)&&e$2e(u.credits))for(var c=u.credits,h=0,d=c.length;h<d;++h)l.addCredit(c[h]);var f=e$1W.maximumTextureImageUnits-1,p=s.waterMaskTexture,_=s.waterMaskTranslationAndScale;!e$2e(p)&&e$2e(s.fill)&&(p=s.fill.waterMaskTexture,_=s.fill.waterMaskTranslationAndScale);const m=r.cameraUnderground,g=r.globeTranslucencyState,x=g.translucent,y=g.frontFaceAlphaByDistance,v=g.backFaceAlphaByDistance;g.rectangle;const $=u$Z(e.undergroundColor,tn$4),b=u$Z(e.undergroundColorAlphaByDistance,rn$3),T=ui$6(e,r)&&r.mode===C$14.SCENE3D&&$.alpha>0&&(b.nearValue>0||b.farValue>0);var C=e.hasWaterMask&&e$2e(p),S=e.oceanNormalMap,w=C&&e$2e(S),E=e.terrainProvider.ready&&e.terrainProvider.hasVertexNormals,P=e$2e(e._PBRMaterialParams)&&e._PBRMaterialParams.roughness>0,A=r.fog.enabled,L=e.showGroundAtmosphere,M=W$X.castShadows(e.shadows)&&!x,R=W$X.receiveShadows(e.shadows)&&!x,O=e.hueShift,D=e.saturationShift,I=e.brightnessShift,B=!(e$2d.equalsEpsilon(O,0,e$2d.EPSILON7)&&e$2d.equalsEpsilon(D,0,e$2d.EPSILON7)&&e$2d.equalsEpsilon(I,0,e$2d.EPSILON7)),F=!1;if(L){var N,G=r.mode,z=r.camera;N=G===C$14.SCENE2D||G===C$14.COLUMBUS_VIEW?z.positionCartographic.height:o$1p.magnitude(z.positionWC);var U=e.nightFadeOutDistance;G!==C$14.SCENE3D&&(U-=r.mapProjection.ellipsoid.maximumRadius),F=N>U}var V=s.normalTexture,k=e$2e(V),W=e$2e(e._slopeSetting)&&e._slopeSetting.DisplayMode!==_0x25bb47.DisplayMode.NONE&&e._bUseSlopeColorTable,H=e$2e(e._hypsometricSetting)&&e._hypsometricSetting.DisplayMode!==k$S.DisplayMode.NONE&&e._bUseHypColorTable,q=e$2e(r.camera._scene.globe._floodFlagTexture);C&&--f,w&&--f,k&&--f,W&&(f-=3),H&&(f-=2),r.shadowMaps.length>0&&--f,q&&--f;var j=!o&&t._clipRegionRasterized&&t.isModified,X=!o&&t._clipRegionRasterized&&(e._excavateRegions.length>0||e._extractRegions.length>0),Y=!o&&t._clipRegionRasterized&&e._extractRegions.length>0,Z=!o&&t._clipRegionRasterized&&!t.isModified&&e._imageryClipRegions.length>0,K=!o&&W&&!t.isModified&&e$2e(e._slopeRegion),Q=!o&&H&&!t.isModified&&e$2e(e._hypsometricRegion)&&e$2e(t._clipRasterTexture),J=!1,ee=!1;X&&-1===r._fboState.name.indexOf("_excavationGlobeHeight")&&(--f,J=e.clippingType===R$L.KeepOutside,ee=e.clippingType===R$L.KeepInside),j||(j=!e$2e(i)&&e$2e(a)),J||(J=!e$2e(i)&&e$2e(a)),Z&&--f;var te=o?s.modifyTerrainMesh:s.renderedMesh;e$2e(i)&&i.mesh&&(te=i.mesh);var ie=te.center,ne=te.encoding,re=za$3,oe=0,ae=0,se=0,le=0,ue=!1;if(r.mode!==C$14.SCENE3D){var ce=r.mapProjection,he=ce.project(h$18.southwest(t.rectangle),ka$2),de=ce.project(h$18.northeast(t.rectangle),qa$3);if(re.x=he.x,re.y=he.y,re.z=de.x,re.w=de.y,r.mode!==C$14.MORPHING&&((ie=Wa$2).x=0,ie.y=.5*(re.z+re.x),ie.z=.5*(re.w+re.y),re.x-=ie.y,re.y-=ie.z,re.z-=ie.y,re.w-=ie.z),r.mode===C$14.SCENE2D&&ne.quantization===ye$j.BITS12){var fe=1/(Math.pow(2,12)-1)*.5,pe=(re.z-re.x)*fe,_e=(re.w-re.y)*fe;re.x-=pe,re.y-=_e,re.z+=pe,re.w+=_e}ce instanceof t$N&&(oe=t.rectangle.south,ae=t.rectangle.north,se=t$N.geodeticLatitudeToMercatorAngle(oe),le=1/(t$N.geodeticLatitudeToMercatorAngle(ae)-se),ue=!0)}var me=Pa$2;me.frameState=r,me.surfaceTile=s,me.showReflectiveOcean=C,me.showOceanWaves=w,me.enableLighting=e.enableLighting,me.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,me.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,me.showGroundAtmosphere=L,me.perFragmentGroundAtmosphere=F,me.hasVertexNormals=E,me.hasRoughness=P,me.useWebMercatorProjection=ue,me.clippedByBoundaries=s.clippedByBoundaries,me.applyModify=j,me.applyExtract=Y,me.excavationRegion=J,me.excavationOuter=ee;var ge=s.imagery,xe=[];if(t._useParentImage){ge=[];for(var ye=0;ye<s.imagery.length;ye++){var ve=!1,$e=s.imagery[ye].readyImagery;if(e$2e($e)&&$e.imageryLayer.featherEdgesEnabled){var be=t.parent;if(e$2e(be))for(var Te=$e.imageryLayer.imageryProvider.tablename,Ce=0;Ce<be.data.imagery.length;Ce++){var Se=be.data.imagery[Ce],we=Se.readyImagery;if(e$2e(we))if((At=we.imageryLayer).imageryProvider.tablename===Te){xe[ye]=At._calculateTextureTranslationAndScale(t,Se),ge.push(Se),ve=!0;break}}}ve||ge.push(s.imagery[ye])}}var Ee=0,Pe=0,Ae=ge.length,Le=s.gridImagery,Me=Le.length,Re=[],Oe=[],De=[];e$2e(t._rasterTexture)&&(Re.push(t._rasterTexture),Oe.push(new e$2c(0,0,0,0)),De.push(1),Ae+=1),e$2e(t._2DRasterTexture)&&(Re.push(t._2DRasterTexture),Oe.push(new e$2c(0,0,0,.1)),De.push(t._2DRasterTexture.textureAlpha),Ae+=1);const Ie=e.showSkirts&&!m&&!x,Be=e.backFaceCulling&&!m&&!x;var Fe=Re.length,Ne=Be?e._renderState:e._disableCullingRenderState,Ge=Be?e._blendRenderState:e._disableCullingBlendRenderState,ze=Ne,Ue=e._firstPassInitialColor,Ve=r.context;e$2e(e._debug.boundingSphereTile)||Ct$5();var ke=(4&r.useType)>0?1:0;ke&&--f;var We=(2&r.useType)>0?1:0;We&&--f,e$2e(r.mvtLayerCount)&&r.mvtLayerCount>0&&f--;var He=r.multiViewportIndex>-1,qe=e._drawCommands,je=o?e._modifyDrawCommandsByTile:e._drawCommandsByTile,Xe=o?e._modifyUniformMapsByTile:e._uniformMapsByTile,Ye=0;do{var Ze,Ke,Qe=0,Je=`${t.x}:${t.y}:${t.level}:${Ye}`;Ye++,je[Je]?(Ze=je[Je],Ke=Xe[Je]):((Ze=new i$$).owner=t,Ze.cull=!1,Ze.boundingVolume=new i$1d,Ze.orientedBoundingBox=void 0,Ke=Za$3(r,e),Ve.webgpu&&Ze.addUniformBuffer(Ke.properties.tileUBO),je[Je]=Ze,Xe[Je]=Ke),qe.push(Ze),Ze.owner=t,o?++e._modifyUsedDrawCommands:++e._usedDrawCommands,t===e._debug.boundingSphereTile&&(e$2e(s.orientedBoundingBox)?ci$7(s.orientedBoundingBox,e$1X.RED).update(r):e$2e(s.boundingSphere3D)&&fi$6(s.boundingSphere3D,e$1X.RED).update(r));var et=Ke.properties;e$2c.clone(Ue,et.initialColor),e$1X.clone(r.lightSource.sunLightColor,et.sunLightColor),e$1X.clone(r.lightSource.ambientLightColor,et.ambientLightColor),et.oceanNormalMap=S,et.lightingFadeDistance.x=e.lightingFadeOutDistance,et.lightingFadeDistance.y=e.lightingFadeInDistance,et.nightFadeDistance.x=e.nightFadeOutDistance,et.nightFadeDistance.y=e.nightFadeInDistance,et.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity,et.tileBounds.x=t.rectangle.west,et.tileBounds.y=t.rectangle.south,et.tileBounds.z=t.rectangle.east,et.tileBounds.w=t.rectangle.north,e$2e(e._hypsometricSetting)&&(et.hypContourFillMode=e._hypsometricSetting.DisplayMode,et.hypContourInterval=e._hypsometricSetting.LineInterval,et.hypFloor=e._hypsometricSetting.ColorTableMinKey,et.hypCeil=e._hypsometricSetting.ColorTableMaxKey,et.hypOpacity=e._hypsometricSetting.Opacity,et.hypLineColor=e._hypsometricSetting.LineColor,et.hypsometricTexture=e._hypsometricTexture,et.hypsometricRenderTexture=e._hypsometricRenderTexture,et.hypHasAnalysisRegion=e._bUseHypRegion,et.hypRect=e._geoBounds,et.hypMaxVisibleValue=e._hypsometricSetting.MaxVisibleValue,et.hypMinVisibleValue=e._hypsometricSetting.MinVisibleValue,et.hypHasColorTable=e._bUseHypColorTable&&!We),P&&(et.baseColorFactor=e._PBRMaterialParams.baseColorFactor,et.metallic=e._PBRMaterialParams.metallic,et.roughness=e._PBRMaterialParams.roughness,et.emissionFactor=e._PBRMaterialParams.emissionFactor),e$2e(e._slopeSetting)&&(et.slopeFillMode=e._slopeSetting.DisplayMode,et.slopeRect=e._slopeBound,et.slopeFloor=e$2d.toRadians(e._slopeSetting.ColorTableMinKey),et.slopeCeil=e$2d.toRadians(e._slopeSetting.ColorTableMaxKey),et.slopeOpacity=e._slopeSetting.Opacity,et.slopeColorTexture=e._slopeColorTexture,et.slopePolygonTexture=e._slopePolygonTexture,et.slopeArrowsTexture=e._slopeArrowsTexture,et.hasSlopeRegion=e._bUseSlopeRegion,et.slopeMaxVisibleValue=e$2d.toRadians(e._slopeSetting.MaxVisibleValue),et.slopeMinVisibleValue=e$2d.toRadians(e._slopeSetting.MinVisibleValue),et.slopeHasColorTable=e._bUseSlopeColorTable,et.level=t.level,et.topLevel=n),e$2e(r.camera._scene.globe._floodFlagTexture)&&(et.floodRect=r.camera._scene.globe._floodRect,et.floodTexture=r.camera._scene.globe._floodFlagTexture),e$2e(t._clipRasterTexture)?et.modifyRasterTexture=t._clipRasterTexture:!e$2e(i)&&e$2e(a)&&(et.modifyRasterTexture=a),et.clip_mode=e._clipMode,et.clip_planes=e._clipPlane,et.clip_line_color=e._clipLineColor,et.flattenTexture=e._flattenTexture;var tt=!e$2e(s.vertexArray)&&e$2e(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;tt&&e$1X.clone(e.fillHighlightColor,et.fillHighlightColor),et.center3D=te.center,o$1p.clone(ie,et.rtc),e$2c.clone(re,et.tileRectangle),et.southAndNorthLatitude.x=oe,et.southAndNorthLatitude.y=ae,et.southMercatorYAndOneOverHeight.x=se,et.southMercatorYAndOneOverHeight.y=le,et.globeSplitDirection=e.splitDirection,et.globeSwipeRegion=e._swipeRegion,et.polygonOffset=e._polygonOffset.value;const u=m?v:y,c=m?y:v;e$2e(u)&&(e$2c.fromElements(u.near,u.nearValue,u.far,u.farValue,et.frontFaceAlphaByDistance),e$2c.fromElements(c.near,c.nearValue,c.far,c.farValue,et.backFaceAlphaByDistance)),e$2c.fromElements(b.near,b.nearValue,b.far,b.farValue,et.undergroundColorAlphaByDistance),e$1X.clone($,et.undergroundColor);var it=Ga$3,nt=nr$7(t.rectangle,e.cartographicLimitRectangle);o$1p.fromElements(O,D,I,et.hsbShift);var rt=t.rectangle,ot=1/rt.width,at=1/rt.height;it.x=(nt.west-rt.west)*ot,it.y=(nt.south-rt.south)*at,it.z=(nt.east-rt.west)*ot,it.w=(nt.north-rt.south)*at,e$2c.clone(it,et.localizedCartographicLimitRectangle);var st=A;!r.context.webgpu&&e$2d.fog(t._distance,r.fog.density)<e$2d.EPSILON3&&(st=!1),B=B&&(st||L);for(var lt=!1,ut=!1,ct=!1,ht=!1,dt=!1,ft=!1,pt=!1,_t=!1,mt=!1,gt=!1,xt=!o$1o.equals(e.splitDirection,o$1o.ZERO),yt=e._swipeEnabled,vt=[],$t=e._polygonOffset.enabled;Qe<f&&Ee<Ae;)if(Ee!=Ae-Fe||0==Fe){var bt=ge[Ee],Tt=xe[Ee],Ct=bt.readyImagery;if(++Ee,!e$2e(Ct)||bt.discard)continue;var St=r.camera._positionCartographic.height,wt=Ct.imageryLayer.maxHeight,Et=Ct.imageryLayer.minHeight;if(Ct.imageryLayer._inVisibleHeightRange=St>wt||St<Et?0:1,Ct.imageryLayer.alpha*Ct.imageryLayer._inVisibleHeightRange==0||(Ct.setVisible(!0),He&&!Ct.imageryLayer._isBaseLayer&&!Ct.imageryLayer.getVisibleInViewport(r.multiViewportIndex)))continue;if(r.camera._scene._mvtVisibleControl){var Pt=r.camera._scene._mvtVisibleLevel;if(e$2e(Ct.isMvtTexture)&&Ct.isMvtTexture&&!(t._level>r.camera._endLevel-Pt))continue}if(!e$2e(Ht=bt.useWebMercatorT?Ct.textureWebMercator:Ct.texture))throw new t$15("readyImagery is not actually ready!");var At=Ct.imageryLayer;if(e$2e(Ct.isMvtTexture)&&Ct.isMvtTexture){var Lt=Ct.imageryLayer._selectColor;vt.push({textureIndex:Qe,selectColor:Lt})}if(e$2e(bt.textureTranslationAndScale)||(bt.textureTranslationAndScale=At._calculateTextureTranslationAndScale(t,bt)),!e$2e(bt.dayTextureSize)){var Mt=new e$2c(Ht.width,Ht.height,1/Ht.width,1/Ht.height);bt.dayTextureSize=Mt}et.dayTextures[Qe]=Ht,et.dayTextureTranslationAndScale[Qe]=bt.textureTranslationAndScale,et.dayTextureTexCoordsRectangle[Qe]=bt.textureCoordinateRectangle,et.dayTextureSize[Qe]=bt.dayTextureSize,e$2e(Tt)&&(et.dayTextureTranslationAndScale[Qe]=Tt,et.dayTextureTexCoordsRectangle[Qe]=new e$2c(0,0,1,1)),et.dayTextureUseWebMercatorT[Qe]=bt.useWebMercatorT,et.dayTextureFlipY[Qe]=bt.flipY;var Rt=new e$2c;if(Rt.x=At.transparentBackColor.red,Rt.y=At.transparentBackColor.green,Rt.z=At.transparentBackColor.blue,Rt.w=At.transparentBackColorTolerance,et.transparentBackColor[Qe]=Rt,et.imageryClipEnable[Qe]=At.enableImageryClip,et.dayTextureAlpha[Qe]=u$Z(bt.morphingAlpha,At.alpha),ft=ft||1!==et.dayTextureAlpha[Qe],bt.morphingAlpha<1){var Ot=ge[Ee-1];e$2e(Ot)&&!e$2e(Ot.loadingImagery)&&(et.morphingParentIndex=Qe,et.morphingBeginTime=Ot.morphingBeginTime)}et.dayTextureBrightness[Qe]=At.brightness,lt=lt||et.dayTextureBrightness[Qe]!==h$R.DEFAULT_BRIGHTNESS,et.dayTextureContrast[Qe]=At.contrast,ut=ut||et.dayTextureContrast[Qe]!==h$R.DEFAULT_CONTRAST,et.dayTextureHue[Qe]=At.hue,ct=ct||et.dayTextureHue[Qe]!==h$R.DEFAULT_HUE,et.dayTextureSaturation[Qe]=At.saturation,ht=ht||et.dayTextureSaturation[Qe]!==h$R.DEFAULT_SATURATION,et.dayTextureOneOverGamma[Qe]=1/At.gamma,dt=dt||et.dayTextureOneOverGamma[Qe]!==1/h$R.DEFAULT_GAMMA,et.dayTextureSplit[Qe]=At.splitDirection,je$c.x=At._swipeRegion.x*r.context.drawingBufferWidth,je$c.y=(1-At._swipeRegion.y)*r.context.drawingBufferHeight,je$c.z=At._swipeRegion.z*r.context.drawingBufferWidth,je$c.w=(1-At._swipeRegion.w)*r.context.drawingBufferHeight,et.dayTextureSwipeRegion[Qe]=e$2c.clone(je$c,new e$2c),pt=pt||!o$1o.equals(et.dayTextureSplit[Qe],o$1o.ZERO),_t=_t||At.swipeEnabled;var Dt=et.dayTextureCutoutRectangles[Qe];if(e$2e(Dt)||(Dt=et.dayTextureCutoutRectangles[Qe]=new e$2c),e$2c.clone(e$2c.ZERO,Dt),e$2e(At.cutoutRectangle)){var It=nr$7(rt,At.cutoutRectangle);mt=e$2e(h$18.simpleIntersection(It,rt,si$4))||mt,Dt.x=(It.west-rt.west)*ot,Dt.y=(It.south-rt.south)*at,Dt.z=(It.east-rt.west)*ot,Dt.w=(It.north-rt.south)*at}var Bt=et.colorsToAlpha[Qe];e$2e(Bt)||(Bt=et.colorsToAlpha[Qe]=new e$2c);var Ft=e$2e(At.colorToAlpha)&&At.colorToAlphaThreshold>0;if(gt=gt||Ft,Ft){var Nt=At.colorToAlpha;Bt.x=Nt.red,Bt.y=Nt.green,Bt.z=Nt.blue,Bt.w=At.colorToAlphaThreshold}else Bt.w=-1;if(++Qe,e$2e(Ct.credits))for(var Gt=Ct.credits,zt=0,Ut=Gt.length;zt<Ut;++zt)l.addCredit(Gt[zt])}else{if(++Ee,!e$2e(Ht=Re[Pe]))throw new t$15("readyImagery is not actually ready!");et.dayTextures[Qe]=Ht,et.dayTextureTranslationAndScale[Qe]=new e$2c(0,0,1,1),et.dayTextureSize[Qe]=new e$2c(Ht.width,Ht.height,1/Ht.width,1/Ht.height),et.transparentBackColor[Qe]=Oe[Pe],et.dayTextureTexCoordsRectangle[Qe]=new e$2c(0,0,1,1),et.dayTextureUseWebMercatorT[Qe]=!1,et.dayTextureAlpha[Qe]=De[Pe],ft=ft||1!==De[Pe],et.dayTextureBrightness[Qe]=1,lt=!1,et.dayTextureContrast[Qe]=1,ut=!1,et.dayTextureHue[Qe]=0,ct=!1,et.dayTextureSaturation[Qe]=1,ht=!1,et.dayTextureOneOverGamma[Qe]=1,dt=!1,et.dayTextureSplit[Qe]=new o$1o(0,0),et.dayTextureSwipeRegion[Qe]=r.realtimeRasterSwipeParams.swipeRegion,pt=!0,_t=r.realtimeRasterSwipeParams.swipeEnabled,Pe++,++Qe}for(var Vt=0,kt=0,Wt=!1;Vt<f-Qe&&kt<Me;){var Ht,qt=Le[kt],jt=qt.readyGrid;if(++kt,null!=jt&&(!He||jt.gridLayer.getVisibleInViewport(r.multiViewportIndex)))if(null!=(Ht=qt.useWebMercatorT?jt.textureWebMercator:jt.texture)){jt.needUpdate&&(Wt=!0,jt.needUpdate=!1);var Xt=jt.gridLayer;e$2e(qt.textureTranslationAndScale)||(qt.textureTranslationAndScale=Xt._calculateTextureTranslationAndScale(t,qt)),et.gridTextures[Vt]=Ht,et.gridTextureTranslationAndScale[Vt]=qt.textureTranslationAndScale,et.gridTextureTexCoordsRectangle[Vt]=qt.textureCoordinateRectangle,et.gridTextureUseWebMercatorT[Vt]=qt.useWebMercatorT,Vt++}}et.gridTextures.length=Vt,et.dayTextures.length=Qe,et.waterMask=p,e$2c.clone(_,et.waterMaskTranslationAndScale),et.minMaxHeight.x=ne.minimumHeight,et.minMaxHeight.y=ne.maximumHeight,p$1d.clone(ne.matrix,et.scaleAndBias);var Yt=e._clippingPlanes,Zt=e$2e(Yt)&&Yt.enabled&&t.isClipped;Zt&&(et.clippingPlanesEdgeColor=e$1X.clone(Yt.edgeColor,et.clippingPlanesEdgeColor),et.clippingPlanesEdgeWidth=Yt.edgeWidth),e$2e(e.uniformMap)&&(Ke=p$19(Ke,e.uniformMap)),me.numberOfDayTextures=Qe,me.applyBrightness=lt,me.applyContrast=ut,me.applyHue=ct,me.applySaturation=ht,me.applyGamma=dt,me.applyAlpha=ft,me.applySplit=pt,me.applySwipe=_t,me.applyGlobeSwipe=yt,me.applyGlobeSplit=xt,me.enableFog=st,me.enableClippingPlanes=Zt,me.clippingPlanes=Yt,me.hasImageryLayerCutout=mt,me.colorCorrect=B,me.isHeight=ke,me.isColor=We,me.hasNormalMap=k,me.hasHypsometricSetting=H,me.hasSlopeAnalysis=W,me.highlightFillTile=tt,me.colorToAlpha=gt,me.mvtTextureObj=vt,me.numberOfGridTextures=Vt,me.gridUpdate=Wt,me.applyPolygonOffset=$t,me.mixDirection=0,me.mixIndex=0,me.hasFlood=q,me.applyImageryClip=Z,me.hasHypsometricRegion=Q,me.applySlopeRegion=K,me.translucent=x,me.showUndergroundColor=T;var Kt=te.indices.length;Ie||(Kt=te.indexCountWithoutSkirts),Kt=o?s.modifyTerrainVertexArray.indexBuffer.numberOfIndices:Kt,et.normalTexture=V,e$2c.clone(s.normalTextureTranslationAndScale,et.normalTextureTranslationAndScale),Ze.shaderProgram=e._surfaceShaderSet.getShaderProgram(me),Ze.castShadows=M,Ze.receiveShadows=R,Ze.renderState=ze,Ze.primitiveType=W$18.TRIANGLES,e$2e(i)?Ze.vertexArray=o?s.modifyTerrainVertexArray:i.vertexArray:Ze.vertexArray=o?s.modifyTerrainVertexArray:s.subDivisionVertexArray||s.vertexArray||s.fill.vertexArray,Ze.count=Kt,Ze.uniformMap=Ke,Ze.pass=Le$q.GLOBE,e._debug.wireframe&&($a$3(Ve,e,t),e$2e(s.wireframeVertexArray)&&(Ze.vertexArray=s.wireframeVertexArray,Ze.primitiveType=W$18.LINES));var Qt=Ze.boundingVolume,Jt=Ze.orientedBoundingBox;if(r.mode!==C$14.SCENE3D){var ei=s.tileBoundingRegion;i$1d.fromRectangleWithHeights2D(t.rectangle,r.mapProjection,ei.minimumHeight,ei.maximumHeight,Qt),o$1p.fromElements(Qt.center.z,Qt.center.x,Qt.center.y,Qt.center),r.mode===C$14.MORPHING&&(Qt=i$1d.union(te.boundingSphere3D,Qt,Qt))}else Ze.boundingVolume=i$1d.clone(te.boundingSphere3D,Qt),Ze.orientedBoundingBox=y$Y.clone(s.orientedBoundingBox,Jt),e$2e(Ze.boundingVolume)||(Ze.boundingVolume=i$1d.fromOrientedBoundingBox(Ze.orientedBoundingBox));Ze.invalid=u$Z(t.invalid,!1),x&&g.updateDerivedCommands(Ze,r),en$3(Ze,r),ze=Ge,Ue=Ja$3,Ke.properties.tileUBO.updateFromProperties(Ke.properties)}while(Ee<Ae)}var pi$7=new o$1p,bt$7=new a$18;function an$3(e,t){for(var i=p$1d.getTranslation(t,new o$1p),n=e.attributes.position.values,r=n.length,o=0;o<r;o+=3){o$1p.unpack(n,o,pi$7),a$18.fromCartesian(pi$7,void 0,bt$7);var a=e$2d.toDegrees(bt$7.longitude);a-=i.x;var s=e$2d.toDegrees(bt$7.latitude);s-=i.y,n[o]=a,n[o+1]=s,n[o+2]=bt$7.height-1}}function Ie$g(e,t){if(!e$2e(t.command)){var i=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:t.modelMatrix});an$3(t.worldGeometry,t.modelMatrix),i.vertexArray=c$13.fromGeometry({context:e,geometry:t.worldGeometry,attributeLocations:{position:0},bufferUsage:A$18.STATIC_DRAW,interleave:!0});var n=["attribute vec4 position;","varying float vHeight;","void main()","{"," vHeight = position.z;"," gl_Position = czm_modelViewProjection * vec4(position.xy, 0.0, 1.0);","}"].join("\n"),r=["varying float vHeight;","void main()","{"," gl_FragColor = czm_packValue(vHeight);","}"].join("\n"),o=new s$V({sources:[n]}),a=new s$V({sources:[r]});i.shaderProgram=r$14.fromCache({name:"ClipRasterTerrain",context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:{position:0}}),i.useRelativeOrigin=!1,t.command=i}}function He$c(e){var t=e._clipRasterTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1}}function ur$4(e,t){var i=e._clipRasterTilesMap;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];e$2e(h$18.intersection(t,r.rectangle))||(r._clipRasterTexture=r._clipRasterTexture&&!r._clipRasterTexture.isDestroyed()&&r._clipRasterTexture.destroy(),r._clipRasterFbo=r._clipRasterFbo&&!r._clipRasterFbo.isDestroyed()&&r._clipRasterFbo.destroy(),r._clipRegionsCount=0,r._clipRegionRasterized=!1)}}function dr$3(e,t,i){if(i){var n=e.camera._projection.project(a$18.fromDegrees(t.positions[0],t.positions[1]));n=new o$1p(n.z,n.x,n.y),t._excavateMatrix=p$1d.fromTranslation(n)}else t._excavateMatrix=m$19.eastNorthUpToFixedFrame(o$1p.fromDegrees(t.positions[0],t.positions[1]))}function mi$4(e,t){!t._excavationSideTexture&&e$2e(t._excavationSideTextureUrl)&&o$1l(t$10.createIfNeeded(t._excavationSideTextureUrl).fetchImage(),(function(i){t._excavationSideTexture=new t$U({context:e.context,source:i,sampler:new e$1S({wrapS:t._excavateTextureWrap,wrapT:t._excavateTextureWrap})}),t._excavationSideTexture.generateMipmap(I$1e.NICEST)}))}function gi$7(e,t){!t._excavationBottomTexture&&e$2e(t._excavationBottomTextureUrl)&&o$1l(t$10.createIfNeeded(t._excavationBottomTextureUrl).fetchImage(),(function(i){t._excavationBottomTexture=new t$U({context:e.context,source:i})}))}function yi$6(e,t){!t._excavationNormalTexture&&e$2e(t.excavationNormalTextureUrl)&&o$1l(t$10.createIfNeeded(t.excavationNormalTextureUrl).fetchImage(),(function(i){t._excavationNormalTexture=new t$U({context:e.context,source:i})}));!t._excavationSideNormalTexture&&e$2e(t.excavationSideNormalTextureUrl)&&o$1l(t$10.createIfNeeded(t.excavationSideNormalTextureUrl).fetchImage(),(function(i){t._excavationSideNormalTexture=new t$U({context:e.context,source:i,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT})})}))}R$H.prototype._updateExcavateRegions=function(e){if(!(!this._excavateRegionUpdate||e.camera.bReflect||this._tilesToRenderByTextureCount.length<1)){for(var t in this._excavateRegionUpdate=!1,e._framebufferList)t.indexOf("_excavationGlobeHeight")>-1&&!e$2e(this._excavateRegions.get(t.slice(22)))&&(e._framebufferList[t]=!e._framebufferList[t].isDestroyed()&&e._framebufferList[t].destroy(),delete e._framebufferList[t]);if(this._excavateRegions.length<1)return void He$c(this);this._onceExcavateRegionsEmpty&&(He$c(this),this._onceExcavateRegionsEmpty=!1);var i=!1;e.camera._scene.mode===C$14.COLUMBUS_VIEW&&(i=!0);var n=Je$7(this._excavateRegions.values);ur$4(this,n),this._excavateRectangle=n,mi$4(e,this),gi$7(e,this),yi$6(e,this);for(var r=this._excavateRegions.length,o=0;o<r;o++){var a=this._excavateRegions.values[o];dr$3(e,a,i),Ie$g(e.context,a),this._excavateTransparent||(lr$6(e,this,a,i),hr$4(e,this,a,i))}}},R$H.prototype._updateExtractRegions=function(e){if(this._extractRegionsUpdate&&!e.camera.bReflect){for(var t in this._extractRegionsUpdate=!1,e._framebufferList)t.indexOf("_excavationGlobeHeight")>-1&&!e$2e(this._extractRegions.get(t.slice(22)))&&(e._framebufferList[t]=!e._framebufferList[t].isDestroyed()&&e._framebufferList[t].destroy(),delete e._framebufferList[t]);if(this._extractRegions.length<1)He$c(this);else{this._onceExcavateRegionsEmpty&&(He$c(this),this._onceExcavateRegionsEmpty=!1);var i=!1;e.camera._scene.mode===C$14.COLUMBUS_VIEW&&(i=!0);var n=Je$7(this._extractRegions.values);ur$4(this,n),this._excavateRectangle=n,mi$4(e,this),gi$7(e,this),yi$6(e,this);for(var r=this._extractRegions.length,o=0;o<r;o++){dr$3(e,d=this._extractRegions.values[o],i),Ie$g(e.context,d),this._extractTransparent||(lr$6(e,this,d,i),hr$4(e,this,d,i),lr$6(e,this,d,i,!0),hr$4(e,this,d,i,!0))}if(0!==this._quadtree._tilesToRender.length&&!(this._quadtree._tilesToRender[0].level<10)){if(r<1)return void vi$6(this);_i$8(this,n);var a=cr$4(this._quadtree._tilesToRender,n);if(e$2e(a)&&e$2e(a.data)){var s=a.data,l=e.context,u=[],c=Number.MAX_VALUE,h=Number.MIN_VALUE;for(o=0;o<r;o++){var d=this._extractRegions.values[o];u.push(d.geometry_extract),c=Math.min(c,d.minimumHeight),h=Math.max(h,d.maximumHeight)}s.createModifyVertexArray(l,this,a,u,c,h,!1),e$2e(s.modifyTerrainVertexArray)&&_e$n(l,this,a,n,u,c,h,!0)}}}}else this._extractRegions.length>0&&this._updateModifyTiles(e,this._extractRegions.values,!0)},R$H.prototype._updateImageryClipRegions=function(e){if(this._imageryClipRegionUpate&&!e.camera.bReflect){if(this._imageryClipRegionUpate=!1,this._imageryClipRegions.length<1)return void He$c(this);this._onceImageryClipRegionsEmpty&&(He$c(this),this._onceImageryClipRegionsEmpty=!1),ur$4(this,Je$7(this._imageryClipRegions.values));for(var t=this._imageryClipRegions.length,i=0;i<t;i++){var n=this._imageryClipRegions.values[i];dr$3(e,n,false),Ie$g(e.context,n)}}},R$H.prototype._removeAllExcavationCommands=function(){for(var e=Object.keys(this._excavateRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this._removeExcavationCommands(n)}},R$H.prototype._removeAllExtractCommands=function(){for(var e=Object.keys(this._extractRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this._removeExtractCommands(n)}this.modifyParentTiles=void 0},R$H.prototype._removeExcavationCommands=function(e){var t=this._excavateRegions.get(e);t.heightBuffer=t.heightBuffer&&!t.heightBuffer.isDestroyed()&&t.heightBuffer.destroy();var i=this._excavateRegionCommands.get(e+"side"),n=this._excavateRegionCommands.get(e+"bottom");i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),n&&(n.vertexArray=n.vertexArray&&!n.vertexArray.isDestroyed()&&n.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom")},R$H.prototype._removeExtractCommands=function(e){var t=this._extractRegions.get(e);t.heightBuffer=t.heightBuffer&&!t.heightBuffer.isDestroyed()&&t.heightBuffer.destroy(),t.heightBuffer2=t.heightBuffer2&&!t.heightBuffer2.isDestroyed()&&t.heightBuffer2.destroy();var i=this._excavateRegionCommands.get(e+"side"),n=this._excavateRegionCommands.get(e+"side_extract"),r=this._excavateRegionCommands.get(e+"bottom"),o=this._excavateRegionCommands.get(e+"bottom_extract");i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),n&&(n.vertexArray=n.vertexArray&&!n.vertexArray.isDestroyed()&&n.vertexArray.destroy()),r&&(r.vertexArray=r.vertexArray&&!r.vertexArray.isDestroyed()&&r.vertexArray.destroy()),o&&(o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom"),this._excavateRegionCommands.remove(e+"side_extract"),this._excavateRegionCommands.remove(e+"bottom_extract"),this.modifyParentTiles=void 0};var ve$l=new a$V,nn$3=new o$15;function on$3(e,t,i,n){var r=e.camera._projection,o=e.camera;if(!o.bReflect){var a=t,s=a.width,l=a.height,u=6378137*Math.cos(a.south+.5*l)*Math.sin(s)*.5,c=6378137*Math.sin(l)*.5;if(s=u,l=c,n){var h=r.project(new a$18(a.west,a.south)),d=r.project(new a$18(a.east,a.north));s=(d.x-h.x)/2,l=(d.y-h.y)/2}var f=o.frustum.clone(nn$3),p=o._scene.globe.globeAlpha,_=new o$1p,m=new o$1p,g=new o$1p,x=new p$1d;i.isUpdate=!0,e$2e(i._beginFunc)||(i._beginFunc=function(){p=o._scene.globe.globeAlpha,o._scene.globe.globeAlpha=1,o$1p.clone(o.position,_),o$1p.clone(o.direction,m),o$1p.clone(o.up,g),p$1d.clone(o.transform,x),o._setTransform(p$1d.IDENTITY),o.setView({destination:o$1p.fromRadians(a.west+.5*a.width,a.south+.5*a.height,1e4)}),ve$l.width=2*s,ve$l.height=2*l,ve$l.near=1,ve$l.far=1e6,ve$l.aspectRatio=s/l,o.frustum=ve$l,e.context.uniformState.updateFrustum(ve$l)}),e$2e(i._endFunc)||(i._endFunc=function(){o._scene.globe.globeAlpha=p,i.isUpdate=!1,o.frustum=f,o._setTransform(x),o$1p.clone(_,o.position),o$1p.clone(m,o.direction),o$1p.clone(g,o.up),o$1p.cross(m,g,o.right),e.context.uniformState.updateFrustum(o.frustum)})}}function lr$6(e,t,i,n,r){var o=e.camera._projection,a=t._excavateRegionCommands;if((!a.contains(i.name+"side")||r)&&(!a.contains(i.name+"side_extract")||!r)){var s=e.context,l=p$1d.inverse(i._excavateMatrix,new p$1d),u=i.positions,c=i.rectangle,h=c.east-c.west,d=c.north-c.south,f=u.length/3,p=new Float32Array(8*f),_=new Float32Array(6*f),m=new Float32Array(4*f),g=new Uint16Array(6*f),x=new o$1p,y=f$1a.fromRectangle(i.rectangle),v=Math.max(y.width/100,1),$=Math.max(y.height/100,1),b=Math.max(v,$);b=Math.floor(b),b=Math.min(b,10);for(var T=0;T<f;T++){var C,S;n?(C=new o$1p((C=o.project(a$18.fromDegrees(u[3*T+0],u[3*T+1],-1e4))).z,C.x,C.y),S=new o$1p((S=o.project(a$18.fromDegrees(u[3*T+0],u[3*T+1],1e4))).z,S.x,S.y)):(C=o$1p.fromDegrees(u[3*T+0],u[3*T+1],-1e4),S=o$1p.fromDegrees(u[3*T+0],u[3*T+1],1e4)),x.x=C.x,x.y=C.y,x.z=C.z,x.w=1,p$1d.multiplyByVector(l,x,x),C.x=x.x,C.y=x.y,C.z=x.z,x.x=S.x,x.y=S.y,x.z=S.z,x.w=1,p$1d.multiplyByVector(l,x,x),S.x=x.x,S.y=x.y,S.z=x.z,p[8*T]=S.x,p[8*T+1]=S.y,p[8*T+2]=S.z,p[8*T+3]=1e4,p[8*T+4]=C.x,p[8*T+5]=C.y,p[8*T+6]=C.z,p[8*T+7]=-1e4,_[6*T+0]=_[6*T+3]=(e$2d.toRadians(u[3*T+0])-c.west)/h,_[6*T+1]=_[6*T+4]=(e$2d.toRadians(u[3*T+1])-c.south)/d,_[6*T+2]=_[6*T+5]=i.height,m[4*T+0]=b*(T%2),m[4*T+1]=t._excavateTextureWrap===q$1a.CLAMP_TO_EDGE?1:200,m[4*T+2]=b*(T%2),m[4*T+3]=0}for(T=0;T<f-1;T++)g[6*T+0]=0+2*T,g[6*T+1]=2+2*T,g[6*T+2]=3+2*T,g[6*T+3]=0+2*T,g[6*T+4]=3+2*T,g[6*T+5]=1+2*T;g[6*(f-1)+0]=0+2*(f-1),g[6*(f-1)+1]=0,g[6*(f-1)+2]=1,g[6*(f-1)+3]=0+2*(f-1),g[6*(f-1)+4]=1,g[6*(f-1)+5]=1+2*(f-1);var w=t$X.createVertexBuffer({context:s,typedArray:p,usage:A$18.STATIC_DRAW}),E=t$X.createVertexBuffer({context:s,typedArray:_,usage:A$18.STATIC_DRAW}),P=t$X.createVertexBuffer({context:s,typedArray:m,usage:A$18.STATIC_DRAW}),A=[],L={aPosition:0,aTexCoord0:1,aTexCoord1:2};A.push({name:"aPosition",index:L.aPosition,vertexBuffer:w,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),A.push({name:"aTexCoord0",index:L.aTexCoord0,vertexBuffer:E,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),A.push({name:"aTexCoord1",index:L.aTexCoord1,vertexBuffer:P,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var M=t$X.createIndexBuffer({context:s,typedArray:g,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),R=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:i._excavateMatrix,pass:Le$q.TERRAIN_CLASSIFICATION,owner:t,cull:!1});R.vertexArray=new c$13({context:s,attributes:A,indexBuffer:M});var O=new s$V({sources:[Z$K]}),D=new s$V({sources:[$$M]});r&&D.defines.push("IsExtract"),e$2e(t.excavationNormalTextureUrl)&&D.defines.push("NormalTexture"),R.shaderProgram=r$14.fromCache({name:"SideExcavation",context:s,vertexShaderSource:O,fragmentShaderSource:D,attributeLocations:L}),R.renderState=d$1m.fromCache({cull:{enabled:!1,face:de$y.BACK},depthTest:{enabled:!0}}),R.uniformMap={uRasterTexture:function(){return r?i.heightBuffer2._renderTexture._fb.getColorTexture(0):i.heightBuffer._renderTexture._fb.getColorTexture(0)},uColorTexture:function(){return e$2e(t._excavationSideTexture)?t._excavationSideTexture:s.defaultTexture},uNormalTexture:function(){return t._excavationSideNormalTexture||s.defaultTexture},uExtractHeight:function(){return i.height+t._extractExtendHeight}};var I=new t$E(e.context);I.useType=4,I.environmentVisible.isGlobalVisible=!0,on$3(e,i.rectangle,I,n),e$2e(i.removeListenerFunc)||(i.removeListenerFunc=t.tileLoadedEvent.addEventListener((function(e){e$2e(h$18.intersection(e.rectangle,i.rectangle))&&(I.isUpdate=!0)}))),r?(a.set(i.name+"side_extract",R),i.heightBuffer2=I,e._framebufferList["_excavationGlobeHeight2"+i.name]=I):(a.set(i.name+"side",R),i.heightBuffer=I,e._framebufferList["_excavationGlobeHeight"+i.name]=I)}}function hr$4(e,t,i,n,r){var o=e.camera._projection,a=t._excavateRegionCommands;if((!a.contains(i.name+"bottom")||r)&&(!a.contains(i.name+"bottom_extract")||!r)){for(var s=i._excavateMatrix,l=e.context,u=new i$$({primitiveType:W$18.TRIANGLES,pass:Le$q.TERRAIN_CLASSIFICATION,modelMatrix:s}),c=new o$1p,h=[],d=i.worldGeometry,f=p$1d.getTranslation(i.modelMatrix,new o$1p),p=0;p<d.attributes.position.values.length;p+=3)h.push(d.attributes.position.values[p]+f.x),h.push(d.attributes.position.values[p+1]+f.y),h.push(i.height);var _=p$1d.inverse(s,new p$1d),m=[];if(n){p=0;for(var g=h.length;p<g;p+=3){var x=o.project(a$18.fromDegrees(h[p],h[p+1],h[p+2]));m.push(new o$1p(x.z,x.x,x.y))}}else m=o$1p.fromDegreesArrayHeights(h);var y=new Float32Array(4*m.length);for(p=0;p<m.length;p++)c.x=m[p].x,c.y=m[p].y,c.z=m[p].z,c.w=1,p$1d.multiplyByVector(_,c,c),y[4*p]=c.x,y[4*p+1]=c.y,y[4*p+2]=c.z,y[4*p+3]=c.z;var v=i.colorGeometry.attributes.position;v.values=y,v.componentsPerAttribute=4,v.componentDatatype=S$14.FLOAT,u.vertexArray=c$13.fromGeometry({context:l,geometry:i.colorGeometry,attributeLocations:{position:0,st:1},bufferUsage:A$18.STATIC_DRAW,interleave:!0});var $=new s$V({sources:[Ra$3]}),b=new s$V({sources:[Ca$2]});if(e$2e(t.excavationNormalTextureUrl)&&b.defines.push("NormalTexture"),u.shaderProgram=r$14.fromCache({name:"BottomExcavation",context:l,vertexShaderSource:$,fragmentShaderSource:b,attributeLocations:{position:0,st:1}}),u.uniformMap={texture1:function(){return e$2e(t._excavationBottomTexture)?t._excavationBottomTexture:l.defaultTexture},uNormalTexture:function(){return t._excavationNormalTexture||l.defaultTexture}},u.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),r){var T=t._extractExtendHeight,C=o$1p.fromArray([0,0,T]),S=p$1d.fromTranslation(C);p$1d.multiply(u.modelMatrix,S,S),u.modelMatrix=S,a.set(i.name+"bottom_extract",u)}else a.set(i.name+"bottom",u)}}function Je$7(e){for(var t=h$18.clone(e[0].rectangle),i=1,n=e.length;i<n;i++){var r=e[i];t=h$18.union(t,r.rectangle)}return t}function cr$4(e,t){for(var i,n=!1,r=0,o=e.length;r<o;r++){if(i=e[r],e$2e(h$18.simpleIntersection(i.rectangle,t))){n=!0;break}}if(e$2e(i)&&n)for(;e$2e(i);){if(i.rectangle.contains(t))return i;i=i.parent}}function _e$n(e,t,i,n,r,o,a,s){var l=i._southwestChild;e$2e(l)&&e$2e(l.data)&&(e$2e(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2e(l.data.modifyTerrainVertexArray)&&_e$n(e,t,l,n,r,o,a,s))),e$2e(l=i._southeastChild)&&e$2e(l.data)&&(e$2e(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2e(l.data.modifyTerrainVertexArray)&&_e$n(e,t,l,n,r,o,a,s))),e$2e(l=i._northwestChild)&&e$2e(l.data)&&(e$2e(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2e(l.data.modifyTerrainVertexArray)&&_e$n(e,t,l,n,r,o,a,s))),e$2e(l=i._northeastChild)&&e$2e(l.data)&&(e$2e(h$18.intersection(l.rectangle,n))&&((s||!l.isModified)&&l.data.createModifyVertexArray(e,t,l,r,o,a,!0),e$2e(l.data.modifyTerrainVertexArray)&&_e$n(e,t,l,n,r,o,a,s)))}function sn$3(e,t){return t.modifyParentTiles?!(e.level<12):!(!e$2e(e.parent)||!e.parent.isModified)||(e._southwestChild.isModified||e._southeastChild.isModified||e._northwestChild.isModified||e._northeastChild.isModified)}function vi$6(e){var t=e._modifyTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1,n.isModified=!1,n.data.mesh&&(n.data.mesh.isModified=!1),n.data.freeModifyResource()}e._modifyTilesMap={}}function _i$8(e,t){var i=e._modifyTilesMap;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];h$18.intersection(t,r.rectangle)||(r._clipRasterTexture=r._clipRasterTexture&&!r._clipRasterTexture.isDestroyed()&&r._clipRasterTexture.destroy(),r._clipRasterFbo=r._clipRasterFbo&&!r._clipRasterFbo.isDestroyed()&&r._clipRasterFbo.destroy(),r._clipRegionsCount=0,r._clipRegionRasterized=!1,r.isModified=!1,r.data.freeModifyResource(),delete i[n])}}function Me$l(e,t,i){var n=new o$1p,r=new o$1p;o$1p.subtract(t,e,n),o$1p.subtract(i,e,r);var o=new o$1p;o$1p.cross(n,r,o),o$1p.normalize(o,o);var a=-o$1p.dot(o,e);return new e$2c(o.x,o.y,o.z,a)}function xi$6(e,t){var i=t.context;return new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:e,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})],destroyAttachments:!0,depthStencilTexture:new t$U({context:i,width:e,height:e,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})})}function un$3(e,t){if(!(e._rasterLineFBOs.length>0))for(var i=0;i<e._rasterTextureSizes.length;i++)e._rasterLineFBOs.push(xi$6(e._rasterTextureSizes[i],t))}function dn$2(e,t){if(!(e._rasterAAFBOs.length>0))for(var i=0;i<e._rasterTextureSizes.length;i++)e._rasterAAFBOs.push(xi$6(e._rasterTextureSizes[i],t))}function ln$3(e,t){if(!e$2e(e._lineExpandCommand)||e._rasterLineWidth!==t.rasterLineWidth){e._rasterLineWidth=t.rasterLineWidth;var i=t.context,n=Math.ceil(t.rasterLineWidth),r="#define CORESIZE "+n+"\n",o=new s$V({name:"RasterImageExpandFS_width_"+n,sources:[r+=fa$3]}),a=new s$V({name:"ViewportQuadVS",sources:[ot$8]});e._lineExpandCommand=i.createCustomViewportQuadCommand(a,o,{uniformMap:{},owner:e}),e._lineExpandCommand.uniformMap.u_LineTexture=function(){return e._rasterLineFBOs[e._rasterCurrentFBOIdx].getColorTexture(0)},e._lineExpandCommand.uniformMap.u_texelOffset=function(){return 1/e._rasterTextureSizes[e._rasterCurrentFBOIdx]}}}function hn$3(e,t){if(!e$2e(e._lineFXAACommand)){var i=t.context,n="#define FXAA_QUALITY_PRESET 39 \n#define FXAA_QUALITY_PS 12 \n#define FXAA_QUALITY_P0 1.0 \n#define FXAA_QUALITY_P1 1.0 \n#define FXAA_QUALITY_P2 1.0 \n#define FXAA_QUALITY_P3 1.0 \n#define FXAA_QUALITY_P4 1.0 \n#define FXAA_QUALITY_P5 1.5 \n#define FXAA_QUALITY_P6 2.0 \n#define FXAA_QUALITY_P7 2.0 \n#define FXAA_QUALITY_P8 2.0 \n#define FXAA_QUALITY_P9 2.0 \n#define FXAA_QUALITY_P10 2.0 \n#define FXAA_QUALITY_P11 8.0 \n"+k$K+"\n"+pa$2,r=L$U;e._lineFXAACommand=i.createViewportQuadCommand(i.webgpu?r:n,{shaderProgramName:"RasterLineFXAA",uniformMap:{},owner:e}),e._lineFXAACommand.uniformMap.colorTexture=function(){return e._rasterAAFBOs[e._rasterCurrentFBOIdx].getColorTexture(0)}}}function b$V(){}new o$1p,R$H.prototype._updateModifyTiles=function(e,t,i){for(var n=this._quadtree._tilesToRender,r=n.length,o=!1,a=0;a<r;a++)if(sn$3(n[a],this)){o=!0;break}if(o){var s=Je$7(t),l=cr$4(n,s);if(e$2e(l)&&e$2e(l.data)){!e$2e(this.modifyParentTiles)&&i&&(this.modifyParentTiles=l);for(var u=l.data,c=e.context,h=[],d=Number.MAX_VALUE,f=Number.MIN_VALUE,p=(a=0,t.length);a<p;a++){var _=t[a],m=i?_.geometry_extract:_.geometry;h.push(m),d=Math.min(d,_.minimumHeight),f=Math.max(f,_.maximumHeight)}if(l.isModified||u.createModifyVertexArray(c,this,l,h,d,f,!1),e$2e(u.modifyTerrainVertexArray)){if(this.modifyParentTiles&&l.level<this.modifyParentTiles.level)return;_e$n(c,this,l,s,h,d,f,!1)}}}},R$H.prototype._updateModifyRegions=function(e){if(this._modifyRegionUpdate){if(0!==this._quadtree._tilesToRender.length&&!(this._quadtree._tilesToRender[0].level<10)){this._modifyRegionUpdate=!1;var t=this._modifyRegions.values,i=t.length;if(i<1)return void vi$6(this);var n=Je$7(t);_i$8(this,n),this._excavateRectangle=n;for(var r=0;r<i;r++){var o=t[r];Ie$g(e.context,o)}var a=cr$4(this._quadtree._tilesToRender,n);if(e$2e(a)&&e$2e(a.data)){var s=a.data,l=e.context,u=[],c=Number.MAX_VALUE,h=Number.MIN_VALUE;for(r=0;r<i;r++){o=t[r];u.push(o.geometry),c=Math.min(c,o.minimumHeight),h=Math.max(h,o.maximumHeight)}s.createModifyVertexArray(l,this,a,u,c,h,!1),e$2e(s.modifyTerrainVertexArray)&&_e$n(l,this,a,n,u,c,h,!0)}}}else this._modifyRegions.length>0&&this._updateModifyTiles(e,this._modifyRegions.values)},R$H.prototype.clearCustomClipBox=function(){this._clipping=!1,this._clipMode=0},R$H.prototype.setCustomClipBox=function(e){if(!((e=e||{}).dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$15("dimensions position is required to create CustomClipBox");if(this._clipMode=2,e$2e(e.clipMode))switch(e.clipMode){case"clip_behind_any_plane":this._clipMode=1;break;case"clip_behind_all_plane":this._clipMode=2;break;case"only_keep_line":this._clipMode=3}if(e.clipLineColor&&e.clipLineColor instanceof e$1X&&(this._clipLineColor=new e$2c(e.clipLineColor.red,e.clipLineColor.green,e.clipLineColor.blue,e.clipLineColor.alpha)),e.dimensions){var t=new p$1d,i=e.position,n=new i$16(e.heading||0,e.pitch||0,e.roll||0);m$19.headingPitchRollToFixedFrame(i,n,t$12.WGS84,t);var r=.5*e.dimensions.x,o=.5*e.dimensions.y,a=.5*e.dimensions.z,s=[];s[0]=new e$2c,s[0].x=-r,s[0].y=o,s[0].z=a,s[0].w=1,s[1]=new e$2c,s[1].x=r,s[1].y=o,s[1].z=a,s[1].w=1,s[2]=new e$2c,s[2].x=r,s[2].y=-o,s[2].z=a,s[2].w=1,s[3]=new e$2c,s[3].x=-r,s[3].y=-o,s[3].z=a,s[3].w=1,s[4]=new e$2c,s[4].x=-r,s[4].y=o,s[4].z=-a,s[4].w=1,s[5]=new e$2c,s[5].x=r,s[5].y=o,s[5].z=-a,s[5].w=1,s[6]=new e$2c,s[6].x=r,s[6].y=-o,s[6].z=-a,s[6].w=1,s[7]=new e$2c,s[7].x=-r,s[7].y=-o,s[7].z=-a,s[7].w=1;for(var l=0;l<8;l++)p$1d.multiplyByVector(t,s[l],s[l]);this._oriClipPlane[0]=e$2c.clone(Me$l(s[0],s[1],s[2])),this._oriClipPlane[1]=e$2c.clone(Me$l(s[0],s[4],s[1])),this._oriClipPlane[2]=e$2c.clone(Me$l(s[0],s[3],s[4])),this._oriClipPlane[3]=e$2c.clone(Me$l(s[6],s[2],s[5])),this._oriClipPlane[4]=e$2c.clone(Me$l(s[6],s[7],s[2])),this._oriClipPlane[5]=e$2c.clone(Me$l(s[6],s[5],s[7]))}else for(l=0;l<e.planePos.length;l++){var u=e.planePos[l],c=e.planeNormal[l];this._oriClipPlane[l].x=c.x,this._oriClipPlane[l].y=c.y,this._oriClipPlane[l].z=c.z,this._oriClipPlane[l].w=-o$1p.dot(u,c)}this._clipping=!0},R$H.prototype.removeAllModifyRegion=function(){for(var e=this._modifyRegions.values,t=0;t<e.length;t++){var i=e[t];e$2e(i.command)&&(i.command.vertexArray=i.command.vertexArray&&!i.command.vertexArray.isDestroyed()&&i.command.vertexArray.destroy(),i.command.shaderProgram=i.command.shaderProgram&&!i.command.shaderProgram.isDestroyed()&&i.command.shaderProgram.destroy()),i.command=void 0}this._modifyRegions.removeAll(),this._modifyTilesMap={},this._modifyRegionUpdate=!1},R$H.prototype.removeAllExcavationRegion=function(){},R$H.prototype.removeAllExtractRegion=function(){},R$H.prototype.isDestroyed=function(){return!1},R$H.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this.removeAllExcavationRegion(),this.removeAllModifyRegion(),this.removeAllExtractRegion(),this._hypsometricTexture=this._hypsometricTexture&&this._hypsometricTexture.destroy(),this._slopeArrowsTexture=this._slopeArrowsTexture&&this._slopeArrowsTexture.destroy(),this._slopeColorTexture=this._slopeColorTexture&&this._slopeColorTexture.destroy();for(var e=0;e<this._rasterTextureSizes.length;e++)e$2e(this._rasterLineFBOs[e])&&this._rasterLineFBOs[e].destroy(),this._rasterAAFBOs.length>0&&this._rasterAAFBOs[e].destroy();return i$11(this)};var _$H=new a$V,ne$v=new o$15,se$p=new o$1p;function ue$r(e,t,i){if(!(u=e.camera).bReflect){var n=t,r=n.width,o=n.height,a=6378137*Math.cos(n.south+.5*o)*Math.sin(r)*.5,s=6378137*Math.sin(o)*.5;r=a,o=s;var l=u.frustum.clone(ne$v),u=e.camera;i.isUpdate=!0,e$2e(i._beginFunc)||(i._beginFunc=function(){i.oldCameraParameter={destination:o$1p.clone(u.position,se$p),orientation:{heading:u.heading,pitch:u.pitch,roll:u.roll}},u.setView({destination:o$1p.fromRadians(n.west+.5*n.width,n.south+.5*n.height,1e3)}),_$H.width=2*r,_$H.height=2*o,_$H.near=1,_$H.far=1e4,_$H.aspectRatio=r/o,u.frustum=_$H,e.context.uniformState.updateFrustum(_$H)}),e$2e(i._endFunc)||(i._endFunc=function(){i.isUpdate=!1,u.frustum=l,u.setView(i.oldCameraParameter),e.context.uniformState.updateFrustum(u.frustum)})}}function n$H(){this.times=void 0,this.points=void 0,t$15.throwInstantiationError()}function r$Q(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).points,i=e.times;if(!e$2e(t)||!e$2e(i))throw new t$15("points and times are required.");if(t.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$15("times.length must be equal to points.length.");this._times=i,this._points=t,this._lastTimeIndex=0}function c$N(e){var t=e.points,i=e.times;return function(n,r){e$2e(r)||(r=new n$15);var o=e._lastTimeIndex=e.findTimeInterval(n,e._lastTimeIndex),a=(n-i[o])/(i[o+1]-i[o]),s=t[o],l=t[o+1];return n$15.fastSlerp(s,l,a,r)}}function r$P(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).points,i=e.times;if(!e$2e(t)||!e$2e(i))throw new t$15("points and times are required.");if(t.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$15("times.length must be equal to points.length.");this._times=i,this._points=t,this._evaluateFunction=c$N(this),this._lastTimeIndex=0}function n$G(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).points,i=e.times;if(!e$2e(t)||!e$2e(i))throw new t$15("points and times are required.");if(2!==i.length)throw new t$15("times.length must be equal to 2.");if(2!==t.length)throw new t$15("points.length must be equal to 2.");this._mode=u$Z(e.mode,0),this._acceleration=2*o$1p.distance(t[1],t[0])/((i[1]-i[0])*(i[1]-i[0])),this._points=t,this._times=i,this._direction=o$1p.subtract(t[1],t[0],new o$1p),this._duration=this._times[1]-this._times[0],o$1p.normalize(this._direction,this._direction)}b$V._createExcavationSideCommand=function(e,t,i){var n=t._excavateRegionCommands;if(!n.contains(i.name+"side")){for(var r=e.context,o=p$1d.inverse(i._excavateMatrix,new p$1d),a=i.positions,s=i.rectangle,l=s.east-s.west,u=s.north-s.south,c=a.length/3,h=new Float32Array(8*c),d=new Float32Array(6*c),f=new Float32Array(4*c),p=new Uint16Array(6*c),_=new o$1p,m=0;m<c;m++){var g=o$1p.fromDegrees(a[3*m+0],a[3*m+1],-1e3),x=o$1p.fromDegrees(a[3*m+0],a[3*m+1],1e3);_.x=g.x,_.y=g.y,_.z=g.z,_.w=1,p$1d.multiplyByVector(o,_,_),g.x=_.x,g.y=_.y,g.z=_.z,_.x=x.x,_.y=x.y,_.z=x.z,_.w=1,p$1d.multiplyByVector(o,_,_),x.x=_.x,x.y=_.y,x.z=_.z,h[8*m]=x.x,h[8*m+1]=x.y,h[8*m+2]=x.z,h[8*m+3]=1e3,h[8*m+4]=g.x,h[8*m+5]=g.y,h[8*m+6]=g.z,h[8*m+7]=-1e3,d[6*m+0]=d[6*m+3]=(e$2d.toRadians(a[3*m+0])-s.west)/l,d[6*m+1]=d[6*m+4]=(e$2d.toRadians(a[3*m+1])-s.south)/u,d[6*m+2]=d[6*m+5]=i.height,f[4*m+0]=m/(c-1),f[4*m+1]=1,f[4*m+2]=m/(c-1),f[4*m+3]=0}for(m=0;m<c-1;m++)p[6*m+0]=0+2*m,p[6*m+1]=2+2*m,p[6*m+2]=3+2*m,p[6*m+3]=0+2*m,p[6*m+4]=3+2*m,p[6*m+5]=1+2*m;p[6*(c-1)+0]=0+2*(c-1),p[6*(c-1)+1]=0,p[6*(c-1)+2]=1,p[6*(c-1)+3]=0+2*(c-1),p[6*(c-1)+4]=1,p[6*(c-1)+5]=1+2*(c-1);var y=t$X.createVertexBuffer({context:r,typedArray:h,usage:A$18.STATIC_DRAW}),v=t$X.createVertexBuffer({context:r,typedArray:d,usage:A$18.STATIC_DRAW}),$=t$X.createVertexBuffer({context:r,typedArray:f,usage:A$18.STATIC_DRAW}),b=[],T={aPosition:0,aTexCoord0:1,aTexCoord1:2};b.push({name:"aPosition",index:T.aPosition,vertexBuffer:y,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:16,normalize:!1}),b.push({name:"aTexCoord0",index:T.aTexCoord0,vertexBuffer:v,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),b.push({name:"aTexCoord1",index:T.aTexCoord1,vertexBuffer:$,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var C=t$X.createIndexBuffer({context:r,typedArray:p,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),S=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:i._excavateMatrix,pass:Le$q.OPAQUE,owner:t,cull:!1});S.vertexArray=new c$13({context:r,attributes:b,indexBuffer:C});var w=new s$V({name:"ExcavationRegionSideVp",sources:[Z$K]}),E=new s$V({name:"ExcavationRegionSideFp",sources:[$$M]});S.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:w,fragmentShaderSource:E,attributeLocations:T}),S.renderState=d$1m.fromCache({cull:{enabled:!1,face:de$y.BACK},depthTest:{enabled:!0}}),S.uniformMap={uRasterTexture:function(){return window.texture11=i.heightBuffer._renderTexture._fb.getColorTexture(0),window.texture11},uColorTexture:function(){return e$2e(t._excavationSideTexture)?t._excavationSideTexture:r.defaultTexture}},n.set(i.name+"side",S);var P=new t$E(e.context);i.heightBuffer=P,P.useType=4,P.environmentVisible.isOnlyS3MObjectVisible=!0;var A=t instanceof R$H?"Globe":"Layer";e._framebufferList["_excavationHeight"+A+i.name]=P,ue$r(e,i.rectangle,P)}},b$V._createExcavationBottomCommand=function(e,t,i){var n=t._excavateRegionCommands;if(!n.contains(i.name+"bottom")){var r=e.context,o=new i$$({primitiveType:W$18.TRIANGLES,pass:Le$q.OPAQUE,modelMatrix:i._excavateMatrix});n.set(i.name+"bottom",o);for(var a=new o$1p,s=[],l=i._geometry,u=0;u<l.attributes.position.values.length;u+=3)a.x=l.attributes.position.values[u],a.y=l.attributes.position.values[u+1],a.z=l.attributes.position.values[u+2],p$1d.multiplyByPoint(t._matModel,a,a),a=a$18.fromCartesian(a),s.push(e$2d.toDegrees(a.longitude)),s.push(e$2d.toDegrees(a.latitude)),s.push(i.height);var c=p$1d.inverse(i._excavateMatrix,new p$1d),h=o$1p.fromDegreesArrayHeights(s),d=new Float32Array(4*h.length);for(u=0;u<h.length;u++)a.x=h[u].x,a.y=h[u].y,a.z=h[u].z,a.w=1,p$1d.multiplyByVector(c,a,a),d[4*u]=a.x,d[4*u+1]=a.y,d[4*u+2]=a.z,d[4*u+3]=a.z;var f=i.colorGeometry.attributes.position;f.values=d,f.componentsPerAttribute=4,f.componentDatatype=S$14.FLOAT,o.vertexArray=c$13.fromGeometry({context:r,geometry:i.colorGeometry,attributeLocations:{position:0,st:1,normal:2},bufferUsage:A$18.STATIC_DRAW,interleave:!0});var p=["attribute vec3 position;","attribute vec2 texCoord;","varying vec2 v_texCoord;","void main()","{"," v_texCoord = texCoord;"," gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);","}"].join("\n"),_=["varying vec2 v_texCoord;","uniform sampler2D texture1;","void main()","{"," gl_FragColor = texture2D(texture1, v_texCoord);","}"].join("\n"),m=new s$V({sources:[p]}),g=new s$V({sources:[_]});o.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:m,fragmentShaderSource:g,attributeLocations:{position:0,texCoord:1}}),o.uniformMap={texture1:function(){return e$2e(t._excavationBottomTexture)?t._excavationBottomTexture:r.defaultTexture}},o.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND})}},b$V.createExcavationSideTexture=function(e,t){t._excavationSideTexture||o$1l(t$10.createIfNeeded(n$17("Assets/Textures/excavationregion_side.jpg")).fetchImage(),(function(i){t._excavationSideTexture=new t$U({context:e.context,source:i})}))},b$V.createExcavationBottomTexture=function(e,t){t._excavationBottomTexture||o$1l(t$10.createIfNeeded(n$17("Assets/Textures/excavationregion_top.jpg")).fetchImage(),(function(i){t._excavationBottomTexture=new t$U({context:e.context,source:i})}))},n$H.prototype.evaluate=t$15.throwInstantiationError,n$H.prototype.findTimeInterval=function(e,t){var i,n=this.times,r=n.length;if(!e$2e(e))throw new t$15("time is required.");if(e<n[0]||e>n[r-1])throw new t$15("time is out of range.");if(e>=n[t=u$Z(t,0)]){if(t+1<r&&e<n[t+1])return t;if(t+2<r&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;if(e>n[t])for(i=t;i<r-1&&!(e>=n[i]&&e<n[i+1]);++i);else for(i=t-1;i>=0&&!(e>=n[i]&&e<n[i+1]);--i);return i===r-1&&(i=r-2),i},n$H.prototype.wrapTime=function(e){o$1q.typeOf.number("time",e);var t=this.times,i=t[t.length-1],n=t[0],r=i-n;return e<n&&(e+=(Math.floor((n-e)/r)+1)*r),e>i&&(e-=(Math.floor((e-i)/r)+1)*r),e},n$H.prototype.clampTime=function(e){o$1q.typeOf.number("time",e);var t=this.times;return e$2d.clamp(e,t[0],t[t.length-1])},Object.defineProperties(r$Q.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),r$Q.prototype.findTimeInterval=n$H.prototype.findTimeInterval,r$Q.prototype.wrapTime=n$H.prototype.wrapTime,r$Q.prototype.clampTime=n$H.prototype.clampTime,r$Q.prototype.evaluate=function(e,t){var i=this.points,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);return e$2e(t)||(t=new o$1p),o$1p.lerp(i[r],i[r+1],o,t)},Object.defineProperties(r$P.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),r$P.prototype.findTimeInterval=n$H.prototype.findTimeInterval,r$P.prototype.wrapTime=n$H.prototype.wrapTime,r$P.prototype.clampTime=n$H.prototype.clampTime,r$P.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},Object.defineProperties(n$G.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),n$G.prototype.clampTime=function(e){return e},n$G.prototype.evaluate=function(e,t){e$2e(t)||(t=new o$1p);var i,n=this._points;(e-=this._times[0],0===this._mode)?i=.5*this._acceleration*e*e:i=this._acceleration*this._duration*e-.5*this._acceleration*e*e;return o$1p.multiplyByScalar(this._direction,i,t),o$1p.add(n[0],t,t),t};var _0xb72f03=(_0xf9e1af=!0,function(e,t){var i=_0xf9e1af?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf9e1af=!1,i}),_0x5d5833=_0xb72f03(void 0,(function(){return _0x5d5833.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d5833).search("(((.+)+)+)+$")})),_0xf9e1af;_0x5d5833();var _0x49ad20={Linear:0,Acceleration:1,Deceleration:2,CubicSpline:3,SmoothStep:4},_0x301856=Object.freeze(_0x49ad20),m$O={solve:function(e,t,i,n){if(!(e$2e(e)&&e instanceof Array))throw new t$15("The array lower is required.");if(!(e$2e(t)&&t instanceof Array))throw new t$15("The array diagonal is required.");if(!(e$2e(i)&&i instanceof Array))throw new t$15("The array upper is required.");if(!(e$2e(n)&&n instanceof Array))throw new t$15("The array right is required.");if(t.length!==n.length)throw new t$15("diagonal and right must have the same lengths.");if(e.length!==i.length)throw new t$15("lower and upper must have the same lengths.");if(e.length!==t.length-1)throw new t$15("lower and upper must be one less than the length of diagonal.");var r,o,a=new Array(i.length),s=new Array(n.length),l=new Array(n.length);for(r=0;r<s.length;r++)s[r]=new o$1p,l[r]=new o$1p;for(a[0]=i[0]/t[0],s[0]=o$1p.multiplyByScalar(n[0],1/t[0],s[0]),r=1;r<a.length;++r)o=1/(t[r]-a[r-1]*e[r-1]),a[r]=i[r]*o,s[r]=o$1p.subtract(n[r],o$1p.multiplyByScalar(s[r-1],e[r-1],s[r]),s[r]),s[r]=o$1p.multiplyByScalar(s[r],o,s[r]);for(o=1/(t[r]-a[r-1]*e[r-1]),s[r]=o$1p.subtract(n[r],o$1p.multiplyByScalar(s[r-1],e[r-1],s[r]),s[r]),s[r]=o$1p.multiplyByScalar(s[r],o,s[r]),l[l.length-1]=s[s.length-1],r=l.length-2;r>=0;--r)l[r]=o$1p.subtract(s[r],o$1p.multiplyByScalar(l[r+1],a[r],l[r]),l[r]);return l}},y$I=[],b$U=[],_$G=[],B$H=[];function C$N(e,t,i){var n,r=y$I,o=_$G,a=b$U,s=B$H;r.length=o.length=e.length-1,a.length=s.length=e.length,r[0]=a[0]=1,o[0]=0;var l=s[0];for(e$2e(l)||(l=s[0]=new o$1p),o$1p.clone(t,l),n=1;n<r.length-1;++n)r[n]=o[n]=1,a[n]=4,e$2e(l=s[n])||(l=s[n]=new o$1p),o$1p.subtract(e[n+1],e[n-1],l),o$1p.multiplyByScalar(l,3,l);return r[n]=0,o[n]=1,a[n]=4,e$2e(l=s[n])||(l=s[n]=new o$1p),o$1p.subtract(e[n+1],e[n-1],l),o$1p.multiplyByScalar(l,3,l),a[n+1]=1,e$2e(l=s[n+1])||(l=s[n+1]=new o$1p),o$1p.clone(i,l),m$O.solve(r,a,o,s)}function q$Q(e){var t,i=y$I,n=_$G,r=b$U,o=B$H;i.length=n.length=e.length-1,r.length=o.length=e.length,i[0]=n[0]=1,r[0]=2;var a=o[0];for(e$2e(a)||(a=o[0]=new o$1p),o$1p.subtract(e[1],e[0],a),o$1p.multiplyByScalar(a,3,a),t=1;t<i.length;++t)i[t]=n[t]=1,r[t]=4,e$2e(a=o[t])||(a=o[t]=new o$1p),o$1p.subtract(e[t+1],e[t-1],a),o$1p.multiplyByScalar(a,3,a);return r[t]=2,e$2e(a=o[t])||(a=o[t]=new o$1p),o$1p.subtract(e[t],e[t-1],a),o$1p.multiplyByScalar(a,3,a),m$O.solve(i,r,n,o)}function m$N(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).points,i=e.times,n=e.inTangents,r=e.outTangents;if(!(e$2e(t)&&e$2e(i)&&e$2e(n)&&e$2e(r)))throw new t$15("times, points, inTangents, and outTangents are required.");if(t.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$15("times.length must be equal to points.length.");if(n.length!==r.length||n.length!==t.length-1)throw new t$15("inTangents and outTangents must have a length equal to points.length - 1.");this._times=i,this._points=t,this._inTangents=n,this._outTangents=r,this._lastTimeIndex=0}Object.defineProperties(m$N.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}}),m$N.createC1=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).times,i=e.points,n=e.tangents;if(!e$2e(i)||!e$2e(t)||!e$2e(n))throw new t$15("points, times and tangents are required.");if(i.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(t.length!==i.length||t.length!==n.length)throw new t$15("times, points and tangents must have the same length.");var r=n.slice(0,n.length-1);return new m$N({times:t,points:i,inTangents:n.slice(1,n.length),outTangents:r})},m$N.createNaturalCubic=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).times,i=e.points;if(!e$2e(i)||!e$2e(t))throw new t$15("points and times are required.");if(i.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(t.length!==i.length)throw new t$15("times.length must be equal to points.length.");if(i.length<3)return new r$Q({points:i,times:t});var n=q$Q(i),r=n.slice(0,n.length-1);return new m$N({times:t,points:i,inTangents:n.slice(1,n.length),outTangents:r})},m$N.createClampedCubic=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).times,i=e.points,n=e.firstTangent,r=e.lastTangent;if(!(e$2e(i)&&e$2e(t)&&e$2e(n)&&e$2e(r)))throw new t$15("points, times, firstTangent and lastTangent are required.");if(i.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(t.length!==i.length)throw new t$15("times.length must be equal to points.length.");if(i.length<3)return new r$Q({points:i,times:t});var o=C$N(i,n,r),a=o.slice(0,o.length-1);return new m$N({times:t,points:i,inTangents:o.slice(1,o.length),outTangents:a})},m$N.hermiteCoefficientMatrix=new p$1d(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0),m$N.prototype.findTimeInterval=n$H.prototype.findTimeInterval;var x$Q=new e$2c,c$M=new o$1p;m$N.prototype.wrapTime=n$H.prototype.wrapTime,m$N.prototype.clampTime=n$H.prototype.clampTime,m$N.prototype.evaluate=function(e,t){e$2e(t)||(t=new o$1p);var i=this.points,n=this.times,r=this.inTangents,o=this.outTangents,a=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),s=(e-n[a])/(n[a+1]-n[a]),l=x$Q;l.z=s,l.y=s*s,l.x=l.y*s,l.w=1;var u=p$1d.multiplyByVector(m$N.hermiteCoefficientMatrix,l,l);return t=o$1p.multiplyByScalar(i[a],u.x,t),o$1p.multiplyByScalar(i[a+1],u.y,c$M),o$1p.add(t,c$M,t),o$1p.multiplyByScalar(o[a],u.z,c$M),o$1p.add(t,c$M,t),o$1p.multiplyByScalar(r[a],u.w,c$M),o$1p.add(t,c$M,t)};var M$M=new e$2c,C$M=new o$1p,s$F=new o$1p;function V$F(e){var t=e.points,i=e.times;if(t.length<3){var n=i[0],r=1/(i[1]-n),o=t[0],a=t[1];return function(e,t){e$2e(t)||(t=new o$1p);var i=(e-n)*r;return o$1p.lerp(o,a,i,t)}}return function(n,r){e$2e(r)||(r=new o$1p);var o,a,s,l,u,c=e._lastTimeIndex=e.findTimeInterval(n,e._lastTimeIndex),h=(n-i[c])/(i[c+1]-i[c]),d=M$M;return d.z=h,d.y=h*h,d.x=d.y*h,d.w=1,0===c?(o=t[0],a=t[1],s=e.firstTangent,l=o$1p.subtract(t[2],o,C$M),o$1p.multiplyByScalar(l,.5,l),u=p$1d.multiplyByVector(m$N.hermiteCoefficientMatrix,d,d)):c===t.length-2?(o=t[c],a=t[c+1],l=e.lastTangent,s=o$1p.subtract(a,t[c-1],C$M),o$1p.multiplyByScalar(s,.5,s),u=p$1d.multiplyByVector(m$N.hermiteCoefficientMatrix,d,d)):(o=t[c-1],a=t[c],s=t[c+1],l=t[c+2],u=p$1d.multiplyByVector(c$L.catmullRomCoefficientMatrix,d,d)),r=o$1p.multiplyByScalar(o,u.x,r),o$1p.multiplyByScalar(a,u.y,s$F),o$1p.add(r,s$F,r),o$1p.multiplyByScalar(s,u.z,s$F),o$1p.add(r,s$F,r),o$1p.multiplyByScalar(l,u.w,s$F),o$1p.add(r,s$F,r)}}var O$A=new o$1p,E$N=new o$1p;function c$L(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).points,i=e.times,n=e.firstTangent,r=e.lastTangent;if(o$1q.defined("points",t),o$1q.defined("times",i),o$1q.typeOf.number.greaterThanOrEquals("points.length",t.length,2),o$1q.typeOf.number.equals("times.length","points.length",i.length,t.length),t.length>2&&(e$2e(n)||(n=O$A,o$1p.multiplyByScalar(t[1],2,n),o$1p.subtract(n,t[2],n),o$1p.subtract(n,t[0],n),o$1p.multiplyByScalar(n,.5,n)),!e$2e(r))){var o=t.length-1;r=E$N,o$1p.multiplyByScalar(t[o-1],2,r),o$1p.subtract(t[o],r,r),o$1p.add(r,t[o-2],r),o$1p.multiplyByScalar(r,.5,r)}this._times=i,this._points=t,this._firstTangent=o$1p.clone(n),this._lastTangent=o$1p.clone(r),this._evaluateFunction=V$F(this),this._lastTimeIndex=0}function r$O(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).points,i=e.times;if(!e$2e(t)||!e$2e(i))throw new t$15("points and times are required.");if(t.length<2)throw new t$15("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new t$15("times.length must be equal to points.length.");this._times=i,this._points=t,this._lastTimeIndex=0}Object.defineProperties(c$L.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}}),c$L.catmullRomCoefficientMatrix=new p$1d(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0),c$L.prototype.findTimeInterval=n$H.prototype.findTimeInterval,c$L.prototype.wrapTime=n$H.prototype.wrapTime,c$L.prototype.clampTime=n$H.prototype.clampTime,c$L.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},Object.defineProperties(r$O.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),r$O.prototype.findTimeInterval=n$H.prototype.findTimeInterval,r$O.prototype.wrapTime=n$H.prototype.wrapTime,r$O.prototype.clampTime=n$H.prototype.clampTime,r$O.prototype.evaluate=function(e,t){var i=this.points,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);return o*=(3-2*o)*o,e$2e(t)||(t=new o$1p),o$1p.lerp(i[r],i[r+1],o,t)};var _0x4b74a8=(_0x2ba416=!0,function(e,t){var i=_0x2ba416?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ba416=!1,i}),_0x53069b=_0x4b74a8(void 0,(function(){return _0x53069b.toString().search("(((.+)+)+)+$").toString().constructor(_0x53069b).search("(((.+)+)+)+$")})),_0x2ba416;_0x53069b();var _0x27f870={None:0,First:1,Second:2},_0x3a711b=Object.freeze(_0x27f870),j$L=[],D$H=[];function Q$K(e,t,i,n,r){var o=f$16.fromPoints(t,e).projectPointsOntoPlane(t,j$L);A$1f.computeWindingOrder2D(o)===W$13.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var a,s,l=t.length,u=0;if(n)for(a=new Float64Array(2*l*3),s=0;s<l;s++){var c=t[s],h=t[(s+1)%l];a[u++]=c.x,a[u++]=c.y,a[u++]=c.z,a[u++]=h.x,a[u++]=h.y,a[u++]=h.z}else{var d=0;if(r===m$1h.GEODESIC)for(s=0;s<l;s++)d+=y$Z.subdivideLineCount(t[s],t[(s+1)%l],i);else if(r===m$1h.RHUMB)for(s=0;s<l;s++)d+=y$Z.subdivideRhumbLineCount(e,t[s],t[(s+1)%l],i);for(a=new Float64Array(3*d),s=0;s<l;s++){var f;r===m$1h.GEODESIC?f=y$Z.subdivideLine(t[s],t[(s+1)%l],i,D$H):r===m$1h.RHUMB&&(f=y$Z.subdivideRhumbLine(e,t[s],t[(s+1)%l],i,D$H));for(var p=f.length,_=0;_<p;++_)a[u++]=f[_]}}var m=2*(l=a.length/3),g=ce$z.createTypedArray(l,m);for(u=0,s=0;s<l-1;s++)g[u++]=s,g[u++]=s+1;return g[u++]=l-1,g[u++]=0,new d$1o({geometry:new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:a})}),indices:g,primitiveType:W$18.LINES})})}function V$E(e,t,i,n,r){var o=f$16.fromPoints(t,e).projectPointsOntoPlane(t,j$L);A$1f.computeWindingOrder2D(o)===W$13.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var a,s,l=t.length,u=new Array(l),c=0;if(n)for(a=new Float64Array(2*l*3*2),s=0;s<l;++s){u[s]=c/3;var h=t[s],d=t[(s+1)%l];a[c++]=h.x,a[c++]=h.y,a[c++]=h.z,a[c++]=d.x,a[c++]=d.y,a[c++]=d.z}else{var f=0;if(r===m$1h.GEODESIC)for(s=0;s<l;s++)f+=y$Z.subdivideLineCount(t[s],t[(s+1)%l],i);else if(r===m$1h.RHUMB)for(s=0;s<l;s++)f+=y$Z.subdivideRhumbLineCount(e,t[s],t[(s+1)%l],i);for(a=new Float64Array(3*f*2),s=0;s<l;++s){var p;u[s]=c/3,r===m$1h.GEODESIC?p=y$Z.subdivideLine(t[s],t[(s+1)%l],i,D$H):r===m$1h.RHUMB&&(p=y$Z.subdivideRhumbLine(e,t[s],t[(s+1)%l],i,D$H));for(var _=p.length,m=0;m<_;++m)a[c++]=p[m]}}l=a.length/6;var g=u.length,x=2*(2*l+g),y=ce$z.createTypedArray(l,x);for(c=0,s=0;s<l;++s)y[c++]=s,y[c++]=(s+1)%l,y[c++]=s+l,y[c++]=(s+1)%l+l;for(s=0;s<g;s++){var v=u[s];y[c++]=v,y[c++]=v+l}return new d$1o({geometry:new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:a})}),indices:y,primitiveType:W$18.LINES})})}function A$U(e){if(o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&e$2e(e.height))throw new t$15("Cannot use both options.perPositionHeight and options.height");if(e$2e(e.arcType)&&e.arcType!==m$1h.GEODESIC&&e.arcType!==m$1h.RHUMB)throw new t$15("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var t=e.polygonHierarchy,i=u$Z(e.ellipsoid,t$12.WGS84),n=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),r=u$Z(e.perPositionHeight,!1),o=r&&e$2e(e.extrudedHeight),a=u$Z(e.arcType,m$1h.GEODESIC),s=u$Z(e.height,0),l=u$Z(e.extrudedHeight,s);if(!o){var u=Math.max(s,l);l=Math.min(s,l),s=u}this._ellipsoid=t$12.clone(i),this._granularity=n,this._height=s,this._extrudedHeight=l,this._arcType=a,this._polygonHierarchy=t,this._perPositionHeight=r,this._perPositionHeightExtrude=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=y$Z.computeHierarchyPackedLength(t)+t$12.packedLength+8}A$U.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),i=y$Z.packPolygonHierarchy(e._polygonHierarchy,t,i),t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._arcType,t[i++]=u$Z(e._offsetAttribute,-1),t[i]=e.packedLength,t};var X$J=t$12.clone(t$12.UNIT_SPHERE),Z$H={polygonHierarchy:{}};function n$F(e){e=e||[],this._extrudedHeight=void 0,this._closeTop=!0,this._closeBottom=!0,this.init(e)}function c$K(e){for(var t=Number.MAX_VALUE,i=-Number.MAX_VALUE,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=0;o<e.length;o++){var a=e[o];t=Math.min(a.x,t),i=Math.max(a.x,i),n=Math.min(a.y,n),r=Math.max(a.y,r)}return{minLon:t,maxLon:i,minLat:n,maxLat:r}}A$U.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=y$Z.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=t$12.unpack(e,t,X$J);t+=t$12.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=1===e[t++],u=1===e[t++],c=e[t++],h=e[t++],d=e[t];return e$2e(i)||(i=new A$U(Z$H)),i._polygonHierarchy=n,i._ellipsoid=t$12.clone(r,i._ellipsoid),i._height=o,i._extrudedHeight=a,i._granularity=s,i._perPositionHeight=u,i._perPositionHeightExtrude=l,i._arcType=c,i._offsetAttribute=-1===h?void 0:h,i.packedLength=d,i},A$U.fromPositions=function(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new A$U({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute})},A$U.createGeometry=function(e){var t=e._ellipsoid,i=e._granularity,n=e._polygonHierarchy,r=e._perPositionHeight,o=e._arcType,a=y$Z.polygonOutlinesFromHierarchy(n,!r,t);if(0!==a.length){var s,l,u=[],c=e$2d.chordLength(i,t.maximumRadius),h=e._height,d=e._extrudedHeight;if(e._perPositionHeightExtrude||!e$2d.equalsEpsilon(h,d,0,e$2d.EPSILON2))for(l=0;l<a.length;l++){if((s=V$E(t,a[l],c,r,o)).geometry=y$Z.scaleToGeodeticHeightExtruded(s.geometry,h,d,t,r),e$2e(e._offsetAttribute)){var f=s.geometry.attributes.position.values.length/3,p=new Uint8Array(f);e._offsetAttribute===_0x39c22a.TOP?p=d$1s(p,1,0,f/2):p=d$1s(p,e._offsetAttribute===_0x39c22a.NONE?0:1),s.geometry.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}u.push(s)}else for(l=0;l<a.length;l++){if((s=Q$K(t,a[l],c,r,o)).geometry.attributes.position.values=A$1f.scaleToGeodeticHeight(s.geometry.attributes.position.values,h,t,!r),e$2e(e._offsetAttribute)){var _=s.geometry.attributes.position.values.length,m=new Uint8Array(_/3);d$1s(m,e._offsetAttribute===_0x39c22a.NONE?0:1),s.geometry.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}u.push(s)}var g=k$14.combineInstances(u)[0],x=i$1d.fromVertices(g.attributes.position.values);return new I$1p({attributes:g.attributes,indices:g.indices,primitiveType:g.primitiveType,boundingSphere:x,offsetAttribute:e._offsetAttribute})}},n$F.prototype=new o$11,n$F.prototype.constructor=n$F,n$F.prototype.parent=o$11.prototype,Object.defineProperties(n$F.prototype,{partCount:{get:function(){return this.parts.length}},extrudedHeight:{get:function(){return this._extrudedHeight},set:function(e){this._extrudedHeight=e,this.polygon.extrudedHeight=e,this._isGeometryDirty=!0}},closeTop:{set:function(e){this._closeTop=e,this.polygon.closeTop=e,this._isGeometryDirty=!0}},closeBottom:{set:function(e){this._closeBottom=e,this.polygon.closeBottom=e,this._isGeometryDirty=!0}},bottomAltitude:{get:function(){return this.polygon.height},set:function(e){this.polygon.height=e,this.polygon.perPositionHeight=!1,this._isGeometryDirty=!0}}}),n$F.prototype.init=function(e){this.type=P$U.GEOREGION3D,this.parts=[],this.points=[],this.polygon={positions:[],extrudedHeight:this.extrudedHeight,closeTop:this._closeTop,closeBottom:this._closeBottom,perPositionHeight:!0};for(var t=0,i=e.length;t<i;t++){var n=e[t].pntArray.length;if(this.parts.push(n),n>0)for(var r=0;r<n;r++)this.polygon.positions.push(o$1p.fromDegrees(e[t].pntArray[r].x,e[t].pntArray[r].y,e[t].pntArray[r].z)),this.points.push(new s$N(e[t].pntArray[r].x,e[t].pntArray[r].y,e[t].pntArray[r].z))}this.type=P$U.GEOREGION3D;var o=c$K(this.points),a=o$1p.fromDegrees(o.minLon,o.maxLat,0),s=o$1p.fromDegrees(o.maxLon,o.maxLat,0),l=o$1p.fromDegrees(o.minLon,o.minLat,0);this.width=o$1p.distance(a,s),this.height=o$1p.distance(a,l)},n$F.prototype.addPart=function(e){if(!(!e instanceof t$L)){for(var t=0,i=e.pntArray.length;t<i;t++){var n=e.pntArray[t];this.points.push(n),this.polygon.positions.push(o$1p.fromDegrees(n.x,n.y,n.z))}this.parts.push(e.pntArray.length)}},n$F.prototype.getPart=function(e){if("number"!=typeof e||e>=this.partCount)return null;for(var t=new t$L,i=0,n=0;n<e;n++)i+=this.parts[n];for(n=i;n<this.parts[e];n++)t.add(new s$N(this.points[n].x,this.points[n].y,this.points[n].z));return t},n$F.prototype._createGeometry=function(){var e=U$18.fromPositions(this.polygon);this._geometry=U$18.createGeometry(e),this._isGeometryDirty=!1};const _0x15f553=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x36a0f9=_0x15f553(void 0,(function(){return _0x36a0f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x36a0f9).search("(((.+)+)+)+$")}));_0x36a0f9();const _0x4e8357="uExcavationTexture",_0x284166="uEmissionTexAtlas",_0x383653="uFrontColorTexture",_0x565ea2="uFrontDepthTexture",_0x368f4f="uBackDepthTexture",_0x5abea4="uCategorieTexture",_0x17675c="uOverlayTexture",_0xdff1cd="uFlattenTexture",_0x3f1b0f="uHypsometricTexture",_0x5b8167="uHypsometricRenderTexture",_0x39bf40="uNormalDepthTexture";function _0x12db87(e){var t=_0x37a515.call(this)||this;t._layer=e,t._hasExcavation=e._hasExcavation,t._textures={},t._name=_0x2e0417.LAYER,t._lastTextureUpdateFrame=-1,this._initUniformMap()}function _0x3640a5(e){return 1!==e._brightness||1!==e._contrast||0!==e._hue||1!==e._saturation||1!==e._gamma}function _0x261fca(e){var t=e._fileType;return t===p$T.ClampGroundPolygon||t===p$T.ClampObjectPolygon||t===p$T.ExtendClampPolygonCache||t===p$T.ClampGroundLine||t===p$T.ClampObjectLine}_0x37a515&&(_0x12db87.__proto__=_0x37a515),_0x12db87.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x12db87.prototype.constructor=_0x37a515,Object.defineProperties(_0x12db87.prototype,{}),_0x12db87.prototype._initUBOStruct=function(){this._ubo.addUniform("uSelColor",4),this._ubo.addUniform("uTranslationAndBottom",4),this._ubo.addUniform("uFillForeColor",4),this._ubo.addUniform("uPolygonOffset",4),this._ubo.addUniform("uPointSize",1),this._ubo.addUniform("uMinMaxTransparent",2),this._ubo.addUniform("uTransparentFilter",1),this._ubo.addUniform("uHypLineColor",4),this._ubo.addUniform("uNoValueColor",4),this._ubo.addUniform("uHypRect",4),this._ubo.addUniform("uHypHasAnalysisRegion",1),this._ubo.addUniform("uMixColorType",1),this._ubo.addUniform("uHypOpacity",1),this._ubo.addUniform("uHypContourInterval",1),this._ubo.addUniform("uHypContourFillMode",1),this._ubo.addUniform("uHypFloor",1),this._ubo.addUniform("uHypCeil",1),this._ubo.addUniform("uDataFloor",1),this._ubo.addUniform("uDataCeil",1),this._ubo.addUniform("uHypMaxVisibleValue",1),this._ubo.addUniform("uHypMinVisibleValue",1),this._ubo.addUniform("uHypsometricVisible",1),this._ubo.addUniform("uRect",4),this._ubo.addUniform("uCameraHeight",1),this._ubo.addUniform("uExcavationRect",4),this._ubo.addUniform("uServerExcavationRect",4),this._ubo.addUniform("uExcavationMode",1),this._ubo.addUniform("uServerExcavationMode",1),this._ubo.addUniform("uSwipeRegion",4),this._ubo.addUniform("uBrightness",1),this._ubo.addUniform("uContrast",1),this._ubo.addUniform("uHue",1),this._ubo.addUniform("uSaturation",1),this._ubo.addUniform("uOneOverGamma",1),this._ubo.addUniform("uClipPlanes",4,6),this._ubo.addUniform("uClipLineColor",4),this._ubo.addUniform("uClipMode",1),this._ubo.addUniform("uMaxCategory",1),this._ubo.addUniform("uMinCategory",1),this._ubo.addUniform("uCategoryWidht",1),this._ubo.addUniform("uCategoryHeight",1),this._ubo.addUniform("uLineColor",4),this._ubo.addUniform("uLineWidth",1),this._ubo.addUniform("uFillStyle",1),this._ubo.addUniform("uTransparentBackColor",4),this._ubo.addUniform("uTransparentBackColorTolerance",1),this._ubo.addUniform("uVisibleDistanceMax",1),this._ubo.addUniform("uHorizontalColor",4),this._ubo.addUniform("uHorizontalLine",1),this._ubo.addUniform("uDistanceFalloffFactor",1),this._ubo.addUniform("uStrokesTextureScale",2),this._ubo.addUniform("uStrokesLog2Resolution",1),this._ubo.addUniform("uMinMaxTerrainHeightAndPickInfo",4),this._ubo.addUniform("uOverlayRect",4),this._ubo.addUniform("uEmissionTexAtlasTilingAndOffset",4,10),this._ubo.addUniform("uEmissionTexAtlasRects",4,10),this._ubo.addUniform("uEmissionColor",4),this._ubo.addUniform("uLayerBounds",4),this._ubo.addUniform("uLayerCornerLength",1),this._ubo.addUniform("uMaxCategoryOrHypCeil",1),this._ubo.addUniform("uMinCategoryOrHypFloor",1),this._ubo.addUniform("uEmissionTexAtlasCount",1),this._ubo.addUniform("uSnowCoverageFactor",1),this._ubo.addUniform("uAnimationSpeed",1),this._ubo.addUniform("uRippleScale",1),this._ubo.addUniform("uWindIntensity",1),this._ubo.addUniform("uRain",1),this._ubo.addUniform("uCameraDepth",1),this._ubo.addUniform("uWetnessFactor",1),this._ubo.addUniform("uSelectColorType",1)},_0x12db87.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x12db87.prototype._updateHypData=function(){const e=this._layer,t=e._hypsometricSetting,i=t.LineColor,n=t.noValueColor,r=e._hypsometricBound;this._ubo.updateFloat4("uHypLineColor",i.red,i.green,i.blue,i.alpha),this._ubo.updateFloat4("uNoValueColor",n.red,n.green,n.blue,n.alpha),this._ubo.updateFloat4("uHypRect",r.x,r.y,r.z,r.w),this._ubo.updateFloat("uHypHasAnalysisRegion",e._bUseHypRegion),this._ubo.updateFloat("uMixColorType",e._mixColorType),this._ubo.updateFloat("uHypOpacity",t.Opacity),this._ubo.updateFloat("uHypContourInterval",t.LineInterval);let o=1;switch(t.DisplayMode){case k$S.DisplayMode.NONE:o=0;break;case k$S.DisplayMode.FACE:o=1;break;case k$S.DisplayMode.LINE:o=2;break;case k$S.DisplayMode.FACE_AND_LINE:o=3}this._ubo.updateFloat("uHypContourFillMode",o),this._ubo.updateFloat("uHypFloor",t.ColorTableMinKey),this._ubo.updateFloat("uHypCeil",t.ColorTableMaxKey);let a=e._fMinValue===e._fMaxValue?0:e._fMinValue,s=e._fMinValue===e._fMaxValue?1:e._fMaxValue;this._ubo.updateFloat("uDataFloor",a),this._ubo.updateFloat("uDataCeil",s),this._ubo.updateFloat("uHypMaxVisibleValue",t.MaxVisibleValue),this._ubo.updateFloat("uHypMinVisibleValue",t.MinVisibleValue+e$2d.EPSILON5),this._ubo.updateFloat("uHypsometricVisible",1)},_0x12db87.prototype._updateWVisibleData=function(){this._ubo.updateVector4("uMaxCategory",this._layer._bUseHypRegion),this._ubo.updateVector4("uMinCategory",this._layer._bUseHypRegion),this._ubo.updateVector4("uCategoryWidht",this._layer._bUseHypRegion),this._ubo.updateVector4("uCategoryHeight",this._layer._bUseHypRegion)},_0x12db87.prototype._updateSwipe=function(){const e=this._layer,t=this._ubo,i=e._frameState.context,n=e._swipeRegion,r=i.drawingBufferWidth,o=e._frameState.context.drawingBufferHeight,a=n.x*r,s=(1-n.y)*o,l=n.z*r,u=(1-n.w)*o;t.updateFloat4("uSwipeRegion",a,s,l,u)},_0x12db87.prototype._updateEmissive=function(){const e=this._layer,t=this._ubo,i=e._layerModelBounds,n=i.x,r=i.y,o=i.z-i.x,a=i.w-i.y,s=Math.sqrt(i.z*i.z+i.w*i.w);let l=100,u=0;const c=e._hypsometricSetting;if(e$2e(c)&&(0!==c._floor||0!==c._ceiling)&&(l=c._ceiling,u=c._floor),t.updateFloat4("uLayerBounds",n,r,o,a),t.updateFloat("uLayerCornerLength",s),t.updateFloat("uMaxCategoryOrHypCeil",l),t.updateFloat("uMinCategoryOrHypFloor",u),e$2e(c)){var h=c._getEmissionAtlasTextureRects(),d=c._getEmissionTexAtlasTilingAndOffset(),f=[],p=[];let e=Math.min(10,h.length);for(let t=0;t<e;t++){let e=h[t];e$2c.pack(e,f,4*t);let i=d[t];e$2c.pack(i,p,4*t)}t.updateFloatArray("uEmissionTexAtlasRects",f),t.updateFloatArray("uEmissionTexAtlasTilingAndOffset",p),t.updateFloat("uEmissionTexAtlasCount",e)}},_0x12db87.prototype._updateClipValue=function(){const e=this._layer,t=this._ubo,i=e._clipLineColor,n=e._clipPlane,r=n.length,o=new Array(4*r);for(let e=0;e<r;e++){const t=n[e];o[4*e]=t.x,o[4*e+1]=t.y,o[4*e+2]=t.z,o[4*e+3]=t.w}t.updateFloatArray("uClipPlanes",o),t.updateFloat4("uClipLineColor",i.x,i.y,i.z,i.w),t.updateFloat("uClipMode",e._clipMode)},_0x12db87.prototype._updateWireFrameSketch=function(){const e=this._layer,t=this._ubo;e$2e(e._edgeStrokesTexture)||e._initEdgeTexture(),t.updateFloat2("uStrokesTextureScale",e._strokesTextureScale.x,e._strokesTextureScale.y),t.updateFloat("uStrokesLog2Resolution",e._strokesLog2Resolution)},_0x12db87.prototype.update=function(e,t){if(!e.webgpu&&!e.webgl2)return;e$2e(this._ubo)||this._initUBO(e);const i=this._layer,n=this._ubo,r=i.style3D,o=i.selectedColor,a=i.selectedTranslate,s=r.fillForeColor,l=r.emissionColor;this._ubo.updateFloat4("uSelColor",o.red,o.green,o.blue,o.alpha),this._ubo.updateFloat4("uTranslationAndBottom",a.x,a.y,a.z,r.bottomAltitude),this._ubo.updateFloat4("uFillForeColor",s.red,s.green,s.blue,s.alpha),this._ubo.updateFloat4("uEmissionColor",l.red,l.green,l.blue,l.alpha);var u=this._layer._rsColor.polygonOffset,c=0,h=0;e$2e(u)&&(c=u.factor,h=u.units),this._ubo.updateFloat4("uPolygonOffset",c,h,-5,-5),this._ubo.updateFloat("uPointSize",this._layer.style3D.pointSize);const d=r.lineColor,f=r.lineWidth;if(this._ubo.updateFloat4("uLineColor",d.red,d.green,d.blue,d.alpha),this._ubo.updateFloat("uLineWidth",f),this._layer._hasExcavation&&(this._ubo.updateFloat2("uExcavationMode",this._layer._excavationMode),this._ubo.updateFloat4("uExcavationRect",this._layer._excavationBounds.x,this._layer._excavationBounds.y,this._layer._excavationBounds.z,this._layer._excavationBounds.w)),n.updateFloat2("uMinMaxTransparent",i.minTransparentAlpha,i.maxTransparentAlpha),i._flattening&&(this._ubo.updateVector4("uRect",i._flattenBounds),this._ubo.updateFloat("uCameraHeight",i._frameState.camera.positionCartographic.height)),i._bUseHypColorTable&&this._updateHypData(),i._hasExcavation&&(n.updateVector4("uExcavationRect",i._excavationBounds),n.updateFloat("uExcavationMode",i._excavationMode)),i._hasServerExcavation&&(n.updateVector4("uServerExcavationRect",i._serverExcavationBounds),n.updateFloat("uServerExcavationMode",i._serverExcavationMode)),i.swipeEnabled&&this._updateSwipe(),i._hasEmissiveTexAtlas&&this._updateEmissive(),_0x3640a5(i)&&(n.updateFloat("uBrightness",i._brightness),n.updateFloat("uContrast",i._contrast),n.updateFloat("uHue",i._hue),n.updateFloat("uSaturation",i._saturation),n.updateFloat("uOneOverGamma",1/i._gamma)),i._clipping&&this._updateClipValue(),e$2e(i._categorieTexture)&&(n.updateFloat("uMaxCategory",i._hypMaxCategory),n.updateFloat("uMinCategory",i._hypMinCategory),n.updateFloat("uCategoryWidht",i._categorieTexture&&i._categorieTexture.width||256),n.updateFloat("uCategoryHeight",i._categorieTexture&&i._categorieTexture.height||1)),n.updateFloat("uFillStyle",i.style3D.fillStyle),i._transparentBackColorTolerance>0&&(n.updateColor("uTransparentBackColor",i._transparentBackColor),n.updateFloat("uTransparentBackColorTolerance",i._transparentBackColorTolerance)),i.visibleDistanceMax<6378137&&i.translucencyByDistance&&n.updateFloat("uVisibleDistanceMax",i._visibleDistanceMax),i.horizontalline&&(n.updateVector4("uHorizontalColor",i._HorizontalColor),n.updateFloat("uHorizontalLine",i._fHorizontalLine)),n.updateFloat("uDistanceFalloffFactor",i._edgeDistanceFalloffFactor),i.wireFrameMode===_0x1d226a.Sketch&&this._updateWireFrameSketch(),_0x261fca(i)&&n.updateFloat4("uMinMaxTerrainHeightAndPickInfo",i._shadowVolumeBottomHeight,i._shadowVolumeTopHeight,i._picking,i._context._pickPositionHeight),i._hasOverlay&&n.updateVector4("uOverlayRect",i._overlayBounds),i._hasSnowEffect){const e=i._PBRMaterialParams.pbrMetallicRoughness.snowEffect;let t=e.snow_coverage>0?e.snow_coverage:.5;n.updateFloat("uSnowCoverageFactor",t)}if(i._hasRainEffect){const e=i._PBRMaterialParams.pbrMetallicRoughness.rainEffect,t=e.ripple_scale>0?e.ripple_scale:5,r=e.rain>0?e.rain:200,o=e.cameraDepth>0?e.cameraDepth:.8,a=e.wetnessFactor>0?e.wetnessFactor:0;n.updateFloat("uAnimationSpeed",e.animationSpeed),n.updateFloat("uRippleScale",t),n.updateFloat("uWindIntensity",e.wind_intensity),n.updateFloat("uRain",r),n.updateFloat("uCameraDepth",o),n.updateFloat("uWetnessFactor",a)}n.updateFloat("uSelectColorType",i.selectColorType),n.updateFloat("uTransparentFilter",i.selectionFiltrateByTransparency),this._ubo.update(),this._setLayerTextureToUBO(t)},_0x12db87.prototype._setLayerTextureToUBO=function(e){e.frameNumber!=this._lastTextureUpdateFrame&&(e$2e(this._layer._sqTextures)&&this._layer._sqTextures.length>0?(this._isLayerTextureChanged(_0x565ea2,this._layer._sqTextures[0]),this._isLayerTextureChanged(_0x368f4f,this._layer._sqTextures[1]),this._isLayerTextureChanged(_0x383653,this._layer._sqTextures[2])):(this._isLayerTextureChanged(_0x565ea2,void 0),this._isLayerTextureChanged(_0x368f4f,void 0),this._isLayerTextureChanged(_0x383653,void 0)),this._isLayerTextureChanged(_0x284166,this._layer._hasEmissiveTexAtlas?this._layer._hypsometricSetting._emissionTextureAtlas.texture:void 0),this._isLayerTextureChanged(_0x5abea4,this._layer._categorieTexture),this._isLayerTextureChanged(_0x4e8357,this._layer._excavationTexture),this._isLayerTextureChanged(_0x17675c,this._layer._overlayTexture),this._isLayerTextureChanged(_0xdff1cd,this._layer._flattenTexture),this._isLayerTextureChanged(_0x3f1b0f,this._layer._hypsometricTexture),this._isLayerTextureChanged(_0x5b8167,this._layer._hypsometricRenderTexture),this._isLayerTextureChanged(_0x39bf40,this._layer.isSilhouette()?this._layer._frameState._framebufferList.normalAndDepth.renderTexture._fb.getColorTexture(0):void 0),this._lastTextureUpdateFrame=e.frameNumber)},_0x12db87.prototype._isLayerTextureChanged=function(e,t){this._isTextureDirty=this._textures[e]!==t,this._textures[e]=t},_0x12db87.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name);for(const t in this._textures)this._setTextureToEffect(e,this._textures[t],t)},_0x12db87.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}};var _0x42d8ba=new o$1o,_0x208962=new o$1o;const _0x3c7329=new e$2c;_0x12db87.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(!t.webgl2&&!t.webgpu){var i={uSelColor:function(){return e.selectedColor},uTranslationAndBottom:function(){return _0x3c7329.x=e.selectedTranslate.x,_0x3c7329.y=e.selectedTranslate.y,_0x3c7329.z=e.selectedTranslate.z,_0x3c7329.w=e.style3D.bottomAltitude,e.selectedTranslate},uFillForeColor:function(){return e.style3D.fillForeColor},uPolygonOffset:function(){var t=e._rsColor.polygonOffset;return e$2e(t)?(_0x208962.x=t.factor,_0x208962.y=t.units):(_0x208962.x=0,_0x208962.y=0),_0x208962},uPointSize:function(){return e.style3D.pointSize},uMinMaxTransparent:function(){return _0x42d8ba.x=e.minTransparentAlpha,_0x42d8ba.y=e.maxTransparentAlpha,_0x42d8ba},uTransparentFilter:function(){return e.selectionFiltrateByTransparency},uHypLineColor:function(){return e$2e(e._hypsometricSetting)?(_0x3c7329.x=e._hypsometricSetting.LineColor.red,_0x3c7329.y=e._hypsometricSetting.LineColor.green,_0x3c7329.z=e._hypsometricSetting.LineColor.blue,_0x3c7329.w=e._hypsometricSetting.LineColor.alpha,_0x3c7329):e$2c.ZERO},uNoValueColor:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.noValueColor:Color.WHITE},uHypRect:function(){return e._hypsometricBound},uHypHasAnalysisRegion:function(){return e._bUseHypRegion},uMixColorType:function(){return e$2e(e._mixColorType)?e._mixColorType:0},uHypOpacity:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.Opacity:1},uHypContourInterval:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.LineInterval:100},uHypContourFillMode:function(){var t=1;if(e$2e(e._hypsometricSetting))switch(e._hypsometricSetting.DisplayMode){case k$S.DisplayMode.NONE:t=0;break;case k$S.DisplayMode.FACE:t=1;break;case k$S.DisplayMode.LINE:t=2;break;case k$S.DisplayMode.FACE_AND_LINE:t=3}return t},uHypFloor:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting.ColorTableMaxKey:0},uDataFloor:function(){return e._fMinValue===e._fMaxValue?0:e._fMinValue},uDataCeil:function(){return e._fMinValue===e._fMaxValue?1:e._fMaxValue},uHypMaxVisibleValue:function(){return(e$2e(e._hypsometricSetting)?e._hypsometricSetting.MaxVisibleValue:0)+e$2d.EPSILON5},uHypMinVisibleValue:function(){return(e$2e(e._hypsometricSetting)?e._hypsometricSetting.MinVisibleValue:0)-e$2d.EPSILON5},uHypsometricVisible:function(){return 1},uRect:function(){return e._flattenBounds},uCameraHeight:function(){return e._frameState.camera.positionCartographic.height},uExcavationMode:function(){return e._excavationMode},uExcavationRect:function(){return e._excavationBounds},uServerExcavationMode:function(){return e._serverExcavationMode},uServerExcavationRect:function(){return e._serverExcavationBounds},uSwipeRegion:function(){return _0x3c7329.x=e._swipeRegion.x*e._frameState.context.drawingBufferWidth,_0x3c7329.y=(1-e._swipeRegion.y)*e._frameState.context.drawingBufferHeight,_0x3c7329.z=e._swipeRegion.z*e._frameState.context.drawingBufferWidth,_0x3c7329.w=(1-e._swipeRegion.w)*e._frameState.context.drawingBufferHeight,_0x3c7329},uBrightness:function(){return e._brightness},uContrast:function(){return e._contrast},uHue:function(){return e._hue},uSaturation:function(){return e._saturation},uOneOverGamma:function(){return 1/e._gamma},uClipMode:function(){return e._clipMode},uClipPlanes:function(){return e._clipPlane},uClipLineColor:function(){return e._clipLineColor},uMaxCategory:function(){return e._hypMaxCategory},uMinCategory:function(){return e._hypMinCategory},uCategoryWidht:function(){return e._categorieTexture&&e._categorieTexture.width||256},uCategoryHeight:function(){return e._categorieTexture&&e._categorieTexture.height||1},uLineColor:function(){return e.style3D.lineColor},uLineWidth:function(){return e.style3D.lineWidth},uFillStyle:function(){return e.style3D.fillStyle},uTransparentBackColor:function(){return e._transparentBackColor},uTransparentBackColorTolerance:function(){return e._transparentBackColorTolerance},uVisibleDistanceMax:function(){return e._visibleDistanceMax},uHorizontalColor:function(){return e$2e(e$2e(e._HorizontalColor))?e._HorizontalColor:new e$2c(1,1,0,0)},uHorizontalLine:function(){return e$2e(e._fHorizontalLine)?e._fHorizontalLine:0},uDistanceFalloffFactor:function(){return e._edgeDistanceFalloffFactor},uStrokesTextureScale:function(){return e._strokesTextureScale},uStrokesLog2Resolution:function(){return e._strokesLog2Resolution},uMinMaxTerrainHeightAndPickInfo:function(){return _0x3c7329.x=e._shadowVolumeBottomHeight,_0x3c7329.x=e._shadowVolumeTopHeight,_0x3c7329.x=e._picking,_0x3c7329.x=e._context._pickPositionHeight,_0x3c7329},uOverlayRect:function(){return e._overlayBounds},uEmissionTexAtlasTilingAndOffset:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting._getEmissionTexAtlasTilingAndOffset():[]},uEmissionTexAtlasRects:function(){return e$2e(e._hypsometricSetting)?e._hypsometricSetting._getEmissionAtlasTextureRects():[]},uEmissionColor:function(){return e.style3D.emissionColor},uLayerBounds:function(){return _0x3c7329.x=e._layerModelBounds.x,_0x3c7329.y=e._layerModelBounds.y,_0x3c7329.z=e._layerModelBounds.z-e._layerModelBounds.x,_0x3c7329.w=e._layerModelBounds.w-e._layerModelBounds.y,_0x3c7329},uLayerCornerLength:function(){return Math.sqrt(e._layerModelBounds.z*e._layerModelBounds.z+e._layerModelBounds.w*e._layerModelBounds.w)},uMaxCategoryOrHypCeil:function(){var t=e._hypMaxCategory;return e$2e(e._hypsometricSetting)&&(0!=e._hypsometricSetting._floor||0!=e._hypsometricSetting._ceiling)&&(t=e._hypsometricSetting._ceiling),e$2e(t)||(t=100),t},uMinCategoryOrHypFloor:function(){var t=e._hypMinCategory;return e$2e(e._hypsometricSetting)&&(0!=e._hypsometricSetting._floor||0!=e._hypsometricSetting._ceiling)&&(t=e._hypsometricSetting._floor),e$2e(t)||(t=0),t},uEmissionTexAtlasCount:function(){const t=e._hypsometricSetting;if(e$2e(t)){var i=t._getEmissionAtlasTextureRects();return Math.min(10,i.length)}return 0},uSnowCoverageFactor:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.snowEffect;return t.snow_coverage>0?t.snow_coverage:.5},uAnimationSpeed:function(){return e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.animationSpeed},uRippleScale:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.ripple_scale>0?t.ripple_scale:5},uWindIntensity:function(){return e._PBRMaterialParams.pbrMetallicRoughness.rainEffect.wind_intensity},uRain:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.rain>0?t.rain:200},uCameraDepth:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.cameraDepth>0?t.cameraDepth:.8},uWetnessFactor:function(){const t=e._PBRMaterialParams.pbrMetallicRoughness.rainEffect;return t.wetnessFactor>0?t.wetnessFactor:0}};this._uniformMap=i}},_0x12db87.prototype.isDestroyed=function(){return!1},_0x12db87.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};const _0x17bb8f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2a7a75=_0x17bb8f(void 0,(function(){return _0x2a7a75.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a7a75).search("(((.+)+)+)+$")}));function _0x44ae93(e){var t=_0x37a515.call(this)||this;t._layer=e,t._name=_0x2e0417.WaterLayer,this._initUniformMap()}_0x2a7a75(),_0x37a515&&(_0x44ae93.__proto__=_0x37a515),_0x44ae93.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x44ae93.prototype.constructor=_0x37a515,Object.defineProperties(_0x44ae93.prototype,{}),_0x44ae93.prototype._initUBOStruct=function(){this._ubo.addUniform("uWaterColor",4),this._ubo.addUniform("uSunColor",4),this._ubo.addUniform("uFlowParameter",4),this._ubo.addUniform("uTimeVal",1),this._ubo.addUniform("uWaterBrightness",1),this._ubo.addUniform("uUseRefectMap",1),this._ubo.addUniform("uWaveScale",1),this._ubo.addUniform("uReflowWaveScale",1),this._ubo.addUniform("uNoiseStrength",1),this._ubo.addUniform("uMinVisibleValue",1),this._ubo.addUniform("uMaxVisibleValue",1),this._ubo.addUniform("uReflectMapLod",1)},_0x44ae93.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())};let _0x41fca4=0,_0xad0db4=0;_0x44ae93.prototype.update=function(e){if(!e.webgpu&&!e.webgl2)return;e$2e(this._ubo)||this._initUBO(e);const t=this._layer,i=this._ubo,n=t.waterParameter,r=n.color,o=t._frameState.lightSource.sunLightColor,a=n.speed,s=n.waveScale,l=n.reflowWaveScale,u=n.noiseStrength||1,c=n.waveDirection,h=null!==c?0:1,d=c*Math.PI/180,f=-Math.sin(d),p=-Math.cos(d);_0xad0db4!==t._frameState.frameNumber&&(_0x41fca4+=1/60,_0xad0db4=t._frameState.frameNumber);const _=t._frameState._framebufferList.water;let m=_&&_.isUpdate?1:0;i.updateFloat4("uWaterColor",r.x,r.y,r.z,r.w),i.updateFloat4("uSunColor",o.red,o.green,o.blue,o.alpha),i.updateFloat4("uFlowParameter",f,p,a,h),i.updateFloat("uTimeVal",_0x41fca4),i.updateFloat("uWaterBrightness",n.brightness),i.updateFloat("uUseRefectMap",m),i.updateFloat("uWaveScale",s),i.updateFloat("uReflowWaveScale",l),i.updateFloat("uNoiseStrength",u),i.updateFloat("uMinVisibleValue",t._hypMinCategory+e$2d.EPSILON5),i.updateFloat("uMaxVisibleValue",t._hypMaxCategory),i.updateFloat("uReflectMapLod",5-_.distinctQuality),this._ubo.update()},_0x44ae93.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x44ae93.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x44ae93.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(t.webgl2||t.webgpu)return;const i=e.waterParameter;this._uniformMap={},this._uniformMap.uWaterColor=function(){return i.color},this._uniformMap.uSunColor=function(){return e._frameState.lightSource.sunLightColor},this._uniformMap.uFlowParameter=function(){const e=i.waveDirection,t=null!==e?0:1,n=e*Math.PI/180;return new e$2c(-Math.sin(n),-Math.cos(n),i.speed,t)},this._uniformMap.uTimeVal=function(){return _0xad0db4!==e._frameState.frameNumber&&(_0x41fca4+=1/60,_0xad0db4=e._frameState.frameNumber),_0x41fca4},this._uniformMap.uWaterBrightness=function(){return i.brightness},this._uniformMap.uUseRefectMap=function(){const t=e._frameState._framebufferList.water;return t&&t.isUpdate?1:0},this._uniformMap.uWaveScale=function(){return i.waveScale},this._uniformMap.uReflowWaveScale=function(){return i.reflowWaveScale},this._uniformMap.uNoiseStrength=function(){return i.noiseStrength||1},this._uniformMap.uMaxVisibleValue=function(){return e._hypMaxCategory},this._uniformMap.uMinVisibleValue=function(){return e._hypMinCategory+e$2d.EPSILON5}},_0x44ae93.prototype.isDestroyed=function(){return!1},_0x44ae93.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};var e$15={SMALL:0,MEDIUM:1,LARGE:2},s$E=Object.freeze(e$15),e$14={CALM:0,SLIGHT:1,MILD:2,MODERATE:3},i$O=Object.freeze(e$14);function h$J(){this._waterColour=new e$2c(3/255,.6,98/255,1),this._waveDirection=180,this._bumpSpeed=1.2,this._waveScale=80,this._reflowWaveScale=1,this._noiseStrength=.6,this._fresnelPower=.1,this._maxFresnel=1,this._minFresnel=0,this._timeVal=.05,this._waterBrightness=.7,this._averageHeight=3.7,this._waterbodySize=s$E.MEDIUM,this._waveStrength=i$O.MILD,this._update=!1,this._waterEffect={[s$E.SMALL]:{[i$O.CALM]:()=>n$E(this,.1,120,30,.1),[i$O.SLIGHT]:()=>n$E(this,.7,320,30,.2),[i$O.MILD]:()=>n$E(this,1,280,15,.5),[i$O.MODERATE]:()=>n$E(this,1,240,15,.75)},[s$E.MEDIUM]:{[i$O.CALM]:()=>n$E(this,.2,80,1,.1),[i$O.SLIGHT]:()=>n$E(this,.7,120,1,.35),[i$O.MILD]:()=>n$E(this,1.2,80,1,.6),[i$O.MODERATE]:()=>n$E(this,1.2,40,1,.9)},[s$E.LARGE]:{[i$O.CALM]:()=>n$E(this,.5,40,2,.1),[i$O.SLIGHT]:()=>n$E(this,1.1,80,2,.25),[i$O.MILD]:()=>n$E(this,1.3,30,2,.6),[i$O.MODERATE]:()=>n$E(this,1.5,20,1,1.4)}}}function n$E(e,t,i,n,r){e.speed=t,e.waveScale=i,e.reflowWaveScale=n,e.noiseStrength=r}function f$O(e){e._update&&(e._waterEffect[e._waterbodySize][e._waveStrength](),e._update=!1)}Object.defineProperties(h$J.prototype,{color:{get:function(){return this._waterColour},set:function(e){if(o$1q.defined("value",e),!(e instanceof e$1X))throw new DeveloperError("Expected waterColor to be typeof color");let t=new e$2c;t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,this._waterColour=t}},waveDirection:{get:function(){return this._waveDirection},set:function(e){this._waveDirection=e}},waterbodySize:{get:function(){return this._waterbodySize},set:function(e){this._waterbodySize=e,this._update=!0,f$O(this)}},waveStrength:{get:function(){return this._waveStrength},set:function(e){this._waveStrength=e,this._update=!0,f$O(this)}},noiseStrength:{get:function(){return this._noiseStrength},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._noiseStrength=e}},speed:{get:function(){return this._bumpSpeed},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._bumpSpeed=e}},waveScale:{get:function(){return this._waveScale},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._waveScale=e}},reflowWaveScale:{get:function(){return this._reflowWaveScale},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._reflowWaveScale=e}},fresnelPower:{get:function(){return this._fresnelPower},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._fresnelPower=e}},maxFresnel:{get:function(){return this._maxFresnel},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._maxFresnel=e}},minFresnel:{get:function(){return this._minFresnel},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._minFresnel=e}},timeVal:{get:function(){return this._timeVal},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._timeVal=e}},brightness:{get:function(){return this._waterBrightness},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._waterBrightness=e}},averageHeight:{get:function(){return this._averageHeight},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number("value",e),this._averageHeight=e}}});var _0x16b14f=(_0x3775bf=!0,function(e,t){var i=_0x3775bf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3775bf=!1,i}),_0x23364=_0x16b14f(void 0,(function(){return _0x23364.toString().search("(((.+)+)+)+$").toString().constructor(_0x23364).search("(((.+)+)+)+$")})),_0x3775bf;_0x23364(),new a$18;var _0x120895=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),_0x577081={CLIP_NOTHING:0,CLIP_BEHIND_ANY_PLANE:1,CLIP_BEHIND_ALL_PLANE:2,ONLY_KEEP_LINE:3},_0x2c45b2={Altitude:0,Color:1,Texture:2},_0x1733b9={Normal:0,Add:1},_0x1c85b1={LOD_Loading:0,All_Loading:1},_0x277a12={DEGREE:"Degree",METER:"Meter"},_0x3feb92=-1e3,_0x11b5bb=9e3,_0x1a71e8=function(e){var t=(e=e||{}).gl,i=e.name,n=e.position;if(this._materialType=e.materialType,this._isS3MB=e.isS3MB,this._isOSGB=e.isOSGB,this._isS3MZ=e.isS3MZ,this._isS3MBlock=e.isS3MBlock,this._context=e.context,this._gl=t,this._name=i,this._globeType=e.globeType,this._groupName=e.groupName,this._id=-1,this._version=void 0,this._baseUri=e.baseUri,this._dataType=e.dataType,this._isTextureShare=u$Z(e.isTextureShare,!1),this._associateMaterialUrl=e.associateMaterialUrl,this._isTransparencyOptimization=u$Z(e.isTransparencyOptimization,!1),this._vertexCompressionType=e.vertexCompressionType,e$2e(e.vertexWeightMode))switch(e.vertexWeightMode){case"DatasetField":default:this._vertexWeightMode=_0x132759.DatasetField;break;case"EdgeLengthMin":this._vertexWeightMode=_0x132759.EdgeLengthMin}if(this._triangleFiltratePixel=0,this._urlType=u$Z(e.urlType,Tr$4.REST),this._urlArguments=e.urlArguments,this._fileType=p$T.OSGBFile,this._RGBTOBGR=!1,this._S3MTileLoadedEvent=new o$1h,this._allTilesLoaded=new o$1h,this._colorTableChanged=new o$1h,this._attributeDownloaded=new o$1h,this._prepareLoadSize=0,this._prepareLoadEvent=void 0,e.pointCloudLayerNames&&e.pointCloudLayerNames.length>0){this._pointCloudLayerVisible={};for(var r=0,o=e.pointCloudLayerNames.length;r<o;r++)this._pointCloudLayerVisible[e.pointCloudLayerNames[r]]=!0;this._pointCloudLayerNames=e.pointCloudLayerNames.slice(0)}if(e$2e(e.fileType))switch(e.fileType){case"ClampGroundLineCache":this._fileType=p$T.ClampGroundLine;break;case"ClampObjectLineCache":this._fileType=p$T.ClampObjectLine;break;case"ClampGroundPolygonCache":this._fileType=p$T.ClampGroundPolygon;break;case"ClampObjectPolygonCache":this._fileType=p$T.ClampObjectPolygon;break;case"ExtendClampPolygonCache":this._fileType=p$T.ExtendClampPolygonCache;break;case"IconPointCache":this._fileType=p$T.IconPoint;break;case"TextCache":this._fileType=p$T.Text;break;case"PointCloudFile":this._fileType=p$T.PointCloudFile;break;case"OSGBCacheFile":this._fileType=p$T.OSGBCacheFile;break;case"ExtendRegionCache":this._fileType=p$T.ExtendRegion3D;break;case"RegionEffect":this._fileType=p$T.RegionEffect;break;case"PolylineEffect":this._fileType=p$T.PolylineEffect;break;case"ClampGroundAndObjectLineCache":this._fileType=p$T.ClampGroundAndObjectLineCache;break;case"ClampGroundRealtimeRasterCache":this._fileType=p$T.ClampGroundRealtimeRasterCache}this._supportCompressType=e.supportCompressType,this.lon=n.lon,this.lat=n.lat,this.height=n.height,this.positionUnits=n.units,this._layerBounds=e.layerBounds;var a=.5*(this._layerBounds.north+this._layerBounds.south);this._layerRange=a$18.sphericalDistance(e$2d.toDegrees(this._layerBounds.east),e$2d.toDegrees(a),e$2d.toDegrees(this._layerBounds.west),e$2d.toDegrees(a)),this._style3D=u$Z(e.style3D,new e$1v),this._style3D._owner=this,this._lodRangeScale=u$Z(e.lodRangeScale,1),this._adjustedLodRangeScale=this._lodRangeScale,this._maximumScreenSpaceError=5,this._selectColorType=Zr$3.MIX,this._mixColorType=_0x2b839f.MIX,this._brightness=u$Z(e.brightness,1),this._contrast=u$Z(e.constrast,1),this._hue=u$Z(e.hue,0),this._saturation=u$Z(e.saturation,1),this._gamma=u$Z(e.gamma,1),this._visibleDistanceMax=u$Z(e.maxVisibleDistance,Number.MAX_VALUE),this._visibleDistanceMin=u$Z(e.minVisibleDistance,0),this._minVisibleAltitude=u$Z(e.minVisibleAltitude,0),this._maxVisibleAltitude=u$Z(e.maxVisibleAltitude,Number.MAX_VALUE),this._hasLight=!(this._fileType===p$T.OSGBFile||this._fileType===p$T.PointCloudFile),this._selectEnabled=u$Z(e.selectEnable,!0),this._enableHighlight=u$Z(e.enableHighlight,!0),this._heading=u$Z(e.heading,0),this._cullEnabled=u$Z(e.cullEnabled,!1);let s=e.cullMode;switch(s){case"CW":s=W$13.CLOCKWISE;break;case"CCW":s=W$13.COUNTER_CLOCKWISE;break;default:s=W$13.NONE}this._cullMode=u$Z(s,W$13.NONE),this._shadowType=u$Z(e.shadowType,_0x325616.NONE),this._visibleViewport=4095,this._visible=u$Z(e.isVisible,!0),this._sceneMode=u$Z(e.sceneMode,C$14.SCENE3D),this._selections=[],this._multiChoose=!1,this._selectedColor=new e$1X(.7,.7,1,1),this._selectedLineColor=new e$1X(1,1,1),this._skeletonSelectedColor=new e$1X(1,0,0,1),this._selectedTranslate=new o$1p(0,0,0),this._objsColorList={},this._objsOffsetList={},this._objsVisibleList=new e$1Q,this._objsHideList=new e$1Q,this._objsVisibleMap={},this._objsOperationList={},this._operationType=_0x27a6bb.RESET,this._fileType===p$T.ExtendRegion3D&&(this._objsHeightList=new e$1Q),e$2e(e.effect)?this._effect=e.effect:this._fileType===p$T.RegionEffect?this._effect=new _0x2adae6:this._fileType===p$T.PolylineEffect&&(this._effect=new _0x5175d0),this._bloomEffect=new _0x37a6f4(this),this.waterEffectSet=e.waterEffectSet,this._noiseMapUrl=n$17("Assets/Textures/noise.png"),this._noiseMapTexture=void 0,this._flattenTextureWidth=1024,this._flattening=!1,this._flattenBounds=new e$2c,this._flattenTexture=void 0,this._flattenRegions=new e$1Q,this._flattenUpdate=!1,this._flattenVisibleViewport=255,this._hasExcavation=!1,this._hasServerExcavation=!1,this._excavationBounds=new e$2c,this._excavationTexture=void 0,this._excavationRegions=new e$1Q,this._excavationUpdate=!1,this._excavationMode=_0x454473.CLIP_INSIDE,this._serverExcavationMode=_0x454473.CLIP_OUTSIDE,this._serverExcavationBounds=new e$2c,this._serverExcavationRegions=new e$1Q,this._hasOverlay=!1,this._overlayBounds=new e$2c,this._overlayRegions=new e$1Q,this._overlayTextures=new e$1Q,this._overlayTexture=void 0,this.__overlayUpdate=!1,this._hypsometricSetting=void 0,this._hypsometricTexture=void 0,this._hypsometricRenderTexture=void 0,this._hypsometricRegion=void 0,this._hypsometricBound=new e$2c,this._bUseHypColorTable=!1,this._bUseHypRegion=!1,this._hypsometricRegionUpdate=!1,this._hypAnalysisMode=k$S.AnalysisRegionMode.ARM_NONE,this._hypMaxInstensity=e.maxInstensity,this._hypMinInstensity=e.minInstensity,this._hypMaxHeight=e.maxHeight,this._hypMinHeight=e.minHeight,this._hypMaxCategory=e.maxCategory,this._hypMinCategory=e.minCategory,this._hypUseColorByHeight=!0,this._MultiTemporalUseWater=!1,this._categorieTexture=void 0,this._categoryHideList=new e$1Q,this._fHorizontalLine=e.horizontalLine,this._oriClipPlane=[],this._renderClipPlaneArray=new e$1Q,this._clipPlane=[];for(r=0;r<6;r++)this._clipPlane[r]=new e$2c(0,0,0,0),this._oriClipPlane[r]=new e$2c(0,0,0,0);this._clipMode=_0x577081.CLIP_NOTHING,this._clipLineColor=new e$2c(1,0,0,0),this._clipping=!1,this._section=!1,this._clipPlaneMode=_0x1f23e7.NONE,this._clipPlaneColor=new e$2c(1,0,0,1),this._matModel=new p$1d,this._oriMatModel=new p$1d,this._bReleaseColor=u$Z(e.bReleaseColor,!1),this._ignoreNormal=u$Z(e.ignoreNormal,!1),this._fileType===p$T.OSGBFile&&(this._ignoreNormal=!0),this._textureLod=u$Z(e.textureLod,!0);var l=u$Z(e.processType,"Normal");if(this._nProcessType="Normal"===l?_0x1733b9.Normal:_0x1733b9.Add,this._nLoadingMode=_0x1c85b1.All_Loading,this._clockStart=0,this._polygonOffsetConfig=e.polygonOffset,this._wireFrameType=_0x1d226a.Quad,this._bVolume=!1,e$2e(e.volumeObj)&&(this._bVolume=e.volumeObj.bVolume,this._strVolumeExts=e.volumeObj.strVolumeExts,this._volNames=e.volumeObj.volNames,this._maxVolumeValues=e.volumeObj.maxValues,this._minVolumeValues=e.volumeObj.minValues,this._volName=this._volNames[0],this._fMaxValue=this._maxVolumeValues[0],this._fMinValue=this._minVolumeValues[0],this._strVolumeExt=this._strVolumeExts[0]),this._maps=e.maps,this._volData=void 0,this._splitDirection=u$Z(e.splitDirection,_0x2d4a08.NONE),this._splitPosition=u$Z(e.splitPosition,.5*this._context.drawingBufferWidth),this._pickPosition=new e$2c,this._selectionFiltrateByTransparency=.01,this._receiveObjectClamp=!0,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0,this._edgeDistanceFalloffFactor=0,this._enableDepthTest=!0,this.initialize(),e$2e(window.Proxy)){var u=this,c={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1,clear:function(){u._layerScheduler._clearIndexedDBCache()}};this._indexedDBSetting=new Proxy(c,{get:function(e,t){return e[t]},set:function(e,t,i){return"isAttributesSave"===t&&!1===e.isAttributesSave&&!0===i&&!e$2e(u._queryFieldNames)&&(e$2e(u._layerScheduler._indexedDBScheduler)?u._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()}),(function(){0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()})):u._layerScheduler._dpPromise.then((function(){u._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()}),(function(){0==u._layerScheduler._attributes._memoryCache&&u._layerScheduler._requestAllScvd()}))}))),e[t]=i,!0}}),this._isJsonScp=e._isJson||!1}this._queryFieldNames=e.queryFieldNames,this._fieldsInfo=e.fieldsInfo,this._indexInfoMap=e.indexInfoMap,this._indexInfoAttributeMap=e.indexInfoAttributeMap,this._attributeExtentName=u$Z(e.attributeExtentName,""),this._layerScheduler=new _0x408010({context:this._context,layer:this,rootEntities:e.rootEntities,cacheEntityCount:e.cacheEntityCount,cacheKey:u$Z(e.cacheKey,""),customRequestHeaders:e.customRequestHeaders,scpUrl:e.scpUrl}),this._clearMemoryImmediately=!1,this._totalMemoryUsageInBytes=0,this._maximumMemoryUsage=512,this._PBRMaterialType=Xe$e.NONE,this._pbrMetalTexture=void 0,this._pbrRoughTexture=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:o$1p.ZERO,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}},this._usePBR=!1,this._localCacheMemoryReserveCount=500,this._fileType===p$T.Text&&(this._id2RectangleList=new e$1Q),this._textureUVSpeed=new o$1o(0,0),this._pointCloudEyeDomeLighting=new _0x153701(this._context),this._pointCloudShading=new o$Z({attenuation:!0,geometricErrorScale:1,maximumAttenuation:8,eyeDomeLighting:!0}),this._pointCloudClassificationInfos=void 0,this._styleEngine=new e$1u,this._manualShadowVolumeBottomHeight=_0x3feb92,this._manualShadowVolumeTopHeight=_0x11b5bb,this._shadowVolumeBottomHeight=_0x3feb92,this._shadowVolumeTopHeight=_0x11b5bb,"InstanceModel"===this._dataType&&(this.instanceSkeletonManager=new _0x13fd1b),this._level=e.level,this._refreshVolume=!1,this._useMercatorProject=u$Z(e.useMercatorProject,!1),this._groupNameBounds=e.groupNameBounds,this._skeletonSelectEnable=!1,this._lastSelectSkeletonId=-1,this._minTransparentAlpha=.1,this._maxTransparentAlpha=.98,this._selectRect=void 0,this._selectUpdate=!1,this._matSelectViewProj=new p$1d,this._useOIT=!0,this._partlyTransparent=!1,this._showLabel=!1,this._s3MTilesLabelStyle=new _0x3c2cd7,this._labelCollection=new g$W({scene:e.scene,isS3MTileLabels:!0,selectedColor:this._selectedColor}),this._scene=e.scene,this._transparentBackColor=u$Z(e.transparentBackColor,_0x1a71e8.DEFAULT_TRANSPARENT_BACK_COLOR),this._transparentBackColorTolerance=u$Z(e.transparentBackColorTolerance,_0x1a71e8.DEFAULT_TRANSPARENT_BACK_COLOR_TOLERANCE),this._shadowDarkness=.5,this._spatialQueryEnable=!1,this._spatialClipEnable=!1,this._sqTextures=[],this._sqViewMatirx=new p$1d,this._sqPrjMatirx=new p$1d,this._sqMode=j$Z.Disjoint,this._swipeRegion=new e$2c(0,0,1,1),this._swipeEnabled=!1,this._allObjsHide=!1,this._residentRootTile=!1,this._idFieldName=u$Z(e.idFieldName,"SmID"),this._imageryLayer=void 0,this._needCoverImageryLayer=!1,this._iconCollection=new w$O({scene:e.scene,style3D:this._style3D}),this._showIcon=u$Z(e.showIcon,!1),this._boundingSphereOffset=o$1p.ZERO,this._loadVolumeData=u$Z(e.loadVolumeData,!0),this._hasWireframe=!1,this._edgeStrokesTexture=void 0;var h=u$Z(e.subdomainConfig,{});this._subdomains=h.subdomains,this._subdomainsUrlScheme=h.urlScheme,this._isOverlapDisplayed=!1,this._iconRelatedTextLayerID=void 0,this._priorityScale=u$Z(e.priorityScale,1),this._blockCache=_0x24cbe4.getSingleInstance(),this._clippingType=R$L.KeepOutside,this._spatialQuery=void 0,this._pickObjs={},this._hasMixedContent=!1,this._backfaceCommands=[],this._excavateRegionCommands=new e$1Q,this._rasterPerFrame=!1,this._animationInfo={startTime:void 0,array:[],defers:void 0,duration:void 0,defaultInterpolation:void 0,done:!0},this._textureEmissionUnit=_0x3a711b.None,this._pbrParameter=Xe$e.NONE,this._maxSkipNum=256,this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,pixel:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,pixel:Number.MAX_VALUE},this._computeHeight=!1,this._polygonsTranslate={},this._maxSkipLevel=22,this._mipmapEnabled=!0,this._enableFusion=!1,this._floodFlagTexture=void 0,this._floodRect=void 0,this._matFloodInvertMatrix=p$1d.IDENTITY,this._heightScale=1,this._useRasterCull=!1,this._temporalCount=e$2e(e.temporalCount)?e.temporalCount:0,this._temporalSetting=void 0,this._translucencyByDistance=!1,this._overlapWeightAttributeName=void 0,this._heightRangeAttributeName=void 0,this.hasAttributeIndex=e.hasAttributeIndex,this._historicalRecord=e.historicalRecord,this._layerUBO=new _0x12db87(this),e$2e(this.waterEffectSet)&&(this._waterLayerUbo=new _0x44ae93(this)),this._fileType===p$T.PolylineEffect&&(this._polylineEffectUbo=new _0x8dd7b2(this)),this._fileType===p$T.RegionEffect&&(this._regionEffectUbo=new S3MRegionEffectUBO(this)),this._envMapIntensity=1,this._hasEmissiveTexAtlas=!1,this._hasSnowEffect=!1,this._hasRainEffect=!1};function _0x41fca9(e,t,i,n){for(var r={times:[],points:[],interpolations:[]},o=0,a=i.length;o<a;o++){var s=i[o],l=+s.slice(0,-1)/100*e.duration,u=n[s],c=u$Z(u.interpolationType,e.defaultInterpolation);(h=u[t])&&(r.times.push(l),r.points.push(h),r.interpolations.push(c))}var h=_0x309d2d(r=_0x1d520d(r),e,t);return e.array.push(h),r}function _0x1d520d(e){var t=e.interpolations,i=e.times,n=e.points;e=[];for(var r=0,o=t.length-1;r<o;r++)e.push({times:[i[r],i[r+1]],points:[n[r],n[r+1]],interpolationType:t[r]});return e}function _0x309d2d(e,t,i){for(var n=[],r=0,o=e.length;r<o;r++){var a=e[r];n.push(_0x1b1fa6(i,a.interpolationType,a.times,a.points))}return{type:i,splines:n}}function _0x1b1fa6(e,t,i,n){var r;if("rotation"===e)return n.forEach((function(e,t){n[t]=n$15.fromHeadingPitchRoll(e)})),new r$P({times:i,points:n});switch(t){case _0x301856.Linear:r=new r$Q({times:i,points:n});break;case _0x301856.Acceleration:r=new n$G({times:i,points:n,mode:0});break;case _0x301856.Deceleration:r=new n$G({times:i,points:n,mode:1});break;case _0x301856.CubicSpline:r=new c$L({times:i,points:n});break;case _0x301856.SmoothStep:r=new r$O({times:i,points:n});break;default:r=new r$Q({times:i,points:n})}return r}function _0x4724c3(e,t){!t||!e$2e(h$18.intersection(e.layerBounds,t.rectangle))||(t._rasterized=!1,_0x4724c3(e,t._southwestChild),_0x4724c3(e,t._southeastChild),_0x4724c3(e,t._northwestChild),_0x4724c3(e,t._northeastChild))}function _0x4f1f81(e){var t=0;e$2e(e.style3D)&&(t=e.style3D.bottomAltitude);var i=e.height+t;if(e._sceneMode===C$14.SCENE3D)if(e._fileType===p$T.ClampGroundRealtimeRasterCache)e._position=new o$1p(e.lon,e.lat,i),p$1d.fromTranslation(e._position,e._matModel);else{var n=o$1p.fromDegrees(e.lon,e.lat,i),r=o$1p.fromDegrees(e.lon,e.lat,e.height);e._position=n;var o=new i$16(e._heading,0,0);m$19.headingPitchRollToFixedFrame(n,o,t$12.WGS84,m$19.eastNorthUpToFixedFrame,e._matModel),m$19.headingPitchRollToFixedFrame(r,o,t$12.WGS84,m$19.eastNorthUpToFixedFrame,e._oriMatModel)}else if(e._fileType!==p$T.ClampGroundRealtimeRasterCache){if(e.lon>180||e.lon<-180||e.lat>180||e.lat<-180||e.positionUnits===_0x277a12.METER)if(e.useMercatorProject){var a=(u=new t$N).unproject(new o$1p(e.lon,e.lat,0));e._position=e._scene.camera._projection.project(a)}else{var s=e.lon,l=e.lat;s>20037508.342789244&&(o$1p.globalOffset.x=20037508.342789244*Math.floor(s/20037508.342789244),s-=o$1p.globalOffset.x),l>10018754.171394622&&(o$1p.globalOffset.y=20037508.342789244*Math.floor((l+10018754.171394622)/20037508.342789244),l-=o$1p.globalOffset.y),e._position=new o$1p(s,l,i)}else{var u=new n$1d;n=o$1p.fromDegrees(e.lon,e.lat,i),a=u.ellipsoid.cartesianToCartographic(n);e._position=u.project(a)}p$1d.fromTranslation(e._position,e._matModel),p$1d.multiply(_0x120895,e._matModel,e._matModel)}else e._position=new o$1p(e.lon,e.lat,i),p$1d.fromTranslation(e._position,e._matModel);e._style3D._dirty&&e$2e(e._layerScheduler)&&(e._layerScheduler._updateRootBoundingSphere(e._layerScheduler._oriRootEntities,e._matModel),e._style3D._dirty=!1),e$2e(e._layerScheduler)&&e._layerScheduler.traverseRenderEntity({},(function(t){!t._colorCommand||(t._colorCommand.modelMatrix=p$1d.multiply(e._matModel,t._geoMatrix,t._colorCommand.modelMatrix))}))}function _0x29597e(e,t){var i=e._hypsometricSetting;if(e$2e(i)){if(i._emissionTextureChanged){e$2e(i._emissionTextureAtlas)&&!i._emissionTextureAtlas.isDestroyed()&&i._emissionTextureAtlas.destroy(),i._emissionTextureAtlas=new v$I({context:t});var n={};n.layer=e,n.textureCount=1,e$2e(i._emissionTextureArray)&&i._emissionTextureArray.length>0?i._emissionTextureArray.map((function(t){i._emissionTextureAtlas.addImage(t.url,t.url).then((function(r){t.textureAtlasID=r,i._loadedEmissionTexture++,i._loadedEmissionTexture==i._emissionTextureArray.length&&(e._hasEmissiveTexAtlas=!0,n.enable=!0,n.textureCount=i._loadedEmissionTexture,e.traverseRenderEntity(n,_0x1030ef))}))})):(n.enable=!1,n.textureCount=0,e.traverseRenderEntity(n,_0x1030ef)),i._emissionTextureChanged=!1}}else e._hasEmissiveTexAtlas=!1}function _0x4d109b(e,t){e._manualShadowVolumeBottomHeight===_0x3feb92&&e._manualShadowVolumeTopHeight===_0x11b5bb?0===t.minTerrainHeight&&0===t.maxTerrainHeight?(e._shadowVolumeBottomHeight=_0x3feb92,e._shadowVolumeTopHeight=_0x11b5bb):(e._shadowVolumeBottomHeight=t.minTerrainHeight-10,e._shadowVolumeTopHeight=t.maxTerrainHeight+10):(e._shadowVolumeBottomHeight=e._manualShadowVolumeBottomHeight,e._shadowVolumeTopHeight=e._manualShadowVolumeTopHeight)}function _0xade8aa(e,t,i,n,r){var o=t$10.createIfNeeded(t).fetchImage().then((function(t){var o=new t$U({context:e,source:t,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.LINEAR_MIPMAP_LINEAR,magnificationFilter:tt$i.LINEAR}),generateMipmap:!0});!e$2d.isPowerOfTwo(o.width)||!e$2d.isPowerOfTwo(o.height)||o.generateMipmap(I$1e.NICEST),n[r]=o,i.readyTextureCount++})).otherwise((function(){i.pendingTextureCount--}));n[r]=o}function _0x137ce1(e){if(!e._animationInfo.done){var t=(Date.now()-e._animationInfo.startTime)/1e3;t>=e._animationInfo.duration&&(e._animationInfo.defer.resolve(),e._animationInfo.done=!0,t=e._animationInfo.duration);for(var i=0,n=e._animationInfo.array.length;i<n;i++){var r=e._animationInfo.array[i];_0x5f3498(e,r,t),_0x43306d(e,r,t),_0x43e23f(e,r,t)}e.traverseRenderEntity({},(function(e,t){e._modelMatrixDirty=!0})),_0x4b07f6(e)}}_0x1a71e8.DEFAULT_TRANSPARENT_BACK_COLOR=e$1X.BLACK,_0x1a71e8.DEFAULT_TRANSPARENT_BACK_COLOR_TOLERANCE=0,Object.defineProperties(_0x1a71e8.prototype,{overlapWeightAttributeName:{get:function(){return this._overlapWeightAttributeName},set:function(e){this._overlapWeightAttributeName=e}},heightRangeAttributeName:{get:function(){return this._heightRangeAttributeName},set:function(e){this._heightRangeAttributeName=e}},urlType:{get:function(){return this._urlType},set:function(e){this._urlType=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){o$1q.typeOf.number("min visible altitude",e),this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){o$1q.typeOf.number("max visible altitude",e),this._maxVisibleAltitude=e}},heading:{get:function(){return this._heading},set:function(e){o$1q.typeOf.number("heading",e),this._heading=e,this.initialize()}},lodRangeScale:{get:function(){return this._lodRangeScale},set:function(e){this._lodRangeScale=e}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){this._maximumScreenSpaceError=e}},priorityScale:{get:function(){return this._priorityScale},set:function(e){this._priorityScale=e}},customRequestHeaders:{get:function(){return this._layerScheduler._customRequestHeaders},set:function(e){this._layerScheduler._customRequestHeaders=e}},style3D:{get:function(){return this._style3D},set:function(e){e&&(this._style3D=e,this._style3D._owner=this,this._iconCollection.style3D=this._style3D)}},themeStyle:{get:function(){return this._styleEngine.style},set:function(e){var t=this;if(e$2e(this._queryFieldNames)||0!==t._layerScheduler._attributes._memoryCache){if(e$2e(t.themeStyle)&&e$2e(t.themeStyle.pbrMaterialIndex)){var i={enable:!0};i.layer=t,t.traverseRenderEntity(i,_0x5b4d78)}t._styleEngine.style=e}else t._layerScheduler._downloadAttributes().then((function(){if(t._styleEngine.style=e,e$2e(t.themeStyle)&&e$2e(t.themeStyle.pbrMaterialIndex)){var i={enable:!0};i.layer=t,t.traverseRenderEntity(i,_0x5b4d78)}}));this.traverseRenderEntity({},(function(e){e._themeDirty=!0}))}},wireFrameMode:{get:function(){return this._wireFrameType},set:function(e){if(e!==this._wireFrameType){if(e===_0x1d226a.Quad&&(e=_0x1d226a.EffectOutline),e===_0x1d226a.Sketch||this._wireFrameType===_0x1d226a.Sketch){var t={};t.edgeMode=e===_0x1d226a.Sketch?1:0,t.layer=this,this.traverseRenderEntity(t,_0x5ea874)}this._wireFrameType=e}}},visible:{get:function(){return this._visible},set:function(e){this._fileType===p$T.ClampGroundRealtimeRasterCache&&this._visible!=e&&this._layerScheduler.refreshRaster(this._frameState),this._visible=e}},dataMaxValue:{get:function(){return e$2e(this._hypMaxCategory)?this._hypMaxCategory:this._hypMaxHeight}},dataMinValue:{get:function(){return e$2e(this._hypMinCategory)?this._hypMinCategory:this._hypMinHeight}},ColorDictTableMode:{set:function(e){this._hypUseColorByHeight=e}},hypsometricSetting:{get:function(){return LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_hypsometricSetting"),{hypsometricSetting:this._hypsometricSetting,analysisMode:this._hypAnalysisMode}},set:function(e){LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_hypsometricSetting"),this._bUseHypColorTable=!1,this._hypsometricRegionUpdate=!0,e$2e(this._hypsometricRegion)&&(this._hypsometricRegion.destroy(),this._hypsometricRegion=null),e$2e(this._hypsometricRenderTexture)||(this._hypsometricRenderTexture=new t$U({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$12.RGBA})),e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:this._context,width:1024,height:64,pixelFormat:V$12.RGBA,flipY:!1}));var t={};if(t.layer=this,!e$2e(e)||!e$2e(e.hypsometricSetting))return e$2e(this._hypsometricSetting)&&(this._hypsometricSetting.destroy(),this._hypsometricSetting=void 0),void this.traverseRenderEntity(t,_0xbff5a0);if(this._hypAnalysisMode=e.analysisMode||this._hypAnalysisMode,this._hypsometricSetting=u$L.clone(e.hypsometricSetting,this._hypsometricSetting),this._hypsometricSetting._emissionTextureChanged=!0,e$2e(this._hypsometricSetting.ColorTable)&&(this._hypsometricSetting.ColorTable.generateBuffer(),e$2e(this._hypsometricTexture)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer})),this._hypAnalysisMode!==k$S.AnalysisRegionMode.ARM_NONE?(this._bUseHypColorTable=!0,this.traverseRenderEntity(t,_0xc784ce)):this.traverseRenderEntity(t,_0xbff5a0),this._hypsometricSetting.UpdatePolygonRegion&&this._hypAnalysisMode===k$S.AnalysisRegionMode.ARM_REGION&&this._hypsometricSetting.CoverageArea.length>0){var i=this._hypsometricSetting.CoverageArea,n=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),r=U$18.createGeometry(n),o=new p$1d;p$1d.inverse(this._matModel,o),f$Z.updateGeometry(r,i,o,this._frameState.mode===C$14.COLUMBUS_VIEW);var a=f$Z.updateGeoBounds(r),s=.01*(a.z-a.x);a.w,a.y,this._hypsometricRegion=new f$Z,this._hypsometricRegion._geometry=r,this._hypsometricRegion._bounds.x=a.x-s,this._hypsometricRegion._bounds.y=a.y-s,this._hypsometricRegion._bounds.z=a.z+s,this._hypsometricRegion._bounds.w=a.w+s,e$2c.clone(this._hypsometricRegion._bounds,this._hypsometricBound)}this._bVolume||this._colorTableChanged.raiseEvent()}},multiTemporalUseWater:{get:function(){return this._MultiTemporalUseWater},set:function(e){this._MultiTemporalUseWater=e,e$2e(this._waterLayerUbo)||(this._waterLayerUbo=new _0x44ae93(this)),this._waterParameter=new h$J}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e}},LoadingMode:{get:function(){return this._nLoadingMode},set:function(e){this._nLoadingMode=e}},LoadingPriority:{get:function(){return e$2e(this._layerScheduler)?this._layerScheduler.LoadingPriority:_0x539352.Child_Priority},set:function(e){e$2e(this._layerScheduler)&&(this._layerScheduler.LoadingPriority=e)}},bReleaseColor:{get:function(){return this._bReleaseColor},set:function(e){this._bReleaseColor=e}},ignoreNormal:{get:function(){return this._ignoreNormal},set:function(e){this._ignoreNormal!==e&&(this._ignoreNormal=e,this.refresh())}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){this._visibleDistanceMax=e}},visibleDistanceMin:{get:function(){return this._visibleDistanceMin},set:function(e){this._visibleDistanceMin=e}},clipLineColor:{get:function(){return new e$1X(this._clipLineColor.x,this._clipLineColor.y,this._clipLineColor.z,this._clipLineColor.w)},set:function(e){e instanceof e$1X&&(this._clipLineColor=new e$2c(e.red,e.green,e.blue,e.alpha))}},clipPlaneColor:{get:function(){return new e$1X(this._clipPlaneColor.x,this._clipPlaneColor.y,this._clipPlaneColor.z,this._clipPlaneColor.w)},set:function(e){e instanceof e$1X&&(this._clipPlaneColor=new e$2c(e.red,e.green,e.blue,e.alpha))}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this.updateShadow())}},horizontalline:{get:function(){return this._fHorizontalLine},set:function(e){this._fHorizontalLine=e}},horizontalColor:{get:function(){return new e$1X(this._HorizontalColor.x,this._HorizontalColor.y,this._HorizontalColor.z,this._HorizontalColor.w)},set:function(e){e instanceof e$1X&&(this._HorizontalColor=new e$2c(e.red,e.green,e.blue,e.alpha))}},hasLight:{get:function(){return this._hasLight},set:function(e){if(e$2e(e)){this._hasLight=e;var t={};t.layer=this,t.enable=e,this.traverseRenderEntity(t,_0x50a49b)}}},cullEnabled:{get:function(){return this._cullEnabled},set:function(e){this.cullMode=e?W$13.COUNTER_CLOCKWISE:W$13.NONE}},cullMode:{get:function(){return this._cullMode},set:function(e){this._cullMode=e;var t=d$1m.getState(this._rsColor);t.cull.enabled=e!==W$13.NONE,t.frontFace=e!==W$13.NONE?e:W$13.COUNTER_CLOCKWISE,this._rsColor=d$1m.fromCache(t)}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){this._enableDepthTest=e;var t=d$1m.getState(this._rsColor);t.depthTest.enabled=e,this._rsColor=d$1m.fromCache(t)}},selectColorType:{get:function(){return this._selectColorType},set:function(e){if(this._selectColorType!==e){this._selectColorType=e,this.isSilhouette()?this._context.numNormalAndDepthObject++:(this._context.numNormalAndDepthObject--,this._context.numNormalAndDepthObject=Math.max(this._context.numNormalAndDepthObject,0));var t={};t.layer=this,t.selectColorType=e,this.traverseRenderEntity(t,_0x1cc863)}}},mixColorType:{get:function(){return this._mixColorType},set:function(e){if(this._mixColorType!==e){this._mixColorType=e;var t={layer:this,mixColorType:e};this.traverseRenderEntity(t,_0x72a589)}}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},groupName:{get:function(){return this._groupName}},selectEnabled:{get:function(){return this._selectEnabled},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._selectEnabled=e}},enableHighlight:{get:function(){return this._enableHighlight},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._enableHighlight=e}},skeletonSelectEnable:{get:function(){return this._skeletonSelectEnable},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._skeletonSelectEnable=e,this.refresh()}},selectedColor:{get:function(){return this._selectedColor},set:function(e){o$1q.defined("selectedColor value",e),this._selectedColor=e$1X.clone(e),this._labelCollection.selectedColor=e$1X.clone(e)}},selectedLineColor:{get:function(){return this._selectedLineColor},set:function(e){o$1q.defined("selectedColor value",e),this._selectedLineColor=e$1X.clone(e)}},skeletonSelectedColor:{get:function(){return this._skeletonSelectedColor},set:function(e){o$1q.defined("skeletonSelectedColor value",e),this._skeletonSelectedColor=e$1X.clone(e)}},selectedSkeletonId:{get:function(){return this._lastSelectSkeletonId},set:function(e){o$1q.defined("selectSkeletonId value",e),this._lastSelectSkeletonId=e}},multiChoose:{get:function(){return this._multiChoose},set:function(e){o$1q.defined("multiChoose",e),o$1q.typeOf.bool("multiChoose",e),this._multiChoose=e}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x54ab03)}},contrast:{get:function(){return this._contrast},set:function(e){this._contrast=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x54ab03)}},hue:{get:function(){return this._hue},set:function(e){this._hue=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x54ab03)}},saturation:{get:function(){return this._saturation},set:function(e){this._saturation=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x54ab03)}},gamma:{get:function(){return this._gamma},set:function(e){this._gamma=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x54ab03)}},transparentBackColor:{get:function(){return this._transparentBackColor},set:function(e){if(this._transparentBackColor!==e){this._transparentBackColor=e;var t={};t.layer=this,this.traverseRenderEntity(t,_0x3020ee)}}},transparentBackColorTolerance:{get:function(){return this._transparentBackColorTolerance},set:function(e){if(this._transparentBackColorTolerance!==e){this._transparentBackColorTolerance=e;var t={};t.layer=this,0===this._transparentBackColorTolerance?this.traverseRenderEntity(t,_0x599bbd):this.traverseRenderEntity(t,_0x3020ee)}}},volName:{get:function(){return this._volName},set:function(e){for(var t=0;t<this._volNames.length;t++)this._volNames[t]==e&&(this._volName=e,this._fMaxValue=this._maxVolumeValues[t],this._fMinValue=this._minVolumeValues[t],this._strVolumeExt=this._strVolumeExts[t],this.refreshVolume())}},coverImageryLayer:{get:function(){return this._imageryLayer},set:function(e){if(e$2e(e))if(e$2e(this._imageryLayer)){!(this._imageryLayer instanceof Array)&&!this._imageryLayer.show&&this._layerScheduler._hideImage(),this._imageryLayer=e;var t=this;if(this._imageryLayer instanceof Array){for(var i=[],n=0;n<this._imageryLayer.length;n++)i.push(this._imageryLayer[n]._imageryProvider._readyPromise);t._layerScheduler._stopLoadImagery=!0,Promise.all(i).then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1}))}else t._layerScheduler._stopLoadImagery=!0,this._imageryLayer._imageryProvider._readyPromise.then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1}))}else{if(!this._needCoverImageryLayer)return this.refresh(),this._imageryLayer=e,void(this._needCoverImageryLayer=!0);var r=!1;e$2e(this._imageryLayer)||(r=!0),this._imageryLayer=e;t=this;if(this._imageryLayer instanceof Array){for(i=[],n=0;n<this._imageryLayer.length;n++)i.push(this._imageryLayer[n]._imageryProvider._readyPromise);t._layerScheduler._stopLoadImagery=!0,Promise.all(i).then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1,r&&t._updateCoverImageryLayer(!1)}))}else t._layerScheduler._stopLoadImagery=!0,this._imageryLayer._imageryProvider._readyPromise.then((function(){t._layerScheduler._refreshImage(),t._layerScheduler._stopLoadImagery=!1,r&&t._updateCoverImageryLayer(!1)}));this._needCoverImageryLayer=!0}else e$2e(this._imageryLayer)&&(this._updateCoverImageryLayer(!0),this._imageryLayer=void 0,this._needCoverImageryLayer=!1)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){if(o$1q.typeOf.number("splitDirection",e),this._splitDirection!==e){this._splitDirection=e;var t={layer:this,enableSplit:e!==_0x2d4a08.NONE};this.traverseRenderEntity(t,_0x26857d)}}},splitPosition:{get:function(){return this._splitPosition},set:function(e){o$1q.typeOf.number("splitPosition",e),this._splitPosition=e}},selectionFiltrateByTransparency:{get:function(){return this._selectionFiltrateByTransparency},set:function(e){o$1q.typeOf.number("selectionFiltrateByTransparency value",e),this._selectionFiltrateByTransparency=e}},effect:{get:function(){return this._effect},set:function(e){this._effect=e}},bloomEffect:{get:function(){return e$2e(this._bloomEffect)||(this._bloomEffect=new _0x37a6f4),this._bloomEffect}},bloomEnable:{get:function(){return!!e$2e(this._bloomEffect)&&this._bloomEffect.enable}},selectedTranslate:{get:function(){return this._selectedTranslate},set:function(e){o$1q.typeOf.object("selected translate",e),!o$1p.equals(e,this._selectedTranslate)&&(this._selectedTranslate=e)}},clearMemoryImmediately:{get:function(){return this._clearMemoryImmediately},set:function(e){this._clearMemoryImmediately=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMemoryUsage=e}},PBRMaterialType:{get:function(){return this._PBRMaterialType},set:function(e){if(this._PBRMaterialType!==e){this._PBRMaterialType=e;var t=_0x3b1e53.getMaterial(e),i=this;e$2e(this._pbrMetalTexture)&&(this._pbrMetalTexture.destroy(),this._pbrMetalTexture=null),e$2e(this._pbrRoughTexture)&&(this._pbrRoughTexture.destroy(),this._pbrRoughTexture=null),o$1l(t$S(t.metalTextureUrl),(function(e){i._pbrMetalTexture=new t$U({context:i._frameState.context,source:e,pixelFormat:V$12.LUMINANCE,pixelDatatype:_$_.UNSIGNED_BYTE})})),o$1l(t$S(t.roughTextureUrl),(function(e){i._pbrRoughTexture=new t$U({context:i._frameState.context,source:e,pixelFormat:V$12.LUMINANCE,pixelDatatype:_$_.UNSIGNED_BYTE})}));var n={};n.layer=this,n.PBRType=e,this.traverseRenderEntity(n,_0x4fa236)}}},PBRMetallic:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.metallicFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.metallicFactor=e}},PBRRoughness:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.roughnessFactor=e}},emissiveFactor:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.emissiveFactor=e}},rainEffect:{get:function(){return this._PBRMaterialParams.pbrMetallicRoughness.rainEffect},set:function(e){this._PBRMaterialParams.pbrMetallicRoughness.rainEffect=e}},textureUVSpeed:{get:function(){return this._textureUVSpeed},set:function(e){o$1q.typeOf.object("textureUVSpeed value",e),o$1o.clone(e,this._textureUVSpeed);var t={};t.layer=this,t.enable=0!==this._textureUVSpeed.x||0!==this._textureUVSpeed.y,this.traverseRenderEntity(t,_0x2c2177)}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){if(e$2e(window.Proxy)){var t=this;if(e$2e(e)&&"boolean"==typeof e.isGeoTilesSave&&"boolean"==typeof e.isAttributesSave&&"boolean"==typeof e.isGeoTilesRootNodeSave){(i={}).isGeoTilesSave=e.isGeoTilesSave,i.isAttributesSave=e.isAttributesSave,i.isGeoTilesRootNodeSave=e.isGeoTilesRootNodeSave,i.clear=function(){t._layerScheduler._clearIndexedDBCache()};var i={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1,clear:function(){t._layerScheduler._clearIndexedDBCache()}};this._indexedDBSetting=new Proxy(i,{get:function(e,t){return e[t]},set:function(e,i,n){"isAttributesSave"===i&&!1===e.isAttributesSave&&!0===n&&(e$2e(t._layerScheduler._indexedDBScheduler)?t._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}),(function(){0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()})):t._layerScheduler._dpPromise.then((function(){t._layerScheduler._indexedDBScheduler.getElementFromDB("attributes","saved").then((function(e){!e&&0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}),(function(){0==t._layerScheduler._attributes._memoryCache&&t._layerScheduler._requestAllScvd()}))}))),e[i]=n}}),this._layerScheduler._indexedDBSetting=this._indexedDBSetting}}else this._indexedDBSetting={isAttributesSave:!1,isGeoTilesSave:!1,isGeoTilesRootNodeSave:!1},this._layerScheduler._indexedDBSetting=this._indexedDBSetting}},pointCloudShading:{get:function(){return this._pointCloudShading}},shadowVolumeTopHeight:{get:function(){return this._manualShadowVolumeTopHeight},set:function(e){this._manualShadowVolumeTopHeight=e}},shadowVolumeBottomHeight:{get:function(){return this._manualShadowVolumeBottomHeight},set:function(e){this._manualShadowVolumeBottomHeight=e}},triangleFiltratePixel:{get:function(){return this._triangleFiltratePixel},set:function(e){var t=parseFloat(e),i=this._triangleFiltratePixel>0,n=t>0;if(this._triangleFiltratePixel=t,this._vertexWeightMode===_0x132759.EdgeLengthMin&&i!=n){var r={};r.layer=this,r.enable=n,this.traverseRenderEntity(r,_0x2c542a)}}},useMercatorProject:{get:function(){return this._useMercatorProject},set:function(e){this._useMercatorProject=e,this.refresh()}},minTransparentAlpha:{get:function(){return this._minTransparentAlpha},set:function(e){this._minTransparentAlpha=e}},maxTransparentAlpha:{get:function(){return this._maxTransparentAlpha},set:function(e){this._maxTransparentAlpha=e}},selectBound:{get:function(){return this._selectRect},set:function(e){this._selectRect=e,this._selectUpdate=!0,this._selectEnabled=!0}},S3MTileLoadedEvent:{get:function(){return this._S3MTileLoadedEvent}},attributeDownloaded:{get:function(){return this._attributeDownloaded}},allTilesLoaded:{get:function(){return this._allTilesLoaded}},prepareLoadEvent:{get:function(){return this._prepareLoadEvent}},prepareLoadDataSize:{get:function(){return this._prepareLoadSize},set:function(e){o$1q.typeOf.number("value",e),e>0&&(this._prepareLoadSize=e,e$2e(this._prepareLoadEvent)||(this._prepareLoadEvent=new o$1h),this._layerScheduler._prepareLoaded=!1)}},colorTableChanged:{get:function(){return this._colorTableChanged}},receiveObjectClamp:{get:function(){return this._receiveObjectClamp},set:function(e){this._receiveObjectClamp=e;var t=d$1m.getState(this._rsColor);t.stencilTest=_0x45bcf8.createReceiveClampObjectStencilTest(e),this._rsColor=d$1m.fromCache(t)}},orderIndependentTranslucency:{get:function(){return this._useOIT},set:function(e){o$1q.typeOf.bool("value",e),this._useOIT=e}},partlyTransparent:{get:function(){return this._partlyTransparent},set:function(e){o$1q.typeOf.bool("value",e),this._partlyTransparent=e}},showLabel:{get:function(){return this._showLabel},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._showLabel=e,this._showLabel&&0===Object.keys(this._layerScheduler._attributes).length&&this._layerScheduler._requestAllScvd()}},labelStyle:{get:function(){return this._s3MTilesLabelStyle},set:function(e){o$1q.defined("value",e),(this._s3MTilesLabelStyle._textFieldChanged||e$2e(e._textField)&&this._s3MTilesLabelStyle._textField!==e._textField)&&this._labelCollection.removeAll(),this._s3MTilesLabelStyle=e,e$2e(this._labelCollection)&&this._labelCollection.setLabelStyle(this._s3MTilesLabelStyle)}},swipeRegion:{get:function(){return new f$1a(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2e(e)){if(!(e instanceof f$1a))throw new t$15("swipeRegion must be a instance of BoundingRectangle.");e$2c.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?this.splitDirection=_0x2d4a08.NONE:e$2c.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e,this.traverseRenderEntity({layer:this,enableSwipe:e},_0x543584))}},allObjsHide:{get:function(){return this._allObjsHide}},residentRootTile:{get:function(){return this._residentRootTile},set:function(e){o$1q.typeOf.bool("residentRootTile",e),this._residentRootTile=e}},idFieldName:{get:function(){return this._idFieldName}},loadVolumeData:{get:function(){return this._loadVolumeData},set:function(e){this._loadVolumeData=e}},showIcon:{get:function(){return this._showIcon},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._showIcon=e}},showCallout:{get:function(){return this._iconCollection.showCallout},set:function(e){o$1q.defined("value",e),o$1q.typeOf.bool("value",e),this._iconCollection.showCallout=e}},waterParameter:{get:function(){return this._waterParameter&&this._waterParameter}},attributeFieldNames:{get:function(){return e$2e(this._fieldsInfo)?Object.keys(this._fieldsInfo._hash):void 0}},queryFieldNames:{get:function(){return this._queryFieldNames},set:function(e){if(e$2e(this._queryFieldNames)&&this._queryFieldNames.sort().toString()!==e.sort().toString())for(var t=e.filter((e=>!this._queryFieldNames.includes(e))),i=this._layerScheduler,n=0;n<i._rootEntities.length;n++){var r=i._rootEntities[n];r._attrAppend=t,r.attrLoadState=N$Q.UNLOAD}this._queryFieldNames=e}},hasWireframe:{get:function(){return this._hasWireframe}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2e(e)&&!e$2e(e.length))throw new t$15("Excepted S3MTilesLayer.subdomains to be type of Array.");this._subdomains=e}},iconRelatedTextLayerID:{get:function(){return this._iconRelatedTextLayerID},set:function(e){if(typeof e<"u"&&"number"!=typeof e)throw new t$15("Excepted S3MTilesLayer.iconRelatedTextLayerID to be type of number or undefined");this._iconRelatedTextLayerID=e}},isOverlapDisplayed:{get:function(){return this._isOverlapDisplayed},set:function(e){o$1q.typeOf.bool("isOverlapDisplayed",e),this._isOverlapDisplayed=e,this._isOverlapDisplayed?this.setOnlyObjsVisible([],!1,!0,!0):this.setOnlyObjsVisible([],!0,!1)}},clippingType:{get:function(){return this._clippingType},set:function(e){o$1q.defined("clipping type",e),this._clippingType=e,e$2e(this._spatialQuery)&&(this._spatialQuery.positionMode=_0x243acb(e))}},rasterPerFrame:{get:function(){return this._rasterPerFrame&&this._fileType===p$T.ClampGroundRealtimeRasterCache},set:function(e){o$1q.typeOf.bool("rasterPerFrame",e),this._rasterPerFrame=e}},RGBTOBGR:{get:function(){return this._RGBTOBGR},set:function(e){o$1q.typeOf.bool("RGBTOBGR",e),this._RGBTOBGR=e}},textureEmissionUnit:{get:function(){return this._textureEmissionUnit},set:function(e){this._textureEmissionUnit=e}},computeHeight:{get:function(){return this._computeHeight},set:function(e){this._computeHeight=e}},mipmapEnabled:{get:function(){return this._mipmapEnabled},set:function(e){this._mipmapEnabled=e}},enableFusion:{get:function(){return this._enableFusion},set:function(e){e!==this._enableFusion&&(this._enableFusion=e,this.traverseRenderEntity({enable:e,layer:this},_0x333d89))}},heightScale:{get:function(){return this._heightScale},set:function(e){if(e!==this._heightScale){e=Math.max(e,1e-5),this._heightScale=e;var t=p$1d.fromScale(new o$1p(1,1,e),new p$1d);this.traverseRenderEntity({scaleMatrix:t,layerMatrix:this._matModel},_0x4d4de9)}}},temporalCount:{get:function(){return this._temporalCount}},temporalSetting:{get:function(){return this._temporalSetting},set:function(e){this._temporalSetting=e}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=e}}}),_0x1a71e8.prototype.initialize=function(){_0x4f1f81(this);var e,t=this._fileType,i=_0x45bcf8.createClampGroundStencilRenderState();if(t===p$T.ClampGroundLine||t===p$T.ClampGroundPolygon||t===p$T.ExtendClampPolygonCache?(e=_0x45bcf8.createClampGroundColorRenderState(),i=_0x45bcf8.createClampGroundStencilRenderState()):t===p$T.ClampObjectPolygon||t===p$T.ClampObjectLine?(e=_0x45bcf8.createClampObjectColorRenderState(),i=_0x45bcf8.createClampObjectStencilRenderState()):t===p$T.ClampGroundAndObjectLineCache?e=_0x45bcf8.createClampGroundAndObjectLineRenderState():(e=_0x45bcf8.createNormalColorRenderState(this.cullMode)).stencilTest=_0x45bcf8.createReceiveClampObjectStencilTest(this._receiveObjectClamp),e$2e(this._polygonOffsetConfig)&&!0===this._polygonOffsetConfig.enabled&&(e.polygonOffset=this._polygonOffsetConfig),this._rsColor=d$1m.fromCache(e),this._rsClampColor=d$1m.fromCache(_0x45bcf8.createClampGroundColorRenderState()),this._rsClampLineColor=d$1m.fromCache(_0x45bcf8.createClampGroundAndObjectLineRenderState()),this._rsStencil=d$1m.fromCache(i),e$2e(this.waterEffectSet)&&!e$2e(this._waterParameter)){this._waterPlanes=new e$1Q,this._waterParameter=new h$J;for(var n=0;n<this.waterEffectSet[0].gpuProgramParameters.length;n++){for(var r=this.waterEffectSet[0].gpuProgramParameters[n],o=0;o<r.atuoConstants.length;o++){var a=r.atuoConstants[o];if("timeVal"===a.name){this._waterParameter[a.name]=a.fData;break}}for(o=0;o<r.gpuConstants.length;o++){var s=r.gpuConstants[o],l=null;switch(s.arraySize){case 1:l=s.arrayFloat[0];break;case 2:l=new o$1o,o$1o.unpack(s.arrayFloat,0,l);break;case 3:l=new o$1p,o$1p.unpack(s.arrayFloat,0,l);break;case 4:l=new e$2c,e$2c.unpack(s.arrayFloat,0,l)}if(!e$2e(l))continue;let e=s.name;if("bumpSpeed"===e){let e=l.x,t=l.y;this._waterParameter.waveDirection=180*Math.atan2(e,t)/Math.PI+180,this._waterParameter.speed=o$1o.magnitude(new o$1o(e,t))}else"scale"===e?this._waterParameter.waveScale=l:"noiseScale"===e?this._waterParameter.noiseStrength=l:"waterColour"===e?this._waterParameter.color=e$1X.fromCartesian4(l):"waterBrightness"===e?this._waterParameter.brightness=l:this._waterParameter[s.name]=l}}}this._computeLayerModelBounds()},_0x1a71e8.prototype._updateCoverImageryLayer=function(e){for(var t=this._layerScheduler,i=[],n=0;n<t._rootEntities.length;n++){var r=t._rootEntities[n];i.push(r)}for(var o,a={layer:this};o=i.pop();)for(var s=0;s<o._childrenPageLod.length;s++){for(var l=o._childrenPageLod[s]._renderEntityList,u=l.length,c=0;c<u;c++)e?(l[c]._imagerys=void 0,l[c].removeProgramDefineForCommand(l[c]._colorCommand,a,!0,!0,"IMAGERY"),l[c]._imageRasterFinish=!1,l[c]._imageryLevels=[],l[c].destroyScaleImagerys()):l[c].appendProgramDefineForCommand(l[c]._colorCommand,a,!0,!0,"IMAGERY");o._childrenPageLod[s]._entity&&i.push(o._childrenPageLod[s]._entity)}},_0x1a71e8.prototype.appendQueryFieldName=function(e){e$2e(e.length)||new t$15("Expected value to be type of Array");for(var t=this._queryFieldNames,i=[],n=0,r=e.length;n<r;n++){var o=e[n];-1===t.indexOf(o)&&i.push(o)}if(0===i.length)return o$1l.resolve();this._queryFieldNames=i;var a=this;return o$1l.all(this._layerScheduler.appendQueryFieldName(this)).then((function(){a._queryFieldNames=t.concat(i)}))},_0x1a71e8.prototype.getPointCloudClassificationInfos=function(){if(e$2e(this._pointCloudClassificationInfos))return this._pointCloudClassificationInfos;if(this._isS3MB){var e=u$P(i=new h$16("./attribute.json").resolve(this._baseUri).toString()),t=this;return e.then((function(e){var i=[];if(!e$2e(e.classificationInfos))return t._pointCloudClassificationInfos=i,i;for(var n=0,r=e.classificationInfos.length;n<r;n++){var o=e.classificationInfos[n].id,a=e.classificationInfos[n].name,s=e.classificationInfos[n].pointCount;i.push(new _0x2226fe(o,a,s))}return t._pointCloudClassificationInfos=i,i})).otherwise((function(e){console.log(e)}))}var i=new h$16("./indexData.dat").resolve(this._baseUri).toString();e$2e(a$O.CREDENTIAL)&&(i=a$O.addToken(i));e=d$1f(i),t=this;return e.then((function(e){for(var i=e.firstChild,n=i.namespaceURI,r=s$T.queryNodes(i,"PointCloudClassification",n),o=[],a=0,s=r.length;a<s;a++){var l=r[a],u=s$T.queryStringAttribute(l,"ID"),c=s$T.queryStringAttribute(l,"Name"),h=s$T.queryNumericAttribute(l,"PointCounts");o.push(new _0x2226fe(u,c,h))}return t._pointCloudClassificationInfos=o,o})).otherwise((function(e){console.log(e)}))},_0x1a71e8.prototype.setPolygonoffset=function(e,t){if(this._rsColor._applyFunctions.length=0,this._rsColor.polygonOffset.factor!==e||this._rsColor.polygonOffset.units!==t){var i=d$1m.getState(this._rsColor);i.polygonOffset={enabled:!0,factor:u$Z(e,0),units:u$Z(t,0)},this._rsColor=d$1m.fromCache(i)}},_0x1a71e8.prototype.getVolNames=function(){return this._volNames},_0x1a71e8.prototype.setQueryParameter=function(e){if(!e$2e((e=e||{}).url))throw new t$15("options.url is required!");if(!e$2e(e.dataSourceName))throw new t$15("options.dataSourceName is required!");if(!e$2e(e.dataSetName)&&!0!==e.isMerge)throw new t$15("options.dataSetName is required or isMerge must be true!");if(e.keyWord=u$Z(e.keyWord,"SmID"),e.hasGeometry=u$Z(e.hasGeometry,!1),this.queryParameter=l$1f(e),!e$2e(this.queryParameter.dataSetName)&&1==this.queryParameter.isMerge){var t=this;this.datasetInfo().then((function(e){t.queryParameter.datasetList=e}))}},_0x1a71e8.prototype.getQueryParameter=function(){return this.queryParameter},_0x1a71e8.prototype.datasetInfo=function(){var e=o$1l.defer();if(this._isS3MB){var t=this._baseUri+"attribute.json";e$2e(a$O.CREDENTIAL)&&(t=a$O.addToken(t)),u$P(t).then((function(t){for(var i=t.layerInfos,n=new Array,r=0;r<i.length;r++){var o=i[r],a={};a.datasetName=o.layerName,a.startID=parseInt(o.idRange.minID),a.endID=parseInt(o.idRange.maxID),n.push(a)}e.resolve(n)}))}else{var i=this._baseUri+"indexData.dat";e$2e(a$O.CREDENTIAL)&&(i=a$O.addToken(i));e=o$1l.defer();o$1l(d$1f(i),(function(t){for(var i=s$T.getElementsByTagNameNS(t,"*","DatasetName"),n=s$T.getElementsByTagNameNS(t,"*","DatasetIDRange"),r=new Array,o=0;o<i.length;o++){var a={};a.datasetName=i[o].innerHTML;var s=n[o].innerHTML,l=s.indexOf("_");a.startID=parseInt(s.substr(0,l)),a.endID=parseInt(s.substr(l+1,s.length-l-1)),r.push(a)}e.resolve(r)}))}return e.promise},_0x1a71e8.prototype.getLodRangeScale=function(){return this._lodRangeScale},_0x1a71e8.prototype.setAnimation=function(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.keyframes",e.keyframes),o$1q.typeOf.number.greaterThan("options.duration",e.duration,0);var t=e.keyframes,i=e.duration,n=e.interpolationType;if("0%"in t){var r=t["0%"];r.scale=u$Z(r.scale,new o$1p(1,1,1)),r.rotation=u$Z(r.rotation,new i$16(this._heading,0,0)),r.translation=u$Z(r.translation,o$1p.fromDegrees(this.lon,this.lat,this.style3D.bottomAltitude))}else t["0%"]={translation:o$1p.fromDegrees(this.lon,this.lat,this.style3D.bottomAltitude),scale:new o$1p(1,1,1),rotation:new i$16(this._heading,0,0)};var o=Object.keys(t);return(o=o.filter((function(e){return"%"===e[e.length-1]}))).sort((function(e,t){return(e=+e.slice(0,-1))-(t=+t.slice(0,-1))})),this._animationInfo={startTime:Date.now(),array:[],duration:i,defer:o$1l.defer(),defaultInterpolation:u$Z(n,_0x301856.Linear),done:!1},_0x41fca9(this._animationInfo,"rotation",o,t),_0x41fca9(this._animationInfo,"scale",o,t),_0x41fca9(this._animationInfo,"translation",o,t),this._animationInfo.defer},_0x1a71e8.prototype.setLodRangeScale=function(e){this._lodRangeScale=e},_0x1a71e8.prototype.refreshRaster=function(){if(e$2e(this._frameState)){var e=this._frameState._quadtree._levelZeroTiles;e[0]&&_0x4724c3(this,e[0]),e[1]&&_0x4724c3(this,e[1])}},_0x1a71e8.prototype._isNeedUpdate=function(e,t){return!(!e$2e(e)||!e$2e(t)||!this._visible||(e$2e(this.waterEffectSet)||this.multiTemporalUseWater)&&t._fboState.enabled&&"water"===t._fboState.name)},_0x1a71e8.prototype._loadMaterialTexture=function(e,t){e.loadingTexture=!0;var i=e.pbrMetallicRoughness,n=e.textureunitstates,r=i.baseColorTextureIndex;e$2e(e.pendingTextureCount)||(e.pendingTextureCount=0),e$2e(e.readyTextureCount)||(e.readyTextureCount=0);var o=this._context,a=e$2e(t)?t:this._baseUri+this._materialRelativePath;r>-1&&!e$2e(i.baseColorTexture)&&(_0xade8aa(o,a+n[r].textureunitstate.url,e,e.pbrMetallicRoughness,"baseColorTexture"),e.pendingTextureCount++);var s=i.emissiveTextureIndex;s>-1&&!e$2e(i.emissiveTexture)&&(_0xade8aa(o,a+n[s].textureunitstate.url,e,e.pbrMetallicRoughness,"emissiveTexture"),e.pendingTextureCount++);var l=i.normalTextureIndex;l>-1&&!e$2e(i.normalTexture)&&(_0xade8aa(o,a+n[l].textureunitstate.url,e,e.pbrMetallicRoughness,"normalTexture"),e.pendingTextureCount++);var u=i.metallicRoughnessTextureIndex;u>-1&&!e$2e(i.metallicRoughnessTexture)&&(_0xade8aa(o,a+n[u].textureunitstate.url,e,e.pbrMetallicRoughness,"metallicRoughnessTexture"),e.pendingTextureCount++);var c=i.occlusionTextureIndex;c>-1&&!e$2e(i.occlusionTexture)&&(_0xade8aa(o,a+n[c].textureunitstate.url,e,e.pbrMetallicRoughness,"occlusionTexture"),e.pendingTextureCount++)},_0x1a71e8.prototype._loadMaterial=function(e,t,i){var n=this;t$10.createIfNeeded(e).fetchJson().then((function(e){if(e$2e(n._materialMap)||(n._materialMap={}),e.material.ready=!1,e$2e(i)&&e.material.textureunitstates.length>0){var r=e.material.textureunitstates[0].textureunitstate.texmodmatrix,o=p$1d.unpack(r),a=new o$1p(i.ScaleU,i.ScaleV,1);p$1d.fromScale(a,o),p$1d.pack(o,r)}n._materialMap[t]=e,n.readyMaterialCount++}))},_0x1a71e8.prototype._loadMaterialMap=function(e){if(e$2e(this._materialMapInfo)){this.readyMaterialCount=0;for(var t=0,i=this._materialMapInfo.length;t<i;t++){var n=this._materialMapInfo[t],r=this._baseUri+this._materialRelativePath+n.AssociateMaterial+".json";this._loadMaterial(r,n.OriginalMaterial,n.UVTransformation)}this.pendingMaterialCount=this._materialMapInfo.length,this._materialMapInfo=void 0}if(e$2e(this._materialMap)&&this.pendingMaterialCount===this.readyMaterialCount){var o=!0;for(var a in this._materialMap)if(this._materialMap.hasOwnProperty(a)){var s=this._materialMap[a].material;s.loadingTexture||this._loadMaterialTexture(s),s.pendingTextureCount===s.readyTextureCount&&(s.ready=!0),o=o&&s.ready}this._materialMapReady=o}if(!e$2e(this._associateMaterialPromise)){var l=this,u=e.lastIndexOf("/");this._materialRelativePath=e.substring(0,u+1),e=this._baseUri+e;var c=t$10.createIfNeeded(e);this._associateMaterialPromise=c.fetchJson().then((function(e){l._materialMapInfo=e.Scenes[0].Layers[0].Materials.MaterialExportedMap}))}},_0x1a71e8.prototype.update=function(e,t,i,n){if(this._fileType!==p$T.Text&&this._fileType!==p$T.IconPoint||!t.passes.pick||!t.passes.offscreen){if(e$2e(this._associateMaterialUrl)&&!this._materialMapReady)return void this._loadMaterialMap(this._associateMaterialUrl);if(this._PBRMaterialParams.loadingTexture&&this._updatePBRMaterial(),_0x137ce1(this),this._isNeedUpdate(e,t)){this._style3D._dirty&&(this.refresh(),_0x4f1f81(this),this._style3D._dirty=!1),this._style3D.billboardMode===yr$2.FixedXYZ&&(this._isOverlapDisplayed=!0),_0x29597e(this,e);var r=t.camera;this._sceneMode=r._mode,this._projection=r._projection,this._picking=t.passes.pick,this._frameState=t,this._backfaceCommands.length=0,this._hasMixedContent=!1;var o,a=i.length;for(h=0,o=this._renderClipPlaneArray.length;h<o;h++){this._renderClipPlaneArray.values[h].update(e,t,i)}var s=this._objsVisibleMap;this._hasObjsVisibleMap=Object.keys(s).length>0,this._hasHeightRangeAttributeName=e$2e(this._heightRangeAttributeName);var l=this._PBRMaterialParams.pbrMetallicRoughness.snowEffect,u=this._PBRMaterialParams.pbrMetallicRoughness.rainEffect;if(this._hasSnowEffect=e$2e(l)&&e$2e(l.snowMaskTexture)&&e$2e(l.snowNormalTexture),this._hasRainEffect=e$2e(u)&&e$2e(u.rippleTexture),this._layerScheduler.update(e,t,i),this._shadowDarkness=t.shadowDarkness,this._showIcon&&this._iconCollection.length>0&&this._iconCollection.update(t,e,i),n=u$Z(n,!1),this._showLabel&&!0!==n&&(this._labelCollection.s3MlayerId=this._id,this._labelCollection.update(t,e,i)),this._fileType===p$T.PointCloudFile&&t.passes.render)i.length-a>0&&(this._pointCloudShading.eyeDomeLighting||this._pointCloudShading.performance)&&this._pointCloudEyeDomeLighting.update(t,a,this._pointCloudShading);this._fileType===p$T.ClampGroundRealtimeRasterCache&&(t.rasterLineWidth=this.style3D.lineWidth),_0x4d109b(this,t),this._updateEdgeDistanceFalloffFactor();for(var c=this._excavateRegionCommands.values.length,h=0;h<c;h++){var d=this._excavateRegionCommands.values[h];t.commandList.push(d)}_0x529e85(t,this),this._layerUBO.update(e,t),e$2e(this._waterLayerUbo)&&this._waterLayerUbo.update(e),e$2e(this._polylineEffectUbo)&&this._polylineEffectUbo.update(e),e$2e(this._regionEffectUbo)&&this._regionEffectUbo.update(e)}}};var _0x2b1f40=new p$1d;function _0x4b07f6(e){for(var t=[],i=0,n=e._layerScheduler._rootEntities.length;i<n;i++){var r=e._layerScheduler._rootEntities[i];t.push(r)}for(;t.length;){if(e$2e(r=t.pop())){e$2e(r._originalBS)&&(i$1d.transform(r._originalBS,e._matModel,r._boundingSphere),_0x345634(r,e._matModel));for(i=0,n=r._childrenPageLod.length;i<n;i++){var o=r._childrenPageLod[i];_0x345634(o,e._matModel),e$2e(o._originalBS)&&i$1d.transform(o._originalBS,e._matModel,o._boundingSphere);for(var a=0,s=o._renderEntityList.length;a<s;a++){var l=o._renderEntityList[a];!e$2e(l)||!e$2e(l._colorCommand)||(p$1d.inverse(l._colorCommand.modelMatrix,_0x2b1f40),i$1d.transform(l._boundingVolume,_0x2b1f40,l._boundingVolume),p$1d.multiply(e._matModel,l._geoMatrix,l._colorCommand.modelMatrix),i$1d.transform(l._boundingVolume,l._colorCommand.modelMatrix,l._boundingVolume),l._colorCommand._boundingVolume=l._boundingVolume)}t.push(o._entity)}}}}function _0x345634(e,t){if(e$2e(e.obbMin)){var i=e.obbMin,n=e.obbMax,r=[];r.push(new o$1p(i.x,i.y,i.z)),r.push(new o$1p(i.x,i.y,n.z)),r.push(new o$1p(i.x,n.y,i.z)),r.push(new o$1p(i.x,n.y,n.z)),r.push(new o$1p(n.x,i.y,i.z)),r.push(new o$1p(n.x,i.y,n.z)),r.push(new o$1p(n.x,n.y,i.z)),r.push(new o$1p(n.x,n.y,n.z));for(var o=0;o<8;o++)r[o]=p$1d.multiplyByPoint(t,r[o],r[o]);e._orientedBoundingBox=y$Y.fromPoints(r,e._orientedBoundingBox)}}function _0x5dd93f(e,t,i){for(var n,r=0,o=e.length;r<o;r++){var a=e[r],s=a.times;if(t>=s[0]&&t<=s[s.length-1]){n=a;break}}n&&n.evaluate(t,i)}var _0x169cbf=n$15.clone(n$15.IDENTITY),_0x1be8db=new i$16,_0x5c5867=new p$1d,_0x4fcef7=new p$1e,_0x5b1305=new p$1e,_0x4221b3=new o$1p;function _0x5f3498(e,t,i){"rotation"===t.type&&(_0x5dd93f(t.splines,i,_0x169cbf),p$1e.fromQuaternion(_0x169cbf,_0x5b1305),m$19.headingPitchRollToFixedFrame(e._position,_0x1be8db,t$12.WGS84,m$19.eastNorthUpToFixedFrame,_0x5c5867),p$1d.getRotation(_0x5c5867,_0x4fcef7),p$1e.multiply(_0x4fcef7,_0x5b1305,_0x4fcef7),p$1d.getTranslation(e._matModel,_0x4221b3),p$1d.fromRotationTranslation(_0x4fcef7,_0x4221b3,e._matModel))}var _0x152474=new o$1p(1,1,1);function _0x43306d(e,t,i){"scale"===t.type&&(_0x5dd93f(t.splines,i,_0x152474),p$1d.setScale(e._matModel,_0x152474,e._matModel))}function _0x43e23f(e,t,i){"translation"===t.type&&(_0x5dd93f(t.splines,i,e._position),p$1d.setTranslation(e._matModel,e._position,e._matModel))}var _0x1ea467=new e$2c;function _0x529e85(e,t){e$2e(e.realtimeRasterSwipeParams)||(e.realtimeRasterSwipeParams={}),_0x1ea467.x=t._swipeRegion.x*e.context.drawingBufferWidth,_0x1ea467.y=(1-t._swipeRegion.y)*e.context.drawingBufferHeight,_0x1ea467.z=t._swipeRegion.z*e.context.drawingBufferWidth,_0x1ea467.w=(1-t._swipeRegion.w)*e.context.drawingBufferHeight,e.realtimeRasterSwipeParams.swipeRegion=_0x1ea467,e.realtimeRasterSwipeParams.swipeEnabled=t._swipeEnabled}var _0x213422=new e$2c;function _0x239d23(e,t){e.updateAllObjsVisible(t.layer,t.isVisible)}function _0x1a1914(e,t){e.updateTheme(t.layer)}function _0x2f2515(e,t){e.updateObjsColor(t.ids)}function _0x5103f4(e,t){e.updateObjsTranslate(t.ids)}function _0x33aca7(e,t){e.updateExtendHeight(t.ids)}function _0x317b8a(e,t){e.removeExtendHeight(t.ids)}function _0x1a976d(e,t){e.removeAllExtendHeight()}function _0x4a54bc(e,t){e.updateObjsOperation(t.ids,t)}function _0x5e87f9(e,t,i){var n=new o$1p,r=new o$1p;o$1p.subtract(t,e,n),o$1p.subtract(i,e,r);var o=new o$1p;o$1p.cross(n,r,o),o$1p.normalize(o,o);var a=-o$1p.dot(o,e);return new e$2c(o.x,o.y,o.z,a)}function _0x2405e7(e,t){var i=e._projection,n=i.ellipsoid,r=new o$1p,o=new a$18;return n.cartesianToCartographic(t,o),i.project(o,r),o$1p.fromElements(r.z,r.x,r.y)}_0x1a71e8.prototype.render=function(e,t){if(e$2e(e)&&e$2e(t)){if(t.passes.pick){_0x213422.x=e._pickPosition[0],_0x213422.y=e._pickPosition[1],_0x213422.z=e._pickPosition[2],_0x213422.w=1;var i=new p$1d;p$1d.inverse(this._matModel,i),p$1d.multiplyByVector(i,_0x213422,_0x213422),_0x213422.z=_0x213422.z+this.height<0?2:_0x213422.z+this.height,e$2c.clone(_0x213422,this._pickPosition)}if(this._picking=t.passes.pick,this.updateFlattenFrameBuffer(e,t),this._updateExcavationFrameBuffer(e,t),this.updateHypRegionFrameBuffer(e,t),this.updateOverlayFrameBuffer(e,t),this._clipping){var n=t.camera.inverseViewMatrix,r=new p$1d;p$1d.transpose(n,r);for(var o=0;o<6;o++)p$1d.multiplyByVector(r,this._oriClipPlane[o],this._clipPlane[o])}this._spatialClipEnable&&e$2e(this._spatialQuery)&&this._spatialQuery._updateTextures(e,t)}},_0x1a71e8.prototype.setSelection=function(e,t){if(_0x43b37d.S3M!==this._version&&(o$1q.defined("setSelection ids",e),this._selectEnabled&&this._enableHighlight)){if(Array.isArray(e)||(e=[e]),this.multiChoose||this.releaseSelection(),this._lastSelectSkeletonId=u$Z(t,-1),this._fileType===p$T.ClampGroundRealtimeRasterCache)for(var i=0,n=e.length;i<n;i++)this._layerScheduler.refreshRasterById(e[i],this._frameState);this._scene._layers.setSelectedLayer(this),this._selections=this._selections.concat(e),this.setObjectsOperationByID(e,_0x27a6bb.SELECTED)}},_0x1a71e8.prototype.getSelection=function(){return[].concat(this._selections)},_0x1a71e8.prototype.releaseSelection=function(){if(_0x43b37d.S3M!==this._version&&(this._showLabel&&this._labelCollection.releaseSelection(),!(this._selections.length<1))){if(this._fileType===p$T.ClampGroundRealtimeRasterCache)for(var e=0,t=this._selections.length;e<t;e++)this._layerScheduler.refreshRasterById(this._selections[e],this._frameState);this.removeObjectsOperation(this._selections,_0x27a6bb.SELECTED),this._selections.length=0}},_0x1a71e8.prototype.setSkeletonSelection=function(e){},_0x1a71e8.prototype.setRenderSelectionTexBySkeletonId=function(e){var t={};t.layer=this,t.enable=e,this.traverseRenderEntity(t,_0x553e9d)},_0x1a71e8.prototype.setObjsColor=function(e,t){if(_0x43b37d.S3M!==this._version&&this._fileType!==p$T.ClampObjectPolygon){o$1q.defined("setObjsColor ids",e),o$1q.defined("setObjsColor color",t),o$1q.typeOf.object("setObjsColor color",t),Array.isArray(e)||(e=[e]);for(var i={},n=0,r=e.length;n<r;n++){var o=e[n]+"";!e$2e(o)||(this._objsColorList[o]=t,i[o]=t)}this.updateObjsColor(i)}},_0x1a71e8.prototype.getObjsColor=function(e){if(!e$2e(e))throw new Error("id is required");return _0x43b37d.S3M===this._version?null:this._objsColorList[e]},_0x1a71e8.prototype.removeObjsColor=function(e){o$1q.defined("removeObjsColor ids",e),Array.isArray(e)||(e=[e]);for(var t={},i=0,n=e.length;i<n;i++){var r=e[i];e$2e(this._objsColorList[r])&&(t[r]=e$1X.TRANSPARENT,delete this._objsColorList[r])}this.removeObjectsOperation(e,_0x27a6bb.SetColor),this.updateObjsColor(t)},_0x1a71e8.prototype.removeAllObjsColor=function(){if(!(Object.keys(this._objsColorList).length<1)){var e={};for(var t in this._objsColorList)this._objsColorList.hasOwnProperty(t)&&(e[t]=e$1X.TRANSPARENT);this._objsColorList={},this.updateObjsColor(e)}},_0x1a71e8.prototype.setObjsExtendHeight=function(e,t){if(_0x43b37d.S3M!=this._version&&e$2e(this._objsHeightList)){o$1q.defined("setObjsExtendHeight ids",e),o$1q.defined("setObjsExtendHeight height",t),Array.isArray(e)||(e=[e]);for(var i=new e$1Q,n=0,r=e.length;n<r;n++){var o=e[n];this._objsHeightList.set(o,t),i.set(o,t)}this.updateExtendHeight(i)}},_0x1a71e8.prototype.removeAllObjsExtendHeight=function(){!e$2e(this._objsHeightList)||(this._objsHeightList.removeAll(),this.removeAllExtendHeight())},_0x1a71e8.prototype.removeObjsExtendHeight=function(e){if(e$2e(this._objsHeightList)){o$1q.defined("removeObjsExtendHeight ids",e),Array.isArray(e)||(e=[e]);for(var t=0,i=e.length;t<i;t++){var n=e[t];this._objsHeightList.remove(n)}this.removeExtendHeight(e)}},_0x1a71e8.prototype.setOnlyObjsVisible=function(e,t,i,n){if(i=u$Z(i,!0),n=u$Z(n,!1),_0x43b37d.S3M===this._version)return null;if(o$1q.defined("setOnlyObjsVisible ids",e),o$1q.typeOf.bool("setOnlyObjsVisible isVisible",t),Array.isArray(e)||(e=[e]),0===e.length){this._allObjsHide=t,this._objsVisibleList.removeAll();var r=Object.keys(this._objsHideList._hash);return this.removeObjectsOperation(r,_0x27a6bb.HIDE),this._objsHideList.removeAll(),i&&!n&&(this._objsVisibleMap={}),void this.updateAllObjsVisible(!t)}var o=this._objsVisibleList,a=this._objsHideList,s=this._objsVisibleMap;t?(e.map((function(e){o.set(e,!0),a.remove(e),i&&(s[e]=!0)})),this.removeObjectsOperation(e,_0x27a6bb.HIDE)):(e.map((function(e){o.remove(e),a.set(e,!0),i&&(s[e]=!1)})),this.setObjectsOperationByID(e,_0x27a6bb.HIDE))},_0x1a71e8.prototype.setObjsVisible=function(e,t,i){0!==e.length?(this.setOnlyObjsVisible([],t,i),this.setOnlyObjsVisible(e,t,i)):this.setOnlyObjsVisible([],t,i)},_0x1a71e8.prototype.setPointCloudGroupsVisible=function(e,t){if(this._fileType===p$T.PointCloudFile&&e$2e(this._pointCloudLayerVisible)){o$1q.defined("setPointCloudGroupsVisible groupNames",e),o$1q.typeOf.bool("setPointCloudGroupsVisible isVisible",t),Array.isArray(e)||(e=[e]);for(var i=0,n=e.length;i<n;i++)this._pointCloudLayerVisible.hasOwnProperty(e[i])&&(this._pointCloudLayerVisible[e[i]]=t)}},_0x1a71e8.prototype.getPointCloudGroupInfos=function(){if(this._fileType!==p$T.PointCloudFile)return[];if(!e$2e(this._pointCloudLayerVisible))return[];var e=[];for(var t in this._pointCloudLayerVisible)this._pointCloudLayerVisible.hasOwnProperty(t)&&e.push(t);return e},_0x1a71e8.prototype.getPointCloudGroupBounds=function(e){if(this._fileType===p$T.PointCloudFile&&e$2e(this._groupNameBounds))return this._groupNameBounds.get(e)},_0x1a71e8.prototype.getObjsVisible=function(e){if(!this.visible)return!1;if(_0x43b37d.S3M===this._version)return!0;var t=this._objsColorList[e],i=!0;return e$2e(t)&&(i&=t.alpha),i},_0x1a71e8.prototype.setObjsOffset=function(e){if(e$2e(this._layerScheduler._extrudedId))if(Array.isArray(e))for(var t=0;t<e.length;t++)this._polygonsTranslate[e[t]]=o$1p.clone(this._selectedTranslate);else this._polygonsTranslate[e]=o$1p.clone(this._selectedTranslate);else this._boundingSphereOffset=o$1p.clone(this._selectedTranslate),this.setObjectsOperationByID(e,_0x27a6bb.OFFSET)},_0x1a71e8.prototype.setObjsTranslate=function(e,t){if(_0x43b37d.S3M!==this._version){o$1q.defined("setObjsTranslate ids",e),o$1q.defined("setObjsTranslate translate",t),o$1q.typeOf.object("setObjsTranslate translate",t),Array.isArray(e)||(e=[e]);for(var i={},n=0,r=e.length;n<r;n++){var o=e[n];!e$2e(o)||(this._objsOffsetList[o]=t,i[o]=t)}Object.keys(i).length>0&&(this.traverseRenderEntity({ids:i},_0x5103f4),this.setObjectsOperationByID(e,_0x27a6bb.OFFSET))}},_0x1a71e8.prototype.setBatchObjsTranslate=function(e){_0x43b37d.S3M!==this._version&&(o$1q.defined("setObjsTranslate option",e),Object.getPrototypeOf(e)===Object.prototype&&(Object.assign(this._objsOffsetList,e),Object.keys(e).length>0&&(this.traverseRenderEntity({ids:e},_0x5103f4),this.setObjectsOperationByID(Object.keys(e),_0x27a6bb.OFFSET))))},_0x1a71e8.prototype.removeObjsTranslate=function(e){o$1q.defined("removeObjsTranslate ids",e),Array.isArray(e)||(e=[e]);for(var t={},i=0,n=e.length;i<n;i++){var r=e[i];e$2e(this._objsOffsetList[r])&&(delete this._objsOffsetList[r],t[r]=o$1p.ZERO)}this.removeObjectsOperation(e,_0x27a6bb.OFFSET),Object.keys(t).length>0&&this.traverseRenderEntity({ids:t},_0x5103f4)},_0x1a71e8.prototype.removeAllObjsTranslate=function(){var e={};for(var t in this._objsOffsetList)this._objsOffsetList.hasOwnProperty(t)&&(e[t]=o$1p.ZERO);this.traverseRenderEntity({ids:e},_0x5103f4),this._objsOffsetList={}},_0x1a71e8.prototype.removeObjsOffset=function(e){this.removeObjectsOperation(e,_0x27a6bb.OFFSET)},_0x1a71e8.prototype.removeAllObjsOffset=function(){this._boundingSphereOffset=o$1p.ZERO,this.removeAllObjectsOperation(_0x27a6bb.OFFSET)},_0x1a71e8.prototype.setObjectsOperationByID=function(e,t){if(_0x43b37d.S3M!==this._version){o$1q.defined("set Objs Operation ids",e),o$1q.defined("set Objs Operation operationType",t),Array.isArray(e)||(e=[e]),t===_0x27a6bb.CLIP&&(this._operationType&_0x27a6bb.CLIP)===_0x27a6bb.RESET&&(this._operationType|=t,this.traverseRenderEntity({layer:this,enable:!0},_0x358acf));for(var i,n=new e$1Q,r=0,o=e.length;r<o;r++)if(e$2e(i=e[r])){var a=u$Z(this._objsOperationList[i],0);a!==t&&(a|=t,this._objsOperationList[i]=a,n.set(i,a))}n.length>0&&this.updateObjsOperation(n._hash)}},_0x1a71e8.prototype.removeObjectsOperation=function(e,t){if(_0x43b37d.S3M!==this._version){o$1q.defined("set Objs Operation ids",e),Array.isArray(e)||(e=[e]);for(var i,n=_0x27a6bb.ALL^t,r=new e$1Q,o=0,a=e.length;o<a;o++){i=e[o];var s=this._objsOperationList[i];!e$2e(s)||((s&=n)===_0x27a6bb.RESET?delete this._objsOperationList[i]:this._objsOperationList[i]=s,r.set(i,s))}r.length>0&&this.updateObjsOperation(r._hash)}},_0x1a71e8.prototype.removeAllObjectsOperation=function(e){if(_0x43b37d.S3M!==this._version&&!(Object.keys(this._objsOperationList).length<1)){var t=_0x27a6bb.ALL^e,i=new e$1Q,n=this._objsOperationList;for(var r in n)if(n.hasOwnProperty(r)){var o=this._objsOperationList[r];if(!e$2e(o))continue;(o&=t)===_0x27a6bb.RESET?delete this._objsOperationList[r]:this._objsOperationList[r]=o,i.set(r,o)}i.length>0&&this.updateObjsOperation(i._hash)}},_0x1a71e8.prototype.setCategoriesVisible=function(e,t){o$1q.defined("set Categories Visible",e),Array.isArray(e)||(e=[e]);var i=this._hypMaxCategory,n=this._hypMinCategory,r=256,o=Math.max(Math.ceil((i-n)/r),1);e$2e(this._categorieTexture)||(this._categorieTexture=new t$U({context:this._context,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,width:r,height:o,flipY:!1,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),this.traverseRenderEntity({layer:this},_0x93ed4));var a=new Uint8Array(r*o*4);if(t!==_0x70e866.ResetAll){var s,l,u;if(t===_0x70e866.Hide)for(s=0,l=e.length;s<l;s++)u=e[s],this._categoryHideList.set(u,u);else for(s=0,l=e.length;s<l;s++)u=e[s],this._categoryHideList.contains(u)&&this._categoryHideList.remove(u);for(s=0;s<this._categoryHideList.values.length;s++){var c=(u=this._categoryHideList.values[s])-n;a[4*c]=255,a[4*c+1]=255,a[4*c+2]=255,a[4*c+3]=255}this._categorieTexture.copyFrom({width:r,height:o,arrayBufferView:a})}else this._categorieTexture.copyFrom({width:r,height:o,arrayBufferView:a})},_0x1a71e8.prototype.addFlattenRegion=function(e){var t=e.name,i=e.position;if(!e$2e(t)||!e$2e(i))return!1;if(e$2e(this._flattenRegions.get(t)))return!1;e$2e(this._flattenTexture)||(this._flattenTexture=new t$U({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$12.RGBA,pixelDatatype:this._context.floatingPointTexture?_$_.FLOAT:void 0}));var n=this._createRasterRegion(i),r=o$1p.fromDegreesArrayHeights(i),o=i$1d.fromPoints(r,new i$1d);if(n.boundingSphere=o,this._flattenRegions.set(t,n),this._flattenUpdate=!0,this._flattening=!0,1===this._flattenRegions.values.length){var a={};a.layer=this,a.boundingSphere=o,this.traverseRenderEntity(a,_0x1bd9b5)}return!0},_0x1a71e8.prototype.removeFlattenRegion=function(e){if(!this._flattenRegions.remove(e))return!1;if(this._flattenUpdate=!0,0===this._flattenRegions.values.length){this._flattenUpdate=!1,this._flattening=!1;var t={};t.layer=this,this.traverseRenderEntity(t,_0x2f1f1e)}return!0},_0x1a71e8.prototype.removeAllFlattenRegion=function(){for(var e=0;e<this._flattenRegions.values.length;e++)this._flattenRegions.values[e].destroy(),this._flattenRegions.values[e]=null;this._flattenRegions.removeAll(),this._flattening=!1;var t={};t.layer=this,this.traverseRenderEntity(t,_0x2f1f1e)},_0x1a71e8.prototype.addOverlayImage=function(e){var t=(e=u$Z(e,{})).name,i=e.bounds,n=e.image;if(!e$2e(t)||!e$2e(i)||!e$2e(e.image))return!1;var r=this._overlayRegions.get(t);if(e$2e(r))return!1;e$2e(this._overlayTexture)||(this._overlayTexture=new t$U({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$12.RGBA}));var o=new t$U({context:this._context,width:n.width,height:n.height,pixelFormat:V$12.RGBA,source:n});if(this._overlayTextures.set(t,o),r=this._createRasterBounds(i),this._overlayRegions.set(t,r),this._overlayUpdate=!0,this._hasOverlay=!0,1===this._overlayRegions.values.length){var a={};a.layer=this,this.traverseRenderEntity(a,_0x3e3e7e)}return!0},_0x1a71e8.prototype.removeOverlayImage=function(e){if(!e$2e(e))return!1;if(!e$2e(this._overlayRegions.get(e)))return!1;if(this._overlayTextures.remove(e),this._overlayRegions.remove(e),this._overlayUpdate=!0,0===this._overlayRegions.values.length){var t={};t.layer=this,this.traverseRenderEntity(t,_0x2da71f)}return!0},_0x1a71e8.prototype.setModifyRegions=function(e,t){if(this.clearModifyRegions(),t==_0x454473.CLIP_INSIDE||t==_0x454473.CLIP_OUTSIDE)for(var i=e.length,n=0;n<i;n++){var r={position:e[n],name:"modify_"+n};this.addExcavationRegion(r)}this._excavationMode=t},_0x1a71e8.prototype._setServerClipRegions=function(e,t){for(var i=0,n=e.length;i<n;i++){var r={position:e[i],name:"server_clipregion_"+i};this._addServerExcavationRegion(r)}this._serverExcavationMode=u$Z(t,_0x454473.CLIP_OUTSIDE)},_0x1a71e8.prototype.setClipRegions=function(e){if(!(e instanceof Array))throw new t$15("regions must be a georegion3d array");var t=this._baseUri.toString();new t$10(a={url:t.substring(0,t.indexOf("/data/path"))+"/config",method:"POST",data:JSON.stringify({clipRegions:e})})._makeRequest({method:"POST",data:a.data});for(var i=0;i<e.length;i++){for(var n=[],r=e[i],o=0;o<r.points.length;o++)n.push(r.points[o].x),n.push(r.points[o].y),n.push(r.points[o].z);var a={position:n,name:"server_clipregion_x"+i};this._addServerExcavationRegion(a)}},_0x1a71e8.prototype.clearModifyRegions=function(){for(var e=Object.keys(this._excavationRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];n.startsWith("modify_")&&this.removeExcavationRegion(n)}},_0x1a71e8.prototype.addExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(e$2e(t)||o$1q.typeOf.string("options.name",t),e$2e(i)||o$1q.typeOf.string("options.position",i),e$2e(this._excavationRegions.get(t)))return!1;e$2e(this._excavationTexture)||(this._excavationTexture=new t$U({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$12.RGBA}));var r=this._createRasterRegion(i,n,e$2e(n));if(r.name=t,this._excavationRegions.set(t,r),this._excavationUpdate=!0,this._hasExcavation=!0,1===this._excavationRegions.values.length){var o={};o.layer=this,this.traverseRenderEntity(o,_0x567d8c)}return!0},_0x1a71e8.prototype._addServerExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(e$2e(t)||o$1q.typeOf.string("options.name",t),e$2e(i)||o$1q.typeOf.string("options.position",i),e$2e(this._serverExcavationRegions.get(t)))return!1;e$2e(this._excavationTexture)||(this._excavationTexture=new t$U({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$12.RGBA}));var r=this._createRasterRegion(i,n,e$2e(n));if(r.name=t,this._serverExcavationRegions.set(t,r),this._excavationUpdate=!0,this._hasServerExcavation=!0,1===this._serverExcavationRegions.values.length){var o={};o.layer=this,this.traverseRenderEntity(o,_0x11b6a1)}return!0},_0x1a71e8.prototype.removeExcavationRegion=function(e){var t=this._excavationRegions.get(e);if(!this._excavationRegions.remove(e))return!1;if(t.destroy(),this._removeExcavationCommands(e),this._excavationUpdate=!0,0===this._excavationRegions.values.length){this._hasExcavation=!1,this._excavationUpdate=!1;var i={};i.layer=this,this.traverseRenderEntity(i,_0x1070e5)}return!0},_0x1a71e8.prototype._removeServerExcavationRegion=function(e){var t=this._serverExcavationRegions.get(e);if(!this._serverExcavationRegions.remove(e))return!1;if(t.destroy(),this._removeExcavationCommands(e),this._excavationUpdate=!0,0===this._serverExcavationRegions.values.length){this._excavationUpdate=!1,this._hasExcavation=!1;var i={};i.layer=this,this.traverseRenderEntity(i,_0x5d6745)}return!0},_0x1a71e8.prototype._removeExcavationCommands=function(e){var t=this._excavateRegionCommands.get(e+"side"),i=this._excavateRegionCommands.get(e+"bottom");t&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy()),i&&(i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy()),this._excavateRegionCommands.remove(e+"side"),this._excavateRegionCommands.remove(e+"bottom")},_0x1a71e8.prototype.removeAllExcavationRegion=function(){this._hasExcavation=!1;for(var e=Object.keys(this._excavationRegions._hash),t=0,i=e.length;t<i;t++){var n=e[t];this.removeExcavationRegion(n)}this._excavationRegions.removeAll()},_0x1a71e8.prototype._createRasterRegion=function(e,t,i){var n=o$1p.fromDegreesArrayHeights(e);if(this._sceneMode!==C$14.SCENE3D)for(var r=0;r<n.length;r++)n[r]=_0x2405e7(this,n[r]);var o=new U$18({polygonHierarchy:{positions:n},perPositionHeight:!0}),a=U$18.createGeometry(o),s=new p$1d;p$1d.inverse(this._matModel,s),f$Z.updateGeometry(a,e,s);var l=new f$Z;if(l._geometry=a,l._bounds=f$Z.updateGeoBounds(a),i){l.worldGeometry=U$18.createGeometry(o),l.colorGeometry=U$18.createGeometry(o);var u=o$1p.fromDegrees(e[0],e[1],0),c=new i$16(0,0,0);l._excavateMatrix=m$19.headingPitchRollToFixedFrame(u,c,t$12.WGS84),l.modelMatrix=p$1d.fromTranslation(new o$1p(e[0],e[1],0),new p$1d);for(var h=Number.MAX_VALUE,d=(r=0,e.length);r<d;r+=3)h=Math.min(h,e[r+2]);l.height=h-t,l.rectangle=h$18.fromCartesianArray(n),l.positions=e}return l},_0x1a71e8.prototype._createRasterBounds=function(e){var t=new j$N({rectangle:e}),i=j$N.createGeometry(t),n=new p$1d;if(p$1d.inverse(this._matModel,n),this._sceneMode===C$14.COLUMBUS_VIEW)for(var r=0;r<i.attributes.position.values.length;r+=i.attributes.position.componentsPerAttribute){var o=new o$1p(i.attributes.position.values[r],i.attributes.position.values[r+1],i.attributes.position.values[r+2]),a=a$18.fromCartesian(o),s=new o$1p;this._projection.project(a,s),i.attributes.position.values[r]=s.z,i.attributes.position.values[r+1]=s.x,i.attributes.position.values[r+2]=s.y}f$Z.updateGeometry(i,void 0,n);var l=new f$Z;return l._geometry=i,l._bounds=f$Z.updateGeoBounds(i),l},_0x1a71e8.prototype._computeLayerModelBounds=function(){var e=new o$1p.fromRadians(this._layerBounds.west,this._layerBounds.south,0),t=new o$1p.fromRadians(this._layerBounds.west,this._layerBounds.north,0),i=new o$1p.fromRadians(this._layerBounds.east,this._layerBounds.south,0),n=new o$1p.fromRadians(this._layerBounds.east,this._layerBounds.north,0),r=[];r.push(e),r.push(t),r.push(i),r.push(n);var o=new p$1d;p$1d.inverse(this._matModel,o),this._layerModelBounds=new e$2c(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(var a=0;a<4;a++)p$1d.multiplyByPoint(o,r[a],r[a]),this._layerModelBounds.x=Math.min(r[a].x,this._layerModelBounds.x),this._layerModelBounds.y=Math.min(r[a].y,this._layerModelBounds.y),this._layerModelBounds.z=Math.max(r[a].x,this._layerModelBounds.z),this._layerModelBounds.w=Math.max(r[a].y,this._layerModelBounds.w)},_0x1a71e8.prototype._combineRegionBounds=function(e){for(var t=new e$2c(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),i=0;i<e.length;i++){var n=e[i]._bounds;t.x=Math.min(n.x,t.x),t.y=Math.min(n.y,t.y),t.z=Math.max(n.z,t.z),t.w=Math.max(n.w,t.w)}return t},_0x1a71e8.prototype.createRasterRegionDrawCommand=function(e,t,i,n){if(e$2e(t)&&!e$2e(t._command)){var r=new i$$({primitiveType:W$18.TRIANGLES});t._command=r;var o={position:0};r.vertexArray=c$13.fromGeometry({context:e,geometry:t._geometry,attributeLocations:o,bufferUsage:A$18.STATIC_DRAW,interleave:!0});var a=new s$V({sources:[_0x51e90e]});n==_0x2c45b2.Altitude?(a.defines.push("Mode_Height"),i.pixelDatatype===_$_.FLOAT&&a.defines.push("UseFloatTexture"),r.shaderProgram=r$14.fromCache({name:"RegionAltitudeSp",context:e,vertexShaderSource:_0x3d8f6e,fragmentShaderSource:a,attributeLocations:o})):n==_0x2c45b2.Texture?(a.defines.push("OVERLAY"),r.shaderProgram=r$14.fromCache({name:"RegionTextureSp",context:e,vertexShaderSource:_0x57c608,fragmentShaderSource:a,attributeLocations:o})):r.shaderProgram=r$14.fromCache({name:"RegionRasterSp",context:e,vertexShaderSource:_0x302e68,fragmentShaderSource:a,attributeLocations:o}),r.framebuffer=new t$V({context:e,colorTextures:[i],destroyAttachments:!1}),r.renderState=d$1m.fromCache({viewport:new f$1a(0,0,this._flattenTextureWidth,this._flattenTextureWidth)})}},_0x1a71e8.prototype.updateHypRegionFrameBuffer=function(e,t){if(this._hypsometricRegionUpdate){if(!e$2e(this._hypsometricRegion))return void(this._bUseHypRegion=!1);this._bUseHypRegion=!0,this._hypsometricRegionUpdate=!1;var i=new t$W({color:new e$1X(0,0,0,0),depth:1});i.framebuffer=new t$V({context:e,colorTextures:[this._hypsometricRenderTexture],destroyAttachments:!1}),i.renderState=d$1m.fromCache(),i.execute(e),this.createRasterRegionDrawCommand(e,this._hypsometricRegion,this._hypsometricRenderTexture,_0x2c45b2.Color);var n=this;this._hypsometricRegion._command.uniformMap={uRect:function(){return n._hypsometricBound}},this._hypsometricRegion._command.execute(e),i.framebuffer.destroy()}},_0x1a71e8.prototype.updateFlattenFrameBuffer=function(e,t){if(this._flattenUpdate){this._flattening=!0,this._flattenUpdate=!1,this._flattenBounds=this._combineRegionBounds(this._flattenRegions.values);var i=new t$W({color:new e$1X(0,0,0,0),depth:1});e$2e(this._flattenTexture)||(this._flattenTexture=new t$U({context:this._context,width:this._flattenTextureWidth,height:this._flattenTextureWidth,pixelFormat:V$12.RGBA,pixelDatatype:this._context.floatingPointTexture?_$_.FLOAT:void 0})),i.framebuffer=new t$V({context:e,colorTextures:[this._flattenTexture],destroyAttachments:!1}),i.renderState=d$1m.fromCache(),i.execute(e);var n=this._flattenRegions.values.length;n<1&&(this._flattening=!1);for(var r=0;r<n;r++){var o=this._flattenRegions.values[r];this.createRasterRegionDrawCommand(e,o,this._flattenTexture,_0x2c45b2.Altitude);var a=this;o._command.uniformMap={uRect:function(){return a._flattenBounds}},o._command.execute(e)}i.framebuffer.destroy()}},_0x1a71e8.prototype.updateOverlayFrameBuffer=function(e,t){if(this._overlayUpdate){this._overlayUpdate=!1,this._overlayBounds=this._combineRegionBounds(this._overlayRegions.values),this._hasOverlay=this._overlayRegions.length>0;var i=new t$W({color:new e$1X(1,1,1,1),depth:1});i.framebuffer=new t$V({context:e,colorTextures:[this._overlayTexture],destroyAttachments:!1}),i.renderState=d$1m.fromCache(),i.execute(e);for(var n=this._overlayRegions.values.length,r=0;r<n;r++){var o=this._overlayRegions.values[r],a=this._overlayTextures.values[r];this.createRasterRegionDrawCommand(e,o,this._overlayTexture,_0x2c45b2.Texture),o._command.uniformMap=s(this._overlayBounds,a,o._bounds),o._command.execute(e)}i.framebuffer.destroy()}function s(e,t,i){return{uRect:function(){return e},uTexture:function(){return t},uSingleRegion:function(){return i}}}},_0x1a71e8.prototype._updateExcavationFrameBuffer=function(e,t){if(this._excavationUpdate){for(var i in t._framebufferList)i.indexOf("_excavationHeightLayer")>-1&&!e$2e(this._excavationRegions.get(i.slice(22)))&&(t._framebufferList[i]=!t._framebufferList[i].isDestroyed()&&t._framebufferList[i].destroy(),delete t._framebufferList[i]);var n=this._excavationRegions.values.length;this._hasExcavation=n>0,this._excavationUpdate=!1,this._excavationBounds=this._combineRegionBounds(this._excavationRegions.values);var r=this._serverExcavationRegions.values.length;if(this._hasServerExcavation=r>0,this._serverExcavationBounds=this._combineRegionBounds(this._serverExcavationRegions.values),0!=n||0!=r){var o=new t$W({color:new e$1X(0,0,0,0),depth:1});o.framebuffer=new t$V({context:e,colorTextures:[this._excavationTexture],destroyAttachments:!1}),o.renderState=d$1m.fromCache(),o.execute(e),b$V.createExcavationSideTexture(t,this),b$V.createExcavationBottomTexture(t,this);for(var a=0;a<n;a++){var s=this._excavationRegions.values[a];this.createRasterRegionDrawCommand(e,s,this._excavationTexture,_0x2c45b2.Color),e$2e(s.height)&&(b$V._createExcavationSideCommand(t,this,s),b$V._createExcavationBottomCommand(t,this,s));var l=this;s._command.uniformMap={uRect:function(){return l._excavationBounds}},s._command.execute(e)}for(var u=0;u<r;u++){s=this._serverExcavationRegions.values[u];this.createRasterRegionDrawCommand(e,s,this._excavationTexture,_0x2c45b2.Color),e$2e(s.height)&&(b$V._createExcavationSideCommand(t,this,s),b$V._createExcavationBottomCommand(t,this,s));l=this;s._command.uniformMap={uRect:function(){return l._serverExcavationBounds}},s._command.execute(e)}o.framebuffer.destroy()}}},_0x1a71e8.prototype.updateAllObjsVisible=function(e){this.traverseRenderEntity({layer:this,isVisible:e},_0x239d23)},_0x1a71e8.prototype.updateObjsTheme=function(){var e={layer:this};this.traverseRenderEntity(e,_0x1a1914)},_0x1a71e8.prototype.updateObjsColor=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x2f2515)},_0x1a71e8.prototype.updateExtendHeight=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x33aca7)},_0x1a71e8.prototype.removeExtendHeight=function(e){var t={ids:e};this.traverseRenderEntity(t,_0x317b8a)},_0x1a71e8.prototype.removeAllExtendHeight=function(){this.traverseRenderEntity({},_0x1a976d)},_0x1a71e8.prototype.updateObjsOperation=function(e){var t={ids:e,offset:Math.max(Math.abs(this.selectedTranslate.x),Math.abs(this.selectedTranslate.y),Math.abs(this.selectedTranslate.z))};this.traverseRenderEntity(t,_0x4a54bc)},_0x1a71e8.prototype.refresh=function(){this._layerScheduler.refresh(),this.initialize()},_0x1a71e8.prototype.refreshVolume=function(){this._refreshVolume=!0},_0x1a71e8.prototype.clearCustomClipBox=function(){this.isRenderClipSection()&&this._context.numClampClipPlaneLayer--;for(var e=0,t=this._renderClipPlaneArray.values.length;e<t;e++)this._renderClipPlaneArray.values[e].destroy(),this._renderClipPlaneArray.values[e]=null;this._renderClipPlaneArray.removeAll(),this._clipping=!1;var i={layer:this,enable:!1};this.traverseRenderEntity(i,_0x17d53e),this._section=!1};var _0xc879f9=new a$18;function _0x243acb(e){return e===R$L.KeepOutside?j$Z.Disjoint:j$Z.Intersects}function _0x40e599(e,t){e.lightSourceChanged(t)}function _0x14db7e(e,t){e.updateShadow(t.layer)}function _0x17d53e(e,t){e.setCustomClipBox(t.layer,t.enable)}function _0x54ab03(e,t){e.enableAdjustColor(t)}function _0x567d8c(e,t){e.enableExcavation(t)}function _0x1070e5(e,t){e.disableExcavation(t)}function _0x11b6a1(e,t){e.enableServerExcavation(t)}function _0x5d6745(e,t){e.disableServerExcavation(t)}function _0x1bd9b5(e,t){e.enableFlatten(t)}function _0x3e3e7e(e,t){e.enableOverlay(t)}function _0x2da71f(e,t){e.disableOverlay(t)}function _0x3020ee(e,t){e.enableAjustTransparentBackColor(t)}function _0x599bbd(e,t){e.disableAjustTransparentBackColor(t)}function _0x2f1f1e(e,t){e.disableFlatten(t)}function _0xc784ce(e,t){e.enableHypsometric(t)}function _0xbff5a0(e,t){e.disableHypsometric(t)}function _0x50a49b(e,t){e.hasLightChange(t)}function _0x553e9d(e,t){e.skeletonSelectEnable(t)}function _0x1cc863(e,t){e.selectColorTypeChange(t)}function _0x72a589(e,t){e.mixColorTypeChange(t)}function _0x26857d(e,t){e.splitDirectionChange(t)}function _0x543584(e,t){e.swipeStateChange(t)}function _0x4fa236(e,t){e.PBRMaterialTypeChange(t)}function _0x93ed4(e,t){e.enableCategoryVisible(t)}function _0x1030ef(e,t){e.emissionTextureChange(t)}function _0x2c2177(e,t){e.enableTextureMove(t)}function _0x2c542a(e,t){e.enableTriangleFiltrate(t)}function _0x358acf(e,t){e.enableClipFilt(t)}function _0x333d89(e,t){e.enableFusionChange(t)}function _0x25702b(e,t){e.enableFlood(t)}function _0x15cbc8(e,t){e.disableFlood(t)}function _0x2a3c4e(e){for(var t=1;t<e;)t<<=1;return t}function _0x58a6f5(e,t){e.emissionTextureUnitChange(t)}function _0x4d4de9(e,t){var i=p$1d.multiply(e._geoMatrix,t.scaleMatrix,new p$1d);p$1d.multiply(t.layerMatrix,i,e._matModel),e._modelMatrixDirty=!0}function _0x5b4d78(e,t){e.pbrParameterChange(t)}function _0x5ea874(e,t){e.edgeWireFrameModeChange(t)}function _0x278a45(e,t){var i=t,n=i._PBRMaterialParams.baseUri;i._PBRMaterialParams=e.material,i._PBRMaterialParams.baseUri=n,i._loadMaterialTexture(i._PBRMaterialParams,n);var r=i._PBRMaterialParams.pbrMetallicRoughness,o=i._PBRMaterialParams.textureunitstates;if(e$2e(r.snowEffect)&&-1!==r.snowEffect.snowNormalTextureIndex){var a=n+o[r.snowEffect.snowNormalTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0xade8aa(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.snowEffect,"snowNormalTexture")}if(e$2e(r.snowEffect)&&-1!==r.snowEffect.snowMaskTextureIndex){a=n+o[r.snowEffect.snowMaskTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0xade8aa(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.snowEffect,"snowMaskTexture")}if(e$2e(r.rainEffect)&&-1!==r.rainEffect.rippleTextureIndex){a=n+o[r.rainEffect.rippleTextureIndex].textureunitstate.url;i._PBRMaterialParams.pendingTextureCount++,_0xade8aa(i._context,a,i._PBRMaterialParams,i._PBRMaterialParams.pbrMetallicRoughness.rainEffect,"rippleTexture")}}function _0x4f0461(e,t){return e.find((e=>t.url.includes(e._fileName)))}function _0x3dbd12(e,t){e._historicalRecord.rootTiles.forEach((i=>{let n=_0x4f0461(e._layerScheduler._rootEntities,i);if(n){let a=i.History[t];if(!a||(a=a.replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,""),a==n._fileName))return;n._fileName=f$Q(a);for(var r=0;r<n._childrenPageLod.length;r++){var o=n._childrenPageLod[r];o=o&&!o.isDestroyed()&&o.destroy()}n._childrenPageLod.length=0,n.attributeBuffer=n.attributeBuffer&&!n.attributeBuffer.isDestroyed()&&n.attributeBuffer.destroy(),e._layerScheduler.LoadingPriority==_0x539352.UsePagedLodInfo&&n._isRootTile?(n._configReady=!1,n._configLoadState=N$Q.UNLOAD):(n._ready=!1,n._s3mLoadState=N$Q.UNLOAD)}}))}_0x1a71e8.prototype.setCustomClipBox=function(e){if(!((e=e||{}).dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$15("dimensions position is required to create CustomClipBox");if(this._clipMode=_0x577081.CLIP_BEHIND_ALL_PLANE,e$2e(e.clipMode))switch(e.clipMode){case"clip_behind_any_plane":this._clipMode=_0x577081.CLIP_BEHIND_ANY_PLANE;break;case"clip_behind_all_plane":this._clipMode=_0x577081.CLIP_BEHIND_ALL_PLANE;break;case"only_keep_line":this._clipMode=_0x577081.ONLY_KEEP_LINE}if(e.dimensions){var t=new p$1d,i=e.position,n=new i$16(e.heading||0,e.pitch||0,e.roll||0);t=m$19.headingPitchRollToFixedFrame(i,n,t$12.WGS84);var r=.5*e.dimensions.x,o=.5*e.dimensions.y,a=.5*e.dimensions.z,s=[];s[0]=new e$2c,s[0].x=-r,s[0].y=o,s[0].z=a,s[0].w=1,s[1]=new e$2c,s[1].x=r,s[1].y=o,s[1].z=a,s[1].w=1,s[2]=new e$2c,s[2].x=r,s[2].y=-o,s[2].z=a,s[2].w=1,s[3]=new e$2c,s[3].x=-r,s[3].y=-o,s[3].z=a,s[3].w=1,s[4]=new e$2c,s[4].x=-r,s[4].y=o,s[4].z=-a,s[4].w=1,s[5]=new e$2c,s[5].x=r,s[5].y=o,s[5].z=-a,s[5].w=1,s[6]=new e$2c,s[6].x=r,s[6].y=-o,s[6].z=-a,s[6].w=1,s[7]=new e$2c,s[7].x=-r,s[7].y=-o,s[7].z=-a,s[7].w=1;for(var l=0;l<8;l++)p$1d.multiplyByVector(t,s[l],s[l]);if(this._sceneMode!==C$14.SCENE3D){var u=new n$1d;for(l=0;l<8;l++){var c=s[l],h=a$18.fromCartesian(c,void 0,_0xc879f9),d=u.project(h,s[l]);p$1d.multiplyByPoint(_0x120895,d,s[l])}}this._oriClipPlane[0]=e$2c.clone(_0x5e87f9(s[0],s[1],s[2])),this._oriClipPlane[1]=e$2c.clone(_0x5e87f9(s[0],s[4],s[1])),this._oriClipPlane[2]=e$2c.clone(_0x5e87f9(s[0],s[3],s[4])),this._oriClipPlane[3]=e$2c.clone(_0x5e87f9(s[6],s[2],s[5])),this._oriClipPlane[4]=e$2c.clone(_0x5e87f9(s[6],s[7],s[2])),this._oriClipPlane[5]=e$2c.clone(_0x5e87f9(s[6],s[5],s[7]))}else for(l=0;l<e.planePos.length;l++){var f=e.planePos[l],p=e.planeNormal[l];this._oriClipPlane[l].x=p.x,this._oriClipPlane[l].y=p.y,this._oriClipPlane[l].z=p.z,this._oriClipPlane[l].w=-o$1p.dot(f,p)}if(!this._clipping){e={layer:this,enable:!0};this.traverseRenderEntity(e,_0x17d53e)}this._clipping=!0},_0x1a71e8.prototype.setClipSection=function(e,t,i,n){var r=u$Z(n,_0x1f23e7.NONE);if(this._clipPlaneMode!==r&&(r!==_0x1f23e7.NONE?this._context.numClampClipPlaneLayer++:this._context.numClampClipPlaneLayer--),this._clipPlaneMode=r,this.isRenderClipSection()){var o=this._renderClipPlaneArray.get(0);e$2e(o)||(o=new _0x597498(this),this._renderClipPlaneArray.set(0,o)),o.setPoints(e,t,i),this._section||this._context.numClampClipPlaneLayer++}},_0x1a71e8.prototype.setCustomClipPlane=function(e,t,i,n){if(this._sceneMode===C$14.COLUMBUS_VIEW&&(e=_0x2405e7(this,e),t=_0x2405e7(this,t),i=_0x2405e7(this,i)),this.setClipSection(e,t,i,n),this._oriClipPlane[0]=_0x5e87f9(e,t,i),this._clipMode=_0x577081.CLIP_BEHIND_ALL_PLANE,this._section=!0,!this._clipping){var r={layer:this,enable:!0};this.traverseRenderEntity(r,_0x17d53e)}this._clipping=!0},_0x1a71e8.prototype.setCustomClipGeometry=function(e){var t=(e=e||{}).geometry;this._spatialClipEnable=!0;var i=e.spatialQuery,n=e.clippingType;i.geometry=t,i.positionMode=_0x243acb(n),i._profile=!0,i._clipLayers.set(this.name,this),this._sqMode=i.positionMode,this._spatialQuery=i,this._clippingType=n},_0x1a71e8.prototype.clearCustomClipGeometry=function(){this._spatialClipEnable=!1},_0x1a71e8.prototype.setCustomClipCross=function(e){if(!(e=e||{}).dimensions||!e.position)throw new t$15("dimensions position is required to create CustomClipBox");this._clipMode=_0x577081.CLIP_BEHIND_ALL_PLANE;var t,i,n,r=new p$1d,o=e.position;t=e.heading||0,i=e.pitch||0,n=e.roll||0;var a,s,l,u=u$Z(e.extrudeDistance,.1),c=new i$16(e$2d.toRadians(t),e$2d.toRadians(i),e$2d.toRadians(n));if(this._sceneMode===C$14.SCENE3D)r=m$19.headingPitchRollToFixedFrame(o,c,t$12.WGS84);else{var h=_0x2405e7(this,o);p$1d.setTranslation(p$1d.clone(p$1d.IDENTITY),h,r);var d=p$1e.fromHeadingPitchRoll(c);p$1d.multiplyByMatrix3(r,d,r)}a=.5*e.dimensions.x,s=.5*e.dimensions.y,l=u;var f=[];f[0]=new e$2c,f[0].x=-a,f[0].y=s,f[0].z=l,f[0].w=1,f[1]=new e$2c,f[1].x=a,f[1].y=s,f[1].z=l,f[1].w=1,f[2]=new e$2c,f[2].x=a,f[2].y=-s,f[2].z=l,f[2].w=1,f[3]=new e$2c,f[3].x=-a,f[3].y=-s,f[3].z=l,f[3].w=1,f[4]=new e$2c,f[4].x=-a,f[4].y=s,f[4].z=-l,f[4].w=1,f[5]=new e$2c,f[5].x=a,f[5].y=s,f[5].z=-l,f[5].w=1,f[6]=new e$2c,f[6].x=a,f[6].y=-s,f[6].z=-l,f[6].w=1,f[7]=new e$2c,f[7].x=-a,f[7].y=-s,f[7].z=-l,f[7].w=1;for(var p=0;p<8;p++)p$1d.multiplyByVector(r,f[p],f[p]);this._oriClipPlane[0]=new e$2c(0,0,0,0),this._oriClipPlane[1]=e$2c.clone(_0x5e87f9(f[0],f[4],f[1])),this._oriClipPlane[2]=e$2c.clone(_0x5e87f9(f[0],f[3],f[4])),this._oriClipPlane[3]=e$2c.clone(_0x5e87f9(f[6],f[2],f[5])),this._oriClipPlane[4]=e$2c.clone(_0x5e87f9(f[6],f[7],f[2])),this._oriClipPlane[5]=e$2c.clone(_0x5e87f9(f[6],f[5],f[7])),this._clipping||this.traverseRenderEntity({layer:this,enable:!0},_0x17d53e),this._clipping=!0},_0x1a71e8.prototype.getClipRegion=function(){if(this._clipping){var e=o$1m.fromCartesian4(this._oriClipPlane[0]),t=this._layerBounds;if(e$2e(t)){var i=h$18.southwest(t),n=h$18.northwest(t),r=h$18.northeast(t),o=h$18.southeast(t);i=o$1p.fromRadians(i.longitude,i.latitude,i.height),n=o$1p.fromRadians(n.longitude,n.latitude,n.height),r=o$1p.fromRadians(r.longitude,r.latitude,r.height),o=o$1p.fromRadians(o.longitude,o.latitude,o.height);var a=new o$1p(0,0,0),s=o$1p.normalize(i,new o$1p),l=o$1p.normalize(n,new o$1p),u=o$1p.normalize(r,new o$1p),c=o$1p.normalize(o,new o$1p),h=new f$19(a,s),d=new f$19(a,l),f=new f$19(a,u),p=new f$19(a,c),_=g$1j.rayPlane(h,e),m=g$1j.rayPlane(d,e),g=g$1j.rayPlane(f,e),x=g$1j.rayPlane(p,e);if(e$2e(_)&&e$2e(m)&&e$2e(g)&&e$2e(x))return{polygon:{hierarchy:[_,m,g,x],material:e$1X.WHITE.withAlpha(.5),perPositionHeight:!0}}}}},_0x1a71e8.prototype.addWaterPlane=function(e){if(!(e=e||{}).boundingVolume)throw new t$15("position radius distance is required to add the plane");this._waterPlanes=this._waterPlanes?this._waterPlanes:new e$1Q;var t=this._waterPlanes.length;return this._waterPlanes.set(t,e),t},_0x1a71e8.prototype.removeWaterPlane=function(e){this._waterPlanes.remove(e)},_0x1a71e8.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x1a71e8.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~3");return 1<<e&this._visibleViewport},_0x1a71e8.prototype.setFlattenRegionVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._flattenVisibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x1a71e8.prototype.updateShadow=function(){var e={layer:this};this.traverseRenderEntity(e,_0x14db7e)},_0x1a71e8.prototype.isSilhouette=function(){return this._selectColorType===Zr$3.SILHOUETTE||this._selectColorType===Zr$3.ALWAYS_SHOW_SILHOUETTE},_0x1a71e8.prototype.isRenderClipSection=function(){return this._clipPlaneMode!==_0x1f23e7.NONE},_0x1a71e8.prototype.bloomEnableChange=function(e){e?this._context.numPostEffectFilterObject++:this._context.numPostEffectFilterObject--},_0x1a71e8.prototype.lightSourceChanged=function(e){this.traverseRenderEntity({changedList:e,layer:this},_0x40e599)},_0x1a71e8.prototype.getAttributesById=function(e){if(0!==parseInt(e)&&!parseInt(e))throw new t$15("id must be a number!");return this._layerScheduler.getAttributesById(e)},_0x1a71e8.prototype.traverseRenderEntity=function(e,t){this._layerScheduler.traverseRenderEntity(e,t)},_0x1a71e8.prototype.isDestroyed=function(){return!1},_0x1a71e8.prototype.destroy=function(){this.residentRootTile=!1,this.clearMemoryImmediately=!0,e$2e(this._layerScheduler)&&(this._layerScheduler.destroy(),this._layerScheduler=null);for(var e=0;e<this._flattenRegions.values.length;e++)this._flattenRegions.values[e].destroy(),this._flattenRegions.values[e]=null;this._flattenRegions.removeAll(),delete this._flattenBounds,this._flattenBounds=null,e$2e(this._flattenTexture)&&(this._flattenTexture.destroy(),this._flattenTexture=null);for(var t=Object.keys(this._excavationRegions._hash),i=(e=0,t.length);e<i;e++){var n=t[e];this._excavationRegions.get(n).destroy(),this._removeExcavationCommands(n)}if(this._excavationRegions.removeAll(),delete this._excavationBounds,this._excavationBounds=null,e$2e(this._excavationTexture)&&(this._excavationTexture.destroy(),this._excavationTexture=null),e$2e(this._excavationSideTexture)&&(this._excavationSideTexture.destroy(),this._excavationSideTexture=null),e$2e(this._excavationBottomTexture)&&(this._excavationBottomTexture.destroy(),this._excavationBottomTexture=null),e$2e(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),e$2e(this._hypsometricRenderTexture)&&(this._hypsometricRenderTexture.destroy(),this._hypsometricRenderTexture=null),e$2e(this._hypsometricSetting)&&(this._hypsometricSetting.destroy(),this._hypsometricSetting=null),e$2e(this._hypsometricRegion)&&(this._hypsometricRegion.destroy(),this._hypsometricRegion=null),e$2e(this._noiseMapTexture)&&(this._noiseMapTexture.destroy(),this._noiseMapTexture=null),e$2e(this._pbrMetalTexture)&&(this._pbrMetalTexture.destroy(),this._pbrMetalTexture=null),e$2e(this._pbrRoughTexture)&&(this._pbrRoughTexture.destroy(),this._pbrRoughTexture=null),this._fileType===p$T.ClampGroundRealtimeRasterCache&&this.refreshRaster(),e$2e(this._spatialQuery)&&e$2e(this._spatialQuery._clipLayers)&&this._spatialQuery._clipLayers.remove(this.name),e$2e(this._commonLayerUniformBuffer)&&(this._commonLayerUniformBuffer.destroy(),this._commonLayerUniformBuffer=null),e$2e(this._materialMap))for(var r in this._materialMap)if(this._materialMap.hasOwnProperty(r)){var o=this._materialMap[r].material.pbrMetallicRoughness;if(!e$2e(o))continue;e$2e(o.baseColorTexture)&&o.baseColorTexture.destroy(),e$2e(o.normalTexture)&&o.normalTexture.destroy(),e$2e(o.emissiveTexture)&&o.emissiveTexture.destroy(),e$2e(o.metallicRoughnessTexture)&&o.metallicRoughnessTexture.destroy(),e$2e(o.occlusionTexture)&&o.occlusionTexture.destroy()}if(e$2e(this._spatialQuery)&&e$2e(this._spatialQuery._clipLayers)&&this._spatialQuery._clipLayers.remove(this.name),e$2e(this.instanceSkeletonManager)){for(var r in this.instanceSkeletonManager.skeletons._hash)this.instanceSkeletonManager.skeletons._hash.hasOwnProperty(r)&&this.instanceSkeletonManager.remove(r);this.instanceSkeletonManager=void 0}return e$2e(this._layerUBO)&&(this._layerUBO.destroy(),this._layerUBO=null),i$11(this)},_0x1a71e8.prototype.setVolume=function(e){if(!(e$2e(e.values)&&e$2e(e.width)&&e$2e(e.height)&&e$2e(e.depth)&&e$2e(e.maxValue)&&e$2e(e.minValue)&&e$2e(e.maxHeight)&&e$2e(e.minHeight)&&e$2e(e.bounds)))throw new t$15("invalid volume object");this._volData={};var t=e.width,i=e.height,n=e.depth,r=Math.ceil(Math.sqrt(n));this._volData._nSideBlockCount=r;var o=Math.max(t,i)+2;this._volData._nBlockLength=o;var a=_0x2a3c4e(o*r-2);this._volData._nLength=a;var s=e.maxValue,l=e.minValue;this._volData._maxValue=s,this._volData._minValue=l,this._volData._width=t,this._volData._height=i,this._volData._depth=n;var u=e.bounds.leftBottom.x,c=e.bounds.rightTop.y,h=e.bounds.rightTop.x,d=e.bounds.leftBottom.y;this._volData._volBounds={left:u,top:c,right:h,bottom:d,minHeight:e.minHeight,maxHeight:e.maxHeight,width:h-u,length:c-d,height:e.maxHeight-e.minHeight};var f=a*a,p=new Array(f);p.fill(-1);for(var _=s-l,m=0;m<n;m++)for(var g=parseInt(m/r)*o,x=m%r*o,y=0;y<o-2;y++)for(var v=0;v<o-2;v++){var $=Math.min(v,t-1),b=m*i*t+(i-1-Math.min(y,i-1))*t+$,T=e.values[b];new e$2c(0,0,0,0),-9999!=T&&(T=(T-l)/_,p[b=(g+y)*a+x+v]=T)}var C=new Float32Array(p,0,f);this._volData._buffer=new Uint8Array(C.buffer,0,4*f),this._fMaxValue=s,this._fMinValue=l},_0x1a71e8.prototype._setSQTextures=function(e){this._sqTextures=e},_0x1a71e8.prototype._setSQViewPrjMatrix=function(e,t){this._sqViewMatirx=e,this._sqPrjMatirx=t},_0x1a71e8.prototype._setSQMode=function(e){this._sqMode=e},_0x1a71e8.prototype._updateEdgeDistanceFalloffFactor=function(){0!=this._edgeCurrentCount?(this._edgeDistanceFalloffFactor=this._edgeCurrentTotalLength/this._edgeCurrentCount*40,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0):this._edgeCurrentTotalLength=0},_0x1a71e8.prototype._addRenderedEdge=function(e,t){this._edgeCurrentTotalLength+=e,this._edgeCurrentCount+=t},_0x1a71e8.prototype.setTextureEmissive=function(e){if(e!==this.textureEmissionUnit){this.textureEmissionUnit=e;var t={enable:!0};t.layer=this,this.traverseRenderEntity(t,_0x58a6f5)}},_0x1a71e8.prototype.setPBRMaterial=function(e){LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_setPBRMaterial");var t=this._pbrParameter;if(this._pbrParameter|=e,t!==this._pbrParameter){var i={enable:!0};i.layer=this,this.traverseRenderEntity(i,_0x5b4d78)}},_0x1a71e8.prototype.setPBRMaterialFromJSON=function(e){if(LicenseChecker.LICENSECHECKER.verify("S3MTilesLayer_setPBRMaterial"),this._pbrParameter===Xe$e.NONE){var t=this,i="string"==typeof e;t._PBRMaterialParams.baseUri=i?i$1b(e):"",i?u$P(e).then((function(e){_0x278a45(e,t)})):_0x278a45(e,t),this._usePBR=!0}},_0x1a71e8.prototype._updatePBRMaterial=function(){if(e$2e(this._PBRMaterialParams)&&e$2e(this._PBRMaterialParams.pendingTextureCount)&&this._PBRMaterialParams.pendingTextureCount===this._PBRMaterialParams.readyTextureCount){var e={enable:!0};e.layer=this,this.traverseRenderEntity(e,_0x5b4d78),this._PBRMaterialParams.loadingTexture=!1}},_0x1a71e8.prototype.removePBRMaterial=function(){var e=this._PBRMaterialParams.pbrMetallicRoughness;for(var t in e)e.hasOwnProperty(t)&&e[t]instanceof t$U&&e[t].destroy();this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:0,baseColor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:o$1p.ZERO,emissiveTextureIndex:-1,occlusionTextureIndex:-1,metallicRoughnessTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0,intensityScale:1,snowEffect:void 0,rainEffect:void 0},loadingTexture:void 0},this._usePBR=!1;var i={enable:!0};i.layer=this,this.traverseRenderEntity(i,_0x5b4d78)},_0x1a71e8.prototype.setExtrudedPolygons=function(e,t){this._layerScheduler._extrudedId=e,this._layerScheduler._polygons=t},_0x1a71e8.prototype._initEdgeTexture=function(){var e=[1,256,65536,16777216];function t(t,i,n){var r,o,a,s;n=u$Z(n,0),r=t,o=0,a=1,t=Math.min(Math.max(r,o),a);for(var l=0;l<4;l++)i[n+l]=Math.floor(256*((s=t*e[l])-Math.floor(s)))}const i=8,n=256,r=[{distance:[-1.59027,-1.59426,-1.59674,-1.59766,-1.59702,-1.59479,-1.59095,-1.5855,-1.57843,-1.56973,-1.55942,-1.5475,-1.53398,-1.5189,-1.50226,-1.4841,-1.46446,-1.44337,-1.42088,-1.39703,-1.37188,-1.34547,-1.31786,-1.28912,-1.2593,-1.22847,-1.19668,-1.16402,-1.13053,-1.09629,-1.06137,-1.02582,-.98972,-.95313,-.91611,-.87872,-.84102,-.80306,-.76488,-.72654,-.68807,-.64952,-.61092,-.57232,-.53375,-.49527,-.45692,-.41874,-.38078,-.34309,-.3057,-.26867,-.23204,-.19585,-.16015,-.12497,-.09036,-.05634,-.02296,.00977,.04183,.07321,.10389,.13386,.16313,.19169,.21956,.24672,.27321,.299,.32413,.34858,.37237,.3955,.41798,.43981,.461,.48154,.50145,.52073,.53939,.55744,.57488,.5917,.6079,.62347,.63837,.65259,.66609,.67885,.69083,.70201,.71235,.72183,.73042,.73812,.7449,.75076,.7557,.75973,.76284,.76507,.76642,.76692,.76659,.76545,.76352,.76083,.7574,.75324,.74837,.74279,.73652,.72959,.72199,.71377,.70493,.69553,.68558,.67515,.66426,.65298,.64135,.62944,.6173,.60499,.59257,.58008,.56759,.55513,.54275,.5305,.51842,.50654,.4949,.48353,.47246,.4617,.45128,.44121,.43149,.42213,.41313,.40448,.39617,.38818,.3805,.37309,.36594,.35902,.35229,.34572,.33927,.33292,.32663,.32035,.31407,.30774,.30135,.29486,.28824,.28148,.27454,.26739,.26002,.25241,.24454,.23639,.22796,.21922,.21016,.20076,.19098,.18082,.17023,.1592,.14768,.13566,.1231,.10996,.09624,.08188,.06688,.05121,.03485,.01778,0,-.0185,-.03771,-.05763,-.07824,-.09952,-.12144,-.14396,-.16706,-.19069,-.21481,-.23938,-.26436,-.28971,-.31539,-.34136,-.36759,-.39404,-.42067,-.44746,-.47437,-.50136,-.52839,-.55544,-.58248,-.60948,-.63642,-.66329,-.6901,-.71684,-.74352,-.77015,-.79675,-.82332,-.84988,-.87644,-.90301,-.92958,-.95615,-.98272,-1.00926,-1.03575,-1.06217,-1.08847,-1.11463,-1.1406,-1.16633,-1.19178,-1.2169,-1.24164,-1.26595,-1.28979,-1.31312,-1.3359,-1.35809,-1.37963,-1.4005,-1.42064,-1.44,-1.45853,-1.47616,-1.49285,-1.50853,-1.52313,-1.53659,-1.54886,-1.55986,-1.56955,-1.57788,-1.5848],pressure:[-.01365,-.00206,.01025,.02327,.03696,.05129,.06619,.08163,.09755,.11393,.1307,.14784,.16531,.18308,.20111,.21938,.23786,.25651,.2753,.29419,.31315,.33215,.35115,.37015,.38913,.40806,.42694,.44576,.46449,.48313,.50167,.5201,.53839,.55653,.57448,.59222,.60971,.62692,.6438,.66033,.67648,.69221,.70753,.72242,.73688,.75093,.76456,.77779,.79063,.80309,.81517,.82686,.83817,.84911,.85967,.86987,.87972,.88924,.89845,.90734,.91594,.92425,.93229,.94005,.94754,.95475,.96166,.96826,.97451,.9804,.98588,.99092,.99549,.99957,.99685,.99381,.99131,.98936,.98796,.98711,.98681,.98706,.98787,.98923,.99113,.99357,.99654,1,.99607,.99171,.98695,.98181,.97634,.97057,.96452,.95824,.95175,.94506,.93818,.93113,.92389,.91647,.90887,.90109,.89314,.88501,.87672,.86831,.85978,.85119,.84256,.83393,.82533,.8168,.80836,.80002,.79181,.78374,.77582,.7681,.76059,.75331,.74629,.73955,.73311,.72697,.72116,.71568,.71054,.70572,.70121,.697,.69304,.68931,.68576,.68236,.67905,.67582,.67262,.66941,.66619,.66291,.65957,.65613,.65259,.64892,.6451,.6411,.6369,.63248,.62783,.62295,.61783,.61247,.60688,.60104,.59498,.58868,.58216,.57542,.56845,.56125,.5538,.5461,.53813,.52986,.52129,.51239,.50316,.49359,.4837,.47349,.46299,.45223,.44124,.43005,.41869,.40719,.39557,.38386,.37207,.36023,.34836,.33648,.32464,.31287,.30119,.28963,.27822,.26698,.25594,.2451,.23448,.22409,.21391,.20394,.19415,.18452,.17503,.16565,.15636,.14713,.13794,.1288,.11968,.11058,.10151,.09247,.08346,.07447,.06552,.05659,.0477,.03885,.03007,.02137,.01278,.00433,-.00393,-.012,-.01983,-.02738,-.03463,-.04155,-.0481,-.05429,-.0601,-.06553,-.07057,-.07524,-.07954,-.08347,-.08703,-.09022,-.09303,-.09544,-.09744,-.09898,-.10004,-.10059,-.1006,-.10005,-.09892,-.0972,-.09487,-.09192,-.08833,-.08409,-.07918,-.07357,-.06724,-.06019,-.0524,-.04386,-.03455,-.02448]},{distance:[-3.46259,-3.47131,-3.47668,-3.47863,-3.47712,-3.4721,-3.46352,-3.45138,-3.43566,-3.41635,-3.39347,-3.36704,-3.33709,-3.30368,-3.26684,-3.22667,-3.18322,-3.1366,-3.08689,-3.0342,-2.97865,-2.92036,-2.85946,-2.79607,-2.73034,-2.66241,-2.59242,-2.52052,-2.44686,-2.37159,-2.29485,-2.2168,-2.13757,-2.05731,-1.97616,-1.89426,-1.81174,-1.72875,-1.64543,-1.56191,-1.47833,-1.39483,-1.3115,-1.22847,-1.14581,-1.06361,-.98193,-.90083,-.82036,-.74054,-.66141,-.583,-.50532,-.4284,-.35228,-.277,-.20261,-.12916,-.05672,.01463,.08485,.15384,.22153,.28784,.35269,.41602,.47776,.53787,.59629,.653,.70799,.76123,.81274,.86253,.9106,.95698,1.0017,1.04477,1.0862,1.126,1.16415,1.20065,1.23546,1.26857,1.29994,1.32953,1.35731,1.38321,1.40719,1.42921,1.44922,1.46719,1.48309,1.49691,1.50862,1.51825,1.52581,1.53133,1.53486,1.53644,1.53616,1.53409,1.53031,1.52493,1.51803,1.50972,1.50009,1.48924,1.47725,1.46421,1.45019,1.43527,1.4195,1.40295,1.38568,1.36778,1.34929,1.3303,1.31087,1.29108,1.27099,1.25066,1.23018,1.2096,1.18898,1.16838,1.14785,1.12745,1.10721,1.08719,1.06741,1.04791,1.02871,1.00986,.99136,.97324,.95551,.93819,.92127,.90476,.88866,.87296,.85767,.84277,.82823,.81406,.80022,.7867,.77346,.76049,.74774,.73519,.72278,.71049,.69827,.68606,.67381,.66145,.64893,.63618,.62313,.60973,.5959,.5816,.56675,.5513,.53516,.51826,.50053,.4819,.46231,.44169,.42002,.39725,.37336,.34834,.32219,.2949,.2665,.23698,.20638,.17469,.14193,.10809,.07316,.03714,0,-.03827,-.07772,-.11836,-.16022,-.20332,-.24768,-.29332,-.34024,-.38844,-.43788,-.48854,-.54036,-.59329,-.64724,-.70211,-.75782,-.81425,-.87128,-.92881,-.98674,-1.04498,-1.10346,-1.1621,-1.22086,-1.27969,-1.33854,-1.3974,-1.45625,-1.51511,-1.57396,-1.63283,-1.69173,-1.75067,-1.80968,-1.86875,-1.9279,-1.98712,-2.04639,-2.10568,-2.16495,-2.22416,-2.28322,-2.34208,-2.40063,-2.4588,-2.51647,-2.57354,-2.62989,-2.68543,-2.74002,-2.79357,-2.84597,-2.89711,-2.94689,-2.99521,-3.04195,-3.087,-3.13023,-3.17152,-3.21075,-3.24779,-3.28252,-3.3148,-3.34451,-3.37154,-3.39577,-3.41709,-3.43539,-3.45059],pressure:[.87183,.87151,.87129,.87118,.87117,.87128,.87149,.87182,.87225,.8728,.87347,.87424,.87513,.87613,.87723,.87845,.87978,.88122,.88276,.88441,.88616,.88801,.88996,.892,.89414,.89637,.89868,.90108,.90356,.90611,.90874,.91144,.91421,.91704,.91993,.92287,.92587,.92892,.93201,.93514,.93831,.94151,.94474,.94799,.95126,.95456,.95786,.96118,.9645,.96783,.97116,.97448,.9778,.98111,.98441,.9877,.99096,.99421,.99742,.99938,.99622,.9931,.99001,.98697,.98397,.98101,.97811,.97526,.97246,.96972,.96703,.96441,.96185,.95935,.95691,.95455,.95225,.95002,.94786,.94577,.94376,.94182,.93995,.93817,.93646,.93483,.93328,.93181,.93042,.92911,.92788,.92673,.92566,.92467,.92376,.92293,.92217,.92149,.92088,.92034,.91987,.91947,.91913,.91886,.91864,.91849,.91838,.91833,.91834,.91839,.91849,.91863,.91883,.91907,.91935,.91968,.92005,.92046,.92092,.92142,.92195,.92253,.92314,.9238,.92449,.92521,.92598,.92677,.9276,.92847,.92936,.93029,.93125,.93224,.93325,.9343,.93537,.93646,.93758,.93872,.93988,.94106,.94225,.94346,.94469,.94593,.94718,.94844,.94971,.95098,.95226,.95354,.95482,.9561,.95738,.95867,.95995,.96122,.9625,.96377,.96504,.9663,.96757,.96883,.97009,.97135,.97261,.97387,.97513,.9764,.97767,.97895,.98023,.98153,.98284,.98416,.98549,.98684,.98821,.9896,.99101,.99244,.99389,.99537,.99688,.99842,1,.99839,.99675,.99508,.99336,.99161,.98982,.98799,.98613,.98422,.98228,.98029,.97827,.97622,.97414,.97202,.96987,.9677,.96551,.9633,.96107,.95882,.95656,.9543,.95202,.94975,.94747,.94519,.94292,.94065,.93838,.93613,.93388,.93164,.92941,.9272,.92499,.9228,.92062,.91846,.91631,.91418,.91207,.90998,.90792,.90588,.90387,.90189,.89995,.89804,.89617,.89434,.89256,.89083,.88914,.88752,.88595,.88443,.88299,.88161,.8803,.87907,.87791,.87683,.87584,.87494,.87412,.8734,.87278,.87225]},{distance:[.39335,.43437,.47737,.52234,.56923,.61801,.66864,.72109,.7753,.83123,.88882,.94801,1.00875,1.07097,1.13461,1.1996,1.26586,1.33333,1.40193,1.47158,1.54221,1.61373,1.68607,1.75913,1.83284,1.90711,1.98186,2.05699,2.13243,2.20809,2.28387,2.35971,2.4355,2.51117,2.58663,2.66179,2.73658,2.81092,2.88473,2.95792,3.03043,3.10217,3.17308,3.24309,3.31211,3.3801,3.44697,3.51267,3.57712,3.64028,3.70208,3.76247,3.8214,3.87881,3.93467,3.98892,4.04152,4.09244,4.14164,4.18908,4.23474,4.27859,4.32061,4.36077,4.39905,4.43544,4.46992,4.50249,4.53314,4.56185,4.58864,4.61349,4.63642,4.65745,4.67657,4.69381,4.7092,4.72274,4.73447,4.74441,4.75259,4.75903,4.76376,4.76682,4.76822,4.768,4.76618,4.76279,4.75786,4.75142,4.74348,4.73409,4.72326,4.71102,4.69739,4.68241,4.6661,4.64849,4.6296,4.60948,4.58816,4.56567,4.54204,4.51732,4.49154,4.46473,4.43694,4.4082,4.37854,4.348,4.31662,4.28443,4.25145,4.21773,4.1833,4.14819,4.11243,4.07606,4.03912,4.00162,3.96361,3.92512,3.88618,3.84683,3.80708,3.76697,3.72653,3.68579,3.64478,3.60351,3.56202,3.52033,3.47845,3.43642,3.39425,3.35196,3.30957,3.2671,3.22455,3.18196,3.13933,3.09668,3.05402,3.01136,2.96873,2.92613,2.88357,2.84108,2.79865,2.75631,2.71407,2.67195,2.62994,2.58807,2.54634,2.50477,2.46338,2.42216,2.38114,2.34032,2.29971,2.25933,2.21916,2.17923,2.13954,2.10008,2.06087,2.02189,1.98316,1.94468,1.90644,1.86845,1.83069,1.79316,1.75586,1.71877,1.68189,1.6452,1.60868,1.57232,1.53611,1.50004,1.46407,1.4282,1.39241,1.35668,1.321,1.28535,1.24972,1.2141,1.17849,1.14286,1.10723,1.07158,1.03593,1.00028,.96464,.92902,.89344,.85793,.8225,.78719,.75203,.71705,.68231,.64784,.61369,.57991,.54656,.51368,.48134,.44959,.41849,.3881,.35848,.32967,.30174,.27474,.24872,.22373,.19982,.17702,.15539,.13497,.11579,.09791,.08137,.06621,.05248,.04022,.02948,.02029,.01271,.00677,.00252,0,-76e-5,27e-5,.00314,.00788,.01451,.02307,.03357,.04604,.0605,.07697,.09546,.11599,.13858,.16322,.18992,.21869,.24952,.28241,.31735,.35434],pressure:[.95248,.95236,.95228,.95223,.95222,.95224,.95231,.95241,.95256,.95274,.95296,.95322,.95352,.95385,.95423,.95465,.9551,.9556,.95613,.9567,.95731,.95796,.95864,.95936,.96012,.96091,.96173,.96259,.96348,.9644,.96535,.96633,.96734,.96838,.96944,.97053,.97164,.97277,.97393,.9751,.97629,.9775,.97873,.97997,.98122,.98249,.98376,.98505,.98634,.98763,.98893,.99023,.99154,.99284,.99414,.99544,.99673,.99802,.9993,.99942,.99816,.99691,.99568,.99445,.99324,.99205,.99087,.98972,.98858,.98746,.98636,.98528,.98423,.9832,.98219,.98121,.98025,.97931,.9784,.97752,.97666,.97582,.97501,.97423,.97347,.97274,.97203,.97135,.9707,.97007,.96948,.9689,.96836,.96784,.96735,.96689,.96646,.96605,.96567,.96533,.965,.96471,.96445,.96421,.964,.96382,.96367,.96355,.96346,.96339,.96335,.96334,.96336,.9634,.96348,.96358,.9637,.96385,.96403,.96423,.96446,.96471,.96499,.96529,.96561,.96595,.96631,.96669,.96709,.96751,.96795,.9684,.96887,.96935,.96984,.97035,.97087,.9714,.97194,.97249,.97304,.97361,.97418,.97476,.97534,.97592,.97651,.97711,.9777,.9783,.9789,.9795,.9801,.9807,.9813,.9819,.9825,.98309,.98369,.98428,.98486,.98545,.98603,.98661,.98718,.98775,.98832,.98888,.98944,.99,.99056,.99112,.99167,.99223,.99279,.99335,.99392,.99449,.99507,.99565,.99624,.99684,.99745,.99807,.9987,.99934,1,.99933,.99866,.99797,.99727,.99656,.99583,.9951,.99435,.99359,.99283,.99205,.99126,.99046,.98966,.98885,.98803,.9872,.98637,.98554,.9847,.98387,.98303,.98219,.98134,.9805,.97967,.97883,.978,.97717,.97634,.97552,.97471,.97389,.97309,.97229,.9715,.97071,.96993,.96915,.96838,.96762,.96687,.96612,.96539,.96466,.96395,.96324,.96255,.96187,.9612,.96055,.95991,.95929,.95869,.95811,.95754,.957,.95648,.95599,.95552,.95508,.95467,.95428,.95393,.9536,.95331,.95305,.95283,.95264]},{distance:[2.85606,2.86149,2.86432,2.8645,2.862,2.85686,2.84912,2.83886,2.82618,2.81117,2.79393,2.77456,2.75314,2.72975,2.70447,2.67734,2.64844,2.61784,2.58564,2.55196,2.5169,2.48057,2.44305,2.40438,2.36462,2.32383,2.28208,2.23943,2.19591,2.15153,2.10628,2.06016,2.01321,1.96548,1.91702,1.86793,1.8183,1.76829,1.71803,1.66767,1.61737,1.56726,1.51746,1.46803,1.41902,1.37044,1.32228,1.27452,1.22716,1.18023,1.13376,1.08781,1.04244,.99769,.95357,.91003,.86701,.82447,.78238,.74069,.69938,.65836,.61758,.57699,.53656,.49627,.45611,.41611,.37632,.33683,.29776,.25924,.22141,.18441,.14839,.11346,.07972,.04727,.01619,-.01348,-.0417,-.0684,-.09351,-.11698,-.13875,-.1588,-.17713,-.19381,-.20889,-.22242,-.23444,-.24501,-.25421,-.26216,-.26897,-.27473,-.27951,-.28336,-.28631,-.28836,-.28948,-.28963,-.28873,-.28673,-.28355,-.27916,-.27354,-.26673,-.25878,-.2498,-.23992,-.22929,-.21802,-.20623,-.19398,-.18134,-.16836,-.1551,-.14163,-.12809,-.11461,-.1013,-.08826,-.07557,-.06335,-.0517,-.04077,-.03065,-.02143,-.01321,-.00606,0,.00496,.00888,.01181,.01385,.01511,.0157,.01574,.01533,.01458,.01358,.0124,.01112,.00979,.00851,.00738,.0065,.006,.00596,.00646,.00754,.00924,.01161,.01471,.01858,.02323,.02865,.03481,.04169,.0493,.05765,.06677,.07671,.08754,.09934,.11222,.12628,.14159,.15823,.17624,.19561,.21632,.23828,.26142,.28563,.31083,.33696,.36397,.39185,.42057,.4501,.48036,.51125,.54264,.5744,.60646,.63871,.67105,.70337,.73556,.76751,.79918,.83048,.86139,.8919,.92202,.95184,.98144,1.01094,1.04045,1.0701,1.10002,1.13029,1.16103,1.1923,1.22416,1.25664,1.28979,1.32364,1.35824,1.39363,1.42985,1.4669,1.50475,1.54332,1.58252,1.62227,1.6625,1.70312,1.744,1.78501,1.82598,1.8668,1.90734,1.94754,1.98732,2.02666,2.06555,2.10402,2.1421,2.17985,2.2173,2.25448,2.29139,2.328,2.36424,2.4,2.43515,2.46955,2.50309,2.53565,2.56717,2.59761,2.62692,2.65505,2.68191,2.7074,2.73138,2.75375,2.7744,2.79324,2.81017,2.82504,2.83772,2.8481],pressure:[.22758,.23641,.24578,.25568,.26609,.27699,.28835,.30016,.31237,.32495,.33789,.35113,.36466,.37843,.39241,.40658,.4209,.43535,.44989,.4645,.47916,.49385,.50853,.5232,.53784,.55243,.56696,.58141,.59578,.61004,.62419,.63821,.65209,.6658,.67934,.69268,.70582,.71873,.73139,.7438,.75594,.76779,.77935,.79061,.80156,.81221,.82254,.83258,.84231,.85176,.86091,.86978,.87837,.88669,.89473,.9025,.91,.91725,.92425,.931,.93752,.9438,.94985,.95566,.96124,.96658,.97168,.97652,.98109,.98539,.98939,.99309,.99646,.99949,.99783,.99552,.99361,.99209,.99098,.99029,.99003,.99019,.99079,.99181,.99324,.9951,.99735,1,.99698,.99361,.98992,.98592,.98163,.97709,.97231,.96731,.96212,.95676,.95122,.94554,.93973,.93378,.92773,.92157,.91532,.90899,.90258,.89612,.88961,.88308,.87653,.87,.8635,.85705,.85068,.8444,.83823,.83219,.82628,.82052,.81493,.80952,.8043,.79929,.7945,.78994,.78561,.78151,.77765,.77402,.77062,.76742,.76443,.76161,.75896,.75645,.75406,.75175,.74951,.7473,.74511,.74289,.74064,.73833,.73592,.73341,.73078,.728,.72507,.72197,.71869,.71522,.71156,.70769,.70363,.69936,.69489,.69021,.68533,.68023,.67492,.66939,.66363,.65765,.65145,.64501,.63833,.63143,.62428,.61691,.60931,.60148,.59344,.58521,.57679,.5682,.55948,.55063,.54167,.53264,.52354,.51439,.50522,.49603,.48686,.47773,.46865,.45964,.45072,.44192,.43324,.42469,.41629,.40804,.39994,.392,.3842,.37655,.36903,.36164,.35437,.3472,.34012,.33312,.3262,.31933,.31251,.30574,.299,.2923,.28563,.27899,.27239,.26583,.25933,.25288,.24652,.24025,.2341,.22808,.22221,.21653,.21104,.20576,.20072,.19592,.19138,.18712,.18313,.17943,.17602,.17292,.17013,.16766,.16551,.16369,.16222,.1611,.16036,.16001,.16007,.16055,.16148,.16286,.16471,.16705,.16988,.17321,.17706,.18144,.18636,.19182,.19785,.20443,.21158,.2193]},{distance:[-2.31317,-2.3191,-2.32189,-2.32154,-2.31811,-2.31174,-2.30254,-2.29062,-2.27609,-2.25904,-2.23954,-2.21767,-2.19355,-2.16732,-2.13907,-2.10885,-2.07672,-2.04268,-2.00677,-1.96911,-1.92985,-1.88914,-1.84713,-1.80397,-1.75979,-1.71467,-1.66864,-1.62171,-1.57395,-1.52546,-1.47625,-1.42628,-1.3755,-1.32384,-1.27131,-1.218,-1.16408,-1.10972,-1.05508,-1.00031,-.94551,-.89077,-.83615,-.7817,-.72757,-.6739,-.62076,-.56821,-.51625,-.46484,-.41397,-.36366,-.314,-.26506,-.21689,-.16957,-.12316,-.07766,-.03301,.01085,.05399,.09643,.13827,.17967,.22079,.26176,.30265,.34342,.38397,.42414,.46381,.50285,.54115,.57863,.61524,.65093,.6856,.71914,.75153,.78275,.81283,.84182,.86972,.89651,.92208,.94634,.96919,.99052,1.01025,1.02835,1.04484,1.05976,1.07309,1.08479,1.09492,1.1036,1.11096,1.11714,1.12224,1.12627,1.12916,1.13083,1.13125,1.13036,1.12816,1.12466,1.11992,1.11397,1.10677,1.09827,1.08849,1.07746,1.06527,1.05203,1.03786,1.02283,1.00695,.99025,.97279,.9546,.93573,.9163,.8965,.8765,.85647,.83652,.81687,.79775,.77939,.76199,.74568,.73049,.71635,.70316,.69082,.67925,.66834,.65804,.64831,.63911,.63032,.62184,.61363,.60564,.59788,.59036,.58308,.57597,.5689,.56177,.55447,.5469,.53896,.53062,.5219,.51283,.5034,.49355,.48335,.47287,.46223,.45154,.44085,.43012,.41923,.40805,.39648,.38441,.37176,.35849,.34458,.32999,.31461,.29833,.28109,.26288,.2437,.22361,.20265,.18082,.15807,.13434,.1096,.0838,.0569,.02894,0,-.0298,-.0604,-.09173,-.12364,-.15594,-.18843,-.22092,-.25331,-.28559,-.31781,-.35006,-.38244,-.41502,-.44785,-.48098,-.5144,-.54811,-.58218,-.61666,-.65153,-.68677,-.72232,-.75807,-.79397,-.83002,-.86628,-.90281,-.93968,-.97693,-1.01465,-1.05282,-1.09139,-1.13031,-1.16956,-1.20917,-1.24905,-1.28907,-1.32908,-1.36891,-1.40844,-1.44765,-1.48658,-1.52527,-1.56376,-1.60206,-1.64016,-1.67801,-1.71552,-1.75264,-1.78936,-1.8257,-1.86161,-1.89702,-1.93182,-1.96584,-1.99894,-2.03102,-2.06203,-2.0919,-2.12056,-2.14794,-2.17397,-2.19852,-2.22138,-2.24235,-2.26129,-2.27805,-2.29243,-2.30422],pressure:[.9681,.97424,.98046,.98674,.99309,.9995,.99404,.98754,.981,.97444,.96785,.96124,.95462,.94801,.94139,.93479,.92822,.92167,.91515,.90868,.90225,.89589,.88959,.88336,.87722,.87115,.86519,.85932,.85356,.84792,.84239,.83699,.83173,.8266,.82162,.81679,.81211,.80759,.80324,.79906,.79505,.79121,.78756,.78409,.78081,.77771,.77481,.77211,.76959,.76728,.76516,.76324,.76153,.76001,.75869,.75757,.75665,.75593,.7554,.75507,.75493,.75498,.75523,.75565,.75627,.75706,.75803,.75917,.76049,.76197,.76361,.76541,.76737,.76947,.77172,.77409,.7766,.77923,.78198,.78484,.7878,.79086,.79401,.79724,.80055,.80394,.8074,.81092,.8145,.81813,.82182,.82556,.82934,.83317,.83703,.84093,.84487,.84884,.85284,.85687,.86094,.86503,.86915,.87329,.87746,.88166,.88587,.89011,.89436,.89863,.90291,.9072,.91149,.91579,.92009,.92438,.92867,.93295,.9372,.94144,.94566,.94985,.954,.95812,.96219,.96623,.97021,.97415,.97802,.98184,.9856,.9893,.99293,.9965,1,.99657,.9932,.98991,.98668,.98352,.98042,.97738,.9744,.97148,.9686,.96577,.96298,.96023,.95751,.95482,.95214,.94949,.94684,.9442,.94156,.93892,.93627,.93361,.93094,.92825,.92555,.92284,.9201,.91735,.91458,.91179,.90899,.90616,.90332,.90047,.8976,.89472,.89183,.88893,.88603,.88314,.88024,.87735,.87448,.87162,.86878,.86597,.86319,.86044,.85774,.85508,.85247,.84993,.84744,.84503,.84269,.84042,.83825,.83616,.83417,.83227,.83048,.8288,.82724,.82578,.82445,.82324,.82215,.82119,.82037,.81967,.81911,.81868,.81839,.81824,.81823,.81835,.81862,.81903,.81957,.82026,.82109,.82206,.82317,.82443,.82583,.82737,.82906,.83089,.83287,.83499,.83726,.83968,.84223,.84494,.84778,.85077,.8539,.85717,.86058,.86412,.86781,.87163,.87559,.87968,.88391,.88826,.89275,.89737,.90211,.90698,.91198,.91709,.92233,.92768,.93315,.93873,.94441,.95019,.95607,.96205]},{distance:[4.72925,4.81721,4.9037,4.98859,5.07177,5.15311,5.23249,5.3098,5.38491,5.45772,5.52811,5.59598,5.66122,5.72375,5.78346,5.84028,5.8941,5.94486,5.99248,6.03689,6.07803,6.11584,6.15028,6.18128,6.20882,6.23285,6.25336,6.27031,6.28369,6.29348,6.29969,6.3023,6.30133,6.29678,6.28867,6.27703,6.26187,6.24324,6.22116,6.19567,6.16683,6.13468,6.09928,6.06068,6.01896,5.97417,5.92639,5.87569,5.82217,5.76589,5.70696,5.64545,5.58147,5.5151,5.44644,5.37559,5.30265,5.2277,5.15085,5.0722,4.99184,4.90987,4.82639,4.74151,4.65533,4.56794,4.47945,4.38996,4.29959,4.20843,4.11658,4.02416,3.93125,3.83796,3.74437,3.65057,3.55666,3.46272,3.36884,3.27509,3.18155,3.08831,2.99545,2.90303,2.81114,2.71984,2.62922,2.53933,2.45026,2.36207,2.27484,2.18862,2.10349,2.01951,1.93675,1.85528,1.77515,1.69644,1.61919,1.54348,1.46935,1.39685,1.32605,1.25698,1.18967,1.12417,1.06049,.99863,.93862,.88044,.82408,.76953,.71676,.66574,.61644,.56882,.52282,.47841,.43553,.39413,.35414,.31551,.27817,.24206,.20712,.17328,.14048,.10866,.07776,.04772,.01848,-.00999,-.03776,-.06487,-.09134,-.11721,-.14251,-.16725,-.19144,-.21509,-.2382,-.26076,-.28275,-.30416,-.32496,-.34511,-.36459,-.38334,-.40134,-.41852,-.43485,-.45026,-.46471,-.47815,-.49052,-.50179,-.51189,-.52081,-.52849,-.5349,-.54003,-.54383,-.54627,-.54734,-.54702,-.54528,-.54211,-.53752,-.53149,-.52403,-.51515,-.50487,-.4932,-.48015,-.46575,-.45001,-.43297,-.41463,-.39503,-.37419,-.35213,-.32887,-.30443,-.27885,-.25214,-.22432,-.19541,-.16544,-.13442,-.10235,-.06926,-.03514,0,.03616,.07336,.11159,.15088,.19125,.23272,.27531,.31906,.36401,.41019,.45764,.5064,.55651,.60802,.66096,.71538,.77129,.82874,.88776,.94836,1.01056,1.07438,1.13982,1.20687,1.27554,1.34581,1.41766,1.49107,1.56599,1.64239,1.72025,1.79951,1.88013,1.96209,2.04532,2.12979,2.21546,2.30226,2.39017,2.47911,2.56905,2.65991,2.75164,2.84416,2.93742,3.03133,3.12582,3.2208,3.31619,3.41191,3.50785,3.60393,3.70006,3.79612,3.89202,3.98765,4.08291,4.17767,4.27182,4.36525,4.45783,4.54944,4.63995],pressure:[.30942,.30838,.30765,.30724,.30715,.30738,.30795,.30884,.31007,.31164,.31354,.31578,.31837,.32129,.32455,.32815,.33209,.33636,.34097,.34591,.35117,.35675,.36265,.36887,.37539,.38221,.38933,.39674,.40442,.41238,.4206,.42907,.43779,.44675,.45593,.46533,.47493,.48473,.49471,.50486,.51517,.52563,.53623,.54694,.55777,.5687,.57971,.59079,.60194,.61313,.62435,.6356,.64686,.65811,.66935,.68056,.69174,.70286,.71391,.72489,.73579,.74659,.75728,.76785,.7783,.7886,.79876,.80877,.81861,.82827,.83776,.84706,.85617,.86507,.87378,.88227,.89056,.89863,.90649,.91412,.92153,.92872,.93568,.94241,.94892,.95519,.96122,.96702,.97258,.97791,.98299,.98783,.99242,.99677,.99911,.99525,.99164,.98827,.98515,.98228,.97966,.97728,.97514,.97324,.97159,.97017,.96898,.96801,.96727,.96674,.96641,.96629,.96635,.96661,.96703,.96762,.96838,.96928,.97032,.97149,.97279,.9742,.97572,.97734,.97905,.98085,.98273,.98468,.98669,.98877,.99091,.99311,.99535,.99765,1,.9976,.99516,.99267,.99014,.98755,.98491,.98222,.97947,.97666,.97378,.97083,.96781,.96471,.96153,.95826,.9549,.95144,.94787,.9442,.94042,.93651,.93249,.92834,.92407,.91966,.91512,.91045,.90564,.90069,.8956,.89037,.885,.87949,.87384,.86806,.86214,.85608,.84988,.84356,.83711,.83053,.82383,.81702,.81009,.80306,.79594,.78872,.78141,.77403,.76657,.75905,.75148,.74385,.73619,.72849,.72076,.71302,.70526,.69749,.68972,.68195,.67419,.66644,.65871,.65099,.64329,.63561,.62795,.62032,.61271,.60512,.59755,.59001,.58248,.57497,.56749,.56002,.55256,.54512,.5377,.5303,.52291,.51554,.50819,.50087,.49358,.48632,.4791,.47192,.4648,.45773,.45072,.44378,.43692,.43015,.42346,.41687,.41039,.40403,.39779,.39168,.38571,.37989,.37423,.36873,.36342,.35828,.35335,.34862,.34409,.3398,.33573,.3319,.32831,.32498,.32192,.31912,.3166,.31436,.31242,.31077]}];function o(e,t){if(!e)return null;var i=e.length/2;const n=.1*i;i=Array(i);let r=0;t=1===t;for(let o=0;o<e.length;o+=2){const a=(e[o]+e[o+1])/2;i[r++]=t?Math.min(n,1-.5*(1-a)):Math.min(n,.5*a)}return i}var a=function(){var e=n,a=e/2;const s=new Uint8Array(4*e*e),l=4*e*a,u=2*(a=i),c=4*e,h=r.length;let d=8*h*c;for(var f of r){var p=f.distance,_=f.pressure;let e=d;for(let i=0;i<9;i++){0!==i&&(p=o(p,0),_=o(_,1));for(let i=0;i<n;i++){const n=_?_[i%_.length]:1;t(.5+(p?p[i%p.length]/u:0),s,e),t(n,s,e+l),e+=4}e-=c*(h+1)}d+=c}return s}(),s=new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR});this._edgeStrokesTexture=new t$U({context:this._frameState.context,source:{width:256,height:256,arrayBufferView:a},sampler:s,flipY:!1});var l=this._edgeStrokesTexture.width,u=this._edgeStrokesTexture.height;this._strokesLog2Resolution=e$2d.log2(l),this._strokesTextureScale=new o$1o(1/l,1/u)},_0x1a71e8.prototype._setFloodTexture=function(e,t,i){this._floodFlagTexture=e,this._floodRect=t;var n=new p$1d;p$1d.inverse(i,n),this._matFloodInvertMatrix=n;var r={};r.layer=this,this.traverseRenderEntity(r,_0x25702b)},_0x1a71e8.prototype._removeFloodTexture=function(){this._floodFlagTexture=void 0,this._floodRect=void 0,this._matFloodInvertMatrix=p$1d.IDENTITY;var e={};e.layer=this,this.traverseRenderEntity(e,_0x15cbc8)},_0x1a71e8.prototype.setHistoryDataByKey=function(e){if(e$2e(this._historicalRecord))if(e$2e(this._historicalRecord.rootTiles))_0x3dbd12(this,e);else{u$P(this._baseUri.toString()+this._historicalRecord,this.customRequestHeaders).then((t=>{this._historicalRecord=t,_0x3dbd12(this,e)}))}},_0x1a71e8.prototype.getHistoryDataKeys=function(){if(!e$2e(this._historicalRecord))return Promise.resolve();if(e$2e(this._historicalRecord.rootTiles))return Promise.resolve(Object.keys(this._historicalRecord.rootTiles[0].History));return u$P(this._baseUri.toString()+this._historicalRecord,this.customRequestHeaders).then((e=>(this._historicalRecord=e,Object.keys(this._historicalRecord.rootTiles[0].History))))};var r$N=function(){if(this._layers=null,this.minQuality=1,this._jsHeapSizeLimitRatio=1,this._maxMemory=1024,s$Z.isPCBroswer()&&(this._maxMemory=4096),window.performance&&window.performance.memory){var e=window.performance.memory.usedJSHeapSize/1048576,t=window.performance.memory.jsHeapSizeLimit/1048576;this._maxMemory=(t-e)*this._jsHeapSizeLimitRatio}this._cacheSize=1024,this._memoryUsed=0,this._memoryPredicted=0,this._quality=1,this._canFastRecover=0,this._downscaleMemoryUsed=this._stableQuality=0,this._QualityShrinkRatio=1.3,this._QualityIncreaseStep=.01,this._updating=0,this._geoMemoryEstimate=0,this._texMemoryEstimate=0,this._EMA=0,this._learningWeight=.9,this._beta=1-this._learningWeight,this._logTime=0,this._showMemoryInfo=!1};r$N.showMemoryInfo=function(e){e$13._showMemoryInfo=e},r$N.setCacheSize=function(e){e$13._cacheSize=Math.min(e,e$13._maxMemory)},r$N.getCacheSize=function(){return e$13._cacheSize},r$N.reAllocateMaxMemory=function(e){if(e$13._jsHeapSizeLimitRatio=e,window.performance&&window.performance.memory){var t=window.performance.memory.usedJSHeapSize/1048576,i=window.performance.memory.jsHeapSizeLimit/1048576;e$13._maxMemory=(i-t)*e$13._jsHeapSizeLimitRatio}},r$N.setMaxMemory=function(e){e$13._maxMemory=e},r$N.getMaxMemory=function(){return e$13._maxMemory};const d$$={GeForce:{1050:3,1060:3,1070:8,1080:8,1650:4,1660:6,2060:6,2070:8,2080:8,3050:8,3060:8,3080:12,3090:24,4070:12,4080:16,4090:24},AMD:{7900:24,7600:8,6950:16,6900:16,6800:16,6750:12,6700:12,6650:8,6600:8,6500:4,6400:4,5700:8,5600:6,5500:8,64:8,56:8,590:8,580:4,570:4,560:4,550:4,480:4,470:4,390:8,380:4,7990:6,7970:3,7950:3,6990:4}};r$N._autoSetMaxMemory=function(e){var t=e.split(" "),i=t.filter((function(e,t){return/^[1-9]/g.test(e)}));if(i.length>0){var n,r=t.indexOf("GeForce")>-1,o=t.indexOf("AMD")>-1,a=i[0];r?n=d$$.GeForce[a]:o&&(n=d$$.AMD[a]),n=e$2e(n)?.9*n:2,n*=1024,r$N.setMaxMemory(n)}},r$N.setMinQuality=function(e){e$13.minQuality=Math.min(e,1)},r$N.getMinQuality=function(){return e$13.minQuality},r$N._memGeometryAdded=function(e){e$13._geoMemoryEstimate+=e},r$N._memGeometryRemoved=function(e){e$13._geoMemoryEstimate-=e},r$N._memTextureAdded=function(e){e$13._texMemoryEstimate+=e},r$N._memTextureRemoved=function(e){e$13._texMemoryEstimate-=e},r$N._attachLayers=function(e){e$13._layers=e},r$N._updateMemory=function(e){var t=1048576*e$13._maxMemory,i=e$13._memoryUsed*t;if(e$13._memoryUsed=e,e$13._memoryPredicted=e$13._memoryUsed-i,e$13._memoryPredicted=0==e$13._EMA?e$13._memoryPredicted:e$13._memoryPredicted*e$13._learningWeight+e$13._EMA*(1-e$13._learningWeight),e$13._EMA=e$13._memoryPredicted,e$13._showMemoryInfo&&e$13._memoryUsed>t){var n=Et$c();n-e$13._logTime>1e4&&(console.log(r$N.getStatistics()),e$13._logTime=n)}e$13._memoryPredicted=(e$13._memoryUsed+e$13._memoryPredicted)/t,e$13._memoryUsed=e$13._memoryUsed/t},r$N.getStatistics=function(){var e="内存上限(MB): "+e$13._maxMemory,t=e$13._memoryUsed;e$13._memoryUsed<1&&(t=1048576*e$13._maxMemory*t);for(var i="当前占用内存(MB): "+t/1048576,n="缓存上限(MB): "+e$13._cacheSize,r="当前缓存占用(MB): ",o=0;o<e$13._layers._layerQueue.length;o++){var a=e$13._layers._layerQueue[o];if(a instanceof _0x1a71e8){var s=a._layerScheduler._getCacheMemoryUsageInBytes()/1048576;r+="第"+o+"层, 图层名:"+a._name+",缓存占用:"+s+","}}var l=e+","+i+","+("渲染质量:"+e$13._quality)+"\n"+n+","+r;if(window.performance&&window.performance.memory){var u=window.performance.memory.totalJSHeapSize/1048576,c=window.performance.memory.usedJSHeapSize/1048576;l+="\n浏览器最大内存(MB):"+window.performance.memory.jsHeapSizeLimit/1048576+",已分配内存(MB):"+c+",堆活跃内存(MB):"+u}return l},r$N.getMemoryUsed=function(){return e$13._memoryUsed},r$N.getQuality=function(){return e$13._quality},r$N._updateQuality=function(e){return(e=Math.min(Math.max(e,e$13.minQuality),1))===e$13._quality?0:(e$13._quality=e,1)},r$N._layersUpdating=function(){for(var e=e$13._layers._layerQueue.length,t=0;t<e;t++){var i=e$13._layers._layerQueue[t];if(i instanceof _0x1a71e8&&i._layerScheduler._updatingTiles()>0)return!0}return!1},r$N.update=function(e){e$13._layers._setMaxMemory(e$13._maxMemory),e$13._layers._setCacheMemory(e$13._cacheSize),this._updateMemory(e);var t=!0;if(e$13._memoryPredicted>0||e$13._updating){var i=this._layersUpdating();e$13._memoryPredicted<.6&&e$13._canFastRecover?(e$13._stableQuality=e$13._downscaleMemoryUsed=0,e$13._canFastRecover=0,this._updateQuality(1)):i?(e$13._memoryPredicted>1.1||e$13._memoryUsed>1)&&(e$13._stableQuality>0?(e$13._downscaleMemoryUsed=0,this._updateQuality(e$13._stableQuality)):e$13._quality>e$13.minQuality&&e$13._downscaleMemoryUsed<e$13._memoryUsed?(t=i=this._updateQuality(e$13._quality/e$13._QualityShrinkRatio),e$13._downscaleMemoryUsed=e$13._memoryUsed,e$13._canFastRecover=0):t=!1):(i=this._layersUpdating(),e$13._downscaleMemoryUsed=0,e$13._memoryUsed>1?(e$13._stableQuality=0,e$13._canFastRecover=0,t=i=this._updateQuality(e$13._quality/e$13._QualityShrinkRatio),e$13._downscaleMemoryUsed=e$13._memoryPredicted):e$13._stableQuality!=e$13._quality&&(e$13._memoryUsed<.8&&e$13._quality<1?(e$13._stableQuality=e$13._quality,i=this._updateQuality(e$13._quality+e$13._QualityIncreaseStep)):e$13._quality<1&&(e$13._canFastRecover=1))),e$13._updating=i}return t};var e$13=new r$N;r$N.memManager=e$13;var ti$4=r$N,_0x1c25d9=(_0x2c57f0=!0,function(e,t){var i=_0x2c57f0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c57f0=!1,i}),_0x5abfb3=_0x1c25d9(void 0,(function(){return _0x5abfb3.toString().search("(((.+)+)+)+$").toString().constructor(_0x5abfb3).search("(((.+)+)+)+$")})),_0x2c57f0;_0x5abfb3();var _0x2f55cb=273,_0x3b4364=function(){this.textures={},this.refCounts={},this.unUsedTextures={},this.unUsedSize=0};_0x3b4364.reservedMemorySize=50,_0x3b4364.CreateTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=_0x356ff1.textures[e];if(d)_0x356ff1.refCounts[e]++;else{var f=null;switch(o){case _0x22a8f5.enrS3TCDXTN:f=r===_0x2ddc8c.BGR||r===_0x2ddc8c.RGB?V$12.RGB_DXT1:V$12.RGBA_DXT5;break;case _0x22a8f5.enrPVRTPF_PVRTC2:case _0x22a8f5.enrPVRTPF_PVRTC:f=r===_0x2ddc8c.BGR||r===_0x2ddc8c.RGB?V$12.RGB_PVRTC_2BPPV1:V$12.RGBA_PVRTC_2BPPV1;break;case _0x22a8f5.enrPVRTPF_PVRTC_4bpp:f=V$12.RGBA_PVRTC_4BPPV1;break;case _0x22a8f5.enrPVRTPF_ETC1:f=V$12.RGB_ETC1;break;case _0x22a8f5.encNONE:f=r===_0x2ddc8c.BGR||r===_0x2ddc8c.RGB?_0x2f55cb:r===_0x2ddc8c.LUMINANCE_ALPHA?V$12.LUMINANCE_ALPHA:V$12.RGBA}var p=25===r?_$_.FLOAT:_$_.UNSIGNED_BYTE;e$2e(_0x356ff1.unUsedTextures[e])?(d=_0x356ff1.unUsedTextures[e],_0x356ff1.unUsedSize-=d.size,delete _0x356ff1.unUsedTextures[e]):(s||(d=this.UseTexture(e,t,i,n,f,a,l,u,p)),null==d&&(d=new _0x5e76de(e,t,i,n,f,a,s,l,u,p,c,h),ti$4._memTextureAdded(d.sizeInBytes))),_0x356ff1.refCounts[e]=1,_0x356ff1.textures[e]=d}return d},_0x3b4364.UseTexture=function(e,t,i,n,r,o,a,s,l){for(var u in _0x356ff1.unUsedTextures)if(_0x356ff1.unUsedTextures[u].size===o.length){var c=_0x356ff1.unUsedTextures[u];if(c.context.id!==t.id)return;if(t.webgl2&&(i!==c.width||n!==c.height)||e$2e(t.engine))continue;_0x356ff1.unUsedSize-=c.size,delete _0x356ff1.unUsedTextures[u];var h={width:i,height:n,internalFormat:r,wrapS:u$Z(a,q$1a.CLAMP_TO_EDGE),wrapT:u$Z(s,q$1a.CLAMP_TO_EDGE),pixelDataType:u$Z(l,_$_.UNSIGNED_BYTE)};return c.pixelDataType===_$_.FLOAT&&(h.wrapS=q$1a.CLAMP_TO_EDGE,h.wrapT=q$1a.CLAMP_TO_EDGE),c.updateTexture(e,o,h),c}},_0x3b4364.CreateVolumeTexture=function(e,t,i,n,r){var o=_0x356ff1.textures[e],a=tt$i.LINEAR,s=rt$k.LINEAR;if(r===k$S.FilterMode.NEAREST&&(a=tt$i.NEAREST,s=rt$k.NEAREST),o&&!e$2e(n.imageArray))_0x356ff1.refCounts[e]++,o.sampler=new e$1S({minificationFilter:a,magnificationFilter:s});else{var l=n.nLength,u=n.imageArray;(o=new t$U({context:i,width:l,height:l,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({minificationFilter:a,magnificationFilter:s})})).copyFrom({width:l,height:l,arrayBufferView:u}),_0x356ff1.refCounts[e]=1,_0x356ff1.textures[e]=o,ti$4._memTextureAdded(o.sizeInBytes)}return o},_0x3b4364.ReloadVolumeTexture=function(e,t,i,n,r){var o=_0x356ff1.textures[e];if(o){var a=n.nLength,s=n.imageArray;o.copyFrom({width:a,height:a,arrayBufferView:s})}return o},_0x3b4364.AddRef=function(e){_0x356ff1.refCounts[e]++},_0x3b4364.DecRef=function(e){_0x356ff1.refCounts[e]--},_0x3b4364.DestroyTexture=function(e){var t=_0x356ff1.refCounts[e];_0x356ff1.refCounts[e]=t-1,0==_0x356ff1.refCounts[e]&&(_0x356ff1.textures[e].is3D||e$2e(_0x356ff1.textures[e].sampler)?(ti$4._memTextureRemoved(_0x356ff1.textures[e].sizeInBytes),_0x356ff1.textures[e].destroy()):(_0x356ff1.unUsedTextures[e]=_0x356ff1.textures[e],_0x356ff1.unUsedSize+=_0x356ff1.textures[e].size),delete _0x356ff1.textures[e],delete _0x356ff1.refCounts[e])},_0x3b4364.GetUnusedSize=function(){return _0x356ff1.unUsedSize},_0x3b4364.DeleteUnusedTextures=function(){for(var e in _0x356ff1.unUsedTextures)_0x356ff1.unUsedTextures[e].is3D&&(_0x356ff1.unUsedSize-=_0x356ff1.unUsedTextures[e].size,ti$4._memTextureRemoved(_0x356ff1.textures[e].sizeInBytes),_0x356ff1.unUsedTextures[e].destroy(),delete _0x356ff1.unUsedTextures[e]);var t=1024*_0x3b4364.reservedMemorySize*1024;for(var e in _0x356ff1.unUsedTextures){if(t>_0x356ff1.unUsedSize)break;var i=_0x356ff1.unUsedTextures[e];_0x356ff1.unUsedSize-=i.size,ti$4._memTextureRemoved(i.sizeInBytes),i.destroy(),delete _0x356ff1.unUsedTextures[e],i.isShared&&delete _0x3b4364._shareTextureCache[i.sharedKey]}};var _0x356ff1=new _0x3b4364;_0x3b4364.textureManager=_0x356ff1,_0x3b4364._shareTextureCache={};var Se$e=_0x3b4364,n$D={},v$B=typeof document<"u"?new h$16(document.location.href):new h$16;function f$N(e){var t=new h$16(e).resolve(v$B);t.normalize();var i=t.authority;return/:/.test(i)||(i=i+":"+("https"===t.scheme?"443":"80")),i}function o$O(e,t){var i=f$N(e),n=u$Z(n$D[i],0);if(!(n>=o$O.maximumRequestsPerServer))return n$D[i]=n+1,o$1l(t(e),(function(e){return n$D[i]--,e})).otherwise((function(e){return n$D[i]--,o$1l.reject(e)}))}o$O.maximumRequestsPerServer=6;var _0x843645=(_0x534c15=!0,function(e,t){var i=_0x534c15?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x534c15=!1,i}),_0x3d774b=_0x843645(void 0,(function(){return _0x3d774b.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d774b).search("(((.+)+)+)+$")})),_0x534c15;_0x3d774b();var _0x59e1ca={INSTANCED_LAYER:"Instanced_Layer",INSTANCED_OBJECT:"Instanced_Object"},bt$6=Object.freeze(_0x59e1ca),_0x2694d=(_0x28565a=!0,function(e,t){var i=_0x28565a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28565a=!1,i}),_0x345830=_0x2694d(void 0,(function(){return _0x345830.toString().search("(((.+)+)+)+$").toString().constructor(_0x345830).search("(((.+)+)+)+$")})),_0x28565a;_0x345830();var _0x56d301=new e$1X(.7,.7,1,1);function _0x24f13b(e,t,i,n){n=u$Z(n,u$Z.EMPTY_OBJECT),o$1q.defined("options.position",n.position),this._type=bt$6.INSTANCED_OBJECT,this._ownerGroup=i,this._position=n.position,this._color=u$Z(n.color,new e$1X),this._scale=u$Z(n.scale,new o$1p(1,1,1)),this._offset=u$Z(n.offset,new o$1p(0,0,0));var r=u$Z(n.hpr,new i$16);this._hpr=r,this._feature=u$Z(n.feature,u$Z.EMPTY_OBJECT);var o=a$18.fromCartesian(this._position);o.longitude+=this._offset.x,o.latitude+=this._offset.y,o.height+=this._offset.z,this._offsetPosition=o$1p.fromRadians(o.longitude,o.latitude,o.height),this._mode=n.sceneMode,this._mode===C$14.COLUMBUS_VIEW&&(this._position=m$19.convertToColumbusCartesian(this._position),this._offsetPosition=m$19.convertToColumbusCartesian(this._offsetPosition)),this._quaternion=m$19.headingPitchRollQuaternion(this._position,r);var a={id:t,primitive:this},s=e.createPickId(a).color,l=new e$1X;l.x=e$1X.floatToByte(s.red),l.y=e$1X.floatToByte(s.green),l.z=e$1X.floatToByte(s.blue),l.w=e$1X.floatToByte(s.alpha),this._pickColor=l,this._isSelected=!1,this._preColor=e$1X.clone(this._color),this._oriCenter=void 0,this._oriRadius=1,this._boundingSphere=void 0,this._id=t,this._index=-1,this._isDeleted=!1,this._visible=u$Z(n.visible,!0),this._distanceVisible=!0,this._localTransform=void 0,this._localTranslation=void 0,this._localQuaternion=void 0}Object.defineProperties(_0x24f13b.prototype,{type:{get:function(){return this._type}},position:{get:function(){return this._position}},color:{get:function(){return this._color}},scale:{get:function(){return this._scale}},hpr:{get:function(){return this._hpr}},visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("S3M Instance visible",e),e!==this._visible&&(this._visible=e,this.updatePosition(this._position))}},show:{get:function(){return this.visible},set:function(e){this.visible=e}},distanceVisible:{get:function(){return this._distanceVisible},set:function(e){o$1q.typeOf.bool("S3M Instance distanceVisible",e),e!==this._distanceVisible&&(this._distanceVisible=e,this.updatePosition(this._position))}},offset:{get:function(){return this._offset}},feature:{get:function(){return this._feature}},isSelected:{get:function(){return this._isSelected}},oriCenter:{get:function(){return this._oriCenter},set:function(e){!e$2e(e)||(this._oriCenter=e)}},oriRadius:{get:function(){return this._oriRadius},set:function(e){!e$2e(e)||(this._oriRadius=e)}},boundingSphere:{get:function(){return this._boundingSphere},set:function(e){!e$2e(e)||(this._boundingSphere=e)}},index:{get:function(){return this._index},set:function(e){this._index=e}},id:{get:function(){return this._id},set:function(e){!e$2e(e)||(this._id=e)}},isDeleted:{get:function(){return this._isDeleted},set:function(e){e$2e(e)&&(this._isDeleted=e)}},localTransform:{get:function(){return this._localTransform}},localTranslation:{get:function(){return this._localTranslation}},localQuaternion:{get:function(){return this._localQuaternion}}}),_0x24f13b.prototype.updatePosition=function(e){if(e$2e(e)){var t=this._index;this._position=o$1p.clone(e);var i=a$18.fromCartesian(this._position);i.longitude+=this._offset.x,i.latitude+=this._offset.y,i.height+=this._offset.z,this._offsetPosition=o$1p.fromRadians(i.longitude,i.latitude,i.height);var n=this._ownerGroup.renderEntities;if(e$2e(n)&&!(n.length<1)){for(var r=this._visible&&this._distanceVisible?1:0,o=o$1p.multiplyByScalar(e,r,new o$1p),a=0,s=n.length;a<s;a++){var l=n[a],u=l._colorCommand.vertexArray.getAttribute(l._attributeLocations.aPosHigh),c=t*u.strideInBytes+u.offsetInBytes,h=S$14.createTypedArray(u.componentDatatype,2*u.componentsPerAttribute),d=i$12.fromCartesian(o),f=d.high,p=d.low;h[0]=f.x,h[1]=f.y,h[2]=f.z,h[3]=p.x,h[4]=p.y,h[5]=p.z,u.vertexBuffer.copyFromArrayView(h,c)}o$1p.clone(e,this._boundingSphere.center)}}},_0x24f13b.prototype.updateColor=function(e){if(e$2e(e)&&!this._isDeleted){var t=this._index;if(!e$1X.equals(this._color,e)){this._color=e$1X.clone(e,this._color),this._preColor=e$1X.clone(e);var i=this._ownerGroup.renderEntities;if(e$2e(i)&&!(i.length<1))for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aColor2),s=t*a.strideInBytes+a.offsetInBytes,l=S$14.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=e.red,l[1]=e.green,l[2]=e.blue,l[3]=e.alpha,a.vertexBuffer.copyFromArrayView(l,s)}}}},_0x24f13b.prototype.updateScale=function(e){if(e$2e(e)){var t=this._index;if(!o$1p.equals(this._scale,e)){this._scale=o$1p.clone(e);var i=this._ownerGroup.renderEntities;if(e$2e(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aScaleAndRadius),s=t*a.strideInBytes+a.offsetInBytes,l=S$14.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=e.x,l[1]=e.y,l[2]=e.z,l[3]=this._oriRadius,a.vertexBuffer.copyFromArrayView(l,s)}var u=o$1p.maximumComponent(e);this._boundingSphere.radius=this.oriRadius*u}}}},_0x24f13b.prototype.updateRotation=function(e){if(e$2e(e)){var t=this._index;if(!i$16.equals(this._hpr,e)){if(this._hpr=i$16.clone(e),this._quaternion=m$19.headingPitchRollQuaternion(this._position,e),this._mode===C$14.COLUMBUS_VIEW){var i=p$1e.fromRotationY(-Math.PI/2),n=n$15.fromRotationMatrix(i);this._quaternion=n$15.multiply(this._quaternion,n,this._quaternion)}var r=this._ownerGroup.renderEntities;if(e$2e(r)&&!(r.length<1))for(var o=0,a=r.length;o<a;o++){var s=r[o],l=s._colorCommand.vertexArray.getAttribute(s._attributeLocations.aQuaternion),u=t*l.strideInBytes+l.offsetInBytes,c=S$14.createTypedArray(l.componentDatatype,l.componentsPerAttribute);c[0]=this._quaternion.x,c[1]=this._quaternion.y,c[2]=this._quaternion.z,c[3]=this._quaternion.w,l.vertexBuffer.copyFromArrayView(c,u)}}}},_0x24f13b.prototype.updateModelMatrix=function(e){var t=p$1d.getScale(e,new o$1p);this.updateScale(t),this._localTransform=p$1d.clone(e),this._localTranslation=p$1d.getTranslation(e,new o$1p);var i=p$1d.setScale(e,new o$1p(1,1,1),new p$1d),n=p$1d.getRotation(i,new p$1e);this._localQuaternion=n$15.fromRotationMatrix(n,new n$15)},_0x24f13b.prototype.setSelected=function(){var e=this._index;if(e$2e(e)&&!(e<0)&&!e$1X.equals(this._color,_0x56d301)){var t=e$1X.multiply(_0x56d301,this._preColor,new e$1X),i=this._ownerGroup.renderEntities;if(e$2e(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n],a=o._colorCommand.vertexArray.getAttribute(o._attributeLocations.aColor2),s=e*a.strideInBytes+a.offsetInBytes,l=S$14.createTypedArray(a.componentDatatype,a.componentsPerAttribute);l[0]=t.red,l[1]=t.green,l[2]=t.blue,l[3]=t.alpha,a.vertexBuffer.copyFromArrayView(l,s)}this._isSelected=!0}}},_0x24f13b.prototype.setUnSelected=function(){var e=this._index;if(e$2e(e)&&!(e<0)&&this._isSelected){this._isSelected=!1,this._color=e$1X.clone(this._preColor);var t=this._ownerGroup.renderEntities;if(e$2e(t)&&!(t.length<1))for(var i=0,n=t.length;i<n;i++){var r=t[i],o=r._colorCommand.vertexArray.getAttribute(r._attributeLocations.aColor2),a=e*o.strideInBytes+o.offsetInBytes,s=S$14.createTypedArray(o.componentDatatype,o.componentsPerAttribute);s[0]=this._preColor.red,s[1]=this._preColor.green,s[2]=this._preColor.blue,s[3]=this._preColor.alpha,o.vertexBuffer.copyFromArrayView(s,a)}}};var _0x1afe8d=(_0x3b756d=!0,function(e,t){var i=_0x3b756d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b756d=!1,i}),_0x5a3853=_0x1afe8d(void 0,(function(){return _0x5a3853.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a3853).search("(((.+)+)+)+$")})),_0x3b756d;_0x5a3853();var _0x47b2f7="\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#extension GL_EXT_shader_texture_lod : enable\n#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef ClampObject\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n #ifdef WEBGPU\n layout(location = 0) out vec4 glFragData[2];\n #endif\n#endif\n\n#include <SceneUboDecl>\n#include <LightUboDecl>\n#include <MaterialUboDecl>\n#include <getNormalMatrix>\n#include <getNormalEC>\n\n#ifdef TEXTURE\nuniform sampler2D uTexture;\n#endif\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec3 vNormalEC;\nvarying mat4 vModelMatrix;\n\n#ifdef SQRESULT\nuniform sampler2D uFrontColorTexture;\nuniform sampler2D uFrontDepthTexture;\nuniform sampler2D uBackDepthTexture;\nuniform float uSQMode; \n#endif\n#ifdef Volume2\nvarying vec3 vecRotioCoord;\n#endif\nfloat computeDepth()\n{\n#ifdef LOG_DEPTH\n return log2(v_depthFromNearPlusOne) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#else\n return gl_FragCoord.z;\n#endif\n}\n#ifdef SQRESULT\nbool isPointInObject(vec2 texCoord)\n{\n bool bIn = false;\n vec4 colorInClipTexture = texture2D(uFrontColorTexture,texCoord.xy);\n if(colorInClipTexture.r > 0.99 && colorInClipTexture.g < 0.01 && colorInClipTexture.b < 0.01)\n {\n float depthNear = czm_unpackDepth(textureLod(uFrontDepthTexture, texCoord.xy, 0.0)) - 0.00001;\n float depthFar = czm_unpackDepth(textureLod(uBackDepthTexture, texCoord.xy, 0.0)) + 0.00001;\n float currentDepth = computeDepth();\n if(currentDepth > depthNear && currentDepth < depthFar){\n bIn = true;\n }\n }\n return uSQMode < 0.5 ? !bIn : bIn;\n}\n#endif\n\nvec4 SRGBtoLinear(vec4 srgbIn) \n{\n return vec4(pow(srgbIn.rgb, vec3(2.2)), srgbIn.a);\n}\nvec4 LineartoSRGB(vec4 linearIn) \n{\n#ifndef HDR \n return vec4(pow(linearIn.rgb, vec3(1.0/2.2)), linearIn.a);\n#else \n return linearIn;\n#endif \n}\n\n#include <SRGBtoLINEAR>\n#include <shaderModelBase>\n#include <brdf>\n#include <blinnPhong>\n\nvoid main()\n{\n#ifdef ClampObject\n czm_writeDepthClampedToFarPlane();\n#endif\n vec4 color = vColor;\n#ifdef ClampObject\n #ifdef PROFILE\n #ifdef MRT\n gl_FragData[0] = vec4(vPickColor.xyz, 1.0);\n gl_FragData[1] = color;\n #else\n gl_FragColor = vec4(vPickColor.xyz, 1.0);\n #endif\n #else\n gl_FragColor = color;\n #endif\n#else\n vec2 vecTexCoord = vec2(0.0);\n #ifdef SQRESULT\n vec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\n if(!isPointInObject(texCoord)) \n { \n discard; \n } \n #endif\n \n\t#ifdef TEXTURE\n #ifdef FLIP_Y\n vecTexCoord = vec2(vTexCoord.x,1.0-vTexCoord.y);\n #else\n vecTexCoord = vec2(vTexCoord.x,vTexCoord.y);\n #endif\n #endif\n \n #ifdef TEXTURE\n color = SRGBtoLinear(texture2D(uTexture, vecTexCoord.xy, 0.0)) * color;\n #endif\n vec3 normalEC;\n if(vPositionMC.w > 0.9)\n {\n normalEC = normalize(vNormalEC);\n }\n #ifndef HAS_NORMAL\n vec3 normalMC = czm_computeNormal(vPositionMC.xyz);\n mat4 modelViewMatrix4 = uView * vModelMatrix;\n modelViewMatrix4 = czm_inverseMatrix(modelViewMatrix4);\n mat3 modelViewMatrix3 = mat3(modelViewMatrix4);\n modelViewMatrix3 = czm_transpose(modelViewMatrix3);\n normalEC = normalize(modelViewMatrix3 * normalMC);\n #endif\n \n #ifdef BRDF\n gl_FragColor = brdf(color, vecTexCoord, vTexCoord, vPositionEC, vPositionMC.xyz, normalEC, vModelMatrix);\n #else\n gl_FragColor = blinnPhong(color, vecTexCoord, vTexCoord, vPositionEC, vPositionMC.xyz, normalEC, vModelMatrix);\n #ifdef TEXTURE\n gl_FragColor = LineartoSRGB(gl_FragColor);\n #endif\n #endif\n \n #ifdef Volume\n #ifdef Volume2\n if((vecRotioCoord.x < 1.0 && vecRotioCoord.x >0.0) && (vecRotioCoord.y < 1.0 && vecRotioCoord.y >0.0) && (vecRotioCoord.z < 1.0 && vecRotioCoord.z >0.0))\n {\n vec4 volumeColor = czm_getVolumeValue(vecRotioCoord);\n if (volumeColor.r * volumeColor.g * volumeColor.b * volumeColor.a < 0.99) {\n gl_FragColor = volumeColor;\n }\n }\n #else\n float wValue = 0.0;\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, wValue);\n #endif\n #endif\n#endif\n\n#ifndef MRT\n gl_FragColor = czm_gammaCorrect(gl_FragColor);\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n#endif\n}",_0x1dac7c=(_0x540dd0=!0,function(e,t){var i=_0x540dd0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x540dd0=!1,i}),_0x325008=_0x1dac7c(void 0,(function(){return _0x325008.toString().search("(((.+)+)+)+$").toString().constructor(_0x325008).search("(((.+)+)+)+$")})),_0x540dd0;_0x325008();var _0x680f96={getDataShape:function(e,t){for(var i=-1/0,n=0,r=0,o=0,a=0;a<e.length;a++){var s=0;if(e[a].value&&(s=e[a].value[3]),s<i){if(o&&o!==r)throw new Error("Invalid data. data should be a row major 2d array.");o=r,r=0,n++}i=s,r++}return{row:n+1,column:r}}},_0xe980d9=[],_0x462c59=[],_0x35c43f=[];function _0x5e3388(e){var t;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)?(3==(t=e.substring(1).split("")).length&&(t=[t[0],t[0],t[1],t[1],t[2],t[2]]),[((t="0x"+t.join(""))>>16&255)/255,(t>>8&255)/255,(255&t)/255,1]):[255,255,255,1]}_0x680f96.updateSurfaceMesh=function(e,t,i){for(var n=new Float32Array(3*e.length),r=-900,o=900,a=-900,s=900,l=-900,u=900,c=0;c<e.length;c+=3)r=Math.max(e[c].value[0],r),o=Math.min(e[c].value[0],o),a=Math.max(e[c].value[1],a),s=Math.min(e[c].value[1],s),l=Math.max(e[c].value[2],l),u=Math.min(e[c].value[2],u);var h=_0x190f78(o,r);_0xe980d9=_0x2dd6bc(o,r,h);var d=_0x190f78(s,a);_0x462c59=_0x2dd6bc(s,a,d);var f=_0x190f78(u,l);_0x35c43f=_0x2dd6bc(u,l,f);var p=0;e.forEach((function(e){e.value&&e.value instanceof Array&&_0x200604(e.value[0],e.value[1],e.value[2],p,n),p++}));var _=_0xcc9c43(0,null,[-50,50],_0xe980d9),m=_0xcc9c43(0,null,[50,-50],_0x462c59),g=_0xcc9c43(0,null,[-50,50],_0x35c43f),x=null,y=null,v=null,$=null,b=null,T=t.row,C=t.column,S=(T-1)*(C-1)*4;x=new Float32Array(3*S),$=new Float32Array(4*S),b=new Float32Array(4*S),v=new Float32Array(2*S);var w,E,P,A,L,M,R,O,D,I,B,F,N,G,z,U=[0,3,1,1,3,2],V=[[1,1,0,0],[0,1,0,1],[1,0,0,1],[1,0,1,0]],k=new(S>65535?Uint32Array:Uint16Array)((T-1)*(C-1)*6),W=function(e,t,i){i[1]=e*C+t,i[0]=e*C+t+1,i[3]=(e+1)*C+t+1,i[2]=(e+1)*C+t},H=[],q=[],j=0;y=new Float32Array(3*S);var X=[[],[],[]],Y=[],Z=[],K=[0,0,0],Q=function(e,t,i){var n=3*t;return i[0]=e[n],i[1]=e[n+1],i[2]=e[n+2],i},J=new Float32Array(n.length),ee=new Float32Array(n.length/3*4),te=[0,0,0,1];for(c=0;c<e.length;c++){e[c].itemStyle&&"string"==typeof e[c].itemStyle.color?te=ue=_0x5e3388(e[c].itemStyle.color):ue=te;ue[3]*=1,ue[3];for(var ie=0;ie<4;ie++)ee[4*c+ie]=ue[ie]}for(c=0;c<T-1;c++)for(var ne=0;ne<C-1;ne++){var re=4*(c*(C-1)+ne)*3;W(c,ne,H);for(ie=0;ie<4;ie++)Q(n,H[ie],q);for(ie=0;ie<4;ie++)Q(n,H[ie],q),x.set(q,re+3*ie),$.set(V[ie],re/3*4+ie);for(ie=0;ie<6;ie++)k[j++]=U[ie]+re/3;for(ie=0;ie<2;ie++){for(var oe=3*ie,ae=0;ae<3;ae++){Q(n,he=H[U[oe]+ae],X[ae])}var se=function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e};se(Y,X[0],X[1]),se(Z,X[1],X[2]);R=K,D=Z,I=void 0,B=void 0,F=void 0,N=void 0,G=void 0,z=void 0,I=(O=Y)[0],B=O[1],F=O[2],N=D[0],G=D[1],z=D[2],R[0]=B*z-F*G,R[1]=F*N-I*z,R[2]=I*G-B*N;for(ae=0;ae<3;ae++){var le=3*H[U[oe]+ae];J[le]=J[le]+K[0],J[le+1]=J[le+1]+K[1],J[le+2]=J[le+2]+K[2]}}}for(c=0;c<J.length/3;c++){Q(J,c,K);w=K,P=void 0,A=void 0,L=void 0,M=void 0,P=(E=K)[0],A=E[1],L=E[2],(M=P*P+A*A+L*L)>0&&(M=1/Math.sqrt(M),w[0]=E[0]*M,w[1]=E[1]*M,w[2]=E[2]*M),J[3*c]=K[0],J[3*c+1]=K[1],J[3*c+2]=K[2]}var ue=[],ce=[];for(c=0;c<T-1;c++)for(ne=0;ne<C-1;ne++){re=4*(c*(C-1)+ne)*4;W(c,ne,H);for(ie=0;ie<4;ie++){for(ae=0;ae<4;ae++)ue[ae]=ee[4*H[ie]+ae];b.set(ue,re+4*ie),Q(J,H[ie],K),y.set(K,re/4*3+3*ie);var he=H[ie];ce[0]=he%C/(C-1),ce[1]=Math.floor(he/C)/(T-1),v.set(ce,re/4*2+2*ie)}0}for(c=0;c<x.length;c+=3){x[c]-=_,x[c+1]-=m,x[c+2]-=g;var de=x[c+1],fe=x[c+2];x[c+2]=de,x[c+1]=fe}return{positionAttr:x,normalAttr:y,texcoordAttr:v,barycentricAttr:$,colorAttr:b,indices:k,vertexColors:ee,vertexNormals:J,vertexCount:S}};var _0xa94ed=[0,1];function _0x4bfdbc(e,t,i,n){return(i=i||[])[0]=_0xcc9c43(e[0],n,[-50,50],_0xe980d9),i[1]=_0xcc9c43(e[1],n,[50,-50],_0x462c59),i[2]=_0xcc9c43(e[2],n,[-50,50],_0x35c43f),i}function _0xcc9c43(e,t,i,n){return _0x3c0bea(e=_0x456411(e,n),_0xa94ed,i,t)}function _0x456411(e,t){var i=t;return i[1]===i[0]?.5:(e-i[0])/(i[1]-i[0])}function _0x3c0bea(e,t,i,n){var r=t[1]-t[0],o=i[1]-i[0];if(0===r)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(e<=t[0])return i[0];if(e>=t[1])return i[1]}else{if(e>=t[0])return i[0];if(e<=t[1])return i[1]}else{if(e===t[0])return i[0];if(e===t[1])return i[1]}return(e-t[0])/r*o+i[0]}function _0x200604(e,t,i,n,r,o){var a;a=_0x4bfdbc([e,t,i]),r[3*n]=a[0],r[3*n+1]=a[1],r[3*n+2]=a[2]}function _0x190f78(e,t){var i=(t-e)/5,n=_0x215c91(i),r=Math.pow(10,n),o=i/r;return i=(o<1.5?1:o<2.5?2:o<4?3:o<7?5:10)*r,n>=-20?+i.toFixed(n<0?-n:0):i}function _0x215c91(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function _0x2dd6bc(e,t,i){var n=[];return n[0]=_0x226c39(Math.floor(e/i)*i),n[1]=_0x226c39(Math.ceil(t/i)*i),n}function _0x226c39(e,t,i){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),i?e:+e}var _0x54c2e6=(_0x18d465=!0,function(e,t){var i=_0x18d465?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x18d465=!1,i}),_0x42a531=_0x54c2e6(void 0,(function(){return _0x42a531.toString().search("(((.+)+)+)+$").toString().constructor(_0x42a531).search("(((.+)+)+)+$")})),_0x18d465;_0x42a531();var _0x383013={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,READY:4,LOST:5},_0x3a220c=new s$T,_0x447b75=25;function _0x2cb481(e,t,i){var n=e.vertexAttributes[0],r=n.typedArray,o=new Float32Array(r.buffer,r.byteOffset,r.byteLength/4),a=n.componentsPerAttribute,s=e.verticesCount,l=new Float32Array(3*s),u=e.attrLocation;u.aRatio=Object.keys(u).length;for(var c=0;c<s;c++){var h=new o$1p(o[c*a],o[c*a+1],o[c*a+2]),d=new o$1p;p$1d.multiplyByPoint(t,h,d);var f=a$18.fromCartesian(d),p=e$2d.toDegrees(f.longitude),_=e$2d.toDegrees(f.latitude),m=f.height,g=(p-i.left)/(i.right-i.left),x=(_-i.bottom)/(i.top-i.bottom),y=(m-i.minHeight)/(i.maxHeight-i.minHeight);l[3*c]=g,l[3*c+1]=x,l[3*c+2]=y}e.vertexAttributes.push({index:u.aRatio,typedArray:l,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}function _0xd633a7(e){if(!e$2e(e))throw new t$15("context is required.");this._context=e,this._gl=e._gl,this._type=bt$6.INSTANCED_LAYER,this._group={},this._visible=!0,this._picking=!1,this._clampToObject=!1,this._profile=!1,this._visibleViewport=4095,this._maxVisibleAltitude=Number.MAX_VALUE,this._maxVisibleDistance=Number.MAX_VALUE,this._minVisibleAltitude=0,this._minVisibleDistance=0,this._filterMode=_0x219958.DISTANCE_FROM_EYE_POINT,this._filterPixel=0,null!==e.s3tc?this._supportCompressType=1:null!==e.pvrtc?this._supportCompressType=2:null!==e.etc1&&(this._supportCompressType=3),this._isOverLay=!1,this._spatialQueryEnable=!1,this._sqTextures=[],this._sqMode=j$Z.Disjoint,this._allColorCommand=[],this._shadowType=_0x325616.NONE,this._needToRender=!0,this._addedEvent=new o$1h,this._volume=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:new o$1p,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}},this._pbrParameter=Xe$e.NONE,this._mixColorType=_0x2b839f.MIX,_0x29d1c7.S3MBTaskProcessor.scheduleTask({})}function _0xbe0258(e,t,i){if(e$2e(e._profileCommand)||e.createProfileCommand(t),e._profileCommand.derivedCommands={},i){var n=_0x45bcf8.createClampObjectColorRenderState();e._profileCommand.renderState=d$1m.fromCache(n),e._profileCommand.pass=Le$q.ClampObject,e$2e(e._stencilCommand)||e.createClampCommand()}else e._profileCommand.renderState=d$1m.fromCache({cull:{enabled:group.cullEnabled,face:group.cullFace},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),e.removeProgramDefine(!0,!0,"ClampObject",!0)}function _0x47a2a8(e,t){var i=e._group[t],n=e.customRequestHeaders,r=i.state;if(_0x383013.UNLOAD==r){var o=o$O(t,(function(e){return o$10(e,n)}));e$2e(o)&&(i.state=_0x383013.LOADING,o.then((function(e){i._arrayBuffer=e,t.endsWith(".obj")?o$10(t.replace(".obj",".mtl")).then((function(e){i.mtlbuffer=e,i.state=_0x383013.LOADED})).otherwise((function(){i.state=_0x383013.LOADED})):i.state=_0x383013.LOADED}),(function(e){i.state=_0x383013.LOST})))}_0x383013.LOADED==r&&(e$2e(i._arrayBuffer)?_0x509aeb(e,i,i._arrayBuffer):e$2e(i._threedmodeling)&&_0x268bca(e,i._threedmodeling,i))}function _0x2b3d89(e){return e._shadowType==_0x325616.SELECTION||e._shadowType==_0x325616.ALL}function _0x509d8b(e,t){var i=e.instances.length,n=e.renderEntities;if(n&&!(n.length<1)&&0!==i){var r=e.instances.values[0];if(e$2e(r)){var o=e$2e(r.localTransform)?_0x447b75+8:_0x447b75,a=e.oriCenter,s=e.oriRadius;e.instanceBuffer&&e.instanceBuffer.destroy();for(var l=new Float32Array(i*o),u=0;u<i;u++){(m=e.instances.values[u]).index=u,_0x1e4fb8(t,l,m,u*o)}e.instanceBuffer=t$X.createVertexBuffer({context:t,typedArray:l,usage:A$18.STATIC_DRAW}),e.instanceBuffer.vertexArrayDestroyable=!1;u=0;for(var c=n.length;u<c;u++){var h=n[u],d=h._colorCommand;d.vertexArray.destroy();for(var f=0;f<h.attributes.length;f++){var p=h.attributes[f];e$2e(p.instanceDivisor)&&p.instanceDivisor>0&&(p.vertexBuffer=e.instanceBuffer)}d.vertexArray=new c$13({context:t,attributes:h.attributes,indexBuffer:h.indexBuffer}),d.instanceCount=i;for(var _=0;_<i;_++){var m;if((m=e.instances.values[_]).index=_,m.oriCenter=a,m.oriRadius=s,!e$2e(m.boundingSphere)){m.boundingSphere=new i$1d;var g=o$1p.maximumComponent(m.scale);m.boundingSphere.radius=s*g;var x=m$19.eastNorthUpToFixedFrame(m.position,t$12.WGS84,new p$1d);p$1d.multiplyByPoint(x,a,m.boundingSphere.center)}}}e.instanceCount=i,e.dirty=!1}}}function _0x1e4fb8(e,t,i,n){var r=o$1p.clone(i._offsetPosition),o=i._quaternion;if(i._mode===C$14.COLUMBUS_VIEW){var a=p$1e.fromRotationY(-Math.PI/2),s=n$15.fromRotationMatrix(a);n$15.multiply(o,s,o)}var l=i._scale,u=i$12.fromCartesian(r),c=i.visible?u.high:o$1p.ZERO,h=i.visible?u.low:o$1p.ZERO,d=i._color,f=i._pickColor,p=i._offset,_=i.oriRadius,m=i.localTranslation,g=i.localQuaternion,x=0;t[n+x++]=c.x,t[n+x++]=c.y,t[n+x++]=c.z,t[n+x++]=h.x,t[n+x++]=h.y,t[n+x++]=h.z,t[n+x++]=o.x,t[n+x++]=o.y,t[n+x++]=o.z,t[n+x++]=o.w,t[n+x++]=l.x,t[n+x++]=l.y,t[n+x++]=l.z,t[n+x++]=_,t[n+x++]=d.red,t[n+x++]=d.green,t[n+x++]=d.blue,t[n+x++]=d.alpha,t[n+x++]=f.x,t[n+x++]=f.y,t[n+x++]=f.z,t[n+x++]=f.w,t[n+x++]=p.x,t[n+x++]=p.y,t[n+x++]=p.z,e$2e(m)&&(t[n+x++]=m.x,t[n+x++]=m.y,t[n+x++]=m.z,t[n+x++]=1),e$2e(g)&&(t[n+x++]=g.x,t[n+x++]=g.y,t[n+x++]=g.z,t[n+x++]=g.w)}function _0x526522(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;if(!(e.arrIndexPackage&&e.vertexPackage&&e.collection&&e.mapPass))throw new t$15("gl texture indexes vertexes collection is required to create RenderEntityPagelod");this._arrIndexPackage=t,this._vertexPackage=i,this._collection=e.collection,this._layer=this._collection,this._attributeLocations={},this._initialize=!1,this._geoMatrix=u$Z(e.geoMatrix,p$1d.IDENTITY),this._mapPass=n,this._colorCommand=void 0,this._stencilCommand=void 0,this._profileCommand=void 0,this._spatialQueryCommand=void 0,this._boundingVolume=e.boundingVolume,this._ownerGroup=e.ownerGroup;var r=this._arrIndexPackage[0];this._material=e$2e(r)&&e$2e(r.materialCode)?n[r.materialCode]:_0xf77618.Default,this._materialUBO=new _0x4f8f70(this,this._material,this._collection)}function _0x268bca(e,t,i){i.state=_0x383013.PARSING;for(var n=new o$1p,r=[],o=Number.MAX_VALUE,a=Number.MIN_VALUE,s=0;s<t.vertexCount;s++)o$1p.fromArray(t.positionAttr,3*s,n),r.push(o$1p.clone(n)),o=Math.min(o,n.y),a=Math.max(a,n.y);var l=p$1d.clone(p$1d.IDENTITY,new p$1d),u=i$1d.fromPoints(r,new i$1d);i$1d.transform(u,l,u);var c=new _0x526522({vertexPackage:{vertexAttributes:[{index:0,typedArray:t.positionAttr,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1},{index:1,typedArray:t.colorAttr,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:0},{index:2,typedArray:t.normalAttr,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:0}],attrLocation:{aPosition:0,aColor:1,aNormal:2},instanceCount:0,instanceMode:0,instanceIndex:-1,verticesCount:t.vertexCount},arrIndexPackage:[{indicesTypedArray:t.indices,indexType:0,primitiveType:4}],mapPass:{},boundingVolume:u,collection:e,ownerGroup:i,geoMatrix:l});c.initialize(e),i.renderEntities.push(c),i._threedmodeling=void 0,i.state=_0x383013.READY,i.ready=!0,e._addedEvent.raiseEvent(i.url)}function _0x4dbf0f(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function _0x48c024(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function _0x509aeb(e,t,i){var n,r={buffer:i,supportCompressType:e._supportCompressType},o=!1;if(t.url.endsWith("s3mb")||/\.(x|X|dae|DAE|osgb|obj)$/.test(t.url)){if(/\.(x|X|osgb)$/.test(t.url)&&(r.isOSGB=!0),/\.(obj|dae|DAE)$/.test(t.url)&&(r.mtlbuffer=t.mtlbuffer,r.useAssimp=!0),r.suffix=t.url.substring(t.url.lastIndexOf(".")+1),o=!0,_0x29d1c7.init||_0x29d1c7.initWebAssembly(),!_0x29d1c7.taskProcessorReady)return;n=_0x29d1c7.S3MBTaskProcessor.scheduleTask(r,[i])}else n=_0x29d1c7.S3MTaskProcessor.scheduleTask(r,[i]);e$2e(n)?(t.state=_0x383013.PARSING,t._arrayBuffer=void 0,n.then((function(i){i&&i.result?(o?_0x1c8b9c(i,t,e):_0x224496(i,t,e),t.ready=!0,t.dirty=!1,t.state=_0x383013.READY):t.state=_0x383013.UNLOAD})).otherwise((function(e){console.log(e)})).then((function(){e._addedEvent.raiseEvent(t.url)}))):t.state=_0x383013.LOADED}function _0x1c8b9c(e,t,i){i._gl;var n=i._context,r=e.groupNode,o=e.geoPackage,a=e.matrials.material,s={},l=0,u=0,c=o$1l.defer();a.map((function(i){var r=i.material,o=r.id,a=new _0xf77618({});s[o]=a,a.createCommonParamter(r),a.createPBRParamter(r);var h=r.textureunitstates;l+=h.length;for(var d=0;d<h.length;d++){var f=h[d].textureunitstate,p=f.id,_=0===f.addressmode.u?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,m=0===f.addressmode.v?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;a._texMatrix=p$1d.unpack(f.texmodmatrix);var g=e.texturePackage[p],x=p;if(e$2e(g)&&!n.webgl2)(!e$2d.isPowerOfTwo(g.width)||!e$2d.isPowerOfTwo(g.height))&&(_=q$1a.CLAMP_TO_EDGE,m=q$1a.CLAMP_TO_EDGE);if(e$2e(g)||!p.endsWith("jpg")&&!p.endsWith("png")){if(e$2e(g)&&g.width>0&&g.height>0&&g.imageBuffer.length>0){var y=Se$e.CreateTexture(x,n,g.width,g.height,g.nFormat,g.compressType,g.imageBuffer,!1,_,m),v=p.indexOf("PBRMaterialParam")>-1,$=a._emissiveTextureIndex===d,b=a._normalTextureIndex===d,T=a._metallicRoughnessTextureIndex===d,C=a._occlusionTextureIndex===d;v?(a._usePBRTextureBatch=!0,a.pbrParamTexture=y):$?a.emissiveTexture=y:b?a.normalTexture=y:T?a.metallicRoughnessTexture=y:C?a.occlusionTexture=y:a._textures.push(y)}c.resolve()}else{var S=t.url.substring(0,t.url.lastIndexOf("/")+1)+p;o$10(S).then((function(e){var t=S.endsWith("jpg")?"jpg":"png";a.createJPGPNG(x,n,d,e,_,m,t).then((function(e){++u==l&&c.resolve()})).otherwise((function(){++u==l&&c.resolve()}))})).otherwise((function(){++u==l&&c.resolve()}))}}0===h.length&&(++u==l&&c.resolve())})),c.promise.then((function(){var n=r.pageLods,a=[],l=new i$1d;if(e$2e(n)){n.forEach((e=>{e.boundingSphere&&a.push(e.boundingSphere)})),i$1d.fromBoundingSpheres(a,l);for(var u=0;u<n.length;u++){n[u].geodes.map((function(n){for(var r=n.matrix,a=n.skeletonNames,u=0;u<t.instances.length;u++){var c=t.instances.values[u];c.oriCenter=o$1p.clone(l.center),c.oriRadius=l.radius,e$2e(t.oriCenter)||(t.oriCenter=c.oriCenter,t.oriRadius=c.oriRadius);var h=c.position,d=m$19.eastNorthUpToFixedFrame(h,t$12.WGS84,new p$1d),f=i$1d.transform(l,d,new i$1d);c.boundingSphere=f}for(var p=0;p<a.length;p++){for(var _=a[p],m=o[_],g=m.vertexPackage,x=m.arrIndexPackage,y={},v=0;v<x.length;v++){var $=x[v];if(e$2e($)){var b=$.materialCode,T=s[b];y[b]=T}}var C=new _0x526522({vertexPackage:g,arrIndexPackage:x,version:e.version,mapPass:y,collection:i,ownerGroup:t,geoMatrix:r});C.initialize(i),t.renderEntities.push(C)}}))}}else{for(var c=0;c<t.instances.length;c++){var h=t.instances.values[c];h.oriCenter=o$1p.clone(l.center),h.oriRadius=l.radius,e$2e(t.oriCenter)||(t.oriCenter=h.oriCenter,t.oriRadius=h.oriRadius);var d=h.position,f=m$19.eastNorthUpToFixedFrame(d,t$12.WGS84,new p$1d),p=i$1d.transform(l,f,new i$1d);h.boundingSphere=p}var _=[];for(var m in o){var g=($=o[m]).vertexPackage,x=new Float32Array(g.vertexAttributes[0].typedArray.buffer);p=i$1d.fromVertices(x);_.push(p)}i$1d.fromBoundingSpheres(_,l),t.instances.values[0].boundingSphere=i$1d.transform(l,f,new i$1d);var y=0;for(var v in o){g=($=o[v]).vertexPackage;for(var $,b=$.arrIndexPackage,T={},C=0;C<b.length;C++){var S=b[C];if(e$2e(S)){var w=S.materialCode,E=s[w];T[w]=E}}var P=e$2e(e.mats[y])?e.mats[y]:e.mats[0];y++;var A=new _0x526522({vertexPackage:g,arrIndexPackage:b,version:e.version,mapPass:T,collection:i,ownerGroup:t,geoMatrix:p$1d.unpack(P)});A.initialize(i),t.renderEntities.push(A)}}}))}function _0x224496(e,t,i){i._gl;for(var n=i._context,r=_0x3a220c.read(e.xmlDoc).firstChild,o=r.namespaceURI,a=_0x2493ff(_0x11f496(r,"Material3Ds",o),"material",o),s={},l=0,u=a.length;l<u;l++){var c=a[l],h=_0x82a482(c,"name",o),d=new _0xf77618({});s[h]=d;var f=_0x11f496(c,"Ambient",o),p=_0x5123ec(f,"AmbientR",o),_=_0x5123ec(f,"AmbientG",o),m=_0x5123ec(f,"AmbientB",o),g=_0x5123ec(f,"AmbientA",o);d._ambientColor=new e$1X(p,_,m,g);var x=_0x11f496(c,"Diffuse",o);p=_0x5123ec(x,"DiffuseR",o),_=_0x5123ec(x,"DiffuseG",o),m=_0x5123ec(x,"DiffuseB",o),g=_0x5123ec(x,"DiffuseA",o),d._diffuseColor=new e$1X(p,_,m,g);var y=_0x11f496(c,"Specular",o);p=_0x5123ec(y,"SpecularR",o),_=_0x5123ec(y,"SpecularG",o),m=_0x5123ec(y,"SpecularB",o),g=_0x5123ec(y,"SpecularA",o),d._specularColor=new e$1X(p,_,m,g);var v=_0x5123ec(c,"Shininess",o);d._shininess=v,_0x11f496(c,"TransparentSorting",o),d._bTransparentSorting=_0x292af8(c,"TransparentSorting",o)||d._diffuseColor.alpha<1;var $=_0x11f496(c,"texture",o),b=_0x82a482($,"name",o),T=_0x11f496($,"AddressMode",o),C=_0x82a482(T,"u",o),S=_0x82a482(T,"v",o);C="TAM_WRAP"===C?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,S="TAM_WRAP"===S?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;var w=e.texturePackage[b];if(e$2e(w)){b=n._id+"_"+b,(!e$2d.isPowerOfTwo(w.width)||!e$2d.isPowerOfTwo(w.height))&&(C=q$1a.CLAMP_TO_EDGE,S=q$1a.CLAMP_TO_EDGE);var E=Se$e.CreateTexture(b,n,w.width,w.height,w.nFormat,w.compressType,w.imageBuffer,!1,C,S);d._textures.push(E),0===w.compressType&&(i._supportCompressType=0)}}var P=_0x3ffe87(_0x11f496(r,"PageLods",o),"Geode",o);for(l=0,u=P.length;l<u;l++){for(var A=[],L=P[l],M=_0x82a482(L,"GeoDeModMatrix",o).split(","),R=0;R<16;R++)M[R]=parseFloat(M[R]);M=p$1d.unpack(M,0);for(var O=_0x3ffe87(L,"GeoName",o),D=[],I=0,B=O.length;I<B;I++){var F=O[I].textContent.trim();-1===D.indexOf(F)&&D.push(F)}for(var N=new i$1d,G=0;G<D.length;G++){if(e$2e(J=e.geoPackage[D[G]])){var z=_0x3fb4b8(ee=J.vertexPackage,M);A.push(z)}}if(A.length>0){var U=i$1d.fromBoundingSpheres(A,new i$1d),V=!1;t.instances.length>0&&e$2e(t.instances.values[0].localTransform)&&(i$1d.transform(U,t.instances.values[0].localTransform,U),V=!0);for(var k=[],W=0;W<t.instances.length;W++){var H=t.instances.values[W];H.oriCenter=o$1p.clone(U.center),H.oriRadius=U.radius,e$2e(t.oriCenter)||(t.oriCenter=H.oriCenter,t.oriRadius=H.oriRadius);var q=H.position,j=m$19.eastNorthUpToFixedFrame(q,t$12.WGS84,new p$1d),X=i$1d.transform(U,j,new i$1d),Y=V?2:o$1p.maximumComponent(H.scale);X.radius=X.radius*Y,H.boundingSphere=X,k.push(X)}i$1d.fromBoundingSpheres(k,N)}var Z=new p$1d;if(e$2e(i._volume)){var K=t.instances.values[0]._offsetPosition,Q=new i$16;j=m$19.headingPitchRollToFixedFrame(K,Q,t$12.WGS84,m$19.eastNorthUpToFixedFrame);Z=p$1d.multiply(j,M,Z),Z=p$1d.multiplyByScale(Z,t.instances.values[0].scale,Z)}for(B=0;B<D.length;B++){var J;if(e$2e(J=e.geoPackage[D[B]])){var ee=J.vertexPackage,te=J.arrIndexPackage,ie={};for(var ne in te){var re=te[ne];if(e$2e(re)){d=s[h=re.materialCode];ie[h]=d}}e$2e(i._volume)&&_0x2cb481(ee,Z,i._volume._volBounds);var oe=new _0x526522({vertexPackage:ee,arrIndexPackage:te,version:e.version,mapPass:ie,boundingVolume:N,collection:i,ownerGroup:t,geoMatrix:M});oe.initialize(i),t.renderEntities.push(oe)}}}}function _0x3fb4b8(e,t){for(var i=[],n=new i$1d,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1d.fromPoints(i,n),i.length=0,i$1d.transform(n,t,n),n}function _0x11f496(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(e$2e(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function _0x3ffe87(e,t,i){if(e$2e(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];e$2e(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}}function _0x2493ff(e,t,i){if(!e$2e(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];e$2e(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function _0x5123ec(e,t,i){var n=_0x11f496(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function _0x82a482(e,t,i){var n=_0x11f496(e,t,i);if(e$2e(n))return n.textContent.trim()}function _0x292af8(e,t,i){var n=_0x11f496(e,t,i);if(e$2e(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function _0x4b14bd(e,t,i,n,r){var o=e$2e(r)?_0x447b75+8:_0x447b75,a=S$14.getSizeInBytes(S$14.FLOAT),s=0;t.aPosHigh=i++,e.push({name:"aPosHigh",index:t.aPosHigh,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:s,strideInBytes:a*o,instanceDivisor:1}),s+=3,t.aPosLow=i++,e.push({name:"aPosLow",index:t.aPosLow,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=3,t.aQuaternion=i++,e.push({name:"aQuaternion",index:t.aQuaternion,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aScaleAndRadius=i++,e.push({name:"aScaleAndRadius",index:t.aScaleAndRadius,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aColor2=i++,e.push({name:"aColor2",index:t.aColor2,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aPickColor=i++,e.push({name:"aPickColor",index:t.aPickColor,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aOffset=i++,e.push({name:"aOffset",index:t.aOffset,vertexBuffer:n.instanceBuffer,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=3,e$2e(r)&&(t.aLocalTranslation=i++,e.push({name:"aLocalTranslation",index:t.aLocalTranslation,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4,t.aLocalQuaternion=i++,e.push({name:"aLocalQuaternion",index:t.aLocalQuaternion,vertexBuffer:n.instanceBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:a*s,strideInBytes:a*o,instanceDivisor:1}),s+=4)}function _0x2d0304(e,t,i){var n=t.layer,r={uTexture:function(){return t.texture||n._context._defaultTexture},uHasNormal:function(){return t.hasNormal},uAmbientColor:function(){return n._mixColorType===_0x2b839f.REPLACE?e$1X.WHITE:t.ambientColor},uDiffuseColor:function(){return n._mixColorType===_0x2b839f.REPLACE?e$1X.WHITE:t.diffuseColor},uSpecularColor:function(){return t.specularColor},uShininess:function(){return t.shininess},uPicking:function(){return t.layer._picking},uGeoMat:function(){return t.geoMat},uRangeMode:function(){return n.filterMode},uVisibleDistance:function(){return new o$1o(n.maxVisibleDistance,n.minVisibleDistance)},uFilterPixel:function(){return n.filterPixel},uFillColor:function(){return t.diffuseColor},uVolumeTexture:function(){return n._volume._volTexture},width:function(){return n._volume._volImageBuffer.nWidth},height:function(){return n._volume._volImageBuffer.nHeight},depth:function(){return n._volume._volImageBuffer.nDepth},sideBlockCount:function(){return n._volume._volImageBuffer.nSideBlockCount},blockLength:function(){return n._volume._volImageBuffer.nBlockLength},texLength:function(){return n._volume._volImageBuffer.nLength},uFilterMode:function(){var e=0;return e$2e(n._volume.hypsometricSetting)&&n._volume.hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(e=1),e},uMixColorType:function(){return n._mixColorType},uDataFloor:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMinKey:0},uDataCeil:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMaxKey:0},uVolumeType:function(){return e$2e(n._volume.hypsometricSetting)&&n._volume.hypsometricSetting.filterMode===k$S.FilterMode.LINEAR?0:1},uHypOpacity:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.Opacity:1},uHypContourInterval:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.LineInterval:100},uHypLineColor:function(){var e=new e$2c(0,1,1,1);return e$2e(n._volume.hypsometricSetting)&&(e.x=n._volume.hypsometricSetting.LineColor.red,e.y=n._volume.hypsometricSetting.LineColor.green,e.z=n._volume.hypsometricSetting.LineColor.blue,e.w=n._volume.hypsometricSetting.LineColor.alpha),e},uHypContourFillMode:function(){var e=1;if(e$2e(n._volume.hypsometricSetting))switch(n._volume.hypsometricSetting.DisplayMode){case k$S.DisplayMode.NONE:e=0;break;case k$S.DisplayMode.FACE:e=1;break;case k$S.DisplayMode.LINE:e=2;break;case k$S.DisplayMode.FACE_AND_LINE:e=3}return e},uHypFloor:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.ColorTableMaxKey:0},uHypMaxVisibleValue:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.MaxVisibleValue:0},uHypMinVisibleValue:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.MinVisibleValue:0},uNoValueColor:function(){return e$2e(n._volume.hypsometricSetting)?n._volume.hypsometricSetting.noValueColor:e$1X.WHITE},uHypsometricVisible:function(){return 1},uHypHasAnalysisRegion:function(){return 0},uHypsometricRenderTexture:function(){return 0},uHypsometricTexture:function(){return n._volume._hypsometricTexture},uBaseColorFactor:function(){return e$2e(i._baseColor)?i._baseColor:n._PBRMaterialParams[t.groupName].baseColorFactor},uBaseColorTextureIndex:function(){return i._baseColorTextureIndex>-1?i._baseColorTextureIndex:n._PBRMaterialParams[t.groupName].baseColorTextureIndex},uMetallicFactor:function(){return e$2e(i._metallicFactor)?i._metallicFactor:n._PBRMaterialParams[t.groupName].metallic},uRoughnessFactor:function(){return e$2e(i._roughnessFactor)?i._roughnessFactor:n._PBRMaterialParams[t.groupName].roughness},uEmissiveFactor:function(){return e$2e(i._emissiveFactor)?i._emissiveFactor:n._PBRMaterialParams[t.groupName].emissionFactor},uEmissionTexture:function(){return e$2e(i.emissiveTexture)&&i._emissiveTextureIndex>-1?i.emissiveTexture:n._PBRMaterialParams[t.groupName].emissiveTexture},uEmissiveUVOffsetAndTiling:function(){var e=i._emissiveTextureMotion,t=new e$2c,n=performance.now()/1e3;if(e._offsetPeriod>0){var r=n%e._offsetPeriod;t.x=r*e._offsetSpeedU,t.y=r*e._offsetSpeedV}else t.x=0,t.y=0;if(e._tilingPeriod>0){var o=n%e._tilingPeriod;t.z=1+o*e._tilingSpeedU,t.w=1+o*e._tilingSpeedV}else t.z=1,t.w=1;return t},uBaseTexture:function(){return e$2e(i.baseColorTexture)&&i._baseColorTextureIndex>-1?i.baseColorTexture:n._PBRMaterialParams[t.groupName].baseTexture},uNormalTexture:function(){return e$2e(i.normalTexture)&&i._normalTextureIndex>-1?i.normalTexture:n._PBRMaterialParams[t.groupName].normalTexture},uMetallicRoughnessTexture:function(){return e$2e(i.metallicRoughnessTexture)&&i._metallicRoughnessTextureIndex>-1?i.metallicRoughnessTexture:n._PBRMaterialParams[t.groupName].metallicRoughnessTexture},uOcclusionTexture:function(){return e$2e(i.occlusionTexture)&&i._occlusionTextureIndex>-1?i.occlusionTexture:n._PBRMaterialParams[t.groupName].occlusionTexture}};r=p$19(r,i.createPBRUniformMap()),r=p$19(r,n._frameState.lightSource.createUniformMap()),e.uniformMap=r}function _0x376c35(e,t,i,n){var r=t$10.createIfNeeded(t).fetchImage().then((function(t){var r=new t$U({context:e,source:t,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.LINEAR_MIPMAP_LINEAR,magnificationFilter:tt$i.LINEAR})});!e$2d.isPowerOfTwo(r.width)||!e$2d.isPowerOfTwo(r.height)||r.generateMipmap(I$1e.NICEST),i[n]=r})).otherwise((function(){i[n]=void 0}));i[n]=r}function _0x2362db(e,t){if(e$2e(e._group[t])&&e._group[t].renderEntities.length>0)for(var i=e._group[t].renderEntities,n=0;n<i.length;n++)e$2e(i[n]._colorCommand)&&(e$2e(e._PBRMaterialParams[t])&&e$2e(e._PBRMaterialParams[t].roughness)?(i[n].appendProgramDefine(!1,!0,D$V.BRDF,!1),e._PBRMaterialParams[t].baseColorTextureIndex>-1&&e$2e(e._PBRMaterialParams[t].baseTexture)&&i[n].appendProgramDefine(!1,!0,D$V.HAS_BASE_TEXTURE,!1),e._PBRMaterialParams[t].normalTextureIndex>-1&&e$2e(e._PBRMaterialParams[t].normalTexture)&&i[n].appendProgramDefine(!1,!0,D$V.HAS_NORMAL_TEXTURE,!1),e._PBRMaterialParams[t].emissionTextureIndex>-1&&i[n].appendProgramDefine(!1,!0,D$V.HAS_EMISSIVE_TEXTURE,!1),e$2e(e._frameState.specularEnvironmentMaps)&&i[n].appendProgramDefine(!1,!0,D$V.IBL,!1)):(i[n].removeProgramDefine(!1,!0,D$V.BRDF,!1),i[n].removeProgramDefine(!1,!0,D$V.HAS_BASE_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,D$V.HAS_NORMAL_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,D$V.HAS_EMISSIVE_TEXTURE,!1),i[n].removeProgramDefine(!1,!0,D$V.IBL,!1)))}Object.defineProperties(_0xd633a7.prototype,{type:{get:function(){return this._type}},group:{get:function(){return this._group}},visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("value",e),this._visible=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){o$1q.typeOf.number("maxVisibleAltitude",e),this._maxVisibleAltitude=e}},maxVisibleDistance:{get:function(){return this._maxVisibleDistance},set:function(e){o$1q.typeOf.number("maxVisibleDistance",e),this._maxVisibleDistance=e}},minVisibleDistance:{get:function(){return this._minVisibleDistance},set:function(e){o$1q.typeOf.number("minVisibleDistance",e),this._minVisibleDistance=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){o$1q.typeOf.number("minVisibleAltitude",e),this._minVisibleAltitude=e}},filterMode:{get:function(){return this._filterMode},set:function(e){o$1q.typeOf.number("filterMode",e),this._filterMode=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){o$1q.typeOf.number("filterPixel",e),this._filterPixel=e}},isOverLay:{get:function(){return this._isOverLay},set:function(e){o$1q.typeOf.bool("value",e),this._isOverLay=e}},clampToObject:{get:function(){return this._clampToObject},set:function(e){if(o$1q.typeOf.bool("value",e),this._clampToObject!==e){this._clampToObject=e;var t=this._group;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];if(!n.ready)continue;for(var r=0,o=n.renderEntities.length;r<o;r++){var a=n.renderEntities[r];this._profile?_0xbe0258(a,this,e):e$2e(a._colorCommand)&&(a._colorCommand.derivedCommands={},a.createColorRenderState(n,e),e?(a._colorCommand.pass=Le$q.ClampObject,e$2e(a._stencilCommand)||a.createClampCommand(),a.appendProgramDefine(!0,!0,"ClampObject",!1)):a.removeProgramDefine(!0,!0,"ClampObject",!1))}}}}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}},addedEvent:{get:function(){return this._addedEvent}},mixColorType:{get:function(){return this._mixColorType},set:function(e){this._mixColorType!==e&&(this._mixColorType=e)}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders!==e&&(this._customRequestHeaders=e)}}}),_0xd633a7.prototype.add=function(e,t,i,n){o$1q.defined("url",e),o$1q.typeOf.string("url",e),o$1q.defined("attrs",t),Array.isArray(t)||(t=[t]),e$2e(this._group[e])||(this._group[e]={instances:new e$1Q,ready:!1,state:e$2e(i)?_0x383013.LOADED:_0x383013.UNLOAD,instanceCount:0,instanceBuffer:void 0,renderEntities:[],cullEnabled:!1,cullFace:G$1a.BACK,oriCenter:void 0,oriRadius:void 0,dirty:!1,url:e});for(var r=this._group[e],o=this._context,a=0,s=t.length;a<s;a++){var l=t[a],u=u$Z(l.id,r.instances.length);if(r.instances.contains(u))console.log("id "+u+" exist");else{l.sceneMode=this._context._us._mode;var c=new _0x24f13b(o,u,r,l);r.instances.set(u,c)}}if(e$2e(i))if(n=u$Z(n,!0),i instanceof Blob){var h=new FileReader,d=this;h.addEventListener("load",(function(){if(n){var t=new Uint8Array(h.result).buffer;d._group[e]._arrayBuffer=t}else d._group[e]._arrayBuffer=h.result})),h.addEventListener("error",(function(){})),h.readAsArrayBuffer(i)}else if(i instanceof ArrayBuffer)if(n){var f=i;this._group[e]._arrayBuffer=f}else this._group[e]._arrayBuffer=i;else{var p=_0x680f96.getDataShape(i);r=_0x680f96.updateSurfaceMesh(i,p,!0);this._group[e]._threedmodeling=r}r.dirty=!0},_0xd633a7.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0xd633a7.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0xd633a7.prototype.removeCollection=function(e){o$1q.defined("removeCollection url",e);var t=this._group[e];if(!e$2e(t))return!1;for(var i=0,n=t.renderEntities.length;i<n;i++)t.renderEntities[i].destroy();return t.renderEntities.length=0,t.instances.removeAll(),this._group[e]=null,delete this._group[e],!0},_0xd633a7.prototype.getInstance=function(e,t){o$1q.defined("S3MInstanceCollection getInstance url",e),o$1q.defined("S3MInstanceCollection getInstance id",t);var i=this._group[e];if(e$2e(i))return i.instances.get(t)},_0xd633a7.prototype.removeInstance=function(e,t){o$1q.defined("removeInstance url",e),o$1q.defined("removeInstance ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(!e$2e(i))return!1;for(var n,r=0,o=t.length;r<o;r++){var a=t[r];e$2e(n=i.instances.get(a))&&(n.updateColor(e$1X.WHITE.withAlpha(0),n.id),n.isDeleted=!0,i.instances.remove(a),n=null,this._group[e].dirty=!0)}return!0},_0xd633a7.prototype.setCullEnabled=function(e,t){o$1q.typeOf.string("S3MInstanceCollection setCullEnabled url",e),t=u$Z(t,G$1a.BACK);var i=this._group[e];if(e$2e(i)&&(!i.cullEnabled||i.cullFace!==t)&&(i.cullEnabled=!0,i.cullFace=t,i.ready))for(var n=0,r=i.renderEntities.length;n<r;n++){var o=i.renderEntities[n],a=d$1m.getState(o._colorCommand.renderState);a.cull.enabled=!0,a.cull.face=t,o._colorCommand.renderState=d$1m.fromCache(a)}},_0xd633a7.prototype.setUnSelected=function(){var e=this._group;if(e$2e(e))for(var t in e){var i=e[t];if(e$2e(i.instances)&&!(i.instances.length<1))for(var n=0,r=i.instances.length;n<r;n++){i.instances.values[n].setUnSelected()}}},_0xd633a7.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;if(this._visible){if(e$2e(this._volume)){if(!this._volume._ready)return;this._volume.loadTexture(this._context)}var t=e.camera;if(!(t.positionCartographic.height>this._maxVisibleAltitude||t.positionCartographic.height<this._minVisibleAltitude)){this._frameState=e;var i=e.commandList,n=this._group,r=e.passes;for(var o in this._picking=r.pick,this._allColorCommand=[],n){var a=n[o];if(_0x47a2a8(this,o),a.ready){a.dirty&&_0x509d8b(a,this._context);for(var s=[],l=!1,u=0;u<a.instances.length;u++){var c=a.instances.values[u];0===u&&(l=c.color.alpha<1);var h=c.boundingSphere;s.push(h)}for(var d=i$1d.fromBoundingSpheres(s,new i$1d),f=0,p=a.renderEntities.length;f<p;f++){var _=a.renderEntities[f];if(_._materialUBO.update(this._context),this._clampToObject&&this._profile){if(e._fboState.frameBufferType===Qe$c.CLAMP)_._stencilCommand.boundingVolume=d,i.push(_._stencilCommand),_._profileCommand.boundingVolume=d,_._profileCommand.instanceCount=a.instanceCount,_._profileCommand.pass=Le$q.ClampObject,i.push(_._profileCommand);else if(this._spatialQueryEnable){e$2e(_._spatialQueryCommand)||_.createSpatialQueryCommand(this);var m=3===this._sqTextures.length?_._spatialQueryCommand:_._colorCommand;m.boundingVolume=d,m.instanceCount=a.instanceCount,m.pass=this._isOverLay?Le$q.OVERLAY_AGAINST_DEPTH:l?Le$q.TRANSLUCENT:Le$q.OPAQUE,e._fboState.enabled||i.push(m)}}else this._clampToObject&&(_._stencilCommand.boundingVolume=d,i.push(_._stencilCommand)),_._colorCommand.boundingVolume=d,_._colorCommand.instanceCount=a.instanceCount,_._colorCommand.pass=this._isOverLay?Le$q.OVERLAY_AGAINST_DEPTH:this._clampToObject?Le$q.ClampObject:l?Le$q.TRANSLUCENT:Le$q.OPAQUE,this._needToRender&&i.push(_._colorCommand),this._allColorCommand.push(_._colorCommand)}}}}}},_0xd633a7.prototype.isDestroyed=function(){return!1},_0xd633a7.prototype._updateShadow=function(e){var t=_0x2b3d89(e),i=e._group;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s._colorCommand.castShadows=t,s._colorCommand.receiveShadows=t}}},_0xd633a7.prototype.destroy=function(){for(var e in this._group){var t=this._group[e];if(t.ready){for(var i=0;i<t.renderEntities.length;i++){var n=t.renderEntities[i]._colorCommand;if(e$2e(n.vertexArray)&&!n.vertexArray.isDestroyed()){n.vertexArray._inner._indexBuffer.vertexArrayDestroyable=!0;for(var r=0;r<n.vertexArray._inner._attributes.length;r++){n.vertexArray._inner._attributes[r].vertexBuffer.vertexArrayDestroyable=!0}n.vertexArray=n.vertexArray.destroy()}n.shaderProgram=n.shaderProgram&&n.shaderProgram.destroy()}t.instanceBuffer=t.instanceBuffer&&!t.instanceBuffer.isDestroyed()&&t.instanceBuffer.destroy()}}return this._group=void 0,this._allColorCommand=[],i$11(this)},_0x526522.prototype.initialize=function(e){this._initialize||(this.createCommand(e),this._initialize=!0)},_0x526522.prototype.createVertexData=function(e){for(var t=this._vertexPackage.vertexAttributes,i=0,n=t.length;i<n;i++){var r=t[i];!e$2e(r.typedArray)||(r.vertexBuffer=t$X.createVertexBuffer({context:e,typedArray:r.typedArray,usage:A$18.STATIC_DRAW}),r.vertexBuffer.vertexArrayDestroyable=!1,r.typedArray=null,delete r.typedArray)}if(!e$2e(this._ownerGroup.instanceBuffer)){var o=this._ownerGroup.instances,a=void 0;o.length>0&&(a=o.values[0].localTransform);var s=o.length;this._ownerGroup.instanceCount=s;var l=e$2e(a)?_0x447b75+8:_0x447b75,u=new Float32Array(s*l);for(i=0;i<s;i++){var c=o.values[i];c.index=i,_0x1e4fb8(e,u,c,i*l)}this._ownerGroup.instanceBuffer=t$X.createVertexBuffer({context:e,typedArray:u,usage:A$18.STATIC_DRAW})}for(var h in this._attributeLocations=this._vertexPackage.attrLocation,this._attributeLocations){t[d=this._attributeLocations[h]].name=h}var d=Object.keys(this._attributeLocations).length;return _0x4b14bd(t,this._attributeLocations,d,this._ownerGroup,a),t},_0x526522.prototype.createCommand=function(e){var t=e._context,i=this.createVertexData(t),n=Le$q.OPAQUE;if(!e$2e(this._arrIndexPackage)||!e$2e(this._arrIndexPackage[0]))return;var r=this._arrIndexPackage[0],o=this._vertexPackage.verticesCount,a=ce$z.UNSIGNED_SHORT;(1===r.indexType||o>=e$2d.SIXTY_FOUR_KILOBYTES)&&t.elementIndexUint&&(a=ce$z.UNSIGNED_INT);var s=t$X.createIndexBuffer({context:t,typedArray:r.indicesTypedArray,usage:A$18.STATIC_DRAW,indexDatatype:a});s.vertexArrayDestroyable=!1,this.indexBuffer=s,this.attributes=i;var l=this._mapPass[r.materialCode]||_0xf77618.Default;this._arrIndexPackage[0]=null,!0===l._bTransparentSorting&&(n=Le$q.TRANSLUCENT);var u=W$18.TRIANGLES;switch(r.primitiveType){case 1:u=W$18.POINTS;break;case 2:u=W$18.LINES;break;case 4:u=W$18.TRIANGLES}n=e._isOverLay?Le$q.OVERLAY_AGAINST_DEPTH:n;var c=new i$$({primitiveType:u,boundingVolume:this._boundingVolume,pass:n,owner:this,cull:!0}),h=e._context.uniformState;c.addUniformBuffer(h._sceneUBO),c.addUniformBuffer(h._lightUBO),c.addUniformBuffer(this._materialUBO),e._shadowType===_0x325616.ALL||e._shadowType===_0x325616.SELECTION?(c.castShadows=!0,c.receiveShadows=!0):(c.castShadows=!1,c.receiveShadows=!1),c.pickId="vPickColor",c.instanceCount=this._ownerGroup.instances.length,c.vertexArray=new c$13({context:t,attributes:i,indexBuffer:s});var d=new s$V({name:"S3MInstanceCollectionVertex",sources:[_0x4b6e8f]}),f=new s$V({name:"S3ModelFP",sources:[_0x47b2f7]});0===this._collection._supportCompressType&&f.defines.push("FLIP_Y"),e$2e(this._attributeLocations.aColor)&&d.defines.push("VertexColor"),l._textures.length>0&&e$2e(this._attributeLocations.aTexCoord0)&&(d.defines.push("TEXTURE"),f.defines.push("TEXTURE")),e$2e(this._attributeLocations.aNormal)&&(d.defines.push(D$V.HAS_NORMAL),f.defines.push(D$V.HAS_NORMAL)),e$2e(e._volume)&&(d.defines.push(D$V.VOLUME),f.defines.push(D$V.VOLUME),e._volume.hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(d.defines.push(D$V.VOLUME2),f.defines.push(D$V.VOLUME2))),this._collection.clampToObject&&(d.defines.push("ClampObject"),f.defines.push("ClampObject"));const p=e._frameState.lightSource;e$2e(p)&&(f.defines.push("MAX_POINT_LIGHT_COUNT "+s$J.MaxPointLightCount),f.defines.push("MAX_SPOT_LIGHT_COUNT "+s$J.MaxSpotLightCount),f.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$J.MaxDirectionLightCount),p.directionalLight.length>0&&f.defines.push(D$V.HAS_DIR_LIGHTS),p._visibleLightList[_0x4970c2.POINT].length>0&&f.defines.push(D$V.HAS_POINT_LIGHTS),p._visibleLightList[_0x4970c2.SPOT].length>0&&f.defines.push(D$V.HAS_SPOT_LIGHTS),p.hemisphereLight.length>0&&f.defines.push(D$V.HAS_HEMISPHERE_LIGHTS));this._ownerGroup.instances.length>0&&e$2e(this._ownerGroup.instances.values[0].localTransform)&&d.defines.push("LocalTransform");var _=this._ownerGroup.url;(l._usePBR||e$2e(e._PBRMaterialParams[_])&&e._PBRMaterialParams[_].roughness>0)&&(f.defines.push(D$V.BRDF),(l.baseColorTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_].baseColorTextureIndex>-1&&e$2e(e._PBRMaterialParams[_].baseTexture))&&f.defines.push(D$V.HAS_BASE_TEXTURE),(l.uNormalTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_].normalTextureIndex>-1&&e$2e(e._PBRMaterialParams[_].normalTexture))&&f.defines.push(D$V.HAS_NORMAL_TEXTURE),(l.emissiveTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_].emissionTextureIndex>-1)&&f.defines.push(D$V.HAS_EMISSIVE_TEXTURE),(l.metallicRoughnessTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_]._metallicRoughnessTextureIndex>-1)&&f.defines.push(D$V.HAS_MetallicRoughness_TEXTURE),(l.occlusionTexture||e._PBRMaterialParams[_]&&e._PBRMaterialParams[_]._occlusionTextureIndex>-1)&&f.defines.push(D$V.HAS_OCCLUSION_TEXTURE),(e$2e(e._frameState.specularEnvironmentMaps)||e$2e(e._frameState.hdrEnvMap))&&(f.defines.push(D$V.IBL),e$2e(e._frameState.specularEnvironmentMaps)&&f.defines.push(D$V.KtxEnvMap)),e$2e(l._alphaMode)&&l._alphaMode===_0x36a597.MASK&&f.defines.push(D$V.MASK)),l.appendPBRMacroToShader(d,f);var m=e$2e(this._attributeLocations.aNormal);c.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:f,attributeLocations:this._attributeLocations});var g=l._diffuseColor,x=l._diffuseColor,y=l._specularColor,v=l._shininess;_0x2d0304(c,{texture:l._textures[0],hasNormal:m,ambientColor:g,diffuseColor:x,specularColor:y,shininess:v,layer:this._collection,geoMat:this._geoMatrix,groupName:_},l),this._texture=l._textures[0],this._colorCommand=c,this._vertexPackage=void 0,this._arrIndexPackage.length=0,this.createColorRenderState(this._ownerGroup,this._collection._clampToObject),this._collection._clampToObject&&(c.pass=Le$q.ClampObject,this.createClampCommand())},_0x526522.prototype.appendProgramDefine=function(e,t,i,n){var r=this._collection._context,o=n?this._profileCommand:this._colorCommand;if(e$2e(o)){var a=o.shaderProgram.fragmentShaderSource,s=o.shaderProgram.vertexShaderSource;e&&_0x4dbf0f(s,i),t&&_0x4dbf0f(a,i),o.shaderProgram.destroy(),o.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:this._attributeLocations}),e$2e(this._stencilCommand)&&(this._stencilCommand.shaderProgram=o.shaderProgram)}},_0x526522.prototype.removeProgramDefine=function(e,t,i,n){var r=this._collection._context,o=n?this._profileCommand:this._colorCommand;if(e$2e(o)){var a=o.shaderProgram.fragmentShaderSource,s=o.shaderProgram.vertexShaderSource;e&&_0x48c024(s,i),t&&_0x48c024(a,i),o.shaderProgram.destroy(),o.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:this._attributeLocations})}},_0x526522.prototype.createColorRenderState=function(e,t){if(t){var i=_0x45bcf8.createClampObjectColorRenderState();this._colorCommand.renderState=d$1m.fromCache(i)}else this._colorCommand.renderState=d$1m.fromCache({cull:{enabled:e.cullEnabled,face:e.cullFace},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND})},_0x526522.prototype.createClampCommand=function(){if(!e$2e(this._stencilCommand)){var e=_0x45bcf8.createClampObjectStencilRenderState(),t=e$2e(this._profileCommand)?this._profileCommand:this._colorCommand,i=i$$.shallowClone(t);i.renderState=d$1m.fromCache(e),this._stencilCommand=i}},_0x526522.prototype.createProfileCommand=function(e){if(!e$2e(this._profileCommand)){var t=this._colorCommand,i=t.shaderProgram.vertexShaderSource.clone(),n=t.shaderProgram.fragmentShaderSource.clone();i.defines.push("ClampObject"),n.defines.push("ClampObject"),i.defines.push("PROFILE"),n.defines.push("PROFILE");var r=e._context;r.drawBuffers&&r.colorBufferFloat&&r.depthTexture&&n.defines.push("MRT");var o=i$$.shallowClone(t);o.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._profileCommand=o}},_0x526522.prototype.createSpatialQueryCommand=function(e){if(!e$2e(this._spatialQueryCommand)){var t=this._colorCommand,i=t.shaderProgram.vertexShaderSource.clone(),n=t.shaderProgram.fragmentShaderSource.clone();i.defines.push("SQRESULT"),n.defines.push("SQRESULT"),e._frameState.useLogDepth&&n.defines.push("LOG_DEPTH");var r=i$$.shallowClone(t);r.uniformMap.uFrontDepthTexture=function(){return e._sqTextures[0]},r.uniformMap.uBackDepthTexture=function(){return e._sqTextures[1]},r.uniformMap.uFrontColorTexture=function(){return e._sqTextures[2]},r.uniformMap.uSQMode=function(){return e._sqMode},r.shaderProgram=r$14.fromCache({context:e._context,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._spatialQueryCommand=r}},_0x526522.prototype.destroy=function(){for(var e in this._mapPass)this._mapPass.hasOwnProperty(e)&&(this._mapPass[e]=this._mapPass[e]&&!this._mapPass[e].isDestroyed()&&this._mapPass[e].destroy());this._mapPass=void 0;var t=this._colorCommand;e$2e(t)&&(t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy(),this._colorCommand=void 0),e$2e(t=this._stencilCommand)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),this._stencilCommand=void 0),e$2e(t=this._profileCommand)&&(t.vertexArray=t.vertexArray&&!t.vertexArray.isDestroyed()&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&!t.shaderProgram.isDestroyed()&&t.shaderProgram.destroy(),this._profileCommand=void 0),this._vertexPackage=null,this._arrIndexPackage.length=0},_0xd633a7.prototype._setSQTextures=function(e){this._sqTextures=e},_0xd633a7.prototype._setSQMode=function(e){this._sqMode=e},_0xd633a7.prototype._getAllColorCommand=function(){return this._allColorCommand},_0xd633a7.prototype.setPBRMaterialFromJSON=function(e,t){if(this._pbrParameter===Xe$e.NONE){var i=this;e in i._PBRMaterialParams||(i._PBRMaterialParams[e]={metallic:0,roughness:0,baseColorFactor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,baseTexture:void 0,emissionFactor:o$1p.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseUri:""}),i._PBRMaterialParams[e].baseUri=i$1b(t),u$P(t).then((function(t){var n=t.material,r=n.pbrMetallicRoughness,o=n.textureunitstates;if(i._PBRMaterialParams[e].baseColorFactor=e$2e(r.baseColor)?e$2c.fromElements(r.baseColor.x,r.baseColor.y,r.baseColor.z,r.baseColor.w):i._PBRMaterialParams[e].baseColorFactor,i._PBRMaterialParams[e].baseColorTextureIndex=e$2e(r.baseColorTextureIndex)?r.baseColorTextureIndex:-1,i._PBRMaterialParams[e].emissionFactor=e$2e(r.emissiveFactor)?o$1p.fromElements(r.emissiveFactor.x,r.emissiveFactor.y,r.emissiveFactor.z):o$1p.UNIT_XYZ,i._PBRMaterialParams[e].emissionTextureIndex=e$2e(r.emissiveTextureIndex)?r.emissiveTextureIndex:i._PBRMaterialParams[e].emissionTextureIndex,i._PBRMaterialParams[e].metallic=e$2e(r.metallicFactor)?r.metallicFactor:i._PBRMaterialParams[e].metallic,i._PBRMaterialParams[e].roughness=e$2e(r.roughnessFactor)?r.roughnessFactor:i._PBRMaterialParams[e].roughness,i._PBRMaterialParams[e].occlusionTextureIndex=e$2e(r.occlusionTextureIndex)?r.occlusionTextureIndex:-1,i._PBRMaterialParams[e].normalTextureIndex=e$2e(r.normalTextureIndex)?r.normalTextureIndex:-1,-1!==r.baseColorTextureIndex){var a=i._PBRMaterialParams[e].baseUri+o[r.baseColorTextureIndex].textureunitstate.url;_0x376c35(i._context,a,i._PBRMaterialParams[e],"baseTexture")}if(-1!==r.normalTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.normalTextureIndex].textureunitstate.url;_0x376c35(i._context,a,i._PBRMaterialParams[e],"normalTexture")}if(-1!==r.emissiveTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.emissiveTextureIndex].textureunitstate.url;_0x376c35(i._context,a,i._PBRMaterialParams[e],"emissiveTexture")}if(-1!==r.metallicRoughnessTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.metallicRoughnessTextureIndex].textureunitstate.url;_0x376c35(i._context,a,i._PBRMaterialParams[e],"metallicRoughnessTexture")}if(-1!==r.occlusionTextureIndex){a=i._PBRMaterialParams[e].baseUri+o[r.occlusionTextureIndex].textureunitstate.url;_0x376c35(i._context,a,i._PBRMaterialParams[e],"occlusionTexture")}_0x2362db(i,e)}))}},_0xd633a7.prototype.removePBRMaterial=function(e){delete this._PBRMaterialParams[e],_0x2362db(this,e)};var _0x48062a=(_0x209021=!0,function(e,t){var i=_0x209021?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x209021=!1,i}),_0xf2286=_0x48062a(void 0,(function(){return _0xf2286.toString().search("(((.+)+)+)+$").toString().constructor(_0xf2286).search("(((.+)+)+)+$")})),_0x209021;function _0x16da97(e){if(!e$2e(e))throw new t$15("scene are required.");if(!e.context.depthTexture)throw new t$15("the depth buffer is not supported.");this._scene=e,this._name="",this._frameState=void 0,this._isInitlized=!1,this._depthDirty=!1,this._bufferDirty=!1,this._updateIDs=!1,this._disjointIDs=[],this._intersectsIDs=[],this._ids=[],this._textures=[],this._depthBuffers=[],this._resultBuffer=void 0,this._disjointBuffer=void 0,this._worldMatrix=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._matDepthView=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._matDepthProject=new p$1d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this._boundingSphere=new i$1d,this._depthCommands=[],this._colorCommand=void 0,this._clearCommand=new t$W({color:new e$1X(0,0,0,0),stencil:0,depth:1}),this._geometry=void 0,this._layers=[],this._fillColor=new e$1X(1,1,0,.5),this._outlineColor=new e$1X(1,0,0,1),this._positionMode=j$Z.Disjoint,this._fillStyle=fr$3.Fill,this._positionMode=j$Z.Disjoint,this._beQueryCollection=void 0,this._queryCollection=void 0,this._allS3MColorCommand=[],this._profile=!1,this._clipLayers=new e$1Q,this._curFrameNumber=-1,this._width=1,this._height=1}function _0x17bab6(e){e$2e(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&!e._colorCommand.vertexArray.isDestroyed()&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&!e._colorCommand.shaderProgram.isDestroyed()&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0);for(var t=0;t<e._depthCommands.length;t++)e._depthCommands[t].vertexArray=e._depthCommands[t].vertexArray&&!e._depthCommands[t].vertexArray.isDestroyed()&&e._depthCommands[t].vertexArray.destroy(),e._depthCommands[t].shaderProgram=e._depthCommands[t].shaderProgram&&!e._depthCommands[t].shaderProgram.isDestroyed()&&e._depthCommands[t].shaderProgram.destroy(),e._depthCommands[t]=void 0;e._depthCommands=[],e$2e(e._outlineCommand)&&(e._outlineCommand.vertexArray=e._outlineCommand.vertexArray&&!e._outlineCommand.vertexArray.isDestroyed()&&e._outlineCommand.vertexArray.destroy(),e._outlineCommand.shaderProgram=e._outlineCommand.shaderProgram&&!e._outlineCommand.shaderProgram.isDestroyed()&&e._outlineCommand.shaderProgram.destroy(),e._outlineCommand=void 0)}function _0x993af9(e){for(var t=0;t<e._textures.length;t++)e$2e(e._textures[t])&&(e._textures[t]=e._textures[t]&&e._textures[t].destroy(),e._textures[t]=null);e._textures=[]}function _0x2cbe11(e){e$2e(e._frameState)&&(e$2e(e._disjointBuffer)&&delete e._frameState._framebufferList.sqDisjoinTexture,e$2e(e._resultBuffer)&&delete e._frameState._framebufferList.sqResultTexture,e._frameState=void 0),e._disjointBuffer=e._disjointBuffer&&e._disjointBuffer.destroy(),e._resultBuffer=e._resultBuffer&&e._resultBuffer.destroy();for(var t=0;t<e._depthBuffers.length;t++)e._depthBuffers[t]=e._depthBuffers[t]&&e._depthBuffers[t].destroy();e._depthBuffers=[]}function _0x4c0abe(e){return!!e$2e(e)&&(e.geoType===P$U.GEOCONE||e.geoType===P$U.GEOBOX||e.geoType===P$U.GEOCYLINDER||e.geoType===P$U.GEOSPHERE||e.geoType===P$U.GEOREGION3D||e.geoType===P$U.GEOELLIPSOID||e.geoType===P$U.GEOMODEL3D||e instanceof y$R)}function _0x58dbe(e,t,i){_0x17bab6(e);var n=t.drawingBufferWidth,r=t.drawingBufferHeight,o=!0;if(e._textures.length>0){var a=e._textures[0];o=n!=a.width||r!=a.height}o&&(_0x2cbe11(e),_0x993af9(e),_0x45f8d4(e,t,i),_0x4f5ed3(e,t)),_0x45c68e(e,t,i);for(var s=0;s<e._layers.length;s++)e._layers[s]._spatialQueryEnable=!0,e._layers[s]._setSQTextures(e._textures),e._layers[s].selectEnabled=!0;s=0;for(var l=e._clipLayers.length;s<l;s++){e._clipLayers.values[s]._setSQTextures(e._textures)}e._isInitlized=!0}function _0x45f8d4(e,t,i){var n=t.drawingBufferWidth,r=t.drawingBufferHeight;if(0===e._textures.length)for(var o=0;o<3;o++){var a=new t$U({context:t,width:n,height:r,pixelFormat:V$12.UNSIGNED_BYTE,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})});e._textures.push(a)}var s=new t$K(t);s.isUpdate=!1,i._framebufferList.sqResultTexture=s,e._resultBuffer=s;var l=new t$K(t);l.isUpdate=!1,i._framebufferList.sqDisjoinTexture=l,e._disjointBuffer=l}function _0x45c68e(e,t,i){if(!e$2e(e._colorCommand)||!e$2e(e._outlineCommand))if(_0x17bab6(e),e._allS3MColorCommand.length>0)for(var n=0;n<e._allS3MColorCommand.length;n++)_0x5a4c6e(e,t,i,e._allS3MColorCommand[n]);else _0x3763d0(e,t,i)}function _0x3763d0(e,t,i){var n=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.TRANSLUCENT,owner:e}),r={aPosition:0,aNormal:1},o=new s$V({sources:[_0x4c39c3]});p$1d.equals(e._worldMatrix,p$1d.IDENTITY)&&o.defines.push("USE_RelativeOrigin"),n.vertexArray=e._geometry.getVertexArray(t),n.shaderProgram=r$14.fromCache({name:"spatialQuerySimple",context:t,vertexShaderSource:o,fragmentShaderSource:_0x37e2ae,attributeLocations:r}),n.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),n.uniformMap={uDiffuseColor:function(){return e._fillColor}},e._colorCommand=n,_0x5a4c6e(e,t,i,n);var a=new i$$({primitiveType:W$18.LINES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.TRANSLUCENT,owner:e});a.vertexArray=e._geometry.getOutlineVertexArray(t),a.shaderProgram=r$14.fromCache({name:"spatialQueryOutline",context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:r}),a.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),a.uniformMap={uDiffuseColor:function(){return e._outlineColor}},e._outlineCommand=a}function _0x5a4c6e(e,t,i,n){var r=n.shaderProgram.vertexShaderSource.clone(),o=new s$V({name:"SpatialQueryFp",sources:[_0x12eef8]});if(o.defines.push("DEPTH"),i.useLogDepth){r.defines.push("LOG_DEPTH");for(var a=r.sources,s=0;s<a.length;++s)a[s]=s$V.replaceMain(a[s],"czm_log_depth_main");a.push("\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n"),o.defines.push("LOG_DEPTH")}var l=n.shaderProgram._attributeLocations,u=i$$.shallowClone(n);u.renderState=d$1m.fromCache({depthTest:{enabled:!0},cull:{enabled:!0,face:de$y.BACK}}),u.shaderProgram=r$14.fromCache({name:"spatialQueryFrontDepth",context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:l}),u.framebuffer=e._depthBuffers[0],e._depthCommands.push(u);var c=i$$.shallowClone(n);c.renderState=d$1m.fromCache({depthTest:{enabled:!0},cull:{enabled:!0,face:de$y.FRONT}}),c.shaderProgram=r$14.fromCache({name:"spatialQueryBackDepth",context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:l}),c.framebuffer=e._depthBuffers[1],e._depthCommands.push(c);var h=i$$.shallowClone(n),d=new s$V({name:"SpatialQueryFp",sources:[_0x12eef8]});d.defines.push("COLOR"),h.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1}}),h.shaderProgram=r$14.fromCache({name:"spatialQueryFrontColor",context:t,vertexShaderSource:r,fragmentShaderSource:d,attributeLocations:l}),h.framebuffer=e._depthBuffers[2],e._depthCommands.push(h)}function _0x4f5ed3(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight,r=new t$V({context:t,colorTextures:[e._textures[0]],destroyAttachments:!1,depthStencilTexture:new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})});e._depthBuffers.push(r);var o=new t$V({context:t,colorTextures:[e._textures[1]],destroyAttachments:!1,depthStencilTexture:new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})});e._depthBuffers.push(o);var a=new t$V({context:t,colorTextures:[e._textures[2]],destroyAttachments:!1,depthStencilTexture:new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})});e._depthBuffers.push(a)}function _0x5564ce(e,t,i,n){if(!e$2e(i))return Promise.resolve(!1);var r=[];return _0x220290(e._scene._context,i,e._layers,n,r).then((t=>{if(e._positionMode===j$Z.Intersects)for(var i=Object.keys(n),o=0;o<i.length;o++){var a=r[i[o]],s=e._layers[a],l=n[i[o]];l.length>0&&s.setSelection(l)}return Promise.resolve(t)}))}function _0x220290(e,t,i,n,r){if(!e$2e(t)||!t.isUpdate)return Promise.resolve(!1);var o=t.renderTexture._width,a=t.renderTexture._height;return e.readPixelsAsync({framebuffer:t.renderTexture._fb,x:0,y:0,width:o,height:a}).then((t=>{for(var s=[],l=0;l<i.length;l++){var u=_0x44af25(_=i[l].id);r[u]=l,s.push(u),n[u]=[]}for(var c=0;c<o;c++)for(var h=0;h<a;h++){var d=4*(h*o+c);if(0!==t[d]||0!==t[d+1]||0!==t[d+2]){var f=e$1X.byteToRgba(t[d],t[d+1],t[d+2],t[d+3]),p=e.getObjectByPickId(f);if(e$2e(p)){var _=p.primitive.id,m=p.id,g=(u=_0x44af25(_),s.indexOf(u));if(!(g<0))if(i[r[u]],0==n[u].length){var x=[];x.push(m),n[u]=x}else(g=n[u].indexOf(m))<0&&n[u].push(m)}}}return Promise.resolve(!0)}))}function _0x44af25(e){return"id_"+e}function _0x585d32(e,t,i){if(e._profile){e$2e(e._beQueryCollection)&&e._beQueryCollection._setSQMode(e._positionMode);for(var n=0,r=e._clipLayers.length;n<r;n++){e._clipLayers.values[n]._setSQMode(e._positionMode)}}else e._frameState=i,0!==e._textures.length&&e._bufferDirty&&!e._depthDirty&&(e._resultBuffer.isUpdate=!0,e._resultBuffer._beginFunc=function(t){for(var i=0;i<e._layers.length;i++)e._layers[i]._setSQMode(j$Z.Intersects)},e._resultBuffer._endFunc=function(t){e._intersectsIDs=[],_0x5564ce(e,t,e._resultBuffer,e._intersectsIDs).then((t=>{e._updateIDs=!0})),e._resultBuffer.isUpdate=!1},e._positionMode!==j$Z.Intersects&&(e._disjointBuffer.isUpdate=!0,e._disjointBuffer._beginFunc=function(t){for(var i=0;i<e._layers.length;i++)e._layers[i]._setSQMode(j$Z.Disjoint)},e._disjointBuffer._endFunc=function(t){e._disjointIDs=[],_0x5564ce(e,t,e._disjointBuffer,e._disjointIDs).then((t=>{_0x6d6686(e),_0x4fa567(e),e._updateIDs=!0})),e._disjointBuffer.isUpdate=!1}),e._bufferDirty=!1)}function _0x6d6686(e){if(e._positionMode===j$Z.Disjoint)for(var t=Object.keys(e._disjointIDs),i=Object.keys(e._intersectsIDs),n=0;n<e._layers.length;n++){var r=e._layers[n],o=_0x44af25(r.id);if(!(t.indexOf(o)<0)){if(i.indexOf(o)<0){r.setSelection(e._disjointIDs[o]);continue}for(var a=e._intersectsIDs[o],s=e._disjointIDs[o],l=0;l<a.length;l++){var u=s.indexOf(a[l]);u>=0&&s.splice(u,1)}r.setSelection(s)}}}function _0x4fa567(e){if(e._positionMode===j$Z.Contains)for(var t=Object.keys(e._disjointIDs),i=Object.keys(e._intersectsIDs),n=0;n<e._layers.length;n++){var r=e._layers[n],o=_0x44af25(r.id);if(!(i.indexOf(o)<0)){if(t.indexOf(o)<0){r.setSelection(e._intersectsIDs[o]);continue}for(var a=e._intersectsIDs[o],s=e._disjointIDs[o],l=0;l<s.length;l++){var u=a.indexOf(s[l]);u>=0&&a.splice(u,1)}r.setSelection(a)}}}_0xf2286(),Object.defineProperties(_0x16da97.prototype,{geometry:{get:function(){return this._geometry},set:function(e){if(LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),this._geometry&&this._geometry.type===P$U.GEOMODEL3D&&(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[],this._queryCollection=void 0),this._geometry=e,this._depthDirty=!0,this._isInitlized=!1,this._geometry.type===P$U.GEOMODEL3D)e$2e(this._queryCollection)&&(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[]),this._queryCollection=new _0xd633a7(this._scene.context),this._queryCollection._needToRender=!1,this._requestModel(e);else if(e$2e(this._geometry._shape)){var t=new y$R({geometryInstances:new d$1o({attributes:{color:new o$16},geometry:this._geometry}),appearance:new t$Q({translucent:!1})});this._scene.primitives.add(t),this._geometry=t}}},layers:{get:function(){return this._layers},set:function(e){for(var t=0;t<this._layers.length;t++)this._layers[t]._spatialQueryEnable=!1;this._layers=e,this._bufferDirty=!0}},fillColor:{get:function(){return this._fillColor},set:function(e){this._fillColor=e}},outlineColor:{get:function(){return this._outlineColor},set:function(e){this._outlineColor=e}},positionMode:{get:function(){return this._positionMode},set:function(e){this._positionMode=e,this._bufferDirty=!0}},fillStyle:{get:function(){return this._fillStyle},set:function(e){this._fillStyle=e}}}),_0x16da97.prototype.destroy=function(){return LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),_0x2cbe11(this),_0x17bab6(this),_0x993af9(this),e$2e(this._geometry)&&this._geometry.type===P$U.GEOMODEL3D?(this._queryCollection.removeCollection(this._name),this._queryCollection.destroy(),this._allS3MColorCommand=[]):this._beQueryCollection=void 0,this._profile=!1,this._scene._analyst3D.remove(this._name,!0),i$11(this)},_0x16da97.prototype.clear=function(){LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),this._scene._analyst3D.remove(this._name,!1)},_0x16da97.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),""===this._name?(this._name="spatialQuery3D"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this)):e$2e(this._scene._analyst3D.find(this._name))||this._scene._analyst3D.add(this)},_0x16da97.prototype.update=function(e,t,i){if(this._curFrameNumber!==t.frameNumber&&(this._curFrameNumber=t,!t._fboState.enabled&&e$2e(this._geometry)&&(0!==this._clipLayers.length||0!==this._layers.length||e$2e(this._beQueryCollection)))){if(!_0x4c0abe(this._geometry))throw new t$15("the geometry type is not supported.");var n=e.drawingBufferWidth,r=e.drawingBufferHeight;if((this._width!==n||this._height!==r)&&(this._geometry.isGeometryDirty=!0,this._width=n,this._height=r),this._geometry.isGeometryDirty&&(this._isInitlized=!1),this._geometry.type===P$U.GEOMODEL3D){if(this._queryCollection.update(t),this._allS3MColorCommand=this._queryCollection._getAllColorCommand(),0===this._allS3MColorCommand.length)return}else if(this._geometry instanceof y$R){if(this._allS3MColorCommand=this._geometry._colorCommands,0===this._allS3MColorCommand.length)return;this._geometry._state=_0x26a83e.FAILED}else{p$1d.equalsEpsilon(this._worldMatrix,this._geometry.modelMatrix,e$2d.EPSILON8)?0==this._boundingSphere.radius&&(this._boundingSphere=this.geometry._getGeometry().boundingSphere):(p$1d.clone(this._geometry.modelMatrix,this._worldMatrix),i$1d.transform(this.geometry._getGeometry().boundingSphere,this._worldMatrix,this._boundingSphere),this._depthDirty=!0)}this._isInitlized||(_0x58dbe(this,e,t),this._geometry.isGeometryDirty=!1),this._profile||this._updateTextures(e,t),_0x585d32(this,e,t),e$2e(this._colorCommand)&&(this.fillStyle===fr$3.Fill||this.fillStyle===fr$3.Fill_And_WireFrame)&&!this._profile&&i.push(this._colorCommand),e$2e(this._outlineCommand)&&(this.fillStyle===fr$3.WireFrame||this.fillStyle===fr$3.Fill_And_WireFrame)&&i.push(this._outlineCommand)}},_0x16da97.prototype.getQueryIDs=function(){if(LicenseChecker.LICENSECHECKER.verify("SpatialQuery3D"),!this._updateIDs)return this._ids;var e=o$1l.defer();this._ids=[],this._bufferDirty=!0,this._resultBuffer.isUpdate=!0,this._scene.initializeFrame();var t=this;return this._scene._renderForQueryAsync().then((function(){for(var i=new e$1Q;;){for(var n=!1,r=0;r<t._layers.length;r++){var o=(u=t._layers[r]).getSelection();if(!(o.length<=0)){if(i.contains(u.id)){var a;a=o.concat(i.get(u.id).ids),o=a}var s={layerName:u.name,layerIndex:r,ids:o};i.set(u.id,s),n=!0,u.releaseSelection(),u.setObjsVisible(o,!1)}}if(!n){t._bufferDirty=!1,t._resultBuffer.isUpdate=!1;break}}for(var l=0;l<i.values.length;l++){var u;(u=t._layers[i.values[l].layerIndex]).setObjsVisible([],!1);var c={layerName:i.values[l].layerName,ids:i.values[l].ids};t._ids.push(c)}t._updateIDs=!1,e.resolve(t._ids)})),e.promise},_0x16da97.prototype._requestModel=function(){var e=this,t=this._geometry.geoModel;if(e$2e(t)){var i=new Uint8Array(t.model);this._queryCollection.add(this._name,{position:o$1p.fromDegrees(t.position.x,t.position.y,t.position.z),id:this._dataIndex,color:this._fillColor,scale:new o$1p(t.scaleX,t.scaleY,t.scaleZ)},i.buffer)}else if(""!==this._geometry.geoFilePath){var n=this._geometry.geoFilePath,r=n.replace(/\?returnContent=.*$/,"");".json"===(r=r.substring(r.length-5).toLowerCase())?u$P(this._geometry.geoFilePath).then((function(t){if(null!=t.geometry){e._geometry.geoModel=t.geometry;var i=new Uint8Array(t.geometry.model);e._queryCollection.add(e._name,{position:o$1p.fromDegrees(t.geometry.position.x,t.geometry.position.y,t.geometry.position.z),id:e._dataIndex,color:e._fillColor,scale:new o$1p(t.geometry.scaleX,t.geometry.scaleY,t.geometry.scaleZ)},i.buffer)}})):o$10(n).then((function(t){var i=new DataView(t),r=0,o=i.getInt32(r,!0);r+=4;var a=a$K(new Uint8Array(t,r,o)),s=JSON.parse(a).geometry;if(null!=s){r+=o;var l=i.getInt32(r,!0);r+=4;var u,c,h=[];for(u=0;u<l;u++)c=i.getInt32(r,!0),h.push(c),r+=4;var d=[];for(u=0;u<l;u++){if(0===(c=h[u]))d.push(null);else{var f=new Uint8Array(t,r,c);d.push(new Uint8Array(f).buffer)}r+=c}e._queryCollection.add(n,{position:o$1p.fromDegrees(s.position.x,s.position.y,s.position.z),id:e._dataIndex,scale:new o$1p(s.scaleX,s.scaleY,s.scaleZ),hpr:i$16.fromDegrees(-s.rotationZ,s.rotationX,s.rotationY)},d[0],!1)}}))}},_0x16da97.prototype._updateTextures=function(e,t){if(this._curFrameNumber!==t.frameNumber&&(this._curFrameNumber=t,!(!this._depthDirty||e$2e(this._resultBuffer)&&this._resultBuffer.isUpdate||e$2e(this._disjointBuffer)&&this._disjointBuffer.isUpdate)||this._profile)){for(var i=t.camera,n=0;n<this._textures.length;n++)this._clearCommand.framebuffer=this._depthBuffers[n],this._clearCommand.execute(e),this._depthCommands[n].execute(e);e$2e(this._beQueryCollection)&&3===this._textures.length&&this._beQueryCollection._setSQTextures(this._textures),this._clearCommand.framebuffer=void 0,p$1d.clone(i.viewMatrix,this._matDepthView),p$1d.clone(e.uniformState.projection,this._matDepthProject);for(n=0;n<this._layers.length;n++)this._layers[n]._setSQViewPrjMatrix(this._matDepthView,this._matDepthProject);this._depthDirty=!1,this._bufferDirty=!0}};var _0x3fe7d3=(_0x1a9340=!0,function(e,t){var i=_0x1a9340?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a9340=!1,i}),_0x4d0fee=_0x3fe7d3(void 0,(function(){return _0x4d0fee.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d0fee).search("(((.+)+)+)+$")})),_0x1a9340;_0x4d0fee();var _0x48338c="\nattribute vec4 aPosition;\nuniform mat4 uTexWorldViewProjMatrix0;\nuniform mat4 uTexWorldViewProjMatrix1;\nuniform mat4 uTexWorldViewProjMatrix2;\nuniform mat4 uTexWorldViewProjMatrix3;\nuniform mat4 uTexWorldViewProjMatrix4;\n\nuniform float uRadius;\n\nvarying vec4 clip_pos0;\nvarying vec4 clip_pos1;\nvarying vec4 clip_pos2;\nvarying vec4 clip_pos3;\nvarying vec4 clip_pos4;\n\n// vec4 GetUV(const mat4 renderTextureMatrix)\n// {\n// \tvec4 texCoord = renderTextureMatrix * vec4(vexPos.xyz, 1.0);\n// \ttexCoord = texCoord / texCoord.w;\n// \ttexCoord.xyz = texCoord.xyz * 0.5 + 0.5;\n// \treturn texCoord;\n// }\n\nvoid main()\n{\t\n vec3 newPos = vec3(aPosition.xyz);\n\tnewPos = newPos * uRadius;\n\tvec4 vexPos = vec4(newPos.xyz, 1.0);\n\tclip_pos0 = uTexWorldViewProjMatrix0 * vexPos;\n\tclip_pos1 = uTexWorldViewProjMatrix1 * vexPos;\n\tclip_pos2 = uTexWorldViewProjMatrix2 * vexPos;\n\tclip_pos3 = uTexWorldViewProjMatrix3 * vexPos;\n\tclip_pos4 = uTexWorldViewProjMatrix4 * vexPos;\n\n\tgl_Position = czm_modelViewProjection * vexPos;\n\t\n}",_0x4e91f3=(_0x1fbf8a=!0,function(e,t){var i=_0x1fbf8a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fbf8a=!1,i}),_0x38ba39=_0x4e91f3(void 0,(function(){return _0x38ba39.toString().search("(((.+)+)+)+$").toString().constructor(_0x38ba39).search("(((.+)+)+)+$")})),_0x1fbf8a;_0x38ba39();var _0x2232ed="\nuniform sampler2D uDepthMap0;\nuniform sampler2D uDepthMap1;\nuniform sampler2D uDepthMap2;\nuniform sampler2D uDepthMap3;\nuniform sampler2D uDepthMap4;\nuniform int uDomeType;\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\n\n\nvarying vec4 clip_pos0;\nvarying vec4 clip_pos1;\nvarying vec4 clip_pos2;\nvarying vec4 clip_pos3;\nvarying vec4 clip_pos4;\n\nbool IsValidNDC(vec4 ndc)\n{\n\tfloat minNDCZ = -1.0;\n#ifdef WEBGPU\n\tminNDCZ = 0.0;\n#endif\n\tif ((ndc.x<=1.0)&&(ndc.x>=-1.0)&&(ndc.y<=1.0)&&(ndc.y>=-1.0)&&(ndc.z<=1.0)&&(ndc.z>=minNDCZ))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}\n\nbool IsVisible(float depth, vec4 ndc)\n{\n bool isVisible = true;\n\tfloat tolerance = 0.00001;\n\tif(depth < tolerance)\n {\n return isVisible;\n }\n#ifdef WEBGPU\n\tfloat compareNDCZ = depth;\n#else\n\tfloat compareNDCZ = depth * 2.0 - 1.0;\n#endif\n\tif(ndc.z > (compareNDCZ + tolerance))\n {\n isVisible = false;\n }\n\treturn isVisible;\n}\n\nvoid main()\n{\n\tvec4 ndc0 = clip_pos0 / clip_pos0.w;\n\tvec4 ndc1 = clip_pos1 / clip_pos1.w;\n\tvec4 ndc2 = clip_pos2 / clip_pos2.w;\n\tvec4 ndc3 = clip_pos3 / clip_pos3.w;\n\tvec4 ndc4 = clip_pos4 / clip_pos4.w;\n\n\tvec2 texCoord0 = ndc0.xy * 0.5 + 0.5;\n\tvec2 texCoord1 = ndc1.xy * 0.5 + 0.5;\n\tvec2 texCoord2 = ndc2.xy * 0.5 + 0.5;\n\tvec2 texCoord3 = ndc3.xy * 0.5 + 0.5;\n\tvec2 texCoord4 = ndc4.xy * 0.5 + 0.5;\n\n\tfloat depth0 = czm_unpackDepth(texture2D(uDepthMap0, texCoord0.xy));\n\tfloat depth1 = czm_unpackDepth(texture2D(uDepthMap1, texCoord1.xy));\n\tfloat depth2 = czm_unpackDepth(texture2D(uDepthMap2, texCoord2.xy));\n\tfloat depth3 = czm_unpackDepth(texture2D(uDepthMap3, texCoord3.xy));\n\tfloat depth4 = czm_unpackDepth(texture2D(uDepthMap4, texCoord4.xy));\n\t\n\tbool isVisible = true;\n\tif(IsValidNDC(ndc0))\n\t{\n\t\tisVisible = IsVisible(depth0, ndc0);\n\t}\n\telse if(IsValidNDC(ndc1))\n\t{\n\t\tisVisible = IsVisible(depth1, ndc1);\n\t}\n\telse if(IsValidNDC(ndc2))\n\t{\n\t\tisVisible = IsVisible(depth2, ndc2);\n\t}\n\telse if(IsValidNDC(ndc3))\n\t{\n\t\tisVisible = IsVisible(depth3, ndc3);\n\t}\n\telse if(IsValidNDC(ndc4))\n\t{\n\t\tisVisible = IsVisible(depth4, ndc4);\n\t}\n\n\tif(uDomeType == 0)\n\t{\n if (!isVisible)\n {\n discard;\n }\n else\n {\n gl_FragColor = uVisibleAreaColor;\n }\n\t}\n\telse if(uDomeType == 1)\n\t{\n\t\tif (!isVisible)\n\t\t{\n\t\t\tgl_FragColor = uHiddenAreaColor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdiscard;\n\t\t}\n\t}\n\telse\n\t{\n\t if (!isVisible)\n\t\t{\n\t\t\tgl_FragColor = uHiddenAreaColor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgl_FragColor = uVisibleAreaColor;\n\t\t}\n\t}\n}",_0x4ed431=(_0x11e9d9=!0,function(e,t){var i=_0x11e9d9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x11e9d9=!1,i}),_0x210f7d=_0x4ed431(void 0,(function(){return _0x210f7d.toString().search("(((.+)+)+)+$").toString().constructor(_0x210f7d).search("(((.+)+)+)+$")})),_0x11e9d9;_0x210f7d();var _0x26472f={VISIBLEDOME:0,HIDDENDOME:1,ALLDOME:2},_0x19446b=Object.freeze(_0x26472f),_0x2c54d9=(_0x12c52d=!0,function(e,t){var i=_0x12c52d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12c52d=!1,i}),_0x9fb993=_0x2c54d9(void 0,(function(){return _0x9fb993.toString().search("(((.+)+)+)+$").toString().constructor(_0x9fb993).search("(((.+)+)+)+$")})),_0x12c52d;_0x9fb993();var _0x544b20=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function _0x4036ab(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._cameraDepthBuffer=[],this._cameraNames=[],this._renderTextureMatrix=[],this._texWorldViewMatrix=[],this._texPrjMatrix=[],this._dirRadian=[],this._dPitch=[],this._colorCommand=void 0,this._boundingSphere=new i$1d,this._frameState=void 0,this._viewPosition=[0,0,0],this._startAngle=0,this._endAngle=360,this._visibleAreaColor=new e$2c(0,1,0,.5),this._hiddenAreaColor=new e$2c(1,0,0,.5),this._domeType=_0x19446b.ALLDOME,this._quality=0,this._displayMode=0,this._name="",this._checking=!1,this._sceneName="",this._updateCamera=!0,this._isRecreateTexture=!0,this._targetPoints=[],this._worldMatrix=p$1d.IDENTITY.clone(),this._initialize=!1,this._id=0,this._isUpdateCommand=!1,this._textureFinish=!1,this._isClosed=!1}function _0x3cb2e5(e){e$2e(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0)}function _0x3c803c(e){if(e$2e(e._frameState)){for(var t in e._cameraDepthBuffer)e$2e(e._cameraDepthBuffer[t])&&delete e._frameState._framebufferList[t];e._frameState=void 0}for(var t in e._cameraDepthBuffer)e._cameraDepthBuffer[t]=e._cameraDepthBuffer[t]&&e._cameraDepthBuffer[t].destroy()}function _0x48aa18(e,t,i){var n=i.camera,r=n.frustum.aspectRatio,o=n.frustum.fov,a=n.frustum.near,s=n.frustum.far,l=new o$1p,u=n.heading,c=n.pitch,h=e._scene.globe.cullEnabled;o$1p.clone(n.position,l);for(var d=0;d<5;d++){var f=90*e$2d.RADIANS_PER_DEGREE,p=90*e$2d.RADIANS_PER_DEGREE,_=Math.tan(.5*f)/Math.tan(.5*p),m=.001*e._distance,g=Math.max(e._distance,10),x=o$1p.fromDegreesArrayHeights(e._viewPosition)[0],y=e._cameraNames[d];e._cameraDepthBuffer[y].isUpdate=!0;var v=i.useLogDepth;e._cameraDepthBuffer[y]._beginFunc=function(t){e._scene.globe.cullEnabled=!1,t.useLogDepth=!1,e._textureFinish=!1;var i=t._fboState.name,r=e._dirRadian[i]*e$2d.RADIANS_PER_DEGREE,o=e._dPitch[i]*e$2d.RADIANS_PER_DEGREE;n.frustum.aspectRatio=_,n.frustum.fov=f,n.frustum.near=m,n.frustum.far=g+100,n.setView({destination:x,orientation:{heading:r,pitch:o,roll:n.roll}}),p$1d.multiply(n.viewMatrix,e._worldMatrix,e._texWorldViewMatrix[i]),p$1d.multiply(n.frustum.projectionMatrix,e._texWorldViewMatrix[i],e._renderTextureMatrix[i]),p$1d.clone(n.frustum.projectionMatrix,e._texPrjMatrix[i])},e._cameraDepthBuffer[y]._endFunc=function(i){n.setView({destination:l,orientation:{heading:u,pitch:c,roll:n.roll},convert:!1}),e._scene.globe.cullEnabled=h,n.frustum.aspectRatio=r,n.frustum.fov=o,n.frustum.near=a,n.frustum.far=s;var d=i._fboState.name;for(var f in e._cameraDepthBuffer[d]._isUpdate=!1,e._cameraDepthBuffer)if(e._cameraDepthBuffer[f]._isUpdate)return void(i.useLogDepth=v);if(e._textureFinish=!0,e._textureFinish){if(!e$2e(e._colorCommand))return;var p=e._colorCommand.shaderProgram.fragmentShaderSource,_=e._colorCommand.shaderProgram.vertexShaderSource,m={aPosition:0};e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=r$14.fromCache({name:"viewDome",context:t,vertexShaderSource:_,fragmentShaderSource:p,attributeLocations:m})}i.useLogDepth=v}}}function _0x28a0a6(e,t){var i=_0x491f18(e);_0x3ccd00(e),_0x185ef6(e,t),_0x5dd64d(e,t,i.vertexPackage,i.indexPackage)}function _0x491f18(e){return{vertexPackage:_0x2ce469(129,129,1,e._startAngle,e._endAngle,e._isClosed),indexPackage:_0x146371(129,129,e._startAngle,e._endAngle,e._isClosed)}}function _0x2ce469(e,t,i,n,r,o){var a=e,s=t,l=(r-n)*e$2d.RADIANS_PER_DEGREE/s,u=Math.PI/(2*a),c=0,h=0,d=!1;o&&(0!=n||360!=r)&&(d=!0);for(var f=0,p=d?(e+1)*t+1:(e+1)*t,_=S$14.createTypedArray(S$14.FLOAT,3*p),m=0;m<s;m++){h=m*l+n*e$2d.RADIANS_PER_DEGREE;for(var g=0;g<=a;g++){c=g*u;var x=i*Math.sin(c)*Math.cos(h),y=i*Math.sin(c)*Math.sin(h),v=i*Math.cos(c);_[f++]=y,_[f++]=x,_[f++]=v}}return d&&(_[f++]=0,_[f++]=0,_[f++]=0),_}function _0x146371(e,t,i,n,r){for(var o=[],a=0==i&&360==n?t:t-1,s=0;s<e;s++)for(var l=0;l<a;l++){var u=s+l*(e+1),c=u+1,h=l==t-1?s+1:u+e+2;o.push(u),o.push(c),o.push(h),o.push(u),o.push(h),o.push(h-1)}if(r&&(0!=i||360!=n)){var d=(e+1)*t,f=a*(e+1);for(s=0;s<e;s++)o.push(s),o.push(s+1),o.push(d),o.push(s+f+1),o.push(s+f),o.push(d)}for(var p=0,_=S$14.createTypedArray(S$14.UNSIGNED_SHORT,o.length),m=0;m<o.length;m++)_[p++]=o[m];return _}function _0x3ccd00(e){if(e._scene.mode===C$14.SCENE3D){var t=o$1p.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]),i=new i$16(0,0,0);m$19.headingPitchRollToFixedFrame(t,i,t$12.WGS84,m$19.eastNorthUpToFixedFrame,e._worldMatrix)}else if(e._viewPosition[0]>180||e._viewPosition[0]<-180||e._viewPosition[1]>180||e._viewPosition[1]<-180)layer._position=new o$1p(layer.lon,layer.lat,height);else{var n=e._scene._frameState.camera._projection,r=o$1p.fromDegrees(e._viewPosition[0],e._viewPosition[1],e._viewPosition[2]),o=n.ellipsoid.cartesianToCartographic(r);r=n.project(o),p$1d.fromTranslation(r,e._worldMatrix),p$1d.multiply(_0x544b20,e._worldMatrix,e._worldMatrix)}o$1p.clone(o$1p.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,i$1d.transform(e._boundingSphere,e._worldMatrix,e._boundingSphere)}function _0x185ef6(e,t){if(e._isRecreateTexture){var i=e._frameState;_0x3c803c(e),e._frameState=i;for(var n=0;n<5;n++){var r=new s$U(t);r.environmentVisible.isObjectVisible=!0,r.environmentVisible.isGlobalVisible=!0,r._visibleViewport=e._visibleViewport;var o=e._cameraNames[n];e._cameraDepthBuffer[o]=r,e._frameState._framebufferList[o]=e._cameraDepthBuffer[o],e._renderTextureMatrix[o]=new p$1d,e._texWorldViewMatrix[o]=new p$1d,e._texPrjMatrix[o]=new p$1d,e._dirRadian[o]=90*n,e._dPitch[o]=4==n?90:0}e._isRecreateTexture=!1}}function _0x5dd64d(e,t,i,n){var r=t$X.createVertexBuffer({context:t,typedArray:i,usage:A$18.STATIC_DRAW}),o=[],a={aPosition:0};o.push({name:"aPosition",index:a.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var s=t$X.createIndexBuffer({context:t,typedArray:n,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});e._colorCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!1}),e._colorCommand.vertexArray=new c$13({context:t,attributes:o,indexBuffer:s});var l=new s$V({name:"ViewDomeVp",sources:[_0x48338c]}),u=new s$V({name:"ViewDomeFp",sources:[_0x2232ed]});e._colorCommand.shaderProgram=r$14.fromCache({name:"viewDome",context:t,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:a}),e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),e._colorCommand.uniformMap={uVisibleAreaColor:function(){return e._visibleAreaColor},uHiddenAreaColor:function(){return e._hiddenAreaColor},uTexWorldViewProjMatrix0:function(){return e._renderTextureMatrix[e._cameraNames[0]]},uTexWorldViewProjMatrix1:function(){return e._renderTextureMatrix[e._cameraNames[1]]},uTexWorldViewProjMatrix2:function(){return e._renderTextureMatrix[e._cameraNames[2]]},uTexWorldViewProjMatrix3:function(){return e._renderTextureMatrix[e._cameraNames[3]]},uTexWorldViewProjMatrix4:function(){return e._renderTextureMatrix[e._cameraNames[4]]},uTexWorldViewMatrix0:function(){return e._texWorldViewMatrix[e._cameraNames[0]]},uTexWorldViewMatrix1:function(){return e._texWorldViewMatrix[e._cameraNames[1]]},uTexWorldViewMatrix2:function(){return e._texWorldViewMatrix[e._cameraNames[2]]},uTexWorldViewMatrix3:function(){return e._texWorldViewMatrix[e._cameraNames[3]]},uTexWorldViewMatrix4:function(){return e._texWorldViewMatrix[e._cameraNames[4]]},uTexProjMatrix0:function(){return e._texPrjMatrix[e._cameraNames[0]]},uTexProjMatrix1:function(){return e._texPrjMatrix[e._cameraNames[1]]},uTexProjMatrix2:function(){return e._texPrjMatrix[e._cameraNames[2]]},uTexProjMatrix3:function(){return e._texPrjMatrix[e._cameraNames[3]]},uTexProjMatrix4:function(){return e._texPrjMatrix[e._cameraNames[4]]},uDepthMap0:function(){return e._cameraDepthBuffer[e._cameraNames[0]].depthTexture},uDepthMap1:function(){return e._cameraDepthBuffer[e._cameraNames[1]].depthTexture},uDepthMap2:function(){return e._cameraDepthBuffer[e._cameraNames[2]].depthTexture},uDepthMap3:function(){return e._cameraDepthBuffer[e._cameraNames[3]].depthTexture},uDepthMap4:function(){return e._cameraDepthBuffer[e._cameraNames[4]].depthTexture},uRadius:function(){return e._distance},uDomeType:function(){return e._domeType}}}Object.defineProperties(_0x4036ab.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._updateCamera=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$15("the distance is greater than 0.0");this._distance=e,this._updateCamera=!0}},startAngle:{get:function(){return this._startAngle},set:function(e){this._startAngle=e,this._initialize=!1,this._updateCamera=!0}},endAngle:{get:function(){return this._endAngle},set:function(e){this._endAngle=e,this._initialize=!1,this._updateCamera=!0}},visibleAreaColor:{get:function(){var e=new e$1X;return e.red=this._visibleAreaColor.x,e.green=this._visibleAreaColor.y,e.blue=this._visibleAreaColor.z,e.alpha=this._visibleAreaColor.w,e},set:function(e){this._visibleAreaColor.x=e.red,this._visibleAreaColor.y=e.green,this._visibleAreaColor.z=e.blue,this._visibleAreaColor.w=e.alpha}},hiddenAreaColor:{get:function(){var e=new e$1X;return e.red=this._hiddenAreaColor.x,e.green=this._hiddenAreaColor.y,e.blue=this._hiddenAreaColor.z,e.alpha=this._hiddenAreaColor.w,e},set:function(e){this._hiddenAreaColor.x=e.red,this._hiddenAreaColor.y=e.green,this._hiddenAreaColor.z=e.blue,this._hiddenAreaColor.w=e.alpha}},domeType:{get:function(){return this._domeType},set:function(e){this._domeType=e}},isClosed:{get:function(){return this._isClosed},set:function(e){this._isClosed=e,this._initialize=!1,this._updateCamera=!0,this._isRecreateTexture=!0}}}),_0x4036ab.prototype.destroy=function(){return _0x3c803c(this),_0x3cb2e5(this),this._scene.farToNearRatio=1e3,this._scene._analyst3D.remove(this._name,!0),i$11(this)},_0x4036ab.prototype.build=function(){if(LicenseChecker.LICENSECHECKER.verify("ViewDome"),""===this._name&&!this._checking){this._name="ViewDome"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene";for(var e=0;e<5;e++)this._cameraNames.push(this._name+"_camera"+e);this._scene._analyst3D.add(this)}},_0x4036ab.prototype.update=function(e,t,i){"water"===t._fboState.name||t.passes.pick||t._fboState.enabled||(t.camera.bReflect||(this._initialize||(this._frameState=t,_0x28a0a6(this,e),this._initialize=!0,this._textureFinish=!1),this._updateCamera&&(this._frameState=t,this._isRecreateTexture&&(_0x185ef6(this),this._isRecreateTexture=!1),_0x48aa18(this,e,this._frameState),this._update=!1,this._updateCamera=!1),e$2e(this._colorCommand)&&this._textureFinish&&i.push(this._colorCommand)))},_0x4036ab.prototype.clear=function(){this._scene._analyst3D.remove(this._name,!1)};var _0xb433d2=(_0x36ec39=!0,function(e,t){var i=_0x36ec39?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x36ec39=!1,i}),_0x59d0c9=_0xb433d2(void 0,(function(){return _0x59d0c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x59d0c9).search("(((.+)+)+)+$")})),_0x36ec39;_0x59d0c9();var _0x55e263="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\nuniform mat4 uRenderTextureMatrix;\nuniform vec2 uTexture1_size;\nuniform sampler2D uTexture1;\nuniform sampler2D uGlobalDepthTexture;\nuniform vec2 uGlobeTextureSize;\nvarying vec4 vClip_pos;\n\nfloat getDepth(in vec4 depth)\n{\n float z_window = czm_unpackDepth(depth);\n#ifdef WEBGPU\n\treturn z_window;\n#else\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n#endif\n}\n\nfloat getDepthFromShadowMap(in vec2 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(uTexture1, t00));\n\tfloat z10 = getDepth(texture2D(uTexture1, t01));\n\tfloat z01 = getDepth(texture2D(uTexture1, t10));\n\tfloat z11 = getDepth(texture2D(uTexture1, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n\n#ifdef CLIPPOLYGON\nuniform sampler2D uPolygonTexture;\nuniform mat4 uPolygonTextureMatrix;\nuniform float uPolygonMode;\nbool isClipValid(vec2 texcoord)\n{\n bool keepInside = (uPolygonMode > 1.5);\n if(keepInside)\n {\n return texture2D(uPolygonTexture, texcoord).r > 0.5;\n }\n else\n {\n return texture2D(uPolygonTexture, texcoord).r < 0.5;\n }\n}\n#endif\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n// #ifdef LOG_DEPTH\n// depthTexCoord.x = depthTexCoord.x * czm_viewport.z / uGlobeTextureSize.x + czm_viewport.x / uGlobeTextureSize.x;\n// depthTexCoord.y = depthTexCoord.y * czm_viewport.w / uGlobeTextureSize.y + czm_viewport.y / uGlobeTextureSize.y;\n// #endif\n\tfloat sceneDepth = czm_unpackDepth(texture2D(uGlobalDepthTexture, depthTexCoord.xy));\n// #ifdef LOG_DEPTH\n// sceneDepth = czm_reverseLogDepth(sceneDepth);\n// #endif\n\n#ifndef WEBGPU\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n#endif\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\t//vec4 viewPos = czm_inverseProjection * pos;\n\tvec4 renderTextureCoord = uRenderTextureMatrix * pos;\n\tvec4 ndcInDepthScene = renderTextureCoord / renderTextureCoord.w;\n\tvec2 texCoord = ndcInDepthScene.xy * 0.5 + 0.5;\n\tfloat depth = getDepthFromShadowMap(texCoord);\n\n\tfloat dxc = abs(dFdx(ndcInDepthScene.z));\n\tfloat dyc = abs(dFdy(ndcInDepthScene.z));\n\tfloat dF = max(dxc, dyc) * 3.0;\n\tfloat bias = 1.0e-6 + dF;\n#ifdef WEBGPU\n\tbias *= 2.0;\n#endif\n\tfloat c = float(depth + bias < ndcInDepthScene.z);\n\tvec4 resultColor = mix(uVisibleAreaColor, uHiddenAreaColor, vec4(c));\n\tif(resultColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n#ifdef CLIPPOLYGON\n vec4 polygonTextureCoord = uPolygonTextureMatrix * pos;\n\tvec4 texCoordPolygon = polygonTextureCoord / polygonTextureCoord.w;\n\ttexCoordPolygon.xyz = texCoordPolygon.xyz * 0.5 + 0.5;\n\tif(texCoordPolygon.x < 0.0 || texCoordPolygon.x > 1.0 || texCoordPolygon.y < 0.0 || texCoordPolygon.y > 1.0)\n\t{\n\t\tdiscard;\n }\n\tif(!isClipValid(texCoordPolygon.xy))\n {\n discard;\n }\n#endif\n\tgl_FragColor = resultColor;\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x1706dc=(_0x206e7f=!0,function(e,t){var i=_0x206e7f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x206e7f=!1,i}),_0x9d7acb=_0x1706dc(void 0,(function(){return _0x9d7acb.toString().search("(((.+)+)+)+$").toString().constructor(_0x9d7acb).search("(((.+)+)+)+$")})),_0x206e7f;_0x9d7acb();var _0x20cd45="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 uVisibleAreaColor;\nuniform vec4 uHiddenAreaColor;\nuniform vec2 uTexture1_size;\n#if TEXTURE_UNITS > 0\nuniform sampler2D uTextures[TEXTURE_UNITS];\nuniform mat4 uRenderTextureMatrixs[TEXTURE_UNITS];\n#endif\nuniform sampler2D uGlobalDepthTexture;\nuniform vec2 uGlobeTextureSize;\nuniform int textureCount;\nvarying vec4 vClip_pos;\n\nfloat getDepth(in vec4 depth)\n{\n float z_window = czm_unpackDepth(depth);\n#ifdef WEBGPU\n\treturn z_window;\n#else\n\tfloat n_range = czm_depthRange.near;\n\tfloat f_range = czm_depthRange.far;\n\treturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n#endif\n}\n\n#define inline\nfloat getDepthFromShadowMap(in sampler2D viewShedTexture, in vec4 texCoord)\n{\n\tvec2 tCoord;\n tCoord = texCoord.xy * uTexture1_size - 0.5;\n\tfloat x0 = floor(tCoord.x);\n\tfloat x1 = ceil(tCoord.x);\n\tfloat y0 = floor(tCoord.y);\n\tfloat y1 = ceil(tCoord.y);\n\tvec2 invTexSize = 1.0 / uTexture1_size;\n\tvec2 t00 = vec2((x0 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t10 = vec2((x1 + 0.5) * invTexSize.x, (y0 + 0.5) * invTexSize.y);\n\tvec2 t01 = vec2((x0 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tvec2 t11 = vec2((x1 + 0.5) * invTexSize.x, (y1 + 0.5) * invTexSize.y);\n\tfloat z00 = getDepth(texture2D(viewShedTexture, t00));\n\tfloat z10 = getDepth(texture2D(viewShedTexture, t01));\n\tfloat z01 = getDepth(texture2D(viewShedTexture, t10));\n\tfloat z11 = getDepth(texture2D(viewShedTexture, t11));\n\tfloat depth = max(max(z00, z01), max(z10, z11));\n\treturn depth;\n}\n\n#define inline\nfloat isVisibleForOneViewShed(in sampler2D viewShedTexture, in vec4 viewPos, in mat4 renderTextureMatrix1)\n{\n vec4 renderTextureCoord = renderTextureMatrix1 * viewPos;\n\tvec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n\ttexCoord.xyz = texCoord.xyz * 0.5 + 0.5;\n\n if (texCoord.x<0.0 || texCoord.x>1.0\n || texCoord.y<0.0 || texCoord.y>1.0)\n {\n return 1.0;\n }\n\n float depth = getDepthFromShadowMap(viewShedTexture, texCoord);\n depth = depth * 0.5 + 0.5;\n float dxc = abs(dFdx(texCoord.z));\n float dyc = abs(dFdy(texCoord.z));\n float dF = max(dxc, dyc) * 3.0;\n float bias = 1.0e-6 + dF;\n#ifdef WEBGPU\n\tbias *= 2.0;\n#endif\n float c = float(depth+bias < texCoord.z);\n return c;\n}\n\nvoid main()\n{\n czm_writeDepthClampedToFarPlane();\n\tvec4 depthTexCoord = vClip_pos / vClip_pos.w;\n\tdepthTexCoord.xy = depthTexCoord.xy * 0.5 + 0.5;\n\tdepthTexCoord.x = depthTexCoord.x * czm_viewport.z / uGlobeTextureSize.x + czm_viewport.x / uGlobeTextureSize.x;\n\tdepthTexCoord.y = depthTexCoord.y * czm_viewport.w / uGlobeTextureSize.y + czm_viewport.y / uGlobeTextureSize.y;\n\tfloat sceneDepth = czm_unpackDepth(texture2D(uGlobalDepthTexture, depthTexCoord.xy));\n // sceneDepth = czm_reverseLogDepth(sceneDepth);\n#ifndef WEBGPU\n\tsceneDepth = sceneDepth * 2.0 - 1.0;\n#endif\n\tvec4 pos = vClip_pos;\n\tpos.z = sceneDepth * pos.w;\n\t//vec4 viewPos = czm_inverseProjection * pos;\n float c = isVisibleForMultiViewShed(pos);\n\tvec4 resultColor = mix(uVisibleAreaColor, uHiddenAreaColor, vec4(c));\n\tif(resultColor.a < 0.1)\n\t{\n\t\tdiscard;\n\t}\n\tgl_FragColor = resultColor;\n\tgl_FragColor = czm_gammaCorrect(gl_FragColor);\n}",_0x12330c=(_0xa95ec=!0,function(e,t){var i=_0xa95ec?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa95ec=!1,i}),_0x2f6c7e=_0x12330c(void 0,(function(){return _0x2f6c7e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f6c7e).search("(((.+)+)+)+$")})),_0xa95ec;function _0x13f223(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._globalDepthBuffer=void 0,this._cameraDepthBuffer=void 0,this._clearStencilCommand=new t$W({stencil:0}),this._clearStencilCommand.pass=Le$q.ANALYSIS,this._lineCommand=void 0,this._stencilCommand=void 0,this._colorCommand=void 0,this._boundingSphere=new i$1d,this._frameState=void 0,this._viewPosition=[0,0,0],this._direction=0,this._pitch=0,this._horizontalFov=90,this._verticalFov=60,this._distance=200,this._visibleAreaColor=new e$2c(0,1,0,.5),this._hiddenAreaColor=new e$2c(1,0,0,.5),this._hintLineColor=new e$2c(1,1,1,1),this._segmentCount=20,this._invertViewMatrix=new p$1d,this._viewProjMatrix=new p$1d,this._matProj=new p$1d,this._renderTextureMatrix=new p$1d,this._update=!0,this._id=0,this._name="",this._sceneName="",this._cameraName="",this._checking=!1,this._visibleViewport=4095,this._targetPoints=[],this._multiNames=[],this._isUpdateCommand=!1,this._isShowLine=!0,this._polygonTexture=void 0,this._polygonRegions=new e$1Q,this._polygonTextureMatrix=new p$1d,this._polygonViewProjMatrix=new p$1d,this._polygonUpdate=!1,this._polygonMode=R$L.KeepInside,this._attributeLocations={aPosition:0}}function _0x3f2e42(e){e$2e(e._stencilCommand)&&(e._stencilCommand.vertexArray=e._stencilCommand.vertexArray&&e._stencilCommand.vertexArray.destroy(),e._stencilCommand.shaderProgram=e._stencilCommand.shaderProgram&&e._stencilCommand.shaderProgram.destroy(),e._stencilCommand=void 0),e$2e(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),e$2e(e._lineCommand)&&(e._lineCommand.vertexArray=e._lineCommand.vertexArray&&e._lineCommand.vertexArray.destroy(),e._lineCommand.shaderProgram=e._lineCommand.shaderProgram&&e._lineCommand.shaderProgram.destroy(),e._lineCommand=void 0)}function _0x16656e(e,t,i){var n=e._horizontalFov*e$2d.RADIANS_PER_DEGREE,r=e._verticalFov*e$2d.RADIANS_PER_DEGREE,o=Math.tan(.5*n)/Math.tan(.5*r);e._distance;var a=Math.max(e._distance,10),s=e._direction*e$2d.RADIANS_PER_DEGREE,l=e._pitch*e$2d.RADIANS_PER_DEGREE,u=o$1p.fromDegreesArrayHeights(e._viewPosition)[0],c=i.camera,h=c.frustum.aspectRatio,d=c.frustum.fov,f=c.frustum.near,p=c.frustum.far,_=new o$1p,m=c.heading,g=c.pitch,x=p$1d.clone(c.transform,x);o$1p.clone(c.position,_),e._cameraDepthBuffer.isUpdate=!0;var y=i.useLogDepth,v=e._scene.globe.depthTestAgainstTerrain;e._cameraDepthBuffer._beginFunc=function(t){t.useLogDepth=!1,e._scene.globe.depthTestAgainstTerrain=!0,h=c.frustum.aspectRatio,d=c.frustum.fov,f=c.frustum.near,p=c.frustum.far,m=c.heading,g=c.pitch,x=p$1d.clone(c.transform,x),c._setTransform(p$1d.IDENTITY),o$1p.clone(c.position,_),c.frustum.aspectRatio=o,c.frustum.fov=n,c.frustum.near=1,c.frustum.far=a+100,c.setView({destination:u,orientation:{heading:s,pitch:l,roll:c.roll}}),p$1d.multiply(c.frustum.projectionMatrix,c.viewMatrix,e._viewProjMatrix),p$1d.clone(c.inverseViewMatrix,e._invertViewMatrix),p$1d.clone(c.frustum.projectionMatrix,e._matProj),o$1p.clone(o$1p.ZERO,e._boundingSphere.center),e._boundingSphere.radius=e._distance,i$1d.transform(e._boundingSphere,e._invertViewMatrix,e._boundingSphere)},e._cameraDepthBuffer._endFunc=function(t){c.setView({destination:_,orientation:{heading:m,pitch:g,roll:c.roll},convert:!1}),c.frustum.aspectRatio=h,c.frustum.fov=d,c.frustum.near=f,c.frustum.far=p,c._setTransform(x),e._cameraDepthBuffer.isUpdate=!1,t.useLogDepth=y,e._scene.globe.depthTestAgainstTerrain=v},e$2e(e._globalDepthBuffer)&&(e._globalDepthBuffer.isUpdate=!0,e._globalDepthBuffer._beginFunc=function(t){e._scene.globe.depthTestAgainstTerrain=!0,t.useLogDepth=!1;var i=o$1p.distance(c.positionWC,e._boundingSphere.center),n=i<e._boundingSphere.radius?2:i-e._boundingSphere.radius,r=i+e._boundingSphere.radius;c.frustum.near=n,c.frustum.far=r,e._globalDepthProjMatrix=c.frustum.projectionMatrix,e._globalDepthProjMatrixInv=p$1d.inverse(e._globalDepthProjMatrix,new p$1d);var o=p$1d.multiply(c.inverseViewMatrix,e._globalDepthProjMatrixInv,new p$1d);p$1d.multiply(e._viewProjMatrix,o,e._renderTextureMatrix),e$2e(e._polygonViewProjMatrix)&&p$1d.multiply(e._polygonViewProjMatrix,o,e._polygonTextureMatrix)},e._globalDepthBuffer._endFunc=function(t){t.useLogDepth=y,c.frustum.near=f,c.frustum.far=p,e._scene.globe.depthTestAgainstTerrain=v})}function _0x275715(e,t,i){var n=(e._segmentCount+1)*(e._segmentCount+1)+1,r=S$14.createTypedArray(S$14.FLOAT,3*n),o=3,a=e._horizontalFov*e$2d.RADIANS_PER_DEGREE,s=e._verticalFov*e$2d.RADIANS_PER_DEGREE,l=(Math.tan(.5*a),Math.tan(.5*s));e._distance;var u=e._distance*l,c=Math.PI-.5*a,h=0,d=0,f=a/e._segmentCount;e._targetPoints.length=0;for(var p=0;p<e._segmentCount+1;p++){h=c+p*f;for(var _=u/(e._distance/Math.cos(h)),m=Math.atan(_),g=-m,x=2*m/e._segmentCount,y=new t$L,v=0;v<e._segmentCount+1;v++){d=g+v*x;var $=e._distance*Math.cos(d)*Math.sin(h),b=e._distance*Math.sin(d),T=e._distance*Math.cos(d)*Math.cos(h);r[o++]=$,r[o++]=b,r[o++]=T,y.add(new s$N($,b,T))}e._targetPoints.push(y)}e._targetPoints.reverse();var C=2*(4+5*e._segmentCount+2*e._segmentCount*3),S=e._segmentCount*e._segmentCount*3*2+3*e._segmentCount*4,w=S$14.createTypedArray(S$14.UNSIGNED_SHORT,C),E=S$14.createTypedArray(S$14.UNSIGNED_SHORT,S),P=0;for(p=0;p<e._segmentCount;p++)for(v=0;v<e._segmentCount;v++)E[P++]=1+p+v*(e._segmentCount+1),E[P++]=1+p+1+v*(e._segmentCount+1),E[P++]=1+p+(v+1)*(e._segmentCount+1),E[P++]=1+p+1+v*(e._segmentCount+1),E[P++]=1+p+1+(v+1)*(e._segmentCount+1),E[P++]=1+p+(v+1)*(e._segmentCount+1);for(p=0;p<e._segmentCount;p++)E[P++]=p+1+1,E[P++]=p+1,E[P++]=0,E[P++]=0,E[P++]=p+e._segmentCount*(e._segmentCount+1)+1,E[P++]=p+1+e._segmentCount*(e._segmentCount+1)+1;for(p=0;p<e._segmentCount;p++)E[P++]=0,E[P++]=p*(e._segmentCount+1)+1,E[P++]=(p+1)*(e._segmentCount+1)+1,E[P++]=e._segmentCount+(p+1)*(e._segmentCount+1)+1,E[P++]=e._segmentCount+p*(e._segmentCount+1)+1,E[P++]=0;P=0,w[P++]=0,w[P++]=1,w[P++]=0,w[P++]=e._segmentCount+1,w[P++]=0,w[P++]=e._segmentCount*(e._segmentCount+1)+1,w[P++]=0,w[P++]=(e._segmentCount+1)*(e._segmentCount+1);for(p=0;p<5;p++)for(v=0;v<e._segmentCount;v++)w[P++]=1+v+5*(e._segmentCount+1)*p,w[P++]=1+(v+1)+5*(e._segmentCount+1)*p;for(p=0;p<5;p++)for(v=0;v<e._segmentCount;v++)w[P++]=1+(e._segmentCount+1)*v+5*p,w[P++]=1+(e._segmentCount+1)*(v+1)+5*p;var A=t$X.createVertexBuffer({context:t,typedArray:r,usage:A$18.STATIC_DRAW}),L=[],M=e._attributeLocations;L.push({name:"aPosition",index:M.aPosition,vertexBuffer:A,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var R=t$X.createIndexBuffer({context:t,typedArray:w,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),O=t$X.createIndexBuffer({context:t,typedArray:E,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});e._lineCommand=new i$$({primitiveType:W$18.LINES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!0}),e._lineCommand.vertexArray=new c$13({context:t,attributes:L,indexBuffer:R}),e._lineCommand.shaderProgram=r$14.fromCache({name:"viewshed_lineCommand_SP",context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:M}),e._lineCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var D=[];for(p=0;p<6;p++)D[p]=new e$2c(0,0,0,0);e._lineCommand.uniformMap={uDiffuseColor:function(){return e._hintLineColor},clip_mode:function(){return 0},clip_planes:function(){return D},clip_line_color:function(){return e$2c.UNIT_W}},e._stencilCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!0}),e._stencilCommand.vertexArray=new c$13({context:t,attributes:L,indexBuffer:O}),e._stencilCommand.shaderProgram=r$14.fromCache({name:"viewshed_stencilCommand_SP",context:t,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:M}),e._stencilCommand.renderState=d$1m.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0,func:re$G.GREATER},stencilTest:{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.INCREMENT_WRAP},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:65535}}),e._stencilCommand.uniformMap={uDiffuseColor:function(){return e$2c.UNIT_W},clip_mode:function(){return 0},clip_planes:function(){return D},clip_line_color:function(){return e$2c.UNIT_W}},e._colorCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!0}),e._colorCommand.vertexArray=new c$13({context:t,attributes:L,indexBuffer:O});var I=void 0,B=new s$V({name:"ViewShedAnalysisVp",sources:[_0x56b405]});if(e._multiNames.length>1){let t=_0x20cd45.indexOf("void main");var F="#define inline\n float isVisibleForMultiViewShed(vec4 viewPos) {\n float c = 1.0;\n #if TEXTURE_UNITS > 0\n";for(let t=0;t<e._multiNames.length;t++)F+=" c = isVisibleForOneViewShed(uTextures["+t+"], \n viewPos, uRenderTextureMatrixs["+t+"]);\n if(c == 0.0 || textureCount == 1)\n {\n return c;\n }\n";F+=" #endif\n return c;\n }",I=new s$V({sources:[_0x20cd45.slice(0,t)+F+_0x20cd45.slice(t)]})}else I=new s$V({sources:[_0x55e263]});e._colorCommand.shaderProgram=r$14.fromCache({name:"viewshed_colorCommand_SP",context:t,vertexShaderSource:B,fragmentShaderSource:I,attributeLocations:M}),e._colorCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.NOT_EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:65535},blending:Ee$r.ALPHA_BLEND}),e._multiNames.length<=1?(e._colorCommand.uniformMap={uVisibleAreaColor:function(){return e._visibleAreaColor},uHiddenAreaColor:function(){return e._hiddenAreaColor},uRenderTextureMatrix:function(){return e._renderTextureMatrix},uTexture1_size:function(){var t=e._cameraDepthBuffer.depthTexture;return new o$1o(t.width,t.height)},uTexture1:function(){return e._cameraDepthBuffer.depthTexture},uGlobalDepthTexture:function(){return e._globalDepthBuffer.depthTexture},uGlobeTextureSize:function(){return new o$1o(e._globalDepthBuffer.depthTexture.width,e._globalDepthBuffer.depthTexture.height)},uPolygonTexture:function(){return e._polygonTexture},uPolygonMode:function(){return e._polygonMode},uPolygonTextureMatrix:function(){return e._polygonTextureMatrix}},e._colorCommand._isViewShed=!0):(I.defines.push("TEXTURE_UNITS "+e._multiNames.length),e._isUpdateCommand=!0)}function _0x4a06d9(e,t,i,n){if(e$2e(i)&&!e$2e(i._command)){var r=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._invertViewMatrix});i._command=r;var o={position:0};r.vertexArray=c$13.fromGeometry({context:t,geometry:i._geometry,attributeLocations:o,bufferUsage:A$18.STATIC_DRAW,interleave:!0});var a=new s$V({sources:["attribute vec4 position;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(position.xyz, 1.0);\n}\n"]}),s=new s$V({sources:["void main()\n{\n gl_FragColor = vec4(1.0);\n}\n"]});r.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:o}),r.framebuffer=new t$V({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=d$1m.fromCache({cull:{enabled:!1}})}}function _0x2ab250(e,t,i){if(e._polygonUpdate&&0!==e._polygonRegions.length){e._polygonUpdate=!1;var n=new t$W({color:new e$1X(0,0,0,0),depth:1});n.framebuffer=new t$V({context:t,colorTextures:[e._polygonTexture],destroyAttachments:!1}),n.renderState=d$1m.fromCache(),n.execute(t);for(var r=0;r<e._polygonRegions.values.length;r++){var o=e._polygonRegions.values[r];_0x4a06d9(e,t,o,e._polygonTexture),o._command.execute(t)}n.framebuffer.destroy()}}_0x2f6c7e(),Object.defineProperties(_0x13f223.prototype,{viewPosition:{get:function(){return this._viewPosition},set:function(e){this._viewPosition=e,this._update=!0}},direction:{get:function(){return this._direction},set:function(e){this._direction=e,this._update=!0}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e,this._update=!0}},horizontalFov:{get:function(){return this._horizontalFov},set:function(e){this._horizontalFov=e,this._update=!0}},verticalFov:{get:function(){return this._verticalFov},set:function(e){this._verticalFov=e,this._update=!0}},distance:{get:function(){return this._distance},set:function(e){if(e<=0)throw new t$15("the distance is greater than 0.0");this._distance=e,this._update=!0}},visibleAreaColor:{get:function(){var e=new e$1X;return e.red=this._visibleAreaColor.x,e.green=this._visibleAreaColor.y,e.blue=this._visibleAreaColor.z,e.alpha=this._visibleAreaColor.w,e},set:function(e){this._visibleAreaColor.x=e.red,this._visibleAreaColor.y=e.green,this._visibleAreaColor.z=e.blue,this._visibleAreaColor.w=e.alpha}},hiddenAreaColor:{get:function(){var e=new e$1X;return e.red=this._hiddenAreaColor.x,e.green=this._hiddenAreaColor.y,e.blue=this._hiddenAreaColor.z,e.alpha=this._hiddenAreaColor.w,e},set:function(e){this._hiddenAreaColor.x=e.red,this._hiddenAreaColor.y=e.green,this._hiddenAreaColor.z=e.blue,this._hiddenAreaColor.w=e.alpha}},hintLineColor:{get:function(){var e=new e$1X;return e.red=this._hintLineColor.x,e.green=this._hintLineColor.y,e.blue=this._hintLineColor.z,e.alpha=this._hintLineColor.w,e},set:function(e){this._hintLineColor.x=e.red,this._hintLineColor.y=e.green,this._hintLineColor.z=e.blue,this._hintLineColor.w=e.alpha}},isShowLine:{get:function(){return this._isShowLine},set:function(e){this._isShowLine=e}}}),_0x13f223.prototype.destroy=function(){return e$2e(this._frameState)&&(e$2e(this._globalDepthBuffer)&&delete this._frameState._framebufferList[this._sceneName],e$2e(this._cameraDepthBuffer)&&delete this._frameState._framebufferList[this._cameraName],this._frameState=void 0),this._globalDepthBuffer=this._globalDepthBuffer&&this._globalDepthBuffer.destroy(),this._cameraDepthBuffer=this._cameraDepthBuffer&&this._cameraDepthBuffer.destroy(),_0x3f2e42(this),this._clearStencilCommand=void 0,this._scene.farToNearRatio=1e3,this._scene._analyst3D.remove(this._name,!0),e$2e(this._polygonTexture)&&(this._polygonTexture.destroy(),this._polygonTexture=null),i$11(this)},_0x13f223.prototype.clear=function(){this._scene._analyst3D.remove(this._name,!1)},_0x13f223.prototype.build=function(){LicenseChecker.LICENSECHECKER.verify("ViewShed3D"),""===this._name&&!this._checking&&(this._name="viewshed3d"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_global",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},_0x13f223.prototype.setDistDirByPoint=function(e){if(e[0]===this._viewPosition[0]&&e[1]===this._viewPosition[1]&&e[2]===this._viewPosition[2])throw new t$15("the position is [longitude, latitude ,height] and is not equals viewPosition");var t,i,n=this._scene._frameState.camera,r=n._projection;if(this._scene.mode===C$14.SCENE3D)t=o$1p.fromDegreesArrayHeights(e)[0],i=o$1p.fromDegreesArrayHeights(this._viewPosition)[0];else{var o=a$18.fromDegrees(e[0],e[1],e[2]);t=r.project(o,new o$1p);var a=a$18.fromDegrees(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]);i=r.project(a,new o$1p)}var s=new o$1p;o$1p.subtract(t,i,s);var l=o$1p.magnitude(s);o$1p.normalize(s,s),this.distance=l;var u=n.heading,c=n.pitch,h=n.roll,d=new o$1p;o$1p.clone(n.position,d);var f=s.clone(),p=i.clone();p=o$1p.normalize(p,p),Math.abs(o$1p.dot(p,f))>=1&&(p=Math.abs(o$1p.dot(f,o$1p.UNIT_Y))<1?o$1p.clone(o$1p.UNIT_Y,p):o$1p.clone(o$1p.UNIT_Z,p));var _=new o$1p;o$1p.cross(p,f,_),_=o$1p.normalize(_,_),o$1p.cross(f,_,p),p=o$1p.normalize(p,p),n.setView({destination:i,orientation:{direction:f,up:p},convert:!1}),this.direction=n.heading*e$2d.DEGREES_PER_RADIAN,this.pitch=n.pitch*e$2d.DEGREES_PER_RADIAN,n.setView({destination:d,orientation:{heading:u,pitch:c,roll:h},convert:!1})},_0x13f223.prototype.update=function(e,t,i){if("normal"===t._fboState.name&&!t.passes.pick){if(t._fboState.enabled&&(t._fboState.name===this._sceneName||t._fboState.name===this._cameraName))return void(t._fboState.name===this._sceneName&&e$2e(this._stencilCommand)&&i.push(this._stencilCommand));if(!t.camera.bReflect&&(this._update&&(this._frameState=t,e$2e(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new s$U(e),this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),e$2e(this._globalDepthBuffer)||(this._globalDepthBuffer=new s$U(e),this._globalDepthBuffer.environmentVisible.isObjectVisible=!0,this._globalDepthBuffer.environmentVisible.isGlobalVisible=!0,this._globalDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._sceneName]=this._globalDepthBuffer),this._update=!1,_0x3f2e42(this),_0x16656e(this,e,t),_0x275715(this,e)),e$2e(this._cameraDepthBuffer.framebuffer))){var n=i.pop();!e$2e(n)||(e$2e(this._clearStencilCommand)&&i.push(this._clearStencilCommand),e$2e(this._stencilCommand)&&i.push(this._stencilCommand),e$2e(this._colorCommand)&&i.push(this._colorCommand),e$2e(this._lineCommand)&&this._isShowLine&&i.push(this._lineCommand),i.push(n))}}},_0x13f223.prototype.setVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=1<<e,e$2e(this._cameraDepthBuffer)&&(this._cameraDepthBuffer._visibleViewport=this._visibleViewport)},_0x13f223.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0x13f223.prototype.getViewshedParameter=function(){for(var e=[],t=this._invertViewMatrix,i=0,n=this._targetPoints.length;i<n;i++){for(var r=this._targetPoints[i].pntArray,o=new t$L,a=0,s=r.length;a<s;a++){var l=this.getBarrierPoint(r[a]);if(e$2e(l))o.add(l);else{var u=p$1d.multiplyByPoint(t,r[a],new o$1p),c=a$18.fromCartesian(u),h=c.longitude*e$2d.DEGREES_PER_RADIAN,d=c.latitude*e$2d.DEGREES_PER_RADIAN;o.add(new s$N(h,d,c.height))}}e.push(o)}return{viewPosition:new s$N(this._viewPosition[0],this._viewPosition[1],this._viewPosition[2]),point3DList:e,distance:this._distance}};var _0x4ffd48=new e$2c(1/255,1/65025,1/160581375,1/4228250625);function _0x585beb(e,t){for(var i=o$1p.fromDegreesArrayHeights(t),n=new U$18({polygonHierarchy:{positions:i},vertexFormat:{bitangent:!1,color:!1,normal:!1,position:!0,st:!1,tangent:!1},perPositionHeight:!0}),r=U$18.createGeometry(n),o=o$1p.fromDegreesArrayHeights(t),a=h$18.fromCartesianArray(o),s=[],l=1;l<i.length-1;l++)s.push(0),s.push(l),s.push(l+1);r.indices=s;var u=new p$1d;p$1d.inverse(e._invertViewMatrix,u),f$Z.updateGeometry(r,t,u);var c=new f$Z;return c._geometry=r,c._rectangle=a,c}function _0x27adc5(e,t){if(e$2e(e._colorCommand)){var i=e._scene._context,n=e._colorCommand.shaderProgram.fragmentShaderSource,r=e._colorCommand.shaderProgram.vertexShaderSource,o=n.defines.indexOf("CLIPPOLYGON");t?o<0&&n.defines.push("CLIPPOLYGON"):o>=0&&n.defines.splice(o,1),e._colorCommand.shaderProgram.destroy(),e._colorCommand.shaderProgram=r$14.fromCache({context:i,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:e._attributeLocations})}}function m$M(e){if(e=u$Z(e,{}),this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._rectangle=u$Z(e.rectangle,h$18.MAX_VALUE),this._projection=new n$1d(this._ellipsoid),this._numberOfLevelZeroTilesX=u$Z(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=u$Z(e.numberOfLevelZeroTilesY,1),e.hasOwnProperty("tileInfo")&&(this._tileInfo=e.tileInfo),this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._beginLevel=0,this._suggest=void 0,e$2e(e.resolutions)){this._resolutions=e.resolutions;for(var t=0,i=6378137*Math.PI/this._tileWidth;i>this._resolutions[0];)i*=.5,t++;this._beginLevel=t-1,this._dataBounds=e.dataBounds,this._tileBounds=[];for(var n=this._dataBounds.east-this._tileInfo.origin.x,r=this._tileInfo.origin.y-this._dataBounds.south,o=this._dataBounds.west-this._tileInfo.origin.x,a=this._tileInfo.origin.y-this._dataBounds.north,s=0;s<this._resolutions.length;s++){var l=this._resolutions[s]*this._tileInfo.cols,u=this._resolutions[s]*this._tileInfo.rows,c=Math.floor(o/l),h=Math.floor(a/u),d=Math.floor(n/l),f=Math.floor(r/u);this._tileBounds.push(new h$18(c,f,d,h))}}}function n$C(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}_0x13f223.prototype.getBarrierPoint=function(e){var t=new e$2c(e.x,e.y,e.z,1);if(p$1d.multiplyByVector(this._matProj,t,t),e$2c.divideByScalar(t,t.w,t),!(t.x>1||t.x<-1||t.y>1||t.y<-1)){var i=this._scene.context,n=i.drawingBufferWidth,r=i.drawingBufferHeight,o=(.5*t.x+.5)*n-.5,a=(.5*t.y+.5)*r-.5;if(!(o<0||a<0)){for(var s=Math.floor(o),l=o-s,u=Math.floor(a),c=a-u,h=i.readPixels({framebuffer:this._cameraDepthBuffer.framebuffer,x:s,y:u,width:2,height:2}),d=new e$2c,f=[],p=0;p<4;p++){var _=e$2c.unpack(h,4*p,d);if(f[p]=2*e$2c.dot(_,_0x4ffd48)-1,!(f[p]<1&&f[p]>0))return}var m=(1-c)*((1-l)*f[0]+l*f[1])+c*((1-l)*f[2]+l*f[3]);if(t.z-m>1e-6){var g=new p$1d;p$1d.inverse(this._viewProjMatrix,g),t.z=m,p$1d.multiplyByVector(g,t,t),e$2c.divideByScalar(t,t.w,t);var x=a$18.fromCartesian(t);return new s$N(x.longitude*e$2d.DEGREES_PER_RADIAN,x.latitude*e$2d.DEGREES_PER_RADIAN,x.height)}}}},_0x13f223.prototype._setMultiViewShedNames=function(e){if(this._multiNames.length!=e.length)return this._update=!0,void(this._multiNames=e);for(var t=0;t<this._multiNames.length;t++)if(this._multiNames[t]!=e[t])return this._update=!0,void(this._multiNames=e)},_0x13f223.prototype.addClipRegion=function(e){var t=e.name,i=e.position;if(!e$2e(t)||!e$2e(i))return!1;if(e$2e(this._polygonRegions.get(t)))return!1;var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;e$2e(this._polygonTexture)||(this._polygonTexture=new t$U({context:this._scene._context,width:n,height:r}));var o=_0x585beb(this,i);this._polygonRegions.set(t,o),this._polygonUpdate=!0;var a=this._frameState.camera,s=o._rectangle,l=new o$1p,u=a.heading,c=a.pitch,h=a._positionCartographic.height;o$1p.clone(a.position,l),a.setView({destination:o$1p.fromRadians(s.west+.5*s.width,s.south+.5*s.height,h+1e3)}),p$1d.multiply(a.frustum.projectionMatrix,a.viewMatrix,this._polygonViewProjMatrix),this._scene._context.uniformState.update(this._frameState),_0x2ab250(this,this._scene._context,this._frameState),_0x27adc5(this,!0),a.setView({destination:l,orientation:{heading:u,pitch:c,roll:a.roll}})},_0x13f223.prototype.removeClipRegion=function(e){return!!this._polygonRegions.remove(e)&&(this._polygonUpdate=!0,0===this._polygonRegions.values.length&&_0x27adc5(this,!1),!0)},_0x13f223.prototype.removeAllClipRegion=function(){for(var e=0;e<this._polygonRegions.values.length;e++)this._polygonRegions.values[e].destroy(),this._polygonRegions.values[e]=null;this._polygonRegions.removeAll(),this._polygonUpdate=!0,_0x27adc5(this,!1)},_0x13f223.prototype.setClipMode=function(e){this._polygonMode=e},Object.defineProperties(m$M.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),m$M.prototype.getNumberOfXTilesAtLevel=function(e){if(e$2e(this._resolutions)){if(e<this._beginLevel)return this._numberOfLevelZeroTilesX<<e;var t=this._dataBounds.east-this._tileInfo.origin.x,i=e$2d.clamp(e-this._beginLevel,0,this._resolutions.length-1),n=this._resolutions[i]*this._tileInfo.cols;return Math.ceil(t/n)}if(e$2e(this._tileInfo)){var r=this._tileInfo.lods.filter((function(t){return t.level===e})),o=e$2d.toDegrees(this._rectangle.east)-this._tileInfo.origin.x,a=r[0].resolution;return Math.ceil(o/(this._tileInfo.rows*a))}return this._numberOfLevelZeroTilesX<<e},m$M.prototype.getNumberOfYTilesAtLevel=function(e){if(e$2e(this._resolutions)){if(e<this._beginLevel)return this._numberOfLevelZeroTilesY<<e;var t=this._tileInfo.origin.y-this._dataBounds.south,i=e$2d.clamp(e-this._beginLevel,0,this._resolutions.length-1),n=this._resolutions[i]*this._tileInfo.rows;return Math.ceil(t/n)}if(e$2e(this._tileInfo)){var r=this._tileInfo.lods.filter((function(t){return t.level===e})),o=this._tileInfo.origin.y-e$2d.toDegrees(this._rectangle.south),a=r[0].resolution;return Math.ceil(o/(this._tileInfo.cols*a))}return this._numberOfLevelZeroTilesY<<e},m$M.prototype.rectangleToNativeRectangle=function(e,t){o$1q.defined("rectangle",e);var i=e$2d.toDegrees(e.west),n=e$2d.toDegrees(e.south),r=e$2d.toDegrees(e.east),o=e$2d.toDegrees(e.north);return e$2e(t)?(t.west=i,t.south=n,t.east=r,t.north=o,t):new h$18(i,n,r,o)},m$M.prototype.tileXYToNativeRectangle=function(e,t,i,n){var r=this.tileXYToRectangle(e,t,i,n);return r.west=e$2d.toDegrees(r.west),r.south=e$2d.toDegrees(r.south),r.east=e$2d.toDegrees(r.east),r.north=e$2d.toDegrees(r.north),r},m$M.prototype.tileXYToRectangle=function(e,t,i,n){var r=this._rectangle;if(e$2e(this._resolutions)){var o=this._resolutions[i-this._beginLevel],a=this._tileInfo.origin.x,s=this._tileInfo.origin.y,l=a+e*this._tileWidth*o,u=a+(e+1)*this._tileWidth*o,c=s-t*this._tileHeight*o,h=s-(t+1)*this._tileHeight*o;return e$2e(n)?(n.west=l,n.south=h,n.east=u,n.north=c,n):new h$18(l/6378137,h/6378137,u/6378137,c/6378137)}if(e$2e(this._tileInfo)){o=this._tileInfo.lods[i].resolution*e$2d.TWO_PI/360;a=e$2d.toRadians(this._tileInfo.origin.x),s=e$2d.toRadians(this._tileInfo.origin.y);l=a+e*this._tileWidth*o,u=a+(e+1)*this._tileWidth*o,c=s-t*this._tileHeight*o,h=s-(t+1)*this._tileHeight*o;return e$2e(n)?(n.west=l,n.south=h,n.east=u,n.north=c,n):new h$18(l,h,u,c)}var d=this.getNumberOfXTilesAtLevel(i),f=this.getNumberOfYTilesAtLevel(i),p=r.width/d,_=(l=e*p+r.west,u=(e+1)*p+r.west,r.height/f);c=r.north-t*_,h=r.north-(t+1)*_;return e$2e(n)||(n=new h$18(l,h,u,c)),n.west=l,n.south=h,n.east=u,n.north=c,n},m$M.prototype.positionToTileXY=function(e,t,i){var n=this._rectangle;if(h$18.contains(n,e)){var r=this.getNumberOfXTilesAtLevel(t),o=this.getNumberOfYTilesAtLevel(t),a=n.width/r,s=n.height/o;if(e$2e(this._resolutions)){var l=this._resolutions[t-this._beginLevel];a=this._tileWidth*l,s=this._tileHeight*l}else if(e$2e(this._tileInfo)){l=this._tileInfo.lods[t].resolution*e$2d.TWO_PI/360;a=this._tileWidth*l,s=this._tileHeight*l}var u,c,h=e.longitude;n.east<n.west&&(h+=e$2d.TWO_PI);var d=(h-(u=e$2e(this._resolutions)?this._tileInfo.origin.x:e$2e(this._tileInfo)?e$2d.toRadians(this._tileInfo.origin.x):n.west))/a|0;e$2e(this._resolutions)&&(d=(6378137*h-u)/a|0,d=e$2d.clamp(d,this._tileBounds[t-this._beginLevel].west,this._tileBounds[t-this._beginLevel].east)),d>=r&&(d=r-1);var f=((c=e$2e(this._resolutions)?this._tileInfo.origin.y:e$2e(this._tileInfo)?e$2d.toRadians(this._tileInfo.origin.y):n.north)-e.latitude)/s|0;return e$2e(this._resolutions)&&(f=(c-6378137*e.latitude)/s|0,f=e$2d.clamp(f,this._tileBounds[t-this._beginLevel].north,this._tileBounds[t-this._beginLevel].south)),f>=o&&(f=o-1),e$2e(i)?(i.x=d,i.y=f,i):new o$1o(d,f)}};var l$S=new h$18;function S$I(e,t,i,n){for(var r=n.length,o=0;o<r;++o){var a=n[o];if(a.x===t&&a.y===i&&a.level===e)return!0}return!1}n$C.prototype.addAvailableTileRange=function(e,t,i,n,r){var o=this._tilingScheme,a=this._rootNodes;if(0===e)for(var s=i;s<=r;++s)for(var l=t;l<=n;++l)S$I(e,l,s,a)||a.push(new _$F(o,void 0,0,l,s));o.tileXYToRectangle(t,i,e,l$S);var u=l$S.west,c=l$S.north;o.tileXYToRectangle(n,r,e,l$S);for(var h=l$S.east,d=new Y$B(e,u,l$S.south,h,c),f=0;f<a.length;++f){var p=a[f];L$T(p.extent,d)&&j$K(this._maximumLevel,p,d)}},n$C.prototype.computeMaximumLevelAtPosition=function(e){for(var t,i=0;i<this._rootNodes.length;++i){var n=this._rootNodes[i];if(m$L(n.extent,e)){t=n;break}}return e$2e(t)?x$P(void 0,t,e):-1};var W$P=[],b$T=[],Q$J=new h$18,X$I=new h$18;n$C.prototype.computeBestAvailableLevelOverRectangle=function(e){var t=W$P;t.length=0,e.east<e.west?(t.push(h$18.fromRadians(-Math.PI,e.south,e.east,e.north,Q$J)),t.push(h$18.fromRadians(e.west,e.south,Math.PI,e.north,X$I))):t.push(e);var i,n=b$T;for(n.length=0,i=0;i<this._rootNodes.length;++i)M$L(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(e$2e(n[i])&&0===n[i].length)return i;return 0};var o$N=new a$18;function _$F(e,t,i,n,r){this.tilingScheme=e,this.parent=t,this.level=i,this.x=n,this.y=r,this.extent=e.tileXYToRectangle(n,r,i),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}function Y$B(e,t,i,n,r){this.level=e,this.west=t,this.south=i,this.east=n,this.north=r}function L$T(e,t){var i=Math.max(e.west,t.west),n=Math.max(e.south,t.south),r=Math.min(e.east,t.east);return n<Math.min(e.north,t.north)&&i<r}function j$K(e,t,i){for(;t.level<e;)if(A$T(t.nw.extent,i))t=t.nw;else if(A$T(t.ne.extent,i))t=t.ne;else if(A$T(t.sw.extent,i))t=t.sw;else{if(!A$T(t.se.extent,i))break;t=t.se}if(0===t.rectangles.length||t.rectangles[t.rectangles.length-1].level<=i.level)t.rectangles.push(i);else{var n=a$17(t.rectangles,i.level,I$W);n<=0&&(n=~n),t.rectangles.splice(n,0,i)}}function I$W(e,t){return e.level-t}function A$T(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function m$L(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function x$P(e,t,i){for(var n=0,r=!1;!r;){var o=t._nw&&m$L(t._nw.extent,i),a=t._ne&&m$L(t._ne.extent,i),s=t._sw&&m$L(t._sw.extent,i),l=t._se&&m$L(t._se.extent,i);if(o+a+s+l>1){o&&(n=Math.max(n,x$P(t,t._nw,i))),a&&(n=Math.max(n,x$P(t,t._ne,i))),s&&(n=Math.max(n,x$P(t,t._sw,i))),l&&(n=Math.max(n,x$P(t,t._se,i)));break}o?t=t._nw:a?t=t._ne:s?t=t._sw:l?t=t._se:r=!0}for(;t!==e;){for(var u=t.rectangles,c=u.length-1;c>=0&&u[c].level>n;--c){var h=u[c];m$L(h,i)&&(n=h.level)}t=t.parent}return n}function M$L(e,t,i){if(t){var n,r=!1;for(n=0;n<i.length;++n)r=r||L$T(t.extent,i[n]);if(r){var o=t.rectangles;for(n=0;n<o.length;++n){var a=o[n];e[a.level]||(e[a.level]=i),e[a.level]=q$P(e[a.level],a)}M$L(e,t._nw,i),M$L(e,t._ne,i),M$L(e,t._sw,i),M$L(e,t._se,i)}}}function q$P(e,t){for(var i=[],n=0;n<e.length;++n){var r=e[n];L$T(r,t)?(r.west<t.west&&i.push(new h$18(r.west,r.south,t.west,r.north)),r.east>t.east&&i.push(new h$18(t.east,r.south,r.east,r.north)),r.south<t.south&&i.push(new h$18(Math.max(t.west,r.west),r.south,Math.min(t.east,r.east),t.south)),r.north>t.north&&i.push(new h$18(Math.max(t.west,r.west),t.north,Math.min(t.east,r.east),r.north))):i.push(r)}return i}n$C.prototype.isTileAvailable=function(e,t,i){var n=this._tilingScheme.tileXYToRectangle(t,i,e,l$S);return h$18.center(n,o$N),this.computeMaximumLevelAtPosition(o$N)>=e},n$C.prototype.computeChildMaskForTile=function(e,t,i){var n=e+1;if(n>=this._maximumLevel)return 0;var r=0;return r|=this.isTileAvailable(n,2*t,2*i+1)?1:0,r|=this.isTileAvailable(n,2*t+1,2*i+1)?2:0,r|=this.isTileAvailable(n,2*t,2*i)?4:0,r|=this.isTileAvailable(n,2*t+1,2*i)?8:0},Object.defineProperties(_$F.prototype,{nw:{get:function(){return this._nw||(this._nw=new _$F(this.tilingScheme,this,this.level+1,2*this.x,2*this.y)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new _$F(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new _$F(this.tilingScheme,this,this.level+1,2*this.x,2*this.y+1)),this._sw}},se:{get:function(){return this._se||(this._se=new _$F(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y+1)),this._se}}});var j$J=15;function _$E(e){if(!e$2e(e)||!e$2e(e.url))throw new t$15("options.url is required.");this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;var t=e.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};var i=this,n=u$Z(e.ellipsoid,t$12.WGS84);this._readyPromise=o$1l(e.url).then((function(e){var n=t$10.createIfNeeded(e);return n.appendForwardSlash(),e$2e(t)&&(n=n.getDerivedResource({queryParameters:{token:t}})),i._resource=n,n.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()})).then((function(e){var t=e.copyrightText;e$2e(t)&&(i._credit=new r$U(t));var r=e.spatialReference,o=u$Z(r.latestWkid,r.wkid),a=e.extent,s={ellipsoid:n};if(4326===o)s.rectangle=h$18.fromDegrees(a.xmin,a.ymin,a.xmax,a.ymax),i._tilingScheme=new g$15(s);else{if(3857!==o)return o$1l.reject(new t$13("Invalid spatial reference"));s.rectangleSouthwestInMeters=new o$1o(a.xmin,a.ymin),s.rectangleNortheastInMeters=new o$1o(a.xmax,a.ymax),i._tilingScheme=new c$S(s)}var l=e.tileInfo;return e$2e(l)?(i._width=l.rows+1,i._height=l.cols+1,i._encoding="LERC"===l.format?T$N.LERC:T$N.NONE,i._lodCount=l.lods.length-1,(i._hasAvailability=-1!==e.capabilities.indexOf("Tilemap"))&&(i._tilesAvailable=new n$C(i._tilingScheme,i._lodCount),i._tilesAvailable.addAvailableTileRange(0,0,0,i._tilingScheme.getNumberOfXTilesAtLevel(0),i._tilingScheme.getNumberOfYTilesAtLevel(0)),i._tilesAvailablityLoaded=new n$C(i._tilingScheme,i._lodCount)),i._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(i._tilingScheme.ellipsoid,i._width,i._tilingScheme.getNumberOfXTilesAtLevel(0)),e.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),i._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:e.minValues[0],highestEncodedHeight:e.maxValues[0]},i._ready=!0,!0):o$1l.reject(new t$13("tileInfo is required"))})).otherwise((function(e){var t="An error occurred while accessing "+i._resource.url+".";return l$V.handleError(void 0,i,i._errorEvent,t),o$1l.reject(e)})),this._errorEvent=new o$1h}function w$J(e,t,i,n){if(e._hasAvailability){var r=e._tilesAvailablityLoaded,o=e._tilesAvailable;if(t>e._lodCount)return!1;if(o.isTileAvailable(t,i,n))return!0;if(r.isTileAvailable(t,i,n))return!1}}function H$N(e,t,i,n){for(var r=t-1,o=i-1,a=n[e.y*t+e.x],s=[],l={startX:e.x,startY:e.y,endX:0,endY:0},u=new o$1o(e.x+1,e.y+1),c=!1,h=!1;!c||!h;){var d=u.x,f=h?u.y+1:u.y;if(!c){for(var p=e.y;p<f;++p)if(n[p*t+u.x]!==a){c=!0;break}c?(s.push(new o$1o(u.x,e.y)),--u.x,--d,l.endX=u.x):u.x===r?(l.endX=u.x,c=!0):++u.x}if(!h){for(var _=u.y*t,m=e.x;m<=d;++m)if(n[_+m]!==a){h=!0;break}h?(s.push(new o$1o(e.x,u.y)),--u.y,l.endY=u.y):u.y===o?(l.endY=u.y,h=!0):++u.y}}return{endingIndices:s,range:l,value:a}}function V$D(e,t,i,n,r){var o=[],a=r.every((function(e){return e===r[0]}));if(a)return 1===r[0]&&o.push({startX:e,startY:t,endX:e+i-1,endY:t+n-1}),o;for(var s=[new o$1o(0,0)];s.length>0;){var l=H$N(s.pop(),i,n,r);if(1===l.value){var u=l.range;u.startX+=e,u.endX+=e,u.startY+=t,u.endY+=t,o.push(u)}var c=l.endingIndices;c.length>0&&(s=s.concat(c))}return o}function L$S(e,t,i,n){if(!e._hasAvailability)return{};var r=128*Math.floor(i/128),o=128*Math.floor(n/128),a=Math.min(1<<t,128),s="tilemap/"+t+"/"+o+"/"+r+"/"+a+"/"+a,l=e._availableCache;if(e$2e(l[s]))return l[s];var u=new r$1c({throttle:!0,throttleByServer:!0,type:U$1f.TERRAIN}),c=e._resource.getDerivedResource({url:s,request:u}).fetchJson();return e$2e(c)?(c=c.then((function(s){var l=V$D(r,o,a,a,s.data);e._tilesAvailablityLoaded.addAvailableTileRange(r,o,r+a,o+a);for(var u=e._tilesAvailable,c=0;c<l.length;++c){var h=l[c];u.addAvailableTileRange(t,h.startX,h.startY,h.endX,h.endY)}return w$J(e,t,i,n)})),l[s]={promise:c,request:u},c=c.always((function(e){return delete l[s],e})),{promise:c,request:u}):{}}function l$R(e,t,i){if(o$1q.defined("array",e),e$2e(t)&&o$1q.typeOf.number("begin",t),e$2e(i)&&o$1q.typeOf.number("end",i),"function"==typeof e.slice)return e.slice(t,i);for(var n=Array.prototype.slice.call(e,t,i),r=s$Z.typedArrayTypes,o=r.length,a=0;a<o;++a)if(e instanceof r[a]){n=new r[a](n);break}return n}Object.defineProperties(_$E.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this.ready)throw new t$15("credit must not be called before ready returns true.");return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$15("tilingScheme must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),_$E.prototype.requestTileGeometry=function(e,t,i,n){if(!this._ready)throw new t$15("requestTileGeometry must not be called before the terrain provider is ready.");var r,o=this._resource.getDerivedResource({url:"tile/"+i+"/"+t+"/"+e,request:n}),a=this._hasAvailability,s=o$1l.resolve(!0);if(a&&!e$2e(w$J(this,i+1,2*e,2*t))){var l=L$S(this,i+1,2*e,2*t);s=l.promise,r=l.request}var u=o.fetchArrayBuffer();if(e$2e(u)&&e$2e(s)){var c=this,h=this._tilesAvailable;return o$1l.join(u,s).then((function(n){return new T$L({buffer:n[0],width:c._width,height:c._height,childTileMask:a?h.computeChildMaskForTile(i,e,t):j$J,structure:c._terrainDataStructure,encoding:c._encoding})})).otherwise((function(e){return e$2e(r)&&r.state===W$1c.CANCELLED?(n.cancel(),n.deferred.promise.always((function(){return n.state=W$1c.CANCELLED,o$1l.reject(e)}))):o$1l.reject(e)}))}},_$E.prototype.getLevelMaximumGeometricError=function(e){if(!this.ready)throw new t$15("getLevelMaximumGeometricError must not be called before ready returns true.");return this._levelZeroMaximumGeometricError/(1<<e)},_$E.prototype.getTileDataAvailable=function(e,t,i){if(this._hasAvailability){var n=w$J(this,i,e,t);if(e$2e(n))return n;L$S(this,i,e,t)}},_$E.prototype.loadTileDataAvailability=function(e,t,i){};var e$12={defaultKey:void 0,getKey:function(e){return e$2e(e)?e:e$12.defaultKey}},i$N="";function o$M(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).key;this._key=e$12.getKey(t),this._resource=new t$10({url:i$N,queryParameters:{key:this._key}})}Object.defineProperties(o$M.prototype,{url:{get:function(){return i$N}},key:{get:function(){return this._key}}}),o$M.prototype.geocode=function(e){return o$1q.typeOf.string("query",e),this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then((function(e){return 0===e.resourceSets.length?[]:e.resourceSets[0].resources.map((function(e){var t=e.bbox,i=t[0],n=t[1],r=t[2],o=t[3];return{displayName:e.name,destination:h$18.fromDegrees(n,i,o,r)}}))}))};var W$O=new o$1p;function O$z(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).minimum,i=e.maximum;if(o$1q.typeOf.object("min",t),o$1q.typeOf.object("max",i),e$2e(e.offsetAttribute)&&e.offsetAttribute===_0x39c22a.TOP)throw new t$15("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");var n=u$Z(e.vertexFormat,n$13.DEFAULT);this._minimum=o$1p.clone(t),this._maximum=o$1p.clone(i),this._vertexFormat=n,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}O$z.fromDimensions=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).dimensions;o$1q.typeOf.object("dimensions",t),o$1q.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=o$1p.multiplyByScalar(t,.5,new o$1p);return new O$z({minimum:o$1p.negate(i,new o$1p),maximum:i,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},O$z.fromAxisAlignedBoundingBox=function(e){return o$1q.typeOf.object("boundingBox",e),new O$z({minimum:e.minimum,maximum:e.maximum})},O$z.packedLength=2*o$1p.packedLength+n$13.packedLength+1,O$z.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),o$1p.pack(e._minimum,t,i),o$1p.pack(e._maximum,t,i+o$1p.packedLength),n$13.pack(e._vertexFormat,t,i+2*o$1p.packedLength),t[i+2*o$1p.packedLength+n$13.packedLength]=u$Z(e._offsetAttribute,-1),t};var N$E=new o$1p,U$M=new o$1p,G$T=new n$13,S$H={minimum:N$E,maximum:U$M,vertexFormat:G$T,offsetAttribute:void 0},u$I,n$B;function t$C(e){n$B(e)}function N$D(){}O$z.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=o$1p.unpack(e,t,N$E),r=o$1p.unpack(e,t+o$1p.packedLength,U$M),o=n$13.unpack(e,t+2*o$1p.packedLength,G$T),a=e[t+2*o$1p.packedLength+n$13.packedLength];return e$2e(i)?(i._minimum=o$1p.clone(n,i._minimum),i._maximum=o$1p.clone(r,i._maximum),i._vertexFormat=n$13.clone(o,i._vertexFormat),i._offsetAttribute=-1===a?void 0:a,i):(S$H.offsetAttribute=-1===a?void 0:a,new O$z(S$H))},O$z.createGeometry=function(e){var t=e._minimum,i=e._maximum,n=e._vertexFormat;if(!o$1p.equals(t,i)){var r,o,a=new a$_;if(n.position&&(n.st||n.normal||n.tangent||n.bitangent)){if(n.position&&((o=new Float64Array(72))[0]=t.x,o[1]=t.y,o[2]=i.z,o[3]=i.x,o[4]=t.y,o[5]=i.z,o[6]=i.x,o[7]=i.y,o[8]=i.z,o[9]=t.x,o[10]=i.y,o[11]=i.z,o[12]=t.x,o[13]=t.y,o[14]=t.z,o[15]=i.x,o[16]=t.y,o[17]=t.z,o[18]=i.x,o[19]=i.y,o[20]=t.z,o[21]=t.x,o[22]=i.y,o[23]=t.z,o[24]=i.x,o[25]=t.y,o[26]=t.z,o[27]=i.x,o[28]=i.y,o[29]=t.z,o[30]=i.x,o[31]=i.y,o[32]=i.z,o[33]=i.x,o[34]=t.y,o[35]=i.z,o[36]=t.x,o[37]=t.y,o[38]=t.z,o[39]=t.x,o[40]=i.y,o[41]=t.z,o[42]=t.x,o[43]=i.y,o[44]=i.z,o[45]=t.x,o[46]=t.y,o[47]=i.z,o[48]=t.x,o[49]=i.y,o[50]=t.z,o[51]=i.x,o[52]=i.y,o[53]=t.z,o[54]=i.x,o[55]=i.y,o[56]=i.z,o[57]=t.x,o[58]=i.y,o[59]=i.z,o[60]=t.x,o[61]=t.y,o[62]=t.z,o[63]=i.x,o[64]=t.y,o[65]=t.z,o[66]=i.x,o[67]=t.y,o[68]=i.z,o[69]=t.x,o[70]=t.y,o[71]=i.z,a.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:o})),n.normal){var s=new Float32Array(72);s[0]=0,s[1]=0,s[2]=1,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=1,s[9]=0,s[10]=0,s[11]=1,s[12]=0,s[13]=0,s[14]=-1,s[15]=0,s[16]=0,s[17]=-1,s[18]=0,s[19]=0,s[20]=-1,s[21]=0,s[22]=0,s[23]=-1,s[24]=1,s[25]=0,s[26]=0,s[27]=1,s[28]=0,s[29]=0,s[30]=1,s[31]=0,s[32]=0,s[33]=1,s[34]=0,s[35]=0,s[36]=-1,s[37]=0,s[38]=0,s[39]=-1,s[40]=0,s[41]=0,s[42]=-1,s[43]=0,s[44]=0,s[45]=-1,s[46]=0,s[47]=0,s[48]=0,s[49]=1,s[50]=0,s[51]=0,s[52]=1,s[53]=0,s[54]=0,s[55]=1,s[56]=0,s[57]=0,s[58]=1,s[59]=0,s[60]=0,s[61]=-1,s[62]=0,s[63]=0,s[64]=-1,s[65]=0,s[66]=0,s[67]=-1,s[68]=0,s[69]=0,s[70]=-1,s[71]=0,a.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:s})}if(n.st){var l=new Float32Array(72),u=0;l[u++]=0,l[u++]=0,l[u++]=-1,l[u++]=1,l[u++]=0,l[u++]=-1,l[u++]=1,l[u++]=1,l[u++]=-1,l[u++]=0,l[u++]=1,l[u++]=-1,l[u++]=1,l[u++]=0,l[u++]=-1,l[u++]=0,l[u++]=0,l[u++]=-1,l[u++]=0,l[u++]=1,l[u++]=-1,l[u++]=1,l[u++]=1,l[u++]=-1,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=1,l[u++]=0,l[u++]=1,l[u++]=1,a.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:l})}if(n.tangent){var c=new Float32Array(72);c[0]=1,c[1]=0,c[2]=0,c[3]=1,c[4]=0,c[5]=0,c[6]=1,c[7]=0,c[8]=0,c[9]=1,c[10]=0,c[11]=0,c[12]=-1,c[13]=0,c[14]=0,c[15]=-1,c[16]=0,c[17]=0,c[18]=-1,c[19]=0,c[20]=0,c[21]=-1,c[22]=0,c[23]=0,c[24]=0,c[25]=1,c[26]=0,c[27]=0,c[28]=1,c[29]=0,c[30]=0,c[31]=1,c[32]=0,c[33]=0,c[34]=1,c[35]=0,c[36]=0,c[37]=-1,c[38]=0,c[39]=0,c[40]=-1,c[41]=0,c[42]=0,c[43]=-1,c[44]=0,c[45]=0,c[46]=-1,c[47]=0,c[48]=-1,c[49]=0,c[50]=0,c[51]=-1,c[52]=0,c[53]=0,c[54]=-1,c[55]=0,c[56]=0,c[57]=-1,c[58]=0,c[59]=0,c[60]=1,c[61]=0,c[62]=0,c[63]=1,c[64]=0,c[65]=0,c[66]=1,c[67]=0,c[68]=0,c[69]=1,c[70]=0,c[71]=0,a.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:c})}if(n.bitangent){var h=new Float32Array(72);h[0]=0,h[1]=1,h[2]=0,h[3]=0,h[4]=1,h[5]=0,h[6]=0,h[7]=1,h[8]=0,h[9]=0,h[10]=1,h[11]=0,h[12]=0,h[13]=1,h[14]=0,h[15]=0,h[16]=1,h[17]=0,h[18]=0,h[19]=1,h[20]=0,h[21]=0,h[22]=1,h[23]=0,h[24]=0,h[25]=0,h[26]=1,h[27]=0,h[28]=0,h[29]=1,h[30]=0,h[31]=0,h[32]=1,h[33]=0,h[34]=0,h[35]=1,h[36]=0,h[37]=0,h[38]=1,h[39]=0,h[40]=0,h[41]=1,h[42]=0,h[43]=0,h[44]=1,h[45]=0,h[46]=0,h[47]=1,h[48]=0,h[49]=0,h[50]=1,h[51]=0,h[52]=0,h[53]=1,h[54]=0,h[55]=0,h[56]=1,h[57]=0,h[58]=0,h[59]=1,h[60]=0,h[61]=0,h[62]=1,h[63]=0,h[64]=0,h[65]=1,h[66]=0,h[67]=0,h[68]=1,h[69]=0,h[70]=0,h[71]=1,a.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:h})}(r=new Uint16Array(36))[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=6,r[7]=5,r[8]=4,r[9]=7,r[10]=6,r[11]=4,r[12]=8,r[13]=9,r[14]=10,r[15]=8,r[16]=10,r[17]=11,r[18]=14,r[19]=13,r[20]=12,r[21]=15,r[22]=14,r[23]=12,r[24]=18,r[25]=17,r[26]=16,r[27]=19,r[28]=18,r[29]=16,r[30]=20,r[31]=21,r[32]=22,r[33]=20,r[34]=22,r[35]=23}else(o=new Float64Array(24))[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=i.x,o[4]=t.y,o[5]=t.z,o[6]=i.x,o[7]=i.y,o[8]=t.z,o[9]=t.x,o[10]=i.y,o[11]=t.z,o[12]=t.x,o[13]=t.y,o[14]=i.z,o[15]=i.x,o[16]=t.y,o[17]=i.z,o[18]=i.x,o[19]=i.y,o[20]=i.z,o[21]=t.x,o[22]=i.y,o[23]=i.z,a.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:o}),(r=new Uint16Array(36))[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;var d=o$1p.subtract(i,t,W$O),f=.5*o$1p.magnitude(d);if(e$2e(e._offsetAttribute)){var p=o.length,_=new Uint8Array(p/3);d$1s(_,e._offsetAttribute===_0x39c22a.NONE?0:1),a.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new I$1p({attributes:a,indices:r,primitiveType:W$18.TRIANGLES,boundingSphere:new i$1d(o$1p.ZERO,f),offsetAttribute:e._offsetAttribute})}},O$z.getUnitBox=function(){return e$2e(u$I)||(u$I=O$z.createGeometry(O$z.fromDimensions({dimensions:new o$1p(1,1,1),vertexFormat:n$13.POSITION_ONLY}))),u$I},typeof cancelAnimationFrame<"u"&&(n$B=cancelAnimationFrame),function(){if(!e$2e(n$B)&&typeof window<"u")for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!e$2e(n$B);)e$2e(n$B=window[e[t]+"CancelAnimationFrame"])||(n$B=window[e[t]+"CancelRequestAnimationFrame"]),++t;e$2e(n$B)||(n$B=clearTimeout)}(),N$D.prototype.geocode=function(e){o$1q.typeOf.string("query",e);var t=e.match(/[^\s,\n]+/g);if(2===t.length||3===t.length){var i=+t[0],n=+t[1],r=3===t.length?+t[2]:300;if(isNaN(i)&&isNaN(n))for(var o=/^(\d+.?\d*)([nsew])/i,a=0;a<t.length;++a){var s=t[a].match(o);o.test(t[a])&&3===s.length&&(/^[ns]/i.test(s[2])?n=/^[n]/i.test(s[2])?+s[1]:-s[1]:/^[ew]/i.test(s[2])&&(i=/^[e]/i.test(s[2])?+s[1]:-s[1]))}if(!isNaN(i)&&!isNaN(n)&&!isNaN(r)){var l={displayName:e,destination:o$1p.fromDegrees(i,n,r)};return o$1l.resolve([l])}}return o$1l.resolve([])};var C$L={},b$S=new o$1p,Q$I=new o$1p,G$S=new n$15,N$C=new p$1e;function W$N(e,t,i,n,r,o,a,s,l,u){var c=e+t;o$1p.multiplyByScalar(n,Math.cos(c),b$S),o$1p.multiplyByScalar(i,Math.sin(c),Q$I),o$1p.add(b$S,Q$I,b$S);var h=Math.cos(e);h*=h;var d=Math.sin(e);d*=d;var f=o/Math.sqrt(a*h+r*d)/s;return n$15.fromAxisAngle(b$S,f,G$S),p$1e.fromQuaternion(G$S,N$C),p$1e.multiplyByVector(N$C,l,u),o$1p.normalize(u,u),o$1p.multiplyByScalar(u,s,u),u}var U$L=new o$1p,Z$G=new o$1p,j$I=new o$1p,D$G=new o$1p;C$L.raisePositionsToHeight=function(e,t,i){for(var n=t.ellipsoid,r=t.height,o=t.extrudedHeight,a=i?e.length/3*2:e.length/3,s=new Float64Array(3*a),l=e.length,u=i?l:0,c=0;c<l;c+=3){var h=c+1,d=c+2,f=o$1p.fromArray(e,c,U$L);n.scaleToGeodeticSurface(f,f);var p=o$1p.clone(f,Z$G),_=n.geodeticSurfaceNormal(f,D$G),m=o$1p.multiplyByScalar(_,r,j$I);o$1p.add(f,m,f),i&&(o$1p.multiplyByScalar(_,o,m),o$1p.add(p,m,p),s[c+u]=p.x,s[h+u]=p.y,s[d+u]=p.z),s[c]=f.x,s[h]=f.y,s[d]=f.z}return s};var J$E=new o$1p,K$H=new o$1p,X$H=new o$1p;C$L.computeEllipsePositions=function(e,t,i){var n=e.semiMinorAxis,r=e.semiMajorAxis,o=e.rotation,a=e.center,s=8*e.granularity,l=n*n,u=r*r,c=r*n,h=o$1p.magnitude(a),d=o$1p.normalize(a,J$E),f=o$1p.cross(o$1p.UNIT_Z,a,K$H);f=o$1p.normalize(f,f);var p=o$1p.cross(d,f,X$H),_=1+Math.ceil(e$2d.PI_OVER_TWO/s),m=e$2d.PI_OVER_TWO/(_-1),g=e$2d.PI_OVER_TWO-_*m;g<0&&(_-=Math.ceil(Math.abs(g)/m));var x,y,v,$,b,T=t?new Array(3*(_*(_+2)*2)):void 0,C=0,S=U$L,w=Z$G,E=4*_*3,P=E-1,A=0,L=i?new Array(E):void 0;for(S=W$N(g=e$2d.PI_OVER_TWO,o,p,f,l,c,u,h,d,S),t&&(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z),i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x),g=e$2d.PI_OVER_TWO-m,x=1;x<_+1;++x){if(S=W$N(g,o,p,f,l,c,u,h,d,S),w=W$N(Math.PI-g,o,p,f,l,c,u,h,d,w),t){for(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z,v=2*x+2,y=1;y<v-1;++y)$=y/(v-1),b=o$1p.lerp(S,w,$,j$I),T[C++]=b.x,T[C++]=b.y,T[C++]=b.z;T[C++]=w.x,T[C++]=w.y,T[C++]=w.z}i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,L[A++]=w.x,L[A++]=w.y,L[A++]=w.z),g=e$2d.PI_OVER_TWO-(x+1)*m}for(x=_;x>1;--x){if(S=W$N(-(g=e$2d.PI_OVER_TWO-(x-1)*m),o,p,f,l,c,u,h,d,S),w=W$N(g+Math.PI,o,p,f,l,c,u,h,d,w),t){for(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z,v=2*(x-1)+2,y=1;y<v-1;++y)$=y/(v-1),b=o$1p.lerp(S,w,$,j$I),T[C++]=b.x,T[C++]=b.y,T[C++]=b.z;T[C++]=w.x,T[C++]=w.y,T[C++]=w.z}i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,L[A++]=w.x,L[A++]=w.y,L[A++]=w.z)}S=W$N(-(g=e$2d.PI_OVER_TWO),o,p,f,l,c,u,h,d,S);var M={};return t&&(T[C++]=S.x,T[C++]=S.y,T[C++]=S.z,M.positions=T,M.numPts=_),i&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,M.outerPositions=L),M};var te$v=new o$1p,xe$j=new o$1p,pe$r=new o$1p,Me$k=new o$1p,p$N=new o$1o,Te$i=new p$1e,Ye$b=new p$1e,_e$m=new n$15,Ee$i=new o$1p,Ne$g=new o$1p,Fe$h=new o$1p,le$q=new a$18,Se$d=new o$1p,Oe$j=new o$1o,Ce$f=new o$1o;function Pe$h(e,t,i){var n=t.vertexFormat,r=t.center,o=t.semiMajorAxis,a=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,u=i?e.length/3*2:e.length/3,c=t.shadowVolume,h=n.st?new Float32Array(2*u):void 0,d=n.normal?new Float32Array(3*u):void 0,f=n.tangent?new Float32Array(3*u):void 0,p=n.bitangent?new Float32Array(3*u):void 0,_=c?new Float32Array(3*u):void 0,m=0,g=Ee$i,x=Ne$g,y=Fe$h,v=new n$1d(s),$=v.project(s.cartesianToCartographic(r,le$q),Se$d),b=s.scaleToGeodeticSurface(r,te$v);s.geodeticSurfaceNormal(b,b);var T=Te$i,C=Ye$b;if(0!==l){var S=n$15.fromAxisAngle(b,l,_e$m);T=p$1e.fromQuaternion(S,T),S=n$15.fromAxisAngle(b,-l,_e$m),C=p$1e.fromQuaternion(S,C)}else T=p$1e.clone(p$1e.IDENTITY,T),C=p$1e.clone(p$1e.IDENTITY,C);for(var w=o$1o.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Oe$j),E=o$1o.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Ce$f),P=e.length,A=i?P:0,L=A/3*2,M=0;M<P;M+=3){var R=M+1,O=M+2,D=o$1p.fromArray(e,M,te$v);if(n.st){var I=p$1e.multiplyByVector(T,D,xe$j),B=v.project(s.cartesianToCartographic(I,le$q),pe$r);o$1p.subtract(B,$,B),p$N.x=(B.x+o)/(2*o),p$N.y=(B.y+a)/(2*a),w.x=Math.min(p$N.x,w.x),w.y=Math.min(p$N.y,w.y),E.x=Math.max(p$N.x,E.x),E.y=Math.max(p$N.y,E.y),i&&(h[m+L]=p$N.x,h[m+1+L]=p$N.y),h[m++]=p$N.x,h[m++]=p$N.y}(n.normal||n.tangent||n.bitangent||c)&&(g=s.geodeticSurfaceNormal(D,g),c&&(_[M+A]=-g.x,_[R+A]=-g.y,_[O+A]=-g.z),(n.normal||n.tangent||n.bitangent)&&((n.tangent||n.bitangent)&&(x=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,g,x),x),p$1e.multiplyByVector(C,x,x)),n.normal&&(d[M]=g.x,d[R]=g.y,d[O]=g.z,i&&(d[M+A]=-g.x,d[R+A]=-g.y,d[O+A]=-g.z)),n.tangent&&(f[M]=x.x,f[R]=x.y,f[O]=x.z,i&&(f[M+A]=-x.x,f[R+A]=-x.y,f[O+A]=-x.z)),n.bitangent&&(y=o$1p.normalize(o$1p.cross(g,x,y),y),p[M]=y.x,p[R]=y.y,p[O]=y.z,i&&(p[M+A]=y.x,p[R+A]=y.y,p[O+A]=y.z))))}if(n.st){P=h.length;for(var F=0;F<P;F+=2)h[F]=(h[F]-w.x)/(E.x-w.x),h[F+1]=(h[F+1]-w.y)/(E.y-w.y)}var N=new a$_;if(n.position){var G=C$L.raisePositionsToHeight(e,t,i);N.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:G})}if(n.st&&(N.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:h})),n.normal&&(N.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:d})),n.tangent&&(N.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:f})),n.bitangent&&(N.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:p})),c&&(N.extrudeDirection=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:_})),i&&e$2e(t.offsetAttribute)){var z=new Uint8Array(u);if(t.offsetAttribute===_0x39c22a.TOP)z=d$1s(z,1,0,u/2);else z=d$1s(z,t.offsetAttribute===_0x39c22a.NONE?0:1);N.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}return N}function Ie$f(e){var t,i,n,r,o,a=new Array(e*(e+1)*12-6),s=0;for(t=0,n=1,r=0;r<3;r++)a[s++]=n++,a[s++]=t,a[s++]=n;for(r=2;r<e+1;++r){for(n=r*(r+1)-1,t=(r-1)*r-1,a[s++]=n++,a[s++]=t,a[s++]=n,i=2*r,o=0;o<i-1;++o)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;a[s++]=n++,a[s++]=t,a[s++]=n}for(i=2*e,++n,++t,r=0;r<i-1;++r)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;for(a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t++,a[s++]=t,++t,r=e-1;r>1;--r){for(a[s++]=t++,a[s++]=t,a[s++]=n,i=2*r,o=0;o<i-1;++o)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;a[s++]=t++,a[s++]=t++,a[s++]=n++}for(r=0;r<3;r++)a[s++]=t++,a[s++]=t,a[s++]=n;return a}var $$G=new o$1p;function ke$b(e){var t=e.center;$$G=o$1p.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,$$G),e.height,$$G);var i=new i$1d($$G=o$1p.add(t,$$G,$$G),e.semiMajorAxis),n=C$L.computeEllipsePositions(e,!0,!1),r=n.positions,o=n.numPts,a=Pe$h(r,e,!1),s=Ie$f(o);return{boundingSphere:i,attributes:a,indices:s=ce$z.createTypedArray(r.length/3,s)}}function Ue$e(e,t){var i=t.vertexFormat,n=t.center,r=t.semiMajorAxis,o=t.semiMinorAxis,a=t.ellipsoid,s=t.height,l=t.extrudedHeight,u=t.stRotation,c=e.length/3*2,h=new Float64Array(3*c),d=i.st?new Float32Array(2*c):void 0,f=i.normal?new Float32Array(3*c):void 0,p=i.tangent?new Float32Array(3*c):void 0,_=i.bitangent?new Float32Array(3*c):void 0,m=t.shadowVolume,g=m?new Float32Array(3*c):void 0,x=0,y=Ee$i,v=Ne$g,$=Fe$h,b=new n$1d(a),T=b.project(a.cartesianToCartographic(n,le$q),Se$d),C=a.scaleToGeodeticSurface(n,te$v);a.geodeticSurfaceNormal(C,C);for(var S=n$15.fromAxisAngle(C,u,_e$m),w=p$1e.fromQuaternion(S,Te$i),E=o$1o.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Oe$j),P=o$1o.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Ce$f),A=e.length,L=A/3*2,M=0;M<A;M+=3){var R,O=M+1,D=M+2,I=o$1p.fromArray(e,M,te$v);if(i.st){var B=p$1e.multiplyByVector(w,I,xe$j),F=b.project(a.cartesianToCartographic(B,le$q),pe$r);o$1p.subtract(F,T,F),p$N.x=(F.x+r)/(2*r),p$N.y=(F.y+o)/(2*o),E.x=Math.min(p$N.x,E.x),E.y=Math.min(p$N.y,E.y),P.x=Math.max(p$N.x,P.x),P.y=Math.max(p$N.y,P.y),d[x+L]=p$N.x,d[x+1+L]=p$N.y,d[x++]=p$N.x,d[x++]=p$N.y}I=a.scaleToGeodeticSurface(I,I),R=o$1p.clone(I,xe$j),y=a.geodeticSurfaceNormal(I,y),m&&(g[M+A]=-y.x,g[O+A]=-y.y,g[D+A]=-y.z);var N=o$1p.multiplyByScalar(y,s,Me$k);if(I=o$1p.add(I,N,I),N=o$1p.multiplyByScalar(y,l,N),R=o$1p.add(R,N,R),i.position&&(h[M+A]=R.x,h[O+A]=R.y,h[D+A]=R.z,h[M]=I.x,h[O]=I.y,h[D]=I.z),i.normal||i.tangent||i.bitangent){$=o$1p.clone(y,$);var G=o$1p.fromArray(e,(M+3)%A,Me$k);o$1p.subtract(G,I,G);var z=o$1p.subtract(R,I,pe$r);y=o$1p.normalize(o$1p.cross(z,G,y),y),i.normal&&(f[M]=y.x,f[O]=y.y,f[D]=y.z,f[M+A]=y.x,f[O+A]=y.y,f[D+A]=y.z),i.tangent&&(v=o$1p.normalize(o$1p.cross($,y,v),v),p[M]=v.x,p[O]=v.y,p[D]=v.z,p[M+A]=v.x,p[M+1+A]=v.y,p[M+2+A]=v.z),i.bitangent&&(_[M]=$.x,_[O]=$.y,_[D]=$.z,_[M+A]=$.x,_[O+A]=$.y,_[D+A]=$.z)}}if(i.st){A=d.length;for(var U=0;U<A;U+=2)d[U]=(d[U]-E.x)/(P.x-E.x),d[U+1]=(d[U+1]-E.y)/(P.y-E.y)}var V=new a$_;if(i.position&&(V.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:h})),i.st&&(V.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:d})),i.normal&&(V.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:f})),i.tangent&&(V.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:p})),i.bitangent&&(V.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:_})),m&&(V.extrudeDirection=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:g})),e$2e(t.offsetAttribute)){var k=new Uint8Array(c);if(t.offsetAttribute===_0x39c22a.TOP)k=d$1s(k,1,0,c/2);else k=d$1s(k,t.offsetAttribute===_0x39c22a.NONE?0:1);V.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:k})}return V}function We$d(e){for(var t=e.length/3,i=ce$z.createTypedArray(t,6*t),n=0,r=0;r<t;r++){var o=r,a=r+t,s=(o+1)%t,l=s+t;i[n++]=o,i[n++]=a,i[n++]=s,i[n++]=s,i[n++]=a,i[n++]=l}return i}var de$n=new i$1d,Ae$l=new i$1d;function qe$9(e){var t=e.center,i=e.ellipsoid,n=e.semiMajorAxis,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,te$v),e.height,te$v);de$n.center=o$1p.add(t,r,de$n.center),de$n.radius=n,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,r),e.extrudedHeight,r),Ae$l.center=o$1p.add(t,r,Ae$l.center),Ae$l.radius=n;var o=C$L.computeEllipsePositions(e,!0,!0),a=o.positions,s=o.numPts,l=o.outerPositions,u=i$1d.union(de$n,Ae$l),c=Pe$h(a,e,!0),h=Ie$f(s),d=h.length;h.length=2*d;for(var f=a.length/3,p=0;p<d;p+=3)h[p+d]=h[p+2]+f,h[p+1+d]=h[p+1]+f,h[p+2+d]=h[p]+f;var _=new I$1p({attributes:c,indices:ce$z.createTypedArray(2*f/3,h),primitiveType:W$18.TRIANGLES}),m=Ue$e(l,e);h=We$d(l);var g=new I$1p({attributes:m,indices:ce$z.createTypedArray(2*l.length/3,h),primitiveType:W$18.TRIANGLES}),x=k$14.combineInstances([new d$1o({geometry:_}),new d$1o({geometry:g})]);return{boundingSphere:u,attributes:x[0].attributes,indices:x[0].indices}}function Re$h(e,t,i,n,r,o,a){for(var s=C$L.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:i,rotation:n,granularity:r},!1,!0).outerPositions,l=s.length/3,u=new Array(l),c=0;c<l;++c)u[c]=o$1p.fromArray(s,3*c);var h=h$18.fromCartesianArray(u,o,a);return h.width>e$2d.PI&&(h.north=h.north>0?e$2d.PI_OVER_TWO-e$2d.EPSILON7:h.north,h.south=h.south<0?e$2d.EPSILON7-e$2d.PI_OVER_TWO:h.south,h.east=e$2d.PI,h.west=-e$2d.PI),h}function Y$A(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).center,i=u$Z(e.ellipsoid,t$12.WGS84),n=e.semiMajorAxis,r=e.semiMinorAxis,o=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),a=u$Z(e.vertexFormat,n$13.DEFAULT);if(o$1q.defined("options.center",t),o$1q.typeOf.number("options.semiMajorAxis",n),o$1q.typeOf.number("options.semiMinorAxis",r),n<r)throw new t$15("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(o<=0)throw new t$15("granularity must be greater than zero.");var s=u$Z(e.height,0),l=u$Z(e.extrudedHeight,s);this._center=o$1p.clone(t),this._semiMajorAxis=n,this._semiMinorAxis=r,this._ellipsoid=t$12.clone(i),this._rotation=u$Z(e.rotation,0),this._stRotation=u$Z(e.stRotation,0),this._height=Math.max(l,s),this._granularity=o,this._vertexFormat=n$13.clone(a),this._extrudedHeight=Math.min(l,s),this._shadowVolume=u$Z(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}Y$A.packedLength=o$1p.packedLength+t$12.packedLength+n$13.packedLength+9,Y$A.pack=function(e,t,i){return o$1q.defined("value",e),o$1q.defined("array",t),i=u$Z(i,0),o$1p.pack(e._center,t,i),i+=o$1p.packedLength,t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=u$Z(e._offsetAttribute,-1),t};var je$b=new o$1p,De$h=new t$12,Ve$d=new n$13,k$G={center:je$b,ellipsoid:De$h,vertexFormat:Ve$d,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};function Qe$7(e){var t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];for(var i=C$L.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,n=i.length/3,r=new Array(n),o=0;o<n;++o)r[o]=o$1p.fromArray(i,3*o);var a=e._ellipsoid,s=e.rectangle;return I$1p._textureCoordinateRotationPoints(r,t,a,s)}function n$A(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).radius;o$1q.typeOf.number("radius",t);var i={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new Y$A(i),this._workerName="createCircleGeometry"}Y$A.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=o$1p.unpack(e,t,je$b);t+=o$1p.packedLength;var r=t$12.unpack(e,t,De$h);t+=t$12.packedLength;var o=n$13.unpack(e,t,Ve$d);t+=n$13.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=1===e[t++],p=e[t];return e$2e(i)?(i._center=o$1p.clone(n,i._center),i._ellipsoid=t$12.clone(r,i._ellipsoid),i._vertexFormat=n$13.clone(o,i._vertexFormat),i._semiMajorAxis=a,i._semiMinorAxis=s,i._rotation=l,i._stRotation=u,i._height=c,i._granularity=h,i._extrudedHeight=d,i._shadowVolume=f,i._offsetAttribute=-1===p?void 0:p,i):(k$G.height=c,k$G.extrudedHeight=d,k$G.granularity=h,k$G.stRotation=u,k$G.rotation=l,k$G.semiMajorAxis=a,k$G.semiMinorAxis=s,k$G.shadowVolume=f,k$G.offsetAttribute=-1===p?void 0:p,new Y$A(k$G))},Y$A.computeRectangle=function(e,t){var i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).center,n=u$Z(e.ellipsoid,t$12.WGS84),r=e.semiMajorAxis,o=e.semiMinorAxis,a=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),s=u$Z(e.rotation,0);if(o$1q.defined("options.center",i),o$1q.typeOf.number("options.semiMajorAxis",r),o$1q.typeOf.number("options.semiMinorAxis",o),r<o)throw new t$15("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(a<=0)throw new t$15("granularity must be greater than zero.");return Re$h(i,r,o,s,a,n,t)},Y$A.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,n=!e$2d.equalsEpsilon(t,i,0,e$2d.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var r,o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation};if(n)o.extrudedHeight=i,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=qe$9(o);else if(r=ke$b(o),e$2e(e._offsetAttribute)){var a=r.attributes.position.values.length,s=new Uint8Array(a/3);d$1s(s,e._offsetAttribute===_0x39c22a.NONE?0:1),r.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:s})}return new I$1p({attributes:r.attributes,indices:r.indices,primitiveType:W$18.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})}},Y$A.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new Y$A({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:r,rotation:e._rotation,stRotation:e._stRotation,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$13.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(Y$A.prototype,{rectangle:{get:function(){return e$2e(this._rectangle)||(this._rectangle=Re$h(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e$2e(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Qe$7(this)),this._textureCoordinateRotationPoints}}}),n$A.packedLength=Y$A.packedLength,n$A.pack=function(e,t,i){return o$1q.typeOf.object("value",e),Y$A.pack(e._ellipseGeometry,t,i)};var x$O=new Y$A({center:new o$1p,semiMajorAxis:1,semiMinorAxis:1}),t$B={center:new o$1p,radius:void 0,ellipsoid:t$12.clone(t$12.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new n$13,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};n$A.unpack=function(e,t,i){var n=Y$A.unpack(e,t,x$O);return t$B.center=o$1p.clone(n._center,t$B.center),t$B.ellipsoid=t$12.clone(n._ellipsoid,t$B.ellipsoid),t$B.height=n._height,t$B.extrudedHeight=n._extrudedHeight,t$B.granularity=n._granularity,t$B.vertexFormat=n$13.clone(n._vertexFormat,t$B.vertexFormat),t$B.stRotation=n._stRotation,t$B.shadowVolume=n._shadowVolume,e$2e(i)?(t$B.semiMajorAxis=n._semiMajorAxis,t$B.semiMinorAxis=n._semiMinorAxis,i._ellipseGeometry=new Y$A(t$B),i):(t$B.radius=n._semiMajorAxis,new n$A(t$B))},n$A.createGeometry=function(e){return Y$A.createGeometry(e._ellipseGeometry)},n$A.createShadowVolume=function(e,t,i){var n=e._ellipseGeometry._granularity,r=e._ellipseGeometry._ellipsoid,o=t(n,r),a=i(n,r);return new n$A({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:r,stRotation:e._ellipseGeometry._stRotation,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$13.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(n$A.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var V$C=new o$1p,g$S=new o$1p;function F$L(e){var t=e.center;g$S=o$1p.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,g$S),e.height,g$S);var i=new i$1d(g$S=o$1p.add(t,g$S,g$S),e.semiMajorAxis),n=C$L.computeEllipsePositions(e,!1,!0).outerPositions,r=u$Z(e.outlineWidth,1);r>1&&n.push(n[0],n[1],n[2]);var o=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:C$L.raisePositionsToHeight(n,e,!1)})});r>1&&(o.sideness=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:new Float32Array([0,0,0,1,1,1,1,0])}),o.sideness.isInstanceAttribute=!0);for(var a=n.length/3,s=ce$z.createTypedArray(a,2*a),l=0,u=0;u<a;++u)s[l++]=u,s[l++]=(u+1)%a;return{boundingSphere:i,attributes:o,indices:s}}var N$B=new i$1d,j$H=new i$1d;function Y$z(e){var t=e.center,i=e.ellipsoid,n=e.semiMajorAxis,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,V$C),e.height,V$C);N$B.center=o$1p.add(t,r,N$B.center),N$B.radius=n,r=o$1p.multiplyByScalar(i.geodeticSurfaceNormal(t,r),e.extrudedHeight,r),j$H.center=o$1p.add(t,r,j$H.center),j$H.radius=n;var o=C$L.computeEllipsePositions(e,!1,!0).outerPositions,a=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:C$L.raisePositionsToHeight(o,e,!0)})});o=a.position.values;var s=i$1d.union(N$B,j$H),l=o.length/3;if(e$2e(e.offsetAttribute)){var u=new Uint8Array(l);if(e.offsetAttribute===_0x39c22a.TOP)u=d$1s(u,1,0,l/2);else u=d$1s(u,e.offsetAttribute===_0x39c22a.NONE?0:1);a.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}var c=u$Z(e.numberOfVerticalLines,16);c=e$2d.clamp(c,0,l/2);var h=ce$z.createTypedArray(l,2*l+2*c);l/=2;var d,f,p=0;for(d=0;d<l;++d)h[p++]=d,h[p++]=(d+1)%l,h[p++]=d+l,h[p++]=(d+1)%l+l;if(c>0){var _=Math.min(c,l);f=Math.round(l/_);var m=Math.min(f*c,l);for(d=0;d<m;d+=f)h[p++]=d,h[p++]=d+l}return{boundingSphere:s,attributes:a,indices:h}}function M$K(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).center,i=u$Z(e.ellipsoid,t$12.WGS84),n=e.semiMajorAxis,r=e.semiMinorAxis,o=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE);if(!e$2e(t))throw new t$15("center is required.");if(!e$2e(n))throw new t$15("semiMajorAxis is required.");if(!e$2e(r))throw new t$15("semiMinorAxis is required.");if(n<r)throw new t$15("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(o<=0)throw new t$15("granularity must be greater than zero.");var a=u$Z(e.height,0),s=u$Z(e.extrudedHeight,a);this._center=o$1p.clone(t),this._semiMajorAxis=n,this._semiMinorAxis=r,this._ellipsoid=t$12.clone(i),this._rotation=u$Z(e.rotation,0),this._height=Math.max(s,a),this._granularity=o,this._extrudedHeight=Math.min(s,a),this._numberOfVerticalLines=Math.max(u$Z(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._outlineWidth=u$Z(e.outlineWidth,1),this._workerName="createEllipseOutlineGeometry"}M$K.packedLength=o$1p.packedLength+t$12.packedLength+9,M$K.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),o$1p.pack(e._center,t,i),i+=o$1p.packedLength,t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i++]=u$Z(e._offsetAttribute,-1),t[i]=e._outlineWidth,t};var B$G=new o$1p,q$O=new t$12,A$S={center:B$G,ellipsoid:q$O,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0,outlineWidth:void 0};function a$H(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).radius;o$1q.typeOf.number("radius",t);var i={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new M$K(i),this._workerName="createCircleOutlineGeometry"}M$K.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n=o$1p.unpack(e,t,B$G);t+=o$1p.packedLength;var r=t$12.unpack(e,t,q$O);t+=t$12.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=e[t];return e$2e(i)?(i._center=o$1p.clone(n,i._center),i._ellipsoid=t$12.clone(r,i._ellipsoid),i._semiMajorAxis=o,i._semiMinorAxis=a,i._rotation=s,i._height=l,i._granularity=u,i._extrudedHeight=c,i._numberOfVerticalLines=h,i._offsetAttribute=-1===d?void 0:d,i._outlineWidth=f,i):(A$S.height=l,A$S.extrudedHeight=c,A$S.granularity=u,A$S.rotation=s,A$S.semiMajorAxis=o,A$S.semiMinorAxis=a,A$S.numberOfVerticalLines=h,A$S.offsetAttribute=-1===d?void 0:d,A$S.outlineWidth=f,new M$K(A$S))},M$K.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,n=!e$2d.equalsEpsilon(t,i,0,e$2d.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var r,o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,outlineWidth:e._outlineWidth,numberOfVerticalLines:e._numberOfVerticalLines};if(n)o.extrudedHeight=i,o.offsetAttribute=e._offsetAttribute,r=Y$z(o);else if(r=F$L(o),e$2e(e._offsetAttribute)){var a=r.attributes.position.values.length,s=new Uint8Array(a/3);d$1s(s,e._offsetAttribute===_0x39c22a.NONE?0:1),r.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:s})}return new I$1p({attributes:r.attributes,indices:r.indices,primitiveType:e._outlineWidth>1?W$18.TRIANGLES:W$18.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})}},a$H.packedLength=M$K.packedLength,a$H.pack=function(e,t,i){return o$1q.typeOf.object("value",e),M$K.pack(e._ellipseGeometry,t,i)};var c$J=new M$K({center:new o$1p,semiMajorAxis:1,semiMinorAxis:1}),i$M={center:new o$1p,radius:void 0,ellipsoid:t$12.clone(t$12.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};a$H.unpack=function(e,t,i){var n=M$K.unpack(e,t,c$J);return i$M.center=o$1p.clone(n._center,i$M.center),i$M.ellipsoid=t$12.clone(n._ellipsoid,i$M.ellipsoid),i$M.height=n._height,i$M.extrudedHeight=n._extrudedHeight,i$M.granularity=n._granularity,i$M.numberOfVerticalLines=n._numberOfVerticalLines,e$2e(i)?(i$M.semiMajorAxis=n._semiMajorAxis,i$M.semiMinorAxis=n._semiMinorAxis,i._ellipseGeometry=new M$K(i$M),i):(i$M.radius=n._semiMajorAxis,new a$H(i$M))},a$H.createGeometry=function(e){return M$K.createGeometry(e._ellipseGeometry)};var e$11={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},tt$a=Object.freeze(e$11),e$10={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},g$R=Object.freeze(e$10);function u$H(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).currentTime,i=e.startTime,n=e.stopTime;if(t=e$2e(t)?a$15.clone(t):e$2e(i)?a$15.clone(i):e$2e(n)?a$15.addDays(n,-1,new a$15):a$15.now(),i=e$2e(i)?a$15.clone(i):a$15.clone(t),n=e$2e(n)?a$15.clone(n):a$15.addDays(i,1,new a$15),a$15.greaterThan(i,n))throw new t$15("startTime must come before stopTime.");this.startTime=i,this.stopTime=n,this.clockRange=u$Z(e.clockRange,tt$a.UNBOUNDED),this.canAnimate=u$Z(e.canAnimate,!0),this.onTick=new o$1h,this.onStop=new o$1h,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Et$c(),this.currentTime=t,this.multiplier=u$Z(e.multiplier,1),this.shouldAnimate=u$Z(e.shouldAnimate,!1),this.clockStep=u$Z(e.clockStep,g$R.SYSTEM_CLOCK_MULTIPLIER)}function S$G(e,t,i,n,r){this.aabb=e,this.axis=t,this.d=i,this.midStartIndex=n,this.rightStartIndex=r}function w$I(e,t,i,n){this.globalTriangleVertexIndices=e,this.firstTriangleIndex=t,this.positionAttribute=n,this._rayDirection=[0,0,0],this._rayOrigin=[0,0,0],this.bspNodeTree=[];var r=i-t,o=65535>=r?new Uint16Array(r):new Uint32Array(r);this.indices=o;for(var a=0;a<r;++a)o[a]=a;var s=H$M(e,t,i,n.data,n.stride),l=e$2d.clamp(Math.log2(r/40),2,10),u=(e,t,i)=>{var n,r=Q$H(o,s,e,t),a=t-e;if(a<=40)return n=new S$G(r,0,0,e,t),this.bspNodeTree.push(n),n;var c=J$D(r),h=K$G(o,s,e,t,c.axis,c.midValue),d=(e,t)=>{if(!(i>l)){var n=t-e;if(!(40>n||n>=.8*a))return u(e,t,i+1)}};return n=new S$G(r,c.axis,c.midValue,h.next,h.mid),this.bspNodeTree.push(n),n.leftNode=d(e,h.next),n.rightNode=d(h.mid,t),n};u(0,r,0),this.triangleVertexIndices=G$R(o,e,t,r)}Object.defineProperties(u$H.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){a$15.equals(this._currentTime,e)||(this._clockStep===g$R.SYSTEM_CLOCK&&(this._clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===g$R.SYSTEM_CLOCK&&(this._clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===g$R.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=a$15.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===g$R.SYSTEM_CLOCK&&(this._clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}}),u$H.prototype.tick=function(){var e=Et$c(),t=a$15.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){var i=this._clockStep;if(i===g$R.SYSTEM_CLOCK)t=a$15.now(t);else{var n=this._multiplier;if(i===g$R.TICK_DEPENDENT)t=a$15.addSeconds(t,n,t);else{var r=e-this._lastSystemTime;t=a$15.addSeconds(t,n*(r/1e3),t)}var o=this.clockRange,a=this.startTime,s=this.stopTime;if(o===tt$a.CLAMPED)a$15.lessThan(t,a)?t=a$15.clone(a,t):a$15.greaterThan(t,s)&&(t=a$15.clone(s,t),this.onStop.raiseEvent(this));else if(o===tt$a.LOOP_STOP)for(a$15.lessThan(t,a)&&(t=a$15.clone(a,t));a$15.greaterThan(t,s);)t=a$15.addSeconds(a,a$15.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t},Object.defineProperties(w$I.prototype,{estimatedMemoryUsage:{get:function(){return this.triangleVertexIndices.byteLength+this.indices.byteLength}}});var R$G=[1/0,1/0,1/0],V$B=[-1/0,-1/0,-1/0];w$I.numFacesTested=0,w$I.componentMinimalSizeForIntersectionData=200;var E$M=new o$1p,z$J=new o$1p,O$y=new o$1p,F$K=new o$1p,C$K=new o$1p,L$R=new o$1p,k$F=new o$1p,U$K=new o$1p;function Q$H(e,t,i,n){if(n<=i)return new e$29(new o$1p(NaN,NaN,NaN),new o$1p(NaN,NaN,NaN));for(var r=6*e[i],o=0;o<3;++o)R$G[o]=t[r+0+o],V$B[o]=t[r+3+o];for(i+=1;i<n;++i)for(r=6*e[i],o=0;o<3;++o)R$G[o]=Math.min(R$G[o],t[r+0+o]),V$B[o]=Math.max(V$B[o],t[r+3+o]);return new e$29(new o$1p(R$G[0],R$G[1],R$G[2]),new o$1p(V$B[0],V$B[1],V$B[2]))}function G$R(e,t,i,n){for(var r=n-i,o=0,a=[],s=i;s<n;++s)for(var l=0;l<3;++l)o=Math.max(t[3*s+l],o);for(a=65535>=o?new Uint16Array(3*r):new Uint32Array(3*r),o=0;o<r;++o)for(var u=3*(e[o]+i),c=0;c<3;++c)a[3*o+c]=t[u+c];return a}function H$M(e,t,i,n,r){i-=t;for(var o=new Float32Array(6*i),a=0;a<i;++a){var s=3*(a+t);const i=e[s]*r,u=e[s+1]*r,c=e[s+2]*r;for(var l=0;l<3;++l){const e=n[i+l],t=n[u+l],r=n[c+l];o[6*a+l]=Math.min(e,t,r),o[6*a+3+l]=Math.max(e,t,r)}}return o}function J$D(e){var t=o$1p.packArray([e.minimum,e.maximum]),i=t[3]-t[0],n=t[4]-t[1],r=t[5]-t[2],o=i>n?i>r?0:n>r?1:2:n>r?1:r>i?2:0;return{axis:o,midValue:(t[o]+t[o+3])/2}}function K$G(e,t,i,n,r,o){for(var a=n,s=0;i<a;)t[6*(s=e[i])+r+3]<=o?++i:(--a,e[i]=e[a],e[a]=s);for(s=i,a=n;s<a;)t[6*(n=e[a-1])+r]>=o?--a:(e[a-1]=e[s],e[s]=n,++s);return{next:i,mid:s}}function W$M(e,t,i){for(var n=0,r=1/0,o=0;3>o;++o){var a=o$1p.packArray([e.minimum,e.maximum]),s=a[o];if(t[o]<s){if(1e-6>=i[o])return!1;n=Math.max(n,(s-t[o])/i[o])}else-1e-6>=i[o]&&(r=Math.min(r,(s-t[o])/i[o]));if(n>r)return!1;if(s=a[o+3],t[o]>s){if(-1e-6<=i[o])return!1;n=Math.max(n,(s-t[o])/i[o])}else 1e-6<=i[o]&&(r=Math.min(r,(s-t[o])/i[o]));if(n>r)return!1}return!0}w$I.prototype.intersectRayTriangleRange=function(e,t){if(!(e>=t)){for(var i=this.triangleVertexIndices,n=this.positionAttribute.data,r=this.positionAttribute.stride,o=new o$1p(this._rayOrigin[0],this._rayOrigin[1],this._rayOrigin[2]),a=new o$1p(this._rayDirection[0],this._rayDirection[1],this._rayDirection[2]),s=e,l=3*e;s<t;++s){var u=i[l++]*r,c=o$1p.fromElements(n[u++],n[u++],n[u],L$R);u=i[l++]*r;var h=o$1p.fromElements(n[u++],n[u++],n[u],k$F);u=i[l++]*r;var d,f,p,_,m,g=o$1p.fromElements(n[u++],n[u++],n[u],U$K),x=o$1p.subtract(h,c,E$M),y=o$1p.subtract(g,c,z$J),v=o$1p.cross(a,y,O$y),$=o$1p.dot(x,v);if(!(Math.abs($)<=Number.EPSILON)){if(d=o$1p.subtract(o,c,F$K),p=o$1p.dot(d,v),0<$){if(0>p||p>$)continue}else if(0<p||p<$)continue;if(f=o$1p.cross(d,x,C$K),_=o$1p.dot(a,f),0<$){if(0>_||p+_>$)continue}else if(0<_||p+_<$)continue;if(0<=(m=o$1p.dot(y,f)/$)){var b=this.indices[s]+this.firstTriangleIndex,T=o$1p.cross(x,y,O$y);T=o$1p.normalize(T,O$y),this._callback(m,T,b,!1)}}}w$I.numFacesTested+=t-e}},w$I.prototype.intersectRay=function(e,t){w$I.numFacesTested=0;var i=e.origin,n=e.direction,r=n.x,o=n.y,a=n.z;if(r*r+o*o+a*a>e$2d.EPSILON6){this._rayOrigin[0]=i.x,this._rayOrigin[1]=i.y,this._rayOrigin[2]=i.z,this._rayDirection[0]=r,this._rayDirection[1]=o,this._rayDirection[2]=a;var s=this.triangleVertexIndices.length/3;this._callback=t,this.intersectRayBSP(this.bspNodeTree[0],0,s)}},w$I.prototype.intersectRayBSP=function(e,t,i){var n=this._rayOrigin,r=this._rayDirection;if(W$M(e.aabb,n,r)){var o=e.axis,a=e.d;if(n[o]<a||0>r[o]){const i=e.midStartIndex;if(t<i){const n=e.leftNode;void 0!==n?this.intersectRayBSP(n,t,i):this.intersectRayTriangleRange(t,i)}}this.intersectRayTriangleRange(e.midStartIndex,e.rightStartIndex),(n[o]>a||0<r[o])&&((t=e.rightStartIndex)<i&&(void 0!==(e=e.rightNode)?this.intersectRayBSP(e,t,i):this.intersectRayTriangleRange(t,i)))}};const e$$={Webgl1:1,Webgl2:2,WebGPU:3};var Me$j=Object.freeze(e$$),g$Q={},B$F=new o$1p,C$J=new o$1p,y$H=new o$1p,P$I=new o$1p,M$J=new y$Y;function w$H(e,t,i,n,r){var o=o$1p.subtract(e,t,B$F),a=o$1p.dot(i,o),s=o$1p.dot(n,o);return o$1o.fromElements(a,s,r)}g$Q.validOutline=function(e){o$1q.defined("positions",e);var t=y$Y.fromPoints(e,M$J).halfAxes,i=p$1e.getColumn(t,0,C$J),n=p$1e.getColumn(t,1,y$H),r=p$1e.getColumn(t,2,P$I),o=o$1p.magnitude(i),a=o$1p.magnitude(n),s=o$1p.magnitude(r);return!(0===o&&(0===a||0===s)||0===a&&0===s)},g$Q.computeProjectTo2DArguments=function(e,t,i,n){o$1q.defined("positions",e),o$1q.defined("centerResult",t),o$1q.defined("planeAxis1Result",i),o$1q.defined("planeAxis2Result",n);var r,o,a=y$Y.fromPoints(e,M$J),s=a.halfAxes,l=p$1e.getColumn(s,0,C$J),u=p$1e.getColumn(s,1,y$H),c=p$1e.getColumn(s,2,P$I),h=o$1p.magnitude(l),d=o$1p.magnitude(u),f=o$1p.magnitude(c),p=Math.min(h,d,f);return(0!==h||0!==d&&0!==f)&&(0!==d||0!==f)&&((p===d||p===f)&&(r=l),p===h?r=u:p===f&&(o=u),(p===h||p===d)&&(o=c),o$1p.normalize(r,i),o$1p.normalize(o,n),o$1p.clone(a.center,t),!0)},g$Q.createProjectPointsTo2DFunction=function(e,t,i){return function(n){for(var r=new Array(n.length),o=0;o<n.length;o++)r[o]=w$H(n[o],e,t,i);return r}},g$Q.createProjectPointTo2DFunction=function(e,t,i){return function(n,r){return w$H(n,e,t,i,r)}};var ce$m=new o$1p,pe$q=new f$1a,se$o=new o$1o,me$q=new o$1o,le$p=new o$1p,ve$k=new o$1p,fe$o=new o$1p,C$I=new o$1p,ye$h=new o$1p,he$l=new o$1p,W$L=new n$15,ue$q=new p$1e,de$m=new p$1e,ge$j=new o$1p;function we$h(e,t,i,n,r,o,a,s){var l=e.positions,u=A$1f.triangulate(e.positions2D,e.holes);u.length<3&&(u=[0,1,2]);var c=ce$z.createTypedArray(l.length,u.length);c.set(u);var h=ue$q;if(0!==n){var d=n$15.fromAxisAngle(o,n,W$L);if(h=p$1e.fromQuaternion(d,h),t.tangent||t.bitangent){d=n$15.fromAxisAngle(o,-n,W$L);var f=p$1e.fromQuaternion(d,de$m);a=o$1p.normalize(p$1e.multiplyByVector(f,a,a),a),t.bitangent&&(s=o$1p.normalize(o$1p.cross(o,a,s),s))}}else h=p$1e.clone(p$1e.IDENTITY,h);var p=me$q;t.st&&(p.x=i.x,p.y=i.y);for(var _=l.length,m=3*_,g=new Float64Array(m),x=t.normal?new Float32Array(m):void 0,y=t.tangent?new Float32Array(m):void 0,v=t.bitangent?new Float32Array(m):void 0,$=t.st?new Float32Array(2*_):void 0,b=0,T=0,C=0,S=0,w=0,E=0;E<_;E++){var P=l[E];if(g[b++]=P.x,g[b++]=P.y,g[b++]=P.z,t.st){var A=r(p$1e.multiplyByVector(h,P,ce$m),se$o);o$1o.subtract(A,p,A);var L=e$2d.clamp(A.x/i.width,0,1),M=e$2d.clamp(A.y/i.height,0,1);$[w++]=L,$[w++]=M}t.normal&&(x[T++]=o.x,x[T++]=o.y,x[T++]=o.z),t.tangent&&(y[S++]=a.x,y[S++]=a.y,y[S++]=a.z),t.bitangent&&(v[C++]=s.x,v[C++]=s.y,v[C++]=s.z)}var R=new a$_;return t.position&&(R.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:g})),t.normal&&(R.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:x})),t.tangent&&(R.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:y})),t.bitangent&&(R.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:v})),t.st&&(R.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:$})),new I$1p({attributes:R,indices:c,primitiveType:W$18.TRIANGLES})}function P$H(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).polygonHierarchy;o$1q.defined("options.polygonHierarchy",t);var i=u$Z(e.vertexFormat,n$13.DEFAULT);this._vertexFormat=n$13.clone(i),this._polygonHierarchy=t,this._stRotation=u$Z(e.stRotation,0),this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._workerName="createCoplanarPolygonGeometry",this.packedLength=y$Z.computeHierarchyPackedLength(t)+n$13.packedLength+t$12.packedLength+2}P$H.fromPositions=function(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new P$H({polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid})},P$H.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),i=y$Z.packPolygonHierarchy(e._polygonHierarchy,t,i),t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._stRotation,t[i]=e.packedLength,t};var Pe$g=t$12.clone(t$12.UNIT_SPHERE),Ae$k=new n$13,be$m={polygonHierarchy:{}};function T$J(e){for(var t=e.length,i=new Float64Array(3*t),n=ce$z.createTypedArray(t,2*t),r=0,o=0,a=0;a<t;a++){var s=e[a];i[r++]=s.x,i[r++]=s.y,i[r++]=s.z,n[o++]=a,n[o++]=(a+1)%t}return new I$1p({attributes:new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:i})}),indices:n,primitiveType:W$18.LINES})}function a$G(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).polygonHierarchy;o$1q.defined("options.polygonHierarchy",t),this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=y$Z.computeHierarchyPackedLength(t)+1}P$H.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=y$Z.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=t$12.unpack(e,t,Pe$g);t+=t$12.packedLength;var o=n$13.unpack(e,t,Ae$k);t+=n$13.packedLength;var a=e[t++],s=e[t];return e$2e(i)||(i=new P$H(be$m)),i._polygonHierarchy=n,i._ellipsoid=t$12.clone(r,i._ellipsoid),i._vertexFormat=n$13.clone(o,i._vertexFormat),i._stRotation=a,i.packedLength=s,i},P$H.createGeometry=function(e){var t=e._vertexFormat,i=e._polygonHierarchy,n=e._stRotation,r=i.positions;if(!((r=D$13(r,o$1p.equalsEpsilon,!0)).length<3)){var o=le$p,a=ve$k,s=fe$o,l=ye$h,u=he$l;if(g$Q.computeProjectTo2DArguments(r,C$I,l,u)){if(o=o$1p.cross(l,u,o),o=o$1p.normalize(o,o),!o$1p.equalsEpsilon(C$I,o$1p.ZERO,e$2d.EPSILON6)){var c=e._ellipsoid.geodeticSurfaceNormal(C$I,ge$j);o$1p.dot(o,c)<0&&(o=o$1p.negate(o,o),l=o$1p.negate(l,l))}var h=g$Q.createProjectPointsTo2DFunction(C$I,l,u),d=g$Q.createProjectPointTo2DFunction(C$I,l,u);t.tangent&&(a=o$1p.clone(l,a)),t.bitangent&&(s=o$1p.clone(u,s));var f=y$Z.polygonsFromHierarchy(i,h,!1),p=f.hierarchy,_=f.polygons;if(0!==p.length){r=p[0].outerRing;for(var m=i$1d.fromPoints(r),g=y$Z.computeBoundingRectangle(o,d,r,n,pe$q),x=[],y=0;y<_.length;y++){var v=new d$1o({geometry:we$h(_[y],t,g,n,d,o,a,s)});x.push(v)}var $=k$14.combineInstances(x)[0];$.attributes.position.values=new Float64Array($.attributes.position.values),$.indices=ce$z.createTypedArray($.attributes.position.values.length/3,$.indices);var b=$.attributes;return t.position||delete b.position,new I$1p({attributes:b,indices:$.indices,primitiveType:$.primitiveType,boundingSphere:m})}}}},a$G.fromPositions=function(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.positions",e.positions),new a$G({polygonHierarchy:{positions:e.positions}})},a$G.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i=y$Z.packPolygonHierarchy(e._polygonHierarchy,t,i)]=e.packedLength,t};var C$H={polygonHierarchy:{}};a$G.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=y$Z.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var r=e[t];return e$2e(i)||(i=new a$G(C$H)),i._polygonHierarchy=n,i.packedLength=r,i},a$G.createGeometry=function(e){var t=e._polygonHierarchy,i=t.positions;if(!((i=D$13(i,o$1p.equalsEpsilon,!0)).length<3)&&g$Q.validOutline(i)){var n=y$Z.polygonOutlinesFromHierarchy(t,!1);if(0!==n.length){for(var r=[],o=0;o<n.length;o++){var a=new d$1o({geometry:T$J(n[o])});r.push(a)}var s=k$14.combineInstances(r)[0],l=i$1d.fromPoints(t.positions);return new I$1p({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:l})}}};var e$_={ROUNDED:0,MITERED:1,BEVELED:2},ar$6=Object.freeze(e$_),g$P=[new o$1p,new o$1p],hr$3=new o$1p,gr$3=new o$1p,dr$2=new o$1p,pr$3=new o$1p,wr$3=new o$1p,Sr$2=new o$1p,Br$3=new o$1p,xr$4=new o$1p,Er$3=new o$1p,X$G=new o$1p,er$8=new o$1p,J$C={},ur$3=new a$18;function Tr$3(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++){var r=e[n];ur$3=t.cartesianToCartographic(r,ur$3),i[n]=ur$3.height,e[n]=t.scaleToGeodeticSurface(r,r)}return i}function $$F(e,t,i,n){var r,o=e[0],a=e[1],s=o$1p.angleBetween(o,a),l=Math.ceil(s/n),u=new Array(l);if(t===i){for(r=0;r<l;r++)u[r]=t;return u.push(i),u}var c=(i-t)/l;for(r=1;r<l;r++){var h=t+r*c;u[r]=h}return u[0]=t,u.push(i),u}var nr$6=new o$1p,tr$6=new o$1p;function zr$4(e,t,i,n){var r=new f$16(i,n),o=r.projectPointOntoPlane(o$1p.add(i,e,nr$6),nr$6),a=r.projectPointOntoPlane(o$1p.add(i,t,tr$6),tr$6),s=o$1o.angleBetween(o,a);return a.x*o.y-a.y*o.x>=0?-s:s}var Ar$2=new o$1p(-1,0,0),D$F=p$1d.clone(p$1d.IDENTITY),Cr$3=new p$1d,R$F=new p$1e,Nr$2=p$1e.IDENTITY.clone(),Fr$2=new o$1p,Lr$3=new e$2c,vr$4=new o$1p;function I$V(e,t,i,n,r,o,a,s){var l=Fr$2,u=Lr$3;D$F=m$19.eastNorthUpToFixedFrame(e,r,D$F),l=p$1d.multiplyByPointAsVector(D$F,Ar$2,l);var c=zr$4(l=o$1p.normalize(l,l),t,e,r);R$F=p$1e.fromRotationZ(c,R$F),vr$4.z=o,D$F=p$1d.multiplyTransformation(D$F,p$1d.fromRotationTranslation(R$F,vr$4,Cr$3),D$F);var h=Nr$2;h[0]=a;for(var d=0;d<s;d++)for(var f=0;f<i.length;f+=3)u=o$1p.fromArray(i,f,u),u=p$1e.multiplyByVector(h,u,u),u=p$1d.multiplyByPoint(D$F,u,u),n.push(u.x,u.y,u.z);return n}function k$E(e,t,i,n,r,o,a,s,l){var u=Fr$2,c=Lr$3;D$F=m$19.eastNorthUpToFixedFrame(e,r,D$F),u=p$1d.multiplyByPointAsVector(D$F,Ar$2,u);var h=zr$4(u=o$1p.normalize(u,u),t,e,r);R$F=p$1e.fromRotationZ(h,R$F),vr$4.z=o,D$F=p$1d.multiplyTransformation(D$F,p$1d.fromRotationTranslation(R$F,vr$4,Cr$3),D$F);var d=Nr$2;d[0]=a;for(var f=0;f<s;f++)for(var p=0;p<i.length;p+=3)c=o$1p.fromArray(i,p,c),c=p$1e.multiplyByVector(d,c,c),c=p$1d.multiplyByPoint(D$F,c,c),c=p$1d.multiplyByPoint(l,c,c),n.push(c.x,c.y,c.z);return n}var Dr$2=new o$1p;function rr$8(e,t,i,n,r,o,a){for(var s=0;s<e.length;s+=3){n=I$V(o$1p.fromArray(e,s,Dr$2),t,i,n,r,o[s/3],a,1)}return n}function Ir$5(e,t,i,n,r,o,a,s){for(var l=0;l<e.length;l+=3){n=k$E(o$1p.fromArray(e,l,Dr$2),t,i,n,r,o[l/3],a,1,s)}return n}function Vr$2(e,t){var i=e.length,n=new Array(6*i),r=0,o=t.x+t.width/2,a=t.y+t.height/2,s=e[0];n[r++]=s.x-o,n[r++]=0,n[r++]=s.y-a;for(var l=1;l<i;l++){var u=(s=e[l]).x-o,c=s.y-a;n[r++]=u,n[r++]=0,n[r++]=c,n[r++]=u,n[r++]=0,n[r++]=c}return s=e[0],n[r++]=s.x-o,n[r++]=0,n[r++]=s.y-a,n}function lr$5(e,t){for(var i=e.length,n=new Array(3*i),r=0,o=t.x+t.width/2,a=t.y+t.height/2,s=0;s<i;s++)n[r++]=e[s].x-o,n[r++]=0,n[r++]=e[s].y-a;return n}var Mr$4=new n$15,Or$2=new o$1p,Gr$2=new p$1e;function or$5(e,t,i,n,r,o,a,s,l,u){var c,h,d=o$1p.angleBetween(o$1p.subtract(t,e,X$G),o$1p.subtract(i,e,er$8)),f=n===ar$6.BEVELED?0:Math.ceil(d/e$2d.toRadians(5));if(c=r?p$1e.fromQuaternion(n$15.fromAxisAngle(o$1p.negate(e,X$G),d/(f+1),Mr$4),Gr$2):p$1e.fromQuaternion(n$15.fromAxisAngle(e,d/(f+1),Mr$4),Gr$2),t=o$1p.clone(t,Or$2),f>0)for(var p=u?2:1,_=0;_<f;_++)t=p$1e.multiplyByVector(c,t,t),h=o$1p.subtract(t,e,X$G),h=o$1p.normalize(h,h),r||(h=o$1p.negate(h,h)),a=I$V(o.scaleToGeodeticSurface(t,er$8),h,s,a,o,l,1,p);else h=o$1p.subtract(t,e,X$G),h=o$1p.normalize(h,h),r||(h=o$1p.negate(h,h)),a=I$V(o.scaleToGeodeticSurface(t,er$8),h,s,a,o,l,1,1),i=o$1p.clone(i,Or$2),h=o$1p.subtract(i,e,X$G),h=o$1p.normalize(h,h),r||(h=o$1p.negate(h,h)),a=I$V(o.scaleToGeodeticSurface(i,er$8),h,s,a,o,l,1,1);return a}J$C.removeDuplicatesFromShape=function(e){for(var t=e.length,i=[],n=t-1,r=0;r<t;n=r++){var o=e[n],a=e[r];o$1o.equals(o,a)||i.push(a)}return i},J$C.angleIsGreaterThanPi=function(e,t,i,n){var r=new f$16(i,n),o=r.projectPointOntoPlane(o$1p.add(i,e,nr$6),nr$6),a=r.projectPointOntoPlane(o$1p.add(i,t,tr$6),tr$6);return a.x*o.y-a.y*o.x>=0};var Ur$4=new o$1p,_r$3=new o$1p;J$C.computePositions=function(e,t,i,n,r){var o=n._ellipsoid,a=Tr$3(e,o),s=n._granularity,l=n._cornerType,u=r?Vr$2(t,i):lr$5(t,i),c=r?lr$5(t,i):void 0,h=i.height/2,d=i.width/2,f=e.length,p=[],_=r?[]:void 0,m=hr$3,g=gr$3,x=dr$2,y=pr$3,v=wr$3,$=Sr$2,b=Br$3,T=xr$4,C=Er$3,S=e[0],w=e[1];y=o.geodeticSurfaceNormal(S,y),m=o$1p.subtract(w,S,m),m=o$1p.normalize(m,m),T=o$1p.cross(y,m,T),T=o$1p.normalize(T,T);var E=a[0],P=a[1];r&&(_=I$V(S,T,c,_,o,E+h,1,1)),C=o$1p.clone(S,C),S=w,g=o$1p.negate(m,g);for(var A,L=1;L<f-1;L++){var M=r?2:1;w=e[L+1],m=o$1p.subtract(w,S,m),m=o$1p.normalize(m,m),x=o$1p.add(m,g,x),x=o$1p.normalize(x,x),y=o.geodeticSurfaceNormal(S,y);var R=o$1p.multiplyByScalar(y,o$1p.dot(m,y),Ur$4);o$1p.subtract(m,R,R),o$1p.normalize(R,R);var O=o$1p.multiplyByScalar(y,o$1p.dot(g,y),_r$3);if(o$1p.subtract(g,O,O),o$1p.normalize(O,O),!e$2d.equalsEpsilon(Math.abs(o$1p.dot(R,O)),1,e$2d.EPSILON7)){x=o$1p.cross(x,y,x),x=o$1p.cross(y,x,x),x=o$1p.normalize(x,x);var D=1/Math.max(.25,o$1p.magnitude(o$1p.cross(x,g,X$G))),I=J$C.angleIsGreaterThanPi(m,g,S,o);I?(v=o$1p.add(S,o$1p.multiplyByScalar(x,D*d,x),v),$=o$1p.add(v,o$1p.multiplyByScalar(T,d,$),$),g$P[0]=o$1p.clone(C,g$P[0]),g$P[1]=o$1p.clone($,g$P[1]),A=$$F(g$P,E+h,P+h,s),p=rr$8(m$X.generateArc({positions:g$P,granularity:s,ellipsoid:o}),T,u,p,o,A,1),T=o$1p.cross(y,m,T),T=o$1p.normalize(T,T),b=o$1p.add(v,o$1p.multiplyByScalar(T,d,b),b),l===ar$6.ROUNDED||l===ar$6.BEVELED?or$5(v,$,b,l,I,o,p,u,P+h,r):p=I$V(S,x=o$1p.negate(x,x),u,p,o,P+h,D,M),C=o$1p.clone(b,C)):(v=o$1p.add(S,o$1p.multiplyByScalar(x,D*d,x),v),$=o$1p.add(v,o$1p.multiplyByScalar(T,-d,$),$),g$P[0]=o$1p.clone(C,g$P[0]),g$P[1]=o$1p.clone($,g$P[1]),A=$$F(g$P,E+h,P+h,s),p=rr$8(m$X.generateArc({positions:g$P,granularity:s,ellipsoid:o}),T,u,p,o,A,1),T=o$1p.cross(y,m,T),T=o$1p.normalize(T,T),b=o$1p.add(v,o$1p.multiplyByScalar(T,-d,b),b),l===ar$6.ROUNDED||l===ar$6.BEVELED?or$5(v,$,b,l,I,o,p,u,P+h,r):p=I$V(S,x,u,p,o,P+h,D,M),C=o$1p.clone(b,C)),g=o$1p.negate(m,g)}else p=I$V(C,T,u,p,o,E+h,1,1),C=S;E=P,P=a[L+1],S=w}g$P[0]=o$1p.clone(C,g$P[0]),g$P[1]=o$1p.clone(S,g$P[1]),A=$$F(g$P,E+h,P+h,s),p=rr$8(m$X.generateArc({positions:g$P,granularity:s,ellipsoid:o}),T,u,p,o,A,1),r&&(_=I$V(S,T,c,_,o,P+h,1,1)),f=p.length;var B=r?f+_.length:f,F=new Float64Array(B);return F.set(p),r&&F.set(_,f),F},J$C.computeLocalPositions=function(e,t,i,n,r,o){var a=n._ellipsoid,s=Tr$3(e,a),l=n._granularity,u=n._cornerType,c=r?Vr$2(t,i):lr$5(t,i),h=r?lr$5(t,i):void 0,d=i.width/2,f=e.length,p=[],_=r?[]:void 0,m=hr$3,g=gr$3,x=dr$2,y=pr$3,v=wr$3,$=Sr$2,b=Br$3,T=xr$4,C=Er$3,S=m$19.eastNorthUpToFixedFrame(o,a,new p$1d),w=p$1d.inverse(S,new p$1d),E=e[0],P=e[1];y=a.geodeticSurfaceNormal(E,y),m=o$1p.subtract(P,E,m),m=o$1p.normalize(m,m),T=o$1p.cross(y,m,T),T=o$1p.normalize(T,T);var A=s[0],L=s[1];r&&(_=k$E(E,T,h,_,a,A+0,1,1,w)),C=o$1p.clone(E,C),E=P,g=o$1p.negate(m,g);for(var M,R=1;R<f-1;R++){var O=r?2:1;P=e[R+1],m=o$1p.subtract(P,E,m),m=o$1p.normalize(m,m),x=o$1p.add(m,g,x),x=o$1p.normalize(x,x),y=a.geodeticSurfaceNormal(E,y);var D=o$1p.multiplyByScalar(y,o$1p.dot(m,y),Ur$4);o$1p.subtract(m,D,D),o$1p.normalize(D,D);var I=o$1p.multiplyByScalar(y,o$1p.dot(g,y),_r$3);if(o$1p.subtract(g,I,I),o$1p.normalize(I,I),!e$2d.equalsEpsilon(Math.abs(o$1p.dot(D,I)),1,e$2d.EPSILON7)){x=o$1p.cross(x,y,x),x=o$1p.cross(y,x,x),x=o$1p.normalize(x,x);var B=1/Math.max(.25,o$1p.magnitude(o$1p.cross(x,g,X$G))),F=J$C.angleIsGreaterThanPi(m,g,E,a);F?(v=o$1p.add(E,o$1p.multiplyByScalar(x,B*d,x),v),$=o$1p.add(v,o$1p.multiplyByScalar(T,d,$),$),g$P[0]=o$1p.clone(C,g$P[0]),g$P[1]=o$1p.clone($,g$P[1]),M=$$F(g$P,A+0,L+0,l),p=rr$8(m$X.generateArc({positions:g$P,granularity:l,ellipsoid:a}),T,c,p,a,M,1,fromEnu),T=o$1p.cross(y,m,T),T=o$1p.normalize(T,T),b=o$1p.add(v,o$1p.multiplyByScalar(T,d,b),b),u===ar$6.ROUNDED||u===ar$6.BEVELED?or$5(v,$,b,u,F,a,p,c,L+0,r):p=k$E(E,x=o$1p.negate(x,x),c,p,a,L+0,B,O,w),C=o$1p.clone(b,C)):(v=o$1p.add(E,o$1p.multiplyByScalar(x,B*d,x),v),$=o$1p.add(v,o$1p.multiplyByScalar(T,-d,$),$),g$P[0]=o$1p.clone(C,g$P[0]),g$P[1]=o$1p.clone($,g$P[1]),M=$$F(g$P,A+0,L+0,l),p=rr$8(m$X.generateArc({positions:g$P,granularity:l,ellipsoid:a}),T,c,p,a,M,1),T=o$1p.cross(y,m,T),T=o$1p.normalize(T,T),b=o$1p.add(v,o$1p.multiplyByScalar(T,-d,b),b),u===ar$6.ROUNDED||u===ar$6.BEVELED?or$5(v,$,b,u,F,a,p,c,L+0,r):p=k$E(E,x,c,p,a,L+0,B,O,w),C=o$1p.clone(b,C)),g=o$1p.negate(m,g)}else p=k$E(C,T,c,p,a,A+0,1,1,w),C=E;A=L,L=s[R+1],E=P}g$P[0]=o$1p.clone(C,g$P[0]),g$P[1]=o$1p.clone(E,g$P[1]),M=$$F(g$P,A+0,L+0,l),p=Ir$5(m$X.generateArc({positions:g$P,granularity:l,ellipsoid:a}),T,c,p,a,M,1,w),r&&(_=k$E(E,T,h,_,a,L+0,1,1,w)),f=p.length;var N=r?f+_.length:f,G=new Float64Array(N);return G.set(p),r&&G.set(_,f),G};var b$R={},A$R=new o$1p,H$L=new o$1p,P$G=new o$1p,I$U=new o$1p,g$O=[new o$1p,new o$1p],J$B=new o$1p,K$F=new o$1p,W$K=new o$1p,rr$7=new o$1p,ar$5=new o$1p,er$7=new o$1p,nr$5=new o$1p,ir$6=new o$1p,lr$4=new o$1p,tr$5=new o$1p,X$F=new n$15,Y$y=new p$1e;function V$A(e,t,i,n,r){var o,a=o$1p.angleBetween(o$1p.subtract(t,e,A$R),o$1p.subtract(i,e,H$L)),s=n===ar$6.BEVELED?1:Math.ceil(a/e$2d.toRadians(5))+1,l=3*s,u=new Array(l);u[l-3]=i.x,u[l-2]=i.y,u[l-1]=i.z,o=r?p$1e.fromQuaternion(n$15.fromAxisAngle(o$1p.negate(e,A$R),a/s,X$F),Y$y):p$1e.fromQuaternion(n$15.fromAxisAngle(e,a/s,X$F),Y$y);var c=0;t=o$1p.clone(t,A$R);for(var h=0;h<s;h++)t=p$1e.multiplyByVector(o,t,t),u[c++]=t.x,u[c++]=t.y,u[c++]=t.z;return u}function or$4(e){var t=J$B,i=K$F,n=W$K,r=e[1];i=o$1p.fromArray(e[1],r.length-3,i),n=o$1p.fromArray(e[0],0,n);var o=V$A(t=o$1p.midpoint(i,n,t),i,n,ar$6.ROUNDED,!1),a=e.length-1,s=e[a-1];return r=e[a],i=o$1p.fromArray(s,s.length-3,i),n=o$1p.fromArray(r,0,n),[o,V$A(t=o$1p.midpoint(i,n,t),i,n,ar$6.ROUNDED,!1)]}function Z$F(e,t,i,n){var r=A$R;return n||(t=o$1p.negate(t,t)),[(r=o$1p.add(e,t,r)).x,r.y,r.z,i.x,i.y,i.z]}function q$N(e,t,i,n){for(var r=new Array(e.length),o=new Array(e.length),a=o$1p.multiplyByScalar(t,i,A$R),s=o$1p.negate(a,H$L),l=0,u=e.length-1,c=0;c<e.length;c+=3){var h=o$1p.fromArray(e,c,P$G),d=o$1p.add(h,s,I$U);r[l++]=d.x,r[l++]=d.y,r[l++]=d.z;var f=o$1p.add(h,a,I$U);o[u--]=f.z,o[u--]=f.y,o[u--]=f.x}return n.push(r,o),n}b$R.addAttribute=function(e,t,i,n){var r=t.x,o=t.y,a=t.z;e$2e(i)&&(e[i]=r,e[i+1]=o,e[i+2]=a),e$2e(n)&&(e[n]=a,e[n-1]=o,e[n-2]=r)};var vr$3=new o$1p,sr$5=new o$1p;b$R.computePositions=function(e){var t=e.granularity,i=e.positions,n=e.ellipsoid,r=e.width/2,o=e.cornerType,a=e.saveAttributes,s=J$B,l=K$F,u=W$K,c=rr$7,h=ar$5,d=er$7,f=nr$5,p=ir$6,_=lr$4,m=tr$5,g=[],x=a?[]:void 0,y=a?[]:void 0,v=i[0],$=i[1];l=o$1p.normalize(o$1p.subtract($,v,l),l),s=n.geodeticSurfaceNormal(v,s),c=o$1p.normalize(o$1p.cross(s,l,c),c),a&&(x.push(c.x,c.y,c.z),y.push(s.x,s.y,s.z)),f=o$1p.clone(v,f),v=$,u=o$1p.negate(l,u);var b,T,C=[],S=i.length;for(b=1;b<S-1;b++){s=n.geodeticSurfaceNormal(v,s),$=i[b+1],l=o$1p.normalize(o$1p.subtract($,v,l),l),h=o$1p.normalize(o$1p.add(l,u,h),h);var w=o$1p.multiplyByScalar(s,o$1p.dot(l,s),vr$3);o$1p.subtract(l,w,w),o$1p.normalize(w,w);var E=o$1p.multiplyByScalar(s,o$1p.dot(u,s),sr$5);if(o$1p.subtract(u,E,E),o$1p.normalize(E,E),!e$2d.equalsEpsilon(Math.abs(o$1p.dot(w,E)),1,e$2d.EPSILON7)){h=o$1p.cross(h,s,h),h=o$1p.cross(s,h,h),h=o$1p.normalize(h,h);var P=r/Math.max(.25,o$1p.magnitude(o$1p.cross(h,u,A$R))),A=J$C.angleIsGreaterThanPi(l,u,v,n);h=o$1p.multiplyByScalar(h,P,h),A?(p=o$1p.add(v,h,p),m=o$1p.add(p,o$1p.multiplyByScalar(c,r,m),m),_=o$1p.add(p,o$1p.multiplyByScalar(c,2*r,_),_),g$O[0]=o$1p.clone(f,g$O[0]),g$O[1]=o$1p.clone(m,g$O[1]),g=q$N(m$X.generateArc({positions:g$O,granularity:t,ellipsoid:n}),c,r,g),a&&(x.push(c.x,c.y,c.z),y.push(s.x,s.y,s.z)),d=o$1p.clone(_,d),c=o$1p.normalize(o$1p.cross(s,l,c),c),_=o$1p.add(p,o$1p.multiplyByScalar(c,2*r,_),_),f=o$1p.add(p,o$1p.multiplyByScalar(c,r,f),f),o===ar$6.ROUNDED||o===ar$6.BEVELED?C.push({leftPositions:V$A(p,d,_,o,A)}):C.push({leftPositions:Z$F(v,o$1p.negate(h,h),_,A)})):(_=o$1p.add(v,h,_),m=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,r,m),m),m),p=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,2*r,p),p),p),g$O[0]=o$1p.clone(f,g$O[0]),g$O[1]=o$1p.clone(m,g$O[1]),g=q$N(m$X.generateArc({positions:g$O,granularity:t,ellipsoid:n}),c,r,g),a&&(x.push(c.x,c.y,c.z),y.push(s.x,s.y,s.z)),d=o$1p.clone(p,d),c=o$1p.normalize(o$1p.cross(s,l,c),c),p=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,2*r,p),p),p),f=o$1p.add(_,o$1p.negate(o$1p.multiplyByScalar(c,r,f),f),f),o===ar$6.ROUNDED||o===ar$6.BEVELED?C.push({rightPositions:V$A(_,d,p,o,A)}):C.push({rightPositions:Z$F(v,h,p,A)})),u=o$1p.negate(l,u)}v=$}return s=n.geodeticSurfaceNormal(v,s),g$O[0]=o$1p.clone(f,g$O[0]),g$O[1]=o$1p.clone(v,g$O[1]),g=q$N(m$X.generateArc({positions:g$O,granularity:t,ellipsoid:n}),c,r,g),a&&(x.push(c.x,c.y,c.z),y.push(s.x,s.y,s.z)),o===ar$6.ROUNDED&&(T=or$4(g)),{positions:g,corners:C,lefts:x,normals:y,endPositions:T}};var Be$g=new o$1p,Ye$a=new o$1p,Le$k=new o$1p,Ne$f=new o$1p,Pe$f=new o$1p,We$c=new o$1p,fe$n=new o$1p,me$p=new o$1p;function Ge$b(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function j$G(e,t,i,n,r,o){var a=e.normals,s=e.tangents,l=e.bitangents,u=o$1p.normalize(o$1p.cross(i,t,fe$n),fe$n);o.normal&&b$R.addAttribute(a,t,n,r),o.tangent&&b$R.addAttribute(s,u,n,r),o.bitangent&&b$R.addAttribute(l,i,n,r)}function qe$8(e,t,i){var n,r,o,a=e.positions,s=e.corners,l=e.endPositions,u=e.lefts,c=e.normals,h=new a$_,d=0,f=0,p=0;for(r=0;r<a.length;r+=2)d+=o=a[r].length-3,p+=2*o,f+=a[r+1].length-3;for(d+=3,f+=3,r=0;r<s.length;r++){n=s[r];var _=s[r].leftPositions;e$2e(_)?(d+=o=_.length,p+=o):(f+=o=s[r].rightPositions.length,p+=o)}var m,g=e$2e(l);g&&(d+=m=l[0].length-3,f+=m,p+=6*(m/=3));var x,y,v,$,b,T,C=d+f,S=new Float64Array(C),w={normals:t.normal?new Float32Array(C):void 0,tangents:t.tangent?new Float32Array(C):void 0,bitangents:t.bitangent?new Float32Array(C):void 0},E=0,P=C-1,A=Be$g,L=Ye$a,M=m/2,R=ce$z.createTypedArray(C/3,p),O=0;if(g){T=Le$k,b=Ne$f;var D=l[0];for(A=o$1p.fromArray(c,0,A),L=o$1p.fromArray(u,0,L),r=0;r<M;r++)T=o$1p.fromArray(D,3*(M-1-r),T),b=o$1p.fromArray(D,3*(M+r),b),b$R.addAttribute(S,b,E),b$R.addAttribute(S,T,void 0,P),j$G(w,A,L,E,P,t),$=(y=E/3)+1,v=(x=(P-2)/3)-1,R[O++]=x,R[O++]=y,R[O++]=v,R[O++]=v,R[O++]=y,R[O++]=$,E+=3,P-=3}var I,B,F=0,N=0,G=a[F++],z=a[F++];for(S.set(G,E),S.set(z,P-z.length+1),L=o$1p.fromArray(u,N,L),o=z.length-3,r=0;r<o;r+=3)I=i.geodeticSurfaceNormal(o$1p.fromArray(G,r,fe$n),fe$n),B=i.geodeticSurfaceNormal(o$1p.fromArray(z,o-r,me$p),me$p),j$G(w,A=o$1p.normalize(o$1p.add(I,B,A),A),L,E,P,t),$=(y=E/3)+1,v=(x=(P-2)/3)-1,R[O++]=x,R[O++]=y,R[O++]=v,R[O++]=v,R[O++]=y,R[O++]=$,E+=3,P-=3;for(I=i.geodeticSurfaceNormal(o$1p.fromArray(G,o,fe$n),fe$n),B=i.geodeticSurfaceNormal(o$1p.fromArray(z,o,me$p),me$p),A=o$1p.normalize(o$1p.add(I,B,A),A),N+=3,r=0;r<s.length;r++){var U,V,k,W=(n=s[r]).leftPositions,H=n.rightPositions,q=We$c,j=Le$k,X=Ne$f;if(A=o$1p.fromArray(c,N,A),e$2e(W)){for(j$G(w,A,L,void 0,P,t),P-=3,V=$,k=v,U=0;U<W.length/3;U++)q=o$1p.fromArray(W,3*U,q),R[O++]=V,R[O++]=k-U-1,R[O++]=k-U,b$R.addAttribute(S,q,void 0,P),j=o$1p.fromArray(S,3*(k-U-1),j),X=o$1p.fromArray(S,3*V,X),j$G(w,A,L=o$1p.normalize(o$1p.subtract(j,X,L),L),void 0,P,t),P-=3;q=o$1p.fromArray(S,3*V,q),j=o$1p.subtract(o$1p.fromArray(S,3*k,j),q,j),X=o$1p.subtract(o$1p.fromArray(S,3*(k-U),X),q,X),j$G(w,A,L=o$1p.normalize(o$1p.add(j,X,L),L),E,void 0,t),E+=3}else{for(j$G(w,A,L,E,void 0,t),E+=3,V=v,k=$,U=0;U<H.length/3;U++)q=o$1p.fromArray(H,3*U,q),R[O++]=V,R[O++]=k+U,R[O++]=k+U+1,b$R.addAttribute(S,q,E),j=o$1p.fromArray(S,3*V,j),X=o$1p.fromArray(S,3*(k+U),X),j$G(w,A,L=o$1p.normalize(o$1p.subtract(j,X,L),L),E,void 0,t),E+=3;q=o$1p.fromArray(S,3*V,q),j=o$1p.subtract(o$1p.fromArray(S,3*(k+U),j),q,j),X=o$1p.subtract(o$1p.fromArray(S,3*k,X),q,X),j$G(w,A,L=o$1p.normalize(o$1p.negate(o$1p.add(X,j,L),L),L),void 0,P,t),P-=3}for(G=a[F++],z=a[F++],G.splice(0,3),z.splice(z.length-3,3),S.set(G,E),S.set(z,P-z.length+1),o=z.length-3,N+=3,L=o$1p.fromArray(u,N,L),U=0;U<z.length;U+=3)I=i.geodeticSurfaceNormal(o$1p.fromArray(G,U,fe$n),fe$n),B=i.geodeticSurfaceNormal(o$1p.fromArray(z,o-U,me$p),me$p),j$G(w,A=o$1p.normalize(o$1p.add(I,B,A),A),L,E,P,t),y=($=E/3)-1,x=(v=(P-2)/3)+1,R[O++]=x,R[O++]=y,R[O++]=v,R[O++]=v,R[O++]=y,R[O++]=$,E+=3,P-=3;E-=3,P+=3}if(j$G(w,A=o$1p.fromArray(c,c.length-3,A),L,E,P,t),g){E+=3,P-=3,T=Le$k,b=Ne$f;var Y=l[1];for(r=0;r<M;r++)T=o$1p.fromArray(Y,3*(m-r-1),T),b=o$1p.fromArray(Y,3*r,b),b$R.addAttribute(S,T,void 0,P),b$R.addAttribute(S,b,E),j$G(w,A,L,E,P,t),y=($=E/3)-1,x=(v=(P-2)/3)+1,R[O++]=x,R[O++]=y,R[O++]=v,R[O++]=v,R[O++]=y,R[O++]=$,E+=3,P-=3}if(h.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:S}),t.st){var Z,K,Q=new Float32Array(C/3*2),J=0;if(g){d/=3,f/=3;var ee=Math.PI/(m+1);K=1/(d-m+1),Z=1/(f-m+1);var te,ie=m/2;for(r=ie+1;r<m+1;r++)te=e$2d.PI_OVER_TWO+ee*r,Q[J++]=Z*(1+Math.cos(te)),Q[J++]=.5*(1+Math.sin(te));for(r=1;r<f-m+1;r++)Q[J++]=r*Z,Q[J++]=0;for(r=m;r>ie;r--)te=e$2d.PI_OVER_TWO-r*ee,Q[J++]=1-Z*(1+Math.cos(te)),Q[J++]=.5*(1+Math.sin(te));for(r=ie;r>0;r--)te=e$2d.PI_OVER_TWO-ee*r,Q[J++]=1-K*(1+Math.cos(te)),Q[J++]=.5*(1+Math.sin(te));for(r=d-m;r>0;r--)Q[J++]=r*K,Q[J++]=1;for(r=1;r<ie+1;r++)te=e$2d.PI_OVER_TWO+ee*r,Q[J++]=K*(1+Math.cos(te)),Q[J++]=.5*(1+Math.sin(te))}else{for(K=1/((d/=3)-1),Z=1/((f/=3)-1),r=0;r<f;r++)Q[J++]=r*Z,Q[J++]=0;for(r=d;r>0;r--)Q[J++]=(r-1)*K,Q[J++]=1}h.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:Q})}return t.normal&&(h.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:w.normals})),t.tangent&&(h.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:w.tangents})),t.bitangent&&(h.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:w.bitangents})),{attributes:h,indices:R}}function xe$i(e,t){if(!(t.normal||t.tangent||t.bitangent||t.st))return e;var i,n,r=e.position.values;(t.normal||t.bitangent)&&(i=e.normal.values,n=e.bitangent.values);var o,a=e.position.values.length/18,s=3*a,l=2*a,u=2*s;if(t.normal||t.bitangent||t.tangent){var c=t.normal?new Float32Array(6*s):void 0,h=t.tangent?new Float32Array(6*s):void 0,d=t.bitangent?new Float32Array(6*s):void 0,f=Be$g,p=Ye$a,_=Le$k,m=Ne$f,g=Pe$f,x=We$c,y=u;for(o=0;o<s;o+=3){var v=y+u;f=o$1p.fromArray(r,o,f),p=o$1p.fromArray(r,o+s,p),_=o$1p.fromArray(r,(o+3)%s,_),p=o$1p.subtract(p,f,p),_=o$1p.subtract(_,f,_),m=o$1p.normalize(o$1p.cross(p,_,m),m),t.normal&&(b$R.addAttribute(c,m,v),b$R.addAttribute(c,m,v+3),b$R.addAttribute(c,m,y),b$R.addAttribute(c,m,y+3)),(t.tangent||t.bitangent)&&(x=o$1p.fromArray(i,o,x),t.bitangent&&(b$R.addAttribute(d,x,v),b$R.addAttribute(d,x,v+3),b$R.addAttribute(d,x,y),b$R.addAttribute(d,x,y+3)),t.tangent&&(g=o$1p.normalize(o$1p.cross(x,m,g),g),b$R.addAttribute(h,g,v),b$R.addAttribute(h,g,v+3),b$R.addAttribute(h,g,y),b$R.addAttribute(h,g,y+3))),y+=6}if(t.normal){for(c.set(i),o=0;o<s;o+=3)c[o+s]=-i[o],c[o+s+1]=-i[o+1],c[o+s+2]=-i[o+2];e.normal.values=c}else e.normal=void 0;if(t.bitangent?(d.set(n),d.set(n,s),e.bitangent.values=d):e.bitangent=void 0,t.tangent){var $=e.tangent.values;h.set($),h.set($,s),e.tangent.values=h}}if(t.st){var b=e.st.values,T=new Float32Array(6*l);T.set(b),T.set(b,l);for(var C=2*l,S=0;S<2;S++){for(T[C++]=b[0],T[C++]=b[1],o=2;o<l;o+=2){var w=b[o],E=b[o+1];T[C++]=w,T[C++]=E,T[C++]=w,T[C++]=E}T[C++]=b[0],T[C++]=b[1]}e.st.values=T}return e}function Oe$i(e,t,i){i[t++]=e[0],i[t++]=e[1],i[t++]=e[2];for(var n=3;n<e.length;n+=3){var r=e[n],o=e[n+1],a=e[n+2];i[t++]=r,i[t++]=o,i[t++]=a,i[t++]=r,i[t++]=o,i[t++]=a}return i[t++]=e[0],i[t++]=e[1],i[t++]=e[2],i}function er$6(e,t){var i=new n$13({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),n=e.ellipsoid,r=qe$8(b$R.computePositions(e),i,n),o=e.height,a=e.extrudedHeight,s=r.attributes,l=r.indices,u=s.position.values,c=u.length,h=new Float64Array(6*c),d=new Float64Array(c);d.set(u);var f=new Float64Array(4*c);f=Oe$i(u=A$1f.scaleToGeodeticHeight(u,o,n),0,f),f=Oe$i(d=A$1f.scaleToGeodeticHeight(d,a,n),2*c,f),h.set(u),h.set(d,c),h.set(f,2*c),s.position.values=h,s=xe$i(s,t);var p,_=c/3;if(e.shadowVolume){var m=s.normal.values;c=m.length;var g=new Float32Array(6*c);for(p=0;p<c;p++)m[p]=-m[p];g.set(m,c),g=Oe$i(m,4*c,g),s.extrudeDirection=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:g}),t.normal||(s.normal=void 0)}if(e$2e(e.offsetAttribute)){var x=new Uint8Array(6*_);if(e.offsetAttribute===_0x39c22a.TOP)x=d$1s(x,1,0,_),x=d$1s(x,1,2*_,4*_);else x=d$1s(x,e.offsetAttribute===_0x39c22a.NONE?0:1);s.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}var y=l.length,v=_+_,$=ce$z.createTypedArray(h.length/3,2*y+3*v);$.set(l);var b,T,C,S,w=y;for(p=0;p<y;p+=3){var E=l[p],P=l[p+1],A=l[p+2];$[w++]=A+_,$[w++]=P+_,$[w++]=E+_}for(p=0;p<v;p+=2)C=(b=p+v)+1,S=(T=b+v)+1,$[w++]=b,$[w++]=T,$[w++]=C,$[w++]=C,$[w++]=T,$[w++]=S;return{attributes:s,indices:$}}var Je$6=new o$1p,pe$p=new o$1p,X$E=new a$18;function Ke$9(e,t,i,n,r,o){var a=o$1p.subtract(t,e,Je$6);o$1p.normalize(a,a);var s=i.geodeticSurfaceNormal(e,pe$p),l=o$1p.cross(a,s,Je$6);o$1p.multiplyByScalar(l,n,l);var u=r.latitude,c=r.longitude,h=o.latitude,d=o.longitude;o$1p.add(e,l,pe$p),i.cartesianToCartographic(pe$p,X$E);var f=X$E.latitude,p=X$E.longitude;u=Math.min(u,f),c=Math.min(c,p),h=Math.max(h,f),d=Math.max(d,p),o$1p.subtract(e,l,pe$p),i.cartesianToCartographic(pe$p,X$E),f=X$E.latitude,p=X$E.longitude,u=Math.min(u,f),c=Math.min(c,p),h=Math.max(h,f),d=Math.max(d,p),r.latitude=u,r.longitude=c,o.latitude=h,o.longitude=d}var Z$E=new o$1p,_e$l=new o$1p,G$Q=new a$18,q$M=new a$18;function Qe$6(e,t,i,n,r){var o=D$13(e=Ge$b(e,t),o$1p.equalsEpsilon),a=o.length;if(a<2||i<=0)return new h$18;var s,l,u=.5*i;if(G$Q.latitude=Number.POSITIVE_INFINITY,G$Q.longitude=Number.POSITIVE_INFINITY,q$M.latitude=Number.NEGATIVE_INFINITY,q$M.longitude=Number.NEGATIVE_INFINITY,n===ar$6.ROUNDED){var c=o[0];o$1p.subtract(c,o[1],Z$E),o$1p.normalize(Z$E,Z$E),o$1p.multiplyByScalar(Z$E,u,Z$E),o$1p.add(c,Z$E,_e$l),t.cartesianToCartographic(_e$l,X$E),s=X$E.latitude,l=X$E.longitude,G$Q.latitude=Math.min(G$Q.latitude,s),G$Q.longitude=Math.min(G$Q.longitude,l),q$M.latitude=Math.max(q$M.latitude,s),q$M.longitude=Math.max(q$M.longitude,l)}for(var h=0;h<a-1;++h)Ke$9(o[h],o[h+1],t,u,G$Q,q$M);var d=o[a-1];o$1p.subtract(d,o[a-2],Z$E),o$1p.normalize(Z$E,Z$E),o$1p.multiplyByScalar(Z$E,u,Z$E),o$1p.add(d,Z$E,_e$l),Ke$9(d,_e$l,t,u,G$Q,q$M),n===ar$6.ROUNDED&&(t.cartesianToCartographic(_e$l,X$E),s=X$E.latitude,l=X$E.longitude,G$Q.latitude=Math.min(G$Q.latitude,s),G$Q.longitude=Math.min(G$Q.longitude,l),q$M.latitude=Math.max(q$M.latitude,s),q$M.longitude=Math.max(q$M.longitude,l));var f=e$2e(r)?r:new h$18;return f.north=q$M.latitude,f.south=G$Q.latitude,f.east=q$M.longitude,f.west=G$Q.longitude,f}function P$F(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,i=e.width;o$1q.defined("options.positions",t),o$1q.defined("options.width",i);var n=u$Z(e.height,0),r=u$Z(e.extrudedHeight,n);this._positions=t,this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._vertexFormat=n$13.clone(u$Z(e.vertexFormat,n$13.DEFAULT)),this._width=i,this._height=Math.max(n,r),this._extrudedHeight=Math.min(n,r),this._cornerType=u$Z(e.cornerType,ar$6.ROUNDED),this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._shadowVolume=u$Z(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*o$1p.packedLength+t$12.packedLength+n$13.packedLength+7}P$F.pack=function(e,t,i){o$1q.defined("value",e),o$1q.defined("array",t),i=u$Z(i,0);var n=e._positions,r=n.length;t[i++]=r;for(var o=0;o<r;++o,i+=o$1p.packedLength)o$1p.pack(n[o],t,i);return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i++]=e._shadowVolume?1:0,t[i]=u$Z(e._offsetAttribute,-1),t};var Xe$9=t$12.clone(t$12.UNIT_SPHERE),Ze$7=new n$13,x$N={positions:void 0,ellipsoid:Xe$9,vertexFormat:Ze$7,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};P$F.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);for(var n=e[t++],r=new Array(n),o=0;o<n;++o,t+=o$1p.packedLength)r[o]=o$1p.unpack(e,t);var a=t$12.unpack(e,t,Xe$9);t+=t$12.packedLength;var s=n$13.unpack(e,t,Ze$7);t+=n$13.packedLength;var l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t++],f=1===e[t++],p=e[t];return e$2e(i)?(i._positions=r,i._ellipsoid=t$12.clone(a,i._ellipsoid),i._vertexFormat=n$13.clone(s,i._vertexFormat),i._width=l,i._height=u,i._extrudedHeight=c,i._cornerType=h,i._granularity=d,i._shadowVolume=f,i._offsetAttribute=-1===p?void 0:p,i):(x$N.positions=r,x$N.width=l,x$N.height=u,x$N.extrudedHeight=c,x$N.cornerType=h,x$N.granularity=d,x$N.shadowVolume=f,x$N.offsetAttribute=-1===p?void 0:p,new P$F(x$N))},P$F.computeRectangle=function(e,t){var i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,n=e.width;return o$1q.defined("options.positions",i),o$1q.defined("options.width",n),Qe$6(i,u$Z(e.ellipsoid,t$12.WGS84),n,u$Z(e.cornerType,ar$6.ROUNDED),t)},P$F.createGeometry=function(e){var t=e._positions,i=e._width,n=e._ellipsoid,r=D$13(t=Ge$b(t,n),o$1p.equalsEpsilon);if(!(r.length<2||i<=0)){var o,a=e._height,s=e._extrudedHeight,l=!e$2d.equalsEpsilon(a,s,0,e$2d.EPSILON2),u=e._vertexFormat,c={ellipsoid:n,positions:r,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0};if(l)c.height=a,c.extrudedHeight=s,c.shadowVolume=e._shadowVolume,c.offsetAttribute=e._offsetAttribute,o=er$6(c,u);else if((o=qe$8(b$R.computePositions(c),u,n)).attributes.position.values=A$1f.scaleToGeodeticHeight(o.attributes.position.values,a,n),e$2e(e._offsetAttribute)){var h=e._offsetAttribute===_0x39c22a.NONE?0:1,d=o.attributes.position.values.length,f=new Uint8Array(d/3);d$1s(f,h),o.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}var p=o.attributes,_=i$1d.fromVertices(p.position.values,void 0,3);return u.position||(o.attributes.position.values=void 0),new I$1p({attributes:p,indices:o.indices,primitiveType:W$18.TRIANGLES,boundingSphere:_,offsetAttribute:e._offsetAttribute})}},P$F.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new P$F({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:r,granularity:n,extrudedHeight:o,height:a,vertexFormat:n$13.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(P$F.prototype,{rectangle:{get:function(){return e$2e(this._rectangle)||(this._rectangle=Qe$6(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var te$u=new o$1p,ie$s=new o$1p,pe$o=new o$1p;function ue$p(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function re$x(e,t){var i,n,r,o=[],a=e.positions,s=e.corners,l=e.endPositions,u=new a$_,c=0,h=0,d=0;for(n=0;n<a.length;n+=2)c+=r=a[n].length-3,d+=r/3*4,h+=a[n+1].length-3;for(c+=3,h+=3,n=0;n<s.length;n++){i=s[n];var f=s[n].leftPositions;e$2e(f)?(c+=r=f.length,d+=r/3*2):(h+=r=s[n].rightPositions.length,d+=r/3*2)}var p,_=e$2e(l);_&&(c+=p=l[0].length-3,h+=p,d+=4*(p/=3));var m,g,x,y,v,$,b=c+h,T=new Float64Array(b),C=0,S=b-1,w=p/2,E=ce$z.createTypedArray(b/3,d+4),P=0;if(E[P++]=C/3,E[P++]=(S-2)/3,_){o.push(C/3),$=te$u,v=ie$s;var A=l[0];for(n=0;n<w;n++)$=o$1p.fromArray(A,3*(w-1-n),$),v=o$1p.fromArray(A,3*(w+n),v),b$R.addAttribute(T,v,C),b$R.addAttribute(T,$,void 0,S),y=(g=C/3)+1,x=(m=(S-2)/3)-1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=y,C+=3,S-=3}var L=0,M=a[L++],R=a[L++];for(T.set(M,C),T.set(R,S-R.length+1),r=R.length-3,o.push(C/3,(S-2)/3),n=0;n<r;n+=3)y=(g=C/3)+1,x=(m=(S-2)/3)-1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=y,C+=3,S-=3;for(n=0;n<s.length;n++){var O,D,I=(i=s[n]).leftPositions,B=i.rightPositions,F=pe$o;if(e$2e(I)){for(S-=3,D=x,o.push(y),O=0;O<I.length/3;O++)F=o$1p.fromArray(I,3*O,F),E[P++]=D-O-1,E[P++]=D-O,b$R.addAttribute(T,F,void 0,S),S-=3;o.push(D-Math.floor(I.length/6)),t===ar$6.BEVELED&&o.push((S-2)/3+1),C+=3}else{for(C+=3,D=y,o.push(x),O=0;O<B.length/3;O++)F=o$1p.fromArray(B,3*O,F),E[P++]=D+O,E[P++]=D+O+1,b$R.addAttribute(T,F,C),C+=3;o.push(D+Math.floor(B.length/6)),t===ar$6.BEVELED&&o.push(C/3-1),S-=3}for(M=a[L++],R=a[L++],M.splice(0,3),R.splice(R.length-3,3),T.set(M,C),T.set(R,S-R.length+1),r=R.length-3,O=0;O<R.length;O+=3)g=(y=C/3)-1,m=(x=(S-2)/3)+1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=y,C+=3,S-=3;C-=3,S+=3,o.push(C/3,(S-2)/3)}if(_){C+=3,S-=3,$=te$u,v=ie$s;var N=l[1];for(n=0;n<w;n++)$=o$1p.fromArray(N,3*(p-n-1),$),v=o$1p.fromArray(N,3*n,v),b$R.addAttribute(T,$,void 0,S),b$R.addAttribute(T,v,C),g=(y=C/3)-1,m=(x=(S-2)/3)+1,E[P++]=m,E[P++]=x,E[P++]=g,E[P++]=y,C+=3,S-=3;o.push(C/3)}else o.push(C/3,(S-2)/3);return E[P++]=C/3,E[P++]=(S-2)/3,u.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:T}),{attributes:u,indices:E,wallIndices:o}}function de$l(e){var t=e.ellipsoid,i=re$x(b$R.computePositions(e),e.cornerType),n=i.wallIndices,r=e.height,o=e.extrudedHeight,a=i.attributes,s=i.indices,l=a.position.values,u=l.length,c=new Float64Array(u);c.set(l);var h=new Float64Array(2*u);if(l=A$1f.scaleToGeodeticHeight(l,r,t),c=A$1f.scaleToGeodeticHeight(c,o,t),h.set(l),h.set(c,u),a.position.values=h,u/=3,e$2e(e.offsetAttribute)){var d=new Uint8Array(2*u);if(e.offsetAttribute===_0x39c22a.TOP)d=d$1s(d,1,0,u);else d=d$1s(d,e.offsetAttribute===_0x39c22a.NONE?0:1);a.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}var f,p=s.length,_=ce$z.createTypedArray(h.length/3,2*(p+n.length));_.set(s);var m,g,x=p;for(f=0;f<p;f+=2){var y=s[f],v=s[f+1];_[x++]=y+u,_[x++]=v+u}for(f=0;f<n.length;f++)g=(m=n[f])+u,_[x++]=m,_[x++]=g;return{attributes:a,indices:_}}function V$z(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,i=e.width;o$1q.typeOf.object("options.positions",t),o$1q.typeOf.number("options.width",i);var n=u$Z(e.height,0),r=u$Z(e.extrudedHeight,n);this._positions=t,this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._width=i,this._height=Math.max(n,r),this._extrudedHeight=Math.min(n,r),this._cornerType=u$Z(e.cornerType,ar$6.ROUNDED),this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*o$1p.packedLength+t$12.packedLength+6}V$z.pack=function(e,t,i){o$1q.typeOf.object("value",e),o$1q.typeOf.object("array",t),i=u$Z(i,0);var n=e._positions,r=n.length;t[i++]=r;for(var o=0;o<r;++o,i+=o$1p.packedLength)o$1p.pack(n[o],t,i);return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i]=u$Z(e._offsetAttribute,-1),t};var oe$n=t$12.clone(t$12.UNIT_SPHERE),R$E={positions:void 0,ellipsoid:oe$n,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};function i$L(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}function d$_(e,t){var i=t.replacementPrevious,n=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=n),t===e.head?e.head=n:i.replacementNext=n,t===e.tail?e.tail=i:n.replacementPrevious=i,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}V$z.unpack=function(e,t,i){o$1q.typeOf.object("array",e),t=u$Z(t,0);for(var n=e[t++],r=new Array(n),o=0;o<n;++o,t+=o$1p.packedLength)r[o]=o$1p.unpack(e,t);var a=t$12.unpack(e,t,oe$n);t+=t$12.packedLength;var s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return e$2e(i)?(i._positions=r,i._ellipsoid=t$12.clone(a,i._ellipsoid),i._width=s,i._height=l,i._extrudedHeight=u,i._cornerType=c,i._granularity=h,i._offsetAttribute=-1===d?void 0:d,i):(R$E.positions=r,R$E.width=s,R$E.height=l,R$E.extrudedHeight=u,R$E.cornerType=c,R$E.granularity=h,R$E.offsetAttribute=-1===d?void 0:d,new V$z(R$E))},V$z.createGeometry=function(e){var t=e._positions,i=e._width,n=e._ellipsoid,r=D$13(t=ue$p(t,n),o$1p.equalsEpsilon);if(!(r.length<2||i<=0)){var o,a=e._height,s=e._extrudedHeight,l=!e$2d.equalsEpsilon(a,s,0,e$2d.EPSILON2),u={ellipsoid:n,positions:r,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1};if(l)u.height=a,u.extrudedHeight=s,u.offsetAttribute=e._offsetAttribute,o=de$l(u);else if((o=re$x(b$R.computePositions(u),u.cornerType)).attributes.position.values=A$1f.scaleToGeodeticHeight(o.attributes.position.values,a,n),e$2e(e._offsetAttribute)){var c=o.attributes.position.values.length,h=new Uint8Array(c/3);d$1s(h,e._offsetAttribute===_0x39c22a.NONE?0:1),o.attributes.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}var d=o.attributes,f=i$1d.fromVertices(d.position.values,void 0,3);return new I$1p({attributes:d,indices:o.indices,primitiveType:W$18.LINES,boundingSphere:f,offsetAttribute:e._offsetAttribute})}},i$L.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head},i$L.prototype.trimTiles=function(e,t){for(var i=this.tail,n=!0;n&&e$2e(this._lastBeforeStartOfFrame)&&this.count>e&&e$2e(i);){n=i!==this._lastBeforeStartOfFrame;var r=i.replacementPrevious;i.eligibleForUnloading&&(i.freeResources(),d$_(this,i)),i=r}for(this._lastBeforeStartOfFrame&&(i=this._lastBeforeStartOfFrame.replacementNext);t&&i;)i=i.replacementNext;for(;i;){if(i&&i.data)for(var o=i.data.imagery,a=0,s=o.length;a<s;++a){var l=o[a];l.readyImagery&&l.readyImagery.imageryLayer._imageryProvider instanceof M$S&&e$2e(l.readyImagery)&&(l.imageryLayer=l.readyImagery.imageryLayer,l.readyImagery.releaseReference(),l.readyImagery=void 0,i.state=re$A.LOADING)}i=i.replacementNext}},i$L.prototype.markTileRendered=function(e){var t=this.head;if(t!==e)return++this.count,e$2e(t)?((e$2e(e.replacementPrevious)||e$2e(e.replacementNext))&&d$_(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,void(this.head=e)):(e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,void(this.tail=e));e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext)};var De$g=-1;function et$a(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.availabilityPromiseCache={},this.subLevel=e.subLevel}function ne$u(e){if(!e$2e(e)||!e$2e(e.url))throw new t$15("options.url is required.");var t=-1;if(this._isSct=u$Z(e.isSct,!0),"string"==typeof e.url){this._baseUrl=e.url;var i=e.url;t=i.indexOf("wmts100");var n=i.substring(0,i.indexOf("/datas"));this.tablename=i.substring(i.indexOf("datas/")+6,i.length);var r=this;new l$14({name:n+this.tablename}).then((function(e){e.checkObjectStoreExit(r.tablename)?r._indexedDBScheduler=e:e.createObjectStore(r.tablename).then((function(){r._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){e$2e(r._indexedDBScheduler)&&r._indexedDBScheduler.clear(r.tablename)},cache:[]}}else this._isSct=!1;this._tilingScheme=new g$15({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid}),this._heightmapWidth=65,this._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,this._heightmapWidth,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._packingRequest=e.packingRequest,this._isBlock=!1,this._extrudeTileBoundingBox=!1,this._blockCache={},this._blockCacheQueue=new r$R,this._blockCacheSize=100,this._blockScale=0,this._subdomains=e.subdomains,this._requestVertexNormals=u$Z(e.requestVertexNormals,!1),this._requestWaterMask=u$Z(e.requestWaterMask,!1),this._requestMetadata=u$Z(e.requestMetadata,!0),this._cacheKey=u$Z(e.cacheKey,""),this._originOffset=u$Z(e.originOffset,new o$1o(0,0)),this._errorEvent=new o$1h;var o=e.credit;"string"==typeof o&&(o=new r$U(o)),this._credit=o,this._availability=void 0;var a=o$1l.defer();this._ready=!1,this._readyPromise=a,this._tileCredits=void 0,this._bounds=null,this._isCreateSkirt=u$Z(e.isCreateSkirt,!0),this._urlType=u$Z(e.urlType,Tr$4.REST),this._isShowGlobe=!0,this._isTerrainZ=!1,this._hasNormalBuffer=!1,this._currentVersion=null,this._needRefresh=!1,this._isSct&&(this._isShowGlobe=u$Z(e.isShowGlobe,!0)),this._isSkirtDirty=!1,this._customRequestHeaders=e.customRequestHeaders,this._invisibility=u$Z(e.invisibility,!1),this._visible=!0,this._offset={_x:0,_y:0,_level:0},this._enablePrjArea=u$Z(e.enablePrjArea,!1);var s,l,u;r=this;e$2e(this._subdomains)&&(i=i.replace(/({.*?})/g,(function(e,t){if(!e$2e(r._subdomains.length))throw new t$15("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?r._subdomains[0]:e})));var c=this._layers=[],h="",d=[],f=0;if(this._isSct&&-1===t){var p;if(r._hasWaterMask=!0,r._urlType===Tr$4.KEY_VALUE){var _=e.url,m=_.replace(_.substring(_.indexOf("datas")+5,_.indexOf("scene3DName")),"?");r._tileUrlTemplates=[m+"&tile1={z}&tile2={x}&tile3={y}&ext=terrainz&v=1.16389.0"],p=_}else{r._tileUrlTemplates=[e.url+"/data/path/{z}/{x}/{y}.terrain?v=1.16389.0"];var g=e.url.split("/");g[g.length-1],p=n$W(i,"config")}e$2e(a$O.CREDENTIAL)&&(p=e$2e(a$O.CREDENTIAL._keymap[r._baseUrl])?a$O.addTokenWithKey(r._baseUrl,p):a$O.addToken(p)),LicenseChecker.LICENSECHECKER.getLicense(p).then((function(e){LicenseChecker.LICENSECHECKER.check(e)})),o$1l(u$Q(p,this._customRequestHeaders),(function(t){t=t.replace("<SuperMapCache>",'<SuperMapCache xmlns:sml="http://www.supermap.com/SuperMapCache">');var i=(new s$T).read(t).documentElement;if(2===s$T.queryNumericValue(i,"Version",void 0)){var n=s$T.queryFirstNode(i,"StoreType",void 0);r._blockScale=s$T.queryNumericAttribute(n,"BlockScale",void 0),e$2e(r._blockScale)&&r._blockScale>0&&(r._isBlock=!0)}var o,a=s$T.queryStringValue(i,"FileExtentName",void 0);if(a=a.toLowerCase(),r._isTerrainZ="terrainz"===a,r._urlType===Tr$4.KEY_VALUE){var s=e.url;o=s.replace(s.substring(s.indexOf("datas")+5,s.indexOf("scene3DName")),"?"),o+="&tile1={z}&tile2={x}&tile3={y}&ext={fileExtent}&v=1.16389.0"}else o=e.url+"/data/path/{z}/{x}/{y}.{fileExtent}?v=1.16389.0";o=o.replace("{fileExtent}",a),r._tileUrlTemplates=[o];var l=s$T.queryFirstNode(i,"HeightRange",void 0),u=s$T.queryNumericValue(l,"MaxHeight",void 0),h=s$T.queryNumericValue(l,"MinHeight",void 0);r._maxHeight=u,r._minHeight=h;var f=s$T.queryFirstNode(i,"Bounds",void 0),p=s$T.queryNumericValue(f,"Left",void 0),_=s$T.queryNumericValue(f,"Right",void 0),m=s$T.queryNumericValue(f,"Bottom",void 0),g=s$T.queryNumericValue(f,"Top",void 0),x=s$T.queryFirstNode(i,"PlaneBounds",void 0);if(e$2e(x)){p>180&&(r._offset._x=Math.floor(p/180)),g>90&&(r._offset._y=Math.floor((g+90)/180));var y=t$12.WGS84.maximumRadius,v=r._offset._x*Math.PI*y,$=r._offset._y*Math.PI*y;p=s$T.queryNumericValue(x,"Left",void 0),p-=v,_=s$T.queryNumericValue(x,"Right",void 0),_-=v,m=s$T.queryNumericValue(x,"Bottom",void 0),m-=$,g=s$T.queryNumericValue(x,"Top",void 0),g-=$;var b=new o$1p(p,m,0),T=new o$1p(_,g,0),C=new n$1d,S=C.unproject(b),w=C.unproject(T);p=e$2d.toDegrees(S.longitude),_=e$2d.toDegrees(w.longitude),m=e$2d.toDegrees(S.latitude),g=e$2d.toDegrees(w.latitude),Math.abs(v)>e$2d.EPSILON1&&(o$1p.globalOffset.x=v),Math.abs($)>e$2d.EPSILON1&&(o$1p.globalOffset.y=$)}p&&_&&m&&g&&(r._bounds=new h$18(p,m,_,g),r._boundsRadians=h$18.fromDegrees(p,m,_,g));for(var E=s$T.queryFirstNode(i,"Levels",void 0),P=s$T.queryChildNodes(E,"Level",void 0),A=[],L=0,M=P.length;L<M;L++){var R=parseInt(P[L].textContent);A.push(R)}var O=s$T.queryFirstNode(i,"History",void 0);if(null!=O){var D=s$T.queryChildNodes(O,"Version",void 0),I=[];for(L=0,M=D.length;L<M;L++){R=D[L].textContent;I.push(R)}r._historyVersions=I}var B=A[0],F=A[A.length-1],N=s$T.queryFirstNode(i,"Available",void 0);if(e$2e(N)){var G=s$T.queryChildNodes(N,"TilesBounds",void 0),z=B>0?A.length+1:A.length,U=new Array(z);for(L=0;L<B;L++)U[L]=[];for(L=0,M=G.length;L<M;L++){var V=G[L],k=[];U[ie=s$T.queryNumericAttribute(V,"level",void 0)]=k;for(var W=s$T.queryChildNodes(V,"TileBounds",void 0),H=0,q=W.length;H<q;H++){var j=W[H],X=s$T.queryNumericValue(j,"StartCol",void 0),Y=s$T.queryNumericValue(j,"StartRow",void 0),Z=s$T.queryNumericValue(j,"EndCol",void 0),K=s$T.queryNumericValue(j,"EndRow",void 0);if(ie>=r._offset._level){var Q=1<<ie-r._offset._level,J=r._offset._x*Q;X-=J,Z-=J;var ee=r._offset._y*Q;Y-=ee,K-=ee}k.push({startX:X,startY:Y,endX:Z,endY:K})}}U[0]=[{startX:0,startY:0,endX:1,endY:1}];for(var te=new n$C(r._tilingScheme,F),ie=0;ie<U.length;++ie){var ne=U[ie],re=r._tilingScheme.getNumberOfYTilesAtLevel(ie);if(e$2e(d[ie])||(d[ie]=[]),e$2e(ne))for(var oe=0;oe<ne.length;++oe){var ae=ne[oe],se=re-ae.endY-1,le=re-ae.startY-1;d[ie].push([ae.startX,se,ae.endX,le]),te.addAvailableTileRange(ie,ae.startX,se,ae.endX,le)}}r._availability=te}c.push(new et$a({resource:t$10.createIfNeeded(e.url),version:"",isHeightmap:!1,tileUrlTemplates:r._tileUrlTemplates,availability:te,hasVertexNormals:!1,hasWaterMask:!0,hasMetadata:!1,availabilityLevels:0,availabilityTilesLoaded:!1,littleEndianExtensionSize:!0})),r._levels=A,r._ready=!0,r._readyPromise.resolve(!0)}),(function(){r._readyPromise.reject(!1)}))}else if(t>-1){var x=i+"/1.0.0/WMTSCapabilities.xml";r._wmtslayer=e.layer||null,r._wmtsformat=e.format||"binary",r._wmtstileMatrixSet=e.tilematrixset||null,e.blockscale>0&&(r._blockScale=1*e.blockscale,r._isBlock=!0),o$1l(u$Q(x),(function(t){var i=(new s$T).read(t).documentElement,n=s$T.queryFirstNode(i,"Contents",void 0),o=s$T.queryFirstNode(n,"Layer",void 0);r._tempLayerName=s$T.queryStringValue(o,"Title",void 0);var a=s$T.queryFirstNode(n,"TileMatrixSet",void 0);r._wmtstileMatrixSet=s$T.queryStringValue(a,"Identifier",void 0),r._tileUrlTemplates=[e.url+"?tilematrix={z}&layer="+(r._wmtslayer||r._tempLayerName)+"&tilerow={y}&tilecol={x}&tilematrixset="+r._wmtstileMatrixSet+"&service=WMTS&request=GetTile"];var s=s$T.queryFirstNode(o,"BoundingBox",void 0),l=s$T.queryStringValue(s,"LowerCorner",void 0),u=s$T.queryStringValue(s,"UpperCorner",void 0),h=l.split(" "),d=u.split(" "),f=parseFloat(h[0]),p=parseFloat(d[0]),_=parseFloat(h[1]),m=parseFloat(d[1]);f&&p&&_&&m&&(r._bounds=new h$18(f,_,p,m),r._boundsRadians=h$18.fromDegrees(f,_,p,m));var g=s$T.queryFirstNode(n,"TileMatrixSet",void 0),x=(a=s$T.queryChildNodes(g,"TileMatrix",void 0),s$T.queryNumericValue(a[0],"ScaleDenominator",void 0)),y=s$T.queryNumericValue(a[a.length-1],"ScaleDenominator",void 0),v=s$T.queryNumericValue(a[0],"Identifier",void 0);x=1/x,y=1/y;var $=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652],b=$.indexOf(x),T=$.indexOf(y);for(let e=0;e<$.length;e++)x>$[e]&&$[e+1]&&x<$[e+1]&&(b=e-1),y>$[e]&&$[e+1]&&y<$[e+1]&&(T=e-1);for(var C=u$Z((b=Math.max(b,0))-v,0),S=[],w=b;w<=T;w++)S.push(w);r._isTerrainZ="terrainz",c.push(new et$a({resource:t$10.createIfNeeded(e.url),version:"",isHeightmap:!1,tileUrlTemplates:r._tileUrlTemplates,hasVertexNormals:!1,hasWaterMask:!0,hasMetadata:!1,availabilityLevels:0,availabilityTilesLoaded:!1,littleEndianExtensionSize:!0,subLevel:C})),r._levels=S,r._ready=!0,r._readyPromise.resolve(!0)}),(function(){r._readyPromise.reject(!1)}))}else o$1l(e.url).then((function(e){var t=t$10.createIfNeeded(e);t.appendForwardSlash(),l=(s=t).getDerivedResource({url:"layer.json"}),r._tileCredits=t.credits,T()})).otherwise((function(e){a.reject(e)}));function y(e){var t;if(!e.format)return t="The tile format is not specified in the layer.json file.",void(u=l$V.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T));if(!e.tiles||0===e.tiles.length)return t="The layer.json file does not specify any tile URL templates.",void(u=l$V.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T));var i=!1,n=!1,o=!1,a=!0,p=!1;if("heightmap-1.0"===e.format)p=!0,e$2e(r._heightmapStructure)||(r._heightmapStructure={heightScale:.2,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:65535}),n=!0,r._requestWaterMask=!0;else if(0!==e.format.indexOf("quantized-mesh-1."))return t='The tile format "'+e.format+'" is invalid or not supported.',void(u=l$V.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T));var _,m=e.tiles,g=e.maxzoom;f=Math.max(f,g),e$2e(e.extensions)&&-1!==e.extensions.indexOf("octvertexnormals")?i=!0:e$2e(e.extensions)&&-1!==e.extensions.indexOf("vertexnormals")&&(i=!0,a=!1),e$2e(e.extensions)&&-1!==e.extensions.indexOf("watermask")&&(n=!0),e$2e(e.extensions)&&-1!==e.extensions.indexOf("metadata")&&(o=!0);var x,$=e.metadataAvailability,b=e.available;if(e$2e(b)&&!e$2e($)){x=new n$C(r._tilingScheme,b.length);for(var C=0;C<b.length;++C){var S=b[C],w=r._tilingScheme.getNumberOfYTilesAtLevel(C);e$2e(d[C])||(d[C]=[]);for(var E=0;E<S.length;++E){var P=S[E],A=w-P.endY-1,L=w-P.startY-1;d[C].push([P.startX,A,P.endX,L]),x.addAvailableTileRange(C,P.startX,A,P.endX,L)}}}else e$2e($)&&(_=new n$C(r._tilingScheme,g),x=new n$C(r._tilingScheme,g),d[0]=[[0,0,1,0]],x.addAvailableTileRange(0,0,0,1,0));r._hasWaterMask=r._hasWaterMask||n,r._hasVertexNormals=r._hasVertexNormals||i,r._hasMetadata=r._hasMetadata||o,e$2e(e.attribution)&&(h.length>0&&(h+=" "),h+=e.attribution),c.push(new et$a({resource:s,version:e.version,isHeightmap:p,tileUrlTemplates:m,availability:x,hasVertexNormals:i,hasWaterMask:n,hasMetadata:o,availabilityLevels:$,availabilityTilesLoaded:_,littleEndianExtensionSize:a}));var M=e.parentUrl;return e$2e(M)?e$2e(x)?((s=s.getDerivedResource({url:M})).appendForwardSlash(),o$1l((l=s.getDerivedResource({url:"layer.json"})).fetchJson(),y,v)):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),o$1l.resolve()):o$1l.resolve()}function v(e){var t="An error occurred while accessing "+l.url+".";u=l$V.handleError(u,r,r._errorEvent,t,void 0,void 0,void 0,T)}function $(e){y(e).then((function(){if(!e$2e(u)){var e=d.length;if(e>0)for(var t=r._availability=new n$C(r._tilingScheme,f),i=0;i<e;++i)for(var n=d[i],o=0;o<n.length;++o){var a=n[o];t.addAvailableTileRange(i,a[0],a[1],a[2],a[3])}if(h.length>0){var s=new r$U(h);e$2e(r._tileCredits)?r._tileCredits.push(s):r._tileCredits=[s]}r._ready=!0,r._readyPromise.resolve(!0)}}))}function b(e){e$2e(e)&&404===e.statusCode?$({tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]}):v()}function T(){o$1l(l.fetchJson()).then($).otherwise(b)}}var Ye$9={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4,INVALID_FLAG:127};function vt$7(e){return e$2e(e)&&0!==e.length?{Accept:"application/vnd.quantized-mesh;extensions="+e.join("-")+",application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}}function tt$9(e,t,i,n,r,o){var a=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new T$L({buffer:a,childTileMask:new Uint8Array(t,a.byteLength,1)[0],waterMask:new Uint8Array(t,a.byteLength+1,t.byteLength-a.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function We$b(e,t,i,n,r,o,a,s){var l=a.littleEndianExtensionSize,u=0,c=3*Float64Array.BYTES_PER_ELEMENT,h=4*Float64Array.BYTES_PER_ELEMENT,d=3*Uint16Array.BYTES_PER_ELEMENT,f=Uint16Array.BYTES_PER_ELEMENT,p=3*f,_=new DataView(t),m=new o$1p(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0));u+=c;var g=_.getFloat32(u,!0);u+=Float32Array.BYTES_PER_ELEMENT;var x=_.getFloat32(u,!0);u+=Float32Array.BYTES_PER_ELEMENT;var y=x,v=g,$=new i$1d(new o$1p(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0)),_.getFloat64(u+c,!0));u+=h;var b=new o$1p(_.getFloat64(u,!0),_.getFloat64(u+8,!0),_.getFloat64(u+16,!0));u+=c;var T=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var C=new Uint16Array(t,u,3*T);u+=T*d,T>65536&&(p=3*(f=Uint32Array.BYTES_PER_ELEMENT));var S=C.subarray(0,T),w=C.subarray(T,2*T),E=C.subarray(2*T,3*T);t$$.zigZagDeltaDecode(S,w,E),u%f!=0&&(u+=f-u%f);var P=_.getUint32(u,!0),A=u+=Uint32Array.BYTES_PER_ELEMENT,L=ce$z.createTypedArrayFromArrayBuffer(T,t,u,3*P);u+=P*p;for(var M=0,R=L.length,O=0;O<R;++O){var D=L[O];L[O]=M-D,0===D&&++M}var I=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var B=ce$z.createTypedArrayFromArrayBuffer(T,t,u,I);u+=I*f;var F=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var N=ce$z.createTypedArrayFromArrayBuffer(T,t,u,F);u+=F*f;var G=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var z=ce$z.createTypedArrayFromArrayBuffer(T,t,u,G);u+=G*f;var U=_.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var V=ce$z.createTypedArrayFromArrayBuffer(T,t,u,U);u+=U*f;var k,W,H,q,j=!1,X=!1,Y=void 0,Z=void 0;!1===e._isShowGlobe&&(0===x||u>=_.byteLength)&&(j=!0);for(var K=0;u<_.byteLength;){var Q=_.getUint8(u,!0);if(0!==Q){u+=Uint8Array.BYTES_PER_ELEMENT;var J=_.getUint32(u,l);if(u+=Uint32Array.BYTES_PER_ELEMENT,Q===Ye$9.OCT_VERTEX_NORMALS&&e._requestVertexNormals)k=new Uint8Array(t,u,2*T);else if(Q===Ye$9.WATER_MASK&&e._requestWaterMask)W=new Uint8Array(t,u,J);else if(Q===Ye$9.METADATA&&e._requestMetadata&&!e._isSct){var ee=_.getUint32(u,!0);if(ee>0){var te=a$K(new Uint8Array(t),u+Uint32Array.BYTES_PER_ELEMENT,ee),ie=JSON.parse(te).available;if(e$2e(ie))for(var ne=0;ne<ie.length;++ne)for(var re=i+ne+1,oe=ie[ne],ae=e._tilingScheme.getNumberOfYTilesAtLevel(re),se=0;se<oe.length;++se){var le=oe[se],ue=ae-le.endY-1,ce=ae-le.startY-1;e.availability.addAvailableTileRange(re,le.startX,ue,le.endX,ce),a.availability.addAvailableTileRange(re,le.startX,ue,le.endX,ce)}}a.availabilityTilesLoaded.addAvailableTileRange(i,n,r,n,r)}else if(Q===Ye$9.INVALID_FLAG){if((K=_.getUint32(u,!0))>0){var he=0,de=32767;for(O=0;O<K;O++)he=Math.max(he,E[L[O]]),de=Math.min(de,E[L[O]]);he<32767&&(y=g+(x-g)*he/32767),de>0&&(v=g+(x-g)*de/32767)}(!1===e._isShowGlobe||e$2e(s))&&(!1===e._isShowGlobe&&(0===K?j=!0:L=ce$z.createTypedArrayFromArrayBuffer(T,t,A,K)),(3*P!=K||0==K)&&(X=!0),e$2e(s)&&K>0&&(0===(Y=ce$z.createTypedArrayFromArrayBuffer(T,t,A,K)).length&&(Y=void 0)))}else if(125===Q){var fe=J/4;H=new Uint8Array(3*fe);var pe=u,_e=new o$1p;for(O=0;O<fe;O++){var me=_.getInt16(pe,!0);pe+=Int16Array.BYTES_PER_ELEMENT;var ge=_.getInt16(pe,!0);pe+=Int16Array.BYTES_PER_ELEMENT,t$$.octShortDecode(me,ge,_e),H[3*O]=255*(.5*_e.x+.5),H[3*O+1]=255*(.5*_e.y+.5),H[3*O+2]=255*(.5*_e.z+.5)}}u+=J}else u+=1}if(e$2e(Y)){Z=new Uint16Array(3*T);for(O=0;O<T;O++)Z[3*O]=C[O],Z[3*O+1]=C[T+O],Z[3*O+2]=C[2*T+O]}!1===e._isShowGlobe&&(q=0);var xe,ye,ve=e._tilingScheme.tileXYToRectangle(n,r,i);return ve.width<e$2d.PI_OVER_TWO+e$2d.EPSILON5&&(xe=y$Y.fromRectangle(ve,g,x,e._tilingScheme.ellipsoid),ye=y$Y.fromRectangle(ve,v,y,e._tilingScheme.ellipsoid)),q=e._isCreateSkirt?5*e.getLevelMaximumGeometricError(i):0,e._hasNormalBuffer=e$2e(H),new p$O({center:m,minimumHeight:g,maximumHeight:x,boundingSphere:$,orientedBoundingBox:xe,validMinimumHeight:v,validMaximumHeight:y,validOrientedBoundingBox:ye,horizonOcclusionPoint:b,quantizedVertices:C,encodedNormals:k,indices:L,westIndices:B,southIndices:N,eastIndices:z,northIndices:V,westSkirtHeight:q,southSkirtHeight:q,eastSkirtHeight:q,northSkirtHeight:q,childTileMask:e._isSct||!e$2e(e.availability)?15:e.availability.computeChildMaskForTile(i,n,r),waterMask:W,credits:e._tileCredits,normalTexture:H,invalid:j,rasterIndex:Y,rasterVertex:Z,hasInvalid:X})}function Ne$e(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function _t$6(e,t,i,n){var r=Math.min(e._blockScale,n),o=Math.pow(2,r),a=t%o;return{x:Math.floor(t/o),y:Math.floor(i/o),col:a,row:i%o,level:n,blockSize:o}}ne$u.prototype.requestTileGeometry=function(e,t,i,n,r){if(!this._ready)throw new t$15("requestTileGeometry must not be called before the terrain provider is ready.");if(0===i&&this._isSct){for(var o=new Uint16Array(12288),a=0;a<64;a++)for(var s=0;s<64;s++)o[64*a+s]=Math.floor(32767*a/63),o[4096+64*a+s]=Math.floor(32767*s/63),o[8192+64*a+s]=0;var l=new Uint16Array(23814);for(a=0;a<63;a++)for(s=0;s<63;s++)l[6*(63*a+s)]=64*a+s,l[6*(63*a+s)+1]=64*(a+1)+s+1,l[6*(63*a+s)+2]=64*a+s+1,l[6*(63*a+s)+3]=64*(a+1)+s,l[6*(63*a+s)+4]=64*(a+1)+s+1,l[6*(63*a+s)+5]=64*a+s;var u=new Uint16Array(0),c=new o$1p(NaN,-1/0,NaN),h=new o$1p(0,-3189068.5,0);1===e&&(h.y=3189068.5,c.y=1/0);var d=this;return o$1l.resolve(new p$O({center:h,minimumHeight:0,maximumHeight:0,boundingSphere:new i$1d(h,9567205.5),horizonOcclusionPoint:c,quantizedVertices:o,indices:l,westIndices:u,southIndices:u,eastIndices:u,northIndices:u,westSkirtHeight:0,southSkirtHeight:0,eastSkirtHeight:0,northSkirtHeight:0,childTileMask:d._isSct||!e$2e(d.availability)?15:d.availability.computeChildMaskForTile(i,e,t),invalid:!1,hasInvalid:!1}))}var f,p=this._layers,_=p.length;if(1===_)f=p[0];else for(a=0;a<_;++a){var m=p[a];if(!e$2e(m.availability)||m.availability.isTileAvailable(i,e,t)){f=m;break}}return yt$5(this,e,t,i,f,n,r)};var Dt$7=/({.*?})/g;function yt$5(e,t,i,n,r,o,a){if(!e$2e(r))return o$1l.reject(new t$13("Terrain tile doesn't exist"));var s=r.tileUrlTemplates;if(0!==s.length){var l=e._tilingScheme.getNumberOfYTilesAtLevel(n)-i-1,u=[];e._requestVertexNormals&&r.hasVertexNormals&&u.push(r.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&r.hasWaterMask&&u.push("watermask"),e._requestMetadata&&r.hasMetadata&&u.push("metadata");var c,h,d=s[(t+l+n)%s.length];e$2e(e._currentVersion)&&(d+="&dataVersion="+e._currentVersion),e._isSct&&0===n&&(d=n$17("Assets/Terrain/"+n+"/"+t+"/"+i+".terrain"));var f,p=r.resource;if(e$2e(p._ionEndpoint)&&!e$2e(p._ionEndpoint.externalType)?(0!==u.length&&(h={extensions:u.join("-")}),c=vt$7(void 0)):(c=vt$7(u),e$2e(e._customRequestHeaders)&&(c=p$19(c,e._customRequestHeaders))),0!==n&&(e$2e(e._packingRequest)||e._isBlock))if(e._isBlock&&e$2e(e._packingRequest)&&e._packingRequest===Z$P.QuadKey&&!a){if(o.type=U$1f.BLOCKPACK,o.throttle=!0,o.providerName=e.tablename,f=_t$6(e,t,l,n),o.quadKey=Ne$e(f.x,f.y,f.level),o.blockInfo=f,e$2e(x=e.blockCache[o.quadKey])&&e$2e(x.data))return e.blockCacheQueue.touch(x),e$2e(_=Fe$g(x.data,f))?{buffer:_,layerToUse:r,level:n,x:t,y:i,tmsY:l}:"cacheInvalid"}else if(e._packingRequest!==Z$P.QuadKey||a){if(e._isBlock){var _;if(o.type=U$1f.BLOCK,o.providerName=e.tablename,f=_t$6(e,t,l,n),o.quadKey=Ne$e(f.x,f.y,f.level),o.blockInfo=f,e$2e(x=e.blockCache[o.quadKey])&&e$2e(x.data)&&!a)return e.blockCacheQueue.touch(x),e$2e(_=Fe$g(x.data,f))?{buffer:_,layerToUse:r,level:n,x:t,y:i,tmsY:l}:"cacheInvalid";if(!0===e._indexedDBSetting.isOpen&&e$2e(e._indexedDBScheduler)&&!0===o.cacheEnable)return e$2e(v=e._indexedDBScheduler.getElementFromDB(e.tablename,o.quadKey))?v.then((function(a){if(e$2e(a)){if(a===De$g)return"cacheInvalid";var s=new e$1e(e,o.quadKey,a);e.blockCache[o.quadKey]=s;var u=Fe$g(a,f);return e$2e(u)?e._isTerrainZ&&0!==n?{buffer:u,layerToUse:r,level:n,x:t,y:i,tmsY:l}:e$2e(e._heightmapStructure)?tt$9(e,u):We$b(e,u,n,t,i,l,r):"cacheError"}return"cacheError"}),(function(e){return"cacheError"})):"cacheError"}}else o.type=U$1f.PACK,o.providerName=e.tablename,o.quadKey=Ne$e(t,l,n),o.throttle=!0;if(!e$2e(e._indexedDBSetting)||!0!==e._indexedDBSetting.isOpen||!0!==o.cacheEnable){let s=function(s){var u;if(e$2e(u=0!==e._cacheKey.length?Ot$6(s,e._cacheKey):s)){if(0!==n&&(e$2e(e._packingRequest)||e._isBlock)){if(e._isBlock&&e$2e(e._packingRequest)&&e._packingRequest===Z$P.QuadKey&&!a){!e$2e(o.quadKeyIndex)&&e$2e(o.blockRequest)&&(o.quadKeyIndex=o.blockRequest.quadKeyIndex);var c=gt$5(s,o.quadKeyIndex);e$2e(h=e.blockCache[o.quadKey])&&(h.data=s),e.blockCacheQueue.touch(h),e.blockCacheQueue.trim(e.blockCacheSize),u=Fe$g(c,o.blockInfo)}else if(e._packingRequest!==Z$P.QuadKey||a){if(e._isBlock){var h;if(!e$2e((h=e.blockCache[o.quadKey]).data)&&(h.data=s,!0===e._indexedDBSetting.isOpen&&e$2e(e._indexedDBScheduler)&&!o.cacheEnable)){var d=o.quadKey,f={blob:s.slice(0),key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname,cacheSize:5};Ge$a.scheduleTask(f,[])}e.blockCacheQueue.touch(h),e.blockCacheQueue.trim(e.blockCacheSize),u=Fe$g(s,o.blockInfo)}}else u=gt$5(s,o.quadKeyIndex);if(!e$2e(u))return;if(u===De$g){d=Ne$e(t,l,n),f={blob:De$g,key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname};return void Ge$a.scheduleTask(f,[])}}if(e$2e(e._indexedDBSetting)&&!0===e._indexedDBSetting.isOpen&&!e._isBlock&&e$2e(e._indexedDBScheduler)&&e$2e(u)){d=Ne$e(t,l,n),f={blob:u.slice(0),key:d,tablename:e.tablename,dbname:e._indexedDBScheduler.dbname};Ge$a.scheduleTask(f,[])}return e._isTerrainZ&&0!==n?{buffer:u,layerToUse:r,level:n,x:t,y:i,tmsY:l}:e$2e(e._heightmapStructure)?tt$9(e,u):We$b(e,u,n,t,i,l,r)}};if(e$2e(e._subdomains)&&0!==n){var m=e._subdomains,g=m[(t+i+n)%m.length];d=d.replace(Dt$7,(function(e,t){return"{s}"===t?g:e}))}var x,y;return e._isBlock?e$2e(x=e.blockCache[o.quadKey||n+""+t+i])?x.promise.then(s):(y=bt$5(p,d,r,n,t,i,l,h,c,o,e,a,f))?(x=new e$1e(e,o.quadKey||n+""+t+i),e.blockCache[o.quadKey]=x,x.promise=y,y.then(s)):void 0:(y=bt$5(p,d,r,n,t,i,l,h,c,o,e,a,f))?y.then(s):void 0}if(e$2e(e._indexedDBScheduler)){var v,$=Ne$e(t,l,n);return e$2e(v=e._indexedDBScheduler.getElementFromDB(e.tablename,$))?v.then((function(o){return e$2e(o)?o===De$g?"cacheInvalid":e._isTerrainZ&&0!==n?{buffer:o,layerToUse:r,level:n,x:t,y:i,tmsY:l}:e$2e(e._heightmapStructure)?tt$9(e,o):We$b(e,o,n,t,i,l,r):"cacheError"}),(function(e){return"cacheError"})):"cacheError"}}}function gt$5(e,t){var i=new DataView(e),n=0,r=i.getUint32(n,!0);if(t>r-1)throw new t$15("pack imagery index invalid");n+=4;var o,a,s=[];for(o=0;o<r;o++)a=i.getUint32(n,!0),s.push(a),n+=4;for(o=0;o<r;o++){if(a=s[o],o===t)return 0===a?De$g:new Uint8Array(e).slice(n,n+a).buffer;n+=a}}function Fe$g(e,t){var i=new DataView(e),n=0;i.getUint32(n,!0),n+=4;var r=i.getUint32(n,!0);n+=4;for(var o=t.col,a=t.row*t.blockSize+o,s=0,l=0,u=0;u<r;u++){if(u<a)s+=i.getUint32(n,!0);else if(u===a){l=i.getUint32(n,!0),n+=4;break}n+=4}if(n=8+4*r,0!==l)return n+=s,new Uint8Array(e).slice(n,n+l).buffer}var Ge$a=new i$W("indexedDBWorker");function bt$5(e,t,i,n,r,o,a,s,l,u,c,h,d){var f,p=t.substring(0,t.lastIndexOf("/realspace/")+10);if(e$2e(a$O.CREDENTIAL)&&(t=e$2e(a$O.CREDENTIAL._keymap[p])?a$O.addTokenWithKey(p,t):a$O.addToken(t)),e$2e(d)){var _=d.x,m=d.y;if(n>=c._offset._level){var g=1<<n-c._offset._level;_+=c._offset._x*g/d.blockSize,m+=c._offset._y*g/d.blockSize}f=e.getDerivedResource({url:t,templateValues:{version:i.version,z:n,x:_,y:m},queryParameters:s,headers:l,request:u}).fetchArrayBuffer()}else{var x=u$Z(i.subLevel,0);f=e.getDerivedResource({url:t,templateValues:{version:i.version,z:n-x,x:r,y:a},queryParameters:s,headers:l,request:u}).fetchArrayBuffer()}return f}var Pt$5=new i$W("UnZipTerrainData");ne$u.prototype.unzip=function(e){return Pt$5.scheduleTask({data:e},[e])},ne$u.prototype.createTerrainData=function(e,t,i){return We$b(this,t,e.level,e.x,e.y,e.tmsY,e.layerToUse,i)},Object.defineProperties(ne$u.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this._ready)throw new t$15("credit must not be called before the terrain provider is ready.");return this._credit}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the terrain provider is ready.");return this._tilingScheme}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){if(!this._ready)throw new t$15("hasWaterMask must not be called before the terrain provider is ready.");return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){if(!this._ready)throw new t$15("hasVertexNormals must not be called before the terrain provider is ready.");return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){if(!this._ready)throw new t$15("hasMetadata must not be called before the terrain provider is ready.");return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){if(!this._ready)throw new t$15("availability must not be called before the terrain provider is ready.");return this._availability}},isShowGlobe:{get:function(){return this._isShowGlobe}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}},indexedDBSetting:{get:function(){return this._indexedDBSetting},set:function(e){e$2e(e)&&"boolean"==typeof e.isOpen&&(this._indexedDBSetting.isOpen=e.isOpen)}},hasNormalBuffer:{get:function(){return this._hasNormalBuffer}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2e(e)&&!e$2e(e.length))throw new t$15("Excepted SuperMapTerrainProvider.subdomains to be type of Array.");this._subdomains=e}},currentVersion:{get:function(){return this._currentVersion},set:function(e){this._currentVersion=e,this._blockCache={},this._needRefresh=!0}},historyVersions:{get:function(){return this._historyVersions}},visible:{get:function(){return this._visible},set:function(e){this._visible=e}},extrudeTileBoundingBox:{get:function(){return this._extrudeTileBoundingBox},set:function(e){this._extrudeTileBoundingBox=e}}}),ne$u.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var Ut$6=new h$18;function rt$b(e,t,i,n){if(0!==n){var r=e.availabilityLevels,o=n%r==0?n-r:(n/r|0)*r,a=1<<n-o;return{level:o,x:t/a|0,y:i/a|0}}}function Et$6(e,t,i,n,r,o){if(!e$2e(r.availabilityLevels))return{result:!1};for(var a,s=function(){delete r.availabilityPromiseCache[a]},l=r.availabilityTilesLoaded,u=r.availability,c=rt$b(r,t,i,n);e$2e(c);){if(u.isTileAvailable(c.level,c.x,c.y)&&!l.isTileAvailable(c.level,c.x,c.y)){var h;if(!o&&(a=c.level+"-"+c.x+"-"+c.y,!e$2e(h=r.availabilityPromiseCache[a]))){var d=new r$1c({throttle:!0,throttleByServer:!0,type:U$1f.TERRAIN});e$2e(h=yt$5(e,c.x,c.y,c.level,r,d))&&(r.availabilityPromiseCache[a]=h,h.then(s))}return{result:!0,promise:h}}c=rt$b(r,c.x,c.y,c.level)}return{result:!1}}function Ot$6(e,t){var i=new Int8Array(e);for(var n=t.split("").map((function(e){return e.charCodeAt(0)})),r=0;r<n.length;r++)i[r]=i[r]^n[r];return i.buffer}ne$u.prototype.getTileDataAvailable=function(e,t,i){if(e$2e(this._availability)){if(i>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(i,e,t))return!0;if(!this._hasMetadata)return!1;for(var n=this._layers,r=n.length,o=0;o<r;++o){if(Et$6(this,e,t,i,n[o],0===o).result)return}return!1}if(this._isSct&&0!==i){if(-1!==this._levels.indexOf(i)){var a=this._tilingScheme.tileXYToRectangle(e,t,i);return e$2e(h$18.intersection(this._boundsRadians,a,Ut$6))}return!1}},ne$u.prototype.loadTileDataAvailability=function(e,t,i){if(!(!e$2e(this._availability)||i>this._availability._maximumLevel||this._availability.isTileAvailable(i,e,t))&&this._hasMetadata)for(var n=this._layers,r=n.length,o=0;o<r;++o){var a=Et$6(this,e,t,i,n[o],0===o);if(e$2e(a.promise))return a.promise}},ne$u.prototype.saveLocalCache=function(){if(e$2e(this._indexedDBSetting)&&!0===this._indexedDBSetting.isOpen&&e$2e(this._indexedDBScheduler)){var e={tablename:this.tablename,dbname:this._indexedDBScheduler.dbname};Ge$a.scheduleTask(e,[])}},ne$u._getAvailabilityTile=rt$b;var n$z,r$M="",e$Z={};function n$y(e,t){o$1q.defined("endpoint",e),o$1q.defined("endpointResource",t);var i,n=e.externalType,r=e$2e(n);if(r){if("3DTILES"!==n&&"STK_TERRAIN_SERVER"!==n)throw new t$13("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");i={url:e.options.url}}else i={url:e.url,retryAttempts:1,retryCallback:_$D};t$10.call(this,i),this._ionEndpoint=e,this._ionEndpointDomain=r?void 0:new h$16(e.url).authority,this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=r}function _$D(e,t){var i=u$Z(e._ionRoot,e),n=i._ionEndpointResource;return e$2e(t)&&(401===t.statusCode||t.target instanceof Image)?(e$2e(i._pendingPromise)||(i._pendingPromise=n.fetchJson().then((function(e){return i._ionEndpoint=e,e})).always((function(e){return i._pendingPromise=void 0,e}))),i._pendingPromise.then((function(t){return e._ionEndpoint=t,!0}))):o$1l.resolve(!1)}function u$G(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),new ne$u({url:n$y.fromAssetId(1),requestVertexNormals:u$Z(e.requestVertexNormals,!1),requestWaterMask:u$Z(e.requestWaterMask,!1)})}e$Z.defaultAccessToken=r$M,e$Z.defaultServer=new t$10({url:""}),e$Z.getDefaultTokenCredit=function(e){if(e===r$M){if(!e$2e(n$z)){n$z=new r$U("<b> This application is using SuperMap3D's default ion access token. Please assign <i>SuperMap3D.Ion.defaultAccessToken</i> with an access token from your ion account before making any SuperMap3D API calls. You can sign up for a free ion account at .</b>",!0)}return n$z}},e$2e(Object.create)&&(n$y.prototype=Object.create(t$10.prototype),n$y.prototype.constructor=n$y),n$y.fromAssetId=function(e,t){var i=n$y._createEndpointResource(e,t);return i.fetchJson().then((function(e){return new n$y(e,i)}))},Object.defineProperties(n$y.prototype,{credits:{get:function(){return e$2e(this._ionRoot)?this._ionRoot.credits:(e$2e(this._credits)||(this._credits=n$y.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource)),this._credits)}}}),n$y.getCreditsFromEndpoint=function(e,t){var i=e.attributions.map(r$U.getIonCredit),n=e$Z.getDefaultTokenCredit(t.queryParameters.access_token);return e$2e(n)&&i.push(r$U.clone(n)),i},n$y.prototype.clone=function(e){var t=u$Z(this._ionRoot,this);return e$2e(e)||(e=new n$y(t._ionEndpoint,t._ionEndpointResource)),(e=t$10.prototype.clone.call(this,e))._ionRoot=t,e._isExternal=this._isExternal,e},n$y.prototype.fetchImage=function(e){if(!this._isExternal){var t=e;e={preferBlob:!0},e$2e(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return t$10.prototype.fetchImage.call(this,e)},n$y.prototype._makeRequest=function(e){return this._isExternal||new h$16(this.url).authority!==this._ionEndpointDomain||(e$2e(e.headers)||(e.headers={}),e.headers.Authorization="Bearer "+this._ionEndpoint.accessToken),t$10.prototype._makeRequest.call(this,e)},n$y._createEndpointResource=function(e,t){o$1q.defined("assetId",e),t=u$Z(t,u$Z.EMPTY_OBJECT);var i=u$Z(t.server,e$Z.defaultServer),n=u$Z(t.accessToken,e$Z.defaultAccessToken);i=t$10.createIfNeeded(i);var r={url:"v1/assets/"+e+"/endpoint"};return e$2e(n)&&(r.queryParameters={access_token:n}),i.getDerivedResource(r)};var Pa$1=function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]},Y$x=1,tt$8=2,wa$1=4,Ot$5=5,ot$5=484813681109536e-20,m$K=Math.PI/2,Sa$1=.16666666666666666,Ia$2=.04722222222222222,Ra$2=.022156084656084655,_$C=1e-10,$$E=.017453292519943295,H$K=57.29577951308232,w$G=Math.PI/4,qt$5=2*Math.PI,R$D=3.14159265359,z$I={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},Oa$1={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},Ft$6=/[\s_\-\/\(\)]/g;function X$D(e,t){if(e[t])return e[t];for(var i,n=Object.keys(e),r=t.toLowerCase().replace(Ft$6,""),o=-1;++o<n.length;)if((i=n[o]).toLowerCase().replace(Ft$6,"")===r)return e[i]}var Tt$5=function(e){var t,i,n,r={},o=e.split("+").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var i=t.split("=");return i.push(!0),e[i[0].toLowerCase()]=i[1],e}),{}),a={proj:"projName",datum:"datumCode",rf:function(e){r.rf=parseFloat(e)},lat_0:function(e){r.lat0=e*$$E},lat_1:function(e){r.lat1=e*$$E},lat_2:function(e){r.lat2=e*$$E},lat_ts:function(e){r.lat_ts=e*$$E},lon_0:function(e){r.long0=e*$$E},lon_1:function(e){r.long1=e*$$E},lon_2:function(e){r.long2=e*$$E},alpha:function(e){r.alpha=parseFloat(e)*$$E},lonc:function(e){r.longc=e*$$E},x_0:function(e){r.x0=parseFloat(e)},y_0:function(e){r.y0=parseFloat(e)},k_0:function(e){r.k0=parseFloat(e)},k:function(e){r.k0=parseFloat(e)},a:function(e){r.a=parseFloat(e)},b:function(e){r.b=parseFloat(e)},r_a:function(){r.R_A=!0},zone:function(e){r.zone=parseInt(e,10)},south:function(){r.utmSouth=!0},towgs84:function(e){r.datum_params=e.split(",").map((function(e){return parseFloat(e)}))},to_meter:function(e){r.to_meter=parseFloat(e)},units:function(e){r.units=e;var t=X$D(Oa$1,e);t&&(r.to_meter=t.to_meter)},from_greenwich:function(e){r.from_greenwich=e*$$E},pm:function(e){var t=X$D(z$I,e);r.from_greenwich=(t||parseFloat(e))*$$E},nadgrids:function(e){"@null"===e?r.datumCode="none":r.nadgrids=e},axis:function(e){var t="ewnsud";3===e.length&&-1!==t.indexOf(e.substr(0,1))&&-1!==t.indexOf(e.substr(1,1))&&-1!==t.indexOf(e.substr(2,1))&&(r.axis=e)}};for(t in o)i=o[t],t in a?"function"==typeof(n=a[t])?n(i):r[n]=i:r[t]=i;return"string"==typeof r.datumCode&&"WGS84"!==r.datumCode&&(r.datumCode=r.datumCode.toLowerCase()),r},lt$2=1,jt$3=2,Qt$4=3,xt$5=4,Wt$6=5,$t$2=-1,qa$2=/\s/,Ta$2=/[A-Za-z]/,$a$2=/[A-Za-z84]/,bt$4=/[,\]]/,Ht$4=/[\d\.E\-\+]/;function Q$G(e){if("string"!=typeof e)throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=lt$2}function La$2(e){return new Q$G(e).output()}function Xt$2(e,t,i){Array.isArray(t)&&(i.unshift(t),t=null);var n=t?{}:e,r=i.reduce((function(e,t){return at$8(t,e),e}),n);t&&(e[t]=r)}function at$8(e,t){if(Array.isArray(e)){var i=e.shift();if("PARAMETER"===i&&(i=e.shift()),1===e.length)return Array.isArray(e[0])?(t[i]={},void at$8(e[0],t[i])):void(t[i]=e[0]);if(e.length)if("TOWGS84"!==i){if("AXIS"===i)return i in t||(t[i]=[]),void t[i].push(e);var n;switch(Array.isArray(i)||(t[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return t[i]={name:e[0].toLowerCase(),convert:e[1]},void(3===e.length&&at$8(e[2],t[i]));case"SPHEROID":case"ELLIPSOID":return t[i]={name:e[0],a:e[1],rf:e[2]},void(4===e.length&&at$8(e[3],t[i]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return e[0]=["name",e[0]],void Xt$2(t,i,e);default:for(n=-1;++n<e.length;)if(!Array.isArray(e[n]))return at$8(e,t[i]);return Xt$2(t,i,e)}}else t[i]=e;else t[i]=!0}else t[e]=!0}Q$G.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==xt$5)for(;qa$2.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case lt$2:return this.neutral(e);case jt$3:return this.keyword(e);case xt$5:return this.quoted(e);case Wt$6:return this.afterquote(e);case Qt$4:return this.number(e);case $t$2:return}},Q$G.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=xt$5);if(bt$4.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},Q$G.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=lt$2)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=lt$2,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=$t$2))):void 0},Q$G.prototype.number=function(e){if(!Ht$4.test(e)){if(bt$4.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},Q$G.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=Wt$6},Q$G.prototype.keyword=function(e){if($a$2.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=lt$2)}if(!bt$4.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},Q$G.prototype.neutral=function(e){if(Ta$2.test(e))return this.word=e,void(this.state=jt$3);if('"'===e)return this.word="",void(this.state=xt$5);if(Ht$4.test(e))return this.word=e,void(this.state=Qt$4);if(!bt$4.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},Q$G.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===$t$2)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var Ga$2=.017453292519943295;function za$2(e,t){var i=t[0],n=t[1];!(i in e)&&n in e&&(e[i]=e[n],3===t.length&&(e[i]=t[2](e[i])))}function W$J(e){return e*Ga$2}function Da$2(e){if("GEOGCS"===e.type?e.projName="longlat":"LOCAL_CS"===e.type?(e.projName="identity",e.local=!0):"object"==typeof e.PROJECTION?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",i=0,n=e.AXIS.length;i<n;++i){var r=e.AXIS[i][0].toLowerCase();-1!==r.indexOf("north")?t+="n":-1!==r.indexOf("south")?t+="s":-1!==r.indexOf("east")?t+="e":-1!==r.indexOf("west")&&(t+="w")}2===t.length&&(t+="u"),3===t.length&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.UNIT.convert&&("GEOGCS"===e.type?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var o=e.GEOGCS;function a(t){return t*(e.to_meter||1)}"GEOGCS"===e.type&&(o=e),o&&(o.DATUM?e.datumCode=o.DATUM.name.toLowerCase():e.datumCode=o.name.toLowerCase(),"d_"===e.datumCode.slice(0,2)&&(e.datumCode=e.datumCode.slice(2)),("new_zealand_geodetic_datum_1949"===e.datumCode||"new_zealand_1949"===e.datumCode)&&(e.datumCode="nzgd49"),("wgs_1984"===e.datumCode||"world_geodetic_system_1984"===e.datumCode)&&("Mercator_Auxiliary_Sphere"===e.PROJECTION&&(e.sphere=!0),e.datumCode="wgs84"),"_ferro"===e.datumCode.slice(-6)&&(e.datumCode=e.datumCode.slice(0,-6)),"_jakarta"===e.datumCode.slice(-8)&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(e.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===e.ellps.toLowerCase().slice(0,13)&&(e.ellps="intl"),e.a=o.DATUM.SPHEROID.a,e.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(e.datum_params=o.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),"ch1903+"===e.datumCode&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a);[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",W$J],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",W$J],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",W$J],["lat0","latitude_of_origin",W$J],["lat0","standard_parallel_1",W$J],["lat1","standard_parallel_1",W$J],["lat2","standard_parallel_2",W$J],["azimuth","Azimuth"],["alpha","azimuth",W$J],["srsCode","name"]].forEach((function(t){return za$2(e,t)})),!e.long0&&e.longc&&("Albers_Conic_Equal_Area"===e.projName||"Lambert_Azimuthal_Equal_Area"===e.projName)&&(e.long0=e.longc),!e.lat_ts&&e.lat1&&("Stereographic_South_Pole"===e.projName||"Polar Stereographic (variant B)"===e.projName)&&(e.lat0=W$J(e.lat1>0?90:-90),e.lat_ts=e.lat1)}var Kt$4=function(e){var t=La$2(e),i=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",i]);var r={};return at$8(t,r),Da$2(r),r};function L$Q(e){var t=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?L$Q[e]=Tt$5(arguments[1]):L$Q[e]=Kt$4(arguments[1]):L$Q[e]=i}else if(1===arguments.length){if(Array.isArray(e))return e.map((function(e){Array.isArray(e)?L$Q.apply(t,e):L$Q(e)}));if("string"==typeof e){if(e in L$Q)return L$Q[e]}else"EPSG"in e?L$Q["EPSG:"+e.EPSG]=e:"ESRI"in e?L$Q["ESRI:"+e.ESRI]=e:"IAU2000"in e?L$Q["IAU2000:"+e.IAU2000]=e:console.log(e);return}}function ka$1(e){return"string"==typeof e}function pa$1(e){return e in L$Q}Pa$1(L$Q);var Ua$2=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Ba$2(e){return Ua$2.some((function(t){return e.indexOf(t)>-1}))}var Fa$2=["3857","900913","3785","102113"];function ja$1(e){var t=X$D(e,"authority");if(t){var i=X$D(t,"epsg");return i&&Fa$2.indexOf(i)>-1}}function Qa$2(e){var t=X$D(e,"extension");if(t)return X$D(t,"proj4")}function Wa$1(e){return"+"===e[0]}function Ha$1(e){if(!ka$1(e))return e;if(pa$1(e))return L$Q[e];if(Ba$2(e)){var t=Kt$4(e);if(ja$1(t))return L$Q["EPSG:3857"];var i=Qa$2(t);return i?Tt$5(i):t}return Wa$1(e)?Tt$5(e):void 0}var Jt$3=function(e,t){var i,n;if(e=e||{},!t)return e;for(n in t)void 0!==(i=t[n])&&(e[n]=i);return e},F$J=function(e,t,i){var n=e*t;return i/Math.sqrt(1-n*n)},ft$5=function(e){return e<0?-1:1},g$N=function(e){return Math.abs(e)<=R$D?e:e-ft$5(e)*qt$5},U$J=function(e,t,i){var n=e*i,r=.5*e;return n=Math.pow((1-n)/(1+n),r),Math.tan(.5*(m$K-t))/n},Mt$5=function(e,t){for(var i,n,r=.5*e,o=m$K-2*Math.atan(t),a=0;a<=15;a++)if(i=e*Math.sin(o),o+=n=m$K-2*Math.atan(t*Math.pow((1-i)/(1+i),r))-o,Math.abs(n)<=1e-10)return o;return-9999};function Xa$2(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=F$J(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Ka$2(e){var t,i,n=e.x,r=e.y;if(r*H$K>90&&r*H$K<-90&&n*H$K>180&&n*H$K<-180)return null;if(Math.abs(Math.abs(r)-m$K)<=_$C)return null;if(this.sphere)t=this.x0+this.a*this.k0*g$N(n-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(w$G+.5*r));else{var o=Math.sin(r),a=U$J(this.e,r,o);t=this.x0+this.a*this.k0*g$N(n-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=i,e}function Ja$2(e){var t,i,n=e.x-this.x0,r=e.y-this.y0;if(this.sphere)i=m$K-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var o=Math.exp(-r/(this.a*this.k0));if(-9999===(i=Mt$5(this.e,o)))return null}return t=g$N(this.long0+n/(this.a*this.k0)),e.x=t,e.y=i,e}var Za$2=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],Va$1={init:Xa$2,forward:Ka$2,inverse:Ja$2,names:Za$2};function Ya$2(){}function Zt$2(e){return e}var ts=["longlat","identity"],as={init:Ya$2,forward:Zt$2,inverse:Zt$2,names:ts},ss=[Va$1,as],Ct$4={},Et$5=[];function Vt$6(e,t){var i=Et$5.length;return e.names?(Et$5[i]=e,e.names.forEach((function(e){Ct$4[e.toLowerCase()]=i})),this):(console.log(t),!0)}function is(e){if(!e)return!1;var t=e.toLowerCase();return typeof Ct$4[t]<"u"&&Et$5[Ct$4[t]]?Et$5[Ct$4[t]]:void 0}function hs(){ss.forEach(Vt$6)}var es={start:hs,add:Vt$6,get:is},b$Q={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},rs=b$Q.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};function ns(e,t,i,n){var r=e*e,o=t*t,a=(r-o)/r,s=0;return n?(r=(e*=1-a*(Sa$1+a*(Ia$2+a*Ra$2)))*e,a=0):s=Math.sqrt(a),{es:a,e:s,ep2:(r-o)/o}}function os(e,t,i,n,r){if(!e){var o=X$D(b$Q,n);o||(o=rs),e=o.a,t=o.b,i=o.rf}return i&&!t&&(t=(1-1/i)*e),(0===i||Math.abs(e-t)<_$C)&&(r=!0,t=e),{a:e,b:t,rf:i,sphere:r}}b$Q.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var q$L={};function ls(e,t,i,n,r,o){var a={};return a.datum_type=void 0===e||"none"===e?Ot$5:wa$1,t&&(a.datum_params=t.map(parseFloat),(0!==a.datum_params[0]||0!==a.datum_params[1]||0!==a.datum_params[2])&&(a.datum_type=Y$x),a.datum_params.length>3&&(0!==a.datum_params[3]||0!==a.datum_params[4]||0!==a.datum_params[5]||0!==a.datum_params[6])&&(a.datum_type=tt$8,a.datum_params[3]*=ot$5,a.datum_params[4]*=ot$5,a.datum_params[5]*=ot$5,a.datum_params[6]=a.datum_params[6]/1e6+1)),a.a=i,a.b=n,a.es=r,a.ep2=o,a}function j$F(e,t){if(!(this instanceof j$F))return new j$F(e);t=t||function(e){if(e)throw e};var i=Ha$1(e);if("object"==typeof i){var n=j$F.projections.get(i.projName);if(n){if(i.datumCode&&"none"!==i.datumCode){var r=X$D(q$L,i.datumCode);r&&(i.datum_params=r.towgs84?r.towgs84.split(","):null,i.ellps=r.ellipse,i.datumName=r.datumName?r.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84";var o=os(i.a,i.b,i.rf,i.ellps,i.sphere),a=ns(o.a,o.b,o.rf,i.R_A),s=i.datum||ls(i.datumCode,i.datum_params,o.a,o.b,a.es,a.ep2);Jt$3(this,i),Jt$3(this,n),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=s,this.init(),t(null,this)}else t(e)}else t(e)}function fs(e,t){return!(e.datum_type!==t.datum_type||e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===Y$x?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==tt$8||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}function Yt$3(e,t,i){var n,r,o,a,s=e.x,l=e.y,u=e.z?e.z:0;if(l<-m$K&&l>-1.001*m$K)l=-m$K;else if(l>m$K&&l<1.001*m$K)l=m$K;else{if(l<-m$K)return{x:-1/0,y:-1/0,z:e.z};if(l>m$K)return{x:1/0,y:1/0,z:e.z}}return s>Math.PI&&(s-=2*Math.PI),r=Math.sin(l),a=Math.cos(l),o=r*r,{x:((n=i/Math.sqrt(1-t*o))+u)*a*Math.cos(s),y:(n+u)*a*Math.sin(s),z:(n*(1-t)+u)*r}}function ta$3(e,t,i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y=1e-12,v=e.x,$=e.y,b=e.z?e.z:0;if(r=Math.sqrt(v*v+$*$),o=Math.sqrt(v*v+$*$+b*b),r/i<y){if(g=0,o/i<y)return m$K,x=-n,{x:e.x,y:e.y,z:e.z}}else g=Math.atan2($,v);a=b/o,h=(s=r/o)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*s*s)),d=a*l,m=0;do{m++,u=t*(c=i/Math.sqrt(1-t*d*d))/(c+(x=r*h+b*d-c*(1-t*d*d))),_=(p=a*(l=1/Math.sqrt(1-u*(2-u)*s*s)))*h-(f=s*(1-u)*l)*d,h=f,d=p}while(_*_>1e-24&&m<30);return{x:g,y:Math.atan(p/Math.abs(f)),z:x}}function Ms(e,t,i){if(t===Y$x)return{x:e.x+i[0],y:e.y+i[1],z:e.z+i[2]};if(t===tt$8){var n=i[0],r=i[1],o=i[2],a=i[3],s=i[4],l=i[5],u=i[6];return{x:u*(e.x-l*e.y+s*e.z)+n,y:u*(l*e.x+e.y-a*e.z)+r,z:u*(-s*e.x+a*e.y+e.z)+o}}}function vs(e,t,i){if(t===Y$x)return{x:e.x-i[0],y:e.y-i[1],z:e.z-i[2]};if(t===tt$8){var n=i[0],r=i[1],o=i[2],a=i[3],s=i[4],l=i[5],u=i[6],c=(e.x-n)/u,h=(e.y-r)/u,d=(e.z-o)/u;return{x:c+l*h-s*d,y:-l*c+h+a*d,z:s*c-a*h+d}}}function At$5(e){return e===Y$x||e===tt$8}q$L.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},q$L.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},q$L.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},q$L.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},q$L.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},q$L.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},q$L.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},q$L.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},q$L.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},q$L.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},q$L.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},q$L.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},q$L.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},q$L.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},q$L.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},q$L.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},q$L.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},j$F.projections=es,j$F.projections.start();var us=function(e,t,i){return fs(e,t)||e.datum_type===Ot$5||t.datum_type===Ot$5||e.es===t.es&&e.a===t.a&&!At$5(e.datum_type)&&!At$5(t.datum_type)?i:(i=Yt$3(i,e.es,e.a),At$5(e.datum_type)&&(i=Ms(i,e.datum_type,e.datum_params)),At$5(t.datum_type)&&(i=vs(i,t.datum_type,t.datum_params)),ta$3(i,t.es,t.a,t.b))},aa$4=function(e,t,i){var n,r,o,a=i.x,s=i.y,l=i.z||0,u={};for(o=0;o<3;o++)if(!t||2!==o||void 0!==i.z)switch(0===o?(n=a,r=-1!=="ew".indexOf(e.axis[o])?"x":"y"):1===o?(n=s,r=-1!=="ns".indexOf(e.axis[o])?"y":"x"):(n=l,r="z"),e.axis[o]){case"e":case"w":case"n":case"s":u[r]=n;break;case"u":void 0!==i[r]&&(u.z=n);break;case"d":void 0!==i[r]&&(u.z=-n);break;default:return null}return u},sa$3=function(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t},cs=function(e){ia$3(e.x),ia$3(e.y)};function ia$3(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function ms(e,t){return(e.datum.datum_type===Y$x||e.datum.datum_type===tt$8)&&"WGS84"!==t.datumCode||(t.datum.datum_type===Y$x||t.datum.datum_type===tt$8)&&"WGS84"!==e.datumCode}function Nt$6(e,t,i){var n;return Array.isArray(i)&&(i=sa$3(i)),cs(i),e.datum&&t.datum&&ms(e,t)&&(i=Nt$6(e,n=new j$F("WGS84"),i),e=n),"enu"!==e.axis&&(i=aa$4(e,!1,i)),"longlat"===e.projName?i={x:i.x*$$E,y:i.y*$$E,z:i.z||0}:(e.to_meter&&(i={x:i.x*e.to_meter,y:i.y*e.to_meter,z:i.z||0}),i=e.inverse(i)),e.from_greenwich&&(i.x+=e.from_greenwich),i=us(e.datum,t.datum,i),t.from_greenwich&&(i={x:i.x-t.from_greenwich,y:i.y,z:i.z||0}),"longlat"===t.projName?i={x:i.x*H$K,y:i.y*H$K,z:i.z||0}:(i=t.forward(i),t.to_meter&&(i={x:i.x/t.to_meter,y:i.y/t.to_meter,z:i.z||0})),"enu"!==t.axis?aa$4(t,!0,i):i}var ha$3=j$F("WGS84");function Lt$4(e,t,i){var n,r,o;return Array.isArray(i)?(n=Nt$6(e,t,i)||{x:NaN,y:NaN},i.length>2?typeof e.name<"u"&&"geocent"===e.name||typeof t.name<"u"&&"geocent"===t.name?"number"==typeof n.z?[n.x,n.y,n.z].concat(i.splice(3)):[n.x,n.y,i[2]].concat(i.splice(3)):[n.x,n.y].concat(i.splice(2)):[n.x,n.y]):(r=Nt$6(e,t,i),2===(o=Object.keys(i)).length||o.forEach((function(n){if(typeof e.name<"u"&&"geocent"===e.name||typeof t.name<"u"&&"geocent"===t.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;r[n]=i[n]})),r)}function ea$5(e){return e instanceof j$F?e:e.oProj?e.oProj:j$F(e)}function k$D(e,t,i){e=ea$5(e);var n,r=!1;return typeof t>"u"?(t=e,e=ha$3,r=!0):(typeof t.x<"u"||Array.isArray(t))&&(i=t,t=e,e=ha$3,r=!0),t=ea$5(t),i?Lt$4(e,t,i):(n={forward:function(i){return Lt$4(e,t,i)},inverse:function(i){return Lt$4(t,e,i)}},r&&(n.oProj=t),n)}var ra$4=6,na$3="AJSAJS",oa$4="AFAFAF",st$4=65,D$E=73,p$M=79,vt$6=86,ut$7=90,ds={forward:la$3,inverse:ys,toPoint:fa$2};function la$3(e,t){return t=t||5,xs(_s({lat:e[1],lon:e[0]}),t)}function ys(e){var t=zt$4(ua$2(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function fa$2(e){var t=zt$4(ua$2(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Gt$4(e){return e*(Math.PI/180)}function Ma$2(e){return e/Math.PI*180}function _s(e){var t,i,n,r,o,a,s,l=e.lat,u=e.lon,c=6378137,h=.00669438,d=.9996,f=Gt$4(l),p=Gt$4(u);s=Math.floor((u+180)/6)+1,180===u&&(s=60),l>=56&&l<64&&u>=3&&u<12&&(s=32),l>=72&&l<84&&(u>=0&&u<9?s=31:u>=9&&u<21?s=33:u>=21&&u<33?s=35:u>=33&&u<42&&(s=37)),a=Gt$4(6*(s-1)-180+3),t=h/(1-h),i=c/Math.sqrt(1-h*Math.sin(f)*Math.sin(f)),n=Math.tan(f)*Math.tan(f),r=t*Math.cos(f)*Math.cos(f);var _=d*i*((o=Math.cos(f)*(p-a))+(1-n+r)*o*o*o/6+(5-18*n+n*n+72*r-58*t)*o*o*o*o*o/120)+5e5,m=d*(c*(.9983242984503243*f-.002514607064228144*Math.sin(2*f)+2639046602129982e-21*Math.sin(4*f)-35*h*h*h/3072*Math.sin(6*f))+i*Math.tan(f)*(o*o/2+(5-n+9*r+4*r*r)*o*o*o*o/24+(61-58*n+n*n+600*r-330*t)*o*o*o*o*o*o/720));return l<0&&(m+=1e7),{northing:Math.round(m),easting:Math.round(_),zoneNumber:s,zoneLetter:gs(l)}}function zt$4(e){var t=e.northing,i=e.easting,n=e.zoneLetter,r=e.zoneNumber;if(r<0||r>60)return null;var o,a,s,l,u,c,h,d,f,p=.9996,_=6378137,m=.00669438,g=(1-Math.sqrt(1-m))/(1+Math.sqrt(1-m)),x=i-5e5,y=t;n<"N"&&(y-=1e7),h=6*(r-1)-180+3,o=m/(1-m),f=(d=y/p/6367449.145945056)+(3*g/2-27*g*g*g/32)*Math.sin(2*d)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*d)+151*g*g*g/96*Math.sin(6*d),a=_/Math.sqrt(1-m*Math.sin(f)*Math.sin(f)),s=Math.tan(f)*Math.tan(f),l=o*Math.cos(f)*Math.cos(f),u=_*(1-m)/Math.pow(1-m*Math.sin(f)*Math.sin(f),1.5),c=x/(a*p);var v=f-a*Math.tan(f)/u*(c*c/2-(5+3*s+10*l-4*l*l-9*o)*c*c*c*c/24+(61+90*s+298*l+45*s*s-252*o-3*l*l)*c*c*c*c*c*c/720);v=Ma$2(v);var $,b=(c-(1+2*s+l)*c*c*c/6+(5-2*l+28*s-3*l*l+8*o+24*s*s)*c*c*c*c*c/120)/Math.cos(f);if(b=h+Ma$2(b),e.accuracy){var T=zt$4({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});$={top:T.lat,right:T.lon,bottom:v,left:b}}else $={lat:v,lon:b};return $}function gs(e){var t="Z";return 84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C"),t}function xs(e,t){var i="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+bs(e.easting,e.northing,e.zoneNumber)+i.substr(i.length-5,t)+n.substr(n.length-5,t)}function bs(e,t,i){var n=va$1(i);return Cs(Math.floor(e/1e5),Math.floor(t/1e5)%20,n)}function va$1(e){var t=e%ra$4;return 0===t&&(t=ra$4),t}function Cs(e,t,i){var n=i-1,r=na$3.charCodeAt(n),o=oa$4.charCodeAt(n),a=r+e-1,s=o+t,l=!1;return a>ut$7&&(a=a-ut$7+st$4-1,l=!0),(a===D$E||r<D$E&&a>D$E||(a>D$E||r<D$E)&&l)&&a++,(a===p$M||r<p$M&&a>p$M||(a>p$M||r<p$M)&&l)&&(++a===D$E&&a++),a>ut$7&&(a=a-ut$7+st$4-1),s>vt$6?(s=s-vt$6+st$4-1,l=!0):l=!1,(s===D$E||o<D$E&&s>D$E||(s>D$E||o<D$E)&&l)&&s++,(s===p$M||o<p$M&&s>p$M||(s>p$M||o<p$M)&&l)&&(++s===D$E&&s++),s>vt$6&&(s=s-vt$6+st$4-1),String.fromCharCode(a)+String.fromCharCode(s)}function ua$2(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,i=e.length,n=null,r="",o=0;!/[A-Z]/.test(t=e.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+e;r+=t,o++}var a=parseInt(r,10);if(0===o||o+3>i)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(o++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+e;n=e.substring(o,o+=2);for(var l=va$1(a),u=Es(n.charAt(0),l),c=As(n.charAt(1),l);c<Ns(s);)c+=2e6;var h=i-o;if(h%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+e;var d,f,p,_=h/2,m=0,g=0;return _>0&&(d=1e5/Math.pow(10,_),f=e.substring(o,o+_),m=parseFloat(f)*d,p=e.substring(o+_),g=parseFloat(p)*d),{easting:m+u,northing:g+c,zoneLetter:s,zoneNumber:a,accuracy:d}}function Es(e,t){for(var i=na$3.charCodeAt(t-1),n=1e5,r=!1;i!==e.charCodeAt(0);){if(++i===D$E&&i++,i===p$M&&i++,i>ut$7){if(r)throw"Bad character: "+e;i=st$4,r=!0}n+=1e5}return n}function As(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var i=oa$4.charCodeAt(t-1),n=0,r=!1;i!==e.charCodeAt(0);){if(++i===D$E&&i++,i===p$M&&i++,i>vt$6){if(r)throw"Bad character: "+e;i=st$4,r=!0}n+=1e5}return n}function Ns(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function it$5(e,t,i){if(!(this instanceof it$5))return new it$5(e,t,i);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&typeof t>"u"){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}it$5.fromMGRS=function(e){return new it$5(fa$2(e))},it$5.prototype.toMGRS=function(e){return la$3([this.x,this.y],e)};var Ps=1,ws=.25,ca$1=.046875,ma$2=.01953125,da=.01068115234375,Ss=.75,Is=.46875,Rs=.013020833333333334,Os=.007120768229166667,qs=.3645833333333333,Ts=.005696614583333333,$s=.3076171875,ya$1=function(e){var t=[];t[0]=Ps-e*(ws+e*(ca$1+e*(ma$2+e*da))),t[1]=e*(Ss-e*(ca$1+e*(ma$2+e*da)));var i=e*e;return t[2]=i*(Is-e*(Rs+e*Os)),i*=e,t[3]=i*(qs-e*Ts),t[4]=i*e*$s,t},Pt$4=function(e,t,i,n){return i*=t,t*=t,n[0]*e-i*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))},Ls=20,_a$2=function(e,t,i){for(var n=1/(1-t),r=e,o=Ls;o;--o){var a=Math.sin(r),s=1-t*a*a;if(r-=s=(Pt$4(r,a,Math.cos(r),i)-e)*(s*Math.sqrt(s))*n,Math.abs(s)<_$C)return r}return r};function Gs(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=ya$1(this.es),this.ml0=Pt$4(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function zs(e){var t,i,n,r=e.x,o=e.y,a=g$N(r-this.long0),s=Math.sin(o),l=Math.cos(o);if(this.es){var u=l*a,c=Math.pow(u,2),h=this.ep2*Math.pow(l,2),d=Math.pow(h,2),f=Math.abs(l)>_$C?Math.tan(o):0,p=Math.pow(f,2),_=Math.pow(p,2);t=1-this.es*Math.pow(s,2),u/=Math.sqrt(t);var m=Pt$4(o,s,l,this.en);i=this.a*(this.k0*u*(1+c/6*(1-p+h+c/20*(5-18*p+_+14*h-58*p*h+c/42*(61+179*_-_*p-479*p)))))+this.x0,n=this.a*(this.k0*(m-this.ml0+s*a*u/2*(1+c/12*(5-p+9*h+4*d+c/30*(61+_-58*p+270*h-330*p*h+c/56*(1385+543*_-_*p-3111*p))))))+this.y0}else{var g=l*Math.sin(a);if(Math.abs(Math.abs(g)-1)<_$C)return 93;if(i=.5*this.a*this.k0*Math.log((1+g)/(1-g))+this.x0,n=l*Math.cos(a)/Math.sqrt(1-Math.pow(g,2)),(g=Math.abs(n))>=1){if(g-1>_$C)return 93;n=0}else n=Math.acos(n);o<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return e.x=i,e.y=n,e}function Ds(e){var t,i,n,r,o=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,i=_a$2(t,this.es,this.en),Math.abs(i)<m$K){var s=Math.sin(i),l=Math.cos(i),u=Math.abs(l)>_$C?Math.tan(i):0,c=this.ep2*Math.pow(l,2),h=Math.pow(c,2),d=Math.pow(u,2),f=Math.pow(d,2);t=1-this.es*Math.pow(s,2);var p=o*Math.sqrt(t)/this.k0,_=Math.pow(p,2);n=i-(t*=u)*_/(1-this.es)*.5*(1-_/12*(5+3*d-9*c*d+c-4*h-_/30*(61+90*d-252*c*d+45*f+46*c-_/56*(1385+3633*d+4095*f+1574*f*d)))),r=g$N(this.long0+p*(1-_/6*(1+2*d+c-_/20*(5+28*d+24*f+8*c*d+6*c-_/42*(61+662*d+1320*f+720*f*d))))/l)}else n=m$K*ft$5(a),r=0;else{var m=Math.exp(o/this.k0),g=.5*(m-1/m),x=this.lat0+a/this.k0,y=Math.cos(x);t=Math.sqrt((1-Math.pow(y,2))/(1+Math.pow(g,2))),n=Math.asin(t),a<0&&(n=-n),r=0===g&&0===y?0:g$N(Math.atan2(g,y)+this.long0)}return e.x=r,e.y=n,e}var ks=["Transverse_Mercator","Transverse Mercator","tmerc"],ps={init:Gs,forward:zs,inverse:Ds,names:ks},ga$2=function(e){var t=Math.exp(e);return t=(t-1/t)/2},Dt$6=function(e,t){e=Math.abs(e),t=Math.abs(t);var i=Math.max(e,t),n=Math.min(e,t)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))},Us=function(e){var t=1+e,i=t-1;return 0===i?e:e*Math.log(t)/i},Bs=function(e){var t=Math.abs(e);return t=Us(t*(1+t/(Dt$6(1,t)+1))),e<0?-t:t},kt$5=function(e,t){for(var i,n=2*Math.cos(2*t),r=e.length-1,o=e[r],a=0;--r>=0;)i=n*o-a+e[r],a=o,o=i;return t+i*Math.sin(2*t)},Fs=function(e,t){for(var i,n=2*Math.cos(t),r=e.length-1,o=e[r],a=0;--r>=0;)i=n*o-a+e[r],a=o,o=i;return Math.sin(t)*i},js=function(e){var t=Math.exp(e);return t=(t+1/t)/2},xa$2=function(e,t,i){for(var n,r,o=Math.sin(t),a=Math.cos(t),s=ga$2(i),l=js(i),u=2*a*l,c=-2*o*s,h=e.length-1,d=e[h],f=0,p=0,_=0;--h>=0;)n=p,r=f,d=u*(p=d)-n-c*(f=_)+e[h],_=c*p-r+u*f;return[(u=o*l)*d-(c=a*s)*_,u*_+c*d]};function Qs(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),i=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),i*=t,this.cgb[1]=i*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),i*=t,this.cgb[2]=i*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=i*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),i*=t,this.cgb[3]=i*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=i*(1237/630+t*(t*(-24832/14175)-2.4)),i*=t,this.cgb[4]=i*(4174/315+t*(-144838/6237)),this.cbg[4]=i*(-734/315+t*(109598/31185)),i*=t,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=i*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=i*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),i*=t,this.utg[2]=i*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=i*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),i*=t,this.utg[3]=i*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=i*(49561/161280+t*(-179/168+t*(6601661/7257600))),i*=t,this.utg[4]=i*(-4583/161280+t*(108847/3991680)),this.gtu[4]=i*(34729/80640+t*(-3418889/1995840)),i*=t,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var n=kt$5(this.cbg,this.lat0);this.Zb=-this.Qn*(n+Fs(this.gtu,2*n))}function Ws(e){var t=g$N(e.x-this.long0),i=e.y;i=kt$5(this.cbg,i);var n=Math.sin(i),r=Math.cos(i),o=Math.sin(t),a=Math.cos(t);i=Math.atan2(n,a*r),t=Math.atan2(o*r,Dt$6(n,r*a)),t=Bs(Math.tan(t));var s,l,u=xa$2(this.gtu,2*i,2*t);return i+=u[0],t+=u[1],Math.abs(t)<=2.623395162778?(s=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*i+this.Zb)+this.y0):(s=1/0,l=1/0),e.x=s,e.y=l,e}function Hs(e){var t,i,n=(e.x-this.x0)*(1/this.a),r=(e.y-this.y0)*(1/this.a);if(r=(r-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var o=xa$2(this.utg,2*r,2*n);r+=o[0],n+=o[1],n=Math.atan(ga$2(n));var a=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);r=Math.atan2(a*u,Dt$6(l,u*s)),n=Math.atan2(l,u*s),t=g$N(n+this.long0),i=kt$5(this.cgb,r)}else t=1/0,i=1/0;return e.x=t,e.y=i,e}var Xs=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"],wt$5={init:Qs,forward:Ws,inverse:Hs,names:Xs},Ks=function(e,t){if(void 0===e){if((e=Math.floor(30*(g$N(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e},Js="etmerc";function Zs(){var e=Ks(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*$$E,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,wt$5.init.apply(this),this.forward=wt$5.forward,this.inverse=wt$5.inverse}var Vs=["Universal Transverse Mercator System","utm"],Ys={init:Zs,names:Vs,dependsOn:Js},pt$6=function(e,t){return Math.pow((1-e)/(1+e),t)},ti$3=20;function ai$4(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+w$G)/(Math.pow(Math.tan(.5*this.lat0+w$G),this.C)*pt$6(this.e*e,this.ratexp))}function si$3(e){var t=e.x,i=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+w$G),this.C)*pt$6(this.e*Math.sin(i),this.ratexp))-m$K,e.x=this.C*t,e}function ii$3(e){for(var t=e.x/this.C,i=e.y,n=Math.pow(Math.tan(.5*i+w$G)/this.K,1/this.C),r=ti$3;r>0&&(i=2*Math.atan(n*pt$6(this.e*Math.sin(e.y),-.5*this.e))-m$K,!(Math.abs(i-e.y)<1e-14));--r)e.y=i;return r?(e.x=t,e.y=i,e):null}var hi$5=["gauss"],Ut$5={init:ai$4,forward:si$3,inverse:ii$3,names:hi$5};function ei$3(){Ut$5.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function ri$3(e){var t,i,n,r;return e.x=g$N(e.x-this.long0),Ut$5.forward.apply(this,[e]),t=Math.sin(e.y),i=Math.cos(e.y),n=Math.cos(e.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*i*n),e.x=r*i*Math.sin(e.x),e.y=r*(this.cosc0*t-this.sinc0*i*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function ni$4(e){var t,i,n,r,o;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,o=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(o,this.R2);t=Math.sin(a),i=Math.cos(a),r=Math.asin(i*this.sinc0+e.y*t*this.cosc0/o),n=Math.atan2(e.x*t,o*this.cosc0*i-e.y*this.sinc0*t)}else r=this.phic0,n=0;return e.x=n,e.y=r,Ut$5.inverse.apply(this,[e]),e.x=g$N(e.x+this.long0),e}var oi$3=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],li$5={init:ei$3,forward:ri$3,inverse:ni$4,names:oi$3};function fi$5(e,t,i){return t*=i,Math.tan(.5*(m$K+e))*Math.pow((1-t)/(1+t),.5*i)}function Mi$5(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=_$C&&(this.k0=.5*(1+ft$5(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=_$C&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=_$C&&(this.k0=.5*this.cons*F$J(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/U$J(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=F$J(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-m$K,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function vi$5(e){var t,i,n,r,o,a,s=e.x,l=e.y,u=Math.sin(l),c=Math.cos(l),h=g$N(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=_$C&&Math.abs(l+this.lat0)<=_$C?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*u+this.coslat0*c*Math.cos(h)),e.x=this.a*t*c*Math.sin(h)+this.x0,e.y=this.a*t*(this.coslat0*u-this.sinlat0*c*Math.cos(h))+this.y0,e):(i=2*Math.atan(this.ssfn_(l,u,this.e))-m$K,r=Math.cos(i),n=Math.sin(i),Math.abs(this.coslat0)<=_$C?(o=U$J(this.e,l*this.con,this.con*u),a=2*this.a*this.k0*o/this.cons,e.x=this.x0+a*Math.sin(s-this.long0),e.y=this.y0-this.con*a*Math.cos(s-this.long0),e):(Math.abs(this.sinlat0)<_$C?(t=2*this.a*this.k0/(1+r*Math.cos(h)),e.y=t*n):(t=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*n+this.cosX0*r*Math.cos(h))),e.y=t*(this.cosX0*n-this.sinX0*r*Math.cos(h))+this.y0),e.x=t*r*Math.sin(h)+this.x0,e))}function ui$5(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,o,a=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var s=2*Math.atan(a/(2*this.a*this.k0));return t=this.long0,i=this.lat0,a<=_$C?(e.x=t,e.y=i,e):(i=Math.asin(Math.cos(s)*this.sinlat0+e.y*Math.sin(s)*this.coslat0/a),t=Math.abs(this.coslat0)<_$C?this.lat0>0?g$N(this.long0+Math.atan2(e.x,-1*e.y)):g$N(this.long0+Math.atan2(e.x,e.y)):g$N(this.long0+Math.atan2(e.x*Math.sin(s),a*this.coslat0*Math.cos(s)-e.y*this.sinlat0*Math.sin(s))),e.x=t,e.y=i,e)}if(Math.abs(this.coslat0)<=_$C){if(a<=_$C)return i=this.lat0,t=this.long0,e.x=t,e.y=i,e;e.x*=this.con,e.y*=this.con,n=a*this.cons/(2*this.a*this.k0),i=this.con*Mt$5(this.e,n),t=this.con*g$N(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else r=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=_$C?o=this.X0:(o=Math.asin(Math.cos(r)*this.sinX0+e.y*Math.sin(r)*this.cosX0/a),t=g$N(this.long0+Math.atan2(e.x*Math.sin(r),a*this.cosX0*Math.cos(r)-e.y*this.sinX0*Math.sin(r)))),i=-1*Mt$5(this.e,Math.tan(.5*(m$K+o)));return e.x=t,e.y=i,e}var ci$6=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],mi$3={init:Mi$5,forward:vi$5,inverse:ui$5,names:ci$6,ssfn_:fi$5};function di$5(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),i=this.a,n=1/this.rf,r=2*n-Math.pow(n,2),o=this.e=Math.sqrt(r);this.R=this.k0*i*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+o*t)/(1-o*t));this.K=a-this.alpha*s+this.alpha*o/2*l}function yi$5(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+i)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(o))),s=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(o));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e}function _i$7(e){for(var t=e.x-this.x0,i=e.y-this.y0,n=t/this.R,r=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),s=this.lambda0+a/this.alpha,l=0,u=o,c=-1e3,h=0;Math.abs(u-c)>1e-7;){if(++h>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=s,e.y=u,e}var gi$6=["somerc"],xi$5={init:di$5,forward:yi$5,inverse:_i$7,names:gi$6};function bi$6(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var e=Math.sin(this.lat0),t=Math.cos(this.lat0),i=this.e*e;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(t,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-i*i);var n,r,o=U$J(this.e,this.lat0,e),a=this.bl/t*Math.sqrt((1-this.es)/(1-i*i));if(a*a<1&&(a=1),isNaN(this.longc)){var s=U$J(this.e,this.lat1,Math.sin(this.lat1)),l=U$J(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(a+Math.sqrt(a*a-1))*Math.pow(o,this.bl):this.el=(a-Math.sqrt(a*a-1))*Math.pow(o,this.bl);var u=Math.pow(s,this.bl),c=Math.pow(l,this.bl);r=.5*((n=this.el/u)-1/n);var h=(this.el*this.el-c*u)/(this.el*this.el+c*u),d=(c-u)/(c+u),f=g$N(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(h*Math.tan(.5*this.bl*f)/d)/this.bl,this.long0=g$N(this.long0);var p=g$N(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*p)/r),this.alpha=Math.asin(a*Math.sin(this.gamma0))}else n=this.lat0>=0?a+Math.sqrt(a*a-1):a-Math.sqrt(a*a-1),this.el=n*Math.pow(o,this.bl),r=.5*(n-1/n),this.gamma0=Math.asin(Math.sin(this.alpha)/a),this.long0=this.longc-Math.asin(r*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha))}function Ci$6(e){var t,i,n,r=e.x,o=e.y,a=g$N(r-this.long0);if(Math.abs(Math.abs(o)-m$K)<=_$C)n=o>0?-1:1,i=this.al/this.bl*Math.log(Math.tan(w$G+n*this.gamma0*.5)),t=-1*n*m$K*this.al/this.bl;else{var s=U$J(this.e,o,Math.sin(o)),l=this.el/Math.pow(s,this.bl),u=.5*(l-1/l),c=.5*(l+1/l),h=Math.sin(this.bl*a),d=(u*Math.sin(this.gamma0)-h*Math.cos(this.gamma0))/c;i=Math.abs(Math.abs(d)-1)<=_$C?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-d)/(1+d))/this.bl,t=Math.abs(Math.cos(this.bl*a))<=_$C?this.al*this.bl*a:this.al*Math.atan2(u*Math.cos(this.gamma0)+h*Math.sin(this.gamma0),Math.cos(this.bl*a))/this.bl}return this.no_rot?(e.x=this.x0+t,e.y=this.y0+i):(t-=this.uc,e.x=this.x0+i*Math.cos(this.alpha)+t*Math.sin(this.alpha),e.y=this.y0+t*Math.cos(this.alpha)-i*Math.sin(this.alpha)),e}function Ei$5(e){var t,i;this.no_rot?(i=e.y-this.y0,t=e.x-this.x0):(i=(e.x-this.x0)*Math.cos(this.alpha)-(e.y-this.y0)*Math.sin(this.alpha),t=(e.y-this.y0)*Math.cos(this.alpha)+(e.x-this.x0)*Math.sin(this.alpha),t+=this.uc);var n=Math.exp(-1*this.bl*i/this.al),r=.5*(n-1/n),o=.5*(n+1/n),a=Math.sin(this.bl*t/this.al),s=(a*Math.cos(this.gamma0)+r*Math.sin(this.gamma0))/o,l=Math.pow(this.el/Math.sqrt((1+s)/(1-s)),1/this.bl);return Math.abs(s-1)<_$C?(e.x=this.long0,e.y=m$K):Math.abs(s+1)<_$C?(e.x=this.long0,e.y=-1*m$K):(e.y=Mt$5(this.e,l),e.x=g$N(this.long0-Math.atan2(r*Math.cos(this.gamma0)-a*Math.sin(this.gamma0),Math.cos(this.bl*t/this.al))/this.bl)),e}var Ai$4=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"],Ni$5={init:bi$6,forward:Ci$6,inverse:Ei$5,names:Ai$4};function Pi$6(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<_$C)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),i=Math.cos(this.lat1),n=F$J(this.e,t,i),r=U$J(this.e,this.lat1,t),o=Math.sin(this.lat2),a=Math.cos(this.lat2),s=F$J(this.e,o,a),l=U$J(this.e,this.lat2,o),u=U$J(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>_$C?this.ns=Math.log(n/s)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function wi$5(e){var t=e.x,i=e.y;Math.abs(2*Math.abs(i)-Math.PI)<=_$C&&(i=ft$5(i)*(m$K-2*_$C));var n,r,o=Math.abs(Math.abs(i)-m$K);if(o>_$C)n=U$J(this.e,i,Math.sin(i)),r=this.a*this.f0*Math.pow(n,this.ns);else{if((o=i*this.ns)<=0)return null;r=0}var a=this.ns*g$N(t-this.long0);return e.x=this.k0*(r*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,e}function Si$5(e){var t,i,n,r,o,a=(e.x-this.x0)/this.k0,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+s*s),i=1):(t=-Math.sqrt(a*a+s*s),i=-1);var l=0;if(0!==t&&(l=Math.atan2(i*a,i*s)),0!==t||this.ns>0){if(i=1/this.ns,n=Math.pow(t/(this.a*this.f0),i),-9999===(r=Mt$5(this.e,n)))return null}else r=-m$K;return o=g$N(l/this.ns+this.long0),e.x=o,e.y=r,e}var Ii$4=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"],Ri$4={init:Pi$6,forward:wi$5,inverse:Si$5,names:Ii$4};function Oi$4(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function qi$3(e){var t,i,n,r,o,a,s,l=e.x,u=e.y,c=g$N(l-this.long0);return t=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),o=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(r)),a=this.n*o,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e}function Ti$5(e){var t,i,n,r,o,a,s,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),o=Math.sqrt(e.x*e.x+e.y*e.y),r=Math.atan2(e.y,e.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),i=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(t)),e.x=this.long0-i/this.alfa,a=t,s=0;var u=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,u+=1}while(0===s&&u<15);return u>=15?null:e}var $i$3=["Krovak","krovak"],Li$3={init:Oi$4,forward:qi$3,inverse:Ti$5,names:$i$3},G$P=function(e,t,i,n,r){return e*r-t*Math.sin(2*r)+i*Math.sin(4*r)-n*Math.sin(6*r)},ct$5=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},mt$3=function(e){return.375*e*(1+.25*e*(1+.46875*e))},dt$7=function(e){return.05859375*e*e*(1+.75*e)},yt$4=function(e){return e*e*e*(35/3072)},ht$4=function(e,t,i){var n=t*i;return e/Math.sqrt(1-n*n)},et$9=function(e){return Math.abs(e)<m$K?e:e-ft$5(e)*Math.PI},St$2=function(e,t,i,n,r){var o,a;o=e/t;for(var s=0;s<15;s++)if(o+=a=(e-(t*o-i*Math.sin(2*o)+n*Math.sin(4*o)-r*Math.sin(6*o)))/(t-2*i*Math.cos(2*o)+4*n*Math.cos(4*o)-6*r*Math.cos(6*o)),Math.abs(a)<=1e-10)return o;return NaN};function Gi$2(){this.sphere||(this.e0=ct$5(this.es),this.e1=mt$3(this.es),this.e2=dt$7(this.es),this.e3=yt$4(this.es),this.ml0=this.a*G$P(this.e0,this.e1,this.e2,this.e3,this.lat0))}function zi$5(e){var t,i,n=e.x,r=e.y;if(n=g$N(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(r),Math.cos(n))-this.lat0);else{var o=Math.sin(r),a=Math.cos(r),s=ht$4(this.a,this.e,o),l=Math.tan(r)*Math.tan(r),u=n*Math.cos(r),c=u*u,h=this.es*a*a/(1-this.es);t=s*u*(1-c*l*(1/6-(8-l+8*h)*c/120)),i=this.a*G$P(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+s*o/a*c*(.5+(5-l+6*h)*c/24)}return e.x=t+this.x0,e.y=i+this.y0,e}function Di$6(e){e.x-=this.x0,e.y-=this.y0;var t,i,n=e.x/this.a,r=e.y/this.a;if(this.sphere){var o=r+this.lat0;t=Math.asin(Math.sin(o)*Math.cos(n)),i=Math.atan2(Math.tan(n),Math.cos(o))}else{var a=this.ml0/this.a+r,s=St$2(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-m$K)<=_$C)return e.x=this.long0,e.y=m$K,r<0&&(e.y*=-1),e;var l=ht$4(this.a,this.e,Math.sin(s)),u=l*l*l/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(s),2),h=n*this.a/l,d=h*h;t=s-l*Math.tan(s)/u*h*h*(.5-(1+3*c)*h*h/24),i=h*(1-d*(c/3+(1+3*c)*c*d/15))/Math.cos(s)}return e.x=g$N(i+this.long0),e.y=et$9(t),e}var ki$5=["Cassini","Cassini_Soldner","cass"],pi$6={init:Gi$2,forward:zi$5,inverse:Di$6,names:ki$5},K$E=function(e,t){var i;return e>1e-7?(1-e*e)*(t/(1-(i=e*t)*i)-.5/e*Math.log((1-i)/(1+i))):2*t},Ui$4=1,Bi$3=2,Fi$3=3,ji$4=4;function Qi$2(){var e,t=Math.abs(this.lat0);if(Math.abs(t-m$K)<_$C?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<_$C?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=K$E(this.e,1),this.mmf=.5/(1-this.es),this.apa=th(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=K$E(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function Wi$4(e){var t,i,n,r,o,a,s,l,u,c,h=e.x,d=e.y;if(h=g$N(h-this.long0),this.sphere){if(o=Math.sin(d),c=Math.cos(d),n=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+c*n:1+this.sinph0*o+this.cosph0*c*n)<=_$C)return null;t=(i=Math.sqrt(2/i))*c*Math.sin(h),i*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.phi0)<_$C)return null;i=w$G-.5*d,t=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(h),i*=n}}else{switch(s=0,l=0,u=0,n=Math.cos(h),r=Math.sin(h),o=Math.sin(d),a=K$E(this.e,o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(s=a/this.qp,l=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:u=1+this.sinb1*s+this.cosb1*l*n;break;case this.EQUIT:u=1+l*n;break;case this.N_POLE:u=m$K+d,a=this.qp-a;break;case this.S_POLE:u=d-m$K,a=this.qp+a}if(Math.abs(u)<_$C)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:u=Math.sqrt(2/u),i=this.mode===this.OBLIQ?this.ymf*u*(this.cosb1*s-this.sinb1*l*n):(u=Math.sqrt(2/(1+l*n)))*s*this.ymf,t=this.xmf*u*l*r;break;case this.N_POLE:case this.S_POLE:a>=0?(t=(u=Math.sqrt(a))*r,i=n*(this.mode===this.S_POLE?u:-u)):t=i=0}}return e.x=this.a*t+this.x0,e.y=this.a*i+this.y0,e}function Hi$4(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,o,a,s,l=e.x/this.a,u=e.y/this.a;if(this.sphere){var c,h=0,d=0;if((i=.5*(c=Math.sqrt(l*l+u*u)))>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=Math.sin(i),h=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=_$C?0:Math.asin(u*d/c),l*=d,u=h*c;break;case this.OBLIQ:i=Math.abs(c)<=_$C?this.phi0:Math.asin(h*this.sinph0+u*d*this.cosph0/c),l*=d*this.cosph0,u=(h-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:u=-u,i=m$K-i;break;case this.S_POLE:i-=m$K}t=0!==u||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(l,u):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(l/=this.dd,u*=this.dd,(a=Math.sqrt(l*l+u*u))<_$C)return e.x=0,e.y=this.phi0,e;r=2*Math.asin(.5*a/this.rq),n=Math.cos(r),l*=r=Math.sin(r),this.mode===this.OBLIQ?(s=n*this.sinb1+u*r*this.cosb1/a,o=this.qp*s,u=a*this.cosb1*n-u*this.sinb1*r):(s=u*r/a,o=this.qp*s,u=a*n)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(u=-u),!(o=l*l+u*u))return e.x=0,e.y=this.phi0,e;s=1-o/this.qp,this.mode===this.S_POLE&&(s=-s)}t=Math.atan2(l,u),i=ah(Math.asin(s),this.apa)}return e.x=g$N(this.long0+t),e.y=i,e}var Xi$2=.3333333333333333,Ki$2=.17222222222222222,Ji$2=.10257936507936508,Zi$3=.06388888888888888,Vi$5=.0664021164021164,Yi$3=.016415012942191543;function th(e){var t,i=[];return i[0]=e*Xi$2,t=e*e,i[0]+=t*Ki$2,i[1]=t*Zi$3,t*=e,i[0]+=t*Ji$2,i[1]+=t*Vi$5,i[2]=t*Yi$3,i}function ah(e,t){var i=e+e;return e+t[0]*Math.sin(i)+t[1]*Math.sin(i+i)+t[2]*Math.sin(i+i+i)}var sh=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],ih={init:Qi$2,forward:Wi$4,inverse:Hi$4,names:sh,S_POLE:Ui$4,N_POLE:Bi$3,EQUIT:Fi$3,OBLIQ:ji$4},J$A=function(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)};function hh(){Math.abs(this.lat1+this.lat2)<_$C||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=F$J(this.e3,this.sin_po,this.cos_po),this.qs1=K$E(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=F$J(this.e3,this.sin_po,this.cos_po),this.qs2=K$E(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=K$E(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>_$C?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function eh(e){var t=e.x,i=e.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=K$E(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*g$N(t-this.long0),a=r*Math.sin(o)+this.x0,s=this.rh-r*Math.cos(o)+this.y0;return e.x=a,e.y=s,e}function rh(e){var t,i,n,r,o,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),r=0,0!==t&&(r=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,i)),o=g$N(r/this.ns0+this.long0),e.x=o,e.y=a,e}function nh(e,t){var i,n,r,o,a=J$A(.5*t);if(e<_$C)return a;for(var s=e*e,l=1;l<=25;l++)if(a+=o=.5*(r=1-(n=e*(i=Math.sin(a)))*n)*r/Math.cos(a)*(t/(1-s)-i/r+.5/e*Math.log((1-n)/(1+n))),Math.abs(o)<=1e-7)return a;return null}var oh=["Albers_Conic_Equal_Area","Albers","aea"],lh={init:hh,forward:eh,inverse:rh,names:oh,phi1z:nh};function fh(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Mh(e){var t,i,n,r,o,a,s,l=e.x,u=e.y;return n=g$N(l-this.long0),t=Math.sin(u),i=Math.cos(u),r=Math.cos(n),1,(o=this.sin_p14*t+this.cos_p14*i*r)>0||Math.abs(o)<=_$C?(a=this.x0+1*this.a*i*Math.sin(n)/o,s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*i*r)/o):(a=this.x0+this.infinity_dist*i*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*i*r)),e.x=a,e.y=s,e}function vh(e){var t,i,n,r,o,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(r=Math.atan2(t,this.rc),i=Math.sin(r),n=Math.cos(r),a=J$A(n*this.sin_p14+e.y*i*this.cos_p14/t),o=Math.atan2(e.x*i,t*this.cos_p14*n-e.y*this.sin_p14*i),o=g$N(this.long0+o)):(a=this.phic0,o=0),e.x=o,e.y=a,e}var uh=["gnom"],ch={init:fh,forward:Mh,inverse:vh,names:uh},mh=function(e,t){var i=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-i)<1e-6)return t<0?-1*m$K:m$K;for(var n,r,o,a,s=Math.asin(.5*t),l=0;l<30;l++)if(r=Math.sin(s),o=Math.cos(s),a=e*r,s+=n=Math.pow(1-a*a,2)/(2*o)*(t/(1-e*e)-r/(1-a*a)+.5/e*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return s;return NaN};function dh(){this.sphere||(this.k0=F$J(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function yh(e){var t,i,n=e.x,r=e.y,o=g$N(n-this.long0);if(this.sphere)t=this.x0+this.a*o*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var a=K$E(this.e,Math.sin(r));t=this.x0+this.a*this.k0*o,i=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=i,e}function _h(e){var t,i;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=g$N(this.long0+e.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(i=mh(this.e,2*e.y*this.k0/this.a),t=g$N(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=i,e}var gh=["cea"],xh={init:dh,forward:yh,inverse:_h,names:gh};function bh(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Ch(e){var t=e.x,i=e.y,n=g$N(t-this.long0),r=et$9(i-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*r,e}function Eh(e){var t=e.x,i=e.y;return e.x=g$N(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=et$9(this.lat0+(i-this.y0)/this.a),e}var Ah=["Equirectangular","Equidistant_Cylindrical","eqc"],Nh={init:bh,forward:Ch,inverse:Eh,names:Ah},ba$1=20;function Ph(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ct$5(this.es),this.e1=mt$3(this.es),this.e2=dt$7(this.es),this.e3=yt$4(this.es),this.ml0=this.a*G$P(this.e0,this.e1,this.e2,this.e3,this.lat0)}function wh(e){var t,i,n,r=e.x,o=e.y,a=g$N(r-this.long0);if(n=a*Math.sin(o),this.sphere)Math.abs(o)<=_$C?(t=this.a*a,i=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(o),i=this.a*(et$9(o-this.lat0)+(1-Math.cos(n))/Math.tan(o)));else if(Math.abs(o)<=_$C)t=this.a*a,i=-1*this.ml0;else{var s=ht$4(this.a,this.e,Math.sin(o))/Math.tan(o);t=s*Math.sin(n),i=this.a*G$P(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+s*(1-Math.cos(n))}return e.x=t+this.x0,e.y=i+this.y0,e}function Sh(e){var t,i,n,r,o,a,s,l,u;if(n=e.x-this.x0,r=e.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=_$C)t=g$N(n/this.a+this.long0),i=0;else{var c;for(a=this.lat0+r/this.a,s=n*n/this.a/this.a+a*a,l=a,o=ba$1;o;--o)if(l+=u=-1*(a*(l*(c=Math.tan(l))+1)-l-.5*(l*l+s)*c)/((l-a)/c-1),Math.abs(u)<=_$C){i=l;break}t=g$N(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(r+this.ml0)<=_$C)i=0,t=g$N(this.long0+n/this.a);else{var h,d,f,p,_;for(a=(this.ml0+r)/this.a,s=n*n/this.a/this.a+a*a,l=a,o=ba$1;o;--o)if(_=this.e*Math.sin(l),h=Math.sqrt(1-_*_)*Math.tan(l),d=this.a*G$P(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=u=(a*(h*(p=d/this.a)+1)-p-.5*h*(p*p+s))/(this.es*Math.sin(2*l)*(p*p+s-2*a*p)/(4*h)+(a-p)*(h*f-2/Math.sin(2*l))-f),Math.abs(u)<=_$C){i=l;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),t=g$N(this.long0+Math.asin(n*h/this.a)/Math.sin(i))}return e.x=t,e.y=i,e}var Ih=["Polyconic","poly"],Rh={init:Ph,forward:wh,inverse:Sh,names:Ih};function Oh(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function qh(e){var t,i=e.x,n=e.y-this.lat0,r=i-this.long0,o=n/ot$5*1e-5,a=r,s=1,l=0;for(t=1;t<=10;t++)s*=o,l+=this.A[t]*s;var u,c=l,h=a,d=1,f=0,p=0,_=0;for(t=1;t<=6;t++)u=f*c+d*h,d=d*c-f*h,f=u,p=p+this.B_re[t]*d-this.B_im[t]*f,_=_+this.B_im[t]*d+this.B_re[t]*f;return e.x=_*this.a+this.x0,e.y=p*this.a+this.y0,e}function Th(e){var t,i,n=e.x,r=e.y,o=n-this.x0,a=(r-this.y0)/this.a,s=o/this.a,l=1,u=0,c=0,h=0;for(t=1;t<=6;t++)i=u*a+l*s,l=l*a-u*s,u=i,c=c+this.C_re[t]*l-this.C_im[t]*u,h=h+this.C_im[t]*l+this.C_re[t]*u;for(var d=0;d<this.iterations;d++){var f,p=c,_=h,m=a,g=s;for(t=2;t<=6;t++)f=_*c+p*h,p=p*c-_*h,_=f,m+=(t-1)*(this.B_re[t]*p-this.B_im[t]*_),g+=(t-1)*(this.B_im[t]*p+this.B_re[t]*_);p=1,_=0;var x=this.B_re[1],y=this.B_im[1];for(t=2;t<=6;t++)f=_*c+p*h,p=p*c-_*h,_=f,x+=t*(this.B_re[t]*p-this.B_im[t]*_),y+=t*(this.B_im[t]*p+this.B_re[t]*_);var v=x*x+y*y;c=(m*x+g*y)/v,h=(g*x-m*y)/v}var $=c,b=h,T=1,C=0;for(t=1;t<=9;t++)T*=$,C+=this.D[t]*T;var S=this.lat0+C*ot$5*1e5,w=this.long0+b;return e.x=w,e.y=S,e}var $h=["New_Zealand_Map_Grid","nzmg"],Lh={init:Oh,forward:qh,inverse:Th,names:$h};function Gh(){}function zh(e){var t=e.x,i=e.y,n=g$N(t-this.long0),r=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return e.x=r,e.y=o,e}function Dh(e){e.x-=this.x0,e.y-=this.y0;var t=g$N(this.long0+e.x/this.a),i=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=i,e}var kh=["Miller_Cylindrical","mill"],ph={init:Gh,forward:zh,inverse:Dh,names:kh},Uh=20;function Bh(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=ya$1(this.es)}function Fh(e){var t,i,n=e.x,r=e.y;if(n=g$N(n-this.long0),this.sphere){if(this.m)for(var o=this.n*Math.sin(r),a=Uh;a;--a){var s=(this.m*r+Math.sin(r)-o)/(this.m+Math.cos(r));if(r-=s,Math.abs(s)<_$C)break}else r=1!==this.n?Math.asin(this.n*Math.sin(r)):r;t=this.a*this.C_x*n*(this.m+Math.cos(r)),i=this.a*this.C_y*r}else{var l=Math.sin(r),u=Math.cos(r);i=this.a*Pt$4(r,l,u,this.en),t=this.a*n*u/Math.sqrt(1-this.es*l*l)}return e.x=t,e.y=i,e}function jh(e){var t,i,n,r;return e.x-=this.x0,n=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,n/=this.C_x*(this.m+Math.cos(t)),this.m?t=J$A((this.m*t+Math.sin(t))/this.n):1!==this.n&&(t=J$A(Math.sin(t)/this.n)),n=g$N(n+this.long0),t=et$9(t)):(t=_a$2(e.y/this.a,this.es,this.en),(r=Math.abs(t))<m$K?(r=Math.sin(t),i=this.long0+e.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),n=g$N(i)):r-_$C<m$K&&(n=this.long0)),e.x=n,e.y=t,e}var Qh=["Sinusoidal","sinu"],Wh={init:Bh,forward:Fh,inverse:jh,names:Qh};function Hh(){}function Xh(e){for(var t=e.x,i=e.y,n=g$N(t-this.long0),r=i,o=Math.PI*Math.sin(i);;){var a=-(r+Math.sin(r)-o)/(1+Math.cos(r));if(r+=a,Math.abs(a)<_$C)break}r/=2,Math.PI/2-Math.abs(i)<_$C&&(n=0);var s=.900316316158*this.a*n*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return e.x=s,e.y=l,e}function Kh(e){var t,i;e.x-=this.x0,e.y-=this.y0,i=e.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),t=Math.asin(i);var n=g$N(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*t+Math.sin(2*t))/Math.PI,Math.abs(i)>1&&(i=1);var r=Math.asin(i);return e.x=n,e.y=r,e}var Jh=["Mollweide","moll"],Zh={init:Hh,forward:Xh,inverse:Kh,names:Jh};function Vh(){Math.abs(this.lat1+this.lat2)<_$C||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ct$5(this.es),this.e1=mt$3(this.es),this.e2=dt$7(this.es),this.e3=yt$4(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=F$J(this.e,this.sinphi,this.cosphi),this.ml1=G$P(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<_$C?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=F$J(this.e,this.sinphi,this.cosphi),this.ml2=G$P(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=G$P(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function Yh(e){var t,i=e.x,n=e.y;if(this.sphere)t=this.a*(this.g-n);else{var r=G$P(this.e0,this.e1,this.e2,this.e3,n);t=this.a*(this.g-r)}var o=this.ns*g$N(i-this.long0),a=this.x0+t*Math.sin(o),s=this.y0+this.rh-t*Math.cos(o);return e.x=a,e.y=s,e}function te$t(e){var t,i,n,r;e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns>=0?(i=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(i=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var o=0;if(0!==i&&(o=Math.atan2(t*e.x,t*e.y)),this.sphere)return r=g$N(this.long0+o/this.ns),n=et$9(this.g-i/this.a),e.x=r,e.y=n,e;var a=this.g-i/this.a;return n=St$2(a,this.e0,this.e1,this.e2,this.e3),r=g$N(this.long0+o/this.ns),e.x=r,e.y=n,e}var ae$q=["Equidistant_Conic","eqdc"],se$n={init:Vh,forward:Yh,inverse:te$t,names:ae$q};function ie$r(){this.R=this.a}function he$k(e){var t,i,n=e.x,r=e.y,o=g$N(n-this.long0);Math.abs(r)<=_$C&&(t=this.x0+this.R*o,i=this.y0);var a=J$A(2*Math.abs(r/Math.PI));(Math.abs(o)<=_$C||Math.abs(Math.abs(r)-m$K)<=_$C)&&(t=this.x0,i=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var s=.5*Math.abs(Math.PI/o-o/Math.PI),l=s*s,u=Math.sin(a),c=Math.cos(a),h=c/(u+c-1),d=h*h,f=h*(2/u-1),p=f*f,_=Math.PI*this.R*(s*(h-p)+Math.sqrt(l*(h-p)*(h-p)-(p+l)*(d-p)))/(p+l);o<0&&(_=-_),t=this.x0+_;var m=l+h;return _=Math.PI*this.R*(f*m-s*Math.sqrt((p+l)*(l+1)-m*m))/(p+l),i=r>=0?this.y0+_:this.y0-_,e.x=t,e.y=i,e}function ee$r(e){var t,i,n,r,o,a,s,l,u,c,h,d;return e.x-=this.x0,e.y-=this.y0,h=Math.PI*this.R,o=(n=e.x/h)*n+(r=e.y/h)*r,h=3*(r*r/(l=-2*(a=-Math.abs(r)*(1+o))+1+2*r*r+o*o)+(2*(s=a-2*r*r+n*n)*s*s/l/l/l-9*a*s/l/l)/27)/(u=(a-s*s/3/l)/l)/(c=2*Math.sqrt(-u/3)),Math.abs(h)>1&&(h=h>=0?1:-1),d=Math.acos(h)/3,i=e.y>=0?(-c*Math.cos(d+Math.PI/3)-s/3/l)*Math.PI:-(-c*Math.cos(d+Math.PI/3)-s/3/l)*Math.PI,t=Math.abs(n)<_$C?this.long0:g$N(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-r*r)+o*o))/2/n),e.x=t,e.y=i,e}var re$w=["Van_der_Grinten_I","VanDerGrinten","vandg"],ne$t={init:ie$r,forward:he$k,inverse:ee$r,names:re$w};function oe$m(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function le$o(e){var t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T=e.x,C=e.y,S=Math.sin(e.y),w=Math.cos(e.y),E=g$N(T-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=_$C?(e.x=this.x0+this.a*(m$K-C)*Math.sin(E),e.y=this.y0-this.a*(m$K-C)*Math.cos(E),e):Math.abs(this.sin_p12+1)<=_$C?(e.x=this.x0+this.a*(m$K+C)*Math.sin(E),e.y=this.y0+this.a*(m$K+C)*Math.cos(E),e):(x=this.sin_p12*S+this.cos_p12*w*Math.cos(E),g=(m=Math.acos(x))/Math.sin(m),e.x=this.x0+this.a*g*w*Math.sin(E),e.y=this.y0+this.a*g*(this.cos_p12*S-this.sin_p12*w*Math.cos(E)),e):(t=ct$5(this.es),i=mt$3(this.es),n=dt$7(this.es),r=yt$4(this.es),Math.abs(this.sin_p12-1)<=_$C?(o=this.a*G$P(t,i,n,r,m$K),a=this.a*G$P(t,i,n,r,C),e.x=this.x0+(o-a)*Math.sin(E),e.y=this.y0-(o-a)*Math.cos(E),e):Math.abs(this.sin_p12+1)<=_$C?(o=this.a*G$P(t,i,n,r,m$K),a=this.a*G$P(t,i,n,r,C),e.x=this.x0+(o+a)*Math.sin(E),e.y=this.y0+(o+a)*Math.cos(E),e):(s=S/w,l=ht$4(this.a,this.e,this.sin_p12),u=ht$4(this.a,this.e,S),c=Math.atan((1-this.es)*s+this.es*l*this.sin_p12/(u*w)),y=0===(h=Math.atan2(Math.sin(E),this.cos_p12*Math.tan(c)-this.sin_p12*Math.cos(E)))?Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.abs(Math.abs(h)-Math.PI)<=_$C?-Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.asin(Math.sin(E)*Math.cos(c)/Math.sin(h)),d=this.e*this.sin_p12/Math.sqrt(1-this.es),m=l*y*(1-(v=y*y)*(_=(f=this.e*this.cos_p12*Math.cos(h)/Math.sqrt(1-this.es))*f)*(1-_)/6+($=v*y)/8*(p=d*f)*(1-2*_)+(b=$*y)/120*(_*(4-7*_)-3*d*d*(1-7*_))-b*y/48*p),e.x=this.x0+m*Math.sin(h),e.y=this.y0+m*Math.cos(h),e))}function fe$m(e){var t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=Math.sqrt(e.x*e.x+e.y*e.y))>2*m$K*this.a?void 0:(i=t/this.a,n=Math.sin(i),r=Math.cos(i),o=this.long0,Math.abs(t)<=_$C?a=this.lat0:(a=J$A(r*this.sin_p12+e.y*n*this.cos_p12/t),s=Math.abs(this.lat0)-m$K,o=Math.abs(s)<=_$C?this.lat0>=0?g$N(this.long0+Math.atan2(e.x,-e.y)):g$N(this.long0-Math.atan2(-e.x,e.y)):g$N(this.long0+Math.atan2(e.x*n,t*this.cos_p12*r-e.y*this.sin_p12*n))),e.x=o,e.y=a,e):(l=ct$5(this.es),u=mt$3(this.es),c=dt$7(this.es),h=yt$4(this.es),Math.abs(this.sin_p12-1)<=_$C?(d=this.a*G$P(l,u,c,h,m$K),t=Math.sqrt(e.x*e.x+e.y*e.y),a=St$2((d-t)/this.a,l,u,c,h),o=g$N(this.long0+Math.atan2(e.x,-1*e.y)),e.x=o,e.y=a,e):Math.abs(this.sin_p12+1)<=_$C?(d=this.a*G$P(l,u,c,h,m$K),t=Math.sqrt(e.x*e.x+e.y*e.y),a=St$2((t-d)/this.a,l,u,c,h),o=g$N(this.long0+Math.atan2(e.x,e.y)),e.x=o,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),_=Math.atan2(e.x,e.y),f=ht$4(this.a,this.e,this.sin_p12),m=Math.cos(_),x=-(g=this.e*this.cos_p12*m)*g/(1-this.es),y=3*this.es*(1-x)*this.sin_p12*this.cos_p12*m/(1-this.es),b=1-x*($=(v=t/f)-x*(1+x)*Math.pow(v,3)/6-y*(1+3*x)*Math.pow(v,4)/24)*$/2-v*$*$*$/6,p=Math.asin(this.sin_p12*Math.cos($)+this.cos_p12*Math.sin($)*m),o=g$N(this.long0+Math.asin(Math.sin(_)*Math.sin($)/Math.cos(p))),a=Math.atan((1-this.es*b*this.sin_p12/Math.sin(p))*Math.tan(p)/(1-this.es)),e.x=o,e.y=a,e))}var Me$i=["Azimuthal_Equidistant","aeqd"],ve$j={init:oe$m,forward:le$o,inverse:fe$m,names:Me$i};function ue$o(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function ce$l(e){var t,i,n,r,o,a,s,l=e.x,u=e.y;return n=g$N(l-this.long0),t=Math.sin(u),i=Math.cos(u),r=Math.cos(n),1,((o=this.sin_p14*t+this.cos_p14*i*r)>0||Math.abs(o)<=_$C)&&(a=1*this.a*i*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*i*r)),e.x=a,e.y=s,e}function me$o(e){var t,i,n,r,o,a,s;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),i=J$A(t/this.a),n=Math.sin(i),r=Math.cos(i),a=this.long0,Math.abs(t)<=_$C?(s=this.lat0,e.x=a,e.y=s,e):(s=J$A(r*this.sin_p14+e.y*n*this.cos_p14/t),o=Math.abs(this.lat0)-m$K,Math.abs(o)<=_$C?(a=this.lat0>=0?g$N(this.long0+Math.atan2(e.x,-e.y)):g$N(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=s,e):(a=g$N(this.long0+Math.atan2(e.x*n,t*this.cos_p14*r-e.y*this.sin_p14*n)),e.x=a,e.y=s,e))}var de$k=["ortho"],ye$g={init:ue$o,forward:ce$l,inverse:me$o,names:de$k},I$T={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},P$E={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function _e$k(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=m$K-w$G/2?this.face=I$T.TOP:this.lat0<=-(m$K-w$G/2)?this.face=I$T.BOTTOM:Math.abs(this.long0)<=w$G?this.face=I$T.FRONT:Math.abs(this.long0)<=m$K+w$G?this.face=this.long0>0?I$T.RIGHT:I$T.LEFT:this.face=I$T.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function ge$i(e){var t,i,n,r,o,a,s={x:0,y:0},l={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,i=e.x,this.face===I$T.TOP)r=m$K-t,i>=w$G&&i<=m$K+w$G?(l.value=P$E.AREA_0,n=i-m$K):i>m$K+w$G||i<=-(m$K+w$G)?(l.value=P$E.AREA_1,n=i>0?i-R$D:i+R$D):i>-(m$K+w$G)&&i<=-w$G?(l.value=P$E.AREA_2,n=i+m$K):(l.value=P$E.AREA_3,n=i);else if(this.face===I$T.BOTTOM)r=m$K+t,i>=w$G&&i<=m$K+w$G?(l.value=P$E.AREA_0,n=-i+m$K):i<w$G&&i>=-w$G?(l.value=P$E.AREA_1,n=-i):i<-w$G&&i>=-(m$K+w$G)?(l.value=P$E.AREA_2,n=-i-m$K):(l.value=P$E.AREA_3,n=i>0?-i+R$D:-i-R$D);else{var u,c,h,d,f,p;this.face===I$T.RIGHT?i=rt$a(i,+m$K):this.face===I$T.BACK?i=rt$a(i,+R$D):this.face===I$T.LEFT&&(i=rt$a(i,-m$K)),d=Math.sin(t),f=Math.cos(t),p=Math.sin(i),u=f*Math.cos(i),c=f*p,h=d,this.face===I$T.FRONT?n=It$6(r=Math.acos(u),h,c,l):this.face===I$T.RIGHT?n=It$6(r=Math.acos(c),h,-u,l):this.face===I$T.BACK?n=It$6(r=Math.acos(-u),h,-c,l):this.face===I$T.LEFT?n=It$6(r=Math.acos(-c),h,u,l):(r=n=0,l.value=P$E.AREA_0)}return a=Math.atan(12/R$D*(n+Math.acos(Math.sin(n)*Math.cos(w$G))-m$K)),o=Math.sqrt((1-Math.cos(r))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),l.value===P$E.AREA_1?a+=m$K:l.value===P$E.AREA_2?a+=R$D:l.value===P$E.AREA_3&&(a+=1.5*R$D),s.x=o*Math.cos(a),s.y=o*Math.sin(a),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,e.x=s.x,e.y=s.y,e}function xe$h(e){var t,i,n,r,o,a,s,l,u,c,h,d,f={lam:0,phi:0},p={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,i=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?p.value=P$E.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(p.value=P$E.AREA_1,t-=m$K):e.x<0&&-e.x>=Math.abs(e.y)?(p.value=P$E.AREA_2,t=t<0?t+R$D:t-R$D):(p.value=P$E.AREA_3,t+=m$K),u=R$D/12*Math.tan(t),o=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(o),(s=1-(n=Math.cos(t))*n*(r=Math.tan(i))*r*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?s=-1:s>1&&(s=1),this.face===I$T.TOP)l=Math.acos(s),f.phi=m$K-l,p.value===P$E.AREA_0?f.lam=a+m$K:p.value===P$E.AREA_1?f.lam=a<0?a+R$D:a-R$D:p.value===P$E.AREA_2?f.lam=a-m$K:f.lam=a;else if(this.face===I$T.BOTTOM)l=Math.acos(s),f.phi=l-m$K,p.value===P$E.AREA_0?f.lam=-a+m$K:p.value===P$E.AREA_1?f.lam=-a:p.value===P$E.AREA_2?f.lam=-a-m$K:f.lam=a<0?-a-R$D:-a+R$D;else{var _,m,g;u=(_=s)*_,m=(u+=(g=u>=1?0:Math.sqrt(1-u)*Math.sin(a))*g)>=1?0:Math.sqrt(1-u),p.value===P$E.AREA_1?(u=m,m=-g,g=u):p.value===P$E.AREA_2?(m=-m,g=-g):p.value===P$E.AREA_3&&(u=m,m=g,g=-u),this.face===I$T.RIGHT?(u=_,_=-m,m=u):this.face===I$T.BACK?(_=-_,m=-m):this.face===I$T.LEFT&&(u=_,_=m,m=-u),f.phi=Math.acos(-g)-m$K,f.lam=Math.atan2(m,_),this.face===I$T.RIGHT?f.lam=rt$a(f.lam,-m$K):this.face===I$T.BACK?f.lam=rt$a(f.lam,-R$D):this.face===I$T.LEFT&&(f.lam=rt$a(f.lam,+m$K))}0!==this.es&&(c=f.phi<0?1:0,h=Math.tan(f.phi),d=this.b/Math.sqrt(h*h+this.one_minus_f_squared),f.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),c&&(f.phi=-f.phi));return f.lam+=this.long0,e.x=f.lam,e.y=f.phi,e}function It$6(e,t,i,n){var r;return e<_$C?(n.value=P$E.AREA_0,r=0):(r=Math.atan2(t,i),Math.abs(r)<=w$G?n.value=P$E.AREA_0:r>w$G&&r<=m$K+w$G?(n.value=P$E.AREA_1,r-=m$K):r>m$K+w$G||r<=-(m$K+w$G)?(n.value=P$E.AREA_2,r=r>=0?r-R$D:r+R$D):(n.value=P$E.AREA_3,r+=m$K)),r}function rt$a(e,t){var i=e+t;return i<-R$D?i+=qt$5:i>+R$D&&(i-=qt$5),i}var be$l=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],Ce$e={init:_e$k,forward:ge$i,inverse:xe$h,names:be$l},Bt$7=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],_t$5=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ca$1=.8487,Ea$2=1.3523,Aa$2=H$K/5,Ee$h=1/Aa$2,nt$6=18,Rt$6=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},Ae$j=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};function Ne$d(e,t,i,n){for(var r=t;n;--n){var o=e(r);if(r-=o,Math.abs(o)<i)break}return r}function Pe$e(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function we$g(e){var t=g$N(e.x-this.long0),i=Math.abs(e.y),n=Math.floor(i*Aa$2);n<0?n=0:n>=nt$6&&(n=nt$6-1),i=H$K*(i-Ee$h*n);var r={x:Rt$6(Bt$7[n],i)*t,y:Rt$6(_t$5[n],i)};return e.y<0&&(r.y=-r.y),r.x=r.x*this.a*Ca$1+this.x0,r.y=r.y*this.a*Ea$2+this.y0,r}function Se$c(e){var t={x:(e.x-this.x0)/(this.a*Ca$1),y:Math.abs(e.y-this.y0)/(this.a*Ea$2)};if(t.y>=1)t.x/=Bt$7[nt$6][0],t.y=e.y<0?-m$K:m$K;else{var i=Math.floor(t.y*nt$6);for(i<0?i=0:i>=nt$6&&(i=nt$6-1);;)if(_t$5[i][0]>t.y)--i;else{if(!(_t$5[i+1][0]<=t.y))break;++i}var n=_t$5[i],r=5*(t.y-n[0])/(_t$5[i+1][0]-n[0]);r=Ne$d((function(e){return(Rt$6(n,e)-t.y)/Ae$j(n,e)}),r,_$C,100),t.x/=Rt$6(Bt$7[i],r),t.y=(5*i+r)*$$E,e.y<0&&(t.y=-t.y)}return t.x=g$N(t.x+this.long0),t}var Ie$e=["Robinson","robin"],Re$g={init:Pe$e,forward:we$g,inverse:Se$c,names:Ie$e};function Oe$h(){this.name="geocent"}function qe$7(e){return Yt$3(e,this.es,this.a)}function Te$h(e){return ta$3(e,this.es,this.a,this.b)}var $e$8=["Geocentric","geocentric","geocent","Geocent"],Le$j={init:Oe$h,forward:qe$7,inverse:Te$h,names:$e$8},Ge$9=function(e){e.Proj.projections.add(ps),e.Proj.projections.add(wt$5),e.Proj.projections.add(Ys),e.Proj.projections.add(li$5),e.Proj.projections.add(mi$3),e.Proj.projections.add(xi$5),e.Proj.projections.add(Ni$5),e.Proj.projections.add(Ri$4),e.Proj.projections.add(Li$3),e.Proj.projections.add(pi$6),e.Proj.projections.add(ih),e.Proj.projections.add(lh),e.Proj.projections.add(ch),e.Proj.projections.add(xh),e.Proj.projections.add(Nh),e.Proj.projections.add(Rh),e.Proj.projections.add(Lh),e.Proj.projections.add(ph),e.Proj.projections.add(Wh),e.Proj.projections.add(Zh),e.Proj.projections.add(se$n),e.Proj.projections.add(ne$t),e.Proj.projections.add(ve$j),e.Proj.projections.add(ye$g),e.Proj.projections.add(Ce$e),e.Proj.projections.add(Re$g),e.Proj.projections.add(Le$j)};function p$L(e){e=u$Z(e,{});var t=u$Z(e.name,"tmerc"),i=u$Z(e.centralMeridian,117),n=u$Z(e.primeMeridian,0),r=u$Z(e.standardParallel_1,0),o=u$Z(e.standardParallel_2,0),a=u$Z(e.eastFalse,5e5),s=u$Z(e.northFalse,0),l=u$Z(e.semimajorAxis,6378137),u=u$Z(e.inverseFlattening,298.257222101),c=(1-1/u)*l,h=e.ellps;if(e$2e(h))d="+proj={name} +lon_0={lon_0} +lat_0={lat_0} +lat_1={lat_1} +lat_2={lat_2} +x_0={x_0} +y_0={y_0} +ellps={ellps}",this._projection=d.replace("{name}",t).replace("{lon_0}",i).replace("{lat_0}",n).replace("{lat_1}",r).replace("{lat_2}",o).replace("{x_0}",a).replace("{y_0}",s).replace("{ellps}",h);else{var d="+proj={name} +lon_0={lon_0} +lat_0={lat_0} +lat_1={lat_1} +lat_2={lat_2} +x_0={x_0} +y_0={y_0} +a={a} +b={b} +rf={rf}";this._projection=d.replace("{name}",t).replace("{lon_0}",i).replace("{lat_0}",n).replace("{lat_1}",r).replace("{lat_2}",o).replace("{x_0}",a).replace("{y_0}",s).replace("{a}",l).replace("{b}",c).replace("{rf}",u)}}k$D.defaultDatum="WGS84",k$D.Proj=j$F,k$D.WGS84=new k$D.Proj("WGS84"),k$D.Point=it$5,k$D.toPoint=sa$3,k$D.defs=L$Q,k$D.transform=Nt$6,k$D.mgrs=ds,k$D.version="2.6.1",Ge$9(k$D),Object.defineProperties(p$L.prototype,{projection:{get:function(){return this._projection}}}),p$L.prototype.project=function(e,t){var i=k$D(this._projection,[e$2d.toDegrees(e.longitude),e$2d.toDegrees(e.latitude)]);return e$2e(t)?(t.x=i[0],t.y=i[1],t.z=e.height,t):new o$1p(i[0],i[1],e.height)},p$L.prototype.unproject=function(e,t){if(!e$2e(e))throw new t$15("cartesian is required");var i=k$D(this._projection).inverse([e.x,e.y]),n=e$2d.toRadians(i[0]),r=e$2d.toRadians(i[1]);return e$2e(t)?(t.longitude=n,t.latitude=r,t):new a$18(n,r)};var I$S={computePositions:function(e,t,i,n,r){var o,a=.5*e,s=-a,l=n+n,u=new Float64Array(3*(r?2*l:l)),c=0,h=0,d=r?3*l:0,f=r?3*(l+n):3*n;for(o=0;o<n;o++){var p=o/n*e$2d.TWO_PI,_=Math.cos(p),m=Math.sin(p),g=_*i,x=m*i,y=_*t,v=m*t;u[h+d]=g,u[h+d+1]=x,u[h+d+2]=s,u[h+f]=y,u[h+f+1]=v,u[h+f+2]=a,h+=3,r&&(u[c++]=g,u[c++]=x,u[c++]=s,u[c++]=y,u[c++]=v,u[c++]=a)}return u}},M$I=new o$1o,at$7=new o$1p,ut$6=new o$1p,mt$2=new o$1p,vt$5=new o$1p;function l$Q(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=u$Z(e.vertexFormat,n$13.DEFAULT),o=u$Z(e.slices,128);if(!e$2e(t))throw new t$15("options.length must be defined.");if(!e$2e(i))throw new t$15("options.topRadius must be defined.");if(!e$2e(n))throw new t$15("options.bottomRadius must be defined.");if(o<3)throw new t$15("options.slices must be greater than or equal to 3.");if(e$2e(e.offsetAttribute)&&e.offsetAttribute===_0x39c22a.TOP)throw new t$15("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=i,this._bottomRadius=n,this._vertexFormat=n$13.clone(r),this._slices=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}l$Q.packedLength=n$13.packedLength+5,l$Q.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=u$Z(e._offsetAttribute,-1),t};var H$J=new n$13,E$L={vertexFormat:H$J,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0},G$O;l$Q.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n=n$13.unpack(e,t,H$J);t+=n$13.packedLength;var r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return e$2e(i)?(i._vertexFormat=n$13.clone(n,i._vertexFormat),i._length=r,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._offsetAttribute=-1===l?void 0:l,i):(E$L.length=r,E$L.topRadius=o,E$L.bottomRadius=a,E$L.slices=s,E$L.offsetAttribute=-1===l?void 0:l,new l$Q(E$L))},l$Q.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._vertexFormat,o=e._slices;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=o+o,l=o+s,u=s+s,c=I$S.computePositions(t,i,n,o,!0),h=r.st?new Float32Array(2*u):void 0,d=r.normal?new Float32Array(3*u):void 0,f=r.tangent?new Float32Array(3*u):void 0,p=r.bitangent?new Float32Array(3*u):void 0,_=r.normal||r.tangent||r.bitangent;if(_){var m=r.tangent||r.bitangent,g=0,x=0,y=0,v=Math.atan2(n-i,t),$=at$7;$.z=Math.sin(v);var b=Math.cos(v),T=mt$2,C=ut$6;for(a=0;a<o;a++){var S=a/o*e$2d.TWO_PI,w=b*Math.cos(S),E=b*Math.sin(S);_&&($.x=w,$.y=E,m&&(T=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,$,T),T)),r.normal&&(d[g++]=$.x,d[g++]=$.y,d[g++]=$.z,d[g++]=$.x,d[g++]=$.y,d[g++]=$.z),r.tangent&&(f[x++]=T.x,f[x++]=T.y,f[x++]=T.z,f[x++]=T.x,f[x++]=T.y,f[x++]=T.z),r.bitangent&&(C=o$1p.normalize(o$1p.cross($,T,C),C),p[y++]=C.x,p[y++]=C.y,p[y++]=C.z,p[y++]=C.x,p[y++]=C.y,p[y++]=C.z))}for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=-1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[y++]=0,p[y++]=-1,p[y++]=0);for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[y++]=0,p[y++]=1,p[y++]=0)}var P=12*o-12,A=ce$z.createTypedArray(u,P),L=0,M=0;for(a=0;a<o-1;a++)A[L++]=M,A[L++]=M+2,A[L++]=M+3,A[L++]=M,A[L++]=M+3,A[L++]=M+1,M+=2;for(A[L++]=s-2,A[L++]=0,A[L++]=1,A[L++]=s-2,A[L++]=1,A[L++]=s-1,a=1;a<o-1;a++)A[L++]=s+a+1,A[L++]=s+a,A[L++]=s;for(a=1;a<o-1;a++)A[L++]=l,A[L++]=l+a,A[L++]=l+a+1;var R=0;if(r.st){var O=Math.max(i,n);for(a=0;a<u;a++){var D=o$1p.fromArray(c,3*a,vt$5);h[R++]=(D.x+O)/(2*O),h[R++]=(D.y+O)/(2*O)}}var I=new a$_;r.position&&(I.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:c})),r.normal&&(I.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:d})),r.tangent&&(I.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:f})),r.bitangent&&(I.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:p})),r.st&&(I.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:h})),M$I.x=.5*t,M$I.y=Math.max(n,i);var B=new i$1d(o$1p.ZERO,o$1o.magnitude(M$I));if(e$2e(e._offsetAttribute)){t=c.length;var F=new Uint8Array(t/3);d$1s(F,e._offsetAttribute===_0x39c22a.NONE?0:1),I.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:F})}return new I$1p({attributes:I,indices:A,primitiveType:W$18.TRIANGLES,boundingSphere:B,offsetAttribute:e._offsetAttribute})}},l$Q.getUnitCylinder=function(){return e$2e(G$O)||(G$O=l$Q.createGeometry(new l$Q({topRadius:1,bottomRadius:1,length:1,vertexFormat:n$13.POSITION_ONLY}))),G$O};var l$P=new o$1o;function d$Z(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=u$Z(e.slices,128),o=Math.max(u$Z(e.numberOfVerticalLines,16),0);if(o$1q.typeOf.number("options.positions",t),o$1q.typeOf.number("options.topRadius",i),o$1q.typeOf.number("options.bottomRadius",n),o$1q.typeOf.number.greaterThanOrEquals("options.slices",r,3),e$2e(e.offsetAttribute)&&e.offsetAttribute===_0x39c22a.TOP)throw new t$15("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=i,this._bottomRadius=n,this._slices=r,this._numberOfVerticalLines=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}d$Z.packedLength=6,d$Z.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i++]=e._numberOfVerticalLines,t[i]=u$Z(e._offsetAttribute,-1),t};var b$P={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};d$Z.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=e[t++],r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return e$2e(i)?(i._length=n,i._topRadius=r,i._bottomRadius=o,i._slices=a,i._numberOfVerticalLines=s,i._offsetAttribute=-1===l?void 0:l,i):(b$P.length=n,b$P.topRadius=r,b$P.bottomRadius=o,b$P.slices=a,b$P.numberOfVerticalLines=s,b$P.offsetAttribute=-1===l?void 0:l,new d$Z(b$P))},d$Z.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._slices,o=e._numberOfVerticalLines;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=2*r,l=I$S.computePositions(t,i,n,r,!1),u=2*r;if(o>0){var c=Math.min(o,r);a=Math.round(r/c),u+=c}var h,d=ce$z.createTypedArray(s,2*u),f=0;for(h=0;h<r-1;h++)d[f++]=h,d[f++]=h+1,d[f++]=h+r,d[f++]=h+1+r;if(d[f++]=r-1,d[f++]=0,d[f++]=r+r-1,d[f++]=r,o>0)for(h=0;h<r;h+=a)d[f++]=h,d[f++]=h+r;var p=new a$_;p.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:l}),l$P.x=.5*t,l$P.y=Math.max(n,i);var _=new i$1d(o$1p.ZERO,o$1o.magnitude(l$P));if(e$2e(e._offsetAttribute)){t=l.length;var m=new Uint8Array(t/3);d$1s(m,e._offsetAttribute===_0x39c22a.NONE?0:1),p.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return new I$1p({attributes:p,indices:d,primitiveType:W$18.LINES,boundingSphere:_,offsetAttribute:e._offsetAttribute})}};var w$F=1953029805,c$I=2917034100;function f$M(e,t){if(f$M.passThroughDataForTesting)return t;o$1q.typeOf.object("key",e),o$1q.typeOf.object("data",t);var i=e.byteLength;if(0===i||i%4!=0)throw new t$13("The length of key must be greater than 0 and a multiple of 4.");var n=new DataView(t),r=n.getUint32(0,!0);if(r===w$F||r===c$I)return t;for(var o,a=new DataView(e),s=0,l=t.byteLength,u=l-l%8,c=i,h=8;s<u;)for(o=h=(h+8)%24;s<u&&o<c;)n.setUint32(s,n.getUint32(s,!0)^a.getUint32(o,!0),!0),n.setUint32(s+4,n.getUint32(s+4,!0)^a.getUint32(o+4,!0),!0),s+=8,o+=24;if(s<l)for(o>=c&&(o=h=(h+8)%24);s<l;)n.setUint8(s,n.getUint8(s)^a.getUint8(o)),s++,o++}function o$L(e){this.proxy=e}function t$A(e,t){if(e=u$Z(e,0),(t=u$Z(t,Number.MAX_VALUE))<=e)throw new t$15("far distance must be greater than near distance.");this.value=new Float32Array([e,t])}f$M.passThroughDataForTesting=!1,o$L.prototype.getURL=function(e){var t=-1===this.proxy.indexOf("?")?"?":"";return this.proxy+t+encodeURIComponent(e)},Object.defineProperties(t$A.prototype,{componentDatatype:{get:function(){return S$14.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}}),t$A.fromDistanceDisplayCondition=function(e){if(!e$2e(e))throw new t$15("distanceDisplayCondition is required.");if(e.far<=e.near)throw new t$15("distanceDisplayCondition.far distance must be greater than distanceDisplayCondition.near distance.");return new t$A(e.near,e.far)},t$A.toValue=function(e,t){if(!e$2e(e))throw new t$15("distanceDisplayCondition is required.");return e$2e(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Ni$4=new o$1p,zi$4=new o$1p,Di$5=new o$1p,Si$4=new o$1p,Ui$3=new o$1p(1,1,1),_i$6=Math.cos,Ci$5=Math.sin;function b$O(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.radii,Ui$3),i=u$Z(e.innerRadii,t),n=u$Z(e.minimumClock,0),r=u$Z(e.maximumClock,e$2d.TWO_PI),o=u$Z(e.minimumCone,0),a=u$Z(e.maximumCone,e$2d.PI),s=Math.round(u$Z(e.stackPartitions,64)),l=Math.round(u$Z(e.slicePartitions,64)),u=u$Z(e.vertexFormat,n$13.DEFAULT);if(l<3)throw new t$15("options.slicePartitions cannot be less than three.");if(s<3)throw new t$15("options.stackPartitions cannot be less than three.");this._radii=o$1p.clone(t),this._innerRadii=o$1p.clone(i),this._minimumClock=n,this._maximumClock=r,this._minimumCone=o,this._maximumCone=a,this._stackPartitions=s,this._slicePartitions=l,this._vertexFormat=n$13.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}b$O.packedLength=2*o$1p.packedLength+n$13.packedLength+7,b$O.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return i=u$Z(i,0),o$1p.pack(e._radii,t,i),i+=o$1p.packedLength,o$1p.pack(e._innerRadii,t,i),i+=o$1p.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=u$Z(e._offsetAttribute,-1),t};var ki$4=new o$1p,li$4=new o$1p,Pi$5=new n$13,O$x={radii:ki$4,innerRadii:li$4,vertexFormat:Pi$5,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0},ni$3;function t$z(e){e=u$Z(e,{}),this._tilingScheme=e.tilingScheme,e$2e(this._tilingScheme)||(this._tilingScheme=new g$15({ellipsoid:u$Z(e.ellipsoid,t$12.WGS84)})),this._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new o$1h,this._isCreateSkirt=e.isCreateSkirt,this._isSkirtDirty=!1,this._readyPromise=o$1l.resolve(!0)}function n$x(){this._removalFunctions=[]}b$O.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n=o$1p.unpack(e,t,ki$4);t+=o$1p.packedLength;var r=o$1p.unpack(e,t,li$4);t+=o$1p.packedLength;var o=n$13.unpack(e,t,Pi$5);t+=n$13.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return e$2e(i)?(i._radii=o$1p.clone(n,i._radii),i._innerRadii=o$1p.clone(r,i._innerRadii),i._vertexFormat=n$13.clone(o,i._vertexFormat),i._minimumClock=a,i._maximumClock=s,i._minimumCone=l,i._maximumCone=u,i._stackPartitions=c,i._slicePartitions=h,i._offsetAttribute=-1===d?void 0:d,i):(O$x.minimumClock=a,O$x.maximumClock=s,O$x.minimumCone=l,O$x.maximumCone=u,O$x.stackPartitions=c,O$x.slicePartitions=h,O$x.offsetAttribute=-1===d?void 0:d,new b$O(O$x))},b$O.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._vertexFormat,l=e._slicePartitions+1,u=e._stackPartitions+1;(l=Math.round(l*Math.abs(r-n)/e$2d.TWO_PI))<2&&(l=2),(u=Math.round(u*Math.abs(a-o)/e$2d.PI))<2&&(u=2);var c,h,d=0,f=[o],p=[n];for(c=0;c<u;c++)f.push(o+c*(a-o)/(u-1));for(f.push(a),h=0;h<l;h++)p.push(n+h*(r-n)/(l-1));p.push(r);var _=f.length,m=p.length,g=0,x=1,y=i.x!==t.x||i.y!==t.y||i.z!==t.z,v=!1,$=!1,b=!1;y&&(x=2,o>0&&(v=!0,g+=l-1),a<Math.PI&&($=!0,g+=l-1),(r-n)%e$2d.TWO_PI?(b=!0,g+=2*(u-1)+1):g+=1);var T=m*_*x,C=new Float64Array(3*T),S=d$1s(new Array(T),!1),w=d$1s(new Array(T),!1),E=l*u*x,P=6*(E+g+1-(l+u)*x),A=ce$z.createTypedArray(E,P),L=s.normal?new Float32Array(3*T):void 0,M=s.tangent?new Float32Array(3*T):void 0,R=s.bitangent?new Float32Array(3*T):void 0,O=s.st?new Float32Array(2*T):void 0,D=new Array(_),I=new Array(_);for(c=0;c<_;c++)D[c]=Ci$5(f[c]),I[c]=_i$6(f[c]);var B=new Array(m),F=new Array(m);for(h=0;h<m;h++)F[h]=_i$6(p[h]),B[h]=Ci$5(p[h]);for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=t.x*D[c]*F[h],C[d++]=t.y*D[c]*B[h],C[d++]=t.z*I[c];var N,G,z,U,V=T/2;if(y)for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=i.x*D[c]*F[h],C[d++]=i.y*D[c]*B[h],C[d++]=i.z*I[c],S[V]=!0,c>0&&c!==_-1&&0!==h&&h!==m-1&&(w[V]=!0),V++;for(d=0,c=1;c<_-2;c++)for(N=c*m,G=(c+1)*m,h=1;h<m-2;h++)A[d++]=G+h,A[d++]=G+h+1,A[d++]=N+h+1,A[d++]=G+h,A[d++]=N+h+1,A[d++]=N+h;if(y){var k=_*m;for(c=1;c<_-2;c++)for(N=k+c*m,G=k+(c+1)*m,h=1;h<m-2;h++)A[d++]=G+h,A[d++]=N+h,A[d++]=N+h+1,A[d++]=G+h,A[d++]=N+h+1,A[d++]=G+h+1}if(y){if(v)for(U=_*m,c=1;c<m-2;c++)A[d++]=c,A[d++]=c+1,A[d++]=U+c+1,A[d++]=c,A[d++]=U+c+1,A[d++]=U+c;if($)for(z=_*m-m,U=_*m*x-m,c=1;c<m-2;c++)A[d++]=z+c+1,A[d++]=z+c,A[d++]=U+c,A[d++]=z+c+1,A[d++]=U+c,A[d++]=U+c+1}if(b){for(c=1;c<_-2;c++)U=m*_+m*c,z=m*c,A[d++]=U,A[d++]=z+m,A[d++]=z,A[d++]=U,A[d++]=U+m,A[d++]=z+m;for(c=1;c<_-2;c++)U=m*_+m*(c+1)-1,z=m*(c+1)-1,A[d++]=z+m,A[d++]=U,A[d++]=z,A[d++]=z+m,A[d++]=U+m,A[d++]=U}var W=new a$_;s.position&&(W.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:C}));var H,q=0,j=0,X=0,Y=0,Z=T/2,K=t$12.fromCartesian3(t),Q=t$12.fromCartesian3(i);if(s.st||s.normal||s.tangent||s.bitangent){for(c=0;c<T;c++){H=S[c]?Q:K;var J=o$1p.fromArray(C,3*c,Ni$4),ee=H.geodeticSurfaceNormal(J,zi$4);if(s.st){var te=Math.atan2(ee.y,ee.x);te<0&&(te+=e$2d.TWO_PI),O[q++]=te/e$2d.TWO_PI,O[q++]=Math.asin(ee.z)/Math.PI+.5}if(s.normal&&(w[c]&&o$1p.negate(ee,ee),L[j++]=ee.x,L[j++]=ee.y,L[j++]=ee.z),s.tangent||s.bitangent){var ie,ne=Di$5,re=0;if(S[c]&&(re=Z),ie=!v&&c>=re&&c<re+2*m?o$1p.UNIT_X:o$1p.UNIT_Z,o$1p.cross(ie,ee,ne),o$1p.normalize(ne,ne),s.tangent&&(M[X++]=ne.x,M[X++]=ne.y,M[X++]=ne.z),s.bitangent){var oe=o$1p.cross(ee,ne,Si$4);o$1p.normalize(oe,oe),R[Y++]=oe.x,R[Y++]=oe.y,R[Y++]=oe.z}}}s.st&&(W.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:O})),s.normal&&(W.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:L})),s.tangent&&(W.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:M})),s.bitangent&&(W.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:R}))}if(e$2e(e._offsetAttribute)){var ae=C.length,se=new Uint8Array(ae/3);d$1s(se,e._offsetAttribute===_0x39c22a.NONE?0:1),W.applyOffset=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:1,values:se})}return new I$1p({attributes:W,indices:A,primitiveType:W$18.TRIANGLES,boundingSphere:i$1d.fromEllipsoid(K),offsetAttribute:e._offsetAttribute})}}},b$O.getUnitEllipsoid=function(){return e$2e(ni$3)||(ni$3=b$O.createGeometry(new b$O({radii:new o$1p(1,1,1),vertexFormat:n$13.POSITION_ONLY}))),ni$3},Object.defineProperties(t$z.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},isCreateSkirt:{get:function(){return this._isCreateSkirt},set:function(e){e!==this._isCreateSkirt&&(this._isSkirtDirty=!0),this._isCreateSkirt=e}}}),t$z.prototype.requestTileGeometry=function(e,t,i,n){return o$1l.resolve(new T$L({buffer:new Uint8Array(256),width:16,height:16,skirtMode:this._isCreateSkirt}))},t$z.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},t$z.prototype.getTileDataAvailable=function(e,t,i){},t$z.prototype.loadTileDataAvailability=function(e,t,i){},n$x.prototype.add=function(e,t,i){if(!e$2e(e))throw new t$15("event is required");var n=e.addEventListener(t,i);this._removalFunctions.push(n);var r=this;return function(){n();var e=r._removalFunctions;e.splice(e.indexOf(n),1)}},n$x.prototype.removeAll=function(){for(var e=this._removalFunctions,t=0,i=e.length;t<i;++t)e[t]();e.length=0};var e$Y={NONE:0,HOLD:1,EXTRAPOLATE:2},_0x1015ec=Object.freeze(e$Y);function o$K(){}o$K.prototype.geocode=t$15.throwInstantiationError;var e$X={SEARCH:0,AUTOCOMPLETE:1},c$H=Object.freeze(e$X);function a$F(e,t){return a$K(e,t=u$Z(t,0),Math.min(4,e.length))}function g$M(){this.PI=3.14159265358979,this.param_a=0,this.param_d=1e-12,this.p=206264.8062471,this.a=6378137,this.b=6356752.31414036,this.alpha=.003352810681182319,this.e2=.0066943800229,this.e21=.00673949677548,this.c=6399593.62586,this.K0=1.57048761144159e-7,this.K1=.00505250178820567,this.K2=298472900956587e-19,this.K3=2.41626669230084e-7,this.K4=2.22241238938534e-9,this.alpha=1/298.257222101,this.e4=Math.pow(this.e2,2),this.e6=Math.pow(this.e2,3),this.e8=Math.pow(this.e2,4),this.A=1+.5*this.e2+.375*this.e4+.3125*this.e6+630/2304*this.e8,this.B=1/6*this.e2+15/80*this.e4+.1875*this.e6+420/2304*this.e8,this.C=3/80*this.e4+7/112*this.e6+.078125*this.e8,this.D=1/112*this.e6+45/2304*this.e8,this.E=5/2304*this.e8}function x$M(){this.PI=3.14159265358979,this.param_a=0,this.param_d=1e-12,this.p=206264.8062471,this.a=6378140,this.b=6356755.288157528,this.alpha=.0033528131778969143,this.e2=.00669438499958795,this.e21=.00673950181947292,this.c=6399596.65198801,this.K0=1.57048687472752e-7,this.K1=.00505250559291393,this.K2=298473350966158e-19,this.K3=2.41627215981336e-7,this.K4=2.22241909461273e-9,this.e4=Math.pow(this.e2,2),this.e6=Math.pow(this.e2,3),this.e8=Math.pow(this.e2,4),this.A=1+.5*this.e2+.375*this.e4+.3125*this.e6+630/2304*this.e8,this.B=1/6*this.e2+15/80*this.e4+.1875*this.e6+420/2304*this.e8,this.C=3/80*this.e4+7/112*this.e6+.078125*this.e8,this.D=1/112*this.e6+45/2304*this.e8,this.E=5/2304*this.e8}function E$K(e,t,i,n,r,o){var a=0;a=t>1e6?t-5e5-1e6*r:t-5e5;var s=o.K0*e,l=Math.sin(s),u=s+Math.cos(s)*(o.K1*l-o.K2*Math.pow(l,3)+o.K3*Math.pow(l,5)-o.K4*Math.pow(l,7)),c=Math.tan(u),h=o.e21*Math.pow(Math.cos(u),2),d=Math.sqrt(1+h),f=a/(o.c/d),p=Math.pow(d,2)*c,_=Math.pow(c,2);i.B=u-p*Math.pow(f,2)/2+(5+3*_+h-9*h*_)*p*Math.pow(f,4)/24-(61+90*_+45*Math.pow(_,2))*p*Math.pow(f,6)/720;var m=1/Math.cos(u);i.L=m*f-(1+2*_+h)*m*Math.pow(f,3)/6+(5+28*_+24*Math.pow(_,2)+6*h+8*h*_)*m*Math.pow(f,5)/120+n}function G$N(e,t,i,n,r,o){var a=(t-e)/2,s=(t+e)/2,l=(n+i)/2,u=2*o.b*o.b*l,c=Math.cos(s),h=Math.sin(a),d=[];return d[0]=u*o.A*h*c,d[1]=u*o.B*Math.sin(3*a)*Math.cos(3*s),d[2]=u*o.C*Math.sin(5*a)*Math.cos(5*s),d[3]=u*o.D*Math.sin(7*a)*Math.cos(7*s),d[4]=u*o.E*Math.sin(9*a)*Math.cos(9*s),d[0]-d[1]+d[2]-d[3]+d[4]}function q$K(e,t,i,n){for(var r=0,o=0;o<e.length-1;o++)for(var a=e[o],s=e[o+1],l=a.x,u=a.y,c=s.x,h=s.y,d=s.x-a.x,f=s.y-a.y,p=Math.pow(Math.abs(d),2),_=Math.pow(Math.abs(f),2),m=Math.sqrt(p+_),g=Math.floor(m/70),x=1;x<=g+1;x++){var y=0,v=0;x<g+1?(y=a.x+d*x/(g+1),v=a.y+f*x/(g+1)):(y=c,v=h);var $={B:0,L:0},b={B:0,L:0};E$K(u,l,$,t,i,n),E$K(v,y,b,t,i,n),r+=G$N($.B,b.B,$.L,b.L,t,n),l=y,u=v}return Math.abs(r)}function I$R(e,t,i,n){for(var r=0,o=0;o<e.length-1;o++){var a={B:0,L:0},s={B:0,L:0};E$K(e[o].y,e[o].x,a,t,i,n),E$K(e[o+1].y,e[o+1].x,s,t,i,n);var l=[],u=(s.B-a.B)/2,c=(s.B+a.B)/2,h=(s.L+a.L)/2,d=2*n.b*n.b*h,f=Math.cos(c),p=Math.sin(u);l[0]=d*n.A*f*p,l[1]=d*n.B*Math.sin(3*u)*Math.cos(3*c),l[2]=d*n.C*Math.sin(5*u)*Math.cos(5*c),l[3]=d*n.D*Math.sin(7*u)*Math.cos(7*c),l[4]=d*n.E*Math.sin(9*u)*Math.cos(9*c),r+=l[0]-l[1]+l[2]-l[3]+l[4]}return Math.abs(r)}function R$C(e,t,i,n,r){var o=0,a=e$2d.toRadians(i);if("China2000"===t)o=q$K(e,a,n,new g$M);else if("Xian1980"===t){o=I$R(e,a,n,new x$M)}return o}var tmp={};(function(global,undefined$1){!function(e,t,i){global.protobuf=function i(n){var r=t[n];return r||e[n][0].call(r=t[n]={exports:{}},i,r,r.exports),r.exports}(7)}({1:[function(e,t,i){t.exports=function(e,t){for(var i=[],n=2;n<arguments.length;)i.push(arguments[n++]);var r=!0;return new Promise((function(n,o){i.push((function(e){if(r)if(r=!1,e)o(e);else{for(var t=[],i=1;i<arguments.length;)t.push(arguments[i++]);n.apply(null,t)}}));try{e.apply(t||this,i)}catch(e){r&&(r=!1,o(e))}}))}},{}],2:[function(e,t,i){var n=i;n.length=function(e){var t=e.length;if(!t)return 0;for(var i=0;--t%4>1&&"="===e.charAt(t);)++i;return Math.ceil(3*e.length)/4-i};for(var r=new Array(64),o=new Array(123),a=0;a<64;)o[r[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;n.encode=function(e,t,i){for(var n,o=[],a=0,s=0;t<i;){var l=e[t++];switch(s){case 0:o[a++]=r[l>>2],n=(3&l)<<4,s=1;break;case 1:o[a++]=r[n|l>>4],n=(15&l)<<2,s=2;break;case 2:o[a++]=r[n|l>>6],o[a++]=r[63&l],s=0}}return s&&(o[a++]=r[n],o[a]=61,1===s&&(o[a+1]=61)),String.fromCharCode.apply(String,o)};var s="invalid encoding";n.decode=function(e,t,i){for(var n,r=i,a=0,l=0;l<e.length;){var u=e.charCodeAt(l++);if(61===u&&a>1)break;if((u=o[u])===undefined$1)throw Error(s);switch(a){case 0:n=u,a=1;break;case 1:t[i++]=n<<2|(48&u)>>4,n=u,a=2;break;case 2:t[i++]=(15&n)<<4|(60&u)>>2,n=u,a=3;break;case 3:t[i++]=(3&n)<<6|u,a=0}}if(1===a)throw Error(s);return i-r},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{}],3:[function(e,t,i){function n(){this._listeners={}}t.exports=n,n.prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this},n.prototype.off=function(e,t){if(e===undefined$1)this._listeners={};else if(t===undefined$1)this._listeners[e]=[];else for(var i=this._listeners[e],n=0;n<i.length;)i[n].fn===t?i.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var i=[],n=1;n<arguments.length;)i.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,i)}return this}},{}],4:[function(require,module,exports){function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],5:[function(e,t,i){t.exports=function(e,t,i){var n=i||8192,r=n>>>1,o=null,a=n;return function(i){if(i<1||i>r)return e(i);a+i>n&&(o=e(n),a=0);var s=t.call(o,a,a+=i);return 7&a&&(a=1+(7|a)),s}}},{}],6:[function(e,t,i){var n=i;n.length=function(e){for(var t=0,i=0,n=0;n<e.length;++n)(i=e.charCodeAt(n))<128?t+=1:i<2048?t+=2:55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,i){if(i-t<1)return"";for(var n,r=null,o=[],a=0;t<i;)(n=e[t++])<128?o[a++]=n:n>191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,o)),a=0);return r?(a&&r.push(String.fromCharCode.apply(String,o.slice(0,a))),r.join("")):String.fromCharCode.apply(String,o.slice(0,a))},n.write=function(e,t,i){for(var n,r,o=i,a=0;a<e.length;++a)(n=e.charCodeAt(a))<128?t[i++]=n:n<2048?(t[i++]=n>>6|192,t[i++]=63&n|128):55296==(64512&n)&&56320==(64512&(r=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&r),++a,t[i++]=n>>18|240,t[i++]=n>>12&63|128,t[i++]=n>>6&63|128,t[i++]=63&n|128):(t[i++]=n>>12|224,t[i++]=n>>6&63|128,t[i++]=63&n|128);return i-o}},{}],7:[function(e,t,i){var n=i;function r(){n.Reader._configure(n.BufferReader),n.util._configure()}n.build="minimal",n.roots={},n.Writer=e(14),n.BufferWriter=e(15),n.Reader=e(8),n.BufferReader=e(9),n.util=e(13),n.rpc=e(10),n.configure=r,n.Writer._configure(n.BufferWriter),r()},{10:10,13:13,14:14,15:15,8:8,9:9}],8:[function(e,t,i){t.exports=l;var n,r=e(13),o=r.LongBits,a=r.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var u=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")};function c(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw s(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}l.create=r.Buffer?function(e){return(l.create=function(e){return r.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u,l.prototype._slice=r.Array.prototype.subarray||r.Array.prototype.slice,l.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return h(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|h(this.buf,this.pos+=4)};var f=typeof Float32Array<"u"?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(i,n){return t[0]=i[n],t[1]=i[n+1],t[2]=i[n+2],t[3]=i[n+3],e[0]}:function(i,n){return t[0]=i[n+3],t[1]=i[n+2],t[2]=i[n+1],t[3]=i[n],e[0]}}():function(e,t){var i=h(e,t+4),n=2*(i>>31)+1,r=i>>>23&255,o=8388607&i;return 255===r?o?NaN:n*(1/0):0===r?1401298464324817e-60*n*o:n*Math.pow(2,r-150)*(o+8388608)};l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=f(this.buf,this.pos);return this.pos+=4,e};var p=typeof Float64Array<"u"?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(i,n){return t[0]=i[n],t[1]=i[n+1],t[2]=i[n+2],t[3]=i[n+3],t[4]=i[n+4],t[5]=i[n+5],t[6]=i[n+6],t[7]=i[n+7],e[0]}:function(i,n){return t[0]=i[n+7],t[1]=i[n+6],t[2]=i[n+5],t[3]=i[n+4],t[4]=i[n+3],t[5]=i[n+2],t[6]=i[n+1],t[7]=i[n],e[0]}}():function(e,t){var i=h(e,t+4),n=h(e,t+8),r=2*(n>>31)+1,o=n>>>20&2047,a=4294967296*(1048575&n)+i;return 2047===o?a?NaN:r*(1/0):0===o?5e-324*r*a:r*Math.pow(2,o-1075)*(a+4503599627370496)};l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=p(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,i=this.pos+e;if(i>this.len)throw s(this,e);return this.pos+=e,t===i?new this.buf.constructor(0):this._slice.call(this.buf,t,i)},l.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4==(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){n=e;var t=r.Long?"toLong":"toNumber";r.merge(l.prototype,{int64:function(){return c.call(this)[t](!1)},uint64:function(){return c.call(this)[t](!0)},sint64:function(){return c.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},{13:13}],9:[function(e,t,i){t.exports=o;var n=e(8);(o.prototype=Object.create(n.prototype)).constructor=o;var r=e(13);function o(e){n.call(this,e)}r.Buffer&&(o.prototype._slice=r.Buffer.prototype.slice),o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{13:13,8:8}],10:[function(e,t,i){i.Service=e(11)},{11:11}],11:[function(e,t,i){t.exports=r;var n=e(13);function r(e,t,i){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(i)}(r.prototype=Object.create(n.EventEmitter.prototype)).constructor=r,r.prototype.rpcCall=function e(t,i,r,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,i,r,o);if(!s.rpcImpl)return setTimeout((function(){a(Error("already ended"))}),0),undefined$1;try{return s.rpcImpl(t,i[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,i){if(e)return s.emit("error",e,t),a(e);if(null===i)return s.end(!0),undefined$1;if(!(i instanceof r))try{i=r[s.responseDelimited?"decodeDelimited":"decode"](i)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",i,t),a(null,i)}))}catch(e){return s.emit("error",e,t),setTimeout((function(){a(e)}),0),undefined$1}},r.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{13:13}],12:[function(e,t,i){t.exports=r;var n=e(13);function r(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=r.zero=new r(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var i=e>>>0,n=(e-i)/4294967296>>>0;return t&&(n=~n>>>0,i=~i>>>0,++i>4294967295&&(i=0,++n>4294967295&&(n=0))),new r(i,n)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if(n.isString(e)){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):o},r.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,i=~this.hi>>>0;return t||(i=i+1>>>0),-(t+4294967296*i)}return this.lo+4294967296*this.hi},r.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;r.fromHash=function(e){return e===a?o:new r((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},r.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},r.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:i<128?9:10}},{13:13}],13:[function(e,t,i){var n=i;function r(e,t,i){for(var n=Object.keys(t),r=0;r<n.length;++r)(e[n[r]]===undefined$1||!i)&&(e[n[r]]=t[n[r]]);return e}function o(e){function t(e,i){if(!(this instanceof t))return new t(e,i);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),i&&r(this,i)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=e(1),n.base64=e(2),n.EventEmitter=e(3),n.inquire=e(4),n.utf8=e(6),n.pool=e(5),n.LongBits=e(12),n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)},n.Array=typeof Uint8Array<"u"?Uint8Array:Array,n.Long=global.dcodeIO&&global.dcodeIO.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var i=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(i.lo,i.hi,t):i.toNumber(Boolean(t))},n.merge=r,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},i=0;i<e.length;++i)t[e[i]]=1;return function(){for(var e=Object.keys(this),i=e.length-1;i>-1;--i)if(1===t[e[i]]&&this[e[i]]!==undefined$1&&null!==this[e[i]])return e[i]}},n.oneOfSetter=function(e){return function(t){for(var i=0;i<e.length;++i)e[i]!==t&&delete this[e[i]]}},n.lazyResolve=function(e,t){for(var i=0;i<t.length;++i)for(var n=Object.keys(t[i]),r=0;r<n.length;++r){for(var o=t[i][n[r]].split("."),a=e;o.length;)a=a[o.shift()];t[i][n[r]]=a}},n.toJSONOptions={longs:String,enums:String,bytes:String},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,i){return new e(t,i)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},{1:1,12:12,2:2,3:3,4:4,5:5,6:6}],14:[function(e,t,i){t.exports=h;var n,r=e(13),o=r.LongBits,a=r.base64,s=r.utf8;function l(e,t,i){this.fn=e,this.len=t,this.next=undefined$1,this.val=i}function u(){}function c(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function h(){this.len=0,this.head=new l(u,0,0),this.tail=this.head,this.states=null}function d(e,t,i){t[i]=255&e}function f(e,t){this.len=e,this.next=undefined$1,this.val=t}function p(e,t,i){for(;e.hi;)t[i++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[i++]=127&e.lo|128,e.lo=e.lo>>>7;t[i++]=e.lo}function _(e,t,i){t[i++]=255&e,t[i++]=e>>>8&255,t[i++]=e>>>16&255,t[i]=e>>>24}h.create=r.Buffer?function(){return(h.create=function(){return new n})()}:function(){return new h},h.alloc=function(e){return new r.Array(e)},r.Array!==Array&&(h.alloc=r.pool(h.alloc,r.Array.prototype.subarray)),h.prototype.push=function(e,t,i){return this.tail=this.tail.next=new l(e,t,i),this.len+=t,this},f.prototype=Object.create(l.prototype),f.prototype.fn=function(e,t,i){for(;e>127;)t[i++]=127&e|128,e>>>=7;t[i]=e},h.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},h.prototype.int32=function(e){return e<0?this.push(p,10,o.fromNumber(e)):this.uint32(e)},h.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},h.prototype.uint64=function(e){var t=o.from(e);return this.push(p,t.length(),t)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this.push(p,t.length(),t)},h.prototype.bool=function(e){return this.push(d,1,e?1:0)},h.prototype.fixed32=function(e){return this.push(_,4,e>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(e){var t=o.from(e);return this.push(_,4,t.lo).push(_,4,t.hi)},h.prototype.sfixed64=h.prototype.fixed64;var m=typeof Float32Array<"u"?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(i,n,r){e[0]=i,n[r++]=t[0],n[r++]=t[1],n[r++]=t[2],n[r]=t[3]}:function(i,n,r){e[0]=i,n[r++]=t[3],n[r++]=t[2],n[r++]=t[1],n[r]=t[0]}}():function(e,t,i){var n=e<0?1:0;if(n&&(e=-e),0===e)_(1/e>0?0:2147483648,t,i);else if(isNaN(e))_(2147483647,t,i);else if(e>34028234663852886e22)_((n<<31|2139095040)>>>0,t,i);else if(e<11754943508222875e-54)_((n<<31|Math.round(e/1401298464324817e-60))>>>0,t,i);else{var r=Math.floor(Math.log(e)/Math.LN2);_((n<<31|r+127<<23|8388607&Math.round(e*Math.pow(2,-r)*8388608))>>>0,t,i)}};h.prototype.float=function(e){return this.push(m,4,e)};var g=typeof Float64Array<"u"?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(i,n,r){e[0]=i,n[r++]=t[0],n[r++]=t[1],n[r++]=t[2],n[r++]=t[3],n[r++]=t[4],n[r++]=t[5],n[r++]=t[6],n[r]=t[7]}:function(i,n,r){e[0]=i,n[r++]=t[7],n[r++]=t[6],n[r++]=t[5],n[r++]=t[4],n[r++]=t[3],n[r++]=t[2],n[r++]=t[1],n[r]=t[0]}}():function(e,t,i){var n=e<0?1:0;if(n&&(e=-e),0===e)_(0,t,i),_(1/e>0?0:2147483648,t,i+4);else if(isNaN(e))_(4294967295,t,i),_(2147483647,t,i+4);else if(e>17976931348623157e292)_(0,t,i),_((n<<31|2146435072)>>>0,t,i+4);else{var r;if(e<22250738585072014e-324)_((r=e/5e-324)>>>0,t,i),_((n<<31|r/4294967296)>>>0,t,i+4);else{var o=Math.floor(Math.log(e)/Math.LN2);1024===o&&(o=1023),_(4503599627370496*(r=e*Math.pow(2,-o))>>>0,t,i),_((n<<31|o+1023<<20|1048576*r&1048575)>>>0,t,i+4)}}};h.prototype.double=function(e){return this.push(g,8,e)};var x=r.Array.prototype.set?function(e,t,i){t.set(e,i)}:function(e,t,i){for(var n=0;n<e.length;++n)t[i+n]=e[n]};h.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this.push(d,1,0);if(r.isString(e)){var i=h.alloc(t=a.length(e));a.decode(e,i,0),e=i}return this.uint32(t).push(x,t,e)},h.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t).push(s.write,t,e):this.push(d,1,0)},h.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(u,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},h.prototype.ldelim=function(){var e=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=e.next,this.tail=t,this.len+=i),this},h.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),i=0;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t},h._configure=function(e){n=e}},{13:13}],15:[function(e,t,i){t.exports=a;var n=e(14);(a.prototype=Object.create(n.prototype)).constructor=a;var r=e(13),o=r.Buffer;function a(){n.call(this)}a.alloc=function(e){return(a.alloc=r._Buffer_allocUnsafe)(e)};var s=o&&o.prototype instanceof Uint8Array&&"set"===o.prototype.set.name?function(e,t,i){t.set(e,i)}:function(e,t,i){if(e.copy)e.copy(t,i,0,e.length);else for(var n=0;n<e.length;)t[i++]=e[n++]};function l(e,t,i){e.length<40?r.utf8.write(e,t,i):t.utf8Write(e,i)}a.prototype.bytes=function(e){r.isString(e)&&(e=r._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(s,t,e),this},a.prototype.string=function(e){var t=o.byteLength(e);return this.uint32(t),t&&this.push(l,t,e),this}},{13:13,14:14}]},{})})(tmp);var R$B=tmp.protobuf,d$Y=[1,2,4,8],a$E=15,m$J=16,p$K=64,y$G=128;function e$W(e,t,i,n,r,o){this._bits=e,this.cnodeVersion=t,this.imageryVersion=i,this.terrainVersion=n,this.imageryProvider=r,this.terrainProvider=o,this.ancestorHasTerrain=!1,this.terrainState=void 0}function U$I(e){for(var t=e.length,i=new ArrayBuffer(t),n=new Uint8Array(i),r=0;r<t;++r)n[r]=e.charCodeAt(r);return i}e$W.clone=function(e,t){return e$2e(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new e$W(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t},e$W.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},e$W.prototype.hasSubtree=function(){return i$Q(this._bits,m$J)},e$W.prototype.hasImagery=function(){return i$Q(this._bits,p$K)},e$W.prototype.hasTerrain=function(){return i$Q(this._bits,y$G)},e$W.prototype.hasChildren=function(){return i$Q(this._bits,a$E)},e$W.prototype.hasChild=function(e){return i$Q(this._bits,d$Y[e])},e$W.prototype.getChildBitmask=function(){return this._bits&a$E};var X$C=U$I('Eô½\vyâjE"’,ÍqøIFgQ\0B%Æèa,f)\bÆ4Üjb%y\nwmiÖðœk“¡½NuàA[ß@V\fÙ»r›|3SîOlÔq°{ÀEVZ­wUe\v3’*¬l5Å0sø3>mF8J´Ýð.ÝuڌDt"úa"\f3"So¯9D\vŒ9Ù9L¹¿«\\ŒP_Ÿ"uxéq‘h;Áěð<VqH‚\'UfYNe˜u£aF}a?A\0Ÿ×´4M·F°Õ¸Š\'{‹Ü+»Mg0ÈÑö\\Pú[/F›n5/\'C.ë\n\f^¥se4ål.jC\'c#U©?q{gC}:¯ÍâTUœýKÆâŸ/(íË\\Æ-fˆ§;/*"N°k.Ý\r•}}GºC²²+>Mª>}æÎI‰Ææx\fa1-¤O¥~q ˆì\r1èN\v\0nPh}=\b\r•¦n£h—$[kó#ó¶s³\r\v@ÀŸØQ]ú".jßI\0¹ wUÆïj¿{GLƒîÜÜF…©­S+S4ÿ”Yä8è1ƒN¹XFkË-#†’p\x005ˆ"Ï1²&/çÃu-6,rt°#G·ÓÑ&…7râ\0ŒDÏÚ3-Þ`†i#i*|ÍKQ\r•T9w.)ê¦P¢joP™\\>TûïP[\vE‰m(w7ێJfJo™ åpâ¹q~\fmI-zþrÇòY0»]såÉ êxì ðŠB|G`°½&·q¶ÇŸÑ3‚=Ó«îc™È+S D\\qÆÌD2O<ÊÀ)=RÓaX©}e´ÜÏ\rô=ñ\b©BÚ#\tØ¿^PIøMÀËGLO÷{+ØÅ1’;µoÜl\r’ˆўÛ?âéÚ_ԄâFaZÞUϤ\0¾ýÎgñJi—æ HØ]~®q N®ÀV©‘<‚rçvì)IÖ]-ƒãÛ6©;f—‡jÕ¶=P^R¹KÇsWxÉô.Y•“oÐKW>\'\'Ç`Û;íšSD>?’mw¢\në?R¨ÆU^1I7…ôÅ&-©¿‹\'TÚÃj å*x°Öprª‹h½ˆ÷_H±~ÀXL?fù>áeÀp§Ï8i¯ðVldIœ\'­xtO‡ÞV9\0Úw\vË-‰û5Oõ\bQ`Á\nZGM&30xÚÀœFGâ[y`In7gS\n>éìF9²ñ4\rƄSuná\fYÙÞ)…{II¥wy¾IV.6ç\v:»Ob{ÒM1•/½8{¨O!áìFpv•})"xˆ\nÝ\\ÚÞQÏðüYRe|3ßóHÚ»*uÛ`²Ôüíì5¨ÿ(1-È܈F|Š["');function c$G(e){o$1q.defined("resourceOrUrl",e);var t=e;"string"!=typeof t&&!(t instanceof t$10)&&(o$1q.typeOf.string("resourceOrUrl.url",e.url),t=e.url);var i=t$10.createIfNeeded(t);i.appendForwardSlash(),this._resource=i,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=e$2d.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};var n=this;this._readyPromise=z$H(this).then((function(){return n.getQuadTreePacket("",n._quadPacketVersion)})).then((function(){return!0})).otherwise((function(e){var t="An error occurred while accessing "+B$E(n,"",1).url+".";return o$1l.reject(new t$13(t))}))}Object.defineProperties(c$G.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}}),c$G.tileXYToQuadKey=function(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n},c$G.quadKeyToTileXY=function(e){for(var t=0,i=0,n=e.length-1,r=n;r>=0;--r){var o=1<<r,a=+e[n-r];i$Q(a,2)?i$Q(a,1)||(t|=o):(i|=o,i$Q(a,1)&&(t|=o))}return{x:t,y:i,level:n}},c$G.prototype.isValid=function(e){var t=this.getTileInformationFromQuadKey(e);if(e$2e(t))return null!==t;for(var i,n=!0,r=e;r.length>1;){if(i=r.substring(r.length-1),r=r.substring(0,r.length-1),e$2e(t=this.getTileInformationFromQuadKey(r))){!t.hasSubtree()&&!t.hasChild(parseInt(i))&&(n=!1);break}if(null===t){n=!1;break}}return n};var k$C=new i$W("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY),w$E,I$Q;function P$D(e,t,i){var n=e._tileInfo,r=t,o=n[r];if(e$2e(o)&&(!o.hasSubtree()||o.hasChildren()))return o;for(;void 0===o&&r.length>1;)o=n[r=r.substring(0,r.length-1)];var a,s=e._subtreePromises,l=s[r];return e$2e(l)?l.then((function(){return a=new r$1c({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),P$D(e,t,a)})):e$2e(o)&&o.hasSubtree()?e$2e(l=e.getQuadTreePacket(r,o.cnodeVersion,i))?(s[r]=l,l.then((function(){return a=new r$1c({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),P$D(e,t,a)})).always((function(){delete s[r]}))):void 0:o$1l.reject(new t$13("Couldn't load metadata for tile "+t))}function B$E(e,t,i,n){return e._resource.getDerivedResource({url:"flatfile?q2-0"+t+"-q."+i.toString(),request:n})}function z$H(e){var t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!e$2e(I$Q)){var i=n$17("ThirdParty/google-earth-dbroot-parser.js"),n=window.cesiumGoogleEarthDbRootParser;I$Q=a$11(i).then((function(){w$E=window.cesiumGoogleEarthDbRootParser(R$B),e$2e(n)?window.cesiumGoogleEarthDbRootParser=n:delete window.cesiumGoogleEarthDbRootParser}))}return I$Q.then((function(){return t.fetchArrayBuffer()})).then((function(t){var i=w$E.EncryptedDbRootProto.decode(new Uint8Array(t)),n=i.encryptionData,r=n.byteOffset,o=r+n.byteLength,a=e.key=n.buffer.slice(r,o);o=(r=(n=i.dbrootData).byteOffset)+n.byteLength;var s=n.buffer.slice(r,o);return k$C.scheduleTask({buffer:s,type:"DbRoot",key:a},[s])})).then((function(t){var i=w$E.DbRootProto.decode(new Uint8Array(t.buffer));if(e.imageryPresent=u$Z(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=u$Z(i.terrainPresent,e.terrainPresent),e$2e(i.endSnippet)&&e$2e(i.endSnippet.model)){var n=i.endSnippet.model;e.negativeAltitudeExponentBias=u$Z(n.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=u$Z(n.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)}e$2e(i.databaseVersion)&&(e._quadPacketVersion=u$Z(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));for(var r=e.providers,o=u$Z(i.providerInfo,[]),a=o.length,s=0;s<a;++s){var l=o[s],u=l.copyrightString;e$2e(u)&&(r[l.providerId]=new r$U(u.value))}})).otherwise((function(){console.log("Failed to retrieve "+t.url+". Using defaults."),e.key=X$C}))}function T$I(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.typeOf.object("options.buffer",e.buffer),o$1q.typeOf.number("options.negativeAltitudeExponentBias",e.negativeAltitudeExponentBias),o$1q.typeOf.number("options.negativeElevationThreshold",e.negativeElevationThreshold),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;var t=u$Z(e.childTileMask,15),i=3&t;i|=4&t?8:0,i|=8&t?4:0,this._childTileMask=i,this._createdByUpsampling=u$Z(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}c$G.prototype.getQuadTreePacket=function(e,t,i){t=u$Z(t,1);var n=B$E(this,e=u$Z(e,""),t,i).fetchArrayBuffer();if(e$2e(n)){var r=this._tileInfo,o=this.key;return n.then((function(t){return k$C.scheduleTask({buffer:t,quadKey:e,type:"Metadata",key:o},[t]).then((function(t){var i,n=-1;if(""!==e){n=e.length+1;var o=t[e];(i=r[e])._bits|=o._bits,delete t[e]}var a=Object.keys(t);a.sort((function(e,t){return e.length-t.length}));for(var s=a.length,l=0;l<s;++l){var u=a[l];if(null!==t[u]){var c=e$W.clone(t[u]),h=u.length;if(h===n)c.setParent(i);else if(h>1){var d=r[u.substring(0,u.length-1)];c.setParent(d)}r[u]=c}else r[u]=null}}))}))}},c$G.prototype.populateSubtree=function(e,t,i,n){return P$D(this,c$G.tileXYToQuadKey(e,t,i),n)},c$G.prototype.getTileInformation=function(e,t,i){var n=c$G.tileXYToQuadKey(e,t,i);return this._tileInfo[n]},c$G.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]},Object.defineProperties(T$I.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var te$s=new i$W("createVerticesFromGoogleEarthEnterpriseBuffer"),F$I=new h$18,z$G=new h$18;T$I.prototype.createMesh=function(e,t,i,n,r){o$1q.typeOf.object("tilingScheme",e),o$1q.typeOf.number("x",t),o$1q.typeOf.number("y",i),o$1q.typeOf.number("level",n);var o=e.ellipsoid;e.tileXYToNativeRectangle(t,i,n,F$I),e.tileXYToRectangle(t,i,n,z$G),r=u$Z(r,1);var a=o.cartographicToCartesian(h$18.center(z$G)),s=40075.16/(1<<n);this._skirtHeight=Math.min(8*s,1e3);var l=te$s.scheduleTask({buffer:this._buffer,nativeRectangle:F$I,rectangle:z$G,relativeToCenter:a,ellipsoid:o,skirtHeight:this._skirtHeight,exaggeration:r,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(e$2e(l)){var u=this;return l.then((function(e){return u._mesh=new T$M(a,new Float32Array(e.vertices),new Uint16Array(e.indices),e.indexCountWithoutSkirts,e.vertexCountWithoutSkirts,e.minimumHeight,e.maximumHeight,i$1d.clone(e.boundingSphere3D),o$1p.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,y$Y.clone(e.orientedBoundingBox),h$M.clone(e.encoding),r,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast),u._minimumHeight=e.minimumHeight,u._maximumHeight=e.maximumHeight,u._buffer=void 0,u._mesh}))}},T$I.prototype.interpolateHeight=function(e,t,i){var n=e$2d.clamp((t-e.west)/e.width,0,1),r=e$2d.clamp((i-e.south)/e.height,0,1);return e$2e(this._mesh)?oe$l(this,n,r):de$j(this,n,r,e)};var ie$q=new i$W("upsampleQuantizedTerrainMesh");T$I.prototype.upsample=function(e,t,i,n,r,o,a){if(o$1q.typeOf.object("tilingScheme",e),o$1q.typeOf.number("thisX",t),o$1q.typeOf.number("thisY",i),o$1q.typeOf.number("thisLevel",n),o$1q.typeOf.number("descendantX",r),o$1q.typeOf.number("descendantY",o),o$1q.typeOf.number("descendantLevel",a),a-n>1)throw new t$15("Upsampling through more than one level at a time is not currently supported.");var s=this._mesh;if(e$2e(this._mesh)){var l=2*t!==r,u=2*i===o,c=e.ellipsoid,h=e.tileXYToRectangle(r,o,a),d=ie$q.scheduleTask({vertices:s.vertices,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:l,isNorthChild:u,childRectangle:h,ellipsoid:c,exaggeration:s.exaggeration});if(e$2e(d)){var f=this;return d.then((function(e){var t=new Uint16Array(e.vertices),i=ce$z.createTypedArray(t.length/3,e.indices),n=f._skirtHeight;return new p$O({quantizedVertices:t,indices:i,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:i$1d.clone(e.boundingSphere),orientedBoundingBox:y$Y.clone(e.orientedBoundingBox),horizonOcclusionPoint:o$1p.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:n,southSkirtHeight:n,eastSkirtHeight:n,northSkirtHeight:n,childTileMask:0,createdByUpsampling:!0,credits:f._credits})}))}}},T$I.prototype.isChildAvailable=function(e,t,i,n){o$1q.typeOf.number("thisX",e),o$1q.typeOf.number("thisY",t),o$1q.typeOf.number("childX",i),o$1q.typeOf.number("childY",n);var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!=(this._childTileMask&1<<r)},T$I.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var re$v=new o$1o,ne$s=new o$1o,ae$p=new o$1o,Y$w=new o$1p;function oe$l(e,t,i){for(var n=e._mesh,r=n.vertices,o=n.encoding,a=n.indices,s=0,l=a.length;s<l;s+=3){var u=a[s],c=a[s+1],h=a[s+2],d=o.decodeTextureCoordinates(r,u,re$v),f=o.decodeTextureCoordinates(r,c,ne$s),p=o.decodeTextureCoordinates(r,h,ae$p),_=d$10.computeBarycentricCoordinates(t,i,d.x,d.y,f.x,f.y,p.x,p.y,Y$w);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){var m=o.decodeHeight(r,u),g=o.decodeHeight(r,c),x=o.decodeHeight(r,h);return _.x*m+_.y*g+_.z*x}}}var se$m=Uint16Array.BYTES_PER_ELEMENT,L$P=Uint32Array.BYTES_PER_ELEMENT,P$C=Int32Array.BYTES_PER_ELEMENT,he$j=Float32Array.BYTES_PER_ELEMENT,U$H=Float64Array.BYTES_PER_ELEMENT;function de$j(e,t,i,n){var r=e._buffer,o=0,a=0,s=0;i>.5?(t>.5?(o=2,a=.5):o=3,s=.5):t>.5&&(o=1,a=.5);for(var l=new DataView(r),u=0,c=0;c<o;++c)u+=l.getUint32(u,!0),u+=L$P;u+=L$P,u+=2*U$H;var h=e$2d.toRadians(180*l.getFloat64(u,!0));u+=U$H;var d=e$2d.toRadians(180*l.getFloat64(u,!0));u+=U$H;var f=n.width/h/2,p=n.height/d/2,_=l.getInt32(u,!0);u+=P$C;var m=3*l.getInt32(u,!0);u+=P$C,u+=P$C;var g,x=new Array(_),y=new Array(_),v=new Array(_);for(g=0;g<_;++g)x[g]=a+l.getUint8(u++)*f,y[g]=s+l.getUint8(u++)*p,v[g]=6371010*l.getFloat32(u,!0),u+=he$j;var $=new Array(m);for(g=0;g<m;++g)$[g]=l.getUint16(u,!0),u+=se$m;for(g=0;g<m;g+=3){var b=$[g],T=$[g+1],C=$[g+2],S=x[b],w=x[T],E=x[C],P=y[b],A=y[T],L=y[C],M=d$10.computeBarycentricCoordinates(t,i,S,P,w,A,E,L,Y$w);if(M.x>=-1e-15&&M.y>=-1e-15&&M.z>=-1e-15)return M.x*v[b]+M.y*v[T]+M.z*v[C]}}var d$X={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},S$F=new a$15;function I$P(){this._terrainCache={},this._lastTidy=a$15.now()}function _$B(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url)&&!e$2e(e.metadata))throw new t$15("options.url or options.metadata is required.");var t;if(e$2e(e.metadata))t=e.metadata;else{var i=t$10.createIfNeeded(e.url);t=new c$G(i)}this._metadata=t,this._tilingScheme=new g$15({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new h$18(-e$2d.PI,-e$2d.PI,e$2d.PI,e$2d.PI),ellipsoid:e.ellipsoid});var n=e.credit;"string"==typeof n&&(n=new r$U(n)),this._credit=n,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new I$P,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new o$1h,this._ready=!1;var r,o=this;this._readyPromise=t.readyPromise.then((function(e){if(!t.terrainPresent){var i=new t$13("The server "+t.url+" doesn't have terrain");return r=l$V.handleError(r,o,o._errorEvent,i.message,void 0,void 0,void 0,i),o$1l.reject(i)}return l$V.handleSuccess(r),o._ready=e,e})).otherwise((function(e){return r=l$V.handleError(r,o,o._errorEvent,e.message,void 0,void 0,void 0,e),o$1l.reject(e)}))}I$P.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:a$15.now()}},I$P.prototype.get=function(e){var t=this._terrainCache[e];if(e$2e(t))return delete this._terrainCache[e],t.buffer},I$P.prototype.tidy=function(){if(a$15.now(S$F),a$15.secondsDifference(S$F,this._lastTidy)>10){for(var e=this._terrainCache,t=Object.keys(e),i=t.length,n=0;n<i;++n){var r=t[n],o=e[r];a$15.secondsDifference(S$F,o.timestamp)>10&&delete e[r]}a$15.clone(S$F,this._lastTidy)}},Object.defineProperties(_$B.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var z$F=new i$W("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY);function G$M(e,t,i){var n=t.getChildBitmask();if(t.terrainState===d$X.PARENT){n=0;for(var r=0;r<4;++r){var o=i.getTileInformationFromQuadKey(e+r.toString());e$2e(o)&&o.hasTerrain()&&(n|=1<<r)}}return n}function $$D(e,t,i,n){return i=e$2e(i)&&i>0?i:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1c-0"+t+"-t."+i.toString(),request:n})}_$B.prototype.requestTileGeometry=function(e,t,i,n){if(!this._ready)throw new t$15("requestTileGeometry must not be called before the terrain provider is ready.");var r=c$G.tileXYToQuadKey(e,t,i),o=this._terrainCache,a=this._metadata,s=a.getTileInformationFromQuadKey(r);if(!e$2e(s))return o$1l.reject(new t$13("Terrain tile doesn't exist"));var l=s.terrainState;e$2e(l)||(l=s.terrainState=d$X.UNKNOWN);var u=o.get(r);if(e$2e(u)){var c=a.providers[s.terrainProvider];return o$1l.resolve(new T$I({buffer:u,childTileMask:G$M(r,s,a),credits:e$2e(c)?[c]:void 0,negativeAltitudeExponentBias:a.negativeAltitudeExponentBias,negativeElevationThreshold:a.negativeAltitudeThreshold}))}if(o.tidy(),!s.ancestorHasTerrain)return o$1l.resolve(new T$L({buffer:new Uint8Array(256),width:16,height:16}));if(l===d$X.NONE)return o$1l.reject(new t$13("Terrain tile doesn't exist"));var h,d=r,f=-1;switch(l){case d$X.SELF:f=s.terrainVersion;break;case d$X.PARENT:d=d.substring(0,d.length-1),f=(h=a.getTileInformationFromQuadKey(d)).terrainVersion;break;case d$X.UNKNOWN:s.hasTerrain()?f=s.terrainVersion:(d=d.substring(0,d.length-1),e$2e(h=a.getTileInformationFromQuadKey(d))&&h.hasTerrain()&&(f=h.terrainVersion))}if(f<0)return o$1l.reject(new t$13("Terrain tile doesn't exist"));var p,_,m=this._terrainPromises,g=this._terrainRequests;if(e$2e(m[d]))p=m[d],_=g[d];else{var x=$$D(this,d,f,_=n).fetchArrayBuffer();if(!e$2e(x))return;p=x.then((function(e){return e$2e(e)?z$F.scheduleTask({buffer:e,type:"Terrain",key:a.key},[e]).then((function(e){var t=a.getTileInformationFromQuadKey(d);t.terrainState=d$X.SELF,o.add(d,e[0]);for(var i=t.terrainProvider,n=e.length-1,r=0;r<n;++r){var s=d+r.toString(),l=a.getTileInformationFromQuadKey(s);e$2e(l)&&(o.add(s,e[r+1]),l.terrainState=d$X.PARENT,0===l.terrainProvider&&(l.terrainProvider=i))}})):o$1l.reject(new t$13("Failed to load terrain."))})),m[d]=p,g[d]=_,p=p.always((function(){delete m[d],delete g[d]}))}return p.then((function(){var e=o.get(r);if(e$2e(e)){var t=a.providers[s.terrainProvider];return new T$I({buffer:e,childTileMask:G$M(r,s,a),credits:e$2e(t)?[t]:void 0,negativeAltitudeExponentBias:a.negativeAltitudeExponentBias,negativeElevationThreshold:a.negativeAltitudeThreshold})}return o$1l.reject(new t$13("Failed to load terrain."))})).otherwise((function(e){return _.state===W$1c.CANCELLED?(n.state=_.state,o$1l.reject(e)):(s.terrainState=d$X.NONE,o$1l.reject(e))}))},_$B.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},_$B.prototype.getTileDataAvailable=function(e,t,i){var n=this._metadata,r=c$G.tileXYToQuadKey(e,t,i),o=n.getTileInformation(e,t,i);if(null===o)return!1;if(e$2e(o)){if(!o.ancestorHasTerrain)return!0;var a=o.terrainState;if(a===d$X.NONE)return!1;if(!(e$2e(a)&&a!==d$X.UNKNOWN||(o.terrainState=d$X.UNKNOWN,o.hasTerrain()))){r=r.substring(0,r.length-1);var s=n.getTileInformationFromQuadKey(r);if(!e$2e(s)||!s.hasTerrain())return!1}return!0}if(n.isValid(r)){var l=new r$1c({throttle:!0,throttleByServer:!0,type:U$1f.TERRAIN});n.populateSubtree(e,t,i,l)}return!1},_$B.prototype.loadTileDataAvailability=function(e,t,i){};var K$D=e$2d.factorial;function k$B(e,t,i,n,r,o){var a,s,l,u=0;if(n>0){for(s=0;s<r;s++){for(a=!1,l=0;l<o.length&&!a;l++)s===o[l]&&(a=!0);a||(o.push(s),u+=k$B(e,t,i,n-1,r,o),o.splice(o.length-1,1))}return u}for(u=1,s=0;s<r;s++){for(a=!1,l=0;l<o.length&&!a;l++)s===o[l]&&(a=!0);a||(u*=e-i[t[s]])}return u}var E$J={type:"Hermite",getRequiredDataPoints:function(e,t){if(t=u$Z(t,0),!e$2e(e))throw new t$15("degree is required.");if(e<0)throw new t$15("degree must be 0 or greater.");if(t<0)throw new t$15("inputOrder must be 0 or greater.");return Math.max(Math.floor((e+1)/(t+1)),2)},interpolateOrderZero:function(e,t,i,n,r){e$2e(r)||(r=new Array(n));var o,a,s,l,u,c=t.length,h=new Array(n);for(o=0;o<n;o++){r[o]=0;var d=new Array(c);for(h[o]=d,a=0;a<c;a++)d[a]=[]}var f=c,p=new Array(f);for(o=0;o<f;o++)p[o]=o;var _=c-1;for(l=0;l<n;l++){for(a=0;a<f;a++)u=p[a]*n+l,h[l][0].push(i[u]);for(o=1;o<f;o++){var m=!1;for(a=0;a<f-o;a++){var g,x=t[p[a]],y=t[p[a+o]];y-x<=0?(g=i[u=p[a]*n+n*o+l],h[l][o].push(g/K$D(o))):(g=h[l][o-1][a+1]-h[l][o-1][a],h[l][o].push(g/(y-x))),m=m||0!==g}m||(_=o-1)}}for(s=0,0;s<=0;s++)for(o=s;o<=_;o++){var v=k$B(e,p,t,s,o,[]);for(l=0;l<n;l++){var $=h[l][o][0];r[l+s*n]+=$*v}}return r}},Q$F=[];function U$G(e,t,i,n,r,o){for(var a,s,l=-1,u=t.length,c=u*(u+1)/2,h=0;h<r;h++){var d=Math.floor(h*c);for(a=0;a<u;a++)s=t[a]*r*(o+1)+h,e[d+a]=n[s];for(var f=1;f<u;f++){var p=0,_=Math.floor(f*(1-f)/2)+u*f,m=!1;for(a=0;a<u-f;a++){var g,x,y=i[t[a]],v=i[t[a+f]];if(v-y<=0)x=(g=n[s=t[a]*r*(o+1)+r*f+h])/e$2d.factorial(f),e[d+_+p]=x,p++;else{var $=Math.floor((f-1)*(2-f)/2)+u*(f-1);x=(g=e[d+$+a+1]-e[d+$+a])/(v-y),e[d+_+p]=x,p++}m=m||0!==g}m&&(l=Math.max(l,f))}}return l}function o$J(e,t,i,n){this.rightAscension=e,this.declination=t,this.rotation=i,this.rotationRate=n}E$J.interpolate=function(e,t,i,n,r,o,a){var s=n*(o+1);e$2e(a)||(a=new Array(s));for(var l=0;l<s;l++)a[l]=0;var u,c=t.length,h=new Array(c*(r+1));for(u=0;u<c;u++)for(var d=0;d<r+1;d++)h[u*(r+1)+d]=u;for(var f=h.length,p=Q$F,_=U$G(p,h,t,i,n,r),m=[],g=f*(f+1)/2,x=Math.min(_,o),y=0;y<=x;y++)for(u=y;u<=_;u++){m.length=0;for(var v=k$B(e,h,t,y,u,m),$=Math.floor(u*(1-u)/2)+f*u,b=0;b<n;b++){var T=p[Math.floor(b*g)+$];a[b+y*n]+=T*v}}return a};var y$F={},_0=32.184,h0$1=2451545,L$O=-.0529921,b$N=-.1059842,j$E=13.0120009,k$A=13.3407154,q$J=.9856003,z$E=26.4057084,B$D=13.064993,F$H=.3287146,H$I=1.7484877,K$C=-.1589763,Q$E=.0036096,V$y=.1643573,W$I=12.9590088,s$D=new a$15;function h$I(e){(!e$2e(e)||"function"!=typeof e)&&(e=y$F.ComputeMoon),this._computeFunction=e}y$F.ComputeMoon=function(e,t){e$2e(e)||(e=a$15.now()),s$D=a$15.addSeconds(e,_0,s$D);var i=a$15.totalDays(s$D)-h0$1,n=i/h$17.DAYS_PER_JULIAN_CENTURY,r=(125.045+L$O*i)*e$2d.RADIANS_PER_DEGREE,o=(250.089+b$N*i)*e$2d.RADIANS_PER_DEGREE,a=(260.008+j$E*i)*e$2d.RADIANS_PER_DEGREE,s=(176.625+k$A*i)*e$2d.RADIANS_PER_DEGREE,l=(357.529+q$J*i)*e$2d.RADIANS_PER_DEGREE,u=(311.589+z$E*i)*e$2d.RADIANS_PER_DEGREE,c=(134.963+B$D*i)*e$2d.RADIANS_PER_DEGREE,h=(276.617+F$H*i)*e$2d.RADIANS_PER_DEGREE,d=(34.226+H$I*i)*e$2d.RADIANS_PER_DEGREE,f=(15.134+K$C*i)*e$2d.RADIANS_PER_DEGREE,p=(119.743+Q$E*i)*e$2d.RADIANS_PER_DEGREE,_=(239.961+V$y*i)*e$2d.RADIANS_PER_DEGREE,m=(25.053+W$I*i)*e$2d.RADIANS_PER_DEGREE,g=Math.sin(r),x=Math.sin(o),y=Math.sin(a),v=Math.sin(s),$=Math.sin(l),b=Math.sin(u),T=Math.sin(c),C=Math.sin(h),S=Math.sin(d),w=Math.sin(f),E=Math.sin(p),P=Math.sin(_),A=Math.sin(m),L=Math.cos(r),M=Math.cos(o),R=Math.cos(a),O=Math.cos(s),D=Math.cos(l),I=Math.cos(u),B=Math.cos(c),F=Math.cos(h),N=Math.cos(d),G=Math.cos(f),z=Math.cos(p),U=Math.cos(_),V=Math.cos(m),k=(269.9949+.0031*n-3.8787*g-.1204*x+.07*y-.0172*v+.0072*b-.0052*w+.0043*A)*e$2d.RADIANS_PER_DEGREE,W=(66.5392+.013*n+1.5419*L+.0239*M-.0278*R+.0068*O-.0029*I+9e-4*B+8e-4*G-9e-4*V)*e$2d.RADIANS_PER_DEGREE,H=(38.3213+13.17635815*i-14e-13*i*i+3.561*g+.1208*x-.0642*y+.0158*v+.0252*$-.0066*b-.0047*T-.0046*C+.0028*S+.0052*w+.004*E+.0019*P-.0044*A)*e$2d.RADIANS_PER_DEGREE,q=(13.17635815-2*i*14e-13+3.561*L*L$O+.1208*M*b$N-.0642*R*j$E+.0158*O*k$A+.0252*D*q$J-.0066*I*z$E-.0047*B*B$D-.0046*F*F$H+.0028*N*H$I+.0052*G*K$C+.004*z*Q$E+.0019*U*V$y-.0044*V*W$I)/86400*e$2d.RADIANS_PER_DEGREE;return e$2e(t)||(t=new o$J),t.rightAscension=k,t.declination=W,t.rotation=H,t.rotationRate=q,t};var y$E=new o$1p,A$Q=new o$1p,w$D=new o$1p;function z$D(e,t,i){var n=y$E;n.x=Math.cos(e+e$2d.PI_OVER_TWO),n.y=Math.sin(e+e$2d.PI_OVER_TWO),n.z=0;var r=Math.cos(t),o=w$D;o.x=r*Math.cos(e),o.y=r*Math.sin(e),o.z=Math.sin(t);var a=o$1p.cross(o,n,A$Q);return e$2e(i)||(i=new p$1e),i[0]=n.x,i[1]=a.x,i[2]=o.x,i[3]=n.y,i[4]=a.y,i[5]=o.y,i[6]=n.z,i[7]=a.z,i[8]=o.z,i}var u$F=new p$1e,_$A=new n$15;h$I.prototype.evaluate=function(e,t){e$2e(e)||(e=a$15.now());var i=this._computeFunction(e),n=z$D(i.rightAscension,i.declination,t),r=e$2d.zeroToTwoPi(i.rotation),o=n$15.fromAxisAngle(o$1p.UNIT_Z,r,_$A),a=p$1e.fromQuaternion(n$15.conjugate(o,o),u$F);return p$1e.multiply(a,n,n)};var r$L={};function i$K(e){o$1q.defined("url",e),this._url=t$10.createIfNeeded(e),this._url.appendForwardSlash()}function s$C(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.typeOf.object("options.scene",e.scene);var t=u$Z(e.accessToken,e$Z.defaultAccessToken),i=t$10.createIfNeeded(u$Z(e.server,e$Z.defaultServer));i.appendForwardSlash();var n=e$Z.getDefaultTokenCredit(t);e$2e(n)&&e.scene.frameState.creditDisplay.addDefaultCredit(r$U.clone(n));var r=i.getDerivedResource({url:"v1/geocode"});e$2e(t)&&r.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=i,this._pelias=new i$K(r)}function d$W(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.start=e$2e(e.start)?a$15.clone(e.start):new a$15,this.stop=e$2e(e.stop)?a$15.clone(e.stop):new a$15,this.data=e.data,this.isStartIncluded=u$Z(e.isStartIncluded,!0),this.isStopIncluded=u$Z(e.isStopIncluded,!0)}r$L.type=void 0,r$L.getRequiredDataPoints=t$15.throwInstantiationError,r$L.interpolateOrderZero=t$15.throwInstantiationError,r$L.interpolate=t$15.throwInstantiationError,Object.defineProperties(i$K.prototype,{url:{get:function(){return this._url}}}),i$K.prototype.geocode=function(e,t){return o$1q.typeOf.string("query",e),this._url.getDerivedResource({url:t===c$H.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then((function(e){return e.features.map((function(e){var t,i=e.bbox;if(e$2e(i))t=h$18.fromDegrees(i[0],i[1],i[2],i[3]);else{var n=e.geometry.coordinates[0],r=e.geometry.coordinates[1];t=o$1p.fromDegrees(n,r)}return{displayName:e.properties.label,destination:t}}))}))},s$C.prototype.geocode=function(e,t){return this._pelias.geocode(e,t)},Object.defineProperties(d$W.prototype,{isEmpty:{get:function(){var e=a$15.compare(this.stop,this.start);return e<0||0===e&&(!this.isStartIncluded||!this.isStopIncluded)}}});var I$O={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};d$W.fromIso8601=function(e,t){o$1q.typeOf.object("options",e),o$1q.typeOf.string("options.iso8601",e.iso8601);var i=e.iso8601.split("/");if(2!==i.length)throw new t$15("options.iso8601 is an invalid ISO 8601 interval.");var n=a$15.fromIso8601(i[0]),r=a$15.fromIso8601(i[1]),o=u$Z(e.isStartIncluded,!0),a=u$Z(e.isStopIncluded,!0),s=e.data;return e$2e(t)?(t.start=n,t.stop=r,t.isStartIncluded=o,t.isStopIncluded=a,t.data=s,t):(I$O.start=n,I$O.stop=r,I$O.isStartIncluded=o,I$O.isStopIncluded=a,I$O.data=s,new d$W(I$O))},d$W.toIso8601=function(e,t){return o$1q.typeOf.object("timeInterval",e),a$15.toIso8601(e.start,t)+"/"+a$15.toIso8601(e.stop,t)},d$W.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new d$W(e)},d$W.equals=function(e,t,i){return e===t||e$2e(e)&&e$2e(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&a$15.equals(e.start,t.start)&&a$15.equals(e.stop,t.stop)&&(e.data===t.data||e$2e(i)&&i(e.data,t.data)))},d$W.equalsEpsilon=function(e,t,i,n){return o$1q.typeOf.number("epsilon",i),e===t||e$2e(e)&&e$2e(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&a$15.equalsEpsilon(e.start,t.start,i)&&a$15.equalsEpsilon(e.stop,t.stop,i)&&(e.data===t.data||e$2e(n)&&n(e.data,t.data)))},d$W.intersect=function(e,t,i,n){if(o$1q.typeOf.object("left",e),o$1q.typeOf.object("result",i),!e$2e(t))return d$W.clone(d$W.EMPTY,i);var r=e.start,o=e.stop,a=t.start,s=t.stop,l=a$15.greaterThanOrEquals(a,r)&&a$15.greaterThanOrEquals(o,a),u=!l&&a$15.lessThanOrEquals(a,r)&&a$15.lessThanOrEquals(r,s);if(!l&&!u)return d$W.clone(d$W.EMPTY,i);var c=e.isStartIncluded,h=e.isStopIncluded,d=t.isStartIncluded,f=t.isStopIncluded,p=a$15.lessThan(o,s);return i.start=l?a:r,i.isStartIncluded=c&&d||!a$15.equals(a,r)&&(l&&d||u&&c),i.stop=p?o:s,i.isStopIncluded=p?h:h&&f||!a$15.equals(s,o)&&f,i.data=e$2e(n)?n(e.data,t.data):e.data,i},d$W.contains=function(e,t){if(o$1q.typeOf.object("timeInterval",e),o$1q.typeOf.object("julianDate",t),e.isEmpty)return!1;var i=a$15.compare(e.start,t);if(0===i)return e.isStartIncluded;var n=a$15.compare(t,e.stop);return 0===n?e.isStopIncluded:i<0&&n<0},d$W.prototype.clone=function(e){return d$W.clone(this,e)},d$W.prototype.equals=function(e,t){return d$W.equals(this,e,t)},d$W.prototype.equalsEpsilon=function(e,t,i){return d$W.equalsEpsilon(this,e,t,i)},d$W.prototype.toString=function(){return d$W.toIso8601(this)},d$W.EMPTY=Object.freeze(new d$W({start:new a$15,stop:new a$15,isStartIncluded:!1,isStopIncluded:!1}));var M$H=Object.freeze(a$15.fromIso8601("0000-01-01T00:00:00Z")),r$K=Object.freeze(a$15.fromIso8601("9999-12-31T24:00:00Z")),t$y=Object.freeze(new d$W({start:M$H,stop:r$K})),o$I={MINIMUM_VALUE:M$H,MAXIMUM_VALUE:r$K,MAXIMUM_INTERVAL:t$y},e$V={SHIFT:0,CTRL:1,ALT:2},Aa$1=Object.freeze(e$V),i$J={type:"Lagrange",getRequiredDataPoints:function(e){return Math.max(e+1,2)},interpolateOrderZero:function(e,t,i,n,r){e$2e(r)||(r=new Array(n));var o,a,s=t.length;for(o=0;o<n;o++)r[o]=0;for(o=0;o<s;o++){var l=1;for(a=0;a<s;a++)if(a!==o){var u=t[o]-t[a];l*=(e-t[a])/u}for(a=0;a<n;a++)r[a]+=l*i[o*n+a]}return r}},v$A={type:"Linear"};function l$O(e,t,i){return p$$({url:e,responseType:"blob",headers:t,request:i})}v$A.getRequiredDataPoints=function(e){return 2},v$A.interpolateOrderZero=function(e,t,i,n,r){if(2!==t.length)throw new t$15("The xTable provided to the linear interpolator must have exactly two elements.");if(n<=0)throw new t$15("There must be at least 1 dependent variable for each independent variable.");e$2e(r)||(r=new Array(n));var o,a,s,l=t[0],u=t[1];if(l===u)throw new t$15("Divide by zero error: xTable[0] and xTable[1] are equal");for(o=0;o<n;o++)a=i[o],s=i[o+n],r[o]=((s-a)*e+u*a-l*s)/(u-l);return r};var p$J=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch{return!1}}();function c$F(e,t){if(!p$J||e$26(e))return t$S(e,void 0,t);var i=l$O(e,void 0,t);return e$2e(i)?i.then((function(e){var t=window.URL.createObjectURL(e);return t$S(t,!1).then((function(i){return i.blob=e,window.URL.revokeObjectURL(t),i}),(function(e){return window.URL.revokeObjectURL(t),o$1l.reject(e)}))})):void 0}function d$V(e,t,i){if(!e$2e(e))throw new t$15("url is required.");var n;t=u$Z(t,u$Z.EMPTY_OBJECT);do{n="loadJsonp"+Math.random().toString().substring(2,8)}while(e$2e(window[n]));var r=new h$16(e),o=m$1c(u$Z(r.query,""));e$2e(t.parameters)&&(o=p$19(t.parameters,o)),o[u$Z(t.callbackParameterName,"callback")]=n,r.query=m$1d(o),e=r.toString();var a=t.proxy;return e$2e(a)&&(e=a.getURL(e)),(i=e$2e(i)?i:new r$1c).url=e,i.requestFunction=function(){var t=o$1l.defer();return window[n]=function(e){t.resolve(e);try{delete window[n]}catch{window[n]=void 0}},d$V.loadAndExecuteScript(e,n,t),t.promise},r$1b.request(i)}d$V.loadAndExecuteScript=function(e,t,i){var n=document.createElement("script");n.async=!0,n.src=e;var r=document.getElementsByTagName("head")[0];n.onload=function(){n.onload=void 0,r.removeChild(n)},n.onerror=function(e){i.reject(e)},r.appendChild(n)},d$V.defaultLoadAndExecuteScript=d$V.loadAndExecuteScript;var e$U={defaultAccessToken:void 0},n$w=!1,o$H,a$D="<b>This application is using SuperMap3D's default Mapbox access token. Please create a new access token for the application as soon as possible and prior to deployment , and provide your token to SuperMap3D by setting the SuperMap3D.MapboxApi.defaultAccessToken property before constructing the Widget or any other object that uses the Mapbox API.</b>";function r$J(){t$15.throwInstantiationError()}e$U.getAccessToken=function(e){return e$2e(e)?e:e$2e(e$U.defaultAccessToken)?e$U.defaultAccessToken:(n$w||(console.log(a$D),n$w=!0),"")},e$U.getErrorCredit=function(e){if(!e$2e(e)&&!e$2e(e$U.defaultAccessToken))return e$2e(o$H)||(o$H=new r$U(a$D,!0)),o$H},Object.defineProperties(r$J.prototype,{ellipsoid:{get:t$15.throwInstantiationError}}),r$J.prototype.project=t$15.throwInstantiationError,r$J.prototype.unproject=t$15.throwInstantiationError;var l$N=[],c$E=[];function M$G(e,t,i,n,r,o){var a,s,l=r-n+1,u=o-r,c=l$N,h=c$E;for(a=0;a<l;++a)c[a]=e[n+a];for(s=0;s<u;++s)h[s]=e[r+s+1];a=0,s=0;for(var d=n;d<=o;++d){var f=c[a],p=h[s];a<l&&(s>=u||t(f,p,i)<=0)?(e[d]=f,++a):s<u&&(e[d]=p,++s)}}function u$E(e,t,i,n,r){if(!(n>=r)){var o=Math.floor(.5*(n+r));u$E(e,t,i,n,o),u$E(e,t,i,o+1,r),M$G(e,t,i,n,o,r)}}function m$I(e,t,i){if(!e$2e(e))throw new t$15("array is required.");if(!e$2e(t))throw new t$15("comparator is required.");var n=e.length,r=Math.ceil(.5*n);l$N.length=r,c$E.length=r,u$E(e,t,i,0,n-1),l$N.length=0,c$E.length=0}function d$U(e,t){if(!e$2e(e))throw new t$15("occluderBoundingSphere is required.");if(!e$2e(t))throw new t$15("camera position is required.");this._occluderPosition=o$1p.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var m$H=new o$1p;Object.defineProperties(d$U.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){if(!e$2e(e))throw new t$15("cameraPosition is required.");e=o$1p.clone(e,this._cameraPosition);var t,i,n,r=o$1p.subtract(this._occluderPosition,e,m$H),o=o$1p.magnitudeSquared(r),a=this._occluderRadius*this._occluderRadius;if(o>a){t=Math.sqrt(o-a),o=1/Math.sqrt(o),i=o$1p.multiplyByScalar(r,o,m$H);var s=t*t*o;n=o$1p.add(e,o$1p.multiplyByScalar(i,s,m$H),m$H)}else t=Number.MAX_VALUE;this._horizonDistance=t,this._horizonPlaneNormal=i,this._horizonPlanePosition=n,this._cameraPosition=e}}}),d$U.fromBoundingSphere=function(e,t,i){if(!e$2e(e))throw new t$15("occluderBoundingSphere is required.");if(!e$2e(t))throw new t$15("camera position is required.");return e$2e(i)?(o$1p.clone(e.center,i._occluderPosition),i._occluderRadius=e.radius,i.cameraPosition=t,i):new d$U(e,t)};var L$N=new o$1p;d$U.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){var t=o$1p.subtract(e,this._occluderPosition,L$N),i=this._occluderRadius;if((i=o$1p.magnitudeSquared(t)-i*i)>0)return i=Math.sqrt(i)+this._horizonDistance,t=o$1p.subtract(e,this._cameraPosition,t),i*i>o$1p.magnitudeSquared(t)}return!1};var X$B=new o$1p;d$U.prototype.isBoundingSphereVisible=function(e){var t=o$1p.clone(e.center,X$B),i=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){var n=o$1p.subtract(t,this._occluderPosition,L$N),r=this._occluderRadius-i;if(r=o$1p.magnitudeSquared(n)-r*r,i<this._occluderRadius)return r>0&&(r=Math.sqrt(r)+this._horizonDistance,n=o$1p.subtract(t,this._cameraPosition,n),r*r+i*i>o$1p.magnitudeSquared(n));if(r>0){n=o$1p.subtract(t,this._cameraPosition,n);var o=o$1p.magnitudeSquared(n),a=this._occluderRadius*this._occluderRadius,s=i*i;return(this._horizonDistance*this._horizonDistance+a)*s>o*a||(r=Math.sqrt(r)+this._horizonDistance)*r+s>o}return!0}return!1};var j$D=new o$1p;d$U.prototype.computeVisibility=function(e){if(!e$2e(e))throw new t$15("occludeeBS is required.");var t=o$1p.clone(e.center),i=e.radius;if(i>this._occluderRadius)return fe$r.FULL;if(this._horizonDistance!==Number.MAX_VALUE){var n=o$1p.subtract(t,this._occluderPosition,j$D),r=this._occluderRadius-i,o=o$1p.magnitudeSquared(n);if((r=o-r*r)>0){r=Math.sqrt(r)+this._horizonDistance,n=o$1p.subtract(t,this._cameraPosition,n);var a=o$1p.magnitudeSquared(n);return r*r+i*i<a?fe$r.NONE:(r=o-(r=this._occluderRadius+i)*r)>0?a<(r=Math.sqrt(r)+this._horizonDistance)*r+i*i?fe$r.FULL:fe$r.PARTIAL:(n=o$1p.subtract(t,this._horizonPlanePosition,n),o$1p.dot(n,this._horizonPlaneNormal)>-i?fe$r.PARTIAL:fe$r.FULL)}}return fe$r.NONE};var b$M=new o$1p;d$U.computeOccludeePoint=function(e,t,i){if(!e$2e(e))throw new t$15("occluderBoundingSphere is required.");if(!e$2e(i))throw new t$15("positions is required.");if(0===i.length)throw new t$15("positions must contain at least one element");var n=o$1p.clone(t),r=o$1p.clone(e.center),o=e.radius,a=i.length;if(o$1p.equals(r,t))throw new t$15("occludeePosition must be different than occluderBoundingSphere.center");var s=o$1p.normalize(o$1p.subtract(n,r,b$M),b$M),l=-o$1p.dot(s,r),u=d$U._anyRotationVector(r,s,l),c=d$U._horizonToPlaneNormalDotProduct(e,s,l,u,i[0]);if(c){for(var h,d=1;d<a;++d){if(!(h=d$U._horizonToPlaneNormalDotProduct(e,s,l,u,i[d])))return;h<c&&(c=h)}if(!(c<.0017453283658983088)){var f=o/c;return o$1p.add(r,o$1p.multiplyByScalar(s,f,b$M),b$M)}}};var B$C=[];d$U.computeOccludeePointFromRectangle=function(e,t){if(!e$2e(e))throw new t$15("rectangle is required.");t=u$Z(t,t$12.WGS84);var i=h$18.subsample(e,t,0,B$C),n=i$1d.fromPoints(i),r=o$1p.ZERO;if(!o$1p.equals(r,n.center))return d$U.computeOccludeePoint(new i$1d(r,t.minimumRadius),n.center,i)};var Z$D=new o$1p;d$U._anyRotationVector=function(e,t,i){var n=o$1p.abs(t,Z$D),r=n.x>n.y?0:1;(0===r&&n.z>n.x||1===r&&n.z>n.y)&&(r=2);var o,a=new o$1p;0===r?(n.x=e.x,n.y=e.y+1,n.z=e.z+1,o=o$1p.UNIT_X):1===r?(n.x=e.x+1,n.y=e.y,n.z=e.z+1,o=o$1p.UNIT_Y):(n.x=e.x+1,n.y=e.y+1,n.z=e.z,o=o$1p.UNIT_Z);var s=(o$1p.dot(t,n)+i)/-o$1p.dot(t,o);return o$1p.normalize(o$1p.subtract(o$1p.add(n,o$1p.multiplyByScalar(o,s,a),n),e,n),n)};var G$L=new o$1p;d$U._rotationVector=function(e,t,i,n,r){var o=o$1p.subtract(n,e,G$L);if(o=o$1p.normalize(o,o),o$1p.dot(t,o)<.9999999847691291){var a=o$1p.cross(t,o,o);if(o$1p.magnitude(a)>e$2d.EPSILON13)return o$1p.normalize(a,new o$1p)}return r};var S$E=new o$1p,W$H=new o$1p,q$I=new o$1p,T$H=new o$1p;function s$B(e,t,i){o$1q.defined("url",e),o$1q.defined("apiKey",t),e$2e(i)&&o$1q.typeOf.object("params",i),(e=t$10.createIfNeeded(e)).appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=u$Z(i,{})}d$U._horizonToPlaneNormalDotProduct=function(e,t,i,n,r){var o=o$1p.clone(r,S$E),a=o$1p.clone(e.center,W$H),s=e.radius,l=o$1p.subtract(a,o,q$I),u=o$1p.magnitudeSquared(l),c=s*s;if(u<c)return!1;var h=u-c,d=Math.sqrt(h),f=d*(1/Math.sqrt(u))*d;l=o$1p.normalize(l,l);var p=o$1p.add(o,o$1p.multiplyByScalar(l,f,T$H),T$H),_=Math.sqrt(h-f*f),m=this._rotationVector(a,t,i,o,n),g=o$1p.fromElements(m.x*m.x*l.x+(m.x*m.y-m.z)*l.y+(m.x*m.z+m.y)*l.z,(m.x*m.y+m.z)*l.x+m.y*m.y*l.y+(m.y*m.z-m.x)*l.z,(m.x*m.z-m.y)*l.x+(m.y*m.z+m.x)*l.y+m.z*m.z*l.z,S$E);g=o$1p.normalize(g,g);var x=o$1p.multiplyByScalar(g,_,S$E);m=o$1p.normalize(o$1p.subtract(o$1p.add(p,x,q$I),a,q$I),q$I);var y=o$1p.dot(t,m);m=o$1p.normalize(o$1p.subtract(o$1p.subtract(p,x,m),a,m),m);var v=o$1p.dot(t,m);return y<v?y:v},Object.defineProperties(s$B.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}}),s$B.prototype.geocode=function(e){return o$1q.typeOf.string("query",e),this._url.getDerivedResource({url:"json",queryParameters:p$19(this._params,{q:e})}).fetchJson().then((function(e){return e.results.map((function(e){var t,i=e.bounds;if(e$2e(i))t=h$18.fromDegrees(i.southwest.lng,i.southwest.lat,i.northeast.lng,i.northeast.lat);else{var n=e.geometry.lat,r=e.geometry.lng;t=o$1p.fromDegrees(n,r)}return{displayName:e.formatted,destination:t}}))}))};var t$x={packedLength:void 0,pack:t$15.throwInstantiationError,unpack:t$15.throwInstantiationError},o$G={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:t$15.throwInstantiationError,unpackInterpolationResult:t$15.throwInstantiationError},e$T={BASECOLOR_UV_OFFSET_AND_TILING:0,EMISSIVE_UV_OFFSET_AND_TILING:1},ie$p=Object.freeze(e$T);function s$A(){this._cache={}}s$A.prototype.fromColor=function(e,t){if(!e$2e(e))throw new t$15("color is required");if(!e$2e(t))throw new t$15("size is required");return h$H(void 0,void 0,e,t,this._cache)},s$A.prototype.fromUrl=function(e,t,i){if(!e$2e(e))throw new t$15("url is required");if(!e$2e(t))throw new t$15("color is required");if(!e$2e(i))throw new t$15("size is required");return h$H(e,void 0,t,i,this._cache)},s$A.prototype.fromMakiIconId=function(e,t,i){if(!e$2e(e))throw new t$15("id is required");if(!e$2e(t))throw new t$15("color is required");if(!e$2e(i))throw new t$15("size is required");return h$H(n$17("Assets/Textures/maki/"+encodeURIComponent(e)+".png"),void 0,t,i,this._cache)},s$A.prototype.fromText=function(e,t,i){if(!e$2e(e))throw new t$15("text is required");if(!e$2e(t))throw new t$15("color is required");if(!e$2e(i))throw new t$15("size is required");return h$H(void 0,e,t,i,this._cache)};var q$H=new e$1X;function b$L(e,t,i){e.save(),e.scale(i/24,i/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,q$H).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function C$G(e,t,i){var n=i/2.5,r=n,o=n;t.width>t.height?o=n*(t.height/t.width):t.width<t.height&&(r=n*(t.width/t.height));var a=Math.round((i-r)/2),s=Math.round(7/24*i-o/2);e.globalCompositeOperation="destination-out",e.drawImage(t,a-1,s,r,o),e.drawImage(t,a,s-1,r,o),e.drawImage(t,a+1,s,r,o),e.drawImage(t,a,s+1,r,o),e.globalCompositeOperation="destination-over",e.fillStyle=e$1X.BLACK.toCssColorString(),e.fillRect(a-1,s-1,r+2,o+2),e.globalCompositeOperation="destination-out",e.drawImage(t,a,s,r,o),e.globalCompositeOperation="destination-over",e.fillStyle=e$1X.WHITE.toCssColorString(),e.fillRect(a-1,s-2,r+2,o+2)}var l$M=new Array(4);function h$H(e,t,i,n,r){l$M[0]=e,l$M[1]=t,l$M[2]=i,l$M[3]=n;var o=JSON.stringify(l$M),a=r[o];if(e$2e(a))return a;var s=document.createElement("canvas");s.width=n,s.height=n;var l=s.getContext("2d");if(b$L(l,i,n),e$2e(e)){var u=t$10.createIfNeeded(e).fetchImage().then((function(e){return C$G(l,e,n),r[o]=s,s}));return r[o]=u,u}if(e$2e(t)){var c=x$W(t,{font:"bold "+n+"px sans-serif"});C$G(l,c,n)}return r[o]=s,s}function f$L(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.vertexFormat,n$13.DEFAULT);this._vertexFormat=t,this._workerName="createPlaneGeometry"}f$L.packedLength=n$13.packedLength,f$L.pack=function(e,t,i){return o$1q.typeOf.object("value",e),o$1q.defined("array",t),i=u$Z(i,0),n$13.pack(e._vertexFormat,t,i),t};var T$G=new n$13,G$K={vertexFormat:T$G};f$L.unpack=function(e,t,i){o$1q.defined("array",e),t=u$Z(t,0);var n=n$13.unpack(e,t,T$G);return e$2e(i)?(i._vertexFormat=n$13.clone(n,i._vertexFormat),i):new f$L(G$K)};var w$C=new o$1p(-.5,-.5,0),A$P=new o$1p(.5,.5,0);function i$I(){this._workerName="createPlaneOutlineGeometry"}f$L.createGeometry=function(e){var t,i,n=e._vertexFormat,r=new a$_;if(n.position){if((i=new Float64Array(12))[0]=w$C.x,i[1]=w$C.y,i[2]=0,i[3]=A$P.x,i[4]=w$C.y,i[5]=0,i[6]=A$P.x,i[7]=A$P.y,i[8]=0,i[9]=w$C.x,i[10]=A$P.y,i[11]=0,r.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:i}),n.normal){var o=new Float32Array(12);o[0]=0,o[1]=0,o[2]=1,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=1,o[9]=0,o[10]=0,o[11]=1,r.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:o})}if(n.st){var a=new Float32Array(8);a[0]=0,a[1]=0,a[2]=1,a[3]=0,a[4]=1,a[5]=1,a[6]=0,a[7]=1,r.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:a})}if(n.tangent){var s=new Float32Array(12);s[0]=1,s[1]=0,s[2]=0,s[3]=1,s[4]=0,s[5]=0,s[6]=1,s[7]=0,s[8]=0,s[9]=1,s[10]=0,s[11]=0,r.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:s})}if(n.bitangent){var l=new Float32Array(12);l[0]=0,l[1]=1,l[2]=0,l[3]=0,l[4]=1,l[5]=0,l[6]=0,l[7]=1,l[8]=0,l[9]=0,l[10]=1,l[11]=0,r.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:l})}(t=new Uint16Array(6))[0]=0,t[1]=1,t[2]=2,t[3]=0,t[4]=2,t[5]=3}return new I$1p({attributes:r,indices:t,primitiveType:W$18.TRIANGLES,boundingSphere:new i$1d(o$1p.ZERO,Math.sqrt(2))})},i$I.packedLength=0,i$I.pack=function(e,t){return o$1q.defined("value",e),o$1q.defined("array",t),t},i$I.unpack=function(e,t,i){return o$1q.defined("array",e),e$2e(i)?i:new i$I};var r$I=new o$1p(-.5,-.5,0),o$F=new o$1p(.5,.5,0);i$I.createGeometry=function(){var e=new a$_,t=new Uint16Array(8),i=new Float64Array(12);return i[0]=r$I.x,i[1]=r$I.y,i[2]=r$I.z,i[3]=o$F.x,i[4]=r$I.y,i[5]=r$I.z,i[6]=o$F.x,i[7]=o$F.y,i[8]=r$I.z,i[9]=r$I.x,i[10]=o$F.y,i[11]=r$I.z,e.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:i}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new I$1p({attributes:e,indices:t,primitiveType:W$18.LINES,boundingSphere:new i$1d(o$1p.ZERO,Math.sqrt(2))})};var r$H=new o$1p;function c$D(e,t,i,n){return S$$(e,t,i,n,r$H),r$H.x>0&&r$H.y>0&&r$H.z>0}var fe$l=[];function xe$g(e,t,i,n,r){var o=fe$l;o.length=r;var a,s=i.red,l=i.green,u=i.blue,c=i.alpha,h=n.red,d=n.green,f=n.blue,p=n.alpha;if(e$1X.equals(i,n)){for(a=0;a<r;a++)o[a]=e$1X.clone(i);return o}var _=(h-s)/r,m=(d-l)/r,g=(f-u)/r,x=(p-c)/r;for(a=0;a<r;a++)o[a]=new e$1X(s+a*_,l+a*m,u+a*g,c+a*x);return o}function R$A(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,i=e.colors,n=u$Z(e.width,1),r=u$Z(e.hMax,-1),o=u$Z(e.colorsPerVertex,!1);if(!e$2e(t)||t.length<2)throw new t$15("At least two positions are required.");if("number"!=typeof n)throw new t$15("width must be a number");if(e$2e(i)&&(o&&i.length<t.length||!o&&i.length<t.length-1))throw new t$15("colors has an invalid length.");this._positions=t,this._colors=i,this._width=n,this._hMax=r,this._colorsPerVertex=o,this._dist=e.dist,this._period=e.period,this._vertexFormat=n$13.clone(u$Z(e.vertexFormat,n$13.DEFAULT)),this._followSurface=u$Z(e.followSurface,!0),e$2e(e.followSurface)&&(t$11("PolylineGeometry.followSurface","PolylineGeometry.followSurface is deprecated and will be removed in SuperMap3D. Use PolylineGeometry.arcType instead."),e.arcType=e.followSurface?m$1h.GEODESIC:m$1h.NONE),this._arcType=u$Z(e.arcType,m$1h.GEODESIC),this._followSurface=this._arcType!==m$1h.NONE,this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._workerName="createPolylineGeometry";var a=1+t.length*o$1p.packedLength;a+=e$2e(i)?1+i.length*e$1X.packedLength:1,this.packedLength=a+t$12.packedLength+n$13.packedLength+4+2}R$A.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");i=u$Z(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._colors;for(o=e$2e(a)?a.length:0,t[i++]=o,n=0;n<o;++n,i+=e$1X.packedLength)e$1X.pack(a[n],t,i);return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._width,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i++]=e._granularity,t[i++]=e._hMax,t[i++]=e._dist,t[i]=e._period,t};var le$n=t$12.clone(t$12.UNIT_SPHERE),se$l=new n$13,P$B={positions:void 0,colors:void 0,ellipsoid:le$n,vertexFormat:se$l,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};R$A.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);var a=(r=e[t++])>0?new Array(r):void 0;for(n=0;n<r;++n,t+=e$1X.packedLength)a[n]=e$1X.unpack(e,t);var s=t$12.unpack(e,t,le$n);t+=t$12.packedLength;var l=n$13.unpack(e,t,se$l);t+=n$13.packedLength;var u=e[t++],c=1===e[t++],h=e[t++],d=e[t++],f=e[t++],p=1==e[t++],_=e[t];return e$2e(i)?(i._positions=o,i._colors=a,i._ellipsoid=t$12.clone(s,i._ellipsoid),i._vertexFormat=n$13.clone(l,i._vertexFormat),i._width=u,i._colorsPerVertex=c,i._arcType=h,i._granularity=d,i._hMax=f,i._dist=p,i._period=_,i):(P$B.positions=o,P$B.colors=a,P$B.width=u,P$B.colorsPerVertex=c,P$B.arcType=h,P$B.granularity=d,P$B.hMax=f,P$B.dist=p,P$B.period=_,new R$A(P$B))};var de$i=new o$1p,me$n=new o$1p,_e$j=new o$1p,ue$n=new o$1p;function ae$o(e,t,i,n){var r=e.combinedPositions,o=e.combinedLocalPositions,a=new a$_;n.position&&(a.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:r}));var s,l,u,c,h,d,f=t.length,p=r.length/3,_=(p-2*f)/(2*f),m=A$1f.triangulate(t),g=(_-1)*f*6+2*m.length,x=ce$z.createTypedArray(p,g),y=2*f,v=0;for(s=0;s<_-1;s++){for(l=0;l<f-1;l++)d=(u=2*l+s*f*2)+y,h=(c=u+1)+y,x[v++]=c,x[v++]=u,x[v++]=h,x[v++]=h,x[v++]=u,x[v++]=d;h=(c=(u=2*f-2+s*f*2)+1)+y,d=u+y,x[v++]=c,x[v++]=u,x[v++]=h,x[v++]=h,x[v++]=u,x[v++]=d}if(n.st||n.tangent||n.bitangent){var $,b,T=new Float32Array(2*p),C=1/(_-1),S=1/i.height,w=i.height/2,E=0;for(s=0;s<_;s++){for($=s*C,b=S*(t[0].y+w),T[E++]=$,T[E++]=b,l=1;l<f;l++)b=S*(t[l].y+w),T[E++]=$,T[E++]=b,T[E++]=$,T[E++]=b;b=S*(t[0].y+w),T[E++]=$,T[E++]=b}for(l=0;l<f;l++)$=0,b=S*(t[l].y+w),T[E++]=$,T[E++]=b;for(l=0;l<f;l++)$=(_-1)*C,b=S*(t[l].y+w),T[E++]=$,T[E++]=b;a.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:new Float32Array(T)})}var P=p-2*f;for(s=0;s<m.length;s+=3){var A=m[s]+P,L=m[s+1]+P,M=m[s+2]+P;x[v++]=A,x[v++]=L,x[v++]=M,x[v++]=M+f,x[v++]=L+f,x[v++]=A+f}var R=new I$1p({attributes:a,indices:x,boundingSphere:i$1d.fromVertices(r),primitiveType:W$18.TRIANGLES});if(n.normal&&(R=k$14.computeNormal(R)),n.tangent||n.bitangent){try{R=k$14.computeTangentAndBitangent(R)}catch{e$22("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}n.tangent||(R.attributes.tangent=void 0),n.bitangent||(R.attributes.bitangent=void 0),n.st||(R.attributes.st=void 0)}return e$2e(o)&&(R.attributes.position.values=o,R.attributes.position.componentDatatype=S$14.FLOAT),R}function N$A(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;if(!e$2e(t))throw new t$15("options.polylinePositions is required.");if(!e$2e(i))throw new t$15("options.shapePositions is required.");this._positions=t,this._shape=i,this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._cornerType=u$Z(e.cornerType,ar$6.ROUNDED),this._vertexFormat=n$13.clone(u$Z(e.vertexFormat,n$13.DEFAULT)),this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry",this.enuCenter=u$Z(e.enuCenter,o$1p.ZERO);var n=1+t.length*o$1p.packedLength;n+=1+i.length*o$1o.packedLength+o$1p.packedLength,this.packedLength=n+t$12.packedLength+n$13.packedLength+2}R$A.createGeometry=function(e){var t,i,n,r=e._width,o=e._hMax,a=e._vertexFormat,s=e._colors,l=e._colorsPerVertex,u=e._arcType,c=e._granularity,h=e._ellipsoid,d=e._dist,f=e._period,p=D$13(e._positions,o$1p.equalsEpsilon),_=p.length;if(!(_<2||r<=0)){if(u===m$1h.GEODESIC||u===m$1h.RHUMB){var m,g;u===m$1h.GEODESIC?(m=e$2d.chordLength(c,h.maximumRadius),g=m$X.numberOfPoints):(m=c,g=m$X.numberOfPointsRhumbLine);var x=m$X.extractHeights(p,h);if(e$2e(s)){var y=1;for(t=0;t<_-1;++t)y+=g(p[t],p[t+1],m);var v=new Array(y),$=0;for(t=0;t<_-1;++t){var b=p[t],T=p[t+1],C=s[t],S=g(b,T,m);if(l&&t<y){var w=xe$g(b,T,C,s[t+1],S),E=w.length;for(i=0;i<E;++i)v[$++]=w[i]}else for(i=0;i<S;++i)v[$++]=e$1X.clone(C)}v[$]=e$1X.clone(s[s.length-1]),s=v,fe$l.length=0}p=u===m$1h.GEODESIC?m$X.generateCartesianArc({positions:p,minDistance:m,ellipsoid:h,height:x,hMax:o}):m$X.generateCartesianRhumbArc({positions:p,granularity:m,ellipsoid:h,height:x})}var P,A=4*(_=p.length)-4,L=new Float64Array(3*A),M=new Float64Array(3*A),R=new Float64Array(3*A),O=new Float32Array(2*A),D=a.st?new Float32Array(2*A):void 0,I=e$2e(s)?new Uint8Array(4*A):void 0,B=d?new Float32Array(3*A):void 0,F=0,N=0,G=0,z=0,U=0,V=0;for(i=0;i<_;++i){var k,W;0===i?(P=de$i,o$1p.subtract(p[0],p[1],P),o$1p.add(p[0],P,P)):P=p[i-1],o$1p.clone(P,_e$j),o$1p.clone(p[i],me$n),i===_-1?(P=de$i,o$1p.subtract(p[_-1],p[_-2],P),o$1p.add(p[_-1],P,P)):P=p[i+1],o$1p.clone(P,ue$n),e$2e(I)&&(k=0===i||l?s[i]:s[i-1],i!==_-1&&(W=s[i]));var H=i===_-1?2:4;for(n=0===i?2:0;n<H;++n){o$1p.pack(me$n,L,F),o$1p.pack(_e$j,M,F),o$1p.pack(ue$n,R,F),F+=3;var q=n-2<0?-1:1,j=n%2*2-1,X=j*i/_;if(O[N++]=o>0?X:j,O[N++]=q*r,a.st&&(D[G++]=i/(_-1),D[G++]=Math.max(O[N-2],0)),e$2e(I)){var Y=n<2?k:W;I[z++]=e$1X.floatToByte(Y.red),I[z++]=e$1X.floatToByte(Y.green),I[z++]=e$1X.floatToByte(Y.blue),I[z++]=e$1X.floatToByte(Y.alpha)}d&&(B[3*U]=V,U++)}V+=o$1p.distance(P,p[i])}if(d){var Z=V,K=Math.random()*(f>0?f:Z);for(i=0;i<A;i++)B[3*i+1]=Z,B[3*i+2]=K}var Q=new a$_;Q.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:L}),Q.prevPosition=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:M}),Q.nextPosition=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:R}),Q.expandAndWidth=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:O}),a.st&&(Q.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:D})),e$2e(I)&&(Q.color=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,values:I,normalize:!0})),d&&(Q.dist=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:B}));var J=ce$z.createTypedArray(A,6*_-6),ee=0,te=0,ie=_-1;for(i=0;i<ie;++i)J[te++]=ee,J[te++]=ee+2,J[te++]=ee+1,J[te++]=ee+1,J[te++]=ee+2,J[te++]=ee+3,ee+=4;return new I$1p({attributes:Q,indices:J,primitiveType:W$18.TRIANGLES,boundingSphere:i$1d.fromPoints(p),geometryType:Me$s.POLYLINES})}},N$A.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");i=u$Z(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._shape;for(o=a.length,t[i++]=o,n=0;n<o;++n,i+=o$1o.packedLength)o$1o.pack(a[n],t,i);return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._cornerType,t[i++]=e._granularity,o$1p.pack(e.enuCenter,t,i),t};var z$C=t$12.clone(t$12.UNIT_SPHERE),Q$D=new n$13,C$F={polylinePositions:void 0,shapePositions:void 0,ellipsoid:z$C,vertexFormat:Q$D,cornerType:void 0,granularity:void 0,enuCenter:void 0};N$A.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);r=e[t++];var a=new Array(r);for(n=0;n<r;++n,t+=o$1o.packedLength)a[n]=o$1o.unpack(e,t);var s=t$12.unpack(e,t,z$C);t+=t$12.packedLength;var l=n$13.unpack(e,t,Q$D);t+=n$13.packedLength;var u,c=e[t++],h=e[t++];return u=o$1p.unpack(e,t),e$2e(i)?(i._positions=o,i._shape=a,i._ellipsoid=t$12.clone(s,i._ellipsoid),i._vertexFormat=n$13.clone(l,i._vertexFormat),i._cornerType=c,i._granularity=h,i.enuCenter=u,i):(C$F.polylinePositions=o,C$F.shapePositions=a,C$F.cornerType=c,C$F.granularity=h,C$F.enuCenter=u,new N$A(C$F))};var pe$n=new f$1a;function U$F(e,t){var i=new a$_;i.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:e});var n,r,o=t.length,a=i.position.values.length/3,s=e.length/3/o,l=ce$z.createTypedArray(a,2*o*(s+1)),u=0,c=(n=0)*o;for(r=0;r<o-1;r++)l[u++]=r+c,l[u++]=r+c+1;for(l[u++]=o-1+c,l[u++]=c,c=(n=s-1)*o,r=0;r<o-1;r++)l[u++]=r+c,l[u++]=r+c+1;for(l[u++]=o-1+c,l[u++]=c,n=0;n<s-1;n++){var h=o*n,d=h+o;for(r=0;r<o;r++)l[u++]=r+h,l[u++]=r+d}return new I$1p({attributes:i,indices:ce$z.createTypedArray(a,l),boundingSphere:i$1d.fromVertices(e),primitiveType:W$18.LINES})}function _$z(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;if(!e$2e(t))throw new t$15("options.polylinePositions is required.");if(!e$2e(i))throw new t$15("options.shapePositions is required.");this._positions=t,this._shape=i,this._ellipsoid=t$12.clone(u$Z(e.ellipsoid,t$12.WGS84)),this._cornerType=u$Z(e.cornerType,ar$6.ROUNDED),this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";var n=1+t.length*o$1p.packedLength;n+=1+i.length*o$1o.packedLength,this.packedLength=n+t$12.packedLength+2}N$A.createGeometry=function(e){for(var t=D$13(e._positions,o$1p.equalsEpsilon),i=t.length,n=new Array(i),r=0;r<i;r++)n[r]=o$1p.clone(t[r]);var o=e._shape;if(o=J$C.removeDuplicatesFromShape(o),!(t.length<2||o.length<3)){A$1f.computeWindingOrder2D(o)===W$13.CLOCKWISE&&o.reverse();var a=f$1a.fromPoints(o,pe$n),s={};if(s.combinedPositions=J$C.computePositions(n,o,a,e,!0),!o$1p.equals(e.enuCenter,o$1p.ZERO)){var l=new Array(i);for(r=0;r<i;r++)l[r]=o$1p.clone(t[r]);s.combinedLocalPositions=J$C.computeLocalPositions(l,o,a,e,!0,e.enuCenter)}return ae$o(s,o,a,e._vertexFormat)}},_$z.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");i=u$Z(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._shape;for(o=a.length,t[i++]=o,n=0;n<o;++n,i+=o$1o.packedLength)o$1o.pack(a[n],t,i);return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,t[i++]=e._cornerType,t[i]=e._granularity,t};var L$M=t$12.clone(t$12.UNIT_SPHERE),P$A={polylinePositions:void 0,shapePositions:void 0,ellipsoid:L$M,height:void 0,cornerType:void 0,granularity:void 0};_$z.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);r=e[t++];var a=new Array(r);for(n=0;n<r;++n,t+=o$1o.packedLength)a[n]=o$1o.unpack(e,t);var s=t$12.unpack(e,t,L$M);t+=t$12.packedLength;var l=e[t++],u=e[t];return e$2e(i)?(i._positions=o,i._shape=a,i._ellipsoid=t$12.clone(s,i._ellipsoid),i._cornerType=l,i._granularity=u,i):(P$A.polylinePositions=o,P$A.shapePositions=a,P$A.cornerType=l,P$A.granularity=u,new _$z(P$A))};var V$x=new f$1a;_$z.createGeometry=function(e){var t=D$13(e._positions,o$1p.equalsEpsilon),i=e._shape;if(i=J$C.removeDuplicatesFromShape(i),!(t.length<2||i.length<3)){A$1f.computeWindingOrder2D(i)===W$13.CLOCKWISE&&i.reverse();var n=f$1a.fromPoints(i,V$x);return U$F(J$C.computePositions(t,i,n,e,!1),i)}};var e$S={TMERC:"tmerc",ALBERS:"aea",LCC:"lcc",UTM:"utm"},ProjectionName=Object.freeze(e$S);function B$B(e,t){if(!(this instanceof B$B))return new B$B(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function w$B(e,t,i){if(!i)return t.indexOf(e);for(var n=0;n<t.length;n++)if(i(e,t[n]))return n;return-1}function u$D(e,t){x$L(e,0,e.children.length,t,e)}function x$L(e,t,i,n,r){r||(r=m$G(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=t;a<i;a++)o=e.children[a],p$I(r,e.leaf?n(o):o);return r}function p$I(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function g$L(e,t){return e.minX-t.minX}function v$z(e,t){return e.minY-t.minY}function X$A(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d$T(e){return e.maxX-e.minX+(e.maxY-e.minY)}function S$D(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function A$O(e,t){var i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}function Y$v(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function M$F(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function m$G(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y$D(e,t,i,n,r){for(var o,a=[t,i];a.length;)!((i=a.pop())-(t=a.pop())<=n)&&(s$K(e,o=t+Math.ceil((i-t)/n/2)*n,t,i,r),a.push(t,o,o,i))}function r$G(){this._tree=B$B()}function n$v(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}function d$S(e,t){return e.id===t.id}B$B.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,i=[],n=this.toBBox;if(!M$F(e,t))return i;for(var r,o,a,s,l=[];t;){for(r=0,o=t.children.length;r<o;r++)a=t.children[r],M$F(e,s=t.leaf?n(a):a)&&(t.leaf?i.push(a):Y$v(e,s)?this._all(a,i):l.push(a));t=l.pop()}return i},collides:function(e){var t=this.data,i=this.toBBox;if(!M$F(e,t))return!1;for(var n,r,o,a,s=[];t;){for(n=0,r=t.children.length;n<r;n++)if(o=t.children[n],M$F(e,a=t.leaf?i(o):o)){if(t.leaf||Y$v(e,a))return!0;s.push(o)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=m$G([]),this},remove:function(e,t){if(!e)return this;for(var i,n,r,o,a=this.data,s=this.toBBox(e),l=[],u=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=u.pop(),o=!0),a.leaf&&-1!==(r=w$B(e,a.children,t)))return a.children.splice(r,1),l.push(a),this._condense(l),this;o||a.leaf||!Y$v(a,s)?n?(i++,a=n.children[i],o=!1):a=null:(l.push(a),u.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:g$L,compareMinY:v$z,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},_build:function(e,t,i,n){var r,o=i-t+1,a=this._maxEntries;if(o<=a)return u$D(r=m$G(e.slice(t,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=m$G([])).leaf=!1,r.height=n;var s,l,u,c,h=Math.ceil(o/a),d=h*Math.ceil(Math.sqrt(a));for(y$D(e,t,i,d,this.compareMinX),s=t;s<=i;s+=d)for(y$D(e,s,u=Math.min(s+d-1,i),h,this.compareMinY),l=s;l<=u;l+=h)c=Math.min(l+h-1,u),r.children.push(this._build(e,l,c,n-1));return u$D(r,this.toBBox),r},_chooseSubtree:function(e,t,i,n){for(var r,o,a,s,l,u,c,h;n.push(t),!t.leaf&&n.length-1!==i;){for(c=h=1/0,r=0,o=t.children.length;r<o;r++)l=X$A(a=t.children[r]),(u=S$D(e,a)-l)<h?(h=u,c=l<c?l:c,s=a):u===h&&l<c&&(c=l,s=a);t=s||t.children[0]}return t},_insert:function(e,t,i){var n=this.toBBox,r=i?e:n(e),o=[],a=this._chooseSubtree(r,this.data,t,o);for(a.children.push(e),p$I(a,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},_split:function(e,t){var i=e[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=m$G(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,u$D(i,this.toBBox),u$D(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(e,t){this.data=m$G([e,t]),this.data.height=e.height+1,this.data.leaf=!1,u$D(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,i){var n,r,o,a,s,l,u,c;for(l=u=1/0,n=t;n<=i-t;n++)a=A$O(r=x$L(e,0,n,this.toBBox),o=x$L(e,n,i,this.toBBox)),s=X$A(r)+X$A(o),a<l?(l=a,c=n,u=s<u?s:u):a===l&&s<u&&(u=s,c=n);return c},_chooseSplitAxis:function(e,t,i){var n=e.leaf?this.compareMinX:g$L,r=e.leaf?this.compareMinY:v$z;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)},_allDistMargin:function(e,t,i,n){e.children.sort(n);var r,o,a=this.toBBox,s=x$L(e,0,t,a),l=x$L(e,i-t,i,a),u=d$T(s)+d$T(l);for(r=t;r<i-t;r++)o=e.children[r],p$I(s,e.leaf?a(o):o),u+=d$T(s);for(r=i-t-1;r>=t;r--)o=e.children[r],p$I(l,e.leaf?a(o):o),u+=d$T(l);return u},_adjustParentBBoxes:function(e,t,i){for(var n=i;n>=0;n--)p$I(t[n],e)},_condense:function(e){for(var t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children).splice(t.indexOf(e[i]),1):this.clear():u$D(e[i],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}},n$v.fromRectangleAndId=function(e,t,i){return i.minX=t.west,i.minY=t.south,i.maxX=t.east,i.maxY=t.north,i.id=e,i},r$G.prototype.insert=function(e,t){o$1q.typeOf.string("id",e),o$1q.typeOf.object("rectangle",t);var i=n$v.fromRectangleAndId(e,t,new n$v);this._tree.insert(i)};var h$G=new n$v;r$G.prototype.remove=function(e,t){o$1q.typeOf.string("id",e),o$1q.typeOf.object("rectangle",t);var i=n$v.fromRectangleAndId(e,t,h$G);this._tree.remove(i,d$S)};var m$F=new n$v,e$R;function p$H(e){return e$R(e)}function y$C(e,t,i){return o$1q.typeOf.object("terrainProvider",e),o$1q.typeOf.number("level",t),o$1q.defined("positions",i),e.readyPromise.then((function(){return b$K(e,t,i)}))}function b$K(e,t,i){var n,r=e.tilingScheme,o=[],a={};for(n=0;n<i.length;++n){var s=r.positionToTileXY(i[n],t),l=s.toString();if(!a.hasOwnProperty(l)){var u={x:s.x,y:s.y,level:t,tilingScheme:r,terrainProvider:e,positions:[]};a[l]=u,o.push(u)}a[l].positions.push(i[n])}var c=[];for(n=0;n<o.length;++n){var h=o[n],d=new r$1c({throttle:!1,throttleByServer:!1,type:U$1f.TERRAIN}),f=h.terrainProvider.requestTileGeometry(h.x,h.y,h.level,d,!0).then(w$A(h,e)).otherwise(x$K(h));c.push(f)}return o$1l.all(c,(function(){return i}))}function w$A(e,t){var i=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(e){if(t._isSct&&t._isTerrainZ)for(var r=nt$b.inflate(e.buffer).buffer,o=t.createTerrainData(e,r),a=0;a<i.length;++a){(s=i[a]).height=o.interpolateHeight(n,s.longitude,s.latitude)}else for(a=0;a<i.length;++a){var s;(s=i[a]).height=e.interpolateHeight(n,s.longitude,s.latitude)}}}function x$K(e){var t=e.positions;return function(){for(var e=0;e<t.length;++e){t[e].height=void 0}}}r$G.prototype.collides=function(e){o$1q.typeOf.object("rectangle",e);var t=n$v.fromRectangleAndId("",e,m$F);return this._tree.collides(t)},typeof requestAnimationFrame<"u"&&(e$R=requestAnimationFrame),function(){if(!e$2e(e$R)&&typeof window<"u")for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!e$2e(e$R);)e$R=window[e[t]+"RequestAnimationFrame"],++t;if(!e$2e(e$R)){var n=0;e$R=function(e){var t=Et$c(),i=Math.max(16.666666666666668-(t-n),0);return n=t+i,setTimeout((function(){e(n)}),i)}}}();var o$E=new o$1o;function y$B(e,t){if(!e$2e(e))throw new t$15("terrainProvider is required.");if(!e$2e(t))throw new t$15("positions is required.");return e.readyPromise.then((function(){var i=[],n=[],r=e.availability;if(!e$2e(r)&&!e._isSct)throw new t$15("sampleTerrainMostDetailed requires a terrain provider that has tile availability.");for(var o=[],a=0;a<t.length;++a){var s=t[a],l=e$2e(r)?r.computeMaximumLevelAtPosition(s):e._levels[e._levels.length-1];if(n[a]=l,0===l){e.tilingScheme.positionToTileXY(s,1,o$E);var u=e.loadTileDataAvailability(o$E.x,o$E.y,1);e$2e(u)&&o.push(u)}var c=i[l];e$2e(c)||(i[l]=c=[]),c.push(s)}return o$1l.all(o).then((function(){return o$1l.all(i.map((function(t,i){if(e$2e(t))return y$C(e,i,t)})))})).then((function(){for(var i=[],o=0;o<t.length;++o){var a=t[o];(e$2e(r)?r.computeMaximumLevelAtPosition(a):e._levels[e._levels.length-1])!==n[o]&&i.push(a)}if(i.length>0)return y$B(e,i)})).then((function(){return t}))}))}var E$I={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},G$J=Object.freeze(E$I);function w$z(e,t,i){let n=e._element,r=n.offsetWidth/n.getBoundingClientRect().width,o=n.offsetHeight/n.getBoundingClientRect().height;if(n===document)return i.x=t.clientX*r,i.y=t.clientY*o,i;var a=n.getBoundingClientRect();return i.x=(t.clientX-a.left)*r,i.y=(t.clientY-a.top)*o,i}function R$z(e,t){var i=e;return e$2e(t)&&(i+="+"+t),i}function y$A(e){return e.shiftKey?Aa$1.SHIFT:e.ctrlKey?Aa$1.CTRL:e.altKey?Aa$1.ALT:void 0}var l$L={LEFT:0,MIDDLE:1,RIGHT:2};function T$F(e,t,i,n){function r(t){n(e,t)}i.addEventListener(t,r,!1),e._removalFunctions.push((function(){i.removeEventListener(t,r,!1)}))}function ho$1(e){var t=e._element,i=e$2e(t.disableRootEvents)?t:document;s$Z.supportsPointerEvents()?(T$F(e,"pointerdown",t,go$1),T$F(e,"pointerup",t,W$G),T$F(e,"pointermove",t,ao$1),T$F(e,"pointercancel",t,W$G)):(T$F(e,"mousedown",t,j$C),T$F(e,"mouseup",i,K$B),T$F(e,"mousemove",i,Q$C),T$F(e,"touchstart",t,To$1),T$F(e,"touchend",i,$$C),T$F(e,"touchmove",i,Po$1),T$F(e,"touchcancel",i,$$C)),T$F(e,"dblclick",t,lo$1),T$F(e,"onwheel"in t?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",t,mo$1)}function _o$1(e){for(var t=e._removalFunctions,i=0;i<t.length;++i)t[i]()}var Y$u={position:new o$1o};function O$w(e){e._lastSeenTouchEvent=Et$c()}function k$z(e){return Et$c()-e._lastSeenTouchEvent>g$K.mouseEmulationIgnoreMilliseconds}function d$R(e,t,i){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)<i}function j$C(e,t){if(k$z(e)){var i,n=t.button;if(e._buttonDown[n]=!0,n===l$L.LEFT)i=G$J.LEFT_DOWN;else if(n===l$L.MIDDLE)i=G$J.MIDDLE_DOWN;else{if(n!==l$L.RIGHT)return;i=G$J.RIGHT_DOWN}var r=w$z(e,t,e._primaryPosition);o$1o.clone(r,e._primaryStartPosition),o$1o.clone(r,e._primaryPreviousPosition);var o=y$A(t),a=e.getInputAction(i,o);e$2e(a)&&(o$1o.clone(r,Y$u.position),a(Y$u),t.preventDefault())}}var z$B={position:new o$1o},J$z={position:new o$1o};function G$I(e,t,i,n){var r=y$A(n),o=e.getInputAction(t,r),a=e.getInputAction(i,r);if(e$2e(o)||e$2e(a)){var s=w$z(e,n,e._primaryPosition);if(e$2e(o)&&(o$1o.clone(s,z$B.position),o(z$B)),e$2e(a))d$R(e._primaryStartPosition,s,e._clickPixelTolerance)&&(o$1o.clone(s,J$z.position),a(J$z))}}function K$B(e,t){if(k$z(e)){var i=t.button;i!==l$L.LEFT&&i!==l$L.MIDDLE&&i!==l$L.RIGHT||(e._buttonDown[l$L.LEFT]&&(G$I(e,G$J.LEFT_UP,G$J.LEFT_CLICK,t),e._buttonDown[l$L.LEFT]=!1),e._buttonDown[l$L.MIDDLE]&&(G$I(e,G$J.MIDDLE_UP,G$J.MIDDLE_CLICK,t),e._buttonDown[l$L.MIDDLE]=!1),e._buttonDown[l$L.RIGHT]&&(G$I(e,G$J.RIGHT_UP,G$J.RIGHT_CLICK,t),e._buttonDown[l$L.RIGHT]=!1))}}var U$E={startPosition:new o$1o,endPosition:new o$1o};function Q$C(e,t){if(k$z(e)){var i=y$A(t),n=w$z(e,t,e._primaryPosition),r=e._primaryPreviousPosition,o=e.getInputAction(G$J.MOUSE_MOVE,i);e$2e(o)&&(o$1o.clone(r,U$E.startPosition),o$1o.clone(n,U$E.endPosition),o(U$E,t)),o$1o.clone(n,r),(e._buttonDown[l$L.LEFT]||e._buttonDown[l$L.MIDDLE]||e._buttonDown[l$L.RIGHT])&&t.preventDefault()}}var Z$C={position:new o$1o};function lo$1(e,t){var i;if(t.button===l$L.LEFT){i=G$J.LEFT_DOUBLE_CLICK;var n=y$A(t),r=e.getInputAction(i,n);e$2e(r)&&(w$z(e,t,Z$C.position),r(Z$C))}}function mo$1(e,t){var i;if(e$2e(t.deltaY)){var n=t.deltaMode;i=n===t.DOM_DELTA_PIXEL?-t.deltaY:n===t.DOM_DELTA_LINE?40*-t.deltaY:120*-t.deltaY}else i=t.detail>0?-120*t.detail:t.wheelDelta;if(e$2e(i)){var r=y$A(t),o=e.getInputAction(G$J.WHEEL,r);e$2e(o)&&(o(i),t.preventDefault())}}function To$1(e,t){O$w(e);var i,n,r,o=t.changedTouches,a=o.length,s=e._positions;for(i=0;i<a;++i)r=(n=o[i]).identifier,s.set(r,w$z(e,n,new o$1o));p$G(e,t);var l=e._previousPositions;for(i=0;i<a;++i)r=(n=o[i]).identifier,l.set(r,o$1o.clone(s.get(r)))}function $$C(e,t){O$w(e);var i,n,r=t.changedTouches,o=r.length,a=e._positions;for(i=0;i<o;++i)n=r[i].identifier,a.remove(n);p$G(e,t);var s=e._previousPositions;for(i=0;i<o;++i)n=r[i].identifier,s.remove(n)}var X$z={position:new o$1o},N$z={position1:new o$1o,position2:new o$1o},e$Q={position:new o$1o},E$H={position:new o$1o},H$H={position:new o$1o};function p$G(e,t){var i,n,r=y$A(t),o=e._positions,a=o.length,s=e._isPinching;if(1!==a&&e._buttonDown[l$L.LEFT]){if(e._buttonDown[l$L.LEFT]=!1,e$2e(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),e$2e(i=e.getInputAction(G$J.LEFT_UP,r))&&(o$1o.clone(e._primaryPosition,e$Q.position),i(e$Q)),0===a&&!e._isTouchHolding&&e$2e(n=e.getInputAction(G$J.LEFT_CLICK,r)))d$R(e._primaryStartPosition,e._previousPositions.values[0],e._clickPixelTolerance)&&(o$1o.clone(e._primaryPosition,E$H.position),n(E$H));e._isTouchHolding=!1}if(0===a&&s&&(e._isPinching=!1,e$2e(i=e.getInputAction(G$J.PINCH_END,r))&&i()),1===a&&!s){var l=o.values[0];o$1o.clone(l,e._primaryPosition),o$1o.clone(l,e._primaryStartPosition),o$1o.clone(l,e._primaryPreviousPosition),e._buttonDown[l$L.LEFT]=!0,e$2e(i=e.getInputAction(G$J.LEFT_DOWN,r))&&(o$1o.clone(l,X$z.position),i(X$z)),e._touchHoldTimer=setTimeout((function(){!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,e$2e(n=e.getInputAction(G$J.RIGHT_CLICK,r)))&&(d$R(e._primaryStartPosition,e._previousPositions.values[0],e._holdPixelTolerance)&&(o$1o.clone(e._primaryPosition,H$H.position),n(H$H)))}),g$K.touchHoldDelayMilliseconds),t.preventDefault()}2===a&&!s&&(e._isPinching=!0,e$2e(i=e.getInputAction(G$J.PINCH_START,r))&&(o$1o.clone(o.values[0],N$z.position1),o$1o.clone(o.values[1],N$z.position2),i(N$z),t.preventDefault()))}function Po$1(e,t){O$w(e);var i,n,r,o=t.changedTouches,a=o.length,s=e._positions;for(i=0;i<a;++i){r=(n=o[i]).identifier;var l=s.get(r);e$2e(l)&&w$z(e,n,l)}S$C(e,t);var u=e._previousPositions;for(i=0;i<a;++i)r=(n=o[i]).identifier,o$1o.clone(s.get(r),u.get(r))}var c$C={startPosition:new o$1o,endPosition:new o$1o},L$L={distance:{startPosition:new o$1o,endPosition:new o$1o},angleAndHeight:{startPosition:new o$1o,endPosition:new o$1o}};function S$C(e,t){var i,n=y$A(t),r=e._positions,o=e._previousPositions,a=r.length;if(1===a&&e._buttonDown[l$L.LEFT]){var s=r.values[0];o$1o.clone(s,e._primaryPosition);var l=e._primaryPreviousPosition;e$2e(i=e.getInputAction(G$J.MOUSE_MOVE,n))&&(o$1o.clone(l,c$C.startPosition),o$1o.clone(s,c$C.endPosition),i(c$C,t)),o$1o.clone(s,l),t.preventDefault()}else if(2===a&&e._isPinching&&e$2e(i=e.getInputAction(G$J.PINCH_MOVE,n))){var u=r.values[0],c=r.values[1],h=o.values[0],d=o.values[1],f=c.x-u.x,p=c.y-u.y,_=.25*Math.sqrt(f*f+p*p),m=d.x-h.x,g=d.y-h.y,x=.25*Math.sqrt(m*m+g*g),y=.125*(c.y+u.y),v=.125*(d.y+h.y),$=Math.atan2(p,f),b=Math.atan2(g,m);o$1o.fromElements(0,x,L$L.distance.startPosition),o$1o.fromElements(0,_,L$L.distance.endPosition),o$1o.fromElements(b,v,L$L.angleAndHeight.startPosition),o$1o.fromElements($,y,L$L.angleAndHeight.endPosition),i(L$L)}}function go$1(e,t){if(t.target.setPointerCapture(t.pointerId),"touch"===t.pointerType){var i=e._positions,n=t.pointerId;i.set(n,w$z(e,t,new o$1o)),p$G(e,t),e._previousPositions.set(n,o$1o.clone(i.get(n)))}else j$C(e,t)}function W$G(e,t){if("touch"===t.pointerType){var i=e._positions,n=t.pointerId;i.remove(n),p$G(e,t),e._previousPositions.remove(n)}else K$B(e,t)}function ao$1(e,t){if("touch"===t.pointerType){var i=e._positions,n=t.pointerId,r=i.get(n);if(!e$2e(r))return;w$z(e,t,r),S$C(e,t);var o=e._previousPositions;o$1o.clone(i.get(n),o.get(n))}else Q$C(e,t)}function g$K(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-g$K.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new o$1o,this._primaryPosition=new o$1o,this._primaryPreviousPosition=new o$1o,this._positions=new e$1Q,this._previousPositions=new e$1Q,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=u$Z(e,document),ho$1(this)}g$K.prototype.setInputAction=function(e,t,i){if(!e$2e(e))throw new t$15("action is required.");if(!e$2e(t))throw new t$15("type is required.");var n=R$z(t,i);this._inputEvents[n]=e},g$K.prototype.getInputAction=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=R$z(e,t);return this._inputEvents[i]},g$K.prototype.removeInputAction=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=R$z(e,t);delete this._inputEvents[i]},g$K.prototype.registerListenersForWindowTop=function(){var e=window.top,t=e$2e(e.disableRootEvents)?e:document;s$Z.supportsPointerEvents()?T$F(this,"pointerup",e,W$G):T$F(this,"mouseup",t,K$B)},g$K.prototype.isDestroyed=function(){return!1},g$K.prototype.destroy=function(){return _o$1(this),i$11(this)},g$K.mouseEmulationIgnoreMilliseconds=800,g$K.touchHoldDelayMilliseconds=1500;var F$G={};function wa(e){var t=6.239996+.0172019696544*e;return.001657*Math.sin(t+.01671*Math.sin(t))}var Ta$1=32.184,la$2=2451545;function K$A(e,t){t=a$15.addSeconds(e,Ta$1,t);var i=a$15.totalDays(t)-la$2;return t=a$15.addSeconds(t,wa(i),t)}var B$A=new a$15(2451545,0,H$1d.TAI),ga$1=1e3,S$B=e$2d.RADIANS_PER_DEGREE,p$F=e$2d.RADIANS_PER_ARCSECOND,f$K=14959787e4,X$y=new p$1e;function k$y(e,t,i,n,r,o,a){if(i<0&&(i=-i,r+=e$2d.PI),i<0||i>e$2d.PI)throw new t$15("The inclination is out of range. Inclination must be greater than or equal to zero and less than or equal to Pi radians.");var s=e*(1-t),l=n-r,u=r,c=Aa(o-n,t);if("Hyperbolic"===Ea$1(t,0)&&Math.abs(e$2d.negativePiToPi(c))>=Math.acos(-1/t))throw new t$15("The true anomaly of the hyperbolic orbit lies outside of the bounds of the hyperbola.");ba(l,i,u,X$y);var h=s*(1+t),d=Math.cos(c),f=Math.sin(c),p=1+t*d;if(p<=e$2d.Epsilon10)throw new t$15("elements cannot be converted to cartesian");var _=h/p;return e$2e(a)?(a.x=_*d,a.y=_*f,a.z=0):a=new o$1p(_*d,_*f,0),p$1e.multiplyByVector(X$y,a,a)}function Ea$1(e,t){if(e<0)throw new t$15("eccentricity cannot be negative.");return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function Aa(e,t){if(t<0||t>=1)throw new t$15("eccentricity out of range.");return _a$1(Oa(e,t),t)}var G$H=50,Ia$1=e$2d.EPSILON8;function Oa(e,t){if(t<0||t>=1)throw new t$15("eccentricity out of range.");var i,n=Math.floor(e/e$2d.TWO_PI),r=(e-=n*e$2d.TWO_PI)+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE;for(i=0;i<G$H&&Math.abs(o-r)>Ia$1;++i){r=(o=r)-(o-t*Math.sin(o)-e)/(1-t*Math.cos(o))}if(i>=G$H)throw new t$15("Kepler equation did not converge");return o=r+n*e$2d.TWO_PI}function _a$1(e,t){if(t<0||t>=1)throw new t$15("eccentricity out of range.");var i=Math.floor(e/e$2d.TWO_PI);e-=i*e$2d.TWO_PI;var n=Math.cos(e)-t,r=Math.sin(e)*Math.sqrt(1-t*t),o=Math.atan2(r,n);return o=e$2d.zeroToTwoPi(o),e<0&&(o-=e$2d.TWO_PI),o+=i*e$2d.TWO_PI}function ba(e,t,i,n){if(t<0||t>e$2d.PI)throw new t$15("inclination out of range");var r=Math.cos(e),o=Math.sin(e),a=Math.cos(t),s=Math.sin(t),l=Math.cos(i),u=Math.sin(i);return e$2e(n)?(n[0]=l*r-u*o*a,n[1]=u*r+l*o*a,n[2]=o*s,n[3]=-l*o-u*r*a,n[4]=-u*o+l*r*a,n[5]=r*s,n[6]=u*s,n[7]=-l*s,n[8]=a):n=new p$1e(l*r-u*o*a,-l*o-u*r*a,u*s,u*r+l*o*a,-u*o+l*r*a,-l*s,o*s,r*s,a),n}var Da$1=1.0000010178*f$K,Na=100.46645683*S$B,ya=1295977422.83429*p$F,Q$B=16002,Z$B=21863,$$B=32004,j$B=10931,aa$3=14529,ra$3=16368,ta$2=15318,oa$3=32794,Ra$1=64*1e-7*f$K,qa$1=1e-7*-152*f$K,xa$1=62*1e-7*f$K,La$1=-8e-7*f$K,Wa=32*1e-7*f$K,Ya$1=1e-7*-41*f$K,Ua$1=19*1e-7*f$K,Ba$1=1e-7*-11*f$K,Va=1e-7*-150*f$K,Fa$1=1e-7*-46*f$K,Ja$1=68*1e-7*f$K,za$1=54*1e-7*f$K,Ha=14*1e-7*f$K,Ka$1=24*1e-7*f$K,Xa$1=1e-7*-28*f$K,ka=22*1e-7*f$K,na$2=10,ea$4=16002,ia$2=21863,sa$2=10931,ha$2=1473,va=32004,Ma$1=4387,ca=73,Ga$1=1e-7*-325,Qa$1=1e-7*-322,Za$1=1e-7*-79,$a$1=232*1e-7,ja=1e-7*-52,a0=97*1e-7,r0=55*1e-7,t0$1=1e-7*-41,o0=1e-7*-105,n0=1e-7*-137,e0=258*1e-7,i0=35*1e-7,s0=1e-7*-116,h0=1e-7*-88,v0=1e-7*-112,M0=1e-7*-80,b$J=new a$15(0,0,H$1d.TAI);function c0(e,t){K$A(e,b$J);var i=(b$J.dayNumber-B$A.dayNumber+(b$J.secondsOfDay-B$A.secondsOfDay)/h$17.SECONDS_PER_DAY)/(10*h$17.DAYS_PER_JULIAN_CENTURY),n=.3595362*i,r=Da$1+Ra$1*Math.cos(Q$B*n)+Va*Math.sin(Q$B*n)+qa$1*Math.cos(Z$B*n)+Fa$1*Math.sin(Z$B*n)+xa$1*Math.cos($$B*n)+Ja$1*Math.sin($$B*n)+La$1*Math.cos(j$B*n)+za$1*Math.sin(j$B*n)+Wa*Math.cos(aa$3*n)+Ha*Math.sin(aa$3*n)+Ya$1*Math.cos(ra$3*n)+Ka$1*Math.sin(ra$3*n)+Ua$1*Math.cos(ta$2*n)+Xa$1*Math.sin(ta$2*n)+Ba$1*Math.cos(oa$3*n)+ka*Math.sin(oa$3*n),o=Na+ya*i+Ga$1*Math.cos(na$2*n)+o0*Math.sin(na$2*n)+Qa$1*Math.cos(ea$4*n)+n0*Math.sin(ea$4*n)+Za$1*Math.cos(ia$2*n)+e0*Math.sin(ia$2*n)+$a$1*Math.cos(sa$2*n)+i0*Math.sin(sa$2*n)+ja*Math.cos(ha$2*n)+s0*Math.sin(ha$2*n)+a0*Math.cos(va*n)+h0*Math.sin(va*n)+r0*Math.cos(Ma$1*n)+v0*Math.sin(Ma$1*n)+t0$1*Math.cos(ca*n)+M0*Math.sin(ca*n);return k$y(r,.0167086342-.0004203654*i,469.97289*p$F*i,102.93734808*S$B+11612.3529*p$F*i,174.87317577*S$B-8679.27034*p$F*i,o,t)}function fa$1(e,t){K$A(e,b$J);var i=(b$J.dayNumber-B$A.dayNumber+(b$J.secondsOfDay-B$A.secondsOfDay)/h$17.SECONDS_PER_DAY)/h$17.DAYS_PER_JULIAN_CENTURY,n=i*i,r=n*i,o=r*i,a=383397.7725+.004*i,s=.055545526-16e-9*i,l=5.15668983*S$B,u=-8e-5*i+.02966*n-42e-6*r-13e-8*o,c=83.35324312*S$B,h=14643420.2669*i-38.2702*n-.045047*r+21301e-8*o,d=125.04455501*S$B,f=-6967919.3631*i+6.3602*n+.007625*r-3586e-8*o,p=218.31664563*S$B,_=1732559343.4847*i-6.391*n+.006588*r-3169e-8*o,m=297.85019547*S$B+p$F*(1602961601.209*i-6.3706*n+.006593*r-3169e-8*o),g=134.96340251*S$B+p$F*(1717915923.2178*i+31.8792*n+.051635*r-2447e-7*o),x=357.52910918*S$B+p$F*(129596581.0481*i-.5532*n+136e-6*r-1149e-8*o),y=310.17137918*S$B-p$F*(6967051.436*i+6.2068*n+.007618*r-3219e-8*o),v=2*m,$=4*m,b=6*m,T=2*g,C=3*g,S=4*g,w=2*(93.27209062*S$B+p$F*(1739527262.8478*i-12.7512*n-.001037*r+417e-8*o));a+=3400.4*Math.cos(v)-635.6*Math.cos(v-g)-235.6*Math.cos(g)+218.1*Math.cos(v-x)+181*Math.cos(v+g),s+=.014216*Math.cos(v-g)+.008551*Math.cos(v-T)-.001383*Math.cos(g)+.001356*Math.cos(v+g)-.001147*Math.cos($-C)-914e-6*Math.cos($-T)+869e-6*Math.cos(v-x-g)-627e-6*Math.cos(v)-394e-6*Math.cos($-S)+282e-6*Math.cos(v-x-T)-279e-6*Math.cos(m-g)-236e-6*Math.cos(T)+231e-6*Math.cos($)+229e-6*Math.cos(b-S)-201e-6*Math.cos(T-w),u+=486.26*Math.cos(v-w)-40.13*Math.cos(v)+37.51*Math.cos(w)+25.73*Math.cos(T-w)+19.97*Math.cos(v-x-w),h+=-55609*Math.sin(v-g)-34711*Math.sin(v-T)-9792*Math.sin(g)+9385*Math.sin($-C)+7505*Math.sin($-T)+5318*Math.sin(v+g)+3484*Math.sin($-S)-3417*Math.sin(v-x-g)-2530*Math.sin(b-S)-2376*Math.sin(v)-2075*Math.sin(v-C)-1883*Math.sin(T)-1736*Math.sin(b-5*g)+1626*Math.sin(x)-1370*Math.sin(b-C),f+=-5392*Math.sin(v-w)-540*Math.sin(x)-441*Math.sin(v)+423*Math.sin(w)-288*Math.sin(T-w),_+=-3332.9*Math.sin(v)+1197.4*Math.sin(v-g)-662.5*Math.sin(x)+396.3*Math.sin(g)-218*Math.sin(v-x);var E=2*y,P=3*y;u+=46.997*Math.cos(y)*i-.614*Math.cos(v-w+y)*i+.614*Math.cos(v-w-y)*i-.0297*Math.cos(E)*n-.0335*Math.cos(y)*n+.0012*Math.cos(v-w+E)*n-16e-5*Math.cos(y)*r+4e-5*Math.cos(P)*r+4e-5*Math.cos(E)*r;var A=2.116*Math.sin(y)*i-.111*Math.sin(v-w-y)*i-.0015*Math.sin(y)*n;return h+=A,_+=A,f+=-520.77*Math.sin(y)*i+13.66*Math.sin(v-w+y)*i+1.12*Math.sin(v-y)*i-1.06*Math.sin(w-y)*i+.66*Math.sin(E)*n+.371*Math.sin(y)*n-.035*Math.sin(v-w+E)*n-.015*Math.sin(v-w+y)*n+.0014*Math.sin(y)*r-.0011*Math.sin(P)*r-9e-4*Math.sin(E)*r,k$y(a*=ga$1,s,l+u*p$F,c+h*p$F,d+f*p$F,p+_*p$F,t)}var ua$1=.012300034,f0=ua$1/(ua$1+1)*-1;function u0(e,t){return t=fa$1(e,t),o$1p.multiplyByScalar(t,f0,t)}var ma$1=new p$1e(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),R$y=new o$1p;function ae$n(e,t,i,n,r,o,a){var s,l=m$X.numberOfPoints(e,t,r),u=i.red,c=i.green,h=i.blue,d=i.alpha,f=n.red,p=n.green,_=n.blue,m=n.alpha;if(e$1X.equals(i,n)){for(s=0;s<l;s++)o[a++]=e$1X.floatToByte(u),o[a++]=e$1X.floatToByte(c),o[a++]=e$1X.floatToByte(h),o[a++]=e$1X.floatToByte(d);return a}var g=(f-u)/l,x=(p-c)/l,y=(_-h)/l,v=(m-d)/l,$=a;for(s=0;s<l;s++)o[$++]=e$1X.floatToByte(u+s*g),o[$++]=e$1X.floatToByte(c+s*x),o[$++]=e$1X.floatToByte(h+s*y),o[$++]=e$1X.floatToByte(d+s*v);return $}function S$A(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,i=e.colors,n=u$Z(e.colorsPerVertex,!1);if(!e$2e(t)||t.length<2)throw new t$15("At least two positions are required.");if(e$2e(i)&&(n&&i.length<t.length||!n&&i.length<t.length-1))throw new t$15("colors has an invalid length.");this._positions=t,this._colors=i,this._colorsPerVertex=n,this._arcType=u$Z(e.arcType,m$1h.GEODESIC),this._granularity=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._workerName="createSimplePolylineGeometry";var r=1+t.length*o$1p.packedLength;r+=e$2e(i)?1+i.length*e$1X.packedLength:1,this.packedLength=r+t$12.packedLength+3}F$G.computeSunPositionInEarthInertialFrame=function(e,t){return e$2e(e)||(e=a$15.now()),e$2e(t)||(t=new o$1p),R$y=c0(e,R$y),t=o$1p.negate(R$y,t),u0(e,R$y),o$1p.subtract(t,R$y,t),p$1e.multiplyByVector(ma$1,t,t),t},F$G.computeMoonPositionInEarthInertialFrame=function(e,t){return e$2e(e)||(e=a$15.now()),t=fa$1(e,t),p$1e.multiplyByVector(ma$1,t,t),t},S$A.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");i=u$Z(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._colors;for(o=e$2e(a)?a.length:0,t[i++]=o,n=0;n<o;++n,i+=e$1X.packedLength)e$1X.pack(a[n],t,i);return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i]=e._granularity,t},S$A.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n,r=e[t++],o=new Array(r);for(n=0;n<r;++n,t+=o$1p.packedLength)o[n]=o$1p.unpack(e,t);var a=(r=e[t++])>0?new Array(r):void 0;for(n=0;n<r;++n,t+=e$1X.packedLength)a[n]=e$1X.unpack(e,t);var s=t$12.unpack(e,t);t+=t$12.packedLength;var l=1===e[t++],u=e[t++],c=e[t];return e$2e(i)?(i._positions=o,i._colors=a,i._ellipsoid=s,i._colorsPerVertex=l,i._arcType=u,i._granularity=c,i):new S$A({positions:o,colors:a,ellipsoid:s,colorsPerVertex:l,arcType:u,granularity:c})};var U$D=new Array(2),q$G=new Array(2),te$r={positions:U$D,height:q$G,ellipsoid:void 0,minDistance:void 0,granularity:void 0};function l$K(){this._maxVisibleValue=17976931348623157e292,this._minVisibleValue=-17976931348623157e292,this._floor=0,this._ceiling=0,this._opacity=1,this._updateColorDictTable=!1,this._coverageArea=[],this._updatePolygon=!0,this._displayMode=_0x25bb47.DisplayMode.FACE,this._dictColorTable=void 0}function n$u(e){var t=u$Z(e.radius,1),i={radii:new o$1p(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new b$O(i),this._workerName="createSphereGeometry"}S$A.createGeometry=function(e){var t,i,n,r,o,a=e._positions,s=e._colors,l=e._colorsPerVertex,u=e._arcType,c=e._granularity,h=e._ellipsoid,d=e$2d.chordLength(c,h.maximumRadius),f=e$2e(s)&&!l,p=a.length,_=0;if(u===m$1h.GEODESIC||u===m$1h.RHUMB){var m,g,x;u===m$1h.GEODESIC?(m=e$2d.chordLength(c,h.maximumRadius),g=m$X.numberOfPoints,x=m$X.generateArc):(m=c,g=m$X.numberOfPointsRhumbLine,x=m$X.generateRhumbArc);var y=m$X.extractHeights(a,h),v=te$r;if(u===m$1h.GEODESIC?v.minDistance=d:v.granularity=c,v.ellipsoid=h,f){var $=0;for(t=0;t<p-1;t++)$+=g(a[t],a[t+1],m)+1;i=new Float64Array(3*$),r=new Uint8Array(4*$),v.positions=U$D,v.height=q$G;var b=0;for(t=0;t<p-1;++t){U$D[0]=a[t],U$D[1]=a[t+1],q$G[0]=y[t],q$G[1]=y[t+1];var T=x(v);if(e$2e(s)){var C=T.length/3;o=s[t];for(var S=0;S<C;++S)r[b++]=e$1X.floatToByte(o.red),r[b++]=e$1X.floatToByte(o.green),r[b++]=e$1X.floatToByte(o.blue),r[b++]=e$1X.floatToByte(o.alpha)}i.set(T,_),_+=T.length}}else if(v.positions=a,v.height=y,i=new Float64Array(x(v)),e$2e(s)){for(r=new Uint8Array(i.length/3*4),t=0;t<p-1;++t){_=ae$n(a[t],a[t+1],s[t],s[t+1],d,r,_)}var w=s[p-1];r[_++]=e$1X.floatToByte(w.red),r[_++]=e$1X.floatToByte(w.green),r[_++]=e$1X.floatToByte(w.blue),r[_++]=e$1X.floatToByte(w.alpha)}}else{n=f?2*p-2:p,i=new Float64Array(3*n),r=e$2e(s)?new Uint8Array(4*n):void 0;var E=0,P=0;for(t=0;t<p;++t){var A=a[t];if(f&&t>0&&(o$1p.pack(A,i,E),E+=3,o=s[t-1],r[P++]=e$1X.floatToByte(o.red),r[P++]=e$1X.floatToByte(o.green),r[P++]=e$1X.floatToByte(o.blue),r[P++]=e$1X.floatToByte(o.alpha)),f&&t===p-1)break;o$1p.pack(A,i,E),E+=3,e$2e(s)&&(o=s[t],r[P++]=e$1X.floatToByte(o.red),r[P++]=e$1X.floatToByte(o.green),r[P++]=e$1X.floatToByte(o.blue),r[P++]=e$1X.floatToByte(o.alpha))}}var L=new a$_;L.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:i}),e$2e(s)&&(L.color=new o$1c({componentDatatype:S$14.UNSIGNED_BYTE,componentsPerAttribute:4,values:r,normalize:!0}));var M=2*((n=i.length/3)-1),R=ce$z.createTypedArray(n,M),O=0;for(t=0;t<n-1;++t)R[O++]=t,R[O++]=t+1;return new I$1p({attributes:L,indices:R,primitiveType:W$18.LINES,boundingSphere:i$1d.fromPoints(a)})},l$K.prototype.destroy=function(){this._coverageArea.length=0,e$2e(this._dictColorTable)&&this._dictColorTable.destroy()},Object.defineProperties(l$K.prototype,{MinVisibleValue:{get:function(){return this._minVisibleValue},set:function(e){this._minVisibleValue=e}},MaxVisibleValue:{get:function(){return this._maxVisibleValue},set:function(e){this._maxVisibleValue=e}},ColorTableMaxKey:{get:function(){return this._ceiling},set:function(e){this._ceiling=e}},ColorTableMinKey:{get:function(){return this._floor},set:function(e){this._floor=e}},ColorTable:{get:function(){return this._dictColorTable},set:function(e){if(e$2e(e)){this._dictColorTable=i$T.clone(e,this._dictColorTable),this._updateColorDictTable=!0;var t=this._dictColorTable.count();if(!(t<1)){new e$1X;var i=0,n=0,r=this._dictColorTable.getItem(0);e$2e(r)&&e$2e(r.altitude)&&(i=parseFloat(r.altitude)),e$2e(r=this._dictColorTable.getItem(t-1))&&e$2e(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n)}}else e$2e(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null)}},Opacity:{get:function(){return this._opacity},set:function(e){this._opacity=e}},CoverageArea:{get:function(){return this._coverageArea},set:function(e){if(this._updatePolygon=!0,this._coverageArea.length=0,e$2e(e))for(var t=0;t<e.length;t++)this._coverageArea[t]=e[t]}},DisplayMode:{get:function(){return this._displayMode},set:function(e){this._displayMode=e}},UpdateColorDictTable:{get:function(){return this._updateColorDictTable},set:function(e){this._updateColorDictTable=e}},UpdatePolygonRegion:{get:function(){return this._updatePolygon},set:function(e){this._updatePolygon=e}}}),l$K.clone=function(e,t){if(e$2e(e)){e$2e(t)||(t=new l$K),t._maxVisibleValue=e._maxVisibleValue,t._minVisibleValue=e._minVisibleValue,t._floor=e._floor,t._ceiling=e._ceiling,t._opacity=e._opacity,t._updateColorDictTable=e._updateColorDictTable,t._updatePolygon=e._updatePolygon,t._displayMode=e._displayMode,t._dictColorTable=i$T.clone(e._dictColorTable,t._dictColorTable),t._coverageArea.length=0;for(var i=0;i<e._coverageArea.length;i++)t._coverageArea[i]=e._coverageArea[i];return t}},n$u.packedLength=b$O.packedLength,n$u.pack=function(e,t,i){return o$1q.typeOf.object("value",e),b$O.pack(e._ellipsoidGeometry,t,i)};var p$E=new b$O,r$F={radius:void 0,radii:new o$1p,vertexFormat:new n$13,stackPartitions:void 0,slicePartitions:void 0};function c$B(e,t,i){this.clock=u$Z(e,0),this.cone=u$Z(t,0),this.magnitude=u$Z(i,1)}function f$J(e){this.url=u$Z(e.url,"")}function r$E(){t$15.throwInstantiationError()}function o$D(e){throw new t$15("This type should not be instantiated directly. Instead, use WebMercatorTilingScheme or GeographicTilingScheme.")}function D$D(e,t){return a$15.compare(e.start,t.start)}function c$A(e){if(this._intervals=[],this._changedEvent=new o$1h,e$2e(e))for(var t=e.length,i=0;i<t;i++)this.addInterval(e[i])}n$u.unpack=function(e,t,i){var n=b$O.unpack(e,t,p$E);return r$F.vertexFormat=n$13.clone(n._vertexFormat,r$F.vertexFormat),r$F.stackPartitions=n._stackPartitions,r$F.slicePartitions=n._slicePartitions,e$2e(i)?(o$1p.clone(n._radii,r$F.radii),i._ellipsoidGeometry=new b$O(r$F),i):(r$F.radius=n._radii.x,new n$u(r$F))},n$u.createGeometry=function(e){return b$O.createGeometry(e._ellipsoidGeometry)},c$B.fromCartesian3=function(e,t){o$1q.typeOf.object("cartesian3",e);var i=e.x,n=e.y,r=e.z,o=i*i+n*n;return e$2e(t)||(t=new c$B),t.clock=Math.atan2(n,i),t.cone=Math.atan2(Math.sqrt(o),r),t.magnitude=Math.sqrt(o+r*r),t},c$B.clone=function(e,t){if(e$2e(e))return e$2e(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new c$B(e.clock,e.cone,e.magnitude)},c$B.normalize=function(e,t){return o$1q.typeOf.object("spherical",e),e$2e(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new c$B(e.clock,e.cone,1)},c$B.equals=function(e,t){return e===t||e$2e(e)&&e$2e(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude},c$B.equalsEpsilon=function(e,t,i){return i=u$Z(i,0),e===t||e$2e(e)&&e$2e(t)&&Math.abs(e.clock-t.clock)<=i&&Math.abs(e.cone-t.cone)<=i&&Math.abs(e.magnitude-t.magnitude)<=i},c$B.prototype.equals=function(e){return c$B.equals(this,e)},c$B.prototype.clone=function(e){return c$B.clone(this,e)},c$B.prototype.equalsEpsilon=function(e,t){return c$B.equalsEpsilon(this,e,t)},c$B.prototype.toString=function(){return"("+this.clock+", "+this.cone+", "+this.magnitude+")"},f$J.checkSptialLicense=function(e){if(!e$2e(e))throw new t$15("url is required");if("string"!=typeof e)throw new t$15("url must be a string");var t=e.lastIndexOf("realspace");if(-1===t)return o$1l.resolve(!1).then((function(){return!1})).otherwise((function(){return!1}));var i=e.substring(0,t);return e=i+"realspace/spatiallicense.xml",e$2e(a$O.CREDENTIAL)&&(e=a$O.addToken(e)),p$$({url:e,responseType:"text"}).then((function(e){return-1!==e.indexOf("<boolean>true</boolean>")})).otherwise((function(e){return!1}))},Object.defineProperties(r$E.prototype,{credits:{get:t$15.throwInstantiationError},waterMask:{get:t$15.throwInstantiationError}}),r$E.prototype.interpolateHeight=t$15.throwInstantiationError,r$E.prototype.isChildAvailable=t$15.throwInstantiationError,r$E.prototype.createMesh=t$15.throwInstantiationError,r$E.prototype.upsample=t$15.throwInstantiationError,r$E.prototype.wasCreatedByUpsampling=t$15.throwInstantiationError,Object.defineProperties(o$D.prototype,{ellipsoid:{get:t$15.throwInstantiationError},rectangle:{get:t$15.throwInstantiationError},projection:{get:t$15.throwInstantiationError}}),o$D.prototype.getNumberOfXTilesAtLevel=t$15.throwInstantiationError,o$D.prototype.getNumberOfYTilesAtLevel=t$15.throwInstantiationError,o$D.prototype.rectangleToNativeRectangle=t$15.throwInstantiationError,o$D.prototype.tileXYToNativeRectangle=t$15.throwInstantiationError,o$D.prototype.tileXYToRectangle=t$15.throwInstantiationError,o$D.prototype.positionToTileXY=t$15.throwInstantiationError,Object.defineProperties(c$A.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){var e=this._intervals;return 0===e.length?void 0:e[0].start}},isStartIncluded:{get:function(){var e=this._intervals;return 0!==e.length&&e[0].isStartIncluded}},stop:{get:function(){var e=this._intervals,t=e.length;return 0===t?void 0:e[t-1].stop}},isStopIncluded:{get:function(){var e=this._intervals,t=e.length;return 0!==t&&e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return 0===this._intervals.length}}}),c$A.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof c$A))return!1;var i=this._intervals,n=e._intervals,r=i.length;if(r!==n.length)return!1;for(var o=0;o<r;o++)if(!d$W.equals(i[o],n[o],t))return!1;return!0},c$A.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return this._intervals[e]},c$A.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))},c$A.prototype.findIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t]:void 0},c$A.prototype.findDataForIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0},c$A.prototype.contains=function(e){return this.indexOf(e)>=0};var q$F=new d$W;c$A.prototype.indexOf=function(e){if(!e$2e(e))throw new t$15("date is required");var t=this._intervals;q$F.start=e,q$F.stop=e;var i=a$17(t,q$F,D$D);return i>=0?t[i].isStartIncluded?i:i>0&&t[i-1].stop.equals(e)&&t[i-1].isStopIncluded?i-1:~i:(i=~i)>0&&i-1<t.length&&d$W.contains(t[i-1],e)?i-1:~i},c$A.prototype.findInterval=function(e){for(var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).start,i=e.stop,n=e.isStartIncluded,r=e.isStopIncluded,o=this._intervals,a=0,s=o.length;a<s;a++){var l=o[a];if((!e$2e(t)||l.start.equals(t))&&(!e$2e(i)||l.stop.equals(i))&&(!e$2e(n)||l.isStartIncluded===n)&&(!e$2e(r)||l.isStopIncluded===r))return o[a]}},c$A.prototype.addInterval=function(e,t){if(!e$2e(e))throw new t$15("interval is required");if(!e.isEmpty){var i=this._intervals;if(0===i.length||a$15.greaterThan(e.start,i[i.length-1].stop))return i.push(e),void this._changedEvent.raiseEvent(this);var n,r=a$17(i,e,D$D);for(r<0?r=~r:r>0&&e.isStartIncluded&&i[r-1].isStartIncluded&&i[r-1].start.equals(e.start)?--r:r<i.length&&!e.isStartIncluded&&i[r].isStartIncluded&&i[r].start.equals(e.start)&&++r,r>0&&(((n=a$15.compare(i[r-1].stop,e.start))>0||0===n&&(i[r-1].isStopIncluded||e.isStartIncluded))&&((e$2e(t)?t(i[r-1].data,e.data):i[r-1].data===e.data)?(e=a$15.greaterThan(e.stop,i[r-1].stop)?new d$W({start:i[r-1].start,stop:e.stop,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):new d$W({start:i[r-1].start,stop:i[r-1].stop,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:i[r-1].isStopIncluded||e.stop.equals(i[r-1].stop)&&e.isStopIncluded,data:e.data}),i.splice(r-1,1),--r):(((n=a$15.compare(i[r-1].stop,e.stop))>0||0===n&&i[r-1].isStopIncluded&&!e.isStopIncluded)&&i.splice(r,0,new d$W({start:e.stop,stop:i[r-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[r-1].isStopIncluded,data:i[r-1].data})),i[r-1]=new d$W({start:i[r-1].start,stop:e.start,isStartIncluded:i[r-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:i[r-1].data}))));r<i.length&&((n=a$15.compare(e.stop,i[r].start))>0||0===n&&(e.isStopIncluded||i[r].isStartIncluded));)if(e$2e(t)?t(i[r].data,e.data):i[r].data===e.data)e=new d$W({start:e.start,stop:a$15.greaterThan(i[r].stop,e.stop)?i[r].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:a$15.greaterThan(i[r].stop,e.stop)?i[r].isStopIncluded:e.isStopIncluded,data:e.data}),i.splice(r,1);else{if(i[r]=new d$W({start:e.stop,stop:i[r].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[r].isStopIncluded,data:i[r].data}),!i[r].isEmpty)break;i.splice(r,1)}i.splice(r,0,e),this._changedEvent.raiseEvent(this)}},c$A.prototype.removeInterval=function(e){if(!e$2e(e))throw new t$15("interval is required");if(e.isEmpty)return!1;var t=this._intervals,i=a$17(t,e,D$D);i<0&&(i=~i);var n=!1;for(i>0&&(a$15.greaterThan(t[i-1].stop,e.start)||t[i-1].stop.equals(e.start)&&t[i-1].isStopIncluded&&e.isStartIncluded)&&(n=!0,(a$15.greaterThan(t[i-1].stop,e.stop)||t[i-1].isStopIncluded&&!e.isStopIncluded&&t[i-1].stop.equals(e.stop))&&t.splice(i,0,new d$W({start:e.stop,stop:t[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i-1].isStopIncluded,data:t[i-1].data})),t[i-1]=new d$W({start:t[i-1].start,stop:e.start,isStartIncluded:t[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[i-1].data})),i<t.length&&!e.isStartIncluded&&t[i].isStartIncluded&&e.start.equals(t[i].start)&&(n=!0,t.splice(i,0,new d$W({start:t[i].start,stop:t[i].start,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data})),++i);i<t.length&&a$15.greaterThan(e.stop,t[i].stop);)n=!0,t.splice(i,1);return i<t.length&&e.stop.equals(t[i].stop)&&(n=!0,!e.isStopIncluded&&t[i].isStopIncluded?i+1<t.length&&t[i+1].start.equals(e.stop)&&t[i].data===t[i+1].data?(t.splice(i,1),t[i]=new d$W({start:t[i].start,stop:t[i].stop,isStartIncluded:!0,isStopIncluded:t[i].isStopIncluded,data:t[i].data})):t[i]=new d$W({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data}):t.splice(i,1)),i<t.length&&(a$15.greaterThan(e.stop,t[i].start)||e.stop.equals(t[i].start)&&e.isStopIncluded&&t[i].isStartIncluded)&&(n=!0,t[i]=new d$W({start:e.stop,stop:t[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i].isStopIncluded,data:t[i].data})),n&&this._changedEvent.raiseEvent(this),n},c$A.prototype.intersect=function(e,t,i){if(!e$2e(e))throw new t$15("other is required.");for(var n=new c$A,r=0,o=0,a=this._intervals,s=e._intervals;r<a.length&&o<s.length;){var l=a[r],u=s[o];if(a$15.lessThan(l.stop,u.start))++r;else if(a$15.lessThan(u.stop,l.start))++o;else{if(e$2e(i)||e$2e(t)&&t(l.data,u.data)||!e$2e(t)&&u.data===l.data){var c=d$W.intersect(l,u,new d$W,i);c.isEmpty||n.addInterval(c,t)}a$15.lessThan(l.stop,u.stop)||l.stop.equals(u.stop)&&!l.isStopIncluded&&u.isStopIncluded?++r:++o}}return n},c$A.fromJulianDateArray=function(e,t){if(!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.julianDates))throw new t$15("options.iso8601Array is required.");e$2e(t)||(t=new c$A);var i,n=e.julianDates,r=n.length,o=e.dataCallback,a=u$Z(e.isStartIncluded,!0),s=u$Z(e.isStopIncluded,!0),l=u$Z(e.leadingInterval,!1),u=u$Z(e.trailingInterval,!1),c=0;l&&(++c,(i=new d$W({start:o$I.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!a})).data=e$2e(o)?o(i,t.length):t.length,t.addInterval(i));for(var h=0;h<r-1;++h){var d=n[h],f=n[h+1];(i=new d$W({start:d,stop:f,isStartIncluded:t.length!==c||a,isStopIncluded:h===r-2&&s})).data=e$2e(o)?o(i,t.length):t.length,t.addInterval(i),d=f}return u&&((i=new d$W({start:n[r-1],stop:o$I.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0})).data=e$2e(o)?o(i,t.length):t.length,t.addInterval(i)),t};var I$N=new d$1r,m$E=[0,31,28,31,30,31,30,31,31,30,31,30,31];function _$y(e,t,i){e$2e(i)||(i=new a$15),a$15.toGregorianDate(e,I$N);var n=I$N.millisecond+t.millisecond,r=I$N.second+t.second,o=I$N.minute+t.minute,a=I$N.hour+t.hour,s=I$N.day+t.day,l=I$N.month+t.month,u=I$N.year+t.year;for(n>=1e3&&(r+=Math.floor(n/1e3),n%=1e3),r>=60&&(o+=Math.floor(r/60),r%=60),o>=60&&(a+=Math.floor(o/60),o%=60),a>=24&&(s+=Math.floor(a/24),a%=24),m$E[2]=i$1c(u)?29:28;s>m$E[l]||l>=13;)s>m$E[l]&&(s-=m$E[l],++l),l>=13&&(--l,u+=Math.floor(l/12),l%=12,++l),m$E[2]=i$1c(u)?29:28;return I$N.millisecond=n,I$N.second=r,I$N.minute=o,I$N.hour=a,I$N.day=s,I$N.month=l,I$N.year=u,a$15.fromGregorianDate(I$N,i)}var k$x=new a$15,N$y=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function A$N(e,t){if(!e$2e(e)||0===e.length)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,"P"===e[0]){var i=e.match(N$y);if(!e$2e(i))return!1;if(e$2e(i[1])&&(t.year=Number(i[1].replace(",","."))),e$2e(i[2])&&(t.month=Number(i[2].replace(",","."))),e$2e(i[3])&&(t.day=7*Number(i[3].replace(",","."))),e$2e(i[4])&&(t.day+=Number(i[4].replace(",","."))),e$2e(i[5])&&(t.hour=Number(i[5].replace(",","."))),e$2e(i[6])&&(t.minute=Number(i[6].replace(",","."))),e$2e(i[7])){var n=Number(i[7].replace(",","."));t.second=Math.floor(n),t.millisecond=n%1*1e3}}else"Z"!==e[e.length-1]&&(e+="Z"),a$15.toGregorianDate(a$15.fromIso8601(e,k$x),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var w$y=new d$1r;function n$t(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=u$Z(e.epoch,o$I.MINIMUM_VALUE),this.tolerance=u$Z(e.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}function p$D(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}function B$z(e,t){this.rectangle=e,this.maxLevel=t}function l$J(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url))throw new t$15("options.url is required.");var t=t$10.createIfNeeded(e.url);this._resource=t,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer(),this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:16777215};var i=e.credit;"string"==typeof i&&(i=new r$U(i)),this._credit=i,this._tilingScheme=void 0,this._rectangles=[];var n,r=this,o=u$Z(e.ellipsoid,t$12.WGS84);function a(e){var t=e.getElementsByTagName("SRS")[0].textContent;if("EPSG:4326"===t){r._tilingScheme=new g$15({ellipsoid:o});var i=e.getElementsByTagName("TileFormat")[0];r._heightmapWidth=parseInt(i.getAttribute("width"),10),r._heightmapHeight=parseInt(i.getAttribute("height"),10),r._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(o,Math.min(r._heightmapWidth,r._heightmapHeight),r._tilingScheme.getNumberOfXTilesAtLevel(0));for(var n=e.getElementsByTagName("DataExtent"),a=0;a<n.length;++a){var l=n[a],u=e$2d.toRadians(parseFloat(l.getAttribute("minx"))),c=e$2d.toRadians(parseFloat(l.getAttribute("miny"))),h=e$2d.toRadians(parseFloat(l.getAttribute("maxx"))),d=e$2d.toRadians(parseFloat(l.getAttribute("maxy"))),f=parseInt(l.getAttribute("maxlevel"),10);r._rectangles.push(new B$z(new h$18(u,c,h,d),f))}r._ready=!0,r._readyPromise.resolve(!0)}else s("SRS "+t+" is not supported.")}function s(e){var t=u$Z(e,"An error occurred while accessing "+r._resource.url+".");n=l$V.handleError(n,r,r._errorEvent,t,void 0,void 0,void 0,l)}function l(){o$1l(r._resource.fetchXML(),a,s)}l()}c$A.fromIso8601=function(e,t){if(!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.iso8601))throw new t$15("options.iso8601 is required.");var i=e.iso8601.split("/"),n=a$15.fromIso8601(i[0]),r=a$15.fromIso8601(i[1]),o=[];if(A$N(i[2],w$y)){var a=a$15.clone(n);for(o.push(a);a$15.compare(a,r)<0;){a=_$y(a,w$y),a$15.compare(r,a)<=0&&a$15.clone(r,a),o.push(a)}}else o.push(n,r);return c$A.fromJulianDateArray({julianDates:o,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},c$A.fromIso8601DateArray=function(e,t){if(!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.iso8601Dates))throw new t$15("options.iso8601Dates is required.");return c$A.fromJulianDateArray({julianDates:e.iso8601Dates.map((function(e){return a$15.fromIso8601(e)})),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},c$A.fromIso8601DurationArray=function(e,t){if(!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.epoch))throw new t$15("options.epoch is required.");if(!e$2e(e.iso8601Durations))throw new t$15("options.iso8601Durations is required.");for(var i,n,r=e.epoch,o=e.iso8601Durations,a=u$Z(e.relativeToPrevious,!1),s=[],l=o.length,u=0;u<l;++u)(A$N(o[u],w$y)||0===u)&&(i=a&&e$2e(n)?_$y(n,w$y):_$y(r,w$y),s.push(i),n=i);return c$A.fromJulianDateArray({julianDates:s,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},Object.defineProperties(n$t.prototype,{clock:{get:function(){return this._clock},set:function(e){var t=this._clock;t!==e&&(e$2e(t)&&(this._clockSubscription(),this._clockSubscription=void 0),e$2e(e)&&(this._clockSubscription=e.onTick.addEventListener(n$t.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){var t=this._element;t!==e&&(e$2e(t)&&t.removeEventListener("seeked",this._seekFunction,!1),e$2e(e)&&(this._seeking=!1,this._seekFunction=p$D(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}}),n$t.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,i$11(this)},n$t.prototype.isDestroyed=function(){return!1},n$t.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate!==e.multiplier){var t=this._element;try{t.playbackRate=e.multiplier}catch{t.playbackRate=0}this._lastPlaybackRate=e.multiplier}},n$t.prototype._onTick=function(e){var t=this._element;if(e$2e(t)&&!(t.readyState<2)){var i=t.paused,n=e.shouldAnimate;if(n===i&&(n?t.play():t.pause()),this._seeking||this._firstTickAfterSeek)return void(this._firstTickAfterSeek=!1);this._trySetPlaybackRate(e);var r,o=e.currentTime,a=u$Z(this.epoch,o$I.MINIMUM_VALUE),s=a$15.secondsDifference(o,a),l=t.duration,u=t.currentTime;t.loop?((s%=l)<0&&(s=l-s),r=s):r=s>l?l:s<0?0:s;var c=n?u$Z(this.tolerance,1):.001;Math.abs(r-u)>c&&(this._seeking=!0,t.currentTime=r)}},Object.defineProperties(l$J.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$15("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),l$J.prototype.requestTileGeometry=function(e,t,i,n){if(!this.ready)throw new t$15("requestTileGeometry must not be called before ready returns true.");var r=this._tilingScheme.getNumberOfYTilesAtLevel(i),o=this._resource.getDerivedResource({url:i+"/"+e+"/"+(r-t-1)+".tif",queryParameters:{supermap3d:!0},request:n}).fetchImage({preferImageBitmap:!0});if(e$2e(o)){var a=this;return o$1l(o).then((function(n){return new T$L({buffer:d$14(n),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:W$F(a,e,t,i),structure:a._terrainDataStructure})}))}},l$J.prototype.getLevelMaximumGeometricError=function(e){if(!this.ready)throw new t$15("requestTileGeometry must not be called before ready returns true.");return this._levelZeroMaximumGeometricError/(1<<e)};var S$z=new h$18;function W$F(e,t,i,n){for(var r=e._tilingScheme,o=e._rectangles,a=r.tileXYToRectangle(t,i,n),s=0,l=0;l<o.length&&15!==s;++l){var u=o[l];if(!(u.maxLevel<=n)){var c=u.rectangle;e$2e(h$18.intersection(c,a,S$z))&&(y$z(r,c,2*t,2*i,n+1)&&(s|=4),y$z(r,c,2*t+1,2*i,n+1)&&(s|=8),y$z(r,c,2*t,2*i+1,n+1)&&(s|=1),y$z(r,c,2*t+1,2*i+1,n+1)&&(s|=2))}}return s}function y$z(e,t,i,n,r){var o=e.tileXYToRectangle(i,n,r);return e$2e(h$18.intersection(o,t,S$z))}l$J.prototype.getTileDataAvailable=function(e,t,i){},l$J.prototype.loadTileDataAvailability=function(e,t,i){};var _$x={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},VulkanConstants=Object.freeze(_$x),D$C={};function x$J(e,t){return e$2d.equalsEpsilon(e.latitude,t.latitude,e$2d.EPSILON10)&&e$2d.equalsEpsilon(e.longitude,t.longitude,e$2d.EPSILON10)}var M$E=new a$18,R$x=new a$18;function U$C(e,t,i,n){var r=(t=D$13(t,o$1p.equalsEpsilon)).length;if(!(r<2)){var o=e$2e(n),a=e$2e(i),s=!0,l=new Array(r),u=new Array(r),c=new Array(r),h=t[0];l[0]=h;var d=e.cartesianToCartographic(h,M$E);a&&(d.height=i[0]),s=s&&0==d.height,u[0]=d.height,c[0]=o?n[0]:0;for(var f=1,p=1;p<r;++p){var _=t[p],m=e.cartesianToCartographic(_,R$x);a&&(m.height=i[p]),s=s&&0==m.height,x$J(d,m)?d.height<m.height&&(u[f-1]=m.height):(l[f]=_,u[f]=m.height,c[f]=o?n[p]:0,a$18.clone(m,d),++f)}if(!(s||f<2))return l.length=f,u.length=f,c.length=f,{positions:l,topHeights:u,bottomHeights:c}}}var z$A=new Array(2),G$G=new Array(2),W$E={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};function O$v(e,t){for(var i=new Array(e.length),n=0;n<e.length;n+=3){var r=new o$1p(e[n],e[n+1],e[n+2]);p$1d.multiplyByPoint(t,r,r),i[n]=r.x,i[n+1]=r.y,i[n+2]=r.z}return i}D$C.computePositions=function(e,t,i,n,r,o,a){var s=U$C(e,t,i,n);if(e$2e(s)){var l=m$19.eastNorthUpToFixedFrame(s.positions[0],e,new p$1d),u=p$1d.inverse(l,new p$1d);t=s.positions,i=s.topHeights,n=s.bottomHeights;var c,h,d,f,p=t.length,_=p-2,m=e$2d.chordLength(r,e.maximumRadius),g=W$E;if(g.minDistance=m,g.ellipsoid=e,o){var x,y=0;for(x=0;x<p-1;x++)y+=m$X.numberOfPoints(t[x],t[x+1],m)+1;c=new Float64Array(3*y),h=new Float64Array(3*y),e$2e(a)&&(d=new Float64Array(3*y),f=new Float64Array(3*y));var v=z$A,$=G$G;g.positions=v,g.height=$;var b=0;for(x=0;x<p-1;x++){v[0]=t[x],v[1]=t[x+1],$[0]=i[x],$[1]=i[x+1];var T=m$X.generateArc(g);c.set(T,b),e$2e(a)&&d.set(O$v(T,u),b),$[0]=n[x],$[1]=n[x+1],h.set(m$X.generateArc(g),b),e$2e(a)&&f.set(O$v(m$X.generateArc(g),u),b),b+=T.length}}else g.positions=t,g.height=i,c=new Float64Array(m$X.generateArc(g)),e$2e(a)&&(d=new Float64Array(O$v(m$X.generateArc(g)))),g.height=n,h=new Float64Array(m$X.generateArc(g)),e$2e(a)&&(f=new Float64Array(O$v(m$X.generateArc(g))));var C={pos:{bottomPositions:h,topPositions:c,numCorners:_}};return e$2e(a)&&(C.localPos={bottomPositions:f,topPositions:d,numCorners:_}),C}};var $$A=new o$1p,U$B=new o$1p,re$u=new o$1p,ye$f=new o$1p,ne$r=new o$1p,be$k=new o$1p,Fe$f=new o$1p,Ce$d=new o$1p;function E$G(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,i=e.maximumHeights,n=e.minimumHeights;if(!e$2e(t))throw new t$15("options.positions is required.");if(e$2e(i)&&i.length!==t.length)throw new t$15("options.positions and options.maximumHeights must have the same length.");if(e$2e(n)&&n.length!==t.length)throw new t$15("options.positions and options.minimumHeights must have the same length.");var r=u$Z(e.vertexFormat,n$13.DEFAULT),o=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),a=u$Z(e.ellipsoid,t$12.WGS84);this._positions=t,this._minimumHeights=n,this._maximumHeights=i,this._vertexFormat=n$13.clone(r),this._granularity=o,this._ellipsoid=t$12.clone(a),this._enuCenter=e.enuCenter,this._workerName="createWallGeometry";var s=1+t.length*o$1p.packedLength+2;e$2e(n)&&(s+=n.length),e$2e(i)&&(s+=i.length),this.packedLength=s+t$12.packedLength+n$13.packedLength+1,this.packedLength+=o$1p.packedLength}E$G.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");i=u$Z(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._minimumHeights;if(o=e$2e(a)?a.length:0,t[i++]=o,e$2e(a))for(n=0;n<o;++n)t[i++]=a[n];var s=e._maximumHeights;if(o=e$2e(s)?s.length:0,t[i++]=o,e$2e(s))for(n=0;n<o;++n)t[i++]=s[n];return t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,n$13.pack(e._vertexFormat,t,i),i+=n$13.packedLength,t[i++]=e._granularity,e$2e(e._enuCenter)?o$1p.pack(e._enuCenter,t,i):o$1p.pack(o$1p.ZERO,t,i),t};var ae$m=t$12.clone(t$12.UNIT_SPHERE),oe$k=new n$13,N$x={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:ae$m,vertexFormat:oe$k,granularity:void 0,enuCenter:void 0};E$G.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n,r,o,a=e[t++],s=new Array(a);for(n=0;n<a;++n,t+=o$1p.packedLength)s[n]=o$1p.unpack(e,t);if((a=e[t++])>0)for(r=new Array(a),n=0;n<a;++n)r[n]=e[t++];if((a=e[t++])>0)for(o=new Array(a),n=0;n<a;++n)o[n]=e[t++];var l=t$12.unpack(e,t,ae$m);t+=t$12.packedLength;var u=n$13.unpack(e,t,oe$k);t+=n$13.packedLength;var c=e[t++],h=o$1p.unpack(e,t);return o$1p.equals(h,o$1p.ZERO)&&(h=void 0),e$2e(i)?(i._positions=s,i._minimumHeights=r,i._maximumHeights=o,i._ellipsoid=t$12.clone(l,i._ellipsoid),i._vertexFormat=n$13.clone(u,i._vertexFormat),i._granularity=c,i._enuCenter=h,i):(N$x.positions=s,N$x.minimumHeights=r,N$x.maximumHeights=o,N$x.granularity=c,N$x.enuCenter=h,new E$G(N$x))},E$G.fromConstantHeights=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions;if(!e$2e(t))throw new t$15("options.positions is required.");var i,n,r=e.minimumHeight,o=e.maximumHeight,a=e$2e(r),s=e$2e(o);if(a||s){var l=t.length;i=a?new Array(l):void 0,n=s?new Array(l):void 0;for(var u=0;u<l;++u)a&&(i[u]=r),s&&(n[u]=o)}return new E$G({positions:t,maximumHeights:n,minimumHeights:i,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat})},E$G.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,n=e._maximumHeights,r=e._vertexFormat,o=e._granularity,a=e._ellipsoid,s=e._enuCenter,l=D$C.computePositions(a,t,n,i,o,!0,s);if(e$2e(l.pos)){var u;e$2e(s)&&(u=m$19.eastNorthUpToFixedFrame(s));var c,h=l.pos.bottomPositions,d=l.pos.topPositions,f=l.pos.numCorners,p=d.length,_=2*p,m=r.position?new Float64Array(_):void 0,g=r.normal?new Float32Array(_):void 0,x=r.tangent?new Float32Array(_):void 0,y=r.bitangent?new Float32Array(_):void 0,v=r.st?new Float32Array(_/3*2):void 0,$=0,b=0,T=0,C=0,S=0,w=Ce$d,E=Fe$f,P=be$k,A=!0,L=0,M=1/((p/=3)-t.length+1);for(c=0;c<p;++c){var R=3*c,O=o$1p.fromArray(d,R,$$A),D=o$1p.fromArray(h,R,U$B);if(r.position&&(m[$++]=D.x,m[$++]=D.y,m[$++]=D.z,m[$++]=O.x,m[$++]=O.y,m[$++]=O.z),r.st&&(v[S++]=L,v[S++]=0,v[S++]=L,v[S++]=1),r.normal||r.tangent||r.bitangent){var I,B=o$1p.clone(o$1p.ZERO,ne$r),F=a.scaleToGeodeticSurface(o$1p.fromArray(d,R,U$B),U$B);if(c+1<p&&(I=a.scaleToGeodeticSurface(o$1p.fromArray(d,R+3,re$u),re$u),B=o$1p.fromArray(d,R+3,ne$r)),A){var N=o$1p.subtract(B,O,ye$f),G=o$1p.subtract(F,O,$$A);w=o$1p.normalize(o$1p.cross(G,N,w),w),A=!1}o$1p.equalsEpsilon(I,F,e$2d.EPSILON10)?A=!0:(L+=M,r.tangent&&(E=o$1p.normalize(o$1p.subtract(I,F,E),E)),r.bitangent&&(P=o$1p.normalize(o$1p.cross(w,E,P),P))),r.normal&&(e$2e(s)&&(p$1d.multiplyByPoint(u,w,w),o$1p.normalize(w,w)),g[b++]=w.x,g[b++]=w.y,g[b++]=w.z,g[b++]=w.x,g[b++]=w.y,g[b++]=w.z),r.tangent&&(x[C++]=E.x,x[C++]=E.y,x[C++]=E.z,x[C++]=E.x,x[C++]=E.y,x[C++]=E.z),r.bitangent&&(y[T++]=P.x,y[T++]=P.y,y[T++]=P.z,y[T++]=P.x,y[T++]=P.y,y[T++]=P.z)}}var z=new a$_;r.position&&(z.position=new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:m})),r.normal&&(z.normal=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:g})),r.tangent&&(z.tangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:x})),r.bitangent&&(z.bitangent=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:y})),r.st&&(z.st=new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:v}));var U=_/3;_-=6*(f+1);var V=ce$z.createTypedArray(U,_),k=0;for(c=0;c<U-2;c+=2){var W=c,H=c+2,q=o$1p.fromArray(m,3*W,$$A),j=o$1p.fromArray(m,3*H,U$B);if(!o$1p.equalsEpsilon(q,j,e$2d.EPSILON10)){var X=c+1,Y=c+3;V[k++]=X,V[k++]=W,V[k++]=Y,V[k++]=Y,V[k++]=W,V[k++]=H}}var Z=new I$1p({attributes:z,indices:V,primitiveType:W$18.TRIANGLES,boundingSphere:new i$1d.fromVertices(m)});return e$2e(e._enuCenter)&&(Z.attributes.position.values.set(l.localPos.topPositions,0),Z.attributes.position.values.set(l.localPos.bottomPositions,Z.attributes.position.values.length/2),Z.attributes.position.componentDatatype=S$14.FLOAT),Z}};var S$y=new o$1p,q$E=new o$1p;function w$x(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions,i=e.maximumHeights,n=e.minimumHeights;if(!e$2e(t))throw new t$15("options.positions is required.");if(e$2e(i)&&i.length!==t.length)throw new t$15("options.positions and options.maximumHeights must have the same length.");if(e$2e(n)&&n.length!==t.length)throw new t$15("options.positions and options.minimumHeights must have the same length.");var r=u$Z(e.granularity,e$2d.RADIANS_PER_DEGREE),o=u$Z(e.ellipsoid,t$12.WGS84);this._positions=t,this._minimumHeights=n,this._maximumHeights=i,this._granularity=r,this._ellipsoid=t$12.clone(o),this._workerName="createWallOutlineGeometry";var a=1+t.length*o$1p.packedLength+2;e$2e(n)&&(a+=n.length),e$2e(i)&&(a+=i.length),this.packedLength=a+t$12.packedLength+1}w$x.pack=function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");i=u$Z(i,0);var n,r=e._positions,o=r.length;for(t[i++]=o,n=0;n<o;++n,i+=o$1p.packedLength)o$1p.pack(r[n],t,i);var a=e._minimumHeights;if(o=e$2e(a)?a.length:0,t[i++]=o,e$2e(a))for(n=0;n<o;++n)t[i++]=a[n];var s=e._maximumHeights;if(o=e$2e(s)?s.length:0,t[i++]=o,e$2e(s))for(n=0;n<o;++n)t[i++]=s[n];return t$12.pack(e._ellipsoid,t,i),t[i+=t$12.packedLength]=e._granularity,t};var G$F=t$12.clone(t$12.UNIT_SPHERE),A$M={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:G$F,granularity:void 0};function t$w(e){switch(e){case de$y.FLOAT:return"float";case de$y.FLOAT_VEC2:return"vec2";case de$y.FLOAT_VEC3:return"vec3";case de$y.FLOAT_VEC4:return"vec4";case de$y.FLOAT_MAT2:return"mat2";case de$y.FLOAT_MAT3:return"mat3";case de$y.FLOAT_MAT4:return"mat4";case de$y.SAMPLER_2D:return"sampler2D";case de$y.BOOL:return"bool"}}w$x.unpack=function(e,t,i){if(!e$2e(e))throw new t$15("array is required");t=u$Z(t,0);var n,r,o,a=e[t++],s=new Array(a);for(n=0;n<a;++n,t+=o$1p.packedLength)s[n]=o$1p.unpack(e,t);if((a=e[t++])>0)for(r=new Array(a),n=0;n<a;++n)r[n]=e[t++];if((a=e[t++])>0)for(o=new Array(a),n=0;n<a;++n)o[n]=e[t++];var l=t$12.unpack(e,t,G$F),u=e[t+=t$12.packedLength];return e$2e(i)?(i._positions=s,i._minimumHeights=r,i._maximumHeights=o,i._ellipsoid=t$12.clone(l,i._ellipsoid),i._granularity=u,i):(A$M.positions=s,A$M.minimumHeights=r,A$M.maximumHeights=o,A$M.granularity=u,new w$x(A$M))},w$x.fromConstantHeights=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).positions;if(!e$2e(t))throw new t$15("options.positions is required.");var i,n,r=e.minimumHeight,o=e.maximumHeight,a=e$2e(r),s=e$2e(o);if(a||s){var l=t.length;i=a?new Array(l):void 0,n=s?new Array(l):void 0;for(var u=0;u<l;++u)a&&(i[u]=r),s&&(n[u]=o)}return new w$x({positions:t,maximumHeights:n,minimumHeights:i,ellipsoid:e.ellipsoid})},w$x.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,n=e._maximumHeights,r=e._granularity,o=e._ellipsoid,a=D$C.computePositions(o,t,n,i,r,!1);if(e$2e(a)){var s,l=a.pos.bottomPositions,u=a.pos.topPositions,c=u.length,h=2*c,d=new Float64Array(h),f=0;for(c/=3,s=0;s<c;++s){var p=3*s,_=o$1p.fromArray(u,p,S$y),m=o$1p.fromArray(l,p,q$E);d[f++]=m.x,d[f++]=m.y,d[f++]=m.z,d[f++]=_.x,d[f++]=_.y,d[f++]=_.z}var g=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:d})}),x=h/3;h=2*x-4+x;var y=ce$z.createTypedArray(x,h),v=0;for(s=0;s<x-2;s+=2){var $=s,b=s+2,T=o$1p.fromArray(d,3*$,S$y),C=o$1p.fromArray(d,3*b,q$E);if(!o$1p.equalsEpsilon(T,C,e$2d.EPSILON10)){var S=s+1,w=s+3;y[v++]=S,y[v++]=$,y[v++]=S,y[v++]=w,y[v++]=$,y[v++]=b}}return y[v++]=x-2,y[v++]=x-1,new I$1p({attributes:g,indices:y,primitiveType:W$18.LINES,boundingSphere:new i$1d.fromVertices(d)})}};var u$C={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3};function l$I(e,t,i){this._url=e,this._maximumActiveTasks=u$Z(i.maximumActiveTasks,100),this._activeTasks=0,this._deferreds={},this._nextID=0,this._event=t,this._enableHeartCheck=u$Z(i.enableHeartCheck,!1),this._heartTimeOut=u$Z(i.heartTimeOut,1e4),this._createWS(t)}function x$I(e,t){if(t instanceof ArrayBuffer){--e._activeTasks;var i=new DataView(t).getInt32(0,!0);if(!e$2e(i))return;var n=e._deferreds,r=n[i];if(e$2e(r)){if("blob"===r.binaryType)4===t.byteLength?r.reject(404):r.resolve(new Blob([t.slice(4,t.byteLength)]));else if("arraybuffer"===r.binaryType)if(4===t.byteLength)r.reject(404);else{var o=t.slice(4,t.byteLength);r.extratiles?r.progress(o):r.resolve(o)}else{t=t.slice(4,t.byteLength);var a=a$K(new Uint8Array(t));if("json"===r.binaryType){var s=JSON.parse(a);r.resolve(s)}else r.resolve(a)}!0!==r.extratiles&&delete n[i]}}}function m$D(e,t,i,n){var r;return-1!==t.indexOf("extratiles=")?(n.extratiles=!0,r={id:e,binaryType:u$Z(i,"blob"),tileName:t.substring(0,t.indexOf("?")),extraTiles:t.substring(t.indexOf("extratiles=")+11)}):(n.extratiles=!1,r={id:e,binaryType:u$Z(i,"blob"),tileName:t}),JSON.stringify(r)}function r$D(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).weights,i=e.times;if(o$1q.defined("weights",t),o$1q.defined("times",i),o$1q.typeOf.number.greaterThanOrEquals("weights.length",t.length,3),t.length%i.length!=0)throw new t$15("times.length must be a factor of weights.length.");this._times=i,this._weights=t,this._count=t.length/i.length,this._lastTimeIndex=0}function e$P(e,t,i){if("function"!=typeof t)throw new t$15("oldFunction is required to be a function.");if("function"!=typeof i)throw new t$15("oldFunction is required to be a function.");return function(){i.apply(e,arguments),t.apply(e,arguments)}}l$I.prototype.scheduleTask=function(e,t){var i=this;if(!this.isOpened()){var n=o$1l.defer();return this._event.addEventListener((function(r){if(r===u$C.OPEN){++i._activeTasks;var o=i,a=o._nextID++;o._deferreds[a]=n,n.binaryType=t;var s=m$D(a,e,t,n);o._ws.send(s)}})),n.promise}if(!(this._activeTasks>=this._maximumActiveTasks)){++this._activeTasks;var r=this,o=r._nextID++;n=o$1l.defer();r._deferreds[o]=n,n.binaryType=t;var a=m$D(o,e,t,n);return r._ws.send(a),n.promise}},l$I.prototype._createWS=function(e){this._ws=new WebSocket(this._url),this._ws.binaryType="arraybuffer";var t=this;this._ws.onopen=function(){e.raiseEvent(u$C.OPEN)},this._ws.onclose=function(){e.raiseEvent(u$C.CLOSED)},this._ws.onerror=function(){error=new t$13("open failure"),e.raiseEvent(error)},this._ws.onmessage=function(e){x$I(t,e.data)}},l$I.prototype.isOpened=function(){return this._ws&&this._ws.readyState===u$C.OPEN},l$I.prototype.close=function(){this._ws.close()},Object.defineProperties(r$D.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}}),r$D.prototype.findTimeInterval=n$H.prototype.findTimeInterval,r$D.prototype.wrapTime=n$H.prototype.wrapTime,r$D.prototype.clampTime=n$H.prototype.clampTime,r$D.prototype.evaluate=function(e,t){var i=this.weights,n=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[r])/(n[r+1]-n[r]);e$2e(t)||(t=new Array(this._count));for(var a=0;a<this._count;a++){var s=r*this._count+a;t[a]=i[s]*(1-o)+i[s+this._count]*o}return t};var e$O={DONE:0,PENDING:1,FAILED:2},R$w=Object.freeze(e$O),U$A=e$1X.WHITE,z$z=o$1p.ZERO,A$L=k$R.NONE,I$M=o$1o.ZERO,P$z=1,q$D=0,H$G=o$1p.ZERO,T$E=j$V.CENTER,L$K=S$Q.CENTER,M$D=!1,Z$A=new o$1p,F$F=new e$1X,j$A=new o$1p,W$D=new o$1o,k$w=new o$Y,J$y=new o$Y,K$z=new o$Y,Q$A=new f$1a,X$x=new r$Z;function C$E(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function g$J(e,t){if(!e$2e(e))throw new t$15("entityCluster is required.");if(!e$2e(t))throw new t$15("entityCollection is required.");t.collectionChanged.addEventListener(g$J.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1Q,this._onCollectionChanged(t,t.values,[],[])}function p$C(e,t,i){e$2e(e)&&(e.billboard=void 0,i.removeBillboard(t))}g$J.prototype.update=function(e){if(!e$2e(e))throw new t$15("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a,s=t[n],l=s.entity,u=l._billboard,c=s.billboard,h=l.isShowing&&l.isAvailable(e)&&r$_.getValueOrDefault(u._show,e,!0);if(h&&(a=r$_.getValueOrUndefined(l._position,e,Z$A),o=r$_.getValueOrUndefined(u._image,e),h=e$2e(a)&&e$2e(o)),h){r$_.isConstant(l._position)||(i._clusterDirty=!0),e$2e(c)||((c=i.getBillboard(l)).id=l,c.image=void 0,s.billboard=c),c.show=h,(!e$2e(c.image)||s.textureValue!==o)&&(c.image=o,s.textureValue=o),c.position=a,c.color=r$_.getValueOrDefault(u._color,e,U$A,F$F),c.eyeOffset=r$_.getValueOrDefault(u._eyeOffset,e,z$z,j$A),c.heightReference=r$_.getValueOrDefault(u._heightReference,e,A$L),c.pixelOffset=r$_.getValueOrDefault(u._pixelOffset,e,I$M,W$D),c.scale=r$_.getValueOrDefault(u._scale,e,P$z),c.rotation=r$_.getValueOrDefault(u._rotation,e,q$D),c.alignedAxis=r$_.getValueOrDefault(u._alignedAxis,e,H$G),c.horizontalOrigin=r$_.getValueOrDefault(u._horizontalOrigin,e,T$E),c.verticalOrigin=r$_.getValueOrDefault(u._verticalOrigin,e,L$K),c.width=r$_.getValueOrUndefined(u._width,e),c.height=r$_.getValueOrUndefined(u._height,e),c.scaleByDistance=r$_.getValueOrUndefined(u._scaleByDistance,e,k$w),c.translucencyByDistance=r$_.getValueOrUndefined(u._translucencyByDistance,e,J$y),c.pixelOffsetScaleByDistance=r$_.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,K$z),c.sizeInMeters=r$_.getValueOrDefault(u._sizeInMeters,e,M$D),c.distanceDisplayCondition=r$_.getValueOrUndefined(u._distanceDisplayCondition,e,X$x),c.disableDepthTestDistance=r$_.getValueOrUndefined(u._disableDepthTestDistance,e);var d=r$_.getValueOrUndefined(u._imageSubRegion,e,Q$A);e$2e(d)&&c.setImageSubRegion(c._imageId,d)}else p$C(s,l,i)}return!0},g$J.prototype.getBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("entity is required.");if(!e$2e(t))throw new t$15("result is required.");var i=this._items.get(e.id);if(!e$2e(i)||!e$2e(i.billboard))return R$w.FAILED;var n=i.billboard;if(n.heightReference===k$R.NONE)t.center=o$1p.clone(n.position,t.center);else{if(!e$2e(n._clampedPosition))return R$w.PENDING;t.center=o$1p.clone(n._clampedPosition,t.center)}return t.radius=0,R$w.DONE},g$J.prototype.isDestroyed=function(){return!1},g$J.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(g$J.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return i$11(this)},g$J.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)e$2e((o=t[r])._billboard)&&e$2e(o._position)&&a.set(o.id,new C$E(o));for(r=n.length-1;r>-1;r--)e$2e((o=n[r])._billboard)&&e$2e(o._position)?a.contains(o.id)||a.set(o.id,new C$E(o)):(p$C(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],p$C(a.get(o.id),o,s),a.remove(o.id)};var f$I="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nmat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = tangentToEyeMatrix;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nmaterialInput.st = v_st;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",d$Q="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec3 tangent;\nattribute vec3 bitangent;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_tangentEC = czm_normal * tangent;\nv_bitangentEC = czm_normal * bitangent;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",i$H="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",l$H="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",m$C="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nmaterialInput.st = v_st;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",h$F="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",_$w="attribute vec3 position;\nattribute vec3 normal;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = vec4(position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\nv_normalEC = czm_normal * normal;\ngl_Position = czm_modelViewProjection * p;\n}\n",g$I="attribute vec3 position;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = vec4(position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\nv_normalEC = czm_normal * normal;\nv_st = st;\ngl_Position = czm_modelViewProjection * p;\n}\n";function t$v(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.translucent,!0),i=u$Z(e.closed,!1),n=u$Z(e.materialSupport,t$v.MaterialSupport.TEXTURED);this.material=e$2e(e.material)?e.material:r$Y.fromType(r$Y.ColorType),this.translucent=t,this._vertexShaderSource=u$Z(e.vertexShaderSource,n.vertexShaderSource),this._fragmentShaderSource=u$Z(e.fragmentShaderSource,n.fragmentShaderSource),this._renderState=a$S.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._materialSupport=n,this._vertexFormat=n.vertexFormat,this._flat=u$Z(e.flat,!1),this._faceForward=u$Z(e.faceForward,!i)}function r$C(){t$15.throwInstantiationError()}function a$C(e,t,i){o$1q.defined("geometryUpdater",e),o$1q.defined("primitives",t),o$1q.defined("orderedGroundPrimitives",i),this._primitives=t,this._orderedGroundPrimitives=i,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}Object.defineProperties(t$v.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),t$v.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,t$v.prototype.isTranslucent=a$S.prototype.isTranslucent,t$v.prototype.getRenderState=a$S.prototype.getRenderState,t$v.MaterialSupport={BASIC:Object.freeze({vertexFormat:n$13.POSITION_AND_NORMAL,vertexShaderSource:l$H,fragmentShaderSource:i$H}),BASICMODEL:Object.freeze({vertexFormat:n$13.POSITION_AND_NORMAL,vertexShaderSource:_$w,fragmentShaderSource:i$H}),TEXTURED:Object.freeze({vertexFormat:n$13.POSITION_NORMAL_AND_ST,vertexShaderSource:h$F,fragmentShaderSource:m$C}),TEXTUREDMODEL:Object.freeze({vertexFormat:n$13.POSITION_NORMAL_AND_ST,vertexShaderSource:g$I,fragmentShaderSource:m$C}),ALL:Object.freeze({vertexFormat:n$13.ALL,vertexShaderSource:d$Q,fragmentShaderSource:f$I})},Object.defineProperties(r$C.prototype,{isConstant:{get:t$15.throwInstantiationError},definitionChanged:{get:t$15.throwInstantiationError}}),r$C.prototype.getType=t$15.throwInstantiationError,r$C.prototype.getValue=t$15.throwInstantiationError,r$C.prototype.equals=t$15.throwInstantiationError,r$C.getValue=function(e,t,i){var n;return e$2e(t)&&e$2e(n=t.getType(e))?((!e$2e(i)||i.type!==n)&&(i=r$Y.fromType(n)),t.getValue(e,i.uniforms),i):((!e$2e(i)||i.type!==r$Y.ColorType)&&(i=r$Y.fromType(r$Y.ColorType)),e$1X.clone(e$1X.WHITE,i.uniforms.color),i)},a$C.prototype._isHidden=function(e,t,i){return!e.isShowing||!e.isAvailable(i)||!r$_.getValueOrDefault(t.show,i,!0)},a$C.prototype._setOptions=t$15.throwInstantiationError,a$C.prototype.update=function(e){o$1q.defined("time",e);var t=this._geometryUpdater,i=t._onTerrain,n=this._primitives,r=this._orderedGroundPrimitives;r.remove(this._primitive),n.removeAndDestroy(this._primitive),n.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0,this._primitive=void 0;var o=this._entity,a=o[this._geometryUpdater._geometryPropertyName];if(this._setOptions(o,a,e),!this._isHidden(o,a,e)){var s=this._geometryUpdater.shadowsProperty.getValue(e),l=this._options;if(!e$2e(a.fill)||a.fill.getValue(e)){var u,c=t.fillMaterialProperty,h=c instanceof t$P,d=t._getIsClosed(l);if(h)u=new t$Q({closed:d,flat:i&&!t._supportsMaterialsforEntitiesOnTerrain});else{var f=r$C.getValue(e,c,this._material);this._material=f,u=new t$v({material:f,translucent:f.isTranslucent(),closed:d})}if(i)l.vertexFormat=t$Q.VERTEX_FORMAT,this._primitive=r.add(new d$15({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:u,asynchronous:!1,shadows:s,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),r$_.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{l.vertexFormat=u.vertexFormat;var p=this._geometryUpdater.createFillGeometryInstance(e);h&&(u.translucent=255!==p.attributes.color.value[3]),this._primitive=n.add(new y$R({geometryInstances:p,appearance:u,asynchronous:!1,shadows:s}))}}if(!i&&e$2e(a.outline)&&a.outline.getValue(e)){var _=this._geometryUpdater.createOutlineGeometryInstance(e),m=r$_.getValueOrDefault(a.outlineWidth,e,1);this._outlinePrimitive=n.add(new y$R({geometryInstances:_,appearance:new t$Q({flat:!0,translucent:255!==_.attributes.color.value[3],renderState:{lineWidth:t._scene.clampLineWidth(m)}}),asynchronous:!1,shadows:s}))}}},a$C.prototype.getBoundingSphere=function(e){if(!e$2e(e))throw new t$15("result is required.");var t,i=this._entity,n=this._primitive,r=this._outlinePrimitive;return e$2e(n)&&n.show&&n.ready&&(e$2e(t=n.getGeometryInstanceAttributes(i))&&e$2e(t.boundingSphere))||e$2e(r)&&r.show&&r.ready&&(e$2e(t=r.getGeometryInstanceAttributes(i))&&e$2e(t.boundingSphere))?(i$1d.clone(t.boundingSphere,e),R$w.DONE):e$2e(n)&&!n.ready||e$2e(r)&&!r.ready?R$w.PENDING:R$w.FAILED},a$C.prototype.isDestroyed=function(){return!1},a$C.prototype.destroy=function(){var e=this._primitives;this._orderedGroundPrimitives.remove(this._primitive),e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),i$11(this)};var M$C=new t$P(e$1X.WHITE),D$B=new e$1L(!0),V$w=new e$1L(!0),N$w=new e$1L(!1),U$z=new e$1L(e$1X.BLACK),A$K=new e$1L(W$X.DISABLED),L$J=new e$1L(new r$Z),S$x=new e$1L(_0x2b86ba.BOTH);function i$G(e){o$1q.defined("options.entity",e.entity),o$1q.defined("options.scene",e.scene),o$1q.defined("options.geometryOptions",e.geometryOptions),o$1q.defined("options.geometryPropertyName",e.geometryPropertyName),o$1q.defined("options.observedPropertyNames",e.observedPropertyNames);var t=e.entity,i=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new o$1h,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=i,this._id=i+"-"+t.id,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=h$W.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(i$G.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!e$2e(this._entity.availability)&&r$_.isConstant(this._showProperty)&&r$_.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!e$2e(this._entity.availability)&&r$_.isConstant(this._showProperty)&&r$_.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),i$G.prototype.isOutlineVisible=function(e){var t=this._entity;return u$Z(this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e),!1)},i$G.prototype.isFilled=function(e){var t=this._entity;return u$Z(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e),!1)},i$G.prototype.createFillGeometryInstance=t$15.throwInstantiationError,i$G.prototype.createOutlineGeometryInstance=t$15.throwInstantiationError,i$G.prototype.isDestroyed=function(){return!1},i$G.prototype.destroy=function(){i$11(this)},i$G.prototype._isHidden=function(e,t){var i=t.show;return e$2e(i)&&i.isConstant&&!i.getValue(o$I.MINIMUM_VALUE)},i$G.prototype._isOnTerrain=function(e,t){return!1},i$G.prototype._getIsClosed=function(e){return!0},i$G.prototype._isDynamic=t$15.throwInstantiationError,i$G.prototype._setStaticOptions=t$15.throwInstantiationError,i$G.prototype._onEntityPropertyChanged=function(e,t,i,n){if(-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(!e$2e(r))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var o=r.fill,a=!e$2e(o)||!o.isConstant||o.getValue(o$I.MINIMUM_VALUE),s=r.outline,l=e$2e(s);if(l&&s.isConstant&&(l=s.getValue(o$I.MINIMUM_VALUE)),!a&&!l)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var u=r.show;if(this._isHidden(e,r))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));this._materialProperty=u$Z(r.material,M$C),this._fillProperty=u$Z(o,V$w),this._showProperty=u$Z(u,D$B),this._showOutlineProperty=u$Z(r.outline,N$w),this._outlineColorProperty=l?u$Z(r.outlineColor,U$z):void 0,this._shadowsProperty=u$Z(r.shadows,A$K),this._distanceDisplayConditionProperty=u$Z(r.distanceDisplayCondition,L$J),this._classificationTypeProperty=u$Z(r.classificationType,S$x),this._fillEnabled=a;var c=this._isOnTerrain(e,r)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof t$P);if(l&&c&&(e$22(e$22.geometryOutlines),l=!1),this._onTerrain=c,this._outlineEnabled=l,this._isDynamic(e,r))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,r),this._isClosed=this._getIsClosed(this._options);var h=r.outlineWidth;this._outlineWidth=e$2e(h)?h.getValue(o$I.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}}},i$G.prototype.createDynamicUpdater=function(e,t){if(o$1q.defined("primitives",e),o$1q.defined("groundPrimitives",t),!this._dynamic)throw new t$15("This instance does not represent dynamic geometry.");return new this.constructor.DynamicGeometryUpdater(this,e,t)};var m$B=new o$1p,H$F=new a$18;function h$E(e,t,i,n){o$1q.defined("scene",e),o$1q.defined("positionProperty",t),this._scene=e,this._heightReference=i,this._extrudedHeightReference=n,this._positionProperty=t,this._position=new o$1p,this._cartographicPosition=new a$18,this._normal=new o$1p,this._definitionChanged=new o$1h,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;var r=this;if(e$2e(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener((function(){r._updateClamping()})),this._removeModeListener=e.morphComplete.addEventListener((function(){r._updateClamping()}))),t.isConstant){var o=t.getValue(o$I.MINIMUM_VALUE,m$B);if(!e$2e(o)||o$1p.equals(o,o$1p.ZERO)||!e$2e(e.globe))return;this._position=o$1p.clone(o,this._position),this._updateClamping(),this._normal=e.globe.ellipsoid.geodeticSurfaceNormal(o,this._normal)}}function a$B(e,t,i,n){if(i$G.prototype._onEntityPropertyChanged.call(this,e,t,i,n),-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(e$2e(r)){e$2e(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);var o=r.heightReference;if(e$2e(o)){var a=new n$X(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new h$E(this._scene,a,o)}}}}Object.defineProperties(h$E.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),h$E.prototype._updateClamping=function(){e$2e(this._removeCallbackFunc)&&this._removeCallbackFunc();var e=this._scene,t=e.globe,i=this._position;if(e$2e(t)&&!o$1p.equals(i,o$1p.ZERO)){var n=t.ellipsoid,r=t._surface,o=this,a=n.cartesianToCartographic(i,this._cartographicPosition),s=t.getHeight(a);e$2e(s)?this._terrainHeight=s:this._terrainHeight=0,this._removeCallbackFunc=r.updateHeight(a,(function(t){if(e.mode===C$14.SCENE3D){var i=n.cartesianToCartographic(t,H$F);o._terrainHeight=i.height}else o._terrainHeight=t.x;o.definitionChanged.raiseEvent()}))}else this._terrainHeight=0},h$E.prototype.getValue=function(e,t){var i=r$_.getValueOrDefault(this._heightReference,e,k$R.NONE),n=r$_.getValueOrDefault(this._extrudedHeightReference,e,k$R.NONE);if(i===k$R.NONE&&n!==k$R.RELATIVE_TO_GROUND)return this._position=o$1p.clone(o$1p.ZERO,this._position),o$1p.clone(o$1p.ZERO,t);if(this._positionProperty.isConstant)return o$1p.multiplyByScalar(this._normal,this._terrainHeight,t);var r=this._scene,o=this._positionProperty.getValue(e,m$B);if(!e$2e(o)||o$1p.equals(o,o$1p.ZERO)||!e$2e(r.globe))return o$1p.clone(o$1p.ZERO,t);if(o$1p.equalsEpsilon(this._position,o,e$2d.EPSILON10))return o$1p.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=o$1p.clone(o,this._position),this._updateClamping();var a=r.globe.ellipsoid.geodeticSurfaceNormal(o,this._normal);return o$1p.multiplyByScalar(a,this._terrainHeight,t)},h$E.prototype.isDestroyed=function(){return!1},h$E.prototype.destroy=function(){return e$2e(this._removeEventListener)&&this._removeEventListener(),e$2e(this._removeModeListener)&&this._removeModeListener(),e$2e(this._removeCallbackFunc)&&this._removeCallbackFunc(),i$11(this)};var V$v=o$1p.ZERO,E$F=new o$1p,N$v=new o$1p,G$E=new e$1X;function H$E(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function i$F(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new H$E(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}function p$B(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(i$F.prototype=Object.create(i$G.prototype),i$F.prototype.constructor=i$F),Object.defineProperties(i$F.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),i$F.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:t$A.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,G$E)),e$2e(t)||(t=e$1X.WHITE),a.color=o$16.fromColor(t));return e$2e(this._options.offsetAttribute)&&(a.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,V$v,E$F))),new d$1o({id:i,geometry:O$z.fromDimensions(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:a})},i$F.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,G$E),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r),offset:void 0};return e$2e(this._options.offsetAttribute)&&(o.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,V$v,E$F))),new d$1o({id:t,geometry:o$17.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:o})},i$F.prototype._computeCenter=function(e,t){return r$_.getValueOrUndefined(this._entity.position,e,t)},i$F.prototype._isHidden=function(e,t){return!e$2e(t.dimensions)||!e$2e(e.position)||i$G.prototype._isHidden.call(this,e,t)},i$F.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$_.isConstant(e.orientation)&&t.dimensions.isConstant&&r$_.isConstant(t.outlineWidth))},i$F.prototype._setStaticOptions=function(e,t){var i=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$P?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,n.dimensions=t.dimensions.getValue(o$I.MINIMUM_VALUE,n.dimensions),n.offsetAttribute=i!==k$R.NONE?_0x39c22a.ALL:void 0},i$F.prototype._onEntityPropertyChanged=a$B,i$F.DynamicGeometryUpdater=p$B,e$2e(Object.create)&&(p$B.prototype=Object.create(a$C.prototype),p$B.prototype.constructor=p$B),p$B.prototype._isHidden=function(e,t,i){var n=r$_.getValueOrUndefined(e.position,i,N$v),r=this._options.dimensions;return!e$2e(n)||!e$2e(r)||a$C.prototype._isHidden.call(this,e,t,i)},p$B.prototype._setOptions=function(e,t,i){var n=r$_.getValueOrDefault(t.heightReference,i,k$R.NONE),r=this._options;r.dimensions=r$_.getValueOrUndefined(t.dimensions,i,r.dimensions),r.offsetAttribute=n!==k$R.NONE?_0x39c22a.ALL:void 0};var a$A={X:0,Y:1,Z:2,Y_UP_TO_Z_UP:p$1d.fromRotationTranslation(p$1e.fromRotationX(e$2d.PI_OVER_TWO)),Z_UP_TO_Y_UP:p$1d.fromRotationTranslation(p$1e.fromRotationX(-e$2d.PI_OVER_TWO)),X_UP_TO_Z_UP:p$1d.fromRotationTranslation(p$1e.fromRotationY(-e$2d.PI_OVER_TWO)),Z_UP_TO_X_UP:p$1d.fromRotationTranslation(p$1e.fromRotationY(e$2d.PI_OVER_TWO)),X_UP_TO_Y_UP:p$1d.fromRotationTranslation(p$1e.fromRotationZ(e$2d.PI_OVER_TWO)),Y_UP_TO_X_UP:p$1d.fromRotationTranslation(p$1e.fromRotationZ(-e$2d.PI_OVER_TWO)),fromName:function(e){return o$1q.typeOf.string("name",e),a$A[e]}},v$y=Object.freeze(a$A),A$J={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"},Q$z=Object.freeze(A$J),e$N={HIGHLIGHT:0,REPLACE:1,MIX:2},L$I=Object.freeze(e$N),T$D={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},c$z={SCALAR:void 0,VEC2:o$1o,VEC3:o$1p,VEC4:e$2c,MAT2:f$15,MAT3:p$1e,MAT4:p$1d};function M$B(e){var t,i=e.componentType;t="string"==typeof i?S$14.fromName(i):i;var n=T$D[e.type],r=c$z[e.type];return{componentsPerAttribute:n,classType:r,createArrayBufferView:function(e,i,r){return S$14.createArrayBufferView(t,e,i,n*r)}}}var I$L=e$1X.WHITE,X$w=!0;function h$D(e,t,i,n,r){var o;this.featuresLength=t,this._translucentFeaturesLength=0,e$2e(i)&&(o=i.extensions),this._extensions=u$Z(o,{});var a,s,l=_e$i(i);if(this._properties=l,this._batchTableHierarchy=me$m(this,i,n),this._batchTableBinaryProperties=V$u(t,l,n),this._showAlphaProperties=void 0,this._batchValues=void 0,this._batchValuesDirty=!1,this._batchTexture=void 0,this._defaultTexture=void 0,this._pickTexture=void 0,this._pickIds=[],this._content=e,this._colorChangedCallback=r,t>0){var u=Math.min(t,e$1W.maximumTextureSize),c=Math.ceil(t/e$1W.maximumTextureSize),h=1/u,d=.5*h,f=1/c,p=.5*f;a=new o$1o(u,c),s=new e$2c(h,d,f,p)}this._textureDimensions=a,this._textureStep=s}function _e$i(e){var t={};if(!e$2e(e))return t;for(var i in e)e.hasOwnProperty(i)&&"HIERARCHY"!==i&&"extensions"!==i&&"extras"!==i&&(t[i]=l$1f(e[i],!0));return t}function me$m(e,t,i){if(e$2e(t)){var n=e._extensions["3DTILES_batch_table_hierarchy"],r=t.HIERARCHY;if(e$2e(r)&&(h$D._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),e._extensions["3DTILES_batch_table_hierarchy"]=r,n=r),e$2e(n))return ge$h(n,i)}}function ge$h(e,t){var i,n,r,o=e.instancesLength,a=e.classes,s=e.classIds,l=e.parentCounts,u=e.parentIds,c=o;if(e$2e(s.byteOffset)&&(s.componentType=u$Z(s.componentType,S$14.UNSIGNED_SHORT),s.type=Q$z.SCALAR,s=M$B(s).createArrayBufferView(t.buffer,t.byteOffset+s.byteOffset,o)),e$2e(l))for(e$2e(l.byteOffset)&&(l.componentType=u$Z(l.componentType,S$14.UNSIGNED_SHORT),l.type=Q$z.SCALAR,l=M$B(l).createArrayBufferView(t.buffer,t.byteOffset+l.byteOffset,o)),r=new Uint16Array(o),c=0,i=0;i<o;++i)r[i]=c,c+=l[i];e$2e(u)&&e$2e(u.byteOffset)&&(u.componentType=u$Z(u.componentType,S$14.UNSIGNED_SHORT),u.type=Q$z.SCALAR,u=M$B(u).createArrayBufferView(t.buffer,t.byteOffset+u.byteOffset,c));var h=a.length;for(i=0;i<h;++i){var d=a[i].length,f=a[i].instances,p=V$u(d,f,t);a[i].instances=p$19(p,f)}var _=d$1s(new Array(h),0),m=new Uint16Array(o);for(i=0;i<o;++i)n=s[i],m[i]=_[n],++_[n];var g={classes:a,classIds:s,classIndexes:m,parentCounts:l,parentIndexes:r,parentIds:u};return ye$e(g),g}h$D._deprecationWarning=t$11,Object.defineProperties(h$D.prototype,{memorySizeInBytes:{get:function(){var e=0;return e$2e(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),e$2e(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}}});var de$h=[];function ye$e(e){var t=de$h;t.length=0;for(var i=e.classIds.length,n=0;n<i;++n)j$z(e,n,t)}function j$z(e,t,i){var n=e.parentCounts,r=e.parentIds,o=e.parentIndexes,a=e.classIds.length;if(e$2e(r)){if(t>=a)throw new t$15("Parent index "+t+" exceeds the total number of instances: "+a);if(i.indexOf(t)>-1)throw new t$15("Circular dependency detected in the batch table hierarchy.");i.push(t);for(var s=e$2e(n)?n[t]:1,l=e$2e(n)?o[t]:t,u=0;u<s;++u){var c=r[l+u];c!==t&&j$z(e,c,i)}i.pop(t)}}function V$u(e,t,i){var n;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=o.byteOffset;if(e$2e(a)){var s=o.componentType,l=o.type;if(!e$2e(s))throw new t$13("componentType is required.");if(!e$2e(l))throw new t$13("type is required.");if(!e$2e(i))throw new t$13("Property "+r+" requires a batch table binary.");var u=M$B(o),c=u.componentsPerAttribute,h=u.classType,d=u.createArrayBufferView(i.buffer,i.byteOffset+a,e);e$2e(n)||(n={}),n[r]={typedArray:d,componentCount:c,type:h}}}return n}function Z$z(e){var t=e._textureDimensions;return t.x*t.y*4}function $$z(e){if(!e$2e(e._batchValues)){var t=Z$z(e),i=new Uint8Array(t);d$1s(i,255),e._batchValues=i}return e._batchValues}function J$x(e){if(!e$2e(e._showAlphaProperties)){var t=2*e.featuresLength,i=new Uint8Array(t);d$1s(i,255),e._showAlphaProperties=i}return e._showAlphaProperties}function g$H(e,t){if(!e$2e(e)||e<0||e>t)throw new t$15("batchId is required and between zero and featuresLength - 1 ("+t-NaN)}h$D.getBinaryProperties=function(e,t,i){return V$u(e,t,i)},h$D.prototype.setShow=function(e,t){if(g$H(e,this.featuresLength),o$1q.typeOf.bool("show",t),!t||e$2e(this._showAlphaProperties)){var i=J$x(this),n=2*e,r=t?255:0;if(i[n]!==r)i[n]=r,$$z(this)[4*e+3]=t?i[n+1]:0,this._batchValuesDirty=!0}},h$D.prototype.setAllShow=function(e){o$1q.typeOf.bool("show",e);for(var t=this.featuresLength,i=0;i<t;++i)this.setShow(i,e)},h$D.prototype.getShow=function(e){if(g$H(e,this.featuresLength),!e$2e(this._showAlphaProperties))return!0;var t=2*e;return 255===this._showAlphaProperties[t]};var Se$b=new Array(4);h$D.prototype.setColor=function(e,t){if(g$H(e,this.featuresLength),o$1q.typeOf.object("color",t),!e$1X.equals(t,I$L)||e$2e(this._batchValues)){var i=t.toBytes(Se$b),n=i[3],r=$$z(this),o=4*e,a=J$x(this),s=2*e;if(r[o]!==i[0]||r[o+1]!==i[1]||r[o+2]!==i[2]||a[s+1]!==n){r[o]=i[0],r[o+1]=i[1],r[o+2]=i[2];var l=255!==a[s+1],u=0!==a[s];r[o+3]=u?n:0,a[s+1]=n;var c=255!==n;c&&!l?++this._translucentFeaturesLength:!c&&l&&--this._translucentFeaturesLength,this._batchValuesDirty=!0,e$2e(this._colorChangedCallback)&&this._colorChangedCallback(e,t)}}},h$D.prototype.setAllColor=function(e){o$1q.typeOf.object("color",e);for(var t=this.featuresLength,i=0;i<t;++i)this.setColor(i,e)},h$D.prototype.getColor=function(e,t){if(g$H(e,this.featuresLength),o$1q.typeOf.object("result",t),!e$2e(this._batchValues))return e$1X.clone(I$L,t);var i=this._batchValues,n=4*e,r=this._showAlphaProperties,o=2*e;return e$1X.fromBytes(i[n],i[n+1],i[n+2],r[o+1],t)},h$D.prototype.getPickColor=function(e){return g$H(e,this.featuresLength),this._pickIds[e]};var Te$g=new e$1X;function ee$q(e,t){var i=e.typedArray,n=e.componentCount;return 1===n?i[t]:e.type.unpack(i,t*n)}function te$q(e,t,i){var n=e.typedArray,r=e.componentCount;1===r?n[t]=i:e.type.pack(i,n,t*r)}h$D.prototype.applyStyle=function(e){if(!e$2e(e))return this.setAllColor(I$L),void this.setAllShow(X$w);for(var t=this._content,i=this.featuresLength,n=0;n<i;++n){var r=t.getFeature(n),o=e$2e(e.color)?e.color.evaluateColor(r,Te$g):I$L,a=e$2e(e.show)?e.show.evaluate(r):X$w;this.setColor(n,o),this.setShow(n,a)}};var xe$f=[],Ce$c=[],Le$i=0;function Ae$i(e,t,i){var n=e.classIds,r=e.parentCounts,o=e.parentIds,a=e.parentIndexes,s=n.length,l=xe$f;l.length=Math.max(l.length,s);var u=++Le$i,c=Ce$c;for(c.length=0,c.push(t);c.length>0;)if(l[t=c.pop()]!==u){l[t]=u;var h=i(e,t);if(e$2e(h))return h;for(var d=r[t],f=a[t],p=0;p<d;++p){var _=o[f+p];_!==t&&c.push(_)}}}function we$f(e,t,i){for(var n=!0;n;){var r=i(e,t);if(e$2e(r))return r;var o=e.parentIds[t];n=o!==t,t=o}}function P$y(e,t,i){var n=e.parentCounts;return e$2e(e.parentIds)?e$2e(n)?Ae$i(e,t,i):we$f(e,t,i):i(e,t)}function De$f(e,t,i){var n=P$y(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t];if(e$2e(e.classes[n].instances[i]))return!0}));return e$2e(n)}function Pe$d(e,t,i){P$y(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t],r=e.classes[n].instances;for(var o in r)r.hasOwnProperty(o)&&-1===i.indexOf(o)&&i.push(o)}))}function Ee$g(e,t,i){return P$y(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t],r=e.classes[n],o=e.classIndexes[t],a=r.instances[i];if(e$2e(a))return e$2e(a.typedArray)?ee$q(a,o):l$1f(a[o],!0)}))}function be$j(e,t,i,n){var r=P$y(e._batchTableHierarchy,t,(function(e,r){var o=e.classIds[r],a=e.classes[o],s=e.classIndexes[r],l=a.instances[i];if(e$2e(l)){if(r!==t)throw new t$15('Inherited property "'+i+'" is read-only.');return e$2e(l.typedArray)?te$q(l,s,n):l[s]=l$1f(n,!0),!0}}));return e$2e(r)}function Oe$g(e){return 1===e._textureDimensions.y?"uniform vec4 tile_textureStep; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n return vec2(centerX + (batchId * stepX), 0.5); \n} \n":"uniform vec4 tile_textureStep; \nuniform vec2 tile_textureDimensions; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n float stepY = tile_textureStep.z; \n float centerY = tile_textureStep.w; \n float xId = mod(batchId, tile_textureDimensions.x); \n float yId = floor(batchId / tile_textureDimensions.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function re$t(e,t){return e=s$V.replaceMain(e,"tile_main"),t?e+"uniform float tile_colorBlend; \nvoid tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n tile_featureColor = czm_gammaCorrect(tile_featureColor); \n gl_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n} \n":e+"void tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n} \n"}function Ie$d(e,t){for(var i,n="texture2D("+t,r=0,o=e.indexOf(n,r);o>-1;){for(var a=0,s=o;s<e.length;++s){var l=e.charAt(s);if("("===l)++a;else if(")"===l&&0===--a){i=s+1;break}}var u="tile_diffuse_final("+e.slice(o,i)+", tile_diffuse)";e=e.slice(0,o)+u+e.slice(i),r=o+u.length,o=e.indexOf(n,r)}return e}function ne$q(e,t,i){if(!e$2e(t))return re$t(e,i);var n=new RegExp("(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+"+t+";"),r=e.match(n);if(!e$2e(r))return re$t(e,i);var o=r[0],a=r[2];e=(e=s$V.replaceMain(e,"tile_main")).replace(o,"");var s;if("vec3"===a||"vec4"===a){var l="vec3"===a?"vec4("+t+", 1.0)":t,u="vec3"===a?"tile_diffuse.xyz":"tile_diffuse";n=new RegExp(t,"g"),e=e.replace(n,u),s=" vec4 source = "+l+"; \n tile_diffuse = tile_diffuse_final(source, tile_featureColor); \n tile_main(); \n"}else"sampler2D"===a&&(e=Ie$d(e,t),s=" tile_diffuse = tile_featureColor; \n tile_main(); \n");return e="uniform float tile_colorBlend; \nvec4 tile_diffuse = vec4(1.0); \nbool isWhite(vec3 color) \n{ \n return all(greaterThan(color, vec3(1.0 - czm_epsilon3))); \n} \nvec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse) \n{ \n vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend); \n vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse; \n return vec4(diffuse.rgb, sourceDiffuse.a); \n} \n"+o+"\n"+e+"\nvoid tile_color(vec4 tile_featureColor) \n{ \n"+s,i&&(e+=" tile_featureColor = czm_gammaCorrect(tile_featureColor); \n gl_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n"),e+="} \n"}function ke$a(e){var t=e._content.tileset,i=t.colorBlendMode,n=t.colorBlendAmount;if(i===L$I.HIGHLIGHT)return 0;if(i===L$I.REPLACE)return 1;if(i===L$I.MIX)return e$2d.clamp(n,e$2d.EPSILON4,1);throw new t$15('Invalid color blend mode "'+i+'".')}h$D.prototype.isClass=function(e,t){g$H(e,this.featuresLength),o$1q.typeOf.string("className",t);var i=this._batchTableHierarchy;if(!e$2e(i))return!1;var n=P$y(i,e,(function(e,i){var n=e.classIds[i];if(e.classes[n].name===t)return!0}));return e$2e(n)},h$D.prototype.isExactClass=function(e,t){return o$1q.typeOf.string("className",t),this.getExactClassName(e)===t},h$D.prototype.getExactClassName=function(e){g$H(e,this.featuresLength);var t=this._batchTableHierarchy;if(e$2e(t)){var i=t.classIds[e];return t.classes[i].name}},h$D.prototype.hasProperty=function(e,t){return g$H(e,this.featuresLength),o$1q.typeOf.string("name",t),e$2e(this._properties[t])||e$2e(this._batchTableHierarchy)&&De$f(this,e,t)},h$D.prototype.getPropertyNames=function(e,t){g$H(e,this.featuresLength),(t=e$2e(t)?t:[]).length=0;var i=Object.keys(this._properties);return t.push.apply(t,i),e$2e(this._batchTableHierarchy)&&Pe$d(this,e,t),t},h$D.prototype.getProperty=function(e,t){if(g$H(e,this.featuresLength),o$1q.typeOf.string("name",t),e$2e(this._batchTableBinaryProperties)){var i=this._batchTableBinaryProperties[t];if(e$2e(i))return ee$q(i,e)}var n=this._properties[t];if(e$2e(n))return l$1f(n[e],!0);if(e$2e(this._batchTableHierarchy)){var r=Ee$g(this,e,t);if(e$2e(r))return r}},h$D.prototype.setProperty=function(e,t,i){var n=this.featuresLength;if(g$H(e,n),o$1q.typeOf.string("name",t),e$2e(this._batchTableBinaryProperties)){var r=this._batchTableBinaryProperties[t];if(e$2e(r))return void te$q(r,e,i)}if(!e$2e(this._batchTableHierarchy)||!be$j(this,e,t,i)){var o=this._properties[t];e$2e(o)||(this._properties[t]=new Array(n),o=this._properties[t]),o[e]=l$1f(i,!0)}},h$D.prototype.getVertexShaderCallback=function(e,t,i){if(0!==this.featuresLength){var n=this;return function(r){var o,a=ne$q(r,i,!1);return e$1W.maximumVertexTextureImageUnits>0?(o="",e&&(o+="uniform bool tile_translucentCommand; \n"),o+="uniform sampler2D tile_batchTexture; \nvarying vec4 tile_featureColor; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n vec2 st = computeSt("+t+"); \n vec4 featureProperties = texture2D(tile_batchTexture, st); \n tile_color(featureProperties); \n float show = ceil(featureProperties.a); \n gl_Position *= show; \n",e&&(o+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n gl_Position *= 0.0; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n gl_Position *= 0.0; \n } \n } \n"),o+=" tile_featureColor = featureProperties; \n tile_featureSt = st; \n}"):o="varying vec2 tile_featureSt; \nvoid main() \n{ \n tile_color(vec4(1.0)); \n tile_featureSt = computeSt("+t+"); \n}",a+"\n"+Oe$g(n)+o}}},h$D.prototype.getFragmentShaderCallback=function(e,t){if(0!==this.featuresLength)return function(i){return i=ne$q(i,t,!0),e$1W.maximumVertexTextureImageUnits>0?i+="#ifdef APPLY_SWIPE\n uniform vec4 uSwipeRegion;\n#endif\nuniform sampler2D tile_pickTexture; \nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n#ifdef APPLY_SWIPE \n czm_RollerShutter(gl_FragCoord.xy, uSwipeRegion);\n#endif\n tile_color(tile_featureColor); \n}":(e&&(i+="uniform bool tile_translucentCommand; \n"),i+="uniform sampler2D tile_pickTexture; \nuniform sampler2D tile_batchTexture; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n",e&&(i+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n discard; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n discard; \n } \n } \n"),i+=" tile_color(featureProperties); \n} \n"),i}},h$D.prototype.getClassificationFragmentShaderCallback=function(){if(0!==this.featuresLength)return function(e){return e=s$V.replaceMain(e,"tile_main"),e$1W.maximumVertexTextureImageUnits>0?e+="uniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n tile_main(); \n gl_FragColor = tile_featureColor; \n}":e+="uniform sampler2D tile_batchTexture; \nuniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvoid main() \n{ \n tile_main(); \n vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n gl_FragColor = featureProperties; \n} \n",e}},h$D.prototype.getUniformMapCallback=function(){if(0!==this.featuresLength){var e=this;return function(t){var i={tile_batchTexture:function(){return u$Z(e._batchTexture,e._defaultTexture)},tile_textureDimensions:function(){return e._textureDimensions},tile_textureStep:function(){return e._textureStep},tile_colorBlend:function(){return ke$a(e)},uSwipeRegion:function(){var t=e._content.tileset._swipeRegion,i=e._content.tileset.frameState.context.drawingBufferWidth,n=e._content.tileset.frameState.context.drawingBufferHeight,r=new e$2c;return r.x=t.x*i,r.y=(1-t.y)*n,r.z=t.z*i,r.w=(1-t.w)*n,r},tile_pickTexture:function(){return u$Z(e._pickTexture,e._defaultTexture)}};return p$19(t,i)}}},h$D.prototype.getPickId=function(){return"texture2D(tile_pickTexture, tile_featureSt)"};var x$H={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};function Re$f(e){var t=e._translucentFeaturesLength;return 0===t?x$H.ALL_OPAQUE:t===e.featuresLength?x$H.ALL_TRANSLUCENT:x$H.OPAQUE_AND_TRANSLUCENT}function Be$f(e){var t=i$$.shallowClone(e),i=t.pass===Le$q.TRANSLUCENT;return t.uniformMap=e$2e(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return i},t}function Me$h(e){var t=i$$.shallowClone(e);return t.pass=Le$q.TRANSLUCENT,t.renderState=ze$c(e.renderState),t}function Ue$d(e){var t=i$$.shallowClone(e);return t.renderState=Ge$8(e.renderState),t}function Ne$c(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!e$2e(i)){var n=t.fragmentShaderSource.clone();n.defines=e$2e(n.defines)?n.defines.slice(0):[],n.defines.push("POLYGON_OFFSET"),n.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),i=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:t._attributeLocations})}return i}function Ve$c(e,t){var i=i$$.shallowClone(t),n=l$1f(i.renderState,!0);n.cull.enabled=!0,n.cull.face=G$1a.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5},n.stencilTest=u$M.setCesium3DTileBit(),n.stencilMask=u$M.CESIUM_3D_TILE_MASK,i.renderState=d$1m.fromCache(n),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=l$1f(t.uniformMap);var r=new o$1o(5,5);return i.uniformMap.u_polygonOffset=function(){return r},i.shaderProgram=Ne$c(e,t.shaderProgram),i}function Fe$e(e,t){var i=i$$.shallowClone(e),n=l$1f(i.renderState,!0);return n.stencilTest.enabled=!0,n.stencilTest.mask=u$M.SKIP_LOD_MASK,n.stencilTest.reference=u$M.CESIUM_3D_TILE_MASK|t<<u$M.SKIP_LOD_BIT_SHIFT,n.stencilTest.frontFunction=m$Z.GREATER_OR_EQUAL,n.stencilTest.frontOperation.zPass=n$_.REPLACE,n.stencilTest.backFunction=m$Z.GREATER_OR_EQUAL,n.stencilTest.backOperation.zPass=n$_.REPLACE,n.stencilMask=u$M.CESIUM_3D_TILE_MASK|u$M.SKIP_LOD_MASK,i.renderState=d$1m.fromCache(n),i}function He$b(e){return(e.renderState.stencilTest.reference&u$M.SKIP_LOD_MASK)>>>u$M.SKIP_LOD_BIT_SHIFT}function ze$c(e){var t=l$1f(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=Ee$r.ALPHA_BLEND,d$1m.fromCache(t)}function Ge$8(e){var t=l$1f(e,!0);return t.stencilTest=u$M.setCesium3DTileBit(),t.stencilMask=u$M.CESIUM_3D_TILE_MASK,d$1m.fromCache(t)}function ie$o(e,t,i){var n=e._textureDimensions;return new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,source:{width:n.x,height:n.y,arrayBufferView:i},flipY:!1,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})}function Ke$8(e,t){var i=e.featuresLength;if(!e$2e(e._pickTexture)&&i>0){for(var n=e._pickIds,r=Z$z(e),o=new Uint8Array(r),a=e._content,s=0;s<i;++s){var l=t.createPickId(a.getFeature(s));n.push(l);var u=l.color,c=4*s;o[c]=e$1X.floatToByte(u.red),o[c+1]=e$1X.floatToByte(u.green),o[c+2]=e$1X.floatToByte(u.blue),o[c+3]=e$1X.floatToByte(u.alpha)}e._pickTexture=ie$o(e,t,o),a.tileset._statistics.batchTableByteLength+=e._pickTexture.sizeInBytes}}function Ye$8(e){var t=e._textureDimensions;e._batchTexture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function e$M(e,t){this._content=e,this._batchId=t,this._color=void 0}function o$C(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function n$s(e,t,i,n,r,o){var a=e._cachedTypedArrays,s=a[t];return e$2e(s)||(s=S$14.createArrayBufferView(i,e.buffer.buffer,e.buffer.byteOffset+o,r*n),a[t]=s),s}function A$I(e,t,i,n){var r=e._cachedTypedArrays,o=r[t];return e$2e(o)||(o=S$14.createTypedArray(i,n),r[t]=o),o}function d$P(e,t,i){if(i=u$Z(i,!1)){var n=e.indexOf(t);if(n>-1)return n}return e.push(t),e.length-1}function i$E(e,t){return e$2e(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}function e$L(){}function r$B(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}function p$A(e,t){var i=t.bufferView;if(e$2e(i)){var n=e.bufferViews[i];if(e$2e(n.byteStride)&&n.byteStride>0)return n.byteStride}return S$14.getSizeInBytes(t.componentType)*r$B(t.type)}function E$E(e){e$L.accessor(e,(function(e){e$2e(e.bufferView)&&(e.byteOffset=u$Z(e.byteOffset,0))})),e$L.bufferView(e,(function(e){e$2e(e.buffer)&&(e.byteOffset=u$Z(e.byteOffset,0))})),e$L.mesh(e,(function(t){e$L.meshPrimitive(t,(function(t){if(t.mode=u$Z(t.mode,de$y.TRIANGLES),!e$2e(t.material)){e$2e(e.materials)||(e.materials=[]);t.material=d$P(e.materials,{name:"default"})}}))})),e$L.accessorContainingVertexAttributeData(e,(function(t){var i=e.accessors[t],n=i.bufferView;if(i.normalized=u$Z(i.normalized,!1),e$2e(n)){var r=e.bufferViews[n];r.byteStride=p$A(e,i),r.target=de$y.ARRAY_BUFFER}})),e$L.accessorContainingIndexData(e,(function(t){var i=e.accessors[t].bufferView;e$2e(i)&&(e.bufferViews[i].target=de$y.ELEMENT_ARRAY_BUFFER)})),e$L.material(e,(function(e){var t=u$Z(e.extensions,u$Z.EMPTY_OBJECT),i=t.KHR_materials_common;if(e$2e(i)){var n=i.technique,r=e$2e(i.values)?i.values:{};return i.values=r,r.ambient=e$2e(r.ambient)?r.ambient:[0,0,0,1],r.emission=e$2e(r.emission)?r.emission:[0,0,0,1],r.transparency=u$Z(r.transparency,1),r.transparent=u$Z(r.transparent,!1),r.doubleSided=u$Z(r.doubleSided,!1),void("CONSTANT"!==n&&(r.diffuse=e$2e(r.diffuse)?r.diffuse:[0,0,0,1],"LAMBERT"!==n&&(r.specular=e$2e(r.specular)?r.specular:[0,0,0,1],r.shininess=u$Z(r.shininess,0))))}e.emissiveFactor=u$Z(e.emissiveFactor,[0,0,0]),e.alphaMode=u$Z(e.alphaMode,"OPAQUE"),e.doubleSided=u$Z(e.doubleSided,!1),"MASK"===e.alphaMode&&(e.alphaCutoff=u$Z(e.alphaCutoff,.5)),e$2e(t.KHR_techniques_webgl)&&e$L.materialValue(e,(function(e){e$2e(e.index)&&d$O(e)})),d$O(e.emissiveTexture),d$O(e.normalTexture),d$O(e.occlusionTexture);var o=e.pbrMetallicRoughness;e$2e(o)&&(o.baseColorFactor=u$Z(o.baseColorFactor,[1,1,1,1]),o.metallicFactor=u$Z(o.metallicFactor,1),o.roughnessFactor=u$Z(o.roughnessFactor,1),d$O(o.baseColorTexture),d$O(o.metallicRoughnessTexture));var a=t.pbrSpecularGlossiness;e$2e(a)&&(a.diffuseFactor=u$Z(a.diffuseFactor,[1,1,1,1]),a.specularFactor=u$Z(a.specularFactor,[1,1,1]),a.glossinessFactor=u$Z(a.glossinessFactor,1),d$O(a.specularGlossinessTexture))})),e$L.animation(e,(function(e){e$L.animationSampler(e,(function(e){e.interpolation=u$Z(e.interpolation,"LINEAR")}))}));var t=l$G(e);return e$L.node(e,(function(e,i){e$2e(t[i])||e$2e(e.translation)||e$2e(e.rotation)||e$2e(e.scale)?(e.translation=u$Z(e.translation,[0,0,0]),e.rotation=u$Z(e.rotation,[0,0,0,1]),e.scale=u$Z(e.scale,[1,1,1])):e.matrix=u$Z(e.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])})),e$L.sampler(e,(function(e){e.wrapS=u$Z(e.wrapS,de$y.REPEAT),e.wrapT=u$Z(e.wrapT,de$y.REPEAT)})),e$2e(e.scenes)&&!e$2e(e.scene)&&(e.scene=0),e}function l$G(e){var t={};return e$L.animation(e,(function(e){e$L.animationChannel(e,(function(e){var i=e.target,n=i.node,r=i.path;("translation"===r||"rotation"===r||"scale"===r)&&(t[n]=!0)}))})),t}function d$O(e){e$2e(e)&&(e.texCoord=u$Z(e.texCoord,0))}function s$z(e){return e$L.shader(e,(function(e){n$r(e)})),e$L.buffer(e,(function(e){n$r(e)})),e$L.image(e,(function(e){n$r(e),e$L.compressedImage(e,(function(e){n$r(e)}))})),n$r(e),e}function n$r(e){e.extras=e$2e(e.extras)?e.extras:{},e.extras._pipeline=e$2e(e.extras._pipeline)?e.extras._pipeline:{}}function s$y(e,t){var i=e.extensionsRequired;if(e$2e(i)){var n=i.indexOf(t);n>=0&&i.splice(n,1),0===i.length&&delete e.extensionsRequired}}function d$N(e,t){var i=e.extensionsUsed;if(e$2e(i)){var n=i.indexOf(t);n>=0&&i.splice(n,1),s$y(e,t),0===i.length&&delete e.extensionsUsed}}h$D.prototype.addDerivedCommands=function(e,t){for(var i=e.commandList,n=i.length,r=this._content._tile,o=r._finalResolution,a=r.tileset,s=a._skipLevelOfDetail&&a._hasMixedContent&&e.context.stencilBuffer,l=Re$f(this),u=t;u<n;++u){var c=i[u],h=c.derivedCommands.tileset;(!e$2e(h)||c.dirty)&&(h={},c.derivedCommands.tileset=h,h.originalCommand=Be$f(c),c.dirty=!1);var d=h.originalCommand;l!==x$H.ALL_OPAQUE&&c.pass!==Le$q.TRANSLUCENT&&(e$2e(h.translucent)||(h.translucent=Me$h(d))),l!==x$H.ALL_TRANSLUCENT&&c.pass!==Le$q.TRANSLUCENT&&(e$2e(h.opaque)||(h.opaque=Ue$d(d)),s&&(o||(e$2e(h.zback)||(h.zback=Ve$c(e.context,d)),a._backfaceCommands.push(h.zback)),(!e$2e(h.stencil)||r._selectionDepth!==He$b(h.stencil))&&(c.renderState.depthMask?h.stencil=Fe$e(d,r._selectionDepth):h.stencil=h.opaque)));var f=s?h.stencil:h.opaque,p=h.translucent;c.pass!==Le$q.TRANSLUCENT?(l===x$H.ALL_OPAQUE&&(i[u]=f),l===x$H.ALL_TRANSLUCENT&&(i[u]=p),l===x$H.OPAQUE_AND_TRANSLUCENT&&(i[u]=f,i.push(p))):i[u]=d}},h$D.prototype.update=function(e,t){var i=t.context;this._defaultTexture=i.defaultTexture;var n=t.passes;(n.pick||n.postProcess)&&Ke$8(this,i),this._batchValuesDirty&&(this._batchValuesDirty=!1,e$2e(this._batchTexture)||(this._batchTexture=ie$o(this,i,this._batchValues),e._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes),Ye$8(this))},h$D.prototype.isDestroyed=function(){return!1},h$D.prototype.destroy=function(){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),this._pickTexture=this._pickTexture&&this._pickTexture.destroy();for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();return i$11(this)},Object.defineProperties(e$M.prototype,{show:{get:function(){return this._content.batchTable.getShow(this._batchId)},set:function(e){this._content.batchTable.setShow(this._batchId,e)}},color:{get:function(){return e$2e(this._color)||(this._color=new e$1X),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickId:{get:function(){return this._content.batchTable.getPickColor(this._batchId)}}}),e$M.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},e$M.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},e$M.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},e$M.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},e$M.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},e$M.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},e$M.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},o$C.prototype.getGlobalProperty=function(e,t,i){var n=this.json[e];if(e$2e(n))return e$2e(n.byteOffset)?n$s(this,e,t=u$Z(t,S$14.UNSIGNED_INT),i=u$Z(i,1),1,n.byteOffset):n},o$C.prototype.getPropertyArray=function(e,t,i){var n=this.json[e];if(e$2e(n))return e$2e(n.byteOffset)?(e$2e(n.componentType)&&(t=S$14.fromName(n.componentType)),n$s(this,e,t,i,this.featuresLength,n.byteOffset)):A$I(this,e,t,n)},o$C.prototype.getProperty=function(e,t,i,n,r){if(e$2e(this.json[e])){var o=this.getPropertyArray(e,t,i);if(1===i)return o[n];for(var a=0;a<i;++a)r[a]=o[i*n+a];return r}},e$L.objectLegacy=function(e,t){if(e$2e(e))for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=t(e[i],i);if(e$2e(n))return n}},e$L.object=function(e,t){if(e$2e(e))for(var i=e.length,n=0;n<i;n++){var r=t(e[n],n);if(e$2e(r))return r}},e$L.topLevel=function(e,t,i){var n=e[t];return e$2e(n)&&!Array.isArray(n)?e$L.objectLegacy(n,i):e$L.object(n,i)},e$L.accessor=function(e,t){return e$L.topLevel(e,"accessors",t)},e$L.accessorWithSemantic=function(e,t,i){var n={};return e$L.mesh(e,(function(e){return e$L.meshPrimitive(e,(function(e){var r=e$L.meshPrimitiveAttribute(e,(function(e,r){if(0===r.indexOf(t)&&!e$2e(n[e])){n[e]=!0;var o=i(e);if(e$2e(o))return o}}));return e$2e(r)?r:e$L.meshPrimitiveTarget(e,(function(e){return e$L.meshPrimitiveTargetAttribute(e,(function(e,r){if(0===r.indexOf(t)&&!e$2e(n[e])){n[e]=!0;var o=i(e);if(e$2e(o))return o}}))}))}))}))},e$L.accessorContainingVertexAttributeData=function(e,t){var i={};return e$L.mesh(e,(function(e){return e$L.meshPrimitive(e,(function(e){var n=e$L.meshPrimitiveAttribute(e,(function(e){if(!e$2e(i[e])){i[e]=!0;var n=t(e);if(e$2e(n))return n}}));return e$2e(n)?n:e$L.meshPrimitiveTarget(e,(function(e){return e$L.meshPrimitiveTargetAttribute(e,(function(e){if(!e$2e(i[e])){i[e]=!0;var n=t(e);if(e$2e(n))return n}}))}))}))}))},e$L.accessorContainingIndexData=function(e,t){var i={};return e$L.mesh(e,(function(e){return e$L.meshPrimitive(e,(function(e){var n=e.indices;if(e$2e(n)&&!e$2e(i[n])){i[n]=!0;var r=t(n);if(e$2e(r))return r}}))}))},e$L.animation=function(e,t){return e$L.topLevel(e,"animations",t)},e$L.animationChannel=function(e,t){var i=e.channels;return e$L.object(i,t)},e$L.animationSampler=function(e,t){var i=e.samplers;return e$L.object(i,t)},e$L.buffer=function(e,t){return e$L.topLevel(e,"buffers",t)},e$L.bufferView=function(e,t){return e$L.topLevel(e,"bufferViews",t)},e$L.camera=function(e,t){return e$L.topLevel(e,"cameras",t)},e$L.image=function(e,t){return e$L.topLevel(e,"images",t)},e$L.compressedImage=function(e,t){if(e$2e(e.extras)){var i=e.extras.compressedImage3DTiles;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2e(r))return r}}},e$L.material=function(e,t){return e$L.topLevel(e,"materials",t)},e$L.materialValue=function(e,t){var i=e.values;for(var n in e$2e(e.extensions)&&e$2e(e.extensions.KHR_techniques_webgl)&&(i=e.extensions.KHR_techniques_webgl.values),i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2e(r))return r}},e$L.mesh=function(e,t){return e$L.topLevel(e,"meshes",t)},e$L.meshPrimitive=function(e,t){var i=e.primitives;if(e$2e(i))for(var n=i.length,r=0;r<n;r++){var o=t(i[r],r);if(e$2e(o))return o}},e$L.meshPrimitiveAttribute=function(e,t){var i=e.attributes;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2e(r))return r}},e$L.meshPrimitiveTarget=function(e,t){var i=e.targets;if(e$2e(i))for(var n=i.length,r=0;r<n;++r){var o=t(i[r],r);if(e$2e(o))return o}},e$L.meshPrimitiveTargetAttribute=function(e,t){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=t(e[i],i);if(e$2e(n))return n}},e$L.node=function(e,t){return e$L.topLevel(e,"nodes",t)},e$L.nodeInTree=function(e,t,i){var n=e.nodes;if(e$2e(n))for(var r=t.length,o=0;o<r;o++){var a=t[o],s=n[a];if(e$2e(s)){var l=i(s,a);if(e$2e(l))return l;var u=s.children;if(e$2e(u)&&e$2e(l=e$L.nodeInTree(e,u,i)))return l}}},e$L.nodeInScene=function(e,t,i){var n=t.nodes;if(e$2e(n))return e$L.nodeInTree(e,n,i)},e$L.program=function(e,t){return i$E(e,"KHR_techniques_webgl")?e$L.object(e.extensions.KHR_techniques_webgl.programs,t):e$L.topLevel(e,"programs",t)},e$L.sampler=function(e,t){return e$L.topLevel(e,"samplers",t)},e$L.scene=function(e,t){return e$L.topLevel(e,"scenes",t)},e$L.shader=function(e,t){return i$E(e,"KHR_techniques_webgl")?e$L.object(e.extensions.KHR_techniques_webgl.shaders,t):e$L.topLevel(e,"shaders",t)},e$L.skin=function(e,t){return e$L.topLevel(e,"skins",t)},e$L.skinJoint=function(e,t){var i=e.joints;if(e$2e(i))for(var n=i.length,r=0;r<n;r++){var o=t(i[r]);if(e$2e(o))return o}},e$L.techniqueAttribute=function(e,t){var i=e.attributes;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2e(r))return r}},e$L.techniqueUniform=function(e,t){var i=e.uniforms;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2e(r))return r}},e$L.techniqueParameter=function(e,t){var i=e.parameters;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=t(i[n],n);if(e$2e(r))return r}},e$L.technique=function(e,t){return i$E(e,"KHR_techniques_webgl")?e$L.object(e.extensions.KHR_techniques_webgl.techniques,t):e$L.topLevel(e,"techniques",t)},e$L.texture=function(e,t){return e$L.topLevel(e,"textures",t)};var x$G=4;function O$u(e){if("glTF"!==a$F(e))throw new t$13("File is not valid binary glTF");var t=d$M(e,0,5),i=t[1];if(1!==i&&2!==i)throw new t$13("Binary glTF version is not 1 or 2");return 1===i?S$w(e,t):T$C(e,t)}function d$M(e,t,i){for(var n=new DataView(e.buffer),r=new Array(i),o=0;o<i;++o)r[o]=n.getUint32(e.byteOffset+t+o*x$G,!0);return r}function S$w(e,t){var i=t[2],n=t[3];if(0!==t[4])throw new t$13("Binary glTF scene format is not JSON");var r=20+n,o=a$K(e,20,n),a=JSON.parse(o);s$z(a);var s=e.subarray(r,i),l=a.buffers;if(e$2e(l)&&Object.keys(l).length>0){var u=u$Z(l.binary_glTF,l.KHR_binary_glTF);e$2e(u)&&(u.extras._pipeline.source=s)}return d$N(a,"KHR_binary_glTF"),a}function T$C(e,t){for(var i,n,r=t[2],o=12;o<r;){var a=d$M(e,o,2),s=a[0],l=a[1];o+=8;var u=e.subarray(o,o+s);if(o+=s,1313821514===l){var c=a$K(u);s$z(i=JSON.parse(c))}else 5130562===l&&(n=u)}if(e$2e(i)&&e$2e(n)){var h=i.buffers;if(e$2e(h)&&h.length>0)h[0].extras._pipeline.source=n}return i}function i$D(e,t){var i=e.extensionsUsed;e$2e(i)||(i=[],e.extensionsUsed=i),d$P(i,t,!0)}function c$y(e){switch(e){case S$14.BYTE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt8(t+o*n)};case S$14.UNSIGNED_BYTE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint8(t+o*n)};case S$14.SHORT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt16(t+o*n,!0)};case S$14.UNSIGNED_SHORT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint16(t+o*n,!0)};case S$14.INT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getInt32(t+o*n,!0)};case S$14.UNSIGNED_INT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getUint32(t+o*n,!0)};case S$14.FLOAT:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getFloat32(t+o*n,!0)};case S$14.DOUBLE:return function(e,t,i,n,r){for(var o=0;o<i;++o)r[o]=e.getFloat64(t+o*n,!0)}}}function B$y(e,t){var i=e.bufferViews,n=e.buffers,r=t.bufferView,o=r$B(t.type);if(!e$2e(t.bufferView))return{min:d$1s(new Array(o),0),max:d$1s(new Array(o),0)};for(var a=d$1s(new Array(o),Number.POSITIVE_INFINITY),s=d$1s(new Array(o),Number.NEGATIVE_INFINITY),l=i[r],u=n[l.buffer].extras._pipeline.source,c=t.count,h=p$A(e,t),d=t.byteOffset+l.byteOffset+u.byteOffset,f=t.componentType,p=S$14.getSizeInBytes(f),_=new DataView(u.buffer),m=new Array(o),g=c$y(f),x=0;x<c;x++){g(_,d,o,p,m);for(var y=0;y<o;y++){var v=m[y];a[y]=Math.min(a[y],v),s[y]=Math.max(s[y],v)}d+=h}return{min:a,max:s}}var E$D=[de$y.FUNC_ADD,de$y.FUNC_ADD],p$z=[de$y.ONE,de$y.ZERO,de$y.ONE,de$y.ZERO];function O$t(e,t){var i=e.enable;return!!e$2e(i)&&i.indexOf(t)>-1}var N$u=[de$y.ZERO,de$y.ONE,de$y.SRC_COLOR,de$y.ONE_MINUS_SRC_COLOR,de$y.SRC_ALPHA,de$y.ONE_MINUS_SRC_ALPHA,de$y.DST_ALPHA,de$y.ONE_MINUS_DST_ALPHA,de$y.DST_COLOR,de$y.ONE_MINUS_DST_COLOR];function L$H(e,t){if(!e$2e(e))return t;for(var i=0;i<4;i++)if(-1===N$u.indexOf(e[i]))return t;return e}function R$v(e){var t={},i={};return e$2e(e.techniques)&&(e$L.technique(e,(function(e,n){var r=e.states;if(e$2e(r)){var o=i[n]={};if(O$t(r,de$y.BLEND)){o.alphaMode="BLEND";var a=r.functions;e$2e(a)&&(e$2e(a.blendEquationSeparate)||e$2e(a.blendFuncSeparate))&&(t[n]={blendEquation:u$Z(a.blendEquationSeparate,E$D),blendFactors:L$H(a.blendFuncSeparate,p$z)})}O$t(r,de$y.CULL_FACE)||(o.doubleSided=!0),delete e.states}})),Object.keys(t).length>0&&(e$2e(e.extensions)||(e.extensions={}),i$D(e,"KHR_blend")),e$L.material(e,(function(e){if(e$2e(e.technique)){var n=i[e.technique];e$L.objectLegacy(n,(function(t,i){e[i]=t}));var r=t[e.technique];e$2e(r)&&(e$2e(e.extensions)||(e.extensions={}),e.extensions.KHR_blend=r)}}))),e}function s$x(e,t){var i=e.extensionsRequired;e$2e(i)||(i=[],e.extensionsRequired=i),d$P(i,t,!0),i$D(e,t)}function R$u(e){var t=e.techniques,i={},n={};if(e$2e(t)){var r={programs:[],shaders:[],techniques:[]},o=e.glExtensionsUsed;delete e.glExtensionsUsed,e$L.technique(e,(function(t,a){var s,l={name:t.name,program:void 0,attributes:{},uniforms:{}};e$L.techniqueAttribute(t,(function(e,i){s=t.parameters[e],l.attributes[i]={semantic:s.semantic}})),e$L.techniqueUniform(t,(function(e,n){s=t.parameters[e],l.uniforms[n]={count:s.count,node:s.node,type:s.type,semantic:s.semantic,value:s.value},i[e]=n}));var u=e.programs[t.program],c={name:u.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:o},h=e.shaders[u.fragmentShader];c.fragmentShader=d$P(r.shaders,h,!0);var d=e.shaders[u.vertexShader];c.vertexShader=d$P(r.shaders,d,!0),l.program=d$P(r.programs,c),n[a]=d$P(r.techniques,l)})),r.techniques.length>0&&(e$2e(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,i$D(e,"KHR_techniques_webgl"),s$x(e,"KHR_techniques_webgl"))}return e$L.material(e,(function(e){if(e$2e(e.technique)){var t={technique:n[e.technique]};e$L.objectLegacy(e.values,(function(e,n){e$2e(t.values)||(t.values={});var r=i[n];t.values[r]=e})),e$2e(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=t}delete e.technique,delete e.values})),delete e.techniques,delete e.programs,delete e.shaders,e}var b$I=["mesh","node","material","accessor","bufferView","buffer"];function d$L(e,t){return t=u$Z(t,b$I),b$I.forEach((function(i){t.indexOf(i)>-1&&p$y(e,i)})),e}var _$v={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",node:"nodes",material:"materials",mesh:"meshes"};function p$y(e,t){var i=e[_$v[t]];if(e$2e(i))for(var n=0,r=m$A[t](e),o=i.length,a=0;a<o;++a)r[a]||(a$z[t](e,a-n),n++)}function a$z(){}function m$A(){}function v$x(e,t){return!(e$2e(t.mesh)||e$2e(t.camera)||e$2e(t.skin)||e$2e(t.weights)||e$2e(t.extras)||e$2e(t.extensions)&&0!==t.extensions.length)&&(!e$2e(t.children)||0===t.children.filter((function(t){return!v$x(e,e.nodes[t])})).length)}function a$y(e,t){var i={byteLength:t.length,extras:{_pipeline:{source:t}}},n={buffer:d$P(e.buffers,i),byteOffset:0,byteLength:t.length};return d$P(e.bufferViews,n)}function T$B(e,t){var i=p$A(e,t),n=S$14.getSizeInBytes(t.componentType),r=r$B(t.type),o=t.count,a=new Array(r*o);if(!e$2e(t.bufferView))return d$1s(a,0),a;for(var s=e.bufferViews[t.bufferView],l=e.buffers[s.buffer].extras._pipeline.source,u=t.byteOffset+s.byteOffset+l.byteOffset,c=new DataView(l.buffer),h=new Array(r),d=c$y(t.componentType),f=0;f<o;++f){d(c,u,r,n,h);for(var p=0;p<r;++p)a[f*r+p]=h[p];u+=i}return a}function T$A(e){var t;return e$L.accessorWithSemantic(e,"JOINTS_0",(function(i){var n=e.accessors[i];(t=n.componentType)===de$y.BYTE?t$u(e,n,S$14.UNSIGNED_BYTE):t!==de$y.UNSIGNED_BYTE&&t!==de$y.UNSIGNED_SHORT&&t$u(e,n,S$14.UNSIGNED_SHORT)})),e$L.accessorWithSemantic(e,"WEIGHTS_0",(function(i){var n=e.accessors[i];(t=n.componentType)===de$y.BYTE?t$u(e,n,S$14.UNSIGNED_BYTE):t===de$y.SHORT&&t$u(e,n,S$14.UNSIGNED_SHORT)})),e}function t$u(e,t,i){var n=S$14.createTypedArray(i,T$B(e,t)),r=new Uint8Array(n.buffer);t.bufferView=a$y(e,r),t.componentType=i,t.byteOffset=0}a$z.accessor=function(e,t){e.accessors.splice(t,1),e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$L.meshPrimitiveAttribute(e,(function(i,n){i>t&&e.attributes[n]--})),e$L.meshPrimitiveTarget(e,(function(e){e$L.meshPrimitiveTargetAttribute(e,(function(i,n){i>t&&e[n]--}))}));var i=e.indices;e$2e(i)&&i>t&&e.indices--}))})),e$L.skin(e,(function(e){e$2e(e.inverseBindMatrices)&&e.inverseBindMatrices>t&&e.inverseBindMatrices--})),e$L.animation(e,(function(e){e$L.animationSampler(e,(function(e){e$2e(e.input)&&e.input>t&&e.input--,e$2e(e.output)&&e.output>t&&e.output--}))}))},a$z.buffer=function(e,t){e.buffers.splice(t,1),e$L.bufferView(e,(function(e){e$2e(e.buffer)&&e.buffer>t&&e.buffer--}))},a$z.bufferView=function(e,t){e.bufferViews.splice(t,1),e$L.accessor(e,(function(e){e$2e(e.bufferView)&&e.bufferView>t&&e.bufferView--})),e$L.shader(e,(function(e){e$2e(e.bufferView)&&e.bufferView>t&&e.bufferView--})),e$L.image(e,(function(e){e$2e(e.bufferView)&&e.bufferView>t&&e.bufferView--,e$L.compressedImage(e,(function(e){var i=e.bufferView;e$2e(i)&&i>t&&e.bufferView--}))})),i$E(e,"KHR_draco_mesh_compression")&&e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$2e(e.extensions)&&e$2e(e.extensions.KHR_draco_mesh_compression)&&e.extensions.KHR_draco_mesh_compression.bufferView>t&&e.extensions.KHR_draco_mesh_compression.bufferView--}))}))},a$z.mesh=function(e,t){e.meshes.splice(t,1),e$L.node(e,(function(e){e$2e(e.mesh)&&(e.mesh>t?e.mesh--:e.mesh===t&&delete e.mesh)}))},a$z.node=function(e,t){e.nodes.splice(t,1),e$L.skin(e,(function(e){e$2e(e.skeleton)&&e.skeleton>t&&e.skeleton--,e.joints=e.joints.map((function(e){return e>t?e-1:e}))})),e$L.animation(e,(function(e){e$L.animationChannel(e,(function(e){e$2e(e.target)&&e$2e(e.target.node)&&e.target.node>t&&e.target.node--}))})),e$L.technique(e,(function(e){e$L.techniqueUniform(e,(function(e){e$2e(e.node)&&e.node>t&&e.node--}))})),e$L.node(e,(function(e){!e$2e(e.children)||(e.children=e.children.filter((function(e){return e!==t})).map((function(e){return e>t?e-1:e})))})),e$L.scene(e,(function(e){e.nodes=e.nodes.filter((function(e){return e!==t})).map((function(e){return e>t?e-1:e}))}))},a$z.material=function(e,t){e.materials.splice(t,1),e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$2e(e.material)&&e.material>t&&e.material--}))}))},m$A.accessor=function(e){var t={};return e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$L.meshPrimitiveAttribute(e,(function(e){t[e]=!0})),e$L.meshPrimitiveTarget(e,(function(e){e$L.meshPrimitiveTargetAttribute(e,(function(e){t[e]=!0}))}));var i=e.indices;e$2e(i)&&(t[i]=!0)}))})),e$L.skin(e,(function(e){e$2e(e.inverseBindMatrices)&&(t[e.inverseBindMatrices]=!0)})),e$L.animation(e,(function(e){e$L.animationSampler(e,(function(e){e$2e(e.input)&&(t[e.input]=!0),e$2e(e.output)&&(t[e.output]=!0)}))})),t},m$A.buffer=function(e){var t={};return e$L.bufferView(e,(function(e){e$2e(e.buffer)&&(t[e.buffer]=!0)})),t},m$A.bufferView=function(e){var t={};return e$L.accessor(e,(function(e){e$2e(e.bufferView)&&(t[e.bufferView]=!0)})),e$L.shader(e,(function(e){e$2e(e.bufferView)&&(t[e.bufferView]=!0)})),e$L.image(e,(function(e){e$2e(e.bufferView)&&(t[e.bufferView]=!0),e$L.compressedImage(e,(function(e){e$2e(e.bufferView)&&(t[e.bufferView]=!0)}))})),i$E(e,"KHR_draco_mesh_compression")&&e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$2e(e.extensions)&&e$2e(e.extensions.KHR_draco_mesh_compression)&&(t[e.extensions.KHR_draco_mesh_compression.bufferView]=!0)}))})),t},m$A.mesh=function(e){var t={};return e$L.node(e,(function(i){if(e$2e(i.mesh&&e$2e(e.meshes))){var n=e.meshes[i.mesh];e$2e(n)&&e$2e(n.primitives)&&n.primitives.length>0&&(t[i.mesh]=!0)}})),t},m$A.node=function(e){var t={};return e$L.node(e,(function(i,n){v$x(e,i)||(t[n]=!0)})),e$L.skin(e,(function(e){e$2e(e.skeleton)&&(t[e.skeleton]=!0),e$L.skinJoint(e,(function(e){t[e]=!0}))})),e$L.animation(e,(function(e){e$L.animationChannel(e,(function(e){e$2e(e.target)&&e$2e(e.target.node)&&(t[e.target.node]=!0)}))})),e$L.technique(e,(function(e){e$L.techniqueUniform(e,(function(e){e$2e(e.node)&&(t[e.node]=!0)}))})),t},m$A.material=function(e){var t={};return e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$2e(e.material)&&(t[e.material]=!0)}))})),t};var V$t={.8:se$k,"1.0":Re$e,"2.0":void 0};function re$s(e,t){var i=(t=u$Z(t,u$Z.EMPTY_OBJECT)).targetVersion,n=e.version;e.asset=u$Z(e.asset,{version:"1.0"}),e.asset.version=u$Z(e.asset.version,"1.0"),n=u$Z(n,e.asset.version).toString(),Object.prototype.hasOwnProperty.call(V$t,n)||(e$2e(n)&&(n=n.substring(0,3)),Object.prototype.hasOwnProperty.call(V$t,n)||(n="1.0"));for(var r=V$t[n];e$2e(r)&&n!==i;)r(e,t),n=e.asset.version,r=V$t[n];return e}function F$E(e){var t=e.materials;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.instanceTechnique;e$2e(r)&&(n.technique=r.technique,n.values=r.values,delete n.instanceTechnique)}}function ie$n(e){var t=e.meshes;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i].primitives;if(e$2e(n))for(var r=n.length,o=0;o<r;++o){var a=n[o],s=u$Z(a.primitive,de$y.TRIANGLES);a.mode=u$Z(a.mode,s),delete a.primitive}}}function ne$p(e){var t=e.nodes,i=new o$1p,n=new n$15;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var o=t[r];if(e$2e(o.rotation)){var a=o.rotation;o$1p.fromArray(a,0,i),n$15.fromAxisAngle(i,a[3],n),o.rotation=[n.x,n.y,n.z,n.w]}var s=o.instanceSkin;e$2e(s)&&(o.skeletons=s.skeletons,o.skin=s.skin,o.meshes=s.meshes,delete o.instanceSkin)}}function te$p(e){var t=e.animations,i=e.accessors,n=e.bufferViews,r=e.buffers,o={},a=new o$1p,s=new n$15;for(var l in t)if(Object.prototype.hasOwnProperty.call(t,l)){var u=t[l],c=u.channels,h=u.parameters,d=u.samplers;if(e$2e(c))for(var f=c.length,p=0;p<f;++p){var _=c[p];if("rotation"===_.target.path){var m=h[d[_.sampler].output];if(e$2e(o[m]))continue;o[m]=!0;for(var g=i[m],x=n[g.bufferView],y=r[x.buffer].extras._pipeline.source,v=y.byteOffset+x.byteOffset+g.byteOffset,$=g.componentType,b=g.count,T=r$B(g.type),C=g.count*T,S=S$14.createArrayBufferView($,y.buffer,v,C),w=0;w<b;w++){var E=w*T;o$1p.unpack(S,E,a);var P=S[E+3];n$15.fromAxisAngle(a,P,s),n$15.pack(s,S,E)}}}}}function ae$l(e){var t=e.techniques;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.passes;if(e$2e(r)){var o=u$Z(n.pass,"defaultPass");if(Object.prototype.hasOwnProperty.call(r,o)){var a=r[o],s=a.instanceProgram;n.attributes=u$Z(n.attributes,s.attributes),n.program=u$Z(n.program,s.program),n.uniforms=u$Z(n.uniforms,s.uniforms),n.states=u$Z(n.states,a.states)}delete n.passes,delete n.pass}}}function se$k(e){e$2e(e.asset)||(e.asset={});var t=e.asset;if(t.version="1.0","string"==typeof t.profile){var i=t.profile.split(" ");t.profile={api:i[0],version:i[1]}}else t.profile={};if(e$2e(e.version)&&delete e.version,F$E(e),ie$n(e),ne$p(e),te$p(e),ae$l(e),e$2e(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions),e$2e(e.lights)){var n=u$Z(e.extensions,{});e.extensions=n;var r=u$Z(n.KHR_materials_common,{});n.KHR_materials_common=r,r.lights=e.lights,delete e.lights,i$D(e,"KHR_materials_common")}}function oe$j(e){var t=e.animations;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=n.parameters;if(e$2e(r)){var o=n.samplers;for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)){var s=o[a];s.input=r[s.input],s.output=r[s.output]}delete n.parameters}}}function K$y(e,t){var i=[];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];t[n]=i.length,i.push(r),e$2e(r.name)||(r.name=n)}return i}function fe$k(e){var t,i,n={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}},r={},o=e.nodes;for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e$2e(i=o[a].jointName)&&(r[i]=a));for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&e$2e(n[s])){var l={},u=e[s];e[s]=K$y(u,l),n[s]=l}for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&(r[i]=n.nodes[r[i]]);e$2e(e.scene)&&(e.scene=n.scenes[e.scene]),e$L.bufferView(e,(function(e){e$2e(e.buffer)&&(e.buffer=n.buffers[e.buffer])})),e$L.accessor(e,(function(e){e$2e(e.bufferView)&&(e.bufferView=n.bufferViews[e.bufferView])})),e$L.shader(e,(function(e){var t=e.extensions;if(e$2e(t)){var i=t.KHR_binary_glTF;e$2e(i)&&(e.bufferView=n.bufferViews[i.bufferView],delete t.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}})),e$L.program(e,(function(e){e$2e(e.vertexShader)&&(e.vertexShader=n.shaders[e.vertexShader]),e$2e(e.fragmentShader)&&(e.fragmentShader=n.shaders[e.fragmentShader])})),e$L.technique(e,(function(e){e$2e(e.program)&&(e.program=n.programs[e.program]),e$L.techniqueParameter(e,(function(e){e$2e(e.node)&&(e.node=n.nodes[e.node]);var t=e.value;"string"==typeof t&&(e.value={index:n.textures[t]})}))})),e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$2e(e.indices)&&(e.indices=n.accessors[e.indices]),e$L.meshPrimitiveAttribute(e,(function(t,i){e.attributes[i]=n.accessors[t]})),e$2e(e.material)&&(e.material=n.materials[e.material])}))})),e$L.node(e,(function(i){var r=i.children;if(e$2e(r)){var o=r.length;for(t=0;t<o;++t)r[t]=n.nodes[r[t]]}if(e$2e(i.meshes)){var a=i.meshes,s=a.length;if(s>0)for(i.mesh=n.meshes[a[0]],t=1;t<s;++t){var l={mesh:n.meshes[a[t]]},u=d$P(e.nodes,l);e$2e(r)||(r=[],i.children=r),r.push(u)}delete i.meshes}if(e$2e(i.camera)&&(i.camera=n.cameras[i.camera]),e$2e(i.skin)&&(i.skin=n.skins[i.skin]),e$2e(i.skeletons)){var c=i.skeletons;if(c.length>0&&e$2e(i.skin))e.skins[i.skin].skeleton=n.nodes[c[0]];delete i.skeletons}e$2e(i.jointName)&&delete i.jointName})),e$L.skin(e,(function(e){e$2e(e.inverseBindMatrices)&&(e.inverseBindMatrices=n.accessors[e.inverseBindMatrices]);var i=e.jointNames;if(e$2e(i)){var o=[],a=i.length;for(t=0;t<a;++t)o[t]=r[i[t]];e.joints=o,delete e.jointNames}})),e$L.scene(e,(function(e){var i=e.nodes;if(e$2e(i)){var r=i.length;for(t=0;t<r;++t)i[t]=n.nodes[i[t]]}})),e$L.animation(e,(function(e){var t={};e.samplers=K$y(e.samplers,t),e$L.animationSampler(e,(function(e){e.input=n.accessors[e.input],e.output=n.accessors[e.output]})),e$L.animationChannel(e,(function(e){e.sampler=t[e.sampler];var i=e.target;e$2e(i)&&(i.node=n.nodes[i.id],delete i.id)}))})),e$L.material(e,(function(e){e$2e(e.technique)&&(e.technique=n.techniques[e.technique]),e$L.materialValue(e,(function(t,i){"string"==typeof t&&(e.values[i]={index:n.textures[t]})}));var t=e.extensions;if(e$2e(t)){var i=t.KHR_materials_common;e$2e(i)&&e$L.materialValue(i,(function(e,t){"string"==typeof e&&(i.values[t]={index:n.textures[e]})}))}})),e$L.image(e,(function(e){var t=e.extensions;if(e$2e(t)){var i=t.KHR_binary_glTF;e$2e(i)&&(e.bufferView=n.bufferViews[i.bufferView],e.mimeType=i.mimeType,delete t.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}e$L.compressedImage(e,(function(e){var i=e.extensions;if(e$2e(i)){var r=i.KHR_binary_glTF;e$2e(r)&&(e.bufferView=n.bufferViews[r.bufferView],e.mimeType=r.mimeType,delete i.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}}))})),e$L.texture(e,(function(e){e$2e(e.sampler)&&(e.sampler=n.samplers[e.sampler]),e$2e(e.source)&&(e.source=n.images[e.source])}))}function ue$m(e){e$L.animation(e,(function(e){e$L.animationSampler(e,(function(e){delete e.name}))}))}function ve$i(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];Array.isArray(i)&&0===i.length&&delete e[t]}e$L.node(e,(function(e){e$2e(e.children)&&0===e.children.length&&delete e.children}))}function ce$k(e){var t=e.asset;delete t.profile,delete t.premultipliedAlpha}var me$l={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function pe$m(e){var t=e.extensionsUsed;if(e.extensionsRequired=u$Z(e.extensionsRequired,[]),e$2e(t))for(var i=t.length,n=0;n<i;++n){var r=t[n];e$2e(me$l[r])&&e.extensionsRequired.push(r)}}function be$i(e){e$L.buffer(e,(function(e){delete e.type}))}function he$i(e){e$L.texture(e,(function(e){delete e.format,delete e.internalFormat,delete e.target,delete e.type}))}function ye$d(e){e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){e$L.meshPrimitiveAttribute(e,(function(t,i){"TEXCOORD"===i?e.attributes.TEXCOORD_0=t:"COLOR"===i&&(e.attributes.COLOR_0=t)})),delete e.attributes.TEXCOORD,delete e.attributes.COLOR}))})),e$L.technique(e,(function(e){e$L.techniqueParameter(e,(function(e){var t=e.semantic;e$2e(t)&&("TEXCOORD"===t?e.semantic="TEXCOORD_0":"COLOR"===t&&(e.semantic="COLOR_0"))}))}))}var Oe$f={POSITION:!0,NORMAL:!0,TANGENT:!0},le$m={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function de$g(e){var t={};e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){for(var i in e$L.meshPrimitiveAttribute(e,(function(e,i){if("_"!==i.charAt(0)){var n=i.search(/_[0-9]+/g),r=i,o="_0";n>=0&&(r=i.substring(0,n),o=i.substring(n));var a,s=le$m[r];e$2e(s)?(a=s+o,t[i]=a):e$2e(Oe$f[r])||(a="_"+i,t[i]=a)}})),t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i],r=e.attributes[i];e$2e(r)&&(delete e.attributes[i],e.attributes[n]=r)}}))})),e$L.technique(e,(function(e){e$L.techniqueParameter(e,(function(e){var i=t[e.semantic];e$2e(i)&&(e.semantic=i)}))}))}function Te$f(e){e$L.camera(e,(function(e){var t=e.perspective;if(e$2e(t)){var i=t.aspectRatio;e$2e(i)&&0===i&&delete t.aspectRatio;var n=t.yfov;e$2e(n)&&0===n&&(t.yfov=1)}}))}function C$D(e,t){return e$2e(t.byteStride)&&0!==t.byteStride?t.byteStride:p$A(e,t)}function we$e(e){e$L.buffer(e,(function(e){e$2e(e.byteLength)||(e.byteLength=e.extras._pipeline.source.length)})),e$L.accessor(e,(function(t){var i=t.bufferView;if(e$2e(i)){var n=e.bufferViews[i],r=C$D(e,t),o=t.byteOffset+t.count*r;n.byteLength=Math.max(u$Z(n.byteLength,0),o)}}))}function xe$e(e){var t,i,n,r=e.bufferViews,o={};e$L.accessorContainingVertexAttributeData(e,(function(t){var i=e.accessors[t];e$2e(i.bufferView)&&(o[i.bufferView]=!0)}));var a={};for(var s in e$L.accessor(e,(function(e){e$2e(e.bufferView)&&(a[e.bufferView]=u$Z(a[e.bufferView],[]),a[e.bufferView].push(e))})),a)if(Object.prototype.hasOwnProperty.call(a,s)){n=r[s];var l=a[s];l.sort((function(e,t){return e.byteOffset-t.byteOffset}));var u=0,c=0,h=l.length;for(t=0;t<h;++t){var d=l[t],f=C$D(e,d),p=d.byteOffset,_=d.count*f;delete d.byteStride;var m=t<h-1;if(f!==(m?C$D(e,l[t+1]):void 0)){var g=l$1f(n,!0);o[s]&&(g.byteStride=f),g.byteOffset+=u,g.byteLength=p+_-u;var x=d$P(r,g);for(i=c;i<=t;++i)(d=l[i]).bufferView=x,d.byteOffset=d.byteOffset-u;u=m?l[t+1].byteOffset:void 0,c=t+1}}}d$L(e,["accessor","bufferView","buffer"])}function Ae$h(e){e$L.accessorWithSemantic(e,"POSITION",(function(t){var i=e.accessors[t];if(!e$2e(i.min)||!e$2e(i.max)){var n=B$y(e,i);i.min=n.min,i.max=n.max}}))}function D$A(e){return(!e$2e(e.children)||0===e.children.length)&&(!e$2e(e.meshes)||0===e.meshes.length)&&!e$2e(e.camera)&&!e$2e(e.skin)&&!e$2e(e.skeletons)&&!e$2e(e.jointName)&&(!e$2e(e.translation)||o$1p.fromArray(e.translation).equals(o$1p.ZERO))&&(!e$2e(e.scale)||o$1p.fromArray(e.scale).equals(new o$1p(1,1,1)))&&(!e$2e(e.rotation)||e$2c.fromArray(e.rotation).equals(new e$2c(0,0,0,1)))&&(!e$2e(e.matrix)||p$1d.fromColumnMajorArray(e.matrix).equals(p$1d.IDENTITY))&&!e$2e(e.extensions)&&!e$2e(e.extras)}function L$G(e,t){e$L.scene(e,(function(e){var i=e.nodes;if(e$2e(i))for(var n=i.length;n>=0;--n)if(i[n]===t)return void i.splice(n,1)})),e$L.node(e,(function(i,n){if(e$2e(i.children)){var r=i.children.indexOf(t);r>-1&&(i.children.splice(r,1),D$A(i)&&L$G(e,n))}})),delete e.nodes[t]}function _e$h(e){return e$L.node(e,(function(t,i){D$A(t)&&L$G(e,i)})),e}function Pe$c(e){e$L.animation(e,(function(t){e$L.animationSampler(t,(function(t){var i=e.accessors[t.input];if(!e$2e(i.min)||!e$2e(i.max)){var n=B$y(e,i);i.min=n.min,i.max=n.max}}))}))}function Re$e(e){e.asset=u$Z(e.asset,{}),e.asset.version="2.0",F$E(e),oe$j(e),_e$h(e),fe$k(e),ue$m(e),ce$k(e),pe$m(e),we$e(e),xe$e(e),Ae$h(e),Pe$c(e),be$i(e),he$i(e),ye$d(e),de$g(e),T$A(e),Te$f(e),R$v(e),R$u(e),ve$i(e)}function t$t(){this.initialized=!1,this.resourcesParsed=!1,this.vertexBuffersToCreate=new r$17,this.indexBuffersToCreate=new r$17,this.buffers={},this.pendingBufferLoads=0,this.programsToCreate=new r$17,this.shaders={},this.pendingShaderLoads=0,this.texturesToCreate=new r$17,this.pendingTextureLoads=0,this.texturesToCreateFromBufferView=new r$17,this.pendingBufferViewToImage=0,this.createSamplers=!0,this.createSkins=!0,this.createRuntimeAnimations=!0,this.createVertexArrays=!0,this.createRenderStates=!0,this.createUniformMaps=!0,this.createRuntimeNodes=!0,this.createdBufferViews={},this.primitivesToDecode=new r$17,this.activeDecodingTasks=0,this.pendingDecodingCache=!1,this.skinnedNodesIds=[]}function s$w(e,t,i){return e.subarray(t,t+i)}t$t.prototype.getBuffer=function(e){return s$w(this.buffers[e.buffer],e.byteOffset,e.byteLength)},t$t.prototype.finishedPendingBufferLoads=function(){return 0===this.pendingBufferLoads},t$t.prototype.finishedBuffersCreation=function(){return 0===this.pendingBufferLoads&&0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length},t$t.prototype.finishedProgramCreation=function(){return 0===this.pendingShaderLoads&&0===this.programsToCreate.length},t$t.prototype.finishedTextureCreation=function(){var e=0===this.pendingTextureLoads,t=0===this.texturesToCreate.length&&0===this.texturesToCreateFromBufferView.length;return e&&t},t$t.prototype.finishedEverythingButTextureCreation=function(){var e=0===this.pendingBufferLoads&&0===this.pendingShaderLoads,t=0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length&&0===this.programsToCreate.length&&0===this.pendingBufferViewToImage;return this.finishedDecoding()&&e&&t},t$t.prototype.finishedDecoding=function(){return 0===this.primitivesToDecode.length&&0===this.activeDecodingTasks&&!this.pendingDecodingCache},t$t.prototype.finished=function(){return this.finishedDecoding()&&this.finishedTextureCreation()&&this.finishedEverythingButTextureCreation()};var s$v={updateForwardAxis:function(e){var t=e.gltf.extras.sourceVersion;(e$2e(t)&&"2.0"!==t||"2.0"!==s$v.getAssetVersion(e.gltf))&&(e._gltfForwardAxis=v$y.X)},getAssetVersion:function(e){return e$2e(e.asset)&&e$2e(e.asset.version)?e.asset.version:"1.0"},splitIncompatibleMaterials:function(e){var t=e.accessors,i=e.materials,n={};return e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){var r,o,a=e.material,s=i[a],l=e.attributes.JOINTS_0;if(e$2e(l)){var u=t[l];r=u.componentType,o=u.type}var c=e$2e(l),h=e$2e(e.attributes.COLOR_0),d=e$2e(e.targets),f=e$2e(e.attributes.NORMAL),p=e$2e(e.attributes.TANGENT),_=e$2e(e.attributes.TEXCOORD_0),m=_&&e$2e(e.attributes.TEXCOORD_1),g=n[a];if(e$2e(g)){if(g.skinning.skinned!==c||g.skinning.type!==o||g.hasVertexColors!==h||g.hasMorphTargets!==d||g.hasNormals!==f||g.hasTangents!==p||g.hasTexCoords!==_||g.hasTexCoord1!==m){var x=l$1f(s,!0);a=d$P(i,x),e.material=a,n[a]={skinning:{skinned:c,componentType:r,type:o},hasVertexColors:h,hasMorphTargets:d,hasNormals:f,hasTangents:p,hasTexCoords:_,hasTexCoord1:m}}}else n[a]={skinning:{skinned:c,componentType:r,type:o},hasVertexColors:h,hasMorphTargets:d,hasNormals:f,hasTangents:p,hasTexCoords:_,hasTexCoord1:m}}))})),n},getShaderVariable:function(e){return"SCALAR"===e?"float":e.toLowerCase()},ModelState:{NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3},getFailedLoadFunction:function(e,t,i){return function(n){e._state=s$v.ModelState.FAILED;var r="Failed to load "+t+": "+i;e$2e(n)&&(r+="\n"+n.message),e._readyPromise.reject(new t$13(r))}},parseBuffers:function(e,t){var i=e._loadResources;e$L.buffer(e.gltf,(function(n,r){if(e$2e(n.extras._pipeline.source))i.buffers[r]=n.extras._pipeline.source;else if(e$2e(t)){var o=e._resource.getDerivedResource({url:n.uri});++i.pendingBufferLoads,o.fetchArrayBuffer().then(t(e,r)).otherwise(s$v.getFailedLoadFunction(e,"buffer",o.url))}}))}},cn$2=new o$1p,fn$2=new o$1p;function vn$2(e,t){return e$L.techniqueAttribute(e,(function(e,i){if(e.semantic===t)return i}))}function _n$2(e,t){var i=e.accessors,n=e.materials,r=e.extensions.KHR_techniques_webgl,o=r.techniques,a=r.programs,s=r.shaders,l=t.targets,u=t.attributes;for(var c in l)if(l.hasOwnProperty(c)){var h=l[c];for(var d in h)"extras"!==d&&(u[d+"_"+c]=h[d])}var f=o[n[t.material].extensions.KHR_techniques_webgl.technique],p=s[a[f.program].vertexShader];for(var _ in u)if(u.hasOwnProperty(_)&&!e$2e(vn$2(f,_))){var m=i[u[_]],g=_.toLowerCase();"_"===g.charAt(0)&&(g=g.slice(1));var x="a_"+g;f.attributes[x]={semantic:_,type:m.componentType};var y=p.extras._pipeline,v=y.source;v="attribute "+s$v.getShaderVariable(m.type)+" "+x+";\n"+v,y.source=v}}function tn$3(e,t,i,n){return i$E(e,"KHR_techniques_webgl")?function(e,t){if(!(e.semantic!==i||n&&e$2e(e.node)))return t}:function(e,r){var o=t.parameters[e];if(!(o.semantic!==i||n&&e$2e(o.node)))return r}}s$v.computeBoundingSphere=function(e){for(var t=e.gltf,i=t.nodes,n=t.meshes,r=t.scenes[t.scene].nodes,o=r.length,a=[],s=new o$1p(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),l=new o$1p(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),u=0;u<o;++u){var c=i[r[u]];for(c._transformToRoot=s$v.getTransform(c),a.push(c);a.length>0;){var h=(c=a.pop())._transformToRoot,d=c.mesh;if(e$2e(d))for(var f=n[d].primitives,p=f.length,_=0;_<p;++_){var m=f[_].attributes.POSITION;if(e$2e(m)){var g=s$v.getAccessorMinMax(t,m),x=o$1p.fromArray(g.min,0,cn$2),y=o$1p.fromArray(g.max,0,fn$2);e$2e(s)&&e$2e(l)&&(p$1d.multiplyByPoint(h,x,x),p$1d.multiplyByPoint(h,y,y),o$1p.minimumByComponent(s,x,s),o$1p.maximumByComponent(l,y,l))}}var v=c.children;if(e$2e(v))for(var $=v.length,b=0;b<$;++b){var T=i[v[b]];T._transformToRoot=s$v.getTransform(T),p$1d.multiplyTransformation(h,T._transformToRoot,T._transformToRoot),a.push(T)}delete c._transformToRoot}}var C=i$1d.fromCornerPoints(s,l);return e._minCorner=s,e._maxCorner=l,e._forwardAxis===v$y.Z&&i$1d.transformWithoutScale(C,v$y.Z_UP_TO_X_UP,C),e._upAxis===v$y.Y?i$1d.transformWithoutScale(C,v$y.Y_UP_TO_Z_UP,C):e._upAxis===v$y.X&&i$1d.transformWithoutScale(C,v$y.X_UP_TO_Z_UP,C),C},s$v.ensureSemanticExistence=function(e){return e$L.mesh(e,(function(t){e$L.meshPrimitive(t,(function(t){_n$2(e,t)}))})),e},s$v.createAttributeLocations=function(e,t){var i={},n=!1,r=1;if(e$L.techniqueAttribute(e,(function(e,t){/pos/i.test(t)&&!n?(i[t]=0,n=!0):i[t]=r++})),e$2e(t))for(var o in t)t.hasOwnProperty(o)&&(i[o]=r++);return i},s$v.getAccessorMinMax=function(e,t){var i=e.accessors[t],n=i.extensions,r=i.min,o=i.max;if(e$2e(n)){var a=n.WEB3D_quantized_attributes;e$2e(a)&&(r=a.decodedMin,o=a.decodedMax)}return{min:r,max:o}},s$v.getAttributeOrUniformBySemantic=function(e,t,i,n){return e$L.technique(e,(function(r){if(!e$2e(i)||r.program===i){var o=e$L.techniqueAttribute(r,tn$3(e,r,t,n));return e$2e(o)?o:e$L.techniqueUniform(r,tn$3(e,r,t,n))}}))},s$v.getDiffuseAttributeOrUniform=function(e,t){var i=s$v.getAttributeOrUniformBySemantic(e,"COLOR_0",t);return e$2e(i)||(i=s$v.getAttributeOrUniformBySemantic(e,"_3DTILESDIFFUSE",t)),i};var ln$2=new o$1p,mn$2=new n$15,hn$2=new o$1p;function N$t(e,t,i){t+="(?!\\w)",t=new RegExp(t,"g");var n=e.search(t);return e.replace(t,(function(e,t){return n===t?e:i}))}function En$2(e,t){var i=e.accessors[t].extensions;if(e$2e(i))return i.WEB3D_quantized_attributes}function on$2(e,t,i){var n=t.material,r=e.materials[n];if(i$E(e,"KHR_techniques_webgl")&&e$2e(r.extensions)&&e$2e(r.extensions.KHR_techniques_webgl)){var o=r.extensions.KHR_techniques_webgl.technique,a=e.extensions.KHR_techniques_webgl.techniques[o];return e$L.techniqueAttribute(a,(function(e,t){if(e.semantic===i)return t}))}}function D$z(e){var t={value:e,clone:function(e,t){return e},func:function(){return t.value}};return t}function K$x(e){var t={value:o$1o.fromArray(e),clone:o$1o.clone,func:function(){return t.value}};return t}function X$v(e){var t={value:o$1p.fromArray(e),clone:o$1p.clone,func:function(){return t.value}};return t}function d$K(e){var t={value:e$2c.fromArray(e),clone:e$2c.clone,func:function(){return t.value}};return t}function Y$t(e){var t={value:f$15.fromColumnMajorArray(e),clone:f$15.clone,func:function(){return t.value}};return t}function Z$y(e){var t={value:p$1e.fromColumnMajorArray(e),clone:p$1e.clone,func:function(){return t.value}};return t}function G$D(e){var t={value:p$1d.fromColumnMajorArray(e),clone:p$1d.clone,func:function(){return t.value}};return t}s$v.getTransform=function(e,t){return e$2e(e.matrix)?p$1d.fromColumnMajorArray(e.matrix,t):p$1d.fromTranslationQuaternionRotationScale(o$1p.fromArray(e.translation,0,ln$2),n$15.unpack(e.rotation,0,mn$2),o$1p.fromArray(e.scale,0,hn$2),t)},s$v.getUsedExtensions=function(e){var t=e.extensionsUsed,i={};if(e$2e(t))for(var n=t.length,r=0;r<n;r++){i[t[r]]=!0}return i},s$v.getRequiredExtensions=function(e){var t=e.extensionsRequired,i={};if(e$2e(t))for(var n=t.length,r=0;r<n;r++){i[t[r]]=!0}return i},s$v.supportedExtensions={AGI_articulations:!0,CESIUM_RTC:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_binary_glTF:!0,KHR_draco_mesh_compression:!0,KHR_materials_common:!0,KHR_techniques_webgl:!0,KHR_materials_unlit:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_texture_transform:!0,WEB3D_quantized_attributes:!0},s$v.checkSupportedExtensions=function(e,t){for(var i in e)if(e.hasOwnProperty(i)){if(!s$v.supportedExtensions[i])throw new t$13("Unsupported glTF Extension: "+i);if("EXT_texture_webp"===i&&!1===t)throw new t$13("Loaded model requires WebP but browser does not support it.")}},s$v.checkSupportedGlExtensions=function(e,t){if(e$2e(e))for(var i=e.length,n=0;n<i;n++){var r=e[n];if("OES_element_index_uint"!==r)throw new t$13("Unsupported WebGL Extension: "+r);if(!t.elementIndexUint)throw new t$13("OES_element_index_uint WebGL extension is not enabled.")}},s$v.modifyShaderForDracoQuantizedAttributes=function(e,t,i,n){var r={};for(var o in n)if(n.hasOwnProperty(o)){var a=n[o],s=a.quantization;if(!e$2e(s))continue;var l=on$2(e,t,o);"_"===o.charAt(0)&&(o=o.substring(1));var u="gltf_u_dec_"+o.toLowerCase();if(!e$2e(r[u])){var c,h="gltf_decoded_"+o,d=l.replace("a_","gltf_a_dec_"),f=a.componentsPerAttribute;i=N$t(i,l,d),i=(c=s.octEncoded?"vec3":f>1?"vec"+f:"float")+" "+d+";\n"+i;var p=3===f&&"COLOR_0"===o;p&&(i=N$t(i,d,"vec4("+d+", 1.0)"));var _="";if(s.octEncoded){var m=u+"_rangeConstant";i="uniform float "+m+";\n"+i,_="\nvoid main() {\n "+d+" = czm_octDecode("+l+".xy, "+m+").zxy;\n "+h+"();\n}\n"}else{var g=u+"_normConstant",x=u+"_min";i="uniform float "+g+";\nuniform "+c+" "+x+";\n"+i,_="\nvoid main() {\n "+d+" = "+x+" + "+l+(p?".xyz":"")+" * "+g+";\n "+h+"();\n}\n"}i=s$V.replaceMain(i,h),i+=_}}return{shader:i}},s$v.modifyShaderForQuantizedAttributes=function(e,t,i){var n={},r=t.attributes;for(var o in r)if(r.hasOwnProperty(o)){var a=on$2(e,t,o),s=t.attributes[o];"_"===o.charAt(0)&&(o=o.substring(1));var l="gltf_u_dec_"+o.toLowerCase(),u=l+"_scale",c=l+"_translate";if(!e$2e(n[l])&&!e$2e(n[u])){var h=En$2(e,s);if(e$2e(h)){var d,f=h.decodeMatrix,p="gltf_decoded_"+o,_=a.replace("a_","gltf_a_dec_"),m=Math.floor(Math.sqrt(f.length));i=(d=m>2?"vec"+(m-1):"float")+" "+_+";\n"+(i=N$t(i,a,_));var g="";5===m?(i="uniform vec4 "+c+";\n"+(i="uniform mat4 "+u+";\n"+i),g="\nvoid main() {\n "+_+" = "+u+" * "+a+" + "+c+";\n "+p+"();\n}\n",n[u]={mat:4},n[c]={vec:4}):(i="uniform mat"+m+" "+l+";\n"+i,g="\nvoid main() {\n "+_+" = "+d+"("+l+" * vec"+m+"("+a+",1.0));\n "+p+"();\n}\n",n[l]={mat:m}),i=s$V.replaceMain(i,p),i+=g}}}return{shader:i,uniforms:n}},s$v.toClipCoordinatesGLSL=function(e,t){var i=s$v.getAttributeOrUniformBySemantic(e,"POSITION"),n=i.replace("a_","gltf_a_dec_");-1!==t.indexOf(n)&&(i=n);var r=s$v.getAttributeOrUniformBySemantic(e,"MODELVIEWPROJECTION",void 0,!0);if(!e$2e(r)||-1===t.indexOf(r)){var o=s$v.getAttributeOrUniformBySemantic(e,"PROJECTION",void 0,!0),a=s$v.getAttributeOrUniformBySemantic(e,"MODELVIEW",void 0,!0);-1!==t.indexOf("czm_instanced_modelView ")?a="czm_instanced_modelView":e$2e(a)||(a=s$v.getAttributeOrUniformBySemantic(e,"CESIUM_RTC_MODELVIEW",void 0,!0)),r=o+" * "+a}return r+" * vec4("+i+".xyz, 1.0)"},s$v.modifyFragmentShaderForLogDepth=function(e){return e=s$V.replaceMain(e,"czm_depth_main"),e+="\nvoid main() \n{ \n czm_depth_main(); \n czm_writeLogDepth(); \n} \n"},s$v.modifyVertexShaderForLogDepth=function(e,t){return e=s$V.replaceMain(e,"czm_depth_main"),e+="\nvoid main() \n{ \n czm_depth_main(); \n czm_vertexLogDepth("+t+"); \n} \n"};var R$t=new e$2c;function un$2(e){var t={value:e,clone:e$2c.clone,func:function(){var e=performance.now()/1e3,i=t.value[4];if(i>0){var n=e%i;R$t.x=n*t.value[0]+t.value[1],R$t.y=n*t.value[2]+t.value[3]}else R$t.x=t.value[1],R$t.y=t.value[3];var r=t.value[9];if(r>0){var o=e%r;R$t.z=o*t.value[5]+t.value[6],R$t.w=o*t.value[7]+t.value[8]}else R$t.z=t.value[6],R$t.w=t.value[8];return R$t}};return t}function j$y(e,t,i){this._value=void 0,this._textureId=e.index,this._textures=t,this._defaultTexture=i}function pn$2(e,t,i){var n=new j$y(e,t,i);return n.func=function(){return n.value._texture?n.value:i},n}Object.defineProperties(j$y.prototype,{value:{get:function(){if(!e$2e(this._value)){var e=this._textures[this._textureId];if(!e$2e(e))return this._defaultTexture;this._value=e}return this._value},set:function(e){this._value=e}}}),j$y.prototype.clone=function(e){return e},j$y.prototype.func=void 0;var A$H={};A$H[de$y.FLOAT]=D$z,A$H[de$y.FLOAT_VEC2]=K$x,A$H[de$y.FLOAT_VEC3]=X$v,A$H[de$y.FLOAT_VEC4]=d$K,A$H[de$y.INT]=D$z,A$H[de$y.INT_VEC2]=K$x,A$H[de$y.INT_VEC3]=X$v,A$H[de$y.INT_VEC4]=d$K,A$H[de$y.BOOL]=D$z,A$H[de$y.BOOL_VEC2]=K$x,A$H[de$y.BOOL_VEC3]=X$v,A$H[de$y.BOOL_VEC4]=d$K,A$H[de$y.FLOAT_MAT2]=Y$t,A$H[de$y.FLOAT_MAT3]=Z$y,A$H[de$y.FLOAT_MAT4]=G$D,A$H[de$y.SAMPLER_2D]=pn$2;var z$y={};function gn$2(e){return[e[0],e[1],e[2],e[3],e[5],e[6],e[7],e[8],e[10],e[11],e[12],e[13],e[15],e[16],e[17],e[18]]}function On$2(e){return[e[20],e[21],e[22],e[23]]}z$y[ie$p.BASECOLOR_UV_OFFSET_AND_TILING]=un$2,z$y[ie$p.EMISSIVE_UV_OFFSET_AND_TILING]=un$2,s$v.createUniformFunction=function(e,t,i,n,r){return e$2e(r)?z$y[r](t,i,n):A$H[e](t,i,n)},s$v.createUniformsForDracoQuantizedAttributes=function(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i],r=n.quantization;if(!e$2e(r))continue;"_"===i.charAt(0)&&(i=i.substring(1));var o="gltf_u_dec_"+i.toLowerCase();if(r.octEncoded){var a=o+"_rangeConstant",s=(1<<r.quantizationBits)-1;t[a]=D$z(s).func;continue}var l=o+"_normConstant",u=r.range/(1<<r.quantizationBits);t[l]=D$z(u).func;var c=o+"_min";switch(n.componentsPerAttribute){case 1:t[c]=D$z(r.minValues).func;break;case 2:t[c]=K$x(r.minValues).func;break;case 3:t[c]=X$v(r.minValues).func;break;case 4:t[c]=d$K(r.minValues).func}}return t},s$v.createUniformsForQuantizedAttributes=function(e,t,i){var n=e.accessors,r={},o={},a=t.attributes;for(var s in a)if(a.hasOwnProperty(s)){var l=n[a[s]],u=l.extensions;if("_"===s.charAt(0)&&(s=s.substring(1)),e$2e(u)){var c=u.WEB3D_quantized_attributes;if(e$2e(c)){var h=c.decodeMatrix,d="gltf_u_dec_"+s.toLowerCase();switch(l.type){case Q$z.SCALAR:o[d]=Y$t(h).func,r[d]=!0;break;case Q$z.VEC2:o[d]=Z$y(h).func,r[d]=!0;break;case Q$z.VEC3:o[d]=G$D(h).func,r[d]=!0;break;case Q$z.VEC4:var f=d+"_scale",p=d+"_translate";o[f]=G$D(gn$2(h)).func,o[p]=d$K(On$2(h)).func,r[f]=!0,r[p]=!0}}}}for(var _ in i)if(i.hasOwnProperty(_)&&!r[_]){var m=i[_];e$2e(m.mat)&&(2===m.mat?o[_]=Y$t(f$15.IDENTITY).func:3===m.mat?o[_]=Z$y(p$1e.IDENTITY).func:4===m.mat&&(o[_]=G$D(p$1d.IDENTITY).func)),e$2e(m.vec)&&4===m.vec&&(o[_]=d$K([0,0,0,0]).func)}return o};var B$x=new o$1p,Tn$2={MODEL:function(e,t){return function(){return e.model}},VIEW:function(e,t){return function(){return e.view}},PROJECTION:function(e,t){return function(){return e.projection}},MODELVIEW:function(e,t){return function(){return e.modelView}},CESIUM_RTC_MODELVIEW:function(e,t){var i=new p$1d;return function(){return e$2e(t._rtcCenter)?(p$1d.getTranslation(e.model,B$x),o$1p.add(B$x,t._rtcCenter,B$x),p$1d.multiplyByPoint(e.view,B$x,B$x),p$1d.setTranslation(e.modelView,B$x,i)):e.modelView}},MODELVIEWPROJECTION:function(e,t){return function(){return e.modelViewProjection}},MODELINVERSE:function(e,t){return function(){return e.inverseModel}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t){return function(){return e.inverseModelView}},MODELVIEWPROJECTIONINVERSE:function(e,t){return function(){return e.inverseModelViewProjection}},MODELINVERSETRANSPOSE:function(e,t){return function(){return e.inverseTransposeModel}},MODELVIEWINVERSETRANSPOSE:function(e,t){return function(){return e.normal}},VIEWPORT:function(e,t){return function(){return e.viewportCartesian4}}};function ue$l(e,t){if(t=u$Z(t,{}),e$2e(e)&&i$E(e,"KHR_materials_common")){i$E(e,"KHR_techniques_webgl")||(e$2e(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl"));var i=e.extensions.KHR_techniques_webgl;le$l(e);var n=ve$h(e),r=s$v.splitIncompatibleMaterials(e),o={},a=!1;return e$L.material(e,(function(s,l){if(e$2e(s.extensions)&&e$2e(s.extensions.KHR_materials_common)){var u=s.extensions.KHR_materials_common,c=r[l],h=_e$g(u,c),d=o[h];e$2e(d)||(d=fe$j(e,i,c,u,n,t.addBatchIdToGeneratedShaders),o[h]=d,a=!0);var f={},p=u.values;for(var _ in p)p.hasOwnProperty(_)&&"transparent"!==_&&"doubleSided"!==_&&(f["u_"+_.toLowerCase()]=p[_]);s.extensions.KHR_techniques_webgl={technique:d,values:f},s.alphaMode="OPAQUE",u.transparent&&(s.alphaMode="BLEND"),u.doubleSided&&(s.doubleSided=!0)}})),a&&s$v.ensureSemanticExistence(e),e}}function ve$h(e){var t,i={};if(e$2e(e.extensions)&&e$2e(e.extensions.KHR_materials_common)&&(t=e.extensions.KHR_materials_common.lights),e$2e(t)){var n=e.nodes;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];if(e$2e(o.extensions)&&e$2e(o.extensions.KHR_materials_common)){var a=o.extensions.KHR_materials_common.light;e$2e(a)&&e$2e(t[a])&&(t[a].node=r),delete o.extensions.KHR_materials_common}}var s=0;for(var l in t)if(t.hasOwnProperty(l)){var u=t[l],c=u.type;if("ambient"!==c&&!e$2e(u.node)){delete t[l];continue}var h="light"+s.toString();switch(u.baseName=h,c){case"ambient":var d=u.ambient;i[h+"Color"]={type:de$y.FLOAT_VEC3,value:d.color};break;case"directional":var f=u.directional;i[h+"Color"]={type:de$y.FLOAT_VEC3,value:f.color},e$2e(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$y.FLOAT_MAT4});break;case"point":var p=u.point;i[h+"Color"]={type:de$y.FLOAT_VEC3,value:p.color},e$2e(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$y.FLOAT_MAT4}),i[h+"Attenuation"]={type:de$y.FLOAT_VEC3,value:[p.constantAttenuation,p.linearAttenuation,p.quadraticAttenuation]};break;case"spot":var _=u.spot;i[h+"Color"]={type:de$y.FLOAT_VEC3,value:_.color},e$2e(u.node)&&(i[h+"Transform"]={node:u.node,semantic:"MODELVIEW",type:de$y.FLOAT_MAT4},i[h+"InverseTransform"]={node:u.node,semantic:"MODELVIEWINVERSE",type:de$y.FLOAT_MAT4,useInFragment:!0}),i[h+"Attenuation"]={type:de$y.FLOAT_VEC3,value:[_.constantAttenuation,_.linearAttenuation,_.quadraticAttenuation]},i[h+"FallOff"]={type:de$y.FLOAT_VEC2,value:[_.fallOffAngle,_.fallOffExponent]}}++s}}return i}function fe$j(e,t,i,n,r,o){e$2e(n)||(n={}),o=u$Z(o,!1);var a,s=t.techniques,l=t.shaders,u=t.programs,c=n.technique.toUpperCase();e$2e(e.extensions)&&e$2e(e.extensions.KHR_materials_common)&&(a=e.extensions.KHR_materials_common.lights);var h,d=n.values,f=u$Z(n.jointCount,0),p=!1,_=!1;e$2e(i)&&(p=(h=i.skinning).skinned,_=i.hasVertexColors);var m="precision highp float;\n",g="precision highp float;\n",x="CONSTANT"!==c,y={u_modelViewMatrix:{semantic:i$E(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:de$y.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:de$y.FLOAT_MAT4}};x&&(y.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:de$y.FLOAT_MAT3}),p&&(y.u_jointMatrix={count:f,semantic:"JOINTMATRIX",type:de$y.FLOAT_MAT4});var v,$=!1;for(var b in d)if(d.hasOwnProperty(b)&&"transparent"!==b&&"doubleSided"!==b){var T=ne$o(b,d[b]);v="u_"+b.toLowerCase(),!$&&T===de$y.SAMPLER_2D&&($=!0),y[v]={type:T}}if(e$2e(y.u_diffuse)&&(y.u_diffuse.semantic="_3DTILESDIFFUSE"),e$2e(r))for(var C in r)r.hasOwnProperty(C)&&(y[v="u_"+C]=r[C]);for(v in y)if(y.hasOwnProperty(v)){var S=y[v],w=e$2e(S.count)?"["+S.count+"]":"";S.type!==de$y.FLOAT_MAT3&&S.type!==de$y.FLOAT_MAT4||S.useInFragment?(g+="uniform "+t$w(S.type)+" "+v+w+";\n",delete S.useInFragment):m+="uniform "+t$w(S.type)+" "+v+w+";\n"}var E="";if(p){var P,A,L=r$B(h.type),M=!1;if(0===h.type.indexOf("MAT")&&(M=!0,L=Math.sqrt(L)),M)for(P=0;P<L;P++)for(A=0;A<L;A++)E+=0===P&&0===A?" mat4 skinMat = ":" skinMat += ",E+="a_weight["+P+"]["+A+"] * u_jointMatrix[int(a_joint["+P+"]["+A+"])];\n";else for(P=0;P<L;P++)E+=0===P?" mat4 skinMat = ":" skinMat += ",E+="a_weight["+P+"] * u_jointMatrix[int(a_joint["+P+"])];\n"}var R,O={a_position:{semantic:"POSITION"}};if(m+="attribute vec3 a_position;\n",m+="varying vec3 v_positionEC;\n",E+=p?" vec4 pos = u_modelViewMatrix * skinMat * vec4(a_position,1.0);\n":" vec4 pos = u_modelViewMatrix * vec4(a_position,1.0);\n",E+=" v_positionEC = pos.xyz;\n",E+=" gl_Position = u_projectionMatrix * pos;\n",g+="varying vec3 v_positionEC;\n",x&&(O.a_normal={semantic:"NORMAL"},m+="attribute vec3 a_normal;\n",m+="varying vec3 v_normal;\n",E+=p?" v_normal = u_normalMatrix * mat3(skinMat) * a_normal;\n":" v_normal = u_normalMatrix * a_normal;\n",g+="varying vec3 v_normal;\n"),$&&(O.a_texcoord_0={semantic:"TEXCOORD_0"},m+="attribute vec2 a_texcoord_0;\n",m+="varying vec2 "+(R="v_texcoord_0")+";\n",E+=" "+R+" = a_texcoord_0;\n",g+="varying vec2 "+R+";\n"),p){var D=s$v.getShaderVariable(h.type);O.a_joint={semantic:"JOINT"},O.a_weight={semantic:"WEIGHT"},m+="attribute "+D+" a_joint;\n",m+="attribute "+D+" a_weight;\n"}_&&(O.a_vertexColor={semantic:"COLOR_0"},m+="attribute vec4 a_vertexColor;\n",m+="varying vec4 v_vertexColor;\n",E+=" v_vertexColor = a_vertexColor;\n",g+="varying vec4 v_vertexColor;\n"),o&&(O.a_batchId={semantic:"_BATCHID"},m+="attribute float a_batchId;\n");var I=x&&("BLINN"===c||"PHONG"===c)&&e$2e(y.u_specular)&&e$2e(y.u_shininess)&&y.u_shininess>0,B=!1,F=!1,N="";for(var G in a)if(a.hasOwnProperty(G)){var z=a[G],U=z.type.toLowerCase(),V=z.baseName;N+=" {\n";var k,W,H="u_"+V+"Color";"ambient"===U?(F=!0,N+=" ambientLight += "+H+";\n"):x&&(B=!0,k="v_"+V+"Direction",W="v_"+V+"Position","point"!==U&&(m+="varying vec3 "+k+";\n",g+="varying vec3 "+k+";\n",E+=" "+k+" = mat3(u_"+V+"Transform) * vec3(0.,0.,1.);\n","directional"===U&&(N+=" vec3 l = normalize("+k+");\n")),"directional"!==U?(m+="varying vec3 "+W+";\n",g+="varying vec3 "+W+";\n",E+=" "+W+" = u_"+V+"Transform[3].xyz;\n",N+=" vec3 VP = "+W+" - v_positionEC;\n",N+=" vec3 l = normalize(VP);\n",N+=" float range = length(VP);\n",N+=" float attenuation = 1.0 / (u_"+V+"Attenuation.x + ",N+="(u_"+V+"Attenuation.y * range) + ",N+="(u_"+V+"Attenuation.z * range * range));\n"):N+=" float attenuation = 1.0;\n","spot"===U&&(N+=" float spotDot = dot(l, normalize("+k+"));\n",N+=" if (spotDot < cos(u_"+V+"FallOff.x * 0.5))\n",N+=" {\n",N+=" attenuation = 0.0;\n",N+=" }\n",N+=" else\n",N+=" {\n",N+=" attenuation *= max(0.0, pow(spotDot, u_"+V+"FallOff.y));\n",N+=" }\n"),N+=" diffuseLight += "+H+"* max(dot(normal,l), 0.) * attenuation;\n",I&&("BLINN"===c?(N+=" vec3 h = normalize(l + viewDir);\n",N+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess)) * attenuation;\n"):(N+=" vec3 reflectDir = reflect(-l, normal);\n",N+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess)) * attenuation;\n"),N+=" specularLight += "+H+" * specularIntensity;\n")),N+=" }\n"}if(F||(N+=" ambientLight += vec3(0.2, 0.2, 0.2);\n"),!B&&"CONSTANT"!==c){N+=" vec3 l = normalize(czm_sunDirectionEC);\n";N+=" diffuseLight += vec3(1.0, 1.0, 1.0) * max(dot(normal,l), 0.2);\n",I&&("BLINN"===c?(N+=" vec3 h = normalize(l + viewDir);\n",N+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess));\n"):(N+=" vec3 reflectDir = reflect(-l, normal);\n",N+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess));\n"),N+=" specularLight += vec3(1.0, 1.0, 1.0) * specularIntensity;\n")}m+="void main(void) {\n",m+=E,m+="}\n",g+="void main(void) {\n";var q,j=" vec3 color = vec3(0.0, 0.0, 0.0);\n";x&&(g+=" vec3 normal = normalize(v_normal);\n",n.doubleSided&&(g+=" if (gl_FrontFacing == false)\n",g+=" {\n",g+=" normal = -normal;\n",g+=" }\n")),"CONSTANT"!==c?(e$2e(y.u_diffuse)&&(y.u_diffuse.type===de$y.SAMPLER_2D?g+=" vec4 diffuse = texture2D(u_diffuse, "+R+");\n":g+=" vec4 diffuse = u_diffuse;\n",g+=" vec3 diffuseLight = vec3(0.0, 0.0, 0.0);\n",j+=" color += diffuse.rgb * diffuseLight;\n"),I&&(y.u_specular.type===de$y.SAMPLER_2D?g+=" vec3 specular = texture2D(u_specular, "+R+").rgb;\n":g+=" vec3 specular = u_specular.rgb;\n",g+=" vec3 specularLight = vec3(0.0, 0.0, 0.0);\n",j+=" color += specular * specularLight;\n"),q=e$2e(y.u_transparency)?" gl_FragColor = vec4(color * diffuse.a * u_transparency, diffuse.a * u_transparency);\n":" gl_FragColor = vec4(color * diffuse.a, diffuse.a);\n"):q=e$2e(y.u_transparency)?" gl_FragColor = vec4(color * u_transparency, u_transparency);\n":" gl_FragColor = vec4(color, 1.0);\n",_&&(j+=" color *= v_vertexColor.rgb;\n"),e$2e(y.u_emission)&&(y.u_emission.type===de$y.SAMPLER_2D?g+=" vec3 emission = texture2D(u_emission, "+R+").rgb;\n":g+=" vec3 emission = u_emission.rgb;\n",j+=" color += emission;\n"),(e$2e(y.u_ambient)||"CONSTANT"!==c)&&(e$2e(y.u_ambient)?y.u_ambient.type===de$y.SAMPLER_2D?g+=" vec3 ambient = texture2D(u_ambient, "+R+").rgb;\n":g+=" vec3 ambient = u_ambient.rgb;\n":g+=" vec3 ambient = diffuse.rgb;\n",j+=" color += ambient * ambientLight;\n"),g+=" vec3 viewDir = -normalize(v_positionEC);\n",g+=" vec3 ambientLight = vec3(0.0, 0.0, 0.0);\n",g+=N,g+=j,g+=q,g+="}\n";var X=d$P(l,{type:de$y.VERTEX_SHADER,extras:{_pipeline:{source:m,extension:".glsl"}}}),Y=d$P(l,{type:de$y.FRAGMENT_SHADER,extras:{_pipeline:{source:g,extension:".glsl"}}}),Z=d$P(u,{fragmentShader:Y,vertexShader:X});return d$P(s,{attributes:O,program:Z,uniforms:y})}function ne$o(e,t){var i;switch(i=e$2e(t.value)?t.value:e$2e(t.index)?[t.index]:t,e){case"ambient":case"diffuse":case"emission":case"specular":return 1===i.length?de$y.SAMPLER_2D:de$y.FLOAT_VEC4;case"shininess":case"transparency":return de$y.FLOAT;case"transparent":case"doubleSided":return de$y.BOOL}}function _e$g(e,t){var i="";i+="technique:"+e.technique+";";for(var n=e.values,r=Object.keys(n).sort(),o=r.length,a=0;a<o;++a){var s=r[a];n.hasOwnProperty(s)&&(i+=s+":"+ne$o(s,n[s]),i+=";")}var l=u$Z(e.jointCount,0);if(i+=l.toString()+";",e$2e(t)){var u=t.skinning;l>0&&(i+=u.type+";"),i+=t.hasVertexColors}return i}function le$l(e){var t=e.extensions.KHR_materials_common;if(e$2e(t)&&e$2e(t.lights))for(var i=t.lights,n=i.length,r=0;r<n;r++){var o=i[r];if("ambient"===o.type){e$2e(o.ambient)||(o.ambient={});var a=o.ambient;e$2e(a.color)||(a.color=[1,1,1])}else if("directional"===o.type){e$2e(o.directional)||(o.directional={});var s=o.directional;e$2e(s.color)||(s.color=[1,1,1])}else if("point"===o.type){e$2e(o.point)||(o.point={});var l=o.point;e$2e(l.color)||(l.color=[1,1,1]),l.constantAttenuation=u$Z(l.constantAttenuation,1),l.linearAttenuation=u$Z(l.linearAttenuation,0),l.quadraticAttenuation=u$Z(l.quadraticAttenuation,0)}else if("spot"===o.type){e$2e(o.spot)||(o.spot={});var u=o.spot;e$2e(u.color)||(u.color=[1,1,1]),u.constantAttenuation=u$Z(u.constantAttenuation,1),u.fallOffAngle=u$Z(u.fallOffAngle,3.14159265),u.fallOffExponent=u$Z(u.fallOffExponent,0),u.linearAttenuation=u$Z(u.linearAttenuation,0),u.quadraticAttenuation=u$Z(u.quadraticAttenuation,0)}}}function he$h(e,t){if(t=u$Z(t,{}),i$E(e,"KHR_techniques_webgl")||!e$2e(e.materials)||0===e.materials.length)return e;e$2e(e.extensions)||(e.extensions={}),e$2e(e.extensionsUsed)||(e.extensionsUsed=[]),e$2e(e.extensionsRequired)||(e.extensionsRequired=[]),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl");var i=s$v.splitIncompatibleMaterials(e);return e$L.material(e,(function(n,r){var o={},a=xe$d(e,n,r,o,i,t);e$2e(n.extensions)||(n.extensions={}),n.extensions.KHR_techniques_webgl={values:o,technique:a}})),s$v.ensureSemanticExistence(e),e}function pe$l(e){return e$2e(e.extensions)&&e$2e(e.extensions.KHR_materials_pbrSpecularGlossiness)}function ge$g(e){return e$2e(e.textureMotion)}function te$o(e,t,i){var n=0,r=0,o=0,a=0,s=0,l=0,u=0,c=0,h=0;e.hasOwnProperty("start")&&(n+=e.start[0],o+=e.start[1]),e.hasOwnProperty("range")&&(n+=e.range[0],r=e.range[1],o+=e.range[2],a=e.range[3],c=e.range[0],h=e.range[2]),e.hasOwnProperty("speed")&&0!=e.speed&&(s=(r-c)/(u=1/e.speed),l=(a-h)/u),t[i]=s,t[i+1]=n,t[i+2]=l,t[i+3]=o,t[i+4]=u}function se$j(e,t,i,n){i[n]=[0,0,0,0,1,0,1,0,1,1],e$2e(e)&&te$o(e,i[n],0),e$2e(t)&&te$o(t,i[n],5)}function me$k(e,t){var i=e.textureMotion;(i.hasOwnProperty("baseColorTextureScroll")||i.hasOwnProperty("baseColorTextureScale"))&&se$j(i.baseColorTextureScroll,i.baseColorTextureScale,t,"u_baseColorUVOffsetAndTiling"),(i.hasOwnProperty("emissiveTextureScroll")||i.hasOwnProperty("emissiveTextureScale"))&&se$j(i.emissiveTextureScroll,i.emissiveTextureScale,t,"u_emissiveUVOffsetAndTiling")}function xe$d(e,t,i,n,r,o){var a,s,l=u$Z(o.addBatchIdToGeneratedShaders,!1),u=e.extensions.KHR_techniques_webgl,c=u.techniques,h=u.shaders,d=u.programs,f=pe$l(t),p=ge$g(t),_=t.pbrMetallicRoughness;if(e$2e(_)&&!f)for(s in _)_.hasOwnProperty(s)&&(n[a="u_"+s]=_[s]);if(f){var m=t.extensions.KHR_materials_pbrSpecularGlossiness;for(s in m)m.hasOwnProperty(s)&&(n[a="u_"+s]=m[s])}for(var g in p&&me$k(t,n),t)t.hasOwnProperty(g)&&(g.indexOf("Texture")>=0||g.indexOf("Factor")>=0)&&(n[a="u_"+g]=t[g]);var x,y="precision highp float;\n",v="precision highp float;\n";e$2e(e.skins)&&(x=e.skins[0]);var $,b,T=e$2e(x)?x.joints:[],C=T.length,S=r[i],w=!1,E=!1,P=!1,A=!1,L=!1,M=!1,R=!1;e$2e(S)&&(w=($=S.skinning).skinned&&T.length>0,E=S.hasVertexColors,P=S.hasMorphTargets,A=S.hasNormals,L=S.hasTangents,M=S.hasTexCoords),P&&e$L.mesh(e,(function(e){e$L.meshPrimitive(e,(function(e){if(e.material===i){var t=e.targets;e$2e(t)&&(b=t)}}))}));var O={u_modelViewMatrix:{semantic:i$E(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:de$y.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:de$y.FLOAT_MAT4}};e$2e(t.extensions)&&e$2e(t.extensions.KHR_materials_unlit)&&(R=!0,A=!1,L=!1),A&&(O.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:de$y.FLOAT_MAT3}),w&&(O.u_jointMatrix={count:C,semantic:"JOINTMATRIX",type:de$y.FLOAT_MAT4}),P&&(O.u_morphWeights={count:b.length,semantic:"MORPHWEIGHTS",type:de$y.FLOAT});var D=t.alphaMode;for(a in e$2e(D)&&"MASK"===D&&(O.u_alphaCutoff={semantic:"ALPHACUTOFF",type:de$y.FLOAT}),n)n.hasOwnProperty(a)&&(O[a]={type:Te$e(a),extensionType:Ce$b(a)});var I=u$Z(O.u_baseColorTexture,O.u_baseColorFactor);for(a in e$2e(I)&&(I.semantic="_3DTILESDIFFUSE"),O)if(O.hasOwnProperty(a)){var B=O[a],F=e$2e(B.count)?"["+B.count+"]":"";B.type!==de$y.FLOAT_MAT3&&B.type!==de$y.FLOAT_MAT4&&"u_morphWeights"!==a||B.useInFragment?(v+="uniform "+t$w(B.type)+" "+a+F+";\n",delete B.useInFragment):y+="uniform "+t$w(B.type)+" "+a+F+";\n"}var N="";if(w){var G,z,U=r$B($.type),V=!1;if(0===$.type.indexOf("MAT")&&(V=!0,U=Math.sqrt(U)),V)for(G=0;G<U;G++)for(z=0;z<U;z++)N+=0===G&&0===z?" mat4 skinMatrix = ":" skinMatrix += ",N+="a_weight["+G+"]["+z+"] * u_jointMatrix[int(a_joint["+G+"]["+z+"])];\n";else for(G=0;G<U;G++)N+=0===G?" mat4 skinMatrix = ":" skinMatrix += ",N+="a_weight["+G+"] * u_jointMatrix[int(a_joint["+G+"])];\n"}var k,W={a_position:{semantic:"POSITION"}};if(y+="attribute vec3 a_position;\n",A&&(y+="varying vec3 v_positionEC;\n",y+="varying vec3 v_positionWC;\n"),N+=" vec3 weightedPosition = a_position;\n",A&&(N+=" vec3 weightedNormal = a_normal;\n"),L&&(N+=" vec4 weightedTangent = a_tangent;\n"),P)for(var H=0;H<b.length;H++){var q=b[H];for(var j in q)if(q.hasOwnProperty(j)&&"extras"!==j){var X="a_"+j+"_"+H;W[X]={semantic:j+"_"+H},y+="attribute vec3 "+X+";\n","POSITION"===j?N+=" weightedPosition += u_morphWeights["+H+"] * "+X+";\n":"NORMAL"===j?N+=" weightedNormal += u_morphWeights["+H+"] * "+X+";\n":L&&"TANGENT"===j&&(N+=" weightedTangent.xyz += u_morphWeights["+H+"] * "+X+";\n")}}if(N+=w?" vec4 position = skinMatrix * vec4(weightedPosition, 1.0);\n":" vec4 position = vec4(weightedPosition, 1.0);\n",A&&(N+=" v_positionWC = (czm_model * position).xyz;\n"),N+=" position = u_modelViewMatrix * position;\n",A&&(N+=" v_positionEC = position.xyz;\n"),N+=" gl_Position = u_projectionMatrix * position;\n",A&&(W.a_normal={semantic:"NORMAL"},y+="attribute vec3 a_normal;\n",y+="varying vec3 v_normal;\n",N+=w?" v_normal = u_normalMatrix * mat3(skinMatrix) * weightedNormal;\n":" v_normal = u_normalMatrix * weightedNormal;\n",v+="varying vec3 v_normal;\n",v+="varying vec3 v_positionEC;\n",v+="varying vec3 v_positionWC;\n"),L&&(W.a_tangent={semantic:"TANGENT"},y+="attribute vec4 a_tangent;\n",y+="varying vec4 v_tangent;\n",N+=" v_tangent.xyz = u_normalMatrix * weightedTangent.xyz;\n",N+=" v_tangent.w = weightedTangent.w;\n",v+="varying vec4 v_tangent;\n"),M&&(W.a_texcoord_0={semantic:"TEXCOORD_0"},y+="attribute vec2 a_texcoord_0;\n",y+="varying vec2 "+(k="v_texcoord_0")+";\n",N+=" "+k+" = a_texcoord_0;\n",v+="varying vec2 "+k+";\n"),w){var Y=s$v.getShaderVariable($.type);W.a_joint={semantic:"JOINTS_0"},W.a_weight={semantic:"WEIGHTS_0"},y+="attribute "+Y+" a_joint;\n",y+="attribute "+Y+" a_weight;\n"}E&&(W.a_vertexColor={semantic:"COLOR_0"},y+="attribute vec4 a_vertexColor;\n",y+="varying vec4 v_vertexColor;\n",N+=" v_vertexColor = a_vertexColor;\n",v+="varying vec4 v_vertexColor;\n"),l&&(W.a_batchId={semantic:"_BATCHID"},y+="attribute float a_batchId;\n"),y+="void main(void) \n{\n",y+=N,y+="}\n",A&&(v+="const float M_PI = 3.141592653589793;\n",v+="vec3 lambertianDiffuse(vec3 diffuseColor) \n{\n return diffuseColor / M_PI;\n}\n\n",v+="vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\n\n",v+="vec3 fresnelSchlick(float metalness, float VdotH) \n{\n return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n}\n\n",v+="vec3 F_Schlick(float ndv, vec3 spec) \n{\n return spec + (vec3(1.0) - spec) * pow(1.0 - ndv, 5.0);\n}\n\n",v+="float D_Phong(float g, float ndh) \n{\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\n",v+="float smithVisibilityG1(float NdotV, float roughness) \n{\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\n",v+="float smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\n\n",v+="float GGX(float roughness, float NdotH) \n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n}\n\n",v+="void getLightColor(vec3 lightDir, vec3 viewDir, vec3 normal, vec3 lightColor, vec3 fresnelTerm, float roughness, out vec3 diffuseTerm, out vec3 specularTerm) \n{\n vec3 h = normalize(viewDir + lightDir);\n float NdotL = clamp(dot(normal, lightDir), 0.001, 1.0);\n float NdotH = clamp(dot(normal, h), 0.0, 1.0);\n vec3 li = lightColor * NdotL;\n diffuseTerm = li;\n specularTerm = li * fresnelTerm * D_Phong(1.0 - roughness, NdotH);\n}\n\n"),v+="vec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\n",v+="vec4 SRGBtoLINEAR4(vec4 srgbIn) \n{\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\n",v+="vec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR \n return czm_acesTonemapping(linearIn);\n#else \n return linearIn;\n#endif \n}\n\n",v+="vec3 LINEARtoSRGB(vec3 linearIn) \n{\n#ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n#else \n return linearIn;\n#endif \n}\n\n",v+="float calcLightAttenuation(float lightDistance, float cutoffDistance, float decayExponent) \n{\n return pow(clamp(1.0 - lightDistance / cutoffDistance, 0.0, 1.0), decayExponent);\n}\n\n",v+="#ifdef USE_IBL_LIGHTING \n",v+="uniform vec2 gltf_iblFactor; \n",v+="#endif \n",v+="#ifdef USE_CUSTOM_LIGHT_COLOR \n",v+="uniform vec3 gltf_lightColor; \n",v+="#endif \n",v+="void main(void) \n{\n",A&&(v+=" vec3 ng = normalize(v_normal);\n",e$2e(n.u_normalTexture)?L?(v+=" vec3 t = normalize(v_tangent.xyz);\n",v+=" vec3 b = normalize(cross(ng, t) * v_tangent.w);\n",v+=" mat3 tbn = mat3(t, b, ng);\n",v+=" vec3 n = texture2D(u_normalTexture, "+k+").rgb;\n",v+=" n = normalize(tbn * (2.0 * n - 1.0));\n"):(v="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"+v,v+="#ifdef GL_OES_standard_derivatives\n",v+=" vec3 pos_dx = dFdx(v_positionEC);\n",v+=" vec3 pos_dy = dFdy(v_positionEC);\n",v+=" vec3 tex_dx = dFdx(vec3("+k+",0.0));\n",v+=" vec3 tex_dy = dFdy(vec3("+k+",0.0));\n",v+=" vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n",v+=" t = normalize(t - ng * dot(ng, t));\n",v+=" vec3 b = normalize(cross(ng, t));\n",v+=" mat3 tbn = mat3(t, b, ng);\n",v+=" vec3 n = texture2D(u_normalTexture, "+k+").rgb;\n",v+=" n = normalize(tbn * (2.0 * n - 1.0));\n",v+="#else\n",v+=" vec3 n = ng;\n",v+="#endif\n"):v+=" vec3 n = ng;\n",t.doubleSided&&(v+=" if (!gl_FrontFacing)\n",v+=" {\n",v+=" n = -n;\n",v+=" }\n")),e$2e(n.u_baseColorTexture)?(v+=" vec2 uvOffset = vec2(0.0);\n",v+=" vec2 uvTiling = vec2(1.0);\n",e$2e(n.u_baseColorUVOffsetAndTiling)&&(v+=" uvOffset = u_baseColorUVOffsetAndTiling.xy;\n",v+=" uvTiling = u_baseColorUVOffsetAndTiling.zw;\n"),v+=" vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, "+k+" * uvTiling.xy + uvOffset.xy));\n",e$2e(n.u_baseColorFactor)&&(v+=" baseColorWithAlpha *= u_baseColorFactor;\n")):e$2e(n.u_baseColorFactor)?v+=" vec4 baseColorWithAlpha = u_baseColorFactor;\n":v+=" vec4 baseColorWithAlpha = vec4(1.0);\n",E&&(v+=" baseColorWithAlpha *= v_vertexColor;\n"),v+=" vec3 baseColor = baseColorWithAlpha.rgb;\n",A?(f?(e$2e(n.u_specularGlossinessTexture)?(v+=" vec4 specularGlossiness = SRGBtoLINEAR4(texture2D(u_specularGlossinessTexture, "+k+"));\n",v+=" vec3 specular = specularGlossiness.rgb;\n",v+=" float glossiness = specularGlossiness.a;\n",e$2e(n.u_specularFactor)&&(v+=" specular *= u_specularFactor;\n"),e$2e(n.u_glossinessFactor)&&(v+=" glossiness *= u_glossinessFactor;\n")):(e$2e(n.u_specularFactor)?v+=" vec3 specular = clamp(u_specularFactor, vec3(0.0), vec3(1.0));\n":v+=" vec3 specular = vec3(1.0);\n",e$2e(n.u_glossinessFactor)?v+=" float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);\n":v+=" float glossiness = 1.0;\n"),e$2e(n.u_diffuseTexture)?(e$2e(n.u_diffuseTextureUVSpeedFactor)?v+=" vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, "+k+" + u_diffuseTextureUVSpeedFactor.xy));\n":v+=" vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, "+k+"));\n",e$2e(n.u_diffuseFactor)&&(v+=" diffuse *= u_diffuseFactor;\n")):e$2e(n.u_diffuseFactor)?v+=" vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));\n":v+=" vec4 diffuse = vec4(1.0);\n"):e$2e(n.u_metallicRoughnessTexture)?(v+=" vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, "+k+").rgb;\n",v+=" float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n",v+=" float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n",e$2e(n.u_metallicFactor)&&(v+=" metalness *= u_metallicFactor;\n"),e$2e(n.u_roughnessFactor)&&(v+=" roughness *= u_roughnessFactor;\n")):(e$2e(n.u_metallicFactor)?v+=" float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n":v+=" float metalness = 1.0;\n",e$2e(n.u_roughnessFactor)?v+=" float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n":v+=" float roughness = 1.0;\n"),v+=" vec3 v = -normalize(v_positionEC);\n",f?(v+=" float roughness = 1.0 - glossiness;\n",v+=" vec3 diffuseColor = diffuse.rgb * (1.0 - max(max(specular.r, specular.g), specular.b));\n",v+=" vec3 specularColor = specular;\n"):(v+=" vec3 f0 = vec3(0.04);\n",v+=" vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n",v+=" vec3 specularColor = mix(f0, baseColor, metalness);\n"),v+=" float NdotV = abs(dot(n, v)) + 0.001;\n",v+=" vec3 diffuseTerm = vec3(0.0);\n",v+=" vec3 specularTerm = vec3(0.0);\n",v+=" vec3 fresnelTerm = F_Schlick(NdotV, specularColor);\n",v+=" vec3 color = vec3(0.0);\n",v+="#if DIR_LIGHTS > 0 \n",v+=" for (int i = 0; i < DIR_LIGHTS; i++) { \n",v+=" vec3 lightDiffuseTerm = vec3(0.0);\n",v+=" vec3 lightSpecularTerm = vec3(0.0);\n",v+=" getLightColor(uDirectionalLightDirectionEC[i], v, n, uDirectionalLightColor[i], fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",v+=" diffuseTerm +=lightDiffuseTerm;\n",v+=" specularTerm += lightSpecularTerm;\n",v+=" } \n",v+="#endif \n",v+="#if POINT_LIGHTS > 0 \n",v+=" for (int i = 0; i < POINT_LIGHTS; i++) { \n",v+=" vec3 lVector = uPointLightPositionEC[i] - v_positionEC;\n",v+=" float lightDistance = length(lVector);\n",v+=" float lightAttenuation = calcLightAttenuation(lightDistance, uPointLightDistanceAndDecay[i].x, uPointLightDistanceAndDecay[i].y);\n",v+=" if(lightAttenuation < 0.001) {\n",v+=" continue;}\n",v+=" vec3 pointLightColor = uPointLightColor[i] * lightAttenuation;\n",v+=" vec3 lightDiffuseTerm = vec3(0.0);\n",v+=" vec3 lightSpecularTerm = vec3(0.0);\n",v+=" getLightColor(normalize(lVector), v, n, pointLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",v+=" diffuseTerm +=lightDiffuseTerm;\n",v+=" specularTerm += lightSpecularTerm;\n",v+=" }\n",v+="#endif \n",v+="#if SPOT_LIGHTS > 0 \n",v+=" for (int i = 0; i < SPOT_LIGHTS; i++) { \n",v+=" vec3 lVector = uSpotLightPositionEC[i] - v_positionEC;\n",v+=" float lightDistance = length(lVector);\n",v+=" float lightAttenuation = calcLightAttenuation(lightDistance, uSpotLightDistanceDecayCosPenumbra[i].x, uSpotLightDistanceDecayCosPenumbra[i].y);\n",v+=" if(lightAttenuation < 0.001) {\n",v+=" continue;}\n",v+=" float spotEffect = dot(uSpotLightDirectionEC[i], normalize(lVector));\n",v+=" if(spotEffect > uSpotLightDistanceDecayCosPenumbra[i].z) {\n",v+=" vec3 spotLightColor = uSpotLightColorAndExponent[i].xyz * lightAttenuation * spotEffect;\n",v+=" vec3 lightDiffuseTerm = vec3(0.0);\n",v+=" vec3 lightSpecularTerm = vec3(0.0);\n",v+=" getLightColor(normalize(lVector), v, n, spotLightColor, fresnelTerm, roughness, lightDiffuseTerm, lightSpecularTerm);\n",v+=" diffuseTerm +=lightDiffuseTerm;\n",v+=" specularTerm += lightSpecularTerm;\n",v+=" }\n",v+=" }\n",v+="#endif \n",v+=" color = baseColor; \n",v+=" color *= max(diffuseTerm, vec3(0.0)); \n",v+=" color += max(specularTerm, vec3(0.0)); \n",v+="#ifndef USE_CUSTOM_LIGHT_COLOR \n",v+=" vec3 lightColorHdr = czm_lightColorHdr;\n",v+="#else \n",v+=" vec3 lightColorHdr = gltf_lightColor;\n",v+="#endif \n",v+=" vec3 l = normalize(czm_lightDirectionEC);\n",v+=" vec3 h = normalize(v + l);\n",v+=" float NdotL = clamp(dot(n, l), 0.001, 1.0);\n",v+=" float NdotH = clamp(dot(n, h), 0.0, 1.0);\n",v+=" float LdotH = clamp(dot(l, h), 0.0, 1.0);\n",v+=" float VdotH = clamp(dot(v, h), 0.0, 1.0);\n",v+=" float alpha = roughness * roughness;\n",v+=" float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n",v+=" vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n",v+=" vec3 r0 = specularColor.rgb;\n",v+=" vec3 F = fresnelSchlick2(r0, r90, VdotH);\n",v+=" float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n",v+=" float D = GGX(alpha, NdotH);\n",v+=" vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n",v+=" vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n",v+=" color += NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n",v+="#if defined(USE_IBL_LIGHTING) && !defined(DIFFUSE_IBL) && !defined(SPECULAR_IBL) \n",v+=" vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n",v+=" czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n",v+=" float vertexRadius = length(v_positionWC);\n",v+=" float horizonDotNadir = 1.0 - min(1.0, ellipsoid.radii.x / vertexRadius);\n",v+=" float reflectionDotNadir = dot(r, normalize(v_positionWC));\n",v+=" r.x = -r.x;\n",v+=" r = -normalize(czm_temeToPseudoFixed * r);\n",v+=" r.x = -r.x;\n",v+=" float inverseRoughness = 1.04 - roughness;\n",v+=" inverseRoughness *= inverseRoughness;\n",v+=" vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n",v+=" float atmosphereHeight = 0.05;\n",v+=" float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n",v+=" float blendRegionOffset = roughness * -1.0;\n",v+=" float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n",v+=" float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n",v+=" float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n",v+=" float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n",v+=" vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n",v+=" vec3 nadirColor = belowHorizonColor * 0.5;\n",v+=" vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n",v+=" vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n",v+=" vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n",v+=" vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n",v+=" float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n",v+=" float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n",v+=" vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n",v+=" float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n",v+=" vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n",v+=" specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n",v+=" specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n",v+="#ifdef USE_SUN_LUMINANCE \n",v+=" float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * czm_sunDirectionEC), normalize(v_positionWC * -1.0)), 0.001, 1.0);\n",v+=" float S = acos(LdotZenith);\n",v+=" float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(v_positionWC * -1.0)), 0.001, 1.0);\n",v+=" float sunNdotL = clamp(dot(n, czm_sunDirectionEC), 0.001, 1.0);\n",v+=" float gamma = acos(sunNdotL);\n",v+=" float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(sunNdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n",v+=" float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n",v+=" float luminance = gltf_luminanceAtZenith * (numerator / denominator);\n",v+="#endif \n",v+=" vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",v+=" vec3 IBLColor = (diffuseIrradiance * diffuseColor * gltf_iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * gltf_iblFactor.y);\n",v+="#ifdef USE_SUN_LUMINANCE \n",v+=" color += IBLColor * luminance;\n",v+="#else \n",v+=" color += IBLColor; \n",v+="#endif \n",v+="#elif defined(DIFFUSE_IBL) || defined(SPECULAR_IBL) \n",v+=" mat3 fixedToENU = mat3(gltf_clippingPlanesMatrix[0][0], gltf_clippingPlanesMatrix[1][0], gltf_clippingPlanesMatrix[2][0], \n",v+=" gltf_clippingPlanesMatrix[0][1], gltf_clippingPlanesMatrix[1][1], gltf_clippingPlanesMatrix[2][1], \n",v+=" gltf_clippingPlanesMatrix[0][2], gltf_clippingPlanesMatrix[1][2], gltf_clippingPlanesMatrix[2][2]); \n",v+=" const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0); \n",v+=" vec3 cubeDir = normalize(yUpToZUp * fixedToENU * normalize(reflect(-v, n))); \n",v+="#ifdef DIFFUSE_IBL \n",v+="#ifdef CUSTOM_SPHERICAL_HARMONICS \n",v+=" vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, gltf_sphericalHarmonicCoefficients); \n",v+="#else \n",v+=" vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients); \n",v+="#endif \n",v+="#else \n",v+=" vec3 diffuseIrradiance = vec3(0.0); \n",v+="#endif \n",v+="#ifdef SPECULAR_IBL \n",v+=" vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",v+="#ifdef CUSTOM_SPECULAR_IBL \n",v+=" vec3 specularIBL = czm_sampleOctahedralProjection(gltf_specularMap, gltf_specularMapSize, cubeDir, roughness * gltf_maxSpecularLOD, gltf_maxSpecularLOD);\n",v+="#else \n",v+=" vec3 specularIBL = czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, czm_specularEnvironmentMapSize, cubeDir, roughness * czm_specularEnvironmentMapsMaximumLOD, czm_specularEnvironmentMapsMaximumLOD);\n",v+="#endif \n",v+=" specularIBL *= F * brdfLut.x + brdfLut.y;\n",v+="#else \n",v+=" vec3 specularIBL = vec3(0.0); \n",v+="#endif \n",v+=" color += diffuseIrradiance * diffuseColor + specularColor * specularIBL;\n",v+="#endif \n"):v+=" vec3 color = baseColor;\n",R||(e$2e(n.u_occlusionTexture)&&(v+=" color *= texture2D(u_occlusionTexture, "+k+").r;\n"),e$2e(n.u_emissiveTexture)?(v+=" vec2 uvEmissiveOffset = vec2(0.0);\n",v+=" vec2 uvEmissiveTiling = vec2(1.0);\n",e$2e(n.u_emissiveUVOffsetAndTiling)&&(v+=" uvEmissiveOffset = u_emissiveUVOffsetAndTiling.xy;\n",v+=" uvEmissiveTiling = u_emissiveUVOffsetAndTiling.zw;\n"),v+=" vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, "+k+"* uvEmissiveTiling.xy + uvEmissiveOffset.xy).rgb);\n",e$2e(n.u_emissiveFactor)&&(v+=" emissive *= u_emissiveFactor;\n"),v+=" color += emissive;\n"):e$2e(n.u_emissiveFactor)&&(v+=" color += u_emissiveFactor;\n")),R||(v+=" color = applyTonemapping(color);\n"),v+=" color = LINEARtoSRGB(color);\n",e$2e(D)?"MASK"===D?(v+=" if (baseColorWithAlpha.a < u_alphaCutoff) {\n",v+=" discard;\n",v+=" }\n",v+=" gl_FragColor = vec4(color, 1.0);\n"):v+="BLEND"===D?" gl_FragColor = vec4(color, baseColorWithAlpha.a);\n":" gl_FragColor = vec4(color, 1.0);\n":v+=" gl_FragColor = vec4(color, 1.0);\n",v+="}\n";var Z=d$P(h,{type:de$y.VERTEX_SHADER,extras:{_pipeline:{source:y,extension:".glsl"}}}),K=d$P(h,{type:de$y.FRAGMENT_SHADER,extras:{_pipeline:{source:v,extension:".glsl"}}}),Q=d$P(d,{fragmentShader:K,vertexShader:Z});return d$P(c,{attributes:W,program:Q,uniforms:O})}function Te$e(e){switch(e){case"u_baseColorFactor":case"u_baseColorUVOffsetAndTiling":case"u_emissiveUVOffsetAndTiling":case"u_diffuseFactor":return de$y.FLOAT_VEC4;case"u_metallicFactor":case"u_roughnessFactor":case"u_glossinessFactor":return de$y.FLOAT;case"u_baseColorTexture":case"u_metallicRoughnessTexture":case"u_normalTexture":case"u_occlusionTexture":case"u_emissiveTexture":case"u_diffuseTexture":case"u_specularGlossinessTexture":return de$y.SAMPLER_2D;case"u_emissiveFactor":case"u_specularFactor":return de$y.FLOAT_VEC3}return-1!==e.indexOf("Offset")?de$y.FLOAT_VEC2:-1!==e.indexOf("Rotation")?de$y.FLOAT:-1!==e.indexOf("Scale")?de$y.FLOAT_VEC2:-1!==e.indexOf("Texture")?de$y.SAMPLER_2D:void 0}function Ce$b(e){switch(e){case"u_baseColorUVOffsetAndTiling":return ie$p.BASECOLOR_UV_OFFSET_AND_TILING;case"u_emissiveUVOffsetAndTiling":return ie$p.EMISSIVE_UV_OFFSET_AND_TILING}}function c$x(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}s$v.getGltfSemanticUniforms=function(){return Tn$2};var G$C="attribute vec3 position;\nattribute float a_batchId;\nuniform mat4 u_modifiedModelViewProjection;\nvoid main()\n{\ngl_Position = czm_depthClampFarPlane(u_modifiedModelViewProjection * vec4(position, 1.0));\n}\n",J$w={};!function(e){var t="Compound",i="MemberExpression",n="Literal",r=function(e,t){var i=new Error(e+" at character "+t);throw i.index=t,i.description=e,i},o=!0,a={"-":o,"!":o,"~":o,"+":o},s={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},l=function(e){var t,i=0;for(var n in e)(t=n.length)>i&&e.hasOwnProperty(n)&&(i=t);return i},u=l(a),c=l(s),h={true:!0,false:!1,null:null},d=function(e){return s[e]||0},f=function(e,t,i){return{type:"||"===e||"&&"===e?"LogicalExpression":"BinaryExpression",operator:e,left:t,right:i}},p=function(e){return e>=48&&e<=57},_=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=128&&!s[String.fromCharCode(e)]},m=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e>=128&&!s[String.fromCharCode(e)]},g=function(e){for(var o,l,g=0,x=e.charAt,y=e.charCodeAt,v=function(t){return x.call(e,t)},$=function(t){return y.call(e,t)},b=e.length,T=function(){for(var e=$(g);32===e||9===e;)e=$(++g)},C=function(){var e,t,i=w();return T(),63!==$(g)?i:(g++,(e=C())||r("Expected expression",g),T(),58===$(g)?(g++,(t=C())||r("Expected expression",g),{type:"ConditionalExpression",test:i,consequent:e,alternate:t}):void r("Expected :",g))},S=function(){T();for(var t=e.substr(g,c),i=t.length;i>0;){if(s.hasOwnProperty(t))return g+=i,t;t=t.substr(0,--i)}return!1},w=function(){var e,t,i,n,o,a,s,l;if(a=E(),!(t=S()))return a;for(o={value:t,prec:d(t)},(s=E())||r("Expected expression after "+t,g),n=[a,o,s];(t=S())&&0!==(i=d(t));){for(o={value:t,prec:i};n.length>2&&i<=n[n.length-2].prec;)s=n.pop(),t=n.pop().value,a=n.pop(),e=f(t,a,s),n.push(e);(e=E())||r("Expected expression after "+t,g),n.push(o,e)}for(e=n[l=n.length-1];l>1;)e=f(n[l-1].value,n[l-2],e),l-=2;return e},E=function(){var t,i,n;if(T(),t=$(g),p(t)||46===t)return P();if(39===t||34===t)return A();if(_(t)||40===t)return R();if(91===t)return D();for(n=(i=e.substr(g,u)).length;n>0;){if(a.hasOwnProperty(i))return g+=n,{type:"UnaryExpression",operator:i,argument:E(),prefix:!0};i=i.substr(0,--n)}return!1},P=function(){for(var e,t,i="";p($(g));)i+=v(g++);if(46===$(g))for(i+=v(g++);p($(g));)i+=v(g++);if("e"===(e=v(g))||"E"===e){for(i+=v(g++),("+"===(e=v(g))||"-"===e)&&(i+=v(g++));p($(g));)i+=v(g++);p($(g-1))||r("Expected exponent ("+i+v(g)+")",g)}return t=$(g),_(t)?r("Variable names cannot start with a number ("+i+v(g)+")",g):46===t&&r("Unexpected period",g),{type:n,value:parseFloat(i),raw:i}},A=function(){for(var e,t="",i=v(g++),o=!1;g<b;){if((e=v(g++))===i){o=!0;break}if("\\"===e)switch(e=v(g++),e){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+="\\"+e}else t+=e}return o||r('Unclosed quote after "'+t+'"',g),{type:n,value:t,raw:i+t+i}},L=function(){var t,i=$(g),o=g;for(_(i)?g++:r("Unexpected "+v(g),g);g<b&&(i=$(g),m(i));)g++;return t=e.slice(o,g),h.hasOwnProperty(t)?{type:n,value:h[t],raw:t}:"this"===t?{type:"ThisExpression"}:{type:"Identifier",name:t}},M=function(e){for(var i,n,o=[],a=!1;g<b;){if(T(),(i=$(g))===e){a=!0,g++;break}44===i?g++:((!(n=C())||n.type===t)&&r("Expected comma",g),o.push(n))}return a||r("Expected "+String.fromCharCode(e),g),o},R=function(){var e,t;for(t=40===(e=$(g))?O():L(),T(),e=$(g);46===e||91===e||40===e;)g++,46===e?(T(),t={type:i,computed:!1,object:t,property:L()}):91===e?(t={type:i,computed:!0,object:t,property:C()},T(),93!==(e=$(g))&&r("Unclosed [",g),g++):40===e&&(t={type:"CallExpression",arguments:M(41),callee:t}),T(),e=$(g);return t},O=function(){g++;var e=C();if(T(),41===$(g))return g++,e;r("Unclosed (",g)},D=function(){return g++,{type:"ArrayExpression",elements:M(93)}},I=[];g<b;)59===(o=$(g))||44===o?g++:(l=C())?I.push(l):g<b&&r('Unexpected "'+v(g)+'"',g);return 1===I.length?I[0]:{type:t,body:I}};g.version="0.3.1",g.toString=function(){return"JavaScript Expression Parser (JSEP) v"+g.version},g.addUnaryOp=function(e){return u=Math.max(e.length,u),a[e]=o,this},g.addBinaryOp=function(e,t){return c=Math.max(e.length,c),s[e]=t,this},g.addLiteral=function(e,t){return h[e]=t,this},g.removeUnaryOp=function(e){return delete a[e],e.length===u&&(u=l(a)),this},g.removeAllUnaryOps=function(){return a={},u=0,this},g.removeBinaryOp=function(e){return delete s[e],e.length===c&&(c=l(s)),this},g.removeAllBinaryOps=function(){return s={},c=0,this},g.removeLiteral=function(e){return delete h[e],this},g.removeAllLiterals=function(){return h={},this},e.jsep=g}(J$w);var q$C=J$w.jsep,L$F={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18},s$u=Object.freeze(L$F);function L$E(e,t){var i;o$1q.typeOf.string("expression",e),this._expression=e,e=fe$i(le$k(e=se$i(e,t))),q$C.addBinaryOp("=~",0),q$C.addBinaryOp("!~",0);try{i=q$C(e)}catch(e){throw new t$13(e)}this._runtimeAst=_$u(this,i)}Object.defineProperties(L$E.prototype,{expression:{get:function(){return this._expression}}});var m$z={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new o$1o],cartesian3Array:[new o$1p],cartesian4Array:[new e$2c],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);var e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new o$1o),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new o$1p),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new e$2c),this.cartesian4Array[this.cartesian4Index++]}};L$E.prototype.evaluate=function(e,t){m$z.reset();var i=this._runtimeAst.evaluate(e);return t instanceof e$1X&&i instanceof e$2c?e$1X.fromCartesian4(i,t):i instanceof o$1o||i instanceof o$1p||i instanceof e$2c?i.clone(t):i},L$E.prototype.evaluateColor=function(e,t){m$z.reset();var i=this._runtimeAst.evaluate(e);return e$1X.fromCartesian4(i,t)},L$E.prototype.getShaderFunction=function(e,t,i,n){var r=this.getShaderExpression(t,i);return r=n+" "+e+"() \n{ \n return "+r+"; \n} \n"},L$E.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};var K$w=["!","-","+"],G$B=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],V$s=/\${(.*?)}/g,J$v=/\\/g,W$C="@#%",Z$x=/@#%/g,T$z=new e$1X,C$C={abs:w$w(Math.abs),sqrt:w$w(Math.sqrt),cos:w$w(Math.cos),sin:w$w(Math.sin),tan:w$w(Math.tan),acos:w$w(Math.acos),asin:w$w(Math.asin),atan:w$w(Math.atan),radians:w$w(e$2d.toRadians),degrees:w$w(e$2d.toDegrees),sign:w$w(e$2d.sign),floor:w$w(Math.floor),ceil:w$w(Math.ceil),round:w$w(Math.round),exp:w$w(Math.exp),exp2:w$w(ee$p),log:w$w(Math.log),log2:w$w(te$n),fract:w$w(Q$y),length:re$r,normalize:ae$k},O$s={atan2:B$w(Math.atan2,!1),pow:B$w(Math.pow,!1),min:B$w(Math.min,!0),max:B$w(Math.max,!0),distance:ne$n,dot:ie$m,cross:ue$k},F$D={clamp:Y$s(e$2d.clamp,!0),mix:Y$s(e$2d.lerp,!0)};function Q$y(e){return e-Math.floor(e)}function ee$p(e){return Math.pow(2,e)}function te$n(e){return e$2d.log2(e)}function w$w(e){return function(t,i){if("number"==typeof i)return e(i);if(i instanceof o$1o)return o$1o.fromElements(e(i.x),e(i.y),m$z.getCartesian2());if(i instanceof o$1p)return o$1p.fromElements(e(i.x),e(i.y),e(i.z),m$z.getCartesian3());if(i instanceof e$2c)return e$2c.fromElements(e(i.x),e(i.y),e(i.z),e(i.w),m$z.getCartesian4());throw new t$13('Function "'+t+'" requires a vector or number argument. Argument is '+i+".")}}function B$w(e,t){return function(i,n,r){if(t&&"number"==typeof r){if("number"==typeof n)return e(n,r);if(n instanceof o$1o)return o$1o.fromElements(e(n.x,r),e(n.y,r),m$z.getCartesian2());if(n instanceof o$1p)return o$1p.fromElements(e(n.x,r),e(n.y,r),e(n.z,r),m$z.getCartesian3());if(n instanceof e$2c)return e$2c.fromElements(e(n.x,r),e(n.y,r),e(n.z,r),e(n.w,r),m$z.getCartesian4())}if("number"==typeof n&&"number"==typeof r)return e(n,r);if(n instanceof o$1o&&r instanceof o$1o)return o$1o.fromElements(e(n.x,r.x),e(n.y,r.y),m$z.getCartesian2());if(n instanceof o$1p&&r instanceof o$1p)return o$1p.fromElements(e(n.x,r.x),e(n.y,r.y),e(n.z,r.z),m$z.getCartesian3());if(n instanceof e$2c&&r instanceof e$2c)return e$2c.fromElements(e(n.x,r.x),e(n.y,r.y),e(n.z,r.z),e(n.w,r.w),m$z.getCartesian4());throw new t$13('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+n+" and "+r+".")}}function Y$s(e,t){return function(i,n,r,o){if(t&&"number"==typeof o){if("number"==typeof n&&"number"==typeof r)return e(n,r,o);if(n instanceof o$1o&&r instanceof o$1o)return o$1o.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),m$z.getCartesian2());if(n instanceof o$1p&&r instanceof o$1p)return o$1p.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),e(n.z,r.z,o),m$z.getCartesian3());if(n instanceof e$2c&&r instanceof e$2c)return e$2c.fromElements(e(n.x,r.x,o),e(n.y,r.y,o),e(n.z,r.z,o),e(n.w,r.w,o),m$z.getCartesian4())}if("number"==typeof n&&"number"==typeof r&&"number"==typeof o)return e(n,r,o);if(n instanceof o$1o&&r instanceof o$1o&&o instanceof o$1o)return o$1o.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),m$z.getCartesian2());if(n instanceof o$1p&&r instanceof o$1p&&o instanceof o$1p)return o$1p.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),e(n.z,r.z,o.z),m$z.getCartesian3());if(n instanceof e$2c&&r instanceof e$2c&&o instanceof e$2c)return e$2c.fromElements(e(n.x,r.x,o.x),e(n.y,r.y,o.y),e(n.z,r.z,o.z),e(n.w,r.w,o.w),m$z.getCartesian4());throw new t$13('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+n+", "+r+", and "+o+".")}}function re$r(e,t){if("number"==typeof t)return Math.abs(t);if(t instanceof o$1o)return o$1o.magnitude(t);if(t instanceof o$1p)return o$1p.magnitude(t);if(t instanceof e$2c)return e$2c.magnitude(t);throw new t$13('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function ae$k(e,t){if("number"==typeof t)return 1;if(t instanceof o$1o)return o$1o.normalize(t,m$z.getCartesian2());if(t instanceof o$1p)return o$1p.normalize(t,m$z.getCartesian3());if(t instanceof e$2c)return e$2c.normalize(t,m$z.getCartesian4());throw new t$13('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function ne$n(e,t,i){if("number"==typeof t&&"number"==typeof i)return Math.abs(t-i);if(t instanceof o$1o&&i instanceof o$1o)return o$1o.distance(t,i);if(t instanceof o$1p&&i instanceof o$1p)return o$1p.distance(t,i);if(t instanceof e$2c&&i instanceof e$2c)return e$2c.distance(t,i);throw new t$13('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function ie$m(e,t,i){if("number"==typeof t&&"number"==typeof i)return t*i;if(t instanceof o$1o&&i instanceof o$1o)return o$1o.dot(t,i);if(t instanceof o$1p&&i instanceof o$1p)return o$1p.dot(t,i);if(t instanceof e$2c&&i instanceof e$2c)return e$2c.dot(t,i);throw new t$13('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function ue$k(e,t,i){if(t instanceof o$1p&&i instanceof o$1p)return o$1p.cross(t,i,m$z.getCartesian3());throw new t$13('Function "'+e+'" requires vec3 arguments. Arguments are '+t+" and "+i+".")}function u$B(e,t,i,n,r){this._type=e,this._value=t,this._left=i,this._right=n,this._test=r,this.evaluate=void 0,we$d(this)}function se$i(e,t){if(!e$2e(t))return e;for(var i in t)if(t.hasOwnProperty(i)){var n=new RegExp("\\$\\{"+i+"\\}","g"),r="("+t[i]+")";e$2e(r)&&(e=e.replace(n,r))}return e}function le$k(e){return e.replace(J$v,W$C)}function d$J(e){return e.replace(Z$x,"\\")}function fe$i(e){for(var t=e,i="",n=t.indexOf("${");n>=0;){var r,o=t.indexOf("'"),a=t.indexOf('"');if(o>=0&&o<n)r=t.indexOf("'",o+1),i+=t.substr(0,r+1),n=(t=t.substr(r+1)).indexOf("${");else if(a>=0&&a<n)r=t.indexOf('"',a+1),i+=t.substr(0,r+1),n=(t=t.substr(r+1)).indexOf("${");else{i+=t.substr(0,n);var s=t.indexOf("}");if(s<0)throw new t$13("Unmatched {.");i+="czm_"+t.substr(n+2,s-(n+2)),n=(t=t.substr(s+1)).indexOf("${")}}return i+=t}function oe$i(e){var t=typeof e.value;return null===e.value?new u$B(s$u.LITERAL_NULL,null):"boolean"===t?new u$B(s$u.LITERAL_BOOLEAN,e.value):"number"===t?new u$B(s$u.LITERAL_NUMBER,e.value):"string"===t?e.value.indexOf("${")>=0?new u$B(s$u.VARIABLE_IN_STRING,e.value):new u$B(s$u.LITERAL_STRING,d$J(e.value)):void 0}function ve$g(e,t){var i,n,r,o,a=t.arguments,s=a.length;if("MemberExpression"===t.callee.type){i=t.callee.property.name;var l=t.callee.object;if("test"===i||"exec"===i){if("regExp"!==l.callee.name)throw new t$13(i+" is not a function.");return 0===s?"test"===i?new u$B(s$u.LITERAL_BOOLEAN,!1):new u$B(s$u.LITERAL_NULL,null):(r=_$u(e,l),o=_$u(e,a[0]),new u$B(s$u.FUNCTION_CALL,i,r,o))}if("toString"===i)return n=_$u(e,l),new u$B(s$u.FUNCTION_CALL,i,n);throw new t$13('Unexpected function call "'+i+'".')}if("color"===(i=t.callee.name)){if(0===s)return new u$B(s$u.LITERAL_COLOR,i);if(n=_$u(e,a[0]),e$2e(a[1])){var u=_$u(e,a[1]);return new u$B(s$u.LITERAL_COLOR,i,[n,u])}return new u$B(s$u.LITERAL_COLOR,i,[n])}if("rgb"===i||"hsl"===i){if(s<3)throw new t$13(i+" requires three arguments.");return n=[_$u(e,a[0]),_$u(e,a[1]),_$u(e,a[2])],new u$B(s$u.LITERAL_COLOR,i,n)}if("rgba"===i||"hsla"===i){if(s<4)throw new t$13(i+" requires four arguments.");return n=[_$u(e,a[0]),_$u(e,a[1]),_$u(e,a[2]),_$u(e,a[3])],new u$B(s$u.LITERAL_COLOR,i,n)}if("vec2"===i||"vec3"===i||"vec4"===i){n=new Array(s);for(var c=0;c<s;++c)n[c]=_$u(e,a[c]);return new u$B(s$u.LITERAL_VECTOR,i,n)}if("isNaN"===i||"isFinite"===i)return 0===s?new u$B(s$u.LITERAL_BOOLEAN,"isNaN"===i):(n=_$u(e,a[0]),new u$B(s$u.UNARY,i,n));if("isExactClass"===i||"isClass"===i){if(s<1||s>1)throw new t$13(i+" requires exactly one argument.");return n=_$u(e,a[0]),new u$B(s$u.UNARY,i,n)}if("getExactClassName"===i){if(s>0)throw new t$13(i+" does not take any argument.");return new u$B(s$u.UNARY,i)}if(e$2e(C$C[i])){if(1!==s)throw new t$13(i+" requires exactly one argument.");return n=_$u(e,a[0]),new u$B(s$u.UNARY,i,n)}if(e$2e(O$s[i])){if(2!==s)throw new t$13(i+" requires exactly two arguments.");return r=_$u(e,a[0]),o=_$u(e,a[1]),new u$B(s$u.BINARY,i,r,o)}if(e$2e(F$D[i])){if(3!==s)throw new t$13(i+" requires exactly three arguments.");r=_$u(e,a[0]),o=_$u(e,a[1]);var h=_$u(e,a[2]);return new u$B(s$u.TERNARY,i,r,o,h)}if("Boolean"===i)return 0===s?new u$B(s$u.LITERAL_BOOLEAN,!1):(n=_$u(e,a[0]),new u$B(s$u.UNARY,i,n));if("Number"===i)return 0===s?new u$B(s$u.LITERAL_NUMBER,0):(n=_$u(e,a[0]),new u$B(s$u.UNARY,i,n));if("String"===i)return 0===s?new u$B(s$u.LITERAL_STRING,""):(n=_$u(e,a[0]),new u$B(s$u.UNARY,i,n));if("regExp"===i)return ce$j(e,t);throw new t$13('Unexpected function call "'+i+'".')}function ce$j(e,t){var i=t.arguments;if(0===i.length)return new u$B(s$u.LITERAL_REGEX,new RegExp);var n,r=_$u(e,i[0]);if(i.length>1){var o=_$u(e,i[1]);if(U$y(r)&&U$y(o)){try{n=new RegExp(d$J(String(r._value)),o._value)}catch(e){throw new t$13(e)}return new u$B(s$u.LITERAL_REGEX,n)}return new u$B(s$u.REGEX,r,o)}if(U$y(r)){try{n=new RegExp(d$J(String(r._value)))}catch(e){throw new t$13(e)}return new u$B(s$u.LITERAL_REGEX,n)}return new u$B(s$u.REGEX,r)}function me$j(e){if(ye$c(e.name)){var t=ge$f(e.name);return"tiles3d_"===t.substr(0,8)?new u$B(s$u.BUILTIN_VARIABLE,t):new u$B(s$u.VARIABLE,t)}if("NaN"===e.name)return new u$B(s$u.LITERAL_NUMBER,NaN);if("Infinity"===e.name)return new u$B(s$u.LITERAL_NUMBER,1/0);if("undefined"===e.name)return new u$B(s$u.LITERAL_UNDEFINED,void 0);throw new t$13(e.name+" is not defined.")}function he$g(e){var t=e.property.name;return"PI"===t?new u$B(s$u.LITERAL_NUMBER,Math.PI):"E"===t?new u$B(s$u.LITERAL_NUMBER,Math.E):void 0}function _e$f(e){if("POSITIVE_INFINITY"===e.property.name)return new u$B(s$u.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function pe$k(e,t){if("Math"===t.object.name)return he$g(t);if("Number"===t.object.name)return _e$f(t);var i,n=_$u(e,t.object);return t.computed?(i=_$u(e,t.property),new u$B(s$u.MEMBER,"brackets",n,i)):(i=new u$B(s$u.LITERAL_STRING,t.property.name),new u$B(s$u.MEMBER,"dot",n,i))}function U$y(e){return e._type>=s$u.LITERAL_NULL}function ye$c(e){return"czm_"===e.substr(0,4)}function ge$f(e){return e.substr(4)}function _$u(e,t){var i,n,r,o;if("Literal"===t.type)i=oe$i(t);else if("CallExpression"===t.type)i=ve$g(e,t);else if("Identifier"===t.type)i=me$j(t);else if("UnaryExpression"===t.type){n=t.operator;var a=_$u(e,t.argument);if(!(K$w.indexOf(n)>-1))throw new t$13('Unexpected operator "'+n+'".');i=new u$B(s$u.UNARY,n,a)}else if("BinaryExpression"===t.type){if(n=t.operator,r=_$u(e,t.left),o=_$u(e,t.right),!(G$B.indexOf(n)>-1))throw new t$13('Unexpected operator "'+n+'".');i=new u$B(s$u.BINARY,n,r,o)}else if("LogicalExpression"===t.type)n=t.operator,r=_$u(e,t.left),o=_$u(e,t.right),G$B.indexOf(n)>-1&&(i=new u$B(s$u.BINARY,n,r,o));else if("ConditionalExpression"===t.type){var s=_$u(e,t.test);r=_$u(e,t.consequent),o=_$u(e,t.alternate),i=new u$B(s$u.CONDITIONAL,"?",r,o,s)}else if("MemberExpression"===t.type)i=pe$k(e,t);else{if("ArrayExpression"!==t.type)throw"Compound"===t.type?new t$13("Provide exactly one expression."):new t$13("Cannot parse expression.");for(var l=[],u=0;u<t.elements.length;u++)l[u]=_$u(e,t.elements[u]);i=new u$B(s$u.ARRAY,l)}return i}function we$d(e){e._type===s$u.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===s$u.FUNCTION_CALL?"test"===e._value?e.evaluate=e._evaluateRegExpTest:"exec"===e._value?e.evaluate=e._evaluateRegExpExec:"toString"===e._value&&(e.evaluate=e._evaluateToString):e._type===s$u.UNARY?"!"===e._value?e.evaluate=e._evaluateNot:"-"===e._value?e.evaluate=e._evaluateNegative:"+"===e._value?e.evaluate=e._evaluatePositive:"isNaN"===e._value?e.evaluate=e._evaluateNaN:"isFinite"===e._value?e.evaluate=e._evaluateIsFinite:"isExactClass"===e._value?e.evaluate=e._evaluateIsExactClass:"isClass"===e._value?e.evaluate=e._evaluateIsClass:"getExactClassName"===e._value?e.evaluate=e._evaluateGetExactClassName:"Boolean"===e._value?e.evaluate=e._evaluateBooleanConversion:"Number"===e._value?e.evaluate=e._evaluateNumberConversion:"String"===e._value?e.evaluate=e._evaluateStringConversion:e$2e(C$C[e._value])&&(e.evaluate=Ae$g(e._value)):e._type===s$u.BINARY?"+"===e._value?e.evaluate=e._evaluatePlus:"-"===e._value?e.evaluate=e._evaluateMinus:"*"===e._value?e.evaluate=e._evaluateTimes:"/"===e._value?e.evaluate=e._evaluateDivide:"%"===e._value?e.evaluate=e._evaluateMod:"==="===e._value?e.evaluate=e._evaluateEqualsStrict:"!=="===e._value?e.evaluate=e._evaluateNotEqualsStrict:"<"===e._value?e.evaluate=e._evaluateLessThan:"<="===e._value?e.evaluate=e._evaluateLessThanOrEquals:">"===e._value?e.evaluate=e._evaluateGreaterThan:">="===e._value?e.evaluate=e._evaluateGreaterThanOrEquals:"&&"===e._value?e.evaluate=e._evaluateAnd:"||"===e._value?e.evaluate=e._evaluateOr:"=~"===e._value?e.evaluate=e._evaluateRegExpMatch:"!~"===e._value?e.evaluate=e._evaluateRegExpNotMatch:e$2e(O$s[e._value])&&(e.evaluate=Re$d(e._value)):e._type===s$u.TERNARY?e.evaluate=be$h(e._value):e._type===s$u.MEMBER?"brackets"===e._value?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===s$u.ARRAY?e.evaluate=e._evaluateArray:e._type===s$u.VARIABLE?e.evaluate=e._evaluateVariable:e._type===s$u.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===s$u.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===s$u.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===s$u.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===s$u.REGEX?e.evaluate=e._evaluateRegExp:e._type===s$u.BUILTIN_VARIABLE?"tiles3d_tileset_time"===e._value&&(e.evaluate=Ee$f):e.evaluate=e._evaluateLiteral}function Ee$f(e){return e$2e(e)?e.content.tileset.timeSinceLoad:0}function Ae$g(e){var t=C$C[e];return function(i){var n=this._left.evaluate(i);return t(e,n)}}function Re$d(e){var t=O$s[e];return function(i){var n=this._left.evaluate(i),r=this._right.evaluate(i);return t(e,n,r)}}function be$h(e){var t=F$D[e];return function(i){var n=this._left.evaluate(i),r=this._right.evaluate(i),o=this._test.evaluate(i);return t(e,n,r,o)}}function M$A(e,t){if(e$2e(e))return e.getProperty(t)}function D$y(e){return"feature"===e._value}function k$v(e){for(var t=e._left,i=t.length,n=0;n<i;++n)if(t[n]._type!==s$u.LITERAL_NUMBER)return;var r=t[0]._value,o=t[1]._value,a=t[2]._value,s=4===i?t[3]._value:1;return e$1X.fromHsl(r,o,a,s,T$z)}function P$x(e){for(var t=e._left,i=t.length,n=0;n<i;++n)if(t[n]._type!==s$u.LITERAL_NUMBER)return;var r=T$z;return r.red=t[0]._value/255,r.green=t[1]._value/255,r.blue=t[2]._value/255,r.alpha=4===i?t[3]._value:1,r}function A$G(e){return e%1==0?e.toFixed(1):e.toString()}function Le$h(e){return"vec3("+A$G(e.red)+", "+A$G(e.green)+", "+A$G(e.blue)+")"}function S$v(e){return"vec4("+A$G(e.red)+", "+A$G(e.green)+", "+A$G(e.blue)+", "+A$G(e.alpha)+")"}function X$u(e,t,i,n){for(var r=e.length,o=new Array(r),a=0;a<r;++a)o[a]=e[a].getShaderExpression(t,i,n);return o}u$B.prototype._evaluateLiteral=function(){return this._value},u$B.prototype._evaluateLiteralColor=function(e){var t=T$z,i=this._left;if("color"===this._value)e$2e(i)?i.length>1?(e$1X.fromCssColorString(i[0].evaluate(e),t),t.alpha=i[1].evaluate(e)):e$1X.fromCssColorString(i[0].evaluate(e),t):e$1X.fromBytes(255,255,255,255,t);else if("rgb"===this._value)e$1X.fromBytes(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),255,t);else if("rgba"===this._value){var n=255*i[3].evaluate(e);e$1X.fromBytes(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),n,t)}else"hsl"===this._value?e$1X.fromHsl(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),1,t):"hsla"===this._value&&e$1X.fromHsl(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),i[3].evaluate(e),t);return e$2c.fromColor(t,m$z.getCartesian4())},u$B.prototype._evaluateLiteralVector=function(e){for(var t=m$z.getArray(),i=this._value,n=this._left,r=n.length,o=0;o<r;++o){var a=n[o].evaluate(e);if("number"==typeof a)t.push(a);else if(a instanceof o$1o)t.push(a.x,a.y);else if(a instanceof o$1p)t.push(a.x,a.y,a.z);else{if(!(a instanceof e$2c))throw new t$13(i+" argument must be a vector or number. Argument is "+a+".");t.push(a.x,a.y,a.z,a.w)}}var s=t.length,l=parseInt(i.charAt(3));if(0===s)throw new t$13("Invalid "+i+" constructor. No valid arguments.");if(s<l&&s>1)throw new t$13("Invalid "+i+" constructor. Not enough arguments.");if(s>l&&r>1)throw new t$13("Invalid "+i+" constructor. Too many arguments.");if(1===s){var u=t[0];t.push(u,u,u)}return"vec2"===i?o$1o.fromArray(t,0,m$z.getCartesian2()):"vec3"===i?o$1p.fromArray(t,0,m$z.getCartesian3()):"vec4"===i?e$2c.fromArray(t,0,m$z.getCartesian4()):void 0},u$B.prototype._evaluateLiteralString=function(){return this._value},u$B.prototype._evaluateVariableString=function(e){for(var t=this._value,i=V$s.exec(t);null!==i;){var n=i[0],r=M$A(e,i[1]);e$2e(r)||(r=""),t=t.replace(n,r),i=V$s.exec(t)}return t},u$B.prototype._evaluateVariable=function(e){return M$A(e,this._value)},u$B.prototype._evaluateMemberDot=function(e){if(D$y(this._left))return M$A(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(e$2e(t)){var i=this._right.evaluate(e);if(t instanceof o$1o||t instanceof o$1p||t instanceof e$2c){if("r"===i)return t.x;if("g"===i)return t.y;if("b"===i)return t.z;if("a"===i)return t.w}return t[i]}},u$B.prototype._evaluateMemberBrackets=function(e){if(D$y(this._left))return M$A(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(e$2e(t)){var i=this._right.evaluate(e);if(t instanceof o$1o||t instanceof o$1p||t instanceof e$2c){if(0===i||"r"===i)return t.x;if(1===i||"g"===i)return t.y;if(2===i||"b"===i)return t.z;if(3===i||"a"===i)return t.w}return t[i]}},u$B.prototype._evaluateArray=function(e){for(var t=[],i=0;i<this._value.length;i++)t[i]=this._value[i].evaluate(e);return t},u$B.prototype._evaluateNot=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$13('Operator "!" requires a boolean argument. Argument is '+t+".");return!t},u$B.prototype._evaluateNegative=function(e){var t=this._left.evaluate(e);if(t instanceof o$1o)return o$1o.negate(t,m$z.getCartesian2());if(t instanceof o$1p)return o$1p.negate(t,m$z.getCartesian3());if(t instanceof e$2c)return e$2c.negate(t,m$z.getCartesian4());if("number"==typeof t)return-t;throw new t$13('Operator "-" requires a vector or number argument. Argument is '+t+".")},u$B.prototype._evaluatePositive=function(e){var t=this._left.evaluate(e);if(!(t instanceof o$1o||t instanceof o$1p||t instanceof e$2c||"number"==typeof t))throw new t$13('Operator "+" requires a vector or number argument. Argument is '+t+".");return t},u$B.prototype._evaluateLessThan=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$13('Operator "<" requires number arguments. Arguments are '+t+" and "+i+".");return t<i},u$B.prototype._evaluateLessThanOrEquals=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$13('Operator "<=" requires number arguments. Arguments are '+t+" and "+i+".");return t<=i},u$B.prototype._evaluateGreaterThan=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$13('Operator ">" requires number arguments. Arguments are '+t+" and "+i+".");return t>i},u$B.prototype._evaluateGreaterThanOrEquals=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t=parseFloat(t),i=parseFloat(i),"number"!=typeof t||"number"!=typeof i)throw new t$13('Operator ">=" requires number arguments. Arguments are '+t+" and "+i+".");return t>=i},u$B.prototype._evaluateOr=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$13('Operator "||" requires boolean arguments. First argument is '+t+".");if(t)return!0;var i=this._right.evaluate(e);if("boolean"!=typeof i)throw new t$13('Operator "||" requires boolean arguments. Second argument is '+i+".");return t||i},u$B.prototype._evaluateAnd=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new t$13('Operator "&&" requires boolean arguments. First argument is '+t+".");if(!t)return!1;var i=this._right.evaluate(e);if("boolean"!=typeof i)throw new t$13('Operator "&&" requires boolean arguments. Second argument is '+i+".");return t&&i},u$B.prototype._evaluatePlus=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.add(t,i,m$z.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.add(t,i,m$z.getCartesian3());if(i instanceof e$2c&&t instanceof e$2c)return e$2c.add(t,i,m$z.getCartesian4());if("string"==typeof t||"string"==typeof i)return t+i;if("number"==typeof t&&"number"==typeof i)return t+i;throw new t$13('Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateMinus=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.subtract(t,i,m$z.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.subtract(t,i,m$z.getCartesian3());if(i instanceof e$2c&&t instanceof e$2c)return e$2c.subtract(t,i,m$z.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t-i;throw new t$13('Operator "-" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateTimes=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.multiplyComponents(t,i,m$z.getCartesian2());if(i instanceof o$1o&&"number"==typeof t)return o$1o.multiplyByScalar(i,t,m$z.getCartesian2());if(t instanceof o$1o&&"number"==typeof i)return o$1o.multiplyByScalar(t,i,m$z.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.multiplyComponents(t,i,m$z.getCartesian3());if(i instanceof o$1p&&"number"==typeof t)return o$1p.multiplyByScalar(i,t,m$z.getCartesian3());if(t instanceof o$1p&&"number"==typeof i)return o$1p.multiplyByScalar(t,i,m$z.getCartesian3());if(i instanceof e$2c&&t instanceof e$2c)return e$2c.multiplyComponents(t,i,m$z.getCartesian4());if(i instanceof e$2c&&"number"==typeof t)return e$2c.multiplyByScalar(i,t,m$z.getCartesian4());if(t instanceof e$2c&&"number"==typeof i)return e$2c.multiplyByScalar(t,i,m$z.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t*i;throw new t$13('Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateDivide=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.divideComponents(t,i,m$z.getCartesian2());if(t instanceof o$1o&&"number"==typeof i)return o$1o.divideByScalar(t,i,m$z.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.divideComponents(t,i,m$z.getCartesian3());if(t instanceof o$1p&&"number"==typeof i)return o$1p.divideByScalar(t,i,m$z.getCartesian3());if(i instanceof e$2c&&t instanceof e$2c)return e$2c.divideComponents(t,i,m$z.getCartesian4());if(t instanceof e$2c&&"number"==typeof i)return e$2c.divideByScalar(t,i,m$z.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t/i;throw new t$13('Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateMod=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof o$1o&&t instanceof o$1o)return o$1o.fromElements(t.x%i.x,t.y%i.y,m$z.getCartesian2());if(i instanceof o$1p&&t instanceof o$1p)return o$1p.fromElements(t.x%i.x,t.y%i.y,t.z%i.z,m$z.getCartesian3());if(i instanceof e$2c&&t instanceof e$2c)return e$2c.fromElements(t.x%i.x,t.y%i.y,t.z%i.z,t.w%i.w,m$z.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t%i;throw new t$13('Operator "%" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateEqualsStrict=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);return i instanceof o$1o&&t instanceof o$1o||i instanceof o$1p&&t instanceof o$1p||i instanceof e$2c&&t instanceof e$2c?t.equals(i):("bigint"==typeof t&&(t=Number(t)),t===i)},u$B.prototype._evaluateNotEqualsStrict=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);return i instanceof o$1o&&t instanceof o$1o||i instanceof o$1p&&t instanceof o$1p||i instanceof e$2c&&t instanceof e$2c?!t.equals(i):t!==i},u$B.prototype._evaluateConditional=function(e){var t=this._test.evaluate(e);if("boolean"!=typeof t)throw new t$13("Conditional argument of conditional expression must be a boolean. Argument is "+t+".");return t?this._left.evaluate(e):this._right.evaluate(e)},u$B.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))},u$B.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))},u$B.prototype._evaluateIsExactClass=function(e){return!!e$2e(e)&&e.isExactClass(this._left.evaluate(e))},u$B.prototype._evaluateIsClass=function(e){return!!e$2e(e)&&e.isClass(this._left.evaluate(e))},u$B.prototype._evaluateGetExactClassName=function(e){if(e$2e(e))return e.getExactClassName()},u$B.prototype._evaluateBooleanConversion=function(e){return Boolean(this._left.evaluate(e))},u$B.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))},u$B.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))},u$B.prototype._evaluateRegExp=function(e){var t,i=this._value.evaluate(e),n="";e$2e(this._left)&&(n=this._left.evaluate(e));try{t=new RegExp(i,n)}catch(e){throw new t$13(e)}return t},u$B.prototype._evaluateRegExpTest=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof i))throw new t$13("RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+i+".");return t.test(i)},u$B.prototype._evaluateRegExpMatch=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof i)return t.test(i);if(i instanceof RegExp&&"string"==typeof t)return i.test(t);throw new t$13('Operator "=~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateRegExpNotMatch=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof i)return!t.test(i);if(i instanceof RegExp&&"string"==typeof t)return!i.test(t);throw new t$13('Operator "!~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+i+".")},u$B.prototype._evaluateRegExpExec=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof i))throw new t$13("RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+i+".");var n=t.exec(i);return e$2e(n)?n[1]:null},u$B.prototype._evaluateToString=function(e){var t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof o$1o||t instanceof o$1p||t instanceof e$2c)return String(t);throw new t$13('Unexpected function call "'+this._value+'".')};var $$y="czm_infinity";function y$y(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=u$Z(e.center,o$1p.ZERO),this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilPreloadPass=void 0,this._rsStencilPreloadPass3DTiles=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=e$1X.clone(e$1X.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=u$Z(e.classificationType,_0x2b86ba.BOTH),this._vertexShaderSource=e._vertexShaderSource,this._fragmentShaderSource=e._fragmentShaderSource,this._attributeLocations=e._attributeLocations,this._uniformMap=e._uniformMap,this._pickId=e._pickId,this._modelMatrix=e._modelMatrix,this._boundingSphere=e._boundingSphere,this._batchIdLookUp={};for(var t=this._batchIds.length,i=0;i<t;++i){var n=this._batchIds[i];this._batchIdLookUp[n]=i}}u$B.prototype.getShaderExpression=function(e,t,i){var n,r,o,a,s=this._type,l=this._value;switch(e$2e(this._left)&&(r=Array.isArray(this._left)?X$u(this._left,e,t,this):this._left.getShaderExpression(e,t,this)),e$2e(this._right)&&(o=this._right.getShaderExpression(e,t,this)),e$2e(this._test)&&(a=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(l=X$u(this._value,e,t,this)),s){case s$u.VARIABLE:return e+l;case s$u.UNARY:if("Boolean"===l)return"bool("+r+")";if("Number"===l)return"float("+r+")";if("round"===l)return"floor("+r+" + 0.5)";if(e$2e(C$C[l]))return l+"("+r+")";if("isNaN"===l)return"("+r+" != "+r+")";if("isFinite"===l)return"(abs("+r+") < czm_infinity)";if("String"===l||"isExactClass"===l||"isClass"===l||"getExactClassName"===l)throw new t$13('Error generating style shader: "'+l+'" is not supported.');return e$2e(C$C[l])?l+"("+r+")":l+r;case s$u.BINARY:return"%"===l?"mod("+r+", "+o+")":"==="===l?"("+r+" == "+o+")":"!=="===l?"("+r+" != "+o+")":"atan2"===l?"atan("+r+", "+o+")":e$2e(O$s[l])?l+"("+r+", "+o+")":"("+r+" "+l+" "+o+")";case s$u.TERNARY:if(e$2e(F$D[l]))return l+"("+r+", "+o+", "+a+")";break;case s$u.CONDITIONAL:return"("+a+" ? "+r+" : "+o+")";case s$u.MEMBER:return"r"===o||"x"===o||"0.0"===o?r+"[0]":"g"===o||"y"===o||"1.0"===o?r+"[1]":"b"===o||"z"===o||"2.0"===o?r+"[2]":"a"===o||"w"===o||"3.0"===o?r+"[3]":r+"[int("+o+")]";case s$u.FUNCTION_CALL:throw new t$13('Error generating style shader: "'+l+'" is not supported.');case s$u.ARRAY:if(4===l.length)return"vec4("+l[0]+", "+l[1]+", "+l[2]+", "+l[3]+")";if(3===l.length)return"vec3("+l[0]+", "+l[1]+", "+l[2]+")";if(2===l.length)return"vec2("+l[0]+", "+l[1]+")";throw new t$13("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case s$u.REGEX:throw new t$13("Error generating style shader: Regular expressions are not supported.");case s$u.VARIABLE_IN_STRING:throw new t$13("Error generating style shader: Converting a variable to a string is not supported.");case s$u.LITERAL_NULL:return $$y;case s$u.LITERAL_BOOLEAN:return l?"true":"false";case s$u.LITERAL_NUMBER:return A$G(l);case s$u.LITERAL_STRING:if(e$2e(i)&&i._type===s$u.MEMBER&&("r"===l||"g"===l||"b"===l||"a"===l||"x"===l||"y"===l||"z"===l||"w"===l))return l;if(e$2e(n=e$1X.fromCssColorString(l,T$z)))return Le$h(n);throw new t$13("Error generating style shader: String literals are not supported.");case s$u.LITERAL_COLOR:var u=r;if("color"===l){if(!e$2e(u))return"vec4(1.0)";if(u.length>1){var c=u[0],h=u[1];return"1.0"!==h&&(t.translucent=!0),"vec4("+c+", "+h+")"}return"vec4("+u[0]+", 1.0)"}if("rgb"===l)return e$2e(n=P$x(this))?S$v(n):"vec4("+u[0]+" / 255.0, "+u[1]+" / 255.0, "+u[2]+" / 255.0, 1.0)";if("rgba"===l)return"1.0"!==u[3]&&(t.translucent=!0),e$2e(n=P$x(this))?S$v(n):"vec4("+u[0]+" / 255.0, "+u[1]+" / 255.0, "+u[2]+" / 255.0, "+u[3]+")";if("hsl"===l)return e$2e(n=k$v(this))?S$v(n):"vec4(czm_HSLToRGB(vec3("+u[0]+", "+u[1]+", "+u[2]+")), 1.0)";if("hsla"===l)return e$2e(n=k$v(this))?(1!==n.alpha&&(t.translucent=!0),S$v(n)):("1.0"!==u[3]&&(t.translucent=!0),"vec4(czm_HSLToRGB(vec3("+u[0]+", "+u[1]+", "+u[2]+")), "+u[3]+")");break;case s$u.LITERAL_VECTOR:if(!e$2e(r))throw new t$15("left should always be defined for type ExpressionNodeType.LITERAL_VECTOR");for(var d=r.length,f=l+"(",p=0;p<d;++p)f+=r[p],p<d-1&&(f+=", ");return f+=")";case s$u.LITERAL_REGEX:throw new t$13("Error generating style shader: Regular expressions are not supported.");case s$u.LITERAL_UNDEFINED:return $$y;case s$u.BUILTIN_VARIABLE:if("tiles3d_tileset_time"===l)return"u_time"}},Object.defineProperties(y$y.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var te$m={position:0,a_batchId:1};function se$h(e,t){if(!e$2e(e._va)){var i=t$X.createVertexBuffer({context:t,typedArray:e._positions,usage:A$18.STATIC_DRAW}),n=t$X.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:A$18.STATIC_DRAW}),r=t$X.createIndexBuffer({context:t,typedArray:e._indices,usage:A$18.DYNAMIC_DRAW,indexDatatype:2===e._indices.BYTES_PER_ELEMENT?ce$z.UNSIGNED_SHORT:ce$z.UNSIGNED_INT}),o=[{index:0,vertexBuffer:i,componentDatatype:S$14.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:n,componentDatatype:S$14.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}];e._va=new c$13({context:t,attributes:o,indexBuffer:r}),t.webgl2&&(e._vaSwap=new c$13({context:t,attributes:o,indexBuffer:t$X.createIndexBuffer({context:t,sizeInBytes:r.sizeInBytes,usage:A$18.DYNAMIC_DRAW,indexDatatype:r.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._verticesPromise=void 0}}function ne$m(e,t){if(!e$2e(e._sp)){var i=e._batchTable,n=u$Z(e._attributeLocations,te$m),r=e._pickId,o=e._vertexShaderSource,a=e._fragmentShaderSource;if(e$2e(o))return e._sp=r$14.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:n}),e._spStencil=e._sp,a=(a=s$V.replaceMain(a,"czm_non_pick_main"))+"void main() \n{ \n czm_non_pick_main(); \n gl_FragColor = "+r+"; \n} \n",void(e._spPick=r$14.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:n}));var s=i.getVertexShaderCallback(!1,"a_batchId",void 0)(G$C),l=i.getFragmentShaderCallback()(Q$T,!1,void 0);r=i.getPickId();var u=new s$V({sources:[s]}),c=new s$V({defines:["VECTOR_TILE"],sources:[l]});e._sp=r$14.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:n}),u=new s$V({sources:[G$C]}),c=new s$V({defines:["VECTOR_TILE"],sources:[Q$T]}),e._spStencil=r$14.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:c,attributeLocations:n}),l=(l=s$V.replaceMain(l,"czm_non_pick_main"))+"\nvoid main() \n{ \n czm_non_pick_main(); \n gl_FragColor = "+r+"; \n} \n";var h=new s$V({sources:[s]}),d=new s$V({defines:["VECTOR_TILE"],sources:[l]});e._spPick=r$14.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:n})}}function m$y(e){var t=e?m$Z.EQUAL:m$Z.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:n$_.KEEP,zFail:n$_.DECREMENT_WRAP,zPass:n$_.DECREMENT_WRAP},backFunction:t,backOperation:{fail:n$_.KEEP,zFail:n$_.INCREMENT_WRAP,zPass:n$_.INCREMENT_WRAP},reference:u$M.CESIUM_3D_TILE_MASK,mask:u$M.CESIUM_3D_TILE_MASK},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1}}function J$u(e){var t=e?m$Z.EQUAL:m$Z.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.INCREMENT_WRAP},backFunction:t,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:u$M.CESIUM_3D_TILE_MASK,mask:u$M.CESIUM_3D_TILE_MASK},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:re$G.LESS_OR_EQUAL},depthMask:!1}}var oe$h={stencilTest:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.NOT_EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:u$M.CLASSIFICATION_MASK},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:Ee$r.ALPHA_BLEND},fe$h={stencilTest:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},backFunction:m$Z.NOT_EQUAL,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.DECREMENT_WRAP},reference:0,mask:u$M.CLASSIFICATION_MASK},stencilMask:u$M.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function ce$i(e){e$2e(e._rsStencilPreloadPass)||(e._rsStencilPreloadPass=d$1m.fromCache(m$y(!1)),e._rsStencilPreloadPass3DTiles=d$1m.fromCache(m$y(!0)),e._rsStencilDepthPass=d$1m.fromCache(J$u(!1)),e._rsStencilDepthPass3DTiles=d$1m.fromCache(J$u(!0)),e._rsColorPass=d$1m.fromCache(oe$h),e._rsPickPass=d$1m.fromCache(fe$h))}var w$v=new p$1d,Z$w=new o$1p;function _e$e(e,t){if(!e$2e(e._uniformMap)){var i={u_modifiedModelViewProjection:function(){var i=t.uniformState.view,n=t.uniformState.projection;return p$1d.clone(i,w$v),p$1d.multiplyByPoint(w$v,e._center,Z$w),p$1d.setTranslation(w$v,Z$w,w$v),p$1d.multiply(n,w$v,w$v),w$v},u_highlightColor:function(){return e._highlightColor}};e._uniformMap=e._batchTable.getUniformMapCallback()(i)}}function U$x(e,t,i,n,r,o,a){for(var s=e.constructor.BYTES_PER_ELEMENT,l=o.length,u=0;u<l;++u){var c=a[o[u]],h=n[c],d=r[c],f=new e.constructor(e.buffer,s*h,d);t.set(f,i),n[c]=i,i+=d}return i}function ue$j(e,t){var i=e._indices,n=e._indexOffsets,r=e._indexCounts,o=e._batchIdLookUp,a=new i.constructor(i.length),s=t.pop(),l=[s],u=U$x(i,a,0,n,r,s.batchIds,o);for(s.offset=0,s.count=u;t.length>0;){var c=t.pop();if(e$1X.equals(c.color,s.color))u=U$x(i,a,u,n,r,c.batchIds,o),s.batchIds=s.batchIds.concat(c.batchIds),s.count=u-s.offset;else{var h=u;u=U$x(i,a,u,n,r,c.batchIds,o),c.offset=h,c.count=u-h,l.push(c),s=c}}e._va.indexBuffer.copyFromArrayView(a),e._indices=a,e._batchedIndices=l}function B$v(e,t,i,n,r,o,a){for(var s=e.bytesPerIndex,l=o.length,u=0;u<l;++u){var c=a[o[u]],h=n[c],d=r[c];t.copyFromBuffer(e,h*s,i*s,d*s),n[c]=i,i+=d}return i}function he$f(e,t){var i=e._indexOffsets,n=e._indexCounts,r=e._batchIdLookUp,o=t.pop(),a=[o],s=e._va.indexBuffer,l=e._vaSwap.indexBuffer,u=B$v(s,l,0,i,n,o.batchIds,r);for(o.offset=0,o.count=u;t.length>0;){var c=t.pop();if(e$1X.equals(c.color,o.color))u=B$v(s,l,u,i,n,c.batchIds,r),o.batchIds=o.batchIds.concat(c.batchIds),o.count=u-o.offset;else{var h=u;u=B$v(s,l,u,i,n,c.batchIds,r),c.offset=h,c.count=u-h,a.push(c),o=c}}var d=e._va;e._va=e._vaSwap,e._vaSwap=d,e._batchedIndices=a}function de$f(e,t){return t.color.toRgba()-e.color.toRgba()}function le$j(e,t){if(!e._batchDirty)return!1;for(var i=e._batchedIndices,n=i.length,r=!1,o={},a=0;a<n;++a){var s=i[a].color.toRgba();if(e$2e(o[s])){r=!0;break}o[s]=!0}return r?r&&!e.forceRebatch&&e._framesSinceLastRebatch<120?void++e._framesSinceLastRebatch:(i.sort(de$f),t.webgl2?he$f(e,i):ue$j(e,i),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0):(e._batchDirty=!1,!1)}function ie$l(e,t){var i=le$j(e,t),n=e._commands,r=e._batchedIndices,o=r.length,a=3*o;if(!e$2e(n)||i||n.length!==a){n.length=a;for(var s=e._va,l=e._sp,u=u$Z(e._modelMatrix,p$1d.IDENTITY),c=e._uniformMap,h=e._boundingVolume,d=0;d<o;++d){var f=r[d].offset,p=r[d].count,_=n[3*d];e$2e(_)||(_=n[3*d]=new i$$({owner:e})),_.vertexArray=s,_.modelMatrix=u,_.offset=f,_.count=p,_.renderState=e._rsStencilPreloadPass,_.shaderProgram=l,_.uniformMap=c,_.boundingVolume=h,_.cull=!1,_.pass=Le$q.TERRAIN_CLASSIFICATION;var m=i$$.shallowClone(_,_.derivedCommands.tileset);m.renderState=e._rsStencilPreloadPass3DTiles,m.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,_.derivedCommands.tileset=m;var g=n[3*d+1];e$2e(g)||(g=n[3*d+1]=new i$$({owner:e})),g.vertexArray=s,g.modelMatrix=u,g.offset=f,g.count=p,g.renderState=e._rsStencilDepthPass,g.shaderProgram=l,g.uniformMap=c,g.boundingVolume=h,g.cull=!1,g.pass=Le$q.TERRAIN_CLASSIFICATION;var x=i$$.shallowClone(g,g.derivedCommands.tileset);x.renderState=e._rsStencilDepthPass3DTiles,x.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,g.derivedCommands.tileset=x;var y=n[3*d+2];e$2e(y)||(y=n[3*d+2]=new i$$({owner:e})),y.vertexArray=s,y.modelMatrix=u,y.offset=f,y.count=p,y.renderState=e._rsColorPass,y.shaderProgram=l,y.uniformMap=c,y.boundingVolume=h,y.cull=!1,y.pass=Le$q.TERRAIN_CLASSIFICATION;var v=i$$.shallowClone(y,y.derivedCommands.tileset);v.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,y.derivedCommands.tileset=v}e._commandsDirty=!0}}function Ie$c(e,t){if(e.classificationType!==_0x2b86ba.TERRAIN&&t.invertClassification&&(!e$2e(e._commandsIgnoreShow)||e._commandsDirty)){for(var i=e._commands,n=e._commandsIgnoreShow,r=e._spStencil,o=i.length,a=n.length=o/3*2,s=0,l=0;l<a;l+=2){var u=n[l]=i$$.shallowClone(i[s],n[l]);u.shaderProgram=r,u.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,(u=n[l+1]=i$$.shallowClone(i[s+1],n[l+1])).shaderProgram=r,u.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,s+=3}e._commandsDirty=!1}}function Se$a(e){if(e._pickCommandsDirty){var t=e._indexOffsets.length,i=e._pickCommands;i.length=3*t;for(var n=e._va,r=e._spStencil,o=e._spPick,a=u$Z(e._modelMatrix,p$1d.IDENTITY),s=e._uniformMap,l=0;l<t;++l){var u=e._indexOffsets[l],c=e._indexCounts[l],h=e$2e(e._boundingVolumes)?e._boundingVolumes[l]:e.boundingVolume,d=i[3*l];e$2e(d)||(d=i[3*l]=new i$$({owner:e,pickOnly:!0})),d.vertexArray=n,d.modelMatrix=a,d.offset=u,d.count=c,d.renderState=e._rsStencilPreloadPass,d.shaderProgram=r,d.uniformMap=s,d.boundingVolume=h,d.pass=Le$q.TERRAIN_CLASSIFICATION;var f=i$$.shallowClone(d,d.derivedCommands.tileset);f.renderState=e._rsStencilPreloadPass3DTiles,f.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=f;var p=i[3*l+1];e$2e(p)||(p=i[3*l+1]=new i$$({owner:e,pickOnly:!0})),p.vertexArray=n,p.modelMatrix=a,p.offset=u,p.count=c,p.renderState=e._rsStencilDepthPass,p.shaderProgram=r,p.uniformMap=s,p.boundingVolume=h,p.pass=Le$q.TERRAIN_CLASSIFICATION;var _=i$$.shallowClone(p,p.derivedCommands.tileset);_.renderState=e._rsStencilDepthPass3DTiles,_.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=_;var m=i[3*l+2];e$2e(m)||(m=i[3*l+2]=new i$$({owner:e,pickOnly:!0})),m.vertexArray=n,m.modelMatrix=a,m.offset=u,m.count=c,m.renderState=e._rsPickPass,m.shaderProgram=o,m.uniformMap=s,m.boundingVolume=h,m.pass=Le$q.TERRAIN_CLASSIFICATION;var g=i$$.shallowClone(m,m.derivedCommands.tileset);g.pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,m.derivedCommands.tileset=g}e._pickCommandsDirty=!1}}function be$g(e,t){e._updatingAllCommands=!0;var i,n=e._batchIds,r=n.length;for(i=0;i<r;++i){var o=t[n[i]];o.show=!0,o.color=e$1X.WHITE}var a=e._batchedIndices;for(r=a.length,i=0;i<r;++i)a[i].color=e$1X.clone(e$1X.WHITE);e._updatingAllCommands=!1,e._batchDirty=!0}y$y.prototype.createFeatures=function(e,t){for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=i[r];t[o]=new e$M(e,o)}},y$y.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var ge$e=new e$1X,Ee$e=e$1X.WHITE,Te$d=!0,Ae$f=/\$/;function $$x(e,t,i,n){var r,o,a=e.classificationType,s=a!==_0x2b86ba.CESIUM_3D_TILE,l=a!==_0x2b86ba.TERRAIN,u=t.commandList,c=i.length;for(o=0;o<c;++o)s&&((r=i[o]).pass=Le$q.TERRAIN_CLASSIFICATION,u.push(r)),l&&((r=i[o].derivedCommands.tileset).pass=Le$q.CESIUM_3D_TILE_CLASSIFICATION,u.push(r));if(t.invertClassification&&e$2e(n))for(c=n.length,o=0;o<c;++o)u.push(n[o])}function ve$f(e,t){for(var i=e.commandList,n=t.length,r=0;r<n;r+=3){var o=t[r+2];o.pass=Le$q.OPAQUE,i.push(o)}}function Le$g(e){var t=e.debugWireframe===e._debugWireframe;if(!(t=t&&!(e.debugWireframe&&e._wireframeDirty))){var i,n;e$2e(e._rsWireframe)||(e._rsWireframe=d$1m.fromCache({})),e.debugWireframe?(i=e._rsWireframe,n=W$18.LINES):(i=e._rsColorPass,n=W$18.TRIANGLES);for(var r=e._commands,o=r.length,a=0;a<o;a+=3){var s=r[a+2];s.renderState=i,s.primitiveType=n}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}}y$y.prototype.applyStyle=function(e,t){if(e$2e(e)){var i=e.color,n=i instanceof L$E&&!Ae$f.test(i.expression);this._updatingAllCommands=n;var r,o=this._batchIds,a=o.length;for(r=0;r<a;++r){var s=t[o[r]];s.color=e$2e(e.color)?e.color.evaluateColor(s,ge$e):Ee$e,s.show=e$2e(e.show)?e.show.evaluate(s):Te$d}if(n){var l=this._batchedIndices;for(a=l.length,r=0;r<a;++r)l[r].color=e$1X.clone(e$1X.WHITE);this._updatingAllCommands=!1,this._batchDirty=!0}}else be$g(this,t)},y$y.prototype.updateCommands=function(e,t){if(!this._updatingAllCommands){var i=this._batchIdLookUp,n=i[e];if(e$2e(n)){var r,o=this._indexOffsets,a=this._indexCounts,s=o[n],l=a[n],u=this._batchedIndices,c=u.length;for(r=0;r<c;++r){var h=u[r].offset,d=u[r].count;if(s>=h&&s<h+d)break}u.push(new c$x({color:e$1X.clone(t),offset:s,count:l,batchIds:[e]}));for(var f=[],p=[],_=u[r].batchIds,m=_.length,g=0;g<m;++g){var x=_[g];if(x!==e)o[i[x]]<s?f.push(x):p.push(x)}0!==p.length&&u.push(new c$x({color:e$1X.clone(u[r].color),offset:s+l,count:u[r].offset+u[r].count-(s+l),batchIds:p})),0!==f.length?(u[r].count=s-u[r].offset,u[r].batchIds=f):u.splice(r,1),this._batchDirty=!0}}},y$y.prototype.update=function(e){var t=e.context;se$h(this,t),ne$m(this,t),ce$i(this),_e$e(this,t);var i=e.passes;i.render&&(ie$l(this,t),Ie$c(this,e),Le$g(this),this._debugWireframe?ve$f(e,this._commands):$$x(this,e,this._commands,this._commandsIgnoreShow)),i.pick&&(Se$a(this),$$x(this,e,this._pickCommands))},y$y.prototype.isDestroyed=function(){return!1},y$y.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaSwap=this._vaSwap&&this._vaSwap.destroy(),i$11(this)};var Ee$d=new o$1p,y$x=s$v.ModelState;function A$F(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).gltf;if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),!(t instanceof Uint8Array))throw new t$13("Only binary glTF is supported as a classifier.");re$s(t=O$u(t)),E$E(t),ue$l(t),he$h(t),e$L.buffer(t,(function(e){if(!e$2e(e.extras._pipeline.source))throw new t$13("Buffer data must be embedded in the binary gltf.")}));var i=t.nodes,n=t.meshes,r=i[0].mesh;if(1!==i.length||!e$2e(r))throw new t$13("Only one node is supported for classification and it must have a mesh.");if(1!==n.length)throw new t$13("Only one mesh is supported when using b3dm for classification.");var o=n[0].primitives;if(1!==o.length)throw new t$13("Only one primitive per mesh is supported when using b3dm for classification.");if(!e$2e(o[0].attributes.POSITION))throw new t$13("The mesh must have a position attribute.");if(!e$2e(o[0].attributes._BATCHID))throw new t$13("The mesh must have a batch id attribute.");this._gltf=t,this.show=u$Z(e.show,!0),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(this.modelMatrix),this._ready=!1,this._readyPromise=o$1l.defer(),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=u$Z(e.debugWireframe,!1),this._debugWireframe=!1,this._classificationType=e.classificationType,this._vertexShaderLoaded=e.vertexShaderLoaded,this._classificationShaderLoaded=e.classificationShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=u$Z(e.ignoreCommands,!1),this._upAxis=u$Z(e.upAxis,v$y.Y),this._batchTable=e.batchTable,this._computedModelMatrix=new p$1d,this._initialRadius=void 0,this._boundingSphere=void 0,this._scaledBoundingSphere=new i$1d,this._state=y$x.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._dirty=!1,this._nodeMatrix=new p$1d,this._primitive=void 0,this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms=void 0,this._buffers={},this._vertexArray=void 0,this._shaderProgram=void 0,this._uniformMap=void 0,this._geometryByteLength=0,this._trianglesLength=0,this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0}function Ce$a(e){var t=e.gltf,i=e._loadResources;e$L.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function Be$e(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;e$L.bufferView(e.gltf,(function(e,t){e.target===de$y.ARRAY_BUFFER&&i.enqueue(t)}));var n=e._loadResources.indexBuffersToCreate,r={};e$L.accessor(e.gltf,(function(e){var i=e.bufferView;t[i].target===de$y.ELEMENT_ARRAY_BUFFER&&!e$2e(r[i])&&(r[i]=!0,n.enqueue({id:i,componentType:e.componentType}))}))}function Le$f(e,t){var i=t._loadResources,n=t.gltf.bufferViews[e],r=i.getBuffer(n);t._buffers[e]=r,t._geometryByteLength+=r.byteLength}function Oe$e(e,t,i){var n=i._loadResources,r=i.gltf.bufferViews[e],o={typedArray:n.getBuffer(r),indexDatatype:t};i._buffers[e]=o,i._geometryByteLength+=o.typedArray.byteLength}function Ae$e(e){var t=e._loadResources;if(0===t.pendingBufferLoads){for(var i=t.vertexBuffersToCreate,n=t.indexBuffersToCreate;i.length>0;)Le$f(i.dequeue(),e);for(;n.length>0;){var r=n.dequeue();Oe$e(r.id,r.componentType,e)}}}function Me$g(e,t){var i=t.gltf.meshes[0].primitives[0],n=s$v.modifyShaderForQuantizedAttributes(t.gltf,i,e);return t._quantizedUniforms=n.uniforms,n.shader}function ne$l(e,t){return e$2e(t)&&(e=t(e)),e}function we$c(e){var t=e.gltf,i=s$v.getAttributeOrUniformBySemantic(t,"POSITION"),n=s$v.getAttributeOrUniformBySemantic(t,"_BATCHID"),r={};r[i]=0,r[n]=1;var o,a,s=s$v.getAttributeOrUniformBySemantic(t,"MODELVIEWPROJECTION");if(e$2e(s))o="uniform mat4 "+s+";\n",a=s+" * vec4("+i+", 1.0)";else{var l=s$v.getAttributeOrUniformBySemantic(t,"PROJECTION"),u=s$v.getAttributeOrUniformBySemantic(t,"MODELVIEW");e$2e(u)||(u=s$v.getAttributeOrUniformBySemantic(t,"CESIUM_RTC_MODELVIEW")),o="uniform mat4 "+u+";\nuniform mat4 "+l+";\n",a=l+" * "+u+" * vec4("+i+", 1.0)"}var c="attribute vec3 "+i+";\nattribute float "+n+";\n"+o+"void main() {\n"+(" vec4 positionInClipCoords = "+a+";\n")+" gl_Position = czm_depthClampFarPlane(positionInClipCoords);\n}\n";e.extensionsUsed.WEB3D_quantized_attributes&&(c=Me$g(c,e));var h=ne$l(c,e._vertexShaderLoaded),d=ne$l("#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvoid main() \n{ \n gl_FragColor = vec4(1.0); \n czm_writeDepthClampedToFarPlane();\n}\n",e._classificationShaderLoaded);h=s$v.modifyVertexShaderForLogDepth(h,a),d=s$v.modifyFragmentShaderForLogDepth(d),e._shaderProgram={vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:r}}function De$e(){return{POSITION:0,_BATCHID:1}}function Re$c(e){if(e._loadResources.finishedBuffersCreation()&&!e$2e(e._vertexArray)){var t,i=e._buffers,n=e.gltf,r=n.accessors,o=n.meshes[0].primitives[0],a=De$e(),s={};if(e$L.meshPrimitiveAttribute(o,(function(e,t){var o=a[t];if(e$2e(o)){var l=r[e];s[t]={index:o,vertexBuffer:i[l.bufferView],componentsPerAttribute:r$B(l.type),componentDatatype:l.componentType,offsetInBytes:l.byteOffset,strideInBytes:p$A(n,l)}}})),e$2e(o.indices)){var l=r[o.indices];t=i[l.bufferView]}e._vertexArray={attributes:s,indexBuffer:t}}}Object.defineProperties(A$F.prototype,{gltf:{get:function(){return this._gltf}},boundingSphere:{get:function(){if(this._state!==y$x.LOADED)throw new t$15("The model is not loaded. Use ClassificationModel.readyPromise or wait for ClassificationModel.ready to be true.");var e=this.modelMatrix,t=p$1d.getScale(e,Ee$d),i=this._scaledBoundingSphere;return i.center=o$1p.multiplyComponents(this._boundingSphere.center,t,i.center),i.radius=o$1p.maximumComponent(t)*this._initialRadius,e$2e(this._rtcCenter)&&o$1p.add(this._rtcCenter,i.center,i.center),i}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},dirty:{get:function(){return this._dirty}},extensionsUsed:{get:function(){return e$2e(this._extensionsUsed)||(this._extensionsUsed=s$v.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return e$2e(this._extensionsRequired)||(this._extensionsRequired=s$v.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return 0}},classificationType:{get:function(){return this._classificationType}}});var se$g={PROJECTION:function(e,t){return s$v.getGltfSemanticUniforms().PROJECTION(e,t)},MODELVIEW:function(e,t){return s$v.getGltfSemanticUniforms().MODELVIEW(e,t)},CESIUM_RTC_MODELVIEW:function(e,t){return s$v.getGltfSemanticUniforms().CESIUM_RTC_MODELVIEW(e,t)},MODELVIEWPROJECTION:function(e,t){return s$v.getGltfSemanticUniforms().MODELVIEWPROJECTION(e,t)}};function Pe$b(e,t){if(!e$2e(e._uniformMap)){var i={};e$L.technique(e.gltf,(function(n){e$L.techniqueUniform(n,(function(n,r){!e$2e(n.semantic)||!e$2e(se$g[n.semantic])||(i[r]=se$g[n.semantic](t.uniformState,e))}))})),e._uniformMap=i}}function Ue$c(e,t){return s$v.createUniformsForQuantizedAttributes(e.gltf,t,e._quantizedUniforms)}function Ve$b(e,t){switch(e.mode){case W$18.TRIANGLES:return t/3;case W$18.TRIANGLE_STRIP:case W$18.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function Ne$b(e){var t,i,n=e._batchTable,r=e._uniformMap,o=e._vertexArray,a=e.gltf,s=a.accessors,l=a.meshes[0].primitives[0],u=s[l.indices],c=l.attributes.POSITION,h=s$v.getAccessorMinMax(a,c),d=i$1d.fromCornerPoints(o$1p.fromArray(h.min),o$1p.fromArray(h.max));e$2e(u)?(i=u.count,t=u.byteOffset/ce$z.getSizeInBytes(u.componentType)):(i=s[l.attributes.POSITION].count,t=0);(e._trianglesLength+=Ve$b(l,i),e$2e(e._uniformMapLoaded)&&(r=e._uniformMapLoaded(r)),e.extensionsUsed.WEB3D_quantized_attributes)&&(r=p$19(r,Ue$c(e,l)));var f=o.attributes.POSITION,p=f.componentDatatype,_=f.vertexBuffer,m=_.byteOffset,g=_.byteLength/S$14.getSizeInBytes(p),x=S$14.createArrayBufferView(p,_.buffer,m,g);p=(f=o.attributes._BATCHID).componentDatatype,m=(_=f.vertexBuffer).byteOffset,g=_.byteLength/S$14.getSizeInBytes(p);var y,v=S$14.createArrayBufferView(p,_.buffer,m,g),$=o.indexBuffer.typedArray;y=o.indexBuffer.indexDatatype===ce$z.UNSIGNED_SHORT?new Uint16Array($.buffer,$.byteOffset,$.byteLength/Uint16Array.BYTES_PER_ELEMENT):new Uint32Array($.buffer,$.byteOffset,$.byteLength/Uint32Array.BYTES_PER_ELEMENT),x=l$R(x);var b=[],T=[],C=[],S=[],w=(v=l$R(v))[(y=l$R(y,t,t+i))[0]];b.push(w),C.push(0);for(var E,P,A,L=y.length,M=1;M<L;++M)(E=v[y[M]])!==w&&(A=M-(P=C[C.length-1]),b.push(E),T.push(A),C.push(M),S.push(new c$x({offset:P,count:A,batchIds:[w],color:e$1X.WHITE})),w=E);A=L-(P=C[C.length-1]),T.push(A),S.push(new c$x({offset:P,count:A,batchIds:[w],color:e$1X.WHITE}));var R=e._shaderProgram,O=R.vertexShaderSource,D=R.fragmentShaderSource,I=R.attributeLocations,B=e$2e(e._pickIdLoaded)?e._pickIdLoaded():void 0;e._primitive=new y$y({classificationType:e._classificationType,positions:x,indices:y,indexOffsets:C,indexCounts:T,batchIds:b,vertexBatchIds:v,batchedIndices:S,batchTable:n,boundingVolume:new i$1d,_vertexShaderSource:O,_fragmentShaderSource:D,_attributeLocations:I,_uniformMap:r,_pickId:B,_modelMatrix:new p$1d,_boundingSphere:d}),e._buffers=void 0,e._vertexArray=void 0,e._shaderProgram=void 0,e._uniformMap=void 0}function We$a(e){if(e._loadResources.finished()&&!e$2e(e._primitive)){var t=e.gltf.nodes[0];e._nodeMatrix=s$v.getTransform(t,e._nodeMatrix),Ne$b(e)}}function ae$j(e,t){var i=t.context;s$v.checkSupportedGlExtensions(e.gltf.glExtensionsUsed,i),Ae$e(e),we$c(e),Re$c(e),Pe$b(e,i),We$a(e)}var Fe$d=new e$2c,Z$v=new p$1d;function qe$6(e,t,i,n){var r=e._computedModelMatrix;if(e._mode!==C$14.SCENE3D&&!e._ignoreCommands){var o=p$1d.getColumn(r,3,Fe$d);if(e$2c.equals(o,e$2c.UNIT_W)){var a=e.boundingSphere.center,s=m$19.wgs84To2DModelMatrix(n,a,Z$v);r=p$1d.multiply(s,r,Z$v),e$2e(e._rtcCenter)&&(p$1d.setTranslation(r,e$2c.UNIT_W,r),e._rtcCenter=e._rtcCenter2D)}else r=m$19.basisTo2D(n,r,Z$v),e._rtcCenter=e._rtcCenter3D}var l=e._primitive;(t||i)&&(p$1d.multiplyTransformation(r,e._nodeMatrix,l._modelMatrix),i$1d.transform(l._boundingSphere,l._modelMatrix,l._boundingVolume),e$2e(e._rtcCenter)&&o$1p.add(e._rtcCenter,l._boundingVolume.center,l._boundingVolume.center))}A$F.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},A$F.prototype.update=function(e){if(e.mode!==C$14.MORPHING){var t=s$Z.supportsWebPSync();if(e$2e(t)){if(this._state===y$x.NEEDS_LOAD&&e$2e(this.gltf)&&(this._state=y$x.LOADING,this._state!==y$x.FAILED)){var i=this.gltf.extensions;if(e$2e(i)&&e$2e(i.CESIUM_RTC)){var n=o$1p.fromArray(i.CESIUM_RTC.center);if(!o$1p.equals(n,o$1p.ZERO)){this._rtcCenter3D=n;var r=e.mapProjection,o=r.ellipsoid.cartesianToCartographic(this._rtcCenter3D),a=r.project(o);o$1p.fromElements(a.z,a.x,a.y,a),this._rtcCenter2D=a,this._rtcCenterEye=new o$1p,this._rtcCenter=this._rtcCenter3D}}this._loadResources=new t$t,s$v.parseBuffers(this)}var s=this._loadResources,l=!1;this._state===y$x.LOADING&&(0===s.pendingBufferLoads&&(s$v.checkSupportedExtensions(this.extensionsRequired,t),Ce$a(this),Be$e(this),this._boundingSphere=s$v.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,ae$j(this,e)),s.finished()&&(this._state=y$x.LOADED,l=!0)),e$2e(s)&&this._state===y$x.LOADED&&(l||ae$j(this,e),s.finished()&&(this._loadResources=void 0));var u=this.show;if(u&&this._state===y$x.LOADED||l){this._dirty=!1;var c=this.modelMatrix,h=e.mode!==this._mode;this._mode=e.mode;var d=!p$1d.equals(this._modelMatrix,c)||h;if(d||l){p$1d.clone(c,this._modelMatrix);var f=this._computedModelMatrix;p$1d.clone(c,f),this._upAxis===v$y.Y?p$1d.multiplyTransformation(f,v$y.Y_UP_TO_Z_UP,f):this._upAxis===v$y.X&&p$1d.multiplyTransformation(f,v$y.X_UP_TO_Z_UP,f)}(d||l)&&(qe$6(this,d,l,e.mapProjection),this._dirty=!0)}if(l){var p=this;return void e.afterRender.push((function(){p._ready=!0,p._readyPromise.resolve(p)}))}u&&!this._ignoreCommands&&(this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.debugWireframe=this.debugWireframe,this._primitive.update(e))}}},A$F.prototype.isDestroyed=function(){return!1},A$F.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$11(this)};var e$K={HIGHLIGHT:0,REPLACE:1,MIX:2,getColorBlend:function(e,t){return e===e$K.HIGHLIGHT?0:e===e$K.REPLACE?1:e===e$K.MIX?e$2d.clamp(t,e$2d.EPSILON4,1):void 0}},I$K=Object.freeze(e$K);function r$A(){}function b$H(e,t){var i="runtime."+Object.keys(e.createdBufferViews).length,n=e.buffers,r=Object.keys(n).length;return n[r]=t,e.createdBufferViews[i]={buffer:r,byteOffset:0,byteLength:t.byteLength},i}function R$s(e,t,i){var n=t._loadResources,r=b$H(n,e);return n.vertexBuffersToCreate.enqueue(r),r}function P$w(e,t,i){var n=e.typedArray,r=t._loadResources,o=b$H(r,n);return r.indexBuffersToCreate.enqueue({id:o,componentType:S$14.fromTypedArray(n)}),{bufferViewId:o,numberOfIndices:e.numberOfIndices}}function T$y(e,t,i,n){if(r$A._taskProcessorReady){var r=i.primitivesToDecode.peek();if(e$2e(r)){var o=e.scheduleTask(r,[r.array.buffer]);if(e$2e(o))return i.activeDecodingTasks++,i.primitivesToDecode.dequeue(),o.then((function(e){i.activeDecodingTasks--;var n=P$w(e.indexArray,t),o={},a=e.attributeData;for(var s in a)if(a.hasOwnProperty(s)){var l=a[s],u=R$s(l.array,t),c=l.data;c.bufferView=u,o[s]=c}t._decodedData[r.mesh+".primitive."+r.primitive]={bufferView:n.bufferViewId,numberOfIndices:n.numberOfIndices,attributes:o}}))}}}function p$x(e,t,i){return o$1q.typeOf.string("samplerUniformName",e),o$1q.typeOf.string("matrixUniformName",t),o$1q.typeOf.string("styleUniformName",i)," float clipDistance = clip(gl_FragCoord, "+e+", "+t+"); \n vec4 clippingPlanesEdgeColor = vec4(1.0); \n clippingPlanesEdgeColor.rgb = "+i+".rgb; \n float clippingPlanesEdgeWidth = "+i+".a; \n if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) \n { \n gl_FragColor = clippingPlanesEdgeColor;\n } \n"}r$A._maxDecodingConcurrency=Math.max(s$Z.hardwareConcurrency-1,1),r$A._decoderTaskProcessor=void 0,r$A._taskProcessorReady=!1,r$A._getDecoderTaskProcessor=function(){if(!e$2e(r$A._decoderTaskProcessor)){var e=new i$W("decodeDraco",r$A._maxDecodingConcurrency);e.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper.js",wasmBinaryFile:"ThirdParty/draco_decoder.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(){r$A._taskProcessorReady=!0})),r$A._decoderTaskProcessor=e}return r$A._decoderTaskProcessor},r$A.hasExtension=function(e){return e$2e(e.extensionsRequired.KHR_draco_mesh_compression)||e$2e(e.extensionsUsed.KHR_draco_mesh_compression)},r$A._decodedModelResourceCache=void 0,r$A.parse=function(e,t){if(r$A.hasExtension(e)){var i=e._loadResources,n=e.cacheKey;if(e$2e(n)){e$2e(r$A._decodedModelResourceCache)||(e$2e(t.cache.modelDecodingCache)||(t.cache.modelDecodingCache={}),r$A._decodedModelResourceCache=t.cache.modelDecodingCache);var r=r$A._decodedModelResourceCache[n];if(e$2e(r))return r.count++,void(i.pendingDecodingCache=!0)}var o=e._dequantizeInShader,a=e.gltf;e$L.mesh(a,(function(e,t){e$L.meshPrimitive(e,(function(e,n){if(e$2e(e.extensions)){var r=e.extensions.KHR_draco_mesh_compression;if(e$2e(r)){var s=a.bufferViews[r.bufferView],l=l$R(a.buffers[s.buffer].extras._pipeline.source,s.byteOffset,s.byteOffset+s.byteLength);i.primitivesToDecode.enqueue({mesh:t,primitive:n,array:l,bufferView:s,compressedAttributes:r.attributes,dequantizeInShader:o})}}}))}))}},r$A.decodeModel=function(e,t){if(!r$A.hasExtension(e))return o$1l.resolve();var i=e._loadResources,n=e.cacheKey;if(e$2e(n)&&e$2e(r$A._decodedModelResourceCache)){var r=r$A._decodedModelResourceCache[n];if(e$2e(r)&&i.pendingDecodingCache)return o$1l(r.ready,(function(){e._decodedData=r.data,i.pendingDecodingCache=!1}));r$A._decodedModelResourceCache[n]={ready:!1,count:1,data:void 0}}if(0===i.primitivesToDecode.length)return o$1l.resolve();for(var o=r$A._getDecoderTaskProcessor(),a=[],s=T$y(o,e,i);e$2e(s);)a.push(s),s=T$y(o,e,i);return o$1l.all(a)},r$A.decodePointCloud=function(e){var t=r$A._getDecoderTaskProcessor();if(r$A._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])},r$A.cacheDataForModel=function(e){var t=e.cacheKey;if(e$2e(t)&&e$2e(r$A._decodedModelResourceCache)){var i=r$A._decodedModelResourceCache[t];e$2e(i)&&(i.ready=!0,i.data=e._decodedData)}},r$A.destroyCachedDataForModel=function(e){var t=e.cacheKey;if(e$2e(t)&&e$2e(r$A._decodedModelResourceCache)){var i=r$A._decodedModelResourceCache[t];e$2e(i)&&0==--i.count&&delete r$A._decodedModelResourceCache[t]}};var m$x=new o$1o;function f$H(e,t){o$1q.typeOf.object("clippingPlaneCollection",e),o$1q.typeOf.object("context",t);var i=e.unionClippingRegions,n=e.length,r=h$L.useFloatTexture(t),o=h$L.getTextureResolution(e,t,m$x),a=o.x,s=o.y,l=r?x$F(a,s):d$I(a,s);return l+="\n",l+=i?s$t(n):v$w(n)}function s$t(e){for(var t="#define inline\nfloat clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount;\n float amount;\n float pixelWidth = czm_metersPerPixel(position);\n bool breakAndDiscard = false;\n vec4 clippingPlane = vec4(0.0);\n",i=0;i<e;++i)t+=" clippingPlane = getClippingPlane(clippingPlanes, "+i+", clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = czm_branchFreeTernary("+i+" == 0, amount, min(amount, clipAmount));\n if (amount <= 0.0)\n {\n breakAndDiscard = true;\n //break;\n }\n";return t+=" if (breakAndDiscard) {\n discard;\n }\n return clipAmount;\n}\n"}function v$w(e){for(var t="#define inline\nfloat clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n bool clipped = true;\n vec4 position = czm_windowToEyeCoordinates(fragCoord);\n vec3 clipNormal = vec3(0.0);\n vec3 clipPosition = vec3(0.0);\n float clipAmount = 0.0;\n float amount;\n float pixelWidth = czm_metersPerPixel(position);\n vec4 clippingPlane = vec4(0.0);\n",i=0;i<e;++i)t+=" clippingPlane = getClippingPlane(clippingPlanes, "+i+", clippingPlanesMatrix);\n clipNormal = clippingPlane.xyz;\n clipPosition = -clippingPlane.w * clipNormal;\n amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n clipAmount = max(amount, clipAmount);\n clipped = clipped && (amount <= 0.0);\n";return t+=" if (clipped)\n {\n discard;\n }\n return clipAmount;\n}\n"}function x$F(e,t){var i=1/t,n=1/e+"";-1===n.indexOf(".")&&(n+=".0");var r=i+"";return-1===r.indexOf(".")&&(r+=".0"),"#define inline\nvec4 getClippingPlane(sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int pixY = clippingPlaneNumber / "+e+";\n int pixX = clippingPlaneNumber - (pixY * "+e+");\n float u = (float(pixX) + 0.5) * "+n+";\n float v = (float(pixY) + 0.5) * "+r+";\n vec4 plane = texture2D(packedClippingPlanes, vec2(u, v));\n return czm_transformPlane(plane, transform);\n}\n"}function d$I(e,t){var i=1/t,n=1/e+"";-1===n.indexOf(".")&&(n+=".0");var r=i+"";return-1===r.indexOf(".")&&(r+=".0"),"#define inline\nvec4 getClippingPlane(sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n int clippingPlaneStartIndex = clippingPlaneNumber * 2;\n int pixY = clippingPlaneStartIndex / "+e+";\n int pixX = clippingPlaneStartIndex - (pixY * "+e+");\n float u = (float(pixX) + 0.5) * "+n+";\n float v = (float(pixY) + 0.5) * "+r+";\n vec4 oct32 = texture2D(packedClippingPlanes, vec2(u, v)) * 255.0;\n vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);\n vec4 plane;\n plane.xyz = czm_octDecode(oct, 65535.0);\n plane.w = czm_unpackFloat(texture2D(packedClippingPlanes, vec2(u + "+n+", v)));\n return czm_transformPlane(plane, transform);\n}\n"}function S$u(){}var W$B=/^data\:/i;function d$H(e,t){var i=e.gltf,n=i.buffers,r=i.bufferViews[t.bufferView],o=n[r.buffer],a=r.byteOffset+t.byteOffset,s=t.count*r$B(t.type),l=W$B.test(o.uri)?"":o.uri;return e.cacheKey+"//"+l+"/"+a+"/"+s}var k$u={};S$u.getAnimationParameterValues=function(e,t){var i=d$H(e,t),n=k$u[i];if(!e$2e(n)){var r=e.gltf,o=r.buffers,a=r.bufferViews[t.bufferView],s=o[a.buffer].extras._pipeline.source,l=t.componentType,u=t.type,c=r$B(u),h=t.count,d=p$A(r,t);n=new Array(h);for(var f=u$Z(t.byteOffset,0),p=a.byteOffset+f,_=0;_<h;_++){var m=S$14.createArrayBufferView(l,s.buffer,s.byteOffset+p,c);"SCALAR"===u?n[_]=m[0]:"VEC3"===u?n[_]=o$1p.fromArray(m):"VEC4"===u&&(n[_]=n$15.unpack(m)),p+=d}e$2e(e.cacheKey)&&(k$u[i]=n)}return n};var L$D={};function D$x(e,t,i){return e.cacheKey+"//"+t+"/"+i}function V$r(e){this._value=e}V$r.prototype.evaluate=function(e,t){return this._value},V$r.prototype.wrapTime=function(e){return 0},V$r.prototype.clampTime=function(e){return 0},S$u.getAnimationSpline=function(e,t,i,n,r,o,a,s){var l=D$x(e,t,n),u=L$D[l];if(!e$2e(u)){var c=o,h=s;1===c.length&&1===h.length?u=new V$r(h[0]):"LINEAR"===r.interpolation&&("translation"===a||"scale"===a?u=new r$Q({times:c,points:h}):"rotation"===a?u=new r$P({times:c,points:h}):"weights"===a&&(u=new r$D({times:c,weights:h}))),e$2e(e.cacheKey)&&(L$D[l]=u)}return u};var c$w={};S$u.getSkinInverseBindMatrices=function(e,t){var i=d$H(e,t),n=c$w[i];if(!e$2e(n)){var r=e.gltf,o=r.buffers,a=r.bufferViews[t.bufferView],s=o[a.buffer].extras._pipeline.source,l=t.componentType,u=t.type,c=t.count,h=p$A(r,t),d=a.byteOffset+t.byteOffset,f=r$B(u);if(n=new Array(c),l===de$y.FLOAT&&u===Q$z.MAT4)for(var p=0;p<c;++p){var _=S$14.createArrayBufferView(l,s.buffer,s.byteOffset+d,f);n[p]=p$1d.fromArray(_),d+=h}c$w[i]=n}return n};var e$J={NONE:0,REPEAT:1,MIRRORED_REPEAT:2},_0x1ea9f2=Object.freeze(e$J),E$C=Object.freeze({STOPPED:0,ANIMATING:1});function a$x(e,t,i){this._name=i.name,this._startTime=a$15.clone(e.startTime),this._delay=u$Z(e.delay,0),this._stopTime=e.stopTime,this.removeOnStop=u$Z(e.removeOnStop,!1),this._multiplier=u$Z(e.multiplier,1),this._reverse=u$Z(e.reverse,!1),this._loop=u$Z(e.loop,_0x1ea9f2.NONE),this.start=new o$1h,this.update=new o$1h,this.stop=new o$1h,this._state=E$C.STOPPED,this._runtimeAnimation=i,this._computedStartTime=void 0,this._duration=void 0;var n=this;this._raiseStartEvent=function(){n.start.raiseEvent(t,n)},this._updateEventTime=0,this._raiseUpdateEvent=function(){n.update.raiseEvent(t,n,n._updateEventTime)},this._raiseStopEvent=function(){n.stop.raiseEvent(t,n)}}function f$G(e){this.animationAdded=new o$1h,this.animationRemoved=new o$1h,this._model=e,this._scheduledAnimations=[],this._previousTime=void 0}function R$r(e,t,i){var n=e._model,r=new a$x(i,n,n._runtime.animations[t]);return e._scheduledAnimations.push(r),e.animationAdded.raiseEvent(n,r),r}function N$s(e,t){for(var i=e.channelEvaluators,n=i.length,r=0;r<n;++r)i[r](t)}Object.defineProperties(a$x.prototype,{name:{get:function(){return this._name}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}}}),Object.defineProperties(f$G.prototype,{length:{get:function(){return this._scheduledAnimations.length}}}),f$G.prototype.add=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=this._model._runtime.animations;if(!e$2e(t))throw new t$15("Animations are not loaded. Wait for Model.readyPromise to resolve.");if(!e$2e(e.name)&&!e$2e(e.index))throw new t$15("Either options.name or options.index must be defined.");if(e$2e(e.multiplier)&&e.multiplier<=0)throw new t$15("options.multiplier must be greater than zero.");if(e$2e(e.index)&&(e.index>=t.length||e.index<0))throw new t$15("options.index must be a valid animation index.");if(e$2e(e.index))return R$r(this,e.index,e);for(var i,n=t.length,r=0;r<n;++r)if(t[r].name===e.name){i=r;break}if(!e$2e(i))throw new t$15("options.name must be a valid animation name.");return R$r(this,i,e)},f$G.prototype.addAll=function(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),!e$2e(this._model._runtime.animations))throw new t$15("Animations are not loaded. Wait for Model.readyPromise to resolve.");if(e$2e(e.multiplier)&&e.multiplier<=0)throw new t$15("options.multiplier must be greater than zero.");for(var t=[],i=this._model._runtime.animations.length,n=0;n<i;++n)t.push(R$r(this,n,e));return t},f$G.prototype.remove=function(e){if(e$2e(e)){var t=this._scheduledAnimations,i=t.indexOf(e);if(-1!==i)return t.splice(i,1),this.animationRemoved.raiseEvent(this._model,e),!0}return!1},f$G.prototype.removeAll=function(){var e=this._model,t=this._scheduledAnimations,i=t.length;this._scheduledAnimations=[];for(var n=0;n<i;++n)this.animationRemoved.raiseEvent(e,t[n])},f$G.prototype.contains=function(e){return!!e$2e(e)&&-1!==this._scheduledAnimations.indexOf(e)},f$G.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return this._scheduledAnimations[e]};var T$x=[];function q$B(e,t,i){return function(){e.animationRemoved.raiseEvent(t,i)}}function a$w(e,t,i){this._name=t.name,this._id=i,this._uniformMap=e._uniformMaps[i],this._technique=void 0,this._program=void 0,this._values=void 0}function a$v(e,t,i){for(var n=[],r=e.primitives,o=r.length,a=0;a<o;++a){var s=r[a];n[a]=t[s.material]}this._name=e.name,this._materials=n,this._id=i}function r$z(e,t,i,n,r){this._model=e,this._runtimeNode=i,this._name=t.name,this._id=n,this.useMatrix=!1,this._show=!0,this._matrix=p$1d.clone(r),this._originalMatrix=p$1d.clone(r)}f$G.prototype.update=function(e){var t=this._scheduledAnimations,i=t.length;if(0===i)return this._previousTime=void 0,!1;if(a$15.equals(e.time,this._previousTime))return!1;this._previousTime=a$15.clone(e.time,this._previousTime);for(var n=!1,r=e.time,o=this._model,a=0;a<i;++a){var s=t[a],l=s._runtimeAnimation;e$2e(s._computedStartTime)||(s._computedStartTime=a$15.addSeconds(u$Z(s.startTime,r),s.delay,new a$15)),e$2e(s._duration)||(s._duration=l.stopTime*(1/s.multiplier));var u=s._computedStartTime,c=s._duration,h=s.stopTime,d=0!==c?a$15.secondsDifference(r,u)/c:0,f=d>=0,p=s.loop===_0x1ea9f2.REPEAT||s.loop===_0x1ea9f2.MIRRORED_REPEAT;if((f||p&&!e$2e(s.startTime))&&(d<=1||p)&&(!e$2e(h)||a$15.lessThanOrEquals(r,h))){if(s._state===E$C.STOPPED&&(s._state=E$C.ANIMATING,s.start.numberOfListeners>0&&e.afterRender.push(s._raiseStartEvent)),s.loop===_0x1ea9f2.REPEAT)d-=Math.floor(d);else if(s.loop===_0x1ea9f2.MIRRORED_REPEAT){var _=Math.floor(d),m=d-_;d=_%2==1?1-m:m}s.reverse&&(d=1-d);var g=d*c*s.multiplier;N$s(l,g=e$2d.clamp(g,l.startTime,l.stopTime)),s.update.numberOfListeners>0&&(s._updateEventTime=g,e.afterRender.push(s._raiseUpdateEvent)),n=!0}else f&&s._state===E$C.ANIMATING&&(s._state=E$C.STOPPED,s.stop.numberOfListeners>0&&e.afterRender.push(s._raiseStopEvent),s.removeOnStop&&T$x.push(s))}i=T$x.length;for(var x=0;x<i;++x){var y=T$x[x];t.splice(t.indexOf(y),1),e.afterRender.push(q$B(this,o,y))}return T$x.length=0,n},Object.defineProperties(a$w.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}}}),a$w.prototype.setValue=function(e,t){if(!e$2e(e))throw new t$15("name is required.");var i="u_"+e,n=this._uniformMap.values[i];if(!e$2e(n))throw new t$15("name must match a parameter name in the material's technique that is targetable and not optimized out.");n.value=n.clone(t,n.value)},a$w.prototype.getValue=function(e){if(!e$2e(e))throw new t$15("name is required.");var t="u_"+e,i=this._uniformMap.values[t];if(e$2e(i))return i.value},Object.defineProperties(a$v.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},materials:{get:function(){return this._materials}}}),Object.defineProperties(r$z.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._model._perNodeShowDirty=!0)}},matrix:{get:function(){return this._matrix},set:function(e){this._matrix=p$1d.clone(e,this._matrix),this.useMatrix=!0;var t=this._model;t._cesiumAnimationsDirty=!0,this._runtimeNode.dirtyNumber=t._maxDirtyNumber}},originalMatrix:{get:function(){return this._originalMatrix}}}),r$z.prototype.setMatrix=function(e){p$1d.clone(e,this._matrix)};var $$w="varying vec2 v_textureCoordinates;\nuniform float originalSize;\nuniform sampler2D texture0;\nuniform sampler2D texture1;\nuniform sampler2D texture2;\nuniform sampler2D texture3;\nuniform sampler2D texture4;\nuniform sampler2D texture5;\nconst float yMipLevel1 = 1.0 - (1.0 / pow(2.0, 1.0));\nconst float yMipLevel2 = 1.0 - (1.0 / pow(2.0, 2.0));\nconst float yMipLevel3 = 1.0 - (1.0 / pow(2.0, 3.0));\nconst float yMipLevel4 = 1.0 - (1.0 / pow(2.0, 4.0));\nvoid main()\n{\nvec2 uv = v_textureCoordinates;\nvec2 textureSize = vec2(originalSize * 1.5 + 2.0, originalSize);\nvec2 pixel = 1.0 / textureSize;\nfloat mipLevel = 0.0;\nif (uv.x - pixel.x > (textureSize.y / textureSize.x))\n{\nmipLevel = 1.0;\nif (uv.y - pixel.y > yMipLevel1)\n{\nmipLevel = 2.0;\nif (uv.y - pixel.y * 3.0 > yMipLevel2)\n{\nmipLevel = 3.0;\nif (uv.y - pixel.y * 5.0 > yMipLevel3)\n{\nmipLevel = 4.0;\nif (uv.y - pixel.y * 7.0 > yMipLevel4)\n{\nmipLevel = 5.0;\n}\n}\n}\n}\n}\nif (mipLevel > 0.0)\n{\nfloat scale = pow(2.0, mipLevel);\nuv.y -= (pixel.y * (mipLevel - 1.0) * 2.0);\nuv.x *= ((textureSize.x - 2.0) / textureSize.y);\nuv.x -= 1.0 + pixel.x;\nuv.y -= (1.0 - (1.0 / pow(2.0, mipLevel - 1.0)));\nuv *= scale;\n}\nelse\n{\nuv.x *= (textureSize.x / textureSize.y);\n}\nvec4 color0 = texture2D(texture0, uv);\nvec4 color1 = texture2D(texture1, uv);\nvec4 color2 = texture2D(texture2, uv);\nvec4 color3 = texture2D(texture3, uv);\nvec4 color4 = texture2D(texture4, uv);\nvec4 color5 = texture2D(texture5, uv);\nif(mipLevel == 0.0)\n{\ngl_FragColor = color0;\n}\nelse if(mipLevel == 1.0)\n{\ngl_FragColor = color1;\n}\nelse if(mipLevel == 2.0)\n{\ngl_FragColor = color2;\n}\nelse if(mipLevel == 3.0)\n{\ngl_FragColor = color3;\n}\nelse if(mipLevel == 4.0)\n{\ngl_FragColor = color4;\n}\nelse if(mipLevel == 5.0)\n{\ngl_FragColor = color5;\n}\nelse\n{\ngl_FragColor = vec4(0.0);\n}\n}\n",z$x="varying vec3 v_cubeMapCoordinates;\nuniform samplerCube cubeMap;\nvoid main()\n{\nvec4 rgba = textureCube(cubeMap, v_cubeMapCoordinates);\n#ifdef RGBA_NORMALIZED\ngl_FragColor = vec4(rgba.rgb, 1.0);\n#else\nfloat m = rgba.a * 16.0;\nvec3 r = rgba.rgb * m;\ngl_FragColor = vec4(r * r, 1.0);\n#endif\n}\n",Q$x="attribute vec4 aPosition;\nattribute vec3 cubeMapCoordinates;\nvarying vec3 v_cubeMapCoordinates;\nvoid main()\n{\ngl_Position = aPosition;\nv_cubeMapCoordinates = cubeMapCoordinates;\n}\n";function u$A(e){this._url=e,this._cubeMapBuffers=void 0,this._cubeMaps=void 0,this._texture=void 0,this._mipTextures=void 0,this._va=void 0,this._sp=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._readyPromise=o$1l.defer()}var J$t=/(^data:image\/ktx)|(\.ktx$)/i,ee$o=/(^data:image\/ktx2)|(\.ktx2$)/i;Object.defineProperties(u$A.prototype,{url:{get:function(){return this._url}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),u$A.isSupported=function(e){return e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat};for(var te$l=new o$1p(1,0,0),re$q=new o$1p(0,0,1),ie$k=new o$1p(-1,0,0),ae$i=new o$1p(0,0,-1),d$G=new o$1p(0,1,0),oe$g=new o$1p(0,-1,0),C$B=[d$G,ie$k,re$q,oe$g,te$l,d$G,ae$i,d$G,d$G],L$C=C$B.length,D$w=new Float32Array(3*L$C),F$C=0,_$t=0;_$t<L$C;++_$t,F$C+=3)o$1p.pack(C$B[_$t],D$w,F$C);var ne$k=new Float32Array([-1,1,-1,0,0,1,0,0,1,0,1,1,0,-1,-1,-1,1,-1]),se$f=new Uint16Array([0,1,2,2,3,1,7,6,1,3,6,1,2,5,4,3,4,2,4,8,6,3,4,6]);function ue$i(e){var t=t$X.createVertexBuffer({context:e,typedArray:ne$k,usage:A$18.STATIC_DRAW}),i=t$X.createVertexBuffer({context:e,typedArray:D$w,usage:A$18.STATIC_DRAW}),n=t$X.createIndexBuffer({context:e,typedArray:se$f,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});return new c$13({context:e,attributes:[{name:"aPosition",index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:S$14.FLOAT},{name:"cubeMapCoordinates",index:1,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:S$14.FLOAT}],indexBuffer:n})}function O$r(e){return function(){return e}}function x$E(e){e._va=e._va&&e._va.destroy(),e._sp=e._sp&&e._sp.destroy(),e._atlasSp=e._atlasSp&&e._atlasSp.destroy();var t,i,n=e._cubeMaps;if(e$2e(n))for(i=n.length,t=0;t<i;++t)n[t].destroy();var r=e._mipTextures;if(e$2e(r))for(i=r.length,t=0;t<i;++t)r[t].destroy();e._va=void 0,e._sp=void 0,e._atlasSp=void 0,e._cubeMaps=void 0,e._cubeMapBuffers=void 0,e._mipTextures=void 0}function f$F(e){return e$L.shader(e,(function(e){n$q(e)})),e$L.buffer(e,(function(e){n$q(e)})),e$L.image(e,(function(e){n$q(e),e$L.compressedImage(e,(function(e){n$q(e)}))})),n$q(e),e}function n$q(e){!e$2e(e.extras)||(e$2e(e.extras._pipeline)&&delete e.extras._pipeline,0===Object.keys(e.extras).length&&delete e.extras)}u$A.prototype.update=function(e){var t=e.context;if(!u$A.isSupported(t)||(e$2e(this._texture)&&e$2e(this._va)&&x$E(this),e$2e(this._texture)))return;if(!e$2e(this._texture)&&!this._loading){var i=t.textureCache.getTexture(this._url);if(e$2e(i))return x$E(this),this._texture=i,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0,void this._readyPromise.resolve()}var n=this._cubeMapBuffers;if(!e$2e(n)&&!this._loading){var r=this;J$t.test(this._url)?k$W(this._url).then((function(e){r._cubeMapBuffers=e,r._loading=!1})).otherwise(this._readyPromise.reject):ee$o.test(this._url)&&f$U(this._url).then((function(e){r._cubeMapBuffers=e,r._loading=!1})).otherwise(this._readyPromise.reject),this._loading=!0}if(!e$2e(this._cubeMapBuffers))return;const o=[];let a=n[0].positiveX.pixelDatatype;e$2e(a)?o.push("RGBA_NORMALIZED"):a=t.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT;const s=V$12.RGBA,l=new s$V({defines:o,sources:[z$x]});this._va=ue$i(t),this._sp=r$14.fromCache({name:"OctahedralProjection",context:t,vertexShaderSource:Q$x,fragmentShaderSource:l,attributeLocations:{aPosition:0,cubeMapCoordinates:1}});var u=Math.min(n.length,6);this._maximumMipmapLevel=u-1;for(var c=this._cubeMaps=new Array(u),h=this._mipTextures=new Array(u),d=2*n[0].positiveX.width,f={originalSize:function(){return d}},p=0;p<u;++p){var _=n[p].positiveY;n[p].positiveY=n[p].negativeY,n[p].negativeY=_;var m=c[p]=new e$1P({context:t,source:n[p],pixelDatatype:a}),g=2*c[p].width,x=h[p]=new t$U({context:t,width:g,height:g,pixelDatatype:a,pixelFormat:s}),y=new t$H({name:"OctahedralProjection",vertexArray:this._va,shaderProgram:this._sp,uniformMap:{cubeMap:O$r(m)},outputTexture:x,persists:!0,owner:this});e.commandList.push(y),f["texture"+p]=O$r(x)}this._texture=new t$U({context:t,width:1.5*d+2,height:d,pixelDatatype:a,pixelFormat:s}),this._texture.maximumMipmapLevel=this._maximumMipmapLevel,t.textureCache.addTexture(this._url,this._texture),this._atlasSp=r$14.fromCache({name:"AtlasSP",context:t,vertexShaderSource:ot$8,fragmentShaderSource:$$w,attributeLocations:{aPosition:0,textureCoordinates:1}});var v=new t$H({name:"OctahedralProjectionAtlas",shaderProgram:this._atlasSp,uniformMap:f,outputTexture:this._texture,persists:!1,owner:this});e.commandList.push(v),this._ready=!0,this._readyPromise.resolve()},u$A.prototype.isDestroyed=function(){return!1},u$A.prototype.destroy=function(){return x$E(this),this._texture=this._texture&&this._texture.destroy(),i$11(this)};var Tt$4=new o$1p,O$q=s$v.ModelState,At$4="model/gltf-binary,model/gltf+json;q=0.8,application/json;q=0.2,*/*;q=0.01";function $e$7(e,t){e._cachedGltf=t}function be$f(e){this._gltf=e.gltf,this.ready=e.ready,this.modelsToLoad=[],this.count=0}Object.defineProperties(be$f.prototype,{gltf:{set:function(e){this._gltf=e},get:function(){return this._gltf}}}),be$f.prototype.makeReady=function(e){this.gltf=e;for(var t=this.modelsToLoad,i=t.length,n=0;n<i;++n){var r=t[n];r.isDestroyed()||$e$7(r,this)}this.modelsToLoad=void 0,this.ready=!0};var X$t={},Lr$2={};function F$B(e){var t,i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).cacheKey;if(this._cacheKey=i,this._cachedGltf=void 0,this._releaseGltfJson=u$Z(e.releaseGltfJson,!1),e$2e(i)&&e$2e(X$t[i])&&X$t[i].ready)++(t=X$t[i]).count;else{var n=e.gltf;if(e$2e(n)){if(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),n instanceof Uint8Array)t=new be$f({gltf:O$u(n),ready:!0});else t=new be$f({gltf:e.gltf,ready:!0});t.count=1,e$2e(i)&&(X$t[i]=t)}}$e$7(this,t);var r=u$Z(e.basePath,"");this._resource=t$10.createIfNeeded(r),this.owner=e.owner,this.show=u$Z(e.show,!0),this.silhouetteColor=u$Z(e.silhouetteColor,e$1X.RED),this._silhouetteColor=new e$1X,this._silhouetteColorPreviousAlpha=1,this._normalAttributeName=void 0,this.silhouetteSize=u$Z(e.silhouetteSize,0),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(this.modelMatrix),this._clampedModelMatrix=void 0,this.scale=u$Z(e.scale,1),this._scale=this.scale,this.minimumPixelSize=u$Z(e.minimumPixelSize,0),this._minimumPixelSize=this.minimumPixelSize,this.maximumScale=e.maximumScale,this._maximumScale=this.maximumScale,this.id=e.id,this._id=e.id,this.heightReference=u$Z(e.heightReference,k$R.NONE),this._heightReference=this.heightReference,this._heightChanged=!1,this._removeUpdateHeightCallback=void 0;var o=e.scene;this._scene=o,e$2e(o)&&e$2e(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener((function(){this._heightChanged=!0}),this)),this._pickObject=e.pickObject,this._allowPicking=u$Z(e.allowPicking,!0),this._ready=!1,this._readyPromise=o$1l.defer(),this.activeAnimations=new f$G(this),this.clampAnimations=u$Z(e.clampAnimations,!0),this._defaultTexture=void 0,this._incrementallyLoadTextures=u$Z(e.incrementallyLoadTextures,!0),this._asynchronous=u$Z(e.asynchronous,!0),this.shadows=u$Z(e.shadows,W$X.ENABLED),this._shadows=this.shadows,this.color=u$Z(e.color,e$1X.clone(e$1X.WHITE)),this._color=new e$1X,this._colorPreviousAlpha=1,this.colorBlendMode=u$Z(e.colorBlendMode,I$K.HIGHLIGHT),this.colorBlendAmount=u$Z(e.colorBlendAmount,.5),this._colorShadingEnabled=!1,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._clippingPlanesState=0,this.clippingPlanesOriginMatrix=void 0,this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=u$Z(e.debugWireframe,!1),this._debugWireframe=!1,this._distanceDisplayCondition=e.distanceDisplayCondition,this._addBatchIdToGeneratedShaders=e.addBatchIdToGeneratedShaders,this._precreatedAttributes=e.precreatedAttributes,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=u$Z(e.ignoreCommands,!1),this._requestType=e.requestType,this._upAxis=u$Z(e.upAxis,v$y.Y),this._gltfForwardAxis=v$y.Z,this._forwardAxis=e.forwardAxis,this.cull=u$Z(e.cull,!0),this.opaquePass=u$Z(e.opaquePass,Le$q.OPAQUE),this._computedModelMatrix=new p$1d,this._clippingPlaneModelViewMatrix=p$1d.clone(p$1d.IDENTITY),this._initialRadius=void 0,this._boundingSphere=void 0,this._minCorner=void 0,this._maxCorner=void 0,this._scaledBoundingSphere=new i$1d,this._state=O$q.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._perNodeShowDirty=!1,this._cesiumAnimationsDirty=!1,this._dirty=!1,this._maxDirtyNumber=0,this._runtime={animations:void 0,rootNodes:void 0,nodes:void 0,nodesByName:void 0,skinnedNodes:void 0,meshesByName:void 0,materialsByName:void 0,materialsById:void 0},this._uniformMaps={},this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms={},this._programPrimitives={},this._rendererResources={buffers:{},vertexArrays:{},programs:{},sourceShaders:{},silhouettePrograms:{},textures:{},samplers:{},renderStates:{}},this._cachedRendererResources=void 0,this._loadRendererResourcesFromCache=!1,this._dequantizeInShader=u$Z(e.dequantizeInShader,!0),this._decodedData={},this._cachedGeometryByteLength=0,this._cachedTexturesByteLength=0,this._geometryByteLength=0,this._texturesByteLength=0,this._trianglesLength=0,this._sourceTechniques={},this._sourcePrograms={},this._quantizedVertexShaders={},this._nodeCommands=[],this._pickIds=[],this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0,this._sourceVersion=void 0,this._sourceKHRTechniquesWebGL=void 0,this._imageBasedLightingFactor=new o$1o(1,1),o$1o.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this._lightColor=o$1p.clone(e.lightColor),this._luminanceAtZenith=void 0,this.luminanceAtZenith=u$Z(e.luminanceAtZenith,.2),this._sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._shouldUpdateSpecularMapAtlas=!0,this._specularEnvironmentMapAtlas=void 0,this._useDefaultSphericalHarmonics=!1,this._useDefaultSpecularMaps=!1,this._shouldRegenerateShaders=!1}function Pr$2(e){return e.stencilBuffer}function er$5(e){return!e$1X.equals(e.color,e$1X.WHITE)||e.colorBlendMode!==I$K.HIGHLIGHT}function Rr$1(e){var t=e._clippingPlanes;return e$2e(t)&&t.enabled&&0!==t.length}function It$5(e){return"glTF"===a$F(e)}function rr$6(e,t,i){if(e._state!==O$q.LOADED)throw new t$15("The model is not loaded. Use Model.readyPromise or wait for Model.ready to be true.");if(!e$2e(i))throw new t$15("name is required.");return e._runtime[t][i]}function Bt$6(e){var t=e.gltf,i=e._loadResources;e$L.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function Ft$5(e,t){return function(i){var n=e._loadResources,r=new Uint8Array(i);--n.pendingBufferLoads,e.gltf.buffers[t].extras._pipeline.source=r}}function Dt$5(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;e$L.bufferView(e.gltf,(function(e,t){e.target===de$y.ARRAY_BUFFER&&i.enqueue(t)}));var n=e._loadResources.indexBuffersToCreate,r={};e$L.accessor(e.gltf,(function(e){var i=e.bufferView;e$2e(i)&&(t[i].target===de$y.ELEMENT_ARRAY_BUFFER&&!e$2e(r[i])&&(r[i]=!0,n.enqueue({id:i,componentType:e.componentType})))}))}function Nt$5(e){var t=e.gltf;if(i$E(t,"KHR_techniques_webgl")){var i=e._sourcePrograms,n=e._sourceTechniques,r=t.extensions.KHR_techniques_webgl.programs;e$L.technique(t,(function(e,t){n[t]=l$1f(e);var o=e.program;e$2e(i[o])||(i[o]=l$1f(r[o]))}))}}function Ot$4(e,t,i){return function(n){var r=e._loadResources;r.shaders[i]={source:n,type:t,bufferView:void 0},--r.pendingShaderLoads,e._rendererResources.sourceShaders[i]=n}}function Ut$4(e){var t=e.gltf,i=t.buffers,n=t.bufferViews,r=e._rendererResources.sourceShaders;e$L.shader(t,(function(t,o){if(e$2e(t.bufferView)){var a=t.bufferView,s=n[a],l=s.buffer,u=a$K(i[l].extras._pipeline.source,s.byteOffset,s.byteLength);r[o]=u}else if(e$2e(t.extras._pipeline.source))r[o]=t.extras._pipeline.source;else{++e._loadResources.pendingShaderLoads;var c=e._resource.getDerivedResource({url:t.uri});c.fetchText().then(Ot$4(e,t.type,o)).otherwise(s$v.getFailedLoadFunction(e,"shader",c.url))}}))}function Vt$5(e){var t=e._sourceTechniques;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];e._loadResources.programsToCreate.enqueue({programId:n.program,techniqueId:i})}}function He$a(e,t){return function(i){const n=e._loadResources;let r;--n.pendingTextureLoads,Array.isArray(i)&&(r=i.slice(1,i.length).map((function(e){return e.bufferView})),i=i[0]),n.texturesToCreate.enqueue({id:t,image:i,bufferView:i.bufferView,width:i.width,height:i.height,internalFormat:i.internalFormat,mipLevels:r})}}Object.defineProperties(F$B.prototype,{gltf:{get:function(){return e$2e(this._cachedGltf)?this._cachedGltf.gltf:void 0}},releaseGltfJson:{get:function(){return this._releaseGltfJson}},cacheKey:{get:function(){return this._cacheKey}},basePath:{get:function(){return this._resource.url}},boundingSphere:{get:function(){if(this._state!==O$q.LOADED)throw new t$15("The model is not loaded. Use Model.readyPromise or wait for Model.ready to be true.");var e=this.modelMatrix;this.heightReference!==k$R.NONE&&this._clampedModelMatrix&&(e=this._clampedModelMatrix);var t,i=p$1d.getScale(e,Tt$4);this.scale instanceof o$1p?(t=this.scale,e$2e(this.maximumScale)&&(t.x=Math.min(this.maximumScale,t.x),t.y=Math.min(this.maximumScale,t.y),t.z=Math.min(this.maximumScale,t.z)),o$1p.multiplyComponents(i,t,i)):(t=e$2e(this.maximumScale)?Math.min(this.maximumScale,this.scale):this.scale,o$1p.multiplyByScalar(i,t,i));var n=this._scaledBoundingSphere;return n.center=o$1p.multiplyComponents(this._boundingSphere.center,i,n.center),n.radius=o$1p.maximumComponent(i)*this._initialRadius,e$2e(this._rtcCenter)&&o$1p.add(this._rtcCenter,n.center,n.center),n}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},asynchronous:{get:function(){return this._asynchronous}},allowPicking:{get:function(){return this._allowPicking}},incrementallyLoadTextures:{get:function(){return this._incrementallyLoadTextures}},pendingTextureLoads:{get:function(){return e$2e(this._loadResources)?this._loadResources.pendingTextureLoads:0}},dirty:{get:function(){return this._dirty}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far must be greater than near");this._distanceDisplayCondition=r$Z.clone(e,this._distanceDisplayCondition)}},extensionsUsed:{get:function(){return e$2e(this._extensionsUsed)||(this._extensionsUsed=s$v.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return e$2e(this._extensionsRequired)||(this._extensionsRequired=s$v.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},forwardAxis:{get:function(){return e$2e(this._forwardAxis)?this._forwardAxis:this._gltfForwardAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return this._texturesByteLength}},cachedGeometryByteLength:{get:function(){return this._cachedGeometryByteLength}},cachedTexturesByteLength:{get:function(){return this._cachedTexturesByteLength}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&h$L.setOwner(e,this,"_clippingPlanes")}},pickIds:{get:function(){return this._pickIds}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o$1q.typeOf.object("imageBasedLightingFactor",e),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1);var t=this._imageBasedLightingFactor;e===t||o$1o.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._imageBasedLightingFactor.x>0&&0===e.x||0===this._imageBasedLightingFactor.x&&e.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._imageBasedLightingFactor.y>0&&0===e.y||0===this._imageBasedLightingFactor.y&&e.y>0,o$1o.clone(e,this._imageBasedLightingFactor))}},lightColor:{get:function(){return this._lightColor},set:function(e){var t=this._lightColor;e===t||o$1p.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||e$2e(t)&&!e$2e(e)||e$2e(e)&&!e$2e(t),this._lightColor=o$1p.clone(e,t))}},luminanceAtZenith:{get:function(){return this._luminanceAtZenith},set:function(e){var t=this._luminanceAtZenith;e!==t&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||e$2e(t)&&!e$2e(e)||e$2e(e)&&!e$2e(t),this._luminanceAtZenith=e)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){if(e$2e(e)&&(!Array.isArray(e)||9!==e.length))throw new t$15("sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.");e!==this._sphericalHarmonicCoefficients&&(this._sphericalHarmonicCoefficients=e,this._shouldRegenerateShaders=!0)}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){this._shouldUpdateSpecularMapAtlas=e!==this._specularEnvironmentMaps,this._specularEnvironmentMaps=e}}}),F$B.silhouetteSupported=function(e){return Pr$2(e.context)},F$B.fromGltf=function(e){if(!e$2e(e)||!e$2e(e.url))throw new t$15("options.url is required");var t=e.url;e=l$1f(e);var i=t$10.createIfNeeded(t);e$2e(e.headers)&&e$2e(i)&&(i.headers=e.headers);var n=u$Z(e.basePath,i.clone()),r=t$10.createIfNeeded(n),o=u$Z(e.cacheKey,Lr$2[o$1j(i.url)]);e$2e(o)||(o=e$1T(),Lr$2[o$1j(i.url)]=o),e$2e(e.basePath)&&!e$2e(e.cacheKey)&&(o+=r.url),e.cacheKey=o,e.basePath=r;var a=new F$B(e),s=X$t[o];return e$2e(s)?s.ready||(++s.count,s.modelsToLoad.push(a)):((s=new be$f({ready:!1})).count=1,s.modelsToLoad.push(a),$e$7(a,s),X$t[o]=s,e$2e(i.headers.Accept)||(i.headers.Accept=At$4),i.fetchArrayBuffer().then((function(e){var t=new Uint8Array(e);if(It$5(t)){var i=O$u(t);s.makeReady(i)}else{var n=a$K(t);s.makeReady(JSON.parse(n))}})).otherwise(s$v.getFailedLoadFunction(a,"model",i.url))),a},F$B._gltfCache=X$t,F$B.prototype.getNode=function(e){var t=rr$6(this,"nodesByName",e);return e$2e(t)?t.publicNode:void 0},F$B.prototype.getMesh=function(e){return rr$6(this,"meshesByName",e)},F$B.prototype.getMaterial=function(e){return rr$6(this,"materialsByName",e)};var qt$4=/(^data:image\/ktx)|(\.ktx$)/i,Ht$3=/(^data:image\/crn)|(\.crn$)/i;function zt$3(e,t,i){var n,r=e.gltf,o=r.images;e$L.texture(r,(function(r,a){var s=r.source;e$2e(r.extensions)&&e$2e(r.extensions.EXT_texture_webp)&&i&&(s=r.extensions.EXT_texture_webp.source);var l=o[s],u=l.extras,c=l.bufferView,h=l.mimeType;if(n=l.uri,e$2e(u)&&e$2e(u.compressedImage3DTiles)){var d=u.compressedImage3DTiles.crunch,f=u.compressedImage3DTiles.s3tc,p=u.compressedImage3DTiles.pvrtc1,_=u.compressedImage3DTiles.etc1;t.s3tc&&e$2e(d)?(h=d.mimeType,e$2e(d.bufferView)?c=d.bufferView:n=d.uri):t.s3tc&&e$2e(f)?(h=f.mimeType,e$2e(f.bufferView)?c=f.bufferView:n=f.uri):t.pvrtc&&e$2e(p)?(h=p.mimeType,e$2e(p.bufferView)?c=p.bufferView:n=p.uri):t.etc1&&e$2e(_)&&(h=_.mimeType,e$2e(_.bufferView)?c=_.bufferView:n=_.uri)}if(e$2e(c))e._loadResources.texturesToCreateFromBufferView.enqueue({id:a,image:void 0,bufferView:c,mimeType:h});else{++e._loadResources.pendingTextureLoads;var m=e._resource.getDerivedResource({url:n});(qt$4.test(n)?k$W(m):Ht$3.test(n)?a$P(m,void 0,!0):m.fetchImage()).then(He$a(e,a)).otherwise(s$v.getFailedLoadFunction(e,"image",m.url))}}))}function kt$4(e){var t={},i={},n=[],r=e._loadResources.skinnedNodesIds;e$L.node(e.gltf,(function(o,a){var s={matrix:void 0,translation:void 0,rotation:void 0,scale:void 0,computedShow:!0,transformToRoot:new p$1d,computedMatrix:new p$1d,dirtyNumber:0,commands:[],inverseBindMatrices:void 0,bindShapeMatrix:void 0,joints:[],computedJointMatrices:[],jointName:o.jointName,weights:[],children:[],parents:[],publicNode:void 0};s.publicNode=new r$z(e,o,s,a,s$v.getTransform(o)),t[a]=s,i[o.name]=s,e$2e(o.skin)&&(r.push(a),n.push(s))})),e._runtime.nodes=t,e._runtime.nodesByName=i,e._runtime.skinnedNodes=n}function Gt$3(e){var t=e.gltf,i=e._sourceTechniques,n={},r={},o=e._uniformMaps;e$L.material(t,(function(t,a){o[a]={uniformMap:void 0,values:void 0,jointMatrixUniformName:void 0,morphWeightsUniformName:void 0};var s=new a$w(e,t,a);if(e$2e(t.extensions)&&e$2e(t.extensions.KHR_techniques_webgl)){var l=t.extensions.KHR_techniques_webgl.technique;s._technique=l,s._program=i[l].program,e$L.materialValue(t,(function(e,t){e$2e(s._values)||(s._values={}),s._values[t]=l$1f(e)}))}n[t.name]=s,r[a]=s})),e._runtime.materialsByName=n,e._runtime.materialsById=r}function Wt$5(e){var t={},i=e._runtime.materialsById;e$L.mesh(e.gltf,(function(n,r){t[n.name]=new a$v(n,i,r),(e$2e(e.extensionsUsed.WEB3D_quantized_attributes)||e._dequantizeInShader)&&e$L.meshPrimitive(n,(function(t,i){var n=nr$4(e,t),o=e._programPrimitives[n];e$2e(o)||(o={},e._programPrimitives[n]=o),o[r+".primitive."+i]=t}))})),e._runtime.meshesByName=t}var tr$4=function(){this.id=void 0,this.model=void 0,this.context=void 0};function Tr$2(e,t,i){var n=t._loadResources,r=t.gltf.bufferViews[e];e$2e(r)||(r=n.createdBufferViews[e]);var o=t$X.createVertexBuffer({context:i,typedArray:n.getBuffer(r),usage:A$18.STATIC_DRAW});o.vertexArrayDestroyable=!1,t._rendererResources.buffers[e]=o,t._geometryByteLength+=o.sizeInBytes}tr$4.prototype.set=function(e,t,i){this.id=e,this.model=t,this.context=i},tr$4.prototype.execute=function(){Tr$2(this.id,this.model,this.context)};var ir$5=function(){this.id=void 0,this.componentType=void 0,this.model=void 0,this.context=void 0};function Ar$1(e,t,i,n){var r=i._loadResources,o=i.gltf.bufferViews[e];e$2e(o)||(o=r.createdBufferViews[e]);var a=t$X.createIndexBuffer({context:n,typedArray:r.getBuffer(o),usage:A$18.STATIC_DRAW,indexDatatype:t});a.vertexArrayDestroyable=!1,i._rendererResources.buffers[e]=a,i._geometryByteLength+=a.sizeInBytes}ir$5.prototype.set=function(e,t,i,n){this.id=e,this.componentType=t,this.model=i,this.context=n},ir$5.prototype.execute=function(){Ar$1(this.id,this.componentType,this.model,this.context)};var Ir$4=new tr$4,Br$2=new ir$5;function Kt$3(e,t){var i=e._loadResources;if(0===i.pendingBufferLoads){var n,r=t.context,o=i.vertexBuffersToCreate,a=i.indexBuffersToCreate;if(e.asynchronous){for(;o.length>0&&(Ir$4.set(o.peek(),e,r),t.jobScheduler.execute(Ir$4,i$R.BUFFER));)o.dequeue();for(;a.length>0&&(n=a.peek(),Br$2.set(n.id,n.componentType,e,r),t.jobScheduler.execute(Br$2,i$R.BUFFER));)a.dequeue()}else{for(;o.length>0;)Tr$2(o.dequeue(),e,r);for(;a.length>0;)Ar$1((n=a.dequeue()).id,n.componentType,e,r)}}}function nr$4(e,t){var i=e._runtime.materialsById[t.material];if(e$2e(i))return i._program}function Fr$1(e,t,i){var n,r,o=i._programPrimitives[t];if(!e$2e(o))return e;for(r in o)if(o.hasOwnProperty(r)&&nr$4(i,n=o[r])===t)break;var a=e;if(i.extensionsUsed.WEB3D_quantized_attributes)a=s$v.modifyShaderForQuantizedAttributes(i.gltf,n,e),i._quantizedUniforms[t]=a.uniforms;else{var s=i._decodedData[r];if(!e$2e(s))return a;a=s$v.modifyShaderForDracoQuantizedAttributes(i.gltf,n,e,s.attributes)}return i._programPrimitives[t]=void 0,a.shader}function jt$2(e){return e=s$V.replaceMain(e,"gltf_blend_main"),e+="uniform vec4 gltf_color; \nuniform float gltf_colorBlend; \nvoid main() \n{ \n gltf_blend_main(); \n gl_FragColor.rgb = mix(gl_FragColor.rgb, gltf_color.rgb, gltf_colorBlend); \n float highlight = ceil(gltf_colorBlend); \n gl_FragColor.rgb *= mix(gltf_color.rgb, vec3(1.0), highlight); \n gl_FragColor.a *= gltf_color.a; \n} \n"}function Me$f(e,t,i){return e$2e(i)&&(e=i(e,t)),e}var ar$4=function(){this.programToCreate=void 0,this.model=void 0,this.context=void 0,this.frameState=void 0};function Dr$1(e,t,i){return i="#include <LightUboDecl>\n"+i,t="#define DIR_LIGHTS "+e.lightSource.directionalLight.length+"\n"+t,i="#define DIR_LIGHTS "+e.lightSource.directionalLight.length+"\n"+i,t="#define POINT_LIGHTS "+e.lightSource.pointLight.length+"\n"+t,i="#define POINT_LIGHTS "+e.lightSource.pointLight.length+"\n"+i,{vs:t="#define SPOT_LIGHTS "+e.lightSource.spotLight.length+"\n"+t,fs:i="#define SPOT_LIGHTS "+e.lightSource.spotLight.length+"\n"+i}}function Nr$1(e,t,i,n){var r=e.programId,o=e.techniqueId,a=t._sourcePrograms[r],s=t._rendererResources.sourceShaders,l=t._sourceTechniques[o].uniforms,u=s[a.vertexShader],c=s[a.fragmentShader],h=t._quantizedVertexShaders,d=t._toClipCoordinatesGLSL[r];if(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader){var f=h[r];e$2e(f)||(f=Fr$1(u,r,t),h[r]=f),u=f}var p=Me$f(u,r,t._vertexShaderLoaded),_=Me$f(c,r,t._fragmentShaderLoaded);s$Z.isInternetExplorer()||(p=s$v.modifyVertexShaderForLogDepth(p,d),_=s$v.modifyFragmentShaderForLogDepth(_));var m=[];e$2e(t._uniformMapLoaded)||(_="uniform vec4 czm_pickColor;\n"+_);var g=t._imageBasedLightingFactor.x>0||t._imageBasedLightingFactor.y>0;g&&(_="#define USE_IBL_LIGHTING \n\n"+_,m.push("USE_IBL_LIGHTING")),e$2e(t._lightColor)&&(_="#define USE_CUSTOM_LIGHT_COLOR \n\n"+_,m.push("USE_CUSTOM_LIGHT_COLOR")),e$2e(t.owner)&&t.owner._swipeEnabled&&(_="#define APPLY_SWIPE \n\n"+_,m.push("APPLY_SWIPE"));var x=Dr$1(n,p,_);if(p=x.vs,_=x.fs,("2.0"!==t._sourceVersion||t._sourceKHRTechniquesWebGL)&&(_=s$V.replaceMain(_,"non_gamma_corrected_main"),_+="\nvoid main() { \n non_gamma_corrected_main(); \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),u$A.isSupported(i)){var y=e$2e(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,v=e$2e(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps;(y||v||g)&&(_="uniform mat4 gltf_clippingPlanesMatrix; \n"+_),e$2e(t._sphericalHarmonicCoefficients)?(_="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+_,m.push("DIFFUSE_IBL"),m.push("CUSTOM_SPHERICAL_HARMONICS")):t._useDefaultSphericalHarmonics&&(_="#define DIFFUSE_IBL \n"+_,m.push("DIFFUSE_IBL")),e$2e(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?(_="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+_,m.push("SPECULAR_IBL"),m.push("CUSTOM_SPECULAR_IBL")):t._useDefaultSpecularMaps&&(_="#define SPECULAR_IBL \n"+_,m.push("SPECULAR_IBL"))}e$2e(t._luminanceAtZenith)&&(_="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+_,m.push("USE_SUN_LUMINANCE"));var $=Object.getOwnPropertyNames(l),b=new s$V({name:"gltfVp_"+a.vertexShader+":uniform:{"+$.join(",")+"}",sources:[p],defines:m});Or$1(r,o,new s$V({name:"gltfFp_"+a.fragmentShader+":uniform:{"+$.join(",")+"}",sources:[_],defines:m}),b,t,i)}function Yt$2(e,t,i,n){var r=e.programId,o=e.techniqueId,a=t._sourcePrograms[r],s=t._rendererResources.sourceShaders,l=t._quantizedVertexShaders,u=t._toClipCoordinatesGLSL[r],c=t.clippingPlanes,h=Rr$1(t),d=s[a.vertexShader],f=s[a.fragmentShader];(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader)&&(d=l[r]);var p=f;er$5(t)&&(p=F$B._modifyShaderForColor(p)),h&&(p=Yi$2(p,c,i));var _=Me$f(d,r,t._vertexShaderLoaded),m=Me$f(p,r,t._fragmentShaderLoaded);s$Z.isInternetExplorer()||(_=s$v.modifyVertexShaderForLogDepth(_,u),m=s$v.modifyFragmentShaderForLogDepth(m));var g=[];e$2e(t._uniformMapLoaded)||(m="uniform vec4 czm_pickColor;\n"+m);var x=t._imageBasedLightingFactor.x>0||t._imageBasedLightingFactor.y>0;x&&(m="#define USE_IBL_LIGHTING \n\n"+m,g.push("USE_IBL_LIGHTING")),e$2e(t._lightColor)&&(m="#define USE_CUSTOM_LIGHT_COLOR \n\n"+m,g.push("USE_CUSTOM_LIGHT_COLOR")),e$2e(t.owner)&&t.owner._swipeEnabled&&(m="#define APPLY_SWIPE \n\n"+m,g.push("APPLY_SWIPE"));var y=Dr$1(n,_,m);if(_=y.vs,m=y.fs,("2.0"!==t._sourceVersion||t._sourceKHRTechniquesWebGL)&&(m=s$V.replaceMain(m,"non_gamma_corrected_main"),m+="\nvoid main() { \n non_gamma_corrected_main(); \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),u$A.isSupported(i)){var v=e$2e(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,$=e$2e(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps;!h&&(v||$||x)&&(m="uniform mat4 gltf_clippingPlanesMatrix; \n"+m),e$2e(t._sphericalHarmonicCoefficients)?(m="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+m,g.push("DIFFUSE_IBL"),g.push("CUSTOM_SPHERICAL_HARMONICS")):t._useDefaultSphericalHarmonics&&(m="#define DIFFUSE_IBL \n"+m,g.push("DIFFUSE_IBL")),e$2e(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?(m="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+m,g.push("SPECULAR_IBL"),g.push("CUSTOM_SPECULAR_IBL")):t._useDefaultSpecularMaps&&(m="#define SPECULAR_IBL \n"+m,g.push("SPECULAR_IBL"))}e$2e(t._luminanceAtZenith)&&(m="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+m,g.push("USE_SUN_LUMINANCE"));var b=new s$V({name:"gltfVp_"+a.vertexShader,sources:[_],defines:g});Or$1(r,o,new s$V({name:"gltfFp_"+a.fragmentShader,sources:[m],defines:g}),b,t,i)}function Or$1(e,t,i,n,r,o){var a=r._sourceTechniques[t],s=s$v.createAttributeLocations(a,r._precreatedAttributes);r._rendererResources.programs[e]=r$14.fromCache({context:o,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:s}),o.webgpu&&r._rendererResources.programs[e]._createEffect()}ar$4.prototype.set=function(e,t,i,n){this.programToCreate=e,this.model=t,this.context=i,this.frameState=n},ar$4.prototype.execute=function(){Nr$1(this.programToCreate,this.model,this.context,this.frameState)};var Ur$3=new ar$4;function Zt$1(e,t){var i=e._loadResources,n=i.programsToCreate;if(0===i.pendingShaderLoads&&0===i.pendingBufferLoads){var r=t.context;if(e.asynchronous)for(;n.length>0&&(Ur$3.set(n.peek(),e,r,t),t.jobScheduler.execute(Ur$3,i$R.PROGRAM));)n.dequeue();else for(;n.length>0;)Nr$1(n.dequeue(),e,r)}}function Jt$2(e,t){return function(i){e.texturesToCreate.enqueue({id:t.id,image:i,bufferView:void 0}),--e.pendingBufferViewToImage}}function Qt$3(e){var t=e._loadResources;if(0===t.pendingBufferLoads)for(;t.texturesToCreateFromBufferView.length>0;){var i=t.texturesToCreateFromBufferView.dequeue(),n=e.gltf,r=n.bufferViews[i.bufferView];n.textures[i.id].source;var o=s$v.getFailedLoadFunction(e,"image","id: "+i.id+", bufferView: "+i.bufferView);if("image/ktx"===i.mimeType)k$W(t.getBuffer(r)).then(He$a(e,i.id)).otherwise(o),++e._loadResources.pendingTextureLoads;else if("image/ktx2"===i.mimeType){f$U(new Uint8Array(t.getBuffer(r))).then(He$a(e,i.id)),++e._loadResources.pendingTextureLoads}else if("image/crn"===i.mimeType){var a=a$P(t.getBuffer(r),void 0,!0);e$2e(a)&&a.then(He$a(e,i.id)).otherwise(o),++e._loadResources.pendingTextureLoads}else{var s=Jt$2(t,i);w$R({uint8Array:t.getBuffer(r),format:i.mimeType,flipY:!1}).then(s).otherwise(o),++t.pendingBufferViewToImage}}}function Xt$1(e){var t=e._loadResources;if(t.createSamplers){t.createSamplers=!1;var i=e._rendererResources.samplers;e$L.sampler(e.gltf,(function(e,t){i[t]=new e$1S({wrapS:e.wrapS,wrapT:e.wrapT,minificationFilter:e.minFilter,magnificationFilter:e.magFilter})}))}}var sr$4=function(){this.gltfTexture=void 0,this.model=void 0,this.context=void 0};function Vr$1(e,t,i){var n=t.gltf.textures[e.id],r=t._rendererResources.samplers[n.sampler];r=u$Z(r,new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT}));var o,a=e.internalFormat,s=!(e$2e(a)&&V$12.isCompressedFormat(a)||r.minificationFilter!==tt$i.NEAREST_MIPMAP_NEAREST&&r.minificationFilter!==tt$i.NEAREST_MIPMAP_LINEAR&&r.minificationFilter!==tt$i.LINEAR_MIPMAP_NEAREST&&r.minificationFilter!==tt$i.LINEAR_MIPMAP_LINEAR),l=s||r.wrapS===q$1a.REPEAT||r.wrapS===q$1a.MIRRORED_REPEAT||r.wrapT===q$1a.REPEAT||r.wrapT===q$1a.MIRRORED_REPEAT,u=e.image;if(e$2e(a))o=new t$U({context:i,source:{arrayBufferView:e.bufferView,mipLevels:e.mipLevels},width:e.width,height:e.height,pixelFormat:a,sampler:r});else if(e$2e(u)){var c=!e$2d.isPowerOfTwo(u.width)||!e$2d.isPowerOfTwo(u.height);if(l&&c){var h=document.createElement("canvas");h.width=e$2d.nextPowerOfTwo(u.width),h.height=e$2d.nextPowerOfTwo(u.height),h.getContext("2d").drawImage(u,0,0,u.width,u.height,0,0,h.width,h.height),u=h}o=new t$U({context:i,source:u,pixelFormat:n.internalFormat,pixelDatatype:n.type,sampler:r,flipY:!1}),s&&o.generateMipmap()}e$2e(o)&&(t._rendererResources.textures[e.id]=o,t._texturesByteLength+=o.sizeInBytes)}sr$4.prototype.set=function(e,t,i){this.gltfTexture=e,this.model=t,this.context=i},sr$4.prototype.execute=function(){Vr$1(this.gltfTexture,this.model,this.context)};var qr$1=new sr$4;function $t$1(e,t){var i=t.context,n=e._loadResources.texturesToCreate;if(e.asynchronous)for(;n.length>0&&(qr$1.set(n.peek(),e,i),t.jobScheduler.execute(qr$1,i$R.TEXTURE));)n.dequeue();else for(;n.length>0;)Vr$1(n.dequeue(),e,i)}function ei$2(e,t){var i,n,r=e._sourceTechniques,o={},a=e._runtime.materialsById[t.material];if(!e$2e(a))return o;var s=r[a._technique];if(!e$2e(s))return o;var l=s.attributes,u=e._rendererResources.programs[s.program],c=u.vertexAttributes,h=u._attributeLocations;for(i in c)if(c.hasOwnProperty(i)){var d=l[i];e$2e(d)&&(n=h[i],o[d.semantic]={index:n,nameInProgram:i})}var f=e._precreatedAttributes;if(e$2e(f))for(i in f)f.hasOwnProperty(i)&&(n=h[i],o[i]={index:n,nameInProgram:i});return o}function ri$2(e,t){for(var i=e.gltf,n=i.skins,r=i.nodes,o=e._runtime.nodes,a=e._loadResources.skinnedNodesIds,s=a.length,l=0;l<s;++l){var u=a[l],c=o[u],h=r[u],d=t[h.skin];c.inverseBindMatrices=d.inverseBindMatrices,c.bindShapeMatrix=d.bindShapeMatrix;for(var f=n[h.skin].joints,p=f.length,_=0;_<p;++_){var m=o[f[_]];c.joints.push(m)}}}function ti$2(e){var t=e._loadResources;if(0===t.pendingBufferLoads&&t.createSkins){t.createSkins=!1;var i=e.gltf,n=i.accessors,r={};e$L.skin(i,(function(t,i){var o,a=n[t.inverseBindMatrices];p$1d.equals(t.bindShapeMatrix,p$1d.IDENTITY)||(o=p$1d.clone(t.bindShapeMatrix)),r[i]={inverseBindMatrices:S$u.getSkinInverseBindMatrices(e,a),bindShapeMatrix:o}})),ri$2(e,r)}}function ii$2(e,t,i,n){return function(r){e$2e(n)&&(r=e.clampAnimations?n.clampTime(r):n.wrapTime(r),t[i]=n.evaluate(r,t[i]),t.dirtyNumber=e._maxDirtyNumber)}}function ni$2(e){var t=e._loadResources;if(t.finishedPendingBufferLoads()&&t.createRuntimeAnimations){t.createRuntimeAnimations=!1,e._runtime.animations=[];var i=e._runtime.nodes,n=e.gltf.accessors;e$L.animation(e.gltf,(function(t,r){for(var o=t.channels,a=t.samplers,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=o.length,c=new Array(u),h=0;h<u;++h){var d=o[h],f=d.target,p=f.path,_=a[d.sampler],m=S$u.getAnimationParameterValues(e,n[_.input]),g=S$u.getAnimationParameterValues(e,n[_.output]);s=Math.min(s,m[0]),l=Math.max(l,m[m.length-1]);var x=S$u.getAnimationSpline(e,r,t,d.sampler,_,m,p,g);c[h]=ii$2(e,i[f.node],f.path,x)}e._runtime.animations[r]={name:t.name,startTime:s,stopTime:l,channelEvaluators:c}}))}}function Hr$1(e){console.log("webgpu引擎要求顶点属性是4字节的倍数, gltf数据中的"+e+"顶点属性不符合要求,不能显示.")}function zr$3(e,t){var i=e._loadResources;if(i.finishedBuffersCreation()&&i.finishedProgramCreation()&&i.createVertexArrays){i.createVertexArrays=!1;var n=e._rendererResources.buffers,r=e._rendererResources.vertexArrays,o=e.gltf,a=o.accessors;e$L.mesh(o,(function(i,s){e$L.meshPrimitive(i,(function(i,l){var u,c=[],h=ei$2(e,i),d=e._decodedData[s+".primitive."+l];e$L.meshPrimitiveAttribute(i,(function(e,i){if(e$2e(h[i])){if(u=h[i].index,e$2e(d)){var r=d.attributes;if(r.hasOwnProperty(i)){var s=r[i];return t.webgpu&&s.byteStride%4!=0&&Hr$1(h[i].nameInProgram),void c.push({name:h[i].nameInProgram,index:u,vertexBuffer:n[s.bufferView],componentsPerAttribute:s.componentsPerAttribute,componentDatatype:s.componentDatatype,normalize:s.normalized,offsetInBytes:s.byteOffset,strideInBytes:s.byteStride})}}var l=a[e],f=p$A(o,l);t.webgpu&&f%4!=0&&Hr$1(h[i].nameInProgram);var p=e$2e(l.normalized)&&l.normalized;c.push({name:h[i].nameInProgram,index:u,vertexBuffer:n[l.bufferView],componentsPerAttribute:r$B(l.type),componentDatatype:l.componentType,normalize:p,offsetInBytes:l.byteOffset,strideInBytes:f})}}));var f,p,_,m=e._precreatedAttributes;if(e$2e(m))for(p in m)m.hasOwnProperty(p)&&e$2e(h[p])&&(u=h[p].index,(f=m[p]).index=u,c.push(f));if(e$2e(i.indices)){var g=a[i.indices].bufferView;e$2e(d)&&(g=d.bufferView),_=n[g]}r[s+".primitive."+l]=new c$13({context:t,attributes:c,indexBuffer:_})}))}))}}function ai$3(e){var t=e._loadResources;t.createRenderStates&&(t.createRenderStates=!1,e$L.material(e.gltf,(function(t,i){si$2(e,t,i)})))}function si$2(e,t,i){var n=e._rendererResources.renderStates,r=[de$y.FUNC_ADD,de$y.FUNC_ADD],o=[de$y.ONE,de$y.ONE_MINUS_SRC_ALPHA,de$y.ONE,de$y.ONE_MINUS_SRC_ALPHA];e$2e(t.extensions)&&e$2e(t.extensions.KHR_blend)&&(r=t.extensions.KHR_blend.blendEquation,o=t.extensions.KHR_blend.blendFactors);var a=!t.doubleSided,s="BLEND"===t.alphaMode;n[i]=d$1m.fromCache({cull:{enabled:a},depthTest:{enabled:!0},depthMask:!s,blending:{enabled:s,equationRgb:r[0],equationAlpha:r[1],functionSourceRgb:o[0],functionDestinationRgb:o[1],functionSourceAlpha:o[2],functionDestinationAlpha:o[3]},stencilTest:{enabled:!0,frontFunction:m$Z.ALWAYS,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.REPLACE},backFunction:m$Z.ALWAYS,backOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.REPLACE},reference:u$M.MODEL,mask:65535}})}var oi$2={MODEL:function(e,t,i){return function(){return i.computedMatrix}},VIEW:function(e,t,i){return function(){return e.view}},PROJECTION:function(e,t,i){return function(){return e.projection}},MODELVIEW:function(e,t,i){var n=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n)}},CESIUM_RTC_MODELVIEW:function(e,t,i){var n=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.setTranslation(n,t._rtcCenterEye,n)}},MODELVIEWPROJECTION:function(e,t,i){var n=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.multiply(e._projection,n,n)}},MODELINVERSE:function(e,t,i){var n=new p$1d;return function(){return p$1d.inverse(i.computedMatrix,n)}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t,i){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t,i){var n=new p$1d,r=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.inverse(n,r)}},MODELVIEWPROJECTIONINVERSE:function(e,t,i){var n=new p$1d,r=new p$1d;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.multiply(e._projection,n,n),p$1d.inverse(n,r)}},MODELINVERSETRANSPOSE:function(e,t,i){var n=new p$1d,r=new p$1e;return function(){return p$1d.inverse(i.computedMatrix,n),p$1d.getRotation(n,r),p$1e.transpose(r,r)}},MODELVIEWINVERSETRANSPOSE:function(e,t,i){var n=new p$1d,r=new p$1d,o=new p$1e;return function(){return p$1d.multiplyTransformation(e.view,i.computedMatrix,n),p$1d.inverse(n,r),p$1d.getRotation(r,o),p$1e.transpose(o,o)}},VIEWPORT:function(e,t,i){return function(){return e.viewportCartesian4}}};function ui$4(e,t,i,n){var r=t._runtime.nodes[e];return oi$2[i](n,t,r)}function ci$5(e,t,i,n,r,o,a){var s,l,u={},c={};return e$L.techniqueUniform(i,(function(i,h){var d;if(e$2e(n)&&e$2e(n[h]))d=s$v.createUniformFunction(i.type,n[h],o,a,i.extensionType),u[h]=d.func,c[h]=d;else if(e$2e(i.node))u[h]=ui$4(i.node,e,i.semantic,r.uniformState);else if(e$2e(i.semantic))if("JOINTMATRIX"===i.semantic)s=h;else if("MORPHWEIGHTS"===i.semantic)l=h;else if("ALPHACUTOFF"===i.semantic){var f=t.alphaMode;if(e$2e(f)&&"MASK"===f){var p=u$Z(t.alphaCutoff,.5);d=s$v.createUniformFunction(i.type,p,o,a,i.extensionType),u[h]=d.func,c[h]=d}}else u[h]=s$v.getGltfSemanticUniforms()[i.semantic](r.uniformState,e);else if(e$2e(i.value)){var _=s$v.createUniformFunction(i.type,i.value,o,a,i.extensionType);u[h]=_.func,c[h]=_}})),{map:u,values:c,jointMatrixUniformName:s,morphWeightsUniformName:l}}function fi$4(e,t){var i=e._loadResources;if(i.finishedProgramCreation()&&i.createUniformMaps){i.createUniformMaps=!1;var n=e.gltf,r=e._sourceTechniques,o=e._uniformMaps,a=e._rendererResources.textures,s=e._defaultTexture;e$L.material(n,(function(i,n){var l=e._runtime.materialsById[n],u=r[l._technique],c=l._values,h=ci$5(e,i,u,c,t,a,s),d=o[n];d.uniformMap=h.map,d.values=h.values,d.jointMatrixUniformName=h.jointMatrixUniformName,d.morphWeightsUniformName=h.morphWeightsUniformName}))}}function hi$4(e){return s$v.createUniformsForDracoQuantizedAttributes(e.attributes)}function li$3(e,t){var i=nr$4(e,t),n=e._quantizedUniforms[i];return s$v.createUniformsForQuantizedAttributes(e.gltf,t,n)}function di$4(e){return function(){return e}}function pi$5(e){return function(){return e.computedJointMatrices}}function _i$5(e){return function(){return e.weights}}function gi$5(e){return function(){return e.silhouetteColor}}function vi$4(e){return function(){return e.silhouetteSize}}function mi$2(e){return function(){return e.color}}var xi$4=new p$1d;function yi$4(e){return function(){var t=e.clippingPlanes;if(!e$2e(t)&&!e$2e(e._sphericalHarmonicCoefficients)&&!e$2e(e._specularEnvironmentMaps))return p$1d.IDENTITY;var i=e$2e(t)?t.modelMatrix:p$1d.IDENTITY;return p$1d.multiply(e._clippingPlaneModelViewMatrix,i,xi$4)}}function Si$3(e){return function(){var t=e.clippingPlanes;return e$2e(t)&&t.enabled?t.texture:e._defaultTexture}}function Ci$4(e){return function(){var t=e.clippingPlanes;if(!e$2e(t))return e$1X.WHITE.withAlpha(0);var i=e$1X.clone(t.edgeColor);return i.alpha=t.edgeWidth,i}}function Ei$4(e){return function(){return I$K.getColorBlend(e.colorBlendMode,e.colorBlendAmount)}}function bi$5(e){return function(){return e._imageBasedLightingFactor}}function Mi$4(e){return function(){return e._lightColor}}function wi$4(e){return function(){return e.luminanceAtZenith}}function Li$2(e){return function(){return e._sphericalHarmonicCoefficients}}function Pi$4(e){return function(){return e._specularEnvironmentMapAtlas.texture}}function Ri$3(e){return function(){return e._specularEnvironmentMapAtlas.texture.dimensions}}function Ti$4(e){return function(){return e._specularEnvironmentMapAtlas.maximumMipmapLevel}}function Ai$3(e,t){switch(e.mode){case W$18.TRIANGLES:return t/3;case W$18.TRIANGLE_STRIP:case W$18.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function Ii$3(e,t,i,n,r,o){for(var a=e._nodeCommands,s=e._pickIds,l=e.allowPicking,u=e._runtime.meshesByName,c=e._rendererResources,h=c.vertexArrays,d=c.programs,f=c.renderStates,p=e._uniformMaps,_=e.gltf,m=_.accessors,g=_.meshes,x=t.mesh,y=g[x],v=y.primitives,$=v.length,b=0;b<$;++b){var T,C=v[b],S=m[C.indices],w=e._runtime.materialsById[C.material]._program,E=e._decodedData[x+".primitive."+b],P=C.attributes.POSITION;if(e$2e(P)){var A=s$v.getAccessorMinMax(_,P);T=i$1d.fromCornerPoints(o$1p.fromArray(A.min),o$1p.fromArray(A.max))}var L,M,R=h[x+".primitive."+b];if(e$2e(E))M=E.numberOfIndices,L=0;else if(e$2e(S))M=S.count,L=S.byteOffset/ce$z.getSizeInBytes(S.componentType);else{M=m[C.attributes.POSITION].count,L=0}e._trianglesLength+=Ai$3(C,M);var O=p[C.material],D=O.uniformMap;if(e$2e(O.jointMatrixUniformName)){var I={};I[O.jointMatrixUniformName]=pi$5(i),D=p$19(D,I)}if(e$2e(O.morphWeightsUniformName)){var B={};B[O.morphWeightsUniformName]=_i$5(i),D=p$19(D,B)}D=p$19(D,{gltf_color:mi$2(e),gltf_colorBlend:Ei$4(e),gltf_clippingPlanes:Si$3(e),gltf_clippingPlanesEdgeStyle:Ci$4(e),gltf_clippingPlanesMatrix:yi$4(e),gltf_iblFactor:bi$5(e),gltf_lightColor:Mi$4(e),gltf_sphericalHarmonicCoefficients:Li$2(e),gltf_specularMap:Pi$4(e),gltf_specularMapSize:Ri$3(e),gltf_maxSpecularLOD:Ti$4(e),gltf_luminanceAtZenith:wi$4(e)}),D=p$19(D,o.lightSource.createUniformMap()),e$2e(e._uniformMapLoaded)&&(D=e._uniformMapLoaded(D,w,i));var F={};e.extensionsUsed.WEB3D_quantized_attributes?F=li$3(e,C):e._dequantizeInShader&&e$2e(E)&&(F=hi$4(E)),D=p$19(D,F);var N=f[C.material],G=N.blending.enabled,z=e._pickObject;e$2e(z)||(z={primitive:e,id:e.id,node:i.publicNode,mesh:u[y.name]});var U,V=W$X.castShadows(e._shadows),k=W$X.receiveShadows(e._shadows);if(l&&!e$2e(e._uniformMapLoaded))U=n.createPickId(z),s.push(U),D=p$19(D,{czm_pickColor:di$4(U.color)});l&&(U=e$2e(e._pickIdLoaded)&&e$2e(e._uniformMapLoaded)?e._pickIdLoaded():"czm_pickColor");var W,H=new i$$({boundingVolume:new i$1d,cull:e.cull,modelMatrix:new p$1d,primitiveType:C.mode,vertexArray:R,count:M,offset:L,shaderProgram:d[w],castShadows:V,receiveShadows:k,uniformMap:D,renderState:N,owner:z,pass:G?Le$q.TRANSLUCENT:e.opaquePass,pickId:U});H.addUniformBuffer(n.uniformState._lightUBO),r||((W=i$$.shallowClone(H)).boundingVolume=new i$1d,W.modelMatrix=new p$1d);var q={show:!0,boundingSphere:T,command:H,command2D:W,silhouetteModelCommand:void 0,silhouetteModelCommand2D:void 0,silhouetteColorCommand:void 0,silhouetteColorCommand2D:void 0,translucentCommand:void 0,translucentCommand2D:void 0,programId:w};i.commands.push(q),a.push(q)}}function Bi$2(e,t,i,n){var r=e._loadResources;if(r.finishedEverythingButTextureCreation()&&r.createRuntimeNodes){r.createRuntimeNodes=!1;for(var o=[],a=e._runtime.nodes,s=e.gltf,l=s.nodes,u=(s.skins,s.scenes[s.scene].nodes),c=u.length,h=[],d={},f=0;f<c;++f)for(h.push({parentRuntimeNode:void 0,gltfNode:l[u[f]],id:u[f]});h.length>0;){var p=h.pop();d[p.id]=!0;var _=p.parentRuntimeNode,m=p.gltfNode,g=a[p.id];if(0===g.parents.length)if(e$2e(m.matrix))g.matrix=p$1d.fromColumnMajorArray(m.matrix);else{var x=m.rotation;g.translation=o$1p.fromArray(m.translation),g.rotation=n$15.unpack(x),g.scale=o$1p.fromArray(m.scale)}e$2e(_)?(_.children.push(g),g.parents.push(_)):o.push(g),e$2e(m.mesh)&&Ii$3(e,m,g,t,i,n);var y=m.children;if(e$2e(y))for(var v=y.length,$=0;$<v;$++){var b=y[$];d[b]||h.push({parentRuntimeNode:g,gltfNode:l[b],id:y[$]})}}e._runtime.rootNodes=o,e._runtime.nodes=a}}function Fi$2(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&(t+=e[i].sizeInBytes);return t}function Di$4(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&(t+=e[i].sizeInBytes);return t}function kr$3(e,t){var i=t.context,n=t.scene3DOnly,r=e._quantizedVertexShaders,o=e._toClipCoordinatesGLSL={},a=e._sourceTechniques,s=e._sourcePrograms,l=e._rendererResources,u=l.sourceShaders;for(var c in e._loadRendererResourcesFromCache&&(u=l.sourceShaders=e._cachedRendererResources.sourceShaders),a)if(a.hasOwnProperty(c)){var h=a[c].program,d=s[h],f=u[d.vertexShader];if(s$v.checkSupportedGlExtensions(d.glExtensions,i),e.extensionsUsed.WEB3D_quantized_attributes||e._dequantizeInShader){var p=r[h];e$2e(p)||(p=Fr$1(f,h,e),r[h]=p),f=p}f=Me$f(f,h,e._vertexShaderLoaded),o[h]=s$v.toClipCoordinatesGLSL(e.gltf,f)}if(e._loadRendererResourcesFromCache){var _=e._cachedRendererResources;l.buffers=_.buffers,l.vertexArrays=_.vertexArrays,l.programs=_.programs,l.silhouettePrograms=_.silhouettePrograms,l.textures=_.textures,l.samplers=_.samplers,l.renderStates=_.renderStates,e$2e(e._precreatedAttributes)&&zr$3(e,i),e._cachedGeometryByteLength+=Fi$2(_.buffers),e._cachedTexturesByteLength+=Di$4(_.textures)}else Kt$3(e,t),Zt$1(e,t),Xt$1(e),Qt$3(e),$t$1(e,t);ti$2(e),ni$2(e),e._loadRendererResourcesFromCache||(zr$3(e,i),ai$3(e)),fi$4(e,i),Bi$2(e,i,n,t)}function Gr$1(e,t){var i=e.publicNode,n=i.matrix;i.useMatrix&&e$2e(n)?p$1d.clone(n,t):e$2e(e.matrix)?p$1d.clone(e.matrix,t):(p$1d.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t),i.setMatrix(t))}var Wr$1=[],Ni$3=new e$2c,or$3=new p$1d;function Kr$3(e,t,i,n){var r=e._maxDirtyNumber,o=e._runtime.rootNodes,a=o.length,s=Wr$1,l=e._computedModelMatrix;if(e._mode!==C$14.SCENE3D&&!e._ignoreCommands){var u=p$1d.getColumn(l,3,Ni$3);if(e$2c.equals(u,e$2c.UNIT_W)){var c=e.boundingSphere.center,h=m$19.wgs84To2DModelMatrix(n,c,or$3);l=p$1d.multiply(h,l,or$3),e$2e(e._rtcCenter)&&(p$1d.setTranslation(l,e$2c.UNIT_W,l),e._rtcCenter=e._rtcCenter2D)}else l=m$19.basisTo2D(n,l,or$3),e._rtcCenter=e._rtcCenter3D}for(var d=0;d<a;++d){var f=o[d];for(Gr$1(f,f.transformToRoot),s.push(f);s.length>0;){var p=(f=s.pop()).transformToRoot,_=f.commands;if(f.dirtyNumber===r||t||i){var m=p$1d.multiplyTransformation(l,p,f.computedMatrix),g=_.length;if(g>0)for(var x=0;x<g;++x){var y=_[x],v=y.command;p$1d.clone(m,v.modelMatrix),i$1d.transform(y.boundingSphere,v.modelMatrix,v.boundingVolume),e$2e(e._rtcCenter)&&o$1p.add(e._rtcCenter,v.boundingVolume.center,v.boundingVolume.center),e$2e(v=y.command2D)&&e._mode===C$14.SCENE2D&&(p$1d.clone(m,v.modelMatrix),v.modelMatrix[13]-=2*e$2d.sign(v.modelMatrix[13])*e$2d.PI*n.ellipsoid.maximumRadius,i$1d.transform(y.boundingSphere,v.modelMatrix,v.boundingVolume))}}var $=f.children;if(e$2e($))for(var b=$.length,T=0;T<b;++T){var C=$[T];C.dirtyNumber=Math.max(C.dirtyNumber,f.dirtyNumber),(C.dirtyNumber===r||i)&&(Gr$1(C,C.transformToRoot),p$1d.multiplyTransformation(p,C.transformToRoot,C.transformToRoot)),s.push(C)}}}++e._maxDirtyNumber}var ur$2=new p$1d;function jr$2(e){for(var t=e._runtime.skinnedNodes,i=t.length,n=0;n<i;++n){var r=t[n];ur$2=p$1d.inverseTransformation(r.transformToRoot,ur$2);for(var o=r.computedJointMatrices,a=r.joints,s=r.bindShapeMatrix,l=r.inverseBindMatrices,u=l.length,c=0;c<u;++c)e$2e(o[c])||(o[c]=new p$1d),o[c]=p$1d.multiplyTransformation(ur$2,a[c].transformToRoot,o[c]),o[c]=p$1d.multiplyTransformation(o[c],l[c],o[c]),e$2e(s)&&(o[c]=p$1d.multiplyTransformation(o[c],s,o[c]))}}function Oi$3(e){for(var t=e._runtime.rootNodes,i=t.length,n=Wr$1,r=0;r<i;++r){var o=t[r];for(o.computedShow=o.publicNode.show,n.push(o);n.length>0;){for(var a=(o=n.pop()).computedShow,s=o.commands,l=s.length,u=0;u<l;++u)s[u].show=a;var c=o.children;if(e$2e(c))for(var h=c.length,d=0;d<h;++d){var f=c[d];f.computedShow=a&&f.publicNode.show,n.push(f)}}}}function Ui$2(e,t){var i=e.id;if(e._id!==i){e._id=i;for(var n=e._pickIds,r=n.length,o=0;o<r;++o)n[o].object.id=i}}function Vi$4(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?W$18.LINES:W$18.TRIANGLES,i=e._nodeCommands,n=i.length,r=0;r<n;++r)i[r].command.primitiveType=t}}function qi$2(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e.debugShowBoundingVolume,i=e._nodeCommands,n=i.length,r=0;r<n;++r)i[r].command.debugShowBoundingVolume=t}}function Hi$3(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=W$X.castShadows(e.shadows),i=W$X.receiveShadows(e.shadows),n=e._nodeCommands,r=n.length,o=0;o<r;o++){var a=n[o];a.command.castShadows=t,a.command.receiveShadows=i}}}function zi$3(e){var t=l$1f(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=Ee$r.ALPHA_BLEND,d$1m.fromCache(t)}function Yr$2(e){var t=i$$.shallowClone(e);return t.pass=Le$q.TRANSLUCENT,t.renderState=zi$3(e.renderState),t}function Zr$2(e,t,i){var n=t.scene3DOnly,r=e.color.alpha;if(r>0&&r<1){var o=e._nodeCommands,a=o.length;if(!e$2e(o[0].translucentCommand)||i)for(var s=0;s<a;++s){var l=o[s],u=l.command;if(l.translucentCommand=Yr$2(u),!n){var c=l.command2D;l.translucentCommand2D=Yr$2(c)}}}}function ki$3(e,t){var i=e._rendererResources.programs;for(var n in i)if(i.hasOwnProperty(n)&&i[n]===t)return n}function Gi$1(e,t,i){var n=t.vertexShaderSource.sources[0],r=t._attributeLocations,o=e._normalAttributeName;n=s$V.replaceMain(n,"gltf_silhouette_main"),n+="uniform float gltf_silhouetteSize; \nvoid main() \n{ \n gltf_silhouette_main(); \n vec3 n = normalize(czm_normal3D * "+o+"); \n n.x *= czm_projection[0][0]; \n n.y *= czm_projection[1][1]; \n vec4 clip = gl_Position; \n clip.xy += n.xy * clip.w * gltf_silhouetteSize / czm_viewport.z; \n gl_Position = clip; \n}";return r$14.fromCache({context:i.context,vertexShaderSource:n,fragmentShaderSource:"uniform vec4 gltf_silhouetteColor; \nvoid main() \n{ \n gl_FragColor = gltf_silhouetteColor; \n}",attributeLocations:r})}function Jr$2(e,t){return Pr$2(t.context)&&e.silhouetteSize>0&&e.silhouetteColor.alpha>0&&e$2e(e._normalAttributeName)}function Wi$3(e){for(var t=e._nodeCommands,i=t.length,n=0;n<i;++n){if(t[n].command.pass===Le$q.TRANSLUCENT)return!0}return!1}function cr$3(e){return e.color.alpha>0&&e.color.alpha<1}function Qr$2(e){return 0===e.color.alpha}function Xr$2(e,t){return Math.floor(e)!==Math.floor(t)||Math.ceil(e)!==Math.ceil(t)}var Ki$1=0;function ji$3(e,t){for(var i=++Ki$1%255,n=Wi$3(e)||cr$3(e)||e.silhouetteColor.alpha<1,r=e._rendererResources.silhouettePrograms,o=t.scene3DOnly,a=e._nodeCommands,s=a.length,l=0;l<s;++l){var u=a[l],c=u.command,h=cr$3(e)?u.translucentCommand:c,d=i$$.shallowClone(h),f=l$1f(h.renderState);f.stencilTest={enabled:!0,frontFunction:de$y.ALWAYS,backFunction:de$y.ALWAYS,reference:i,mask:65535,frontOperation:{fail:de$y.KEEP,zFail:de$y.KEEP,zPass:de$y.REPLACE},backOperation:{fail:de$y.KEEP,zFail:de$y.KEEP,zPass:de$y.REPLACE}},Qr$2(e)&&(f.colorMask={red:!1,green:!1,blue:!1,alpha:!1},f.depthMask=!1),f=d$1m.fromCache(f),d.renderState=f,u.silhouetteModelCommand=d;var p=i$$.shallowClone(c);(f=l$1f(c.renderState,!0)).depthTest.enabled=!0,f.cull.enabled=!1,n&&(p.pass=Le$q.TRANSLUCENT,f.depthMask=!1,f.blending=Ee$r.ALPHA_BLEND),f.stencilTest={enabled:!0,frontFunction:de$y.NOTEQUAL,backFunction:de$y.NOTEQUAL,reference:i,mask:65535,frontOperation:{fail:de$y.KEEP,zFail:de$y.KEEP,zPass:de$y.KEEP},backOperation:{fail:de$y.KEEP,zFail:de$y.KEEP,zPass:de$y.KEEP}},f=d$1m.fromCache(f);var _=c.shaderProgram,m=ki$3(e,_),g=r[m];e$2e(g)||(g=Gi$1(e,_,t),r[m]=g);var x=p$19(c.uniformMap,{gltf_silhouetteColor:gi$5(e),gltf_silhouetteSize:vi$4(e)});if(p.renderState=f,p.shaderProgram=g,p.uniformMap=x,p.castShadows=!1,p.receiveShadows=!1,u.silhouetteColorCommand=p,!o){var y=u.command2D,v=i$$.shallowClone(d);v.boundingVolume=y.boundingVolume,v.modelMatrix=y.modelMatrix,u.silhouetteModelCommand2D=v;var $=i$$.shallowClone(p);v.boundingVolume=y.boundingVolume,v.modelMatrix=y.modelMatrix,u.silhouetteColorCommand2D=$}}}function Yi$2(e,t,i){return e=s$V.replaceMain(e,"gltf_clip_main"),e+=F$B._getClippingFunction(t,i)+"\n",e+="uniform sampler2D gltf_clippingPlanes; \nuniform mat4 gltf_clippingPlanesMatrix; \nuniform vec4 gltf_clippingPlanesEdgeStyle; \nvoid main() \n{ \n gltf_clip_main(); \n"+p$x("gltf_clippingPlanes","gltf_clippingPlanesMatrix","gltf_clippingPlanesEdgeStyle")+"} \n"}function $r$3(e,t,i){if(Jr$2(e,t)){var n=e._nodeCommands,r=Xr$2(e.color.alpha,e._colorPreviousAlpha)||Xr$2(e.silhouetteColor.alpha,e._silhouetteColorPreviousAlpha)||!e$2e(n[0].silhouetteModelCommand);e._colorPreviousAlpha=e.color.alpha,e._silhouetteColorPreviousAlpha=e.silhouetteColor.alpha,(r||i)&&ji$3(e,t)}}function Zi$2(e,t){var i=e._clippingPlanes;e$2e(i)&&i.owner===e&&i.enabled&&i.update(t)}var fr$2=new i$1d;function Ji$1(e,t,i){return fr$2.center=e,fr$2.radius=t,i.camera.getPixelSize(fr$2,i.context.drawingBufferWidth,i.context.drawingBufferHeight)}var B$u=new o$1p,we$b=new a$18,Qi$1=new o$1p;function Xi$1(e,t){var i=e.scale;if(0!==e.minimumPixelSize){var n=t.context,r=Math.max(n.drawingBufferWidth,n.drawingBufferHeight),o=e$2e(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;if(B$u.x=o[12],B$u.y=o[13],B$u.z=o[14],e$2e(e._rtcCenter)&&o$1p.add(e._rtcCenter,B$u,B$u),e._mode!==C$14.SCENE3D){var a=t.mapProjection,s=a.ellipsoid.cartesianToCartographic(B$u,we$b);a.project(s,B$u),o$1p.fromElements(B$u.z,B$u.x,B$u.y,B$u)}var l=e.boundingSphere.radius,u=Ji$1(B$u,l,t),c=1/u;Math.min(c*(2*l),r)<e.minimumPixelSize&&(i=e.minimumPixelSize*u/(2*e._initialRadius))}return i instanceof o$1p?e$2e(e.maximumScale)&&(i.x=i.x>e.maximumScale?e.maximumScale:i.x,i.y=i.y>e.maximumScale?e.maximumScale:i.y,i.z=i.z>e.maximumScale?e.maximumScale:i.z):(e$2e(e.maximumScale)&&(i=i>e.maximumScale?e.maximumScale:i),i=o$1p.fromElements(i,i,i,Qi$1)),i}function et$8(e){e$2e(e._cacheKey)&&e$2e(e._cachedGltf)&&0==--e._cachedGltf.count&&delete X$t[e._cacheKey],e._cachedGltf=void 0}function hr$2(e,t){this.buffers=void 0,this.vertexArrays=void 0,this.programs=void 0,this.sourceShaders=void 0,this.silhouettePrograms=void 0,this.textures=void 0,this.samplers=void 0,this.renderStates=void 0,this.ready=!1,this.context=e,this.cacheKey=t,this.count=0}function $$v(e){for(var t in e)e.hasOwnProperty(t)&&e[t].destroy()}function $i$2(e){$$v(e.buffers),$$v(e.vertexArrays),$$v(e.programs),$$v(e.silhouettePrograms),$$v(e.textures)}function rt$9(e,t,i){return function(n){if(e.heightReference===k$R.RELATIVE_TO_GROUND){var r=t.cartesianToCartographic(n,we$b);r.height+=i.height,t.cartographicToCartesian(r,n)}var o=e._clampedModelMatrix;p$1d.clone(e.modelMatrix,o),o[12]=n.x,o[13]=n.y,o[14]=n.z,e._heightChanged=!0}}function en$2(e){e$2e(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);var t=e._scene;if(e$2e(t)&&e$2e(t.globe)&&e.heightReference!==k$R.NONE){var i=t.globe,n=i.ellipsoid,r=e.modelMatrix;B$u.x=r[12],B$u.y=r[13],B$u.z=r[14];var o=n.cartesianToCartographic(B$u);e$2e(e._clampedModelMatrix)||(e._clampedModelMatrix=p$1d.clone(r,new p$1d));var a=i._surface;e._removeUpdateHeightCallback=a.updateHeight(o,rt$9(e,n,o));var s=i.getHeight(o);if(e$2e(s)){var l=rt$9(e,n,o);a$18.clone(o,we$b),we$b.height=s,n.cartographicToCartesian(we$b,B$u),l(B$u)}}else{if(e.heightReference!==k$R.NONE)throw new t$15("Height reference is not supported without a scene and globe.");e._clampedModelMatrix=void 0}}hr$2.prototype.release=function(){if(0==--this.count)return e$2e(this.cacheKey)&&delete this.context.cache.modelRendererResourceCache[this.cacheKey],$i$2(this),i$11(this)};var rn$2=new o$1p,tn$2=new a$18;function nn$2(e,t){var i,n=e.distanceDisplayCondition,r=n.near*n.near,o=n.far*n.far;if(t.mode===C$14.SCENE2D){i=.5*(t.camera.frustum.right-t.camera.frustum.left),i*=i}else{var a=p$1d.getTranslation(e.modelMatrix,rn$2);if(t.mode===C$14.COLUMBUS_VIEW){var s=t.mapProjection,l=s.ellipsoid.cartesianToCartographic(a,tn$2);a=s.project(l,a),o$1p.fromElements(a.z,a.x,a.y,a)}i=o$1p.distanceSquared(a,t.camera.positionWC)}return i>=r&&i<=o}var an$2=new o$1p,_e$d=new o$1p,Le$e=new p$1d;function tt$7(e,t){e.programs!==t.programs&&$$v(e.programs),e.silhouettePrograms!==t.silhouettePrograms&&$$v(e.silhouettePrograms)}function sn$2(e,t){var i,n=e._rendererResources,r=e._cachedRendererResources;if(tt$7(n,r),Rr$1(e)||er$5(e)||e._shouldRegenerateShaders){e._shouldRegenerateShaders=!1,n.programs={},n.silhouettePrograms={};var o={},a=e._sourceTechniques;for(var s in a)a.hasOwnProperty(s)&&(o[i=a[s].program]||(o[i]=!0,Yt$2({programId:i,techniqueId:s},e,t.context,t)))}else n.programs=r.programs,n.silhouettePrograms=r.silhouettePrograms;for(var l=n.programs,u=e._nodeCommands,c=u.length,h=0;h<c;++h){var d=u[h],f=l[i=d.programId];d.command.shaderProgram=f,e$2e(d.command2D)&&(d.command2D.shaderProgram=f)}Zr$2(e,t,!0),$r$3(e,t,!0)}function n$p(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._model=void 0,this._batchTable=void 0,this._features=void 0,this._batchIdAttributeName=void 0,this._diffuseAttributeOrUniformName={},this._rtcCenterTransform=void 0,this._contentModelMatrix=void 0,this.featurePropertiesDirty=!1,re$p(this,n,r)}F$B.prototype.update=function(e){if(e.multiViewportIndex>-1&&e$2e(this.id)){var t=this.id.entityCollection;if(e$2e(t)){var i=t.owner;if(e$2e(i)&&typeof i.getVisibleInViewport<"u")if(!i.getVisibleInViewport(e.multiViewportIndex))return}}if(e.mode!==C$14.MORPHING){var n=s$Z.supportsWebPSync();if(e$2e(n)){var r=e.context;if(this._defaultTexture=r.defaultTexture,this._state===O$q.NEEDS_LOAD&&e$2e(this.gltf)){var o,a=this.cacheKey;if(e$2e(a)){r.cache.modelRendererResourceCache=u$Z(r.cache.modelRendererResourceCache,{});var s=r.cache.modelRendererResourceCache;if(e$2e(o=s[this.cacheKey])){if(!o.ready)return;++o.count,this._loadRendererResourcesFromCache=!0}else(o=new hr$2(r,a)).count=1,s[this.cacheKey]=o;this._cachedRendererResources=o}else(o=new hr$2(r)).count=1,this._cachedRendererResources=o;if(this._state=O$q.LOADING,this._state!==O$q.FAILED){var l=this.gltf.extensions;if(e$2e(l)&&e$2e(l.CESIUM_RTC)){var u=o$1p.fromArray(l.CESIUM_RTC.center);if(!o$1p.equals(u,o$1p.ZERO)){this._rtcCenter3D=u;var c=e.mapProjection,h=c.ellipsoid.cartesianToCartographic(this._rtcCenter3D),d=c.project(h);o$1p.fromElements(d.z,d.x,d.y,d),this._rtcCenter2D=d,this._rtcCenterEye=new o$1p,this._rtcCenter=this._rtcCenter3D}}s$z(this.gltf),this._loadResources=new t$t,this._loadRendererResourcesFromCache||s$v.parseBuffers(this,Ft$5)}}var f=this._loadResources,p=this._incrementallyLoadTextures,_=!1;if(this._state===O$q.LOADING){if(0===f.pendingBufferLoads){if(!f.initialized){if(e.brdfLutGenerator.update(e),s$v.checkSupportedExtensions(this.extensionsRequired,n),s$v.updateForwardAxis(this),!this._loadRendererResourcesFromCache){var m=this.gltf;m.extras.sourceVersion=s$v.getAssetVersion(m),m.extras.sourceKHRTechniquesWebGL=e$2e(s$v.getUsedExtensions(m).KHR_techniques_webgl),this._sourceVersion=m.extras.sourceVersion,this._sourceKHRTechniquesWebGL=m.extras.sourceKHRTechniquesWebGL,re$s(m),E$E(m);var g={addBatchIdToGeneratedShaders:this._addBatchIdToGeneratedShaders};ue$l(m,g),he$h(m,g)}this._sourceVersion=this.gltf.extras.sourceVersion,this._sourceKHRTechniquesWebGL=this.gltf.extras.sourceKHRTechniquesWebGL,this._dequantizeInShader=this._dequantizeInShader&&r$A.hasExtension(this),Bt$6(this),Nt$5(this),this._loadRendererResourcesFromCache||(Dt$5(this),Ut$4(this),Vt$5(this),zt$3(this,r,n)),Gt$3(this),Wt$5(this),kt$4(this),r$A.parse(this,r),f.initialized=!0}f.finishedDecoding()||r$A.decodeModel(this,r).otherwise(s$v.getFailedLoadFunction(this,"model",this.basePath)),f.finishedDecoding()&&!f.resourcesParsed&&(this._boundingSphere=s$v.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,r$A.cacheDataForModel(this),f.resourcesParsed=!0),f.resourcesParsed&&0===f.pendingShaderLoads&&kr$3(this,e)}(f.finished()||p&&f.finishedEverythingButTextureCreation())&&(this._state=O$q.LOADED,_=!0)}if(e$2e(f)&&this._state===O$q.LOADED&&(p&&!_&&kr$3(this,e),f.finished())){this._loadResources=void 0;var x=this._rendererResources,y=this._cachedRendererResources;y.buffers=x.buffers,y.vertexArrays=x.vertexArrays,y.programs=x.programs,y.sourceShaders=x.sourceShaders,y.silhouettePrograms=x.silhouettePrograms,y.textures=x.textures,y.samplers=x.samplers,y.renderStates=x.renderStates,y.ready=!0,this._normalAttributeName=s$v.getAttributeOrUniformBySemantic(this.gltf,"NORMAL"),e$2e(this._precreatedAttributes)&&(y.vertexArrays={}),this.releaseGltfJson&&et$8(this)}var v=u$A.isSupported(r);if(this._shouldUpdateSpecularMapAtlas&&v){if(this._shouldUpdateSpecularMapAtlas=!1,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),this._specularEnvironmentMapAtlas=void 0,e$2e(this._specularEnvironmentMaps)){this._specularEnvironmentMapAtlas=new u$A(this._specularEnvironmentMaps);var $=this;this._specularEnvironmentMapAtlas.readyPromise.then((function(){$._shouldRegenerateShaders=!0}))}this._shouldRegenerateShaders=!0}e$2e(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e);var b=!e$2e(this._specularEnvironmentMapAtlas)&&e$2e(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,T=!e$2e(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,C=!e$2e(this._sphericalHarmonicCoefficients)&&e$2e(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,S=!e$2e(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||b||T||C||S,this._useDefaultSpecularMaps=!e$2e(this._specularEnvironmentMapAtlas)&&e$2e(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!e$2e(this._sphericalHarmonicCoefficients)&&e$2e(e.sphericalHarmonicCoefficients);var w=Jr$2(this,e),E=cr$3(this),P=Qr$2(this),A=!e$2e(this.distanceDisplayCondition)||nn$2(this,e),L=this.show&&A&&(this.scale instanceof o$1p?!o$1p.equals(this._scale,o$1p.ZERO):0!==this.scale)&&(!P||w);if(L&&this._state===O$q.LOADED||_){var M=this.activeAnimations.update(e)||this._cesiumAnimationsDirty;this._cesiumAnimationsDirty=!1,this._dirty=!1;var R=this.modelMatrix,O=e.mode!==this._mode;this._mode=e.mode;var D=!p$1d.equals(this._modelMatrix,R)||(this.scale instanceof o$1p?!o$1p.equals(this._scale,this.scale):this._scale!==this.scale)||this._minimumPixelSize!==this.minimumPixelSize||0!==this.minimumPixelSize||this._maximumScale!==this.maximumScale||this._heightReference!==this.heightReference||this._heightChanged||O;if(D||_){p$1d.clone(R,this._modelMatrix),en$2(this),e$2e(this._clampedModelMatrix)&&(R=this._clampedModelMatrix),this._minimumPixelSize=this.minimumPixelSize,this._maximumScale=this.maximumScale,this._heightReference=this.heightReference,this._heightChanged=!1;var I=Xi$1(this,e),B=this._computedModelMatrix;if(e$2e(this._offsetMatrix)){if(!this._lastDefinedOffset){"number"==typeof this._scale?(_e$d.x=this._scale,_e$d.y=this._scale,_e$d.z=this._scale):o$1p.clone(this._scale,_e$d);var F=p$1d.getTranslation(this._offsetMatrix,an$2),N=o$1p.divideComponents(F,_e$d,_e$d);o$1p.negate(F,F),this._offsetMat4ForScale=this._offsetMat4ForScale||new p$1d,this._realOffsetMat4ForScale=this._realOffsetMat4ForScale||new p$1d,p$1d.fromTranslation(F,this._offsetMat4ForScale),p$1d.fromTranslation(N,this._realOffsetMat4ForScale)}p$1d.multiply(p$1d.fromScale(I),this._realOffsetMat4ForScale,Le$e),p$1d.multiply(this._offsetMat4ForScale,Le$e,Le$e)}else p$1d.fromScale(I,Le$e);p$1d.multiply(R,Le$e,B),this._scale=this.scale,this._lastDefinedOffset=e$2e(this._offsetMatrix),this._upAxis===v$y.Y?p$1d.multiplyTransformation(B,v$y.Y_UP_TO_Z_UP,B):this._upAxis===v$y.X&&p$1d.multiplyTransformation(B,v$y.X_UP_TO_Z_UP,B),this.forwardAxis===v$y.Z&&p$1d.multiplyTransformation(B,v$y.Z_UP_TO_X_UP,B)}(M||D||_)&&(Kr$3(this,D,_,e.mapProjection),this._dirty=!0,(M||_)&&jr$2(this)),this._perNodeShowDirty&&(this._perNodeShowDirty=!1,Oi$3(this)),Ui$2(this),Vi$4(this),qi$2(this),Hi$3(this),Zi$2(this,e);var G=this._clippingPlanes,z=0,U=e$2e(G)&&G.enabled&&G.length>0,V=e$2e(this._sphericalHarmonicCoefficients)||this._useDefaultSphericalHarmonics,k=e$2e(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready||this._useDefaultSpecularMaps;if(U||V||k){var W=u$Z(this.clippingPlanesOriginMatrix,R);p$1d.multiply(r.uniformState.view3D,W,this._clippingPlaneModelViewMatrix)}U&&(z=G.clippingPlanesState),e.lightSource.hasChange()&&(this._shouldRegenerateShaders=!0);var H=this._shouldRegenerateShaders;H=H||this._clippingPlanesState!==z,this._clippingPlanesState=z;var q=er$5(this);q!==this._colorShadingEnabled&&(this._colorShadingEnabled=q,H=!0),H?sn$2(this,e):(Zr$2(this,e,!1),$r$3(this,e,!1))}if(_){var j=this;return void e.afterRender.push((function(){j._ready=!0,j._readyPromise.resolve(j)}))}if(L&&!this._ignoreCommands){var X,Y,Z,K=e.commandList,Q=e.passes,J=this._nodeCommands,ee=J.length,te=e.mapProjection.ellipsoid.maximumRadius*e$2d.PI;if(Q.render||Q.pick&&this.allowPicking){for(X=0;X<ee;++X)if((Y=J[X]).show){var ie=E?Y.translucentCommand:Y.command;if(ie=w?Y.silhouetteModelCommand:ie,K.push(ie),Z=Y.command.boundingVolume,e.mode===C$14.SCENE2D&&(Z.center.y+Z.radius>te||Z.center.y-Z.radius<te)){var ne=E?Y.translucentCommand2D:Y.command2D;ne=w?Y.silhouetteModelCommand2D:ne,K.push(ne)}}if(w&&!Q.pick)for(X=0;X<ee;++X)(Y=J[X]).show&&(K.push(Y.silhouetteColorCommand),Z=Y.command.boundingVolume,e.mode===C$14.SCENE2D&&(Z.center.y+Z.radius>te||Z.center.y-Z.radius<te)&&K.push(Y.silhouetteColorCommand2D))}}}}},F$B.prototype.updateAnimation=function(e){this._state===O$q.LOADED&&((this.activeAnimations.update(e)||this._cesiumAnimationsDirty)&&(Kr$3(this,!0,!0,e.mapProjection),jr$2(this)))},F$B.prototype.isDestroyed=function(){return!1},F$B.prototype.destroy=function(){e$2e(this._precreatedAttributes)&&$$v(this._rendererResources.vertexArrays),e$2e(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),e$2e(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0),e$2e(this._cachedRendererResources)&&tt$7(this._rendererResources,this._cachedRendererResources),this._rendererResources=void 0,this._cachedRendererResources=this._cachedRendererResources&&this._cachedRendererResources.release(),r$A.destroyCachedDataForModel(this);for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();et$8(this),this._quantizedVertexShaders=void 0;var n=this._clippingPlanes;return e$2e(n)&&!n.isDestroyed()&&n.owner===this&&n.destroy(),this._clippingPlanes=void 0,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),i$11(this)},F$B._getClippingFunction=f$H,F$B._modifyShaderForColor=jt$2,n$p._deprecationWarning=t$11,Object.defineProperties(n$p.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return this._model.trianglesLength}},geometryByteLength:{get:function(){return this._model.geometryByteLength}},texturesByteLength:{get:function(){return this._model.texturesByteLength}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._model.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var s$s=Uint32Array.BYTES_PER_ELEMENT;function O$p(e){var t=s$v.getAttributeOrUniformBySemantic(e,"_BATCHID");return e$2e(t)||e$2e(t=s$v.getAttributeOrUniformBySemantic(e,"BATCHID"))&&n$p._deprecationWarning("b3dm-legacy-batchid","The glTF in this b3dm uses the semantic `BATCHID`. Application-specific semantics should be prefixed with an underscore: `_BATCHID`."),t}function I$J(e){return function(t,i){var n=e._batchTable,r=!e$2e(e._tileset.classificationType),o=e._model.gltf;e$2e(o)&&(e._batchIdAttributeName=O$p(o),e._diffuseAttributeOrUniformName[i]=s$v.getDiffuseAttributeOrUniform(o,i));var a=n.getVertexShaderCallback(r,e._batchIdAttributeName,e._diffuseAttributeOrUniformName[i]);return e$2e(a)?a(t):t}}function ee$n(e){return function(t,i){var n=e._batchTable,r=!e$2e(e._tileset.classificationType),o=e._model.gltf;e$2e(o)&&(e._diffuseAttributeOrUniformName[i]=s$v.getDiffuseAttributeOrUniform(o,i));var a=n.getFragmentShaderCallback(r,e._diffuseAttributeOrUniformName[i]);return e$2e(a)?a(t):t}}function N$r(e){return function(){return e._batchTable.getPickId()}}function te$k(e){return function(t){var i=e._batchTable.getClassificationFragmentShaderCallback();return e$2e(i)?i(t):t}}function ie$j(e){return function(t,i){e._model.updateCommands(t,i)}}function re$p(e,t,i){var n=e._tileset,r=e._tile,o=e._resource,a=u$Z(i,0);i=a;var s=new Uint8Array(t),l=new DataView(t);i+=s$s;var u=l.getUint32(i,!0);if(1!==u)throw new t$13("Only Batched 3D Model version 1 is supported. Version "+u+" is not.");i+=s$s;var c=l.getUint32(i,!0);i+=s$s;var h=l.getUint32(i,!0);i+=s$s;var d=l.getUint32(i,!0);i+=s$s;var f=l.getUint32(i,!0);i+=s$s;var p,_,m=l.getUint32(i,!0);if(i+=s$s,f>=570425344?(i-=2*s$s,p=h,f=d,m=0,h=0,d=0,n$p._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] .")):m>=570425344&&(i-=s$s,p=f,f=h,m=d,h=0,d=0,n$p._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] .")),0===h)_={BATCH_LENGTH:u$Z(p,0)};else{var g=a$K(s,i,h);_=JSON.parse(g),i+=h}var x=new Uint8Array(t,i,d);i+=d;var y,v,$,b=new o$C(_,x);if(p=b.getGlobalProperty("BATCH_LENGTH"),b.featuresLength=p,f>0){var T=a$K(s,i,f);y=JSON.parse(T),i+=f,m>0&&(v=new Uint8Array(t,i,m),v=new Uint8Array(v),i+=m)}e$2e(n.classificationType)&&($=ie$j(e));var C=new h$D(e,p,y,v,$);e._batchTable=C;var S,w=a+c-i;if(0===w)throw new t$13("glTF byte length must be greater than 0.");i%4==0?S=new Uint8Array(t,i,w):(n$p._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),S=new Uint8Array(s.subarray(i,i+w)));var E={content:e,primitive:n};e._rtcCenterTransform=p$1d.IDENTITY;var P=b.getGlobalProperty("RTC_CENTER",S$14.FLOAT,3);e$2e(P)&&(e._rtcCenterTransform=p$1d.fromTranslation(o$1p.fromArray(P))),e._contentModelMatrix=p$1d.multiply(r.computedTransform,e._rtcCenterTransform,new p$1d),e$2e(n.classificationType)?e._model=new A$F({gltf:S,cull:!1,basePath:o,requestType:U$1f.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:n._gltfUpAxis,forwardAxis:v$y.X,debugWireframe:n.debugWireframe,vertexShaderLoaded:I$J(e),classificationShaderLoaded:te$k(e),uniformMapLoaded:C.getUniformMapCallback(),pickIdLoaded:N$r(e),classificationType:n._classificationType,batchTable:C}):e._model=new F$B({gltf:S,cull:!1,releaseGltfJson:!0,opaquePass:Le$q.CESIUM_3D_TILE,basePath:o,requestType:U$1f.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:n._gltfUpAxis,forwardAxis:v$y.X,shadows:n.shadows,debugWireframe:n.debugWireframe,incrementallyLoadTextures:!1,vertexShaderLoaded:I$J(e),fragmentShaderLoaded:ee$n(e),uniformMapLoaded:C.getUniformMapCallback(),pickIdLoaded:N$r(e),addBatchIdToGeneratedShaders:p>0,pickObject:E,imageBasedLightingFactor:n.imageBasedLightingFactor,lightColor:n.lightColor,luminanceAtZenith:n.luminanceAtZenith,sphericalHarmonicCoefficients:n.sphericalHarmonicCoefficients,specularEnvironmentMaps:n.specularEnvironmentMaps,owner:n})}function ae$h(e){var t=e.featuresLength;if(!e$2e(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$M(e,n);e._features=i}}function i$C(e,t,i,n,r,o){this._tileset=e,this._tile=t,this._resource=i,this._contents=[],this._readyPromise=o$1l.defer(),L$B(this,n,r,o)}n$p.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},n$p.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2e(e)||e<0||e>=t)throw new t$15("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return ae$h(this),this._features[e]},n$p.prototype.applyDebugSettings=function(e,t){t=e?t:e$1X.WHITE,0===this.featuresLength?this._model.color=t:this._batchTable.setAllColor(t)},n$p.prototype.applyStyle=function(e){if(0===this.featuresLength){var t=e$2e(e)&&e$2e(e.color),i=e$2e(e)&&e$2e(e.show);this._model.color=t?e.color.evaluateColor(void 0,this._model.color):e$1X.clone(e$1X.WHITE,this._model.color),this._model.show=!i||e.show.evaluate(void 0)}else this._batchTable.applyStyle(e)},n$p.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._contentModelMatrix=p$1d.multiply(this._tile.computedTransform,this._rtcCenterTransform,this._contentModelMatrix),this._model.modelMatrix=this._contentModelMatrix,this._model.shadows=this._tileset.shadows,this._model.imageBasedLightingFactor=this._tileset.imageBasedLightingFactor,this._model.lightColor=this._tileset.lightColor,this._model.luminanceAtZenith=this._tileset.luminanceAtZenith,this._model.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._model.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._model.debugWireframe=this._tileset.debugWireframe;var n=this._tileset.clippingPlanes;this._model.clippingPlanesOriginMatrix=this._tileset.clippingPlanesOriginMatrix,e$2e(n)&&this._tile.clippingPlanesDirty&&(this._model._clippingPlanes=n.enabled&&this._tile._isClipped?n:void 0),e$2e(n)&&e$2e(this._model._clippingPlanes)&&this._model._clippingPlanes!==n&&(this._model._clippingPlanes=n),this._model.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&!e$2e(e.classificationType)&&this._batchTable.addDerivedCommands(t,i)},n$p.prototype.isDestroyed=function(){return!1},n$p.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$11(this)},Object.defineProperties(i$C.prototype,{featurePropertiesDirty:{get:function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)if(e[i].featurePropertiesDirty)return!0;return!1},set:function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}});var u$z=Uint32Array.BYTES_PER_ELEMENT;function L$B(e,t,i,n){i=u$Z(i,0);var r=new Uint8Array(t),o=new DataView(t);i+=u$z;var a=o.getUint32(i,!0);if(1!==a)throw new t$13("Only Composite Tile version 1 is supported. Version "+a+" is not.");i+=u$z,i+=u$z;var s=o.getUint32(i,!0);i+=u$z;for(var l=[],u=0;u<s;++u){var c=a$F(r,i),h=o.getUint32(i+2*u$z,!0),d=n[c];if(!e$2e(d))throw new t$13("Unknown tile content type, "+c+", inside Composite tile");var f=d(e._tileset,e._tile,e._resource,t,i);e._contents.push(f),l.push(f.readyPromise),i+=h}o$1l.all(l).then((function(){e._readyPromise.resolve(e)})).otherwise((function(t){e._readyPromise.reject(t)}))}function e$I(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,e$2e(this._center)||(e$2e(this._boundingVolume)?this._center=o$1p.clone(this._boundingVolume.center):this._center=o$1p.clone(o$1p.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=_0x2b86ba.BOTH}function F$A(e){var t=new Float64Array(p$1d.packedLength+o$1p.packedLength),i=0;return o$1p.pack(e._center,t,i),i+=o$1p.packedLength,p$1d.pack(e._modelMatrix,t,i),t}function M$z(e,t){for(var i=0,n=t[i++],r=t[i++],o=e._boundingVolumes=new Array(r),a=0;a<r;++a)o[a]=i$1d.unpack(t,i),i+=i$1d.packedLength;for(var s=t[i++],l=e._batchedIndices=new Array(s),u=0;u<s;++u){var c=e$1X.unpack(t,i);i+=e$1X.packedLength;for(var h=t[i++],d=t[i++],f=t[i++],p=new Array(f),_=0;_<f;++_)p[_]=t[i++];l[u]=new c$x({color:c,offset:h,count:d,batchIds:p})}return n}i$C.prototype.hasProperty=function(e,t){return!1},i$C.prototype.getFeature=function(e){},i$C.prototype.applyDebugSettings=function(e,t){for(var i=this._contents,n=i.length,r=0;r<n;++r)i[r].applyDebugSettings(e,t)},i$C.prototype.applyStyle=function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].applyStyle(e)},i$C.prototype.update=function(e,t){for(var i=this._contents,n=i.length,r=0;r<n;++r)i[r].update(e,t)},i$C.prototype.isDestroyed=function(){return!1},i$C.prototype.destroy=function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)e[i].destroy();return i$11(this)},Object.defineProperties(e$I.prototype,{trianglesLength:{get:function(){return e$2e(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return e$2e(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}}),e$I.packedBoxLength=p$1d.packedLength+o$1p.packedLength,e$I.packedCylinderLength=p$1d.packedLength+2,e$I.packedEllipsoidLength=p$1d.packedLength+o$1p.packedLength,e$I.packedSphereLength=o$1p.packedLength+1;var R$q=new i$W("createVectorTileGeometries"),E$B=new e$1X;function W$A(e){if(!e$2e(e._primitive)){if(!e$2e(e._verticesPromise)){var t=e._boxes,i=e._boxBatchIds,n=e._cylinders,r=e._cylinderBatchIds,o=e._ellipsoids,a=e._ellipsoidBatchIds,s=e._spheres,l=e._sphereBatchIds,u=e._batchTableColors,c=e._packedBuffer;if(!e$2e(u)){var h=0;e$2e(e._boxes)&&(t=e._boxes=l$R(t),h+=(i=e._boxBatchIds=l$R(i)).length),e$2e(e._cylinders)&&(n=e._cylinders=l$R(n),h+=(r=e._cylinderBatchIds=l$R(r)).length),e$2e(e._ellipsoids)&&(o=e._ellipsoids=l$R(o),h+=(a=e._ellipsoidBatchIds=l$R(a)).length),e$2e(e._spheres)&&(s=e._sphere=l$R(s),h+=(l=e._sphereBatchIds=l$R(l)).length),u=e._batchTableColors=new Uint32Array(h);for(var d=e._batchTable,f=0;f<h;++f){var p=d.getColor(f,E$B);u[f]=p.toRgba()}c=e._packedBuffer=F$A(e)}var _=[];e$2e(t)&&_.push(t.buffer,i.buffer),e$2e(n)&&_.push(n.buffer,r.buffer),e$2e(o)&&_.push(o.buffer,a.buffer),e$2e(s)&&_.push(s.buffer,l.buffer),_.push(u.buffer,c.buffer);var m={boxes:e$2e(t)?t.buffer:void 0,boxBatchIds:e$2e(t)?i.buffer:void 0,cylinders:e$2e(n)?n.buffer:void 0,cylinderBatchIds:e$2e(n)?r.buffer:void 0,ellipsoids:e$2e(o)?o.buffer:void 0,ellipsoidBatchIds:e$2e(o)?a.buffer:void 0,spheres:e$2e(s)?s.buffer:void 0,sphereBatchIds:e$2e(s)?l.buffer:void 0,batchTableColors:u.buffer,packedBuffer:c.buffer},g=e._verticesPromise=R$q.scheduleTask(m,_);if(!e$2e(g))return;g.then((function(t){var i=new Float64Array(t.packedBuffer),n=M$z(e,i);e._indices=2===n?new Uint16Array(t.indices):new Uint32Array(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._positions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.vertexBatchIds),e._batchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!e$2e(e._primitive)&&(e._primitive=new y$y({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:u$Z(e._pickObject,e)}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}function p$w(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._geometries=void 0,this._contentReadyPromise=void 0,this._readyPromise=o$1l.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,Q$w(this,n,r)}function q$A(e){return function(t,i){e$2e(e._geometries)&&e._geometries.updateCommands(t,i)}}function K$v(e,t){var i,n,r,o,a,s=u$Z(e.BOXES_LENGTH,0),l=u$Z(e.CYLINDERS_LENGTH,0),u=u$Z(e.ELLIPSOIDS_LENGTH,0),c=u$Z(e.SPHERES_LENGTH,0);if(s>0&&e$2e(e.BOX_BATCH_IDS)){var h=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,h,s)}if(l>0&&e$2e(e.CYLINDER_BATCH_IDS)){var d=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,d,l)}if(u>0&&e$2e(e.ELLIPSOID_BATCH_IDS)){var f=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,f,u)}if(c>0&&e$2e(e.SPHERE_BATCH_IDS)){var p=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,p,c)}var _=e$2e(i)||e$2e(n)||e$2e(r)||e$2e(o),m=s>0&&!e$2e(i)||l>0&&!e$2e(n)||u>0&&!e$2e(r)||c>0&&!e$2e(o);if(_&&m)throw new t$13("If one group of batch ids is defined, then all batch ids must be defined.");if(!(e$2e(i)||e$2e(n)||e$2e(r)||e$2e(o))){var g=0;if(!e$2e(i)&&s>0)for(i=new Uint16Array(s),a=0;a<s;++a)i[a]=g++;if(!e$2e(n)&&l>0)for(n=new Uint16Array(l),a=0;a<l;++a)n[a]=g++;if(!e$2e(r)&&u>0)for(r=new Uint16Array(u),a=0;a<u;++a)r[a]=g++;if(!e$2e(o)&&c>0)for(o=new Uint16Array(c),a=0;a<c;++a)o[a]=g++}return{boxes:i,cylinders:n,ellipsoids:r,spheres:o}}e$I.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},e$I.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},e$I.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},e$I.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},e$I.prototype.update=function(e){W$A(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},e$I.prototype.isDestroyed=function(){return!1},e$I.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$11(this)},Object.defineProperties(p$w.prototype,{featuresLength:{get:function(){return e$2e(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return e$2e(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return e$2e(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return e$2e(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var c$v=Uint32Array.BYTES_PER_ELEMENT;function Q$w(e,t,i){i=u$Z(i,0);var n=new Uint8Array(t),r=new DataView(t);i+=c$v;var o=r.getUint32(i,!0);if(1!==o)throw new t$13("Only Geometry tile version 1 is supported. Version "+o+" is not.");i+=c$v;var a=r.getUint32(i,!0);if(i+=c$v,0!==a){var s=r.getUint32(i,!0);if(i+=c$v,0===s)throw new t$13("Feature table must have a byte length greater than zero");var l=r.getUint32(i,!0);i+=c$v;var u=r.getUint32(i,!0);i+=c$v;var c=r.getUint32(i,!0),h=a$K(n,i+=c$v,s),d=JSON.parse(h);i+=s;var f,p,_=new Uint8Array(t,i,l);if(i+=l,u>0){var m=a$K(n,i,u);f=JSON.parse(m),i+=u,c>0&&(p=new Uint8Array(t,i,c),p=new Uint8Array(p))}var g=u$Z(d.BOXES_LENGTH,0),x=u$Z(d.CYLINDERS_LENGTH,0),y=u$Z(d.ELLIPSOIDS_LENGTH,0),v=u$Z(d.SPHERES_LENGTH,0),$=g+x+y+v,b=new h$D(e,$,f,p,q$A(e));if(e._batchTable=b,0!==$){var T,C=e.tile.computedTransform;e$2e(d.RTC_CENTER)&&(T=o$1p.unpack(d.RTC_CENTER),p$1d.multiplyByPoint(C,T,T));var S=K$v(d,_);if(g>0||x>0||y>0||v>0){var w,E,P,A;if(g>0){var L=_.byteOffset+d.BOXES.byteOffset;w=new Float32Array(_.buffer,L,e$I.packedBoxLength*g)}if(x>0){var M=_.byteOffset+d.CYLINDERS.byteOffset;E=new Float32Array(_.buffer,M,e$I.packedCylinderLength*x)}if(y>0){var R=_.byteOffset+d.ELLIPSOIDS.byteOffset;P=new Float32Array(_.buffer,R,e$I.packedEllipsoidLength*y)}if(v>0){var O=_.byteOffset+d.SPHERES.byteOffset;A=new Float32Array(_.buffer,O,e$I.packedSphereLength*v)}e._geometries=new e$I({boxes:w,boxBatchIds:S.boxes,cylinders:E,cylinderBatchIds:S.cylinders,ellipsoids:P,ellipsoidBatchIds:S.ellipsoids,spheres:A,sphereBatchIds:S.spheres,center:T,modelMatrix:C,batchTable:b,boundingVolume:e.tile.boundingVolume.boundingVolume})}}}else e._readyPromise.resolve(e)}function x$D(e){var t=e.featuresLength;if(!e$2e(e._features)&&t>0){var i=new Array(t);e$2e(e._geometries)&&e._geometries.createFeatures(e,i),e._features=i}}function e$H(e,t,i){this.primitive=e,this._modelMatrix=p$1d.clone(t),this._instanceId=i}p$w.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},p$w.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2e(e)||e<0||e>=t)throw new t$15("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return x$D(this),this._features[e]},p$w.prototype.applyDebugSettings=function(e,t){e$2e(this._geometries)&&this._geometries.applyDebugSettings(e,t)},p$w.prototype.applyStyle=function(e){x$D(this),e$2e(this._geometries)&&this._geometries.applyStyle(e,this._features)},p$w.prototype.update=function(e,t){if(e$2e(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),e$2e(this._batchTable)&&this._geometries._ready&&this._batchTable.update(e,t),!e$2e(this._contentReadyPromise)){var i=this;this._contentReadyPromise=this._geometries.readyPromise.then((function(){i._readyPromise.resolve(i)}))}},p$w.prototype.isDestroyed=function(){return!1},p$w.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$11(this)},Object.defineProperties(e$H.prototype,{instanceId:{get:function(){return this._instanceId}},model:{get:function(){return this.primitive._model}},modelMatrix:{get:function(){return p$1d.clone(this._modelMatrix)},set:function(e){p$1d.clone(e,this._modelMatrix),this.primitive.expandBoundingSphere(this._modelMatrix),this.primitive._dirty=!0}}});var y$w={NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3};function w$u(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).gltf)&&!e$2e(e.url))throw new t$15("Either options.gltf or options.url is required.");if(e$2e(e.gltf)&&e$2e(e.url))throw new t$15("Cannot pass in both options.gltf and options.url.");this.show=u$Z(e.show,!0),this._instancingSupported=!1,this._dynamic=u$Z(e.dynamic,!1),this._allowPicking=u$Z(e.allowPicking,!0),this._ready=!1,this._readyPromise=o$1l.defer(),this._state=y$w.NEEDS_LOAD,this._dirty=!1,this._cull=u$Z(e.cull,!0),this._opaquePass=u$Z(e.opaquePass,Le$q.OPAQUE),this._instances=re$o(this,e.instances),this._batchTable=e.batchTable,this._model=void 0,this._vertexBufferTypedArray=void 0,this._vertexBuffer=void 0,this._batchIdBuffer=void 0,this._instancedUniformsByProgram=void 0,this._drawCommands=[],this._modelCommands=void 0,this._boundingSphere=ae$g(this),this._center=o$1p.clone(this._boundingSphere.center),this._rtcTransform=new p$1d,this._rtcModelView=new p$1d,this._mode=void 0,this.modelMatrix=p$1d.clone(p$1d.IDENTITY),this._modelMatrix=p$1d.clone(this.modelMatrix),this._url=t$10.createIfNeeded(e.url),this._requestType=e.requestType,this._gltf=e.gltf,this._basePath=t$10.createIfNeeded(e.basePath),this._asynchronous=e.asynchronous,this._incrementallyLoadTextures=e.incrementallyLoadTextures,this._upAxis=e.upAxis,this._forwardAxis=e.forwardAxis,this.shadows=u$Z(e.shadows,W$X.ENABLED),this._shadows=this.shadows,this._pickIdLoaded=e.pickIdLoaded,this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=u$Z(e.debugWireframe,!1),this._debugWireframe=!1,this._imageBasedLightingFactor=new o$1o(1,1),o$1o.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=e.luminanceAtZenith,this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps}function re$o(e,t){for(var i=(t=u$Z(t,[])).length,n=new Array(i),r=0;r<i;++r){var o=t[r],a=o.modelMatrix,s=u$Z(o.batchId,r);n[r]=new e$H(e,a,s)}return n}function ae$g(e){for(var t=e.length,i=new Array(t),n=0;n<t;++n)i[n]=p$1d.getTranslation(e._instances[n]._modelMatrix,new o$1p);return i$1d.fromPoints(i)}Object.defineProperties(w$u.prototype,{allowPicking:{get:function(){return this._allowPicking}},length:{get:function(){return this._instances.length}},activeAnimations:{get:function(){return this._model.activeAnimations}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o$1q.typeOf.object("imageBasedLightingFactor",e),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),o$1o.clone(e,this._imageBasedLightingFactor)}}});var te$j=new o$1p,M$y=new p$1d;function ne$j(e,t,i,n){return function(r,o){var a=r.semantic;if(e$2e(a)&&e.indexOf(a)>-1){if(!(t.indexOf(a)>-1))throw new t$13('Shader program cannot be optimized for instancing. Uniform "'+o+'" in program "'+i+'" uses unsupported semantic "'+a+'"');n[o]=a}}}function F$z(e,t){if(e$2e(e._instancedUniformsByProgram))return e._instancedUniformsByProgram[t];var i={};e._instancedUniformsByProgram=i;var n=["MODEL","MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELINVERSE","MODELVIEWINVERSE","MODELVIEWPROJECTIONINVERSE","MODELINVERSETRANSPOSE","MODELVIEWINVERSETRANSPOSE"],r=["MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELVIEWINVERSETRANSPOSE"],o=e._model._sourceTechniques;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a],l=s.program;if(!e$2e(i[l])){var u={};i[l]=u,e$L.techniqueUniform(s,ne$j(n,r,t,u))}}return i[t]}function ie$i(e){return function(t,i){var n=F$z(e,i),r=e$2e(e._batchTable),o=s$V.replaceMain(t,"czm_instancing_main"),a="",s="";for(var l in n)if(n.hasOwnProperty(l)){var u,c=n[l];"MODELVIEW"===c||"CESIUM_RTC_MODELVIEW"===c?u="czm_instanced_modelView":"MODELVIEWPROJECTION"===c?(u="czm_instanced_modelViewProjection",a+="mat4 czm_instanced_modelViewProjection;\n",s+="czm_instanced_modelViewProjection = czm_projection * czm_instanced_modelView;\n"):"MODELVIEWINVERSETRANSPOSE"===c&&(u="czm_instanced_modelViewInverseTranspose",a+="mat3 czm_instanced_modelViewInverseTranspose;\n",s+="czm_instanced_modelViewInverseTranspose = mat3(czm_instanced_modelView);\n");var h=new RegExp("uniform.*"+l+".*");o=o.replace(h,""),h=new RegExp(l+"\\b","g"),o=o.replace(h,u)}var d,f,p;r?(d="attribute float a_batchId;\n",f="",p=""):(d="",f="attribute vec4 pickColor;\nvarying vec4 v_pickColor;\n",p=" v_pickColor = pickColor;\n");var _="uniform mat4 czm_instanced_modifiedModelView;\nuniform mat4 czm_instanced_nodeTransform;\n"+a+"mat4 czm_instanced_modelView;\nattribute vec4 czm_modelMatrixRow0;\nattribute vec4 czm_modelMatrixRow1;\nattribute vec4 czm_modelMatrixRow2;\n"+d+f+o+"void main()\n{\n mat4 czm_instanced_model = mat4(czm_modelMatrixRow0.x, czm_modelMatrixRow1.x, czm_modelMatrixRow2.x, 0.0, czm_modelMatrixRow0.y, czm_modelMatrixRow1.y, czm_modelMatrixRow2.y, 0.0, czm_modelMatrixRow0.z, czm_modelMatrixRow1.z, czm_modelMatrixRow2.z, 0.0, czm_modelMatrixRow0.w, czm_modelMatrixRow1.w, czm_modelMatrixRow2.w, 1.0);\n czm_instanced_modelView = czm_instanced_modifiedModelView * czm_instanced_model * czm_instanced_nodeTransform;\n"+s+" czm_instancing_main();\n"+p+"}\n";if(r){var m=e._model.gltf,g=s$v.getDiffuseAttributeOrUniform(m,i);_=e._batchTable.getVertexShaderCallback(!0,"a_batchId",g)(_)}return _}}function se$e(e){return function(t,i){var n=e._batchTable;if(e$2e(n)){var r=e._model.gltf,o=s$v.getDiffuseAttributeOrUniform(r,i);t=n.getFragmentShaderCallback(!0,o)(t)}else t="varying vec4 v_pickColor;\n"+t;return t}}function de$e(e,t){return function(){return p$1d.multiply(t.uniformState.view,e._rtcTransform,e._rtcModelView)}}function oe$f(e){return function(){return e.computedMatrix}}function me$i(e,t){return function(i,n,r){(i=l$1f(i)).czm_instanced_modifiedModelView=de$e(e,t),i.czm_instanced_nodeTransform=oe$f(r);var o=F$z(e,n);for(var a in o)o.hasOwnProperty(a)&&delete i[a];return e$2e(e._batchTable)&&(i=e._batchTable.getUniformMapCallback()(i)),i}}function ue$h(e){return function(t,i){if(e$2e(e._batchTable)){var n=e._model.gltf,r=s$v.getDiffuseAttributeOrUniform(n,i);t="uniform float a_batchId\n;"+(t=e._batchTable.getVertexShaderCallback(!0,"a_batchId",r)(t))}return t}}function he$e(e){return function(t,i){var n=e._batchTable;if(e$2e(n)){var r=e._model.gltf,o=s$v.getDiffuseAttributeOrUniform(r,i);t=n.getFragmentShaderCallback(!0,o)(t)}else t="uniform vec4 czm_pickColor;\n"+t;return t}}function fe$g(e){return function(t){return e$2e(e._batchTable)&&(t=e._batchTable.getUniformMapCallback()(t)),t}}function U$w(e){var t=e._instances,i=e.length,n=e._center,r=e._vertexBufferTypedArray;e$2e(r)||(r=new Float32Array(12*i)),e._dynamic&&(e._vertexBufferTypedArray=r);for(var o=0;o<i;++o){var a=t[o]._modelMatrix,s=p$1d.clone(a,M$y);s[12]-=n.x,s[13]-=n.y,s[14]-=n.z;var l=12*o;r[l+0]=s[0],r[l+1]=s[4],r[l+2]=s[8],r[l+3]=s[12],r[l+4]=s[1],r[l+5]=s[5],r[l+6]=s[9],r[l+7]=s[13],r[l+8]=s[2],r[l+9]=s[6],r[l+10]=s[10],r[l+11]=s[14]}return r}function _e$c(e,t){var i,n=e._instances,r=e.length,o=e._dynamic,a=e$2e(e._batchTable);if(a){var s=new Uint16Array(r);for(i=0;i<r;++i)s[i]=n[i]._instanceId;e._batchIdBuffer=t$X.createVertexBuffer({context:t,typedArray:s,usage:A$18.STATIC_DRAW})}if(!a){var l=new Uint8Array(4*r);for(i=0;i<r;++i){var u=e._pickIds[i].color,c=4*i;l[c]=e$1X.floatToByte(u.red),l[c+1]=e$1X.floatToByte(u.green),l[c+2]=e$1X.floatToByte(u.blue),l[c+3]=e$1X.floatToByte(u.alpha)}e._pickIdBuffer=t$X.createVertexBuffer({context:t,typedArray:l,usage:A$18.STATIC_DRAW})}var h=U$w(e);e._vertexBuffer=t$X.createVertexBuffer({context:t,typedArray:h,usage:o?A$18.STREAM_DRAW:A$18.STATIC_DRAW})}function ge$d(e){var t=U$w(e);e._vertexBuffer.copyFromArrayView(t)}function ce$h(e,t){for(var i=e._instances,n=i.length,r=new Array(n),o=0;o<n;++o)r[o]=t.createPickId(i[o]);return r}function ve$e(e,t){var i=e._instancingSupported,n=e$2e(e._batchTable),r=e._allowPicking,o={url:e._url,requestType:e._requestType,gltf:e._gltf,basePath:e._basePath,shadows:e._shadows,cacheKey:void 0,asynchronous:e._asynchronous,allowPicking:r,incrementallyLoadTextures:e._incrementallyLoadTextures,upAxis:e._upAxis,forwardAxis:e._forwardAxis,precreatedAttributes:void 0,vertexShaderLoaded:void 0,fragmentShaderLoaded:void 0,uniformMapLoaded:void 0,pickIdLoaded:e._pickIdLoaded,ignoreCommands:!0,opaquePass:e._opaquePass,imageBasedLightingFactor:e.imageBasedLightingFactor,lightColor:e.lightColor,luminanceAtZenith:e.luminanceAtZenith,sphericalHarmonicCoefficients:e.sphericalHarmonicCoefficients,specularEnvironmentMaps:e.specularEnvironmentMaps};if(n||(e._pickIds=ce$h(e,t)),i){_e$c(e,t);var a=S$14.getSizeInBytes(S$14.FLOAT),s={czm_modelMatrixRow0:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:12*a,instanceDivisor:1},czm_modelMatrixRow1:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:4*a,strideInBytes:12*a,instanceDivisor:1},czm_modelMatrixRow2:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:8*a,strideInBytes:12*a,instanceDivisor:1}};n&&(s.a_batchId={index:0,vertexBuffer:e._batchIdBuffer,componentsPerAttribute:1,componentDatatype:S$14.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),n||(s.pickColor={index:0,vertexBuffer:e._pickIdBuffer,componentsPerAttribute:4,componentDatatype:S$14.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),o.precreatedAttributes=s,o.vertexShaderLoaded=ie$i(e),o.fragmentShaderLoaded=se$e(e),o.uniformMapLoaded=me$i(e,t),e$2e(e._url)&&(o.cacheKey=e._url.getUrlComponent()+"#instanced")}else o.vertexShaderLoaded=ue$h(e),o.fragmentShaderLoaded=he$e(e),o.uniformMapLoaded=fe$g(e);e$2e(e._url)?e._model=F$B.fromGltf(o):e._model=new F$B(o)}function pe$j(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?W$18.LINES:W$18.TRIANGLES,i=e._drawCommands,n=i.length,r=0;r<n;++r)i[r].primitiveType=t}}function le$i(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e._drawCommands,i=t.length,n=0;n<i;++n)t[n].debugShowBoundingVolume=e.debugShowBoundingVolume}}function be$e(e,t){for(var i=t.length,n=e.length,r=e._boundingSphere,o=e._cull,a=0;a<i;++a){var s=i$$.shallowClone(t[a]);s.instanceCount=n,s.boundingVolume=r,s.cull=o,e$2e(e._batchTable)?s.pickId=e._batchTable.getPickId():s.pickId="v_pickColor",e._drawCommands.push(s)}}function ye$b(e){return function(){return e}}function we$a(e){return function(){return e}}function Ee$c(e,t){for(var i=e._instances,n=t.length,r=e.length,o=e$2e(e._batchTable),a=e._cull,s=0;s<n;++s)for(var l=0;l<r;++l){var u=i$$.shallowClone(t[s]);if(u.modelMatrix=new p$1d,u.boundingVolume=new i$1d,u.cull=a,u.uniformMap=l$1f(u.uniformMap),o)u.uniformMap.a_batchId=ye$b(i[l]._instanceId);else{var c=e._pickIds[l];u.uniformMap.czm_pickColor=we$a(c.color)}e._drawCommands.push(u)}}function W$z(e){for(var t=e._modelCommands,i=t.length,n=e.length,r=e._rtcTransform,o=e._center,a=0;a<i;++a)for(var s=t[a],l=0;l<n;++l){var u=a*n+l,c=e._drawCommands[u],h=p$1d.clone(e._instances[l]._modelMatrix,M$y);h[12]-=o.x,h[13]-=o.y,h[14]-=o.z,h=p$1d.multiply(r,h,M$y);var d=s.modelMatrix,f=c.modelMatrix;p$1d.multiply(h,d,f);var p=s.boundingVolume,_=c.boundingVolume;i$1d.transform(p,h,_)}}function q$z(e){for(var t=e._nodeCommands,i=t.length,n=[],r=0;r<i;++r){var o=t[r];o.show&&n.push(o.command)}return n}function Te$c(e){for(var t=e._nodeCommands,i=t.length,n=0;n<i;n++){if(t[n].command.dirty)return!0}return!1}function H$D(e,t){e._drawCommands=[];var i=q$z(e._model);t?be$e(e,i):(Ee$c(e,i),W$z(e))}function Ie$b(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=W$X.castShadows(e.shadows),i=W$X.receiveShadows(e.shadows),n=e._drawCommands,r=n.length,o=0;o<r;++o){var a=n[o];a.castShadows=t,a.receiveShadows=i}}}function u$y(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._modelInstanceCollection=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,Se$9(this,n,r)}function Ne$a(e){return function(){return e._batchTable.getPickId()}}w$u.prototype.expandBoundingSphere=function(e){var t=p$1d.getTranslation(e,te$j);i$1d.expand(this._boundingSphere,t,this._boundingSphere)},w$u.prototype.update=function(e){if(e.mode!==C$14.MORPHING&&this.show&&0!==this.length){var t=e.context;if(this._state===y$w.NEEDS_LOAD){this._state=y$w.LOADING,this._instancingSupported=t.instancedArrays,ve$e(this,t);var i=this;this._model.readyPromise.otherwise((function(e){i._state=y$w.FAILED,i._readyPromise.reject(e)}))}var n=this._instancingSupported,r=this._model;if(r.imageBasedLightingFactor=this.imageBasedLightingFactor,r.lightColor=this.lightColor,r.luminanceAtZenith=this.luminanceAtZenith,r.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,r.specularEnvironmentMaps=this.specularEnvironmentMaps,r.update(e),r.ready&&this._state===y$w.LOADING){this._state=y$w.LOADED,this._ready=!0;var o=r.boundingSphere.radius+o$1p.magnitude(r.boundingSphere.center);return this._boundingSphere.radius+=o,this._modelCommands=q$z(r),H$D(this,n),void this._readyPromise.resolve(this)}if(this._state===y$w.LOADED){var a=e.mode!==this._mode,s=this.modelMatrix,l=!p$1d.equals(this._modelMatrix,s);if(a||l){this._mode=e.mode,p$1d.clone(s,this._modelMatrix);var u=p$1d.multiplyByTranslation(this._modelMatrix,this._center,this._rtcTransform);this._mode!==C$14.SCENE3D&&(u=m$19.basisTo2D(e.mapProjection,u,u)),p$1d.getTranslation(u,this._boundingSphere.center)}n&&this._dirty&&(this._dynamic=!0,this._dirty=!1,ge$d(this)),Te$c(r)&&H$D(this,n),!n&&(r.dirty||this._dirty||a||l)&&W$z(this),Ie$b(this),pe$j(this),le$i(this);var c=e.passes;if(c.render||c.pick)for(var h=e.commandList,d=this._drawCommands,f=d.length,p=0;p<f;++p)h.push(d[p])}}},w$u.prototype.isDestroyed=function(){return!1},w$u.prototype.destroy=function(){this._model=this._model&&this._model.destroy();var e=this._pickIds;if(e$2e(e))for(var t=e.length,i=0;i<t;++i)e[i].destroy();return i$11(this)},u$y._deprecationWarning=t$11,Object.defineProperties(u$y.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){var e=this._modelInstanceCollection._model;return e$2e(e)?e.trianglesLength:0}},geometryByteLength:{get:function(){var e=this._modelInstanceCollection._model;return e$2e(e)?e.geometryByteLength:0}},texturesByteLength:{get:function(){var e=this._modelInstanceCollection._model;return e$2e(e)?e.texturesByteLength:0}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._modelInstanceCollection.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var g$G=Uint32Array.BYTES_PER_ELEMENT,L$A=new Array(4),ie$h=new Array(4);function Se$9(e,t,i){var n=u$Z(i,0);i=n;var r=new Uint8Array(t),o=new DataView(t);i+=g$G;var a=o.getUint32(i,!0);if(1!==a)throw new t$13("Only Instanced 3D Model version 1 is supported. Version "+a+" is not.");i+=g$G;var s=o.getUint32(i,!0);i+=g$G;var l=o.getUint32(i,!0);if(0===l)throw new t$13("featureTableJsonByteLength is zero, the feature table must be defined.");i+=g$G;var u=o.getUint32(i,!0);i+=g$G;var c=o.getUint32(i,!0);i+=g$G;var h=o.getUint32(i,!0);i+=g$G;var d=o.getUint32(i,!0);if(1!==d&&0!==d)throw new t$13("Only glTF format 0 (uri) or 1 (embedded) are supported. Format "+d+" is not.");var f=a$K(r,i+=g$G,l),p=JSON.parse(f);i+=l;var _=new Uint8Array(t,i,u);i+=u;var m,g,x=new o$C(p,_),y=x.getGlobalProperty("INSTANCES_LENGTH");if(x.featuresLength=y,!e$2e(y))throw new t$13("Feature table global property: INSTANCES_LENGTH must be defined");if(c>0){var v=a$K(r,i,c);m=JSON.parse(v),i+=c,h>0&&(g=new Uint8Array(t,i,h),g=new Uint8Array(g),i+=h)}e._batchTable=new h$D(e,y,m,g);var $,b=n+s-i;if(0===b)throw new t$13("glTF byte length is zero, i3dm must have a glTF to instance.");i%4==0?$=new Uint8Array(t,i,b):(u$y._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),$=new Uint8Array(r.subarray(i,i+b)));var T=e._tileset,C={instances:new Array(y),batchTable:e._batchTable,cull:!1,url:void 0,requestType:U$1f.TILES3D,gltf:void 0,basePath:void 0,incrementallyLoadTextures:!1,upAxis:T._gltfUpAxis,forwardAxis:v$y.X,opaquePass:Le$q.CESIUM_3D_TILE,pickIdLoaded:Ne$a(e),imageBasedLightingFactor:T.imageBasedLightingFactor,lightColor:T.lightColor,luminanceAtZenith:T.luminanceAtZenith,sphericalHarmonicCoefficients:T.sphericalHarmonicCoefficients,specularEnvironmentMaps:T.specularEnvironmentMaps};if(0===d){var S=a$K($);S=S.replace(/[\s\0]+$/,""),C.url=e._resource.getDerivedResource({url:S})}else C.gltf=$,C.basePath=e._resource.clone();var w,E=x.getGlobalProperty("EAST_NORTH_UP"),P=x.getGlobalProperty("RTC_CENTER",S$14.FLOAT,3);e$2e(P)&&(w=o$1p.unpack(P));for(var A=C.instances,L=new o$1p,M=new Array(3),R=new o$1p,O=new o$1p,D=new o$1p,I=new p$1e,B=new n$15,F=new o$1p,N=new e$1_,G=new p$1d,z=0;z<y;z++){var U=x.getProperty("POSITION",S$14.FLOAT,3,z,L$A);if(!e$2e(U)){U=M;var V=x.getProperty("POSITION_QUANTIZED",S$14.UNSIGNED_SHORT,3,z,L$A);if(!e$2e(V))throw new t$13("Either POSITION or POSITION_QUANTIZED must be defined for each instance.");var k=x.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",S$14.FLOAT,3);if(!e$2e(k))throw new t$13("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");var W=x.getGlobalProperty("QUANTIZED_VOLUME_SCALE",S$14.FLOAT,3);if(!e$2e(W))throw new t$13("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");for(var H=0;H<3;H++)U[H]=V[H]/65535*W[H]+k[H]}o$1p.unpack(U,0,L),e$2e(w)&&o$1p.add(L,w,L),N.translation=L;var q=x.getProperty("NORMAL_UP",S$14.FLOAT,3,z,L$A),j=x.getProperty("NORMAL_RIGHT",S$14.FLOAT,3,z,ie$h),X=!1;if(e$2e(q)){if(!e$2e(j))throw new t$13("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");o$1p.unpack(q,0,O),o$1p.unpack(j,0,R),X=!0}else{var Y=x.getProperty("NORMAL_UP_OCT32P",S$14.UNSIGNED_SHORT,2,z,L$A),Z=x.getProperty("NORMAL_RIGHT_OCT32P",S$14.UNSIGNED_SHORT,2,z,ie$h);if(e$2e(Y)){if(!e$2e(Z))throw new t$13("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");t$$.octDecodeInRange(Y[0],Y[1],65535,O),t$$.octDecodeInRange(Z[0],Z[1],65535,R),X=!0}else E?(m$19.eastNorthUpToFixedFrame(L,t$12.WGS84,G),p$1d.getMatrix3(G,I)):p$1e.clone(p$1e.IDENTITY,I)}X&&(o$1p.cross(R,O,D),o$1p.normalize(D,D),p$1e.setColumn(I,0,R,I),p$1e.setColumn(I,1,O,I),p$1e.setColumn(I,2,D,I)),n$15.fromRotationMatrix(I,B),N.rotation=B,F=o$1p.fromElements(1,1,1,F);var K=x.getProperty("SCALE",S$14.FLOAT,1,z);e$2e(K)&&o$1p.multiplyByScalar(F,K,F);var Q=x.getProperty("SCALE_NON_UNIFORM",S$14.FLOAT,3,z,L$A);e$2e(Q)&&(F.x*=Q[0],F.y*=Q[1],F.z*=Q[2]),N.scale=F;var J=x.getProperty("BATCH_ID",S$14.UNSIGNED_SHORT,1,z);e$2e(J)||(J=z),p$1d.fromTranslationRotationScale(N,G);var ee=G.clone();A[z]={modelMatrix:ee,batchId:J}}e._modelInstanceCollection=new w$u(C)}function Ue$b(e){var t=e.featuresLength;if(!e$2e(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$M(e,n);e._features=i}}u$y.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},u$y.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2e(e)||e<0||e>=t)throw new t$15("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return Ue$b(this),this._features[e]},u$y.prototype.applyDebugSettings=function(e,t){t=e?t:e$1X.WHITE,this._batchTable.setAllColor(t)},u$y.prototype.applyStyle=function(e){this._batchTable.applyStyle(e)},u$y.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._modelInstanceCollection.modelMatrix=this._tile.computedTransform,this._modelInstanceCollection.shadows=this._tileset.shadows,this._modelInstanceCollection.lightColor=this._tileset.lightColor,this._modelInstanceCollection.luminanceAtZenith=this._tileset.luminanceAtZenith,this._modelInstanceCollection.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._modelInstanceCollection.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._modelInstanceCollection.debugWireframe=this._tileset.debugWireframe;var n=this._modelInstanceCollection._model;if(e$2e(n)){var r=this._tileset.clippingPlanes;n.clippingPlanesOriginMatrix=this._tileset.clippingPlanesOriginMatrix,e$2e(r)&&this._tile.clippingPlanesDirty&&(n._clippingPlanes=r.enabled&&this._tile._isClipped?r:void 0),e$2e(r)&&e$2e(n._clippingPlanes)&&n._clippingPlanes!==r&&(n._clippingPlanes=r)}this._modelInstanceCollection.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&this._batchTable.addDerivedCommands(t,i,!1)},u$y.prototype.isDestroyed=function(){return!1},u$y.prototype.destroy=function(){return this._modelInstanceCollection=this._modelInstanceCollection&&this._modelInstanceCollection.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$11(this)};var e$G={ADD:0,REPLACE:1},f$E=Object.freeze(e$G),K$u={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function ie$g(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.arrayBuffer",e.arrayBuffer),this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=e$1X.clone(e$1X.DARKGRAY),this._highlightColor=e$1X.clone(e$1X.WHITE),this._pointSize=1,this._rtcCenter=void 0,this._quantizedVolumeScale=void 0,this._quantizedVolumeOffset=void 0,this._styleableShaderAttributes=void 0,this._isQuantized=!1,this._isOctEncoded16P=!1,this._isRGB565=!1,this._hasColors=!1,this._hasNormals=!1,this._hasBatchIds=!1,this._decodingState=K$u.READY,this._dequantizeInShader=!0,this._isQuantizedDraco=!1,this._isOctEncodedDraco=!1,this._quantizedRange=0,this._octEncodedRange=0,this.backFaceCulling=!1,this._backFaceCulling=!1,this.normalShading=!0,this._normalShading=!0,this._opaqueRenderState=void 0,this._translucentRenderState=void 0,this._mode=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._pointsLength=0,this._geometryByteLength=0,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._batchTableLoaded=e.batchTableLoaded,this._pickIdLoaded=e.pickIdLoaded,this._opaquePass=u$Z(e.opaquePass,Le$q.OPAQUE),this._cull=u$Z(e.cull,!0),this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=p$1d.clone(p$1d.IDENTITY),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.time=0,this.shadows=W$X.ENABLED,this._boundingSphere=void 0,this.clippingPlanes=void 0,this.isClipped=!1,this.clippingPlanesDirty=!1,this.clippingPlanesOriginMatrix=void 0,this.attenuation=!1,this._attenuation=!1,this.geometricError=0,this.geometricErrorScale=1,this.maximumAttenuation=this._pointSize,We$9(this,e)}Object.defineProperties(ie$g.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},color:{get:function(){return e$1X.clone(this._highlightColor)},set:function(e){this._highlightColor=e$1X.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(e$2e(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=i$1d.clone(e,this._boundingSphere)}}});var X$s=Uint32Array.BYTES_PER_ELEMENT;function We$9(e,t){var i=t.arrayBuffer,n=u$Z(t.byteOffset,0),r=new Uint8Array(i),o=new DataView(i);n+=X$s;var a=o.getUint32(n,!0);if(1!==a)throw new t$13("Only Point Cloud tile version 1 is supported. Version "+a+" is not.");n+=X$s,n+=X$s;var s=o.getUint32(n,!0);if(0===s)throw new t$13("Feature table must have a byte length greater than zero");n+=X$s;var l=o.getUint32(n,!0);n+=X$s;var u=o.getUint32(n,!0);n+=X$s;var c=o.getUint32(n,!0),h=a$K(r,n+=X$s,s),d=JSON.parse(h);n+=s;var f,p,_=new Uint8Array(i,n,l);if(n+=l,u>0){var m=a$K(r,n,u);f=JSON.parse(m),n+=u,c>0&&(p=new Uint8Array(i,n,c),n+=c)}var g=new o$C(d,_),x=g.getGlobalProperty("POINTS_LENGTH");if(g.featuresLength=x,!e$2e(x))throw new t$13("Feature table global property: POINTS_LENGTH must be defined");var y=g.getGlobalProperty("RTC_CENTER",S$14.FLOAT,3);e$2e(y)&&(e._rtcCenter=o$1p.unpack(y));var v,$,b,T,C,S,w,E,P,A=!1,L=!1,M=!1,R=!1,O=!1,D=!1,I=!1,B=!1,F=e$2e(d.extensions)?d.extensions["3DTILES_draco_point_compression"]:void 0,N=e$2e(f)&&e$2e(f.extensions)?f.extensions["3DTILES_draco_point_compression"]:void 0;if(e$2e(N)&&(w=N.properties),e$2e(F)){S=F.properties;var G=F.byteOffset,z=F.byteLength;if(!e$2e(S)||!e$2e(G)||!e$2e(z))throw new t$13("Draco properties, byteOffset, and byteLength must be defined");C=l$R(_,G,G+z),A=e$2e(S.POSITION),L=e$2e(S.RGB)||e$2e(S.RGBA),M=e$2e(S.NORMAL),R=e$2e(S.BATCH_ID),D=e$2e(S.RGBA),e._decodingState=K$u.NEEDS_DECODE}if(e$2e(C)&&(E={buffer:C,featureTableProperties:S,batchTableProperties:w,properties:p$19(S,w),dequantizeInShader:e._dequantizeInShader}),!A)if(e$2e(d.POSITION))v=g.getPropertyArray("POSITION",S$14.FLOAT,3),A=!0;else if(e$2e(d.POSITION_QUANTIZED)){v=g.getPropertyArray("POSITION_QUANTIZED",S$14.UNSIGNED_SHORT,3),O=!0,A=!0;var U=g.getGlobalProperty("QUANTIZED_VOLUME_SCALE",S$14.FLOAT,3);if(!e$2e(U))throw new t$13("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");e._quantizedVolumeScale=o$1p.unpack(U),e._quantizedRange=65535;var V=g.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",S$14.FLOAT,3);if(!e$2e(V))throw new t$13("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");e._quantizedVolumeOffset=o$1p.unpack(V)}if(L||(e$2e(d.RGBA)?($=g.getPropertyArray("RGBA",S$14.UNSIGNED_BYTE,4),D=!0,L=!0):e$2e(d.RGB)?($=g.getPropertyArray("RGB",S$14.UNSIGNED_BYTE,3),L=!0):e$2e(d.RGB565)&&($=g.getPropertyArray("RGB565",S$14.UNSIGNED_SHORT,1),I=!0,L=!0)),M||(e$2e(d.NORMAL)?(b=g.getPropertyArray("NORMAL",S$14.FLOAT,3),M=!0):e$2e(d.NORMAL_OCT16P)&&(b=g.getPropertyArray("NORMAL_OCT16P",S$14.UNSIGNED_BYTE,2),B=!0,M=!0)),R||e$2e(d.BATCH_ID)&&(T=g.getPropertyArray("BATCH_ID",S$14.UNSIGNED_SHORT,1),R=!0),!A)throw new t$13("Either POSITION or POSITION_QUANTIZED must be defined.");if(e$2e(d.CONSTANT_RGBA)){var k=g.getGlobalProperty("CONSTANT_RGBA",S$14.UNSIGNED_BYTE,4);e._constantColor=e$1X.fromBytes(k[0],k[1],k[2],k[3],e._constantColor)}if(R){var W=g.getGlobalProperty("BATCH_LENGTH");if(!e$2e(W))throw new t$13("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");e$2e(p)&&(p=new Uint8Array(p)),e$2e(e._batchTableLoaded)&&e._batchTableLoaded(W,f,p)}!R&&e$2e(p)&&(P=h$D.getBinaryProperties(x,f,p)),e._parsedContent={positions:v,colors:$,normals:b,batchIds:T,styleableProperties:P,draco:E},e._pointsLength=x,e._isQuantized=O,e._isOctEncoded16P=B,e._isRGB565=I,e._isTranslucent=D,e._hasColors=L,e._hasNormals=M,e._hasBatchIds=R}var je$a=new o$1p,Je$5=new o$1p,Ke$7=new o$1p,le$h;function Xe$8(e){if(!e$2e(le$h)){e$2d.setRandomNumberSeed(0),le$h=new Array(e);for(var t=0;t<e;++t)le$h[t]=e$2d.nextRandomNumber()}return le$h}function $e$6(e){for(var t=e.length/3,i=Math.min(t,20),n=Xe$8(20),r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=o$1p.fromElements(r,r,r,je$a),s=o$1p.fromElements(o,o,o,Je$5),l=0;l<i;++l){var u=Math.floor(n[l]*t),c=o$1p.unpack(e,3*u,Ke$7);o$1p.minimumByComponent(a,c,a),o$1p.maximumByComponent(s,c,s)}var h=i$1d.fromCornerPoints(a,s);return h.radius+=e$2d.EPSILON2,h}function Ne$9(e,t){var i=S$14.fromTypedArray(e);return i===S$14.INT||i===S$14.UNSIGNED_INT||i===S$14.DOUBLE?(e$22("Cast pnts property to floats",'Point cloud property "'+t+'" will be casted to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.'),new Float32Array(e)):e}var er$4=new e$2c,rr$5=new e$2c,tr$3=new e$1X,Be$d=0,fe$f=1,_e$b=2,ze$b=3,ar$3=4,ue$g=new p$1d;function ir$4(e,t){var i,n,r=t.context,o=e._parsedContent,a=e._pointsLength,s=o.positions,l=o.colors,u=o.normals,c=o.batchIds,h=o.styleableProperties,d=e$2e(h),f=e._isQuantized,p=e._isQuantizedDraco,_=e._isOctEncoded16P,m=e._isOctEncodedDraco,g=e._quantizedRange,x=e._octEncodedRange,y=e._isRGB565,v=e._isTranslucent,$=e._hasColors,b=e._hasNormals,T=e._hasBatchIds,C=[],S={};if(e._styleableShaderAttributes=S,d){var w=ar$3;for(var E in h)if(h.hasOwnProperty(E)){var P=h[E],A=Ne$9(P.typedArray,E);i=P.componentCount,n=S$14.fromTypedArray(A);var L=t$X.createVertexBuffer({context:r,typedArray:A,usage:A$18.STATIC_DRAW});e._geometryByteLength+=L.sizeInBytes;var M={index:w,vertexBuffer:L,componentsPerAttribute:i,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0};C.push(M),S[E]={location:w,componentCount:i},++w}}var R,O,D,I=t$X.createVertexBuffer({context:r,typedArray:s,usage:A$18.STATIC_DRAW});e._geometryByteLength+=I.sizeInBytes,$&&(R=t$X.createVertexBuffer({context:r,typedArray:l,usage:A$18.STATIC_DRAW}),e._geometryByteLength+=R.sizeInBytes),b&&(O=t$X.createVertexBuffer({context:r,typedArray:u,usage:A$18.STATIC_DRAW}),e._geometryByteLength+=O.sizeInBytes),T&&(c=Ne$9(c,"batchIds"),D=t$X.createVertexBuffer({context:r,typedArray:c,usage:A$18.STATIC_DRAW}),e._geometryByteLength+=D.sizeInBytes);var B=[];if(n=f?S$14.UNSIGNED_SHORT:p?g<=255?S$14.UNSIGNED_BYTE:S$14.UNSIGNED_SHORT:S$14.FLOAT,B.push({index:Be$d,vertexBuffer:I,componentsPerAttribute:3,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(e._boundingSphere=f||p?i$1d.fromCornerPoints(o$1p.ZERO,e._quantizedVolumeScale):$e$6(s)),$)if(y)B.push({index:fe$f,vertexBuffer:R,componentsPerAttribute:1,componentDatatype:S$14.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{var F=v?4:3;B.push({index:fe$f,vertexBuffer:R,componentsPerAttribute:F,componentDatatype:S$14.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}b&&(_?(i=2,n=S$14.UNSIGNED_BYTE):m?(i=2,n=x<=255?S$14.UNSIGNED_BYTE:S$14.UNSIGNED_SHORT):(i=3,n=S$14.FLOAT),B.push({index:_e$b,vertexBuffer:O,componentsPerAttribute:i,componentDatatype:n,normalize:!1,offsetInBytes:0,strideInBytes:0})),T&&B.push({index:ze$b,vertexBuffer:D,componentsPerAttribute:1,componentDatatype:S$14.fromTypedArray(c),normalize:!1,offsetInBytes:0,strideInBytes:0}),d&&(B=B.concat(C));var N=new c$13({context:r,attributes:B}),G={depthTest:{enabled:!0}};e._opaquePass===Le$q.CESIUM_3D_TILE&&(G.stencilTest=u$M.setCesium3DTileBit(),G.stencilMask=u$M.CESIUM_3D_TILE_MASK),e._opaqueRenderState=d$1m.fromCache(G),e._translucentRenderState=d$1m.fromCache({depthTest:{enabled:!0},depthMask:!1,blending:Ee$r.ALPHA_BLEND}),e._drawCommand=new i$$({boundingVolume:new i$1d,cull:e._cull,modelMatrix:new p$1d,primitiveType:W$18.POINTS,vertexArray:N,count:a,shaderProgram:void 0,uniformMap:void 0,renderState:v?e._translucentRenderState:e._opaqueRenderState,pass:v?Le$q.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function nr$3(e,t){var i=t.context,n=e._isQuantized,r=e._isQuantizedDraco,o=e._isOctEncodedDraco,a={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){var n=er$4;if(n.x=e._attenuation?e.maximumAttenuation:e._pointSize,n.x*=t.pixelRatio,n.y=e.time,e._attenuation){var r,o=t.camera.frustum;r=t.mode===C$14.SCENE2D||o instanceof a$V?Number.POSITIVE_INFINITY:i.drawingBufferHeight/t.camera.frustum.sseDenominator,n.z=e.geometricError*e.geometricErrorScale,n.w=r}return n},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){var t=e.clippingPlanes;return e.isClipped?t.texture:i.defaultTexture},u_clippingPlanesEdgeStyle:function(){var t=e.clippingPlanes;if(!e$2e(t))return e$1X.TRANSPARENT;var i=e$1X.clone(t.edgeColor,tr$3);return i.alpha=t.edgeWidth,i},u_clippingPlanesMatrix:function(){var t=e.clippingPlanes;if(!e$2e(t))return p$1d.IDENTITY;var n=u$Z(e.clippingPlanesOriginMatrix,e._modelMatrix);return p$1d.multiply(i.uniformState.view3D,n,ue$g),p$1d.multiply(ue$g,t.modelMatrix,ue$g)}};(n||r||o)&&(a=p$19(a,{u_quantizedVolumeScaleAndOctEncodedRange:function(){var t=rr$5;if(e$2e(e._quantizedVolumeScale)){var i=o$1p.clone(e._quantizedVolumeScale,t);o$1p.divideByScalar(i,e._quantizedRange,t)}return t.w=e._octEncodedRange,t}})),e$2e(e._uniformMapLoaded)&&(a=e._uniformMapLoaded(a)),e._drawCommand.uniformMap=a}var ve$d=["POSITION","COLOR","NORMAL","POSITION_ABSOLUTE"];function ge$c(e,t){for(var i=/czm_tiles3d_style_(\w+)/g,n=i.exec(e);null!==n;){var r=n[1];-1===t.indexOf(r)&&t.push(r),n=i.exec(e)}}function pe$i(e,t){for(var i=e.numberOfAttributes,n=0;n<i;++n){var r=e.getAttribute(n);if(r.index===t)return r}}function ye$a(e){for(var t=ve$d.length,i=0;i<t;++i){var n=ve$d[i],r="czm_tiles3d_style_"+n,o=n.toLowerCase();e=e.replace(new RegExp(r+"(\\W)","g"),o+"$1")}return e.replace("()","(vec3 position, vec3 position_absolute, vec4 color, vec3 normal)")}function or$2(e,t,i){var n,r,o,a,s,l,u=t.context,c=e$2e(i),h=e._isQuantized,d=e._isQuantizedDraco,f=e._isOctEncoded16P,p=e._isOctEncodedDraco,_=e._isRGB565,m=e._isTranslucent,g=e._hasColors,x=e._hasNormals,y=e._hasBatchIds,v=e._backFaceCulling,$=e._normalShading,b=e._drawCommand.vertexArray,T=e.clippingPlanes,C=e._attenuation,S=m;if(c){var w={translucent:!1};a=i.getColorShaderFunction("getColorFromStyle","czm_tiles3d_style_",w),s=i.getShowShaderFunction("getShowFromStyle","czm_tiles3d_style_",w),l=i.getPointSizeShaderFunction("getPointSizeFromStyle","czm_tiles3d_style_",w),e$2e(a)&&w.translucent&&(S=!0)}e._styleTranslucent=S;var E=e$2e(a),P=e$2e(s),A=e$2e(l),L=e.isClipped,M=[];E&&(ge$c(a,M),a=ye$a(a)),P&&(ge$c(s,M),s=ye$a(s)),A&&(ge$c(l,M),l=ye$a(l));var R=M.indexOf("COLOR")>=0,O=M.indexOf("NORMAL")>=0,D=M.filter((function(e){return-1===ve$d.indexOf(e)}));if(O&&!x)throw new t$13("Style references the NORMAL semantic but the point cloud does not have normals");var I=e._styleableShaderAttributes;for(r in I)if(I.hasOwnProperty(r)){o=I[r];var B=D.indexOf(r)>=0;pe$i(b,o.location).enabled=B}var F=g&&(!E||R);g&&(pe$i(b,fe$f).enabled=F);var N=x&&($||v||O);x&&(pe$i(b,_e$b).enabled=N);var G={a_position:Be$d};F&&(G.a_color=fe$f),N&&(G.a_normal=_e$b),y&&(G.a_batchId=ze$b);var z="",U=D.length;for(n=0;n<U;++n){if(!e$2e(o=I[r=D[n]]))throw new t$13('Style references a property "'+r+'" that does not exist or is not styleable.');var V=o.componentCount,k="czm_tiles3d_style_"+r;z+="attribute "+(1===V?"float":"vec"+V)+" "+k+"; \n",G[k]=o.location}nr$3(e,t);var W="attribute vec3 a_position; \nvarying vec4 v_color; \nuniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier; \nuniform vec4 u_constantColor; \nuniform vec4 u_highlightColor; \n";W+="float u_pointSize; \nfloat u_time; \n",C&&(W+="float u_geometricError; \nfloat u_depthMultiplier; \n"),W+=z,F&&(W+=m?"attribute vec4 a_color; \n":_?"attribute float a_color; \nconst float SHIFT_RIGHT_11 = 1.0 / 2048.0; \nconst float SHIFT_RIGHT_5 = 1.0 / 32.0; \nconst float SHIFT_LEFT_11 = 2048.0; \nconst float SHIFT_LEFT_5 = 32.0; \nconst float NORMALIZE_6 = 1.0 / 64.0; \nconst float NORMALIZE_5 = 1.0 / 32.0; \n":"attribute vec3 a_color; \n"),N&&(W+=f||p?"attribute vec2 a_normal; \n":"attribute vec3 a_normal; \n"),y&&(W+="attribute float a_batchId; \n"),(h||d||p)&&(W+="uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange; \n"),E&&(W+=a),P&&(W+=s),A&&(W+=l),W+="void main() \n{ \n u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x; \n u_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y; \n",C&&(W+=" u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z; \n u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w; \n"),W+=F?m?" vec4 color = a_color; \n":_?" float compressed = a_color; \n float r = floor(compressed * SHIFT_RIGHT_11); \n compressed -= r * SHIFT_LEFT_11; \n float g = floor(compressed * SHIFT_RIGHT_5); \n compressed -= g * SHIFT_LEFT_5; \n float b = compressed; \n vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5); \n vec4 color = vec4(rgb, 1.0); \n":" vec4 color = vec4(a_color, 1.0); \n":" vec4 color = u_constantColor; \n",W+=h||d?" vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz; \n":" vec3 position = a_position; \n",W+=" vec3 position_absolute = vec3(czm_model * vec4(position, 1.0)); \n",N?(W+=f?" vec3 normal = czm_octDecode(a_normal); \n":p?" vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy; \n":" vec3 normal = a_normal; \n",W+=" vec3 normalEC = czm_normal * normal; \n"):W+=" vec3 normal = vec3(1.0); \n",E&&(W+=" color = getColorFromStyle(position, position_absolute, color, normal); \n"),P&&(W+=" float show = float(getShowFromStyle(position, position_absolute, color, normal)); \n"),W+=A?" gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio; \n":C?" vec4 positionEC = czm_modelView * vec4(position, 1.0); \n float depth = -positionEC.z; \n gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize); \n":" gl_PointSize = u_pointSize; \n",W+=" color = color * u_highlightColor; \n",N&&$&&(W+=" float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); \n diffuseStrength = max(diffuseStrength, 0.4); \n color.xyz *= diffuseStrength * czm_lightColor; \n"),W+=" v_color = color; \n gl_Position = czm_modelViewProjection * vec4(position, 1.0); \n",N&&v&&(W+=" float visible = step(-normalEC.z, 0.0); \n gl_Position *= visible; \n gl_PointSize *= visible; \n"),P&&(W+=" gl_Position.w *= float(show); \n gl_PointSize *= float(show); \n"),W+="} \n";var H="varying vec4 v_color; \n";L&&(H+="uniform sampler2D u_clippingPlanes; \nuniform mat4 u_clippingPlanesMatrix; \nuniform vec4 u_clippingPlanesEdgeStyle; \n",H+="\n",H+=f$H(T,u),H+="\n"),H+="void main() \n{ \n gl_FragColor = czm_gammaCorrect(v_color); \n",L&&(H+=p$x("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),H+="} \n",e$2e(e._vertexShaderLoaded)&&(W=e._vertexShaderLoaded(W)),e$2e(e._fragmentShaderLoaded)&&(H=e._fragmentShaderLoaded(H));var q=e._drawCommand;e$2e(q.shaderProgram)&&q.shaderProgram.destroy(),q.shaderProgram=r$14.fromCache({context:u,vertexShaderSource:W,fragmentShaderSource:H,attributeLocations:G});try{q.shaderProgram._bind()}catch{throw new t$13("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function sr$3(e,t){if(e._decodingState===K$u.READY)return!1;if(e._decodingState===K$u.NEEDS_DECODE){var i=e._parsedContent,n=i.draco,r=r$A.decodePointCloud(n,t);e$2e(r)&&(e._decodingState=K$u.DECODING,r.then((function(t){e._decodingState=K$u.READY;var r=e$2e(t.POSITION)?t.POSITION.array:void 0,o=e$2e(t.RGB)?t.RGB.array:void 0,a=e$2e(t.RGBA)?t.RGBA.array:void 0,s=e$2e(t.NORMAL)?t.NORMAL.array:void 0,l=e$2e(t.BATCH_ID)?t.BATCH_ID.array:void 0,u=e$2e(r)&&e$2e(t.POSITION.data.quantization),c=e$2e(s)&&e$2e(t.NORMAL.data.quantization);if(u){var h=t.POSITION.data.quantization,d=h.range;e._quantizedVolumeScale=o$1p.fromElements(d,d,d),e._quantizedVolumeOffset=o$1p.unpack(h.minValues),e._quantizedRange=(1<<h.quantizationBits)-1,e._isQuantizedDraco=!0}c&&(e._octEncodedRange=(1<<t.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);var f=i.styleableProperties,p=n.batchTableProperties;for(var _ in p)if(p.hasOwnProperty(_)){var m=t[_];e$2e(f)||(f={}),f[_]={typedArray:m.array,componentCount:m.data.componentsPerAttribute}}i.positions=u$Z(r,i.positions),i.colors=u$Z(u$Z(a,o),i.colors),i.normals=u$Z(s,i.normals),i.batchIds=u$Z(l,i.batchIds),i.styleableProperties=f})).otherwise((function(t){e._decodingState=K$u.FAILED,e._readyPromise.reject(t)})))}return!0}var cr$2=new e$2c,lr$3=new o$1p;function a$u(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._pickId=void 0,this._batchTable=void 0,this._styleDirty=!1,this._features=void 0,this.featurePropertiesDirty=!1,this._pointCloud=new ie$g({arrayBuffer:n,byteOffset:r,cull:!1,opaquePass:Le$q.CESIUM_3D_TILE,vertexShaderLoaded:v$v(this),fragmentShaderLoaded:P$v(this),uniformMapLoaded:k$t(this),batchTableLoaded:x$C(this),pickIdLoaded:E$A(this)})}function v$v(e){return function(t){return e$2e(e._batchTable)?e._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(t):t}}function P$v(e){return function(t){return e$2e(e._batchTable)?e._batchTable.getFragmentShaderCallback(!1,void 0)(t):"uniform vec4 czm_pickColor;\n"+t}}function k$t(e){return function(t){return e$2e(e._batchTable)?e._batchTable.getUniformMapCallback()(t):p$19(t,{czm_pickColor:function(){return e._pickId.color}})}}function x$C(e){return function(t,i,n){e._batchTable=new h$D(e,t,i,n)}}function E$A(e){return function(){return e$2e(e._batchTable)?e._batchTable.getPickId():"czm_pickColor"}}function I$I(e){var t=e._tileset.pointCloudShading,i=e._tile.contentBoundingVolume.boundingSphere.volume(),n=e$2d.cbrt(i/e.pointsLength),r=e._tile.geometricError;return 0===r&&(r=e$2e(t)&&e$2e(t.baseResolution)?t.baseResolution:n),r}function B$t(e){var t=e.featuresLength;if(!e$2e(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new e$M(e,n);e._features=i}}ie$g.prototype.update=function(e){if(!sr$3(this,e.context)){var t=!1,i=!p$1d.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,i=!0),e$2e(this._drawCommand)||(ir$4(this,e),i=!0,t=!0,this._ready=!0,this._readyPromise.resolve(this),this._parsedContent=void 0),i){p$1d.clone(this.modelMatrix,this._modelMatrix);var n=this._drawCommand.modelMatrix;if(p$1d.clone(this._modelMatrix,n),e$2e(this._rtcCenter)&&p$1d.multiplyByTranslation(n,this._rtcCenter,n),e$2e(this._quantizedVolumeOffset)&&p$1d.multiplyByTranslation(n,this._quantizedVolumeOffset,n),e.mode!==C$14.SCENE3D){var r=e.mapProjection,o=p$1d.getColumn(n,3,cr$2);e$2c.equals(o,e$2c.UNIT_W)||m$19.basisTo2D(r,n,n)}var a=this._drawCommand.boundingVolume;if(i$1d.clone(this._boundingSphere,a),this._cull){var s=a.center;p$1d.multiplyByPoint(n,s,s);var l=p$1d.getScale(n,lr$3);a.radius*=o$1p.maximumComponent(l)}}this.clippingPlanesDirty&&(this.clippingPlanesDirty=!1,t=!0),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,t=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,t=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,t=!0),(this._style!==this.style||this.styleDirty)&&(this._style=this.style,this.styleDirty=!1,t=!0),t&&or$2(this,e,this._style),this._drawCommand.castShadows=W$X.castShadows(this.shadows),this._drawCommand.receiveShadows=W$X.receiveShadows(this.shadows);var u=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=u?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=u?Le$q.TRANSLUCENT:this._opaquePass;var c=e.commandList,h=e.passes;(h.render||h.pick)&&c.push(this._drawCommand)}},ie$g.prototype.isDestroyed=function(){return!1},ie$g.prototype.destroy=function(){var e=this._drawCommand;return e$2e(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),i$11(this)},Object.defineProperties(a$u.prototype,{featuresLength:{get:function(){return e$2e(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return this._pointCloud.pointsLength}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return this._pointCloud.geometryByteLength}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return e$2e(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._pointCloud.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}}),a$u.prototype.hasProperty=function(e,t){return!!e$2e(this._batchTable)&&this._batchTable.hasProperty(e,t)},a$u.prototype.getFeature=function(e){if(e$2e(this._batchTable)){var t=this.featuresLength;if(!e$2e(e)||e<0||e>=t)throw new t$15("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return B$t(this),this._features[e]}},a$u.prototype.applyDebugSettings=function(e,t){this._pointCloud.color=e?t:e$1X.WHITE},a$u.prototype.applyStyle=function(e){e$2e(this._batchTable)?this._batchTable.applyStyle(e):this._styleDirty=!0};var w$t=new o$Z;function t$s(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._readyPromise=o$1l.defer(),this.featurePropertiesDirty=!1,c$u(this,n,r)}function c$u(e,t,i){i=u$Z(i,0);var n,r=a$K(new Uint8Array(t),i);try{n=JSON.parse(r)}catch{return void e._readyPromise.reject(new t$13("Invalid tile content."))}e._tileset.loadTileset(e._resource,n,e._tile),e._readyPromise.resolve(e)}function i$B(e,t,i,n,r){return function(){var o=document.createElement("canvas"),a=r+2*n;o.height=o.width=a;var s=o.getContext("2d");return s.clearRect(0,0,a,a),0!==n&&(s.beginPath(),s.arc(a/2,a/2,a/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=i,s.fill(),e<1&&(s.save(),s.globalCompositeOperation="destination-out",s.beginPath(),s.arc(a/2,a/2,r/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle="black",s.fill(),s.restore())),s.beginPath(),s.arc(a/2,a/2,r/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=t,s.fill(),o}}function i$A(e,t,i,n,r){this._content=e,this._billboard=i,this._label=n,this._polyline=r,this._batchId=t,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),s$r(this)}a$u.prototype.update=function(e,t){var i,n=this._pointCloud,r=u$Z(e.pointCloudShading,w$t),o=this._tile,a=this._batchTable,s=t.mode,l=e.clippingPlanes;!e$2e(this._pickId)&&!e$2e(a)&&(this._pickId=t.context.createPickId({primitive:e,content:this})),e$2e(a)&&a.update(e,t),i=e$2e(o._contentBoundingVolume)?s===C$14.SCENE3D?o._contentBoundingVolume.boundingSphere:o._contentBoundingVolume2D.boundingSphere:s===C$14.SCENE3D?o._boundingVolume.boundingSphere:o._boundingVolume2D.boundingSphere;var u=this._styleDirty;this._styleDirty=!1,n.clippingPlanesOriginMatrix=e.clippingPlanesOriginMatrix,n.style=e$2e(a)?void 0:e.style,n.styleDirty=u,n.modelMatrix=o.computedTransform,n.time=e.timeSinceLoad,n.shadows=e.shadows,n.boundingSphere=i,n.clippingPlanes=l,n.isClipped=e$2e(l)&&l.enabled&&o._isClipped,n.clippingPlanesDirty=o.clippingPlanesDirty,n.attenuation=r.attenuation,n.backFaceCulling=r.backFaceCulling,n.normalShading=r.normalShading,n.geometricError=I$I(this),n.geometricErrorScale=r.geometricErrorScale,e$2e(r)&&e$2e(r.maximumAttenuation)?n.maximumAttenuation=r.maximumAttenuation:o.refine===f$E.ADD?n.maximumAttenuation=5:n.maximumAttenuation=e.maximumScreenSpaceError,n.update(t)},a$u.prototype.isDestroyed=function(){return!1},a$u.prototype.destroy=function(){return this._pickId=this._pickId&&this._pickId.destroy(),this._pointCloud=this._pointCloud&&this._pointCloud.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$11(this)},Object.defineProperties(t$s.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}}),t$s.prototype.hasProperty=function(e,t){return!1},t$s.prototype.getFeature=function(e){},t$s.prototype.applyDebugSettings=function(e,t){},t$s.prototype.applyStyle=function(e){},t$s.prototype.update=function(e,t){},t$s.prototype.isDestroyed=function(){return!1},t$s.prototype.destroy=function(){return i$11(this)};var m$w=new a$18;function s$r(e){var t=e._billboard;if(e$2e(e._billboardImage)&&e._billboardImage!==t.image)t.image=e._billboardImage;else if(!e$2e(e._billboardImage)){var i=u$Z(e._color,i$A.defaultColor),n=u$Z(e._pointOutlineColor,i$A.defaultPointOutlineColor),r=u$Z(e._pointOutlineWidth,i$A.defaultPointOutlineWidth),o=u$Z(e._pointSize,i$A.defaultPointSize),a=e._billboardColor,s=e._billboardOutlineColor,l=e._billboardOutlineWidth,u=e._billboardSize;if(!e$1X.equals(i,a)||!e$1X.equals(n,s)||r!==l||o!==u){e._billboardColor=e$1X.clone(i,e._billboardColor),e._billboardOutlineColor=e$1X.clone(n,e._billboardOutlineColor),e._billboardOutlineWidth=r,e._billboardSize=o;var c=i.alpha,h=i.toCssColorString(),d=n.toCssColorString(),f=JSON.stringify([h,o,d,r]);t.setImage(f,i$B(c,h,d,r,o))}}}function b$G(e){this._positions=e.positions,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._rectangle=e.rectangle,this._minHeight=e.minimumHeight,this._maxHeight=e.maximumHeight,this._billboardCollection=void 0,this._labelCollection=void 0,this._polylineCollection=void 0,this._verticesPromise=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._resolvedPromise=!1}function G$A(e,t){var i=e._rectangle,n=e._minHeight,r=e._maxHeight,o=2+h$18.packedLength+t$12.packedLength,a=new Float64Array(o),s=0;return a[s++]=n,a[s++]=r,h$18.pack(i,a,s),s+=h$18.packedLength,t$12.pack(t,a,s),a}Object.defineProperties(i$A.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=e$1X.clone(e,this._color),s$r(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,s$r(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=e$1X.clone(e,this._pointOutlineColor),s$r(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,s$r(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&e.alpha>0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){e$2e(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){var t=u$Z(this._heightOffset,0),i=this._content.tileset.ellipsoid,n=i.cartesianToCartographic(this._billboard.position,m$w);n.height=n.height-t+e;var r=i.cartographicToCartesian(n);this._billboard.position=r,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],r],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=e$1X.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){var t=this._billboardImage!==e;this._billboardImage=e,t&&s$r(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){var e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}}),i$A.defaultColor=e$1X.WHITE,i$A.defaultPointOutlineColor=e$1X.BLACK,i$A.defaultPointOutlineWidth=0,i$A.defaultPointSize=8,i$A.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},i$A.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},i$A.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},i$A.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},i$A.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},i$A.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},i$A.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},Object.defineProperties(b$G.prototype,{pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){return this._billboardCollection.textureAtlas.texture.sizeInBytes+this._labelCollection._textureAtlas.texture.sizeInBytes}},readyPromise:{get:function(){return this._readyPromise.promise}}});var q$y=new i$W("createVectorTilePoints"),J$s=new o$1p;function K$t(e,t){if(!e$2e(e._billboardCollection)){var i;if(!e$2e(e._verticesPromise)){i=e._positions;var n=e._packedBuffer;e$2e(n)||(i=e._positions=l$R(i),e._batchIds=l$R(e._batchIds),n=e._packedBuffer=G$A(e,t));var r=[i.buffer,n.buffer],o={positions:i.buffer,packedBuffer:n.buffer},a=e._verticesPromise=q$y.scheduleTask(o,r);if(!e$2e(a))return;a.then((function(t){e._positions=new Float64Array(t.positions),e._ready=!0}))}if(e._ready&&!e$2e(e._billboardCollection)){i=e._positions;var s=e._batchTable,l=e._batchIds,u=e._billboardCollection=new w$O({batchTable:s}),c=e._labelCollection=new g$W({batchTable:s}),h=e._polylineCollection=new J$T;h._useHighlightColor=!0;for(var d=i.length/3,f=0;f<d;++f){var p=l[f],_=o$1p.unpack(i,3*f,J$s),m=u.add();m.position=_,m._batchIndex=p;var g=c.add();g.text=" ",g.position=_,g._batchIndex=p,h.add().positions=[o$1p.clone(_),o$1p.clone(_)]}e._positions=void 0,e._packedBuffer=void 0}}}function M$x(e,t){for(var i=e._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.show=!0,o.pointSize=i$A.defaultPointSize,o.color=i$A.defaultColor,o.pointOutlineColor=i$A.defaultPointOutlineColor,o.pointOutlineWidth=i$A.defaultPointOutlineWidth,o.labelColor=e$1X.WHITE,o.labelOutlineColor=e$1X.WHITE,o.labelOutlineWidth=1,o.font="30px sans-serif",o.labelStyle=R$S.FILL,o.labelText=void 0,o.backgroundColor=new e$1X(.165,.165,.165,.8),o.backgroundPadding=new o$1o(7,5),o.backgroundEnabled=!1,o.scaleByDistance=void 0,o.translucencyByDistance=void 0,o.distanceDisplayCondition=void 0,o.heightOffset=0,o.anchorLineEnabled=!1,o.anchorLineColor=e$1X.WHITE,o.image=void 0,o.disableDepthTestDistance=0,o.horizontalOrigin=j$V.CENTER,o.verticalOrigin=S$Q.CENTER,o.labelHorizontalOrigin=j$V.RIGHT,o.labelVerticalOrigin=S$Q.BASELINE}}b$G.prototype.createFeatures=function(e,t){for(var i=this._billboardCollection,n=this._labelCollection,r=this._polylineCollection,o=this._batchIds,a=o.length,s=0;s<a;++s){var l=o[s],u=i.get(s),c=n.get(s),h=r.get(s);t[l]=new i$A(e,l,u,c,h)}},b$G.prototype.applyDebugSettings=function(e,t){e?(e$1X.clone(t,this._billboardCollection._highlightColor),e$1X.clone(t,this._labelCollection._highlightColor),e$1X.clone(t,this._polylineCollection._highlightColor)):(e$1X.clone(e$1X.WHITE,this._billboardCollection._highlightColor),e$1X.clone(e$1X.WHITE,this._labelCollection._highlightColor),e$1X.clone(e$1X.WHITE,this._polylineCollection._highlightColor))};var Q$v=new e$1X,U$v=new e$1X,X$r=new e$1X,Y$r=new e$1X,Z$u=new e$1X,$$u=new e$1X,g$F=new o$Y,C$A=new o$Y,k$s=new r$Z;function a$t(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=u$Z(e.center,o$1p.ZERO),this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._readyPromise=o$1l.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=_0x2b86ba.BOTH}function U$u(e){var t=new Float64Array(3+o$1p.packedLength+t$12.packedLength+h$18.packedLength),i=0;return t[i++]=e._indices.BYTES_PER_ELEMENT,t[i++]=e._minimumHeight,t[i++]=e._maximumHeight,o$1p.pack(e._center,t,i),i+=o$1p.packedLength,t$12.pack(e._ellipsoid,t,i),i+=t$12.packedLength,h$18.pack(e._rectangle,t,i),t}function F$y(e,t){for(var i=1,n=t[i++],r=e._boundingVolumes=new Array(n),o=0;o<n;++o)r[o]=y$Y.unpack(t,i),i+=y$Y.packedLength;for(var a=t[i++],s=e._batchedIndices=new Array(a),l=0;l<a;++l){var u=e$1X.unpack(t,i);i+=e$1X.packedLength;for(var c=t[i++],h=t[i++],d=t[i++],f=new Array(d),p=0;p<d;++p)f[p]=t[i++];s[l]=new c$x({color:u,offset:c,count:h,batchIds:f})}}b$G.prototype.applyStyle=function(e,t){if(e$2e(e))for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];if(e$2e(e.show)&&(o.show=e.show.evaluate(o)),e$2e(e.pointSize)&&(o.pointSize=e.pointSize.evaluate(o)),e$2e(e.color)&&(o.color=e.color.evaluateColor(o,Q$v)),e$2e(e.pointOutlineColor)&&(o.pointOutlineColor=e.pointOutlineColor.evaluateColor(o,U$v)),e$2e(e.pointOutlineWidth)&&(o.pointOutlineWidth=e.pointOutlineWidth.evaluate(o)),e$2e(e.labelColor)&&(o.labelColor=e.labelColor.evaluateColor(o,X$r)),e$2e(e.labelOutlineColor)&&(o.labelOutlineColor=e.labelOutlineColor.evaluateColor(o,Y$r)),e$2e(e.labelOutlineWidth)&&(o.labelOutlineWidth=e.labelOutlineWidth.evaluate(o)),e$2e(e.font)&&(o.font=e.font.evaluate(o)),e$2e(e.labelStyle)&&(o.labelStyle=e.labelStyle.evaluate(o)),e$2e(e.labelText)?o.labelText=e.labelText.evaluate(o):o.labelText=void 0,e$2e(e.backgroundColor)&&(o.backgroundColor=e.backgroundColor.evaluateColor(o,Z$u)),e$2e(e.backgroundPadding)&&(o.backgroundPadding=e.backgroundPadding.evaluate(o)),e$2e(e.backgroundEnabled)&&(o.backgroundEnabled=e.backgroundEnabled.evaluate(o)),e$2e(e.scaleByDistance)){var a=e.scaleByDistance.evaluate(o);g$F.near=a.x,g$F.nearValue=a.y,g$F.far=a.z,g$F.farValue=a.w,o.scaleByDistance=g$F}else o.scaleByDistance=void 0;if(e$2e(e.translucencyByDistance)){var s=e.translucencyByDistance.evaluate(o);C$A.near=s.x,C$A.nearValue=s.y,C$A.far=s.z,C$A.farValue=s.w,o.translucencyByDistance=C$A}else o.translucencyByDistance=void 0;if(e$2e(e.distanceDisplayCondition)){var l=e.distanceDisplayCondition.evaluate(o);k$s.near=l.x,k$s.far=l.y,o.distanceDisplayCondition=k$s}else o.distanceDisplayCondition=void 0;e$2e(e.heightOffset)&&(o.heightOffset=e.heightOffset.evaluate(o)),e$2e(e.anchorLineEnabled)&&(o.anchorLineEnabled=e.anchorLineEnabled.evaluate(o)),e$2e(e.anchorLineColor)&&(o.anchorLineColor=e.anchorLineColor.evaluateColor(o,$$u)),e$2e(e.image)?o.image=e.image.evaluate(o):o.image=void 0,e$2e(e.disableDepthTestDistance)&&(o.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(o)),e$2e(e.horizontalOrigin)&&(o.horizontalOrigin=e.horizontalOrigin.evaluate(o)),e$2e(e.verticalOrigin)&&(o.verticalOrigin=e.verticalOrigin.evaluate(o)),e$2e(e.labelHorizontalOrigin)&&(o.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(o)),e$2e(e.labelVerticalOrigin)&&(o.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(o))}else M$x(this,t)},b$G.prototype.update=function(e){K$t(this,e.mapProjection.ellipsoid),this._ready&&(this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e),this._resolvedPromise||(this._readyPromise.resolve(),this._resolvedPromise=!0))},b$G.prototype.isDestroyed=function(){return!1},b$G.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),i$11(this)},Object.defineProperties(a$t.prototype,{trianglesLength:{get:function(){return e$2e(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return e$2e(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}});var W$y=new i$W("createVectorTilePolygons"),z$w=new e$1X;function G$z(e){if(!e$2e(e._primitive)){if(!e$2e(e._verticesPromise)){var t=e._positions,i=e._counts,n=e._indexCounts,r=e._indices,o=e._transferrableBatchIds,a=e._batchTableColors,s=e._packedBuffer;if(!e$2e(a)){t=e._positions=l$R(e._positions),i=e._counts=l$R(e._counts),n=e._indexCounts=l$R(e._indexCounts),r=e._indices=l$R(e._indices),e._center=e._ellipsoid.cartographicToCartesian(h$18.center(e._rectangle)),o=e._transferrableBatchIds=new Uint32Array(e._batchIds),a=e._batchTableColors=new Uint32Array(o.length);for(var l=e._batchTable,u=a.length,c=0;c<u;++c){var h=l.getColor(c,z$w);a[c]=h.toRgba()}s=e._packedBuffer=U$u(e)}var d=[t.buffer,i.buffer,n.buffer,r.buffer,o.buffer,a.buffer,s.buffer],f={packedBuffer:s.buffer,positions:t.buffer,counts:i.buffer,indexCounts:n.buffer,indices:r.buffer,batchIds:o.buffer,batchTableColors:a.buffer},p=e._polygonMinimumHeights,_=e._polygonMaximumHeights;e$2e(p)&&e$2e(_)&&(p=l$R(p),_=l$R(_),d.push(p.buffer,_.buffer),f.minimumHeights=p,f.maximumHeights=_);var m=e._verticesPromise=W$y.scheduleTask(f,d);if(!e$2e(m))return;o$1l(m,(function(t){e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;var i=new Float64Array(t.packedBuffer),n=i[0];F$y(e,i),e._indices=2===ce$z.getSizeInBytes(n)?new Uint16Array(t.indices):new Uint32Array(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._batchedPositions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!e$2e(e._primitive)&&(e._primitive=new y$y({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}a$t.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},a$t.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},a$t.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},a$t.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},a$t.prototype.update=function(e){G$z(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},a$t.prototype.isDestroyed=function(){return!1},a$t.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$11(this)};var $$t="attribute vec4 currentPosition;\nattribute vec4 previousPosition;\nattribute vec4 nextPosition;\nattribute vec2 expandAndWidth;\nattribute float a_batchId;\nuniform mat4 u_modifiedModelView;\nvoid main()\n{\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = u_modifiedModelView * currentPosition;\nvec4 prev = u_modifiedModelView * previousPosition;\nvec4 next = u_modifiedModelView * nextPosition;\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth(czm_projection * p);\n#endif\n}\n";function h$C(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=e$1X.clone(e$1X.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._readyPromise=o$1l.defer(),this._verticesPromise=void 0}function re$n(e){var t=e._rectangle,i=e._minimumHeight,n=e._maximumHeight,r=e._ellipsoid,o=e._center,a=2+h$18.packedLength+t$12.packedLength+o$1p.packedLength,s=new Float64Array(a),l=0;return s[l++]=i,s[l++]=n,h$18.pack(t,s,l),l+=h$18.packedLength,t$12.pack(r,s,l),l+=t$12.packedLength,o$1p.pack(o,s,l),s}Object.defineProperties(h$C.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},readyPromise:{get:function(){return this._readyPromise.promise}}});var ae$f=new i$W("createVectorTilePolylines"),m$v={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function ne$i(e,t){if(!e$2e(e._va)){if(!e$2e(e._verticesPromise)){var i=e._positions,n=e._widths,r=e._counts,o=e._transferrableBatchIds,a=e._packedBuffer;e$2e(a)||(i=e._positions=l$R(i),n=e._widths=l$R(n),r=e._counts=l$R(r),o=e._transferrableBatchIds=l$R(e._batchIds),a=e._packedBuffer=re$n(e));var s=[i.buffer,n.buffer,r.buffer,o.buffer,a.buffer],l={positions:i.buffer,widths:n.buffer,counts:r.buffer,batchIds:o.buffer,packedBuffer:a.buffer},u=e._verticesPromise=ae$f.scheduleTask(l,s);if(!e$2e(u))return;o$1l(u,(function(t){e._currentPositions=new Float32Array(t.currentPositions),e._previousPositions=new Float32Array(t.previousPositions),e._nextPositions=new Float32Array(t.nextPositions),e._expandAndWidth=new Float32Array(t.expandAndWidth),e._vertexBatchIds=new Uint16Array(t.batchIds);var i=t.indexDatatype;e._indices=i===ce$z.UNSIGNED_SHORT?new Uint16Array(t.indices):new Uint32Array(t.indices),e._ready=!0}))}if(e._ready&&!e$2e(e._va)){var c=e._currentPositions,h=e._previousPositions,d=e._nextPositions,f=e._expandAndWidth,p=e._vertexBatchIds,_=e._indices,m=h.byteLength+c.byteLength+d.byteLength;m+=f.byteLength+p.byteLength+_.byteLength,e._trianglesLength=_.length/3,e._geometryByteLength=m;var g=t$X.createVertexBuffer({context:t,typedArray:h,usage:A$18.STATIC_DRAW}),x=t$X.createVertexBuffer({context:t,typedArray:c,usage:A$18.STATIC_DRAW}),y=t$X.createVertexBuffer({context:t,typedArray:d,usage:A$18.STATIC_DRAW}),v=t$X.createVertexBuffer({context:t,typedArray:f,usage:A$18.STATIC_DRAW}),$=t$X.createVertexBuffer({context:t,typedArray:p,usage:A$18.STATIC_DRAW}),b=t$X.createIndexBuffer({context:t,typedArray:_,usage:A$18.STATIC_DRAW,indexDatatype:2===_.BYTES_PER_ELEMENT?ce$z.UNSIGNED_SHORT:ce$z.UNSIGNED_INT}),T=[{index:m$v.previousPosition,vertexBuffer:g,componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{index:m$v.currentPosition,vertexBuffer:x,componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{index:m$v.nextPosition,vertexBuffer:y,componentDatatype:S$14.FLOAT,componentsPerAttribute:3},{index:m$v.expandAndWidth,vertexBuffer:v,componentDatatype:S$14.FLOAT,componentsPerAttribute:2},{index:m$v.a_batchId,vertexBuffer:$,componentDatatype:S$14.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new c$13({context:t,attributes:T,indexBuffer:b}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0,e._readyPromise.resolve()}}}var b$F=new p$1d,H$C=new o$1p;function oe$e(e,t){e$2e(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){var i=t.uniformState.view;return p$1d.clone(i,b$F),p$1d.multiplyByPoint(b$F,e._center,H$C),p$1d.setTranslation(b$F,H$C,b$F),b$F},u_highlightColor:function(){return e._highlightColor}})}function ie$f(e){if(!e$2e(e._rs)){e._rs=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:{enabled:!0,factor:-5,units:-5}})}}var de$d="uniform vec4 u_highlightColor; \nvoid main()\n{\n gl_FragColor = u_highlightColor;\n}\n";function fe$e(e,t){if(!e$2e(e._sp)){var i=e._batchTable,n=i.getVertexShaderCallback(!1,"a_batchId",void 0)($$t),r=i.getFragmentShaderCallback()(de$d,!1,void 0),o=new s$V({defines:["VECTOR_TILE",s$Z.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[Z$_,n]}),a=new s$V({defines:["VECTOR_TILE"],sources:[r]});e._sp=r$14.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:m$v})}}function ue$f(e,t){if(!e$2e(e._command)){var i=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new i$$({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:i,boundingVolume:e._boundingVolume,pass:Le$q.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}function se$d(e,t){for(var i=e._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.show=!0,o.color=e$1X.WHITE}}h$C.prototype.createFeatures=function(e,t){for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=i[r];t[o]=new e$M(e,o)}},h$C.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var he$d=new e$1X,ce$g=e$1X.WHITE,_e$a=!0;function y$v(e,t,i,n,r){this._tileset=e,this._tile=t,this._resource=i,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._contentReadyPromise=void 0,this._readyPromise=o$1l.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,vt$4(this,n,r)}function ft$4(e){return function(t,i){e$2e(e._polygons)&&e._polygons.updateCommands(t,i)}}function dt$6(e,t){var i,n,r,o,a=u$Z(e.POLYGONS_LENGTH,0),s=u$Z(e.POLYLINES_LENGTH,0),l=u$Z(e.POINTS_LENGTH,0);if(a>0&&e$2e(e.POLYGON_BATCH_IDS)){var u=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,u,a)}if(s>0&&e$2e(e.POLYLINE_BATCH_IDS)){var c=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,c,s)}if(l>0&&e$2e(e.POINT_BATCH_IDS)){var h=t.byteOffset+e.POINT_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,h,l)}var d=e$2e(i)||e$2e(n)||e$2e(r),f=a>0&&!e$2e(i)||s>0&&!e$2e(n)||l>0&&!e$2e(r);if(d&&f)throw new t$13("If one group of batch ids is defined, then all batch ids must be defined.");if(!e$2e(i)&&!e$2e(n)&&!e$2e(r)){var p=0;if(!e$2e(i)&&a>0)for(i=new Uint16Array(a),o=0;o<a;++o)i[o]=p++;if(!e$2e(n)&&s>0)for(n=new Uint16Array(s),o=0;o<s;++o)n[o]=p++;if(!e$2e(r)&&l>0)for(r=new Uint16Array(l),o=0;o<l;++o)r[o]=p++}return{polygons:i,polylines:n,points:r}}h$C.prototype.applyStyle=function(e,t){if(e$2e(e))for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var o=t[i[r]];o.color=e$2e(e.color)?e.color.evaluateColor(o,he$d):ce$g,o.show=e$2e(e.show)?e.show.evaluate(o):_e$a}else se$d(this,t)},h$C.prototype.update=function(e){var t=e.context;if(ne$i(this,t),oe$e(this,t),fe$e(this,t),ie$f(this),this._ready){var i=e.passes;(i.render||i.pick)&&ue$f(this,e)}},h$C.prototype.isDestroyed=function(){return!1},h$C.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),i$11(this)},Object.defineProperties(y$v.prototype,{featuresLength:{get:function(){return e$2e(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return e$2e(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){var e=0;return e$2e(this._polygons)&&(e+=this._polygons.trianglesLength),e$2e(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){var e=0;return e$2e(this._polygons)&&(e+=this._polygons.geometryByteLength),e$2e(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return e$2e(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return e$2e(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var B$s=Uint16Array.BYTES_PER_ELEMENT,h$B=Uint32Array.BYTES_PER_ELEMENT;function vt$4(e,t,i){i=u$Z(i,0);var n=new Uint8Array(t),r=new DataView(t);i+=h$B;var o=r.getUint32(i,!0);if(1!==o)throw new t$13("Only Vector tile version 1 is supported. Version "+o+" is not.");i+=h$B;var a=r.getUint32(i,!0);if(i+=h$B,0!==a){var s=r.getUint32(i,!0);if(i+=h$B,0===s)throw new t$13("Feature table must have a byte length greater than zero");var l=r.getUint32(i,!0);i+=h$B;var u=r.getUint32(i,!0);i+=h$B;var c=r.getUint32(i,!0);i+=h$B;var h=r.getUint32(i,!0);i+=h$B;var d=r.getUint32(i,!0);i+=h$B;var f=r.getUint32(i,!0);i+=h$B;var p=r.getUint32(i,!0),_=a$K(n,i+=h$B,s),m=JSON.parse(_);i+=s;var g,x,y=new Uint8Array(t,i,l);if(i+=l,u>0){var v=a$K(n,i,u);g=JSON.parse(v),i+=u,c>0&&(x=new Uint8Array(t,i,c),x=new Uint8Array(x),i+=c)}var $=u$Z(m.POLYGONS_LENGTH,0),b=u$Z(m.POLYLINES_LENGTH,0),T=u$Z(m.POINTS_LENGTH,0),C=$+b+T,S=new h$D(e,C,g,x,ft$4(e));if(e._batchTable=S,0!==C){var w,E,P;if(!e$2e(m.REGION))throw new t$13("REGION is required in the feature table.");var A=m.REGION;w=h$18.unpack(A),E=A[4],P=A[5];var L,M=e._tile.computedTransform;e$2e(m.RTC_CENTER)?(L=o$1p.unpack(m.RTC_CENTER),p$1d.multiplyByPoint(M,L,L)):((L=h$18.center(w)).height=e$2d.lerp(E,P,.5),L=t$12.WGS84.cartographicToCartesian(L));var R=dt$6(m,y);if(i+=i%4,$>0){var O=new Uint32Array(t,i,h/h$B);i+=h;var D=new Uint16Array(t,i,d/B$s);i+=d;var I,B,F=y.byteOffset+m.POLYGON_COUNT.byteOffset,N=new Uint32Array(y.buffer,F,$),G=y.byteOffset+m.POLYGON_INDEX_COUNT.byteOffset,z=new Uint32Array(y.buffer,G,$);if(e$2e(m.POLYGON_MINIMUM_HEIGHTS)&&e$2e(m.POLYGON_MAXIMUM_HEIGHTS)){var U=y.byteOffset+m.POLYGON_MINIMUM_HEIGHTS.byteOffset;I=new Float32Array(y.buffer,U,$);var V=y.byteOffset+m.POLYGON_MAXIMUM_HEIGHTS.byteOffset;B=new Float32Array(y.buffer,V,$)}e._polygons=new a$t({positions:D,counts:N,indexCounts:z,indices:O,minimumHeight:E,maximumHeight:P,polygonMinimumHeights:I,polygonMaximumHeights:B,center:L,rectangle:w,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:S,batchIds:R.polygons,modelMatrix:M})}if(b>0){var k=new Uint16Array(t,i,f/B$s);i+=f;var W,H=y.byteOffset+m.POLYLINE_COUNT.byteOffset,q=new Uint32Array(y.buffer,H,b);if(e$2e(m.POLYLINE_WIDTHS)){var j=y.byteOffset+m.POLYLINE_WIDTHS.byteOffset;W=new Uint16Array(y.buffer,j,b)}else{W=new Uint16Array(b);for(var X=0;X<b;++X)W[X]=2}e._polylines=new h$C({positions:k,widths:W,counts:q,batchIds:R.polylines,minimumHeight:E,maximumHeight:P,center:L,rectangle:w,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:S})}if(T>0){var Y=new Uint16Array(t,i,p/B$s);e._points=new b$G({positions:Y,batchIds:R.points,minimumHeight:E,maximumHeight:P,rectangle:w,batchTable:S})}}}else e._readyPromise.resolve(e)}function k$r(e){var t=e.featuresLength;if(!e$2e(e._features)&&t>0){var i=new Array(t);e$2e(e._polygons)&&e._polygons.createFeatures(e,i),e$2e(e._polylines)&&e._polylines.createFeatures(e,i),e$2e(e._points)&&e._points.createFeatures(e,i),e._features=i}}function i$z(e,t,i,n,r){if(this._tileset=e,this._tile=t,this._resource=i,this._model=void 0,n.byteLength<12)throw new RuntimeError("Invalid glb content");const o=new DataView(n,r).getUint32(8,!0),a=new Uint8Array(n,r,o);this._model=new F$B({gltf:a,cull:!1,releaseGltfJson:!0,opaquePass:Le$q.CESIUM_3D_TILE,basePath:i,requestType:U$1f.TILES3D,modelMatrix:t.computedTransform,upAxis:e._gltfUpAxis,forwardAxis:v$y.X,shadows:e.shadows,debugWireframe:e.debugWireframe,incrementallyLoadTextures:!1,imageBasedLightingFactor:e.imageBasedLightingFactor,lightColor:e.lightColor,luminanceAtZenith:e.luminanceAtZenith,sphericalHarmonicCoefficients:e.sphericalHarmonicCoefficients,specularEnvironmentMaps:e.specularEnvironmentMaps,owner:e})}y$v.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},y$v.prototype.getFeature=function(e){var t=this.featuresLength;if(!e$2e(e)||e<0||e>=t)throw new t$15("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return k$r(this),this._features[e]},y$v.prototype.applyDebugSettings=function(e,t){e$2e(this._polygons)&&this._polygons.applyDebugSettings(e,t),e$2e(this._polylines)&&this._polylines.applyDebugSettings(e,t),e$2e(this._points)&&this._points.applyDebugSettings(e,t)},y$v.prototype.applyStyle=function(e){k$r(this),e$2e(this._polygons)&&this._polygons.applyStyle(e,this._features),e$2e(this._polylines)&&this._polylines.applyStyle(e,this._features),e$2e(this._points)&&this._points.applyStyle(e,this._features)},y$v.prototype.update=function(e,t){var i=!0;if(e$2e(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),i=i&&this._polygons._ready),e$2e(this._polylines)&&(this._polylines.update(t),i=i&&this._polylines._ready),e$2e(this._points)&&(this._points.update(t),i=i&&this._points._ready),e$2e(this._batchTable)&&i&&this._batchTable.update(e,t),!e$2e(this._contentReadyPromise)){var n=e$2e(this._points)?this._points.readyPromise:void 0,r=e$2e(this._polygons)?this._polygons.readyPromise:void 0,o=e$2e(this._polylines)?this._polylines.readyPromise:void 0,a=this;this._contentReadyPromise=o$1l.all([n,r,o]).then((function(){a._readyPromise.resolve(a)}))}},y$v.prototype.isDestroyed=function(){return!1},y$v.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),i$11(this)},Object.defineProperties(i$z.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return this._model.trianglesLength}},geometryByteLength:{get:function(){return this._model.geometryByteLength}},texturesByteLength:{get:function(){return this._model.texturesByteLength}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._model.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}}),i$z.prototype.update=function(e,t){this._model.shadows=this._tileset.shadows,this._model.imageBasedLightingFactor=this._tileset.imageBasedLightingFactor,this._model.lightColor=this._tileset.lightColor,this._model.luminanceAtZenith=this._tileset.luminanceAtZenith,this._model.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._model.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._model.debugWireframe=this._tileset.debugWireframe;var i=this._tileset.clippingPlanes;this._model.clippingPlanesOriginMatrix=this._tileset.clippingPlanesOriginMatrix,e$2e(i)&&this._tile.clippingPlanesDirty&&(this._model._clippingPlanes=i.enabled&&this._tile._isClipped?i:void 0),e$2e(i)&&e$2e(this._model._clippingPlanes)&&this._model._clippingPlanes!==i&&(this._model._clippingPlanes=i),this._model.update(t)},i$z.prototype.isDestroyed=function(){return!1},i$z.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),i$11(this)};var i$y={b3dm:function(e,t,i,n,r){return new n$p(e,t,i,n,r)},pnts:function(e,t,i,n,r){return new a$u(e,t,i,n,r)},i3dm:function(e,t,i,n,r){return new u$y(e,t,i,n,r)},cmpt:function(e,t,i,n,r){return new i$C(e,t,i,n,r,i$y)},json:function(e,t,i,n,r){return new t$s(e,t,i,n,r)},geom:function(e,t,i,n,r){return new p$w(e,t,i,n,r)},vctr:function(e,t,i,n,r){return new y$v(e,t,i,n,r)},glb:function(e,t,i,n,r){return new i$z(e,t,i,n,r)}},e$F={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5},X$q=Object.freeze(e$F),e$E={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0},s$q=Object.freeze(e$E);function f$D(){}var u$x={stack:new r$S,stackMaximumLength:0};function d$F(e){return e._visible&&e._inRequestVolume}function m$u(e){return e.hasEmptyContent||e.hasTilesetContent}function l$F(e){return!m$u(e)&&e.contentUnloaded}function T$w(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:(t.hasEmptyContent,!0))}function g$E(e,t,i,n){for(var r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];s.updateVisibility(n),d$F(s)&&i.push(s)}}function C$z(e,t){(l$F(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function _$s(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function b$E(e){++e.statistics.visited}function x$B(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==Ae$w.OUTSIDE&&e._selectedTiles.push(t)}function W$x(){}function g$D(e){return e._visible&&e._inRequestVolume}f$D.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e._hasMixedContent=!1;var i=!0,n=e.root;if(n.updateVisibility(t),!d$F(n))return i;var r=u$x.stack;for(r.push(e.root);r.length>0;){u$x.stackMaximumLength=Math.max(u$x.stackMaximumLength,r.length);var o=r.pop(),a=o.refine===f$E.ADD,s=o.refine===f$E.REPLACE,l=T$w(e,o);l&&g$E(e,o,r,t),(a||s&&!l)&&(C$z(e,o),_$s(e,o,t),x$B(e,o,t),!m$u(o)&&!o.contentAvailable&&(i=!1)),b$E(e)}return u$x.stack.trim(u$x.stackMaximumLength),i};var k$q={stack:new r$S,stackMaximumLength:0},E$z={stack:new r$S,stackMaximumLength:0},S$t={stack:new r$S,stackMaximumLength:0},d$E={stack:new r$S,stackMaximumLength:0,ancestorStack:new r$S,ancestorStackMaximumLength:0},H$B=2;function I$H(e,t,i){V$q(e,t,e._maximumScreenSpaceError,e._maximumScreenSpaceError,i)}function B$r(e,t,i){V$q(e,t,Number.MAX_VALUE,e._maximumScreenSpaceError,i),w$s(e,t,i)}function z$v(e,t,i){V$q(e,t,Math.max(e.baseScreenSpaceError,e.maximumScreenSpaceError),e.maximumScreenSpaceError,i),w$s(e,t,i)}function C$y(e){return e._skipLevelOfDetail}function Z$t(e,t){e._emptyTiles.push(t)}function b$D(e,t,i){if(t.contentVisibility(i)!==Ae$w.OUTSIDE){var n=t.content;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,t.lastStyleTime=0,e._selectedTilesToStyle.push(t)):t._selectedFrame<i.frameNumber-1&&e._selectedTilesToStyle.push(t),t._selectedFrame=i.frameNumber,e._selectedTiles.push(t)}}function X$p(e,t,i){var n=S$t.stack;for(n.push(t);n.length>0;){S$t.stackMaximumLength=Math.max(S$t.stackMaximumLength,n.length);for(var r=n.pop().children,o=r.length,a=0;a<o;++a){var s=r[a];g$D(s)&&(s.contentAvailable?(P$u(e,s,i),F$x(e,s,i),b$D(e,s,i)):s._depth-t._depth<H$B&&n.push(s))}}}function D$v(e,t,i){if(C$y(e)){var n=t.contentAvailable?t:t._ancestorWithContentAvailable;e$2e(n)?n._shouldSelect=!0:X$p(e,t,i)}else t.contentAvailable&&b$D(e,t,i)}function j$x(e,t,i){++e._statistics.visited,t._visitedFrame=i.frameNumber}function F$x(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function G$y(e,t){e._maximumPriority.distance=Math.max(t._priorityHolder._distanceToCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t._priorityHolder._distanceToCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t._depth,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t._depth,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t._priorityHolder._foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t._priorityHolder._foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.reverseScreenSpaceError=Math.max(t._priorityReverseScreenSpaceError,e._maximumPriority.reverseScreenSpaceError),e._minimumPriority.reverseScreenSpaceError=Math.min(t._priorityReverseScreenSpaceError,e._minimumPriority.reverseScreenSpaceError)}function J$r(e,t,i){if(!e._cullRequestsWhileMoving)return!0;var n=t.boundingSphere,r=Math.max(2*n.radius,1),o=i.camera,a=0!==o.positionWCDeltaMagnitude?o.positionWCDeltaMagnitude:o.positionWCDeltaMagnitudeLastFrame;return e.cullRequestsWhileMovingMultiplier*a/r<1}function x$A(e,t,i){if(t._requestedFrame!==i.frameNumber&&(q$x(t)||t.contentExpired)&&J$r(e,t,i)){var n=i.camera.timeSinceMoved<e.foveatedTimeDelay;t.priorityDeferred&&n||(t._requestedFrame=i.frameNumber,e._requestedTiles.push(t))}}function N$q(e,t,i){t._updatedVisibilityFrame!==e._updatedVisibilityFrame&&(t.updateVisibility(i),t._updatedVisibilityFrame=e._updatedVisibilityFrame)}function K$s(e,t,i){for(var n=!1,r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];N$q(e,s,i),n=n||g$D(s)}return n}function Q$u(e,t,i){var n=t.parent;return!(!e$2e(n)||n.hasTilesetContent||n.refine!==f$E.ADD)&&t.getScreenSpaceError(i,!0)<=e._maximumScreenSpaceError}function O$o(e,t,i){if(N$q(e,t,i),g$D(t)){var n=t.children.length>0;if(t.hasTilesetContent&&n){var r=t.children[0];return O$o(e,r,i),void(t._visible=r._visible)}if(Q$u(e,t,i))return void(t._visible=!1);var o=t.refine===f$E.REPLACE,a=t._optimChildrenWithinParent===s$q.USE_OPTIMIZATION;if(o&&a&&n&&!K$s(e,t,i))return++e._statistics.numberOfTilesCulledWithChildrenUnion,void(t._visible=!1)}}function P$u(e,t,i){O$o(e,t,i),t.updateExpiration(),t._wasMinPriorityChild=!1,t._priorityHolder=t,G$y(e,t),t._shouldSelect=!1,t._finalResolution=!0}function Y$q(e,t){e._ancestorWithContent=void 0,e._ancestorWithContentAvailable=void 0;var i=e.parent;if(e$2e(i)){var n=!q$x(i)||i._requestedFrame===t.frameNumber;e._ancestorWithContent=n?i:i._ancestorWithContent,e._ancestorWithContentAvailable=i.contentAvailable?i:i._ancestorWithContentAvailable}}function L$z(e){return e.hasEmptyContent||e.hasTilesetContent}function q$x(e){return!L$z(e)&&e.contentUnloaded}function $$s(e,t){var i=t._ancestorWithContent;return!e.immediatelyLoadDesiredLevelOfDetail&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf||e$2e(i)&&t._screenSpaceError<i._screenSpaceError/e.skipScreenSpaceErrorFactor&&t._depth>i._depth+e.skipLevels)}function rr$4(e,t){return 0===t._distanceToCamera&&0===e._distanceToCamera?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera}function ar$2(e,t,i,n){var r,o=t.refine===f$E.REPLACE,a=t.children,s=a.length;for(r=0;r<s;++r)P$u(e,a[r],n);a.sort(rr$4);var l,u=!C$y(e)&&o&&!L$z(t),c=!0,h=!1,d=-1,f=Number.MAX_VALUE;for(r=0;r<s;++r)if(g$D(l=a[r])?(i.push(l),l._foveatedFactor<f&&(d=r,f=l._foveatedFactor),h=!0):(u||e.loadSiblings)&&(l._foveatedFactor<f&&(d=r,f=l._foveatedFactor),x$A(e,l,n),F$x(e,l,n)),u){var p;p=!!l._inRequestVolume&&(L$z(l)?nr$2(e,l,n):l.contentAvailable),c=c&&p}if(h||(c=!1),-1!==d&&!C$y(e)&&o){var _=a[d];_._wasMinPriorityChild=!0;var m=(t._wasMinPriorityChild||t===e.root)&&f<=t._priorityHolder._foveatedFactor?t._priorityHolder:t;for(m._foveatedFactor=Math.min(_._foveatedFactor,m._foveatedFactor),m._distanceToCamera=Math.min(_._distanceToCamera,m._distanceToCamera),r=0;r<s;++r)(l=a[r])._priorityHolder=m}return c}function er$3(e,t,i){return!C$y(e)||!e.immediatelyLoadDesiredLevelOfDetail&&(!e$2e(t._ancestorWithContent)||(0===t._screenSpaceError?t.parent._screenSpaceError>i:t._screenSpaceError>i))}function A$E(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:t._screenSpaceError>e._maximumScreenSpaceError)}function V$q(e,t,i,n,r){var o=k$q.stack;for(o.push(t);o.length>0;){k$q.stackMaximumLength=Math.max(k$q.stackMaximumLength,o.length);var a=o.pop();Y$q(a,r);var s=er$3(e,a,i),l=a.refine===f$E.ADD,u=a.refine===f$E.REPLACE,c=a.parent,h=!e$2e(c)||c._refines,d=!1;A$E(e,a)&&(d=ar$2(e,a,o,r)&&h);var f=!d&&h;L$z(a)?(Z$t(e,a),x$A(e,a,r),f&&D$v(e,a,r)):l?(D$v(e,a,r),x$A(e,a,r)):u&&(s?(x$A(e,a,r),f&&D$v(e,a,r)):f?(D$v(e,a,r),x$A(e,a,r)):$$s(e,a)&&x$A(e,a,r)),j$x(e,a,r),F$x(e,a,r),a._refines=d}}function nr$2(e,t,i){var n=!0,r=E$z.stack;for(r.push(t);r.length>0;){E$z.stackMaximumLength=Math.max(E$z.stackMaximumLength,r.length);var o=r.pop(),a=o.children,s=a.length,l=L$z(o)&&A$E(e,o);if(!l&&!o.contentAvailable&&(n=!1),P$u(e,o,i),g$D(o)||(x$A(e,o,i),F$x(e,o,i)),l)for(var u=0;u<s;++u){var c=a[u];r.push(c)}}return n}function w$s(e,t,i){var n,r=d$E.stack,o=d$E.ancestorStack;for(r.push(t);r.length>0||o.length>0;){if(d$E.stackMaximumLength=Math.max(d$E.stackMaximumLength,r.length),d$E.ancestorStackMaximumLength=Math.max(d$E.ancestorStackMaximumLength,o.length),o.length>0){var a=o.peek();if(a._stackLength===r.length){o.pop(),a!==n&&(a._finalResolution=!1),b$D(e,a,i);continue}}var s=r.pop();if(e$2e(s)){var l=s.refine===f$E.ADD,u=s._shouldSelect,c=s.children,h=c.length,d=A$E(e,s);if(u)if(l)b$D(e,s,i);else{if(s._selectionDepth=o.length,s._selectionDepth>0&&(e._hasMixedContent=!0),n=s,!d){b$D(e,s,i);continue}o.push(s),s._stackLength=r.length}if(d)for(var f=0;f<h;++f){var p=c[f];g$D(p)&&r.push(p)}}}}W$x.selectTiles=function(e,t){if(e._requestedTiles.length=0,!e.debugFreezeFrame){e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e._hasMixedContent=!1;var i=e.root;if(P$u(e,i,t),g$D(i)&&!(i.getScreenSpaceError(t,!0)<=e._maximumScreenSpaceError)){C$y(e)?e.immediatelyLoadDesiredLevelOfDetail?B$r(e,i,t):z$v(e,i,t):I$H(e,i,t),k$q.stack.trim(k$q.stackMaximumLength),E$z.stack.trim(E$z.stackMaximumLength),S$t.stack.trim(S$t.stackMaximumLength),d$E.stack.trim(d$E.stackMaximumLength),d$E.ancestorStack.trim(d$E.ancestorStackMaximumLength);for(var n=e._requestedTiles,r=n.length,o=0;o<r;++o)n[o].updatePriority()}}};var e$D={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},r$y=new Array(e$D.NUMBER_OF_PASSES);r$y[e$D.RENDER]=Object.freeze({traversal:W$x,isRender:!0,requestTiles:!0,ignoreCommands:!1}),r$y[e$D.PICK]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!1,ignoreCommands:!1}),r$y[e$D.SHADOW]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!1}),r$y[e$D.PRELOAD]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$D.PRELOAD_FLIGHT]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$D.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({traversal:W$x,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$D.MOST_DETAILED_PRELOAD]=Object.freeze({traversal:f$D,isRender:!1,requestTiles:!0,ignoreCommands:!0}),r$y[e$D.MOST_DETAILED_PICK]=Object.freeze({traversal:f$D,isRender:!1,requestTiles:!1,ignoreCommands:!1}),e$D.getPassOptions=function(e){return r$y[e]};var ue$e=Object.freeze(e$D);function t$r(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}function t$q(e,t){0===t&&(t=e$2d.EPSILON7),this._boundingSphere=new i$1d(e,t)}Object.defineProperties(t$r.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},batchTable:{get:function(){}}}),t$r.prototype.hasProperty=function(e,t){return!1},t$r.prototype.getFeature=function(e){},t$r.prototype.applyDebugSettings=function(e,t){},t$r.prototype.applyStyle=function(e){},t$r.prototype.update=function(e,t){},t$r.prototype.isDestroyed=function(){return!1},t$r.prototype.destroy=function(){return i$11(this)},Object.defineProperties(t$q.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}}),t$q.prototype.distanceToCamera=function(e){o$1q.defined("frameState",e);var t=this._boundingSphere;return Math.max(0,o$1p.distance(t.center,e.camera.positionWC)-t.radius)},t$q.prototype.intersectPlane=function(e){return o$1q.defined("plane",e),i$1d.intersectPlane(this._boundingSphere,e)},t$q.prototype.update=function(e,t){o$1p.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t},t$q.prototype.createDebugVolume=function(e){return o$1q.defined("color",e),new y$R({geometryInstances:new d$1o({geometry:new a$U({radius:this.radius}),id:"outline",modelMatrix:p$1d.fromTranslation(this.center,new p$1d.clone(p$1d.IDENTITY)),attributes:{color:o$16.fromColor(e)}}),appearance:new t$Q({translucent:!1,flat:!0}),asynchronous:!1})};var b$C=new o$1p,h$A=new o$1p,I$G=new o$1p,S$s=new o$1p;function u$w(e,t,i){i=o$1p.cross(e,t,i);var n=o$1p.magnitude(i);return o$1p.multiplyByScalar(i,e$2d.EPSILON7/n,i)}function g$C(e,t){var i=o$1p.normalize(e,S$s);return u$w(e,o$1p.equalsEpsilon(i,o$1p.UNIT_X,e$2d.EPSILON6)?o$1p.UNIT_Y:o$1p.UNIT_X,t)}function B$q(e){var t=p$1e.getColumn(e,0,b$C),i=p$1e.getColumn(e,1,h$A),n=p$1e.getColumn(e,2,I$G),r=o$1p.equals(t,o$1p.ZERO),o=o$1p.equals(i,o$1p.ZERO),a=o$1p.equals(n,o$1p.ZERO);return r||o||a?r&&o&&a?(e[0]=e$2d.EPSILON7,e[4]=e$2d.EPSILON7,e[8]=e$2d.EPSILON7,e):(!r||o||a?r||!o||a?r||o||!a?r?o?a||(i=u$w(n,t=g$C(n,t),i)):n=u$w(i,t=g$C(i,t),n):n=u$w(i=g$C(t,i),t,n):n=u$w(i,t,n):i=u$w(t,n,i):t=u$w(i,n,t),p$1e.setColumn(e,0,t,e),p$1e.setColumn(e,1,i,e),p$1e.setColumn(e,2,n,e),e):e}function c$t(e,t){t=B$q(t),this._orientedBoundingBox=new y$Y(e,t),this._boundingSphere=i$1d.fromOrientedBoundingBox(this._orientedBoundingBox)}function c$s(e,t,i,n){this._tileset=e,this._header=i;var r=i.content;this.transform=e$2e(i.transform)?p$1d.unpack(i.transform):p$1d.clone(p$1d.IDENTITY);var o,a,s,l,u,c,h,d,f=e$2e(n)?n.computedTransform:e.modelMatrix,p=p$1d.multiply(f,this.transform,new p$1d),_=e$2e(n)?n._initialTransform:p$1d.IDENTITY;if(this._initialTransform=p$1d.multiply(_,this.transform,new p$1d),this.computedTransform=p,this._boundingVolume=this.createBoundingVolume(i.boundingVolume,p),this._boundingVolume2D=void 0,e$2e(r)&&e$2e(r.boundingVolume)&&(o=this.createBoundingVolume(r.boundingVolume,p)),this._contentBoundingVolume=o,this._contentBoundingVolume2D=void 0,e$2e(i.viewerRequestVolume)&&(a=this.createBoundingVolume(i.viewerRequestVolume,p)),this._viewerRequestVolume=a,this.geometricError=i.geometricError,this._geometricError=i.geometricError,e$2e(this._geometricError)||(this._geometricError=e$2e(n)?n.geometricError:e._geometricError,c$s._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale(),e$2e(i.refine)?(("replace"===i.refine||"add"===i.refine)&&c$s._deprecationWarning("lowercase-refine",'This tile uses a lowercase refine "'+i.refine+'". Instead use "'+i.refine.toUpperCase()+'".'),s="REPLACE"===i.refine.toUpperCase()?f$E.REPLACE:f$E.ADD):s=e$2e(n)?n.refine:f$E.REPLACE,this.refine=s,this.children=[],this.parent=n,t=t$10.createIfNeeded(t),e$2e(r)){var m=r.uri;e$2e(r.url)&&(c$s._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),m=r.url),u=!1,c=X$q.UNLOADED,(h=e.isSuperMapiServer?-1!==m.indexOf(".json")?-1===t.url.indexOf("/data/path")?t.getDerivedResource({url:"./data/path/"+m}):t.getDerivedResource({url:m}):-1===t.url.indexOf("/data/path")&&-1!==m.indexOf(".b3dm")?t.getDerivedResource({url:"./data/path/"+m}):t.getDerivedResource({url:m}):t.getDerivedResource({url:m})).url=h.url.replace(/\+/g,"%2B"),d=r$1b.getServerKey(h.getUrlComponent())}else l=new t$r(e,this),u=!0,c=X$q.READY;this._content=l,this._contentResource=h,this._contentState=c,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this._expiredContent=void 0,this._serverKey=d,this.hasEmptyContent=u,this.hasTilesetContent=!1,this.cacheNode=void 0;var g,x,y=i.expire;e$2e(y)&&(g=y.duration,e$2e(y.date)&&(x=a$15.fromIso8601(y.date))),this.expireDuration=g,this.expireDate=x,this.lastStyleTime=0,this._optimChildrenWithinParent=s$q.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.priorityDeferred=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._clippingPlanesState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=e$1X.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,this._priorityHolder=this,this._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new a$15,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}Object.defineProperties(c$t.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}}),c$t.prototype.distanceToCamera=function(e){return o$1q.defined("frameState",e),Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))},c$t.prototype.intersectPlane=function(e){return o$1q.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)},c$t.prototype.update=function(e,t){o$1p.clone(e,this._orientedBoundingBox.center),t=B$q(t),p$1e.clone(t,this._orientedBoundingBox.halfAxes),i$1d.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)},c$t.prototype.createDebugVolume=function(e){return o$1q.defined("color",e),new y$R({geometryInstances:new d$1o({geometry:new o$17({minimum:new o$1p(-1,-1,-1),maximum:new o$1p(1,1,1)}),id:"outline",modelMatrix:p$1d.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),attributes:{color:o$16.fromColor(e)}}),appearance:new t$Q({translucent:!1,flat:!0}),asynchronous:!1})},c$s._deprecationWarning=t$11,Object.defineProperties(c$s.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return u$Z(this._contentBoundingVolume,this._boundingVolume)}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},extras:{get:function(){return this._header.extras}},color:{get:function(){return e$2e(this._color)||(this._color=new e$1X),e$1X.clone(this._color)},set:function(e){this._color=e$1X.clone(e,this._color),this._colorDirty=!0}},contentAvailable:{get:function(){return this.contentReady&&!this.hasEmptyContent&&!this.hasTilesetContent||e$2e(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===X$q.READY}},contentUnloaded:{get:function(){return this._contentState===X$q.UNLOADED}},contentExpired:{get:function(){return this._contentState===X$q.EXPIRED}},contentFailed:{get:function(){return this._contentState===X$q.FAILED}},contentReadyToProcessPromise:{get:function(){if(e$2e(this._contentReadyToProcessPromise))return this._contentReadyToProcessPromise.promise}},contentReadyPromise:{get:function(){if(e$2e(this._contentReadyPromise))return this._contentReadyPromise.promise}},commandsLength:{get:function(){return this._commandsLength}}});var P$t=new o$1p;function Ce$9(e,t){var i=e._tileset,n=t.camera,r=e.boundingSphere,o=r.radius,a=o$1p.multiplyByScalar(n.directionWC,e._centerZDepth,P$t),s=o$1p.add(n.positionWC,a,P$t),l=o$1p.subtract(s,r.center,P$t);if(o$1p.magnitude(l)>o){var u=o$1p.normalize(l,P$t),c=o$1p.multiplyByScalar(u,o,P$t),h=o$1p.add(r.center,c,P$t),d=o$1p.subtract(h,n.positionWC,P$t),f=o$1p.normalize(d,P$t);e._foveatedFactor=1-Math.abs(o$1p.dot(n.directionWC,f))}else e._foveatedFactor=0;var p=e.refine===f$E.REPLACE,_=i._skipLevelOfDetail;if(p&&!_||!i.foveatedScreenSpaceError||1===i.foveatedConeSize||e._priorityProgressiveResolution&&p&&_||i._pass===ue$e.PRELOAD_FLIGHT||i._pass===ue$e.PRELOAD)return!1;var m=1-Math.cos(.5*n.frustum.fov),g=i.foveatedConeSize*m;if(e._foveatedFactor<=g)return!1;var x=m-g,y=e$2d.clamp((e._foveatedFactor-g)/x,0,1),v=i.foveatedInterpolationCallback(i.foveatedMinimumScreenSpaceErrorRelaxation,i.maximumScreenSpaceError,y),$=0===e._screenSpaceError&&e$2e(e.parent)?.5*e.parent._screenSpaceError:e._screenSpaceError;return i.maximumScreenSpaceError-v<=$}var X$o=new a$15;function Ee$b(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;var i=t._screenSpaceErrorProgressiveResolution>e._maximumScreenSpaceError;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;var n=t.parent,r=e._maximumScreenSpaceError,o=t._screenSpaceErrorProgressiveResolution<=r,a=e$2e(n)&&n._screenSpaceErrorProgressiveResolution>r;return o&&a&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}function be$d(e,t){var i=t.parent,n=e$2e(i)&&(!e._skipLevelOfDetail||0===t._screenSpaceError||i.hasTilesetContent)?i._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-n}function De$d(e){if(e$2e(e.expireDuration)){var t=a$15.now(X$o);a$15.addSeconds(t,e.expireDuration,t),e$2e(e.expireDate)?a$15.lessThan(e.expireDate,t)&&a$15.clone(t,e.expireDate):e.expireDate=a$15.clone(t)}}function Re$b(e,t){return function(i){e._contentState===X$q.PROCESSING?--t.statistics.numberOfTilesProcessing:--t.statistics.numberOfPendingRequests,e._contentState=X$q.FAILED,e._contentReadyPromise.reject(i),e._contentReadyToProcessPromise.reject(i)}}function Pe$a(e){return function(){return e._priority}}c$s.prototype.getScreenSpaceError=function(e,t,i){var n=this._tileset,r=u$Z(i,1),o=e$2e(this.parent)?this.parent.geometricError:n._geometricError,a=t?o:this.geometricError;if(0===a)return 0;var s,l=e.camera,u=l.frustum,c=e.context,h=c.drawingBufferWidth,d=c.drawingBufferHeight*r;if(e.mode===C$14.SCENE2D||u instanceof a$V){e$2e(u._offCenterFrustum)&&(u=u._offCenterFrustum),s=a/(Math.max(u.top-u.bottom,u.right-u.left)/Math.max(h,d))}else{var f=Math.max(this._distanceToCamera,e$2d.EPSILON7);if(s=a*d/(f*l.frustum.sseDenominator),n.dynamicScreenSpaceError){var p=n._dynamicScreenSpaceErrorComputedDensity,_=n.dynamicScreenSpaceErrorFactor;s-=e$2d.fog(f,p)*_}}return s/=e.pixelRatio},c$s.prototype.updateVisibility=function(e){var t=this.parent,i=this._tileset,n=e$2e(t)?t.computedTransform:i.modelMatrix,r=e$2e(t)?t._visibilityPlaneMask:i$X.MASK_INDETERMINATE;this.updateTransform(n),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,i.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,r),this._visible=this._visibilityPlaneMask!==i$X.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=be$d(i,this),this._priorityProgressiveResolution=Ee$b(i,this),this.priorityDeferred=Ce$9(this,e)},c$s.prototype.updateExpiration=function(){if(e$2e(this.expireDate)&&this.contentReady&&!this.hasEmptyContent){var e=a$15.now(X$o);a$15.lessThan(this.expireDate,e)&&(this._contentState=X$q.EXPIRED,this._expiredContent=this._content)}},c$s.prototype.requestContent=function(){var e=this,t=this._tileset;if(this.hasEmptyContent)return!1;var i=this._contentResource.clone(),n=this.contentExpired;n&&i.setQueryParameters({expired:this.expireDate.toString()});var r=new r$1c({throttle:!0,throttleByServer:!0,type:U$1f.TILES3D,priorityFunction:Pe$a(this),serverKey:this._serverKey});this._request=r,i.request=r;var o=i.fetchArrayBuffer();if(!e$2e(o))return!1;var a=this._contentState;this._contentState=X$q.LOADING,this._contentReadyToProcessPromise=o$1l.defer(),this._contentReadyPromise=o$1l.defer();var s=Re$b(this,t);return o.then((function(i){if(!e.isDestroyed()){var r=a$F(new Uint8Array(i));"glTF"===r&&(r="glb");var o,a=i$y[r];return t._disableSkipLevelOfDetail=t._disableSkipLevelOfDetail||"vctr"===r||"geom"===r,e$2e(a)?o=a(t,e,e._contentResource,i,0):(o=i$y.json(t,e,e._contentResource,i,0),e.hasTilesetContent=!0),n&&(e.expireDate=void 0),e._content=o,e._contentState=X$q.PROCESSING,e._contentReadyToProcessPromise.resolve(o),o.readyPromise.then((function(t){e.isDestroyed()?s():(De$d(e),e._selectedFrame=0,e.lastStyleTime=0,a$15.now(e._loadTimestamp),e._contentState=X$q.READY,e._contentReadyPromise.resolve(t))}))}s()})).otherwise((function(i){if(r.state===W$1c.CANCELLED)return e._contentState=a,--t.statistics.numberOfPendingRequests,void++t.statistics.numberOfAttemptedRequests;s(i)})),!0},c$s.prototype.unloadContent=function(){this.hasEmptyContent||this.hasTilesetContent||(this._content=this._content&&this._content.destroy(),this._contentState=X$q.UNLOADED,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this.lastStyleTime=0,this.clippingPlanesDirty=0===this._clippingPlanesState,this._clippingPlanesState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var Q$t=new i$1d;function j$w(e,t){if(t.mode!==C$14.SCENE3D&&!e$2e(e._boundingVolume2D)){var i=e._boundingVolume.boundingSphere,n=i$1d.projectTo2D(i,t.mapProjection,Q$t);e._boundingVolume2D=new t$q(n.center,n.radius)}return t.mode!==C$14.SCENE3D?e._boundingVolume2D:e._boundingVolume}function Te$b(e,t){if(t.mode!==C$14.SCENE3D&&!e$2e(e._contentBoundingVolume2D)){var i=e._contentBoundingVolume.boundingSphere,n=i$1d.projectTo2D(i,t.mapProjection,Q$t);e._contentBoundingVolume2D=new t$q(n.center,n.radius)}return t.mode!==C$14.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}c$s.prototype.visibility=function(e,t){var i=e.cullingVolume,n=j$w(this,e),r=this._tileset,o=r.clippingPlanes;if(e$2e(o)&&o.enabled){var a=o.computeIntersectionWithBoundingVolume(n,r.clippingPlanesOriginMatrix);if(this._isClipped=a!==Ae$w.INSIDE,a===Ae$w.OUTSIDE)return i$X.MASK_OUTSIDE}return i.computeVisibilityWithPlaneMask(n,t)},c$s.prototype.contentVisibility=function(e){if(!e$2e(this._contentBoundingVolume))return Ae$w.INSIDE;if(this._visibilityPlaneMask===i$X.MASK_INSIDE)return Ae$w.INSIDE;var t=e.cullingVolume,i=Te$b(this,e),n=this._tileset,r=n.clippingPlanes;if(e$2e(r)&&r.enabled){var o=r.computeIntersectionWithBoundingVolume(i,n.clippingPlanesOriginMatrix);if(this._isClipped=o!==Ae$w.INSIDE,o===Ae$w.OUTSIDE)return Ae$w.OUTSIDE}return t.computeVisibility(i)},c$s.prototype.distanceToTile=function(e){return j$w(this,e).distanceToCamera(e)};var Be$c=new o$1p;c$s.prototype.distanceToTileCenter=function(e){var t=j$w(this,e).boundingVolume,i=o$1p.subtract(t.center,e.camera.positionWC,Be$c);return o$1p.dot(e.camera.directionWC,i)},c$s.prototype.insideViewerRequestVolume=function(e){var t=this._viewerRequestVolume;return!e$2e(t)||0===t.distanceToCamera(e)};var $$r=new p$1e,ee$m=new o$1p,we$9=new p$1e,te$i=new o$1p,re$m=new h$18,xe$c=new y$Y,K$r=new p$1d;function Le$d(e,t,i){var n=o$1p.fromElements(e[0],e[1],e[2],te$i),r=p$1e.fromArray(e,3,we$9);n=p$1d.multiplyByPoint(t,n,n);var o=p$1d.getMatrix3(t,$$r);return r=p$1e.multiply(o,r,r),e$2e(i)?(i.update(n,r),i):new c$t(n,r)}function Fe$c(e,t,i,n){var r=h$18.unpack(e,0,re$m),o=e[4],a=e[5],s=y$Y.fromRectangle(r,o,a,t$12.WGS84,xe$c),l=s.center,u=s.halfAxes;t=p$1d.multiplyTransformation(t,p$1d.inverseTransformation(i,K$r),K$r),l=p$1d.multiplyByPoint(t,l,l);var c=p$1d.getMatrix3(t,$$r);return u=p$1e.multiply(c,u,u),e$2e(n)&&n instanceof c$t?(n.update(l,u),n):new c$t(l,u)}function qe$5(e,t,i,n){return p$1d.equalsEpsilon(t,i,e$2d.EPSILON8)?e$2e(n)?n:new y$K({rectangle:h$18.unpack(e,0,re$m),minimumHeight:e[4],maximumHeight:e[5]}):Fe$c(e,t,i,n)}function Ie$a(e,t,i){var n=o$1p.fromElements(e[0],e[1],e[2],te$i),r=e[3];n=p$1d.multiplyByPoint(t,n,n);var o=p$1d.getScale(t,ee$m);return r*=o$1p.maximumComponent(o),e$2e(i)?(i.update(n,r),i):new t$q(n,r)}function Oe$d(e,t,i,n){if(n.isRender){var r=e$2e(e._header.content)&&e$2e(e._header.content.boundingVolume),o=e.hasEmptyContent||e.hasTilesetContent,a=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!r;if(a){var s;s=e._finalResolution?o?e$1X.DARKGRAY:e$1X.WHITE:e$1X.YELLOW,e$2e(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(s)),e._debugBoundingVolume.update(i);var l=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");l.color=o$16.toValue(s,l.color)}else!a&&e$2e(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&r?(e$2e(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(e$1X.BLUE)),e._debugContentBoundingVolume.update(i)):!t.debugShowContentBoundingVolume&&e$2e(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&e$2e(e._viewerRequestVolume)?(e$2e(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(e$1X.YELLOW)),e._debugViewerRequestVolume.update(i)):!t.debugShowViewerRequestVolume&&e$2e(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());var u=t.debugColorizeTiles&&!e._debugColorizeTiles||e$2e(t._heatmap.tilePropertyName),c=!t.debugColorizeTiles&&e._debugColorizeTiles;u?(t._heatmap.colorize(e,i),e._debugColorizeTiles=!0,e.color=e._debugColor):c&&(e._debugColorizeTiles=!1,e.color=e$1X.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),c&&t.makeStyleDirty()}}function Ae$d(e,t,i){var n=e._content,r=e._expiredContent;if(e$2e(r)){if(!e.contentReady)return void r.update(t,i);e._expiredContent.destroy(),e._expiredContent=void 0}n.update(t,i)}function Me$e(e,t){var i=t.clippingPlanes,n=0;e$2e(i)&&e._isClipped&&i.enabled&&(n=i.clippingPlanesState),n!==e._clippingPlanesState&&(e._clippingPlanesState=n,e.clippingPlanesDirty=!0)}c$s.prototype.createBoundingVolume=function(e,t,i){if(!e$2e(e))throw new t$13("boundingVolume must be defined");if(e$2e(e.box))return Le$d(e.box,t,i);if(e$2e(e.region))return qe$5(e.region,t,this._initialTransform,i);if(e$2e(e.sphere))return Ie$a(e.sphere,t,i);throw new t$13("boundingVolume must contain a sphere, region, or box")},c$s.prototype.updateTransform=function(e){e=u$Z(e,p$1d.IDENTITY);var t=p$1d.multiply(e,this.transform,K$r);if(!p$1d.equals(t,this.computedTransform)){p$1d.clone(t,this.computedTransform);var i=this._header,n=this._header.content;this._boundingVolume=this.createBoundingVolume(i.boundingVolume,this.computedTransform,this._boundingVolume),e$2e(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(n.boundingVolume,this.computedTransform,this._contentBoundingVolume)),e$2e(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(i.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy()}},c$s.prototype.updateGeometricErrorScale=function(){var e=p$1d.getScale(this.computedTransform,ee$m),t=o$1p.maximumComponent(e);this.geometricError=this._geometricError*t},c$s.prototype.update=function(e,t,i){var n=t.commandList.length;Me$e(this,e),Oe$d(this,e,t,i),Ae$d(this,e,t),this._commandsLength=t.commandList.length-n,this.clippingPlanesDirty=!1};var ie$e=[];function ne$h(e,t,i){var n=e*Math.pow(10,t);return parseInt(n)*Math.pow(10,i)}function q$w(e,t,i){return Math.max(e$2d.normalize(e,t,i)-e$2d.EPSILON7,0)}c$s.prototype.process=function(e,t){var i=t.commandList;t.commandList=ie$e,this._content.update(e,t),ie$e.length=0,t.commandList=i},c$s.prototype.updatePriority=function(){var e=this.tileset,t=e.preferLeaves,i=e._minimumPriority,n=e._maximumPriority,r=Math.pow(10,8),o=Math.pow(10,9),a=Math.pow(10,10),s=q$w(this._depth,i.depth,n.depth);s=t?1-s:s;var l=ne$h(!e._skipLevelOfDetail&&this.refine===f$E.REPLACE?q$w(this._priorityHolder._distanceToCamera,i.distance,n.distance):q$w(this._priorityReverseScreenSpaceError,i.reverseScreenSpaceError,n.reverseScreenSpaceError),4,0),u=this._priorityProgressiveResolution?0:r,c=ne$h(q$w(this._priorityHolder._foveatedFactor,i.foveatedFactor,n.foveatedFactor),4,4),h=this.priorityDeferred?o:0,d=e._pass===ue$e.PRELOAD_FLIGHT?0:a;this._priority=s+l+u+c+h+d},c$s.prototype.isDestroyed=function(){return!1},c$s.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),i$11(this)};var I$F={},y$u=new o$1p;function e$C(){this._list=new h$Q,this._sentinel=this._list.add(),this._trimTiles=!1}function a$s(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function f$C(e,t){return"_loadTimestamp"===t?a$15.toDate(e).getTime():e}function L$y(e,t){var i=e.tilePropertyName;if(e$2e(i)){var n=f$C(t[i],i);return e$2e(n)?(e._maximum=Math.max(n,e._maximum),e._minimum=Math.min(n,e._minimum),n):(e.tilePropertyName=void 0,n)}}I$F.checkChildrenWithinParent=function(e){o$1q.typeOf.object("tile",e);var t=e.children,i=t.length,n=e.boundingVolume;if(n instanceof c$t||n instanceof y$K){var r=n._orientedBoundingBox;e._optimChildrenWithinParent=s$q.USE_OPTIMIZATION;for(var o=0;o<i;++o){var a=t[o].boundingVolume;if(!(a instanceof c$t||a instanceof y$K)){e._optimChildrenWithinParent=s$q.SKIP_OPTIMIZATION;break}var s=a._orientedBoundingBox,l=o$1p.subtract(s.center,r.center,y$u),u=o$1p.magnitude(l);if(o$1p.divideByScalar(l,u,l),Math.abs(r.halfAxes[0]*l.x)+Math.abs(r.halfAxes[1]*l.y)+Math.abs(r.halfAxes[2]*l.z)+Math.abs(r.halfAxes[3]*l.x)+Math.abs(r.halfAxes[4]*l.y)+Math.abs(r.halfAxes[5]*l.z)+Math.abs(r.halfAxes[6]*l.x)+Math.abs(r.halfAxes[7]*l.y)+Math.abs(r.halfAxes[8]*l.z)<=Math.abs(s.halfAxes[0]*l.x)+Math.abs(s.halfAxes[1]*l.y)+Math.abs(s.halfAxes[2]*l.z)+Math.abs(s.halfAxes[3]*l.x)+Math.abs(s.halfAxes[4]*l.y)+Math.abs(s.halfAxes[5]*l.z)+Math.abs(s.halfAxes[6]*l.x)+Math.abs(s.halfAxes[7]*l.y)+Math.abs(s.halfAxes[8]*l.z)+u){e._optimChildrenWithinParent=s$q.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===s$q.USE_OPTIMIZATION},e$C.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)},e$C.prototype.touch=function(e){var t=e.cacheNode;e$2e(t)&&this._list.splice(this._sentinel,t)},e$C.prototype.add=function(e){e$2e(e.cacheNode)||(e.cacheNode=this._list.add(e))},e$C.prototype.unloadTile=function(e,t,i){var n=t.cacheNode;!e$2e(n)||(this._list.remove(n),t.cacheNode=void 0,i(e,t))},e$C.prototype.unloadTiles=function(e,t){var i=this._trimTiles;this._trimTiles=!1;for(var n=this._list,r=1024*e.maximumMemoryUsage*1024,o=this._sentinel,a=n.head;a!==o&&(e.totalMemoryUsageInBytes>r||i);){var s=a.item;a=a.next,this.unloadTile(e,s,t)}},e$C.prototype.trim=function(){this._trimTiles=!0},a$s.prototype.setReferenceMinimumMaximum=function(e,t,i){this._referenceMinimum[i]=f$C(e,i),this._referenceMaximum[i]=f$C(t,i)};var p$v=[new e$1X(.1,.1,.1,1),new e$1X(.153,.278,.878,1),new e$1X(.827,.231,.49,1),new e$1X(.827,.188,.22,1),new e$1X(1,.592,.259,1),new e$1X(1,.843,0,1)];function r$x(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.batchTableByteLength=0}function f$B(e,t,i,n){var r=t.innerContents,o=t.pointsLength,a=t.trianglesLength,s=t.featuresLength,l=t.geometryByteLength,u=t.texturesByteLength,c=t.batchTableByteLength;if(n?(e.numberOfFeaturesLoaded+=i?-s:s,e.numberOfPointsLoaded+=i?-o:o,e.geometryByteLength+=i?-l:l,e.texturesByteLength+=i?-u:u,e.batchTableByteLength+=i?-c:c):(e.numberOfFeaturesSelected+=i?-s:s,e.numberOfPointsSelected+=i?-o:o,e.numberOfTrianglesSelected+=i?-a:a),e$2e(r))for(var h=r.length,d=0;d<h;++d)f$B(e,r[d],i,n)}function p$u(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.url",e.url),this._url=void 0,this._basePath=void 0,this._root=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._extensionsUsed=void 0,this._gltfUpAxis=void 0,this._cache=new e$C,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._cullWithChildrenBounds=u$Z(e.cullWithChildrenBounds,!0),this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new r$S,this._maximumScreenSpaceError=u$Z(e.maximumScreenSpaceError,16),this._maximumMemoryUsage=u$Z(e.maximumMemoryUsage,512),this._styleEngine=new e$1u,this._modelMatrix=e$2e(e.modelMatrix)?p$1d.clone(e.modelMatrix):p$1d.clone(p$1d.IDENTITY),this._statistics=new r$x,this._statisticsLast=new r$x,this._statisticsPerPass=new Array(ue$e.NUMBER_OF_PASSES);for(var t=0;t<ue$e.NUMBER_OF_PASSES;++t)this._statisticsPerPass[t]=new r$x;this._requestedTilesInFlight=[],this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,reverseScreenSpaceError:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,reverseScreenSpaceError:Number.MAX_VALUE},this._heatmap=new a$s(e.debugHeatmapTilePropertyName),this.cullRequestsWhileMoving=u$Z(e.cullRequestsWhileMoving,!0),this._cullRequestsWhileMoving=!1,this._visibleViewport=4095,this.cullRequestsWhileMovingMultiplier=u$Z(e.cullRequestsWhileMovingMultiplier,60),this.progressiveResolutionHeightFraction=e$2d.clamp(u$Z(e.progressiveResolutionHeightFraction,.3),0,.5),this.preferLeaves=u$Z(e.preferLeaves,!1),this._tilesLoaded=!1,this._initialTilesLoaded=!1,this._tileDebugLabels=void 0,this._readyPromise=o$1l.defer(),this._classificationType=e.classificationType,this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._initialClippingPlanesOriginMatrix=p$1d.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this.preloadWhenHidden=u$Z(e.preloadWhenHidden,!1),this.preloadFlightDestinations=u$Z(e.preloadFlightDestinations,!0),this._pass=void 0,this.dynamicScreenSpaceError=u$Z(e.dynamicScreenSpaceError,!1),this.foveatedScreenSpaceError=u$Z(e.foveatedScreenSpaceError,!0),this._foveatedConeSize=u$Z(e.foveatedConeSize,.1),this._foveatedMinimumScreenSpaceErrorRelaxation=u$Z(e.foveatedMinimumScreenSpaceErrorRelaxation,0),this.foveatedInterpolationCallback=u$Z(e.foveatedInterpolationCallback,e$2d.lerp),this.foveatedTimeDelay=u$Z(e.foveatedTimeDelay,.2),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorFactor=4,this.dynamicScreenSpaceErrorHeightFalloff=.25,this._dynamicScreenSpaceErrorComputedDensity=0,this.shadows=u$Z(e.shadows,W$X.ENABLED),this.show=u$Z(e.show,!0),this.colorBlendMode=L$I.HIGHLIGHT,this.colorBlendAmount=.5,this.pointCloudShading=new o$Z(e.pointCloudShading),this._pointCloudEyeDomeLighting=new m$W,this.loadProgress=new o$1h,this.allTilesLoaded=new o$1h,this.initialTilesLoaded=new o$1h,this.tileLoad=new o$1h,this.tileUnload=new o$1h,this.tileFailed=new o$1h,this.tileVisible=new o$1h,this.skipLevelOfDetail=u$Z(e.skipLevelOfDetail,!1),this._skipLevelOfDetail=this.skipLevelOfDetail,this._disableSkipLevelOfDetail=!1,this.baseScreenSpaceError=u$Z(e.baseScreenSpaceError,1024),this.skipScreenSpaceErrorFactor=u$Z(e.skipScreenSpaceErrorFactor,16),this.skipLevels=u$Z(e.skipLevels,1),this.immediatelyLoadDesiredLevelOfDetail=u$Z(e.immediatelyLoadDesiredLevelOfDetail,!1),this.loadSiblings=u$Z(e.loadSiblings,!1),this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._imageBasedLightingFactor=new o$1o(1,1),o$1o.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=u$Z(e.luminanceAtZenith,.2),this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps,this.debugFreezeFrame=u$Z(e.debugFreezeFrame,!1),this.debugColorizeTiles=u$Z(e.debugColorizeTiles,!1),this.debugWireframe=u$Z(e.debugWireframe,!1),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.debugShowContentBoundingVolume=u$Z(e.debugShowContentBoundingVolume,!1),this.debugShowViewerRequestVolume=u$Z(e.debugShowViewerRequestVolume,!1),this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=u$Z(e.debugShowGeometricError,!1),this.debugShowRenderingStatistics=u$Z(e.debugShowRenderingStatistics,!1),this.debugShowMemoryUsage=u$Z(e.debugShowMemoryUsage,!1),this.debugShowUrl=u$Z(e.debugShowUrl,!1),this.isSuperMapiServer=u$Z(e.isSuperMapiServer,!1),this._swipeRegion=new e$2c(0,0,1,1),this._swipeEnabled=!1;var i,n=this;o$1l(e.url).then((function(e){var t;return i=t$10.createIfNeeded(e),n._credits=i.credits,"json"===i.extension?t=i.getBaseUri(!0):i.isDataUri&&(t=""),n._url=i.url,n._basePath=t,p$u.loadJson(i)})).then((function(e){n._root=n.loadTileset(i,e);var t=e$2e(e.asset.gltfUpAxis)?v$y.fromName(e.asset.gltfUpAxis):v$y.Y,r=e.asset;n._asset=r,n._properties=e.properties,n._geometricError=e.geometricError,n._extensionsUsed=e.extensionsUsed,n._gltfUpAxis=t,n._extras=e.extras;var o=r.extras;if(e$2e(o)&&e$2e(o.supermap3d)&&e$2e(o.supermap3d.credits)){var a=o.supermap3d.credits,s=n._credits;e$2e(s)||(s=[],n._credits=s);for(var l=0;l<a.length;++l){var u=a[l];s.push(new r$U(u.html,u.showOnScreen))}}var c=n._root.createBoundingVolume(e.root.boundingVolume,p$1d.IDENTITY).boundingSphere.center,h=n._ellipsoid.cartesianToCartographic(c);e$2e(h)&&h.height>e$1H._defaultMinTerrainHeight&&(n._initialClippingPlanesOriginMatrix=m$19.eastNorthUpToFixedFrame(c)),n._clippingPlanesOriginMatrix=p$1d.clone(n._initialClippingPlanesOriginMatrix),n._readyPromise.resolve(n)})).otherwise((function(e){n._readyPromise.reject(e)}))}a$s.prototype.colorize=function(e,t){if(e$2e(this.tilePropertyName)&&e.contentAvailable&&e._selectedFrame===t.frameNumber){var i=L$y(this,e),n=this._previousMinimum,r=this._previousMaximum;if(n!==Number.MAX_VALUE&&r!==-Number.MAX_VALUE){var o=r-n+e$2d.EPSILON7,a=e$2d.clamp(i-n,0,o)/o*(p$v.length-1),s=Math.floor(a),l=Math.ceil(a),u=a-s,c=p$v[s],h=p$v[l],d=e$1X.clone(e$1X.WHITE);d.red=e$2d.lerp(c.red,h.red,u),d.green=e$2d.lerp(c.green,h.green,u),d.blue=e$2d.lerp(c.blue,h.blue,u),e._debugColor=d}}},a$s.prototype.resetMinimumMaximum=function(){var e=this.tilePropertyName;if(e$2e(e)){var t=this._referenceMinimum[e],i=this._referenceMaximum[e],n=e$2e(t)&&e$2e(i);this._previousMinimum=n?t:this._minimum,this._previousMaximum=n?i:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}},r$x.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0},r$x.prototype.incrementSelectionCounts=function(e){f$B(this,e,!1,!1)},r$x.prototype.incrementLoadCounts=function(e){f$B(this,e,!1,!0)},r$x.prototype.decrementLoadCounts=function(e){f$B(this,e,!0,!0)},r$x.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.selected=e.selected,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.batchTableByteLength=e.batchTableByteLength},Object.defineProperties(p$u.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){if(!this.ready)throw new t$15("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._asset}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){h$L.setOwner(e,this,"_clippingPlanes")}},properties:{get:function(){if(!this.ready)throw new t$15("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._properties}},ready:{get:function(){return e$2e(this._root)}},readyPromise:{get:function(){return this._readyPromise.promise}},tilesLoaded:{get:function(){return this._tilesLoaded}},url:{get:function(){return this._url}},basePath:{get:function(){return t$11("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("maximumScreenSpaceError",e,0),this._maximumScreenSpaceError=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMemoryUsage=e}},root:{get:function(){if(!this.ready)throw new t$15("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._root}},boundingSphere:{get:function(){if(!this.ready)throw new t$15("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=p$1d.clone(e,this._modelMatrix)}},swipeRegion:{get:function(){return new f$1a(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2e(e)){if(!(e instanceof f$1a))throw new t$15("swipeRegion must be a instance of BoundingRectangle.");e$2c.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion)}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){if(e!==this._swipeEnabled){e||e$2c.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e;var t=[];for(t.push(this.root);t.length>0;)for(var i=t.pop().children,n=i.length,r=0;r<n;++r)if(t.push(i[r]),e$2e(i[r]._content)){var o=i[r]._content._model;!e$2e(o)||(o._shouldRegenerateShaders=!0)}}}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){var e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return e$2e(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(p$1d.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):p$1d.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("foveatedConeSize",e,0),o$1q.typeOf.number.lessThanOrEquals("foveatedConeSize",e,1),this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,0),o$1q.typeOf.number.lessThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,this.maximumScreenSpaceError),this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){if(!this.ready)throw new t$15("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._extras}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o$1q.typeOf.object("imageBasedLightingFactor",e),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o$1q.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o$1q.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),o$1o.clone(e,this._imageBasedLightingFactor)}}}),p$u.loadJson=function(e){return t$10.createIfNeeded(e).fetchJson()},p$u.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},p$u.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},p$u.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()},p$u.prototype.loadTileset=function(e,t,i){var n=t.asset;if(!e$2e(n))throw new t$13("Tileset must have an asset property.");if("0.0"!==n.version&&"1.0"!==n.version)throw new t$13("The tileset must be 3D Tiles version 0.0 or 1.0.");var r=this._statistics,o=n.tilesetVersion;e$2e(o)&&(this._basePath+="?v="+o,e.setQueryParameters({v:o}));var a=new c$s(this,e,t.root,i);e$2e(i)&&(i.children.push(a),a._depth=i._depth+1);var s=[];for(s.push(a);s.length>0;){var l=s.pop();++r.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&l.refine===f$E.ADD;var u=l._header.children;if(e$2e(u))for(var c=u.length,h=0;h<c;++h){var d=new c$s(this,e,u[h],l);l.children.push(d),d._depth=l._depth+1,s.push(d)}this._cullWithChildrenBounds&&I$F.checkChildrenWithinParent(l)}return a};var j$v=new o$1p,Me$d=new a$18,Pe$9=new p$1d,Le$c=new o$1p,xe$b=new o$1p,De$c=new o$1p;function Oe$c(e,t){var i,n,r,o,a,s=t.camera,l=e._root,u=l.contentBoundingVolume;if(u instanceof y$K)i=o$1p.normalize(s.positionWC,j$v),n=s.directionWC,r=s.positionCartographic.height,o=u.minimumHeight,a=u.maximumHeight;else{var c=p$1d.inverseTransformation(l.computedTransform,Pe$9),h=t.mapProjection.ellipsoid,d=u.boundingVolume,f=p$1d.multiplyByPoint(c,d.center,Le$c);if(o$1p.magnitude(f)>h.minimumRadius){var p=a$18.fromCartesian(f,h,Me$d);i=o$1p.normalize(s.positionWC,j$v),n=s.directionWC,r=s.positionCartographic.height,o=0,a=2*p.height}else{var _=p$1d.multiplyByPoint(c,s.positionWC,xe$b);if(i=o$1p.UNIT_Z,n=p$1d.multiplyByPointAsVector(c,s.directionWC,De$c),n=o$1p.normalize(n,n),r=_.z,u instanceof c$t){var m=l._header.boundingVolume.box[11];o=f.z-m,a=f.z+m}else if(u instanceof t$q){var g=d.radius;o=f.z-g,a=f.z+g}}}var x=o+(a-o)*e.dynamicScreenSpaceErrorHeightFalloff,y=a,v=e$2d.clamp((r-x)/(y-x),0,1),$=1-Math.abs(o$1p.dot(n,i));$*=1-v;var b=e.dynamicScreenSpaceErrorDensity;b*=$,e._dynamicScreenSpaceErrorComputedDensity=b}function Re$a(e,t){if(!t.hasEmptyContent){var i=e._statistics,n=t.contentExpired;if(!t.requestContent())return void++i.numberOfAttemptedRequests;n&&(t.hasTilesetContent?He$9(e,t):(i.decrementLoadCounts(t.content),--i.numberOfTilesWithContentReady)),++i.numberOfPendingRequests,e._requestedTilesInFlight.push(t),t.contentReadyToProcessPromise.then(Ue$a(e,t)),t.contentReadyPromise.then(qe$4(e,t)).otherwise(Be$b(e,t))}}function Ae$c(e,t){return e._priority-t._priority}function Ve$a(e,t){for(var i=e._requestedTilesInFlight,n=0,r=i.length,o=0;o<r;++o){var a=i[o],s=t.frameNumber-a._touchedFrame>=1;a._contentState===X$q.LOADING?s?(a._request.cancel(),++n):n>0&&(i[o-n]=a):++n}i.length-=n}function Fe$b(e,t){var i=e._requestedTiles,n=i.length;i.sort(Ae$c);for(var r=0;r<n;++r)Re$a(e,i[r])}function Ue$a(e,t){return function(){e._processingQueue.push(t),--e._statistics.numberOfPendingRequests,++e._statistics.numberOfTilesProcessing}}function Be$b(e,t){return function(i){var n=t._contentResource.url,r=e$2e(i.message)?i.message:i.toString();e.tileFailed.numberOfListeners>0?e.tileFailed.raiseEvent({url:n,message:r}):(console.log("A 3D tile failed to load: "+n),console.log("Error: "+r))}}function qe$4(e,t){return function(){--e._statistics.numberOfTilesProcessing,t.hasTilesetContent||(e._statistics.incrementLoadCounts(t.content),++e._statistics.numberOfTilesWithContentReady,++e._statistics.numberOfLoadedTilesTotal,e._cache.add(t)),e.tileLoad.raiseEvent(t)}}function Ne$8(e){for(var t=e._processingQueue,i=t.length,n=0,r=0;r<i;++r){var o=t[r];o._contentState===X$q.PROCESSING?n>0&&(t[r-n]=o):++n}t.length-=n}function Ie$9(e,t){Ne$8(e);for(var i=e._processingQueue,n=i.length,r=0;r<n;++r)i[r].process(e,t)}p$u.prototype.postPassesUpdate=function(e){!this.ready||(Ve$a(this,e),Ge$7(this,e),this._cache.unloadTiles(this,K$q))},p$u.prototype.prePassesUpdate=function(e){if(this.ready){Ie$9(this,e);var t=this._clippingPlanes;this._clippingPlanesOriginMatrixDirty=!0,e$2e(t)&&t.enabled&&t.update(e),e$2e(this._loadTimestamp)||(this._loadTimestamp=a$15.clone(e.time)),this._timeSinceLoad=Math.max(1e3*a$15.secondsDifference(e.time,this._loadTimestamp),0),this._skipLevelOfDetail=this.skipLevelOfDetail&&!e$2e(this._classificationType)&&!this._disableSkipLevelOfDetail&&!this._allTilesAdditive,this.dynamicScreenSpaceError&&Oe$c(this,e),e.newFrame&&this._cache.reset()}};var D$u=new o$1p,ke$9={maximumFractionDigits:3};function Q$s(e){var t=e/1048576;return t<1?t.toLocaleString(void 0,ke$9):Math.round(t).toLocaleString()}function V$p(e){var t=e.boundingVolume.boundingVolume,i=t.halfAxes,n=t.radius,r=o$1p.clone(t.center,D$u);if(e$2e(i))r.x+=.75*(i[0]+i[3]+i[6]),r.y+=.75*(i[1]+i[4]+i[7]),r.z+=.75*(i[2]+i[5]+i[8]);else if(e$2e(n)){var o=o$1p.normalize(t.center,D$u);o=o$1p.multiplyByScalar(o,.75*n,D$u),r=o$1p.add(o,t.center,D$u)}return r}function F$w(e,t,i){var n="",r=0;(t.debugShowGeometricError&&(n+="\nGeometric error: "+e.geometricError,r++),t.debugShowRenderingStatistics)&&(n+="\nCommands: "+e.commandsLength,r++,e.content.pointsLength>0&&(n+="\nPoints: "+e.content.pointsLength,r++),e.content.trianglesLength>0&&(n+="\nTriangles: "+e.content.trianglesLength,r++),n+="\nFeatures: "+e.content.featuresLength,r++);t.debugShowMemoryUsage&&(n+="\nTexture Memory: "+Q$s(e.content.texturesByteLength),n+="\nGeometry Memory: "+Q$s(e.content.geometryByteLength),r+=2),t.debugShowUrl&&(n+="\nUrl: "+e._header.content.uri,r++);var o={text:n.substring(1),position:i,font:19-r+"px sans-serif",showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(o)}function We$8(e,t){var i,n,r=e._selectedTiles,o=r.length,a=e._emptyTiles,s=a.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(e$2e(e.debugPickedTile)){var l=e$2e(e.debugPickPosition)?e.debugPickPosition:V$p(e.debugPickedTile);F$w(e.debugPickedTile,e,l).pixelOffset=new o$1o(15,-15)}}else{for(i=0;i<o;++i)F$w(n=r[i],e,V$p(n));for(i=0;i<s;++i)(n=a[i]).hasTilesetContent&&F$w(n,e,V$p(n))}e._tileDebugLabels.update(t)}function ze$a(e,t,i){e._styleEngine.applyStyle(e,i);var n,r,o=i.isRender,a=e._statistics,s=t.commandList,l=s.length,u=e._selectedTiles,c=u.length,h=e._emptyTiles,d=h.length,f=e.tileVisible,p=e._skipLevelOfDetail&&e._hasMixedContent&&t.context.stencilBuffer&&c>0;e._backfaceCommands.length=0,p&&(e$2e(e._stencilClearCommand)||(e._stencilClearCommand=new t$W({stencil:0,pass:Le$q.CESIUM_3D_TILE,renderState:d$1m.fromCache({stencilMask:u$M.SKIP_LOD_MASK})})),s.push(e._stencilClearCommand));var _=s.length;for(n=0;n<c;++n)r=u[n],o&&f.raiseEvent(r),r.update(e,t,i),a.incrementSelectionCounts(r.content),++a.selected;for(n=0;n<d;++n)(r=h[n]).update(e,t,i);var m=s.length-_;if(e._backfaceCommands.trim(),p){var g=e._backfaceCommands.values,x=g.length;for(s.length+=x,n=m-1;n>=0;--n)s[_+x+n]=s[_+n];for(n=0;n<x;++n)s[_+n]=g[n]}m=s.length-l,a.numberOfCommands=m,o&&e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&m>0&&e._pointCloudEyeDomeLighting.update(t,l,e.pointCloudShading),o&&(e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(e$2e(e._tileDebugLabels)||(e._tileDebugLabels=new g$W),We$8(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var Y$p=[];function He$9(e,t){var i=t,n=Y$p;for(n.push(t);n.length>0;){for(var r=(t=n.pop()).children,o=r.length,a=0;a<o;++a)n.push(r[a]);t!==i&&(Xe$7(e,t),--e._statistics.numberOfTilesTotal)}i.children=[]}function K$q(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function Xe$7(e,t){e._cache.unloadTile(e,t,K$q),t.destroy()}function Ge$7(e,t){var i=e._statistics,n=e._statisticsLast,r=i.numberOfPendingRequests,o=i.numberOfTilesProcessing,a=n.numberOfPendingRequests,s=n.numberOfTilesProcessing;r$x.clone(i,n);var l=r!==a||o!==s;l&&t.afterRender.push((function(){e.loadProgress.raiseEvent(r,o)})),e._tilesLoaded=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests,l&&e._tilesLoaded&&(t.afterRender.push((function(){e.allTilesLoaded.raiseEvent()})),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push((function(){e.initialTilesLoaded.raiseEvent()}))))}function je$9(e){e._heatmap.resetMinimumMaximum(),e._minimumPriority.depth=Number.MAX_VALUE,e._maximumPriority.depth=-Number.MAX_VALUE,e._minimumPriority.foveatedFactor=Number.MAX_VALUE,e._maximumPriority.foveatedFactor=-Number.MAX_VALUE,e._minimumPriority.distance=Number.MAX_VALUE,e._maximumPriority.distance=-Number.MAX_VALUE,e._minimumPriority.reverseScreenSpaceError=Number.MAX_VALUE,e._maximumPriority.reverseScreenSpaceError=-Number.MAX_VALUE}function Qe$5(e,t){(t.frameNumber!==e._updatedModelMatrixFrame||!e$2e(e._previousModelMatrix))&&(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!p$1d.equals(e.modelMatrix,e._previousModelMatrix),e._previousModelMatrix=p$1d.clone(e.modelMatrix,e._previousModelMatrix))}function Ye$7(e,t,i,n){if(t.mode===C$14.MORPHING||!e.ready)return!1;var r=e._statistics;r.clear();var o=n.isRender;++e._updatedVisibilityFrame,je$9(e),Qe$5(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;var a=n.traversal.selectTiles(e,t),s=t.context;if(n.requestTiles&&s.memorySize<s.memoryThresholdValue&&Fe$b(e),ze$a(e,t,n),r$x.clone(r,i),o){var l=e._credits;if(e$2e(l)&&0!==r.selected)for(var u=l.length,c=0;c<u;++c)t.creditDisplay.addCredit(l[c])}return a}p$u.prototype.trimLoadedTiles=function(){this._cache.trim()},p$u.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;this.frameState=e,this.updateForPass(e,e.tilesetPassState)},p$u.prototype.updateForPass=function(e,t){o$1q.typeOf.object("frameState",e),o$1q.typeOf.object("tilesetPassState",t);var i=t.pass;if((i!==ue$e.PRELOAD||this.preloadWhenHidden&&!this.show)&&(i!==ue$e.PRELOAD_FLIGHT||this.preloadFlightDestinations&&(this.show||this.preloadWhenHidden))&&(i!==ue$e.REQUEST_RENDER_MODE_DEFER_CHECK||!(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))){var n=e.commandList,r=e.camera,o=e.cullingVolume;t.ready=!1;var a=ue$e.getPassOptions(i),s=a.ignoreCommands,l=u$Z(t.commandList,n),u=l.length;e.commandList=l,e.camera=u$Z(t.camera,r),e.cullingVolume=u$Z(t.cullingVolume,o);var c=this._statisticsPerPass[i];(this.show||s)&&(this._pass=i,t.ready=Ye$7(this,e,c,a)),s&&(l.length=u),e.commandList=n,e.camera=r,e.cullingVolume=o}},p$u.prototype.hasExtension=function(e){return!!e$2e(this._extensionsUsed)&&this._extensionsUsed.indexOf(e)>-1},p$u.prototype.isDestroyed=function(){return!1},p$u.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),e$2e(this._root)){var e=Y$p;for(e.push(this._root);e.length>0;){var t=e.pop();t.destroy();for(var i=t.children,n=i.length,r=0;r<n;++r)e.push(i[r])}}return this._root=void 0,i$11(this)};var P$s=new p$1d;function l$E(e,t){if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(t))throw new t$15("entityCollection is required.");t.collectionChanged.addEventListener(l$E.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new e$1Q,this._onCollectionChanged(t,t.values,[],[])}function _$r(e,t,i,n){var r=i[t.id];e$2e(r)&&(n.removeAndDestroy(r.tilesetPrimitive),delete i[t.id])}function V$o(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}l$E.prototype.update=function(e){if(!e$2e(e))throw new t$15("time is required.");for(var t=this._entitiesToVisualize.values,i=this._tilesetHash,n=this._primitives,r=0,o=t.length;r<o;r++){var a,s,l=t[r],u=l._tileset,c=i[l.id],h=l.isShowing&&l.isAvailable(e)&&r$_.getValueOrDefault(u._show,e,!0);if(h&&(s=l.computeModelMatrix(e,P$s),a=t$10.createIfNeeded(r$_.getValueOrUndefined(u._uri,e))),h){var d=e$2e(c)?c.tilesetPrimitive:void 0;(!e$2e(d)||a.url!==c.url)&&(e$2e(d)&&(n.removeAndDestroy(d),delete i[l.id]),(d=new p$u({url:a})).id=l,n.add(d),c={tilesetPrimitive:d,url:a.url,loadFail:!1},i[l.id]=c,V$o(d,l,i)),d.show=!0,e$2e(s)&&(d.modelMatrix=s),d.maximumScreenSpaceError=r$_.getValueOrDefault(u.maximumScreenSpaceError,e,d.maximumScreenSpaceError)}else e$2e(c)&&(c.tilesetPrimitive.show=!1)}return!0},l$E.prototype.isDestroyed=function(){return!1},l$E.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$E.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._tilesetHash,i=this._primitives,n=e.length-1;n>-1;n--)_$r(this,e[n],t,i);return i$11(this)},l$E.prototype.getBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("entity is required.");if(!e$2e(t))throw new t$15("result is required.");var i=this._tilesetHash[e.id];if(!e$2e(i)||i.loadFail)return R$w.FAILED;var n=i.tilesetPrimitive;return e$2e(n)&&n.show?n.ready?(i$1d.clone(n.boundingSphere,t),R$w.DONE):R$w.PENDING:R$w.FAILED},l$E.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._entitiesToVisualize,s=this._tilesetHash,l=this._primitives;for(r=t.length-1;r>-1;r--)e$2e((o=t[r])._tileset)&&a.set(o.id,o);for(r=n.length-1;r>-1;r--)e$2e((o=n[r])._tileset)?a.set(o.id,o):(_$r(this,o,s,l),a.remove(o.id));for(r=i.length-1;r>-1;r--)_$r(this,o=i[r],s,l),a.remove(o.id)};var f$A=e$1X.WHITE,p$t=e$1X.BLACK,u$v=new o$1o(2,2);function r$w(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(r$w.prototype,{isConstant:{get:function(){return r$_.isConstant(this._evenColor)&&r$_.isConstant(this._oddColor)&&r$_.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:C$10("evenColor"),oddColor:C$10("oddColor"),repeat:C$10("repeat")}),r$w.prototype.getType=function(e){return"Checkerboard"},r$w.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.lightColor=r$_.getValueOrClonedDefault(this._evenColor,e,f$A,t.lightColor),t.darkColor=r$_.getValueOrClonedDefault(this._oddColor,e,p$t,t.darkColor),t.repeat=r$_.getValueOrDefault(this._repeat,e,u$v),t},r$w.prototype.equals=function(e){return this===e||e instanceof r$w&&r$_.equals(this._evenColor,e._evenColor)&&r$_.equals(this._oddColor,e._oddColor)&&r$_.equals(this._repeat,e._repeat)};var A$D={id:void 0};function _$q(e){if(e._firing)e._refire=!0;else if(0===e._suspendCount){var t=e._addedEntities,i=e._removedEntities,n=e._changedEntities;if(0!==n.length||0!==t.length||0!==i.length){e._firing=!0;do{e._refire=!1;var r=t.values.slice(0),o=i.values.slice(0),a=n.values.slice(0);t.removeAll(),i.removeAll(),n.removeAll(),e._collectionChanged.raiseEvent(e,r,o,a)}while(e._refire);e._firing=!1}}}function r$v(e){this._owner=e,this._entities=new e$1Q,this._addedEntities=new e$1Q,this._removedEntities=new e$1Q,this._changedEntities=new e$1Q,this._suspendCount=0,this._collectionChanged=new o$1h,this._id=e$1T(),this._show=!0,this._firing=!1,this._refire=!1}function b$B(e){if(e$2e(e.box))return{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),box:{dimensions:new o$1p(e.box.dimensions.x,e.box.dimensions.y,e.box.dimensions.z),material:new e$1X(0,0,1,.2)}};if(e$2e(e.cylinder))return{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),cylinder:{length:e.cylinder.length,topRadius:e.cylinder.topRadius,bottomRadius:e.cylinder.bottomRadius,material:new e$1X(0,0,1,.2)}};if(e$2e(e.billboard))return{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.height/2),billboard:{image:e.imagePath,width:e.width,height:e.height}};if(e$2e(e.ellipsoid))return e$2e(e.radius)?{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.radius),ellipsoid:{radii:new o$1p(e.radius,e.radius,e.radius),material:new e$1X(0,0,1,.2)}}:{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z+e.yAxis),ellipsoid:{radii:new o$1p(e.ellipsoid.radii.x,e.ellipsoid.radii.y,e.ellipsoid.radii.z),material:new e$1X(0,0,1,.2)}};if(e$2e(e.polygon))return{polygon:{hierarchy:e.polygon.positions,material:new e$1X(1,0,0,.1),extrudedHeight:e.polygon.extrudedHeight,perPositionHeight:e.polygon.perPositionHeight,height:e.polygon.height}};if(e$2e(e.polyline)){for(var t=[],i=0,n=e.polyline.positions.length;i<n;++i)t.push(o$1p.fromDegrees(e.polyline.positions[i].x,e.polyline.positions[i].y,e.polyline.positions[i].z));return{polyline:{positions:t,width:5,material:new e$1X(1,0,0,1)}}}return e$2e(e.ellipse)?{position:o$1p.fromDegrees(e.position.x,e.position.y,e.position.z),ellipse:{semiMinorAxis:e.ellipse.semiMinorAxis,semiMajorAxis:e.ellipse.semiMajorAxis,height:e.position.z,material:new e$1X(0,0,1,.2)}}:"POINT3D"===e.type?{position:o$1p.fromDegrees(e.x,e.y,e.z),point:new n$O({color:new e$1X(1,1,0),pixelSize:10,outlineColor:new e$1X(0,1,1)})}:{}}r$v.prototype.suspendEvents=function(){this._suspendCount++},r$v.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new t$15("resumeEvents can not be called before suspendEvents.");this._suspendCount--,_$q(this)},r$v.collectionChangedEventCallback=void 0,Object.defineProperties(r$v.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(!e$2e(e))throw new t$15("value is required.");if(e!==this._show){this.suspendEvents();var t,i=[],n=this._entities.values,r=n.length;for(t=0;t<r;t++)i.push(n[t].isShowing);for(this._show=e,t=0;t<r;t++){var o=i[t],a=n[t];o!==a.isShowing&&a.definitionChanged.raiseEvent(a,"isShowing",a.isShowing,o)}this.resumeEvents()}}},owner:{get:function(){return this._owner}}}),r$v.prototype.computeAvailability=function(){for(var e=o$I.MAXIMUM_VALUE,t=o$I.MINIMUM_VALUE,i=this._entities.values,n=0,r=i.length;n<r;n++){var o=i[n].availability;if(e$2e(o)){var a=o.start,s=o.stop;a$15.lessThan(a,e)&&!a.equals(o$I.MINIMUM_VALUE)&&(e=a),a$15.greaterThan(s,t)&&!s.equals(o$I.MAXIMUM_VALUE)&&(t=s)}}return o$I.MAXIMUM_VALUE.equals(e)&&(e=o$I.MINIMUM_VALUE),o$I.MINIMUM_VALUE.equals(t)&&(t=o$I.MAXIMUM_VALUE),new d$W({start:e,stop:t})},r$v.prototype.add=function(e){if(!e$2e(e))throw new t$15("entity is required.");e instanceof o$11&&(e=b$B(e)),e instanceof h$W||(e=new h$W(e));var t=e.id,i=this._entities;if(i.contains(t))throw new t$13("An entity with id "+t+" already exists in this collection.");return e.entityCollection=this,i.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(r$v.prototype._onEntityDefinitionChanged,this),_$q(this),e},r$v.prototype.remove=function(e){return!!e$2e(e)&&this.removeById(e.id)},r$v.prototype.contains=function(e){if(!e$2e(e))throw new t$15("entity is required");return!!e$2e(e.id)&&this._entities.get(e.id)===e},r$v.prototype.removeById=function(e){if(!e$2e(e))return!1;var t=this._entities.get(e);return!!this._entities.remove(e)&&(e$2e(t._polygon)&&e$2e(t._polygon.outlines)&&t._polygon.outlines.removeAll(),e$2e(t._polygon)&&e$2e(t._polygon.clampOutlines)&&t.entityCollection._owner._entityCluster._scene._primitives.remove(t._polygon.clampOutlines),this._addedEntities.remove(e)||(this._removedEntities.set(e,t),this._changedEntities.remove(e)),this._entities.remove(e),t.definitionChanged.removeEventListener(r$v.prototype._onEntityDefinitionChanged,this),_$q(this),!0)},r$v.prototype.removeAll=function(){for(var e=this._entities,t=e.length,i=e.values,n=this._addedEntities,r=this._removedEntities,o=0;o<t;o++){var a=i[o];e$2e(a._polygon)&&e$2e(a._polygon.outlines)&&a._polygon.outlines.removeAll(),e$2e(a._polygon)&&e$2e(a._polygon.clampOutlines)&&a.entityCollection._owner._entityCluster._scene._primitives.remove(a._polygon.clampOutlines);var s=a.id;e$2e(n.get(s))||(a.definitionChanged.removeEventListener(r$v.prototype._onEntityDefinitionChanged,this),r.set(s,a))}e.removeAll(),n.removeAll(),this._changedEntities.removeAll(),_$q(this)},r$v.prototype.getById=function(e){if(!e$2e(e))throw new t$15("id is required.");return this._entities.get(e)},r$v.prototype.getOrCreateEntity=function(e){if(!e$2e(e))throw new t$15("id is required.");var t=this._entities.get(e);return e$2e(t)||(A$D.id=e,t=new h$W(A$D),this.add(t)),t},r$v.prototype._onEntityDefinitionChanged=function(e){var t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),_$q(this)};var w$r={id:void 0},C$x=new Array(2);function x$z(e){for(var t=e.propertyNames,i=t.length,n=0;n<i;n++)e[t[n]]=void 0;e._name=void 0,e._availability=void 0}function A$C(e,t,i,n){C$x[0]=i,C$x[1]=n.id,t[JSON.stringify(C$x)]=n.definitionChanged.addEventListener(s$p.prototype._onDefinitionChanged,e)}function T$v(e,t,i,n){C$x[0]=i,C$x[1]=n.id;var r=JSON.stringify(C$x);t[r](),t[r]=void 0}function g$B(e){if(e._shouldRecomposite=!0,0===e._suspendCount){var t,i,n,r,o,a,s=e._collections,l=s.length,u=e._collectionsCopy,c=u.length,h=e._composite,d=new r$v(e),f=e._eventHash;for(t=0;t<c;t++)for((o=u[t]).collectionChanged.removeEventListener(s$p.prototype._onCollectionChanged,e),n=o.values,a=o.id,r=n.length-1;r>-1;r--)T$v(e,f,a,i=n[r]);for(t=l-1;t>=0;t--)for((o=s[t]).collectionChanged.addEventListener(s$p.prototype._onCollectionChanged,e),n=o.values,a=o.id,r=n.length-1;r>-1;r--){A$C(e,f,a,i=n[r]);var p=d.getById(i.id);e$2e(p)||(e$2e(p=h.getById(i.id))?x$z(p):(w$r.id=i.id,p=new h$W(w$r)),d.add(p)),p.merge(i)}e._collectionsCopy=s.slice(0),h.suspendEvents(),h.removeAll();var _=d.values;for(t=0;t<_.length;t++)h.add(_[t]);h.resumeEvents()}}function s$p(e,t){this._owner=t,this._composite=new r$v(this),this._suspendCount=0,this._collections=e$2e(e)?e.slice():[],this._collectionsCopy=[],this._id=e$1T(),this._eventHash={},g$B(this),this._shouldRecomposite=!1}function E$y(e,t){if(!e$2e(t))throw new t$15("collection is required.");var i=e.indexOf(t);if(-1===i)throw new t$15("collection is not in this composite.");return i}function q$v(e,t,i){var n=e._collections;if((t=e$2d.clamp(t,0,n.length-1))!==(i=e$2d.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,g$B(e)}}function c$r(e,t,i,n){function r(){i.raiseEvent(e)}var o=[];t.removeAll();for(var a=n.length,s=0;s<a;s++){var l=n.get(s);e$2e(l.data)&&-1===o.indexOf(l.data)&&t.add(l.data.definitionChanged,r)}}function e$B(){this._eventHelper=new n$x,this._definitionChanged=new o$1h,this._intervals=new c$A,this._intervals.changedEvent.addEventListener(e$B.prototype._intervalsChanged,this)}function e$A(){this._definitionChanged=new o$1h,this._composite=new e$B,this._composite.definitionChanged.addEventListener(e$A.prototype._raiseDefinitionChanged,this)}function t$p(e){this._referenceFrame=u$Z(e,Re$l.FIXED),this._definitionChanged=new o$1h,this._composite=new e$B,this._composite.definitionChanged.addEventListener(t$p.prototype._raiseDefinitionChanged,this)}Object.defineProperties(s$p.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}}),s$p.prototype.addCollection=function(e,t){var i=e$2e(t);if(!e$2e(e))throw new t$15("collection is required.");if(i){if(t<0)throw new t$15("index must be greater than or equal to zero.");if(t>this._collections.length)throw new t$15("index must be less than or equal to the number of collections.")}i?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),g$B(this)},s$p.prototype.removeCollection=function(e){var t=this._collections.indexOf(e);return-1!==t&&(this._collections.splice(t,1),g$B(this),!0)},s$p.prototype.removeAllCollections=function(){this._collections.length=0,g$B(this)},s$p.prototype.containsCollection=function(e){return-1!==this._collections.indexOf(e)},s$p.prototype.contains=function(e){return this._composite.contains(e)},s$p.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)},s$p.prototype.getCollection=function(e){if(!e$2e(e))throw new t$15("index is required.","index");return this._collections[e]},s$p.prototype.getCollectionsLength=function(){return this._collections.length},s$p.prototype.raiseCollection=function(e){var t=E$y(this._collections,e);q$v(this,t,t+1)},s$p.prototype.lowerCollection=function(e){var t=E$y(this._collections,e);q$v(this,t,t-1)},s$p.prototype.raiseCollectionToTop=function(e){var t=E$y(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),g$B(this))},s$p.prototype.lowerCollectionToBottom=function(e){var t=E$y(this._collections,e);0!==t&&(this._collections.splice(t,1),this._collections.splice(0,0,e),g$B(this))},s$p.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()},s$p.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new t$15("resumeEvents can not be called before suspendEvents.");this._suspendCount--,this._shouldRecomposite&&0===this._suspendCount&&(g$B(this),this._shouldRecomposite=!1),this._composite.resumeEvents()},s$p.prototype.computeAvailability=function(){return this._composite.computeAvailability()},s$p.prototype.getById=function(e){return this._composite.getById(e)},s$p.prototype._onCollectionChanged=function(e,t,i){var n=this._collectionsCopy,r=n.length,o=this._composite;o.suspendEvents();var a,s,l,u,c=i.length,h=this._eventHash,d=e.id;for(a=0;a<c;a++){var f=i[a];T$v(this,h,d,f);var p=f.id;for(s=r-1;s>=0;s--)e$2e(l=n[s].getById(p))&&(e$2e(u)||x$z(u=o.getById(p)),u.merge(l));e$2e(u)||o.removeById(p),u=void 0}var _=t.length;for(a=0;a<_;a++){var m=t[a];A$C(this,h,d,m);var g=m.id;for(s=r-1;s>=0;s--)e$2e(l=n[s].getById(g))&&(e$2e(u)||(e$2e(u=o.getById(g))?x$z(u):(w$r.id=g,u=new h$W(w$r),o.add(u))),u.merge(l));u=void 0}o.resumeEvents()},s$p.prototype._onDefinitionChanged=function(e,t,i,n){for(var r=this._collections,o=this._composite,a=r.length,s=e.id,l=o.getById(s),u=l[t],c=!e$2e(u),h=!0,d=a-1;d>=0;d--){var f=r[d].getById(e.id);if(e$2e(f)){var p=f[t];if(e$2e(p)){if(h){if(h=!1,!e$2e(p.merge)||!e$2e(p.clone)){u=p;break}u=p.clone(u)}u.merge(p)}}}c&&-1===l.propertyNames.indexOf(t)&&l.addProperty(t),l[t]=u},Object.defineProperties(e$B.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),e$B.prototype.getValue=function(e,t){if(!e$2e(e))throw new t$15("time is required");var i=this._intervals.findDataForIntervalContainingDate(e);if(e$2e(i))return i.getValue(e,t)},e$B.prototype.equals=function(e){return this===e||e instanceof e$B&&this._intervals.equals(e._intervals,r$_.equals)},e$B.prototype._intervalsChanged=function(){c$r(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)},Object.defineProperties(e$A.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}}),e$A.prototype.getType=function(e){if(!e$2e(e))throw new t$15("time is required");var t=this._composite._intervals.findDataForIntervalContainingDate(e);if(e$2e(t))return t.getType(e)},e$A.prototype.getValue=function(e,t){if(!e$2e(e))throw new t$15("time is required");var i=this._composite._intervals.findDataForIntervalContainingDate(e);if(e$2e(i))return i.getValue(e,t)},e$A.prototype.equals=function(e){return this===e||e instanceof e$A&&this._composite.equals(e._composite,r$_.equals)},e$A.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(t$p.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}}),t$p.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$l.FIXED,t)},t$p.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2e(e))throw new t$15("time is required.");if(!e$2e(t))throw new t$15("referenceFrame is required.");var n=this._composite._intervals.findDataForIntervalContainingDate(e);if(e$2e(n))return n.getValueInReferenceFrame(e,t,i)},t$p.prototype.equals=function(e){return this===e||e instanceof t$p&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,r$_.equals)},t$p.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var N$p=new e$1L(0);function i$x(e){i$G.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}e$2e(Object.create)&&(i$x.prototype=Object.create(i$G.prototype),i$x.prototype.constructor=i$x),Object.defineProperties(i$x.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),i$x.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!e$2e(t.height)&&!e$2e(t.extrudedHeight)&&d$15.isSupported(this._scene)},i$x.prototype._getIsClosed=function(e){var t=e.height,i=e.extrudedHeight;return 0===t||e$2e(i)&&i!==t},i$x.prototype._computeCenter=t$15.throwInstantiationError,i$x.prototype._onEntityPropertyChanged=function(e,t,i,n){if(i$G.prototype._onEntityPropertyChanged.call(this,e,t,i,n),-1!==this._observedPropertyNames.indexOf(t)){var r=this._entity[this._geometryPropertyName];if(e$2e(r)){e$2e(r.zIndex)&&(e$2e(r.height)||e$2e(r.extrudedHeight))&&e$22(e$22.geometryZIndex),this._zIndex=u$Z(r.zIndex,N$p),e$2e(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);var o=r.heightReference,a=r.extrudedHeightReference;if(e$2e(o)||e$2e(a)){var s=new n$X(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new h$E(this._scene,s,o,a)}}}},i$x.prototype.destroy=function(){e$2e(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),i$G.prototype.destroy.call(this)},i$x.getGeometryHeight=function(e,t){if(o$1q.defined("heightReference",t),e$2e(e))return t!==k$R.CLAMP_TO_GROUND?e:0;t!==k$R.NONE&&e$22(e$22.geometryHeightReference)},i$x.getGeometryExtrudedHeight=function(e,t){if(o$1q.defined("extrudedHeightReference",t),e$2e(e))return t!==k$R.CLAMP_TO_GROUND?e:i$x.CLAMP_TO_GROUND;t!==k$R.NONE&&e$22(e$22.geometryExtrudedHeightReference)},i$x.CLAMP_TO_GROUND="clamp",i$x.computeGeometryOffsetAttribute=function(e,t,i,n){(!e$2e(e)||!e$2e(t))&&(t=k$R.NONE),(!e$2e(i)||!e$2e(n))&&(n=k$R.NONE);var r=0;return t!==k$R.NONE&&r++,n===k$R.RELATIVE_TO_GROUND&&r++,2===r?_0x39c22a.ALL:1===r?_0x39c22a.TOP:void 0};var H$A=new e$1X,I$E=o$1p.ZERO,D$t=new o$1p,G$x=new h$18;function T$u(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function f$z(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new T$u(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}function l$D(e,t,i){a$C.call(this,e,t,i)}function o$B(){t$15.throwInstantiationError()}function s$o(e,t){if(e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new t$15("disableDepthTestDistance must be greater than or equal to 0.0.");var i=e.translucencyByDistance,n=e.scaleByDistance,r=e.distanceDisplayCondition;if(e$2e(i)){if(i.far<=i.near)throw new t$15("translucencyByDistance.far must be greater than translucencyByDistance.near.");i=o$Y.clone(i)}if(e$2e(n)){if(n.far<=n.near)throw new t$15("scaleByDistance.far must be greater than scaleByDistance.near.");n=o$Y.clone(n)}if(e$2e(r)){if(r.far<=r.near)throw new t$15("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");r=r$Z.clone(r)}this._show=u$Z(e.show,!0),this._position=o$1p.clone(u$Z(e.position,o$1p.ZERO)),this._actualPosition=o$1p.clone(this._position),this._color=e$1X.clone(u$Z(e.color,e$1X.WHITE)),this._outlineColor=e$1X.clone(u$Z(e.outlineColor,e$1X.TRANSPARENT)),this._outlineWidth=u$Z(e.outlineWidth,0),this._pixelSize=u$Z(e.pixelSize,10),this._scaleByDistance=n,this._translucencyByDistance=i,this._distanceDisplayCondition=r,this._disableDepthTestDistance=u$Z(e.disableDepthTestDistance,0),this._id=e.id,this._collection=u$Z(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1}e$2e(Object.create)&&(f$z.prototype=Object.create(i$x.prototype),f$z.prototype.constructor=f$z),f$z.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,H$A)),e$2e(t)||(t=e$1X.WHITE),r.color=o$16.fromColor(t));return e$2e(this._options.offsetAttribute)&&(r.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,I$E,D$t))),new d$1o({id:i,geometry:new P$F(this._options),attributes:r})},f$z.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,H$A),r={show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return e$2e(this._options.offsetAttribute)&&(r.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,I$E,D$t))),new d$1o({id:t,geometry:new V$z(this._options),attributes:r})},f$z.prototype._computeCenter=function(e,t){var i=r$_.getValueOrUndefined(this._entity.corridor.positions,e);if(e$2e(i)&&0!==i.length)return o$1p.clone(i[Math.floor(i.length/2)],t)},f$z.prototype._isHidden=function(e,t){return!e$2e(t.positions)||!e$2e(t.width)||i$G.prototype._isHidden.call(this,e,t)},f$z.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!r$_.isConstant(t.height)||!r$_.isConstant(t.extrudedHeight)||!r$_.isConstant(t.granularity)||!r$_.isConstant(t.width)||!r$_.isConstant(t.outlineWidth)||!r$_.isConstant(t.cornerType)||!r$_.isConstant(t.zIndex)||this._onTerrain&&!r$_.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$P)},f$z.prototype._setStaticOptions=function(e,t){var i=r$_.getValueOrUndefined(t.height,o$I.MINIMUM_VALUE),n=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),r=r$_.getValueOrUndefined(t.extrudedHeight,o$I.MINIMUM_VALUE),o=r$_.getValueOrDefault(t.extrudedHeightReference,o$I.MINIMUM_VALUE,k$R.NONE);e$2e(r)&&!e$2e(i)&&(i=0);var a=this._options;a.vertexFormat=this._materialProperty instanceof t$P?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,a.positions=t.positions.getValue(o$I.MINIMUM_VALUE,a.positions),a.width=t.width.getValue(o$I.MINIMUM_VALUE),a.granularity=r$_.getValueOrUndefined(t.granularity,o$I.MINIMUM_VALUE),a.cornerType=r$_.getValueOrUndefined(t.cornerType,o$I.MINIMUM_VALUE),a.offsetAttribute=i$x.computeGeometryOffsetAttribute(i,n,r,o),a.height=i$x.getGeometryHeight(i,n),(r=i$x.getGeometryExtrudedHeight(r,o))===i$x.CLAMP_TO_GROUND&&(r=e$1H.getMinimumMaximumHeights(P$F.computeRectangle(a,G$x)).minimumTerrainHeight),a.extrudedHeight=r},f$z.DynamicGeometryUpdater=l$D,e$2e(Object.create)&&(l$D.prototype=Object.create(a$C.prototype),l$D.prototype.constructor=l$D),l$D.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2e(n.positions)||!e$2e(n.width)||a$C.prototype._isHidden.call(this,e,t,i)},l$D.prototype._setOptions=function(e,t,i){var n=this._options,r=r$_.getValueOrUndefined(t.height,i),o=r$_.getValueOrDefault(t.heightReference,i,k$R.NONE),a=r$_.getValueOrUndefined(t.extrudedHeight,i),s=r$_.getValueOrDefault(t.extrudedHeightReference,i,k$R.NONE);e$2e(a)&&!e$2e(r)&&(r=0),n.positions=r$_.getValueOrUndefined(t.positions,i),n.width=r$_.getValueOrUndefined(t.width,i),n.granularity=r$_.getValueOrUndefined(t.granularity,i),n.cornerType=r$_.getValueOrUndefined(t.cornerType,i),n.offsetAttribute=i$x.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$x.getGeometryHeight(r,o),(a=i$x.getGeometryExtrudedHeight(a,s))===i$x.CLAMP_TO_GROUND&&(a=e$1H.getMinimumMaximumHeights(P$F.computeRectangle(n,G$x)).minimumTerrainHeight),n.extrudedHeight=a},Object.defineProperties(o$B.prototype,{name:{get:t$15.throwInstantiationError},clock:{get:t$15.throwInstantiationError},entities:{get:t$15.throwInstantiationError},isLoading:{get:t$15.throwInstantiationError},changedEvent:{get:t$15.throwInstantiationError},errorEvent:{get:t$15.throwInstantiationError},loadingEvent:{get:t$15.throwInstantiationError},show:{get:t$15.throwInstantiationError},clustering:{get:t$15.throwInstantiationError}}),o$B.prototype.update=t$15.throwInstantiationError,o$B.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var I$D=s$o.SHOW_INDEX=0,C$w=s$o.POSITION_INDEX=1,g$A=s$o.COLOR_INDEX=2,O$n=s$o.OUTLINE_COLOR_INDEX=3,b$A=s$o.OUTLINE_WIDTH_INDEX=4,q$u=s$o.PIXEL_SIZE_INDEX=5,A$B=s$o.SCALE_BY_DISTANCE_INDEX=6,X$n=s$o.TRANSLUCENCY_BY_DISTANCE_INDEX=7,x$y=s$o.DISTANCE_DISPLAY_CONDITION_INDEX=8,L$x=s$o.DISABLE_DEPTH_DISTANCE_INDEX=9;function c$q(e,t){var i=e._pointPrimitiveCollection;e$2e(i)&&(i._updatePointPrimitive(e,t),e._dirty=!0)}s$o.NUMBER_OF_PROPERTIES=10,Object.defineProperties(s$o.prototype,{show:{get:function(){return this._show},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._show!==e&&(this._show=e,c$q(this,I$D))}},position:{get:function(){return this._position},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._position;o$1p.equals(t,e)||(o$1p.clone(e,t),o$1p.clone(e,this._actualPosition),c$q(this,C$w))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._scaleByDistance;o$Y.equals(t,e)||(this._scaleByDistance=o$Y.clone(e,t),c$q(this,A$B))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far distance must be greater than near distance.");var t=this._translucencyByDistance;o$Y.equals(t,e)||(this._translucencyByDistance=o$Y.clone(e,t),c$q(this,X$n))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._pixelSize!==e&&(this._pixelSize=e,c$q(this,q$u))}},color:{get:function(){return this._color},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._color;e$1X.equals(t,e)||(e$1X.clone(e,t),c$q(this,g$A))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!e$2e(e))throw new t$15("value is required.");var t=this._outlineColor;e$1X.equals(t,e)||(e$1X.clone(e,t),c$q(this,O$n))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!e$2e(e))throw new t$15("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,c$q(this,b$A))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2e(e)&&e.far<=e.near)throw new t$15("far must be greater than near");r$Z.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=r$Z.clone(e,this._distanceDisplayCondition),c$q(this,x$y))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(!e$2e(e)||e<0)throw new t$15("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,c$q(this,L$x)}}},id:{get:function(){return this._id},set:function(e){this._id=e,e$2e(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,c$q(this,I$D))}}}),s$o.prototype.getPickId=function(e){return e$2e(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId},s$o.prototype._getActualPosition=function(){return this._actualPosition},s$o.prototype._setActualPosition=function(e){o$1p.clone(e,this._actualPosition),c$q(this,C$w)};var m$t=new e$2c;s$o._computeActualPosition=function(e,t,i){return t.mode===C$14.SCENE3D?e:(p$1d.multiplyByPoint(i,e,m$t),s$R.computeActualWgs84Position(t,m$t))};var E$x=new e$2c;s$o._computeScreenSpacePosition=function(e,t,i,n){var r=p$1d.multiplyByVector(e,e$2c.fromElements(t.x,t.y,t.z,1,E$x),E$x);return s$R.wgs84ToWindowCoordinates(i,r,n)},s$o.prototype.computeScreenSpacePosition=function(e,t){var i=this._pointPrimitiveCollection;if(e$2e(t)||(t=new o$1o),!e$2e(i))throw new t$15("PointPrimitive must be in a collection.");if(!e$2e(e))throw new t$15("scene is required.");var n=i.modelMatrix,r=s$o._computeScreenSpacePosition(n,this._actualPosition,e,t);if(e$2e(r))return r.y=e.canvas.clientHeight-r.y,r},s$o.getScreenSpaceBoundingBox=function(e,t,i){var n=e.pixelSize,r=.5*n,o=t.x-r,a=t.y-r,s=n,l=n;return e$2e(i)||(i=new f$1a),i.x=o,i.y=a,i.width=s,i.height=l,i},s$o.prototype.equals=function(e){return this===e||e$2e(e)&&this._id===e._id&&o$1p.equals(this._position,e._position)&&e$1X.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&e$1X.equals(this._outlineColor,e._outlineColor)&&o$Y.equals(this._scaleByDistance,e._scaleByDistance)&&o$Y.equals(this._translucencyByDistance,e._translucencyByDistance)&&r$Z.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},s$o.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var X$m="varying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nvarying vec2 v_offset;\nvoid main()\n{\nif(length(v_offset) > 0.5){\ndiscard;\n}\nfloat distanceToCenter = 0.0;\nfloat maxDistance = max(0.0, 0.5 - v_pixelDistance);\nfloat wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\nfloat innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);\nvec4 color = mix(v_outlineColor, v_color, innerAlpha);\ncolor.a *= wholeAlpha;\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\nif (color.a < 0.005)\n{\ndiscard;\n}\n#else\n#ifdef OPAQUE\nif (color.a < 0.995)\n{\ndiscard;\n}\n#else\nif (color.a >= 0.995)\n{\ndiscard;\n}\n#endif\n#endif\ngl_FragColor = czm_gammaCorrect(color);\nczm_writeLogDepth();\n}\n",Pe$8="uniform float u_maxTotalPointSize;\nattribute vec2 offset;\nattribute vec4 positionHighAndSize;\nattribute vec4 positionLowAndOutline;\nattribute vec4 compressedAttribute0;\nattribute vec4 compressedAttribute1;\nattribute vec4 scaleByDistance;\nattribute vec3 distanceDisplayConditionAndDisableDepth;\nvarying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nvarying vec2 v_offset;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nfloat computerOnePixelLength(vec4 viewPos)\n{\nvec4 winPos = czm_projection * viewPos;\nfloat dwidth = czm_metersPerPixel(viewPos);\nwinPos.x = winPos.x - 2.0 * dwidth;\nvec4 newViewPos = czm_inverseProjection * winPos;\nreturn length(viewPos - newViewPos);\n}\nvoid main()\n{\nvec3 positionHigh = positionHighAndSize.xyz;\nvec3 positionLow = positionLowAndOutline.xyz;\nfloat outlineWidthBothSides = 2.0 * positionLowAndOutline.w;\nfloat totalSize = positionHighAndSize.w + outlineWidthBothSides;\nfloat outlinePercent = outlineWidthBothSides / totalSize;\ntotalSize *= czm_pixelRatio;\ntotalSize += 3.0;\nfloat temp = compressedAttribute1.x * SHIFT_RIGHT8;\nfloat show = floor(temp);\n#ifdef EYE_DISTANCE_TRANSLUCENCY\nvec4 translucencyByDistance;\ntranslucencyByDistance.x = compressedAttribute1.z;\ntranslucencyByDistance.z = compressedAttribute1.w;\ntranslucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\ntemp = compressedAttribute1.y * SHIFT_RIGHT8;\ntranslucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\nvec4 color;\nvec4 outlineColor;\nvec4 pickColor;\ntemp = compressedAttribute0.z * SHIFT_RIGHT8;\npickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor.r = floor(temp);\ntemp = compressedAttribute0.x * SHIFT_RIGHT8;\ncolor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\ncolor.g = (temp - floor(temp)) * SHIFT_LEFT8;\ncolor.r = floor(temp);\ntemp = compressedAttribute0.y * SHIFT_RIGHT8;\noutlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.r = floor(temp);\ntemp = compressedAttribute0.w * SHIFT_RIGHT8;\npickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor = pickColor / 255.0;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor /= 255.0;\ncolor.a = floor(temp);\ncolor /= 255.0;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nlengthSq = dot(positionEC.xyz, positionEC.xyz);\n}\n#endif\n#ifdef EYE_DISTANCE_SCALING\ntotalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);\n#endif\nif (totalSize < 1.0)\n{\npositionEC.xyz = vec3(0.0);\ntotalSize = 1.0;\n}\nfloat translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\ntranslucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\nif (translucency < 0.004)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\n#ifdef DISTANCE_DISPLAY_CONDITION\nfloat nearSq = distanceDisplayConditionAndDisableDepth.x;\nfloat farSq = distanceDisplayConditionAndDisableDepth.y;\nif (lengthSq < nearSq || lengthSq > farSq) {\npositionEC.xyz = vec3(0.0, 0.0, 1.0);\n}\n#endif\npositionEC.xy = positionEC.xy + offset * computerOnePixelLength(positionEC) * totalSize;\ngl_Position = czm_projection * positionEC;\nczm_vertexLogDepth();\n#ifdef DISABLE_DEPTH_DISTANCE\nfloat disableDepthTestDistance = distanceDisplayConditionAndDisableDepth.z;\nif (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n{\ndisableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n}\nif (disableDepthTestDistance != 0.0)\n{\nfloat zclip = gl_Position.z / gl_Position.w;\nbool clipped = (zclip < -1.0 || zclip > 1.0);\nif (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n{\ngl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth(vec4(czm_currentFrustum.x));\n#endif\n}\n}\n#endif\nv_color = color;\nv_color.a *= translucency * show;\nv_outlineColor = outlineColor;\nv_outlineColor.a *= translucency * show;\nv_innerPercent = 1.0 - outlinePercent;\nv_pixelDistance = 2.0 / totalSize;\nv_offset = offset;\ngl_Position *= show;\nv_pickColor = pickColor;\n}\n",Le$b=s$o.SHOW_INDEX,Z$s=s$o.POSITION_INDEX,de$c=s$o.COLOR_INDEX,Ve$9=s$o.OUTLINE_COLOR_INDEX,Ue$9=s$o.OUTLINE_WIDTH_INDEX,we$8=s$o.PIXEL_SIZE_INDEX,_e$9=s$o.SCALE_BY_DISTANCE_INDEX,pe$h=s$o.TRANSLUCENCY_BY_DISTANCE_INDEX,le$g=s$o.DISTANCE_DISPLAY_CONDITION_INDEX,Re$9=s$o.DISABLE_DEPTH_DISTANCE_INDEX,q$t=s$o.NUMBER_OF_PROPERTIES,p$s={offset:0,positionHighAndSize:1,positionLowAndOutline:2,compressedAttribute0:3,compressedAttribute1:4,scaleByDistance:5,distanceDisplayConditionAndDisableDepth:6};function D$s(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(q$t),this._maxPixelSize=1,this._baseVolume=new i$1d,this._baseVolumeWC=new i$1d,this._baseVolume2D=new i$1d,this._boundingVolume=new i$1d,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.blendOption=u$Z(e.blendOption,S$L.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=C$14.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW,A$18.STATIC_DRAW];var t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}},this.depthTestEnabled=u$Z(e.depthTestEnabled,!0)}function ue$d(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function J$q(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;for(var t=[],i=e._pointPrimitives,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._pointPrimitives=t}}function Me$c(e,t,i){return new v$F(e,[{index:p$s.positionHighAndSize,name:"positionHighAndSize",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Z$s]},{index:p$s.positionLowAndOutline,name:"positionLowAndOutline",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[Z$s]},{index:p$s.compressedAttribute0,name:"compressedAttribute0",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[de$c]},{index:p$s.compressedAttribute1,name:"compressedAttribute1",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[pe$h]},{index:p$s.scaleByDistance,name:"scaleByDistance",componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:i[_e$9]},{index:p$s.distanceDisplayConditionAndDisableDepth,name:"distanceDisplayConditionAndDisableDepth",componentsPerAttribute:3,componentDatatype:S$14.FLOAT,usage:i[le$g]},{name:"offset",index:p$s.offset,vertexBuffer:e.createBillboardOffsetVertexBuffer(),componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}],t,!0)}Object.defineProperties(D$s.prototype,{length:{get:function(){return J$q(this),this._pointPrimitives.length}}}),D$s.prototype.add=function(e){var t=new s$o(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t},D$s.prototype.remove=function(e){return!!this.contains(e)&&(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},D$s.prototype.removeAll=function(){ue$d(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0},D$s.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]},D$s.prototype.contains=function(e){return e$2e(e)&&e._pointPrimitiveCollection===this},D$s.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return J$q(this),this._pointPrimitives[e]},D$s.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,n=0;n<q$t;++n){var r=0===i[n]?A$18.STATIC_DRAW:A$18.STREAM_DRAW;t=t||e[n]!==r,e[n]=r}return t};var K$p=new i$12;function ce$f(e,t,i,n){var r=n._index,o=n._getActualPosition();e._mode===C$14.SCENE3D&&(i$1d.expand(e._baseVolume,o,e._baseVolume),e._boundingVolumeDirty=!0),i$12.fromCartesian(o,K$p);var a=n.pixelSize,s=n.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,a+s);var l=i[p$s.positionHighAndSize],u=K$p.high;l(r,u.x,u.y,u.z,a);var c=i[p$s.positionLowAndOutline],h=K$p.low;c(r,h.x,h.y,h.z,s)}var z$u=65536,L$w=256;function fe$d(e,t,i,n){var r=n._index,o=n.color,a=n.getPickId(t).color,s=n.outlineColor,l=e$1X.floatToByte(o.red),u=e$1X.floatToByte(o.green),c=e$1X.floatToByte(o.blue),h=l*z$u+u*L$w+c;l=e$1X.floatToByte(s.red),u=e$1X.floatToByte(s.green),c=e$1X.floatToByte(s.blue);var d=l*z$u+u*L$w+c;l=e$1X.floatToByte(a.red),u=e$1X.floatToByte(a.green),c=e$1X.floatToByte(a.blue);var f=l*z$u+u*L$w+c,p=e$1X.floatToByte(o.alpha)*z$u+e$1X.floatToByte(s.alpha)*L$w+e$1X.floatToByte(a.alpha);(0,i[p$s.compressedAttribute0])(r,h,d,f,p)}function me$h(e,t,i,n){var r=n._index,o=0,a=1,s=1,l=1,u=n.translucencyByDistance;e$2e(u)&&(o=u.near,a=u.nearValue,s=u.far,l=u.farValue,(1!==a||1!==l)&&(e._shaderTranslucencyByDistance=!0));var c=n.show&&n.clusterShow;0===n.color.alpha&&0===n.outlineColor.alpha&&(c=!1),a=e$2d.clamp(a,0,1);var h=(c?1:0)*L$w+(a=1===a?255:255*a|0),d=l=1===(l=e$2d.clamp(l,0,1))?255:255*l|0;(0,i[p$s.compressedAttribute1])(r,h,d,o,s)}function De$b(e,t,i,n){var r=n._index,o=i[p$s.scaleByDistance],a=0,s=1,l=1,u=1,c=n.scaleByDistance;e$2e(c)&&(a=c.near,s=c.nearValue,l=c.far,u=c.farValue,(1!==s||1!==u)&&(e._shaderScaleByDistance=!0)),o(r,a,s,l,u)}function ve$c(e,t,i,n){var r=n._index,o=i[p$s.distanceDisplayConditionAndDisableDepth],a=0,s=Number.MAX_VALUE,l=n.distanceDisplayCondition;e$2e(l)&&(a=l.near,s=l.far,a*=a,s*=s,e._shaderDistanceDisplayCondition=!0);var u=n.disableDepthTestDistance;(u*=u)>0&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1)),o(r,a,s,u)}function Xe$6(e,t,i,n){ce$f(e,t,i,n),fe$d(e,t,i,n),me$h(e,t,i,n),De$b(e,t,i,n),ve$c(e,t,i,n)}function $$q(e,t,i,n,r,o){var a;n.mode===C$14.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=s$o._computeActualPosition(c,n,r);e$2e(h)&&(u._setActualPosition(h),o?s.push(h):i$1d.expand(a,h,a))}o&&i$1d.fromPoints(s,a)}function ze$9(e,t){var i=t.mode,n=e._pointPrimitives,r=e._pointPrimitivesToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==C$14.SCENE3D&&!p$1d.equals(o,e.modelMatrix)?(e._mode=i,p$1d.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===C$14.SCENE3D||i===C$14.SCENE2D||i===C$14.COLUMBUS_VIEW)&&$$q(e,n,n.length,t,o,!0)):i===C$14.MORPHING?$$q(e,n,n.length,t,o,!0):(i===C$14.SCENE2D||i===C$14.COLUMBUS_VIEW)&&$$q(e,r,e._pointPrimitivesToUpdateIndex,t,o,!1)}function Fe$a(e,t,i){var n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;i.radius+=n}var We$7=[];function a$r(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._enabled=u$Z(e.enabled,!1),this._pixelRange=u$Z(e.pixelRange,80),this._minimumClusterSize=u$Z(e.minimumClusterSize,1),this._clusterBillboards=u$Z(e.clusterBillboards,!0),this._clusterLabels=u$Z(e.clusterLabels,!0),this._clusterPoints=u$Z(e.clusterPoints,!0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new o$1h}function ci$4(e){return e.coord.x}function di$3(e){return e.coord.y}function Z$r(e,t){e.x-=t,e.y-=t,e.width+=2*t,e.height+=2*t}D$s.prototype.update=function(e){if(e.multiViewportIndex>-1&&this._pointPrimitives.length>0&&e$2e(this._pointPrimitives[0])&&e$2e(this._pointPrimitives[0].id)&&e$2e(this._pointPrimitives[0].id.entityCollection)&&e$2e(this._pointPrimitives[0].id.entityCollection.owner)){var t=this._pointPrimitives[0].id.entityCollection.owner;if(typeof t.getVisibleInViewport<"u")if(!t.getVisibleInViewport(e.multiViewportIndex))return}J$q(this),this._maxTotalPointSize=e$1W.maximumAliasedPointSize,ze$9(this,e);var i,n=this._pointPrimitives.length,r=this._pointPrimitivesToUpdate,o=this._pointPrimitivesToUpdateIndex,a=this._propertiesChanged,s=this._createVertexArray,l=e.context,u=e.passes,c=u.pick;if(s||!c&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var h=0;h<q$t;++h)a[h]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=Me$c(l,n,this._buffersUsage),i=this._vaf.writers;for(var d=0;d<n;++d){var f=this._pointPrimitives[d];f._dirty=!1,Xe$6(this,l,i,f)}this._vaf.commit(l.createBillboardPointIndexBuffer())}this._pointPrimitivesToUpdateIndex=0}else if(o>0){var p=We$7;p.length=0,(a[Z$s]||a[Ue$9]||a[we$8])&&p.push(ce$f),(a[de$c]||a[Ve$9])&&p.push(fe$d),(a[Le$b]||a[pe$h])&&p.push(me$h),a[_e$9]&&p.push(De$b),(a[le$g]||a[Re$9])&&p.push(ve$c);var _=p.length;if(i=this._vaf.writers,o/n>.1){for(var m=0;m<o;++m){var g=r[m];g._dirty=!1;for(var x=0;x<_;++x)p[x](this,l,i,g)}this._vaf.commit(l.createBillboardPointIndexBuffer())}else{for(var y=0;y<o;++y){var v=r[y];v._dirty=!1;for(var $=0;$<_;++$)p[$](this,l,i,v);this._vaf.subCommit(v._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(o>1.5*n&&(r.length=n),e$2e(this._vaf)&&e$2e(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,i$1d.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var b,T=p$1d.IDENTITY;e.mode===C$14.SCENE3D?(T=this.modelMatrix,b=i$1d.clone(this._baseVolumeWC,this._boundingVolume)):b=i$1d.clone(this._baseVolume2D,this._boundingVolume),Fe$a(this,e,b);var C,S,w=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,w&&(this._blendOption===S$L.OPAQUE||this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=d$1m.fromCache({depthTest:{enabled:this.depthTestEnabled,func:de$y.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===S$L.TRANSLUCENT||this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=d$1m.fromCache({depthTest:{enabled:!0,func:de$y.LEQUAL},depthMask:!1,blending:Ee$r.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance,(w||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(C=new s$V({name:"PointPrimitiveCollectionVS",sources:[Pe$8]}),this._shaderScaleByDistance&&C.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&C.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&C.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&C.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT&&(S=new s$V({name:"PointPrimitiveCollectionFS",defines:["OPAQUE"],sources:[X$m]}),this._sp=r$14.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s}),S=new s$V({name:"PointPrimitiveCollectionFS",defines:["TRANSLUCENT"],sources:[X$m]}),this._spTranslucent=r$14.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s})),this._blendOption===S$L.OPAQUE&&(S=new s$V({name:"PointPrimitiveCollectionFS",sources:[X$m]}),this._sp=r$14.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s})),this._blendOption===S$L.TRANSLUCENT&&(S=new s$V({name:"PointPrimitiveCollectionFS",sources:[X$m]}),this._spTranslucent=r$14.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:C,fragmentShaderSource:S,attributeLocations:p$s})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);var E,P,A,L,M=e.commandList;if(e._fboState.frameBufferType!=Qe$c.CLAMP&&(u.render||c)){var R=this._colorCommands,O=this._blendOption===S$L.OPAQUE,D=this._blendOption===S$L.OPAQUE_AND_TRANSLUCENT;P=(E=this._vaf.va).length,R.length=P;var I=D?2*P:P;for(L=0;L<I;++L){var B=O||D&&L%2==0;e$2e(A=R[L])||(A=R[L]=new i$$),A.primitiveType=W$18.TRIANGLES,A.pass=B||!D?Le$q.OPAQUE:Le$q.TRANSLUCENT,A.owner=this,A.instanceCount=this._pointPrimitives.length;var F=D?Math.floor(L/2):L;A.boundingVolume=b,A.modelMatrix=T,A.shaderProgram=B?this._sp:this._spTranslucent,A.uniformMap=this._uniforms,A.vertexArray=E[F].va,A.renderState=B?this._rsOpaque:this._rsTranslucent,A.debugShowBoundingVolume=this.debugShowBoundingVolume,A.pickId="v_pickColor",M.push(A)}}}},D$s.prototype.isDestroyed=function(){return!1},D$s.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),ue$d(this._pointPrimitives),i$11(this)};var ai$2=new f$1a;function G$w(e,t,i,n,r){if(e$2e(e._labelCollection)&&n._clusterLabels?r=D$R.getScreenSpaceBoundingBox(e,t,r):e$2e(e._billboardCollection)&&n._clusterBillboards?r=n$J.getScreenSpaceBoundingBox(e,t,r):e$2e(e._pointPrimitiveCollection)&&n._clusterPoints&&(r=s$o.getScreenSpaceBoundingBox(e,t,r)),Z$r(r,i),n._clusterLabels&&!e$2e(e._labelCollection)&&e$2e(e.id)&&J$p(n,e.id.id)&&e$2e(e.id._label)){var o=n._collectionIndicesByEntity[e.id.id].labelIndex,a=n._labelCollection.get(o),s=a.getScreenSpaceBoundingBox(a,t,ai$2);Z$r(s,i),r=f$1a.union(r,s,r)}return r}function ui$3(e,t){if(e.clusterShow=!0,!e$2e(e._labelCollection)&&e$2e(e.id)&&J$p(t,e.id.id)&&e$2e(e.id._label)){var i=t._collectionIndicesByEntity[e.id.id].labelIndex;t._labelCollection.get(i).clusterShow=!0}}function hi$3(e,t,i,n){var r={billboard:n._clusterBillboardCollection.add(),label:n._clusterLabelCollection.add(),point:n._clusterPointCollection.add()};r.billboard.show=!1,r.point.show=!1,r.label.show=!0,r.label.text=t.toLocaleString(),r.label.id=i,r.billboard.position=r.label.position=r.point.position=e,n._clusterEvent.raiseEvent(i,r)}function J$p(e,t){return e$2e(e)&&e$2e(e._collectionIndicesByEntity[t])&&e$2e(e._collectionIndicesByEntity[t].labelIndex)}function z$t(e,t,i,n,r){if(e$2e(e))for(var o=e.length,a=0;a<o;++a){var s=e.get(a);if(s.clusterShow=!1,s.show&&(r._scene.mode!==C$14.SCENE3D||n.isPointVisible(s.position))){var l=r._clusterLabels&&e$2e(s._labelCollection),u=r._clusterBillboards&&e$2e(s.id._billboard),c=r._clusterPoints&&e$2e(s.id._point);if(!l||!c&&!u){var h=s.computeScreenSpacePosition(i);!e$2e(h)||t.push({index:a,collection:e,clustered:!1,coord:h})}}}}var _i$4=new f$1a,bi$4=new f$1a,fi$3=new f$1a;function gi$4(e){return function(t){if(!(e$2e(t)&&t<.05)&&e.enabled){var i=e._scene,n=e._labelCollection,r=e._billboardCollection,o=e._pointCollection;if((e$2e(n)||e$2e(r)||e$2e(o))&&(e._clusterBillboards||e._clusterLabels||e._clusterPoints)){var a=e._clusterLabelCollection,s=e._clusterBillboardCollection,l=e._clusterPointCollection;e$2e(a)?a.removeAll():a=e._clusterLabelCollection=new g$W({scene:i}),e$2e(s)?s.removeAll():s=e._clusterBillboardCollection=new w$O({scene:i}),e$2e(l)?l.removeAll():l=e._clusterPointCollection=new D$s;var u=e._pixelRange,c=e._minimumClusterSize;e._previousClusters;var h=[];e._previousHeight;var d=i.camera.positionCartographic.height,f=i.mapProjection.ellipsoid,p=i.camera.positionWC,_=new s$H(f,p),m=[];e._clusterLabels&&z$t(n,m,i,_,e),e._clusterBillboards&&z$t(r,m,i,_,e),e._clusterPoints&&z$t(o,m,i,_,e);var g,x,y,v,$,b,T,C,S,w,E,P=O$D(m,ci$4,di$3,4096,Int32Array);for(y=m.length,g=0;g<y;++g){var A=m[g];if(!A.clustered){A.clustered=!0,w=A.collection,E=A.index;var L=w.get(E);v=G$w(L,A.coord,u,e,_i$4);var M=f$1a.clone(v,bi$4);b=($=P.intersect(v.x,v.y,v.x+v.width,v.y+v.height)).length;var R=o$1p.clone(L.position);S=1,C=[L.id];var O=o$1p.distanceSquared(p,R);for(x=0;x<b;++x)if(!(T=m[$[x]]).clustered){var D=T.collection.get(T.index),I=G$w(D,T.coord,u,e,fi$3);o$1p.distanceSquared(p,D.position)<O&&(R=o$1p.clone(D.position)),f$1a.union(M,I,M),++S,C.push(D.id)}if(S>=c){var B=o$1p.clone(R);for(hi$3(B,S,C,e),h.push({position:B,width:M.width,height:M.height,minimumWidth:v.width,minimumHeight:v.height}),x=0;x<b;++x)m[$[x]].clustered=!0}else ui$3(L,e)}}0===a.length&&(a.destroy(),e._clusterLabelCollection=void 0),0===s.length&&(s.destroy(),e._clusterBillboardCollection=void 0),0===l.length&&(l.destroy(),e._clusterPointCollection=void 0),e._previousClusters=h,e._previousHeight=d}}}}function R$p(e,t,i,n){return function(r){var o=this[e];e$2e(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});var a=this._collectionIndicesByEntity[r.id];if(e$2e(a)||(a=this._collectionIndicesByEntity[r.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),e$2e(o)&&e$2e(a[n]))return o.get(a[n]);e$2e(o)||(o=this[e]=new t({scene:this._scene}));var s,l,u=this[i];return u.length>0?(s=u.pop(),l=o.get(s)):(l=o.add(),s=o.length-1),a[n]=s,this._clusterDirty=!0,l}}function Y$o(e,t){var i=e._collectionIndicesByEntity[t];!e$2e(i.billboardIndex)&&!e$2e(i.labelIndex)&&!e$2e(i.pointIndex)&&delete e._collectionIndicesByEntity[t]}function M$w(e){if(e$2e(e))for(var t=e.length,i=0;i<t;++i)e.get(i).clusterShow=!0}function pi$4(e){e.enabled||(e$2e(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),e$2e(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),e$2e(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,M$w(e._labelCollection),M$w(e._billboardCollection),M$w(e._pointCollection))}function n$o(e){this._name=e,this._clock=void 0,this._changed=new o$1h,this._error=new o$1h,this._isLoading=!1,this._loading=new o$1h,this._entityCollection=new r$v(this),this._entityCluster=new a$r}function K$o(e){this.id=e,this.vertexFormat=void 0,this.slices=void 0,this.offsetAttribute=void 0}a$r.prototype._initialize=function(e){this._scene=e;var t=gi$4(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)},Object.defineProperties(a$r.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}}}),a$r.prototype.getLabel=R$p("_labelCollection",g$W,"_unusedLabelIndices","labelIndex"),a$r.prototype.removeLabel=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(e$2e(this._labelCollection)&&e$2e(t)&&e$2e(t.labelIndex)){var i=t.labelIndex;t.labelIndex=void 0,Y$o(this,e.id);var n=this._labelCollection.get(i);n.show=!1,n.text="",n.id=void 0,this._unusedLabelIndices.push(i),this._clusterDirty=!0}},a$r.prototype.getBillboard=R$p("_billboardCollection",w$O,"_unusedBillboardIndices","billboardIndex"),a$r.prototype.removeBillboard=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(e$2e(this._billboardCollection)&&e$2e(t)&&e$2e(t.billboardIndex)){var i=t.billboardIndex;t.billboardIndex=void 0,Y$o(this,e.id);var n=this._billboardCollection.get(i);n.id=void 0,n.show=!1,n.image=void 0,this._unusedBillboardIndices.push(i),this._clusterDirty=!0}},a$r.prototype.getPoint=R$p("_pointCollection",D$s,"_unusedPointIndices","pointIndex"),a$r.prototype.removePoint=function(e){var t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(e$2e(this._pointCollection)&&e$2e(t)&&e$2e(t.pointIndex)){var i=t.pointIndex;t.pointIndex=void 0,Y$o(this,e.id);var n=this._pointCollection.get(i);n.show=!1,n.id=void 0,this._unusedPointIndices.push(i),this._clusterDirty=!0}},a$r.prototype.update=function(e){var t;e$2e(this._labelCollection)&&this._labelCollection.length>0&&0===this._labelCollection.get(0)._glyphs.length&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),e$2e(this._billboardCollection)&&this._billboardCollection.length>0&&!e$2e(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,pi$4(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),e$2e(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),e$2e(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),e$2e(this._clusterPointCollection)&&this._clusterPointCollection.update(e),e$2e(this._labelCollection)&&this._labelCollection.update(e),e$2e(this._billboardCollection)&&this._billboardCollection.update(e),e$2e(this._pointCollection)&&this._pointCollection.update(e)},a$r.prototype.destroy=function(){this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),e$2e(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1},Object.defineProperties(n$o.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){o$B.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2e(e))throw new t$15("value must be defined.");this._entityCluster=e}}});var N$o=new i$W("ruleModeling"),i$w={unResolved:0,parsing:1,resolved:2,failed:3};function m$s(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new K$o(e),geometryPropertyName:"geometry",observedPropertyNames:["loftParam","geometry","children","orientation","scale","position"]}),this.asynchronous=!1,this.twoPasses=!0,this.wrapS=q$1a.REPEAT,this.wrapT=q$1a.REPEAT,this.compressVertices=!1;var i=this;e$2e(e.geometry)&&(e.geometry.outlineWidth=new e$1L(e.geometry.outlineWidth||1),this._outline=new e$1L(e.geometry.outline||!1),Object.defineProperties(e.geometry,{outline:{get:function(){return i._outline},set:function(t){t!==i._outline&&(!0===t?(i._outline.setValue(!0),e.geometry.outlineWidth=new e$1L(e.geometry.outlineWidth||1),i._onEntityPropertyChanged(e,"geometry",e.geometry,void 0)):i._outline.setValue(!1))}}})),this._onEntityPropertyChanged(e,"geometry",e.geometry,void 0),this.geometryState=i$w.unResolved,this.outlineState=i$w.unResolved}function Q$r(e,t){var i={attrLocation:{aPosition:0},vertexAttributes:[{componentsPerAttribute:3,typedArray:new Float32Array(e)}]},n=[{indexType:1,indicesTypedArray:new Uint32Array(t)}];return _0x28a85f.createEdgeData(i,n)}e$2e(Object.create)&&(m$s.prototype=Object.create(i$G.prototype),m$s.prototype.constructor=m$s),Object.defineProperties(m$s.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),m$s.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");if(this._options.instance instanceof d$1o)return this._options.instance;if(this.geometryState===i$w.unResolved){var t=N$o.scheduleTask({loftParam:this._options.loftParam,linearExtrudeParam:this._options.linearExtrudeParam,rotateExtrudeParam:this._options.rotateExtrudeParam},[]);if(!e$2e(t))return"unResolve";this.geometryState=i$w.parsing;var i=this;return t.then((function(t){if("notReady"!==t){if(!e$2e(t))return i.geometry=null,void(i.geometryState=i$w.resolved);var n,r,o=[],a=i._entity;n=e$2e(a.orientation)?a.orientation.getValue(e):{heading:0,pitch:0,roll:0},r=e$2e(a.scale)?a.scale.getValue(e):{x:1,y:1,z:1};for(var s=0;s<t.length;s++){var l=t[s].vertex.typedArray,u=t[s].indices.typedArray,c=t[s].normal,h=t[s].uv,d=t[s].position,f=a.isAvailable(e);(!e$2e(a.position)||!e$2e(a.position.getValue(e)))&&(a.position=d);var p=new a$_({position:new o$1c({componentDatatype:S$14.DOUBLE,componentsPerAttribute:3,values:new Float64Array(l)}),normal:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:new Float32Array(c)}),st:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:new Float32Array(h)})});0===h.length&&delete p.st;var _=i$1d.fromVertices(new Float64Array(l),new o$1p(0,0,0),3),m=new I$1p({attributes:p,indices:u,primitiveType:W$18.TRIANGLES,boundingSphere:_});0===c.length&&(m=k$14.computeNormal(m)),d=a.position.getValue(e);var g=m$19.headingPitchRollToFixedFrame(o$1p.fromDegrees(d.x,d.y,d.z),new i$16(n.heading,n.pitch,n.roll),t$12.WGS84,m$19.eastNorthUpToFixedFrame);p$1d.multiplyByScale(g,r,g),o.push(new d$1o({id:a,geometry:m,modelMatrix:g,attributes:{show:new e$1I(f&&a.isShowing&&i._showProperty.getValue(e))}}))}if(o.length>1){var x=[];for(s=0;s<o.length;s++){var y=new a$R(a.geometry.material);y._unique=!0;var v=new h$W({geometry:{instance:o[s],material:y}});v.position=d,x.push(v)}a.children=x,i.geometry=null,i.geometryState=i$w.resolved}else i.geometry=o[0],i.geometryState=i$w.resolved}else i.geometryState=i$w.unResolved})).otherwise((function(){i.geometryState=i$w.failed})),"unResolve"}return this.geometryState===i$w.parsing?"unResolve":this.geometryState===i$w.failed?null:this.geometry},m$s.prototype.createOutlineGeometryInstance=function(e){var t,i,n,r=this._options.loftParam,o=this._options.linearExtrudeParam,a=this._options.rotateExtrudeParam;if(this.outlineState===i$w.unResolved){if(e$2e(r)){var s={createTexCoord:r.buildParam.createTexCoord,generateNormal:r.buildParam.generateNormal,group:!0,att:r.buildParam.att,splitSegment:r.buildParam.splitSegment,splitSide:r.buildParam.splitSide,chamferFactor:r.buildParam.chamferFactor,segmentClosed:r.buildParam.segmentClosed,normalAngle:r.buildParam.normalAngle};t={line:r.line,region:r.region,buildParam:s,uvwParam:r.uvwParam}}else if(e$2e(o)){s={createTexCoord:o.buildParam.createTexCoord,generateNormal:o.buildParam.generateNormal,group:!0,att:o.buildParam.att,height:o.buildParam.height,scaleX:o.buildParam.scaleX,scaleY:o.buildParam.scaleY,normalAngle:o.buildParam.normalAngle};i={region:o.region,buildParam:s,uvwParam:o.uvwParam}}else if(e$2e(a)){s={createTexCoord:a.buildParam.createTexCoord,generateNormal:a.buildParam.generateNormal,group:!0,att:a.buildParam.att,normalAngle:a.buildParam.normalAngle,slices:a.buildParam.slices,angle:a.buildParam.angle};n={region:a.geometry,buildParam:s,uvwParam:a.uvwParam}}var l=N$o.scheduleTask({loftParam:t,linearExtrudeParam:i,rotateExtrudeParam:n},[]);if(!e$2e(l))return this.createOutlineGeometryInstance();this.outlineState=i$w.parsing;var u=this;l.then((function(e){if("notReady"===e)return u.outlineState=i$w.unResolved,void u.createOutlineGeometryInstance();var t=e[0].vertex.typedArray,i=e[0].indices.typedArray,n=u._entity,r=Q$r(t,i),o=i$1d.fromVertices(new Float64Array(t),new o$1p(0,0,0),3);n.boundingSphere=o,n.edgedata=r,u.outlineState=i$w.resolved}))}return null},m$s.prototype._isDynamic=function(e,t){return!1},m$s.prototype.isOutlineVisible=function(e){return!0},m$s.prototype._setStaticOptions=function(e,t){var i=this._options;i.loftParam=t.loftParam,i.linearExtrudeParam=t.linearExtrudeParam,i.rotateExtrudeParam=t.rotateExtrudeParam,i.instance=t.instance},m$s.prototype._onEntityPropertyChanged=a$B;var P$r=o$1p.ZERO,U$t=new o$1p,N$n=new o$1p,D$r=new e$1X;function x$x(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function s$n(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new x$x(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}function f$y(e,t,i){a$C.call(this,e,t,i)}function e$z(){this._definitionChanged=new o$1h,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}e$2e(Object.create)&&(s$n.prototype=Object.create(i$G.prototype),s$n.prototype.constructor=s$n),Object.defineProperties(s$n.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),s$n.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:t$A.fromDistanceDisplayCondition(o),color:void 0,offset:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,D$r)),e$2e(t)||(t=e$1X.WHITE),a.color=o$16.fromColor(t));return e$2e(this._options.offsetAttribute)&&(a.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,P$r,U$t))),new d$1o({id:i,geometry:new l$Q(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:a})},s$n.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,D$r),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r),offset:void 0};return e$2e(this._options.offsetAttribute)&&(o.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,P$r,U$t))),new d$1o({id:t,geometry:new d$Z(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:o})},s$n.prototype._computeCenter=function(e,t){return r$_.getValueOrUndefined(this._entity.position,e,t)},s$n.prototype._isHidden=function(e,t){return!e$2e(e.position)||!e$2e(t.length)||!e$2e(t.topRadius)||!e$2e(t.bottomRadius)||i$G.prototype._isHidden.call(this,e,t)},s$n.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$_.isConstant(e.orientation)&&t.length.isConstant&&t.topRadius.isConstant&&t.bottomRadius.isConstant&&r$_.isConstant(t.slices)&&r$_.isConstant(t.outlineWidth)&&r$_.isConstant(t.numberOfVerticalLines))},s$n.prototype._setStaticOptions=function(e,t){var i=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$P?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,n.length=t.length.getValue(o$I.MINIMUM_VALUE),n.topRadius=t.topRadius.getValue(o$I.MINIMUM_VALUE),n.bottomRadius=t.bottomRadius.getValue(o$I.MINIMUM_VALUE),n.slices=r$_.getValueOrUndefined(t.slices,o$I.MINIMUM_VALUE),n.numberOfVerticalLines=r$_.getValueOrUndefined(t.numberOfVerticalLines,o$I.MINIMUM_VALUE),n.offsetAttribute=i!==k$R.NONE?_0x39c22a.ALL:void 0},s$n.prototype._onEntityPropertyChanged=a$B,s$n.DynamicGeometryUpdater=f$y,e$2e(Object.create)&&(f$y.prototype=Object.create(a$C.prototype),f$y.prototype.constructor=f$y),f$y.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2e(r$_.getValueOrUndefined(e.position,i,N$n))||!e$2e(n.length)||!e$2e(n.topRadius)||!e$2e(n.bottomRadius)||a$C.prototype._isHidden.call(this,e,t,i)},f$y.prototype._setOptions=function(e,t,i){var n=r$_.getValueOrDefault(t.heightReference,i,k$R.NONE),r=this._options;r.length=r$_.getValueOrUndefined(t.length,i),r.topRadius=r$_.getValueOrUndefined(t.topRadius,i),r.bottomRadius=r$_.getValueOrUndefined(t.bottomRadius,i),r.slices=r$_.getValueOrUndefined(t.slices,i),r.numberOfVerticalLines=r$_.getValueOrUndefined(t.numberOfVerticalLines,i),r.offsetAttribute=n!==k$R.NONE?_0x39c22a.ALL:void 0},Object.defineProperties(e$z.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:c$X("startTime"),stopTime:c$X("stopTime"),currentTime:c$X("currentTime"),clockRange:c$X("clockRange"),clockStep:c$X("clockStep"),multiplier:c$X("multiplier")}),e$z.prototype.clone=function(e){return e$2e(e)||(e=new e$z),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e},e$z.prototype.equals=function(e){return this===e||e$2e(e)&&a$15.equals(this.startTime,e.startTime)&&a$15.equals(this.stopTime,e.stopTime)&&a$15.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier},e$z.prototype.merge=function(e){if(!e$2e(e))throw new t$15("source is required.");this.startTime=u$Z(this.startTime,e.startTime),this.stopTime=u$Z(this.stopTime,e.stopTime),this.currentTime=u$Z(this.currentTime,e.currentTime),this.clockRange=u$Z(this.clockRange,e.clockRange),this.clockStep=u$Z(this.clockStep,e.clockStep),this.multiplier=u$Z(this.multiplier,e.multiplier)},e$z.prototype.getValue=function(e){return e$2e(e)||(e=new u$H),e.startTime=u$Z(this.startTime,e.startTime),e.stopTime=u$Z(this.stopTime,e.stopTime),e.currentTime=u$Z(this.currentTime,e.currentTime),e.clockRange=u$Z(this.clockRange,e.clockRange),e.multiplier=u$Z(this.multiplier,e.multiplier),e.clockStep=u$Z(this.clockStep,e.clockStep),e};var h$z=e$1X.WHITE,u$u=.1,c$p=new o$1o(8,8),d$D=new o$1o(0,0),p$r=new o$1o(1,1);function t$o(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}function t$n(e){this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(t$o.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)&&r$_.isConstant(this._cellAlpha)&&r$_.isConstant(this._lineCount)&&r$_.isConstant(this._lineThickness)&&r$_.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color"),cellAlpha:C$10("cellAlpha"),lineCount:C$10("lineCount"),lineThickness:C$10("lineThickness"),lineOffset:C$10("lineOffset")}),t$o.prototype.getType=function(e){return"Grid"},t$o.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,h$z,t.color),t.cellAlpha=r$_.getValueOrDefault(this._cellAlpha,e,u$u),t.lineCount=r$_.getValueOrClonedDefault(this._lineCount,e,c$p,t.lineCount),t.lineThickness=r$_.getValueOrClonedDefault(this._lineThickness,e,p$r,t.lineThickness),t.lineOffset=r$_.getValueOrClonedDefault(this._lineOffset,e,d$D,t.lineOffset),t},t$o.prototype.equals=function(e){return this===e||e instanceof t$o&&r$_.equals(this._color,e._color)&&r$_.equals(this._cellAlpha,e._cellAlpha)&&r$_.equals(this._lineCount,e._lineCount)&&r$_.equals(this._lineThickness,e._lineThickness)&&r$_.equals(this._lineOffset,e._lineOffset)},Object.defineProperties(t$n.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color")}),t$n.prototype.getType=function(e){return"PolylineArrow"},t$n.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,e$1X.WHITE,t.color),t},t$n.prototype.equals=function(e){return this===e||e instanceof t$n&&r$_.equals(this._color,e._color)};var d$C=e$1X.WHITE,l$C=e$1X.TRANSPARENT,f$x=16,g$z=255;function o$A(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=e.color,this.gapColor=e.gapColor,this.dashLength=e.dashLength,this.dashPattern=e.dashPattern}Object.defineProperties(o$A.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)&&r$_.isConstant(this._gapColor)&&r$_.isConstant(this._dashLength)&&r$_.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color"),gapColor:C$10("gapColor"),dashLength:C$10("dashLength"),dashPattern:C$10("dashPattern")}),o$A.prototype.getType=function(e){return"PolylineDash"},o$A.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,d$C,t.color),t.gapColor=r$_.getValueOrClonedDefault(this._gapColor,e,l$C,t.gapColor),t.dashLength=r$_.getValueOrDefault(this._dashLength,e,f$x,t.dashLength),t.dashPattern=r$_.getValueOrDefault(this._dashPattern,e,g$z,t.dashPattern),t},o$A.prototype.equals=function(e){return this===e||e instanceof o$A&&r$_.equals(this._color,e._color)&&r$_.equals(this._gapColor,e._gapColor)&&r$_.equals(this._dashLength,e._dashLength)&&r$_.equals(this._dashPattern,e._dashPattern)};var f$w=e$1X.WHITE,p$q=.25,P$q=1;function t$m(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower,this.taperPower=e.taperPower}Object.defineProperties(t$m.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)&&r$_.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color"),glowPower:C$10("glowPower"),taperPower:C$10("taperPower")}),t$m.prototype.getType=function(e){return"PolylineGlow"},t$m.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,f$w,t.color),t.glowPower=r$_.getValueOrDefault(this._glowPower,e,p$q,t.glowPower),t.taperPower=r$_.getValueOrDefault(this._taperPower,e,P$q,t.taperPower),t},t$m.prototype.equals=function(e){return this===e||e instanceof t$m&&r$_.equals(this._color,e._color)&&r$_.equals(this._glowPower,e._glowPower)&&r$_.equals(this._taperPower,e._taperPower)};var f$v=e$1X.WHITE,h$y=e$1X.BLACK,a$q=1;function e$y(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}function n$n(e,t){this._value=void 0,this._definitionChanged=new o$1h,this._eventHelper=new n$x,this._referenceFrame=u$Z(t,Re$l.FIXED),this.setValue(e)}function i$v(e){this._value=void 0,this._definitionChanged=new o$1h,this._eventHelper=new n$x,this.setValue(e)}function s$m(e){var t=e._targetProperty;if(!e$2e(t)){var i=e._targetEntity;if(!e$2e(i)){if(!e$2e(i=e._targetCollection.getById(e._targetId)))return void(e._targetEntity=e._targetProperty=void 0);i.definitionChanged.addEventListener(a$p.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=i}var n=e._targetPropertyNames;t=e._targetEntity;for(var r=0,o=n.length;r<o&&e$2e(t);++r)t=t[n[r]];e._targetProperty=t}return t}function a$p(e,t,i){if(!e$2e(e))throw new t$15("targetCollection is required.");if(!e$2e(t)||""===t)throw new t$15("targetId is required.");if(!e$2e(i)||0===i.length)throw new t$15("targetPropertyNames is required.");for(var n=0;n<i.length;n++){var r=i[n];if(!e$2e(r)||""===r)throw new t$15("reference contains invalid properties.")}this._targetCollection=e,this._targetId=t,this._targetPropertyNames=i,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new o$1h,e.collectionChanged.addEventListener(a$p.prototype._onCollectionChanged,this)}Object.defineProperties(e$y.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)&&r$_.isConstant(this._outlineColor)&&r$_.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth")}),e$y.prototype.getType=function(e){return"PolylineOutline"},e$y.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,f$v,t.color),t.outlineColor=r$_.getValueOrClonedDefault(this._outlineColor,e,h$y,t.outlineColor),t.outlineWidth=r$_.getValueOrDefault(this._outlineWidth,e,a$q),t},e$y.prototype.equals=function(e){return this===e||e instanceof e$y&&r$_.equals(this._color,e._color)&&r$_.equals(this._outlineColor,e._outlineColor)&&r$_.equals(this._outlineWidth,e._outlineWidth)},Object.defineProperties(n$n.prototype,{isConstant:{get:function(){var e=this._value;if(!e$2e(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!r$_.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),n$n.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$l.FIXED,t)},n$n.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2e(e))throw new t$15("time is required.");if(!e$2e(t))throw new t$15("referenceFrame is required.");var n=this._value;if(e$2e(n)){var r=n.length;e$2e(i)||(i=new Array(r));for(var o=0,a=0;o<r;){var s=n[o].getValueInReferenceFrame(e,t,i[o]);e$2e(s)&&(i[a]=s,a++),o++}return i.length=a,i}},n$n.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),e$2e(e)){this._value=e.slice();for(var i=e.length,n=0;n<i;n++){var r=e[n];e$2e(r)&&t.add(r.definitionChanged,n$n.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},n$n.prototype.equals=function(e){return this===e||e instanceof n$n&&this._referenceFrame===e._referenceFrame&&r$_.arrayEquals(this._value,e._value)},n$n.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(i$v.prototype,{isConstant:{get:function(){var e=this._value;if(!e$2e(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!r$_.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),i$v.prototype.getValue=function(e,t){if(!e$2e(e))throw new t$15("time is required.");var i=this._value;if(e$2e(i)){var n=i.length;e$2e(t)||(t=new Array(n));for(var r=0,o=0;r<n;){var a=this._value[r].getValue(e,t[r]);e$2e(a)&&(t[o]=a,o++),r++}return t.length=o,t}},i$v.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),e$2e(e)){this._value=e.slice();for(var i=e.length,n=0;n<i;n++){var r=e[n];e$2e(r)&&t.add(r.definitionChanged,i$v.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},i$v.prototype.equals=function(e){return this===e||e instanceof i$v&&r$_.arrayEquals(this._value,e._value)},i$v.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(a$p.prototype,{isConstant:{get:function(){return r$_.isConstant(s$m(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){var e=s$m(this);return e$2e(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return s$m(this)}}}),a$p.fromString=function(e,t){if(!e$2e(e))throw new t$15("targetCollection is required.");if(!e$2e(t))throw new t$15("referenceString is required.");for(var i,n=[],r=!0,o=!1,a="",s=0;s<t.length;++s){var l=t.charAt(s);o?(a+=l,o=!1):"\\"===l?o=!0:r&&"#"===l?(i=a,r=!1,a=""):r||"."!==l?a+=l:(n.push(a),a="")}return n.push(a),new a$p(e,i,n)},a$p.prototype.getValue=function(e,t){var i=s$m(this);return e$2e(i)?i.getValue(e,t):void 0},a$p.prototype.getValueInReferenceFrame=function(e,t,i){var n=s$m(this);return e$2e(n)?n.getValueInReferenceFrame(e,t,i):void 0},a$p.prototype.getType=function(e){var t=s$m(this);return e$2e(t)?t.getType(e):void 0},a$p.prototype.equals=function(e){if(this===e)return!0;var t=this._targetPropertyNames,i=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==i.length)return!1;for(var n=this._targetPropertyNames.length,r=0;r<n;r++)if(t[r]!==i[r])return!1;return!0},a$p.prototype._onTargetEntityDefinitionChanged=function(e,t,i,n){e$2e(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))},a$p.prototype._onCollectionChanged=function(e,t,i){var n=this._targetEntity;e$2e(n)&&-1!==i.indexOf(n)?(n.definitionChanged.removeEventListener(a$p.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):e$2e(n)||e$2e(n=s$m(this))&&this._definitionChanged.raiseEvent(this)};var m$r={packedLength:1,pack:function(e,t,i){if(!e$2e(e))throw new t$15("value is required");if(!e$2e(t))throw new t$15("array is required");return t[i=u$Z(i,0)]=e,t},unpack:function(e,t,i){if(!e$2e(e))throw new t$15("array is required");return e[t=u$Z(t,0)]},convertPackedArrayForInterpolation:function(e,t,i,n){if(!e$2e(e))throw new t$15("packedArray is required");t=u$Z(t,0);for(var r,o=0,a=(i=u$Z(i,e.length))-t+1;o<a;o++){var s=e[t+o];0===o||Math.abs(r-s)<Math.PI?n[o]=s:n[o]=s-e$2d.TWO_PI,r=s}},unpackInterpolationResult:function(e,t,i,n,r){if(!e$2e(e))throw new t$15("array is required");if(!e$2e(t))throw new t$15("sourceArray is required");return(r=e[0])<0?r+e$2d.TWO_PI:r}},j$u={packedLength:1,pack:function(e,t,i){t[i=u$Z(i,0)]=e},unpack:function(e,t,i){return e[t=u$Z(t,0)]}};function J$o(e,t,i){var n,r=e.length,o=i.length,a=r+o;if(e.length=a,r!==t){var s=r-1;for(n=a-1;n>=t;n--)e[n]=e[s--]}for(n=0;n<o;n++)e[t++]=i[n]}function Z$q(e,t){return e instanceof a$15?e:"string"==typeof e?a$15.fromIso8601(e):a$15.addSeconds(t,e,new a$15)}var P$p=[],q$s=[];function S$r(e,t,i,n,r){for(var o,a,s,l,u,c,h=0;h<n.length;){var d=0,f=0;if((s=a$17(t,u=Z$q(n[h],e),a$15.compare))<0){for(l=(s=~s)*r,a=void 0,c=t[s];h<n.length&&(u=Z$q(n[h],e),!(e$2e(a)&&a$15.compare(a,u)>=0||e$2e(c)&&a$15.compare(u,c)>=0));){for(P$p[d++]=u,h+=1,o=0;o<r;o++)q$s[f++]=n[h],h+=1;a=u}d>0&&(q$s.length=f,J$o(i,l,q$s),P$p.length=d,J$o(t,s,P$p))}else{for(o=0;o<r;o++)h++,i[s*r+o]=n[h];h++}}}function g$y(e,t){o$1q.defined("type",e);var i=e;i===Number&&(i=j$u);var n,r=i.packedLength,o=u$Z(i.packedInterpolationLength,r),a=0;if(e$2e(t)){var s=t.length;n=new Array(s);for(var l=0;l<s;l++){var u=t[l];u===Number&&(u=j$u);var c=u.packedLength;r+=c,o+=u$Z(u.packedInterpolationLength,c),n[l]=u}a=s}this._type=e,this._innerType=i,this._interpolationDegree=1,this._interpolationAlgorithm=v$A,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=r,this._packedInterpolationLength=o,this._updateTableLength=!0,this._interpolationResult=new Array(o),this._definitionChanged=new o$1h,this._derivativeTypes=t,this._innerDerivativeTypes=n,this._inputOrder=a,this._forwardExtrapolationType=_0x1015ec.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=_0x1015ec.NONE,this._backwardExtrapolationDuration=0}function z$s(e,t,i){var n=e._packedLength;e._times.splice(t,i),e._values.splice(t*n,i*n),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}function o$z(e,t){var i;if((t=u$Z(t,0))>0){i=new Array(t);for(var n=0;n<t;n++)i[n]=o$1p}this._numberOfDerivatives=t,this._property=new g$y(o$1p,i),this._definitionChanged=new o$1h,this._referenceFrame=u$Z(e,Re$l.FIXED),this._property._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)}Object.defineProperties(g$y.prototype,{isConstant:{get:function(){return 0===this._values.length}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}}),g$y.prototype.getValue=function(e,t){o$1q.defined("time",e);var i=this._times,n=i.length;if(0!==n){var r,o=this._innerType,a=this._values,s=a$17(i,e,a$15.compare);if(s<0){if(0===(s=~s)){var l=i[s];if(r=this._backwardExtrapolationDuration,this._backwardExtrapolationType===_0x1015ec.NONE||0!==r&&a$15.secondsDifference(l,e)>r)return;if(this._backwardExtrapolationType===_0x1015ec.HOLD)return o.unpack(a,0,t)}if(s>=n){var u=i[s=n-1];if(r=this._forwardExtrapolationDuration,this._forwardExtrapolationType===_0x1015ec.NONE||0!==r&&a$15.secondsDifference(e,u)>r)return;if(this._forwardExtrapolationType===_0x1015ec.HOLD)return s=n-1,o.unpack(a,s*o.packedLength,t)}var c=this._xTable,h=this._yTable,d=this._interpolationAlgorithm,f=this._packedInterpolationLength,p=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;var _=Math.min(d.getRequiredDataPoints(this._interpolationDegree,p),n);_!==this._numberOfPoints&&(this._numberOfPoints=_,c.length=_,h.length=_*f)}var m=this._numberOfPoints-1;if(m<1)return;var g=0,x=n-1;if(x-g+1>=m+1){var y=s-(m/2|0)-1;y<g&&(y=g);var v=y+m;v>x&&((y=(v=x)-m)<g&&(y=g)),g=y,x=v}for(var $=x-g+1,b=0;b<$;++b)c[b]=a$15.secondsDifference(i[g+b],i[x]);if(e$2e(o.convertPackedArrayForInterpolation))o.convertPackedArrayForInterpolation(a,g,x,h);else for(var T=0,C=this._packedLength,S=g*C,w=(x+1)*C;S<w;)h[T]=a[S],S++,T++;var E,P=a$15.secondsDifference(e,i[x]);if(0!==p&&e$2e(d.interpolate)){var A=Math.floor(f/(p+1));E=d.interpolate(P,c,h,A,p,p,this._interpolationResult)}else E=d.interpolateOrderZero(P,c,h,f,this._interpolationResult);return e$2e(o.unpackInterpolationResult)?o.unpackInterpolationResult(E,a,g,x,t):o.unpack(E,0,t)}return o.unpack(a,s*this._packedLength,t)}},g$y.prototype.setInterpolationOptions=function(e){if(e$2e(e)){var t=!1,i=e.interpolationAlgorithm,n=e.interpolationDegree;e$2e(i)&&this._interpolationAlgorithm!==i&&(this._interpolationAlgorithm=i,t=!0),e$2e(n)&&this._interpolationDegree!==n&&(this._interpolationDegree=n,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this))}},g$y.prototype.addSample=function(e,t,i){var n=this._innerDerivativeTypes,r=e$2e(n);o$1q.defined("time",e),o$1q.defined("value",t),r&&o$1q.defined("derivatives",i);var o=this._innerType,a=[];if(a.push(e),o.pack(t,a,a.length),r)for(var s=n.length,l=0;l<s;l++)n[l].pack(i[l],a,a.length);S$r(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$y.prototype.addSamples=function(e,t,i){var n=this._innerDerivativeTypes,r=e$2e(n);if(o$1q.defined("times",e),o$1q.defined("values",t),e.length!==t.length)throw new t$15("times and values must be the same length.");if(r&&(!e$2e(i)||i.length!==e.length))throw new t$15("times and derivativeValues must be the same length.");for(var o=this._innerType,a=e.length,s=[],l=0;l<a;l++)if(s.push(e[l]),o.pack(t[l],s,s.length),r)for(var u=i[l],c=n.length,h=0;h<c;h++)n[h].pack(u[h],s,s.length);S$r(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$y.prototype.addSamplesPackedArray=function(e,t){o$1q.defined("packedSamples",e),S$r(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},g$y.prototype.removeSample=function(e){o$1q.defined("time",e);var t=a$17(this._times,e,a$15.compare);return!(t<0)&&(z$s(this,t,1),!0)},g$y.prototype.removeSamples=function(e){o$1q.defined("timeInterval",e);var t=this._times,i=a$17(t,e.start,a$15.compare);i<0?i=~i:e.isStartIncluded||++i;var n=a$17(t,e.stop,a$15.compare);n<0?n=~n:e.isStopIncluded&&++n,z$s(this,i,n-i)},g$y.prototype.equals=function(e){if(this===e)return!0;if(!e$2e(e)||this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;var t,i,n=this._derivativeTypes,r=e$2e(n),o=e._derivativeTypes;if(r!==e$2e(o))return!1;if(r){if((i=n.length)!==o.length)return!1;for(t=0;t<i;t++)if(n[t]!==o[t])return!1}var a=this._times,s=e._times;if((i=a.length)!==s.length)return!1;for(t=0;t<i;t++)if(!a$15.equals(a[t],s[t]))return!1;var l=this._values,u=e._values;for(t=0;t<i;t++)if(l[t]!==u[t])return!1;return!0},g$y._mergeNewSamples=S$r,Object.defineProperties(o$z.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}}),o$z.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$l.FIXED,t)},o$z.prototype.getValueInReferenceFrame=function(e,t,i){if(o$1q.defined("time",e),o$1q.defined("referenceFrame",t),e$2e(i=this._property.getValue(e,i)))return t$J.convertToReferenceFrame(e,i,this._referenceFrame,t,i)},o$z.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)},o$z.prototype.addSample=function(e,t,i){var n=this._numberOfDerivatives;if(n>0&&(!e$2e(i)||i.length!==n))throw new t$15("derivatives length must be equal to the number of derivatives.");this._property.addSample(e,t,i)},o$z.prototype.addSamples=function(e,t,i){this._property.addSamples(e,t,i)},o$z.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)},o$z.prototype.removeSample=function(e){this._property.removeSample(e)},o$z.prototype.removeSamples=function(e){this._property.removeSamples(e)},o$z.prototype.equals=function(e){return this===e||e instanceof o$z&&r$_.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var e$x={HORIZONTAL:0,VERTICAL:1},mr$2=Object.freeze(e$x),l$B=mr$2.HORIZONTAL,u$t=e$1X.WHITE,C$v=e$1X.BLACK,p$p=0,_$p=1;function i$u(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}function t$l(e){this._definitionChanged=new o$1h,this._intervals=new c$A,this._intervals.changedEvent.addEventListener(t$l.prototype._intervalsChanged,this),this._referenceFrame=u$Z(e,Re$l.FIXED)}function t$k(){this._definitionChanged=new o$1h,this._intervals=new c$A,this._intervals.changedEvent.addEventListener(t$k.prototype._intervalsChanged,this)}function r$u(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new o$1h,this._normalize=u$Z(t,!0),this.position=e}Object.defineProperties(i$u.prototype,{isConstant:{get:function(){return r$_.isConstant(this._orientation)&&r$_.isConstant(this._evenColor)&&r$_.isConstant(this._oddColor)&&r$_.isConstant(this._offset)&&r$_.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:C$10("orientation"),evenColor:C$10("evenColor"),oddColor:C$10("oddColor"),offset:C$10("offset"),repeat:C$10("repeat")}),i$u.prototype.getType=function(e){return"Stripe"},i$u.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.horizontal=r$_.getValueOrDefault(this._orientation,e,l$B)===mr$2.HORIZONTAL,t.evenColor=r$_.getValueOrClonedDefault(this._evenColor,e,u$t,t.evenColor),t.oddColor=r$_.getValueOrClonedDefault(this._oddColor,e,C$v,t.oddColor),t.offset=r$_.getValueOrDefault(this._offset,e,p$p),t.repeat=r$_.getValueOrDefault(this._repeat,e,_$p),t},i$u.prototype.equals=function(e){return this===e||e instanceof i$u&&r$_.equals(this._orientation,e._orientation)&&r$_.equals(this._evenColor,e._evenColor)&&r$_.equals(this._oddColor,e._oddColor)&&r$_.equals(this._offset,e._offset)&&r$_.equals(this._repeat,e._repeat)},Object.defineProperties(t$l.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}}),t$l.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$l.FIXED,t)},t$l.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2e(e))throw new t$15("time is required.");if(!e$2e(t))throw new t$15("referenceFrame is required.");var n=this._intervals.findDataForIntervalContainingDate(e);if(e$2e(n))return t$J.convertToReferenceFrame(e,n,this._referenceFrame,t,i)},t$l.prototype.equals=function(e){return this===e||e instanceof t$l&&this._intervals.equals(e._intervals,r$_.equals)&&this._referenceFrame===e._referenceFrame},t$l.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(t$k.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),t$k.prototype.getValue=function(e,t){if(!e$2e(e))throw new t$15("time is required");var i=this._intervals.findDataForIntervalContainingDate(e);return e$2e(i)&&"function"==typeof i.clone?i.clone(t):i},t$k.prototype.equals=function(e){return this===e||e instanceof t$k&&this._intervals.equals(e._intervals,r$_.equals)},t$k.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(r$u.prototype,{isConstant:{get:function(){return r$_.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){var t=this._position;t!==e&&(e$2e(t)&&this._subscription(),this._position=e,e$2e(e)&&(this._subscription=e._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(e){this._normalize!==e&&(this._normalize=e,this._definitionChanged.raiseEvent(this))}}});var C$u=new o$1p,c$o=new o$1p,_$o=new a$15,p$o=1/60;function e$w(e,t){this._velocityVectorProperty=new r$u(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new o$1h,this.ellipsoid=u$Z(t,t$12.WGS84);var i=this;this._velocityVectorProperty.definitionChanged.addEventListener((function(){i._definitionChanged.raiseEvent(i)}))}r$u.prototype.getValue=function(e,t){return this._getValue(e,t)},r$u.prototype._getValue=function(e,t,i){if(!e$2e(e))throw new t$15("time is required");e$2e(t)||(t=new o$1p);var n=this._position;if(r$_.isConstant(n))return this._normalize?void 0:o$1p.clone(o$1p.ZERO,t);var r=n.getValue(e,C$u),o=n.getValue(a$15.addSeconds(e,p$o,_$o),c$o);if(e$2e(r)&&(e$2e(o)||(o=r,e$2e(r=n.getValue(a$15.addSeconds(e,-p$o,_$o),c$o))))){if(o$1p.equals(r,o))return this._normalize?void 0:o$1p.clone(o$1p.ZERO,t);e$2e(i)&&r.clone(i);var a=o$1p.subtract(o,r,t);return this._normalize?o$1p.normalize(a,t):o$1p.divideByScalar(a,p$o,t)}},r$u.prototype.equals=function(e){return this===e||e instanceof r$u&&r$_.equals(this._position,e._position)},Object.defineProperties(e$w.prototype,{isConstant:{get:function(){return r$_.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){this._ellipsoid!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var s$l=new o$1p,m$q=new o$1p,l$A=new p$1e,xr$3;function y$t(){}function U$s(e,t){return"#"===t[0]&&(t=xr$3+t),a$p.fromString(e,t)}function Kr$2(e,t,i){if(e$2e(i.reference))return U$s(t,i.reference);if(e$2e(i.velocityReference)){var n=U$s(t,i.velocityReference);switch(e){case o$1p:case y$t:return new r$u(n,e===y$t);case n$15:return new e$w(n)}}throw new t$13(JSON.stringify(i)+" is not valid CZML.")}function Ye$6(e,t){return new n$X((function(i,n){return t(e.getValue(i,n))}),e.isConstant)}e$w.prototype.getValue=function(e,t){var i=this._velocityVectorProperty._getValue(e,m$q,s$l);if(e$2e(i))return m$19.rotationMatrixFromPositionVelocity(s$l,i,this._ellipsoid,l$A),n$15.fromRotationMatrix(l$A,t)},e$w.prototype.equals=function(e){return this===e||e instanceof e$w&&r$_.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))},y$t.packedLength=o$1p.packedLength,y$t.unpack=o$1p.unpack,y$t.pack=o$1p.pack;var g$x=new o$1p,B$p=new c$B,x$w=new a$18,Y$n=new d$W,pr$2=new n$15;function Ke$6(e){var t=e.rgbaf;if(e$2e(t))return t;var i=e.rgba;if(e$2e(i)){var n=i.length;if(n===e$1X.packedLength)return[e$1X.byteToFloat(i[0]),e$1X.byteToFloat(i[1]),e$1X.byteToFloat(i[2]),e$1X.byteToFloat(i[3])];t=new Array(n);for(var r=0;r<n;r+=5)t[r]=i[r],t[r+1]=e$1X.byteToFloat(i[r+1]),t[r+2]=e$1X.byteToFloat(i[r+2]),t[r+3]=e$1X.byteToFloat(i[r+3]),t[r+4]=e$1X.byteToFloat(i[r+4]);return t}}function $r$2(e,t){var i=u$Z(e.uri,e);return e$2e(t)?t.getDerivedResource({url:i}):t$10.createIfNeeded(i)}function $e$5(e){var t=e.wsen;if(e$2e(t))return t;var i=e.wsenDegrees;if(e$2e(i)){var n=i.length;if(n===h$18.packedLength)return[e$2d.toRadians(i[0]),e$2d.toRadians(i[1]),e$2d.toRadians(i[2]),e$2d.toRadians(i[3])];t=new Array(n);for(var r=0;r<n;r+=5)t[r]=i[r],t[r+1]=e$2d.toRadians(i[r+1]),t[r+2]=e$2d.toRadians(i[r+2]),t[r+3]=e$2d.toRadians(i[r+3]),t[r+4]=e$2d.toRadians(i[r+4]);return t}}function Ie$8(e){var t=e.length;if(B$p.magnitude=1,2===t)return B$p.clock=e[0],B$p.cone=e[1],o$1p.fromSpherical(B$p,g$x),[g$x.x,g$x.y,g$x.z];for(var i=new Array(t/3*4),n=0,r=0;n<t;n+=3,r+=4)i[r]=e[n],B$p.clock=e[n+1],B$p.cone=e[n+2],o$1p.fromSpherical(B$p,g$x),i[r+1]=g$x.x,i[r+2]=g$x.y,i[r+3]=g$x.z;return i}function ke$8(e){var t=e.length;if(3===t)return B$p.clock=e[0],B$p.cone=e[1],B$p.magnitude=e[2],o$1p.fromSpherical(B$p,g$x),[g$x.x,g$x.y,g$x.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],B$p.clock=e[n+1],B$p.cone=e[n+2],B$p.magnitude=e[n+3],o$1p.fromSpherical(B$p,g$x),i[n+1]=g$x.x,i[n+2]=g$x.y,i[n+3]=g$x.z;return i}function je$8(e){var t=e.length;if(3===t)return x$w.longitude=e[0],x$w.latitude=e[1],x$w.height=e[2],t$12.WGS84.cartographicToCartesian(x$w,g$x),[g$x.x,g$x.y,g$x.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],x$w.longitude=e[n+1],x$w.latitude=e[n+2],x$w.height=e[n+3],t$12.WGS84.cartographicToCartesian(x$w,g$x),i[n+1]=g$x.x,i[n+2]=g$x.y,i[n+3]=g$x.z;return i}function ze$8(e){var t=e.length;if(3===t)return x$w.longitude=e$2d.toRadians(e[0]),x$w.latitude=e$2d.toRadians(e[1]),x$w.height=e[2],t$12.WGS84.cartographicToCartesian(x$w,g$x),[g$x.x,g$x.y,g$x.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],x$w.longitude=e$2d.toRadians(e[n+1]),x$w.latitude=e$2d.toRadians(e[n+2]),x$w.height=e[n+3],t$12.WGS84.cartographicToCartesian(x$w,g$x),i[n+1]=g$x.x,i[n+2]=g$x.y,i[n+3]=g$x.z;return i}function _r$2(e){var t=e.cartesian;if(e$2e(t))return t;var i=e.cartesianVelocity;if(e$2e(i))return i;var n=e.unitCartesian;if(e$2e(n))return n;var r=e.unitSpherical;if(e$2e(r))return Ie$8(r);var o=e.spherical;if(e$2e(o))return ke$8(o);var a=e.cartographicRadians;if(e$2e(a))return je$8(a);var s=e.cartographicDegrees;if(e$2e(s))return ze$8(s);throw new t$13(JSON.stringify(e)+" is not a valid CZML interval.")}function Ir$3(e,t){o$1p.unpack(e,t,g$x),o$1p.normalize(g$x,g$x),o$1p.pack(g$x,e,t)}function Ce$8(e){var t=_r$2(e);if(3===t.length)return Ir$3(t,0),t;for(var i=1;i<t.length;i+=4)Ir$3(t,i);return t}function kr$2(e,t){n$15.unpack(e,t,pr$2),n$15.normalize(pr$2,pr$2),n$15.pack(pr$2,e,t)}function Ue$8(e){var t=e.unitQuaternion;if(e$2e(t)){if(4===t.length)return kr$2(t,0),t;for(var i=1;i<t.length;i+=5)kr$2(t,i)}return t}function jr$1(e){return"boolean"==typeof e?Boolean:"number"==typeof e?Number:"string"==typeof e?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?f$1a:e.hasOwnProperty("cartesian2")?o$1o:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?o$1p:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?y$t:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?e$1X:e.hasOwnProperty("arcType")?m$1h:e.hasOwnProperty("classificationType")?_0x2b86ba:e.hasOwnProperty("colorBlendMode")?I$K:e.hasOwnProperty("cornerType")?ar$6:e.hasOwnProperty("heightReference")?k$R:e.hasOwnProperty("horizontalOrigin")?j$V:e.hasOwnProperty("date")?a$15:e.hasOwnProperty("labelStyle")?R$S:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?o$Y:e.hasOwnProperty("distanceDisplayCondition")?r$Z:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?n$15:e.hasOwnProperty("shadowMode")?W$X:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?mr$2:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?h$18:e.hasOwnProperty("uri")?h$16:e.hasOwnProperty("verticalOrigin")?S$Q:Object}function rn$1(e,t,i){switch(e){case m$1h:return m$1h[u$Z(t.arcType,t)];case Array:return t.array;case Boolean:return u$Z(t.boolean,t);case f$1a:return t.boundingRectangle;case o$1o:return t.cartesian2;case o$1p:return _r$2(t);case y$t:return Ce$8(t);case e$1X:return Ke$6(t);case _0x2b86ba:return _0x2b86ba[u$Z(t.classificationType,t)];case I$K:return I$K[u$Z(t.colorBlendMode,t)];case ar$6:return ar$6[u$Z(t.cornerType,t)];case k$R:return k$R[u$Z(t.heightReference,t)];case j$V:return j$V[u$Z(t.horizontalOrigin,t)];case Image:return $r$2(t,i);case a$15:return a$15.fromIso8601(u$Z(t.date,t));case R$S:return R$S[u$Z(t.labelStyle,t)];case Number:return u$Z(t.number,t);case o$Y:return t.nearFarScalar;case r$Z:return t.distanceDisplayCondition;case Object:return u$Z(u$Z(t.object,t.value),t);case n$15:return Ue$8(t);case m$r:return u$Z(t.number,t);case W$X:return W$X[u$Z(u$Z(t.shadowMode,t.shadows),t)];case String:return u$Z(t.string,t);case mr$2:return mr$2[u$Z(t.stripeOrientation,t)];case h$18:return $e$5(t);case h$16:return $r$2(t,i);case S$Q:return S$Q[u$Z(t.verticalOrigin,t)];default:throw new t$13(e)}}var en$1={HERMITE:E$J,LAGRANGE:i$J,LINEAR:v$A};function lr$2(e,t){var i=e.interpolationAlgorithm,n=e.interpolationDegree;(e$2e(i)||e$2e(n))&&t.setInterpolationOptions({interpolationAlgorithm:en$1[i],interpolationDegree:n});var r=e.forwardExtrapolationType;e$2e(r)&&(t.forwardExtrapolationType=_0x1015ec[r]);var o=e.forwardExtrapolationDuration;e$2e(o)&&(t.forwardExtrapolationDuration=o);var a=e.backwardExtrapolationType;e$2e(a)&&(t.backwardExtrapolationType=_0x1015ec[a]);var s=e.backwardExtrapolationDuration;e$2e(s)&&(t.backwardExtrapolationDuration=s)}var zr$2={iso8601:void 0};function b$z(e){if(e$2e(e))return zr$2.iso8601=e,d$W.fromIso8601(zr$2)}function Br$1(e){var t=o$I.MAXIMUM_INTERVAL.clone();return t.data=e,t}function Cr$2(e){var t=new e$B;return t.intervals.addInterval(Br$1(e)),t}function Ur$2(e){var t=new t$p(e.referenceFrame);return t.intervals.addInterval(Br$1(e)),t}function gr$2(e,t,i,n,r,o,a){var s=b$z(n.interval);e$2e(r)&&(s=e$2e(s)?d$W.intersect(s,r,Y$n):r);var l,u,c,h=!e$2e(n.reference)&&!e$2e(n.velocityReference),d=e$2e(s)&&!s.equals(o$I.MAXIMUM_INTERVAL);if(!0===n.delete)return d?re$l(t[i],s):void(t[i]=void 0);var f=!1;if(h){if(!e$2e(u=rn$1(e,n,o)))return;l=u$Z(e.packedLength,1),c=u$Z(u.length,1),f=!e$2e(n.array)&&"string"!=typeof u&&c>l&&e!==Object}var p="function"==typeof e.unpack&&e!==m$r;if(f||d){var _,m,g=t[i],x=n.epoch;if(e$2e(x)&&(_=a$15.fromIso8601(x)),f&&!d)return g instanceof g$y||(t[i]=g=new g$y(e)),g.addSamplesPackedArray(u,_),void lr$2(n,g);if(!f&&d)return(s=s.clone()).data=h?p?e.unpack(u,0):u:Kr$2(e,a,n),e$2e(g)||(t[i]=g=h?new t$k:new e$B),void(h&&g instanceof t$k?g.intervals.addInterval(s):g instanceof e$B?(h&&(s.data=new e$1L(s.data)),g.intervals.addInterval(s)):(t[i]=g=Cr$2(g),h&&(s.data=new e$1L(s.data)),g.intervals.addInterval(s)));e$2e(g)||(t[i]=g=new e$B),g instanceof e$B||(t[i]=g=Cr$2(g));var y=g.intervals;(!e$2e(m=y.findInterval(s))||!(m.data instanceof g$y))&&((m=s.clone()).data=new g$y(e),y.addInterval(m)),m.data.addSamplesPackedArray(u,_),lr$2(n,m.data)}else t[i]=h?new e$1L(p?e.unpack(u,0):u):Kr$2(e,a,n)}function re$l(e,t){if(e instanceof g$y)e.removeSamples(t);else if(e instanceof t$k)e.intervals.removeInterval(t);else if(e instanceof e$B){for(var i=e.intervals,n=0;n<i.length;++n){var r=d$W.intersect(i.get(n),t,Y$n);r.isEmpty||re$l(r.data,t)}i.removeInterval(t)}else;}function f$u(e,t,i,n,r,o,a){if(e$2e(n))if(Array.isArray(n))for(var s=0,l=n.length;s<l;++s)gr$2(e,t,i,n[s],r,o,a);else gr$2(e,t,i,n,r,o,a)}function ee$l(e,t,i,n,r,o){var a=b$z(i.interval);e$2e(n)&&(a=e$2e(a)?d$W.intersect(a,n,Y$n):n);var s,l=e$2e(i.cartesianVelocity)?1:0,u=o$1p.packedLength*(l+1),c=!e$2e(i.reference),h=e$2e(a)&&!a.equals(o$I.MAXIMUM_INTERVAL);if(!0===i.delete)return h?ne$g(e[t],a):void(e[t]=void 0);var d,f=!1;if(c&&(e$2e(i.referenceFrame)&&(d=Re$l[i.referenceFrame]),d=u$Z(d,Re$l.FIXED),f=u$Z((s=_r$2(i)).length,1)>u),f||h){var p,_,m=e[t],g=i.epoch;if(e$2e(g)&&(p=a$15.fromIso8601(g)),f&&!h)return(!(m instanceof o$z)||e$2e(d)&&m.referenceFrame!==d)&&(e[t]=m=new o$z(d,l)),m.addSamplesPackedArray(s,p),void lr$2(i,m);if(!f&&h)return(a=a.clone()).data=c?o$1p.unpack(s):U$s(o,i.reference),e$2e(m)||(m=c?new t$l(d):new t$p(d),e[t]=m),void(c&&m instanceof t$l&&e$2e(d)&&m.referenceFrame===d?m.intervals.addInterval(a):m instanceof t$p?(c&&(a.data=new r$V(a.data,d)),m.intervals.addInterval(a)):(e[t]=m=Ur$2(m),c&&(a.data=new r$V(a.data,d)),m.intervals.addInterval(a)));e$2e(m)?m instanceof t$p||(e[t]=m=Ur$2(m)):e[t]=m=new t$p(d);var x=m.intervals;(!e$2e(_=x.findInterval(a))||!(_.data instanceof o$z)||e$2e(d)&&_.data.referenceFrame!==d)&&((_=a.clone()).data=new o$z(d,l),x.addInterval(_)),_.data.addSamplesPackedArray(s,p),lr$2(i,_.data)}else e[t]=c?new r$V(o$1p.unpack(s),d):U$s(o,i.reference)}function ne$g(e,t){if(e instanceof o$z)e.removeSamples(t);else if(e instanceof t$l)e.intervals.removeInterval(t);else if(e instanceof t$p){for(var i=e.intervals,n=0;n<i.length;++n){var r=d$W.intersect(i.get(n),t,Y$n);r.isEmpty||ne$g(r.data,t)}i.removeInterval(t)}else;}function ae$e(e,t,i,n,r,o){if(e$2e(i))if(Array.isArray(i))for(var a=0,s=i.length;a<s;++a)ee$l(e,t,i[a],n,r,o);else ee$l(e,t,i,n,r,o)}function ie$d(e,t,i,n,r,o){var a=b$z(i.interval);e$2e(n)&&(a=e$2e(a)?d$W.intersect(a,n,Y$n):n);var s,l,u,c=e[t];if(e$2e(a)){c instanceof e$A||(c=new e$A,e[t]=c);var h=c.intervals;e$2e(l=h.findInterval({start:a.start,stop:a.stop}))?s=l.data:(l=a.clone(),h.addInterval(l))}else s=c;e$2e(i.solidColor)?(s instanceof t$P||(s=new t$P),f$u(e$1X,s,"color",(u=i.solidColor).color,void 0,void 0,o)):e$2e(i.grid)?(s instanceof t$o||(s=new t$o),f$u(e$1X,s,"color",(u=i.grid).color,void 0,r,o),f$u(Number,s,"cellAlpha",u.cellAlpha,void 0,r,o),f$u(o$1o,s,"lineCount",u.lineCount,void 0,r,o),f$u(o$1o,s,"lineThickness",u.lineThickness,void 0,r,o),f$u(o$1o,s,"lineOffset",u.lineOffset,void 0,r,o)):e$2e(i.image)?(s instanceof a$R||(s=new a$R),u=i.image,f$u(Image,s,"image",u.image,void 0,r,o),f$u(o$1o,s,"repeat",u.repeat,void 0,r,o),f$u(e$1X,s,"color",u.color,void 0,r,o),f$u(Boolean,s,"transparent",u.transparent,void 0,r,o)):e$2e(i.stripe)?(s instanceof i$u||(s=new i$u),u=i.stripe,f$u(mr$2,s,"orientation",u.orientation,void 0,r,o),f$u(e$1X,s,"evenColor",u.evenColor,void 0,r,o),f$u(e$1X,s,"oddColor",u.oddColor,void 0,r,o),f$u(Number,s,"offset",u.offset,void 0,r,o),f$u(Number,s,"repeat",u.repeat,void 0,r,o)):e$2e(i.polylineOutline)?(s instanceof e$y||(s=new e$y),f$u(e$1X,s,"color",(u=i.polylineOutline).color,void 0,r,o),f$u(e$1X,s,"outlineColor",u.outlineColor,void 0,r,o),f$u(Number,s,"outlineWidth",u.outlineWidth,void 0,r,o)):e$2e(i.polylineGlow)?(s instanceof t$m||(s=new t$m),f$u(e$1X,s,"color",(u=i.polylineGlow).color,void 0,r,o),f$u(Number,s,"glowPower",u.glowPower,void 0,r,o),f$u(Number,s,"taperPower",u.taperPower,void 0,r,o)):e$2e(i.polylineArrow)?(s instanceof t$n||(s=new t$n),f$u(e$1X,s,"color",(u=i.polylineArrow).color,void 0,void 0,o)):e$2e(i.polylineDash)?(s instanceof o$A||(s=new o$A),f$u(e$1X,s,"color",(u=i.polylineDash).color,void 0,void 0,o),f$u(e$1X,s,"gapColor",u.gapColor,void 0,void 0,o),f$u(Number,s,"dashLength",u.dashLength,void 0,r,o),f$u(Number,s,"dashPattern",u.dashPattern,void 0,r,o)):e$2e(i.checkerboard)&&(s instanceof r$w||(s=new r$w),f$u(e$1X,s,"evenColor",(u=i.checkerboard).evenColor,void 0,r,o),f$u(e$1X,s,"oddColor",u.oddColor,void 0,r,o),f$u(o$1o,s,"repeat",u.repeat,void 0,r,o)),e$2e(l)?l.data=s:e[t]=s}function L$v(e,t,i,n,r,o){if(e$2e(i))if(Array.isArray(i))for(var a=0,s=i.length;a<s;++a)ie$d(e,t,i[a],n,r,o);else ie$d(e,t,i,n,r,o)}function nn$1(e,t,i,n){e$2e(t.name)&&(e.name=t.name)}function an$1(e,t,i,n){var r=t.description;e$2e(r)&&f$u(String,e,"description",r,void 0,n,i)}function on$1(e,t,i,n){var r=t.position;e$2e(r)&&ae$e(e,"position",r,void 0,n,i)}function sn$1(e,t,i,n){var r=t.viewFrom;e$2e(r)&&f$u(o$1p,e,"viewFrom",r,void 0,n,i)}function fn$1(e,t,i,n){var r=t.orientation;e$2e(r)&&f$u(n$15,e,"orientation",r,void 0,n,i)}function tn$1(e,t,i,n){var r=t.properties;if(e$2e(r))for(var o in e$2e(e.properties)||(e.properties=new f$V),r)if(r.hasOwnProperty(o)){e.properties.hasProperty(o)||e.properties.addProperty(o);var a=r[o];if(Array.isArray(a))for(var s=0,l=a.length;s<l;++s)gr$2(jr$1(a[s]),e.properties,o,a[s],void 0,n,i);else gr$2(jr$1(a),e.properties,o,a,void 0,n,i)}}function Mr$3(e,t,i,n,r,o,a){var s=i.map((function(e){return U$s(r,e)}));if(e$2e(n)){n=b$z(n);var l=e[t];if(!(l instanceof a)){var u=new a;u.intervals.addInterval(Br$1(l)),e[t]=l=u}n.data=new o(s),l.intervals.addInterval(n)}else e[t]=new o(s)}function oe$d(e,t,i,n){var r=i.references;e$2e(r)?Mr$3(e,t,r,i.interval,n,i$v,e$B):f$u(Array,e,t,i,void 0,void 0,n)}function se$c(e,t,i,n){if(e$2e(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)oe$d(e,t,i[r],n);else oe$d(e,t,i,n)}function fe$c(e,t,i,n){var r=i.references;e$2e(r)?Mr$3(e,t,r,i.interval,n,n$n,t$p):(e$2e(i.cartesian)?i.array=o$1p.unpackArray(i.cartesian):e$2e(i.cartographicRadians)?i.array=o$1p.fromRadiansArrayHeights(i.cartographicRadians):e$2e(i.cartographicDegrees)&&(i.array=o$1p.fromDegreesArrayHeights(i.cartographicDegrees)),e$2e(i.array)&&f$u(Array,e,t,i,void 0,void 0,n))}function vr$2(e,t,i,n){if(e$2e(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)fe$c(e,t,i[r],n);else fe$c(e,t,i,n)}function dn$1(e){return o$1p.unpackArray(e)}function un$1(e){return o$1p.fromRadiansArrayHeights(e)}function hn$1(e){return o$1p.fromDegreesArrayHeights(e)}function te$h(e,t,i,n){var r=i.references;if(e$2e(r)){var o=r.map((function(e){var t={};return Mr$3(t,"positions",e,i.interval,n,n$n,t$p),t.positions}));e[t]=new n$n(o)}else e$2e(i.cartesian)?i.array=i.cartesian.map(dn$1):e$2e(i.cartographicRadians)?i.array=i.cartographicRadians.map(un$1):e$2e(i.cartographicDegrees)&&(i.array=i.cartographicDegrees.map(hn$1)),e$2e(i.array)&&f$u(Array,e,t,i,void 0,void 0,n)}function mn$1(e,t,i,n){if(e$2e(i))if(Array.isArray(i))for(var r=0,o=i.length;r<o;++r)te$h(e,t,i[r],n);else te$h(e,t,i,n)}function pn$1(e,t,i,n){var r=t.availability;if(e$2e(r)){var o;if(Array.isArray(r))for(var a=0,s=r.length;a<s;++a)e$2e(o)||(o=new c$A),o.addInterval(b$z(r[a]));else(o=new c$A).addInterval(b$z(r));e.availability=o}}function ln$1(e,t,i,n,r){!e$2e(t)||f$u(y$t,e,"alignedAxis",t,i,n,r)}function gn$1(e,t,i,n){var r=t.billboard;if(e$2e(r)){var o=b$z(r.interval),a=e.billboard;e$2e(a)||(e.billboard=a=new n$V),f$u(Boolean,a,"show",r.show,o,n,i),f$u(Image,a,"image",r.image,o,n,i),f$u(Number,a,"scale",r.scale,o,n,i),f$u(o$1o,a,"pixelOffset",r.pixelOffset,o,n,i),f$u(o$1p,a,"eyeOffset",r.eyeOffset,o,n,i),f$u(j$V,a,"horizontalOrigin",r.horizontalOrigin,o,n,i),f$u(S$Q,a,"verticalOrigin",r.verticalOrigin,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(e$1X,a,"color",r.color,o,n,i),f$u(m$r,a,"rotation",r.rotation,o,n,i),ln$1(a,r.alignedAxis,o,n,i),f$u(Boolean,a,"sizeInMeters",r.sizeInMeters,o,n,i),f$u(Number,a,"width",r.width,o,n,i),f$u(Number,a,"height",r.height,o,n,i),f$u(o$Y,a,"scaleByDistance",r.scaleByDistance,o,n,i),f$u(o$Y,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),f$u(o$Y,a,"pixelOffsetScaleByDistance",r.pixelOffsetScaleByDistance,o,n,i),f$u(f$1a,a,"imageSubRegion",r.imageSubRegion,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function vn$1(e,t,i,n){var r=t.box;if(e$2e(r)){var o=b$z(r.interval),a=e.box;e$2e(a)||(e.box=a=new n$U),f$u(Boolean,a,"show",r.show,o,n,i),f$u(o$1p,a,"dimensions",r.dimensions,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function wn$1(e,t,i,n){var r=t.corridor;if(e$2e(r)){var o=b$z(r.interval),a=e.corridor;e$2e(a)||(e.corridor=a=new n$T),f$u(Boolean,a,"show",r.show,o,n,i),vr$2(a,"positions",r.positions,i),f$u(Number,a,"width",r.width,o,n,i),f$u(Number,a,"height",r.height,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$u(k$R,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$u(ar$6,a,"cornerType",r.cornerType,o,n,i),f$u(Number,a,"granularity",r.granularity,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(_0x2b86ba,a,"classificationType",r.classificationType,o,n,i),f$u(Number,a,"zIndex",r.zIndex,o,n,i)}}function Pn$1(e,t,i,n){var r=t.cylinder;if(e$2e(r)){var o=b$z(r.interval),a=e.cylinder;e$2e(a)||(e.cylinder=a=new n$S),f$u(Boolean,a,"show",r.show,o,n,i),f$u(Number,a,"length",r.length,o,n,i),f$u(Number,a,"topRadius",r.topRadius,o,n,i),f$u(Number,a,"bottomRadius",r.bottomRadius,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(Number,a,"numberOfVerticalLines",r.numberOfVerticalLines,o,n,i),f$u(Number,a,"slices",r.slices,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function bn$1(e,t){var i=e.version;if(e$2e(i)&&"string"==typeof i){var n=i.split(".");if(2===n.length){if("1"!==n[0])throw new t$13("SuperMap3D only supports CZML version 1.");t._version=i}}if(!e$2e(t._version))throw new t$13("CZML version information invalid. It is expected to be a property on the document object in the <Major>.<Minor> version format.");var r=t._documentPacket;e$2e(e.name)&&(r.name=e.name);var o=e.clock;if(e$2e(o)){var a=r.clock;e$2e(a)?(a.interval=u$Z(o.interval,a.interval),a.currentTime=u$Z(o.currentTime,a.currentTime),a.range=u$Z(o.range,a.range),a.step=u$Z(o.step,a.step),a.multiplier=u$Z(o.multiplier,a.multiplier)):r.clock={interval:o.interval,currentTime:o.currentTime,range:o.range,step:o.step,multiplier:o.multiplier}}}function On$1(e,t,i,n){var r=t.ellipse;if(e$2e(r)){var o=b$z(r.interval),a=e.ellipse;e$2e(a)||(e.ellipse=a=new n$R),f$u(Boolean,a,"show",r.show,o,n,i),f$u(Number,a,"semiMajorAxis",r.semiMajorAxis,o,n,i),f$u(Number,a,"semiMinorAxis",r.semiMinorAxis,o,n,i),f$u(Number,a,"height",r.height,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$u(k$R,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$u(m$r,a,"rotation",r.rotation,o,n,i),f$u(m$r,a,"stRotation",r.stRotation,o,n,i),f$u(Number,a,"granularity",r.granularity,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(Number,a,"numberOfVerticalLines",r.numberOfVerticalLines,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(_0x2b86ba,a,"classificationType",r.classificationType,o,n,i),f$u(Number,a,"zIndex",r.zIndex,o,n,i)}}function Tn$1(e,t,i,n){var r=t.ellipsoid;if(e$2e(r)){var o=b$z(r.interval),a=e.ellipsoid;e$2e(a)||(e.ellipsoid=a=new e$1q),f$u(Boolean,a,"show",r.show,o,n,i),f$u(o$1p,a,"radii",r.radii,o,n,i),f$u(o$1p,a,"innerRadii",r.innerRadii,o,n,i),f$u(Number,a,"minimumClock",r.minimumClock,o,n,i),f$u(Number,a,"maximumClock",r.maximumClock,o,n,i),f$u(Number,a,"minimumCone",r.minimumCone,o,n,i),f$u(Number,a,"maximumCone",r.maximumCone,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(Number,a,"stackPartitions",r.stackPartitions,o,n,i),f$u(Number,a,"slicePartitions",r.slicePartitions,o,n,i),f$u(Number,a,"subdivisions",r.subdivisions,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function An$1(e,t,i,n){var r=t.label;if(e$2e(r)){var o=b$z(r.interval),a=e.label;e$2e(a)||(e.label=a=new n$Q),f$u(Boolean,a,"show",r.show,o,n,i),f$u(String,a,"text",r.text,o,n,i),f$u(String,a,"font",r.font,o,n,i),f$u(R$S,a,"style",r.style,o,n,i),f$u(Number,a,"scale",r.scale,o,n,i),f$u(Boolean,a,"showBackground",r.showBackground,o,n,i),f$u(e$1X,a,"backgroundColor",r.backgroundColor,o,n,i),f$u(o$1o,a,"backgroundPadding",r.backgroundPadding,o,n,i),f$u(o$1o,a,"pixelOffset",r.pixelOffset,o,n,i),f$u(o$1p,a,"eyeOffset",r.eyeOffset,o,n,i),f$u(j$V,a,"horizontalOrigin",r.horizontalOrigin,o,n,i),f$u(S$Q,a,"verticalOrigin",r.verticalOrigin,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(e$1X,a,"fillColor",r.fillColor,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(o$Y,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),f$u(o$Y,a,"pixelOffsetScaleByDistance",r.pixelOffsetScaleByDistance,o,n,i),f$u(o$Y,a,"scaleByDistance",r.scaleByDistance,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function Rn$1(e,t,i,n){var r=t.model;if(e$2e(r)){var o=b$z(r.interval),a=e.model;e$2e(a)||(e.model=a=new t$I),f$u(Boolean,a,"show",r.show,o,n,i),f$u(h$16,a,"uri",r.gltf,o,n,i),f$u(Number,a,"scale",r.scale,o,n,i),f$u(Number,a,"minimumPixelSize",r.minimumPixelSize,o,n,i),f$u(Number,a,"maximumScale",r.maximumScale,o,n,i),f$u(Boolean,a,"incrementallyLoadTextures",r.incrementallyLoadTextures,o,n,i),f$u(Boolean,a,"runAnimations",r.runAnimations,o,n,i),f$u(Boolean,a,"clampAnimations",r.clampAnimations,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(e$1X,a,"silhouetteColor",r.silhouetteColor,o,n,i),f$u(Number,a,"silhouetteSize",r.silhouetteSize,o,n,i),f$u(e$1X,a,"color",r.color,o,n,i),f$u(I$K,a,"colorBlendMode",r.colorBlendMode,o,n,i),f$u(Number,a,"colorBlendAmount",r.colorBlendAmount,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i);var s,l,u=r.nodeTransformations;if(e$2e(u))if(Array.isArray(u))for(s=0,l=u.length;s<l;++s)de$b(a,u[s],o,n,i);else de$b(a,u,o,n,i);var c=r.articulations;if(e$2e(c))if(Array.isArray(c))for(s=0,l=c.length;s<l;++s)ue$c(a,c[s],o,n,i);else ue$c(a,c,o,n,i)}}function de$b(e,t,i,n,r){var o=b$z(t.interval);e$2e(i)&&(o=e$2e(o)?d$W.intersect(o,i,Y$n):i);for(var a=e.nodeTransformations,s=Object.keys(t),l=0,u=s.length;l<u;++l){var c=s[l];if("interval"!==c){var h=t[c];if(e$2e(h)){e$2e(a)||(e.nodeTransformations=a=new f$V),a.hasProperty(c)||a.addProperty(c);var d=a[c];e$2e(d)||(a[c]=d=new a$N),f$u(o$1p,d,"translation",h.translation,o,n,r),f$u(n$15,d,"rotation",h.rotation,o,n,r),f$u(o$1p,d,"scale",h.scale,o,n,r)}}}}function ue$c(e,t,i,n,r){var o=b$z(t.interval);e$2e(i)&&(o=e$2e(o)?d$W.intersect(o,i,Y$n):i);for(var a=e.articulations,s=Object.keys(t),l=0,u=s.length;l<u;++l){var c=s[l];if("interval"!==c){var h=t[c];!e$2e(h)||(e$2e(a)||(e.articulations=a=new f$V),a.hasProperty(c)||a.addProperty(c),f$u(Number,a,c,h,o,n,r))}}}function xn$1(e,t,i,n){var r=t.path;if(e$2e(r)){var o=b$z(r.interval),a=e.path;e$2e(a)||(e.path=a=new n$P),f$u(Boolean,a,"show",r.show,o,n,i),f$u(Number,a,"leadTime",r.leadTime,o,n,i),f$u(Number,a,"trailTime",r.trailTime,o,n,i),f$u(Number,a,"width",r.width,o,n,i),f$u(Number,a,"resolution",r.resolution,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function _n$1(e,t,i,n){var r=t.point;if(e$2e(r)){var o=b$z(r.interval),a=e.point;e$2e(a)||(e.point=a=new n$O),f$u(Boolean,a,"show",r.show,o,n,i),f$u(Number,a,"pixelSize",r.pixelSize,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(e$1X,a,"color",r.color,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(o$Y,a,"scaleByDistance",r.scaleByDistance,o,n,i),f$u(o$Y,a,"translucencyByDistance",r.translucencyByDistance,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(Number,a,"disableDepthTestDistance",r.disableDepthTestDistance,o,n,i)}}function rr$3(e){this.polygon=e,this._definitionChanged=new o$1h}function Bn$1(e,t,i,n){var r=t.polygon;if(e$2e(r)){var o=b$z(r.interval),a=e.polygon;e$2e(a)||(e.polygon=a=new l$Y),f$u(Boolean,a,"show",r.show,o,n,i),vr$2(a,"_positions",r.positions,i),mn$1(a,"_holes",r.holes,i),(e$2e(a._positions)||e$2e(a._holes))&&(a.hierarchy=new rr$3(a)),f$u(Number,a,"height",r.height,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$u(k$R,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$u(m$r,a,"stRotation",r.stRotation,o,n,i),f$u(Number,a,"granularity",r.granularity,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(Boolean,a,"perPositionHeight",r.perPositionHeight,o,n,i),f$u(Boolean,a,"closeTop",r.closeTop,o,n,i),f$u(Boolean,a,"closeBottom",r.closeBottom,o,n,i),f$u(m$1h,a,"arcType",r.arcType,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(_0x2b86ba,a,"classificationType",r.classificationType,o,n,i),f$u(Number,a,"zIndex",r.zIndex,o,n,i)}}function Mn$1(e){return e?m$1h.GEODESIC:m$1h.NONE}function En$1(e,t,i,n){var r=t.polyline;if(e$2e(r)){var o=b$z(r.interval),a=e.polyline;if(e$2e(a)||(e.polyline=a=new a$L),f$u(Boolean,a,"show",r.show,o,n,i),vr$2(a,"positions",r.positions,i),f$u(Number,a,"width",r.width,o,n,i),f$u(Number,a,"granularity",r.granularity,o,n,i),L$v(a,"material",r.material,o,n,i),L$v(a,"depthFailMaterial",r.depthFailMaterial,o,n,i),f$u(m$1h,a,"arcType",r.arcType,o,n,i),f$u(Boolean,a,"clampToGround",r.clampToGround,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(_0x2b86ba,a,"classificationType",r.classificationType,o,n,i),f$u(Number,a,"zIndex",r.zIndex,o,n,i),e$2e(r.followSurface)&&!e$2e(r.arcType)){var s={};f$u(Boolean,s,"followSurface",r.followSurface,o,n,i),a.arcType=Ye$6(s.followSurface,Mn$1)}}}function Nn$1(e,t,i,n){var r=t.rectangle;if(e$2e(r)){var o=b$z(r.interval),a=e.rectangle;e$2e(a)||(e.rectangle=a=new n$N),f$u(Boolean,a,"show",r.show,o,n,i),f$u(h$18,a,"coordinates",r.coordinates,o,n,i),f$u(Number,a,"height",r.height,o,n,i),f$u(k$R,a,"heightReference",r.heightReference,o,n,i),f$u(Number,a,"extrudedHeight",r.extrudedHeight,o,n,i),f$u(k$R,a,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),f$u(m$r,a,"rotation",r.rotation,o,n,i),f$u(m$r,a,"stRotation",r.stRotation,o,n,i),f$u(Number,a,"granularity",r.granularity,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),f$u(_0x2b86ba,a,"classificationType",r.classificationType,o,n,i),f$u(Number,a,"zIndex",r.zIndex,o,n,i)}}function Ln$1(e,t,i,n){var r=t.tileset;if(e$2e(r)){var o=b$z(r.interval),a=e.tileset;e$2e(a)||(e.tileset=a=new i$S),f$u(Boolean,a,"show",r.show,o,n,i),f$u(h$16,a,"uri",r.uri,o,n,i),f$u(Number,a,"maximumScreenSpaceError",r.maximumScreenSpaceError,o,n,i)}}function Sn$1(e,t,i,n){var r=t.wall;if(e$2e(r)){var o=b$z(r.interval),a=e.wall;e$2e(a)||(e.wall=a=new e$1m),f$u(Boolean,a,"show",r.show,o,n,i),vr$2(a,"positions",r.positions,i),se$c(a,"minimumHeights",r.minimumHeights,i),se$c(a,"maximumHeights",r.maximumHeights,i),f$u(Number,a,"granularity",r.granularity,o,n,i),f$u(Boolean,a,"fill",r.fill,o,n,i),L$v(a,"material",r.material,o,n,i),f$u(Boolean,a,"outline",r.outline,o,n,i),f$u(e$1X,a,"outlineColor",r.outlineColor,o,n,i),f$u(Number,a,"outlineWidth",r.outlineWidth,o,n,i),f$u(W$X,a,"shadows",r.shadows,o,n,i),f$u(r$Z,a,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i)}}function he$c(e,t,i,n,r){var o=e.id;if(e$2e(o)||(o=e$1T()),xr$3=o,!e$2e(r._version)&&"document"!==o)throw new t$13("The first CZML packet is required to be the document object.");if(!0===e.delete)t.removeById(o);else if("document"===o)bn$1(e,r);else{var a=t.getOrCreateEntity(o),s=e.parent;e$2e(s)&&(a.parent=t.getOrCreateEntity(s));for(var l=i.length-1;l>-1;l--)i[l](a,e,t,n)}xr$3=void 0}function Hn$1(e){var t,i=e._documentPacket.clock;if(!e$2e(i)){if(!e$2e(e._clock)){var n=e._entityCollection.computeAvailability();if(!n.start.equals(o$I.MINIMUM_VALUE)){var r=n.start,o=n.stop,a=a$15.secondsDifference(o,r),s=Math.round(a/120);return(t=new e$z).startTime=a$15.clone(r),t.stopTime=a$15.clone(o),t.clockRange=tt$a.LOOP_STOP,t.multiplier=s,t.currentTime=a$15.clone(r),t.clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}e$2e(e._clock)?t=e._clock.clone():((t=new e$z).startTime=o$I.MINIMUM_VALUE.clone(),t.stopTime=o$I.MAXIMUM_VALUE.clone(),t.currentTime=o$I.MINIMUM_VALUE.clone(),t.clockRange=tt$a.LOOP_STOP,t.clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);var l=b$z(i.interval);return e$2e(l)&&(t.startTime=l.start,t.stopTime=l.stop),e$2e(i.currentTime)&&(t.currentTime=a$15.fromIso8601(i.currentTime)),e$2e(i.range)&&(t.clockRange=u$Z(tt$a[i.range],tt$a.LOOP_STOP)),e$2e(i.step)&&(t.clockStep=u$Z(g$R[i.step],g$R.SYSTEM_CLOCK_MULTIPLIER)),e$2e(i.multiplier)&&(t.multiplier=i.multiplier),!t.equals(e._clock)&&(e._clock=t.clone(e._clock),!0)}function me$g(e,t,i,n){if(!e$2e(t))throw new t$15("czml is required.");var r=t,o=(i=u$Z(i,u$Z.EMPTY_OBJECT)).sourceUri,a=i.credit;if("string"==typeof a&&(a=new r$U(a)),e._credit=a,"string"==typeof t||t instanceof t$10){r=(t=t$10.createIfNeeded(t)).fetchJson(),o=u$Z(o,t.clone());var s=e._resourceCredits,l=t.credits;if(e$2e(l))for(var u=l.length,c=0;c<u;c++)s.push(l[c])}return o=t$10.createIfNeeded(o),o$B.setLoading(e,!0),o$1l(r,(function(t){return cn$1(e,t,o,n)})).otherwise((function(t){return o$B.setLoading(e,!1),e._error.raiseEvent(e,t),console.log(t),o$1l.reject(t)}))}function cn$1(e,t,i,n){o$B.setLoading(e,!0);var r=e._entityCollection;n&&(e._version=void 0,e._documentPacket=new pe$g,r.removeAll()),E$w._processCzml(t,r,i,void 0,e);var o=Hn$1(e),a=e._documentPacket;return e$2e(a.name)&&e._name!==a.name?(e._name=a.name,o=!0):!e$2e(e._name)&&e$2e(i)&&(e._name=f$Q(i.getUrlComponent()),o=!0),o$B.setLoading(e,!1),o&&e._changed.raiseEvent(e),e}function pe$g(){this.name=void 0,this.clock=void 0}function E$w(e){this._name=e,this._changed=new o$1h,this._error=new o$1h,this._isLoading=!1,this._loading=new o$1h,this._clock=void 0,this._documentPacket=new pe$g,this._version=void 0,this._entityCollection=new r$v(this),this._entityCluster=new a$r,this._credit=void 0,this._resourceCredits=[]}function i$t(){this._dataSources=[],this._dataSourceAdded=new o$1h,this._dataSourceRemoved=new o$1h,this._dataSourceMoved=new o$1h}function c$n(e,t){if(!e$2e(t))throw new t$15("dataSource is required.");var i=e.indexOf(t);if(-1===i)throw new t$15("dataSource is not in this collection.");return i}function h$x(e,t,i){var n=e._dataSources,r=n.length-1;if((t=e$2d.clamp(t,0,r))!==(i=e$2d.clamp(i,0,r))){var o=n[t];n[t]=n[i],n[i]=o,e.dataSourceMoved.raiseEvent(o,i,t)}}function o$y(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._primitives=[],this._guid=e$1T(),this._zIndex=void 0,this.show=u$Z(e.show,!0),this.destroyPrimitives=u$Z(e.destroyPrimitives,!0)}function a$o(e,t){if(!e.contains(t))throw new t$15("primitive is not in this collection.");return e._primitives.indexOf(t)}function r$t(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}function r$s(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new e$1Q}Object.defineProperties(rr$3.prototype,{isConstant:{get:function(){var e=this.polygon._positions,t=this.polygon._holes;return(!e$2e(e)||e.isConstant)&&(!e$2e(t)||t.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}}),rr$3.prototype.getValue=function(e,t){var i,n;return e$2e(this.polygon._positions)&&(i=this.polygon._positions.getValue(e)),e$2e(this.polygon._holes)&&(e$2e(n=this.polygon._holes.getValue(e))&&(n=n.map((function(e){return new e$1M(e)})))),e$2e(t)?(t.positions=i,t.holes=n,t):new e$1M(i,n)},rr$3.prototype.equals=function(e){return this===e||e instanceof rr$3&&r$_.equals(this.polygon._positions,e.polygon._positions)&&r$_.equals(this.polygon._holes,e.polygon._holes)},E$w.load=function(e,t){return(new E$w).load(e,t)},Object.defineProperties(E$w.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2e(e))throw new t$15("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),E$w.updaters=[gn$1,vn$1,wn$1,Pn$1,On$1,Tn$1,An$1,Rn$1,nn$1,an$1,xn$1,_n$1,Bn$1,En$1,tn$1,Nn$1,on$1,Ln$1,sn$1,Sn$1,fn$1,pn$1],E$w.prototype.process=function(e,t){return me$g(this,e,t,!1)},E$w.prototype.load=function(e,t){return me$g(this,e,t,!0)},E$w.processPacketData=f$u,E$w.processPositionPacketData=ae$e,E$w.processMaterialPacketData=L$v,E$w._processCzml=function(e,t,i,n,r){if(n=u$Z(n,E$w.updaters),Array.isArray(e))for(var o=0,a=e.length;o<a;++o)he$c(e[o],t,n,i,r);else he$c(e,t,n,i,r)},Object.defineProperties(i$t.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}}),i$t.prototype.add=function(e){if(!e$2e(e))throw new t$15("dataSource is required.");if(this.contains(e))throw new t$15("CutomDataSource: "+e.name+" cannot be added repeatedly");var t=this,i=this._dataSources;return o$1l(e,(function(e){return i===t._dataSources&&(t._dataSources.push(e),t._dataSourceAdded.raiseEvent(t,e)),e}))},i$t.prototype.remove=function(e,t){t=u$Z(t,!1);var i=this._dataSources.indexOf(e);if(-1!==i){this._dataSources.splice(i,1);for(var n=0;n<e._entityCollection.values.length;n++){var r=e._entityCollection.values[n];e$2e(r._polygon)&&e$2e(r._polygon.outlines)&&r._polygon.outlines.removeAll(),e$2e(r._polygon)&&e$2e(r._polygon.clampOutlines)&&r.entityCollection._owner._entityCluster._scene._primitives.remove(r._polygon.clampOutlines)}return this._dataSourceRemoved.raiseEvent(this,e),t&&"function"==typeof e.destroy&&e.destroy(),!0}return!1},i$t.prototype.removeAll=function(e){e=u$Z(e,!1);for(var t=this._dataSources,i=0,n=t.length;i<n;++i){var r=t[i];this._dataSourceRemoved.raiseEvent(this,r);for(var o=0;o<r._entityCollection.values.length;o++){var a=r._entityCollection.values[o];e$2e(a._polygon)&&e$2e(a._polygon.outlines)&&a._polygon.outlines.removeAll(),e$2e(a._polygon)&&e$2e(a._polygon.clampOutlines)&&a.entityCollection._owner._entityCluster._scene._primitives.remove(a._polygon.clampOutlines)}e&&"function"==typeof r.destroy&&r.destroy()}this._dataSources=[]},i$t.prototype.contains=function(e){return-1!==this.indexOf(e)},i$t.prototype.indexOf=function(e){return this._dataSources.indexOf(e)},i$t.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return this._dataSources[e]},i$t.prototype.getByName=function(e){if(!e$2e(e))throw new t$15("name is required.");return this._dataSources.filter((function(t){return t.name===e}))},i$t.prototype.raise=function(e){var t=c$n(this._dataSources,e);h$x(this,t,t+1)},i$t.prototype.lower=function(e){var t=c$n(this._dataSources,e);h$x(this,t,t-1)},i$t.prototype.raiseToTop=function(e){var t=c$n(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))},i$t.prototype.lowerToBottom=function(e){var t=c$n(this._dataSources,e);0!==t&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))},i$t.prototype.isDestroyed=function(){return!1},i$t.prototype.destroy=function(){return this.removeAll(!0),i$11(this)},Object.defineProperties(o$y.prototype,{length:{get:function(){return this._primitives.length}}}),o$y.prototype.add=function(e){if(!e$2e(e))throw new t$15("primitive is required.");var t=e._external=e._external||{};return(t._composites=t._composites||{})[this._guid]={collection:this},this._primitives.push(e),e},o$y.prototype.remove=function(e){if(this.contains(e)){var t=this._primitives.indexOf(e);if(-1!==t)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this.destroyPrimitives&&e.destroy(),!0}return!1},o$y.prototype.removeAndDestroy=function(e){var t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t},o$y.prototype.removeAll=function(){for(var e=this._primitives,t=e.length,i=0;i<t;++i)delete e[i]._external._composites[this._guid],this.destroyPrimitives&&e[i].destroy();this._primitives=[]},o$y.prototype.contains=function(e){return!!(e$2e(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])},o$y.prototype.raise=function(e){if(e$2e(e)){var t=a$o(this,e),i=this._primitives;if(t!==i.length-1){var n=i[t];i[t]=i[t+1],i[t+1]=n}}},o$y.prototype.raiseToTop=function(e){if(e$2e(e)){var t=a$o(this,e),i=this._primitives;t!==i.length-1&&(i.splice(t,1),i.push(e))}},o$y.prototype.lower=function(e){if(e$2e(e)){var t=a$o(this,e),i=this._primitives;if(0!==t){var n=i[t];i[t]=i[t-1],i[t-1]=n}}},o$y.prototype.lowerToBottom=function(e){if(e$2e(e)){var t=a$o(this,e),i=this._primitives;0!==t&&(i.splice(t,1),i.unshift(e))}},o$y.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return this._primitives[e]},o$y.prototype.update=function(e){if(this.show)for(var t=this._primitives,i=0;i<t.length;++i)t[i].update(e)},o$y.prototype.prePassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var n=t[i];e$2e(n.prePassesUpdate)&&n.prePassesUpdate(e)}},o$y.prototype.updateForPass=function(e,t){for(var i=this._primitives,n=0;n<i.length;++n){var r=i[n];e$2e(r.updateForPass)&&r.updateForPass(e,t)}},o$y.prototype.postPassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var n=t[i];e$2e(n.postPassesUpdate)&&n.postPassesUpdate(e)}},o$y.prototype.isDestroyed=function(){return!1},o$y.prototype.destroy=function(){return this.removeAll(),i$11(this)},Object.defineProperties(r$t.prototype,{length:{get:function(){return this._length}}}),r$t.prototype.add=function(e,t){o$1q.defined("primitive",e),e$2e(t)&&o$1q.typeOf.number("zIndex",t),t=u$Z(t,0);var i=this._collections[t];if(!e$2e(i)){(i=new o$y({destroyPrimitives:!1}))._zIndex=t,this._collections[t]=i;for(var n=this._collectionsArray,r=0;r<n.length&&n[r]._zIndex<t;)r++;n.splice(r,0,i)}return i.add(e),this._length++,e._zIndex=t,e},r$t.prototype.set=function(e,t){return o$1q.defined("primitive",e),o$1q.typeOf.number("zIndex",t),t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e},r$t.prototype.remove=function(e,t){if(this.contains(e)){var i,n=e._zIndex,r=this._collections[n];return(i=t?r.remove(e):r.removeAndDestroy(e))&&this._length--,0===r.length&&(this._collectionsArray.splice(this._collectionsArray.indexOf(r),1),this._collections[n]=void 0,r.destroy()),i}return!1},r$t.prototype.removeAll=function(){for(var e=this._collectionsArray,t=0;t<e.length;t++){var i=e[t];i.destroyPrimitives=!0,i.destroy()}this._collections={},this._collectionsArray=[],this._length=0},r$t.prototype.contains=function(e){if(!e$2e(e))return!1;var t=this._collections[e._zIndex];return e$2e(t)&&t.contains(e)},r$t.prototype.update=function(e){if(this.show)for(var t=this._collectionsArray,i=0;i<t.length;i++)t[i].update(e)},r$t.prototype.isDestroyed=function(){return!1},r$t.prototype.destroy=function(){return this.removeAll(),i$11(this)},r$s.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))},r$s.prototype.remove=function(e){var t=e.id,i=this._dynamicUpdaters.get(t);e$2e(i)&&(this._dynamicUpdaters.remove(t),i.destroy())},r$s.prototype.update=function(e){for(var t=this._dynamicUpdaters.values,i=0,n=t.length;i<n;i++)t[i].update(e);return!0},r$s.prototype.removeAllPrimitives=function(){for(var e=this._dynamicUpdaters.values,t=0,i=e.length;t<i;t++)e[t].destroy();this._dynamicUpdaters.removeAll()},r$s.prototype.getBoundingSphere=function(e,t){return e$2e(e=this._dynamicUpdaters.get(e.id))&&e$2e(e.getBoundingSphere)?e.getBoundingSphere(t):R$w.FAILED};var I$C=new e$1X,E$v=o$1p.ZERO,H$z=new o$1p,D$q=new h$18;function L$u(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function u$s(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new L$u(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}function h$w(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(u$s.prototype=Object.create(i$x.prototype),u$s.prototype.constructor=u$s),u$s.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,I$C)),e$2e(t)||(t=e$1X.WHITE),r.color=o$16.fromColor(t));return e$2e(this._options.offsetAttribute)&&(r.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,E$v,H$z))),new d$1o({id:i,geometry:new Y$A(this._options),attributes:r})},u$s.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,I$C),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r),offset:void 0};return e$2e(this._options.offsetAttribute)&&(o.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,E$v,H$z))),new d$1o({id:t,geometry:new M$K(this._options),attributes:o})},u$s.prototype._computeCenter=function(e,t){return r$_.getValueOrUndefined(this._entity.position,e,t)},u$s.prototype._isHidden=function(e,t){return!e$2e(e.position)||!e$2e(t.semiMajorAxis)||!e$2e(t.semiMinorAxis)||i$G.prototype._isHidden.call(this,e,t)},u$s.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!r$_.isConstant(t.rotation)||!r$_.isConstant(t.height)||!r$_.isConstant(t.extrudedHeight)||!r$_.isConstant(t.granularity)||!r$_.isConstant(t.stRotation)||!r$_.isConstant(t.outlineWidth)||!r$_.isConstant(t.numberOfVerticalLines)||!r$_.isConstant(t.zIndex)||this._onTerrain&&!r$_.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$P)},u$s.prototype._setStaticOptions=function(e,t){var i=r$_.getValueOrUndefined(t.height,o$I.MINIMUM_VALUE),n=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),r=r$_.getValueOrUndefined(t.extrudedHeight,o$I.MINIMUM_VALUE),o=r$_.getValueOrDefault(t.extrudedHeightReference,o$I.MINIMUM_VALUE,k$R.NONE);e$2e(r)&&!e$2e(i)&&(i=0);var a=this._options;a.vertexFormat=this._materialProperty instanceof t$P?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,a.center=e.position.getValue(o$I.MINIMUM_VALUE,a.center),a.semiMajorAxis=t.semiMajorAxis.getValue(o$I.MINIMUM_VALUE,a.semiMajorAxis),a.semiMinorAxis=t.semiMinorAxis.getValue(o$I.MINIMUM_VALUE,a.semiMinorAxis),a.rotation=r$_.getValueOrUndefined(t.rotation,o$I.MINIMUM_VALUE),a.granularity=r$_.getValueOrUndefined(t.granularity,o$I.MINIMUM_VALUE),a.stRotation=r$_.getValueOrUndefined(t.stRotation,o$I.MINIMUM_VALUE),a.numberOfVerticalLines=r$_.getValueOrUndefined(t.numberOfVerticalLines,o$I.MINIMUM_VALUE),a.offsetAttribute=i$x.computeGeometryOffsetAttribute(i,n,r,o),a.height=i$x.getGeometryHeight(i,n),a.outlineWidth=t.outlineWidth?t.outlineWidth.getValue():1,(r=i$x.getGeometryExtrudedHeight(r,o))===i$x.CLAMP_TO_GROUND&&(r=e$1H.getMinimumMaximumHeights(Y$A.computeRectangle(a,D$q)).minimumTerrainHeight),a.extrudedHeight=r},u$s.DynamicGeometryUpdater=h$w,e$2e(Object.create)&&(h$w.prototype=Object.create(a$C.prototype),h$w.prototype.constructor=h$w),h$w.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2e(n.center)||!e$2e(n.semiMajorAxis)||!e$2e(n.semiMinorAxis)||a$C.prototype._isHidden.call(this,e,t,i)},h$w.prototype._setOptions=function(e,t,i){var n=this._options,r=r$_.getValueOrUndefined(t.height,i),o=r$_.getValueOrDefault(t.heightReference,i,k$R.NONE),a=r$_.getValueOrUndefined(t.extrudedHeight,i),s=r$_.getValueOrDefault(t.extrudedHeightReference,i,k$R.NONE);e$2e(a)&&!e$2e(r)&&(r=0),n.center=r$_.getValueOrUndefined(e.position,i,n.center),n.semiMajorAxis=r$_.getValueOrUndefined(t.semiMajorAxis,i),n.semiMinorAxis=r$_.getValueOrUndefined(t.semiMinorAxis,i),n.rotation=r$_.getValueOrUndefined(t.rotation,i),n.granularity=r$_.getValueOrUndefined(t.granularity,i),n.stRotation=r$_.getValueOrUndefined(t.stRotation,i),n.numberOfVerticalLines=r$_.getValueOrUndefined(t.numberOfVerticalLines,i),n.offsetAttribute=i$x.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$x.getGeometryHeight(r,o),(a=i$x.getGeometryExtrudedHeight(a,s))===i$x.CLAMP_TO_GROUND&&(a=e$1H.getMinimumMaximumHeights(Y$A.computeRectangle(n,D$q)).minimumTerrainHeight),n.extrudedHeight=a};var pe$f=new t$P(e$1X.WHITE),G$v=o$1p.ZERO,L$t=new o$1p,ye$9=new o$1p,_e$8=new o$1p,F$v=new e$1X,ve$b=new o$1p(1,1,1);function Ce$7(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function l$z(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new Ce$7(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}function M$v(e,t,i){a$C.call(this,e,t,i),this._scene=e._scene,this._modelMatrix=new p$1d,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new o$1p,this._material={}}e$2e(Object.create)&&(l$z.prototype=Object.create(i$G.prototype),l$z.prototype.constructor=l$z),Object.defineProperties(l$z.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),l$z.prototype.createFillGeometryInstance=function(e,t,i){o$1q.defined("time",e);var n,r,o=this._entity,a=o.isAvailable(e),s=new e$1I(a&&o.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),l=this._distanceDisplayConditionProperty.getValue(e),u={show:s,distanceDisplayCondition:t$A.fromDistanceDisplayCondition(l),color:void 0,offset:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||a)&&(r=this._materialProperty.color.getValue(e,F$v)),e$2e(r)||(r=e$1X.WHITE),n=o$16.fromColor(r),u.color=n);return e$2e(this._options.offsetAttribute)&&(u.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,G$v,L$t))),new d$1o({id:o,geometry:new b$O(this._options),modelMatrix:t?void 0:o.computeModelMatrixForHeightReference(e,o.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:u})},l$z.prototype.createOutlineGeometryInstance=function(e,t,i){o$1q.defined("time",e);var n=this._entity,r=n.isAvailable(e),o=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,F$v),a=this._distanceDisplayConditionProperty.getValue(e),s={show:new e$1I(r&&n.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(o),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(a),offset:void 0};return e$2e(this._options.offsetAttribute)&&(s.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,G$v,L$t))),new d$1o({id:n,geometry:new x$13(this._options),modelMatrix:t?void 0:n.computeModelMatrixForHeightReference(e,n.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:s})},l$z.prototype._computeCenter=function(e,t){return r$_.getValueOrUndefined(this._entity.position,e,t)},l$z.prototype._isHidden=function(e,t){return!e$2e(e.position)||!e$2e(t.radii)||i$G.prototype._isHidden.call(this,e,t)},l$z.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$_.isConstant(e.orientation)&&t.radii.isConstant&&r$_.isConstant(t.innerRadii)&&r$_.isConstant(t.stackPartitions)&&r$_.isConstant(t.slicePartitions)&&r$_.isConstant(t.outlineWidth)&&r$_.isConstant(t.minimumClock)&&r$_.isConstant(t.maximumClock)&&r$_.isConstant(t.minimumCone)&&r$_.isConstant(t.maximumCone)&&r$_.isConstant(t.subdivisions))},l$z.prototype._setStaticOptions=function(e,t){var i=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof t$P?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,n.radii=t.radii.getValue(o$I.MINIMUM_VALUE,n.radii),n.innerRadii=r$_.getValueOrUndefined(t.innerRadii,n.radii),n.minimumClock=r$_.getValueOrUndefined(t.minimumClock,o$I.MINIMUM_VALUE),n.maximumClock=r$_.getValueOrUndefined(t.maximumClock,o$I.MINIMUM_VALUE),n.minimumCone=r$_.getValueOrUndefined(t.minimumCone,o$I.MINIMUM_VALUE),n.maximumCone=r$_.getValueOrUndefined(t.maximumCone,o$I.MINIMUM_VALUE),n.stackPartitions=r$_.getValueOrUndefined(t.stackPartitions,o$I.MINIMUM_VALUE),n.slicePartitions=r$_.getValueOrUndefined(t.slicePartitions,o$I.MINIMUM_VALUE),n.subdivisions=r$_.getValueOrUndefined(t.subdivisions,o$I.MINIMUM_VALUE),n.offsetAttribute=i!==k$R.NONE?_0x39c22a.ALL:void 0},l$z.prototype._onEntityPropertyChanged=a$B,l$z.DynamicGeometryUpdater=M$v,e$2e(Object.create)&&(M$v.prototype=Object.create(a$C.prototype),M$v.prototype.constructor=M$v),M$v.prototype.update=function(e){o$1q.defined("time",e);var t=this._entity,i=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!r$_.getValueOrDefault(i.show,e,!0))return e$2e(this._primitive)&&(this._primitive.show=!1),void(e$2e(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var n=r$_.getValueOrUndefined(i.radii,e,ye$9),r=e$2e(n)?t.computeModelMatrixForHeightReference(e,i.heightReference,.5*n.z,this._scene.mapProjection.ellipsoid,this._modelMatrix):void 0;if(!e$2e(r)||!e$2e(n))return e$2e(this._primitive)&&(this._primitive.show=!1),void(e$2e(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var o=r$_.getValueOrDefault(i.fill,e,!0),a=r$_.getValueOrDefault(i.outline,e,!1),s=r$_.getValueOrClonedDefault(i.outlineColor,e,e$1X.BLACK,F$v),l=r$C.getValue(e,u$Z(i.material,pe$f),this._material),u=r$_.getValueOrUndefined(i.innerRadii,e,_e$8),c=r$_.getValueOrUndefined(i.minimumClock,e),h=r$_.getValueOrUndefined(i.maximumClock,e),d=r$_.getValueOrUndefined(i.minimumCone,e),f=r$_.getValueOrUndefined(i.maximumCone,e),p=r$_.getValueOrUndefined(i.stackPartitions,e),_=r$_.getValueOrUndefined(i.slicePartitions,e),m=r$_.getValueOrUndefined(i.subdivisions,e),g=r$_.getValueOrDefault(i.outlineWidth,e,1),x=r$_.getValueOrDefault(i.heightReference,e,k$R.NONE),y=x!==k$R.NONE?_0x39c22a.ALL:void 0,v=this._scene.mode,$=v===C$14.SCENE3D&&x===k$R.NONE,b=this._options,T=this._geometryUpdater.shadowsProperty.getValue(e),C=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),S=r$_.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,G$v,L$t);if(!$||this._lastSceneMode!==v||!e$2e(this._primitive)||b.stackPartitions!==p||b.slicePartitions!==_||e$2e(u)&&!o$1p.equals(b.innerRadii!==u)||b.minimumClock!==c||b.maximumClock!==h||b.minimumCone!==d||b.maximumCone!==f||b.subdivisions!==m||this._lastOutlineWidth!==g||b.offsetAttribute!==y){var w=this._primitives;if(w.removeAndDestroy(this._primitive),w.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=v,this._lastOutlineWidth=g,b.stackPartitions=p,b.slicePartitions=_,b.subdivisions=m,b.offsetAttribute=y,b.radii=o$1p.clone($?ve$b:n,b.radii),e$2e(u))if($){var E=o$1p.magnitude(n);b.innerRadii=o$1p.fromElements(u.x/E,u.y/E,u.z/E,b.innerRadii)}else b.innerRadii=o$1p.clone(u,b.innerRadii);else b.innerRadii=void 0;b.minimumClock=c,b.maximumClock=h,b.minimumCone=d,b.maximumCone=f;var P=new t$v({material:l,translucent:l.isTranslucent(),closed:!0});b.vertexFormat=P.vertexFormat;var A=this._geometryUpdater.createFillGeometryInstance(e,$,this._modelMatrix);this._primitive=w.add(new y$R({geometryInstances:A,appearance:P,asynchronous:!1,shadows:T}));var L=this._geometryUpdater.createOutlineGeometryInstance(e,$,this._modelMatrix);this._outlinePrimitive=w.add(new y$R({geometryInstances:L,appearance:new t$Q({flat:!0,translucent:255!==L.attributes.color.value[3],renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(g)}}),asynchronous:!1,shadows:T})),this._lastShow=o,this._lastOutlineShow=a,this._lastOutlineColor=e$1X.clone(s,this._lastOutlineColor),this._lastDistanceDisplayCondition=C,this._lastOffset=o$1p.clone(S,this._lastOffset)}else if(this._primitive.ready){var M=this._primitive,R=this._outlinePrimitive;M.show=!0,R.show=!0,M.appearance.material=l;var O=this._attributes;e$2e(O)||(O=M.getGeometryInstanceAttributes(t),this._attributes=O),o!==this._lastShow&&(O.show=e$1I.toValue(o,O.show),this._lastShow=o);var D=this._outlineAttributes;e$2e(D)||(D=R.getGeometryInstanceAttributes(t),this._outlineAttributes=D),a!==this._lastOutlineShow&&(D.show=e$1I.toValue(a,D.show),this._lastOutlineShow=a),e$1X.equals(s,this._lastOutlineColor)||(D.color=o$16.toValue(s,D.color),e$1X.clone(s,this._lastOutlineColor)),r$Z.equals(C,this._lastDistanceDisplayCondition)||(O.distanceDisplayCondition=t$A.toValue(C,O.distanceDisplayCondition),D.distanceDisplayCondition=t$A.toValue(C,D.distanceDisplayCondition),r$Z.clone(C,this._lastDistanceDisplayCondition)),o$1p.equals(S,this._lastOffset)||(O.offset=e$1E.toValue(S,O.offset),D.offset=e$1E.toValue(S,O.offset),o$1p.clone(S,this._lastOffset))}$&&(n.x=Math.max(n.x,.001),n.y=Math.max(n.y,.001),n.z=Math.max(n.z,.001),r=p$1d.multiplyByScale(r,n,r),this._primitive.modelMatrix=r,this._outlinePrimitive.modelMatrix=r)};var R$o=new o$1p,N$m=new e$1X;function z$r(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function p$n(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new z$r(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}function h$v(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(p$n.prototype=Object.create(i$G.prototype),p$n.prototype.constructor=p$n),p$n.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$1I(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=t$A.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$P?(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,N$m)),e$2e(i)||(i=e$1X.WHITE),t={show:o,distanceDisplayCondition:s,color:o$16.fromColor(i)}):t={show:o,distanceDisplayCondition:s};var l=n.plane,u=this._options,c=n.computeModelMatrix(e),h=r$_.getValueOrDefault(l.plane,e,u.plane),d=r$_.getValueOrUndefined(l.dimensions,e,u.dimensions);return u.plane=h,u.dimensions=d,c=O$m(h,d,c,this._scene.mapProjection.ellipsoid,c),new d$1o({id:n,geometry:new f$L(this._options),modelMatrix:c,attributes:t})},p$n.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,N$m),r=this._distanceDisplayConditionProperty.getValue(e),o=t.plane,a=this._options,s=t.computeModelMatrix(e),l=r$_.getValueOrDefault(o.plane,e,a.plane),u=r$_.getValueOrUndefined(o.dimensions,e,a.dimensions);return a.plane=l,a.dimensions=u,s=O$m(l,u,s,this._scene.mapProjection.ellipsoid,s),new d$1o({id:t,geometry:new i$I,modelMatrix:s,attributes:{show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r)}})},p$n.prototype._isHidden=function(e,t){return!e$2e(t.plane)||!e$2e(t.dimensions)||!e$2e(e.position)||i$G.prototype._isHidden.call(this,e,t)},p$n.prototype._getIsClosed=function(e){return!1},p$n.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&r$_.isConstant(e.orientation)&&t.plane.isConstant&&t.dimensions.isConstant&&r$_.isConstant(t.outlineWidth))},p$n.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$P,n=this._options;n.vertexFormat=i?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,n.plane=t.plane.getValue(o$I.MINIMUM_VALUE,n.plane),n.dimensions=t.dimensions.getValue(o$I.MINIMUM_VALUE,n.dimensions)},p$n.DynamicGeometryUpdater=h$v,e$2e(Object.create)&&(h$v.prototype=Object.create(a$C.prototype),h$v.prototype.constructor=h$v),h$v.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2e(r$_.getValueOrUndefined(e.position,i,R$o))||!e$2e(n.plane)||!e$2e(n.dimensions)||a$C.prototype._isHidden.call(this,e,t,i)},h$v.prototype._setOptions=function(e,t,i){var n=this._options;n.plane=r$_.getValueOrDefault(t.plane,i,n.plane),n.dimensions=r$_.getValueOrUndefined(t.dimensions,i,n.dimensions)};var B$o=new o$1p,Q$q=new o$1p,X$l=new o$1p,q$r=new o$1p,W$w=new o$1p,k$p=new n$15,K$n=new p$1e;function O$m(e,t,i,n,r){var o=e.normal,a=e.distance,s=o$1p.multiplyByScalar(o,-a,X$l);s=p$1d.multiplyByPoint(i,s,s);var l=p$1d.multiplyByPointAsVector(i,o,q$r);o$1p.normalize(l,l);var u=n.geodeticSurfaceNormal(s,Q$q);e$2d.equalsEpsilon(Math.abs(o$1p.dot(u,l)),1,e$2d.EPSILON8)&&(u=o$1p.clone(o$1p.UNIT_Z,u),e$2d.equalsEpsilon(Math.abs(o$1p.dot(u,l)),1,e$2d.EPSILON8)&&(u=o$1p.clone(o$1p.UNIT_X,u)));var c=o$1p.cross(u,l,B$o);u=o$1p.cross(l,c,u),o$1p.normalize(c,c),o$1p.normalize(u,u);var h=K$n;p$1e.setColumn(h,0,c,h),p$1e.setColumn(h,1,u,h),p$1e.setColumn(h,2,l,h);var d=n$15.fromRotationMatrix(h,k$p),f=o$1o.clone(t,W$w);return f.z=1,p$1d.fromTranslationQuaternionRotationScale(s,d,f,r)}p$n.createPrimitiveMatrix=O$m;var B$n="Entity polygons cannot have both height and perPositionHeight. height will be ignored",S$q="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",j$t=new e$1X,F$u=o$1p.ZERO,W$v=new o$1p,X$k=new h$18,te$g=[],re$k=new o$1o;function ie$c(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0,this.depthTestEnabled=void 0,this.groundBottomAltitude=void 0,this.groundExtrudedHeight=void 0}function l$y(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new ie$c(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}function v$u(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(l$y.prototype=Object.create(i$x.prototype),l$y.prototype.constructor=l$y),l$y.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=this._options,o={show:new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,j$t)),e$2e(t)||(t=e$1X.WHITE),o.color=o$16.fromColor(t));return e$2e(r.offsetAttribute)&&(o.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,F$u,W$v))),new d$1o({id:i,geometry:r.perPositionHeight&&!e$2e(r.extrudedHeight)?new P$H(r):new U$18(r),attributes:o})},l$y.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=this._options,r=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,j$t),o=this._distanceDisplayConditionProperty.getValue(e),a={show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(r),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(o),offset:void 0};return e$2e(n.offsetAttribute)&&(a.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,F$u,W$v))),new d$1o({id:t,geometry:n.perPositionHeight&&!e$2e(n.extrudedHeight)?new a$G(n):new A$U(n),attributes:a})},l$y.prototype._computeCenter=function(e,t){var i=r$_.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(e$2e(i)){var n=i.positions;if(0!==n.length){for(var r=this._scene.mapProjection.ellipsoid,o=f$16.fromPoints(n,r),a=o.projectPointsOntoPlane(n,te$g),s=a.length,l=0,u=s-1,c=new o$1o,h=0;h<s;u=h++){var d=a[h],f=a[u],p=d.x*f.y-f.x*d.y,_=o$1o.add(d,f,re$k);_=o$1o.multiplyByScalar(_,p,_),c=o$1o.add(c,_,c),l+=p}var m=1/(3*l);return c=o$1o.multiplyByScalar(c,m,c),o.projectPointOntoEllipsoid(c,t)}}},l$y.prototype._isHidden=function(e,t){return!e$2e(t.hierarchy)||i$G.prototype._isHidden.call(this,e,t)},l$y.prototype._isOnTerrain=function(e,t){var i=i$x.prototype._isOnTerrain.call(this,e,t),n=t.perPositionHeight,r=e$2e(n)&&(!n.isConstant||n.getValue(o$I.MINIMUM_VALUE));return i&&!r},l$y.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!r$_.isConstant(t.height)||!r$_.isConstant(t.extrudedHeight)||!r$_.isConstant(t.granularity)||!r$_.isConstant(t.stRotation)||!r$_.isConstant(t.outlineWidth)||!r$_.isConstant(t.perPositionHeight)||!r$_.isConstant(t.closeTop)||!r$_.isConstant(t.closeBottom)||!r$_.isConstant(t.zIndex)||!r$_.isConstant(t.arcType)||this._onTerrain&&!r$_.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$P)},l$y.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$P,n=this._options;n.vertexFormat=i?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat;var r,o=t.hierarchy.getValue(o$I.MINIMUM_VALUE),a=r$_.getValueOrUndefined(t.height,o$I.MINIMUM_VALUE),s=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),l=r$_.getValueOrUndefined(t.extrudedHeight,o$I.MINIMUM_VALUE),u=r$_.getValueOrDefault(t.extrudedHeightReference,o$I.MINIMUM_VALUE,k$R.NONE),c=r$_.getValueOrDefault(t.perPositionHeight,o$I.MINIMUM_VALUE,!1);a=i$x.getGeometryHeight(a,s),c?(e$2e(a)&&(a=void 0,e$22(B$n)),s!==k$R.NONE&&c&&(a=void 0,e$22(S$q))):(e$2e(l)&&!e$2e(a)&&(a=0),r=i$x.computeGeometryOffsetAttribute(a,s,l,u)),n.polygonHierarchy=o,n.granularity=r$_.getValueOrUndefined(t.granularity,o$I.MINIMUM_VALUE),n.stRotation=r$_.getValueOrUndefined(t.stRotation,o$I.MINIMUM_VALUE),n.perPositionHeight=c,n.closeTop=r$_.getValueOrDefault(t.closeTop,o$I.MINIMUM_VALUE,!0),n.closeBottom=r$_.getValueOrDefault(t.closeBottom,o$I.MINIMUM_VALUE,!0),n.offsetAttribute=r,n.height=a,n.arcType=r$_.getValueOrDefault(t.arcType,o$I.MINIMUM_VALUE,m$1h.GEODESIC),n.depthTestEnabled=!e$2e(e._depthTestEnabled)||e._depthTestEnabled,(l=i$x.getGeometryExtrudedHeight(l,u))===i$x.CLAMP_TO_GROUND&&(l=e$1H.getMinimumMaximumHeights(U$18.computeRectangle(n,X$k)).minimumTerrainHeight),n.extrudedHeight=l,n.groundBottomAltitude=r$_.getValueOrUndefined(t.groundBottomAltitude,o$I.MINIMUM_VALUE),n.groundExtrudedHeight=r$_.getValueOrUndefined(t.groundExtrudedHeight,o$I.MINIMUM_VALUE)},l$y.prototype._getIsClosed=function(e){var t=e.height,i=e.extrudedHeight,n=e$2e(i)&&i!==t;return!e.perPositionHeight&&(!n&&0===t||n&&e.closeTop&&e.closeBottom)},l$y.DynamicGeometryUpdater=v$u,e$2e(Object.create)&&(v$u.prototype=Object.create(a$C.prototype),v$u.prototype.constructor=v$u),v$u.prototype._isHidden=function(e,t,i){return!e$2e(this._options.polygonHierarchy)||a$C.prototype._isHidden.call(this,e,t,i)},v$u.prototype._setOptions=function(e,t,i){var n=this._options;n.polygonHierarchy=r$_.getValueOrUndefined(t.hierarchy,i),Array.isArray(n.polygonHierarchy)&&(n.polygonHierarchy=new e$1M(n.polygonHierarchy));var r,o=r$_.getValueOrUndefined(t.height,i),a=r$_.getValueOrDefault(t.heightReference,i,k$R.NONE),s=r$_.getValueOrDefault(t.extrudedHeightReference,i,k$R.NONE),l=r$_.getValueOrUndefined(t.extrudedHeight,i),u=r$_.getValueOrUndefined(t.perPositionHeight,i);o=i$x.getGeometryHeight(o,s),u?(e$2e(o)&&(o=void 0,e$22(B$n)),a!==k$R.NONE&&u&&(o=void 0,e$22(S$q))):(e$2e(l)&&!e$2e(o)&&(o=0),r=i$x.computeGeometryOffsetAttribute(o,a,l,s)),n.granularity=r$_.getValueOrUndefined(t.granularity,i),n.stRotation=r$_.getValueOrUndefined(t.stRotation,i),n.perPositionHeight=r$_.getValueOrUndefined(t.perPositionHeight,i),n.closeTop=r$_.getValueOrDefault(t.closeTop,i,!0),n.closeBottom=r$_.getValueOrDefault(t.closeBottom,i,!0),n.offsetAttribute=r,n.height=o,n.arcType=r$_.getValueOrDefault(t.arcType,i,m$1h.GEODESIC),(l=i$x.getGeometryExtrudedHeight(l,s))===i$x.CLAMP_TO_GROUND&&(l=e$1H.getMinimumMaximumHeights(U$18.computeRectangle(n,X$k)).minimumTerrainHeight),n.extrudedHeight=l};var M$u=new e$1X;function A$A(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0,this.enuCenter=void 0}function a$n(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new A$A(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}function l$x(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(a$n.prototype=Object.create(i$G.prototype),a$n.prototype.constructor=a$n),a$n.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$1I(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=t$A.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$P?(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,M$u)),e$2e(i)||(i=e$1X.WHITE),t={show:o,distanceDisplayCondition:s,color:o$16.fromColor(i)}):t={show:o,distanceDisplayCondition:s};return new d$1o({id:n,geometry:new N$A(this._options),attributes:t})},a$n.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,M$u),r=this._distanceDisplayConditionProperty.getValue(e);return new d$1o({id:t,geometry:new _$z(this._options),attributes:{show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r)}})},a$n.prototype._isHidden=function(e,t){return!e$2e(t.positions)||!e$2e(t.shape)||i$G.prototype._isHidden.call(this,e,t)},a$n.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&t.shape.isConstant&&r$_.isConstant(t.granularity)&&r$_.isConstant(t.outlineWidth)&&r$_.isConstant(t.cornerType))},a$n.prototype._setStaticOptions=function(e,t){var i=t.granularity,n=t.cornerType,r=t.enuCenter,o=this._options,a=this._materialProperty instanceof t$P;o.vertexFormat=a?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(o$I.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(o$I.MINIMUM_VALUE,o.shape),o.granularity=e$2e(i)?i.getValue(o$I.MINIMUM_VALUE):void 0,o.cornerType=e$2e(n)?n.getValue(o$I.MINIMUM_VALUE):void 0,o.enuCenter=e$2e(r)?r.getValue(o$I.MINIMUM_VALUE):void 0},a$n.DynamicGeometryUpdater=l$x,e$2e(Object.create)&&(l$x.prototype=Object.create(a$C.prototype),l$x.prototype.constructor=l$x),l$x.prototype._isHidden=function(e,t,i){var n=this._options;return!e$2e(n.polylinePositions)||!e$2e(n.shapePositions)||a$C.prototype._isHidden.call(this,e,t,i)},l$x.prototype._setOptions=function(e,t,i){var n=this._options;n.polylinePositions=r$_.getValueOrUndefined(t.positions,i,n.polylinePositions),n.shapePositions=r$_.getValueOrUndefined(t.shape,i),n.granularity=r$_.getValueOrUndefined(t.granularity,i),n.cornerType=r$_.getValueOrUndefined(t.cornerType,i)};var D$p=new e$1X,G$u=o$1p.ZERO,E$u=new o$1p,w$q=new h$18,S$p=new h$18,F$t=new a$18;function j$s(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function d$B(e,t){i$x.call(this,{entity:e,scene:t,geometryOptions:new j$s(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}function h$u(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(d$B.prototype=Object.create(i$x.prototype),d$B.prototype.constructor=d$B),d$B.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r={show:new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,D$p)),e$2e(t)||(t=e$1X.WHITE),r.color=o$16.fromColor(t));return e$2e(this._options.offsetAttribute)&&(r.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,G$u,E$u))),new d$1o({id:i,geometry:new j$N(this._options),attributes:r})},d$B.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,D$p),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r),offset:void 0};return e$2e(this._options.offsetAttribute)&&(o.offset=e$1E.fromCartesian3(r$_.getValueOrDefault(this._terrainOffsetProperty,e,G$u,E$u))),new d$1o({id:t,geometry:new k$I(this._options),attributes:o})},d$B.prototype._computeCenter=function(e,t){var i=r$_.getValueOrUndefined(this._entity.rectangle.coordinates,e,S$p);if(e$2e(i)){var n=h$18.center(i,F$t);return a$18.toCartesian(n,t$12.WGS84,t)}},d$B.prototype._isHidden=function(e,t){return!e$2e(t.coordinates)||i$G.prototype._isHidden.call(this,e,t)},d$B.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!r$_.isConstant(t.height)||!r$_.isConstant(t.extrudedHeight)||!r$_.isConstant(t.granularity)||!r$_.isConstant(t.stRotation)||!r$_.isConstant(t.rotation)||!r$_.isConstant(t.outlineWidth)||!r$_.isConstant(t.zIndex)||this._onTerrain&&!r$_.isConstant(this._materialProperty)&&!(this._materialProperty instanceof t$P)},d$B.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof t$P,n=r$_.getValueOrUndefined(t.height,o$I.MINIMUM_VALUE),r=r$_.getValueOrDefault(t.heightReference,o$I.MINIMUM_VALUE,k$R.NONE),o=r$_.getValueOrUndefined(t.extrudedHeight,o$I.MINIMUM_VALUE),a=r$_.getValueOrDefault(t.extrudedHeightReference,o$I.MINIMUM_VALUE,k$R.NONE);e$2e(o)&&!e$2e(n)&&(n=0);var s=this._options;s.vertexFormat=i?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,s.rectangle=t.coordinates.getValue(o$I.MINIMUM_VALUE,s.rectangle),s.granularity=r$_.getValueOrUndefined(t.granularity,o$I.MINIMUM_VALUE),s.stRotation=r$_.getValueOrUndefined(t.stRotation,o$I.MINIMUM_VALUE),s.rotation=r$_.getValueOrUndefined(t.rotation,o$I.MINIMUM_VALUE),s.offsetAttribute=i$x.computeGeometryOffsetAttribute(n,r,o,a),s.height=i$x.getGeometryHeight(n,r),(o=i$x.getGeometryExtrudedHeight(o,a))===i$x.CLAMP_TO_GROUND&&(o=e$1H.getMinimumMaximumHeights(j$N.computeRectangle(s,w$q)).minimumTerrainHeight),s.extrudedHeight=o},d$B.DynamicGeometryUpdater=h$u,e$2e(Object.create)&&(h$u.prototype=Object.create(a$C.prototype),h$u.prototype.constructor=h$u),h$u.prototype._isHidden=function(e,t,i){return!e$2e(this._options.rectangle)||a$C.prototype._isHidden.call(this,e,t,i)},h$u.prototype._setOptions=function(e,t,i){var n=this._options,r=r$_.getValueOrUndefined(t.height,i),o=r$_.getValueOrDefault(t.heightReference,i,k$R.NONE),a=r$_.getValueOrUndefined(t.extrudedHeight,i),s=r$_.getValueOrDefault(t.extrudedHeightReference,i,k$R.NONE);e$2e(a)&&!e$2e(r)&&(r=0),n.rectangle=r$_.getValueOrUndefined(t.coordinates,i,n.rectangle),n.granularity=r$_.getValueOrUndefined(t.granularity,i),n.stRotation=r$_.getValueOrUndefined(t.stRotation,i),n.rotation=r$_.getValueOrUndefined(t.rotation,i),n.offsetAttribute=i$x.computeGeometryOffsetAttribute(r,o,a,s),n.height=i$x.getGeometryHeight(r,o),(a=i$x.getGeometryExtrudedHeight(a,s))===i$x.CLAMP_TO_GROUND&&(a=e$1H.getMinimumMaximumHeights(j$N.computeRectangle(n,w$q)).minimumTerrainHeight),n.extrudedHeight=a};var W$u=new e$1X,Y$m=new r$Z,$$p=new r$Z,ee$k=o$1p.ZERO,te$f=new o$1p;function v$t(e,t,i,n,r,o,a){var s;this.translucent=t,this.appearanceType=i,this.depthFailAppearanceType=n,this.depthFailMaterialProperty=r,this.depthFailMaterial=void 0,this.closed=o,this.shadows=a,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1Q,this.updaters=new e$1Q,this.updatersWithAttributes=new e$1Q,this.attributes=new e$1Q,this.subscriptions=new e$1Q,this.showsUpdated=new e$1Q,this.itemsToRemove=[],this.invalidated=!1,this.asynchronous=!0,e$2e(r)&&(s=r.definitionChanged.addEventListener(v$t.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=s}function y$s(e,t,i,n,r){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=n,this._shadows=r}function q$q(e,t){for(var i=e.length-1;i>=0;i--){var n=e[i];if(n.remove(t))return 0===n.updaters.length&&(e.splice(i,1),n.destroy()),!0}return!1}function L$s(e,t,i){for(var n=!1,r=t.length,o=0;o<r;++o){var a=t[o],s=a.itemsToRemove,l=s.length;if(l>0)for(o=0;o<l;o++){var u=s[o];a.remove(u),e.add(i,u),n=!0}}return n}function C$t(e,t,i,n){var r,o=t.length;for(r=o-1;r>=0;r--){var a=t[r];if(a.invalidated){t.splice(r,1);for(var s=a.updaters.values,l=s.length,u=0;u<l;u++)e.add(i,s[u]);a.destroy()}}for(o=t.length,r=0;r<o;++r)n=t[r].update(i)&&n;return n}function N$l(e,t,i){for(var n=e.length,r=0;r<n;r++){var o=e[r];if(o.contains(t))return o.getBoundingSphere(t,i)}return R$w.FAILED}function x$v(e){for(var t=e.length,i=0;i<t;i++)e[i].destroy();e.length=0}v$t.prototype.onMaterialChanged=function(){this.invalidated=!0},v$t.prototype.isMaterial=function(e){var t=this.depthFailMaterialProperty,i=e.depthFailMaterialProperty;return i===t||!!e$2e(t)&&t.equals(i)},v$t.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,e$2e(e.asynchronous)&&(this.asynchronous=e.asynchronous),this.enuCenter=e._options&&e._options.enuCenter,e$2e(this.enuCenter)&&(this.materialSupport=t$Q.MaterialSupport.FLOAT_POSITION),this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&r$_.isConstant(e.distanceDisplayConditionProperty)&&r$_.isConstant(e.terrainOffsetProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},v$t.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2e(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},v$t.prototype.update=function(e){var t,i=!0,n=0,r=this.primitive,o=this.primitives;if(this.createPrimitive){var a=this.geometry.values;if(a.length>0){var s;e$2e(r)&&(e$2e(this.oldPrimitive)?o.remove(r):this.oldPrimitive=r),e$2e(this.depthFailAppearanceType)&&(e$2e(this.depthFailMaterialProperty)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),s=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),(r=new y$R({show:!1,asynchronous:this.asynchronous,geometryInstances:a,appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed,materialSupport:this.materialSupport,renderState:{depthTest:{enabled:this._depthTestEnabled}}}),depthFailAppearance:s,shadows:this.shadows,updateBoundingSphere:!e$2e(this.enuCenter),modelMatrix:e$2e(this.enuCenter)?m$19.eastNorthUpToFixedFrame(this.enuCenter,t$12.WGS84,new p$1d):void 0}))._polygonOffset=this.polygonOffset,o.add(r),i=!1}else{e$2e(r)&&(o.remove(r),r=void 0);var l=this.oldPrimitive;e$2e(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(e$2e(r)&&r.ready){r.show=!0,e$2e(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),e$2e(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof t$P)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);var u=this.updatersWithAttributes.values,c=u.length,h=this.waitingOnCreate;for(t=0;t<c;t++){var d=u[t],f=this.geometry.get(d.id),p=this.attributes.get(f.id.id);if(e$2e(p)||(p=r.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,p)),!d.fillMaterialProperty.isConstant||h){var _=d.fillMaterialProperty.color,m=r$_.getValueOrDefault(_,e,e$1X.WHITE,W$u);e$1X.equals(p._lastColor,m)||(p._lastColor=e$1X.clone(m,p._lastColor),p.color=o$16.toValue(m,p.color),(this.translucent&&255===p.color[3]||!this.translucent&&255!==p.color[3])&&(this.itemsToRemove[n++]=d))}if(e$2e(this.depthFailAppearanceType)&&d.depthFailMaterialProperty instanceof t$P&&(!d.depthFailMaterialProperty.isConstant||h)){var g=d.depthFailMaterialProperty.color,x=r$_.getValueOrDefault(g,e,e$1X.WHITE,W$u);e$1X.equals(p._lastDepthFailColor,x)||(p._lastDepthFailColor=e$1X.clone(x,p._lastDepthFailColor),p.depthFailColor=o$16.toValue(x,p.depthFailColor))}var y=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e));y!==(1===p.show[0])&&(p.show=e$1I.toValue(y,p.show));var v=d.distanceDisplayConditionProperty;if(!r$_.isConstant(v)){var $=r$_.getValueOrDefault(v,e,$$p,Y$m);r$Z.equals($,p._lastDistanceDisplayCondition)||(p._lastDistanceDisplayCondition=r$Z.clone($,p._lastDistanceDisplayCondition),p.distanceDisplayCondition=t$A.toValue($,p.distanceDisplayCondition))}var b=d.terrainOffsetProperty;if(!r$_.isConstant(b)){var T=r$_.getValueOrDefault(b,e,ee$k,te$f);o$1p.equals(T,p._lastOffset)||(p._lastOffset=o$1p.clone(T,p._lastOffset),p.offset=e$1E.toValue(T,p.offset))}}this.updateShows(r),this.waitingOnCreate=!1}else e$2e(r)&&!r.ready&&(i=!1);return this.itemsToRemove.length=n,i},v$t.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);e$2e(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$1I.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},v$t.prototype.contains=function(e){return this.updaters.contains(e.id)},v$t.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2e(n)||!e$2e(n.boundingSphere)||e$2e(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},v$t.prototype.destroy=function(){var e=this.primitive,t=this.primitives;e$2e(e)&&t.remove(e);var i=this.oldPrimitive;e$2e(i)&&t.remove(i),e$2e(this.removeMaterialSubscription)&&this.removeMaterialSubscription()},y$s.prototype.add=function(e,t){var i,n,r=t.createFillGeometryInstance(e);255===r.attributes.color.value[3]?(i=this._solidItems,n=!1):(i=this._translucentItems,n=!0);for(var o=i.length,a=0;a<o;a++){var s=i[a];if(this.enuCenter)break;if(!s._hasEnuCenter&&s.isMaterial(t))return void s.add(t,r)}var l=new v$t(this._primitives,n,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);l._hasEnuCenter=t._options&&!!t._options.enuCenter,l._depthTestEnabled=!e$2e(t._options)||!e$2e(t._options.depthTestEnabled)||t._options.depthTestEnabled,l.polygonOffset=t._entity._polygonOffset,l.add(t,r),i.push(l)},y$s.prototype.remove=function(e){q$q(this._solidItems,e)||q$q(this._translucentItems,e)},y$s.prototype.update=function(e){var t=C$t(this,this._solidItems,e,!0);t=C$t(this,this._translucentItems,e,t)&&t;var i=L$s(this,this._solidItems,e),n=L$s(this,this._translucentItems,e);return(i||n)&&(t=C$t(this,this._solidItems,e,t)&&t,t=C$t(this,this._translucentItems,e,t)&&t),t},y$s.prototype.getBoundingSphere=function(e,t){var i=N$l(this._solidItems,e,t);return i===R$w.FAILED?N$l(this._translucentItems,e,t):i},y$s.prototype.removeAllPrimitives=function(){x$v(this._solidItems),x$v(this._translucentItems)};var J$n=new r$Z,K$m=new r$Z,Q$p=o$1p.ZERO,Y$l=new o$1p;function p$m(e,t,i,n,r,o,a){this.primitives=e,this.appearanceType=t,this.materialProperty=i,this.depthFailAppearanceType=n,this.depthFailMaterialProperty=r,this.closed=o,this.shadows=a,this.updaters=new e$1Q,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1Q,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new e$1Q,this.attributes=new e$1Q,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(p$m.prototype.onMaterialChanged,this),this.subscriptions=new e$1Q,this.showsUpdated=new e$1Q,this.materialSupport=void 0,this.asynchronous=!0,this.wrapS=q$1a.CLAMP_TO_EDGE,this.wrapT=q$1a.CLAMP_TO_EDGE,this.compressVertices=!0}p$m.prototype.onMaterialChanged=function(){},p$m.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty,n=this.depthFailMaterialProperty,r=e.depthFailMaterialProperty;if(i===t&&r===n)return!0;var o=e$2e(t)&&t.equals(i);return o=(!e$2e(n)&&!e$2e(r)||e$2e(n)&&n.equals(r))&&o},p$m.prototype.add=function(e,t){var i=t.id;this.updaters.set(i,t);var n=t.createFillGeometryInstance(e);if("unResolve"===n?(this.invalidated=!0,this.geometry.set(i,null)):this.geometry.set(i,n),this.enuCenter=e$2e(t._options)?t._options.enuCenter:void 0,e$2e(this.enuCenter)&&(this.materialSupport=t$v.MaterialSupport.TEXTUREDMODEL),e$2e(t.asynchronous)&&(this.asynchronous=t.asynchronous),e$2e(t.wrapS)&&(this.wrapS=t.wrapS),e$2e(t.wrapT)&&(this.wrapT=t.wrapT),e$2e(t.compressVertices)&&(this.compressVertices=t.compressVertices),this.twoPasses=t.twoPasses,t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$_.isConstant(t.distanceDisplayConditionProperty)&&r$_.isConstant(t.terrainOffsetProperty)){var r=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(i,t);this.createPrimitive=!0},p$m.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2e(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};var $$o=new e$1X;p$m.prototype.update=function(e){for(var t=!0,i=this.primitive,n=this.primitives,r=this.geometry.values,o=0;o<r.length;o++)null===r[o]&&(r.splice(o,1),o--);if(0===r.length&&(this.createPrimitive=!1),this.createPrimitive){if(r.length>0){var a;if(e$2e(i)&&(e$2e(this.oldPrimitive)?n.remove(i):this.oldPrimitive=i),this.material=r$C.getValue(e,this.materialProperty,this.material),this.material._wrapS=this.wrapS,this.material._wrapT=this.wrapT,e$2e(this.depthFailMaterialProperty)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),r.length>1){var s=r[0].modelMatrix,l=p$1d.inverse(r[0].modelMatrix,new p$1d);for(o=1;o<r.length;o++)!p$1d.equals(s,r[o].modelMatrix)&&e$2e(r[o].id.geometry)&&(ee$j(r[o].modelMatrix,r[o].geometry.attributes.position,l),r[o].modelMatrix=s,r[o].geometry.boundingSphere=i$1d.fromVertices(r[o].geometry.attributes.position.values,new o$1p(0,0,0),3))}i=new y$R({show:!1,asynchronous:this.asynchronous,geometryInstances:r,appearance:new this.appearanceType({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed,materialSupport:this.materialSupport}),depthFailAppearance:a,shadows:this.shadows,updateBoundingSphere:!e$2e(this.enuCenter),modelMatrix:e$2e(this.enuCenter)?m$19.eastNorthUpToFixedFrame(this.enuCenter,t$12.WGS84,new p$1d):void 0,twoPasses:this.twoPasses,compressVertices:this.compressVertices}),n.add(i),t=!1}else{e$2e(i)&&(n.remove(i),i=void 0);var u=this.oldPrimitive;e$2e(u)&&(n.remove(u),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1}else if(e$2e(i)&&i.ready){i.show=!0,e$2e(this.oldPrimitive)&&(n.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=r$C.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,e$2e(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof t$P)&&(this.depthFailMaterial=r$C.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);var c=this.updatersWithAttributes.values,h=c.length;for(o=0;o<h;o++){var d=c[o],f=d.entity,p=this.geometry.get(d.id),_=this.attributes.get(p.id.id);if(e$2e(_)||(_=i.getGeometryInstanceAttributes(p.id),this.attributes.set(p.id.id,_)),e$2e(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof t$P&&!d.depthFailMaterialProperty.isConstant){var m=d.depthFailMaterialProperty.color,g=r$_.getValueOrDefault(m,e,e$1X.WHITE,$$o);e$1X.equals(_._lastDepthFailColor,g)||(_._lastDepthFailColor=e$1X.clone(g,_._lastDepthFailColor),_.depthFailColor=o$16.toValue(g,_.depthFailColor))}var x=f.isShowing&&(d.hasConstantFill||d.isFilled(e));x!==(1===_.show[0])&&(_.show=e$1I.toValue(x,_.show));var y=d.distanceDisplayConditionProperty;if(!r$_.isConstant(y)){var v=r$_.getValueOrDefault(y,e,K$m,J$n);r$Z.equals(v,_._lastDistanceDisplayCondition)||(_._lastDistanceDisplayCondition=r$Z.clone(v,_._lastDistanceDisplayCondition),_.distanceDisplayCondition=t$A.toValue(v,_.distanceDisplayCondition))}var $=d.terrainOffsetProperty;if(!r$_.isConstant($)){var b=r$_.getValueOrDefault($,e,Q$p,Y$l);o$1p.equals(b,_._lastOffset)||(_._lastOffset=o$1p.clone(b,_._lastOffset),_.offset=e$1E.toValue(b,_.offset))}}this.updateShows(i)}else e$2e(i)&&!i.ready&&(t=!1);return t};var M$t=new o$1p;function ee$j(e,t,i){if(e$2e(t))for(var n=t.values,r=n.length,o=0;o<r;o+=3){o$1p.unpack(n,o,M$t),p$1d.multiplyByPoint(e,M$t,M$t);var a=p$1d.multiplyByPoint(i,M$t,new o$1p);o$1p.pack(a,n,o)}}function u$r(e,t,i,n,r){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=n,this._shadows=r}p$m.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);e$2e(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$1I.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},p$m.prototype.contains=function(e){return this.updaters.contains(e.id)},p$m.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!e$2e(i)||!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2e(n)||!e$2e(n.boundingSphere)||e$2e(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},p$m.prototype.destroy=function(){var e=this.primitive,t=this.primitives;e$2e(e)&&t.remove(e);var i=this.oldPrimitive;e$2e(i)&&t.remove(i),this.removeMaterialSubscription()},u$r.prototype.add=function(e,t){var i=this._items,n=i.length;if(t instanceof a$n&&e$2e(t.entity._polylineVolume.enuCenter))if(0===i.length){(a=new p$m(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),a.enuCenter=t.entity._polylineVolume.enuCenter._value,i.push(a)}else{for(var r=0;r<n;r++){var o=i[r];if(o$1p.equals(o.enuCenter,t.entity._polylineVolume.enuCenter._value))return void o.add(e,t)}(a=new p$m(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),a.enuCenter=t.entity._polylineVolume.enuCenter._value,i.push(a)}else{for(r=0;r<n;r++){if((o=i[r]).isMaterial(t))return void o.add(e,t)}var a;(a=new p$m(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(e,t),i.push(a)}},u$r.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},u$r.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},u$r.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},u$r.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var x$u=new e$1X,E$t=new r$Z,F$s=new r$Z;function d$A(e,t,i,n){this.primitives=e,this.zIndex=n,this.classificationType=t,this.color=i,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1Q,this.updaters=new e$1Q,this.updatersWithAttributes=new e$1Q,this.attributes=new e$1Q,this.subscriptions=new e$1Q,this.showsUpdated=new e$1Q,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new r$G}function p$l(e,t){this._batches=[],this._primitives=e,this._classificationType=t}d$A.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},d$A.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),this.rectangleCollisionCheck.insert(i,t.geometry.rectangle),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&r$_.isConstant(e.distanceDisplayConditionProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},d$A.prototype.remove=function(e){var t=e.id,i=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,i.geometry.rectangle),this.updatersWithAttributes.remove(t);var n=this.subscriptions.get(t);return e$2e(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},d$A.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.primitives;if(this.createPrimitive){var o=this.geometry.values;if(o.length>0)e$2e(n)&&(e$2e(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),n=new d$15({show:!1,asynchronous:!0,geometryInstances:o.slice(),classificationType:this.classificationType}),r.add(n,this.zIndex),i=!1;else{e$2e(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;e$2e(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(e$2e(n)&&n.ready){n.show=!0,e$2e(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0);var s=this.updatersWithAttributes.values,l=s.length,u=this.waitingOnCreate;for(t=0;t<l;t++){var c=s[t],h=this.geometry.get(c.id),d=this.attributes.get(h.id.id);if(e$2e(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d)),!c.fillMaterialProperty.isConstant||u){var f=c.fillMaterialProperty.color,p=r$_.getValueOrDefault(f,e,e$1X.WHITE,x$u);e$1X.equals(d._lastColor,p)||(d._lastColor=e$1X.clone(p,d._lastColor),d.color=o$16.toValue(p,d.color))}var _=c.entity.isShowing&&(c.hasConstantFill||c.isFilled(e));_!==(1===d.show[0])&&(d.show=e$1I.toValue(_,d.show));var m=c.distanceDisplayConditionProperty;if(!r$_.isConstant(m)){var g=r$_.getValueOrDefault(m,e,F$s,E$t);r$Z.equals(g,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=r$Z.clone(g,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=t$A.toValue(g,d.distanceDisplayCondition))}}this.updateShows(n),this.waitingOnCreate=!1}else e$2e(n)&&!n.ready&&(i=!1);return this.itemsToRemove.length=0,i},d$A.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);e$2e(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$1I.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},d$A.prototype.contains=function(e){return this.updaters.contains(e.id)},d$A.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getBoundingSphere(e.entity);return e$2e(n)?(n.clone(t),R$w.DONE):R$w.FAILED},d$A.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;e$2e(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;e$2e(i)&&(e.remove(i),this.oldPrimitive=void 0)},p$l.prototype.add=function(e,t){for(var i,n=t.createFillGeometryInstance(e),r=this._batches,o=r$_.getValueOrDefault(t.zIndex,0),a=r.length,s=0;s<a;++s){var l=r[s];if(l.zIndex===o&&!l.overlapping(n.geometry.rectangle)){i=l;break}}return e$2e(i)||(i=new d$A(this._primitives,this._classificationType,n.attributes.color.value,o),r.push(i)),i.add(t,n),i},p$l.prototype.remove=function(e){for(var t=this._batches,i=t.length,n=0;n<i;++n)if(t[n].remove(e))return},p$l.prototype.update=function(e){var t,i,n=!0,r=this._batches,o=r.length;for(t=0;t<o;++t)n=r[t].update(e)&&n;for(t=0;t<o;++t)for(var a=r[t],s=a.itemsToRemove,l=s.length,u=0;u<l;u++){i=s[u],a.remove(i);var c=this.add(e,i);a.isDirty=!0,c.isDirty=!0}for(t=o-1;t>=0;--t){var h=r[t];h.isDirty&&(n=r[t].update(e)&&n,h.isDirty=!1),0===h.geometry.length&&r.splice(t,1)}return n},p$l.prototype.getBoundingSphere=function(e,t){for(var i=this._batches,n=i.length,r=0;r<n;++r){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},p$l.prototype.removeAllPrimitives=function(){for(var e=this._batches,t=e.length,i=0;i<t;++i)e[i].removeAllPrimitives()};var b$y=new r$Z,U$r=new r$Z;function v$s(e,t,i,n,r,o){this.primitives=e,this.classificationType=t,this.appearanceType=i,this.materialProperty=n,this.updaters=new e$1Q,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1Q,this.material=void 0,this.updatersWithAttributes=new e$1Q,this.attributes=new e$1Q,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(v$s.prototype.onMaterialChanged,this),this.subscriptions=new e$1Q,this.showsUpdated=new e$1Q,this.usingSphericalTextureCoordinates=r,this.zIndex=o,this.rectangleCollisionCheck=new r$G}function f$t(e,t,i){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=i}v$s.prototype.onMaterialChanged=function(){this.invalidated=!0},v$s.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},v$s.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty;return i===t||i instanceof t$P&&t instanceof t$P||e$2e(t)&&t.equals(i)},v$s.prototype.add=function(e,t,i){var n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,i),this.rectangleCollisionCheck.insert(n,i.geometry.rectangle),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$_.isConstant(t.distanceDisplayConditionProperty)){var r=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},v$s.prototype.remove=function(e){var t=e.id,i=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,i.geometry.rectangle),this.updatersWithAttributes.remove(t);var n=this.subscriptions.get(t);return e$2e(n)&&(n(),this.subscriptions.remove(t)),!0}return!1},v$s.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.primitives,o=this.geometry.values;if(this.createPrimitive){if(o.length>0)e$2e(n)&&(e$2e(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),this.material=r$C.getValue(e,this.materialProperty,this.material),n=new d$15({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({material:this.material}),classificationType:this.classificationType}),r.add(n,this.zIndex),i=!1;else{e$2e(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;e$2e(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(e$2e(n)&&n.ready){n.show=!0,e$2e(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=r$C.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;var s=this.updatersWithAttributes.values,l=s.length;for(t=0;t<l;t++){var u=s[t],c=u.entity,h=this.geometry.get(u.id),d=this.attributes.get(h.id.id);e$2e(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d));var f=c.isShowing&&(u.hasConstantFill||u.isFilled(e));f!==(1===d.show[0])&&(d.show=e$1I.toValue(f,d.show));var p=u.distanceDisplayConditionProperty;if(!r$_.isConstant(p)){var _=r$_.getValueOrDefault(p,e,U$r,b$y);r$Z.equals(_,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=r$Z.clone(_,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=t$A.toValue(_,d.distanceDisplayCondition))}}this.updateShows(n)}else e$2e(n)&&!n.ready&&(i=!1);return i},v$s.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);e$2e(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$1I.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},v$s.prototype.contains=function(e){return this.updaters.contains(e.id)},v$s.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2e(n)||!e$2e(n.boundingSphere)||e$2e(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},v$s.prototype.destroy=function(){var e=this.primitive,t=this.primitives;e$2e(e)&&t.remove(e);var i=this.oldPrimitive;e$2e(i)&&t.remove(i),this.removeMaterialSubscription()},f$t.prototype.add=function(e,t){for(var i=this._items,n=i.length,r=t.createFillGeometryInstance(e),o=y$Q.shouldUseSphericalCoordinates(r.geometry.rectangle),a=r$_.getValueOrDefault(t.zIndex,0),s=0;s<n;++s){var l=i[s];if(l.isMaterial(t)&&l.usingSphericalTextureCoordinates===o&&l.zIndex===a&&!l.overlapping(r.geometry.rectangle))return void l.add(e,t,r)}var u=new v$s(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,o,a);u.add(e,t,r),i.push(u)},f$t.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},f$t.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},f$t.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},f$t.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var x$t=new e$1X,F$r=new r$Z,H$y=new r$Z,Z$p=o$1p.ZERO,j$r=new o$1p;function c$m(e,t,i,n){this.translucent=t,this.width=i,this.shadows=n,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1Q,this.updaters=new e$1Q,this.updatersWithAttributes=new e$1Q,this.attributes=new e$1Q,this.itemsToRemove=[],this.subscriptions=new e$1Q,this.showsUpdated=new e$1Q}function y$r(e,t,i){this._primitives=e,this._scene=t,this._shadows=i,this._solidBatches=new e$1Q,this._translucentBatches=new e$1Q}c$m.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantOutline&&e.outlineColorProperty.isConstant&&r$_.isConstant(e.distanceDisplayConditionProperty)&&r$_.isConstant(e.terrainOffsetProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},c$m.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2e(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},c$m.prototype.update=function(e){var t,i=!0,n=0,r=this.primitive,o=this.primitives;if(this.createPrimitive){var a=this.geometry.values;if(a.length>0)e$2e(r)&&(e$2e(this.oldPrimitive)?o.remove(r):this.oldPrimitive=r),r=new y$R({show:!1,asynchronous:!0,geometryInstances:a,appearance:new t$Q({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width},hasSideness:e$2e(this.outlineWidth)}),shadows:this.shadows}),e$2e(this.outlineWidth)&&(r._outlineWidth=this.outlineWidth),o.add(r),i=!1;else{e$2e(r)&&(o.remove(r),r=void 0);var s=this.oldPrimitive;e$2e(s)&&(o.remove(s),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(e$2e(r)&&r.ready){r.show=!0,e$2e(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);var l=this.updatersWithAttributes.values,u=l.length,c=this.waitingOnCreate;for(t=0;t<u;t++){var h=l[t],d=this.geometry.get(h.id),f=this.attributes.get(d.id.id);if(e$2e(f)||(f=r.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,f)),!h.outlineColorProperty.isConstant||c){var p=h.outlineColorProperty,_=r$_.getValueOrDefault(p,e,e$1X.WHITE,x$t);e$1X.equals(f._lastColor,_)||(f._lastColor=e$1X.clone(_,f._lastColor),f.color=o$16.toValue(_,f.color),(this.translucent&&255===f.color[3]||!this.translucent&&255!==f.color[3])&&(this.itemsToRemove[n++]=h))}var m=h.entity.isShowing&&(h.hasConstantOutline||h.isOutlineVisible(e));m!==(1===f.show[0])&&(f.show=e$1I.toValue(m,f.show));var g=h.distanceDisplayConditionProperty;if(!r$_.isConstant(g)){var x=r$_.getValueOrDefault(g,e,H$y,F$r);r$Z.equals(x,f._lastDistanceDisplayCondition)||(f._lastDistanceDisplayCondition=r$Z.clone(x,f._lastDistanceDisplayCondition),f.distanceDisplayCondition=t$A.toValue(x,f.distanceDisplayCondition))}var y=h.terrainOffsetProperty;if(!r$_.isConstant(y)){var v=r$_.getValueOrDefault(y,e,Z$p,j$r);o$1p.equals(v,f._lastOffset)||(f._lastOffset=o$1p.clone(v,f._lastOffset),f.offset=e$1E.toValue(v,f.offset))}}this.updateShows(r),this.waitingOnCreate=!1}else e$2e(r)&&!r.ready&&(i=!1);return this.itemsToRemove.length=n,i},c$m.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=this.geometry.get(r.id),a=this.attributes.get(o.id.id);e$2e(a)||(a=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,a));var s=r.entity.isShowing;s!==(1===a.show[0])&&(a.show=e$1I.toValue(s,a.show),o.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()},c$m.prototype.contains=function(e){return this.updaters.contains(e.id)},c$m.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2e(n)||!e$2e(n.boundingSphere)||e$2e(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},c$m.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;e$2e(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;e$2e(i)&&(e.remove(i),this.oldPrimitive=void 0)},y$r.prototype.add=function(e,t){var i=t.createOutlineGeometryInstance(e);if(e$2e(i)){var n,r,o,a=this._scene.clampLineWidth(t.outlineWidth);if(255===i.attributes.color.value[3])n=this._solidBatches,t instanceof u$s?(o=t.outlineWidth,r=n.get(o)):r=n.get(a),e$2e(r)||(r=new c$m(this._primitives,!1,a,this._shadows),e$2e(o)?(n.set(o,r),r.outlineWidth=o):n.set(a,r)),r.add(t,i);else n=this._translucentBatches,t instanceof u$s?(o=t.outlineWidth,r=n.get(o)):r=n.get(a),e$2e(r)||(r=new c$m(this._primitives,!0,a,this._shadows),n.set(a,r),e$2e(o)&&(r.outlineWidth=o)),r.add(t,i)}},y$r.prototype.remove=function(e){var t,i=this._solidBatches.values,n=i.length;for(t=0;t<n;t++)if(i[t].remove(e))return;var r=this._translucentBatches.values,o=r.length;for(t=0;t<o;t++)if(r[t].remove(e))return},y$r.prototype.update=function(e){var t,i,n,r,o,a=this._solidBatches.values,s=a.length,l=this._translucentBatches.values,u=l.length,c=!0,h=!1;do{for(h=!1,i=0;i<s;i++){c=(r=a[i]).update(e);var d=(o=r.itemsToRemove).length;if(d>0)for(h=!0,t=0;t<d;t++)n=o[t],r.remove(n),this.add(e,n)}for(i=0;i<u;i++){c=(r=l[i]).update(e);var f=(o=r.itemsToRemove).length;if(f>0)for(h=!0,t=0;t<f;t++)n=o[t],r.remove(n),this.add(e,n)}}while(h);return c},y$r.prototype.getBoundingSphere=function(e,t){var i,n=this._solidBatches.values,r=n.length;for(i=0;i<r;i++){var o=n[i];if(o.contains(e))return o.getBoundingSphere(e,t)}var a=this._translucentBatches.values,s=a.length;for(i=0;i<s;i++){var l=a[i];if(l.contains(e))return l.getBoundingSphere(e,t)}return R$w.FAILED},y$r.prototype.removeAllPrimitives=function(){var e,t=this._solidBatches.values,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._translucentBatches.values,r=n.length;for(e=0;e<r;e++)n[e].removeAllPrimitives()};var I$B=new e$1X;function A$z(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0,this.enuCenter=void 0}function n$m(e,t){i$G.call(this,{entity:e,scene:t,geometryOptions:new A$z(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}function p$k(e,t,i){a$C.call(this,e,t,i)}e$2e(Object.create)&&(n$m.prototype=Object.create(i$G.prototype),n$m.prototype.constructor=n$m),n$m.prototype.createFillGeometryInstance=function(e){if(o$1q.defined("time",e),!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i,n=this._entity,r=n.isAvailable(e),o=new e$1I(r&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),s=t$A.fromDistanceDisplayCondition(a);this._materialProperty instanceof t$P?(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(i=this._materialProperty.color.getValue(e,I$B)),e$2e(i)||(i=e$1X.WHITE),t={show:o,distanceDisplayCondition:s,color:o$16.fromColor(i)}):t={show:o,distanceDisplayCondition:s};return new d$1o({id:n,geometry:new E$G(this._options),attributes:t})},n$m.prototype.createOutlineGeometryInstance=function(e){if(o$1q.defined("time",e),!this._outlineEnabled)throw new t$15("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=r$_.getValueOrDefault(this._outlineColorProperty,e,e$1X.BLACK,I$B),r=this._distanceDisplayConditionProperty.getValue(e);return new d$1o({id:t,geometry:new w$x(this._options),attributes:{show:new e$1I(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o$16.fromColor(n),distanceDisplayCondition:t$A.fromDistanceDisplayCondition(r)}})},n$m.prototype._isHidden=function(e,t){return!e$2e(t.positions)||i$G.prototype._isHidden.call(this,e,t)},n$m.prototype._getIsClosed=function(e){return!1},n$m.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&r$_.isConstant(t.minimumHeights)&&r$_.isConstant(t.maximumHeights)&&r$_.isConstant(t.outlineWidth)&&r$_.isConstant(t.granularity))},n$m.prototype._setStaticOptions=function(e,t){var i=t.minimumHeights,n=t.maximumHeights,r=t.granularity,o=this._materialProperty instanceof t$P,a=t.enuCenter,s=this._options;s.vertexFormat=o?t$Q.VERTEX_FORMAT:t$v.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(o$I.MINIMUM_VALUE,s.positions),s.minimumHeights=e$2e(i)?i.getValue(o$I.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=e$2e(n)?n.getValue(o$I.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=e$2e(r)?r.getValue(o$I.MINIMUM_VALUE):void 0,s.enuCenter=e$2e(a)?a.getValue(o$I.MINIMUM_VALUE):void 0},n$m.DynamicGeometryUpdater=p$k,e$2e(Object.create)&&(p$k.prototype=Object.create(a$C.prototype),p$k.prototype.constructor=p$k),p$k.prototype._isHidden=function(e,t,i){return!e$2e(this._options.positions)||a$C.prototype._isHidden.call(this,e,t,i)},p$k.prototype._setOptions=function(e,t,i){var n=this._options;n.positions=r$_.getValueOrUndefined(t.positions,i,n.positions),n.minimumHeights=r$_.getValueOrUndefined(t.minimumHeights,i,n.minimumHeights),n.maximumHeights=r$_.getValueOrUndefined(t.maximumHeights,i,n.maximumHeights),n.granularity=r$_.getValueOrUndefined(t.granularity,i)};var ee$i=[],I$A=[i$F,s$n,f$z,u$s,l$z,p$n,l$y,a$n,d$B,n$m,m$s];function m$p(e,t){this.entity=e,this.scene=t;var i=new Array(I$A.length),n=new o$1h;function r(e){n.raiseEvent(e)}for(var o=new n$x,a=0;a<i.length;a++){var s=new I$A[a](e,t);o.add(s.geometryChanged,r),i[a]=s}this.updaters=i,this.geometryChanged=n,this.eventHelper=o,this._removeEntitySubscription=e.definitionChanged.addEventListener(m$p.prototype._onEntityPropertyChanged,this)}function c$l(e,t,i,n){o$1q.defined("scene",e),o$1q.defined("entityCollection",t),i=u$Z(i,e.primitives),n=u$Z(n,e.groundPrimitives),this._scene=e,this._primitives=i,this._groundPrimitives=n,this._entityCollection=void 0,this._addedObjects=new e$1Q,this._removedObjects=new e$1Q,this._changedObjects=new e$1Q;var r=W$X.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(2*r),this._closedColorBatches=new Array(2*r),this._closedMaterialBatches=new Array(2*r),this._openColorBatches=new Array(2*r),this._openMaterialBatches=new Array(2*r);var o,a=h$W.supportsMaterialsforEntitiesOnTerrain(e);for(this._supportsMaterialsforEntitiesOnTerrain=a,o=0;o<r;++o)this._outlineBatches[o]=new y$r(i,e,o,!1),this._outlineBatches[r+o]=new y$r(i,e,o,!0),this._closedColorBatches[o]=new y$s(i,t$Q,void 0,!0,o,!0),this._closedColorBatches[r+o]=new y$s(i,t$Q,void 0,!0,o,!1),this._closedMaterialBatches[o]=new u$r(i,t$v,void 0,!0,o,!0),this._closedMaterialBatches[r+o]=new u$r(i,t$v,void 0,!0,o,!1),this._openColorBatches[o]=new y$s(i,t$Q,void 0,!1,o,!0),this._openColorBatches[r+o]=new y$s(i,t$Q,void 0,!1,o,!1),this._openMaterialBatches[o]=new u$r(i,t$v,void 0,!1,o,!0),this._openMaterialBatches[r+o]=new u$r(i,t$v,void 0,!1,o,!1);var s=_0x2b86ba.NUMBER_OF_CLASSIFICATION_TYPES,l=new Array(s),u=[];if(a)for(o=0;o<s;++o)u.push(new f$t(n,o,t$v)),l[o]=new p$l(n,o);else for(o=0;o<s;++o)l[o]=new p$l(n,o);this._groundColorBatches=l,this._groundMaterialBatches=u,this._dynamicBatch=new r$s(i,n),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new e$1Q,this._updaterSets=new e$1Q,this._entityCollection=t,t.collectionChanged.addEventListener(c$l.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,ee$i)}m$p.prototype._onEntityPropertyChanged=function(e,t,i,n){for(var r=this.updaters,o=0;o<r.length;o++)r[o]._onEntityPropertyChanged(e,t,i,n)},m$p.prototype.forEach=function(e){for(var t=this.updaters,i=0;i<t.length;i++)e(t[i])},m$p.prototype.destroy=function(){this.eventHelper.removeAll();for(var e=this.updaters,t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),i$11(this)},c$l.prototype.update=function(e){o$1q.defined("time",e);var t,i,n,r,o=this._addedObjects,a=o.values,s=this._removedObjects,l=s.values,u=this._changedObjects,c=u.values,h=this;for(t=c.length-1;t>-1;t--)n=(i=c[t]).id,(r=this._updaterSets.get(n)).entity===i?r.forEach((function(t){h._removeUpdater(t),h._insertUpdaterIntoBatch(e,t)})):(l.push(i),a.push(i));for(t=l.length-1;t>-1;t--)if(n=(i=l[t]).id,e$2e(r=this._updaterSets.get(n))&&(r.forEach(this._removeUpdater.bind(this)),r.destroy(),this._updaterSets.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n),i.children.length>0))for(var d=0;d<i.children.length;d++){n=(f=i.children[d]).id,e$2e(r=this._updaterSets.get(n))&&(r.forEach(this._removeUpdater.bind(this)),r.destroy(),this._updaterSets.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n))}for(t=a.length-1;t>-1;t--)if(n=(i=a[t]).id,r=new m$p(i,this._scene),this._updaterSets.set(n,r),r.forEach((function(t){h._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(n,r.geometryChanged.addEventListener(c$l._onGeometryChanged,this)),i.children.length>0)for(d=0;d<i.children.length;d++){var f=i.children[d];i.entityCollection.contains(f)||(n=f.id,r=new m$p(f,this._scene),this._updaterSets.set(n,r),r.forEach((function(t){h._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(n,r.geometryChanged.addEventListener(c$l._onGeometryChanged,this)))}o.removeAll(),s.removeAll(),u.removeAll();var p=!0,_=this._batches,m=_.length;for(t=0;t<m;t++)p=_[t].update(e)&&p;return p};var te$e=[],re$j=new i$1d;c$l.prototype.getBoundingSphere=function(e,t){o$1q.defined("entity",e),o$1q.defined("result",t);for(var i=te$e,n=re$j,r=0,o=R$w.DONE,a=this._batches,s=a.length,l=e.id,u=this._updaterSets.get(l).updaters,c=0;c<u.length;c++)for(var h=u[c],d=0;d<s;d++){if((o=a[d].getBoundingSphere(h,n))===R$w.PENDING)return R$w.PENDING;o===R$w.DONE&&(i[r]=i$1d.clone(n,i[r]),r++)}return 0===r?R$w.FAILED:(i.length=r,i$1d.fromBoundingSpheres(i,t),R$w.DONE)},c$l.prototype.isDestroyed=function(){return!1},c$l.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(c$l.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var e,t=this._batches,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._subscriptions.values;for(i=n.length,e=0;e<i;e++)n[e]();this._subscriptions.removeAll();var r=this._updaterSets.values;for(i=r.length,e=0;e<i;e++)r[e].destroy();return this._updaterSets.removeAll(),i$11(this)},c$l.prototype._removeUpdater=function(e){for(var t=this._batches,i=t.length,n=0;n<i;n++)t[n].remove(e)},c$l.prototype._insertUpdaterIntoBatch=function(e,t){if(t.isDynamic)this._dynamicBatch.add(e,t);else{var i;(t.outlineEnabled||t.fillEnabled)&&(i=t.shadowsProperty.getValue(e));var n=W$X.NUMBER_OF_SHADOW_MODES;if(t.outlineEnabled&&(e$2e(t.terrainOffsetProperty)?this._outlineBatches[n+i].add(e,t):this._outlineBatches[i].add(e,t)),t.fillEnabled)if(t.onTerrain){var r=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof t$P?this._groundColorBatches[r].add(e,t):this._groundMaterialBatches[r].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof t$P?e$2e(t.terrainOffsetProperty)?this._closedColorBatches[n+i].add(e,t):this._closedColorBatches[i].add(e,t):e$2e(t.terrainOffsetProperty)?this._closedMaterialBatches[n+i].add(e,t):this._closedMaterialBatches[i].add(e,t):t.fillMaterialProperty instanceof t$P?e$2e(t.terrainOffsetProperty)?this._openColorBatches[n+i].add(e,t):this._openColorBatches[i].add(e,t):e$2e(t.terrainOffsetProperty)?this._openMaterialBatches[n+i].add(e,t):this._openMaterialBatches[i].add(e,t)}},c$l._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,n=e.entity,r=n.id;!e$2e(t.get(r))&&!e$2e(i.get(r))&&i.set(r,n)},c$l.prototype._onCollectionChanged=function(e,t,i){var n,r,o,a=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)r=(o=i[n]).id,a.remove(r)||(s.set(r,o),l.remove(r));for(n=t.length-1;n>-1;n--)r=(o=t[n]).id,s.remove(r)?l.set(r,o):a.set(r,o)};var U$q=1,q$p="30px sans-serif",N$k=R$S.FILL,z$q=e$1X.WHITE,A$y=e$1X.BLACK,F$q=1,H$x=!1,T$t=new e$1X(.165,.165,.165,.8),W$t=new o$1o(7,5),I$z=o$1o.ZERO,Z$o=o$1p.ZERO,j$q=k$R.NONE,K$l=j$V.CENTER,J$m=S$Q.CENTER,M$s=new o$1p,Q$o=new e$1X,X$j=new e$1X,Y$k=new e$1X,$$n=new o$1o,G$t=new o$1p,b$x=new o$1o,ee$h=new o$Y,te$d=new o$Y,re$i=new o$Y,ne$f=new r$Z;function S$o(e){this.entity=e,this.label=void 0,this.index=void 0}function l$w(e,t){if(!e$2e(e))throw new t$15("entityCluster is required.");if(!e$2e(t))throw new t$15("entityCollection is required.");t.collectionChanged.addEventListener(l$w.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1Q,this._onCollectionChanged(t,t.values,[],[])}function y$q(e,t,i){e$2e(e)&&(e.label=void 0,i.removeLabel(t))}l$w.prototype.update=function(e){if(!e$2e(e))throw new t$15("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a,s=t[n],l=s.entity,u=l._label,c=s.label,h=l.isShowing&&l.isAvailable(e)&&r$_.getValueOrDefault(u._show,e,!0);if(h&&(a=r$_.getValueOrUndefined(l._position,e,M$s),o=r$_.getValueOrUndefined(u._text,e),h=e$2e(a)&&e$2e(o)),h){r$_.isConstant(l._position)||(i._clusterDirty=!0);var d=!1,f=r$_.getValueOrDefault(u._heightReference,e,j$q);e$2e(c)||((c=i.getLabel(l)).id=l,s.label=c,d=o$1p.equals(c.position,a)&&c.heightReference===f),c.show=!0,c.position=a,c.text=o,c.scale=r$_.getValueOrDefault(u._scale,e,U$q),c.font=r$_.getValueOrDefault(u._font,e,q$p),c.style=r$_.getValueOrDefault(u._style,e,N$k),c.fillColor=r$_.getValueOrDefault(u._fillColor,e,z$q,Q$o),c.outlineColor=r$_.getValueOrDefault(u._outlineColor,e,A$y,X$j),c.outlineWidth=r$_.getValueOrDefault(u._outlineWidth,e,F$q),c.showBackground=r$_.getValueOrDefault(u._showBackground,e,H$x),c.backgroundColor=r$_.getValueOrDefault(u._backgroundColor,e,T$t,Y$k),c.backgroundPadding=r$_.getValueOrDefault(u._backgroundPadding,e,W$t,$$n),c.pixelOffset=r$_.getValueOrDefault(u._pixelOffset,e,I$z,b$x),c.eyeOffset=r$_.getValueOrDefault(u._eyeOffset,e,Z$o,G$t),c.heightReference=f,c.horizontalOrigin=r$_.getValueOrDefault(u._horizontalOrigin,e,K$l),c.verticalOrigin=r$_.getValueOrDefault(u._verticalOrigin,e,J$m),c.translucencyByDistance=r$_.getValueOrUndefined(u._translucencyByDistance,e,ee$h),c.pixelOffsetScaleByDistance=r$_.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,te$d),c.scaleByDistance=r$_.getValueOrUndefined(u._scaleByDistance,e,re$i),c.distanceDisplayCondition=r$_.getValueOrUndefined(u._distanceDisplayCondition,e,ne$f),c.disableDepthTestDistance=r$_.getValueOrUndefined(u._disableDepthTestDistance,e),d&&c._updateClamping()}else y$q(s,l,i)}return!0},l$w.prototype.getBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("entity is required.");if(!e$2e(t))throw new t$15("result is required.");var i=this._items.get(e.id);if(!e$2e(i)||!e$2e(i.label))return R$w.FAILED;var n=i.label;return t.center=o$1p.clone(u$Z(n._clampedPosition,n.position),t.center),t.radius=0,R$w.DONE},l$w.prototype.isDestroyed=function(){return!1},l$w.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$w.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return i$11(this)},l$w.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)e$2e((o=t[r])._label)&&e$2e(o._position)&&a.set(o.id,new S$o(o));for(r=n.length-1;r>-1;r--)e$2e((o=n[r])._label)&&e$2e(o._position)?a.contains(o.id)||a.set(o.id,new S$o(o)):(y$q(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],y$q(a.get(o.id),o,s),a.remove(o.id)};var N$j=1,j$p=0,k$o=!0,W$s=!0,J$l=W$X.ENABLED,K$k=k$R.NONE,Q$n=e$1X.RED,X$i=0,Y$j=e$1X.WHITE,Z$n=I$K.HIGHLIGHT,$$m=.5,G$s=new o$1o(1,1),ee$g=new p$1d,ie$b=new p$1d;function d$z(e,t){if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(t))throw new t$15("entityCollection is required.");t.collectionChanged.addEventListener(d$z.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new e$1Q,this._onCollectionChanged(t,t.values,[],[])}function M$r(e,t,i,n){var r=i[t.id];e$2e(r)&&(n.removeAndDestroy(r.modelPrimitive),delete i[t.id])}function re$h(e,t){var i=t[e.id];e$2e(i)&&(i.nodeTransformationsScratch={})}function te$c(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}function i$s(e){this._definitionChanged=new o$1h,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}d$z.prototype.update=function(e){if(!e$2e(e))throw new t$15("time is required.");for(var t=this._entitiesToVisualize.values,i=this._modelHash,n=this._primitives,r=0,o=t.length;r<o;r++){var a,s,l=t[r],u=l._model,c=i[l.id],h=l.isShowing&&l.isAvailable(e)&&r$_.getValueOrDefault(u._show,e,!0);if(h&&(s=l.computeModelMatrix(e,ee$g),a=t$10.createIfNeeded(r$_.getValueOrUndefined(u._uri,e)),h=e$2e(s)&&e$2e(a)),h){var d=e$2e(c)?c.modelPrimitive:void 0;if((!e$2e(d)||a.url!==c.url)&&(e$2e(d)&&(n.removeAndDestroy(d),delete i[l.id]),(d=F$B.fromGltf({url:a,incrementallyLoadTextures:r$_.getValueOrDefault(u._incrementallyLoadTextures,e,k$o),scene:this._scene})).id=l,n.add(d),c={modelPrimitive:d,url:a.url,animationsRunning:!1,nodeTransformationsScratch:{},originalNodeMatrixHash:{},loadFail:!1},i[l.id]=c,te$c(d,l,i)),d.show=!0,d.scale=r$_.getValueOrDefault(u._scale,e,N$j),d._offsetMatrix=u._offsetMatrix,d.minimumPixelSize=r$_.getValueOrDefault(u._minimumPixelSize,e,j$p),d.maximumScale=r$_.getValueOrUndefined(u._maximumScale,e),d.modelMatrix=p$1d.clone(s,d.modelMatrix),d.shadows=r$_.getValueOrDefault(u._shadows,e,J$l),d.heightReference=r$_.getValueOrDefault(u._heightReference,e,K$k),d.distanceDisplayCondition=r$_.getValueOrUndefined(u._distanceDisplayCondition,e),d.silhouetteColor=r$_.getValueOrDefault(u._silhouetteColor,e,Q$n,d._silhouetteColor),d.silhouetteSize=r$_.getValueOrDefault(u._silhouetteSize,e,X$i),d.color=r$_.getValueOrDefault(u._color,e,Y$j,d._color),d.colorBlendMode=r$_.getValueOrDefault(u._colorBlendMode,e,Z$n),d.colorBlendAmount=r$_.getValueOrDefault(u._colorBlendAmount,e,$$m),d.clippingPlanes=r$_.getValueOrUndefined(u._clippingPlanes,e),d.clampAnimations=r$_.getValueOrDefault(u._clampAnimations,e,W$s),d.imageBasedLightingFactor=r$_.getValueOrDefault(u._imageBasedLightingFactor,e,G$s),d.lightColor=r$_.getValueOrUndefined(u._lightColor,e),d.ready){var f=r$_.getValueOrDefault(u._runAnimations,e,!0);c.animationsRunning!==f&&(f?d.activeAnimations.addAll({loop:_0x1ea9f2.REPEAT}):d.activeAnimations.removeAll(),c.animationsRunning=f);var p=r$_.getValueOrUndefined(u._nodeTransformations,e,c.nodeTransformationsScratch);if(e$2e(p))for(var _=c.originalNodeMatrixHash,m=Object.keys(p),g=0,x=m.length;g<x;++g){var y=m[g],v=p[y];if(e$2e(v)){var $=d.getNode(y);if(e$2e($)){var b=_[y];e$2e(b)||(b=$.matrix.clone(),_[y]=b);var T=p$1d.fromTranslationRotationScale(v,ie$b);$.matrix=p$1d.multiply(b,T,T)}}}}}else e$2e(c)&&(c.modelPrimitive.show=!1)}return!0},d$z.prototype.isDestroyed=function(){return!1},d$z.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(d$z.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._modelHash,i=this._primitives,n=e.length-1;n>-1;n--)M$r(this,e[n],t,i);return i$11(this)},d$z.prototype.getBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("entity is required.");if(!e$2e(t))throw new t$15("result is required.");var i=this._modelHash[e.id];if(!e$2e(i)||i.loadFail)return R$w.FAILED;var n=i.modelPrimitive;if(!e$2e(n)||!n.show)return R$w.FAILED;if(!n.ready)return R$w.PENDING;if(n.heightReference===k$R.NONE)i$1d.transform(n.boundingSphere,n.modelMatrix,t);else{if(!e$2e(n._clampedModelMatrix))return R$w.PENDING;i$1d.transform(n.boundingSphere,n._clampedModelMatrix,t)}return R$w.DONE},d$z.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._entitiesToVisualize,s=this._modelHash,l=this._primitives;for(r=t.length-1;r>-1;r--)e$2e((o=t[r])._model)&&e$2e(o._position)&&a.set(o.id,o);for(r=n.length-1;r>-1;r--)e$2e((o=n[r])._model)&&e$2e(o._position)?(re$h(o,s),a.set(o.id,o)):(M$r(this,o,s,l),a.remove(o.id));for(r=i.length-1;r>-1;r--)M$r(this,o=i[r],s,l),a.remove(o.id)},Object.defineProperties(i$s.prototype,{isConstant:{get:function(){return r$_.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return e$2e(this._value)?this._value.referenceFrame:Re$l.FIXED}}}),i$s.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,Re$l.FIXED,t)},i$s.prototype.setValue=function(e){this._value!==e&&(this._value=e,e$2e(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),e$2e(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))},i$s.prototype.getValueInReferenceFrame=function(e,t,i){if(!e$2e(e))throw new t$15("time is required.");if(!e$2e(t))throw new t$15("referenceFrame is required.");if(e$2e(this._value))return e$2e(i=this._value.getValueInReferenceFrame(e,t,i))?t$12.WGS84.scaleToGeodeticSurface(i,i):void 0},i$s.prototype.equals=function(e){return this===e||e instanceof i$s&&this._value===e._value},i$s.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var $$l=60,U$p=1,F$p=new d$W,V$n=new d$W,D$o=new d$W;function T$s(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function ee$f(e,t,i,n,r,o,a,s,l){var u,c=s;e$2e(u=e.getValueInReferenceFrame(t,o,l[c]))&&(l[c++]=u);for(var h,d,f,p=!e$2e(r)||a$15.lessThanOrEquals(r,t)||a$15.greaterThanOrEquals(r,i),_=0,m=n.length,g=n[_],x=i,y=!1;_<m;){if(!p&&a$15.greaterThanOrEquals(g,r)&&(e$2e(u=e.getValueInReferenceFrame(r,o,l[c]))&&(l[c++]=u),p=!0),a$15.greaterThan(g,t)&&a$15.lessThan(g,x)&&!g.equals(r)&&(e$2e(u=e.getValueInReferenceFrame(g,o,l[c]))&&(l[c++]=u)),_<m-1){if(a>0&&!y){var v=n[_+1],$=a$15.secondsDifference(v,g);(y=$>a)&&(h=Math.ceil($/a),d=0,f=$/Math.max(h,2),h=Math.max(h-1,1))}if(y&&d<h){g=a$15.addSeconds(g,f,new a$15),d++;continue}}y=!1,g=n[++_]}return e$2e(u=e.getValueInReferenceFrame(i,o,l[c]))&&(l[c++]=u),c}function ne$e(e,t,i,n,r,o,a,s){for(var l,u=0,c=a,h=t,d=Math.max(o,60),f=!e$2e(n)||a$15.lessThanOrEquals(n,t)||a$15.greaterThanOrEquals(n,i);a$15.lessThan(h,i);)!f&&a$15.greaterThanOrEquals(h,n)&&(f=!0,e$2e(l=e.getValueInReferenceFrame(n,r,s[c]))&&(s[c]=l,c++)),e$2e(l=e.getValueInReferenceFrame(h,r,s[c]))&&(s[c]=l,c++),u++,h=a$15.addSeconds(t,d*u,new a$15);return e$2e(l=e.getValueInReferenceFrame(i,r,s[c]))&&(s[c]=l,c++),c}function oe$c(e,t,i,n,r,o,a,s){D$o.start=t,D$o.stop=i;for(var l=a,u=e.intervals,c=0;c<u.length;c++){var h=u.get(c);if(!d$W.intersect(h,D$o,F$p).isEmpty){var d=h.start;h.isStartIncluded||(d=h.isStopIncluded?h.stop:a$15.addSeconds(h.start,a$15.secondsDifference(h.stop,h.start)/2,new a$15));var f=e.getValueInReferenceFrame(d,r,s[l]);e$2e(f)&&(s[l]=f,l++)}}return l}function ie$a(e,t,i,n,r,o,a,s){var l=e.getValueInReferenceFrame(t,r,s[a]);return e$2e(l)&&(s[a++]=l),a}function re$g(e,t,i,n,r,o,a,s){V$n.start=t,V$n.stop=i;for(var l=a,u=e.intervals,c=0;c<u.length;c++){var h=u.get(c);if(!d$W.intersect(h,V$n,F$p).isEmpty){var d=h.start,f=h.stop,p=t;a$15.greaterThan(d,p)&&(p=d);var _=i;a$15.lessThan(f,_)&&(_=f),l=x$s(h.data,p,_,n,r,o,l,s)}}return l}function x$s(e,t,i,n,r,o,a,s){for(;e instanceof a$p;)e=e.resolvedProperty;e instanceof o$z?a=ee$f(e,t,i,e._property._times,n,r,o,a,s):a=e instanceof t$p?re$g(e,t,i,n,r,o,a,s):e instanceof t$l?oe$c(e,t,i,n,r,o,a,s):e instanceof r$V||e instanceof i$s&&r$_.isConstant(e)?ie$a(e,t,i,n,r,o,a,s):ne$e(e,t,i,n,r,o,a,s);return a}function A$x(e,t,i,n,r,o,a){e$2e(a)||(a=[]);var s=x$s(e,t,i,n,r,o,0,a);return a.length=s,a}var G$r=new p$1e;function I$y(e,t){this._unusedIndexes=[],this._polylineCollection=new J$T,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}function w$p(e,t){if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(t))throw new t$15("entityCollection is required.");t.collectionChanged.addEventListener(w$p.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new e$1Q,this._onCollectionChanged(t,t.values,[],[])}I$y.prototype.update=function(e){if(this._referenceFrame===Re$l.INERTIAL){var t=m$19.computeIcrfToFixedMatrix(e,G$r);e$2e(t)||(t=m$19.computeTemeToPseudoFixedMatrix(e,G$r)),p$1d.fromRotationTranslation(t,o$1p.ZERO,this._polylineCollection.modelMatrix)}},I$y.prototype.updateObject=function(e,t){var i,n,r=t.entity,o=r._path,a=r._position,s=o._show,l=t.polyline,u=r.isShowing&&(!e$2e(s)||s.getValue(e));if(u){var c=r$_.getValueOrUndefined(o._leadTime,e),h=r$_.getValueOrUndefined(o._trailTime,e),d=r._availability,f=e$2e(d),p=e$2e(c),_=e$2e(h);if(u=f||p&&_){if(_&&(i=a$15.addSeconds(e,-h,new a$15)),p&&(n=a$15.addSeconds(e,c,new a$15)),f){var m=d.start,g=d.stop;(!_||a$15.greaterThan(m,i))&&(i=m),(!p||a$15.lessThan(g,n))&&(n=g)}u=a$15.lessThan(i,n)}}if(u){if(!e$2e(l)){var x=this._unusedIndexes;if(x.length>0){var y=x.pop();l=this._polylineCollection.get(y),t.index=y}else t.index=this._polylineCollection.length,l=this._polylineCollection.add();l.id=r,t.polyline=l}var v=r$_.getValueOrDefault(o._resolution,e,$$l);l.show=!0,l.positions=A$x(a,i,n,e,this._referenceFrame,v,l.positions.slice()),l.material=r$C.getValue(e,o._material,l.material),l.width=r$_.getValueOrDefault(o._width,e,U$p),l.distanceDisplayCondition=r$_.getValueOrUndefined(o._distanceDisplayCondition,e,l.distanceDisplayCondition)}else e$2e(l)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,l.show=!1,t.index=void 0)},I$y.prototype.removeObject=function(e){var t=e.polyline;e$2e(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)},I$y.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),i$11(this)},w$p.prototype.update=function(e){if(!e$2e(e))throw new t$15("time is required.");var t=this._updaters;for(var i in t)t.hasOwnProperty(i)&&t[i].update(e);var n=this._items.values;if(0===n.length&&e$2e(this._updaters)&&Object.keys(this._updaters).length>0){for(var r in t)t.hasOwnProperty(r)&&t[r].destroy();this._updaters={}}for(var o=0,a=n.length;o<a;o++){var s=n[o],l=s.entity._position,u=s.updater,c=Re$l.FIXED;this._scene.mode===C$14.SCENE3D&&(c=l.referenceFrame);var h=this._updaters[c];u===h&&e$2e(h)?h.updateObject(e,s):(e$2e(u)&&u.removeObject(s),e$2e(h)||((h=new I$y(this._scene,c)).update(e),this._updaters[c]=h),s.updater=h,e$2e(h)&&h.updateObject(e,s))}return!0},w$p.prototype.isDestroyed=function(){return!1},w$p.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(w$p.prototype._onCollectionChanged,this);var e=this._updaters;for(var t in e)e.hasOwnProperty(t)&&e[t].destroy();return i$11(this)},w$p.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a,s=this._items;for(r=t.length-1;r>-1;r--)e$2e((o=t[r])._path)&&e$2e(o._position)&&s.set(o.id,new T$s(o));for(r=n.length-1;r>-1;r--)e$2e((o=n[r])._path)&&e$2e(o._position)?s.contains(o.id)||s.set(o.id,new T$s(o)):e$2e(a=s.get(o.id))&&(e$2e(a.updater)&&a.updater.removeObject(a),s.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],e$2e(a=s.get(o.id))&&(e$2e(a.updater)&&a.updater.removeObject(a),s.remove(o.id))},w$p._subSample=A$x;var x$r=e$1X.WHITE,I$x=e$1X.BLACK,L$r=0,W$r=1,z$p=0,M$q=new e$1X,w$o=new o$1p,F$o=new e$1X,H$w=new o$Y,j$o=new o$Y,k$n=new r$Z;function J$k(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function v$r(e,t){if(!e$2e(e))throw new t$15("entityCluster is required.");if(!e$2e(t))throw new t$15("entityCollection is required.");t.collectionChanged.addEventListener(v$r.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new e$1Q,this._onCollectionChanged(t,t.values,[],[])}function V$m(e,t,i){if(e$2e(e)){if(e$2e(e.pointPrimitive))return e.pointPrimitive=void 0,void i.removePoint(t);e$2e(e.billboard)&&(e.billboard=void 0,i.removeBillboard(t))}}v$r.prototype.update=function(e){if(!e$2e(e))throw new t$15("time is required.");for(var t=this._items.values,i=this._cluster,n=0,r=t.length;n<r;n++){var o,a=t[n],s=a.entity,l=s._point,u=a.pointPrimitive,c=a.billboard,h=r$_.getValueOrDefault(l._heightReference,e,k$R.NONE),d=s.isShowing&&s.isAvailable(e)&&r$_.getValueOrDefault(l._show,e,!0);if(d&&(d=e$2e(o=r$_.getValueOrUndefined(s._position,e,w$o))),d){r$_.isConstant(s._position)||(i._clusterDirty=!0);var f=!1,p=!1;if(h===k$R.NONE||e$2e(c)?h===k$R.NONE&&!e$2e(u)&&(e$2e(c)&&(V$m(a,s,i),c=void 0),(u=i.getPoint(s)).id=s,a.pointPrimitive=u):(e$2e(u)&&(V$m(a,s,i),u=void 0),(c=i.getBillboard(s)).id=s,c.image=void 0,a.billboard=c,f=!0,p=o$1p.equals(c.position,o)&&c.heightReference===h),e$2e(u))u.show=!0,u.position=o,u.scaleByDistance=r$_.getValueOrUndefined(l._scaleByDistance,e,H$w),u.translucencyByDistance=r$_.getValueOrUndefined(l._translucencyByDistance,e,j$o),u.color=r$_.getValueOrDefault(l._color,e,x$r,M$q),u.outlineColor=r$_.getValueOrDefault(l._outlineColor,e,I$x,F$o),u.outlineWidth=r$_.getValueOrDefault(l._outlineWidth,e,L$r),u.pixelSize=r$_.getValueOrDefault(l._pixelSize,e,W$r),u.distanceDisplayCondition=r$_.getValueOrUndefined(l._distanceDisplayCondition,e,k$n),u.disableDepthTestDistance=r$_.getValueOrDefault(l._disableDepthTestDistance,e,z$p);else if(e$2e(c)){c.show=!0,c.position=o,c.scaleByDistance=r$_.getValueOrUndefined(l._scaleByDistance,e,H$w),c.translucencyByDistance=r$_.getValueOrUndefined(l._translucencyByDistance,e,j$o),c.distanceDisplayCondition=r$_.getValueOrUndefined(l._distanceDisplayCondition,e,k$n),c.disableDepthTestDistance=r$_.getValueOrDefault(l._disableDepthTestDistance,e,z$p),c.heightReference=h;var _=r$_.getValueOrDefault(l._color,e,x$r,M$q),m=r$_.getValueOrDefault(l._outlineColor,e,I$x,F$o),g=Math.round(r$_.getValueOrDefault(l._outlineWidth,e,L$r)),x=Math.max(1,Math.round(r$_.getValueOrDefault(l._pixelSize,e,W$r)));if(g>0?(c.scale=1,f=f||g!==a.outlineWidth||x!==a.pixelSize||!e$1X.equals(_,a.color)||!e$1X.equals(m,a.outlineColor)):(c.scale=x/50,x=50,f=f||g!==a.outlineWidth||!e$1X.equals(_,a.color)||!e$1X.equals(m,a.outlineColor)),f){a.color=e$1X.clone(_,a.color),a.outlineColor=e$1X.clone(m,a.outlineColor),a.pixelSize=x,a.outlineWidth=g;var y=_.alpha,v=_.toCssColorString(),$=m.toCssColorString(),b=JSON.stringify([v,x,$,g]);c.setImage(b,i$B(y,v,$,g,x))}p&&c._updateClamping()}}else V$m(a,s,i)}return!0},v$r.prototype.getBoundingSphere=function(e,t){if(!e$2e(e))throw new t$15("entity is required.");if(!e$2e(t))throw new t$15("result is required.");var i=this._items.get(e.id);if(!e$2e(i)||!e$2e(i.pointPrimitive)&&!e$2e(i.billboard))return R$w.FAILED;if(e$2e(i.pointPrimitive))t.center=o$1p.clone(i.pointPrimitive.position,t.center);else{var n=i.billboard;if(!e$2e(n._clampedPosition))return R$w.PENDING;t.center=o$1p.clone(n._clampedPosition,t.center)}return t.radius=0,R$w.DONE},v$r.prototype.isDestroyed=function(){return!1},v$r.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(v$r.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return i$11(this)},v$r.prototype._onCollectionChanged=function(e,t,i,n){var r,o,a=this._items,s=this._cluster;for(r=t.length-1;r>-1;r--)e$2e((o=t[r])._point)&&e$2e(o._position)&&a.set(o.id,new J$k(o));for(r=n.length-1;r>-1;r--)e$2e((o=n[r])._point)&&e$2e(o._position)?a.contains(o.id)||a.set(o.id,new J$k(o)):(V$m(a.get(o.id),o,s),a.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],V$m(a.get(o.id),o,s),a.remove(o.id)};var d$y=e$1X.WHITE,l$v=1,f$s=.3,h$t=5,u$q=0,c$k=1e3;function o$x(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._spotSize=void 0,this._trailLength=void 0,this._spotIntensity=void 0,this._constantSpeed=void 0,this._period=void 0,this.color=e.color,this.spotSize=e.spotSize,this.trailLength=e.trailLength,this.spotIntensity=e.spotIntensity,this.constantSpeed=e.constantSpeed/1e3,this.period=1e3*e.period,this.trailTime=void 0,this._startTime=performance.now(),this._bAsy=u$Z(e.bAsy,!0)}Object.defineProperties(o$x.prototype,{isConstant:{get:function(){return r$_.isConstant(this._trailLength)&&r$_.isConstant(this._constantSpeed)&&r$_.isConstant(this._period)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color"),spotSize:C$10("spotSize"),trailLength:C$10("trailLength"),spotIntensity:C$10("spotIntensity"),constantSpeed:C$10("constantSpeed"),period:C$10("period")}),o$x.prototype.getType=function(e){return"PolylineTrail"},o$x.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,d$y,t.color),t.trailTime=performance.now(),t.spotSize=r$_.getValueOrDefault(this._spotSize,e,l$v),t.constantSpeed=r$_.getValueOrDefault(this._constantSpeed,e,u$q),t.trailLength=r$_.getValueOrDefault(this._trailLength,e,f$s),t.period=r$_.getValueOrDefault(this._period,e,c$k),t.spotIntensity=r$_.getValueOrDefault(this._spotIntensity,e,h$t),t.startTime=this._startTime,t},o$x.prototype.equals=function(e){return this===e||e instanceof o$x&&r$_.equals(this._color,e._color)&&r$_.equals(this._spotSize,e._spotSize)&&r$_.equals(this._constantSpeed,e._constantSpeed)&&r$_.equals(this._trailLength,e._trailLength)&&r$_.equals(this._period,e._period)&&r$_.equals(this._spotIntensity,e._spotIntensity)};var ne$d=new e$1L(0),A$w={},W$q=new e$1X,oe$b=new t$P(e$1X.WHITE),ae$d=new e$1L(!0),se$b=new e$1L(W$X.DISABLED),le$f=new e$1L(new r$Z),de$a=new e$1L(_0x2b86ba.BOTH);function pe$e(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.hMax=void 0,this.followSurface=void 0,this.arcType=void 0,this.granularity=void 0}function he$b(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function f$r(e,t){if(!e$2e(e))throw new t$15("entity is required");if(!e$2e(t))throw new t$15("scene is required");this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(f$r.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new o$1h,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new pe$e,this._groundGeometryOptions=new he$b,this._id="polyline-"+e.id,this._clampToGround=!1,this._supportsPolylinesOnTerrain=h$W.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(f$r.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!e$2e(this._entity.availability)&&r$_.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}}),f$r.prototype.isOutlineVisible=function(e){return!1},f$r.prototype.isFilled=function(e){var t=this._entity;return u$Z(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e),!1)},f$r.prototype.createFillGeometryInstance=function(e){if(!e$2e(e))throw new t$15("time is required.");if(!this._fillEnabled)throw new t$15("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),r=new e$1I(n&&i.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),a={show:r,distanceDisplayCondition:t$A.fromDistanceDisplayCondition(o)};return this._materialProperty instanceof t$P&&(e$2e(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,W$q)),e$2e(t)||(t=e$1X.WHITE),a.color=o$16.fromColor(t)),this.clampToGround||this.entity.clampToS3M?new d$1o({id:i,geometry:new aa$5(this._groundGeometryOptions),attributes:a}):(this._materialProperty instanceof o$x?(this._geometryOptions.dist=1,e$2e(this._materialProperty.constantSpeed)&&this._materialProperty.constantSpeed>0?this._geometryOptions.period=-1:this._geometryOptions.period=e$2e(this._materialProperty.period)?this._materialProperty.period:1e3):(this._geometryOptions.dist=0,this._geometryOptions.period=-1),e$2e(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof t$P&&(e$2e(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(t=this._depthFailMaterialProperty.color.getValue(e,W$q)),e$2e(t)||(t=e$1X.WHITE),a.depthFailColor=o$16.fromColor(t)),new d$1o({id:i,geometry:new R$A(this._geometryOptions),attributes:a}))},f$r.prototype.createOutlineGeometryInstance=function(e){throw new t$15("This instance does not represent an outlined geometry.")},f$r.prototype.isDestroyed=function(){return!1},f$r.prototype.destroy=function(){this._entitySubscription(),i$11(this)},f$r.prototype._onEntityPropertyChanged=function(e,t,i,n){if("availability"===t||"polyline"===t){var r=this._entity.polyline;if(!e$2e(r))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));var o=r.positions,a=r.show;if(e$2e(a)&&a.isConstant&&!a.getValue(o$I.MINIMUM_VALUE)||!e$2e(o))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=r.zIndex,l=u$Z(r.material,oe$b),u=l instanceof t$P;this._materialProperty=l,this._depthFailMaterialProperty=r.depthFailMaterial,this._showProperty=u$Z(a,ae$d),this._shadowsProperty=u$Z(r.shadows,se$b),this._distanceDisplayConditionProperty=u$Z(r.distanceDisplayCondition,le$f),this._classificationTypeProperty=u$Z(r.classificationType,de$a),this._fillEnabled=!0,this._zIndex=u$Z(s,ne$d);var c=r.width,h=r.hMax,d=r.followSurface,f=r.arcType,p=r.clampToGround,_=r.granularity;if(o.isConstant&&r$_.isConstant(c)&&r$_.isConstant(d)&&r$_.isConstant(f)&&r$_.isConstant(_)&&r$_.isConstant(p)&&r$_.isConstant(s)){var m,g=this._geometryOptions,x=o.getValue(o$I.MINIMUM_VALUE,g.positions);if(!e$2e(x)||x.length<2)return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));m=u&&(!e$2e(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof t$P)?e$1F.VERTEX_FORMAT:r$X.VERTEX_FORMAT,g.vertexFormat=m,g.positions=x,g.width=e$2e(c)?c.getValue(o$I.MINIMUM_VALUE):void 0,g.hMax=e$2e(h)?h.getValue(o$I.MINIMUM_VALUE):void 0,g.followSurface=e$2e(d)?d.getValue(o$I.MINIMUM_VALUE):void 0,g.arcType=e$2e(f)?f.getValue(o$I.MINIMUM_VALUE):void 0,g.granularity=e$2e(_)?_.getValue(o$I.MINIMUM_VALUE):void 0;var y=this._groundGeometryOptions;y.positions=x,y.width=g.width,y.arcType=g.arcType,y.granularity=g.granularity,this._clampToGround=!!e$2e(p)&&p.getValue(o$I.MINIMUM_VALUE),!this._clampToGround&&e$2e(s)&&e$22("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},f$r.prototype.createDynamicUpdater=function(e,t){if(o$1q.defined("primitives",e),o$1q.defined("groundPrimitives",t),!this._dynamic)throw new t$15("This instance does not represent dynamic geometry.");return new D$n(e,t,this)};var C$s={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function D$n(e,t,i){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=i,this._positions=[]}function q$o(e){if(e$2e(e._line))return e._line;var t=e._geometryUpdater._scene.id,i=A$w[t],n=e._primitives;!e$2e(i)||i.isDestroyed()?(i=new J$T,A$w[t]=i,n.add(i)):n.contains(i)||n.add(i);var r=i.add();return r.id=e._geometryUpdater._entity,e$2e(e._depthFailMaterial)&&(r._depthFailMaterial=e._depthFailMaterial,r._depthFailMaterialAppearance=e._depthFailMaterialAppearance),e._line=r,r}D$n.prototype.update=function(e){var t=this._geometryUpdater,i=t._entity,n=i.polyline,r=n.positions,o=r$_.getValueOrUndefined(r,e,this._positions);t._clampToGround=r$_.getValueOrDefault(n._clampToGround,e,!1),t._groundGeometryOptions.positions=o,t._groundGeometryOptions.width=r$_.getValueOrDefault(n._width,e,1),t._groundGeometryOptions.arcType=r$_.getValueOrDefault(n._arcType,e,m$1h.GEODESIC),t._groundGeometryOptions.granularity=r$_.getValueOrDefault(n._granularity,e,9999);var a=this._groundPrimitives;if(e$2e(this._groundPolylinePrimitive)&&(a.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!i.isShowing||!i.isAvailable(e)||!r$_.getValueOrDefault(n._show,e,!0)||!e$2e(o)||o.length<2)return;var s,l=t.fillMaterialProperty;if(l instanceof t$P)s=new e$1F;else{var u=r$C.getValue(e,l,this._material);s=new r$X({material:u,translucent:u.isTranslucent()}),this._material=u}return this._groundPolylinePrimitive=a.add(new g$13({geometryInstances:t.createFillGeometryInstance(e),appearance:s,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),r$_.getValueOrUndefined(t.zIndex,e)),void(e$2e(this._line)&&(this._line.show=!1))}let c=this._geometryUpdater._depthFailMaterialProperty;e$2e(c)&&(this._depthFailMaterialAppearance=c instanceof t$P?e$1F:r$X,this._depthFailMaterial=r$C.getValue(e,c,this._depthFailMaterial));var h=q$o(this);if(i.isShowing&&i.isAvailable(e)&&r$_.getValueOrDefault(n._show,e,!0))if(!e$2e(o)||o.length<2)h.show=!1;else{var d=r$_.getValueOrUndefined(n._followSurface,e),f=m$1h.GEODESIC;e$2e(d)&&(f=d?m$1h.GEODESIC:m$1h.NONE),f=r$_.getValueOrDefault(n._arcType,e,f);var p=t._scene.globe;f!==m$1h.NONE&&e$2e(p)&&(C$s.ellipsoid=p.ellipsoid,C$s.positions=o,C$s.granularity=r$_.getValueOrUndefined(n._granularity,e),C$s.height=m$X.extractHeights(o,p.ellipsoid),C$s.hMax=r$_.getValueOrUndefined(n._hMax,e),o=m$X.generateCartesianArc(C$s)),h.show=!0,h.positions=o.slice(),h.material=r$C.getValue(e,t.fillMaterialProperty,h.material),h.width=r$_.getValueOrDefault(n._width,e,1),h.distanceDisplayCondition=r$_.getValueOrUndefined(n._distanceDisplayCondition,e,h.distanceDisplayCondition)}else h.show=!1},D$n.prototype.getBoundingSphere=function(e){if(o$1q.defined("result",e),this._geometryUpdater.clampToGround){var t=this._groundPolylinePrimitive;if(e$2e(t)&&t.show&&t.ready){var i=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(e$2e(i)&&e$2e(i.boundingSphere))return i$1d.clone(i.boundingSphere,e),R$w.DONE}return e$2e(t)&&!t.ready?R$w.PENDING:R$w.DONE}var n=q$o(this);return n.show&&n.positions.length>0?(i$1d.fromPoints(n.positions,e),R$w.DONE):R$w.FAILED},D$n.prototype.isDestroyed=function(){return!1},D$n.prototype.destroy=function(){var e=this._geometryUpdater._scene.id,t=A$w[e];e$2e(t)&&(t.remove(this._line),0===t.length&&(this._primitives.removeAndDestroy(t),delete A$w[e])),e$2e(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),i$11(this)};var b$w=new e$1X,L$q=new r$Z,O$l=new r$Z;function v$q(e,t,i,n,r){var o;o=i instanceof t$P?e$1F:r$X,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=o,this.materialProperty=i,this.updaters=new e$1Q,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e$1Q,this.material=void 0,this.updatersWithAttributes=new e$1Q,this.attributes=new e$1Q,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(v$q.prototype.onMaterialChanged,this),this.subscriptions=new e$1Q,this.showsUpdated=new e$1Q,this.zIndex=n,this._asynchronous=r}function m$o(e,t,i){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=u$Z(i,!0)}v$q.prototype.onMaterialChanged=function(){this.invalidated=!0},v$q.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty;return i===t||i instanceof t$P&&t instanceof t$P||e$2e(t)&&t.equals(i)},v$q.prototype.add=function(e,t,i){var n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,i),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&r$_.isConstant(t.distanceDisplayConditionProperty)){var r=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,o){"isShowing"===i&&r.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},v$q.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return e$2e(i)&&(i(),this.subscriptions.remove(t)),!0}return!1},v$q.prototype.update=function(e){var t,i=!0,n=this.primitive,r=this.orderedGroundPrimitives,o=this.geometry.values;if(this.createPrimitive){if(o.length>0)e$2e(n)&&(e$2e(this.oldPrimitive)?r.remove(n):this.oldPrimitive=n),n=new g$13({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===r$X&&(this.material=r$C.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),r.add(n,this.zIndex),i=!1;else{e$2e(n)&&(r.remove(n),n=void 0);var a=this.oldPrimitive;e$2e(a)&&(r.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(e$2e(n)&&n.ready){n.show=!0,e$2e(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===r$X&&(this.material=r$C.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);var s=this.updatersWithAttributes.values,l=s.length;for(t=0;t<l;t++){var u=s[t],c=u.entity,h=this.geometry.get(u.id),d=this.attributes.get(h.id.id);if(e$2e(d)||(d=n.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,d)),!u.fillMaterialProperty.isConstant){var f=u.fillMaterialProperty.color,p=r$_.getValueOrDefault(f,e,e$1X.WHITE,b$w);e$1X.equals(d._lastColor,p)||(d._lastColor=e$1X.clone(p,d._lastColor),d.color=o$16.toValue(p,d.color))}var _=c.isShowing&&(u.hasConstantFill||u.isFilled(e));_!==(1===d.show[0])&&(d.show=e$1I.toValue(_,d.show));var m=u.distanceDisplayConditionProperty;if(!r$_.isConstant(m)){var g=r$_.getValueOrDefault(m,e,O$l,L$q);r$Z.equals(g,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=r$Z.clone(g,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=t$A.toValue(g,d.distanceDisplayCondition))}}this.updateShows(n)}else e$2e(n)&&!n.ready&&(i=!1);return i},v$q.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,a=this.geometry.get(r.id),s=this.attributes.get(a.id.id);e$2e(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var l=o.isShowing;l!==(1===s.show[0])&&(s.show=e$1I.toValue(l,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},v$q.prototype.contains=function(e){return this.updaters.contains(e.id)},v$q.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return R$w.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!e$2e(n)||!e$2e(n.boundingSphere)||e$2e(n.show)&&0===n.show[0]?R$w.FAILED:(n.boundingSphere.clone(t),R$w.DONE)},v$q.prototype.destroy=function(){var e=this.primitive,t=this.orderedGroundPrimitives;e$2e(e)&&t.remove(e);var i=this.oldPrimitive;e$2e(i)&&t.remove(i),this.removeMaterialSubscription()},m$o.prototype.add=function(e,t){for(var i=this._items,n=i.length,r=t.createFillGeometryInstance(e),o=r$_.getValueOrDefault(t.zIndex,0),a=0;a<n;++a){var s=i[a];if(s.isMaterial(t)&&s.zIndex===o)return void s.add(e,t,r)}var l=new v$q(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,o,this._asynchronous);l.add(e,t,r),i.push(l)},m$o.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},m$o.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var r=n.updaters.values,o=r.length,a=0;a<o;a++)this.add(e,r[a]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},m$o.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,r=0;r<n;r++){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return R$w.FAILED},m$o.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var I$w=[];function A$v(e,t){for(var i=e._batches,n=i.length,r=0;r<n;r++)i[r].remove(t)}function E$s(e,t,i,n){if(i.isDynamic)e._dynamicBatch.add(t,i);else{if((i.clampToGround||i.entity.clampToS3M)&&i.fillEnabled){var r=i.classificationTypeProperty.getValue(t);return i.entity.clampToS3M&&(r=_0x2b86ba.S3M_TILE),void e._groundBatches[r].add(t,i)}var o;i.fillEnabled&&(o=i.shadowsProperty.getValue(t));var a,s=0;e$2e(i.depthFailMaterialProperty)&&(s=i.depthFailMaterialProperty instanceof t$P?1:2),e$2e(o)&&(a=o+s*W$X.NUMBER_OF_SHADOW_MODES),i.fillEnabled&&(i.fillMaterialProperty instanceof t$P?e._colorBatches[a].add(t,i):e._materialBatches[a].add(t,i))}}function l$u(e,t,i,n){o$1q.defined("scene",e),o$1q.defined("entityCollection",t),n=u$Z(n,e.groundPrimitives),i=u$Z(i,e.primitives),this._scene=e,this._primitives=i,this._entityCollection=void 0,this._addedObjects=new e$1Q,this._removedObjects=new e$1Q,this._changedObjects=new e$1Q;var r,o=W$X.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(3*o),this._materialBatches=new Array(3*o),r=0;r<o;++r)this._colorBatches[r]=new y$s(i,e$1F,void 0,!1,r),this._materialBatches[r]=new u$r(i,r$X,void 0,!1,r),this._colorBatches[r+o]=new y$s(i,e$1F,e$1F,!1,r),this._materialBatches[r+o]=new u$r(i,r$X,e$1F,!1,r),this._colorBatches[r+2*o]=new y$s(i,e$1F,r$X,!1,r),this._materialBatches[r+2*o]=new u$r(i,r$X,r$X,!1,r);this._dynamicBatch=new r$s(i,n);var a=_0x2b86ba.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(a),r=0;r<a;++r)this._groundBatches[r]=new m$o(n,r);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new e$1Q,this._updaters=new e$1Q,this._entityCollection=t,t.collectionChanged.addEventListener(l$u.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,I$w)}l$u.prototype.update=function(e){o$1q.defined("time",e);var t,i,n,r,o=this._addedObjects,a=o.values,s=this._removedObjects,l=s.values,u=this._changedObjects,c=u.values;for(t=c.length-1;t>-1;t--)n=(i=c[t]).id,(r=this._updaters.get(n)).entity===i?(A$v(this,r),E$s(this,e,r)):(l.push(i),a.push(i));for(t=l.length-1;t>-1;t--)n=(i=l[t]).id,A$v(this,r=this._updaters.get(n)),r.destroy(),this._updaters.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n);for(t=a.length-1;t>-1;t--)n=(i=a[t]).id,r=new f$r(i,this._scene),this._updaters.set(n,r),E$s(this,e,r),this._subscriptions.set(n,r.geometryChanged.addEventListener(l$u._onGeometryChanged,this));o.removeAll(),s.removeAll(),u.removeAll();var h=!0,d=this._batches,f=d.length;for(t=0;t<f;t++)h=d[t].update(e)&&h;return h};var T$r=[],F$n=new i$1d;function u$p(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.scene",e.scene),o$1q.typeOf.object("options.dataSourceCollection",e.dataSourceCollection),d$15.initializeTerrainHeights(),g$13.initializeTerrainHeights();var t=e.scene,i=e.dataSourceCollection;this._eventHelper=new n$x,this._eventHelper.add(i.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(i.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(i.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=i,this._scene=t,this._visualizersCallback=u$Z(e.visualizersCallback,u$p.defaultVisualizersCallback);var n=!1,r=new o$y,o=new o$y;i.length>0&&(t.primitives.add(r),t.groundPrimitives.add(o),n=!0),this._primitives=r,this._groundPrimitives=o;for(var a=0,s=i.length;a<s;a++)this._onDataSourceAdded(i,i.get(a));var l,u,c=new n$o;if(this._onDataSourceAdded(void 0,c),this._defaultDataSource=c,!n){var h=this,d=function(){t.primitives.add(r),t.groundPrimitives.add(o),l(),u(),h._removeDefaultDataSourceListener=void 0,h._removeDataSourceCollectionListener=void 0};l=c.entities.collectionChanged.addEventListener(d),u=i.dataSourceAdded.addEventListener(d)}this._removeDefaultDataSourceListener=l,this._removeDataSourceCollectionListener=u,this._ready=!1}l$u.prototype.getBoundingSphere=function(e,t){o$1q.defined("entity",e),o$1q.defined("result",t);for(var i=T$r,n=F$n,r=0,o=R$w.DONE,a=this._batches,s=a.length,l=this._updaters.get(e.id),u=0;u<s;u++){if((o=a[u].getBoundingSphere(l,n))===R$w.PENDING)return R$w.PENDING;o===R$w.DONE&&(i[r]=i$1d.clone(n,i[r]),r++)}return 0===r?R$w.FAILED:(i.length=r,i$1d.fromBoundingSpheres(i,t),R$w.DONE)},l$u.prototype.isDestroyed=function(){return!1},l$u.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(l$u.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var e,t=this._batches,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._subscriptions.values;for(i=n.length,e=0;e<i;e++)n[e]();return this._subscriptions.removeAll(),i$11(this)},l$u._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,n=e.entity,r=n.id;!e$2e(t.get(r))&&!e$2e(i.get(r))&&i.set(r,n)},l$u.prototype._onCollectionChanged=function(e,t,i){var n,r,o,a=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)r=(o=i[n]).id,a.remove(r)||(s.set(r,o),l.remove(r));for(n=t.length-1;n>-1;n--)r=(o=t[n]).id,s.remove(r)?l.set(r,o):a.set(r,o)},u$p.defaultVisualizersCallback=function(e,t,i){var n=i.entities;return[new g$J(t,n),new c$l(e,n,i._primitives,i._groundPrimitives),new l$w(t,n),new d$z(e,n),new l$E(e,n),new v$r(t,n),new w$p(e,n),new l$u(e,n,i._primitives,i._groundPrimitives)]},Object.defineProperties(u$p.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}}),u$p.prototype.isDestroyed=function(){return!1},u$p.prototype.destroy=function(){this._eventHelper.removeAll();for(var e=this._dataSourceCollection,t=0,i=e.length;t<i;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),e$2e(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),i$11(this)},u$p.prototype.update=function(e){if(o$1q.defined("time",e),!e$1H.initialized)return this._ready=!1,!1;var t,i,n,r,o=!0,a=this._dataSourceCollection,s=a.length;for(t=0;t<s;t++){var l=a.get(t);for(e$2e(l.update)&&(o=l.update(e)&&o),r=(n=l._visualizers).length,i=0;i<r;i++)o=n[i].update(e)&&o}for(r=(n=this._defaultDataSource._visualizers).length,i=0;i<r;i++)o=n[i].update(e)&&o;return this._ready=o,o},u$p.prototype._postRender=function(){for(var e=this._scene.frameState,t=this._dataSourceCollection,i=t.length,n=0;n<i;n++){var r=t.get(n),o=r.credit;e$2e(o)&&e.creditDisplay.addCredit(o);var a=r._resourceCredits;if(e$2e(a))for(var s=a.length,l=0;l<s;l++)e.creditDisplay.addCredit(a[l])}};var R$n=[],k$m=new i$1d;function h$s(e,t,i,n){if(!e$2e(e))throw new t$15("entity is required.");if(!e$2e(n))throw new t$15("result is required.");var r;return e$2e(t)&&t.show&&t.ready&&(e$2e(r=t.getGeometryInstanceAttributes(e))&&e$2e(r.boundingSphere))||e$2e(i)&&i.show&&i.ready&&(e$2e(r=i.getGeometryInstanceAttributes(e))&&e$2e(r.boundingSphere))?(i$1d.clone(r.boundingSphere,n),R$w.DONE):e$2e(t)&&!t.ready||e$2e(i)&&!i.ready?R$w.PENDING:R$w.FAILED}u$p.prototype.getBoundingSphere=function(e,t,i){if(o$1q.defined("entity",e),o$1q.typeOf.bool("allowPartial",t),o$1q.defined("result",i),!this._ready)return R$w.PENDING;var n,r,o=this._defaultDataSource;if(!o.entities.contains(e)){o=void 0;var a=this._dataSourceCollection;for(r=a.length,n=0;n<r;n++){var s=a.get(n);if(s.entities.contains(e)){o=s;break}}}if(!e$2e(o))return R$w.FAILED;var l=R$n,u=k$m,c=0,h=R$w.DONE,d=o._visualizers,f=d.length;for(n=0;n<f;n++){if(e$2e(d[n].getBoundingSphere)){if(h=d[n].getBoundingSphere(e,u),!t&&h===R$w.PENDING)return R$w.PENDING;h===R$w.DONE&&(l[c]=i$1d.clone(u,l[c]),c++)}}return 0===c?R$w.FAILED:(l.length=c,i$1d.fromBoundingSpheres(l,i),R$w.DONE)},u$p.prototype._onDataSourceAdded=function(e,t){var i=this._scene,n=this._primitives,r=this._groundPrimitives,o=n.add(new o$y),a=r.add(new r$t);t._primitives=o,t._groundPrimitives=a;var s=t.clustering;s._initialize(i),o.add(s),t._visualizers=this._visualizersCallback(i,s,t)},u$p.prototype._onDataSourceRemoved=function(e,t){var i=this._primitives,n=this._groundPrimitives,r=t._primitives,o=t._groundPrimitives,a=t.clustering;r.remove(a);for(var s=r._primitives,l=0;l<s.length;l++)if(e$2e(s[l]._instanceIds))for(var u=s[l]._instanceIds,c=0;c<u.length;c++)e$2e(u[c]._polygon)&&e$2e(u[c]._polygon.outlines)&&this._scene._primitives.remove(u[c]._polygon.outlines);var h=t._visualizers,d=h.length;for(c=0;c<d;c++)h[c].destroy();i.remove(r),n.remove(o),t._visualizers=void 0},u$p.prototype._onDataSourceMoved=function(e,t,i){var n=this._primitives,r=this._groundPrimitives,o=e._primitives,a=e._groundPrimitives;t===i+1?(n.raise(o),r.raise(a)):t===i-1?(n.lower(o),r.lower(a)):0===t?(n.lowerToBottom(o),r.lowerToBottom(a),n.raise(o),r.raise(a)):(n.raiseToTop(o),r.raiseToTop(a))};var p$j=new e$1X(1,1,1,1);function t$j(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=new e$1X(1,1,1,1),this._colorSubscription=void 0,this.color=e.color}Object.defineProperties(t$j.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color")}),t$j.prototype.getType=function(e){return"EmissionColor"},t$j.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,p$j,t.color),t},t$j.prototype.equals=function(e){return this===e||e instanceof t$j&&r$_.equals(this._color,e._color)};var Z$m=new p$1e,F$m=new p$1e,j$n=new p$1e,s$k=new p$1d,P$o=new o$1p,J$j=new o$1p,q$n=new o$1p,x$q=new o$1p,W$p=new o$1p,K$j=new o$1p,_$n=new a$15,B$m=1.25;function ee$e(e,t,i,n,r,o,a){var s=e.scene.mode,l=r.getValue(o,e._lastCartesian);if(e$2e(l)){var u,c,h,d,f,p,_=!1,m=!1;if(s===C$14.SCENE3D){a$15.addSeconds(o,.001,_$n);var g=r.getValue(_$n,P$o);if(e$2e(g)||(a$15.addSeconds(o,-.001,_$n),g=r.getValue(_$n,P$o),m=!0),e$2e(g)){var x,y=m$19.computeFixedToIcrfMatrix(o,Z$m),v=m$19.computeFixedToIcrfMatrix(_$n,F$m);e$2e(y)&&e$2e(v)?x=p$1e.transpose(y,j$n):(x=m$19.computeTemeToPseudoFixedMatrix(o,j$n),y=p$1e.transpose(x,Z$m),v=m$19.computeTemeToPseudoFixedMatrix(_$n,F$m),p$1e.transpose(v,v));var $=p$1e.multiplyByVector(y,l,W$p),b=p$1e.multiplyByVector(v,g,K$j);o$1p.subtract($,b,x$q);var T=1e3*o$1p.magnitude(x$q),C=e$2d.GRAVITATIONALPARAMETER,S=-C/(T*T-2*C/o$1p.magnitude($));S<0||S>B$m*a.maximumRadius?(u=J$j,o$1p.normalize(l,u),o$1p.negate(u,u),h=o$1p.clone(o$1p.UNIT_Z,q$n),c=o$1p.cross(h,u,P$o),o$1p.magnitude(c)>e$2d.EPSILON7&&(o$1p.normalize(u,u),o$1p.normalize(c,c),h=o$1p.cross(u,c,q$n),o$1p.normalize(h,h),_=!0)):o$1p.equalsEpsilon(l,g,e$2d.EPSILON7)||(h=J$j,o$1p.normalize($,h),o$1p.normalize(b,b),c=o$1p.cross(h,b,q$n),m&&(c=o$1p.multiplyByScalar(c,-1,c)),o$1p.equalsEpsilon(c,o$1p.ZERO,e$2d.EPSILON7)||(u=o$1p.cross(c,h,P$o),p$1e.multiplyByVector(x,u,u),p$1e.multiplyByVector(x,c,c),p$1e.multiplyByVector(x,h,h),o$1p.normalize(u,u),o$1p.normalize(c,c),o$1p.normalize(h,h),_=!0))}}e$2e(e.boundingSphere)&&(l=e.boundingSphere.center),n&&(d=o$1p.clone(t.position,x$q),f=o$1p.clone(t.direction,W$p),p=o$1p.clone(t.up,K$j));var w=s$k;_?(w[0]=u.x,w[1]=u.y,w[2]=u.z,w[3]=0,w[4]=c.x,w[5]=c.y,w[6]=c.z,w[7]=0,w[8]=h.x,w[9]=h.y,w[10]=h.z,w[11]=0,w[12]=l.x,w[13]=l.y,w[14]=l.z,w[15]=0):m$19.eastNorthUpToFixedFrame(l,a,w),t._setTransform(w),n&&(o$1p.clone(d,t.position),o$1p.clone(f,t.direction),o$1p.clone(p,t.up),o$1p.cross(f,p,t.right))}if(i){var E=s===C$14.SCENE2D||o$1p.equals(e._offset3D,o$1p.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,E)}}function V$l(e,t,i){o$1q.defined("entity",e),o$1q.defined("scene",t),this.entity=e,this.scene=t,this.ellipsoid=u$Z(i,t$12.WGS84),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new o$1p,this._defaultOffset3D=void 0,this._offset3D=new o$1p}Object.defineProperties(V$l,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=o$1p.clone(e,new o$1p)}}}),V$l.defaultOffset3D=new o$1p(-14e3,3500,3500);var C$r=new a$T,re$f=new o$1p;V$l.prototype.update=function(e,t){o$1q.defined("time",e);var i=this.scene,n=this.ellipsoid,r=i.mode;if(r!==C$14.MORPHING){var o=this.entity,a=o.position;if(e$2e(a)){var s=o!==this._lastEntity,l=r!==this._mode,u=i.camera,c=s||l,h=!0;if(s){var d=o.viewFrom,f=e$2e(d);if(!f&&e$2e(t)){C$r.pitch=-e$2d.PI_OVER_FOUR,C$r.range=0;var p=a.getValue(e,re$f);if(e$2e(p)){var _=2-1/Math.max(1,o$1p.magnitude(p)/n.maximumRadius);C$r.pitch*=_}u.viewBoundingSphere(t,C$r),this.boundingSphere=t,c=!1,h=!1}else(!f||!e$2e(d.getValue(e,this._offset3D)))&&o$1p.clone(V$l._defaultOffset3D,this._offset3D)}else!l&&this._mode!==C$14.SCENE2D&&o$1p.clone(u.position,this._offset3D);this._lastEntity=o,this._mode=r,ee$e(this,u,c,h,a,e,n)}}};var $$k={};!function(e){var t,i,n="File format is not recognized.",r="Error while reading zip file.",o="Error while reading file data.",a=524288,s="text/plain",l="message";try{t=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch{}function u(){var e=-1,t=this;t.append=function(i){var n,r=t.table;for(n=0;n<i.length;n++)e=e>>>8^r[255&(e^i[n])]},t.get=function(){return~e}}function c(e,t){var i,n;return i=new ArrayBuffer(e),n=new Uint8Array(i),t&&n.set(t,0),{buffer:i,array:n,view:new DataView(i)}}function h(){}function d(e){var t,i=this;i.size=0,i.init=function(n,r){var o=new Blob([e],{type:s});(t=new p(o)).init((function(){i.size=t.size,n()}),r)},i.readUint8Array=function(e,i,n,r){t.readUint8Array(e,i,n,r)}}function f(e){var t,i=this;i.size=0,i.init=function(n){for(var r=e.length;"="==e.charAt(r-1);)r--;t=e.indexOf(",")+1,i.size=Math.floor(.75*(r-t)),n()},i.readUint8Array=function(i,n,r){var o,a=c(n),s=4*Math.floor(i/3),l=4*Math.ceil((i+n)/3),u=window.atob(e.substring(s+t,l+t)),h=i-3*Math.floor(s/4);for(o=h;o<h+n;o++)a.array[o-h]=u.charCodeAt(o);r(a.array)}}function p(e){var t=this;t.size=0,t.init=function(t){this.size=e.size,t()},t.readUint8Array=function(t,i,n,r){var o=new FileReader;o.onload=function(e){n(new Uint8Array(e.target.result))},o.onerror=r,o.readAsArrayBuffer(function(e,t,i){return e.slice?e.slice(t,t+i):e.webkitSlice?e.webkitSlice(t,t+i):e.mozSlice?e.mozSlice(t,t+i):e.msSlice?e.msSlice(t,t+i):void 0}(e,t,i))}}function _(){}function m(e){var i,n=this;n.init=function(e){i=new Blob([],{type:s}),e()},n.writeUint8Array=function(e,n){i=new Blob([i,t?e:e.buffer],{type:s}),n()},n.getData=function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=n,r.readAsText(i,e)}}function g(e){var t=this,i="",n="";t.init=function(t){i+="data:"+(e||"")+";base64,",t()},t.writeUint8Array=function(e,t){var r,o=n.length,a=n;for(n="",r=0;r<3*Math.floor((o+e.length)/3)-o;r++)a+=String.fromCharCode(e[r]);for(;r<e.length;r++)n+=String.fromCharCode(e[r]);a.length>2?i+=window.btoa(a):n=a,t()},t.getData=function(e){e(i+window.btoa(n))}}function x(e){var i,n=this;n.init=function(t){i=new Blob([],{type:e}),t()},n.writeUint8Array=function(n,r){i=new Blob([i,t?n:n.buffer],{type:e}),r()},n.getData=function(e){e(i)}}function y(e,t,i,n,r,o,s,u,c,h){var d,f,p=0;function _(){e.removeEventListener(l,m,!1),u(f)}function m(e){var t=e.data,n=t.data;t.onappend&&(f+=n.length,i.writeUint8Array(n,(function(){o(!1,n),g()}),h)),t.onflush&&(n?(f+=n.length,i.writeUint8Array(n,(function(){o(!1,n),_()}),h)):_()),t.progress&&s&&s(d+t.current,r)}function g(){(d=p*a)<r?t.readUint8Array(n+d,Math.min(a,r-d),(function(t){e.postMessage({append:!0,data:t}),p++,s&&s(d,r),o(!0,t)}),c):e.postMessage({flush:!0})}f=0,e.addEventListener(l,m,!1),g()}function v(e,t,i,n,r,o,s,l,u,c){var h,d=0,f=0;!function p(){var _;(h=d*a)<r?t.readUint8Array(n+h,Math.min(a,r-h),(function(t){var a=e.append(t,(function(){s&&s(n+h,r)}));f+=a.length,o(!0,t),i.writeUint8Array(a,(function(){o(!1,a),d++,setTimeout(p,1)}),c),s&&s(h,r)}),u):(_=e.flush())?(f+=_.length,i.writeUint8Array(_,(function(){o(!1,_),l(f)}),c)):l(f)}()}function $(e,t,i,n,r,o,s,l,c){var h=0,d=new u;!function u(){var f=h*a;f<n?e.readUint8Array(i+f,Math.min(a,n-f),(function(e){r&&d.append(e),s&&s(f,n,e),t.writeUint8Array(e,(function(){h++,u()}),c)}),l):o(n,d.get())}()}function b(e){var t,i,n="",r=["Ç","ü","é","â","ä","à","å","ç","ê","ë","è","ï","î","ì","Ä","Å","É","æ","Æ","ô","ö","ò","û","ù","ÿ","Ö","Ü","ø","£","Ø","×","ƒ","á","í","ó","ú","ñ","Ñ","ª","º","¿","®","¬","½","¼","¡","«","»","_","_","_","¦","¦","Á","Â","À","©","¦","¦","+","+","¢","¥","+","+","-","-","+","-","+","ã","Ã","+","+","-","-","¦","-","+","¤","ð","Ð","Ê","Ë","È","i","Í","Î","Ï","+","+","_","_","¦","Ì","_","Ó","ß","Ô","Ò","õ","Õ","µ","þ","Þ","Ú","Û","Ù","ý","Ý","¯","´","­","±","_","¾","¶","§","÷","¸","°","¨","·","¹","³","²","_"," "];for(t=0;t<e.length;t++)n+=(i=255&e.charCodeAt(t))>127?r[i-128]:String.fromCharCode(i);return n}function T(e){return decodeURIComponent(escape(e))}function C(e){var t,i="";for(t=0;t<e.length;t++)i+=String.fromCharCode(e[t]);return i}function S(e,t,i,n,r){e.version=t.view.getUint16(i,!0),e.bitFlag=t.view.getUint16(i+2,!0),e.compressionMethod=t.view.getUint16(i+4,!0),e.lastModDateRaw=t.view.getUint32(i+6,!0),e.lastModDate=function(e){var t=(4294901760&e)>>16,i=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&i)>>11,(2016&i)>>5,2*(31&i),0)}catch{}}(e.lastModDateRaw),1!=(1&e.bitFlag)?((n||8!=(8&e.bitFlag))&&(e.crc32=t.view.getUint32(i+10,!0),e.compressedSize=t.view.getUint32(i+14,!0),e.uncompressedSize=t.view.getUint32(i+18,!0)),4294967295!==e.compressedSize&&4294967295!==e.uncompressedSize?(e.filenameLength=t.view.getUint16(i+22,!0),e.extraFieldLength=t.view.getUint16(i+24,!0)):r("File is using Zip64 (4gb+ file size).")):r("File contains encrypted entry.")}function w(t,i){function a(){}function s(e,n){t.readUint8Array(t.size-e,e,(function(t){var i=c(t.length,t).view;1347093766!=i.getUint32(0)?s(e+1,n):n(i)}),(function(){i(r)}))}return a.prototype.getData=function(r,a,s,l){var h,d=this;function f(e,t){h&&h.terminate(),h=null,e&&e(t)}function p(e,t){l&&!function(e){var t=c(4);return t.view.setUint32(0,e),d.crc32==t.view.getUint32(0)}(t)?_():r.getData((function(e){f(a,e)}))}function _(){f(i,o)}function m(){f(i,"Error while writing file data.")}t.readUint8Array(d.offset,30,(function(o){var a,f=c(o.length,o);1347093252==f.view.getUint32(0)?(S(d,f,4,!1,i),a=d.offset+30+d.filenameLength+d.extraFieldLength,r.init((function(){0===d.compressionMethod?$(t,r,a,d.compressedSize,l,p,s,_,m):h=function(t,i,n,r,o,a,s,l,c){var h,d=new u;function f(e,t){o&&!e&&d.append(t)}function p(e){a(e,d.get())}return e.zip.useWebWorkers?y(h=new Worker(e.zip.workerScriptsPath+"inflate.js"),t,i,n,r,f,s,p,l,c):v(new e.zip.Inflater,t,i,n,r,f,s,p,l,c),h}(t,r,a,d.compressedSize,l,p,s,_,m)}),m)):i(n)}),_)},{getEntries:function(e){t.size<22?i(n):s(22,(function(o){var s,l;s=o.getUint32(16,!0),l=o.getUint16(8,!0),t.readUint8Array(s,t.size-s,(function(t){var r,o,s,u,h=0,d=[],f=c(t.length,t);for(r=0;r<l;r++){if(o=new a,1347092738!=f.view.getUint32(h))return void i(n);S(o,f,h+6,!0,i),o.commentLength=f.view.getUint16(h+32,!0),o.directory=16==(16&f.view.getUint8(h+38)),o.offset=f.view.getUint32(h+42,!0),s=C(f.array.subarray(h+46,h+46+o.filenameLength)),o.filename=2048==(2048&o.bitFlag)?T(s):b(s),!o.directory&&"/"==o.filename.charAt(o.filename.length-1)&&(o.directory=!0),u=C(f.array.subarray(h+46+o.filenameLength+o.extraFieldLength,h+46+o.filenameLength+o.extraFieldLength+o.commentLength)),o.comment=2048==(2048&o.bitFlag)?T(u):b(u),d.push(o),h+=46+o.filenameLength+o.extraFieldLength+o.commentLength}e(d)}),(function(){i(r)}))}))},close:function(e){e&&e()}}}function E(e){return unescape(encodeURIComponent(e))}function P(e){var t,i=[];for(t=0;t<e.length;t++)i.push(e.charCodeAt(t));return i}function A(t,i,n){var r,a={},s=[],h=0;function d(e,t){r&&r.terminate(),r=null,e&&e(t)}function f(){d(i,"Error while writing zip file.")}function p(){d(i,o)}return{add:function(o,_,m,g,x){var b,T,C;function S(e,i){var n=c(16);h+=e||0,n.view.setUint32(0,1347094280),typeof i<"u"&&(b.view.setUint32(10,i,!0),n.view.setUint32(4,i,!0)),_&&(n.view.setUint32(8,e,!0),b.view.setUint32(14,e,!0),n.view.setUint32(12,_.size,!0),b.view.setUint32(18,_.size,!0)),t.writeUint8Array(n.array,(function(){h+=16,d(m)}),f)}function w(){x=x||{},o=o.trim(),x.directory&&"/"!=o.charAt(o.length-1)&&(o+="/"),a.hasOwnProperty(o)?i("File already exists."):(T=P(E(o)),s.push(o),function(e){var i;C=x.lastModDate||new Date,b=c(26),a[o]={headerArray:b.array,directory:x.directory,filename:T,offset:h,comment:P(E(x.comment||""))},b.view.setUint32(0,335546376),x.version&&b.view.setUint8(0,x.version),!n&&0!==x.level&&!x.directory&&b.view.setUint16(4,2048),b.view.setUint16(6,(C.getHours()<<6|C.getMinutes())<<5|C.getSeconds()/2,!0),b.view.setUint16(8,(C.getFullYear()-1980<<4|C.getMonth()+1)<<5|C.getDate(),!0),b.view.setUint16(22,T.length,!0),(i=c(30+T.length)).view.setUint32(0,1347093252),i.array.set(b.array,4),i.array.set(T,30),h+=i.array.length,t.writeUint8Array(i.array,e,f)}((function(){_?n||0===x.level?$(_,t,0,_.size,!0,S,g,p,f):r=function(t,i,n,r,o,a,s){var c,h=new u;function d(e,t){e&&h.append(t)}function f(e){r(e,h.get())}return e.zip.useWebWorkers?((c=new Worker(e.zip.workerScriptsPath+"deflate.js")).addEventListener(l,(function e(){c.removeEventListener(l,e,!1),y(c,t,i,0,t.size,d,o,f,a,s)}),!1),c.postMessage({init:!0,level:n})):v(new e.zip.Deflater,t,i,0,t.size,d,o,f,a,s),c}(_,t,x.level,S,g,p,f):S()})))}_?_.init(w,p):w()},close:function(e){var i,n,r,o=0,l=0;for(n=0;n<s.length;n++)o+=46+(r=a[s[n]]).filename.length+r.comment.length;for(i=c(o+22),n=0;n<s.length;n++)r=a[s[n]],i.view.setUint32(l,1347092738),i.view.setUint16(l+4,5120),i.array.set(r.headerArray,l+6),i.view.setUint16(l+32,r.comment.length,!0),r.directory&&i.view.setUint8(l+38,16),i.view.setUint32(l+42,r.offset,!0),i.array.set(r.filename,l+46),i.array.set(r.comment,l+46+r.filename.length),l+=46+r.filename.length+r.comment.length;i.view.setUint32(l,1347093766),i.view.setUint16(l+8,s.length,!0),i.view.setUint16(l+10,s.length,!0),i.view.setUint32(l+12,o,!0),i.view.setUint32(l+16,h,!0),t.writeUint8Array(i.array,(function(){d((function(){t.getData(e)}))}),f)}}}u.prototype.table=function(){var e,t,i,n=[];for(e=0;e<256;e++){for(i=e,t=0;t<8;t++)1&i?i=i>>>1^3988292384:i>>>=1;n[e]=i}return n}(),d.prototype=new h,d.prototype.constructor=d,f.prototype=new h,f.prototype.constructor=f,p.prototype=new h,p.prototype.constructor=p,_.prototype.getData=function(e){e(this.data)},m.prototype=new _,m.prototype.constructor=m,g.prototype=new _,g.prototype.constructor=g,x.prototype=new _,x.prototype.constructor=x,e.zip={Reader:h,Writer:_,BlobReader:p,Data64URIReader:f,TextReader:d,BlobWriter:x,Data64URIWriter:g,TextWriter:m,createReader:function(e,t,i){e.init((function(){t(w(e,i))}),i)},createWriter:function(e,t,i,n){e.init((function(){t(A(e,i,n))}),i)},useWebWorkers:!0},Object.defineProperties(e.zip,{workerScriptsPath:{get:function(){return typeof i>"u"&&(i=n$17("ThirdParty/Workers/")),i}}})}($$k);var he$a=$$k.zip,ie$9=32,ze$7="http://www.opengis.net/kml/2.2",A$u="http://www.google.com/kml/ext/2.2",Ge$6="http://www.w3.org/2000/xmlns/";function Y$i(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var We$6=/^data:image\/([^,;]+)/;function je$7(e,t){return function(i){e._files[t]=i}}function $$j(e){this._time=e}function ne$c(){this._ids={},this._styles={},this._count=0}function se$a(){this._ids={}}function oe$a(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).entities,i=u$Z(e.kmz,!1);if(!e$2e(t))throw new t$15("entities is required.");var n=oe$a._createState(e),r=t.values.filter((function(e){return!e$2e(e.parent)})),o=n.kmlDoc,a=o.documentElement;a.setAttributeNS(Ge$6,"xmlns:gx",A$u);var s=o.createElement("Document");a.appendChild(s),ge$b(n,s,r),n.styleCache.save(s);var l=n.externalFileHandler;return l.promise.then((function(){var e=(new XMLSerializer).serializeToString(n.kmlDoc);return i?qe$3(e,l.files):{kml:e,externalFiles:l.files}}))}function qe$3(e,t){var i=o$1l.defer();return he$a.createWriter(new he$a.BlobWriter,(function(n){Ke$5(n,e).then((function(){var e=Object.keys(t);return me$f(n,e,t,0)})).then((function(){n.close((function(e){i.resolve({kmz:e})}))}))})),i.promise}function Ke$5(e,t){var i=o$1l.defer();return e.add("doc.kml",new he$a.TextReader(t),(function(){i.resolve()})),i.promise}function me$f(e,t,i,n){if(t.length!==n){var r=t[n],o=o$1l.defer();return e.add(r,new he$a.BlobReader(i[r]),(function(){o.resolve()})),o.promise.then((function(){return me$f(e,t,i,n+1)}))}}function ge$b(e,t,i){for(var n,r,o,a=e.kmlDoc,s=e.styleCache,l=e.valueGetter,u=e.idManager,c=i.length,h=0;h<c;++h){var d=i[h];n=[],Xe$5(e,d,r=[],o=[]),Ze$6(e,d.polyline,r,o),we$7(e,d.rectangle,r,o,n),we$7(e,d.polygon,r,o,n),rr$2(e,d,d.model,r,o);var f,p=d.availability;e$2e(p)&&(f=a.createElement("TimeSpan"),a$15.equals(p.start,o$I.MINIMUM_VALUE)||f.appendChild(l$t(a,"begin",a$15.toIso8601(p.start))),a$15.equals(p.stop,o$I.MAXIMUM_VALUE)||f.appendChild(l$t(a,"end",a$15.toIso8601(p.stop))));for(var _=0;_<n.length;++_){var m=n[_];m.setAttribute("id",u.get(d.id)),m.appendChild(l$t(a,"name",d.name)),m.appendChild(l$t(a,"visibility",d.show)),m.appendChild(l$t(a,"description",d.description)),e$2e(f)&&m.appendChild(f),t.appendChild(m)}var g=r.length;if(g>0){var x=a.createElement("Placemark");x.setAttribute("id",u.get(d.id));var y=d.name,v=d.label;if(e$2e(v)){var $=a.createElement("LabelStyle"),b=l.get(v.text);y=e$2e(b)&&b.length>0?b:y;var T=l.getColor(v.fillColor);e$2e(T)&&($.appendChild(l$t(a,"color",T)),$.appendChild(l$t(a,"colorMode","normal")));var C=l.get(v.scale);e$2e(C)&&$.appendChild(l$t(a,"scale",C)),o.push($)}x.appendChild(l$t(a,"name",y)),x.appendChild(l$t(a,"visibility",d.show)),x.appendChild(l$t(a,"description",d.description)),e$2e(f)&&x.appendChild(f),t.appendChild(x);var S=o.length;if(S>0){for(var w=a.createElement("Style"),E=0;E<S;++E)w.appendChild(o[E]);x.appendChild(l$t(a,"styleUrl",s.get(w)))}if(1===r.length)x.appendChild(r[0]);else if(r.length>1){for(var P=a.createElement("MultiGeometry"),A=0;A<g;++A)P.appendChild(r[A]);x.appendChild(P)}}var L=d._children;if(L.length>0){var M=a.createElement("Folder");M.setAttribute("id",u.get(d.id)),M.appendChild(l$t(a,"name",d.name)),M.appendChild(l$t(a,"visibility",d.show)),M.appendChild(l$t(a,"description",d.description)),t.appendChild(M),ge$b(e,M,L)}}}Y$i.prototype.texture=function(e){var t,i=this;if("string"==typeof e||e instanceof t$10){if(!(e=t$10.createIfNeeded(e)).isDataUri)return e.url;var n=e.url.match(We$6);t="texture_"+ ++this._count,e$2e(n)&&(t+="."+n[1]);var r=e.fetchBlob().then((function(e){i._files[t]=e}));return this._promises.push(r),t}if(e instanceof HTMLCanvasElement){var o=o$1l.defer();return this._promises.push(o.promise),t="texture_"+ ++this._count+".png",e.toBlob((function(e){i._files[t]=e,o.resolve()})),t}return""},Y$i.prototype.model=function(e,t){var i=this._modelCallback;if(!e$2e(i))throw new t$13("Encountered a model entity while exporting to KML, but no model callback was supplied.");var n={},r=i(e,t,n);for(var o in n)if(n.hasOwnProperty(o)){var a=o$1l(n[o]);this._promises.push(a),a.then(je$7(this,o))}return r},Object.defineProperties(Y$i.prototype,{promise:{get:function(){return o$1l.all(this._promises)}},files:{get:function(){return this._files}}}),$$j.prototype.get=function(e,t,i){var n;return e$2e(e)&&(n=e$2e(e.getValue)?e.getValue(this._time,i):e),u$Z(n,t)},$$j.prototype.getColor=function(e,t){var i=this.get(e,t);if(e$2e(i))return H$v(i)},$$j.prototype.getMaterialType=function(e){if(e$2e(e))return e.getType(this._time)},ne$c.prototype.get=function(e){var t=this._ids,i=e.innerHTML;if(e$2e(t[i]))return t[i];var n="style-"+ ++this._count;return e.setAttribute("id",n),n="#"+n,t[i]=n,this._styles[i]=e,n},ne$c.prototype.save=function(e){var t=this._styles,i=e.childNodes[0];for(var n in t)t.hasOwnProperty(n)&&e.insertBefore(t[n],i)},se$a.prototype.get=function(e){if(!e$2e(e))return this.get(e$1T());var t=this._ids;return e$2e(t[e])?e.toString()+"-"+ ++t[e]:(t[e]=0,e)},oe$a._createState=function(e){var t=e.entities,i=new ne$c,n=t.computeAvailability(),r=e$2e(e.time)?e.time:n.start,o=u$Z(e.defaultAvailability,n),a=u$Z(e.sampleDuration,60);o.start===o$I.MINIMUM_VALUE?o.stop===o$I.MAXIMUM_VALUE?o=new d$W:a$15.addSeconds(o.stop,-10*a,o.start):o.stop===o$I.MAXIMUM_VALUE&&a$15.addSeconds(o.start,10*a,o.stop);var s=new Y$i(e.modelCallback);return{kmlDoc:document.implementation.createDocument(ze$7,"kml"),ellipsoid:u$Z(e.ellipsoid,t$12.WGS84),idManager:new se$a,styleCache:i,externalFileHandler:s,time:r,valueGetter:new $$j(r),sampleDuration:a,defaultAvailability:new c$A([o])}};var T$q=new o$1p,_$m=new a$18,R$m=new a$15;function Xe$5(e,t,i,n){var r=e.kmlDoc,o=e.ellipsoid,a=e.valueGetter,s=u$Z(t.billboard,t.point);if(e$2e(s)||e$2e(t.path)){var l=t.position;if(!l.isConstant)return void Ce$6(e,t,s,i,n);a.get(l,void 0,T$q);var u=l$t(r,"coordinates",F$l(T$q,o)),c=r.createElement("Point"),h=r.createElement("altitudeMode");h.appendChild(B$l(e,s.heightReference)),c.appendChild(h),c.appendChild(u),i.push(c);var d=s instanceof n$V?De$a(e,s):Ee$a(e,s);n.push(d)}}function Ce$6(e,t,i,n,r){var o,a=e.kmlDoc,s=e.ellipsoid,l=e.valueGetter,u=t.position,c=!0;u instanceof t$p?(o=u.intervals,c=!1):o=u$Z(t.availability,e.defaultAvailability);var h,d,f,p=i instanceof t$I,_=[];for(h=0;h<o.length;++h){var m=o.get(h),g=c?u:m.data,x=a.createElement("altitudeMode");g instanceof i$s?(g=g._value,x.appendChild(B$l(e,k$R.CLAMP_TO_GROUND))):e$2e(i)?x.appendChild(B$l(e,i.heightReference)):x.appendChild(B$l(e,k$R.NONE));var y=[],v=[];if(g.isConstant){l.get(g,void 0,T$q);var $=l$t(a,"coordinates",F$l(T$q,s));y.push(a$15.toIso8601(m.start)),v.push($),y.push(a$15.toIso8601(m.stop)),v.push($)}else if(g instanceof o$z)for(f=g._property._times,d=0;d<f.length;++d)y.push(a$15.toIso8601(f[d])),g.getValueInReferenceFrame(f[d],Re$l.FIXED,T$q),v.push(F$l(T$q,s));else if(g instanceof g$y){f=g._times;var b=g._values;for(d=0;d<f.length;++d)y.push(a$15.toIso8601(f[d])),o$1p.fromArray(b,3*d,T$q),v.push(F$l(T$q,s))}else{var T=e.sampleDuration;m.start.clone(R$m),m.isStartIncluded||a$15.addSeconds(R$m,T,R$m);for(var C=m.stop;a$15.lessThan(R$m,C);)g.getValue(R$m,T$q),y.push(a$15.toIso8601(R$m)),v.push(F$l(T$q,s)),a$15.addSeconds(R$m,T,R$m);m.isStopIncluded&&a$15.equals(R$m,C)&&(g.getValue(R$m,T$q),y.push(a$15.toIso8601(R$m)),v.push(F$l(T$q,s)))}var S=a.createElementNS(A$u,"Track");S.appendChild(x);for(var w=0;w<y.length;++w){var E=l$t(a,"when",y[w]),P=l$t(a,"coord",v[w],A$u);S.appendChild(E),S.appendChild(P)}p&&S.appendChild(_e$7(e,i)),_.push(S)}if(1===_.length)n.push(_[0]);else if(_.length>1){var A=a.createElementNS(A$u,"MultiTrack");for(h=0;h<_.length;++h)A.appendChild(_[h]);n.push(A)}if(e$2e(i)&&!p){var L=i instanceof n$V?De$a(e,i):Ee$a(e,i);r.push(L)}var M=t.path;if(e$2e(M)){var R=l.get(M.width),O=M.material;if(e$2e(O)||e$2e(R)){var D=a.createElement("LineStyle");e$2e(R)&&D.appendChild(l$t(a,"width",R)),de$9(e,O,D),r.push(D)}}}function Ee$a(e,t){var i=e.kmlDoc,n=e.valueGetter,r=i.createElement("IconStyle"),o=n.getColor(t.color);e$2e(o)&&(r.appendChild(l$t(i,"color",o)),r.appendChild(l$t(i,"colorMode","normal")));var a=n.get(t.pixelSize);return e$2e(a)&&r.appendChild(l$t(i,"scale",a/ie$9)),r}function De$a(e,t){var i=e.kmlDoc,n=e.valueGetter,r=e.externalFileHandler,o=i.createElement("IconStyle"),a=n.get(t.image);if(e$2e(a)){a=r.texture(a);var s=i.createElement("Icon");s.appendChild(l$t(i,"href",a));var l=n.get(t.imageSubRegion);e$2e(l)&&(s.appendChild(l$t(i,"x",l.x,A$u)),s.appendChild(l$t(i,"y",l.y,A$u)),s.appendChild(l$t(i,"w",l.width,A$u)),s.appendChild(l$t(i,"h",l.height,A$u))),o.appendChild(s)}var u=n.getColor(t.color);e$2e(u)&&(o.appendChild(l$t(i,"color",u)),o.appendChild(l$t(i,"colorMode","normal")));var c=n.get(t.scale);e$2e(c)&&o.appendChild(l$t(i,"scale",c));var h=n.get(t.pixelOffset);if(e$2e(h)){c=u$Z(c,1),o$1o.divideByScalar(h,c,h);var d=n.get(t.width,ie$9),f=n.get(t.height,ie$9),p=n.get(t.horizontalOrigin,j$V.CENTER);p===j$V.CENTER?h.x-=.5*d:p===j$V.RIGHT&&(h.x-=d);var _=n.get(t.verticalOrigin,S$Q.CENTER);_===S$Q.TOP?h.y+=f:_===S$Q.CENTER&&(h.y+=.5*f);var m=i.createElement("hotSpot");m.setAttribute("x",-h.x),m.setAttribute("y",h.y),m.setAttribute("xunits","pixels"),m.setAttribute("yunits","pixels"),o.appendChild(m)}var g=n.get(t.rotation),x=n.get(t.alignedAxis);return e$2e(g)&&o$1p.equals(o$1p.UNIT_Z,x)&&(0===(g=e$2d.toDegrees(-g))&&(g=360),o.appendChild(l$t(i,"heading",g))),o}function Ze$6(e,t,i,n){var r=e.kmlDoc,o=e.ellipsoid,a=e.valueGetter;if(e$2e(t)){var s,l=r.createElement("LineString"),u=r.createElement("altitudeMode"),c=a.get(t.clampToGround,!1);c?(l.appendChild(l$t(r,"tessellate",!0)),s=r.createTextNode("clampToGround")):s=r.createTextNode("absolute"),u.appendChild(s),l.appendChild(u);var h=t.positions,d=l$t(r,"coordinates",F$l(a.get(h),o));l.appendChild(d);var f=a.get(t.zIndex);c&&e$2e(f)&&l.appendChild(l$t(r,"drawOrder",f,A$u)),i.push(l);var p=r.createElement("LineStyle"),_=a.get(t.width);e$2e(_)&&p.appendChild(l$t(r,"width",_)),de$9(e,t.material,p),n.push(p)}}function Je$4(e,t,i){var n,r=e.kmlDoc,o=e.valueGetter,a=o.get(t.height,0);i>0&&(a=i);for(var s=t.coordinates,l=o.get(s),u=[],c=[h$18.northeast,h$18.southeast,h$18.southwest,h$18.northwest],h=0;h<4;++h)c[h](l,_$m),u.push(e$2d.toDegrees(_$m.longitude)+","+e$2d.toDegrees(_$m.latitude)+","+a);n=l$t(r,"coordinates",u.join(" "));var d=r.createElement("outerBoundaryIs"),f=r.createElement("LinearRing");return f.appendChild(n),d.appendChild(f),[d]}function Me$b(e,t,i,n){for(var r=e.kmlDoc,o=e.ellipsoid,a=[],s=t.length,l=0;l<s;++l)a$18.fromCartesian(t[l],o,_$m),a.push(e$2d.toDegrees(_$m.longitude)+","+e$2d.toDegrees(_$m.latitude)+","+(n?_$m.height:i));var u=l$t(r,"coordinates",a.join(" ")),c=r.createElement("LinearRing");return c.appendChild(u),c}function Qe$4(e,t,i){var n=e.kmlDoc,r=e.valueGetter,o=r.get(t.height,0),a=r.get(t.perPositionHeight,!1);!a&&i>0&&(o=i);var s=[],l=t.hierarchy,u=r.get(l),c=Array.isArray(u)?u:u.positions,h=n.createElement("outerBoundaryIs");h.appendChild(Me$b(e,c,o,a)),s.push(h);var d=u.holes;if(e$2e(d))for(var f=d.length,p=0;p<f;++p){var _=n.createElement("innerBoundaryIs");_.appendChild(Me$b(e,d[p].positions,o,a)),s.push(_)}return s}function we$7(e,t,i,n,r){var o=e.kmlDoc,a=e.valueGetter;if(e$2e(t)){var s=t instanceof n$N;if(s&&"Image"===a.getMaterialType(t.material))return void Ve$8(e,t,r);var l=o.createElement("Polygon"),u=a.get(t.extrudedHeight,0);u>0&&l.appendChild(l$t(o,"extrude",!0));for(var c=s?Je$4(e,t,u):Qe$4(e,t,u),h=c.length,d=0;d<h;++d)l.appendChild(c[d]);var f=o.createElement("altitudeMode");f.appendChild(B$l(e,t.heightReference)),l.appendChild(f),i.push(l);var p=o.createElement("PolyStyle"),_=a.get(t.fill,!1);_&&p.appendChild(l$t(o,"fill",_)),de$9(e,t.material,p);var m=a.get(t.outline,!1);if(m){p.appendChild(l$t(o,"outline",m));var g=o.createElement("LineStyle"),x=a.get(t.outlineWidth,1);g.appendChild(l$t(o,"width",x));var y=a.getColor(t.outlineColor,e$1X.BLACK);g.appendChild(l$t(o,"color",y)),g.appendChild(l$t(o,"colorMode","normal")),n.push(g)}n.push(p)}}function Ve$8(e,t,i){var n=e.kmlDoc,r=e.valueGetter,o=e.externalFileHandler,a=n.createElement("GroundOverlay"),s=n.createElement("altitudeMode");s.appendChild(B$l(e,t.heightReference)),a.appendChild(s);var l=r.get(t.height);e$2e(l)&&a.appendChild(l$t(n,"altitude",l));var u=r.get(t.coordinates),c=n.createElement("LatLonBox");c.appendChild(l$t(n,"north",e$2d.toDegrees(u.north))),c.appendChild(l$t(n,"south",e$2d.toDegrees(u.south))),c.appendChild(l$t(n,"east",e$2d.toDegrees(u.east))),c.appendChild(l$t(n,"west",e$2d.toDegrees(u.west))),a.appendChild(c);var h=r.get(t.material),d=o.texture(h.image),f=n.createElement("Icon");f.appendChild(l$t(n,"href",d)),a.appendChild(f),e$2e(h.color)&&a.appendChild(l$t(n,"color",H$v(h.color))),i.push(a)}var Ye$5=new o$1p;function _e$7(e,t){var i=e.kmlDoc,n=e.valueGetter,r=e.externalFileHandler,o=i.createElement("Model"),a=n.get(t.scale);if(e$2e(a)){a instanceof o$1p||(a=o$1p.fromElements(a,a,a,Ye$5));var s=i.createElement("Scale");s.appendChild(l$t(i,"x",a.x)),s.appendChild(l$t(i,"y",a.y)),s.appendChild(l$t(i,"z",a.z)),o.appendChild(s)}var l=i.createElement("Link"),u=r.model(t,e.time);return l.appendChild(l$t(i,"href",u)),o.appendChild(l),o}var xe$a=new p$1e,$e$4=new p$1d,le$e=new p$1d;function er$2(e,t){var i=m$19.eastNorthUpToFixedFrame(e,void 0,le$e),n=p$1e.fromQuaternion(t,xe$a),r=p$1d.fromRotationTranslation(n,o$1p.ZERO,$e$4),o=p$1d.inverse(i,le$e),a=p$1d.multiply(o,r,le$e),s=p$1d.getMatrix3(a,xe$a);return i$16.fromQuaternion(n$15.fromRotationMatrix(s))}function rr$2(e,t,i,n,r){var o=e.kmlDoc,a=e.ellipsoid,s=e.valueGetter;if(e$2e(i)){var l=t.position;if(!l.isConstant)return void Ce$6(e,t,i,n,r);var u=_e$7(e,i),c=o.createElement("altitudeMode");c.appendChild(B$l(e,i.heightReference)),u.appendChild(c),s.get(l,void 0,T$q),a$18.fromCartesian(T$q,a,_$m);var h=o.createElement("Location");h.appendChild(l$t(o,"longitude",e$2d.toDegrees(_$m.longitude))),h.appendChild(l$t(o,"latitude",e$2d.toDegrees(_$m.latitude))),h.appendChild(l$t(o,"altitude",_$m.height)),u.appendChild(h);var d=n$15.IDENTITY;e$2e(t.orientation)&&(d=t.orientation.getValue(e.time));var f=er$2(t.position.getValue(e.time),d),p=o.createElement("Orientation");p.appendChild(l$t(o,"heading",e$2d.toDegrees(f.heading))),p.appendChild(l$t(o,"tilt",e$2d.toDegrees(f.pitch))),p.appendChild(l$t(o,"roll",e$2d.toDegrees(f.roll))),u.appendChild(p),n.push(u)}}function de$9(e,t,i){var n=e.kmlDoc,r=e.valueGetter;if(e$2e(t)){var o=r.get(t);if(e$2e(o)){var a;switch(r.getMaterialType(t)){case"Image":a=H$v(e$1X.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":a=H$v(o.color);break;case"PolylineOutline":a=H$v(o.color);var s=H$v(o.outlineColor),l=o.outlineWidth;i.appendChild(l$t(n,"outerColor",s,A$u)),i.appendChild(l$t(n,"outerWidth",l,A$u));break;case"Stripe":a=H$v(o.oddColor)}e$2e(a)&&(i.appendChild(l$t(n,"color",a)),i.appendChild(l$t(n,"colorMode","normal")))}}}function B$l(e,t){var i,n=e.kmlDoc;switch(e.valueGetter.get(t,k$R.NONE)){case k$R.NONE:i=n.createTextNode("absolute");break;case k$R.CLAMP_TO_GROUND:i=n.createTextNode("clampToGround");break;case k$R.RELATIVE_TO_GROUND:i=n.createTextNode("relativeToGround")}return i}function F$l(e,t){Array.isArray(e)||(e=[e]);for(var i=e.length,n=[],r=0;r<i;++r)a$18.fromCartesian(e[r],t,_$m),n.push(e$2d.toDegrees(_$m.longitude)+","+e$2d.toDegrees(_$m.latitude)+","+_$m.height);return n.join(" ")}function l$t(e,t,i,n){"boolean"==typeof(i=u$Z(i,""))&&(i=i?"1":"0");var r=e$2e(n)?e.createElementNS(n,t):e.createElement(t),o="string"===i&&-1!==i.indexOf("<")?e.createCDATASection(i):e.createTextNode(i);return r.appendChild(o),r}function H$v(e){for(var t="",i=e.toBytes(),n=3;n>=0;--n)t+=i[n]<16?"0"+i[n].toString(16):i[n].toString(16);return t}var ce$e={};!function(e,t){!function(e){var t=function(e){return e},i=function(e){if(null==e)return t;var i,n,r=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(i=n=0);var l=2,u=e.length,c=new Array(u);for(c[0]=(i+=e[0])*r+a,c[1]=(n+=e[1])*o+s;l<u;)c[l]=e[l],++l;return c}},n=function(e){var t,n=i(e.transform),r=1/0,o=r,a=-r,s=-r;function l(e){(e=n(e))[0]<r&&(r=e[0]),e[0]>a&&(a=e[0]),e[1]<o&&(o=e[1]),e[1]>s&&(s=e[1])}function u(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(u);break;case"Point":l(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(l)}}for(t in e.arcs.forEach((function(e){for(var t,i=-1,l=e.length;++i<l;)(t=n(e[i],i))[0]<r&&(r=t[0]),t[0]>a&&(a=t[0]),t[1]<o&&(o=t[1]),t[1]>s&&(s=t[1])})),e.objects)u(e.objects[t]);return[r,o,a,s]},r=function(e,t){for(var i,n=e.length,r=n-t;r<--n;)i=e[r],e[r++]=e[n],e[n]=i},o=function(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return a(e,t)}))}:a(e,t)};function a(e,t){var i=t.id,n=t.bbox,r=null==t.properties?{}:t.properties,o=s(e,t);return null==i&&null==n?{type:"Feature",properties:r,geometry:o}:null==n?{type:"Feature",id:i,properties:r,geometry:o}:{type:"Feature",id:i,bbox:n,properties:r,geometry:o}}function s(e,t){var n=i(e.transform),o=e.arcs;function a(e,t){t.length&&t.pop();for(var i=o[e<0?~e:e],a=0,s=i.length;a<s;++a)t.push(n(i[a],a));e<0&&r(t,s)}function s(e){return n(e)}function l(e){for(var t=[],i=0,n=e.length;i<n;++i)a(e[i],t);return t.length<2&&t.push(t[0]),t}function u(e){for(var t=l(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(u)}function h(e){var t,i=e.type;switch(i){case"GeometryCollection":return{type:i,geometries:e.geometries.map(h)};case"Point":t=s(e.coordinates);break;case"MultiPoint":t=e.coordinates.map(s);break;case"LineString":t=l(e.arcs);break;case"MultiLineString":t=e.arcs.map(l);break;case"Polygon":t=c(e.arcs);break;case"MultiPolygon":t=e.arcs.map(c);break;default:return null}return{type:i,coordinates:t}}return h(t)}var l=function(e,t){var i={},n={},r={},o=[],a=-1;function s(t){var i,n=e.arcs[t<0?~t:t],r=n[0];return e.transform?(i=[0,0],n.forEach((function(e){i[0]+=e[0],i[1]+=e[1]}))):i=n[n.length-1],t<0?[i,r]:[r,i]}function l(e,t){for(var n in e){var r=e[n];delete t[r.start],delete r.start,delete r.end,r.forEach((function(e){i[e<0?~e:e]=1})),o.push(r)}}return t.forEach((function(i,n){var r,o=e.arcs[i<0?~i:i];o.length<3&&!o[1][0]&&!o[1][1]&&(r=t[++a],t[a]=i,t[n]=r)})),t.forEach((function(e){var t,i,o=s(e),a=o[0],l=o[1];if(t=r[a])if(delete r[t.end],t.push(e),t.end=l,i=n[l]){delete n[i.start];var u=i===t?t:t.concat(i);n[u.start=t.start]=r[u.end=i.end]=u}else n[t.start]=r[t.end]=t;else if(t=n[l])if(delete n[t.start],t.unshift(e),t.start=a,i=r[a]){delete r[i.end];var c=i===t?t:i.concat(t);n[c.start=i.start]=r[c.end=t.end]=c}else n[t.start]=r[t.end]=t;else n[(t=[e]).start=a]=r[t.end=l]=t})),l(r,n),l(n,r),t.forEach((function(e){i[e<0?~e:e]||o.push([e])})),o},u=function(e){return s(e,c.apply(this,arguments))};function c(e,t,i){var n,r,o;if(arguments.length>1)n=h(e,t,i);else for(r=0,n=new Array(o=e.arcs.length);r<o;++r)n[r]=r;return{type:"MultiLineString",arcs:l(e,n)}}function h(e,t,i){var n,r=[],o=[];function a(e){var t=e<0?~e:e;(o[t]||(o[t]=[])).push({i:e,g:n})}function s(e){e.forEach(a)}function l(e){e.forEach(s)}function u(e){e.forEach(l)}function c(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(c);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":u(e.arcs)}}return c(t),o.forEach(null==i?function(e){r.push(e[0].i)}:function(e){i(e[0].g,e[e.length-1].g)&&r.push(e[0].i)}),r}function d(e){for(var t,i=-1,n=e.length,r=e[n-1],o=0;++i<n;)t=r,r=e[i],o+=t[0]*r[1]-t[1]*r[0];return Math.abs(o)}var f=function(e){return s(e,p.apply(this,arguments))};function p(e,t){var i={},n=[],r=[];function o(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(o);break;case"Polygon":a(e.arcs);break;case"MultiPolygon":e.arcs.forEach(a)}}function a(e){e.forEach((function(t){t.forEach((function(t){(i[t=t<0?~t:t]||(i[t]=[])).push(e)}))})),n.push(e)}function u(t){return d(s(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach(o),n.forEach((function(e){if(!e._){var t=[],n=[e];for(e._=1,r.push(t);e=n.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].forEach((function(e){e._||(e._=1,n.push(e))}))}))}))}})),n.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:r.map((function(t){var n,r=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].length<2&&r.push(e)}))}))})),(n=(r=l(e,r)).length)>1)for(var o,a,s=1,c=u(r[0]);s<n;++s)(o=u(r[s]))>c&&(a=r[0],r[0]=r[s],r[s]=a,c=o);return r}))}}var _=function(e,t){for(var i=0,n=e.length;i<n;){var r=i+n>>>1;e[r]<t?i=r+1:n=r}return i},m=function(e){var t={},i=e.map((function(){return[]}));function n(e,i){e.forEach((function(e){e<0&&(e=~e);var n=t[e];n?n.push(i):t[e]=[i]}))}function r(e,t){e.forEach((function(e){n(e,t)}))}function o(e,t){"GeometryCollection"===e.type?e.geometries.forEach((function(e){o(e,t)})):e.type in a&&a[e.type](e.arcs,t)}var a={LineString:n,MultiLineString:r,Polygon:r,MultiPolygon:function(e,t){e.forEach((function(e){r(e,t)}))}};for(var s in e.forEach(o),t)for(var l=t[s],u=l.length,c=0;c<u;++c)for(var h=c+1;h<u;++h){var d,f=l[c],p=l[h];(d=i[f])[s=_(d,p)]!==p&&d.splice(s,0,p),(d=i[p])[s=_(d,f)]!==f&&d.splice(s,0,f)}return i},g=function(e){if(null==e)return t;var i,n,r=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(i=n=0);var l=2,u=e.length,c=new Array(u),h=Math.round((e[0]-a)/r),d=Math.round((e[1]-s)/o);for(c[0]=h-i,i=h,c[1]=d-n,n=d;l<u;)c[l]=e[l],++l;return c}},x=function(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)l=e.bbox;else{if(!((i=Math.floor(t))>=2))throw new Error("n must be ≥2");var i,r=(l=e.bbox||n(e))[0],o=l[1],a=l[2],s=l[3];t={scale:[a-r?(a-r)/(i-1):1,s-o?(s-o)/(i-1):1],translate:[r,o]}}var l,u,c=g(t),h=e.objects,d={};function f(e){return c(e)}function p(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(p)};break;case"Point":t={type:"Point",coordinates:f(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(f)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function _(e){var t,i=0,n=1,r=e.length,o=new Array(r);for(o[0]=c(e[0],0);++i<r;)((t=c(e[i],i))[0]||t[1])&&(o[n++]=t);return 1===n&&(o[n++]=[0,0]),o.length=n,o}for(u in h)d[u]=p(h[u]);return{type:"Topology",bbox:l,transform:t,objects:d,arcs:e.arcs.map(_)}},y=function(e){var t=1/0,i=1/0,n=-1/0,r=-1/0;function o(e){null!=e&&a.hasOwnProperty(e.type)&&a[e.type](e)}var a={GeometryCollection:function(e){e.geometries.forEach(o)},Point:function(e){s(e.coordinates)},MultiPoint:function(e){e.coordinates.forEach(s)},LineString:function(e){l(e.arcs)},MultiLineString:function(e){e.arcs.forEach(l)},Polygon:function(e){e.arcs.forEach(l)},MultiPolygon:function(e){e.arcs.forEach(u)}};function s(e){var o=e[0],a=e[1];o<t&&(t=o),o>n&&(n=o),a<i&&(i=a),a>r&&(r=a)}function l(e){e.forEach(s)}function u(e){e.forEach(l)}for(var c in e)o(e[c]);return n>=t&&r>=i?[t,i,n,r]:void 0},v=function(e,t,i,n,r){3===arguments.length&&(n=Array,r=null);for(var o=new n(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),a=e-1,s=0;s<e;++s)o[s]=r;function l(n){for(var s=t(n)&a,l=o[s],u=0;l!=r;){if(i(l,n))return!0;if(++u>=e)throw new Error("full hashset");l=o[s=s+1&a]}return o[s]=n,!0}function u(n){for(var s=t(n)&a,l=o[s],u=0;l!=r;){if(i(l,n))return!0;if(++u>=e)break;l=o[s=s+1&a]}return!1}function c(){for(var e=[],t=0,i=o.length;t<i;++t){var n=o[t];n!=r&&e.push(n)}return e}return{add:l,has:u,values:c}},$=function(e,t,i,n,r,o){3===arguments.length&&(n=o=Array,r=null);for(var a=new n(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),s=new o(e),l=e-1,u=0;u<e;++u)a[u]=r;function c(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u]=o;if(++h>=e)throw new Error("full hashmap");c=a[u=u+1&l]}return a[u]=n,s[u]=o,o}function h(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u];if(++h>=e)throw new Error("full hashmap");c=a[u=u+1&l]}return a[u]=n,s[u]=o,o}function d(n,o){for(var u=t(n)&l,c=a[u],h=0;c!=r;){if(i(c,n))return s[u];if(++h>=e)break;c=a[u=u+1&l]}return o}function f(){for(var e=[],t=0,i=a.length;t<i;++t){var n=a[t];n!=r&&e.push(n)}return e}return{set:c,maybeSet:h,get:d,keys:f}},b=function(e,t){return e[0]===t[0]&&e[1]===t[1]},T=new ArrayBuffer(16),C=new Uint32Array(T),S=function(e){var t=C[0]^C[1];return 2147483647&(t=t<<5^t>>7^C[2]^C[3])},w=function(e){var t,i,n,r,o=e.coordinates,a=e.lines,s=e.rings,l=C(),u=new Int32Array(o.length),c=new Int32Array(o.length),h=new Int32Array(o.length),d=new Int8Array(o.length),f=0;for(t=0,i=o.length;t<i;++t)u[t]=c[t]=h[t]=-1;for(t=0,i=a.length;t<i;++t){var p=a[t],_=p[0],m=p[1];for(n=l[_],r=l[++_],++f,d[n]=1;++_<=m;)T(t,n,n=r,r=l[_]);++f,d[r]=1}for(t=0,i=o.length;t<i;++t)u[t]=-1;for(t=0,i=s.length;t<i;++t){var g=s[t],x=g[0]+1,y=g[1];for(T(t,l[y-1],n=l[x-1],r=l[x]);++x<=y;)T(t,n,n=r,r=l[x])}function T(e,t,i,n){if(u[i]!==e){u[i]=e;var r=c[i];if(r>=0){var o=h[i];(r!==t||o!==n)&&(r!==n||o!==t)&&(++f,d[i]=1)}else c[i]=t,h[i]=n}}function C(){for(var e=$(1.4*o.length,w,E,Int32Array,-1,Int32Array),t=new Int32Array(o.length),i=0,n=o.length;i<n;++i)t[i]=e.maybeSet(i,i);return t}function w(e){return S(o[e])}function E(e,t){return b(o[e],o[t])}u=c=h=null;var P,A=v(1.4*f,S,b);for(t=0,i=o.length;t<i;++t)d[P=l[t]]&&A.add(o[P]);return A},E=function(e){var t,i,n,r=w(e),o=e.coordinates,a=e.lines,s=e.rings;for(i=0,n=a.length;i<n;++i)for(var l=a[i],u=l[0],c=l[1];++u<c;)r.has(o[u])&&(t={0:u,1:l[1]},l[1]=u,l=l.next=t);for(i=0,n=s.length;i<n;++i)for(var h=s[i],d=h[0],f=d,p=h[1],_=r.has(o[d]);++f<p;)r.has(o[f])&&(_?(t={0:f,1:h[1]},h[1]=f,h=h.next=t):(P(o,d,p,p-f),o[p]=o[d],_=!0,f=d));return e};function P(e,t,i,n){A(e,t,i),A(e,t,t+n),A(e,t+n,i)}function A(e,t,i){for(var n,r=t+(i---t>>1);t<r;++t,--i)n=e[t],e[t]=e[i],e[i]=n}var L=function(e){var t,i,n,r,o=e.coordinates,a=e.lines,s=e.rings,l=a.length+s.length;for(delete e.lines,delete e.rings,n=0,r=a.length;n<r;++n)for(t=a[n];t=t.next;)++l;for(n=0,r=s.length;n<r;++n)for(i=s[n];i=i.next;)++l;var u=$(2*l*1.4,S,b),c=e.arcs=[];for(n=0,r=a.length;n<r;++n){t=a[n];do{h(t)}while(t=t.next)}for(n=0,r=s.length;n<r;++n)if((i=s[n]).next)do{h(i)}while(i=i.next);else d(i);function h(e){var t,i,n,r,a,s,l,h;if(n=u.get(t=o[e[0]]))for(l=0,h=n.length;l<h;++l)if(f(r=n[l],e))return e[0]=r[0],void(e[1]=r[1]);if(a=u.get(i=o[e[1]]))for(l=0,h=a.length;l<h;++l)if(p(s=a[l],e))return e[1]=s[0],void(e[0]=s[1]);n?n.push(e):u.set(t,[e]),a?a.push(e):u.set(i,[e]),c.push(e)}function d(e){var t,i,n,r,a;if(i=u.get(t=o[e[0]]))for(r=0,a=i.length;r<a;++r){if(_(n=i[r],e))return e[0]=n[0],void(e[1]=n[1]);if(m(n,e))return e[0]=n[1],void(e[1]=n[0])}if(i=u.get(t=o[e[0]+g(e)]))for(r=0,a=i.length;r<a;++r){if(_(n=i[r],e))return e[0]=n[0],void(e[1]=n[1]);if(m(n,e))return e[0]=n[1],void(e[1]=n[0])}i?i.push(e):u.set(t,[e]),c.push(e)}function f(e,t){var i=e[0],n=t[0],r=e[1];if(i-r!=n-t[1])return!1;for(;i<=r;++i,++n)if(!b(o[i],o[n]))return!1;return!0}function p(e,t){var i=e[0],n=t[0],r=e[1],a=t[1];if(i-r!=n-a)return!1;for(;i<=r;++i,--a)if(!b(o[i],o[a]))return!1;return!0}function _(e,t){var i=e[0],n=t[0],r=e[1]-i;if(r!==t[1]-n)return!1;for(var a=g(e),s=g(t),l=0;l<r;++l)if(!b(o[i+(l+a)%r],o[n+(l+s)%r]))return!1;return!0}function m(e,t){var i=e[0],n=t[0],r=e[1],a=t[1],s=r-i;if(s!==a-n)return!1;for(var l=g(e),u=s-g(t),c=0;c<s;++c)if(!b(o[i+(c+l)%s],o[a-(c+u)%s]))return!1;return!0}function g(e){for(var t=e[0],i=e[1],n=t,r=n,a=o[n];++n<i;){var s=o[n];(s[0]<a[0]||s[0]===a[0]&&s[1]<a[1])&&(r=n,a=s)}return r-t}return e},M=function(e){for(var t=-1,i=e.length;++t<i;){for(var n,r,o=e[t],a=0,s=1,l=o.length,u=o[0],c=u[0],h=u[1];++a<l;)n=(u=o[a])[0],r=u[1],(n!==c||r!==h)&&(o[s++]=[n-c,r-h],c=n,h=r);1===s&&(o[s++]=[0,0]),o.length=s}return e},R=function(e){var t=-1,i=[],n=[],r=[];function o(e){e&&a.hasOwnProperty(e.type)&&a[e.type](e)}var a={GeometryCollection:function(e){e.geometries.forEach(o)},LineString:function(e){e.arcs=s(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(s)},Polygon:function(e){e.arcs=e.arcs.map(l)},MultiPolygon:function(e){e.arcs=e.arcs.map(u)}};function s(e){for(var n=0,o=e.length;n<o;++n)r[++t]=e[n];var a={0:t-o+1,1:t};return i.push(a),a}function l(e){for(var i=0,o=e.length;i<o;++i)r[++t]=e[i];var a={0:t-o+1,1:t};return n.push(a),a}function u(e){return e.map(l)}for(var c in e)o(e[c]);return{type:"Topology",coordinates:r,lines:i,rings:n,objects:e}},O=function(e){var t,i={};for(t in e)i[t]=D(e[t]);return i};function D(e){return null==e?{type:null}:("FeatureCollection"===e.type?I:"Feature"===e.type?B:F)(e)}function I(e){var t={type:"GeometryCollection",geometries:e.features.map(B)};return null!=e.bbox&&(t.bbox=e.bbox),t}function B(e){var t,i=F(e.geometry);for(t in null!=e.id&&(i.id=e.id),null!=e.bbox&&(i.bbox=e.bbox),e.properties){i.properties=e.properties;break}return i}function F(e){if(null==e)return{type:null};var t="GeometryCollection"===e.type?{type:"GeometryCollection",geometries:e.geometries.map(F)}:"Point"===e.type||"MultiPoint"===e.type?{type:e.type,coordinates:e.coordinates}:{type:e.type,arcs:e.coordinates};return null!=e.bbox&&(t.bbox=e.bbox),t}var N=function(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=o-n?(i-1)/(o-n):1,l=a-r?(i-1)/(a-r):1;function u(e){return[Math.round((e[0]-n)*s),Math.round((e[1]-r)*l)]}function c(e,t){for(var i,o,a,u,c,h=-1,d=0,f=e.length,p=new Array(f);++h<f;)i=e[h],u=Math.round((i[0]-n)*s),c=Math.round((i[1]-r)*l),(u!==o||c!==a)&&(p[d++]=[o=u,a=c]);for(p.length=d;d<t;)d=p.push([p[0][0],p[0][1]]);return p}function h(e){return c(e,2)}function d(e){return c(e,4)}function f(e){return e.map(d)}function p(e){null!=e&&_.hasOwnProperty(e.type)&&_[e.type](e)}var _={GeometryCollection:function(e){e.geometries.forEach(p)},Point:function(e){e.coordinates=u(e.coordinates)},MultiPoint:function(e){e.coordinates=e.coordinates.map(u)},LineString:function(e){e.arcs=h(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(h)},Polygon:function(e){e.arcs=f(e.arcs)},MultiPolygon:function(e){e.arcs=e.arcs.map(f)}};for(var m in e)p(e[m]);return{scale:[1/s,1/l],translate:[n,r]}},G=function(e,t){var i=y(e=O(e)),n=t>0&&i&&N(e,i,t),r=L(E(R(e))),o=r.coordinates,a=$(1.4*r.arcs.length,z,U);function s(e){e&&l.hasOwnProperty(e.type)&&l[e.type](e)}e=r.objects,r.bbox=i,r.arcs=r.arcs.map((function(e,t){return a.set(e,t),o.slice(e[0],e[1]+1)})),delete r.coordinates,o=null;var l={GeometryCollection:function(e){e.geometries.forEach(s)},LineString:function(e){e.arcs=u(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(u)},Polygon:function(e){e.arcs=e.arcs.map(u)},MultiPolygon:function(e){e.arcs=e.arcs.map(c)}};function u(e){var t=[];do{var i=a.get(e);t.push(e[0]<e[1]?i:~i)}while(e=e.next);return t}function c(e){return e.map(u)}for(var h in e)s(e[h]);return n&&(r.transform=n,r.arcs=M(r.arcs)),r};function z(e){var t,i=e[0],n=e[1];return n<i&&(t=i,i=n,n=t),i+31*n}function U(e,t){var i,n=e[0],r=e[1],o=t[0],a=t[1];return r<n&&(i=n,n=r,r=i),a<o&&(i=o,o=a,a=i),n===o&&r===a}var V=function(e){var t,i,n=e.objects,r={},o=e.arcs,a=o.length,s=-1,l=new Array(a),u=0,c=-1;function h(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(h);break;case"LineString":f(e.arcs);break;case"MultiLineString":case"Polygon":e.arcs.forEach(f);break;case"MultiPolygon":e.arcs.forEach(p)}}function d(e){e<0&&(e=~e),l[e]||(l[e]=1,++u)}function f(e){e.forEach(d)}function p(e){e.forEach(f)}function _(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(_)};break;case"LineString":t={type:"LineString",arcs:g(e.arcs)};break;case"MultiLineString":t={type:"MultiLineString",arcs:e.arcs.map(g)};break;case"Polygon":t={type:"Polygon",arcs:e.arcs.map(g)};break;case"MultiPolygon":t={type:"MultiPolygon",arcs:e.arcs.map(x)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function m(e){return e<0?~l[~e]:l[e]}function g(e){return e.map(m)}function x(e){return e.map(g)}for(i in n)h(n[i]);for(t=new Array(u);++s<a;)l[s]&&(l[s]=++c,t[c]=o[s]);for(i in n)r[i]=_(n[i]);return{type:"Topology",bbox:e.bbox,transform:e.transform,objects:r,arcs:t}},k=function(e,t){var i,n=e.objects,r={};function o(e){var t,i;switch(e.type){case"Polygon":t=(i=a(e.arcs))?{type:"Polygon",arcs:i}:{type:null};break;case"MultiPolygon":t=(i=e.arcs.map(a).filter(H)).length?{type:"MultiPolygon",arcs:i}:{type:null};break;case"GeometryCollection":t=(i=e.geometries.map(o).filter(q)).length?{type:"GeometryCollection",geometries:i}:{type:null};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function a(e){return e.length&&s(e[0])?[e[0]].concat(e.slice(1).filter(l)):null}function s(e){return t(e,!1)}function l(e){return t(e,!0)}for(i in null==t&&(t=W),n)r[i]=o(n[i]);return V({type:"Topology",bbox:e.bbox,transform:e.transform,objects:r,arcs:e.arcs})};function W(){return!0}function H(e){return e}function q(e){return null!=e.type}var j=function(e){var t,i=new Array(e.arcs.length),n=0;function r(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(r);break;case"Polygon":o(e.arcs);break;case"MultiPolygon":e.arcs.forEach(o)}}function o(e){for(var t=0,r=e.length;t<r;++t,++n)for(var o=e[t],a=0,s=o.length;a<s;++a){var l=o[a];l<0&&(l=~l);var u=i[l];null==u?i[l]=n:u!==n&&(i[l]=-1)}}for(t in e.objects)r(e.objects[t]);return function(e){for(var t,n=0,r=e.length;n<r;++n)if(-1===i[(t=e[n])<0?~t:t])return!0;return!1}};function X(e){var t=e[0],i=e[1],n=e[2];return Math.abs((t[0]-n[0])*(i[1]-t[1])-(t[0]-i[0])*(n[1]-t[1]))/2}function Y(e){for(var t,i=-1,n=e.length,r=e[n-1],o=0;++i<n;)t=r,r=e[i],o+=t[0]*r[1]-t[1]*r[0];return Math.abs(o)/2}var Z=function(e,t,i){return t=null==t?Number.MIN_VALUE:+t,null==i&&(i=Y),function(n,r){return i(o(e,{type:"Polygon",arcs:[n]}).geometry.coordinates[0],r)>=t}},K=function(e,t,i){var n=j(e),r=Z(e,t,i);return function(e,t){return n(e,t)||r(e,t)}};function Q(e,t){return e[1][2]-t[1][2]}var J=function(){var e={},t=[],i=0;function n(e,i){for(;i>0;){var n=(i+1>>1)-1,r=t[n];if(Q(e,r)>=0)break;t[r._=i]=r,t[e._=i=n]=e}}function r(e,n){for(;;){var r=n+1<<1,o=r-1,a=n,s=t[a];if(o<i&&Q(t[o],s)<0&&(s=t[a=o]),r<i&&Q(t[r],s)<0&&(s=t[a=r]),a===n)break;t[s._=n]=s,t[e._=n=a]=e}}return e.push=function(e){return n(t[e._=i]=e,i++),i},e.pop=function(){if(!(i<=0)){var e,n=t[0];return--i>0&&(e=t[i],r(t[e._=0]=e,0)),n}},e.remove=function(e){var o,a=e._;if(t[a]===e)return a!==--i&&(Q(o=t[i],e)<0?n:r)(t[o._=a]=o,a),a},e};function ee(e){return[e[0],e[1],0]}var te=function(e,t){var n=e.transform?i(e.transform):ee,r=J();null==t&&(t=X);var o=e.arcs.map((function(e){var i,o,s,l=[],u=0;for(o=1,s=(e=e.map(n)).length-1;o<s;++o)(i=[e[o-1],e[o],e[o+1]])[1][2]=t(i),l.push(i),r.push(i);for(e[0][2]=e[s][2]=1/0,o=0,s=l.length;o<s;++o)(i=l[o]).previous=l[o-1],i.next=l[o+1];for(;i=r.pop();){var c=i.previous,h=i.next;i[1][2]<u?i[1][2]=u:u=i[1][2],c&&(c.next=h,c[2]=i[2],a(c)),h&&(h.previous=c,h[0]=i[0],a(h))}return e}));function a(e){r.remove(e),e[1][2]=t(e),r.push(e)}return{type:"Topology",bbox:e.bbox,objects:e.objects,arcs:o}},ie=function(e,t){var i=[];return e.arcs.forEach((function(e){e.forEach((function(e){isFinite(e[2])&&i.push(e[2])}))})),i.length&&ne(i.sort(re),t)};function ne(e,t){if(i=e.length){if((t=+t)<=0||i<2)return e[0];if(t>=1)return e[i-1];var i,n=(i-1)*t,r=Math.floor(n),o=e[r];return o+(e[r+1]-o)*(n-r)}}function re(e,t){return t-e}var oe=function(e,t){t=null==t?Number.MIN_VALUE:+t;var i=e.arcs.map((function(e){for(var i,n=-1,r=0,o=e.length,a=new Array(o);++n<o;)(i=e[n])[2]>=t&&(a[r++]=[i[0],i[1]]);return a.length=r,a}));return{type:"Topology",transform:e.transform,bbox:e.bbox,objects:e.objects,arcs:i}},ae=Math.PI,se=2*ae,le=ae/4,ue=ae/180,ce=Math.abs,he=Math.atan2,de=Math.cos,fe=Math.sin;function pe(e,t){for(var i,n,r=0,o=e.length,a=0,s=e[t?r++:o-1],l=s[0]*ue,u=s[1]*ue/2+le,c=de(u),h=fe(u);r<o;++r){i=l,l=(s=e[r])[0]*ue,u=s[1]*ue/2+le,n=c,c=de(u);var d=l-i,f=d>=0?1:-1,p=f*d,_=h*(h=fe(u)),m=n*c+_*de(p),g=_*f*fe(p);a+=he(g,m)}return a}function _e(e,t){var i=pe(e,!0);return t&&(i*=-1),2*(i<0?se+i:i)}function me(e){return 2*ce(pe(e,!1))}e.bbox=n,e.feature=o,e.mesh=u,e.meshArcs=c,e.merge=f,e.mergeArcs=p,e.neighbors=m,e.quantize=x,e.transform=i,e.untransform=g,e.topology=G,e.filter=k,e.filterAttached=j,e.filterAttachedWeight=K,e.filterWeight=Z,e.planarRingArea=Y,e.planarTriangleArea=X,e.presimplify=te,e.quantile=ie,e.simplify=oe,e.sphericalRingArea=_e,e.sphericalTriangleArea=me,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof exports&&typeof module<"u"?exports:e.topojson=e.topojson||{})}(ce$e);var ke$7=ce$e.topojson;function P$n(e){return o$1p.fromDegrees(e[0],e[1],e[2])}var A$t={"urn:ogc:def:crs:OGC:1.3:CRS84":P$n,"EPSG:4326":P$n,"urn:ogc:def:crs:EPSG::4326":P$n},J$i={},Q$m={},M$p=48,R$l,G$q=e$1X.ROYALBLUE,L$p=e$1X.YELLOW,O$k=2,U$o=e$1X.fromBytes(255,255,0,100),D$m=!1,Le$a={small:24,medium:48,large:64},Oe$b=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function Z$l(e,t){var i="";for(var n in e)if(e.hasOwnProperty(n)){if(n===t||-1!==Oe$b.indexOf(n))continue;var r=e[n];e$2e(r)&&(i+="object"==typeof r?"<tr><th>"+n+"</th><td>"+Z$l(r)+"</td></tr>":"<tr><th>"+n+"</th><td>"+r+"</td></tr>")}return i.length>0&&(i='<table class="supermap3d-infoBox-defaultTable"><tbody>'+i+"</tbody></table>"),i}function Ue$7(e,t,i){var n;return function(r,o){return e$2e(n)||(n=e(t,i)),n}}function $$i(e,t){return new n$X(Ue$7(Z$l,e,t),!0)}function B$k(e,t,i){var n=e.id;if(e$2e(n)&&"Feature"===e.type){for(var r=2,o=n;e$2e(t.getById(o));)o=n+"_"+r,r++;n=o}else n=e$1T();var a=t.getOrCreateEntity(n),s=e.properties;if(e$2e(s)){a.properties=s;var l,u=s.title;if(e$2e(u))a.name=u,l="title";else{var c=Number.MAX_VALUE;for(var h in s)if(s.hasOwnProperty(h)&&s[h]){var d=h.toLowerCase();if(c>1&&"title"===d){c=1,l=h;break}c>2&&"name"===d?(c=2,l=h):c>3&&/title/i.test(h)?(c=3,l=h):c>4&&/name/i.test(h)&&(c=4,l=h)}e$2e(l)&&(a.name=s[l])}var f=s.description;null!==f&&(a.description=e$2e(f)?new e$1L(f):i(s,l))}return a}function F$k(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++)i[n]=t(e[n]);return i}var K$i={Feature:re$e,FeatureCollection:Be$a,GeometryCollection:ie$8,LineString:le$d,MultiLineString:ae$c,MultiPoint:oe$9,MultiPolygon:me$e,Point:ne$b,Polygon:ce$d,Topology:ue$b},ee$d={GeometryCollection:ie$8,LineString:le$d,MultiLineString:ae$c,MultiPoint:oe$9,MultiPolygon:me$e,Point:ne$b,Polygon:ce$d,Topology:ue$b};function re$e(e,t,i,n,r){if(null!==t.geometry){if(!e$2e(t.geometry))throw new t$13("feature.geometry is required.");var o=t.geometry.type,a=ee$d[o];if(!e$2e(a))throw new t$13("Unknown geometry type: "+o);a(e,t,t.geometry,n,r)}else B$k(t,e._entityCollection,r.describe)}function Be$a(e,t,i,n,r){for(var o=t.features,a=0,s=o.length;a<s;a++)re$e(e,o[a],void 0,n,r)}function ie$8(e,t,i,n,r){for(var o=i.geometries,a=0,s=o.length;a<s;a++){var l=o[a],u=l.type,c=ee$d[u];if(!e$2e(c))throw new t$13("Unknown geometry type: "+u);c(e,t,l,n,r)}}function te$b(e,t,i,n,r){var o,a=r.markerSymbol,s=r.markerColor,l=r.markerSize,u=t.properties;if(e$2e(u)){var c=u["marker-color"];e$2e(c)&&(s=e$1X.fromCssColorString(c)),l=u$Z(Le$a[u["marker-size"]],l);var h=u["marker-symbol"];e$2e(h)&&(a=h)}o=e$2e(a)?1===a.length?e._pinBuilder.fromText(a.toUpperCase(),s,l):e._pinBuilder.fromMakiIconId(a,s,l):e._pinBuilder.fromColor(s,l);var d=new n$V;d.verticalOrigin=new e$1L(S$Q.BOTTOM),2===n.length&&r.clampToGround&&(d.heightReference=k$R.CLAMP_TO_GROUND);var f=B$k(t,e._entityCollection,r.describe);f.billboard=d,f.position=new r$V(i(n));var p=o$1l(o).then((function(e){d.image=new e$1L(e)})).otherwise((function(){d.image=new e$1L(e._pinBuilder.fromColor(s,l))}));e._promises.push(p)}function ne$b(e,t,i,n,r){te$b(e,t,n,i.coordinates,r)}function oe$9(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)te$b(e,t,n,o[a],r)}function se$9(e,t,i,n,r){var o=r.strokeMaterialProperty,a=r.strokeWidthProperty,s=t.properties;if(e$2e(s)){var l=s["stroke-width"];e$2e(l)&&(a=new e$1L(l));var u,c=s.stroke;e$2e(c)&&(u=e$1X.fromCssColorString(c));var h=s["stroke-opacity"];e$2e(h)&&1!==h&&(e$2e(u)||(u=o.color.clone()),u.alpha=h),e$2e(u)&&(o=new t$P(u))}var d=B$k(t,e._entityCollection,r.describe),f=new a$L;d.polyline=f,f.clampToGround=r.clampToGround,f.material=o,f.width=a,f.positions=new e$1L(F$k(n,i)),f.arcType=m$1h.RHUMB}function le$d(e,t,i,n,r){se$9(e,t,n,i.coordinates,r)}function ae$c(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)se$9(e,t,n,o[a],r)}function fe$b(e,t,i,n,r){if(0!==n.length&&0!==n[0].length){var o=r.strokeMaterialProperty.color,a=r.fillMaterialProperty,s=r.strokeWidthProperty,l=t.properties;if(e$2e(l)){var u=l["stroke-width"];e$2e(u)&&(s=new e$1L(u));var c,h=l.stroke;e$2e(h)&&(c=e$1X.fromCssColorString(h));var d=l["stroke-opacity"];e$2e(d)&&1!==d&&(e$2e(c)||(c=r.strokeMaterialProperty.color.clone()),c.alpha=d),e$2e(c)&&(o=new e$1L(c));var f,p=l.fill;e$2e(p)&&((f=e$1X.fromCssColorString(p)).alpha=a.color.alpha),e$2e(d=l["fill-opacity"])&&d!==a.color.alpha&&(e$2e(f)||(f=a.color.clone()),f.alpha=d),e$2e(f)&&(a=new t$P(f))}var _=new l$Y;_.outline=new e$1L(!0),_.outlineColor=o,_.outlineWidth=s,_.material=a,_.arcType=m$1h.GEODESIC,_._fromDataSource=!0;for(var m=[],g=1,x=n.length;g<x;g++)m.push(new e$1M(F$k(n[g],i)));var y=n[0];_.hierarchy=new e$1L(new e$1M(F$k(y,i),m)),y[0].length>2?_.perPositionHeight=new e$1L(!0):r.clampToGround||(_.height=0);var v=B$k(t,e._entityCollection,r.describe);r.clampToGround&&(_.classificationType=_0x2b86ba.TERRAIN),r.clampToS3M&&(_.classificationType=_0x2b86ba.S3M_TILE),v.polygon=_}}function ce$d(e,t,i,n,r){fe$b(e,t,n,i.coordinates,r)}function me$e(e,t,i,n,r){for(var o=i.coordinates,a=0;a<o.length;a++)fe$b(e,t,n,o[a],r)}function ue$b(e,t,i,n,r){for(var o in i.objects)if(i.objects.hasOwnProperty(o)){var a=ke$7.feature(i,i.objects[o]);(0,K$i[a.type])(e,a,a,n,r)}}function y$p(e){this._name=e,this._changed=new o$1h,this._error=new o$1h,this._isLoading=!1,this._loading=new o$1h,this._entityCollection=new r$v(this),this._promises=[],this._pinBuilder=new s$A,this._entityCluster=new a$r,this._credit=void 0,this._resourceCredits=[],this._visibleViewport=4095,this._swipeRegion=new e$2c(0,0,1,1),this._swipeEnabled=!1}function pe$d(e,t,i,n){var r;e$2e(n)&&(r=f$Q(n)),e$2e(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));var o=K$i[t.type];if(!e$2e(o))throw new t$13("Unsupported GeoJSON object type: "+t.type);var a=t.crs,s=null!==a?P$n:null;if(e$2e(a)){if(!e$2e(a.properties))throw new t$13("crs.properties is undefined.");var l=a.properties;if("name"===a.type){if(!e$2e(s=A$t[l.name]))throw new t$13("Unknown crs name: "+l.name)}else if("link"===a.type){var u=J$i[l.href];if(e$2e(u)||(u=Q$m[l.type]),!e$2e(u))throw new t$13("Unable to resolve crs link: "+JSON.stringify(l));s=u(l)}else{if("EPSG"!==a.type)throw new t$13("Unknown crs type: "+a.type);if(!e$2e(s=A$t["EPSG:"+l.code]))throw new t$13("Unknown crs EPSG code: "+l.code)}}return o$1l(s,(function(n){return e._entityCollection.removeAll(),null!==n&&o(e,t,t,n,i),o$1l.all(e._promises,(function(){return e._promises.length=0,o$B.setLoading(e,!1),e}))}))}function o$w(e,t){this.position=e,this.headingPitchRoll=t}y$p.load=function(e,t){return(new y$p).load(e,t)},Object.defineProperties(y$p,{markerSize:{get:function(){return M$p},set:function(e){M$p=e}},markerSymbol:{get:function(){return R$l},set:function(e){R$l=e}},markerColor:{get:function(){return G$q},set:function(e){G$q=e}},stroke:{get:function(){return L$p},set:function(e){L$p=e}},strokeWidth:{get:function(){return O$k},set:function(e){O$k=e}},fill:{get:function(){return U$o},set:function(e){U$o=e}},clampToGround:{get:function(){return D$m},set:function(e){D$m=e}},crsNames:{get:function(){return A$t}},crsLinkHrefs:{get:function(){return J$i}},crsLinkTypes:{get:function(){return Q$m}}}),Object.defineProperties(y$p.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2e(e))throw new t$15("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}},swipeRegion:{get:function(){return new f$1a(this._swipeRegion.x,this._swipeRegion.y,this._swipeRegion.z-this._swipeRegion.x,this._swipeRegion.w-this._swipeRegion.y)},set:function(e){if(e$2e(e)){if(!(e instanceof f$1a))throw new t$15("swipeRegion must be a instance of BoundingRectangle.");if(e$2c.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._swipeRegion),e$2e(this._entityCluster._billboardCollection)&&(this._entityCluster._billboardCollection._swipeRegion=e$2c.clone(this._swipeRegion,new e$2c)),e$2e(this._primitives))for(var t=0;t<this._primitives._primitives.length;t++)this._primitives._primitives[t]instanceof y$R&&(this._primitives._primitives[t]._swipeRegion=e$2c.clone(this._swipeRegion,new e$2c));if(e$2e(this._groundPrimitives)){var i=this._groundPrimitives._collectionsArray;for(t=0;t<i.length;t++)if(i[t]instanceof o$y)for(var n=0;n<i[t]._primitives.length;n++)i[t]._primitives[n]._primitive._primitive._swipeRegion=e$2c.clone(this._swipeRegion,new e$2c)}}}},swipeEnabled:{get:function(){return this._swipeEnabled},set:function(e){if(e!==this._swipeEnabled){if(e||e$2c.fromElements(0,0,1,1,this._swipeRegion),this._swipeEnabled=e,e$2e(this._entityCluster._billboardCollection)&&(this._entityCluster._billboardCollection._swipeEnabled=e),e$2e(this._primitives))for(var t=0;t<this._primitives._primitives.length;t++)this._primitives._primitives[t]instanceof y$R&&(this._primitives._primitives[t].swipeEnabled=e);if(e$2e(this._groundPrimitives)){var i=this._groundPrimitives._collectionsArray;for(t=0;t<i.length;t++)if(i[t]instanceof o$y)for(var n=0;n<i[t]._primitives.length;n++)i[t]._primitives[n]._primitive._primitive.swipeEnabled=e}}}}}),y$p.prototype.load=function(e,t){if(!e$2e(e))throw new t$15("data is required.");o$B.setLoading(this,!0);var i=(t=u$Z(t,u$Z.EMPTY_OBJECT)).credit;"string"==typeof i&&(i=new r$U(i)),this._credit=i;var n=e,r=t.sourceUri;if("string"==typeof e||e instanceof t$10){n=(e=t$10.createIfNeeded(e)).fetchJson(),r=u$Z(r,e.getUrlComponent());var o=this._resourceCredits,a=e.credits;if(e$2e(a))for(var s=a.length,l=0;l<s;l++)o.push(a[l])}t={describe:u$Z(t.describe,$$i),markerSize:u$Z(t.markerSize,M$p),markerSymbol:u$Z(t.markerSymbol,R$l),markerColor:u$Z(t.markerColor,G$q),strokeWidthProperty:new e$1L(u$Z(t.strokeWidth,O$k)),strokeMaterialProperty:new t$P(u$Z(t.stroke,L$p)),fillMaterialProperty:new t$P(u$Z(t.fill,U$o)),clampToGround:u$Z(t.clampToGround,D$m),clampToS3M:u$Z(t.clampToS3M,!1)};var u=this;return o$1l(n,(function(e){return pe$d(u,e,t,r)})).otherwise((function(e){return o$B.setLoading(u,!1),u._error.raiseEvent(u,e),console.log(e),o$1l.reject(e)}))},y$p.prototype.loadPoiJsonData=function(e,t){if(!e$2e(e))throw new t$15("data is required.");o$B.setLoading(this,!0);var i=(t=u$Z(t,u$Z.EMPTY_OBJECT)).sourceUri;return pe$d(this,e,t={describe:u$Z(t.describe,$$i),markerSize:u$Z(t.markerSize,M$p),markerSymbol:u$Z(t.markerSymbol,R$l),markerColor:u$Z(t.markerColor,G$q),strokeWidthProperty:new e$1L(u$Z(t.strokeWidth,O$k)),strokeMaterialProperty:new t$P(u$Z(t.stroke,L$p)),fillMaterialProperty:new t$P(u$Z(t.fill,U$o))},i)},y$p.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},y$p.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport};var be$c={};!function(e,t){e.Autolinker=function(){function e(e,t){for(var i in t)t.hasOwnProperty(i)&&void 0===e[i]&&(e[i]=t[i]);return e}function t(e,t,i){var n;return e.length>t&&(null==i?(i="…",n=3):n=i.length,e=e.substring(0,t-n)+i),e}function i(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}function n(e,t){for(var i=e.length-1;i>=0;i--)!0===t(e[i])&&e.splice(i,1)}function r(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var i,n=[],r=0;i=t.exec(e);)n.push(e.substring(r,i.index)),n.push(i[0]),r=i.index+i[0].length;return n.push(e.substring(r)),n}function o(e){throw new Error("Unhandled case for value: '"+e+"'")}var a=function(){function e(e){void 0===e&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return e.prototype.setTagName=function(e){return this.tagName=e,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(e,t){return this.getAttrs()[e]=t,this},e.prototype.getAttr=function(e){return this.getAttrs()[e]},e.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(e){return this.setAttr("class",e)},e.prototype.addClass=function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,o=n?n.split(r):[],a=e.split(r);t=a.shift();)-1===i(o,t)&&o.push(t);return this.getAttrs().class=o.join(" "),this},e.prototype.removeClass=function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,o=n?n.split(r):[],a=e.split(r);o.length&&(t=a.shift());){var s=i(o,t);-1!==s&&o.splice(s,1)}return this.getAttrs().class=o.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},e.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},e.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i+'="'+e[i]+'"');return t.join(" ")},e}();function s(e,t,i){var n,r;null==i?(i="…",r=3,n=8):(r=i.length,n=i.length);var o=function(e){var t={},i=e,n=i.match(/^([a-z]+):\/\//i);return n&&(t.scheme=n[1],i=i.substr(n[0].length)),(n=i.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(t.host=n[1],i=i.substr(n[0].length)),(n=i.match(/^\/(.*?)(?=(\?|#|$))/i))&&(t.path=n[1],i=i.substr(n[0].length)),(n=i.match(/^\?(.*?)(?=(#|$))/i))&&(t.query=n[1],i=i.substr(n[0].length)),(n=i.match(/^#(.*?)$/i))&&(t.fragment=n[1]),t},a=function(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t},s=function(e,t){var n=t/2,r=Math.ceil(n),o=-1*Math.floor(n),a="";return o<0&&(a=e.substr(o)),e.substr(0,r)+i+a};if(e.length<=t)return e;var l=t-r,u=o(e);if(u.query){var c=u.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);c&&(u.query=u.query.substr(0,c[1].length),e=a(u))}if(e.length<=t||(u.host&&(u.host=u.host.replace(/^www\./,""),e=a(u)),e.length<=t))return e;var h="";if(u.host&&(h+=u.host),h.length>=l)return u.host.length==t?(u.host.substr(0,t-r)+i).substr(0,l+n):s(h,l).substr(0,l+n);var d="";if(u.path&&(d+="/"+u.path),u.query&&(d+="?"+u.query),d){if((h+d).length>=l)return(h+d).length==t?(h+d).substr(0,t):(h+s(d,l-h.length)).substr(0,l+n);h+=d}if(u.fragment){var f="#"+u.fragment;if((h+f).length>=l)return(h+f).length==t?(h+f).substr(0,t):(h+s(f,l-h.length)).substr(0,l+n);h+=f}if(u.scheme&&u.host){var p=u.scheme+"://";if((h+p).length<l)return(p+h).substr(0,t)}if(h.length<=t)return h;var _="";return l>0&&(_=h.substr(-1*Math.floor(l/2))),(h.substr(0,Math.ceil(l/2))+i+_).substr(0,l+n)}function l(e,t,i){if(e.length<=t)return e;var n,r;null==i?(i="…",n=8,r=3):(n=i.length,r=i.length);var o=t-r,a="";return o>0&&(a=e.substr(-1*Math.floor(o/2))),(e.substr(0,Math.ceil(o/2))+i+a).substr(0,o+n)}function u(e,i,n){return t(e,i,n)}var c=function(){function e(e){void 0===e&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return e.prototype.build=function(e){return new a({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},e.prototype.createAttrs=function(e){var t={href:e.getAnchorHref()},i=this.createCssClass(e);return i&&(t.class=i),this.newWindow&&(t.target="_blank",t.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(t.title=e.getAnchorHref()),t},e.prototype.createCssClass=function(e){var t=this.className;if(t){for(var i=[t],n=e.getCssClassSuffixes(),r=0,o=n.length;r<o;r++)i.push(t+"-"+n[r]);return i.join(" ")}return""},e.prototype.processAnchorText=function(e){return e=this.doTruncate(e)},e.prototype.doTruncate=function(e){var t=this.truncate;if(!t||!t.length)return e;var i=t.length,n=t.location;return"smart"===n?s(e,i):"middle"===n?l(e,i):u(e,i)},e}(),h=function(){function e(e){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(e){this.offset=e},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.getType()]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}(),d=function(e,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},d(e,t)};function f(e,t){function i(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var p=function(){return p=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},p.apply(this,arguments)},_=function(e){function t(t){var i=e.call(this,t)||this;return i.email="",i.email=t.email,i}return f(t,e),t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(h),m=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="",i.hashtag="",i.serviceName=t.serviceName,i.hashtag=t.hashtag,i}return f(t,e),t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var e=this.serviceName,t=this.hashtag;switch(e){case"twitter":case"facebook":case"instagram":return""+t;default:throw new Error("Unknown service name to point hashtag to: "+e)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t}(h),g=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.mention="",i.mention=t.mention,i.serviceName=t.serviceName,i}return f(t,e),t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":case"instagram":case"soundcloud":return""+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var t=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&t.push(i),t},t}(h),x=function(e){function t(t){var i=e.call(this,t)||this;return i.number="",i.plusSign=!1,i.number=t.number,i.plusSign=t.plusSign,i}return f(t,e),t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(h),y=function(e){function t(t){var i=e.call(this,t)||this;return i.url="",i.urlMatchType="scheme",i.protocolUrlMatch=!1,i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.schemePrefixRegex=/^(https?:\/\/)?/i,i.wwwPrefixRegex=/^(https?:\/\/)?(www\.)?/i,i.protocolRelativeRegex=/^\/\//,i.protocolPrepended=!1,i.urlMatchType=t.urlMatchType,i.url=t.url,i.protocolUrlMatch=t.protocolUrlMatch,i.protocolRelativeMatch=t.protocolRelativeMatch,i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return f(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var e=this.url;return!this.protocolRelativeMatch&&!this.protocolUrlMatch&&!this.protocolPrepended&&(e=this.url="http://"+e,this.protocolPrepended=!0),e},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},t.prototype.getAnchorText=function(){var e=this.getMatchedText();return this.protocolRelativeMatch&&(e=this.stripProtocolRelativePrefix(e)),this.stripPrefix.scheme&&(e=this.stripSchemePrefix(e)),this.stripPrefix.www&&(e=this.stripWwwPrefix(e)),this.stripTrailingSlash&&(e=this.removeTrailingSlash(e)),this.decodePercentEncoding&&(e=this.removePercentEncoding(e)),e},t.prototype.stripSchemePrefix=function(e){return e.replace(this.schemePrefixRegex,"")},t.prototype.stripWwwPrefix=function(e){return e.replace(this.wwwPrefixRegex,"$1")},t.prototype.stripProtocolRelativePrefix=function(e){return e.replace(this.protocolRelativeRegex,"")},t.prototype.removeTrailingSlash=function(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e},t.prototype.removePercentEncoding=function(e){var t=e.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(t)}catch{return t}},t}(h),v=function(){function e(e){this.__jsduckDummyDocProp=null,this.tagBuilder=e.tagBuilder}return e}(),$=/[A-Za-z]/,b=/[0-9]/,T=/\s/,C=/['"]/,S=/[\x00-\x1F\x7F]/,w=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,E=w+/\u00a9\u00ae\u2000-\u3300\ud83c\ud000-\udfff\ud83d\ud000-\udfff\ud83e\ud000-\udfff/.source+/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,P=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,A=E+P,L=E+P,M="(?:["+P+"]{1,3}\\.){3}["+P+"]{1,3}",R="["+L+"](?:["+L+"\\-]{0,61}["+L+"])?",O=function(e){return"(?=("+R+"))\\"+e},D=function(e){return"(?:"+O(e)+"(?:\\."+O(e+1)+"){0,126}|"+M+")"},I=new RegExp("["+L+"]"),B=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|warman|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|グーグル|クラウド|ポイント|大众汽车|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ストア|セール|みんな|中文网|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,F=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.localPartCharRegex=new RegExp("["+L+"!#$%&'*+/=?^_`{|}~-]"),t.strictTldRegex=new RegExp("^"+B.source+"$"),t}return f(t,e),t.prototype.parseMatches=function(e){for(var t=this.tagBuilder,i=this.localPartCharRegex,n=this.strictTldRegex,r=[],a=e.length,s=new N,l={m:"a",a:"i",i:"l",l:"t",t:"o",o:":"},u=0,c=0,h=s;u<a;){var d=e.charAt(u);switch(c){case 0:f(d);break;case 1:m(e.charAt(u-1),d);break;case 2:g(d);break;case 3:x(d);break;case 4:y(d);break;case 5:v(d);break;case 6:$(d);break;case 7:b(d);break;default:o(c)}u++}return S(),r;function f(e){"m"===e?T(1):i.test(e)&&T()}function m(e,t){":"===e?i.test(t)?(c=2,h=new N(p({},h,{hasMailtoPrefix:!0}))):C():l[e]===t||(i.test(t)?c=2:"."===t?c=3:"@"===t?c=4:C())}function g(e){"."===e?c=3:"@"===e?c=4:i.test(e)||C()}function x(e){"."===e||"@"===e?C():i.test(e)?c=2:C()}function y(e){I.test(e)?c=5:C()}function v(e){"."===e?c=7:"-"===e?c=6:I.test(e)||S()}function $(e){"-"===e||"."===e?S():I.test(e)?c=5:S()}function b(e){"."===e||"-"===e?S():I.test(e)?(c=5,h=new N(p({},h,{hasDomainDot:!0}))):S()}function T(e){void 0===e&&(e=2),c=e,h=new N({idx:u})}function C(){c=0,h=s}function S(){if(h.hasDomainDot){var i=e.slice(h.idx,u);/[-.]$/.test(i)&&(i=i.slice(0,-1));var o=h.hasMailtoPrefix?i.slice(7):i;a(o)&&r.push(new _({tagBuilder:t,matchedText:i,offset:h.idx,email:o}))}function a(e){var t=(e.split(".").pop()||"").toLowerCase();return n.test(t)}C()}},t}(v),N=function(){function e(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.hasMailtoPrefix=!!e.hasMailtoPrefix,this.hasDomainDot=!!e.hasDomainDot}return e}(),G=function(){function e(){}return e.isValid=function(e,t){return!(t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(e,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,t)&&!this.isValidIpAddress(e)||this.containsMultipleDots(e))},e.isValidIpAddress=function(e){var t=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==e.match(t)},e.containsMultipleDots=function(e){var t=e;return this.hasFullProtocolRegex.test(e)&&(t=e.split("://")[1]),t.split("/")[0].indexOf("..")>-1},e.isValidUriScheme=function(e){var t=e.match(this.uriSchemeRegex),i=t&&t[0].toLowerCase();return"javascript:"!==i&&"vbscript:"!==i},e.urlMatchDoesNotHaveProtocolOrDot=function(e,t){return!(!e||t&&this.hasFullProtocolRegex.test(t)||-1!==e.indexOf("."))},e.urlMatchDoesNotHaveAtLeastOneWordChar=function(e,t){return!(!e||!t)&&!this.hasWordCharAfterProtocolRegex.test(e)},e.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,e.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,e.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+w+"]"),e.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,e}(),z=function(e){function t(t){var i=e.call(this,t)||this;return i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.matcherRegex=function(){var e=/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/,t=/(?:www\.)/,i=new RegExp("[/?#](?:["+L+"\\-+&@#/%=~_()|'$*\\[\\]?!:,.;✓]*["+L+"\\-+&@#/%=~_()|'$*\\[\\]✓])?");return new RegExp(["(?:","(",e.source,D(2),")","|","(","(//)?",t.source,D(6),")","|","(","(//)?",D(10)+"\\.",B.source,"(?![-"+A+"])",")",")","(?::[0-9]+)?","(?:"+i.source+")?"].join(""),"gi")}(),i.wordCharRegExp=new RegExp("["+L+"]"),i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.stripPrefix,r=this.stripTrailingSlash,o=this.decodePercentEncoding,a=this.tagBuilder,s=[],l=function(){var i=t[0],l=t[1],c=t[4],h=t[5],d=t[9],f=t.index,p=h||d,_=e.charAt(f-1);if(!G.isValid(i,l)||f>0&&"@"===_||f>0&&p&&u.wordCharRegExp.test(_))return"continue";if(/\?$/.test(i)&&(i=i.substr(0,i.length-1)),u.matchHasUnbalancedClosingParen(i))i=i.substr(0,i.length-1);else{var m=u.matchHasInvalidCharAfterTld(i,l);m>-1&&(i=i.substr(0,m))}var g=["http://","https://"].find((function(e){return!!l&&-1!==l.indexOf(e)}));if(g){var x=i.indexOf(g);i=i.substr(x),l=l.substr(x),f+=x}var v=l?"scheme":c?"www":"tld",$=!!l;s.push(new y({tagBuilder:a,matchedText:i,offset:f,urlMatchType:v,url:i,protocolUrlMatch:$,protocolRelativeMatch:!!p,stripPrefix:n,stripTrailingSlash:r,decodePercentEncoding:o}))},u=this;null!==(t=i.exec(e));)l();return s},t.prototype.matchHasUnbalancedClosingParen=function(e){var t,i=e.charAt(e.length-1);if(")"===i)t="(";else{if("]"!==i)return!1;t="["}for(var n=0,r=0,o=e.length-1;r<o;r++){var a=e.charAt(r);a===t?n++:a===i&&(n=Math.max(n-1,0))}return 0===n},t.prototype.matchHasInvalidCharAfterTld=function(e,t){if(!e)return-1;var i=0;t&&(i=e.indexOf(":"),e=e.slice(i));var n=new RegExp("^((.?//)?[-."+L+"]*[-"+L+"]\\.[-"+L+"]+)").exec(e);return null===n?-1:(i+=n[1].length,e=e.slice(n[1].length),/^[^-.A-Za-z0-9:\/?#]/.test(e)?i:-1)},t}(v),U=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegex=new RegExp("#[_"+L+"]{1,139}(?![_"+L+"])","g"),i.nonWordCharRegex=new RegExp("[^"+L+"]"),i.serviceName=t.serviceName,i}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.nonWordCharRegex,r=this.serviceName,o=this.tagBuilder,a=[];null!==(t=i.exec(e));){var s=t.index,l=e.charAt(s-1);if(0===s||n.test(l)){var u=t[0],c=t[0].slice(1);a.push(new m({tagBuilder:o,matchedText:u,offset:s,serviceName:r,hashtag:c}))}}return a},t}(v),V=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.matcherRegex=/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/g,t}return f(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.tagBuilder,r=[];null!==(t=i.exec(e));){var o=t[0],a=o.replace(/[^0-9,;#]/g,""),s=!(!t[1]&&!t[2]),l=0==t.index?"":e.substr(t.index-1,1),u=e.substr(t.index+o.length,1),c=!l.match(/\d/)&&!u.match(/\d/);this.testMatch(t[3])&&this.testMatch(o)&&c&&r.push(new x({tagBuilder:n,matchedText:o,offset:t.index,number:a,plusSign:s}))}return r},t.prototype.testMatch=function(e){return/\D/.test(e)},t}(v),k=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegexes={twitter:new RegExp("@[_"+L+"]{1,50}(?![_"+L+"])","g"),instagram:new RegExp("@[_."+L+"]{1,30}(?![_"+L+"])","g"),soundcloud:new RegExp("@[-_."+L+"]{1,50}(?![-_"+L+"])","g")},i.nonWordCharRegex=new RegExp("[^"+L+"]"),i.serviceName=t.serviceName,i}return f(t,e),t.prototype.parseMatches=function(e){var t,i=this.serviceName,n=this.matcherRegexes[this.serviceName],r=this.nonWordCharRegex,o=this.tagBuilder,a=[];if(!n)return a;for(;null!==(t=n.exec(e));){var s=t.index,l=e.charAt(s-1);if(0===s||r.test(l)){var u=t[0].replace(/\.+$/g,""),c=u.slice(1);a.push(new g({tagBuilder:o,matchedText:u,offset:s,serviceName:i,mention:c}))}}return a},t}(v);function W(e,t){for(var i=t.onOpenTag,n=t.onCloseTag,r=t.onText,a=t.onComment,s=t.onDoctype,l=new H,u=0,c=e.length,h=0,d=0,f=l;u<c;){var _=e.charAt(u);switch(h){case 0:m(_);break;case 1:g(_);break;case 2:y(_);break;case 3:x(_);break;case 4:v(_);break;case 5:w(_);break;case 6:E(_);break;case 7:P(_);break;case 8:A(_);break;case 9:L(_);break;case 10:M(_);break;case 11:R(_);break;case 12:O(_);break;case 13:D();break;case 14:I(_);break;case 15:B(_);break;case 16:F(_);break;case 17:N(_);break;case 18:G(_);break;case 19:z(_);break;case 20:U(_);break;default:o(h)}u++}function m(e){"<"===e&&k()}function g(e){"!"===e?h=13:"/"===e?(h=2,f=new H(p({},f,{isClosing:!0}))):"<"===e?k():$.test(e)?(h=3,f=new H(p({},f,{isOpening:!0}))):(h=0,f=l)}function x(e){T.test(e)?(f=new H(p({},f,{name:j()})),h=4):"<"===e?k():"/"===e?(f=new H(p({},f,{name:j()})),h=12):">"===e?(f=new H(p({},f,{name:j()})),W()):!$.test(e)&&!b.test(e)&&":"!==e&&V()}function y(e){">"===e?V():$.test(e)?h=3:V()}function v(e){T.test(e)||("/"===e?h=12:">"===e?W():"<"===e?k():"="===e||C.test(e)||S.test(e)?V():h=5)}function w(e){T.test(e)?h=6:"/"===e?h=12:"="===e?h=7:">"===e?W():"<"===e?k():C.test(e)&&V()}function E(e){T.test(e)||("/"===e?h=12:"="===e?h=7:">"===e?W():"<"===e?k():C.test(e)?V():h=5)}function P(e){T.test(e)||('"'===e?h=8:"'"===e?h=9:/[>=`]/.test(e)?V():"<"===e?k():h=10)}function A(e){'"'===e&&(h=11)}function L(e){"'"===e&&(h=11)}function M(e){T.test(e)?h=4:">"===e?W():"<"===e&&k()}function R(e){T.test(e)?h=4:"/"===e?h=12:">"===e?W():"<"===e?k():(h=4,X())}function O(e){">"===e?(f=new H(p({},f,{isClosing:!0})),W()):h=4}function D(t){"--"===e.substr(u,2)?(u+=2,f=new H(p({},f,{type:"comment"})),h=14):"DOCTYPE"===e.substr(u,7).toUpperCase()?(u+=7,f=new H(p({},f,{type:"doctype"})),h=20):V()}function I(e){"-"===e?h=15:">"===e?V():h=16}function B(e){"-"===e?h=18:">"===e?V():h=16}function F(e){"-"===e&&(h=17)}function N(e){h="-"===e?18:16}function G(e){">"===e?W():"!"===e?h=19:"-"===e||(h=16)}function z(e){"-"===e?h=17:">"===e?W():h=16}function U(e){">"===e?W():"<"===e&&k()}function V(){h=0,f=l}function k(){h=1,f=new H({idx:u})}function W(){var t=e.slice(d,f.idx);t&&r(t,d),"comment"===f.type?a(f.idx):"doctype"===f.type?s(f.idx):(f.isOpening&&i(f.name,f.idx),f.isClosing&&n(f.name,f.idx)),V(),d=u+1}function q(){var t=e.slice(d,u);r(t,d),d=u+1}function j(){var t=f.idx+(f.isClosing?2:1);return e.slice(t,u).toLowerCase()}function X(){u--}d<u&&q()}var H=function(){function e(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.type=e.type||"tag",this.name=e.name||"",this.isOpening=!!e.isOpening,this.isClosing=!!e.isClosing}return e}(),q=function(){function t(e){void 0===e&&(e={}),this.version=t.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(e.urls),this.email="boolean"==typeof e.email?e.email:this.email,this.phone="boolean"==typeof e.phone?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow="boolean"==typeof e.newWindow?e.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(e.stripPrefix),this.stripTrailingSlash="boolean"==typeof e.stripTrailingSlash?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding="boolean"==typeof e.decodePercentEncoding?e.decodePercentEncoding:this.decodePercentEncoding;var i=this.mention;if(!1!==i&&"twitter"!==i&&"instagram"!==i&&"soundcloud"!==i)throw new Error("invalid `mention` cfg - see docs");var n=this.hashtag;if(!1!==n&&"twitter"!==n&&"facebook"!==n&&"instagram"!==n)throw new Error("invalid `hashtag` cfg - see docs");this.truncate=this.normalizeTruncateCfg(e.truncate),this.className=e.className||this.className,this.replaceFn=e.replaceFn||this.replaceFn,this.context=e.context||this}return t.link=function(e,i){return new t(i).link(e)},t.parse=function(e,i){return new t(i).parse(e)},t.prototype.normalizeUrlsCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{schemeMatches:e,wwwMatches:e,tldMatches:e}:{schemeMatches:"boolean"!=typeof e.schemeMatches||e.schemeMatches,wwwMatches:"boolean"!=typeof e.wwwMatches||e.wwwMatches,tldMatches:"boolean"!=typeof e.tldMatches||e.tldMatches}},t.prototype.normalizeStripPrefixCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{scheme:e,www:e}:{scheme:"boolean"!=typeof e.scheme||e.scheme,www:"boolean"!=typeof e.www||e.www}},t.prototype.normalizeTruncateCfg=function(t){return"number"==typeof t?{length:t,location:"end"}:e(t||{},{length:Number.POSITIVE_INFINITY,location:"end"})},t.prototype.parse=function(e){var t=this,i=["a","style","script"],n=0,o=[];return W(e,{onOpenTag:function(e){i.indexOf(e)>=0&&n++},onText:function(e,i){if(0===n){var a=r(e,/( | |<|<|>|>|"|"|')/gi),s=i;a.forEach((function(e,i){if(i%2==0){var n=t.parseText(e,s);o.push.apply(o,n)}s+=e.length}))}},onCloseTag:function(e){i.indexOf(e)>=0&&(n=Math.max(n-1,0))},onComment:function(e){},onDoctype:function(e){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},t.prototype.compactMatches=function(e){e.sort((function(e,t){return e.getOffset()-t.getOffset()}));for(var t=0;t<e.length-1;t++){var i=e[t],n=i.getOffset(),r=i.getMatchedText().length,o=n+r;if(t+1<e.length){if(e[t+1].getOffset()===n){var a=e[t+1].getMatchedText().length>r?t:t+1;e.splice(a,1);continue}e[t+1].getOffset()<o&&e.splice(t+1,1)}}return e},t.prototype.removeUnwantedMatches=function(e){return this.hashtag||n(e,(function(e){return"hashtag"===e.getType()})),this.email||n(e,(function(e){return"email"===e.getType()})),this.phone||n(e,(function(e){return"phone"===e.getType()})),this.mention||n(e,(function(e){return"mention"===e.getType()})),this.urls.schemeMatches||n(e,(function(e){return"url"===e.getType()&&"scheme"===e.getUrlMatchType()})),this.urls.wwwMatches||n(e,(function(e){return"url"===e.getType()&&"www"===e.getUrlMatchType()})),this.urls.tldMatches||n(e,(function(e){return"url"===e.getType()&&"tld"===e.getUrlMatchType()})),e},t.prototype.parseText=function(e,t){void 0===t&&(t=0),t=t||0;for(var i=this.getMatchers(),n=[],r=0,o=i.length;r<o;r++){for(var a=i[r].parseMatches(e),s=0,l=a.length;s<l;s++)a[s].setOffset(t+a[s].getOffset());n.push.apply(n,a)}return n},t.prototype.link=function(e){if(!e)return"";for(var t=this.parse(e),i=[],n=0,r=0,o=t.length;r<o;r++){var a=t[r];i.push(e.substring(n,a.getOffset())),i.push(this.createMatchReturnVal(a)),n=a.getOffset()+a.getMatchedText().length}return i.push(e.substring(n)),i.join("")},t.prototype.createMatchReturnVal=function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this.context,e)),"string"==typeof t?t:!1===t?e.getMatchedText():t instanceof a?t.toAnchorString():e.buildTag().toAnchorString()},t.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var e=this.getTagBuilder(),t=[new U({tagBuilder:e,serviceName:this.hashtag}),new F({tagBuilder:e}),new V({tagBuilder:e}),new k({tagBuilder:e,serviceName:this.mention}),new z({tagBuilder:e,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=t},t.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new c({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},t.version="3.11.0",t.AnchorTagBuilder=c,t.HtmlTag=a,t.matcher={Email:F,Hashtag:U,Matcher:v,Mention:k,Phone:V,Url:z},t.match={Email:_,Hashtag:m,Match:h,Mention:g,Phone:x,Url:y},t}();return q}()}(be$c);var zr$1=be$c.Autolinker;function o$v(e,t){this.position=e,this.headingPitchRange=t}function l$s(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new o$1h,this.tourEnd=new o$1h,this.entryStart=new o$1h,this.entryEnd=new o$1h,this._activeEntries=[]}function h$r(e){for(var t=e.pop();void 0!==t;t=e.pop())t.stop()}function f$q(e,t,i){var n=this.playlist[this.playlistIndex];if(n){var r=y$o.bind(this,e,t,i);if(this._activeEntries.push(n),this.entryStart.raiseEvent(n),n.blocking)n.play(r,e.scene.camera,t);else{var o=this;n.play((function(){o.entryEnd.raiseEvent(n);var e=o._activeEntries.indexOf(n);e>=0&&o._activeEntries.splice(e,1)})),r(e,t,i)}}else e$2e(i)&&i(!1)}function y$o(e,t,i,n){var r=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(r,n),n)i(n);else{var o=this._activeEntries.indexOf(r);o>=0&&this._activeEntries.splice(o,1),this.playlistIndex++,f$q.call(this,e,t,i)}}function a$m(e,t,i){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=i,this.flyToMode=t}function i$r(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}l$s.prototype.addPlaylistEntry=function(e){this.playlist.push(e)},l$s.prototype.play=function(e,t){this.tourStart.raiseEvent();var i=this;f$q.call(this,e,t,(function(e){i.playlistIndex=0,e||h$r(i._activeEntries),i.tourEnd.raiseEvent(e)}))},l$s.prototype.stop=function(){h$r(this._activeEntries)},a$m.prototype.play=function(e,t,i){if(this.activeCamera=t,e$2e(e)&&null!==e){var n=this;this.activeCallback=function(t){delete n.activeCallback,delete n.activeCamera,e(!e$2e(t)&&t)}}var r=this.getCameraOptions(i);if(this.view.headingPitchRoll)t.flyTo(r);else if(this.view.headingPitchRange){var o=new i$1d(this.view.position);t.flyToBoundingSphere(o,r)}},a$m.prototype.stop=function(){e$2e(this.activeCamera)&&this.activeCamera.cancelFlight(),e$2e(this.activeCallback)&&this.activeCallback(!0)},a$m.prototype.getCameraOptions=function(e){var t={duration:this.duration};return e$2e(this.activeCallback)&&(t.complete=this.activeCallback),"smooth"===this.flyToMode&&(t.easingFunction=m$Y.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),e$2e(e)&&(t=p$19(t,e)),t},i$r.prototype.play=function(e){var t=this;this.activeCallback=e,this.timeout=setTimeout((function(){delete t.activeCallback,e(!1)}),1e3*this.duration)},i$r.prototype.stop=function(){clearTimeout(this.timeout),e$2e(this.activeCallback)&&this.activeCallback(!0)};var ir$3={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){var t=e.toLowerCase();return t=a$13(t),ir$3[t]}},xe$9;typeof DOMParser<"u"&&(xe$9=new DOMParser);var dt$5=new zr$1({stripPrefix:!1,email:!1,replaceFn:function(e){if(!e.protocolUrlMatch)return!1}}),ee$c=32,ar$1=2414016,nr$1=1,or$1=16093e3,lr$1=.1,sr$2=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],mr$1=["http://www.google.com/kml/ext/2.2"],pt$5=["http://www.w3.org/2005/Atom"],m$n={kml:sr$2,gx:mr$1,atom:pt$5,kmlgx:sr$2.concat(mr$1)},Ue$6={Document:Er$2,Folder:Ct$3,Placemark:Et$4,NetworkLink:At$3,GroundOverlay:Dt$4,PhotoOverlay:We$5,ScreenOverlay:We$5,Tour:Pt$3};function Q$l(e){this._dataSource=e,this._deferred=o$1l.defer(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}function vt$3(e){var t=e.slice(0,Math.min(4,e.size)),i=o$1l.defer(),n=new FileReader;return n.addEventListener("load",(function(){i.resolve(1347093252===new DataView(n.result).getUint32(0,!1))})),n.addEventListener("error",(function(){i.reject(n.error)})),n.readAsArrayBuffer(t),i.promise}function fr$1(e){var t=o$1l.defer(),i=new FileReader;return i.addEventListener("load",(function(){t.resolve(i.result)})),i.addEventListener("error",(function(){t.reject(i.error)})),i.readAsText(e),t.promise}function ur$1(e){var t,i,n,r={xsi:"http://www.w3.org/2001/XMLSchema-instance"};for(var o in r)r.hasOwnProperty(o)&&(n="xmlns:"+o+"=",RegExp("[< ]"+o+":").test(e)&&-1===e.indexOf(n)&&(e$2e(t)||(t=e.substr(0,e.indexOf("<kml")+4),i=e.substr(t.length)),t+=" "+n+'"'+r[o]+'"'));return e$2e(t)&&(e=t+i),e}function dr$1(e){for(var t,i,n,r=e.indexOf("xmlns:"),o=e.indexOf(">",r);-1!==r&&r<o;)t=e.slice(r,e.indexOf('"',r)),i=r,-1!==(r=e.indexOf(t,r+1))?(n=e.indexOf('"',e.indexOf('"',r)+1),r=(e=e.slice(0,r-1)+e.slice(n+1,e.length)).indexOf("xmlns:",i-1)):r=e.indexOf("xmlns:",i+1);return e}function ct$4(e,t,i){e.getData(new he$a.TextWriter,(function(e){e=dr$1(e=ur$1(e)),t.kml=xe$9.parseFromString(e,"application/xml"),i.resolve()}))}function Ae$b(e,t,i){var n=u$Z(ir$3.detectFromFilename(e.filename),"application/octet-stream");e.getData(new he$a.Data64URIWriter(n),(function(n){t[e.filename]=n,i.resolve()}))}function pr$1(e,t,i,n){for(var r=n.keys,o=new h$16("."),a=e.querySelectorAll(t),s=0;s<a.length;s++){var l=a[s],u=new h$16(l.getAttribute(i)).resolve(o).toString(),c=r.indexOf(u);if(-1!==c){var h=r[c];l.setAttribute(i,n[h]),"a"===t&&null===l.getAttribute("download")&&l.setAttribute("download",h)}}}function vr$1(e,t,i,n){for(var r=e.querySelectorAll(t),o=0;o<r.length;o++){var a=r[o],s=we$6(a.getAttribute(i),n);a.setAttribute(i,s.url)}}function cr$1(e,t,i){var n=W$o(e,"id");n=e$2e(n)&&0!==n.length?n:e$1T(),e$2e(i)&&(n=i+n);var r=t.getById(n);return e$2e(r)&&(n=e$1T(),e$2e(i)&&(n=i+n)),e$2e((r=t.add(new h$W({id:n}))).kml)||(r.addProperty("kml"),r.kml=new Kt$2),r}function ve$a(e,t){return"absolute"===e||"relativeToGround"===e||"relativeToSeaFloor"===t}function fe$a(e,t){if(!e$2e(e))return o$1p.fromDegrees(0,0,0,t);var i=e.match(/[^\s,\n]+/g);if(!e$2e(i))return o$1p.fromDegrees(0,0,0,t);var n=parseFloat(i[0]),r=parseFloat(i[1]),o=parseFloat(i[2]);return n=isNaN(n)?0:n,r=isNaN(r)?0:r,o=isNaN(o)?0:o,o$1p.fromDegrees(n,r,o,t)}function Te$a(e,t){if(e$2e(e)){var i=e.textContent.match(/[^\s\n]+/g);if(e$2e(i)){for(var n=i.length,r=new Array(n),o=0,a=0;a<n;a++)r[o++]=fe$a(i[a],t);return r}}}function hr$1(e,t){if(e$2e(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function W$o(e,t){if(e$2e(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function y$n(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function gr$1(e,t,i){if(e$2e(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function H$u(e,t,i){if(!e$2e(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}function I$v(e,t,i){var n=y$n(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function T$p(e,t,i){var n=y$n(e,t,i);if(e$2e(n))return n.textContent.trim()}function q$m(e,t,i){var n=y$n(e,t,i);if(e$2e(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function we$6(e,t,i){if(e$2e(e)){var n;if(e$2e(i)){var r=i[e=e.replace(/\\/g,"/")];if(e$2e(r))n=new t$10({url:r});else{var o=new h$16(t.getUrlComponent());e$2e(r=i[new h$16(e).resolve(o)])&&(n=new t$10({url:r}))}}return e$2e(n)||(n=e$2e(t)?t.getDerivedResource({url:e}):new t$10({url:e})),n}}Object.defineProperties(Q$l.prototype,{dataSource:{get:function(){return this._dataSource}}}),Q$l.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0},Q$l.prototype.addPromise=function(e){this._promises.push(e)},Q$l.prototype.wait=function(){var e=this._deferred;return this._used||e.resolve(),o$1l.join(e.promise,o$1l.all(this._promises))},Q$l.prototype.process=function(){var e=1===this._stack.length;return e&&(this._started=U$n._getTimestamp()),this._process(e)},Q$l.prototype._giveUpTime=function(){if(!this._timeoutSet){this._timeoutSet=!0,this._timeThreshold=50;var e=this;setTimeout((function(){e._timeoutSet=!1,e._started=U$n._getTimestamp(),e._process(!0)}),0)}},Q$l.prototype._nextNode=function(){var e=this._stack,t=e[e.length-1],i=t.index,n=t.nodes;if(i!==n.length)return++t.index,n[i]},Q$l.prototype._pop=function(){var e=this._stack;return e.pop(),0!==e.length||(this._deferred.resolve(),!1)},Q$l.prototype._process=function(e){for(var t=this.dataSource,i=this._stack[this._stack.length-1].processingData,n=this._nextNode();e$2e(n);){var r=Ue$6[n.localName];if(e$2e(r)&&(-1!==m$n.kml.indexOf(n.namespaceURI)||-1!==m$n.gx.indexOf(n.namespaceURI))&&(r(t,n,i,this),this._timeoutSet||U$n._getTimestamp()>this._started+this._timeThreshold))return void this._giveUpTime();n=this._nextNode()}this._pop()&&e&&this._process(!0)};var G$p={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function Fe$9(e,t){if(e$2e(e)&&!/^\s*$/gm.test(e)){"#"===e[0]&&(e=e.substring(1));var i=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,o=parseInt(e.substring(6,8),16)/255;return t?(o>0?(G$p.maximumRed=o,G$p.red=void 0):(G$p.maximumRed=void 0,G$p.red=0),r>0?(G$p.maximumGreen=r,G$p.green=void 0):(G$p.maximumGreen=void 0,G$p.green=0),n>0?(G$p.maximumBlue=n,G$p.blue=void 0):(G$p.maximumBlue=void 0,G$p.blue=0),G$p.alpha=i,e$1X.fromRandom(G$p)):new e$1X(o,r,n,i)}}function ne$a(e,t,i){var n=T$p(e,t,i);if(e$2e(n))return Fe$9(n,"random"===T$p(e,"colorMode",i))}function ht$3(e){var t=y$n(e,"TimeStamp",m$n.kmlgx),i=T$p(t,"when",m$n.kmlgx);if(e$2e(t)&&e$2e(i)&&0!==i.length){var n=a$15.fromIso8601(i),r=new c$A;return r.addInterval(new d$W({start:n,stop:o$I.MAXIMUM_VALUE})),r}}function gt$4(e){var t=y$n(e,"TimeSpan",m$n.kmlgx);if(e$2e(t)){var i,n=y$n(t,"begin",m$n.kmlgx),r=e$2e(n)?a$15.fromIso8601(n.textContent):void 0,o=y$n(t,"end",m$n.kmlgx),a=e$2e(o)?a$15.fromIso8601(o.textContent):void 0;if(e$2e(r)&&e$2e(a)){if(a$15.lessThan(a,r)){var s=r;r=a,a=s}(i=new c$A).addInterval(new d$W({start:r,stop:a}))}else e$2e(r)?(i=new c$A).addInterval(new d$W({start:r,stop:o$I.MAXIMUM_VALUE})):e$2e(a)&&(i=new c$A).addInterval(new d$W({start:o$I.MINIMUM_VALUE,stop:a}));return i}}function kr$1(){var e=new n$V;return e.width=ee$c,e.height=ee$c,e.scaleByDistance=new o$Y(ar$1,nr$1,or$1,lr$1),e.pixelOffsetScaleByDistance=new o$Y(ar$1,nr$1,or$1,lr$1),e}function Ve$7(){var e=new l$Y;return e.outline=!0,e.outlineColor=e$1X.WHITE,e}function _r$1(){var e=new n$Q;return e.translucencyByDistance=new o$Y(3e6,1,5e6,0),e.distanceDisplayCondition=new r$Z(0,8e4),e.pixelOffset=new o$1o(17,0),e.horizontalOrigin=j$V.LEFT,e.font="16px sans-serif",e.style=R$S.FILL_AND_OUTLINE,e}function xr$2(e,t,i,n,r){var o=T$p(e,"href",m$n.kml);if(e$2e(o)&&0!==o.length){var a=we$6(o,i,n);if(r){var s=T$p(e,"refreshMode",m$n.kml),l=T$p(e,"viewRefreshMode",m$n.kml);"onInterval"===s||"onExpire"===s?e$22("kml-refreshMode-"+s,"KML - Unsupported Icon refreshMode: "+s):("onStop"===l||"onRegion"===l)&&e$22("kml-refreshMode-"+l,"KML - Unsupported Icon viewRefreshMode: "+l);var u=u$Z(T$p(e,"viewBoundScale",m$n.kml),1),c="onStop"===l?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",h=u$Z(T$p(e,"viewFormat",m$n.kml),c),d=T$p(e,"httpQuery",m$n.kml);e$2e(h)&&a.setQueryParameters(m$1c(Le$9(h))),e$2e(d)&&a.setQueryParameters(m$1c(Le$9(d)));var f=t._ellipsoid;return He$8(a,t._camera,t._canvas,u,t._lastCameraView.bbox,f),a}return a}}function kt$3(e,t,i,n,r){var o=I$v(t,"scale",m$n.kml),a=I$v(t,"heading",m$n.kml),s=ne$a(t,"color",m$n.kml),l=y$n(t,"Icon",m$n.kml),u=xr$2(l,e,n,r,!1);e$2e(l)&&!e$2e(u)&&(u=!1);var c,h,d=I$v(l,"x",m$n.gx),f=I$v(l,"y",m$n.gx),p=I$v(l,"w",m$n.gx),_=I$v(l,"h",m$n.gx),m=y$n(t,"hotSpot",m$n.kml),g=hr$1(m,"x"),x=hr$1(m,"y"),y=W$o(m,"xunits"),v=W$o(m,"yunits"),$=i.billboard;e$2e($)||($=kr$1(),i.billboard=$),$.image=u,$.scale=o,$.color=s,(e$2e(d)||e$2e(f)||e$2e(p)||e$2e(_))&&($.imageSubRegion=new f$1a(d,f,p,_)),e$2e(a)&&0!==a&&($.rotation=e$2d.toRadians(-a),$.alignedAxis=o$1p.UNIT_Z),o=u$Z(o,1),e$2e(g)&&("pixels"===y?c=-g*o:"insetPixels"===y?c=(g-ee$c)*o:"fraction"===y&&(c=-g*ee$c*o),c+=.5*ee$c*o),e$2e(x)&&("pixels"===v?h=x*o:"insetPixels"===v?h=(-x+ee$c)*o:"fraction"===v&&(h=x*ee$c*o),h-=.5*ee$c*o),(e$2e(c)||e$2e(h))&&($.pixelOffset=new o$1o(c,h))}function Me$a(e,t,i,n,r){for(var o=0,a=t.childNodes.length;o<a;o++){var s=t.childNodes.item(o);if("IconStyle"===s.localName)kt$3(e,s,i,n,r);else if("LabelStyle"===s.localName){var l=i.label;e$2e(l)||(l=_r$1(),i.label=l),l.scale=u$Z(I$v(s,"scale",m$n.kml),l.scale),l.fillColor=u$Z(ne$a(s,"color",m$n.kml),l.fillColor),l.text=i.name}else if("LineStyle"===s.localName){var u=i.polyline;e$2e(u)||(u=new a$L,i.polyline=u),u.width=I$v(s,"width",m$n.kml),u.material=ne$a(s,"color",m$n.kml),e$2e(ne$a(s,"outerColor",m$n.gx))&&e$22("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),e$2e(I$v(s,"outerWidth",m$n.gx))&&e$22("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),e$2e(I$v(s,"physicalWidth",m$n.gx))&&e$22("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),e$2e(q$m(s,"labelVisibility",m$n.gx))&&e$22("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if("PolyStyle"===s.localName){var c=i.polygon;e$2e(c)||(c=Ve$7(),i.polygon=c),c.material=u$Z(ne$a(s,"color",m$n.kml),c.material),c.fill=u$Z(q$m(s,"fill",m$n.kml),c.fill),c.outline=u$Z(q$m(s,"outline",m$n.kml),c.outline)}else if("BalloonStyle"===s.localName){var h=u$Z(Fe$9(T$p(s,"bgColor",m$n.kml)),e$1X.WHITE),d=u$Z(Fe$9(T$p(s,"textColor",m$n.kml)),e$1X.BLACK),f=T$p(s,"text",m$n.kml);i.addProperty("balloonStyle"),i.balloonStyle={bgColor:h,textColor:d,text:f}}else if("ListStyle"===s.localName){var p=T$p(s,"listItemType",m$n.kml);("radioFolder"===p||"checkOffOnly"===p)&&e$22("kml-listStyle-"+p,"KML - Unsupported ListStyle with listItemType: "+p)}}}function _t$4(e,t,i,n,r){for(var o,a=new h$W,s=-1,l=t.childNodes,u=l.length,c=0;c<u;c++){var h=l[c];("Style"===h.localName||"StyleMap"===h.localName)&&(s=c)}if(-1!==s){var d=l[s];if("Style"===d.localName)Me$a(e,d,a,n,r);else for(var f=H$u(d,"Pair",m$n.kml),p=0;p<f.length;p++){var _=f[p],m=T$p(_,"key",m$n.kml);if("normal"===m){var g=T$p(_,"styleUrl",m$n.kml);if(e$2e(g))e$2e(o=i.getById(g))||(o=i.getById("#"+g)),e$2e(o)&&a.merge(o);else Me$a(e,y$n(_,"Style",m$n.kml),a,n,r)}else e$22("kml-styleMap-"+m,"KML - Unsupported StyleMap key: "+m)}}var x=T$p(t,"styleUrl",m$n.kml);if(e$2e(x)){var y=x;if("#"!==x[0]&&-1!==x.indexOf("#")){var v=x.split("#"),$=v[0];y=n.getDerivedResource({url:$}).getUrlComponent()+"#"+v[1]}e$2e(o=i.getById(y))||(o=i.getById("#"+y)),e$2e(o)&&a.merge(o)}return a}function xt$4(e,t,i){return t.fetchXML().then((function(n){return Tr$1(e,n,i,t,!0)}))}function Tr$1(e,t,i,n,r,o){var a,s,l,u,c=gr$1(t,"Style",m$n.kml);if(e$2e(c)){var h=c.length;for(a=0;a<h;a++)e$2e(s=W$o(u=c[a],"id"))&&(s="#"+s,r&&e$2e(n)&&(s=n.getUrlComponent()+s),e$2e(i.getById(s))||(l=new h$W({id:s}),i.add(l),Me$a(e,u,l,n,o)))}var d=gr$1(t,"StyleMap",m$n.kml);if(e$2e(d)){var f=d.length;for(a=0;a<f;a++){var p=d[a];if(e$2e(s=W$o(p,"id")))for(var _=H$u(p,"Pair",m$n.kml),m=0;m<_.length;m++){var g=_[m],x=T$p(g,"key",m$n.kml);if("normal"===x){if(s="#"+s,r&&e$2e(n)&&(s=n.getUrlComponent()+s),!e$2e(i.getById(s))){l=i.getOrCreateEntity(s);var y=T$p(g,"styleUrl",m$n.kml);if(e$2e(y)){"#"!==y[0]&&(y="#"+y),r&&e$2e(n)&&(y=n.getUrlComponent()+y);var v=i.getById(y);e$2e(v)&&l.merge(v)}else Me$a(e,u=y$n(g,"Style",m$n.kml),l,n,o)}}else e$22("kml-styleMap-"+x,"KML - Unsupported StyleMap key: "+x)}}}var $=[],b=t.getElementsByTagName("styleUrl"),T=b.length;for(a=0;a<T;a++){var C=b[a].textContent;if("#"!==C[0]){var S=C.split("#");if(2===S.length){var w=S[0],E=n.getDerivedResource({url:w});$.push(xt$4(e,E,i))}}}return $}function Be$9(e,t,i){var n=new a$p(e,t.id,["position"]),r=new i$s(t.position);t.polyline=e$2e(i.polyline)?i.polyline.clone():new a$L,t.polyline.positions=new n$n([n,r])}function wr$2(e,t){return!e$2e(e)&&!e$2e(t)||"clampToGround"===e?k$R.CLAMP_TO_GROUND:"relativeToGround"===e?k$R.RELATIVE_TO_GROUND:"absolute"===e?k$R.NONE:"clampToSeaFloor"===t?(e$22("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),k$R.CLAMP_TO_GROUND):"relativeToSeaFloor"===t?(e$22("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),k$R.RELATIVE_TO_GROUND):(e$2e(e)?e$22("kml-altitudeMode-unknown","KML - Unknown <kml:altitudeMode>:"+e+", using <kml:altitudeMode>:CLAMP_TO_GROUND."):e$22("kml-gx:altitudeMode-unknown","KML - Unknown <gx:altitudeMode>:"+t+", using <kml:altitudeMode>:CLAMP_TO_GROUND."),k$R.CLAMP_TO_GROUND)}function Mr$2(e,t,i){return"relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t?e:((e$2e(t)&&"clampToGround"!==t||e$2e(i)&&"clampToSeaFloor"!==i)&&e$22("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+u$Z(t,i)),new i$s(e))}function Tt$3(e,t,i,n){if(e$2e(e)){if("relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t)return e;(e$2e(t)&&"clampToGround"!==t||e$2e(i)&&"clampToSeaFloor"!==i)&&e$22("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+u$Z(t,i));for(var r=e.length,o=0;o<r;o++){var a=e[o];n.scaleToGeodeticSurface(a,a)}return e}}function be$b(e,t,i,n){var r=t.label;e$2e(r)||(r=e$2e(i.label)?i.label.clone():_r$1(),t.label=r),r.text=t.name;var o=t.billboard;e$2e(o)||(o=e$2e(i.billboard)?i.billboard.clone():kr$1(),t.billboard=o),e$2e(o.image)?o.image.getValue()||(o.image=void 0):o.image=e._pinBuilder.fromColor(e$1X.YELLOW,64);var a=1;e$2e(o.scale)&&(0!==(a=o.scale.getValue())?r.pixelOffset=new o$1o(16*a+1,-16):(r.pixelOffset=void 0,r.horizontalOrigin=void 0)),e$2e(n)&&e._clampToGround&&(o.heightReference=n,r.heightReference=n,r.pixelOffset=new o$1o(16*a+1,-16))}function br$1(e,t){var i=e.path;e$2e(i)||((i=new n$P).leadTime=0,e.path=i);var n=t.polyline;e$2e(n)&&(i.material=n.material,i.width=n.width)}function wt$4(e,t,i,n,r){var o=T$p(i,"coordinates",m$n.kml),a=T$p(i,"altitudeMode",m$n.kml),s=T$p(i,"altitudeMode",m$n.gx),l=q$m(i,"extrude",m$n.kml),u=fe$a(o,e._ellipsoid);return n.position=u,be$b(e,n,r,wr$2(a,s)),l&&ve$a(a,s)&&Be$9(t,n,r),!0}function Ir$2(e,t,i,n,r){var o=y$n(i,"coordinates",m$n.kml),a=T$p(i,"altitudeMode",m$n.kml),s=T$p(i,"altitudeMode",m$n.gx),l=q$m(i,"extrude",m$n.kml),u=q$m(i,"tessellate",m$n.kml),c=ve$a(a,s),h=I$v(i,"drawOrder",m$n.gx),d=e._ellipsoid,f=Te$a(o,d),p=r.polyline;if(c&&l){var _=new e$1m;n.wall=_,_.positions=f;var m=r.polygon;e$2e(m)&&(_.fill=m.fill,_.material=m.material),_.outline=!0,e$2e(p)?(_.outlineColor=e$2e(p.material)?p.material.color:e$1X.WHITE,_.outlineWidth=p.width):e$2e(m)&&(_.outlineColor=e$2e(m.material)?m.material.color:e$1X.WHITE)}else if(!e._clampToS3M&&!e._clampToGround||c)e$2e(h)&&e$22("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),p=e$2e(p)?p.clone():new a$L,n.polyline=p,p.positions=Tt$3(f,a,s,d),(!u||c)&&(p.arcType=m$1h.NONE);else{e._clampToS3M&&(n.clampToS3M=!0,n.classificationType=_0x2b86ba.S3M_TILE);var g=new a$L;e._clampToGround&&(g.clampToGround=!0,g.classificationType=e._classificationType),n.polyline=g,g.positions=f,e$2e(p)?(g.material=e$2e(p.material)?p.material.color.getValue(o$I.MINIMUM_VALUE):e$1X.WHITE,g.width=u$Z(p.width,1)):(g.material=e$1X.WHITE,g.width=1),g.zIndex=h}return!0}function Mt$4(e,t,i,n,r){var o=y$n(i,"outerBoundaryIs",m$n.kml),a=y$n(o,"LinearRing",m$n.kml),s=y$n(a,"coordinates",m$n.kml),l=e._ellipsoid,u=Te$a(s,l),c=q$m(i,"extrude",m$n.kml),h=ve$a(T$p(i,"altitudeMode",m$n.kml),T$p(i,"altitudeMode",m$n.gx)),d=e$2e(r.polygon)?r.polygon.clone():Ve$7(),f=r.polyline;if(e$2e(f)&&(d.outlineColor=e$2e(f.material)?f.material.color:e$1X.WHITE,d.outlineWidth=f.width),n.polygon=d,h?(d.perPositionHeight=!0,d.extrudedHeight=c?0:void 0):!e._clampToGround&&!e._clampToS3M&&(d.height=0),e._clampToS3M&&(d.classificationType=_0x2b86ba.S3M_TILE),e._clampToGround&&(d.classificationType=_0x2b86ba.TERRAIN),e$2e(u)){for(var p=new e$1M(u),_=H$u(i,"innerBoundaryIs",m$n.kml),m=0;m<_.length;m++){a=H$u(_[m],"LinearRing",m$n.kml);for(var g=0;g<a.length;g++)e$2e(u=Te$a(s=y$n(a[g],"coordinates",m$n.kml),l))&&p.holes.push(new e$1M(u))}d.hierarchy=p}return!0}function bt$3(e,t,i,n,r){var o=T$p(i,"altitudeMode",m$n.kml),a=T$p(i,"altitudeMode",m$n.gx),s=H$u(i,"coord",m$n.gx),l=H$u(i,"angles",m$n.gx),u=H$u(i,"when",m$n.kml),c=q$m(i,"extrude",m$n.kml),h=ve$a(o,a),d=e._ellipsoid;l.length>0&&e$22("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");for(var f=Math.min(s.length,u.length),p=[],_=[],m=0;m<f;m++){var g=fe$a(s[m].textContent,d);p.push(g),_.push(a$15.fromIso8601(u[m].textContent))}var x=new o$z;return x.addSamples(_,p),n.position=x,be$b(e,n,r,wr$2(o,a)),br$1(n,r),n.availability=new c$A,u.length>0&&n.availability.addInterval(new d$W({start:_[0],stop:_[_.length-1]})),h&&c&&Be$9(t,n,r),!0}function Lr$1(e,t,i,n,r,o,a,s,l){var u=e[0],c=e[e.length-1],h=new o$z;h.addSamples(e,t),i.intervals.addInterval(new d$W({start:u,stop:c,isStartIncluded:l,isStopIncluded:l,data:Mr$2(h,a,s)})),n.addInterval(new d$W({start:u,stop:c,isStartIncluded:l,isStopIncluded:l})),r.intervals.addInterval(new d$W({start:u,stop:c,isStartIncluded:l,isStopIncluded:l,data:o}))}function yr$1(e,t,i,n,r){for(var o,a,s,l=q$m(i,"interpolate",m$n.gx),u=H$u(i,"Track",m$n.gx),c=!1,h=new t$k,d=new c$A,f=new t$p,p=e._ellipsoid,_=0,m=u.length;_<m;_++){var g=u[_],x=H$u(g,"when",m$n.kml),y=H$u(g,"coord",m$n.gx),v=T$p(g,"altitudeMode",m$n.kml),$=T$p(g,"altitudeMode",m$n.gx),b=ve$a(v,$),T=q$m(g,"extrude",m$n.kml),C=Math.min(y.length,x.length),S=[];o=[];for(var w=0;w<C;w++){var E=fe$a(y[w].textContent,p);S.push(E),o.push(a$15.fromIso8601(x[w].textContent))}l&&(e$2e(a)&&Lr$1([a,o[0]],[s,S[0]],f,d,h,!1,"absolute",void 0,!1),a=o[C-1],s=S[S.length-1]),Lr$1(o,S,f,d,h,b&&T,v,$,!0),c=c||b&&T}return n.availability=d,n.position=f,be$b(e,n,r),br$1(n,r),c&&(Be$9(t,n,r),n.polyline.show=h),!0}var Cr$1={Point:wt$4,LineString:Ir$2,LinearRing:Ir$2,Polygon:Mt$4,Track:bt$3,MultiTrack:yr$1,MultiGeometry:It$4,Model:Gt$2},J$h;function It$4(e,t,i,n,r,o){for(var a=i.childNodes,s=!1,l=0,u=a.length;l<u;l++){var c=a.item(l),h=Cr$1[c.localName];if(e$2e(h)){var d=cr$1(c,t,o);d.parent=n,d.name=n.name,d.availability=n.availability,d.description=n.description,d.kml=n.kml,h(e,t,c,d,r)&&(s=!0)}}return s}function Lt$3(e,t){var i=y$n(e,"ExtendedData",m$n.kml);if(e$2e(i)){e$2e(y$n(i,"SchemaData",m$n.kml))&&e$22("kml-schemaData","KML - SchemaData is unsupported"),e$2e(W$o(i,"xmlns:prefix"))&&e$22("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");var n={},r=H$u(i,"Data",m$n.kml);if(e$2e(r))for(var o=r.length,a=0;a<o;a++){var s=r[a],l=W$o(s,"name");e$2e(l)&&(n[l]={displayName:T$p(s,"displayName",m$n.kml),value:T$p(s,"value",m$n.kml)})}t.kml.extendedData=n}}function yt$3(e,t,i,n,r){var o,a,s,l,u=t.kml,c=u.extendedData,h=T$p(e,"description",m$n.kml),d=u$Z(t.balloonStyle,i.balloonStyle),f=e$1X.WHITE,p=e$1X.BLACK,_=h;if(e$2e(d)&&(f=u$Z(d.bgColor,e$1X.WHITE),p=u$Z(d.textColor,e$1X.BLACK),_=u$Z(d.text,h)),e$2e(_)){if(_=(_=(_=(_=(_=(_=_.replace("$[name]",u$Z(t.name,""))).replace("$[description]",u$Z(h,""))).replace("$[address]",u$Z(u.address,""))).replace("$[Snippet]",u$Z(u.snippet,""))).replace("$[id]",t.id)).replace("$[geDirections]",""),e$2e(c)){var m=_.match(/\$\[.+?\]/g);if(null!==m)for(o=0;o<m.length;o++){var g=m[o],x=g.substr(2,g.length-3),y=/\/displayName$/.test(x);e$2e(l=c[x=x.replace(/\/displayName$/,"")])&&(l=y?l.displayName:l.value),e$2e(l)&&(_=_.replace(g,u$Z(l,"")))}}}else if(e$2e(c)&&(s=Object.keys(c)).length>0){for(_='<table class="supermap3d-infoBox-defaultTable supermap3d-infoBox-defaultTable-lighter"><tbody>',o=0;o<s.length;o++)_+="<tr><th>"+u$Z((l=c[a=s[o]]).displayName,a)+"</th><td>"+u$Z(l.value,"")+"</td></tr>";_+="</tbody></table>"}if(e$2e(_)){_=dt$5.link(_),J$h.innerHTML=_;var v=J$h.querySelectorAll("a");for(o=0;o<v.length;o++)v[o].setAttribute("target","_blank");e$2e(n)&&n.keys.length>1&&(pr$1(J$h,"a","href",n),pr$1(J$h,"img","src",n)),vr$1(J$h,"a","href",r),vr$1(J$h,"img","src",r);var $='<div class="supermap3d-infoBox-description-lighter" style="';$+="overflow:auto;",$+="word-wrap:break-word;",$+="background-color:"+f.toCssColorString()+";",$+="color:"+p.toCssColorString()+";",$+='">',$+=J$h.innerHTML+"</div>",J$h.innerHTML="",t.description=$}}function Ie$7(e,t,i){var n=i.entityCollection,r=i.parentEntity,o=i.sourceResource,a=i.uriResolver,s=cr$1(t,n,i.context),l=s.kml,u=_t$4(e,t,i.styleCollection,o,a),c=T$p(t,"name",m$n.kml);s.name=c,s.parent=r;var h=gt$4(t);e$2e(h)||(h=ht$3(t)),s.availability=h,ze$6(s);var d=q$m(t,"visibility",m$n.kml);s.show=function e(t){return!t||t.show&&e(t.parent)}(r)&&u$Z(d,!0);var f=y$n(t,"author",m$n.atom),p=l.author;p.name=T$p(f,"name",m$n.atom),p.uri=T$p(f,"uri",m$n.atom),p.email=T$p(f,"email",m$n.atom);var _=y$n(t,"link",m$n.atom),m=l.link;m.href=W$o(_,"href"),m.hreflang=W$o(_,"hreflang"),m.rel=W$o(_,"rel"),m.type=W$o(_,"type"),m.title=W$o(_,"title"),m.length=W$o(_,"length"),l.address=T$p(t,"address",m$n.kml),l.phoneNumber=T$p(t,"phoneNumber",m$n.kml),l.snippet=T$p(t,"Snippet",m$n.kml),Lt$3(t,s),yt$3(t,s,u,a,o);var g=e._ellipsoid;return Pr$1(t,s,g),Sr$1(t,s,g),e$2e(y$n(t,"Region",m$n.kml))&&e$22("kml-region","KML - Placemark Regions are unsupported"),{entity:s,styleEntity:u}}function Er$2(e,t,i,n){n.addNodes(t.childNodes,i),n.process()}function Ct$3(e,t,i,n){var r=Ie$7(e,t,i),o=l$1f(i);o.parentEntity=r.entity,Er$2(e,t,o,n)}function Et$4(e,t,i,n){for(var r=Ie$7(e,t,i),o=r.entity,a=r.styleEntity,s=!1,l=t.childNodes,u=0,c=l.length;u<c&&!s;u++){var h=l.item(u),d=Cr$1[h.localName];e$2e(d)&&(d(e,i.entityCollection,h,o,a,o.id,i.sourceResource),s=!0)}s||(o.merge(a),be$b(e,o,a))}typeof document<"u"&&(J$h=document.createElement("div"));var St$1={FlyTo:Nt$4,Wait:Ot$3,SoundCue:Ke$4,AnimatedUpdate:Ke$4,TourControl:Ke$4};function Pt$3(e,t,i,n){var r=new l$s(T$p(t,"name",m$n.kml),W$o(t,"id")),o=y$n(t,"Playlist",m$n.gx);if(o)for(var a=e._ellipsoid,s=o.childNodes,l=0;l<s.length;l++){var u=s[l];if(u.localName){var c=St$1[u.localName];c?c(r,u,a):console.log("Unknown KML Tour playlist entry type "+u.localName)}}e$2e(e.kmlTours)||(e.kmlTours=[]),e.kmlTours.push(r)}function Ke$4(e,t){e$22("KML Tour unsupported node "+t.localName)}function Ot$3(e,t){var i=I$v(t,"duration",m$n.gx);e.addPlaylistEntry(new i$r(i))}function Nt$4(e,t,i){var n=I$v(t,"duration",m$n.gx),r=T$p(t,"flyToMode",m$n.gx),o={kml:{}};Pr$1(t,o,i),Sr$1(t,o,i);var a=new a$m(n,r,o.kml.lookAt||o.kml.camera);e.addPlaylistEntry(a)}function Sr$1(e,t,i){var n=y$n(e,"Camera",m$n.kml);if(e$2e(n)){var r=u$Z(I$v(n,"longitude",m$n.kml),0),o=u$Z(I$v(n,"latitude",m$n.kml),0),a=u$Z(I$v(n,"altitude",m$n.kml),0),s=u$Z(I$v(n,"heading",m$n.kml),0),l=u$Z(I$v(n,"tilt",m$n.kml),0),u=u$Z(I$v(n,"roll",m$n.kml),0),c=o$1p.fromDegrees(r,o,a,i),h=i$16.fromDegrees(s,l-90,u);t.kml.camera=new o$w(c,h)}}function Pr$1(e,t,i){var n=y$n(e,"LookAt",m$n.kml);if(e$2e(n)){var r=u$Z(I$v(n,"longitude",m$n.kml),0),o=u$Z(I$v(n,"latitude",m$n.kml),0),a=u$Z(I$v(n,"altitude",m$n.kml),0),s=I$v(n,"heading",m$n.kml),l=I$v(n,"tilt",m$n.kml),u=u$Z(I$v(n,"range",m$n.kml),0);l=e$2d.toRadians(u$Z(l,0));var c=new a$T(s=e$2d.toRadians(u$Z(s,0)),l-e$2d.PI_OVER_TWO,u),h=o$1p.fromDegrees(r,o,a,i);t.kml.lookAt=new o$v(h,c)}}function Dt$4(e,t,i,n){var r,o=Ie$7(e,t,i).entity,a=!1,s=e._ellipsoid,l=Te$a(y$n(t,"LatLonQuad",m$n.gx),s),u=I$v(t,"drawOrder",m$n.kml);if(e$2e(l))(r=Ve$7()).hierarchy=new e$1M(l),r.zIndex=u,o.polygon=r,a=!0;else{(r=new n$N).zIndex=u,o.rectangle=r;var c=y$n(t,"LatLonBox",m$n.kml);if(e$2e(c)){var h=I$v(c,"west",m$n.kml),d=I$v(c,"south",m$n.kml),f=I$v(c,"east",m$n.kml),p=I$v(c,"north",m$n.kml);e$2e(h)&&(h=e$2d.negativePiToPi(e$2d.toRadians(h))),e$2e(d)&&(d=e$2d.clampToLatitudeRange(e$2d.toRadians(d))),e$2e(f)&&(f=e$2d.negativePiToPi(e$2d.toRadians(f))),e$2e(p)&&(p=e$2d.clampToLatitudeRange(e$2d.toRadians(p))),r.coordinates=new h$18(h,d,f,p);var _=I$v(c,"rotation",m$n.kml);if(e$2e(_)){var m=e$2d.toRadians(_);r.rotation=m,r.stRotation=m}}}var g=y$n(t,"Icon",m$n.kml),x=xr$2(g,e,i.sourceResource,i.uriResolver,!0);if(e$2e(x)){a&&e$22("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");var y=I$v(g,"x",m$n.gx),v=I$v(g,"y",m$n.gx),$=I$v(g,"w",m$n.gx),b=I$v(g,"h",m$n.gx);(e$2e(y)||e$2e(v)||e$2e($)||e$2e(b))&&e$22("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),r.material=x,r.material.color=ne$a(t,"color",m$n.kml),r.material.transparent=!0}else r.material=ne$a(t,"color",m$n.kml);var T=T$p(t,"altitudeMode",m$n.kml);e$2e(T)?"absolute"===T?(r.height=I$v(t,"altitude",m$n.kml),r.zIndex=void 0):"clampToGround"!==T&&e$22("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+T):"relativeToSeaFloor"===(T=T$p(t,"altitudeMode",m$n.gx))?(e$22("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),r.height=I$v(t,"altitude",m$n.kml),r.zIndex=void 0):"clampToSeaFloor"===T?e$22("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):e$2e(T)&&e$22("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+T)}function We$5(e,t,i,n){e._unsupportedNode.raiseEvent(e,i.parentEntity,t,i.entityCollection,i.styleCollection,i.sourceResource,i.uriResolver),e$22("kml-unsupportedFeature-"+t.nodeName,"KML - Unsupported feature: "+t.nodeName)}var re$d={INTERVAL:0,EXPIRE:1,STOP:2};function Le$9(e){if(!e$2e(e)||0===e.length)return"";var t=e[0];return("&"===t||"?"===t)&&(e=e.substring(1)),e}var Rt$5=new h$18,ue$a=new a$18,Ge$5=new o$1o,Ut$3=new o$1p;function He$8(e,t,i,n,r,o){function a(e){return e<-e$2d.PI_OVER_TWO?-e$2d.PI_OVER_TWO:e>e$2d.PI_OVER_TWO?e$2d.PI_OVER_TWO:e}function s(e){return e>e$2d.PI?e-e$2d.TWO_PI:e<-e$2d.PI?e+e$2d.TWO_PI:e}var l=m$1d(e.queryParameters);if(l=l.replace(/%5B/g,"[").replace(/%5D/g,"]"),e$2e(t)&&t._mode!==C$14.MORPHING){var u,c;if(r=u$Z(r,Rt$5),e$2e(i)&&(Ge$5.x=.5*i.clientWidth,Ge$5.y=.5*i.clientHeight,u=t.pickEllipsoid(Ge$5,o,Ut$3)),e$2e(u)?c=o.cartesianToCartographic(u,ue$a):(c=h$18.center(r,ue$a),u=o.cartographicToCartesian(c)),e$2e(n)&&!e$2d.equalsEpsilon(n,1,e$2d.EPSILON9)){var h=r.width*n*.5,d=r.height*n*.5;r=new h$18(s(c.longitude-h),a(c.latitude-d),s(c.longitude+h),a(c.latitude+d))}l=(l=(l=(l=l.replace("[bboxWest]",e$2d.toDegrees(r.west).toString())).replace("[bboxSouth]",e$2d.toDegrees(r.south).toString())).replace("[bboxEast]",e$2d.toDegrees(r.east).toString())).replace("[bboxNorth]",e$2d.toDegrees(r.north).toString());var f=e$2d.toDegrees(c.longitude).toString(),p=e$2d.toDegrees(c.latitude).toString();l=(l=(l=(l=(l=(l=(l=(l=l.replace("[lookatLon]",f)).replace("[lookatLat]",p)).replace("[lookatTilt]",e$2d.toDegrees(t.pitch).toString())).replace("[lookatHeading]",e$2d.toDegrees(t.heading).toString())).replace("[lookatRange]",o$1p.distance(t.positionWC,u))).replace("[lookatTerrainLon]",f)).replace("[lookatTerrainLat]",p)).replace("[lookatTerrainAlt]",c.height.toString()),o.cartesianToCartographic(t.positionWC,ue$a),l=(l=(l=l.replace("[cameraLon]",e$2d.toDegrees(ue$a.longitude).toString())).replace("[cameraLat]",e$2d.toDegrees(ue$a.latitude).toString())).replace("[cameraAlt]",e$2d.toDegrees(ue$a.height).toString());var _=t.frustum,m=_.aspectRatio,g="",x="";if(e$2e(m)){var y=e$2d.toDegrees(_.fov);m>1?(g=y,x=y/m):(x=y,g=y*m)}l=(l=l.replace("[horizFov]",g.toString())).replace("[vertFov]",x.toString())}else l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=l.replace("[bboxWest]","-180")).replace("[bboxSouth]","-90")).replace("[bboxEast]","180")).replace("[bboxNorth]","90")).replace("[lookatLon]","")).replace("[lookatLat]","")).replace("[lookatRange]","")).replace("[lookatTilt]","")).replace("[lookatHeading]","")).replace("[lookatTerrainLon]","")).replace("[lookatTerrainLat]","")).replace("[lookatTerrainAlt]","")).replace("[cameraLon]","")).replace("[cameraLat]","")).replace("[cameraAlt]","")).replace("[horizFov]","")).replace("[vertFov]","");e$2e(i)?l=(l=l.replace("[horizPixels]",i.clientWidth)).replace("[vertPixels]",i.clientHeight):l=(l=l.replace("[horizPixels]","")).replace("[vertPixels]",""),l=(l=(l=(l=(l=l.replace("[terrainEnabled]","1")).replace("[clientVersion]","1")).replace("[kmlVersion]","2.2")).replace("[clientName]","SuperMap3D")).replace("[language]","English"),e.setQueryParameters(m$1c(l))}function At$3(e,t,i,n){var r=Ie$7(e,t,i).entity,o=i.sourceResource,a=i.uriResolver,s=y$n(t,"Link",m$n.kml);if(e$2e(s)||(s=y$n(t,"Url",m$n.kml)),e$2e(s)){var l,u,c=T$p(s,"href",m$n.kml);if(e$2e(c)){var h=c;if(c=we$6(c,o,i.uriResolver),/^data:/.test(c.getUrlComponent()))/\.kmz/i.test(o.getUrlComponent())||(h=o.getDerivedResource({url:h}));else{h=c.clone(),l=T$p(s,"viewRefreshMode",m$n.kml),u=u$Z(T$p(s,"viewBoundScale",m$n.kml),1);var d="onStop"===l?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",f=u$Z(T$p(s,"viewFormat",m$n.kml),d),p=T$p(s,"httpQuery",m$n.kml);e$2e(f)&&c.setQueryParameters(m$1c(Le$9(f))),e$2e(p)&&c.setQueryParameters(m$1c(Le$9(p)));var _=e._ellipsoid;He$8(c,e._camera,e._canvas,u,e._lastCameraView.bbox,_)}var m={sourceUri:h,uriResolver:a,context:r.id},g=new r$v,x=qe$2(e,g,c,m).then((function(t){var i=e._entityCollection,n=g.values;i.suspendEvents();for(var o=0;o<n.length;o++){var a=n[o];e$2e(a.parent)||(a.parent=r,ze$6(a)),i.add(a)}i.resumeEvents();var h=T$p(s,"refreshMode",m$n.kml),d=u$Z(I$v(s,"refreshInterval",m$n.kml),0);if("onInterval"===h&&d>0||"onExpire"===h||"onStop"===l){var f=y$n(t,"NetworkLinkControl",m$n.kml),p=e$2e(f),_=a$15.now(),m={id:e$1T(),href:c,cookie:{},lastUpdated:_,updating:!1,entity:r,viewBoundScale:u,needsUpdate:!1,cameraUpdateTime:_},x=0;if(p&&(m.cookie=m$1c(u$Z(T$p(f,"cookie",m$n.kml),"")),x=u$Z(I$v(f,"minRefreshPeriod",m$n.kml),0)),"onInterval"===h)p&&(d=Math.max(x,d)),m.refreshMode=re$d.INTERVAL,m.time=d;else if("onExpire"===h){var y;if(p&&(y=T$p(f,"expires",m$n.kml)),e$2e(y))try{var v=a$15.fromIso8601(y),$=a$15.secondsDifference(v,_);$>0&&$<x&&a$15.addSeconds(_,x,v),m.refreshMode=re$d.EXPIRE,m.time=v}catch{e$22("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else e$22("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else e._camera?(m.refreshMode=re$d.STOP,m.time=u$Z(I$v(s,"viewRefreshTime",m$n.kml),0)):e$22("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires a camera be passed in when creating the KmlDataSource");e$2e(m.refreshMode)&&e._networkLinks.set(m.id,m)}else"onRegion"===l&&e$22("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion")})).otherwise((function(t){e$22("An error occured during loading "+c.url),e._error.raiseEvent(e,t)}));n.addPromise(x)}}}function Ft$4(e,t,i,n){var r=Ue$6[t.localName];return e$2e(r)?r(e,t,i,n):We$5(e,t,i)}function ye$8(e,t,i,n,r,o){t.removeAll();var a=i.documentElement,s=T$p("Document"===a.localName?a:y$n(a,"Document",m$n.kml),"name",m$n.kml);e$2e(s)||(s=f$Q(n.getUrlComponent())),e$2e(e._name)||(e._name=s);var l=new U$n._DeferredLoading(e),u=new r$v(e);return o$1l.all(Tr$1(e,i,u,n,!1,r)).then((function(){var a=i.documentElement;if("kml"===a.localName)for(var s=a.childNodes,c=0;c<s.length;c++){var h=s[c];if(e$2e(Ue$6[h.localName])){a=h;break}}var d={parentEntity:void 0,entityCollection:t,styleCollection:u,sourceResource:n,uriResolver:r,context:o};return t.suspendEvents(),Ft$4(e,a,d,l),t.resumeEvents(),l.wait().then((function(){return i.documentElement}))}))}function Vt$4(e,t,i,n){var r=o$1l.defer();return he$a.createReader(new he$a.BlobReader(i),(function(i){i.getEntries((function(o){for(var a,s,l=[],u={},c=0;c<o.length;c++){var h=o[c];if(!h.directory){var d=o$1l.defer();l.push(d.promise),!/\.kml$/i.test(h.filename)||e$2e(a)&&/\//i.test(h.filename)?Ae$b(h,u,d):(e$2e(a)&&Ae$b(a,u,s),a=h,s=d)}}e$2e(a)&&ct$4(a,u,s),o$1l.all(l).then((function(){if(i.close(),e$2e(u.kml))return u.keys=Object.keys(u),ye$8(e,t,u.kml,n,u);r.reject(new t$13("KMZ file does not contain a KML document."))})).then(r.resolve).otherwise(r.reject)}))}),(function(e){r.reject(e)})),r.promise}function qe$2(e,t,i,n){var r=(n=u$Z(n,u$Z.EMPTY_OBJECT)).sourceUri,o=n.uriResolver,a=n.context,s=i;if("string"==typeof i||i instanceof t$10){s=(i=t$10.createIfNeeded(i)).fetchBlob(),r=u$Z(r,i.clone());var l=e._resourceCredits,u=i.credits;if(e$2e(u))for(var c=u.length,h=0;h<c;h++)l.push(u[h])}else r=u$Z(r,t$10.DEFAULT.clone());return r=t$10.createIfNeeded(r),o$1l(s).then((function(i){return i instanceof Blob?vt$3(i).then((function(n){return n?Vt$4(e,t,i,r):fr$1(i).then((function(i){var n,s;i=dr$1(i=ur$1(i));try{n=xe$9.parseFromString(i,"application/xml")}catch(e){s=e.toString()}if(e$2e(s)||n.body||"parsererror"===n.documentElement.tagName){var l=e$2e(s)?s:n.documentElement.firstChild.nodeValue;throw l||(l=n.body.innerText),new t$13(l)}return ye$8(e,t,n,r,o,a)}))})):ye$8(e,t,i,r,o,a)})).otherwise((function(t){return e._error.raiseEvent(e,t),console.log(t),o$1l.reject(t)}))}function U$n(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).camera,i=e.canvas;if(!e$2e(t))throw new t$15("options.camera is required.");if(!e$2e(i))throw new t$15("options.canvas is required.");this._changed=new o$1h,this._error=new o$1h,this._loading=new o$1h,this._refresh=new o$1h,this._unsupportedNode=new o$1h,this._clock=void 0,this._entityCollection=new r$v(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new s$A,this._networkLinks=new e$1Q,this._entityCluster=new a$r,this._canvas=i,this._camera=t,this._lastCameraView={position:e$2e(t)?o$1p.clone(t.positionWC):void 0,direction:e$2e(t)?o$1p.clone(t.directionWC):void 0,up:e$2e(t)?o$1p.clone(t.upWC):void 0,bbox:e$2e(t)?t.computeViewRectangle():h$18.clone(h$18.MAX_VALUE)},this._ellipsoid=u$Z(e.ellipsoid,t$12.WGS84),this._visibleViewport=4095;var n=e.credit;"string"==typeof n&&(n=new r$U(n)),this._credit=n,this._resourceCredits=[]}function ze$6(e){var t=e.parent;if(e$2e(t)){var i=t.availability;if(e$2e(i)){var n=e.availability;e$2e(n)?n.intersect(i):e.availability=i}}}function Bt$5(e,t,i,n,r){return function(o){if(n.contains(t.id)){var a=!1,s=y$n(o,"NetworkLinkControl",m$n.kml),l=0;if(e$2e(s)){if(e$2e(y$n(s,"Update",m$n.kml)))return e$22("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,void n.remove(t.id);t.cookie=m$1c(u$Z(T$p(s,"cookie",m$n.kml),"")),l=u$Z(I$v(s,"minRefreshPeriod",m$n.kml),0)}var u=a$15.now(),c=t.refreshMode;if(c===re$d.INTERVAL)e$2e(s)&&(t.time=Math.max(l,t.time));else if(c===re$d.EXPIRE){var h;if(e$2e(s)&&(h=T$p(s,"expires",m$n.kml)),e$2e(h))try{var d=a$15.fromIso8601(h),f=a$15.secondsDifference(d,u);f>0&&f<l&&a$15.addSeconds(u,l,d),t.time=d}catch{e$22("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),a=!0}else e$22("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),a=!0}var p=t.entity,_=e._entityCollection,m=i.values;_.suspendEvents();var g,x=_.values.slice();for(g=0;g<x.length;++g){var y=x[g];y.parent===p&&(y.parent=void 0,E(y))}for(_.resumeEvents(),_.suspendEvents(),g=0;g<m.length;g++){var v=m[g];e$2e(v.parent)||(v.parent=p,ze$6(v)),_.add(v)}_.resumeEvents(),a?n.remove(t.id):t.lastUpdated=u;var $=_.computeAvailability(),b=$.start,T=$.stop,C=a$15.equals(b,o$I.MINIMUM_VALUE),S=a$15.equals(T,o$I.MAXIMUM_VALUE);if(!C||!S){var w=e._clock;(w.startTime!==b||w.stopTime!==T)&&(w.startTime=b,w.stopTime=T,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,r.getUrlComponent(!0))}function E(e){_.remove(e);for(var t=e._children,i=t.length,n=0;n<i;++n)E(t[n])}}}U$n.load=function(e,t){return new U$n(t=u$Z(t,u$Z.EMPTY_OBJECT)).load(e,t)},Object.defineProperties(U$n.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},s3mInstanceCollection:{get:function(){return this._s3mInstanceCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!e$2e(e))throw new t$15("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),U$n.prototype.load=function(e,t){if(!e$2e(e))throw new t$15("data is required.");t=u$Z(t,u$Z.EMPTY_OBJECT),o$B.setLoading(this,!0);var i=this._name;this._name=void 0,this._clampToGround=u$Z(t.clampToGround,!1),this._clampToS3M=u$Z(t.clampToS3M,!1),this._classificationType=u$Z(t.classificationType,_0x2b86ba.TERRAIN);var n=this;return qe$2(this,this._entityCollection,e,t).then((function(){var e,t,r=n._entityCollection.computeAvailability(),o=r.start,a=r.stop,s=a$15.equals(o,o$I.MINIMUM_VALUE),l=a$15.equals(a,o$I.MAXIMUM_VALUE);s&&l||(s&&((t=new Date).setHours(0,0,0,0),o=a$15.fromDate(t)),l&&((t=new Date).setHours(24,0,0,0),a=a$15.fromDate(t)),(e=new e$z).startTime=o,e.stopTime=a,e.currentTime=a$15.clone(o),e.clockRange=tt$a.LOOP_STOP,e.clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER,e.multiplier=Math.round(Math.min(Math.max(a$15.secondsDifference(a,o)/60,1),31556900)));var u=!1;return e!==n._clock&&(n._clock=e,u=!0),i!==n._name&&(u=!0),u&&n._changed.raiseEvent(n),o$B.setLoading(n,!1),n})).otherwise((function(e){return o$B.setLoading(n,!1),n._error.raiseEvent(n,e),console.log(e),o$1l.reject(e)}))};var je$6=new e$1Q;function Kt$2(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}function Wt$4(e,t,i,n){var r=(n=u$Z(n,u$Z.EMPTY_OBJECT)).sourceUri;return o$1l(fr$1(i)).then((function(i){var n,o;try{n=xe$9.parseFromString(i,"application/xml")}catch(e){o=e.toString()}if(e$2e(o)||n.body||"parsererror"===n.documentElement.tagName){var a=e$2e(o)?o:n.documentElement.firstChild.nodeValue;throw a||(a=n.body.innerText),new t$13(a)}return ye$8(e,t,n,r,void 0)}))}function Gt$2(e,t,i,n,r,o,a,s){var l,u=y$n(i,"Location",m$n.kml),c=T$p(i,"altitudeMode",m$n.kml),h=T$p(i,"altitudeMode",m$n.gx),d=y$n(i,"Orientation",m$n.kml),f=I$v(d,"heading",m$n.kml),p=I$v(d,"tilt",m$n.kml),_=I$v(d,"roll",m$n.kml),m=y$n(i,"Scale",m$n.kml),g=I$v(m,"x",m$n.kml),x=I$v(m,"y",m$n.kml),y=I$v(m,"z",m$n.kml),v=T$p(y$n(i,"Link",m$n.kml),"href",m$n.kml);if(e$2e(s)&&(l=s[v]),-1!==(v=we$6(v,a,s)).url.indexOf(".s3m")){e$2e(e._s3mInstanceCollection)||(e._s3mInstanceCollection=new _0xd633a7(e._camera._scene.context),e._camera._scene.primitives.add(e._s3mInstanceCollection));var $=fe$a(T$p(u,"longitude",m$n.kml)+","+T$p(u,"latitude",m$n.kml)+","+T$p(u,"altitude",m$n.kml)),b=-e$2d.toRadians(f),T=e$2d.toRadians(p),C=e$2d.toRadians(_);return e._s3mInstanceCollection.add(v.url,[{position:$,scale:new o$1p(g,x,y),hpr:new i$16(b,T,C)}]),!0}var S=y$n(u,"MultiTrack",m$n.gx);if(e$2e(S))r.billboard=new n$V({show:!1}),r.label=new n$Q({show:!1}),yr$1(e,t,S,n,r),n.orientation=new e$w(n.position);else{$=fe$a(T$p(u,"longitude",m$n.kml)+","+T$p(u,"latitude",m$n.kml)+","+T$p(u,"altitude",m$n.kml));n.position=Mr$2(new r$V($),c,h);var w=m$19.headingPitchRollQuaternion($,i$16.fromDegrees(f,p,_));n.orientation=w}return n.model={uri:v.url,minimumPixelSize:16,maximumScale:16,scale:new o$1p(g,x,y),blob:l},!0}U$n.prototype.update=function(e){var t=this._networkLinks;if(0===t.length)return!0;var i=a$15.now(),n=this;function r(e){for(var t=e._children,i=t.length,n=0;n<i;++n){var o=t[n];je$6.set(o.id,o),r(o)}}je$6.removeAll();var o=!1,a=this._lastCameraView,s=this._camera;e$2e(s)&&!(s.positionWC.equalsEpsilon(a.position,e$2d.EPSILON7)&&s.directionWC.equalsEpsilon(a.direction,e$2d.EPSILON7)&&s.upWC.equalsEpsilon(a.up,e$2d.EPSILON7))&&(a.position=o$1p.clone(s.positionWC),a.direction=o$1p.clone(s.directionWC),a.up=o$1p.clone(s.upWC),a.bbox=s.computeViewRectangle(),o=!0);var l=new e$1Q,u=!1;return t.values.forEach((function(e){var t=e.entity;if(!je$6.contains(t.id)){if(!e.updating){var s=!1;if(e.refreshMode===re$d.INTERVAL?a$15.secondsDifference(i,e.lastUpdated)>e.time&&(s=!0):e.refreshMode===re$d.EXPIRE?a$15.greaterThan(i,e.time)&&(s=!0):e.refreshMode===re$d.STOP&&(o&&(e.needsUpdate=!0,e.cameraUpdateTime=i),e.needsUpdate&&a$15.secondsDifference(i,e.cameraUpdateTime)>=e.time&&(s=!0)),s){r(t),e.updating=!0;var c=new r$v,h=e.href.clone();h.setQueryParameters(e.cookie);var d=u$Z(n._ellipsoid,t$12.WGS84);He$8(h,n._camera,n._canvas,e.viewBoundScale,a.bbox,d),qe$2(n,c,h,{context:t.id}).then(Bt$5(n,e,c,l,h)).otherwise((function(t){var i="NetworkLink "+e.href+" refresh failed: "+t;console.log(i),n._error.raiseEvent(n,i)})),u=!0}}l.set(e.id,e)}})),u&&(this._networkLinks=l,this._changed.raiseEvent(this)),!0},U$n.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},U$n.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport,e$2e(this._s3mInstanceCollection)&&this._s3mInstanceCollection.setVisibleInViewport(e,t)},U$n.importFile=function(e,t){return new U$n(t=u$Z(t,u$Z.EMPTY_OBJECT)).read(e,t)},U$n.prototype.read=function(e,t){if(!e$2e(e))throw new t$15("data is required.");o$B.setLoading(this,!0);var i=this._name;this._name=void 0,this._promises=[];var n=this;return Wt$4(this,this._entityCollection,e,t).then((function(){return o$1l.all(n._promises,(function(){var e,t,r=n._entityCollection.computeAvailability(),o=r.start,a=r.stop,s=a$15.equals(o,o$I.MINIMUM_VALUE),l=a$15.equals(a,o$I.MAXIMUM_VALUE);s&&l||(s&&((t=new Date).setHours(0,0,0,0),o=a$15.fromDate(t)),l&&((t=new Date).setHours(24,0,0,0),a=a$15.fromDate(t)),(e=new e$z).startTime=o,e.stopTime=a,e.currentTime=a$15.clone(o),e.clockRange=tt$a.LOOP_STOP,e.clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER,e.multiplier=Math.round(Math.min(Math.max(a$15.secondsDifference(a,o)/60,1),31556900)));var u=!1;return e!==n._clock&&(n._clock=e,u=!0),i!==n._name&&(u=!0),u&&n._changed.raiseEvent(n),o$B.setLoading(n,!1),n._promises=void 0,n}))})).otherwise((function(e){return o$B.setLoading(n,!1),n._error.raiseEvent(n,e),console.log(e),o$1l.reject(e)}))},U$n._DeferredLoading=Q$l,U$n._getTimestamp=Et$c;var a$l=e$1X.WHITE,h$q=e$1X.BLACK,s$j=1;function e$v(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._definitionChanged=new o$1h,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth,this.vtime=3.14*Math.random(),this._bAsy=u$Z(e.bAsy,!0),this._speedRatio=u$Z(e.speedRatio,1)}function r$r(){t$15.throwInstantiationError()}Object.defineProperties(e$v.prototype,{isConstant:{get:function(){return r$_.isConstant(this._color)&&r$_.isConstant(this._outlineColor)&&r$_.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:C$10("color"),outlineColor:C$10("outlineColor"),outlineWidth:C$10("outlineWidth")}),e$v.prototype.getType=function(e){return"PolylineDynamic"},e$v.prototype.getValue=function(e,t){return e$2e(t)||(t={}),t.color=r$_.getValueOrClonedDefault(this._color,e,a$l,t.color),t.outlineColor=r$_.getValueOrClonedDefault(this._outlineColor,e,h$q,t.outlineColor),t.outlineWidth=r$_.getValueOrDefault(this._outlineWidth,e,s$j),t.bAsy=1==this._bAsy?1:0,t.v_time=618e-6*performance.now()-1.9788000000000001-this.vtime,t.v_time*=this._speedRatio,t},e$v.prototype.equals=function(e){return this===e||e instanceof e$v&&r$_.equals(this._color,e._color)&&r$_.equals(this._outlineColor,e._outlineColor)&&r$_.equals(this._outlineWidth,e._outlineWidth)},r$r.prototype.update=t$15.throwInstantiationError,r$r.prototype.getBoundingSphere=t$15.throwInstantiationError,r$r.prototype.isDestroyed=t$15.throwInstantiationError,r$r.prototype.destroy=t$15.throwInstantiationError;var e$u={StopPause:"StopPause",StopAround:"StopAround"},A$s=Object.freeze(e$u);function e$t(e){this._duration=u$Z(e.duration,10),this._waitTime=u$Z(e.waitTime,0),this._point=e.point,this._heading=u$Z(e.heading,0),this._tilt=u$Z(e.tilt,0),this._stopName=e.stopName,this._speed=u$Z(e.speed,0),this._stopPlayMode=e.stopPlayMode||A$s.StopPause,this._surroundDuration=u$Z(e.surroundDuration,0),this._promise=void 0,this._index=u$Z(e.index,0),this._nextStopIndex=void 0,this._preStopIndex=void 0,this._isConvert=u$Z(e.isConvert,!0)}Object.defineProperties(e$t.prototype,{duration:{get:function(){return this._duration},set:function(e){e&&(this._duration=e)}},waitTime:{get:function(){return this._waitTime},set:function(e){e&&!this._isGenerated&&(this._waitTime=e)}},heading:{get:function(){return this._heading},set:function(e){e&&(this._heading=e)}},tilt:{get:function(){return this._tilt},set:function(e){e&&(this._tilt=e)}},stopName:{get:function(){return this._stopName},set:function(e){e&&(this._stopName=e)}},point:{get:function(){return this._point},set:function(e){this._point=e}},speed:{get:function(){return this._speed},set:function(e){e&&(this._speed=e)}},stopPlayMode:{get:function(){return this._stopPlayMode},set:function(e){e&&(this._stopPlayMode=e)}},surroundDuration:{get:function(){return this._surroundDuration},set:function(e){e&&(this._surroundDuration=e)}},index:{get:function(){return this._index}},promise:{get:function(){return this._promise},set:function(e){e&&(this._promise=e)}}});var e$s={Smoothly:0,Directly:1},v$p=Object.freeze(e$s),n$l={Playing:0,Pause:1,Stop:2,Wait:3},m$m;function l$r(e){var t=e.scene,i=e.routes;if(!t)throw new t$15("scene is required!");if(!i)throw new t$15("routes is required!");this._routes=i,this._scene=t,this._currentStopIndex=0,this._dynamicCurrentStopIndex=0,this._currentTween=void 0,this._stopArrived=new o$1h,this._playRate=1,this._flyStatus=n$l.Stop,this._turningMode=v$p.Smoothly,this._interpolationMode=j$16.NONE}function c$j(e,t,i){e._flyStatus=n$l.Playing;var n=e._scene.camera,r=e._routes.routes[0],o=r._catmullRomSpline,a=e._interpolationMode,s=r.isFlyLoop,l=r.isHeadingFree,u=r.isTiltFree,c=r.isAltitudeFree,h=u$Z(r._stopCollection.get(t),r._stopCollection._array[t]);if(!h)return!0===s?(t=r._stopCollection._array[0].index,e$2e(o)&&(o._lastTimeIndex=0),e._dynamicCurrentStopIndex=t,e.currentStopIndex=t,void c$j(e,t)):void(e._flyStatus=n$l.Stop);if(t===e.currentStopIndex){var d=r.isAlongline&&e$2e(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};n.setView({destination:h.point,orientation:d,convert:h._isConvert}),t++,c$j(e,t)}else{if(h._bImmediately){d=r.isAlongline&&e$2e(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};return n.setView({destination:h.point,orientation:d,convert:h._isConvert}),void g$w(e,h,t)}var f=u$Z(r._stopCollection.get(t-1),r._stopCollection.get(h._preStopIndex));e$2e(i)&&(f=i);var p,_=f.altitude<h.altitude?f.altitude:h.altitude;if(f.stopPlayMode===A$s.StopAround)p=f.surroundDuration;else{if(e$2e(i)){var m=o$1p.distance(i.point,h.point);f.duration=m/f.speed}p=f.duration}p/=e._playRate;d=r.isAlongline&&e$2e(h.direction)&&!u?{direction:h.direction,up:h.up}:{heading:h.heading,pitch:h.tilt,roll:0};var g=!1;if(e._turningMode===v$p.Directly&&e$2e(f.direction)){d={direction:f.direction,up:f.up};g=!0}n.flyTo({convert:h._isConvert,destination:h.point,orientation:d,maximumHeight:_,duration:p,headingFree:l,pitchFree:u,altitudeFree:c,directTurning:g,catmullRomSpline:o,preStopIndex:t-1,interpolationMode:a,easingFunction:m$Y.LINEAR_NONE,complete:function(){g$w(e,h,t)}})}}function g$w(e,t,i){if(m$m&&clearTimeout(m$m),e._dynamicCurrentStopIndex=t._index,i=u$Z(t._nextStopIndex,t._index+1),e._stopArrived.raiseEvent(t),t.promise)o$1l(t.promise,(function(){var n=t.waitTime;n>0?setTimeout((function(){c$j(e,i)}),1e3*n):c$j(e,i)}));else{var n=t.waitTime;n>0?(e._flyStatus=n$l.Wait,m$m=setTimeout((function(){e._flyStatus===n$l.Wait&&(e._flyStatus=n$l.Playing,c$j(e,i))}),1e3*n)):c$j(e,i)}}function f$p(e){e=e||{},this._stopCollection=new e$1Q,this._isStopVisible=u$Z(e.isStopVisible,!1),this._stopMarkCollection=[],this._isFlyLoop=u$Z(e.isFlyLoop,!1),this._isLineVisible=u$Z(e.isLineVisible,!1),this._lineEntity=void 0,this._routeName=u$Z(e.routeName,""),this._speed=u$Z(e.speed,50),this._isAlongline=u$Z(e.isAlongline,!1),this._totalDuration=u$Z(e.totalDuration,0),this._isHeadingFree=!this._isAlongline&&u$Z(e.isHeadingFree,!1),this._isTiltFree=u$Z(e.isTiltFree,!1),this._isAltitudeFree=u$Z(e.isAltitudeFree,!1),this._entityCollection=e.entityCollection,this._catmullRomSpline=void 0,this._isCleared=!1,this._stopsInfo=u$Z(e.stopsInfo,{}),this._removeIndex=[],this._addedStops=[]}function d$x(e){this._entityCollection=e,this._routes=[],this._ready=!1,this._readyPromise=o$1l.defer()}function p$i(e,t){for(var i=e,n=t.firstChild,r=n.namespaceURI,o=h$p(n,"route",r),a=0,s=o.length;a<s;a++){var l=o[a],u=h$p(l,"routestop",r),c=I$u(l,"speed"),h=O$j(l,"name"),d=l$q(l,"showroutestop"),f=l$q(l,"showrouteline"),p=l$q(l,"flycircle"),_=l$q(l,"alongline"),m=l$q(l,"headingfree"),g=l$q(l,"tiltfree"),x=l$q(l,"altitudefree"),y=new f$p({entityCollection:i._entityCollection,routeName:h,speed:c,isLineVisible:f,isFlyLoop:p,isStopVisible:d,isAlongline:_,isHeadingFree:m,isTiltFree:g,isAltitudeFree:x,stopsInfo:{stopNodes:u,namespace:r}});y.init(),i.addRoute(y),i._ready=!0}i._readyPromise.resolve()}function I$u(e,t){if(e$2e(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function O$j(e,t){if(e$2e(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function l$q(e,t){if(e$2e(e)){var i=e.getAttribute(t);if("false"===(i=i.toLowerCase()))return!1;if("true"===i)return!0}}function h$p(e,t,i){if(!e$2e(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}function o$u(){this.Name="",this.NumParts=0,this.NumPoints=0,this.Parts=[],this.Points=[],this.Description="",this.Color=new e$1X(1,1,1),this.Radius=.02}function z$o(e,t){this.a0=80,this.r=35.187*.001,e$2e(t)?(this.a0=e,this.r=t,this.m_sag=new d$w(e,t)):e$2e(e)&&(this.m_sag=new d$w(e)),this.enuCenters=[]}Object.defineProperties(l$r.prototype,{routes:{get:function(){return this._routes},set:function(e){e&&(this._routes=e)}},stopArrived:{get:function(){return this._stopArrived}},currentStopIndex:{get:function(){return e$2e(this._routes.routes[0]._stopCollection.get(this._currentStopIndex))||(this._dynamicCurrentStopIndex=this._currentStopIndex=this._routes.routes[0]._stopCollection._array[0].index),this._currentStopIndex},set:function(e){if(e$2e(e)&&1==this._routes.ready){var t=this._routes.routes[0].stopCollection.length-1;e=(e=e>t?t:e)<0?0:e,this._currentStopIndex=e}}},currentRoute:{get:function(){if(this._routes.ready)return this._routes.routes[0]}},readyPromise:{get:function(){return this._routes.readyPromise}},playRate:{get:function(){return this._playRate},set:function(e){if(e&&0!==e&&this._playRate!==e&&(this._playRate=e,this._flyStatus===n$l.Playing)){this._scene.camera.cancelFlight();var t=this._routes.routes[0].get(this._dynamicCurrentStopIndex),i=new e$t({});for(var n in t)i[n]=t[n];i.point=this._scene.camera._position,c$j(this,this._dynamicCurrentStopIndex+1,i)}}},turningMode:{get:function(){return this._turningMode},set:function(e){this._turningMode=e}},interpolationMode:{get:function(){return this._interpolationMode},set:function(e){this._interpolationMode=e}}}),l$r.prototype.play=function(){if(this.currentRoute&&this._flyStatus!==n$l.Playing)if(this._flyStatus===n$l.Pause||this._flyStatus===n$l.Wait)this._currentTween&&this._scene.camera._currentFlight?(this._currentTween.tweenjs.endPause(),this._flyStatus=n$l.Playing):c$j(this,this._dynamicCurrentStopIndex+1);else{if(this.currentStopIndex>=this._routes.routes[0].stopCollection[this._routes.routes[0].stopCollection.length-1].index)return void(this._flyStatus=n$l.Stop);c$j(this,this.currentStopIndex)}},l$r.prototype.pause=function(){this._flyStatus===n$l.Playing?(this._currentTween=this._scene.camera._currentFlight,this._currentTween&&this._currentTween.tweenjs&&this._currentTween.tweenjs.pause(),this._flyStatus=n$l.Pause):this._flyStatus===n$l.Wait&&(this._flyStatus=n$l.Pause)},l$r.prototype.stop=function(){this._currentTween=this._scene.tweens.get(0),this._currentTween&&this._flyStatus!==n$l.Stop?(this._currentTween.cancelTween(),this._flyStatus=n$l.Stop,this._currentTween=void 0):this._flyStatus===n$l.Wait&&(this._flyStatus=n$l.Stop),this._dynamicCurrentStopIndex=this._currentStopIndex},l$r.prototype.viewToStop=function(e){if(e&&this._flyStatus!==n$l.Playing){var t=this._scene.camera,i={heading:e.heading,pitch:e.tilt,roll:0};t.setView({destination:e.point,orientation:i,convert:e._isConvert}),this._dynamicCurrentStopIndex=e.index}},l$r.prototype.getAllRouteStops=function(){return this.currentRoute?this.currentRoute.stopCollection:[]},Object.defineProperties(f$p.prototype,{stopCollection:{get:function(){return this._stopCollection.values}},isStopVisible:{get:function(){return this._isStopVisible},set:function(e){e$2e(e)&&e!==this._isStopVisible&&(this._isStopVisible=e,this.setStopVisible())}},isFlyLoop:{get:function(){return this._isFlyLoop},set:function(e){e&&(this._isFlyLoop=e)}},isLineVisible:{get:function(){return this._isLineVisible},set:function(e){e$2e(e)&&e!==this._isLineVisible&&(this._isLineVisible=e,this.setLineVisible())}},lineEntity:{get:function(){return this._lineEntity},set:function(e){e$2e(e)&&(this._lineEntity=e)}},routeName:{get:function(){return this._routeName},set:function(e){e&&(this._routeName=e)}},speed:{get:function(){return this._speed},set:function(e){if(e&&e!=this._speed){this._speed=e;for(var t=this.speed,i=this.stopCollection,n=0,r=i.length;n<r-1;n++){var o=i[n];o.duration=Math.ceil(o.distanceToNext/t)}}}},stopCount:{get:function(){return this._stopCollection.length}},isAlongline:{get:function(){return this._isAlongline},set:function(e){e$2e(e)&&(this._isAlongline=e)}},totalDuration:{get:function(){return this._totalDuration}},isHeadingFree:{get:function(){return this._isHeadingFree},set:function(e){e$2e(e)&&(this._isHeadingFree=e)}},isTiltFree:{get:function(){return this._isTiltFree},set:function(e){e$2e(e)&&(this._isTiltFree=e)}},isAltitudeFree:{get:function(){return this._isAltitudeFree},set:function(e){e$2e(e)&&(this._isAltitudeFree=e)}}}),f$p.prototype.init=function(){var e=0,t=[0],i=[],n=this._stopsInfo.stopNodes,r=this._stopsInfo.namespace;n=e$2e(n)?n.concat(this._addedStops):this._addedStops;for(var o=0;o<n.length;o++)if(!(this._removeIndex.indexOf(o)>-1)){var a,s=n[o];if(s instanceof e$t){if(-1!==(a=s)._preStopIndex){var l=(S=this._stopCollection._array[a._preStopIndex]).point,u=o$1p.distance(l,a.point);S.distanceToNext=u}}else{var c=s$T.queryFirstNode(s,"camera",r),h=s$T.queryNumericValue(c,"longitude",r),d=s$T.queryNumericValue(c,"latitude",r),f=s$T.queryNumericValue(c,"altitude",r),p=s$T.queryNumericValue(c,"heading",r);p=e$2d.toRadians(p);var _=s$T.queryNumericValue(c,"tilt",r);_=e$2d.toRadians(_-90),s$T.queryStringValue(c,"altitudeMode",r);var m,g=s$T.queryStringAttribute(s,"name"),x=s$T.queryNumericAttribute(s,"speed",r),y=s$T.queryFirstNode(s,"setting",r),v=s$T.queryStringValue(y,"stopPlayMode",r),$=s$T.queryNumericValue(y,"pauseTime",r),b=s$T.queryNumericValue(y,"angularSpeed",r),T=s$T.queryFirstNode(y,"stopViews",r),C=!0;h>180||d>180?(m=new o$1p(h,d,f),C=!1):m=o$1p.fromDegrees(h,d,f),i.push(m);var S,w=this.stopCount;if(o>0&&w>0)if((S=this._stopCollection._array[this._stopCollection.length-1]).stopPlayMode!=A$s.StopAround){l=S.point,u=o$1p.distance(l,m);S.distanceToNext=u;var E,P=S.speed;E=0<P?P:this._speed,S.duration=u/E,S.speed=E,e+=S.duration,t.push(e)}(a=new e$t({index:o,point:m,heading:p,tilt:_,stopName:g,waitTime:$,speed:x,isConvert:C})).altitude=f}if(this._addStop(a),e$2e(S)&&(S._nextStopIndex=o,a._preStopIndex=S.index),v===A$s.StopAround&&T){var A=queryChildNodes(T,"view",r);if(2==A.length){var L=A[0],M=A[1],R=s$T.queryNumericAttribute(L,"heading",r),O=s$T.queryNumericAttribute(M,"heading",r);s$T.queryNumericAttribute(L,"tilt",r),s$T.queryNumericAttribute(M,"tilt",r),s$T.queryNumericAttribute(L,"altitude",r),s$T.queryNumericAttribute(M,"altitude",r);var D=s$T.queryStringAttribute(L,"direction",r);s$T.queryStringAttribute(M,"direction",r);var I,B="Clockwise"===D?1:-1;e$2d.equalsEpsilon(R,O,e$2d.EPSILON15)?I=360:((I=O-R)<0&&"Clockwise"===D?I+=360:I>0&&"Clockwise"!==D&&(I=360-I),I=Math.abs(I));var F=I/b;a.surroundDuration=F/3,a.stopPlayMode=A$s.StopAround;var N=e$2d.toRadians(R),G=e$2d.toRadians(R+B*I/3),z=e$2d.toRadians(R+B*I*2/3),U=e$2d.toRadians(O),V=new e$t({point:m,heading:N,tilt:_,stopName:g,waitTime:$,speed:x,surroundDuration:F/3,stopPlayMode:A$s.StopAround});V._bImmediately=!0,V._isGenerated=!0,this._addStop(V);var k=new e$t({point:m,heading:G,tilt:_,stopName:g,waitTime:0,speed:x,surroundDuration:F/3,stopPlayMode:A$s.StopAround});k._isGenerated=!0,this._addStop(k);var W=new e$t({point:m,heading:z,tilt:_,stopName:g,waitTime:0,speed:x,surroundDuration:F/3,stopPlayMode:A$s.StopAround});W._isGenerated=!0,this._addStop(W);var H=new e$t({point:m,heading:U,tilt:_,stopName:g,waitTime:$,speed:x});this._addStop(H),e+=F}}}for(var q=0;q<this.stopCount-1;q++){var j=this.stopCollection[q],X=this.stopCollection[q+1],Y=new o$1p(X.point.x-j.point.x,X.point.y-j.point.y,X.point.z-j.point.z);Y.equals(o$1p.ZERO)||(o$1p.normalize(Y,Y),j.direction=Y,j.up=m$19.buildUp(j.point,Y),this._isTiltFree&&(j.heading=m$19.getHeading(j.direction,j.up)-e$2d.PI))}if(this.stopCount>2){var Z=this.stopCollection[this.stopCollection.length-1],K=this.stopCollection[this.stopCollection.length-2];Z.direction=K.direction,Z.up=K.up,this._isTiltFree&&(Z.heading=m$19.getHeading(Z.direction,Z.up)-e$2d.PI)}i.length>=2&&(this._catmullRomSpline=new c$L({times:t,points:i})),this.setStopVisible(),this._totalDuration=e},f$p.prototype._addStop=function(e){if(!e)throw new t$15("parameter stop is required!");if(!(e instanceof e$t))throw new t$15("parameter stop must be instanceof RouteStop!");if(this._stopCollection.set(e.index,e),e$2e(this._entityCollection)&&this._isStopVisible){var t=this._entityCollection.add({position:e.point,billboard:{image:n$17("Assets/Textures/maki/grepin.png"),scale:.5}});this._stopMarkCollection.push(t)}if(this._isCleared&&this._stopCollection.length>2)if(e$2e(this._catmullRomSpline)){var i=[].concat(this._catmullRomSpline.times),n=[].concat(this._catmullRomSpline.points),r=this._stopCollection.length>0?this._stopCollection._array[this._stopCollection.length-2]._duration:0,o=i.length>0?i[i.length-1]:0;i.push(o+r),n.push(e.point),this._catmullRomSpline=new c$L({times:i,points:n})}else{for(var a=[0],s=[this._stopCollection._array[0].point],l=0,u=1;u<this._stopCollection.length;u++){var c=this._stopCollection._array[u],h=this._stopCollection._array[u-1];s.push(c.point),l+=h.duration,a.push(l)}this._catmullRomSpline=new c$L({times:a,points:s})}return!0},f$p.prototype.addStop=function(e){if(!e)throw new t$15("parameter stop is required!");if(!(e instanceof e$t))throw new t$15("parameter stop must be instanceof RouteStop!");e._preStopIndex=this._stopsInfo.stopNodes.length+this._addedStops.length-1,e._index=e._preStopIndex+1,this._addedStops.push(e),this.clear(),this.init(),this.setLineVisible()},f$p.prototype.removeStop=function(e){this.clear(),-1===this._removeIndex.indexOf(e.index)&&this._removeIndex.push(e.index),this.init(),this.setLineVisible()},f$p.prototype.setLineVisible=function(){if(e$2e(this._entityCollection)){if(!e$2e(this._lineEntity)){for(var e=this.stopCollection,t=e.length,i=[];t--;)i.push(e[t].point);this._lineEntity=this._entityCollection.add({name:this.routeName,polyline:{positions:i,width:5}})}this._lineEntity.show=this._isLineVisible}},f$p.prototype.setStopVisible=function(){if(e$2e(this._entityCollection)){if(0===this._stopMarkCollection.length&&this._isStopVisible)for(var e=this.stopCollection,t=e.length;t--;){var i=e[t],n=this._entityCollection.add({position:i.point,billboard:{image:n$17("Assets/Textures/maki/grepin.png"),scale:.5}});this._stopMarkCollection.push(n)}for(var r=0,o=this._stopMarkCollection.length;r<o;r++){(n=this._stopMarkCollection[r]).show=this._isStopVisible}}},f$p.prototype.get=function(e){return void 0===this._stopCollection.get(e)?this.stopCollection[e]:this._stopCollection.get(e)},f$p.prototype.clear=function(){this._isCleared=!0;for(var e=0;e<this._stopMarkCollection.length;e++)this._entityCollection.remove(this._stopMarkCollection[e]);e$2e(this._lineEntity)&&(this._entityCollection.remove(this._lineEntity),this._lineEntity=void 0),this._stopCollection.removeAll(),e$2e(this._catmullRomSpline)&&(this._catmullRomSpline=void 0)},Object.defineProperties(d$x.prototype,{routes:{get:function(){return this._routes}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}}}),d$x.prototype.addRoute=function(e){if(e&&(this._routes.push(e),e.isLineVisible&&e$2e(this._entityCollection))){for(var t=e.stopCollection,i=t.length,n=[];i--;)n.push(t[i].point);e.lineEntity=this._entityCollection.add({name:e.routeName,polyline:{positions:n,width:5}})}},d$x.prototype.get=function(e){return this._routes[e]},d$x.prototype.fromFile=function(e){var t=this;o$1l(d$1f(e),(function(e){p$i(t,e)}),(function(){t._readyPromise.reject()}))},d$x.prototype.fromXML=function(e){if(!e$2e(e))throw new t$15("xml content is required to create routes!");var t=(new DOMParser).parseFromString(e,"text/xml");try{p$i(this,t)}catch(e){throw new t$15(e)}},o$u.prototype.Clone=function(){var e=new o$u;if(e.Name=this.Name,e.Description=this.Description,e.NumParts=this.NumParts,e.NumPoints=this.NumPoints,e.Color=this.Color,e.Radius=this.Radius,null!=this.Parts){for(var t=[],i=0;i<this.Parts.length;i++)t.push(this.Parts[i]);e.Parts=t}e.Points=[];for(i=0;i<this.NumPoints;i++)e.Points[i]=new o$1p,e.Points[i].x=this.Points[i].x,e.Points[i].y=this.Points[i].y,e.Points[i].z=this.Points[i].z;return e},o$u.prototype.ComputeBox=function(e,t){e=new o$1p(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),t=new o$1p(Number.MIN_VALUE,Number.MIN_VALUE,Number.MIN_VALUE);for(var i=0,n=this.Points.length;i<n;i++){var r=this.Points[i];e.x>r.x&&(e.x=r.x),e.y>r.y&&(e.y=r.y),e.z>r.z&&(e.z=r.z),t.x<r.x&&(t.x=r.x),t.y<r.y&&(t.y=r.y),t.z<r.z&&(t.z=r.z)}},z$o.enuCenter=void 0;var M$o={sh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-e))/2},arsh:function(e){return Math.log(e+Math.sqrt(e*e+1),Math.E)}};function N$i(e){return new o$1p(parseFloat(e.x)||0,parseFloat(e.y)||0,parseFloat(e.z)||0)}z$o.prototype.GetPowerline=function(e){if(!e instanceof o$u||null==e.Points||e.Points.Length<2)return null},z$o.prototype.gernerateCatenarylines=function(e){if(!(e.points instanceof Array&&e$2e(e.points[0].begin)&&e$2e(e.points[0].end)))throw new t$15("options.points is required and must like [{begin : 0, end : 1}, {begin : 1, end : 2}]");for(var t=[],i=u$Z(e.imageUrl,""),n=u$Z(e.imageRepeat,new o$1o(30,1)),r=u$Z(e.imageTransparent,!1),o=u$Z(e.volumeDisplayCondition,new o$1o(0,500)),a=u$Z(e.lineDisplayCondition,new o$1o(500,5e4)),s=u$Z(e.lineColor,e$1X.WHITE),l=0,u=e.points.length;l<u;l++){var c=e.points[l].begin,h=e.points[l].end;c=N$i(c),h=N$i(h);var d=this.InsertTwoPoints(c,h),f=[],p=null,_=o$1p.fromDegrees(d[0].x,d[0].y,d[0].z);if(0===this.enuCenters.length)this.enuCenters.push(_),p=this.enuCenters[0];else{for(var m=0;m<this.enuCenters.length;m++)if(o$1p.distance(this.enuCenters[m],_)<1e4){p=this.enuCenters[m];break}e$2e(p)||(p=_,this.enuCenters.push(_))}for(var g=0;g<d.length;g++){var x=o$1p.fromDegrees(d[g].x,d[g].y,d[g].z);f.push(x)}if(f.length>1){var y=new h$W({polylineVolume:new e$1n({positions:f,enuCenter:p,shape:U$m(this.r),material:new a$R({image:i,repeat:n,transparent:r}),distanceDisplayCondition:new r$Z(o.x,o.y)}),polyline:new a$L({positions:f,distanceDisplayCondition:new r$Z(a.x,a.y),width:2,material:s})});t.push(y)}}return t};var q$l={};function U$m(e){if(e$2e(q$l["_"+e]))return q$l["_"+e];for(var t=[],i=0;i<360;){var n=e$2d.toRadians(i);t.push(new o$1o(e*Math.cos(n),e*Math.sin(n))),i+=11.25}return q$l["_"+e]=t,t}function T$o(e,t,i,n){return.5*n-e/t*M$o.arsh(t*i/(2*e*M$o.sh(t*n/(2*e))))}function H$t(e,t,i){return e*e+t*t+i*i}function S$n(e,t,i){return Math.sqrt(H$t(e,t,i))}function J$g(e,t,i){var n=S$n(e,t,i);return new o$1p(e/n,t/n,i/n)}function O$i(e,t,i){e*=Math.PI/180,t*=Math.PI/180;var n=i*Math.cos(e);return new o$1p(n*Math.cos(t),n*Math.sin(t),i*Math.sin(e))}function D$l(e){new o$1p;return O$i(e.y,e.x,e.z+6378137)}function d$w(e,t){this.l=0,this.h=0,e$2e(t)?(this.a0=e,this.r=t,this.k=Q$k(e,t)):(this.k=e,this.a0=0,this.r=0)}function Q$k(e,t){return t*Math.pow(10,5)/(8*e)}function i$q(){this.init()}function i$p(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function i$o(e){e=parseFloat(e)||0,this.init(e)}function r$q(e,t){e=parseFloat(e)||0,t=parseFloat(t)||0,this._vertex=void 0,this._rotateOrigin=O$K.CENTER,this.init(e,t)}function i$n(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function i$m(e,t,i){e=parseFloat(e)||0,t=parseFloat(t)||0,i=parseFloat(i)||0,this.init(e,t,i)}function t$i(){this.init()}function e$r(e){e=e||{},this.init(e)}function e$q(e){e=parseFloat(e)||0,this.init(e)}z$o.prototype.InsertTwoPoints=function(e,t){if(!(e instanceof o$1p&&t instanceof o$1p))throw new t$15("startPos and endPos must be Cartesian3!");if(e.x==t.x&&e.y==t.y&&e.z==t.z)return[new o$1p(e.x,e.y,e.z)];var i=D$l(e),n=D$l(t),r=o$1p.subtract(n,i,new o$1p),o=o$1p.magnitude(r),a=Math.max(Math.floor(o/10),2);a=a%2==0?a:a+1;var s=new Array(a+2),l=t.z-e.z,u=l/o,c=Math.sqrt(1-u*u)||1;T$o(this.a0,this.r,l,o*c);var h=o/(a+1);this.m_sag.l=o*c,this.m_sag.h=l;for(var d=0;d<=a+1;d++){var f=new o$1p((t.x-e.x)*d/(a+1),(t.y-e.y)*d/(a+1),(t.z-e.z)*d/(a+1));if(s[d]=new o$1p(e.x+f.x,e.y+f.y,e.z+f.z),0!=d||d!=this.segments+1){var p=h*d;this.m_sag.fx(p*c),s[d].z=s[d].z-this.m_sag.fx(p*c)}}return s},z$o.prototype.CalcPoint=function(e,t,i){var n=D$l(e),r=D$l(t),o=new o$1p(r.x-n.x,r.y-n.y,r.z-n.z),a=Math.sqrt(o.x*o.x+o.y*o.y+o.z*o.z),s=null,l=t.z-e.z,u=l/a,c=Math.sqrt(1-u*u);T$o(this.a0,this.r,l,a*c),this.m_sag.l=a*c,this.m_sag.h=l;var h=i/this.m_sag.l,d=new o$1p(t.x-e.x,t.y-e.y,t.z-e.z);o=new o$1p((d=J$g(d.x,d.y,d.z)).x*a*h,d.y*a*h,d.z*a*h);return(s=new o$1p(e.x+o.x,e.y+o.y,e.z+o.z)).z=s.z-this.m_sag.fx(i),s},d$w.prototype.fx=function(e){var t=8*Math.pow(10,-5)*this.k,i=this.Loa();return e*(this.h/this.l)+2/t*(M$o.sh(t*(2*i-e)/2)*M$o.sh(t*e/2))},d$w.prototype.Loa=function(){var e=8*Math.pow(10,-5)*this.k;return.5*this.l-1/e*M$o.arsh(this.h*e/2/M$o.sh(e*this.l/2))},i$q.prototype=new o$11,i$q.prototype.constructor=i$q,Object.defineProperties(i$q.prototype,{geoImagePath:{get:function(){return this.imagePath},set:function(e){"string"==typeof e&&(this.imagePath=e,this.billboard.image=e)}},geoWidth:{get:function(){return this.width},set:function(e){"number"==typeof e&&(this.width=e,this.billboard.width=e)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.billboard.height=e)}}}),i$q.prototype.init=function(){this.type=P$U.GEOBILLBOARD,this.height=100,this.width=100,this.imagePath="",this.billboard={image:"",width:100,height:100}},i$p.prototype=new o$11,i$p.prototype.constructor=i$p,Object.defineProperties(i$p.prototype,{geoLength:{get:function(){return this.length},set:function(e){"number"==typeof e&&(this.length=e,this.box.dimensions.x=e,this._isGeometryDirty=!0)}},geoWidth:{get:function(){return this.width},set:function(e){"number"==typeof e&&(this.width=e,this.box.dimensions.y=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.box.dimensions.z=e,this._isGeometryDirty=!0)}}}),i$p.prototype.init=function(e,t,i){this.type=P$U.GEOBOX,this.length=e,this.width=t,this.height=i,this.box={dimensions:new o$1p(e,t,i),vertexFormat:n$13.POSITION_NORMAL_AND_ST}},i$p.prototype.isValid=function(){return this.length>0&&this.width&&this.height>0},i$p.prototype._createGeometry=function(){let e=O$z.fromDimensions(this.box);this._geometry=O$z.createGeometry(e),this._isGeometryDirty=!1,this._vertexBuffer&&!this._vertexBuffer.isDestroyed()&&(this._vertexBuffer=this._vertexBuffer.destroy())},i$p.prototype.getCenter=function(){return new s$N(this.position.x,this.position.y,this.position.z+this.height/2)},i$p.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(24);t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,t[8]=4,t[9]=5,t[10]=5,t[11]=6,t[12]=6,t[13]=7,t[14]=7,t[15]=4,t[16]=1,t[17]=5,t[18]=2,t[19]=6,t[20]=0,t[21]=4,t[22]=3,t[23]=7;let i=t$X.createIndexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),n=[];return n.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$13({context:e,attributes:n,indexBuffer:i})},i$o.prototype=new o$11,i$o.prototype.constructor=i$o,Object.defineProperties(i$o.prototype,{geoRadius:{get:function(){return this.radius},set:function(e){"number"==typeof e&&(this.radius=e,this.ellipse.semiMinorAxis=e,this.ellipse.semiMajorAxis=e)}}}),i$o.prototype.init=function(e){this.type=P$U.GEOCIRCLE3D,this.radius=e,this.ellipse={semiMinorAxis:e,semiMajorAxis:e}},i$o.prototype.isValid=function(){return this.radius>0},i$o.prototype.getCenter=function(){return new Point3D(this.position.x,this.position.y,this.position.z)},r$q.prototype=new o$11,r$q.prototype.constructor=r$q,Object.defineProperties(r$q.prototype,{geoBottomRadius:{get:function(){return this.bottomRadius},set:function(e){"number"==typeof e&&(this.bottomRadius=e,this.cylinder.bottomRadius=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.cylinder.length=e,this._isGeometryDirty=!0)}},rotateOrigin:{get:function(){return this._rotateOrigin},set:function(e){o$1q.typeOf.number("GeoCone rotateOrigin",e),this._rotateOrigin=e}}}),r$q.prototype.init=function(e,t){this.type=P$U.GEOCONE,this.height=t,this.bottomRadius=e,this.cylinder={length:t,topRadius:0,bottomRadius:e,vertexFormat:n$13.POSITION_NORMAL_AND_ST}},r$q.prototype.clone=function(){return new r$q(this.bottomRadius,this.height)},r$q.prototype._createGeometry=function(){var e=new l$Q(this.cylinder);this._geometry=l$Q.createGeometry(e),this._vertex=o$1p.fromDegrees(this.position.x,this.position.y,this.position.z+this.height/2),this._isGeometryDirty=!1},r$q.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(768),i=0;for(let e=0;e<256;e+=2)t[i++]=e,t[i++]=e+1,t[i++]=e,t[i++]=e+2,t[i++]=e+1,t[i++]=e+3;t[i-1]=1;let n=t$X.createIndexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),r=[];return r.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$13({context:e,attributes:r,indexBuffer:n})},i$n.prototype=new o$11,i$n.prototype.constructor=i$n,Object.defineProperties(i$n.prototype,{geoTopRadius:{get:function(){return this.topRadius},set:function(e){"number"==typeof e&&(this.topRadius=e,this.cylinder.topRadius=e,this._isGeometryDirty=!0)}},geoBottomRadius:{get:function(){return this.bottomRadius},set:function(e){"number"==typeof e&&(this.bottomRadius=e,this.cylinder.bottomRadius=e,this._isGeometryDirty=!0)}},geoHeight:{get:function(){return this.height},set:function(e){"number"==typeof e&&(this.height=e,this.cylinder.length=e,this._isGeometryDirty=!0)}}}),i$n.prototype.init=function(e,t,i){this.type=P$U.GEOCYLINDER,this.height=i,this.topRadius=e,this.bottomRadius=t,this.cylinder={length:i,topRadius:e,bottomRadius:t,vertexFormat:n$13.POSITION_NORMAL_AND_ST}},i$n.prototype.clone=function(){return new i$n(this.topRadius,this.bottomRadius,this.height)},i$n.prototype._createGeometry=function(){var e=new l$Q(this.cylinder);this._geometry=l$Q.createGeometry(e),this._isGeometryDirty=!1},i$n.prototype.getOutlineVertexArray=function(e){let t=new Uint16Array(768),i=0;for(let e=0;e<256;e+=2)t[i++]=e,t[i++]=e+1,t[i++]=e,t[i++]=e+2,t[i++]=e+1,t[i++]=e+3;t[i-1]=1;let n=t$X.createIndexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),r=[];return r.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$13({context:e,attributes:r,indexBuffer:n})},i$m.prototype=new o$11,i$m.prototype.constructor=i$m,Object.defineProperties(i$m.prototype,{geoXAxis:{get:function(){return this.xAxis},set:function(e){"number"==typeof e&&(this.xAxis=e,this.ellipsoid.radii.x=e,this._isGeometryDirty=!0)}},geoYAxis:{get:function(){return this.yAxis},set:function(e){"number"==typeof e&&(this.yAxis=e,this.ellipsoid.radii.z=e,this._isGeometryDirty=!0)}},geoZAxis:{get:function(){return this.zAxis},set:function(e){"number"==typeof e&&(this.zAxis=e,this.ellipsoid.radii.y=e,this._isGeometryDirty=!0)}}}),i$m.prototype.init=function(e,t,i){this.type=P$U.GEOELLIPSOID,this.xAxis=e,this.yAxis=t,this.zAxis=i,this.ellipsoid={radii:new o$1p(e,i,t),vertexFormat:n$13.POSITION_NORMAL_AND_ST}},i$m.prototype.isValid=function(){return this.xAxis>0&&this.yAxis&&this.zAxis>0},i$m.prototype.getCenter=function(){return new s$N(this.position.x,this.position.y,this.position.z+this.zAxis)},i$m.prototype._createGeometry=function(){var e=new b$O(this.ellipsoid);this._geometry=b$O.createGeometry(e),this._isGeometryDirty=!1},i$m.prototype.getOutlineVertexArray=function(e){this._getGeometry();let t=0,i=new Uint16Array(17956);for(let e=0;e<67;e++){var n=67*e;for(let e=0;e<66;e++)i[t++]=n+e,i[t++]=n+e+1}for(let e=0;e<67;e++)for(let n=0;n<65;n++)i[t++]=67+e+67*n,i[t++]=67+e+67*(n+1);let r=t$X.createIndexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),o=[];return o.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$13({context:e,attributes:o,indexBuffer:r})},t$i.prototype=new o$11,t$i.prototype.constructor=t$i,t$i.prototype.parent=o$11.prototype,Object.defineProperties(t$i.prototype,{geoFilePath:{get:function(){return this.modelUrl},set:function(e){"string"==typeof e&&(this.modelUrl=e)}},geoModel:{get:function(){return this._geoModel},set:function(e){this._geoModel=e}}}),t$i.prototype.init=function(){this.modelUrl="",this._geoModel=void 0,this.type=P$U.GEOMODEL3D},e$r.prototype=new o$11,e$r.prototype.constructor=e$r,e$r.prototype.parent=o$11.prototype,Object.defineProperties(e$r.prototype,{X:{get:function(){return this.x},set:function(e){"number"==typeof e&&(this.x=e)}},Y:{get:function(){return this.y},set:function(e){"number"==typeof e&&(this.y=e)}},Z:{get:function(){return this.z},set:function(e){"number"==typeof e&&(this.z=e)}}}),e$r.prototype.init=function(e){this.x=u$Z(e.x,0),this.y=u$Z(e.y,0),this.z=u$Z(e.z,0),this.type=P$U.GEOPOINT3D},e$q.prototype=new o$11,e$q.prototype.constructor=e$q,Object.defineProperties(e$q.prototype,{geoRadius:{get:function(){return this.radius},set:function(e){"number"==typeof e&&(this.radius=e,this.ellipsoid.radii.x=e,this.ellipsoid.radii.y=e,this.ellipsoid.radii.z=e,this.sphere.radius=e,this._isGeometryDirty=!0)}}}),e$q.prototype.init=function(e){this.type=P$U.GEOSPHERE,this.radius=e,this.ellipsoid={radii:new o$1p(e,e,e)},this.sphere={radius:e,vertexFormat:n$13.POSITION_NORMAL_AND_ST}},e$q.prototype.isValid=function(){return this.radius>0},e$q.prototype.getCenter=function(){return new s$N(this.position.x,this.position.y,this.position.z+this.radius)},e$q.prototype._createGeometry=function(){var e=new n$u(this.sphere);this._geometry=n$u.createGeometry(e),this._isGeometryDirty=!1},e$q.prototype.getOutlineVertexArray=function(e){this._getGeometry();let t=0,i=new Uint16Array(17956);for(let e=0;e<67;e++){var n=67*e;for(let e=0;e<66;e++)i[t++]=n+e,i[t++]=n+e+1}for(let e=0;e<67;e++)for(let n=0;n<65;n++)i[t++]=67+e+67*n,i[t++]=67+e+67*(n+1);let r=t$X.createIndexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),o=[];return o.push({name:"aPosition",index:0,vertexBuffer:this._getVertexBuffer(e),componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}),new c$13({context:e,attributes:o,indexBuffer:r})};var xe$8=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function S$m(e,t){if(!e$2e(e)||!e$2e(t))throw new t$15("No viewer or box provided.");if(!e$2e(t.box))throw new t$15("Expected object to be a box.");this.handler=new g$K(e.scene.canvas),this.viewer=e,this.editEvt=new o$1h,this._distanceDisplayCondition=void 0,this._id=e$1T(),re$c(this,t),te$a(this),this.activate()}function re$c(e,t){e.box=t,e.hpr=de$8(t),e.center=t.position.getValue(0),e.dimensions=t.box.dimensions.getValue(0),e._rotateCircleRadius=Math.max(Math.min(e.dimensions.x,e.dimensions.y)/7,.01),e._unifiedMoveBarLength=Math.max(Math.max(Math.max(e.dimensions.x,e.dimensions.y),e.dimensions.z)/6,.1),e._movePolygonDimension=e._rotateCircleRadius/2,e._moveBarXLength=e._unifiedMoveBarLength,e._moveBarYLength=e._unifiedMoveBarLength,e._moveBarZLength=e._unifiedMoveBarLength,e.isActive=!1,e._color=e$1X.WHITE.withAlpha(.1),e._lineColor=e$1X.fromCssColorString("rgba(250, 158, 62, 1)"),e._outlineColor=e$1X.fromCssColorString("rgba(1, 107, 185, 1)"),e._lineWidth=5,e._modelMatrix=m$19.headingPitchRollToFixedFrame(e.center,e.hpr),e._modelMatrixInverse=p$1d.inverse(e._modelMatrix,new p$1d),e._hoverColor=e$1X.RED,e._linesHover=[]}function de$8(e){if(!e$2e(e.orientation))return new i$16;var t=p$1e.fromQuaternion(e.orientation.getValue(0),new p$1e),i=p$1d.fromRotationTranslation(t,o$1p.ZERO,new p$1d),n=p$1d.inverse(m$19.eastNorthUpToFixedFrame(e.position.getValue(0)),new p$1d),r=p$1d.multiply(n,i,new p$1d),o=p$1d.getMatrix3(r,new p$1e);return i$16.fromQuaternion(n$15.fromRotationMatrix(o))}function te$a(e){var t=e;t.positions=be$a(t),t.polylines=new J$T({opaqueRS:d$1m.fromCache({depthMask:!0,depthTest:{enabled:!0}}),modelMatrix:e._modelMatrix}),t.translucentPolylines=new J$T({translucentRS:d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1}}),modelMatrix:e._modelMatrix}),t.translucentPolylines._canAlwaysPick=!0;for(var i=0;i<7;i++)t.polylines.add({id:"box-editor-prim"+i+e._id,width:t._lineWidth,positions:e.positions[i],material:r$Y.fromType(r$Y.ColorType,{color:t._lineColor})});for(i=0;i<7;i++)t.translucentPolylines.add({id:"box-editor-prim"+i+e._id,width:t._lineWidth,positions:e.positions[i],material:r$Y.fromType(r$Y.ColorType,{color:t._lineColor.withAlpha(.2)})});t.boundingBox=Be$8(t,"edit_box"),t.viewer.entities.add(t.boundingBox),t.viewer.scene.primitives.add(t.polylines),t.viewer.scene.primitives.add(t.translucentPolylines),t._polygon=new Z$k(t),t.viewer.scene.primitives.add(t._polygon)}function Z$k(e){this.editor=e,this.show=!0,this._color=e$1X.clone(e._lineColor),this._isCustomPolygon=!0}function ke$6(e,t,i){var n=new P$H({polygonHierarchy:{positions:e.positions[7]}}),r=P$H.createGeometry(n),o=p$1d.clone(e._modelMatrix);if(e.viewer.scene.mode===C$14.COLUMBUS_VIEW){var a=new n$1d,s=a.ellipsoid.cartesianToCartographic(e.center),l=a.project(s);p$1d.fromTranslation(l,o),p$1d.multiply(xe$8,o,o)}let u=[];var c=t$X.createVertexBuffer({context:t,typedArray:S$14.createTypedArray(S$14.FLOAT,r.attributes.position.values),usage:A$18.STATIC_DRAW});u.push({index:0,vertexBuffer:c,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1,name:"aPosition"});var h=new c$13({context:t,attributes:u,indexBuffer:t$X.createIndexBuffer({context:t,typedArray:r.indices,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})}),d=r$14.fromCache({name:"boxEditor",context:t,vertexShaderSource:"attribute vec4 aPosition;\nuniform vec4 uColor;\nuniform vec4 uPickColor;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n vColor = uColor;\n vPickColor = uPickColor;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",fragmentShaderSource:"varying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n gl_FragColor = vColor;\n}\n",attributeLocations:{aPosition:0}}),f=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:o,pass:Le$q.OPAQUE,owner:i});f.vertexArray=h,f.shaderProgram=d;var p={id:"box-editor-prim7"+e._id,primitive:i},_=t.createPickId(p);f.pickId="vPickColor",f.uniformMap={uColor:function(){return i._color},uPickColor:function(){return _.color}},f.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var m=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:o,pass:Le$q.OPAQUE+1,owner:i});m.vertexArray=h,m.shaderProgram=d;var g={id:"box-editor-prim7"+e._id,primitive:i},x=t.createPickId(g);m.pickId="vPickColor",m.uniformMap={uColor:function(){return i._color.withAlpha(.2)},uPickColor:function(){return x.color}},m.renderState=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),i._colorCommandAlpha=m,i._colorCommand=f}function be$a(e){var t=[];t.push([new o$1p(0,0,e.dimensions.z/2),new o$1p(0,0,e.dimensions.z/2+e._moveBarZLength)]),t.push([new o$1p(0,0,-e.dimensions.z/2),new o$1p(0,0,-e.dimensions.z/2-e._moveBarZLength)]),t.push([new o$1p(e.dimensions.x/2,0,0),new o$1p(e.dimensions.x/2+e._moveBarXLength,0,0)]),t.push([new o$1p(-e.dimensions.x/2,0,0),new o$1p(-e.dimensions.x/2-e._moveBarXLength,0,0)]),t.push([new o$1p(0,e.dimensions.y/2,0),new o$1p(0,e.dimensions.y/2+e._moveBarYLength,0)]),t.push([new o$1p(0,-e.dimensions.y/2,0),new o$1p(0,-e.dimensions.y/2-e._moveBarYLength,0)]);for(var i=Me$9(e._rotateCircleRadius,64),n=0;n<i.length;n++)i[n].z=e.dimensions.z/2;t.push(i);var r=e._movePolygonDimension;return t.push([new o$1p(r,r,.505*e.dimensions.z+.01),new o$1p(-r,r,.505*e.dimensions.z+.01),new o$1p(-r,-r,.505*e.dimensions.z+.01),new o$1p(r,-r,.505*e.dimensions.z+.01)]),t}function Me$9(e,t){var i=[];const n=2*Math.PI/t;for(var r=0;r<t+1;r++){var o=new o$1p,a=n*r;o.x=e*Math.sin(a),o.y=e*Math.cos(a),i.push(o)}return i}function Be$8(e,t){var i=m$19.headingPitchRollQuaternion(e.center,e.hpr);return new h$W({id:t+e._id,position:new n$X((function(){return e.center}),!1),orientation:new n$X((function(){return i}),!1),box:{material:e._color,outline:!0,outlineWidth:2,outlineColor:e._outlineColor,dimensions:new n$X((function(){return e.dimensions}),!1)}})}Object.defineProperties(S$m.prototype,{distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(e$2e(e)&&!(e instanceof r$Z))throw new t$15("Expected BoxEditor.distanceDisplayCondition to be type of DistanceDisplayCondition!");this._distanceDisplayCondition=e}},color:{get:function(){return this._color},set:function(e){this._color=e,this.boundingBox.box.material=e}},hoverColor:{get:function(){return this._hoverColor},set:function(e){this._hoverColor=e}}}),Object.defineProperties(Z$k.prototype,{color:{get:function(){return this._color},set:function(e){this._color=e,this.dirty=!0}}}),Z$k.prototype.update=function(e){(!this._colorCommand||this.dirty)&&(ke$6(this.editor,e.context,this),this.dirty=!1);var t=this.editor;if(e$2e(t._distanceDisplayCondition)&&t.isActive){var i=t.viewer.scene.camera.positionWC;if(e.mode===C$14.COLUMBUS_VIEW&&(i=m$19.convertTo3DCartesian(i)),o$1p.distance(t.center,i)<t._distanceDisplayCondition.far){t._polygon.show=!0;for(var n=0;n<t.polylines._polylines.length;n++)t.polylines._polylines[n].show=!0,t.translucentPolylines._polylines[n].show=!0}else{t._polygon.show=!1;for(n=0;n<t.polylines._polylines.length;n++)t.polylines._polylines[n].show=!1,t.translucentPolylines._polylines[n].show=!1}}var r=e._fboState.frameBufferType;this.show&&r==Qe$c.NORMAL&&(e.commandList.push(this._colorCommand),e.commandList.push(this._colorCommandAlpha))},Z$k.prototype.destroy=function(e){};var X$h=new o$1p,ae$b=new i$1d,se$8=new o$1p,Te$9=new o$1o,Ie$6=new o$1o,Ee$9=new f$19,Oe$a=new o$1p,Re$8=new o$1p,Ae$a=new f$19,Se$8=new o$1p,Le$8=new o$1p,Ve$6=new o$1m(o$1p.UNIT_X,0);function ze$5(e,t){t.endPosition,e.currentPickObject;var i=+e.currentPickObject.id.slice(15,16),n=e.viewer.camera,r=o$1o.clone(t.startPosition,Te$9),o=o$1o.clone(t.endPosition,Ie$6),a=o$1p.clone(o$1p.ZERO,Oe$a),s=o$1p.UNIT_X;(0===i||1===i)&&(s=o$1p.UNIT_Y);var l=m$19.convertToColumbusCartesian(e.center);e$2e(l)&&(a.x=l.x,(0===i||1===i)&&(a.y=l.y));var u=o$1m.fromPointNormal(a,s,Ve$6),c=n.getPickRay(r,Ee$9),h=g$1j.rayPlane(c,u,Re$8),d=n.getPickRay(o,Ae$a),f=g$1j.rayPlane(d,u,Se$8),p=o$1p.subtract(h,f,Le$8),_=p.x;if(p.x=p.y,p.y=p.z,p.z=_,o$1p.magnitude(p)>e$2d.EPSILON6&&(f=m$19.convertTo3DCartesian(f),e.currentPickPos=f),0===i||1===i){var m=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p),g=(T=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).z-m.z,x=new o$1p(0,0,g/2);1===i&&(x=new o$1p(0,0,-(g=m.z-T.z)/2)),e.dimensions.z+=g,e.dimensions.z<=0&&(g=0,e.dimensions.z=0,x=new o$1p(0,0,0)),e.positions[0][0].z+=g/2,e.positions[0][1].z+=g/2,e.positions[1][0].z-=g/2,e.positions[1][1].z-=g/2;for(var y=e.positions[6],v=0;v<y.length;v++)y[v].z+=g/2;var $=e.positions[7];for(v=0;v<$.length;v++)$[v].z+=g/2;p$1d.multiplyByPoint(e._modelMatrix,x,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(2===i||3===i){m=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var b=(T=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).x-m.x;x=new o$1p(b/2,0,0);3===i&&(x=new o$1p(-(b=m.x-T.x)/2)),e.dimensions.x+=b,e.dimensions.x<0&&(e.dimensions.x=0,x=new o$1p(0,0,0),b=0),e.positions[2][0].x+=b/2,e.positions[2][1].x+=b/2,e.positions[3][0].x-=b/2,e.positions[3][1].x-=b/2,p$1d.multiplyByPoint(e._modelMatrix,x,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(4===i||5===i){e.viewer.camera.getPickRay(t.endPosition);m=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var T,C=(T=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).y-m.y;x=new o$1p(0,C/2,0);5===i&&(x=new o$1p(0,-(C=m.y-T.y)/2,0)),e.dimensions.y+=C,e.dimensions.y<0&&(e.dimensions.y=0,x=new o$1p(0,0,0),C=0),e.positions[4][0].y+=C/2,e.positions[4][1].y+=C/2,e.positions[5][0].y-=C/2,e.positions[5][1].y-=C/2,p$1d.multiplyByPoint(e._modelMatrix,x,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}}function Ue$5(e,t){var i=t.endPosition;e.currentPickObject;var n=+e.currentPickObject.id.slice(15,16);if(0===n||1===n){var r=e.viewer.scene.camera,o=r.getPickRay(i),a=o$1o.fromElements(i.x+5,i.y,new o$1o),s=r.getPickRay(a),l=o$1p.normalize(o$1p.cross(o.direction,s.direction,se$8),se$8),u=o$1m.fromPointNormal(r.positionWC,l),c=new f$19(o$1p.ZERO,e.currentPickPos);e.currentPickPos=g$1j.rayPlane(c,u);var h=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p),d=(v=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).z-h.z,f=new o$1p(0,0,d/2);1===n&&(f=new o$1p(0,0,-(d=h.z-v.z)/2)),e.dimensions.z+=d,e.dimensions.z<=0&&(d=0,e.dimensions.z=0,f=new o$1p(0,0,0)),e.positions[0][0].z+=d/2,e.positions[0][1].z+=d/2,e.positions[1][0].z-=d/2,e.positions[1][1].z-=d/2;for(var p=e.positions[6],_=0;_<p.length;_++)p[_].z+=d/2;var m=e.positions[7];for(_=0;_<m.length;_++)m[_].z+=d/2;p$1d.multiplyByPoint(e._modelMatrix,f,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(2===n||3===n){c=e.viewer.camera.getPickRay(t.endPosition);var g=i$1d.unpack([0,0,0,o$1p.distance(e.lastPickPos,o$1p.ZERO)],0,ae$b),x=g$1j.raySphere(c,g);e.currentPickPos=f$19.getPoint(c,x.start);h=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var y=(v=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).x-h.x;f=new o$1p(y/2,0,0);3===n&&(f=new o$1p(-(y=h.x-v.x)/2)),e.dimensions.x+=y,e.dimensions.x<0&&(e.dimensions.x=0,f=new o$1p(0,0,0),y=0),e.positions[2][0].x+=y/2,e.positions[2][1].x+=y/2,e.positions[3][0].x-=y/2,e.positions[3][1].x-=y/2,p$1d.multiplyByPoint(e._modelMatrix,f,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}if(4===n||5===n){c=e.viewer.camera.getPickRay(t.endPosition),g=i$1d.unpack([0,0,0,o$1p.distance(e.lastPickPos,o$1p.ZERO)],0,ae$b),x=g$1j.raySphere(c,g);e.currentPickPos=f$19.getPoint(c,x.start);h=p$1d.multiplyByPoint(e._modelMatrixInverse,e.lastPickPos,new o$1p);var v,$=(v=p$1d.multiplyByPoint(e._modelMatrixInverse,e.currentPickPos,new o$1p)).y-h.y;f=new o$1p(0,$/2,0);5===n&&(f=new o$1p(0,-($=h.y-v.y)/2,0)),e.dimensions.y+=$,e.dimensions.y<0&&(e.dimensions.y=0,f=new o$1p(0,0,0),$=0),e.positions[4][0].y+=$/2,e.positions[4][1].y+=$/2,e.positions[5][0].y-=$/2,e.positions[5][1].y-=$/2,p$1d.multiplyByPoint(e._modelMatrix,f,e.center),o$1p.clone(e.currentPickPos,e.lastPickPos)}}function Ne$7(e,t){var i=p$1d.multiplyByPoint(e._modelMatrix,e.positions[0][0],new o$1p),n=m$19.convertToColumbusCartesian(i),r=m$19.convertToColumbusCartesian(e.lastPickPos);r.x=n.x;var o=o$1p.subtract(r,n,new o$1p);e.tangent=o$1p.cross(o$1p.UNIT_X,o,new o$1p);var a=t.endPosition;o$1p.clone(e.lastPickPos,X$h);var s=e.viewer.camera.getPickRay(a),l=o$1m.fromPointNormal(n,o$1p.UNIT_X),u=g$1j.rayPlane(s,l),c=o$1p.subtract(r,n,new o$1p),h=o$1p.subtract(u,n,new o$1p),d=o$1p.dot(o$1p.normalize(c,c),o$1p.normalize(h,h)),f=Math.acos(d);o$1p.cross(o$1p.UNIT_X,c,e.tangent);var p=o$1p.dot(e.tangent,o$1p.subtract(u,r,new o$1p));f*=p=p<0?1:-1,e.hpr.heading+=f;var _=m$19.headingPitchRollQuaternion(e.center,e.hpr);e.boundingBox.orientation=_;var m=m$19.convertTo3DCartesian(u);o$1p.clone(m,e.lastPickPos)}function je$5(e,t){var i=p$1d.multiplyByPoint(e._modelMatrix,e.positions[0][0],new o$1p),n=o$1p.subtract(e.lastPickPos,i,new o$1p);e.tangent=o$1p.cross(o$1p.UNIT_Z,n,new o$1p);var r=t.endPosition,o=o$1p.clone(e.lastPickPos,X$h),a=e.viewer.camera.getPickRay(r),s=new i$1d(o$1p.ZERO,o$1p.distance(o,o$1p.ZERO)),l=g$1j.raySphere(a,s);o=f$19.getPoint(a,l.start);var u=o$1p.subtract(e.lastPickPos,i,new o$1p),c=o$1p.subtract(o,i,new o$1p),h=o$1p.dot(o$1p.normalize(u,u),o$1p.normalize(c,c)),d=Math.acos(h);o$1p.cross(o$1p.UNIT_Z,u,e.tangent);var f=o$1p.dot(e.tangent,o$1p.subtract(o,e.lastPickPos,new o$1p));d*=f=f<0?1:-1,e.hpr.heading+=d;var p=m$19.headingPitchRollQuaternion(e.center,e.hpr);e.boundingBox.orientation=p,o$1p.clone(o,e.lastPickPos)}function We$4(e,t){var i=t.endPosition;o$1p.clone(e.lastPickPos,X$h);var n=e.viewer.camera.getPickRay(i),r=m$19.convertToColumbusCartesian(e.lastPickPos),o=o$1m.fromPointNormal(r,o$1p.UNIT_X),a=g$1j.rayPlane(n,o),s=a.y-r.y,l=a.z-r.z,u=m$19.convertToColumbusCartesian(e.center);u.y+=s,u.z+=l,e.center=m$19.convertTo3DCartesian(u);var c=m$19.convertTo3DCartesian(a);o$1p.clone(c,e.lastPickPos)}function He$7(e,t){var i=t.endPosition,n=o$1p.clone(e.lastPickPos,X$h),r=e.viewer.camera.getPickRay(i),o=new i$1d(o$1p.ZERO,o$1p.distance(n,o$1p.ZERO)),a=g$1j.raySphere(r,o),s=f$19.getPoint(r,a.start),l=p$1d.multiplyByPoint(e._modelMatrixInverse,n,new o$1p),u=p$1d.multiplyByPoint(e._modelMatrixInverse,s,new o$1p),c=new o$1p(u.x-l.x,u.y-l.y,0);p$1d.multiplyByPoint(e._modelMatrix,c,e.center),o$1p.clone(s,e.lastPickPos)}function Fe$8(e){for(var t=0;t<e._linesHover.length;t++){var i=e._linesHover[t];i._isCustomPolygon?i.color=e._lineColor:i.material.uniforms.color.alpha<1?i.material=r$Y.fromType(r$Y.ColorType,{color:e._lineColor.withAlpha(.2)}):i.material=r$Y.fromType(r$Y.ColorType,{color:e._lineColor})}e._linesHover.length=0,e.viewer.scene.pickAsync(e.viewer.scene.screenSpaceCameraController._aggregator._currentMousePosition).then((t=>{var i=e.currentPickObject=t;if(i&&"string"==typeof i.id&&i.id.indexOf("box-editor-prim")>-1&&i.id.indexOf(e._id)>-1){var n=i.primitive._index;if(e$2e(n)){var r=e.polylines.get(n),o=e.translucentPolylines.get(n);r.material=r$Y.fromType(r$Y.ColorType,{color:e._hoverColor}),o.material=r$Y.fromType(r$Y.ColorType,{color:e._hoverColor.withAlpha(.2)}),e._linesHover.push(r),e._linesHover.push(o)}else i.primitive.color=e._hoverColor,e._linesHover.push(i.primitive)}}))}S$m.prototype.destroy=function(){this.viewer.scene.screenSpaceCameraController.enableInputs=!0,this.deactivate(),this.clear(),this.handler.destroy(),i$11(this)},S$m.prototype.activate=function(){if(!this.isActive){this.isActive=!0;for(var e=0;e<this.polylines._polylines.length;e++)this.polylines._polylines[e].show=!0,this.translucentPolylines._polylines[e].show=!0;var t=this;t.boundingBox.show=!0,t._polygon.show=!0,t.handler.setInputAction((function(e){t.viewer.scene.pickPositionAsync(e.position).then((e=>{t.startPickPos=e,t._isOperate=!1,e$2e(t.startPickPos)&&t.currentPickObject&&"string"==typeof t.currentPickObject.id&&t.currentPickObject.id.slice(-36)===t._id&&"box-editor"===t.currentPickObject.id.slice(0,10)&&(t._isOperate=!0,t.lastPickPos=o$1p.clone(t.startPickPos,new o$1p),t.currentPickPos=o$1p.clone(t.startPickPos,new o$1p))}))}),G$J.LEFT_DOWN),t.handler.setInputAction((function(e){if(t._isOperate){t.viewer.scene.screenSpaceCameraController.enableInputs=!1;var i=+t.currentPickObject.id.slice(15,16);i>=0&&i<6?t.viewer.scene.mode===C$14.COLUMBUS_VIEW?ze$5(t,e):Ue$5(t,e):6===i?t.viewer.scene.mode===C$14.COLUMBUS_VIEW?Ne$7(t,e):je$5(t,e):7===i&&(t.viewer.scene.mode===C$14.COLUMBUS_VIEW?We$4(t,e):He$7(t,e)),t._polygon.dirty=!0,t._modelMatrix=m$19.headingPitchRollToFixedFrame(t.center,t.hpr),t._modelMatrixInverse=p$1d.inverse(t._modelMatrix,t._modelMatrixInverse),t.polylines.modelMatrix=t._modelMatrix,t.translucentPolylines.modelMatrix=t._modelMatrix,t.box.orientation=new n$X((function(e,i){return t.boundingBox.orientation.getValue(0)}),!1),t.box.position=new n$X((function(e,i){return t.boundingBox.position.getValue(0)}),!1),t.box.box.dimensions=new n$X((function(e,i){return t.boundingBox.box.dimensions.getValue(0)}),!1),t.editEvt.raiseEvent({position:t.boundingBox.position.getValue(0),dimensions:t.boundingBox.box.dimensions.getValue(0),orientation:t.boundingBox.orientation.getValue(0)})}else Fe$8(t)}),G$J.MOUSE_MOVE),t.handler.setInputAction((function(e){t._isOperate=!1,t.viewer.scene.screenSpaceCameraController.enableInputs=!0,t.currentPickObject=void 0}),G$J.LEFT_UP)}},S$m.prototype.deactivate=function(){if(this.isActive){this.isActive=!1,this.boundingBox.show=!1,this._polygon.show=!1;for(var e=0;e<this.polylines._polylines.length;e++)this.polylines._polylines[e].show=!1,this.translucentPolylines._polylines[e].show=!1;this.handler.removeInputAction(G$J.LEFT_CLICK),this.handler.removeInputAction(G$J.MOUSE_MOVE),this.handler.removeInputAction(G$J.RIGHT_CLICK)}},S$m.prototype.clear=function(){this.polylines.removeAll(),this.viewer.scene.primitives.remove(this.polylines),this.polylines=void 0,this.translucentPolylines.removeAll(),this.viewer.scene.primitives.remove(this.translucentPolylines),this.viewer.scene.primitives.remove(this._polygon),this._polygon=void 0,this.translucentPolylines=void 0,this.viewer.entities.remove(this.boundingBox)},S$m.prototype.setEditObject=function(e){if(this.isActive){if(o$1q.typeOf.object("editObject",e),!e$2e(e.box))throw new t$15("Expected editObject to be a box.");var t=this.boundingBox.orientation.getValue(0),i=this.boundingBox.position.getValue(0),n=this.boundingBox.box.dimensions.getValue(0);this.box.orientation=new n$X((function(){return t}),!1),this.box.position=new n$X((function(){return i}),!1),this.box.box.dimensions=new n$X((function(){return n}),!1),re$c(this,e),this.deactivate(),this.clear(),te$a(this),this.activate()}};var e$p={Space:0,Ground:1,S3mModel:2,Raster:3,Both:4},l$p=Object.freeze(e$p),e$o={Point:0,Line:1,Polygon:2,Marker:3,Box:4},_0x1522bc=Object.freeze(e$o),e$n={POLYLINE:0,POLYGON:1,POLYGON_HOLE:2},C$q=Object.freeze(e$n),w$n=function(e,t,i){if(!e$2e(e)||!e$2e(t))throw new t$15("viewer and mode is required!");this.handler=new g$K(e.scene.canvas),this.viewer=e,this.mode=t,this._clampMode=u$Z(i,l$p.Space),this.isDrawing=!1,this.active=!1,this._drawEvt=new o$1h,this._activeEvt=new o$1h,this._enableDepthTest=!0,this.movingEvt=new o$1h,this.positions=[],this._positions=[],this._lineColor=e$1X.fromCssColorString("#51ff00"),this._lineWidth=3,this._lineMaterial=new t$P(this._lineColor)};function se$7(e,t){var i=t;if(i&&i.active){var n=i.viewer.scene;if(!n.pickPositionSupported)return void console.log("your browser not supported pickPosition!");n.pickPositionAsync(e.position).then((t=>{if(t)if(i.isDrawing){var n=new o$1o(e.position.x,e.position.y);switch(i.mode){case _0x1522bc.Line:X$g(n,i,!0);break;case _0x1522bc.Polygon:Y$h(n,i,!0)}}else switch(i.isDrawing=!0,i.positions.length=0,i.positions.push(t.clone()),i.mode){case _0x1522bc.Point:ae$a(t,i);break;case _0x1522bc.Line:F$j(t,i);break;case _0x1522bc.Polygon:le$c(t,i);break;case _0x1522bc.Marker:ce$c(t,i)}i.mode===_0x1522bc.Box&&he$9(t,i)}))}}function ae$a(e,t){var i=t;e$2e(i.points)?i.point.position=e:(i.points=new D$s({depthTestEnabled:!1}),i.point=i.points.add({position:e,pixelSize:10,color:e$1X.WHITE}),i.viewer.scene.primitives.add(i.points)),i.deactivate(),i.drawEvt.raiseEvent({object:i.point})}function F$j(e,t){var i=t;if(i._positions=[e,e],e$2e(i.polyline))i.polyline.show=!0;else{var n=i._clampMode>0,r=i._clampMode<l$p.S3mModel?_0x2b86ba.TERRAIN:i._clampMode<l$p.Both?_0x2b86ba.S3M_TILE:_0x2b86ba.BOTH;i.polyline=i.viewer.entities.add({polyline:{positions:new n$X((function(){return e$2e(i.polygon)?i._positions.concat([i._positions[0]]):i._positions}),!1),width:i._lineWidth,material:i._lineMaterial,clampToGround:n,classificationType:r}})}}function le$c(e,t){var i=t;if(i._positions=[e,e],F$j(e,t),e$2e(i.polygon))i.polygon.show=!0,i.polyline.show=!0,e$2e(i.rasterPolygon)&&i.viewer.scene.rasterVectorCollection.remove(i.rasterPolygon),e$2e(i.rasterPolylines)&&i.viewer.scene.rasterVectorCollection.remove(i.rasterPolylines);else{var n=l$p.Space===i._clampMode,r=i._clampMode<l$p.S3mModel?_0x2b86ba.TERRAIN:i._clampMode<l$p.Both?_0x2b86ba.S3M_TILE:_0x2b86ba.BOTH;i.polygon=i.viewer.entities.add({polygon:{hierarchy:new n$X((function(){return{positions:i._positions,holes:[]}}),!1),material:e$1X.ORANGE.withAlpha(.5),perPositionHeight:n,classificationType:r},depthTestEnabled:i._enableDepthTest})}}function ce$c(e,t){var i=t;a$18.fromCartesian(e).height,e$2e(i.marker)?i.marker.position=e:(i.markers=new w$O,i.marker=i.markers.add({position:e,image:n$17("Assets/Textures/maki/grepin.png"),verticalOrigin:S$Q.BOTTOM,scale:.5}),i.viewer.scene.primitives.add(i.markers)),i.deactivate(),i.drawEvt.raiseEvent({object:i.marker})}function he$9(e,t){e$2e(t.boxConfig)||(t.boxConfig={leftClickTimes:0,scratchPosition:new o$1p,length:0,width:0,height:0}),e$2e(t.boxes)||(t.boxes=[]);var i=t.boxConfig;if(0!==i.leftClickTimes||e$2e(e))if(i.leftClickTimes++,i.firstPoint=e,1===i.leftClickTimes)i.enu=m$19.eastNorthUpToFixedFrame(e),i.enuInverse=p$1d.inverse(i.enu,new p$1d),o$1p.clone(e,i.scratchPosition),t.box=i.entity=t.viewer.entities.add({position:new n$X((function(){return i.scratchPosition}),!1),box:{dimensions:new n$X((function(e,t){return(t=t||new o$1p(i.length,i.width,i.height)).x=i.length,t.y=i.width,t.z=i.height,t}),!1),material:e$1X.fromCssColorString("rgba(0, 160, 233, 0.5)"),outline:!0,outlineColor:e$1X.BLACK}}),t.boxes.push(t.box),i.box=i.entity.box;else if(2===i.leftClickTimes){var n=p$1d.multiplyByPoint(i.enuInverse,i.scratchPosition,new o$1p);o$1p.multiplyByScalar(n,2,n),i.secondPoint=p$1d.multiplyByPoint(i.enu,n,n)}}function pe$c(e,t){var i=t;if(i&&i.active&&i.isDrawing){var n=new o$1o(e.endPosition.x,e.endPosition.y);switch(i.mode){case _0x1522bc.Line:X$g(n,i,!1);break;case _0x1522bc.Polygon:Y$h(n,i,!1);break;case _0x1522bc.Box:ve$9(n,i)}}i.movingEvt.raiseEvent(new o$1o(e.endPosition.x,e.endPosition.y))}function X$g(e,t,i){var n=t;n.viewer.scene.pickPositionAsync(e).then((e=>{if(e$2e(e)){var t=n._positions.length;1==i?(n._positions[t]=e,n.positions.push(e.clone())):n._positions[t-1]=e}}))}function Y$h(e,t,i){var n=t;n.viewer.scene.pickPositionAsync(e).then((e=>{if(e$2e(e)){var t=n._positions.length;1==i?(n.positions.push(e.clone()),n._positions[t]=e):n._positions[t-1]=e}}))}Object.defineProperties(w$n.prototype,{drawEvt:{get:function(){return this._drawEvt}},activeEvt:{get:function(){return this._activeEvt}},clampMode:{get:function(){return this._clampMode},set:function(e){if(this._clampMode!==l$p.Raster&&e!==l$p.Raster){if(e$2e(e)&&e!=this._clampMode){if(this._clampMode=e,e$2e(this.polyline)&&e$2e(this.polyline.polyline)){var t=e!==l$p.Space,i=this._clampMode<l$p.S3mModel?_0x2b86ba.TERRAIN:this._clampMode<l$p.Both?_0x2b86ba.S3M_TILE:_0x2b86ba.BOTH;this.polyline.polyline.clampToGround=t,this.polyline.polyline.classificationType=i}if(e$2e(this.polygon)){var n=l$p.Space===this._clampMode;i=this._clampMode<l$p.S3mModel?_0x2b86ba.TERRAIN:this._clampMode<l$p.Both?_0x2b86ba.S3M_TILE:_0x2b86ba.BOTH;this.polygon.polygon.perPositionHeight=n,this.polygon.polygon.classificationType=i}}}else this._clampMode=l$p.Raster}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){this._enableDepthTest=e}},lineColor:{get:function(){return this._lineColor},set:function(e){if(o$1q.defined("lineColor value",e),!(e instanceof e$1X))throw new t$15("lineColor must be a instance of Color.");this._lineColor=e,this._lineMaterial=new t$P(e),e$2e(this.polyline)&&(this.polyline.polyline.material=new t$P(e))}},lineWidth:{get:function(){return this._lineWidth},set:function(e){o$1q.typeOf.number("handlerLineWidth",e),e!=this._lineWidth&&(this._lineWidth=e,e$2e(this.polyline)&&(this.polyline.polyline.width=e))}},lineMaterial:{get:function(){return this._lineMaterial},set:function(e){if(o$1q.defined("handlerLineMatrial value",e),e instanceof r$Y){let t=e.type,i=e.uniforms;t===r$Y.ColorType?this._lineMaterial=new t$P(i.color):t===r$Y.PolylineArrowType?this._lineMaterial=new t$n(i.color):t===r$Y.PolylineDashType?this._lineMaterial=new o$A(i):t===r$Y.PolylineOutlineType&&(this._lineMaterial=new e$y(i))}else this._lineMaterial=e;e$2e(this.polyline)&&(this.polyline.polyline.material=this._lineMaterial)}}}),w$n.prototype.activate=function(){if(1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){se$7(t,e)}),G$J.LEFT_CLICK),this.handler.setInputAction((function(t){pe$c(t,e)}),G$J.MOUSE_MOVE),this.handler.setInputAction((function(t){ye$7(t,e)}),G$J.RIGHT_CLICK),this.activeEvt.raiseEvent(!0)}},w$n.prototype.deactivate=function(){this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(G$J.LEFT_CLICK),this.handler.removeInputAction(G$J.MOUSE_MOVE),this.handler.removeInputAction(G$J.RIGHT_CLICK),this.activeEvt.raiseEvent(!1)},w$n.prototype.clear=function(){if(this.deactivate(),this.positions.length=0,this._positions.length=0,e$2e(this.rasterPolylines)&&(this.viewer.scene.rasterVectorCollection.remove(this.rasterPolylines),this.rasterPolylines=void 0),e$2e(this.rasterPolygon)&&(this.viewer.scene.rasterVectorCollection.remove(this.rasterPolygon),this.rasterPolygon=void 0),e$2e(this.polygon)&&(this.viewer.entities.remove(this.polygon),this.polygon=void 0),e$2e(this.polyline)&&(this.viewer.entities.remove(this.polyline),this.polyline=void 0),e$2e(this.points)&&(this.points.removeAll(),this.viewer.scene.primitives.remove(this.points),this.points=void 0),e$2e(this.markers)&&(this.viewer.scene.primitives.remove(this.markers),this.markers=void 0,e$2e(this.marker)&&(this.marker=void 0)),e$2e(this.corridor)&&this.viewer.entities.remove(this.corridor),e$2e(this.boxes)){for(var e=0,t=this.boxes.length;e<t;e++)this.viewer.entities.remove(this.boxes[e]);this.boxes=void 0,this.box=void 0,this.boxConfig=void 0}};var fe$9=new o$1p,I$t=new o$1p,Z$j=new o$1o,me$d=new i$1d;function ve$9(e,t,i){var n=t.boxConfig;if(e$2e(n))if(1==n.leftClickTimes)if(t.viewer.scene.mode===C$14.COLUMBUS_VIEW){var r=(y=t.viewer.scene.camera).getPickRay(e),o=m$19.convertToColumbusCartesian(n.firstPoint);e$2e(n.first)||(n.first=o$1p.clone(n.firstPoint));var a=o$1m.fromPointNormal(o,o$1p.UNIT_X);if(!e$2e(h=g$1j.rayPlane(r,a)))return;a$18.fromCartesian(n.firstPoint);var s=m$19.convertTo3DCartesian(h);n.second=o$1p.clone(s),s=a$18.fromCartesian(s);var l=Math.cos(s.latitude);n.ratio=l,s=a$18.toCartesian(s),h=m$19.convertToColumbusCartesian(s),n.scratchPosition=o$1p.midpoint(h,o,new o$1p),n.scratchPosition=m$19.convertTo3DCartesian(n.scratchPosition),n.length=Math.abs(h.y-o.y)*l,n.width=Math.abs(h.z-o.z),n.height=0}else{r=t.viewer.camera.getPickRay(e);var u=i$1d.unpack([0,0,0,o$1p.distance(n.firstPoint,o$1p.ZERO)],0,me$d),c=g$1j.raySphere(r,u),h=f$19.getPoint(r,c.start),d=p$1d.multiplyByPoint(n.enuInverse,h,fe$9);d.z=0,n.scratchPosition=p$1d.multiplyByPoint(n.enu,o$1p.divideByScalar(d,2,d),n.scratchPosition),p$1d.multiplyByPoint(n.enuInverse,n.scratchPosition,d),n.length=2*(d.x>0?d.x:-d.x),n.width=2*(d.y>0?d.y:-d.y),n.height=0}else if(n.leftClickTimes>1)if(t.viewer.scene.mode===C$14.COLUMBUS_VIEW){var f=(y=t.viewer.scene.camera).getPickRay(e),p=o$1o.fromElements(e.x+5,e.y,Z$j),_=y.getPickRay(p),m=o$1p.normalize(o$1p.cross(f.direction,_.direction,I$t),I$t),g=(a=o$1m.fromPointNormal(y.positionWC,m),m$19.convertToColumbusCartesian(n.second));g.x=.1;r=new f$19(g,o$1p.UNIT_X);var x=g$1j.rayPlane(r,a);if(!e$2e(x))return;o=m$19.convertToColumbusCartesian(n.first);n.scratchPosition=o$1p.midpoint(o,x,new o$1p),n.scratchPosition=m$19.convertTo3DCartesian(n.scratchPosition),n.secondPoint=m$19.convertTo3DCartesian(x),n.height=Math.abs(o.x-x.x)}else{var y;f=(y=t.viewer.scene.camera).getPickRay(e),p=o$1o.fromElements(e.x+5,e.y,Z$j),_=y.getPickRay(p),m=o$1p.normalize(o$1p.cross(f.direction,_.direction,I$t),I$t),a=o$1m.fromPointNormal(y.positionWC,m),r=new f$19(o$1p.ZERO,n.secondPoint);n.secondPoint=g$1j.rayPlane(r,a);var v=p$1d.multiplyByPoint(n.enuInverse,n.secondPoint,new o$1p);o$1p.divideByScalar(v,2,v),p$1d.multiplyByPoint(n.enu,v,n.scratchPosition),n.length=2*(v.x>0?v.x:-v.x),n.width=2*(v.y>0?v.y:-v.y),n.height=2*(v.z>0?v.z:-v.z)}}var V$k=0;function ye$7(e,t){var i=t;if(i&&i.active&&i.isDrawing){if(i.deactivate(),i.mode===_0x1522bc.Box)return t.boxConfig=void 0,void i.drawEvt.raiseEvent({object:i.box,positions:i._positions});if(!e$2e(i.polyline))return;if(i._positions=i._positions.slice(0,i._positions.length-1),i.mode===_0x1522bc.Polygon){if(i._positions.length<3)return void(i._positions.length=0);var n=[].concat(i._positions);if(i.polygon.positions=n,l$p.Raster===i._clampMode){i._positions.length=0,e$2e(i.polyline)&&(i.polyline.show=!1),e$2e(i.polygon)&&(i.polygon.show=!1);for(var r=[],o=0;o<n.length;o++)r.push(a$18.fromCartesian(n[o]));V$k+=1,i.rasterPolygon=V$k,i.viewer.scene.rasterVectorCollection.add({name:i.rasterPolygon,pickId:i.rasterPolygon,positions:r,fillColor:e$1X.ORANGE.withAlpha(.5),geometryType:C$q.POLYGON});var a=[];for(o=0;o<r.length;o++)a.push(r[o]);a.push(r[0]),i.rasterPolylines=V$k,i.viewer.scene.rasterVectorCollection.add({name:i.rasterPolylines,pickId:i.rasterPolylines,positions:a,lineColor:e$1X.fromCssColorString("#51ff00"),lineWidth:3,geometryType:C$q.POLYLINE}),i.drawEvt.raiseEvent({object:n,positions:i.positions})}else i.drawEvt.raiseEvent({object:i.polygon,positions:i.positions})}else i.mode===_0x1522bc.Line&&(i.polyline.positions=i._positions,i.drawEvt.raiseEvent({object:i.polyline,positions:i.positions}))}}w$n.prototype.getLinePositions=function(){return e$2e(this.polyline)?this.polyline.positions:[]};var w$m="referencePoint",I$s="referenceAddPoint",_$l=function(e,t){if(!e$2e(e)||!e$2e(t))throw new t$15("viewer and mode is required!");this.handler=new g$K(e.scene.canvas),this.viewer=e,this.active=!1,this.referencePointColor=e$1X.WHITE,this.editPointColor=e$1X.VIOLET,this.setEditObject(t),this._editZ=!1,this._changedEvt=new o$1h};function C$p(e,t){if(!e.scene.pickRasterData(t.position).isS3MTilesLayerSel)return e.scene.pickAsync(t.position).then((e=>{if(e$2e(e)){var t=u$Z(e.id,e.primitive.id);if(t instanceof h$W)return Promise.resolve(t);if(e$2e(e.primitive))return Promise.resolve(e)}}))}function K$h(e,t){var i=t;i&&i.active&&C$p(i.viewer,e).then((e=>{if(e$2e(e)){var t=e.id;if(!e$2e(t))return;var n=t.split("_");2==n.length&&n[0]===w$m&&(i._editPointIndex=parseInt(n[1]),i._editPoint=e.primitive,i._editPoint.color=i.editPointColor,i.viewer.scene._screenSpaceCameraController.enableRotate=!1)}}))}function G$o(e,t){var i=t;i&&i.active&&i._editPoint&&(i._editPointIndex=-1,e$2e(i._editPoint)&&(i._editPoint.color=i.referencePointColor,i._editPoint=void 0),i.viewer.scene._screenSpaceCameraController.enableRotate=!0,i._changedEvt.raiseEvent(t._positions))}function N$h(e,t){var i=t;if(i&&i.active&&i._editPointIndex>-1&&i.viewer.scene._screenSpaceCameraController._aggregator._isDown[0]){var n,r=new o$1o(e.endPosition.x,e.endPosition.y),o=i._polyline,a=i._polygon,s=!0;if(e$2e(o)&&(s=o.clampToGround instanceof e$1L?o.clampToGround._value:o.clampToGround),e$2e(a)&&(s=!a.perPositionHeight),s)n=i.viewer.scene.pickPosition(r);else if(i._editZ){var l=i.viewer.camera.getPickRay(r),u=new o$1o(r.x+5,r.y),c=i.viewer.camera.getPickRay(u),h=new o$1p;h=o$1p.cross(l.direction,c.direction,h);var d=new o$1p;o$1p.normalize(h,d);var f=o$1m.fromPointNormal(i.viewer.camera.position,d),p=new f$19(o$1p.ZERO,i._editPoint.position);n=g$1j.rayPlane(p,f)}else{p=i.viewer.camera.getPickRay(r);var _=new i$1d(o$1p.ZERO,o$1p.distance(i._editPoint.position,o$1p.ZERO)),m=g$1j.raySphere(p,_);n=f$19.getPoint(p,m.start)}i._editPoint.position=n;var g=i._positions;g[i._editPointIndex]=n,e$2e(o)&&(o.positions=new n$X((function(){return g}),!1)),e$2e(a)&&(a.hierarchy=new n$X((function(){return{positions:g,holes:[]}}),!1)),i.refreshReferenceAddPoint()}}function q$k(e,t){var i=t;i&&i.active&&C$p(i.viewer,e).then((e=>{if(e$2e(e)){var t=e.id;if(!e$2e(t))return;var n=t.split("_");if(2==n.length&&n[0]===I$s){var r=parseInt(n[1]),o=i._addPositions[r];(u=i._positions).splice(r+1,0,o);var a=i._polyline;e$2e(a)&&(a.positions=new n$X((function(){return u}),!1));var s=i._polygon;if(e$2e(s)){var l=new n$X((function(){return u}),!1),u=s.hierarchy.getValue(0);Array.isArray(u)?s.hierarchy=l:s.hierarchy.positions=l}i.refreshReferencePoint(),i.refreshReferenceAddPoint()}}}))}function j$m(e,t){var i=t;i&&i.active&&C$p(i.viewer,e).then((e=>{if(e$2e(e)){var t=e.id;if(!e$2e(t))return;var n=t.split("_");if(2==n.length&&n[0]===w$m){var r=parseInt(n[1]),o=i._positions;o.splice(r,1);var a=i._polyline;e$2e(a)&&(a.positions=new n$X((function(){return o}),!1));var s=i._polygon;e$2e(s)&&(s.hierarchy=new n$X((function(){return o}),!1)),i.refreshReferencePoint(),i.refreshReferenceAddPoint()}}}))}Object.defineProperties(_$l.prototype,{isEditZ:{get:function(){return this._editZ},set:function(e){this._editZ=e}},changedEvt:{get:function(){return this._changedEvt}}}),_$l.prototype.setEditObject=function(e){if(e$2e(e._polygon)||e$2e(e._polyline)){if(this.clear(),this._editObject=e,this._polygon=e._polygon,e$2e(this._polygon)){var t=this._polygon.hierarchy.getValue(0);if(!Array.isArray(t)){if(!Array.isArray(t.positions))throw new t$15("positions is required!");t=t.positions}if(this._polygon.classificationType&&(this._polygon.classificationType===_0x2b86ba.BOTH||this._polygon.classificationType===_0x2b86ba.TERRAIN)||!e$2e(this._polygon.height)&&!e$2e(this._polygon.extrudedHeight)&&e$2e(this._polygon.perPositionHeight)&&!this._polygon.perPositionHeight.getValue()){for(var i=[],n=0;n<t.length;n++){var r=a$18.fromCartesian(t[n]);r.height=this.viewer.scene.globe.getHeight(r),i.push(a$18.toCartesian(r))}this._positions=i}else this._positions=t}this._polyline=e._polyline,e$2e(this._polyline)&&(this._positions=this._polyline.positions.getValue(0)),this._editPoints=this.viewer.scene.primitives.add(new w$O({depthTestEnable:!1}));for(n=0;n<this._positions.length;n++)this._editPoints.add({id:w$m+"_"+n,position:this._positions[n],image:n$17("Assets/Textures/vertex-edit.png")});this._editPointIndex=-1,this._editPoint=void 0,this._addPositions=[],this._addPoints=this.viewer.scene.primitives.add(new w$O({depthTestEnable:!1}));for(n=0;n<this._positions.length-1;n++){var o=new o$1p;o$1p.add(this._positions[n],this._positions[n+1],o),o$1p.multiplyByScalar(o,.5,o),this._addPositions.push(o)}if(e$2e(this._polygon)){o=new o$1p;o$1p.add(this._positions[0],this._positions[this._positions.length-1],o),o$1p.multiplyByScalar(o,.5,o),this._addPositions.push(o)}for(n=0;n<this._addPositions.length;n++)this._addPoints.add({id:I$s+"_"+n,position:this._addPositions[n],image:n$17("Assets/Textures/middle-edit.png")});this.activate()}},_$l.prototype.activate=function(){if(1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){K$h(t,e)}),G$J.LEFT_DOWN),this.handler.setInputAction((function(t){G$o(t,e)}),G$J.LEFT_UP),this.handler.setInputAction((function(t){N$h(t,e)}),G$J.MOUSE_MOVE),this.handler.setInputAction((function(t){q$k(t,e)}),G$J.LEFT_CLICK),this.handler.setInputAction((function(t){j$m(t,e)}),G$J.RIGHT_CLICK)}},_$l.prototype.deactivate=function(){this.active=!1,this.handler.removeInputAction(G$J.LEFT_DOWN),this.handler.removeInputAction(G$J.LEFT_UP),this.handler.removeInputAction(G$J.MOUSE_MOVE),this.handler.removeInputAction(G$J.LEFT_CLICK),this.handler.removeInputAction(G$J.RIGHT_CLICK)},_$l.prototype.clear=function(){this.deactivate(),e$2e(this._editPoints)&&this._editPoints.removeAll(),e$2e(this._editPointIndex)&&(this._editPointIndex=-1),e$2e(this._editPoint)&&(this._editPoint=void 0),e$2e(this._editObject)&&(this._editObject=void 0),e$2e(this._polygon)&&(this._polygon=void 0),e$2e(this._polyline)&&(this._polyline=void 0),e$2e(this._addPoints)&&this._addPoints.removeAll(),e$2e(this._addPositions)&&(this._addPositions.length=0),e$2e(this._positions)&&(this._positions=void 0)},_$l.prototype.refreshReferencePoint=function(){e$2e(this._editPoints)&&this._editPoints.removeAll(),this._editPoints=this.viewer.scene.primitives.add(new w$O({depthTestEnable:!1}));for(var e=0;e<this._positions.length;e++)this._editPoints.add({id:w$m+"_"+e,position:this._positions[e],image:n$17("Assets/Textures/vertex-edit.png")});e$2e(this._editPointIndex)&&(this._editPointIndex=-1),e$2e(this._editPoint)&&(this._editPoint=void 0)},_$l.prototype.refreshReferenceAddPoint=function(){e$2e(this._addPoints)&&this._addPoints.removeAll(),this._addPositions=[],this._addPoints=this.viewer.scene.primitives.add(new w$O({depthTestEnable:!1}));for(var e=0;e<this._positions.length-1;e++){var t=new o$1p;o$1p.add(this._positions[e],this._positions[e+1],t),o$1p.multiplyByScalar(t,.5,t),this._addPositions.push(t)}if(e$2e(this._polygon)){t=new o$1p;o$1p.add(this._positions[0],this._positions[this._positions.length-1],t),o$1p.multiplyByScalar(t,.5,t),this._addPositions.push(t)}for(e=0;e<this._addPositions.length;e++)this._addPoints.add({position:this._addPositions[e],id:I$s+"_"+e,image:n$17("Assets/Textures/middle-edit.png")})};var e$m={Distance:0,Area:1,DVH:2,DVHX:3},_0x3c1870=Object.freeze(e$m),T$n=function(e,t,i,n){if(!e$2e(e)||!e$2e(t))throw new t$15("viewer and mode is required!");this.handler=new g$K(e.scene.canvas),this.viewer=e,this._clampMode=u$Z(i,l$p.Space),this.mode=t,this.isDrawing=!1,this.active=!1,this.tmpEntities=[],this._areaLabel=void 0,this._disLabel=void 0,this._vLabel=void 0,this._hLabel=void 0,this._measureEvt=new o$1h,this._activeEvt=new o$1h,this._enableDepthTest=!1,this._labelBackgroundColor=e$1X.fromCssColorString("rgba(38, 38, 38, 0.85)"),this._labelPixelOffsetScaleByDistance=new o$Y(150,3,15e6,.5),this._labelPixelOffset=new o$1o(15,0),this._lineColor=e$1X.fromCssColorString("#51ff00"),this._fillColor=e$1X.ORANGE.withAlpha(.5),this._lineWidth=2,this._dblclickListener=void 0,this._showMeasureResult=u$Z(n,!0),this._lineDisplayType=J$U.NON_OCCLUDED,this._lineMaterial=new t$P(this._lineColor)};function Le$7(e,t){var i=t;if(i&&i.active){var n=i.viewer.scene;n.pickPositionAsync(e.position).then((t=>{!e$2e(t)&&n.mode===C$14.SCENE2D&&(t=n.camera.pickEllipsoid(e.position));var r=n.pickPointEnabled?u$Z(o$1p.clone(n.pickPoint),t):t;if(r)if(i.isDrawing)if(i.mode==_0x3c1870.DVH||i.mode==_0x3c1870.DVHX)i.deactivate();else{var o=r;if(i&&i.active&&i.isDrawing&&e$2e(o))switch(i.mode){case _0x3c1870.Distance:ae$9(o,i);break;case _0x3c1870.Area:re$b(o,i);break;case _0x3c1870.DVH:pe$b(o,i)}Te$8(r,i)}else switch(i.isDrawing=!0,i.mode){case _0x3c1870.Distance:Pe$7(r,i);break;case _0x3c1870.Area:Se$7(r,i);break;case _0x3c1870.DVH:Oe$9(r,i);break;case _0x3c1870.DVHX:Ae$9(r,i)}}))}}function Me$8(e,t){var i=t,n=i.viewer.scene;n.pickPositionAsync(e.endPosition).then((t=>{!e$2e(t)&&n.mode===C$14.SCENE2D&&(t=n.camera.pickEllipsoid(e.endPosition));var r=n.pickPointEnabled?u$Z(o$1p.clone(n.pickPoint),t):t;if(i&&i.active&&i.isDrawing&&e$2e(r))switch(i.mode){case _0x3c1870.Distance:ae$9(r,i);break;case _0x3c1870.Area:re$b(r,i);break;case _0x3c1870.DVH:pe$b(r,i)}}))}function De$9(e,t){var i=t;i.viewer.scene.pickPositionAsync(e.position).then((e=>{if(i&&i.active&&i.isDrawing){var n;if(i.deactivate(),e$2e(i.polyline)&&(i.mode===_0x3c1870.Distance?(n=i._accumulationPositions,1===i.polyline.positions.length&&i.viewer.entities.remove(i.spEntity)):(i.mode===_0x3c1870.Area?i.polyline.positions.push(i.polyline.positions[0]):i.polyline.positions=i.polyline.positions.slice(0,i.polyline.positions.length-1),1===i.polyline.positions.length&&i.viewer.entities.remove(i.spEntity),n=i.polyline.positions),i.viewer.entities.remove(i.epEntity),!e$2e(i.polygon))){i.polylinePositions=n,i._disLabel.position=n[n.length-1];var r=0;if(t._clampMode===l$p.Ground)r=He$6(i.viewer.scene,i._accumulationPositions);else for(var o=0,a=n.length-1;o<a;o++)r+=o$1p.distance(n[o],n[o+1]);i._disLabel.show=!0,i.measureEvt.raiseEvent({distance:r.toFixed(8),positions:n})}if(e$2e(i.polygon)){if(n.length<3){i._areaLabel.show=!1,i.viewer.entities.remove(i.spEntity);for(o=0,a=i.tmpEntities.length;o<a;o++)i.viewer.entities.remove(i.tmpEntities[o]);i.tmpEntities.length=0,i.viewer.entities.remove(i.epEntity),i.polyline.positions.length=0}if(i._areaLabel.show=!0,(i._clampMode==l$p.Ground||i._clampMode==l$p.S3mModel)&&(i.polyline.show=!0),i.polygonPositions=i.polyline.positions,i.polygon.show=!0,n.length>2){if(i._clampMode!==l$p.Ground)i._areaLabel.position=i.polyline.positions[i.polyline.positions.length-1];else{var s=i.tmpEntities[i.tmpEntities.length-1]._position._value;i._areaLabel.position=s}if(i._clampMode===l$p.Ground){var l=xe$7(i.viewer.scene,i.polyline.positions);return void i.measureEvt.raiseEvent({area:l.toFixed(8),positions:n})}var u,c,h,d=A$1f.triangulate(n),f=d.length/3,p=0;for(o=0;o<f;o++)u=n[d[3*o]],c=n[d[3*o+1]],h=n[d[3*o+2]],E$r=o$1p.subtract(c,u,E$r),C$o=o$1p.subtract(h,u,C$o),L$o=o$1p.cross(E$r,C$o,L$o),p+=.5*o$1p.magnitude(L$o);i.measureEvt.raiseEvent({area:p.toFixed(8),positions:n})}}}}))}function Te$8(e,t){var i=t;i.mode===_0x3c1870.Distance?(i.polyline.positions.push(e),i._accumulationPositions.push(e)):(i.mode===_0x3c1870.Area&&(i._accumulationArea=i._currentArea),i.polyline.positions.pop(),i.polyline.positions.push(e),i.polyline.positions.push(i.polyline.positions[0])),e$2e(i.polygon)&&(i.polygonPositions=i.polyline.positions),i.tmpEntities.push(i.viewer.entities.add({show:i._showMeasureResult,position:e,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}))}Object.defineProperties(T$n.prototype,{activeEvt:{get:function(){return this._activeEvt}},measureEvt:{get:function(){return this._measureEvt}},disLabel:{get:function(){return this._disLabel}},areaLabel:{get:function(){return this._areaLabel}},hLabel:{get:function(){return this._hLabel}},vLabel:{get:function(){return this._vLabel}},clampMode:{get:function(){return this._clampMode},set:function(e){e$2e(e)&&e!=this._clampMode&&(this._clampMode=e,e$2e(this.polygon)&&(e==l$p.Space?(this.polygon.polygon.perPositionHeight.setValue(!0),this.polygon.clampToS3M=!1):e==l$p.Ground?(this.polygon.polygon.perPositionHeight.setValue(!1),this.polygon.clampToS3M=!1):e==l$p.S3mModel&&(this.polygon.polygon.perPositionHeight.setValue(!1),this.polygon.clampToS3M=!0)),e$2e(this.polyline)&&(e==l$p.Ground?this.polyline._polyline.clampToGround=!0:this.polyline._polyline.clampToGround=!1))}},enableDepthTest:{get:function(){return this._enableDepthTest},set:function(e){console.warn("MeasureHandler.enableDepthTest is deprecated, use MeasureHandler.lineDisplayType instead."),o$1q.typeOf.bool("MeasureHandler.enableDepthTest",e),this._enableDepthTest=e,this._lineDisplayType=e?J$U.OCCLUDED:J$U.NON_OCCLUDED}},capturePointSize:{get:function(){return this.viewer._capturePointSize},set:function(e){this.viewer._capturePointSize=e}},capturePointColor:{get:function(){return this.viewer._capturePointColor},set:function(e){this.viewer._capturePointColor=e}},lineColor:{get:function(){return this._lineColor},set:function(e){if(o$1q.defined("lineColor value",e),!(e instanceof e$1X))throw new t$15("lineColor must be a instance of Color.");this._lineColor=e,this._lineMaterial=new t$P(e),e$2e(this.polyline)&&(this.polyline.polyline.material=new t$P(e))}},fillColor:{get:function(){return this._fillColor},set:function(e){this._fillColor=e}},lineWidth:{get:function(){return this._lineWidth},set:function(e){o$1q.typeOf.number("handlerLineWidth",e),e!=this._lineWidth&&(this._lineWidth=e,e$2e(this.polyline)&&(this.polyline.polyline.width=e))}},lineDisplayType:{get:function(){return this._lineDisplayType},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("MeasureHandler.lineDisplayType",e,0),o$1q.typeOf.number.lessThanOrEquals("MeasureHandler.lineDisplayType",e,2),this._lineDisplayType=e,this.polylines&&(this.polylines.lineDisplayType=e)}},points:{get:function(){return this.tmpEntities}},lineMaterial:{get:function(){return this._lineMaterial},set:function(e){if(o$1q.defined("handlerLineMatrial value",e),e instanceof r$Y){let t=e.type,i=e.uniforms;t===r$Y.ColorType?this._lineMaterial=new t$P(i.color):t===r$Y.PolylineArrowType?this._lineMaterial=new t$n(i.color):t===r$Y.PolylineDashType?this._lineMaterial=new o$A(i):t===r$Y.PolylineOutlineType&&(this._lineMaterial=new e$y(i))}else this._lineMaterial=e;e$2e(this.polyline)&&(this.polyline.polyline.material=this._lineMaterial)}}}),T$n.prototype.activate=function(){if(this.mode!==_0x3c1870.DVH&&this.clear(),1!=this.active){this.active=!0;var e=this;this.handler.setInputAction((function(t){Le$7(t,e)}),G$J.LEFT_CLICK),this.handler.setInputAction((function(t){Me$8(t,e)}),G$J.MOUSE_MOVE),this.handler.setInputAction((function(t){De$9(t,e)}),G$J.RIGHT_CLICK),this.activeEvt.raiseEvent(!0),this._dblclickListener=this.viewer.screenSpaceEventHandler.getInputAction(G$J.LEFT_DOUBLE_CLICK),this.viewer.screenSpaceEventHandler.removeInputAction(G$J.LEFT_DOUBLE_CLICK)}},T$n.prototype.deactivate=function(){!0===this.active&&this.activeEvt.raiseEvent(!1),this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(G$J.LEFT_CLICK),this.handler.removeInputAction(G$J.MOUSE_MOVE),this.handler.removeInputAction(G$J.RIGHT_CLICK),e$2e(this._dblclickListener)&&(this.viewer.screenSpaceEventHandler.setInputAction(this._dblclickListener,G$J.LEFT_DOUBLE_CLICK),this._dblclickListener=void 0)},T$n.prototype.clear=function(){this.deactivate();for(var e=0,t=this.tmpEntities.length;e<t;e++)this.viewer.entities.remove(this.tmpEntities[e]);if(this.tmpEntities.length=0,e$2e(this.polylines)&&(this.polylines.removeAll(),this.viewer.scene.primitives.remove(this.polylines),this.polylines=void 0),e$2e(this.spEntity)&&(this.viewer.entities.remove(this.spEntity),this.spEntity=void 0),e$2e(this.epEntity)&&(this.viewer.entities.remove(this.epEntity),this.epEntity=void 0),e$2e(this.fpEntity)&&(this.viewer.entities.remove(this.fpEntity),this.fpEntity=void 0),e$2e(this.labels))switch(this.mode){case _0x3c1870.Distance:this.labels.remove(this._disLabel);break;case _0x3c1870.Area:this.labels.remove(this._areaLabel);break;case _0x3c1870.DVH:this.labels.removeAll()}e$2e(this.polygon)&&(this.viewer.entities.remove(this.polygon),this.polygon=void 0),e$2e(this.polyline)&&this.viewer.entities.remove(this.polyline)};var E$r=new o$1p,C$o=new o$1p,L$o=new o$1p;function re$b(e,t){var i=t;if(e$2e(e)){i.endPoint=e;var n=i.polyline.positions,r=n.length;if(r>3?(n[r-2]=e,n.pop()):n[r-1]=e,r>2&&(e$2e(i._areaLabel)&&(i._areaLabel.show=!0),i.polygonPositions=n),i.polyline.positions=n,n.length>2){var o;if(i.epEntity.position=e,i._areaLabel.position=e,i._areaLabel.show=t._clampMode!==l$p.Ground,i.polyline.positions.push(i.polyline.positions[0]),t._clampMode===l$p.Ground)return;o=T$n.computeArea(n),i.measureEvt.raiseEvent({area:o.toFixed(8),positions:n})}}}function Se$7(e,t){var i=t;i.polygonPositions=[],i.polylineCoord=[e,e],i.tmpEntities.length=0;var n=i._enableDepthTest;i.polyline=i.viewer.entities.add({polyline:{positions:new n$X((function(){return i.polylineCoord}),!1),width:i._lineWidth,material:i._lineMaterial,loop:!0,clampToGround:i._clampMode===l$p.Ground}}),i.polyline.positions=i.polylineCoord,i.spEntity=i.viewer.entities.add({position:e,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}});var r=i.viewer.scene.primitives.add(new g$W({depthTestEnable:!1}));i._areaLabel=r.add({position:e,font:"100 20px SimSun",fillColor:e$1X.WHITE,style:R$S.FILL_AND_OUTLINE,showBackground:!0,outlineWidth:1,outlineColor:e$1X.BLUE,pixelOffset:i._labelPixelOffset,text:"",show:i._showMeasureResult,horizontalOrigin:j$V.LEFT});var o=i._clampMode,a=!1,s=!1;o==l$p.Space?a=!0:o==l$p.S3mModel&&(s=!0),i.polygon=i.viewer.entities.add({polygon:{hierarchy:new n$X((function(){return{positions:JSON.parse(JSON.stringify(i.polygonPositions)),holes:[]}}),!1),material:i._fillColor,perPositionHeight:a},clampToS3M:s,depthTestEnabled:n,show:!0}),i.labels=r,t._clampMode===l$p.Ground&&(i.polyline.show=!0),i._areaLabel.show=!1,i.tmpEntities.push(i.spEntity)}function Pe$7(e,t){var i=t;i.polylinePositions=[e,e],i.polyline=i.viewer.entities.add({polyline:{positions:new n$X((function(){return i.polylinePositions}),!1),width:i._lineWidth,material:i._lineMaterial,clampToGround:t._clampMode===l$p.Ground}}),i.polyline.positions=i.polylinePositions,i.tmpEntities.length=0,i._accumulationPositions=[e],i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}});var n=i.viewer.scene.primitives.add(new g$W({depthTestEnable:!1}));i._disLabel=n.add({position:e,font:"100 20px SimSun",fillColor:e$1X.WHITE,style:R$S.FILL_AND_OUTLINE,showBackground:!0,backgroundColor:i._labelBackgroundColor,outlineWidth:1,outlineColor:e$1X.BLUE,pixelOffset:i._labelPixelOffset,text:"",show:i._showMeasureResult,horizontalOrigin:j$V.LEFT}),i.labels=n,i.tmpEntities.push(i.spEntity)}function ae$9(e,t){var i=t;i.endPoint=e;var n=i.polyline.positions,r=n.length;i.polylinePositions=n,n[r-1]=e,i.polyline.positions=n,i.epEntity.position=e;var o=0,a=i._accumulationPositions.concat([e]);if(i.polyline._distance=o,i._disLabel.position=e,i._disLabel.show=t._clampMode!==l$p.Ground,t._clampMode!==l$p.Ground){for(var s=0,l=a.length-1;s<l;s++)o+=o$1p.distance(a[s],a[s+1]);i.measureEvt.raiseEvent({distance:o.toFixed(8),positions:a})}}function Oe$9(e,t){var i=t;if(!e$2e(i.polylines)){var n=i._enableDepthTest;i.polylines=new J$T({opaqueRS:d$1m.fromCache({depthMask:n,depthTest:{enabled:n}}),lineDisplayType:i._lineDisplayType}),i.viewer.scene.primitives.add(i.polylines)}i.horizontalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$Y.fromType(r$Y.ColorType,{color:i._lineColor})}),i.verticalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$Y.fromType(r$Y.ColorType,{color:i._lineColor})}),i.dirPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$Y.fromType(r$Y.ColorType,{color:i._lineColor})}),i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}),i.epEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}),i.fpEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}),i.tmpEntities.push(i.spEntity),i.tmpEntities.push(i.epEntity),i.tmpEntities.push(i.fpEntity),e$2e(i.labels)||(i.labels=i.viewer.scene.primitives.add(new g$W({depthTestEnable:!1}))),i._disLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:R$S.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1X.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$V.LEFT}),i._vLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:R$S.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1X.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$V.LEFT}),i._hLabel=i.labels.add({position:e,font:"500 16px sans-serif",style:R$S.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1X.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$V.LEFT});var r=new o$1p;o$1p.normalize(e,r),i.plane=o$1m.fromPointNormal(e,r),i.startPoint=e,i.startHeight=a$18.fromCartesian(e).height,i.normal=r;var o=new o$1p;o$1p.negate(r,o),i.negateNormal=o,i.spEntity.position=e}function Ae$9(e,t){var i=t;if(!e$2e(i.polylines)){i.polylines=new J$T,i.verticalPolyline=i.polylines.add({width:2,show:i._showMeasureResult,positions:[e,e],material:r$Y.fromType(r$Y.ColorType,{color:i._lineColor})}),i.startPoint=e,i.spEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}}),i.fpEntity=i.viewer.entities.add({position:e,show:i._showMeasureResult,point:{pixelSize:8,color:e$1X.fromCssColorString("#ffe500")}});var n=i.viewer.scene.primitives.add(new g$W({depthTestEnable:!1}));i._vLabel=n.add({position:e,font:"500 16px sans-serif",style:R$S.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:e$1X.BLACK,showBackground:!0,backgroundColor:i._labelBackgroundColor,pixelOffset:i._labelPixelOffset,pixelOffsetScaleByDistance:i._labelPixelOffsetScaleByDistance,text:"",show:i._showMeasureResult,horizontalOrigin:j$V.LEFT}),i.viewer.scene.primitives.add(i.polylines),i.labels=n}i.startPoint=e,i.spEntity.position=e}var ke$5=new o$1p;function pe$b(e,t){var i=t;if(i.viewer.scene,e$2e(e)){i.endPoint=e;var n,r,o=a$18.fromCartesian(e).height;if(o>i.startHeight){var a=o$1p.normalize(e,ke$5);n=o$1m.fromPointNormal(e,a),r=new f$19(i.startPoint,a)}else n=i.plane,r=new f$19(e,i.normal);var s=g$1j.rayPlane(r,n);if(e$2e(s)||(r=new f$19(e,i.normal),s=g$1j.rayPlane(r,i.plane))){o>i.startHeight?(i.horizontalPolyline.positions=[e,s],i.verticalPolyline.positions=[i.startPoint,s]):(i.horizontalPolyline.positions=[i.startPoint,s],i.verticalPolyline.positions=[e,s]),i.dirPolyline.positions=[i.startPoint,e],i.epEntity.position=e,i.fpEntity.position=s;var l=o$1p.distance(i.startPoint,e).toFixed(8),u=o$1p.distance(i.startPoint,s).toFixed(8),c=o$1p.distance(e,s).toFixed(8);o>i.startHeight?(o$1p.lerp(i.startPoint,e,.5,i._disLabel.position),o$1p.lerp(i.startPoint,s,.5,i._vLabel.position),o$1p.lerp(e,s,.5,i._hLabel.position)):(o$1p.lerp(i.startPoint,e,.5,i._disLabel.position),o$1p.lerp(e,s,.5,i._vLabel.position),o$1p.lerp(i.startPoint,s,.5,i._hLabel.position),u=o$1p.distance(e,s).toFixed(8),c=o$1p.distance(i.startPoint,s).toFixed(8)),i.measureEvt.raiseEvent({distance:l,directionalPositions:i.dirPolyline.positions,verticalHeight:u,verticalPositions:i.verticalPolyline.positions,horizontalDistance:c,horizontalPositions:i.horizontalPolyline.positions,endHeight:o})}}}function xe$7(e,t){for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=0;a<t.length;a++){var s=a$18.fromCartesian(t[a]);i=Math.min(s.longitude,i),n=Math.max(s.longitude,n),r=Math.min(s.latitude,r),o=Math.max(s.latitude,o)}for(var l=a$18.toCartesian(new a$18(i,r,0)),u=a$18.toCartesian(new a$18(n,o,0)),c=o$1p.angleBetween(l,u),h=U$18.fromPositions({positions:t,granularity:c/32}),d=U$18.createGeometry(h),f=0,p={},_=0;_<d.indices.length;_+=3){var m,g=d.indices[_];if(e$2e(p[g]))m=p[g];else{m=new o$1p(d.attributes.position.values[3*g],d.attributes.position.values[3*g+1],d.attributes.position.values[3*g+2]);var x=a$18.fromCartesian(m),y=e.globe.getHeight(x);if(!e$2e(y))continue;x=a$18.fromRadians(x.longitude,x.latitude,y),m=a$18.toCartesian(x),p[g]=o$1p.clone(m)}var v,$=d.indices[_+1];if(e$2e(p[$]))v=p[$];else{v=new o$1p(d.attributes.position.values[3*$],d.attributes.position.values[3*$+1],d.attributes.position.values[3*$+2]);var b=a$18.fromCartesian(v),T=e.globe.getHeight(b);if(!e$2e(T))continue;b=a$18.fromRadians(b.longitude,b.latitude,T),v=a$18.toCartesian(b),p[$]=o$1p.clone(v)}var C,S=d.indices[_+2];if(e$2e(p[S]))C=p[S];else{C=new o$1p(d.attributes.position.values[3*S],d.attributes.position.values[3*S+1],d.attributes.position.values[3*S+2]);var w=a$18.fromCartesian(C),E=e.globe.getHeight(w);if(!e$2e(E))continue;w=a$18.fromRadians(w.longitude,w.latitude,E),C=a$18.toCartesian(w),p[S]=o$1p.clone(C)}E$r=o$1p.subtract(v,m,E$r),C$o=o$1p.subtract(C,m,C$o),L$o=o$1p.cross(E$r,C$o,L$o),f+=.5*o$1p.magnitude(L$o)}return f}function He$6(e,t){for(var i=0,n=[],r=t.length-1,o=0;o<r;o++){var a=t[o],s=t[o+1],l=o$1p.angleBetween(a,s);if(!(l<e$2d.EPSILON10))for(var u=l/64,c=e$2d.chordLength(u,6378137),h=y$Z.subdivideLine(a,s,c,n),d=o$1p.unpackArray(h),f=d.length-1,p=0;p<f;p++){var _=d[p],m=a$18.fromCartesian(_),g=e.globe.getHeight(m);m=a$18.fromRadians(m.longitude,m.latitude,g);var x=a$18.toCartesian(m),y=d[p+1];m=a$18.fromCartesian(y),g=e.globe.getHeight(m),m=a$18.fromRadians(m.longitude,m.latitude,g);var v=a$18.toCartesian(m);i+=o$1p.distance(x,v)}}return i}T$n.computeArea=function(e){for(var t,i,n,r=A$1f.triangulate(e),o=r.length/3,a=0,s=0;s<o;s++)t=e[r[3*s]],i=e[r[3*s+1]],n=e[r[3*s+2]],E$r=o$1p.subtract(i,t,E$r),C$o=o$1p.subtract(n,t,C$o),L$o=o$1p.cross(E$r,C$o,L$o),a+=.5*o$1p.magnitude(L$o);return a},T$n.prototype.getLinePositions=function(){return e$2e(this.polyline)?this.polyline.positions:[]};var l$o={LINE_X:1,LINE_Y:2,LINE_Z:3,CIRCLE_X:4,CIRCLE_Y:5,CIRCLE_Z:6,SCALE_LINE_X:7,SCALE_LINE_Y:8,SCALE_LINE_Z:9,UNIFORM_SCALE:10},U$l={ENTITY:1,S3MINSTANCE:2},q$j=new o$1p,J$f=new o$1p,K$g=new o$1p,de$7=new o$1p,I$r=new o$1p;new p$1d;var Te$7=new o$1p,Y$g=new p$1e,me$c=new n$15,g$v=new p$1d,Re$7=new p$1d,Ae$8=new p$1d,be$9=new o$1p,Ze$5=new o$1p,Oe$8=new o$1p,Ue$4=new o$1p,S$l=new i$16,Ye$4=new p$1d;new o$1p;var $$h=new o$1p;function z$n(e,t){for(var i=e.attributes.position.values,n=0,r=i.length;n<r;n+=3)i[n+2]+=t}function De$8(e,t,i){var n=p$1d.getMatrix3(e,Y$g),r=n$15.fromRotationMatrix(n,me$c),o=p$1e.fromQuaternion(r,Y$g),a=p$1d.fromRotationTranslation(o,o$1p.ZERO,Ye$4),s=p$1d.inverse(t,g$v),l=p$1d.multiply(s,a,g$v),u=p$1d.getMatrix3(l,Y$g);return p$1d.fromRotationTranslation(u,o$1p.ZERO,i)}function ve$8(e,t){return p$1d.getMatrix3(e,Y$g),n$15.fromRotationMatrix(Y$g,t),t}function b$v(e,t,i,n){var r=e.getPickRay(t),o=o$1m.fromPointNormal(i,n);return g$1j.rayPlane(r,o)}function We$3(e,t,i){var n=[],r=t$X.createVertexBuffer({context:e,typedArray:S$14.createTypedArray(S$14.FLOAT,i.attributes.position.values),usage:A$18.STATIC_DRAW});n.push({name:"aPosition",index:0,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var o=new c$13({context:e,attributes:n,indexBuffer:t$X.createIndexBuffer({context:e,typedArray:i.indices,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})}),a=r$14.fromCache({name:"modelEditor",context:e,vertexShaderSource:"attribute vec4 aPosition;\nuniform vec4 uColor;\nuniform vec4 uPickColor;\nuniform float uScale;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n vColor = uColor;\n vPickColor = uPickColor;\n mat4 scaleMatrix;\n scaleMatrix[0] = vec4(uScale, 0.0, 0.0, 0.0);\n scaleMatrix[1] = vec4(0.0, uScale, 0.0, 0.0);\n scaleMatrix[2] = vec4(0.0, 0.0, uScale, 0.0);\n scaleMatrix[3] = vec4(0.0, 0.0, 0.0, 1.0);\n gl_Position = czm_modelViewProjection * scaleMatrix * vec4(aPosition.xyz, 1.0);\n}",fragmentShaderSource:"varying vec4 vColor;\nvarying vec4 vPickColor;\nvoid main()\n{\n gl_FragColor = vColor;\n}\n",attributeLocations:{aPosition:0}}),s=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:t._modelMatrix,pass:Le$q.LOG_DEPTH_OVERLAY,owner:t});s.vertexArray=o,s.shaderProgram=a;var l={id:t._id,primitive:t},u=e.createPickId(l);s.pickId="vPickColor",s.uniformMap={uColor:function(){return t._uColor},uPickColor:function(){return u.color},uScale:function(){return t._scaleAdjusted}},s.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var c=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:t._modelMatrix,pass:Le$q.OPAQUE+2,owner:t});c.vertexArray=o,c.shaderProgram=a;var h={id:t._id+"#2",primitive:t},d=e.createPickId(h);c.pickId="vPickColor",c.uniformMap={uColor:function(){return t._uColor.withAlpha(.2)},uPickColor:function(){return d.color},uScale:function(){return t._scaleAdjusted}},c.renderState=d$1m.fromCache({depthMask:!1,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),t._commands.push(c),t._commands.push(s)}var Be$7=new n$15;function Xe$4(e,t){var i=t.modelMatrix,n=o$1p.negate(e._offset,K$g),r=p$1d.fromTranslation(n,Ae$8),o=m$19.eastNorthUpToFixedFrame(e._position,void 0,Re$7),a=De$8(i,o,g$v),s=ve$8(a,Be$7);p$1d.multiply(o,p$1d.multiply(a,r,a),g$v);var l=p$1d.getTranslation(g$v,Te$7);ke$4(e,l,ve$8(g$v,me$c),t.nonUniformScaleAddition,t.uniformScaleAddition,r),Fe$7(e,l,s,t.nonUniformScaleAddition,t.uniformScaleAddition)}function ke$4(e,t,i,n,r,o){if(e._modelType===U$l.ENTITY){e._model.model._offsetMatrix=o,e._model.position=t,e._model.orientation=i;var a=n;n||(a=o$1p.clone(o$1p.ZERO)),r&&(a.x+=r,a.y+=r,a.z+=r),e._model.model.scale||(e._model.model.scale=o$1p.clone(o$1p.UNIT_XYZ));var s=e._model.model.scale.getValue(0);s instanceof o$1p?(o$1p.add(a,s,a),e._model.model.scale=a):(a.x+=s,a.y+=s,a.z+=s,e._model.model.scale=a)}}function Fe$7(e,t,i,n,r){if(e._modelType===U$l.S3MINSTANCE){e._model.updatePosition(t);var o=i$16.fromQuaternion(i);e._model.updateRotation(o);var a=o$1p.clone(e._model.scale);e$2e(r)&&(a.x+=r,a.y+=r,a.z+=r),e$2e(n)&&o$1p.add(a,n,a),e._model.updateScale(a)}}function D$k(e,t){e.prototype.__proto__=Object.create(t.prototype),e.prototype.__proto__.constructor=e}function E$q(e){this._owner=e.owner,this._color=e$1X.clone(u$Z(e.color,e$1X.WHITE)),this._hoverColor=e$1X.clone(u$Z(e.hoverColor,e$1X.WHITE)),this._uColor=e$1X.clone(this._color),this._visible=u$Z(e.visible,!0),this._scale=u$Z(e.scale,o$1p.UNIT_XYZ),this._initTransition=u$Z(e.transition,new o$1p),this._initHpr=u$Z(e.headingPitchRoll,new i$16),this._initModelMatrix=p$1d.clone(p$1d.IDENTITY),this._initModelMatrixInverse=p$1d.clone(p$1d.IDENTITY),this._modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._id=u$Z(e.id,e$1T()),this._typeForModelEditor=u$Z(e.type,-1),this._commands=[],this._geometries=[],this._updateMatrix(),this._setChangeEvt(),this._adjustAxisLength=void 0,this._scaleAdjusted=1}function je$4(e,t){return function(i){if(!(e$2e(i)&&i<.05)){var n=150*Ge$4(e,t._owner._model._position||t._owner._model._position._value);t._scaleAdjusted=Math.max(n/10,1),t._scaleAdjusted=t._scaleAdjusted>1e3?1:t._scaleAdjusted}}}function W$n(e){this._color=u$Z(e.color,e$1X.WHITE),this._lineWidth=u$Z(e.lineWidth,.02),this._lineLength=u$Z(e.lineLength,5),this._arrowWidth=u$Z(e.arrowWidth,.2),this._arrowLength=u$Z(e.arrowLength,1),this._lineWidth=this._lineWidth*u$Z(e.lineWidthScale,4),E$q.call(this,e)}function B$j(e){this._lineWidth=u$Z(e.lineWidth,.02),this._lineLength=u$Z(e.lineLength,10),this._headDimension=u$Z(e.headDimension,.2),E$q.call(this,e)}function ee$b(e){this._dimensions=u$Z(e.dimensions,.2),this._color=u$Z(e.color,e$1X.WHITE),E$q.call(this,e)}function X$f(e){this._width=u$Z(e.width,.02),this._radius=u$Z(e.radius,7.5),this._width=this._width*u$Z(e.lineWidthScale,4),E$q.call(this,e)}function k$l(e){this._dimensions=u$Z(e.dimensions,.2),E$q.call(this,e)}function u$o(e){o$1q.typeOf.object("options",e),o$1q.typeOf.object("options.scene",e.scene),o$1q.typeOf.object("options.model",e.model);var t=e.model,i=t instanceof h$W;if(!i&&!(t instanceof _0x24f13b))throw new t$15("Unsupported model type.");this._scene=e.scene,this._modelType=i?U$l.ENTITY:U$l.S3MINSTANCE,this._offset=u$Z(e.offset,o$1p.ZERO),this._hoverColor=u$Z(e.hoverColor,e$1X.WHITE),this._scale=u$Z(e.scale,1),this._model=t,this._active=!1,this._hpr=void 0,this._handler=new g$K(this._scene.canvas),this._primitives=[],this._axesShow=p$19(e.axesShow,{translation:!0,rotation:!0,scale:!0}),this._lineWidthScale=u$Z(e.lineWidthScale,4),this._modelType===U$l.ENTITY?(this._position=t.position.getValue(0),this._orientation=t.orientation?t.orientation.getValue(0):new n$15,this._calcHpr()):(this._position=t.position,this._hpr=i$16.clone(t.hpr)),this._fromEnu=m$19.eastNorthUpToFixedFrame(this._position),p$1d.multiplyByPoint(this._fromEnu,this._offset,this._position),this._modelMatrix=m$19.headingPitchRollToFixedFrame(this._position,this._hpr),this._modelMatrixInverse=p$1d.inverse(this._modelMatrix,new p$1d),!e$2e(this._changedEvt)&&(this._changedEvt=new o$1h),!e$2e(this._hoverChanged)&&(this._hoverChanged=new o$1h),this._axesCreated=!1;var n=this;this._changedEvt.addEventListener((function(e){Xe$4(n,e)}))}function Ge$4(e,t){var i=e.context._us,n=i._viewport,r=n.width,o=n.height,a=new o$1p;p$1d.multiplyByPoint(i._view,t,a);var s,l,u=i.frustumPlanes,c=u.x,h=u.y,d=u.z,f=u.w;if(e.mode===C$14.COLUMBUS_VIEW||i.orthographicIn3D){s=(f-d)/r,l=(c-h)/o}else{var p=-a.z,_=1/i.currentFrustum.x,m=c*_;l=2*p*m/o,s=2*p*(m=f*_)/r}return Math.max(s,l)}E$q.prototype._setChangeEvt=function(){var e=this;this._owner._changedEvt.addEventListener((function(t){p$1d.multiply(t.modelMatrix,e._initModelMatrix,e._modelMatrix)})),this._owner._hoverChanged.addEventListener((function(t){t===e._typeForModelEditor?e$1X.clone(e._hoverColor,e._uColor):e$1X.clone(e._color,e._uColor),t>=1&&t<=10&&t!==e._typeForModelEditor?e._color=e._color.withAlpha(.05,e._color):e._color=e._color.withAlpha(1,e._color)}))},E$q.prototype._createGeometry=function(){},E$q.prototype._updateMatrix=function(){p$1d.fromTranslationQuaternionRotationScale(this._initTransition,n$15.fromHeadingPitchRoll(this._initHpr),this._scale,this._initModelMatrix),p$1d.inverse(this._initModelMatrix,this._initModelMatrixInverse),p$1d.multiply(this._modelMatrix,this._initModelMatrix,this._modelMatrix)},E$q.prototype.update=function(e){if(e$2e(this._adjustAxisLength)||(this._adjustAxisLength=je$4(e,this),e.camera.changed.addEventListener(this._adjustAxisLength)),0===this._commands.length){this._createGeometry();for(var t=0,i=this._geometries.length;t<i;t++){var n=this._geometries[t];We$3(e.context,this,n)}}if(this._visible)for(t=0,i=this._commands.length;t<i;t++){var r=this._commands[t];e.commandList.push(r)}},E$q.prototype.destroy=function(){this._geometries.length=0;for(var e=0,t=this._commands.length;e<t;e++){var i=this._commands[e];i.vertexArray=i.vertexArray&&!i.vertexArray.isDestroyed()&&i.vertexArray.destroy(),i.shaderProgram=i.shaderProgram&&!i.shaderProgram.isDestroyed()&&i.shaderProgram.destroy()}this._commands.length=0},W$n.prototype._createGeometry=function(){var e=l$Q.createGeometry(new l$Q({length:this._lineLength,topRadius:this._lineWidth,bottomRadius:this._lineWidth})),t=l$Q.createGeometry(new l$Q({length:this._arrowLength,topRadius:.01,bottomRadius:this._arrowWidth}));z$n(e,this._lineLength/2),z$n(t,this._lineLength),this._geometries.push(e),this._geometries.push(t)},D$k(W$n,E$q),B$j.prototype._createGeometry=function(){var e=l$Q.createGeometry(new l$Q({length:this._lineLength,topRadius:this._lineWidth,bottomRadius:this._lineWidth})),t=O$z.createGeometry(new O$z({minimum:new o$1p(-this._headDimension,-this._headDimension,-this._headDimension),maximum:new o$1p(this._headDimension,this._headDimension,this._headDimension),vertexFormat:n$13.POSITION_AND_NORMAL}));z$n(e,this._lineLength/2),z$n(t,this._lineLength),this._geometries.push(e),this._geometries.push(t)},D$k(B$j,E$q),ee$b.prototype._createGeometry=function(){var e=O$z.createGeometry(new O$z({minimum:new o$1p(-this._dimensions,-this._dimensions,-this._dimensions),maximum:new o$1p(this._dimensions,this._dimensions,this._dimensions),vertexFormat:n$13.POSITION_AND_NORMAL}));this._geometries.push(e)},D$k(ee$b,E$q),X$f.prototype._createGeometry=function(){var e=N$A.createGeometry(new N$A({polylinePositions:function(e){for(var t=[],i=0;i<=360;i+=3){var n=e$2d.toRadians(i),r=new o$1p(e*Math.cos(n),e*Math.sin(n),0);t.push(r)}return t}(this._radius),shapePositions:function(e){for(var t=[],i=0;i<=360;i+=10){var n=e$2d.toRadians(i);t.push(new o$1o(e*Math.cos(n),e*Math.sin(n)))}return t}(this._width),vertexFormat:n$13.POSITION_AND_NORMAL}));this._geometries.push(e)},D$k(X$f,E$q),k$l.prototype._createGeometry=function(){var e=this._dimensions,t=P$H.createGeometry(new P$H({polygonHierarchy:new e$1M([new o$1p(-e,e,0),new o$1p(-e,-e,0),new o$1p(e,-e,0),new o$1p(e,e,0)]),perPositionHeight:!0,vertexFormat:n$13.POSITION_AND_NORMAL}));this._geometries.push(t)},D$k(k$l,E$q),Object.defineProperties(u$o.prototype,{changedEvt:{get:function(){return this._changedEvt}}}),u$o.prototype.setEditObject=function(e){this._clearEditObject(),this.constructor({model:e,scene:this._scene,offset:this._offset,axesShow:this._axesShow}),this.activate()},u$o.prototype._clearEditObject=function(){for(var e=0;e<this._primitives.length;e++)this._scene.primitives.remove(this._primitives[e]),this._primitives[e]=void 0;this._primitives=[],this._handler.destroy()},u$o.prototype._calcHpr=function(){var e=p$1e.fromQuaternion(this._orientation,new p$1e),t=p$1d.fromRotationTranslation(e,o$1p.ZERO,new p$1d),i=p$1d.inverse(m$19.eastNorthUpToFixedFrame(this._position),new p$1d),n=p$1d.multiply(i,t,new p$1d),r=p$1d.getMatrix3(n,new p$1e);this._hpr=i$16.fromQuaternion(n$15.fromRotationMatrix(r))},u$o.prototype._createAxes=function(){this._axisX=new W$n({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,-90,0),color:e$1X.RED,hoverColor:this._hoverColor,type:l$o.LINE_X,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._axisY=new W$n({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,0,-90),color:e$1X.GREEN,hoverColor:this._hoverColor,type:l$o.LINE_Y,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._axisZ=new W$n({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,0,0),color:e$1X.BLUE,hoverColor:this._hoverColor,type:l$o.LINE_Z,visible:this._axesShow.translation,lineWidthScale:this._lineWidthScale}),this._scaleLineX=new B$j({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,-90,0),color:e$1X.RED,hoverColor:this._hoverColor,type:l$o.SCALE_LINE_X,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._scaleLineY=new B$j({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,0,-90),color:e$1X.GREEN,hoverColor:this._hoverColor,type:l$o.SCALE_LINE_Y,visible:this._axesShow.scale}),this._scaleLineZ=new B$j({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,0,0),color:e$1X.BLUE,hoverColor:this._hoverColor,type:l$o.SCALE_LINE_Z,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._axisCircleX=new X$f({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,-90,0),color:e$1X.RED,hoverColor:this._hoverColor,type:l$o.CIRCLE_X,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._axisCircleY=new X$f({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,0,-90),color:e$1X.GREEN,hoverColor:this._hoverColor,type:l$o.CIRCLE_Y,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._axisCircleZ=new X$f({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),headingPitchRoll:i$16.fromDegrees(0,0,0),color:e$1X.BLUE,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z,visible:this._axesShow.rotation,lineWidthScale:this._lineWidthScale}),this._transitionPlaneX=new k$l({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.4,transition:new o$1p(0,.4,.4),headingPitchRoll:i$16.fromDegrees(0,-90,0),color:e$1X.RED,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z}),this._transitionPlaneY=new k$l({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.4,transition:new o$1p(.4,0,.4),headingPitchRoll:i$16.fromDegrees(0,0,90),color:e$1X.GREEN,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z}),this._transitionPlaneZ=new k$l({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.4,transition:new o$1p(.4,.4,0),headingPitchRoll:i$16.fromDegrees(0,0,0),color:e$1X.BLUE,hoverColor:this._hoverColor,type:l$o.CIRCLE_Z}),this._uniformScale=new ee$b({owner:this,modelMatrix:this._modelMatrix,scale:o$1p.multiplyByScalar(o$1p.UNIT_XYZ,this._scale,new o$1p),dimensions:.2,transition:new o$1p(.2001,.2,.2),headingPitchRoll:i$16.fromDegrees(0,0,0),type:l$o.UNIFORM_SCALE,hoverColor:this._hoverColor,color:e$1X.ORANGE,visible:this._axesShow.scale,lineWidthScale:this._lineWidthScale}),this._primitives=[this._scaleLineX,this._scaleLineY,this._scaleLineZ,this._axisCircleX,this._axisCircleY,this._axisCircleZ,this._uniformScale,this._axisX,this._axisY,this._axisZ],this._scene.primitives.add(this._scaleLineX),this._scene.primitives.add(this._scaleLineY),this._scene.primitives.add(this._scaleLineZ),this._scene.primitives.add(this._axisCircleX),this._scene.primitives.add(this._axisCircleY),this._scene.primitives.add(this._axisCircleZ),this._scene.primitives.add(this._uniformScale),this._scene.primitives.add(this._axisX),this._scene.primitives.add(this._axisY),this._scene.primitives.add(this._axisZ)},u$o.prototype._initEvent=function(){var e=this._scene,t=this,i=this._handler;i.setInputAction((function(i){var n=t._pickObj;!n||!n.primitive||!n.primitive._typeForModelEditor||(t._isEdit=!0,t._pickObj=n,e.screenSpaceCameraController.enableInputs=!1)}),G$J.LEFT_DOWN),i.setInputAction((function(e){t._isEdit?(t._handleTransition(e),t._handleRotation(e),t._handleScale(e),t._handleUniformScale(e)):t._handleHover(e)}),G$J.MOUSE_MOVE),i.setInputAction((function(i){e.screenSpaceCameraController.enableInputs=!0,t._isEdit=!1,t._pickObj=void 0}),G$J.LEFT_UP)},u$o.prototype._handleTransition=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$o.LINE_X||t===l$o.LINE_Y||t===l$o.LINE_Z){var i,n;switch(t){case l$o.LINE_X:i=o$1p.UNIT_Z,n=o$1p.UNIT_Z;break;case l$o.LINE_Y:i=o$1p.UNIT_X,n=o$1p.UNIT_X;break;case l$o.LINE_Z:i=o$1p.UNIT_Y,n=o$1p.UNIT_Y}var r=this._scene,o=e.startPosition,a=e.endPosition,s=p$1d.multiplyByPoint(this._modelMatrix,i,q$j),l=p$1d.multiplyByPoint(this._modelMatrix,o$1p.ZERO,J$f);n=p$1d.multiplyByPoint(this._modelMatrix,n,$$h),o$1p.subtract(s,l,s);var u=o$1p.normalize(s,s),c=b$v(r.camera,o,n,u),h=b$v(r.camera,a,n,u),d=p$1d.multiplyByPoint(this._modelMatrixInverse,c,de$7),f=p$1d.multiplyByPoint(this._modelMatrixInverse,h,K$g);switch(t){case l$o.LINE_X:I$r.x=f.x-d.x;break;case l$o.LINE_Y:I$r.y=f.y-d.y;break;case l$o.LINE_Z:I$r.z=f.z-d.z}p$1d.multiply(this._modelMatrix,p$1d.fromTranslation(I$r,g$v),this._modelMatrix),this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,transitionAddtion:I$r}),p$1d.getTranslation(this._modelMatrix,this._position),o$1p.clone(o$1p.ZERO,I$r)}},u$o.prototype._handleRotation=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$o.CIRCLE_X||t===l$o.CIRCLE_Y||t===l$o.CIRCLE_Z){var i,n,r=this._scene,o=e.startPosition,a=e.endPosition,s=this._position;switch(t){case l$o.CIRCLE_X:i=o$1p.UNIT_X,n=o$1p.UNIT_Y;break;case l$o.CIRCLE_Y:i=o$1p.UNIT_Y,n=o$1p.UNIT_Z;break;case l$o.CIRCLE_Z:i=o$1p.UNIT_Z,n=o$1p.UNIT_X}var l=p$1d.multiplyByPoint(this._modelMatrix,i,q$j),u=p$1d.multiplyByPoint(this._modelMatrix,o$1p.ZERO,J$f);n=p$1d.multiplyByPoint(this._modelMatrix,n,$$h),o$1p.subtract(l,u,l);var c=o$1p.normalize(l,l),h=b$v(r.camera,a,n,c),d=b$v(r.camera,o,n,c),f=o$1p.subtract(h,s,Ze$5),p=o$1p.subtract(d,s,Oe$8),_=o$1p.dot(o$1p.normalize(f,f),o$1p.normalize(p,p)),m=Math.acos(_),g=o$1p.cross(l,f,be$9),x=o$1p.subtract(d,h,Ue$4),y=o$1p.dot(g,o$1p.normalize(x,x));switch(m*=y=y>0?1:-1,t){case l$o.CIRCLE_X:S$l.roll=-m;break;case l$o.CIRCLE_Y:S$l.pitch=m;break;case l$o.CIRCLE_Z:S$l.heading=m}p$1d.multiply(this._modelMatrix,p$1d.fromRotationTranslation(p$1e.fromHeadingPitchRoll(S$l),o$1p.ZERO,g$v),this._modelMatrix),p$1d.inverse(this._modelMatrix,this._modelMatrixInverse),this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,rotationAddtion:S$l}),S$l.heading=0,S$l.pitch=0,S$l.roll=0}},u$o.prototype._handleScale=function(e){var t=this._pickObj.primitive._typeForModelEditor;if(t===l$o.SCALE_LINE_X||t===l$o.SCALE_LINE_Y||t===l$o.SCALE_LINE_Z){var i,n;switch(t){case l$o.SCALE_LINE_X:i=o$1p.UNIT_Z,n=o$1p.UNIT_Z;break;case l$o.SCALE_LINE_Y:i=o$1p.UNIT_X,n=o$1p.UNIT_X;break;case l$o.SCALE_LINE_Z:i=o$1p.UNIT_Y,n=o$1p.UNIT_Y}var r=this._scene,o=e.startPosition,a=e.endPosition,s=p$1d.multiplyByPoint(this._modelMatrix,i,q$j),l=p$1d.multiplyByPoint(this._modelMatrix,o$1p.ZERO,J$f);n=p$1d.multiplyByPoint(this._modelMatrix,n,$$h),o$1p.subtract(s,l,s);var u=o$1p.normalize(s,s),c=b$v(r.camera,o,n,u),h=b$v(r.camera,a,n,u),d=p$1d.multiplyByPoint(this._modelMatrixInverse,c,de$7),f=p$1d.multiplyByPoint(this._modelMatrixInverse,h,K$g);switch(t){case l$o.SCALE_LINE_X:I$r.x=f.x-d.x;break;case l$o.SCALE_LINE_Y:I$r.y=f.y-d.y;break;case l$o.SCALE_LINE_Z:I$r.z=f.z-d.z}this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,nonUniformScaleAddition:o$1p.clone(I$r)}),o$1p.clone(o$1p.ZERO,I$r)}},u$o.prototype._handleHover=function(e){this._scene.pickAsync(e.startPosition).then((e=>{if(this._pickObj=e,!e||!e.primitive||e.primitive._typeForModelEditor<1||e.primitive._typeForModelEditor>10)this._hoverChanged.raiseEvent(-1);else{var t=e.primitive._typeForModelEditor;this._hoverChanged.raiseEvent(t)}}))},u$o.prototype._handleUniformScale=function(e){if(this._pickObj.primitive._typeForModelEditor===l$o.UNIFORM_SCALE){this._scene;var t=e.startPosition,i=e.endPosition.x-t.x;this._changedEvt.raiseEvent({modelMatrix:this._modelMatrix,uniformScaleAddition:i/50})}},u$o.prototype.activate=function(){this._active||(this._axesCreated||(this._createAxes(),this._axesCreated=!0),this._initEvent(),this._active=!0)},u$o.prototype.deactivate=function(){if(this._active){this._disableEvent(),this._active=!1;for(var e=0,t=this._primitives.length;e<t;e++){this._primitives[e]._visible=!1}this._scene.screenSpaceCameraController.enableInputs=!0,this._isEdit=!1,this._pickObj=void 0}},u$o.prototype._disableEvent=function(){var e=this._handler;e.removeInputAction(G$J.LEFT_UP),e.removeInputAction(G$J.LEFT_DOWN),e.removeInputAction(G$J.MOUSE_MOVE)},u$o.prototype.destroy=function(){this.deactivate();for(var e=0,t=this._primitives.length;e<t;e++){this._primitives[e].destroy()}this._handler.destroy(),i$11(this)},u$o.prototype.isDestroyed=function(){return!1};var d$v=function(e){t$11("PointHandler","PointHandler is deprecated,please use DrawHandler.");var t=new w$n(e,_0x1522bc.Point,l$p.Space);return t.drawCompletedEvent=t.drawEvt,t},l$n=function(e){t$11("PolygonHandler","PolygonHandler is deprecated,please use DrawHandler.");var t=new w$n(e,_0x1522bc.Polygon,l$p.Space);return t.drawCompletedEvent=t.drawEvt,t},d$u=function(e){t$11("PolylineHandler","PolylineHandler is deprecated,please use DrawHandler.");var t=new w$n(e,_0x1522bc.Line,l$p.Space);return t.drawCompletedEvent=t.drawEvt,t};function c$i(e,t){if(LicenseChecker.LICENSECHECKER.verify("DirectionalLight"),t=u$Z(t,{}),o$1q.defined("PointLight Position",e),o$1p.equals(e,o$1p.ZERO))throw new t$15("directional light position equals zero");this._id=e$1T(),this._position=o$1p.clone(e),this._positionCV=new o$1p,this._targetPosition=u$Z(t.targetPosition,new o$1p),this._targetPositionCV=new o$1p,this._color=u$Z(t.color,new e$1X(1,1,1,1)),this._intensity=u$Z(t.intensity,1),this._direction=new o$1p,o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction),this._lightColor=e$1X.multiplyByScalar(this._color,this._intensity,new e$1X),this._directionEC=new o$1p,this._sceneMode=C$14.SCENE3D}function e$l(e){e=u$Z(e,{}),this._id=e$1T(),this._skyColor=u$Z(e.skyColor,new e$1X(.7,.7,.7)),this._groundColor=u$Z(e.groundColor,new e$1X(.2,.2,.2)),this._groundLightColor=new e$1X,this._skyLightColor=new e$1X,this._intensity=u$Z(e.intensity,1),this._sceneMode=C$14.SCENE3D}function c$h(e,t){LicenseChecker.LICENSECHECKER.verify("PointLight"),t=u$Z(t,{}),o$1q.defined("PointLight Position",e),this._id=e$1T(),this._position=o$1p.clone(e),this._positionCV=new o$1p,this._positionEC=new o$1p,this._color=u$Z(t.color,new e$1X(1,1,1,1)),this._intensity=u$Z(t.intensity,2),this._cutoffDistance=u$Z(t.cutoffDistance,10),this._decay=u$Z(t.decay,1),this._lightColor=e$1X.multiplyByScalar(this._color,this._intensity,new e$1X),this._visibleInCullingVolume=1,this._sceneMode=C$14.SCENE3D}Object.defineProperties(c$i.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===C$14.SCENE3D?this._position:this._positionCV},set:function(e){o$1q.defined("directional light position",e),!o$1p.equals(e,this._targetPosition)&&(this._position=e,this._sceneMode===C$14.COLUMBUS_VIEW?(this._positionCV=m$19.convertToColumbusCartesian(this._position),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},targetPosition:{get:function(){return this._sceneMode===C$14.SCENE3D?this._targetPosition:this._targetPositionCV},set:function(e){o$1q.defined("directional light target position",e),!o$1p.equals(e,this._position)&&(this._targetPosition=e,this._sceneMode===C$14.COLUMBUS_VIEW?(this._targetPositionCV=m$19.convertToColumbusCartesian(this._targetPosition),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},color:{get:function(){return this._color},set:function(e){o$1q.defined("directional light color",e),this._color=e,e$1X.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){o$1q.typeOf.number("directional light intensity",e),this._intensity=e,e$1X.multiplyByScalar(this._color,this._intensity,this._lightColor)}},direction:{get:function(){return this._direction}},lightColor:{get:function(){return this._lightColor}},directionEC:{get:function(){return this._directionEC},set:function(e){o$1q.defined("directioinal light directionEC",e),this._directionEC=e}},lightType:{get:function(){return _0x4970c2.DIRECTIONAL}},sceneMode:{get:function(){return this._sceneMode},set:function(e){if(o$1q.typeOf.number("spot light sceneMode",e),this._sceneMode!==e){if(this._sceneMode=e,this._sceneMode===C$14.COLUMBUS_VIEW){if(this._positionCV=m$19.convertToColumbusCartesian(this._position),this._targetPositionCV=m$19.convertToColumbusCartesian(this._targetPosition),o$1p.equals(this._positionCV,this._targetPositionCV))return;o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)}else o$1p.subtract(this._position,this._targetPosition,this._direction);o$1p.normalize(this._direction,this._direction)}}}}),Object.defineProperties(e$l.prototype,{id:{get:function(){return this._id}},lightType:{get:function(){return _0x4970c2.HEMISPHERE}},skyColor:{get:function(){return e$1X.multiplyByScalar(this._skyColor,this._intensity,this._skyLightColor)},set:function(e){o$1q.defined("skyColor color",e),e$1X.clone(e,this._skyColor)}},groundColor:{get:function(){return e$1X.multiplyByScalar(this._groundColor,this._intensity,this._groundLightColor)},set:function(e){o$1q.defined("groundColor color",e),e$1X.clone(e,this._groundColor)}}}),Object.defineProperties(c$h.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===C$14.SCENE3D?this._position:this._positionCV},set:function(e){o$1q.defined("point light position",e),this._position=e,this._sceneMode===C$14.COLUMBUS_VIEW&&(this._positionCV=m$19.convertToColumbusCartesian(this._position))}},color:{get:function(){return this._color},set:function(e){o$1q.defined("point color color",e),this._color=e,e$1X.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){o$1q.typeOf.number("point light intensity",e),this._intensity=e,e$1X.multiplyByScalar(this._color,this._intensity,this._lightColor)}},cutoffDistance:{get:function(){return this._cutoffDistance},set:function(e){o$1q.typeOf.number("point light cutoffDistance",e),this._cutoffDistance=e}},decay:{get:function(){return this._decay},set:function(e){o$1q.typeOf.number("point light decay",e),this._decay=e}},lightColor:{get:function(){return this._lightColor}},positionEC:{get:function(){return this._positionEC},set:function(e){o$1q.defined("point light positionEC",e),this._positionEC=e}},lightType:{get:function(){return _0x4970c2.POINT}},visibleInCullingVolume:{get:function(){return this._visibleInCullingVolume}},sceneMode:{get:function(){return this._sceneMode},set:function(e){o$1q.typeOf.number("point light sceneMode",e),this._sceneMode!==e&&(this._sceneMode=e,this._sceneMode===C$14.COLUMBUS_VIEW&&(this._positionCV=m$19.convertToColumbusCartesian(this._position)))}}});var h$o=new i$1d;function _$k(e,t,i){if(LicenseChecker.LICENSECHECKER.verify("SpotLight"),i=u$Z(i,{}),o$1q.defined("SpotLight Position",e),o$1q.defined("SpotLight target position",t),o$1p.equals(e,t))throw new t$15("position equals targetPosition");this._id=e$1T(),this._position=o$1p.clone(e),this._positionCV=new o$1p,this._targetPosition=o$1p.clone(t),this._targetPositionCV=new o$1p,this._color=u$Z(i.color,new e$1X(1,1,1,1)),this._intensity=u$Z(i.intensity,2),this._distance=u$Z(i.distance,100),this._angle=u$Z(i.angle,Math.PI/6),this._penumbra=u$Z(i.penumbra,0),this._exponent=u$Z(i.exponent,10),this._decay=u$Z(i.decay,1),this._direction=new o$1p,this._directionEC=new o$1p,o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction),this._lightColor=e$1X.multiplyByScalar(this._color,this._intensity,new e$1X),this._angleCos=Math.cos(this._angle),this._penumbraCos=Math.cos(this._angle*(1-this._penumbra)),this._positionEC=new o$1p,this._visibleInCullingVolume=1,this._sceneMode=C$14.SCENE3D}c$h.prototype.computeVisiblityInCullingVolume=function(e){return h$o.radius=this._cutoffDistance,h$o.center=this.position,this._visibleInCullingVolume=e.computeVisibility(h$o)!==Ae$w.OUTSIDE?1:0,!!this._visibleInCullingVolume},Object.defineProperties(_$k.prototype,{id:{get:function(){return this._id}},position:{get:function(){return this._sceneMode===C$14.SCENE3D?this._position:this._positionCV},set:function(e){o$1q.defined("spot light position",e),!o$1p.equals(e,this._targetPosition)&&(this._position=e,this._sceneMode===C$14.COLUMBUS_VIEW?(this._positionCV=m$19.convertToColumbusCartesian(this._position),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},targetPosition:{get:function(){return this._sceneMode===C$14.SCENE3D?this._targetPosition:this._targetPositionCV},set:function(e){o$1q.defined("spot light target position",e),!o$1p.equals(e,this._position)&&(this._targetPosition=e,this._sceneMode===C$14.COLUMBUS_VIEW?(this._targetPositionCV=m$19.convertToColumbusCartesian(this._targetPosition),o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)):o$1p.subtract(this._position,this._targetPosition,this._direction),o$1p.normalize(this._direction,this._direction))}},color:{get:function(){return this._color},set:function(e){o$1q.defined("spot color color",e),this._color=e,e$1X.multiplyByScalar(this._color,this._intensity,this._lightColor)}},intensity:{get:function(){return this._intensity},set:function(e){o$1q.typeOf.number("spot light intensity",e),this._intensity=e,e$1X.multiplyByScalar(this._color,this._intensity,this._lightColor)}},distance:{get:function(){return this._distance},set:function(e){o$1q.typeOf.number("spot light istance",e),this._distance=e}},angle:{get:function(){return this._angle},set:function(e){o$1q.typeOf.number("spot light angle",e),this._angle=e,this._angleCos=Math.cos(this._angle)}},exponent:{get:function(){return this._exponent},set:function(e){o$1q.typeOf.number("spot light exponent",e),this._exponent=e}},decay:{get:function(){return this._decay},set:function(e){o$1q.typeOf.number("spot light decay",e),this._decay=e}},direction:{get:function(){return this._direction}},lightColor:{get:function(){return this._lightColor}},angleCos:{get:function(){return this._angleCos}},penumbra:{get:function(){return this._penumbra},set:function(e){o$1q.typeOf.number("spot light angle",e),this._penumbra=e,this._penumbraCos=Math.cos(this._angle*(1-this._penumbra))}},penumbraCos:{get:function(){return this._penumbraCos}},positionEC:{get:function(){return this._positionEC},set:function(e){o$1q.defined("spot light positionEC",e),this._positionEC=e}},directionEC:{get:function(){return this._directionEC}},lightType:{get:function(){return _0x4970c2.SPOT}},visibleInCullingVolume:{get:function(){return this._visibleInCullingVolume}},sceneMode:{get:function(){return this._sceneMode},set:function(e){if(o$1q.typeOf.number("spot light sceneMode",e),this._sceneMode!==e){if(this._sceneMode=e,this._sceneMode===C$14.COLUMBUS_VIEW){if(this._positionCV=m$19.convertToColumbusCartesian(this._position),this._targetPositionCV=m$19.convertToColumbusCartesian(this._targetPosition),o$1p.equals(this._positionCV,this._targetPositionCV))return;o$1p.subtract(this._positionCV,this._targetPositionCV,this._direction)}else o$1p.subtract(this._position,this._targetPosition,this._direction);o$1p.normalize(this._direction,this._direction)}}}});var u$n=new i$1d;_$k.prototype.computeVisiblityInCullingVolume=function(e){return u$n.radius=this._distance,u$n.center=this.position,this._visibleInCullingVolume=e.computeVisibility(u$n)!==Ae$w.OUTSIDE?1:0,!!this._visibleInCullingVolume};var _0x7df47f=(_0x174466=!0,function(e,t){var i=_0x174466?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x174466=!1,i}),_0x56de09=_0x7df47f(void 0,(function(){return _0x56de09.toString().search("(((.+)+)+)+$").toString().constructor(_0x56de09).search("(((.+)+)+)+$")})),_0x174466;function _0x1d0ffc(e,t){return this.position=new o$1p,this.rotation=new o$1p,this.scale=new o$1p,this.isVisible=!0,this._worldMatrix=new p$1d,this._rotationQuaternion=new n$15,p$1d.clone(p$1d.IDENTITY,this._worldMatrix),this}function _0x42e047(e,t,i,n){var r=.5*i,o=.5*t,a=.5*e,s=Math.sin(r),l=Math.cos(r),u=Math.sin(o),c=Math.cos(o),h=Math.sin(a),d=Math.cos(a);return n.x=d*u*l+h*c*s,n.y=h*c*l-d*u*s,n.z=d*c*s-h*u*l,n.w=d*c*l+h*u*s,n}_0x56de09(),_0x1d0ffc.prototype.setDirection=function(e,t,i,n){t=u$Z(t,0),i=u$Z(i,0),n=u$Z(n,0);var r=-Math.atan2(e.z,e.x)+Math.PI/2,o=Math.sqrt(e.x*e.x+e.z*e.z),a=-Math.atan2(e.y,o);return this.rotation.x=a+i,this.rotation.y=r+t,this.rotation.z=n,this},_0x1d0ffc.prototype.computeWorldMatrix=function(){_0x42e047(this.rotation.y,this.rotation.x,this.rotation.z,this._rotationQuaternion),p$1d.fromTranslationQuaternionRotationScale(this.position,this._rotationQuaternion,this.scale,this._worldMatrix)},_0x1d0ffc.prototype.getWorldMatrix=function(){return this.computeWorldMatrix(),this._worldMatrix};var _0x57c99e=(_0x1d8fb8=!0,function(e,t){var i=_0x1d8fb8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d8fb8=!1,i}),_0x3ce793=_0x57c99e(void 0,(function(){return _0x3ce793.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ce793).search("(((.+)+)+)+$")})),_0x1d8fb8;function _0x48b138(e,t,i,n,r,o){this.name=e,this.targetProperty=t,this.framePerSecond=i,this.dataType=n,this.loopMode=r,this.enableBlending=o,this._runtimeAnimations=new Array,this._events=new Array,this.blendingSpeed=.01,this._ranges={},this.targetPropertyPath=t.split("."),this.dataType=n,this.loopMode=void 0===r?_0x48b138.ANIMATIONLOOPMODE_CYCLE:r}_0x3ce793(),_0x48b138._PrepareAnimation=function(e,t,i,n,r,o,a,s){var l=void 0;if(!isNaN(parseFloat(r))&&isFinite(r)?l=_0x48b138.ANIMATIONTYPE_FLOAT:r instanceof _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion?l=_0x48b138.ANIMATIONTYPE_QUATERNION:r instanceof _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3?l=_0x48b138.ANIMATIONTYPE_VECTOR3:r instanceof _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector2?l=_0x48b138.ANIMATIONTYPE_VECTOR2:r instanceof _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color3?l=_0x48b138.ANIMATIONTYPE_COLOR3:r instanceof _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color4?l=_0x48b138.ANIMATIONTYPE_COLOR4:r instanceof _Maths_math_size__WEBPACK_IMPORTED_MODULE_8__.Size&&(l=_0x48b138.ANIMATIONTYPE_SIZE),null==l)return null;var u=new _0x48b138(e,t,i,l,a),c=[{frame:0,value:r},{frame:n,value:o}];return u.setKeys(c),void 0!==s&&u.setEasingFunction(s),u},_0x48b138.CreateAnimation=function(e,t,i,n){var r=new _0x48b138(e+"Animation",e,i,t,_0x48b138.ANIMATIONLOOPMODE_CONSTANT);return r.setEasingFunction(n),r},_0x48b138.CreateAndStartAnimation=function(e,t,i,n,r,o,a,s,l,u){var c=_0x48b138._PrepareAnimation(e,i,n,r,o,a,s,l);return c?t.getScene().beginDirectAnimation(t,[c],0,r,1===c.loopMode,1,u):null},_0x48b138.CreateAndStartHierarchyAnimation=function(e,t,i,n,r,o,a,s,l,u,c){var h=_0x48b138._PrepareAnimation(e,n,r,o,a,s,l,u);return h?t.getScene().beginDirectHierarchyAnimation(t,i,[h],0,o,1===h.loopMode,1,c):null},_0x48b138.CreateMergeAndStartAnimation=function(e,t,i,n,r,o,a,s,l,u){var c=_0x48b138._PrepareAnimation(e,i,n,r,o,a,s,l);return c?(t.animations.push(c),t.getScene().beginAnimation(t,0,r,1===c.loopMode,1,u)):null},_0x48b138.MakeAnimationAdditive=function(e,t,i,n,r){void 0===t&&(t=0),void 0===n&&(n=!1);var o=e;if(n&&((o=e.clone()).name=r||o.name),!o._keys.length)return o;t=t>=0?t:0;var a=0,s=o._keys[0],l=o._keys.length-1,u=o._keys[l],c={referenceValue:s.value,referencePosition:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[0],referenceQuaternion:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Quaternion[0],referenceScaling:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[1],keyPosition:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[2],keyQuaternion:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Quaternion[1],keyScaling:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.TmpVectors.Vector3[3]},h=!1,d=s.frame,f=u.frame;if(i){var p=o.getRange(i);p&&(d=p.from,f=p.to)}var _=s.frame===d,m=u.frame===f;if(1===o._keys.length){var g=o._getKeyValue(o._keys[0]);c.referenceValue=g.clone?g.clone():g,h=!0}else if(t<=s.frame){g=o._getKeyValue(s.value);c.referenceValue=g.clone?g.clone():g,h=!0}else if(t>=u.frame){g=o._getKeyValue(u.value);c.referenceValue=g.clone?g.clone():g,h=!0}for(var x=0;!h||!_||!m&&x<o._keys.length-1;){var y=o._keys[x],v=o._keys[x+1];if(!h&&t>=y.frame&&t<=v.frame){g=void 0;if(t===y.frame)g=o._getKeyValue(y.value);else if(t===v.frame)g=o._getKeyValue(v.value);else{var $={key:x,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};g=o._interpolate(t,$)}c.referenceValue=g.clone?g.clone():g,h=!0}if(!_&&d>=y.frame&&d<=v.frame){if(d===y.frame)a=x;else if(d===v.frame)a=x+1;else{$={key:x,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};var b={frame:d,value:(g=o._interpolate(d,$)).clone?g.clone():g};o._keys.splice(x+1,0,b),a=x+1}_=!0}if(!m&&f>=y.frame&&f<=v.frame){if(f===y.frame)l=x;else if(f===v.frame)l=x+1;else{$={key:x,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT},b={frame:f,value:(g=o._interpolate(f,$)).clone?g.clone():g};o._keys.splice(x+1,0,b),l=x+1}m=!0}x++}o.dataType===_0x48b138.ANIMATIONTYPE_QUATERNION?c.referenceValue.normalize().conjugateInPlace():o.dataType===_0x48b138.ANIMATIONTYPE_MATRIX&&(c.referenceValue.decompose(c.referenceScaling,c.referenceQuaternion,c.referencePosition),c.referenceQuaternion.normalize().conjugateInPlace());for(x=a;x<=l;x++){b=o._keys[x];if(!x||o.dataType===_0x48b138.ANIMATIONTYPE_FLOAT||b.value!==s.value)switch(o.dataType){case _0x48b138.ANIMATIONTYPE_MATRIX:b.value.decompose(c.keyScaling,c.keyQuaternion,c.keyPosition),c.keyPosition.subtractInPlace(c.referencePosition),c.keyScaling.divideInPlace(c.referenceScaling),c.referenceQuaternion.multiplyToRef(c.keyQuaternion,c.keyQuaternion),_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.ComposeToRef(c.keyScaling,c.keyQuaternion,c.keyPosition,b.value);break;case _0x48b138.ANIMATIONTYPE_QUATERNION:c.referenceValue.multiplyToRef(b.value,b.value);break;case _0x48b138.ANIMATIONTYPE_VECTOR2:case _0x48b138.ANIMATIONTYPE_VECTOR3:case _0x48b138.ANIMATIONTYPE_COLOR3:case _0x48b138.ANIMATIONTYPE_COLOR4:b.value.subtractToRef(c.referenceValue,b.value);break;case _0x48b138.ANIMATIONTYPE_SIZE:b.value.width-=c.referenceValue.width,b.value.height-=c.referenceValue.height;break;default:b.value-=c.referenceValue}}return o},_0x48b138.TransitionTo=function(e,t,i,n,r,o,a,s){if(void 0===s&&(s=null),a<=0)return i[e]=t,s&&s(),null;var l=r*(a/1e3);o.setKeys([{frame:0,value:i[e].clone?i[e].clone():i[e]},{frame:l,value:t}]),i.animations||(i.animations=[]),i.animations.push(o);var u=n.beginAnimation(i,0,l,!1);return u.onAnimationEnd=s,u},Object.defineProperty(_0x48b138.prototype,"runtimeAnimations",{get:function(){return this._runtimeAnimations},enumerable:!1,configurable:!0}),Object.defineProperty(_0x48b138.prototype,"hasRunningRuntimeAnimations",{get:function(){for(var e=0,t=this._runtimeAnimations;e<t.length;e++){if(!t[e].isStopped)return!0}return!1},enumerable:!1,configurable:!0}),_0x48b138.prototype.toString=function(e){var t="Name: "+this.name+", property: "+this.targetProperty;if(t+=", datatype: "+["Float","Vector3","Quaternion","Matrix","Color3","Vector2"][this.dataType],t+=", nKeys: "+(this._keys?this._keys.length:"none"),t+=", nRanges: "+(this._ranges?Object.keys(this._ranges).length:"none"),e){t+=", Ranges: {";var i=!0;for(var n in this._ranges)i&&(t+=", ",i=!1),t+=n;t+="}"}return t},_0x48b138.prototype.addEvent=function(e){this._events.push(e),this._events.sort((function(e,t){return e.frame-t.frame}))},_0x48b138.prototype.removeEvents=function(e){for(var t=0;t<this._events.length;t++)this._events[t].frame===e&&(this._events.splice(t,1),t--)},_0x48b138.prototype.getEvents=function(){return this._events},_0x48b138.prototype.createRange=function(e,t,i){this._ranges[e]||(this._ranges[e]=new _animationRange__WEBPACK_IMPORTED_MODULE_6__.AnimationRange(e,t,i))},_0x48b138.prototype.deleteRange=function(e,t){void 0===t&&(t=!0);var i=this._ranges[e];if(i){if(t)for(var n=i.from,r=i.to,o=this._keys.length-1;o>=0;o--)this._keys[o].frame>=n&&this._keys[o].frame<=r&&this._keys.splice(o,1);this._ranges[e]=null}},_0x48b138.prototype.getRange=function(e){return this._ranges[e]},_0x48b138.prototype.getKeys=function(){return this._keys},_0x48b138.prototype.getHighestFrame=function(){for(var e=0,t=0,i=this._keys.length;t<i;t++)e<this._keys[t].frame&&(e=this._keys[t].frame);return e},_0x48b138.prototype.getEasingFunction=function(){return this._easingFunction},_0x48b138.prototype.setEasingFunction=function(e){this._easingFunction=e},_0x48b138.prototype.floatInterpolateFunction=function(e,t,i){return _Maths_math_scalar__WEBPACK_IMPORTED_MODULE_2__.Scalar.Lerp(e,t,i)},_0x48b138.prototype.floatInterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_scalar__WEBPACK_IMPORTED_MODULE_2__.Scalar.Hermite(e,t,i,n,r)},_0x48b138.prototype.quaternionInterpolateFunction=function(e,t,i){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Slerp(e,t,i)},_0x48b138.prototype.quaternionInterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Hermite(e,t,i,n,r).normalize()},_0x48b138.prototype.vector3InterpolateFunction=function(e,t,i){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Lerp(e,t,i)},_0x48b138.prototype.vector3InterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Hermite(e,t,i,n,r)},_0x48b138.prototype.vector2InterpolateFunction=function(e,t,i){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector2.Lerp(e,t,i)},_0x48b138.prototype.vector2InterpolateFunctionWithTangents=function(e,t,i,n,r){return _Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector2.Hermite(e,t,i,n,r)},_0x48b138.prototype.sizeInterpolateFunction=function(e,t,i){return _Maths_math_size__WEBPACK_IMPORTED_MODULE_8__.Size.Lerp(e,t,i)},_0x48b138.prototype.color3InterpolateFunction=function(e,t,i){return _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color3.Lerp(e,t,i)},_0x48b138.prototype.color4InterpolateFunction=function(e,t,i){return _Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color4.Lerp(e,t,i)},_0x48b138.prototype._getKeyValue=function(e){return"function"==typeof e?e():e},_0x48b138.prototype._interpolate=function(e,t){if(t.loopMode===_0x48b138.ANIMATIONLOOPMODE_CONSTANT&&t.repeatCount>0)return t.highLimitValue.clone?t.highLimitValue.clone():t.highLimitValue;var i=this._keys;if(1===i.length)return this._getKeyValue(i[0].value);var n=t.key;if(i[n].frame>=e)for(;n-1>=0&&i[n].frame>=e;)n--;for(var r=n;r<i.length;r++){var o=i[r+1];if(o.frame>=e){t.key=r;var a=i[r],s=this._getKeyValue(a.value);if(a.interpolation===_animationKey__WEBPACK_IMPORTED_MODULE_5__.AnimationKeyInterpolation.STEP)return s;var l=this._getKeyValue(o.value),u=void 0!==a.outTangent&&void 0!==o.inTangent,c=o.frame-a.frame,h=(e-a.frame)/c,d=this.getEasingFunction();switch(null!=d&&(h=d.ease(h)),this.dataType){case _0x48b138.ANIMATIONTYPE_FLOAT:var f=u?this.floatInterpolateFunctionWithTangents(s,a.outTangent*c,l,o.inTangent*c,h):this.floatInterpolateFunction(s,l,h);switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return f;case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return t.offsetValue*t.repeatCount+f}break;case _0x48b138.ANIMATIONTYPE_QUATERNION:var p=u?this.quaternionInterpolateFunctionWithTangents(s,a.outTangent.scale(c),l,o.inTangent.scale(c),h):this.quaternionInterpolateFunction(s,l,h);switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return p;case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return p.addInPlace(t.offsetValue.scale(t.repeatCount))}return p;case _0x48b138.ANIMATIONTYPE_VECTOR3:var _=u?this.vector3InterpolateFunctionWithTangents(s,a.outTangent.scale(c),l,o.inTangent.scale(c),h):this.vector3InterpolateFunction(s,l,h);switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return _;case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return _.add(t.offsetValue.scale(t.repeatCount))}case _0x48b138.ANIMATIONTYPE_VECTOR2:var m=u?this.vector2InterpolateFunctionWithTangents(s,a.outTangent.scale(c),l,o.inTangent.scale(c),h):this.vector2InterpolateFunction(s,l,h);switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return m;case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return m.add(t.offsetValue.scale(t.repeatCount))}case _0x48b138.ANIMATIONTYPE_SIZE:switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return this.sizeInterpolateFunction(s,l,h);case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return this.sizeInterpolateFunction(s,l,h).add(t.offsetValue.scale(t.repeatCount))}case _0x48b138.ANIMATIONTYPE_COLOR3:switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return this.color3InterpolateFunction(s,l,h);case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return this.color3InterpolateFunction(s,l,h).add(t.offsetValue.scale(t.repeatCount))}case _0x48b138.ANIMATIONTYPE_COLOR4:switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:return this.color4InterpolateFunction(s,l,h);case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return this.color4InterpolateFunction(s,l,h).add(t.offsetValue.scale(t.repeatCount))}case _0x48b138.ANIMATIONTYPE_MATRIX:switch(t.loopMode){case _0x48b138.ANIMATIONLOOPMODE_CYCLE:case _0x48b138.ANIMATIONLOOPMODE_CONSTANT:if(_0x48b138.AllowMatricesInterpolation)return this.matrixInterpolateFunction(s,l,h,t.workValue);case _0x48b138.ANIMATIONLOOPMODE_RELATIVE:return s}}break}}return this._getKeyValue(i[i.length-1].value)},_0x48b138.prototype.matrixInterpolateFunction=function(e,t,i,n){return _0x48b138.AllowMatrixDecomposeForInterpolation?n?(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.DecomposeLerpToRef(e,t,i,n),n):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.DecomposeLerp(e,t,i):n?(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.LerpToRef(e,t,i,n),n):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.Lerp(e,t,i)},_0x48b138.prototype.clone=function(){var e=new _0x48b138(this.name,this.targetPropertyPath.join("."),this.framePerSecond,this.dataType,this.loopMode);if(e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed,this._keys&&e.setKeys(this._keys),this._ranges)for(var t in e._ranges={},this._ranges){var i=this._ranges[t];!i||(e._ranges[t]=i.clone())}return e},_0x48b138.prototype.setKeys=function(e){this._keys=e.slice(0)},_0x48b138.prototype.serialize=function(){var e={};e.name=this.name,e.property=this.targetProperty,e.framePerSecond=this.framePerSecond,e.dataType=this.dataType,e.loopBehavior=this.loopMode,e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed;var t=this.dataType;e.keys=[];for(var i=this.getKeys(),n=0;n<i.length;n++){var r=i[n],o={};switch(o.frame=r.frame,t){case _0x48b138.ANIMATIONTYPE_FLOAT:o.values=[r.value],void 0!==r.inTangent&&o.values.push(r.inTangent),void 0!==r.outTangent&&(void 0===r.inTangent&&o.values.push(void 0),o.values.push(r.outTangent));break;case _0x48b138.ANIMATIONTYPE_QUATERNION:case _0x48b138.ANIMATIONTYPE_MATRIX:case _0x48b138.ANIMATIONTYPE_VECTOR3:case _0x48b138.ANIMATIONTYPE_COLOR3:case _0x48b138.ANIMATIONTYPE_COLOR4:o.values=r.value.asArray(),null!=r.inTangent&&o.values.push(r.inTangent.asArray()),null!=r.outTangent&&(void 0===r.inTangent&&o.values.push(void 0),o.values.push(r.outTangent.asArray()))}e.keys.push(o)}for(var a in e.ranges=[],this._ranges){var s=this._ranges[a];if(s){var l={};l.name=a,l.from=s.from,l.to=s.to,e.ranges.push(l)}}return e},_0x48b138._UniversalLerp=function(e,t,i){var n=e.constructor;return n.Lerp?n.Lerp(e,t,i):n.Slerp?n.Slerp(e,t,i):e.toFixed?e*(1-i)+i*t:t},_0x48b138.Parse=function(e){var t,i,n=new _0x48b138(e.name,e.property,e.framePerSecond,e.dataType,e.loopBehavior),r=e.dataType,o=[];for(e.enableBlending&&(n.enableBlending=e.enableBlending),e.blendingSpeed&&(n.blendingSpeed=e.blendingSpeed),i=0;i<e.keys.length;i++){var a,s,l=e.keys[i];switch(r){case _0x48b138.ANIMATIONTYPE_FLOAT:t=l.values[0],l.values.length>=1&&(a=l.values[1]),l.values.length>=2&&(s=l.values[2]);break;case _0x48b138.ANIMATIONTYPE_QUATERNION:if(t=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(l.values),l.values.length>=8){var u=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(l.values.slice(4,8));u.equals(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Zero())||(a=u)}if(l.values.length>=12){var c=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.FromArray(l.values.slice(8,12));c.equals(_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Quaternion.Zero())||(s=c)}break;case _0x48b138.ANIMATIONTYPE_MATRIX:t=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Matrix.FromArray(l.values);break;case _0x48b138.ANIMATIONTYPE_COLOR3:t=_Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color3.FromArray(l.values);break;case _0x48b138.ANIMATIONTYPE_COLOR4:t=_Maths_math_color__WEBPACK_IMPORTED_MODULE_1__.Color4.FromArray(l.values);break;case _0x48b138.ANIMATIONTYPE_VECTOR3:default:t=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.FromArray(l.values)}var h={};h.frame=l.frame,h.value=t,null!=a&&(h.inTangent=a),null!=s&&(h.outTangent=s),o.push(h)}if(n.setKeys(o),e.ranges)for(i=0;i<e.ranges.length;i++)t=e.ranges[i],n.createRange(t.name,t.from,t.to);return n},_0x48b138.AppendSerializedAnimations=function(e,t){_Misc_decorators__WEBPACK_IMPORTED_MODULE_3__.SerializationHelper.AppendSerializedAnimations(e,t)},_0x48b138.ParseFromFileAsync=function(e,t){var i=this;return new Promise((function(n,r){var o=new _Misc_webRequest__WEBPACK_IMPORTED_MODULE_9__.WebRequest;o.addEventListener("readystatechange",(function(){if(4==o.readyState)if(200==o.status){var t=JSON.parse(o.responseText);if(t.length){for(var a=new Array,s=0,l=t;s<l.length;s++){var u=l[s];a.push(i.Parse(u))}n(a)}else{a=i.Parse(t);e&&(a.name=e),n(a)}}else r("Unable to load the animation")})),o.open("GET",t),o.send()}))},_0x48b138.CreateFromSnippetAsync=function(e){var t=this;return new Promise((function(i,n){var r=new _Misc_webRequest__WEBPACK_IMPORTED_MODULE_9__.WebRequest;r.addEventListener("readystatechange",(function(){if(4==r.readyState)if(200==r.status){var o=JSON.parse(JSON.parse(r.responseText).jsonPayload);if(o.animations){for(var a=JSON.parse(o.animations),s=new Array,l=0,u=a;l<u.length;l++){var c=u[l];s.push(t.Parse(c))}i(s)}else{a=JSON.parse(o.animation);(s=t.Parse(a)).snippetId=e,i(s)}}else n("Unable to load the snippet "+e)})),r.open("GET",t.SnippetUrl+"/"+e.replace(/#/g,"/")),r.send()}))},_0x48b138.AllowMatricesInterpolation=!1,_0x48b138.AllowMatrixDecomposeForInterpolation=!0,_0x48b138.SnippetUrl="",_0x48b138.ANIMATIONTYPE_FLOAT=0,_0x48b138.ANIMATIONTYPE_VECTOR3=1,_0x48b138.ANIMATIONTYPE_QUATERNION=2,_0x48b138.ANIMATIONTYPE_MATRIX=3,_0x48b138.ANIMATIONTYPE_COLOR3=4,_0x48b138.ANIMATIONTYPE_COLOR4=7,_0x48b138.ANIMATIONTYPE_VECTOR2=5,_0x48b138.ANIMATIONTYPE_SIZE=6,_0x48b138.ANIMATIONLOOPMODE_RELATIVE=0,_0x48b138.ANIMATIONLOOPMODE_CYCLE=1,_0x48b138.ANIMATIONLOOPMODE_CONSTANT=2;var _0xa745f4=(_0x3a46b8=!0,function(e,t){var i=_0x3a46b8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a46b8=!1,i}),_0x220924=_0xa745f4(void 0,(function(){return _0x220924.toString().search("(((.+)+)+)+$").toString().constructor(_0x220924).search("(((.+)+)+)+$")})),_0x3a46b8;function _0x442216(){}_0x220924(),_0x442216.WithinEpsilon=function(e,t,i){void 0===i&&(i=1401298e-51);var n=e-t;return-i<=n&&n<=i},_0x442216.ToHex=function(e){var t=e.toString(16);return e<=15?("0"+t).toUpperCase():t.toUpperCase()},_0x442216.Sign=function(e){return 0===(e=+e)||isNaN(e)?e:e>0?1:-1},_0x442216.Clamp=function(e,t,i){return void 0===t&&(t=0),void 0===i&&(i=1),Math.min(i,Math.max(t,e))},_0x442216.Log2=function(e){return Math.log(e)*Math.LOG2E},_0x442216.Repeat=function(e,t){return e-Math.floor(e/t)*t},_0x442216.Normalize=function(e,t,i){return(e-t)/(i-t)},_0x442216.Denormalize=function(e,t,i){return e*(i-t)+t},_0x442216.DeltaAngle=function(e,t){var i=_0x442216.Repeat(t-e,360);return i>180&&(i-=360),i},_0x442216.PingPong=function(e,t){var i=_0x442216.Repeat(e,2*t);return t-Math.abs(i-t)},_0x442216.SmoothStep=function(e,t,i){var n=_0x442216.Clamp(i);return t*(n=-2*n*n*n+3*n*n)+e*(1-n)},_0x442216.MoveTowards=function(e,t,i){return Math.abs(t-e)<=i?t:e+_0x442216.Sign(t-e)*i},_0x442216.MoveTowardsAngle=function(e,t,i){var n=_0x442216.DeltaAngle(e,t),r=0;return-i<n&&n<i?r=t:(t=e+n,r=_0x442216.MoveTowards(e,t,i)),r},_0x442216.Lerp=function(e,t,i){return e+(t-e)*i},_0x442216.LerpAngle=function(e,t,i){var n=_0x442216.Repeat(t-e,360);return n>180&&(n-=360),e+n*_0x442216.Clamp(i)},_0x442216.InverseLerp=function(e,t,i){return e!=t?_0x442216.Clamp((i-e)/(t-e)):0},_0x442216.Hermite=function(e,t,i,n,r){var o=r*r,a=r*o;return e*(2*a-3*o+1)+i*(-2*a+3*o)+t*(a-2*o+r)+n*(a-o)},_0x442216.RandomRange=function(e,t){return e===t?e:Math.random()*(t-e)+e},_0x442216.RangeToPercent=function(e,t,i){return(e-t)/(i-t)},_0x442216.PercentToRange=function(e,t,i){return(i-t)*e+t},_0x442216.NormalizeRadians=function(e){return e-=_0x442216.TwoPi*Math.floor((e+Math.PI)/_0x442216.TwoPi)},_0x442216.TwoPi=2*Math.PI;var _0xa0cfa5=(_0x36da0e=!0,function(e,t){var i=_0x36da0e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x36da0e=!1,i}),_0x5e0408=_0xa0cfa5(void 0,(function(){return _0x5e0408.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e0408).search("(((.+)+)+)+$")})),_0x36da0e;function _0x4ccf7f(e,t,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=i}_0x5e0408();var _0x153e50=new o$1p;_0x4ccf7f.prototype.startDirectionFunction=function(e,t,i,n){_0x153e50=p$1d.getTranslation(e,_0x153e50);var r=new o$1p;o$1p.subtract(i.position,_0x153e50,r),o$1p.normalize(r,r);var o=_0x442216.RandomRange(0,this.directionRandomizer),a=_0x442216.RandomRange(0,this.directionRandomizer),s=_0x442216.RandomRange(0,this.directionRandomizer);r.x+=o,r.y+=a,r.z+=s,o$1p.normalize(r,r),n?o$1p.clone(r,t):p$1d.multiplyByDirection(e,r,t)},_0x4ccf7f.prototype.startPositionFunction=function(e,t,i,n){var r=this.radius-_0x442216.RandomRange(0,this.radius*this.radiusRange),o=_0x442216.RandomRange(0,1),a=_0x442216.RandomRange(0,2*Math.PI),s=Math.acos(2*o-1),l=r*Math.cos(a)*Math.sin(s),u=r*Math.cos(s),c=r*Math.sin(a)*Math.sin(s);if(n)return t.x=l,t.y=c,void(t.z=u);_0x153e50.x=l,_0x153e50.y=c,_0x153e50.z=u,p$1d.multiplyByPoint(e,_0x153e50,t)},_0x4ccf7f.prototype.clone=function(){var e=new _0x4ccf7f(this.radius,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x4ccf7f.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer}},_0x4ccf7f.prototype.getEffectDefines=function(e){e.push("SPHEREEMITTER")},_0x4ccf7f.prototype.getClassName=function(){return"SphereParticleEmitter"},_0x4ccf7f.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},_0x4ccf7f.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer};var _0x2c3c18=(_0x36899b=!0,function(e,t){var i=_0x36899b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x36899b=!1,i}),_0x17cc0a=_0x2c3c18(void 0,(function(){return _0x17cc0a.toString().search("(((.+)+)+)+$").toString().constructor(_0x17cc0a).search("(((.+)+)+)+$")})),_0x36899b;function _0x33b36c(e,t,i){void 0===e&&(e=1),void 0===t&&(t=new o$1p(0,1,0)),void 0===i&&(i=new o$1p(0,1,0)),this.radius=e,this.height=1,this.radiusRange=1,this.directionRandomizer=0;var n=this;return n.direction1=t,n.direction2=i,n}_0x17cc0a();var _0x366826=new o$1p;_0x33b36c.prototype.startDirectionFunction=function(e,t,i){var n=_0x442216.RandomRange(this.direction1.x,this.direction2.x),r=_0x442216.RandomRange(this.direction1.y,this.direction2.y),o=_0x442216.RandomRange(this.direction1.z,this.direction2.z);_0x366826.x=n,_0x366826.y=o,_0x366826.z=r,p$1d.multiplyByDirection(e,_0x366826,t)},_0x33b36c.prototype.startPositionFunction=function(e,t,i){var n=_0x442216.RandomRange(this.direction1.x,this.direction2.x),r=_0x442216.RandomRange(this.direction1.y,this.direction2.y),o=_0x442216.RandomRange(this.direction1.z,this.direction2.z);_0x366826.x=n,_0x366826.y=o,_0x366826.z=r,p$1d.multiplyByPoint(e,_0x366826,t)},_0x33b36c.prototype.clone=function(){var e=new _0x33b36c(this.radius,this.direction1,this.direction2);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x33b36c.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.radiusRange=function(){return t.radiusRange},e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x33b36c.prototype.getEffectDefines=function(e){e.push("SPHEREEMITTER"),e.push("DIRECTEDSPHEREEMITTER")},_0x33b36c.prototype.getClassName=function(){return"SphereDirectedParticleEmitter"},_0x33b36c.prototype.serialize=function(){var e=_super.prototype.serialize.call(this);return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},_0x33b36c.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer,o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2)};var _0x5238a3=(_0x451c92=!0,function(e,t){var i=_0x451c92?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x451c92=!1,i}),_0x93d8f1=_0x5238a3(void 0,(function(){return _0x93d8f1.toString().search("(((.+)+)+)+$").toString().constructor(_0x93d8f1).search("(((.+)+)+)+$")})),_0x451c92;function _0x36b207(e,t,i){void 0===e&&(e=1),void 0===t&&(t=Math.PI),void 0===i&&(i=0),this.directionRandomizer=i,this.radiusRange=1,this.heightRange=1,this.emitFromSpawnPointOnly=!1,this.angle=t,this.radius=e}_0x93d8f1(),Object.defineProperty(_0x36b207.prototype,"radius",{get:function(){return this._radius},set:function(e){this._radius=e,this._buildHeight()},enumerable:!1,configurable:!0}),Object.defineProperty(_0x36b207.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this._buildHeight()},enumerable:!1,configurable:!0}),_0x36b207.prototype._buildHeight=function(){0!==this._angle?this._height=this._radius/Math.tan(this._angle/2):this._height=1};var _0x1c28a8=new o$1p;_0x36b207.prototype.startDirectionFunction=function(e,t,i,n){n?(o$1p.clone(i._localPositio,_0x1c28a8),o$1p.normalize(_0x1c28a8,_0x1c28a8)):(_0x1c28a8=p$1d.getTranslation(e,_0x1c28a8),o$1p.subtract(i.position,_0x1c28a8,_0x1c28a8),0==!o$1p.magnitudeSquared(_0x1c28a8)&&o$1p.normalize(_0x1c28a8,_0x1c28a8));var r=_0x442216.RandomRange(0,this.directionRandomizer),o=_0x442216.RandomRange(0,this.directionRandomizer),a=_0x442216.RandomRange(0,this.directionRandomizer);t.x=_0x1c28a8.x+r,t.y=_0x1c28a8.y+o,t.z=_0x1c28a8.z+a,0==!o$1p.magnitudeSquared(t)&&o$1p.normalize(t,t)},_0x36b207.prototype.startPositionFunction=function(e,t,i,n){var r,o=_0x442216.RandomRange(0,2*Math.PI);this.emitFromSpawnPointOnly?r=1e-4:r=1-(r=_0x442216.RandomRange(0,this.heightRange))*r;var a=this._radius-_0x442216.RandomRange(0,this._radius*this.radiusRange),s=(a*=r)*Math.sin(o),l=a*Math.cos(o),u=r*this._height;if(n)return t.x=s,t.y=l,void(t.z=u);_0x1c28a8.x=s,_0x1c28a8.y=l,_0x1c28a8.z=u,p$1d.multiplyByPoint(e,_0x1c28a8,t)},_0x36b207.prototype.clone=function(){var e=new _0x36b207(this._radius,this._angle,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e};var _0x35b121=new o$1o,_0x1a23c7=new o$1o;_0x36b207.prototype.applyToShader=function(e){var t=this;e.radius=function(){return _0x35b121.x=t._radius,_0x35b121.y=t.radiusRange,_0x35b121},e.coneAngle=function(){return t._angle},e.height=function(){return _0x1a23c7.x=t._height,_0x1a23c7.y=t.heightRange,_0x1a23c7},e.directionRandomizer=function(){return t.directionRandomizer}},_0x36b207.prototype.getEffectDefines=function(e){e.push("CONEEMITTER"),this.emitFromSpawnPointOnly&&e.push("CONEEMITTERSPAWNPOINT")},_0x36b207.prototype.getClassName=function(){return"ConeParticleEmitter"},_0x36b207.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this._radius,e.angle=this._angle,e.directionRandomizer=this.directionRandomizer,e.radiusRange=this.radiusRange,e.heightRange=this.heightRange,e.emitFromSpawnPointOnly=this.emitFromSpawnPointOnly,e},_0x36b207.prototype.parse=function(e){this.radius=e.radius,this.angle=e.angle,this.directionRandomizer=e.directionRandomizer,this.radiusRange=void 0!==e.radiusRange?e.radiusRange:1,this.heightRange=void 0!==e.radiusRange?e.heightRange:1,this.emitFromSpawnPointOnly=void 0!==e.emitFromSpawnPointOnly&&e.emitFromSpawnPointOnly};var _0x2d75e1=(_0x2c0272=!0,function(e,t){var i=_0x2c0272?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c0272=!1,i}),_0x571dc0=_0x2d75e1(void 0,(function(){return _0x571dc0.toString().search("(((.+)+)+)+$").toString().constructor(_0x571dc0).search("(((.+)+)+)+$")})),_0x2c0272;function _0x18139b(e,t,i,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=0),this.radius=e,this.height=t,this.radiusRange=i,this.directionRandomizer=n}_0x571dc0();var _0x40b7f0=new o$1p;_0x18139b.prototype.startDirectionFunction=function(e,t,i,n){_0x40b7f0=p$1d.getTranslation(e,_0x40b7f0);var r=new o$1p;o$1p.subtract(i.position,_0x40b7f0,r),o$1p.normalize(r,r);var o=_0x442216.RandomRange(-this.directionRandomizer/2,this.directionRandomizer/2),a=Math.atan2(r.x,r.z);a+=_0x442216.RandomRange(-Math.PI/2,Math.PI/2)*this.directionRandomizer,r.z=o,r.x=Math.sin(a),r.y=Math.cos(a),o$1p.normalize(r,r),n?o$1p.clone(r,t):p$1d.multiplyByDirection(e,r,t)},_0x18139b.prototype.startPositionFunction=function(e,t,i,n){var r=_0x442216.RandomRange(-this.height/2,this.height/2),o=_0x442216.RandomRange(0,2*Math.PI),a=_0x442216.RandomRange((1-this.radiusRange)*(1-this.radiusRange),1),s=Math.sqrt(a)*this.radius,l=s*Math.cos(o),u=s*Math.sin(o);if(n)return t.x=l,t.y=r,void(t.z=u);_0x40b7f0.x=l,_0x40b7f0.y=r,_0x40b7f0.z=u,p$1d.multiplyByPoint(e,_0x40b7f0,t)},_0x18139b.prototype.clone=function(){var e=new _0x18139b(this.radius,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x18139b.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.height=function(){return t.height},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer}},_0x18139b.prototype.getEffectDefines=function(e){e.push("CYLINDEREMITTER")},_0x18139b.prototype.getClassName=function(){return"CylinderParticleEmitter"},_0x18139b.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.height=this.height,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},_0x18139b.prototype.parse=function(e){this.radius=e.radius,this.height=e.height,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer};var _0x3e9c71=(_0x15e004=!0,function(e,t){var i=_0x15e004?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x15e004=!1,i}),_0x369bf4=_0x3e9c71(void 0,(function(){return _0x369bf4.toString().search("(((.+)+)+)+$").toString().constructor(_0x369bf4).search("(((.+)+)+)+$")})),_0x15e004;function _0x5a4942(e,t,i,n,r){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=new o$1p(0,1,0)),void 0===r&&(r=new o$1p(0,1,0)),this.radius=e,this.height=t,this.radiusRange=i,this.directionRandomizer=0;var o=this;return o.direction1=n,o.direction2=r,o}_0x369bf4();var _0x4d97c7=new o$1p;_0x5a4942.prototype.startDirectionFunction=function(e,t,i){var n=_0x442216.RandomRange(this.direction1.x,this.direction2.x),r=_0x442216.RandomRange(this.direction1.y,this.direction2.y),o=_0x442216.RandomRange(this.direction1.z,this.direction2.z);_0x4d97c7.x=n,_0x4d97c7.y=r,_0x4d97c7.z=o,p$1d.multiplyByDirection(e,_0x4d97c7,t)},_0x5a4942.prototype.startPositionFunction=function(e,t,i){var n=_0x442216.RandomRange(this.direction1.x,this.direction2.x),r=_0x442216.RandomRange(this.direction1.y,this.direction2.y),o=_0x442216.RandomRange(this.direction1.z,this.direction2.z);_0x4d97c7.x=n,_0x4d97c7.y=o,_0x4d97c7.z=r,p$1d.multiplyByPoint(e,_0x4d97c7,t)},_0x5a4942.prototype.clone=function(){var e=new _0x5a4942(this.radius,this.height,this.radiusRange,this.direction1,this.direction2);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_3__.DeepCopier.DeepCopy(this,e),e},_0x5a4942.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.height=function(){return t.height},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer},e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x5a4942.prototype.getEffectDefines=function(e){e.push("CYLINDEREMITTER"),e.push("CYLINDEREMITDIRECTEDCYLINDEREMITTERTER")},_0x5a4942.prototype.getClassName=function(){return"CylinderDirectedParticleEmitter"},_0x5a4942.prototype.serialize=function(){var e=_super.prototype.serialize.call(this);return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},_0x5a4942.prototype.parse=function(e){this.radius=e.radius,this.height=e.height,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer,o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2)};var _0x35dac9=(_0xbe0daf=!0,function(e,t){var i=_0xbe0daf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xbe0daf=!1,i}),_0x1fc96c=_0x35dac9(void 0,(function(){return _0x1fc96c.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fc96c).search("(((.+)+)+)+$")})),_0xbe0daf;function _0x4b20a8(e,t,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=i}_0x1fc96c();var _0x5b9ae0=new o$1p;_0x4b20a8.prototype.startDirectionFunction=function(e,t,i,n){_0x5b9ae0=p$1d.getTranslation(e,_0x5b9ae0);var r=new o$1p;o$1p.subtract(i.position,_0x5b9ae0,r),o$1p.normalize(r,r);var o=_0x442216.RandomRange(0,this.directionRandomizer),a=_0x442216.RandomRange(0,this.directionRandomizer),s=_0x442216.RandomRange(0,this.directionRandomizer);r.x+=o,r.y+=a,r.z+=s,o$1p.normalize(r,r),n?o$1p.clone(r,t):p$1d.multiplyByDirection(e,r,t)},_0x4b20a8.prototype.startPositionFunction=function(e,t,i,n){var r=this.radius-_0x442216.RandomRange(0,this.radius*this.radiusRange),o=_0x442216.RandomRange(0,1),a=_0x442216.RandomRange(0,2*Math.PI),s=Math.acos(2*o-1),l=r*Math.cos(a)*Math.sin(s),u=r*Math.cos(s),c=r*Math.sin(a)*Math.sin(s);if(n)return t.x=l,t.y=c,void(t.z=Math.abs(u));_0x5b9ae0.x=l,_0x5b9ae0.y=c,_0x5b9ae0.z=Math.abs(u),p$1d.multiplyByPoint(e,_0x5b9ae0,t)},_0x4b20a8.prototype.clone=function(){var e=new _0x4b20a8(this.radius,this.directionRandomizer);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x4b20a8.prototype.applyToShader=function(e){var t=this;e.radius=function(){return t.radius},e.radiusRange=function(){return t.radiusRange},e.directionRandomizer=function(){return t.directionRandomizer}},_0x4b20a8.prototype.getEffectDefines=function(e){e.push("HEMISPHERICEMITTER")},_0x4b20a8.prototype.getClassName=function(){return"HemisphericParticleEmitter"},_0x4b20a8.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},_0x4b20a8.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer};var _0x7cfaad=(_0x1a2385=!0,function(e,t){var i=_0x1a2385?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a2385=!1,i}),_0x52f1f0=_0x7cfaad(void 0,(function(){return _0x52f1f0.toString().search("(((.+)+)+)+$").toString().constructor(_0x52f1f0).search("(((.+)+)+)+$")})),_0x1a2385;function _0xaf014b(){this.direction1=new o$1p(0,1,0),this.direction2=new o$1p(0,1,0)}_0x52f1f0();var _0x4dbc0b=new o$1p;_0xaf014b.prototype.startDirectionFunction=function(e,t,i,n){var r=_0x442216.RandomRange(this.direction1.x,this.direction2.x),o=_0x442216.RandomRange(this.direction1.y,this.direction2.y),a=_0x442216.RandomRange(this.direction1.z,this.direction2.z);if(n)return t.x=r,t.y=a,void(t.z=o);_0x4dbc0b.x=r,_0x4dbc0b.y=a,_0x4dbc0b.z=o,p$1d.multiplyByDirection(e,_0x4dbc0b,t)},_0xaf014b.prototype.startPositionFunction=function(e,t,i,n){if(n)return t.x=0,t.y=0,void(t.z=0);p$1d.multiplyByPoint(e,o$1p.ZERO,t)},_0xaf014b.prototype.clone=function(){var e=new _0xaf014b;return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0xaf014b.prototype.applyToShader=function(e){var t=this;e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0xaf014b.prototype.getEffectDefines=function(e){e.push("POINTEMITTER")},_0xaf014b.prototype.getClassName=function(){return"PointParticleEmitter"},_0xaf014b.prototype.serialize=function(){var e={};e.type=this.getClassName();var t=[],i=[];return o$1p.pack(this.direction1,t,0),o$1p.pack(this.direction2,i,0),e.direction1=t,e.direction2=i,e},_0xaf014b.prototype.parse=function(e){o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2)};var _0x17a905=(_0x29ab8a=!0,function(e,t){var i=_0x29ab8a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x29ab8a=!1,i}),_0x5a42d1=_0x17a905(void 0,(function(){return _0x5a42d1.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a42d1).search("(((.+)+)+)+$")})),_0x29ab8a;function _0x4c62f8(){this.direction1=new o$1p(0,1,0),this.direction2=new o$1p(0,1,0),this.minEmitBox=new o$1p(-.5,-.5,-.5),this.maxEmitBox=new o$1p(.5,.5,.5)}_0x5a42d1();var _0x22b254=new o$1p;_0x4c62f8.prototype.startDirectionFunction=function(e,t,i,n){var r=_0x442216.RandomRange(this.direction1.x,this.direction2.x),o=_0x442216.RandomRange(this.direction1.y,this.direction2.y),a=_0x442216.RandomRange(this.direction1.z,this.direction2.z);if(n)return t.x=r,t.y=a,void(t.z=o);_0x22b254.x=r,_0x22b254.y=a,_0x22b254.z=o,p$1d.multiplyByDirection(e,_0x22b254,t)},_0x4c62f8.prototype.startPositionFunction=function(e,t,i,n){var r=_0x442216.RandomRange(this.minEmitBox.x,this.maxEmitBox.x),o=_0x442216.RandomRange(this.minEmitBox.y,this.maxEmitBox.y),a=_0x442216.RandomRange(this.minEmitBox.z,this.maxEmitBox.z);if(n)return t.x=r,t.y=a,void(t.z=o);_0x22b254.x=r,_0x22b254.y=a,_0x22b254.z=o,p$1d.multiplyByPoint(e,_0x22b254,t)},_0x4c62f8.prototype.clone=function(){var e=new _0x4c62f8;return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x4c62f8.prototype.applyToShader=function(e){var t=this;e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2},e.minEmitBox=function(){return t.minEmitBox},e.maxEmitBox=function(){return t.maxEmitBox}},_0x4c62f8.prototype.getEffectDefines=function(e){e.push("BOXEMITTER")},_0x4c62f8.prototype.getClassName=function(){return"BoxParticleEmitter"},_0x4c62f8.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e.minEmitBox=this.minEmitBox.asArray(),e.maxEmitBox=this.maxEmitBox.asArray(),e},_0x4c62f8.prototype.parse=function(e){o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2),o$1p.unpack(e.minEmitBox,0,this.minEmitBox),o$1p.unpack(e.maxEmitBox,0,this.maxEmitBox)};var _0x3c7661=(_0x59632f=!0,function(e,t){var i=_0x59632f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59632f=!1,i}),_0x16c802=_0x3c7661(void 0,(function(){return _0x16c802.toString().search("(((.+)+)+)+$").toString().constructor(_0x16c802).search("(((.+)+)+)+$")})),_0x59632f;_0x16c802();var _0x105c2f={BILLBOARDMODE_Y:2,BILLBOARDMODE_ALL:7,BILLBOARDMODE_STRETCHED:8},_0xbf6524=Object.freeze(_0x105c2f),_0x7e29ce=(_0x2e8296=!0,function(e,t){var i=_0x2e8296?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e8296=!1,i}),_0x3dea12=_0x7e29ce(void 0,(function(){return _0x3dea12.toString().search("(((.+)+)+)+$").toString().constructor(_0x3dea12).search("(((.+)+)+)+$")})),_0x2e8296;_0x3dea12();var _0x41ccd3={BLENDMODE_ONEONE:0,BLENDMODE_STANDARD:1,BLENDMODE_ADD:2,BLENDMODE_MULTIPLY:3,BLENDMODE_MULTIPLYADD:4},_0x4d4f68=Object.freeze(_0x41ccd3),_0x3ffee2=(_0x45896c=!0,function(e,t){var i=_0x45896c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45896c=!1,i}),_0x1d0e34=_0x3ffee2(void 0,(function(){return _0x1d0e34.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d0e34).search("(((.+)+)+)+$")})),_0x45896c;function _0x439851(e){this.animations=[],this.renderingGroupId=0,this.emitter=new o$1p(0,0,0),this.emitRate=10,this.manualEmitCount=-1,this.updateSpeed=.01,this.targetStopDuration=0,this.disposeOnStop=!1,this.minEmitPower=1,this.maxEmitPower=1,this.minLifeTime=1,this.maxLifeTime=1,this.minSize=1,this.maxSize=1,this.minScaleX=1,this.maxScaleX=1,this.minScaleY=1,this.maxScaleY=1,this.minInitialRotation=0,this.maxInitialRotation=0,this.minAngularSpeed=0,this.maxAngularSpeed=0,this.layerMask=268435455,this.customShader=null,this.preventAutoStart=!1,this.noiseStrength=new o$1p(10,10,10),this.onAnimationEnd=null,this.blendMode=_0x439851.BLENDMODE_ONEONE,this.forceDepthWrite=!1,this.preWarmCycles=0,this.preWarmStepOffset=1,this.spriteCellChangeSpeed=1,this.startSpriteCellID=0,this.endSpriteCellID=0,this.spriteCellWidth=0,this.spriteCellHeight=0,this.spriteRandomStartCell=!1,this.translationPivot=new o$1o(0,0),this.beginAnimationOnStart=!1,this.beginAnimationFrom=0,this.beginAnimationTo=60,this.beginAnimationLoop=!1,this.worldOffset=new o$1p(0,0,0),this.gravity=new o$1p(0,0,0),this._colorGradients=null,this._sizeGradients=null,this._lifeTimeGradients=null,this._angularSpeedGradients=null,this._velocityGradients=null,this._limitVelocityGradients=null,this._dragGradients=null,this._emitRateGradients=null,this._startSizeGradients=null,this._rampGradients=null,this._colorRemapGradients=null,this._alphaRemapGradients=null,this.startDelay=0,this.limitVelocityDamping=.4,this.color1=new e$1X(1,1,1,1),this.color2=new e$1X(1,1,1,1),this.colorDead=new e$1X(0,0,0,1),this.textureMask=new e$1X(1,1,1,1),this._isSubEmitter=!1,this.billboardMode=_0xbf6524.PARTICLES_BILLBOARDMODE_ALL,this._isBillboardBased=!0,this.id=e,this.name=e}_0x1d0e34(),Object.defineProperties(_0x439851.prototype,{noiseTexture:{get:function(){return this._noiseTexture},set:function(e){this._noiseTexture!==e&&(this._noiseTexture=e,this._reset())}},isAnimationSheetEnabled:{get:function(){return this._isAnimationSheetEnabled},set:function(e){this._isAnimationSheetEnabled!=e&&(this._isAnimationSheetEnabled=e,this._reset())}},direction1:{get:function(){return this.particleEmitterType.direction1?this.particleEmitterType.direction1:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.direction1&&(this.particleEmitterType.direction1=e)}},direction2:{get:function(){return this.particleEmitterType.direction2?this.particleEmitterType.direction2:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.direction2&&(this.particleEmitterType.direction2=e)}},minEmitBox:{get:function(){return this.particleEmitterType.minEmitBox?this.particleEmitterType.minEmitBox:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.minEmitBox&&(this.particleEmitterType.minEmitBox=e)}},maxEmitBox:{get:function(){return this.particleEmitterType.maxEmitBox?this.particleEmitterType.maxEmitBox:_Maths_math_vector__WEBPACK_IMPORTED_MODULE_0__.Vector3.Zero()},set:function(e){this.particleEmitterType.maxEmitBox&&(this.particleEmitterType.maxEmitBox=e)}},isBillboardBased:{get:function(){return this._isBillboardBased},set:function(e){this._isBillboardBased!==e&&(this._isBillboardBased=e,this._reset())}}}),_0x439851.prototype.getScene=function(){return this._scene},_0x439851.prototype._hasTargetStopDurationDependantGradient=function(){return this._startSizeGradients&&this._startSizeGradients.length>0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0},_0x439851.prototype.getDragGradients=function(){return this._dragGradients},_0x439851.prototype.getLimitVelocityGradients=function(){return this._limitVelocityGradients},_0x439851.prototype.getColorGradients=function(){return this._colorGradients},_0x439851.prototype.getSizeGradients=function(){return this._sizeGradients},_0x439851.prototype.getColorRemapGradients=function(){return this._colorRemapGradients},_0x439851.prototype.getAlphaRemapGradients=function(){return this._alphaRemapGradients},_0x439851.prototype.getLifeTimeGradients=function(){return this._lifeTimeGradients},_0x439851.prototype.getAngularSpeedGradients=function(){return this._angularSpeedGradients},_0x439851.prototype.getVelocityGradients=function(){return this._velocityGradients},_0x439851.prototype.getStartSizeGradients=function(){return this._startSizeGradients},_0x439851.prototype.getEmitRateGradients=function(){return this._emitRateGradients},_0x439851.prototype._reset=function(){},_0x439851.prototype._removeGradientAndTexture=function(e,t,i){if(!t)return this;for(var n=0,r=0,o=t;r<o.length;r++){if(o[r].gradient===e){t.splice(n,1);break}n++}return i&&i.dispose(),this},_0x439851.prototype.createPointEmitter=function(e,t){var i=new _0xaf014b;return i.direction1=e,i.direction2=t,this.particleEmitterType=i,i},_0x439851.prototype.createHemisphericEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1);var i=new _0x4b20a8(e,t);return this.particleEmitterType=i,i},_0x439851.prototype.createSphereEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1);var i=new _0x4ccf7f(e,t);return this.particleEmitterType=i,i},_0x439851.prototype.createDirectedSphereEmitter=function(e,t,i){void 0===e&&(e=1),void 0===t&&(t=new o$1p(0,0,1)),void 0===i&&(i=new o$1p(0,0,1));var n=new _0x33b36c(e,t,i);return this.particleEmitterType=n,n},_0x439851.prototype.createCylinderEmitter=function(e,t,i,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=0);var r=new _0x18139b(e,t,i,n);return this.particleEmitterType=r,r},_0x439851.prototype.createDirectedCylinderEmitter=function(e,t,i,n,r){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=new o$1p(0,0,1)),void 0===r&&(r=new o$1p(0,0,1));var o=new _0x5a4942(e,t,i,n,r);return this.particleEmitterType=o,o},_0x439851.prototype.createConeEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=Math.PI/4);var i=new _0x36b207(e,t);return this.particleEmitterType=i,i},_0x439851.prototype.createBoxEmitter=function(e,t,i,n){var r=new _0x4c62f8;return this.particleEmitterType=r,this.direction1=e,this.direction2=t,this.minEmitBox=i,this.maxEmitBox=n,r},_0x439851._setRenderState=function(e,t){var i={};switch(t){case _0x4d4f68.BLENDMODE_ADD:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.SOURCE_ALPHA,functionSourceAlpha:l$13.ONE,functionDestinationRgb:l$13.ONE,functionDestinationAlpha:l$13.ONE}});break;case _0x4d4f68.BLENDMODE_ONEONE:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.ONE,functionSourceAlpha:l$13.ONE,functionDestinationRgb:l$13.ONE,functionDestinationAlpha:l$13.ONE}});break;case _0x4d4f68.BLENDMODE_STANDARD:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.SOURCE_ALPHA,functionSourceAlpha:l$13.ONE,functionDestinationRgb:l$13.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:l$13.ONE_MINUS_SOURCE_ALPHA}});break;case _0x4d4f68.BLENDMODE_MULTIPLY:case _0x4d4f68.BLENDMODE_MULTIPLYADD:i=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,blending:{enabled:!0,equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.DESTINATION_COLOR,functionSourceAlpha:l$13.ZERO,functionDestinationRgb:l$13.ONE,functionDestinationAlpha:l$13.ONE}})}e.renderState=i},_0x439851._Parse=function(e,t){var i;e.texture?((i=new Image).src=e.texture.url,i.onload=function(){e$2e(t.particleTexture)||(t.particleTexture=new t$U({context:t._context,source:this,pixelFormat:V$12.RGBA,flipY:!1})),t.particleTexture.name=e.texture.url}):e.textureName&&((i=new Image).src=e.textureName,i.onload=function(){e$2e(t.particleTexture)||(t.particleTexture=new t$U({context:t._context,source:this,pixelFormat:V$12.RGBA,flipY:!1})),t.particleTexture.name=e.textureName});if(e.emitterId||0===e.emitterId||void 0!==e.emitter){if(!e.emitterId){var n=new o$1p;n.x=e.emitter[0],n.y=e.emitter[2],n.z=e.emitter[1],t.emitter=n}}else t.emitter=new o$1p(0,0,0);if(t.isLocal=!1,void 0!==e.renderingGroupId&&(t.renderingGroupId=e.renderingGroupId),void 0!==e.isBillboardBased&&(t.isBillboardBased=e.isBillboardBased),void 0!==e.billboardMode&&(t.billboardMode=e.billboardMode),e.animations){for(var r=0;r<e.animations.length;r++){var o=e.animations[r];t.animations.push(_0x48b138.Parse(o))}t.beginAnimationOnStart=e.beginAnimationOnStart,t.beginAnimationFrom=e.beginAnimationFrom,t.beginAnimationTo=e.beginAnimationTo,t.beginAnimationLoop=e.beginAnimationLoop}e.autoAnimate&&scene&&scene.beginAnimation(t,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),t.startDelay=0|e.startDelay,t.minAngularSpeed=e.minAngularSpeed,t.maxAngularSpeed=e.maxAngularSpeed,t.minSize=e.minSize,t.maxSize=e.maxSize,e.minScaleX&&(t.minScaleX=e.minScaleX,t.maxScaleX=e.maxScaleX,t.minScaleY=e.minScaleY,t.maxScaleY=e.maxScaleY),void 0!==e.preWarmCycles&&(t.preWarmCycles=e.preWarmCycles,t.preWarmStepOffset=e.preWarmStepOffset),void 0!==e.minInitialRotation&&(t.minInitialRotation=e.minInitialRotation,t.maxInitialRotation=e.maxInitialRotation),t.minLifeTime=e.minLifeTime,t.maxLifeTime=e.maxLifeTime,t.minEmitPower=e.minEmitPower,t.maxEmitPower=e.maxEmitPower,t.emitRate=e.emitRate;var a=new o$1p;if(a.x=e.gravity[0],a.y=e.gravity[2],a.z=e.gravity[1],t.gravity=a,e.noiseStrength){var s=new o$1p;s.x=e.noiseStrength[0],s.y=e.noiseStrength[2],s.z=e.noiseStrength[1],t.noiseStrength=s}var l,u=new e$1X,c=new e$1X,h=new e$1X;if(e$1X.unpack(e.color1,0,u),e$1X.unpack(e.color2,0,c),e$1X.unpack(e.colorDead,0,h),t.color1=u,t.color2=c,t.colorDead=h,t.updateSpeed=e.updateSpeed,t.targetStopDuration=e.targetStopDuration,t.blendMode=e.blendMode,e.colorGradients)for(var d=0,f=e.colorGradients;d<f.length;d++){var p=f[d],_=new e$1X;e$1X.unpack(p.color1,0,_);var m=void 0;p.color2&&(m=new e$1X,e$1X.unpack(p.color2,0,m)),t.addColorGradient(p.gradient,_,m)}if(e.rampGradients){for(var g=0,x=e.rampGradients;g<x.length;g++){var y=x[g],v=new e$1X;e$1X.unpack(y.color,0,v),t.addRampGradient(y.gradient,v)}t.useRampGradients=e.useRampGradients}if(e.colorRemapGradients)for(var $=0,b=e.colorRemapGradients;$<b.length;$++){var T=b[$];t.addColorRemapGradient(T.gradient,void 0!==T.factor1?T.factor1:T.factor,T.factor2)}if(e.alphaRemapGradients)for(var C=0,S=e.alphaRemapGradients;C<S.length;C++){var w=S[C];t.addAlphaRemapGradient(w.gradient,void 0!==w.factor1?w.factor1:w.factor,w.factor2)}if(e.sizeGradients)for(var E=0,P=e.sizeGradients;E<P.length;E++){var A=P[E];t.addSizeGradient(A.gradient,void 0!==A.factor1?A.factor1:A.factor,A.factor2)}if(e.angularSpeedGradients)for(var L=0,M=e.angularSpeedGradients;L<M.length;L++){var R=M[L];t.addAngularSpeedGradient(R.gradient,void 0!==R.factor1?R.factor1:R.factor,R.factor2)}if(e.velocityGradients)for(var O=0,D=e.velocityGradients;O<D.length;O++){var I=D[O];t.addVelocityGradient(I.gradient,void 0!==I.factor1?I.factor1:I.factor,I.factor2)}if(e.dragGradients)for(var B=0,F=e.dragGradients;B<F.length;B++){var N=F[B];t.addDragGradient(N.gradient,void 0!==N.factor1?N.factor1:N.factor,N.factor2)}if(e.emitRateGradients)for(var G=0,z=e.emitRateGradients;G<z.length;G++){var U=z[G];t.addEmitRateGradient(U.gradient,void 0!==U.factor1?U.factor1:U.factor,U.factor2)}if(e.startSizeGradients)for(var V=0,k=e.startSizeGradients;V<k.length;V++){var W=k[V];t.addStartSizeGradient(W.gradient,void 0!==W.factor1?W.factor1:W.factor,W.factor2)}if(e.lifeTimeGradients)for(var H=0,q=e.lifeTimeGradients;H<q.length;H++){var j=q[H];t.addLifeTimeGradient(j.gradient,void 0!==j.factor1?j.factor1:j.factor,j.factor2)}if(e.limitVelocityGradients){for(var X=0,Y=e.limitVelocityGradients;X<Y.length;X++){var Z=Y[X];t.addLimitVelocityGradient(Z.gradient,void 0!==Z.factor1?Z.factor1:Z.factor,Z.factor2)}t.limitVelocityDamping=e.limitVelocityDamping}if(e.particleEmitterType){switch(e.particleEmitterType.type){case"SphereParticleEmitter":l=new _0x4ccf7f;break;case"SphereDirectedParticleEmitter":l=new _0x33b36c;break;case"ConeEmitter":case"ConeParticleEmitter":l=new _0x36b207;break;case"CylinderParticleEmitter":l=new _0x18139b;break;case"CylinderDirectedParticleEmitter":l=new _0x5a4942;break;case"HemisphericParticleEmitter":l=new _0x4b20a8;break;case"PointParticleEmitter":l=new _0xaf014b;break;case"MeshParticleEmitter":l=new MeshParticleEmitter;break;default:l=new _0x4c62f8}l.parse(e.particleEmitterType)}else(l=new _0x4c62f8).parse(e,scene);t.particleEmitterType=l,t.startSpriteCellID=e.startSpriteCellID,t.endSpriteCellID=e.endSpriteCellID,t.spriteCellWidth=e.spriteCellWidth,t.spriteCellHeight=e.spriteCellHeight,t.spriteCellChangeSpeed=e.spriteCellChangeSpeed,t.spriteRandomStartCell=e.spriteRandomStartCell};var _0x4dc61a=(_0x4fe41c=!0,function(e,t){var i=_0x4fe41c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fe41c=!1,i}),_0x43942f=_0x4dc61a(void 0,(function(){return _0x43942f.toString().search("(((.+)+)+)+$").toString().constructor(_0x43942f).search("(((.+)+)+)+$")})),_0x4fe41c;function _0x30da6f(e,t){this.gradient=e,this.color=t}_0x43942f();var _0x4772c3=(_0x6d21e4=!0,function(e,t){var i=_0x6d21e4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6d21e4=!1,i}),_0x41e7eb=_0x4772c3(void 0,(function(){return _0x41e7eb.toString().search("(((.+)+)+)+$").toString().constructor(_0x41e7eb).search("(((.+)+)+)+$")})),_0x6d21e4;function _0x180241(e,t,i){this.gradient=e,this.color1=t,this.color2=i}_0x41e7eb(),_0x180241.prototype.getColorToRef=function(e){this.color2?e$1X.lerp(this.color1,this.color2,Math.random(),e):e$1X.clone(this.color1,e)};var _0x19f519=(_0x3b8c48=!0,function(e,t){var i=_0x3b8c48?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b8c48=!1,i}),_0xa76261=_0x19f519(void 0,(function(){return _0xa76261.toString().search("(((.+)+)+)+$").toString().constructor(_0xa76261).search("(((.+)+)+)+$")})),_0x3b8c48;function _0x341870(e,t,i){this.gradient=e,this.factor1=t,this.factor2=i}function g$u(e,t){if(t!==e._currentFramebuffer){var i;e._currentFramebuffer=t,typeof WebGLRenderingContext<"u"&&(i=[de$y.BACK]);var n=i;if(e$2e(t))t._bind(),n=t._getActiveColorAttachments();else{var r=e._gl;r.bindFramebuffer(r.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}function B$i(e,t,i,n){var r=e._currentRenderState,o=e._currentPassState,a=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,d$1m.partialApply(e._gl,r,t,o,i,a,i.viewport,n)}function u$m(e,t,i,n){var r=u$Z(i._renderState,e._defaultRenderState);if(e$2e(t)&&r.depthTest&&r.depthTest.enabled&&!t.hasDepthAttachment)throw new t$15("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");g$u(e,t),B$i(e,r,n,!1)}function s$i(e){this._pointCount=e.pointCount,this._primitiveMode=e.primitiveMode,this._feedbackShaderProgram=e.feedbackShader,this._normalShaderProgram=e.normalShader,this._modelMatrix=e.modelMatrix,this._normalShaderUniformMap=e.normalShaderUniformMap,this._feedbackShaderUniformMap=e.feedbackShaderUniformMap,this._attributes=e.attributes,this._framebuffer=e.framebuffer,this._renderState=e.renderState,this._indices=e.indices,this._textureEffect=e.textureEffect,this._frameIdx=0,this._VBOs=new Array,this._VBOs[0]=new Array,this._VBOs[1]=new Array,this._indexBuffer=null,this._pass=Le$q.ANALYSIS,this._handle=void 0,this._gl=void 0,this.initialized=!1,this._drawEvent=new o$1h,this._uniformBuffers=[]}_0xa76261(),_0x341870.prototype.getFactor=function(){return void 0===this.factor2||this.factor2===this.factor1?this.factor1:this.factor1+(this.factor2-this.factor1)*Math.random()},s$i.prototype.beginDraw=function(e,t,i,n){u$m(e,t,i,n)},s$i.prototype.execute=function(e,t){var i=e._gl;if(this._gl=i,!this.initialized){for(var n=this._attributes.length,r=0;r<n;++r)this._addAttribute(e,this._attributes[r]);this._textureEffect&&this._createIndexBuffer(e),e$2e(this._handle)||(this._handle=i.createTransformFeedback()),this.initialized=!0}u$m(e,u$Z(this._framebuffer,t.framebuffer),this,t),this._bindVBOToVertexAttribute(e),this._enableVertexAttribArray(e,!0),this._drawTransformFeedback(e),this._drawNormal(e,t),this._drawEvent.raiseEvent(e,t),this._enableVertexAttribArray(e,!1),this._frameIdx=1-this._frameIdx},s$i.prototype._drawNormal=function(e,t){var i=e._gl;this._normalShaderProgram._bind(),e._us.model=u$Z(this._modelMatrix,p$1d.IDENTITY),this._normalShaderProgram._setUniforms(this._normalShaderUniformMap,e._us,e.validateShaderProgram,this),this._textureEffect?(i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,this._indexBuffer),i.drawElements(this._primitiveMode,this._indices.length,i.UNSIGNED_INT,0)):i.drawArrays(this._primitiveMode,0,this._pointCount)},s$i.prototype._drawTransformFeedback=function(e){var t=e._gl;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,this._handle),this._bindVBOToTransformFeedback(e,!0),this._feedbackShaderProgram._bind(),e._us.model=u$Z(this._modelMatrix,p$1d.IDENTITY),this._feedbackShaderProgram._setUniforms(this._feedbackShaderUniformMap,e._us,e.validateShaderProgram,this),t.enable(t.RASTERIZER_DISCARD),t.beginTransformFeedback(this._primitiveMode),this._textureEffect?t.drawArrays(this._primitiveMode,0,4*this._pointCount):t.drawArrays(this._primitiveMode,0,this._pointCount),t.endTransformFeedback(),t.disable(t.RASTERIZER_DISCARD),this._bindVBOToTransformFeedback(e,!1)},s$i.prototype._enableVertexAttribArray=function(e,t){for(var i=e._gl,n=0;n<this._attributes.length;n++){var r=this._attributes[n].index;t?i.enableVertexAttribArray(r):i.disableVertexAttribArray(r)}},s$i.prototype._bindVBOToVertexAttribute=function(e){for(var t=e._gl,i=0;i<this._attributes.length;i++){var n=this._attributes[i],r=n.index,o=n.componentsPerAttribute;t.bindBuffer(t.ARRAY_BUFFER,this._VBOs[this._frameIdx][r]._getBuffer()),t.vertexAttribPointer(r,o,t.FLOAT,!1,0,0)}},s$i.prototype._bindVBOToTransformFeedback=function(e,t){for(var i=e._gl,n=0;n<this._attributes.length;n++){var r=this._attributes[n].index,o=t?this._VBOs[1-this._frameIdx][r]._getBuffer():null;i.bindBufferBase(i.TRANSFORM_FEEDBACK_BUFFER,r,o)}},s$i.prototype._addAttribute=function(e,t){var i=t.data,n=t.index;this._VBOs[0][n]=this._createVBO(e,i),this._VBOs[1][n]=this._createVBO(e,i)},s$i.prototype._createVBO=function(e,t){return new t$X({context:e,bufferTarget:de$y.ARRAY_BUFFER,usage:de$y.DYNAMIC_DRAW,typedArray:t})},s$i.prototype._createIndexBuffer=function(e){var t=e._gl;this._indexBuffer=t.createBuffer(),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this._indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this._indices,t.STATIC_DRAW)},s$i.prototype.isDestroyed=function(){return!1},s$i.prototype.destroy=function(){e$2e(this._normalShaderProgram)&&(this._normalShaderProgram=this._normalShaderProgram&&this._normalShaderProgram.destroy()),e$2e(this._feedbackShaderProgram)&&(this._feedbackShaderProgram=this._feedbackShaderProgram&&this._feedbackShaderProgram.destroy());for(var e=0;e<this._attributes.length;e++){var t=this._attributes[e].index;this._VBOs[0][t].destroy(),this._VBOs[1][t].destroy()}return e$2e(this._indexBuffer)&&this._gl.deleteBuffer(this._indexBuffer),e$2e(this._handle)&&(this._handle=this._gl.deleteTransformFeedback(this._handle),this._handle=void 0),i$11(this)},Object.defineProperties(s$i.prototype,{pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e)}}});var _0x5d14f5="#version 300 es\n#define PI 3.14159\nuniform float currentCount;\nuniform float timeDelta;\nuniform float stopFactor;\n#ifndef LOCAL\nuniform mat4 emitterWM;\n#endif\nuniform vec2 lifeTime;\nuniform vec2 emitPower;\nuniform vec2 sizeRange;\nuniform vec4 scaleRange;\n#ifndef COLORGRADIENTS\nuniform vec4 color1;\nuniform vec4 color2;\n#endif\nuniform vec3 gravity;\nuniform sampler2D randomSampler;\nuniform sampler2D randomSampler2;\nuniform vec4 angleRange;\n#ifdef BOXEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\nuniform vec3 minEmitBox;\nuniform vec3 maxEmitBox;\n#endif\n#ifdef POINTEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#endif\n#ifdef HEMISPHERICEMITTER\nuniform float radius;\nuniform float radiusRange;\nuniform float directionRandomizer;\n#endif\n#ifdef SPHEREEMITTER\nuniform float radius;\nuniform float radiusRange;\n#ifdef DIRECTEDSPHEREEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#else\nuniform float directionRandomizer;\n#endif\n#endif\n#ifdef CYLINDEREMITTER\nuniform float radius;\nuniform float height;\nuniform float radiusRange;\n#ifdef DIRECTEDCYLINDEREMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#else\nuniform float directionRandomizer;\n#endif\n#endif\n#ifdef CONEEMITTER\nuniform vec2 radius;\nuniform float coneAngle;\nuniform vec2 height;\nuniform float directionRandomizer;\n#endif\nin vec3 position;\n#ifdef CUSTOMEMITTER\nin vec3 initialPosition;\n#endif\nin float age;\nin float life;\nin vec4 seed;\nin vec3 size;\n#ifndef COLORGRADIENTS\nin vec4 color;\n#endif\nin vec3 direction;\n#ifndef BILLBOARD\nin vec3 initialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nin float angle;\n#else\nin vec2 angle;\n#endif\n#ifdef ANIMATESHEET\nin float cellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nin float cellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nin vec3 noiseCoordinates1;\nin vec3 noiseCoordinates2;\n#endif\nout vec3 outPosition;\n#ifdef CUSTOMEMITTER\nout vec3 outInitialPosition;\n#endif\nout float outAge;\nout float outLife;\nout vec4 outSeed;\nout vec3 outSize;\n#ifndef COLORGRADIENTS\nout vec4 outColor;\n#endif\nout vec3 outDirection;\n#ifndef BILLBOARD\nout vec3 outInitialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nout float outAngle;\n#else\nout vec2 outAngle;\n#endif\n#ifdef ANIMATESHEET\nout float outCellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nout float outCellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nout vec3 outNoiseCoordinates1;\nout vec3 outNoiseCoordinates2;\n#endif\n#ifdef SIZEGRADIENTS\nuniform sampler2D sizeGradientSampler;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nuniform sampler2D angularSpeedGradientSampler;\n#endif\n#ifdef VELOCITYGRADIENTS\nuniform sampler2D velocityGradientSampler;\n#endif\n#ifdef LIMITVELOCITYGRADIENTS\nuniform sampler2D limitVelocityGradientSampler;\nuniform float limitVelocityDamping;\n#endif\n#ifdef DRAGGRADIENTS\nuniform sampler2D dragGradientSampler;\n#endif\n#ifdef NOISE\nuniform vec3 noiseStrength;\nuniform sampler2D noiseSampler;\n#endif\n#ifdef ANIMATESHEET\nuniform vec4 cellInfos;\n#endif\nvec3 getRandomVec3(float offset) {\nreturn texture(randomSampler2, vec2(float(gl_VertexID) * offset / currentCount, 0)).rgb;\n}\nvec4 getRandomVec4(float offset) {\nreturn texture(randomSampler, vec2(float(gl_VertexID) * offset / currentCount, 0));\n}\nvoid main() {\nfloat newAge = age + timeDelta;\nif (newAge >= life && stopFactor != 0.) {\nvec3 newPosition;\nvec3 newDirection;\nvec4 randoms = getRandomVec4(seed.x);\noutLife = lifeTime.x + (lifeTime.y - lifeTime.x) * randoms.r;\noutAge = newAge - life;\noutSeed = seed;\n#ifdef SIZEGRADIENTS\noutSize.x = texture(sizeGradientSampler, vec2(0, 0)).r;\n#else\noutSize.x = sizeRange.x + (sizeRange.y - sizeRange.x) * randoms.g;\n#endif\noutSize.y = scaleRange.x + (scaleRange.y - scaleRange.x) * randoms.b;\noutSize.z = scaleRange.z + (scaleRange.w - scaleRange.z) * randoms.a;\n#ifndef COLORGRADIENTS\noutColor = color1 + (color2 - color1) * randoms.b;\n#endif\n#ifndef ANGULARSPEEDGRADIENTS\noutAngle.y = angleRange.x + (angleRange.y - angleRange.x) * randoms.a;\noutAngle.x = angleRange.z + (angleRange.w - angleRange.z) * randoms.r;\n#else\noutAngle = angleRange.z + (angleRange.w - angleRange.z) * randoms.r;\n#endif\n#ifdef POINTEMITTER\nvec3 randoms2 = getRandomVec3(seed.y);\nvec3 randoms3 = getRandomVec3(seed.z);\nnewPosition = vec3(0, 0, 0);\nnewDirection = direction1 + (direction2 - direction1) * randoms3;\n#elif defined(BOXEMITTER)\nvec3 randoms2 = getRandomVec3(seed.y);\nvec3 randoms3 = getRandomVec3(seed.z);\nnewPosition = minEmitBox + (maxEmitBox - minEmitBox) * randoms2;\nnewDirection = direction1 + (direction2 - direction1) * randoms3;\n#elif defined(HEMISPHERICEMITTER)\nvec3 randoms2 = getRandomVec3(seed.y);\nvec3 randoms3 = getRandomVec3(seed.z);\nfloat phi = 2.0 * PI * randoms2.x;\nfloat theta = acos(2.0 * randoms2.y - 1.0);\nfloat randX = cos(phi) * sin(theta);\nfloat randY = sin(phi) * sin(theta);\nfloat randZ = cos(theta);\nnewPosition = (radius - (radius * radiusRange * randoms2.z)) * vec3(randX, abs(randY), randZ);\nnewDirection = newPosition + directionRandomizer * randoms3;\n#elif defined(SPHEREEMITTER)\nvec3 randoms2 = getRandomVec3(seed.y);\nvec3 randoms3 = getRandomVec3(seed.z);\nfloat phi = 2.0 * PI * randoms2.x;\nfloat theta = acos(2.0 * randoms2.y - 1.0);\nfloat randX = cos(phi) * sin(theta);\nfloat randY = cos(theta);\nfloat randZ = sin(phi) * sin(theta);\nnewPosition = (radius - (radius * radiusRange * randoms2.z)) * vec3(randX, randY, randZ);\n#ifdef DIRECTEDSPHEREEMITTER\nnewDirection = normalize(direction1 + (direction2 - direction1) * randoms3);\n#else\nnewDirection = normalize(newPosition + directionRandomizer * randoms3);\n#endif\n#elif defined(CYLINDEREMITTER)\nvec3 randoms2 = getRandomVec3(seed.y);\nvec3 randoms3 = getRandomVec3(seed.z);\nfloat zPos = (randoms2.x - 0.5)*height;\nfloat angle = randoms2.y * PI * 2.;\nfloat inverseRadiusRangeSquared = ((1.-radiusRange) * (1.-radiusRange));\nfloat positionRadius = radius*sqrt(inverseRadiusRangeSquared + (randoms2.z * (1.-inverseRadiusRangeSquared)));\nfloat xPos = positionRadius * cos(angle);\nfloat yPos = positionRadius * sin(angle);\nnewPosition = vec3(xPos, yPos, zPos);\n#ifdef DIRECTEDCYLINDEREMITTER\nnewDirection = direction1 + (direction2 - direction1) * randoms3;\n#else\nangle = angle + ((randoms3.x-0.5) * PI) * directionRandomizer;\nnewDirection = vec3(cos(angle), (randoms3.y-0.5) * directionRandomizer, sin(angle));\nnewDirection = normalize(newDirection);\n#endif\n#elif defined(CONEEMITTER)\nvec3 randoms2 = getRandomVec3(seed.y);\nfloat s = 2.0 * PI * randoms2.x;\n#ifdef CONEEMITTERSPAWNPOINT\nfloat h = 0.0001;\n#else\nfloat h = randoms2.y * height.y;\nh = 1. - h * h;\n#endif\nfloat lRadius = radius.x - radius.x * randoms2.z * radius.y;\nlRadius = lRadius * h;\nfloat randX = lRadius * sin(s);\nfloat randY = lRadius * cos(s);\nfloat randZ = h * height.x;\nnewPosition = vec3(randX, randY, randZ);\nif (abs(cos(coneAngle)) == 1.0) {\nnewDirection = vec3(0.0, 0.0, 1.0);\n} else {\nvec3 randoms3 = getRandomVec3(seed.z);\nnewDirection = normalize(newPosition + directionRandomizer * randoms3);\n}\n#elif defined(CUSTOMEMITTER)\nnewPosition = initialPosition;\noutInitialPosition = initialPosition;\n#else\nnewPosition = vec3(0., 0., 0.);\nnewDirection = 2.0 * (getRandomVec3(seed.w) - vec3(0.5, 0.5, 0.5));\n#endif\nfloat power = emitPower.x + (emitPower.y - emitPower.x) * randoms.a;\n#ifdef LOCAL\noutPosition = newPosition;\n#else\noutPosition = (emitterWM * vec4(newPosition, 1.)).xyz;\n#endif\n#ifdef CUSTOMEMITTER\noutDirection = direction;\n#ifndef BILLBOARD\noutInitialDirection = direction;\n#endif\n#else\n#ifdef LOCAL\nvec3 initial = newDirection;\n#else\nvec3 initial = (emitterWM * vec4(newDirection, 0.)).xyz;\n#endif\noutDirection = initial * power;\n#ifndef BILLBOARD\noutInitialDirection = initial;\n#endif\n#endif\n#ifdef ANIMATESHEET\noutCellIndex = cellInfos.x;\n#ifdef ANIMATESHEETRANDOMSTART\noutCellStartOffset = randoms.a * outLife;\n#endif\n#endif\n#ifdef NOISE\noutNoiseCoordinates1 = noiseCoordinates1;\noutNoiseCoordinates2 = noiseCoordinates2;\n#endif\n} else {\nfloat directionScale = timeDelta;\noutAge = newAge;\nfloat ageGradient = newAge / life;\n#ifdef VELOCITYGRADIENTS\ndirectionScale *= texture(velocityGradientSampler, vec2(ageGradient, 0)).r;\n#endif\n#ifdef DRAGGRADIENTS\ndirectionScale *= 1.0 - texture(dragGradientSampler, vec2(ageGradient, 0)).r;\n#endif\n#if defined(CUSTOMEMITTER)\noutPosition = position + (direction - position) * ageGradient;\noutInitialPosition = initialPosition;\n#else\noutPosition = position + direction * directionScale;\n#endif\noutLife = life;\noutSeed = seed;\n#ifndef COLORGRADIENTS\noutColor = color;\n#endif\n#ifdef SIZEGRADIENTS\noutSize.x = texture(sizeGradientSampler, vec2(ageGradient, 0)).r;\noutSize.yz = size.yz;\n#else\noutSize = size;\n#endif\n#ifndef BILLBOARD\noutInitialDirection = initialDirection;\n#endif\n#ifdef CUSTOMEMITTER\noutDirection = direction;\n#else\nvec3 updatedDirection = direction + gravity * timeDelta;\n#ifdef LIMITVELOCITYGRADIENTS\nfloat limitVelocity = texture(limitVelocityGradientSampler, vec2(ageGradient, 0)).r;\nfloat currentVelocity = length(updatedDirection);\nif (currentVelocity > limitVelocity) {\nupdatedDirection = updatedDirection * limitVelocityDamping;\n}\n#endif\noutDirection = updatedDirection;\n#ifdef NOISE\nfloat fetchedR = texture(noiseSampler, vec2(noiseCoordinates1.x, noiseCoordinates1.y) * vec2(0.5) + vec2(0.5)).r;\nfloat fetchedG = texture(noiseSampler, vec2(noiseCoordinates1.z, noiseCoordinates2.x) * vec2(0.5) + vec2(0.5)).r;\nfloat fetchedB = texture(noiseSampler, vec2(noiseCoordinates2.y, noiseCoordinates2.z) * vec2(0.5) + vec2(0.5)).r;\nvec3 force = vec3(2. * fetchedR - 1., 2. * fetchedG - 1., 2. * fetchedB - 1.) * noiseStrength;\noutDirection = outDirection + force * timeDelta;\noutNoiseCoordinates1 = noiseCoordinates1;\noutNoiseCoordinates2 = noiseCoordinates2;\n#endif\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nfloat angularSpeed = texture(angularSpeedGradientSampler, vec2(ageGradient, 0)).r;\noutAngle = angle + angularSpeed * timeDelta;\n#else\noutAngle = vec2(angle.x + angle.y * timeDelta, angle.y);\n#endif\n#ifdef ANIMATESHEET\nfloat offsetAge = outAge;\nfloat dist = cellInfos.y - cellInfos.x;\n#ifdef ANIMATESHEETRANDOMSTART\noutCellStartOffset = cellStartOffset;\noffsetAge += cellStartOffset;\n#else\nfloat cellStartOffset = 0.;\n#endif\nfloat ratio = 0.;\nif (cellInfos.w == 1.0) {\nratio = clamp(mod(cellStartOffset + cellInfos.z * offsetAge, life) / life, 0., 1.0);\n}\nelse {\nratio = clamp(cellStartOffset + cellInfos.z * offsetAge / life, 0., 1.0);\n}\noutCellIndex = float(int(cellInfos.x + ratio * dist));\n#endif\n}\n}\n",_0x590a36="#version 300 es\nvoid main() {\ndiscard;\n}\n",_0x12e71e="precision highp float;\nuniform vec2 translationPivot;\nuniform vec3 worldOffset;\n#ifdef LOCAL\nuniform mat4 emitterWM;\n#endif\nattribute vec3 position;\nattribute float age;\nattribute float life;\nattribute vec3 size;\n#ifndef BILLBOARD\nattribute vec3 initialDirection;\n#endif\n#ifdef BILLBOARDSTRETCHED\nattribute vec3 direction;\n#endif\nattribute float angle;\n#ifdef ANIMATESHEET\nattribute float cellIndex;\n#endif\nattribute vec2 offset;\nattribute vec2 uv;\nvarying vec2 vUV;\nvarying vec4 vColor;\nvarying vec3 vPositionW;\n#ifdef COLORGRADIENTS\nuniform sampler2D colorGradientSampler;\n#else\nuniform vec4 colorDead;\nattribute vec4 color;\n#endif\n#ifdef ANIMATESHEET\nuniform vec3 sheetInfos;\n#endif\n#ifdef BILLBOARD\nuniform vec3 eyePosition;\n#endif\nvec3 rotate(vec3 yaxis, vec3 rotatedCorner) {\nvec3 xaxis = normalize(cross(vec3(0., 1.0, 0.), yaxis));\nvec3 zaxis = normalize(cross(yaxis, xaxis));\nvec3 row0 = vec3(xaxis.x, xaxis.y, xaxis.z);\nvec3 row1 = vec3(yaxis.x, yaxis.y, yaxis.z);\nvec3 row2 = vec3(zaxis.x, zaxis.y, zaxis.z);\nmat3 rotMatrix = mat3(row0, row1, row2);\nvec3 alignedCorner = rotMatrix * rotatedCorner;\n#ifdef LOCAL\nreturn ((emitterWM * vec4(position, 1.0)).xyz + worldOffset) + alignedCorner;\n#else\nreturn (position + worldOffset) + alignedCorner;\n#endif\n}\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera, vec3 rotatedCorner) {\nvec3 normalizedToCamera = normalize(toCamera);\nvec3 normalizedCrossDirToCamera = normalize(cross(normalize(direction), normalizedToCamera));\nvec3 crossProduct = normalize(cross(normalizedToCamera, normalizedCrossDirToCamera));\nvec3 row0 = vec3(normalizedCrossDirToCamera.x, normalizedCrossDirToCamera.y, normalizedCrossDirToCamera.z);\nvec3 row1 = vec3(crossProduct.x, crossProduct.y, crossProduct.z);\nvec3 row2 = vec3(normalizedToCamera.x, normalizedToCamera.y, normalizedToCamera.z);\nmat3 rotMatrix = mat3(row0, row1, row2);\nvec3 alignedCorner = rotMatrix * rotatedCorner;\n#ifdef LOCAL\nreturn ((emitterWM * vec4(position, 1.0)).xyz + worldOffset) + alignedCorner;\n#else\nreturn (position + worldOffset) + alignedCorner;\n#endif\n}\n#endif\nvoid main() {\n#ifdef ANIMATESHEET\nfloat rowOffset = floor(cellIndex / sheetInfos.z);\nfloat columnOffset = cellIndex - rowOffset * sheetInfos.z;\nvec2 uvScale = sheetInfos.xy;\nvec2 uvOffset = vec2(uv.x , 1.0 - uv.y);\nvUV = (uvOffset + vec2(columnOffset, rowOffset)) * uvScale;\n#else\nvUV = uv;\n#endif\nfloat ratio = age / life;\n#ifdef COLORGRADIENTS\nvColor = texture2D(colorGradientSampler, vec2(ratio, 0));\n#else\nvColor = color * vec4(1.0 - ratio) + colorDead * vec4(ratio);\n#endif\nvec2 cornerPos = (offset - translationPivot) * size.yz * size.x + translationPivot;\n#ifdef BILLBOARD\nvec4 rotatedCorner;\nrotatedCorner.w = 0.;\n#ifdef BILLBOARDY\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.z = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.y = 0.;\nvec3 yaxis = (position + worldOffset) - eyePosition;\nyaxis.y = 0.;\nvPositionW = rotate(normalize(yaxis), rotatedCorner.xyz);\nvec4 viewPosition = (czm_view * vec4(vPositionW, 1.0));\n#elif defined(BILLBOARDSTRETCHED)\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.z = 0.;\nvec3 toCamera = (position + worldOffset) - eyePosition;\nvPositionW = rotateAlign(toCamera, rotatedCorner.xyz);\nvec4 viewPosition = (czm_view * vec4(vPositionW, 1.0));\n#else\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.z = 0.;\n#ifdef LOCAL\nvec4 viewPosition = czm_modelView * vec4(((emitterWM * vec4(position, 1.0)).xyz + worldOffset), 1.0) + rotatedCorner;\n#else\nvec4 viewPosition = czm_modelView * vec4((position + worldOffset), 1.0) + rotatedCorner;\n#endif\nvPositionW = (czm_inverseView * viewPosition).xyz;\n#endif // BILLBOARDY\n#else\nvec3 rotatedCorner;\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.y = 0.;\nrotatedCorner.z = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nvec3 yaxis = normalize(initialDirection);\nvPositionW = rotate(yaxis, rotatedCorner);\nvec4 viewPosition = czm_view * vec4(vPositionW, 1.0);\n#endif // BILLBOARD\ngl_Position = czm_projection * viewPosition;\n}\n",_0x25e40d="precision highp float;\nuniform sampler2D diffuseSampler;\nvarying vec2 vUV;\nvarying vec4 vColor;\nvoid main() {\nvec4 textureColor = texture2D(diffuseSampler, vUV);\ngl_FragColor = textureColor * vColor;\n#ifdef BLENDMULTIPLYMODE\nfloat alpha = vColor.a * textureColor.a;\ngl_FragColor.rgb = gl_FragColor.rgb * alpha + vec3(1.0) * (1.0 - alpha);\n#endif\n}\n",_0x1e4683=(_0xb9378b=!0,function(e,t){var i=_0xb9378b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb9378b=!1,i}),_0xdfb7ad=_0x1e4683(void 0,(function(){return _0xdfb7ad.toString().search("(((.+)+)+)+$").toString().constructor(_0xdfb7ad).search("(((.+)+)+)+$")})),_0xb9378b;function _0x42bbfb(){this.particlePositionGenerator=function(){},this.particleDestinationGenerator=function(){}}_0xdfb7ad(),_0x42bbfb.prototype.startDirectionFunction=function(e,t,i,n){var r=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.TmpVectors.Vector3[0];if(this.particleDestinationGenerator){this.particleDestinationGenerator(-1,i,r);var o=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.TmpVectors.Vector3[1];r.subtractToRef(i.position,o),o.scaleToRef(1/i.lifeTime,r)}else r.set(0,0,0);n?t.copyFrom(r):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Vector3.TransformNormalToRef(r,e,t)},_0x42bbfb.prototype.startPositionFunction=function(e,t,i,n){var r=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.TmpVectors.Vector3[0];this.particlePositionGenerator?this.particlePositionGenerator(-1,i,r):r.set(0,0,0),n?t.copyFrom(r):_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__.Vector3.TransformCoordinatesToRef(r,e,t)},_0x42bbfb.prototype.clone=function(){var e=new _0x42bbfb;return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x42bbfb.prototype.applyToShader=function(e){},_0x42bbfb.prototype.getEffectDefines=function(e){e.push("CUSTOMEMITTER")},_0x42bbfb.prototype.getClassName=function(){return"CustomParticleEmitter"},_0x42bbfb.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e},_0x42bbfb.prototype.parse=function(e){};var _0x1d82ec=(_0x359294=!0,function(e,t){var i=_0x359294?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x359294=!1,i}),_0x5dd3ca=_0x1d82ec(void 0,(function(){return _0x5dd3ca.toString().search("(((.+)+)+)+$").toString().constructor(_0x5dd3ca).search("(((.+)+)+)+$")})),_0x359294;function _0xdebb2b(){}_0x5dd3ca(),_0xdebb2b.GetCurrentGradient=function(e,t,i){if(t[0].gradient>e)i(t[0],t[0],1);else{for(var n=0;n<t.length-1;n++){var r=t[n],o=t[n+1];if(e>=r.gradient&&e<=o.gradient)return void i(r,o,(e-r.gradient)/(o.gradient-r.gradient))}var a=t.length-1;i(t[a],t[a],1)}};var _0x54614a=(_0x4a555c=!0,function(e,t){var i=_0x4a555c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4a555c=!1,i}),_0x52af73=_0x54614a(void 0,(function(){return _0x52af73.toString().search("(((.+)+)+)+$").toString().constructor(_0x52af73).search("(((.+)+)+)+$")})),_0x4a555c;function _0x313aa5(e,t,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=null);var o=_0x439851.call(this,e)||this;o._modelMatrx=p$1d.IDENTITY,o._context=i._context,o.layerMask=268435455,o._accumulatedCount=0,o._targetIndex=0,o._currentRenderId=-1,o._started=!1,o._stopped=!1,o._timeDelta=0,o._actualFrame=0,o._rawTextureWidth=256,o.forceDepthWrite=!1,o._preWarmDone=!1,o.isLocal=!1,e$2e(i)&&i.particleSystems.push(o),o._onBeforeDrawParticlesObservable=null,o._customEffect={0:r},o._capacity=u$Z(t.capacity,5e4),o._activeCount=o._capacity,o._currentActiveCount=0,o._isAnimationSheetEnabled=n,o.particleEmitterType=new _0x4c62f8;for(var a=u$Z(t.randomTextureSize,512),s=[],l=0;l<a;++l)s.push(Math.random()),s.push(Math.random()),s.push(Math.random()),s.push(Math.random());o._randomTexture=new t$U({context:context,source:{width:a,height:1,arrayBufferView:new Float32Array(s)},flipY:!1,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),s=[];for(l=0;l<a;++l)s.push(Math.random()),s.push(Math.random()),s.push(Math.random()),s.push(Math.random());return o._randomTexture2=new t$U({context:context,source:{width:a,height:1,arrayBufferView:new Float32Array(s)},flipY:!1,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),o._randomTextureSize=a,o}function _0x3e5356(e,t,i){var n=e.attributeLocations,r=e.attributes,o=e.attIndex,a=e.offset,s=S$14.FLOAT,l=S$14.getSizeInBytes(s),u=e.attributesStrideSize*l;n[t]=o++,r.push({index:n[t],vertexBuffer:e.buffer,componentsPerAttribute:i,componentDatatype:s,normalize:!1,offsetInBytes:l*a,strideInBytes:u,instanceDivisor:e.instanceDivisor}),e.offset+=i,e.attributeLocations=n,e.attIndex=o,e.attributes=r}_0x52af73(),_0x313aa5.prototype=Object.create(_0x439851.prototype),_0x313aa5.prototype.constructor=_0x439851,Object.defineProperties(_0x313aa5.prototype,{IsSupported:{get:function(){return this._context.webgl2}},activeParticleCount:{get:function(){return this._activeCount},set:function(e){this._activeCount=Math.min(e,this._capacity)}},modelMatrix:{get:function(){return this._modelMatrx},set:function(e){this._modelMatrx!==e&&(this._modelMatrx=e)}}}),_0x313aa5.prototype.getCapacity=function(){return this._capacity},_0x313aa5.prototype.isStarted=function(){return this._started},_0x313aa5.prototype.isStopped=function(){return this._stopped},_0x313aa5.prototype.isStopping=function(){return!1},_0x313aa5.prototype.getActiveCount=function(){return this._currentActiveCount},_0x313aa5.prototype._hasTargetStopDurationDependantGradient=function(){return this._startSizeGradients&&this._startSizeGradients.length>0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0},_0x313aa5.prototype.start=function(e){var t=this;if(void 0===e&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set";e?setTimeout((function(){t.start(0)}),e):(this._started=!0,this._stopped=!1,this._preWarmDone=!1,this.beginAnimationOnStart&&this.animations&&this.animations.length>0&&this._scene&&this._scene.beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop))},_0x313aa5.prototype.stop=function(){this._stopped||(this._stopped=!0)},_0x313aa5.prototype.reset=function(){this._releaseBuffers(),this._releaseVAOs(),this._currentActiveCount=0,this._targetIndex=0},_0x313aa5.prototype.getClassName=function(){return"GPUParticleSystem"},_0x313aa5.prototype.getCustomEffect=function(e){var t;return void 0===e&&(e=0),null!==(t=this._customEffect[e])&&void 0!==t?t:this._customEffect[0]},_0x313aa5.prototype.setCustomEffect=function(e,t){void 0===t&&(t=0),this._customEffect[t]=e},_0x313aa5.prototype._removeGradientAndTexture=function(e,t,i){return _super.prototype._removeGradientAndTexture.call(this,e,t,i),this._releaseBuffers(),this},_0x313aa5.prototype.addColorGradient=function(e,t,i){this._colorGradients||(this._colorGradients=[]);var n=new _0x180241(e,t);return this._colorGradients.push(n),this._refreshColorGradient(!0),this._releaseBuffers(),this},_0x313aa5.prototype._refreshColorGradient=function(e){void 0===e&&(e=!1),this._colorGradients&&(e&&this._colorGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null))},_0x313aa5.prototype.forceRefreshGradients=function(){this._refreshColorGradient(),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture"),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture"),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture"),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture"),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture"),this.reset()},_0x313aa5.prototype.removeColorGradient=function(e){return this._removeGradientAndTexture(e,this._colorGradients,this._colorGradientsTexture),this._colorGradientsTexture=null,this},_0x313aa5.prototype._addFactorGradient=function(e,t,i){var n=new _0x341870(t,i);e.push(n),this._releaseBuffers()},_0x313aa5.prototype.addSizeGradient=function(e,t){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture",!0),this._releaseBuffers(),this},_0x313aa5.prototype.removeSizeGradient=function(e){return this._removeGradientAndTexture(e,this._sizeGradients,this._sizeGradientsTexture),this._sizeGradientsTexture=null,this},_0x313aa5.prototype._refreshFactorGradient=function(e,t,i){if(void 0===i&&(i=!1),e){i&&e.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}));var n=this;n[t]&&(n[t].dispose(),n[t]=null)}},_0x313aa5.prototype.addAngularSpeedGradient=function(e,t){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture",!0),this._releaseBuffers(),this},_0x313aa5.prototype.removeAngularSpeedGradient=function(e){return this._removeGradientAndTexture(e,this._angularSpeedGradients,this._angularSpeedGradientsTexture),this._angularSpeedGradientsTexture=null,this},_0x313aa5.prototype.addVelocityGradient=function(e,t){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture",!0),this._releaseBuffers(),this},_0x313aa5.prototype.removeVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._velocityGradients,this._velocityGradientsTexture),this._velocityGradientsTexture=null,this},_0x313aa5.prototype.addLimitVelocityGradient=function(e,t){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture",!0),this._releaseBuffers(),this},_0x313aa5.prototype.removeLimitVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._limitVelocityGradients,this._limitVelocityGradientsTexture),this._limitVelocityGradientsTexture=null,this},_0x313aa5.prototype.addDragGradient=function(e,t){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture",!0),this._releaseBuffers(),this},_0x313aa5.prototype.removeDragGradient=function(e){return this._removeGradientAndTexture(e,this._dragGradients,this._dragGradientsTexture),this._dragGradientsTexture=null,this},_0x313aa5.prototype.addEmitRateGradient=function(e,t,i){return this},_0x313aa5.prototype.removeEmitRateGradient=function(e){return this},_0x313aa5.prototype.addStartSizeGradient=function(e,t,i){return this},_0x313aa5.prototype.removeStartSizeGradient=function(e){return this},_0x313aa5.prototype.addColorRemapGradient=function(e,t,i){return this},_0x313aa5.prototype.removeColorRemapGradient=function(){return this},_0x313aa5.prototype.addAlphaRemapGradient=function(e,t,i){return this},_0x313aa5.prototype.removeAlphaRemapGradient=function(){return this},_0x313aa5.prototype.addRampGradient=function(e,t){return this},_0x313aa5.prototype.removeRampGradient=function(){return this},_0x313aa5.prototype.getRampGradients=function(){return null},_0x313aa5.prototype.addLifeTimeGradient=function(e,t,i){return this},_0x313aa5.prototype.removeLifeTimeGradient=function(e){return this},_0x313aa5.prototype._reset=function(){this._releaseBuffers()},_0x313aa5.prototype._createUpdateVAO=function(e){var t={attributeLocations:{},attributes:[],attIndex:0,offset:0,attributesStrideSize:this._attributesStrideSize,buffer:e};return _0x3e5356(t,"position",3),this.particleEmitterType instanceof _0x42bbfb&&_0x3e5356(t,"initialPosition",3),_0x3e5356(t,"age",1),_0x3e5356(t,"life",1),_0x3e5356(t,"seed",4),_0x3e5356(t,"size",3),this._colorGradientsTexture||_0x3e5356(t,"color",4),_0x3e5356(t,"direction",3),this._isBillboardBased||_0x3e5356(t,"initialDirection",3),this._angularSpeedGradientsTexture?_0x3e5356(t,"angle",1):_0x3e5356(t,"angle",2),this._isAnimationSheetEnabled&&(_0x3e5356(t,"cellIndex",1),this.spriteRandomStartCell&&_0x3e5356(t,"cellStartOffset",1)),this.noiseTexture&&(_0x3e5356(t,"noiseCoordinates1",3),_0x3e5356(t,"noiseCoordinates2",3)),this._updateAttributeLocations=t.attributeLocations,this._updateAttributes=t.attributes,new c$13({context:this._context,attributes:this._updateAttributes})},_0x313aa5.prototype._createRenderVAO=function(e,t){var i={attributeLocations:[],attributes:[],attIndex:0,offset:0,attributesStrideSize:4,buffer:t};_0x3e5356(i,"offset",2),_0x3e5356(i,"uv",2);var n={attributeLocations:i.attributeLocations,attributes:i.attributes,attIndex:i.attIndex,offset:0,attributesStrideSize:this._attributesStrideSize,buffer:e,instanceDivisor:1};return _0x3e5356(n,"position",3),this.particleEmitterType instanceof _0x42bbfb&&(n.offset+=3),_0x3e5356(n,"age",1),_0x3e5356(n,"life",1),n.offset+=4,_0x3e5356(n,"size",3),this._colorGradientsTexture||_0x3e5356(n,"color",4),this.billboardMode===_0xbf6524.BILLBOARDMODE_STRETCHED?_0x3e5356(n,"direction",3):n.offset+=3,this._isBillboardBased||_0x3e5356(n,"initialDirection",3),this._angularSpeedGradientsTexture?_0x3e5356(n,"angle",1):_0x3e5356(n,"angle",2),this._isAnimationSheetEnabled&&(_0x3e5356(n,"cellIndex",1),this.spriteRandomStartCell&&_0x3e5356(n,"cellStartOffset",1)),this.noiseTexture&&(_0x3e5356(n,"noiseCoordinates1",3),_0x3e5356(n,"noiseCoordinates2",3)),this._renderAttributeLocations=n.attributeLocations,this._renderAttributes=n.attributes,new c$13({context:this._context,attributes:this._renderAttributes})};var _0x41384c=new o$1p;_0x313aa5.prototype._initialize=function(e){if(!e$2e(this._buffer0)||e){var t=new Array;this._attributesStrideSize=21,this._targetIndex=0,this.particleEmitterType instanceof _0x42bbfb&&(this._attributesStrideSize+=3),this.isBillboardBased||(this._attributesStrideSize+=3),this._colorGradientsTexture&&(this._attributesStrideSize-=4),this._angularSpeedGradientsTexture&&(this._attributesStrideSize-=1),this._isAnimationSheetEnabled&&(this._attributesStrideSize+=1,this.spriteRandomStartCell&&(this._attributesStrideSize+=1)),this.noiseTexture&&(this._attributesStrideSize+=6);for(var i=this.particleEmitterType instanceof _0x42bbfb,n=0;n<this._capacity;n++)t.push(0),t.push(0),t.push(0),i&&(this.particleEmitterType.particlePositionGenerator(n,null,_0x41384c),t.push(_0x41384c.x),t.push(_0x41384c.y),t.push(_0x41384c.z)),t.push(0),t.push(0),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(0),t.push(0),t.push(0),this._colorGradientsTexture||(t.push(0),t.push(0),t.push(0),t.push(0)),i?(this.particleEmitterType.particleDestinationGenerator(n,null,_0x41384c),t.push(_0x41384c.x),t.push(_0x41384c.y),t.push(_0x41384c.z)):(t.push(0),t.push(0),t.push(0)),this.isBillboardBased||(t.push(0),t.push(0),t.push(0)),t.push(0),this._angularSpeedGradientsTexture||t.push(0),this._isAnimationSheetEnabled&&(t.push(0),this.spriteRandomStartCell&&t.push(0)),this.noiseTexture&&(t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()),t.push(Math.random()));var r=new Float32Array(t),o=new Float32Array([.5,.5,1,1,-.5,.5,0,1,-.5,-.5,0,0,.5,-.5,1,0]);this._buffer0=t$X.createVertexBuffer({context:this._context,typedArray:r,usage:A$18.STATIC_DRAW}),this._buffer1=t$X.createVertexBuffer({context:this._context,typedArray:r,usage:A$18.STATIC_DRAW}),this._spriteBuffer=t$X.createVertexBuffer({context:this._context,typedArray:o,usage:A$18.STATIC_DRAW}),this._updateVAO=[],this._updateVAO.push(this._createUpdateVAO(this._buffer0)),this._updateVAO.push(this._createUpdateVAO(this._buffer1)),this._renderVAO=[],this._renderVAO.push(this._createRenderVAO(this._buffer1,this._spriteBuffer)),this._renderVAO.push(this._createRenderVAO(this._buffer0,this._spriteBuffer)),this._sourceBuffer=this._buffer0,this._targetBuffer=this._buffer1}},_0x313aa5.prototype._recreateUpdateEffect=function(){var e=[];if(this.particleEmitterType&&this.particleEmitterType.getEffectDefines(e),this._isBillboardBased&&e.push("BILLBOARD"),this._colorGradientsTexture&&e.push("COLORGRADIENTS"),this._sizeGradientsTexture&&e.push("SIZEGRADIENTS"),this._angularSpeedGradientsTexture&&e.push("ANGULARSPEEDGRADIENTS"),this._velocityGradientsTexture&&e.push("VELOCITYGRADIENTS"),this._limitVelocityGradientsTexture&&e.push("LIMITVELOCITYGRADIENTS"),this._dragGradientsTexture&&e.push("DRAGGRADIENTS"),this.isAnimationSheetEnabled&&(e.push("ANIMATESHEET"),this.spriteRandomStartCell&&e.push("ANIMATESHEETRANDOMSTART")),this.noiseTexture&&e.push("NOISE"),this.isLocal&&e.push("LOCAL"),this._transformFeedbackVaryings=["outPosition"],this.particleEmitterType instanceof _0x42bbfb&&this._transformFeedbackVaryings.push("outInitialPosition"),this._transformFeedbackVaryings.push("outAge"),this._transformFeedbackVaryings.push("outLife"),this._transformFeedbackVaryings.push("outSeed"),this._transformFeedbackVaryings.push("outSize"),this._colorGradientsTexture||this._transformFeedbackVaryings.push("outColor"),this._transformFeedbackVaryings.push("outDirection"),this._isBillboardBased||this._transformFeedbackVaryings.push("outInitialDirection"),this._transformFeedbackVaryings.push("outAngle"),this.isAnimationSheetEnabled&&(this._transformFeedbackVaryings.push("outCellIndex"),this.spriteRandomStartCell&&this._transformFeedbackVaryings.push("outCellStartOffset")),this.noiseTexture&&(this._transformFeedbackVaryings.push("outNoiseCoordinates1"),this._transformFeedbackVaryings.push("outNoiseCoordinates2")),!e$2e(this._updateSp)){this._updateDefines=e;var t,i,n=this._updateCommand;e$2e(n.shaderProgram)?(t=n.shaderProgram.vertexShaderSource.clone(),i=n.shaderProgram.fragmentShaderSource.clone()):(t=new s$V({name:"BabylonGpuUpdateParticlesVS",sources:[_0x5d14f5]}),i=new s$V({name:"BabylonGpuUpdateParticlesFS",sources:[_0x590a36]})),t.defines=e,i.defines=e,this._updateSp=this._updateSp&&this._updateSp.destroy(),this._updateSp=r$14.fromCache({context:this._context,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:this._updateAttributeLocations,transformFeedback:!0,transformFeedbackVaryings:this._transformFeedbackVaryings})}this._updateCommand.shaderProgram=this._updateSp},_0x313aa5.prototype._getEffect=function(){var e;return null!==(e=this.getCustomEffect())&&void 0!==e?e:this._renderEffect},_0x313aa5.prototype.fillDefines=function(e,t){if(this.blendMode===_0x4d4f68.BLENDMODE_MULTIPLY&&e.push("BLENDMULTIPLYMODE"),this.isLocal&&e.push("LOCAL"),this._isBillboardBased)switch(e.push("BILLBOARD"),this.billboardMode){case _0xbf6524.BILLBOARDMODE_Y:e.push("BILLBOARDY");break;case _0xbf6524.BILLBOARDMODE_STRETCHED:e.push("BILLBOARDSTRETCHED");break;case _0xbf6524.BILLBOARDMODE_ALL:e.push("BILLBOARDMODE_ALL")}this._colorGradientsTexture&&e.push("COLORGRADIENTS"),this.isAnimationSheetEnabled&&e.push("ANIMATESHEET")},_0x313aa5.prototype._recreateRenderEffect=function(){var e=[];if(this.fillDefines(e),!e$2e(this._renderDefines)){this._renderDefines=e;var t,i,n=this._drawCommand;e$2e(n.shaderProgram)?(t=n.shaderProgram.vertexShaderSource.clone(),i=n.shaderProgram.fragmentShaderSource.clone()):(t=new s$V({name:"BabylonGpuRenderParticlesVS",sources:[_0x12e71e]}),i=new s$V({name:"BabylonGpuRenderParticlesFS",sources:[_0x25e40d]})),t.defines=e,i.defines=e,this._renderSp=this._renderSp&&this._renderSp.destroy(),this._renderSp=r$14.fromCache({context:this._context,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:this._renderAttributeLocations})}this._drawCommand.shaderProgram=this._renderSp},_0x313aa5.prototype.animate=function(){this._timeDelta=this.updateSpeed,this._actualFrame+=this._timeDelta,this._stopped||this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()},_0x313aa5.prototype._createFactorGradientTexture=function(e,t){var i=this[t];if(e&&e.length&&!i){for(var n=new Float32Array(3*this._rawTextureWidth),r=0;r<this._rawTextureWidth;r++){var o=r/this._rawTextureWidth;_0xdebb2b.GetCurrentGradient(o,e,(function(e,t,i){n[3*r]=_0x442216.Lerp(e.factor1,t.factor1,i),n[3*r+1]=n[3*r],n[3*r+2]=n[3*r]}))}this[t]=new t$U({context:this._context,source:{width:this._rawTextureWidth,height:1,arrayBufferView:n},flipY:!1,pixelFormat:V$12.RGB,pixelDatatype:_$_.FLOAT,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})}},_0x313aa5.prototype._createSizeGradientTexture=function(){this._createFactorGradientTexture(this._sizeGradients,"_sizeGradientsTexture")},_0x313aa5.prototype._createAngularSpeedGradientTexture=function(){this._createFactorGradientTexture(this._angularSpeedGradients,"_angularSpeedGradientsTexture")},_0x313aa5.prototype._createVelocityGradientTexture=function(){this._createFactorGradientTexture(this._velocityGradients,"_velocityGradientsTexture")},_0x313aa5.prototype._createLimitVelocityGradientTexture=function(){this._createFactorGradientTexture(this._limitVelocityGradients,"_limitVelocityGradientsTexture")},_0x313aa5.prototype._createDragGradientTexture=function(){this._createFactorGradientTexture(this._dragGradients,"_dragGradientsTexture")};var _0x1c0db6=new e$1X;_0x313aa5.prototype._createColorGradientTexture=function(){if(this._colorGradients&&this._colorGradients.length&&!this._colorGradientsTexture){for(var e=new Uint8Array(4*this._rawTextureWidth),t=_0x1c0db6,i=0;i<this._rawTextureWidth;i++){var n=i/this._rawTextureWidth;_0xdebb2b.GetCurrentGradient(n,this._colorGradients,(function(n,r,o){e$1X.lerp(n.color1,r.color1,o,t),e[4*i]=255*t.red,e[4*i+1]=255*t.green,e[4*i+2]=255*t.blue,e[4*i+3]=255*t.alpha}))}this._colorGradientsTexture=new t$U({context:this._context,source:{width:this._rawTextureWidth,height:1,arrayBufferView:e},flipY:!1,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})}},_0x313aa5.prototype.update=function(e){e$2e(this._drawCommand)||this._createDrawCommand(),this.render(e)},_0x313aa5.prototype.render=function(e){if(!this._started)return 0;this._createColorGradientTexture(),this._createSizeGradientTexture(),this._createAngularSpeedGradientTexture(),this._createVelocityGradientTexture(),this._createLimitVelocityGradientTexture(),this._createDragGradientTexture(),this.animate(!0),this._initialize(!1),this._recreateUpdateEffect(),this._recreateRenderEffect();var t=this.emitRate*this._timeDelta;if(this._accumulatedCount+=t,this._accumulatedCount>1){var i=0|this._accumulatedCount;this._accumulatedCount-=i,this._currentActiveCount=Math.min(this._activeCount,this._currentActiveCount+i)}if(!this._currentActiveCount)return 0;this._transformFeedback.targetBuffer=this._targetBuffer,_0x439851._setRenderState(this._drawCommand,this.blendMode),this._updateCommand.vertexArray=this._updateVAO[this._targetIndex],this._updateCommand.vertexArray._numberOfVertices=this._currentActiveCount,this._drawCommand.vertexArray=this._renderVAO[this._targetIndex],this._drawCommand.instanceCount=this._currentActiveCount,e.commandList.push(this._updateCommand),e.commandList.push(this._drawCommand),this._targetIndex++,2===this._targetIndex&&(this._targetIndex=0);var n=this._sourceBuffer;return this._sourceBuffer=this._targetBuffer,this._targetBuffer=n,this._currentActiveCount},_0x313aa5.prototype.rebuild=function(){this._initialize(!0)},_0x313aa5.prototype._releaseBuffers=function(){},_0x313aa5.prototype._releaseVAOs=function(){if(this._updateVAO){for(var e=0;e<this._updateVAO.length;e++){(t=this._updateVAO[e]).isDestroyed()&&t.destroy()}this._updateVAO=[];for(e=0;e<this._renderVAO.length;e++){var t;(t=this._renderVAO[e]).isDestroyed()&&t.destroy()}this._renderVAO=[]}},_0x313aa5.prototype.isDestroyed=function(){return!1},_0x313aa5.prototype.destroy=function(){var e;e$2e(this._drawCommand)&&((e=this._drawCommand).shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.vertexArray=void 0,e.renderState=void 0,e.uniformMap=void 0,this._drawCommand=void 0);e$2e(this._updateCommand)&&((e=this._updateCommand).shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.vertexArray=void 0,e.renderState=void 0,e.uniformMap=void 0,this._updateCommand=void 0);this._transformFeedback&&(!this._transformFeedback.isDestroyed()&&this._transformFeedback.destroy(),this._transformFeedback=void 0),this._releaseBuffers(),this._releaseVAOs(),this._colorGradientsTexture&&(!this._colorGradientsTexture.isDestroyed()&&this._colorGradientsTexture.destroy(),this._colorGradientsTexture=null),this._sizeGradientsTexture&&(!this._sizeGradientsTexture.isDestroyed()&&this._sizeGradientsTexture.destroy(),this._sizeGradientsTexture=null),this._angularSpeedGradientsTexture&&(!this._angularSpeedGradientsTexture.isDestroyed()&&this._angularSpeedGradientsTexture.destroy(),this._angularSpeedGradientsTexture=null),this._velocityGradientsTexture&&(!this._velocityGradientsTexture.isDestroyed()&&this._velocityGradientsTexture.destroy(),this._velocityGradientsTexture=null),this._limitVelocityGradientsTexture&&(!this._limitVelocityGradientsTexture.isDestroyed()&&this._limitVelocityGradientsTexture.destroy(),this._limitVelocityGradientsTexture=null),this._dragGradientsTexture&&(!this._dragGradientsTexture.isDestroyed()&&this._dragGradientsTexture.destroy(),this._dragGradientsTexture=null),this._randomTexture&&(!this._randomTexture.isDestroyed()&&this._randomTexture.destroy(),this._randomTexture=null),this._randomTexture2&&(!this._randomTexture2.isDestroyed()&&this._randomTexture2.destroy(),this._randomTexture2=null),this.particleTexture&&(!this.particleTexture.isDestroyed()&&this.particleTexture.destroy(),this.particleTexture=null),this.noiseTexture&&(!this.noiseTexture.isDestroyed()&&this.noiseTexture.destroy(),this.noiseTexture=null)},_0x313aa5.prototype.clone=function(e,t){var i=this.serialize(),n=_0x313aa5.Parse(i,null,"");return n.name=e,void 0===t&&(t=this.emitter),n.emitter=t,n.noiseTexture=this.noiseTexture,n},_0x313aa5.prototype.serialize=function(e){void 0===e&&(e=!1);var t={};return ParticleSystem._Serialize(t,this,e),t.activeParticleCount=this.activeParticleCount,t.randomTextureSize=this._randomTextureSize,t},_0x313aa5.Parse=function(e,t,i,n){void 0===n&&(n=!1);var r=new _0x313aa5(e.name,{capacity:e.capacity,randomTextureSize:e.randomTextureSize},t,!1,null);return e.activeParticleCount&&(r.activeParticleCount=e.activeParticleCount),_0x439851._Parse(e,r,t,i),e.preventAutoStart&&(r.preventAutoStart=e.preventAutoStart),!n&&!r.preventAutoStart&&r.start(),r},_0x313aa5.fromJsonUrl=function(e,t){return t$10.createIfNeeded(e).fetchJson().then((function(e){return _0x313aa5.Parse(e,null,"",!1,t)}))};var _0x2b1e4e=new o$1o,_0x52f2b1=new o$1o,_0x5c9389=new o$1o,_0x553c19=new o$1p,_0x54a8c1=new o$1p,_0x3edb96=new e$2c,_0x5b2f1a=new e$2c,_0x1c0db6=new e$1X;_0x313aa5.prototype._createUpdateUniformMap=function(){var e,t={},i=this;if(t.currentCount=function(){return i._currentActiveCount},t.timeDelta=function(){return i._timeDelta},t.stopFactor=function(){return i._stopped?0:1},t.randomSampler=function(){return e$2e(i._randomTexture)?i._randomTexture:i._context.defaultTexture},t.randomSampler2=function(){return e$2e(i._randomTexture2)?i._randomTexture2:i._context.defaultTexture},t.lifeTime=function(){return _0x2b1e4e.x=i.minLifeTime,_0x2b1e4e.y=i.maxLifeTime,_0x2b1e4e},t.emitPower=function(){return _0x52f2b1.x=i.minEmitPower,_0x52f2b1.y=i.maxEmitPower,_0x52f2b1},t.color1=function(){return i.color1},t.color2=function(){return i.color2},t.sizeRange=function(){return _0x5c9389.x=i.minSize,_0x5c9389.y=i.maxSize,_0x5c9389},t.scaleRange=function(){return _0x3edb96.x=i.minScaleX,_0x3edb96.y=i.maxScaleX,_0x3edb96.z=i.minScaleY,_0x3edb96.w=i.maxScaleY,_0x3edb96},t.angleRange=function(){return _0x5b2f1a.x=i.minAngularSpeed,_0x5b2f1a.y=i.maxAngularSpeed,_0x5b2f1a.z=i.minInitialRotation,_0x5b2f1a.w=i.maxInitialRotation,_0x5b2f1a},t.gravity=function(){return i.gravity},t.sizeGradientSampler=function(){return e$2e(i._sizeGradientsTexture)?i._sizeGradientsTexture:i._context.defaultTexture},t.angularSpeedGradientSampler=function(){return e$2e(i._angularSpeedGradientsTexture)?i._angularSpeedGradientsTexture:i._context.defaultTexture},t.velocityGradientSampler=function(){return e$2e(i._velocityGradientsTexture)?i._velocityGradientsTexture:i._context.defaultTexture},t.limitVelocityGradientSampler=function(){return e$2e(i._limitVelocityGradientsTexture)?i._limitVelocityGradientsTexture:i._context.defaultTexture},t.limitVelocityDamping=function(){return i.limitVelocityDamping},t.dragGradientSampler=function(){return e$2e(i._dragGradientsTexture)?i._dragGradientsTexture:i._context.defaultTexture},this.particleEmitterType&&this.particleEmitterType.applyToShader(t),t.cellInfos=function(){return _0x553c19.x=i.startSpriteCellID,_0x553c19.y=i.endSpriteCellID,_0x553c19.z=i.spriteCellChangeSpeed,_0x553c19},t.noiseSampler=function(){return e$2e(i.noiseTexture)?i.noiseTexture:i._context.defaultTexture},t.noiseStrength=function(){return i.noiseStrength},this.emitter.position){var n=this.emitter;e=n.getWorldMatrix()}else{var r=this.emitter;e=p$1d.fromTranslation(r)}t.emitterWM=function(){return e},this._updateUniformMap=t},_0x313aa5.prototype._createRenderUniformMap=function(){var e,t={},i=this;if(t.diffuseSampler=function(){return e$2e(i.particleTexture)?i.particleTexture:i._context.defaultTexture},t.translationPivot=function(){return i.translationPivot},t.worldOffset=function(){return i.worldOffset},this.emitter.position){var n=this.emitter;e=n.getWorldMatrix()}else{var r=this.emitter;e=p$1d.fromTranslation(r)}t.emitterWM=function(){return e},t.colorGradientSampler=function(){return e$2e(i._colorGradientsTexture)?i._colorGradientsTexture:i._context.defaultTexture},t.colorDead=function(){return i.colorDead},t.sheetInfos=function(){return _0x54a8c1.x=i.spriteCellWidth/baseSize.width,_0x54a8c1.y=i.spriteCellHeight/baseSize.height,_0x54a8c1.z=i.width/baseSize.spriteCellWidth,_0x54a8c1},this._renderUniformMap=t},_0x313aa5.prototype._createDrawCommand=function(){this._boundingVolume=new i$1d,this._createRenderUniformMap(),this._createUpdateUniformMap();var e=new i$$({primitiveType:W$18.TRIANGLE_FAN,modelMatrix:this._modelMatrx,boundingVolume:this._boundingVolume,pass:Le$q.OPAQUE,cull:!1});e.castShadows=!1,e.receiveShadows=!1,e.selectCastShadows=!1,e.uniformMap=this._renderUniformMap,this._drawCommand=e;var t=new i$$({primitiveType:W$18.POINTS,modelMatrix:this._modelMatrx,boundingVolume:this._boundingVolume,pass:Le$q.OPAQUE,cull:!1});t.castShadows=!1,t.receiveShadows=!1,t.selectCastShadows=!1,t.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},depthMask:!1,blending:!1}),t.uniformMap=this._updateUniformMap,this._updateCommand=t,this._transformFeedback=new s$i({context:this._context,primitiveType:W$18.POINTS}),this._updateCommand.transformFeedback=this._transformFeedback};var _0xa05944=(_0x49f2b4=!0,function(e,t){var i=_0x49f2b4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49f2b4=!1,i}),_0x20ae4c=_0xa05944(void 0,(function(){return _0x20ae4c.toString().search("(((.+)+)+)+$").toString().constructor(_0x20ae4c).search("(((.+)+)+)+$")})),_0x49f2b4;function _0xf9b57a(e){this.particleSystem=e,this.position=new o$1p(0,0,0),this.direction=new o$1p(0,0,0),this.color=new e$1X(0,0,0,0),this.colorStep=new e$1X(0,0,0,0),this.lifeTime=1,this.age=0,this.size=0,this.scale=new o$1o(1,1),this.angle=0,this.angularSpeed=0,this.cellIndex=0,this._attachedSubEmitters=null,this._currentColor1=new e$1X(0,0,0,0),this._currentColor2=new e$1X(0,0,0,0),this._currentSize1=0,this._currentSize2=0,this._currentAngularSpeed1=0,this._currentAngularSpeed2=0,this._currentVelocity1=0,this._currentVelocity2=0,this._currentLimitVelocity1=0,this._currentLimitVelocity2=0,this._currentDrag1=0,this._currentDrag2=0,this.id=_0xf9b57a._Count++,this.particleSystem.isAnimationSheetEnabled&&this.updateCellInfoFromSystem()}_0x20ae4c(),_0xf9b57a.prototype.updateCellInfoFromSystem=function(){this.cellIndex=this.particleSystem.startSpriteCellID},_0xf9b57a.prototype.updateCellIndex=function(){var e=this.age,t=this.particleSystem.spriteCellChangeSpeed;this.particleSystem.spriteRandomStartCell&&(void 0===this._randomCellOffset&&(this._randomCellOffset=Math.random()*this.lifeTime),0===t?(t=1,e=this._randomCellOffset):e+=this._randomCellOffset);var i=this._initialEndSpriteCellID-this._initialStartSpriteCellID,n=_0x442216.Clamp(e*t%this.lifeTime/this.lifeTime);this.cellIndex=this._initialStartSpriteCellID+n*i|0};var _0x4ae677=new o$1p;_0xf9b57a.prototype._inheritParticleInfoToSubEmitter=function(e){if(e.particleSystem.emitter.position){var t=e.particleSystem.emitter;if(o$1p.clone(this.position,t.position),e.inheritDirection){var i=_0x4ae677;o$1p.normalize(this.direction,i),t.setDirection(i,0,Math.PI/2)}}else{var n=e.particleSystem.emitter;o$1p.clone(this.position,n)}o$1p.multiplyByScalar(this.direction,e.inheritedVelocityAmount/2,_0x4ae677),o$1p.clone(_0x4ae677,e.particleSystem._inheritedVelocityOffset)},_0xf9b57a.prototype._inheritParticleInfoToSubEmitters=function(){var e=this;this._attachedSubEmitters&&this._attachedSubEmitters.length>0&&this._attachedSubEmitters.forEach((function(t){e._inheritParticleInfoToSubEmitter(t)}))},_0xf9b57a.prototype._reset=function(){this.age=0,this.id=_0xf9b57a._Count++,this._currentColorGradient=null,this._currentSizeGradient=null,this._currentAngularSpeedGradient=null,this._currentVelocityGradient=null,this._currentLimitVelocityGradient=null,this._currentDragGradient=null,this.cellIndex=this.particleSystem.startSpriteCellID,this._randomCellOffset=void 0},_0xf9b57a.prototype.copyTo=function(e){e.position=o$1p.clone(this.position,e.position),this._initialDirection?e._initialDirection=o$1p.clone(this._initialDirection,e._initialDirection):e._initialDirection=null,e.direction=o$1p.clone(this.direction,e.direction),this._localPosition&&(e._localPosition=o$1p.clone(this._localPosition,e._localPosition)),e.color=e$1X.clone(this.color,e.color),e.colorStep=e$1X.clone(this.colorStep,e.colorStep),e.lifeTime=this.lifeTime,e.age=this.age,e._randomCellOffset=this._randomCellOffset,e.size=this.size,e.scale=o$1o.clone(this.scale,e.scale),e.angle=this.angle,e.angularSpeed=this.angularSpeed,e.particleSystem=this.particleSystem,e.cellIndex=this.cellIndex,e.id=this.id,e._attachedSubEmitters=this._attachedSubEmitters,this._currentColorGradient&&(e._currentColorGradient=this._currentColorGradient,e._currentColor1=e$1X.clone(this._currentColor1,e._currentColor1),e._currentColor2=e$1X.clone(this._currentColor2,e._currentColor2)),this._currentSizeGradient&&(e._currentSizeGradient=this._currentSizeGradient,e._currentSize1=this._currentSize1,e._currentSize2=this._currentSize2),this._currentAngularSpeedGradient&&(e._currentAngularSpeedGradient=this._currentAngularSpeedGradient,e._currentAngularSpeed1=this._currentAngularSpeed1,e._currentAngularSpeed2=this._currentAngularSpeed2),this._currentVelocityGradient&&(e._currentVelocityGradient=this._currentVelocityGradient,e._currentVelocity1=this._currentVelocity1,e._currentVelocity2=this._currentVelocity2),this._currentLimitVelocityGradient&&(e._currentLimitVelocityGradient=this._currentLimitVelocityGradient,e._currentLimitVelocity1=this._currentLimitVelocity1,e._currentLimitVelocity2=this._currentLimitVelocity2),this._currentDragGradient&&(e._currentDragGradient=this._currentDragGradient,e._currentDrag1=this._currentDrag1,e._currentDrag2=this._currentDrag2),this.particleSystem.isAnimationSheetEnabled&&(e._initialStartSpriteCellID=this._initialStartSpriteCellID,e._initialEndSpriteCellID=this._initialEndSpriteCellID),this.particleSystem.useRampGradients&&(e.remapData&&this.remapData?e$2c.clone(this.remapData,e.remapData):e.remapData=new e$2c(0,0,0,0)),this._randomNoiseCoordinates1&&(e._randomNoiseCoordinates1=o$1p.clone(this._randomNoiseCoordinates1,e._randomNoiseCoordinates1),e._randomNoiseCoordinates2=o$1p.clone(this._randomNoiseCoordinates2,e._randomNoiseCoordinates2))},_0xf9b57a._Count=0;var _0x375d2f="attribute vec3 position;\nattribute vec4 color;\nattribute float angle;\nattribute vec2 size;\n#ifdef ANIMATESHEET\nattribute float cellIndex;\n#endif\n#ifndef BILLBOARD\nattribute vec3 direction;\n#endif\n#ifdef BILLBOARDSTRETCHED\nattribute vec3 direction;\n#endif\n#ifdef RAMPGRADIENT\nattribute vec4 remapData;\n#endif\nattribute vec2 offset;\nuniform vec2 translationPivot;\n#ifdef ANIMATESHEET\nuniform vec3 particlesInfos;\n#endif\nvarying vec2 vUV;\nvarying vec4 vColor;\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\n#endif\nvec3 rotate(vec3 yaxis, vec3 rotatedCorner) {\nvec3 xaxis = normalize(cross(vec3(0., 1.0, 0.), yaxis));\nvec3 zaxis = normalize(cross(yaxis, xaxis));\nvec3 row0 = vec3(xaxis.x, xaxis.y, xaxis.z);\nvec3 row1 = vec3(yaxis.x, yaxis.y, yaxis.z);\nvec3 row2 = vec3(zaxis.x, zaxis.y, zaxis.z);\nmat3 rotMatrix = mat3(row0, row1, row2);\nvec3 alignedCorner = rotMatrix * rotatedCorner;\nreturn position + alignedCorner;\n}\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera, vec3 rotatedCorner) {\nvec3 normalizedToCamera = normalize(toCamera);\nvec3 normalizedCrossDirToCamera = normalize(cross(normalize(direction), normalizedToCamera));\nvec3 crossProduct = normalize(cross(normalizedToCamera, normalizedCrossDirToCamera));\nvec3 row0 = vec3(normalizedCrossDirToCamera.x, normalizedCrossDirToCamera.y, normalizedCrossDirToCamera.z);\nvec3 row1 = vec3(crossProduct.x, crossProduct.y, crossProduct.z);\nvec3 row2 = vec3(normalizedToCamera.x, normalizedToCamera.y, normalizedToCamera.z);\nmat3 rotMatrix = mat3(row0, row1, row2);\nvec3 alignedCorner = rotMatrix * rotatedCorner;\nreturn position + alignedCorner;\n}\n#endif\nvoid main() {\nvec2 cornerPos = (vec2(offset.x - 0.5, offset.y - 0.5) - translationPivot) * size + translationPivot;\n#ifdef BILLBOARD\nvec3 rotatedCorner;\n#ifdef BILLBOARDY\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.z = 0.;\nvec3 oriViewPos = (czm_modelView * vec4(position, 1.0)).xyz;\nvec3 yaxis = oriViewPos;\nyaxis.y = 0.;\nvec3 vPositionCorner = rotate(normalize(yaxis), rotatedCorner);\nvec3 viewPos = (czm_modelView * vec4(vPositionCorner, 1.0)).xyz;\n#elif defined(BILLBOARDSTRETCHED)\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.z = 0.;\nvec3 oriViewPos = (czm_modelView * vec4(position, 1.0)).xyz;\nvec3 toCamera = oriViewPos;\nvec3 vPositionCorner = rotateAlign(toCamera, rotatedCorner);\nvec3 viewPos = (czm_modelView * vec4(vPositionCorner, 1.0)).xyz;\n#else\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.y = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.z = 0.;\nvec3 viewPos = (czm_modelView * vec4(position, 1.0)).xyz + rotatedCorner;\n#endif // BILLBOARDY\n#ifdef RAMPGRADIENT\nremapRanges = remapData;\n#endif\ngl_Position = czm_projection * vec4(viewPos, 1.0);\n#else\nvec3 rotatedCorner;\nrotatedCorner.x = cornerPos.x * cos(angle) - cornerPos.y * sin(angle);\nrotatedCorner.z = cornerPos.x * sin(angle) + cornerPos.y * cos(angle);\nrotatedCorner.y = 0.;\nvec3 yaxis = normalize(direction);\nvec3 vPositionW = rotate(yaxis, rotatedCorner);\ngl_Position = czm_modelViewProjection * vec4(vPositionW, 1.0);\n#endif // BILLBOARD\nvColor = color;\n#ifdef ANIMATESHEET\nfloat rowOffset = floor(cellIndex * particlesInfos.z);\nfloat columnOffset = cellIndex - rowOffset / particlesInfos.z;\nvec2 uvScale = particlesInfos.xy;\nvec2 uvOffset = vec2(offset.x , 1.0 - offset.y);\nvUV = (uvOffset + vec2(columnOffset, rowOffset)) * uvScale;\n#else\nvUV = offset;\n#endif\n}\n",_0x4eccd8="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nvarying vec2 vUV;\nvarying vec4 vColor;\nuniform vec4 textureMask;\nuniform sampler2D diffuseSampler;\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\nuniform sampler2D rampSampler;\n#endif\nvoid main() {\nvec4 textureColor = texture2D(diffuseSampler, vUV);\nvec4 baseColor = textureColor * vColor;\n#ifdef RAMPGRADIENT\nfloat alpha = baseColor.a;\nfloat remappedColorIndex = clamp((alpha - remapRanges.x) / remapRanges.y, 0.0, 1.0);\nvec4 rampColor = texture2D(rampSampler, vec2(1.0 - remappedColorIndex, 0.));\nbaseColor.rgb *= rampColor.rgb;\nfloat finalAlpha = baseColor.a;\nbaseColor.a = clamp((alpha * rampColor.a - remapRanges.z) / remapRanges.w, 0.0, 1.0);\n#endif\n#ifdef BLENDMULTIPLYMODE\nfloat sourceAlpha = vColor.a * textureColor.a;\nbaseColor.rgb = baseColor.rgb * sourceAlpha + vec3(1.0) * (1.0 - sourceAlpha);\n#endif\nbaseColor = czm_gammaCorrect(baseColor);\ngl_FragColor = baseColor;\n}\n",_0x5a1183=(_0x212391=!0,function(e,t){var i=_0x212391?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x212391=!1,i}),_0x2f63cb=_0x5a1183(void 0,(function(){return _0x2f63cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f63cb).search("(((.+)+)+)+$")})),_0x212391;function _0x4b03f3(e){void 0===e&&(e=null),this._indices=null,this._positions=null,this._normals=null,this._storedNormal=new o$1p(0,0,0),this._mesh=null,this.direction1=new o$1p(0,1,0),this.direction2=new o$1p(0,1,0),this.useMeshNormalsForDirection=!0,this.mesh=e}_0x2f63cb(),Object.defineProperty(_0x4b03f3.prototype,"mesh",{get:function(){return this._mesh},set:function(e){this._mesh!==e&&(this._mesh=e,e?(this._indices=e.getIndices(),this._positions=e.getVerticesData(),this._normals=e.getVerticesData()):(this._indices=null,this._positions=null,this._normals=null))},enumerable:!1,configurable:!0});var _0x3d2a98=new o$1p;_0x4b03f3.prototype.startDirectionFunction=function(e,t,i,n){if(this.useMeshNormalsForDirection&&this._normals)p$1d.multiplyByDirection(e,this._storedNormal,t);else{var r=_0x442216.RandomRange(this.direction1.x,this.direction2.x),o=_0x442216.RandomRange(this.direction1.y,this.direction2.y),a=_0x442216.RandomRange(this.direction1.z,this.direction2.z);if(n)return t.x=r,t.y=o,void(t.z=a);_0x3d2a98.x=r,_0x3d2a98.y=o,_0x3d2a98.z=a,p$1d.multiplyByDirection(e,_0x3d2a98,t)}};var _0x51ee95=new o$1p,_0x3ddb4a=new o$1p,_0x41b499=new o$1p,_0x9b9339=new o$1p;_0x4b03f3.prototype.startPositionFunction=function(e,t,i,n){if(this._indices&&this._positions){var r=3*Math.random()*(this._indices.length/3)|0,o=Math.random(),a=Math.random()*(1-o),s=1-o-a,l=this._indices[r],u=this._indices[r+1],c=this._indices[r+2];o$1p.unpack(this._positions,3*l,_0x51ee95),o$1p.unpack(this._positions,3*u,_0x3ddb4a),o$1p.unpack(this._positions,3*c,_0x41b499),_0x9b9339.x=o*_0x51ee95.x+a*_0x3ddb4a.x+s*_0x41b499.x,_0x9b9339.y=o*_0x51ee95.y+a*_0x3ddb4a.y+s*_0x41b499.y,_0x9b9339.z=o*_0x51ee95.z+a*_0x3ddb4a.z+s*_0x41b499.z,n?o$1p.clone(_0x9b9339,t):p$1d.multiplyByPoint(e,_0x9b9339,t),this.useMeshNormalsForDirection&&this._normals&&(o$1p.unpack(this._normals,3*l,_0x51ee95),o$1p.unpack(this._normals,3*u,_0x3ddb4a),o$1p.unpack(this._normals,3*c,_0x41b499),this._storedNormal.x=o*_0x51ee95.x+a*_0x3ddb4a.x+s*_0x41b499.x,this._storedNormal.y=o*_0x51ee95.y+a*_0x3ddb4a.y+s*_0x41b499.y,this._storedNormal.z=o*_0x51ee95.z+a*_0x3ddb4a.z+s*_0x41b499.z)}},_0x4b03f3.prototype.clone=function(){var e=new _0x4b03f3(this.mesh);return _Misc_deepCopier__WEBPACK_IMPORTED_MODULE_0__.DeepCopier.DeepCopy(this,e),e},_0x4b03f3.prototype.applyToShader=function(e){var t=this;e.direction1=function(){return t.direction1},e.direction2=function(){return t.direction2}},_0x4b03f3.prototype.getEffectDefines=function(){},_0x4b03f3.prototype.getClassName=function(){return"MeshParticleEmitter"},_0x4b03f3.prototype.serialize=function(){var e,t={};return t.type=this.getClassName(),t.direction1=this.direction1.asArray(),t.direction2=this.direction2.asArray(),t.meshId=null===(e=this.mesh)||void 0===e?void 0:e.id,t.useMeshNormalsForDirection=this.useMeshNormalsForDirection,t},_0x4b03f3.prototype.parse=function(e){o$1p.unpack(e.direction1,0,this.direction1),o$1p.unpack(e.direction2,0,this.direction2),e.meshId,this.useMeshNormalsForDirection=e.useMeshNormalsForDirection};var _0x2f8e96=(_0x5c4e43=!0,function(e,t){var i=_0x5c4e43?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c4e43=!1,i}),_0x41d54d=_0x2f8e96(void 0,(function(){return _0x41d54d.toString().search("(((.+)+)+)+$").toString().constructor(_0x41d54d).search("(((.+)+)+)+$")})),_0x5c4e43;_0x41d54d();var _0x4c9258={ATTACHED:0,END:1},_0x5142be=Object.freeze(_0x4c9258),_0x24352f=(_0x2d9815=!0,function(e,t){var i=_0x2d9815?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d9815=!1,i}),_0x23a49f=_0x24352f(void 0,(function(){return _0x23a49f.toString().search("(((.+)+)+)+$").toString().constructor(_0x23a49f).search("(((.+)+)+)+$")})),_0x2d9815;function _0x5e1712(e){this.particleSystem=e,this.type=_0x5142be.END,this.inheritDirection=!1,this.inheritedVelocityAmount=0,(!e.emitter||!e.emitter.dispose)&&(e.emitter=new _0x1d0ffc("SubemitterSystemEmitter",e.getScene()))}_0x23a49f(),_0x5e1712.prototype.clone=function(){var e=this.particleSystem.emitter;e?e instanceof o$1p?e=e.clone():e instanceof _0x1d0ffc&&((e=new _0x1d0ffc).isVisible=!1):e=new o$1p;var t=new _0x5e1712(this.particleSystem.clone("",e));return t.particleSystem.name+="Clone",t.type=this.type,t.inheritDirection=this.inheritDirection,t.inheritedVelocityAmount=this.inheritedVelocityAmount,t.particleSystem._disposeEmitterOnDispose=!0,t.particleSystem.disposeOnStop=!0,t},_0x5e1712.prototype.serialize=function(){var e={};return e.type=this.type,e.inheritDirection=this.inheritDirection,e.inheritedVelocityAmount=this.inheritedVelocityAmount,e.particleSystem=this.particleSystem.serialize(),e},_0x5e1712._ParseParticleSystem=function(e,t,i){return _0xee24b0.Parse(e,t,i,!0)},_0x5e1712.Parse=function(e,t,i){var n=e.particleSystem,r=new _0x5e1712(_0x5e1712._ParseParticleSystem(n,t,i));return r.type=e.type,r.inheritDirection=e.inheritDirection,r.inheritedVelocityAmount=e.inheritedVelocityAmount,r.particleSystem._isSubEmitter=!0,r},_0x5e1712.prototype.destroy=function(){this.particleSystem.destroy()};var _0x3675f3=(_0x1fa705=!0,function(e,t){var i=_0x1fa705?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fa705=!1,i}),_0x40fc79=_0x3675f3(void 0,(function(){return _0x40fc79.toString().search("(((.+)+)+)+$").toString().constructor(_0x40fc79).search("(((.+)+)+)+$")})),_0x1fa705;function _0xee24b0(e,t,i,n,r,o){void 0===n&&(n=null),void 0===r&&(r=!1),void 0===o&&(o=.01);var a=_0x439851.call(this,e)||this;return a._scene=i,a._context=i._context,a._modelMatrx=p$1d.IDENTITY,a._inheritedVelocityOffset=new o$1p,a._particles=new Array,a._stockParticles=new Array,a._newPartsExcess=0,a._scaledColorStep=new e$1X(0,0,0,0),a._colorDiff=new e$1X(0,0,0,0),a._scaledDirection=new o$1p(0,0,0),a._scaledGravity=new o$1p(0,0,0),a._currentRenderId=-1,a._useInstancing=!1,a._started=!1,a._stopped=!1,a._actualFrame=0,a._currentEmitRate1=0,a._currentEmitRate2=0,a._currentStartSize1=0,a._currentStartSize2=0,a._rawTextureWidth=256,a._useRampGradients=!1,a._disposeEmitterOnDispose=!1,a.isLocal=!1,a._onBeforeDrawParticlesObservable=null,a.recycleParticle=function(e){var t=a._particles.pop();t!==e&&t.copyTo(e),a._stockParticles.push(t)},a._createParticle=function(){var e;if(0!==a._stockParticles.length?(e=a._stockParticles.pop())._reset():e=new _0xf9b57a(a),a._subEmitters&&a._subEmitters.length>0){var t=a._subEmitters[Math.floor(Math.random()*a._subEmitters.length)];e._attachedSubEmitters=[],t.forEach((function(t){if(t.type===_0x5142be.ATTACHED){var i=t.clone();e._attachedSubEmitters.push(i),i.particleSystem.start()}}))}return e},a._emitFromParticle=function(e){if(a._subEmitters&&0!==a._subEmitters.length){var t=Math.floor(Math.random()*a._subEmitters.length);a._subEmitters[t].forEach((function(t){if(t.type===_0x5142be.END){var i=t.clone();e._inheritParticleInfoToSubEmitter(i),i.particleSystem._rootParticleSystem=a,a.activeSubSystems.push(i.particleSystem),i.particleSystem.start()}}))}},a._capacity=t,a._epsilon=o,a._isAnimationSheetEnabled=r,e$2e(i)&&i.primitives.add(a),a._vertexArrayObject=null,a._customEffect={0:n},a._useInstancing=!0,a._createIndexBuffer(),a._createVertexBuffers(),a.particleEmitterType=new _0x4c62f8,a.updateFunction=function(e){var t=null,i=null;a.noiseTexture&&(t=a.noiseTexture.getSize(),i=a.noiseTexture.getContent());for(var n,r=function(){n=e[o];var r=a._scaledUpdateSpeed,s=n.age;if(n.age+=r,n.age>n.lifeTime){var l=n.age-s;r=(n.lifeTime-s)*r/l,n.age=n.lifeTime}var u=n.age/n.lifeTime;a._colorGradients&&a._colorGradients.length>0?_0xdebb2b.GetCurrentGradient(u,a._colorGradients,(function(e,t,i){e!==n._currentColorGradient&&(e$1X.clone(n._currentColor2,n._currentColor1),t.getColorToRef(n._currentColor2),n._currentColorGradient=e),e$1X.lerp(n._currentColor1,n._currentColor2,i,n.color)})):(e$1X.multiplyByScalar(n.colorStep,r,a._scaledColorStep),e$1X.add(n.color,a._scaledColorStep,n.color),n.color.a<0&&(n.color.a=0)),a._angularSpeedGradients&&a._angularSpeedGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._angularSpeedGradients,(function(e,t,i){e!==n._currentAngularSpeedGradient&&(n._currentAngularSpeed1=n._currentAngularSpeed2,n._currentAngularSpeed2=t.getFactor(),n._currentAngularSpeedGradient=e),n.angularSpeed=_0x442216.Lerp(n._currentAngularSpeed1,n._currentAngularSpeed2,i)})),n.angle+=n.angularSpeed*r;var c=r;if(a._velocityGradients&&a._velocityGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._velocityGradients,(function(e,t,i){e!==n._currentVelocityGradient&&(n._currentVelocity1=n._currentVelocity2,n._currentVelocity2=t.getFactor(),n._currentVelocityGradient=e),c*=_0x442216.Lerp(n._currentVelocity1,n._currentVelocity2,i)})),o$1p.multiplyByScalar(n.direction,c,a._scaledDirection),a._limitVelocityGradients&&a._limitVelocityGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._limitVelocityGradients,(function(e,t,i){e!==n._currentLimitVelocityGradient&&(n._currentLimitVelocity1=n._currentLimitVelocity2,n._currentLimitVelocity2=t.getFactor(),n._currentLimitVelocityGradient=e);var r=_0x442216.Lerp(n._currentLimitVelocity1,n._currentLimitVelocity2,i);o$1p.magnitude(n.direction)>r&&o$1p.multiplyByScalar(n.direction,a.limitVelocityDamping,n.direction)})),a._dragGradients&&a._dragGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._dragGradients,(function(e,t,i){e!==n._currentDragGradient&&(n._currentDrag1=n._currentDrag2,n._currentDrag2=t.getFactor(),n._currentDragGradient=e);var r=_0x442216.Lerp(n._currentDrag1,n._currentDrag2,i);o$1p.multiplyByScalar(a._scaledDirection,1-r,a._scaledDirection)})),a.isLocal&&n._localPosition?(o$1p.add(n._localPosition,a._scaledDirection,n._localPosition),p$1d.multiplyByPoint(a._emitterWorldMatrix,n._localPosition,n.position)):o$1p.add(n.position,a._scaledDirection,n.position),i&&t&&n._randomNoiseCoordinates1){var h=a._fetchR(n._randomNoiseCoordinates1.x,n._randomNoiseCoordinates1.y,t.width,t.height,i),d=a._fetchR(n._randomNoiseCoordinates1.z,n._randomNoiseCoordinates2.x,t.width,t.height,i),f=a._fetchR(n._randomNoiseCoordinates2.y,n._randomNoiseCoordinates2.z,t.width,t.height,i),p=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Vector3[0],_=_Maths_math_vector__WEBPACK_IMPORTED_MODULE_3__.TmpVectors.Vector3[1];p.x=(2*h-1)*a.noiseStrength.x,p.y=(2*d-1)*a.noiseStrength.y,p.z=(2*f-1)*a.noiseStrength.z,o$1p.multiplyByScalar(p,r,_),o$1p.add(n.direction,_,n.direction)}if(o$1p.multiplyByScalar(a.gravity,r,a._scaledGravity),o$1p.add(n.direction,a._scaledGravity,n.direction),a._sizeGradients&&a._sizeGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._sizeGradients,(function(e,t,i){e!==n._currentSizeGradient&&(n._currentSize1=n._currentSize2,n._currentSize2=t.getFactor(),n._currentSizeGradient=e),n.size=_0x442216.Lerp(n._currentSize1,n._currentSize2,i)})),a._useRampGradients&&(a._colorRemapGradients&&a._colorRemapGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._colorRemapGradients,(function(e,t,i){var r=_0x442216.Lerp(e.factor1,t.factor1,i),o=_0x442216.Lerp(e.factor2,t.factor2,i);n.remapData.x=r,n.remapData.y=o-r})),a._alphaRemapGradients&&a._alphaRemapGradients.length>0&&_0xdebb2b.GetCurrentGradient(u,a._alphaRemapGradients,(function(e,t,i){var r=_0x442216.Lerp(e.factor1,t.factor1,i),o=_0x442216.Lerp(e.factor2,t.factor2,i);n.remapData.z=r,n.remapData.w=o-r}))),a._isAnimationSheetEnabled&&n.updateCellIndex(),n._inheritParticleInfoToSubEmitters(),n.age>=n.lifeTime)return a._emitFromParticle(n),n._attachedSubEmitters&&(n._attachedSubEmitters.forEach((function(e){e.particleSystem.disposeOnStop=!0,e.particleSystem.stop()})),n._attachedSubEmitters=null),a.recycleParticle(n),o--,"continue"},o=0;o<e.length;o++)r()},a}_0x40fc79(),_0xee24b0.prototype=Object.create(_0x439851.prototype),_0xee24b0.prototype.constructor=_0x439851,Object.defineProperties(_0xee24b0.prototype,{onDispose:{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}},useRampGradients:{get:function(){return this._useRampGradients},set:function(e){this._useRampGradients!==e&&(this._useRampGradients=e,this._resetEffect())}},particles:{get:function(){return this._particles}},modelMatrix:{get:function(){return this._modelMatrx},set:function(e){if(this._modelMatrx!==e&&(this._modelMatrx=e,this.subEmitters&&this.subEmitters.length))for(var t=0;t<this.subEmitters.length;t++)for(var i=0,n=this.subEmitters[t];i<n.length;i++){n[i].particleSystem.modelMatrix=e}}}}),_0xee24b0.prototype.getActiveCount=function(){return this._particles.length},_0xee24b0.prototype.getClassName=function(){return"ParticleSystem"},_0xee24b0.prototype.isStopping=function(){return this._stopped&&this.isAlive()},_0xee24b0.prototype.getCustomEffect=function(e){var t;return void 0===e&&(e=0),null!==(t=this._customEffect[e])&&void 0!==t?t:this._customEffect[0]},_0xee24b0.prototype.setCustomEffect=function(e,t){void 0===t&&(t=0),this._customEffect[t]=e},_0xee24b0.prototype._addFactorGradient=function(e,t,i,n){var r=new _0x341870(t,i,n);e.push(r),e.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}))},_0xee24b0.prototype._removeFactorGradient=function(e,t){if(e)for(var i=0,n=0,r=e;n<r.length;n++){if(r[n].gradient===t){e.splice(i,1);break}i++}},_0xee24b0.prototype.addLifeTimeGradient=function(e,t,i){return this._lifeTimeGradients||(this._lifeTimeGradients=[]),this._addFactorGradient(this._lifeTimeGradients,e,t,i),this},_0xee24b0.prototype.removeLifeTimeGradient=function(e){return this._removeFactorGradient(this._lifeTimeGradients,e),this},_0xee24b0.prototype.addSizeGradient=function(e,t,i){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t,i),this},_0xee24b0.prototype.removeSizeGradient=function(e){return this._removeFactorGradient(this._sizeGradients,e),this},_0xee24b0.prototype.addColorRemapGradient=function(e,t,i){return this._colorRemapGradients||(this._colorRemapGradients=[]),this._addFactorGradient(this._colorRemapGradients,e,t,i),this},_0xee24b0.prototype.removeColorRemapGradient=function(e){return this._removeFactorGradient(this._colorRemapGradients,e),this},_0xee24b0.prototype.addAlphaRemapGradient=function(e,t,i){return this._alphaRemapGradients||(this._alphaRemapGradients=[]),this._addFactorGradient(this._alphaRemapGradients,e,t,i),this},_0xee24b0.prototype.removeAlphaRemapGradient=function(e){return this._removeFactorGradient(this._alphaRemapGradients,e),this},_0xee24b0.prototype.addAngularSpeedGradient=function(e,t,i){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t,i),this},_0xee24b0.prototype.removeAngularSpeedGradient=function(e){return this._removeFactorGradient(this._angularSpeedGradients,e),this},_0xee24b0.prototype.addVelocityGradient=function(e,t,i){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t,i),this},_0xee24b0.prototype.removeVelocityGradient=function(e){return this._removeFactorGradient(this._velocityGradients,e),this},_0xee24b0.prototype.addLimitVelocityGradient=function(e,t,i){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t,i),this},_0xee24b0.prototype.removeLimitVelocityGradient=function(e){return this._removeFactorGradient(this._limitVelocityGradients,e),this},_0xee24b0.prototype.addDragGradient=function(e,t,i){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t,i),this},_0xee24b0.prototype.removeDragGradient=function(e){return this._removeFactorGradient(this._dragGradients,e),this},_0xee24b0.prototype.addEmitRateGradient=function(e,t,i){return this._emitRateGradients||(this._emitRateGradients=[]),this._addFactorGradient(this._emitRateGradients,e,t,i),this},_0xee24b0.prototype.removeEmitRateGradient=function(e){return this._removeFactorGradient(this._emitRateGradients,e),this},_0xee24b0.prototype.addStartSizeGradient=function(e,t,i){return this._startSizeGradients||(this._startSizeGradients=[]),this._addFactorGradient(this._startSizeGradients,e,t,i),this},_0xee24b0.prototype.removeStartSizeGradient=function(e){return this._removeFactorGradient(this._startSizeGradients,e),this};var _0x296d51=new e$1X;_0xee24b0.prototype._createRampGradientTexture=function(){if(this._rampGradients&&this._rampGradients.length&&!this._rampGradientsTexture){for(var e=new Uint8Array(4*this._rawTextureWidth),t=_0x296d51,i=0;i<this._rawTextureWidth;i++){var n=i/this._rawTextureWidth;_0xdebb2b.GetCurrentGradient(n,this._rampGradients,(function(n,r,o){e$1X.lerp(n.color,r.color,o,t),e[4*i]=255*t.red,e[4*i+1]=255*t.green,e[4*i+2]=255*t.blue,e[4*i+3]=255}))}this._rampGradientsTexture=new t$U({context:this._context,width:this._rawTextureWidth,height:1,source:{arrayBufferView:e},pixelFormat:V$12.RGBA,flipY:!1})}},_0xee24b0.prototype.getRampGradients=function(){return this._rampGradients},_0xee24b0.prototype.forceRefreshGradients=function(){this._syncRampGradientTexture()},_0xee24b0.prototype._syncRampGradientTexture=function(){!this._rampGradients||(this._rampGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this._rampGradientsTexture&&(this._rampGradientsTexture.destroy(),this._rampGradientsTexture=null),this._createRampGradientTexture())},_0xee24b0.prototype.addRampGradient=function(e,t){this._rampGradients||(this._rampGradients=[]);var i=new _0x30da6f(e,t);return this._rampGradients.push(i),this._syncRampGradientTexture(),this},_0xee24b0.prototype.removeRampGradient=function(e){return this._removeGradientAndTexture(e,this._rampGradients,this._rampGradientsTexture),this._rampGradientsTexture=null,this._rampGradients&&this._rampGradients.length>0&&this._createRampGradientTexture(),this},_0xee24b0.prototype.addColorGradient=function(e,t,i){this._colorGradients||(this._colorGradients=[]);var n=new _0x180241(e,t,i);return this._colorGradients.push(n),this._colorGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this},_0xee24b0.prototype.removeColorGradient=function(e){if(!this._colorGradients)return this;for(var t=0,i=0,n=this._colorGradients;i<n.length;i++){if(n[i].gradient===e){this._colorGradients.splice(t,1);break}t++}return this},_0xee24b0.prototype._fetchR=function(e,t,i,n,r){return r[4*(((e=.5*Math.abs(e)+.5)*i%i|0)+((t=.5*Math.abs(t)+.5)*n%n|0)*i)]/255},_0xee24b0.prototype._reset=function(){this._resetEffect()},_0xee24b0.prototype._resetEffect=function(){e$2e(this._drawCommand)&&(this._drawCommand.vertexArray=null),this._vertexArray&&!this._vertexArray.isDestroyed()&&this._vertexArray.destroy(),this._createIndexBuffer(),this._createVertexBuffers()},_0xee24b0.prototype._createVertexBuffers=function(){var e={},t=[],i=0;e.offset=i++;var n=new Float32Array([0,0,1,0,1,1,0,1]);this._spriteBuffer=t$X.createVertexBuffer({context:this._context,typedArray:n,usage:A$18.STATIC_DRAW}),t.push({name:"offset",index:e.offset,vertexBuffer:this._spriteBuffer,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:2*S$14.getSizeInBytes(S$14.FLOAT),normalize:!1}),this._vertexBufferSize=10,this._isAnimationSheetEnabled&&(this._vertexBufferSize+=1),(!this._isBillboardBased||this.billboardMode===_0xbf6524.BILLBOARDMODE_STRETCHED)&&(this._vertexBufferSize+=3),this._useRampGradients&&(this._vertexBufferSize+=4),this._vertexData=new Float32Array(this._capacity*this._vertexBufferSize),this._vertexBuffer=t$X.createVertexBuffer({context:this._context,sizeInBytes:this._vertexData.byteLength,usage:A$18.STATIC_DRAW});var r=S$14.getSizeInBytes(S$14.FLOAT),o=this._vertexBufferSize*r,a=0;e.position=i++,t.push({name:"position",index:e.position,vertexBuffer:this._vertexBuffer,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=3,e.color=i++,t.push({name:"color",index:e.color,vertexBuffer:this._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=4,e.angle=i++,t.push({name:"angle",index:e.angle,vertexBuffer:this._vertexBuffer,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=1,e.size=i++,t.push({name:"size",index:e.size,vertexBuffer:this._vertexBuffer,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=2,this._isAnimationSheetEnabled&&(e.cellIndex=i++,t.push({name:"cellIndex",index:e.cellIndex,vertexBuffer:this._vertexBuffer,componentsPerAttribute:1,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=1),(!this._isBillboardBased||this.billboardMode===_0xbf6524.BILLBOARDMODE_STRETCHED)&&(e.direction=i++,t.push({name:"direction",index:e.direction,vertexBuffer:this._vertexBuffer,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=3),this._useRampGradients&&(e.remapData=i++,t.push({name:"remapData",index:e.remapData,vertexBuffer:this._vertexBuffer,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:r*a,strideInBytes:o,instanceDivisor:1}),a+=4),this._attributeLocations=e,this._attributes=t,this._vertexArray=new c$13({context:this._context,attributes:this._attributes,indexBuffer:this._indexBuffer})},_0xee24b0.prototype._createIndexBuffer=function(){var e=new Uint16Array(6),t=0;e[t++]=0,e[t++]=1,e[t++]=2,e[t++]=0,e[t++]=2,e[t++]=3,this._indexBuffer=t$X.createIndexBuffer({context:this._context,typedArray:e,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})},_0xee24b0.prototype.getCapacity=function(){return this._capacity},_0xee24b0.prototype.isAlive=function(){return this._alive},_0xee24b0.prototype.isStarted=function(){return this._started},_0xee24b0.prototype._prepareSubEmitterInternalArray=function(){var e=this;this._subEmitters=new Array,this.subEmitters&&this.subEmitters.forEach((function(t){t instanceof _0xee24b0?e._subEmitters.push([new _0x5e1712(t)]):t instanceof _0x5e1712?e._subEmitters.push([t]):t instanceof Array&&e._subEmitters.push(t)}))},_0xee24b0.prototype.start=function(e){var t=this;if(void 0===e&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set";if(e)setTimeout((function(){t.start(0)}),e);else{if(this._prepareSubEmitterInternalArray(),this._started=!0,this._stopped=!1,this._actualFrame=0,this._subEmitters&&0!=this._subEmitters.length&&(this.activeSubSystems=new Array),this._emitRateGradients&&(this._emitRateGradients.length>0&&(this._currentEmitRateGradient=this._emitRateGradients[0],this._currentEmitRate1=this._currentEmitRateGradient.getFactor(),this._currentEmitRate2=this._currentEmitRate1),this._emitRateGradients.length>1&&(this._currentEmitRate2=this._emitRateGradients[1].getFactor())),this._startSizeGradients&&(this._startSizeGradients.length>0&&(this._currentStartSizeGradient=this._startSizeGradients[0],this._currentStartSize1=this._currentStartSizeGradient.getFactor(),this._currentStartSize2=this._currentStartSize1),this._startSizeGradients.length>1&&(this._currentStartSize2=this._startSizeGradients[1].getFactor())),this.preWarmCycles){e$2e(this.emitter)&&this.emitter instanceof _0x1d0ffc&&this.emitter.computeWorldMatrix(!0);var i=this.noiseTexture;if(i&&i.onGeneratedObservable)i.onGeneratedObservable.addOnce((function(){setTimeout((function(){for(var e=0;e<t.preWarmCycles;e++)t.animate(!0),i.render()}))}));else for(var n=0;n<this.preWarmCycles;n++)this.animate(!0)}this.beginAnimationOnStart&&this.animations&&this.animations.length>0&&this._scene}},_0xee24b0.prototype.stop=function(e){void 0===e&&(e=!0),!this._stopped&&(this._stopped=!0,e&&this._stopSubEmitters())},_0xee24b0.prototype.reset=function(){this._stockParticles=[],this._particles=[]},_0xee24b0.prototype._appendParticleVertex=function(e,t,i,n){var r=e*this._vertexBufferSize;if(this._vertexData[r++]=t.position.x+this.worldOffset.x,this._vertexData[r++]=t.position.y+this.worldOffset.y,this._vertexData[r++]=t.position.z+this.worldOffset.z,this._vertexData[r++]=t.color.red,this._vertexData[r++]=t.color.green,this._vertexData[r++]=t.color.blue,this._vertexData[r++]=t.color.alpha,this._vertexData[r++]=t.angle,this._vertexData[r++]=t.scale.x*t.size,this._vertexData[r++]=t.scale.y*t.size,this._isAnimationSheetEnabled&&(this._vertexData[r++]=t.cellIndex),this._isBillboardBased)this.billboardMode===_0xbf6524.BILLBOARDMODE_STRETCHED&&(this._vertexData[r++]=t.direction.x,this._vertexData[r++]=t.direction.y,this._vertexData[r++]=t.direction.z);else if(t._initialDirection){var o=t._initialDirection;this.isLocal&&p$1d.multiplyByDirection(this._emitterWorldMatrix,o,o),0===o.x&&0===o.z&&(o.x=.001),this._vertexData[r++]=o.x,this._vertexData[r++]=o.y,this._vertexData[r++]=o.z}else{var a=t.direction;this.isLocal&&p$1d.multiplyByDirection(this._emitterWorldMatrix,a,a),0===a.x&&0===a.z&&(a.x=.001),this._vertexData[r++]=a.x,this._vertexData[r++]=a.y,this._vertexData[r++]=a.z}this._useRampGradients&&t.remapData&&(this._vertexData[r++]=t.remapData.x,this._vertexData[r++]=t.remapData.y,this._vertexData[r++]=t.remapData.z,this._vertexData[r++]=t.remapData.w),this._useInstancing||(this._isAnimationSheetEnabled&&(0===i?i=this._epsilon:1===i&&(i=1-this._epsilon),0===n?n=this._epsilon:1===n&&(n=1-this._epsilon)),this._vertexData[r++]=i,this._vertexData[r++]=n)},_0xee24b0.prototype._stopSubEmitters=function(){!this.activeSubSystems||(this.activeSubSystems.forEach((function(e){e.stop(!0)})),this.activeSubSystems=new Array)},_0xee24b0.prototype._removeFromRoot=function(){if(this._rootParticleSystem){var e=this._rootParticleSystem.activeSubSystems.indexOf(this);-1!==e&&this._rootParticleSystem.activeSubSystems.splice(e,1),this._rootParticleSystem=null}},_0xee24b0.prototype._update=function(e){var t=this;if(this._alive=this._particles.length>0,this.emitter.position){var i=this.emitter;this._emitterWorldMatrix=i.getWorldMatrix()}else{var n=this.emitter;this._emitterWorldMatrix=p$1d.fromTranslation(n,this._emitterWorldMatrix)}this.updateFunction(this._particles);for(var r,o,a=function(){if(s._particles.length===s._capacity)return"break";if(r=s._createParticle(),s._particles.push(r),s.targetStopDuration&&s._lifeTimeGradients&&s._lifeTimeGradients.length>0){var e=_0x442216.Clamp(s._actualFrame/s.targetStopDuration);_0xdebb2b.GetCurrentGradient(e,s._lifeTimeGradients,(function(t,i){var n=t,o=i,a=n.getFactor(),s=o.getFactor(),l=(e-n.gradient)/(o.gradient-n.gradient);r.lifeTime=_0x442216.Lerp(a,s,l)}))}else r.lifeTime=_0x442216.RandomRange(s.minLifeTime,s.maxLifeTime);var i=_0x442216.RandomRange(s.minEmitPower,s.maxEmitPower);if(s.startPositionFunction?s.startPositionFunction(s._emitterWorldMatrix,r.position,r,s.isLocal):s.particleEmitterType.startPositionFunction(s._emitterWorldMatrix,r.position,r,s.isLocal),s.isLocal&&(r._localPosition=o$1p.clone(r.position,r._localPosition),p$1d.multiplyByPoint(s._emitterWorldMatrix,r._localPosition,r.position)),s.startDirectionFunction?s.startDirectionFunction(s._emitterWorldMatrix,r.direction,r,s.isLocal):s.particleEmitterType.startDirectionFunction(s._emitterWorldMatrix,r.direction,r,s.isLocal),r._initialDirection=0===i?o$1p.clone(r.direction,r._initialDirection):null,o$1p.multiplyByScalar(r.direction,i,r.direction),s._sizeGradients&&0!==s._sizeGradients.length?(r._currentSizeGradient=s._sizeGradients[0],r._currentSize1=r._currentSizeGradient.getFactor(),r.size=r._currentSize1,s._sizeGradients.length>1?r._currentSize2=s._sizeGradients[1].getFactor():r._currentSize2=r._currentSize1):r.size=_0x442216.RandomRange(s.minSize,s.maxSize),r.scale.x=_0x442216.RandomRange(s.minScaleX,s.maxScaleX),r.scale.y=_0x442216.RandomRange(s.minScaleY,s.maxScaleY),s._startSizeGradients&&s._startSizeGradients[0]&&s.targetStopDuration){var n=s._actualFrame/s.targetStopDuration;_0xdebb2b.GetCurrentGradient(n,s._startSizeGradients,(function(e,i,n){e!==t._currentStartSizeGradient&&(t._currentStartSize1=t._currentStartSize2,t._currentStartSize2=i.getFactor(),t._currentStartSizeGradient=e);var o=_0x442216.Lerp(t._currentStartSize1,t._currentStartSize2,n);o$1p.multiplyByScalar(r.scale,o,r.scale)}))}s._angularSpeedGradients&&0!==s._angularSpeedGradients.length?(r._currentAngularSpeedGradient=s._angularSpeedGradients[0],r.angularSpeed=r._currentAngularSpeedGradient.getFactor(),r._currentAngularSpeed1=r.angularSpeed,s._angularSpeedGradients.length>1?r._currentAngularSpeed2=s._angularSpeedGradients[1].getFactor():r._currentAngularSpeed2=r._currentAngularSpeed1):r.angularSpeed=_0x442216.RandomRange(s.minAngularSpeed,s.maxAngularSpeed),r.angle=_0x442216.RandomRange(s.minInitialRotation,s.maxInitialRotation),s._velocityGradients&&s._velocityGradients.length>0&&(r._currentVelocityGradient=s._velocityGradients[0],r._currentVelocity1=r._currentVelocityGradient.getFactor(),s._velocityGradients.length>1?r._currentVelocity2=s._velocityGradients[1].getFactor():r._currentVelocity2=r._currentVelocity1),s._limitVelocityGradients&&s._limitVelocityGradients.length>0&&(r._currentLimitVelocityGradient=s._limitVelocityGradients[0],r._currentLimitVelocity1=r._currentLimitVelocityGradient.getFactor(),s._limitVelocityGradients.length>1?r._currentLimitVelocity2=s._limitVelocityGradients[1].getFactor():r._currentLimitVelocity2=r._currentLimitVelocity1),s._dragGradients&&s._dragGradients.length>0&&(r._currentDragGradient=s._dragGradients[0],r._currentDrag1=r._currentDragGradient.getFactor(),s._dragGradients.length>1?r._currentDrag2=s._dragGradients[1].getFactor():r._currentDrag2=r._currentDrag1),s._colorGradients&&0!==s._colorGradients.length?(r._currentColorGradient=s._colorGradients[0],r._currentColorGradient.getColorToRef(r.color),e$1X.clone(r.color,r._currentColor1),s._colorGradients.length>1?s._colorGradients[1].getColorToRef(r._currentColor2):e$1X.clone(r.color,r._currentColor2)):(o=_0x442216.RandomRange(0,1),e$1X.lerp(s.color1,s.color2,o,r.color),e$1X.subtract(s.colorDead,r.color,s._colorDiff),e$1X.multiplyByScalar(s._colorDiff,1/r.lifeTime,r.colorStep)),s._isAnimationSheetEnabled&&(r._initialStartSpriteCellID=s.startSpriteCellID,r._initialEndSpriteCellID=s.endSpriteCellID),o$1p.add(r.direction,s._inheritedVelocityOffset,r.direction),s._useRampGradients&&(r.remapData=new e$2c(0,1,0,1)),s.noiseTexture&&(r._randomNoiseCoordinates1?(o$1p.unpack([Math.random(),Math.random(),Math.random()],0,r._randomNoiseCoordinates1),o$1p.unpack([Math.random(),Math.random(),Math.random()],0,r._randomNoiseCoordinates2)):(r._randomNoiseCoordinates1=new o$1p(Math.random(),Math.random(),Math.random()),r._randomNoiseCoordinates2=new o$1p(Math.random(),Math.random(),Math.random()))),r._inheritParticleInfoToSubEmitters()},s=this,l=0;l<e;l++){if("break"===a())break}},_0xee24b0.prototype.fillDefines=function(e,t){if(this._isAnimationSheetEnabled&&e.push("ANIMATESHEET"),t===_0x4d4f68.BLENDMODE_MULTIPLY&&e.push("BLENDMULTIPLYMODE"),this._useRampGradients&&e.push("RAMPGRADIENT"),this._isBillboardBased)switch(e.push("BILLBOARD"),this.billboardMode){case _0xbf6524.BILLBOARDMODE_Y:e.push("BILLBOARDY");break;case _0xbf6524.BILLBOARDMODE_STRETCHED:e.push("BILLBOARDSTRETCHED");break;case _0xbf6524.BILLBOARDMODE_ALL:e.push("BILLBOARDMODE_ALL")}},_0xee24b0.prototype._getEffect=function(e){var t=this.getCustomEffect(e);if(t)return t;var i=[];this.fillDefines(i,e);var n=i.join("\n");if(this._cachedDefines!==n){this._cachedDefines=n;var r,o,a=this._drawCommand;e$2e(a.shaderProgram)?(r=a.shaderProgram.vertexShaderSource.clone(),o=a.shaderProgram.fragmentShaderSource.clone()):(r=new s$V({name:"BabylonParticlesVS",sources:[_0x375d2f]}),o=new s$V({name:"BabylonParticlesFS",sources:[_0x4eccd8]})),r.defines=i,o.defines=i,this._sp=this._sp&&this._sp.destroy(),this._sp=r$14.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}this._drawCommand.shaderProgram=this._sp},_0xee24b0.prototype.update=function(e){LicenseChecker.LICENSECHECKER.verify("ParticleSystem"),this.animate(!1,e),this.render(e),this._stopped&&(this._alive||(this._started=!1,this.onAnimationEnd&&this.onAnimationEnd(),this.disposeOnStop&&this._scene&&this._scene.primitives.remove(this)))},_0xee24b0.prototype.animate=function(e,t){var i=this;if(void 0===e&&(e=!1),this._started){if(!e&&this._scene){if(!this.isReady()||this._currentRenderId===t.frameNumber)return;this._currentRenderId=t.frameNumber}var n;if(this._scaledUpdateSpeed=this.updateSpeed*(e?this.preWarmStepOffset:1),this.manualEmitCount>-1)n=this.manualEmitCount,this._newPartsExcess=0,this.manualEmitCount=0;else{var r=this.emitRate;if(this._emitRateGradients&&this._emitRateGradients.length>0&&this.targetStopDuration){var o=this._actualFrame/this.targetStopDuration;_0xdebb2b.GetCurrentGradient(o,this._emitRateGradients,(function(e,t,n){e!==i._currentEmitRateGradient&&(i._currentEmitRate1=i._currentEmitRate2,i._currentEmitRate2=t.getFactor(),i._currentEmitRateGradient=e),r=_0x442216.Lerp(i._currentEmitRate1,i._currentEmitRate2,n)}))}n=r*this._scaledUpdateSpeed>>0,this._newPartsExcess+=r*this._scaledUpdateSpeed-n}if(this._newPartsExcess>1&&(n+=this._newPartsExcess>>0,this._newPartsExcess-=this._newPartsExcess>>0),this._alive=!1,this._stopped?n=0:(this._actualFrame+=this._scaledUpdateSpeed,this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()),this._update(n),!e){for(var a=0,s=0;s<this._particles.length;s++){var l=this._particles[s];this._appendParticleVertices(a,l),a+=this._useInstancing?1:4}this._vertexBuffer&&this._vertexBuffer.copyFromArrayView(this._vertexData)}0===this.manualEmitCount&&this.disposeOnStop&&this.stop()}},_0xee24b0.prototype._appendParticleVertices=function(e,t){this._appendParticleVertex(e++,t,0,0),this._useInstancing||(this._appendParticleVertex(e++,t,1,0),this._appendParticleVertex(e++,t,1,1),this._appendParticleVertex(e++,t,0,1))},_0xee24b0.prototype.isReady=function(){return!!this.emitter},_0xee24b0.prototype._render=function(e,t){return e$2e(this._drawCommand)||this._createDrawCommand(),this._getEffect(e),this._drawCommand.vertexArray=this._vertexArray,this._drawCommand.instanceCount=this._capacity,_0x439851._setRenderState(this._drawCommand,e),this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.notifyObservers(effect),t.commandList.push(this._drawCommand),this._particles.length},_0xee24b0.prototype.render=function(e){if(!this._particles.length)return 0;this.forceDepthWrite;return this.blendMode===_0x4d4f68.BLENDMODE_MULTIPLYADD?this._render(_0x4d4f68.BLENDMODE_ADD,e):this._render(this.blendMode,e)},_0xee24b0.prototype.destroy=function(){if(e$2e(this._drawCommand)){var e=this._drawCommand;e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0,this._drawCommand=void 0}if(this.noiseTexture&&(!this.noiseTexture.isDestroyed()&&this.noiseTexture.destroy(),this.noiseTexture=null),this._rampGradientsTexture&&(!this._rampGradientsTexture.isDestroyed()&&this._rampGradientsTexture.destroy(),this._rampGradientsTexture=null),this._removeFromRoot(),this._subEmitters&&this._subEmitters.length){for(var t=0;t<this._subEmitters.length;t++)for(var i=0,n=this._subEmitters[t];i<n.length;i++){var r=n[i];r.hasOwnProperty("particleSystem")?r.particleSystem.destroy():r.dispose()}this._subEmitters=[],this.subEmitters=[]}this._disposeEmitterOnDispose&&this.emitter&&this.emitter.dispose&&this.emitter.dispose(!0),this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.clear(),this.reset()},_0xee24b0.prototype.clone=function(e,t){this._engine;var i=this.serialize(),n=_0xee24b0.Parse(i,this._scene||this._engine,"",!1,this._context);return n.name=e,n.customShader=null,n._customEffect={},void 0===t&&(t=this.emitter),this.noiseTexture&&(n.noiseTexture=this.noiseTexture.clone()),this.particleTexture&&(n.particleTexture=this.particleTexture),e$2e(this._modelMatrx)&&(n._modelMatrx=new p$1d,p$1d.clone(this._modelMatrx,n._modelMatrx)),n.emitter=t,this.preventAutoStart||n.start(),n},_0xee24b0.prototype.serialize=function(e){void 0===e&&(e=!1);var t={};_0xee24b0._Serialize(t,this,e);var i=[];if(e$1X.pack(this.textureMask,i),t.textureMask=i,t.customShader=this.customShader,t.preventAutoStart=this.preventAutoStart,this.subEmitters){t.subEmitters=[],this._subEmitters||this._prepareSubEmitterInternalArray();for(var n=0,r=this._subEmitters;n<r.length;n++){for(var o=[],a=0,s=r[n];a<s.length;a++){var l=s[a];o.push(l.serialize())}t.subEmitters.push(o)}}return t},_0xee24b0._Serialize=function(e,t,i){if(e.name=t.name,e.id=t.id,e.capacity=t.getCapacity(),t.emitter.position){var n=t.emitter;e.emitterId=n.id}else{var r=t.emitter,o=[];o$1p.pack(r,o),e.emitter=o}t.particleEmitterType&&(e.particleEmitterType=t.particleEmitterType.serialize()),t.particleTexture&&(i?e.texture=t.particleTexture.serialize():(e.textureName=t.particleTexture.name,e.invertY=!!t.particleTexture._flipY)),e.isLocal=t.isLocal,e.startDelay=t.startDelay,e.renderingGroupId=t.renderingGroupId,e.isBillboardBased=t.isBillboardBased,e.billboardMode=t.billboardMode,e.minAngularSpeed=t.minAngularSpeed,e.maxAngularSpeed=t.maxAngularSpeed,e.minSize=t.minSize,e.maxSize=t.maxSize,e.minScaleX=t.minScaleX,e.maxScaleX=t.maxScaleX,e.minScaleY=t.minScaleY,e.maxScaleY=t.maxScaleY,e.minEmitPower=t.minEmitPower,e.maxEmitPower=t.maxEmitPower,e.minLifeTime=t.minLifeTime,e.maxLifeTime=t.maxLifeTime,e.emitRate=t.emitRate;var a=[];o$1p.pack(t.gravity,a),e.gravity=a;var s=[];o$1p.pack(t.noiseStrength,s),e.noiseStrength=s;var l=[];e$1X.pack(t.color1,l),e.color1=l;var u=[];e$1X.pack(t.color2,u),e.color2=u;var c=[];e$1X.pack(t.colorDead,c),e.colorDead=c,e.updateSpeed=t.updateSpeed,e.targetStopDuration=t.targetStopDuration,e.blendMode=t.blendMode,e.preWarmCycles=t.preWarmCycles,e.preWarmStepOffset=t.preWarmStepOffset,e.minInitialRotation=t.minInitialRotation,e.maxInitialRotation=t.maxInitialRotation,e.startSpriteCellID=t.startSpriteCellID,e.endSpriteCellID=t.endSpriteCellID,e.spriteCellChangeSpeed=t.spriteCellChangeSpeed,e.spriteCellWidth=t.spriteCellWidth,e.spriteCellHeight=t.spriteCellHeight,e.spriteRandomStartCell=t.spriteRandomStartCell,e.isAnimationSheetEnabled=t.isAnimationSheetEnabled;var h=t.getColorGradients();if(h){e.colorGradients=[];for(var d=0,f=h;d<f.length;d++){var p=f[d];l=[];e$1X.pack(p.color1,l);var _={gradient:p.gradient,color1:l};if(p.color2){u=[];e$1X.pack(p.color2,u),_.color2=u}else{u=[];e$1X.pack(p.color1,u),_.color2=u}e.colorGradients.push(_)}}var m=t.getRampGradients();if(m){e.rampGradients=[];for(var g=0,x=m;g<x.length;g++){var y=x[g],v=[];e$1X.pack(y.color,v);_={gradient:y.gradient,color:v};e.rampGradients.push(_)}e.useRampGradients=t.useRampGradients}var $=t.getColorRemapGradients();if($){e.colorRemapGradients=[];for(var b=0,T=$;b<T.length;b++){var C=T[b];_={gradient:C.gradient,factor1:C.factor1};void 0!==C.factor2?_.factor2=C.factor2:_.factor2=C.factor1,e.colorRemapGradients.push(_)}}var S=t.getAlphaRemapGradients();if(S){e.alphaRemapGradients=[];for(var w=0,E=S;w<E.length;w++){var P=E[w];_={gradient:P.gradient,factor1:P.factor1};void 0!==P.factor2?_.factor2=P.factor2:_.factor2=P.factor1,e.alphaRemapGradients.push(_)}}var A=t.getSizeGradients();if(A){e.sizeGradients=[];for(var L=0,M=A;L<M.length;L++){var R=M[L];_={gradient:R.gradient,factor1:R.factor1};void 0!==R.factor2?_.factor2=R.factor2:_.factor2=R.factor1,e.sizeGradients.push(_)}}var O=t.getAngularSpeedGradients();if(O){e.angularSpeedGradients=[];for(var D=0,I=O;D<I.length;D++){var B=I[D];_={gradient:B.gradient,factor1:B.factor1};void 0!==B.factor2?_.factor2=B.factor2:_.factor2=B.factor1,e.angularSpeedGradients.push(_)}}var F=t.getVelocityGradients();if(F){e.velocityGradients=[];for(var N=0,G=F;N<G.length;N++){var z=G[N];_={gradient:z.gradient,factor1:z.factor1};void 0!==z.factor2?_.factor2=z.factor2:_.factor2=z.factor1,e.velocityGradients.push(_)}}var U=t.getDragGradients();if(U){e.dragGradients=[];for(var V=0,k=U;V<k.length;V++){var W=k[V];_={gradient:W.gradient,factor1:W.factor1};void 0!==W.factor2?_.factor2=W.factor2:_.factor2=W.factor1,e.dragGradients.push(_)}}var H=t.getEmitRateGradients();if(H){e.emitRateGradients=[];for(var q=0,j=H;q<j.length;q++){var X=j[q];_={gradient:X.gradient,factor1:X.factor1};void 0!==X.factor2?_.factor2=X.factor2:_.factor2=X.factor1,e.emitRateGradients.push(_)}}var Y=t.getStartSizeGradients();if(Y){e.startSizeGradients=[];for(var Z=0,K=Y;Z<K.length;Z++){var Q=K[Z];_={gradient:Q.gradient,factor1:Q.factor1};void 0!==Q.factor2?_.factor2=Q.factor2:_.factor2=Q.factor1,e.startSizeGradients.push(_)}}var J=t.getLifeTimeGradients();if(J){e.lifeTimeGradients=[];for(var ee=0,te=J;ee<te.length;ee++){var ie=te[ee];_={gradient:ie.gradient,factor1:ie.factor1};void 0!==ie.factor2?_.factor2=ie.factor2:_.factor2=ie.factor1,e.lifeTimeGradients.push(_)}}var ne=t.getLimitVelocityGradients();if(ne){e.limitVelocityGradients=[];for(var re=0,oe=ne;re<oe.length;re++){var ae=oe[re];_={gradient:ae.gradient,factor1:ae.factor1};void 0!==ae.factor2?_.factor2=ae.factor2:_.factor2=ae.factor1,e.limitVelocityGradients.push(_)}e.limitVelocityDamping=t.limitVelocityDamping}t.noiseTexture&&(e.noiseTexture=t.noiseTexture.serialize())},_0xee24b0.Parse=function(e,t,i,n){void 0===n&&(n=!1);var r=new _0xee24b0(e.name,e.capacity,t,null,e.isAnimationSheetEnabled,0);if(r.customShader=null,e.id&&(r.id=e.id),e.subEmitters){r.subEmitters=[];for(var o=0,a=e.subEmitters;o<a.length;o++){for(var s=[],l=0,u=a[o];l<u.length;l++){var c=u[l];s.push(_0x5e1712.Parse(c,t,i))}r.subEmitters.push(s)}}if(_0x439851._Parse(e,r,i),e.textureMask){var h=new e$1X;e$1X.unpack(e.textureMask,0,h),r.textureMask=h}return e.preventAutoStart&&(r.preventAutoStart=e.preventAutoStart),!n&&!r.preventAutoStart&&r.start(),r};var _0x480752=new o$1p;function _0x1d7521(e){var t=e.maxAngularSpeed*e.maxLifeTime;let i=p$1d.multiply(e.modelMatrix,e._emitterWorldMatrix,new p$1d);i$1d.transform(new i$1d,i,e._boundingVolume),e._boundingVolume.radius=t+10}new e$2c,_0xee24b0.prototype._createUniformMap=function(e){var t={},i=this;t.diffuseSampler=function(){return e$2e(i.particleTexture)?i.particleTexture:i._context.defaultTexture},t.particlesInfos=function(){var e=i._rawTextureWidth,t=i._rawTextureWidth;if(i.particleTexture)e=i.particleTexture.width,t=i.particleTexture.height;return _0x480752.x=i.spriteCellWidth/e,_0x480752.y=i.spriteCellHeight/t,_0x480752.z=i.spriteCellWidth/e,_0x480752},t.translationPivot=function(){return i.translationPivot},t.textureMask=function(){return i.textureMask},t.rampSampler=function(){return i._rampGradientsTexture},this._uniformMap=t},_0xee24b0.prototype._createDrawCommand=function(){this._boundingVolume=new i$1d,_0x1d7521(this);var e=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._modelMatrx,boundingVolume:this._boundingVolume,pass:Le$q.OPAQUE,cull:!1});e.castShadows=!1,e.receiveShadows=!1,e.selectCastShadows=!1,this._createUniformMap(),e.uniformMap=this._uniformMap,e.vertexArray=this._vertexArray,this._drawCommand=e};var _0x400f08=(_0x58d6c7=!0,function(e,t){var i=_0x58d6c7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x58d6c7=!1,i}),_0x488263=_0x400f08(void 0,(function(){return _0x488263.toString().search("(((.+)+)+)+$").toString().constructor(_0x488263).search("(((.+)+)+)+$")})),_0x58d6c7;function _0xcf9486(){this.systems=new Array,this._modelMatrx=new p$1d}_0x488263(),Object.defineProperties(_0xcf9486.prototype,{modelMatrix:{get:function(){return this._modelMatrx},set:function(e){if(this._modelMatrx!==e){this._modelMatrx=e;for(var t=0,i=this.systems;t<i.length;t++){i[t].modelMatrix=e}}}},emitterNode:{get:function(){return this._emitterNode}}}),_0xcf9486.prototype.setEmitterAsSphere=function(e,t,i){this._emitterNode&&this._emitterNode.dispose(),this._emitterCreationOptions={kind:"Sphere",options:e,renderingGroupId:t};var n=_Meshes_Builders_sphereBuilder__WEBPACK_IMPORTED_MODULE_1__.SphereBuilder.CreateSphere("emitterSphere",{diameter:e.diameter,segments:e.segments},i);n.renderingGroupId=t;var r=new _Materials_standardMaterial__WEBPACK_IMPORTED_MODULE_5__.StandardMaterial("emitterSphereMaterial",i);r.emissiveColor=e.color,n.material=r;for(var o=0,a=this.systems;o<a.length;o++){a[o].emitter=n}this._emitterNode=n},_0xcf9486.prototype.update=function(e){for(var t=0,i=this.systems;t<i.length;t++){i[t].update(e)}},_0xcf9486.prototype.start=function(e){for(var t=0,i=this.systems;t<i.length;t++){var n=i[t];e&&(n.emitter=e),n.start()}},_0xcf9486.prototype.dispose=function(){for(var e=0,t=this.systems;e<t.length;e++){t[e].dispose()}this.systems=[],this._emitterNode&&(this._emitterNode.dispose(),this._emitterNode=null)},_0xcf9486.prototype.serialize=function(e){void 0===e&&(e=!1);for(var t={systems:[]},i=0,n=this.systems;i<n.length;i++){var r=n[i];t.systems.push(r.serialize(e))}return this._emitterNode&&(t.emitter=this._emitterCreationOptions),t},_0xcf9486.Parse=function(e,t,i){for(var n=new _0xcf9486,r=this.BaseAssetsUrl+"/textures/",o=0,a=e.systems;o<a.length;o++){var s=a[o];e$2e(t.context.webgl2)&&t.context.webgl2&&e$2e(i)&&i?n.systems.push(_0x313aa5.Parse(s,t,r,!0)):n.systems.push(_0xee24b0.Parse(s,t,r,!0))}return n},_0xcf9486.BaseAssetsUrl="https://assets.babylonjs.com/particles";var _0x160dd2=(_0x5dea9e=!0,function(e,t){var i=_0x5dea9e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5dea9e=!1,i}),_0x5bd2cb=_0x160dd2(void 0,(function(){return _0x5bd2cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x5bd2cb).search("(((.+)+)+)+$")})),_0x5dea9e;function _0x38f4df(){}_0x5bd2cb(),_0x38f4df.fromJsonUrl=function(e,t,i){return t$10.createIfNeeded(e).fetchJson().then((function(e){return e$2e(e.systems)?_0xcf9486.Parse(e,t,i):e$2e(t.context.webgl2)&&t.context.webgl2&&e$2e(i)&&i?_0x313aa5.Parse(e,t,"",!1):_0xee24b0.Parse(e,t,"",!1)}))};var f$o="varying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\nvoid main()\n{\nczm_materialInput materialInput;\nvec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nmaterialInput.s = v_st.s;\nmaterialInput.st = v_st;\nmaterialInput.str = vec3(v_st, 0.0);\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);\nvec3 positionToEyeEC = -v_positionEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",d$t="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionMC = position3DHigh + position3DLow;\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";function t$h(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=u$Z(e.translucent,!0),i=u$Z(e.aboveGround,!1);this.material=e$2e(e.material)?e.material:r$Y.fromType(r$Y.ColorType),this.translucent=u$Z(e.translucent,!0),this._vertexShaderSource=u$Z(e.vertexShaderSource,d$t),this._fragmentShaderSource=u$Z(e.fragmentShaderSource,f$o),this._renderState=a$S.getDefaultRenderState(t,!i,e.renderState),this._closed=!1,this._flat=u$Z(e.flat,!1),this._faceForward=u$Z(e.faceForward,i),this._aboveGround=i,this._name="EllipsoidSurfaceAppearance"}Object.defineProperties(t$h.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return t$h.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}},name:{get:function(){return this._name+"_"+this.material._id}}}),t$h.VERTEX_FORMAT=n$13.POSITION_AND_ST,t$h.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,t$h.prototype.isTranslucent=a$S.prototype.isTranslucent,t$h.prototype.getRenderState=a$S.prototype.getRenderState;var _0x2d7b44=(_0x4e2a5b=!0,function(e,t){var i=_0x4e2a5b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e2a5b=!1,i}),_0x147131=_0x2d7b44(void 0,(function(){return _0x147131.toString().search("(((.+)+)+)+$").toString().constructor(_0x147131).search("(((.+)+)+)+$")})),_0x4e2a5b;_0x147131();var _0x5e709e={FIRE:0,FOUNTAIN:1,RAIN:2},v$o=Object.freeze(_0x5e709e),n$k=new o$1o(1,1);function a$k(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.mass=u$Z(e.mass,1),this.position=o$1p.clone(u$Z(e.position,o$1p.ZERO)),this.velocity=o$1p.clone(u$Z(e.velocity,o$1p.ZERO)),this.life=u$Z(e.life,Number.MAX_VALUE),this.image=e.image,this.startColor=e$1X.clone(u$Z(e.startColor,e$1X.WHITE)),this.endColor=e$1X.clone(u$Z(e.endColor,e$1X.WHITE)),this.startScale=u$Z(e.startScale,1),this.endScale=u$Z(e.endScale,1),this.imageSize=o$1o.clone(u$Z(e.imageSize,n$k)),this.rotationSpeed=u$Z(e.rotationSpeed,0),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(a$k.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var o$t=new o$1p;function u$l(e,t,i,n){e=u$Z(e,1),o$1q.typeOf.number.greaterThan("radius",e,0),this._radius=u$Z(e,1),this._innerRadius=u$Z(t,0),this._startAngle=u$Z(i,0),this._endAngle=u$Z(n,e$2d.TWO_PI)}function o$s(e){e=u$Z(e,1),o$1q.typeOf.number.greaterThan("radius",e,0),this._radius=u$Z(e,1),this.radius=this._radius}a$k.prototype.update=function(e,t){return o$1p.multiplyByScalar(this.velocity,e,o$t),o$1p.add(this.position,o$t,this.position),e$2e(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life},Object.defineProperties(u$l.prototype,{radius:{get:function(){return this._radius},set:function(e){o$1q.typeOf.number.greaterThan("value",e,0),this._radius=e}},innerRadius:{get:function(){return this._innerRadius},set:function(e){o$1q.typeOf.number.greaterThan("value",e,0),this._innerRadius=e}},startAngle:{get:function(){return this._startAngle},set:function(e){this._startAngle=e}},endAngle:{get:function(){return this._endAngle},set:function(e){this._endAngle=e}},type:{get:function(){return"Circle"}}}),u$l.prototype.emit=function(e){var t=this._startAngle,i=this._endAngle;t>i&&(t=this._endAngle,i=this._startAngle);var n=e$2d.randomBetween(t,i),r=e$2d.randomBetween(this._innerRadius,this._radius),o=r*Math.cos(n),a=r*Math.sin(n);e.position=o$1p.fromElements(o,a,0,e.position),e.velocity=o$1p.clone(o$1p.UNIT_Z,e.velocity)},Object.defineProperties(o$s.prototype,{radius:{get:function(){return this._radius},set:function(e){o$1q.typeOf.number.greaterThan("value",e,0),this._radius=e}},type:{get:function(){return"Sphere"}}}),o$s.prototype.emit=function(e){var t=e$2d.randomBetween(0,e$2d.TWO_PI),i=e$2d.randomBetween(0,e$2d.PI),n=e$2d.randomBetween(0,this._radius),r=n*Math.cos(t)*Math.sin(i),o=n*Math.sin(t)*Math.sin(i),a=n*Math.cos(i);e.position=o$1p.fromElements(r,o,a,e.position),e.velocity=o$1p.normalize(e.position,e.velocity)};var v$n=e$2d.toRadians(30);function n$j(e){this._angle=u$Z(e,v$n)}Object.defineProperties(n$j.prototype,{angle:{get:function(){return this._angle},set:function(e){o$1q.typeOf.number("value",e),this._angle=e}}}),n$j.prototype.emit=function(e){var t=Math.tan(this._angle),i=e$2d.randomBetween(0,e$2d.TWO_PI),n=e$2d.randomBetween(0,t),r=n*Math.cos(i),o=n*Math.sin(i);e.velocity=o$1p.fromElements(r,o,1,e.velocity),o$1p.normalize(e.velocity,e.velocity),e.position=o$1p.clone(o$1p.ZERO,e.position)};var I$q=new o$1o(1,1);function g$t(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.show=u$Z(e.show,!0),this.updateCallback=e.updateCallback,this.loop=u$Z(e.loop,!0),this.image=u$Z(e.image,void 0);var t=e.emitter;e$2e(t)||(t=new u$l(.5)),this._emitter=t,t.owner=this,this._bursts=e.bursts,this._modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._emitterModelMatrix=p$1d.clone(u$Z(e.emitterModelMatrix,p$1d.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new p$1d,this._startColor=e$1X.clone(u$Z(e.color,u$Z(e.startColor,e$1X.WHITE))),this._endColor=e$1X.clone(u$Z(e.color,u$Z(e.endColor,e$1X.WHITE))),this._startScale=u$Z(e.scale,u$Z(e.startScale,1)),this._endScale=u$Z(e.scale,u$Z(e.endScale,1)),this._minRotationSpeed=u$Z(e.minRotationSpeed,u$Z(e.minimumRotationSpeed,0)),this._maxRotationSpeed=u$Z(e.maxRotationSpeed,u$Z(e.maximumRotationSpeed,0)),this._emissionRate=u$Z(e.emissionRate,5),this._emissionRateByDistance=u$Z(e.emissionRate,5),this._minimumSpeed=u$Z(e.speed,u$Z(e.minimumSpeed,1)),this._maximumSpeed=u$Z(e.speed,u$Z(e.maximumSpeed,1)),this._minimumParticleLife=u$Z(e.particleLife,u$Z(e.minimumParticleLife,5)),this._maximumParticleLife=u$Z(e.particleLife,u$Z(e.maximumParticleLife,5)),this._minimumMass=u$Z(e.mass,u$Z(e.minimumMass,1)),this._maximumMass=u$Z(e.mass,u$Z(e.maximumMass,1)),this._minimumImageSize=o$1o.clone(u$Z(e.imageSize,u$Z(e.minimumImageSize,I$q))),this._maximumImageSize=o$1o.clone(u$Z(e.imageSize,u$Z(e.maximumImageSize,I$q))),this._lifetime=u$Z(e.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new o$1h,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0,this._sizeInMeters=u$Z(e.sizeInMeters,u$Z(e.sizeInMeters,!1)),this._boundingSphere=new i$1d(o$1p.ZERO,100),this.lodRangeScale=1,this._performance=u$Z(e.performance,!0),this._type=u$Z(e.type,v$o.FIRE)}function W$m(e){var t=e._emissionRate,i=e._maximumParticleLife,n=0,r=e._bursts;if(e$2e(r))for(var o=r.length,a=0;a<o;++a)n+=r[a].maximum;var s=e._billboardCollection,l=e.image,u=Math.ceil(t*i+n),c=e._particles,h=e._particlePool,d=e._emitter;e$2e(d.areaFactor)&&(u=Math.min(u,d.areaFactor));for(var f=Math.max(u-c.length-h.length,0),p=0;p<f;++p){var _=new a$k;_._billboard=s.add({image:l,sizeInMeters:e._sizeInMeters}),h.push(_)}e._particleEstimate=u}function j$l(e){var t=e._particlePool.pop();return e$2e(t)||(t=new a$k),t}function H$s(e,t){e._particlePool.push(t)}function Y$f(e){for(var t=e._particles,i=e._particlePool,n=e._billboardCollection,r=(t.length,i.length),o=e._particleEstimate,a=o;a<r;++a){var s=i[a];!e$2e(s)||n.remove(s._billboard)}i.length=o}function J$e(e){e$2e(e._billboard)&&(e._billboard.show=!1)}function w$l(e,t){var i=t._billboard;e$2e(i)||(i=t._billboard=e._billboardCollection.add({image:t.image,sizeInMeters:e._sizeInMeters})),i.width=t.imageSize.x,i.height=t.imageSize.y,i.position=t.position,i.show=!0;var n=e$2d.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),r=e$2d.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),o=e$2d.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),a=e$2d.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);i.color=new e$1X(n,r,o,a),i.scale=e$2d.lerp(t.startScale,t.endScale,t.normalizedAge),i.rotation=t.age*t.rotationSpeed}function X$e(e,t){t.startColor=e$1X.clone(e._startColor,t.startColor),t.endColor=e$1X.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=e$2d.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=e$2d.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=e$2d.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=e$2d.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t.rotationSpeed=e$2d.randomBetween(e._minRotationSpeed,e._maxRotationSpeed),t._normalizedAge=0,t._age=0;var i=e$2d.randomBetween(e._minimumSpeed,e._maximumSpeed);o$1p.multiplyByScalar(t.velocity,i,t.velocity),e._particles.push(t)}function K$f(e,t){if(e._isComplete)return 0;var i=(t=e$2d.mod(t,e._lifetime))*e._emissionRateByDistance,n=Math.floor(i);if(e._carryOver+=i-n,e._carryOver>1&&(n++,e._carryOver-=1),e$2e(e.bursts))for(var r=e.bursts.length,o=0;o<r;o++){var a=e.bursts[o],s=e._currentTime;e$2e(a)&&!a._complete&&s>a.time&&(n+=e$2d.randomBetween(a.minimum,a.maximum),a._complete=!0)}return n}Object.defineProperties(g$t.prototype,{emitter:{get:function(){return this._emitter},set:function(e){o$1q.defined("value",e),this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){o$1q.defined("value",e),this._matrixDirty=this._matrixDirty||!p$1d.equals(this._modelMatrix,e),p$1d.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){o$1q.defined("value",e),this._matrixDirty=this._matrixDirty||!p$1d.equals(this._emitterModelMatrix,e),p$1d.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){o$1q.defined("value",e),e$1X.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){o$1q.defined("value",e),e$1X.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumSpeed=e}},minimumRotationSpeed:{get:function(){return this._minRotationSpeed},set:function(e){this._minRotationSpeed=e}},maximumRotationSpeed:{get:function(){return this._maxRotationSpeed},set:function(e){this._maxRotationSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){o$1q.typeOf.object("value",e),o$1q.typeOf.number.greaterThanOrEquals("value.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){o$1q.typeOf.object("value",e),o$1q.typeOf.number.greaterThanOrEquals("value.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._maximumImageSize=e}},lifetime:{get:function(){return this._lifetime},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._lifetime=e}},type:{get:function(){return this._ParticleSystemType},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("value",e,0),this._ParticleSystemType=e,this.setParticleType(e)}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});var Z$i=new i$1d,P$m=new p$1d;function G$n(e,t){if(e$2e(e._emitter)&&"Polygon"==e._emitter.type)e._boundingSphere=e._emitter.boundingSphere;else{var i=e._maxVelocity*e._maximumParticleLife;P$m=p$1d.multiply(e.modelMatrix,e.emitterModelMatrix,P$m),i$1d.transform(Z$i,P$m,e._boundingSphere),e._boundingSphere.radius=i+10+e._emitter.radius}t.mode===C$14.COLUMBUS_VIEW&&s$R.computeActualWgs84Position(t,e._boundingSphere.center,e._boundingSphere.center)}function Q$j(e,t){var i=t.camera.positionWC,n=o$1p.distance(i,e._boundingSphere.center)-e._boundingSphere.radius,r=0;n>1e3*e.lodRangeScale?r=0:n>200*e.lodRangeScale?(r=e._emissionRate/8,r=Math.max(2,r)):n>50*e.lodRangeScale?(r=e._emissionRate/2,r=Math.max(2,r)):r=e._emissionRate,e$2e(e._emitter.areaFactor)&&(r=Math.min(e._emitter.areaFactor,r)),e._emissionRateByDistance=r}var C$n=new o$1p;g$t.prototype.setParticleType=function(e){switch(e){case v$o.FIRE:this._emitter=new n$j(e$2d.toRadians(45)),this._emissionRate=150,this._particleSize=2,this._minimumParticleLife=1.5,this._maximumParticleLife=1.8,this._minimumSpeed=7,this._maximumSpeed=9,this._startScale=3,this._endScale=1.5,this._startColor=new e$1X(1,1,1,1),this._endColor=new e$1X(1,0,0,0),this._lifeTime=6,this._sizeInMeters=!0,this._performance=!0;break;case v$o.FOUNTAIN:this._emitter=new o$1o(1,1),this._emissionRate=40,this._particleSize=1,this._minimumParticleLife=6,this._maximumParticleLife=7,this._minimumSpeed=10,this._maximumSpeed=10,this._startScale=1,this._endScale=30,this._startColor=new e$1X(1,1,1,.6),this._endColor=new e$1X(.8,.86,1,.4),this._lifeTime=16,this._sizeInMeters=!0,this._performance=!0;break;case v$o.RAIN:this._emitter=new o$s(5e3),this._emissionRate=8e3,this._particleSize=30,this._minimumParticleLife=6,this._maximumParticleLife=6,this._minimumSpeed=0,this._maximumSpeed=0,this._startScale=1,this._endScale=1,this._startColor=new e$1X(1,1,1,.8),this._endColor=new e$1X(1,1,1,.8),this._lifeTime=10,this._sizeInMeters=!0,this._performance=!1}},g$t.prototype.update=function(e){if(LicenseChecker.LICENSECHECKER.verify("ParticleSystem"),this.show){e$2e(this._billboardCollection)||(this._billboardCollection=new w$O({particleSystem:this._performance,ignoreShow:!0})),this._updateParticlePool&&(W$m(this),this._updateParticlePool=!1);var t=e.cullingVolume;if(G$n(this,e),t.computeVisibility(this._boundingSphere)!=Ae$w.OUTSIDE){Q$j(this,e);var i=0;this._previousTime&&(i=a$15.secondsDifference(e.time,this._previousTime)),i<0&&(i=0),this._maxVelocity=0;var n,r,o=this._particles,a=this._emitter,s=this.updateCallback,l=o.length;for(n=0;n<l;++n)(r=o[n]).update(i,s)?(w$l(this,r),this._maxVelocity=Math.max(this._maxVelocity,o$1p.magnitude(r.velocity))):(J$e(r),H$s(this,r),o[n]=o[l-1],--n,--l);o.length=l;var u=K$f(this,i);if(u>0&&e$2e(a)){this._matrixDirty&&(this._combinedMatrix=p$1d.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);var c=this._combinedMatrix;for(n=0;n<u;n++)r=j$l(this),this._emitter.emit(r),"Polygon"!==this._emitter.type&&(o$1p.add(r.position,r.velocity,C$n),p$1d.multiplyByPoint(c,C$n,C$n),r.position=p$1d.multiplyByPoint(c,r.position,r.position),o$1p.subtract(C$n,r.position,r.velocity),o$1p.normalize(r.velocity,r.velocity)),X$e(this,r),w$l(this,r)}if(this._billboardCollection.update(e),this._previousTime=a$15.clone(e.time,this._previousTime),this._currentTime+=i,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=e$2d.mod(this._currentTime,this._lifetime),this.bursts){var h=this.bursts.length;for(n=0;n<h;n++)this.bursts[n]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%60==0&&Y$f(this)}}},g$t.prototype.isDestroyed=function(){return!1},g$t.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),i$11(this)};var y$m=new o$1p(1,1,1);function a$j(e){e=u$Z(e,y$m),o$1q.defined("dimensions",e),o$1q.typeOf.number.greaterThanOrEquals("dimensions.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.y",e.y,0),o$1q.typeOf.number.greaterThanOrEquals("dimensions.z",e.z,0),this._dimensions=o$1p.clone(e)}Object.defineProperties(a$j.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){o$1q.defined("value",e),o$1q.typeOf.number.greaterThanOrEquals("value.x",e.x,0),o$1q.typeOf.number.greaterThanOrEquals("value.y",e.y,0),o$1q.typeOf.number.greaterThanOrEquals("value.z",e.z,0),o$1p.clone(e,this._dimensions)}}});var l$m=new o$1p;a$j.prototype.emit=function(e){var t=this._dimensions,i=o$1p.multiplyByScalar(t,.5,l$m),n=e$2d.randomBetween(-i.x,i.x),r=e$2d.randomBetween(-i.y,i.y),o=e$2d.randomBetween(-i.z,i.z);e.position=o$1p.fromElements(n,r,o,e.position),e.velocity=o$1p.normalize(e.position,e.velocity)};var _0x4cf6a0=(_0x2fa005=!0,function(e,t){var i=_0x2fa005?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2fa005=!1,i}),_0x3ead26=_0x4cf6a0(void 0,(function(){return _0x3ead26.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ead26).search("(((.+)+)+)+$")})),_0x2fa005;_0x3ead26();var _0x17cdca=function(e){e=e||{},this._scene=e.scene,this._name=e.name,this._layerConfigs=new e$1Q,this._s3mLayers=new e$1Q,this._s3mURLs=[],this._associatedFieldName=void 0,this._resetVisible=!1,this._associatedLayerIds=[],this._visible=u$Z(e.isVisible,!0)};Object.defineProperties(_0x17cdca.prototype,{size:{get:function(){return this._s3mLayers.length}},associatedField:{get:function(){return this._associatedFieldName},set:function(e){this._associatedFieldName=e}},visible:{get:function(){return this._visible},set:function(e){for(var t in this._visible=e,this._s3mLayers._hash){this._s3mLayers.get(t).visible=e}}}}),_0x17cdca.prototype.getLayer=function(e){return this._s3mLayers._array[e]},_0x17cdca.prototype.getSubLayer=function(e){var t,i=o$1l.defer();if(!e$2e(e))throw new t$15("name is required.");for(var n in this._layerConfigs._hash){var r=this._layerConfigs.get(n);if(r.name===e){if(r.ready){t=this._s3mLayers.get(n);break}t=this._scene.addS3MTilesLayerByScp(n+"?t=1",r,r.index,!0),r.ready=!0;break}}return e$2e(t)?o$1l(t,(function(e){i.resolve(e)})):i.resolve(),i.promise},_0x17cdca.prototype.findByIndex=function(e){if(!e$2e(e))throw new t$15("index is required.");if(e>this._s3mLayers.length-1)throw new t$15("index is out of bounds.");return this._s3mLayers._array[e]},_0x17cdca.prototype.releaseSelection=function(){},_0x17cdca.prototype.remove=function(e,t){if(t=u$Z(t,!0),!e$2e(e))return!1;var i,n;for(var r in this._s3mLayers._hash){var o=this._s3mLayers.get(r);if(o.name===e){i=r,n=o;break}}return e$2e(i)?(this._s3mLayers.remove(i),t&&n.destroy(),!0):void 0};var _0x5cca05=.25,_0x1dc156=64,_0x408686=2,_0x4e8d8f=6378137,_0x4cce6f=2*_0x4e8d8f*Math.PI*_0x5cca05/(_0x1dc156*_0x408686),_0x22d963=2;function _0x2591c7(e,t,i){return _0x4cce6f/(1<<t)*e.context.drawingBufferHeight/(i*e.camera.frustum.sseDenominator)}_0x17cdca.prototype.setSelection=function(e,t,i,n){for(var r=!1,o=this._s3mURLs.length-1;o>=0;o--)if(e$2e(this._s3mURLs[o])){var a=this._s3mLayers.get(this._s3mURLs[o]);!e$2e(a)||(a.id===i&&a.selectEnabled&&a.name===n?(a.setSelection(e,t),r=!0):a.releaseSelection())}return r},_0x17cdca.prototype.releaseSelection=function(){for(var e=this._s3mURLs.length-1;e>=0;e--)if(e$2e(this._s3mURLs[e])){var t=this._s3mLayers.get(this._s3mURLs[e]);!e$2e(t)||t.releaseSelection()}},_0x17cdca.prototype.getSelection=function(){for(var e=[],t=this._s3mURLs.length-1;t>=0;t--)if(e$2e(this._s3mURLs[t])){var i=this._s3mLayers.get(this._s3mURLs[t]);!e$2e(i)||(e=e.concat(i.getSelection()))}return e},_0x17cdca.prototype.update=function(e,t,i,n){var r=this,o=this._layerConfigs;for(var a in o._hash)!function(a){var s=o.get(a),l=t.camera.positionWC,u=i$1d.fromRectangle3D(s.layerBounds),c=o$1p.distance(u.center,l);c>u.radius&&(c-=u.radius);for(var h=Math.max(s.layerBounds.width,s.layerBounds.height),d=0,f=Math.PI;f>h;)f*=.5,d++;var p=_0x2591c7(t,d-=1,c)<_0x22d963;if(s.ready){var _=r._s3mLayers.get(a);if(!e$2e(_))return;p?(e$2e(_._flattenTexture)||e$2e(_._excavationTexture)?_.refresh():(r.remove(_._name,!0),s.ready=!1),r._resetVisible=!0):_.update(e,t,i,n)}else{if(!p)r._scene.addS3MTilesLayerByScp(a+"?t=1",s,s.index,!0).then((function(o){if(e$2e(o)){if(o.visible=r.visible,r._s3mLayers.set(a,o),e$2e(r._associatedFieldName)&&("attribute"===o._attributeExtentName?(o._queryFieldNames=[r._associatedFieldName],o._layerScheduler._indexedDBSetting.isAttributesSave=!0):o._layerScheduler._downloadAttributes(),o._layerScheduler._associatedFieldName=r._associatedFieldName),r._associatedLayerIds.length>0){for(var s=void 0,l=0;l<r._associatedLayerIds.length;l++)if(e$2e(s=r._associatedLayerIds[l].fineLayer)&&s===o.name){o._layerScheduler._isFineLayer=!0;break}o._layerScheduler._isFineLayer=!0}o.update(e,t,i,n)}})),s.ready=!0}}(a)},_0x17cdca.prototype.render=function(e,t){for(var i=void 0,n={},r={},o=this._s3mURLs.length-1;o>=0;o--)if(e$2e(this._s3mURLs[o])){var a=this._s3mLayers.get(this._s3mURLs[o]);if(e$2e(a)){if(this._resetVisible){var s=[];for(var l in a._layerScheduler._attributes){e$2e(n[a._layerScheduler._attributes[l][this._associatedFieldName]])&&s.push(l)}if(a.setObjsVisible(s,!1),this._associatedLayerIds.length>0){var u,c=void 0;for(u=0;u<this._associatedLayerIds.length&&(!e$2e(c=this._associatedLayerIds[u].coarseLayer)||c!==a.name);u++)c=void 0;if(e$2e(c)){var h=[];for(var l in r){var d=this._associatedLayerIds[u].idMapping[l];e$2e(d)&&h.push(d)}a.setObjsVisible(h,!1)}}this._resetVisible=!1}if(a._fileType===p$T.OSGBFile&&e$2e(this._associatedFieldName)&&e$2e(i)){var f=e$2d.toDegrees(i.east),p=e$2d.toDegrees(i.north),_=e$2d.toDegrees(i.south),m=e$2d.toDegrees(i.west),g=[m,p,0,f,p,0,f,_,0,m,_,0,m,p,0];a.addFlattenRegion({position:g,name:"flatten"})}if(a.render(e,t),i=a._layerBounds,a._layerScheduler._objectIdChange){for(var x in a._layerScheduler._entityObjectId){var y=a._layerScheduler._entityObjectId[x];for(var l in y)n[y[l]]=l}for(var x in a._layerScheduler._entityModelId){y=a._layerScheduler._entityModelId[x];for(var l in y)r[l]=l}this._resetVisible=!0,a._layerScheduler._objectIdChange=!1}}}},_0x17cdca.prototype.destroy=function(){for(var e=this._s3mURLs.length-1;e>=0;e--)if(e$2e(this._s3mURLs[e])){var t=this._s3mLayers.get(this._s3mURLs[e]);e$2e(t)&&t.destroy()}return i$11(this)};const g$s=1048576;var u$k=function(){this._layers=new e$1Q,this._layerQueue=[],this._layerIndex=3,this._selectedLayer=void 0,this._clampLayerIndex=Number.MAX_VALUE,this._allTextOverlap=[],this._s3mLayerAddedIndex=0,this._processingTiles=[],this._replacementList=new h$Q,this._replacementSentinel=this._replacementList.add(),this._maxMemory=2048,this._maxMemoryInBytes=this._maxMemory*g$s,this._cacheBytes=this._maxMemory*g$s};Object.defineProperties(u$k.prototype,{layerQueue:{get:function(){return this._layerQueue}}}),u$k.prototype._setCacheMemory=function(e){this._cacheBytes=e*g$s},u$k.prototype._setMaxMemory=function(e){this._maxMemory=e,this._maxMemoryInBytes=this._maxMemory*g$s};var N$g=function(e,t){return e.priority-t.priority},E$p=function(e,t){return e._disFromCamera-t._disFromCamera};function G$m(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];i._adjustedLodRangeScale=Math.min(1.02*i._adjustedLodRangeScale,1e4)}}function k$k(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];i._adjustedLodRangeScale=Math.max(i._adjustedLodRangeScale/1.02,i._lodRangeScale)}}function b$u(e,t,i){if((t=e$2d.clamp(t,0,e.length-1))===(i=e$2d.clamp(i,0,e.length-1)))return!1;var n=e[t];return e[t]=e[i],e[i]=n,!0}u$k.prototype._processTiles=function(e){const t=e.context;e.processingTiles.sort(E$p);const i=this._maxMemoryInBytes,n=i+.5*i,r=e.processingTiles;let o=!1;for(let t=0,i=r.length;t<i;t++){const i=r[t];o=i.transformResource(e,i.layer,n)}const a=this._layerQueue;t.memorySize<i?k$k(a):o&&r.length>0&&G$m(a),this._processingTiles.length=0},u$k.prototype.update=function(e,t,i,n){this._frameState=t,_0x1451be.update(e);var r=this._layerQueue,o=this._layerQueue.length;this._replacementList.splice(this._replacementList.tail,this._replacementSentinel),t.replacementList=this._replacementList,t.processingTiles=this._processingTiles;var a=0,s=[];for(a=0;a<o;a++){var l=r[a];if(e$2e(l)){if(t.multiViewportIndex>-1)if(!l.getVisibleInViewport(t.multiViewportIndex))continue;if(e$2e(n)&&!0===n){if(l._fileType!=p$T.ClampGroundRealtimeRasterCache){if(t.multiViewportIndex>-1&&!l.getVisibleInViewport(t.multiViewportIndex))continue;continue}s.push(l.id)}else if(l._fileType===p$T.ClampGroundRealtimeRasterCache)continue;var u=t._fboState.frameBufferType;if(u==Qe$c.NORMAL_AND_DEPTH){if(!e$2e(l._wireFrameType)||!l.isSilhouette())continue}else if(u==Qe$c.POSTEFFECT_FILTER){if(!e$2e(l.bloomEnable)||!l.bloomEnable)continue}else if(!(u!=Qe$c.CLAMP||e$2e(l._section)&&l._section))continue;l.update(e,t,i)}}ti$4.update(e.memorySize),t.requests.sort(N$g);for(var c=performance.now(),h=(a=0,t.requests.length);a<h;a++){var d=t.requests[a];if(d.owner.loadEntity(d.entity),performance.now()-c>5)break}return t.requests.length=0,this._processTiles(t),s},u$k.prototype.updateTextVisible=function(e,t){var i=this._layerQueue.length;if(0!==i){for(var n=0;n<i;n++){var r=this._layerQueue[n];r._fileType!==p$T.Text&&r._fileType!==p$T.IconPoint&&r._fileType!==p$T.OSGBCacheFile||_0x21df38.addPotentialVisibiltyChangedLayer(r.name)}var o=t.camera._scene.overlapDisplayOptions,a=o&&o.allowIconWithTextDisplay,s=t.camera._scene._overlapDisplayedThreshold;_0x21df38.meetVisible(this._allTextOverlap,s,a),_0x21df38.setVisibiltyChangedToLayer(this,a),_0x21df38.resetVisibleChangedQueue(),this._allTextOverlap=[]}},u$k.prototype._freeResource=function(e){for(var t=e.context,i=this._replacementList.head,n=this._cacheBytes;i!==this._replacementSentinel&&t.memorySize>n;){var r=i.item,o=r.layer;if(i=i.next,this._replacementList.remove(r._replacementNode),r._isRootTile&&o.residentRootTile)r._replacementNode=null;else{var a={geoSize:0,texSize:0};r.memoryUsageEx(a),ti$4._memGeometryRemoved(a.geoSize),r.destroy(e,!1)}}},u$k.prototype.endFrame=function(e){if(Se$e.GetUnusedSize()>0&&Se$e.DeleteUnusedTextures(),e.lightSource.hasChange()){var t=e.lightSource._changedLightList._hash;this.lightSourceChanged(t),e.lightSource.resetChange()}for(var i=this._layerQueue,n=this._layerQueue.length,r=performance.now(),o=0;o<n;o++){var a=i[o];if(a._isS3MBlock&&a._context._subTextureManager&&a._context._subTextureManager.processRequests(a),performance.now()-r>5)break}_0x29d1c7.processTasks(),e.passes.offscreen||this._freeResource(e)},u$k.prototype.render=function(e,t){var i=this._layerQueue,n=this._layerQueue.length,r=0;for(r=0;r<n;r++){var o=i[r];if(e$2e(o)){if(t.multiViewportIndex>-1)if(!o.getVisibleInViewport(t.multiViewportIndex))continue;o.render(e,t)}}},u$k.prototype._setSelection=function(e){var t=e.primitive.id,i=e.id,n=e.skeletonId,r=this._layerQueue,o=this._layerQueue.length,a=0,s=void 0;for(a=0;a<o;a++){var l=r[a];l instanceof _0x17cdca?l.setSelection(i,n,t,e.primitive.name)&&(s=l):l.id===t&&l.selectEnabled?(l.setSelection(i,n),s=l):l.releaseSelection()}s instanceof _0x17cdca||this.setSelectedLayer(s)},u$k.prototype.releaseSelection=function(){var e=this._layerQueue,t=this._layerQueue.length,i=0;for(i=0;i<t;i++){var n=e[i];!e$2e(n)||n.releaseSelection()}this.setSelectedLayer(void 0)},u$k.prototype.find=function(e){if(!e$2e(e))throw new t$15("name is required.");var t=this._layers.get(e);if(!e$2e(t))for(var i=this._layerQueue,n=this._layerQueue.length,r=0;r<n;r++){var o=i[r];if(o instanceof _0x17cdca)for(var a=i[r],s=0;s<a._s3mLayers._array.length;s++)if((o=a._s3mLayers._array[s]).name===e){t=o;break}}return t},u$k.prototype.findByIndex=function(e){if(!e$2e(e))throw new t$15("index is required.");if(e>this._layerQueue.length-1)throw new t$15("index is out of bounds.");return this._layerQueue[e]},u$k.prototype.add=function(e,t){if(!e$2e(e))throw new t$15("layer is required.");var i=e._name;if(!e$2e(i)||""==i)throw new t$15("name is required.");var n=this._layers;if(n.contains(i))throw new RuntimeError("An layer with name "+i+" already exists in this Scene.");e._id=this._layerIndex++;var r=this._layerQueue.length;n.set(i,e),t=u$Z(t,r),e.index=t,this._layerQueue.push(e),this._layerQueue.sort((function(e,t){return e.index-t.index})),e._fileType===p$T.ClampObjectPolygon?this._clampLayerIndex=t:t>this._clampLayerIndex&&(e.receiveObjectClamp=!1)},u$k.prototype.remove=function(e,t){if(t=u$Z(t,!0),!e$2e(e))return!1;var i=this.find(e);return!!i&&(!!this._layers.remove(e)&&(this._layerQueue.splice(this._layerQueue.indexOf(i),1),i._fileType===p$T.ClampGroundRealtimeRasterCache&&i.refreshRaster(),t&&i.destroy(),i._fileType===p$T.ClampObjectPolygon&&(this._clampLayerIndex=Number.MAX_VALUE),this._selectedLayer===i&&(this._selectedLayer=void 0),this._s3mLayerAddedIndex--,!0))},u$k.prototype.removeAll=function(e){if(e=u$Z(e,!0),this._replacementList.splice(this._replacementList.tail,this._replacementSentinel),e){var t=this._layerQueue,i=this._layerQueue.length,n=0;for(n=0;n<i;n++){var r=t[n];!e$2e(r)||r.destroy()}}this._layers.removeAll(),this._layerQueue.length=0,this._clampLayerIndex=Number.MAX_VALUE,this._selectedLayer=void 0,this._s3mLayerAddedIndex=0,e$2e(this._frameState)&&this._freeResource(this._frameState)},u$k.prototype.pickFeatures=function(e,t){var i,n=t._context,r=n.pixels,o=e$1X.byteToRgba(r[0],r[1],r[2],r[3]),a=n.getObjectByPickId(o);if(e$2e(a)&&e$2e(a.primitive)&&a.primitive instanceof _0x1a71e8){var s=a.id;if(!e$2e((i=a.primitive).queryParameter)||!i.selectEnabled)return;var l=i.queryParameter,u=l.url+"/datasources/{datasourceName}/datasets/{datasetName}/features/{id}.jsonp?hasGeometry={hasGeometry}";if(e$2e(l.dataSetName))return u=u.replace("{datasourceName}",l.dataSourceName).replace("{datasetName}",l.dataSetName).replace("{id}",s).replace("{hasGeometry}",l.hasGeometry),e$2e(a$O.CREDENTIAL)&&(u=a$O.addToken(u)),d$V(u);if(1==l.isMerge&&e$2e(l.datasetList)){for(var c,h=0,d=l.datasetList.length;h<d;h++){var f=l.datasetList[h];if(s>=f.startID&&s<=f.endID){s=s-f.startID+1,c=f.datasetName;break}}if(e$2e(c))return u=u.replace("{datasourceName}",l.dataSourceName).replace("{datasetName}",c).replace("{id}",s).replace("{hasGeometry}",l.hasGeometry),e$2e(a$O.CREDENTIAL)&&(u=a$O.addToken(u)),d$V(u)}}},u$k.prototype.raise=function(e){if(e$2e(e)){var t=e.index;if(b$u(this._layerQueue,t,t+1)&&(e.index+=1),e._fileType===p$T.ClampGroundRealtimeRasterCache)for(var i=0;i<this._layerQueue.length;i++)this._layerQueue[i]._fileType===p$T.ClampGroundRealtimeRasterCache&&this._layerQueue[i]._layerScheduler.refreshRaster(this._layerQueue[i]._frameState)}},u$k.prototype.lower=function(e){if(e$2e(e)){var t=e.index;if(b$u(this._layerQueue,t,t-1)&&(e.index-=1),e._fileType===p$T.ClampGroundRealtimeRasterCache)for(var i=0;i<this._layerQueue.length;i++)this._layerQueue[i]._fileType===p$T.ClampGroundRealtimeRasterCache&&this._layerQueue[i]._layerScheduler.refreshRaster(this._layerQueue[i]._frameState)}},u$k.prototype.lowerToBottom=function(e){if(e$2e(e)){var t=e.index;this._layerQueue.splice(t,1),this._layerQueue.unshift(e),e.index=0;for(let i=1;i<=t;i++){(e=this._layers.get(this._layerQueue[i].name)).index+=1}}},u$k.prototype.raiseToTop=function(e){if(e$2e(e)){var t=e.index;this._layerQueue.splice(t,1),this._layerQueue.push(e),e.index=this._layerQueue.length-1;for(let i=t;i<this._layerQueue.length-1;i++){(e=this._layers.get(this._layerQueue[i].name)).index-=1}}},u$k.prototype.setSelectedLayer=function(e){this._selectedLayer=e},u$k.prototype.getSelectedLayer=function(){if(!e$2e(this._selectedLayer)||!this._selectedLayer.isDestroyed())return this._selectedLayer},u$k.prototype.lightSourceChanged=function(e){for(var t=0,i=this._layerQueue.length;t<i;t++)this._layerQueue[t]instanceof _0x1a71e8&&this._layerQueue[t].lightSourceChanged(e)},u$k.prototype.saveLocalCache=function(){for(var e=[],t=0,i=this._layerQueue.length;t<i;t++)this._layerQueue[t]instanceof _0x1a71e8&&this._layerQueue[t]._layerScheduler.saveLocalCache(e);if(e.length>0){var n={nameArray:e};_0x29d1c7.indexTaskProcessor.scheduleTask(n,[])}};var _0x1fc853=(_0x51b9ab=!0,function(e,t){var i=_0x51b9ab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51b9ab=!1,i}),_0x1e5a68=_0x1fc853(void 0,(function(){return _0x1e5a68.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e5a68).search("(((.+)+)+)+$")})),_0x51b9ab;_0x1e5a68();var WebGLPlot$e=window.WebGLPlot=window.WebGLPlot||{};function _0xdbf888(){}WebGLPlot$e.defaultValue=u$Z,WebGLPlot$e.defined=e$2e,WebGLPlot$e.Cartesian2=o$1o,WebGLPlot$e.Cartesian3=o$1p,WebGLPlot$e.WallGeometry=E$G,WebGLPlot$e.GeometryInstance=d$1o,WebGLPlot$e.PolylineVolumeGeometry=N$A,WebGLPlot$e.GroundPolylineGeometry=aa$5,WebGLPlot$e.PolylineGeometry=R$A,WebGLPlot$e.PolygonGeometry=U$18,WebGLPlot$e.Color=e$1X,WebGLPlot$e.ColorGeometryInstanceAttribute=o$16,WebGLPlot$e.PerInstanceColorAppearance=t$Q,WebGLPlot$e.LabelStyle=R$S,WebGLPlot$e.SceneTransforms=s$R,WebGLPlot$e.HorizontalOrigin=j$V,WebGLPlot$e.SceneMode=C$14,WebGLPlot$e.Material=r$Y,WebGLPlot$e.VertexFormat=n$13,WebGLPlot$e.CesiumMath=e$2d,WebGLPlot$e.HeadingPitchRoll=i$16,WebGLPlot$e.Ellipsoid=t$12,WebGLPlot$e.Transforms=m$19,WebGLPlot$e.EllipsoidGeodesic=E$1t,WebGLPlot$e.Cartographic=a$18,WebGLPlot$e.BillboardCollection=w$O,WebGLPlot$e.MaterialAppearance=t$v,WebGLPlot$e.LabelCollection=g$W,WebGLPlot$e.EllipsoidSurfaceAppearance=t$h,WebGLPlot$e.BoundingSphere=i$1d,WebGLPlot$e.Primitive=y$R,WebGLPlot$e.GroundPrimitive=d$15,WebGLPlot$e.RenderState=d$1m,WebGLPlot$e.PolylineCollection=J$T,WebGLPlot$e.GroundPolylinePrimitive=g$13,WebGLPlot$e.PolylineColorAppearance=e$1F,WebGLPlot$e.ClassificationType=_0x2b86ba,WebGLPlot$e.Polyline=o$14,WebGLPlot$e.Event=o$1h,WebGLPlot$e.ScreenSpaceEventHandler=g$K,WebGLPlot$e.DeveloperError=t$15,WebGLPlot$e.clone=l$1f,WebGLPlot$e.when=o$1l,WebGLPlot$e.Check=o$1q,WebGLPlot$e.Request=r$1c,WebGLPlot$e.RequestErrorEvent=s$$,WebGLPlot$e.RequestScheduler=r$1b,WebGLPlot$e.RuntimeError=t$13,WebGLPlot$e.TrustedServers=u$W,WebGLPlot$e.ScreenSpaceEventType=G$J,WebGLPlot$e.buildModuleUrl=n$17,WebGLPlot$e.IntersectionTests=g$1j,WebGLPlot$e.Ray=f$19,WebGLPlot$e.Cartographic=a$18,WebGLPlot$e.BoxOutlineGeometry=o$17,WebGLPlot$e.Matrix3=p$1e,WebGLPlot$e.Matrix4=p$1d,WebGLPlot$e.AxisAlignedBoundingBox=e$29,WebGLPlot$e.createGuid=e$1T,WebGLPlot$e.Entity=h$W,WebGLPlot$e.VerticalOrigin=S$Q,WebGLPlot$e.Model=F$B,WebGLPlot$e.PolygonHierarchy=e$1M,WebGLPlot$e.AssociativeArray=e$1Q,WebGLPlot$e.ModelUtility=s$v,WebGLPlot$e.KeyboardEventModifier=Aa$1,WebGLPlot$e.ParticleSystem=g$t,WebGLPlot$e.CircleEmitter=u$l,WebGLPlot$e.ConeEmitter=n$j,WebGLPlot$e.TranslationRotationScale=e$1_,WebGLPlot$e.BoxEmitter=a$j,WebGLPlot$e.Quaternion=n$15,WebGLPlot$e.JulianDate=a$15,WebGLPlot$e.Property=r$_,WebGLPlot$e.S3MInstanceCollection=_0xd633a7,WebGLPlot$e.arrayFill=d$1s,WebGLPlot$e.ComponentDatatype=S$14,WebGLPlot$e.Geometry=I$1p,WebGLPlot$e.GeometryAttribute=o$1c,WebGLPlot$e.GeometryAttributes=a$_,WebGLPlot$e.GeometryOffsetAttribute=_0x39c22a,WebGLPlot$e.IndexDatatype=ce$z,WebGLPlot$e.PrimitiveType=W$18,WebGLPlot$e.PolylinePipeline=m$X,WebGLPlot$e.ImageMaterialProperty=a$R,WebGLPlot$e.ColorMaterialProperty=t$P,WebGLPlot$e.ShadowMode=W$X,WebGLPlot$e.ShowGeometryInstanceAttribute=e$1I,WebGLPlot$e.DistanceDisplayCondition=r$Z,WebGLPlot$e.DistanceDisplayConditionGeometryInstanceAttribute=t$A,WebGLPlot$e.MeasureHandler=T$n,WebGLPlot$e.MeasureMode=_0x3c1870,WebGLPlot$e.DrawHandler=w$n,WebGLPlot$e.DrawMode=_0x1522bc,WebGLPlot$e.Sightline=_0x393ad5,WebGLPlot$e.ViewShed3D=_0x13f223,WebGLPlot$e.PrimitiveCollection=o$y,WebGLPlot$e.PolylineMaterialAppearance=r$X,WebGLPlot$e.ApproximateTerrainHeights=e$1H,WebGLPlot$e.destroyObject=i$11,WebGLPlot$e.OrientedBoundingBox=y$Y,WebGLPlot$e.Rectangle=h$18,WebGLPlot$e.ClassificationPrimitive=x$$,WebGLPlot$e.ShadowVolumeAppearance=y$Q,WebGLPlot$e.ColorTable=i$T,WebGLPlot$e.HypsometricSettingEnum=k$S,WebGLPlot$e.SlopeSetting=l$K,WebGLPlot$e.SlopeSettingEnum=_0x25bb47,WebGLPlot$e.CallbackProperty=n$X,WebGLPlot$e.S3MTilesLayer=_0x1a71e8,WebGLPlot$e.Layers=u$k,WebGLPlot$e.PlaneGeometry=f$L,WebGLPlot$e.ModelAnimationLoop=_0x1ea9f2,WebGLPlot$e.NearFarScalar=o$Y,WebGLPlot$e.createPropertyDescriptor=C$10,WebGLPlot$e.CatmullRomSpline=c$L,WebGLPlot$e.GeometryPipeline=k$14,WebGLPlot$e.EllipseGeometry=Y$A,WebGLPlot$e.CylinderGeometry=l$Q;var _0x4ecc1b=(_0x2d4bee=!0,function(e,t){var i=_0x2d4bee?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d4bee=!1,i}),_0x3324ee=_0x4ecc1b(void 0,(function(){return _0x3324ee.toString().search("(((.+)+)+)+$").toString().constructor(_0x3324ee).search("(((.+)+)+)+$")})),_0x2d4bee;function _0x23de81(e,t,i){this.x=WebGLPlot.defaultValue(e,0),this.y=WebGLPlot.defaultValue(t,0),this.z=WebGLPlot.defaultValue(i,0)}_0x3324ee(),_0x23de81.clone=function(e,t){if(WebGLPlot.defined(e))return WebGLPlot.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new _0x23de81(e.x,e.y,e.z)},_0x23de81.equals=function(e,t){return e===t||WebGLPlot.defined(e)&&WebGLPlot.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},_0x23de81.prototype.clone=function(e){return _0x23de81.clone(this,e)},_0x23de81.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},_0x23de81.prototype.equals=function(e){return _0x23de81.equals(this,e)};var _0xe6af61=(_0x140fe2=!0,function(e,t){var i=_0x140fe2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x140fe2=!1,i}),_0xdc194b=_0xe6af61(void 0,(function(){return _0xdc194b.toString().search("(((.+)+)+)+$").toString().constructor(_0xdc194b).search("(((.+)+)+)+$")})),_0x140fe2;_0xdc194b();var _0x46a68f={SYMBOL_UNKNOW:0,SYMBOL_DOT:1,SYMBOL_ALGO:2,SYMBOL_PICTURE:20,SYMBOL_POLYLINE:24,SYMBOL_RECTANGLE:26,SYMBOL_PARALLELOGRAM:28,SYMBOL_CIRCLE:29,SYMBOL_ELLIPSE:31,SYMBOL_ARBITRARYPOLYGON:32,SYMBOL_TEXT:34,SYMBOL_ARC:44,SYMBOL_PARALLELLINE:48,SYMBOL_TRAPEZOID:350,SYMBOL_POLYBEZIERCLOSED:360,SYMBOL_CHORD:370,SYMBOL_PIE:380,SYMBOL_KIDNEY:390,SYMBOL_BRACE:400,SYMBOL_REGULARPOLYGON:410,SYMBOL_POLYBEZIER:590,SYMBOL_RUNWAY:1013,SYMBOL_CURVEEIGHT:1014,SYMBOL_CONCENTRICCIRCLE:1019,SYMBOL_COMBINATIONALCIRCLE:1022,SYMBOL_NODECHAIN:1025,GROUPOBJECT:1e3,SYMBOL_CIRCLECHORD:3701,SYMBOL_CIRCLEPIE:3801,SYMBOL_CIRCLEARC:4401,SYMBOL_Model:99999,SYMBOL_POINT:99998},_0x1c668c=Object.freeze(_0x46a68f),_0x372468=(_0x5f881b=!0,function(e,t){var i=_0x5f881b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f881b=!1,i}),_0x41e2f5=_0x372468(void 0,(function(){return _0x41e2f5.toString().search("(((.+)+)+)+$").toString().constructor(_0x41e2f5).search("(((.+)+)+)+$")})),_0x5f881b;_0x41e2f5();var _0x5d7824={SURROUNDLINE_NONE:0,SURROUNDLINE_INNER:1,SURROUNDLINE_OUT:2,SURROUNDLINE_ALL:3},_0x3fcacb=Object.freeze(_0x5d7824),_0xfb5612=(_0x5a0a3c=!0,function(e,t){var i=_0x5a0a3c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a0a3c=!1,i}),_0x33e136=_0xfb5612(void 0,(function(){return _0x33e136.toString().search("(((.+)+)+)+$").toString().constructor(_0x33e136).search("(((.+)+)+)+$")})),_0x5a0a3c;_0x33e136();var _0xb4aec={None:0,Linear:1,Radial:2},_0x1e78ea=Object.freeze(_0xb4aec),_0x43e356=(_0xf656ee=!0,function(e,t){var i=_0xf656ee?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf656ee=!1,i}),_0x30a2aa=_0x43e356(void 0,(function(){return _0x30a2aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x30a2aa).search("(((.+)+)+)+$")})),_0xf656ee;_0x30a2aa();var _0x1fac5e=void 0;class _0x5ac1e1{constructor(){this._layerAdded=new WebGLPlot$e.Event,this._layerDeleted=new WebGLPlot$e.Event,this._layerActived=new WebGLPlot$e.Event,this._layerEditableChanged=new WebGLPlot$e.Event,this._layerVisibleChanged=new WebGLPlot$e.Event,this._layerSelectedChanged=new WebGLPlot$e.Event,this._symbolAdded=new WebGLPlot$e.Event,this._symbolDeleted=new WebGLPlot$e.Event,this._symbolBeforeDeleted=new WebGLPlot$e.Event,this._symbolModified=new WebGLPlot$e.Event,this._symbolUpdated=new WebGLPlot$e.Event,this._symbolDestroyed=new WebGLPlot$e.Event,this._symbolSelected=new WebGLPlot$e.Event,this._symbolUnSelected=new WebGLPlot$e.Event,this._animationCreated=new WebGLPlot$e.Event,this._animationDeleted=new WebGLPlot$e.Event,this._animationModified=new WebGLPlot$e.Event,this._animationBegined=new WebGLPlot$e.Event,this._animationFinished=new WebGLPlot$e.Event,this._animationJsonEnd=new WebGLPlot$e.Event}static getInstance(){return _0x1fac5e||(_0x1fac5e=new _0x5ac1e1),_0x1fac5e}}Object.defineProperties(_0x5ac1e1.prototype,{layerAdded:{get:function(){return this._layerAdded}},layerDeleted:{get:function(){return this._layerDeleted}},layerActived:{get:function(){return this._layerActived}},layerEditableChanged:{get:function(){return this._layerEditableChanged}},layerVisibleChanged:{get:function(){return this._layerVisibleChanged}},layerSelectedChanged:{get:function(){return this._layerSelectedChanged}},symbolAdded:{get:function(){return this._symbolAdded}},symbolBeforeDeleted:{get:function(){return this._symbolBeforeDeleted}},symbolDeleted:{get:function(){return this._symbolDeleted}},symbolModified:{get:function(){return this._symbolModified}},symbolUpdated:{get:function(){return this._symbolUpdated}},symbolDestroyed:{get:function(){return this._symbolDestroyed}},symbolSelected:{get:function(){return this._symbolSelected}},symbolUnSelected:{get:function(){return this._symbolUnSelected}},animationCreated:{get:function(){return this._animationCreated}},animationDeleted:{get:function(){return this._animationDeleted}},animationModified:{get:function(){return this._animationModified}},animationBegined:{get:function(){return this._animationBegined}},animationFinished:{get:function(){return this._animationFinished}},animationJsonEnd:{get:function(){return this._animationJsonEnd}}});var _0x162b3b=(_0x4e7356=!0,function(e,t){var i=_0x4e7356?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e7356=!1,i}),_0xc297af=_0x162b3b(void 0,(function(){return _0xc297af.toString().search("(((.+)+)+)+$").toString().constructor(_0xc297af).search("(((.+)+)+)+$")})),_0x4e7356;function _0x291171(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._graphicObject=WebGLPlot.defaultValue(e.graphicObject,void 0),this._lineColor=WebGLPlot.defaultValue(e.lineColor,new WebGLPlot.Color(1,0,0,1)),this._lineWidth=WebGLPlot.defaultValue(e.lineWidth,3),this._fillBackColor=WebGLPlot.defaultValue(e.fillBackColor,new WebGLPlot.Color(1,0,0,1)),this._fillBackOpaque=WebGLPlot.defaultValue(e.fillBackOpaque,!1),this._fillGradientAngle=WebGLPlot.defaultValue(e.fillGradientAngle,0),this._fillGradientMode=WebGLPlot.defaultValue(e.fillGradientMode,_0x1e78ea.None),this._fillGradientOffsetRatioY=WebGLPlot.defaultValue(e.fillGradientOffsetRatioY,0),this._fillGradientOffsetRatioX=WebGLPlot.defaultValue(e.fillGradientOffsetRatioX,0),this._fillForeColor=WebGLPlot.defaultValue(e.fillForeColor,new WebGLPlot.Color(1,0,0,1)),this._fillSymbolID=WebGLPlot.defaultValue(e.fillSymbolID,1),this._fillOpaqueRate=WebGLPlot.defaultValue(e.fillOpaqueRate,70),this._surroundLineColor=WebGLPlot.defaultValue(e.surroundLineColor,WebGLPlot.Color.YELLOW),this._surroundLineType=WebGLPlot.defaultValue(e.surroundLineType,0),this._surroundLineWidth=WebGLPlot.defaultValue(e.surroundLineWidth,3),this._opacity=WebGLPlot.defaultValue(e.opacity,1)}_0xc297af(),_0x291171.prototype.clone=function(){var e=new _0x291171;return e._graphicObject=this._graphicObject,e._lineColor=WebGLPlot.Color.clone(this._lineColor),e._lineWidth=JSON.parse(JSON.stringify(void 0!==this._lineWidth?this._lineWidth:3)),e._fillBackColor=WebGLPlot.Color.clone(this._fillBackColor),e._fillBackOpaque=JSON.parse(JSON.stringify(void 0!==this._fillBackOpaque&&this._fillBackOpaque)),e._fillGradientAngle=JSON.parse(JSON.stringify(void 0!==this._fillGradientAngle?this._fillGradientAngle:0)),e._fillGradientMode=JSON.parse(JSON.stringify(void 0!==this._fillGradientMode?this._fillGradientMode:_0x1e78ea.None)),e._fillGradientOffsetRatioY=JSON.parse(JSON.stringify(void 0!==this._fillGradientOffsetRatioY?this._fillGradientOffsetRatioY:0)),e._fillGradientOffsetRatioX=JSON.parse(JSON.stringify(void 0!==this._fillGradientOffsetRatioX?this._fillGradientOffsetRatioX:0)),e._fillForeColor=WebGLPlot.Color.clone(this._fillForeColor),e._fillSymbolID=JSON.parse(JSON.stringify(void 0!==this._fillSymbolID?this._fillSymbolID:1)),e._fillOpaqueRate=JSON.parse(JSON.stringify(void 0!==this._fillOpaqueRate?this._fillOpaqueRate:70)),e._surroundLineColor=WebGLPlot.Color.clone(this._surroundLineColor),e._surroundLineType=JSON.parse(JSON.stringify(void 0!==this._surroundLineType?this._surroundLineType:0)),e._surroundLineWidth=JSON.parse(JSON.stringify(void 0!==this._surroundLineWidth?this._surroundLineWidth:3)),e._opacity=JSON.parse(JSON.stringify(void 0!==this._opacity?this._opacity:1)),e},_0x291171.prototype.update=function(){this._graphicObject&&(this._graphicObject._initialize=!1,this._graphicObject._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this._graphicObject))},Object.defineProperties(_0x291171.prototype,{lineColor:{get:function(){return this._lineColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._lineColor))return;this._lineColor=e,this.update()}}},lineWidth:{get:function(){return this._lineWidth},set:function(e){e!==this._lineWidth&&(this._lineWidth=e,this._graphicObject._CorridorWidth=-1,this.update())}},fillBackColor:{get:function(){return this._fillBackColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._fillBackColor))return;this._fillBackColor=e,this.update()}}},fillForeColor:{get:function(){return this._fillForeColor},set:function(e){if(e instanceof WebGLPlot.Color){if(e.equals(this._fillForeColor))return;this._fillForeColor=e,this.update()}}},fillBackOpaque:{get:function(){return this._fillBackOpaque},set:function(e){e!==this._fillBackOpaque&&(this._fillBackOpaque=e,this.update())}},fillGradientAngle:{get:function(){return this._fillGradientAngle},set:function(e){e!==this._fillGradientAngle&&(this._fillGradientAngle=e,this.update())}},fillGradientMode:{get:function(){return this._fillGradientMode},set:function(e){e!==this._fillGradientMode&&(this._fillGradientMode=e,this.update())}},fillGradientOffsetRatioY:{get:function(){return this._fillGradientOffsetRatioY},set:function(e){e===this._fillGradientOffsetRatioY||this._fillGradientOffsetRatioY<0||this._fillGradientOffsetRatioY>100||(this._fillGradientOffsetRatioY=e,this.update())}},fillGradientOffsetRatioX:{get:function(){return this._fillGradientOffsetRatioX},set:function(e){e===this._fillGradientOffsetRatioX||this._fillGradientOffsetRatioX<0||this._fillGradientOffsetRatioX>100||(this._fillGradientOffsetRatioX=e,this.update())}},fillSymbolID:{get:function(){return this._fillSymbolID},set:function(e){e!==this._fillSymbolID&&(this._fillSymbolID=e,this.update())}},fillOpaqueRate:{get:function(){return this._fillOpaqueRate},set:function(e){e===this._fillOpaqueRate||e>100||e<0||(this._fillOpaqueRate=e,this.update())}},surroundLineWidth:{get:function(){return this._surroundLineWidth},set:function(e){e!==this._surroundLineWidth&&(this._surroundLineWidth=e,this.update())}},surroundLineColor:{get:function(){return this._surroundLineColor},set:function(e){e!==this._surroundLineColor&&(this._surroundLineColor=e,this.update())}},opacity:{get:function(){return this._opacity},set:function(e){e!==this._opacity&&(this._opacity=e,this.update())}},surroundLineType:{get:function(){return this._surroundLineType},set:function(e){e!==this._surroundLineType&&(this._surroundLineType=e,this.update())}}});var _0x2b53cd=(_0x5ab15d=!0,function(e,t){var i=_0x5ab15d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ab15d=!1,i}),_0x52e924=_0x2b53cd(void 0,(function(){return _0x52e924.toString().search("(((.+)+)+)+$").toString().constructor(_0x52e924).search("(((.+)+)+)+$")})),_0x5ab15d;function _0x40b7f2(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._graphicObject=WebGLPlot.defaultValue(e.graphicObject,void 0),this._fontHeight=WebGLPlot.defaultValue(e.fontHeight,508/96),this._foreColor=WebGLPlot.defaultValue(e.foreColor,WebGLPlot.Color.WHITE),this._backColor=WebGLPlot.defaultValue(e.backColor,new WebGLPlot.Color(1,0,0,.3)),this._outline=WebGLPlot.defaultValue(e.outline,!0),this._fontName=WebGLPlot.defaultValue(e.fontName,WebGLPlot.plotI18n("SongTi")),this._italic=WebGLPlot.defaultValue(e.italic,!1),this._bold=WebGLPlot.defaultValue(e.bold,!0),this._align=WebGLPlot.defaultValue(e.align,0),this._italicAngle=WebGLPlot.defaultValue(e.italicAngle,0),this._shadow=WebGLPlot.defaultValue(e.shadow,!1),this._sizeFixed=WebGLPlot.defaultValue(e.sizeFixed,!0),this._underline=WebGLPlot.defaultValue(e.underline,!1),this._rotation=WebGLPlot.defaultValue(e.rotation,0),this._backOpaque=WebGLPlot.defaultValue(e.backOpaque,!1),this._strikeout=WebGLPlot.defaultValue(e.strikeout,!1),this._borderSpacingWidth=WebGLPlot.defaultValue(e.borderSpacingWidth,4),this._outlineWidth=WebGLPlot.defaultValue(e.outlineWidth,1),this._fontWidth=WebGLPlot.defaultValue(e.fontWidth,0),this._opaqueRate=WebGLPlot.defaultValue(e.opaqueRate,255),this._stringAlignment=WebGLPlot.defaultValue(e.stringAlignment,0),this._text3DScale=WebGLPlot.defaultValue(e.text3DScale,1),this._fontWeight=WebGLPlot.defaultValue(e.fontWeight,0),this._fontSize=WebGLPlot.defaultValue(e.fontSize,20),this._textBoxColor=WebGLPlot.defaultValue(e.textBoxColor,new WebGLPlot.Color(1,0,0,.3)),this._textBoxLineColor=WebGLPlot.defaultValue(e.textBoxLineColor,new WebGLPlot.Color(1,0,0,.8)),this._isShowTextBox=WebGLPlot.defaultValue(e.isShowTextBox,!1)}_0x52e924(),_0x40b7f2.prototype.setTextRectColor=function(e,t){this._textBoxLineColor=WebGLPlot.Color.clone(e),this._textBoxColor=new WebGLPlot.Color(e.red,e.green,e.blue,.3),WebGLPlot.defined(t)&&t&&this.update()},_0x40b7f2.prototype.clone=function(){var e=new _0x40b7f2;return e._graphicObject=this._graphicObject,e._fontHeight=JSON.parse(JSON.stringify(void 0!==this._fontHeight?this._fontHeight:508/96)),e._foreColor=WebGLPlot.Color.clone(this._foreColor),e._backColor=WebGLPlot.Color.clone(this._backColor),e._outline=JSON.parse(JSON.stringify(void 0!==this._outline&&this._outline)),e._fontName=JSON.parse(JSON.stringify(void 0!==this._fontName?this._fontName:WebGLPlot.plotI18n("SongTi"))),e._italic=JSON.parse(JSON.stringify(void 0!==this._italic&&this._italic)),e._bold=JSON.parse(JSON.stringify(void 0===this._bold||this._bold)),e._align=JSON.parse(JSON.stringify(void 0!==this._align?this._align:0)),e._italicAngle=JSON.parse(JSON.stringify(void 0!==this._italicAngle?this._italicAngle:0)),e._shadow=JSON.parse(JSON.stringify(void 0!==this._shadow?this._shadow:0)),e._sizeFixed=JSON.parse(JSON.stringify(void 0!==this._sizeFixed&&this._sizeFixed)),e._underline=JSON.parse(JSON.stringify(void 0!==this._underline?this._underline:0)),e._rotation=JSON.parse(JSON.stringify(void 0!==this._rotation?this._rotation:0)),e._backOpaque=JSON.parse(JSON.stringify(void 0!==this._backOpaque?this._backOpaque:0)),e._strikeout=JSON.parse(JSON.stringify(void 0!==this._strikeout?this._strikeout:0)),e._borderSpacingWidth=JSON.parse(JSON.stringify(void 0!==this._borderSpacingWidth?this._borderSpacingWidth:4)),e._outlineWidth=JSON.parse(JSON.stringify(void 0!==this._outlineWidth?this._outlineWidth:1)),e._opaqueRate=JSON.parse(JSON.stringify(void 0!==this._opaqueRate?this._opaqueRate:255)),e._stringAlignment=JSON.parse(JSON.stringify(void 0!==this._stringAlignment?this._stringAlignment:0)),e._text3DScale=JSON.parse(JSON.stringify(void 0!==this._text3DScale?this._text3DScale:1)),e._fontWeight=JSON.parse(JSON.stringify(void 0!==this._fontWeight?this._fontWeight:0)),e._fontSize=JSON.parse(JSON.stringify(void 0!==this._fontSize?this._fontSize:20)),e._textBoxColor=WebGLPlot.Color.clone(this._textBoxColor),e._textBoxLineColor=WebGLPlot.Color.clone(this._textBoxLineColor),e._isShowTextBox=JSON.parse(JSON.stringify(void 0!==this._isShowTextBox&&this._isShowTextBox)),e},Object.defineProperties(_0x40b7f2.prototype,{fontHeight:{get:function(){return this._fontHeight},set:function(e){e!==this._fontHeight&&(this._fontHeight=e,this._fontSize=parseInt(96*e/25.4),this.update())}},foreColor:{get:function(){return this._foreColor},set:function(e){e===this._foreColor||!(e instanceof WebGLPlot.Color)||(this._foreColor=e,this.update())}},backColor:{get:function(){return this._backColor},set:function(e){e!==this._backColor&&(this._backColor=e,this.update())}},outline:{get:function(){return this._outline},set:function(e){e!==this._outline&&(this._outline=e,this.update())}},fontName:{get:function(){return this._fontName},set:function(e){e!==this._fontName&&(this._fontName=e,this.update())}},italic:{get:function(){return this._italic},set:function(e){e!==this._italic&&(this._italic=e,this.update())}},bold:{get:function(){return this._bold},set:function(e){e!==this._bold&&(this._bold=e,this.update())}},align:{get:function(){return this._align},set:function(e){e!==this._italic&&(this._align=e,this.update())}},italicAngle:{get:function(){return this._italicAngle},set:function(e){e!==this._italicAngle&&(this._italicAngle=e,this.update())}},shadow:{get:function(){return this._shadow},set:function(e){e!==this._shadow&&(this._shadow=e,this.update())}},sizeFixed:{get:function(){return this._sizeFixed},set:function(e){e!==this._sizeFixed&&(this._sizeFixed=e,this.update())}},underline:{get:function(){return this._underline},set:function(e){e!==this._underline&&(this._underline=e,this.update())}},backOpaque:{get:function(){return this._backOpaque},set:function(e){e!==this._backOpaque&&(this._backOpaque=e,this.update())}},strikeout:{get:function(){return this._strikeout},set:function(e){e!==this._strikeout&&(this._strikeout=e,this.update())}},borderSpacingWidth:{get:function(){return this._borderSpacingWidth},set:function(e){e!==this._borderSpacingWidth&&(this._borderSpacingWidth=e,this.update())}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){e!==this._outlineWidth&&(this._outlineWidth=e,this.update())}},fontWidth:{get:function(){return this._fontWidth},set:function(e){e!==this._fontWidth&&(this._fontWidth=e,this.update())}},opaqueRate:{get:function(){return this._opaqueRate},set:function(e){e!==this._opaqueRate&&(this._opaqueRate=e,this.update())}},stringAlignment:{get:function(){return this._stringAlignment},set:function(e){e!==this._stringAlignment&&(this._stringAlignment=e,this.update())}},text3DScale:{get:function(){return this._text3DScale},set:function(e){e!==this._text3DScale&&(this._text3DScale=e,this.update())}},fontWeight:{get:function(){return this._fontWeight},set:function(e){e!==this._fontWeight&&(this._fontWeight=e,this.update())}},fontSize:{get:function(){return this._fontSize},set:function(e){e!==this._fontSize&&(this._fontSize=e,this._fontHeight=25.4*e/96,this.update())}},textBoxColor:{get:function(){return this._textBoxColor},set:function(e){e!==this._textBoxColor&&(this._textBoxColor=e,this.update())}},textBoxLineColor:{get:function(){return this._textBoxLineColor},set:function(e){e!==this._textBoxLineColor&&(this._textBoxLineColor=e,this.update())}},isShowTextBox:{get:function(){return this._isShowTextBox},set:function(e){e!==this._isShowTextBox&&(this._isShowTextBox=e,this.update())}}}),_0x40b7f2.prototype.update=function(){this._graphicObject&&(this._graphicObject._initialize=!1,this._graphicObject._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this._graphicObject))};var _0x3eda59=(_0x19e84a=!0,function(e,t){var i=_0x19e84a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19e84a=!1,i}),_0x5056b0=_0x3eda59(void 0,(function(){return _0x5056b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x5056b0).search("(((.+)+)+)+$")})),_0x19e84a;_0x5056b0();var _0x14a86d={LeftUp:0,LeftDown:1,RightUp:2,RightDown:3,Up:4,Down:5,Left:6,Right:7,Middle:8},_0x26dfeb=Object.freeze(_0x14a86d),_0x2ef16e=(_0x1a6dac=!0,function(e,t){var i=_0x1a6dac?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1a6dac=!1,i}),_0x55761b=_0x2ef16e(void 0,(function(){return _0x55761b.toString().search("(((.+)+)+)+$").toString().constructor(_0x55761b).search("(((.+)+)+)+$")})),_0x1a6dac;_0x55761b();var _0x48a03={Vector:0,Grid:1,Marker:2,Picture:3,Unkown:4},_0x2bcc5b=Object.freeze(_0x48a03),_0x57649d=(_0x1bf94b=!0,function(e,t){var i=_0x1bf94b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1bf94b=!1,i}),_0x5328d1=_0x57649d(void 0,(function(){return _0x5328d1.toString().search("(((.+)+)+)+$").toString().constructor(_0x5328d1).search("(((.+)+)+)+$")})),_0x1bf94b;function _0x2909c1(){}_0x5328d1(),_0x2909c1.clearNextSamePts=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)&&this.equalFuzzy(e[i].z,e[i+1].z)?(e.splice(i,1),t--):i++;return e},_0x2909c1.clearNextSamePtsXY=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)?(e.splice(i,1),t--):i++;return e},_0x2909c1.clearSamePts=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)&&this.equalFuzzy(e[i].z,e[i+1].z)?(e.splice(i,1),t--):i++;return e},_0x2909c1.clearSamePtsXY=function(e){for(var t=e.length,i=0;i<t-1;)this.equalFuzzy(e[i].x,e[i+1].x)&&this.equalFuzzy(e[i].y,e[i+1].y)?(e.splice(i,1),t--):i++;return e},_0x2909c1.equalFuzzy=function(e,t,i){return WebGLPlot$e.defined(i)||(i=1e-31),Math.abs(e-t)<=i},_0x2909c1.distance=function(e,t){return WebGLPlot$e.defined(e)&&WebGLPlot$e.defined(t)?Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)):0},_0x2909c1.distance3D=function(e,t){return WebGLPlot$e.defined(e)&&WebGLPlot$e.defined(t)?Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)+(e.z-t.z)*(e.z-t.z)):0},_0x2909c1.isRight=function(e,t,i){var n=t,r=i,o=t,a=e;return(r.x-n.x)*(a.y-o.y)-(a.x-o.x)*(r.y-n.y)<0},_0x2909c1.isPloyClockwise=function(e){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),i=t.length;if(!(i<3)){var n=t[0].y*(t[i-1].x-t[1].x);t.push(t[0].clone());for(var r=1;r<i;++r)n+=t[r].y*(t[r-1].x-t[r+1].x);return!(n>0)}},_0x2909c1.parallel=function(e,t){var i=[];if(!WebGLPlot$e.defined(e)||e.length<2)return i;var n=!1;e.length>3&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y&&e[0].z===e[e.length-1].z&&(n=!0),n?(i[0]=this.findBisectorPoint(e[e.length-2],e[0],e[1],t),i[e.length-1]=i[0]):(i[0]=this.findPoint(e[0],e[1],t,90),i[e.length-1]=this.findPoint(e[e.length-1],e[e.length-2],-t,90));for(var r=e[0],o=e[1],a=e[1],s=1;s<e.length-1;++s)if(o=e[s],e[s]!==e[s-1]&&(r=e[s-1]),e[s]!==e[s+1]){a=e[s+1];var l=this.findBisectorPoint(r,o,a,t);this.isCross(r,i[s-1],o,l)&&(l=i[s-1]),i[s]=l}return i},_0x2909c1.isCross=function(e,t,i,n){var r=new _0x23de81(0,0,0);return!(!this.intersectLineSegs(e,t,i,n,r)||r===e||r===t||r===i||r===n)},_0x2909c1.intersectLineSegs=function(e,t,i,n,r){if(this.equalFuzzy(e.x,t.x)&&this.equalFuzzy(e.y,t.y)&&this.equalFuzzy(e.z,t.z))return r.x=e.x,r.y=e.y,!1;if(this.equalFuzzy(i.x,n.x)&&this.equalFuzzy(i.y,n.y)&&this.equalFuzzy(i.z,n.z))return r.x=i.x,r.y=i.y,!1;var o=1e-16,a=0,s=0;if(a=e.x>t.x?e.x:t.x,s=e.x<t.x?e.x:t.x,i.x-a>o&&n.x-a>o||i.x-s<-1e-16&&n.x-s<-1e-16||(a=e.y>t.y?e.y:t.y,s=e.y<t.y?e.y:t.y,i.y-a>o&&n.y-a>o||i.y-s<-1e-16&&n.y-s<-1e-16))return!1;var l=t.x-e.x,u=t.y-e.y,c=n.x-i.x,h=n.y-i.y,d=e.x-i.x,f=e.y-i.y,p=l*h-c*u,_=p;if(Math.abs(l)>1e-31&&Math.abs(c)>1e-31&&(_/=l*c),Math.abs(_)<1e-31)return e===i?(r.x=e.x,r.y=e.y,!this.isSameQuadrant(e,t,i,n)):t===n?(r.x=t.x,r.y=t.y,!this.isSameQuadrant(e,t,i,n)):e===n?(r.x=e.x,r.y=e.y,this.isSameQuadrant(e,t,i,n)):t===i&&(r.x=t.x,r.y=t.y,this.isSameQuadrant(e,t,i,n));var m=(l*f-u*d)/p,g=(c*f-h*d)/p;return!(m<0&&(Math.abs(m*c)>o||Math.abs(m*h)>o)||m>1&&(Math.abs((m-1)*c)>o||Math.abs((m-1)*h)>o)||g<0&&(Math.abs(g*l)>o||Math.abs(g*u)>o)||g>1&&(Math.abs((g-1)*l)>o||Math.abs((g-1)*u)>o))&&(Math.abs(m)<1e-31?(r.x=i.x,r.y=i.y,!0):Math.abs(m-1)<1e-31?(r.x=n.x,r.y=n.y,!0):Math.abs(g)<1e-31?(r.x=e.x,r.y=e.y,!0):Math.abs(g-1)<1e-31?(r.x=t.x,r.y=t.y,!0):!(m<0&&(Math.abs(m*c)>o||Math.abs(m*h)>o)||m>1&&(Math.abs((m-1)*c)>o||Math.abs((m-1)*h)>o)||g<0&&(Math.abs(g*l)>o||Math.abs(g*u)>o)||g>1&&(Math.abs((g-1)*l)>o||Math.abs((g-1)*u)>o))&&(r.x=m*c+i.x,r.y=m*h+i.y,!0))},_0x2909c1.plumbLineLen=function(e,t,i){return this.distance(e,t)*Math.sin(this.innerAngle(t,e,i))},_0x2909c1.innerAngle=function(e,t,i){if(e===t||e===i)return 0;var n=this.distance(e,t),r=this.distance(e,i),o=this.distance(t,i),a=(n*n+r*r-o*o)/(2*n*r);return a>1&&this.equalFuzzy(a,1)?a=1:a<1&&this.equalFuzzy(a,-1)&&(a=-1),Math.acos(a)},_0x2909c1.isSameQuadrant=function(e,t,i,n){var r=(t.x-e.x)*(n.x-i.x),o=(t.y-e.y)*(n.y-i.y);return!(Math.abs(r)<1e-31&&Math.abs(o)<1e-31)&&((r>0||Math.abs(r)<1e-31)&&(o>0||Math.abs(o)<1e-31))},_0x2909c1.findPoint=function(e,t,i,n){if(e===t||Math.abs(i)<1e-31)return e;var r=this.radian(e,t)+n*Math.PI/180;return new _0x23de81(e.x+i*Math.cos(r),e.y+i*Math.sin(r),e.z)},_0x2909c1.LinePnt=function(e,t,i){var n=_0x2909c1.distance(e,t);if(0===n)return e;var r=i/n;return _0x2909c1.FindPointOnLineByRatio(r,e,t)},_0x2909c1.FindPointOnLineByRatio=function(e,t,i){var n=new _0x23de81(0,0,0);return n.x=t.x+(i.x-t.x)*e,n.y=t.y+(i.y-t.y)*e,n.z=t.z+(i.z-t.z)*e,n},_0x2909c1.getPolygonCenterPt=function(e){if(!e||null===e||0===e.length)return null;for(var t=0,i=0,n=0,r=0;r<e.length;r++)t+=e[r].x,i+=e[r].y,n+=e[r].z;return new _0x23de81(t/e.length,i/e.length,n/e.length)},_0x2909c1.findBisectorPoint=function(e,t,i,n){var r=this.radian(t,e),o=(r+this.radian(t,i))/2,a=Math.cos(o-r+Math.PI/2),s=n;return this.isNear(a,.15)||(s=n/a),new _0x23de81(t.x+s*Math.cos(o),t.y+s*Math.sin(o),t.z)},_0x2909c1.rotateAngle=function(e,t,i){var n=new _0x23de81(0,0,0),r=t,o=Math.cos(r),a=Math.sin(r),s=i.x-e.x,l=i.y-e.y,u=i.z-e.z;return n.x=s*o-l*a+e.x,n.y=s*a+l*o+e.y,n.z=u*a+u*o+e.z,n},_0x2909c1.calcCirclePts=function(e,t,i){WebGLPlot$e.defined(i)||(i=72);for(var n=[],r=360/i,o=0;o<i-1;++o){var a=WebGLPlot$e.CesiumMath.toRadians(o*r);n.push(new _0x23de81(t.x+e*Math.cos(a),t.y+e*Math.sin(a),t.z))}return n.push(n[0].clone()),n},_0x2909c1.circlePoint=function(e,t,i,n){return n*=Math.PI/180,new _0x23de81(e.x+t*Math.cos(n),e.y+i*Math.sin(n),0)},_0x2909c1.generateBezierCtrlPts=function(e){var t=[],i=e.length;if(i<3)for(var n=0;n!=i;++n)t[n]=e[n].clone();else{var r=0;for(n=0;n<3*i-2;n+=3)"function"==typeof e[r].clone?t[n]=e[r].clone():t[n]=new _0x23de81(e[r].x,e[r].y,e[r].z),t[n+1]=new _0x23de81(0,0,e[r].z),t[n+2]=new _0x23de81(0,0,e[r].z),r++;for(n=1;n<i-1;++n)this.generateTrianglePoints(8,3,e[n-1],e[n],e[n+1],t[3*n-1],t[3*n+1]);this.getTrapezoidPoints(.6,t[0],t[3],t[2],t[1]),this.getTrapezoidPoints(.6,t[3*i-3],t[3*i-6],t[3*i-5],t[3*i-4]),"function"==typeof e[i-1].clone?t[3*i-1]=t[3*i-2]=e[i-1].clone():t[3*i-1]=t[3*i-2]=new _0x23de81(e[i-1].x,e[i-1].y,e[i-1].z)}return t},_0x2909c1.generateBezierPointsWithCtrlPts=function(e){var t=e.length,i=[];if(e.length<3)for(var n=0;n<t;++n)i[n]=e[n].clone();else{t/=3;for(n=0;n<3*t&&!(n+4>=3*t);n+=3){var r=e[n].x,o=e[n].y,a=e[n].z,s=e[n+1].x,l=e[n+1].y,u=e[n+1].z,c=e[n+2].x,h=e[n+2].y,d=e[n+2].z,f=e[n+3].x,p=e[n+3].y,_=e[n+3].z;if(this.equalFuzzy(r,s,1e-10)&&this.equalFuzzy(o,l,1e-10)&&this.equalFuzzy(c,f,1e-10)&&this.equalFuzzy(h,p,1e-10))i.push(new _0x23de81(r,o,a)),i.push(new _0x23de81(c,h,d));else for(var m=0;m<=1;m+=.03125){var g,x,y,v,$=m*m,b=$*m,T=new _0x23de81((g=1-3*m+3*$-b)*r+(x=3*(m-2*$+b))*s+(y=3*($-b))*c+(v=b)*f,g*o+x*l+y*h+v*p,g*a+x*u+y*d+v*_);i.push(T)}}}return i},_0x2909c1.generateBeizerPointsNoCtrlPt=function(e){var t=_0x2909c1.generateBezierCtrlPts(e);return _0x2909c1.generateBezierPointsWithCtrlPts(t)},_0x2909c1.generateBezierPtsWithScalePts=function(e,t,i,n){var r=[],o=e.x,a=e.y,s=t.x,l=t.y,u=i.x,c=i.y,h=n.x,d=n.y;if(this.equalFuzzy(o,s,1e-10)&&this.equalFuzzy(a,l,1e-10)&&this.equalFuzzy(u,h,1e-10)&&this.equalFuzzy(c,d,1e-10))r.push(new _0x23de81(o,a,0)),r.push(new _0x23de81(u,c,0));else for(var f=0;f<=1;f+=.03125){var p,_,m,g,x=f*f,y=x*f,v=new _0x23de81((p=1-3*f+3*x-y)*o+(_=3*(f-2*x+y))*s+(m=3*(x-y))*u+(g=y)*h,p*a+_*l+m*c+g*d,0);r.push(v)}return r},_0x2909c1.generateTrianglePoints=function(e,t,i,n,r,o,a){var s=i.x,l=i.y,u=i.z,c=n.x,h=n.y,d=n.z,f=r.x,p=r.y,_=r.z;this.getPointsByTriangle(e,t,s,l,u,c,h,d,f,p,_,o,a)},_0x2909c1.getPointsByTriangle=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=o+(l-i),p=a+(u-n),_=0,m=0;if(i==l)_=i,m=p;else if(n==u)_=f,m=n;else{var g=1*(u-n)/(l-i),x=n-i*g;m=g*(_=(p+f/g-x)/(g+1/g))+x}var y=Math.sqrt(1*(o-f)*(o-f)+1*(a-p)*(a-p)),v=Math.sqrt(1*(i-o)*(i-o)+1*(n-a)*(n-a)),$=Math.sqrt(1*(o-l)*(o-l)+1*(a-u)*(a-u)),b=0;f=_+(f-_)*(b=v+$?1+($-v)*e/($+v):1),p=m+(p-m)*b,0==y&&(y=1),h.x=o+(o-f)*v/(t*y),h.y=a+(a-p)*v/(t*y),h.z=r,d.x=o+(f-o)*$/(t*y),d.y=a+(p-a)*$/(t*y),d.z=c},_0x2909c1.getPtsByTriangle=function(e,t,i,n,r){var o=new _0x23de81(0,0,0);new _0x23de81(0,0,0);var a=0,s=0;return a=this.distance(r,i),s=this.distance(n,r),1==t&&(a*=2),2==t&&(s*=2),o.x=(a*n.x+s*i.x)/(a+s),o.y=(a*n.y+s*i.y)/(a+s),{pl:this.getWhichPtOfNormal(e,i,o,r),pr:this.getWhichPtOfNormal(e,n,o,r)}},_0x2909c1.getWhichPtOfNormal=function(e,t,i,n){new _0x23de81(0,0,0),new _0x23de81(0,0,0);var r=0;r=this.distance(n,t)/e;var o=this.getPointsOfNormal(r,i,n);return this.distance(t,o.pt4)>=(r=this.distance(t,o.pt3))?o.pt3:o.pt4},_0x2909c1.getTrapezoidPoints=function(e,t,i,n,r){var o=t.x,a=t.y,s=t.z,l=i.x,u=i.y,c=i.z,h=n.x,d=n.y,f=n.z;this.getPointsByTrapezoid(e,o,a,s,l,u,c,h,d,f,r)},_0x2909c1.getPointsByTrapezoid=function(e,t,i,n,r,o,a,s,l,u,c){var h=0,d=0,f=0,p=0;if(0===Math.abs(i-o))h=t+r-s,d=l;else if(0==Math.abs(t-r))h=s,d=i+o-l;else{var _=1*(i-o)/(t-r),m=l-_*s;d=_*(h=((o+i)/2+(t+r)/(2*_)-m)/(_+1/_))+m,h=2*h-s,d=2*d-l}var g=Math.sqrt(1*(t-r)*(t-r)+1*(i-o)*(i-o)),x=Math.sqrt(1*(t-h)*(t-h)+1*(i-d)*(i-d));return g>0?(f=t+(r-t)*x/g,p=i+(o-i)*x/g):(f=t,p=i),c.x=f+(h-f)*e,c.y=p+(d-p)*e,c.z=u,c},_0x2909c1.generateArcInfo=function(e,t,i){var n={};n.pntCenter=new _0x23de81(0,0,0),n.dRadius=0,n.dStartAngle=0,n.dEndAngle=0;var r=t.x-e.x,o=t.y-e.y;if(Math.abs(r)<1e-31){var a={};(l={}).x=(t.x+e.x)/2,l.y=(t.y+e.y)/2,a.x=(t.x+i.x)/2,a.y=(t.y+i.y)/2;var s=0;Math.abs(i.x-t.x)>=1e-31&&(s=(i.y-t.y)/(i.x-t.x)),n.pntCenter.y=l.y,Math.abs(s)<1e-31?n.pntCenter.x=a.x:n.pntCenter.x=a.x-s*(l.y-a.y)}else{var l;a={};(l={}).x=(t.x+e.x)/2,l.y=(t.y+e.y)/2,a.x=(t.x+i.x)/2,a.y=(t.y+i.y)/2;var u=o/r,c=1;Math.abs(u)<1e-31?(n.pntCenter.x=l.x,Math.abs(i.x-t.x<1e-31)?n.pntCenter.y=a.y:n.pntCenter.y=-(i.x-t.x)/(i.y-t.y)*(n.pntCenter.x-a.x)+a.y):Math.abs(i.x-t.x)<1e-31?(n.pntCenter.y=a.y,n.pntCenter.x=-u*(n.pntCenter.y-l.y)+l.x):(c=(i.y-t.y)/(i.x-t.x),n.pntCenter.x=(u*c*(l.y-a.y)+c*l.x-u*a.x)/(c-u),n.pntCenter.y=(a.x-l.x+c*a.y-u*l.y)/(c-u))}var h=Math.atan2(e.y-n.pntCenter.y,e.x-n.pntCenter.x),d=Math.atan2(i.y-n.pntCenter.y,i.x-n.pntCenter.x);if(this.isCounterClockwise(e,t,i)){for(;h>=2*Math.PI;)h-=2*Math.PI;for(;h<0;)h+=2*Math.PI;for(;d>2*Math.PI;)d-=2*Math.PI;for(;d<h;)d+=2*Math.PI}else{for(;d>=2*Math.PI;)d-=2*Math.PI;for(;d<0;)d+=2*Math.PI;for(;h>2*Math.PI;)h-=2*Math.PI;for(;d>h;)h+=2*Math.PI;var f=h;h=d,d=f}return n.dRadius=Math.sqrt((n.pntCenter.x-e.x)*(n.pntCenter.x-e.x)+(n.pntCenter.y-e.y)*(n.pntCenter.y-e.y)),n.dEndAngle=180*d/Math.PI,n.dStartAngle=180*h/Math.PI,n},_0x2909c1.isCounterClockwise=function(e,t,i){return(i.x-t.x)*(e.y-t.y)-(e.x-t.x)*(i.y-t.y)>0},_0x2909c1.generateArcSpatialData=function(e,t,i,n,r,o,a){WebGLPlot$e.defined(a)||(a=36);var s=(o-r)/a,l=[];if(Math.abs(s)<1e-31)return l;for(;o<r;)o+=2*Math.PI;for(;o>r+2*Math.PI;)r+=2*Math.PI;var u=Math.cos(n)*t,c=Math.sin(n)*t,h=Math.cos(n)*i,d=Math.sin(n)*i,f=this.calcEllipseRadian(r,t,i),p=this.calcEllipseRadian(o,t,i);p-f<1e-31&&(p+=2*Math.PI);var _=Math.round(Math.abs((p-f)/s)+1);if(_<2)return l;for(var m=0;m<_-1;f+=s,m++){m===_-2&&(f=o);var g=e.x+u*Math.cos(f)-d*Math.sin(f),x=e.y+c*Math.cos(f)+h*Math.sin(f);l.push(new _0x23de81(g,x,0))}return 0>l.length&&(l[l.length-1].x=e.x+u*Math.cos(p)-d*Math.sin(p),l[l.length-1].y=e.y+c*Math.cos(p)+h*Math.sin(p)),l},_0x2909c1.calcEllipseRadian=function(e,t,i){var n=e,r=t*Math.sin(e),o=i*Math.cos(e),a=Math.atan2(r,o);if(e>Math.PI)for(;n>Math.PI;)n-=2*Math.PI,a+=2*Math.PI;else if(e<-Math.PI)for(;n<-Math.PI;)n+=2*Math.PI,a-=2*Math.PI;return a},_0x2909c1.radian=function(e,t){var i=0,n=t.x-e.x,r=t.y-e.y;return(i=Math.atan2(r,n))<0&&(i+=2*Math.PI),i},_0x2909c1.intersectLines=function(e,t,i,n){var r={isIntersectLines:!1};if(e.x===t.x&&e.y===t.y||i.x===n.x&&i.y===n.y)return r;var o=t.x-e.x,a=t.y-e.y,s=n.x-i.x,l=n.y-i.y,u=o*l-s*a;if(this.isNear(u))return r;var c=(o*(e.y-i.y)-a*(e.x-i.x))/u,h=new _0x23de81(0,0,0);return h.x=c*s+i.x,h.y=c*l+i.y,h.z=e.z,r.isIntersectLines=!0,r.intersectPoint=h,r},_0x2909c1.isNear=function(e,t){return t||(t=1e-31),e<t&&e>-t},_0x2909c1.calcKidneyShapePts=function(e){var t=[],i=[],n=e.length;if(0!==n){if(1===n)return void t.push(e[0]);if(2===n){var r=this.calcProtudeC3(e[0],e[1]);i.push(e[0]),i.push(e[1]),i.push(r)}else if(i.push(e[0]),i.push(e[1]),i.push(e[2]),(this.isSamePt(e[0],e[2])||this.isSamePt(e[1],e[2]))&&(t.push(e[0]),t.push(e[1])),this.isSamePt(e[0],e[1]))return t.push(e[0]),void t.push(e[2]);i=this.reNormalizeKidneyCtrlPoints(i);var o=new _0x23de81(0,0,0),a=new _0x23de81(0,0,0);o.x=.5*(i[0].x+i[1].x),o.y=.5*(i[0].y+i[1].y),a.x=o.x-.1*(i[2].x-o.x),a.y=o.y-.1*(i[2].y-o.y);var s=this.getPtsByTriangle(3,0,i[1],i[0],a);t.push(s.pr),t.push(a),t.push(s.pl);var l=this.getPtsByTriangle(4,2,i[2],i[0],i[1]);t.push(l.pr),t.push(i[1]),t.push(l.pl);var u=this.getPtsByTriangle(2,0,i[0],i[1],i[2]);t.push(u.pr),t.push(i[2]),t.push(u.pl);var c=this.getPtsByTriangle(4,1,i[1],i[2],i[0]);return t.push(c.pr),t.push(i[0]),t.push(c.pl),t}},_0x2909c1.generateKidneyShapePts=function(e){var t=[];if(2>e.length)return t;var i=this.calcKidneyShapePts(e);if(12!=i.length)return t;i.push(i[0]),i.push(i[1]),i.splice(0,1);for(var n=0;n<i.length-3;n+=3){var r;i.slice(n,n+4),r=this.generateBezierPtsWithScalePts(i[n],i[n+1],i[n+2],i[n+3]),t=t.concat(r)}return t},_0x2909c1.calcProtudeC3=function(e,t){var i,n=new _0x23de81(0,0,0);return n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y),i=_0x2909c1.distance(t,e)/2.7,this.getPointsOfNormal(i,e,n).pt3},_0x2909c1.getPointsOfNormal=function(e,t,i){var n,r=new _0x23de81(0,0,0),o=new _0x23de81(0,0,0),a=new _0x23de81(0,0,0);return 0==(n=this.distance(t,i))?(a.y=0,a.x=e):(a.x=e*(t.x-i.x)/n,a.y=e*(t.y-i.y)/n),r.x=-a.y+i.x,r.y=a.x+i.y,o.x=a.y+i.x,o.y=-a.x+i.y,{pt3:r,pt4:o}},_0x2909c1.isSamePt=function(e,t){return!!(this.equalFuzzy(e.x,t.x)&&this.equalFuzzy(e.y,t.y)&&this.equalFuzzy(e.z,t.z))},_0x2909c1.reNormalizeKidneyCtrlPoints=function(e){var t=[];t.push(new _0x23de81(0,0,0)),t.push(new _0x23de81(0,0,0)),t.push(new _0x23de81(0,0,0));var i=e.length;if(!(i<2)){if(2==i)t[0]=e[0],t[1]=e[1],t[2]=this.calcProtudeC3(e[0],e[1]);else{var n,r,o,a=e[0],s=e[1],l=e[2];if(n=this.distance(s,a),r=this.distance(l,s),o=this.distance(a,l),r>=n&&r>=o){var u=a.clone();a=l.clone(),l=u.clone()}else if(o>=n&&o>=r){u=l.clone();l=s.clone(),s=u.clone()}if(!this.isRight(l,a,s)){u=a.clone();a=s.clone(),s=u.clone()}t[0]=a,t[1]=s,t[2]=l}return t}},_0x2909c1.pointIsRightToVerticle=function(e,t,i){var n=new WebGLPlot$e.Cartesian2(.5*(t.x+e.x),.5*(t.y+e.y)),r=new WebGLPlot$e.Cartesian2(t.x-e.x,t.y-e.y),o=new WebGLPlot$e.Cartesian2(i.x-n.x,i.y-n.y);return r.x*o.x+r.y*o.y>0},_0x2909c1.StringtoColor=function(e){if(e.length){var t;t=e.length<8?1:parseInt(e.slice(7,9),16)/255;var i=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255;return new WebGLPlot$e.Color(i,n,r,t)}return e},_0x2909c1.getPosition=function(e,t){if(WebGLPlot$e.defined(t)){var i=void 0,n=e.pickPosition(t);if(n){var r=WebGLPlot$e.Cartographic.fromCartesian(n);i=new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(r.longitude),WebGLPlot$e.CesiumMath.toDegrees(r.latitude),r.height<-1e4?0:r.height)}else if(n=e.camera.pickEllipsoid(t,e.globe.ellipsod)){r=WebGLPlot$e.Cartographic.fromCartesian(n);i=new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(r.longitude),WebGLPlot$e.CesiumMath.toDegrees(r.latitude),r.height)}return void 0===i||NaN===i.x||NaN===i.y||NaN===i.z?new WebGLPlot$e.Cartesian3:i}},_0x2909c1.getPosition2=function(e,t){if(!WebGLPlot$e.defined(t))return;let i=e.camera.pickEllipsoid(t,e.globe.ellipsod);var n=WebGLPlot$e.Cartographic.fromCartesian(i);const r=new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(n.longitude),WebGLPlot$e.CesiumMath.toDegrees(n.latitude),1);return void 0===r||NaN===r.x||NaN===r.y||NaN===r.z?new WebGLPlot$e.Cartesian3:r},_0x2909c1.getSurroundLinePts=function(e,t){var i=[],n=[];t*=_0x2909c1.innerOutlineDir(e);for(var r=0;r<e.length-1;r++){var o,a,s=[];if(!_0x2909c1.equalFuzzy(e[r].x,e[r+1].x)||!_0x2909c1.equalFuzzy(e[r].y,e[r+1].y)){s.push(e[r]),s.push(e[r+1]);var l=_0x2909c1.parallel(s,t);if(o=l[0],a=l[1],0!=i.length){var u=_0x2909c1.intersectLines(o,a,i[0],i[1]);if(u.isIntersectLines){var c=u.intersectPoint,h=_0x2909c1.distance(o,a);_0x2909c1.distance(c,a)>2*h||(n[n.length-1]=c),n.push(a)}else n.push(a)}else n.push(o),n.push(a);(i=[]).push(n[n.length-2]),i.push(n[n.length-1])}}if(e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y&&e[0].z===e[e.length-1].z&&1<n.length){var d=_0x2909c1.intersectLines(n[0],n[1],n[n.length-2],n[n.length-1]);if(d.isIntersectLines){var f=d.intersectPoint;n[n.length-1]=f,n[0]=f}}return n},_0x2909c1.innerOutlineDir=function(e){function t(e,t){function i(e){var t=Math.atan2(e.y,e.x);return t<0&&(t+=2*Math.PI),t}var n=i(t)-i(e);return n<-Math.PI&&(n+=2*Math.PI),n>Math.PI&&(n-=2*Math.PI),n}if((e=_0x2909c1.clearNextSamePts(e)).length<3)return 1;for(var i=0,n={x:0,y:0},r={x:0,y:0},o=2;o<e.length;o++)r.x=e[o].x-e[o-1].x,r.y=e[o].y-e[o-1].y,n.x=e[o-1].x-e[o-2].x,n.y=e[o-1].y-e[o-2].y,i+=t(n,r);return r.x=e[1].x-e[0].x,r.y=e[1].y-e[0].y,n.x=e[0].x-e[e.length-1].x,n.y=e[0].y-e[e.length-1].y,(i+=t(n,r))>=0?-1:1},_0x2909c1.isSpecialHeightSymbol=function(e,t){if(22===e)switch(t){case 1001:case 1002:case 1003:case 1004:case 1006:case 1007:case 1009:case 1011:return!0}return 50308===t||26400===t},_0x2909c1.isCanFill=function(e){if(!WebGLPlot$e.defined(e)||_0x1c668c.SYMBOL_ALGO!==e.symbolType)return!1;switch(e.code){case 1001:case 1002:case 1003:case 1004:case 1006:case 1011:case 25200:return!0}return!1},_0x2909c1.isSymbolCellCanFill=function(e){return _0x1c668c.SYMBOL_CHORD===e.type||_0x1c668c.SYMBOL_ARBITRARYPOLYGON===e.type||_0x1c668c.SYMBOL_POLYBEZIERCLOSED===e.type||_0x1c668c.SYMBOL_PIE===e.type||_0x1c668c.SYMBOL_CIRCLE===e.type||_0x1c668c.SYMBOL_RECTANGLE===e.type||_0x1c668c.SYMBOL_PARALLELOGRAM===e.type||_0x1c668c.SYMBOL_ELLIPSE===e.type||_0x1c668c.SYMBOL_TRAPEZOID===e.type||_0x1c668c.SYMBOL_KIDNEY===e.type||_0x1c668c.SYMBOL_REGULARPOLYGON===e.type||_0x1c668c.SYMBOL_COMBINATIONALCIRCLE===e.type||_0x1c668c.SYMBOL_CIRCLECHORD===e.type||_0x1c668c.SYMBOL_CIRCLEPIE===e.type},_0x2909c1.getSpaceDistance=function(e,t){var i=WebGLPlot$e.Cartesian3.fromDegrees(e.x,e.y,e.z),n=WebGLPlot$e.Cartesian3.fromDegrees(t.x,t.y,t.z),r=WebGLPlot$e.Cartographic.fromCartesian(i),o=WebGLPlot$e.Cartographic.fromCartesian(n),a=new WebGLPlot$e.EllipsoidGeodesic;return a.setEndPoints(r,o),a.surfaceDistance},_0x2909c1.getSpaceDistanceByCartesian=function(e,t){var i=WebGLPlot$e.Cartographic.fromCartesian(e),n=WebGLPlot$e.Cartographic.fromCartesian(t),r=new WebGLPlot$e.EllipsoidGeodesic;return r.setEndPoints(i,n),r.surfaceDistance},_0x2909c1.intersectionOfRectByPointslopeline=function(e,t,i){var n=new WebGLPlot$e.Cartesian2,r=new WebGLPlot$e.Cartesian2;if(-1==t)n.x=e.x,n.y=i.bottom,r.x=e.x,r.y=i.top;else if(0==t)n.x=i.left,n.y=e.y,r.x=i.right,r.y=e.y;else{var o=0,a=[];if((l=t*((u=i.left)-e.x)+e.y)>i.bottom&&l<i.top&&(a[2*o]=u,a[2*o+1]=l,o++),(l=t*((u=i.right)-e.x)+e.y)>i.bottom&&l<i.top&&(a[2*o]=u,a[2*o+1]=l,o++),o<2){var s=-1/t;l=i.bottom,(u=e.x-s*(l-e.y))>i.left&&u<i.right&&(a[2*o]=u,a[2*o+1]=l,o++)}if(o<2){s=-1/t;var l=i.top,u=e.x-s*(l-e.y);o<2&&u>i.left&&u<i.right&&(a[2*o]=u,a[2*o+1]=l,o++)}n.x=a[0],n.y=a[1],r.x=a[2],r.y=a[3]}return[n,r]},_0x2909c1.ptIsInPolygon=function(e,t){if(!e||0===e.length)return!1;for(var i=0,n=e.length,r=0;r<n;r++){var o=e[r],a=e[(r+1)%n];if(o.y!==a.y){var s=o.y<a.y?o.y:a.y,l=o.y>a.y?o.y:a.y;if(!(t.y<s||t.y>l))(t.y-o.y)*(a.x-o.x)/(a.y-o.y)+o.x>t.x&&i++}}return i%2==1},_0x2909c1.pixelDisToRealDis=function(e,t,i){var n=WebGLPlot$e.Cartesian3.fromDegrees(t.x,t.y,t.z),r=WebGLPlot$e.SceneTransforms.wgs84ToWindowCoordinates(e,n);if(!WebGLPlot$e.defined(r))return 0;var o=new WebGLPlot$e.Cartesian2(r.x+i,r.y),a=_0x2909c1.getPosition(e,r),s=_0x2909c1.getPosition(e,o);return _0x2909c1.distance(a,s)},_0x2909c1.computeMatrix=function(e,t,i){var n=WebGLPlot$e.Cartesian3.fromDegrees(e.x,e.y,e.z),r=new WebGLPlot$e.HeadingPitchRoll,o=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west");i||(i=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot$e.Ellipsoid.WGS84,o));var a=Math.PI/180;return r.pitch=a*t.x,r.roll=a*t.y,r.heading=a*t.z,WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot$e.Ellipsoid.WGS84,o,i),i},_0x2909c1.computeMatrix2=function(e,t,i){var n=new WebGLPlot$e.HeadingPitchRoll,r=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west");i||(i=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(e,n,WebGLPlot$e.Ellipsoid.WGS84,r));var o=Math.PI/180;return n.pitch=o*t.x,n.roll=o*t.y,n.heading=o*t.z,WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(e,n,WebGLPlot$e.Ellipsoid.WGS84,r,i),i},_0x2909c1.Cross=function(e,t){return e.x*t.y-e.y*t.x},_0x2909c1.IsClockwise=function(e){for(var t=0,i=0,n=1,r=2;i<e.length;i++,n++,r++){n>=e.length&&(n-=e.length),r>=e.length&&(r-=e.length);var o=new WebGLPlot$e.Cartesian2(e[n].x-e[i].x,e[n].y-e[i].y),a=new WebGLPlot$e.Cartesian2(e[r].x-e[n].x,e[r].y-e[n].y);_0x2909c1.Cross(o,a)>=0?t++:t--}return t>=0},_0x2909c1.Resolve=function(e){var t=[];if(e.length<3)return null;for(var i=_0x2909c1.IsClockwise(e),n=[],r=0;r<e.length;r++){var o={point:e[r],index:r,isConvex:!1,isSeparable:!1};i?n.push(o):n.unshift(o)}for(var a=[],s=0;s<n.length;s++)_0x2909c1.UpdatePointStatus(n[s],n,s),n[s].isSeparable&&a.unshift({Value:n[s],Array:n,ArrayIndex:s});for(;n.length>=3;){if(0===a.length)return null;var l=a[0];a.shift();var u={Array:l.Array,ArrayIndex:WebGLPlot$e.defined(l.Array[l.ArrayIndex-1])?l.ArrayIndex-1:l.Array.length-1},c={Array:l.Array,ArrayIndex:WebGLPlot$e.defined(l.Array[l.ArrayIndex+1])?l.ArrayIndex+1:0},h=WebGLPlot$e.defined(l.Array[l.ArrayIndex])?l.Array[l.ArrayIndex]:l.Array[0],d=u.Array[u.ArrayIndex],f=c.Array[c.ArrayIndex];if(n.splice(l.ArrayIndex,1),t.push(h.index),t.push(d.index),t.push(f.index),d.isSeparable){if(_0x2909c1.UpdatePointStatus(d,u.Array,u.ArrayIndex),!d.isSeparable){var p=a.indexOf(u);a.splice(p,1)}}else _0x2909c1.UpdatePointStatus(d,u.Array,u.ArrayIndex),d.isSeparable&&a.unshift(u);if(f.isSeparable){if(_0x2909c1.UpdatePointStatus(f,c.Array,c.ArrayIndex),!f.isSeparable){p=a.indexOf(c);a.splice(p,1)}}else _0x2909c1.UpdatePointStatus(f,c.Array,c.ArrayIndex),f.isSeparable&&a.unshift(c)}return t},_0x2909c1.UpdatePointStatus=function(e,t,i){var n=WebGLPlot$e.defined(t[i-1])?t[i-1]:t[t.length-1],r=WebGLPlot$e.defined(t[i+1])?t[i+1]:t[0];if(!e.isConvex){var o=new WebGLPlot$e.Cartesian2,a=new WebGLPlot$e.Cartesian2;if(!(_0x2909c1.Cross(WebGLPlot$e.Cartesian2.subtract(e.point,n.point,o),WebGLPlot$e.Cartesian2.subtract(r.point,e.point,a))>=0))return void(e.isSeparable=!1);e.isConvex=!0}for(var s=0;s<t.length;s++)if(!WebGLPlot$e.Cartesian2.equals(t[s].point,e.point)&&!WebGLPlot$e.Cartesian2.equals(t[s].point,n.point)&&!WebGLPlot$e.Cartesian2.equals(t[s].point,r.point)&&_0x2909c1.TestInTriangle(t[s].point,e.point,n.point,r.point))return void(e.isSeparable=!1);e.isSeparable=!0},_0x2909c1.TestInTriangle=function(e,t,i,n){var r=new WebGLPlot$e.Cartesian2,o=new WebGLPlot$e.Cartesian2,a=new WebGLPlot$e.Cartesian2,s=new WebGLPlot$e.Cartesian2,l=new WebGLPlot$e.Cartesian2;WebGLPlot$e.Cartesian2.subtract(i,t,r),WebGLPlot$e.Cartesian2.subtract(n,t,o),WebGLPlot$e.Cartesian2.subtract(n,i,a),WebGLPlot$e.Cartesian2.subtract(e,t,s);var u=_0x2909c1.Cross(r,o)>=0;return u^_0x2909c1.Cross(r,s)<0&&_0x2909c1.Cross(a,r)>0^_0x2909c1.Cross(a,WebGLPlot$e.Cartesian2.subtract(e,i,l))>=0&&u^_0x2909c1.Cross(o,s)>=0},_0x2909c1.screenSpaceCameraController=function(e,t){if(e){var i=e.screenSpaceCameraController;2===e.mode?i.enableTranslate=t:3===e.mode&&(i.enableRotate=t),e.camera.update(e.mode),i.update()}},_0x2909c1.pixelDisToRealDisInMeters=function(e,t){var i=e.camera,n=new WebGLPlot$e.Cartesian2(e._canvas.clientWidth/2,e._canvas.clientHeight/2),r=new WebGLPlot$e.Cartesian2(n.x+t.x,n.y),o=new WebGLPlot$e.Cartesian2(n.x,n.y+t.y),a=i.getPickRay(n),s=i.getPickRay(r),l=i.getPickRay(o),u=e.globe.pick(a,e),c=e.globe.pick(s,e),h=e.globe.pick(l,e),d=WebGLPlot$e.Cartesian3.distance(u,c),f=WebGLPlot$e.Cartesian3.distance(u,h);return new WebGLPlot$e.Cartesian2(d,f)},_0x2909c1.pixelHeightToRealHeight=function(e,t,i){var n=e.camera,r=new WebGLPlot$e.Cartesian2(t.x,t.y+1),o=n.getPickRay(t),a=n.getPickRay(r),s=e.globe.pick(o,e),l=e.globe.pick(a,e),u=.3*WebGLPlot$e.Cartesian3.distance(s,l);return(t.y-i.y)*u},_0x2909c1.getPlotLayers=function(e){var t=null;if(WebGLPlot$e.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot$e.PlotLayers)t=e.plotLayers;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot$e.defined(r)&&r instanceof WebGLPlot$e.PlotLayers){t=r;break}}return t};var _0x37cca8=new WebGLPlot$e.Cartesian3,_0x49602b=new WebGLPlot$e.Cartesian3;_0x2909c1.getModelMinAndMaxCorner=function(e){for(var t=e.gltf,i=t.nodes,n=t.meshes,r=t.scenes[t.scene].nodes,o=r.length,a=[],s=new WebGLPlot$e.Cartesian3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),l=new WebGLPlot$e.Cartesian3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),u=0;u<o;++u){var c=i[r[u]];for(c._transformToRoot=WebGLPlot$e.ModelUtility.getTransform(c),a.push(c);a.length>0;){var h=(c=a.pop())._transformToRoot,d=c.mesh;if(WebGLPlot$e.defined(d))for(var f=n[d].primitives,p=f.length,_=0;_<p;++_)if(f[_].attributes&&f[_].attributes.POSITION){var m=f[_].attributes.POSITION;if(WebGLPlot$e.defined(m)){var g=WebGLPlot$e.ModelUtility.getAccessorMinMax(t,m);if(WebGLPlot$e.defined(g.min)&&WebGLPlot$e.defined(g.max)){var x=WebGLPlot$e.Cartesian3.fromArray(g.min,0,_0x37cca8),y=WebGLPlot$e.Cartesian3.fromArray(g.max,0,_0x49602b);WebGLPlot$e.Matrix4.multiplyByPoint(h,x,x),WebGLPlot$e.Matrix4.multiplyByPoint(h,y,y),WebGLPlot$e.Cartesian3.minimumByComponent(s,x,s),WebGLPlot$e.Cartesian3.maximumByComponent(l,y,l)}}}var v=c.children;if(WebGLPlot$e.defined(v))for(var $=v.length,b=0;b<$;++b){var T=i[v[b]];T._transformToRoot=WebGLPlot$e.ModelUtility.getTransform(T),WebGLPlot$e.Matrix4.multiplyTransformation(h,T._transformToRoot,T._transformToRoot),a.push(T)}delete c._transformToRoot}}return{minCorner:s,maxCorner:l}},_0x2909c1.localPtsToCartesian=function(e,t,i){var n=new WebGLPlot$e.Cartesian3,r=new WebGLPlot$e.Cartesian3;return r=WebGLPlot$e.Cartesian3.multiplyByScalar(new WebGLPlot$e.Cartesian3(e.x,e.y,e.z),i,r),{position:n=WebGLPlot$e.Matrix4.multiplyByPoint(t,r,n),vector:r}},_0x2909c1.latLon2LocalPts=function(e){let t=[],i=[],n=WebGLPlot$e.Cartesian3.fromDegrees(e[0].x,e[0].y,e[0].z);if(i.push(new WebGLPlot$e.Cartesian3(0,0,0)),t.push(n),Array.isArray(e)){for(let r=1;r<e.length;r++){let o=WebGLPlot$e.Cartesian3.fromDegrees(e[r].x,e[r].y,e[r].z);const a=o.x-n.x,s=o.y-n.y,l=o.z-n.z;t.push(o),i.push(new WebGLPlot$e.Cartesian3(a,s,l))}var r=new WebGLPlot$e.HeadingPitchRoll,o=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west");const a=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(n,r,WebGLPlot$e.Ellipsoid.WGS84,o);return console.log(t,"test"),{positions:i,modelMatrix:a}}},_0x2909c1.extend=function(e){var t,i,n,r;for(i=1,n=arguments.length;i<n;i++)for(t in r=arguments[i])e[t]=r[t];return e},_0x2909c1.isSymbolDot=function(e){switch(e){case _0x1c668c.SYMBOL_DOT:case _0x1c668c.SYMBOL_PICTURE:case _0x1c668c.SYMBOL_POINT:case _0x1c668c.SYMBOL_Model:return!0}return!1};var _0x5c3542=(_0x10c270=!0,function(e,t){var i=_0x10c270?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x10c270=!1,i}),_0x4767de=_0x5c3542(void 0,(function(){return _0x4767de.toString().search("(((.+)+)+)+$").toString().constructor(_0x4767de).search("(((.+)+)+)+$")})),_0x10c270;function _0x23999b(e,t){this.scene=WebGLPlot.defaultValue(e,null),this.dotBillboards=new WebGLPlot.BillboardCollection,this._name=WebGLPlot.defaultValue(t,"PlotCollentionLayer"),this._waterPlanes=[],this._visibleViewport=0,this._valid=!0,this._visibility=!0,this._id=-1,this.bIsUpdateDepthTestDis=!1,this.setInterval(),this.PolygonFillInstances={},this.WallInstances={},this.Labels={},this.ploygonFillPrimitive=[],this.wallPrimitive=[],this.ploygonFillAppearance={},this.wallAppearance={},this.algoLabels=new WebGLPlot.LabelCollection,this.updatePrimitive=!1,this.createPolylineCollention(!0),this.GroundInstances={},this.groundPrimitive=null,this.dynamicScaneInstances={},this.dynamicScaneimitive=null,this._dotModelAndVectorPrimitives=new WebGLPlot.PrimitiveCollection,this.scene.primitives.add(this._dotModelAndVectorPrimitives)}function _0xbdabbf(e){if(WebGLPlot.defined(e)&&null!==e&&WebGLPlot.defined(this.scene)&&null!==this.scene){var t=e.position,i=e.width,n=e.height;if(WebGLPlot.defined(i)&&WebGLPlot.defined(n)){var r=new WebGLPlot.BoundingSphere(t,0),o=this.scene.camera.getPixelSize(r,this.scene.frameState.context.drawingBufferWidth,this.scene.frameState.context.drawingBufferHeight),a=i*o,s=n*o,l=Math.max(a,s)/3;r.radius=l,WebGLPlot.BoundingSphere.isOccluded(r,this.scene.frameState.occluder)?e.disableDepthTestDistance=0:e.disableDepthTestDistance=Number.POSITIVE_INFINITY}}}function _0x453459(e){var t=e.ForeRGBA;return e.isClampToGround&&(t+="_isClampToGround"),t}_0x4767de(),_0x23999b.prototype.update=function(e,t,i,n){WebGLPlot.defined(this.dotBillboards)&&null!==this.dotBillboards&&this.dotBillboards.update(e,t),WebGLPlot.defined(this.polylineCollection)&&null!==this.polylineCollection&&this.polylineCollection.update(e);for(var r=0;r<this.ploygonFillPrimitive.length;r++)(this.ploygonFillPrimitive[r]instanceof WebGLPlot.GroundPrimitive||this.ploygonFillPrimitive[r]instanceof WebGLPlot.Primitive)&&this.ploygonFillPrimitive[r].update(e);for(var o=0;o<this.wallPrimitive.length;o++)this.wallPrimitive[o]instanceof WebGLPlot.Primitive&&this.wallPrimitive[o].update(e);null!==this.groundPrimitive&&this.groundPrimitive.update(e),this.dynamicScaneimitive&&this.dynamicScaneimitive.update(e),this.algoLabels.update(e)},_0x23999b.prototype.render=function(){if(this._valid&&this.updatePrimitive){for(var e=0;e<this.ploygonFillPrimitive.length;e++)this.ploygonFillPrimitive[e]=null;for(e=0;e<this.wallPrimitive.length;e++)this.wallPrimitive[e]=null;this.groundPrimitive&&(this.groundPrimitive=null),this.dynamicScaneimitive&&(this.dynamicScaneimitive=null),this.ploygonFillPrimitive=[],this.wallPrimitive=[],this.ploygonFillAppearance={},this.wallAppearance={};var t=[],i=[],n=[],r=[];for(var o in this.PolygonFillInstances)!this.PolygonFillInstances[o]||this.PolygonFillInstances[o].length<=0?(delete this.PolygonFillInstances[o],this.PolygonFillInstances[o]=null):t=t.concat(this.PolygonFillInstances[o]);for(var a in this.WallInstances)this.WallInstances[a].length<=0?delete this.WallInstances[a]:i=i.concat(this.WallInstances[a]);for(var s in this.GroundInstances)this.GroundInstances[s].length<=0?delete this.GroundInstances[s]:n=n.concat(this.GroundInstances[s]);for(var s in this.dynamicScaneInstances)this.dynamicScaneInstances[s].length<=0?delete this.dynamicScaneInstances[s]:r=r.concat(this.dynamicScaneInstances[s]);for(s=0;s<t.length;s++){var l=t[s];this.ploygonFillAppearance.hasOwnProperty(_0x453459(l))?this.ploygonFillAppearance[_0x453459(l)].push(l):this.ploygonFillAppearance[_0x453459(l)]=[l]}if(WebGLPlot.defined(this.ploygonFillAppearance)&&null!==this.ploygonFillAppearance)for(var e in this.ploygonFillAppearance){var u=this.createPolygonFillPrimitive(e,this.ploygonFillAppearance[e]);this.ploygonFillPrimitive.push(u)}for(var c=0;c<i.length;c++){var h=i[c];this.wallAppearance.hasOwnProperty(h.ForeRGBA)?this.wallAppearance[h.ForeRGBA].push(h):this.wallAppearance[h.ForeRGBA]=[h]}if(WebGLPlot.defined(this.wallAppearance)&&null!==this.wallAppearance)for(var d in this.wallAppearance){var f=this.createWallPrimitive(d,this.wallAppearance[d]);this.wallPrimitive.push(f)}n.length>0&&n[0]&&(this.groundPrimitive=new WebGLPlot.GroundPolylinePrimitive({geometryInstances:n,classificationType:WebGLPlot.ClassificationType.BOTH,clampToS3M:!0,show:!0,appearance:new WebGLPlot.PolylineColorAppearance}),this.groundPrimitive.SymbolType=_0x1c668c.SYMBOL_ALGO),r.length>0&&r[0]&&(this.dynamicScaneimitive=new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.PerInstanceColorAppearance({flat:!0}),asynchronous:!1})),this.updatePrimitive=!1}},_0x23999b.prototype.createPolygonFillPrimitive=function(e,t){var i;i=e.includes("_isClampToGround")?WebGLPlot.Color.fromRgba(e.split("_")[0]):WebGLPlot.Color.fromRgba(e);var n,r=new WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),o=new WebGLPlot.EllipsoidSurfaceAppearance({material:r,aboveGround:!0});return(n=t[0]&&t[0].isClampToGround?new WebGLPlot.GroundPrimitive({geometryInstances:t,appearance:o,show:this._display,asynchronous:!0,classificationType:WebGLPlot.ClassificationType.BOTH}):new WebGLPlot.Primitive({geometryInstances:t,appearance:o,show:this._display,asynchronous:!1})).PolygonFillOrWall=!0,n.SymbolType=_0x1c668c.SYMBOL_ALGO,n},_0x23999b.prototype.createWallPrimitive=function(e,t){var i=WebGLPlot.Color.fromRgba(e),n=WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),r=new WebGLPlot.MaterialAppearance({material:n,faceForward:!0}),o=new WebGLPlot.Primitive({geometryInstances:t,appearance:r,asynchronous:!1,compressVertices:!0,show:!0});return o.PolygonFillOrWall=!0,o.SymbolType=_0x1c668c.SYMBOL_ALGO,o},_0x23999b.prototype.setInterval=function(){var e=this;setInterval((function(){if(WebGLPlot.defined(e.dotBillboards)&&e.dotBillboards.length>0&&e.bIsUpdateDepthTestDis)for(var t in e.dotBillboards._billboards)_0xbdabbf(t)}),100)},_0x23999b.prototype.releaseSelection=function(){this._valid},_0x23999b.prototype.createPolylineCollention=function(e){if(this.polylineCollection&&this.polylineCollection.destroy(),this.polylineCollection=new WebGLPlot.PolylineCollection({opaqueRS:WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}}),translucentRS:WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}})}),this.scene&&this.scene.plotLayers){let e=this.scene.plotLayers._layerQueue.length;for(let t=0;t<e;t++){let e=this.scene.plotLayers._layerQueue[t];if(WebGLPlot.defined(e)&&e){let t=e._geoGraphicObjects.length;for(let i=0;i<t;i++)e._geoGraphicObjects[i]._initialize=!1}}}};const _0x5541d0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x464355=_0x5541d0(void 0,(function(){return _0x464355.toString().search("(((.+)+)+)+$").toString().constructor(_0x464355).search("(((.+)+)+)+$")}));_0x464355();var _0x3b4e68=new Map;function _0x4786d3(e){this.collentionLayer=new _0x23999b(e);var t=!1;if(WebGLPlot.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot.PlotLayers)e.plotLayers.collentionLayer=this.collentionLayer,t=!0;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot.defined(r)&&r instanceof WebGLPlot.PlotLayers){r.collentionLayer=this.collentionLayer,t=!0;break}}if(!t){var o=new WebGLPlot.PlotLayers;o.collentionLayer=this.collentionLayer,e.primitives.add(o),e.plotLayers=o}this.overLayerPolylineCollection=new WebGLPlot.PolylineCollection,e.primitives.add(this.overLayerPolylineCollection)}_0x4786d3.getInstance=function(e){let t=_0x3b4e68.get(e._plottingID);return e&&!WebGLPlot.defined(t)&&(t=new _0x4786d3(e),_0x3b4e68.set(e._plottingID,t)),t},_0x4786d3.addBillboard=function(e,t){let i=_0x3b4e68.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.collentionLayer.dotBillboards.add(e)},_0x4786d3.removeBillboard=function(e,t){let i=_0x3b4e68.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.collentionLayer.dotBillboards.remove(e)},_0x4786d3.addDotModelAndVector=function(e,t){let i=_0x3b4e68.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.collentionLayer._dotModelAndVectorPrimitives.add(e)},_0x4786d3.removeDotModelAndVector=function(e,t){let i=_0x3b4e68.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.collentionLayer._dotModelAndVectorPrimitives.removeAndDestroy(e)},_0x4786d3.removeAllBillboard=function(e){let t=_0x3b4e68.get(e._plottingID);WebGLPlot.defined(t)&&null!==t&&t.collentionLayer.dotBillboards.removeAll()},_0x4786d3.addAlgoPloyline=function(e,t,i){let n=_0x3b4e68.get(i._plottingID);if(null===e)return n.collentionLayer.polylineCollection.add(t);if(WebGLPlot.defined(n)&&null!==n){var r=n.collentionLayer.polylineCollection.add(t);return e.Polylines.push(r),r}},_0x4786d3.removeAllAlgoPloyline=function(e,t){let i=_0x3b4e68.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i){for(var n in!e.Polylines&&e instanceof WebGLPlot.Polyline&&i.collentionLayer.polylineCollection.remove(e),e.Polylines)i.collentionLayer.polylineCollection.remove(e.Polylines[n]);e.Polylines=[]}},_0x4786d3.addAlgoLabel=function(e,t,i){let n=_0x3b4e68.get(i._plottingID);if(WebGLPlot.defined(n)&&null!==n){var r=n.collentionLayer.algoLabels.add(t);return e.Labels.push(r),r}},_0x4786d3.removeAllAlgoLabel=function(e,t){let i=_0x3b4e68.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i){for(var n in e.Labels)i.collentionLayer.algoLabels.remove(e.Labels[n]);e.Labels=[]}},_0x4786d3.setUpdatePrimitive=function(e,t){let i=_0x3b4e68.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&(i.collentionLayer.updatePrimitive=e)},_0x4786d3.setPolygonFillInstances=function(e,t,i){let n=_0x3b4e68.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.PolygonFillInstances[e]=t)},_0x4786d3.setWallInstances=function(e,t,i){let n=_0x3b4e68.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.WallInstances[e]=t)},_0x4786d3.setGroundInstances=function(e,t,i){let n=_0x3b4e68.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.GroundInstances[e]=t)},_0x4786d3.setScaneInstances=function(e,t,i){let n=_0x3b4e68.get(i._plottingID);WebGLPlot.defined(n)&&null!==n&&(n.collentionLayer.dynamicScaneInstances[e]=t,n.collentionLayer.updatePrimitive=!0)},_0x4786d3.setUseDepthTest=function(e,t){let i=_0x3b4e68.get(t._plottingID);var n=WebGLPlot.RenderState.fromCache({depthMask:e,depthTest:{enabled:e}});WebGLPlot.defined(i)&&null!==i&&(i.collentionLayer.polylineCollection._opaqueRS=n,i.collentionLayer.polylineCollection._translucentRS=n)},_0x4786d3.removeAll=function(e){let t=_0x3b4e68.get(e._plottingID);WebGLPlot.defined(t)&&WebGLPlot.defined(t.collentionLayer)&&(t.collentionLayer.polylineCollection.removeAll(),t.collentionLayer.algoLabels.removeAll(),t.collentionLayer.dotBillboards.removeAll(),t.collentionLayer.WallInstances=[],t.collentionLayer.PolygonFillInstances=[],t.collentionLayer.updatePrimitive=[],t.collentionLayer.GroundInstances=[],t.collentionLayer.dynamicScaneInstances=[])},_0x4786d3.addOverLayerPolyLine=function(e,t){let i=_0x3b4e68.get(t._plottingID);if(WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e)return i.overLayerPolylineCollection.add(e)},_0x4786d3.removeOverLayerPolyLine=function(e,t){let i=_0x3b4e68.get(t._plottingID);WebGLPlot.defined(i)&&null!==i&&WebGLPlot.defined(e)&&null!==e&&i.overLayerPolylineCollection.remove(e)};var _0x1d2a45=(_0x2d198f=!0,function(e,t){var i=_0x2d198f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d198f=!1,i}),_0x297900=_0x1d2a45(void 0,(function(){return _0x297900.toString().search("(((.+)+)+)+$").toString().constructor(_0x297900).search("(((.+)+)+)+$")})),_0x2d198f;_0x297900();class _0x10d3db{constructor(e){this._visible=!1,this._isUsePlotVisible=WebGLPlot.defaultValue(e.isUsePlotVisible,!0),this._position=WebGLPlot.defaultValue(e.position,new _0x23de81(0,0,0)),this._rotate=WebGLPlot.defaultValue(e.rotate,new _0x23de81(0,0,0)),this._scale=WebGLPlot.defaultValue(e.scale,1),this._scene=e.scene,this._geoGraphicObject=e.geoGraphicObject}setIsUsePlotVisible(e){this._isUsePlotVisible=e}getIsUsePlotVisible(){return this._isUsePlotVisible}setScene(e){this._scene=e}setVisible(e){return!this._isUsePlotVisible&&(this._visible!==e&&(this._visible=e,e?this._addEffectToScene(this._options):this._removeEffectFromScene()),!0)}isVisible(){return this._visible}setGeoGraphicObject(e){this._geoGraphicObject=e}updateEffect(e){}_addEffectToScene(){}_removeEffectFromScene(){}destroy(){}toGeoJson(){return{}}fromGeoJson(e){}}var _0x521742=(_0x2d0421=!0,function(e,t){var i=_0x2d0421?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d0421=!1,i}),_0x574f0b=_0x521742(void 0,(function(){return _0x574f0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x574f0b).search("(((.+)+)+)+$")})),_0x2d0421;_0x574f0b();const _0x1ae6f5=2;class _0x2d9130{constructor(e){null!=e&&(e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._libID=WebGLPlot$e.defaultValue(e.libID,-1),this._code=WebGLPlot$e.defaultValue(e.code,-1),this._localPoints=WebGLPlot$e.defaultValue(e.localPoints,[]),this._symbolName=WebGLPlot$e.defaultValue(e.symbolName,""),this._symbolType=_0x1c668c.SYMBOL_UNKNOW,this._display=WebGLPlot$e.defaultValue(e.display,!0),this._id=WebGLPlot$e.createGuid(),this._showTipLength=WebGLPlot$e.defaultValue(e.showTipLength,100),this._markHalo=WebGLPlot$e.defaultValue(e.markHalo,!1),this._extendWallHeight=WebGLPlot$e.defaultValue(e.extendWallHeight,-1),this._isUseSymbolLibStyle=WebGLPlot$e.defaultValue(e.isUseSymbolLibStyle,!0),this._surroundRatioVal=WebGLPlot$e.defaultValue(e.surroundRatioVal,.002),this._isEdit=!1,this.isDrawing=WebGLPlot$e.defaultValue(e.isDrawing,!1),this._layer=WebGLPlot$e.defaultValue(e.layer,null),this._initialize=!1,this._primitive=[],this._symbolLibManager=WebGLPlot$e.getLibManager(this.layer._scene._plottingID),this._symbolStyle=WebGLPlot$e.defaultValue(e.symbolStyle,new _0x291171({graphicObject:this})),this._symbolTextStyle=WebGLPlot$e.defaultValue(e.symbolTextStyle,new _0x40b7f2({graphicObject:this})),this._serverData=WebGLPlot$e.defaultValue(e.serverData,null),this._textContent=WebGLPlot$e.defaultValue(e.textContent,""),this.readStyleFromSymbolLib(),this._GeoJsonFeature=null,this._extendProperty=new WebGLPlot$e.createProperty,this._annotationArray=WebGLPlot$e.defaultValue(e.annotationArray,[]),this._wholeHeight=WebGLPlot$e.defaultValue(e.wholeHeight,0),this._disableDepthTestDistance=Number.MAX_VALUE,this._dotDepthTest=!0,this._initSymbolFinished=new WebGLPlot$e.Event,this._geoEffectArray=[],this._geoEntity=void 0)}readStyleFromSymbolLib(){var e=this._serverData;WebGLPlot$e.defined(e)&&this._isUseSymbolLibStyle?(this._symbolType=this._serverData.symbolType,this._symbolName=WebGLPlot$e.defaultValue(e.symbolName,""),this._middleMarkExist=WebGLPlot$e.defaultValue(e.middleMarkExist,!1),this._symbolStyle._lineColor=WebGLPlot$e.defaultValue(_0x5e8252(e.style.lineColor),this._symbolStyle.lineColor),this._symbolStyle._fillForeColor=WebGLPlot$e.defaultValue(_0x5e8252(e.style.fillForeColor),this._symbolStyle.fillForeColor)):this.setSymbolName(this._code)}setGeoEntityShowMode(e){switch((!WebGLPlot$e.defined(this.__dotPlotLibID)||!WebGLPlot$e.defined(this.__dotPlotCode))&&(this.__dotPlotLibID=0,this.__dotPlotCode=_0x1c668c.SYMBOL_POINT),e){case _0x2bcc5b.Marker:if(""===this.modelPath)return;this._libID=0,this._code=_0x1c668c.SYMBOL_Model;break;case _0x2bcc5b.Picture:if(""===this.picturePath)return;this._libID=0,this._code=_0x1c668c.SYMBOL_PICTURE;break;case _0x2bcc5b.Grid:case _0x2bcc5b.Vector:if(this._libID=this.__dotPlotLibID,this._code=this.__dotPlotCode,0===this.__dotPlotLibID)this._code===_0x1c668c.SYMBOL_POINT&&this.__initSymbolPointSymbolData();else{let t=this;const i=WebGLPlot$e.getLibManager(this.layer._scene._plottingID).getSymbolLibByLibId(this._libID);if(WebGLPlot$e.defined(i)){const n=i.getSymbolData(this._code);WebGLPlot$e.defined(n)?(this._serverData=n,this.readStyleFromSymbolLib(),this._getServerDataPrototype(n)):this.getServerData(this._libID,this._code,(function(){t.readStyleFromSymbolLib(),t._getServerDataPrototype(t._serverData),t._initialize=!1,t.showMode=e}))}else this.getServerData(this._libID,this._code,(function(){t.readStyleFromSymbolLib(),t._getServerDataPrototype(t._serverData),t._initialize=!1,t.showMode=e}))}}this.showMode===e&&(this._initialize=!1),this.showMode=e}getGeoEntityShowMode(){return this._showMode}setGeoEntity(e){this._geoEntity=e}getGeoEntity(){return this._geoEntity}createSymbol(){_0x1c668c.SYMBOL_UNKNOW!==this._symbolType&&(_0x1c668c.SYMBOL_DOT,this._symbolType,WebGLPlot$e.defined(this._symbol))}setSymbolName(e){switch(e){case _0x1c668c.SYMBOL_POLYLINE:this._symbolName=WebGLPlot$e.plotI18n("polyLine");break;case _0x1c668c.SYMBOL_RECTANGLE:this._symbolName=WebGLPlot$e.plotI18n("rectangle");break;case _0x1c668c.SYMBOL_PARALLELOGRAM:this._symbolName=WebGLPlot$e.plotI18n("parallelogram");break;case _0x1c668c.SYMBOL_CIRCLE:this._symbolName=WebGLPlot$e.plotI18n("circle");break;case _0x1c668c.SYMBOL_ELLIPSE:this._symbolName=WebGLPlot$e.plotI18n("ellipse");break;case _0x1c668c.SYMBOL_ARBITRARYPOLYGON:this._symbolName=WebGLPlot$e.plotI18n("polygon");break;case _0x1c668c.SYMBOL_TEXT:this._symbolName=WebGLPlot$e.plotI18n("text");break;case _0x1c668c.SYMBOL_ARC:this._symbolName=WebGLPlot$e.plotI18n("arc");break;case _0x1c668c.SYMBOL_PARALLELLINE:this._symbolName=WebGLPlot$e.plotI18n("parallel");break;case _0x1c668c.SYMBOL_TRAPEZOID:this._symbolName=WebGLPlot$e.plotI18n("trapezoid");break;case _0x1c668c.SYMBOL_POLYBEZIERCLOSED:this._symbolName=WebGLPlot$e.plotI18n("closedBesselCurve");break;case _0x1c668c.SYMBOL_CHORD:this._symbolName=WebGLPlot$e.plotI18n("chord");break;case _0x1c668c.SYMBOL_PIE:this._symbolName=WebGLPlot$e.plotI18n("sector");break;case _0x1c668c.SYMBOL_KIDNEY:this._symbolName=WebGLPlot$e.plotI18n("kidney");break;case _0x1c668c.SYMBOL_BRACE:this._symbolName=WebGLPlot$e.plotI18n("brace");break;case _0x1c668c.SYMBOL_REGULARPOLYGON:this._symbolName=WebGLPlot$e.plotI18n("regularPolygon");break;case _0x1c668c.SYMBOL_POLYBEZIER:this._symbolName=WebGLPlot$e.plotI18n("bezier");break;case _0x1c668c.SYMBOL_RUNWAY:this._symbolName=WebGLPlot$e.plotI18n("runway");break;case _0x1c668c.SYMBOL_CURVEEIGHT:this._symbolName=WebGLPlot$e.plotI18n("curveEight");break;case _0x1c668c.SYMBOL_CONCENTRICCIRCLE:this._symbolName=WebGLPlot$e.plotI18n("concentricCircle");break;case _0x1c668c.SYMBOL_COMBINATIONALCIRCLE:this._symbolName=WebGLPlot$e.plotI18n("combinedCircle");break;case _0x1c668c.SYMBOL_NODECHAIN:this._symbolName=WebGLPlot$e.plotI18n("nodeChain");break;case _0x1c668c.SYMBOL_CIRCLECHORD:this._symbolName=WebGLPlot$e.plotI18n("chord");break;case _0x1c668c.SYMBOL_CIRCLEPIE:this._symbolName=WebGLPlot$e.plotI18n("sector");break;case _0x1c668c.SYMBOL_CIRCLEARC:this._symbolName=WebGLPlot$e.plotI18n("arc");break;case _0x1c668c.SYMBOL_Model:this._symbolName=WebGLPlot$e.plotI18n("SYMBOL_Model");break;case _0x1c668c.SYMBOL_POINT:this._symbolName=WebGLPlot$e.plotI18n("SYMBOL_POINT")}}setVisible(e){if(0!==this._primitive.length)for(var t=0;t<this._primitive.length;t++)this._primitive[t].show=e;WebGLPlot$e.defined(this._layer.selectedFeature)&&this.id===this._layer.selectedFeature.id&&!this.display&&this._layer._plottingEdit&&this._layer._plottingEdit.releaseSelection(!0),!this.billboard||this.showMode!==_0x2bcc5b.Grid&&this.showMode!==_0x2bcc5b.Picture?this._initialize=!1:this.billboard.show=e}getServerData(e,t,i){var n=this,r=WebGLPlot$e.getLibManager(this.layer._scene._plottingID);var o=WebGLPlot$e.getServerData(e,t,void 0,this._layer._scene._plottingID);!o||(o.getSymbolInfo.events.on({processCompleted:function(t){-1!==t.result.libID&&-1!==t.result.code&&(n._serverData=t.result,r.setSymbolData(e,t.result),i())},processFailed:function(){},scope:n}),o.getSymbolInfo.processAsync(o.getSymbolInfoParameters))}addGeoEffect(e){if(e instanceof _0x10d3db)return this._geoEffectArray.forEach((t=>{if(t.id===e.id)return this._geoEffectArray})),this._geoEffectArray.push(e),e.setGeoGraphicObject(this),this._geoEffectArray}getGeoEffectArray(){return this._geoEffectArray}getGeoEffectByID(e){if(!WebGLPlot$e.defined(e))return!1;for(let t=0;t<this._geoEffectArray.length;t++){const i=this._geoEffectArray[t];if(e===i.id)return i}}removeGeoEffectByIndex(e){return e>=0&&e<this._geoEffectArray.length&&(this._geoEffectArray[e].destroy(),this._geoEffectArray[e]=void 0,this._geoEffectArray.splice(e,1),!0)}removeGeoEffectByID(e){if(!WebGLPlot$e.defined(e))return!1;for(let t=0;t<this._geoEffectArray.length;t++){if(e===this._geoEffectArray[t].id)return this._geoEffectArray[t].destroy(),this._geoEffectArray[t]=void 0,this._geoEffectArray.splice(t,1),!0}return!1}removeAllGeoEffect(){this._geoEffectArray.forEach((e=>{e.destroy(),e=void 0})),this._geoEffectArray=[]}__setEffectParameter(e,t){WebGLPlot$e.defined(t)&&t>=0&&t<this._geoEffectArray.length?this._geoEffectArray[t].updateEffect(e):this._geoEffectArray.forEach((t=>{t.updateEffect(e)}))}mergeDefaultStyle(){var e=WebGLPlot$e.getDefaultStyle({libID:this._libID,code:this._code});if(e&&e.defaultFlag){var t=e.symbolStyle,i=e.symbolTextStyle,n=e.gridSymbolSize;this._symbolStyle=t.clone(),this._symbolStyle._graphicObject=this,this._symbolTextStyle=i.clone(),_0x1c668c.SYMBOL_DOT===this.symbolType&&(-1!==e.lineSymbolID&&(this.lineSymbolID=e.lineSymbolID),-1!==e.gridLineWidth&&(this.gridLineWidth=e.gridLineWidth),n.x>0&&n.y>0&&(this.gridSymbolSize=e.gridSymbolSize.clone()),""!==e.modelPath&&(this.modelPath=e.modelPath))}}update(e,t,i,n){if(this._display&&0!==this._primitive.length)for(var r=0;r<this._primitive.length;r++)this._primitive[r].update(e)}initSymbol(){}getSymbolData(e){WebGLPlot$e.defined(e)||(e=!0);var t={};if(t.version=_0x1ae6f5,t.hasOwnProperty("type")||(t.type="GRAPHICOBJECT"),t.hasOwnProperty("libID")||(t.libID=this._libID),t.hasOwnProperty("code")||(t.code=this._code),t.hasOwnProperty("dotPlotLibID")||(t.dotPlotLibID=this.__dotPlotLibID),t.hasOwnProperty("dotPlotCode")||(t.dotPlotCode=this.__dotPlotCode),t.hasOwnProperty("localePoints")||(t.localePoints=this.localPoints),t.hasOwnProperty("symbolName")||(t.symbolName=this.symbolName),t.hasOwnProperty("symbolType")||(t.symbolType=this.symbolType),t.hasOwnProperty("uuid")||(t.uuid=this.id),t.hasOwnProperty("isEdit")||(t.isEdit=!1),t.hasOwnProperty("scaleByMap")||(t.scaleByMap=!1),t.hasOwnProperty("wholeHeight")||(t.wholeHeight=this.wholeHeight),!t.hasOwnProperty("style")){var i=new Object;t.style=i,i.lineColor=_0x51e327(this.symbolStyle.lineColor),i.fillSymbolID=this.symbolStyle._fillSymbolID,i.fillBackColor=_0x51e327(this.symbolStyle._fillBackColor),i.fillForeColor=_0x51e327(this.symbolStyle._fillForeColor),i.fillBackOpaque=this.symbolStyle._fillBackOpaque,i.fillGradientMode=this.symbolStyle._fillGradientMode,i.fillCenterOffsetX=this.symbolStyle.fillGradientOffsetRatioX,i.fillCenterOffsetY=this.symbolStyle.fillGradientOffsetRatioY,i.fillAngle=this.symbolStyle.fillGradientAngle,i.fillOpaqueRate=100-this.symbolStyle.fillOpaqueRate,i.lineWidth3D=this.symbolStyle.lineWidth,t.style.hasOwnProperty("display")||(this._display?i.display="display":i.display="none"),t.style=i}if(!t.hasOwnProperty("textStyle2D")){var n=new Object;n.fontHeight=25.4*this._symbolTextStyle.fontSize/96,n.foreColor=_0x51e327(this._symbolTextStyle._foreColor),n.backColor=_0x51e327(this._symbolTextStyle._backColor),n.outline=this._symbolTextStyle._outline,n.fontStrokeColor=_0x51e327(this._symbolTextStyle._backColor),n.backOpaque=this.symbolTextStyle.isShowTextBox,n.fontBackgroundColor=_0x51e327(this.symbolTextStyle.textBoxLineColor),n.fontName=this._symbolTextStyle._fontName,n.italic=this._symbolTextStyle._italic,n.bold=this._symbolTextStyle._bold,n.align=this._symbolTextStyle._align,n.italicAngle=this._symbolTextStyle._italicAngle,n.shadow=this._symbolTextStyle._shadow,n.sizeFixed=this._symbolTextStyle._sizeFixed,n.underline=this._symbolTextStyle._underline,n.rotation=this._symbolTextStyle._rotation,n.strikeout=this._symbolTextStyle._strikeout,n.borderSpacingWidth=this._symbolTextStyle._borderSpacingWidth,n.outlineWidth=25.4*this._symbolTextStyle._outlineWidth/96,n.fontWidth=this._symbolTextStyle._fontWidth,n.opaqueRate=this._symbolTextStyle._opaqueRate,n.stringAlignment=this._symbolTextStyle._stringAlignment,n.fontScale=this._symbolTextStyle._text3DScale,n.fontWeight=this._symbolTextStyle._fontWeight,t.textStyle2D=n}if(!t.hasOwnProperty("textStyle3D")){var r=new Object;r.foreColor=_0x51e327(this.symbolTextStyle.foreColor),r.backColor=_0x51e327(this.symbolTextStyle.backColor),r.outline=this.symbolTextStyle.outline,r.textBoxColor=this.symbolTextStyle.textBoxColor,r.textBoxLineColor=this.symbolTextStyle.textBoxLineColor,r.fontName=this.symbolTextStyle.fontName,r.italic=this.symbolTextStyle.italic,r.bold=this.symbolTextStyle.bold,r.align=this.symbolTextStyle.align,r.fontSize=this.symbolTextStyle.fontSize,r.isShowTextBox=this.symbolTextStyle.isShowTextBox,t.textStyle3D=r}if(t.hasOwnProperty("surroundLineColor")||(t.surroundLineColor=_0x51e327(this.symbolStyle.surroundLineColor)),t.hasOwnProperty("surroundLineWidth2D")||(t.surroundLineWidth2D=.5),t.hasOwnProperty("surroundLineType")||(t.surroundLineType=this.symbolStyle.surroundLineType),_0x1c668c.SYMBOL_DOT===this._symbolType||_0x1c668c.SYMBOL_Model===this._symbolType||_0x1c668c.SYMBOL_PICTURE===this._symbolType)t.hasOwnProperty("showMode")||(t.showMode=this.showMode),t.hasOwnProperty("scale3D")||(t.scale3D=this._scale),t.hasOwnProperty("rotate3D")||(t.rotate3D=this._rotate),t.hasOwnProperty("positionOffset")||(t.positionOffset=this._hasDragLine),t.hasOwnProperty("dragPoint")||(t.dragPoint=this.dragPoint),t.hasOwnProperty("symbolRank")||(t.symbolRank=this._symbolRank),t.hasOwnProperty("anchorPoint")||(t.anchorPoint=this.anchorPoint),t.hasOwnProperty("middleMarkBounds")||(t.middleMarkBounds=this.middleMarkBounds),t.hasOwnProperty("negativeImage")||(t.negativeImage=this._isNegativeImage),t.hasOwnProperty("symbolSize")||(t.symbolSize=this._symbolSize),t.hasOwnProperty("gridSymbolSize")||(t.gridSymbolSize=this._gridSymbolSize),t.hasOwnProperty("pictureSymbolSize")||(t.pictureSymbolSize=this._pictureSymbolSize),t.hasOwnProperty("picturePath")||(t.picturePath=this.picturePath),t.hasOwnProperty("modelPath")||(t.modelPath=this.modelPath),t.hasOwnProperty("modelScale")||(t.modelScale=this.modelScale),t.hasOwnProperty("modelRotate")||(t.modelRotate=this._modelRotate),t.hasOwnProperty("vectorScale")||(t.vectorScale=this.vectorScale),t.hasOwnProperty("middleMarkExist")||(t.middleMarkExist=this._isMiddleMarkExist),t.hasOwnProperty("middleMarkBounds")||(t.middleMarkBounds=this._middleMarkBounds),t.hasOwnProperty("vectorRotate")||(t.vectorRotate=this._vectorRotate),t.hasOwnProperty("vectorDefaultSize")||(t.vectorDefaultSize=this._vectorDefaultSize),t.hasOwnProperty("dotShowMode")||(t.dotShowMode=this._showMode),t.hasOwnProperty("innerCells")||(t.innerCells=this._innerCells),t.hasOwnProperty("surroundLineWidth3D")||(t.surroundlineWidth3D=this.surroundLineWidth),t.hasOwnProperty("middleMarkExist")||(t.middleMarkExist=this.middleMarkExist),t.hasOwnProperty("annotationPosition")||(t.annotationPosition=this._textPos),t.hasOwnProperty("gridSurroundLineWidth3D")||(t.gridSurroundLineWidth3D=this._gridSurroundLineWidth/4),t.hasOwnProperty("gridLineWidth")||(t.gridLineWidth3D=this._gridLineWidth/4),t.hasOwnProperty("symbolSizeInLib")||(t.symbolSizeInLib=this._symbolSizeInLib),t.hasOwnProperty("BloodVolumes")||(t.BloodVolumes=this.BloodVolumes),t.hasOwnProperty("bIsShowBloodVolume")||(t.bIsShowBloodVolume=this.bIsShowBloodVolume),t.hasOwnProperty("disableDepthTestDistance")||(t.disableDepthTestDistance=this._disableDepthTestDistance.toString()),t.hasOwnProperty("sizeInMeters")||(t.sizeInMeters=this.sizeInMeters),t.hasOwnProperty("symbolSizeInMeters")||(t.symbolSizeInMeters=this.symbolSizeInMeters),t.hasOwnProperty("alwaysHasMiddelText")||(t.alwaysHasMiddelText=this.alwaysHasMiddelText),t.style.hasOwnProperty("lineSymbolID")||(t.style.lineSymbolID=this._lineSymbolID);else{if(t.hasOwnProperty("surroundLineWidth3D")||(t.surroundlineWidth3D=this._symbolStyle._surroundLineWidth),t.hasOwnProperty("updateSubSize")||(t.updateSubSize=this._updateSubSize),t.hasOwnProperty("subSymbolSize")||(t.subSymbolSize=this._subSymbolSize),!t.hasOwnProperty("subSymbols")&&(t.subSymbols=[],this._subSymbols))for(var o=0;o<this._subSymbols.length;++o)t.subSymbols.push(this._subSymbols[o]);t.hasOwnProperty("scaleValues")||(t.scaleValues=this._scaleValues),t.hasOwnProperty("subSymbolScaleValue")||(t.subSymbolScaleValue=this._subSymbolScaleValue),t.hasOwnProperty("extendWallOpacity")||(t.wallOpaqueRate=100-this.extendWallOpacity),!t.hasOwnProperty("isClampToGround")&&WebGLPlot$e.defined(this.isClampToGround)&&(t.isClampToGround=this.isClampToGround),!t.hasOwnProperty("arrowHeadType")&&WebGLPlot$e.defined(this.arrowHeadType)&&(t.arrowHeadType=this.arrowHeadType),!t.hasOwnProperty("arrowBodyType")&&WebGLPlot$e.defined(this.arrowBodyType)&&(t.arrowBodyType=this.arrowBodyType),!t.hasOwnProperty("arrowTailType")&&WebGLPlot$e.defined(this.arrowTailType)&&(t.arrowTailType=this.arrowTailType),t.style.hasOwnProperty("extendWallHeight")||(t.style.extendHeight=this._extendWallHeight)}return(this._symbolType!==_0x1c668c.SYMBOL_DOT||this._symbolType!==_0x1c668c.SYMBOL_TEXT)&&(t._CenterPosition=this._CenterPosition),t.hasOwnProperty("textContent")||(t.textContent=this._textContent),t.hasOwnProperty("markHalo")||(t.markHalo=this._markHalo),t.hasOwnProperty("showTipLength")||(t.showTipLength=this._showTipLength),t.hasOwnProperty("extendProperty")||(t.extendProperty=this.extendProperty),t.hasOwnProperty("annotationArray")||(t.annotationArray=this.annotationArray),null!==this._GeoJsonFeature?(_0x542bef(this._GeoJsonFeature,t),this._GeoJsonFeature):t}toGeoJson(){var e=this.getSymbolData();return WebGLPlot$e.toJSON(e)}getMinEditPts(){return WebGLPlot$e.defined(this)?_0x2909c1.isSymbolDot(this._symbolType)?1:this.getMinEditPts():0}getMaxEditPts(){return WebGLPlot$e.defined(this)?_0x2909c1.isSymbolDot(this._symbolType)?1:this.getMaxEditPts():0}drawAnnotationArray(){if(this._annotationArray.length>0)for(var e=0;e<this._annotationArray.length;e++){var t=null,i=this._annotationArray[e];if(""!==i._textContent&&i){var n=i._textStyle,r=i._textContent,o=new WebGLPlot$e.Color(n._foreColor.red,n._foreColor.green,n._foreColor.blue,n._foreColor.alpha),a=n._fontSize+"px "+n._fontName;0!==i._localPoint.x&&0!==i._localPoint.y?t=i._localPoint:(t=this._localPoints[0].clone(),i._localPoint=t),t=WebGLPlot$e.Cartesian3.fromDegrees(t.x,t.y,t.z);var s={style:n._outline?WebGLPlot$e.LabelStyle.FILL_AND_OUTLINE:WebGLPlot$e.LabelStyle.FILL,outlineColor:n._outlineColor,outlineWidth:n._outlineWidth,position:t,text:r,font:a,fillColor:o,horizontalOrigin:WebGLPlot$e.HorizontalOrigin.CENTER,id:this._id};(s=_0x4786d3.addAlgoLabel(this,s,this._layer._scene)).SymbolType=_0x1c668c.SYMBOL_TEXT}}}clearAllAnnotationArray(){this.annotationArray=[]}setAnnotationArray(e,t,i){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t)||!WebGLPlot$e.defined(i)||this.annotationArray.length<=0)return!1;var n=this.annotationArray[e];switch(t){case"textContent":n.textContent=i;break;case"localPoint":n.localPoint=i;break;case"fontName":n._textStyle.fontName=i;break;case"foreColor":n._textStyle.foreColor=i;break;case"fontSize":n._textStyle.fontSize=i;break;case"outlineWidth":n._textStyle.outlineWidth=i;break;case"outlineColor":n._textStyle.outlineColor=i;break;case"outline":n._textStyle.outline=i}return this._initialize=!1,!0}releaseSelection(){this.layer&&this.layer._plottingEdit&&this.layer._plottingEdit.unSelection(!0)}_destroy(){}_destroyBase(){}}function _0x542bef(e,t){for(var i in t)"style"===i||"textStyle2D"===i||"textStyle3D"===i||(e[i]=t[i]);var n=new Object;for(var i in t.style)n[i]=t.style[i];e.style=n;var r=new Object;for(var i in t.textStyle2D)r[i]=t.textStyle2D[i];e.textStyle2D=r;var o=new Object;for(var i in t.textStyle3D)o[i]=t.textStyle3D[i];e.textStyle3D=o}function _0x5e8252(e){var t=new WebGLPlot$e.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,t}function _0x51e327(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}Object.defineProperties(_0x2d9130.prototype,{libID:{get:function(){return this._libID},set:function(e){if(e===this._libID||"number"!=typeof e)return!1;this._libID=e}},code:{get:function(){return this._code},set:function(e){if(e===this._code||"number"!=typeof e)return!1;this._code=e}},symbolName:{get:function(){return this._symbolName},set:function(e){if(e===this._symbolName)return!1;this._symbolName=e}},symbolType:{get:function(){return this._symbolType}},id:{get:function(){return this._id},set:function(e){e!==this._id&&(this._id=e)}},localPoints:{get:function(){return this._localPoints},set:function(e){e===this._localPoints||!Array.isArray(e)||(this.__setEffectParameter({point:e[0]}),this._localPoints=e,_0x2909c1.isSymbolDot(this.symbolType)&&WebGLPlot$e.defined(this.billboard)?this.billboard.position=WebGLPlot$e.Cartesian3.fromDegrees(e[0].x,e[0].y,e[0].z):this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this),this._layer&&this._layer._isEditable&&this._layer._plottingEdit&&this._layer._plottingEdit._graphicObject&&this._layer._plottingEdit._graphicObject.id===this.id&&this._layer._plottingEdit.drawSymbolExtend(this))}},layer:{get:function(){return this._layer}},isEdit:{get:function(){return this._isEdit},set:function(e){e===this._isEdit||e.constructor!==Boolean||(this._isEdit=e,this._initialize=!1)}},middleMarkExist:{get:function(){return this._middleMarkExist}},symbolStyle:{get:function(){return this._symbolStyle},set:function(e){e===this._symbolStyle||"number"!=typeof e||(this._symbolStyle=e,this._initialize=!1)}},symbolTextStyle:{get:function(){return this._symbolTextStyle},set:function(e){e===this._symbolTextStyle||"number"!=typeof e||(this._symbolTextStyle=e,this._initialize=!1)}},markHalo:{get:function(){return this._markHalo},set:function(e){e===this._markHalo||e.constructor!==Boolean||(this._markHalo=e,this._initialize=!1)}},showTipLength:{get:function(){return this._showTipLength},set:function(e){e===this._showTipLength||"number"!=typeof e||(this._showTipLength=e,this._initialize=!1)}},display:{get:function(){return this._display},set:function(e){e===this._display||e.constructor!==Boolean||(this._display=e,this.setVisible(e),this.__setEffectParameter({visible:e}))}},symbol:{get:function(){return this}},extendProperty:{get:function(){return this._extendProperty}},annotationArray:{get:function(){return this._annotationArray},set:function(e){if(e===this._annotationArray||!Array.isArray(e))return null;var t=this._layer._plottingEdit.CtrlPosition._ctrlPoints;if(this._annotationArray=e,WebGLPlot$e.defined(e.length)&&0===e.length){if(WebGLPlot$e.defined(this._layer._plottingEdit))for(var i=0;i<t.length;i++){var n=t.get(i);WebGLPlot$e.defined(n.annotationIndex)&&(n.show=!1)}}else if(WebGLPlot$e.defined(e.length)&&0!==e.length){const i=this._layer._scene.camera._positionCartographic.height;if(this._isEdit&&WebGLPlot$e.defined(this._layer._plottingEdit)){for(var r=0;r<t.length;r++)WebGLPlot$e.defined(t.get(r).annotationIndex)&&(t.get(r).show=!1,t.remove(t.get(r)));for(var o=0;o<e.length;o++){var a=e[o];if(0===a._localPoint.x&&0===a._localPoint.y){const e=1.141e-8*i*(o+1);let t=this._localPoints[0].clone();t.x+=e,a._localPoint=t}this._layer._plottingEdit.addAnnotationArrayPositionPt(a,o)}}}this._initialize=!1}},wholeHeight:{get:function(){return this._wholeHeight},set:function(e){e===this._wholeHeight||"number"!=typeof e||(this._wholeHeight=e,this._initialize=!1)}},dotDepthTest:{get:function(){return this._dotDepthTest},set:function(e){e===this._dotDepthTest||e.constructor!==Boolean||(this._disableDepthTestDistance=e?Number.MAX_VALUE:Number.MIN_VALUE,this._dotDepthTest=e,this._initialize=!1)}},textContent:{get:function(){return this._textContent},set:function(e){e!==this._textContent&&(this._textContent=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}}});var _0x2bddfb=(_0x2ef029=!0,function(e,t){var i=_0x2ef029?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ef029=!1,i}),_0x57f709=_0x2bddfb(void 0,(function(){return _0x57f709.toString().search("(((.+)+)+)+$").toString().constructor(_0x57f709).search("(((.+)+)+)+$")})),_0x2ef029;function _0x8c2e6e(e,t){this.subObjects=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._id=void 0===t?WebGLPlot.createGuid():t,this._initialize=!0,this.subFeatures=[],this.symbolName="GroupObject",this._isEdit=!1,this.libID=0,this.code=_0x1c668c.GROUPOBJECT,this.symbolType=_0x1c668c.GROUPOBJECT,this.addComponents(this.subObjects),this._GeoJsonFeature=null,this._centerPt3D=new _0x23de81}_0x57f709(),_0x8c2e6e.prototype.addComponents=function(e){for(var t in e)e[t]&&(e[t]instanceof _0x2d9130||e[t]instanceof _0x8c2e6e)&&this.subFeatures.push(e[t].clone());this._initialize=!1},_0x8c2e6e.prototype.unGroupObject=function(e){for(var t in this.subObjects)this.subObjects[t]._initialize=!1;return this.subObjects},_0x8c2e6e.prototype.setOffset=function(e,t){var i=e.z-this.getBounds().min_Z;for(var n in this.subFeatures){if(t)for(var r=0;r<this.subFeatures[n]._localPoints.length;r++)this.subFeatures[n]._localPoints[r].z+=i;else for(r=0;r<this.subFeatures[n]._localPoints.length;r++){var o=this.subFeatures[n]._localPoints[r];this.subFeatures[n]._localPoints[r]=new _0x23de81(o.x+e.x,o.y+e.y,o.z+e.z)}this.subFeatures[n]._initialize=!1}},_0x8c2e6e.prototype.clone=function(){return new _0x8c2e6e(this.subFeatures)},_0x8c2e6e.prototype.update=function(e,t,i,n){if(0!==this.subFeatures.length)for(var r=this.getSubObjectsFromFeatures(this.subFeatures),o=0;o<r.length;o++)r[o].update(e,t,i,n)},_0x8c2e6e.prototype.initSymbol=function(){if(0!==this.subFeatures.length)for(var e=this.getSubObjectsFromFeatures(this.subFeatures),t=0;t<e.length;t++)e[t].initSymbol();this._initialize=!0},_0x8c2e6e.prototype.getFeatureByUuid=function(e){var t=this.getSubObjectsFromFeatures(this.subFeatures);for(var i in t)if(t[i]._id===e)return!0;return!1},_0x8c2e6e.prototype.getBounds=function(){var e=[],t=[],i=[],n=0,r=0;for(var o in this.subFeatures){var a=this.subFeatures[o];if(a.symbolType===_0x1c668c.SYMBOL_DOT||a.symbolType===_0x1c668c.SYMBOL_TEXT){a.showMode===_0x2bcc5b.Marker?n=a._model._initialRadius*a._model.scale:a.showMode===_0x2bcc5b.Vector&&(n=a._dotVector.vectorHeight);var s=a.localPoints[0];e.push(s.x),t.push(s.y),i.push(s.z),r=s.z+n}else if(a.symbolType===_0x1c668c.GROUPOBJECT){var l=a.getBounds();e.push(l.max_X),t.push(l.max_Y),i.push(l.max_Z),e.push(l.min_X),t.push(l.min_Y),i.push(l.min_Z)}else{var u=a.computeBounds();for(var c in a.localPoints){var h=a.localPoints[c];e.push(h.x),t.push(h.y),i.push(h.z)}e.push(u.maxX),t.push(u.maxY),e.push(u.minX),t.push(u.minY)}}var d=Math.max.apply({},e),f=Math.max.apply({},t),p=Math.max.apply({},i);return{max_X:d,max_Y:f,max_Z:p=p>r?p:r,min_X:Math.min.apply({},e),min_Y:Math.min.apply({},t),min_Z:Math.min.apply({},i),modelRadius:n}},_0x8c2e6e.prototype.getSubObjectsFromFeatures=function(e){var t=[];for(var i in e)e[i]instanceof _0x8c2e6e?t=t.concat(this.getSubObjectsFromFeatures(e[i].subFeatures)):t.push(e[i]);return t},_0x8c2e6e.prototype.getSymbolData=function(){if(null===this._GeoJsonFeature){var e={version:2,libID:0,code:1e3,type:"GRAPHICOBJECT"};for(var t in e.uuid=this._id,e.symbolName=this.symbolName,e.symbolType=this.symbolType,e.geometries=[],this.subFeatures)e.geometries.push(this.subFeatures[t].getSymbolData());return e}return this._GeoJsonFeature},_0x8c2e6e.prototype._destroy=function(){for(var e in this.subFeatures)this.subFeatures[e]._destroy(),this.subFeatures[e]=null;this.subFeatures=[]};var _0x11e1ba=(_0x38c8d3=!0,function(e,t){var i=_0x38c8d3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x38c8d3=!1,i}),_0x40757b=_0x11e1ba(void 0,(function(){return _0x40757b.toString().search("(((.+)+)+)+$").toString().constructor(_0x40757b).search("(((.+)+)+)+$")})),_0x38c8d3;_0x40757b();var _0x3d2525={UNKNOWN:0,PLAYING:1,PAUSE:2,STOP:3,RESET:4},_0x577f4c=Object.freeze(_0x3d2525),_0x5f90b1=(_0x224ba7=!0,function(e,t){var i=_0x224ba7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x224ba7=!1,i}),_0xefef14=_0x5f90b1(void 0,(function(){return _0xefef14.toString().search("(((.+)+)+)+$").toString().constructor(_0xefef14).search("(((.+)+)+)+$")})),_0x224ba7;_0xefef14();var _0x90363a={ANIMATION_UNKNOWN:-1,ANIMATION_WAY:0,ANIMATION_BLINK:1,ANIMATION_ATTRIBUTE:2,ANIMATION_SHOW:3,ANIMATION_ROTATE:4,ANIMATION_SCALE:5,ANIMATION_GROW:6,ANIMATION_HIDE_EXP:12,ANIMATION_REDUCE_EXP:13,ANIMATION_MOVEIN_EXP:14,ANIMATION_MOVEOUT_EXP:15,ANIMATION_ZOOMIN_EXP:16,ANIMATION_ZOOMOUT_EXP:17,ANIMATION_CURVE_EXP:18,ANIMATION_BROKENLINE_EXP:19,ANIMATION_GROW_EXP:20,ANIMATION_WAY_EXP:21,ANIMATION_BLINK_EXP:22,ANIMATION_SHOW_EXP:23,ANIMATION_MOVEVIEW_EXP:24,ANIMATION_WAY_GROUP:25},_0x144579=Object.freeze(_0x90363a),_0x50ff62=(_0x28fc9a=!0,function(e,t){var i=_0x28fc9a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28fc9a=!1,i}),_0x1bf86b=_0x50ff62(void 0,(function(){return _0x1bf86b.toString().search("(((.+)+)+)+$").toString().constructor(_0x1bf86b).search("(((.+)+)+)+$")})),_0x28fc9a;_0x1bf86b();var WebGLPlot$d=window.WebGLPlot=window.WebGLPlot||{};function _0x34cdef(e,t){if(e&&!(t.points.length<2)){this.plottingLayer=WebGLPlot$d.defaultValue(e,null),this.libID=WebGLPlot$d.defaultValue(t.libID,0),this.code=WebGLPlot$d.defaultValue(t.code,99999),this.url=WebGLPlot$d.defaultValue(t.url,""),this.startTime=WebGLPlot$d.defaultValue(t.startTime,0),this.duration=WebGLPlot$d.defaultValue(t.duration,5),this.lineColor=WebGLPlot$d.defaultValue(t.lineColor,new WebGLPlot$d.Color(1,0,0,1)),this.lineWidth=WebGLPlot$d.defaultValue(t.lineWidth,1),this.linePtsCount=WebGLPlot$d.defaultValue(t.linePtsCount,100),this.pathType=WebGLPlot$d.defaultValue(t.pathType,0),this.isShowPathLine=WebGLPlot$d.defaultValue(t.isShowPathLine,!1),this.isTangentDirection=WebGLPlot$d.defaultValue(t.isTangentDirection,!0),this.PathPts=t.points;var i=this;if(0===this.libID&&99999===this.code){var n={libID:this.libID,code:this.code,url:this.url,points:this.PathPts};e.createModelAndPicture(n,(function(e){e.feature&&(i.geo=e.feature)}))}else e.createSymbol(t.libID,t.code,t.points,(function(e){e.feature&&(i.geo=e.feature,i.geo.modelPath=t.url,i.geo.showMode=_0x2bcc5b.Marker)}));this._updatePathLinePts=[],this.Polylines=[],this.createPathLine()}}_0x34cdef.prototype.setPathLineisVisible=function(e){this.isShowPathLine=e},_0x34cdef.prototype.getPathLineisVisible=function(){return this.isShowPathLine},_0x34cdef.prototype.setTangentDirection=function(e){this.isTangentDirection=e},_0x34cdef.prototype.getTangentDirection=function(){return this.isTangentDirection},_0x34cdef.prototype.play=function(){var e=new Date;this._animationState===_0x577f4c.PAUSE?this._innerStartTime+=e.getTime()/1e3-this._pauseTime:this._innerStartTime=e.getTime()/1e3,this._updatePathLinePts=[],this._lastExecute=!1,this._animationState=_0x577f4c.PLAYING},_0x34cdef.prototype.pause=function(){if(this._animationState===_0x577f4c.PLAYING){this._animationState=_0x577f4c.PAUSE;var e=new Date;this._pauseTime=e.getTime()/1e3}},_0x34cdef.prototype.stop=function(){this._animationState=_0x577f4c.STOP},_0x34cdef.prototype.execute=function(){if(!this.geo||!this.canExecute())return!1;this.polyline&&(this.polyline.show=this.isShowPathLine);var e=this._ratio,t=new Object;if(!((t=this._findPos(e,this._shapePoints,t))&&t.pt instanceof _0x23de81))return!1;this.geo.localPoints[0]=this.PtsToSpherical(t.pt);var i=t.index;if(this.isTangentDirection){t.angle;var n=this.modifyAnimationFollowPath(this._shapePoints,i,t.pt),r=57.29577951308232,o=this.geo.showMode;_0x2bcc5b.Marker===o?this.geo._modelRotate=new _0x23de81(n.x*r,n.y*r,n.z*r):_0x2bcc5b.Vector===o&&(this.geo._vectorRotate=n)}return this.geo._initialize=!1,!0},_0x34cdef.prototype.updatePathLine=function(e){this._updatePathLinePts.length>=this.linePtsCount&&this._updatePathLinePts.splice(0,1),this._updatePathLinePts.push(e);var t=WebGLPlot$d.Material.fromType(WebGLPlot$d.Material.ColorType,{color:this.lineColor});this.polyline&&(this.polyline.positions=this._updatePathLinePts,this.polyline.width=this.lineWidth,this.polyline._material=t)},_0x34cdef.prototype.createPathLine=function(){this.computerPathLinePts();var e=WebGLPlot$d.Material.fromType(WebGLPlot$d.Material.ColorType,{color:this.lineColor});if(!this.polyline){var t={width:this.lineWidth,positions:this._shapePoints,material:e,id:this.geo.id+"_PathLine"};this.polyline=_0x4786d3.addAlgoPloyline(this,t,this.plottingLayer._scene),this.polyline&&(this.polyline.show=!1)}},_0x34cdef.prototype.computerPathLinePts=function(){if(0===this.pathType)this._shapePoints=this.PathPts;else{var e=_0x2909c1.generateBezierCtrlPts(this.PathPts);this._shapePoints=_0x2909c1.generateBezierPointsWithCtrlPts(e)}for(var t=[],i=0;i<this._shapePoints.length;i++){var n=this._shapePoints[i];t.push(n.x),t.push(n.y),t.push(n.z)}this._shapePoints=WebGLPlot$d.Cartesian3.fromDegreesArrayHeights(t),this._pathLineLength=0;for(var r=1;r<this._shapePoints.length;r++)this._pathLineLength+=_0x2909c1.distance3D(this._shapePoints[r-1],this._shapePoints[r])},_0x34cdef.prototype.canExecute=function(){if(this._animationState!==_0x577f4c.PLAYING)return!1;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this.startTime>e)return!1;var t=this.getRatioByTime();return!(t>1&&this._lastExecute||t<0)},_0x34cdef.prototype.getRatioByTime=function(){if(this._animationState!==_0x577f4c.PLAYING)return 0;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this.startTime>e)return 0;var t=(e-this._innerStartTime-this.startTime)/this.duration;return t>=1&&!this._lastExecute?this._repeat?(this._innerStartTime=(new Date).getTime()/1e3,t=0,this._lastExecute=!1,this._animationState=_0x577f4c.PLAYING):(t=1,this._lastExecute=!0,this._animationState=_0x577f4c.STOP):t<0&&(t=0),this._ratio=t,t},_0x34cdef.prototype._findPos=function(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLineLength)).result)return!1;var n=i.pt;return this.isTangentDirection&&(i.angle=_0x2909c1.radian(n,t[i.index])/Math.PI*180),i},_0x34cdef.prototype.getPtsIndexByDistance=function(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x2909c1.distance(e[o],e[o+1]))>=t){var a=_0x2909c1.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x23de81(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n},_0x34cdef.prototype.modifyAnimationFollowPath=function(e,t,i){if(this.isTangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot$d.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot$d.Cartesian3;u=WebGLPlot$d.Cartesian3.subtract(l[0],a,u),u=WebGLPlot$d.Cartesian3.normalize(u,u);var c=new WebGLPlot$d.Cartesian3;c=WebGLPlot$d.Cartesian3.subtract(s,a,c),c=WebGLPlot$d.Cartesian3.normalize(c,c);var h=new WebGLPlot$d.Cartesian3;h=WebGLPlot$d.Cartesian3.cross(c,u,h),h=WebGLPlot$d.Cartesian3.normalize(h,h);var d=new WebGLPlot$d.Cartesian3;d=WebGLPlot$d.Cartesian3.cross(h,c,d),d=WebGLPlot$d.Cartesian3.normalize(d,d),c=new WebGLPlot$d.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot$d.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot$d.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot$d.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot$d.Cartesian3(1,0,0)),h=WebGLPlot$d.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot$d.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot$d.Cartesian3(1,0,0)),c=WebGLPlot$d.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot$d.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot$d.Cartesian3(1,0,0)),d=WebGLPlot$d.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot$d.Cartesian3(p,_,m)}},_0x34cdef.prototype.FromAngleAxis=function(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x23de81(r*i.x,r*i.y,r*i.z),s=new _0x23de81;s=WebGLPlot$d.Cartesian3.cross(a,e,s);var l=new _0x23de81;l=WebGLPlot$d.Cartesian3.cross(a,s,l);var u=new _0x23de81(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x23de81(2*l.x,2*l.y,2*l.z);return new _0x23de81(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)},_0x34cdef.prototype.ToEulerAnglesXYZ=function(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x23de81(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x23de81((n=0)-Math.atan2(t.x,t.y),r,n):new _0x23de81(Math.atan2(t.x,t.y)-(n=0),r,n)},_0x34cdef.prototype.PtsToSpherical=function(e){var t=this.plottingLayer._scene.globe.ellipsoid,i=new WebGLPlot$d.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot$d.CesiumMath.toDegrees(n.latitude);return new _0x23de81(WebGLPlot$d.CesiumMath.toDegrees(n.longitude),r,n.height)};var _0x123c41=(_0x55bf6b=!0,function(e,t){var i=_0x55bf6b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55bf6b=!1,i}),_0x4101cd=_0x123c41(void 0,(function(){return _0x4101cd.toString().search("(((.+)+)+)+$").toString().constructor(_0x4101cd).search("(((.+)+)+)+$")})),_0x55bf6b;_0x4101cd();var WebGLPlot$c=window.WebGLPlot=window.WebGLPlot||{};class _0x330d7a extends _0x2d9130{constructor(e){super(e=WebGLPlot$c.defaultValue(e,WebGLPlot$c.defaultValue.EMPTY_OBJECT)),this._scalePoints=WebGLPlot$c.defaultValue(e.scalePoints,[]),this._scaleValues=WebGLPlot$c.defaultValue(e.scaleValues,[]),this._subSymbols=WebGLPlot$c.defaultValue(e.subSymbols,[]),this._isPixelLine=WebGLPlot$c.defaultValue(e.isPixelLine,!0),this._layer=WebGLPlot$c.defaultValue(e.layer,null),this._isEdit=WebGLPlot$c.defaultValue(e.isEdit,!0),this._extendWallOpacity=WebGLPlot$c.defaultValue(e.extendWallOpacity,.7),this._wholeHeight=0,this._isScalePtModify=!1,this._modifyScalePtParams=null,this._symbolAlgo=null,this._updateSubSize=!0,this._subSymbolSize=0,this._isAnimationFeature=!1,this._subSymbolScaleValue=.1,this.sceneMode=WebGLPlot$c.SceneMode.SCENE3D,this.fillCanvas=document.createElement("canvas"),this.mergeDefaultStyle(),this._isClampToGround=!1,this.Polylines=[],this.PolygonFillInstances=[],this.WallInstances=[],this.GroundLineInstances=[],this._SubSymbolDefaultPixelSize=20}initSymbol(){if((!this._initialize||this.sceneMode!==this._layer._scene.mode)&&(this._initialize=!0,WebGLPlot$c.defined(this._layer)&&WebGLPlot$c.defined(this._layer._scene)&&(this.sceneMode=this._layer._scene.mode),this._clearCells(),this._display&&this._layer.visibility&&(null===this._symbolAlgo&&(this._symbolAlgo=WebGLPlot$c.createAlgo({libID:this.libID,code:this.code}),this._subSymbols.length>0&&this._subSymbols.symbolData?this._symbolAlgo.subSymbols=this._subSymbols:this.createSubSymbolData()),WebGLPlot$c.defined(this._symbolAlgo)))){this.__setArrowType();var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.localPoints);if(e=_0x2909c1.clearNextSamePts(e),!(this.symbolType!==_0x1c668c.SYMBOL_TEXT&&e.length<2)){var t,i=this.localPoints.length;this._dHeight=0;for(var n=[],r=0;r<i;r++)0===r?this._dHeight=this.localPoints[0].z:this._dHeight<this.localPoints[r].z&&(this._dHeight=this.localPoints[r].z),0!==this._wholeHeight&&(this.localPoints[r].z=this._wholeHeight,this._dHeight=this._wholeHeight),n.push(new _0x23de81(this.localPoints[r].x,this.localPoints[r].y,this.localPoints[r].z));if(this._symbolAlgo.controlPoints=n,this.setAlgoDefaultValue(),this._scalePoints=[],this._symbolAlgo.scaleValues.length<=this._scaleValues.length&&(this._symbolAlgo.scaleValues=this._scaleValues),this._symbolAlgo.style={color:this.symbolStyle.lineColor},WebGLPlot$c.defined(this._symbolAlgo.subSymbolScaleValue)?this._subSymbolScaleValue=this._symbolAlgo.subSymbolScaleValue:this._symbolAlgo.subSymbolScaleValue=this._subSymbolScaleValue,this._isScalePtModify){var o=this._modifyScalePtParams.index,a=this._modifyScalePtParams.position;a.isScalePoint=!0,this._symbolAlgo.isEdit=!0,this._symbolAlgo.modifyPoint(o,a),t=this._symbolAlgo.components}else this._updateSubSize&&!this._isAnimationFeature?(this._symbolAlgo.subSymbolDefaultPixelSize=this._SubSymbolDefaultPixelSize,this._symbolAlgo.subSymbolSize=this.pixelDisToRealDis(this._symbolAlgo.controlPoints[0],this._symbolAlgo.subSymbolDefaultPixelSize),this._subSymbolSize=this._symbolAlgo.subSymbolSize,this._updateSubSize=!1,this.createSubSymbolData()):this._symbolAlgo.subSymbolSize=this._subSymbolSize,this._isAnimationFeature&&(this._symbolAlgo.isEdit=!0,this._symbolAlgo.subSymbolScaleValue=this._subSymbolScaleValue),this._symbolAlgo.isEdit=this._isEdit,this._symbolAlgo.calculateParts(),t=this._symbolAlgo.components;if(this._scalePoints=this._symbolAlgo.scalePoints,this._scaleValues=this._symbolAlgo.scaleValues,this._subSymbols=this._symbolAlgo.subSymbols,WebGLPlot$c.defined(t)){var s=[];if(s=Array.isArray(t)?t:[t],0===this.libID&&this.code===_0x1c668c.SYMBOL_COMBINATIONALCIRCLE)for(let e=0;e<s.length;e++){const t=s[e];if(t&&t.type===_0x1c668c.SYMBOL_ARBITRARYPOLYGON){s.splice(e,1);break}}this.createGeometryInstances(s,this._dHeight),this._pushCollentionInstances(this.id),_0x4786d3.setUpdatePrimitive(!0,this._layer._scene),this._initSymbolFinished.raiseEvent(this)}}}}getMinEditPts(){return WebGLPlot$c.defined(this._symbolAlgo)?this._symbolAlgo.minEditPts:0}getMaxEditPts(){return WebGLPlot$c.defined(this._symbolAlgo)?this._symbolAlgo.maxEditPts:0}getSymbolName(){return WebGLPlot$c.defined(this._symbolAlgo)&&0!==this._symbolAlgo.symbolName.length?this._symbolAlgo.symbolName:""}createGeometryInstances(e,t){var i=this.isAllPointsHaveZ(e),n=[],r=this.computeBounds(e);let o=[];for(var a=0;a<e.length;a++){var s=e[a];Array.isArray(s.positionPoints)||(s.positionPoints=[s.positionPoints]);var l=s.positionPoints;if(s.shapePts&&(l=s.shapePts),!WebGLPlot$c.defined(l))return n;if(0===this.libID&&34===this.code&&(this._symbolAlgo.maxEditPts=1,this._symbolAlgo.minEditPts=1,l=[s.positionPoints[0]]),l.length>1){_0x2909c1.isSymbolCellCanFill(s)&&l.push(l[0]);for(var u=[],c=[],h=[],d=0;d<l.length;d++){var f=l[d];isNaN(f.x)||isNaN(f.y)||((isNaN(f.z)||void 0===f.z)&&(f.z=0),WebGLPlot$c.defined(this._layer)&&WebGLPlot$c.defined(this._layer._scene)&&this._layer._scene.mode===WebGLPlot$c.SceneMode.SCENE2D&&(t=0,f.z=0),i&&0!==this.libID||48===this.code||24===this.code||32===this.code?c.push(new _0x23de81(f.x,f.y,f.z)):(f=new _0x23de81(f.x,f.y,t),c.push(new _0x23de81(f.x,f.y,t))),u.push(WebGLPlot$c.Cartesian3.fromDegrees(f.x,f.y,f.z)),h.push(f.z))}if(u=this.interPolation(u),0===this.libID&&this.code===_0x1c668c.SYMBOL_COMBINATIONALCIRCLE&&29!==s.type&&o.push(u),0===this.libID&&this.code===_0x1c668c.SYMBOL_CONCENTRICCIRCLE){if(29===s.type&&o.unshift(u),0===s.style.strokeWidth&&s.style.lineWidthLimit)continue}else if(this.createFillGeometry(s,u),0===s.style.strokeWidth&&s.style.lineWidthLimit){this._symbolStyle._fillSymbolID||this.generateFillGeometry(u,void 0);continue}var p=this._symbolStyle._surroundLineType;if(s.style&&s.style.surroundLineLimit){p===_0x3fcacb.SURROUNDLINE_NONE&&(p=s.style.surroundLineType);for(var _=this.generateSurroundLineGeometry(c,u,r,s.style,p),m=0;m<_.length;m++)_[m]&&n.push(_[m])}else if(_0x3fcacb.SURROUNDLINE_NONE!==this._symbolStyle._surroundLineType)for(_=this.generateSurroundLineGeometry(c,u,r,this._symbolStyle,p),m=0;m<_.length;m++)_[m]&&n.push(_[m]);var g=this._symbolStyle._lineWidth,x=null;s.style.lineColorLimit?(x=_0x2909c1.StringtoColor(s.style.color)).alpha=s.style.strokeOpacity:(x=this._symbolStyle._lineColor).alpha=this._symbolStyle._opacity,this._layer.selectedFeature&&this._id===this._layer.selectedFeature.id&&!this._layer.isEditable&&(x=new WebGLPlot$c.Color(0,0,1,1));var y=WebGLPlot$c.getDefaultStyle({libID:this.libID,code:this.code});y.color&&((x=_0x2909c1.StringtoColor(y.color)).alpha=this._symbolStyle._opacity);var v=this.createLineGeometry(u,g,x);if(null!==v&&n.push(v),this._extendWallHeight>0&&u.length>1){x=this._symbolStyle._lineColor;x=WebGLPlot$c.Color.fromAlpha(x,this._extendWallOpacity),this.createExtendWall(u,x,h)}}else 1===l.length&&34===s.type&&this.addTextContent(s,t);this.drawAnnotationArray()}return o.length>0&1!==this._symbolStyle._fillSymbolID&&this.generateFillGeometry(o,void 0,!0),n}computeBounds(e){var t=0,i=0,n=180,r=180,o=!1;WebGLPlot$c.defined(e)||(e=this._symbolAlgo.components,o=!0);for(var a=0;a<e.length;a++){var s=e[a];if(0!==s.style.weight){Array.isArray(s.positionPoints)||(s.positionPoints=[s.positionPoints]);var l=void 0;if(0===this.libID&&1014!==this.code&&1022!==this.code&&_0x1c668c.SYMBOL_CIRCLE===s.type){let e=WebGLPlot$c.Cartesian3.fromDegrees(s.positionPoints[0].x,s.positionPoints[0].y,s.positionPoints[0].z),t=WebGLPlot$c.Cartesian3.fromDegrees(s.positionPoints[1].x,s.positionPoints[1].y,s.positionPoints[1].z);var u=WebGLPlot$c.Transforms.eastNorthUpToFixedFrame(e);const i=WebGLPlot$c.Cartesian3.distance(e,t);for(var c=_0x2909c1.calcCirclePts(i,new WebGLPlot$c.Cartesian3(0,0,0),72),h=[],d=0;d<c.length;d++){var f=new WebGLPlot$c.Cartesian3,p=new WebGLPlot$c.Cartesian3;f=WebGLPlot$c.Cartesian3.multiplyByScalar(new WebGLPlot$c.Cartesian3(c[d].x,c[d].y,0),1,f),p=WebGLPlot$c.Matrix4.multiplyByPoint(u,f,p);var _=WebGLPlot$c.Cartographic.fromCartesian(p);const e=WebGLPlot$c.CesiumMath.toDegrees(_.longitude),t=WebGLPlot$c.CesiumMath.toDegrees(_.latitude);h.push(new WebGLPlot$c.Cartesian3(e,t,0))}l=h,s.shapePts=h}else l=WebGLPlot$c.getSpatialData(s.type,s.positionPoints),s.shapePts=l;if(WebGLPlot$c.defined(l))for(var m=0;m<l.length;++m)l[m].x<n&&(n=l[m].x),l[m].y<r&&(r=l[m].y),l[m].x>t&&(t=l[m].x),l[m].y>i&&(i=l[m].y)}}this._CenterPosition=new _0x23de81((t+n)/2,(r+i)/2,0);var g=t-n,x=i-r;return o?{x:n+g/2,y:r,z:0,maxX:t,maxY:i,minX:n,minY:r}:g>=x?g:x}generateSurroundLineGeometry(e,t,i,n,r){var o,a,s,l=[],u=[],c=[],h=this.symbolStyle.surroundLineColor;switch(h=WebGLPlot$c.Color.fromAlpha(h,this.symbolStyle.opacity),n.surroundLineLimit&&(r=n.surroundLineType,n.lineColorLimit&&((!n.surroundLineColor||""===n.surroundLineColor)&&(n.surroundLineColor="#ffff00"),(h=_0x314cf0(n.surroundLineColor)).alpha=n.surroundLineColorOpacity)),r){case _0x3fcacb.SURROUNDLINE_ALL:a=this._symbolStyle._surroundLineWidth/2+this._symbolStyle._lineWidth/2,this._isPixelLine&&(a=this._surroundRatioVal*i),s=_0x2909c1.getSurroundLinePts(e,a);for(var d=0;d<s.length;++d)u.push(new WebGLPlot$c.Cartesian3.fromDegrees(s[d].x,s[d].y,s[d].z));a=-a;for(var f=(s=_0x2909c1.getSurroundLinePts(e,a)).length-1;f>=0;--f)c.push(new WebGLPlot$c.Cartesian3.fromDegrees(s[f].x,s[f].y,s[f].z));o=this._symbolStyle._surroundLineWidth;break;case _0x3fcacb.SURROUNDLINE_INNER:case _0x3fcacb.SURROUNDLINE_OUT:a=this._symbolStyle._surroundLineWidth/2+this._symbolStyle._lineWidth/2,this._isPixelLine&&(a=this._surroundRatioVal*i),r===_0x3fcacb.SURROUNDLINE_INNER&&(a=-a),s=_0x2909c1.getSurroundLinePts(e,a);for(d=0;d<s.length;++d)u.push(new WebGLPlot$c.Cartesian3.fromDegrees(s[d].x,s[d].y,s[d].z));o=this._symbolStyle._surroundLineWidth}return u.length<2||(u=this.interPolation(u),l.push(this.createLineGeometry(u,o,h,!0)),c.length>=2&&(c=this.interPolation(c),l.push(this.createLineGeometry(c,o,h,!0)))),l}createFillGeometry(e,t){if(!e.style.fillLimit||e.style.fill){if((e.style.fillLimit&&e.style.fill||0===e.style.fillStyle&&e.style.fillLimit)&&_0x2909c1.isSymbolCellCanFill(e))return void this.generateFillGeometry(t,e.style);if(1!==this.symbolStyle.fillSymbolID&&(_0x2909c1.isCanFill(this)||_0x2909c1.isSymbolCellCanFill(e)))return void this.generateFillGeometry(t,void 0);if(WebGLPlot$c.defined(e.style.fillSymbolID)&&0===e.style.fillSymbolID)return void this.generateFillGeometry(t,e.style)}}generateFillGeometry(e,t,i){var n,r,o=void 0;if(i){let t=0;for(let i=1;i<e.length;i++)e[i].length>e[t].length&&(t=i);let i=WebGLPlot$c.clonePoints(e[t]);e.splice(t,1);let n=[];for(let t=0;t<e.length;t++){let i=e[t];n.push(new WebGLPlot$c.PolygonHierarchy(i))}let r=new WebGLPlot$c.PolygonHierarchy(i,n);o=new WebGLPlot$c.PolygonGeometry({polygonHierarchy:r,perPositionHeight:!0})}else o=WebGLPlot$c.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0});if(WebGLPlot$c.defined(t)&&t.fillLimit?n=WebGLPlot$c.defined(t.fillColor)&&t.fillColorLimit?_0x2909c1.StringtoColor(t.fillColor):t.color&&t.fillColorLimit?WebGLPlot$c.Color.clone(_0x2909c1.StringtoColor(t.color)):WebGLPlot$c.Color.clone(this._symbolStyle._lineColor):(n=WebGLPlot$c.Color.clone(this._symbolStyle._fillForeColor)).alpha=1-this._symbolStyle._fillOpaqueRate/100,this._layer.selectedFeature&&this._id===this._layer.selectedFeature.id&&!this._layer.isEditable&&(n=new WebGLPlot$c.Color(0,0,1,1)),null!==(r=this.isClampToGround?o:WebGLPlot$c.PolygonGeometry.createGeometry(o))&&WebGLPlot$c.defined(r)){var a=new WebGLPlot$c.GeometryInstance({geometry:r,id:this.id,attributes:{color:WebGLPlot$c.ColorGeometryInstanceAttribute.fromColor(n)}});a.ForeRGBA=n.toRgba(),a.BackRGBA=this._symbolStyle._fillBackColor.toRgba(),a.isClampToGround=this.isClampToGround,a._isAnimationFeature=this._isAnimationFeature,this.PolygonFillInstances.push(a)}}createFillCanvas(){var e=this.fillCanvas.width=100,t=this.fillCanvas.height=100;this._ctx=this.fillCanvas.getContext("2d");var i=null;switch(this._symbolStyle._fillGradientMode){case 1:i=this._ctx.createLinearGradient(0,0,e,t);break;case 2:var n=e/2,r=t/2,o=e/4,a=2*o;i=this._ctx.createRadialGradient(n,r,o,n,r,a)}return i.addColorStop(0,this._symbolStyle._fillForeColor.toCssColorString()),i.addColorStop(1,this._symbolStyle._fillBackColor.toCssColorString()),this._ctx.fillStyle=i,this._ctx.fillRect(0,0,100,100),this.fillCanvas}isAllPointsHaveZ(e){for(var t=!0,i=0;i<e.length;i++)for(var n=e[i],r=0;r<n.positionPoints.length;r++){if(void 0===n.positionPoints[r].z){t=!1;break}}return t}createSubSymbolData(){0===this._subSymbols.length&&this._symbolAlgo&&(this._subSymbols=JSON.parse(JSON.stringify(this._symbolAlgo.subSymbols)));for(var e=0;e<this._subSymbols.length;e++)this.getServerData(this._subSymbols[e],e)}getServerData(e,t,i){var n=this,r=WebGLPlot$c.getLibManager(this._layer._scene._plottingID).getSymbolData(e.libID,e.code);if(WebGLPlot$c.defined(r)&&null!==r){var o=[];if(!WebGLPlot$c.defined(r.innerCells))return;for(var a=0;a<r.innerCells.length;a++)r.innerCells[a].surroundLineFlag||o.push(r.innerCells[a]);return r.innerCells=o,e.symbolData=r,n._symbolAlgo.subSymbols[t]=e,n._initialize=!1,i&&i(),!0}var s=WebGLPlot$c.getServerData(e.libID,e.code,void 0,this._layer._scene._plottingID);!s||(s.getSymbolInfo.events.on({processCompleted:function(r){var o=r.result,a=[];if(WebGLPlot$c.defined(o.innerCells)){for(var s=0;s<o.innerCells.length;s++)o.innerCells[s].surroundLineFlag||a.push(o.innerCells[s]);return o.innerCells=a,e.symbolData=o,n._symbolAlgo.subSymbols[t]=e,n._initialize=!1,i&&i(),!0}},processFailed:function(e){},scope:this}),s.getSymbolInfo.processAsync(s.getSymbolInfoParameters))}pixelDisToRealDis(e,t){if(void 0===e)return 0;var i=this._layer._scene,n=WebGLPlot$c.Cartesian3.fromDegrees(e.x,e.y,e.z),r=WebGLPlot$c.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(!WebGLPlot$c.defined(r))return.001;var o=new WebGLPlot$c.Cartesian2(r.x,r.y+t),a=_0x2909c1.getPosition2(i,r),s=_0x2909c1.getPosition2(i,o);return _0x2909c1.distance(a,s)}setAlgoDefaultValue(){if(this._updateSubSize&&0===this._symbolAlgo.libID&&1019===this._symbolAlgo.code&&(this._symbolAlgo.startAngle=0,this._symbolAlgo.endAngle=360),0===this._symbolAlgo.libID&&1022===this._symbolAlgo.code){WebGLPlot$c.defined(this._symbolAlgo.radius)||(this._symbolAlgo.radius=[]);var e=this.localPoints;if(this._symbolAlgo.radius.length<e.length){var t=this.pixelDisToRealDis(e[0],this._symbolAlgo.defaultRadius);this._symbolAlgo.radius.push(t)}}}addTextContent(e,t){if(WebGLPlot$c.defined(e.textContent)&&null!==e.textContent){0===e.textContent.length&&(!WebGLPlot$c.defined(this.textContent)||0===this.textContent.length)&&(this.textContent="AaBb"),0!==e.textContent.length&&(this.textContent=e.textContent);var i=this.textContent,n=WebGLPlot$c.Cartesian3.fromDegrees(e.positionPoints[0].x,e.positionPoints[0].y,t),r=this._symbolTextStyle,o=new WebGLPlot$c.Color(r._foreColor.red,r._foreColor.green,r._foreColor.blue,r._foreColor.alpha);this._isSelected&&(o=new WebGLPlot$c.Color(0,1,0,1));var a,s=r._fontSize+"px "+r._fontName;0===this.libID&&34===this.code?a={style:r.outline?WebGLPlot$c.LabelStyle.FILL_AND_OUTLINE:WebGLPlot$c.LabelStyle.FILL,outlineColor:r._backColor,outlineWidth:r.outlineWidth,position:n,text:i,font:s,fillColor:o,horizontalOrigin:WebGLPlot$c.HorizontalOrigin.CENTER,id:this._id}:(WebGLPlot$c.defined(e.style.fontColorLimit)&&WebGLPlot$c.defined(e.style.fontColor)&&e.style.fontColorLimit&&(o=_0x314cf0(e.style.fontColor)),a={position:n,text:i,font:s,fillColor:o,horizontalOrigin:WebGLPlot$c.HorizontalOrigin.CENTER}),(a=_0x4786d3.addAlgoLabel(this,a,this._layer._scene)).SymbolType=_0x1c668c.SYMBOL_TEXT}}createExtendWall(e,t,i){var n=[],r=[];if(i.length===e.length)for(let e=0;e<i.length;e++){var o=i[e]-this._extendWallHeight;n.push(o),0===this._dHeight?r.push(.1):r=void 0}else for(var a=0;a<e.length;a++){(o=WebGLPlot$c.Cartographic.fromCartesian(e[a]).height-this._extendWallHeight)<0&&(o=0),n.push(o),0===this._dHeight?r.push(.1):r=void 0}var s=new WebGLPlot$c.WallGeometry({positions:e,minimumHeights:n,maximumHeights:r}),l=WebGLPlot$c.WallGeometry.createGeometry(s);if(WebGLPlot$c.defined(l)){var u=WebGLPlot$c.ColorGeometryInstanceAttribute.fromColor({alpha:0,red:1,green:1,blue:0}),c=new WebGLPlot$c.GeometryInstance({geometry:l,attributes:{color:u},id:this.id});c.ForeRGBA=t.toRgba(),c._isAnimationFeature=this._isAnimationFeature,this.WallInstances.push(c)}}setSubSymbols(e,t){if(0===this._symbolAlgo.subSymbols.length&&0===this.libID&&1025!==this.code||e===this._subSymbols[t])return!1;{this._initialize=!1;let i=this;return this.getServerData(e,t,(function(){_0x5ac1e1.getInstance().symbolModified.raiseEvent(i)})),!0}}createLineGeometry(e,t,i,n){if(this.isClampToGround&&!this.isDrawing)return this.createGroundPolylineGeometry(e,t,i,n),null;var r=void 0;if(this._isPixelLine){var o={width:t,positions:e,material:WebGLPlot$c.Material.fromType(WebGLPlot$c.Material.ColorType,{color:i}),id:this.id};return(o=_0x4786d3.addAlgoPloyline(this,o,this._layer._scene)).SymbolType=_0x1c668c.SYMBOL_ALGO,o}var a=new WebGLPlot$c.PolylineVolumeGeometry({polylinePositions:e,shapePositions:[new WebGLPlot$c.Cartesian2(-.5*t,-.5*t),new WebGLPlot$c.Cartesian2(.5*t,-.5*t),new WebGLPlot$c.Cartesian2(.5*t,.5*t),new WebGLPlot$c.Cartesian2(-.5*t,.5*t)],cornerType:2});if(r=WebGLPlot$c.PolylineVolumeGeometry.createGeometry(a),!WebGLPlot$c.defined(r))return null;var s=new WebGLPlot$c.GeometryInstance({geometry:r,id:this.id,attributes:{color:i}});return n&&(s.bIsSurroundLine=!0),s}createGroundPolylineGeometry(e,t,i,n){var r=new WebGLPlot$c.GroundPolylineGeometry({vertexFormat:WebGLPlot$c.VertexFormat.POSITION_ONLY,positions:e,width:t}),o=new WebGLPlot$c.GeometryInstance({geometry:r,attributes:{color:WebGLPlot$c.ColorGeometryInstanceAttribute.fromColor(i)},id:this._id});n&&(o.bIsSurroundLine=!0),o._isAnimationFeature=this._isAnimationFeature,this.GroundLineInstances.push(o)}_destroy(){_0x5ac1e1.getInstance().symbolDestroyed.raiseEvent(this.id),this._clearCells(),_0x4786d3.setUpdatePrimitive(!0,this._layer._scene)}_clearCells(){_0x4786d3.removeAllAlgoPloyline(this,this._layer._scene),_0x4786d3.removeAllAlgoLabel(this,this._layer._scene),this.PolygonFillInstances=[],this.WallInstances=[],this.GroundLineInstances=[],this._pushCollentionInstances(this.id)}_pushCollentionInstances(e){this.PolygonFillInstances.length>0?_0x4786d3.setPolygonFillInstances(e,this.PolygonFillInstances,this._layer._scene):_0x4786d3.setPolygonFillInstances(e,[],this._layer._scene),this.WallInstances.length>0?_0x4786d3.setWallInstances(e,this.WallInstances,this._layer._scene):_0x4786d3.setWallInstances(e,[],this._layer._scene),this.GroundLineInstances.length>0?_0x4786d3.setGroundInstances(e,this.GroundLineInstances,this._layer._scene):_0x4786d3.setGroundInstances(e,[],this._layer._scene)}clone(){var e=new _0x330d7a({layer:this._layer,libID:this._libID,code:this._code,localPoints:this.localPoints,serverData:this._serverData});return e._libID=JSON.parse(JSON.stringify(this._libID)),e._code=JSON.parse(JSON.stringify(this._code)),e._symbolName=JSON.parse(JSON.stringify(this._symbolName)),e._symbolType=JSON.parse(JSON.stringify(this._symbolType)),e._display=JSON.parse(JSON.stringify(this._display)),e._id=JSON.parse(JSON.stringify(this._id)),e._initialize=JSON.parse(JSON.stringify(!1)),e._isEdit=JSON.parse(JSON.stringify(this._isEdit)),e._isUseSymbolLibStyle=JSON.parse(JSON.stringify(this._isUseSymbolLibStyle)),e._markHalo=JSON.parse(JSON.stringify(this._markHalo)),e._localPoints=WebGLPlot$c.clonePoints(this.localPoints),e._symbolStyle=this._symbolStyle.clone(),e._symbolTextStyle=this._symbolTextStyle.clone(),e._serverData=JSON.parse(JSON.stringify(this._serverData)),e._extendProperty=JSON.parse(JSON.stringify(this._extendProperty)),e._annotationArray=JSON.parse(JSON.stringify(this._annotationArray)),e._extendWallHeight=JSON.parse(JSON.stringify(this._extendWallHeight)),e._wholeHeight=JSON.parse(JSON.stringify(this._wholeHeight)),e._scaleValues=JSON.parse(JSON.stringify(this._scaleValues)),e._subSymbolSize=JSON.parse(JSON.stringify(this._subSymbolSize)),e._subSymbols=JSON.parse(JSON.stringify(this._subSymbols)),e._isUpdateSubSymbolSize=JSON.parse(JSON.stringify(this._updateSubSize)),e._isAnimationFeature=JSON.parse(JSON.stringify(this._isAnimationFeature)),e._subSymbolScaleValue=JSON.parse(JSON.stringify(this._subSymbolScaleValue)),e._extendWallOpacity=JSON.parse(JSON.stringify(this._extendWallOpacity)),e.isClampToGround=JSON.parse(JSON.stringify(this.isClampToGround)),e}interPolation(e){var t=[];for(let n=0;n<e.length;n++){const r=e[n];var i=WebGLPlot$c.Cartographic.fromCartesian(r);t.push(i.height+1)}return WebGLPlot$c.PolylinePipeline.generateCartesianArc({positions:e,height:t,minDistance:WebGLPlot$c.defaultValue(WebGLPlot$c.Plotting._AlgoSymoblPipelineDisMin,1e4)}).push(e[e.length-1]),e}__setArrowType(){this._symbolAlgo&&(WebGLPlot$c.defined(this._arrowHeadType)&&(this._symbolAlgo.arrowHeadType=this._arrowHeadType),WebGLPlot$c.defined(this._arrowBodyType)&&(this._symbolAlgo.arrowBodyType=this._arrowBodyType),WebGLPlot$c.defined(this._arrowTailType)&&(this._symbolAlgo.arrowTailType=this._arrowTailType))}}function _0x314cf0(e){if(!e||""===e)return new WebGLPlot$c.Color(1,0,0);var t=parseInt(e.slice(1,3),16)/255,i=parseInt(e.slice(3,5),16)/255,n=parseInt(e.slice(5,7),16)/255;return new WebGLPlot$c.Color(t,i,n)}Object.defineProperties(_0x330d7a.prototype,{subSymbols:{get:function(){return this._subSymbols},set:function(e){e===this._subSymbols||!Array.isArray(e)||(this._subSymbols=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},ispixelLine:{get:function(){return this._ispixelLine},set:function(e){e===this._ispixelLine||e.constructor!==Boolean||(this._ispixelLine=e,this._initialize=!1)}},surroundRatioVal:{get:function(){return this._surroundRatioVal},set:function(e){e===this._surroundRatioVal||"number"!=typeof e||(this._surroundRatioVal=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},extendWallHeight:{get:function(){return this._extendWallHeight},set:function(e){e===this._extendWallHeight||"number"!=typeof e||(this._extendWallHeight=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},extendWallOpacity:{get:function(){return Math.round(100*(1-this._extendWallOpacity))},set:function(e){this.extendWallOpacity==e||"number"!=typeof e||(this._extendWallOpacity=1-e/100,this._initialize=!1)}},isClampToGround:{get:function(){return this._isClampToGround},set:function(e){e!==this._isClampToGround&&(this._isClampToGround=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},arrowHeadType:{get:function(){return this._arrowHeadType},set:function(e){"number"==typeof e&&(this._arrowHeadType=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},arrowBodyType:{get:function(){return this._arrowBodyType},set:function(e){"number"==typeof e&&(this._arrowBodyType=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},arrowTailType:{get:function(){return this._arrowTailType},set:function(e){"number"==typeof e&&(this._arrowTailType=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}}});var _0x53bf09=(_0xc4a8c7=!0,function(e,t){var i=_0xc4a8c7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xc4a8c7=!1,i}),_0x1c4666=_0x53bf09(void 0,(function(){return _0x1c4666.toString().search("(((.+)+)+)+$").toString().constructor(_0x1c4666).search("(((.+)+)+)+$")})),_0xc4a8c7;function _0x4c78d5(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.symbolType=WebGLPlot.defaultValue(e.symbolType,_0x1c668c.SYMBOL_UNKNOW),this.points=WebGLPlot.defaultValue(e.points,[]),this.lineColorLimit=WebGLPlot.defaultValue(e.lineColorLimit,!1),this.lineColor=WebGLPlot.defaultValue(e.lineColor,WebGLPlot.Color.RED),this.lineTypeLimit=WebGLPlot.defaultValue(e.lineTypeLimit,!1),this.lineWidthLimit=WebGLPlot.defaultValue(e.lineWidthLimit,!1),this.lineWidth=WebGLPlot.defaultValue(e.lineWidth,-1),this.fillLimit=WebGLPlot.defaultValue(e.fillLimit,!1),this.fillStyle=WebGLPlot.defaultValue(e.fillStyle,!1),this.fillColorLimit=WebGLPlot.defaultValue(e.fillColorLimit,!1),this.fillColor=WebGLPlot.defaultValue(e.fillColor,new WebGLPlot.Color(1,0,0,.8)),this.fontColorLimit=WebGLPlot.defaultValue(e.fontColorLimit,!1),this.textContent=WebGLPlot.defaultValue(e.textContent,""),this.textStyle=WebGLPlot.defaultValue(e.textContent,void 0),this.textAngle=WebGLPlot.defaultValue(e.textAngle,0),this.textBounds=WebGLPlot.defaultValue(e.textBounds,void 0)}_0x1c4666();var _0x1664a2=(_0x2e48a9=!0,function(e,t){var i=_0x2e48a9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e48a9=!1,i}),_0x29f25c=_0x1664a2(void 0,(function(){return _0x29f25c.toString().search("(((.+)+)+)+$").toString().constructor(_0x29f25c).search("(((.+)+)+)+$")})),_0x2e48a9;function _0x5cf148(){this._code=_0x1c668c.SYMBOL_ARC,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_ARC,this._symbolName=WebGLPlot.plotI18n("arc"),this._minEditPts=3,this._maxEditPts=3}_0x29f25c(),_0x5cf148.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(2==t.length&&_0x2909c1.isSamePt(t[0],t[1])||t.length<this._minEditPts)return null;var i=_0x2909c1.generateArcInfo(t[0],t[1],t[2]);i.dStartAngle*=Math.PI/180,i.dEndAngle*=Math.PI/180;var n,r=_0x2909c1.generateArcSpatialData(i.pntCenter,i.dRadius,i.dRadius,0,i.dStartAngle,i.dEndAngle);return 0!==r.length&&(n=new _0x4c78d5({points:r,symbolType:_0x1c668c.SYMBOL_POLYLINE})),n},_0x5cf148.prototype.getMinEditPts=function(){return this._minEditPts},_0x5cf148.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5cf148.prototype.getSymbolName=function(){return this._symbolName};var _0xb721db=(_0x2d00bb=!0,function(e,t){var i=_0x2d00bb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2d00bb=!1,i}),_0xf18f8a=_0xb721db(void 0,(function(){return _0xf18f8a.toString().search("(((.+)+)+)+$").toString().constructor(_0xf18f8a).search("(((.+)+)+)+$")})),_0x2d00bb;function _0x1e88b8(){this._code=_0x1c668c.SYMBOL_POLYBEZIER,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_POLYBEZIER,this._symbolName=WebGLPlot.plotI18n("bezier"),this._minEditPts=2,this._maxEditPts=9999}_0xf18f8a(),_0x1e88b8.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(t);return SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),new _0x4c78d5({points:i,symbolType:_0x1c668c.SYMBOL_POLYLINE})},_0x1e88b8.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x1e88b8.prototype.getMinEditPts=function(){return this._minEditPts},_0x1e88b8.prototype.getSymbolName=function(){return this._symbolName};var _0x7697cc=(_0x319d54=!0,function(e,t){var i=_0x319d54?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x319d54=!1,i}),_0x50ba5=_0x7697cc(void 0,(function(){return _0x50ba5.toString().search("(((.+)+)+)+$").toString().constructor(_0x50ba5).search("(((.+)+)+)+$")})),_0x319d54;function _0x509a13(){this._code=_0x1c668c.SYMBOL_ELLIPSE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_ELLIPSE,this._symbolName=WebGLPlot.plotI18n("ellipse"),this._maxEditPts=3,this._minEditPts=3}_0x50ba5(),_0x509a13.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x509a13.prototype.getMinEditPts=function(){return this._minEditPts},_0x509a13.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t,i,n,r=e.points;if(r.length<this._minEditPts)return null;t=_0x2909c1.distance(r[0],r[2]),i=_0x2909c1.distance(r[0],r[1]),n=_0x2909c1.radian(r[0],r[1]);var o=2*Math.PI,a=_0x2909c1.generateArcSpatialData(r[0],i,t,n,0,o);return a.push[a[0].clone()],new _0x4c78d5({symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON,points:a})},_0x509a13.prototype.getSymbolName=function(){return this._symbolName};var _0x286fa3=(_0x37f4df=!0,function(e,t){var i=_0x37f4df?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37f4df=!1,i}),_0x5a17c1=_0x286fa3(void 0,(function(){return _0x5a17c1.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a17c1).search("(((.+)+)+)+$")})),_0x37f4df;function _0x3b0548(){this._code=_0x1c668c.SYMBOL_PARALLELOGRAM,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_PARALLELOGRAM,this._symbolName=WebGLPlot.plotI18n("parallel"),this._maxEditPts=3,this._minEditPts=3}_0x5a17c1(),_0x3b0548.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;t.length>this._maxEditPts&&t.splice(3,t.length-3);for(var i=t[0].x+(t[2].x-t[1].x),n=t[0].y+(t[2].y-t[1].y),r=new WebGLPlot.Cartesian3(i,n,0),o=[],a=0;a<t.length;++a)o.push(t[a].clone());return o.push(r),o.push(o[0].clone()),new _0x4c78d5({symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON,points:o})},_0x3b0548.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x3b0548.prototype.getMinEditPts=function(){return this._minEditPts},_0x3b0548.prototype.getSymbolName=function(){return this._symbolName};var _0x573473=(_0x888f21=!0,function(e,t){var i=_0x888f21?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x888f21=!1,i}),_0x4ec1cf=_0x573473(void 0,(function(){return _0x4ec1cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x4ec1cf).search("(((.+)+)+)+$")})),_0x888f21;function _0x5f1d0b(){this._code=_0x1c668c.SYMBOL_RECTANGLE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_RECTANGLE,this._symbolName=WebGLPlot.plotI18n("rectangle"),this._minEditPts=2,this._maxEditPts=2}_0x4ec1cf(),_0x5f1d0b.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i=new WebGLPlot.Cartesian2(t[0].x,t[0].y),n=new WebGLPlot.Cartesian2(t[1].x,t[1].y),r=i.clone();return new _0x4c78d5({points:[r,new WebGLPlot.Cartesian2(n.x,i.y),n.clone(),new WebGLPlot.Cartesian2(i.x,n.y),r.clone()],symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON})},_0x5f1d0b.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5f1d0b.prototype.getMinEditPts=function(){return this._minEditPts},_0x5f1d0b.prototype.getSymbolName=function(){return this._symbolName};var _0x96b79c=(_0x4c66e5=!0,function(e,t){var i=_0x4c66e5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c66e5=!1,i}),_0x17cd78=_0x96b79c(void 0,(function(){return _0x17cd78.toString().search("(((.+)+)+)+$").toString().constructor(_0x17cd78).search("(((.+)+)+)+$")})),_0x4c66e5;function _0x4d54a5(){this._code=_0x1c668c.SYMBOL_CIRCLE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_CIRCLE,this._symbolName=WebGLPlot.plotI18n("circle"),this._minEditPts=2,this._maxEditPts=2}_0x17cd78(),_0x4d54a5.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(null===t||t.length<this._minEditPts)return null;t.length>this._maxEditPts&&t.splice(2,t.length-this._maxEditPts);var i=_0x2909c1.distance(t[0],t[1]),n=_0x2909c1.calcCirclePts(i,t[0]);return new _0x4c78d5({symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON,points:n})},_0x4d54a5.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x4d54a5.prototype.getMinEditPts=function(){return this._minEditPts},_0x4d54a5.prototype.getSymbolName=function(){return this._symbolName};var _0x2a9e69=(_0x482eee=!0,function(e,t){var i=_0x482eee?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x482eee=!1,i}),_0x18687e=_0x2a9e69(void 0,(function(){return _0x18687e.toString().search("(((.+)+)+)+$").toString().constructor(_0x18687e).search("(((.+)+)+)+$")})),_0x482eee;function _0x10c3cc(){this._code=_0x1c668c.SYMBOL_CHORD,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_CHORD,this._symbolName=WebGLPlot.plotI18n("chord"),this._maxEditPts=3,this._minEditPts=3}_0x18687e(),_0x10c3cc.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x10c3cc.prototype.getMinEditPts=function(){return this._minEditPts},_0x10c3cc.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(2==t.length&&_0x2909c1.isSamePt(t[0],t[1])||t.length<this._minEditPts)return null;var i=_0x2909c1.generateArcInfo(t[0],t[1],t[2]);i.dStartAngle*=Math.PI/180,i.dEndAngle*=Math.PI/180;var n=_0x2909c1.generateArcSpatialData(i.pntCenter,i.dRadius,i.dRadius,0,i.dStartAngle,i.dEndAngle);return n.push(n[0].clone()),new _0x4c78d5({points:n,symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON})},_0x10c3cc.prototype.getSymbolName=function(){return this._symbolName};var _0xe77f47=(_0x460842=!0,function(e,t){var i=_0x460842?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x460842=!1,i}),_0x2788c0=_0xe77f47(void 0,(function(){return _0x2788c0.toString().search("(((.+)+)+)+$").toString().constructor(_0x2788c0).search("(((.+)+)+)+$")})),_0x460842;_0x2788c0();var _0x2710ea={TOP:4,BOTTOM:5,LEFT:6,RIGHT:7},_0x353f01=Object.freeze(_0x2710ea),_0x35aca8=(_0x344e1a=!0,function(e,t){var i=_0x344e1a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x344e1a=!1,i}),_0x24d3a8=_0x35aca8(void 0,(function(){return _0x24d3a8.toString().search("(((.+)+)+)+$").toString().constructor(_0x24d3a8).search("(((.+)+)+)+$")})),_0x344e1a;function _0x211e34(e,t,i,n){n=n||{},this.volume=e>1?1:e,this.position=t,(void 0===this.position||null===this.position)&&(this.position=_0x353f01.TOP),this.offsetX=n.offsetX?n.offsetX:0,this.offsetY=n.offsetY?n.offsetY:0,this.width=n.width?n.width:40,this.height=n.height?n.height:8,null!==i&&WebGLPlot.defined(i)?this.style=i:(this.style={},this.style.fillColor=new WebGLPlot.Color(0,1,0),this.style.frameColor=new WebGLPlot.Color(0,0,0)),this.bounds=null}_0x24d3a8(),_0x211e34.clone=function(e){var t=new _0x211e34(e.volume,e.position,null,null);return t.offsetX=e.offsetX,t.offsetY=e.offsetY,t.width=e.width,t.height=e.height,t.bounds=e.bounds,t.style=e.style,t};var _0x521be3=(_0x3ac276=!0,function(e,t){var i=_0x3ac276?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ac276=!1,i}),_0xa9fb3c=_0x521be3(void 0,(function(){return _0xa9fb3c.toString().search("(((.+)+)+)+$").toString().constructor(_0xa9fb3c).search("(((.+)+)+)+$")})),_0x3ac276;_0xa9fb3c();const _0x26ecd7=8;function _0x3bca92(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._symbolSize=WebGLPlot.defaultValue(e.symbolDot._gridSymbolSize,void 0),this._xOffset=0,this._anchorPoint=WebGLPlot.defaultValue(e.symbolDot._anchorPoint,void 0),this._canvas=void 0,this._surroundLineType=void 0,this._isFirst=!0,this.returnisflag=!1,this._OffsetText_Down=0,this.initCanvas(),this._symbolDot._oldSymbolSize=this._symbolDot._symbolSizeInLib,this._dotGridScale=this._symbolDot.scale,this._OffSetY=0,this.TopOffSet=0,this._textContentLength=0}function _0x120af5(e,t){for(var i=[],n=t,r=0;r<n.length;r++)for(var o=0;o<n[r].points.length;o++){var a=n[r].points[o];i.push(a.x)}var s=Math.min.apply({},i),l=(Math.max.apply({},i)+s)/2;Math.abs(s/e._dotGridScale)<_0x26ecd7&&(l=0,e.returnisflag=!0);for(r=0;r<n.length;r++)for(o=0;o<n[r].points.length;o++){(a=n[r].points[o]).x=2*l-a.x,n[r].points[o]=a}return n}function _0x1b7bea(e){return null===e||typeof e>"u"||""===e||e.match(/^[ ]+$/)}Object.defineProperties(_0x3bca92.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x3bca92.prototype.drawDotSymbolGraphic=function(e){if(!WebGLPlot.defined(this._symbolDot))return null;if(this._OffsetText_Down=0,this.DEFAULTLINEWIDTH=this._symbolDot._billboardBoundsLineWidth,null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent&&(this._textContentLength=this._ctx.measureText(this._symbolDot._textContent).width),this.symbolDot.BloodVolumes.length>1){for(var t=[],i=0;i<this.symbolDot.BloodVolumes.length;i++)t.push(_0x211e34.clone(this.symbolDot.BloodVolumes[i]));this.symbolDot.BloodVolumes=t}this.fontSize=0!==this._textContentLength?this._symbolDot._symbolTextStyle._fontSize:0,this.isForVector=e;var n=this.transformPoints();this.computeImageBounds(n),this.drawPicture(n);var r=this._canvas.toDataURL("image/png");return this._xOffset=0,r},_0x3bca92.prototype.transformPoints=function(){this.computerScale();for(var e=[],t=[],i=this._symbolDot._canvasSymbolData,n=[],r=0;r<i.length;r++){(a=i[r]).surroundLineFlag&&0===this.symbolDot.symbolStyle.surroundLineType||n.push(a)}for(var o=0;o<n.length;o++){for(var a=n[o],s=[],l=0;l<a.positionPoints.length;l++)s.push(new WebGLPlot.Cartesian3(a.positionPoints[l].x,a.positionPoints[l].y,0));var u={points:s,cell:a,style:a.style,type:a.type,flag:a.surroundLineFlag};t.push(this.computePts(u))}var c=this.getMax_Y(t);for(o=0;o<t.length;o++){a=t[o];var h=[];for(l=0;l<a.points.length;l++){var d=new WebGLPlot.Cartesian2(a.points[l].x,a.points[l].y);d.y=(-d.y+c)*this._dotGridScale,d.x*=this._dotGridScale,h.push(d)}u={points:h,cell:a,style:a.style,type:a.type,flag:a.surroundLineFlag};e.push(u)}return this._symbolDot._isMiddleMarkExist&&this._symbolDot._middleMarkBounds&&(this._middleMarkBounds={},this._middleMarkBounds.x=this._symbolDot._middleMarkBounds.left*this._dotGridScale,this._middleMarkBounds.y=(-this._symbolDot._middleMarkBounds.top+c)*this._dotGridScale,this._middleMarkBounds.width=this._symbolDot._middleMarkBounds.right-this._symbolDot._middleMarkBounds.left,this._middleMarkBounds.height=this._symbolDot._middleMarkBounds.top-this._symbolDot._middleMarkBounds.bottom,this._middleMarkBounds.width*=this._dotGridScale,this._middleMarkBounds.height*=this._dotGridScale),this._symbolDot._isNegativeImage&&(e=_0x120af5(this,e)),e},_0x3bca92.prototype.computeImageBounds=function(e){this.symbolCellsBounds=this.getSymbolCellsBounds(e),this.selectedRectBounds=this.getSelectedRectBounds(this.symbolCellsBounds),this.bloodVolumeOffset=this.getBloodVolumeBounds(this.selectedRectBounds),this.textBounds=this.getContentTexBounds(this.selectedRectBounds,this.bloodVolumeOffset);var t=this.bloodVolumeOffset.LeftOffset>this.bloodVolumeOffset.RightOffset?2*this.bloodVolumeOffset.LeftOffset:2*this.bloodVolumeOffset.RightOffset,i=this.bloodVolumeOffset.DownOffset+this.bloodVolumeOffset.UpOffset,n=2*this.textBounds.LRoffset,r=Math.abs(this.textBounds.UDoffset),o=this.textBounds.UDoffset>0?this.textBounds.UDoffset:0;this.textBounds.UDoffset<0&&this.bloodVolumeOffset.DownOffset>=r?this._symbolDot._textPos!==_0x26dfeb.Down&&(r=0):this.textBounds.UDoffset<0&&this.bloodVolumeOffset.DownOffset<r&&(i=r+this.bloodVolumeOffset.UpOffset);var a,s=0;Math.abs(this.symbolCellsBounds.x/this._dotGridScale)<_0x26ecd7||this.returnisflag?(this.returnisflag=!0,s=this.selectedRectBounds.width):s=this.selectedRectBounds.width/2+2*this.DEFAULTLINEWIDTH,a=this.selectedRectBounds.height;var l=this.selectedRectBounds.width+s+t+n;l=l>this.textBounds.width?l:this.textBounds.width;var u=a+i+r+2*this.DEFAULTLINEWIDTH;this.setCanvasSize(l,u),this.symbolLROffset=l/2,this.symbolUDOffset=this.bloodVolumeOffset.UpOffset+o,this.offsetSymbolBounds(e)},_0x3bca92.prototype.getSymbolCellsBounds=function(e){if(e.length<=0)return{x:0,y:0,width:0,height:0};for(var t=[],i=[],n=0;n<e.length;n++)for(var r=e[n].points,o=0;o<r.length;o++)t.push(r[o].x),i.push(r[o].y);var a=Math.max.apply({},t),s=Math.max.apply({},i),l=Math.min.apply({},t),u=Math.min.apply({},i),c=a-l;return a<=0&&(c=Math.abs(l)-Math.abs(a)),{x:l,y:u,width:c,height:s-u}},_0x3bca92.prototype.getSelectedRectBounds=function(e){return{x:e.x-this.DEFAULTLINEWIDTH,y:e.y-this.DEFAULTLINEWIDTH,width:e.width+2*this.DEFAULTLINEWIDTH,height:e.height+2*this.DEFAULTLINEWIDTH}},_0x3bca92.prototype.getBloodVolumeBounds=function(e){for(var t=0,i=0,n=0,r=0,o=0,a=0,s=0,l=0,u=0,c=0;c<this.symbolDot.BloodVolumes.length;c++){e.x>0&&(l=e.width/2+e.x),u=e.height/2+e.y;var h=this.symbolDot.BloodVolumes[c];if(!(h instanceof _0x211e34))return{UpOffset:t,DownOffset:i,LeftOffset:n,RightOffset:r};switch(h.width>e.width&&(o=e.width),h.position){case _0x353f01.TOP:a=l-h.width/2,s=e.y-h.height-t,h.bounds={x:a,y:s,width:o,height:h.height},t+=h.height+this.DEFAULTLINEWIDTH;break;case _0x353f01.BOTTOM:a=l-h.width/2,s=e.y+e.height+h.height+i,h.bounds={x:a,y:s,width:o,height:h.height},i+=h.height+this.DEFAULTLINEWIDTH,this._OffsetText_Down=i;break;case _0x353f01.LEFT:a=e.x-h.height-n,s=u-h.width/2,h.bounds={x:a,y:s,width:h.height,height:o},n+=h.height+this.DEFAULTLINEWIDTH;break;case _0x353f01.RIGHT:a=e.x+e.width+r,s=u-h.width/2,h.bounds={x:a,y:s,width:h.height,height:o},r+=h.height+this.DEFAULTLINEWIDTH;break;default:a=l-h.width/2,s=e.y-h.height-t,h.bounds={x:a,y:s,width:o,height:h.height},t+=h.height+this.DEFAULTLINEWIDTH}}return{UpOffset:t,DownOffset:i,LeftOffset:n,RightOffset:r}},_0x3bca92.prototype.getContentTexBounds=function(e,t){var i=0,n=0,r=0,o=0,a=0,s=0;if(null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent){this.setCanvasTextFont();var l=this._ctx.measureText(this._symbolDot._textContent).width,u=this._symbolDot._textPos;switch(this._symbolDot._showMode!==_0x2bcc5b.Grid&&(u=_0x26dfeb.Up),u){case _0x26dfeb.Left:i=e.x-t.LeftOffset,n=e.height/2+e.y;break;case _0x26dfeb.Right:i=e.x+e.width+t.RightOffset,n=e.height/2+e.y;break;case _0x26dfeb.LeftUp:i=e.x-t.LeftOffset,n=e.y-this.fontSize/2,s=this.fontSize;break;case _0x26dfeb.RightUp:i=e.x+e.width+t.RightOffset,n=e.y-this.fontSize/2,s=this.fontSize;break;case _0x26dfeb.LeftDown:i=e.x-t.LeftOffset,n=e.y+e.height+this.fontSize/2,s=-this.fontSize,this._OffsetText_Down=this._OffsetText_Down>this.fontSize?this._OffsetText_Down:2*this.fontSize;break;case _0x26dfeb.RightDown:i=e.x+e.width+t.RightOffset,n=e.y+e.height+this.fontSize/2,s=-this.fontSize,this._OffsetText_Down=this._OffsetText_Down>this.fontSize?this._OffsetText_Down:2*this.fontSize;break;case _0x26dfeb.Up:i=e.x<0?0:e.width/2+e.x,n=e.y-t.UpOffset-this.fontSize/2,s=this.fontSize;break;case _0x26dfeb.Down:i=e.x<0?0:e.width/2+e.x,n=e.y+e.height+this.fontSize/2+t.DownOffset,s=-this.fontSize,this._OffsetText_Down=2*this.fontSize;case _0x26dfeb.Middle:}r=l,o=this.fontSize,a=l}return{x:i,y:n,width:r,height:o,UDoffset:s,LRoffset:a}},_0x3bca92.prototype.offsetSymbolBounds=function(e){for(var t=0;t<e.length;t++)for(var i=0;i<e[t].points.length;i++){var n=e[t].points[i];let r=e[t].cell.style.lineWidth;n.x+=this.symbolLROffset,n.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH-r/2,e[t].points[i]=n}this.selectedRectBounds.x+=this.symbolLROffset,this.selectedRectBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH,this._symbolDot._isMiddleMarkExist&&(this._symbolDot._textPos===_0x26dfeb.Middle||this._symbolDot._alwaysHasMiddelText)&&(this._middleMarkBounds.x+=this.symbolLROffset,this._middleMarkBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH),this.textBounds.x+=this.symbolLROffset,this._symbolDot._isNegativeImage&&this.returnisflag&&(4===this._symbolDot._textPos||5===this._symbolDot._textPos)?this.textBounds.x-=this.symbolCellsBounds.width/2:this.returnisflag&&(4===this._symbolDot._textPos||5===this._symbolDot._textPos)&&(this.textBounds.x=this.symbolLROffset+this.symbolCellsBounds.width/2),this.textBounds.y+=this.symbolUDOffset+4*this.DEFAULTLINEWIDTH;for(var r=0;r<this.symbolDot.BloodVolumes.length;r++){var o=this.symbolDot.BloodVolumes[r];o instanceof _0x211e34&&(this._symbolDot._isNegativeImage&&this.returnisflag&&(4===o.position||5===o.position)?o.bounds.x+=this.symbolLROffset-this.selectedRectBounds.width/2:!this.returnisflag||4!==o.position&&5!==o.position?o.bounds.x+=this.symbolLROffset:o.bounds.x+=this.symbolLROffset+this.selectedRectBounds.width/2,o.bounds.y+=this.symbolUDOffset)}},_0x3bca92.prototype.setCanvasSize=function(e,t){this._canvas.setAttribute("width",e),this._canvas.setAttribute("height",t)},_0x3bca92.prototype.drawPolyline=function(e){var t=e.points,i=e.cell.style;this._ctx.beginPath(),this._ctx.moveTo(t[0].x,t[0].y);for(var n=1,r=t.length;n<r;n++)this._ctx.lineTo(t[n].x,t[n].y);this._ctx.globalAlpha=i.globalAlpha,this._ctx.setLineDash(i.dashArray),this._ctx.strokeStyle=i.lineColor,this._ctx.lineWidth=i.lineWidth,this._ctx.stroke()},_0x3bca92.prototype.drawPolygon=function(e){var t=e.points,i=e.cell.style;this._ctx.beginPath();var n=t[0].x,r=t[0].y,o=r,a=r,s=n,l=n;this._ctx.moveTo(n,r);for(var u=1;u<t.length;u++){var c=t[u].x,h=t[u].y;this._ctx.lineTo(c,h),h<o&&(o=h),h>a&&(a=h),c>l&&(l=c),c<s&&(s=c)}if(this._ctx.lineTo(t[0].x,t[0].y),0===i.fill){if(i.hasShade){var d={mode:this._symbolDot._symbolStyle._fillGradientMode,style:i,maximum:{minX:s,minY:o,maxX:l,maxY:a}},f=this.drawGradient(d);this._ctx.fillStyle=f}else this._ctx.fillStyle=i.fillStyle;this._ctx.fill()}this._ctx.globalAlpha=i.globalAlpha,this._ctx.setLineDash(i.dashArray),this._ctx.strokeStyle=i.lineColor,this._ctx.lineWidth=i.lineWidth,this._ctx.closePath(),this._ctx.stroke()},_0x3bca92.prototype.drawGradient=function(e){var t,i=e.style;const n=(100-this._symbolDot._symbolStyle.fillGradientOffsetRatioX)/100,r=(100-this._symbolDot._symbolStyle.fillGradientOffsetRatioY)/100;var o=e.maximum.minX,a=e.maximum.maxX*n,s=e.maximum.minY,l=e.maximum.maxY*r;switch(e.mode){case 1:t=this._ctx.createLinearGradient(o,s,a,l);break;case 2:var u=a-o,c=l-s,h=o+u/2,d=s+c/2,f=u>c?u/4:c/4,p=2*f;t=this._ctx.createRadialGradient(h,d,f,h,d,p)}return t.addColorStop(0,i.fillForeColor),t.addColorStop(1,i.fillBackColor),t},_0x3bca92.prototype.drawText=function(e){if(!(e.points[0].x<0||e.points[0].y<0)){var t=e.cell.cell.textContent,i=e.cell.cell.textStyle,n=i.fontScale,r=i.fontName,o=i.fontHeight*n*.7*this._dotGridScale;if(!(o<4)){i.bold?this._ctx.font="bold "+o+"px "+r:i.italic?this._ctx.font="italic "+o+"px "+r:this._ctx.font=o+"px "+r,this._ctx.textAlign="center";var a=i.align;("TOPLEFT"===a||"TOPCENTER"===a||"TOPRIGHT"===a)&&(this._ctx.textBaseline="middle"),this._ctx.textBaseline="middle",this._ctx.fillStyle=i.foreColor.toCssColorString(),this._ctx.fillText(t,e.points[0].x,e.points[0].y+this._OffSetY)}}},_0x3bca92.prototype.computePts=function(e){var t=e.cell,i=null;_0x1c668c.SYMBOL_RECTANGLE===t.type?(i=(new _0x5f1d0b).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_ELLIPSE===t.type?(i=(new _0x509a13).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_CIRCLE===t.type?(i=(new _0x4d54a5).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_POLYBEZIER===t.type?(i=(new _0x1e88b8).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_ARC===t.type?(i=(new _0x5cf148).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_PARALLELOGRAM===t.type?(i=(new _0x3b0548).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_PIE===t.type?(i=SuperMapAlgoPlot.Primitives.sector(e.points),e.points=i):_0x1c668c.SYMBOL_KIDNEY===t.type?e.points=SuperMapAlgoPlot.Primitives.getSpatialData(SuperMapAlgoPlot.SymbolType.KIDNEY,e.points):_0x1c668c.SYMBOL_TRAPEZOID===t.type?(i=(new SymbolTrapezoid).calculateParts(e),e.points=i.points):_0x1c668c.SYMBOL_CHORD===t.type&&(i=(new _0x10c3cc).calculateParts(e),e.points=i.points);return e},_0x3bca92.prototype.drawPicture=function(e,t){if(WebGLPlot.defined(t)&&t){if(this.drawBloodVolume(),_0x2bcc5b.Vector===this._symbolDot._showMode&&this._symbolDot._textPos===_0x26dfeb.Middle)return;this.drawtextContent()}else{for(var i=0;i<e.length;i++){var n=e[i],r=n.cell;this.isForVector?_0x1c668c.SYMBOL_TEXT===r.type&&this.drawText(n):_0x1c668c.SYMBOL_POLYLINE===r.type||_0x1c668c.SYMBOL_POLYBEZIER===r.type||_0x1c668c.SYMBOL_ARC===r.type?this.drawPolyline(n):_0x1c668c.SYMBOL_TEXT===r.type?this.drawText(n):this.drawPolygon(n)}this._symbolDot._showMode===_0x2bcc5b.Grid&&(null!==this._symbolDot._textContent&&""!==this._symbolDot._textContent&&this.drawtextContent(),this.drawBloodVolume(),WebGLPlot.defined(this._symbolDot._layer.selectedFeature)&&!this.isForVector&&this._symbolDot._isSelected&&this.drawBoundingRect())}},_0x3bca92.prototype.drawtextContent=function(){var e=null,t=this._symbolDot._textPos;this._symbolDot._showMode!==_0x2bcc5b.Grid&&(t=_0x26dfeb.Up),t===_0x26dfeb.Left?e={textAlign:"right",textBaseline:"middle"}:t===_0x26dfeb.Right?e={textAlign:"left",textBaseline:"middle"}:t===_0x26dfeb.Up?(e={textAlign:"center",textBaseline:"middle"},this.returnisflag&&(e.x=(this._canvas.width+this._symbolWidth)/2)):t===_0x26dfeb.Down||t===_0x26dfeb.Middle?e={textAlign:"center",textBaseline:"middle"}:t===_0x26dfeb.LeftUp||t===_0x26dfeb.LeftDown?e={textAlign:"right",textBaseline:"middle"}:(t===_0x26dfeb.RightUp||t===_0x26dfeb.RightDown)&&(e={textAlign:"left",textBaseline:"middle"}),this.drawText2(e)},_0x3bca92.prototype.drawText2=function(e){if(e){var t=this._symbolDot._textContent,i=this._symbolDot._symbolTextStyle;this.setCanvasTextFont(),this._ctx.textAlign=e.textAlign,this._ctx.textBaseline=e.textBaseline;var n=0,r=0;if(this._middleMarkBounds&&(n=this._middleMarkBounds.x+this._middleMarkBounds.width/2,r=this._middleMarkBounds.y+this._middleMarkBounds.height/2),i._outline){this._ctx.setLineDash([]);var o=this._ctx.lineWidth;this._ctx.lineWidth=i.outlineWidth;var a=i._backColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x26dfeb.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.strokeStyle=a,this._ctx.strokeText(t,n,r,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x26dfeb.Middle&&(this._ctx.strokeStyle=a,this._ctx.strokeText(t,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.strokeStyle=a,this._ctx.strokeText(t,n,r,this._middleMarkBounds.width)),this._ctx.lineWidth=o}var s=i.foreColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x26dfeb.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.fillStyle=s,this._ctx.fillText(t,n,r,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x26dfeb.Middle&&(this.drawTextBoundsRect(i),this._ctx.fillStyle=s,this._ctx.fillText(t,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.fillStyle=s,this._ctx.fillText(t,n,r,this._middleMarkBounds.width))}},_0x3bca92.prototype.drawTextBoundsRect=function(e){if(e.isShowTextBox){let t,i=this.textBounds.y-e.fontSize/2,n=this.textBounds.width,r=this.textBounds.height;switch(this._ctx.textAlign){case"center":t=this.textBounds.x-this.textBounds.width/2;break;case"right":t=this.textBounds.x-this.textBounds.width;break;case"left":t=this.textBounds.x}this._ctx.fillStyle=e.textBoxColor.toCssColorString(),this._ctx.fillRect(t,i,n,r),this._ctx.beginPath(),this._ctx.lineWidth="2",this._ctx.strokeStyle=e.textBoxLineColor.toCssColorString(),this._ctx.rect(t,i,n-1,r),this._ctx.stroke()}},_0x3bca92.prototype.drawBoundingRect=function(){var e=this.selectedRectBounds.x+this.DEFAULTLINEWIDTH/2,t=this.selectedRectBounds.y+this.DEFAULTLINEWIDTH/2,i=this.selectedRectBounds.width-1.5*this.DEFAULTLINEWIDTH,n=this.selectedRectBounds.height-2*this.DEFAULTLINEWIDTH;this._ctx.beginPath(),this._ctx.rect(e,t,i,n),this._ctx.strokeStyle=this._symbolDot._billboardBoundsColor.toCssColorString(),this._ctx.lineWidth=this.DEFAULTLINEWIDTH,this._ctx.setLineDash([]),this._ctx.closePath(),this._ctx.stroke()},_0x3bca92.prototype.drawBloodVolume=function(){if(this._symbolDot.bIsShowBloodVolume)for(var e=0;e<this.symbolDot.BloodVolumes.length;e++){var t=this.symbolDot.BloodVolumes[e];if(!t.bounds)return;var i=t.bounds,n=t.position,r=0,o=0,a=0,s=0;switch((this._symbolDot._showMode===_0x2bcc5b.Marker||this._symbolDot._showMode===_0x2bcc5b.Vector)&&(n=_0x353f01.TOP),n){case _0x353f01.TOP:case _0x353f01.BOTTOM:r=t.width,o=t.height,a=t.width*t.volume,s=t.height;break;case _0x353f01.LEFT:case _0x353f01.RIGHT:r=t.height,o=t.width,a=t.height,s=t.width*t.volume}this._ctx.beginPath();var l=t.style.fillColor,u=t.style.frameColor,c=new WebGLPlot.Color(l.red,l.green,l.blue,this._symbolDot._symbolStyle._opacity),h=new WebGLPlot.Color(u.red,u.green,u.blue,this._symbolDot._symbolStyle._opacity);this._ctx.fillStyle=c.toCssColorString(),this._ctx.fillRect(i.x,i.y,a,s),this._ctx.lineWidth=.5,this._ctx.strokeStyle=h.toCssColorString(),this._ctx.rect(i.x,i.y,r,o),this._ctx.stroke(),this._ctx.closePath()}},_0x3bca92.prototype.initCanvas=function(){WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas")),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._ctx.scale(this._dotGridScale,this._dotGridScale)},_0x3bca92.prototype.setCanvasTextFont=function(){var e=this._symbolDot._symbolTextStyle,t=e.fontName,i=e._fontSize;e.bold?this._ctx.font="bold "+i+"px "+t:e.italic?this._ctx.font="italic "+i+"px "+t:this._ctx.font=i+"px "+t},_0x3bca92.prototype.getMax_Y=function(e){for(var t=[],i=0;i<e.length;i++)for(var n=e[i],r=0;r<n.points.length;r++)t.push(n.points[r].y);return Math.max.apply({},t)},_0x3bca92.prototype.computerScale=function(){var e=1;this._symbolSize=new WebGLPlot.Cartesian2(this._symbolDot._gridSymbolSize.x,this._symbolDot._gridSymbolSize.y);var t=this._symbolDot._symbolSizeInLib;if(t.x>0&&t.y>0){var i=this._symbolSize.x/t.x,n=this._symbolSize.y/t.y;e=i>n?i:n}this._dotGridScale=this._symbolDot._scale*e},_0x3bca92.prototype.bIsChangHeight=function(){return this.symbolMoveToDown=!1,this.symbolMoveToUp=!1,this.symbolMoveToLR=!1,(0!==this._symbolDot._textContent.length||!_0x1b7bea(this._symbolDot._textContent))&&(this._symbolDot._textPos===_0x26dfeb.Down||this._symbolDot._textPos===_0x26dfeb.RightDown||this._symbolDot._textPos===_0x26dfeb.LeftDown?(this.symbolMoveToUp=!0,!0):this._symbolDot._textPos===_0x26dfeb.Up||this._symbolDot._textPos===_0x26dfeb.RightUp||this._symbolDot._textPos===_0x26dfeb.LeftUp?(this.symbolMoveToDown=!0,!0):((this._symbolDot._textPos===_0x26dfeb.Left||this._symbolDot._textPos===_0x26dfeb.Right)&&(this.symbolMoveToLR=!0),!1))},_0x3bca92.prototype.drawDotModelTextAndBloodVolume=function(){this.getModelTextAndBloodVolumeBounds(),this.drawPicture([],!0);var e=this._canvas.toDataURL("image/png");return this._xOffset=0,e},_0x3bca92.prototype.getModelTextAndBloodVolumeBounds=function(){var e=0,t=0;this._symbolDot._textContent.length>0&&(this.fontSize=this._symbolDot._symbolTextStyle._fontSize,this.setCanvasTextFont(),e=this._ctx.measureText(this._symbolDot._textContent).width,t+=this.fontSize);for(var i=0;i<this.symbolDot.BloodVolumes.length;i++){e=(r=this.symbolDot.BloodVolumes[i]).width>e?r.width:e,t+=r.height+this.DEFAULTLINEWIDTH}this.textBounds={x:e/2,y:this.fontSize/2,width:this._ctx.measureText(this._symbolDot._textContent).width,height:this.fontSize},this.setCanvasSize(e,t);var n=t;for(i=0;i<this.symbolDot.BloodVolumes.length;i++){var r,o=(e-(r=this.symbolDot.BloodVolumes[i]).width)/2;n-=r.height+this.DEFAULTLINEWIDTH,r.bounds={x:o,y:n,width:r.width,height:r.height}}};var _0x463006=(_0x3f91be=!0,function(e,t){var i=_0x3f91be?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3f91be=!1,i}),_0x2b60b3=_0x463006(void 0,(function(){return _0x2b60b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b60b3).search("(((.+)+)+)+$")})),_0x3f91be;function _0x180939(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._display=e._display,this.modelMatrix=_0x2909c1.computeMatrix(this._symbolDot.localPoints[0],this._symbolDot._vectorRotate),this._primitives=[]}_0x2b60b3(),Object.defineProperties(_0x180939.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x180939.prototype.drawDotSymbolVector=function(){if(!WebGLPlot.defined(this._symbolDot))return;if(this._primitives=[],-1===this._symbolDot.vectorDefaultSize){var e=this._symbolDot._layer._scene,t=e.camera.position,i=WebGLPlot.Cartesian3.fromDegrees(this._symbolDot.localPoints[0].x,this._symbolDot.localPoints[0].y,this._symbolDot.localPoints[0].z),n=_0x2909c1.getSpaceDistanceByCartesian(t,i);if(this._symbolDot.vectorDefaultSize=n/1e3,2===e.mode){var r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(e,i),o=new WebGLPlot.Cartesian2(r.x+10,r.y),a=_0x2909c1.getPosition(e,o),s=WebGLPlot.Cartesian3.fromDegrees(a.x,a.y,a.z),l=_0x2909c1.getSpaceDistanceByCartesian(i,s);this._symbolDot.vectorDefaultSize=l/10}}var u=new WebGLPlot.Cartesian3(this._symbolDot.vectorRotate.x,this._symbolDot.vectorRotate.y,this._symbolDot.vectorRotate.z);0!==u.y&&0===u.x&&(u.x=1),this.modelMatrix=_0x2909c1.computeMatrix(this._symbolDot.localPoints[0],u,this.modelMatrix);var c=this.createGeometryInstances(),h=new WebGLPlot.PolylineColorAppearance({translucent:!0});let d=new WebGLPlot.Primitive({geometryInstances:c,appearance:h,asynchronous:!1,compressVertices:!0,show:this._symbolDot._display});return this._primitives.push(d),this._primitives},_0x180939.prototype.createGeometryInstances=function(){var e,t,i,n=this._symbolDot._innerCells,r=[],o=[],a=[],s=[],l=[],u=[];this.isHasTextCell=!1;for(var c=0;c<n.length;c++){var h,d=n[c];if(!d.surroundLineFlag||0!==this._symbolDot.symbolStyle.surroundLineType){if(h=this._symbolDot._dotGrid.computePts({cell:d,points:d.positionPoints}).points,_0x1c668c.SYMBOL_POLYLINE!==d.type&&_0x1c668c.SYMBOL_POLYBEZIER!==d.type&&_0x1c668c.SYMBOL_ARC!==d.type&&_0x1c668c.SYMBOL_TEXT!==d.type&&h.push(h[0]),_0x1c668c.SYMBOL_TEXT===d.type){this.isHasTextCell=!0;continue}for(var f=[],p=0;p<h.length;p++){var _=new WebGLPlot.Cartesian2(h[p].x,h[p].y),m=this.localPtsToCartesian(_,this.modelMatrix);f.push(new WebGLPlot.Cartesian3(m.position.x,m.position.y,m.position.z)),s.push(h[p].x),l.push(h[p].y),a.push(m.vector.y),o.push(m.vector.z),d.surroundLineFlag||u.push(m.position)}var g=this._symbolDot.gridLineWidth,x=new WebGLPlot.PolylineGeometry({positions:f,VertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY,width:g}),y=WebGLPlot.PolylineGeometry.createGeometry(x);if(WebGLPlot.defined(y)){e=d.surroundLineFlag&&0!==this._symbolDot.symbolStyle.surroundLineType?this._symbolDot.symbolStyle.surroundLineColor:this._symbolDot.symbolStyle.lineColor,n[c].lineColorLimit&&(i=n[c].style.lineColor,e=new WebGLPlot.Color(i.red/255,i.green/255,i.blue/255,i.alpha/255)),n[c].fillLimit&&!d.surroundLineFlag&&(n[c].fillColorLimit?(i=n[c].style.fillForeColor,t=new WebGLPlot.Color(i.red/255,i.green/255,i.blue/255,i.alpha/255)):t=e,this.createFillGeomtery(h,f,t,this._symbolDot.id)),(d.type!==_0x1c668c.SYMBOL_POLYLINE||d.type!==_0x1c668c.SYMBOL_POLYLINE||d.type!==_0x1c668c.SYMBOL_POLYLINE||d.type!==_0x1c668c.SYMBOL_TEXT)&&0===this._symbolDot._symbolStyle._fillSymbolID&&!d.surroundLineFlag&&((t=this._symbolDot._symbolStyle.fillForeColor).alpha=1-this._symbolDot._symbolStyle.fillOpaqueRate/100,this.createFillGeomtery(h,f,t,this._symbolDot.id)),e=WebGLPlot.Color.fromAlpha(e,this._symbolDot._symbolStyle.opacity);var v=new WebGLPlot.GeometryInstance({geometry:y,id:this._symbolDot.id,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(e)}});r.push(v)}}}var $=Math.max.apply({},o),b=Math.min.apply({},o),T=Math.max.apply({},a),C=Math.min.apply({},a);return C<0&&(T-=C),b<0&&($-=b),this.vectorHeight=$>T?$:T,0!==this._symbolDot.vectorRotate.y||0!==this._symbolDot.vectorRotate.x?this.createTextCell2(u):this.createTextCell(s,l),r},_0x180939.prototype.createFillGeomtery=function(e,t,i,n){var r=[],o=[],a=_0x2909c1.Resolve(e);if(!a||a.length<3)return null;for(var s=0;s<a.length;s+=3){o[0]=t[a[s]],o[1]=t[a[s+1]],o[2]=t[a[s+2]];var l=this.createTrigonFillGeomterys(o,i,n);l&&r.push(l)}if(0===r.length)return null;var u=new WebGLPlot.Material.fromType("Color",{color:i,fill:!0}),c=new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.MaterialAppearance({material:u,aboveGround:!0}),show:this._display,asynchronous:!1});c.plottingLayer=this._symbolDot._layer,this._primitives.push(c)},_0x180939.prototype.createTrigonFillGeomterys=function(e,t,i){var n=new WebGLPlot.PolygonHierarchy(e,[]),r=new WebGLPlot.PolygonGeometry({polygonHierarchy:n,perPositionHeight:!0}),o=WebGLPlot.PolygonGeometry.createGeometry(r);return o?new WebGLPlot.GeometryInstance({geometry:o,id:i}):null},_0x180939.prototype.getTextBoundPts=function(e,t,i){var n=[],r=[],o=Math.max.apply({},e),a=Math.min.apply({},e),s=Math.max.apply({},t),l=Math.min.apply({},t),u=(l<0?s-l:s)*(this._symbolDot.vectorScale*this._symbolDot.vectorDefaultSize);r.push(new WebGLPlot.Cartesian2(a,l)),r.push(new WebGLPlot.Cartesian2(o,l));var c=0;this._symbolDot._isMiddleMarkExist&&!i&&(c=l>0?l/s:l/(s-l));for(var h=[],d=[],f=0;f<r.length;f++){var p=r[f],_=this.localPtsToCartesian(p,this.modelMatrix).position;n.push(new WebGLPlot.Cartesian3(_.x,_.y,_.z)),h.push(this._symbolDot.localPoints[0].z+u),d.push(this._symbolDot.localPoints[0].z+u*c)}return{potions:n,maxExtendWallHeight:h,minExtendWallHeight:d}},_0x180939.prototype.localPtsToCartesian=function(e,t){var i=new WebGLPlot.Cartesian3,n=new WebGLPlot.Cartesian3,r=this._symbolDot.vectorScale*this._symbolDot.vectorDefaultSize;return n=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1,-e.x,e.y),r,n),{position:i=WebGLPlot.Matrix4.multiplyByPoint(t,n,i),vector:n}},_0x180939.prototype.createTextGeometry=function(e,t,i){var n=this.getTextBoundPts(e,t,i),r=new WebGLPlot.WallGeometry({positions:n.potions,maximumHeights:n.maxExtendWallHeight,minimumHeights:n.minExtendWallHeight}),o=WebGLPlot.WallGeometry.createGeometry(r);return o?new WebGLPlot.GeometryInstance({geometry:o,id:this._symbolDot.id}):null},_0x180939.prototype.createTextCell=function(e,t){if(this.isHasTextCell){var i=this._symbolDot._dotGrid.drawDotSymbolGraphic(!0),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=this.createTextGeometry(e,t,!0),o=new WebGLPlot.Primitive({geometryInstances:[r],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});o.plottingLayer=this._symbolDot._layer,this._primitives.push(o)}},_0x180939.prototype.createTextCell2=function(e){if(this.isHasTextCell){var t=this.createPolygon(e),i=this._symbolDot._dotGrid.drawDotSymbolGraphic(!0),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=new WebGLPlot.Primitive({geometryInstances:[t],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});r.plottingLayer=this._symbolDot._layer,this._primitives.push(r)}},_0x180939.prototype.createMiddleText=function(e){var t=[],i=[],n=[],r=[];t.push(new WebGLPlot.Cartesian2(e.left,e.top)),t.push(new WebGLPlot.Cartesian2(e.left,e.bottom)),t.push(new WebGLPlot.Cartesian2(e.right,e.bottom)),t.push(new WebGLPlot.Cartesian2(e.right,e.top)),t.push(new WebGLPlot.Cartesian2(e.left,e.top));for(var o=e.right-e.left,a=e.top-e.bottom,s=new WebGLPlot.Cartesian2(o/2,a/2),l=0;l<t.length;l++)i.push(t[l].x),n.push(t[l].y),r.push(this.localPtsToCartesian(t[l],this.modelMatrix).position);WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas")),this._canvas.setAttribute("width",o),this._canvas.setAttribute("height",a),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);var u=this._symbolDot._textContent,c=this._symbolDot._symbolTextStyle,h=c.fontName,d=c._fontSize;c.bold?this._ctx.font="bold "+d+"px "+h:c.italic?this._ctx.font="italic "+d+"px "+h:this._ctx.font=d+"px "+h,this._ctx.textAlign="center",this._ctx.textBaseline="middle",c._outline?(this._ctx.strokeStyle=this._symbolDot.colorToString(c._outlineColor),this._ctx.strokeText(u,s.x,s.y,o)):(this._ctx.fillStyle=this._symbolDot.colorToString(c.foreColor),this._ctx.fillText(u,s.x,s.y,o)),0!==this._symbolDot.vectorRotate.y||0!==this._symbolDot.vectorRotate.x?this.createTextContent2(r):this.createTextContent(i,n)},_0x180939.prototype.createTextContent2=function(e){var t=this.createPolygon(e),i=this._canvas.toDataURL("image/png"),n=new WebGLPlot.Material.fromType("Image",{image:i}),r=new WebGLPlot.Primitive({geometryInstances:[t],appearance:new WebGLPlot.MaterialAppearance({material:n}),show:this._display,asynchronous:!1});r.plottingLayer=this._symbolDot._layer,this._primitives.push(r)},_0x180939.prototype.createTextContent=function(e,t){var i=this.createTextGeometry(e,t,!1),n=this._canvas.toDataURL("image/png"),r=new WebGLPlot.Material.fromType("Image",{image:n}),o=new WebGLPlot.Primitive({geometryInstances:[i],appearance:new WebGLPlot.MaterialAppearance({material:r}),show:this._display,asynchronous:!1});o.plottingLayer=this._symbolDot._layer,this._primitives.push(o)},_0x180939.prototype.createPolygon=function(e){var t=WebGLPlot.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0}),i=WebGLPlot.PolygonGeometry.createGeometry(t);return new WebGLPlot.GeometryInstance({geometry:i,id:this.id})};var _0x428fca=(_0x74de30=!0,function(e,t){var i=_0x74de30?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x74de30=!1,i}),_0xa2f822=_0x428fca(void 0,(function(){return _0xa2f822.toString().search("(((.+)+)+)+$").toString().constructor(_0xa2f822).search("(((.+)+)+)+$")})),_0x74de30;function _0x231a11(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._symbolDot=WebGLPlot.defaultValue(e.symbolDot,void 0),this._picturePath=WebGLPlot.defaultValue(e.symbolDot._picturePath,""),this._canvas=void 0,this.initCanvas()}_0xa2f822(),Object.defineProperties(_0x231a11.prototype,{symbolDot:{get:function(){return this._symbolDot},set:function(e){this._symbolDot=e}}}),_0x231a11.prototype.drawDotSymbolPicture=function(e){var t=this._symbolDot._billboardBoundsLineWidth,i=this._symbolDot.pictureSymbolSize.x*this._symbolDot.scale,n=this._symbolDot.pictureSymbolSize.y*this._symbolDot.scale,r=this._symbolDot.pictureSymbolSize.x*this._symbolDot.scale,o=this._symbolDot.pictureSymbolSize.y*this._symbolDot.scale,a=0;if(this.textBounds={x:0,y:0,width:0,height:0},this._symbolDot._textContent&&""!==this._symbolDot._textContent){a=this._symbolDot._symbolTextStyle._fontSize,this.setCanvasTextFont();let e=this._ctx.measureText(this._symbolDot._textContent).width;i=e>i?e:i,this.textBounds={x:i/2,y:a/2,width:e,height:a}}this._canvas.setAttribute("width",i+2*t),this._canvas.setAttribute("height",n+2*t+a),this._symbolDot._textContent&&""!==this._symbolDot._textContent&&this.drawText();var s=(this._canvas.width-r)/2;return this._ctx.drawImage(e,s,a,r,o),this._symbolDot._isSelected&&this.drawBoundingRect(t),this._canvas.toDataURL("image/png")},_0x231a11.prototype.drawText=function(){var e=this._symbolDot._textContent,t=this._symbolDot._symbolTextStyle;this.setCanvasTextFont(),this._ctx.textAlign="center",this._ctx.textBaseline="middle";var i=0,n=0;if(this._middleMarkBounds&&(i=this._middleMarkBounds.x+this._middleMarkBounds.width/2,n=this._middleMarkBounds.y+this._middleMarkBounds.height/2),t._outline){this._ctx.setLineDash([]);var r=this._ctx.lineWidth;this._ctx.lineWidth=t.outlineWidth;var o=t._outlineColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x26dfeb.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.strokeStyle=o,this._ctx.strokeText(e,i,n,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x26dfeb.Middle&&(this._ctx.strokeStyle=o,this._ctx.strokeText(e,this.textBounds.x,this.textBounds.y)),this._ctx.lineWidth=r}var a=t.foreColor.toCssColorString();this._symbolDot._isMiddleMarkExist&&this._symbolDot._textPos===_0x26dfeb.Middle&&!this._symbolDot._alwaysHasMiddelText?(this._ctx.fillStyle=a,this._ctx.fillText(e,i,n,this._middleMarkBounds.width)):this._symbolDot._textPos!==_0x26dfeb.Middle&&(this.drawTextBoundsRect(t),this._ctx.fillStyle=a,this._ctx.fillText(e,this.textBounds.x,this.textBounds.y)),this._symbolDot._alwaysHasMiddelText&&(this._ctx.textAlign="center",this._ctx.textBaseline="middle",this._ctx.fillStyle=a,this._ctx.fillText(e,i,n,this._middleMarkBounds.width))},_0x231a11.prototype.drawTextBoundsRect=function(e){if(e.isShowBackColor){let t,i=this.textBounds.y-e.fontSize/2,n=this.textBounds.width,r=this.textBounds.height;switch(this._ctx.textAlign){case"center":t=this.textBounds.x-this.textBounds.width/2;break;case"right":t=this.textBounds.x-this.textBounds.width;break;case"left":t=this.textBounds.x}this._ctx.fillStyle=WebGLPlot.Color.fromCssColorString(e.backColor),this._ctx.fillRect(t,i,n,r)}},_0x231a11.prototype.setCanvasTextFont=function(){var e=this._symbolDot._symbolTextStyle,t=e.fontName,i=e._fontSize;e.bold?this._ctx.font="bold "+i+"px "+t:e.italic?this._ctx.font="italic "+i+"px "+t:this._ctx.font=i+"px "+t},_0x231a11.prototype.drawBoundingRect=function(e){this._ctx.beginPath(),this._ctx.moveTo(e/2,e/2+this.textBounds.height),this._ctx.lineTo(e/2,this._canvas.height-e/2),this._ctx.lineTo(this._canvas.width-e/2,this._canvas.height-e/2),this._ctx.lineTo(this._canvas.width-e/2,e/2+this.textBounds.height),this._ctx.lineTo(e/2,e/2+this.textBounds.height),this._ctx.strokeStyle=this._symbolDot._billboardBoundsColor.toCssColorString(),this._ctx.lineWidth=e,this._ctx.closePath(),this._ctx.stroke()},_0x231a11.prototype.initCanvas=function(){WebGLPlot.defined(this._canvas)||(this._canvas=document.createElement("canvas"),this._canvas.width=this._symbolDot.pictureSymbolSize.x,this._canvas.height=this._symbolDot.pictureSymbolSizey),this._ctx=this._canvas.getContext("2d"),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height)};var _0x68d5fd=(_0x25a027=!0,function(e,t){var i=_0x25a027?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x25a027=!1,i}),_0x9e9b5b=_0x68d5fd(void 0,(function(){return _0x9e9b5b.toString().search("(((.+)+)+)+$").toString().constructor(_0x9e9b5b).search("(((.+)+)+)+$")})),_0x25a027;_0x9e9b5b();class _0x4844fd extends _0x2d9130{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),WebGLPlot.defined(e.serverData)?this._getServerDataPrototype(e.serverData):(this._anchorPoint=WebGLPlot.defaultValue(e.anchorPoint,new WebGLPlot.Cartesian2(0,0)),this._gridSymbolSize=WebGLPlot.defaultValue(e.gridSymbolSize,new WebGLPlot.Cartesian2(0,0)),this._symbolSizeInLib=WebGLPlot.defaultValue(e.symbolSizeInLib,new WebGLPlot.Cartesian2(-1,-1)),this._symbolRanks=WebGLPlot.defaultValue(e.symbolRanks,[]),this._middleMarkBounds=WebGLPlot.defaultValue(e.middleMarkBounds,null),this._symbolSize=WebGLPlot.defaultValue(e.symbolSize,new WebGLPlot.Cartesian2(-1,-1)),this._innerCells=[]),this._scale=WebGLPlot.defaultValue(e.scale,.8),this._rotate=WebGLPlot.defaultValue(e.rotate,new _0x23de81(0,0,0)),this._modelScale=WebGLPlot.defaultValue(e.modelScale,new _0x23de81(1,1,1)),this._modelRotate=WebGLPlot.defaultValue(e.modelRotate,new _0x23de81(0,0,0)),this._vectorRotate=WebGLPlot.defaultValue(e.vectorRotate,new _0x23de81(0,0,0)),this._vectorScale=WebGLPlot.defaultValue(e.vectorScale,1),this._vectorDefaultSize=WebGLPlot.defaultValue(e.vectorDefaultSize,-1),this._gridLineWidth=WebGLPlot.defaultValue(e.gridLineWidth,3),this._gridSurroundLineWidth=WebGLPlot.defaultValue(e.gridSurroundLineWidth,3),this._pictureSymbolSize=WebGLPlot.defaultValue(e.pictureSymbolSize,new WebGLPlot.Cartesian2(64,64)),this._picturePath=WebGLPlot.defaultValue(e.picturePath,""),this._showMode=WebGLPlot.defaultValue(e.showMode,_0x2bcc5b.Grid),this._isNegativeImage=WebGLPlot.defaultValue(e.isNegativeImage,!1),this._symbolRank=WebGLPlot.defaultValue(e.symbolRank,0),this._lineSymbolID=WebGLPlot.defaultValue(e.lineSymbolID,0),this._modelPath=WebGLPlot.defaultValue(e.modelPath,""),this._textPos=WebGLPlot.defaultValue(e.textPos,_0x26dfeb.Up),this._hasDragLine=WebGLPlot.defaultValue(e.hasDragLine,!1),this._dragPoint=WebGLPlot.defaultValue(e.dragPoint,new _0x23de81(-1,-1,-1)),this._textContent=WebGLPlot.defaultValue(e.textContent,""),this._canvasEle=null,this._prepicturePath=null,this._canvasSymbolData=[],this._imageResult=null,this._isFlagSymbol=!1,this._dotGrid=null,this._dotPicture=null,this._dotVector=null,this._sizeInMeters=!1,this._alwaysHasMiddelText=!1,this._bill=null,this._modelColor=new WebGLPlot.Color(1,1,1,1),this.billboard=null,this.mergeDefaultStyle(),this.bIsShowBloodVolume=WebGLPlot.defaultValue(e.bIsShowBloodVolume,!0),this.BloodVolumes=WebGLPlot.defaultValue(e.bloodVolumes,[]),this._isMiddleMarkExist=null!==this._serverData&&this._serverData.middleMarkExist,this._middleMarkBounds=null!==this._serverData&&this._serverData.middleMarkBounds,this._symbolSizeInMeters=new WebGLPlot.Cartesian2(-1,-1),this._symbolPictureSizeInMeters=new WebGLPlot.Cartesian2(-1,-1),this._BillboardScale=1,this._billboardBoundsColor=new WebGLPlot.Color(1,1,0,1),this._billboardBoundsLineWidth=3,this._modelAnimationPlay=WebGLPlot.defaultValue(e.modelAnimationPlay,!0),this._modelAnimationLoop=WebGLPlot.defaultValue(e.modelAnimationLoop,WebGLPlot.ModelAnimationLoop.REPEAT),this._modelAnimationMultiplier=WebGLPlot.defaultValue(e.modelAnimationMultiplier,1),this._modelAnimationReverse=WebGLPlot.defaultValue(e.modelAnimationReverse,!1),this.__initSymbolPointSymbolData(),this._vectorPrimitives=[]}initSymbol(e){if((!this._initialize||e)&&!(this.localPoints.length<=0||0!==this.libID&&this._innerCells.length<=0)){this._initialize=!0,this.computerBillboardScaleInMeters(),_0x4786d3.removeAllAlgoLabel(this,this._layer._scene),this.__resetBillboard(),this._canvasSymbolData=[],0!==this._wholeHeight&&(this.localPoints[0].z=this._wholeHeight);var t=this.localPoints[0],i=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z);switch(null===this._dotGrid&&(this._dotGrid=new _0x3bca92({symbolDot:this})),this._showMode){case _0x2bcc5b.Grid:case _0x2bcc5b.Picture:this._createPicture(i,e);break;case _0x2bcc5b.Marker:this._createModel(i);break;case _0x2bcc5b.Vector:this._createVector()}this.addTextContent(t),this.drawAnnotationArray(),_0x2bcc5b.Picture!==this._showMode&&this.updateEditCtrl(e),this._initSymbolFinished.raiseEvent(this)}}createBillboard(e,t){return{id:this.id,show:this.display,position:e,image:t,pixelOffset:new WebGLPlot.Cartesian2(0,this._dotGrid._OffsetText_Down),horizontalOrigin:WebGLPlot.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot.VerticalOrigin.BOTTOM,disableDepthTestDistance:this.disableDepthTestDistance,color:WebGLPlot.Color.WHITE.withAlpha(this._symbolStyle._opacity),sizeInMeters:this._sizeInMeters,scale:this._BillboardScale}}computerBillboardScaleInMeters(){if(this._sizeInMeters&&-1===this._symbolSizeInMeters.x&&-1===this._symbolSizeInMeters.y&&this.showMode===_0x2bcc5b.Grid)this._symbolSizeInMeters=_0x2909c1.pixelDisToRealDisInMeters(this._layer._scene,this._gridSymbolSize),this._BillboardScale=this._symbolSizeInMeters.x/this._gridSymbolSize.x;else if(this._sizeInMeters&&(-1!==this._symbolSizeInMeters.x||-1!==this._symbolSizeInMeters.y)&&this.showMode===_0x2bcc5b.Grid){var e=this._symbolSizeInMeters.x/this._gridSymbolSize.x;this._symbolSizeInMeters.y=e*this._gridSymbolSize.y,this._BillboardScale=e}if(this._sizeInMeters&&-1===this._symbolPictureSizeInMeters.x&&-1===this._symbolPictureSizeInMeters.y&&this.showMode===_0x2bcc5b.Picture)this._symbolPictureSizeInMeters=_0x2909c1.pixelDisToRealDisInMeters(this._layer._scene,this._pictureSymbolSize),this._BillboardScale=this._symbolPictureSizeInMeters.x/this._pictureSymbolSize.x;else if(this._sizeInMeters&&(-1!==this._symbolPictureSizeInMeters.x||-1!==this._symbolPictureSizeInMeters.y)&&this.showMode===_0x2bcc5b.Picture){e=this._symbolPictureSizeInMeters.x/this._pictureSymbolSize.x;this._symbolPictureSizeInMeters.y=e*this._pictureSymbolSize.y,this._BillboardScale=e}}__resetBillboard(){WebGLPlot.defined(this.billboard)&&(_0x4786d3.removeBillboard(this.billboard,this._layer._scene),this.billboard=void 0)}updateEditCtrl(e){if(!e&&WebGLPlot.defined(this._layer.selectedFeature)&&this.id===this._layer.selectedFeature.id&&this.display){var t=this;WebGLPlot.defined(this._model)&&this._model.readyPromise.then((function(e){_0x2bcc5b.Marker===t._showMode&&t._layer._plottingEdit.drawModelEditObject(!0)})),WebGLPlot.defined(this.s3mInstance)&&this.s3mInstance._boundingSphere&&(_0x2bcc5b.Marker,t._showMode),this.display,(_0x2bcc5b.Grid===t._showMode||_0x2bcc5b.Picture===t._showMode)&&this._layer._plottingEdit.createCtrlPoints(this),_0x2bcc5b.Vector===t._showMode&&t._layer._plottingEdit.drawVectorEditObject(!0),_0x2bcc5b.Marker===t._showMode&&this._layer._plottingEdit.CtrlPosition.removeAll()}}copyStyle(){for(var e=0;e<this._innerCells.length;e++){var t=this._innerCells[e],i=this.copySymbolStyle(t,this._symbolStyle);let n=null;t.textStyle?n=this.copySymbolTextStyle(t.textStyle):t.textStyle2D&&(n=this.copySymbolTextStyle(t.textStyle2D)),this._canvasSymbolData.push({positionPoints:t.positionPoints,surroundLineFlag:t.surroundLineFlag,style:i,type:t.type,textStyle:n,textContent:t.textContent})}}copySymbolTextStyle(e){let t=e.backColor;!(e.backColor instanceof WebGLPlot.Color)&&e.backColor.alpha>1?e.backColor=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha):e.backColor=new WebGLPlot.Color(t.red,t.green,t.blue,t.alpha);let i=e.foreColor;return!(e.foreColor instanceof WebGLPlot.Color)&&e.foreColor.alpha>1?e.foreColor=WebGLPlot.Color.fromBytes(i.red,i.green,i.blue,i.alpha):e.foreColor=new WebGLPlot.Color(i.red,i.green,i.blue,i.alpha),e}copySymbolStyle(e,t){var i={};if(e.surroundLineFlag)i.lineColor=t.surroundLineColor.toCssColorString(),i.lineWidth=this._gridSurroundLineWidth,i.dashArray=[];else{i.lineWidth=this._gridLineWidth;var n=t.lineColor;i.lineColor=n.toCssColorString();var r=WebGLPlot.Color.clone(t.fillForeColor);if(r.alpha=1-t.fillOpaqueRate/100,i.fillStyle=r.toCssColorString(),i.hasShade=!1,0!==t.fillGradientMode&&(i.hasShade=!0,t.fillForeColor.alpha=1-t.fillOpaqueRate/100,t.fillBackColor.alpha=1-t.fillOpaqueRate/100,i.fillForeColor=t.fillForeColor.toCssColorString(),i.fillBackColor=t.fillBackColor.toCssColorString()),i.fill=t.fillSymbolID,i.dashArray=_0x45e269(this._lineSymbolID),e.lineColorLimit){let t=e.style.lineColor;n=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha),i.lineColor=n.toCssColorString()}if(e.lineTypeLimit&&(i.lineTypeLimit=!0),e.fillColorLimit){let t=e.style.fillForeColor;var o=WebGLPlot.Color.fromBytes(t.red,t.green,t.blue,t.alpha);o.alpha=e.style.fillOpaqueRate/100,i.fillStyle=o.toCssColorString()}if(e.fillLimit&&(i.fill=e.style.fillSymbolID,i.fillLimit=!0,!e.fillColorLimit)){var a=WebGLPlot.Color.clone(n);a.alpha=e.style.fillOpaqueRate/100,i.fillStyle=a.toCssColorString()}}return i.markerSize=e.style.markerSize,i.globalAlpha=t.opacity,i}setShowMode(e){this._showMode=e}getShowMode(){return this._showMode}setScale(e){if(_0x2bcc5b.Vector==this._showMode)this._scale=e;else{if(_0x2bcc5b.Marker!=this._showMode)return;this._modelScale=new _0x23de81(e,e,e)}}getScale(){return _0x2bcc5b.Vector==this._showMode?this._scale:_0x2bcc5b.Marker==this._showMode?this._modelScale:new _0x23de81(1,1,1)}setRotate(e){if(_0x2bcc5b.Vector==this._showMode)this._rotate=e;else{if(_0x2bcc5b.Marker!=this._showMode)return;this._modelRotate=e}}getRotate(){return _0x2bcc5b.Vector==this._showMode?this._rotate:_0x2bcc5b.Marker==this._showMode?this._modelRotate:void 0}setSymbolSize(e){if(_0x2bcc5b.Grid===this._showMode){var t=e,i=this._gridSymbolSize;if(i.x!==e.x&&i.y===e.y)t.y=i.y*e.x/i.x;else if(i.x===e.x&&i.y!==e.y)t.x=i.x*e.y/i.y;else if(i.x!==e.x&&i.y!==e.y){var n=e.x/i.x,r=e.y/i.y,o=r>n?r:n;t.x=o*i.x,t.y=o*i.y}this._gridSymbolSize=t}}getSymbolSize(){if(_0x2bcc5b.Grid==this._showMode)return this._gridSymbolSize}getPicturePath(){return this._picturePath}setPicturePath(e){return 0!==e.length&&(this._picturePath=e,!0)}getSymbolName(){return this.symbolName}setModelRotate(e,t,i){if("number"==typeof e&&"number"==typeof t&&"number"==typeof i){var n=new _0x23de81(e,t,i);this.modelRotate=n}}setVectorRotate(e,t,i){var n=new _0x23de81(e,t,i);this.vectorRotate=n}addTextContent(e){var t=this;if(WebGLPlot.defined(t._textContent)){var i=t._textContent;if(_0x2bcc5b.Marker===t._showMode&&(WebGLPlot.defined(i)&&0!==i.length&&!_0x21ef32(i)||this.bIsShowBloodVolume))t._model&&t._model.readyPromise.then((function(i){_0x13ee86(e,i,t)}));else if(_0x2bcc5b.Vector===t._showMode&&(WebGLPlot.defined(i)&&0!==i.length&&!_0x21ef32(i)||this.bIsShowBloodVolume)){var n=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z+this._dotVector.vectorHeight);(t.bIsShowBloodVolume&&t.BloodVolumes.length>0||!_0x21ef32(t._textContent))&&(t._imageResult=t._dotGrid.drawDotModelTextAndBloodVolume(),t.billboard=_0x4786d3.addBillboard(t.createBillboard(n,t._imageResult),this._layer._scene),t._layer.updatePrimitive=!0)}}}addBloodVolume(e){e instanceof _0x211e34&&(this.BloodVolumes.push(e),this._initialize=!1)}_destroy(){_0x5ac1e1.getInstance().symbolDestroyed.raiseEvent(this.id),WebGLPlot.defined(this.billboard)&&null!==this.billboard&&(_0x4786d3.removeBillboard(this.billboard,this._layer._scene),this.billboard._destroy(),this.billboard=null),this.__removeDotModelAndVector(),WebGLPlot.defined(this._geoEntity)&&(this._geoEntity.destroy(),this._geoEntity=void 0),this.removeAllGeoEffect()}_createModel(e){var t=new WebGLPlot.HeadingPitchRoll,i=Math.PI/180;t.pitch=i*this._modelRotate.x,t.roll=i*this._modelRotate.y,t.heading=i*this._modelRotate.z;var n=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("north","west"),r=WebGLPlot.Transforms.headingPitchRollToFixedFrame(e,t,WebGLPlot.Ellipsoid.WGS84,n);if(this.s3mInstance&&this.s3mInstance.modelPath===this._modelPath)this.s3mInstance.updatePosition(e),this.s3mInstance.updateColor(this._modelColor),this.s3mInstance.updateScale(new Cesium.Cartesian3(this._modelScale.x,this._modelScale.x,this._modelScale.x)),this.s3mInstance.updateRotation(t),this.s3mInstance.visible=this._display;else if(void 0===this._model||this._model.basePath!==this._modelPath||this._initializeModel){this._initializeModel=!1;let i=this.modelPath.split(".");const n=i[i.length-1];switch(n){case"s3m":case"s3mb":{let i={position:e,hpr:t,scale:new Cesium.Cartesian3(this._modelScale.x,this._modelScale.x,this._modelScale.x),color:WebGLPlot.Color.clone(this._modelColor),id:this.id,visible:this._display};if(!WebGLPlot.s3mInstanceColc)throw new WebGLPlot.DeveloperError("S3MInstanceCollection is required.");WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).add(this._modelPath,i),this.s3mInstance=WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).getInstance(this._modelPath,this.id),this.s3mInstance.SymbolType=_0x1c668c.SYMBOL_DOT,this.s3mInstance.modelPath=this._modelPath;break}case"gltf":case"glb":case"s3mz":{const e={url:this._modelPath,modelMatrix:r,scale:this.modelScale,id:this.id,show:this._display,color:this._modelColor};if("gltf"==n||"glb"==n)this._model=WebGLPlot.Model.fromGltf(e),_0x2a2a94(this);else if("s3mz"==n){let t=this;if(i=this.modelPath.split("iserver"),i.length>1){let n=i[0]+"iserver/services/MGISDataSystemServer/rest/domainComponents/MGISDataQueryImpl/deCodeModelResult.json?";n+="arg0="+this.modelPath;let r=_0x103fc6();r.open("GET",encodeURI(n),!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),r.onreadystatechange=function(){if(4===r.readyState&&200===r.status){var i=r.responseText;let n=JSON.parse(i);WebGLPlot.defined(n)&&WebGLPlot.defined(n.supermap)&&(e.gltfJson=n.supermap,t._model=WebGLPlot.Model.fromJson(e),_0x2a2a94(t)),r.onreadystatechange=function(){},r=null}},r.send()}}break}}}else this._model.modelMatrix=r,this._model.scale=this._modelScale.x,this._model.show=this._display,this._model.color=this._modelColor}_createPicture(e,t){if(_0x2bcc5b.Grid===this._showMode||_0x21ef32(this._picturePath)){if(!WebGLPlot.defined(this._innerCells)||0===this._innerCells.length)return;this.copyStyle(),this._showMode=_0x2bcc5b.Grid,this._imageResult=this._dotGrid.drawDotSymbolGraphic(),null===this._dotGrid&&(this._dotGrid=new _0x3bca92({symbolDot:this})),this.billboard=_0x4786d3.addBillboard(this.createBillboard(e,this._imageResult),this._layer._scene),this.billboard.SymbolType=_0x1c668c.SYMBOL_DOT}else{var i=this;null===this._dotPicture&&(this._dotPicture=new _0x231a11({symbolDot:this}));var n=new Image;n.src=this._picturePath,n.setAttribute("crossOrigin","Anonymous"),n.onload=function(){i._imagePicture=i._dotPicture.drawDotSymbolPicture(n),i.__resetBillboard(),i.billboard=_0x4786d3.addBillboard(i.createBillboard(e,i._imagePicture),i._layer._scene),i.billboard.SymbolType=_0x1c668c.SYMBOL_DOT,i.updateEditCtrl(t)}}}_createVector(){if(null===this._dotVector&&(this._dotVector=new _0x180939({symbolDot:this})),WebGLPlot.defined(this._innerCells)&&0!==this._innerCells.length){this.copyStyle(),this.__removeDotModelAndVector();var e=this._dotVector.drawDotSymbolVector();for(let t=0;t<e.length;t++){let i=_0x4786d3.addDotModelAndVector(e[t],this._layer._scene);i.plottingLayer=this._layer,i.SymbolType=_0x1c668c.SYMBOL_DOT,this._vectorPrimitives.push(i)}this._middleMarkBounds&&this._isMiddleMarkExist&&this._textPos===_0x26dfeb.Middle&&this._dotVector.createMiddleText(this._middleMarkBounds)}}clone(){var e=new _0x4844fd({layer:this._layer,libID:this._libID,code:this._code,localPoints:this._localPoints,serverData:this._serverData});e._libID=JSON.parse(JSON.stringify(this._libID)),e._code=JSON.parse(JSON.stringify(this._code)),e._symbolName=JSON.parse(JSON.stringify(this._symbolName)),e._symbolType=JSON.parse(JSON.stringify(this._symbolType)),e._display=JSON.parse(JSON.stringify(this._display)),e._id=JSON.parse(JSON.stringify(this._id)),e._initialize=JSON.parse(JSON.stringify(!1)),e._isEdit=JSON.parse(JSON.stringify(this._isEdit)),e._isUseSymbolLibStyle=JSON.parse(JSON.stringify(this._isUseSymbolLibStyle)),e._markHalo=JSON.parse(JSON.stringify(this._markHalo)),e._localPoints=WebGLPlot.clonePoints(this.localPoints),e._symbolStyle=this._symbolStyle.clone(),e._symbolTextStyle=this._symbolTextStyle.clone(),e._serverData=JSON.parse(JSON.stringify(this._serverData)),e._extendProperty=JSON.parse(JSON.stringify(this._extendProperty)),e._annotationArray=JSON.parse(JSON.stringify(this._annotationArray)),e._wholeHeight=JSON.parse(JSON.stringify(this._wholeHeight)),e._showMode=JSON.parse(JSON.stringify(this._showMode)),e._scale=JSON.parse(JSON.stringify(this._scale)),e._rotate=JSON.parse(JSON.stringify(this._rotate)),e._modelScale=JSON.parse(JSON.stringify(this._modelScale)),e._modelRotate=this._modelRotate.clone(),e._middleMarkBounds=JSON.parse(JSON.stringify(this._middleMarkBounds)),e._isMiddleMarkExist=JSON.parse(JSON.stringify(this._isMiddleMarkExist)),e._vectorScale=JSON.parse(JSON.stringify(this._vectorScale)),e._vectorDefaultSize=JSON.parse(JSON.stringify(this._vectorDefaultSize)),e._vectorRotate=JSON.parse(JSON.stringify(this._vectorRotate)),e._pictureSymbolSize=JSON.parse(JSON.stringify(this._pictureSymbolSize)),e._picturePath=JSON.parse(JSON.stringify(this._picturePath)),e._isNegativeImage=JSON.parse(JSON.stringify(this._isNegativeImage)),e.symbolRank=JSON.parse(JSON.stringify(this._symbolRank)),e._lineSymbolID=JSON.parse(JSON.stringify(this._lineSymbolID)),e._modelPath=JSON.parse(JSON.stringify(this._modelPath)),e._textPos=JSON.parse(JSON.stringify(this._textPos)),e._gridSymbolSize=JSON.parse(JSON.stringify(this._gridSymbolSize)),e._symbolSize=JSON.parse(JSON.stringify(this._symbolSize)),e._hasDragLine=JSON.parse(JSON.stringify(this._hasDragLine)),e._dragPoint=JSON.parse(JSON.stringify(this._dragPoint)),e._textContent=JSON.parse(JSON.stringify(this._textContent)),e._gridSurroundLineWidth=JSON.parse(JSON.stringify(this._gridSurroundLineWidth)),e._gridLineWidth=JSON.parse(JSON.stringify(this._gridLineWidth)),e._innerCells=this._innerCells,e._symbolSizeInLib=JSON.parse(JSON.stringify(this._symbolSizeInLib)),e.bIsShowBloodVolume=JSON.parse(JSON.stringify(this.bIsShowBloodVolume)),e._disableDepthTestDistance=this._disableDepthTestDistance,e._alwaysHasMiddelText=JSON.parse(JSON.stringify(this._alwaysHasMiddelText));for(var t=0;t<this.BloodVolumes.length;t++)e.BloodVolumes.push(_0x211e34.clone(this.BloodVolumes[t]));return e._sizeInMeters=JSON.parse(JSON.stringify(this._sizeInMeters)),e._symbolSizeInMeters=JSON.parse(JSON.stringify(this._symbolSizeInMeters)),e._symbolPictureSizeInMeters=JSON.parse(JSON.stringify(this._symbolPictureSizeInMeters)),e._geoEffectArray=[],this._geoEffectArray.forEach((t=>{e._geoEffectArray.push(t.clone())})),WebGLPlot.defined(this._geoEntity)&&(e._geoEntity=this._geoEntity.clone(e)),e}_getServerDataPrototype(e){this._anchorPoint=WebGLPlot.defaultValue(e.anchorPoint,new WebGLPlot.Cartesian2(0,0)),this._gridSymbolSize=WebGLPlot.defaultValue(new WebGLPlot.Cartesian2(e.symbolSize.x,e.symbolSize.y),new WebGLPlot.Cartesian2(-1,-1)),this._symbolSizeInLib=WebGLPlot.defined(e.symbolSizeInLib)?new WebGLPlot.Cartesian2(e.symbolSizeInLib.x,e.symbolSizeInLib.y):new WebGLPlot.Cartesian2(this._gridSymbolSize.x,this._gridSymbolSize.y),this._symbolRanks=WebGLPlot.defaultValue(e.symbolRanks,[]),this._middleMarkBounds=WebGLPlot.defaultValue(e.middleMarkBounds,null),this._symbolSize=WebGLPlot.defaultValue(e.symbolSize,new WebGLPlot.Cartesian2(-1,-1)),this._innerCells=WebGLPlot.defaultValue(e.innerCells,[])}__removeDotModelAndVector(){if(this.s3mInstance&&WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID)&&(WebGLPlot.s3mInstanceColc.get(this._layer._scene._plottingID).removeInstance(this.s3mInstance.modelPath,this.id),this.s3mInstance=void 0),this._model&&(_0x4786d3.removeDotModelAndVector(this._model,this._layer._scene),this._model=void 0),this._vectorPrimitives.length>0){for(let e=0;e<this._vectorPrimitives.length;e++){let t=this._vectorPrimitives[e];_0x4786d3.removeDotModelAndVector(t,this._layer._scene),t=void 0}this._vectorPrimitives=[]}}__initSymbolPointSymbolData(){_0x3b64c7(this)}}function _0x21ef32(e){return!("string"==typeof e&&e.length>0)}function _0x45e269(e){var t;if(!WebGLPlot.defined(e)||""===e)return t=[];switch(e){case 0:t=[];break;case 1:t=[20,5];break;case 2:t=[2,2];break;case 3:t=[10,2,2,2];break;case 4:t=[10,2,2,2,2,2]}return t}function _0x13ee86(e,t,i){var n=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(t._minCorner.z,t._minCorner.x,t._minCorner.y),t.scale,new WebGLPlot.Cartesian3),r=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(t._maxCorner.z,t._maxCorner.x,t._maxCorner.y),t.scale,new WebGLPlot.Cartesian3),o=n.z<=0?r.z:r.z-n.z,a=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z+o);(i.bIsShowBloodVolume&&i.BloodVolumes.length>0||!_0x21ef32(i._textContent))&&(i._imageResult=i._dotGrid.drawDotModelTextAndBloodVolume(),i.billboard=_0x4786d3.addBillboard(i.createBillboard(a,i._imageResult),i._layer._scene),i._layer.updatePrimitive=!0)}function _0x2a2a94(e){e._model=_0x4786d3.addDotModelAndVector(e._model,e._layer._scene),e._model.SymbolType=_0x1c668c.SYMBOL_DOT,e._modelAnimationPlay&&e._model.readyPromise.then((function(t){t.activeAnimations.addAll({loop:e._modelAnimationLoop,multiplier:e._modelAnimationMultiplier,reverse:e._modelAnimationReverse})}))}function _0x103fc6(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}function _0x3b64c7(e){if(!e||e._code!==_0x1c668c.SYMBOL_POINT)return;let t={fillBackColor:{red:255,green:0,blue:0,alpha:255},fillBackOpaque:!0,fillForeColor:{red:255,green:255,blue:0,alpha:255},fillGradientAngle:0,fillGradientMode:"NONE",fillGradientOffsetRatioX:0,fillGradientOffsetRatioY:0,fillOpaqueRate:100,fillSymbolID:0,lineColor:{red:255,green:255,blue:0,alpha:255},lineSymbolID:0,lineWidth:.5,markerAngle:0,markerHeight:0,markerSize:2.4,markerSymbolID:0,markerWidth:0},i={align:"MIDDLECENTER",backColor:{red:0,green:0,blue:0,alpha:255},backOpaque:!1,bold:!1,borderSpacingWidth:4,fontHeight:7,fontName:WebGLPlot.plotI18n("SongTi"),fontScale:1,fontWeight:0,fontWidth:0,foreColor:{red:0,green:0,blue:0,alpha:255},italic:!1,italicAngle:0,opaqueRate:100,outline:!1,outlineWidth:1,rotation:0,shadow:!1,sizeFixed:!0,strikeout:!1,stringAlignment:"LEFT",underline:!1};var n={fillColorLimit:!1,fillLimit:!0,fontColorLimit:!1,lineColorLimit:!1,lineTypeLimit:!1,lineWidthLimit:!1,polybezierClose:!1,positionPoints:[{x:.1,y:8},{x:8.2,y:8},{x:.1,y:16.1}],style:t,surroundLineColor:new WebGLPlot.Color(255,255,0,255),surroundLineFlag:!1,surroundLineLimit:!1,surroundLineType:0,surroundLineWidth:1,textContent:"",textStyle:i,type:31},r={fillColorLimit:!1,fillLimit:!0,fontColorLimit:!1,lineColorLimit:!1,lineTypeLimit:!1,lineWidthLimit:!1,polybezierClose:!1,positionPoints:[{x:2.571235,y:8},{x:10.671235,y:8},{x:2.571235,y:16.1}],style:t,surroundLineColor:new WebGLPlot.Color(255,255,0,255),surroundLineFlag:!0,surroundLineLimit:!1,surroundLineType:0,surroundLineWidth:1,textContent:"",textStyle:i,type:31};e._gridSymbolSize={x:32,y:32},e._anchorPoint={x:.1,y:8},e._symbolSizeInLib={x:32,y:32},e._innerCells=[n,r]}Object.defineProperties(_0x4844fd.prototype,{middleMarkBounds:{get:function(){return this._middleMarkBounds},set:function(e){e!==this._middleMarkBounds&&(this._middleMarkBounds=e,this._initialize=!1)}},modelAnimationPlay:{get:function(){return this._modelAnimationPlay},set:function(e){e!==this._modelAnimationPlay&&(this._modelAnimationPlay=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationLoop:{get:function(){return this._modelAnimationLoop},set:function(e){e===this._modelAnimationLoop||!(e instanceof WebGLPlot.ModelAnimationLoop)||(this._modelAnimationLoop=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationMultiplier:{get:function(){return this._modelAnimationMultiplier},set:function(e){e!==this._modelAnimationMultiplier&&(this._modelAnimationMultiplier=e,this._initialize=!1,this._initializeModel=!0)}},modelAnimationReverse:{get:function(){return this._modelAnimationReverse},set:function(e){e!==this._modelAnimationReverse&&(this._modelAnimationReverse=e,this._initialize=!1,this._initializeModel=!0)}},symbolSize:{get:function(){return this._symbolSize},set:function(e){e===this._symbolSize||!(e instanceof WebGLPlot.Cartesian2)||(this._symbolSize=e,this._initialize=!1)}},anchorPoint:{get:function(){return this._anchorPoint},set:function(e){e===this._anchorPoint||!(e instanceof WebGLPlot.Cartesian2)||(this._anchorPoint=e,this._initialize=!1)}},scale:{get:function(){return this._scale},set:function(e){if(!(e===this._scale||"number"!=typeof e||e<=0))if(this.billboard){if(this.billboard.scale=this.billboard.scale/this._scale*e,this._scale=e,this.showMode===_0x2bcc5b.Grid){var t=this._dotGrid.transformPoints();this._dotGrid.computeImageBounds(t)}this.updateEditCtrl(!1)}else this._scale=e,this._initialize=!1}},rotate:{get:function(){return this._rotate},set:function(e){e===this._rotate||!(e instanceof _0x23de81)||(this._rotate=e,this._initialize=!1,this.__setEffectParameter({rotate:this._rotate}))}},modelScale:{get:function(){return this._modelScale.x},set:function(e){e===this._modelScale.x||"number"!=typeof e||e<0||(this.__setEffectParameter({scale:e}),this._modelScale.x=e,this._initialize=!1)}},modelRotate:{get:function(){return this._modelRotate},set:function(e){e===this._modelRotate||!(e instanceof _0x23de81)||(this._modelRotate=e,this._initialize=!1,this.__setEffectParameter({rotate:e}))}},modelColor:{get:function(){return this._modelColor},set:function(e){e instanceof WebGLPlot.Color&&(this._modelColor=e,this._initialize=!1)}},vectorRotate:{get:function(){return this._vectorRotate},set:function(e){e===this._vectorRotate||!(e instanceof _0x23de81)||(this._vectorRotate=e,this.__setEffectParameter({rotate:e}),this._initialize=!1)}},vectorScale:{get:function(){return this._vectorScale},set:function(e){e===this._vectorScale||"number"!=typeof e||(this._vectorScale=e,this.__setEffectParameter({scale:e}),this._initialize=!1)}},vectorDefaultSize:{get:function(){return this._vectorDefaultSize},set:function(e){e===this._vectorDefaultSize||"number"!=typeof e||(this._vectorDefaultSize=e,this._initialize=!1)}},gridLineWidth:{get:function(){return this._gridLineWidth},set:function(e){e===this._gridLineWidth||"number"!=typeof e||(this._gridLineWidth=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},gridSurroundLineWidth:{get:function(){return this._gridSurroundLineWidth},set:function(e){e===this._gridSurroundLineWidth||"number"!=typeof e||(this._gridSurroundLineWidth=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},gridSymbolSize:{get:function(){return this._gridSymbolSize},set:function(e){if(!(e instanceof WebGLPlot.Cartesian2))return!1;var t=new WebGLPlot.Cartesian2(e.x,e.y);if(t.x<=0||t.y<=0)return!1;-1===this._gridSymbolSize.x&&-1===this._gridSymbolSize.y?t=this._symbolSizeInLib:-1===this._symbolSizeInLib.x&&-1===this._symbolSizeInLib.y&&(this._symbolSizeInLib=t.clone());var i=this._gridSymbolSize,n=this._symbolSizeInLib,r=t.x/n.x,o=t.y/n.y,a=n.x/n.y;t.x!==i.x&&t.y!==i.y?r>o?t.y=t.x/a:t.x=t.y*a:t.x!==i.x&&t.y===i.y?t.y=t.x/a:t.x===i.x&&t.y!==i.y&&(t.x=t.y*a),this._gridSymbolSize=t,this._initialize=!1}},pictureSymbolSize:{get:function(){return this._pictureSymbolSize},set:function(e){if(!(e instanceof WebGLPlot.Cartesian2))return!1;this._pictureSymbolSize=e,this._initialize=!1}},showMode:{get:function(){return this._showMode},set:function(e){e===this._showMode||"number"!=typeof e||e<0||e>3||(this._showMode=e,WebGLPlot.defined(this._layer)&&WebGLPlot.defined(this._layer._plottingEdit)&&(_0x2bcc5b.Grid!=e||_0x2bcc5b.Picture!=e)&&this._layer._plottingEdit._ctrlPoints.removeAll(),this.__resetBillboard(),this.__removeDotModelAndVector(),this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},isNegativeImage:{get:function(){return this._isNegativeImage},set:function(e){e===this._isNegativeImage||e.constructor!==Boolean||(this._isNegativeImage=e,WebGLPlot.defined(this._layer)&&WebGLPlot.defined(this._layer._plottingEdit)&&this._layer._plottingEdit.drawSymbolExtend(this),this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},symbolRank:{get:function(){return this._symbolRank},set:function(e){var t=this;if(e!==this._symbolRank&&"number"==typeof e){t._symbolRank=e;var i=WebGLPlot.getLibManager(this.layer._scene._plottingID).serverUrl,n=WebGLPlot.getServerData(this._libID,this._code,i,this._layer._scene._plottingID);if(n){var r=n.getSymbolInfo;r.events.on({processCompleted:function(e){t._innerCells=e.result.innerCells,t._initialize=!1,_0x5ac1e1.getInstance().symbolModified.raiseEvent(t)},processFailed:function(e){},scope:this});var o=n.getSymbolInfoParameters;o.symbolRank=e,o.surroundLineType=1,r.processAsync(o)}}}},symbolRanks:{get:function(){return this._symbolRanks}},lineSymbolID:{get:function(){return this._lineSymbolID},set:function(e){e===this._lineSymbolID||"number"!=typeof e||(this._lineSymbolID=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},modelPath:{get:function(){return this._modelPath},set:function(e){e!==this._modelPath&&(this._modelPath=e,this.__removeDotModelAndVector(),this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},textPos:{get:function(){return this._textPos},set:function(e){e===this._textPos||!this._middleMarkExist&&e===_0x26dfeb.Middle||(this._textPos=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},hasDragLine:{get:function(){return this._hasDragLine},set:function(e){e===this._hasDragLine||e.constructor!==Boolean||(this._hasDragLine=e,this._initialize=!1)}},dragPoint:{get:function(){return this._dragPoint},set:function(e){e===this._dragPoint||!(e instanceof _0x23de81)||(this._dragPoint=e,this._initialize=!1)}},picturePath:{get:function(){return this._picturePath},set:function(e){e!==this._picturePath&&(this._picturePath=e,this._initialize=!1,this._isAnimationFeature||_0x5ac1e1.getInstance().symbolModified.raiseEvent(this))}},scalePoints:{get:function(){return this._scalePoints},set:function(e){e===this._scalePoints||!(e instanceof _0x23de81)||(this._scalePoints=e,this._initialize=!1)}},scaleValues:{get:function(){return this._scaleValues},set:function(e){e===this._scaleValues||!Array.isArray(e)||(this._scaleValues=e,this._initialize=!1)}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){e===this._sizeInMeters||_0x2bcc5b.Grid!==this.showMode&&_0x2bcc5b.Picture!==this.showMode||(this._sizeInMeters=e,this._initialize=!1,e||(this._BillboardScale=1))}},alwaysHasMiddelText:{get:function(){return this._alwaysHasMiddelText},set:function(e){e!==this._alwaysHasMiddelText&&(this._alwaysHasMiddelText=e,this._initialize=!1)}},symbolSizeInMeters:{get:function(){return this._symbolSizeInMeters},set:function(e){if(e!==this._symbolSizeInMeters&&e instanceof WebGLPlot.Cartesian2){if(this._symbolSizeInMeters=e,this.sizeInMeters){var t=this._symbolSizeInMeters.x/this._gridSymbolSize.x;this._symbolSizeInMeters.y=t*this._gridSymbolSize.y,this._BillboardScale=t}this._initialize=!1}}},symbolPictureSizeInMeters:{get:function(){return this._symbolPictureSizeInMeters},set:function(e){if(e!==this._symbolPictureSizeInMeters&&e instanceof WebGLPlot.Cartesian2){if(this._symbolPictureSizeInMeters=e,this.sizeInMeters){var t=this._symbolPictureSizeInMeters.x/this._gridSymbolSize.x;this._symbolPictureSizeInMeters.y=t*this._gridSymbolSize.y,this._BillboardScale=t}this._initialize=!1}}},billboardBoundsColor:{get:function(){return this._billboardBoundsColor},set:function(e){e instanceof WebGLPlot.Color&&(this._billboardBoundsColor=e,this._initialize=!1)}},billboardBoundsLineWidth:{get:function(){return this._billboardBoundsLineWidth},set:function(e){e===this._billboardBoundsLineWidth||"number"!=typeof e||(this._billboardBoundsLineWidth=e,this._initialize=!1)}}});var _0x342473=(_0x730cd0=!0,function(e,t){var i=_0x730cd0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x730cd0=!1,i}),_0x54ec34=_0x342473(void 0,(function(){return _0x54ec34.toString().search("(((.+)+)+)+$").toString().constructor(_0x54ec34).search("(((.+)+)+)+$")})),_0x730cd0;function _0x39500c(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._textContent=WebGLPlot.defaultValue(e.textContent,""),this._localPoint=WebGLPlot.defaultValue(e.localPoint,new WebGLPlot.Cartesian3(0,0,0)),this._textStyle=WebGLPlot.defaultValue(e.textStyle,new _0x40b7f2)}_0x54ec34(),Object.defineProperties(_0x39500c.prototype,{textContent:{get:function(){return this._textContent},set:function(e){e&&"string"==typeof e&&(this._textContent=e)}},localPoint:{get:function(){return this._localPoint},set:function(e){(e instanceof _0x23de81||e instanceof WebGLPlot.Cartesian3)&&(this._localPoint=e)}},textStyle:{get:function(){return this._textStyle}},fontName:{get:function(){return this._textStyle._fontName}},foreColor:{get:function(){return this._textStyle._foreColor}},fontSize:{get:function(){return this._textStyle._fontSize}},outlineWidth:{get:function(){return this._textStyle._outlineWidth}},outlineColor:{get:function(){return this._textStyle._outlineColor}},outline:{get:function(){return this._textStyle._outline}}});var _0x45e2e0=(_0x2c8243=!0,function(e,t){var i=_0x2c8243?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c8243=!1,i}),_0x199f79=_0x45e2e0(void 0,(function(){return _0x199f79.toString().search("(((.+)+)+)+$").toString().constructor(_0x199f79).search("(((.+)+)+)+$")})),_0x2c8243;_0x199f79();var WebGLPlot$b=window.WebGLPlot=window.WebGLPlot||{};function _0x394df6(e,t){var i=t;if(!i)throw new WebGLPlot$b.DeveloperError("name is required to create PlottingLayer");this._waterPlanes=[],this._visibleViewport=0,this._scene=e,this._valid=!0,this._bIsUseDepthTest=!1,this._visibility=!0,this._geoGraphicObjects=[],this._isLocked=!1,this._isEditable=!0,this._isSelected=!0,this.updatePrimitive=!1,this._selectedFeature=void 0,this._name=i,this._id=-1,this._symbolAddedEvent=new WebGLPlot$b.Event,this._objsVisibleMap={}}function _0x1c9a37(e){var t=new WebGLPlot$b.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,WebGLPlot$b.defined(e.red)||(t.red=1),WebGLPlot$b.defined(e.green)||(t.green=1),WebGLPlot$b.defined(e.blue)||(t.blue=1),WebGLPlot$b.defined(e.alpha)||(t.alpha=1),t}function _0x2e224b(e,t,i){var n=parseInt(t.symbolType);if(e._symbolType=n,e._symbolName=t.symbolName,e.__dotPlotLibID=t.dotPlotLibID,e.__dotPlotCode=t.dotPlotCode,""!==t.uuid&&WebGLPlot$b.defined(t.uuid)?e._id=t.uuid:e._id=WebGLPlot$b.createGuid(),e._isEdit=!0,e._wholeHeight=WebGLPlot$b.defined(t.wholeHeight)?t.wholeHeight:0,e._display=!0,"none"===t.style.display&&(e._display=!1),t.localePoints){let i=[];for(let e=0;e<t.localePoints.length;e++){const n=t.localePoints[e];i.push(new _0x23de81(parseFloat(n.x),parseFloat(n.y),n.z?parseFloat(n.z):0))}e._localPoints=i}if(e._surroundRatioVal=WebGLPlot$b.defined(t.surroundRatioVal)?t.surroundRatioVal:.002,t.surroundLineColor&&(e._symbolStyle._surroundLineColor=_0x1c9a37(t.surroundLineColor)),e._textContent=t.textContent,e._symbolStyle._surroundLineType=t.surroundLineType,e._symbolStyle._surroundLineWidth=WebGLPlot$b.defined(t.surroundlineWidth3D)?t.surroundlineWidth3D:3,e._symbolStyle._lineColor=_0x1c9a37(t.style.lineColor),e._symbolStyle._opacity=e._symbolStyle.lineColor.alpha,e._symbolStyle._fillSymbolID=t.style.fillSymbolID,e._symbolStyle._fillForeColor=_0x1c9a37(t.style.fillForeColor),e._symbolStyle._fillBackColor=_0x1c9a37(t.style.fillBackColor),e._symbolStyle._fillGradientMode=t.style.fillGradientMode,e._symbolStyle._fillBackOpaque=t.style.fillBackOpaque,e._symbolStyle._fillGradientAngle=t.style.fillGradientAngle,e._symbolStyle._fillOpaqueRate=100-t.style.fillOpaqueRate,e._symbolStyle._fillGradientOffsetRatioX=t.style.fillGradientOffsetRatioX,e._symbolStyle._fillGradientOffsetRatioY=t.style.fillGradientOffsetRatioY,e._symbolStyle._lineWidth=WebGLPlot$b.defined(t.style.lineWidth3D)?t.style.lineWidth3D:3,t.hasOwnProperty("extendProperty")&&(e._extendProperty=t.extendProperty),t.hasOwnProperty("annotationArray"))for(var r=t.annotationArray,o=0;o<r.length;o++)e._annotationArray.push(new _0x39500c({textContent:r[o]._textContent,localPoint:r[o]._localPoint,textStyle:r[o]._textStyle}));if(t.textStyle2D){e._symbolTextStyle._italicAngle=t.textStyle2D.italicAngle,e._symbolTextStyle._shadow=t.textStyle2D.shadow,e._symbolTextStyle._sizeFixed=t.textStyle2D.sizeFixed,e._symbolTextStyle._underline=t.textStyle2D.underline,e._symbolTextStyle._rotation=t.textStyle2D.rotation,e._symbolTextStyle._bold=t.textStyle2D.bold,e._symbolTextStyle._align=t.textStyle2D.align,e._symbolTextStyle._italic=t.textStyle2D.italic,e._symbolTextStyle._strikeout=t.textStyle2D.strikeout,e._symbolTextStyle._fontName=t.textStyle2D.fontName,e._symbolTextStyle._outline=t.textStyle2D.outline,e._symbolTextStyle._borderSpacingWidth=t.textStyle2D.borderSpacingWidth,e._symbolTextStyle._outlineWidth=96*t.textStyle2D.outlineWidth/25.4,e._symbolTextStyle._fontWidth=t.textStyle2D.fontWidth,e._symbolTextStyle._opaqueRate=t.textStyle2D.opaqueRate,e._symbolTextStyle._stringAlignment=t.textStyle2D.stringAlignment,e._symbolTextStyle._fontScale=t.textStyle2D.fontScale,e._symbolTextStyle._fontWeight=t.textStyle2D.fontWeight,e._symbolTextStyle._foreColor=_0x1c9a37(t.textStyle2D.foreColor),WebGLPlot$b.defined(t.textStyle2D.fontStrokeColor)?e._symbolTextStyle._backColor=_0x1c9a37(t.textStyle2D.fontStrokeColor):WebGLPlot$b.defined(t.textStyle2D.backColor)&&(e._symbolTextStyle._backColor=_0x1c9a37(t.textStyle2D.backColor)),e._symbolTextStyle._fontHeight=t.textStyle2D.fontHeight,e._symbolTextStyle._fontSize=parseInt(96*t.textStyle2D.fontHeight/25.4);let i=WebGLPlot$b.defined(t.textStyle2D.fontBackgroundColor)?_0x1c9a37(t.textStyle2D.fontBackgroundColor):new WebGLPlot$b.Color(1,0,0,.3);e._symbolTextStyle.setTextRectColor(i),e._symbolTextStyle._isShowTextBox=!!WebGLPlot$b.defined(t.textStyle2D.backOpaque)&&t.textStyle2D.backOpaque}if(t.textStyle3D,_0x1c668c.SYMBOL_DOT===n||_0x1c668c.SYMBOL_Model===n||_0x1c668c.SYMBOL_PICTURE===n){if(t.anchorPoint&&(e._anchorPoint=new WebGLPlot$b.Cartesian2(t.anchorPoint.x,t.anchorPoint.y)),t.symbolSize&&-1!==t.symbolSize.x&&-1!==t.symbolSize.y&&(e._symbolSize=new WebGLPlot$b.Cartesian2(t.symbolSize.x,t.symbolSize.y)),t.gridSymbolSize&&-1!==t.gridSymbolSize.x&&-1!==t.gridSymbolSize.y?e._gridSymbolSize=new WebGLPlot$b.Cartesian2(t.gridSymbolSize.x,t.gridSymbolSize.y):t.symbolSizeInLib&&(e._gridSymbolSize=new WebGLPlot$b.Cartesian2(t.symbolSizeInLib.x,t.symbolSizeInLib.y)),t.pictureSymbolSize&&-1!==t.pictureSymbolSize.x&&-1!==t.pictureSymbolSize.y&&(e._pictureSymbolSize=new WebGLPlot$b.Cartesian2(t.pictureSymbolSize.x,t.pictureSymbolSize.y)),t.scale3D&&(WebGLPlot$b.defined(t.scale3D.x)?e._scale=t.scale3D.x:e._scale=t.scale3D),t.rotate2D?e._rotate=new _0x23de81(t.rotate2D.x,t.rotate2D.y,t.rotate2D.z):e._rotate=new _0x23de81(1,1,1),t.innerCells?e._innerCells=t.innerCells:_0x3333ab(t.libID,t.code,e,i),t.symbolRanks&&(e._symbolRanks=t.symbolRanks),WebGLPlot$b.defined(t.picturePath)&&(e._picturePath=t.picturePath),WebGLPlot$b.defined(t.modelPath)&&(e._modelPath=t.modelPath),t.modelScale&&(e._modelScale.x=t.modelScale),t.modelRotate&&(e._modelRotate=new _0x23de81(t.modelRotate.x,t.modelRotate.y,t.modelRotate.z)),t.vectorScale&&(e._vectorScale=t.vectorScale),t.vectorRotate&&(e._vectorRotate=new _0x23de81(t.vectorRotate.x,t.vectorRotate.y,t.vectorRotate.z)),t.vectorDefaultSize&&(e._vectorDefaultSize=t.vectorDefaultSize),WebGLPlot$b.defined(t.middleMarkExist)&&(e._isMiddleMarkExist=t.middleMarkExist),WebGLPlot$b.defined(t.middleMarkBounds)&&(e._middleMarkBounds=t.middleMarkBounds),t.symbolSizeInLib?e._symbolSizeInLib=t.symbolSizeInLib:WebGLPlot$b.defined(t.mpWidth)&&WebGLPlot$b.defined(t.mpHeight)&&(e._symbolSizeInLib=new WebGLPlot$b.Cartesian2(t.mpWidth,t.mpHeight)),t.BloodVolumes)for(o=0;o<t.BloodVolumes.length;o++)e.BloodVolumes.push(_0x211e34.clone(t.BloodVolumes[o]));t.bIsShowBloodVolume&&(e.bIsShowBloodVolume=t.bIsShowBloodVolume),WebGLPlot$b.defined(t.disableDepthTestDistance)&&("5e-324"!==t.disableDepthTestDistance?e._disableDepthTestDistance=Number.MAX_VALUE:e._disableDepthTestDistance=Number.MIN_VALUE),WebGLPlot$b.defined(t.sizeInMeters)&&(e._sizeInMeters=t.sizeInMeters),WebGLPlot$b.defined(t.symbolSizeInMeters)&&(e._symbolSizeInMeters=new WebGLPlot$b.Cartesian2(t.symbolSizeInMeters.x,t.symbolSizeInMeters.y)),WebGLPlot$b.defined(t.alwaysHasMiddelText)&&(e._alwaysHasMiddelText=t.alwaysHasMiddelText),e._isNegativeImage=t.negativeImage,e._gridLineWidth=WebGLPlot$b.defined(t.gridLineWidth3D)?4*t.gridLineWidth3D:3,e._gridSurroundLineWidth=WebGLPlot$b.defined(t.gridSurroundLineWidth3D)?4*t.gridSurroundLineWidth3D:3,e._symbolRank=t.symbolRank,e._lineSymbolID=t.style.lineSymbolID,e._middleMarkExist=t.middleMarkExist,e._textPos=WebGLPlot$b.defined(t.annotationPosition)?t.annotationPosition:0,e._showMode=WebGLPlot$b.defined(t.dotShowMode)?t.dotShowMode:_0x2bcc5b.Grid}else t.subSymbols&&(e._subSymbols=t.subSymbols),t.scaleValues&&(e._scaleValues=t.scaleValues),WebGLPlot$b.defined(t.style.extendHeight)&&(e._extendWallHeight=t.style.extendHeight),WebGLPlot$b.defined(t.wallOpaqueRate)&&(t.wallOpaqueRate>1&&t.wallOpaqueRate<100?e._extendWallOpacity=(100-t.wallOpaqueRate)/100:t.wallOpaqueRate<=1&&(e._extendWallOpacity=t.wallOpaqueRate)),t.subSymbolSize&&e._updateSubSize?e._updateSubSize=!1:e._updateSubSize=!0,e._subSymbolSize=t.subSymbolSize?t.subSymbolSize:0,WebGLPlot$b.defined(t.subSymbolScaleValue)&&(e._subSymbolScaleValue=t.subSymbolScaleValue),t.hasOwnProperty("isClampToGround")&&(e._isClampToGround=t.isClampToGround),t.hasOwnProperty("arrowHeadType")&&(e._arrowHeadType=t.arrowHeadType),t.hasOwnProperty("arrowBodyType")&&(e._arrowBodyType=t.arrowBodyType),t.hasOwnProperty("arrowTailType")&&(e._arrowTailType=t.arrowTailType);return e}function _0x3333ab(e,t,i,n){var r=WebGLPlot$b.getServerData(e,t,void 0,n);!r||(r.getSymbolInfo.events.on({processCompleted:function(e){return i._innerCells=e.result.innerCells,i._getServerDataPrototype&&i._getServerDataPrototype(e.result),i._initialize=!1,!0},processFailed:function(){},scope:self}),r.getSymbolInfo.processAsync(r.getSymbolInfoParameters))}function _0x4cd2b3(e,t){!e||(e.lineColor&&(t.symbolStyle.lineColor=e.lineColor),e.lineWidth&&(t.symbolType===_0x1c668c.SYMBOL_DOT?t.gridLineWidth=e.lineWidth:t.symbolStyle.lineWidth=e.lineWidth),e.textContent&&(t.textContent=e.textContent),e.fontSize&&(t.symbolTextStyle.fontSize=e.fontSize),e.fontColor&&(t.symbolTextStyle.foreColor=e.fontColor))}_0x394df6.prototype.createSymbol=function(e,t,i,n,r){if(!Array.isArray(i)||i.length<=0||void 0===WebGLPlot$b.getLibManager(this._scene._plottingID))throw new WebGLPlot$b.DeveloperError("PlottingLayer createSymbol points or Plotting is needed!!!");if(this.isEditable){if(0===e&&(t===_0x1c668c.SYMBOL_PICTURE||t===_0x1c668c.SYMBOL_Model)&&WebGLPlot$b.defined(n)&&"function"!=typeof n&&WebGLPlot$b.defined(n.url))return n.libID=e,n.code=t,n.points=i,void this.createModelAndPicture(n,r);"function"==typeof n&&!WebGLPlot$b.defined(r)&&(r=n);for(var o=this,a=[],s=WebGLPlot$b.getLibManager(this._scene._plottingID),l=0;l<i.length;l++)a.push(i[l].clone());var u=null,c=null;if(!s.useServerData){var h=s.localSymbolLibData[e][t];return u=o.createGraphicObject(o,a,h),_0x4cd2b3(n,u),"function"==typeof r&&r({feature:u}),!0}if(0===(c=WebGLPlot$b.getServerData(e,t,void 0,this._scene._plottingID)))return u=_0x2909c1.isSymbolDot(t)?new _0x4844fd({layer:this,libID:e,code:t,localPoints:a}):new _0x330d7a({layer:this,libID:e,code:t,localPoints:a}),_0x4cd2b3(n,u),u._symbolType=t,this._pushGeoGraphicObjectArray(u),"function"==typeof r&&r({feature:u}),!0;if(null!==c){var d=s.getSymbolData(e,t);if(WebGLPlot$b.defined(d)&&null!==d)return u=o.createGraphicObject(o,a,d),_0x4cd2b3(n,u),"function"==typeof r&&r({feature:u}),!0;c.getSymbolInfo.events.on({processCompleted:function(t){var i=t.result;return-1!==i.libID&&-1!==i.code&&(s.setSymbolData(e,t.result),u=o.createGraphicObject(o,a,i),_0x4cd2b3(n,u),"function"==typeof r&&r({feature:u}),!0)},processFailed:function(e){return r(e)},scope:this}),c.getSymbolInfo.processAsync(c.getSymbolInfoParameters)}}},_0x394df6.prototype.createModelAndPicture=function(e,t){if(!this.isEditable||0!==e.libID||e.code!==_0x1c668c.SYMBOL_Model&&e.code!==_0x1c668c.SYMBOL_PICTURE)return;if(null===WebGLPlot$b.getLibManager(this._scene._plottingID))throw new WebGLPlot$b.DeveloperError("Plotting is needed initialize to get SymbolLibManager");for(var i=[],n=0;n<e.points.length;n++)i.push(e.points[n].clone());var r=null;let o=WebGLPlot$b.defined(e.modelScale)?e.modelScale:1;var a={layer:this,libID:e.libID,code:e.code,localPoints:i,modelScale:new _0x23de81(o,o,o),pictureSymbolSize:e.pictureSymbolSize};r=new _0x4844fd(a),e.code===_0x1c668c.SYMBOL_Model?(r._showMode=_0x2bcc5b.Marker,r._modelPath=e.url,r._symbolType=_0x1c668c.SYMBOL_Model):e.code===_0x1c668c.SYMBOL_PICTURE&&(r._showMode=_0x2bcc5b.Picture,r._picturePath=e.url,r._symbolType=_0x1c668c.SYMBOL_PICTURE),_0x4cd2b3(e,r),WebGLPlot$b.defined(r)&&null!==r&&this._pushGeoGraphicObjectArray(r),"function"==typeof t&&t({feature:r})},_0x394df6.prototype.createGraphicObject=function(e,t,i){var n=null;return i.symbolType===_0x1c668c.SYMBOL_DOT?n=new _0x4844fd({layer:e,libID:i.libID,code:i.code,localPoints:t,serverData:i}):i.symbolType!==_0x1c668c.SYMBOL_DOT&&i.symbolType!==_0x1c668c.SYMBOL_UNKNOW&&(n=new _0x330d7a({layer:e,libID:i.libID,code:i.code,localPoints:t,serverData:i})),WebGLPlot$b.defined(n)&&null!==n&&e._pushGeoGraphicObjectArray(n),n},_0x394df6.prototype.update=function(e,t,i,n){if(this._valid)for(var r=0;r<this._geoGraphicObjects.length;r++)(this._geoGraphicObjects[r]instanceof _0x4844fd||this._geoGraphicObjects[r]instanceof _0x330d7a||this._geoGraphicObjects[r]instanceof _0x8c2e6e)&&(this.visibility?this._geoGraphicObjects[r].update(e,t,i,n):this._geoGraphicObjects[r].setVisible(this.visibility))},_0x394df6.prototype.render=function(e,t){if(this._valid){for(var i=0;i<this._geoGraphicObjects.length;i++)!1===this._geoGraphicObjects[i]._initialize&&(this.updatePrimitive=!0),(this._geoGraphicObjects[i]instanceof _0x4844fd||this._geoGraphicObjects[i]instanceof _0x330d7a||this._geoGraphicObjects[i]instanceof _0x8c2e6e)&&this._geoGraphicObjects[i].initSymbol();this.updatePrimitive&&(_0x4786d3.setUpdatePrimitive(!0,this._scene),this.updatePrimitive=!1)}},_0x394df6.prototype.setVisibleByID=function(e,t){!this._valid||!1===this._visibility||(this._geoGraphicObjects[e].display=t)},_0x394df6.prototype.setColorByID=function(e,t){if(this._valid&&!1!==this._visibility){if(t instanceof Array)return t=new WebGLPlot$b.Color(t[0],t[1],t[2],t[3]),void this._geoGraphicObjects[e].setColor(t);this._geoGraphicObjects[e].setColor(t)}},_0x394df6.prototype.resetColor=function(){this._valid},_0x394df6.prototype.getFeatureByUuid=function(e){if(!this._valid)return null;for(var t=0;t<this._geoGraphicObjects.length;++t){if(e===this._geoGraphicObjects[t].id)return this._geoGraphicObjects[t];if(this._geoGraphicObjects[t]instanceof _0x8c2e6e&&this._geoGraphicObjects[t].getFeatureByUuid(e))return this._geoGraphicObjects[t]}},_0x394df6.prototype.findFeatureByUuid=function(e){if(!this._valid||""===e||!WebGLPlot$b.defined(e))return null;for(var t=0;t<this._geoGraphicObjects.length;++t)if(e===this._geoGraphicObjects[t].id)return{feature:this._geoGraphicObjects[t],index:t};return null},_0x394df6.prototype.addFeature=function(e){var t=e.id;if(!WebGLPlot$b.defined(t))return!1;for(var i=0;i<this._geoGraphicObjects.length;++i)if(t===this._geoGraphicObjects[i].id)return!1;return e._layer=this,this._pushGeoGraphicObjectArray(e),!0},_0x394df6.prototype.setSelectedFeature=function(e){if(this._valid&&this.isSelected)for(var t=0;t<this._geoGraphicObjects;++t)if(e===this._geoGraphicObjects[t]){this._selectedFeature=this._geoGraphicObjects[t],WebGLPlot$b.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature);break}},_0x394df6.prototype.setSelectedFeatureByIndex=function(e){!this._valid||!this.isSelected||WebGLPlot$b.defined(this._geoGraphicObjects[e])&&(this._selectedFeature=this._geoGraphicObjects[e],WebGLPlot$b.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature))},_0x394df6.prototype.setSelectedFeatureByID=function(e){if(this._valid&&this.isSelected)for(var t=0;t<this._geoGraphicObjects.length;++t)if(e===this._geoGraphicObjects[t]._id){this._selectedFeature=this._geoGraphicObjects[t],WebGLPlot$b.defined(this._plottingEdit)&&this._plottingEdit.DoSelectObjectEdit(this._selectedFeature);break}},_0x394df6.prototype.releaseSelection=function(){!this._valid||((WebGLPlot$b.defined(this._selectedFeature)||null!==this._selectedFeature)&&(this._selectedFeature=void 0),WebGLPlot$b.defined(this._plottingEdit)&&this._plottingEdit.unSelection(!0))},_0x394df6.prototype.removeGeoGraphicObject=function(e,t){if(WebGLPlot$b.defined(e)&&0!==this._geoGraphicObjects.length&&this.isEditable)for(var i=0;i<this._geoGraphicObjects.length;i++)if(this._geoGraphicObjects[i].id===e.id||this._geoGraphicObjects[i]instanceof _0x8c2e6e&&this._geoGraphicObjects[i].getFeatureByUuid(e.id)){let e=this._geoGraphicObjects[i].id,n=this.name;if(_0x5ac1e1.getInstance().symbolBeforeDeleted.raiseEvent([e],n),this._geoGraphicObjects[i]._destroy(),this._geoGraphicObjects[i]=null,this._geoGraphicObjects.splice(i,1),t&&_0x5ac1e1.getInstance().symbolDeleted.raiseEvent([e],n),WebGLPlot$b.defined(this._plottingEdit))this._plottingEdit.releaseSelection(),this._plottingEdit.RemoveFeatureEvent.raiseEvent();return!0}},_0x394df6.prototype.removeAll=function(e){this._removeAll(!1,e)},_0x394df6.prototype._removeAll=function(e,t){if(!(e||0!==this._geoGraphicObjects.length&&this.isEditable))return;let i=[];for(var n=0;n<this._geoGraphicObjects.length;n++)i.push(this._geoGraphicObjects[n].id);_0x5ac1e1.getInstance().symbolBeforeDeleted.raiseEvent(i,this.name);for(n=0;n<this._geoGraphicObjects.length;n++)this._geoGraphicObjects[n]._destroy();(t&&_0x5ac1e1.getInstance().symbolDeleted.raiseEvent(i,this.name),WebGLPlot$b.defined(this._plottingEdit))&&(this._plottingEdit.releaseSelection(),this._plottingEdit.RemoveFeatureEvent.raiseEvent());this._geoGraphicObjects=[]},_0x394df6.prototype.destroy=function(e){this._plottingEdit&&(this._plottingEdit.releaseSelection(),this._plottingEdit._plottingLayer=null);let t=[];for(let e=0;e<this._geoGraphicObjects.length;e++){let i=this._geoGraphicObjects[e];t.push(i.id)}_0x5ac1e1.getInstance().symbolBeforeDeleted.raiseEvent(t,this.name);for(let e=0;e<this._geoGraphicObjects.length;e++){let t=this._geoGraphicObjects[e];t._destroy(),t=void 0}e&&_0x5ac1e1.getInstance().symbolDeleted.raiseEvent(t,this.name),this._geoGraphicObjects=[],this._selectedFeature=null,this._name=null,this._projectName=null,this._waterPlanes=null,this._scene=null},_0x394df6.prototype.delete=function(){this.removeAll(),_0x2909c1.getPlotLayers(this._scene).remove(this.name,!0)},_0x394df6.prototype.removeFeatureByUuId=function(e,t){for(var i=0;i<this._geoGraphicObjects.length;++i)e===this._geoGraphicObjects[i].id&&this.removeGeoGraphicObject(this._geoGraphicObjects[i],t)},_0x394df6.prototype.setUseDepthTest=function(e){this._bIsUseDepthTest=e,_0x4786d3.setUseDepthTest(e,this._scene)},_0x394df6.prototype.createGroupObject=function(e){if(!e||e.length<=1||!this.isEditable)return null;for(var t=0;t<e.length;t++)if(!WebGLPlot$b.defined(e[t])||null===this.findFeatureByUuid(e[t].id))return null;for(t=0;t<e.length;t++)this.removeGeoGraphicObject(e[t]);var i=new _0x8c2e6e(e);return this._pushGeoGraphicObjectArray(i,!1),i},_0x394df6.prototype.getFeaturesFromGroupObject=function(e){var t=[];for(var i in e.subObjects)e.subObjects[i]instanceof _0x8c2e6e?t=t.concat(this.getFeaturesFromGroupObject(e.subObjects[i])):t.push(e.subObjects[i]);return t},_0x394df6.prototype.unGroupObject=function(e){if(!(e instanceof _0x8c2e6e&&this.isEditable))return!1;var t=e.unGroupObject();return this.removeGeoGraphicObject(e),this._geoGraphicObjects=this._geoGraphicObjects.concat(t),!0},_0x394df6.prototype.geoJsonToGeoGraphicObject=function(e,t){var i=this.findFeatureByUuid(e.uuid);i&&this.removeGeoGraphicObject(i.feature);var n=null;if(_0x1c668c.GROUPOBJECT===parseInt(e.symbolType)){n=new _0x8c2e6e(this.createGroupObjectByGeoJson(e),e.uuid)}else n=this.createSymbolByGeoJson(n,e);this._pushGeoGraphicObjectArray(n,!0),n._GeoJsonFeature=e,"function"==typeof t&&t({feature:n})},_0x394df6.prototype.createGroupObjectByGeoJson=function(e){var t=[];if(!this.isEditable)return t;var i=null,n=e.geometries;for(var r in n){if(_0x1c668c.GROUPOBJECT===parseInt(n[r].symbolType))i=new _0x8c2e6e(this.createGroupObjectByGeoJson(n[r]),n[r].id);else i=this.createSymbolByGeoJson(i,n[r]);t.push(i)}return t},_0x394df6.prototype.createSymbolByGeoJson=function(e,t){for(var i=parseInt(t.libID),n=parseInt(t.code),r=[],o=t.localePoints,a=0;a<o.length;++a){var s=o[a],l=parseFloat(s.x),u=parseFloat(s.y),c=WebGLPlot$b.defined(s.z)?parseFloat(s.z):0;r.push(new _0x23de81(l,u,c))}return _0x2e224b(e=parseInt(t.symbolType)===_0x1c668c.SYMBOL_DOT||parseInt(t.symbolType)===_0x1c668c.SYMBOL_Model||parseInt(t.symbolType)===_0x1c668c.SYMBOL_PICTURE?new _0x4844fd({layer:this,libID:i,code:n,localPoints:r,symbolSizeInLib:t.symbolSize}):new _0x330d7a({layer:this,libID:i,code:n,localPoints:r}),t,this._scene._plottingID),e},_0x394df6.prototype.setCustomClipBox=function(e){},_0x394df6.prototype.clearCustomClipBox=function(){},_0x394df6.prototype._pushGeoGraphicObjectArray=function(e,t){void 0===t&&(t=!0),e instanceof _0x2d9130&&(this._geoGraphicObjects.push(e),t&&(this._symbolAddedEvent.raiseEvent(e),_0x5ac1e1.getInstance().symbolAdded.raiseEvent(e,this.name)))},_0x394df6.prototype.updateGeoGraphicObjectByGeoJson=function(e){if(WebGLPlot$b.defined(e)&&WebGLPlot$b.defined(e.uuid)){let t=this.getFeatureByUuid(e.uuid);if(WebGLPlot$b.defined(t))return _0x2e224b(t,e,this._scene._plottingID),t._initialize=!1,_0x5ac1e1.getInstance().symbolUpdated.raiseEvent(t),t}return null},Object.defineProperties(_0x394df6.prototype,{id:{get:function(){return this._id}},visibility:{get:function(){return this._visibility},set:function(e){if(this._visibility!==e){for(var t in this._visibility=e,this._geoGraphicObjects)if(this._geoGraphicObjects[t]instanceof _0x4844fd||this._geoGraphicObjects[t]instanceof _0x330d7a||this._geoGraphicObjects[t]instanceof _0x8c2e6e){if(!this._geoGraphicObjects[t].display)continue;this._geoGraphicObjects[t].setVisible(e)}!e&&this._plottingEdit&&this._plottingEdit.releaseSelection(),_0x5ac1e1.getInstance().layerVisibleChanged.raiseEvent(this.name,e)}}},name:{get:function(){return this._name},set:function(e){e!==this._name&&(this._name=e)}},geoGraphicObjects:{get:function(){return this._geoGraphicObjects}},selectedFeature:{get:function(){return this._selectedFeature}},isEditable:{get:function(){return this._isEditable},set:function(e){e!==this._isEditable&&(this._isEditable=e,!e&&this._plottingEdit?this._plottingEdit.releaseSelection():e&&this._plottingEdit&&this.selectedFeature&&this._plottingEdit.DoSelectObjectEdit(this.selectedFeature),_0x5ac1e1.getInstance().layerEditableChanged.raiseEvent(this.name,e))}},isSelected:{get:function(){return this._isSelected},set:function(e){e!==this._isSelected&&(this._isSelected=e,e?this._plottingEdit.activate():(this._plottingEdit.deactivate(),this.releaseSelection()),_0x5ac1e1.getInstance().layerSelectedChanged.raiseEvent(this.name,e))}},isLocked:{get:function(){return this._isLocked},set:function(e){e!==this._isLocked&&(this._isLocked=e,_0x5ac1e1.getInstance().layerActived.raiseEvent(this.name,e))}},symbolAddedEvent:{get:function(){return this._symbolAddedEvent}}}),_0x394df6.prototype.getSelection=function(){return[]};const _0x24a674=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2b21f2=_0x24a674(void 0,(function(){return _0x2b21f2.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b21f2).search("(((.+)+)+)+$")}));_0x2b21f2();var _0x386d8c=function(){this._layers=new WebGLPlot.AssociativeArray,this._layerQueue=[],this._layerIndex=3,this._selectedLayer=void 0,this.collentionLayer=void 0,this.goAnimationLayer=void 0};Object.defineProperties(_0x386d8c.prototype,{layerQueue:{get:function(){return this._layerQueue}}}),_0x386d8c.prototype.prePassesUpdate=function(e){this.render(e,null)},_0x386d8c.prototype.update=function(e,t,i,n){var r=this._layerQueue,o=this._layerQueue.length,a=0;for(a=0;a<o;a++){var s=r[a];!WebGLPlot.defined(s)||s.update(e,t,i)}WebGLPlot.defined(this.collentionLayer)&&this.collentionLayer.update(e,t,i),WebGLPlot.defined(this.goAnimationLayer)&&this.goAnimationLayer.update(e,t,i)},_0x386d8c.prototype.render=function(e,t){var i=this._layerQueue,n=this._layerQueue.length,r=0;for(r=0;r<n;r++){var o=i[r];!WebGLPlot.defined(o)||o.render(t,e)}WebGLPlot.defined(this.collentionLayer)&&this.collentionLayer.render(t,e),WebGLPlot.defined(this.goAnimationLayer)&&this.goAnimationLayer.render(t,e)},_0x386d8c.prototype.releaseSelection=function(){var e=this._layerQueue,t=this._layerQueue.length,i=0;for(i=0;i<t;i++){var n=e[i];!WebGLPlot.defined(n)||n.releaseSelection()}},_0x386d8c.prototype.find=function(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("name is required.");return this._layers.get(e)},_0x386d8c.prototype.findByIndex=function(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("index is required.");if(e>this._layerQueue.length-1)throw new WebGLPlot.DeveloperError("index is out of bounds.");return this._layerQueue[e]},_0x386d8c.prototype.add=function(e,t){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("layer is required.");var i=e._name;if(!WebGLPlot.defined(i)||""==i)throw new WebGLPlot.DeveloperError("name is required.");var n=this._layers;if(n.contains(i))throw new WebGLPlot.RuntimeError("An layer with name "+i+" already exists in this Scene.");e._id=this._layerIndex++;var r=this._layerQueue.length;n.set(i,e),t=WebGLPlot.defaultValue(t,r),e.index=t,this._layerQueue.push(e),this._layerQueue.sort((function(e,t){return e.index-t.index})),_0x5ac1e1.getInstance().layerAdded.raiseEvent(i)},_0x386d8c.prototype.remove=function(e,t){if(t=WebGLPlot.defaultValue(t,!0),!WebGLPlot.defined(e))return!1;var i=this.find(e);return!!i&&(!!this._layers.remove(e)&&(this._layerQueue.splice(this._layerQueue.indexOf(i),1),t&&(i.destroy(),i=void 0),_0x5ac1e1.getInstance().layerDeleted.raiseEvent(e),!0))},_0x386d8c.prototype.removeAll=function(e){let t=[];e=WebGLPlot.defaultValue(e,!0);for(let i=0;i<this._layerQueue.length;i++){let n=this._layerQueue[i];t.push(n.name),e&&(n.destroy(),n=void 0)}this._layers.removeAll(),this._layerQueue.length=0,_0x5ac1e1.getInstance().layerDeleted.raiseEvent(t)},_0x386d8c.prototype.setSelectedLayer=function(e){this._selectedLayer=e},_0x386d8c.prototype.getSelectedLayer=function(){return this._selectedLayer},_0x386d8c.prototype.getPlottingLayerByName=function(e){for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];if(i instanceof _0x394df6&&e===i.name)return i}return null},_0x386d8c.prototype.getPlottingLayerIsActived=function(){for(let e=0;e<this._layerQueue.length;e++){let t=this._layerQueue[e];if(t instanceof _0x394df6&&!t.isLocked)return t}return null},_0x386d8c.prototype.setPlottingLayerIsActived=function(e,t,i){let n=!1;if(!e||""===e)return n;for(let r=0;r<this._layerQueue.length;r++){let o=this._layerQueue[r];if(o instanceof _0x394df6&&o.name===e){o.isLocked=!1,t&&t.setPlottingLayer(o),i&&i.setPlottingLayer(o),n=!0;break}}if(n)for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];i instanceof _0x394df6&&i.name!==e&&(i._isLocked=!0)}return n},_0x386d8c.prototype.getAllPlottingLayers=function(){let e=[];for(let t=0;t<this._layerQueue.length;t++)this._layerQueue[t]instanceof _0x394df6&&e.push(this._layerQueue[t]);return e},_0x386d8c.prototype.getFeatrueByUuID=function(e){for(let t=0;t<this._layerQueue.length;t++){let i=this._layerQueue[t];if(i instanceof _0x394df6){let t=i.getFeatureByUuid(e);if(WebGLPlot.defined(t))return t}}return null},WebGLPlot.PlotLayers=_0x386d8c;var _0x135c7c=(_0x55e2f7=!0,function(e,t){var i=_0x55e2f7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55e2f7=!1,i}),_0x285e14=_0x135c7c(void 0,(function(){return _0x285e14.toString().search("(((.+)+)+)+$").toString().constructor(_0x285e14).search("(((.+)+)+)+$")})),_0x55e2f7;_0x285e14();class _0x117656{constructor(e,t){e&&(this.key=e),t&&(this.value=t),this.CLASS_NAME="SuperMap.Plot.Property"}setKey(e){this.key=e}getKey(){return this.key}setValue(e){this.value=e}getValue(){return this.value}destroy(){this.key=null,this.value=null}clone(){return new Property(this.key,this.value)}}var _0x4c8f8b=(_0x1d151a=!0,function(e,t){var i=_0x1d151a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d151a=!1,i}),_0x4e6c4a=_0x4c8f8b(void 0,(function(){return _0x4e6c4a.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e6c4a).search("(((.+)+)+)+$")})),_0x1d151a;function _0x5b011c(e,t){this._name=e,this._features=[],this._valid=!0,this._scene=t,this._waterPlanes=[],this._visibleViewport=0,this.visibility=!0}_0x4e6c4a(),_0x5b011c.prototype.destroy=function(){this._valid=null,this._waterPlanes=null,this._visibleViewport=null,this._features=null,this._name=null},_0x5b011c.prototype.addFeatures=function(e){Array.isArray(e)||(e=[e]),this._features=this._features.concat(e)},_0x5b011c.prototype.update=function(e,t,i,n){if(this._valid)for(var r=0;r<this._features.length;r++)!1===this._features[r]._initialize&&(this.updatePrimitive=!0),(this._features[r]instanceof _0x4844fd||this._features[r]instanceof _0x330d7a)&&this._features[r].update(e,t,i,n)},_0x5b011c.prototype.render=function(){for(var e=0;e<this._features.length;e++)!1===this._features[e]._initialize&&(this.updatePrimitive=!0),(this._features[e]instanceof _0x4844fd||this._features[e]instanceof _0x330d7a)&&this._features[e].initSymbol();this.updatePrimitive&&(_0x4786d3.setUpdatePrimitive(!0,this._scene),this.updatePrimitive=!1)},_0x5b011c.prototype.removeFeatures=function(e){if(WebGLPlot.defined(e)&&0!==this._features.length){for(var t=[],i=0;i<this._features.length;i++){if(this._features[i]===e){1===this._features[i].symbolType&&this._features[i]._destroy();continue}t.push(this._features[i])}this._features=t}},_0x5b011c.prototype.releaseSelection=function(){},_0x5b011c.prototype.setCustomClipBox=function(e){},_0x5b011c.prototype.clearCustomClipBox=function(){},Object.defineProperties(_0x5b011c.prototype,{id:{get:function(){return this._id}}});var _0x29972f=(_0x17bd7d=!0,function(e,t){var i=_0x17bd7d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17bd7d=!1,i}),_0x43fd9f=_0x29972f(void 0,(function(){return _0x43fd9f.toString().search("(((.+)+)+)+$").toString().constructor(_0x43fd9f).search("(((.+)+)+)+$")})),_0x17bd7d;_0x43fd9f();var _0xff006={PLAYFROMNOW:0,PLAYSAMELASTONE:1,PLAYAFTERLASTONE:2,UNKNOWN:3},_0x5a1aa1=Object.freeze(_0xff006),_0x207b97=(_0x13fa24=!0,function(e,t){var i=_0x13fa24?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x13fa24=!1,i}),_0x1db210=_0x207b97(void 0,(function(){return _0x1db210.toString().search("(((.+)+)+)+$").toString().constructor(_0x1db210).search("(((.+)+)+)+$")})),_0x13fa24;_0x1db210();class _0x21ced6{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._startTime=WebGLPlot$e.defaultValue(e.startTime,0),this._duration=WebGLPlot$e.defaultValue(e.duration,5),this._repeat=WebGLPlot$e.defaultValue(e.repeat,!1),this._name=WebGLPlot$e.defaultValue(e.name,""),this._animationState=WebGLPlot$e.defaultValue(e.animationState,_0x577f4c.UNKNOWN),this._goFeature=WebGLPlot$e.defaultValue(e.goFeature,null),this._animationGOFeature=WebGLPlot$e.defaultValue(e.animationGOFeature,null),this._innerStartTime=WebGLPlot$e.defaultValue(e.innerStartTime,0),this._lastExecute=WebGLPlot$e.defaultValue(e.lastExecute,!1),this._pauseTime=WebGLPlot$e.defaultValue(e.pauseTime,0),this._ratio=WebGLPlot$e.defaultValue(e.ratio,0),this._symbolTexts=WebGLPlot$e.defaultValue(e.symbolTexts,""),this._animationManager=null,this._animationFinish=new WebGLPlot$e.Event,this._animationBegin=new WebGLPlot$e.Event,this._isSendBegin=!0,this._playSpeed=1,this.__playPastRatio=0,this._groupIndex=WebGLPlot$e.defaultValue(e.groupIndex,void 0),this._animationPlayType=WebGLPlot$e.defaultValue(e.animationPlayType,_0x5a1aa1.UNKNOWN),this.delayTime=0}destroy(){this.showAnimationFeature(!1),this.removeAnimationFeature(),this._goFeature=null,this._animationGOFeature._destroy(),this._animationGOFeature=null,this._name="",this.goFeatureLocalPts=[],this._symbolTexts="",this._animationState=_0x577f4c.UNKNOWN,this._pathFeature&&(_0x4786d3.removeAllAlgoPloyline(this._pathFeature,this._scene),this._pathFeature._destroy(),this._pathFeature=null),this.dynamicScane&&(this.dynamicScane.removeScaneCylinder(),this.dynamicScane=void 0)}setGOFeature(e,t){if(null==t||null===t.layer||null===e._goAnimationLayer)return!1;this._animationManager=e,this._goFeature=t;var i=this.createAnimationGOFeature(this._goFeature);return null!==this._animationGOFeature&&(i||(this._animationGOFeature._layer=e._goAnimationLayer,e._goAnimationLayer.addFeatures(this._animationGOFeature)),this.showAnimationFeature(!1),(_0x144579.ANIMATION_GROW===this.getGOAnimationType()||_0x144579.ANIMATION_GROW_EXP===this.getGOAnimationType()||_0x144579.ANIMATION_REDUCE_EXP==this.getGOAnimationType())&&(this.goFeatureLocalPts=WebGLPlot$e.clonePoints(this._goFeature._localPoints)),!0)}play(){WebGLPlot$e.defined(this._animationGrowEXP_isFirstExecute)&&(this._animationGrowEXP_isFirstExecute=!0);let e=new Date;if(this.__playSpeedTime=e.getTime()/1e3,this.__playTime=e.getTime()/1e3,this._animationState===_0x577f4c.PAUSE){const t=e.getTime()/1e3-this._pauseTime;this._innerStartTime+=t}else this._innerStartTime=e.getTime()/1e3,WebGLPlot$e.defined(this._goFeature)&&this._goFeature.releaseSelection(),this.showAnimationFeature(!0),this.__playPastRatio=0;this._lastExecute=!1,this._animationState=_0x577f4c.PLAYING}stop(){this._animationState=_0x577f4c.STOP}pause(){if(this._animationState===_0x577f4c.PLAYING){this._animationState=_0x577f4c.PAUSE;var e=new Date;this._pauseTime=e.getTime()/1e3}}reset(){this._animationState=_0x577f4c.RESET,this.showAnimationFeature(!1)}createAnimationGOFeature(e){for(var t=0;t<this._animationManager.goAnimations.length;t++){var i=this._animationManager.goAnimations[t];if(i._goFeature.id===e.id)return this._animationGOFeature=i._animationGOFeature,this._animationGOFeature}return this._animationGOFeature=e.clone(),this._animationGOFeature._id+=this._name,this._animationGOFeature._isEdit=!0,this._animationGOFeature._valid=!1,this._animationGOFeature._isAnimationFeature=!0,null}canExecute(){if(this._animationState!==_0x577f4c.PLAYING)return!1;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this._startTime>e)return!1;var t=this.getRatioByTime();return!(t>1&&this._lastExecute||t<0)}getRatioByTime(){if(this._animationState!==_0x577f4c.PLAYING)return 0;let e=this.__computePlayRatio();return e>=1&&!this._lastExecute?(this._repeat?(e=0,this._lastExecute=!1,this._animationState=_0x577f4c.PLAYING,this._innerStartTime=(new Date).getTime()/1e3,this.__playTime=(new Date).getTime()/1e3):(e=1,this._lastExecute=!0,this._isSendBegin=!0,this._animationState=_0x577f4c.STOP,this._animationFinish.raiseEvent(this.name),_0x5ac1e1.getInstance().animationFinished.raiseEvent(this.name)),this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=0):this._isSendBegin&&(this._animationBegin.raiseEvent(this.name),_0x5ac1e1.getInstance().animationBegined.raiseEvent(this.name),this._isSendBegin=!1),e<0&&(e=0,this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=0),this._ratio=e,e}showAnimationFeature(e){null!==this._animationGOFeature&&null!==this._animationGOFeature._symbolStyle&&(this.resetAnimationFeature(e),this._animationGOFeature.display=e),null!==this._goFeature&&null!==this._goFeature._symbolStyle&&(this._goFeature.display=!e,this._goFeature._initialize=!1),e&&(this._isSendBegin=!0)}resetAnimationFeature(e){this._animationGOFeature._symbolStyle=this._goFeature._symbolStyle.clone(),this._animationGOFeature._localPoints=this._goFeature._localPoints,this._animationGOFeature._initialize=!1}setAnimationName(e){return!this._animationManager.findGOAnimationByName(e)&&(this._name=e,!0)}__setPlayRatioState(){this.__playSpeedTime=(new Date).getTime()/1e3,this.__playPastRatio=this._ratio}__computePlayRatio(){let e=0;const t=(new Date).getTime()/1e3,i=this._duration/this.playSpeed;return e=this.__playTime===this.__playSpeedTime?(t-this._innerStartTime-this._startTime)/i:(t-this.__playSpeedTime)/i,e+=this.__playPastRatio,this._innerStartTime+this._startTime>=t||e<0?0:e}removeAnimationFeature(){if(null!==this._animationGOFeature){var e=this._animationManager.goAnimations,t=!1;if(null!==e)for(var i=0;i<e.length;i++){var n=e[i];if(n!==this&&n._animationGOFeature===this._animationGOFeature){t=!0;break}}t||this._animationManager._goAnimationLayer.removeFeatures(this._animationGOFeature)}}getBaseJSONData(){var e={};return this.goFeature&&(e.goLayerUuid=this.goFeature.id),e.name=this.name,e.startTime=this.startTime,e.duration=this.duration,e.repeat=this.repeat,e.playtype=this.animationPlayType,e}fromBaseJSONData(e){this.startTime=e.startTime,this.duration=e.duration,this.repeat=e.repeat,this.animationPlayType=e.playtype}_serverColorToColor(e){var t=new WebGLPlot$e.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,t}_colorFormat(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}setStartTime(e){e<0&&(e=0),this.delayTime=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData())}getStartTime(){return this._animationManager.getAnimationDelayTime()}}Object.defineProperties(_0x21ced6.prototype,{startTime:{get:function(){return this._startTime},set:function(e){e!==this._startTime&&(this._startTime=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},repeat:{get:function(){return this._repeat},set:function(e){e!==this._repeat&&(this._repeat=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},duration:{get:function(){return this._duration},set:function(e){if(e!==this._duration){this._duration=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData())}}},name:{get:function(){return this._name},set:function(e){e!==this._name&&(this._name=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},groupName:{get:function(){return this._groupName},set:function(e){e!==this._groupName&&(this._groupName=e)}},animationState:{get:function(){return this._animationState},set:function(e){e!==this._animationState&&(this._animationState=e)}},goFeature:{get:function(){return this._goFeature},set:function(e){e!==this._goFeature&&(this._goFeature=e)}},animationGOFeature:{get:function(){return this._animationGOFeature},set:function(e){e!==this._animationGOFeature&&(this._animationGOFeature=e)}},innerStartTime:{get:function(){return this._innerStartTime},set:function(e){e!==this._innerStartTime&&(this._innerStartTime=e)}},lastExecute:{get:function(){return this._lastExecute},set:function(e){e!==this._lastExecute&&(this._lastExecute=e)}},pauseTime:{get:function(){return this._pauseTime},set:function(e){e!==this._pauseTime&&(this._pauseTime=e)}},ratio:{get:function(){return this._ratio},set:function(e){e!==this._ratio&&(this._ratio=e)}},symbolTexts:{get:function(){return this._symbolTexts},set:function(e){e!==this._symbolTexts&&(this._symbolTexts=e)}},animationBegin:{get:function(){return this._animationBegin}},animationFinish:{get:function(){return this._animationFinish}},playSpeed:{get:function(){return this._playSpeed},set:function(e){e!==this._playSpeed&&(this.__setPlayRatioState(),this._playSpeed=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},fastForwardTime:{set:function(e){if(e<0)return;let t=e/this._duration;t>1&&(t=1),this.__playPastRatio+=t,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData())}},rewindTime:{set:function(e){if(e<0)return;let t=-e/this._duration;t>0&&(t=0),this.__playPastRatio+=t,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData())}},animationPlayType:{get:function(){return this._animationPlayType},set:function(e){if(e!==this._animationPlayType){this._animationPlayType=e;for(var t=this._animationManager.getAnimationGroup(this).group,i=t.indexOf(this);i<t.length;i++){var n=t[i];this._animationManager.changeAnimationTime(n)}_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData())}}}});var _0x477fff=(_0x213776=!0,function(e,t){var i=_0x213776?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x213776=!1,i}),_0x54a585=_0x477fff(void 0,(function(){return _0x54a585.toString().search("(((.+)+)+)+$").toString().constructor(_0x54a585).search("(((.+)+)+)+$")})),_0x213776;_0x54a585();var _0x4bff6b={Blink_Frequency:0,Blink_Number:1},_0x2b55c5=Object.freeze(_0x4bff6b),_0x19a3d7=(_0x15ab8f=!0,function(e,t){var i=_0x15ab8f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x15ab8f=!1,i}),_0x5abc38=_0x19a3d7(void 0,(function(){return _0x5abc38.toString().search("(((.+)+)+)+$").toString().constructor(_0x5abc38).search("(((.+)+)+)+$")})),_0x15ab8f;_0x5abc38();var _0xacb5f7={Replace_NoColor:0,Replace_Color:1},_0x1ab3a1=Object.freeze(_0xacb5f7),_0x5f4b82=(_0x3ed3d5=!0,function(e,t){var i=_0x3ed3d5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3ed3d5=!1,i}),_0x523247=_0x5f4b82(void 0,(function(){return _0x523247.toString().search("(((.+)+)+)+$").toString().constructor(_0x523247).search("(((.+)+)+)+$")})),_0x3ed3d5;_0x523247();class _0x400916 extends _0x21ced6{constructor(e){super(e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT)),this._blinkInterval=WebGLPlot$e.defaultValue(e.blinkInterval,500),this._blinkStyle=WebGLPlot$e.defaultValue(e.blinkStyle,_0x2b55c5.Blink_Frequency),this._blinkNumber=WebGLPlot$e.defaultValue(e.blinkNumber,0),this._replaceStyle=WebGLPlot$e.defaultValue(e.replaceStyle,_0x1ab3a1.Replace_NoColor),this._startColor=WebGLPlot$e.defaultValue(e.startColor,new WebGLPlot$e.Color(0,0,1,1)),this._endColor=WebGLPlot$e.defaultValue(e.endColor,new WebGLPlot$e.Color(1,0,0,1))}getGOAnimationType(){return _0x144579.ANIMATION_BLINK}execute(){if(!this.canExecute())return!1===this._goFeature._display&&!1===this._animationGOFeature._display&&(this._animationGOFeature._display=!0,!0);this._goFeature.display&&(this._goFeature.display=!1);var e=(new Date).getTime()/1e3,t=this._blinkInterval/1e3;return this._blinkStyle===_0x2b55c5.Blink_Number&&(t=this._blinkInterval=this._duration/this._blinkNumber),(e-this._innerStartTime)%t<=t/2?this._replaceStyle===_0x1ab3a1.Replace_Color?this.setColor(this._startColor):this._animationGOFeature.display=!1:(this._animationGOFeature.display=!0,this._replaceStyle===_0x1ab3a1.Replace_Color&&this.setColor(this._endColor)),this._lastExecute&&(this._replaceStyle===_0x1ab3a1.Replace_Color&&(this._animationGOFeature._symbolStyle._lineColor=this._endColor),this._animationGOFeature._display=!0,this._animationGOFeature._initialize=!1),!0}getRatioByTime(){if(this._animationState!==_0x577f4c.PLAYING)return 0;var e=(new Date).getTime()/1e3;if(this._innerStartTime+this._startTime>e)return 0;var t=(e-this._innerStartTime-this._startTime)/this._duration;return t>=1&&!this._lastExecute?this._repeat?(this._innerStartTime=(new Date).getTime()/1e3,t=0,this._lastExecute=!1,this._animationState=_0x577f4c.PLAYING):(t=1,this._lastExecute=!0,this._animationState=_0x577f4c.STOP):t<0&&(t=0),this._ratio=t,t}setColor(e){this._animationGOFeature._symbolStyle._lineColor!==e&&(this._animationGOFeature._symbolStyle._lineColor=e,this._animationGOFeature._symbolTextStyle.setTextRectColor(e),this._animationGOFeature._initialize=!1)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.blinkStyle=this.blinkStyle,e.blinkInterval=this.blinkInterval,e.blinkNumber=this.blinkNumber,e.replaceStyle=this.replaceStyle,e.startColor=this._colorFormat(this.startColor),e.endColor=this._colorFormat(this.endColor),e}fromJSONData(e){this.fromBaseJSONData(e),this.blinkStyle=e.blinkStyle,this.blinkInterval=e.blinkInterval,this.blinkNumber=e.blinkNumber,this.replaceStyle=e.replaceStyle,this.startColor=this._serverColorToColor(e.startColor),this.endColor=this._serverColorToColor(e.endColor)}}Object.defineProperties(_0x400916.prototype,{blinkInterval:{get:function(){return this._blinkInterval},set:function(e){e!=this._blinkInterval&&(this._blinkInterval=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},blinkStyle:{get:function(){return this._blinkStyle},set:function(e){e!=this._blinkStyle&&(this._blinkStyle=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},blinkNumber:{get:function(){return this._blinkNumber},set:function(e){e!=this._blinkNumber&&(this._blinkNumber=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},replaceStyle:{get:function(){return this._replaceStyle},set:function(e){e!=this._replaceStyle&&(this._replaceStyle=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startColor:{get:function(){return this._startColor},set:function(e){e==this._startColor||!(e instanceof WebGLPlot$e.Color)||(this._startColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endColor:{get:function(){return this._endColor},set:function(e){e==this._endColor||!(e instanceof WebGLPlot$e.Color)||(this._endColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x27608b=(_0x106728=!0,function(e,t){var i=_0x106728?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x106728=!1,i}),_0x165e45=_0x27608b(void 0,(function(){return _0x165e45.toString().search("(((.+)+)+)+$").toString().constructor(_0x165e45).search("(((.+)+)+)+$")})),_0x106728;_0x165e45();class _0x1368e5 extends _0x21ced6{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._showEffect=WebGLPlot.defaultValue(e.showEffect,!1),this._finalDisplay=WebGLPlot.defaultValue(e.finalDisplay,!1)}getGOAnimationType(){return _0x144579.ANIMATION_SHOW}execute(){if(!this.canExecute())return!1;var e=this._ratio;return this._showEffect&&this._animationGOFeature.showMode!==_0x2bcc5b.Marker?this.executeHaveEffect(e):this.executeNoEffect(e),!0}executeNoEffect(e){this._animationGOFeature.display=1-e<.01?this._finalDisplay:!this._finalDisplay}executeHaveEffect(e){this._finalDisplay||(e=1-e);var t;t=e>1?1:e,this._animationGOFeature.display||(this._animationGOFeature.display=!0),this._animationGOFeature.showMode===_0x2bcc5b.Grid||this._animationGOFeature.showMode===_0x2bcc5b.Picture?this._animationGOFeature.billboard.color=new WebGLPlot.Color(1,1,1,t):(this._animationGOFeature._symbolStyle._opacity=t,this._goFeature._symbolStyle.fillOpaqueRate<=100*(1-e)&&(this._animationGOFeature._symbolStyle.fillOpaqueRate=100*(1-e)),WebGLPlot.defined(this._goFeature._extendWallOpacity)&&this._goFeature._extendWallOpacity>=e&&(this._animationGOFeature._extendWallOpacity=e),null!==this._animationGOFeature._labels&&(this._animationGOFeature._symbolTextStyle._foreColor.alpha=t),this._animationGOFeature._initialize=!1)}resetAnimationFeature(e){this._animationGOFeature._symbolStyle.fillOpaqueRate=this._goFeature._symbolStyle.fillOpaqueRate,this._animationGOFeature._extendWallOpacity=this._goFeature._extendWallOpacity,_0x21ced6.prototype.resetAnimationFeature.call(this,e)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.showEffect=this.showEffect,e.finalDisplay=this.finalDisplay,e}fromJSONData(e){this.fromBaseJSONData(e),this.showEffect=e.showEffect,this.finalDisplay=e.finalDisplay}}Object.defineProperties(_0x1368e5.prototype,{showEffect:{get:function(){return this._showEffect},set:function(e){e!=this._showEffect&&(this._showEffect=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},finalDisplay:{get:function(){return this._finalDisplay},set:function(e){e!=this._finalDisplay&&(this._finalDisplay=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x1dde48=(_0x40d04b=!0,function(e,t){var i=_0x40d04b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40d04b=!1,i}),_0x4838b0=_0x1dde48(void 0,(function(){return _0x4838b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x4838b0).search("(((.+)+)+)+$")})),_0x40d04b;_0x4838b0();var _0x42d312={POLYLINE:0,CURVE:1},_0x2187ca=Object.freeze(_0x42d312),_0x4d343b=(_0x5e2adc=!0,function(e,t){var i=_0x5e2adc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5e2adc=!1,i}),_0x2f9a04=_0x4d343b(void 0,(function(){return _0x2f9a04.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f9a04).search("(((.+)+)+)+$")})),_0x5e2adc;_0x2f9a04();var _0x10d0f0={computePositions:function(e,t,i,n,r){var o,a=e,s=n+n,l=new Float64Array(3*(r?2*s:s)),u=0,c=0,h=r?3*s:0,d=r?3*(s+n):3*n;for(o=0;o<n;o++){var f=o/n*WebGLPlot.CesiumMath.TWO_PI,p=Math.cos(f),_=Math.sin(f),m=p*i,g=_*i,x=p*t,y=_*t;l[c+h]=m,l[c+h+1]=0,l[c+h+2]=g,l[c+d]=x,l[c+d+1]=a,l[c+d+2]=y,c+=3,r&&(l[u++]=m,l[u++]=0,l[u++]=g,l[u++]=x,l[u++]=a,l[u++]=y)}return l}},_0x3271a3=(_0x7fbaf9=!0,function(e,t){var i=_0x7fbaf9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x7fbaf9=!1,i}),_0x9ef8e9=_0x3271a3(void 0,(function(){return _0x9ef8e9.toString().search("(((.+)+)+)+$").toString().constructor(_0x9ef8e9).search("(((.+)+)+)+$")})),_0x7fbaf9;_0x9ef8e9();var _0x2c1142=new WebGLPlot.Cartesian2,_0x3bd790=new WebGLPlot.Cartesian3,_0x318ba1=new WebGLPlot.Cartesian3,_0x43c108=new WebGLPlot.Cartesian3,_0x23994f=new WebGLPlot.Cartesian3;function _0x8764e6(e){var t=(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,r=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),o=WebGLPlot.defaultValue(e.slices,128);if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("options.length must be defined.");if(!WebGLPlot.defined(i))throw new WebGLPlot.DeveloperError("options.topRadius must be defined.");if(!WebGLPlot.defined(n))throw new WebGLPlot.DeveloperError("options.bottomRadius must be defined.");if(o<3)throw new WebGLPlot.DeveloperError("options.slices must be greater than or equal to 3.");if(WebGLPlot.defined(e.offsetAttribute)&&e.offsetAttribute===WebGLPlot.GeometryOffsetAttribute.TOP)throw new WebGLPlot.DeveloperError("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");if(!WebGLPlot.defined(e.scene))throw new WebGLPlot.DeveloperError("scene must be defined");if(!WebGLPlot.defined(e.id)||""===e.id)throw new WebGLPlot.DeveloperError("id must be defined");this._length=t,this._topRadius=i,this._bottomRadius=n,this._vertexFormat=WebGLPlot.VertexFormat.clone(r),this._slices=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPlotCylinderGeometry",this.scene=e.scene,this.rotate=WebGLPlot.defaultValue(e.rotate,new _0x23de81(0,0,0)),this.offsetRotate=WebGLPlot.defaultValue(e.offsetRotate,new _0x23de81(0,0,0)),this.point=WebGLPlot.defaultValue(e.point,new _0x23de81(0,0,0)),this.id=e.id,this.cylinderColor=WebGLPlot.defaultValue(e.color,new WebGLPlot.Color(1,0,0,.4)),this.show=WebGLPlot.defaultValue(e.show,!0),this.add2Scene()}_0x8764e6.prototype.add2Scene=function(){this.ScaneCylinderGeometry=_0x8764e6.createGeometry(this);var e=WebGLPlot.CesiumMath.toRadians(this.rotate.z+this.offsetRotate.z),t=WebGLPlot.CesiumMath.toRadians(this.rotate.y+this.offsetRotate.y),i=WebGLPlot.CesiumMath.toRadians(this.rotate.x+this.offsetRotate.x),n=new WebGLPlot.HeadingPitchRoll(e,t,i);const r=WebGLPlot.Cartesian3.fromDegrees(this.point.x,this.point.y,this.point.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,n);var a=new WebGLPlot.GeometryInstance({geometry:this.ScaneCylinderGeometry,modelMatrix:o,id:this.id});let s=new WebGLPlot.Primitive({geometryInstances:a,appearance:new Cesium.EllipsoidSurfaceAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this.cylinderColor})}),asynchronous:!1,show:this.show});this.CylinderPrimitive=this.scene.primitives.add(s)},_0x8764e6.prototype.remove=function(){this.CylinderPrimitive&&(this.scene.primitives.removeAndDestroy(this.CylinderPrimitive),this.CylinderPrimitive=void 0)},_0x8764e6.prototype.update=function(e){var t=WebGLPlot.defaultValue(e.point,new _0x23de81(0,0,0)),i=WebGLPlot.defaultValue(e.rotate,new _0x23de81(0,0,0));if(this.CylinderPrimitive){this.remove();var n=WebGLPlot.CesiumMath.toRadians(i.z+this.offsetRotate.z),r=WebGLPlot.CesiumMath.toRadians(i.y+this.offsetRotate.y),o=WebGLPlot.CesiumMath.toRadians(i.x+this.offsetRotate.x),a=new WebGLPlot.HeadingPitchRoll(n,r,o);const e=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z),l=WebGLPlot.Transforms.headingPitchRollToFixedFrame(e,a);var s=new WebGLPlot.GeometryInstance({geometry:this.ScaneCylinderGeometry,modelMatrix:l,id:this.id});let u=new WebGLPlot.Primitive({geometryInstances:s,appearance:new Cesium.EllipsoidSurfaceAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this.cylinderColor})}),asynchronous:!1,show:this.show});this.CylinderPrimitive=this.scene.primitives.add(u)}},_0x8764e6.prototype.setVisible=function(e){this.CylinderPrimitive&&(this.show=e,this.CylinderPrimitive.show=e)},_0x8764e6.prototype.setColor=function(e){this.CylinderPrimitive&&e instanceof WebGLPlot.Color&&(this.cylinderColor=e,this.CylinderPrimitive.appearance.material=WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:e}))},_0x8764e6.packedLength=WebGLPlot.VertexFormat.packedLength+5,_0x8764e6.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.VertexFormat.pack(e._vertexFormat,t,i),i+=WebGLPlot.VertexFormat.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x778b32=new WebGLPlot.VertexFormat,_0x31de28={vertexFormat:_0x778b32,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0},_0x5dc92c;_0x8764e6.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.VertexFormat.unpack(e,t,_0x778b32);t+=WebGLPlot.VertexFormat.packedLength;var r=e[t++],o=e[t++],a=e[t++],s=e[t++],l=e[t];return WebGLPlot.defined(i)?(i._vertexFormat=WebGLPlot.VertexFormat.clone(n,i._vertexFormat),i._length=r,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._offsetAttribute=-1===l?void 0:l,i):(_0x31de28.length=r,_0x31de28.topRadius=o,_0x31de28.bottomRadius=a,_0x31de28.slices=s,_0x31de28.offsetAttribute=-1===l?void 0:l,new _0x8764e6(_0x31de28))},_0x8764e6.createGeometry=function(e){var t=e._length,i=e._topRadius,n=e._bottomRadius,r=e._vertexFormat,o=e._slices;if(!(t<=0||i<0||n<0||0===i&&0===n)){var a,s=o+o,l=o+s,u=s+s,c=_0x10d0f0.computePositions(t,i,n,o,!0),h=r.st?new Float32Array(2*u):void 0,d=r.normal?new Float32Array(3*u):void 0,f=r.tangent?new Float32Array(3*u):void 0,p=r.bitangent?new Float32Array(3*u):void 0,_=r.normal||r.tangent||r.bitangent;if(_){var m=r.tangent||r.bitangent,g=0,x=0,y=0,v=Math.atan2(n-i,t),$=_0x3bd790;$.z=Math.sin(v);var b=Math.cos(v),T=_0x43c108,C=_0x318ba1;for(a=0;a<o;a++){var S=a/o*WebGLPlot.CesiumMath.TWO_PI,w=b*Math.cos(S),E=b*Math.sin(S);_&&($.x=w,$.y=E,m&&(T=WebGLPlot.Cartesian3.normalize(WebGLPlot.Cartesian3.cross(WebGLPlot.Cartesian3.UNIT_Z,$,T),T)),r.normal&&(d[g++]=$.x,d[g++]=$.y,d[g++]=$.z,d[g++]=$.x,d[g++]=$.y,d[g++]=$.z),r.tangent&&(f[x++]=T.x,f[x++]=T.y,f[x++]=T.z,f[x++]=T.x,f[x++]=T.y,f[x++]=T.z),r.bitangent&&(C=WebGLPlot.Cartesian3.normalize(WebGLPlot.Cartesian3.cross($,T,C),C),p[y++]=C.x,p[y++]=C.y,p[y++]=C.z,p[y++]=C.x,p[y++]=C.y,p[y++]=C.z))}for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=-1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[y++]=0,p[y++]=-1,p[y++]=0);for(a=0;a<o;a++)r.normal&&(d[g++]=0,d[g++]=0,d[g++]=1),r.tangent&&(f[x++]=1,f[x++]=0,f[x++]=0),r.bitangent&&(p[y++]=0,p[y++]=1,p[y++]=0)}var P=12*o-12,A=WebGLPlot.IndexDatatype.createTypedArray(u,P),L=0,M=0;for(a=0;a<o-1;a++)A[L++]=M,A[L++]=M+2,A[L++]=M+3,A[L++]=M,A[L++]=M+3,A[L++]=M+1,M+=2;for(A[L++]=s-2,A[L++]=0,A[L++]=1,A[L++]=s-2,A[L++]=1,A[L++]=s-1,a=1;a<o-1;a++)A[L++]=s+a+1,A[L++]=s+a,A[L++]=s;for(a=1;a<o-1;a++)A[L++]=l,A[L++]=l+a,A[L++]=l+a+1;var R=0;if(r.st){var O=Math.max(i,n);for(a=0;a<u;a++){var D=WebGLPlot.Cartesian3.fromArray(c,3*a,_0x23994f);h[R++]=(D.x+O)/(2*O),h[R++]=(D.y+O)/(2*O)}}var I=new WebGLPlot.GeometryAttributes;r.position&&(I.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c})),r.normal&&(I.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.tangent&&(I.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:f})),r.bitangent&&(I.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),r.st&&(I.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:h})),_0x2c1142.x=.5*t,_0x2c1142.y=Math.max(n,i);var B=new WebGLPlot.BoundingSphere(WebGLPlot.Cartesian3.ZERO,WebGLPlot.Cartesian2.magnitude(_0x2c1142));if(WebGLPlot.defined(e._offsetAttribute)){t=c.length;var F=new Uint8Array(t/3),N=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(F,N),I.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:F})}return new WebGLPlot.Geometry({attributes:I,indices:A,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:B,offsetAttribute:e._offsetAttribute})}},_0x8764e6.getUnitCylinder=function(){return WebGLPlot.defined(_0x5dc92c)||(_0x5dc92c=_0x8764e6.createGeometry(new _0x8764e6({topRadius:1,bottomRadius:1,length:1,vertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY}))),_0x5dc92c};const _0x1c0a56=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4656c9=_0x1c0a56(void 0,(function(){return _0x4656c9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4656c9).search("(((.+)+)+)+$")}));function _0x34a477(e){this.lineWidth=1,this.lineColor=new WebGLPlot.Color(1,0,0,1),this._scaneRegion_ShapePts=[],this.id=e.id,this.scene=e.scene}_0x4656c9(),_0x34a477.prototype.createScaneCylinder=function(e){if(this.ScaneCylinder)return!1;this.point=WebGLPlot.defaultValue(e.point,new _0x23de81(0,0,0));var t=WebGLPlot.defaultValue(e.length,100),i=WebGLPlot.defaultValue(e.radius,30),n=WebGLPlot.defaultValue(e.rotate,new _0x23de81(0,0,0)),r=WebGLPlot.defaultValue(e.offsetRotate,new _0x23de81(0,0,0));let o=WebGLPlot.defaultValue(e.color,new WebGLPlot.Color(1,0,0,.4));var a=WebGLPlot.defaultValue(e.showScane,!1);return this.ScaneCylinder=new _0x8764e6({length:t,topRadius:i,bottomRadius:0,scene:this.scene,point:this.point,rotate:n,offsetRotate:r,id:this.id,show:a,color:o}),!0},_0x34a477.prototype.updateScaneCylinder=function(e){this.ScaneCylinder&&this.ScaneCylinder.update(e)},_0x34a477.prototype.setScaneCylinderColor=function(e){this.ScaneCylinder&&e instanceof WebGLPlot.Color&&this.ScaneCylinder.setColor(e)},_0x34a477.prototype.setScaneCylinderVisible=function(e){this.ScaneCylinder&&this.ScaneCylinder.setVisible(e)},_0x34a477.prototype.removeScaneCylinder=function(){this.ScaneCylinder&&(this.ScaneCylinder.remove(),this.ScaneCylinder=void 0)},_0x34a477.prototype.scaneCylinder2JSONData=function(e){return this.ScaneCylinder&&(e.scaneCylinder_length=this.ScaneCylinder._length,e.scaneCylinder_radius=this.ScaneCylinder._topRadius,e.scaneCylinder_point=this.ScaneCylinder.point,e.scaneCylinder_show=this.ScaneCylinder.show,e.scaneCylinder_cylinderColor=this.ScaneCylinder.cylinderColor,e.scaneCylinder_rotate=this.ScaneCylinder.rotate,e.scaneCylinder_offsetRotate=this.ScaneCylinder.offsetRotate,e.scaneCylinder_id=this.ScaneCylinder.id),e},_0x34a477.prototype.scaneCylinderFromJSONData=function(e){if(this.ScaneCylinder=void 0,e){let t=e.scaneCylinder_length,i=e.scaneCylinder_radius,n=e.scaneCylinder_rotate,r=e.scaneCylinder_offsetRotate;this.point=e.scaneCylinder_point,this.id=e.scaneCylinder_id;let o=e.scaneCylinder_cylinderColor,a=e.scaneCylinder_show;this.ScaneCylinder=new _0x8764e6({length:t,topRadius:i,bottomRadius:0,scene:this.scene,point:this.point,rotate:n,offsetRotate:r,id:this.id,show:a,color:o})}};var _0x325dae=(_0x5b5b00=!0,function(e,t){var i=_0x5b5b00?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5b5b00=!1,i}),_0x9e0a15=_0x325dae(void 0,(function(){return _0x9e0a15.toString().search("(((.+)+)+)+$").toString().constructor(_0x9e0a15).search("(((.+)+)+)+$")})),_0x5b5b00;_0x9e0a15();var _0x4da94f={EAST:0,WEST:1,SOUTH:2,NORTH:3,EAST_NORTH:4,WEST_NORTH:5,EAST_SOUTH:6,WEST_SOUTH:7,UP:8},_0x192aa1=Object.freeze(_0x4da94f),_0x5a4db6=(_0x6386e0=!0,function(e,t){var i=_0x6386e0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6386e0=!1,i}),_0x3a7d0d=_0x5a4db6(void 0,(function(){return _0x3a7d0d.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a7d0d).search("(((.+)+)+)+$")})),_0x6386e0;_0x3a7d0d();class _0x371aa9 extends _0x21ced6{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._showPath=WebGLPlot.defaultValue(e.showPath,!1),this._tangentDirection=WebGLPlot.defaultValue(e.tangentDirection,!1),this._pathWidth=WebGLPlot.defaultValue(e.pathWidth,.5),this._pathColor=WebGLPlot.defaultValue(e.pathColor,new WebGLPlot.Color(1,0,0,1)),this._currentPt=WebGLPlot.defaultValue(e.currentPt,null),this._pathType=WebGLPlot.defaultValue(e.pathType,_0x2187ca.POLYLINE),this._wayPoints=WebGLPlot.defaultValue(e.wayPoints,[]),this._shapePoints=WebGLPlot.defaultValue(e.shapePoints,[]),this._pathFeature=WebGLPlot.defaultValue(e.pathFeature,null),this._pathLength=WebGLPlot.defaultValue(e.pathLength,0),this.dynamicScane=void 0,this._showScane=!0,this._scaneColor=new WebGLPlot.Color(1,0,0,.4),this._rotateOffset=new _0x23de81(0,0,0)}execute(){if(!_0x2909c1.isSymbolDot(this._animationGOFeature._symbolType))return null!==this._pathFeature&&0!==this._pathFeature._positions.length&&(this._pathFeature.show=!1),!1;if(!this.canExecute())return!1;this._showPath&&this._pathFeature&&!this._pathFeature._show&&(this._pathFeature.show=!0);var e=this._ratio,t=new Object;t=this._findPos(e,this._shapePoints,t),this._animationGOFeature.localPoints=[this.PtsToSpherical(t.pt)];var i=t.index;if(this._tangentDirection){t.angle;var n=this.modifyAnimationFollowPath(this._shapePoints,i,t.pt),r=57.29577951308232,o=this._animationGOFeature._showMode,a=new _0x23de81(n.x*r,n.y*r,n.z*r);(0!==this.rotateOffset.x||0!==this.rotateOffset.y||0!==this.rotateOffset.z)&&(a.x+=this.rotateOffset.x,a.y+=this.rotateOffset.y,a.z+=this.rotateOffset.z),_0x2bcc5b.Marker===o?this._animationGOFeature._modelRotate=a:_0x2bcc5b.Vector===o&&(this._animationGOFeature.vectorRotate=n),this.updateScane(this.PtsToSpherical(t.pt),a)}return this.updateCameraFollow(e),!0}modifyAnimationFollowPath(e,t,i){if(this._tangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot.Cartesian3;u=WebGLPlot.Cartesian3.subtract(l[0],a,u),u=WebGLPlot.Cartesian3.normalize(u,u);var c=new WebGLPlot.Cartesian3;c=WebGLPlot.Cartesian3.subtract(s,a,c),c=WebGLPlot.Cartesian3.normalize(c,c);var h=new WebGLPlot.Cartesian3;h=WebGLPlot.Cartesian3.cross(c,u,h),h=WebGLPlot.Cartesian3.normalize(h,h);var d=new WebGLPlot.Cartesian3;d=WebGLPlot.Cartesian3.cross(h,c,d),d=WebGLPlot.Cartesian3.normalize(d,d),c=new WebGLPlot.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),h=WebGLPlot.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),c=WebGLPlot.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot.Cartesian3(1,0,0)),d=WebGLPlot.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot.Cartesian3(p,_,m)}}FromAngleAxis(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x23de81(r*i.x,r*i.y,r*i.z),s=new _0x23de81;s=WebGLPlot.Cartesian3.cross(a,e,s);var l=new _0x23de81;l=WebGLPlot.Cartesian3.cross(a,s,l);var u=new _0x23de81(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x23de81(2*l.x,2*l.y,2*l.z);return new _0x23de81(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)}ToEulerAnglesXYZ(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x23de81(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x23de81((n=0)-Math.atan2(t.x,t.y),r,n):new _0x23de81(Math.atan2(t.x,t.y)-(n=0),r,n)}resetAnimationFeature(e){if(_0x21ced6.prototype.resetAnimationFeature.call(this,e),this._animationGOFeature._rotate=this._goFeature._rotate,this._animationGOFeature._modelRotate=this._goFeature._modelRotate,this._animationGOFeature.vectorRotate=this._goFeature.vectorRotate,this.wayPoints.length>=2){var t=[this.wayPoints[0].clone()];this._animationGOFeature.localPoints=t}else{t=[this._goFeature.localPoints[0].clone()];this._animationGOFeature.localPoints=t}e&&(null===this._pathFeature||0===this._pathFeature._positions.length||null===this._shapePoints)&&(this._makePath(),this._pathColor,this._pathWidth),null!==this._pathFeature&&(this._pathFeature.show=!1),void 0===this.dynamicScane?this.dynamicScane=new _0x34a477({id:this._animationGOFeature.id,scene:this._animationManager._scene}):(this.showScane=e,this.updateScane(this._animationGOFeature._localPoints[0],this._animationGOFeature._rotate))}_makePath(){if(null===this._wayPoints||2>this._wayPoints.length)return!1;null===this._pathFeature&&(this.compuetWayPos(),this._pathFeature=_0x4786d3.addAlgoPloyline(null,this.createPathLine(this._shapePoints),this._animationManager._scene)),this._pathLength=0;for(var e=1;e<this._shapePoints.length;e++)this._pathLength+=_0x2909c1.distance(this._shapePoints[e-1],this._shapePoints[e]);return this._pathFeature}_findPos(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLength)).result)return!1;var n=i.pt;return this._tangentDirection&&(i.angle=_0x2909c1.radian(n,t[i.index])/Math.PI*180),i}PtsToSpherical(e){var t=this._animationManager._scene.globe.ellipsoid,i=new WebGLPlot.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot.CesiumMath.toDegrees(n.latitude);return new _0x23de81(WebGLPlot.CesiumMath.toDegrees(n.longitude),r,n.height)}getGOAnimationType(){return _0x144579.ANIMATION_WAY}setShowPath(e){this._showPath=e}setWayPoints(e){if(!e||!Array.isArray(e)||2>e.length)return!1;this._wayPoints=[],this._wayPoints=e,null!==this._pathFeature&&(this.compuetWayPos(),this._pathFeature.positions=this._shapePoints)}getWayPoints(){return this._wayPoints}getCurrentPt(){return this._currentPt}setPathColor(e){!e||(this._pathColor=e,this.pathFeature&&null!==this.pathFeature&&(this.pathFeature.options.color=this.pathColor,this.pathFeature.setStyle(this.pathFeature.options)))}getPathColor(){return this._pathColor}setPathWidth(e){!e||(this.pathWidth=e,this._pathFeature&&null!==this.pathWidth&&(this._pathFeature.width=this.pathWidth))}getPathWidth(){return this._pathWidth}setPathType(e){null!=e&&this.pathType!==e&&(this.pathType=e,null!==this.pathFeature&&(this.pathFeature.destroy(),this.pathFeature=null))}getPathType(){return this._pathType}generateBeizerPointsNoCtrlPt(e){return _0x2909c1.generateBeizerPointsNoCtrlPt(e)}createPathLine(e){return this._pathWidth<=0&&(this._pathWidth=.5),{width:this._pathWidth,positions:e,material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:this._pathColor}),id:this._animationGOFeature._id+"_Path",show:!1}}getPtsIndexByDistance(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x2909c1.distance(e[o],e[o+1]))>=t){var a=_0x2909c1.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x23de81(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n}compuetWayPos(){this._pathType===_0x2187ca.POLYLINE?this._shapePoints=this._wayPoints:this._shapePoints=this.generateBeizerPointsNoCtrlPt(this._wayPoints);for(var e=[],t=0;t<this._shapePoints.length;t++){var i=this._shapePoints[t];e.push(i.x),e.push(i.y),e.push(i.z)}this._shapePoints=WebGLPlot.Cartesian3.fromDegreesArrayHeights(e)}getJSONData(){var e=this.getBaseJSONData();e.type=this.getGOAnimationType(),e.showPath=this.showPath,e.tangentDirection=this.tangentDirection,e.pathType=this.pathType,e.pathWidth=this.pathWidth,e.pathColor=this._colorFormat(this.pathColor),e.wayPoints=[];for(var t=0;t<this.wayPoints.length;t++)e.wayPoints.push({x:this.wayPoints[t].x,y:this.wayPoints[t].y,z:this.wayPoints[t].z});return this.dynamicScane&&(e=this.dynamicScane.scaneCylinder2JSONData(e)),e}fromJSONData(e){this.fromBaseJSONData(e),this.showPath=e.showPath,this.tangentDirection=e.tangentDirection,this.pathType=e.pathType,this.pathWidth=e.pathWidth,this.pathColor=this._serverColorToColor(e.pathColor);for(var t=[],i=0;i<e.wayPoints.length;i++)t.push(new _0x23de81(e.wayPoints[i].x,e.wayPoints[i].y,e.wayPoints[i].z));this.dynamicScane&&e.scaneCylinder_id&&this.dynamicScane.scaneCylinderFromJSONData(e),this.setWayPoints(t)}createScane(e){e.showScane=this.showScane,e.point=this._animationGOFeature._localPoints[0].clone(),e.color?this.scaneColor=e.color:e.color=this.scaneColor,e.id=this._animationGOFeature.id,this.dynamicScane.createScaneCylinder(e)}updateScane(e,t){if(this.dynamicScane){var i={point:e,rotate:t};this.dynamicScane.updateScaneCylinder(i)}}setScaneVisible(e){this.dynamicScane&&this.dynamicScane.setScaneCylinderVisible(e)}setScaneColor(e){this.dynamicScane&&this.dynamicScane.setScaneCylinderColor(e)}removeScane(){this.dynamicScane&&this.dynamicScane.removeScaneCylinder()}setCameraFollow(e,t,i,n){if(this.isFollow=e,this._wayPoints.length<=0||!this.isFollow)return!1;null===this._pathFeature&&this._shapePoints.length<=0&&(this._makePath(),this._pathFeature.show=!1);const r=Math.PI/180,o=n/i,a=-Math.asin(o);let s=null;switch(this.CameraOrientation=null,t){case _0x192aa1.EAST:s=new Cesium.Cartesian3(0,-1,o),this.CameraOrientation={heading:-90*r,pitch:a,roll:0};break;case _0x192aa1.WEST:s=new Cesium.Cartesian3(0,1,o),this.CameraOrientation={heading:90*r,pitch:a,roll:0};break;case _0x192aa1.SOUTH:s=new Cesium.Cartesian3(-1,0,o),this.CameraOrientation={heading:0,pitch:a,roll:0};break;case _0x192aa1.NORTH:s=new Cesium.Cartesian3(1,0,o),this.CameraOrientation={heading:180*r,pitch:a,roll:0};break;case _0x192aa1.EAST_NORTH:s=new Cesium.Cartesian3(1,-1,o),this.CameraOrientation={heading:225*r,pitch:a,roll:0};break;case _0x192aa1.WEST_NORTH:s=new Cesium.Cartesian3(1,1,o),this.CameraOrientation={heading:135*r,pitch:a,roll:0};break;case _0x192aa1.EAST_SOUTH:s=new Cesium.Cartesian3(-1,-1,o),this.CameraOrientation={heading:-45*r,pitch:a,roll:0};break;case _0x192aa1.WEST_SOUTH:s=new Cesium.Cartesian3(-1,1,o),this.CameraOrientation={heading:45*r,pitch:a,roll:0};break;case _0x192aa1.UP:s=new Cesium.Cartesian3(0,0,1),this.CameraOrientation={heading:0*r,pitch:-Math.PI/2,roll:0}}const l=this._shapePoints[0],u=_0x2909c1.computeMatrix2(l,new Cesium.Cartesian3(0,0,0));let c=_0x2909c1.localPtsToCartesian(s,u,i).position,h=new _0x23de81(c.x-l.x,c.y-l.y,c.z-l.z);this.followShapePoints=[];for(let e=0;e<this._shapePoints.length;e++){const t=this._shapePoints[e];this.followShapePoints.push(new _0x23de81(t.x+h.x,t.y+h.y,t.z+h.z))}}updateCameraFollow(e){if(!this.isFollow)return;let t=new Object,i=this._findPos(e,this.followShapePoints,t).pt;this._animationManager._scene.camera.setView({destination:i,orientation:this.CameraOrientation})}}Object.defineProperties(_0x371aa9.prototype,{showPath:{get:function(){return this._showPath},set:function(e){e!=this._showPath&&(this._showPath=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},tangentDirection:{get:function(){return this._tangentDirection},set:function(e){e!=this._tangentDirection&&(this._tangentDirection=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathType:{get:function(){return this._pathType},set:function(e){e!=this._pathType&&(this._pathType=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathWidth:{get:function(){return this._pathWidth},set:function(e){e==this._pathWidth||e<=0||(this._pathWidth=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathColor:{get:function(){return this._pathColor},set:function(e){e==this._pathColor||!(e instanceof WebGLPlot.Color)||(this._pathColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},wayPoints:{get:function(){return this._wayPoints},set:function(e){e!==this._wayPoints&&(this._wayPoints=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},showScane:{get:function(){return this._showScane},set:function(e){e!=this._showScane&&(this._showScane=e,this.dynamicScane&&this.dynamicScane.setScaneCylinderVisible(e),_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},scaneColor:{get:function(){return this._scaneColor},set:function(e){e!=this._scaneColor&&(this._scaneColor=e,this.dynamicScane&&this.dynamicScane.setScaneCylinderColor(e),_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},rotateOffset:{get:function(){return this._rotateOffset},set:function(e){e!=this._rotateOffset&&(this._rotateOffset=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x24a8d7=(_0x46f90b=!0,function(e,t){var i=_0x46f90b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x46f90b=!1,i}),_0x513d72=_0x24a8d7(void 0,(function(){return _0x513d72.toString().search("(((.+)+)+)+$").toString().constructor(_0x513d72).search("(((.+)+)+)+$")})),_0x46f90b;_0x513d72();class _0x269f67 extends _0x21ced6{constructor(e){super(e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT)),this._showPath=WebGLPlot$e.defaultValue(e.showPath,!1),this._tangentDirection=WebGLPlot$e.defaultValue(e.tangentDirection,!1),this._pathWidth=WebGLPlot$e.defaultValue(e.pathWidth,.5),this._pathColor=WebGLPlot$e.defaultValue(e.pathColor,new WebGLPlot$e.Color(1,0,0,1)),this._currentPt=WebGLPlot$e.defaultValue(e.currentPt,null),this._pathType=WebGLPlot$e.defaultValue(e.pathType,_0x2187ca.POLYLINE),this._wayPoints=WebGLPlot$e.defaultValue(e.wayPoints,[]),this.shapePointsArray=WebGLPlot$e.defaultValue(e.shapePoints,[]),this._pathFeature=WebGLPlot$e.defaultValue(e.pathFeature,null),this._pathLength=WebGLPlot$e.defaultValue(e.pathLength,0),this._scane_ShapePts=[],this.showScane=!0,this._rotateOffset=new _0x23de81(0,0,0)}execute(){if(!this.canExecute())return!1;if(this._showPath&&this._pathFeature&&!this._pathFeature._show&&(this._pathFeature.show=!0),this.animationGOFeatures.length>0)for(let e=0;e<this.animationGOFeatures.length;e++){const t=this.shapePointsArray[e];this.execute2(this.animationGOFeatures[e],t)}}execute2(e,t){if(!_0x2909c1.isSymbolDot(e._symbolType))return!1;var i=this._ratio,n=new Object;n=this._findPos(i,t,n),e.localPoints=[this.PtsToSpherical(n.pt)];var r=n.index;if(this._tangentDirection){n.angle;var o=this.modifyAnimationFollowPath(t,r,n.pt),a=57.29577951308232,s=e._showMode,l=new _0x23de81(o.x*a,o.y*a,o.z*a);_0x2bcc5b.Marker===s?e._modelRotate=l:_0x2bcc5b.Vector===s&&(e.vectorRotate=o)}return this.updateCameraFollow(i),!0}modifyAnimationFollowPath(e,t,i){if(this._tangentDirection){var n=.017453292519943295,r=this.PtsToSpherical(i),o=this.PtsToSpherical(e[t]),a=e[t],s=e[t+1],l=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights([o.x,o.y,o.z+100]),u=new WebGLPlot$e.Cartesian3;u=WebGLPlot$e.Cartesian3.subtract(l[0],a,u),u=WebGLPlot$e.Cartesian3.normalize(u,u);var c=new WebGLPlot$e.Cartesian3;c=WebGLPlot$e.Cartesian3.subtract(s,a,c),c=WebGLPlot$e.Cartesian3.normalize(c,c);var h=new WebGLPlot$e.Cartesian3;h=WebGLPlot$e.Cartesian3.cross(c,u,h),h=WebGLPlot$e.Cartesian3.normalize(h,h);var d=new WebGLPlot$e.Cartesian3;d=WebGLPlot$e.Cartesian3.cross(h,c,d),d=WebGLPlot$e.Cartesian3.normalize(d,d),c=new WebGLPlot$e.Cartesian3(c.y,c.z,c.x),h=new WebGLPlot$e.Cartesian3(h.y,h.z,h.x),d=new WebGLPlot$e.Cartesian3(d.y,d.z,d.x),h=this.FromAngleAxis(h,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),h=this.FromAngleAxis(h,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),h=WebGLPlot$e.Cartesian3.normalize(h,h),c=this.FromAngleAxis(c,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),c=this.FromAngleAxis(c,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),c=WebGLPlot$e.Cartesian3.normalize(c,c),d=this.FromAngleAxis(d,-r.x*n,new WebGLPlot$e.Cartesian3(0,1,0)),d=this.FromAngleAxis(d,r.y*n,new WebGLPlot$e.Cartesian3(1,0,0)),d=WebGLPlot$e.Cartesian3.normalize(d,d);var f=this.ToEulerAnglesXYZ(h,c,d),p=-f.x,_=-f.y,m=f.z;return new WebGLPlot$e.Cartesian3(p,_,m)}}FromAngleAxis(e,t,i){var n=.5*t,r=Math.sin(n),o=Math.cos(n),a=new _0x23de81(r*i.x,r*i.y,r*i.z),s=new _0x23de81;s=WebGLPlot$e.Cartesian3.cross(a,e,s);var l=new _0x23de81;l=WebGLPlot$e.Cartesian3.cross(a,s,l);var u=new _0x23de81(2*s.x*o,2*s.y*o,2*s.z*o),c=new _0x23de81(2*l.x,2*l.y,2*l.z);return new _0x23de81(e.x+u.x+c.x,e.y+u.y+c.y,e.z+u.z+c.z)}ToEulerAnglesXYZ(e,t,i){var n=0,r=Math.asin(e.z);return r<Math.PI/2?r>-Math.PI/2?new _0x23de81(Math.atan2(-t.z,i.z),r,n=Math.atan2(-e.y,e.x)):new _0x23de81((n=0)-Math.atan2(t.x,t.y),r,n):new _0x23de81(Math.atan2(t.x,t.y)-(n=0),r,n)}_makePath(){if(null===this._wayPoints||2>this._wayPoints.length)return!1;null===this._pathFeature&&(this.compuetWayPos(),this._pathFeature=_0x4786d3.addAlgoPloyline(null,this.createPathLine(this.shapePointsArray[0]))),this._pathLength=0;for(var e=1;e<this.shapePointsArray[0].length;e++)this._pathLength+=_0x2909c1.distance(this.shapePointsArray[0][e-1],this.shapePointsArray[0][e]);return this._pathFeature}_findPos(e,t,i){if(!(i=this.getPtsIndexByDistance(t,e*this._pathLength)).result)return!1;var n=i.pt;return this._tangentDirection&&(i.angle=_0x2909c1.radian(n,t[i.index])/Math.PI*180),i}PtsToSpherical(e){var t=_0x25263a.getInstance({scene:this._scene})._scene.globe.ellipsoid,i=new WebGLPlot$e.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot$e.CesiumMath.toDegrees(n.latitude);return new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(n.longitude),r,n.height)}getGOAnimationType(){return _0x144579.ANIMATION_WAY}setShowPath(e){this._showPath=e}setWayPoints(e){if(!e||!Array.isArray(e)||2>e.length)return!1;this._wayPoints=[],this._wayPoints=e,null!==this._pathFeature&&(this.compuetWayPos(),this._pathFeature._positions=this.shapePointsArray[0])}getWayPoints(){return this._wayPoints}getCurrentPt(){return this._currentPt}setPathColor(e){!e||(this._pathColor=e,this.pathFeature&&null!==this.pathFeature&&(this.pathFeature.options.color=this.pathColor,this.pathFeature.setStyle(this.pathFeature.options)))}getPathColor(){return this._pathColor}setPathWidth(e){!e||(this.pathWidth=e,this.pathFeature&&null!==this.pathWidth&&(this.pathFeature.options.weight=this.pathWidth,this.pathFeature.setStyle(this.pathFeature.options)))}getPathWidth(){return this._pathWidth}setPathType(e){null!=e&&this.pathType!==e&&(this.pathType=e,null!==this.pathFeature&&(this.pathFeature.destroy(),this.pathFeature=null))}getPathType(){return this._pathType}generateBeizerPointsNoCtrlPt(e){return _0x2909c1.generateBeizerPointsNoCtrlPt(e)}createPathLine(e){return this._pathWidth<=0&&(this._pathWidth=.5),{width:this._pathWidth,positions:e,material:WebGLPlot$e.Material.fromType(WebGLPlot$e.Material.ColorType,{color:this._pathColor}),id:this.animationGOFeatures[0]._id+"_Path",show:!1}}getPtsIndexByDistance(e,t){var i=e.length,n=new Object;if(t<0||i<2)return n.result=!1,n;for(var r=0,o=0;o!=i-1;++o)if((r+=_0x2909c1.distance(e[o],e[o+1]))>=t){var a=_0x2909c1.distance(e[o+1],e[o]);if(0==a)return e[o+1];var s=(r-t)/a,l=new _0x23de81(0,0,0);return l.x=e[o+1].x+(e[o].x-e[o+1].x)*s,l.y=e[o+1].y+(e[o].y-e[o+1].y)*s,l.z=e[o+1].z+(e[o].z-e[o+1].z)*s,n.pt=l,n.result=!0,n.index=o,n}return n.result=!1,n}compuetWayPos(){let e=[];e=this._pathType===_0x2187ca.POLYLINE?this._wayPoints:this.generateBeizerPointsNoCtrlPt(this._wayPoints),this.shapePointsArray=[];for(let r=0;r<this.offsetPt.length;r++){const o=this.offsetPt[r];for(var t=[],i=0;i<e.length;i++){var n=e[i];t.push(n.x+o.x),t.push(n.y+o.y),t.push(n.z+o.z)}this.shapePointsArray.push(WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(t))}}getJSONData(){var e=this.getBaseJSONData();e.type=this.getGOAnimationType(),e.showPath=this.showPath,e.tangentDirection=this.tangentDirection,e.pathType=this.pathType,e.pathWidth=this.pathWidth,e.pathColor=this._colorFormat(this.pathColor),e.wayPoints=[];for(var t=0;t<this.wayPoints.length;t++)e.wayPoints.push({x:this.wayPoints[t].x,y:this.wayPoints[t].y,z:this.wayPoints[t].z});return e}fromJSONData(e){this.fromBaseJSONData(e),this.showPath=e.showPath,this.tangentDirection=e.tangentDirection,this.pathType=e.pathType,this.pathWidth=e.pathWidth,this.pathColor=this._serverColorToColor(e.pathColor);for(var t=[],i=0;i<e.wayPoints.length;i++)t.push(new _0x23de81(e.wayPoints[i].x,e.wayPoints[i].y,e.wayPoints[i].z));this.setWayPoints(t)}createScane(e){e.showScane=this.showScane,this.dynamicScane.createScaneCone(e)}updateScane(e,t){var i={point:e,rotate:t,showScane:this.showScane};this.dynamicScane.updateScaneCone(i)}setGOFeatures(e,t){if(void 0===t||t.length<=0||null===e._goAnimationLayer)return!1;this._animationManager=e,this._goFeatures=t;const i=t[0].localPoints[0].clone();return this.offsetPt=[],this.animationGOFeatures=[],t.map((t=>{const n=t.localPoints[0].clone(),r=new _0x23de81(n.x-i.x,n.y-i.y,n.z-i.z);this.offsetPt.push(r);let o=this.createAnimationGOFeature(t);o._layer=e._goAnimationLayer,this.animationGOFeatures.push(o)})),!(this.animationGOFeatures.length<=0)&&(e._goAnimationLayer.addFeatures(this.animationGOFeatures),this.showAnimationFeature(!1),!0)}createAnimationGOFeature(e){for(var t=0;t<this._animationManager._goAnimations.length;t++){var i=this._animationManager._goAnimations[t];if(i._goFeature.id===e.id)return i._animationGOFeature}let n=e.clone();return n._id+=this._name,n._isEdit=!0,n._valid=!1,n._isAnimationFeature=!0,n}showAnimationFeature(e){this.resetAnimationFeature(e)}resetAnimationFeature(e){if(this.animationGOFeatures.length>0&&this._goFeatures.length>0)for(let i=0;i<this._goFeatures.length;i++){let n=this._goFeatures[i];n.display=!e,n._initialize=!1;let r=this.animationGOFeatures[i];r.display=e,r._initialize=!1,r._rotate=n._rotate,r._modelRotate=n._modelRotate,r.vectorRotate=n.vectorRotate;var t=n._localPoints[0].clone();r._localPoints=[t]}e&&(null===this._pathFeature||0===this._pathFeature._positions.length||0===this.shapePointsArray.length)&&(this._makePath(),this._pathColor,this._pathWidth),null!==this._pathFeature&&(this._pathFeature.show=!1)}setCameraFollow(e,t,i,n){if(this.isFollow=e,this._wayPoints.length<=0||!this.isFollow)return!1;null===this._pathFeature&&this.shapePointsArray[0].length<=0&&(this._makePath(),this._pathFeature.show=!1);const r=Math.PI/180,o=n/i,a=-Math.asin(o);let s=null;switch(this.CameraOrientation=null,t){case _0x192aa1.EAST:s=new Cesium.Cartesian3(0,-1,o),this.CameraOrientation={heading:-90*r,pitch:a,roll:0};break;case _0x192aa1.WEST:s=new Cesium.Cartesian3(0,1,o),this.CameraOrientation={heading:90*r,pitch:a,roll:0};break;case _0x192aa1.SOUTH:s=new Cesium.Cartesian3(-1,0,o),this.CameraOrientation={heading:0,pitch:a,roll:0};break;case _0x192aa1.NORTH:s=new Cesium.Cartesian3(1,0,o),this.CameraOrientation={heading:180*r,pitch:a,roll:0};break;case _0x192aa1.EAST_NORTH:s=new Cesium.Cartesian3(1,-1,o),this.CameraOrientation={heading:225*r,pitch:a,roll:0};break;case _0x192aa1.WEST_NORTH:s=new Cesium.Cartesian3(1,1,o),this.CameraOrientation={heading:135*r,pitch:a,roll:0};break;case _0x192aa1.EAST_SOUTH:s=new Cesium.Cartesian3(-1,-1,o),this.CameraOrientation={heading:-45*r,pitch:a,roll:0};break;case _0x192aa1.WEST_SOUTH:s=new Cesium.Cartesian3(-1,1,o),this.CameraOrientation={heading:45*r,pitch:a,roll:0};break;case _0x192aa1.UP:s=new Cesium.Cartesian3(0,0,1),this.CameraOrientation={heading:0*r,pitch:-Math.PI/2,roll:0}}const l=this.shapePointsArray[0][0],u=_0x2909c1.computeMatrix2(l,new Cesium.Cartesian3(0,0,0));let c=_0x2909c1.localPtsToCartesian(s,u,i).position,h=new _0x23de81(c.x-l.x,c.y-l.y,c.z-l.z);this.followShapePoints=[];for(let e=0;e<this.shapePointsArray[0].length;e++){const t=this.shapePointsArray[0][e];this.followShapePoints.push(new _0x23de81(t.x+h.x,t.y+h.y,t.z+h.z))}}updateCameraFollow(e){if(!this.isFollow)return;let t=new Object,i=this._findPos(e,this.followShapePoints,t).pt;this._animationManager._scene.camera.setView({destination:i,orientation:this.CameraOrientation})}}Object.defineProperties(_0x269f67.prototype,{showPath:{get:function(){return this._showPath},set:function(e){e!=this._showPath&&(this._showPath=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},tangentDirection:{get:function(){return this._tangentDirection},set:function(e){e!=this._tangentDirection&&(this._tangentDirection=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathType:{get:function(){return this._pathType},set:function(e){e!=this._pathType&&(this._pathType=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathWidth:{get:function(){return this._pathWidth},set:function(e){e==this._pathWidth||e<=0||(this._pathWidth=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},pathColor:{get:function(){return this._pathColor},set:function(e){e!=this._pathColor&&(this._pathColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},wayPoints:{get:function(){return this._wayPoints},set:function(e){e!==this._wayPoints&&(this._wayPoints=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},showScane:{get:function(){return this._showScane},set:function(e){e!=this._showScane&&(this._showScane=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},rotateOffset:{get:function(){return this._rotateOffset},set:function(e){e!=this._rotateOffset&&(this._rotateOffset=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x10b4fb=(_0x4cfb31=!0,function(e,t){var i=_0x4cfb31?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4cfb31=!1,i}),_0x241e0b=_0x10b4fb(void 0,(function(){return _0x241e0b.toString().search("(((.+)+)+)+$").toString().constructor(_0x241e0b).search("(((.+)+)+)+$")})),_0x4cfb31;_0x241e0b();class _0x224004 extends _0x21ced6{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._lineColorAnimation=WebGLPlot.defaultValue(e.lineColorAnimation,!1),this._startLineColor=WebGLPlot.defaultValue(e.startLineColor,new WebGLPlot.Color(1,0,0,1)),this._endLineColor=WebGLPlot.defaultValue(e.endLineColor,new WebGLPlot.Color(0,0,1,1)),this._lineWidthAnimation=WebGLPlot.defaultValue(e.lineWidthAnimation,!1),this._startLineWidth=WebGLPlot.defaultValue(e.startLineWidth,0),this._endLineWidth=WebGLPlot.defaultValue(e.endLineWidth,5),this._surroundLineColorAnimation=WebGLPlot.defaultValue(e.surroundLineColorAnimation,!1),this._startSurroundLineColor=WebGLPlot.defaultValue(e.startSurroundLineColor,new WebGLPlot.Color(1,1,0,1)),this._endSurroundLineColor=WebGLPlot.defaultValue(e.endSurroundLineColor,new WebGLPlot.Color(0,1,1,1)),this._surroundLineWidthAnimation=WebGLPlot.defaultValue(e.surroundLineWidthAnimation,!1),this._startSurroundLineWidth=WebGLPlot.defaultValue(e.startSurroundLineWidth,0),this._endSurroundLineWidth=WebGLPlot.defaultValue(e.endtSurroundLineWidth,1)}getGOAnimationType(){return _0x144579.ANIMATION_ATTRIBUTE}execute(){if(!this.canExecute())return!1;var e=this.ratio,t=this.executeLineColorAnimation(e),i=this.executeLineWidthAnimation(e),n=this.executeSurroundLineColorAnimation(e),r=this.executeSurroundLineWidthAnimation(e);return!!(t||i||n||r)&&(this._animationGOFeature._initialize=!1,!0)}executeLineColorAnimation(e){if(!this._lineColorAnimation)return!1;var t=this.startLineColor,i=this.endLineColor,n=t.red+(i.red-t.red)*e,r=t.green+(i.green-t.green)*e,o=t.blue+(i.blue-t.blue)*e,a=t.alpha+(i.alpha-t.alpha)*e;return this._animationGOFeature._symbolStyle._lineColor=new WebGLPlot.Color(n,r,o,a),!0}executeLineWidthAnimation(e){return!!this.lineWidthAnimation&&(_0x1c668c.SYMBOL_DOT===this._animationGOFeature.symbolType?(this._animationGOFeature.gridLineWidth=this.startLineWidth+(this.endLineWidth-this.startLineWidth)*e,!0):_0x1c668c.SYMBOL_ALGO===this._animationGOFeature.symbolType?(this._animationGOFeature._symbolStyle._lineWidth=this.startLineWidth+(this.endLineWidth-this.startLineWidth)*e,!0):void 0)}executeSurroundLineColorAnimation(e){if(!this.surroundLineColorAnimation)return!1;var t=this.startSurroundLineColor,i=this.endSurroundLineColor,n=t.red+(i.red-t.red)*e,r=t.green+(i.green-t.green)*e,o=t.blue+(i.blue-t.blue)*e,a=t.alpha+(i.alpha-t.alpha)*e;return this._animationGOFeature._symbolStyle._surroundLineColor=new WebGLPlot.Color(n,r,o,a),!0}executeSurroundLineWidthAnimation(e){return!!this.surroundLineWidthAnimation&&(_0x1c668c.SYMBOL_DOT===this._animationGOFeature.symbolType?(this._animationGOFeature._gridSurroundLineWidth=this.startSurroundLineWidth+(this.endSurroundLineWidth-this.startSurroundLineWidth)*e,!0):_0x1c668c.SYMBOL_ALGO===this._animationGOFeature.symbolType?(this._animationGOFeature._symbolStyle._surroundLineWidth=this.startSurroundLineWidth+(this.endSurroundLineWidth-this.startSurroundLineWidth)*e,!0):void 0)}resetAnimationFeature(e){e&&(this.lineWidthAnimation&&(this._animationGOFeature.gridLineWidth=this._goFeature.gridLineWidth),this.lineColorAnimation&&(this._animationGOFeature._symbolStyle._lineColor=this._goFeature._symbolStyle._lineColor),this.surroundLineWidthAnimation&&(this._animationGOFeature._gridSurroundLineWidth=this._goFeature._gridSurroundLineWidth),this.surroundLineColorAnimation&&(this._animationGOFeature._symbolStyle._surroundLineColor=this._goFeature._symbolStyle._surroundLineColor))}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.lineColorAnimation=this.lineColorAnimation,e.startLineColor=this._colorFormat(this.startLineColor),e.endLineColor=this._colorFormat(this.endLineColor),e.lineWidthAnimation=this.lineWidthAnimation,e.startLineWidth=this.startLineWidth,e.endLineWidth=this.endLineWidth,e.surroundLineColorAnimation=this.surroundLineColorAnimation,e.startSurroundLineColor=this._colorFormat(this.startSurroundLineColor),e.endSurroundLineColor=this._colorFormat(this.endSurroundLineColor),e.surroundLineWidthAnimation=this.surroundLineWidthAnimation,e.startSurroundLineWidth=this.startSurroundLineWidth,e.endSurroundLineWidth=this.endSurroundLineWidth,e}fromJSONData(e){this.fromBaseJSONData(e),this.lineColorAnimation=e.lineColorAnimation,this.startLineColor=this._serverColorToColor(e.startLineColor),this.endLineColor=this._serverColorToColor(e.endLineColor),this.lineWidthAnimation=e.lineWidthAnimation,this.startLineWidth=e.startLineWidth,this.endLineWidth=e.endLineWidth,this.surroundLineColorAnimation=e.surroundLineColorAnimation,this.startSurroundLineColor=this._serverColorToColor(e.startSurroundLineColor),this.endSurroundLineColor=this._serverColorToColor(e.endSurroundLineColor),this.surroundLineWidthAnimation=e.surroundLineWidthAnimation,this.startSurroundLineWidth=e.startSurroundLineWidth,this.endSurroundLineWidth=e.endSurroundLineWidth}}Object.defineProperties(_0x224004.prototype,{lineColorAnimation:{get:function(){return this._lineColorAnimation},set:function(e){e!==this._lineColorAnimation&&(this._lineColorAnimation=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startLineColor:{get:function(){return this._startLineColor},set:function(e){e!==this._startLineColor&&(this._startLineColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endLineColor:{get:function(){return this._endLineColor},set:function(e){e!==this._endLineColor&&(this._endLineColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},lineWidthAnimation:{get:function(){return this._lineWidthAnimation},set:function(e){e!==this._lineWidthAnimation&&(this._lineWidthAnimation=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startLineWidth:{get:function(){return this._startLineWidth},set:function(e){e!==this._startLineWidth&&(this._startLineWidth=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endLineWidth:{get:function(){return this._endLineWidth},set:function(e){e!=this._endLineWidth&&(this._endLineWidth=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},surroundLineColorAnimation:{get:function(){return this._surroundLineColorAnimation},set:function(e){e!=this._surroundLineColorAnimation&&(this._surroundLineColorAnimation=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startSurroundLineColor:{get:function(){return this._startSurroundLineColor},set:function(e){e!=this._startSurroundLineColor&&(this._startSurroundLineColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endSurroundLineColor:{get:function(){return this._endSurroundLineColor},set:function(e){e!=this._endSurroundLineColor&&(this._endSurroundLineColor=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},surroundLineWidthAnimation:{get:function(){return this._surroundLineWidthAnimation},set:function(e){e!=this._surroundLineWidthAnimation&&(this._surroundLineWidthAnimation=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startSurroundLineWidth:{get:function(){return this._startSurroundLineWidth},set:function(e){e!=this._startSurroundLineWidth&&(this._startSurroundLineWidth=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endSurroundLineWidth:{get:function(){return this._endSurroundLineWidth},set:function(e){e!=this._endSurroundLineWidth&&(this._endSurroundLineWidth=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x1c9ddb=(_0x8d27ef=!0,function(e,t){var i=_0x8d27ef?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8d27ef=!1,i}),_0x400879=_0x1c9ddb(void 0,(function(){return _0x400879.toString().search("(((.+)+)+)+$").toString().constructor(_0x400879).search("(((.+)+)+)+$")})),_0x8d27ef;_0x400879();var _0x3318f9={ClockWise:0,AntiClockWise:1},_0x520814=Object.freeze(_0x3318f9),_0x50134e=(_0x20a12b=!0,function(e,t){var i=_0x20a12b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x20a12b=!1,i}),_0x4fcc87=_0x50134e(void 0,(function(){return _0x4fcc87.toString().search("(((.+)+)+)+$").toString().constructor(_0x4fcc87).search("(((.+)+)+)+$")})),_0x20a12b;_0x4fcc87();class _0x8d847f extends _0x21ced6{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._rotateDirection=WebGLPlot.defaultValue(e.rotateDirection,_0x520814.ClockWise),this._startAngle=WebGLPlot.defaultValue(e.startAngle,new _0x23de81(0,0,0)),this._endAngle=WebGLPlot.defaultValue(e.endAngle,new _0x23de81(0,0,0))}getGOAnimationType(){return _0x144579.ANIMATION_ROTATE}execute(){if(this._animationGOFeature.symbolType!==_0x1c668c.SYMBOL_DOT||!this.canExecute())return!1;var e=this._ratio,t=this.getCurrentAngle(this.startAngle.x,this.endAngle.x,e),i=this.getCurrentAngle(this.startAngle.y,this.endAngle.y,e),n=this.getCurrentAngle(this.startAngle.z,this.endAngle.z,e),r=this._animationGOFeature._showMode;return _0x2bcc5b.Vector===r?this._animationGOFeature.vectorRotate=new _0x23de81(t,i,n):_0x2bcc5b.Marker===r&&(this._animationGOFeature._modelRotate=new _0x23de81(t,i,n)),this._animationGOFeature._initialize=!1,!0}getCurrentAngle(e,t,i){var n=0,r=t-e,o=parseInt(Math.abs(r/360));if(e!==t)if(this._rotateDirection===_0x520814.ClockWise)r<0&&(r+=360*(2*o+1)),n=e+r*i;else{var a=0;n=e+(360-(r=0===(a=r<0?r+360*(o+1):r-360*o)?360*o:360-a+360*o)*i)}return n}resetAnimationFeature(e){this._animationGOFeature._rotate=this._goFeature._rotate,this._animationGOFeature._modelRotate=this._goFeature._modelRotate,this._animationGOFeature.vectorRotate=this._goFeature.vectorRotate,GOAnimation.prototype.resetAnimationFeature.call(this,e)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.rotateDirection=this.rotateDirection,e.startAngle=this.startAngle,e.endAngle=this.endAngle,e}fromJSONData(e){this.fromBaseJSONData(e),this.rotateDirection=e.rotateDirection,this.startAngle=e.startAngle,this.endAngle=e.endAngle}}Object.defineProperties(_0x8d847f.prototype,{rotateDirection:{get:function(){return this._rotateDirection},set:function(e){e!=this._rotateDirection&&(this._rotateDirection=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},startAngle:{get:function(){return this._startAngle},set:function(e){e!=this._startAngle&&(this._startAngle=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endAngle:{get:function(){return this._endAngle},set:function(e){e!=this._endAngle&&(this._endAngle=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x4505d8=(_0xdda8a=!0,function(e,t){var i=_0xdda8a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xdda8a=!1,i}),_0x59d8e0=_0x4505d8(void 0,(function(){return _0x59d8e0.toString().search("(((.+)+)+)+$").toString().constructor(_0x59d8e0).search("(((.+)+)+)+$")})),_0xdda8a;_0x59d8e0();class _0x22137f extends _0x21ced6{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._startScale=WebGLPlot.defaultValue(e.startScale,0),this._endScale=WebGLPlot.defaultValue(e.endScale,1),this._lastScale=WebGLPlot.defaultValue(e.lastScale,null)}getGOAnimationType(){return _0x144579.ANIMATION_SCALE}execute(){if(this._animationGOFeature._symbolType!==_0x1c668c.SYMBOL_DOT||!this.canExecute())return!1;this._lastScale=this._animationGOFeature._scale,_0x2bcc5b.Marker===this._animationGOFeature.showMode&&(this._lastScale=this._animationGOFeature._modelScale.x),_0x2bcc5b.Vector===this._animationGOFeature.showMode&&(this._lastScale=this._animationGOFeature._vectorScale);var e=this._startScale;0===e&&(e=.1);var t=this._endScale;if(0===t&&(t=.1),this._animationGOFeature.sizeInMeters)this._animationGOFeature.billboard.scale=this._animationGOFeature._BillboardScale*(e+this.ratio*(t-e));else{var i=this.goFeature._scale*(e+this.ratio*(t-e));_0x2bcc5b.Picture===this._animationGOFeature.showMode||_0x2bcc5b.Grid===this._animationGOFeature.showMode?this._animationGOFeature.scale=i:_0x2bcc5b.Marker===this._animationGOFeature.showMode?(i=this.goFeature._modelScale.x*(e+this.ratio*(t-e)),this._animationGOFeature._modelScale.x=i,this._animationGOFeature._initialize=!1):_0x2bcc5b.Vector===this._animationGOFeature.showMode&&(i=this.goFeature._vectorScale*(e+this.ratio*(t-e)),this._animationGOFeature._vectorScale=i,this._animationGOFeature._initialize=!1)}return!0}resetAnimationFeature(e){this._lastScale=null,this._animationGOFeature.scale=this.goFeature.scale,_0x21ced6.prototype.resetAnimationFeature.call(this,e)}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.startScale=this.startScale,e.endScale=this.endScale,e}fromJSONData(e){this.fromBaseJSONData(e),this.startScale=e.startScale,this.endScale=e.endScale}}Object.defineProperties(_0x22137f.prototype,{startScale:{get:function(){return this._startScale},set:function(e){e!=this._startScale&&(this._startScale=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endScale:{get:function(){return this._endScale},set:function(e){e!=this._endScale&&(this._endScale=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},lastScale:{get:function(){return this._lastScale},set:function(e){e!=this._lastScale&&(this._lastScale=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});var _0x42f760=(_0x4c0520=!0,function(e,t){var i=_0x4c0520?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4c0520=!1,i}),_0x856657=_0x42f760(void 0,(function(){return _0x856657.toString().search("(((.+)+)+)+$").toString().constructor(_0x856657).search("(((.+)+)+)+$")})),_0x4c0520;_0x856657();class _0x597fad extends _0x21ced6{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._startScale=WebGLPlot.defaultValue(e.startScale,0),this._endScale=WebGLPlot.defaultValue(e.endScale,1),this._timeSpace=WebGLPlot.defaultValue(e.timeSpace,50),this._lastDrawTime=WebGLPlot.defaultValue(e.lastDrawTime,0),this._lineLength=WebGLPlot.defaultValue(e.lineLength,0),this._controlPoints=WebGLPlot.defaultValue(e.controlPoints,[]),this.m_arrPts3D=[],this.goFeatureLocalPts=[]}getGOAnimationType(){return _0x144579.ANIMATION_GROW}execute(){if(this._animationGOFeature._localPoints.length<2){var e=this.goFeatureLocalPts;if(e.length<2)return!1;this._animationGOFeature._localPoints=e}if(!this.canExecute())return!1;var t=(new Date).getTime();if(this._lastDrawTime>0&&t-this._timeSpace<this._lastDrawTime)return!1;var i=this._startScale+this._ratio*(this._endScale-this._startScale);return i>=1&&(i=1),this._lastDrawTime=t,this._executeAnimation(i)}_executeAnimation(e){var t=!1,i=this._goFeature._code,n=this._goFeature._libID;if(0===this.m_arrPts3D.length&&(this.m_arrPts3D=WebGLPlot.clonePoints(this.goFeatureLocalPts)),0===n)switch(i){case _0x1c668c.SYMBOL_KIDNEY:case _0x1c668c.SYMBOL_POLYBEZIERCLOSED:case _0x1c668c.SYMBOL_PARALLELOGRAM:case _0x1c668c.SYMBOL_TRAPEZOID:case _0x1c668c.SYMBOL_CIRCLECHORD:t=this._execute_Kidney(e);break;case _0x1c668c.SYMBOL_CIRCLE:t=this._execute_Circle(e);break;case _0x1c668c.SYMBOL_RECTANGLE:t=this._execute_Rect(e);break;case _0x1c668c.SYMBOL_REGULARPOLYGON:t=this._execute_RegularPloygon(e);break;case _0x1c668c.SYMBOL_ELLIPSE:t=this._execute_Ellipse(e);break;case _0x1c668c.SYMBOL_ARBITRARYPOLYGON:t=this._execute_ArbitraryPolygon(e);break;case _0x1c668c.SYMBOL_PARALLELLINE:t=this._execute_ParallelLine(e);break;case _0x1c668c.SYMBOL_POLYBEZIER:t=this._execute_Polybezier(e);break;case _0x1c668c.SYMBOL_PIE:case _0x1c668c.SYMBOL_CHORD:case _0x1c668c.SYMBOL_ARC:return!1;case _0x1c668c.SYMBOL_CURVEEIGHT:t=this._execute_CurveEight(e);break;default:t=this._execute_Generalization(e)}else if(22===n)switch(i){case 1004:case 2004:case 1010:t=this._execute_1004(e);break;case 1006:case 2006:t=this._execute_1006(e);break;case 1002:case 2002:t=this._execute_1002(e);break;case 32:case 3211:t=this._execute_ArbitraryPolygon(e);break;case 390:case 3911:t=this._execute_Kidney(e);break;default:t=this._execute_Generalization(e)}else if(100===n)if(25200===i)t=this._execute_1004(e);else t=this._execute_Generalization(e);else if(421===n)switch(i){case 311:t=this._execute_1004(e);break;case 317:t=this._execute_1006(e);break;default:t=this._execute_Generalization(e)}else if(123===n)switch(i){case 60310:case 6031001:t=this._execute_1004(e);break;default:t=this._execute_Generalization(e)}else t=this._execute_Generalization(e);return t}_execute_Generalization(e){0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,this._lineLength=WebGLPlot.polylineDistance(this._controlPoints));for(var t=[],i=WebGLPlot.clonePoints(this._controlPoints),n=this._findPos(this._lineLength*e,i),r=0;r<=n.pos;r++)t.push(i[r]);return t.push(n.pts),WebGLPlot.isAccessServer(this._animationGOFeature._libID,this._animationGOFeature._code)&&this._animationGOFeature.getMinEditPts()>t.length?(this._executeAndRatioIsZero(),!0):(this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(t),this._animationGOFeature._initialize=!1,!0)}_findPos(e,t){var i,n=0,r=0;for(i=1;i<t.length&&!(n+(r=_0x2909c1.distance(t[i-1],t[i]))>=e);i++)n+=r;var o=new Object;if(i<t.length)var a=_0x2909c1.LinePnt(t[i-1],t[i],e-n);else a=t[i-1];return o.pos=i-1,o.pts=a,o}_execute_1004(e){if(0===this._lineLength){this._controlPoints=this.m_arrPts3D;var t=new _0x23de81((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2);this._lineLength+=_0x2909c1.distance(t,this._controlPoints[2]);for(var i=3;i<this._controlPoints.length;i++)this._lineLength+=_0x2909c1.distance(this._controlPoints[i-1],this._controlPoints[i])}if(0===e)return this._executeAndRatioIsZero(),!0;var n=[],r=[];t=new _0x23de81((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2);r.push(t);for(i=2;i<this._controlPoints.length;i++)r.push(this._controlPoints[i].clone());n.push(this._controlPoints[0]),n.push(this._controlPoints[1]);for(var o=this._findPos(this._lineLength*e,r),a=1;a<=o.pos;a++)n.push(r[a]);return n.push(o.pts),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(n),this._animationGOFeature._initialize=!1,!0}_execute_1006(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D,this._animationGOFeature.m_bIsAnimation=!0),0===e)return this._executeAndRatioIsZero(),!0;var t=this.OperateCtrlPts(this._controlPoints);if(4!==t.length)return!1;for(var i=[],n=0;n<t.length;n++){var r=WebGLPlot.Cartesian3.fromDegrees(t[n].x,t[n].y,t[n].z);i.push(r)}var o=i[0],a=i[1],s=i[2],l=i[3],u=_0x2909c1.distance(o,l),c=_0x2909c1.distance(a,s),h=_0x2909c1.LinePnt(o,l,u*e),d=_0x2909c1.LinePnt(a,s,c*e),f=[];return f.push(this.PtsToSpherical(o)),f.push(this.PtsToSpherical(a)),f.push(this.PtsToSpherical(d)),f.push(this.PtsToSpherical(h)),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(f),this._animationGOFeature._initialize=!1,!0}PtsToSpherical(e){var t=_0x25263a.getInstance({scene:this._scene})._scene.globe.ellipsoid,i=new WebGLPlot.Cartesian3(e.x,e.y,e.z),n=t.cartesianToCartographic(i),r=WebGLPlot.CesiumMath.toDegrees(n.latitude);return new _0x23de81(WebGLPlot.CesiumMath.toDegrees(n.longitude),r,n.height)}_execute_1002(e){if(0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,this._lineLength=WebGLPlot.polylineDistance(this._controlPoints)),0===e)return this._executeAndRatioIsZero(),!0;var t=this._controlPoints.length,i=Math.ceil(t/3),n=t%3==0?3:t%3;1===n&&(i-=1,n=3,this._controlPoints.pop());var r,o=[];if(3===n)for(var a=1;a<i+1;a++){var s=3*a,l=this._controlPoints[s-3],u=this._controlPoints[s-2],c=this._controlPoints[s-1];if((f=(d=_0x2909c1.distance(l,u))+_0x2909c1.distance(u,c))*e>=d)r=_0x2909c1.LinePnt(u,c,f*e-d),o.push(l),o.push(u),o.push(r);else{r=_0x2909c1.LinePnt(l,u,f*e);var h=_0x2909c1.LinePnt(l,u,d*e);o.push(l),o.push(h),o.push(r)}}else{for(a=1;a<i;a++){var d;s=3*a,l=this._controlPoints[s-3],u=this._controlPoints[s-2],c=this._controlPoints[s-1];if((f=(d=_0x2909c1.distance(l,u))+_0x2909c1.distance(u,c))*e>=d)r=_0x2909c1.LinePnt(u,c,f*e-d),o.push(l),o.push(u),o.push(r);else{r=_0x2909c1.LinePnt(l,u,f*e);h=_0x2909c1.LinePnt(l,u,d*e);o.push(l),o.push(h),o.push(r)}}l=this._controlPoints[t-2],u=this._controlPoints[t-1];var f=_0x2909c1.distance(l,u);r=_0x2909c1.LinePnt(l,u,f*e),o.push(l),o.push(r)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(o),this._animationGOFeature._initialize=!1,!0}_execute_Rect(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=new _0x23de81((this._controlPoints[0].x+this._controlPoints[1].x)/2,(this._controlPoints[0].y+this._controlPoints[1].y)/2,(this._controlPoints[0].z+this._controlPoints[1].z)/2),i=Math.abs(this._controlPoints[0].x-this._controlPoints[1].x)/2*e,n=Math.abs(this._controlPoints[0].y-this._controlPoints[1].y)/2*e,r=new _0x23de81(t.x-i,t.y+n,t.z),o=new _0x23de81(t.x+i,t.y-n,t.z);return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=[r,o],this._animationGOFeature._initialize=!1,!0}_execute_Circle(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=e*_0x2909c1.distance(this._controlPoints[0],this._controlPoints[1]);if(1===e)this._animationGOFeature._localPoints=[this._controlPoints[0],this._controlPoints[1]];else{var i=new _0x23de81(this._controlPoints[0].x+t,this._controlPoints[0].y,this._controlPoints[0].z);this._animationGOFeature._localPoints=[this._controlPoints[0],i]}return this._animationGOFeature._initialize=!1,!0}_execute_Kidney(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D),0===e)return this._executeAndRatioIsZero(),!0;var t=[],i=this._controlPoints.length,n=_0x2909c1.getPolygonCenterPt(this._controlPoints);if(null===n)return this._executeAndRatioIsZero(),!0;for(var r=0;r<i;r++){var o=_0x2909c1.distance(n,this._controlPoints[r]),a=o*e;if(a>o)return!1;var s=_0x2909c1.LinePnt(n,this._controlPoints[r],a);t.push(s)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(t),this._animationGOFeature._initialize=!1,!0}_execute_RegularPloygon(e){if(0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D),this._controlPoints=_0x2909c1.clearNextSamePts(this._controlPoints),0===e)return this._executeAndRatioIsZero(),!0;var t=this._controlPoints.length,i=_0x2909c1.distance(this._controlPoints[0],this._controlPoints[t-1]),n=i*e,r=[];if(n>=i)r=this._controlPoints;else{var o=_0x2909c1.LinePnt(this._controlPoints[0],this._controlPoints[t-1],n);r.push(this._controlPoints[0]);for(var a=1;a<t-1;a++)r.push(this._controlPoints[a]);r.push(o)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(r),this._animationGOFeature._initialize=!1,!0}_execute_Ellipse(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=_0x2909c1.FindPointOnLineByRatio(e,this._controlPoints[0],this._controlPoints[1]),i=_0x2909c1.FindPointOnLineByRatio(e,this._controlPoints[0],this._controlPoints[2]);return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=[this._controlPoints[0],t,i],this._animationGOFeature._initialize=!1,!0}_execute_ArbitraryPolygon(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);var t=this._controlPoints.length,i=_0x2909c1.getPolygonCenterPt(this._controlPoints);if(null===i)return this._executeAndRatioIsZero(),!0;for(var n=[],r=0;r<t;r++){var o=_0x2909c1.distance(i,this._controlPoints[r])*e,a=_0x2909c1.LinePnt(i,this._controlPoints[r],o);n.push(a)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(n),this._animationGOFeature._initialize=!1,!0}_execute_ParallelLine(e){if(0===this._lineLength){this._controlPoints=this.m_arrPts3D;for(var t=2;t<this._controlPoints.length;t++)this._lineLength+=_0x2909c1.distance(this._controlPoints[t-1],this._controlPoints[t])}var i=[],n=[];for(t=1;t<this._controlPoints.length;t++)n.push(this._controlPoints[t]);var r=this._findPos(this._lineLength*e,n);i.push(this._controlPoints[0]);for(t=0;t<=r.pos;t++)i.push(n[t]);return i.push(r.pts),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(i),this._animationGOFeature._initialize=!1,!0}_execute_Polybezier(e){var t=[];if(0===this._lineLength&&(this._controlPoints=this.m_arrPts3D,t=_0x2909c1.generateBeizerPointsNoCtrlPt(this._controlPoints),this._lineLength+=WebGLPlot.polylineDistance(t)),e>=1)return this._animationGOFeature._symbolAlgo=null,this._animationGOFeature.code=590,this._animationGOFeature._localPoints=this._goFeature._localPoints,this._animationGOFeature._initialize=!1,!0;this._animationGOFeature._symbolAlgo=null,this._animationGOFeature.code=24;for(var i=[],n=0;n<this._controlPoints.length;n++)i.push(this._controlPoints[n].z);var r=Math.max.apply({},i),o=[];t=_0x2909c1.generateBeizerPointsNoCtrlPt(this._controlPoints);var a=this._findPos(this._lineLength*e,t);for(n=0;n<=a.pos;n++)o.push(new _0x23de81(t[n].x,t[n].y,r));return o.push(new _0x23de81(a.pts.x,a.pts.y,r)),this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(o),this._animationGOFeature._initialize=!1,!0}_execute_CurveEight(e){0===this._controlPoints.length&&(this._controlPoints=this.m_arrPts3D);for(var t=_0x2909c1.getPolygonCenterPt(this._controlPoints),i=[],n=0;n<this._controlPoints.length;n++){var r=_0x2909c1.distance(t,this._controlPoints[n])*e,o=_0x2909c1.LinePnt(t,this._controlPoints[n],r);i.push(o)}return this._animationGOFeature._localPoints=[],this._animationGOFeature._localPoints=this._animationGOFeature._localPoints.concat(i),this._animationGOFeature._initialize=!1,!0}_executeAndRatioIsZero(){this._animationGOFeature._localPoints=[]}resetAnimationFeature(e){if(_0x21ced6.prototype.resetAnimationFeature.call(this,e),this._lineLength=0,this._controlPoints=[],this.m_arrPts3D=[],this._animationGOFeature._localPoints=[],this._animationGOFeature.code=this._goFeature.code,this.goFeatureLocalPts.length>=2)for(var t=0;t<this.goFeatureLocalPts.length;t++)this._animationGOFeature._localPoints.push(this.goFeatureLocalPts[t].clone())}OperateCtrlPts(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i].clone());var n=t.length;if(3==n){var r=new _0x23de81;(r=_0x2909c1.getPointsByTrapezoid(1,t[0].x,t[0].y,t[1].x,t[1].y,t[2].x,t[2].y,r)).z=t[2].z,t.push(r)}if(n>4&&t.splice(4,n-4),_0x2909c1.isRight(t[2],t[0],t[1])){var o=t[0].clone();t[0]=t[1].clone(),t[1]=o}if(!_0x2909c1.pointIsRightToVerticle(t[0],t[1],t[2])){o=t[2].clone();t[2]=t[3].clone(),t[3]=o}return t}getJSONData(){var e=this.getBaseJSONData();return e.type=this.getGOAnimationType(),e.startScale=this.startScale,e.endScale=this.endScale,e}fromJSONData(e){this.fromBaseJSONData(e),this.startScale=e.startScale,this.endScale=e.endScale}}Object.defineProperties(_0x597fad.prototype,{startScale:{get:function(){return this._startScale},set:function(e){e!=this._startScale&&(this._startScale=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}},endScale:{get:function(){return this._endScale},set:function(e){e!=this._endScale&&(e>=1&&(e=1),this._endScale=e,_0x5ac1e1.getInstance().animationModified.raiseEvent(this.getJSONData()))}}});const _0x2ace2f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x299b2b=_0x2ace2f(void 0,(function(){return _0x299b2b.toString().search("(((.+)+)+)+$").toString().constructor(_0x299b2b).search("(((.+)+)+)+$")}));_0x299b2b();class _0x1ecde6 extends _0x597fad{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,1),e.endScale=WebGLPlot.defaultValue(e.endScale,0);const t=e.startScale;e.startScale<e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_REDUCE_EXP}}var _0x216cc3=(_0x2f29e6=!0,function(e,t){var i=_0x2f29e6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f29e6=!1,i}),_0x21fcd3=_0x216cc3(void 0,(function(){return _0x21fcd3.toString().search("(((.+)+)+)+$").toString().constructor(_0x21fcd3).search("(((.+)+)+)+$")})),_0x2f29e6;_0x21fcd3();class _0x17c29c extends _0x597fad{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,0),e.endScale=WebGLPlot.defaultValue(e.endScale,1);const t=e.startScale;e.startScale>e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e),this._animationGrowEXP_isFirstExecute=!0}getGOAnimationType(){return _0x144579.ANIMATION_GROW_EXP}showAnimationFeature(e){null!==this._animationGOFeature&&null!==this._animationGOFeature._symbolStyle&&(this.resetAnimationFeature(e),this._animationGOFeature.display=!1),null!==this._goFeature&&null!==this._goFeature._symbolStyle&&(this._goFeature.display=!e,this._goFeature._initialize=!1),e&&(this._isSendBegin=!0)}execute(){if(this._animationGOFeature._localPoints.length<2){var e=this.goFeatureLocalPts;if(e.length<2)return!1;this._animationGOFeature._localPoints=e}if(!this.canExecute())return!1;this._animationGrowEXP_isFirstExecute&&(this._animationGOFeature.display=!0,this._animationGrowEXP_isFirstExecute=!1);var t=(new Date).getTime();if(this._lastDrawTime>0&&t-this._timeSpace<this._lastDrawTime)return!1;var i=this._startScale+this._ratio*(this._endScale-this._startScale);return i>=1&&(i=1),this._lastDrawTime=t,this._executeAnimation(i)}}var _0x136c7a=(_0x25cf78=!0,function(e,t){var i=_0x25cf78?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x25cf78=!1,i}),_0x583f41=_0x136c7a(void 0,(function(){return _0x583f41.toString().search("(((.+)+)+)+$").toString().constructor(_0x583f41).search("(((.+)+)+)+$")})),_0x25cf78;_0x583f41();class _0x2980fc extends _0x1368e5{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!0,e.showEffect=!0,e.duration=WebGLPlot.defaultValue(e.duration,3),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_MOVEIN_EXP}}var _0x206ce7=(_0xadb9eb=!0,function(e,t){var i=_0xadb9eb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xadb9eb=!1,i}),_0x1522fb=_0x206ce7(void 0,(function(){return _0x1522fb.toString().search("(((.+)+)+)+$").toString().constructor(_0x1522fb).search("(((.+)+)+)+$")})),_0xadb9eb;_0x1522fb();class _0x42ff63 extends _0x1368e5{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!1,e.showEffect=!0,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_MOVEOUT_EXP}}var _0x14f3f1=(_0x1f5696=!0,function(e,t){var i=_0x1f5696?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1f5696=!1,i}),_0x270385=_0x14f3f1(void 0,(function(){return _0x270385.toString().search("(((.+)+)+)+$").toString().constructor(_0x270385).search("(((.+)+)+)+$")})),_0x1f5696;_0x270385();class _0xb1e5d0 extends _0x1368e5{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!1,e.showEffect=!1,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_HIDE_EXP}}var _0x2187ad=(_0x2ae3e2=!0,function(e,t){var i=_0x2ae3e2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ae3e2=!1,i}),_0x5b4ec2=_0x2187ad(void 0,(function(){return _0x5b4ec2.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b4ec2).search("(((.+)+)+)+$")})),_0x2ae3e2;_0x5b4ec2();class _0x116c0b extends _0x1368e5{constructor(e){(e=WebGLPlot.defaultValue(e,{})).finalDisplay=!0,e.showEffect=!1,e.duration=WebGLPlot.defaultValue(e.duration,1),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_SHOW_EXP}}var _0x34834d=(_0x357575=!0,function(e,t){var i=_0x357575?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x357575=!1,i}),_0x5f422c=_0x34834d(void 0,(function(){return _0x5f422c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f422c).search("(((.+)+)+)+$")})),_0x357575;_0x5f422c();class _0xe89a1c extends _0x371aa9{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x2187ca.POLYLINE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_BROKENLINE_EXP}}var _0x5522e2=(_0x3aa9cc=!0,function(e,t){var i=_0x3aa9cc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3aa9cc=!1,i}),_0x32567a=_0x5522e2(void 0,(function(){return _0x32567a.toString().search("(((.+)+)+)+$").toString().constructor(_0x32567a).search("(((.+)+)+)+$")})),_0x3aa9cc;_0x32567a();class _0x5b3a44 extends _0x371aa9{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x2187ca.CURVE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_CURVE_EXP}}const _0x289d22=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x44e978=_0x289d22(void 0,(function(){return _0x44e978.toString().search("(((.+)+)+)+$").toString().constructor(_0x44e978).search("(((.+)+)+)+$")}));_0x44e978();class _0x36afe8 extends _0x371aa9{constructor(e){(e=WebGLPlot.defaultValue(e,{})).pathType=_0x2187ca.POLYLINE,e.duration=WebGLPlot.defaultValue(e.duration,5),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_WAY_EXP}}Object.defineProperties(_0x36afe8.prototype,{wayPoints:{get:function(){return this._wayPoints},set:function(e){if(e instanceof _0x330d7a){let t=[];for(let i=0;i<e._symbolAlgo.components.length;i++){const n=e._symbolAlgo.components[i];t=t.concat(n.shapePts)}this._wayPoints=t}}}});var _0x252c1a=(_0x3b20b3=!0,function(e,t){var i=_0x3b20b3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3b20b3=!1,i}),_0x5acbee=_0x252c1a(void 0,(function(){return _0x5acbee.toString().search("(((.+)+)+)+$").toString().constructor(_0x5acbee).search("(((.+)+)+)+$")})),_0x3b20b3;_0x5acbee();class _0x3884c0 extends _0x400916{constructor(e){(e=WebGLPlot.defaultValue(e,{})).duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_BLINK_EXP}}const _0x4b4559=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x9665b0=_0x4b4559(void 0,(function(){return _0x9665b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x9665b0).search("(((.+)+)+)+$")}));_0x9665b0();class _0x5eeaa0 extends _0x22137f{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,0),e.endScale=WebGLPlot.defaultValue(e.endScale,1);const t=e.startScale;e.startScale>e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_ZOOMIN_EXP}}const _0x11230b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x37e237=_0x11230b(void 0,(function(){return _0x37e237.toString().search("(((.+)+)+)+$").toString().constructor(_0x37e237).search("(((.+)+)+)+$")}));_0x37e237();class _0x2c95d7 extends _0x22137f{constructor(e){(e=WebGLPlot.defaultValue(e,{})).startScale=WebGLPlot.defaultValue(e.startScale,1),e.endScale=WebGLPlot.defaultValue(e.endScale,0);const t=e.startScale;e.startScale<e.endScale&&(e.startScale=e.endScale,e.endScale=t),e.duration=WebGLPlot.defaultValue(e.duration,2),e.animationPlayType=WebGLPlot.defaultValue(e.animationPlayType,_0x5a1aa1.PLAYFROMNOW),super(e)}getGOAnimationType(){return _0x144579.ANIMATION_ZOOMOUT_EXP}}var _0x1ad790=(_0x24e7dd=!0,function(e,t){var i=_0x24e7dd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24e7dd=!1,i}),_0xdaa6ed=_0x1ad790(void 0,(function(){return _0xdaa6ed.toString().search("(((.+)+)+)+$").toString().constructor(_0xdaa6ed).search("(((.+)+)+)+$")})),_0x24e7dd;_0xdaa6ed();class GOAnimationManagerBase{constructor(e){this.goAnimations=[],this.curPlayGroup=0}preView(){if(0!==this.goAnimations.length)for(var e=this.getAllGroups(),t=0;t<e.length;t++){var i=e[t];for(let e=0;e<i.length;e++)i[e].play()}}play(e){if(0!==this.goAnimations.length){void 0!==e&&(this.curPlayGroup=this.getAnimationGroupByName(e).index),this.isPlay()&&this.curPlayGroup--;var t=this.getAllGroups();this.curPlayGroup>t.length-1&&(this.curPlayGroup=0);for(var i=t[this.curPlayGroup],n=0;n<i.length;n++){i[n].play()}this.curPlayGroup++}}stop(){if(0!==this.goAnimations.length){for(var e=0;e<this.goAnimations.length;e++)this.goAnimations[e].stop();this.curPlayGroup=0}}pause(){if(0!==this.goAnimations.length){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x577f4c.PLAYING?(e=!0,this.goAnimations[t].pause()):this.goAnimations[t].stop();e&&this.curPlayGroup>0&&this.curPlayGroup--}}reset(){if(0!==this.goAnimations.length){for(var e=0;e<this.goAnimations.length;e++)this.goAnimations[e].reset();this.curPlayGroup=0}}isPlay(){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x577f4c.PLAYING&&(e=!0);return e}isPause(){for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].animationState===_0x577f4c.PAUSE&&(e=!0);return e}getAnimationTimeLength(e,t){var i=!1,n=0,r=0;for(let u=e-1;u>=0;u--){var o=t[u],a=o.startTime+o.duration;if(a>r&&(r=a),o.animationPlayType===_0x5a1aa1.PLAYAFTERLASTONE){i=!0;for(let e=u-1;e>=0;e--){var s=t[e],l=s.startTime+s.duration;l>n&&(n=l)}}}return{isExist:i,length1:n,length2:r}}getAllGroups(){var e=[];for(let n=0;n<this.goAnimations.length;n++){var t=this.goAnimations[n];if(t.animationPlayType===_0x5a1aa1.PLAYFROMNOW||0===n){var i=[];i.push(t),e.push(i)}else e[e.length-1].push(t)}return e}getAnimationGroup(e){var t=null,i=0,n=this.getAllGroups();for(let o=0;o<n.length;o++){var r=n[o];for(let n=0;n<r.length;n++)if(r[n].name===e.name){t=r,i=o;break}}return{index:i,group:t}}getAnimationGroupByName(e){var t=null,i=0,n=this.getAllGroups();for(let o=0;o<n.length;o++){var r=n[o];for(let n=0;n<r.length;n++)if(r[n].name===e){t=r,i=o;break}}return{index:i,group:t}}changeAnimationTime(e){if(!e||!this.getAnimationGroup(e).group)return!1;var t=this.getAnimationGroup(e).group;this.getAnimationGroup(e).index;var i=t.indexOf(e);if(e.animationPlayType===_0x5a1aa1.PLAYFROMNOW)e.startTime=e.delayTime;else if(e.animationPlayType===_0x5a1aa1.PLAYSAMELASTONE||e.animationPlayType===_0x5a1aa1.UNKNOWN)(n=this.getAnimationTimeLength(i,t)).isExist?e.startTime=n.length1+e.delayTime:e.startTime=e.delayTime;else if(e.animationPlayType===_0x5a1aa1.PLAYAFTERLASTONE){var n=this.getAnimationTimeLength(i,t);e.startTime=n.length2+e.delayTime}}moveAnimation(e,t){if(!(t<0||t>this.goAnimations.length)){var i=this.goAnimations.indexOf(e);if(i!==t){this.goAnimations=this.move(i,t);for(var n=0;n<this.goAnimations.length;n++){e=this.goAnimations[n];this.changeAnimationTime(e)}}}}move(e,t){var i=[].concat(this.goAnimations);return i.splice(t,0,i.splice(e,1)[0]),i}getAnimationDelayTime(e){if(!e||!this.getAnimationGroup(e).group)return!1;var t=0,i=this.getAnimationGroup(e).group;this.getAnimationGroup(e).index;var n=i.indexOf(e);if(e.animationPlayType===_0x5a1aa1.PLAYFROMNOW||0===n)t=e.startTime;else if(e.animationPlayType===_0x5a1aa1.PLAYAFTERLASTONE){var r=this.getAnimationTimeLength(n,i);t=e.startTime-r.length2}else if(e.animationPlayType===_0x5a1aa1.PLAYSAMELASTONE||e.animationPlayType===_0x5a1aa1.UNKNOW){var o=-1;for(let e=n;e>=0;e--){if(i[e].animationPlayType===_0x5a1aa1.PLAYAFTERLASTONE){o=e;break}}if(-1===o)t=e.startTime;else{r=this.getAnimationTimeLength(o,i);t=e.startTime-r.length2}}return t}}var _0x1e22bb=(_0x104292=!0,function(e,t){var i=_0x104292?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x104292=!1,i}),_0x165f10=_0x1e22bb(void 0,(function(){return _0x165f10.toString().search("(((.+)+)+)+$").toString().constructor(_0x165f10).search("(((.+)+)+)+$")})),_0x104292;_0x165f10();const _0x44d626=new Map;class _0x25263a extends GOAnimationManagerBase{constructor(e){super(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)),this._serverUrl=WebGLPlot.defaultValue(e.serverUrl,""),this._scene=WebGLPlot.defaultValue(e.scene,null),this._openEvoFileCompleted=new WebGLPlot.Event,this._openEvoFileFailed=new WebGLPlot.Event,this._saveEvoFileCompleted=new WebGLPlot.Event,this._saveEvoFileFailed=new WebGLPlot.Event,this.setScene(this._scene),this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},e.options&&e.options.serviceParams&&_0x2909c1.extend(this.options,e.options)}static getInstance(e){let t;return e.scene&&(t=_0x44d626.get(e.scene._plottingID)),WebGLPlot.defined(e)&&!WebGLPlot.defined(t)&&(t=new _0x25263a(e),_0x44d626.set(e.scene._plottingID,t)),t}createGOAnimation(e,t,i,n=!0,r=_0x5a1aa1.UNKNOWN){if(e===_0x144579.ANIMATION_WAY_GROUP){Array.isArray(i)||(i=[i]);for(let e=0;e<i.length;e++)if(!_0x2909c1.isSymbolDot(i[e]._symbolType))return null;return(o=this.createGOAnimationByType(e,t)).setGOFeatures(this,i)?(this.goAnimations.push(o),r!==_0x5a1aa1.UNKNOWN&&(o._animationPlayType=r),o):null}return WebGLPlot.defined(i)&&this.isCanCreateAnimation(e,i.symbolType)?null===(o=this.createGOAnimationByType(e,t))||null==i||i.symbolType===_0x1c668c.GROUPOBJECT||null===i||!WebGLPlot.defined(i)||0===i._libID&&i._code===_0x1c668c.SYMBOL_TEXT?null:o.setGOFeature(this,i)?(this.goAnimations.push(o),r!==_0x5a1aa1.UNKNOWN&&(o._animationPlayType=r),n&&_0x5ac1e1.getInstance().animationCreated.raiseEvent(o),o):null:null;var o}setScene(e){this._goAnimationLayer=new _0x5b011c("animation",e);var t=!1;if(WebGLPlot.defined(e.plotLayers)&&e.plotLayers instanceof WebGLPlot.PlotLayers)e.plotLayers.goAnimationLayer=this._goAnimationLayer,t=!0;else for(var i=0,n=e.primitives.length;i<n;i++){var r=e.primitives._primitives[i];if(WebGLPlot.defined(r)&&r instanceof WebGLPlot.PlotLayers){r.goAnimationLayer=this._goAnimationLayer,t=!0;break}}if(!t){var o=new WebGLPlot.PlotLayers;o.goAnimationLayer=this._goAnimationLayer,e.primitives.add(o),e.plotLayers=o}}createGOAnimationByType(e,t){if(null===t||""===t||null===this._goAnimationLayer||null!==this.findGOAnimationByName(t))return null;var i=null;switch(e){case _0x144579.ANIMATION_WAY:i=new _0x371aa9;break;case _0x144579.ANIMATION_BLINK:i=new _0x400916;break;case _0x144579.ANIMATION_ATTRIBUTE:i=new _0x224004;break;case _0x144579.ANIMATION_SHOW:i=new _0x1368e5;break;case _0x144579.ANIMATION_ROTATE:i=new _0x8d847f;break;case _0x144579.ANIMATION_SCALE:i=new _0x22137f;break;case _0x144579.ANIMATION_GROW:i=new _0x597fad;break;case _0x144579.ANIMATION_WAY_GROUP:i=new _0x269f67;break;case _0x144579.ANIMATION_REDUCE_EXP:i=new _0x1ecde6;break;case _0x144579.ANIMATION_GROW_EXP:i=new _0x17c29c;break;case _0x144579.ANIMATION_MOVEIN_EXP:i=new _0x2980fc;break;case _0x144579.ANIMATION_MOVEOUT_EXP:i=new _0x42ff63;break;case _0x144579.ANIMATION_HIDE_EXP:i=new _0xb1e5d0;break;case _0x144579.ANIMATION_SHOW_EXP:i=new _0x116c0b;break;case _0x144579.ANIMATION_BROKENLINE_EXP:i=new _0xe89a1c;break;case _0x144579.ANIMATION_CURVE_EXP:i=new _0x5b3a44;break;case _0x144579.ANIMATION_WAY_EXP:i=new _0x36afe8;break;case _0x144579.ANIMATION_BLINK_EXP:i=new _0x3884c0;break;case _0x144579.ANIMATION_ZOOMIN_EXP:i=new _0x5eeaa0;break;case _0x144579.ANIMATION_ZOOMOUT_EXP:i=new _0x2c95d7;break;default:return null}return null!==i&&(i._name=t,i._scene=this._scene),i}findGOAnimationByName(e){if(null===this.goAnimations||null===e||""===e)return null;for(var t=null,i=0;i<this.goAnimations.length;i++)if(this.goAnimations[i].name===e){t=this.goAnimations[i];break}return t}findGOAnimationByFeature(e){var t=[];if(0===this.goAnimations.length||null===e||!WebGLPlot.defined(e))return t;for(var i=this.goAnimations.length,n=0;n<i;n++)if(this.goAnimations[n]._goFeature._id===e._id){var r=this.goAnimations[n];t.push(r)}return t}findGOAnimationsByUuid(e){if(0===this.goAnimations.length||"undefined"===e||null===e)return[];var t=this.getFeatureByID(e);return this.findGOAnimationByFeature(t)}execute(){if(0===this.goAnimations.length)return!1;for(var e=!1,t=0;t<this.goAnimations.length;t++)this.goAnimations[t].execute()&&(e=!0);return e}removeGOAnimationByName(e){if(0===this.goAnimations.length||null===e||""===e)return!1;var t=this.findGOAnimationByName(e);return this.removeGOAnimation(t)}removeGOAnimationByFeature(e){if(0===this.goAnimations.length||null===e||!WebGLPlot.defined(e))return!1;let t=[];for(var i=[],n=this.goAnimations.length,r=0;r<n;r++){var o=this.goAnimations[r];if(o._goFeature&&o._goFeature._id!==e._id)i.push(o);else if(o._goFeature&&o._goFeature._id===e._id){for(var a=this.getAnimationGroup(o).group,s=this.getAnimationGroup(o).index+1;s<a.length;s++)this.changeAnimationTime(a[s]);t.push(o.name),o.destroy()}}return this.goAnimations=i,_0x5ac1e1.getInstance().animationDeleted.raiseEvent(t),!0}removeGOAnimation(e,t){if(0===this.goAnimations.length||null===e)return!1;void 0===t&&(t=!0);let i=e.name;for(var n=0;n<this.goAnimations.length;n++)if(this.goAnimations[n]===e){e.reset();var r=this.getAnimationGroup(e).group,o=this.getAnimationGroup(e).index;if(e.destroy(),e=null,this.goAnimations.splice(n,1),r.splice(o,1),null!==r){for(var a=o+1;a<r.length;a++){var s=r[a];this.changeAnimationTime(s)}break}}return t&&_0x5ac1e1.getInstance().animationDeleted.raiseEvent([i]),!0}removeAllGOAnimation(){if(0===this.goAnimations.length)return;let e=[];for(var t=0;t<this.goAnimations.length;t++)e.push(this.goAnimations[t].name),this.removeGOAnimation(this.goAnimations[t],!1);_0x5ac1e1.getInstance().animationDeleted.raiseEvent(e),this.goAnimations=[]}getPlottingLayers(){for(var e=[],t=this._scene,i=_0x2909c1.getPlotLayers(t),n=0;n<i._layerQueue.length;++n){var r=i.findByIndex(n);r instanceof _0x394df6&&e.push(r)}return e}getFeatureByID(e){for(var t=this.getPlottingLayers(),i=0;i<t.length;i++){var n=t[i].getFeatureByUuid(e);if(n)return n}}getAllAnimations(){return this.goAnimations}releaseSelection(){for(var e=this.getPlottingLayers(),t=0;t<e.length;t++)null!=e[t]._plottingEdit&&e[t]._plottingEdit.releaseSelection()}getJSONData(){for(var e={animations:[]},t=0;t<this.goAnimations.length;t++)e.animations.push(this.goAnimations[t].getJSONData());return e}fromJSONData(e){let t=0;if(e.AnimationGroups)for(var i=0,n=0;n<e.AnimationGroups.length;n++){for(var r=e.AnimationGroups[n],o=0,a=0;a<r.Animations.length;a++){var s=r.Animations[a],l=s.startTime+s.duration;o=l>o?l:o}this.Analysis(r.Animations,i),i+=o,t+=r.Animations.length}else t=e.animations.length,this.Analysis(e.animations,0);_0x5ac1e1.getInstance().animationJsonEnd.raiseEvent({animationNumber:t})}Analysis(e,t){for(var i=0;i<e.length;i++){var n=e[i],r="";n.goLayerUuid?r=n.goLayerUuid:n.goFeatureUuid&&(r=n.goFeatureUuid);var o=this.getFeatureByID(r),a=n.name,s=n.type,l=n.playType;if(o&&a&&-1!==s){var u=this.createGOAnimation(s,a,o,l);null!==u&&(n.startTime+=t,u.fromJSONData(n))}}}saveEvoFile(e,t){var i=this;function n(e){var t,n;e?i._saveEvoFileCompleted.raiseEvent(n):i._saveEvoFileFailed.raiseEvent(t)}var r=WebGLPlot.smlFileService(i._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="POST",o.sitData=this.getJSONData(),o.smlFileName=e,o.isCover=t,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}}openEvoFileOnServer(e){var t=this;var i=WebGLPlot.smlFileService(this._serverUrl,this.options.serviceParams);if(i){var n=i.editSmlFileParams;n.method="GET",n.smlFileName=e,i.smlFileService.editSMLFile(n,(function(e){var i;e.result&&e.result.succeed?(i=e.result,t.fromJSONData(i),t._openEvoFileCompleted.raiseEvent()):t._openEvoFileFailed.raiseEvent()}),this)}}buildUrl(e){var t=this._serverUrl,i=t.substr(t.length-1,1);return t+="/"===i?"smlInfos/":"/smlInfos/",t+=e+".json"}isCanCreateAnimation(e,t){return!(t===_0x1c668c.SYMBOL_DOT&&e===_0x144579.ANIMATION_GROW||t===_0x1c668c.SYMBOL_ALGO&&e===_0x144579.ANIMATION_SCALE)}}var _0x4f70e2=(_0x138eab=!0,function(e,t){var i=_0x138eab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x138eab=!1,i}),_0x3c181a=_0x4f70e2(void 0,(function(){return _0x3c181a.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c181a).search("(((.+)+)+)+$")})),_0x138eab;function _0x278499(){}_0x3c181a(),_0x278499.extend=function(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},_0x278499.copy=function(e,t){var i;if(e=e||{},t)for(var n in e)typeof(i=t[n])<"u"&&(e[n]=i)},_0x278499.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"==typeof e[t]&&e[t]instanceof Array){for(var i in e[t])e[t][i].destroy&&e[t][i].destroy();e[t].length=0}else"object"==typeof e[t]&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},_0x278499.getElement=function(){for(var e=[],t=0,i=arguments.length;t<i;t++){var n=arguments[t];if("string"==typeof n&&(n=document.getElementById(n)),1===arguments.length)return n;e.push(n)}return e},_0x278499.isElement=function(e){return!(!e||1!==e.nodeType)},_0x278499.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},_0x278499.removeItem=function(e,t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1);return e},_0x278499.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},_0x278499.modifyDOMElement=function(e,t,i,n,r,o,a,s){t&&(e.id=t),i&&(e.style.left=i.x+"px",e.style.top=i.y+"px"),n&&(e.style.width=n.w+"px",e.style.height=n.h+"px"),r&&(e.style.position=r),o&&(e.style.border=o),a&&(e.style.overflow=a),parseFloat(s)>=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},_0x278499.applyDefaults=function(e,t){e=e||{};var i="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!i&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!i&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},_0x278499.getParameterString=function(e){var t=[];for(var i in e){var n=e[i];if(null!=n&&"function"!=typeof n){var r;if("object"==typeof n&&n.constructor===Array){for(var o,a=[],s=0,l=n.length;s<l;s++)o=n[s],a.push(encodeURIComponent(o??""));r=a.join(",")}else r=encodeURIComponent(n);t.push(encodeURIComponent(i)+"="+r)}}return t.join("&")},_0x278499.urlAppend=function(e,t){var i=e;if(t){var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i},_0x278499.DEFAULT_PRECISION=14,_0x278499.toFloat=function(e,t){return null==t&&(t=_0x278499.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},_0x278499.rad=function(e){return e*Math.PI/180},_0x278499.lastSeqID=0,_0x278499.createUniqueID=function(e){return null==e&&(e="id_"),_0x278499.lastSeqID+=1,e+_0x278499.lastSeqID},_0x278499.Browser=function(){var e,t="",i="",n="pc",r=navigator.userAgent.toLowerCase();return r.indexOf("msie")>-1||r.indexOf("trident")>-1&&r.indexOf("rv")>-1?(t="msie",e=r.match(/msie ([\d.]+)/)||r.match(/rv:([\d.]+)/)):r.indexOf("chrome")>-1?(t="chrome",e=r.match(/chrome\/([\d.]+)/)):r.indexOf("firefox")>-1?(t="firefox",e=r.match(/firefox\/([\d.]+)/)):r.indexOf("opera")>-1?(t="opera",e=r.match(/version\/([\d.]+)/)):r.indexOf("safari")>-1&&(t="safari",e=r.match(/version\/([\d.]+)/)),i=e?e[1]:"",r.indexOf("ipad")>-1||r.indexOf("ipod")>-1||r.indexOf("iphone")>-1?n="apple":r.indexOf("android")>-1&&(i=(e=r.match(/version\/([\d.]+)/))?e[1]:"",n="android"),{name:t,version:i,device:n}},_0x278499.getBrowser=function(){var e,t="",i="",n="pc",r=navigator.userAgent.toLowerCase();return r.indexOf("msie")>-1||r.indexOf("trident")>-1&&r.indexOf("rv")>-1?(t="msie",e=r.match(/msie ([\d.]+)/)||r.match(/rv:([\d.]+)/)):r.indexOf("chrome")>-1?(t="chrome",e=r.match(/chrome\/([\d.]+)/)):r.indexOf("firefox")>-1?(t="firefox",e=r.match(/firefox\/([\d.]+)/)):r.indexOf("opera")>-1?(t="opera",e=r.match(/version\/([\d.]+)/)):r.indexOf("safari")>-1&&(t="safari",e=r.match(/version\/([\d.]+)/)),i=e?e[1]:"",r.indexOf("ipad")>-1||r.indexOf("ipod")>-1||r.indexOf("iphone")>-1?n="apple":r.indexOf("android")>-1&&(i=(e=r.match(/version\/([\d.]+)/))?e[1]:"",n="android"),{name:t,version:i,device:n}},_0x278499.isSupportCanvas=function(){var e=!0,t=_0x278499.getBrowser();return document.createElement("canvas").getContext?("firefox"===t.name&&parseFloat(t.version)<5&&(e=!1),"safari"===t.name&&parseFloat(t.version)<4&&(e=!1),"opera"===t.name&&parseFloat(t.version)<10&&(e=!1),"msie"===t.name&&parseFloat(t.version)<9&&(e=!1)):e=!1,e},_0x278499.supportCanvas=function(){return _0x278499.isSupportCanvas},_0x278499.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l},_0x278499.calculateDpi=function(e,t,i,n,r){if(e&&t&&i){var o,a=1e4,s=e.getWidth(),l=e.getHeight(),u=t.w,c=t.h;if(r=r||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){let e=s/u,t=l/c;o=254/(e>t?e:t)/i/(2*Math.PI*r/360)/a}else{o=254/(s/u)/i/a}return o}},_0x278499.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var i=[],n=0,r=t.length;n<r;n++)i.push(_0x278499.toJSON(t[n]));return"["+i.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){let e=[];for(let i=0,n=t.length;i<n;i++)e.push(_0x278499.toJSON(t[i]));return"["+e.join(",")+"]"}let e=[];for(let i in t)"function"!=typeof t[i]&&"CLASS_NAME"!==i&&"parent"!==i&&e.push("'"+i+"':"+_0x278499.toJSON(t[i]));return e.length>0?"{"+e.join(",")+"}":"{}"}return t.toString()}},_0x278499.getScaleFromResolutionDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r:-1},_0x278499.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},_0x278499.copyAttributes=function(e,t){if(e=e||{},t)for(var i in t){var n=t[i];void 0!==n&&"CLASS_NAME"!==i&&"function"!=typeof n&&(e[i]=n)}return e},_0x278499.copyAttributesWithClip=function(e,t,i){if(e=e||{},t)for(var n in t){var r=!1;if(i&&i.length)for(var o=0,a=i.length;o<a;o++)if(n===i[o]){r=!0;break}if(!0!==r){var s=t[n];void 0!==s&&"CLASS_NAME"!==n&&"function"!=typeof s&&(e[n]=s)}}return e},_0x278499.cloneObject=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date){let t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.slice(0);if(e instanceof Object){let i={};for(var t in e)e.hasOwnProperty(t)&&(i[t]=_0x278499.cloneObject(e[t]));return i}throw new Error("Unable to copy obj! Its type isn't supported.")},_0x278499.getTextBounds=function(e,t,i){document.body.appendChild(i),i.style.width="auto",i.style.height="auto",e.fontSize&&(i.style.fontSize=e.fontSize),e.fontFamily&&(i.style.fontFamily=e.fontFamily),e.fontWeight&&(i.style.fontWeight=e.fontWeight),i.style.position="relative",i.style.visibility="hidden",i.style.display="inline-block",i.innerHTML=t;var n=i.clientWidth,r=i.clientHeight;return document.body.removeChild(i),{textWidth:n,textHeight:r}},_0x278499.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=Util.toJSON(e[t]));var i=encodeURIComponent(e[t]);this.queryValues.push(i)}},issue:function(e){for(var t=this,i=t.getUid(),n=e.url,r=[],o=new Promise((function(e){t.supermap_callbacks[i]=function(n){delete t.supermap_callbacks[i],e(n)}})),a=n,s=0,l=t.queryKeys?t.queryKeys.length:0,u=0;u<l;u++)if(a.length+t.queryKeys[u].length+2>=t.limitLength){if(0==s)return!1;r.push(a),a=n,s=0,u--}else if(a.length+t.queryKeys[u].length+2+t.queryValues[u].length>t.limitLength)for(var c=t.queryValues[u];c.length>0;){var h=t.limitLength-a.length-t.queryKeys[u].length-2;a.indexOf("?")>-1?a+="&":a+="?";var d=c.substring(0,h);"%"===d.substring(h-1,h)?(h-=1,d=c.substring(0,h)):"%"===d.substring(h-2,h-1)&&(h-=2,d=c.substring(0,h)),a+=t.queryKeys[u]+"="+d,c=c.substring(h),d.length>0&&(r.push(a),a=n,s=0)}else s++,a.indexOf("?")>-1?a+="&":a+="?",a+=t.queryKeys[u]+"="+t.queryValues[u];return r.push(a),t.send(r,"Util.RequestJSONPPromise.supermap_callbacks["+i+"]",e&&e.proxy),o},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,i){var n=e.length;if(n>0)for(var r=(new Date).getTime(),o=0;o<n;o++){var a=e[o];a.indexOf("?")>-1?a+="&":a+="?",a+="sectionCount="+n,a+="§ionIndex="+o,a+="&jsonpUserID="+r,i&&(a=decodeURIComponent(a),a=i+encodeURIComponent(a)),fetchJsonp(a,{jsonpCallbackFunction:t,timeout:3e4})}},GET:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings(e.params),t.issue(e)},POST:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)},PUT:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)},DELETE:function(e){var t=this;return t.queryKeys.length=0,t.queryValues.length=0,t.addQueryStrings({requestEntity:e.data}),t.issue(e)}},_0x278499.urlPathAppend=function(e,t){let i=e;if(!t)return i;0===t.indexOf("/")&&(t=t.substring(1));const n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),i=""+n[0]+t+(n.length>1?"?"+n[1]:""),i};var _0x504b3e={observers:!1,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(e){return e.target||e.srcElement},isSingleTouch:function(e){return e.touches&&1===e.touches.length},isMultiTouch:function(e){return e.touches&&e.touches.length>1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var i=_0x504b3e.element(e);i.parentNode&&(!i.tagName||i.tagName.toUpperCase()!=t.toUpperCase());)i=i.parentNode;return i},observe:function(e,t,i,n){var r,o=(r=!0,function(e,t){var i=r?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return r=!1,i}),a=o(this,(function(){return a.toString().search("(((.+)+)+)+$").toString().constructor(a).search("(((.+)+)+)+$")}));a();var s=_0x278499.getElement(e);if(n=n||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||s.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!s._eventCacheID){var l="eventCacheID_";s.id&&(l=s.id+"_"+l),s._eventCacheID=_0x278499.createUniqueID(l)}var u=s._eventCacheID;this.observers[u]||(this.observers[u]=[]),this.observers[u].push({element:s,name:t,observer:i,useCapture:n}),s.addEventListener?s.addEventListener(t,i,n):s.attachEvent&&s.attachEvent("on"+t,i)},stopObservingElement:function(e){var t=_0x278499.getElement(e)._eventCacheID;this._removeElementObservers(_0x504b3e.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var i=e[t],n=new Array(i.element,i.name,i.observer,i.useCapture);_0x504b3e.stopObserving.apply(this,n)}},stopObserving:function(e,t,i,n){n=n||!1;var r=_0x278499.getElement(e),o=r._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||r.detachEvent)&&(t="keydown");var a=!1,s=_0x504b3e.observers[o];if(s)for(var l=0;!a&&l<s.length;){var u=s[l];if(u.name===t&&u.observer===i&&u.useCapture===n){s.splice(l,1),0==s.length&&delete _0x504b3e.observers[o],a=!0;break}l++}return a&&(r.removeEventListener?r.removeEventListener(t,i,n):r&&r.detachEvent&&r.detachEvent("on"+t,i)),a},unloadCache:function(){if(_0x504b3e&&_0x504b3e.observers){for(var e in _0x504b3e.observers){var t=_0x504b3e.observers[e];_0x504b3e._removeElementObservers.apply(this,[t])}_0x504b3e.observers=!1}},CLASS_NAME:"SuperMap.PlotEvent"};_0x504b3e.observe(window,"unload",_0x504b3e.unloadCache,!1);var _0x5b40bf=(_0x36652f=!0,function(e,t){var i=_0x36652f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x36652f=!1,i}),_0x364f8c=_0x5b40bf(void 0,(function(){return _0x364f8c.toString().search("(((.+)+)+)+$").toString().constructor(_0x364f8c).search("(((.+)+)+)+$")})),_0x36652f;_0x364f8c();class _0x421885{constructor(e,t,i,n,r){if(this.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"],this.listeners={},this.object=e,this.element=null,this.eventTypes=[],this.eventHandler=null,this.fallThrough=n,this.includeXY=!1,this.extensions={},this.extensionCount={},this.clearMouseListener=null,this.extend(this,r),null!=i)for(var o=0,a=i.length;o<a;o++)this.addEventType(i[o]);null!=t&&this.attachToElement(t),this.CLASS_NAME="SuperMap.Events"}destroy(){for(var e in this.extensions)"boolean"!=typeof this.extensions[e]&&this.extensions[e].destroy();this.extensions=null,this.element&&(_0x504b3e.stopObservingElement(this.element),this.element.hasScrollEvent&&_0x504b3e.stopObserving(window,"scroll",this.clearMouseListener)),this.element=null,this.listeners=null,this.object=null,this.eventTypes=null,this.fallThrough=null,this.eventHandler=null}addEventType(e){this.listeners[e]||(this.eventTypes.push(e),this.listeners[e]=[])}attachToElement(e){this.element?_0x504b3e.stopObservingElement(this.element):(this.eventHandler=FunctionExt.bindAsEventListener(this.handleBrowserEvent,this),this.clearMouseListener=FunctionExt.bind(this.clearMouseCache,this)),this.element=e;for(var t=0,i=this.BROWSER_EVENTS.length;t<i;t++){var n=this.BROWSER_EVENTS[t];this.addEventType(n),_0x504b3e.observe(e,n,this.eventHandler)}_0x504b3e.observe(e,"dragstart",_0x504b3e.stop)}on(e){for(var t in e)"scope"!==t&&void 0!==e[t]&&this.register(t,e.scope,e[t])}register(e,t,i,n){if(e in _0x421885&&!this.extensions[e]&&(this.extensions[e]=new _0x421885[e](this)),null!=i&&-1!==_0x278499.indexOf(this.eventTypes,e)){null==t&&(t=this.object);var r=this.listeners[e];r||(r=[],this.listeners[e]=r,this.extensionCount[e]=0);var o={obj:t,func:i};n?(r.splice(this.extensionCount[e],0,o),"object"===Events_typeof(n)&&n.extension&&this.extensionCount[e]++):r.push(o)}}registerPriority(e,t,i){this.register(e,t,i,!0)}un(e){for(var t in e)"scope"!==t&&void 0!==e.type&&this.unregister(t,e.scope,e[t])}unregister(e,t,i){null==t&&(t=this.object);var n=this.listeners[e];if(null!=n)for(var r=0,o=n.length;r<o;r++)if(n[r].obj===t&&n[r].func===i){n.splice(r,1);break}}remove(e){null!=this.listeners[e]&&(this.listeners[e]=[])}triggerEvent(e,t){var i=this.listeners[e];if(i&&0!=i.length){null==t&&(t={}),t.object=this.object,t.element=this.element,t.type||(t.type=e);for(var n,r=0,o=(i=i.slice()).length;r<o;r++){var a=i[r];if(null!=(n=a.func.apply(a.obj,[t]))&&!1===n)break}return this.fallThrough||_0x504b3e.stop(t,!0),n}}handleBrowserEvent(e){var t=e.type,i=this.listeners[t];if(i&&0!=i.length){var n=e.touches;if(n&&n[0]){for(var r,o=0,a=0,s=n.length,l=0;l<s;++l)o+=(r=n[l]).clientX,a+=r.clientY;e.clientX=o/s,e.clientY=a/s}this.includeXY&&(e.xy=this.getMousePosition(e)),this.triggerEvent(t,e)}}clearMouseCache(){this.element.scrolls=null,this.element.lefttop=null;var e=document.body;e&&(0==e.scrollTop&&0==e.scrollLeft||!navigator.userAgent.match(/iPhone/i))&&(this.element.offsets=null)}getMousePosition(e){if(this.includeXY?this.element.hasScrollEvent||(_0x504b3e.observe(window,"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0):this.clearMouseCache(),!this.element.scrolls){var t=_0x278499.getViewportElement();this.element.scrolls=[t.scrollLeft,t.scrollTop]}return this.element.lefttop||(this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0]),this.element.offsets||(this.element.offsets=_0x278499.pagePosition(this.element)),new Pixel(e.clientX+this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],e.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1])}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x4c41b1=(_0x247c37=!0,function(e,t){var i=_0x247c37?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x247c37=!1,i}),_0x1cf4d8=_0x4c41b1(void 0,(function(){return _0x1cf4d8.toString().search("(((.+)+)+)+$").toString().constructor(_0x1cf4d8).search("(((.+)+)+)+$")})),_0x247c37;_0x1cf4d8();class _0x4893d6{constructor(e,t){this.value=e||"",this.name=t||"token",this.CLASS_NAME="SuperMap.PlotCredential"}getUrlParameters(){return this.name+"="+this.value}getValue(){return this.value}destroy(){this.value=null,this.name=null}}var _0x450519=(_0x2588da=!0,function(e,t){var i=_0x2588da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2588da=!1,i}),_0x52d7dc=_0x450519(void 0,(function(){return _0x52d7dc.toString().search("(((.+)+)+)+$").toString().constructor(_0x52d7dc).search("(((.+)+)+)+$")})),_0x2588da;_0x52d7dc();var _0x6c7318={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function _0x1593de(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function _0x58f770(e){try{delete window[e]}catch{window[e]=void 0}}function _0x171408(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}var _0x20b2e4=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=e,n=t.timeout||_0x6c7318.timeout,r=t.jsonpCallback||_0x6c7318.jsonpCallback,o=void 0;return new Promise((function(a,s){var l=t.jsonpCallbackFunction||_0x1593de(),u=r+"_"+l;window[l]=function(e){a({ok:!0,json:function(){return Promise.resolve(e)}}),o&&clearTimeout(o),_0x171408(u),_0x58f770(l)},i+=-1===i.indexOf("?")?"?":"&";var c=document.createElement("script");c.setAttribute("src",""+i+r+"="+l),t.charset&&c.setAttribute("charset",t.charset),c.id=u,document.getElementsByTagName("head")[0].appendChild(c),o=setTimeout((function(){s(new Error("JSONP request to "+e+" timed out")),_0x58f770(l),_0x171408(u),window[l]=function(){_0x58f770(l)}}),n),c.onerror=function(){s(new Error("JSONP request to "+e+" failed")),_0x58f770(l),_0x171408(u),o&&clearTimeout(o)}}))},_0x212ccb=(_0x185049=!0,function(e,t){var i=_0x185049?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x185049=!1,i}),_0x4aa119=_0x212ccb(void 0,(function(){return _0x4aa119.toString().search("(((.+)+)+)+$").toString().constructor(_0x4aa119).search("(((.+)+)+)+$")})),_0x185049;_0x4aa119();const _0x4515ea=window.fetch;window.setCORS=function(e){window.CORS=e};var isCORS=window.isCORS=function(){return null!=window.CORS?window.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest};window.setRequestTimeout=function(e){return window.RequestTimeout=e};var getRequestTimeout=window.getRequestTimeout=function(){return window.RequestTimeout||45e3},_0x11db66={commit:function(e,t,i,n){switch(e=e&&e.toUpperCase()){case"GET":default:return this.get(t,i,n);case"POST":return this.post(t,i,n);case"PUT":return this.put(t,i,n);case"DELETE":return this.delete(t,i,n)}},supportDirectRequest:function(e,t){return!!_0x278499.isInTheSameDomain(e)||(null!=t.crossOrigin?t.crossOrigin:isCORS()||t.proxy)},get:function(e,t,i){i=i||{};if(e=_0x278499.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){var n={url:e=e.replace(".json",".jsonp"),data:t};return _0x278499.RequestJSONPPromise.GET(n)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")-1),t,i):this._fetch(e,t,i,"GET")},delete:function(e,t,i){i=i||{};var n="DELETE";if(e=_0x278499.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=DELETE",data:t};return _0x278499.RequestJSONPPromise.DELETE(r)}return this.urlIsLong(e)?this._postSimulatie(n,e.substring(0,e.indexOf("?")-1),t,i):this._fetch(e,t,i,n)},post:function(e,t,i){if(i=i||{},!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=POST",data:t};return _0x278499.RequestJSONPPromise.POST(n)}return this._fetch(this._processUrl(e,i),t,i,"POST")},put:function(e,t,i){if(i=i||{},e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=PUT",data:t};return _0x278499.RequestJSONPPromise.PUT(n)}return this._fetch(e,t,i,"PUT")},urlIsLong:function(e){for(var t=0,i=null,n=0,r=e.length;n<r;n++)(i=e.charCodeAt(n))<127?t++:128<=i&&i<=2047?t+=2:2048<=i&&i<=65535&&(t+=3);return!(t<2e3)},_postSimulatie:function(e,t,i,n){var r=t.indexOf("?")>-1?"&":"?";return t+=r+"_method="+e,"string"!=typeof i&&(i=JSON.stringify(i)),this.post(t,i,n)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var i=e.split("?");2===i.length&&(e=i[0]+".json?"+i[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,i,n){return(i=i||{}).headers=i.headers||{},!i.headers["Content-Type"]&&!FormData.prototype.isPrototypeOf(t)&&(i.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),i.timeout?this._timeout(i.timeout,_0x4515ea(e,{method:n,headers:i.headers,body:"PUT"===n||"POST"===n?t:void 0,credentials:this._getWithCredentials(i),mode:"cors",timeout:getRequestTimeout()}).then((function(e){return e}))):_0x4515ea(e,{method:n,body:"PUT"===n||"POST"===n?t:void 0,headers:i.headers,credentials:this._getWithCredentials(i),mode:"cors",timeout:getRequestTimeout()}).then((function(e){return e}))},_getWithCredentials:function(e){return!0===e.withCredentials?"include":!1===e.withCredentials?"omit":"same-origin"},_fetchJsonp:function(e,t){return t=t||{},_0x20b2e4()(e,{method:"GET",timeout:t.timeout}).then((function(e){return e}))},_timeout:function(e,t){return new Promise((function(i,n){setTimeout((function(){n(new Error("timeout"))}),e),t.then(i,n)}))},_getParameterString:function(e){var t=[];for(var i in e){var n,r=e[i];if(null!=r&&"function"!=typeof r)n=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(i)+"="+n)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}},_0x1342bf=(_0x499fc1=!0,function(e,t){var i=_0x499fc1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x499fc1=!1,i}),_0x19c4f8=_0x1342bf(void 0,(function(){return _0x19c4f8.toString().search("(((.+)+)+)+$").toString().constructor(_0x19c4f8).search("(((.+)+)+)+$")})),_0x499fc1;function _0xe25a5e(){}_0x19c4f8(),_0xe25a5e.bind=function(e,t){var i=Array.prototype.slice.apply(arguments,[2]);return function(){var n=i.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,n)}},_0xe25a5e.bindAsEventListener=function(e,t){return function(i){return e.call(t,i||window.event)}},_0xe25a5e.False=function(){return!1},_0xe25a5e.True=function(){return!0},_0xe25a5e.Void=function(){};var _0x3776cc=(_0x993474=!0,function(e,t){var i=_0x993474?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x993474=!1,i}),_0x49de7e=_0x3776cc(void 0,(function(){return _0x49de7e.toString().search("(((.+)+)+)+$").toString().constructor(_0x49de7e).search("(((.+)+)+)+$")})),_0x993474;_0x49de7e();class _0x16512b{constructor(e){this.data=null,this.keepData=!1,_0x278499.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format"}destroy(){}read(e){}write(e){}}var _0x1319ea=(_0x4d9536=!0,function(e,t){var i=_0x4d9536?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d9536=!1,i}),_0x4bfef9=_0x1319ea(void 0,(function(){return _0x4bfef9.toString().search("(((.+)+)+)+$").toString().constructor(_0x4bfef9).search("(((.+)+)+)+$")})),_0x4d9536;_0x4bfef9();class _0x4590c8 extends _0x16512b{constructor(e){super(e),this.indent=" ",this.space=" ",this.newline="\n",this.level=0,this.pretty=!1,this.nativeJSON=!(!window.JSON||"function"!=typeof JSON.parse||"function"!=typeof JSON.stringify),this.CLASS_NAME="SuperMap.Format.JSON",this.serialize={object:function(e){if(null==e)return"null";if(e.constructor===Date)return this.serialize.date.apply(this,[e]);if(e.constructor===Array)return this.serialize.array.apply(this,[e]);var t=["{"];this.level+=1;var i,n,r,o=!1;for(i in e)e.hasOwnProperty(i)&&(n=this.write.apply(this,[i,this.pretty]),r=this.write.apply(this,[e[i],this.pretty]),null!=n&&null!=r&&(o&&t.push(","),t.push(this.writeNewline(),this.writeIndent(),n,":",this.writeSpace(),r),o=!0));return this.level-=1,t.push(this.writeNewline(),this.writeIndent(),"}"),t.join("")},array:function(e){var t,i=["["];this.level+=1;for(var n=0,r=e.length;n<r;++n)null!=(t=this.write.apply(this,[e[n],this.pretty]))&&(n>0&&i.push(","),i.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,i.push(this.writeNewline(),this.writeIndent(),"]"),i.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,(function(e,i){var n=t[i];return n||(n=i.charCodeAt(),"\\u00"+Math.floor(n/16).toString(16)+(n%16).toString(16))}))+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}}}read(e,t){var i;if(this.nativeJSON)try{i=JSON.parse(e,t)}catch{}return this.keepData&&(this.data=i),i}write(e,t){this.pretty=!!t;var i=null,n=typeof e;if(this.serialize[n])try{i=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[n].apply(this,[e])}catch{}return i}writeIndent(){var e=[];if(this.pretty)for(var t=0;t<this.level;++t)e.push(this.indent);return e.join("")}writeNewline(){return this.pretty?this.newline:""}writeSpace(){return this.pretty?this.space:""}}var _0x5055ad=(_0x8ba2aa=!0,function(e,t){var i=_0x8ba2aa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8ba2aa=!1,i}),_0x48b070=_0x5055ad(void 0,(function(){return _0x48b070.toString().search("(((.+)+)+)+$").toString().constructor(_0x48b070).search("(((.+)+)+)+$")})),_0x8ba2aa;_0x48b070();class _0x5958f9{constructor(e,t){var i=this;this.EVENT_TYPES=["processCompleted","processFailed"],this.events=null,this.eventListeners=null,this.url=null,this.urls=null,this.proxy=null,this.index=null,this.length=null,this.options=null,this.totalTimes=null,this.POLLING_TIMES=3,this._processSuccess=null,this._processFailed=null,this.isInTheSameDomain=null,this.withCredentials=!1,Array.isArray(e)?(i.urls=e,i.length=e.length,i.totalTimes=i.length,1===i.length?i.url=e[0]:(i.index=parseInt(Math.random()*i.length),i.url=e[i.index])):(i.totalTimes=1,i.url=e),Array.isArray(e)&&!i.isServiceSupportPolling()&&(i.url=e[0],i.totalTimes=1),t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,this.extend(this,t),i.isInTheSameDomain=this.isInTheSameDomainFnc(i.url),i.events=new _0x421885(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){var e=this;_0x278499.isArray(e.urls)&&(e.urls=null,e.index=null,e.length=null,e.totalTimes=null),e.url=null,e.options=null,e._processSuccess=null,e._processFailed=null,e.isInTheSameDomain=null,e.EVENT_TYPES=null,e.events&&(e.events.destroy(),e.events=null),e.eventListeners&&(e.eventListeners=null)}request(e){var t=this;e.url=e.url||t.url,e.proxy=e.proxy||t.proxy,e.withCredentials=null!=e.withCredentials?e.withCredentials:t.withCredentials,e.crossOrigin=null!=e.crossOrigin?e.crossOrigin:t.crossOrigin,e.headers=e.headers||t.headers,e.isInTheSameDomain=t.isInTheSameDomain,e.url=this.appendCredential(e.url),t.calculatePollingTimes(),t._processSuccess=e.success,t._processFailed=e.failure,e.scope=t,e.success=t.getUrlCompleted,e.failure=t.getUrlFailed,t.options=e,t._commit(t.options)}getUrlCompleted(e){this._processSuccess(e)}getUrlFailed(e){var t=this;t.totalTimes>0?(t.totalTimes--,t.ajaxPolling()):t._processFailed(e)}ajaxPolling(){var e=this,t=e.options.url,i=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(i,i.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=this.isInTheSameDomainFnc(t),e._commit(e.options)}calculatePollingTimes(){var e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.times<e.totalTimes&&(e.totalTimes=e.times):e.totalTimes>e.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}isServiceSupportPolling(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}serviceProcessCompleted(e){e=_0x278499.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){var t=(e=_0x278499.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){if("POST"===e.method||"PUT"===e.method||"PATCH"===e.method)if(e.params&&(e.url=_0x278499.urlAppend(e.url,_0x278499.getParameterString(e.params||{}))),"object"==typeof e.data)try{e.params=_0x278499.toJSON(e.data)}catch{console.log("不是json对象")}else e.params=e.data;_0x11db66.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then((function(e){return e.text?e.text():e.json?e.json():e})).then((function(e){var t=e;return"string"==typeof e&&(t=(new _0x4590c8).read(e)),(!t||t.error||t.code>=300&&304!==t.code)&&(t=t&&t.error?{error:t.error}:{error:t}),t})).catch((function(e){return{error:e}})).then((function(t){t.error?(e.scope?_0xe25a5e.bind(e.failure,e.scope):e.failure)(t):(t.succeed=null==t.succeed||t.succeed,(e.scope?_0xe25a5e.bind(e.success,e.scope):e.success)(t))}))}isInTheSameDomainFnc(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}appendCredential(e){var t=e,i=this.getToken(e),n=i?new _0x4893d6(i,"token"):null;return n||(n=(i=this.getKey(e))?new _0x4893d6(i,"key"):null),n&&(t=this.urlAppend(t,n.getUrlParameters())),t}getToken(e){if(e){this.tokens=this.tokens||{};var t=this._getTokenStorageKey(e);return this.tokens[t]}}_getTokenStorageKey(e){var t=e.match(/(.*?):\/\/([^\/]+)/i);return t?t[0]:e}getKey(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;return this.keys[t]}_getUrlRestString(e){if(!e)return e;var t=e.match(/(http|https):\/\/(.*\/rest)/i);return t?t[0]:e}urlAppend(e,t){var i=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i}}var _0x34d202=(_0xf7bcc4=!0,function(e,t){var i=_0xf7bcc4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf7bcc4=!1,i}),_0x28d291=_0x34d202(void 0,(function(){return _0x28d291.toString().search("(((.+)+)+)+$").toString().constructor(_0x28d291).search("(((.+)+)+)+$")})),_0xf7bcc4;_0x28d291();class _0x476176 extends _0x5958f9{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.PlotCommonServiceBase"}destroy(){super.destroy()}_commit(e){("POST"===e.method||"PUT"===e.method)&&(e.params&&(e.url=SuperMap.Util.urlAppend(e.url,SuperMap.Util.getParameterString(e.params||{}))),e.params=e.data),_0x11db66.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then((function(e){return e.text()})).then((function(t){var i=(new _0x4590c8).read(t);(i||(i={error:t}),i.error)?(e.scope?_0xe25a5e.bind(e.failure,e.scope):e.failure)(i.error):(i.succeed=null==i.succeed||i.succeed,(e.scope?_0xe25a5e.bind(e.success,e.scope):e.success)(i))}))}}var _0xab01d4=(_0x4f9696=!0,function(e,t){var i=_0x4f9696?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4f9696=!1,i}),_0x7a61fe=_0xab01d4(void 0,(function(){return _0x7a61fe.toString().search("(((.+)+)+)+$").toString().constructor(_0x7a61fe).search("(((.+)+)+)+$")})),_0x4f9696;_0x7a61fe();class _0x53b796 extends _0x476176{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"symbolLibs.json?":"/symbolLibs.json?",this.CLASS_NAME="SuperMap.GetLibIDsService"}destroy(){super.destroy()}processAsync(){var e=this;e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x4767c5=(_0x28d63f=!0,function(e,t){var i=_0x28d63f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28d63f=!1,i}),_0x51cda9=_0x4767c5(void 0,(function(){return _0x51cda9.toString().search("(((.+)+)+)+$").toString().constructor(_0x51cda9).search("(((.+)+)+)+$")})),_0x28d63f;_0x51cda9();class GetLibInfoService extends _0x476176{constructor(e,t){super(e,t),(t=t||{})&&_0x278499.extend(this,t);var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"symbolLibs/":"/symbolLibs/",this.CLASS_NAME="SuperMap.GetLibInfoService"}destroy(){super.destroy()}processAsync(e){var t=this;e&&null!==e.libID&&(t.libID=e.libID),t.url+=t.libID,t.url+=".json",t.request({method:"GET",data:null,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}var _0x3c67e9=(_0x173e29=!0,function(e,t){var i=_0x173e29?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x173e29=!1,i}),_0x5d2594=_0x3c67e9(void 0,(function(){return _0x5d2594.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d2594).search("(((.+)+)+)+$")})),_0x173e29;function _0x5228e4(e,t){this.options=t,this.url=e}_0x5d2594(),_0x5228e4.prototype.getLibIDs=function(e,t){var i=this;return t||(t=i),new _0x53b796(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync(),i},_0x5228e4.prototype.getLibInfo=function(e,t,i){var n=this;return i||(i=n),new GetLibInfoService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n};const _0x4184ee=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3b8e42=_0x4184ee(void 0,(function(){return _0x3b8e42.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b8e42).search("(((.+)+)+)+$")}));function _0x51e0df(e){e=e||{},this.libID=e.libID,this.code=e.code,this.inputPoints=e.inputPoints?e.inputPoints:null,this.symbolRank=e.symbolRank?e.symbolRank:0,this.negativeImage=!!e.negativeImage&&e.negativeImage,this.surroundLineType=e.surroundLineType?e.surroundLineType:0,this.subSymbols=e.subSymbols?e.subSymbols:null,this.scaleValues=e.scaleValues?e.scaleValues:null,this.scalePoints=e.scalePoints?e.scalePoints:null,this.newScalePoint=e.newScalePoint?e.newScalePoint:null,this.newScalePointIndex=e.newScalePointIndex?e.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}_0x3b8e42(),_0x51e0df.prototype.destroy=function(){var e=this;e.libID=null,e.code=null,e.inputPoints=null,e.symbolRank=null,e.negativeImage=null,e.surroundLineType=null,e.subSymbols=null,e.scaleValues=null,e.scalePoints=null,e.newScalePoint=null,e.newScalePointIndex=null},_0x51e0df.toUrlParameters=function(e){if(e&&null!==e.libID&&null!==e.code){var t="libID="+encodeURIComponent(e.libID)+"&code="+encodeURIComponent(e.code);if(e.inputPoints&&null!==e.inputPoints&&0!==e.inputPoints.length){let i="[";for(let t=0;t<e.inputPoints.length;t++)t===e.inputPoints.length-1?i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"}]":i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"},";t+="&inputPoints="+encodeURIComponent(i)}if(e.scalePoints&&null!==e.scalePoints&&0!==e.scalePoints.length){let i="[";for(let t=0;t<e.scalePoints.length;t++)t===e.scalePoints.length-1?i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"}]":i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"},";t+="&scalePoints="+encodeURIComponent(i)}if(e.scaleValues&&null!==e.scaleValues&&0!==e.scaleValues.length){let i="[";for(let t=0;t<e.scaleValues.length;t++)t===e.scaleValues.length-1?i+=e.scaleValues[t]+"]":i+=e.scaleValues[t]+",";t+="&scaleValues="+encodeURIComponent(i)}if(e.subSymbols&&null!==e.subSymbols&&0!==e.subSymbols.length){let i="[";for(let t=0;t<e.subSymbols.length;t++)t===e.subSymbols.length-1?i+=e.subSymbols[t].code+"]":i+=e.subSymbols[t].code+",";t+="&subSymbols="+encodeURIComponent(i)}return e.newScalePoint&&null!==e.newScalePoint&&(t+="&newScalePoint="+encodeURIComponent('{"x":'+e.newScalePoint.x+', "y":'+e.newScalePoint.y+"}")),e.newScalePointIndex&&null!==e.newScalePointIndex&&(t+="&newScalePointIndex="+encodeURIComponent(e.newScalePointIndex)),e.symbolRank&&null!==e.symbolRank&&(t+="&symbolRank="+encodeURIComponent(e.symbolRank)),e.negativeImage&&null!==e.negativeImage&&(t+="&negativeImage="+encodeURIComponent(e.negativeImage)),e.surroundLineType&&null!==e.surroundLineType&&(t+="&surroundLineType="+encodeURIComponent(e.surroundLineType)),t}};var _0x4d13d1=(_0x353516=!0,function(e,t){var i=_0x353516?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x353516=!1,i}),_0x30d2af=_0x4d13d1(void 0,(function(){return _0x30d2af.toString().search("(((.+)+)+)+$").toString().constructor(_0x30d2af).search("(((.+)+)+)+$")})),_0x353516;function _0x467baf(e){this.cachecompleted=new WebGLPlot.Event,this.cachedSymbolList={},this.needCacheList=[],this.symbolNames=null,this.symbolLibData=null,this.plottingID=e.plottingID,this.cachedSymbolOK=!1,e&&_0x278499.extend(this,e),e&&e.url&&e.libID?(this.url=e.url,this.libID=e.libID):e&&e.symbolLibData&&(this.symbolLibData=e.symbolLibData,this.libID=this.symbolLibData.libID,this.initNeedCacheList())}_0x30d2af(),_0x467baf.prototype.initNeedCacheList=function(){if(!this.symbolLibData||!this.symbolLibData.rootSymbolLibNode)return!1;this.initNeedCacheListForNode(this.symbolLibData.rootSymbolLibNode)},_0x467baf.prototype.initNeedCacheListForNode=function(e,t){for(var i=0;i<e.childNodeCount;i++)"SYMBOL_GROUP"===e.childNodes[i].symbolNodeType?this.initNeedCacheListForNode(e.childNodes[i]):"SYMBOL_NODE"===e.childNodes[i].symbolNodeType&&this.needCacheList.push(e.childNodes[i].symbolCode)},_0x467baf.prototype.destroy=function(){this.url=null,this.libID=null,this.symbolLibData=null},_0x467baf.prototype.cachedSymbols=function(){var e=this;if(0!==this.needCacheList.length){for(var t=this.needCacheList.slice(),i=0,n=t.length;i<n;i++){var r=new _0x51e0df;r.libID=this.libID,r.code=t[i];var o=WebGLPlot.getServerData(this.libID,t[i],void 0,this.plottingID);if(!o)return;o.getSymbolInfo.events.on({processCompleted:a,processFailed:a,scope:e}),o.getSymbolInfo.processAsync(o.getSymbolInfoParameters)}this.cachedSymbolOK=!0}else this.cachecompleted.raiseEvent({success:!0});function a(t){t.result.succeed&&(e.cacheSymbolData(t.result),0===e.needCacheList.length&&e.cachecompleted.raiseEvent({success:!0}))}},_0x467baf.prototype.cacheSymbolData=function(e){var t=_0x278499.indexOf(this.needCacheList,e.code);-1!==t&&(this.cachedSymbolList[e.code]=SuperMapAlgoPlot.PlottingUtil.cloneObject(e),this.needCacheList.splice(t,1))},_0x467baf.prototype.getClassFication=function(){return null===this.symbolLibData?null:this.symbolLibData.classFication},_0x467baf.prototype.getCreateTime=function(){return null===this.symbolLibData?null:this.symbolLibData.createTime},_0x467baf.prototype.getCreator=function(){return null===this.symbolLibData?null:this.symbolLibData.creator},_0x467baf.prototype.getModifyTime=function(){return null===this.symbolLibData?null:this.symbolLibData.modifyTime},_0x467baf.prototype.getRootSymbolIconUrl=function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolIconUrl},_0x467baf.prototype.getRootSymbolInfo=function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolLibNode},_0x467baf.prototype.getSymbolCount=function(){return null===this.symbolLibData?null:this.symbolLibData.symbolCount},_0x467baf.prototype.getSymbolData=function(e){var t=null;return this.cachedSymbolList.hasOwnProperty(e)&&(t=SuperMapAlgoPlot.PlottingUtil.cloneObject(this.cachedSymbolList[e])),t},_0x467baf.prototype.setSymbolData=function(e){this.cacheSymbolData(e)},_0x467baf.prototype.getSymbolLibID=function(){return this.libID},_0x467baf.prototype.getSymbolLibName=function(){return null===this.symbolLibData?null:this.symbolLibData.symbolLibName},_0x467baf.prototype.getSymbolName=function(e){return null===this.symbolLibData?"":(null===this.symbolNames&&(this.symbolNames={},this.getSymbolNameFromList(this.symbolLibData.rootSymbolLibNode)),this.symbolNames[e])},_0x467baf.prototype.getVersion=function(){return null===this.symbolLibData?null:this.symbolLibData.version},_0x467baf.prototype.querySymbolbyKey=function(e){return this.querySymbol(e,this.getRootSymbolInfo(),this.getRootSymbolIconUrl())},_0x467baf.prototype.querySymbol=function(e,t,i){var n=[];if("SYMBOL_GROUP"===t.symbolNodeType)for(var r=0;r<t.childNodes.length;r++)for(var o=i+"/"+t.symbolName,a=this.querySymbol(e,t.childNodes[r],o),s=0;s<a.length;s++)n.push(a[s]);else(e===t.symbolCode.toString()||-1!==t.symbolName.indexOf(e))&&(t.icon=i+"/"+t.symbolCode+".png",n.push(t));return n};var _0x86f795=(_0x42231b=!0,function(e,t){var i=_0x42231b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42231b=!1,i}),_0x59d3f8=_0x86f795(void 0,(function(){return _0x59d3f8.toString().search("(((.+)+)+)+$").toString().constructor(_0x59d3f8).search("(((.+)+)+)+$")})),_0x42231b;_0x59d3f8();class _0x90ce{constructor(e){e=e||{},this.libID=e.libID,this.CLASS_NAME="SuperMap.GetLibInfoParameter"}destroy(){this.libID=null}}var _0x3c5eba=(_0x5d85da=!0,function(e,t){var i=_0x5d85da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d85da=!1,i}),_0x2a955d=_0x3c5eba(void 0,(function(){return _0x2a955d.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a955d).search("(((.+)+)+)+$")})),_0x5d85da;_0x2a955d();var _0x45d601=new Map;function _0x18c058(e,t){if(this.useServerData=!0,(!WebGLPlot.defined(e)||0===e.length)&&this.useServerData)throw new WebGLPlot.DeveloperError("url is required to initialize SymbolLibManager");this.url=e,this.libIDs=null,this.symbolLibs=[],this.symbolLibJsons=[],this.isInializeOK=!1,this.initializecompleted=new WebGLPlot.Event,this.cachecompleted=new WebGLPlot.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},t&&t.serviceParams&&_0x278499.extend(this.options,t),(!this.useServerData||!e||0===e.length)&&this.loadLocalLib()}_0x18c058.getInstance=function(e,t,i){let n=_0x45d601.get(i);return!WebGLPlot.defined(n)&&WebGLPlot.defined(i)&&(n=new _0x18c058(e,t),n.plottingID=i,_0x45d601.set(i,n)),n},_0x18c058.prototype.loadLocalLib=function(e){var t="js/plotPanelControl/LocalLib.json";WebGLPlot.defined(e)&&""!==e&&(t=e);var i=this;if(void 0===$.getJSON())throw new WebGLPlot.DeveloperError("jQuery is needed");$.getJSON(t,(function(e){(!WebGLPlot.defined(i.localSymbolLibData)||null===i.localSymbolLibData)&&(i.localSymbolLibData={}),i.localSymbolLibData[e.libID]=e}))},_0x18c058.prototype.initialize=function(e,t){this.url=e,null===this.libIDs&&(this.libIDs=[]),null===this.symbolLibs&&(this.symbolLibs=[]),null===this.symbolLibJsons&&(this.symbolLibJsons=[]),t&&_0x278499.extend(this,t)},_0x18c058.prototype.destroy=function(){this.url=null,this.libIDs=[],this.symbolLibs=[],this.symbolLibJsons=[],this.isInializeOK=!1,this.isInitialize=!1,this.localSymbolLibData={}},_0x18c058.prototype.initializeAsync=function(e){this.isInitializeOK()?this.initializecompleted.raiseEvent({success:!0,libIDs:this.libIDs}):this.isInitialize||(this.isInitialize=!0,new _0x5228e4(this.url,this.options.serviceParams).getLibIDs((function(t){if(!t.result||!t.result.succeed)throw _0x18c058.prototype.libIDs=[],new WebGLPlot.DeveloperError("Plotting Server is required to initialize SymbolLibManager");if(null!==this.libIDs&&0!==this.libIDs.length)for(var i=0;i<this.libIDs.length;i++){for(var n=!1,r=0;r<t.result.length;r++)if(this.libIDs[i]===t.result[r]){n=!0;break}!1===n&&this.libIDs.slice(i,1)}else this.libIDs=t.result;WebGLPlot.defined(e)||(e=!1),this.initializeSymbolLib(e)}),this))},_0x18c058.prototype.initializeSymbolLib=function(e){let t=this;for(var i=this.libIDs.slice(),n=0,r=this.libIDs.length;n<r;n++){let r=this.libIDs[n];var o=new _0x90ce;o.libID=r,new _0x5228e4(this.url,this.options.serviceParams).getLibInfo(o,(function(n){if(n.result.succeed){var o=_0x278499.indexOf(i,n.result.libID);if(-1!==o){i.splice(o,1);var a=t.getSymbolLibByLibId(r);WebGLPlot.defined(a)||(t.symbolLibJsons.push(n.result),(a=new _0x467baf({symbolLibData:n.result,plottingID:t.plottingID})).url=t.url,t.symbolLibs.push(a)),e&&a.cachedSymbols()}0===i.length&&(t.isInializeOK=!0,t.initializecompleted.raiseEvent({success:!0,libIDs:t.libIDs}))}}),this)}},_0x18c058.prototype.findSymbolByCode=function(e){for(var t=[],i=0;i<this.libIDs.length;i++)for(var n=this.getSymbolLibByLibId(this.libIDs[i]).querySymbolbyKey(e.toString()),r=0;r<n.length;r++)t.push(n[r]);return t},_0x18c058.prototype.findSymbolByName=function(e){for(var t=[],i=0;i<this.libIDs.length;i++)for(var n=this.getSymbolLibByLibId(this.libIDs[i]).querySymbolbyKey(e),r=0;r<n.length;r++)t.push(n[r]);return t},_0x18c058.prototype.getSymbolLibByIndex=function(e){return e>=this.libIDs.length?null:this.symbolLibs[e]},_0x18c058.prototype.getSymbolLibByLibId=function(e){for(var t=0;t<this.symbolLibs.length;t++)if(e===this.symbolLibs[t].libID)return this.symbolLibs[t];return null},_0x18c058.prototype.getSymbolLibID=function(e){return e>=this.libIDs.length?-1:this.libIDs[e]},_0x18c058.prototype.getSymbolLibJSONInfo=function(e){return e>=this.libIDs.length?null:this.symbolLibJsons[e]},_0x18c058.prototype.getSymbolLibNumber=function(){return this.libIDs.length},_0x18c058.prototype.getSymbolName=function(e,t){var i=this.getSymbolLibByLibId(e);return null===i?"":i.getSymbolName(t)},_0x18c058.prototype.getSymbolData=function(e,t){var i=this.getSymbolLibByLibId(e);return null===i?null:i.getSymbolData(t)},_0x18c058.prototype.setSymbolData=function(e,t){var i=this.getSymbolLibByLibId(e);if(null!==i&&WebGLPlot.defined(t)&&null!==t)i&&i.setSymbolData(t);else{var n=new _0x90ce;n.libID=e;let r=this;new _0x5228e4(this.url,this.options.serviceParams).getLibInfo(n,(function(e){e.result.succeed&&-1!==e.result.libID&&(r.symbolLibJsons.push(e.result),(i=new _0x467baf({symbolLibData:e.result,plottingID:r.plottingID})).url=r.url,i.setSymbolData(t),r.symbolLibs.push(i))}),this)}},_0x18c058.prototype.isInitializeOK=function(){return this.isInializeOK},_0x18c058.prototype.cacheSymbolLib=function(e){var t=this,i=this.getSymbolLibByLibId(e);i.cachecompleted.addEventListener((function(e){t.cachecompleted.raiseEvent({success:!0})})),null!==i&&i.cachedSymbols()};var _0x205818=(_0x30d6bb=!0,function(e,t){var i=_0x30d6bb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x30d6bb=!1,i}),_0x4e1299=_0x205818(void 0,(function(){return _0x4e1299.toString().search("(((.+)+)+)+$").toString().constructor(_0x4e1299).search("(((.+)+)+)+$")})),_0x30d6bb;_0x4e1299();var WebGLPlot$a=window.WebGLPlot=window.WebGLPlot||{};function _0x48d607(e,t,i){try{SuperMapAlgoPlot}catch{throw new WebGLPlot$a.DeveloperError("need include Build/Cesium/ThirdParty/Workers/PlotAlgo/PlotAlgoInclude.js ")}this._plottingID="PlottingID"+WebGLPlot$a.createGuid(),_0x48d607.serverUrl=e,this._scene=t,t._plottingID=this._plottingID,i&&i.serviceParams&&_0x2909c1.extend(this.options,i),this._symbolLibManager=_0x18c058.getInstance(e,void 0,this._plottingID),this._sitDataManager=WebGLPlot$a.SitDataManager.getInstance({scene:this._scene,serverUrl:e,options:this.options}),this._animationManager=_0x25263a.getInstance({serverUrl:e,scene:this._scene,options:this.options}),_0x48d607.defaultStyle=new WebGLPlot$a.DefaultStyle,WebGLPlot$a.S3MInstanceCollection&&(this.s3mInstanceColc=new WebGLPlot$a.S3MInstanceCollection(t._context),t.primitives.add(this.s3mInstanceColc),WebGLPlot$a.s3mInstanceColc.set(this._plottingID,this.s3mInstanceColc)),_0x48d607._AlgoSymoblPipelineDisMin=1e4,this._plotCollentionManager=_0x4786d3.getInstance(t)}_0x48d607.g_Plotting=_0x48d607.g_Plotting||new Map,WebGLPlot$a.s3mInstanceColc=WebGLPlot$a.s3mInstanceColc||new Map,_0x48d607.prototype.destroy=function(){this._scene.layers.remove("animation",!0),this._sitDataManager=null,this._animationManager=null,this._scene=null,_0x48d607.g_Plotting.clear()},_0x48d607.getInstance=function(e,t,i){let n=_0x48d607.g_Plotting.get(t._plottingID);return WebGLPlot$a.defined(e)&&WebGLPlot$a.defined(t)&&!WebGLPlot$a.defined(n)&&(n=new _0x48d607(e,t,i),_0x48d607.g_Plotting.set(n._plottingID,n)),n},_0x48d607.prototype.getSitDataManager=function(){return this._sitDataManager},_0x48d607.prototype.getSymbolLibManager=function(){return this._symbolLibManager},_0x48d607.prototype.getGOAnimationManager=function(){return this._animationManager},_0x48d607.prototype.getServerUrl=function(){return _0x48d607.serverUrl},_0x48d607.prototype.getDefaultStyle=function(){return _0x48d607.defaultStyle},_0x48d607.prototype.setAlgoUseDepthTest=function(e){this._plotCollentionManager&&this._plotCollentionManager.collentionLayer.createPolylineCollention(e)},_0x48d607.prototype.getAlgoUseDepthTest=function(){return!!this._plotCollentionManager&&this._plotCollentionManager.collentionLayer.polylineCollection._opaqueRS.depthMask},_0x48d607.prototype.getS3MCollection=function(){return this.s3mInstanceColc},WebGLPlot$a.Plotting=_0x48d607;const E$o=64;function d$s(e,t,i){i<2&&(i=2),this._initialWorldSize=t,this._maxDepth=i,this._octreeNodes=b$t(e,t,i,0),this._allObjects=[]}function v$m(e){return e$2e(e._boundingSphere)?e._boundingSphere:e._orientedBoundingBox}function b$t(e,t,i,n){var r=t/4,o=t/2,a=new Array([8]);let s=o$1p.add(e,new o$1p(-r,r,-r),new o$1p);a[0]=new h$n(s,o,i,n);let l=o$1p.add(e,new o$1p(r,r,-r),new o$1p);a[1]=new h$n(l,o,i,n);let u=o$1p.add(e,new o$1p(-r,r,r),new o$1p);a[2]=new h$n(u,o,i,n);let c=o$1p.add(e,new o$1p(r,r,r),new o$1p);a[3]=new h$n(c,o,i,n);let h=o$1p.add(e,new o$1p(-r,-r,-r),new o$1p);a[4]=new h$n(h,o,i,n);let d=o$1p.add(e,new o$1p(r,-r,-r),new o$1p);a[5]=new h$n(d,o,i,n);let f=o$1p.add(e,new o$1p(-r,-r,r),new o$1p);a[6]=new h$n(f,o,i,n);let p=o$1p.add(e,new o$1p(r,-r,r),new o$1p);return a[7]=new h$n(p,o,i,n),a}function I$p(e){var t=[];let i={};for(let n of e){let e=n._fileName;i[e]||(t.push(n),i[e]=1)}return t}function h$n(e,t,i,n){this._center=u$Z(e,1),this._baseSize=u$Z(t,1),this._depth=u$Z(n,0),this._maxDepth=u$Z(i,2),this._bound=new e$29(z$m(this._center,this._baseSize),x$p(this._center,this._baseSize),this._center),this._objects=[],this._children=[]}function z$m(e,t){return new o$1p(e.x-.5*t,e.y-.5*t,e.z-.5*t)}function x$p(e,t){return new o$1p(e.x+.5*t,e.y+.5*t,e.z+.5*t)}function T$m(e,t,i){let n=e.x;n=n>i.x?i.x:n,n=n<t.x?t.x:n;let r=e.y;r=r>i.y?i.y:r,r=r<t.y?t.y:r;let o=e.z;return o=o>i.z?i.z:o,o=o<t.z?t.z:o,new o$1p(n,r,o)}function V$j(e,t){let i=e.x-t.x,n=e.y-t.y,r=e.z-t.z;return i*i+n*n+r*r}function B$h(e,t){let i=t;e$2e(t.radius)||(i=new i$1d,i$1d.fromOrientedBoundingBox(t,i));var n=new o$1p;return n=T$m(i.center,e.minimum,e.maximum),V$j(i.center,n)<=i.radius*i.radius}d$s.prototype.debugObjectCounts=function(){var e=new Set;for(let t=0;t<this._octreeNodes.length;t++)this._octreeNodes[t].debugobjects(e);console.log(e.size)},d$s.prototype.addEntity=function(e){var t=v$m(e),i=!1;for(let r=0;r<this._octreeNodes.length;r++){var n=this._octreeNodes[r];i|=n.addNode(e,t)}i&&this._allObjects.push(e)},d$s.prototype.removeEntity=function(e){if(null==e)return!1;var t=!1,i=this._allObjects(e);i>-1&&(this._allObjects.splice(i,1),t=!0);for(let t=0;t<this._octreeNodes.length;t++){var n=this._octreeNodes[t];n.remove(e)}return t},d$s.prototype.getWithinFrustum=function(e){var t=[];const i=e.planes;for(let e=0,r=i.length;e<r;++e){var n=o$1m.fromCartesian4(i[e],void 0);t.push(n)}var r=[];for(let e=0;e<this._octreeNodes.length;e++){var o=this._octreeNodes[e];o.select(t,r)}return r=I$p(r)},d$s.prototype.setObjectsVisible=function(e){var t=[];const i=e.planes;for(let e=0,r=i.length;e<r;++e){var n=o$1m.fromCartesian4(i[e],void 0);t.push(n)}for(let e=0;e<this._octreeNodes.length;e++){var r=this._octreeNodes[e];r.setVisible(t,Ae$w.INTERSECTING)}},h$n.prototype.innerSplit=function(){this._children=b$t(this._center,this._baseSize,this._maxDepth,this._depth+1);for(var e=0;e<8;e++){this._children[e].addObjects(this._objects)}this._objects=[]},h$n.prototype.addNode=function(e,t){if(this._children.length>0){for(var i=!1,n=0;n<this._children.length;n++){i|=this._children[n].addNode(e,t)}return i}var r=!1;return B$h(this._bound,t)&&2*t.radius<=this._baseSize&&(this._objects.push(e),r=!0),this._depth<this._maxDepth&&this._objects.length>E$o&&this.innerSplit(),r},h$n.prototype.addObjects=function(e){for(let n=0;n<e.length;n++){var t=e[n],i=v$m(t);this.addNode(t,i)}},h$n.prototype.remove=function(e){if(this._children.length>0)for(var t=0;t<this._children.length;t++){this._children[t].remove(e)}let i=!1;var n=this._objects.indexOf(e);return n>-1&&(this._objects.splice(n,1),i=!0),i},h$n.prototype.select=function(e,t){if(this.computeVisibility(e)!==Ae$w.OUTSIDE){if(this._children.length>0){for(let n=0;n<this._children.length;n++){var i=this._children[n];i.select(e,t)}return}for(var n=0;n<this._objects.length;n++){var r=this._objects[n];r.isVisible=!0,e$2e(r._parentPagelod)&&(r._parentPagelod._isVisible=!0),t.push(r)}}},h$n.prototype.setVisible=function(e,t){var i=t;if(t===Ae$w.OUTSIDE)for(var n=0;n<this._objects.length;n++){(r=this._objects[n])._isVisible=!1}else{t===Ae$w.INTERSECTING&&(i=this.computeVisibility(e));for(n=0;n<this._objects.length;n++){var r;(r=this._objects[n])._isVisible=!0,e$2e(r._parentPagelod)&&(r._parentPagelod._isVisible=!0)}}if(this._children.length>0)for(let t=0;t<8;t++)this._children[t].setVisible(e,i)},h$n.prototype.bestFitChild=function(e){return(e.x<=this._center.x?0:1)+(e.y>=this._center.y?0:4)+(e.z<=this._center.z?0:2)},h$n.prototype.computeVisibility=function(e){const t=e;var i=!1;for(let e=0,n=t.length;e<n;++e){const n=this._bound.intersectPlane(t[e]);if(n===Ae$w.OUTSIDE)return Ae$w.OUTSIDE;n===Ae$w.INTERSECTING&&(i=!0)}return i?Ae$w.INTERSECTING:Ae$w.INSIDE},h$n.prototype.debugobjects=function(e){for(let t=0;t<this._objects.length;t++)e.add(this._objects[t]._fileName);for(let t=0;t<this._children.length;t++)this._children[t].debugobjects(e)};var x$o="uniform sampler2D u_floatTexture;\nvoid main()\n{\nfloat actual = texture2D(u_floatTexture, vec2(0.5, 0.5)).r;\nfloat expected = 123456.0;\ngl_FragColor = vec4(abs(actual - expected), 0.0, 0.0, 1.0);\n}\n";function f$n(e){this._context=e}var i$l,R$k=new i$$({primitiveType:W$18.TRIANGLES}),D$j=new t$W({color:new e$1X(0,0,0,0)});function M$n(e,t){return new t$V({context:e,colorTextures:[t],destroyAttachments:!1})}function Q$i(e,t,i){return r$14.fromCache({name:t,context:e,vertexShaderSource:ot$8,fragmentShaderSource:i,attributeLocations:{position:0,textureCoordinates:1}})}function F$i(e,t){return(!e$2e(i$l)||i$l.viewport.width!==e||i$l.viewport.height!==t)&&(i$l=d$1m.fromCache({viewport:new f$1a(0,0,e,t)})),i$l}function r$p(e){if(!e.floatingPointTexture)return!1;var t=new f$n(e),i=new t$U({context:e,width:1,height:1,pixelFormat:V$12.RGBA}),n=new t$U({context:e,width:1,height:1,pixelFormat:V$12.RGBA,pixelDatatype:r$p._getFloatPixelType(),source:{width:1,height:1,arrayBufferView:r$p._getArray([123456,0,0,0])}}),r=new t$V({context:e,colorTextures:[i],destroyAttachments:!1}),o={framebuffer:r,x:0,y:0,width:1,height:1},a=!1,s=new t$H({name:"CheckFloatTexturePrecision",fragmentShaderSource:x$o,outputTexture:i,uniformMap:{u_floatTexture:function(){return n}},persists:!1,postExecute:function(){var t=e.readPixels(o);a=0===t[0]}});return s.execute(t),t.destroy(),r.destroy(),a}function t$g(e){this._renderTexture=new s$M(e),this._renderTexture._pixelDatatype=_$_.UNSIGNED_BYTE,this._context=e,this._isUpdate=!0,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0};var t=e._gl,i=e$2e(e._currentFramebuffer)?e._currentFramebuffer._framebuffer:null;e.webgpu||t.bindFramebuffer(t.FRAMEBUFFER,i)}function a$i(e){this._context=e,this._frameBuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._upSampleWidth=Math.max(Math.pow(2,Math.ceil(Math.log(e.drawingBufferWidth)/Math.log(10))),8),this._upSampleHeight=Math.max(Math.pow(2,Math.ceil(Math.log(e.drawingBufferHeight)/Math.log(10))),8),this._upSampleViewport=new f$1a(0,0,this._upSampleWidth,this._upSampleHeight)}f$n.prototype.execute=function(e){if(o$1q.defined("computeCommand",e),e$2e(e.preExecute)&&e.preExecute(e),!e$2e(e.fragmentShaderSource)&&!e$2e(e.shaderProgram))throw new t$15("computeCommand.fragmentShaderSource or computeCommand.shaderProgram is required.");o$1q.defined("computeCommand.outputTexture",e.outputTexture);var t=e.outputTexture,i=t.width,n=t.height,r=this._context,o=e$2e(e.vertexArray)?e.vertexArray:r.getViewportQuadVertexArray(),a=e$2e(e.shaderProgram)?e.shaderProgram:Q$i(r,e.name,e.fragmentShaderSource),s=M$n(r,t),l=u$Z(e.renderState,F$i(i,n)),u=e.uniformMap;if(e.clear){var c=D$j;c.framebuffer=s,c.renderState=l,c.execute(r)}var h=R$k;h.vertexArray=o,h.count=void 0,h.renderState=l,h.shaderProgram=a,h.uniformMap=u,h.framebuffer=s,h.execute(r),s.destroy(),e.persists||(a.destroy(),e$2e(e.vertexArray)&&o.destroy()),e$2e(e.postExecute)&&e.postExecute(t)},f$n.prototype.isDestroyed=function(){return!1},f$n.prototype.destroy=function(){return i$11(this)},r$p._getFloatPixelType=function(){return _$_.FLOAT},r$p._getArray=function(e){return new Float32Array(e)},Object.defineProperties(t$g.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 32},set:function(e){}},frameBufferType:{get:function(){return Qe$c.CLAMP}}}),t$g.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},t$g.prototype.end=function(e){this._isUpdate=!0},t$g.prototype.update=function(e,t){},t$g.prototype.isDestroyed=function(){return!1},t$g.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)};var Q$h=new e$2c,U$k=new e$2c(1,1/255,1/65025,1/16581375);function C$m(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function v$l(e){e._frameBuffer=e._frameBuffer&&!e._frameBuffer.isDestroyed()&&e._frameBuffer.destroy()}function Y$e(e,t){e._depthTexture=new t$U({context:t,width:e._upSampleWidth,height:e._upSampleHeight,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE})}function q$i(e,t){C$m(e),v$l(e),Y$e(e,t),e._frameBuffer=new t$V({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function J$d(e,t){(!e$2e(e._frameBuffer)||!e$2e(e._depthTexture))&&q$i(e,t)}function K$e(e,t,i){if(!e$2e(e._copyDepthCommand)){e._copyDepthCommand=t.createViewportQuadCommand("uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = czm_packDepth(texture2D(u_texture, v_textureCoordinates).r);\n}\n",{renderState:d$1m.fromCache({viewport:e._upSampleViewport}),uniformMap:{u_texture:function(){return e._textureToCopy}},owner:e})}e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._frameBuffer,e$2e(e._clearCommand)||(e._clearCommand=new t$W({color:new e$1X(0,0,0,1),stencil:0,depth:1,owner:e})),e._clearCommand.framebuffer=e._frameBuffer}a$i.prototype.end=function(e,t,i){for(var n,r=e._context,o=r.drawingBufferWidth,a=r.drawingBufferHeight,s=this._upSampleWidth,l=this._upSampleHeight,u=Math.max(s,l),c=u*u,h=Math.floor(t/o*s),d=Math.floor(i/a*l),f=0,p=0,_=0,m=-1,g=this._frameBuffer,x=r.readPixels({x:0,y:0,width:s,height:l,framebuffer:g}),y=0,v=0;v<c;++v){if(-h<=f&&f<=h&&-d<=p&&p<=d){var $=4*((d-p)*s+f+h);if(n=e$2c.unpack(x,$,Q$h),e$2c.divideByScalar(n,255,n),(y=e$2c.dot(n,U$k))>0&&y<1)break}if(f===p||f<0&&-f===p||f>0&&f===1-p){var b=_;_=-m,m=b}f+=_,p+=m}if(y>0&&y<1&&e._frustumCommandsList.length>0){var T=e._frustumCommandsList[0];e._context.uniformState.updateFrustum(T);var C=new o$1o(t,i);return s$R.drawingBufferToWgs84Coordinates(e,C,y,new o$1p)}},a$i.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},a$i.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},a$i.prototype.clear=function(e,t){this._clearCommand.execute(e,t)},a$i.prototype.update=function(e,t){J$d(this,e),K$e(this,e,t)},a$i.prototype.isDestroyed=function(){return!1},a$i.prototype.destroy=function(){return C$m(this),v$l(this),this._copyDepthCommand.shaderProgram=e$2e(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy(),i$11(this)};var D$i="attribute aPosition : vec4<f32>;\nattribute textureCoordinates : vec2<f32>;\nvarying v_textureCoordinates : vec2<f32>;\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs { \n gl_Position = aPosition;\n v_textureCoordinates = textureCoordinates;\n}\n";function h$m(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}function T$l(e){const t=Object.keys(e).sort();return JSON.stringify(e,t)}function _$j(e,t){for(var i=t.derivedKeywords,n=i.length,r=0;r<n;++r){var o=i[r]+t.keyword;_$j(e,e._shaders[o])}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}function r$o(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}function i$k(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.color=e$2e(e.color)?e$1X.clone(e.color):e$1X.WHITE,this.intensity=u$Z(e.intensity,2)}Object.defineProperties(h$m.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}}),h$m.prototype.replaceShaderProgram=function(e){return e$2e(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)},h$m.prototype.getShaderProgram=function(e){var t=e.vertexShaderSource,i=e.fragmentShaderSource,n=e.attributeLocations,r=e.varyings,o=e.bufferMode,a=u$Z(e.useWGSL,!1);"string"==typeof t?t=new s$V({sources:[t],useWGSL:a}):!0===t.useWGSL&&(a=!0),"string"==typeof i?i=new s$V({sources:[i],useWGSL:a}):!0===i.useWGSL&&(a=!0);const s=t.getCacheKey(this._context),l=i.getCacheKey(this._context),u=e$2e(n)?T$l(n):"",c=`${s}:${l}:${u}`,h=this._getShaderProgramName(e,u,t,i);var d;if(e$2e(this._shaders[c]))d=this._shaders[c],delete this._shadersToRelease[c];else{const s=t.createCombinedVertexShader(this._context),l=i.createCombinedFragmentShader(this._context);var f=this._context,p=new(f.webgpu?m$$:g$1a)({context:f,gl:f._gl,logShaderCompilation:f.logShaderCompilation,debugShaders:f.debugShaders,vertexShaderSource:t,vertexShaderText:s,fragmentShaderSource:i,fragmentShaderText:l,attributeLocations:n,transformFeedbackVaryings:e.transformFeedbackVaryings,varyings:r,bufferMode:o,name:h,useWGSL:a});d={cache:this,shaderProgram:p,keyword:c,derivedKeywords:[],count:0},p._cachedShader=d,this._shaders[c]=d,++this._numberOfShaders}return++d.count,d.shaderProgram},h$m.prototype._getShaderProgramName=function(e,t,i,n){if(e$2e(e.name))return e.name;return`${i._getKeyForShaderProgramName()}:${n._getKeyForShaderProgramName()}:${t}`},h$m.prototype.replaceDerivedShaderProgram=function(e,t,i){var n=e._cachedShader,r=t+n.keyword,o=this._shaders[r];if(e$2e(o)){_$j(this,o);var a=n.derivedKeywords.indexOf(t);a>-1&&n.derivedKeywords.splice(a,1)}return this.createDerivedShaderProgram(e,t,i)},h$m.prototype.getDerivedShaderProgram=function(e,t){var i=t+e._cachedShader.keyword,n=this._shaders[i];if(e$2e(n))return n.shaderProgram},h$m.prototype.createDerivedShaderProgram=function(e,t,i){var n=e._cachedShader,r=t+n.keyword,o=i.vertexShaderSource,a=i.fragmentShaderSource,s=i.attributeLocations,l=i.varyings,u=i.bufferMode;"string"==typeof o&&(o=new s$V({sources:[o]})),"string"==typeof a&&(a=new s$V({sources:[a]}));var c=this._context,h=o.createCombinedVertexShader(c),d=a.createCombinedFragmentShader(c),f=new(c.webgpu?m$$:g$1a)({context:c,gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:o,vertexShaderText:h,fragmentShaderSource:a,fragmentShaderText:d,attributeLocations:s,transformFeedbackVaryings:i.transformFeedbackVaryings,varyings:l,bufferMode:u,name:e.name+t,useWGSL:o.useWGSL}),p={cache:this,shaderProgram:f,keyword:r,derivedKeywords:[],count:0};return n.derivedKeywords.push(t),f._cachedShader=p,this._shaders[r]=p,f},h$m.prototype.destroyReleasedShaderPrograms=function(){var e=this._shadersToRelease;for(var t in e)if(e.hasOwnProperty(t)){_$j(this,e[t]),--this._numberOfShaders}this._shadersToRelease={}},h$m.prototype.releaseShaderProgram=function(e){if(e$2e(e)){var t=e._cachedShader;t&&0==--t.count&&(this._shadersToRelease[t.keyword]=t)}},h$m.prototype.isDestroyed=function(){return!1},h$m.prototype.destroy=function(){var e=this._shaders;for(var t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return i$11(this)},Object.defineProperties(r$o.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}}),r$o.prototype.getTexture=function(e){var t=this._textures[e];if(e$2e(t))return delete this._texturesToRelease[e],++t.count,t.texture},r$o.prototype.addTexture=function(e,t){var i={texture:t,count:1};t.finalDestroy=t.destroy;var n=this;t.destroy=function(){0==--i.count&&(n._texturesToRelease[e]=i)},this._textures[e]=i,++this._numberOfTextures},r$o.prototype.destroyReleasedTextures=function(){var e=this._texturesToRelease;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];delete this._textures[t],i.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}},r$o.prototype.isDestroyed=function(){return!1},r$o.prototype.destroy=function(){var e=this._textures;for(var t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return i$11(this)};const _0x19ee54=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x455fd2=_0x19ee54(void 0,(function(){return _0x455fd2.toString().search("(((.+)+)+)+$").toString().constructor(_0x455fd2).search("(((.+)+)+)+$")}));function _0x3261f9(e){var t=_0x37a515.call(this)||this;t._name=_0x2e0417.LIGHT,t._uniformState=e,t._lightGridTableTexture=void 0,t._globalLightListTexture=void 0}_0x455fd2();const _0x2ca6aa="uLightGridTexture",_0x584a7d="uGlobalLightListTexture";_0x37a515&&(_0x3261f9.__proto__=_0x37a515),_0x3261f9.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x3261f9.prototype.constructor=_0x37a515,Object.defineProperties(_0x3261f9.prototype,{lightGridTexture:{get:function(){return this._lightGridTableTexture},set:function(e){this._lightGridTableTexture=e,this._isTextureDirty=!0}},globalLightListTexture:{get:function(){return this._globalLightListTexture},set:function(e){this._globalLightListTexture=e,this._isTextureDirty=!0}}}),_0x3261f9.prototype._initUBOStruct=function(){this._ubo.addUniform("uPointLightPositionEC",3,s$J.MaxPointLightCount),this._ubo.addUniform("uPointLightColor",3,s$J.MaxPointLightCount),this._ubo.addUniform("uPointLightDistanceAndDecay",4,s$J.MaxPointLightCount),this._ubo.addUniform("uSpotLightColorAndExponent",4,s$J.MaxSpotLightCount),this._ubo.addUniform("uSpotLightPositionEC",3,s$J.MaxSpotLightCount),this._ubo.addUniform("uSpotLightDirectionEC",3,s$J.MaxSpotLightCount),this._ubo.addUniform("uSpotLightDistanceDecayCosPenumbra",4,s$J.MaxSpotLightCount),this._ubo.addUniform("uDirectionalLightDirectionEC",3,s$J.MaxDirectionLightCount),this._ubo.addUniform("uDirectionalLightDirection",3,s$J.MaxDirectionLightCount),this._ubo.addUniform("uDirectionalLightColor",3,s$J.MaxDirectionLightCount),this._ubo.addUniform("uAmbientLightColor",4),this._ubo.addUniform("uSunLightColor",4),this._ubo.addUniform("uSunDirectionEC",3),this._ubo.addUniform("uSkyColor",3),this._ubo.addUniform("uGroundColor",3),this._ubo.addUniform("uSunLightON",1),this._ubo.addUniform("uPointLightCount",1),this._ubo.addUniform("uSpotLightCount",1),this._ubo.addUniform("uDirLightCount",1)},_0x3261f9.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):e.webgpu&&(this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1)),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},new o$1o;const _0x102caf=new o$1o,_0x1dd875=new e$2c;_0x3261f9.prototype.update=function(e){const t=e.context,i=e.lightSource;if(!t.webgpu&&!t.webgl2)return void this._initUniformMap(t,i);e$2e(this._ubo)||this._initUBO(t);const n=this._ubo;var r=i.ambientLightColor,o=i.sunLightColor;n.updateFloat4("uAmbientLightColor",r.red,r.green,r.blue,r.alpha),n.updateFloat4("uSunLightColor",o.red,o.green,o.blue,o.alpha),n.updateFloat("uSunLightON",i.sunLightON),_0x37a515.writeCartesian3ToUBO("uSunDirectionEC",this._ubo,this._uniformState.sunDirectionEC);let a=i.directionalLight.values,s=a.length;if(s=Math.min(s,s$J.MaxDirectionLightCount),s>0){const e=[],t=[],i=[];for(let n=0;n<s;n++){const r=a[n],o=r.lightColor;o$1p.pack(r.directionEC,e,3*n),o$1p.pack(r.direction,t,3*n),_0x102caf.x=o.red,_0x102caf.y=o.green,_0x102caf.z=o.blue,o$1p.pack(_0x102caf,i,3*n)}n.updateInt("uDirLightCount",s),n.updateFloatArray("uDirectionalLightDirectionEC",e),n.updateFloatArray("uDirectionalLightDirection",t),n.updateFloatArray("uDirectionalLightColor",i)}if(a=i._visibleLightList[_0x4970c2.POINT].values,s=a.length,s=Math.min(s,s$J.MaxPointLightCount),s>0){const e=[],t=[],i=[];for(let n=0;n<s;n++){const r=a[n],o=r.lightColor;o$1p.pack(r.positionEC,e,3*n),_0x102caf.x=o.red,_0x102caf.y=o.green,_0x102caf.z=o.blue,o$1p.pack(_0x102caf,t,3*n),_0x1dd875.x=r.cutoffDistance,_0x1dd875.y=r.decay,_0x1dd875.z=0,_0x1dd875.w=0,e$2c.pack(_0x1dd875,i,4*n)}n.updateInt("uPointLightCount",s),n.updateFloatArray("uPointLightPositionEC",e),n.updateFloatArray("uPointLightColor",t),n.updateFloatArray("uPointLightDistanceAndDecay",i)}if(a=i._visibleLightList[_0x4970c2.SPOT].values,s=a.length,s=Math.min(s,s$J.MaxSpotLightCount),s>0){const e=[],t=[],i=[],r=[];for(let n=0;n<s;n++){const o=a[n],s=o.lightColor;o$1p.pack(o.positionEC,e,3*n),_0x1dd875.x=s.red,_0x1dd875.y=s.green,_0x1dd875.z=s.blue,_0x1dd875.w=o.exponent,e$2c.pack(_0x1dd875,t,4*n),o$1p.pack(o.directionEC,i,3*n),_0x1dd875.x=o.distance,_0x1dd875.y=o.decay,_0x1dd875.z=o.angleCos,_0x1dd875.w=o.penumbraCos,e$2c.pack(_0x1dd875,r,4*n)}n.updateInt("uSpotLightCount",s),n.updateFloatArray("uSpotLightPositionEC",e),n.updateFloatArray("uSpotLightColorAndExponent",t),n.updateFloatArray("uSpotLightDirectionEC",i),n.updateFloatArray("uSpotLightDistanceDecayCosPenumbra",r)}if(a=i._lightList[_0x4970c2.HEMISPHERE].values,s=a.length,s>0){const e=a[0],t=e.skyColor,i=e.groundColor;n.updateFloat3("uSkyColor",t.red,t.green,t.blue),n.updateFloat3("uGroundColor",i.red,i.green,i.blue)}this._ubo.update(),this._isValueDirty=!1},_0x3261f9.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),this._setTextureToEffect(e,this._lightGridTableTexture,_0x2ca6aa),this._setTextureToEffect(e,this._globalLightListTexture,_0x584a7d)},_0x3261f9.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x3261f9.prototype._initUniformMap=function(e,t){if(!e$2e(this._uniformMap)){var i=this._uniformState,n={uAmbientLightColor:function(){return t.ambientLightColor},uSunLightColor:function(){return t.sunLightColor},uSunLightON:function(){return t.sunLightON}};n.uSunLightON=function(){return t.sunLightON},n.uSunDirectionEC=function(){return i.sunDirectionEC},n.uDirLightCount=function(){let e=t.directionalLight.values.length;return Math.min(e,s$J.MaxDirectionLightCount)},n.uDirectionalLightDirectionEC=function(){let e=t.directionalLight.values,i=e.length;i=Math.min(i,s$J.MaxDirectionLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.directionEC,n,3*t)}return n},n.uDirectionalLightDirection=function(){let e=t.directionalLight.values,i=e.length;i=Math.min(i,s$J.MaxDirectionLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.direction,n,3*t)}return n},n.uDirectionalLightColor=function(){let e=t.directionalLight.values,i=e.length;i=Math.min(i,s$J.MaxDirectionLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t].lightColor;_0x102caf.x=i.red,_0x102caf.y=i.green,_0x102caf.z=i.blue,o$1p.pack(_0x102caf,n,3*t)}return n},n.uPointLightCount=function(){let e=t._visibleLightList[_0x4970c2.POINT].values.length;return Math.min(e,s$J.MaxPointLightCount)},n.uPointLightPositionEC=function(){const e=t._visibleLightList[_0x4970c2.POINT].values;let i=e.length;i=Math.min(i,s$J.MaxPointLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.positionEC,n,3*t)}return n},n.uPointLightColor=function(){const e=t._visibleLightList[_0x4970c2.POINT].values;let i=e.length;i=Math.min(i,s$J.MaxPointLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t].lightColor;_0x102caf.x=i.red,_0x102caf.y=i.green,_0x102caf.z=i.blue,o$1p.pack(_0x102caf,n,3*t)}return n},n.uPointLightDistanceAndDecay=function(){const e=t._visibleLightList[_0x4970c2.POINT].values;let i=e.length;i=Math.min(i,s$J.MaxPointLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];_0x1dd875.x=i.cutoffDistance,_0x1dd875.y=i.decay,_0x1dd875.z=0,_0x1dd875.w=0,e$2c.pack(_0x1dd875,n,4*t)}return n},n.uSpotLightCount=function(){let e=t._visibleLightList[_0x4970c2.SPOT].values.length;return Math.min(e,s$J.MaxSpotLightCount)},n.uSpotLightPositionEC=function(){const e=t._visibleLightList[_0x4970c2.SPOT].values;let i=e.length;i=Math.min(i,s$J.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.positionEC,n,3*t)}return n},n.uSpotLightColorAndExponent=function(){const e=t._visibleLightList[_0x4970c2.SPOT].values;let i=e.length;i=Math.min(i,s$J.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t],r=i.lightColor;_0x1dd875.x=r.red,_0x1dd875.y=r.green,_0x1dd875.z=r.blue,_0x1dd875.w=i.exponent,e$2c.pack(_0x1dd875,n,4*t)}return n},n.uSpotLightDirectionEC=function(){const e=t._visibleLightList[_0x4970c2.SPOT].values;let i=e.length;i=Math.min(i,s$J.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];o$1p.pack(i.directionEC,n,3*t)}return n},n.uSpotLightDistanceDecayCosPenumbra=function(){const e=t._visibleLightList[_0x4970c2.SPOT].values;let i=e.length;i=Math.min(i,s$J.MaxSpotLightCount);const n=[];for(let t=0;t<i;t++){const i=e[t];_0x1dd875.x=i.distance,_0x1dd875.y=i.decay,_0x1dd875.z=i.angleCos,_0x1dd875.w=i.penumbraCos,e$2c.pack(_0x1dd875,n,4*t)}return n},n.uSkyColor=function(){const e=t._lightList[_0x4970c2.HEMISPHERE].values;return e.length>0?e[0].skyColor:Color.WHITE},n.uGroundColor=function(){const e=t._lightList[_0x4970c2.HEMISPHERE].values;return e.length>0?e[0].groundColor:Color.WHITE},this._uniformMap=n}},_0x3261f9.prototype.isDestroyed=function(){return!1},_0x3261f9.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};var _0x8dce94=(_0x2f25d4=!0,function(e,t){var i=_0x2f25d4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2f25d4=!1,i}),_0x57a0ed=_0x8dce94(void 0,(function(){return _0x57a0ed.toString().search("(((.+)+)+)+$").toString().constructor(_0x57a0ed).search("(((.+)+)+)+$")})),_0x2f25d4;_0x57a0ed();const _0x1f25ac="uBrdfLut",_0x3efd46="uSpecularEnvironmentMaps",_0x172984="uEnvironmentMap",_0x4fda9d="uHdrEnvMap";function _0x3a935d(e){var t=_0x37a515.call(this)||this;t._name=_0x2e0417.SCENE,t._brdfLutTexture=void 0,t._specularEnvironmentMaps=void 0,t._environmentMap=void 0,t._hdrEnvMap=void 0,t._uniformState=e}function P$l(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new f$1a,this._viewportCartesian4=new e$2c,this._viewportDirty=!1,this._viewportOrthographicMatrix=p$1d.clone(p$1d.IDENTITY),this._viewportTransformation=p$1d.clone(p$1d.IDENTITY),this._model=p$1d.clone(p$1d.IDENTITY),this._view=p$1d.clone(p$1d.IDENTITY),this._inverseView=p$1d.clone(p$1d.IDENTITY),this._projection=p$1d.clone(p$1d.IDENTITY),this._infiniteProjection=p$1d.clone(p$1d.IDENTITY),this._entireFrustum=new o$1o,this._currentFrustum=new o$1o,this._frustumPlanes=new e$2c,this._frameState=void 0,this._temeToPseudoFixed=p$1e.clone(p$1d.IDENTITY),this._view3DDirty=!0,this._view3D=new p$1d,this._inverseView3DDirty=!0,this._inverseView3D=new p$1d,this._inverseModelDirty=!0,this._inverseModel=new p$1d,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new p$1e,this._viewRotation=new p$1e,this._inverseViewRotation=new p$1e,this._viewRotation3D=new p$1e,this._inverseViewRotation3D=new p$1e,this._inverseProjectionDirty=!0,this._inverseProjection=new p$1d,this._modelViewDirty=!0,this._modelView=new p$1d,this._modelView3DDirty=!0,this._modelView3D=new p$1d,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new p$1d,this._inverseModelViewDirty=!0,this._inverseModelView=new p$1d,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new p$1d,this._viewProjectionDirty=!0,this._viewProjection=new p$1d,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new p$1d,this._modelViewProjectionDirty=!0,this._modelViewProjection=new p$1d,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new p$1d,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new p$1d,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new p$1d,this._mvpViewPortDirty=!0,this._mvpViewPort=new p$1d,this._normalDirty=!0,this._normal=new p$1e,this._normal3DDirty=!0,this._normal3D=new p$1e,this._inverseNormalDirty=!0,this._inverseNormal=new p$1e,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new p$1e,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new i$12,this._encodedOriginCameraPositionMC=new i$12,this._cameraPosition=new o$1p,this._sunPositionWC=new o$1p,this._sunPositionColumbusView=new o$1p,this._sunDirectionWC=new o$1p,this._sunDirectionEC=new o$1p,this._sunColor=new o$1p,this._moonDirectionEC=new o$1p,this._lightDirectionWC=new o$1p,this._lightDirectionEC=new o$1p,this._lightColor=new o$1p,this._lightColorHdr=new o$1p,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._cameraDirection=new o$1p,this._cameraRight=new o$1p,this._cameraUp=new o$1p,this._frustum2DWidth=0,this._eyeHeight2D=new o$1o,this._resolutionScale=1,this._pixelRatio=1,this._eyeHeight=0,this._orthographicIn3D=!1,this._backgroundColor=new e$1X,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsDimensions=new o$1o,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._invertClassificationColor=void 0,this._imagerySplitPosition=new o$1o,this._globeSplitPosition=new o$1o,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0,this._globeDepthTextureDim=new o$1o,this._silverLightingAtmosphere=void 0,this._hdrEnvMap=void 0,this._toneMappingExposure=1,this._envMapIntensity=1,this._cameraReflect=1,this._sceneUBO=new _0x3a935d(this),this._lightUBO=new _0x3261f9(this),this._relativeOrigin=new o$1p,this.useRelativeOrigin=!0}function Q$g(e,t){p$1d.clone(t,e._view),p$1d.getRotation(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0,e._mvpViewPortDirty=!0}function X$d(e,t){p$1d.clone(t,e._inverseView),p$1d.getRotation(t,e._inverseViewRotation)}function $$g(e){var t=e._frameState;if(e$2e(t)&&t.TAAEnable&&"normal"===t._fboState.name){var i=e._projection;i[8]+=t.jitter.x,i[9]+=t.jitter.y}}function S$k(e,t){p$1d.clone(t,e._projection),$$g(e),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._mvpViewPortDirty=!0}function ii$1(e,t){p$1d.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}function ei$1(e,t){o$1p.clone(t.positionWC,e._cameraPosition),o$1p.clone(t.directionWC,e._cameraDirection),o$1p.clone(t.rightWC,e._cameraRight),o$1p.clone(t.upWC,e._cameraUp);const i=t.positionCartographic;e$2e(i)?e._eyeHeight=i.height:e._eyeHeight=-e._ellipsoid.maximumRadius,e._encodedCameraPositionMCDirty=!0}_0x37a515&&(_0x3a935d.__proto__=_0x37a515),_0x3a935d.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x3a935d.prototype.constructor=_0x37a515,Object.defineProperties(_0x3a935d.prototype,{}),_0x3a935d.prototype._initUBOStruct=function(){this._ubo.addUniform("uView",16),this._ubo.addUniform("uProjection",16),this._ubo.addUniform("uViewProjection",16),this._ubo.addUniform("uInverseView",16),this._ubo.addUniform("uInverseProjection",16),this._ubo.addUniform("uInverseViewProjection",16),this._ubo.addUniform("uViewportTransformation",16),this._ubo.addUniform("uViewRotation",9),this._ubo.addUniform("uInverseViewRotation",9),this._ubo.addUniform("uTemeToPseudoFixed",9),this._ubo.addUniform("uViewport",4),this._ubo.addUniform("uFrustumPlanes",4),this._ubo.addUniform("uRelativeOrigin",3),this._ubo.addUniform("uCurrentFrustum",2),this._ubo.addUniform("uFarDepthFromNearPlusOne",1),this._ubo.addUniform("uLog2FarDepthFromNearPlusOne",1),this._ubo.addUniform("uOneOverLog2FarDepthFromNearPlusOne",1),this._ubo.addUniform("uFrameNumber",1),this._ubo.addUniform("uPixelRatio",1),this._ubo.addUniform("uResolutionScale",1),this._ubo.addUniform("uGamma",1),this._ubo.addUniform("uToneMappingExposure",1),this._ubo.addUniform("uEnvMapIntensity",1),this._ubo.addUniform("uSpecularEnvironmentMapSize",2),this._ubo.addUniform("uSpecularEnvironmentMapsMaximumLOD",1),this._ubo.addUniform("uSphericalHarmonicCoefficients",3,9),this._ubo.addUniform("uCameraReflect",1)},_0x3a935d.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):e.webgpu&&(this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1)),(e.webgl2||e.webgpu)&&(this._initUBOStruct(),this._ubo.create())},_0x3a935d.prototype.update=function(e,t){if(e.webgpu||e.webgl2){if(e$2e(this._ubo)||this._initUBO(e),_0x37a515.writeCartesian4ToUBO("uViewport",this._ubo,t.viewportCartesian4),_0x37a515.writeMatrix4ToUBO("uView",this._ubo,t.view),_0x37a515.writeMatrix3ToUBO("uViewRotation",this._ubo,t.viewRotation),_0x37a515.writeMatrix4ToUBO("uInverseView",this._ubo,t.inverseView),_0x37a515.writeMatrix3ToUBO("uInverseViewRotation",this._ubo,t.inverseViewRotation),_0x37a515.writeMatrix4ToUBO("uProjection",this._ubo,t.projection),_0x37a515.writeMatrix4ToUBO("uInverseProjection",this._ubo,t.inverseProjection),_0x37a515.writeMatrix4ToUBO("uViewProjection",this._ubo,t.viewProjection),_0x37a515.writeMatrix4ToUBO("uInverseViewProjection",this._ubo,t.inverseViewProjection),_0x37a515.writeMatrix4ToUBO("uViewportTransformation",this._ubo,t.viewportTransformation),_0x37a515.writeCartesian2ToUBO("uCurrentFrustum",this._ubo,t.currentFrustum),_0x37a515.writeCartesian4ToUBO("uFrustumPlanes",this._ubo,t.frustumPlanes),_0x37a515.writeCartesian3ToUBO("uRelativeOrigin",this._ubo,t.relativeOrigin),this._ubo.updateFloat("uFarDepthFromNearPlusOne",t.farDepthFromNearPlusOne),this._ubo.updateFloat("uLog2FarDepthFromNearPlusOne",t.log2FarDepthFromNearPlusOne),this._ubo.updateFloat("uOneOverLog2FarDepthFromNearPlusOne",t.oneOverLog2FarDepthFromNearPlusOne),this._ubo.updateFloat("uFrameNumber",t.frameState.frameNumber),_0x37a515.writeMatrix3ToUBO("uTemeToPseudoFixed",this._ubo,t.temeToPseudoFixedMatrix),this._ubo.updateFloat("uPixelRatio",t.pixelRatio),this._ubo.updateFloat("uResolutionScale",t.resolutionScale),this._ubo.updateFloat("uGamma",t.gamma),this._ubo.updateFloat("uToneMappingExposure",t.toneMappingExposure),this._ubo.updateFloat("uEnvMapIntensity",t.envMapIntensity),this._ubo.updateFloat("uCameraReflect",t.cameraReflect),t.specularEnvironmentMapsDimensions&&this._ubo.updateFloat2("uSpecularEnvironmentMapSize",t.specularEnvironmentMapsDimensions.x,t.specularEnvironmentMapsDimensions.y),t.specularEnvironmentMapsMaximumLOD&&this._ubo.updateFloat("uSpecularEnvironmentMapsMaximumLOD",t.specularEnvironmentMapsMaximumLOD),t.sphericalHarmonicCoefficients){for(var i=[],n=0;n<t.sphericalHarmonicCoefficients.length;n++){var r=t.sphericalHarmonicCoefficients[n];o$1p.pack(r,i,3*n)}this._ubo.updateFloatArray("uSphericalHarmonicCoefficients",i)}this._ubo.update(),this._brdfLutTexture=t.brdfLut,this._specularEnvironmentMaps=t.specularEnvironmentMaps,this._environmentMap=t.environmentMap,this._hdrEnvMap=t.hdrEnvMap}},_0x3a935d.prototype._initUniformMap=function(e){if(!e.webgl2&&!e.webgpu){var t=this._uniformState;this._uniformMap={},this._uniformMap.uView=function(){return t.view},this._uniformMap.uProjection=function(){return t.projection},this._uniformMap.uViewProjection=function(){return t.viewProjection},this._uniformMap.uInverseView=function(){return t.inverseView},this._uniformMap.uInverseProjection=function(){return t.inverseProjection},this._uniformMap.uInverseViewProjection=function(){return t.inverseViewProjection},this._uniformMap.uViewportTransformation=function(){return t.viewportTransformation},this._uniformMap.uViewRotation=function(){return t.viewRotation},this._uniformMap.uInverseViewRotation=function(){return t.inverseViewRotation},this._uniformMap.uTemeToPseudoFixed=function(){return t.temeToPseudoFixedMatrix},this._uniformMap.uViewport=function(){return t.viewportCartesian4},this._uniformMap.uFrustumPlanes=function(){return t.frustumPlanes},this._uniformMap.uRelativeOrigin=function(){return t.relativeOrigin},this._uniformMap.uCurrentFrustum=function(){return t.currentFrustum},this._uniformMap.uFarDepthFromNearPlusOne=function(){return t.farDepthFromNearPlusOne},this._uniformMap.uLog2FarDepthFromNearPlusOne=function(){return t.log2FarDepthFromNearPlusOne},this._uniformMap.uOneOverLog2FarDepthFromNearPlusOne=function(){return t.oneOverLog2FarDepthFromNearPlusOne},this._uniformMap.uFrameNumber=function(){return t.frameNumber},this._uniformMap.uPixelRatio=function(){return t.pixelRatio},this._uniformMap.uResolutionScale=function(){return t.resolutionScale},this._uniformMap.uGamma=function(){return t.gamma},this._uniformMap.uToneMappingExposure=function(){return t.toneMappingExposure},this._uniformMap.uEnvMapIntensity=function(){return t.envMapIntensity},this._uniformMap.uCameraReflect=function(){return t.cameraReflect},this._uniformMap.uSpecularEnvironmentMapSize=function(){return t.specularEnvironmentMapsDimensions},this._uniformMap.uSpecularEnvironmentMapsMaximumLOD=function(){return t.specularEnvironmentMapsMaximumLOD},this._uniformMap.uSphericalHarmonicCoefficients=function(){return t.sphericalHarmonicCoefficients}}},_0x3a935d.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name),this._setTextureToEffect(e,this._brdfLutTexture,_0x1f25ac),this._setTextureToEffect(e,this._specularEnvironmentMaps,_0x3efd46),this._setTextureToEffect(e,this._environmentMap,_0x172984),this._setTextureToEffect(e,this._hdrEnvMap,_0x4fda9d)},_0x3a935d.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x3a935d.prototype.isDestroyed=function(){return!1},_0x3a935d.prototype.destroy=function(){return this._ubo.dispose(),destroyObject(this)},Object.defineProperties(P$l.prototype,{eyeHeight:{get:function(){return this._eyeHeight}},toneMappingExposure:{get:function(){return this._toneMappingExposure}},envMapIntensity:{get:function(){return this._envMapIntensity}},cameraReflect:{get:function(){return this._cameraReflect}},frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!f$1a.equals(e,this._viewport)){f$1a.clone(e,this._viewport);var t=this._viewport,i=this._viewportCartesian4;i.x=t.x,i.y=t.y,i.z=t.width,i.w=t.height,this._viewportDirty=!0,this._mvpViewPortDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return Y$d(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return Y$d(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){p$1d.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0,this._mvpViewPortDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,p$1d.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){var e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,p$1d.getRotation(this.inverseModel,e),p$1e.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return N$f(this),this._view3D}},viewRotation:{get:function(){return N$f(this),this._viewRotation}},viewRotation3D:{get:function(){return N$f(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return G$l(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return G$l(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return si$1(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return li$2(this),this._modelView}},modelView3D:{get:function(){return hi$2(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return pi$3(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return ci$3(this),this._inverseModelView}},inverseModelView3D:{get:function(){return _i$3(this),this._inverseModelView3D}},viewProjection:{get:function(){return ai$1(this),this._viewProjection}},inverseViewProjection:{get:function(){return ui$2(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return di$2(this),this._modelViewProjection}},mvpViewPort:{get:function(){return vi$3(this),this._mvpViewPort}},inverseModelViewProjection:{get:function(){return Di$3(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return wi$3(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return gi$3(this),this._modelViewInfiniteProjection}},normal:{get:function(){return mi$1(this),this._normal}},normal3D:{get:function(){return yi$3(this),this._normal3D}},inverseNormal:{get:function(){return Pi$3(this),this._inverseNormal}},inverseNormal3D:{get:function(){return fi$2(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},sunColor:{get:function(){return this._sunColor}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return k$j(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return k$j(this),this._encodedCameraPositionMC.low}},encodedOriginCameraPositionMCHigh:{get:function(){return q$h(this),this._encodedOriginCameraPositionMC.high}},encodedOriginCameraPositionMCLow:{get:function(){return q$h(this),this._encodedOriginCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},resolutionScale:{get:function(){return this._resolutionScale}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsDimensions:{get:function(){return this._specularEnvironmentMapsDimensions}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},imagerySplitPosition:{get:function(){return this._imagerySplitPosition}},globeSplitPosition:{get:function(){return this._globeSplitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},globeDepthTextureDim:{get:function(){return this._globeDepthTextureDim}},sceneUBO:{get:function(){return this._sceneUBO}},relativeOrigin:{get:function(){return this._relativeOrigin}},hdrEnvMap:{get:function(){return this._hdrEnvMap}}});var j$k=new p$1e,ti$1=new a$18;function ni$1(e,t){e$2e(m$19.computeIcrfToFixedMatrix(t.time,j$k))||(j$k=m$19.computeTemeToPseudoFixedMatrix(t.time,j$k));var i=F$G.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);p$1e.multiplyByVector(j$k,i,i),o$1p.normalize(i,e._sunDirectionWC),i=p$1e.multiplyByVector(e.viewRotation3D,i,e._sunDirectionEC),o$1p.normalize(i,i),i=F$G.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),p$1e.multiplyByVector(j$k,i,i),p$1e.multiplyByVector(e.viewRotation3D,i,i),o$1p.normalize(i,i);var n=t.mapProjection,r=n.ellipsoid.cartesianToCartographic(e._sunPositionWC,ti$1);n.project(r,e._sunPositionColumbusView)}new o$1p;var V$i=new p$1d,M$m=new p$1d,A$r=new o$1p;P$l.prototype.updateCamera=function(e,t){var i=e.positionCartographic.height,n=e.positionWC,r=o$1p.distance(n,t.relativeOrigin),o=e$2e(this._frameState)&&this._frameState._fboState.enabled;t.enableRelativeOrigin&&!o&&i<1e4&&r>2e4&&(t.relativeOrigin=n),o$1p.clone(t.relativeOrigin,this._relativeOrigin),o$1p.subtract(n,t.relativeOrigin,A$r),p$1d.clone(e.inverseViewMatrix,M$m),p$1d.setTranslation(M$m,A$r,M$m),p$1d.inverse(M$m,V$i),e.bReflect&&(p$1d.multiply(V$i,e._reflectMatrix,V$i),p$1d.inverse(V$i,M$m),e.frustum.currentViewMatrix=p$1d.clone(V$i,e.frustum.currentViewMatrix)),Q$g(this,V$i),X$d(this,M$m),ei$1(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==C$14.SCENE2D&&e.frustum instanceof a$V,this._sceneUBO.update(t,this)},P$l.prototype.updateFrustum=function(e){S$k(this,e.projectionMatrix),e$2e(e.infiniteProjectionMatrix)&&ii$1(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=e$2d.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne,e$2e(e._offCenterFrustum)&&(e=e._offCenterFrustum),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right,e$2e(this._frameState)&&this._sceneUBO.update(this._frameState.context,this)},P$l.prototype.updatePass=function(e){this._pass=e};var U$j=new o$1p;P$l.prototype.updateLightSource=function(e){if(e$2e(e)){var t=e.pointLight.values,i=e.spotLight.values,n=e.directionalLight.values,r=e.hemisphereLight.values,o=e._visibleLightList[_0x4970c2.POINT],a=e._visibleLightList[_0x4970c2.SPOT];o.removeAll(),a.removeAll();var s,l,u,c,h,d=[];for(s=0,l=t.length;s<l;s++){(c=t[s]).sceneMode=this._frameState.mode;var f=o$1p.subtract(c.position,this._relativeOrigin,U$j);p$1d.multiplyByPoint(this._view,f,c._positionEC),(h=o$1p.distance(this._frameState.camera.positionWC,c.position))<e.visibleDistanceMax&&d.push([h,c])}for(d.length>e._visibleCountAllowed&&(d.sort((function(e,t){return e[0]-t[0]})),d=d.slice(0,e._visibleCountAllowed)),u=0;u<d.length;u++)c=d[u][1],o.set(c.id,c);for(d=[],s=0,l=i.length;s<l;s++){(c=i[s]).sceneMode=this._frameState.mode;f=o$1p.subtract(c.position,this._relativeOrigin,U$j);p$1d.multiplyByPoint(this._view,f,c._positionEC),p$1e.multiplyByVector(this.viewRotation,c.direction,c._directionEC),o$1p.normalize(c._directionEC,c._directionEC),h=o$1p.distance(this._frameState.camera.positionWC,c.position),c.computeVisiblityInCullingVolume(this._frameState.cullingVolume)&&h<e.visibleDistanceMax&&d.push([h,c])}for(d.length>e._visibleCountAllowed&&(d.sort((function(e,t){return e[0]-t[0]})),d=d.slice(0,e._visibleCountAllowed)),u=0;u<d.length;u++)c=d[u][1],a.set(c.id,c);for(s=0,l=n.length;s<l;s++)(c=n[s]).sceneMode=this._frameState.mode,p$1e.multiplyByVector(this.viewRotation,c.direction,c._directionEC),o$1p.normalize(c._directionEC,c._directionEC);o.length!==e._visiblePointLightCount&&(e._changedLightList.set(_0x4970c2.POINT,{count:o.length,type:_0x4970c2.POINT}),e._visiblePointLightCount=o.length),a.length!==e._visibleSpotLightCount&&(e._changedLightList.set(_0x4970c2.SPOT,{count:a.length,type:_0x4970c2.SPOT}),e._visibleSpotLightCount=a.length),n.length!==e._visibleDirectionalLightCount&&(e._changedLightList.set(_0x4970c2.DIRECTIONAL,{count:n.length,type:_0x4970c2.DIRECTIONAL}),e._visibleDirectionalLightCount=n.length),r.length!==e._visibleHemisphereLightCount&&(e._changedLightList.set(_0x4970c2.HEMISPHERE,{count:r.length,type:_0x4970c2.HEMISPHERE}),e._visibleHemisphereLightCount=r.length),e.combineUniformValue()}};var oi$1=[],ri$1=new i$k;function Y$d(e){if(e._viewportDirty){var t=e._viewport;p$1d.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),p$1d.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1,e._mvpViewPortDirty=!0}}function si$1(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode===C$14.SCENE2D||e._mode===C$14.MORPHING||e._orthographicIn3D?p$1d.clone(p$1d.ZERO,e._inverseProjection):p$1d.inverse(e._projection,e._inverseProjection))}P$l.prototype.update=function(e){this._frameState=e,this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,e.context._canvas,this._resolutionScale=e.pixelRatio,this._pixelRatio=e.pixelRatio;var t=e.camera;this.updateCamera(t,e.context),e.mode===C$14.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=.5*this._frustum2DWidth,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),ni$1(this,e);var i=u$Z(e.light,ri$1);i instanceof i$k?(this._lightDirectionWC=o$1p.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=o$1p.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=o$1p.normalize(o$1p.negate(i.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=p$1e.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));var n=i.color,r=o$1p.fromElements(n.red,n.green,n.blue,this._lightColorHdr);r=o$1p.multiplyByScalar(r,i.intensity,r);var o=o$1p.maximumComponent(r);o>1?o$1p.divideByScalar(r,o,this._lightColor):o$1p.clone(r,this._lightColor),this._sunColor=o$1p.clone(e.sunColor,this._sunColor);var a=e.brdfLutGenerator;e$2e(a)&&a.update(e);var s=e$2e(a)?a.colorTexture:void 0;this._brdfLut=s,this._environmentMap=u$Z(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=u$Z(e.sphericalHarmonicCoefficients,oi$1),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,this._hdrEnvMap=e.hdrEnvMap,this._toneMappingExposure=e.toneMappingExposure,this._envMapIntensity=e.envMapIntensity,this._cameraReflect=e.camera.bReflect?-1:1,e$2e(this._specularEnvironmentMaps)&&o$1o.clone(this._specularEnvironmentMaps.dimensions,this._specularEnvironmentMapsDimensions),this._fogDensity=e.fog.density,this._invertClassificationColor=e.invertClassificationColor,this._temeToPseudoFixed=m$19.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._imagerySplitPosition.x=e.imagerySplitPosition.x*e.context.drawingBufferWidth,this._imagerySplitPosition.y=e.imagerySplitPosition.y*e.context.drawingBufferHeight,this._globeSplitPosition.x=e.globeSplitPosition.x*e.context.drawingBufferWidth,this._globeSplitPosition.y=e.globeSplitPosition.y*e.context.drawingBufferHeight;var l,u=t.frustum.fov,c=this._viewport;l=c.height>c.width?2*Math.tan(.5*u)/c.height:2*Math.tan(.5*u)/c.width,this._geometricToleranceOverMeter=l*e.maximumScreenSpaceError,e$1X.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1),this.updateLightSource(e.lightSource),e$2e(this.globeDepthTexture)&&(this._globeDepthTextureDim.x=this.globeDepthTexture.width,this._globeDepthTextureDim.y=this.globeDepthTexture.height),this._sceneUBO.update(e.context,this),this._lightUBO.update(e)};var E$n=new o$1p;function li$2(e){if(e._modelViewDirty){e._modelViewDirty=!1;var t=p$1d.getTranslation(e._model,E$n);e.useRelativeOrigin&&!o$1p.equals(t,o$1p.ZERO)&&(o$1p.subtract(t,e._relativeOrigin,E$n),p$1d.setTranslation(e._model,E$n,e._model)),p$1d.multiplyTransformation(e._view,e._model,e._modelView)}}function hi$2(e){if(e._modelView3DDirty){e._modelView3DDirty=!1;var t=p$1d.getTranslation(e._model,E$n);e.useRelativeOrigin&&!o$1p.equals(t,o$1p.ZERO)&&(o$1p.subtract(t,e._relativeOrigin,E$n),p$1d.setTranslation(e._model,E$n,e._model)),p$1d.multiplyTransformation(e.view3D,e._model,e._modelView3D)}}function ci$3(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,p$1d.inverse(e.modelView,e._inverseModelView))}function _i$3(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,p$1d.inverse(e.modelView3D,e._inverseModelView3D))}function ai$1(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,p$1d.multiply(e._projection,e._view,e._viewProjection))}function ui$2(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,p$1d.inverse(e.viewProjection,e._inverseViewProjection))}function di$2(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,p$1d.multiply(e._projection,e.modelView,e._modelViewProjection),e._mvpViewPortDirty=!0)}function vi$3(e){e._mvpViewPortDirty&&(p$1d.multiply(e.viewportTransformation,e.modelViewProjection,e._mvpViewPort),e._mvpViewPortDirty=!1)}function pi$3(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;var t=e.modelView,i=e._modelViewRelativeToEye;i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=0,i[13]=0,i[14]=0,i[15]=t[15]}}function Di$3(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,p$1d.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function wi$3(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,p$1d.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function gi$3(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,p$1d.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function mi$1(e){if(e._normalDirty){e._normalDirty=!1;var t=e._normal;p$1d.getRotation(e.inverseModelView,t),p$1e.transpose(t,t)}}function yi$3(e){if(e._normal3DDirty){e._normal3DDirty=!1;var t=e._normal3D;p$1d.getRotation(e.inverseModelView3D,t),p$1e.transpose(t,t)}}function Pi$3(e){e._inverseNormalDirty&&(e._inverseNormalDirty=!1,p$1d.getRotation(e.inverseModelView,e._inverseNormal))}function fi$2(e){e._inverseNormal3DDirty&&(e._inverseNormal3DDirty=!1,p$1d.getRotation(e.inverseModelView3D,e._inverseNormal3D))}var O$h=new o$1p;function k$j(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,p$1d.multiplyByPoint(e.inverseModel,e._cameraPosition,O$h),i$12.fromCartesian(O$h,e._encodedCameraPositionMC))}function q$h(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,p$1d.multiplyByPoint(e.inverseModel,e._cameraPosition,O$h),i$12.fromCartesian(O$h,e._encodedOriginCameraPositionMC))}new o$1p;var Ci$3=new o$1p,Vi$3=new o$1p,Mi$3=new o$1p,Ei$3=new o$1p,Ti$3=new a$18,ji$2=new o$1p,xi$3=new p$1d;function bi$3(e,t,i,n,r,o,a,s){var l=Ci$3;l.x=e.y,l.y=e.z,l.z=e.x;var u=Vi$3;u.x=i.y,u.y=i.z,u.z=i.x;var c=Mi$3;c.x=n.y,c.y=n.z,c.z=n.x;var h=Ei$3;h.x=t.y,h.y=t.z,h.z=t.x,o===C$14.SCENE2D&&(l.z=.5*r);var d=a.unproject(l,Ti$3);d.longitude=e$2d.clamp(d.longitude,-Math.PI,Math.PI),d.latitude=e$2d.clamp(d.latitude,-e$2d.PI_OVER_TWO,e$2d.PI_OVER_TWO);var f=a.ellipsoid,p=f.cartographicToCartesian(d,ji$2),_=m$19.eastNorthUpToFixedFrame(p,f,xi$3);return p$1d.multiplyByPointAsVector(_,u,u),p$1d.multiplyByPointAsVector(_,c,c),p$1d.multiplyByPointAsVector(_,h,h),e$2e(s)||(s=new p$1d),s[0]=u.x,s[1]=c.x,s[2]=-h.x,s[3]=0,s[4]=u.y,s[5]=c.y,s[6]=-h.y,s[7]=0,s[8]=u.z,s[9]=c.z,s[10]=-h.z,s[11]=0,s[12]=-o$1p.dot(u,p),s[13]=-o$1p.dot(c,p),s[14]=o$1p.dot(h,p),s[15]=1,s}function N$f(e){e._view3DDirty&&(e._mode===C$14.SCENE3D?p$1d.clone(e._view,e._view3D):bi$3(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),p$1d.getRotation(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function G$l(e){e._inverseView3DDirty&&(p$1d.inverseTransformation(e.view3D,e._inverseView3D),p$1d.getRotation(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}function i$j(e){if(this._renderTexture=new s$M(e),this._renderTexture._generateMipmap=!0,this._context=e,this.waterNormalMapUrl=n$17("Assets/Textures/waterNormalsSmall.jpg"),this._waterNormalMapUrl=void 0,this._waterNormalMap=void 0,this._reflectPlane=new o$1m(o$1p.UNIT_Z,6378137),this._isUpdate=!0,this._distinctQuality=5,this._environmentVisible={isSunVisible:!0,isMoonVisible:!0,isSkyAtmosphereVisible:!0,isSkyBoxVisible:!0,isGlobalVisible:!1,isObjectVisible:!0},this.waterNormalMapUrl!==this._waterNormalMapUrl){var t=this.waterNormalMapUrl;if(this._waterNormalMapUrl=t,e$2e(t)){var i=this;o$1l(t$S(t),(function(n){if(t===i.waterNormalMapUrl){var r=new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.LINEAR_MIPMAP_LINEAR,magnificationFilter:rt$k.LINEAR});i._waterNormalMap=i._waterNormalMap&&i._waterNormalMap.destroy(),i._waterNormalMap=new t$U({context:e,source:n,sampler:r}),i._waterNormalMap.generateMipmap()}}))}else this._waterNormalMap=this._waterNormalMap&&this._waterNormalMap.destroy()}}function s$h(e){this._renderTexture=new s$M(e),this._renderTexture._pixelDatatype=_$_.UNSIGNED_BYTE,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0}}function t$f(e){this._renderTexture=new s$M(e),this._renderTexture._pixelDatatype=_$_.FLOAT,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0}}function t$e(e){this._renderTexture=new s$M(e),this._renderTexture._passState.blendingEnabled=!1,this._context=e,this._isUpdate=!1,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isBillboardVisible:!1,isOnlyS3MObjectVisible:!0}}Object.defineProperties(i$j.prototype,{distinctQuality:{set:function(e){this._distinctQuality=e},get:function(){return this._distinctQuality}},renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return Qe$c.REFLECT}}}),i$j.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=e.camera,n=t.drawingBufferWidth,r=t.drawingBufferHeight,o=this._reflectPlane;return this._renderTexture._passState.viewport.width=n,this._renderTexture._passState.viewport.height=r,i.enableReflection(o),this._oriUseLogDepth=e.useLogDepth,e.useLogDepth=!1,this._renderTexture._passState},i$j.prototype.end=function(e){(e.camera.disableReflection(),e.useLogDepth=this._oriUseLogDepth,this._context.webgl2)&&this._renderTexture._fb.getColorTexture(0).generateMipmap()},i$j.prototype.update=function(e,t){},i$j.prototype.isDestroyed=function(){return!1},i$j.prototype.destroy=function(){return this._waterNormalMap=this._waterNormalMap&&this._waterNormalMap.destroy(),this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)},Object.defineProperties(s$h.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 8},set:function(e){}},frameBufferType:{get:function(){return Qe$c.NORMAL_AND_DEPTH}}}),s$h.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},s$h.prototype.end=function(e){var t=this._context.readPixels({x:e.x,y:e.y,width:e.width,height:e.height,framebuffer:this._renderTexture._fb}),i=new e$2c(t[0]/255,t[1]/255,t[2]/255,t[3]/255);if(0!==i.w){var n=o$1p.divideByScalar(i,i.w,new o$1p);return o$1p.subtract(o$1p.multiplyByScalar(n,2,new o$1p),new o$1p(1,1,1),n),o$1p.normalize(n,n),n}},s$h.prototype.endAsync=function(e){return this._context.readPixelsAsync({x:e.x,y:e.y,width:e.width,height:e.height,framebuffer:this._renderTexture._fb}).then((e=>{var t=new e$2c(e[0]/255,e[1]/255,e[2]/255,e[3]/255);if(0===t.w)return Promise.resolve(void 0);var i=o$1p.divideByScalar(t,t.w,new o$1p);return o$1p.subtract(o$1p.multiplyByScalar(i,2,new o$1p),new o$1p(1,1,1),i),o$1p.normalize(i,i),Promise.resolve(i)})).catch((e=>(console.log("Context.readPixels failed."),Promise.resolve(void 0))))},s$h.prototype.update=function(e,t){},s$h.prototype.isDestroyed=function(){return!1},s$h.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)},Object.defineProperties(t$f.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},useType:{get:function(){return 16},set:function(e){}},frameBufferType:{get:function(){return Qe$c.POSTEFFECT_FILTER}}}),t$f.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this._renderTexture._passState},t$f.prototype.end=function(e){},t$f.prototype.update=function(e,t){},t$f.prototype.isDestroyed=function(){return!1},t$f.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)},Object.defineProperties(t$e.prototype,{renderTexture:{get:function(){return this._renderTexture}},environmentVisible:{get:function(){return this._environmentVisible}},isUpdate:{get:function(){return this._isUpdate},set:function(e){this._isUpdate=e}},isDepth:{get:function(){return!1}},isHeight:{get:function(){return!1}},frameBufferType:{get:function(){return Qe$c.PICKRECT}}}),t$e.prototype.begin=function(e){this._renderTexture.update(e);var t=this._context,i=t.drawingBufferWidth,n=t.drawingBufferHeight;return this._renderTexture._passState.viewport.width=i,this._renderTexture._passState.viewport.height=n,this.beginFunc&&this.beginFunc.call(this),this._renderTexture._passState},t$e.prototype.end=function(e){},t$e.prototype.update=function(e,t){},t$e.prototype.isDestroyed=function(){return!1},t$e.prototype.destroy=function(){return this._renderTexture=this._renderTexture&&this._renderTexture.destroy(),i$11(this)};var J$c=1073741824;function i$i(e,t){o$1q.defined("canvas",e),this._canvas=e;var i=t&&t.monitorTable||{};this._rows=i.rows||1,this._cols=i.cols||1,this._curRow=i.curRow||0,this._curCol=i.curCol||0;var n=3840,r=1080;e$2e(t)&&(n=u$Z(t.maxDrawingBufferWidth,n),r=u$Z(t.maxDrawingBufferHeight,r)),e.maxWidth=n,e.maxHeight=r,(t=u$Z(t=l$1f(t,!0),{})).allowTextureFilterAnisotropic=u$Z(t.allowTextureFilterAnisotropic,!0),this._id=e$1T(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new h$m(this),this._textureCache=new r$o,this._clearColor=new e$1X(0,0,0,0),this._clearDepth=1,this._clearStencil=0;var o=new P$l,a=new n$$(this),s=d$1m.fromCache();this._defaultPassState=a,this._defaultRenderState=s,this._defaultTexture=void 0,this._defaultCubeMap=void 0,this._defaultTransparentTexture=void 0,this._us=o,this._currentRenderState=s,this._currentPassState=a,this._currentViewport=void 0,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(var l=0;l<e$1W._maximumVertexAttributes;l++)this._vertexAttribDivisors.push(0);this._pickObjects={},this._nextPickColor=new Uint32Array(1),this._pickIdObjects={},this.options=t,this.cache={},this._pickPosition=new Float64Array(3),this._pickPositionHeight=0,this.pixels=new Uint8Array(4),this.shaderPreprocess=!0,this.numNormalAndDepthObject=0,this.numPostEffectFilterObject=0,this.numClampClipPlaneLayer=0,this._sharedEDL=this.createSharedEDLFrameBuffer(),this.memorySize=0,this.memoryThreshold=4,this.currentWarnFrameNumber=-99999,this._relativeOrigin=new o$1p,this._enableRelativeOrigin=!0,this._trangleCount=0,this._quadVpShaderSource=new s$V({name:"ViewportQuadVS",sources:[ot$8]})}var $$f={};Object.defineProperties(i$i.prototype,{id:{get:function(){return this._id}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},defaultTexture:{get:function(){return void 0===this._defaultTexture&&(this._defaultTexture=new t$U({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultTransparentTexture:{get:function(){return void 0===this._defaultTransparentTexture&&(this._defaultTransparentTexture=new t$U({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0,0])},flipY:!1})),this._defaultTransparentTexture}},defaultCubeMap:{get:function(){if(void 0===this._defaultCubeMap){var e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new e$1P({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})}return this._defaultCubeMap}},defaultFramebuffer:{get:function(){return $$f}},memoryThresholdValue:{get:function(){return this.memoryThreshold*J$c}},relativeOrigin:{set:function(e){this._relativeOrigin.x=Math.floor(e.x),this._relativeOrigin.y=Math.floor(e.y),this._relativeOrigin.z=Math.floor(e.z)},get:function(){return this._relativeOrigin}},enableRelativeOrigin:{get:function(){return this._enableRelativeOrigin}}}),typeof WebGLRenderingContext<"u"&&de$y.BACK,i$i.prototype.clear=function(e,t){},i$i.prototype.draw=function(e,t,i,n){},i$i.prototype.endFrame=function(){},i$i.prototype.readPixels=function(e){};const viewportQuadAttributeLocations={aPosition:0,textureCoordinates:1};function d$r(e,t,i){this._pickObjects=e,this.key=t,this.color=i}var h$l,c$g;i$i.prototype.getViewportQuadVertexArray=function(){var e=this.cache.viewportQuad_vertexArray;if(!e$2e(e)){var t=new I$1p({attributes:{aPosition:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:W$18.TRIANGLES});e=c$13.fromGeometry({context:this,geometry:t,attributeLocations:viewportQuadAttributeLocations,bufferUsage:A$18.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e},i$i.prototype.createViewportQuadCommand=function(e,t){var i=this._quadVpShaderSource;return e$2e(t)&&e$2e(t.useWGSL)&&t.useWGSL&&(i=D$i),this.createCustomViewportQuadCommand(i,e,t)},i$i.prototype.createCustomViewportQuadCommand=function(e,t,i){return i=u$Z(i,u$Z.EMPTY_OBJECT),new i$$({vertexArray:this.getViewportQuadVertexArray(),primitiveType:W$18.TRIANGLES,renderState:i.renderState,shaderProgram:r$14.fromCache({name:i.shaderProgramName,useWGSL:i.useWGSL,context:this,vertexShaderSource:e,fragmentShaderSource:t,attributeLocations:viewportQuadAttributeLocations}),uniformMap:i.uniformMap,owner:i.owner,framebuffer:i.framebuffer,pass:i.pass})},i$i.prototype.createReflectFramebuffer=function(){return new i$j(this)},i$i.prototype.createNormalFramebuffer=function(){return new s$h(this)},i$i.prototype.createPostEffectFilterlFramebuffer=function(){return new t$f(this)},i$i.prototype.createClampFramebuffer=function(){return new t$g(this)},i$i.prototype.createClosedDepthFramebuffer=function(){return new a$i(this)},i$i.prototype.createPickRectFramebuffer=function(){return new t$e(this)},i$i.prototype.createSharedEDLFrameBuffer=function(){return new _0x460335},i$i.prototype.getObjectByPickColor=function(e){return o$1q.defined("pickColor",e),this._pickObjects[e.toRgba()]},i$i.prototype.getObjectByPickId=function(e){return o$1q.defined("pickId",e),this._pickObjects[e]},i$i.prototype.getAllPickObjects=function(){return this._pickObjects},i$i.prototype.getPickIdByKey=function(e){return this._pickIdObjects[e]},Object.defineProperties(d$r.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}}),d$r.prototype.destroy=function(){delete this._pickObjects[this.key]},i$i.prototype.createPickId=function(e){o$1q.defined("object",e),++this._nextPickColor[0];var t=this._nextPickColor[0];if(0===t)throw new t$13("Out of unique Pick IDs.");return this._pickObjects[t]=e,new d$r(this._pickObjects,t,e$1X.fromRgba(t))},i$i.prototype.createBillboardPointIndexBuffer=function(){if(!h$l){var e=new Uint16Array(6),t=0;e[t++]=0,e[t++]=1,e[t++]=2,e[t++]=0,e[t++]=2,e[t++]=3,(h$l=t$X.createIndexBuffer({context:this,typedArray:e,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1}return h$l},i$i.prototype.createBillboardOffsetVertexBuffer=function(){if(!c$g){var e=new Float32Array([-.5,-.5,.5,-.5,.5,.5,-.5,.5]);(c$g=t$X.createVertexBuffer({context:this,typedArray:e,usage:A$18.STATIC_DRAW})).vertexArrayDestroyable=!1}return c$g},i$i.prototype.isDestroyed=function(){return!1},i$i.prototype.destroy=function(){var e=this.cache;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];e$2e(i.destroy)&&i.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),this._defaultTransparentTexture=this._defaultTransparentTexture&&this._defaultTransparentTexture.destroy(),i$11(this)};var S$j={NONE:0,BEGIN:1,READING:2},I$o,c$f,tt$6,rt$8,et$7;function C$l(e){this._scene=e,this._startPoint=void 0,this._endPoint=void 0,this._maxHeight=100,this._farDistance=500,this._showBound=!0,this._fbo=void 0,this._readyPromise=o$1l.defer(),this._hintBoundColor=new e$1X(0,1,1,.1),this._hintBoundOutlineColor=new e$1X(1,0,0,1),this._colorCommand=void 0,this._outlineCommand=void 0,this._update=!1,this._name="",this._frameState=void 0,this._visibleViewport=4095,this._buffers=new e$1Q,this._readPixelState=S$j.NONE}function k$i(e){e$2e(e._colorCommand)&&(e._colorCommand.vertexArray=e._colorCommand.vertexArray&&e._colorCommand.vertexArray.destroy(),e._colorCommand.shaderProgram=e._colorCommand.shaderProgram&&e._colorCommand.shaderProgram.destroy(),e._colorCommand=void 0),e$2e(e._outlineCommand)&&(e._outlineCommand.vertexArray=e._outlineCommand.vertexArray&&e._outlineCommand.vertexArray.destroy(),e._outlineCommand.shaderProgram=e._outlineCommand.shaderProgram&&e._outlineCommand.shaderProgram.destroy(),e._outlineCommand=void 0)}function pt$4(e){var t=e._scene.camera,i=o$1p.subtract(e._endPoint,e._startPoint,new o$1p),n=o$1p.midpoint(e._startPoint,e._endPoint,new o$1p);o$1p.normalize(i,i);var r=o$1p.normalize(n,new o$1p),o=o$1p.cross(r,i,new o$1p);o$1p.normalize(o,o),o$1p.cross(i,o,r),o$1p.normalize(r,r);var a=o$1p.multiplyByScalar(r,e._maxHeight/2,new o$1p),s=new o$1p;o$1p.clone(n,s),o$1p.add(s,a,s);var l=o$1p.distance(e._endPoint,e._startPoint),u=1,c=0;e._readPixelState=S$j.NONE;var h=e._maxHeight;l*e._scene.context.drawingBufferHeight/e._scene.context.drawingBufferWidth<e._maxHeight&&(h=l*e._scene.context.drawingBufferHeight/e._scene.context.drawingBufferWidth,u=Math.ceil(e._maxHeight/h)),e$2e(e._fbo)||(e._fbo=new t$E(e._scene.context),e._fbo.environmentVisible.isObjectVisible=!0,e._fbo.environmentVisible.isOnlyS3MObjectVisible=!0,e._fbo._useHeight=!1,e._scene.frameState._framebufferList[e._name]=e._fbo,e._frameState=e._scene._frameState),e._buffers.removeAll(),e._fbo._isUpdate=!0,e._fbo._beginFunc=function(i){if(e._readPixelState!==S$j.READING){e._readPixelState=S$j.BEGIN,e._readyPromise=o$1l.defer(),I$o=o$1p.clone(t.position),c$f=o$1p.clone(t.direction),tt$6=o$1p.clone(t.up),rt$8=t.frustum.clone(new o$15),et$7=i.useLogDepth,i.useLogDepth=!1,o$1p.clone(n,s),a=o$1p.multiplyByScalar(r,h/2+h*c,new o$1p),o$1p.add(s,a,s),t.setView({destination:s,orientation:{direction:o,up:r}});var l=new a$V,u=o$1p.distance(e._endPoint,e._startPoint);l.width=u,l.near=.01,l.far=e._farDistance,l.aspectRatio=i.context.drawingBufferWidth/i.context.drawingBufferHeight,t.frustum=l,i.context.uniformState.updateFrustum(l)}},e._fbo._endFunc=function(i){if(e._readPixelState!==S$j.READING){t.frustum=rt$8,t.setView({destination:I$o,orientation:{direction:c$f,up:tt$6}}),i.context.uniformState.updateFrustum(t.frustum),i.useLogDepth=et$7;var n=e._scene._context;n.readPixelsAsync({x:0,y:0,width:n.drawingBufferWidth,height:n.drawingBufferHeight,framebuffer:e._fbo._renderTexture._fb}).then((t=>{if(e._readPixelState=S$j.NONE,e._buffers.set(c,t),c++,0==--u){for(var r=new Uint8Array(t.length*e._buffers.length),o=0;o<e._buffers.length;o++)r.set(e._buffers.get(o),t.length*o);var a=document.createElement("canvas");a.height=n.drawingBufferHeight*e._buffers.length,a.width=n.drawingBufferWidth;var s=a.getContext("2d"),l=s.createImageData(a.width,a.height);l.data.set(r),s.putImageData(l,0,0);for(var d=o$1p.distance(e._endPoint,e._startPoint)/e._maxHeight,f=i.context.drawingBufferWidth/d,p=s.getImageData(0,0,a.width,a.height),_=e._maxHeight/h-Math.floor(e._maxHeight/h),m=(1-_)*p.height/e._buffers.length,g=0;g<p.height/2;++g)for(var x=0;x<p.width;++x){var y=4*g*p.width+4*x,v=4*(p.height-g)*p.width+4*x,$=p.data[y],b=p.data[y+1],T=p.data[y+2],C=p.data[y+3];p.data[y]=p.data[v],p.data[y+1]=p.data[v+1],p.data[y+2]=p.data[v+2],p.data[y+3]=p.data[v+3],p.data[v]=$,p.data[v+1]=b,p.data[v+2]=T,p.data[v+3]=C,1===e._buffers.length&&g<p.height/2-f/2&&(p.data[y]=0,p.data[y+1]=0,p.data[y+2]=0,p.data[y+3]=0),e._buffers.length>1&&_>0&&g<m&&(p.data[y]=0,p.data[y+1]=0,p.data[y+2]=0,p.data[y+3]=0)}s.clearRect(0,0,p.width,p.height),s.putImageData(p,0,0);var S=a.toDataURL();e._readyPromise.resolve(S),e._fbo._isUpdate=!1}})),e._readPixelState=S$j.READING}}}function ft$3(e){if(e._showBound){var t=e._scene._context,i=o$1p.subtract(e._endPoint,e._startPoint,new o$1p),n=o$1p.midpoint(e._startPoint,e._endPoint,new o$1p);o$1p.normalize(i,i);var r=o$1p.normalize(n,new o$1p),o=o$1p.multiplyByScalar(r,e._maxHeight,new o$1p),a=o$1p.cross(r,i,new o$1p);o$1p.normalize(a,a);var s=o$1p.multiplyByScalar(a,e._farDistance,new o$1p),l=new o$1p;o$1p.add(e._startPoint,s,l);var u=new o$1p;o$1p.add(e._endPoint,s,u);var c=new o$1p;o$1p.add(e._startPoint,o,c);var h=new o$1p;o$1p.add(e._endPoint,o,h);var d=new o$1p;o$1p.add(u,o,d);var f=new o$1p;o$1p.add(l,o,f);var p=m$19.eastNorthUpToFixedFrame(e._startPoint),_=p$1d.inverse(p,new p$1d);e._colorCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:p,pass:Le$q.OPAQUE,owner:e});for(var m=[e._startPoint,e._endPoint,u,l,c,h,d,f],g=S$14.createTypedArray(S$14.FLOAT,24),x=0;x<m.length;x++){var y=p$1d.multiplyByPoint(_,m[x],new o$1p);g[3*x]=y.x,g[3*x+1]=y.y,g[3*x+2]=y.z}var v=t$X.createVertexBuffer({context:t,typedArray:g,usage:A$18.STATIC_DRAW}),$=new s$V({name:"FacadeVp",sources:["attribute vec4 aPosition;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n"]}),b=new s$V({name:"FacadeFp",sources:["uniform vec4 uColor;\nvoid main(){\n gl_FragColor = uColor;\n}\n"]}),T=r$14.fromCache({context:t,vertexShaderSource:$,fragmentShaderSource:b,attributeLocations:{aPosition:0}}),C=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),S=[];S.push({name:"aPosition",index:0,vertexBuffer:v,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1});var w=S$14.createTypedArray(S$14.UNSIGNED_SHORT,36);w[0]=0,w[1]=1,w[2]=2,w[3]=0,w[4]=2,w[5]=3,w[6]=4,w[7]=5,w[8]=6,w[9]=4,w[10]=6,w[11]=7,w[12]=0,w[13]=1,w[14]=5,w[15]=0,w[16]=5,w[17]=4,w[18]=3,w[19]=2,w[20]=6,w[21]=3,w[22]=6,w[23]=7,w[24]=3,w[25]=0,w[26]=4,w[27]=3,w[28]=4,w[29]=7,w[30]=1,w[31]=2,w[32]=6,w[33]=1,w[34]=6,w[35]=5;var E=S$14.createTypedArray(S$14.UNSIGNED_SHORT,24);E[0]=0,E[1]=1,E[2]=1,E[3]=2,E[4]=2,E[5]=3,E[6]=3,E[7]=0,E[8]=4,E[9]=5,E[10]=5,E[11]=6,E[12]=6,E[13]=7,E[14]=7,E[15]=4,E[16]=0,E[17]=4,E[18]=1,E[19]=5,E[20]=2,E[21]=6,E[22]=3,E[23]=7;var P=new c$13({context:t,attributes:S,indexBuffer:t$X.createIndexBuffer({context:t,typedArray:w,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})});e._colorCommand.vertexArray=P,e._colorCommand.shaderProgram=T,e._colorCommand.renderState=C,e._colorCommand.uniformMap={uColor:function(){return e._hintBoundColor}},e._outlineCommand=new i$$({primitiveType:W$18.LINES,modelMatrix:p,pass:Le$q.OPAQUE,owner:e}),e._outlineCommand.shaderProgram=T;var A=new c$13({context:t,attributes:S,indexBuffer:t$X.createIndexBuffer({context:t,typedArray:E,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})});e._outlineCommand.vertexArray=A,e._outlineCommand.renderState=C,e._outlineCommand.uniformMap={uColor:function(){return e._hintBoundOutlineColor}}}}function f$m(e){const t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context,i=e.width,n=e.height;o$1q.defined("options.context",t),o$1q.defined("options.width",i),o$1q.defined("options.height",n),this._width=i,this._height=n;const r=e.colorRenderbuffers,o=e.colorTextures;if(e$2e(r)!==e$2e(o))throw new t$15("Both color renderbuffer and texture attachments must be provided.");const a=e.depthStencilRenderbuffer,s=e.depthStencilTexture;if(e$2e(a)!==e$2e(s))throw new t$15("Both depth-stencil renderbuffer and texture attachments must be provided.");this._renderFramebuffer=new t$V({context:t,colorRenderbuffers:r,depthStencilRenderbuffer:a,destroyAttachments:e.destroyAttachments}),this._colorFramebuffer=new t$V({context:t,colorTextures:o,depthStencilTexture:s,destroyAttachments:e.destroyAttachments})}function s$g(e){if(e=u$Z(e,u$Z.EMPTY_OBJECT),this._numSamples=u$Z(e.numSamples,1),this._colorAttachmentsLength=u$Z(e.colorAttachmentsLength,1),this._color=u$Z(e.color,!0),this._depth=u$Z(e.depth,!1),this._depthStencil=u$Z(e.depthStencil,!1),this._supportsDepthTexture=u$Z(e.supportsDepthTexture,!1),!this._color&&!this._depth&&!this._depthStencil)throw new t$15("Must enable at least one type of framebuffer attachment.");if(this._depth&&this._depthStencil)throw new t$15("Cannot have both a depth and depth-stencil attachment.");this._createColorAttachments=u$Z(e.createColorAttachments,!0),this._createDepthAttachments=u$Z(e.createDepthAttachments,!0),this._pixelDatatype=e.pixelDatatype,this._pixelFormat=e.pixelFormat,this._width=void 0,this._height=void 0,this._framebuffer=void 0,this._multisampleFramebuffer=void 0,this._colorTextures=void 0,this._color&&(this._colorTextures=new Array(this._colorAttachmentsLength),this._colorRenderbuffers=new Array(this._colorAttachmentsLength)),this._colorRenderbuffer=void 0,this._depthStencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthRenderbuffer=void 0,this._depthTexture=void 0,this._attachmentsDirty=!1}function d$q(e,t){if(o$1q.defined("context",e),!(e$2e(t)&&e$2e(t.positiveX)&&e$2e(t.negativeX)&&e$2e(t.positiveY)&&e$2e(t.negativeY)&&e$2e(t.positiveZ)&&e$2e(t.negativeZ)))throw new t$15("urls is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");var i=[t$10.createIfNeeded(t.positiveX).fetchImage(),t$10.createIfNeeded(t.negativeX).fetchImage(),t$10.createIfNeeded(t.positiveY).fetchImage(),t$10.createIfNeeded(t.negativeY).fetchImage(),t$10.createIfNeeded(t.positiveZ).fetchImage(),t$10.createIfNeeded(t.negativeZ).fetchImage()];return o$1l.all(i,(function(t){return new e$1P({context:e,source:{positiveX:t[0],negativeX:t[1],positiveY:t[2],negativeY:t[3],positiveZ:t[4],negativeZ:t[5]}})}))}Object.defineProperties(C$l.prototype,{readyPromise:{get:function(){return this._readyPromise}},farDistance:{get:function(){return this._farDistance},set:function(e){this._farDistance=e,this._update=!0}},maxHeight:{get:function(){return this._maxHeight},set:function(e){this._maxHeight=e,this._update=!0}},startPoint:{get:function(){return this._startPoint},set:function(e){this._startPoint=e,this._update=!0}},endPoint:{get:function(){return this._endPoint},set:function(e){this._endPoint=e,this._update=!0}}}),C$l.prototype.clear=function(){this._startPoint=void 0,this._endPoint=void 0,k$i(this)},C$l.prototype.setVisibleInViewport=function(e){if(e>8)throw new DeveloperError("the index is 0~8");this._visibleViewport=1<<e},C$l.prototype.getVisibleInViewport=function(e){if(e>8)throw new DeveloperError("the index is 0~8");return 1<<e&this._visibleViewport},C$l.prototype.destroy=function(){return this.clear(),e$2e(this._frameState)&&(e$2e(this._fbo)&&delete this._frameState._framebufferList[this._name],this._frameState=void 0),this._fbo=this._fbo&&this._fbo.destroy(),this._scene._analyst3D.remove(this._name,!0),i$11(this)},C$l.prototype.update=function(e,t,i){!e$2e(this._startPoint)||!e$2e(this._endPoint)||(this._update&&(k$i(this),pt$4(this),ft$3(this),this._update=!1),this._showBound&&e$2e(this._colorCommand)&&e$2e(this._outlineCommand)&&!t.passes.pick&&(i.push(this._colorCommand),i.push(this._outlineCommand)))},C$l.prototype.setBoundByPoints=function(e,t){this._startPoint=e,this._endPoint=t,this._update=!0},C$l.prototype.build=function(){""===this._name&&(this._name="facade"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this))},f$m.prototype.getRenderFramebuffer=function(){return this._renderFramebuffer},f$m.prototype.getColorFramebuffer=function(){return this._colorFramebuffer},f$m.prototype.blitFramebuffers=function(e,t){this._renderFramebuffer.bindRead(),this._colorFramebuffer.bindDraw();const i=e._gl;let n=0;this._colorFramebuffer._colorTextures.length>0&&(n|=i.COLOR_BUFFER_BIT),e$2e(this._colorFramebuffer.depthStencilTexture)&&(n|=i.DEPTH_BUFFER_BIT|(t?i.STENCIL_BUFFER_BIT:0)),i.blitFramebuffer(0,0,this._width,this._height,0,0,this._width,this._height,n,i.NEAREST),i.bindFramebuffer(i.READ_FRAMEBUFFER,null),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,null)},f$m.prototype.isDestroyed=function(){return!1},f$m.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),i$11(this)},Object.defineProperties(s$g.prototype,{framebuffer:{get:function(){return this._numSamples>1?this._multisampleFramebuffer.getRenderFramebuffer():this._framebuffer}},numSamples:{get:function(){return this._numSamples}},status:{get:function(){return this.framebuffer.status}}}),s$g.prototype.isDirty=function(e,t,i,n,r){i=u$Z(i,1);const o=this._width!==e||this._height!==t,a=this._numSamples!==i,s=e$2e(n)&&this._pixelDatatype!==n||e$2e(r)&&this._pixelFormat!==r,l=e$2e(1===i?this._framebuffer:this._multisampleFramebuffer);return this._attachmentsDirty||o||a||s||!l||this._color&&!e$2e(this._colorTextures[0])},s$g.prototype.update=function(e,t,i,n,r,o){if(!e$2e(t)||!e$2e(i))throw new t$15("width and height must be defined.");if(n=e.msaa?u$Z(n,1):1,r=u$Z(r,this._color?u$Z(this._pixelDatatype,_$_.UNSIGNED_BYTE):void 0),o=u$Z(o,this._color?u$Z(this._pixelFormat,V$12.RGBA):void 0),this.isDirty(t,i,n,r,o)){if(this.destroy(),this._width=t,this._height=i,this._numSamples=n,this._pixelDatatype=r,this._pixelFormat=o,this._attachmentsDirty=!1,this._color&&this._createColorAttachments)for(let n=0;n<this._colorAttachmentsLength;++n)if(this._colorTextures[n]=new t$U({context:e,width:t,height:i,pixelFormat:o,pixelDatatype:r,sampler:e$1S.NEAREST}),this._numSamples>1){const o=M$13.getColorFormat(r);this._colorRenderbuffers[n]=new r$10({context:e,width:t,height:i,format:o,numSamples:this._numSamples})}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new t$U({context:e,width:t,height:i,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8,sampler:e$1S.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new r$10({context:e,width:t,height:i,format:M$13.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new r$10({context:e,width:t,height:i,format:M$13.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new t$U({context:e,width:t,height:i,pixelFormat:V$12.DEPTH_COMPONENT,pixelDatatype:_$_.UNSIGNED_INT,sampler:e$1S.NEAREST}):this._depthRenderbuffer=new r$10({context:e,width:t,height:i,format:M$13.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new f$m({context:e,width:this._width,height:this._height,colorTextures:this._colorTextures,colorRenderbuffers:this._colorRenderbuffers,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}):this._framebuffer=new t$V({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}},s$g.prototype.getColorTexture=function(e){if((e=u$Z(e,0))>=this._colorAttachmentsLength)throw new t$15("index must be smaller than total number of color attachments.");return this._colorTextures[e]},s$g.prototype.setColorTexture=function(e,t){if(t=u$Z(t,0),this._createColorAttachments)throw new t$15("createColorAttachments must be false if setColorTexture is called.");if(t>=this._colorAttachmentsLength)throw new t$15("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e},s$g.prototype.getColorRenderbuffer=function(e){if((e=u$Z(e,0))>=this._colorAttachmentsLength)throw new t$15("index must be smaller than total number of color attachments.");return this._colorRenderbuffers[e]},s$g.prototype.setColorRenderbuffer=function(e,t){if(t=u$Z(t,0),this._createColorAttachments)throw new t$15("createColorAttachments must be false if setColorRenderbuffer is called.");if(t>=this._colorAttachmentsLength)throw new t$15("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e},s$g.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer},s$g.prototype.setDepthRenderbuffer=function(e){if(this._createDepthAttachments)throw new t$15("createDepthAttachments must be false if setDepthRenderbuffer is called.");this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e},s$g.prototype.getDepthTexture=function(){return this._depthTexture},s$g.prototype.setDepthTexture=function(e){if(this._createDepthAttachments)throw new t$15("createDepthAttachments must be false if setDepthTexture is called.");this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e},s$g.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer},s$g.prototype.setDepthStencilRenderbuffer=function(e){if(this._createDepthAttachments)throw new t$15("createDepthAttachments must be false if setDepthStencilRenderbuffer is called.");this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e},s$g.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture},s$g.prototype.setDepthStencilTexture=function(e){if(this._createDepthAttachments)throw new t$15("createDepthAttachments must be false if setDepthStencilTexture is called.");this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e},s$g.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)},s$g.prototype.clear=function(e,t,i){const n=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,i),t.framebuffer=n},s$g.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()},s$g.prototype.destroy=function(){if(this._color){let e;const t=this._colorTextures.length;for(e=0;e<t;++e){const t=this._colorTextures[e];this._createColorAttachments&&e$2e(t)&&!t.isDestroyed()&&(this._colorTextures[e].destroy(),this._colorTextures[e]=void 0),e$2e(t)&&t.isDestroyed()&&(this._colorTextures[e]=void 0);const i=this._colorRenderbuffers[e];this._createColorAttachments&&e$2e(i)&&!i.isDestroyed()&&(this._colorRenderbuffers[e].destroy(),this._colorRenderbuffers[e]=void 0),e$2e(i)&&i.isDestroyed()&&(this._colorRenderbuffers[e]=void 0)}}this._depthStencil&&(this._createDepthAttachments&&(this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()),e$2e(this._depthStencilTexture)&&this._depthStencilTexture.isDestroyed()&&(this._depthStencilTexture=void 0),e$2e(this._depthStencilRenderbuffer)&&this._depthStencilRenderbuffer.isDestroyed()&&(this._depthStencilRenderbuffer=void 0)),this._depth&&(this._createDepthAttachments&&(this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy()),e$2e(this._depthTexture)&&this._depthTexture.isDestroyed()&&(this._depthTexture=void 0),e$2e(this._depthRenderbuffer)&&this._depthRenderbuffer.isDestroyed()&&(this._depthRenderbuffer=void 0)),this.destroyFramebuffer()};class U$i{constructor(){}parse(e){const t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},i=function(e,t,i){t=t||1024;let n=e.pos,r=-1,o=0,a="",s=String.fromCharCode.apply(null,new Uint16Array(e.subarray(n,n+128)));for(;0>(r=s.indexOf("\n"))&&o<t&&n<e.byteLength;)a+=s,o+=s.length,n+=128,s+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(n,n+128)));return-1<r&&(!1!==i&&(e.pos+=o+r+1),a+s.slice(0,r))};const n=function(){const e=new ArrayBuffer(4),t=new Float32Array(e),i=new Uint32Array(e),n=new Uint32Array(512),r=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(n[e]=0,n[256|e]=32768,r[e]=24,r[256|e]=24):t<-14?(n[e]=1024>>-t-14,n[256|e]=1024>>-t-14|32768,r[e]=-t-1,r[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,r[e]=13,r[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,r[e]=24,r[256|e]=24):(n[e]=31744,n[256|e]=64512,r[e]=13,r[256|e]=13)}const o=new Uint32Array(2048),a=new Uint32Array(64),s=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,i=0;for(;0==(8388608&t);)t<<=1,i-=8388608;t&=-8388609,i+=947912704,o[e]=t|i}for(let e=1024;e<2048;++e)o[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)a[e]=e<<23;a[31]=1199570944,a[32]=2147483648;for(let e=33;e<63;++e)a[e]=2147483648+(e-32<<23);a[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(s[e]=1024);return{floatView:t,uint32View:i,baseTable:n,shiftTable:r,mantissaTable:o,exponentTable:a,offsetTable:s}}();function r(e){Math.abs(e)>65504&&console.warn("rgbe : toHalfFloat(): Value out of range."),e=function(e,t,i){return Math.max(t,Math.min(i,e))}(e,-65504,65504),n.floatView[0]=e;const t=n.uint32View[0],i=t>>23&511;return n.baseTable[i]+((8388607&t)>>n.shiftTable[i])}const o=function(e,t,i,n){const o=e[t+3],a=Math.pow(2,o-128)/255;i[n+0]=r(Math.min(e[t+0]*a,65504)),i[n+1]=r(Math.min(e[t+1]*a,65504)),i[n+2]=r(Math.min(e[t+2]*a,65504)),i[n+3]=r(1)},a=new Uint8Array(e);a.pos=0;const s=function(e){const n=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,r=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,o=/^\s*FORMAT=(\S+)\s*$/,a=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,s={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let l,u;if(e.pos>=e.byteLength||!(l=i(e)))return t(1,"no header found");if(!(u=l.match(/^#\?(\S+)/)))return t(3,"bad initial token");for(s.valid|=1,s.programtype=u[1],s.string+=l+"\n";l=i(e),!1!==l;)if(s.string+=l+"\n","#"!==l.charAt(0)){if((u=l.match(n))&&(s.gamma=parseFloat(u[1])),(u=l.match(r))&&(s.exposure=parseFloat(u[1])),(u=l.match(o))&&(s.valid|=2,s.format=u[1]),(u=l.match(a))&&(s.valid|=4,s.height=parseInt(u[1],10),s.width=parseInt(u[2],10)),2&s.valid&&4&s.valid)break}else s.comments+=l+"\n";return 2&s.valid?4&s.valid?s:t(3,"missing image size specifier"):t(3,"missing format specifier")}(a);if(-1!==s){const e=s.width,i=s.height,n=function(e,i,n){const r=i;if(r<8||r>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(r!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");const o=new Uint8Array(4*i*n);if(!o.length)return t(4,"unable to allocate buffer space");let a=0,s=0;const l=4*r,u=new Uint8Array(4),c=new Uint8Array(l);let h=n;for(;h>0&&s<e.byteLength;){if(s+4>e.byteLength)return t(1);if(u[0]=e[s++],u[1]=e[s++],u[2]=e[s++],u[3]=e[s++],2!=u[0]||2!=u[1]||(u[2]<<8|u[3])!=r)return t(3,"bad rgbe scanline format");let i,n=0;for(;n<l&&s<e.byteLength;){i=e[s++];const r=i>128;if(r&&(i-=128),0===i||n+i>l)return t(3,"bad scanline data");if(r){const t=e[s++];for(let e=0;e<i;e++)c[n++]=t}else c.set(e.subarray(s,s+i),n),n+=i,s+=i}const d=r;for(let e=0;e<d;e++){let t=0;o[a]=c[e+t],t+=r,o[a+1]=c[e+t],t+=r,o[a+2]=c[e+t],t+=r,o[a+3]=c[e+t],a+=4}h--}return o}(a.subarray(a.pos),e,i);if(-1!==n){let t;const r=n.length/4,a=new Uint16Array(4*r);for(let e=0;e<r;e++)o(n,4*e,a,4*e);return t=a,{width:e,height:i,data:t,header:s.string,gamma:s.gamma,exposure:s.exposure}}}return null}}function b$s(e,t){if(o$1q.defined("context",e),!e$2e(t))throw new t$15("urls is required and must have the url of image.");this._context=e,this._size=0,this._cubeVs=void 0,this._cubeUniformMap=void 0,this._cubeRenderState=void 0,this._inputTexture=void 0,this._cubeMap=void 0,this._sourceData=void 0,this._loading=!1,this._url=t,this._rgbeLoader=new U$i,this._inputTexture=void 0,this._ready=!1,this._position=o$1p.fromDegrees(113,23,1),this._modelMatrix=m$19.eastNorthUpToFixedFrame(this._position)}function xe$6(e){let t=[],i=[],n=0;function r(e,r,o,a,s,l,u,c,h,d,f){const p=l/h,_=u/d,m=l/2,g=u/2,x=c/2,y=h+1,v=d+1;let $=0;const b=new o$1p;for(let i=0;i<v;i++){const n=i*_-g;for(let i=0;i<y;i++){const l=i*p-m;b[e]=l*a,b[r]=n*s,b[o]=x,t.push(b.x,b.y,b.z),b[e]=0,b[r]=0,b[o]=c>0?1:-1,$+=1}}for(let e=0;e<d;e++)for(let t=0;t<h;t++){const r=n+t+y*e,o=n+t+y*(e+1),a=n+(t+1)+y*(e+1),s=n+(t+1)+y*e;i.push(r,o,s),i.push(o,a,s)}n+=$}r("z","y","x",-1,-1,1,1,1,1,1),r("z","y","x",1,-1,1,1,-1,1,1),r("x","z","y",1,1,1,1,1,1,1),r("x","z","y",1,-1,1,1,-1,1,1),r("x","y","z",1,-1,1,1,1,1,1),r("x","y","z",-1,-1,1,1,-1,1,1);let o=new Uint16Array(i),a=new Float32Array(t),s=new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:a})},indices:o,primitiveType:W$18.TRIANGLES,boundingSphere:i$1d.fromVertices(a)});return c$13.fromGeometry({context:e,geometry:s,attributeLocations:{position:0},bufferUsage:A$18.STATIC_DRAW})}function ye$6(e){return r$14.fromCache({context:e,vertexShaderSource:"\n precision mediump float;\n precision mediump int;\n\n attribute vec3 position;\n uniform mat4 projectionMat4;\n\n varying vec3 vWorldDirection;\n\n void main() {\n vWorldDirection = normalize(position);\n gl_Position = czm_modelViewProjection * vec4(position, 1.0);\n }\n ",fragmentShaderSource:"\n precision mediump float;\n precision mediump int;\n\n varying vec3 vWorldDirection;\n uniform sampler2D tEquirect;\n\n #define RECIPROCAL_PI 0.3183098861837907\n #define RECIPROCAL_PI2 0.15915494309189535\n\n vec2 equirectUv( in vec3 dir ) {\n // dir is assumed to be unit length\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n }\n\n void main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n }\n",attributeLocations:{position:0}})}function ge$a(e,t){let i=t;const n=e.context;i._cubeVs=xe$6(n),i._cubeSp=ye$6(n),i._cubeUniformMap={tEquirect:function(){return i._inputTexture}},i._cubeRenderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},viewport:new f$1a(0,0,i._size,i._size)}),i._cubeMap=new e$1P({context:n,width:i._size,height:i._size,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,flipY:!0});let r=p$1d.getRotation(i._modelMatrix,new p$1e),o=p$1e.getColumn(r,0,new o$1p),a=p$1e.getColumn(r,1,new o$1p),s=p$1e.getColumn(r,2,new o$1p),l=o$1p.multiplyByScalar(s,-1,new o$1p),u=o$1p.multiplyByScalar(a,-1,new o$1p),c=o$1p.multiplyByScalar(o,-1,new o$1p),h=new v$K(e.camera._scene);h.frustum.near=.1,h.frustum.aspectRatio=1,h.frustum.fov=90*e$2d.RADIANS_PER_DEGREE,i._projectionMat4=p$1d.clone(h.frustum.projectionMatrix,i._projectionMat4);let d=[o,l,a,c,s,u],f=[s,a,s,s,a,s],p=[i._cubeMap.positiveX,i._cubeMap.positiveY,i._cubeMap.positiveZ,i._cubeMap.negativeX,i._cubeMap.negativeY,i._cubeMap.negativeZ];for(let t=0;t<6;t++){let r=new t$V({context:n,colorTextures:[p[t]]}),o=new i$$({vertexArray:i._cubeVs,shaderProgram:i._cubeSp,uniformMap:i._cubeUniformMap,pass:Le$q.OPAQUE,primitiveType:W$18.TRIANGLES,renderState:i._cubeRenderState,modelMatrix:i._modelMatrix,cull:!1,owner:i,framebuffer:r,pickOnly:!0});h.setView({destination:i._position,orientation:{direction:d[t],up:f[t]}}),e.context.uniformState.updateCamera(h,e.context);let a=new n$$(e.context);e.context.draw(o,a)}}Object.defineProperties(b$s.prototype,{cubeMap:{get:function(){return this._cubeMap}},ready:{get:function(){return this._ready}}});let be$8=/(\.hdr$)/i,ve$7=/(\.jpg$)/i;function t$d(){}function E$m(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context,i=e.width,n=e.height,r=e.depth,o=e.mipmapLevels,a=e.is3D,s=u$Z(e.pixelFormat,V$12.RGBA),l=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),u=s,c=V$12.isCompressedFormat(u);if(s===V$12.DEPTH_STENCIL?u=de$y.DEPTH24_STENCIL8:s===V$12.DEPTH_COMPONENT&&(l===_$_.UNSIGNED_SHORT?u=de$y.DEPTH_COMPONENT16:l===_$_.UNSIGNED_INT&&(u=de$y.DEPTH_COMPONENT24)),l===_$_.FLOAT)switch(s){case V$12.RGBA:u=de$y.RGBA32F;break;case V$12.RGB:u=de$y.RGB32F;break;case V$12.RG:u=de$y.RG32F;break;case V$12.RED:u=de$y.R32F}else if(l===_$_.HALF_FLOAT)switch(s){case V$12.RGBA:u=de$y.RGBA16F;break;case V$12.RGB:u=de$y.RGB16F;break;case V$12.RG:u=de$y.RG16F;break;case V$12.RED:u=de$y.R16F}if(!e$2e(i)||!e$2e(n))throw new t$15("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(o$1q.typeOf.number.greaterThan("width",i,0),i>e$1W.maximumTextureSize)throw new t$15("Width must be less than or equal to the maximum texture size ("+e$1W.maximumTextureSize+"). Check maximumTextureSize.");if(o$1q.typeOf.number.greaterThan("height",n,0),n>e$1W.maximumTextureSize)throw new t$15("Height must be less than or equal to the maximum texture size ("+e$1W.maximumTextureSize+"). Check maximumTextureSize.");if(!V$12.validate(s))throw new t$15("Invalid options.pixelFormat.");if(!c&&!_$_.validate(l))throw new t$15("Invalid options.pixelDatatype.");if(s===V$12.DEPTH_COMPONENT&&l!==_$_.UNSIGNED_SHORT&&l!==_$_.UNSIGNED_INT)throw new t$15("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(s===V$12.DEPTH_STENCIL&&l!==_$_.UNSIGNED_INT_24_8)throw new t$15("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(l===_$_.FLOAT&&!t.floatingPointTexture)throw new t$15("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(l===_$_.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$15("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(V$12.isDepthFormat(s)&&!t.depthTexture)throw new t$15("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.");if(c){if(V$12.isDXTFormat(u)&&!t.s3tc)throw new t$15("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(V$12.isPVRTCFormat(u)&&!t.pvrtc)throw new t$15("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(V$12.isETC1Format(u)&&!t.etc1)throw new t$15("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.")}var h,d=e.preMultiplyAlpha||s===V$12.RGB||s===V$12.LUMINANCE,f=u$Z(e.flipY,!0),p=t._gl,_=a?p.TEXTURE_3D:p.TEXTURE_2D_ARRAY,m=p.createTexture();p.activeTexture(p.TEXTURE0),p.bindTexture(_,m),p.texStorage3D(_,o,u,i,n,r),p.bindTexture(_,null),h=c?V$12.compressedTextureSizeInBytes(s,i,n,r):V$12.textureSizeInBytes(s,l,i,n,r),this._id=e$1T(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=_,this._texture=m,this._pixelFormat=s,this._internalFormat=u,this._pixelDatatype=l,this._width=i,this._height=n,this._depth=r,this._dimensions=new o$1p(i,n,r),this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0,this.ignoreWEBGL2=!1,this._isCompressed=c,this.sampler=e$2e(e.sampler)?e.sampler:new e$1S,t.memorySize+=h}function L$n(e,t,i,n){if(!e$2d.isPowerOfTwo(i)||!e$2d.isPowerOfTwo(n))return!1;for(var r=e.length,o=i,a=n,s=0;;){if(s+=V$12.compressedTextureSizeInBytes(t,o,a),a>>=1,0==(o>>=1)&&0==a)break;o=Math.max(o,1),a=Math.max(a,1)}return s==r}function b$r(e,t,i){switch(e){case V$12.RGB_DXT1:case V$12.RGB_ETC1:return(t+3>>2)*(i+3>>2)*8;case V$12.RGBA_DXT5:return(t+3>>2)*(i+3>>2)*16;case V$12.RGB_PVRTC_4BPPV1:case V$12.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case V$12.RGB_PVRTC_2BPPV1:case V$12.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case de$y.RGB565:return t*i*2;case V$12.RGBA:return t*i*4;case V$12.LUMINANCE_ALPHA:return t*i*2;default:return 0}}function f$l(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).context,i=e.width,n=e.height,r=e.depth,o=e.mipmapLevels,a=e.is3D,s=u$Z(e.pixelFormat,V$12.RGBA),l=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),u=s,c=V$12.isCompressedFormat(u);if(s===V$12.DEPTH_STENCIL?u=de$y.DEPTH24_STENCIL8:s===V$12.DEPTH_COMPONENT&&(l===_$_.UNSIGNED_SHORT?u=de$y.DEPTH_COMPONENT16:l===_$_.UNSIGNED_INT&&(u=de$y.DEPTH_COMPONENT24)),l===_$_.FLOAT)switch(s){case V$12.RGBA:u=de$y.RGBA32F;break;case V$12.RGB:u=de$y.RGB32F;break;case V$12.RG:u=de$y.RG32F;break;case V$12.RED:u=de$y.R32F}else if(l===_$_.HALF_FLOAT)switch(s){case V$12.RGBA:u=de$y.RGBA16F;break;case V$12.RGB:u=de$y.RGB16F;break;case V$12.RG:u=de$y.RG16F;break;case V$12.RED:u=de$y.R16F}if(!e$2e(i)||!e$2e(n))throw new t$15("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(o$1q.typeOf.number.greaterThan("width",i,0),i>e$1W.maximumTextureSize)throw new t$15("Width must be less than or equal to the maximum texture size ("+e$1W.maximumTextureSize+"). Check maximumTextureSize.");if(o$1q.typeOf.number.greaterThan("height",n,0),n>e$1W.maximumTextureSize)throw new t$15("Height must be less than or equal to the maximum texture size ("+e$1W.maximumTextureSize+"). Check maximumTextureSize.");if(!V$12.validate(s))throw new t$15("Invalid options.pixelFormat.");if(!c&&!_$_.validate(l))throw new t$15("Invalid options.pixelDatatype.");if(s===V$12.DEPTH_COMPONENT&&l!==_$_.UNSIGNED_SHORT&&l!==_$_.UNSIGNED_INT)throw new t$15("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(s===V$12.DEPTH_STENCIL&&l!==_$_.UNSIGNED_INT_24_8)throw new t$15("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(l===_$_.FLOAT&&!t.floatingPointTexture)throw new t$15("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(l===_$_.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new t$15("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(V$12.isDepthFormat(s)&&!t.depthTexture)throw new t$15("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.");if(c){if(V$12.isDXTFormat(u)&&!t.s3tc)throw new t$15("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_texture_compression_s3tc extension. Check context.s3tc.");if(V$12.isPVRTCFormat(u)&&!t.pvrtc)throw new t$15("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_texture_compression_pvrtc extension. Check context.pvrtc.");if(V$12.isETC1Format(u)&&!t.etc1)throw new t$15("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_texture_compression_etc1 extension. Check context.etc1.")}var h,d=e.preMultiplyAlpha||s===V$12.RGB||s===V$12.LUMINANCE,f=u$Z(e.flipY,!0),p=t._gl,_=a?p.TEXTURE_3D:p.TEXTURE_2D_ARRAY,m=p.createTexture();p.activeTexture(p.TEXTURE0),p.bindTexture(_,m),p.texStorage3D(_,o,u,i,n,r),p.bindTexture(_,null),h=c?V$12.compressedTextureSizeInBytes(s,i,n,r):V$12.textureSizeInBytes(s,l,i,n,r),this._id=e$1T(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=_,this._texture=m,this._pixelFormat=s,this._internalFormat=u,this._pixelDatatype=l,this._width=i,this._height=n,this._depth=r,this._dimensions=new o$1p(i,n,r),this._hasMipmap=!1,this._sizeInBytes=h,this._preMultiplyAlpha=d,this._flipY=f,this._sampler=void 0,this.ignoreWEBGL2=!1,this._isCompressed=c,this.sampler=e$2e(e.sampler)?e.sampler:new e$1S,t.memorySize+=h}function C$k(e,t,i,n){if(!e$2d.isPowerOfTwo(i)||!e$2d.isPowerOfTwo(n))return!1;for(var r=e.length,o=i,a=n,s=0;;){if(s+=V$12.compressedTextureSizeInBytes(t,o,a),a>>=1,0==(o>>=1)&&0==a)break;o=Math.max(o,1),a=Math.max(a,1)}return s==r}function L$m(e,t,i){switch(e){case V$12.RGB_DXT1:case V$12.RGB_ETC1:return(t+3>>2)*(i+3>>2)*8;case V$12.RGBA_DXT5:return(t+3>>2)*(i+3>>2)*16;case V$12.RGB_PVRTC_4BPPV1:case V$12.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case V$12.RGB_PVRTC_2BPPV1:case V$12.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case de$y.RGB565:return t*i*2;case V$12.RGBA:return t*i*4;case V$12.LUMINANCE_ALPHA:return t*i*2;default:return 0}}function e$k(e){(e=u$Z(e,u$Z.EMPTY_OBJECT)).context.webgpu?this._inner=new f$l(e):this._inner=new E$m(e)}b$s.prototype.update=function(e){if(!e$2e(this._sourceData)&&!this._loading){let e=t$10.createIfNeeded(this._url);be$8.test(this._url)?e.fetchArrayBuffer().then((e=>{this._sourceData=this._rgbeLoader.parse(e)})).otherwise((e=>{this._loading=!1})):ve$7.test(this._url)&&e.fetchImage().then((e=>{this._sourceData=e})).otherwise((e=>{this._loading=!1})),this._loading=!0}if(e$2e(this._sourceData)){if(!e$2e(this._inputTexture)){let t=this._sourceData.data?{arrayBufferView:this._sourceData.data,width:this._sourceData.width,height:this._sourceData.height}:this._sourceData;this._inputTexture=new t$U({context:e.context,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,flipY:!0,source:t}),this._size=Math.min(this._sourceData.width,this._sourceData.height)}this._ready||(ge$a(e,this),this._ready=!0)}},b$s.prototype.isDestroyed=function(){return!1},b$s.prototype.destroy=function(){return this._inputTexture=this._inputTexture&&this._inputTexture.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),destroyObject(this)},t$d.drawSimplePolyline=function(e,t){var i,n=t.canvasPostions,r=u$Z(t.lineWidth,1),o=u$Z(t.lineColor,e$1X.WHITE),a=n.length;for(e.lineWidth=r,e.strokeStyle=o.toCssColorString(),e.beginPath(),e.moveTo(n[0].x,n[0].y),i=1;i<a;i++)e.lineTo(n[i].x,n[i].y);e.stroke()},t$d.drawPolygon=function(e,t){var i,n=t.canvasPostions,r=u$Z(t.lineWidth,1),o=u$Z(t.lineColor,e$1X.WHITE),a=u$Z(t.fillColor,e$1X.RED),s=n.length;for(e.lineWidth=r,e.strokeStyle=o.toCssColorString(),e.fillStyle=a.toCssColorString(),e.beginPath(),e.moveTo(n[0].x,n[0].y),i=1;i<s;i++)e.lineTo(n[i].x,n[i].y);e.closePath(),e.stroke(),e.fill()},Object.defineProperties(t$d.prototype,{}),t$d.prototype.destroy=function(){return i$11(this)},Object.defineProperties(E$m.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$i.NEAREST_MIPMAP_NEAREST||t===tt$i.NEAREST_MIPMAP_LINEAR||t===tt$i.LINEAR_MIPMAP_NEAREST||t===tt$i.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;const a=this._pixelFormat;(o===_$_.FLOAT&&!r.textureFloatLinear||o===_$_.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$i.NEAREST_MIPMAP_NEAREST:tt$i.NEAREST,i=rt$k.NEAREST),r.webgl2&&V$12.isDepthFormat(a)&&(t=tt$i.NEAREST,i=rt$k.NEAREST);var s=r._gl,l=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(l,this._texture),s.texParameteri(l,s.TEXTURE_MIN_FILTER,t),s.texParameteri(l,s.TEXTURE_MAG_FILTER,i),s.texParameteri(l,s.TEXTURE_WRAP_S,e.wrapS),s.texParameteri(l,s.TEXTURE_WRAP_T,e.wrapT),e$2e(this._textureFilterAnisotropic)&&s.texParameteri(l,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),s.bindTexture(l,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),E$m.prototype.setDataBufferWithMipmap=function(e,t){var i=this._context._gl;i.activeTexture(i.TEXTURE0),i.bindTexture(this._textureTarget,this._texture);var n=this._width,r=this._height,o=L$n(t,this._internalFormat,n,r),a=0,s=0;do{var l,u=b$r(this._internalFormat,n,r);l=this._internalFormat==V$12.RGBA&&this._pixelDatatype===_$_.FLOAT?new Float32Array(t.buffer,t.byteOffset+a,u):new Uint8Array(t.buffer,t.byteOffset+a,u),this._isCompressed?i.compressedTexSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,l):i.texSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,this._pixelDatatype,l),n=Math.max(n>>1,1),r=Math.max(r>>1,1),a+=u}while(a<t.length&&o);i.bindTexture(this._textureTarget,null)},E$m.prototype.generateMipmap=function(e){if(e=u$Z(e,I$1e.DONT_CARE),this._width>1&&!e$2d.isPowerOfTwo(this._width))throw new t$15("width must be a power of two to call generateMipmap().");if(this._height>1&&!e$2d.isPowerOfTwo(this._height))throw new t$15("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},E$m.prototype.isDestroyed=function(){return!1},E$m.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,i$11(this)},f$l.create=function(e){return new Texture(e)},Object.defineProperties(f$l.prototype,{id:{set:function(e){this._id=e},get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===tt$i.NEAREST_MIPMAP_NEAREST||t===tt$i.NEAREST_MIPMAP_LINEAR||t===tt$i.LINEAR_MIPMAP_NEAREST||t===tt$i.LINEAR_MIPMAP_LINEAR,r=this._context,o=this._pixelDatatype;(o===_$_.FLOAT&&!r.textureFloatLinear||o===_$_.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=n?tt$i.NEAREST_MIPMAP_NEAREST:tt$i.NEAREST,i=rt$k.NEAREST);var a=r._gl,s=this._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(s,this._texture),a.texParameteri(s,a.TEXTURE_MIN_FILTER,t),a.texParameteri(s,a.TEXTURE_MAG_FILTER,i),a.texParameteri(s,a.TEXTURE_WRAP_S,e.wrapS),a.texParameteri(s,a.TEXTURE_WRAP_T,e.wrapT),e$2e(this._textureFilterAnisotropic)&&a.texParameteri(s,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),a.bindTexture(s,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),f$l.prototype.setDataBufferWithMipmap=function(e,t){var i=this._context._gl;i.activeTexture(i.TEXTURE0),i.bindTexture(this._textureTarget,this._texture);var n=this._width,r=this._height,o=C$k(t,this._internalFormat,n,r),a=0,s=0;do{var l,u=L$m(this._internalFormat,n,r);l=this._internalFormat==V$12.RGBA&&this._pixelDatatype===_$_.FLOAT?new Float32Array(t.buffer,t.byteOffset+a,u):new Uint8Array(t.buffer,t.byteOffset+a,u),this._isCompressed?i.compressedTexSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,l):i.texSubImage3D(this._textureTarget,s++,0,0,e,n,r,1,this._internalFormat,this._pixelDatatype,l),n=Math.max(n>>1,1),r=Math.max(r>>1,1),a+=u}while(a<t.length&&o);i.bindTexture(this._textureTarget,null)},f$l.prototype.generateMipmap=function(e){if(e=u$Z(e,I$1e.DONT_CARE),this._width>1&&!e$2d.isPowerOfTwo(this._width))throw new t$15("width must be a power of two to call generateMipmap().");if(this._height>1&&!e$2d.isPowerOfTwo(this._height))throw new t$15("height must be a power of two to call generateMipmap().");var t=this._gl,i=this._target;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i)},f$l.prototype.isDestroyed=function(){return!1},f$l.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._context.memorySize-=this._sizeInBytes,i$11(this)},e$k.create=function(e){return new Texture(e)},Object.defineProperties(e$k.prototype,{id:{set:function(e){this._inner.id=e},get:function(){return this._inner.id}},sampler:{get:function(){return this._inner.sampler},set:function(e){this._inner.sampler=e}},pixelFormat:{get:function(){return this._inner.pixelFormat}},pixelDatatype:{get:function(){return this._inner.pixelDatatype}},dimensions:{get:function(){return this._inner.dimensions}},preMultiplyAlpha:{get:function(){return this._inner.preMultiplyAlpha}},flipY:{get:function(){return this._inner.flipY}},width:{get:function(){return this._inner.width}},height:{get:function(){return this._inner.height}},sizeInBytes:{get:function(){return this._inner.sizeInBytes}},_target:{get:function(){return this._inner._target}}}),e$k.prototype.setDataBufferWithMipmap=function(e,t){this._inner.setDataBufferWithMipmap(e,t)},e$k.prototype.generateMipmap=function(e){this._inner.generateMipmap(e)},e$k.prototype.isDestroyed=function(){return!1},e$k.prototype.destroy=function(){return this._inner.destroy(),i$11(this)};var _0xcede1d=(_0x45a963=!0,function(e,t){var i=_0x45a963?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45a963=!1,i}),_0x407ae0=_0xcede1d(void 0,(function(){return _0x407ae0.toString().search("(((.+)+)+)+$").toString().constructor(_0x407ae0).search("(((.+)+)+)+$")})),_0x45a963;function _0x5993b9(){}function _0x1cb613(e){var t={},i=e.vertexAttributes;for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n].index);return t}function _0x345eab(e,t,i){var n=t.context,r=u$Z(i,e.shaderProgram),o=r.fragmentShaderSource.clone(),a=[];o.sources=o.sources.map((function(e){e=ShaderSource.replaceMain(e,"czm_Debug_main");for(var t,i=/gl_FragData\[(\d+)\]/g;null!==(t=i.exec(e));)-1===a.indexOf(t[1])&&a.push(t[1]);return e}));var s,l=a.length,u="void main() \n{ \n czm_Debug_main(); \n";if(t.debugShowCommands){e$2e(e._debugColor)||(e._debugColor=e$1X.fromRandom());var c=e._debugColor;if(l>0)for(s=0;s<l;++s)u+=" gl_FragData["+a[s]+"].rgb *= vec3("+c.red+", "+c.green+", "+c.blue+"); \n";else u+=" gl_FragColor.rgb *= vec3("+c.red+", "+c.green+", "+c.blue+"); \n"}if(t.debugShowFrustums){var h=1&e.debugOverlappingFrustums?"1.0":"0.0",d=2&e.debugOverlappingFrustums?"1.0":"0.0",f=4&e.debugOverlappingFrustums?"1.0":"0.0";if(l>0)for(s=0;s<l;++s)u+=" gl_FragData["+a[s]+"].rgb *= vec3("+h+", "+d+", "+f+"); \n";else u+=" gl_FragColor.rgb *= vec3("+h+", "+d+", "+f+"); \n"}u+="}",o.sources.push(u);var p=_0x1cb613(r);return r$14.fromCache({context:n,vertexShaderSource:r.vertexShaderSource,fragmentShaderSource:o,attributeLocations:p})}_0x407ae0(),_0x5993b9.debugShowBoundingVolume=function(e,t,i,n){var r=t._frameState,o=r.context,a=e.boundingVolume;e$2e(t._debugVolume)&&t._debugVolume.destroy();var s,l=o$1p.clone(a.center);if(r.mode!==SceneMode.SCENE3D){l=p$1d.multiplyByPoint(_0x101e20,l,l);var u=r.mapProjection,c=u.unproject(l);l=u.ellipsoid.cartographicToCartesian(c)}if(e$2e(a.radius)){var h=a.radius;s=GeometryPipeline.toWireframe(EllipsoidGeometry.createGeometry(new EllipsoidGeometry({radii:new o$1p(h,h,h),vertexFormat:PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Primitive({geometryInstances:new GeometryInstance({geometry:s,modelMatrix:p$1d.fromTranslation(l),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)}}),appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1}),asynchronous:!1})}else{var d=a.halfAxes;s=GeometryPipeline.toWireframe(BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new o$1p(2,2,2),vertexFormat:PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Primitive({geometryInstances:new GeometryInstance({geometry:s,modelMatrix:p$1d.fromRotationTranslation(d,l,new p$1d),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)}}),appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1}),asynchronous:!1})}var f,p=r.commandList,_=r.commandList=[];(t._debugVolume.update(r),e=_[0],r.useLogDepth)&&(e=DerivedCommand.createLogDepthCommand(e,o).command);e$2e(n)&&(f=i.framebuffer,i.framebuffer=n),e.execute(o,i),e$2e(f)&&(i.framebuffer=f),r.commandList=p},_0x5993b9.executeDebugCommand=function(e,t,i){var n=i$$.shallowClone(e);n.shaderProgram=_0x345eab(e,t),n.execute(t.context,i),n.shaderProgram.destroy()};var _0x101e20=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);_0x101e20=p$1d.inverseTransformation(_0x101e20,_0x101e20),_0x5993b9.prototype.isDestroyed=function(){return!1},_0x5993b9.prototype.destroy=function(){};var _0x52f4af=(_0x24de97=!0,function(e,t){var i=_0x24de97?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24de97=!1,i}),_0x74b408=_0x52f4af(void 0,(function(){return _0x74b408.toString().search("(((.+)+)+)+$").toString().constructor(_0x74b408).search("(((.+)+)+)+$")})),_0x24de97;function _0x707ed3(){this.lightCount=new Uint16Array(_0x4970c2.MAX_FORWARD_PLUS_LIGHTS),this.objCount=new Uint16Array(2)}_0x74b408(),Object.defineProperties(_0x707ed3.prototype,{width:{get:function(){return this._width}},height:{get:function(){return this._height}},zEnd:{get:function(){return this._zEnd}}}),_0x707ed3.prototype.reset=function(){for(var e=0,t=this.lightCount.length;e<t;e++)this.lightCount[e]=0;for(e=0,t=this.objCount.length;e<t;e++)this.objCount[e]=0};var _0x2368d7=(_0xec517a=!0,function(e,t){var i=_0xec517a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xec517a=!1,i}),_0x105679=_0x2368d7(void 0,(function(){return _0x105679.toString().search("(((.+)+)+)+$").toString().constructor(_0x105679).search("(((.+)+)+)+$")})),_0xec517a;_0x105679();const _0x4d3a1f=4;function _0x242e5b(){this.globalLightBatchTable=null,this.gridBatchTable=null}function _0x4243b5(){this.camera=null,this.lastPos=new o$1p,this.lastRot=new o$1p,this.reflection=!1,this.aspectRatio=1,this.visibilityMask=null,this.shadowNode=null,this.lastFrame=0,this.currentBufIdx=-1,this.gridBuffers=null}function _0x149e59(e,t,i){this.width=u$Z(e,0),this.height=u$Z(t,0),this.zEnd=u$Z(i,0)}function _0x3fcb29(e,t,i,n,r,o,a){this._scene=a,this._cachedGrid=[],this._currentLightList=[],this._forwardPlusNumFloat4PerLight=_0x4d3a1f,this._globalLightBatchTableStep=new e$2c,this._globalLightBatchTableDimensions=new o$1o,this._lastTotalLightCount=-1,this._scene=a,this._width=e,this._height=t,this._numSlices=i,this._lightsPerCell=n+3,this._minDistance=r,this._maxDistance=o,this._tableSize=this._width*this._height*this._lightsPerCell,this._invMaxDistance=1/this._maxDistance;var s=e,l=t;this._resolutionAtSlice=[];for(var u=0;u<i;++u)this._resolutionAtSlice.push(new _0x149e59(s,l,this.getDepthAtSlice(u+1))),s*=2,l*=2;this._resolutionAtSlice[i-1].zEnd=99999999999999;var c=-(1-(1<<(i<<1)))/3*e*t;this._lightCountInCell=[];for(u=0;u<c;u++)this._lightCountInCell.push(new _0x707ed3);this.initLightGridBatchTable()}Object.defineProperties(_0x3fcb29.prototype,{});var _0x296ffa=new o$1o;_0x3fcb29.prototype.getGlobalLightTableSize=function(e){var t=Math.floor(1024/_0x4d3a1f),i=e,n=Math.min(i,t),r=_0x4d3a1f*n,o=Math.ceil(i/n);return o=e$2d.nextPowerOfTwo(o),_0x296ffa.x=r,_0x296ffa.y=o,_0x296ffa},_0x3fcb29.prototype.initGlobalLightTable=function(e){var t=1/e.x,i=.5*t,n=1/e.y,r=.5*n;this._globalLightBatchTableDimensions=new o$1o(e.x,e.y),this._globalLightBatchTableStep=new e$2c(t,i,n,r)};var _0x1ba5c4=new p$1e;function _0x5ed5d6(e,t){return e.lightType!=t.lightType?e.lightType<t.lightType:e.distanceToCamera<t.distanceToCamera}_0x3fcb29.prototype.fillGlobalLightListBuffer=function(e,t,i){if(this._currentLightList.length){var n=e.viewMatrix;p$1d.getRotation(n,_0x1ba5c4);for(var r=0,o=0,a=this._currentLightList.length;o<a;o++){var s=this._currentLightList[o];s.lightType==_0x4970c2.POINT?(i[r++]=s.positionEC.x,i[r++]=s.positionEC.y,i[r++]=s.positionEC.z,i[r++]=s.lightType,i[r++]=s.lightColor.red,i[r++]=s.lightColor.green,i[r++]=s.lightColor.blue,i[r++]=0,i[r++]=s.cutoffDistance,i[r++]=s.decay,i[r++]=0,i[r++]=0,r+=4):s.lightType==_0x4970c2.SPOT&&(i[r++]=s.positionEC.x,i[r++]=s.positionEC.y,i[r++]=s.positionEC.z,i[r++]=s.lightType,i[r++]=s.directionEC.x,i[r++]=s.directionEC.y,i[r++]=s.directionEC.z,i[r++]=0,i[r++]=s.lightColor.red,i[r++]=s.lightColor.green,i[r++]=s.lightColor.blue,i[r++]=s.exponent,i[r++]=s.distance,i[r++]=s.decay,i[r++]=s.angleCos,i[r++]=s.penumbraCos)}t.copyFrom({width:this._globalLightBatchTableDimensions.x,height:this._globalLightBatchTableDimensions.y,arrayBufferView:i},0,0)}},_0x3fcb29.prototype.getCachedGridFor=function(e){for(var t=this._scene._frameState.frameNumber,i=0;i<this._cachedGrid.length;i++){var n=this._cachedGrid[i];if(n.camera==e&&n.reflection==e.bReflect&&Math.abs(n.aspectRatio-e.frustum.aspectRatio)<e$2d.EPSILON7){var r=n.lastFrame==t;return n.lastFrame=t,r?(!o$1p.equals(n.lastPos,e.position)||!o$1p.equals(n.lastRot,e.direction))&&(n.currentBufIdx++,n.currentBufIdx>=n.gridBuffers.length&&n.gridBuffers.push(new _0x242e5b),r=!1):n.currentBufIdx=0,o$1p.clone(e.position,n.lastPos),o$1p.clone(e.direction,n.lastRot),{upToDate:r,cacheGrid:n}}}var o=new _0x4243b5;return o.camera=e,o$1p.clone(e.position,o.lastPos),o$1p.clone(e.direction,o.lastRot),o.reflection=e.bReflect,o.aspectRatio=e.frustum.aspectRatio,o.lastFrame=t,o.currentBufIdx=0,o.gridBuffers=[new _0x242e5b],this._cachedGrid.push(o),{upToDate:!1,cacheGrid:o}},_0x3fcb29.prototype.deleteOldGridBuffers=function(){for(var e=this._scene._frameState.frameNumber,t=this._cachedGrid.length,i=0;i<t;){var n=this._cachedGrid[i];if(n.lastFrame+3<e){for(var r=0;r<n.gridBuffers.length;r++){var o=n.gridBuffers[r];o.gridBatchTable&&(o.gridBatchTable.destroy(),o.gridBatchTable=null),o.globalLightBatchTable&&(o.globalLightBatchTable.destroy(),o.globalLightBatchTable=null)}var a=this._cachedGrid[this._cachedGrid.length-1];this._cachedGrid[i]=a,this._cachedGrid.pop(),i++,t=this._cachedGrid.length}else i++}},_0x3fcb29.prototype.initParamterForLightUBO=function(e){e.addUniform("uLightGridTextureStep",4),e.addUniform("uLightGridTextureDimension",2),e.addUniform("uGlobalLightTextureStep",4),e.addUniform("uGlobalLightTextureDimension",2),e.addUniform("uLightMinDistance",1),e.addUniform("uLightInvMaxDistance",1),e.addUniform("uLightGridNumSilces",1),e.addUniform("uLightGridTableSize",1),e.addUniform("uF3dViewportOffset",4),e.addUniform("uF3dGridHWW",4,this._numSlices)},_0x3fcb29.prototype.fillLightUBO=function(e){var t=this._lightGridBatchTableStep,i=this._lightGridBatchTableDimensions;e.updateFloat4("uLightGridTextureStep",t.x,t.y,t.z,t.w),e.updateFloat2("uLightGridTextureDimension",i.x,i.y),t=this._globalLightBatchTableStep,i=this._globalLightBatchTableDimensions,e.updateFloat4("uGlobalLightTextureStep",t.x,t.y,t.z,t.w),e.updateFloat2("uGlobalLightTextureDimension",i.x,i.y),e.updateFloat("uLightMinDistance",this._minDistance),e.updateFloat("uLightInvMaxDistance",this._invMaxDistance),e.updateFloat("uLightGridNumSilces",this._numSlices-1),e.updateFloat("uLightGridTableSize",this._tableSize);var n=this._scene._context.drawingBufferWidth,r=this._scene._context.drawingBufferHeight;e.updateFloat4("uF3dViewportOffset",0,0,0,0);for(var o=new Float32Array(4*this._numSlices),a=0,s=0;s<this._numSlices;++s)o[a++]=this._resolutionAtSlice[s].width/n,o[a++]=this._resolutionAtSlice[s].height/r,o[a++]=this._resolutionAtSlice[s].width*this._lightsPerCell,o[a++]=s<1?this._lightsPerCell:r;e.updateFloatArray("uF3dGridHWW",o)},_0x3fcb29.prototype.createLightUniformMap=function(e){var t=this;(e={}).uLightGridTextureStep=function(){return t._lightGridBatchTableStep},e.uLightGridTextureDimension=function(){return t._lightGridBatchTableDimensions},e.uGlobalLightTextureStep=function(){return t._globalLightBatchTableStep},e.uGlobalLightTextureDimension=function(){return t._globalLightBatchTableDimensions},e.uLightMinDistance=function(){return t._minDistance},e.uLightInvMaxDistance=function(){return t._invMaxDistance},e.uLightGridNumSilces=function(){return t._numSlices-1},e.uLightGridTableSize=function(){return t._tableSize};for(var i=this._scene._context.drawingBufferWidth,n=this._scene._context.drawingBufferHeight,r=[],o=0;o<this._numSlices;++o){var a=new e$2c;a.x=this._resolutionAtSlice[o].width/i,a.y=this._resolutionAtSlice[o].height/n,a.z=this._resolutionAtSlice[o].width*this._lightsPerCell,a.w=o<1?this._lightsPerCell:n,r.push(a)}return e.uF3dGridHWW=function(){return r},e.uLightGridTexture=function(){return e$2e(t._ubo.lightGridTexture)?t._ubo.lightGridTexture:t._scene._context.defaultTexture},e.uGlobalLightListTexture=function(){return e$2e(t._ubo.globalLightListTexture)?t._ubo.globalLightListTexture:t._scene._context.defaultTexture},e},_0x3fcb29.prototype.initLightGridBatchTable=function(){var e=Math.floor(1024/this._lightsPerCell),t=-(1-(1<<(this._numSlices<<1)))/3*this._width*this._height,i=Math.min(t,e),n=this._lightsPerCell*i,r=Math.ceil(t/i),o=1/n,a=.5*o,s=1/(r=e$2d.nextPowerOfTwo(r)),l=.5*s;this._lightGridBatchTableDimensions=new o$1o(n,r),this._lightGridBatchTableStep=new e$2c(o,a,s,l)},_0x3fcb29.prototype.getDepthAtSlice=function(e){return-(e/(this._numSlices-1)*this._maxDistance-this._minDistance)},_0x3fcb29.prototype.getSliceAtDepth=function(e){var t=e$2d.clamp((-e+this._minDistance)*this._invMaxDistance,0,1);return Math.floor(t*(this._numSlices-1))},_0x3fcb29.prototype.projectionSpaceToGridSpace=function(e,t){var i=this._resolutionAtSlice[t],n=e$2d.clamp(e.x,0,1)*i.width,r=e$2d.clamp(e.y,0,1)*i.height;return{outX:Math.min(Math.floor(n),i.width-1),outY:Math.min(Math.floor(r),i.height-1)}};var _0x3139ed=new e$2c,_0x16a150=new Float32Array(256),_0x3f2bc8,_0x29a656,_0x18c864=[new o$1p,new o$1p],_0x1fe43c=[new o$1p,new o$1p],_0x5ec832=new o$1p,_0xd293fb=new o$1p,_0x5ad90b=new o$1o,_0x4e9af2=new o$1o,_0x22c04c=[new e$2c,new e$2c],_0x176984=[new e$2c,new e$2c],_0x5edd06=new p$1d,_0x4030b3=new e$29;_0x3fcb29.prototype.collectLights=function(){var e=this._scene,t=e._frameState.passes,i=this._scene.context;if(this._ubo.textureDirty=!1,!t.pick&&!t.depth){var n,r=e.camera,o=this.getCachedGridFor(r);if(!o.upToDate){n=o.cacheGrid;var a=e._frameState.lightSource,s=a.pointLight.length+a.spotLight.length;if(0==s&&s==this._lastTotalLightCount)return;this._lastTotalLightCount=s,this._currentLightList=[];for(var l=a._visibleLightList[_0x4970c2.POINT].values,u=a._visibleLightList[_0x4970c2.SPOT].values,c=0;c<l.length;c++)this._currentLightList.push(l[c]);for(c=0;c<u.length;c++)this._currentLightList.push(u[c]);var h=this._currentLightList.length;m$I(this._currentLightList,_0x5ed5d6);var d=n.gridBuffers[n.currentBufIdx];if(!d.gridBatchTable){var f=-(1-(1<<(this._numSlices<<1)))/3;_0x29a656=new Float32Array(this._lightGridBatchTableDimensions.x*this._lightGridBatchTableDimensions.y),d.gridBatchTable=new t$U({context:i,pixelFormat:i.webgpu?V$12.RED:V$12.LUMINANCE,pixelDatatype:_$_.FLOAT,width:this._lightGridBatchTableDimensions.x,height:this._lightGridBatchTableDimensions.y,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1}),this._ubo.lightGridTexture=d.gridBatchTable}var p=Math.max(h,this._lightsPerCell-3),_=this.getGlobalLightTableSize(p);(!d.globalLightBatchTable||d.globalLightBatchTable.height<_.y)&&(d.globalLightBatchTable&&(d.globalLightBatchTable.destroy(),d.globalLightBatchTable=null),this.initGlobalLightTable(_),_0x3f2bc8=new Float32Array(this._globalLightBatchTableDimensions.x*this._globalLightBatchTableDimensions.y*4),d.globalLightBatchTable=new t$U({context:i,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT,width:this._globalLightBatchTableDimensions.x,height:this._globalLightBatchTableDimensions.y,sampler:new e$1S({minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1}),this._ubo.globalLightListTexture=d.globalLightBatchTable),this.fillGlobalLightListBuffer(r,d.globalLightBatchTable,_0x3f2bc8),this._lightCountInCell.map((function(e){e.reset()}));var m=r.viewMatrix,g=r.frustum.projectionMatrix,x=r.frustum.near,y=r.frustum.far;0==y&&(y=99999999999999);for(c=0;c<this._numSlices-1;++c)_0x3139ed.x=0,_0x3139ed.y=0,_0x3139ed.z=e$2d.clamp(this._resolutionAtSlice[c].zEnd,-y,-x),_0x3139ed.w=1,p$1d.multiplyByVector(g,_0x3139ed,_0x3139ed),_0x16a150[c]=_0x3139ed.z/_0x3139ed.w;_0x16a150[this._numSlices-1]=1;for(c=0;c<h;++c){var v=this._currentLightList[c],$=p$1d.IDENTITY;p$1d.multiply(m,$,_0x5edd06),e$29.transform(v.aabb,_0x5edd06,_0x4030b3);var b=_0x4030b3.minimum,T=_0x4030b3.maximum,C=b.z;b.z=T.z,T.z=C,b.z=e$2d.clamp(b.z,-y,-x),T.z=e$2d.clamp(T.z,-y,-x),_0x22c04c[0].x=b.x,_0x22c04c[0].y=b.y,_0x22c04c[0].z=b.z,_0x22c04c[0].w=1,_0x22c04c[1].x=b.x,_0x22c04c[1].y=b.y,_0x22c04c[1].z=b.z,_0x22c04c[1].w=1,_0x176984[0].x=T.x,_0x176984[0].y=T.y,_0x176984[0].z=T.z,_0x176984[0].w=1,_0x176984[1].x=T.x,_0x176984[1].y=T.y,_0x176984[1].z=T.z,_0x176984[1].w=1,_0x176984[0].z=b.z,_0x22c04c[1].z=T.z;for(var S=0;S<2;++S){p$1d.multiplyByVector(g,_0x22c04c[S],_0x22c04c[S]),p$1d.multiplyByVector(g,_0x176984[S],_0x176984[S]);var w=1/_0x22c04c[S].w,E=1/_0x176984[S].w;_0x18c864[S].x=_0x22c04c[S].x*w*.5+.5,_0x18c864[S].y=_0x22c04c[S].y*w*.5+.5,_0x18c864[S].z=_0x22c04c[S].z*w,_0x1fe43c[S].x=_0x176984[S].x*E*.5+.5,_0x1fe43c[S].y=_0x176984[S].y*E*.5+.5,_0x1fe43c[S].z=_0x176984[S].z*E}var P=_0x18c864[0].z,A=_0x18c864[1].z,L=this.getSliceAtDepth(b.z),M=this.getSliceAtDepth(T.z),R=1/(A-P),O=[],D=[];O.push(_0x18c864[0]),D.push(_0x1fe43c[0]);for(var I=(f=-(1-(1<<(L<<1)))/3)*this._tableSize,B=f*this._width*this._height,F=v.lightType,N=L;N<=M;++N){var G=(Math.min(A,_0x16a150[N])-P)*R;o$1p.lerp(_0x18c864[0],_0x18c864[1],G,_0x5ec832),o$1p.lerp(_0x1fe43c[0],_0x1fe43c[1],G,_0xd293fb),O.push(_0x5ec832),D.push(_0xd293fb),_0x5ad90b.x=Math.min(O[0].x,O[1].x),_0x5ad90b.y=Math.min(O[0].y,O[1].y),_0x4e9af2.x=Math.max(D[0].x,D[1].x),_0x4e9af2.y=Math.max(D[0].y,D[1].y);var z,U,V,k,W=this.projectionSpaceToGridSpace(_0x5ad90b,N);z=W.outX,U=W.outY,V=(W=this.projectionSpaceToGridSpace(_0x4e9af2,N)).outX,k=W.outY;for(var H=this._resolutionAtSlice[N],q=U;q<=k;++q)for(var j=z;j<=V;++j){var X=this._lightCountInCell[B+q*H.width+j];if(X.lightCount[0]<this._lightsPerCell-3){var Y=I+(q*H.width+j)*this._lightsPerCell+(X.lightCount[0]+3);_0x29a656[Y]=c*this._forwardPlusNumFloat4PerLight,++X.lightCount[0],++X.lightCount[F]}}o$1p.clone(O[1],O[0]),o$1p.clone(D[1],D[0]),I+=H.width*H.height*this._lightsPerCell,B+=H.width*H.height}}var Z=this._lightsPerCell,K=0;for(c=0;c<this._lightCountInCell.length;c++){var Q=this._lightCountInCell[c],J=Q.lightCount[_0x4970c2.POINT];_0x29a656[K+0]=J,J+=Q.lightCount[_0x4970c2.SPOT],_0x29a656[K+1]=J,K+=Z}d.gridBatchTable.copyFrom({width:this._lightGridBatchTableDimensions.x,height:this._lightGridBatchTableDimensions.y,arrayBufferView:_0x29a656},0,0),this.deleteOldGridBuffers()}}},_0x3fcb29.prototype.isDestroyed=function(){return!1},_0x3fcb29.prototype.destroy=function(){return i$11(this)};var _0x3e3f4c=(_0x2a08d0=!0,function(e,t){var i=_0x2a08d0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a08d0=!1,i}),_0x514926=_0x3e3f4c(void 0,(function(){return _0x514926.toString().search("(((.+)+)+)+$").toString().constructor(_0x514926).search("(((.+)+)+)+$")})),_0x2a08d0;function _0x4a04df(e){this._context=e,this._enabled=!1;var t=e.colorBufferFloat&&e.depthTexture;this._support=e.drawBuffers&&t,this._fbo=void 0,this._positionTexture=void 0,this._normalTexture=void 0,this._reflectivityTexture=void 0,this._depthStencilTexture=void 0,this._mrtClearCommand=new t$W({color:new e$1X(0,0,0,0),owner:this})}function _0x3729b5(e){e._positionTexture=e._positionTexture&&!e._positionTexture.isDestroyed()&&e._positionTexture.destroy(),e._normalTexture=e._normalTexture&&!e._normalTexture.isDestroyed()&&e._normalTexture.destroy(),e._reflectivityTexture=e._reflectivityTexture&&!e._reflectivityTexture.isDestroyed()&&e._reflectivityTexture.destroy()}_0x514926(),Object.defineProperties(_0x4a04df.prototype,{enable:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(e||this._releaseResource()),this._enable=e}},support:{get:function(){return this._support}},positionTexture:{get:function(){return this._positionTexture}},normalTexture:{get:function(){return this._normalTexture}},reflectivityTexture:{get:function(){return this._reflectivityTexture}},framebuffer:{get:function(){return this._fbo}}}),_0x4a04df.prototype.update=function(e){this._depthStencilTexture=e.depthStencilTexture;var t=this._depthStencilTexture.width,i=this._depthStencilTexture.height,n=this._positionTexture;(!e$2e(n)||n.width!==t||n.height!==i)&&(this._releaseResource(),this._createResource(t,i))},_0x4a04df.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._fbo,this._mrtClearCommand.execute(e,t),t.framebuffer=n},_0x4a04df.prototype._createResource=function(e,t){var i=this._context;this._positionTexture=new t$U({context:i,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,width:e,height:t,flipY:!1}),this._normalTexture=new t$U({context:i,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,width:e,height:t,flipY:!1}),this._reflectivityTexture=new t$U({context:i,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,width:e,height:t,flipY:!1}),this._fbo=new t$V({context:i,colorTextures:[this._positionTexture,this._normalTexture,this._reflectivityTexture],depthStencilTexture:this._depthStencilTexture,destroyAttachments:!1})},_0x4a04df.prototype.getPrepassShaderProgram=function(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"PREPASS");if(!e$2e(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();o.defines=e$2e(o.defines)?o.defines.slice(0):[],o.defines.push("PREPASS"),i=e.shaderCache.createDerivedShaderProgram(t,"PREPASS",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i},_0x4a04df.prototype._releaseResource=function(){this._fbo=this._fbo&&!this._fbo.isDestroyed()&&this._fbo.destroy(),_0x3729b5(this)},_0x4a04df.prototype.destroy=function(){this._releaseResource()};var j$j="uniform sampler2D colorTexture;\nuniform sampler2D colorTexture2;\nuniform vec2 center;\nuniform float radius;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color0 = texture2D(colorTexture, v_textureCoordinates);\nvec4 color1 = texture2D(colorTexture2, v_textureCoordinates);\nfloat x = length(gl_FragCoord.xy - center) / radius;\nfloat t = smoothstep(0.5, 0.8, x);\ngl_FragColor = mix(color0 + color1, color1, t);\n}\n",E$l="uniform sampler2D colorTexture;\nuniform float avgLuminance;\nuniform float threshold;\nuniform float offset;\nvarying vec2 v_textureCoordinates;\nfloat key(float avg)\n{\nfloat guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));\nreturn max(0.0, guess) + 0.1;\n}\nvoid main()\n{\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\nvec3 xyz = czm_RGBToXYZ(color.rgb);\nfloat luminance = xyz.r;\nfloat scaledLum = key(avgLuminance) * luminance / avgLuminance;\nfloat brightLum = max(scaledLum - threshold, 0.0);\nfloat brightness = brightLum / (offset + brightLum);\nxyz.r = brightness;\ngl_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);\n}\n",ie$7="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(colorTexture, v_textureCoordinates);\n}\n",e$j={NEAREST:0,LINEAR:1};function p$h(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).fragmentShader,i=u$Z(e.textureScale,1),n=u$Z(e.pixelFormat,V$12.RGBA),r=e.prepassRenderer;if(o$1q.typeOf.string("options.fragmentShader",t),o$1q.typeOf.number.greaterThan("options.textureScale",i,0),o$1q.typeOf.number.lessThanOrEquals("options.textureScale",i,1),!V$12.isColorFormat(n))throw new t$15("options.pixelFormat must be a color format.");this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=i,this._forcePowerOfTwo=u$Z(e.forcePowerOfTwo,!1),this._sampleMode=u$Z(e.sampleMode,e$j.NEAREST),this._blendingState=e.blendingState,this._pixelFormat=n,this._pixelDatatype=u$Z(e.pixelDatatype,_$_.UNSIGNED_BYTE),this._clearColor=u$Z(e.clearColor,e$1X.BLACK),this._useWGSL=u$Z(e.useWGSL,!1),this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._prepassRenderer=r,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0;var o=new n$$;o.scissorTest={enabled:!0,rectangle:e$2e(e.scissorRectangle)?f$1a.clone(e.scissorRectangle):new f$1a},this._passState=o,this._ready=!1;var a=e.name;e$2e(a)||(a=e$1T()),this._name=a,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(p$h.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(e$2e(this._textureCache)){var e=this._textureCache.getFramebuffer(this._name);if(e$2e(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var z$l=/uniform\s+sampler2D\s+depthTexture/g;function H$r(e,t,i){var n=t[i];return("string"==typeof n||n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof HTMLVideoElement||n instanceof ImageData)&&e._dirtyUniforms.push(i),{get:function(){return t[i]},set:function(n){var r=t[i];t[i]=n;var o=e._actualUniforms,a=o[i];e$2e(a)&&a!==r&&a instanceof t$U&&!e$2e(e._textureCache.getStageByName(i))&&(e._texturesToRelease.push(a),delete o[i],delete o[i+"Dimensions"]),r instanceof t$U&&e._texturesToRelease.push(r),"string"==typeof n||n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof HTMLVideoElement||n instanceof ImageData?e._dirtyUniforms.push(i):o[i]=n}}}function V$h(e,t){return function(){var i=e._actualUniforms[t];return"function"==typeof i?i():i}}function W$l(e,t){return function(){var i=e[t]();if(e$2e(i))return i.dimensions}}function k$h(e){if(!e$2e(e._uniformMap)){var t={},i={},n=e._uniforms,r=e._actualUniforms;for(var o in n)if(n.hasOwnProperty(o)){"function"!=typeof n[o]?(t[o]=V$h(e,o),i[o]=H$r(e,n,o)):(t[o]=n[o],i[o]=n[o]),r[o]=n[o];var a=t[o]();("string"==typeof a||a instanceof t$U||a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement)&&(t[o+"Dimensions"]=W$l(t,o))}e._uniforms={},Object.defineProperties(e._uniforms,i),e._uniformMap=p$19(t,{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions},depthTexture:function(){return e._depthTexture},depthTextureDimensions:function(){return e._depthTexture.dimensions},czm_idTexture:function(){return e._idTexture},czm_selectedIdTexture:function(){return e._selectedIdTexture},czm_selectedIdTextureStep:function(){return 1/e._selectedIdTexture.width},reflectivitySampler:function(){return e._prepassRenderer.reflectivityTexture},normalSampler:function(){return e._prepassRenderer.normalTexture},positionSampler:function(){return e._prepassRenderer.positionTexture}})}}function Y$c(e,t){if(!e$2e(e._command)||e._logDepthChanged||e._selectedDirty){var i=e._fragmentShader;if(e$2e(e._selectedIdTexture))i="#define CZM_SELECTED_FEATURE \nuniform sampler2D czm_idTexture; \nuniform sampler2D czm_selectedIdTexture; \nuniform float czm_selectedIdTextureStep; \nvarying vec2 v_textureCoordinates; \nbool czm_selected(vec2 offset) \n{ \n bool selected = false;\n vec4 id = texture2D(czm_idTexture, v_textureCoordinates + offset); \n for (int i = 0; i < "+e._selectedIdTexture.width+"; ++i) \n { \n vec4 selectedId = texture2D(czm_selectedIdTexture, vec2(float(i) * czm_selectedIdTextureStep, 0.5)); \n if (all(equal(id, selectedId))) \n { \n return true; \n } \n } \n return false; \n} \n\nbool czm_selected() \n{ \n return czm_selected(vec2(0.0)); \n} \n\n"+(i=i.replace(/varying\s+vec2\s+v_textureCoordinates;/g,""));var n=new s$V({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[i],useWGSL:e._useWGSL});e._command=t.createViewportQuadCommand(n,{uniformMap:e._uniformMap,owner:e,shaderProgramName:e._name,useWGSL:e._useWGSL})}}function q$g(e){var t,i;e._sampleMode===e$j.LINEAR?(t=tt$i.LINEAR,i=rt$k.LINEAR):(t=tt$i.NEAREST,i=rt$k.NEAREST);var n=e._sampler;(!e$2e(n)||n.minificationFilter!==t||n.magnificationFilter!==i)&&(e._sampler=new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:t,magnificationFilter:i}))}function j$i(e,t){return function(i){e._texturesToCreate.push({name:t,source:i})}}function J$b(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function K$d(e,t){var i,n,r,o=e._texturesToRelease,a=o.length;for(i=0;i<a;++i)n=(n=o[i])&&n.destroy();o.length=0;var s=e._texturesToCreate;for(a=s.length,i=0;i<a;++i){var l=s[i];r=l.name;var u=l.source;e._actualUniforms[r]=new t$U({context:t,source:u})}s.length=0;var c=e._dirtyUniforms;if(0!==c.length||e$2e(e._texturePromise)){if(0!==c.length&&!e$2e(e._texturePromise)){a=c.length;var h=e._uniforms,d=[];for(i=0;i<a;++i){var f=h[r=c[i]];if(e$2e(e._textureCache.getStageByName(f)))e._actualUniforms[r]=J$b(e,f);else if("string"==typeof f){var p=new t$10({url:f});d.push(p.fetchImage().then(j$i(e,r)))}else e._texturesToCreate.push({name:r,source:f})}c.length=0,d.length>0?(e._ready=!1,e._texturePromise=o$1l.all(d).then((function(){e._ready=!0,e._texturePromise=void 0}))):e._ready=!0}}else e._ready=!0}function I$n(e){e$2e(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();var t=e._textureCache;if(e$2e(t)){var i=e._uniforms,n=e._actualUniforms;for(var r in n)n.hasOwnProperty(r)&&n[r]instanceof t$U&&(e$2e(t.getStageByName(i[r]))||n[r].destroy(),e._dirtyUniforms.push(r))}}function Q$f(e){var t=e$2e(e._selected)?e._selected.length:0,i=e$2e(e._parentSelected)?e._parentSelected:0,n=e._selected!==e._selectedShadow||t!==e._selectedLength;if(n=n||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength,e$2e(e._selected)&&e$2e(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):e$2e(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!n&&e$2e(e._combinedSelected)){if(!e$2e(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var r=0;r<t;++r)if(e._combinedSelected[r]!==e._combinedSelectedShadow[r])return!0}return n}function Z$h(e,t){if(e._selectedDirty){e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;var i=e._combinedSelected;if(e$2e(i)){var n,r,o=0,a=i.length;for(n=0;n<a;++n)e$2e((r=i[n]).pickIds)?o+=r.pickIds.length:e$2e(r.pickId)&&++o;if(0===a||0===o){var s=new Uint8Array(4);return s[0]=255,s[1]=255,s[2]=255,s[3]=255,void(e._selectedIdTexture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,source:{arrayBufferView:s,width:1,height:1},sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}))}var l,u=0,c=new Uint8Array(4*o);for(n=0;n<a;++n)if(e$2e((r=i[n]).pickIds))for(var h=r.pickIds,d=h.length,f=0;f<d;++f)l=h[f].color,c[u]=e$1X.floatToByte(l.red),c[u+1]=e$1X.floatToByte(l.green),c[u+2]=e$1X.floatToByte(l.blue),c[u+3]=e$1X.floatToByte(l.alpha),u+=4;else e$2e(r.pickId)&&(l=r.pickId.color,c[u]=e$1X.floatToByte(l.red),c[u+1]=e$1X.floatToByte(l.green),c[u+2]=e$1X.floatToByte(l.blue),c[u+3]=e$1X.floatToByte(l.alpha),u+=4);e._selectedIdTexture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,source:{arrayBufferView:c,width:o,height:1},sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})}}}function s$f(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.defined("options.stages",e.stages),o$1q.typeOf.number.greaterThan("options.stages.length",e.stages.length,0),this._stages=e.stages,this._inputPreviousStageTexture=u$Z(e.inputPreviousStageTexture,!0);var t=e.name;e$2e(t)||(t=e$1T()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}function u$j(e){var t=e$2e(e._selected)?e._selected.length:0,i=e$2e(e._parentSelected)?e._parentSelected:0,n=e._selected!==e._selectedShadow||t!==e._selectedLength;if(n=n||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength,e$2e(e._selected)&&e$2e(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):e$2e(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!n&&e$2e(e._combinedSelected)){if(!e$2e(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var r=0;r<t;++r)if(e._combinedSelected[r]!==e._combinedSelectedShadow[r])return!0}return n}function g$r(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function m$l(e){for(;e$2e(e.length);)e=e.get(e.length-1);return e.name}function w$k(e,t,i,n,r){if(!n.enabled||!n._isSupported(t))return r;var o=i[n.name]={};e$2e(r)&&(o[m$l(e.getStageByName(r))]=!0);var a=n.uniforms;if(e$2e(a))for(var s=Object.getOwnPropertyNames(a),l=s.length,u=0;u<l;++u){var c=a[s[u]];if("string"==typeof c){var h=e.getStageByName(c);e$2e(h)&&(o[m$l(h)]=!0)}}return n.name}function v$k(e,t,i,n,r){if(e$2e(n.enabled)&&!n.enabled||e$2e(n._isSupported)&&!n._isSupported(t))return r;for(var o=r,a=!e$2e(n.inputPreviousStageTexture)||n.inputPreviousStageTexture,s=r,l=n.length,u=0;u<l;++u){var c=n.get(u);s=e$2e(c.length)?v$k(e,t,i,c,r):w$k(e,t,i,c,r),a&&(r=s)}var h,d;if(a)for(h=1;h<l;++h)e$2e(i[d=m$l(n.get(h))])||(i[d]={}),i[d][o]=!0;else for(h=1;h<l;++h)for(var f=i[d=m$l(n.get(h))],p=0;p<h;++p)f[m$l(n.get(p))]=!0;return s}function B$g(e,t){var i={};if(e$2e(e.ambientOcclusion)){var n=e._outline,r=e.ambientOcclusion,o=e.bloom,a=e._tonemapping,s=e.fxaa,l=e.fog,u=e.rain,c=e.snow,h=e.screenSpaceReflection,d=v$k(e,t,i,n,void 0);d=w$k(e,t,i,l,d),d=w$k(e,t,i,c,d),d=v$k(e,t,i,r,d=w$k(e,t,i,u,d)),d=v$k(e,t,i,o,d),d=v$k(e,t,i,e,d=w$k(e,t,i,a,d)),w$k(e,t,i,s,d=v$k(e,t,i,h,d))}else v$k(e,t,i,e,void 0);return i}function E$k(e,t,i){var n,r,o=e._collection.getStageByName(t),a=o._textureScale,s=o._forcePowerOfTwo,l=o._pixelFormat,u=o._pixelDatatype,c=o._clearColor,h=e._framebuffers,d=h.length;for(n=0;n<d;++n)if(a===(r=h[n]).textureScale&&s===r.forcePowerOfTwo&&l===r.pixelFormat&&u===r.pixelDatatype&&e$1X.equals(c,r.clearColor)){for(var f=r.stages,p=f.length,_=!1,m=0;m<p;++m)if(i[f[m]]){_=!0;break}if(!_)break}return e$2e(r)&&n<d?(r.stages.push(t),r):(r={textureScale:a,forcePowerOfTwo:s,pixelFormat:l,pixelDatatype:u,clearColor:c,stages:[t],buffer:void 0,clear:void 0},h.push(r),r)}function M$l(e,t){var i=B$g(e._collection,t);for(var n in i)i.hasOwnProperty(n)&&(e._stageNameToFramebuffer[n]=E$k(e,n,i[n]))}function y$l(e){for(var t=e._framebuffers,i=t.length,n=0;n<i;++n){var r=t[n];r.buffer=r.buffer&&r.buffer.destroy(),r.buffer=void 0}}function R$j(e,t){for(var i=e._width,n=e._height,r=e._framebuffers,o=r.length,a=0;a<o;++a){var s=r[a],l=s.textureScale,u=Math.ceil(i*l),c=Math.ceil(n*l),h=Math.min(u,c);s.forcePowerOfTwo&&(e$2d.isPowerOfTwo(h)||(h=e$2d.nextPowerOfTwo(h)),u=h,c=h),s.buffer=new t$V({context:t,colorTextures:[new t$U({context:t,width:u,height:c,pixelFormat:s.pixelFormat,pixelDatatype:s.pixelDatatype})]}),s.clear=new t$W({color:s.clearColor,framebuffer:s.buffer})}}function n$i(){this._colorTexture=void 0,this._idTexture=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._framebuffer=void 0,this._idFramebuffer=void 0,this._idClearColor=new e$1X(0,0,0,0),this._useHdr=void 0,this._clearCommand=new t$W({color:new e$1X(0,0,0,0),depth:1,owner:this})}function S$i(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._idFramebuffer=e._idFramebuffer&&e._idFramebuffer.destroy(),e._colorTexture=e._colorTexture&&e._colorTexture.destroy(),e._idTexture=e._idTexture&&e._idTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&e._depthStencilRenderbuffer.destroy(),e._depthStencilIdTexture=e._depthStencilIdTexture&&e._depthStencilIdTexture.destroy(),e._depthStencilIdRenderbuffer=e._depthStencilIdRenderbuffer&&e._depthStencilIdRenderbuffer.destroy(),e._framebuffer=void 0,e._idFramebuffer=void 0,e._colorTexture=void 0,e._idTexture=void 0,e._depthStencilTexture=void 0,e._depthStencilRenderbuffer=void 0,e._depthStencilIdTexture=void 0,e._depthStencilIdRenderbuffer=void 0}function s$e(){this._sceneFramebuffer=new n$i,this._stMatrix3=p$1e.clone(p$1e.IDENTITY),this._isMultiViewport=!1;var e=.125,t=new Array(6);t[0]=new p$h({name:"SunPostProcessStage0",fragmentShader:ie$7,textureScale:e,forcePowerOfTwo:!0,sampleMode:e$j.LINEAR});var i=t[1]=new p$h({name:"SunPostProcessStage1",fragmentShader:E$l,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),n=this;this._delta=1,this._sigma=2,this._blurStep=new o$1o,t[2]=new p$h({name:"SunPostProcessStage2",fragmentShader:y$M,uniforms:{step:function(){return n._blurStep.x=n._blurStep.y=1/i.outputTexture.width,n._blurStep},delta:function(){return n._delta},sigma:function(){return n._sigma},direction:0},textureScale:e,forcePowerOfTwo:!0}),t[3]=new p$h({name:"SunPostProcessStage3",fragmentShader:y$M,uniforms:{step:function(){return n._blurStep.x=n._blurStep.y=1/i.outputTexture.width,n._blurStep},delta:function(){return n._delta},sigma:function(){return n._sigma},direction:1},textureScale:e,forcePowerOfTwo:!0}),t[4]=new p$h({name:"SunPostProcessStage4",fragmentShader:ie$7,sampleMode:e$j.LINEAR}),this._uCenter=new o$1o,this._uRadius=void 0,t[5]=new p$h({name:"SunPostProcessStage5",fragmentShader:j$j,uniforms:{center:function(){return n._uCenter},radius:function(){return n._uRadius},colorTexture2:function(){return n._sceneFramebuffer.getFramebuffer().getColorTexture(0)}}}),this._stages=new s$f({stages:t});for(var r=new g$r(this),o=t.length,a=0;a<o;++a)t[a]._textureCache=r;this._textureCache=r,this.length=t.length}p$h.prototype._isSupported=function(e){return!z$l.test(this._fragmentShader)||e.depthTexture},p$h.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&I$n(this),this._enabled=this.enabled,this._enabled&&(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=Q$f(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=e$2e(this._selected)?this._selected.length:0,this._parentSelectedLength=e$2e(this._parentSelected)?this._parentSelected.length:0,Z$h(this,e),k$h(this),K$d(this,e),Y$c(this,e),q$g(this),this._selectedDirty=!1,this._ready)){var i=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=i,e$2e(i)){var n,r=i.getColorTexture(0);(r.width!==e.drawingBufferWidth||r.height!==e.drawingBufferHeight||e$2e(this._blendingState))&&((!e$2e(n=this._renderState)||r.width!==n.viewport.width||r.height!==n.viewport.height)&&(this._renderState=d$1m.fromCache({viewport:new f$1a(0,0,r.width,r.height),blending:this._blendingState}))),this._command.renderState=n}}},p$h.prototype.execute=function(e,t,i,n){if(e$2e(this._command)&&e$2e(this._command.framebuffer)&&this._ready&&this._enabled){this._colorTexture=t,this._depthTexture=i,this._idTexture=n,e$1S.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.ignoreWEBGL2=!0,this._colorTexture.sampler=this._sampler);var r=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;e$2e(r)&&(r.context=e),this._command.execute(e,r)}},p$h.prototype.isDestroyed=function(){return!1},p$h.prototype.destroy=function(){return I$n(this),i$11(this)},Object.defineProperties(s$f.prototype,{ready:{get:function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)if(!e[i].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){for(var t=this._stages,i=t.length,n=0;n<i;++n)t[n].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}}),s$f.prototype._isSupported=function(e){for(var t=this._stages,i=t.length,n=0;n<i;++n)if(!t[n]._isSupported(e))return!1;return!0},s$f.prototype.get=function(e){return o$1q.typeOf.number.greaterThanOrEquals("index",e,0),o$1q.typeOf.number.lessThan("index",e,this.length),this._stages[e]},s$f.prototype.update=function(e,t){this._selectedDirty=u$j(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=e$2e(this._selected)?this._selected.length:0,this._parentSelectedLength=e$2e(this._parentSelected)?this._parentSelected.length:0;for(var i=this._stages,n=i.length,r=0;r<n;++r){var o=i[r];this._selectedDirty&&(o.parentSelected=this._combinedSelected),o.update(e,t)}},s$f.prototype.isDestroyed=function(){return!1},s$f.prototype.destroy=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)e[i].destroy();return i$11(this)},g$r.prototype.updateDependencies=function(){this._updateDependencies=!0},g$r.prototype.update=function(e){var t=this._collection,i=this._updateDependencies,n=e$2e(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),r=e$2e(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),o=e$2e(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),a=e$2e(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),s=e$2e(t.screenSpaceReflection)&&t.screenSpaceReflection.enabled,l=e$2e(t.outline)&&t.outline.enabled,u=e$2e(t.snow)&&t.snow.enabled,c=!e$2e(t._activeStages)||t._activeStages.length>0||n||r||o||a||s||l||u;if((i||!c&&this._framebuffers.length>0)&&(y$l(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),i||c){0===this._framebuffers.length&&M$l(this,e);var h=e.drawingBufferWidth,d=e.drawingBufferHeight,f=this._width!==h||this._height!==d;!i&&!f||(this._width=h,this._height=d,this._updateDependencies=!1,y$l(this),R$j(this,e))}},g$r.prototype.clear=function(e){for(var t=this._framebuffers,i=t.length,n=0;n<i;++n)t[n].clear.execute(e)},g$r.prototype.getStageByName=function(e){return this._collection.getStageByName(e)},g$r.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)},g$r.prototype.getFramebuffer=function(e){var t=this._stageNameToFramebuffer[e];if(e$2e(t))return t.buffer},g$r.prototype.isDestroyed=function(){return!1},g$r.prototype.destroy=function(){return y$l(this),i$11(this)},n$i.prototype.update=function(e,t,i){var n=t.width,r=t.height,o=this._colorTexture;if(!e$2e(o)||o.width!==n||o.height!==r||i!==this._useHdr){S$i(this),this._useHdr=i;var a=i?e.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT:_$_.UNSIGNED_BYTE;this._colorTexture=new t$U({context:e,width:n,height:r,pixelFormat:V$12.RGBA,pixelDatatype:a,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),this._idTexture=new t$U({context:e,width:n,height:r,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),e.depthTexture?(this._depthStencilTexture=new t$U({context:e,width:n,height:r,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),this._depthStencilIdTexture=new t$U({context:e,width:n,height:r,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})):(this._depthStencilRenderbuffer=new r$10({context:e,width:n,height:r,format:M$13.DEPTH_STENCIL}),this._depthStencilIdRenderbuffer=new r$10({context:e,width:n,height:r,format:M$13.DEPTH_STENCIL})),this._framebuffer=new t$V({context:e,colorTextures:[this._colorTexture],depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}),this._idFramebuffer=new t$V({context:e,colorTextures:[this._idTexture],depthStencilTexture:this._depthStencilIdTexture,depthStencilRenderbuffer:this._depthStencilIdRenderbuffer,destroyAttachments:!1})}},n$i.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._framebuffer,e$1X.clone(i,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=this._idFramebuffer,e$1X.clone(this._idClearColor,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=n},n$i.prototype.getFramebuffer=function(){return this._framebuffer},n$i.prototype.getIdFramebuffer=function(){return this._idFramebuffer},n$i.prototype.isDestroyed=function(){return!1},n$i.prototype.destroy=function(){return S$i(this),i$11(this)},s$e.prototype.get=function(e){return this._stages.get(e)},s$e.prototype.getStageByName=function(e){for(var t=this._stages.length,i=0;i<t;++i){var n=this._stages.get(i);if(n.name===e)return n}};var z$k=new e$2c,F$h=new o$1o,H$q=new o$1o,B$f=new p$1d;function Y$b(e,t,i){var n=t.uniformState,r=n.sunPositionWC,o=n.view,a=n.viewProjection,s=n.projection,l=p$1d.computeViewportTransformation(i,0,1,B$f),u=p$1d.multiplyByPoint(o,r,z$k),c=m$19.pointToGLWindowCoordinates(a,l,r,F$h);u.x+=e$2d.SOLAR_RADIUS;var h=m$19.pointToGLWindowCoordinates(s,l,u,u),d=30*o$1o.magnitude(o$1o.subtract(h,c,h))*2,f=H$q;f.x=d,f.y=d,e._uCenter=o$1o.clone(c,e._uCenter),e._uRadius=.15*Math.max(f.x,f.y);var p=t.drawingBufferWidth,_=t.drawingBufferHeight,m=e._stages.get(0),g=m.outputTexture.width,x=m.outputTexture.height,y=new f$1a;y.width=g,y.height=x,l=p$1d.computeViewportTransformation(y,0,1,B$f),c=m$19.pointToGLWindowCoordinates(a,l,r,F$h),f.x*=g/p,f.y*=x/_}s$e.prototype.clear=function(e,t,i){this._sceneFramebuffer.clear(e,t,i),this._textureCache.clear(e)},s$e.prototype.update=function(e){var t=e.context,i=e.viewport,n=this._sceneFramebuffer;n.update(t,i);var r=n.getFramebuffer();return this._textureCache.update(t),this._stages.update(t,!1),Y$b(this,t,i),r},s$e.prototype.execute=function(e){var t=this._sceneFramebuffer.getFramebuffer().getColorTexture(0),i=this._stages,n=i.length;i.get(0).execute(e,t);for(var r=1;r<n;++r)i.get(r).execute(e,i.get(r-1).outputTexture)};const Q$e=new p$1e(1,0,-.5,0,1,-.5,0,0,1);s$e.prototype.copy=function(e,t,i){if(e$2e(i)&&e$2e(i.viewport)){this._isMultiViewport=!0;var n=i.viewport,r=e.drawingBufferWidth,o=e.drawingBufferHeight,a=[n.width/r,0,(n.x+.5*n.width)/r,0,n.height/o,(n.y+.5*n.height)/o,0,0,1];p$1e.fromRowMajorArray(a,this._stMatrix3),p$1e.multiply(this._stMatrix3,Q$e,this._stMatrix3)}if(!e$2e(this._copyColorCommand)){var s=this;const t="\n uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n uniform mat3 stMatrix3;\n void main(){\n vec3 st = stMatrix3 * vec3(v_textureCoordinates, 1.0);\n gl_FragColor = texture2D(colorTexture, st.xy);\n }\n ";this._copyColorCommand=e.createViewportQuadCommand(t,{uniformMap:{colorTexture:function(){return s._stages.get(s._stages.length-1).outputTexture},stMatrix3:function(){return s._isMultiViewport?s._stMatrix3:p$1e.IDENTITY}},owner:this,shaderProgramName:"CustomPassThrough"})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e,i),this._isMultiViewport=!1},s$e.prototype.isDestroyed=function(){return!1},s$e.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),i$11(this)};var I$m={NONE:0,HORIZONTAL:1,VERTICAL:2,QUAD:3,TRIPLE:4,VerticalTrisection:5,FIVE_DIVISIONS:6,SIX_DIVISIONS:7,SEVEN_DIVISIONS:8,EIGHT_DIVISIONS:9,NINE_DIVISIONS:10},B$e=Object.freeze(I$m),_0x2521c8=(_0xaf4641=!0,function(e,t){var i=_0xaf4641?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xaf4641=!1,i}),_0x421a9b=_0x2521c8(void 0,(function(){return _0x421a9b.toString().search("(((.+)+)+)+$").toString().constructor(_0x421a9b).search("(((.+)+)+)+$")})),_0xaf4641;_0x421a9b();var _0x413ac0={BeforeExecuteCommands:0,BeforeExecuteCommandsForOnePass:1,PostExecuteCommandsForOnePass:2},k$g=Object.freeze(_0x413ac0),_0x276a99=(_0x4e8618=!0,function(e,t){var i=_0x4e8618?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4e8618=!1,i}),_0x19f2e0=_0x276a99(void 0,(function(){return _0x19f2e0.toString().search("(((.+)+)+)+$").toString().constructor(_0x19f2e0).search("(((.+)+)+)+$")})),_0x4e8618;function _0x5430eb(e){this._scene=e,this._prepassRenderer=new _0x4a04df(e.context),this._clearColorCommand=new t$W({color:new e$1X,stencil:0,owner:this}),this._depthClearCommand=new t$W({depth:1,owner:this}),this._stencilClearCommand=new t$W({stencil:0}),this._classificationStencilClearCommand=new t$W({stencil:0,renderState:d$1m.fromCache({stencilMask:u$M.CLASSIFICATION_MASK})}),this._beforeExecuteCommandsEvent=new o$1h,this._beforeExecuteCommandsForOnePass=new o$1h,this._postExecuteCommandsForOnePass=new o$1h}_0x19f2e0(),Object.defineProperties(_0x5430eb.prototype,{}),_0x5430eb.prototype.executeCommands=function(e){var t=this._scene,i=t.camera,n=t.context;n.uniformState.updateCamera(i,n),this._beforeExecuteCommandsEvent.raiseEvent(this);var r=_0x4da7a0(i);this.executeCommandsForEnvironment(e,r);var o=t._environmentState,a=t._frameState.passes;o.usePrepass&&!a.pick&&!a.depth&&!a.fbo&&(a.prepass=!0,this.executeCommandsForeground(e,r),a.prepass=!1),this.executeCommandsForeground(e,r)},_0x5430eb.prototype.executeCommandsForeground=function(e,t){var i=this._scene,n=i._frameState.passes,r=i._environmentState,o=i._view,a=i._environmentVisible,s=i.camera,l=i.context,u=l.uniformState,c=r.clearGlobeDepth,h=this._depthClearCommand,d=this._clearColorCommand,f=this._stencilClearCommand,p=s.position.z,_=o.frustumCommandsList,m=_.length;0===m&&e$2e(o.globeDepth)&&r.useGlobeDepthFramebuffer&&o.globeDepth.executeCopyDepth(l,e);for(var g=0;g<m;++g){var x=m-g-1,y=_[x];i.mode===C$14.SCENE2D?(s.position.z=p-y.near+1,t.far=Math.max(1,y.far-y.near),t.near=1,u.update(i.frameState),u.updateFrustum(t)):((!n.fbo||!l.depthTexture)&&(t.near=0!==x?y.near*i.opaqueFrustumNearOffset:y.near,t.far=y.far),i.logarithmicDepthBuffer&&s._positionCartographic.height>1e5&&t.near<10&&(t.near*=1e4),u.updateFrustum(t));var v=i.debugShowGlobeDepth?_0x8127cb(i,x):o.globeDepth;if(i.debugShowGlobeDepth&&e$2e(v)&&r.useGlobeDepthFramebuffer&&(v.update(l,e,o.viewport,i._msaaSamples,i._hdr),v.clear(l,e,this._clearColorCommand.color),e.framebuffer=v.framebuffer),h.execute(l,e),n.depth&&!l.depthTexture&&d.execute(l,e),l.stencilBuffer&&f.execute(l,e),this.executeCommandsForGlobe(e,v,y),this.executeCommandsFor3DTiles(e,v,y),a.isObjectVisible){for(var $=Le$q.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW+1,b=Le$q.Particle,T=$;T<=b;++T)!this.isPassVisible(T,t)||(length=y.indices[T],this.isUpdateGlobeDepthBeforPassRender(T,length)&&e$2e(v)&&r.useGlobeDepthFramebuffer&&v.executeUpdateDepth(l,e,c),this.executeCommandsForPass(e,y,T),this.isUpdateGlobeDepthPostPassRender(T,length)&&e$2e(v)&&r.useGlobeDepthFramebuffer&&v.executeUpdateDepth(l,e,c));this.executeCommandsForTransparent(t,x,e,v,y),this.executeCommandsForPass(e,y,Le$q.ANALYSIS)}_0xb8ae9e(i,e,x)}},_0x5430eb.prototype.isPassVisible=function(e,t){var i=this._scene,n=i._environmentVisible,r=i._frameState.passes,o=r.pick,a=r.depth,s=r.normal;switch(e){case Le$q.ProjectionImage:return!o&&!a;case Le$q.TRANSLUCENT:return o&&s||!n.isOnlyS3MObjectVisible||"sqResultTexture"===frameState._fboState.name;case Le$q.ClampObject:return!t.reflect;case Le$q.Label_Billboard:return n.isBillboardVisible&&!(o&&a);default:return!(n.isOnlyS3MObjectVisible&&(e<Le$q.S3MTiles||e>Le$q.S3MTilesClampObjectColor))}},_0x5430eb.prototype.isUpdateGlobeDepthBeforPassRender=function(e,t){switch(e){case Le$q.ProjectionImage:case Le$q.S3MTilesClampObjectColor:return t>0;default:return!1}},_0x5430eb.prototype.isUpdateGlobeDepthPostPassRender=function(e,t){switch(e){case Le$q.OPAQUE:return!0;case Le$q.NonClampObject:return t>0;default:return!1}},_0x5430eb.prototype.executeCommandsForGlobe=function(e,t,i){var n=this._scene,r=n.context;const o=r.uniformState;var a=n._environmentVisible,s=n._environmentState,l=s.clearGlobeDepth,u=s.useDepthPlane,c=this._depthClearCommand,h=n._depthPlane;const d=n._globeTranslucencyState,f=d.translucent,p=n._view.globeTranslucencyFramebuffer;if(f&&d.executeGlobeCommands(i,_0x25e1a2,p,n,e),a.isGlobalVisible){if(f||this.executeCommandsForPass(e,i,Le$q.GLOBE),e$2e(t)&&s.useGlobeDepthFramebuffer&&t.executeCopyDepth(r,e),!s.renderTranslucentDepthForPick){o.updatePass(Le$q.TERRAIN_CLASSIFICATION);var _=i.commands[Le$q.TERRAIN_CLASSIFICATION],m=i.indices[Le$q.TERRAIN_CLASSIFICATION];if(f)d.executeGlobeClassificationCommands(i,_0x25e1a2,p,n,e);else for(let t=0;t<m;++t)_0x25e1a2(_[t],n,r,e)}l&&(c.execute(r,e),u&&h.execute(r,e))}},_0x5430eb.prototype.executeCommandsFor3DTiles=function(e,t,i){var n=this._scene,r=n.context,o=n._frameState.passes.pick,a=n._environmentState,s=(r=n.context,a.clearGlobeDepth),l=this._stencilClearCommand,u=0;if(!a.useInvertClassification||o)this.executeCommandsForPass(e,i,Le$q.CESIUM_3D_TILE),(u=i.indices[Le$q.CESIUM_3D_TILE])>0&&(e$2e(t)&&a.useGlobeDepthFramebuffer&&(t.prepareColorTextures(r,s),t.executeUpdateDepth(r,e,s)),this.executeCommandsForPass(e,i,Le$q.CESIUM_3D_TILE_CLASSIFICATION));else{n._invertClassification.clear(r,e);var c=e.framebuffer;e.framebuffer=n._invertClassification._fbo,this.executeCommandsForPass(e,i,Le$q.CESIUM_3D_TILE),e$2e(t)&&a.useGlobeDepthFramebuffer&&t.executeUpdateDepth(r,e,s),this.executeCommandsForPass(e,i,Le$q.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),e.framebuffer=c,n._invertClassification.executeClassified(r,e),1===n.frameState.invertClassificationColor.alpha&&n._invertClassification.executeUnclassified(r,e),u>0&&r.stencilBuffer&&clearClassificationStencil.execute(r,e),this.executeCommandsForPass(e,i,Le$q.CESIUM_3D_TILE_CLASSIFICATION)}u>0&&r.stencilBuffer&&l.execute(r,e)},_0x5430eb.prototype.executeCommandsForTransparent=function(e,t,i,n,r){var o,a=this._scene,s=a.context.uniformState,l=a._frameState,u=a._environmentVisible,c=a._environmentState,h=(a.context,a._frameState.passes),d=h.pick,f=_0x411040(a);if(0!==t&&a.mode!==C$14.SCENE2D&&(e.near=r.near,s.updateFrustum(e)),!d&&c.useInvertClassification&&a.frameState.invertClassificationColor.alpha<1&&(o=a._invertClassification),h.pick&&h.normal||!u.isOnlyS3MObjectVisible||"sqResultTexture"===l._fboState.name){s.updatePass(Le$q.TRANSLUCENT);var p=r.commands[Le$q.TRANSLUCENT];p.length=r.indices[Le$q.TRANSLUCENT],"sqResultTexture"===l._fboState.name&&(p=p.filter((function(e){return"sqResultTexture"===e.owner}))),this._beforeExecuteCommandsForOnePass.raiseEvent(Le$q.TRANSLUCENT,this),f(a,_0x25e1a2,i,p,o),this._postExecuteCommandsForOnePass.raiseEvent(Le$q.TRANSLUCENT,this)}},_0x5430eb.prototype.executeCommandsForPass=function(e,t,i){this._beforeExecuteCommandsForOnePass.raiseEvent(i,this);var n=this._scene,r=n.context;r.uniformState.updatePass(i);for(var o=t.commands[i],a=t.indices[i],s=0;s<a;++s)_0x25e1a2(o[s],n,r,e);this._postExecuteCommandsForOnePass.raiseEvent(i,this)},_0x5430eb.prototype.updateAndExecuteCommands=function(e,t){var i=this._scene,n=i._context,r=n.uniformState,o=e.viewport;o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight;var a=i._frameState,s=a.camera,l=a.mode,u=(h=a.passes).pick;if(i._useWebVR&&l!==C$14.SCENE2D)_0x43de4f(i,e,t,this);else if(a._fboState.enabled||i._multiViewportMode===B$e.NONE)this.updateAndClearFramebuffers(e,t),l!==C$14.SCENE2D||i._mapMode2D===Rr$3.ROTATE?this.executeCommandsInViewport(!0,e):this.execute2DViewportCommands(e);else{this.updateAndClearFramebuffers(e,t);for(var c=0;c<i._multiViewportInfo.length;c++)if(!u||i._frameState.multiViewportIndex===c){u=(h=i._frameState.passes).pick;var h,d=h.fbo,f=i._environmentState.useWebVR;i._environmentState.isSunVisible&&i.sunBloom&&!f&&!d&&(e.framebuffer=i._sunPostProcess._sceneFramebuffer.getFramebuffer());var p=i._multiViewportInfo[c];o.x=n.drawingBufferWidth*p.x,o.y=n.drawingBufferHeight*p.y,o.width=n.drawingBufferWidth*p.width,o.height=n.drawingBufferHeight*p.height,s.frustum.aspectRatio=o.width/o.height,u&&(o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight),r.update(a),i._frameState.multiViewportIndex=c,a.cullingVolume=a.camera.frustum.computeCullingVolume(a.camera.positionWC,a.camera.directionWC,a.camera.upWC),this.executeCommandsInViewport(0==c||u,e),n.webgpu&&n.engine.flushFramebuffer()}}},_0x5430eb.prototype.updateAndExecuteCommandsForPostEffect=function(e,t){var i=this._scene._context,n=e.viewport;n.x=0,n.y=0,n.width=i.drawingBufferWidth,n.height=i.drawingBufferHeight;var r=t,o=this._clearColorCommand;e$1X.clone(r,o.color),o.execute(i,e),this.executeCommandsInViewport(!0,e)},_0x5430eb.prototype.executeOverlayCommands=function(e){var t=this._scene,i=t.context.uniformState;i.updatePass(Le$q.OVERLAY);var n=t.context,r=t._frameState,o=t._view.viewport;if(o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight,e.viewport=f$1a.clone(o,e.viewport),t._multiViewportMode===B$e.NONE)_0x5406ba(this,t,e);else{for(var a=0;a<t._multiViewportInfo.length;a++)if(!r.passes.pick||t._frameState.multiViewportIndex===a){r.multiViewportIndex=a;var s=t._multiViewportInfo[a];o.x=n.drawingBufferWidth*s.x,o.y=n.drawingBufferHeight*s.y,o.width=n.drawingBufferWidth*s.width,o.height=n.drawingBufferHeight*s.height,r.camera.frustum.aspectRatio=o.width/o.height,r.passes.pick&&(o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight),e.viewport=f$1a.clone(o),i.update(r),_0x5406ba(this,t,e)}o.x=0,o.y=0,o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight,e.viewport=f$1a.clone(o)}};var _0x41dbc1=new f$1a;function _0x5406ba(e,t,i){var n=t.context,r=t._frameState.passes,o=t._view.globeDepth,a=t._environmentState,s=a.renderTranslucentDepthForPick,l=t._logDepthOverlayCommandList,u=l.length;if(u>0)for(var c=0;c<u;++c){var h=l[c];(r=t._frameState.passes).pick||r.depth?_0x25e1a2(l[c],t,n,i):(h=h.derivedCommands.logDepth.command).execute(n,i)}u=(l=t._overlayCommandList).length;for(c=0;c<u;++c){h=l[c];(r=t._frameState.passes).pick||r.depth?_0x25e1a2(l[c],t,n,i):h.execute(n,i)}if(!r.fbo&&n.depthTexture&&t.useDepthPicking&&(a.useGlobeDepthFramebuffer||s)){var d=s?i.framebuffer.depthStencilTexture:o.depthStencilTexture;e$2e(d)||(d=o.depthStencilTexture);var f=t._picking.getPickDepth(t,0);f.update(n,d),f.executeCopyDepth(n,i)}if((u=(l=t._overlayAgainstDepthCommandList).length)>0){e._depthClearCommand.execute(t._context,i);for(c=0;c<u;++c)if(t.frameState.passes.pick){(h=t._hdr&&t.logarithmicDepthBuffer?l[c].derivedCommands.logDepth.command.derivedCommands.picking.pickCommand:l[c].derivedCommands.picking.pickCommand).execute(t._context,i)}else l[c].execute(n,i)}}_0x5430eb.prototype.resolveFramebuffers=function(e){var t=this._scene,i=t._context,n=t._frameState,r=t._environmentState,o=t._view;const a=o.globeDepth;e$2e(a)&&a.prepareColorTextures(i);var s=t.voxelGridPostRender,l=t.particlePostRender,u=t.particleTrailsPostRenderer,c=n.passes.pick,h=r.useOIT,d=e$2e(s)&&s.enable,f=r.useGlobeDepthFramebuffer,p=r.usePostProcess;r.usePostEffect,n._fboState.frameBufferType,Qe$c.NORMAL_AND_DEPTH;var _=r.originalFramebuffer,m=f?o.globeDepth.framebufferWithTexture:void 0,g=o.sceneFramebuffer.getFramebuffer(),x=o.sceneFramebuffer.getIdFramebuffer();if(e$2e(u)&&!c&&u.execute(i,e),e$2e(s)){if(e.framebuffer=p?g:_,h){var y=s.getOutputFramebuffer();e$2e(y)&&(e.framebuffer=y,o.oit.setOpaqueTexture(y.getColorTexture(0)))}s.execute(i,e)}if(h&&(e.framebuffer=p?g:_,o.oit.execute(i,e)),e$2e(l)&&l.execute(i,e),p){var v=g;f&&!h&&!d&&(v=m),t.compositor.outputFbo=v;var $=t.postProcessStages,b=v.getColorTexture(0),T=x.getColorTexture(0),C=u$Z(m,g).depthStencilTexture;$.execute(i,b,C,T),$.copy(i,_,n.useLogDepth),t.compositor.outputFbo=void 0}!h&&!p&&f&&(e.framebuffer=_,f$1a.clone(e.viewport,_0x41dbc1),e.viewport.x=0,e.viewport.y=0,e.viewport.width=i.drawingBufferWidth,e.viewport.height=i.drawingBufferHeight,o.globeDepth.executeCopyColor(i,e),f$1a.clone(_0x41dbc1,e.viewport));var S=n.useLogDepth;t.debugShowGlobeDepth&&f&&_0x8127cb(t,t.debugShowDepthFrustum-1).executeDebugGlobeDepth(i,e,S);t.debugShowPickDepth&&f&&t._picking.getPickDepth(t,t.debugShowDepthFrustum-1).executeDebugPickDepth(i,e,S)},_0x5430eb.prototype.updateShadowMaps=function(){var e=this._scene,t=e._frameState,i=t.shadowMaps,n=i.length,r=n>0&&!t.passes.pick&&e.mode===C$14.SCENE3D;if(r!==t.shadowState.shadowsEnabled&&(++t.shadowState.lastDirtyTime,t.shadowState.shadowsEnabled=r),t.shadowState.lightShadowsEnabled=!1,r){for(var o=0;o<n;++o)if(i[o]!==t.shadowState.shadowMaps[o]){++t.shadowState.lastDirtyTime;break}t.shadowState.shadowMaps.length=0,t.shadowState.lightShadowMaps.length=0;for(var a=0;a<n;++a){var s=i[a];s.update(t),t.shadowState.shadowMaps.push(s),s.fromLightSource&&(t.shadowState.lightShadowMaps.push(s),t.shadowState.lightShadowsEnabled=!0),s.dirty&&(++t.shadowState.lastDirtyTime,s.dirty=!1)}}},_0x5430eb.prototype.updateAndRenderPrimitives=function(e){var t=this._scene,i=t._frameState,n=t._context,r=i.commandList;t._groundPrimitives.update(i),t._primitives.update(i),_0x48eb3f(t),e&&this.updateShadowMaps();var o=t.layers.update(n,i,r,!0);if(i.rasterLayerIds=o,t._globe){for(var a in t._vectorTileSource._hash){(s=t._vectorTileSource.get(a))instanceof M$S&&s.resetVisible()}t._globe.render(i)}for(var a in i.rasterLayerIds=void 0,t.layers.update(n,i,r),t.layers.updateTextVisible(n,i),t._analyst3D.update(n,i,r),t._vectorTileMaps.update(n,i,r),t._plotLayers.update(i,n,r),t._vectorTileSource._hash){var s;(s=t._vectorTileSource.get(a)).update(n,i,r)}},_0x5430eb.prototype.updateAndClearFramebuffers=function(e,t){var i=this._scene,n=i._context,r=i._frameState,o=i._environmentState,a=i._view,s=i._frameState.passes,l=s.pick,u=s.fbo,c=o.useWebVR;o.originalFramebuffer=e.framebuffer,e$2e(i.sun)&&i.sunBloom!==i._sunBloom?(i.sunBloom&&!c?i._sunPostProcess=new s$e:e$2e(i._sunPostProcess)&&(i._sunPostProcess=i._sunPostProcess.destroy()),i._sunBloom=i.sunBloom):!e$2e(i.sun)&&e$2e(i._sunPostProcess)&&(i._sunPostProcess=i._sunPostProcess.destroy(),i._sunBloom=!1);var h=this._clearColorCommand;e$1X.clone(t,h.color),h.execute(n,e);var d=o.useGlobeDepthFramebuffer=(i._enableCompositor||l)&&e$2e(a.globeDepth);d&&(a.globeDepth.update(n,e,a.viewport,i._msaaSamples,i._hdr||i._pickPointEnabled),a.globeDepth.clear(n,e,t));var f=a.oit,p=o.useOIT=i._enableCompositor&&!u&&!l&&e$2e(f)&&f.isSupported();p&&(f.update(n,e,a.globeDepth.framebufferWithTexture,i._hdr||i._pickPointEnabled,i._msaaSamples),f.clear(n,e,t),o.useOIT=f.isSupported()),e$2e(i.voxelGridPostRender)&&n.depthTexture&&(i.voxelGridPostRender.update(r,a.globeDepth.framebufferWithTexture,i._hdr),i.voxelGridPostRender.clear(n,e)),e$2e(i.particlePostRender)&&(i.particlePostRender.update(r,i._hdr),i.particlePostRender.clear(n,e)),e$2e(i.particleTrailsPostRenderer)&&!l&&_0x330899(i,e);var _=i.postProcessStages,m=_.screenSpaceReflection;if((o.usePrepass=m.enabled)&&!l){var g=this._prepassRenderer;g.update(a.globeDepth.framebufferWithTexture),g.clear(n,e,t)}var x,y=o.usePostProcess=i._enableCompositor&&!u&&!l&&(i._hdr||_.length>0||_.ambientOcclusion.enabled||_.fxaa.enabled||_.bloom.enabled||_.smaa.enabled);(o.usePostProcessSelected=!1,y)&&(a.sceneFramebuffer.update(n,a.viewport,i._hdr),a.sceneFramebuffer.clear(n,e,t),_.update(n,r.useLogDepth,i._hdr,i),_.clear(n),y=o.usePostProcess=_.ready,o.usePostProcessSelected=y&&_.hasSelected,(o.usePostEffect=e$2e(i.compositor)&&i.compositor.isEnable())&&(i.compositor.update(n,e,i,r),i.compositor.clear(n,t),_.compositor=i.compositor));if(o.isSunVisible&&i.sunBloom&&!c&&!u?(e.framebuffer=i._sunPostProcess.update(e),i._sunPostProcess.clear(n,e,t)):d?r._fboState.frameBufferType!==Qe$c.CLAMP&&(e.framebuffer=a.globeDepth.framebuffer):y&&(e.framebuffer=a.sceneFramebuffer.getFramebuffer()),e$2e(e.framebuffer)&&h.execute(n,e),o.useInvertClassification=!l&&e$2e(e.framebuffer)&&i.invertClassification)if(1===i.frameState.invertClassificationColor.alpha&&o.useGlobeDepthFramebuffer&&(x=a.globeDepth.framebuffer),e$2e(x)||n.depthTexture){if(i._invertClassification.previousFramebuffer=x,i._invertClassification.update(n),i._invertClassification.clear(n,e),i.frameState.invertClassificationColor.alpha<1&&p){var v=i._invertClassification.unclassifiedCommand,$=v.derivedCommands;$.oit=f.createDerivedCommands(v,n,$.oit)}}else o.useInvertClassification=!1;i._globeTranslucencyState.translucent&&a.globeTranslucencyFramebuffer.updateAndClear(i._hdr,a.viewport,n,e)};var _0x348c45=new a$18(Math.PI,e$2d.PI_OVER_TWO),_0x4fd01e=new o$1p,_0xb89632=new o$1p,_0x1fb4f4=new p$1d,_0xb8a3c0=new p$1d,_0x13adaf=new o$1p,_0x492749=new o$1p,_0x3e1e1b=new f$1a;function _0xb8ae9e(e,t,i){if(!e._frameState.passes.fbo){var n=e.context,r=e._environmentState,o=e._view.globeDepth;if(n.depthTexture&&e.useDepthPicking&&r.useGlobeDepthFramebuffer){if(s=e$2e(t.framebuffer)&&e$2e(t.framebuffer.depthStencilTexture)?t.framebuffer.depthStencilTexture:o.depthStencilTexture,!e$2e(s))return;(a=e._picking.getPickDepth(e,i)).update(n,s),a.executeCopyDepth(n,t)}else if(e$2e(t.framebuffer)&&e$2e(t.framebuffer.getColorTexture(0))){var a,s=t.framebuffer.getColorTexture(0);(a=e._picking.getPickDepth(e,i)).update(n,s),a.executeCopyDepth(n,t)}}}function _0x25e1a2(e,t,i,n){var r=t._frameState,o=r.passes;if(e.debugShowBoundingVolume&&e$2e(e.boundingVolume)&&_0x5993b9.debugShowBoundingVolume(e,t,n,debugFramebuffer),r.useLogDepth&&e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command),!o.pick&&t._hdr&&e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),!o.pick&&t.maskEnabled&&e$2e(e.derivedCommands)&&e$2e(e.derivedCommands.mask)&&(e=e.derivedCommands.mask.command),o.pick&&o.normal){if(!e$2e(e.derivedCommands))return;(e=e.derivedCommands.normal.command).execute(i,n)}else{if(o.prepass){if(!e$2e(e.derivedCommands)||!e$2e(e.derivedCommands.prepass))return;return(e=e.derivedCommands.prepass.command).framebuffer=t._renderPipeline._prepassRenderer.framebuffer,void e.execute(i,n)}if(o.pick||o.depth){if(!e$2e(e.derivedCommands))return;if(o.pick&&!o.depth&&e$2e(e.derivedCommands.picking))return void(e=e.derivedCommands.picking.pickCommand).execute(i,n);if(o.depth&&e$2e(e.derivedCommands.depth)){if(e.pass===Le$q.ANALYSIS||!e.renderState.depthTest.enabled)return;return void(e=e.derivedCommands.depth.depthOnlyCommand).execute(i,n)}}t.debugShowCommands||t.debugShowFrustums?_0x5993b9.executeDebugCommand(e,t,n):r.shadowState.lightShadowsEnabled&&e.receiveShadows&&e$2e(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(i,n):e.execute(i,n)}}function _0x552234(e,t,i,n){var r=t._frameState,o=e.derivedCommands;!e$2e(o)||(r.useLogDepth&&e$2e(o.logDepth)&&(e=o.logDepth.command),e$2e((o=e.derivedCommands).picking)?(e=o.picking.pickCommand).execute(i,n):e$2e(o.depth)&&(e=o.depth.depthOnlyCommand).execute(i,n))}function _0x1dc6d9(e,t,i){return t.boundingVolume.distanceSquaredTo(i)-e.boundingVolume.distanceSquaredTo(i)}function _0x493dd4(e,t,i){return e.boundingVolume.distanceSquaredTo(i)-t.boundingVolume.distanceSquaredTo(i)+e$2d.EPSILON12}function _0x508753(e,t,i,n,r){var o=e.context;m$I(n,_0x1dc6d9,e.camera.positionWC),e$2e(r)&&t(r.unclassifiedCommand,e,o,i);for(var a=n.length,s=0;s<a;++s)t(n[s],e,o,i)}function _0x1f895b(e,t,i,n,r){var o=e.context;m$I(n,_0x493dd4,e.camera.positionWC),e$2e(r)&&t(r.unclassifiedCommand,e,o,i);for(var a=n.length,s=e.frameState.passes,l=0;l<a;++l)s.pick&&!e$2e(n[l].pickId)&&!s.depth||t(n[l],e,o,i)}function _0x411040(e){var t,i=e._frameState.passes,n=e.context,r=e._environmentState,o=e._view;return r.useOIT?(e$2e(e._executeOITFunction)||(e._executeOITFunction=function(e,t,i,r,a){o.globeDepth.prepareColorTextures(n),o.oit.executeCommands(e,t,i,r,a)}),t=e._executeOITFunction):t=i.render?_0x508753:_0x1f895b,t}function _0x43d853(e,t,i){for(var n=i.shadowMapCullingVolume,r=i.isPointLight,o=i.passes,a=o.length,s=t.length,l=0;l<s;++l){var u=t[l];if(e.updateDerivedCommands(u),u.castShadows&&(u.pass===Le$q.GLOBE||u.pass===Le$q.CESIUM_3D_TILE||u.pass>=Le$q.S3MTiles&&u.pass<=Le$q.TRANSLUCENT)&&e.isVisible(u,n))if(r)for(var c=0;c<a;++c)o[c].commandList.push(u);else if(1===a)o[0].commandList.push(u);else for(var h=!1,d=a-1;d>=0;--d){var f=o[d].cullingVolume;if(e.isVisible(u,f))o[d].commandList.push(u),h=!0;else if(h)break}}}function _0x4f389e(e){var t=e.frameState,i=t.shadowState.shadowMaps,n=i.length;if(t.shadowState.shadowsEnabled)for(var r=e.context,o=r.uniformState,a=0;a<n;++a){var s=i[a];if(!s.outOfView){var l,u=s.passes,c=u.length;for(l=0;l<c;++l)u[l].commandList.length=0;for(_0x43d853(e,e.frameState.commandList,s),l=0;l<c;++l){var h=s.passes[l];h.camera._scene=e,o.updateCamera(h.camera,r),s.updatePass(r,l);for(var d=h.commandList.length,f=0;f<d;++f){var p=h.commandList[f];o.updatePass(p.pass),_0x25e1a2(p.derivedCommands.shadows.castCommands[a],e,r,h.passState)}r.webgpu&&r.engine.flushFramebuffer()}}}}function _0x3b1553(e){e.context.uniformState.updatePass(Le$q.COMPUTE);var t=e._environmentState.sunComputeCommand;e$2e(t)&&t.execute(e._computeEngine);for(var i=e._computeCommandList,n=i.length,r=0;r<n;++r)i[r].execute(e._computeEngine)}_0x5430eb.prototype.execute2DViewportCommands=function(e){var t=this._scene,i=t.context,n=t.frameState,r=t.camera,o=e.viewport,a=f$1a.clone(o,_0x3e1e1b);e.viewport=a;var s=_0x348c45,l=_0x4fd01e;t.mapProjection.project(s,l);var u=o$1p.clone(r.position,_0xb89632),c=p$1d.clone(r.transform,_0xb8a3c0),h=r.frustum.clone();r._setTransform(p$1d.IDENTITY);var d=p$1d.computeViewportTransformation(a,0,1,_0x1fb4f4),f=r.frustum.projectionMatrix,p=r.positionWC.y,_=o$1p.fromElements(e$2d.sign(p)*l.x-p,0,-r.positionWC.x,_0x13adaf),m=m$19.pointToGLWindowCoordinates(f,d,_,_0x492749);m.x=Math.floor(m.x);var g=a.x,x=a.width;if(0===p||m.x<=g||m.x>=g+x)this.executeCommandsInViewport(!0,e);else if(Math.abs(g+.5*x-m.x)<1)a.width=m.x-a.x,r.position.x*=e$2d.sign(r.position.x),r.frustum.right=0,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!0,e),a.x=m.x,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=0,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!1,e);else if(m.x>g+.5*x){a.width=m.x-g;var y=r.frustum.right;r.frustum.right=l.x-p,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!0,e),a.x=m.x,a.width=g+x-m.x,r.position.x=-r.position.x,r.frustum.left=-r.frustum.right,r.frustum.right=y-2*r.frustum.right,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!1,e)}else{a.x=m.x,a.width=g+x-m.x;var v=r.frustum.left;r.frustum.left=-l.x-p,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!0,e),a.x=g,a.width=m.x-g,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=v-2*r.frustum.left,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(n),this.executeCommandsInViewport(!1,e)}r._setTransform(c),o$1p.clone(u,r.position),r.frustum=h.clone(),e.viewport=o},_0x5430eb.prototype.executeCommandsInViewport=function(e,t,i){var n=this._scene,r=n._environmentState,o=n._view,a=r.renderTranslucentDepthForPick;!e&&!a&&(n.frameState.commandList.length=0),(!a||n._frameState.multiViewportIndex>-1)&&this.updateAndRenderPrimitives(e),o.createPotentiallyVisibleSet(n),e&&(e$2e(i)&&this.updateAndClearFramebuffers(t,i),a||(_0x3b1553(n),_0x4f389e(n))),this.executeCommands(t)},_0x5430eb.prototype.executeIdCommands=function(e,t,i){var n=this._scene,r=n._view,o=n._environmentState,a=o.clearGlobeDepth,s=o.useDepthPlane,l=this._depthClearCommand,u=n._depthPlane,c=n.context,h=c.uniformState,d=e.framebuffer;e.framebuffer=r.sceneFramebuffer.getIdFramebuffer(),t.near=0!==index?i.near*n.opaqueFrustumNearOffset:i.near,t.far=i.far,h.updateFrustum(t),h.updatePass(Le$q.GLOBE);var f=i.commands[Le$q.GLOBE],p=i.indices[Le$q.GLOBE];for(j=0;j<p;++j)_0x552234(f[j],n,c,e);for(a&&(l.framebuffer=e.framebuffer,l.execute(c,e),l.framebuffer=void 0),a&&s&&u.execute(c,e),h.updatePass(Le$q.CESIUM_3D_TILE),f=i.commands[Le$q.CESIUM_3D_TILE],p=i.indices[Le$q.CESIUM_3D_TILE],j=0;j<p;++j)_0x552234(f[j],n,c,e);for(h.updatePass(Le$q.OPAQUE),f=i.commands[Le$q.OPAQUE],p=i.indices[Le$q.OPAQUE],j=0;j<p;++j)_0x552234(f[j],n,c,e);for(h.updatePass(Le$q.TRANSLUCENT),f=i.commands[Le$q.TRANSLUCENT],p=i.indices[Le$q.TRANSLUCENT],j=0;j<p;++j)_0x552234(f[j],n,c,e);e.framebuffer=d},_0x5430eb.prototype.executeCommandsForEnvironment=function(e,t){var i=this._scene,n=i.camera,r=i.context,o=r.uniformState,a=i._frameState.passes;if(!a.pick){t.near=n.frustum.near,t.far=n.frustum.far;var s=t.reflect;t.reflect=!1,o.updateFrustum(t);var l=i._environmentState,u=i._environmentVisible,c=l.skyBoxCommand,h=l.useWebVR,d=i._view;if(o.updatePass(Le$q.ENVIRONMENT),e$2e(c)&&u.isSkyBoxVisible&&_0x25e1a2(c,i,r,e),l.isSkyAtmosphereVisible&&u.isSkyAtmosphereVisible&&_0x25e1a2(l.skyAtmosphereCommand,i,r,e),l.isUnderGlobeVisible&&u.isUnderGlobeVisible&&l.underGlobeCommand.execute(r,e),l.isSunVisible&&u.isSunVisible&&!a.fbo&&(l.sunDrawCommand.execute(r,e),i.sunBloom&&!h)){var f;f=l.useGlobeDepthFramebuffer?d.globeDepth.framebuffer:l.usePostProcess?d.sceneFramebuffer.getFramebuffer():l.originalFramebuffer;var p=i._multiViewportMode!==B$e.NONE;i._sunPostProcess.execute(r),i._sunPostProcess.copy(r,f,p?e:void 0),e.framebuffer=f}l.isMoonVisible&&u.isMoonVisible&&l.moonCommand.execute(r,e),t.reflect=s}};var _0x7faed4=new o$15,_0x4fe6e9=new l$10,_0x4a2b1c=new a$V,_0x1cc094=new l$11;function _0x4da7a0(e){return e$2e(e.frustum.fov)?e.frustum.clone(_0x7faed4):e$2e(e.frustum.infiniteProjectionMatrix)?e.frustum.clone(_0x4fe6e9):e$2e(e.frustum.width)?e.frustum.clone(_0x4a2b1c):e.frustum.clone(_0x1cc094)}function _0x330899(e,t){for(var i=e._context,n=e._frameState,r=e._view.camera,o=0,a=e._layers.layerQueue.length;o<a;o++){var s=e._layers.layerQueue[o];if("FieldLayer3D"===s._type)(c=s._particleVelocityFieldEffect)._showParticleTrails&&e$2e(c._lastParticleStateTexture)&&(c.clearLastParticleStateTexture(r,e._hdr,i,t),e.particleTrailsPostRenderer._particleStateTexture=c._lastParticleStateTexture,e.particleTrailsPostRenderer.update(n))}for(var l=0,u=e._primitives.length;l<u;l++){var c,h=e._primitives._primitives[l];if("FieldLayer3D"==h.type)(c=h._particleVelocityFieldEffect)._showParticleTrails&&e$2e(c._lastParticleStateTexture)&&(c.clearLastParticleStateTexture(r,e._hdr,i,t),e.particleTrailsPostRenderer._particleStateTexture=c._lastParticleStateTexture,e.particleTrailsPostRenderer.update(n))}}function _0x48eb3f(e){var t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new p$V({camera:e.camera,updateOnChange:!1}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),e$2e(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function _0x8127cb(e,t){var i=e._view.debugGlobeDepths,n=i[t];return!e$2e(n)&&e.context.depthTexture&&(n=new GlobeDepth,i[t]=n),n}function _0x43de4f(e,t,i,n){var r=e._view,o=r.camera,a=e._environmentState.renderTranslucentDepthForPick;n.updateAndClearFramebuffers(t,i),a||n.updateAndRenderPrimitives(e),r.createPotentiallyVisibleSet(e),a||(_0x3b1553(e),_0x4f389e(e));var s=t.viewport;s.x=0,s.y=0,s.width=.5*s.width;var l=v$K.clone(o,e._cameraVR);l.frustum=o.frustum;var u=o.frustum.near,c=u*u$Z(e.focalLength,5),h=u$Z(e.eyeSeparation,c/30),d=o$1p.multiplyByScalar(l.right,.5*h,new o$1p(0,0,0));o.frustum.aspectRatio=s.width/s.height;var f=.5*h*u/c;o$1p.add(l.position,d,o.position),o.frustum.xOffset=f,n.executeCommands(t),s.x=s.width,o$1p.subtract(l.position,d,o.position),o.frustum.xOffset=-f,n.executeCommands(t),v$K.clone(l,o)}_0x5430eb.prototype._listenerTypeToEvent=function(e){var t=null;switch(e){case k$g.BeforeExecuteCommands:t=this._beforeExecuteCommandsEvent;break;case k$g.BeforeExecuteCommandsForOnePass:t=this._beforeExecuteCommandsForOnePass;break;case k$g.PostExecuteCommandsForOnePass:t=this._postExecuteCommandsForOnePass}return t},_0x5430eb.prototype.addEventListener=function(e,t,i){this._listenerTypeToEvent(e).addEventListener(t,i)},_0x5430eb.prototype.removeEventListener=function(e,t,i){this._listenerTypeToEvent(e).removeEventListener(t,i)},_0x5430eb.prototype.isDestroyed=function(){return!1},_0x5430eb.prototype.destroy=function(){return i$11(this)};var _0x5ece9f=(_0x436cb1=!0,function(e,t){var i=_0x436cb1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x436cb1=!1,i}),_0x35c2b9=_0x5ece9f(void 0,(function(){return _0x35c2b9.toString().search("(((.+)+)+)+$").toString().constructor(_0x35c2b9).search("(((.+)+)+)+$")})),_0x436cb1;function _0x23bf52(){}_0x35c2b9(),_0x23bf52.maxVBOSize=0;var _0x22e075=0,_0x5074f7=0,_0xd11576=1048576,_0xf84263={},_0x139076=new e$1Q;_0x23bf52.createVertexBuffer=function(e,t){var i;if(e$2e(_0xf84263[e.id])){i=_0xf84263[e.id];for(var n,r=t.byteLength,o=Object.keys(i._hash),a=!1,s=0,l=o.length;s<l;s++)if((n=Number(o[s]))>=r&&n<r+1024){a=!0;break}var u;if(a){var c=i.get(n);(u=c.pop()).isCached=!1,u.copyFromArrayView(t,0),_0x22e075-=n,c.length<1&&i.remove(n)}return u}},_0x23bf52.createIndexBuffer=function(e,t){var i;if(e$2e(_0x139076[e.id])){i=_0x139076[e.id];for(var n,r=t.byteLength,o=Object.keys(i._hash),a=!1,s=0,l=o.length;s<l;s++)if((n=Number(o[s]))===r){a=!0;break}var u;if(a){var c=i.get(n);(u=c.pop()).isCached=!1,u.copyFromArrayView(t,0),_0x5074f7-=n,c.length<1&&i.remove(n)}return u}},_0x23bf52.deleteBuffer=function(e){if(e$2e(_0xf84263[e.id])){var t,i,n,r,o=_0xf84263[e.id],a=_0xd11576*_0x23bf52.maxVBOSize*.9;if(_0x22e075>a*_0xd11576){var s=a*_0xd11576;for(i=(t=Object.keys(o._hash)).length,n=0;n<i&&_0x22e075>s;){r=t[n];for(var l=o.get(r);l.length&&_0x22e075>s;){l.pop().destroy(),_0x22e075-=r}l.length<1&&o.remove(r),++n}}if(e$2e(_0x139076[e.id])){var u=_0x139076[e.id],c=_0xd11576*_0x23bf52.maxVBOSize*.1;if(_0x5074f7>c*_0xd11576){var h=c*_0xd11576;for(i=(t=Object.keys(u._hash)).length,n=0;n<i&&_0x5074f7>h;){r=t[n];for(var d=u.get(r);d.length&&_0x5074f7>h;){d.pop().destroy(),_0x5074f7-=r}d.length<1&&u.remove(r),++n}}}}},_0x23bf52.deleteVertexArray=function(e,t){var i,n;e$2e(_0xf84263[e.id])||(_0xf84263[e.id]=new e$1Q),i=_0xf84263[e.id];for(var r=t._attributes,o=.9*_0x23bf52.maxVBOSize,a=0;a<r.length;++a){var s=r[a].vertexBuffer;if(!(_0x22e075>=o||s.isCached||s.vertexArrayDestroyable)){var l=s.sizeInBytes;i.contains(l)?i.get(l).push(s):i.set(l,[s]),s.isCached=!0,_0x22e075+=l}}e$2e(_0x139076[e.id])||(_0x139076[e.id]=new e$1Q),n=_0x139076[e.id];var u=t._indexBuffer;return.1*_0x23bf52.maxVBOSize>_0x5074f7&&e$2e(u)&&!u.isCached&&!u.vertexArrayDestroyable&&(n.contains(u.sizeInBytes)?n.get(u.sizeInBytes).push(u):n.set(u.sizeInBytes,[u]),u.isCached=!0,_0x5074f7+=u.sizeInBytes),t.destroy()};var _0x5f46c2=(_0x28d903=!0,function(e,t){var i=_0x28d903?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x28d903=!1,i}),_0x44da28=_0x5f46c2(void 0,(function(){return _0x44da28.toString().search("(((.+)+)+)+$").toString().constructor(_0x44da28).search("(((.+)+)+)+$")})),_0x28d903;function _0x15cf65(e){this._longitude=u$Z(e.longitude,0),this._latitude=u$Z(e.latitude,0),this._altitude=u$Z(e.altitude,0),this._scale=u$Z(e.scale,new o$1p(1,1,1)),this._color=u$Z(e.color,e$1X.WHITE),this._heading=u$Z(e.heading,Math.PI/2),this._pitch=u$Z(e.pitch,0),this._roll=u$Z(e.roll,0),this._startDirection=u$Z(e.startDirection,0),this._offset=u$Z(e.offset,new o$1p),this._timeStamp=u$Z(e.timeStamp,-1),this._id=u$Z(e.id,e$1T()),this._description=e.description,this._lockOrientation=u$Z(e.lockOrientation,!1)}_0x44da28(),Object.defineProperties(_0x15cf65.prototype,{longitude:{get:function(){return this._longitude},set:function(e){this._longitude=e}},latitude:{get:function(){return this._latitude},set:function(e){this._latitude=e}},altitude:{get:function(){return this._altitude},set:function(e){this._altitude=e}},scale:{get:function(){return this._scale},set:function(e){this._scale=e}},color:{get:function(){return this._color},set:function(e){this._color=e}},heading:{get:function(){return this._heading},set:function(e){this._heading=e}},pitch:{get:function(){return this._pitch},set:function(e){this._pitch=e}},roll:{get:function(){return this._roll},set:function(e){this._roll=e}},startDirection:{get:function(){return this._startDirection},set:function(e){this._startDirection=e}},offset:{get:function(){return this._offset},set:function(e){this._offset=e}},timeStamp:{get:function(){return this._timeStamp},set:function(e){this._timeStamp=e}},id:{get:function(){return this._id},set:function(e){this._id=e}},description:{get:function(){return this._description},set:function(e){this._description=e}},lockOrientation:{get:function(){return this._lockOrientation},set:function(e){this._lockOrientation=e}}}),_0x15cf65.clone=function(e){return new _0x15cf65({longitude:e._longitude,latitude:e._latitude,altitude:e._altitude,scale:e._scale,color:e._color,heading:e._heading,pitch:e._pitch,roll:e._roll,startDirection:e._startDirection,offset:e._offset,lockOrientation:e._lockOrientation})};var _0x95df15=(_0x31334f=!0,function(e,t){var i=_0x31334f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31334f=!1,i}),_0x3ad990=_0x95df15(void 0,(function(){return _0x3ad990.toString().search("(((.+)+)+)+$").toString().constructor(_0x3ad990).search("(((.+)+)+)+$")})),_0x31334f;_0x3ad990();var _0x41f4a0="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\n#ifdef TEXTURE\nattribute vec4 aTexCoord0;\n#endif\n#ifdef VertexColor\nattribute vec4 aColor;\n#endif\nattribute vec4 aPreHxyzLx;\nattribute vec4 aPreLyzNextHxy;\nattribute vec4 aNextHzLxyz;\nattribute vec4 aPreOrientation;\nattribute vec4 aNextOrientation;\nattribute vec4 aColorAndPickColor;\nattribute vec3 aPreHpr;\nattribute vec3 aNextHpr;\nattribute vec3 aScale;\n#include <SceneUboDecl>\nuniform vec3 uOffset;\nuniform mat4 uGeoMatrix;\nuniform float uInterval;\nuniform float uFilterMode;\nuniform float uMaxVisibleDistance;\nuniform float uFilterPixel;\nuniform float uRadius;\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying vec3 vNormalEC;\nvarying mat4 vModelMatrix;\n\nvec4 vertexColor = vec4(1.0);\nvec4 quaternionfromAxisAngle(vec3 axis, float angle)\n{\n float halfAngle = angle * 0.5;\n float s = sin(halfAngle);\n vec3 fromAxis = normalize(axis);\n return vec4(fromAxis * s, cos(halfAngle));\n}\nvec4 quaternionMultiply(vec4 left, vec4 right)\n{\n float x = left.w * right.x + left.x * right.w + left.y * right.z - left.z * right.y;\n float y = left.w * right.y - left.x * right.z + left.y * right.w + left.z * right.x;\n float z = left.w * right.z + left.x * right.y - left.y * right.x + left.z * right.w;\n float w = left.w * right.w - left.x * right.x - left.y * right.y - left.z * right.z;\n return vec4(x, y, z, w);\n}\nmat4 rotationFromQuaternion(vec4 q)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvec4 lerp(vec4 start, vec4 end, float t)\n{\n vec4 tmp = end * t;\n vec4 result = start * (1.0 - t);\n return result + tmp;\n}\nvec4 slerp(vec4 start, vec4 end, float t)\n{\n float adot = dot(start, end);\n vec4 r = end;\n if(adot < 0.0){\n adot = -adot;\n r = end * -1.0;\n }\n if(1.0 - adot < 0.000001){\n return mix(start, r, t);\n }\n float theta = acos(adot);\n float angle = (1.0 - t) * theta;\n vec4 scaledP = start * sin(angle);\n vec4 scaledR = r * (sin(t * theta));\n vec4 result = scaledP + scaledR;\n return result * (1.0 / sin(theta));\n}\nfloat filterTest(vec3 rte, float radius)\n{\n if(uFilterMode > 0.0)\n {\n float distance = length(rte);\n float theta = czm_piOverFour * 0.5;\n float screenPix = max(czm_globeDepthTextureDim.x, czm_globeDepthTextureDim.y) * 0.5;\n float lamat = screenPix / tan(theta);\n return lamat * radius / distance > uFilterPixel ? 1.0 : 0.0;\n }\n return length(rte) < uMaxVisibleDistance ? 1.0 : 0.0;\n}\n\nvec4 translateRelativeToEye(vec3 high,vec3 low) {\n vec3 highDifference = high - czm_encodedOriginCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedOriginCameraPositionMCLow;\n return vec4(highDifference + lowDifference, 1.0);\n}\n\nvoid main()\n{\n#ifdef VertexColor\n vertexColor = aColor;\n#endif\n vec3 prePosHigh = aPreHxyzLx.xyz;\n vec3 prePosLow = vec3(aPreHxyzLx.w, aPreLyzNextHxy.xy);\n vec3 nextPosHigh = vec3(aPreLyzNextHxy.zw, aNextHzLxyz.x);\n vec3 nextPosLow = aNextHzLxyz.yzw;\n#ifdef TEXTURE\n vTexCoord = aTexCoord0.xy;\n#endif\n vec4 vertexPos = aPosition - vec4(uOffset.xyz,0.0);\n //vertexPos.xyz *= aScale;\n vec4 positionMC = uGeoMatrix * vertexPos;\n vec4 preRte = translateRelativeToEye(prePosHigh,prePosLow);\n vec4 nextRte = translateRelativeToEye(nextPosHigh,nextPosLow);\n vec4 rte = mix(preRte, nextRte, uInterval);\n float show = filterTest(rte.xyz, uRadius * aScale.x);\n vec3 hpr = mix(aPreHpr, aNextHpr, uInterval);\n vec4 rollQuaternion = quaternionfromAxisAngle(vec3(1.0, 0.0, 0.0), hpr.z);\n vec4 pitchQuaternion = quaternionfromAxisAngle(vec3(0.0, 1.0, 0.0), -hpr.y);\n vec4 headingQuaternion = quaternionfromAxisAngle(vec3(0.0, 0.0, 1.0), -hpr.x);\n vec4 q = quaternionMultiply(rollQuaternion, pitchQuaternion);\n q = quaternionMultiply(headingQuaternion, q);\n mat4 rotationMat = rotationFromQuaternion(q);\n vec4 orientation = slerp(aPreOrientation, aNextOrientation, uInterval);\n mat3 velocityMat = mat3(rotationFromQuaternion(orientation));\n mat3 rotationMatrix = velocityMat * mat3(rotationMat);\n mat4 scaleMatrix = mat4(aScale.x, 0, 0, 0, 0, aScale.y, 0, 0, 0, 0, aScale.z, 0, 0, 0, 0, 1);\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMatrix[0], 0.0);\n worldMatrix[1] = vec4(rotationMatrix[1], 0.0);\n worldMatrix[2] = vec4(rotationMatrix[2], 0.0);\n worldMatrix[3] = vec4(rte.xyz, 1.0);\n mat4 modelMatrix = worldMatrix * scaleMatrix;\n vModelMatrix = modelMatrix * uGeoMatrix;\n vertexPos = modelMatrix * positionMC;\n vertexPos.w = 1.0;\n vPositionMC.xyz = rotationMatrix * positionMC.xyz;\n vPositionMC.w = 0.0;\n vPositionEC = (czm_modelViewRelativeToEye * vec4(vPositionMC.xyz, 1.0)).xyz;\n gl_Position = show * czm_modelViewProjectionRelativeToEye * vertexPos;\n vec4 color, pickColor;\n color.xy = czm_decompressTextureCoordinates(aColorAndPickColor.x);\n color.zw = czm_decompressTextureCoordinates(aColorAndPickColor.y);\n pickColor.xy = czm_decompressTextureCoordinates(aColorAndPickColor.z);\n pickColor.zw = czm_decompressTextureCoordinates(aColorAndPickColor.w);\n vColor = vertexColor * color;\n#ifdef HAS_NORMAL\n if(length(aNormal) > 0.8)\n {\n vec3 normal = rotationMatrix * aNormal;\n mat4 realModelViewMatrix4 = czm_view * vModelMatrix;\n realModelViewMatrix4 = czm_inverseMatrix(realModelViewMatrix4);\n mat3 realModelViewMatrix3 = mat3(realModelViewMatrix4);\n realModelViewMatrix3 = czm_transpose(realModelViewMatrix3);\n vNormalEC = normalize(realModelViewMatrix3 * aNormal);\n vPositionMC.w = 1.0;\n }\n#endif\n vPickColor = pickColor;\n}",_0x1d5e65=(_0xb86bc3=!0,function(e,t){var i=_0xb86bc3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xb86bc3=!1,i}),_0x238498=_0x1d5e65(void 0,(function(){return _0x238498.toString().search("(((.+)+)+)+$").toString().constructor(_0x238498).search("(((.+)+)+)+$")})),_0xb86bc3;_0x238498();var _0x293bae=34,_0x1f5fae=new e$1X(.7,.7,1,1),_0x562eb1={UNLOAD:0,LOADING:1,LOADED:2,PARSING:3,READY:4,FAILED:5};function _0x256afc(e,t){LicenseChecker.LICENSECHECKER.verify("DynamicLayer3D"),o$1q.defined("context",e),o$1q.defined("context",t),Array.isArray(t)||(t=[t]),this._context=e,this._gl=e._gl,this._updateInterval=1e3,this._xmlParser=new s$T,this._visible=!0,this._type=bt$6.INSTANCED_LAYER,this._group={};for(var i=0,n=t.length;i<n;i++){var r=t[i];o$1q.typeOf.string("url",r),this._group[r]={url:r,ready:!1,visible:!0,pickEnable:!0,cullEnabled:!1,polygonOffset:{enabled:!1,factor:0,units:0},cullFace:G$1a.BACK,loadState:_0x562eb1.UNLOAD,buffer:void 0,offset:new o$1p,radius:0,instanceCount:0,stateList:new e$1Q,instanceList:new e$1Q,removedList:new e$1Q,renderEntities:[],boundingSphere:new i$1d,beginTime:-1,interval:0}}this._maxVisibleAltitude=Number.MAX_VALUE,this._maxVisibleDistance=Number.MAX_VALUE,this._filterMode=_0x219958.DISTANCE_FROM_EYE_POINT,this._filterPixel=0,this._enableLocalOffset=!0,this._visibleViewport=4095,null!==e.s3tc?this._supportCompressType=1:null!==e.pvrtc?this._supportCompressType=2:null!==e.etc1&&(this._supportCompressType=3),this._shadowType=_0x325616.NONE,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:new o$1p,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}}}function _0x22a4b6(e){return e._shadowType==_0x325616.SELECTION||e._shadowType==_0x325616.ALL}function _0x5bafda(e){e._times.length>3&&(e._times.splice(0,1),e._values.splice(0,e._packedLength))}function _0x18256a(e,t,i){for(var n=0;n<e._times.length;n++){var r=a$15.addSeconds(t,n*i,new a$15);e._times[n]=r}}function _0x5ef5de(e,t){for(var i=a$15.now(),n=0,r=e.stateList.length;n<r;n++){var o=e.stateList.values[n];_0x18256a(o.position._property,i,t),_0x18256a(o.heading,i,t),_0x18256a(o.pitch,i,t),_0x18256a(o.roll,i,t),_0x18256a(o.scale,i,t),_0x18256a(o.color,i,t)}}function _0x457875(e){var t={};return e$2e(e.a_position)&&(t.aPosition=e.a_position.index),e$2e(e.a_normal)&&(t.aNormal=e.a_normal.index),e$2e(e.a_vertexColor)&&(t.aColor=e.a_vertexColor.index),e$2e(e.a_texcoord_0)&&(t.aTexCoord0=e.a_texcoord_0.index),e$2e(e.a_texcoord0)&&(t.aTexCoord0=e.a_texcoord0.index),t}function _0x16c723(e,t,i,n){var r=t.buffer;if(!e$2e(r)){var o=0===t.instanceCount?1:t.instanceCount,a=4*_0x293bae*o;(r=t$X.createVertexBuffer({context:e,sizeInBytes:a,usage:A$18.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,t.buffer=r}_0x5b957a(r,i,n,Object.keys(i).length)}Object.defineProperties(_0x256afc.prototype,{updateInterval:{get:function(){return this._updateInterval},set:function(e){this._updateInterval=e}},group:{get:function(){return this._group}},visible:{get:function(){return this._visible},set:function(e){this._visible=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){!e$2e(e)||(this._maxVisibleAltitude=e)}},type:{get:function(){return this._type}},enableLocalOffset:{get:function(){return this._enableLocalOffset},set:function(e){this._enableLocalOffset=e}},maxVisibleDistance:{get:function(){return this._maxVisibleDistance},set:function(e){o$1q.typeOf.number("maxVisibleDistance",e),this._maxVisibleDistance=e}},filterMode:{get:function(){return this._filterMode},set:function(e){o$1q.typeOf.number("filterMode",e),this._filterMode=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){o$1q.typeOf.number("filterPixel",e),this._filterPixel=e}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}}}),_0x256afc.prototype.setPolygonOffset=function(e,t,i){o$1q.typeOf.string("dynamicLayer setPolygonoffset url",e),o$1q.typeOf.number("dynamicLayer setPolygonoffset factor",t),o$1q.typeOf.number("dynamicLayer setPolygonoffset units",i);var n=this._group[e];if(e$2e(n)&&(n.polygonOffset.factor!==t||n.polygonOffset.units!==i)&&(n.polygonOffset={enabled:!0,factor:u$Z(t,0),units:u$Z(i,0)},n.ready))for(var r=0,o=n.renderEntities.length;r<o;r++){var a=n.renderEntities[r].command,s=d$1m.getState(a.renderState);s.polygonOffset={enabled:!0,factor:u$Z(t,0),units:u$Z(i,0)},a.renderState=d$1m.fromCache(s)}},_0x256afc.prototype.update=function(e){if((LicenseChecker.LICENSECHECKER.verify("DynamicLayer3D"),this._visible)&&e._fboState.frameBufferType!==Qe$c.NORMAL_AND_DEPTH){var t=!0;if(e.multiViewportIndex>-1)t=this.getVisibleInViewport(e.multiViewportIndex);this._frameState=e,this._picking=e.passes.pick;var i=e.camera.positionCartographic.height<this._maxVisibleAltitude;for(var n in this._group)if(this._group.hasOwnProperty(n)){var r=this._group[n];if(r.ready){if(!r.visible||(this._picking||(_0x2440bd(e,this,r),_0x3458d8(r,e)),r.instanceCount<1)||!i||!t)continue;for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s.meshUBO.update(this._context),s.materialUBO.update(this._context);var l=s.command;l.instanceCount=r.instanceCount,l.boundingVolume=r.boundingSphere,e.commandList.push(l)}}else _0x301b02(e,this,n)}}},_0x256afc.prototype.setCullEnabled=function(e,t){o$1q.typeOf.string("dynamicLayer setCullEnabled url",e),t=u$Z(t,G$1a.BACK);var i=this._group[e];if(e$2e(i)&&(!i.cullEnabled||i.cullFace!==t)&&(i.cullEnabled=!0,i.cullFace=t,i.ready))for(var n=0,r=i.renderEntities.length;n<r;n++){var o=i.renderEntities[n].command,a=d$1m.getState(o.renderState);a.cull.enabled=!0,a.cull.face=t,o.renderState=d$1m.fromCache(a)}},_0x256afc.prototype.getCullEnabled=function(e){o$1q.typeOf.string("dynamicLayer getCullEnabled url",e);var t=this._group[e];if(e$2e(t))return t.cullEnabled},_0x256afc.prototype.clear=function(e,t){t$11("DynamicLayer3D.prototype.clear","clear() will be deprecated, please use clearState()"),this.clearState(e,t)},_0x256afc.prototype.clearAll=function(){t$11("DynamicLayer3D.prototype.clearAll","clearAll() will be deprecated, please use clearAllState()"),this.clearAllState()},_0x256afc.prototype.clearAllState=function(){for(var e in this._group)this._group.hasOwnProperty(e)&&(this._group[e].stateList.removeAll(),this._group[e].instanceList.removeAll(),_0x1d852e(this,this._group[e]))},_0x256afc.prototype.clearState=function(e,t){o$1q.typeOf.string("dynamicLayer3D.clear url",e),o$1q.defined("dynamicLayer3D.clear ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(e$2e(i)){var n=i.stateList,r=i.instanceList;if(e$2e(n)&&e$2e(r)){for(var o,a=0,s=t.length;a<s;a++)o=t[a],n.contains(o)&&n.remove(o),r.contains(o)&&r.remove(o);_0x1d852e(this,i)}}},_0x256afc.prototype.deleteObjects=function(e,t){o$1q.typeOf.string("dynamicLayer3D.delete url",e),o$1q.defined("dynamicLayer3D.delete ids",t),Array.isArray(t)||(t=[t]);var i=this._group[e];if(e$2e(i)){var n=i.instanceList,r=i.removedList,o=i.stateList;if(e$2e(n)&&e$2e(r)&&e$2e(o)){for(var a,s=0,l=t.length;s<l;s++)a=t[s],o.remove(a),n.contains(a)&&(n.remove(a),r.set(a,!0));_0x1d852e(this,i)}}},_0x256afc.prototype.deleteAllObjects=function(){for(var e in this._group)if(this._group.hasOwnProperty(e)){for(var t=this._group[e],i=t.instanceList,n=Object.keys(i._hash),r=n.length;r--;)t.removedList.set(n[r],!0);i.removeAll(),t.stateList.removeAll(),_0x1d852e(this,t)}},_0x256afc.prototype._updateShadow=function(e){var t=_0x22a4b6(e),i=e._group;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.renderEntities.length;o<a;o++){var s=r.renderEntities[o];s.command.castShadows=t,s.command.receiveShadows=t}}},_0x256afc.prototype.setVisibleByUrl=function(e,t){var i=this._group[e];e$2e(i)&&(i.visible=t)},_0x256afc.prototype.setPickEnable=function(e,t){this._group[e].pickEnable=t},_0x256afc.prototype.updateObjectWithModel=function(e,t){if(o$1q.typeOf.string("url",e),Array.isArray(t)){var i=this._group[e];if(e$2e(i)){e$2e(i.stateList)||(i.stateList=new e$1Q);for(var n,r=0,o=t.length;r<o;r++)if((n=t[r])instanceof _0x15cf65){var a=n.id;if(i.removedList.contains(a))continue;var s=i.stateList.get(a);e$2e(s)||(i.offset=o$1p.clone(n.offset,i.offset),i.stateList.set(a,{position:new o$z,scale:new g$y(o$1p),heading:new g$y(Number),pitch:new g$y(Number),roll:new g$y(Number),color:new g$y(e$1X),offset:n.offset,description:n.description,lockOrientation:n.lockOrientation,id:a}),(s=i.stateList.get(a)).position.setInterpolationOptions({interpolationDegree:10}),s.position.backwardExtrapolationType=_0x1015ec.HOLD,s.position.forwardExtrapolationType=_0x1015ec.HOLD,s.scale.backwardExtrapolationType=_0x1015ec.HOLD,s.scale.forwardExtrapolationType=_0x1015ec.HOLD,s.heading.backwardExtrapolationType=_0x1015ec.HOLD,s.heading.forwardExtrapolationType=_0x1015ec.HOLD,s.pitch.backwardExtrapolationType=_0x1015ec.HOLD,s.pitch.forwardExtrapolationType=_0x1015ec.HOLD,s.roll.backwardExtrapolationType=_0x1015ec.HOLD,s.roll.forwardExtrapolationType=_0x1015ec.HOLD,s.color.backwardExtrapolationType=_0x1015ec.HOLD,s.color.forwardExtrapolationType=_0x1015ec.HOLD,s.startDirection=n.startDirection);var l=a$15.now(),u=o$1p.fromDegrees(n.longitude,n.latitude,n.altitude);_0x5bafda(s.position._property),_0x5bafda(s.heading),_0x5bafda(s.pitch),_0x5bafda(s.roll),_0x5bafda(s.scale),_0x5bafda(s.color),s.position.addSample(l,u),s.heading.addSample(l,n.heading),s.pitch.addSample(l,n.pitch),s.roll.addSample(l,n.roll),s.scale.addSample(l,n.scale),s.color.addSample(l,n.color),s.lockOrientation=n.lockOrientation}}}},_0x256afc.prototype.setUnSelected=function(){var e=this._group;if(e$2e(e))for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];if(!e$2e(i.instanceList)||i.instanceCount<1||!i.pickEnable)continue;for(var n=i.instanceList,r=0;r<n.length;r++){var o=n.values[r];e$2e(o)&&o.setUnSelected()}}},_0x256afc.prototype.getVisibleInViewport=function(e){return!(e>8)&&1<<e&this._visibleViewport},_0x256afc.prototype.setVisibleInViewport=function(e,t){e>8||(this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport)};var _0x43f9ea=new e$2c(1,1,1,1);function _0x17c7de(e,t,i){i.localMatrix=i.modelMatrix.clone();var n=i.uniformMap,r={uInterval:function(){return e.interval},uAmbientColor:function(){return _0x43f9ea},uDiffuseColor:function(){return _0x43f9ea},uSpecularColor:function(){return _0x43f9ea},uShininess:function(){return 1},uPicking:function(){return t._picking},uGeoMatrix:function(){return i.localMatrix},uFilterMode:function(){return t.filterMode},uMaxVisibleDistance:function(){return t.maxVisibleDistance},uFilterPixel:function(){return t.filterPixel},uRadius:function(){return i.boundingVolume.radius},uOffset:function(){return e.offset}};return e$2e(n.u_baseColorTexture)?r.uTexture=n.u_baseColorTexture:e$2e(n.u_diffuse)&&(r.uTexture=n.u_diffuse),e$2e(n.u_specular)&&(r.uSpecularColor=n.u_specular),e$2e(n.u_shininess)&&(r.uShininess=n.u_shininess),r}function _0x3458d8(e,t){if(e$2e(e.model)){e.boundingSphere=e.boundingSphere.clone(),e.model.updateAnimation(t);for(var i=e.model._nodeCommands,n=i.length,r=0;r<n;++r){var o=i[r].command;o.localMatrix=o.modelMatrix,o.modelMatrix=p$1d.IDENTITY.clone()}}}function _0x41f91d(e,t){for(var i=t._context,n=e.model._nodeCommands,r=n.length,o=[],a=0;a<r;++a){var s=n[a].command;t._shadowType==_0x325616.ALL||t._shadowType==_0x325616.SELECTION?(s.castShadows=!0,s.receiveShadows=!0):(s.castShadows=!1,s.receiveShadows=!1),s.pickId="vPickColor",s.instanceCount=e.instanceCount,s.pass=Le$q.S3MTiles+2,s.renderState=_0x2894c2(e);var l=s.vertexArray,u=l._attributes,c=l.indexBuffer;if(u.length<9){var h=_0x457875(s.shaderProgram.vertexAttributes);_0x16c723(i,e,h,u),s.vertexArray=new c$13({context:i,attributes:u,indexBuffer:c})}var d=new s$V({name:"DynamicLayerVertex",sources:[_0x41f4a0]}),f=new s$V({name:"S3ModelFP",sources:[_0x47b2f7]});e$2e(h.aColor)&&d.defines.push("VertexColor"),e$2e(h.aNormal)&&(d.defines.push(D$V.HAS_NORMAL),f.defines.push(D$V.HAS_NORMAL)),e$2e(h.aTexCoord0)&&(d.defines.push("TEXTURE"),f.defines.push("TEXTURE"));const r=t._frameState.lightSource;if(e$2e(r))f.defines.push("MAX_POINT_LIGHT_COUNT "+s$J.MaxPointLightCount),f.defines.push("MAX_SPOT_LIGHT_COUNT "+s$J.MaxSpotLightCount),f.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$J.MaxDirectionLightCount),r.directionalLight.length>0&&f.defines.push(D$V.HAS_DIR_LIGHTS),r._visibleLightList[_0x4970c2.POINT].length>0&&f.defines.push(D$V.HAS_POINT_LIGHTS),r._visibleLightList[_0x4970c2.SPOT].length>0&&f.defines.push(D$V.HAS_SPOT_LIGHTS),r.hemisphereLight.length>0&&f.defines.push(D$V.HAS_HEMISPHERE_LIGHTS);s.shaderProgram=r$14.fromCache({context:i,vertexShaderSource:d,fragmentShaderSource:f,attributeLocations:h});var p=_0x17c7de(e,t,s);p=p$19(p,t._frameState.lightSource.createUniformMap()),s.uniformMap=p,s.modelMatrix=p$1d.IDENTITY.clone(),e.renderEntities.push({command:s,attributes:u,indexBuffer:c}),o.push(s.boundingVolume)}var _=new i$1d;i$1d.fromBoundingSpheres(o,_),e.oriBoundingSphere=_}function _0x301b02(e,t,i){var n=t._group[i],r=n.loadState;if(i.indexOf(".gltf")>0||i.indexOf(".glb")>0)_0x562eb1.UNLOAD==r&&(e$2e(n.model)||(n.model=F$B.fromGltf({url:i,incrementallyLoadTextures:!1})),n.model.update(e),n.model.ready&&(n.ready=!0,n.loadState=_0x562eb1.READY,_0x5ef5de(n,t.updateInterval/1e3),_0x41f91d(n,t),n.model.activeAnimations.addAll({loop:_0x1ea9f2.REPEAT})));else{var o=i.indexOf(".s3mb")>-1;if(_0x562eb1.UNLOAD==r){var a=o$O(i,(function(e){return o$10(e)}));e$2e(a)?(n.loadState=_0x562eb1.LOADING,a.then((function(e){n.loadState=_0x562eb1.LOADED,n.contentBuffer=e}),(function(e){e$2e(e)?n.loadState=_0x562eb1.FAILED:n.loadState=_0x562eb1.UNLOAD}))):n.loadState=_0x562eb1.UNLOAD}_0x562eb1.LOADED===r&&(o?_0x4e1a89(t,n):_0x55e1db(t,n))}}function _0x2440bd(e,t,i){if(!(i.stateList.length<1)){var n=t._context,r=!1;i.beginTime<0&&(r=!0,i.beginTime=window.performance.now());var o=Et$c()-i.beginTime,a=t._updateInterval;if(i.interval=o/a,i.interval=e$2d.clamp(i.interval,0,1),r||o>=a){i.interval=0;var s=a$15.now();o=a$15.addSeconds(s,-t._updateInterval/1e3,new a$15);i.beginTime=window.performance.now();for(var l,u=i.stateList,c=[],h=0;h<u.length;h++){var d=u.values[h];l=d.id;var f=i.instanceList.get(l);if(i.removedList.contains(l))return;e$2e(f)||(i.instanceList.set(l,new _0x14a36f(n,d,i,l)),f=i.instanceList.get(l)),f.update(e,d,o,c)}if(c.length>0){var p=i$1d.fromBoundingSpheres(c,new i$1d);i$1d.clone(p,i.boundingSphere)}i.instanceCount=c.length,_0x1d852e(t,i)}}}function _0x1d852e(e,t){var i=t.instanceCount;if(!(i<1)){var n=_0x293bae*i,r=t.buffer,o=e._context,a=S$14.getSizeInBytes(S$14.FLOAT);if(r.sizeInBytes/(a*_0x293bae)<i){t.buffer&&t.buffer.destroy(),(r=t$X.createVertexBuffer({context:o,sizeInBytes:n*a,usage:A$18.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,t.buffer=r;for(var s=0,l=t.renderEntities.length;s<l;s++){var u=t.renderEntities[s],c=u.command;if(e$2e(c)){c.vertexArray.isDestroyed()||c.vertexArray.destroy();for(var h=0;h<u.attributes.length;h++){var d=u.attributes[h];e$2e(d.instanceDivisor)&&d.instanceDivisor>0&&(d.vertexBuffer=t.buffer)}c.vertexArray=new c$13({context:o,attributes:u.attributes,indexBuffer:u.indexBuffer})}}}var f=new Float32Array(n),p=t.instanceList,_=0;for(s=0,l=p.length;s<l;s++){var m=p.values[s];if(e$2e(m)&&m._ready){m._index=_;var g=i$12.fromCartesian(m._prePosition),x=g.high,y=g.low,v=i$12.fromCartesian(m._nextPosition),$=v.high,b=v.low,T=m._preOrientation,C=m._nextOrientation,S=m._pickColor,w=m._color,E=m._scale,P=m._preHpr,A=m._nextHpr,L=new e$1X;L.red=t$$.compressTextureCoordinates({x:w.red,y:w.green}),L.green=t$$.compressTextureCoordinates({x:w.blue,y:w.alpha}),L.blue=t$$.compressTextureCoordinates({x:S.red,y:S.green}),L.alpha=t$$.compressTextureCoordinates({x:S.blue,y:S.alpha}),_0x26f180(f,_,x,y,$,b,T,C,L,P,A,E),_++}}r.copyFromArrayView(f,0)}}function _0x26f180(e,t,i,n,r,o,a,s,l,u,c,h){var d=0;e[(t*=_0x293bae)+d++]=i.x,e[t+d++]=i.y,e[t+d++]=i.z,e[t+d++]=n.x,e[t+d++]=n.y,e[t+d++]=n.z,e[t+d++]=r.x,e[t+d++]=r.y,e[t+d++]=r.z,e[t+d++]=o.x,e[t+d++]=o.y,e[t+d++]=o.z,e[t+d++]=a.x,e[t+d++]=a.y,e[t+d++]=a.z,e[t+d++]=a.w,e[t+d++]=s.x,e[t+d++]=s.y,e[t+d++]=s.z,e[t+d++]=s.w,e[t+d++]=l.red,e[t+d++]=l.green,e[t+d++]=l.blue,e[t+d++]=l.alpha,e[t+d++]=u.heading,e[t+d++]=u.pitch,e[t+d++]=u.roll,e[t+d++]=c.heading,e[t+d++]=c.pitch,e[t+d++]=c.roll,e[t+d++]=h.x,e[t+d++]=h.y,e[t+d++]=h.z}var _0x594fe=new n$15,_0x11a1e3=new o$1p;function _0x14a36f(e,t,i,n){this.type=bt$6.INSTANCED_OBJECT,this._ownerGroup=i,this._id=n,this._index=-1,this._description=t.description;var r=t.position.getValue(0);e$2e(r)||(r=new o$1p),this._scale=o$1p.clone(t.scale.getValue(0));var o=o$1p.maximumComponent(this._scale);this._offset=t.offset,this._lockOrientation=t.lockOrientation,this._preOrientation=new n$15,this._nextOrientation=new n$15,this._orientation=void 0,this._velocityOrientation=new e$w(t.position);var a=m$19.headingPitchRollToFixedFrame(r,new i$16(t.startDirection,0,0),t$12.WGS84,m$19.eastNorthUpToFixedFrame,new p$1d),s=p$1d.getRotation(a,new p$1e),l=n$15.fromRotationMatrix(s);n$15.clone(l,this._preOrientation),n$15.clone(this._preOrientation,this._nextOrientation);var u=o$1p.multiplyByScalar(this._offset,o,new o$1p);this._prePosition=p$1d.multiplyByPoint(a,u,new o$1p),this._nextPosition=o$1p.clone(this._prePosition);var c=t.heading.getValue(0),h=t.pitch.getValue(0),d=t.roll.getValue(0);this._preHpr=new i$16(c,h,d),this._nextHpr=i$16.clone(this._preHpr),this._dynamicColor=t.color.getValue(0);var f=i.oriBoundingSphere.radius*o;this._boundingSphere=new i$1d(this._prePosition,f);var p={id:n,primitive:this},_=e.createPickId(p);this._pickColor=_.color,this._selColor=new e$1X,this._color=e$1X.multiply(this._dynamicColor,this._selColor,new e$1X),this._isSelected=!1,this._ready=!1}function _0x55e1db(e,t){var i=t.contentBuffer;if(e$2e(i)){var n={buffer:i,supportCompressType:e._supportCompressType},r=_0x29d1c7.S3MTaskProcessor.scheduleTask(n,[i]);e$2e(r)?(t.contentBuffer=void 0,t._loadState=_0x562eb1.PARSING,r.then((function(i){if(i.result){e._gl;for(var n=e._xmlParser.read(i.xmlDoc).firstChild,r=n.namespaceURI,o=s$T.queryFirstNode(n,"Material3Ds",r),a=s$T.queryChildNodes(o,"material",r),s={},l=e._context,u=0,c=a.length;u<c;u++){var h=a[u],d=s$T.queryStringValue(h,"name",r),f=new _0xf77618({});s[d]=f;var p=s$T.queryFirstNode(h,"Ambient",r),_=s$T.queryNumericValue(p,"AmbientR",r),m=s$T.queryNumericValue(p,"AmbientG",r),g=s$T.queryNumericValue(p,"AmbientB",r),x=s$T.queryNumericValue(p,"AmbientA",r);f._ambientColor=new e$1X(_,m,g,x);var y=s$T.queryFirstNode(h,"Diffuse",r);_=s$T.queryNumericValue(y,"DiffuseR",r),m=s$T.queryNumericValue(y,"DiffuseG",r),g=s$T.queryNumericValue(y,"DiffuseB",r),x=s$T.queryNumericValue(y,"DiffuseA",r),f._diffuseColor=new e$1X(_,m,g,x);var v=s$T.queryFirstNode(h,"Specular",r);_=s$T.queryNumericValue(v,"SpecularR",r),m=s$T.queryNumericValue(v,"SpecularG",r),g=s$T.queryNumericValue(v,"SpecularB",r),x=s$T.queryNumericValue(v,"SpecularA",r),f._specularColor=new e$1X(_,m,g,x);var $=s$T.queryNumericValue(h,"Shininess",r);f._shininess=$,s$T.queryFirstNode(h,"TransparentSorting",r),f._bTransparentSorting=s$T.queryBooleanValue(h,"TransparentSorting",r);var b=s$T.queryFirstNode(h,"texture",r),T=s$T.queryStringValue(b,"name",r),C=s$T.queryFirstNode(b,"AddressMode",r),S=s$T.queryStringValue(C,"u",r),w=s$T.queryStringValue(C,"v",r);S="TAM_WRAP"===S?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,w="TAM_WRAP"===w?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;var E=i.texturePackage[T];if(T+=l.id,e$2e(E)){var P=Se$e.CreateTexture(T,l,E.width,E.height,E.nFormat,E.compressType,E.imageBuffer,!1,S,w);f._textures.push(P),0===E.compressType&&(e._supportCompressType=0)}}var A=s$T.queryFirstNode(n,"PageLods",r),L=s$T.queryNodes(A,"Geode",r);for(u=0,c=L.length;u<c;u++){for(var M=L[u],R=s$T.queryStringValue(M,"GeoDeModMatrix",r).split(","),O=0;O<16;O++)R[O]=parseFloat(R[O]);if(R=p$1d.unpack(R,0),t.enableOffset){var D=p$1d.fromTranslation(new o$1p(0,0,-690));R=p$1d.multiplyTransformation(R,D,new p$1d)}for(var I=s$T.queryNodes(M,"GeoName",r),B=[],F=0,N=I.length;F<N;F++){var G=I[F].textContent.trim();B.push(G)}for(var z=[],U=new i$1d,V=0;V<B.length;V++){var k=_0x1dd3a5(H=(W=i.geoPackage[B[V]]).vertexPackage,R);z.push(k)}z.length>0&&(i$1d.fromBoundingSpheres(z,U),t.oriBoundingSphere=U,z.length=0);for(N=0;N<B.length;N++){var W,H=(W=i.geoPackage[B[N]]).vertexPackage,q=W.arrIndexPackage,j={};for(var X in q){var Y=q[X];if(e$2e(Y)){f=s[d=Y.materialCode];j[d]=f}}e.enableLocalOffset||(R=p$1d.IDENTITY),_0x33c96f(e,t,H,q,U,j,R)}t.boundingSphere=i$1d.clone(U)}t.ready=!0,t.loadState=_0x562eb1.READY,_0x5ef5de(t,e.updateInterval/1e3)}else t._loadState=_0x562eb1.UNLOAD}))):t._loadState=_0x562eb1.LOADED}else t._loadState=_0x562eb1.FAILED}function _0x4e1a89(e,t){var i=t.contentBuffer;if(e$2e(i)){if(_0x29d1c7.init||_0x29d1c7.initWebAssembly(),_0x29d1c7.taskProcessorReady){var n=_0x29d1c7.S3MBTaskProcessor.scheduleTask({buffer:i,supportCompressType:e._supportCompressType},[i]);if(!e$2e(n))return void(t._loadState=_0x562eb1.LOADED);t.contentBuffer=void 0,t._loadState=_0x562eb1.PARSING,n.then((function(i){if(i.result){for(var n=e._context,r={},o=0,a=i.matrials.material.length;o<a;o++){var s=i.matrials.material[o].material,l=s.id,u=new _0xf77618({});r[l]=u,u.createCommonParamter(s),u.createPBRParamter(s);for(var c=s.textureunitstates,h=0;h<c.length;h++){var d=c[h].textureunitstate,f=d.id,p=0===d.addressmode.u?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,_=0===d.addressmode.v?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;u._texMatrix=p$1d.unpack(d.texmodmatrix);var m=i.texturePackage[f];if(f+=n.id,e$2e(m)&&m.width>0&&m.height>0&&m.imageBuffer.length>0){var g=Se$e.CreateTexture(f,n,m.width,m.height,m.nFormat,m.compressType,m.imageBuffer,!1,p,_),x=f.indexOf("PBRMaterialParam")>-1,y=u._emissiveTextureIndex===h,v=u._normalTextureIndex===h,$=u._metallicRoughnessTextureIndex===h,b=u._occlusionTextureIndex===h;x?(u._usePBRTextureBatch=!0,u.pbrParamTexture=g):y?u.emissiveTexture=g:v?u.normalTexture=g:$?u.metallicRoughnessTexture=g:b?u.occlusionTexture=g:u._textures.push(g),0===m.compressType&&(e._supportCompressType=0)}}}var T=i.groupNode.pageLods;if(e$2e(T))for(o=0,a=T.length;o<a;o++){for(var C=T[o].geodes[0],S=C.matrix,w=0;w<16;w++)S[w]=parseFloat(S[w]);if(S=p$1d.unpack(S,0),t.enableOffset){var E=p$1d.fromTranslation(new o$1p(0,0,-690));S=p$1d.multiplyTransformation(S,E,new p$1d)}for(var P=C.skeletonNames,A=[],L=0,M=P.length;L<M;L++){var R=P[L].trim();A.push(R)}var O=[],D=new i$1d;for(h=0;h<A.length;h++){var I=_0x1dd3a5(F=(B=i.geoPackage[A[h]]).vertexPackage,S);O.push(I)}O.length>0&&(i$1d.fromBoundingSpheres(O,D),t.oriBoundingSphere=D,O.length=0);for(L=0,M=A.length;L<M;L++){R=A[L];var B,F=(B=i.geoPackage[R]).vertexPackage,N=B.arrIndexPackage,G=N[0];if(e$2e(G)){var z={};u=r[l=G.materialCode];z[l]=u,e.enableLocalOffset||(S=p$1d.IDENTITY),_0x33c96f(e,t,F,N,D,z,S)}}t.boundingSphere=i$1d.clone(D)}t.ready=!0,t.loadState=_0x562eb1.READY,_0x5ef5de(t,e.updateInterval/1e3)}else t._loadState=_0x562eb1.UNLOAD}))}}else t._loadState=_0x562eb1.FAILED}function _0x1dd3a5(e,t){for(var i=[],n=new i$1d,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1d.fromPoints(i,n),i.length=0,i$1d.transform(n,t,n),n}function _0x2894c2(e){return d$1m.fromCache({cull:{enabled:e.cullEnabled,face:e.cullFace},polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND})}function _0x4abe69(e,t,i){for(var n=i.vertexAttributes,r=0,o=n.length;r<o;r++){var a=n[r];!e$2e(a.typedArray)||(a.vertexBuffer=t$X.createVertexBuffer({context:t,typedArray:a.typedArray,usage:A$18.STATIC_DRAW}),a.vertexBuffer.vertexArrayDestroyable=!1,a.typedArray=null,delete a.typedArray)}var s=i.attrLocation,l=Object.keys(s).length,u=e.buffer;if(!e$2e(u)){var c=0===e.instanceCount?1:e.instanceCount,h=4*_0x293bae*c;(u=t$X.createVertexBuffer({context:t,sizeInBytes:h,usage:A$18.DYNAMIC_DRAW})).vertexArrayDestroyable=!1,e.buffer=u}for(var d in _0x5b957a(u,s,n,l),s){n[l=s[d]].name=d}return{attributes:n,attrLocation:s}}function _0x5b957a(e,t,i,n){var r=n,o=0,a=S$14.getSizeInBytes(S$14.FLOAT);t.aPreHxyzLx=r++,i.push({index:t.aPreHxyzLx,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=4*a,t.aPreLyzNextHxy=r++,i.push({index:t.aPreLyzNextHxy,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=4*a,t.aNextHzLxyz=r++,i.push({index:t.aNextHzLxyz,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=4*a,t.aPreOrientation=r++,i.push({index:t.aPreOrientation,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=4*a,t.aNextOrientation=r++,i.push({index:t.aNextOrientation,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=4*a,t.aColorAndPickColor=r++,i.push({index:t.aColorAndPickColor,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=4*a,t.aPreHpr=r++,i.push({index:t.aPreHpr,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=3*a,t.aNextHpr=r++,i.push({index:t.aNextHpr,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=3*a,t.aScale=r++,i.push({index:t.aScale,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:o,strideInBytes:4*_0x293bae,instanceDivisor:1}),o+=3*a}function _0x33c96f(e,t,i,n,r,o,a){var s=e._context,l=_0x4abe69(t,s,i),u=l.attributes,c=l.attrLocation,h=Le$q.S3MTiles+2,d=_0x2894c2(t),f=i.verticesCount,p=n[0];if(!e$2e(p))return;var _=ce$z.UNSIGNED_SHORT;(1===p.indexType||f>=e$2d.SIXTY_FOUR_KILOBYTES)&&s.elementIndexUint&&(_=ce$z.UNSIGNED_INT);var m=t$X.createIndexBuffer({context:s,typedArray:p.indicesTypedArray,usage:A$18.STATIC_DRAW,indexDatatype:_});m.vertexArrayDestroyable=!1;var g=o[p.materialCode]||_0xf77618.Default,x=new i$$({primitiveType:W$18.TRIANGLES,boundingVolume:r,pass:h,owner:e});e._shadowType===_0x325616.ALL||e._shadowType===_0x325616.SELECTION?(x.castShadows=!0,x.receiveShadows=!0):(x.castShadows=!1,x.receiveShadows=!1),x.pickId="vPickColor",x.instanceCount=t.instanceCount,x.vertexArray=new c$13({context:s,attributes:u,indexBuffer:m});var y=new s$V({name:"DynamicLayerVertex",sources:[_0x41f4a0]}),v=new s$V({name:"S3ModelFP",sources:[_0x47b2f7]}),$=e$2e(c.aTexCoord0)&&g._textures.length>0;0===e._supportCompressType&&v.defines.push("FLIP_Y"),e$2e(c.aColor)&&y.defines.push("VertexColor"),e$2e(c.aNormal)&&(y.defines.push(D$V.HAS_NORMAL),v.defines.push(D$V.HAS_NORMAL)),$&&(y.defines.push("TEXTURE"),v.defines.push("TEXTURE"));const b=e._frameState.lightSource;e$2e(b)&&(v.defines.push("MAX_POINT_LIGHT_COUNT "+s$J.MaxPointLightCount),v.defines.push("MAX_SPOT_LIGHT_COUNT "+s$J.MaxSpotLightCount),v.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$J.MaxDirectionLightCount),b.directionalLight.length>0&&v.defines.push(D$V.HAS_DIR_LIGHTS),b._visibleLightList[_0x4970c2.POINT].length>0&&v.defines.push(D$V.HAS_POINT_LIGHTS),b._visibleLightList[_0x4970c2.SPOT].length>0&&v.defines.push(D$V.HAS_SPOT_LIGHTS),b.hemisphereLight.length>0&&v.defines.push(D$V.HAS_HEMISPHERE_LIGHTS));var T=t.url;(g._usePBR||e$2e(e._PBRMaterialParams[T])&&e._PBRMaterialParams[T].roughness>0)&&(v.defines.push(D$V.BRDF),(g.baseColorTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T].baseColorTextureIndex>-1&&e$2e(e._PBRMaterialParams[T].baseTexture))&&v.defines.push(D$V.HAS_BASE_TEXTURE),(g.uNormalTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T].normalTextureIndex>-1&&e$2e(e._PBRMaterialParams[T].normalTexture))&&v.defines.push(D$V.HAS_NORMAL_TEXTURE),(g.emissiveTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T].emissionTextureIndex>-1)&&v.defines.push(D$V.HAS_EMISSIVE_TEXTURE),(g.metallicRoughnessTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T]._metallicRoughnessTextureIndex>-1)&&v.defines.push(D$V.HAS_MetallicRoughness_TEXTURE),(g.occlusionTexture||e._PBRMaterialParams[T]&&e._PBRMaterialParams[T]._occlusionTextureIndex>-1)&&v.defines.push(D$V.HAS_OCCLUSION_TEXTURE),(e$2e(e._frameState.specularEnvironmentMaps)||e$2e(e._frameState.hdrEnvMap))&&(v.defines.push(D$V.IBL),e$2e(e._frameState.specularEnvironmentMaps)&&v.defines.push(D$V.KtxEnvMap)),e$2e(g._alphaMode)&&g._alphaMode===_0x36a597.MASK&&v.defines.push(D$V.MASK)),g.appendPBRMacroToShader(y,v),x.shaderProgram=r$14.fromCache({context:s,vertexShaderSource:y,fragmentShaderSource:v,attributeLocations:c});var C=g._diffuseColor,S=g._diffuseColor,w=g._specularColor,E=g._shininess,P=e$2e(c.aNormal),A=r.radius,L={uTexture:function(){return g._textures[0]},uInterval:function(){return t.interval},uAmbientColor:function(){return C},uDiffuseColor:function(){return S},uSpecularColor:function(){return w},uShininess:function(){return E},uPicking:function(){return e._picking},uHasNormal:function(){return P},uGeoMatrix:function(){return a},uFilterMode:function(){return e.filterMode},uMaxVisibleDistance:function(){return e.maxVisibleDistance},uFilterPixel:function(){return e.filterPixel},uRadius:function(){return A},uOffset:function(){return t.offset},uBaseColorFactor:function(){return e$2e(g._baseColor)?g._baseColor:e._PBRMaterialParams[T].baseColorFactor},uBaseColorTextureIndex:function(){return g._baseColorTextureIndex>-1?g._baseColorTextureIndex:e._PBRMaterialParams[T].baseColorTextureIndex},uMetallicFactor:function(){return e$2e(g._metallicFactor)?g._metallicFactor:e._PBRMaterialParams[T].metallic},uRoughnessFactor:function(){return e$2e(g._roughnessFactor)?g._roughnessFactor:e._PBRMaterialParams[T].roughness},uEmissiveFactor:function(){return e$2e(g._emissiveFactor)?g._emissiveFactor:e._PBRMaterialParams[T].emissionFactor},uEmissionTexture:function(){return e$2e(g.emissiveTexture)&&g._emissiveTextureIndex>-1?g.emissiveTexture:e._PBRMaterialParams[T].emissiveTexture},uEmissiveUVOffsetAndTiling:function(){var e=g._emissiveTextureMotion,t=new e$2c,i=performance.now()/1e3;if(e._offsetPeriod>0){var n=i%e._offsetPeriod;t.x=n*e._offsetSpeedU,t.y=n*e._offsetSpeedV}else t.x=0,t.y=0;if(e._tilingPeriod>0){var r=i%e._tilingPeriod;t.z=1+r*e._tilingSpeedU,t.w=1+r*e._tilingSpeedV}else t.z=1,t.w=1;return t},uBaseTexture:function(){return e$2e(g.baseColorTexture)&&g._baseColorTextureIndex>-1?g.baseColorTexture:e._PBRMaterialParams[T].baseTexture},uNormalTexture:function(){return e$2e(g.normalTexture)&&g._normalTextureIndex>-1?g.normalTexture:e._PBRMaterialParams[T].normalTexture},uMetallicRoughnessTexture:function(){return e$2e(g.metallicRoughnessTexture)&&g._metallicRoughnessTextureIndex>-1?g.metallicRoughnessTexture:e._PBRMaterialParams[T].metallicRoughnessTexture},uOcclusionTexture:function(){return e$2e(g.occlusionTexture)&&g._occlusionTextureIndex>-1?g.occlusionTexture:e._PBRMaterialParams[T].occlusionTexture}};L=p$19(L,g.createPBRUniformMap()),L=p$19(L,e._frameState.lightSource.createUniformMap()),x.uniformMap=L,x.renderState=d;var M={command:x,attributes:u,indexBuffer:m};M._layer=e;var R=new _0x35e02f(M),O=new _0x4f8f70(M,g,e);M.meshUBO=R,M.materialUBO=O,x.addUniformBuffer(s.uniformState._sceneUBO),x.addUniformBuffer(s.uniformState._lightUBO),x.addUniformBuffer(R),x.addUniformBuffer(O),t.renderEntities.push(M)}_0x14a36f.prototype.setSelected=function(){var e=this._index;if(e$2e(e)&&this._ownerGroup.pickEnable&&!(e<0)&&(o$1q.typeOf.number.greaterThanOrEquals("offset",e,0),!e$1X.equals(this._selColor,_0x1f5fae))){this._selColor=e$1X.clone(_0x1f5fae),this._color=e$1X.multiply(this._selColor,this._dynamicColor,this._color);var t=new e$1X;t.red=t$$.compressTextureCoordinates({x:this._color.red,y:this._color.green}),t.green=t$$.compressTextureCoordinates({x:this._color.blue,y:this._color.alpha}),t.blue=t$$.compressTextureCoordinates({x:this._pickColor.red,y:this._pickColor.green}),t.alpha=t$$.compressTextureCoordinates({x:this._pickColor.blue,y:this._pickColor.alpha});var i=this._ownerGroup.renderEntities;if(e$2e(i)&&!(i.length<1)){for(var n=0,r=i.length;n<r;n++){var o=i[n].command,a=o.shaderProgram.vertexAttributes.aColorAndPickColor.index,s=o.vertexArray.getAttribute(a),l=e*s.strideInBytes+s.offsetInBytes,u=S$14.createTypedArray(s.componentDatatype,s.componentsPerAttribute);u[0]=t.red,u[1]=t.green,u[2]=t.blue,u[3]=t.alpha,s.vertexBuffer.copyFromArrayView(u,l)}this._isSelected=!0}}},_0x14a36f.prototype.setUnSelected=function(){var e=this._index;if(e$2e(e)&&this._ownerGroup.pickEnable&&!(e<0)&&this._isSelected){this._isSelected=!1,this._selColor=e$1X.WHITE,this._color=e$1X.clone(this._dynamicColor);var t=new e$1X;t.red=t$$.compressTextureCoordinates({x:this._color.red,y:this._color.green}),t.green=t$$.compressTextureCoordinates({x:this._color.blue,y:this._color.alpha}),t.blue=t$$.compressTextureCoordinates({x:this._pickColor.red,y:this._pickColor.green}),t.alpha=t$$.compressTextureCoordinates({x:this._pickColor.blue,y:this._pickColor.alpha});var i=this._ownerGroup.renderEntities;if(e$2e(i)&&!(i.length<1))for(var n=0,r=i.length;n<r;n++){var o=i[n].command,a=o.shaderProgram.vertexAttributes.aColorAndPickColor.index,s=o.vertexArray.getAttribute(a),l=e*s.strideInBytes+s.offsetInBytes,u=S$14.createTypedArray(s.componentDatatype,s.componentsPerAttribute);u[0]=t.red,u[1]=t.green,u[2]=t.blue,u[3]=t.alpha,s.vertexBuffer.copyFromArrayView(u,l)}}},_0x14a36f.prototype.update=function(e,t,i,n){var r=t.position,o=r$_.getValueOrUndefined(r,i,_0x11a1e3);if(e$2e(o)){var a=o$1p.equalsEpsilon(o,this._nextPosition,e$2d.EPSILON8)||o$1p.distance(o,this._nextPosition)<.5;this._scale=o$1p.clone(t.scale.getValue(i),this._scale);var s=o$1p.maximumComponent(t.scale.getValue(i)),l=o$1p.multiplyByScalar(this._offset,s,new o$1p),u=m$19.headingPitchRollToFixedFrame(o,new i$16,t$12.WGS84,m$19.eastNorthUpToFixedFrame,new p$1d);if(this._prePosition=o$1p.clone(this._nextPosition,this._prePosition),p$1d.multiplyByPoint(u,l,this._nextPosition),i$16.clone(this._nextHpr,this._preHpr),this._nextHpr.heading=t.heading.getValue(i),this._nextHpr.pitch=t.pitch.getValue(i),this._nextHpr.roll=t.roll.getValue(i),this._lockOrientation=t.lockOrientation,n$15.clone(this._nextOrientation,this._preOrientation),!this._lockOrientation)if(e$2e(h=a?void 0:r$_.getValueOrUndefined(this._velocityOrientation,i,_0x594fe)))this._orientation=n$15.clone(h),n$15.clone(this._orientation,this._nextOrientation);else if(e$2e(this._orientation))n$15.clone(this._orientation,this._nextOrientation);else{var c=p$1d.getRotation(u,new p$1e);n$15.fromRotationMatrix(c,this._nextOrientation);u=m$19.headingPitchRollToFixedFrame(o,new i$16(t.startDirection,0,0),t$12.WGS84,m$19.eastNorthUpToFixedFrame,new p$1d),c=p$1d.getRotation(u,new p$1e);var h=n$15.fromRotationMatrix(c);this._preOrientation=h,this._nextOrientation=h}var d=t.color.getValue(i);this._dynamicColor=e$1X.clone(d),this._color=e$1X.multiply(this._dynamicColor,this._selColor,this._color),o$1p.clone(this._nextPosition,this._boundingSphere.center),this._boundingSphere.radius=this._ownerGroup.oriBoundingSphere.radius*s;var f=e.cullingVolume.computeVisibility(this._boundingSphere)!==Ae$w.OUTSIDE;f&&n.push(this._boundingSphere),this._ready=f}else this._ready=!1},_0x256afc.prototype.isDestroyed=function(){return!1},_0x256afc.prototype.destroy=function(){for(var e in this._group){var t=this._group[e];if(t.ready){for(var i=0,n=t.renderEntities.length;i<n;i++){var r=t.renderEntities[i].command;r.vertexArray=r.vertexArray&&!r.vertexArray.isDestroyed()&&r.vertexArray.destroy(),r.shaderProgram=r.shaderProgram&&r.shaderProgram.destroy()}t.renderEntities.length=0,e$2e(t.stateList)&&t.stateList.removeAll()}}return this._group=void 0,i$11(this)};var _0x27ea54=(_0x55b44d=!0,function(e,t){var i=_0x55b44d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x55b44d=!1,i}),_0x2270e0=_0x27ea54(void 0,(function(){return _0x2270e0.toString().search("(((.+)+)+)+$").toString().constructor(_0x2270e0).search("(((.+)+)+)+$")})),_0x55b44d;_0x2270e0();var _0x4e9529={UnLoad:0,Loading:1,Loaded:2,Parsing:3,Ready:4,LoadedFailed:5,ParseFailed:6},_0x172047=Object.freeze(_0x4e9529),_0x292552=(_0x102ffe=!0,function(e,t){var i=_0x102ffe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x102ffe=!1,i}),_0x623f5f=_0x292552(void 0,(function(){return _0x623f5f.toString().search("(((.+)+)+)+$").toString().constructor(_0x623f5f).search("(((.+)+)+)+$")})),_0x102ffe;function _0x3248fd(e){this.url=e,this._isGlTF=!0,this.model=void 0,this.state=_0x172047.UnLoad,this.ready=!1}_0x623f5f(),_0x3248fd.prototype.isDestroyed=function(){return!1},_0x3248fd.prototype.destroy=function(){return e$2e(this.model)&&!this.model.isDestroyed()&&this.model.destroy(),i$11(this)};var _0x15c37b=(_0x39c27e=!0,function(e,t){var i=_0x39c27e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39c27e=!1,i}),_0x18b697=_0x15c37b(void 0,(function(){return _0x18b697.toString().search("(((.+)+)+)+$").toString().constructor(_0x18b697).search("(((.+)+)+)+$")})),_0x39c27e;function _0x176948(){}_0x18b697(),_0x176948.load=function(e,t){if(e$2e(t.model)||(t.model=F$B.fromGltf({url:t.url,incrementallyLoadTextures:!1,headers:e.customRequestHeaders})),t.model.update(e._frameState),t.model.ready){t.state=_0x172047.Ready,t.ready=!0;for(var i=e._skeletonTileMap.get(t.url),n=0,r=i.length;n<r;n++)i[n].dirty=!0}},_0x176948.parse=function(e,t){};var _0x606818=(_0x24c493=!0,function(e,t){var i=_0x24c493?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24c493=!1,i}),_0x175a75=_0x606818(void 0,(function(){return _0x175a75.toString().search("(((.+)+)+)+$").toString().constructor(_0x175a75).search("(((.+)+)+)+$")})),_0x24c493;function _0x55c8b4(e,t,i,n){this.url=t,this.id=n,this.index=-1,this.type=bt$6.INSTANCED_OBJECT,this.position=o$1p.clone(i.position),this.geoPosition=a$18.fromCartesian(this.position),this.offset=u$Z(i.offset,new o$1p(0,0,0)),this.color=u$Z(i.color,new e$1X),this.scale=u$Z(i.scale,new o$1p(1,1,1));var r=u$Z(i.hpr,new i$16);this.hpr=r,this.quaternion=n$15.fromHeadingPitchRoll(r),this.feature=u$Z(i.feature,u$Z.EMPTY_OBJECT),this.isSelected=!1,this.selectedColor=new e$1X,this.preColor=e$1X.clone(this.color),this.tile=void 0,this.instanceInfo=void 0,this.layer=void 0;var o={id:n,primitive:this},a=e.createPickId(o).color,s=new e$1X;s.x=e$1X.floatToByte(a.red),s.y=e$1X.floatToByte(a.green),s.z=e$1X.floatToByte(a.blue),s.w=e$1X.floatToByte(a.alpha),this.pickColor=s}_0x175a75(),_0x55c8b4.prototype.setSelected=function(){if(e$2e(this.layer)&&this.layer.pickEnable){var e=this.index;if(e$2e(e)&&!(e<0)&&!e$1X.equals(this.color,this.selectedColor)){this.color=e$1X.clone(this.selectedColor,new e$1X);var t=e$1X.multiply(this.color,this.preColor,new e$1X),i=this.instanceInfo;if(e$2e(i)&&e$2e(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aColor2];if(e$2e(r)){var o=e*r.strideInBytes+r.offsetInBytes,a=S$14.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=t.red,a[1]=t.green,a[2]=t.blue,a[3]=t.alpha,i.instanceBuffer.copyFromArrayView(a,o),this.isSelected=!0}}}}},_0x55c8b4.prototype.setUnSelected=function(){var e=this.index;if(e$2e(e)&&!(e<0)&&this.isSelected){this.isSelected=!1,this.color=e$1X.clone(this.preColor,this.color);var t=this.instanceInfo;if(e$2e(t)&&e$2e(t.instanceBuffer)){var i=t.attributeLocation,n=t.attributes[i.aColor2];if(e$2e(n)){var r=e*n.strideInBytes+n.offsetInBytes,o=S$14.createTypedArray(n.componentDatatype,n.componentsPerAttribute);o[0]=this.preColor.red,o[1]=this.preColor.green,o[2]=this.preColor.blue,o[3]=this.preColor.alpha,t.instanceBuffer.copyFromArrayView(o,r)}}}},_0x55c8b4.prototype.updateOffsetPosition=function(e){if(e$2e(e)){var t=this.index;this.offset=o$1p.clone(e,this.offset);var i=this.instanceInfo;if(e$2e(i)&&e$2e(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aOffsetPosition];if(e$2e(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$14.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.offset.x,a[1]=this.offset.y,a[2]=this.offset.z,i.instanceBuffer.copyFromArrayView(a,o)}}}},_0x55c8b4.prototype.updatePosition=function(e){if(e$2e(e)){var t=this.index;if(this.position=o$1p.clone(e,this.position),this.geoPosition=a$18.fromCartesian(this.position),e$2e(this.tile)&&e$2e(this.tile.inverseTransform)){this.offset=p$1d.multiplyByPoint(this.tile.inverseTransform,this.position,this.offset);var i=this.instanceInfo;if(e$2e(i)&&e$2e(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aOffsetPosition];if(e$2e(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$14.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.offset.x,a[1]=this.offset.y,a[2]=this.offset.z,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x55c8b4.prototype.updateRotation=function(e){if(e$2e(e)){var t=this.index;if(!i$16.equals(this.hpr,e)){this.hpr=i$16.clone(e,this.hpr),this.quaternion=n$15.fromHeadingPitchRoll(e,this.quaternion);var i=this.instanceInfo;if(e$2e(i)&&e$2e(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aQuaternion];if(e$2e(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$14.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.quaternion.x,a[1]=this.quaternion.y,a[2]=this.quaternion.z,a[3]=this.quaternion.w,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x55c8b4.prototype.updateColor=function(e){if(e$2e(e)){var t=this.index;if(!e$1X.equals(this.color,e)){this.color=e$1X.clone(e,this.color),this.preColor=e$1X.clone(e,this.preColor);var i=this.instanceInfo;if(e$2e(i)&&e$2e(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aColor2];if(e$2e(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$14.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=this.color.red,a[1]=this.color.green,a[2]=this.color.blue,a[3]=this.color.alpha,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x55c8b4.prototype.updateScale=function(e){if(e$2e(e)){var t=this.index;if(!o$1p.equals(this.scale,e)){o$1p.clone(e,this.scale);var i=this.instanceInfo;if(e$2e(i)&&e$2e(i.instanceBuffer)){var n=i.attributeLocation,r=i.attributes[n.aScale];if(e$2e(r)){var o=t*r.strideInBytes+r.offsetInBytes,a=S$14.createTypedArray(r.componentDatatype,r.componentsPerAttribute);a[0]=e.x,a[1]=e.y,a[2]=e.z,i.instanceBuffer.copyFromArrayView(a,o)}}}}},_0x55c8b4.prototype.updateModelMatrix=function(e){var t=p$1d.getScale(e,new o$1p);this.updateScale(t);var i=p$1d.setScale(e,new o$1p(1,1,1),new p$1d),n=p$1d.getRotation(i,new p$1e);n$15.fromRotationMatrix(n,this.quaternion);var r=i$16.fromQuaternion(this.quaternion,new i$16);this.updateRotation(r);var o=p$1d.getTranslation(e,new o$1p);o$1p.add(this.offset,o,this.offset),this.updateOffsetPosition(this.offset)},_0x55c8b4.prototype.write=function(e,t){var i=this.offset,n=this.quaternion,r=this.scale,o=this.color,a=this.pickColor,s=0;e[t+s++]=i.x,e[t+s++]=i.y,e[t+s++]=i.z,e[t+s++]=n.x,e[t+s++]=n.y,e[t+s++]=n.z,e[t+s++]=n.w,e[t+s++]=r.x,e[t+s++]=r.y,e[t+s++]=r.z,e[t+s++]=o.red,e[t+s++]=o.green,e[t+s++]=o.blue,e[t+s++]=o.alpha,e[t+s++]=a.x,e[t+s++]=a.y,e[t+s++]=a.z,e[t+s++]=a.w},_0x55c8b4.prototype.isDestroyed=function(){return!1},_0x55c8b4.prototype.destroy=function(){i$11(this)};var _0x3ad5f7=(_0x1eca07=!0,function(e,t){var i=_0x1eca07?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1eca07=!1,i}),_0x494a6b=_0x3ad5f7(void 0,(function(){return _0x494a6b.toString().search("(((.+)+)+)+$").toString().constructor(_0x494a6b).search("(((.+)+)+)+$")})),_0x1eca07;function _0x36b665(e,t){this.url=e,this.stride=t,this.instances=[],this.instanceBuffer=void 0,this.attributes=void 0,this.attributeLocation=void 0,this.inverseTransform=void 0,this.dirty=!1}function _0x5f3084(e,t){for(var i=e.length,n=new Float32Array(i*t),r=0;r<i;r++){var o=e[r];o.index=r;var a=r*t;o.write(n,a)}return n}function _0x3ae8a1(e,t,i){var n=_0x5f3084(t,i),r=t$X.createVertexBuffer({context:e,typedArray:n,usage:A$18.STATIC_DRAW});return r.vertexArrayDestroyable=!1,r}function _0x4a8871(e,t){var i=S$14.getSizeInBytes(S$14.FLOAT),n=0,r=[],o=0,a={};return a.aOffsetPosition=o++,r.push({name:"aOffsetPosition",index:a.aOffsetPosition,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:n,strideInBytes:i*t,instanceDivisor:1}),n+=3,a.aQuaternion=o++,r.push({name:"aQuaternion",index:a.aQuaternion,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,a.aScale=o++,r.push({name:"aScale",index:a.aScale,vertexBuffer:e,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=3,a.aColor2=o++,r.push({name:"aColor2",index:a.aColor2,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,a.aPickColor=o++,r.push({name:"aPickColor",index:a.aPickColor,vertexBuffer:e,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,normalize:!1,offsetInBytes:i*n,strideInBytes:i*t,instanceDivisor:1}),n+=4,{attributes:r,attributeLocation:a}}_0x494a6b(),_0x36b665.prototype.getHeightRange=function(){for(var e=Number.MAX_VALUE,t=Number.MIN_VALUE,i=this.instances.length,n=0;n<i;n++){var r=this.instances[n];e=Math.min(e,r.geoPosition.height),t=Math.max(t,r.geoPosition.height)}return{minHeight:e,maxHeight:t}},_0x36b665.prototype.update=function(e){if(e$2e(this.instanceBuffer)&&(this.instanceBuffer=this.instanceBuffer.destroy()),this.instances.length>0)if(this.instanceBuffer=_0x3ae8a1(e,this.instances,this.stride),e$2e(this.attributes))for(var t=0,i=this.attributes.length;t<i;t++){this.attributes[t].vertexBuffer=this.instanceBuffer}else{var n=_0x4a8871(this.instanceBuffer,this.stride);this.attributes=n.attributes,this.attributeLocation=n.attributeLocation}this.dirty=!1},_0x36b665.prototype.isDestroyed=function(){return!1},_0x36b665.prototype.destroy=function(){this.instanceBuffer=this.instanceBuffer&&!this.instanceBuffer.isDestroyed()&&this.instanceBuffer.destroy(),this.instances=null,this.attributes=null,this.attributeLocation=null,this.inverseTransform=null,i$11(this)};var _0x55ff82=(_0x859d68=!0,function(e,t){var i=_0x859d68?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x859d68=!1,i}),_0x172011=_0x55ff82(void 0,(function(){return _0x172011.toString().search("(((.+)+)+)+$").toString().constructor(_0x172011).search("(((.+)+)+)+$")})),_0x859d68;_0x172011();var _0x260003="\nattribute vec4 aPosition;\n#ifdef HAS_NORMAL\n attribute vec3 aNormal;\n#endif\nattribute vec4 aTexCoord0;\n#ifdef VertexColor\n #ifdef WEBGPU\n attribute uvec4 aColor;\n #else\n attribute vec4 aColor;\n #endif\n#endif\nattribute vec3 aOffsetPosition;\nattribute vec4 aQuaternion;\nattribute vec3 aScale;\nattribute vec4 aColor2;\nattribute vec4 aPickColor;\n#ifdef LocalTransform\nattribute vec4 aLocalTranslation;\nattribute vec4 aLocalQuaternion;\n#endif\nuniform mat4 uGeoMat;\n\n#ifdef COMPRESS_VERTEX\n uniform float gltf_u_dec_position_normConstant;\n uniform vec3 gltf_u_dec_position_min;\n#endif\n#ifdef COMPRESS_NORMAL\n uniform float gltf_u_dec_normal_rangeConstant;\n#endif\n#ifdef COMPRESS_TEXCOORD\n uniform float gltf_u_dec_texcoord_0_normConstant;\n uniform vec2 gltf_u_dec_texcoord_0_min;\n#endif\n\nvarying vec4 vPositionMC;\nvarying vec3 vPositionEC;\nvarying vec3 vNormalEC;\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\nvarying vec4 vPickColor;\nvarying mat4 vModelMatrix;\nmat4 transfromFromQuaternion(vec4 q, vec4 translation)\n{\n float x2 = q.x * q.x;\n float xy = q.x * q.y;\n float xz = q.x * q.z;\n float xw = q.x * q.w;\n float y2 = q.y * q.y;\n float yz = q.y * q.z;\n float yw = q.y * q.w;\n float z2 = q.z * q.z;\n float zw = q.z * q.w;\n float w2 = q.w * q.w;\n float m00 = x2 - y2 - z2 + w2;\n float m01 = 2.0 * (xy - zw);\n float m02 = 2.0 * (xz + yw);\n float m10 = 2.0 * (xy + zw);\n float m11 = -x2 + y2 - z2 + w2;\n float m12 = 2.0 * (yz - xw);\n float m20 = 2.0 * (xz - yw);\n float m21 = 2.0 * (yz + xw);\n float m22 = -x2 - y2 + z2 + w2;\n return mat4(m00, m10, m20, 0.0, m01, m11, m21, 0.0, m02, m12, m22, 0.0, translation.x, translation.y, translation.z, 1.0);\n}\n\n#ifdef COMPRESS_VERTEX\n vec3 gltf_decoded_POSITION(vec4 position) {\n return gltf_u_dec_position_min + position.xyz * gltf_u_dec_position_normConstant;\n }\n#endif\n#ifdef COMPRESS_TEXCOORD\n vec2 gltf_decoded_TEXCOORD_0(vec2 texcoord){\n return gltf_u_dec_texcoord_0_min + texcoord * gltf_u_dec_texcoord_0_normConstant;\n }\n#endif\n\nvoid main()\n{\n vec4 vertexPos = vec4(aPosition.xyz, 1.0);\n #ifdef COMPRESS_VERTEX\n vec3 compressPosition = gltf_decoded_POSITION(aPosition);\n vertexPos = vec4(compressPosition.xyz, 1.0);\n #endif\n \n vec4 positionMC = uGeoMat * vertexPos;\n vTexCoord = aTexCoord0.xy;\n #ifdef COMPRESS_TEXCOORD\n vTexCoord = gltf_decoded_TEXCOORD_0(aTexCoord0.xy);\n #endif\n mat3 rotationMat = mat3(transfromFromQuaternion(aQuaternion, vec4(0.0)));\n mat4 worldMatrix;\n worldMatrix[0] = vec4(rotationMat[0], 0.0);\n worldMatrix[1] = vec4(rotationMat[1], 0.0);\n worldMatrix[2] = vec4(rotationMat[2], 0.0);\n worldMatrix[3] = vec4(aOffsetPosition, 1.0);\n mat4 scaleMatrix;\n vec3 scale = aScale.xyz;\n scaleMatrix[0] = vec4(scale.x,0,0,0.0);\n scaleMatrix[1] = vec4(0,scale.y,0,0.0);\n scaleMatrix[2] = vec4(0,0,scale.z,0.0);\n scaleMatrix[3] = vec4(0,0,0,1.0);\n mat4 modelMatrix = worldMatrix;\n#ifdef LocalTransform\n mat4 localTransformMat = transfromFromQuaternion(aLocalQuaternion, aLocalTranslation);\n modelMatrix *= localTransformMat;\n#endif\n modelMatrix *= scaleMatrix;\n mat3 rotationMatrix = mat3(modelMatrix);\n vModelMatrix = modelMatrix * uGeoMat;\n positionMC = modelMatrix * vec4(positionMC.xyz, 1.0);\n positionMC.w = 1.0;\n gl_Position = czm_modelViewProjection * positionMC;\n vPositionMC.xyz = positionMC.xyz;\n vPositionMC.w = 0.0;\n vec4 vertexColor = vec4(1.0);\n#ifdef VertexColor\n vertexColor = aColor;\n #ifdef WEBGPU\n vertexColor = aColor / 255.0;\n #endif\n#endif\n vColor = vertexColor * aColor2;\n vPickColor = aPickColor / 255.0;\n#ifdef HAS_NORMAL\n vec3 vertexNormal = aNormal;\n #ifdef COMPRESS_NORMAL\n vertexNormal = czm_octDecode(aNormal.xy, gltf_u_dec_normal_rangeConstant).zxy;\n #endif\n if(length(vertexNormal) > 0.8)\n {\n vec3 normal = rotationMatrix * vertexNormal;\n mat4 realModelViewMatrix4 = czm_modelView * vModelMatrix;\n realModelViewMatrix4 = czm_inverseMatrix(realModelViewMatrix4);\n mat3 realModelViewMatrix3 = mat3(realModelViewMatrix4);\n realModelViewMatrix3 = czm_transpose(realModelViewMatrix3);\n vNormalEC = realModelViewMatrix3 * vertexNormal;\n vPositionMC.w = 1.0;\n vPositionEC = (czm_modelView * vPositionMC).xyz;\n }\n#endif\n}\n",_0x5228e8=(_0x730160=!0,function(e,t){var i=_0x730160?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x730160=!1,i}),_0x13edd5=_0x5228e8(void 0,(function(){return _0x13edd5.toString().search("(((.+)+)+)+$").toString().constructor(_0x13edd5).search("(((.+)+)+)+$")})),_0x730160;function _0x1c4b07(e){this.ready=!1,this.state=_0x172047.UnLoad,this.url=e,this.subSkeletons=[]}function _0x48700a(e,t){this.attributes=void 0,this.attributeLocation=void 0,this.indexBuffer=void 0,this.sp=void 0,this.colorCommand=void 0,this.boundingVolume=void 0,this._materialUBO=new _0x4f8f70(this,t,e)}function _0x2f8b04(e,t,i){var n=ce$z.UNSIGNED_SHORT;(1===t.indexType||i>=e$2d.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(n=ce$z.UNSIGNED_INT);var r=t$X.createIndexBuffer({context:e,typedArray:t.indicesTypedArray,usage:A$18.STATIC_DRAW,indexDatatype:n});return r.vertexArrayDestroyable=!1,r}function _0x16b1c1(e,t){for(var i=t.vertexAttributes,n=0,r=i.length;n<r;n++){var o=i[n];!e$2e(o.typedArray)||(o.vertexBuffer=t$X.createVertexBuffer({context:e,typedArray:o.typedArray,usage:A$18.STATIC_DRAW}),o.vertexBuffer.vertexArrayDestroyable=!1,o.typedArray=null,delete o.typedArray)}return i}function _0x4df9cf(e,t,i){var n=t.hasTexture,r=t.hasNormal,o=t.hasVertexColor,a=t.flipY,s=t.attributeLocation,l=new s$V({name:"S3MInstanceCollectionVertex",sources:[_0x260003]}),u=new s$V({name:"S3ModelFP",sources:[_0x47b2f7]});a&&u.defines.push("FLIP_Y"),n&&u.defines.push("TEXTURE"),r&&(l.defines.push(D$V.HAS_NORMAL),u.defines.push(D$V.HAS_NORMAL)),o&&l.defines.push("VertexColor");const c=e._frameState.lightSource;e$2e(c)&&(u.defines.push("MAX_POINT_LIGHT_COUNT "+s$J.MaxPointLightCount),u.defines.push("MAX_SPOT_LIGHT_COUNT "+s$J.MaxSpotLightCount),u.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$J.MaxDirectionLightCount),c.directionalLight.length>0&&u.defines.push(D$V.HAS_DIR_LIGHTS),c._visibleLightList[_0x4970c2.POINT].length>0&&u.defines.push(D$V.HAS_POINT_LIGHTS),c._visibleLightList[_0x4970c2.SPOT].length>0&&u.defines.push(D$V.HAS_SPOT_LIGHTS),c.hemisphereLight.length>0&&u.defines.push(D$V.HAS_HEMISPHERE_LIGHTS));return i._usePBR&&(u.defines.push(D$V.BRDF),i.baseColorTexture&&u.defines.push(D$V.HAS_BASE_TEXTURE),i.uNormalTexture&&u.defines.push(D$V.HAS_NORMAL_TEXTURE),i.emissiveTexture&&u.defines.push(D$V.HAS_EMISSIVE_TEXTURE),i.metallicRoughnessTexture&&u.defines.push(D$V.HAS_MetallicRoughness_TEXTURE),i.occlusionTexture&&u.defines.push(D$V.HAS_OCCLUSION_TEXTURE),(e$2e(e._frameState.specularEnvironmentMaps)||e$2e(e._frameState.hdrEnvMap))&&(u.defines.push(D$V.IBL),e$2e(e._frameState.specularEnvironmentMaps)&&u.defines.push(D$V.KtxEnvMap)),e$2e(i._alphaMode)&&i._alphaMode===_0x36a597.MASK&&u.defines.push(D$V.MASK)),r$14.fromCache({context:e._context,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:s})}function _0x422259(e,t,i,n){var r=new i$$({primitiveType:W$18.TRIANGLES,boundingVolume:n,modelMatrix:t,pass:i._bTransparentSorting?Le$q.TRANSLUCENT:Le$q.OPAQUE,cull:!0});e._shadowType===_0x325616.ALL||e._shadowType===_0x325616.SELECTION?(r.castShadows=!0,r.receiveShadows=!0):(r.castShadows=!1,r.receiveShadows=!1),r.pickId="vPickColor";var o=i._textures[0],a={uTexture:function(){return o},uGeoMat:function(){return t}};return i._usePBR&&(a.uBaseTexture=function(){return e$2e(i._baseColorTextureIndex)&&i._baseColorTextureIndex>-1?i.baseColorTexture:e._PBRMaterialParams.pbrMetallicRoughness.baseColorTexture},a.uNormalTexture=function(){return e$2e(i._normalTextureIndex)&&i._normalTextureIndex>-1?i.normalTexture?i.normalTexture:i._textures[i._normalTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.normalTexture},a.uEmissionTexture=function(){if(e$2e(i.emissiveTexture))return i.emissiveTexture;var t=i._emissiveTextureIndex;return t>-1&&e$2e(i._textures[t])?i._textures[t]:e._PBRMaterialParams.pbrMetallicRoughness.emissiveTexture},a.uMetallicRoughnessTexture=function(){return e$2e(i._metallicRoughnessTextureIndex)&&i._metallicRoughnessTextureIndex>-1?e$2e(i.metallicRoughnessTexture)?i.metallicRoughnessTexture:i._textures[i._metallicRoughnessTextureIndex]:e._PBRMaterialParams.pbrMetallicRoughness.metallicRoughnessTexture},a.uOcclusionTexture=function(){return e$2e(i._occlusionTextureIndex)&&i._occlusionTextureIndex>-1?i.occlusionTexture?i.occlusionTexture:e$2e(i._textures[i._occlusionTextureIndex])?i._textures[i._occlusionTextureIndex]:e._context.defaultTexture:e._PBRMaterialParams.pbrMetallicRoughness.occlusionTexture},i._usePBRTextureBatch&&(a.uPBRTexture=function(){return i.pbrParamTexture})),r.uniformMap=a,r.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND}),r}_0x13edd5(),_0x48700a.prototype.isDestroyed=function(){return!1},_0x48700a.prototype.destroy=function(){this.sp=this.sp&&!this.sp.isDestroyed()&&this.sp.destroy(),this.indexBuffer=this.indexBuffer&&!this.indexBuffer.isDestroyed()&&this.indexBuffer.destroy();for(var e=0,t=this.attributes.length;e<t;e++)this.attributes[e].vertexBuffer.destroy();return this.attributes.length=0,this.colorCommand=void 0,i$11(this)},_0x1c4b07.prototype.updateShaderProgram=function(e,t){e.context;for(let e=0,i=this.subSkeletons.length;e<i;e++){const i=this.subSkeletons[e];!e$2e(i.colorCommand)||!e$2e(i.sp)||!i.material._usePBR||(i.sp=i.sp.destroy(),i.sp=_0x4df9cf(t,{hasTexture:e$2e(i.attributeLocation.aTexCoord0)&&i.material._textures.length>0,hasNormal:e$2e(i.attributeLocation.aNormal),hasVertexColor:e$2e(i.attributeLocation.aColor),flipY:0===t._supportCompressType,attributeLocation:i.attributeLocation},i.material),i.colorCommand.shaderProgram=i.sp)}},_0x1c4b07.prototype.createSubSkeleton=function(e,t,i,n,r,o){var a=e._context,s=new _0x48700a(e,i,n);s._materialUBO.update(a),s.attributes=_0x16b1c1(a,n),s.indexBuffer=_0x2f8b04(a,r,n.verticesCount),s.attributeLocation=n.attrLocation,s.material=i,s.sp=_0x4df9cf(e,{hasTexture:e$2e(s.attributeLocation.aTexCoord0)&&i._textures.length>0,hasNormal:e$2e(s.attributeLocation.aNormal),hasVertexColor:e$2e(s.attributeLocation.aColor),flipY:0===e._supportCompressType,attributeLocation:s.attributeLocation},i),s.colorCommand=_0x422259(e,t,i,o);const l=a.uniformState;s.colorCommand.addUniformBuffer(l._sceneUBO),s.colorCommand.addUniformBuffer(l._lightUBO),s.colorCommand.addUniformBuffer(s._materialUBO),s.boundingVolume=i$1d.clone(o),this.subSkeletons.push(s)},_0x1c4b07.prototype.isDestroyed=function(){return!1},_0x1c4b07.prototype.destroy=function(){for(var e=0,t=this.subSkeletons.length;e<t;e++)this.subSkeletons[e].destroy();i$11(this)};var _0x23cf0c=(_0x16de5a=!0,function(e,t){var i=_0x16de5a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16de5a=!1,i}),_0x14911f=_0x23cf0c(void 0,(function(){return _0x14911f.toString().search("(((.+)+)+)+$").toString().constructor(_0x14911f).search("(((.+)+)+)+$")})),_0x16de5a;function _0x5bb99e(e,t,i){this.tileX=e,this.tileY=t,this.level=i,this.rectangle=void 0,this.boundingVolume=void 0,this.transform=void 0,this.inverseTransform=void 0,this.tileBoundingRegion=void 0,this.distanceToCamera=0,this.instanceGroup=new e$1Q,this.skeletonGroup=new e$1Q,this.commandGroup=new e$1Q,this.dirty=!1}function _0x351d2f(e,t){var i={},n=0;for(var r in e)e.hasOwnProperty(r)&&(i[r]=e[r],++n);for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]+n);return i}function _0x1872b5(e,t){for(var i=e.length,n=e.slice(0),r=0,o=t.length;r<o;r++)t[r].index=i+r,n.push(t[r]);return n}function _0x23e112(e,t,i,n){var r=n.instances[0],o=o$1p.maximumComponent(r.scale);e$2e(l=e.commandGroup.get(n.url))||(l=new Array(t.subSkeletons.length),e.commandGroup.set(n.url,l));for(var a=0,s=t.subSkeletons.length;a<s;a++){var l,u=t.subSkeletons[a],c=(l=e.commandGroup.get(n.url))[a];e$2e(c)||((c=i$$.shallowClone(u.colorCommand)).modelMatrix=p$1d.clone(u.colorCommand.modelMatrix),c._relativeModelMatrix=p$1d.clone(u.colorCommand._relativeModelMatrix),l[a]=c),e$2e(c.vertexArray)&&!c.vertexArray.isDestroyed()&&c.vertexArray.destroy();var h=_0x1872b5(u.attributes,n.attributes),d=_0x351d2f(u.attributeLocation,n.attributeLocation);for(var f in d){h[d[f]].name=f}c.vertexArray=new c$13({context:i,attributes:h,indexBuffer:u.indexBuffer}),c.shaderProgram=r$14.fromCache({context:i,shaderProgram:u.sp,vertexShaderSource:u.sp.vertexShaderSource,fragmentShaderSource:u.sp.fragmentShaderSource,attributeLocations:d}),p$1d.clone(e.transform,c.modelMatrix),c.instanceCount=n.instances.length,c.radius=u.boundingVolume.radius*o,c.boundingVolume=e.boundingVolume}}function _0x28d7a2(e,t,i,n){var r=e.layer,o=t.model._nodeCommands,a=o.length,s=t.model._dequantizeInShader,l=n.instances[0],u=o$1p.maximumComponent(l.scale),c=e.commandGroup.get(n.url);e$2e(c)||(c=new Array(a),e.commandGroup.set(n.url,c));for(var h=0;h<a;++h){var d=o[h],f=i$$.shallowClone(d.command);c[h]=f,f._isGltfCommand=!0,f.castShadows=!1,f.receiveShadows=!1,f.pickId="vPickColor",f.instanceCount=n.instances.length,f.pass=Le$q.OPAQUE,f.cull=!1;var p=_0x309a1c(f.shaderProgram.vertexAttributes);i.webgpu&&_0x456f38(f.vertexArray),p=_0x351d2f(p,n.attributeLocation);var _=f.vertexArray._inner,m=_._attributes,g=_.indexBuffer;m=_0x1872b5(m,n.attributes),f.vertexArray=new c$13({context:i,attributes:m,indexBuffer:g});var x=new s$V({name:"InstanceTilesLayerVS",sources:[_0x260003]}),y=new s$V({name:"S3ModelFP",sources:[_0x47b2f7]});y.defines.push("BRDF"),e$2e(r._frameState.specularEnvironmentMaps)&&y.defines.push(D$V.IBL);const t=r._frameState.lightSource;if(e$2e(t))y.defines.push("MAX_POINT_LIGHT_COUNT "+s$J.MaxPointLightCount),y.defines.push("MAX_SPOT_LIGHT_COUNT "+s$J.MaxSpotLightCount),y.defines.push("MAX_DIRECTION_LIGHT_COUNT "+s$J.MaxDirectionLightCount),t.directionalLight.length>0&&y.defines.push(D$V.HAS_DIR_LIGHTS),t._visibleLightList[_0x4970c2.POINT].length>0&&y.defines.push(D$V.HAS_POINT_LIGHTS),t._visibleLightList[_0x4970c2.SPOT].length>0&&y.defines.push(D$V.HAS_SPOT_LIGHTS),t.hemisphereLight.length>0&&y.defines.push(D$V.HAS_HEMISPHERE_LIGHTS);e$2e(p.aColor)&&x.defines.push("VertexColor"),e$2e(p.aNormal)&&(x.defines.push(D$V.HAS_NORMAL),y.defines.push(D$V.HAS_NORMAL)),e$2e(p.aTexCoord0)&&(e$2e(f.uniformMap.u_baseColorTexture)||e$2e(f.uniformMap.u_diffuse))&&(x.defines.push("TEXTURE"),y.defines.push("TEXTURE")),s&&(x.defines.push(D$V.COMPRESS_VERTEX),e$2e(p.aTexCoord0)&&x.defines.push(D$V.COMPRESS_TEXCOORD),e$2e(p.aNormal)&&x.defines.push(D$V.COMPRESS_NORMAL)),e$2e(f.uniformMap.u_metallicRoughnessTexture)&&y.defines.push("HAS_MetallicRoughness_TEXTURE"),e$2e(f.uniformMap.u_normalTexture)&&y.defines.push("HAS_NORMAL_TEXTURE"),e$2e(f.uniformMap.u_emissiveTexture)&&y.defines.push("HAS_EMISSIVE_TEXTURE"),e$2e(f.uniformMap.u_occlusionTexture)&&y.defines.push("HAS_OCCLUSION_TEXTURE"),f.shaderProgram=r$14.fromCache({context:i,vertexShaderSource:x,fragmentShaderSource:y,attributeLocations:p});var v=f.uniformMap;const a=new _0xf77618;a._usePBR=!0,a._baseColor=new e$2c(1,1,1,1),a._emissiveFactor=new o$1p,a._roughnessFactor=1,a._metallicFactor=0,e$2e(v.u_baseColorFactor)&&(a._baseColor=v.u_baseColorFactor()),e$2e(v.u_emissiveFactor)&&(a._emissiveFactor=v.u_emissiveFactor()),e$2e(v.u_roughnessFactor)&&(a._roughnessFactor=v.u_roughnessFactor()),e$2e(v.u_metallicFactor)&&(a._metallicFactor=v.u_metallicFactor());const l=new _0x4f8f70({},a,r),b=i.uniformState;l.update(i),f.addUniformBuffer(b._sceneUBO),f.addUniformBuffer(b._lightUBO),f.addUniformBuffer(l);var $={uGeoMat:function(e){return function(){return c[e].localMatrix}}(h)};e$2e(v.u_baseColorTexture)?$.uTexture=v.u_baseColorTexture:e$2e(v.u_diffuse)&&($.uTexture=v.u_diffuse),e$2e(v.u_metallicRoughnessTexture)&&($.uMetallicRoughnessTexture=v.u_metallicRoughnessTexture),e$2e(v.u_normalTexture)&&($.uNormalTexture=v.u_normalTexture),e$2e(v.u_emissiveTexture)&&($.uEmissionTexture=v.u_emissiveTexture),e$2e(v.u_occlusionTexture)&&($.uOcclusionTexture=v.u_occlusionTexture),$=p$19($,v),f.uniformMap=$,f.localMatrix=p$1d.IDENTITY.clone(),f._transformMatrix=p$1d.IDENTITY.clone(),f.modelMatrix=p$1d.clone(p$1d.IDENTITY,new p$1d),f.radius=f.boundingVolume.radius*u,f.boundingVolume=y$Y.clone(e.boundingVolume,new y$Y)}}function _0x309a1c(e){var t={};return e$2e(e.a_position)&&(t.aPosition=e.a_position.index),e$2e(e.a_normal)&&(t.aNormal=e.a_normal.index),e$2e(e.a_vertexColor)&&(t.aColor=e.a_vertexColor.index),e$2e(e.a_texcoord_0)&&(t.aTexCoord0=e.a_texcoord_0.index),e$2e(e.a_texcoord0)&&(t.aTexCoord0=e.a_texcoord0.index),t}function _0x456f38(e){var t=e._inner._babylonVertexBuffers;e$2e(t.a_position)&&(t.aPosition=t.a_position),e$2e(t.a_normal)&&(t.aNormal=t.a_normal),e$2e(t.a_vertexColor)&&(t.aColor=t.a_vertexColor),e$2e(t.a_texcoord_0)&&(t.aTexCoord0=t.a_texcoord_0),e$2e(t.a_texcoord1)&&(t.aTexCoord1=t.a_texcoord1);for(var i=0;i<e._inner._attributes.length;i++){var n=e._inner._attributes[i].name;"a_position"==n&&(e._inner._attributes[i].name="aPosition"),"a_normal"==n&&(e._inner._attributes[i].name="aNormal"),"a_vertexColor"==n&&(e._inner._attributes[i].name="aColor"),"a_texcoord_0"==n&&(e._inner._attributes[i].name="aTexCoord0"),"a_texcoord1"==n&&(e._inner._attributes[i].name="aTexCoord1")}}_0x14911f(),_0x5bb99e.prototype.updateDrawCommand=function(e,t){var i=this.skeletonGroup.get(t.url);e$2e(i)&&i.ready&&(!e$2e(t.instances[0])||(i._isGlTF?(i.transformed=!0,_0x28d7a2(this,i,e,t),i.model.activeAnimations.addAll({loop:_0x1ea9f2.REPEAT})):_0x23e112(this,i,e,t)))},new e$2c(1,1,1,1),_0x5bb99e.prototype.updateBoundingVolume=function(e,t){this.boundingVolume=y$Y.fromRectangle(this.rectangle,e,t)},_0x5bb99e.prototype.remove=function(e){var t=this.instanceGroup.get(e);e$2e(t)&&(t.destroy(),this.instanceGroup.remove(e)),this.skeletonGroup.remove(e);var i=this.commandGroup.get(e);if(e$2e(i)){for(var n=0,r=i.length;n<r;n++){var o=i[n];o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy()}this.commandGroup.remove(e)}},_0x5bb99e.prototype.updateShaderProgram=function(){for(var e in this.instanceGroup._hash)if(this.instanceGroup._hash.hasOwnProperty(e)){var t=this.instanceGroup.get(e),i=this.skeletonGroup.get(t.url),n=this.commandGroup.get(t.url);if(!e$2e(n))continue;for(var r=0,o=i.subSkeletons.length;r<o;r++){var a=i.subSkeletons[r];if(e$2e(a.material)&&a.material._usePBR)n[r].shaderProgram=a.sp}}},_0x5bb99e.prototype.update=function(e){this.dirty=!1;var t=Number.MAX_VALUE,i=Number.MIN_VALUE;for(var n in this.instanceGroup._hash)if(this.instanceGroup._hash.hasOwnProperty(n)){var r=this.instanceGroup.get(n);r.dirty&&r.update(e);var o=r.getHeightRange();t=Math.min(t,o.minHeight),i=Math.max(i,o.maxHeight),this.updateDrawCommand(e,r)}this.updateBoundingVolume(t,i)},_0x5bb99e.prototype.isDestroyed=function(){return!1},_0x5bb99e.prototype.destroy=function(){var e,t,i,n;for(e=0,t=this.instanceGroup.length;e<t;e++){this.instanceGroup.values[e].destroy()}for(this.instanceGroup.removeAll(),this.skeletonGroup.removeAll(),e=0,t=this.commandGroup.length;e<t;e++){var r=this.commandGroup.values[e];for(i=0,n=r.length;i<n;i++){var o=r[i];o.vertexArray=o.vertexArray&&!o.vertexArray.isDestroyed()&&o.vertexArray.destroy(),o.shaderProgram=o.shaderProgram&&!o.shaderProgram.isDestroyed()&&o.shaderProgram.destroy()}}this.commandGroup.removeAll(),i$11(this)};var _0x4cbbe9=(_0x300c47=!0,function(e,t){var i=_0x300c47?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x300c47=!1,i}),_0xd8502e=_0x4cbbe9(void 0,(function(){return _0xd8502e.toString().search("(((.+)+)+)+$").toString().constructor(_0xd8502e).search("(((.+)+)+)+$")})),_0x300c47;function _0x590c0e(){}function _0x3095a0(e,t){for(var i=[],n=new i$1d,r=new o$1p,o=e.vertexAttributes[0],a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1d.fromPoints(i,n),i.length=0,i$1d.transform(n,t,n),n}_0xd8502e(),_0x590c0e.load=function(e,t){var i=t$10.fetchArrayBuffer({url:t.url});e$2e(i)||(t.state=_0x172047.UnLoad),t.state=_0x172047.Loading,i.then((function(e){t.state=_0x172047.Loaded,t.skeletonBuffer=e}),(function(e){t.state=_0x172047.Failed}))},_0x590c0e.parse=function(e,t){if(_0x29d1c7.init||_0x29d1c7.initWebAssembly(),_0x29d1c7.taskProcessorReady){var i=_0x29d1c7.S3MBTaskProcessor.scheduleTask({buffer:t.skeletonBuffer,supportCompressType:e._supportCompressType},[t.skeletonBuffer]);if(!e$2e(i))return void(t.state=_0x172047.Loaded);t.skeletonBuffer=void 0,t.state=_0x172047.Parsing,i.then((function(i){if(i.result){for(var n=e._context,r={},o=0,a=i.matrials.material.length;o<a;o++){var s=i.matrials.material[o].material,l=s.id,u=new _0xf77618({});r[l]=u,u.createCommonParamter(s),u.createPBRParamter(s);for(var c=s.textureunitstates,h=0;h<c.length;h++){var d=c[h].textureunitstate,f=d.id,p=0===d.addressmode.u?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,_=0===d.addressmode.v?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;u._texMatrix=p$1d.unpack(d.texmodmatrix);var m=i.texturePackage[f];if(e$2e(m)){var g=Se$e.CreateTexture(f,n,m.width,m.height,m.nFormat,m.compressType,m.imageBuffer,!1,p,_);u._textures.push(g),0===m.compressType&&(e._supportCompressType=0)}}}var x=i.groupNode.pageLods;if(e$2e(x))for(o=0,a=x.length;o<a;o++){for(var y=x[o].geodes[0],v=y.matrix,$=0;$<16;$++)v[$]=parseFloat(v[$]);v=p$1d.unpack(v,0);for(var b=y.skeletonNames,T=[],C=0,S=b.length;C<S;C++){var w=b[C].trim();T.push(w);var E=i.geoPackage[w],P=E.vertexPackage,A=_0x3095a0(P,v),L=E.arrIndexPackage[0];if(e$2e(L)){u=r[l=L.materialCode];t.createSubSkeleton(e,v,u,P,L,A)}}}t.ready=!0,t.state=_0x172047.Ready;var M=e._skeletonTileMap.get(t.url);for(o=0,a=M.length;o<a;o++)M[o].dirty=!0;e._skeletonTileMap.remove(t.url)}else t.state=_0x172047.Failed})).otherwise((function(e){console.log(e)}))}};var _0x4564d6=(_0x593bf1=!0,function(e,t){var i=_0x593bf1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x593bf1=!1,i}),_0x2cf424=_0x4564d6(void 0,(function(){return _0x2cf424.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cf424).search("(((.+)+)+)+$")})),_0x593bf1;function _0x432861(){}_0x2cf424();var _0x45c10f=new s$T;function _0x20f2f9(e,t){for(var i=[],n=new i$1d,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1d.fromPoints(i,n),i.length=0,i$1d.transform(n,t,n),n}_0x432861.load=function(e,t){var i=t$10.fetchArrayBuffer({url:t.url,headers:e.customRequestHeaders});e$2e(i)||(t.state=_0x172047.UnLoad),t.state=_0x172047.Loading,i.then((function(e){t.state=_0x172047.Loaded,t.skeletonBuffer=e}),(function(e){t.state=_0x172047.Failed}))},_0x432861.parse=function(e,t){var i=_0x29d1c7.S3MTaskProcessor.scheduleTask({buffer:t.skeletonBuffer,supportCompressType:e._supportCompressType},[t.skeletonBuffer]);e$2e(i)?(t.skeletonBuffer=void 0,t.state=_0x172047.Parsing,i.then((function(i){if(i.result){e._gl;for(var n=e._context,r=_0x45c10f.read(i.xmlDoc).firstChild,o=r.namespaceURI,a=s$T.queryFirstNode(r,"Material3Ds",o),s=s$T.queryChildNodes(a,"material",o),l={},u=0,c=s.length;u<c;u++){var h=s[u],d=s$T.queryStringValue(h,"name",o),f=new _0xf77618({});l[d]=f;var p=s$T.queryFirstNode(h,"Ambient",o),_=s$T.queryNumericValue(p,"AmbientR",o),m=s$T.queryNumericValue(p,"AmbientG",o),g=s$T.queryNumericValue(p,"AmbientB",o),x=s$T.queryNumericValue(p,"AmbientA",o);f._ambientColor=new e$1X(_,m,g,x);var y=s$T.queryFirstNode(h,"Diffuse",o);_=s$T.queryNumericValue(y,"DiffuseR",o),m=s$T.queryNumericValue(y,"DiffuseG",o),g=s$T.queryNumericValue(y,"DiffuseB",o),x=s$T.queryNumericValue(y,"DiffuseA",o),f._diffuseColor=new e$1X(_,m,g,x);var v=s$T.queryFirstNode(h,"Specular",o);_=s$T.queryNumericValue(v,"SpecularR",o),m=s$T.queryNumericValue(v,"SpecularG",o),g=s$T.queryNumericValue(v,"SpecularB",o),x=s$T.queryNumericValue(v,"SpecularA",o),f._specularColor=new e$1X(_,m,g,x);var $=s$T.queryNumericValue(h,"Shininess",o);f._shininess=$,s$T.queryFirstNode(h,"TransparentSorting",o),f._bTransparentSorting=s$T.queryBooleanValue(h,"TransparentSorting",o)||f._diffuseColor.alpha<1;var b=s$T.queryFirstNode(h,"texture",o),T=s$T.queryStringValue(b,"name",o),C=s$T.queryFirstNode(b,"AddressMode",o),S=s$T.queryStringValue(C,"u",o),w=s$T.queryStringValue(C,"v",o);S="TAM_WRAP"===S?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,w="TAM_WRAP"===w?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;var E=i.texturePackage[T];if(e$2e(E)){var P=Se$e.CreateTexture(T,n,E.width,E.height,E.nFormat,E.compressType,E.imageBuffer,!1,S,w);f._textures.push(P),0===E.compressType&&(e._supportCompressType=0)}}var A=s$T.queryFirstNode(r,"PageLods",o),L=s$T.queryNodes(A,"Geode",o);for(u=0,c=L.length;u<c;u++){for(var M=L[u],R=s$T.queryStringValue(M,"GeoDeModMatrix",o).split(","),O=0;O<16;O++)R[O]=parseFloat(R[O]);R=p$1d.unpack(R,0);for(var D=s$T.queryNodes(M,"GeoName",o),I=[],B=0,F=D.length;B<F;B++){var N=D[B].textContent.trim();I.push(N);var G=i.geoPackage[N],z=_0x20f2f9(U=G.vertexPackage,R),U=G.vertexPackage,V=G.arrIndexPackage[0];if(e$2e(V)){f=l[d=V.materialCode];t.createSubSkeleton(e,R,f,U,V,z)}}}t.ready=!0,t.state=_0x172047.Ready;var k=e._skeletonTileMap.get(t.url);for(u=0,c=k.length;u<c;u++)k[u].dirty=!0;e._skeletonTileMap.remove(t.url)}else t.state=_0x172047.Failed})).otherwise((function(e){console.log(e)}))):t.state=_0x172047.Loaded};var _0xee3a77=(_0x31bf72=!0,function(e,t){var i=_0x31bf72?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31bf72=!1,i}),_0x2fc011=_0xee3a77(void 0,(function(){return _0x2fc011.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fc011).search("(((.+)+)+)+$")})),_0x31bf72;function _0x18a7ac(){}_0x2fc011(),_0x18a7ac.load=function(e,t){t._isGlTF?_0x176948.load(e,t):_0x432861.load(e,t)},_0x18a7ac.parse=function(e,t){t.url.endsWith("s3mb")?_0x590c0e.parse(e,t):_0x432861.parse(e,t)};var _0x2ee4b9=(_0x4ed044=!0,function(e,t){var i=_0x4ed044?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4ed044=!1,i}),_0x541882=_0x2ee4b9(void 0,(function(){return _0x541882.toString().search("(((.+)+)+)+$").toString().constructor(_0x541882).search("(((.+)+)+)+$")})),_0x4ed044;function _0x468844(e){this._context=e,this._gl=e._gl,this.type=bt$6.INSTANCED_LAYER,this._tilingScheme=new g$15,this._modelSkeletons=new e$1Q,this._tiles=new e$1Q,this._instances=new e$1Q,this._skeletonTileMap=new e$1Q,this._tileWidth=1e3,this._maxSSE=2,this._level=10,this._maxGeometricError=0,this._level=this.computeLevel(this._tileWidth),this._minVisibleAltitude=0,this._maxVisibleAltitude=Number.MAX_VALUE,this._filterMode=_0x219958.PIXEL_SIZE_ON_SCREEN,this._filterDistance=Number.MAX_VALUE,this._filterPixel=0,this._selectedColor=new e$1X(.7,.7,1,1),this._pickEnable=!0,this._visibleViewport=4095,this._supportCompressType=e$2e(e.s3tc)?1:e$2e(e.pvrtc)?2:3,this._shadowType=_0x325616.NONE,this._specularEnvironmentMaps=void 0,this._hdrEnvMap=void 0,this._PBRMaterialParams={pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1,baseColor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissiveFactor:new o$1p,emissiveTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1,normalTexture:void 0,baseColorTexture:void 0}},this._visible=!0}function _0x38069e(e,t,i){var n=e.camera,r=e.context.drawingBufferWidth,o=e.context.drawingBufferHeight,a=Math.max(r,o),s=.5*n.frustum.fov,l=.5*a/Math.tan(s);return Math.ceil(l*t/i)}function _0x45cc5b(e,t,i){if(!e$2e(i.boundingVolume))return!1;if(!(e.cullingVolume.computeVisibility(i.boundingVolume)!==Ae$w.OUTSIDE))return!1;var n=i.tileBoundingRegion.distanceToCamera(e);if(i.distanceToCamera=n,e.fog.enabled&&e$2d.fog(n,e.fog.density)>=1)return!1;var r=e.context.drawingBufferHeight,o=e.camera.frustum.sseDenominator,a=t._maxGeometricError*r/(n*o);return e.fog.enabled&&(a-=e$2d.fog(n,e.fog.density)*e.fog.sse),!(a<t._maxSSE)}function _0x1293a3(e,t){t.state===_0x172047.UnLoad&&_0x18a7ac.load(e,t),t.state===_0x172047.Loaded&&_0x18a7ac.parse(e,t)}function _0x3af1a3(e,t,i){for(var n=0;n<i.commandGroup.length;n++)for(var r=i.commandGroup.values[n],o=0;o<r.length;o++){var a=r[o];if(t._filterMode===_0x219958.PIXEL_SIZE_ON_SCREEN){if(_0x38069e(e,a.radius,i.distanceToCamera)<t.filterPixel)continue}else if(i.distanceToCamera>t.filterDistance)continue;e.commandList.push(a)}}_0x541882(),Object.defineProperties(_0x468844.prototype,{visible:{get:function(){return this._visible},set:function(e){o$1q.typeOf.bool("Instance visible",e),e!==this._visible&&(this._visible=e)}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){o$1q.typeOf.number("InstanceLayer minVisibleAltitude",e),this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){o$1q.typeOf.number("InstanceLayer maxVisibleAltitude",e),this._maxVisibleAltitude=e}},filterMode:{get:function(){return this._filterMode},set:function(e){o$1q.typeOf.number("InstanceLayer filterMode",e),this._filterMode=e}},filterDistance:{get:function(){return this._filterDistance},set:function(e){o$1q.typeOf.number("InstanceLayer filterPixel",e),this._filterDistance=e}},filterPixel:{get:function(){return this._filterPixel},set:function(e){o$1q.typeOf.number("InstanceLayer filterPixel",e),this._filterPixel=e}},selectedColor:{get:function(){return this._selectedColor},set:function(e){o$1q.typeOf.object("InstanceLayer selectedColor",e),this._selectedColor=e$1X.clone(e,this._selectedColor)}},pickEnable:{get:function(){return this._pickEnable},set:function(e){o$1q.typeOf.bool("InstanceLayer pickEnable",e),this._pickEnable=e}},tileWidth:{get:function(){return this._tileWidth},set:function(e){o$1q.typeOf.number("InstanceLayer tileWidth",e),this._tileWidth=e;var t=this.computeLevel(e);t!==this._level&&(this._level=t,this.updateTiles())}},maxSSE:{get:function(){return this._maxSSE},set:function(e){this._maxSSE=e}},shadowType:{get:function(){return this._shadowType},set:function(e){this._shadowType!==e&&(this._shadowType=e,this._updateShadow(this))}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders!==e&&(this._customRequestHeaders=e)}}});var _0x3a09ab=78271.51696402048;function _0x22a592(e){return e._shadowType==_0x325616.SELECTION||e._shadowType==_0x325616.ALL}_0x468844.prototype.computeLevel=function(e){var t=10,i=this._tilingScheme.tileXYToRectangle(0,0,10),n=this._tilingScheme._projection,r=h$18.southwest(i),o=h$18.northeast(i);r=n.project(r);var a=(o=n.project(o)).x-r.x;for(o.y,r.y;a>e;)++t,a*=.5;return t-=1,this._maxGeometricError=_0x3a09ab/(1<<t),t},_0x468844.prototype.updateTiles=function(){var e,t,i,n;for(e=0,t=this._tiles.length;e<t;e++)this._tiles.values[e].destroy();this._tiles.removeAll(),this._skeletonTileMap.removeAll();var r=this._tilingScheme;for(e=0,t=this._instances.length;e<t;e++){var o=this._instances.values[e];for(i=0,n=o.length;i<n;i++){var a=o.values[i];a.tile=void 0,a.instanceInfo=void 0;var s=a.url,l=r.positionToTileXY(a.geoPosition,this._level),u=l.x+"_"+l.y;if(!e$2e(p=this._tiles.get(u))){(p=new _0x5bb99e(l.x,l.y)).layer=this;var c=r.tileXYToRectangle(l.x,l.y,this._level);p.rectangle=h$18.clone(c),p.boundingVolume=y$Y.fromRectangle(c,0,0),p.transform=m$19.eastNorthUpToFixedFrame(p.boundingVolume.center,void 0,new p$1d),p.inverseTransform=p$1d.inverse(p.transform,new p$1d),p.tileBoundingRegion=new y$K({computeBoundingVolumes:!1,rectangle:c,ellipsoid:r.ellipsoid,minimumHeight:0,maximumHeight:0}),this._tiles.set(u,p)}a.offset=p$1d.multiplyByPoint(p.inverseTransform,a.position,a.offset),p.dirty=!0;var h=this._skeletonTileMap.get(s);e$2e(h)||(h=[],this._skeletonTileMap.set(s,h)),h.push(p);var d=p.instanceGroup.get(s);e$2e(d)||(d=new _0x36b665(s,_0x468844.STRIDE),p.instanceGroup.set(s,d)),d.instances.push(a),a.instanceInfo=d,a.tile=p,d.dirty=!0;var f=p.skeletonGroup.get(s);e$2e(f)||(f=this._modelSkeletons.get(s),p.skeletonGroup.set(s,f))}}for(e=0,t=this._tiles.length;e<t;e++){var p;(p=this._tiles.values[e]).dirty&&p.update(this._context)}},_0x468844.prototype.add=function(e,t,i){if(o$1q.typeOf.string("url",e),o$1q.defined("attrs",t),Array.isArray(t)||(t=[t]),!this._modelSkeletons.contains(e)){var n=!1;(e.indexOf(".gltf")>0||e.indexOf(".glb")>0)&&(n=!0),e$2e(i)&&(n="gltf"===i),n?this._modelSkeletons.set(e,new _0x3248fd(e)):this._modelSkeletons.set(e,new _0x1c4b07(e))}for(var r=this._tilingScheme,o=0,a=t.length;o<a;o++){var s=t[o],l=u$Z(s.id,e$1T()),u=new _0x55c8b4(this._context,e,s,l),c=r.positionToTileXY(u.geoPosition,this._level),h=c.x+"_"+c.y;if(!e$2e(g=this._tiles.get(h))){(g=new _0x5bb99e(c.x,c.y)).layer=this;var d=this._tilingScheme.tileXYToRectangle(c.x,c.y,this._level);g.rectangle=h$18.clone(d),g.boundingVolume=y$Y.fromRectangle(d,0,0),g.transform=m$19.eastNorthUpToFixedFrame(g.boundingVolume.center,void 0,new p$1d),g.inverseTransform=p$1d.inverse(g.transform,new p$1d),g.tileBoundingRegion=new y$K({computeBoundingVolumes:!1,rectangle:d,ellipsoid:r.ellipsoid,minimumHeight:0,maximumHeight:0}),this._tiles.set(h,g)}u.offset=p$1d.multiplyByPoint(g.inverseTransform,u.position,u.offset),u.selectedColor=e$1X.clone(this._selectedColor,u.selectedColor),g.dirty=!0;var f=this._skeletonTileMap.get(e);e$2e(f)||(f=[],this._skeletonTileMap.set(e,f)),f.push(g);var p=g.instanceGroup.get(u.url);e$2e(p)||(p=new _0x36b665(u.url,_0x468844.STRIDE),g.instanceGroup.set(u.url,p)),p.instances.push(u),u.instanceInfo=p,u.tile=g,u.layer=this,p.dirty=!0;var _=g.skeletonGroup.get(u.url);e$2e(_)||(_=this._modelSkeletons.get(u.url),g.skeletonGroup.set(u.url,_));var m=this._instances.get(e);e$2e(m)||(m=new e$1Q,this._instances.set(e,m)),m.set(l,u)}for(o=0,a=this._tiles.length;o<a;o++){var g;(g=this._tiles.values[o]).dirty&&g.update(this._context)}},_0x468844.prototype.getInstance=function(e,t){o$1q.defined("InstanceLayer getInstance url",e),o$1q.defined("InstanceLayer getInstance id",t);var i=this._instances.get(e);if(e$2e(i))return i.get(t)},_0x468844.prototype._updateShadow=function(e){var t=_0x22a592(e),i=e._modelSkeletons._hash;for(var n in i){var r=i[n];if(r.ready)for(var o=0,a=r.subSkeletons.length;o<a;o++){var s=r.subSkeletons[o];s.colorCommand.castShadows=t,s.colorCommand.receiveShadows=t}}},_0x468844.prototype.removeInstance=function(e,t){o$1q.defined("InstanceLayer removeInstance url",e),o$1q.defined("InstanceLayer removeInstance ids",t),Array.isArray(t)||(t=[t]);for(var i=0,n=t.length;i<n;i++){var r=t[i],o=this.getInstance(e,r);if(e$2e(o)&&e$2e(o.tile)){var a=o.tile;a.dirty=!0;var s=a.instanceGroup.get(e);if(e$2e(s)){s.dirty=!0;var l=s.instances.indexOf(o);s.instances.splice(l,1),this._instances.get(e).remove(o.id)}}}0===this._instances.get(e).length&&this.removeAll(e)},_0x468844.prototype.removeAll=function(e){var t,i;if(e$2e(e)){if(!this._modelSkeletons.contains(e))return;for(this._modelSkeletons.get(e).destroy(),this._modelSkeletons.remove(e),this._instances.remove(e),this._skeletonTileMap.remove(e),t=0,i=this._tiles.length;t<i;t++){var n=this._tiles.values[t];n.remove(e),n.dirty=!0}}else{for(t=0,i=this._modelSkeletons.length;t<i;t++){var r=this._modelSkeletons.values[t];r._isGlTF?!r.model.isDestroyed()&&r.model.destroy():this._modelSkeletons.values[t].destroy()}for(this._modelSkeletons.removeAll(),t=0,i=this._tiles.length;t<i;t++)this._tiles.values[t].destroy();this._tiles.removeAll(),this._instances.removeAll(),this._skeletonTileMap.removeAll()}},_0x468844.prototype.setUnSelected=function(){var e=this._instances;if(e$2e(e)&&!(e.length<1))for(var t=0,i=e.length;t<i;t++)for(var n=e.values[t],r=0,o=n.length;r<o;r++){n.values[r].setUnSelected()}},_0x468844.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},_0x468844.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},_0x468844.prototype.update=function(e){if(e.multiViewportIndex>-1&&!this.getVisibleInViewport(e.multiViewportIndex))return;var t=e.camera;if(!(t.positionCartographic.height>this._maxVisibleAltitude||t.positionCartographic.height<this._minVisibleAltitude)&&(!e.passes.pick||this._pickEnable)&&this._visible){var i=!1;for(var n in(this._specularEnvironmentMaps!==e.specularEnvironmentMaps||this._hdrEnvMap!==e.hdrEnvMap)&&(i=!0,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._hdrEnvMap=e.hdrEnvMap),this._frameState=e,this._modelSkeletons._hash)if(this._modelSkeletons._hash.hasOwnProperty(n)){var r=this._modelSkeletons.get(n);r.ready?i&&r.updateShaderProgram(e,this):_0x1293a3(this,r),r._isGlTF&&r.transformed&&r.model.updateAnimation(e)}for(var o=0,a=this._tiles.length;o<a;o++){var s=this._tiles.values[o];if(i&&s.updateShaderProgram(),_0x45cc5b(e,this,s)){for(var n in s.dirty&&s.update(this._context),s.commandGroup._hash){var l=this._modelSkeletons.get(n).model;if(e$2e(l))for(var u=l._nodeCommands,c=s.commandGroup.get(n),h=0,d=c.length;h<d;h++){var f=c[h],p=u[h].command;p$1d.clone(p.modelMatrix,f.localMatrix),p$1d.clone(s.transform,f.modelMatrix),y$Y.clone(s.boundingVolume,f.boundingVolume)}}_0x3af1a3(e,this,s)}}}},_0x468844.STRIDE=18,_0x468844.prototype.isDestroyed=function(){return!1},_0x468844.prototype.destroy=function(){this.removeAll(),i$11(this)};var _0x4e968c=(_0x5d1327=!0,function(e,t){var i=_0x5d1327?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5d1327=!1,i}),_0x58c3e4=_0x4e968c(void 0,(function(){return _0x58c3e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x58c3e4).search("(((.+)+)+)+$")})),_0x5d1327;function _0x3763f9(e,t){this.id=e,this.buffer=t}_0x58c3e4();var _0x1bb9d9=(_0x57d707=!0,function(e,t){var i=_0x57d707?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x57d707=!1,i}),_0xe8306c=_0x1bb9d9(void 0,(function(){return _0xe8306c.toString().search("(((.+)+)+)+$").toString().constructor(_0xe8306c).search("(((.+)+)+)+$")})),_0x57d707,_0x298aad;function _0x5a4a56(){}function _0x427cea(e,t){for(var i=e.num_points(),n=e.num_faces(),r=new _0x298aad.DracoInt32Array,o=3*n,a=ce$z.createTypedArray(i,o),s=0,l=0;l<n;++l)t.GetFaceFromMesh(e,l,r),a[s+0]=r.GetValue(0),a[s+1]=r.GetValue(1),a[s+2]=r.GetValue(2),s+=3;var u=ce$z.UNSIGNED_SHORT;return a instanceof Uint32Array&&(u=ce$z.UNSIGNED_INT),_0x298aad.destroy(r),{typedArray:a,numberOfIndices:o,indexDataType:u}}function _0x1a20af(e,t,i,n,r){var o,a;n.quantizationBits<=8?(a=new _0x298aad.DracoUInt8Array,o=new Uint8Array(r),t.GetAttributeUInt8ForAllPoints(e,i,a)):(a=new _0x298aad.DracoUInt16Array,o=new Uint16Array(r),t.GetAttributeUInt16ForAllPoints(e,i,a));for(var s=0;s<r;++s)o[s]=a.GetValue(s);return _0x298aad.destroy(a),o}function _0x2b6943(e,t,i,n){var r,o;switch(i.data_type()){case 1:case 11:o=new _0x298aad.DracoInt8Array,r=new Int8Array(n),t.GetAttributeInt8ForAllPoints(e,i,o);break;case 2:o=new _0x298aad.DracoUInt8Array,r=new Uint8Array(n),t.GetAttributeUInt8ForAllPoints(e,i,o);break;case 3:o=new _0x298aad.DracoInt16Array,r=new Int16Array(n),t.GetAttributeInt16ForAllPoints(e,i,o);break;case 4:o=new _0x298aad.DracoUInt16Array,r=new Uint16Array(n),t.GetAttributeUInt16ForAllPoints(e,i,o);break;case 5:case 7:o=new _0x298aad.DracoInt32Array,r=new Int32Array(n),t.GetAttributeInt32ForAllPoints(e,i,o);break;case 6:case 8:o=new _0x298aad.DracoUInt32Array,r=new Uint32Array(n),t.GetAttributeUInt32ForAllPoints(e,i,o);break;case 9:case 10:o=new _0x298aad.DracoFloat32Array,r=new Float32Array(n),t.GetAttributeFloatForAllPoints(e,i,o)}for(var a=0;a<n;++a)r[a]=o.GetValue(a);return _0x298aad.destroy(o),r}function _0x5ca8c3(e,t,i){var n,r=e.num_points(),o=i.num_components(),a=new _0x298aad.AttributeQuantizationTransform;if(a.InitFromAttribute(i)){for(var s=new Array(o),l=0;l<o;++l)s[l]=a.min_value(l);n={quantizationBits:a.quantization_bits(),minValues:s,range:a.range(),octEncoded:!1}}_0x298aad.destroy(a),(a=new _0x298aad.AttributeOctahedronTransform).InitFromAttribute(i)&&(n={quantizationBits:a.quantization_bits(),octEncoded:!0}),_0x298aad.destroy(a);var u,c=r*o;u=e$2e(n)?_0x1a20af(e,t,i,n,c):_0x2b6943(e,t,i,c);var h=S$14.fromTypedArray(u);if(S$14.getSizeInBytes(h)*o%4!=0){var d=_0x366ce6(u,o,h);u=d.vertexArray,o=d.numComponents}return{array:u,data:{componentsPerAttribute:o,componentDatatype:h,byteOffset:i.byte_offset(),byteStride:S$14.getSizeInBytes(h)*o,normalized:i.normalized(),quantization:n}}}function _0x366ce6(e,t,i){var n,r=S$14.getSizeInBytes(i),o=r*t;n=t+(4*Math.ceil(o/4)-o)/r;var a,s=e.length/t,l=s*n;e instanceof Uint16Array?a=new Uint16Array(l):e instanceof Int16Array?a=new Int16Array(l):e instanceof Uint8Array?a=new Uint8Array(l):console.log("convertArrayToMutiple4Array dont support array type.");var u,c=0;for(c=0;c<s;c++)for(u=0;u<n;u++)a[c*n+u]=u<t?e[c*t+u]:0;return{numComponents:n,vertexArray:a}}_0xe8306c();var _0x1fc91f=new o$1p(40680631590769,40680631590769,40408299984661.445),_0x46ef19=new o$1p,_0x15684b=new o$1p;function _0x15be72(e,t,i,n){var r=Math.cos(t);_0x46ef19.x=r*Math.cos(e),_0x46ef19.y=r*Math.sin(e),_0x46ef19.z=Math.sin(t),_0x46ef19=o$1p.normalize(_0x46ef19,_0x46ef19),o$1p.multiplyComponents(_0x1fc91f,_0x46ef19,_0x15684b);var o=Math.sqrt(o$1p.dot(_0x46ef19,_0x15684b));return _0x15684b=o$1p.divideByScalar(_0x15684b,o,_0x15684b),_0x46ef19=o$1p.multiplyByScalar(_0x46ef19,i,_0x46ef19),e$2e(n)||(n=new o$1p),o$1p.add(_0x15684b,_0x46ef19,n)}var _0x5f5c31=new p$1d,_0x36a288=new p$1d,_0x590758=new o$1p,_0x5cd4d6=new a$18;function _0x3f4a2d(e,t,i,n,r,o,a,s){var l=void 0,u=void 0,c=void 0,h=void 0,d=i.vertexAttributes,f=i.attrLocation;if(i.nCompressOptions=0,e$2e(n.posUniqueID)&&n.posUniqueID>=0){e$2e(s)||(i.nCompressOptions|=_0x64fca6.SVC_Vertex);var p=t.GetAttribute(e,n.posUniqueID),_=_0x5ca8c3(e,t,p),m=_.data.componentsPerAttribute;i.verticesCount=_.array.length/m,i.vertCompressConstant=_.data.quantization.range/(1<<_.data.quantization.quantizationBits);var g=_.data.quantization.minValues;i.minVerticesValue=new e$2c(g[0],g[1],g[2],1),m>3&&(i.minVerticesValue.w=g[3]);var x=i.verticesCount;if(o&&(l=new a$18,u=new a$18,c=new Float32Array(2*x),h=new Float64Array(2*x)),e$2e(s)){var y=_.array,v=3===m?o$1p.unpackArray(y):e$2c.unpackArray(y);for(let e=0,t=v.length;e<t;e++){let t=v[e];o$1p.multiplyByScalar(t,i.vertCompressConstant,t),o$1p.add(t,i.minVerticesValue,t)}var $=p$1d.multiply(s.sphereMatrix,s.geoMatrix,_0x5f5c31),b=p$1d.multiply(s.ellipsoidMatrix,s.geoMatrix,_0x36a288);p$1d.inverse(b,b);var T=new t$12(6378137,6378137,6378137);for(let e=0,t=v.length;e<t;e++){let t=v[e];p$1d.multiplyByPoint($,t,_0x590758);let i=T.cartesianToCartographic(_0x590758,_0x5cd4d6);o&&(h[2*e]=i.longitude,h[2*e+1]=i.latitude,0===e?(l.longitude=i.longitude,l.latitude=i.latitude,u.longitude=i.longitude,u.latitude=i.latitude):(l.longitude=Math.max(i.longitude,l.longitude),l.latitude=Math.max(i.latitude,l.latitude),u.longitude=Math.min(i.longitude,u.longitude),u.latitude=Math.min(i.latitude,u.latitude)));let n=_0x15be72(i.longitude,i.latitude,i.height,_0x590758);p$1d.multiplyByPoint(b,n,t)}var C=new Array(3*v.length);3===m?o$1p.packArray(v,C):e$2c.packArray(v,C),_.array=new Float32Array(C),_.data.componentDatatype=S$14.FLOAT,_.data.byteStride=4*m}if(f.aPosition=d.length,d.push({index:f.aPosition,typedArray:_.array,componentsPerAttribute:m,componentDatatype:_.data.componentDatatype,offsetInBytes:_.data.byteOffset,strideInBytes:_.data.byteStride,normalize:_.data.normalized}),!e$2e(s)&&o)for(var S=new o$1p,w=new o$1p,E=new a$18,P=0;P<x;P++)p$1d.multiplyByPoint(r,o$1p.fromElements(_.array[3*P]*i.vertCompressConstant+g[0],_.array[3*P+1]*i.vertCompressConstant+g[1],_.array[3*P+2]*i.vertCompressConstant+g[2],S),w),E=a$18.fromCartesian(w),h[2*P]=E.longitude,h[2*P+1]=E.latitude,0===P?(l.longitude=E.longitude,l.latitude=E.latitude,u.longitude=E.longitude,u.latitude=E.latitude):(l.longitude=Math.max(E.longitude,l.longitude),l.latitude=Math.max(E.latitude,l.latitude),u.longitude=Math.min(E.longitude,u.longitude),u.latitude=Math.min(E.latitude,u.latitude));if(o){for(P=0;P<x;P++)c[2*P]=h[2*P]-u.longitude,c[2*P+1]=h[2*P+1]-u.latitude;f.img=d.length,d.push({index:f.img,typedArray:c,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),a.max=l,a.min=u}}if(e$2e(n.normalUniqueID)&&n.normalUniqueID>=0){i.nCompressOptions|=_0x64fca6.SVC_Normal;var A=t.GetAttribute(e,n.normalUniqueID),L=_0x5ca8c3(e,t,A),M=L.data.quantization;i.normalRangeConstant=(1<<M.quantizationBits)-1,f.aNormal=d.length,d.push({index:f.aNormal,typedArray:L.array,componentsPerAttribute:L.data.componentsPerAttribute,componentDatatype:L.data.componentDatatype,offsetInBytes:L.data.byteOffset,strideInBytes:L.data.byteStride,normalize:L.data.normalized})}if(e$2e(n.colorUniqueID)&&n.colorUniqueID>=0){i.nCompressOptions|=_0x64fca6.SVC_VertexColor;var R=t.GetAttribute(e,n.colorUniqueID),O=_0x5ca8c3(e,t,R),D=O.array,I=O.data.componentDatatype,B=O.data.byteOffset,F=O.data.byteStride,N=O.data.normalized;if(O.array instanceof Int32Array){D=new Uint8Array(O.array.length);for(let e=0,t=O.array.length;e<t;e++)D[e]=O.array[e];I=5121,B=0,F=4,N=!0}f.aColor=d.length,d.push({index:f.aColor,typedArray:D,componentsPerAttribute:O.data.componentsPerAttribute,componentDatatype:I,offsetInBytes:B,strideInBytes:F,normalize:N})}for(P=0;P<n.texCoordUniqueIDs.length;P++){i.texCoordCompressConstant=[],i.minTexCoordValue=[];var G=n.texCoordUniqueIDs[P];if(!(G<0)){var z=t.GetAttribute(e,G),U=_0x5ca8c3(e,t,z);if(e$2e(U.data.quantization)){i.nCompressOptions|=_0x64fca6.SVC_TexutreCoord,i.texCoordCompressConstant.push(U.data.quantization.range/(1<<U.data.quantization.quantizationBits));g=U.data.quantization.minValues;i.minTexCoordValue.push(new o$1o(g[0],g[1]))}var V="aTexCoord"+P;f[V]=d.length,d.push({index:f[V],typedArray:U.array,componentsPerAttribute:U.data.componentsPerAttribute,componentDatatype:U.data.componentDatatype,offsetInBytes:U.data.byteOffset,strideInBytes:U.data.byteStride,normalize:U.data.normalized}),i.textureCoordIsW=!0}}for(P=0;P<n.vertexAttrUniqueIDs.length;P++){var k=n.vertexAttrUniqueIDs[P];if(!(k<0)){var W=t.GetAttribute(e,k),H=_0x5ca8c3(e,t,W);f.aVertexWeight=d.length,d.push({index:f.aVertexWeight,typedArray:H.array,componentsPerAttribute:H.data.componentsPerAttribute,componentDatatype:H.data.componentDatatype,offsetInBytes:H.data.byteOffset,strideInBytes:H.data.byteStride,normalize:H.data.normalized}),i.customVertexAttribute={VertexWeight:0}}}}_0x5a4a56.dracoDecodePointCloud=function(e,t,i,n,r){for(var o=new(_0x298aad=e).Decoder,a=["POSITION","NORMAL","COLOR"],s=0;s<a.length;++s)o.SkipAttributeTransform(_0x298aad[a[s]]);var l=new _0x298aad.DecoderBuffer;if(l.Init(t,i),o.GetEncodedGeometryType(l)!==_0x298aad.POINT_CLOUD)throw new t$13("Draco geometry type must be POINT_CLOUD.");var u=new _0x298aad.PointCloud,c=o.DecodeBufferToPointCloud(l,u);if(!c.ok()||0===u.ptr)throw new t$13("Error decoding draco point cloud: "+c.error_msg());_0x298aad.destroy(l),_0x3f4a2d(u,o,n,r),_0x298aad.destroy(u),_0x298aad.destroy(o)},_0x5a4a56.dracoDecodeMesh=function(e,t,i,n,r,o,a,s,l,u){for(var c=new(_0x298aad=e).Decoder,h=["POSITION","NORMAL","COLOR","TEX_COORD"],d=0;d<h.length;++d)c.SkipAttributeTransform(_0x298aad[h[d]]);var f=new _0x298aad.DecoderBuffer;if(f.Init(t,i),c.GetEncodedGeometryType(f)!==_0x298aad.TRIANGULAR_MESH)throw new t$13("Unsupported draco mesh geometry type.");var p=new _0x298aad.Mesh;if(!c.DecodeBufferToMesh(f,p).ok()||0===p.ptr)return!1;_0x298aad.destroy(f),_0x3f4a2d(p,c,n,o,a,s,l,u);var _=_0x427cea(p,c);r.indicesTypedArray=_.typedArray,r.indicesCount=_.numberOfIndices,r.indexType=_.indexDataType,r.primitiveType=W$18.TRIANGLES,_0x298aad.destroy(p),_0x298aad.destroy(c)};var _0x827a55=(_0x2a611e=!0,function(e,t){var i=_0x2a611e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a611e=!1,i}),_0xa96f76=_0x827a55(void 0,(function(){return _0xa96f76.toString().search("(((.+)+)+)+$").toString().constructor(_0xa96f76).search("(((.+)+)+)+$")})),_0x2a611e;function _0x4bc96b(){this._cache={},this._cacheHeap=new o$1g({comparator:sortComparator}),this._cacheHeap.maximumLength=100}_0xa96f76(),_0x4bc96b.prototype.set=function(e,t){var i={id:e,buffer:t,priority:Et$c()};this._cache[e]=i;var n=this._cacheHeap.insert(i);e$2e(n)&&delete this._cache[n.id]},_0x4bc96b.prototype.get=function(e){var t=this._cache[e];if(e$2e(t))return t},_0x4bc96b.prototype.contains=function(e){return e$2e(this._cache[e])};var _0x47f9d4=(_0x310d6c=!0,function(e,t){var i=_0x310d6c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x310d6c=!1,i}),_0x150733=_0x47f9d4(void 0,(function(){return _0x150733.toString().search("(((.+)+)+)+$").toString().constructor(_0x150733).search("(((.+)+)+)+$")})),_0x310d6c;_0x150733();var _0x1481c1={SCENE:"Scene",LIGHT:"Light",MESH:"Mesh",MATERIAL:"Material",LAYER:"Layer",SHADOW:"Shadow"},UBONames=Object.freeze(_0x1481c1);function u$i(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).missingImageUrl))throw new t$15("options.missingImageUrl is required.");if(!e$2e(e.pixelsToCheck))throw new t$15("options.pixelsToCheck is required.");this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;var t=t$10.createIfNeeded(e.missingImageUrl),i=this;t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then((function(t){e$2e(t.blob)&&(i._missingImageByteLength=t.blob.size);var n=d$14(t);if(e.disableCheckIfAllPixelsAreTransparent){for(var r=!0,o=t.width,a=e.pixelsToCheck,s=0,l=a.length;r&&s<l;++s){var u=a[s];n[4*u.x+u.y*o+3]>0&&(r=!1)}r&&(n=void 0)}i._missingImagePixels=n,i._isReady=!0})).otherwise((function(){i._missingImagePixels=void 0,i._isReady=!0}))}function o$r(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}function e$i(){this.defaultAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,t$15.throwInstantiationError()}u$i.prototype.isReady=function(){return this._isReady},u$i.prototype.shouldDiscardImage=function(e){if(!this._isReady)throw new t$15("shouldDiscardImage must not be called before the discard policy is ready.");var t=this._pixelsToCheck,i=this._missingImagePixels;if(!e$2e(i)||e$2e(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;for(var n=d$14(e),r=e.width,o=0,a=t.length;o<a;++o)for(var s=t[o],l=4*s.x+s.y*r,u=0;u<4;++u){var c=l+u;if(n[c]!==i[c])return!1}return!0},o$r.prototype.configureNameFromProperties=function(e){var t,i=10;for(var n in e)if(e.hasOwnProperty(n)&&e[n]){var r=n.toLowerCase();i>1&&"name"===r?(i=1,t=n):i>2&&"title"===r?(i=2,t=n):i>3&&/name/i.test(n)?(i=3,t=n):i>4&&/title/i.test(n)&&(i=4,t=n)}e$2e(t)&&(this.name=e[t])},o$r.prototype.configureDescriptionFromProperties=function(e){this.description=function e(t){var i='<table class="supermap3d-infoBox-defaultTable">';for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];e$2e(r)&&(i+="object"==typeof r?"<tr><td>"+n+"</td><td>"+e(r)+"</td></tr>":"<tr><td>"+n+"</td><td>"+r+"</td></tr>")}return i+="</table>"}(e)},Object.defineProperties(e$i.prototype,{ready:{get:t$15.throwInstantiationError},readyPromise:{get:t$15.throwInstantiationError},rectangle:{get:t$15.throwInstantiationError},tileWidth:{get:t$15.throwInstantiationError},tileHeight:{get:t$15.throwInstantiationError},maximumLevel:{get:t$15.throwInstantiationError},minimumLevel:{get:t$15.throwInstantiationError},tilingScheme:{get:t$15.throwInstantiationError},tileDiscardPolicy:{get:t$15.throwInstantiationError},errorEvent:{get:t$15.throwInstantiationError},credit:{get:t$15.throwInstantiationError},proxy:{get:t$15.throwInstantiationError},hasAlphaChannel:{get:t$15.throwInstantiationError}}),e$i.prototype.getTileCredits=t$15.throwInstantiationError,e$i.prototype.requestImage=t$15.throwInstantiationError,e$i.prototype.pickFeatures=t$15.throwInstantiationError,e$i.prototype.onAlphaChanged=function(){};var m$k=/\.ktx$/i,p$g=/\.crn$/i,c$e=/\.dxtz$/i;function b$q(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url))throw new t$15("options.url is required.");this._baseUrl=e.url;var t=t$10.createIfNeeded(e.url);t.appendForwardSlash(),e$2e(e.token)&&t.setQueryParameters({token:e.token}),this._resource=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=u$Z(e.tilingScheme,new g$15({ellipsoid:e.ellipsoid})),this._useTiles=u$Z(e.usePreCachedTilesIfAvailable,!0),this._rectangle=u$Z(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers;var i=e.credit;"string"==typeof i&&(i=new r$U(i)),this._credit=i,this.enablePickFeatures=u$Z(e.enablePickFeatures,!0),this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var n,r=this,o=e.url;function a(t){var i=t.tileInfo;if(e$2e(i)){if(r._tileWidth=i.rows,r._tileHeight=i.cols,102100===i.spatialReference.wkid||102113===i.spatialReference.wkid)r._tilingScheme=new c$S({ellipsoid:e.ellipsoid});else{if(4326!==t.tileInfo.spatialReference.wkid){var o="Tile spatial reference WKID "+t.tileInfo.spatialReference.wkid+" is not supported.";return void(n=l$V.handleError(n,r,r._errorEvent,o,void 0,void 0,void 0,l))}r._tilingScheme=new g$15({ellipsoid:e.ellipsoid})}if(r._maximumLevel=t.tileInfo.lods.length-1,e$2e(t.fullExtent)){if(e$2e(t.fullExtent.spatialReference)&&e$2e(t.fullExtent.spatialReference.wkid))if(102100===t.fullExtent.spatialReference.wkid||102113===t.fullExtent.spatialReference.wkid){var a=new t$N,s=t.fullExtent,u=a.unproject(new o$1p(Math.max(s.xmin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(s.ymin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),c=a.unproject(new o$1p(Math.min(s.xmax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(s.ymax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));r._rectangle=new h$18(u.longitude,u.latitude,c.longitude,c.latitude)}else{if(4326!==t.fullExtent.spatialReference.wkid){var h="fullExtent.spatialReference WKID "+t.fullExtent.spatialReference.wkid+" is not supported.";return void(n=l$V.handleError(n,r,r._errorEvent,h,void 0,void 0,void 0,l))}r._rectangle=h$18.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax)}}else r._rectangle=r._tilingScheme.rectangle;e$2e(r._tileDiscardPolicy)||(r._tileDiscardPolicy=new u$i({missingImageUrl:A$q(r,0,0,r._maximumLevel).url,pixelsToCheck:[new o$1o(0,0),new o$1o(200,20),new o$1o(20,200),new o$1o(80,110),new o$1o(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),r._useTiles=!0}else r._useTiles=!1;e$2e(t.copyrightText)&&t.copyrightText.length>0&&(r._credit=new r$U(t.copyrightText)),r._ready=!0,r._readyPromise.resolve(!0),l$V.handleSuccess(n)}function s(e){var t="An error occurred while accessing "+r._resource.url+".";n=l$V.handleError(n,r,r._errorEvent,t,void 0,void 0,void 0,l),r._readyPromise.reject(new t$13(t))}function l(){o$1l(r._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJsonp(),a,s)}r.tablename=e.url,new l$14({name:o}).then((function(e){e.checkObjectStoreExit(r.tablename)?r._indexedDBScheduler=e:e.createObjectStore(r.tablename).then((function(){r._indexedDBScheduler=e}))})),r._indexedDBSetting={isOpen:!1,clear:function(){r._indexedDBScheduler.clear(r.tablename)},cache:[]},this._useTiles?l():(this._ready=!0,this._readyPromise.resolve(!0))}function A$q(e,t,i,n,r){var o;if(e._useTiles)o=e._resource.getDerivedResource({url:"tile/"+n+"/"+i+"/"+t,request:r});else{var a=e._tilingScheme.tileXYToNativeRectangle(t,i,n),s={bbox:a.west+","+a.south+","+a.east+","+a.north,size:e._tileWidth+","+e._tileHeight,format:"png",transparent:!0,f:"image"};e._tilingScheme.projection instanceof n$1d?(s.bboxSR=4326,s.imageSR=4326):(s.bboxSR=3857,s.imageSR=3857),e.layers&&(s.layers="show:"+e.layers),o=e._resource.getDerivedResource({url:"export",request:r,queryParameters:s})}return o}function Y$a(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function a$h(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=void 0,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new o$1o,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}function v$j(e){var t=e._framebuffers;if(e$2e(t)){for(var i=t.length,n=0;n<i;++n)t[n].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}}function D$h(e,t){v$j(e);for(var i=e._width,n=e._height,r=V$12.RGBA,o=t.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT,a=new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),s=Math.ceil(Math.log(Math.max(i,n))/Math.log(3)),l=new Array(s),u=0;u<s;++u)i=Math.max(Math.ceil(i/3),1),n=Math.max(Math.ceil(n/3),1),l[u]=new t$V({context:t,colorTextures:[new t$U({context:t,width:i,height:n,pixelFormat:r,pixelDatatype:o,sampler:a})]});var c=l[s-1].getColorTexture(0);e._previousLuminance=new t$V({context:t,colorTextures:[new t$U({context:t,width:c.width,height:c.height,pixelFormat:r,pixelDatatype:o,sampler:a})]}),e._framebuffers=l}function x$n(e){var t=e._commands;if(e$2e(t)){for(var i=t.length,n=0;n<i;++n)t[n].shaderProgram.destroy();e._commands=void 0}}function F$g(e,t){var i;if(0===t)i={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{var n=e._framebuffers[t-1].getColorTexture(0);i={colorTexture:function(){return n},colorTextureDimensions:function(){return n.dimensions}}}return i.minMaxLuminance=function(){return e._minMaxLuminance},i.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},i}function S$h(e,t){var i="uniform sampler2D colorTexture; \nvarying vec2 v_textureCoordinates; \nfloat sampleTexture(vec2 offset) { \n";return i+=0===e?" vec4 color = texture2D(colorTexture, v_textureCoordinates + offset); \n return czm_luminance(color.rgb); \n":" return texture2D(colorTexture, v_textureCoordinates + offset).r; \n",i+="}\n\n",i+="uniform vec2 colorTextureDimensions; \nuniform vec2 minMaxLuminance; \nuniform sampler2D previousLuminance; \nvoid main() { \n float color = 0.0; \n float xStep = 1.0 / colorTextureDimensions.x; \n float yStep = 1.0 / colorTextureDimensions.y; \n int count = 0; \n for (int i = 0; i < 3; ++i) { \n for (int j = 0; j < 3; ++j) { \n vec2 offset; \n offset.x = -xStep + float(i) * xStep; \n offset.y = -yStep + float(j) * yStep; \n if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) { \n continue; \n } \n color += sampleTexture(offset); \n ++count; \n } \n } \n if (count > 0) { \n color /= float(count); \n } \n",e===t-1&&(i+=" float previous = texture2D(previousLuminance, vec2(0.5)).r; \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n color = previous + (color - previous) / (60.0 * 1.5); \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n"),i+=" gl_FragColor = vec4(color); \n} \n"}function A$p(e,t){x$n(e);for(var i=e._framebuffers,n=i.length,r=new Array(n),o=0;o<n;++o)r[o]=t.createViewportQuadCommand(S$h(o,n),{framebuffer:i[o],uniformMap:F$g(e,o)});e._commands=r}e$i.loadImage=function(e,t,i){o$1q.defined("url",t);var n=t$10.createIfNeeded(t);return e$2e(i)?n.fetchArrayBuffer():m$k.test(n.url)?k$W(n):p$g.test(n.url)?a$P(n):c$e.test(n.url)?(e.flipY=!0,B$M(n)):e$2e(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(e$2e(e._customRequestHeaders)&&(n.headers=p$19(n.headers,e._customRequestHeaders)),n.fetchBlob())},Object.defineProperties(b$q.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),b$q.prototype.getTileCredits=function(e,t,i){},b$q.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=A$q(this,e,t,i,n);if(e$2e(a$O.CREDENTIAL)&&(e$2e(a$O.CREDENTIAL._keymap[this._baseUrl])?r.url=a$O.addTokenWithKey(this._baseUrl,r.url):r.url=a$O.addToken(r.url)),n.quadKey=Y$a(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(e$2e(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2e(o)?o$1l(o,(function(e){return e$2e(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$i.loadImage(this,r)}return e$i.loadImage(this,r)}return e$i.loadImage(this,r)},b$q.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$15("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures){var o,a,s,l=this._tilingScheme.tileXYToNativeRectangle(e,t,i);if(this._tilingScheme.projection instanceof n$1d)o=e$2d.toDegrees(n),a=e$2d.toDegrees(r),s="4326";else{var u=this._tilingScheme.projection.project(new a$18(n,r,0));o=u.x,a=u.y,s="3857"}var c="visible";e$2e(this._layers)&&(c+=":"+this._layers);var h={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:o+","+a,mapExtent:l.west+","+l.south+","+l.east+","+l.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:s,layers:c};return this._resource.getDerivedResource({url:"identify",queryParameters:h}).fetchJson().then((function(e){var t=[],i=e.results;if(!e$2e(i))return t;for(var n=0;n<i.length;++n){var r=i[n],o=new o$r;if(o.data=r,o.name=r.value,o.properties=r.attributes,o.configureDescriptionFromProperties(r.attributes),"esriGeometryPoint"===r.geometryType&&r.geometry){var a=r.geometry.spatialReference&&r.geometry.spatialReference.wkid?r.geometry.spatialReference.wkid:4326;if(4326===a||4283===a)o.position=a$18.fromDegrees(r.geometry.x,r.geometry.y,r.geometry.z);else if(102100===a||900913===a||3857===a){var s=new t$N;o.position=s.unproject(new o$1p(r.geometry.x,r.geometry.y,r.geometry.z))}}t.push(o)}return t}))}},Object.defineProperties(a$h.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){var e=this._framebuffers;if(e$2e(e))return e[e.length-1].getColorTexture(0)}}}),a$h.prototype.clear=function(e){var t=this._framebuffers;if(e$2e(t)){var i=this._clearCommand;e$2e(i)||(i=this._clearCommand=new t$W({color:new e$1X(0,0,0,0),framebuffer:void 0}));for(var n=t.length,r=0;r<n;++r)i.framebuffer=t[r],i.execute(e)}},a$h.prototype.update=function(e){var t=e.drawingBufferWidth,i=e.drawingBufferHeight;(t!==this._width||i!==this._height)&&(this._width=t,this._height=i,D$h(this,e),A$p(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;var n=this._framebuffers,r=n[n.length-1];n[n.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance,this._previousLuminance=r},a$h.prototype.execute=function(e,t){this._colorTexture=t;var i=this._commands;if(e$2e(i))for(var n=i.length,r=0;r<n;++r)i[r].execute(e)},a$h.prototype.isDestroyed=function(){return!1},a$h.prototype.destroy=function(){return v$j(this),x$n(this),i$11(this)};var A$o={AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"},I$l=Object.freeze(A$o),e$h;function A$n(e){}function o$q(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url))throw new t$15("options.url is required.");this._key=e$12.getKey(e.key),this._resource=t$10.createIfNeeded(e.url),this._resource.appendForwardSlash(),this._tileProtocol=e.tileProtocol,this._mapStyle=u$Z(e.mapStyle,I$l.AERIAL),this._culture=u$Z(e.culture,""),this._tileDiscardPolicy=e.tileDiscardPolicy,e$2e(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new A$n),this._proxy=e.proxy,this._credit=new r$U('<a href="http://www.bing.com"><img src="'+o$q.logoUrl+'" title="Bing Imagery"/></a>'),this.defaultGamma=1,this._tilingScheme=new c$S({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=u$Z(e.maximumLevel,void 0),this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var t=this._tileProtocol;e$2e(t)?t.length>0&&":"===t[t.length-1]&&(t=t.substr(0,t.length-1)):t="http:"===document.location.protocol?"http":"https";var i,n=this._resource.getDerivedResource({url:"REST/v1/Imagery/Metadata/"+this._mapStyle,queryParameters:{incl:"ImageryProviders",key:this._key,uriScheme:t}}),r=this;function o(e){if(1===e.resourceSets.length){var t=e.resourceSets[0].resources[0];r._tileWidth=t.imageWidth,r._tileHeight=t.imageHeight,r._maximumLevel=e$2e(r._maximumLevel)?r._maximumLevel:t.zoomMax-1,r._imageUrlSubdomains=t.imageUrlSubdomains,r._imageUrlTemplate=t.imageUrl;var n=r._attributionList=t.imageryProviders;n||(n=r._attributionList=[]);for(var o=0,s=n.length;o<s;++o){var l=n[o];if(l.credit instanceof r$U)break;l.credit=new r$U(l.attribution);for(var u=l.coverageAreas,c=0,h=l.coverageAreas.length;c<h;++c){var d=u[c],f=d.bbox;d.bbox=new h$18(e$2d.toRadians(f[1]),e$2d.toRadians(f[0]),e$2d.toRadians(f[3]),e$2d.toRadians(f[2]))}}r._ready=!0,r._readyPromise.resolve(!0),l$V.handleSuccess(i)}else a()}function a(e){var t="An error occurred while accessing "+n.url+".";i=l$V.handleError(i,r,r._errorEvent,t,void 0,void 0,void 0,l),r._readyPromise.reject(new t$13(t))}var s=n.url;function l(){var e=n.fetchJsonp("jsonp");o$q._metadataCache[s]=e,e.then(o).otherwise(a)}var u=o$q._metadataCache[s];e$2e(u)?u.then(o).otherwise(a):l()}A$n.prototype.isReady=function(){return!0},A$n.prototype.shouldDiscardImage=function(e){return A$n.EMPTY_IMAGE===e},Object.defineProperties(A$n,{EMPTY_IMAGE:{get:function(){return e$2e(e$h)||((e$h=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),e$h}}}),Object.defineProperties(o$q.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});var z$j=new h$18;function B$d(e,t,i,n,r){var o=e._imageUrlTemplate,a=e._imageUrlSubdomains,s=(t+i+n)%a.length;return e._resource.getDerivedResource({url:o,request:r,templateValues:{quadkey:o$q.tileXYToQuadKey(t,i,n),subdomain:a[s],culture:e._culture},queryParameters:{n:"z"}})}o$q.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$15("getTileCredits must not be called before the imagery provider is ready.");var n=this._tilingScheme.tileXYToRectangle(e,t,i,z$j);return O$g(this._attributionList,i,n)},o$q.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=e$i.loadImage(this,B$d(this,e,t,i,n));if(e$2e(r))return r.otherwise((function(e){return e$2e(e.blob)&&0===e.blob.size?A$n.EMPTY_IMAGE:o$1l.reject(e)}))},o$q.prototype.pickFeatures=function(e,t,i,n,r){},o$q.tileXYToQuadKey=function(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;0!=(e&o)&&(a|=1),0!=(t&o)&&(a|=2),n+=a}return n},o$q.quadKeyToTileXY=function(e){for(var t=0,i=0,n=e.length-1,r=n;r>=0;--r){var o=1<<r,a=+e[n-r];0!=(1&a)&&(t|=o),0!=(2&a)&&(i|=o)}return{x:t,y:i,level:n}},o$q._logoUrl=void 0,Object.defineProperties(o$q,{logoUrl:{get:function(){return e$2e(o$q._logoUrl)||(o$q._logoUrl=n$17("Assets/Images/bing_maps_credit.png")),o$q._logoUrl},set:function(e){o$1q.defined("value",e),o$q._logoUrl=e}}});var K$c=new h$18;function O$g(e,t,i){++t;for(var n=[],r=0,o=e.length;r<o;++r){for(var a=e[r],s=a.coverageAreas,l=!1,u=0,c=a.coverageAreas.length;!l&&u<c;++u){var h=s[u];if(t>=h.zoomMin&&t<=h.zoomMax)e$2e(h$18.intersection(i,h.bbox,K$c))&&(l=!0)}l&&n.push(a.credit)}return n}o$q._metadataCache={};var $$e="uniform sampler2D u_MainTex;\nuniform vec2 u_MainTex_TexelSize;\nuniform float u_Threshold;\nuniform float u_Params;\nvarying vec2 v_textureCoordinates;\nconst vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);\n#define inline\nvec4 DownsampleBox13Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\nvec4 A = texture2D(samplerTex, uv + texelSize * vec2(-1.0, -1.0));\nvec4 B = texture2D(samplerTex, uv + texelSize * vec2( 0.0, -1.0));\nvec4 C = texture2D(samplerTex, uv + texelSize * vec2( 1.0, -1.0));\nvec4 D = texture2D(samplerTex, uv + texelSize * vec2(-0.5, -0.5));\nvec4 E = texture2D(samplerTex, uv + texelSize * vec2( 0.5, -0.5));\nvec4 F = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 0.0));\nvec4 G = texture2D(samplerTex, uv );\nvec4 H = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 0.0));\nvec4 I = texture2D(samplerTex, uv + texelSize * vec2(-0.5, 0.5));\nvec4 J = texture2D(samplerTex, uv + texelSize * vec2( 0.5, 0.5));\nvec4 K = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 1.0));\nvec4 L = texture2D(samplerTex, uv + texelSize * vec2( 0.0, 1.0));\nvec4 M = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 1.0));\nvec2 div = (1.0 / 4.0) * vec2(0.5, 0.125);\nvec4 o = (D + E + I + J) * div.x;\no += (A + B + G + F) * div.y;\no += (B + C + H + G) * div.y;\no += (F + G + L + K) * div.y;\no += (G + H + M + L) * div.y;\nreturn o;\n}\nvec4 QuadraticThreshold(vec4 color, float threshold, vec3 curve)\n{\nfloat br = max(max(color.r, color.g), color.b);\nfloat rq = clamp(br - curve.x, 0.0, curve.y);\nrq = curve.z * rq * rq;\ncolor *= max(rq, br - threshold) / max(br, 1.0e-4);\nreturn color;\n}\nvec4 Prefilter(vec4 color, vec2 uv)\n{\nfloat br = max(max(color.r, color.g), color.b);\nif(br < u_Threshold)\n{\ncolor = vec4(0.0);\n}\nreturn color;\n}\nvec4 SafeHDR(vec4 c)\n{\nreturn min(c, 65504.0);\n}\nvoid main()\n{\nvec4 color = DownsampleBox13Tap(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy);\ngl_FragColor = Prefilter(SafeHDR(color), v_textureCoordinates);\n}\n",tt$5="uniform sampler2D u_MainTex;\nuniform vec2 u_MainTex_TexelSize;\nvarying vec2 v_textureCoordinates;\n#define inline\nvec4 DownsampleBox13Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\nvec4 A = texture2D(samplerTex, uv + texelSize * vec2(-1.0, -1.0));\nvec4 B = texture2D(samplerTex, uv + texelSize * vec2( 0.0, -1.0));\nvec4 C = texture2D(samplerTex, uv + texelSize * vec2( 1.0, -1.0));\nvec4 D = texture2D(samplerTex, uv + texelSize * vec2(-0.5, -0.5));\nvec4 E = texture2D(samplerTex, uv + texelSize * vec2( 0.5, -0.5));\nvec4 F = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 0.0));\nvec4 G = texture2D(samplerTex, uv );\nvec4 H = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 0.0));\nvec4 I = texture2D(samplerTex, uv + texelSize * vec2(-0.5, 0.5));\nvec4 J = texture2D(samplerTex, uv + texelSize * vec2( 0.5, 0.5));\nvec4 K = texture2D(samplerTex, uv + texelSize * vec2(-1.0, 1.0));\nvec4 L = texture2D(samplerTex, uv + texelSize * vec2( 0.0, 1.0));\nvec4 M = texture2D(samplerTex, uv + texelSize * vec2( 1.0, 1.0));\nvec2 div = (1.0 / 4.0) * vec2(0.5, 0.125);\nvec4 o = (D + E + I + J) * div.x;\no += (A + B + G + F) * div.y;\no += (B + C + H + G) * div.y;\no += (F + G + L + K) * div.y;\no += (G + H + M + L) * div.y;\nreturn o;\n}\n#define inline\nvec4 DownsampleBox4Tap(sampler2D samplerTex, vec2 uv, vec2 texelSize)\n{\nvec4 d = texelSize.xyxy * vec4(-1.0, -1.0, 1.0, 1.0);\nvec4 s;\ns = texture2D(samplerTex, uv + d.xy);\ns += texture2D(samplerTex, uv + d.zy);\ns += texture2D(samplerTex, uv + d.xw);\ns += texture2D(samplerTex, uv + d.zw);\nreturn s * (1.0 / 4.0);\n}\nvoid main()\n{\nvec4 color = DownsampleBox13Tap(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy);\ngl_FragColor = color;\n}\n",et$6="uniform sampler2D u_MainTex;\nuniform sampler2D u_BloomTex;\nuniform vec2 u_MainTex_TexelSize;\nuniform float u_SampleScale;\nvarying vec2 v_textureCoordinates;\nvec4 Combine(vec4 bloom, vec2 uv)\n{\nvec4 color = texture2D(u_BloomTex, uv);\nreturn bloom + color;\n}\n#define inline\nvec4 UpsampleTent(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\nvec4 d = texelSize.xyxy * vec4(1.0, 1.0, -1.0, 0.0) * sampleScale;\nvec4 s;\ns = texture2D(samplerTex, uv - d.xy);\ns += texture2D(samplerTex, uv - d.wy) * 2.0;\ns += texture2D(samplerTex, uv - d.zy);\ns += texture2D(samplerTex, uv + d.zw) * 2.0;\ns += texture2D(samplerTex, uv ) * 4.0;\ns += texture2D(samplerTex, uv + d.xw) * 2.0;\ns += texture2D(samplerTex, uv + d.zy);\ns += texture2D(samplerTex, uv + d.wy) * 2.0;\ns += texture2D(samplerTex, uv + d.xy);\nreturn s * (1.0 / 16.0);\n}\nvec4 UpsampleBox(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\nvec4 d = texelSize.xyxy * vec4(-1.0, -1.0, 1.0, 1.0) * (sampleScale * 0.5);\nvec4 s;\ns = texture2D(samplerTex, uv + d.xy);\ns += texture2D(samplerTex, uv + d.zy);\ns += texture2D(samplerTex, uv + d.xw);\ns += texture2D(samplerTex, uv + d.zw);\nreturn s * (1.0 / 4.0);\n}\nvoid main()\n{\nvec4 bloom = UpsampleTent(u_MainTex, v_textureCoordinates, u_MainTex_TexelSize.xy, vec4(u_SampleScale));\ngl_FragColor = Combine(bloom, v_textureCoordinates);\n}\n",E$j=16;function e$g(){this._fbo=void 0,this._downSamplePassState=new n$$,this._upSamplePassState=new n$$,this._show=!1,this._context=void 0,this.anamorphicRatio=0,this.diffusion=7,this._iterations=0,this._sampleScale=1,this._dirtTileOffset=new e$2c(1,1,0,0),this._shaderSettings=new o$1p,this._bloomColor=new o$1p(1,1,1),this._threshold=0,this._softKnee=.5,this._clamp=65472,this._params=1,this._intensity=1.34,this._dirtIntensity=0,this._dirtTexUrl=n$17("Assets/Textures/NoiseAndGrain.png"),this._dirtTexture=void 0,this._lastUpFBO=void 0,this._Pyramid=[];for(var e=0;e<E$j;e++){this._Pyramid.push({})}this._clearCommand=new t$W({color:new e$1X})}Object.defineProperties(e$g.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(e$2e(this._owner)&&this._owner.bloomShowChange(e),this._show=e)}},bloomIntensity:{get:function(){return this._intensity},set:function(e){this._intensity=e}},bloomDirtTexIntensity:{get:function(){return this._dirtIntensity},set:function(e){this._dirtIntensity=e}},threshold:{get:function(){return this._threshold},set:function(e){this._threshold=e}}}),e$g.prototype.clear=function(e,t){for(var i=0;i<this._iterations;i++){var n=this._clearCommand;n.framebuffer=this._Pyramid[i].downSampleFBO,e$1X.clone(u$Z(t,e$1X.BLACK),n.color),n.execute(e),n.framebuffer=this._Pyramid[i].upSampleFBO,e$1X.clone(u$Z(t,e$1X.BLACK),n.color),n.execute(e)}};var h$k=new o$1o;e$g.prototype.execute=function(e,t){var i=this,n=this._fbo;e$2e(this._context)&&this._context.numPostEffectFilterObject>0&&(n=this._scene._postEffectFilterFramebuffer.renderTexture._fb);for(var r=0;r<this._iterations;r++){var o=this._Pyramid[r].downCommand;h$k.x=1/n.getColorTexture(0).width,h$k.y=1/n.getColorTexture(0).height,o.uniformMap.u_MainTex=function(){return n.getColorTexture(0)},o.uniformMap.u_MainTex_TexelSize=function(){return h$k},o.uniformMap.u_Threshold=function(){return i._threshold},o.uniformMap.u_Params=function(){return i._params},o.execute(e,this._downSamplePassState),n=this._Pyramid[r].downSampleFBO}var a=this._Pyramid[this._iterations-1].downSampleFBO;for(r=this._iterations-2;r>=0;r--){var s=this._Pyramid[r].downSampleFBO,l=this._Pyramid[r].upSampleFBO,u=this._Pyramid[r].upCommand;h$k.x=1/a.getColorTexture(0).width,h$k.y=1/a.getColorTexture(0).height,u.uniformMap.u_BloomTex=function(){return s.getColorTexture(0)},u.uniformMap.u_MainTex=function(){return a.getColorTexture(0)},u.uniformMap.u_MainTex_TexelSize=function(){return h$k},u.uniformMap.u_SampleScale=function(){return i._sampleScale},u.execute(e,this._downSamplePassState),a=l}this._lastUpFBO=a};var rt$7=new f$1a;e$g.prototype.update=function(e,t,i){this._context=t.context,this._downSamplePassState.context=t.context,this._upSamplePassState.context=t.context,this._scene=i;var n=e.drawingBufferWidth,r=e.drawingBufferHeight,o=this;e$2e(this._dirtTexture)||o$1l(t$S(o._dirtTexUrl),(function(t){o._dirtTexture=new t$U({context:e,source:t,pixelFormat:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE})}));var a=e$2d.clamp(this.anamorphicRatio,-1,1),s=a<0?-a:0,l=a>0?a:0,u=Math.floor(n/(2-s)),c=Math.floor(r/(2-l)),h=Math.max(u,c),d=Math.log(h)/Math.log(2)+Math.min(this.diffusion,10)-10,f=Math.floor(d),p=e$2d.clamp(f,1,E$j),_=!1;p!=this._iterations&&(this._iterations=p,_=!0),this._sampleScale=.5+d-f;var m=1;e$2e(this._dirtTexture)&&(m=this._dirtTexture.width/this._dirtTexture.height);var g=e.drawingBufferWidth/e.drawingBufferHeight;m>g?(this._dirtTileOffset.x=g/m,this._dirtTileOffset.z=.5*(1-this._dirtTileOffset.x)):g>m&&(this._dirtTileOffset.y=m/g,this._dirtTileOffset.w=.5*(1-this._dirtTileOffset.y));var x=Math.exp(this._intensity/10*.6931471805599453)-1;this._shaderSettings.x=this._sampleScale,this._shaderSettings.y=x,this._shaderSettings.z=this._dirtIntensity;var y=this._Pyramid[0].downSampleFBO,v=e$2e(y)&&y.getColorTexture(0)||void 0;if(!e$2e(v)||v.width!==u||v.height!==c||_){this.destroyFBO();for(var $=0;$<this._iterations;$++){var b,T={};b=0==$?e.createViewportQuadCommand($$e,{shaderProgramName:"BloomPrefilter",uniformMap:T,owner:this}):e.createViewportQuadCommand(tt$5,{shaderProgramName:"BloomDownsample",uniformMap:T,owner:this});var C=e.createViewportQuadCommand(et$6,{shaderProgramName:"BloomUpsample",uniformMap:T,owner:this});this._Pyramid[$].downCommand=b,this._Pyramid[$].upCommand=C;var S=rt$7;S.width=u,S.height=c;var w=d$1m.fromCache({viewport:S});b.renderState=w,C.renderState=w;var E=e.colorBufferHalfFloat?_$_.HALF_FLOAT:_$_.FLOAT,P=new t$V({context:e,colorTextures:[new t$U({context:e,width:u,height:c,pixelDatatype:E})]}),A=new t$V({context:e,colorTextures:[new t$U({context:e,width:u,height:c,pixelDatatype:E})]});this._Pyramid[$].downSampleFBO=P,this._Pyramid[$].upSampleFBO=A,b.framebuffer=P,C.framebuffer=A,u/=2,u=Math.max(u,1),c=Math.max(c/2,1)}}},e$g.prototype.gammaToLinearSpace=function(e){return e*(e*(.305306011*e+.682171111)+.012522878)},e$g.prototype.setInputFBO=function(e){this._fbo=e},e$g.prototype.getBloomTexture=function(){return this._lastUpFBO.getColorTexture(0)},e$g.prototype.getBloomDirtTexture=function(){return e$2e(this._dirtTexture)?this._dirtTexture:this._context.defaultTexture},e$g.prototype.getBloomTextureTexelSize=function(){return h$k.x=1/this._lastUpFBO.getColorTexture(0).width,h$k.y=1/this._lastUpFBO.getColorTexture(0).height,h$k},e$g.prototype.getDirtTileOffset=function(){return this._dirtTileOffset},e$g.prototype.getBloomSettings=function(){return this._shaderSettings},e$g.prototype.getBloomColor=function(){return this._bloomColor},e$g.prototype.isDestroyed=function(){return!1},e$g.prototype.destroyFBO=function(){for(var e=0;e<this._iterations;e++)if(e$2e(this._Pyramid[e].downSampleFBO)){var t=this._Pyramid[e].downSampleFBO,i=this._Pyramid[e].upSampleFBO;t.destroy(),i.destroy()}},e$g.prototype.destroy=function(){this.destroyFBO();for(var e=0;e<this._iterations;e++){var t=this._Pyramid[e].downCommand,i=this._Pyramid[e].upCommand;t.shaderProgram.destroy(),i.shaderProgram.destroy()}return i$11(this)};var w$j="varying vec2 v_textureCoordinates;\nconst float M_PI = 3.141592653589793;\nfloat vdcRadicalInverse(int i)\n{\nfloat r;\nfloat base = 2.0;\nfloat value = 0.0;\nfloat invBase = 1.0 / base;\nfloat invBi = invBase;\nfor (int x = 0; x < 100; x++)\n{\nif (i <= 0)\n{\nbreak;\n}\nr = mod(float(i), base);\nvalue += r * invBi;\ninvBi *= invBase;\ni = int(float(i) * invBase);\n}\nreturn value;\n}\nvec2 hammersley2D(int i, int N)\n{\nreturn vec2(float(i) / float(N), vdcRadicalInverse(i));\n}\nvec3 importanceSampleGGX(vec2 xi, float roughness, vec3 N)\n{\nfloat a = roughness * roughness;\nfloat phi = 2.0 * M_PI * xi.x;\nfloat cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\nfloat sinTheta = sqrt(1.0 - cosTheta * cosTheta);\nvec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\nvec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\nvec3 tangentX = normalize(cross(upVector, N));\nvec3 tangentY = cross(N, tangentX);\nreturn tangentX * H.x + tangentY * H.y + N * H.z;\n}\nfloat G1_Smith(float NdotV, float k)\n{\nreturn NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat G_Smith(float roughness, float NdotV, float NdotL)\n{\nfloat k = roughness * roughness / 2.0;\nreturn G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\nvec2 integrateBrdf(float roughness, float NdotV)\n{\nvec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\nfloat A = 0.0;\nfloat B = 0.0;\nconst int NumSamples = 1024;\nfor (int i = 0; i < NumSamples; i++)\n{\nvec2 xi = hammersley2D(i, NumSamples);\nvec3 H = importanceSampleGGX(xi, roughness, vec3(0.0, 0.0, 1.0));\nvec3 L = 2.0 * dot(V, H) * H - V;\nfloat NdotL = clamp(L.z, 0.0, 1.0);\nfloat NdotH = clamp(H.z, 0.0, 1.0);\nfloat VdotH = clamp(dot(V, H), 0.0, 1.0);\nif (NdotL > 0.0)\n{\nfloat G = G_Smith(roughness, NdotV, NdotL);\nfloat G_Vis = G * VdotH / (NdotH * NdotV);\nfloat Fc = pow(1.0 - VdotH, 5.0);\nA += (1.0 - Fc) * G_Vis;\nB += Fc * G_Vis;\n}\n}\nreturn vec2(A, B) / float(NumSamples);\n}\nvoid main()\n{\ngl_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n",x$m="varying v_textureCoordinates : vec2<f32>;\nconst M_PI = 3.141592653589793;\n\nfn vdcRadicalInverse(inputI : i32) -> f32\n{\n var i = inputI;\n var r : f32;\n var base = 2.0;\n var value = 0.0;\n var invBase = 1.0 / base;\n var invBi = invBase;\n for (var x = 0; x < 100; x++)\n {\n if (i <= 0)\n {\n break;\n }\n r = (f32(i) - (base * floor((f32(i) / base))));\n //r = mod(f32(i), base);\n value += r * invBi;\n invBi *= invBase;\n i = i32(f32(i) * invBase);\n }\n return value;\n}\n\nfn hammersley2D(i : i32, N : i32) -> vec2<f32>\n{\n return vec2(f32(i) / f32(N), vdcRadicalInverse(i));\n}\n\nfn importanceSampleGGX(xi : vec2<f32>, roughness : f32, N : vec3<f32>) -> vec3<f32>\n{\n var a = roughness * roughness;\n var phi = 2.0 * M_PI * xi.x;\n var cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\n var sinTheta = sqrt(1.0 - cosTheta * cosTheta);\n var H = vec3<f32>(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\n var upVector : vec3<f32>;\n if(abs(N.z) < 0.999){\n upVector = vec3<f32>(0.0, 0.0, 1.0);\n }\n else{\n upVector = vec3<f32>(1.0, 0.0, 0.0);\n }\n var tangentX = normalize(cross(upVector, N));\n var tangentY = cross(N, tangentX);\n return tangentX * H.x + tangentY * H.y + N * H.z;\n}\n\nfn G1_Smith(NdotV : f32, k : f32) -> f32\n{\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\nfn G_Smith(roughness : f32, NdotV : f32, NdotL : f32) -> f32\n{\n var k = roughness * roughness / 2.0;\n return G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\n\nfn integrateBrdf(roughness : f32, NdotV : f32) -> vec2<f32>\n{\n var V = vec3<f32>(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\n var A = 0.0;\n var B = 0.0;\n const NumSamples = 1024;\n for (var i = 0; i < NumSamples; i++)\n {\n var xi = hammersley2D(i, NumSamples);\n var H = importanceSampleGGX(xi, roughness, vec3<f32>(0.0, 0.0, 1.0));\n var L = 2.0 * dot(V, H) * H - V;\n var NdotL = clamp(L.z, 0.0, 1.0);\n var NdotH = clamp(H.z, 0.0, 1.0);\n var VdotH = clamp(dot(V, H), 0.0, 1.0);\n if (NdotL > 0.0)\n {\n var G = G_Smith(roughness, NdotV, NdotL);\n var G_Vis = G * VdotH / (NdotH * NdotV);\n var Fc = pow(1.0 - VdotH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n return vec2<f32>(A, B) / f32(NumSamples);\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n gl_FragColor = vec4<f32>(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n";function t$c(){this._framebuffer=void 0,this._colorTexture=void 0,this._drawCommand=void 0}function b$p(e,t){var i=e._framebuffer,n=t.webgpu?x$m:w$j,r=t.createViewportQuadCommand(n,{framebuffer:i,renderState:d$1m.fromCache({viewport:new f$1a(0,0,256,256)}),shaderProgramName:"BrdfLut",useWGSL:t.webgpu});e._drawCommand=r}function y$k(e,t){var i=new t$U({context:t,width:256,height:256,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})});e._colorTexture=i;var n=new t$V({context:t,colorTextures:[i],destroyAttachments:!1});e._framebuffer=n}Object.defineProperties(t$c.prototype,{colorTexture:{get:function(){return this._colorTexture}}}),t$c.prototype.update=function(e){if(!e$2e(this._colorTexture)){var t=e.context;y$k(this,t),b$p(this,t),this._drawCommand.execute(t),this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}},t$c.prototype.isDestroyed=function(){return!1},t$c.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),i$11(this)};var e$f={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4},Q$d=Object.freeze(e$f);function d$p(e,t){var i=e;return e$2e(t)&&(i+="+"+t),i}function S$g(e,t){o$1o.clone(e.distance.startPosition,t.distance.startPosition),o$1o.clone(e.distance.endPosition,t.distance.endPosition),o$1o.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),o$1o.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function A$m(e,t,i){var n=d$p(Q$d.PINCH,t),r=e._update,o=e._isDown,a=e._eventStartPosition,s=e._pressTime,l=e._releaseTime;r[n]=!0,o[n]=!1,a[n]=new o$1o;var u=e._movement[n];e$2e(u)||(u=e._movement[n]={}),u.distance={startPosition:new o$1o,endPosition:new o$1o},u.angleAndHeight={startPosition:new o$1o,endPosition:new o$1o},u.prevAngle=0,e._eventHandler.setInputAction((function(t){e._buttonsDown++,o[n]=!0,s[n]=new Date,o$1o.lerp(t.position1,t.position2,.5,a[n])}),G$J.PINCH_START,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),o[n]=!1,l[n]=new Date}),G$J.PINCH_END,t),e._eventHandler.setInputAction((function(e){if(o[n]){r[n]?(S$g(e,u),r[n]=!1,u.prevAngle=u.angleAndHeight.startPosition.x):(o$1o.clone(e.distance.endPosition,u.distance.endPosition),o$1o.clone(e.angleAndHeight.endPosition,u.angleAndHeight.endPosition));for(var t=u.angleAndHeight.endPosition.x,a=u.prevAngle,s=2*Math.PI;t>=a+Math.PI;)t-=s;for(;t<a-Math.PI;)t+=s;u.angleAndHeight.endPosition.x=-t*i.clientWidth/12,u.angleAndHeight.startPosition.x=-a*i.clientWidth/12}}),G$J.PINCH_MOVE,t)}function M$k(e,t){var i=d$p(Q$d.WHEEL,t),n=e._update;n[i]=!0;var r=e._movement[i];e$2e(r)||(r=e._movement[i]={}),r.startPosition=new o$1o,r.endPosition=new o$1o,e._eventHandler.setInputAction((function(e){var t=15*e$2d.toRadians(e);n[i]?(o$1o.clone(o$1o.ZERO,r.startPosition),r.endPosition.x=0,r.endPosition.y=t,n[i]=!1):r.endPosition.y=r.endPosition.y+t}),G$J.WHEEL,t)}function H$p(e,t,i){var n=d$p(i,t),r=e._isDown,o=e._eventStartPosition,a=e._pressTime,s=e._releaseTime;r[n]=!1,o[n]=new o$1o;var l,u,c=e._lastMovement[n];e$2e(c)||(c=e._lastMovement[n]={startPosition:new o$1o,endPosition:new o$1o,valid:!1}),i===Q$d.LEFT_DRAG?(l=G$J.LEFT_DOWN,u=G$J.LEFT_UP):i===Q$d.RIGHT_DRAG?(l=G$J.RIGHT_DOWN,u=G$J.RIGHT_UP):i===Q$d.MIDDLE_DRAG&&(l=G$J.MIDDLE_DOWN,u=G$J.MIDDLE_UP),e._eventHandler.setInputAction((function(t){e._buttonsDown++,c.valid=!1,r[n]=!0,a[n]=new Date,o$1o.clone(t.position,o[n])}),l,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[n]=!1,s[n]=new Date}),u,t)}function T$k(e,t){o$1o.clone(e.startPosition,t.startPosition),o$1o.clone(e.endPosition,t.endPosition)}function y$j(e,t){var i=e._update,n=e._movement,r=e._lastMovement,o=e._isDown;for(var a in Q$d)if(Q$d.hasOwnProperty(a)){var s=Q$d[a];if(e$2e(s)){var l=d$p(s,t);i[l]=!0,e$2e(e._lastMovement[l])||(e._lastMovement[l]={startPosition:new o$1o,endPosition:new o$1o,valid:!1}),e$2e(e._movement[l])||(e._movement[l]={startPosition:new o$1o,endPosition:new o$1o})}}e._eventHandler.setInputAction((function(a){for(var s in Q$d)if(Q$d.hasOwnProperty(s)){var l=Q$d[s];if(e$2e(l)){var u=d$p(l,t);o[u]&&(i[u]?(T$k(n[u],r[u]),r[u].valid=!0,T$k(a,n[u]),i[u]=!1):o$1o.clone(a.endPosition,n[u].endPosition))}}o$1o.clone(a.endPosition,e._currentMousePosition)}),G$J.MOUSE_MOVE,t)}function L$l(e){switch(e){case"W".charCodeAt(0):return"moveForward";case"S".charCodeAt(0):return"moveBackward";case"D".charCodeAt(0):return"moveRight";case"A".charCodeAt(0):return"moveLeft";default:return}}function G$k(e){document.addEventListener("keydown",(function(t){var i=L$l(t.keyCode);typeof i<"u"&&(e._flags[i]=!0)}),!1)}function W$k(e){document.addEventListener("keyup",(function(t){var i=L$l(t.keyCode);typeof i<"u"&&(e._flags[i]=!1)}),!1)}function l$l(e){if(!e$2e(e))throw new t$15("canvas is required.");for(var t in this._eventHandler=new g$K(e,!0),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new o$1o,M$k(this,void 0),A$m(this,void 0,e),H$p(this,void 0,Q$d.LEFT_DRAG),H$p(this,void 0,Q$d.RIGHT_DRAG),H$p(this,void 0,Q$d.MIDDLE_DRAG),y$j(this,void 0),Aa$1)if(Aa$1.hasOwnProperty(t)){var i=Aa$1[t];e$2e(i)&&(M$k(this,i),A$m(this,i,e),H$p(this,i,Q$d.LEFT_DRAG),H$p(this,i,Q$d.RIGHT_DRAG),H$p(this,i,Q$d.MIDDLE_DRAG),y$j(this,i))}this._flags={looking:!1,moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1},G$k(this),W$k(this)}function r$n(e,t,i,n,r){this.featurePropertiesDirty=!1}function a$g(e){o$1q.typeOf.object("options",e),o$1q.typeOf.number("options.pass",e.pass),this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}function h$j(){}Object.defineProperties(l$l.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){var e=!(this._update[d$p(Q$d.WHEEL)]&&this._update[d$p(Q$d.WHEEL,Aa$1.SHIFT)]&&this._update[d$p(Q$d.WHEEL,Aa$1.CTRL)]&&this._update[d$p(Q$d.WHEEL,Aa$1.ALT)]);return this._buttonsDown>0||e}}}),l$l.prototype.isMoving=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=d$p(e,t);return!this._update[i]},l$l.prototype.getMovement=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=d$p(e,t);return this._movement[i]},l$l.prototype.getLastMovement=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=d$p(e,t),n=this._lastMovement[i];if(n.valid)return n},l$l.prototype.isButtonDown=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=d$p(e,t);return this._isDown[i]},l$l.prototype.getStartMousePosition=function(e,t){if(!e$2e(e))throw new t$15("type is required.");if(e===Q$d.WHEEL)return this._currentMousePosition;var i=d$p(e,t);return this._eventStartPosition[i]},l$l.prototype.getButtonPressTime=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=d$p(e,t);return this._pressTime[i]},l$l.prototype.getButtonReleaseTime=function(e,t){if(!e$2e(e))throw new t$15("type is required.");var i=d$p(e,t);return this._releaseTime[i]},l$l.prototype.reset=function(){for(var e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)},l$l.prototype.isDestroyed=function(){return!1},l$l.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),i$11(this)},Object.defineProperties(r$n.prototype,{featuresLength:{get:function(){t$15.throwInstantiationError()}},pointsLength:{get:function(){t$15.throwInstantiationError()}},trianglesLength:{get:function(){t$15.throwInstantiationError()}},geometryByteLength:{get:function(){t$15.throwInstantiationError()}},texturesByteLength:{get:function(){t$15.throwInstantiationError()}},batchTableByteLength:{get:function(){t$15.throwInstantiationError()}},innerContents:{get:function(){t$15.throwInstantiationError()}},readyPromise:{get:function(){t$15.throwInstantiationError()}},tileset:{get:function(){t$15.throwInstantiationError()}},tile:{get:function(){t$15.throwInstantiationError()}},url:{get:function(){t$15.throwInstantiationError()}},batchTable:{get:function(){t$15.throwInstantiationError()}}}),r$n.prototype.hasProperty=function(e,t){t$15.throwInstantiationError()},r$n.prototype.getFeature=function(e){t$15.throwInstantiationError()},r$n.prototype.applyDebugSettings=function(e,t){t$15.throwInstantiationError()},r$n.prototype.applyStyle=function(e){t$15.throwInstantiationError()},r$n.prototype.update=function(e,t){t$15.throwInstantiationError()},r$n.prototype.isDestroyed=function(){t$15.throwInstantiationError()},r$n.prototype.destroy=function(){t$15.throwInstantiationError()};var o$p={stack:new r$S,stackMaximumLength:0};function d$o(e){return e._visible&&e._inRequestVolume}function m$j(e){return e.hasEmptyContent||e.hasTilesetContent}function v$i(e){return!m$j(e)&&e.contentUnloaded}function T$j(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:(t.hasEmptyContent,!0))}function g$q(e,t,i,n){for(var r=t.children,o=r.length,a=0;a<o;++a){var s=r[a];s.updateVisibility(n),d$o(s)&&i.push(s)}}function y$i(e,t){(v$i(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function C$j(e,t){e._cache.touch(t)}function x$l(e){++e.statistics.visited}function _$i(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==Ae$w.OUTSIDE&&e._selectedTiles.push(t)}function u$h(e,t){this._conditionsExpression=l$1f(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,g$p(this,t)}function l$k(e,t){this.condition=e,this.expression=t}function g$p(e,t){var i=[],n=e._conditions;if(e$2e(n)){for(var r=n.length,o=0;o<r;++o){var a=n[o],s=String(a[0]),l=String(a[1]);i.push(new l$k(new L$E(s,t),new L$E(l,t)))}e._runtimeConditions=i}}function d$n(e){var t;(this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._pbrMaterialIndex=void 0,this._meta=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,"string"==typeof e||e instanceof t$10)?t=t$10.createIfNeeded(e).fetchJson(e):t=o$1l.resolve(e);var i=this;this._readyPromise=t.then((function(e){return m$i(i,e),i}))}function m$i(e,t){t=u$Z(l$1f(t,!0),e._style),e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin,e.pbrMaterialIndex=t.pbrMaterialIndex;var i={};if(e$2e(t.meta)){var n=t.defines,r=u$Z(t.meta,u$Z.EMPTY_OBJECT);for(var o in r)r.hasOwnProperty(o)&&(i[o]=new L$E(r[o],n))}e._meta=i,e._ready=!0}function n$h(e,t){var i=u$Z(e._style,u$Z.EMPTY_OBJECT).defines;if(e$2e(t))return"boolean"==typeof t||"number"==typeof t?new L$E(String(t)):"string"==typeof t?new L$E(t,i):e$2e(t.conditions)?new u$h(t,i):t}function r$m(e){if(e$2e(e))return e$2e(e.expression)?e.expression:e$2e(e.conditionsExpression)?l$1f(e.conditionsExpression,!0):e}function D$g(e){if(!e$2e((e=u$Z(e,{})).url))throw new t$15("options.url is required.");this._baseUrl=e.url;var t=t$10.createIfNeeded(e.url);if(t.appendForwardSlash(),e$2e(e.token))t.setQueryParameters({token:e.token});else if(e$2e(a$O.CREDENTIAL))if(e$2e(a$O.CREDENTIAL._keymap[this._baseUrl])){var i=a$O.CREDENTIAL._keymap[this._baseUrl].type,n=a$O.CREDENTIAL._keymap[this._baseUrl].value,r='{"tokenName": "value"}'.replace("tokenName",i).replace("value",n),o=JSON.parse(r);t.setQueryParameters(o)}else{(r={})[a$O.CREDENTIAL.name]=a$O.CREDENTIAL.value,t.setQueryParameters(r)}this._resource=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=u$Z(e.tilingScheme,new m$M({ellipsoid:e.ellipsoid})),this._tilingSchemeCustomized=e$2e(e.tilingScheme),this._useTiles=u$Z(e.usePreCachedTilesIfAvailable,!0),this._rectangle=u$Z(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers,this._zoomOffset=e.zoomOffset,this._coordUnit="DEGREE",this._beginLevel=u$Z(e.beginLevel,0);var a=e.credit;"string"==typeof a&&(a=new r$U(a)),this._credit=a,this.enablePickFeatures=u$Z(e.enablePickFeatures,!0),this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var s,l=this,u=e.url;function c(t){l._tilingScheme instanceof m$M&&"esriMeters"===t.units&&(l._coordUnit="METER");var i=t.tileInfo;if(l.wkid=t.spatialReference.wkid,l._tilingSchemeCustomized&&l._tilingScheme instanceof m$M&&e$2e(i)&&(l._tilingScheme=new m$M({tileInfo:{origin:{x:i.origin.x,y:i.origin.y},cols:i.cols,rows:i.rows},resolutions:i.lods.map((function(e){return e.resolution})),dataBounds:{west:t.fullExtent.xmin,south:t.fullExtent.ymin,east:t.fullExtent.xmax,north:t.fullExtent.ymax}})),e$2e(i)){if(l._tileWidth=i.rows,l._tileHeight=i.cols,!l._tilingSchemeCustomized||!e$2e(l.wkid))if(102100===i.spatialReference.wkid||102113===i.spatialReference.wkid)l._tilingScheme=new c$S({ellipsoid:e.ellipsoid});else if(4326===t.tileInfo.spatialReference.wkid)l._tilingScheme=new m$M({ellipsoid:e.ellipsoid});else if(4490===t.tileInfo.spatialReference.wkid){if(e$2e(e.suggest)&&e.suggest){var n=Math.ceil((t.fullExtent.xmax-t.fullExtent.xmin)/(t.tileInfo.lods[0].resolution*t.tileInfo.cols)),r=Math.ceil((t.fullExtent.ymax-t.fullExtent.ymin)/(t.tileInfo.lods[0].resolution*t.tileInfo.rows));l._tilingScheme=new m$M({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo,rectangle:new h$18(e$2d.toRadians(t.fullExtent.xmin),e$2d.toRadians(t.fullExtent.ymin),e$2d.toRadians(t.fullExtent.xmax),e$2d.toRadians(t.fullExtent.ymax)),origin:new o$1o(e$2d.toRadians(t.tileInfo.origin.x),e$2d.toRadians(t.tileInfo.origin.y)),numberOfLevelZeroTilesX:n,numberOfLevelZeroTilesY:r}),l._tilingScheme._suggest=!0}else l._tilingScheme=new m$M({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo});l._tilingScheme._beginLevel=l._beginLevel}else{var o=[];if(e$2e(i.lods))for(var a=0;a<i.lods.length;a++)o.push(i.lods[a].resolution);l._tilingScheme=new m$M({ellipsoid:e.ellipsoid,tileInfo:t.tileInfo,origin:new o$1o(t.tileInfo.origin.x,t.tileInfo.origin.y),dataBounds:new h$18(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax),resolutions:o}),l._rectangle=new h$18(t.fullExtent.xmin/6378137,t.fullExtent.ymin/6378137,t.fullExtent.xmax/6378137,t.fullExtent.ymax/6378137)}if(l._zoomOffset?l._maximumLevel=20:l._maximumLevel=t.tileInfo.lods.length-1,e$2e(l._tilingScheme._resolutions)&&(l._minimumLevel=l._tilingScheme._beginLevel,l._maximumLevel=l._minimumLevel+l._tilingScheme._resolutions.length-1),e$2e(t.fullExtent)){if(e$2e(t.fullExtent.spatialReference)&&e$2e(t.fullExtent.spatialReference.wkid))if(102100===t.fullExtent.spatialReference.wkid||102113===t.fullExtent.spatialReference.wkid){var u=new t$N,c=t.fullExtent,h=u.unproject(new o$1p(Math.max(c.xmin,-l._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(c.ymin,-l._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),f=u.unproject(new o$1p(Math.min(c.xmax,l._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(c.ymax,l._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));l._rectangle=new h$18(h.longitude,h.latitude,f.longitude,f.latitude)}else{if(4326!==t.fullExtent.spatialReference.wkid&&4490!==t.fullExtent.spatialReference.wkid){var p="fullExtent.spatialReference WKID "+t.fullExtent.spatialReference.wkid+" is not supported.";return void(s=l$V.handleError(s,l,l._errorEvent,p,void 0,void 0,void 0,d))}l._rectangle=h$18.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax)}}else l._rectangle=l._tilingScheme.rectangle;e$2e(l._tileDiscardPolicy)||(l._tileDiscardPolicy=new u$i({missingImageUrl:W$j(l,0,0,l._maximumLevel).url,pixelsToCheck:[new o$1o(0,0),new o$1o(200,20),new o$1o(20,200),new o$1o(80,110),new o$1o(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),l._useTiles=!0}else l._useTiles=!1;e$2e(t.copyrightText)&&t.copyrightText.length>0&&(l._credit=new r$U(t.copyrightText)),l._ready=!0,l._readyPromise.resolve(!0),l$V.handleSuccess(s)}function h(e){var t="An error occurred while accessing "+l._resource.url+".";s=l$V.handleError(s,l,l._errorEvent,t,void 0,void 0,void 0,d),l._readyPromise.reject(new t$13(t))}function d(){o$1l(l._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJson(),c,h)}l.tablename=e.url,new l$14({name:u}).then((function(e){e.checkObjectStoreExit(l.tablename)?l._indexedDBScheduler=e:e.createObjectStore(l.tablename).then((function(){l._indexedDBScheduler=e}))})),l._indexedDBSetting={isOpen:!1,clear:function(){l._indexedDBScheduler.clear(l.tablename)},cache:[]},this._useTiles?d():(this._ready=!0,this._readyPromise.resolve(!0))}function W$j(e,t,i,n,r){var o;if(e$2e(e._tilingScheme._resolutions)&&(n-=e._tilingScheme._beginLevel),e._useTiles)e.zoomOffset&&(n-=parseInt(e.zoomOffset)),o=e._resource.getDerivedResource({url:"tile/"+n+"/"+i+"/"+t,request:r});else{var a=e._tilingScheme.tileXYToNativeRectangle(t,i,n);if("METER"===e._coordUnit){var s=e._tilingScheme._projection._semimajorAxis;a.west=s*e$2d.toRadians(a.west),a.south=s*e$2d.toRadians(a.south),a.east=s*e$2d.toRadians(a.east),a.north=s*e$2d.toRadians(a.north)}var l={bbox:a.west+","+a.south+","+a.east+","+a.north,size:e._tileWidth+","+e._tileHeight,format:"png",transparent:!0,f:"image"};e.wkid&&(l.imageSR=l.bboxSR=e.wkid),e.layers&&(l.layers="show:"+e.layers),e.layerDefs&&(l.layerDefs=e.layerDefs),e.time&&(l.time=e.time),o=e._resource.getDerivedResource({url:"export",request:r,queryParameters:l})}return o||null}function Z$g(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function e$e(e){LicenseChecker.LICENSECHECKER.verify("CloudBox"),this._angle=0,this._speed=1,this._url=e.url,this._scene=void 0,this._ellipsoidGeometry=new b$O({radii:new o$1p(6578137,6578137,6578137),vertexFormat:t$h.vertexFormat}),this._cloudBall=new y$R({geometryInstances:new d$1o({geometry:this._ellipsoidGeometry,attributes:{distanceDisplayCondition:new t$A(2e6,Number.MAX_VALUE)}}),appearance:new t$h({material:new r$Y({fabric:{type:"Image",uniforms:{image:this._url,color:new e$1X(1,1,1,.99)}}}),aboveGround:!0})}),this._originalModelMatrix=p$1d.clone(this._cloudBall.modelMatrix)}function o$o(e){this._show=!1,this._brightness=1,this._contrast=1,this._saturation=1,this._hue=0,this.context=e}h$j.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e._hasMixedContent=!1;var i=!0,n=e.root;if(n.updateVisibility(t),!d$o(n))return i;var r=o$p.stack;for(r.push(e.root);r.length>0;){o$p.stackMaximumLength=Math.max(o$p.stackMaximumLength,r.length);var o=r.pop(),a=o.refine===f$E.ADD,s=o.refine===f$E.REPLACE,l=T$j(e,o);l&&g$q(e,o,r,t),(a||s&&!l)&&(y$i(e,o),_$i(e,o,t),!m$j(o)&&!o.contentAvailable&&(i=!1)),x$l(e),C$j(e,o)}return o$p.stack.trim(o$p.stackMaximumLength),i},Object.defineProperties(u$h.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}}),u$h.prototype.evaluate=function(e,t){var i=this._runtimeConditions;if(e$2e(i))for(var n=i.length,r=0;r<n;++r){var o=i[r];if(o.condition.evaluate(e))return o.expression.evaluate(e,t)}},u$h.prototype.evaluateColor=function(e,t){var i=this._runtimeConditions;if(e$2e(i))for(var n=i.length,r=0;r<n;++r){var o=i[r];if(o.condition.evaluate(e))return o.expression.evaluateColor(e,t)}},u$h.prototype.getShaderFunction=function(e,t,i,n){var r=this._runtimeConditions;if(e$2e(r)&&0!==r.length){for(var o="",a=r.length,s=0;s<a;++s){var l=r[s];o+=" "+(0===s?"if":"else if")+" ("+l.condition.getShaderExpression(t,i)+") \n { \n return "+l.expression.getShaderExpression(t,i)+"; \n } \n"}return o=n+" "+e+"() \n{ \n"+o+" return "+n+"(1.0); \n} \n"}},Object.defineProperties(d$n.prototype,{style:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._style}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},show:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._show},set:function(e){this._show=n$h(this,e),this._style.show=r$m(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._color},set:function(e){this._color=n$h(this,e),this._style.color=r$m(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointSize},set:function(e){this._pointSize=n$h(this,e),this._style.pointSize=r$m(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointOutlineColor},set:function(e){this._pointOutlineColor=n$h(this,e),this._style.pointOutlineColor=r$m(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=n$h(this,e),this._style.pointOutlineWidth=r$m(this._pointOutlineWidth)}},labelColor:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelColor},set:function(e){this._labelColor=n$h(this,e),this._style.labelColor=r$m(this._labelColor)}},labelOutlineColor:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelOutlineColor},set:function(e){this._labelOutlineColor=n$h(this,e),this._style.labelOutlineColor=r$m(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=n$h(this,e),this._style.labelOutlineWidth=r$m(this._labelOutlineWidth)}},font:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._font},set:function(e){this._font=n$h(this,e),this._style.font=r$m(this._font)}},labelStyle:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelStyle},set:function(e){this._labelStyle=n$h(this,e),this._style.labelStyle=r$m(this._labelStyle)}},labelText:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelText},set:function(e){this._labelText=n$h(this,e),this._style.labelText=r$m(this._labelText)}},backgroundColor:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundColor},set:function(e){this._backgroundColor=n$h(this,e),this._style.backgroundColor=r$m(this._backgroundColor)}},backgroundPadding:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundPadding},set:function(e){this._backgroundPadding=n$h(this,e),this._style.backgroundPadding=r$m(this._backgroundPadding)}},backgroundEnabled:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._backgroundEnabled},set:function(e){this._backgroundEnabled=n$h(this,e),this._style.backgroundEnabled=r$m(this._backgroundEnabled)}},scaleByDistance:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._scaleByDistance},set:function(e){this._scaleByDistance=n$h(this,e),this._style.scaleByDistance=r$m(this._scaleByDistance)}},translucencyByDistance:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._translucencyByDistance},set:function(e){this._translucencyByDistance=n$h(this,e),this._style.translucencyByDistance=r$m(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=n$h(this,e),this._style.distanceDisplayCondition=r$m(this._distanceDisplayCondition)}},heightOffset:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._heightOffset},set:function(e){this._heightOffset=n$h(this,e),this._style.heightOffset=r$m(this._heightOffset)}},anchorLineEnabled:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=n$h(this,e),this._style.anchorLineEnabled=r$m(this._anchorLineEnabled)}},anchorLineColor:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._anchorLineColor},set:function(e){this._anchorLineColor=n$h(this,e),this._style.anchorLineColor=r$m(this._anchorLineColor)}},image:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._image},set:function(e){this._image=n$h(this,e),this._style.image=r$m(this._image)}},disableDepthTestDistance:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=n$h(this,e),this._style.disableDepthTestDistance=r$m(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._horizontalOrigin},set:function(e){this._horizontalOrigin=n$h(this,e),this._style.horizontalOrigin=r$m(this._horizontalOrigin)}},verticalOrigin:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._verticalOrigin},set:function(e){this._verticalOrigin=n$h(this,e),this._style.verticalOrigin=r$m(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=n$h(this,e),this._style.labelHorizontalOrigin=r$m(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=n$h(this,e),this._style.labelVerticalOrigin=r$m(this._labelVerticalOrigin)}},pbrMaterialIndex:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._pbrMaterialIndex},set:function(e){this._pbrMaterialIndex=n$h(this,e),this._style.pbrMaterialIndex=r$m(this._pbrMaterialIndex)}},meta:{get:function(){if(!this._ready)throw new t$15("The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.");return this._meta},set:function(e){this._meta=e}}}),d$n.prototype.getColorShaderFunction=function(e,t,i){return this._colorShaderFunctionReady?(i.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,this._colorShaderFunction=e$2e(this.color)?this.color.getShaderFunction(e,t,i,"vec4"):void 0,this._colorShaderTranslucent=i.translucent,this._colorShaderFunction)},d$n.prototype.getShowShaderFunction=function(e,t,i){return this._showShaderFunctionReady||(this._showShaderFunctionReady=!0,this._showShaderFunction=e$2e(this.show)?this.show.getShaderFunction(e,t,i,"bool"):void 0),this._showShaderFunction},d$n.prototype.getPointSizeShaderFunction=function(e,t,i){return this._pointSizeShaderFunctionReady||(this._pointSizeShaderFunctionReady=!0,this._pointSizeShaderFunction=e$2e(this.pointSize)?this.pointSize.getShaderFunction(e,t,i,"float"):void 0),this._pointSizeShaderFunction},Object.defineProperties(D$g.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return e$2e(this._minimumLevel)?this._minimumLevel:0}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}},zoomOffset:{get:function(){return this._zoomOffset}}}),D$g.prototype.getTileCredits=function(e,t,i){},D$g.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=W$j(this,e,t,i,n);if(n.quadKey=Z$g(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(e$2e(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2e(o)?o$1l(o,(function(e){return e$2e(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$i.loadImage(this,r)}return e$i.loadImage(this,r)}return e$i.loadImage(this,r)},D$g.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$15("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures){var o,a,s,l=this._tilingScheme.tileXYToNativeRectangle(e,t,i);if(this._tilingScheme.projection instanceof n$1d)o=e$2d.toDegrees(n),a=e$2d.toDegrees(r),s="4326";else{var u=this._tilingScheme.projection.project(new a$18(n,r,0));o=u.x,a=u.y,s="3857"}var c="visible";e$2e(this._layers)&&(c+=":"+this._layers);var h={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:o+","+a,mapExtent:l.west+","+l.south+","+l.east+","+l.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:s,layers:c};return this._resource.getDerivedResource({url:"identify",queryParameters:h}).fetchJson().then((function(e){var t=[],i=e.results;if(!e$2e(i))return t;for(var n=0;n<i.length;++n){var r=i[n],o=new o$r;if(o.data=r,o.name=r.value,o.properties=r.attributes,o.configureDescriptionFromProperties(r.attributes),"esriGeometryPoint"===r.geometryType&&r.geometry){var a=r.geometry.spatialReference&&r.geometry.spatialReference.wkid?r.geometry.spatialReference.wkid:4326;if(4326===a||4283===a)o.position=a$18.fromDegrees(r.geometry.x,r.geometry.y,r.geometry.z);else if(102100===a||900913===a||3857===a){var s=new t$N;o.position=s.unproject(new o$1p(r.geometry.x,r.geometry.y,r.geometry.z))}}t.push(o)}return t}))}},Object.defineProperties(e$e.prototype,{url:{get:function(){return this._url},set:function(e){this._url!==e&&(this._cloudBall.appearance.material.uniforms.image=e,this._url=e)}},speed:{get:function(){return this._speed},set:function(e){this._speed=e}}}),e$e.prototype.update=function(e){LicenseChecker.LICENSECHECKER.verify("CloudBox"),this._scene=e.camera._scene,e$2e(this._cloudBall)&&!this._scene.primitives.contains(this._cloudBall)&&this._scene.primitives.add(this._cloudBall),e.mode===C$14.SCENE3D&&this.animation(),e.mode===C$14.COLUMBUS_VIEW&&(this._cloudBall.modelMatrix=p$1d.clone(this._originalModelMatrix))},e$e.prototype.animation=function(){this._angle+=.05*this.speed,this._angle=this._angle%360;var e=e$2d.toRadians(this._angle);e=-e;var t=p$1e.fromRotationZ(e);p$1d.multiplyByMatrix3(this._originalModelMatrix,t,this._cloudBall.modelMatrix)},e$e.prototype.isDestroyed=function(){return!1},e$e.prototype.remove=function(){if(this._scene.primitives.contains(this._cloudBall)){var e=this._scene._primitives._primitives.indexOf(this._cloudBall);-1!==e&&(this._scene._primitives._primitives.splice(e,1),delete this._cloudBall._external._composites[this._scene._primitives._guid])}},e$e.prototype.destroy=function(){this.remove(),this._cloudBall=void 0},Object.defineProperties(o$o.prototype,{show:{get:function(){return this._show},set:function(e){this.context._colorBufferFloat||this.context._colorBufferHalfFloat?e!==this._show&&(e$2e(this._owner)&&this._owner.colorCorrectionShowChange(e),this._show=e):console.warn("Color correction is not currently supported on the mobile.")}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness=e}},contrast:{get:function(){return this._contrast},set:function(e){this._contrast=e}},saturation:{get:function(){return this._saturation},set:function(e){this._saturation=e}},hue:{get:function(){return this._hue},set:function(e){this._hue=e}}}),o$o.prototype.isDestroyed=function(){return!1},o$o.prototype.destroy=function(){return i$11(this)};var v$h="uniform sampler2D u_texture0;\n#ifdef BLOOM\nuniform vec2 u_BloomTex_TexelSize;\nuniform vec4 u_Bloom_DirtTileOffset;\nuniform vec3 u_Bloom_Settings;\nuniform vec3 u_Bloom_Color;\nuniform sampler2D u_BloomTexture;\nuniform sampler2D u_Bloom_DirtTex;\n#endif\n#ifdef COLOR_CORRECTION\nuniform float u_brightness;\nuniform float u_contrast;\nuniform float u_saturation;\nuniform float u_hue;\n#endif\n#ifdef SSAO\nuniform sampler2D u_AmbientOcclusionTexture;\n#endif\n#ifdef TONEMAPPING\nuniform float u_exposure;\nuniform float u_toneMappingWhitePoint;\n#endif\nvarying vec2 v_textureCoordinates;\n#define inline\nvec4 UpsampleTent(sampler2D samplerTex, vec2 uv, vec2 texelSize, vec4 sampleScale)\n{\nvec4 d = texelSize.xyxy * vec4(1.0, 1.0, -1.0, 0.0) * sampleScale;\nvec4 s;\ns = texture2D(samplerTex, uv - d.xy);\ns += texture2D(samplerTex, uv - d.wy) * 2.0;\ns += texture2D(samplerTex, uv - d.zy);\ns += texture2D(samplerTex, uv + d.zw) * 2.0;\ns += texture2D(samplerTex, uv ) * 4.0;\ns += texture2D(samplerTex, uv + d.xw) * 2.0;\ns += texture2D(samplerTex, uv + d.zy);\ns += texture2D(samplerTex, uv + d.wy) * 2.0;\ns += texture2D(samplerTex, uv + d.xy);\nreturn s * (1.0 / 16.0);\n}\n#ifdef TONEMAPPING\nvec3 ACESTonemapping(vec3 inputColor)\n{\nreturn clamp((inputColor * (2.51 * inputColor + 0.03)) / (inputColor * (2.43 * inputColor + 0.59) + 0.14), 0.0, 1.0);\n}\nvec3 FilmicTonemappingFunction(vec3 x)\n{\nfloat A = 0.22;\nfloat B = 0.3;\nfloat C = 0.1;\nfloat D = 0.2;\nfloat E = 0.01;\nfloat F = 0.3;\nreturn ((x * (A * x + C * B) + D * E) / (x * (A * x + B) + D * F)) - E / F;\n}\nvec3 FilmicTonemapping(vec3 x)\n{\nvec3 WHITE = vec3(u_toneMappingWhitePoint);\nreturn FilmicTonemappingFunction(1.6 * x) / FilmicTonemappingFunction(WHITE);\n}\nvec3 inverseGamma(vec3 color)\n{\nreturn pow(color, vec3(1.0 / 2.2));\n}\nvec3 sRGBToLinear(vec3 value)\n{\nreturn vec3(mix(pow(value.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), value.rgb * 0.0773993808, vec3(lessThanEqual(value.rgb, vec3(0.04045)))));\n}\nvec3 linearTosRGB(vec3 value)\n{\nreturn vec3(mix(pow(value.rgb, vec3(0.41666)) * 1.055 - vec3(0.055), value.rgb * 12.92, vec3(lessThanEqual(value.rgb, vec3(0.0031308)))));\n}\n#endif\nvoid main()\n{\nvec4 color0 = texture2D(u_texture0, v_textureCoordinates);\ngl_FragColor = color0;\n#ifdef BLOOM\nvec4 bloom = UpsampleTent(u_BloomTexture, v_textureCoordinates, u_BloomTex_TexelSize.xy, vec4(u_Bloom_Settings.x));\nvec4 dirt = vec4(texture2D(u_Bloom_DirtTex, v_textureCoordinates * u_Bloom_DirtTileOffset.xy + u_Bloom_DirtTileOffset.zw).rgb, 0.0);\nbloom *= u_Bloom_Settings.y;\ndirt *= u_Bloom_Settings.z;\ngl_FragColor += bloom * vec4(u_Bloom_Color, 1.0);\ngl_FragColor += dirt * bloom;\n#endif\n#ifdef SSAO\nvec3 ao = texture2D(u_AmbientOcclusionTexture, v_textureCoordinates).rgb;\ngl_FragColor.rgb *= ao;\n#endif\n#ifdef TONEMAPPING\nvec3 linearColor = sRGBToLinear(gl_FragColor.rgb);\nvec3 toneMappingColor = ACESTonemapping(linearColor * u_exposure);\ngl_FragColor.rgb = linearTosRGB(toneMappingColor);\n#endif\n#ifdef COLOR_CORRECTION\ngl_FragColor.rgb = mix(vec3(0.0), gl_FragColor.rgb, u_brightness);\ngl_FragColor.rgb = mix(vec3(0.5), gl_FragColor.rgb, u_contrast);\ngl_FragColor.rgb = czm_hue(gl_FragColor.rgb, u_hue);\ngl_FragColor.rgb = czm_saturation(gl_FragColor.rgb, u_saturation);\n#endif\n}\n",I$k="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",b$o="uniform float focalDistance;\nuniform float focalRange;\nuniform float focalLength;\nuniform float fstop;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\nvec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\nviewPos /= viewPos.w;\nfloat dist = abs(viewPos.z);\nfloat aperture = focalLength / fstop;\nfloat coc;\nfloat uppper = focalDistance + focalRange;\nfloat lower = focalDistance - focalRange;\nif (dist <= uppper && dist >= lower)\n{\ncoc = 0.5;\ncoc = coc * 0.5 + 0.5;\n}\nelse\n{\nfloat focalAdjusted = dist > uppper ? uppper : lower;\ncoc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\ncoc = clamp(coc, 0.0, 2.0) / 2.00001;\nif (dist < lower)\n{\ncoc = -coc;\n}\ncoc = coc * 0.5 + 0.5;\n}\ngl_FragColor = czm_packDepth(coc);\n}\n",x$k="uniform sampler2D u_texture;\nuniform sampler2D coc;\nvarying vec2 v_textureCoordinates;\nuniform float blurRadius;\nuniform vec2 textureSize;\nuniform vec2 poissonKernel[16];\nconst float percent = 0.01;\nfloat nrand(in vec2 n)\n{\nreturn fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\nvoid main()\n{\nvec2 offset = blurRadius / textureSize;\nfloat rnd = 6.28318 * nrand(v_textureCoordinates + 0.07 * percent );\nfloat cosa = cos(rnd);\nfloat sina = sin(rnd);\nvec4 basis = vec4(cosa, -sina, sina, cosa);\noffset *= abs(czm_unpackDepth(texture2D(coc, v_textureCoordinates)) * 2.0 - 1.0);\nvec4 color = vec4(0.0);\nfloat weightSum = 0.0;\nfor (int i = 0; i < 16; i++)\n{\nvec2 ofs = poissonKernel[i];\nofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\nvec2 uv = v_textureCoordinates + ofs * offset;\nvec4 texel = texture2D(u_texture, uv);\nfloat w = 1.0;\nfloat fCoc = czm_unpackDepth(texture2D(coc, uv)) * 2.0 - 1.0;\nw *= abs(fCoc);\ntexel.rgb *= texel.a;\ncolor += texel * w;\nweightSum += w;\n}\ncolor /= weightSum;\ncolor.rgb /= (color.a + 0.0001);\ngl_FragColor = color;\n}\n",S$f="uniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D coc;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 blurredColor = texture2D(blurred, v_textureCoordinates);\nvec4 originalColor = texture2D(original, v_textureCoordinates);\nfloat fCoc = czm_unpackDepth(texture2D(coc, v_textureCoordinates));\nfCoc = abs(fCoc * 2.0 - 1.0);\nfloat weight = smoothstep(0.0, 1.0, fCoc);\ngl_FragColor = mix(originalColor, blurredColor, weight);\n}\n";function n$g(){this._cocFBO=void 0,this._blurFBO=void 0,this._compositeBlurFBO=void 0,this._cocCommand=void 0,this._blurCommand=void 0,this._compositeCommand=void 0,this._upSamplePassState=new n$$,this._scene=void 0,this._show=!1,this._useLogDepth=!0,this._focalDistance=50,this._focalRange=20,this._focalLength=30,this._fstop=2.8,this._blurRadius=10,this._textureSize=new o$1o(512,512),this._poissonKernel=T$i(),this._dofBlurKernel=[],this._dofBlurKernelSize=16;for(var e=0;e<this._dofBlurKernelSize;e++)this._dofBlurKernel.push(this._poissonKernel[e])}Object.defineProperties(n$g.prototype,{show:{get:function(){return this._show},set:function(e){this._show=e}},focalDistance:{get:function(){return this._focalDistance},set:function(e){this._focalDistance=e}},focalRange:{get:function(){return this._focalRange},set:function(e){this._focalRange=e}},fStop:{get:function(){return this._fstop},set:function(e){this._fstop=e}},blurRadius:{get:function(){return this._blurRadius},set:function(e){this._blurRadius=e}}}),n$g.prototype.execute=function(e){this._cocCommand.execute(e,this._upSamplePassState),this._blurCommand.execute(e,this._upSamplePassState),this._compositeCommand.execute(e,this._upSamplePassState)};var y$h=new f$1a;function P$k(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function v$g(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function T$i(){var e=[];return e.push(new o$1o(0,0)),e.push(new o$1o(-.321585265978,-.154972575841)),e.push(new o$1o(.458126042375,.188473391593)),e.push(new o$1o(.842080129861,.527766490688)),e.push(new o$1o(.147304551086,-.659453822776)),e.push(new o$1o(-.331943915203,-.940619700594)),e.push(new o$1o(.0479226680259,.54812163202)),e.push(new o$1o(.701581552186,-.709825561388)),e.push(new o$1o(-.295436780218,.940589268233)),e.push(new o$1o(-.901489676764,.237713156085)),e.push(new o$1o(.973570876096,-.109899459384)),e.push(new o$1o(-.866792314779,-.451805525005)),e.push(new o$1o(.330975007087,.800048655954)),e.push(new o$1o(-.344275183665,.381779221166)),e.push(new o$1o(-.386139432542,-.437418421534)),e.push(new o$1o(-.576478634965,-.0148463392551)),e.push(new o$1o(.385798197415,-.262426961053)),e.push(new o$1o(-.666302061145,.682427250835)),e.push(new o$1o(-.628010632582,-.732836215494)),e.push(new o$1o(.10163141741,-.987658134403)),e.push(new o$1o(.711995289051,-.320024291314)),e.push(new o$1o(.0296005138058,.950296523438)),e.push(new o$1o(.0130612307608,-.351024443122)),e.push(new o$1o(-.879596633704,-.10478487883)),e.push(new o$1o(.435712737232,.504254490347)),e.push(new o$1o(.779203817497,.206477676721)),e.push(new o$1o(.388264289969,-.896736162545)),e.push(new o$1o(-.153106280781,-.629203242522)),e.push(new o$1o(-.245517550697,.657969239148)),e.push(new o$1o(.126830499058,.26862328493)),e.push(new o$1o(-.634888119007,-.302301223431)),e.push(new o$1o(.617074219636,.779817204925)),e}n$g.prototype.update=function(e,t,i,n){var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight;this._scene=i,e$2e(this._cocCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),e$2e(this._cocCommand)||this.createCommand(e);var a=this._blurFBO,s=e$2e(a)&&a.getColorTexture(0)||void 0;if(!e$2e(s)||this._textureSize.x!==r||this._textureSize.y!==o){this._textureSize.x=r,this._textureSize.y=o,this.createFBO(r,o,e);var l=y$h;l.width=r,l.height=o;var u=d$1m.fromCache({viewport:l});this._cocCommand.renderState=u,this._blurCommand.renderState=u,this._compositeCommand.renderState=u}this._upSamplePassState.context=e},n$g.prototype.createFBO=function(e,t,i){this._cocFBO=this._cocFBO&&this._cocFBO.destroy(),this._blurFBO=this._blurFBO&&this._blurFBO.destroy(),this._compositeBlurFBO=this._compositeBlurFBO&&this._compositeBlurFBO.destroy(),this._cocFBO=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t})]}),this._blurFBO=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t,pixelFormat:V$12.RGBA,pixelDatatype:i.webgpu?_$_.UNSIGNED_BYTE:_$_.FLOAT})]}),this._compositeBlurFBO=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t})]}),e$2e(this._cocCommand)&&e$2e(this._blurCommand)&&e$2e(this._compositeCommand)&&(this._cocCommand.framebuffer=this._cocFBO,this._blurCommand.framebuffer=this._blurFBO,this._compositeCommand.framebuffer=this._compositeBlurFBO)},n$g.prototype.createCommand=function(e){var t={},i=new s$V({name:"DOFCoc",sources:[b$o]});this._useLogDepth&&i.defines.push("LOG_DEPTH"),this._cocCommand=e.createViewportQuadCommand(i,{shaderProgramName:"DepthOfFieldCoc",uniformMap:t,owner:this}),this._blurCommand=e.createViewportQuadCommand(x$k,{shaderProgramName:"DepthOfFieldBlur",uniformMap:t,owner:this}),this._compositeCommand=e.createViewportQuadCommand(S$f,{shaderProgramName:"DepthOfFieldComposite",uniformMap:t,owner:this}),this.createUniformMap()},n$g.prototype.createUniformMap=function(){if(e$2e(this._cocCommand)&&e$2e(this._blurCommand)&&e$2e(this._compositeCommand)){var e=this;this._cocCommand.uniformMap.focalDistance=function(){return e._focalDistance},this._cocCommand.uniformMap.focalRange=function(){return e._focalRange},this._cocCommand.uniformMap.focalLength=function(){return e._focalLength},this._cocCommand.uniformMap.fstop=function(){return e._fstop},this._blurCommand.uniformMap.u_texture=function(){return e._fbo.getColorTexture(0)},this._blurCommand.uniformMap.coc=function(){return e._cocFBO.getColorTexture(0)},this._blurCommand.uniformMap.blurRadius=function(){return e._blurRadius},this._blurCommand.uniformMap.textureSize=function(){return e._textureSize},this._blurCommand.uniformMap.poissonKernel=function(){return e._dofBlurKernel},this._compositeCommand.uniformMap.original=function(){return e._fbo.getColorTexture(0)},this._compositeCommand.uniformMap.blurred=function(){return e._blurFBO.getColorTexture(0)},this._compositeCommand.uniformMap.coc=function(){return e._cocFBO.getColorTexture(0)}}},n$g.prototype.setInputFBO=function(e){this._fbo=e},n$g.prototype.getDOFTexture=function(){return this._compositeBlurFBO.getColorTexture(0)},n$g.prototype.isDestroyed=function(){return!1},n$g.prototype.destroy=function(){return this._cocFBO=this._cocFBO&&this._cocFBO.destroy(),this._blurFBO=this._blurFBO&&this._blurFBO.destroy(),this._compositeBlurFBO=this._compositeBlurFBO&&this._compositeBlurFBO.destroy(),this._cocCommand=this._cocCommand&&this._cocCommand.shaderProgram&&this._cocCommand.shaderProgram.destroy(),this._blurCommand=this._blurCommand&&this._blurCommand.shaderProgram&&this._blurCommand.shaderProgram.destroy(),this._compositeCommand=this._compositeCommand&&this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy(),i$11(this)},n$g.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2e(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?P$k(n,t):v$g(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}};var z$i="uniform sampler2D randomTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\nvarying vec2 v_textureCoordinates;\nvec4 clipToEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\nposEC = posEC / posEC.w;\nreturn posEC;\n}\nfloat getDepth(in vec4 depth)\n{\nfloat z_window = czm_unpackDepth(depth);\nfloat n_range = czm_depthRange.near;\nfloat f_range = czm_depthRange.far;\nreturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\nvec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\nvec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\nvec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\nvec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\nvec3 up = posInCamera.xyz - posInCameraUp.xyz;\nvec3 down = posInCameraDown.xyz - posInCamera.xyz;\nvec3 left = posInCamera.xyz - posInCameraLeft.xyz;\nvec3 right = posInCameraRight.xyz - posInCamera.xyz;\nvec3 DX = length(left) < length(right) ? left : right;\nvec3 DY = length(up) < length(down) ? up : down;\nreturn normalize(cross(DY, DX));\n}\nvoid main(void)\n{\nfloat depth = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\nvec4 posInCamera = clipToEye(v_textureCoordinates, depth);\nif (posInCamera.z > frustumLength)\n{\ngl_FragColor = vec4(1.0);\nreturn;\n}\nvec2 pixelSize = 1.0 / czm_viewport.zw;\nfloat depthU = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates- vec2(0.0, pixelSize.y)));\nfloat depthD = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates+ vec2(0.0, pixelSize.y)));\nfloat depthL = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates- vec2(pixelSize.x, 0.0)));\nfloat depthR = getDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates+ vec2(pixelSize.x, 0.0)));\nvec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\nfloat ao = 0.0;\nvec2 sampleDirection = vec2(1.0, 0.0);\nfloat gapAngle = 90.0 * czm_radiansPerDegree;\nfloat randomVal = getDepth(texture2D(randomTexture, v_textureCoordinates));\nfloat inverseViewportWidth = 1.0 / czm_viewport.z;\nfloat inverseViewportHeight = 1.0 / czm_viewport.w;\nfor (int i = 0; i < 4; i++)\n{\nfloat newGapAngle = gapAngle * (float(i) + randomVal);\nfloat cosVal = cos(newGapAngle);\nfloat sinVal = sin(newGapAngle);\nvec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\nfloat localAO = 0.0;\nfloat localStepSize = stepSize;\nfor (int j = 0; j < 6; j++)\n{\nvec2 directionWithStep = vec2(rotatedSampleDirection.x * localStepSize * inverseViewportWidth, rotatedSampleDirection.y * localStepSize * inverseViewportHeight);\nvec2 newCoords = directionWithStep + v_textureCoordinates;\nif(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n{\nbreak;\n}\nfloat stepDepthInfo = getDepth(texture2D(czm_globeDepthTexture, newCoords));\nvec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\nvec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\nfloat len = length(diffVec);\nif (len > lengthCap)\n{\nbreak;\n}\nfloat dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\nfloat weight = len / lengthCap;\nweight = 1.0 - weight * weight;\nif (dotVal < bias)\n{\ndotVal = 0.0;\n}\nlocalAO = max(localAO, dotVal * weight);\nlocalStepSize += stepSize;\n}\nao += localAO;\n}\nao /= 4.0;\nao = 1.0 - clamp(ao, 0.0, 1.0);\nao = pow(ao, intensity);\ngl_FragColor = vec4(vec3(ao), 1.0);\n}\n",F$f="uniform float u_delta;\nuniform float u_sigma;\nuniform float direction;\nuniform sampler2D u_texture;\nuniform vec2 u_step;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec2 st = v_textureCoordinates;\nvec2 dir = vec2(1.0 - direction, direction);\nvec2 off = u_step * dir;\nvec3 g;\ng.x = 1.0 / (sqrt(czm_twoPi) * u_sigma);\ng.y = exp((-0.5 * u_delta * u_delta) / (u_sigma * u_sigma));\ng.z = g.y * g.y;\nvec4 result = texture2D(u_texture, st) * g.x;\nfor (int i = 1; i < 8; ++i)\n{\ng.xy *= g.yz;\nvec2 offset = float(i) * dir * u_step;\nresult += texture2D(u_texture, st - offset) * g.x;\nresult += texture2D(u_texture, st + offset) * g.x;\n}\ngl_FragColor = result;\n}\n";function a$f(){this._fbo=void 0,this._scene=void 0,this._downSampleFBO1=void 0,this._downSampleFBO2=void 0,this._clearFBO1Command=void 0,this._clearFBO2Command=void 0,this._ambientOcclusionGenerateCommand=void 0,this._blurXCommand=void 0,this._blurYCommand=void 0,this._downSamplePassState=new n$$,this._upSamplePassState=new n$$,this._blurStep=new o$1o,this._intensity=3,this._bias=.1,this._lengthCap=.26,this._stepSize=1.95,this._frustumLength=1e3,this._randomTexture=void 0,this._show=!1,this._useLogDepth=!0,this._context=void 0}Object.defineProperties(a$f.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(e$2e(this._owner)&&this._owner.ssaoShowChange(e),this._show=e)}},intensity:{get:function(){return this._intensity},set:function(e){this._intensity=e}},lengthCap:{get:function(){return this._lengthCap},set:function(e){this._lengthCap=e}},bias:{get:function(){return this._bias},set:function(e){this._bias=e}},stepSize:{get:function(){return this._stepSize},set:function(e){this._stepSize=e}},frustumLength:{get:function(){return this._frustumLength},set:function(e){this._frustumLength=e}}}),a$f.prototype.clear=function(e,t){var i=this._clearFBO1Command;e$1X.clone(u$Z(t,e$1X.BLACK),i.color),i.execute(e),i=this._clearFBO2Command,e$1X.clone(u$Z(t,e$1X.BLACK),i.color),i.execute(e)},a$f.prototype.isPrepared=function(){return e$2e(this._scene)&&this._scene._pickDepths.length>0},a$f.prototype.execute=function(e,t){this._ambientOcclusionGenerateCommand.execute(e,this._downSamplePassState),this._blurXCommand.execute(e,this._downSamplePassState),this._blurYCommand.execute(e,this._downSamplePassState)},a$f.prototype.createRandomTexture=function(e){for(var t=196608,i=new Uint8Array(t),n=0;n<t;n+=3)i[n]=Math.floor(255*Math.random());this._randomTexture=new t$U({context:e,pixelFormat:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE,source:{arrayBufferView:i,width:256,height:256},sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})},new f$1a;var k$f=new f$1a;function H$o(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function N$e(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}a$f.prototype.update=function(e,t,i,n){this._scene=i,this._context=t.context;var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight,a=this;if(e$2e(this._randomTexture)||this.createRandomTexture(e),e$2e(this._ambientOcclusionGenerateCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),!e$2e(this._ambientOcclusionGenerateCommand)){this._clearFBO1Command=new t$W({color:new e$1X}),this._clearFBO2Command=new t$W({color:new e$1X});var s={randomTexture:function(){return a._randomTexture},intensity:function(){return a._intensity},bias:function(){return a._bias},lengthCap:function(){return a._lengthCap},stepSize:function(){return a._stepSize},frustumLength:function(){return a._frustumLength}},l=new s$V({name:"ambientOcclusion",sources:[z$i]});this._useLogDepth&&l.defines.push("LOG_DEPTH"),this._ambientOcclusionGenerateCommand=e.createViewportQuadCommand(l,{uniformMap:s,owner:this}),s={direction:function(){return 0}},this._blurXCommand=e.createViewportQuadCommand(F$f,{uniformMap:s,owner:this}),s={direction:function(){return 1}},this._blurYCommand=e.createViewportQuadCommand(F$f,{uniformMap:s,owner:this})}var u=Math.pow(2,Math.ceil(Math.log(r)/Math.log(2))-2),c=Math.pow(2,Math.ceil(Math.log(o)/Math.log(2))-2),h=Math.max(1,u,c),d=k$f;d.width=h,d.height=h;var f=this._downSampleFBO1,p=e$2e(f)&&f.getColorTexture(0)||void 0;if(!e$2e(p)||p.width!==h||p.height!==h){this._downSampleFBO1=this._downSampleFBO1&&this._downSampleFBO1.destroy(),this._downSampleFBO2=this._downSampleFBO2&&this._downSampleFBO2.destroy(),this._blurStep.x=this._blurStep.y=2/h;this._downSampleFBO1=new t$V({context:e,colorTextures:[new t$U({context:e,width:h,height:h})]}),this._downSampleFBO2=new t$V({context:e,colorTextures:[new t$U({context:e,width:h,height:h})]}),this._clearFBO1Command.framebuffer=this._downSampleFBO1,this._clearFBO2Command.framebuffer=this._downSampleFBO2,this._ambientOcclusionGenerateCommand.framebuffer=this._downSampleFBO1,this._blurXCommand.framebuffer=this._downSampleFBO2,this._blurYCommand.framebuffer=this._downSampleFBO1;var _=d$1m.fromCache({viewport:d});this._ambientOcclusionGenerateCommand.uniformMap.depthTexture=function(){return a._scene._pickDepths.length>0&&e$2e(a._scene._pickDepths[0]._depthTexture)?a._scene._pickDepths[0]._depthTexture:a._context.defaultTexture},this._ambientOcclusionGenerateCommand.renderState=_,this._blurXCommand.uniformMap.u_texture=function(){return a._downSampleFBO1.getColorTexture(0)},this._blurXCommand.uniformMap.u_step=function(){return a._blurStep},this._blurXCommand.uniformMap.u_delta=function(){return 1},this._blurXCommand.uniformMap.u_sigma=function(){return 2},this._blurXCommand.renderState=_,this._blurYCommand.uniformMap.u_texture=function(){return a._downSampleFBO2.getColorTexture(0)},this._blurYCommand.uniformMap.u_step=function(){return a._blurStep},this._blurYCommand.uniformMap.u_delta=function(){return 1},this._blurYCommand.uniformMap.u_sigma=function(){return 2},this._blurYCommand.renderState=_}this._downSamplePassState.context=e,this._upSamplePassState.context=e},a$f.prototype.setInputFBO=function(e){this._fbo=e},a$f.prototype.getAmbientOcclusionTexture=function(){return this._downSampleFBO1.getColorTexture(0)},a$f.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2e(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?H$o(n,t):N$e(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}},a$f.prototype.isDestroyed=function(){return!1},a$f.prototype.destroy=function(){return this._downSampleFBO1=this._downSampleFBO1&&this._downSampleFBO1.destroy(),this._downSampleFBO2=this._downSampleFBO2&&this._downSampleFBO2.destroy(),this._ambientOcclusionGenerateCommand=this._ambientOcclusionGenerateCommand&&this._ambientOcclusionGenerateCommand.shaderProgram&&this._ambientOcclusionGenerateCommand.shaderProgram.destroy(),this._blurXCommand=this._blurXCommand&&this._blurXCommand.shaderProgram&&this._blurXCommand.shaderProgram.destroy(),this._blurYCommand=this._blurYCommand&&this._blurYCommand.shaderProgram&&this._blurYCommand.shaderProgram.destroy(),i$11(this)};var k$e="uniform sampler2D u_colorTexture;\nuniform sampler2D u_appendTexture;\nuniform vec4 u_scanViewCenterArr[COUNT];\nuniform vec4 u_scanViewPlaneArr[COUNT];\nuniform float u_radiusArr[COUNT];\nuniform vec3 u_scanLineDirArr[COUNT];\nuniform vec3 u_scanLineMoveViewDirArr[COUNT];\nuniform vec3 u_scanLinePtArr[COUNT];\nuniform float u_lineWidth;\nuniform vec4 u_ScanColor;\nvarying vec2 v_textureCoordinates;\nvec3 pointProjectPlane(vec3 planeNormal, vec3 pointOnPlane, vec3 point1)\n{\nvec3 v01 = point1 - pointOnPlane;\nv01 = normalize(v01);\nvec3 normalizeVector = normalize(planeNormal);\nif (v01 == normalizeVector)\n{\nreturn pointOnPlane;\n}\nfloat d = (planeNormal.x * (point1.x - pointOnPlane.x) + planeNormal.y * (point1.y - pointOnPlane.y) + planeNormal.z * (point1.z - pointOnPlane.z)) / dot(planeNormal, planeNormal);\nvec3 res;\nres = point1 - planeNormal * d;\nreturn res;\n}\nfloat distancePointToLine(vec3 ptOnLine, vec3 vectorLine, vec3 testPt)\n{\nvec3 v = vectorLine;\nvec3 w = testPt - ptOnLine;\nfloat c1 = dot(w, v);\nfloat c2 = dot(v, v);\nfloat b = c1 / c2;\nvec3 Pb = ptOnLine + b * v;\nreturn length(testPt - Pb);\n}\nvoid main()\n{\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\n#ifdef LOG_DEPTH\nfloat scale = logDepthOrDepth;\n#else\nfloat scale = pow(logDepthOrDepth * 0.5 + 0.5, 8.0);\n#endif\nvec4 sceneColor = texture2D(u_colorTexture, v_textureCoordinates);\nfloat useSceneColor = 0.0;\n#if defined(WEBGL2) || defined(WEBGPU)\nif(scale < 0.000001)\n{\nuseSceneColor = 1.0;\n}\n#else\nif(scale > 0.999999)\n{\nuseSceneColor = 1.0;\n}\n#endif\nvec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\nviewPos /= viewPos.w;\nvec4 scanColor = vec4(1.0);\nfloat scanValue = 0.0;\nvec4 appendColor = vec4(0.0);\nfor(int i = 0;i < COUNT;i++)\n{\nvec3 scanViewPlane = u_scanViewPlaneArr[i].xyz;\nvec3 scanViewCenter = u_scanViewCenterArr[i].xyz;\nfloat radius = u_radiusArr[i];\nvec3 scanLinePt = u_scanLinePtArr[i];\nvec3 scanLineDir = u_scanLineDirArr[i];\nvec3 scanLineMoveViewDir = u_scanLineMoveViewDirArr[i];\nfloat lineWidth = u_lineWidth;\nvec3 prjOnPlane = pointProjectPlane(scanViewPlane, scanViewCenter, viewPos.xyz);\nvec2 appendTexCoord = vec2(0.0);\n#ifdef CIRCLE\nvec3 relativePos = prjOnPlane - scanViewCenter;\nfloat dis = length(relativePos);\n#ifdef APPEND_TEXTURE\nif(dis < radius)\n{\nvec3 zAxis = scanViewPlane;\nvec3 temp = vec3(1.0, 0.0, 0.0);\nvec3 xAxis = normalize(cross(temp, zAxis));\nvec3 yAxis = normalize(cross(zAxis, xAxis));\nfloat cosTheta = dot(normalize(relativePos), xAxis);\nfloat cosTheta2 = dot(normalize(relativePos), yAxis);\nappendTexCoord.x = (dis * cosTheta / radius + 1.0) * 0.5;\nappendTexCoord.y = (dis * cosTheta2 / radius + 1.0) * 0.5;\n}\nappendColor += texture2D(u_appendTexture, appendTexCoord);\nappendColor.rgb = appendColor.rgb * u_ScanColor.rgb;\n#else\nif(dis < radius)\n{\nfloat f = 1.0 - abs(radius - dis) / radius;\nf = pow(f, 8.0);\nscanValue = f;\nscanColor *= u_ScanColor;\n}\n#endif\n#else\n#ifdef APPEND_TEXTURE\nvec3 relativePos = prjOnPlane - scanLinePt;\nfloat cosTheta = dot(scanLineDir, normalize(relativePos));\nfloat cosTheta2 = dot(scanLineMoveViewDir, normalize(relativePos));\nfloat disToLineCenter = length(relativePos);\nappendTexCoord.x = (disToLineCenter * cosTheta / lineWidth + 1.0) * 0.5;\nappendTexCoord.y = (disToLineCenter * cosTheta2 / lineWidth + 1.0) * 0.5;\nappendColor += texture2D(u_appendTexture, appendTexCoord);\nappendColor.rgb = appendColor.rgb * u_ScanColor.rgb;\n#else\nfloat disToLine = distancePointToLine(scanLinePt, scanLineDir, prjOnPlane);\nif(disToLine < lineWidth)\n{\nfloat f = abs(lineWidth - disToLine) / lineWidth;\nf = pow(f, 8.0);\nscanValue += f;\nscanColor = u_ScanColor;\n}\n#endif\n#endif\n}\n#ifdef APPEND_TEXTURE\ngl_FragColor.rgb = sceneColor.rgb + appendColor.rgb * scanColor.rgb;\n#else\ngl_FragColor = mix(sceneColor, scanColor, scanValue);\n#endif\ngl_FragColor = mix(gl_FragColor, sceneColor, useSceneColor);\n}\n",e$d={CIRCLE:{programDefines:"CIRCLE"},LINE:{programDefines:"LINE"}},A$l=Object.freeze(e$d);function h$i(){this._fbo=void 0,this._inputFbo=void 0,this._scanCommand=void 0,this._upSamplePassState=new n$$,this._scene=void 0,this._mode=A$l.LINE,this._scanViewCenterArr=[],this._scanPlaneArr=[],this._scanCenterArr=[],this._scanLineMoveDirArr=[],this._scanLineMoveViewDirArr=[],this._scanLineDirArr=[],this._scanLinePtArr=[],this._radiusArr=[],this._lineWidth=1e3,this._color=new e$1X(1,1,1,1),this._period=1e3,this._speed=1e3,this._show=!1,this._appendTexUrl=void 0,this._appendTexture=void 0,this._textureChanged=!1,this._useLogDepth=!0}Object.defineProperties(h$i.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(e$2e(this._owner)&&this._owner.scanShowChange(e),this._show=e)}},mode:{get:function(){return this._mode},set:function(e){this.changeProgramDefine(!1,this._mode.programDefines),this._mode=e,this.changeProgramDefine(!0,this._mode.programDefines)}},color:{get:function(){return this._color},set:function(e){this._color=e}},count:{get:function(){return this._scanCenterArr.length}},centerPostion:{get:function(){var e=this._scanCenterArr.length;return this._scanCenterArr[e-1]},set:function(e){this._scanCenterArr[0]=e,0===this._scanLineMoveDirArr.length&&(this._scanViewCenterArr[0]=new o$1p,this.computeDefaultMoveDir(0))}},period:{get:function(){return this._period/1e3},set:function(e){this._period=1e3*e}},speed:{get:function(){return this._speed},set:function(e){this._speed=e}},lineMoveDirection:{get:function(){var e=this._scanLineMoveDirArr.length;return this._scanLineMoveDirArr[e-1]},set:function(e){var t=this._scanLineMoveDirArr.length,i=o$1p.normalize(e,new o$1p);this._scanLineMoveDirArr[t-1]=i}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e}},textureUrl:{get:function(){return this._appendTexUrl},set:function(e){this._textureChanged=!0,this._appendTexUrl=e,(!e$2e(e)||""===e)&&this.changeProgramDefine(!1,"APPEND_TEXTURE")}}}),h$i.prototype.isPrepared=function(){return e$2e(this._scene)&&this._scene._pickDepths.length>0},h$i.prototype.execute=function(e){this._scanCommand.execute(e,this._upSamplePassState)};var G$j=new f$1a,x$j=new e$2c(0,0,0,1),v$f=new e$2c(0,0,0,1),o$n=new e$2c,d$m=new e$2c,_$h=new o$1p,H$n=new o$1m(new o$1p(0,0,1),10);function j$h(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function Q$c(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}h$i.prototype.computeDefaultMoveDir=function(e){var t=new o$1p,i=this._scanCenterArr[e];t=o$1p.cross(new o$1p(0,0,1),i,t),t=o$1p.normalize(t,t),this._scanLineMoveDirArr[e]=t},h$i.prototype.computeScanPlane=function(e,t){var i=this._scanCenterArr[t],n=this._scanViewCenterArr[t],r=this._scanPlaneArr[t];e$2e(r)||(r=this._scanPlaneArr[t]=new e$2c);var o=e._frameState.camera;e.mode===C$14.SCENE2D&&(v$f.x=i.x,v$f.y=i.y,v$f.z=i.z-1e3),x$j=p$1d.multiplyByVector(o.viewMatrix,v$f,x$j),d$m=e$2c.subtract(n,x$j,d$m),_$h.x=d$m.x,_$h.y=d$m.y,_$h.z=d$m.z,_$h=o$1p.normalize(_$h,_$h);var a=o$1m.fromPointNormal(new o$1p(n.x,n.y,n.z),_$h,H$n);r.x=a.normal.x,r.y=a.normal.y,r.z=a.normal.z,r.w=a.distance},h$i.prototype.updateScanParameters=function(e){for(var t=e._frameState.camera,i=0,n=this._scanCenterArr.length;i<n;i++){var r=this._scanCenterArr[i];o$n.x=r.x,o$n.y=r.y,o$n.z=r.z,o$n.w=1,p$1d.multiplyByVector(t.viewMatrix,o$n,this._scanViewCenterArr[i]),this.computeScanPlane(e,i);var o=performance.now()%this._period;0==o&&(o=this._period);var a=this._speed*o/1e3;this._mode===A$l.CIRCLE?this._radiusArr[i]=a:this._mode===A$l.LINE&&(this.computeScanLineDir(e,i),this.computeScanLinePt(e,a,i))}},h$i.prototype.computeScanLineDir=function(e,t){var i=e._frameState.camera,n=this._scanLineDirArr[t];e$2e(n)||(n=this._scanLineDirArr[t]=new o$1p);var r=this._scanLineMoveDirArr[t];e$2e(r)||(r=this._scanLineMoveDirArr[t]=new o$1p);var o=this._scanCenterArr[t],a=this._scanViewCenterArr[t];n=e.mode===C$14.SCENE2D?o$1p.cross(r,new o$1p(0,0,1),n):o$1p.cross(r,o,n),o$1p.normalize(n,n);var s=new o$1p;s=o$1p.multiplyByScalar(n,10,s),s=o$1p.add(o,s,s),o$n.x=s.x,o$n.y=s.y,o$n.z=s.z,o$n.w=1,o$n=p$1d.multiplyByVector(i.viewMatrix,o$n,o$n),n.x=o$n.x-a.x,n.y=o$n.y-a.y,n.z=o$n.z-a.z,o$1p.normalize(n,n)},h$i.prototype.computeScanLinePt=function(e,t,i){var n=e._frameState.camera,r=this._scanLinePtArr[i];e$2e(r)||(r=this._scanLinePtArr[i]=new o$1p);var o=this._scanLineMoveDirArr[i],a=this._scanCenterArr[i],s=this._scanViewCenterArr[i],l=this._scanLineMoveViewDirArr[i];e$2e(l)||(l=this._scanLineMoveViewDirArr[i]=new o$1p),r=o$1p.multiplyByScalar(o,t,r),r=o$1p.add(a,r,r),o$n.x=r.x,o$n.y=r.y,o$n.z=r.z,o$n.w=1,o$n=p$1d.multiplyByVector(n.viewMatrix,o$n,o$n),r.x=o$n.x,r.y=o$n.y,r.z=o$n.z,l.x=o$n.x-s.x,l.y=o$n.y-s.y,l.z=o$n.z-s.z,o$1p.normalize(l,l)},h$i.prototype.update=function(e,t,i,n){this._context=t.context;var r=(e=t.context).drawingBufferWidth,o=e.drawingBufferHeight;this._scene=i,this.updateScanParameters(i);var a=this;if(this._textureChanged&&(e$2e(this._appendTexUrl)&&""!==this._appendTexUrl&&o$1l(t$S(a._appendTexUrl),(function(t){e$2e(a._appendTexture)&&a._appendTexture.destroy(),a._appendTexture=new t$U({context:e,source:t,pixelFormat:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE}),a.changeProgramDefine(!0,"APPEND_TEXTURE")})),this._textureChanged=!1),e$2e(this._scanCommand)&&n!==this._useLogDepth&&(this._useLogDepth=n,this.changeProgramDefine(n,"LOG_DEPTH")),!e$2e(this._scanCommand)){var s=new s$V({name:"Scan",sources:[k$e]});s.defines.push(this._mode.programDefines),s.defines.push("COUNT "+this._scanCenterArr.length),n&&s.defines.push("LOG_DEPTH"),this._scanCommand=e.createViewportQuadCommand(s,{shaderProgramName:"scanEffect",uniformMap:{},owner:this}),this._scanCommand.uniformMap.u_depthTex=function(){return a._scene._pickDepths[0]._depthTexture},this._scanCommand.uniformMap.u_colorTexture=function(){return a._inputFbo.getColorTexture(0)},this._scanCommand.uniformMap.u_appendTexture=function(){return e$2e(a._appendTexture)?a._appendTexture:a._context.defaultTexture},this._scanCommand.uniformMap.u_scanViewCenterArr=function(){return a._scanViewCenterArr},this._scanCommand.uniformMap.u_radiusArr=function(){return a._radiusArr},this._scanCommand.uniformMap.u_scanViewPlaneArr=function(){return a._scanPlaneArr},this._scanCommand.uniformMap.u_scanLineDirArr=function(){return a._scanLineDirArr},this._scanCommand.uniformMap.u_scanLineMoveViewDirArr=function(){return a._scanLineMoveViewDirArr},this._scanCommand.uniformMap.u_scanLinePtArr=function(){return a._scanLinePtArr},this._scanCommand.uniformMap.u_lineWidth=function(){return a._lineWidth},this._scanCommand.uniformMap.u_ScanColor=function(){return a._color}}var l=this._fbo,u=e$2e(l)&&l.getColorTexture(0)||void 0;if(!e$2e(u)||u.width!==r||u.height!==o){this._fbo=this._fbo&&this._fbo.destroy(),this._fbo=new t$V({context:e,colorTextures:[new t$U({context:e,width:r,height:o})]}),this._scanCommand.framebuffer=this._fbo;var c=G$j;c.width=r,c.height=o;var h=d$1m.fromCache({viewport:c});this._scanCommand.renderState=h}this._upSamplePassState.context=e},h$i.prototype.setInputFBO=function(e){this._inputFbo=e},h$i.prototype.getScanTexture=function(){return this._fbo.getColorTexture(0)},h$i.prototype.getScanFBO=function(){return this._fbo},h$i.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2e(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?j$h(n,t):Q$c(n,t),i.shaderProgram.destroy(),i.shaderProgram=r$14.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}},h$i.prototype.add=function(e){if(e$2e(e))return 0===this._scanCenterArr.length?void(this.centerPosition=o$1p.clone(e)):(this.changeProgramDefine(!1,"COUNT "+this._scanCenterArr.length),this._scanCenterArr.push(e),this._scanViewCenterArr.push(new o$1p),this.changeProgramDefine(!0,"COUNT "+this._scanCenterArr.length),this.computeDefaultMoveDir(this._scanCenterArr.length-1),this._scanCenterArr.length-1)},h$i.prototype.remove=function(e){e>=this._scanCenterArr.length||1===this._scanCenterArr.length||(this.changeProgramDefine(!1,"COUNT "+this._scanCenterArr.length),this._scanCenterArr.splice(e,1),this._scanViewCenterArr.splice(e,1),this._scanLineMoveDirArr.splice(e,1),this.changeProgramDefine(!0,"COUNT "+this._scanCenterArr.length))},h$i.prototype.isDestroyed=function(){return!1},h$i.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._scanCommand=this._scanCommand&&this._scanCommand.shaderProgram&&this._scanCommand.shaderProgram.destroy(),e$2e(this._appendTexture)&&(this._appendTexture.destroy(),this._appendTexture=null),i$11(this)};var I$j="#define AA_SAMPLES 9\n#define AA_CLAMP 1\n#define AA_CLIP 0\n#define SHARPEN 1\nuniform sampler2D u_currentTexture;\nuniform sampler2D u_historyTexture;\nuniform mat4 u_transformMatrix;\nuniform vec2 u_jitter;\nuniform float u_sampleSpatialWeight[AA_SAMPLES];\nuniform vec2 u_offsets3x3[AA_SAMPLES];\nvarying vec2 v_textureCoordinates;\nvec3 RGB2YCoCgR(vec3 rgbColor){\nfloat Y = dot(rgbColor, vec3(1.0, 2.0, 1.0));\nfloat Co = dot(rgbColor, vec3(2.0, 0.0, -2.0));\nfloat Cg = dot(rgbColor, vec3(-1.0, 2.0, -1.0));\nvec3 YCoCgRColor = vec3(Y, Co, Cg);\nreturn YCoCgRColor;\n}\nvec3 YCoCgR2RGB(vec3 YCoCgRColor){\nfloat Y = YCoCgRColor.x * 0.25;\nfloat Co = YCoCgRColor.y * 0.25;\nfloat Cg = YCoCgRColor.z * 0.25;\nfloat R = Y + Co - Cg;\nfloat G = Y + Cg;\nfloat B = Y - Co - Cg;\nvec3 rgbColor = vec3(R, G, B);\nreturn rgbColor;\n}\nfloat Luminance(vec3 color){\nreturn color.r;\n}\nvec3 ToneMap(vec3 color){\nreturn color / (1.0 + Luminance(color));\n}\nvec3 UnToneMap(vec3 color){\nreturn color / (1.0 - Luminance(color));\n}\nvec3 GetNeighorhoodSamp(vec2 offset, vec2 uv){\nfloat fx = offset.x;\nfloat fy = offset.y;\nvec2 sampleOffset = vec2(fx / czm_viewport.z, fy / czm_viewport.w);\nvec2 sampleUV = uv + sampleOffset;\nsampleUV = clamp(sampleUV, 0.0, 1.0);\nvec3 neighorhoodSamp = texture2D(u_currentTexture, sampleUV).rgb;\nneighorhoodSamp = max(neighorhoodSamp, 0.0);\nneighorhoodSamp = ToneMap(neighorhoodSamp);\nneighorhoodSamp = RGB2YCoCgR(neighorhoodSamp);\nreturn neighorhoodSamp;\n}\nfloat HdrWeightY(float Color){\nfloat exposure = 1.0;\nreturn 1.0 / (Color * exposure + 4.0);\n}\nfloat GetSceneColorLuma4(vec3 SceneColor){\nreturn SceneColor.x;\n}\nfloat GetSceneColorHdrWeight(vec3 SceneColor)\n{\nreturn HdrWeightY(SceneColor.x);\n}\nvec2 WeightedLerpFactors(float WeightA, float WeightB, float Blend)\n{\nfloat BlendA = (1.0 - Blend) * WeightA;\nfloat BlendB = Blend * WeightB;\nfloat RcpBlend = 1.0 / (BlendA + BlendB);\nBlendA *= RcpBlend;\nBlendB *= RcpBlend;\nreturn vec2(BlendA, BlendB);\n}\nvoid ComputeNeighborhoodBoundingbox(in vec3 Neighbors[AA_SAMPLES], out vec3 OutNeighborMin, out vec3 OutNeighborMax)\n{\nvec3 NeighborMin;\nvec3 NeighborMax;\nNeighborMin = min( min(Neighbors[1], Neighbors[3]), Neighbors[4] );\nNeighborMin = min( min(NeighborMin, Neighbors[5]), Neighbors[7] );\nNeighborMax = max( max(Neighbors[1], Neighbors[3]), Neighbors[4] );\nNeighborMax = max( max(NeighborMax, Neighbors[5]), Neighbors[7] );\nvec3 NeighborMinPlus = NeighborMin;\nvec3 NeighborMaxPlus = NeighborMax;\nNeighborMin = min( min(NeighborMin, Neighbors[0]), Neighbors[2] );\nNeighborMin = min( min(NeighborMin, Neighbors[6]), Neighbors[8] );\nNeighborMax = max( max(NeighborMax, Neighbors[0]), Neighbors[2] );\nNeighborMax = max( max(NeighborMax, Neighbors[6]), Neighbors[8] );\nOutNeighborMin = NeighborMin;\nOutNeighborMax = NeighborMax;\n}\nfloat IntersectAABB(vec3 Dir, vec3 Org, vec3 Box){\nvec3 RcpDir = vec3(1.0 / Dir.x, 1.0 / Dir.y, 1.0 / Dir.z);\nvec3 TNeg = ( Box - Org) * RcpDir;\nvec3 TPos = ((-Box) - Org) * RcpDir;\nreturn max(max(min(TNeg.x, TPos.x), min(TNeg.y, TPos.y)), min(TNeg.z, TPos.z));\n}\nfloat HistoryClip(vec3 History, vec3 Filtered, vec3 NeighborMin, vec3 NeighborMax){\n#if 0\nvec3 Min = min(Filtered, min(NeighborMin, NeighborMax));\nvec3 Max = max(Filtered, max(NeighborMin, NeighborMax));\nvec3 Avg2 = Max + Min;\nvec3 Dir = Filtered - History;\nvec3 Org = History - Avg2 * 0.5;\nvec3 Scale = Max - Avg2 * 0.5;\nreturn clamp(IntersectAABB(Dir, Org, Scale), 0.0, 1.0);\n#else\nvec3 BoxMin = NeighborMin;\nvec3 BoxMax = NeighborMax;\nvec3 RayOrigin = History;\nvec3 RayDir = Filtered - History;\nRayDir = all(lessThanEqual(abs(RayDir), vec3(1.0/65536.0))) ? vec3(1.0/65536.0) : RayDir;\nvec3 InvRayDir = vec3( 1.0 / RayDir.x, 1.0 / RayDir.y, 1.0 / RayDir.z );\nvec3 MinIntersect = (BoxMin - RayOrigin) * InvRayDir;\nvec3 MaxIntersect = (BoxMax - RayOrigin) * InvRayDir;\nvec3 EnterIntersect = min( MinIntersect, MaxIntersect );\nreturn max( max(EnterIntersect.x, EnterIntersect.y), EnterIntersect.z );\n#endif\n}\nvec3 ClampHistory(vec3 Filtered, vec3 History, vec3 NeighborMin, vec3 NeighborMax)\n{\n#if !AA_CLAMP\nreturn History;\n#elif AA_CLIP\nvec3 TargetColor = Filtered;\nvec3 HistoryColor = History;\nfloat ClipBlend = HistoryClip( HistoryColor.rgb, TargetColor.rgb, NeighborMin.rgb, NeighborMax.rgb );\nClipBlend = clamp( ClipBlend, 0.0, 1.0 );\nHistoryColor = mix( HistoryColor, TargetColor, ClipBlend );\nreturn HistoryColor;\n#else //!AA_CLIP\nHistory = clamp(History, NeighborMin, NeighborMax);\nreturn History;\n#endif\n}\nvec3 FilterCurrentFrameInputSamples(in vec2 uv, inout vec3 neighborhood[AA_SAMPLES]){\nfor(int i = 0; i < AA_SAMPLES; i++){\nneighborhood[i] = GetNeighorhoodSamp(u_offsets3x3[i], uv);\n}\nfloat totalWeight = 0.0;\nvec3 sum = vec3(0.0);\nfor(int i = 0; i < AA_SAMPLES; i++){\nfloat neighborhoodHdrWeight = GetSceneColorHdrWeight(neighborhood[i]);\nfloat neighborhoodFinalWeight = neighborhoodHdrWeight * u_sampleSpatialWeight[i];\ntotalWeight += neighborhoodFinalWeight;\nsum += neighborhood[i] * neighborhoodFinalWeight;\n}\nvec3 filtered = sum / totalWeight;\nreturn filtered;\n}\nvoid main()\n{\nfloat HistoryBlur = 0.0;\nvec2 jitteredUV = v_textureCoordinates + u_jitter;\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\nvec4 viewPos = czm_windowToEyeCoordinates(v_textureCoordinates.xy * czm_viewport.zw, logDepthOrDepth);\nviewPos /= viewPos.w;\nvec4 histroyUV = u_transformMatrix * viewPos;\nhistroyUV = histroyUV / histroyUV.w;\nhistroyUV.xy = histroyUV.xy * 0.5 + 0.5;\nhistroyUV.xy = histroyUV.xy + u_jitter;\nvec3 prevColor = texture2D(u_historyTexture, histroyUV.xy).rgb;\nprevColor = ToneMap(prevColor);\nprevColor = RGB2YCoCgR(prevColor);\nvec3 neighborhood[AA_SAMPLES];\nvec3 filtered = FilterCurrentFrameInputSamples(jitteredUV, neighborhood);\nvec3 NeighborMin;\nvec3 NeighborMax;\nComputeNeighborhoodBoundingbox(neighborhood, NeighborMin, NeighborMax);\nfloat LumaMin = GetSceneColorLuma4(NeighborMin);\nfloat LumaMax = GetSceneColorLuma4(NeighborMax);\nfloat LumaHistory = GetSceneColorLuma4(prevColor);\nprevColor = ClampHistory(filtered, prevColor, NeighborMin, NeighborMax);\nfloat BlendFinal = 0.04;\nfloat FilterWeight = GetSceneColorHdrWeight(filtered);\nfloat HistoryWeight = GetSceneColorHdrWeight(prevColor);\nvec2 Weights = WeightedLerpFactors(HistoryWeight, FilterWeight, BlendFinal);\nvec3 color = prevColor * Weights.x + filtered * Weights.y;\ncolor = YCoCgR2RGB(color);\ncolor = UnToneMap(color);\ngl_FragColor.rgb = color;\ngl_FragColor.a = 1.0;\n}\n",C$i=8,D$f=[0,-.5,.5,-3/4,1/4,-1/4,3/4,-7/8],W$i=[-1/3,1/3,-7/9,-1/9,5/9,-5/9,1/9,7/9],g$o=[new o$1o(-1,-1),new o$1o(0,-1),new o$1o(1,-1),new o$1o(-1,0),new o$1o(0,0),new o$1o(1,0),new o$1o(-1,1),new o$1o(0,1),new o$1o(1,1)];function a$e(){this._compositeCommand=void 0,this._histroyFBO=[],this._upSamplePassState=new n$$,this._show=!1,this._fbo=void 0,this._fboIndex=0,this._uniformState=void 0,this._prevViewProjectionMatrx=new p$1d,this._transformMatrix=new p$1d,this._frameIndex=0,this._jitterPixel=new o$1o,this._jitterUVOffset=new o$1o,this._sampleWeights=[],this._plusWeights=[]}Object.defineProperties(a$e.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e)}}}),a$e.prototype.execute=function(e,t){!e$2e(e.uniformState)||!e$2e(e.uniformState.globeDepthTexture)||(this._compositeCommand.framebuffer=this._histroyFBO[this._fboIndex],this._compositeCommand.execute(e,this._upSamplePassState),this._frameIndex++,this._frameIndex===C$i&&(this._frameIndex=0))};var L$k=new f$1a;a$e.prototype.update=function(e,t,i,n){var r=n.useLogDepth,o=(e=t.context).uniformState;this._uniformState=o,o.viewProjection.clone(this._prevViewProjectionMatrx);var a=e.drawingBufferWidth,s=e.drawingBufferHeight;this._scene=i,e$2e(this._compositeCommand)&&r!==this._useLogDepth&&(this._useLogDepth=r,this.changeProgramDefine(r,"LOG_DEPTH")),e$2e(this._compositeCommand)||this.createCommand(e);var l=!1;if(0==this._histroyFBO.length)l=!0;else{var u=this._histroyFBO[0],c=e$2e(u)&&u.getColorTexture(0)||void 0;(!e$2e(c)||c.width!==a||c.height!==s)&&(l=!0)}if(l){this.createFBO(a,s,e);var h=L$k;h.width=a,h.height=s;var d=d$1m.fromCache({viewport:h});this._compositeCommand.renderState=d}this._upSamplePassState.context=e,this._fboIndex=(this._fboIndex+1)%2,n.jitterIndex=this._frameIndex,V$g(this,n,a,s),U$h(this)};var l$j=new o$1o;function V$g(e,t,i,n){var r=e._frameIndex%C$i,o=D$f[r],a=W$i[r],s=.47,l=Math.exp(-.565866908103214),u=2*Math.PI*a,c=s*Math.sqrt(-2*Math.log((1-o)*l+o)),h=c*Math.cos(u),d=c*Math.sin(u);e._jitterPixel.x=h,e._jitterPixel.y=d;var f=e._jitterPixel.x/i,p=e._jitterPixel.y/n;l$j.x=f,l$j.y=p,t.jitter=l$j,e._jitterUVOffset.x=-f/2,e._jitterUVOffset.y=-p/2}function U$h(e){var t,i,n=[],r=[],o=0;for(i=0;i<9;i++){var a=g$o[i].x-e._jitterPixel.x,s=g$o[i].y-e._jitterPixel.y;n[i]=Math.exp(-2.29*(a*a+s*s)),o+=n[i]}for(r[0]=n[1],r[1]=n[3],r[2]=n[4],r[3]=n[5],r[4]=n[7],t=n[1]+n[3]+n[4]+n[5]+n[7],i=0;i<9;i++)n[i]=n[i]/o;for(i=0;i<5;i++)r[i]=r[i]/t;e._sampleWeights=n,e._plusWeights=r}function H$m(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function R$i(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}a$e.prototype.createFBO=function(e,t,i){var n,r=_$_.FLOAT;for(n=0;n<this._histroyFBO.length;n++)this._histroyFBO[n].destroy();for(this._histroyFBO=[],n=0;n<2;n++){var o=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t,pixelDatatype:r})]});this._histroyFBO.push(o)}},a$e.prototype.createCommand=function(e){var t=new s$V({name:"TAAComposite",sources:[I$j]});this._useLogDepth&&t.defines.push("LOG_DEPTH"),this._compositeCommand=e.createViewportQuadCommand(t,{uniformMap:{},owner:this}),this.createUniformMap()},a$e.prototype.createUniformMap=function(){if(e$2e(this._compositeCommand)){var e=this;this._compositeCommand.uniformMap.u_currentTexture=function(){return e._fbo.getColorTexture(0)},this._compositeCommand.uniformMap.u_historyTexture=function(){var t=(e._fboIndex+1)%2;return e._histroyFBO[t].getColorTexture(0)},this._compositeCommand.uniformMap.u_transformMatrix=function(){var t=e._uniformState.inverseView3D;return p$1d.multiply(e._prevViewProjectionMatrx,t,e._transformMatrix),e._transformMatrix},this._compositeCommand.uniformMap.u_jitter=function(){return e._jitterUVOffset},this._compositeCommand.uniformMap.u_sampleSpatialWeight=function(){return e._sampleWeights},this._compositeCommand.uniformMap.u_offsets3x3=function(){return g$o}}},a$e.prototype.setInputFBO=function(e){this._fbo=e},a$e.prototype.getTAATexture=function(){return this._histroyFBO[this._fboIndex].getColorTexture(0)},a$e.prototype.getOutputFBO=function(){return this._histroyFBO[this._fboIndex]},a$e.prototype.changeProgramDefine=function(e,t){var i=this._scanCommand;if(e$2e(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?H$m(n,t):R$i(n,t),i.shaderProgram.destroy(),i.shaderProgram=ShaderProgram.fromCache({context:this._context,vertexShaderSource:r,fragmentShaderSource:n})}},a$e.prototype.isDestroyed=function(){return!1},a$e.prototype.destroy=function(){for(var e=0;e<this._histroyFBO.length;e++)this._histroyFBO[e].destroy();return this._compositeCommand=this._compositeCommand&&this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy(),i$11(this)};var u$g={BLOOM:"BLOOM",COLOR_CORRECTION:"COLOR_CORRECTION",SCAN:"SCAN",SSAO:"SSAO",TONEMAPPING:"TONEMAPPING",ACES_TONEMAPPING:"ACES_TONEMAPPING",FILMIC_TONEMAPPING:"FILMIC_TONEMAPPING"};function o$m(e){this._fbo=void 0,this._blendCommand=void 0,this._fullScreenCommand=void 0,this._upSamplePassState=new n$$,this.bloomEffect=void 0,this.colorCorrection=void 0,this.context=e,this.show=!1,this.bloomEffect=new e$g,this.colorCorrection=new o$o(e),this.depthOfFieldEffect=new n$g,this.SSAOEffect=new a$f,this.scanEffect=new h$i,this.temporalAA=new a$e,this.bloomEffect._owner=this,this.colorCorrection._owner=this,this.scanEffect._owner=this,this.SSAOEffect._owner=this,this.exposure=1,this.toneMappingWhitePoint=11.2,this._toneMappingEnabled=!1,this.inputTexture=void 0,this._outputFbo=void 0}Object.defineProperties(o$m.prototype,{toneMappingEnabled:{get:function(){return this._toneMappingEnabled},set:function(e){e!==this._toneMappingEnabled&&(this.toneMappingEnabledChange(e),this._toneMappingEnabled=e)}},outputFbo:{get:function(){return this._outputFbo},set:function(e){this._outputFbo=e}}}),o$m.prototype.isEnable=function(){return this.isTAAEnable()||this.isBloomEnable()||this.isColorCorrectionEnable()||this.isDOFEnable()||this.isScanEnable()||this.isSSAOEnable()||this._toneMappingEnabled},o$m.prototype.isBloomEnable=function(){return e$2e(this.bloomEffect)&&this.bloomEffect.show},o$m.prototype.isColorCorrectionEnable=function(){return e$2e(this.colorCorrection)&&this.colorCorrection.show},o$m.prototype.isDOFEnable=function(){return e$2e(this.depthOfFieldEffect)&&this.depthOfFieldEffect.show},o$m.prototype.isSSAOEnable=function(){return e$2e(this.SSAOEffect)&&this.SSAOEffect.show},o$m.prototype.isScanEnable=function(){return e$2e(this.scanEffect)&&this.scanEffect.show},o$m.prototype.isTAAEnable=function(){return e$2e(this.temporalAA)&&this.temporalAA.show},o$m.prototype.clear=function(e,t){this.isBloomEnable()&&this.bloomEffect.clear(e,t)},o$m.prototype.copy=function(e,t){this.inputTexture=t,this._fullScreenCommand.framebuffer=this._fbo,this._fullScreenCommand.execute(e),this.inputTexture=void 0},o$m.prototype.execute=function(e,t){this.isTAAEnable()&&this.temporalAA.execute(e),this.isDOFEnable()&&this.depthOfFieldEffect.execute(e),this.isScanEnable()&&this.scanEffect.execute(e),this.isBloomEnable()&&this.bloomEffect.execute(e,t),this.isSSAOEnable()&&this.SSAOEffect.execute(e,t),this.isEnable()&&(this._fullScreenCommand.framebuffer=t,this._blendCommand.framebuffer=t,this._fullScreenCommand.execute(e),this._blendCommand.execute(e,this._upSamplePassState))};var j$g=new f$1a;function k$d(e,t){var i=!1;for(var n in e.defines)if(e.defines[n]===t){i=!0;break}i||e.defines.push(t)}function z$h(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function a$d(e,t){var i,n=t.terrainProvider,r=t.mapProjection,o=r.ellipsoid,a=t.camera.getRectangleCameraCoordinates(e);return i=t.mode===C$14.SCENE3D?o.cartesianToCartographic(a):r.unproject(a),e$2e(n)?n.readyPromise.then((function(){if(!e$2e(n.availability)||t.mode===C$14.SCENE2D)return i;var r=[h$18.center(e),h$18.southeast(e),h$18.southwest(e),h$18.northeast(e),h$18.northwest(e)];return a$d._sampleTerrainMostDetailed(n,r).then((function(e){var t=e.reduce((function(e,t){return Math.max(t.height,e)}),-Number.MAX_VALUE),n=i;return n.height+=isNaN(t)?0:t,n}))})):o$1l.resolve(i)}o$m.prototype.update=function(e,t,i,n){var r=n.useLogDepth;this.isTAAEnable()&&this.temporalAA.update(e,t,i,n),this.isDOFEnable()&&this.depthOfFieldEffect.update(e,t,i,r),this.isScanEnable()&&this.scanEffect.update(e,t,i,r),this.isBloomEnable()&&this.bloomEffect.update(e,t,i),this.isSSAOEnable()&&this.SSAOEffect.update(e,t,i,r);var o=(e=t.context).drawingBufferWidth,a=e.drawingBufferHeight;if(!e$2e(this._blendCommand)){var s=new s$V({name:"CompositorFP",sources:[v$h]});this.isScanEnable()&&s.defines.push(u$g.SCAN),this.isBloomEnable()&&s.defines.push(u$g.BLOOM),this.isColorCorrectionEnable()&&s.defines.push(u$g.COLOR_CORRECTION),this.isSSAOEnable()&&s.defines.push(u$g.SSAO),this._toneMappingEnabled&&s.defines.push(u$g.TONEMAPPING);var l={};this._blendCommand=e.createViewportQuadCommand(s,{shaderProgramName:"compositorBlend",uniformMap:l,owner:this}),l={},this._fullScreenCommand=e.createViewportQuadCommand(I$k,{shaderProgramName:"compositorFullScreen",uniformMap:l,owner:this})}var u=this._fbo,c=e$2e(u)&&u.getColorTexture(0)||void 0;if(!e$2e(c)||c.width!==o||c.height!==a){u=u&&u.destroy();var h=[new t$U({context:e,width:o,height:a,pixelDatatype:e.colorBufferHalfFloat?_$_.HALF_FLOAT:_$_.FLOAT})];u=e.depthTexture?this._fbo=new t$V({context:e,colorTextures:h,depthTexture:new t$U({context:e,width:o,height:a,pixelFormat:V$12.DEPTH_COMPONENT,pixelDatatype:_$_.UNSIGNED_SHORT})}):this._fbo=new t$V({context:e,colorTextures:h,depthRenderbuffer:new r$10({context:e,format:M$13.DEPTH_COMPONENT16})});var d=j$g;d.width=o,d.height=a;var f=d$1m.fromCache({viewport:d}),p=this;this._blendCommand.uniformMap.u_texture0=function(){return p.isTAAEnable()?p.temporalAA.getTAATexture():p.isDOFEnable()?p.depthOfFieldEffect.getDOFTexture():p.isScanEnable()?p.scanEffect.getScanTexture():u.getColorTexture(0)},this._blendCommand.uniformMap.u_ScanColor=function(){return p.scanEffect.color},this._blendCommand.uniformMap.u_BloomTexture=function(){return p.bloomEffect.getBloomTexture()},this._blendCommand.uniformMap.u_Bloom_DirtTex=function(){return p.bloomEffect.getBloomDirtTexture()},this._blendCommand.uniformMap.u_BloomTex_TexelSize=function(){return p.bloomEffect.getBloomTextureTexelSize()},this._blendCommand.uniformMap.u_Bloom_DirtTileOffset=function(){return p.bloomEffect.getDirtTileOffset()},this._blendCommand.uniformMap.u_Bloom_Settings=function(){return p.bloomEffect.getBloomSettings()},this._blendCommand.uniformMap.u_Bloom_Color=function(){return p.bloomEffect.getBloomColor()},this._blendCommand.uniformMap.u_AmbientOcclusionTexture=function(){return p.SSAOEffect.getAmbientOcclusionTexture()},this._blendCommand.uniformMap.u_brightness=function(){return p.colorCorrection.brightness},this._blendCommand.uniformMap.u_contrast=function(){return p.colorCorrection.contrast},this._blendCommand.uniformMap.u_saturation=function(){return p.colorCorrection.saturation},this._blendCommand.uniformMap.u_hue=function(){return p.colorCorrection.hue},this._blendCommand.uniformMap.u_exposure=function(){return p.exposure},this._blendCommand.uniformMap.u_toneMappingWhitePoint=function(){return p.toneMappingWhitePoint},this._blendCommand.renderState=f,this._fullScreenCommand.uniformMap.u_texture=function(){return u$Z(p.inputTexture,u.getColorTexture(0))},this._fullScreenCommand.renderState=f}return this.temporalAA.setInputFBO(u),this.isTAAEnable()&&(u=this.temporalAA.getOutputFBO()),this.depthOfFieldEffect.setInputFBO(u),this.SSAOEffect.setInputFBO(u),this.bloomEffect.setInputFBO(u),this.scanEffect.setInputFBO(u),this._upSamplePassState.context=e,this._fbo},o$m.prototype.getColorFramebuffer=function(){return this._fbo},o$m.prototype.isDestroyed=function(){return!1},o$m.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._blendCommand=this._blendCommand&&this._blendCommand.shaderProgram&&this._blendCommand.shaderProgram.destroy(),this._fullScreenCommand=this._fullScreenCommand&&this._fullScreenCommand.shaderProgram&&this._fullScreenCommand.shaderProgram.destroy(),e$2e(this.bloomEffect)&&(this.bloomEffect.destroy(),this.bloomEffect=null),e$2e(this.colorCorrection)&&(this.colorCorrection.destroy(),this.colorCorrection=null),e$2e(this.SSAOEffect)&&(this.SSAOEffect.destroy(),this.SSAOEffect=null),e$2e(this.DepthOfFieldEffect)&&(this.DepthOfFieldEffect.destroy(),this.DepthOfFieldEffect=null),e$2e(this.ScanEffect)&&(this.ScanEffect.destroy(),this.ScanEffect=null),e$2e(this.temporalAA)&&(this.temporalAA.destroy(),this.temporalAA=null),i$11(this)},o$m.prototype.scanShowChange=function(e){this.changeProgramDefine(e,u$g.SCAN)},o$m.prototype.bloomShowChange=function(e){this.changeProgramDefine(e,u$g.BLOOM)},o$m.prototype.colorCorrectionShowChange=function(e){this.changeProgramDefine(e,u$g.COLOR_CORRECTION)},o$m.prototype.ssaoShowChange=function(e){this.changeProgramDefine(e,u$g.SSAO)},o$m.prototype.toneMappingEnabledChange=function(e){this.changeProgramDefine(e,u$g.TONEMAPPING)},o$m.prototype.changeProgramDefine=function(e,t){var i=this._blendCommand;if(e$2e(i)){var n=i.shaderProgram.fragmentShaderSource,r=i.shaderProgram.vertexShaderSource;e?k$d(n,t):z$h(n,t),i.shaderProgram.destroy(),i.shaderProgram=r$14.fromCache({context:this.context,vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:viewportQuadAttributeLocations})}},a$d._sampleTerrainMostDetailed=y$B;var e$c={DESIGN:0,NORMAL:1},vi$2=Object.freeze(e$c),W$h=/{[^}]+}/g,X$c={x:Q$b,y:ee$a,z:ie$6,s:ne$9,reverseX:$$d,reverseY:te$9,reverseZ:re$a,westDegrees:ae$8,southDegrees:oe$8,eastDegrees:ue$9,northDegrees:se$6,westProjected:ce$b,southProjected:le$b,eastProjected:he$8,northProjected:de$6,width:fe$8,height:me$b},J$a=p$19(X$c,{i:ge$9,j:ve$6,reverseI:_e$6,reverseJ:ye$5,longitudeDegrees:we$5,latitudeDegrees:pe$a,longitudeProjected:Te$6,latitudeProjected:Se$6,format:De$7});function _$g(e){if(!e$2e(e))throw new t$15("options is required.");if(!o$1l.isPromise(e)&&!e$2e(e.url))throw new t$15("options is required.");this._errorEvent=new o$1h,this._resource=void 0,this._urlSchemeZeroPadding=void 0,this._pickFeaturesResource=void 0,this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._minimumLevel=void 0,this._tilingScheme=void 0,this._rectangle=void 0,this._tileDiscardPolicy=void 0,this._credit=void 0,this._hasAlphaChannel=void 0,this._readyPromise=void 0,this._tags=void 0,this._pickFeaturesTags=void 0,this.enablePickFeatures=!0,this.reinitialize(e)}function K$b(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(_$g.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this.ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this.ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this.ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this.ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){if(!this.ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this.ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this.ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return e$2e(this._resource)}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){if(!this.ready)throw new t$15("credit must not be called before the imagery provider is ready.");return this._credit}},hasAlphaChannel:{get:function(){if(!this.ready)throw new t$15("hasAlphaChannel must not be called before the imagery provider is ready.");return this._hasAlphaChannel}}}),_$g.prototype.reinitialize=function(e){var t=this;t._readyPromise=o$1l(e).then((function(i){if(!e$2e(i))throw new t$15("options is required.");if(!e$2e(i.url))throw new t$15("options.url is required.");t._baseUrl=e.baseUrl;var n=i.customTags,r=p$19(X$c,n),o=p$19(J$a,n),a=t$10.createIfNeeded(i.url),s=t$10.createIfNeeded(i.pickFeaturesUrl);t.enablePickFeatures=u$Z(i.enablePickFeatures,t.enablePickFeatures),t._urlSchemeZeroPadding=u$Z(i.urlSchemeZeroPadding,t.urlSchemeZeroPadding),t._tileDiscardPolicy=i.tileDiscardPolicy,t._getFeatureInfoFormats=i.getFeatureInfoFormats,t._subdomains=i.subdomains,Array.isArray(t._subdomains)?t._subdomains=t._subdomains.slice():e$2e(t._subdomains)&&t._subdomains.length>0?t._subdomains=t._subdomains.split(""):t._subdomains=["a","b","c"],t._tileWidth=u$Z(i.tileWidth,256),t._tileHeight=u$Z(i.tileHeight,256),t._minimumLevel=u$Z(i.minimumLevel,0),t._maximumLevel=i.maximumLevel,t._tilingScheme=u$Z(i.tilingScheme,new c$S({ellipsoid:i.ellipsoid})),t._rectangle=u$Z(i.rectangle,t._tilingScheme.rectangle),t._rectangle=h$18.intersection(t._rectangle,t._tilingScheme.rectangle),t._hasAlphaChannel=u$Z(i.hasAlphaChannel,!0);var l=i.credit;"string"==typeof l&&(l=new r$U(l)),t._credit=l,t._resource=a,t._tags=r,t._pickFeaturesResource=s,t._pickFeaturesTags=o;var u=i.url;return t.tablename=i.url,new l$14({name:u}).then((function(e){e.checkObjectStoreExit(t.tablename)?t._indexedDBScheduler=e:e.createObjectStore(t.tablename).then((function(){t._indexedDBScheduler=e}))})),t._indexedDBSetting={isOpen:!1,clear:function(){t._indexedDBScheduler.clear(t.tablename)},cache:[]},!0}))},_$g.prototype.getTileCredits=function(e,t,i){if(!this.ready)throw new t$15("getTileCredits must not be called before the imagery provider is ready.")},_$g.prototype.requestImage=function(e,t,i,n){if(!this.ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=M$j(this,e,t,i,n);if(e$2e(a$O.CREDENTIAL)&&(e$2e(a$O.CREDENTIAL._keymap[this._baseUrl])?r.url=a$O.addTokenWithKey(this._baseUrl,r.url):r.url=a$O.addToken(r.url)),e$2e(this._customRequestHeaders)&&(r.headers=p$19(r.headers,this._customRequestHeaders)),n.quadKey=K$b(e,t,i),!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){if(e$2e(this._indexedDBScheduler)){var o=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey);return e$2e(o)?o$1l(o,(function(e){return e$2e(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$i.loadImage(this,r)}return e$i.loadImage(this,r)}return e$i.loadImage(this,r)},_$g.prototype.pickFeatures=function(e,t,i,n,r){if(!this.ready)throw new t$15("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures&&e$2e(this._pickFeaturesResource)&&0!==this._getFeatureInfoFormats.length){var o=0,a=this;return function l(){if(o>=a._getFeatureInfoFormats.length)return o$1l([]);var u=a._getFeatureInfoFormats[o],c=G$i(a,e,t,i,n,r,u.format);return++o,"json"===u.type?c.fetchJson().then(u.callback).otherwise(l):"xml"===u.type?c.fetchXML().then(u.callback).otherwise(l):"text"===u.type||"html"===u.type?c.fetchText().then(u.callback).otherwise(l):c.fetch({responseType:u.format}).then(s.bind(void 0,u)).otherwise(l)}()}function s(e,t){return e.callback(t)}};var P$j=!1,f$k=new h$18,F$e=!1,p$f=new h$18;function M$j(e,t,i,n,r){P$j=!1,F$e=!1;var o=e._resource,a=o.getUrlComponent(!0),s=e._tags,l={},u=a.match(W$h);return e$2e(u)&&u.forEach((function(r){var o=r.substring(1,r.length-1);e$2e(s[o])&&(l[o]=s[o](e,t,i,n))})),o.getDerivedResource({request:r,templateValues:l})}var E$i=!1,y$g=new o$1o,Z$f=!1;function G$i(e,t,i,n,r,o,a){P$j=!1,F$e=!1,E$i=!1,Z$f=!1;var s=e._pickFeaturesResource,l=s.getUrlComponent(!0),u=e._pickFeaturesTags,c={},h=l.match(W$h);return e$2e(h)&&h.forEach((function(s){var l=s.substring(1,s.length-1);e$2e(u[l])&&(c[l]=u[l](e,t,i,n,r,o,a))})),s.getDerivedResource({templateValues:c})}function b$n(e,t,i){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){var n=e.urlSchemeZeroPadding[t];if("string"==typeof n){var r=n.length;r>1&&(i=i.length>=r?i:new Array(r-i.toString().length+1).join("0")+i)}}return i}function Q$b(e,t,i,n){return b$n(e,"{x}",t)}function $$d(e,t,i,n){var r=e.tilingScheme.getNumberOfXTilesAtLevel(n)-t-1;return b$n(e,"{reverseX}",r)}function ee$a(e,t,i,n){return b$n(e,"{y}",i)}function te$9(e,t,i,n){var r=e.tilingScheme.getNumberOfYTilesAtLevel(n)-i-1;return b$n(e,"{reverseY}",r)}function re$a(e,t,i,n){var r=e.maximumLevel;return b$n(e,"{reverseZ}",e$2e(r)&&n<r?r-n-1:n)}function ie$6(e,t,i,n){return b$n(e,"{z}",n)}function ne$9(e,t,i,n){var r=(t+i+n)%e._subdomains.length;return e._subdomains[r]}function j$f(e,t,i,n){P$j||(e.tilingScheme.tileXYToRectangle(t,i,n,f$k),f$k.west=e$2d.toDegrees(f$k.west),f$k.south=e$2d.toDegrees(f$k.south),f$k.east=e$2d.toDegrees(f$k.east),f$k.north=e$2d.toDegrees(f$k.north),P$j=!0)}function ae$8(e,t,i,n){return j$f(e,t,i,n),f$k.west}function oe$8(e,t,i,n){return j$f(e,t,i,n),f$k.south}function ue$9(e,t,i,n){return j$f(e,t,i,n),f$k.east}function se$6(e,t,i,n){return j$f(e,t,i,n),f$k.north}function k$c(e,t,i,n){F$e||(e.tilingScheme.tileXYToNativeRectangle(t,i,n,p$f),F$e=!0)}function ce$b(e,t,i,n){return k$c(e,t,i,n),p$f.west}function le$b(e,t,i,n){return k$c(e,t,i,n),p$f.south}function he$8(e,t,i,n){return k$c(e,t,i,n),p$f.east}function de$6(e,t,i,n){return k$c(e,t,i,n),p$f.north}function fe$8(e,t,i,n){return e.tileWidth}function me$b(e,t,i,n){return e.tileHeight}function ge$9(e,t,i,n,r,o,a){return I$i(e,t,i,n,r,o),y$g.x}function ve$6(e,t,i,n,r,o,a){return I$i(e,t,i,n,r,o),y$g.y}function _e$6(e,t,i,n,r,o,a){return I$i(e,t,i,n,r,o),e.tileWidth-y$g.x-1}function ye$5(e,t,i,n,r,o,a){return I$i(e,t,i,n,r,o),e.tileHeight-y$g.y-1}var be$7=new h$18,w$i=new o$1p;function I$i(e,t,i,n,r,o,a){if(!E$i){A$k(e,t,i,n,r,o);var s=w$i,l=e.tilingScheme.tileXYToNativeRectangle(t,i,n,be$7);y$g.x=e.tileWidth*(s.x-l.west)/l.width|0,y$g.y=e.tileHeight*(l.north-s.y)/l.height|0,E$i=!0}}function we$5(e,t,i,n,r,o,a){return e$2d.toDegrees(r)}function pe$a(e,t,i,n,r,o,a){return e$2d.toDegrees(o)}function Te$6(e,t,i,n,r,o,a){return A$k(e,t,i,n,r,o),w$i.x}function Se$6(e,t,i,n,r,o,a){return A$k(e,t,i,n,r,o),w$i.y}var xe$5=new a$18;function A$k(e,t,i,n,r,o,a){if(!Z$f){if(e.tilingScheme instanceof c$S){var s=xe$5;s.longitude=r,s.latitude=o,e.tilingScheme.projection.project(s,w$i)}else w$i.x=e$2d.toDegrees(r),w$i.y=e$2d.toDegrees(o);Z$f=!0}}function De$7(e,t,i,n,r,o,a){return a}var y$f=new r$U("MapQuest, Open Street Map and contributors, CC-BY-SA");function L$j(e){e=u$Z(e,{});var t=u$Z(e.url,"https://a.tile.openstreetmap.org/");t=n$1a(t),t+="{z}/{x}/{y}."+u$Z(e.fileExtension,"png");var i=t$10.createIfNeeded(t),n=new c$S({ellipsoid:e.ellipsoid}),r=u$Z(e.minimumLevel,0),o=e.maximumLevel,a=u$Z(e.rectangle,n.rectangle),s=n.positionToTileXY(h$18.southwest(a),r),l=n.positionToTileXY(h$18.northeast(a),r),u=(Math.abs(l.x-s.x)+1)*(Math.abs(l.y-s.y)+1);if(u>4)throw new t$15("The rectangle and minimumLevel indicate that there are "+u+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");var c=u$Z(e.credit,y$f);return"string"==typeof c&&(c=new r$U(c)),new _$g({url:i,credit:c,tilingScheme:n,tileWidth:256,tileHeight:256,minimumLevel:r,maximumLevel:o,rectangle:a})}function y$e(e){var t=[],i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).geometry;if(!e$2e(i))throw new t$15("options.geometry is required.");(!e$2e(i.attributes)||!e$2e(i.primitiveType))&&(i=i.constructor.createGeometry(i));var n=i.attributes,r=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),o=u$Z(e.length,1e4);if(e$2e(n.normal)&&t.push(new d$1o({geometry:k$14.createLineSegmentsForVectors(i,"normal",o),attributes:{color:new o$16(1,0,0,1)},modelMatrix:r})),e$2e(n.tangent)&&t.push(new d$1o({geometry:k$14.createLineSegmentsForVectors(i,"tangent",o),attributes:{color:new o$16(0,1,0,1)},modelMatrix:r})),e$2e(n.bitangent)&&t.push(new d$1o({geometry:k$14.createLineSegmentsForVectors(i,"bitangent",o),attributes:{color:new o$16(0,0,1,1)},modelMatrix:r})),t.length>0)return new y$R({asynchronous:!1,geometryInstances:t,appearance:new t$Q({flat:!0,translucent:!1})})}function te$8(e){if(!e$2e((e=u$Z(e,{})).url))throw new t$15("options.url is required.");var t,i,n,r=o$1l.defer(),o=new _$g(r.promise);function a(a){for(var s,u,c,h=/tileformat/i,d=/tileset/i,f=/tilesets/i,p=/boundingbox/i,_=[],m=a.childNodes[0].childNodes,g=0;g<m.length;g++)if(h.test(m.item(g).nodeName))s=m.item(g);else if(f.test(m.item(g).nodeName)){c=m.item(g);for(var x=m.item(g).childNodes,y=0;y<x.length;y++)d.test(x.item(y).nodeName)&&_.push(x.item(y))}else p.test(m.item(g).nodeName)&&(u=m.item(g));var v;if(!e$2e(c)||!e$2e(u))return v="Unable to find expected tilesets or bbox attributes in "+n.url+".",void((t=l$V.handleError(t,o,o.errorEvent,v,void 0,void 0,void 0,l)).retry||r.reject(new t$13(v)));var $=u$Z(e.fileExtension,s.getAttribute("extension")),b=u$Z(e.tileWidth,parseInt(s.getAttribute("width"),10)),T=u$Z(e.tileHeight,parseInt(s.getAttribute("height"),10)),C=u$Z(e.minimumLevel,parseInt(_[0].getAttribute("order"),10)),S=u$Z(e.maximumLevel,parseInt(_[_.length-1].getAttribute("order"),10)),w=c.getAttribute("profile"),E=e.tilingScheme;if(!e$2e(E))if("geodetic"===w||"global-geodetic"===w)E=new g$15({ellipsoid:e.ellipsoid});else{if("mercator"!==w&&"global-mercator"!==w)return v=n.url+"specifies an unsupported profile attribute, "+w+".",void((t=l$V.handleError(t,o,o.errorEvent,v,void 0,void 0,void 0,l)).retry||r.reject(new t$13(v)));E=new c$S({ellipsoid:e.ellipsoid})}var P=h$18.clone(e.rectangle);if(!e$2e(P)){var A,L,M,R;u$Z(e.flipXY,!1)?(M=new o$1o(parseFloat(u.getAttribute("miny")),parseFloat(u.getAttribute("minx"))),R=new o$1o(parseFloat(u.getAttribute("maxy")),parseFloat(u.getAttribute("maxx")))):(M=new o$1o(parseFloat(u.getAttribute("minx")),parseFloat(u.getAttribute("miny"))),R=new o$1o(parseFloat(u.getAttribute("maxx")),parseFloat(u.getAttribute("maxy"))));var O="geodetic"===w||"mercator"===w;if(E.projection instanceof n$1d||O)A=a$18.fromDegrees(M.x,M.y),L=a$18.fromDegrees(R.x,R.y);else{var D=E.projection;A=D.unproject(M),L=D.unproject(R)}P=new h$18(A.longitude,A.latitude,L.longitude,L.latitude)}P.west<E.rectangle.west&&(P.west=E.rectangle.west),P.east>E.rectangle.east&&(P.east=E.rectangle.east),P.south<E.rectangle.south&&(P.south=E.rectangle.south),P.north>E.rectangle.north&&(P.north=E.rectangle.north);var I=E.positionToTileXY(h$18.southwest(P),C),B=E.positionToTileXY(h$18.northeast(P),C);(Math.abs(B.x-I.x)+1)*(Math.abs(B.y-I.y)+1)>4&&(C=0);var F=i.getDerivedResource({url:"{z}/{x}/{reverseY}."+$});r.resolve({url:F,tilingScheme:E,rectangle:P,tileWidth:b,tileHeight:T,minimumLevel:C,maximumLevel:S,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit})}function s(t){var n=u$Z(e.fileExtension,"png"),o=u$Z(e.tileWidth,256),a=u$Z(e.tileHeight,256),s=u$Z(e.minimumLevel,0),l=e.maximumLevel,u=e$2e(e.tilingScheme)?e.tilingScheme:new c$S({ellipsoid:e.ellipsoid}),c=u$Z(e.rectangle,u.rectangle),h=i.getDerivedResource({url:"{z}/{x}/{reverseY}."+n});r.resolve({url:h,tilingScheme:u,rectangle:c,tileWidth:o,tileHeight:a,minimumLevel:s,maximumLevel:l,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit})}function l(){n.fetchXML().then(a).otherwise(s)}return o$1l(e.url).then((function(e){(i=t$10.createIfNeeded(e)).appendForwardSlash(),n=i.getDerivedResource({url:"tilemapresource.xml"}),l()})).otherwise((function(e){r.reject(e)})),o}function g$n(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url))throw new t$15("options.url is required.");var t=o$1l.defer();_$g.call(this,t.promise),this._tmsResource=void 0,this._xmlResource=void 0,this._options=e,this._deferred=t,this._metadataError=void 0,this._metadataSuccess=this._metadataSuccess.bind(this),this._metadataFailure=this._metadataFailure.bind(this),this._requestMetadata=this._requestMetadata.bind(this);var i,n=this;o$1l(e.url).then((function(e){(i=t$10.createIfNeeded(e)).appendForwardSlash(),n._tmsResource=i,n._xmlResource=i.getDerivedResource({url:"tilemapresource.xml"}),n._requestMetadata()})).otherwise((function(e){t.reject(e)}))}function n$f(e){if(!e$2e((e=u$Z(e,{})).url))throw new t$15("options.url is required.");if(!e$2e(e.channel))throw new t$15("options.channel is required.");var t=e.url,i=u$Z(e.path,"/default_map"),n=t$10.createIfNeeded(t).getDerivedResource({url:"/"===i[0]?i.substring(1):i});n.appendForwardSlash(),this._resource=n,this._url=t,this._path=i,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new r$U('<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="'+n$f.logoUrl+'" title="Google Imagery"/></a>'),this.defaultGamma=1.9,this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var r,o=n.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),a=this;function s(t){var i,n;try{i=JSON.parse(t)}catch{i=JSON.parse(t.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}for(var o,s=0;s<i.layers.length;s++)if(i.layers[s].id===a._channel){o=i.layers[s];break}if(!e$2e(o))throw n="Could not find layer with channel (id) of "+a._channel+".",r=l$V.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$13(n);if(!e$2e(o.version))throw n="Could not find a version in channel (id) "+a._channel+".",r=l$V.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$13(n);if(a._version=o.version,e$2e(i.projection)&&"flat"===i.projection)a._tilingScheme=new g$15({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new h$18(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:e.ellipsoid});else{if(e$2e(i.projection)&&"mercator"!==i.projection)throw n="Unsupported projection "+i.projection+".",r=l$V.handleError(r,a,a._errorEvent,n,void 0,void 0,void 0,u),new t$13(n);a._tilingScheme=new c$S({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid})}a._ready=!0,a._readyPromise.resolve(!0),l$V.handleSuccess(r)}function l(e){var t="An error occurred while accessing "+o.url+".";r=l$V.handleError(r,a,a._errorEvent,t,void 0,void 0,void 0,u),a._readyPromise.reject(new t$13(t))}function u(){o$1l(o.fetchText(),s,l)}u()}e$2e(Object.create)&&(g$n.prototype=Object.create(_$g.prototype),g$n.prototype.constructor=g$n),g$n.prototype._requestMetadata=function(){this._xmlResource.fetchXML().then(this._metadataSuccess).otherwise(this._metadataFailure)},g$n.prototype._metadataSuccess=function(e){for(var t,i,n,r=/tileformat/i,o=/tileset/i,a=/tilesets/i,s=/boundingbox/i,l=[],u=this._xmlResource,c=this._metadataError,h=this._deferred,d=this._requestMetadata,f=e.childNodes[0].childNodes,p=0;p<f.length;p++)if(r.test(f.item(p).nodeName))t=f.item(p);else if(a.test(f.item(p).nodeName)){n=f.item(p);for(var _=f.item(p).childNodes,m=0;m<_.length;m++)o.test(_.item(m).nodeName)&&l.push(_.item(m))}else s.test(f.item(p).nodeName)&&(i=f.item(p));var g;if(!e$2e(n)||!e$2e(i))return g="Unable to find expected tilesets or bbox attributes in "+u.url+".",(c=l$V.handleError(c,this,this.errorEvent,g,void 0,void 0,void 0,d)).retry||h.reject(new t$13(g)),void(this._metadataError=c);var x=this._options,y=u$Z(x.fileExtension,t.getAttribute("extension")),v=u$Z(x.tileWidth,parseInt(t.getAttribute("width"),10)),$=u$Z(x.tileHeight,parseInt(t.getAttribute("height"),10)),b=u$Z(x.minimumLevel,parseInt(l[0].getAttribute("order"),10)),T=u$Z(x.maximumLevel,parseInt(l[l.length-1].getAttribute("order"),10)),C=n.getAttribute("profile"),S=x.tilingScheme;if(!e$2e(S))if("geodetic"===C||"global-geodetic"===C)S=new g$15({ellipsoid:x.ellipsoid});else{if("mercator"!==C&&"global-mercator"!==C)return g=u.url+"specifies an unsupported profile attribute, "+C+".",(c=l$V.handleError(c,this,this.errorEvent,g,void 0,void 0,void 0,d)).retry||h.reject(new t$13(g)),void(this._metadataError=c);S=new c$S({ellipsoid:x.ellipsoid})}var w=h$18.clone(x.rectangle);if(!e$2e(w)){var E,P,A,L;u$Z(x.flipXY,!1)?(A=new o$1o(parseFloat(i.getAttribute("miny")),parseFloat(i.getAttribute("minx"))),L=new o$1o(parseFloat(i.getAttribute("maxy")),parseFloat(i.getAttribute("maxx")))):(A=new o$1o(parseFloat(i.getAttribute("minx")),parseFloat(i.getAttribute("miny"))),L=new o$1o(parseFloat(i.getAttribute("maxx")),parseFloat(i.getAttribute("maxy"))));var M="geodetic"===C||"mercator"===C;if(S.projection instanceof n$1d||M)E=a$18.fromDegrees(A.x,A.y),P=a$18.fromDegrees(L.x,L.y);else{var R=S.projection;E=R.unproject(A),P=R.unproject(L)}w=new h$18(E.longitude,E.latitude,P.longitude,P.latitude)}w.west<S.rectangle.west&&(w.west=S.rectangle.west),w.east>S.rectangle.east&&(w.east=S.rectangle.east),w.south<S.rectangle.south&&(w.south=S.rectangle.south),w.north>S.rectangle.north&&(w.north=S.rectangle.north);var O=S.positionToTileXY(h$18.southwest(w),b),D=S.positionToTileXY(h$18.northeast(w),b);(Math.abs(D.x-O.x)+1)*(Math.abs(D.y-O.y)+1)>4&&(b=0);var I=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+y});h.resolve({url:I,tilingScheme:S,rectangle:w,tileWidth:v,tileHeight:$,minimumLevel:b,maximumLevel:T,tileDiscardPolicy:x.tileDiscardPolicy,credit:x.credit})},g$n.prototype._metadataFailure=function(e){var t=this._options,i=u$Z(t.fileExtension,"png"),n=u$Z(t.tileWidth,256),r=u$Z(t.tileHeight,256),o=u$Z(t.minimumLevel,0),a=t.maximumLevel,s=e$2e(t.tilingScheme)?t.tilingScheme:new c$S({ellipsoid:t.ellipsoid}),l=u$Z(t.rectangle,s.rectangle),u=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+i});this._deferred.resolve({url:u,tilingScheme:s,rectangle:l,tileWidth:n,tileHeight:r,minimumLevel:o,maximumLevel:a,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit})},Object.defineProperties(n$f.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},version:{get:function(){if(!this._ready)throw new t$15("version must not be called before the imagery provider is ready.");return this._version}},requestType:{get:function(){if(!this._ready)throw new t$15("requestType must not be called before the imagery provider is ready.");return this._requestType}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),n$f.prototype.getTileCredits=function(e,t,i){},n$f.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=this._resource.getDerivedResource({url:"query",request:n,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:i+1}});return e$i.loadImage(this,r)},n$f.prototype.pickFeatures=function(e,t,i,n,r){},n$f._logoUrl=void 0,Object.defineProperties(n$f,{logoUrl:{get:function(){return e$2e(n$f._logoUrl)||(n$f._logoUrl=n$17("Assets/Images/google_earth_credit.png")),n$f._logoUrl},set:function(e){o$1q.defined("value",e),n$f._logoUrl=e}}});var p$e=/\/$/,g$m=new r$U('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function m$h(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).mapId;if(!e$2e(t))throw new t$15("options.mapId is required.");var i=t$10.createIfNeeded(u$Z(e.url,"https://{s}.tiles.mapbox.com/v4/")),n=e$U.getAccessToken(e.accessToken);this._mapId=t,this._accessToken=n,this._accessTokenErrorCredit=r$U.clone(e$U.getErrorCredit(e.accessToken));var r=u$Z(e.format,"png");/\./.test(r)||(r="."+r),this._format=r;var o,a=i.getUrlComponent();p$e.test(a)||(a+="/"),a+=t+"/{z}/{x}/{y}"+this._format,i.url=a,i.setQueryParameters({access_token:n}),e$2e(e.credit)?"string"==typeof(o=e.credit)&&(o=new r$U(o)):o=g$m,this._resource=i,this._imageryProvider=new _$g({url:i,credit:o,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function u$f(e){if(!e$2e((e=u$Z(e,{})).url))throw new t$15("options.url is required.");var t=t$10.createIfNeeded(e.url),i=new g$15({rectangle:u$Z(e.rectangle,h$18.MAX_VALUE),numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=i,this._resource=t,this._image=void 0,this._texture=void 0,this._tileWidth=0,this._tileHeight=0,this._errorEvent=new o$1h,this._ready=!1,this._readyPromise=o$1l.defer();var n=e.credit;"string"==typeof n&&(n=new r$U(n)),this._credit=n;var r,o=this;function a(e){o._image=e,o._tileWidth=e.width,o._tileHeight=e.height,o._ready=!0,o._readyPromise.resolve(!0),l$V.handleSuccess(o._errorEvent)}function s(e){var i="Failed to load image "+t.url+".";r=l$V.handleError(r,o,o._errorEvent,i,0,0,0,l,e),o._readyPromise.reject(new t$13(i))}function l(){o$1l(t.fetchImage(),a,s)}l()}function R$h(e,t,i){if(!e$2e(e))throw new t$15("type is required.");if(this.type=e,!e$2e(t))if("json"===e)t="application/json";else if("xml"===e)t="text/xml";else if("html"===e)t="text/html";else{if("text"!==e)throw new t$15('format is required when type is not "json", "xml", "html", or "text".');t="text/plain"}if(this.format=t,!e$2e(i))if("json"===e)i=L$i;else if("xml"===e)i=M$i;else if("html"===e)i=S$e;else{if("text"!==e)throw new t$15('callback is required when type is not "json", "xml", "html", or "text".');i=S$e}this.callback=i}function L$i(e){for(var t=[],i=e.features,n=0;n<i.length;++n){var r=i[n],o=new o$r;if(o.data=r,o.properties=r.properties,o.configureNameFromProperties(r.properties),o.configureDescriptionFromProperties(r.properties),e$2e(r.geometry)&&"Point"===r.geometry.type){var a=r.geometry.coordinates[0],s=r.geometry.coordinates[1];o.position=a$18.fromDegrees(a,s)}t.push(o)}return t}Object.defineProperties(m$h.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),m$h.prototype.getTileCredits=function(e,t,i){if(e$2e(this._accessTokenErrorCredit))return[this._accessTokenErrorCredit]},m$h.prototype.requestImage=function(e,t,i,n){return this._imageryProvider.requestImage(e,t,i,n)},m$h.prototype.pickFeatures=function(e,t,i,n,r){return this._imageryProvider.pickFeatures(e,t,i,n,r)},m$h._defaultCredit=g$m,Object.defineProperties(u$f.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return 0}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.")}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),u$f.prototype.getTileCredits=function(e,t,i){},u$f.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");return this._image},u$f.prototype.pickFeatures=function(e,t,i,n,r){};var d$l="http://www.mapinfo.com/mxp",D$e="http://www.esri.com/wms",P$i="http://www.opengis.net/wfs",C$h="http://www.opengis.net/gml";function M$i(e){var t=e.documentElement;if("MultiFeatureCollection"===t.localName&&t.namespaceURI===d$l)return B$c(e);if("FeatureInfoResponse"===t.localName&&t.namespaceURI===D$e)return x$i(e);if("FeatureCollection"===t.localName&&t.namespaceURI===P$i)return j$e(e);if("ServiceExceptionReport"===t.localName)throw new t$13((new XMLSerializer).serializeToString(t));return"msGMLOutput"===t.localName?O$f(e):X$b(e)}function B$c(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(d$l,"Feature"),n=0;n<i.length;++n){for(var r=i[n],o={},a=r.getElementsByTagNameNS(d$l,"Val"),s=0;s<a.length;++s){var l=a[s];if(l.hasAttribute("ref")){var u=l.getAttribute("ref"),c=l.textContent.trim();o[u]=c}}var h=new o$r;h.data=r,h.properties=o,h.configureNameFromProperties(o),h.configureDescriptionFromProperties(o),t.push(h)}return t}function x$i(e){var t,i=e.documentElement,n=[],r=i.getElementsByTagNameNS("*","FIELDS");if(r.length>0)for(var o=0;o<r.length;++o){var a=r[o];t={};for(var s=a.attributes,l=0;l<s.length;++l){var u=s[l];t[u.name]=u.value}n.push(p$d(a,t))}else for(var c=i.getElementsByTagNameNS("*","FeatureInfo"),h=0;h<c.length;++h){var d=c[h];t={};for(var f=d.childNodes,p=0;p<f.length;++p){var _=f[p];_.nodeType===Node.ELEMENT_NODE&&(t[_.localName]=_.textContent)}n.push(p$d(d,t))}return n}function j$e(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(C$h,"featureMember"),n=0;n<i.length;++n){var r=i[n],o={};E$h(r,o),t.push(p$d(r,o))}return t}function O$f(e){for(var t,i=[],n=e.documentElement.childNodes,r=0;r<n.length;r++)if(n[r].nodeType===Node.ELEMENT_NODE){t=n[r];break}if(!e$2e(t))throw new t$13("Unable to find first child of the feature info xml document");for(var o=t.childNodes,a=0;a<o.length;++a){var s=o[a];if(s.nodeType===Node.ELEMENT_NODE){var l={};E$h(s,l),i.push(p$d(s,l))}}return i}function E$h(e,t){for(var i=!0,n=0;n<e.childNodes.length;++n){var r=e.childNodes[n];r.nodeType===Node.ELEMENT_NODE&&(i=!1),"Point"!==r.localName&&"LineString"!==r.localName&&"Polygon"!==r.localName&&"boundedBy"!==r.localName&&r.hasChildNodes()&&E$h(r,t)&&(t[r.localName]=r.textContent)}return i}function p$d(e,t){var i=new o$r;return i.data=e,i.properties=t,i.configureNameFromProperties(t),i.configureDescriptionFromProperties(t),i}function X$b(e){var t=(new XMLSerializer).serializeToString(e),i=document.createElement("div"),n=document.createElement("pre");n.textContent=t,i.appendChild(n);var r=new o$r;return r.data=e,r.description=i.innerHTML,[r]}var z$g=/<body>\s*<\/body>/im,G$h=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,U$g=/<title>([\s\S]*)<\/title>/im;function S$e(e){if(!z$g.test(e)&&!G$h.test(e)){var t,i=U$g.exec(e);i&&i.length>1&&(t=i[1]);var n=new o$r;return n.name=t,n.description=e,n.data=e,[n]}}const j$d=[3034,3035,3042,3043,3044],w$h=[4471,4559];function m$g(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url))throw new t$15("options.url is required.");if(!e$2e(e.layers))throw new t$15("options.layers is required.");if(e$2e(e.times)&&!e$2e(e.clock))throw new t$15("options.times was specified, so options.clock is required.");this._baseUrl=e.url;var t=t$10.createIfNeeded(e.url),i=t.clone();t.setQueryParameters(m$g.DefaultParameters,!0),i.setQueryParameters(m$g.GetFeatureInfoDefaultParameters,!0),e$2e(e.parameters)&&t.setQueryParameters(v$e(e.parameters)),e$2e(e.getFeatureInfoParameters)&&i.setQueryParameters(v$e(e.getFeatureInfoParameters));var n=this;n._indexedDBSetting={isOpen:!1,clear:function(){n._indexedDBScheduler.clear(n.tablename)},cache:[]},this._reload=void 0,e$2e(e.times)&&(this._timeDynamicImagery=new f$R({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,r,o){return g$l(n,e,t,i,r,o)},reloadFunction:function(){e$2e(n._reload)&&n._reload()}}));var r={};if(r.layers=e.layers,r.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",r.width="{width}",r.height="{height}",parseFloat(t.queryParameters.version)>=1.3){r.crs=u$Z(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof t$N?"EPSG:3857":"CRS:84");const t=r.crs.split(":");if("EPSG"===t[0]&&2===t.length){const e=Number(t[1]);(e>=4e3&&e<5e3&&!w$h.includes(e)||j$d.includes(e))&&(r.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else r.srs=u$Z(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof t$N?"EPSG:3857":"EPSG:4326");e.tilingScheme instanceof c$S&&e.tilingScheme.projection instanceof n$1d&&(r.srs="EPSG:0"),t.setQueryParameters(r,!0),i.setQueryParameters(r,!0);var o={query_layers:e.layers,x:"{i}",y:"{j}",info_format:"{format}"};i.setQueryParameters(o,!0),this._resource=t,this._pickFeaturesResource=i,this._layers=e.layers,this._tileProvider=new _$g({url:t,pickFeaturesUrl:i,tilingScheme:u$Z(e.tilingScheme,new g$15({ellipsoid:e.ellipsoid})),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:u$Z(e.getFeatureInfoFormats,m$g.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures,baseUrl:this._baseUrl}),this._tileProvider._indexedDBSetting=this._indexedDBSetting,this._customRequestHeaders=e.customRequestHeaders,this._tileProvider._customRequestHeaders=e.customRequestHeaders,this._tilingScheme=this._tileProvider._tilingScheme,this._readyPromise=this._tileProvider._readyPromise}function g$l(e,t,i,n,r,o){var a=e$2e(o)?o.data:void 0,s=e._tileProvider;return e$2e(a)&&s._resource.setQueryParameters(a),s.requestImage(t,i,n,r)}function x$h(e,t,i,n,r,o,a){var s=e$2e(a)?a.data:void 0,l=e._tileProvider;return e$2e(s)&&l._pickFeaturesResource.setQueryParameters(s),l.pickFeatures(t,i,n,r,o)}function v$e(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i.toLowerCase()]=e[i]);return t}function a$c(e){return function(t){return new e(t)}}Object.defineProperties(m$g.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},ready:{get:function(){return this._tileProvider.ready}},readyPromise:{get:function(){return this._tileProvider.readyPromise}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}}}),m$g.prototype.getTileCredits=function(e,t,i){return this._tileProvider.getTileCredits(e,t,i)},m$g.prototype.requestImage=function(e,t,i,n){var r,o,a=this._timeDynamicImagery;return e$2e(a)&&(o=a.currentInterval,r=a.getFromCache(e,t,i,n)),e$2e(r)||(r=g$l(this,e,t,i,n,o)),e$2e(r)&&e$2e(a)&&a.checkApproachingInterval(e,t,i,n),r},m$g.prototype.pickFeatures=function(e,t,i,n,r){var o=this._timeDynamicImagery;return x$h(this,e,t,i,n,r,e$2e(o)?o.currentInterval:void 0)},m$g.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"}),m$g.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"}),m$g.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new R$h("json","application/json")),Object.freeze(new R$h("xml","text/xml")),Object.freeze(new R$h("text","text/html"))]);var A$j={ARCGIS_MAPSERVER:a$c(b$q),BING:a$c(o$q),GOOGLE_EARTH:a$c(n$f),MAPBOX:a$c(m$h),SINGLE_TILE:a$c(u$f),TMS:a$c(g$n),URL_TEMPLATE:a$c(_$g),WMS:a$c(m$g),WMTS:a$c(v$E)};function o$l(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).assetId;o$1q.typeOf.number("options.assetId",t),this.defaultAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._ready=!1,this._tileCredits=void 0,this._errorEvent=new o$1h;var i=this,n=n$y._createEndpointResource(t,e),r=e.assetId.toString()+e.accessToken+e.server,o=o$l._endpointCache[r];e$2e(o)||(o=n.fetchJson(),o$l._endpointCache[r]=o),this._readyPromise=o.then((function(e){if("IMAGERY"!==e.type)return o$1l.reject(new t$13("SuperMap3D ion asset "+t+" is not an imagery asset."));var r,o=e.externalType;if(e$2e(o)){var a=A$j[o];if(!e$2e(a))return o$1l.reject(new t$13("Unrecognized SuperMap3D ion imagery type: "+o));r=a(e.options)}else r=new g$n({url:new n$y(e,n)});return i._tileCredits=n$y.getCreditsFromEndpoint(e,n),r.errorEvent.addEventListener((function(e){e.provider=i,i._errorEvent.raiseEvent(e)})),i._imageryProvider=r,r.readyPromise.then((function(){return i._ready=!0,!0}))}))}Object.defineProperties(o$l.prototype,{ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._imageryProvider.rectangle}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._imageryProvider.tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){if(!this._ready)throw new t$15("credit must not be called before the imagery provider is ready.");return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){if(!this._ready)throw new t$15("hasAlphaChannel must not be called before the imagery provider is ready.");return this._imageryProvider.hasAlphaChannel}}}),o$l.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$15("getTileCredits must not be called before the imagery provider is ready.");var n=this._imageryProvider.getTileCredits(e,t,i);return e$2e(n)?this._tileCredits.concat(n):this._tileCredits},o$l.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");return this._imageryProvider.requestImage(e,t,i,n)},o$l.prototype.pickFeatures=function(e,t,i,n,r){if(!this._ready)throw new t$15("pickFeatures must not be called before the imagery provider is ready.");return this._imageryProvider.pickFeatures(e,t,i,n,r)},o$l._endpointCache={};var e$b={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4},n$e=Object.freeze(e$b);function o$k(e){return e=u$Z(e,u$Z.EMPTY_OBJECT),new o$l({assetId:u$Z(e.style,n$e.AERIAL)})}var L$h=576,A$i=100,g$k="#ffffff",_$f="#48b";function I$h(e,t){for(var i=e.length,n=0;n<i;n++){var r=e[n];if(r$U.equals(r,t))return!0}return!1}function O$e(e){var t=e._previousCredit,i=e._currentCredit;r$U.equals(i,t)||(e$2e(t)&&e._CreditContainer.removeChild(t.element),e$2e(i)&&e._CreditContainer.appendChild(i.element),e._previousCredit=i)}var k$b="supermap3d-credit-delimiter",v$d;function E$g(e){var t=document.createElement("span");return t.textContent=e,t.className=k$b,t}function N$d(e,t){if(e$2e(t)){var i=document.createElement(t);i._creditId=e._creditId,i.appendChild(e),e=i}return e}function F$d(e,t,i,n){for(var r=e.childNodes,o=-1,a=0;a<t.length;++a){var s=t[a];if(e$2e(s)){if(o=a,e$2e(i)&&(o*=2,a>0)){var l=o-1;if(r.length<=l)e.appendChild(E$g(i));else{var u=r[l];u.className!==k$b&&e.replaceChild(E$g(i),u)}}var c=s.element;if(r.length<=o)e.appendChild(N$d(c,n));else{var h=r[o];h._creditId!==s._id&&e.replaceChild(N$d(c,n),h)}}}for(++o;o<r.length;)e.removeChild(r[o])}function q$f(e){var t=e._lightboxCredits,i=e.viewport.clientWidth,n=e.viewport.clientHeight;i!==e._lastViewportWidth&&(i<L$h?(t.className="supermap3d-credit-lightbox supermap3d-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="supermap3d-credit-lightbox supermap3d-credit-lightbox-expanded",t.style.marginTop=Math.floor(.5*(n-t.clientHeight))+"px"),e._lastViewportWidth=i),i>=L$h&&n!==e._lastViewportHeight&&(t.style.marginTop=Math.floor(.5*(n-t.clientHeight))+"px",e._lastViewportHeight=n)}function a$b(e,t){var i=e+" {";for(var n in t)t.hasOwnProperty(n)&&(i+=n+": "+t[n]+"; ");return i+=" }\n"}function S$d(){var e="";e+=a$b(".supermap3d-credit-lightbox-overlay",{display:"none","z-index":"1",position:"absolute",top:"0",left:"0",width:"100%",height:"100%","background-color":"rgba(80, 80, 80, 0.8)"}),e+=a$b(".supermap3d-credit-lightbox",{"background-color":"#303336",color:g$k,position:"relative","min-height":A$i+"px",margin:"auto"}),e+=a$b(".supermap3d-credit-lightbox > ul > li a, .supermap3d-credit-lightbox > ul > li a:visited",{color:g$k}),e+=a$b(".supermap3d-credit-lightbox > ul > li a:hover",{color:_$f}),e+=a$b(".supermap3d-credit-lightbox.supermap3d-credit-lightbox-expanded",{border:"1px solid #444","border-radius":"5px","max-width":"370px"}),e+=a$b(".supermap3d-credit-lightbox.supermap3d-credit-lightbox-mobile",{height:"100%",width:"100%"}),e+=a$b(".supermap3d-credit-lightbox-title",{padding:"20px 20px 0 20px"}),e+=a$b(".supermap3d-credit-lightbox-close",{"font-size":"18pt",cursor:"pointer",position:"absolute",top:"0",right:"6px",color:g$k}),e+=a$b(".supermap3d-credit-lightbox-close:hover",{color:_$f}),e+=a$b(".supermap3d-credit-lightbox > ul",{margin:"0",padding:"12px 20px 12px 40px","font-size":"13px"}),e+=a$b(".supermap3d-credit-lightbox > ul > li",{"padding-bottom":"6px"}),e+=a$b(".supermap3d-credit-lightbox > ul > li *",{padding:"0",margin:"0"}),e+=a$b(".supermap3d-credit-expand-link",{"padding-left":"5px",cursor:"pointer","text-decoration":"underline",color:g$k}),e+=a$b(".supermap3d-credit-expand-link:hover",{color:_$f}),e+=a$b(".supermap3d-credit-text",{color:g$k}),e+=a$b(".supermap3d-credit-textContainer *, .supermap3d-credit-logoContainer *",{display:"inline"});var t=document.head,i=document.createElement("style");i.innerHTML=e,t.insertBefore(i,t.firstChild)}function r$l(e,t,i){o$1q.defined("container",e);var n=this;i=u$Z(i,document.body);var r=document.createElement("div");r.className="supermap3d-credit-lightbox-overlay",i.appendChild(r);var o=document.createElement("div");function a(e){o.contains(e.target)||n.hideLightbox()}o.className="supermap3d-credit-lightbox",r.appendChild(o),r.addEventListener("click",a,!1);var s=document.createElement("div");s.className="supermap3d-credit-lightbox-title",s.textContent="Data provided by:",o.appendChild(s);var l=document.createElement("a");l.onclick=this.hideLightbox.bind(this),l.innerHTML="×",l.className="supermap3d-credit-lightbox-close",o.appendChild(l);var u=document.createElement("ul");o.appendChild(u);var c=document.createElement("div");c.className="supermap3d-credit-logoContainer",c.style.display="inline",e.appendChild(c);var h=document.createElement("div");h.className="supermap3d-credit-textContainer",h.style.display="inline",e.appendChild(h);var d=document.createElement("a");d.className="supermap3d-credit-expand-link",d.onclick=this.showLightbox.bind(this),d.textContent="Data attribution",e.appendChild(d),S$d();var f=r$U.clone(r$l.credit);this._delimiter=u$Z(t," • "),this._screenContainer=h,this._CreditContainer=c,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=o,this._creditList=u,this._lightbox=r,this._hideLightbox=a,this._expandLink=d,this._expanded=!1,this._defaultCredits=[],this._credit=f,this._previousCredit=void 0,this._currentcredit=f,this._currentFrameCredits={screenCredits:new e$1Q,lightboxCredits:new e$1Q},this._defaultCredit=void 0,this.viewport=i,this.container=e}function H$l(){if(!e$2e(v$d)){var e=n$17("Assets/Images/logo.png");v$d=new r$U('<a href="http://www.supermap.com" target="_blank"><img src="'+e+'" title="SuperMap"/></a>',!0)}return r$l._CreditInitialized||(r$l._credit=v$d,r$l._CreditInitialized=!0),v$d}function r$k(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._sceneDepthBuffer=void 0,this._cameraDepthBuffer=void 0,this._boundingSphere=new i$1d,this._qureyRegion=[],this._waterHeight=0,this._polygonTexture=null,this._damBreakPosition=[0,0,0],this._frameState=void 0,this._update=!0,this._name="",this._sceneName="",this._cameraName="",this._checking=!1}function h$h(e){e$2e(e._polygonTexture)&&(e._polygonTexture=e._polygonTexture&&e._polygonTexture.destroy(),e._polygonTexture=null)}function i$h(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).attributeName,i=e.perInstanceAttribute;if(!e$2e(t))throw new t$15("options.attributeName is required.");e$2e(i)||(i=!1);var n,r=u$Z(e.glslDatatype,"vec3"),o="v_"+t;if("normal"===t||"tangent"===t||"bitangent"===t)n="vec4 getColor() { return vec4(("+o+" + vec3(1.0)) * 0.5, 1.0); }\n";else switch("st"===t&&(r="vec2"),r){case"float":n="vec4 getColor() { return vec4(vec3("+o+"), 1.0); }\n";break;case"vec2":n="vec4 getColor() { return vec4("+o+", 0.0, 1.0); }\n";break;case"vec3":n="vec4 getColor() { return vec4("+o+", 1.0); }\n";break;case"vec4":n="vec4 getColor() { return "+o+"; }\n";break;default:throw new t$15("options.glslDatatype must be float, vec2, vec3, or vec4.")}var a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n"+(i?"":"attribute "+r+" "+t+";\n")+"varying "+r+" "+o+";\nvoid main()\n{\nvec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);\n"+(i?o+" = czm_batchTable_"+t+"(batchId);\n":o+" = "+t+";\n")+"gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}",s="varying "+r+" "+o+";\n"+n+"\nvoid main()\n{\ngl_FragColor = getColor();\n}";this.material=void 0,this.translucent=u$Z(e.translucent,!1),this._vertexShaderSource=u$Z(e.vertexShaderSource,a),this._fragmentShaderSource=u$Z(e.fragmentShaderSource,s),this._renderState=a$S.getDefaultRenderState(!1,!1,e.renderState),this._closed=u$Z(e.closed,!1),this._attributeName=t,this._glslDatatype=r}function s$d(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.length=u$Z(e.length,1e7),this._length=void 0,this.width=u$Z(e.width,2),this._width=void 0,this.show=u$Z(e.show,!0),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=new p$1d,this.id=e.id,this._id=void 0,this._primitive=void 0}r$l.prototype.addCredit=function(e){if(o$1q.defined("credit",e),e._isIon)return e$2e(this._defaultCredit)||(this._defaultCredit=r$U.clone(H$l())),void(this._currentCredit=this._defaultCredit);e.showOnScreen?this._currentFrameCredits.screenCredits.set(e.id,e):this._currentFrameCredits.lightboxCredits.set(e.id,e)},r$l.prototype.addDefaultCredit=function(e){o$1q.defined("credit",e);var t=this._defaultCredits;I$h(t,e)||t.push(e)},r$l.prototype.removeDefaultCredit=function(e){o$1q.defined("credit",e);var t=this._defaultCredits,i=t.indexOf(e);-1!==i&&t.splice(i,1)},r$l.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0},r$l.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1},r$l.prototype.update=function(){this._expanded&&q$f(this)},r$l.prototype.beginFrame=function(){var e=this._currentFrameCredits,t=e.screenCredits;t.removeAll();for(var i=this._defaultCredits,n=0;n<i.length;++n){var r=i[n];t.set(r.id,r)}e.lightboxCredits.removeAll(),r$U.equals(r$l.credit,this._credit)||(this._credit=r$U.clone(r$l.credit)),this._currentCredit=this._credit},r$l.prototype.endFrame=function(){var e=this._currentFrameCredits.screenCredits.values;F$d(this._screenContainer,e,this._delimiter,void 0);var t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",F$d(this._creditList,t,void 0,"li"),O$e(this)},r$l.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._CreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),i$11(this)},r$l.prototype.isDestroyed=function(){return!1},r$l._credit=void 0,r$l._CreditInitialized=!1,Object.defineProperties(r$l,{credit:{get:function(){return H$l(),r$l._credit},set:function(e){r$l._credit=e,r$l._CreditInitialized=!0}}}),Object.defineProperties(r$k.prototype,{damBreakPosition:{get:function(){return this._damBreakPosition},set:function(e){this._damBreakPosition=e,this._update=!0}},waterHeight:{get:function(){return this._waterHeight},set:function(e){this._waterHeight=e,this._update=!0}}}),r$k.prototype.destroy=function(){return h$h(this),i$11(this)},r$k.prototype.build=function(){""!==this._name||this._checking||(this._name="damBreakAnalysis"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},r$k.prototype.qureyRegion=function(e){if(!e$2e(e)||!e$2e(e.position))throw new t$15("the options is required");this._qureyRegion=e.position,this._update=!0},r$k.prototype.setTerrainBlock=function(e){},r$k.prototype.update=function(e,t,i){if("water"!==t._fboState.name&&!t.passes.pick){if(t._fboState.enabled&&(t._fboState.name===this._sceneName||t._fboState.name===this._cameraName))return void(t._fboState.name===this._sceneName&&e$2e(this._stencilCommand)&&i.push(this._stencilCommand));var n=t.camera;n.bReflect||(p$1d.multiply(this._viewProjMatrix,n.inverseViewMatrix,this._renderTextureMatrix),this._update&&(this._frameState=t,e$2e(this._cameraDepthBuffer)||(this._cameraDepthBuffer=new s$U(e),this._cameraDepthBuffer.environmentVisible.isObjectVisible=!0,this._cameraDepthBuffer.environmentVisible.isGlobalVisible=!0,this._cameraDepthBuffer._visibleViewport=this._visibleViewport,t._framebufferList[this._cameraName]=this._cameraDepthBuffer),this._update=!1,h$h(this),updateCamera(this,e,t),updateViewShed(this,e,t)),e$2e(this._cameraDepthBuffer.framebuffer)&&i.push(correct))}},Object.defineProperties(i$h.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}}),i$h.prototype.getFragmentShaderSource=a$S.prototype.getFragmentShaderSource,i$h.prototype.isTranslucent=a$S.prototype.isTranslucent,i$h.prototype.getRenderState=a$S.prototype.getRenderState,s$d.prototype.update=function(e){if(this.show){if(!e$2e(this._primitive)||!p$1d.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=p$1d.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,e$2e(this._primitive)&&this._primitive.destroy(),0===this.modelMatrix[12]&&0===this.modelMatrix[13]&&0===this.modelMatrix[14]&&(this.modelMatrix[14]=.01);var t=new d$1o({geometry:new R$A({positions:[o$1p.ZERO,o$1p.UNIT_X],width:this.width,vertexFormat:e$1F.VERTEX_FORMAT,colors:[e$1X.RED,e$1X.RED],arcType:m$1h.NONE}),modelMatrix:p$1d.multiplyByUniformScale(this.modelMatrix,this.length,new p$1d),id:this.id,pickPrimitive:this}),i=new d$1o({geometry:new R$A({positions:[o$1p.ZERO,o$1p.UNIT_Y],width:this.width,vertexFormat:e$1F.VERTEX_FORMAT,colors:[e$1X.GREEN,e$1X.GREEN],arcType:m$1h.NONE}),modelMatrix:p$1d.multiplyByUniformScale(this.modelMatrix,this.length,new p$1d),id:this.id,pickPrimitive:this}),n=new d$1o({geometry:new R$A({positions:[o$1p.ZERO,o$1p.UNIT_Z],width:this.width,vertexFormat:e$1F.VERTEX_FORMAT,colors:[e$1X.BLUE,e$1X.BLUE],arcType:m$1h.NONE}),modelMatrix:p$1d.multiplyByUniformScale(this.modelMatrix,this.length,new p$1d),id:this.id,pickPrimitive:this});this._primitive=new y$R({geometryInstances:[t,i,n],appearance:new e$1F,asynchronous:!1})}this._primitive.update(e)}},s$d.prototype.isDestroyed=function(){return!1},s$d.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),i$11(this)};var N$c="varying vec4 positionEC;\nvoid main()\n{\nvec3 direction = normalize(positionEC.xyz);\nczm_ray ray = czm_ray(vec3(0.0), direction);\nvec3 ellipsoid_center = czm_view[3].xyz;\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\nif (!czm_isEmpty(intersection))\n{\ngl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n}\nelse\n{\ndiscard;\n}\nczm_writeLogDepth();\n}\n",V$f="attribute vec4 position;\nvarying vec4 positionEC;\nvoid main()\n{\npositionEC = czm_modelView * position;\ngl_Position = czm_projection * positionEC;\nczm_vertexLogDepth();\n}\n";function c$d(){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1}var f$j=s$Z.supportsTypedArrays()?new Float32Array(12):[],L$g=new o$1p,P$h=new o$1p,C$g=new o$1p,n$d=new o$1p;function Q$a(e,t){var i=e.radii,n=t.camera.positionWC,r=o$1p.multiplyComponents(e.oneOverRadii,n,L$g),o=o$1p.magnitude(r),a=o$1p.normalize(r,P$h),s=o$1p.normalize(o$1p.cross(o$1p.UNIT_Z,r,C$g),C$g),l=o$1p.normalize(o$1p.cross(a,s,n$d),n$d),u=Math.sqrt(o$1p.magnitudeSquared(r)-1),c=o$1p.multiplyByScalar(a,1/o,L$g),h=u/o,d=o$1p.multiplyByScalar(s,h,P$h),f=o$1p.multiplyByScalar(l,h,C$g),p=o$1p.add(c,f,n$d);o$1p.subtract(p,d,p),o$1p.multiplyComponents(i,p,p),o$1p.pack(p,f$j,0);var _=o$1p.subtract(c,f,n$d);o$1p.subtract(_,d,_),o$1p.multiplyComponents(i,_,_),o$1p.pack(_,f$j,3);var m=o$1p.add(c,f,n$d);o$1p.add(m,d,m),o$1p.multiplyComponents(i,m,m),o$1p.pack(m,f$j,6);var g=o$1p.subtract(c,f,n$d);return o$1p.add(g,d,g),o$1p.multiplyComponents(i,g,g),o$1p.pack(g,f$j,9),f$j}function l$i(){}c$d.prototype.update=function(e){if(this._mode=e.mode,e.mode===C$14.SCENE3D){var t=e.context,i=e.mapProjection.ellipsoid,n=e.useLogDepth;if(e$2e(this._command)||(this._rs=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new i$$({renderState:this._rs,boundingVolume:new i$1d(o$1p.ZERO,i.maximumRadius),pass:Le$q.OPAQUE,owner:this})),!e$2e(this._sp)||this._useLogDepth!==n){this._useLogDepth=n;var r=new s$V({name:"DepthPlaneVS",sources:[V$f]}),o=new s$V({name:"DepthPlaneFS",sources:[N$c]});if(n){o.sources.push("#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),o.defines.push("LOG_DEPTH"),r.defines.push("LOG_DEPTH")}this._sp=r$14.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}var a=Q$a(i,e);if(e$2e(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(a);else{var s=new I$1p({attributes:{position:new o$1c({componentDatatype:S$14.FLOAT,componentsPerAttribute:3,values:a})},indices:[0,1,2,2,1,3],primitiveType:W$18.TRIANGLES});this._va=c$13.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:A$18.DYNAMIC_DRAW}),this._command.vertexArray=this._va}}},c$d.prototype.execute=function(e,t){this._mode===C$14.SCENE3D&&this._command.execute(e,t)},c$d.prototype.isDestroyed=function(){return!1},c$d.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var b$m=/\bgl_FragDepthEXT\b/,z$f=/\bdiscard\b/;function T$h(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(!e$2e(i)){var n=t._attributeLocations,r=t.fragmentShaderSource,o=!1;r.useWGSL&&(o=!0);var a=!1,s=r.sources,l=s.length;for(f=0;f<l;++f)if(b$m.test(s[f])||z$f.test(s[f])){a=!0;break}var u=!1,c=r.defines;for(l=c.length,f=0;f<l;++f)if("LOG_DEPTH"===c[f]){u=!0;break}if(e.depthTexture){var h=o?k$Z:"";a||u?!a&&u&&(r=new s$V({defines:["LOG_DEPTH"],sources:[o?"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n gl_FragColor = vec4<f32>(1.0f); \n czm_writeLogDepth(v_depthFromNearPlusOne); \n} \n":"#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\nvoid main() \n{ \n gl_FragColor = vec4(1.0); \n czm_writeLogDepth(); \n} \n"],preSources:[h],useWGSL:o})):r=new s$V({sources:[o?"@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n gl_FragColor = vec4<f32>(1.0f); \n} \n":"void main() \n{ \n gl_FragColor = vec4(1.0); \n} \n"],preSources:[h],useWGSL:o})}else if(a||u)if(!a&&u)r=new s$V({defines:["LOG_DEPTH"],sources:["#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\nvoid main() \n{ \n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n czm_writeLogDepth(); \n} \n"]});else{l=s.length;for(var d=new Array(l+1),f=0;f<l;++f)d[f]=s$V.replaceMain(s[f],"pick_depth_old_main");var p="void main() \n{ \n pick_depth_old_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = "+(u?"czm_packDepth(gl_FragDepthEXT)":"czm_packDepth(gl_FragCoord.z)")+";\n} \n";d[l]=p;for(var _=[],m=0;m<c.length;m++){var g=r.defines[m];_.push(g)}r=new s$V({sources:d,defines:_})}else r=new s$V({sources:["void main() \n{ \n gl_FragColor = czm_packDepth(gl_FragCoord.z);\n} \n"]});i=e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function E$f(e,t,i){var n=e._depthOnlyRenderStateCache,r=n[t.id];if(!e$2e(r)){var o=d$1m.getState(t);o.depthMask=!0,e._context.depthTexture&&(o.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),e$2e(i)&&(o.viewport=void 0),r=d$1m.fromCache(o),n[t.id]=r}return r}l$i.createDepthOnlyDerivedCommand=function(e,t,i,n){var r,o;return e$2e(n)||(n={}),e$2e(n.depthOnlyCommand)&&(r=n.depthOnlyCommand.shaderProgram,o=n.depthOnlyCommand.renderState),n.depthOnlyCommand=i$$.shallowClone(t,n.depthOnlyCommand),e$2e(r)&&n.shaderProgramId===t.shaderProgram.id?(n.depthOnlyCommand.shaderProgram=r,n.depthOnlyCommand.renderState=o):(n.depthOnlyCommand.shaderProgram=T$h(i,t.shaderProgram),n.depthOnlyCommand.renderState=E$f(e,t.renderState,n.depthOnlyCommand._pointCloudEyeDomeLighting),n.shaderProgramId=t.shaderProgram.id),n.depthOnlyCommand._pointCloudEyeDomeLighting&&(n.depthOnlyCommand.framebuffer=void 0),n};var I$g=/\s+czm_writeLogDepth\(|\s+writeLogDepth\(/,u$e=/\s+czm_vertexLogDepth\(|\s+vertexLogDepth\(/,R$g=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;function w$g(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!e$2e(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone(),a=!1;o.useWGSL&&(a=!0),r.defines=e$2e(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),o.defines=e$2e(o.defines)?o.defines.slice(0):[],o.defines.push("LOG_DEPTH");var s,l,u=!1,c=r.sources,h=c.length;for(s=0;s<h;++s)if(u$e.test(c[s])){u=!0;break}if(!u){for(s=0;s<h;++s)c[s]=s$V.replaceMain(c[s],"czm_log_depth_main",a);l=a?"#include <SceneUboDecl> \n@vertex \nfn main(input : VertexInputs) -> FragmentInputs \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n":"\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n",c.push(l)}var d=!0;for(u=!1,h=(c=o.sources).length,s=0;s<h;++s)I$g.test(c[s])&&(u=!0),R$g.test(c[s])&&(d=!1);var f="";if(d&&!e.webgpu&&(f+="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),!u){for(s=0;s<h;s++)c[s]=s$V.replaceMain(c[s],"czm_log_depth_main",a);f+=a?"@fragment \nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(v_depthFromNearPlusOne); \n} \n":"\nvoid main() \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(); \n} \n"}c.push(f),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n,transformFeedbackVaryings:t._transformFeedbackVaryings})}return i}function H$k(e,t,i){var n=e.shaderCache.getDerivedShaderProgram(t,"pick");if(!e$2e(n)){var r=t._attributeLocations,o=t.fragmentShaderSource,a=!1;o.useWGSL&&(a=!0);var s,l=o.sources,u=l.length,c="";if(a){c="@fragment \nfn main(input : FragmentInputs) -> FragmentOutputs \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a < Layer.uTransparentFilter) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n",s=new Array(u+1);for(var h=0;h<u;++h)s[h]=s$V.replaceMain(l[h],"czm_non_pick_main",a);s[u]=c}else{c="vSecondColor"===i?"void main() \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a < uTransparentFilter) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n":"void main() \n{ \n czm_non_pick_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = "+i+"; \n} \n",s=new Array(u+1);for(h=0;h<u;++h)s[h]=s$V.replaceMain(l[h],"czm_non_pick_main");s[u]=c}o=new s$V({sources:s,preSources:o.preSources,defines:o.defines,useWGSL:a}),n=e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:r})}return n}function X$a(e,t){var i=e._pickRenderStateCache,n=i[t.id];if(!e$2e(n)){var r=d$1m.getState(t);r.blending.enabled=!1,r.depthMask=!0,n=d$1m.fromCache(r),i[t.id]=n}return n}function N$b(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(!e$2e(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();r.defines=e$2e(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),o.defines=e$2e(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),i=e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n,transformFeedbackVaryings:t._transformFeedbackVaryings})}return i}function M$h(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"NORMAL");if(!e$2e(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();o.defines=e$2e(o.defines)?o.defines.slice(0):[],o.defines.push("NORMAL"),i=e.shaderCache.createDerivedShaderProgram(t,"NORMAL",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i}function A$h(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"mask");if(!e$2e(i)){var n=t._attributeLocations,r=t.fragmentShaderSource,o=!1;r.useWGSL&&(o=!0);var a,s=r.sources,l=s.length;for(a=0;a<l&&(!b$m.test(s[a])&&!z$f.test(s[a]));++a);var u=r.defines;for(l=u.length,a=0;a<l&&"LOG_DEPTH"!==u[a];++a);var c=o?k$Z:"";r=new s$V({defines:["LOG_DEPTH"],sources:[o?["#include <SceneUboDecl>","varying vColor : vec4<f32>;","varying fSelected : f32;","@fragment","fn main(input : FragmentInputs) -> FragmentOutputs {"," if(vColor.a < 0.1 || fSelected < 0.1){discard;}","\tgl_FragColor = vec4<f32>(0.0, 0.0, 1.0, 1.0);"," czm_writeLogDepth(v_depthFromNearPlusOne);","}"].join("\n"):["#ifdef GL_EXT_frag_depth","#extension GL_EXT_frag_depth : enable","#endif","varying vec4 vColor;","varying vec2 fSelected;","void main() {"," if(vColor.a < 0.1 || fSelected.x < 0.1){discard;}","\tfloat depth = czm_unpackDepth(texture2D(czm_nonSelDepthTexture, gl_FragCoord.xy / czm_viewport.zw));"," depth = czm_reverseLogDepth(depth);"," vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);"," if(-positionEC.z > 10000.0){discard;}"," float near = czm_currentFrustum.x;"," float far = czm_currentFrustum.y;"," float viewZ = -( near * far ) / ( ( far - near ) * depth - far );"," float depthTest = (-positionEC.z > viewZ) && (depth > 0.00001) ? 1.0 : 0.0;","\tgl_FragColor = vec4(0.0, depthTest, 1.0, 1.0);"," czm_writeLogDepth();","}"].join("\n")],preSources:[c],useWGSL:o}),i=e.shaderCache.createDerivedShaderProgram(t,"mask",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:n})}return i}function h$g(e){if(!e$2e(e))throw new t$15("scene is required.");this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;var t=this;function i(e){var i=e.alpha;if(!e$2e(i))return t._alpha=void 0,t._beta=void 0,void(t._gamma=void 0);t._alpha=e$2d.toRadians(i),t._beta=e$2d.toRadians(e.beta),t._gamma=e$2d.toRadians(e.gamma)}window.addEventListener("deviceorientation",i,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",i,!1)}}l$i.createLogDepthCommand=function(e,t,i){var n;return e$2e(i)||(i={}),e$2e(i.command)&&(n=i.command.shaderProgram),i.command=i$$.shallowClone(e,i.command),e$2e(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=w$g(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},l$i.createPickDerivedCommand=function(e,t,i,n){var r,o;return e$2e(n)||(n={}),e$2e(n.pickCommand)&&(r=n.pickCommand.shaderProgram,o=n.pickCommand.renderState),n.pickCommand=i$$.shallowClone(t,n.pickCommand),e$2e(r)&&n.shaderProgramId===t.shaderProgram.id?(n.pickCommand.shaderProgram=r,n.pickCommand.renderState=o):(n.pickCommand.shaderProgram=H$k(i,t.shaderProgram,t.pickId),n.pickCommand.renderState=X$a(e,t.renderState),n.shaderProgramId=t.shaderProgram.id),e.pickPointEnabled&&t.pass===Le$q.S3MTiles&&(n.pickCommand.primitiveType=W$18.POINTS),n},l$i.createHdrCommand=function(e,t,i){var n;return e$2e(i)||(i={}),e$2e(i.command)&&(n=i.command.shaderProgram),i.command=i$$.shallowClone(e,i.command),e$2e(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=N$b(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},l$i.createPrepassDerivedCommand=function(e,t,i,n){var r;return e$2e(n)||(n={}),e$2e(n.command)&&(r=n.command.shaderProgram),n.command=i$$.shallowClone(t,n.command),e$2e(r)&&n.shaderProgramId===t.shaderProgram.id?n.command.shaderProgram=r:(n.command.shaderProgram=e._renderPipeline._prepassRenderer.getPrepassShaderProgram(i,t.shaderProgram),n.shaderProgramId=t.shaderProgram.id),n},l$i.createNormalDerivedCommand=function(e,t,i){var n;return e$2e(i)||(i={}),e$2e(i.command)&&(n=i.command.shaderProgram),i.command=i$$.shallowClone(e,i.command),e$2e(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=M$h(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},l$i.createMaskCommand=function(e,t,i){var n;return e$2e(i)||(i={}),e$2e(i.command)&&(n=i.command.shaderProgram),i.command=i$$.shallowClone(e,i.command),e$2e(n)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=n:(i.command.shaderProgram=A$h(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i};var b$l=new n$15,f$i=new n$15,A$g=new p$1e;function w$f(e,t,i,n){var r=e.direction,o=e.right,a=e.up,s=n$15.fromAxisAngle(r,i,f$i),l=n$15.fromAxisAngle(o,n,b$l),u=n$15.multiply(l,s,l),c=n$15.fromAxisAngle(a,t,f$i);n$15.multiply(c,u,u);var h=p$1e.fromQuaternion(u,A$g);p$1e.multiplyByVector(h,o,o),p$1e.multiplyByVector(h,a,a),p$1e.multiplyByVector(h,r,r)}function r$j(e){this.blobSize=u$Z(e,0)}h$g.prototype.update=function(){if(e$2e(this._alpha)){e$2e(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);var e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,i=this._lastGamma-this._gamma;w$f(this._scene.camera,-e,t,i),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma}},h$g.prototype.isDestroyed=function(){return!1},h$g.prototype.destroy=function(){return this._removeListener(),i$11(this)},r$j.prototype.isReady=function(){return!0},new e$2c,r$j.prototype.shouldDiscardImage=function(e){return e.blob.size===this.blobSize};var I$f="#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#endif\nuniform vec3 u_radii;\nuniform vec3 u_oneOverEllipsoidRadiiSquared;\nvarying vec3 v_positionEC;\nvec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)\n{\nvec3 positionEC = czm_pointAlongRay(ray, intersection);\nvec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;\nvec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));\nvec3 sphericalNormal = normalize(positionMC / u_radii);\nvec3 normalMC = geodeticNormal * side;\nvec3 normalEC = normalize(czm_normal * normalMC);\nvec2 st = czm_ellipsoidWgs84TextureCoordinates(sphericalNormal);\nvec3 positionToEyeEC = -positionEC;\nczm_materialInput materialInput;\nmaterialInput.s = st.s;\nmaterialInput.st = st;\nmaterialInput.str = (positionMC + u_radii) / u_radii;\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\nreturn czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}\nvoid main()\n{\nfloat maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;\nvec3 direction = normalize(v_positionEC);\nvec3 ellipsoidCenter = czm_modelView[3].xyz;\nfloat t1 = -1.0;\nfloat t2 = -1.0;\nfloat b = -2.0 * dot(direction, ellipsoidCenter);\nfloat c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;\nfloat discriminant = b * b - 4.0 * c;\nif (discriminant >= 0.0) {\nt1 = (-b - sqrt(discriminant)) * 0.5;\nt2 = (-b + sqrt(discriminant)) * 0.5;\n}\nif (t1 < 0.0 && t2 < 0.0) {\ndiscard;\n}\nfloat t = min(t1, t2);\nif (t < 0.0) {\nt = 0.0;\n}\nczm_ray ray = czm_ray(t * direction, direction);\nvec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);\nif (czm_isEmpty(intersection))\n{\ndiscard;\n}\nvec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);\nvec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);\ngl_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);\ngl_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);\n#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\nt = (intersection.start != 0.0) ? intersection.start : intersection.stop;\nvec3 positionEC = czm_pointAlongRay(ray, t);\nvec4 positionCC = czm_projection * vec4(positionEC, 1.0);\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + positionCC.w);\n#else\nfloat z = positionCC.z / positionCC.w;\nfloat n = czm_depthRange.near;\nfloat f = czm_depthRange.far;\ngl_FragDepthEXT = (z * (f - n) + f + n) * 0.5;\n#endif\n#endif\n#endif\n}\n",O$d="attribute vec3 position;\nuniform vec3 u_radii;\nvarying vec3 v_positionEC;\nvoid main()\n{\nvec4 p = vec4(u_radii * position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\ngl_Position = czm_modelViewProjection * p;\ngl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);\nczm_vertexLogDepth();\n}\n",S$c={position:0};function p$c(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.center=o$1p.clone(u$Z(e.center,o$1p.ZERO)),this._center=new o$1p,this.radii=o$1p.clone(e.radii),this._radii=new o$1p,this._oneOverEllipsoidRadiiSquared=new o$1p,this._boundingSphere=new i$1d,this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=new p$1d,this._computedModelMatrix=new p$1d,this.show=u$Z(e.show,!0),this.material=u$Z(e.material,r$Y.fromType(r$Y.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.onlySunLighting=u$Z(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=u$Z(e.depthTestEnabled,!0),this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new i$$({owner:u$Z(e._owner,this)}),this._pickCommand=new i$$({owner:u$Z(e._owner,this),pickOnly:!0});var t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function q$e(e){var t=e.cache.ellipsoidPrimitive_vertexArray;if(e$2e(t))return t;var i=O$z.createGeometry(O$z.fromDimensions({dimensions:new o$1p(2,2,2),vertexFormat:n$13.POSITION_ONLY}));return t=c$13.fromGeometry({context:e,geometry:i,attributeLocations:S$c,bufferUsage:A$18.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}var C$f="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n";p$c.prototype.update=function(e){if(this.show&&e.mode===C$14.SCENE3D&&e$2e(this.center)&&e$2e(this.radii)){if(!e$2e(this.material))throw new t$15("this.material must be defined.");var t=e.context,i=this.material.isTranslucent(),n=this._translucent!==i;(!e$2e(this._rs)||n)&&(this._translucent=i,this._rs=d$1m.fromCache({cull:{enabled:!0,face:G$1a.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!i&&t.fragmentDepth,blending:i?Ee$r.ALPHA_BLEND:void 0})),e$2e(this._va)||(this._va=q$e(t));var r=!1,o=this.radii;if(!o$1p.equals(this._radii,o)){o$1p.clone(o,this._radii);var a=this._oneOverEllipsoidRadiiSquared;a.x=1/(o.x*o.x),a.y=1/(o.y*o.y),a.z=1/(o.z*o.z),r=!0}(!p$1d.equals(this.modelMatrix,this._modelMatrix)||!o$1p.equals(this.center,this._center))&&(p$1d.clone(this.modelMatrix,this._modelMatrix),o$1p.clone(this.center,this._center),p$1d.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),r=!0),r&&(o$1p.clone(o$1p.ZERO,this._boundingSphere.center),this._boundingSphere.radius=o$1p.maximumComponent(o),i$1d.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));var s=this._material!==this.material;this._material=this.material,this._material.update(t);var l=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;var u=e.useLogDepth,c=this._useLogDepth!==u;this._useLogDepth=u;var h,d,f=this._colorCommand;(s||l||n||c)&&(h=new s$V({name:"EllipsoidVS",sources:[O$d]}),d=new s$V({name:"EllipsoidFS",sources:[this.material.shaderSource,I$f]}),this.onlySunLighting&&d.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&d.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),d.defines.push("LOG_DEPTH"),d.sources.push(C$f)),this._sp=r$14.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:S$c}),f.vertexArray=this._va,f.renderState=this._rs,f.shaderProgram=this._sp,f.uniformMap=p$19(this._uniforms,this.material._uniforms),f.executeInClosestFrustum=i);var p=e.commandList,_=e.passes;if(_.render&&(f.boundingVolume=this._boundingSphere,f.debugShowBoundingVolume=this.debugShowBoundingVolume,f.modelMatrix=this._computedModelMatrix,f.pass=i?Le$q.TRANSLUCENT:Le$q.OPAQUE,p.push(f)),_.pick){var m=this._pickCommand;(!e$2e(this._pickId)||this._id!==this.id)&&(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(s||l||!e$2e(this._pickSP)||c)&&(h=new s$V({sources:[O$d]}),d=new s$V({sources:[this.material.shaderSource,I$f],pickColorQualifier:"uniform"}),this.onlySunLighting&&d.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&d.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),d.defines.push("LOG_DEPTH"),d.sources.push(C$f)),this._pickSP=r$14.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:S$c}),m.vertexArray=this._va,m.renderState=this._rs,m.shaderProgram=this._pickSP,m.uniformMap=p$19(p$19(this._uniforms,this._pickUniforms),this.material._uniforms),m.executeInClosestFrustum=i),m.boundingVolume=this._boundingSphere,m.modelMatrix=this._computedModelMatrix,m.pass=i?Le$q.TRANSLUCENT:Le$q.OPAQUE,p.push(m)}}},p$c.prototype.isDestroyed=function(){return!1},p$c.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),i$11(this)};var te$7="layout(location=0) in vec3 pos;\nlayout(location=2) in vec2 lonLat;\nlayout(location=3) in vec2 life;\nlayout(location=4) in vec2 texCoord;\nuniform float pointSize;\nuniform float uFieldTextureSize;\nuniform float uMaxFilterValue;\nuniform float uMinFilterValue;\nuniform vec4 particleColor;\nuniform sampler2D velocityTexture;\nuniform sampler2D colorTable;\nuniform float uHasColorTable;\nuniform float uCeil;\nuniform float uFloor;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 lonlatRange;\nout vec4 velocityColor;\nout vec2 outTexCoord;\nfloat computerOnePixelLength(vec3 inPos)\n{\nvec4 viewPos = czm_view * vec4(inPos, 1.0);\nvec4 winPos = czm_projection * viewPos;\nfloat dwidth = czm_metersPerPixel(viewPos);\nwinPos.x = winPos.x - 2.0 * dwidth;\nvec4 newViewPos = czm_inverseProjection * winPos;\nreturn length(viewPos - newViewPos);\n}\nvec4 computePos(vec3 v3Normal, vec3 inPos)\n{\nvec4 viewPos = czm_view * vec4(inPos, 1.0);\n#ifdef SIZEFIXED\nviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength(inPos) * uFieldTextureSize;\n#else\nviewPos.xyz = viewPos.xyz + v3Normal * uFieldTextureSize;\n#endif\nviewPos.xyz = viewPos.xyz * 0.9;\nreturn czm_projection * viewPos;\n}\nvoid main()\n{\nvec3 relativeOriginPos = pos - czm_relativeOrigin;\nvec2 lonLatTexCoord;\n#ifdef TEXTUREEFFECT\nlonLatTexCoord.x = (lonLat.x + czm_pi) / czm_twoPi;\nlonLatTexCoord.y = (lonLat.y + czm_piOverTwo) / czm_pi;\n#else\nlonLatTexCoord.x = (lonLat.x - lonlatRange.x) / (lonlatRange.z - lonlatRange.x);\nlonLatTexCoord.y = (lonLat.y - lonlatRange.y) / (lonlatRange.w - lonlatRange.y);\n#endif\nvec2 velocity = texture(velocityTexture, lonLatTexCoord).xy;\nfloat velocitySize = length(velocity);\nfloat threshold = abs(uCeil - uFloor);\nfloat contourRate = (velocitySize - uFloor) / threshold;\nfloat finalCoord = clamp(contourRate, 0.0, 1.0);\nvelocityColor = mix(particleColor, texture(colorTable, vec2(0.0, finalCoord)).rgba, uHasColorTable);\noutTexCoord= texCoord;\nvec3 upAxis = normalize(relativeOriginPos);\nvec3 eastAxis = cross(vec3(0.0, 0.0, 1.0), upAxis);\neastAxis = normalize(eastAxis);\nvec3 northAxis = cross(upAxis, eastAxis);\nnorthAxis = normalize(northAxis);\n#ifdef FILTER\nif(velocitySize > uMaxFilterValue || velocitySize < uMinFilterValue){\nvelocityColor.a = 0.0;\n}\n#endif\n#ifdef TEXTUREEFFECT\nvec3 nestPos = relativeOriginPos + northAxis * velocity.y * deltaTime * velocityScale + eastAxis * velocity.x * deltaTime * velocityScale;\nvec4 nextPrjPos = czm_viewProjection * vec4(nestPos, 1.0);\nvec4 curPrjPos = czm_viewProjection * vec4(relativeOriginPos, 1.0);\nvec2 direction = normalize(nextPrjPos.xy - curPrjPos.xy);\nfloat cosx = dot(direction, vec2(1.0, 0.0));\nfloat cosy = dot(direction, vec2(0.0, 1.0));\nfloat sinx = sqrt(1.0- cosx*cosx);\nfloat cosYBiggerThan0 = sign(cosy);\nmat2 mat = mat2(cosx, sinx * cosYBiggerThan0, -sinx * cosYBiggerThan0, cosx);\nvec2 realNormal = mat * texCoord.xy;\ngl_Position = computePos(vec3(realNormal.xy, 0.0), relativeOriginPos);\n#else\ngl_PointSize = pointSize;\ngl_Position = czm_viewProjection * vec4(relativeOriginPos, 1);\n#endif\n}\n",re$9="layout(location=0) in vec3 pos;\nlayout(location=3) in vec2 texCoord;\nuniform float pointSize;\nuniform float uFieldTextureSize;\nuniform float uMaxFilterValue;\nuniform float uMinFilterValue;\nuniform vec4 particleColor;\nuniform sampler2D velocityTexture;\nuniform sampler2D colorTable;\nuniform float uHasColorTable;\nuniform float uCeil;\nuniform float uFloor;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 uXYBounds;\nuniform vec2 uZBounds;\nuniform float uTextureDepth;\nout vec4 velocityColor;\nout vec2 outTexCoord;\nfloat computerOnePixelLength()\n{\nvec4 viewPos = czm_modelView * vec4(pos, 1.0);\nvec4 winPos = czm_projection * viewPos;\nfloat dwidth = czm_metersPerPixel(viewPos);\nwinPos.x = winPos.x - 2.0 * dwidth;\nvec4 newViewPos = czm_inverseProjection * winPos;\nreturn length(viewPos - newViewPos);\n}\nvec4 computePos(vec3 v3Normal)\n{\nvec4 viewPos = czm_modelView * vec4(pos, 1.0);\n#ifdef SIZEFIXED\nviewPos.xyz = viewPos.xyz + v3Normal * computerOnePixelLength() * uFieldTextureSize;\n#else\nviewPos.xyz = viewPos.xyz + v3Normal * uFieldTextureSize;\n#endif\nviewPos.xyz = viewPos.xyz * 0.9;\nreturn czm_projection * viewPos;\n}\nvoid main()\n{\nvec2 velocityTexCoord;\nvelocityTexCoord.x = (pos.x - uXYBounds.x) / (uXYBounds.z - uXYBounds.x);\nvelocityTexCoord.y = (pos.y - uXYBounds.y) / (uXYBounds.w - uXYBounds.y);\nfloat texCoordZ = pos.z / (uZBounds.y - uZBounds.x);\nfloat texCoordStep = 1.0 / uTextureDepth;\nfloat timesZ = floor(texCoordZ / texCoordStep);\nvelocityTexCoord.x /= uTextureDepth;\nvelocityTexCoord.x += texCoordStep * timesZ;\nvec3 velocity = texture(velocityTexture, velocityTexCoord).xyz;\nfloat velocitySize = length(velocity);\nfloat threshold = abs(uCeil - uFloor);\nfloat contourRate = (velocitySize - uFloor) / threshold;\nfloat finalCoord = clamp(contourRate, 0.0, 1.0);\nvelocityColor = mix(particleColor, texture(colorTable, vec2(0.0, finalCoord)).rgba, uHasColorTable);\noutTexCoord= texCoord;\n#ifdef FILTER\nif(velocitySize > uMaxFilterValue || velocitySize < uMinFilterValue)\n{\nvelocityColor.a = 0.0;\n}\n#endif\nif(pos.x > uXYBounds.z || pos.x < uXYBounds.x || pos.y > uXYBounds.w || pos.y < uXYBounds.y || pos.z < uZBounds.x || pos.z > uZBounds.y)\n{\nvelocityColor.a = 0.0;\n}\n#ifdef TEXTUREEFFECT\nvec3 nextPos = pos.xyz + velocity.xyz * deltaTime * velocityScale;\nvec4 nextPrjPos = czm_modelViewProjection * vec4(nextPos, 1.0);\nvec4 curPrjPos = czm_modelViewProjection * vec4(pos, 1.0);\nvec2 direction = normalize(nextPrjPos.xy - curPrjPos.xy);\nfloat cosx = dot(direction, vec2(1.0, 0.0));\nfloat cosy = dot(direction, vec2(0.0, 1.0));\nfloat sinx = sqrt(1.0- cosx*cosx);\nfloat cosYBiggerThan0 = sign(cosy);\nmat2 mat = mat2(cosx, sinx * cosYBiggerThan0, -sinx * cosYBiggerThan0, cosx);\nvec2 realNormal = mat * texCoord.xy;\ngl_Position = computePos(vec3(realNormal.xy, 0.0));\n#else\ngl_PointSize = pointSize;\ngl_Position = czm_modelViewProjection * vec4(pos, 1);\n#endif\n}\n",ie$5="precision mediump float;\nin vec4 velocityColor;\nin vec2 outTexCoord;\nout vec4 FragColor;\nuniform sampler2D uFieldTexture;\nvoid main()\n{\nFragColor = velocityColor;\n#ifdef TEXTUREEFFECT\nFragColor = texture(uFieldTexture, outTexCoord) * velocityColor;\n#endif\n}\n",ae$7="precision highp float;\nlayout(location=0) in vec3 pos;\nlayout(location=1) in vec3 oriPos;\nlayout(location=2) in vec2 lonLat;\nlayout(location=3) in vec2 life;\nout vec3 tf_pos;\nout vec3 tf_oriPos;\nout vec2 tf_lonLat;\nout vec2 tf_life;\nuniform sampler2D velocityTexture;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec2 velocityTexRes;\nuniform vec4 lonlatRange;\nfloat fastAtan2(float y, float x)\n{\nfloat ax = abs(x);\nfloat ay = abs(y);\nfloat a = min(ax, ay) / (max(ax, ay) + 1e-18);\nfloat r = ((-0.0464964749 * a * a + 0.15931422) * a * a - 0.327622764) * a * a * a + a;\nif(ay > ax){\nr = 1.57079637 - r;\n}\nif(x < 0.0){\nr = 3.14159274 - r;\n}\nif(y < 0.0){\nr = -r;\n}\nreturn r;\n}\nvec3 ComputeLatLonFromPos(vec3 pos)\n{\nfloat rho = sqrt(pos.x * pos.x + pos.y * pos.y + pos.z * pos.z);\nif (rho < 0.00001)\n{\nreturn vec3(0.0);\n}\nfloat longitude = fastAtan2(pos.y, pos.x);\nfloat latitude = asin(pos.z / rho);\nreturn vec3(longitude,latitude,rho);\n}\nvec2 lookup_wind(const vec2 uv)\n{\nvec2 px = 1.0 / velocityTexRes;\nvec2 vc = (floor(uv * velocityTexRes)) * px;\nvec2 f = fract(uv * velocityTexRes);\nvec2 tl = texture(velocityTexture, vc).rg;\nvec2 tr = texture(velocityTexture, vc + vec2(px.x, 0)).rg;\nvec2 bl = texture(velocityTexture, vc + vec2(0, px.y)).rg;\nvec2 br = texture(velocityTexture, vc + px).rg;\nreturn mix(mix(tl, tr, f.x), mix(bl, br, f.x), f.y);\n}\nvoid main()\n{\nvec2 lonLatTexCoord;\n#ifdef TEXTUREEFFECT\nlonLatTexCoord.x = (lonLat.x + czm_pi) / czm_twoPi;\nlonLatTexCoord.y = (lonLat.y + czm_piOverTwo) / czm_pi;\n#else\nlonLatTexCoord.x = (lonLat.x - lonlatRange.x) / (lonlatRange.z - lonlatRange.x);\nlonLatTexCoord.y = (lonLat.y - lonlatRange.y) / (lonlatRange.w - lonlatRange.y);\n#endif\nvec2 velocity = lookup_wind(lonLatTexCoord);\nvec3 upAxis = normalize(pos);\nvec3 eastAxis = cross(vec3(0.0, 0.0, 1.0), upAxis);\neastAxis = normalize(eastAxis);\nvec3 northAxis = cross(upAxis, eastAxis);\nnorthAxis = normalize(northAxis);\nif(life.x > life.y)\n{\ntf_pos = oriPos;\ntf_life.x = 0.0;\ntf_life.y = life.y;\n}\nelse\n{\ntf_pos = pos + northAxis * velocity.y * deltaTime * velocityScale + eastAxis * velocity.x * deltaTime * velocityScale;\ntf_life.x += life.x + deltaTime;\ntf_life.y = life.y;\n}\ntf_oriPos = oriPos;\ntf_lonLat = ComputeLatLonFromPos(tf_pos).xy;\n#ifndef TEXTUREEFFECT\nvec2 s = step(lonlatRange.xy, tf_lonLat);\nvec2 t = step(tf_lonLat, lonlatRange.zw);\nif (s.x * s.y * t.x * t.y < 1.0) {\ntf_life.x = life.y + 1.0;\n}\n#endif\n}\n",oe$7="precision highp float;\nlayout(location=0) in vec3 pos;\nlayout(location=1) in vec3 oriPos;\nlayout(location=2) in vec2 life;\nout vec3 tf_pos;\nout vec3 tf_oriPos;\nout vec2 tf_life;\nuniform sampler2D velocityTexture;\nuniform float velocityScale;\nuniform float deltaTime;\nuniform vec4 uXYBounds;\nuniform vec2 uZBounds;\nuniform float uTextureDepth;\nvoid main()\n{\nvec2 velocityTexCoord;\nvelocityTexCoord.x = (pos.x - uXYBounds.x) / (uXYBounds.z - uXYBounds.x);\nvelocityTexCoord.y = (pos.y - uXYBounds.y) / (uXYBounds.w - uXYBounds.y);\nfloat texCoordZ = pos.z / (uZBounds.y - uZBounds.x);\nfloat texCoordStep = 1.0 / uTextureDepth;\nfloat timesZ = floor(texCoordZ / texCoordStep);\nvelocityTexCoord.x /= uTextureDepth;\nvelocityTexCoord.x += texCoordStep * timesZ;\nvec3 velocity = texture(velocityTexture, velocityTexCoord).xyz;\nif(life.x > life.y)\n{\ntf_pos = oriPos;\ntf_life.x = 0.0;\ntf_life.y = life.y;\n}\nelse\n{\ntf_pos.xyz = pos.xyz + velocity.xyz * deltaTime * velocityScale;\ntf_life.x += life.x + deltaTime;\ntf_life.y = life.y;\n}\ntf_oriPos = oriPos;\n}\n",ne$8="precision highp float;\nout vec4 FragColor;\nvoid main() {}\n",le$a="uniform sampler2D u_lastColorTexture;\nuniform sampler2D u_colorTexture;\nuniform float u_opacity;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color = texture2D(u_colorTexture, v_textureCoordinates);\nvec4 lastColor = texture2D(u_lastColorTexture, v_textureCoordinates);\nvec4 outColor = color*color.a + lastColor * (1.0 - color.a);\nfloat alpha = outColor.a * u_opacity;\ngl_FragColor = vec4(outColor.rgb, alpha < 0.1 ? 0.0 : alpha);\n}\n";function P$g(e){if(!e._webgl2)throw new t$15("webgl2 is not supported.");this._context=e,this._show=!0,this._filter=!1,this._MaxFilterValue=Number.MAX_VALUE,this._MinFilterValue=Number.MIN_VALUE,this._paricleCountPerDegree=1,this._lifeRange=[5e3,1e4],this._particleColor=new e$1X(1,1,0,1),this._particleSize=5,this._velocityScale=1,this._velocityTexRes=new o$1o(0,0),this._velocityField=void 0,this._dictColorTable=void 0,this._floor=0,this._ceil=10,this._hasColorTable=0,this._hypsometricTexture=void 0,this._dataBounds=h$18.MAX_VALUE,this._zBounds=new o$1o(0,1),this._transformFeedback=void 0,this._normalShaderProgram=void 0,this._feedbackShaderProgram=void 0,this._currentTime=0,this._deltaTime=0,this._transformFeedbackInitialized=!1,this._fieldInitialized=!1,this._fieldDataIndices=void 0,this._textureEffect=!1,this._textureEffectUrl=n$17("Assets/Textures/arrow.png"),this._fieldTexture=void 0,this._fieldTextureSize=30,this._sizeFixed=!0,this._sceneMode=C$14.SCENE3D,this._showParticleTrails=!0,this._fadeOpacity=.98,this._curParticleStateTexture=void 0,this._lastParticleStateTexture=void 0,this._tmpParticleStateTexture=void 0,this._curParticleTextureBuffer=void 0,this._lastParticleTextureBuffer=void 0,this._tmpParticleTextureBuffer=void 0,this._clearCommand=void 0,this._copyColorCommand=void 0,this._copyLastColorCommand=void 0,this._hdrEnable=!1}var de$5=new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);Object.defineProperties(P$g.prototype,{fieldTextureSize:{get:function(){return this._fieldTextureSize},set:function(e){this._fieldTextureSize=e}},sizeFixed:{get:function(){return this._sizeFixed},set:function(e){this._sizeFixed=e,this._transformFeedbackInitialized=!1}},textureEffect:{get:function(){return this._textureEffect},set:function(e){this._textureEffect=e,this._transformFeedbackInitialized=!1}},textureEffectUrl:{get:function(){return this._textureEffectUrl},set:function(e){this._textureEffectUrl=e,this._fieldTexture=void 0}},show:{get:function(){return this._show},set:function(e){this._show=e}},filter:{get:function(){return this._filter},set:function(e){this._filter=e,this._transformFeedbackInitialized=!1}},MaxFilterValue:{get:function(){return this._MaxFilterValue},set:function(e){this._MaxFilterValue=e}},MinFilterValue:{get:function(){return this._MinFilterValue},set:function(e){this._MinFilterValue=e}},paricleCountPerDegree:{get:function(){return this._paricleCountPerDegree},set:function(e){this._paricleCountPerDegree=e,this._transformFeedbackInitialized=!1}},particleLifeRange:{get:function(){return this._lifeRange},set:function(e){this._lifeRange=e,this._transformFeedbackInitialized=!1}},particleColor:{get:function(){return this._particleColor},set:function(e){this._particleColor=e}},particleSize:{get:function(){return this._particleSize},set:function(e){this._particleSize=e}},velocityScale:{get:function(){return this._velocityScale},set:function(e){this._velocityScale=e}},colorTable:{get:function(){return this._dictColorTable},set:function(e){if(!e$2e(e))return e$2e(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),void(this._hasColorTable=0);this._dictColorTable=i$T.clone(e,this._dictColorTable);var t=this._dictColorTable.count();if(t<1)this._hasColorTable=0;else{e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:this._context,width:1024,height:64,pixelFormat:V$12.RGBA})),e$2e(this._dictColorTable)&&(this._dictColorTable.generateBuffer(),e$2e(this._hypsometricTexture)&&this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._dictColorTable._imageBuffer}));var i=0,n=0,r=this._dictColorTable.getItem(0);e$2e(r)&&e$2e(r.altitude)&&(i=parseFloat(r.altitude)),e$2e(r=this._dictColorTable.getItem(t-1))&&e$2e(r.altitude)&&(n=parseFloat(r.altitude)),this._ceiling=Math.max(i,n),this._floor=Math.min(i,n),this._hasColorTable=1}}}}),P$g.prototype.update=function(e){if(this._show&&e$2e(this._velocityField)){if(this._sceneMode!==e.camera._mode&&(this._sceneMode=e.camera._mode,this._transformFeedbackInitialized=!1),this._textureEffect&&e$2e(this._textureEffectUrl)&&!e$2e(this._fieldTexture)){var t=this;o$1l(t$S(this._textureEffectUrl),(function(e){t._fieldTexture=new t$U({context:t._context,source:e,sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT})}),t._transformFeedbackInitialized=!1}))}this._fieldInitialized||(this._createVectorFieldTexture(this._context,this._velocityField),this._fieldInitialized=!0),this._transformFeedbackInitialized||(this._createTransformFeedback(this._context,e),this._transformFeedbackInitialized=!0),e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:this._context,width:1,height:1024,pixelFormat:V$12.RGBA}));var i=(new Date).getTime(),n=i-this._currentTime;this._currentTime=i,this._deltaTime=n,e$2e(this._transformFeedback)&&e.commandList.push(this._transformFeedback)}},P$g.prototype._setVelocityField=function(e){this._velocityField=e,this._fieldInitialized=!1},P$g.prototype._setDataBounds=function(e){this._dataBounds=e,this._transformFeedbackInitialized=!1},P$g.prototype._setZBounds=function(e){this._zBounds=e,this._transformFeedbackInitialized=!1};var ce$a=/\s+czm_writeLogDepth\(/,_e$5=/\s+czm_vertexLogDepth\(/,me$a=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;function pe$9(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!e$2e(i)){var n=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();r.defines=e$2e(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),o.defines=e$2e(o.defines)?o.defines.slice(0):[],o.defines.push("LOG_DEPTH");var a,s=!1,l=r.sources,u=l.length;for(a=0;a<u;++a)if(_e$5.test(l[a])){s=!0;break}if(!s){for(a=0;a<u;++a)l[a]=s$V.replaceMain(l[a],"czm_log_depth_main");"\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n",l.push("\n\nvoid main() \n{ \n czm_log_depth_main(); \n czm_vertexLogDepth(); \n} \n")}for(s=!1,u=(l=o.sources).length,a=0;a<u;++a)ce$a.test(l[a])&&(s=!0),me$a.test(l[a]);var c="";if(!s){for(a=0;a<u;a++)l[a]=s$V.replaceMain(l[a],"czm_log_depth_main");c+="\nvoid main() \n{ \n czm_log_depth_main(); \n czm_writeLogDepth(); \n} \n"}l.push(c),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:n})}return i}P$g.prototype._createTransformFeedback=function(e,t){e$2e(this._transformFeedback)&&this._transformFeedback.destroy();var i,n,r=[];this._sceneMode!==C$14.SCENE3D?(i=new s$V({sources:[oe$7]}),n=new s$V({sources:[re$9]}),r=["tf_pos","tf_oriPos","tf_life"]):(i=new s$V({sources:[ae$7]}),n=new s$V({sources:[te$7]}),r=["tf_pos","tf_oriPos","tf_lonLat","tf_life"]);var o,a=new s$V({sources:[ie$5]});this._textureEffect&&(i.defines.push("TEXTUREEFFECT"),n.defines.push("TEXTUREEFFECT"),a.defines.push("TEXTUREEFFECT")),this._filter&&n.defines.push("FILTER"),this._sizeFixed&&n.defines.push("SIZEFIXED"),this._normalShaderProgram=r$14.fromCache({context:e,vertexShaderSource:n,fragmentShaderSource:a}),t.useLogDepth&&(this._normalShaderProgram=pe$9(e,this._normalShaderProgram)),this._feedbackShaderProgram=r$14.fromCache({context:e,vertexShaderSource:i,fragmentShaderSource:ne$8,transformFeedbackVaryings:r,bufferMode:de$y.SEPARATE_ATTRIBS}),o=this._textureEffect?this._sceneMode!==C$14.SCENE3D?this._createLocalTextureVertexAttributes():this._createGlobalTextureVertexAttributes():this._sceneMode!==C$14.SCENE3D?this._createLocalVertexAttributes():this._createGlobalVertexAttributes();var s=this._createFeedbackShaderUniformMap(),l=this._createNormalShaderUniformMap(),u=d$1m.fromCache({depthTest:{enabled:!0},depthMask:!1,blending:Ee$r.ALPHA_BLEND}),c=this._computeTotalParticleCount();this._transformFeedback=new s$i({pointCount:c,indices:this._fieldDataIndices,textureEffect:this._textureEffect,attributes:o,primitiveMode:this._textureEffect?de$y.TRIANGLES:de$y.POINTS,renderState:u,feedbackShader:this._feedbackShaderProgram,normalShader:this._normalShaderProgram,normalShaderUniformMap:l,feedbackShaderUniformMap:s,modelMatrix:this._sceneMode===C$14.SCENE3D?p$1d.IDENTITY:de$5,fadeOpacity:this._fadeOpacity}),this._transformFeedback._drawEvent.addEventListener(this.drawParticleTrails,this)},P$g.prototype._createGlobalVertexAttributes=function(){var e,t,i,n,r,o,a,s,l;e=e$2d.toDegrees(this._dataBounds.width),t=e$2d.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x,n=e$2d.toDegrees(this._dataBounds.west),r=e$2d.toDegrees(this._dataBounds.south),o=this._zBounds.x;for(var u=(a=Math.ceil(this._paricleCountPerDegree*e))*(s=Math.ceil(this._paricleCountPerDegree*t))*(l=Math.ceil(this._paricleCountPerDegree*i)),c=new Float32Array(3*u),h=new Float32Array(3*u),d=new Float32Array(2*u),f=new Float32Array(2*u),p=0,_=0;_<s;_++)for(var m=0;m<a;m++)for(var g=0;g<l;g++,p++){var x=n+m*(e/a),y=r+_*(t/s),v=o+g*(i/l),$=new o$1p.fromDegrees(x,y,v);c[3*p]=$.x,c[3*p+1]=$.y,c[3*p+2]=$.z,h[3*p]=$.x,h[3*p+1]=$.y,h[3*p+2]=$.z,d[2*p]=e$2d.toRadians(x),d[2*p+1]=e$2d.toRadians(y);var b=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];f[2*p]=0,f[2*p+1]=b}this.lonlatRange=new e$2c(d[0],d[1],d[d.length-2],d[d.length-1]);var T=[];return T.push({index:0,componentsPerAttribute:3,data:c}),T.push({index:1,componentsPerAttribute:3,data:h}),T.push({index:2,componentsPerAttribute:2,data:d}),T.push({index:3,componentsPerAttribute:2,data:f}),T},P$g.prototype._createLocalVertexAttributes=function(){var e,t,i,n,r,o,a,s,l;e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x,n=this._dataBounds.west,r=this._dataBounds.south,o=this._zBounds.x;for(var u=(a=Math.ceil(this._paricleCountPerDegree*e))*(s=Math.ceil(this._paricleCountPerDegree*t))*(l=Math.ceil(this._paricleCountPerDegree*i)),c=new Float32Array(3*u),h=new Float32Array(3*u),d=new Float32Array(2*u),f=0,p=0;p<s;p++)for(var _=0;_<a;_++)for(var m=0;m<l;m++,f++){var g=n+_*(e/(a-1)),x=r+p*(t/(s-1)),y=o+m*(i/l);c[3*f]=g,c[3*f+1]=x,c[3*f+2]=y,h[3*f]=g,h[3*f+1]=x,h[3*f+2]=y;var v=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];d[2*f]=0,d[2*f+1]=v}var $=[];return $.push({index:0,componentsPerAttribute:3,data:c}),$.push({index:1,componentsPerAttribute:3,data:h}),$.push({index:2,componentsPerAttribute:2,data:d}),$},P$g.prototype._createGlobalTextureVertexAttributes=function(){for(var e=e$2d.toDegrees(this._dataBounds.width),t=e$2d.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x,n=e$2d.toDegrees(this._dataBounds.west),r=e$2d.toDegrees(this._dataBounds.south),o=this._zBounds.x,a=Math.ceil(this._paricleCountPerDegree*t),s=Math.ceil(this._paricleCountPerDegree*e),l=Math.ceil(this._paricleCountPerDegree*i),u=a*s*l*4,c=new Uint32Array(u/4*6),h=new Float32Array(2*u),d=new Float32Array(3*u),f=new Float32Array(3*u),p=new Float32Array(2*u),_=new Float32Array(2*u),m=0,g=0;g<a;g++)for(var x=0;x<s;x++)for(var y=0;y<l;y++,m++){for(var v=n+x*(e/(s-1)),$=r+g*(t/(a-1)),b=o+y*(i/l),T=new o$1p.fromDegrees(v,$,b),C=0;C<12;C+=3)d[12*m+C]=T.x,d[12*m+C+1]=T.y,d[12*m+ +C+2]=T.z;for(C=0;C<12;C+=3)f[12*m+C]=T.x,f[12*m+C+1]=T.y,f[12*m+ +C+2]=T.z;for(C=0;C<8;C+=2)p[8*m+C]=e$2d.toRadians(v),p[8*m+C+1]=e$2d.toRadians($);var S=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];_[8*m]=0,_[8*m+1]=S,_[8*m+2]=0,_[8*m+3]=S,_[8*m+4]=0,_[8*m+5]=S,_[8*m+6]=0,_[8*m+7]=S}for(x=0;x<c.length;x++)c[6*x]=4*x,c[6*x+1]=4*x+1,c[6*x+2]=4*x+2,c[6*x+3]=4*x,c[6*x+4]=4*x+2,c[6*x+5]=4*x+3;this._fieldDataIndices=c;for(m=0,y=0;y<h.length;y+=8,m++)h[8*m]=0,h[8*m+1]=0,h[8*m+2]=0,h[8*m+3]=1,h[8*m+4]=1,h[8*m+5]=1,h[8*m+6]=1,h[8*m+7]=0;var w=[];return w.push({index:0,componentsPerAttribute:3,data:d}),w.push({index:1,componentsPerAttribute:3,data:f}),w.push({index:2,componentsPerAttribute:2,data:p}),w.push({index:3,componentsPerAttribute:2,data:_}),w.push({index:4,componentsPerAttribute:2,data:h}),w},P$g.prototype._createLocalTextureVertexAttributes=function(){for(var e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x,n=this._dataBounds.west,r=this._dataBounds.south,o=this._zBounds.x,a=Math.ceil(this._paricleCountPerDegree*e),s=Math.ceil(this._paricleCountPerDegree*t),l=Math.ceil(this._paricleCountPerDegree*i),u=s*a*l*4,c=new Uint32Array(u/4*6),h=new Float32Array(2*u),d=new Float32Array(3*u),f=new Float32Array(3*u),p=new Float32Array(2*u),_=0,m=0;m<s;m++)for(var g=0;g<a;g++)for(var x=0;x<l;x++,_++){for(var y=n+g*(e/(a-1)),v=r+m*(t/(s-1)),$=o+x*(i/l),b=0;b<12;b+=3)d[12*_+b]=y,d[12*_+b+1]=v,d[12*_+ +b+2]=$;for(b=0;b<12;b+=3)f[12*_+b]=y,f[12*_+b+1]=v,f[12*_+ +b+2]=$;var T=(this._lifeRange[1]-this._lifeRange[0])*Math.random()+this._lifeRange[0];p[8*_]=0,p[8*_+1]=T,p[8*_+2]=0,p[8*_+3]=T,p[8*_+4]=0,p[8*_+5]=T,p[8*_+6]=0,p[8*_+7]=T}for(g=0;g<c.length;g++)c[6*g]=4*g,c[6*g+1]=4*g+1,c[6*g+2]=4*g+2,c[6*g+3]=4*g,c[6*g+4]=4*g+2,c[6*g+5]=4*g+3;this._fieldDataIndices=c;for(_=0,x=0;x<h.length;x+=8,_++)h[8*_]=0,h[8*_+1]=0,h[8*_+2]=0,h[8*_+3]=1,h[8*_+4]=1,h[8*_+5]=1,h[8*_+6]=1,h[8*_+7]=0;var C=[];return C.push({index:0,componentsPerAttribute:3,data:d}),C.push({index:1,componentsPerAttribute:3,data:f}),C.push({index:2,componentsPerAttribute:2,data:p}),C.push({index:3,componentsPerAttribute:2,data:h}),C},P$g.prototype._computeTotalParticleCount=function(){if(this._sceneMode!==C$14.SCENE3D){var e=this._dataBounds.width,t=this._dataBounds.height,i=this._zBounds.y-this._zBounds.x;return Math.ceil(this._paricleCountPerDegree*e)*Math.ceil(this._paricleCountPerDegree*t)*Math.ceil(this._paricleCountPerDegree*i)}e=e$2d.toDegrees(this._dataBounds.width),t=e$2d.toDegrees(this._dataBounds.height),i=this._zBounds.y-this._zBounds.x;return Math.ceil(this._paricleCountPerDegree*e)*Math.ceil(this._paricleCountPerDegree*t)*Math.ceil(this._paricleCountPerDegree*i)};var B$b=new e$2c;function i$g(e){o$1q.defined("context",e),this._context=e,this._fieldData=void 0,this._NetCDFData=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._layerBounds=h$18.MAX_VALUE,this._visible=!0,this._type="FieldLayer3D",this._particleVelocityFieldEffect=new P$g(e)}P$g.prototype._createFeedbackShaderUniformMap=function(){var e=this;return{velocityTexture:function(){return e._vectorFieldTexture},velocityScale:function(){return e._velocityScale},velocityTexRes:function(){return e._velocityTexRes},deltaTime:function(){return e._deltaTime},uXYBounds:function(){return B$b.x=e._dataBounds.west,B$b.y=e._dataBounds.south,B$b.z=e._dataBounds.east,B$b.w=e._dataBounds.north,B$b},uZBounds:function(){return e._zBounds},uTextureDepth:function(){return e._texZDepth},lonlatRange:function(){return e.lonlatRange}}},P$g.prototype._createNormalShaderUniformMap=function(){var e=this;return{particleColor:function(){return e._particleColor},pointSize:function(){return e._particleSize},uMaxFilterValue:function(){return e._MaxFilterValue},uMinFilterValue:function(){return e._MinFilterValue},uFieldTexture:function(){return e$2e(e._fieldTexture)?e._fieldTexture:new t$U({context:e._context,width:1,height:1})},uFieldTextureSize:function(){return e._fieldTextureSize},velocityTexture:function(){return e._vectorFieldTexture},colorTable:function(){return e._hypsometricTexture},lonlatRange:function(){return e.lonlatRange},uFloor:function(){return e._floor},uCeil:function(){return e._ceiling},uHasColorTable:function(){return e._hasColorTable},velocityScale:function(){return e._velocityScale},deltaTime:function(){return e._deltaTime},uXYBounds:function(){return B$b.x=e._dataBounds.west,B$b.y=e._dataBounds.south,B$b.z=e._dataBounds.east,B$b.w=e._dataBounds.north,B$b},uZBounds:function(){return e._zBounds},uTextureDepth:function(){return e._texZDepth}}},P$g.prototype._createVectorFieldTexture=function(e,t){e$2e(this._vectorFieldTexture)&&this._vectorFieldTexture.destroy();var i,n=0,r=0;if(t instanceof Array&&(n=(i=this._createCanvasFromDataMatrix(t)).width,r=i.height,!i))return!1;this._velocityTexRes.x=n,this._velocityTexRes.y=r,this._vectorFieldTexture=new t$U({context:e,width:n,height:r,pixelFormat:V$12.RGB,pixelDatatype:_$_.FLOAT}),this._vectorFieldTexture.copyFrom({width:n,height:r,arrayBufferView:i.imageData})},P$g.prototype._createCanvasFromDataMatrix=function(e){var t=e.length;if(!(e[0]instanceof Array))return null;var i,n,r,o,a,s,l,u=e[0].length;if(!(e[0][0]instanceof Array))return null;if(e[0][0][0]instanceof Array){var c=u,h=t,d=e[0][0].length;for(this._texZDepth=d,s=new Float32Array(h*c*d*3),o=0,i=0;i<c;i++)for(n=0;n<d;n++)for(r=0;r<h;r++){var f=null==(l=e[r][i][n]).x?l[0]:l.x,p=null==l.y?l[1]:l.y,_=null==l.z?l[2]:l.z;s[o++]=f,s[o++]=p,s[o++]=_}a={height:c,width:d*h,imageData:s}}else{for(s=new Float32Array(t*u*3),o=0,n=0;n<t;n++)for(i=0;i<u;i++){var m=null==(l=e[n][i]).x?l[0]:l.x,g=null==l.y?l[1]:l.y;s[o++]=m,s[o++]=g,s[o++]=0}a={height:t,width:u,imageData:s}}return a},P$g.prototype.createParticleTrailsResources=function(e,t){if(this._showParticleTrails&&(!e$2e(this._lastParticleStateTexture)||this._lastParticleStateTexture.width!==e.drawingBufferWidth||this._lastParticleStateTexture.height!==e.drawingBufferHeight)){e$2e(this._lastParticleStateTexture)&&(this._lastParticleStateTexture.width!==e.drawingBufferWidth||this._lastParticleStateTexture.height!==e.drawingBufferHeight)&&this.destroyParticleTrailsResources();var i=_$_.UNSIGNED_BYTE;this._hdrEnable&&(i=_$_.FLOAT),this._curParticleStateTexture=new t$U({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:V$12.RGBA}),this._lastParticleStateTexture=new t$U({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:V$12.RGBA}),this._tmpParticleStateTexture=new t$U({context:e,width:e.drawingBufferWidth,height:e.drawingBufferHeight,pixelDatatype:i,pixelFormat:V$12.RGBA});var n=u$Z(this._transformFeedback._framebuffer,t.framebuffer);this._curParticleTextureBuffer=new t$V({context:e,colorTextures:[this._curParticleStateTexture],depthStencilTexture:n.depthStencilTexture,destroyAttachments:!1}),this._lastParticleTextureBuffer=new t$V({context:e,colorTextures:[this._lastParticleStateTexture],destroyAttachments:!1}),this._tmpParticleTextureBuffer=new t$V({context:e,colorTextures:[this._tmpParticleStateTexture],destroyAttachments:!1}),this._clearCommand=new t$W({color:new e$1X(0,0,0,0),renderState:d$1m.fromCache()});var r=this._lastParticleStateTexture,o=this._tmpParticleTextureBuffer;this._copyLastColorCommand=e.createViewportQuadCommand(ie$7,{uniformMap:{colorTexture:function(){return r}},framebuffer:o});var a=this._tmpParticleStateTexture,s=this._curParticleStateTexture,l=this._lastParticleTextureBuffer,u=this._fadeOpacity;this._copyColorCommand=e.createViewportQuadCommand(le$a,{uniformMap:{u_lastColorTexture:function(){return a},u_colorTexture:function(){return s},u_opacity:function(){return u}},framebuffer:l})}},P$g.prototype.destroyParticleTrailsResources=function(){e$2e(this._curParticleStateTexture)&&(this._curParticleStateTexture.destroy(),this._curParticleStateTexture=void 0),e$2e(this._lastParticleStateTexture)&&(this._lastParticleStateTexture.destroy(),this._lastParticleStateTexture=void 0),e$2e(this._tmpParticleStateTexture)&&(this._tmpParticleStateTexture.destroy(),this._tmpParticleStateTexture=void 0),e$2e(this._curParticleTextureBuffer)&&(this._curParticleTextureBuffer.destroy(),this._curParticleTextureBuffer=void 0),e$2e(this._lastParticleTextureBuffer)&&(this._lastParticleTextureBuffer.destroy(),this._lastParticleTextureBuffer=void 0),e$2e(this._tmpParticleTextureBuffer)&&(this._tmpParticleTextureBuffer.destroy(),this._tmpParticleTextureBuffer=void 0),this._clearCommand=void 0,this._copyColorCommand=void 0,this._copyLastColorCommand=void 0},P$g.prototype.drawParticleTrails=function(e,t){!this._showParticleTrails||(this.createParticleTrailsResources(e,t),e$2e(this._copyLastColorCommand)&&this._copyLastColorCommand.execute(e,t),e$2e(this._copyColorCommand)&&this._copyColorCommand.execute(e,t),this._clearCommand.framebuffer=this._curParticleTextureBuffer,this._clearCommand.execute(e,t),this._transformFeedback.beginDraw(e,this._curParticleTextureBuffer,this._transformFeedback,t),this._transformFeedback._drawNormal(e,t))},P$g.prototype.clearLastParticleStateTexture=function(e,t,i,n){if(e$2e(t)&&this._hdrEnable!==t)return this._hdrEnable=t,this.destroyParticleTrailsResources(),void this.createParticleTrailsResources(t,i,n);!e._stateChanged||this.clearLastParticleBuffer(i,n)},P$g.prototype.clearLastParticleBuffer=function(e,t){this._clearCommand.framebuffer=this._lastParticleTextureBuffer,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._curParticleTextureBuffer,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._tmpParticleTextureBuffer,this._clearCommand.execute(e,t)},P$g.prototype.isDestroyed=function(){return!1},P$g.prototype.destroy=function(){return e$2e(this._vectorFieldTexture)&&(this._vectorFieldTexture.destroy(),this._vectorFieldTexture=void 0),e$2e(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),e$2e(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),e$2e(this._transformFeedback)&&(this._transformFeedback.destroy(),this._transformFeedback=void 0),e$2e(this._fieldTexture)&&(this._fieldTexture.destroy(),this._fieldTexture=void 0),this.destroyParticleTrailsResources(),i$11(this)},Object.defineProperties(i$g.prototype,{visible:{get:function(){return this._visible},set:function(e){this._visible=e}},type:{get:function(){return this._type}},fieldData:{get:function(){return this._fieldData},set:function(e){this._fieldData=e,e$2e(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setVelocityField(e)}},NetCDFData:{get:function(){return this._NetCDFData},set:function(e){if(!e$2e(e.longitude)||!e$2e(e.latitude))throw new t$15("coordinates are required.");if(!e$2e(e.uwnd)||!e$2e(e.vwnd))throw new t$15("uwnd or vwnd is required.");if(e.timeOrder=u$Z(e.timeOrder,0),e$2e(this._NetCDFBuffer)){for(var t=this._NetCDFBuffer,i=t.getDataVariable(e.longitude),n=t.getDataVariable(e.latitude),r=t.getDataVariable(e.uwnd),o=t.getDataVariable(e.vwnd),a=0,s=[],l=0;l<n.length;l++){s[l]=[];for(var u=0;u<i.length;u++,a++){var c=n.length*i.length*e.timeOrder;s[l][u]=[r[a+c],o[a+c]]}}this._NetCDFData=s,e$2e(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setVelocityField(s)}}},NetCDFInfo:{get:function(){return this._NetCDFInfo},set:function(e){this._NetCDFInfo=e}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e,e$2e(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setDataBounds(e)}},zBounds:{get:function(){return this._zBounds},set:function(e){this._zBounds=e,e$2e(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect._setZBounds(e)}},particleVelocityFieldEffect:{get:function(){return this._particleVelocityFieldEffect}}}),i$g.prototype.update=function(e){this._visible?e$2e(this._particleVelocityFieldEffect)&&this._particleVelocityFieldEffect.update(e):e$2e(this._particleVelocityFieldEffect)&&e$2e(this._particleVelocityFieldEffect._transformFeedback)&&this._particleVelocityFieldEffect.clearLastParticleBuffer(this._context,e)},i$g.prototype.isDestroyed=function(){return!1},i$g.prototype.destroy=function(){return e$2e(this._particleVelocityFieldEffect)&&(this._particleVelocityFieldEffect.destroy(),this._particleVelocityFieldEffect=void 0),i$11(this)};var ge$8="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nuniform float uWaterHeight;\nvarying vec2 vNoiseCoord;\nvarying vec3 vProjectionCoord;\nvarying vec3 vEyeDir;\nvarying vec3 vNormal;\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvec4 depthClampFarPlane(vec4 clipPos)\n{\nfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\nclipPos.z = min(clipPos.z, clipPos.w);\nreturn clipPos;\n}\nvoid initialWaterParam(vec4 oPos)\n{\nfloat uTimeVal = 0.05;\nfloat uScale = 80.0;\nfloat uScroll = 1.0;\nfloat uNoise = 1.0;\nvec2 uBumpSpeed = vec2(3.0 -3.0);\nmat4 scalemat = mat4(0.5, 0.0, 0.0, 0.0,\n0.0, 0.5, 0.0, 0.0,\n0.0, 0.0, 0.5, 0.0,\n0.5, 0.5, 0.5, 1.0);\nvec4 proj = scalemat * oPos;\nvProjectionCoord = proj.xyw;\nvNoiseCoord.xy = aTexCoord0.xy * uScale + uBumpSpeed * uTimeVal;\nvec4 cameraPos = czm_inverseModel * vec4(czm_cameraPositionWC, 1.0);\nvEyeDir = aPosition.xyz - cameraPos.xyz;\nvNormal = vec3(0.0,0.0,1.0);\n}\nvoid main()\n{\nvec4 newPos = vec4(aPosition.xyz, 1.0);\nnewPos.z = newPos.z + uWaterHeight;\nvec4 pos = czm_modelViewProjection * newPos;\ngl_Position = depthClampFarPlane(pos);\nvTexCoord = aTexCoord0.xy;\ninitialWaterParam(pos);\nclip_vertex = czm_modelView * newPos;\n}\n",ce$9="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uPolygonTexture;\nuniform sampler2D uReflectMap;\nuniform sampler2D uNoiseMap;\nvarying vec2 vNoiseCoord;\nvarying vec3 vProjectionCoord;\nvarying vec3 vEyeDir;\nvarying vec3 vNormal;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvec4 AdjSaturation(in vec4 inputColor, in float saturation)\n{\nvec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721);\nvec3 intensity = vec3(dot(inputColor.rgb, lumCoeff));\nvec3 tempColor = mix(intensity, inputColor.rgb, saturation);\nreturn vec4(tempColor, 1.0);\n}\nvec4 GetWaterColor()\n{\nvec4 uTintColour = vec4(0,0.05,0.05,1);\nvec4 uWaterColour = vec4(0.1804,0.2706,0.3294,1);\nfloat uNoiseScale = 0.05;\nfloat uMinFresnel = 0.3;\nfloat uMaxFresnel = 0.7;\nfloat uFresnelPower = 1.8;\nfloat uWaterBrightness = 0.95;\nvec2 final = vProjectionCoord.xy / vProjectionCoord.z;\nvec3 noiseNormal = (texture2D(uNoiseMap, (vNoiseCoord.xy / 5.0)).rgb - 0.5).rbg * uNoiseScale;\nfinal += noiseNormal.xz;\nfloat realMinFresnel, realMaxFresnel;\nif(uMinFresnel < uMaxFresnel)\n{\nrealMinFresnel = uMinFresnel;\nrealMaxFresnel = uMaxFresnel;\n}\nelse\n{\nrealMinFresnel = uMaxFresnel;\nrealMaxFresnel = uMinFresnel;\n}\nfloat fresnelBias = realMinFresnel;\nfloat fresnelScale = (realMaxFresnel - realMinFresnel) / 1.0;\nfloat fresnel = fresnelBias + fresnelScale * pow(1.0 + dot(normalize(vEyeDir), vNormal), uFresnelPower);\nfresnel = clamp(fresnel, 0.05, 0.95);\nvec4 reflectionColour = texture2D(uReflectMap, final);\nvec4 refractionColour = reflectionColour + uTintColour;\nvec4 resultColour = mix(uWaterColour, reflectionColour, fresnel);\nresultColour = AdjSaturation(resultColour, 1.0);\nresultColour = resultColour * uWaterBrightness;\nresultColour.a = uWaterColour.a;\nreturn resultColour;\n}\nvoid main()\n{\n#if defined(GL_EXT_frag_depth) || defined(WEBGL2)\ngl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\nvec2 texCoord = vTexCoord.xy;\nvec4 waterColor = GetWaterColor();\nvec4 texHeight = texture2D(uPolygonTexture, texCoord.xy);\nif(texHeight.x < 0.5)\n{\ndiscard;\n}\nelse\n{\ngl_FragColor = waterColor;\n}\n}\n",fe$7="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uHeightTexture;\nuniform sampler2D uAssisTexture;\nuniform float uWaterHeight;\nuniform float uTextureWidth;\nuniform float uTextureHeight;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvoid main()\n{\nfloat dStepX = 1.0 / uTextureWidth;\nfloat dStepY = 1.0 / uTextureHeight;\nvec2 texCoord = vTexCoord;\nvec4 texHeight = texture2D(uHeightTexture, texCoord);\nif(texHeight.r > uWaterHeight || texHeight.r < -90000.0)\n{\ngl_FragColor = vec4(0.0,0.0,0.0,1.0);\nreturn;\n}\nvec4 texCenter = texture2D(uAssisTexture, texCoord);\nif(texCenter.x > 0.5)\n{\ngl_FragColor = vec4(1.0,0.0,0.0,1.0);\nreturn;\n}\nvec4 texRight = texture2D(uAssisTexture, vec2(dStepX + texCoord.x, texCoord.y));\nvec4 texTop = texture2D(uAssisTexture, vec2( texCoord.x, dStepY + texCoord.y));\nvec4 texLeft = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y));\nvec4 texBottom = texture2D(uAssisTexture, vec2(texCoord.x, texCoord.y - dStepY));\nvec4 texLeftBottom = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y - dStepY));\nvec4 texRightBottom = texture2D(uAssisTexture, vec2(texCoord.x + dStepX, texCoord.y - dStepY));\nvec4 texLeftTop = texture2D(uAssisTexture, vec2(texCoord.x - dStepX, texCoord.y + dStepY));\nvec4 texRightTop = texture2D(uAssisTexture, vec2(texCoord.x + dStepX, texCoord.y + dStepY));\nif(texCenter.x < 0.5 && texRight.x < 0.5 && texTop.x < 0.5 && texLeft.x < 0.5 && texBottom.x < 0.5 && texLeftBottom.x < 0.5 && texRightBottom.x < 0.5 && texLeftTop.x < 0.5 && texRightTop.x < 0.5)\n{\ndiscard;\n}\ngl_FragColor = vec4(1.0,0.0,0.0,1.0);\n}\n",e$a={Clamp:0,Absolute:1},K$a=Object.freeze(e$a);function I$e(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._floodCommand=void 0,this._boundingSphere=new i$1d,this._qureyRegion=[],this._waterHeight=0,this._polygonTexture=null,this._floodPosition=[0,0,0],this._worldMatrix=p$1d.IDENTITY.clone(),this._bound=[],this._terrainBlock=void 0,this._terrainBlockURL="",this._points=[],this._datasetInfo=void 0,this._frameState=void 0,this._updateFlagTexture=!1,this._updateHeightTexture=!1,this._name="",this._sceneName="",this._initialize=!1,this._waterMode=K$a.Clamp,this._assistTexture=null,this._heightTexture=null,this._flagCommand=void 0,this._regionGeometry=null,this._textureWidth=1024,this._textureHeight=1024,this._loaded=!1,this._layer=null}function Z$e(e){e$2e(e._floodCommand)&&(e._floodCommand.vertexArray=e._floodCommand.vertexArray&&e._floodCommand.vertexArray.destroy(),e._floodCommand.shaderProgram=e._floodCommand.shaderProgram&&e._floodCommand.shaderProgram.destroy(),e._floodCommand=void 0),e$2e(e._flagCommand)&&(e._flagCommand.vertexArray=e._flagCommand.vertexArray&&e._flagCommand.vertexArray.destroy(),e._flagCommand.shaderProgram=e._flagCommand.shaderProgram&&e._flagCommand.shaderProgram.destroy(),e._flagCommand=void 0)}function z$e(e){e$2e(e._polygonTexture)&&(e._polygonTexture=e._polygonTexture&&e._polygonTexture.destroy(),e._polygonTexture=null),e$2e(e._assistTexture)&&(e._assistTexture=e._assistTexture&&e._assistTexture.destroy(),e._assistTexture=null),e$2e(e._heightTexture)&&(e._heightTexture=e._heightTexture&&e._heightTexture.destroy(),e._heightTexture=null)}function $$c(e){if(null!==e._polygonTexture&&null!==e._assistTexture){var t=e._textureWidth,i=e._textureHeight,n=0,r=0;if(e._layer==e._scene.globe){var o=(e._bound[2]-e._bound[0])/t,a=(e._bound[3]-e._bound[1])/i,s=e._floodPosition;n=Math.floor((s.x-e._bound[0])/o),r=Math.floor((s.y-e._bound[1])/a)}else{var l=e._regionGeometry.rect,u=(o=(l.z-l.x)/t,a=(l.w-l.y)/i,s=o$1p.fromDegrees(e._floodPosition.x,e._floodPosition.y,0),new p$1d);p$1d.inverse(e._worldMatrix,u),p$1d.multiplyByPoint(u,s,s),n=Math.floor((s.x-l.x)/o),r=Math.floor((s.y-l.y)/a)}var c=new Uint8Array(t*i*4);c[4*(r*t+n)]=255,e._polygonTexture.copyFrom({width:t,height:i,arrayBufferView:c});var h=new Uint8Array(t*i*4);h[4*(r*t+n)]=255,e._assistTexture.copyFrom({width:t,height:i,arrayBufferView:h})}}function we$4(e,t,i){e._initialize||(l$h(e),e._regionGeometry=ie$4(e),ue$8(e,t),Ee$8(e,t),ne$7(e,t,e._regionGeometry,e._polygonTexture),D$d(e,e._terrainBlockURL,e._bound),e._initialize=!0),e._updateHeightTexture&&e._loaded&&null!=e._terrainBlock&&null!=e._datasetInfo&&re$8(e),e._updateFlagTexture&&te$6(e,t),e$2e(e._floodCommand)&&null!=e._terrainBlock&&null!=e._datasetInfo&&i.push(e._floodCommand)}function be$6(e,t){e._initialize||(e._initialize=!0,l$h(e),e._regionGeometry=ie$4(e),ue$8(e,t),Be$6(e),ne$7(e,t,e._regionGeometry,e._polygonTexture),D$d(e,e._terrainBlockURL,e._bound)),e._updateHeightTexture&&e._loaded&&null!=e._terrainBlock&&null!=e._datasetInfo&&re$8(e),e._updateFlagTexture&&te$6(e,t)}function l$h(e){Re$6(e);var t=e._bound[0],i=e._bound[1],n=e._bound[2],r=e._bound[3],o=o$1p.fromDegrees(.5*(n+t),.5*(r+i),0),a=new i$16(0,0,0);m$19.headingPitchRollToFixedFrame(o,a,t$12.WGS84,m$19.eastNorthUpToFixedFrame,e._worldMatrix)}function Re$6(e){if(0!==e._points.length){for(var t=Number.MAX_VALUE,i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=-Number.MAX_VALUE,o=0;o<e._points.length;o++)t=Math.min(e._points[o].x,t),i=Math.min(e._points[o].y,i),n=Math.max(e._points[o].x,n),r=Math.max(e._points[o].y,r);e._bound.length=0,e._bound.push(t),e._bound.push(i),e._bound.push(n),e._bound.push(r)}}function Ee$8(e,t){if(0!=e._points.length){var i=e._points.length,n=S$14.createTypedArray(S$14.FLOAT,3*i),r=S$14.createTypedArray(S$14.FLOAT,2*i),o=new p$1d;p$1d.inverse(e._worldMatrix,o);for(var a=[],s=0;s<e._qureyRegion.length/3;s++)a[3*s]=e._qureyRegion[3*s],a[3*s+1]=e._qureyRegion[3*s+1],a[3*s+2]=e._qureyRegion[3*s+2];var l=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(a)}}),u=U$18.createGeometry(l);f$Z.updateGeometry(u,a,o),e._boundingSphere=u.boundingSphere;for(s=0;s<u.attributes.position.values.length/3;s++)n[3*s]=u.attributes.position.values[3*s],n[3*s+1]=u.attributes.position.values[3*s+1],n[3*s+2]=u.attributes.position.values[3*s+2],r[2*s]=u.attributes.st.values[2*s],r[2*s+1]=u.attributes.st.values[2*s+1];var c=null,h=ce$z.UNSIGNED_SHORT;i<65535?c=S$14.createTypedArray(S$14.UNSIGNED_SHORT,u.indices.length):(c=S$14.createTypedArray(S$14.UNSIGNED_INT,u.indices.length),h=ce$z.UNSIGNED_INT);for(s=0;s<u.indices.length;s++)c[s]=u.indices[s];Se$5(e,t,n,r,c,h)}}function Se$5(e,t,i,n,r,o){Z$e(e);var a=t$X.createVertexBuffer({context:t,typedArray:i,usage:A$18.STATIC_DRAW}),s=t$X.createVertexBuffer({context:t,typedArray:n,usage:A$18.STATIC_DRAW}),l=[],u={aPosition:0,aTexCoord0:1};l.push({index:u.aPosition,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),l.push({index:u.aTexCoord0,vertexBuffer:s,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var c=t$X.createIndexBuffer({context:t,typedArray:r,usage:A$18.STATIC_DRAW,indexDatatype:o});e._floodCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:e._worldMatrix,boundingVolume:e._boundingSphere,pass:Le$q.ANALYSIS,owner:e,cull:!0}),e._floodCommand.vertexArray=new c$13({context:t,attributes:l,indexBuffer:c});var h=new s$V({sources:[ge$8]});e._floodCommand.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:ce$9,attributeLocations:u}),e._floodCommand.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0}}),e._floodCommand.uniformMap={uWaterHeight:function(){return e._waterHeight},uPolygonTexture:function(){return e._polygonTexture},uReflectMap:function(){return e._frameState._framebufferList.water.renderTexture._fb.getColorTexture(0)},uNoiseMap:function(){return e._frameState._framebufferList.water._waterNormalMap}}}function D$d(e,t,i){""!=t&&4==i.length&&d$1f(t+".xml").then((function(n){var r=n.getElementsByTagName("leftBottom"),o=r[0].children[0].textContent,a=r[0].children[1].textContent,s=n.getElementsByTagName("rightTop"),l=s[0].children[0].textContent,u=s[0].children[1].textContent,c=n.getElementsByTagName("height")[0].textContent,h=n.getElementsByTagName("width")[0].textContent;e._datasetInfo={width:h,height:c,left:o,right:l,top:u,bottom:a,xRatio:(l-o)/h,yRatio:(u-a)/c};for(var d=[],f=0;f<e._datasetInfo.width;f++){for(var p=[],_=0;_<e._datasetInfo.height;_++)p.push(-99999);d.push(p)}ee$9(e,t,i,d)}))}function ee$9(e,t,i,n){u$P(t+'/gridValues.json?bounds={"leftBottom":{"x":'+i[0]+',"y":'+i[1]+'},"rightTop":{"x":'+i[2]+',"y":'+i[3]+"}}").then((function(t){for(var i=t.values,r=0;r<i.length;r++)for(var o=i[r],a=0,s=o.length;a<s;a++){var l=o[a];n[l.column][l.row]=l.value}e._terrainBlock=n;var u=(e._floodPosition.x-e._datasetInfo.left)/e._datasetInfo.xRatio,c=(e._datasetInfo.top-e._floodPosition.y)/e._datasetInfo.yRatio;u=Math.ceil(u),c=Math.ceil(c),n[u][c]>-9e4&&(e._loaded=!0),e._updateHeightTexture=!0}),(function(r){if(400==r.statusCode)for(var o=0;o<2;o++)for(var a=(i[2]-i[0])/2,s=i[0]+a*o,l=s+a,u=0;u<2;u++){var c=(i[3]-i[1])/2,h=i[1]+c*u,d=h+c,f=[];f[0]=s,f[1]=h,f[2]=l,f[3]=d,ee$9(e,t,f,n)}}))}function te$6(e,t){if(null!=e._terrainBlock&&null!=e._datasetInfo){e._flagCommand.execute(t);var i=t.readPixels({x:0,y:0,width:e._textureWidth,height:e._textureHeight,framebuffer:e._flagCommand.framebuffer});e._assistTexture.copyFrom({width:e._textureWidth,height:e._textureHeight,arrayBufferView:i})}}function re$8(e,t){if(null!=e._terrainBlock&&null!=e._datasetInfo){var i=new Float32Array(e._textureWidth*e._textureHeight);if(e._layer==e._scene.globe)for(var n=(e._bound[2]-e._bound[0])/e._textureWidth,r=(e._bound[3]-e._bound[1])/e._textureHeight,o=0;o<e._textureWidth;o++)for(var a=e._bound[0]+n*o,s=0;s<e._textureHeight;s++){-99999!=(f=q$d(e,a,e._bound[1]+r*s))&&(i[s*e._textureWidth+o]=f,e._minHeight=Math.min(f,e._minHeight))}else{var l=e._regionGeometry.rect,u=(l.z-l.x)/e._textureWidth,c=(l.w-l.y)/e._textureHeight;for(o=0;o<e._textureWidth;o++){var h=l.x+u*o;for(s=0;s<e._textureHeight;s++){var d=new o$1p(h,l.y+c*s,0);p$1d.multiplyByPoint(e._worldMatrix,d,d);var f,p=SuperMap3D.Cartographic.fromCartesian(d);-99999!=(f=q$d(e,SuperMap3D.Math.toDegrees(p.longitude),SuperMap3D.Math.toDegrees(p.latitude)))&&(i[s*e._textureWidth+o]=f,e._minHeight=Math.min(f,e._minHeight))}}}e._heightTexture.copyFrom({width:e._textureWidth,height:e._textureHeight,arrayBufferView:i}),e._updateFlagTexture=!0,e._updateHeightTexture=!1}}function q$d(e,t,i){if(t<e._datasetInfo.left||t>e._datasetInfo.right||i<e._datasetInfo.bottom||i>e._datasetInfo.top)return-99999;var n=(t-e._datasetInfo.left)/e._datasetInfo.xRatio,r=(e._datasetInfo.top-i)/e._datasetInfo.yRatio;return n=Math.ceil(n),r=Math.ceil(r),e._terrainBlock[n][r]}function ue$8(e,t){var i=e._textureWidth,n=e._textureHeight;z$e(e),null===e._polygonTexture&&(e._polygonTexture=new t$U({context:t,width:e._textureWidth,height:e._textureHeight,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1})),null===e._assistTexture&&(e._assistTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),flipY:!1})),$$c(e),null===e._heightTexture&&(e._heightTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.LUMINANCE,pixelDatatype:_$_.FLOAT,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR}),flipY:!1}))}function ie$4(e,t){for(var i=[],n=0;n<e._qureyRegion.length/3;n++)i[3*n]=e._qureyRegion[3*n],i[3*n+1]=e._qureyRegion[3*n+1],i[3*n+2]=e._qureyRegion[3*n+2];var r=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),o=0,a=U$18.createGeometry(r),s=a.attributes.position.values;S$14.createTypedArray(S$14.FLOAT,s.length);var l=S$14.createTypedArray(S$14.FLOAT,s.length/3*2),u=new e$2c(e._bound[0]*e$2d.RADIANS_PER_DEGREE,e._bound[1]*e$2d.RADIANS_PER_DEGREE,e._bound[2]*e$2d.RADIANS_PER_DEGREE,e._bound[3]*e$2d.RADIANS_PER_DEGREE);if(e._layer==e._scene.globe){var c=e._bound[2]-e._bound[0],h=e._bound[3]-e._bound[1];for(n=0;n<s.length;n+=3){var d=new o$1p(s[n],s[n+1],s[n+2]),f=SuperMap3D.Cartographic.fromCartesian(d),p=SuperMap3D.Math.toDegrees(f.longitude),_=SuperMap3D.Math.toDegrees(f.latitude);l[o++]=(p-e._bound[0])/c,l[o++]=(_-e._bound[1])/h}var m=new p$1d;p$1d.inverse(e._worldMatrix,m),f$Z.updateGeometry(a,i,m)}else{m=new p$1d;p$1d.inverse(e._worldMatrix,m),f$Z.updateGeometry(a,i,m);for(c=(u=f$Z.updateGeoBounds(a)).z-u.x,h=u.w-u.y,n=0;n<s.length;n+=3)l[o++]=(s[n]-u.x)/c,l[o++]=(s[n+1]-u.y)/h}return{vertices:a.attributes.position.values,texcoords:l,indices:a.indices,rect:u}}function ne$7(e,t,i,n){if(e$2e(i)){var r=new i$$({primitiveType:W$18.TRIANGLES}),o=t$X.createVertexBuffer({context:t,typedArray:i.vertices,usage:A$18.STATIC_DRAW}),a=t$X.createVertexBuffer({context:t,typedArray:i.texcoords,usage:A$18.STATIC_DRAW}),s=[],l={aPosition:0,aTexCoord0:1};s.push({index:l.aPosition,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({index:l.aTexCoord0,vertexBuffer:a,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1});var u=t$X.createIndexBuffer({context:t,typedArray:i.indices,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});r.vertexArray=new c$13({context:t,attributes:s,indexBuffer:u});var c=new s$V({sources:["attribute vec4 position;\nattribute vec4 aTexCoord0;\nvarying vec2 vTexCoord;\nvoid main()\n{\n vTexCoord = vec2(aTexCoord0.xy);\n vec2 vPos = aTexCoord0.xy * 2.0 - 1.0;\n gl_Position = vec4(vPos, 0.1, 1.0);\n}\n"]}),h=new s$V({sources:[fe$7]});r.shaderProgram=r$14.fromCache({context:t,vertexShaderSource:c,fragmentShaderSource:h,attributeLocations:l}),r.framebuffer=new t$V({context:t,colorTextures:[n],destroyAttachments:!1}),r.renderState=d$1m.fromCache({cull:{enabled:!1}}),r.uniformMap={uTextureWidth:function(){return e._textureWidth},uTextureHeight:function(){return e._textureHeight},uWaterHeight:function(){return e._waterHeight},uHeightTexture:function(){return e._heightTexture},uAssisTexture:function(){return e._assistTexture}},e._flagCommand=r}}function _e$4(e){e._loaded=!1,e._initialize=!1,e._updateFlagTexture=!1,e._updateHeightTexture=!1}function Be$6(e){var t=new e$2c(e._bound[0]*e$2d.RADIANS_PER_DEGREE,e._bound[1]*e$2d.RADIANS_PER_DEGREE,e._bound[2]*e$2d.RADIANS_PER_DEGREE,e._bound[3]*e$2d.RADIANS_PER_DEGREE);e._layer!==e._scene.globe&&(t=e._regionGeometry.rect),e._layer._setFloodTexture(e._polygonTexture,t,e._worldMatrix)}function Ie$5(e){e._layer._removeFloodTexture()}function g$j(){this.enabled=!0,this.density=2e-4,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}Object.defineProperties(I$e.prototype,{floodPosition:{get:function(){return this._floodPosition},set:function(e){this._floodPosition=e,this._updateFlagTexture=!0,$$c(this)}},waterHeight:{get:function(){return this._waterHeight},set:function(e){this._waterHeight=e,this._updateFlagTexture=!0,$$c(this)}},waterMode:{get:function(){return this._waterMode},set:function(e){this._waterMode=e,this._updateFlagTexture=!0}},layer:{get:function(){return this._layer},set:function(e){this._layer=e,Z$e(this),z$e(this),_e$4(this)}}}),I$e.prototype.destroy=function(){return this._scene._analyst3D.remove(this._name,!0),null!==this._scene&&this._waterMode===K$a.Clamp&&Ie$5(this),Z$e(this),z$e(this),i$11(this)},I$e.prototype.build=function(){""===this._name&&(this._name="floodAnalysis3D"+this._scene._analyst3D._layerIndex,this._sceneName=this._name+"_scene",this._cameraName=this._name+"_camera",this._scene._analyst3D.add(this))},I$e.prototype.qureyRegion=function(e){if(!e$2e(e)||!e$2e(e.position))throw new t$15("the options is required");this._qureyRegion=e.position,this._points.length=0;for(var t=this._qureyRegion.length/3,i=0;i<t;i++){var n=new o$1p(this._qureyRegion[3*i],this._qureyRegion[3*i+1],this._qureyRegion[3*i+2]);this._points.push(n)}_e$4(this)},I$e.prototype.terrainURL=function(e){this._terrainBlockURL=e},I$e.prototype.update=function(e,t,i){this._frameState=t,this._textureWidth=e.drawingBufferWidth,this._textureHeight=e.drawingBufferHeight,this._waterMode===K$a.Absolute?we$4(this,e,i):be$6(this,e)};for(var l$g=[359.393,800.749,1275.6501,2151.1192,3141.7763,4777.5198,6281.2493,12364.307,15900.765,49889.0549,78026.8259,99260.7344,120036.3873,151011.0158,156091.1953,203849.3112,274866.9803,319916.3149,493552.0528,628733.5874],t$b=[2e-5,2e-4,1e-4,7e-5,5e-5,4e-5,3e-5,19e-6,1e-5,85e-7,62e-7,58e-7,53e-7,52e-7,51e-7,42e-7,4e-6,34e-7,26e-7,22e-7],v$c=0;v$c<t$b.length;++v$c)t$b[v$c]*=1e6;for(var b$k=t$b[1],u$d=t$b[t$b.length-1],d$k=0;d$k<t$b.length;++d$k)t$b[d$k]=(t$b[d$k]-u$d)/(b$k-u$d);var r$i=0;function x$g(e){var t,i=l$g,n=i.length;if(e<i[0])return r$i=0;if(e>i[n-1])return r$i=n-2;if(e>=i[r$i]){if(r$i+1<n&&e<i[r$i+1])return r$i;if(r$i+2<n&&e<i[r$i+2])return++r$i}else if(r$i-1>=0&&e>=i[r$i-1])return--r$i;for(t=0;t<n-2&&!(e>=i[t]&&e<i[t+1]);++t);return r$i=t}var B$a=new o$1p;function i$f(e){if(!e$2e(e)||!e$2e(e.scene))throw new t$15("options.scene is required.");this._scene=e.scene,this.samplingWindow=u$Z(e.samplingWindow,i$f.defaultSettings.samplingWindow),this.quietPeriod=u$Z(e.quietPeriod,i$f.defaultSettings.quietPeriod),this.warmupPeriod=u$Z(e.warmupPeriod,i$f.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=u$Z(e.minimumFrameRateDuringWarmup,i$f.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=u$Z(e.minimumFrameRateAfterWarmup,i$f.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new o$1h,this._nominalFrameRate=new o$1h,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;var t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener((function(e,i){l$f(t)})),this._hiddenPropertyName=void 0!==document.hidden?"hidden":void 0!==document.mozHidden?"mozHidden":void 0!==document.msHidden?"msHidden":void 0!==document.webkitHidden?"webkitHidden":void 0;var i=void 0!==document.hidden?"visibilitychange":void 0!==document.mozHidden?"mozvisibilitychange":void 0!==document.msHidden?"msvisibilitychange":void 0!==document.webkitHidden?"webkitvisibilitychange":void 0;function n(){o$j(t)}this._visibilityChangeRemoveListener=void 0,e$2e(i)&&(document.addEventListener(i,n,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(i,n,!1)})}function l$f(e,t){if(!(e._pauseCount>0)){var i=Et$c();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=i+e.quietPeriod/h$17.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/h$17.SECONDS_PER_MILLISECOND;else if(i>=e._quietPeriodEndTime){e._frameTimes.push(i);var n=i-e.samplingWindow/h$17.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=n){for(;e._frameTimes.length>=2&&e._frameTimes[1]<n;)e._frameTimes.shift();var r=(i-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/r,r>1e3/(i>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup)?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}}function o$j(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}function h$f(e,t,i){this.context=e,this.commandList=[],this.commandListRealtimeRaster=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=C$14.SCENE3D,this.morphTime=C$14.getMorphTime(C$14.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=i,this.mapProjection=void 0,this.camera=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,depth:!1,postProcess:!1,offscreen:!1,asynchronous:!1,fbo:!1,normal:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,density:void 0,sse:void 0,minimumBrightness:void 0},this.terrainExaggeration=1,this._framebufferList=[],this.shadowState={shadowsEnabled:!0,lightShadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.imagerySplitPosition=new o$1o,this.globeSplitPosition=new o$1o,this.frustumSplits=[],this.backgroundColor=void 0,this.sunColor=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this._fboState={name:"normal",enabled:!1,frameBufferType:Qe$c.NORMAL},this.useType=0,this.frustumIndex=0,this.multiViewportIndex=-1,this.globeBottomLevel=0,this.minTerrainHeight=0,this.maxTerrainHeight=0,this.TAAEnable=!1,this.rasterLineWidth=1,this.pickIDColor=new e$1X,this.tilesetPassState=void 0,this.requests=[],this.rasterPerFrame=!1,this.pbrMaterialsArr=[]}function i$e(e,t){this.near=u$Z(e,0),this.far=u$Z(t,0);for(var i=Le$q.NUMBER_OF_PASSES,n=new Array(i),r=new Array(i),o=0;o<i;++o)n[o]=[],r[o]=0;this.commands=n,this.indices=r}g$j.prototype.update=function(e){if(e.fog.enabled=this.enabled){var t=e.camera,i=t.positionCartographic;if(e.context.webgpu){if(e.mode!==C$14.SCENE3D)return void(e.fog.enabled=!1)}else if(!e$2e(i)||i.height>8e5||e.mode!==C$14.SCENE3D)return void(e.fog.enabled=!1);var n=i.height,r=x$g(n),o=e$2d.clamp((n-l$g[r])/(l$g[r+1]-l$g[r]),0,1),a=e$2d.lerp(t$b[r],t$b[r+1],o),s=1e6*this.density;a=a*(s-s/b$k*u$d)*1e-6;var l=o$1p.normalize(t.positionWC,B$a);a*=1-Math.abs(o$1p.dot(t.directionWC,l)),e.fog.density=a,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness}},i$f.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8},i$f.fromScene=function(e){if(!e$2e(e))throw new t$15("scene is required.");return(!e$2e(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new i$f({scene:e})),e._frameRateMonitor},Object.defineProperties(i$f.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}}),i$f.prototype.pause=function(){++this._pauseCount,1===this._pauseCount&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)},i$f.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)},i$f.prototype.isDestroyed=function(){return!1},i$f.prototype.destroy=function(){return this._preUpdateRemoveListener(),e$2e(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),i$11(this)};var Ne$6="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform vec4 u_initialColor;\nuniform float uParentMixDirection;\nuniform vec3 u_sunLightColor;\nuniform vec3 u_ambientLightColor;\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#ifdef WEBGPU\nuniform TileUBO {\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_dayTextureTranslationAndScale[16];\nuniform vec4 u_dayTextureSize[16];\nuniform vec4 u_dayTextureTexCoordsRectangle[16];\nuniform bool u_dayTextureUseWebMercatorT[16];\nuniform bool u_dayTextureFlipY[16];\nuniform vec4 u_normalTextureTranslationAndScale;\nuniform vec4 uTileBounds;\nuniform vec4 u_tileRectangle;\nuniform vec3 u_center3D;\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\nuniform float u_useNormalTexture;\n};\n#else\nuniform vec4 uTileBounds;\n#if TEXTURE_UNITS > 0\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform vec4 u_dayTextureSize[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\nuniform bool u_dayTextureFlipY[TEXTURE_UNITS];\n#endif\nuniform vec4 u_normalTextureTranslationAndScale;\nuniform float u_useNormalTexture;\n#endif\n#if GRIDTEXTURE_UNITS > 0\nuniform sampler2D u_gridTextures[GRIDTEXTURE_UNITS];\nuniform bool u_gridTextureUseWebMercatorT[GRIDTEXTURE_UNITS];\nuniform vec4 u_gridTextureTexCoordsRectangle[GRIDTEXTURE_UNITS];\n#endif\n#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_transparentBackColor[TEXTURE_UNITS];\nuniform bool u_imageryClipEnable[TEXTURE_UNITS];\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SPLIT\nuniform vec2 u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SWIPE\nuniform vec4 u_dayTextureSwipeRegion[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_GLOBESPLIT\nuniform vec2 u_GlobeSplitDirection;\n#endif\n#ifdef APPLY_GLOBESWIPE\nuniform vec4 u_GlobeSwipeRegion;\n#endif\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n#endif\n#ifdef SHOW_OCEAN_WAVES\nuniform sampler2D u_oceanNormalMap;\n#endif\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nuniform vec2 u_lightingFadeDistance;\n#endif\n#ifdef TILE_LIMIT_RECTANGLE\nuniform vec4 u_cartographicLimitRectangle;\n#endif\n#ifdef GROUND_ATMOSPHERE\nuniform vec2 u_nightFadeDistance;\n#endif\n#ifdef TRANSLUCENT\nuniform vec4 u_frontFaceAlphaByDistance;\nuniform vec4 u_backFaceAlphaByDistance;\n#endif\n#ifdef UNDERGROUND_COLOR\nuniform vec4 u_undergroundColor;\nuniform vec4 u_undergroundColorAlphaByDistance;\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nuniform sampler2D u_clippingPlanes;\nuniform mat4 u_clippingPlanesMatrix;\nuniform vec4 u_clippingPlanesEdgeStyle;\n#endif\n#if defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nuniform float u_minimumBrightness;\n#endif\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift;\n#endif\nuniform sampler2D u_normalTexture;\nvarying vec3 vertNorm;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n#ifdef SHOW_REFLECTIVE_OCEAN\n#include <globeOcean>\n#endif\n#ifdef APPLY_MATERIAL\nvarying float v_height;\nvarying float v_slope;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nvarying float v_distance;\nvarying vec3 v_fogRayleighColor;\nvarying vec3 v_fogMieColor;\n#endif\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nfloat interpolateByDistance(vec4 nearFarScalar, float distance)\n{\nfloat startDistance = nearFarScalar.x;\nfloat startValue = nearFarScalar.y;\nfloat endDistance = nearFarScalar.z;\nfloat endValue = nearFarScalar.w;\nfloat t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\nreturn mix(startValue, endValue, t);\n}\n#endif\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)\n{\nreturn sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\n}\n#endif\nvarying float v_height2;\n#if defined(Excavate_Region) || defined(Excavate_Outer) || defined(Apply_ImageryClip) || (defined(SLOPE_ANALYSIS) && defined(SlopeRegion)) || defined(HYPSOMETRIC_REGION)\nuniform sampler2D uModifyRasterTexture;\n#endif\n#include <globeAnalysis>\nvec3 colorCorrect(vec3 rgb) {\n#ifdef COLOR_CORRECT\nvec3 hsb = czm_RGBToHSB(rgb);\nhsb.x += u_hsbShift.x;\nhsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0);\nhsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0;\nrgb = czm_HSBToRGB(hsb);\n#endif\nreturn rgb;\n}\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates);\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);\nvec4 sRGBToLinear( in vec4 value ) {\n#ifndef HDR\nreturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n#else\nreturn value;\n#endif\n}\nvec4 LinearTosRGB( in vec4 value ) {\n#ifndef HDR\nreturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n#else\nreturn value;\n#endif\n}\nvec3 getNormalFromNormalTexture(){\nvec2 normalTextureTranslation = u_normalTextureTranslationAndScale.xy;\nvec2 normalTextureScale = u_normalTextureTranslationAndScale.zw;\nvec2 normalTextureCoordinates = v_textureCoordinates.xy * normalTextureScale + normalTextureTranslation;\nvec3 normalTC = texture2D(u_normalTexture, normalTextureCoordinates.xy).xyz;\nnormalTC = (normalTC - 0.5) * 2.0;\nreturn normalTC;\n}\nvec3 tranformNormalFromTagentToEC(vec3 normalInTagent){\nvec3 zAxis = normalize(vertNorm);\nvec3 xAxis = normalize(vec3(-vertNorm.y, vertNorm.x, 0));\nvec3 yAxis = normalize(cross(zAxis, xAxis));\nmat3 matrix = mat3(xAxis, yAxis, zAxis);\nreturn czm_normal3D * matrix * normalInTagent;\n}\nvec4 lightShading(vec3 normalEC, vec4 color){\nfloat diffuseIntensity = clamp(czm_getLambertDiffuse(czm_sunDirectionEC, normalize(normalEC)) * 0.9 + 0.3, 0.0, 1.0);\nreturn vec4(color.rgb * u_sunLightColor.rgb * diffuseIntensity + u_ambientLightColor.rgb * 0.25, color.a);\n}\nvoid main()\n{\n#ifdef APPLY_GLOBESPLIT\nvec2 splitPosition = czm_globeSplitPosition;\nif (u_GlobeSplitDirection.x < 0.0 && gl_FragCoord.x > splitPosition.x) {\ndiscard;\n}\nelse if (u_GlobeSplitDirection.x > 0.0 && gl_FragCoord.x < splitPosition.x) {\ndiscard;\n}\nif(u_GlobeSplitDirection.y < 0.0 && gl_FragCoord.y > splitPosition.y) {\ndiscard;\n}\nelse if(u_GlobeSplitDirection.y > 0.0 && gl_FragCoord.y < splitPosition.y) {\ndiscard;\n}\n#endif\n#ifdef APPLY_GLOBESWIPE\nif (gl_FragCoord.x < u_GlobeSwipeRegion.x || gl_FragCoord.y > u_GlobeSwipeRegion.y) {\ndiscard;\n}\nelse if (gl_FragCoord.x > u_GlobeSwipeRegion.z || gl_FragCoord.y < u_GlobeSwipeRegion.w) {\ndiscard;\n}\n#endif\n#ifdef Excavate_Region\nif(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w > 0.5)\n{\ndiscard;\n}\n#endif\n#ifdef Excavate_Outer\nif(texture2D(uModifyRasterTexture, v_textureCoordinates.xy).w < 0.1)\n{\ndiscard;\n}\n#endif\n#ifdef TILE_LIMIT_RECTANGLE\nif (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||\nv_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)\n{\ndiscard;\n}\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nfloat clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);\n#endif\nvec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0));\n#ifdef SHOW_TILE_BOUNDARIES\nif (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||\nv_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))\n{\ncolor = vec4(1.0, 0.0, 0.0, 1.0);\n}\n#endif\n#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)\nvec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0));\nvec3 normalEC = czm_normal3D * normalMC;\n#endif\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nfloat cameraDist;\nif (czm_sceneMode == czm_sceneMode2D)\n{\ncameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;\n}\nelse if (czm_sceneMode == czm_sceneModeColumbusView)\n{\ncameraDist = -czm_view[3].z;\n}\nelse\n{\ncameraDist = length(czm_view[3]);\n}\nfloat fadeOutDist = u_lightingFadeDistance.x;\nfloat fadeInDist = u_lightingFadeDistance.y;\nif (czm_sceneMode != czm_sceneMode3D) {\nvec3 radii = czm_getWgs84EllipsoidEC().radii;\nfloat maxRadii = max(radii.x, max(radii.y, radii.z));\nfadeOutDist -= maxRadii;\nfadeInDist -= maxRadii;\n}\nfloat fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#else\nfloat fade = 0.0;\n#endif\n#ifdef SHOW_REFLECTIVE_OCEAN\ncolor = getOceanColor(color, v_positionEC, v_positionMC, normalEC, normalMC, fade);\n#endif\n#ifdef APPLY_MATERIAL\nczm_materialInput materialInput;\nmaterialInput.st = v_textureCoordinates.st;\nmaterialInput.normalEC = normalize(v_normalEC);\nmaterialInput.slope = v_slope;\nmaterialInput.height = v_height;\nczm_material material = czm_getMaterial(materialInput);\ncolor.xyz = mix(color.xyz, material.diffuse, material.alpha);\n#endif\nvec3 realNormal = vec3(0.0, 0.0, 1.0);\nif(u_useNormalTexture > 0.5) {\nrealNormal = getNormalFromNormalTexture();\n}\n#ifdef ENABLE_LIGHTING\nvec4 finalColor;\nvec3 lightingNormalEC;\n#ifdef ENABLE_VERTEX_LIGHTING\nlightingNormalEC = v_normalEC;\n#else\nif(u_useNormalTexture > 0.5) {\nlightingNormalEC = tranformNormalFromTagentToEC(realNormal);\n}\nelse {\nlightingNormalEC = normalEC;\n}\n#endif\nfinalColor = lightShading(lightingNormalEC, color);\n#else\nvec4 finalColor = color;\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nvec4 clippingPlanesEdgeColor = vec4(1.0);\nclippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;\nfloat clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;\nif (clipDistance < clippingPlanesEdgeWidth)\n{\nfinalColor = clippingPlanesEdgeColor;\n}\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvec3 fogColor = colorCorrect(v_fogMieColor) + finalColor.rgb * colorCorrect(v_fogRayleighColor);\n#ifndef HDR\nconst float fExposure = 2.0;\nfogColor = vec3(1.0) - exp(-fExposure * fogColor);\n#endif\n#endif\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)\nvec3 atmosphereLightDirection = czm_sunDirectionWC;\n#else\nvec3 atmosphereLightDirection = czm_lightDirectionWC;\n#endif\n#ifdef FOG\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nfloat darken = clamp(dot(normalize(czm_viewerPositionECEF), atmosphereLightDirection), u_minimumBrightness, 1.0);\nfogColor *= darken;\n#endif\n#ifdef HDR\nconst float modifier = 0.15;\nfinalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor, modifier), finalColor.a);\n#else\nfinalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor), finalColor.a);\n#endif\n#endif\n#ifdef HYPSOMETRIC_ANALYSIS\nfinalColor = getHypsometricAnalysisColor(finalColor, v_textureCoordinates.xy);\n#endif\n#ifdef SLOPE_ANALYSIS\nfinalColor = getSlopeAnalysisColor(finalColor, v_textureCoordinates.xy, realNormal);\n#endif\n#ifdef GROUND_ATMOSPHERE\nif (czm_sceneMode != czm_sceneMode3D)\n{\ngl_FragColor = finalColor;\n#ifdef Height_Map\ngl_FragColor = czm_packValue(v_height2);\n#endif\nreturn;\n}\n#if defined(PER_FRAGMENT_GROUND_ATMOSPHERE) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))\nfloat mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);\nvec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);\nxy *= czm_viewport.zw * mpp * 0.5;\nvec3 direction = normalize(vec3(xy, -czm_currentFrustum.x));\nczm_ray ray = czm_ray(vec3(0.0), direction);\nvec3 ellipsoid_center = czm_view[3].xyz;\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\nvec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);\nellipsoidPosition = (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;\nAtmosphereColor atmosColor = computeGroundAtmosphereFromSpace(ellipsoidPosition, true, atmosphereLightDirection);\nvec3 groundAtmosphereColor = colorCorrect(atmosColor.mie) + finalColor.rgb * colorCorrect(atmosColor.rayleigh);\n#ifndef HDR\ngroundAtmosphereColor = vec3(1.0) - exp(-fExposure * groundAtmosphereColor);\n#endif\nfadeInDist = u_nightFadeDistance.x;\nfadeOutDist = u_nightFadeDistance.y;\nfloat sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#ifdef HDR\nsunlitAtmosphereIntensity = max(sunlitAtmosphereIntensity * sunlitAtmosphereIntensity, 0.03);\n#endif\ngroundAtmosphereColor = mix(groundAtmosphereColor, fogColor, sunlitAtmosphereIntensity);\n#else\nvec3 groundAtmosphereColor = fogColor;\n#endif\n#ifdef HDR\ngroundAtmosphereColor = czm_saturation(groundAtmosphereColor, 1.6);\n#endif\nfinalColor = vec4(mix(finalColor.rgb, groundAtmosphereColor, fade), finalColor.a);\n#endif\n#ifdef UNDERGROUND_COLOR\nif (gl_FrontFacing == false)\n{\nfloat distanceFromEllipsoid = max(czm_eyeHeight, 0.0);\nfloat distance = max(v_distance - distanceFromEllipsoid, 0.0);\nfloat blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);\nvec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);\nfinalColor = alphaBlend(undergroundColor, finalColor);\n}\n#endif\n#ifdef TRANSLUCENT\nvec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;\nfinalColor.a *= interpolateByDistance(alphaByDistance, v_distance);\n#endif\nif (finalColor.a == 0.0) {\ndiscard;\n}\ngl_FragColor = finalColor;\n#ifdef Height_Map\ngl_FragColor = czm_packValue(v_height2);\n#endif\n#ifdef FLOOD_ANALYSIS\ngl_FragColor = getFloodAnalysisColor(gl_FragColor, v_textureCoordinates);\n#endif\n}\n",He$5="#ifdef QUANTIZATION_BITS12\nattribute vec4 compressed0;\nattribute float compressed1;\n#else\nattribute vec4 position3DAndHeight;\nattribute vec4 textureCoordAndEncodedNormals;\n#ifdef WEBGPU\nuniform TileUBO {\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_dayTextureTranslationAndScale[16];\nuniform vec4 u_dayTextureSize[16];\nuniform vec4 u_dayTextureTexCoordsRectangle[16];\nuniform bool u_dayTextureUseWebMercatorT[16];\nuniform bool u_dayTextureFlipY[16];\nuniform vec4 u_normalTextureTranslationAndScale;\nuniform vec4 uTileBounds;\nuniform vec4 u_tileRectangle;\nuniform vec3 u_center3D;\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\nuniform float u_useNormalTexture;\n};\n#else\nuniform vec3 u_center3D;\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_normalTextureTranslationAndScale;\nuniform float u_useNormalTexture;\nuniform vec4 u_tileRectangle;\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\n#endif\n#endif\nvarying float v_height2;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n#ifdef APPLY_MATERIAL\nvarying float v_slope;\nvarying float v_height;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(TRANSLUCENT) || defined(UNDERGROUND_COLOR)\nvarying float v_distance;\nvarying vec3 v_fogMieColor;\nvarying vec3 v_fogRayleighColor;\n#endif\nvarying vec3 vertNorm;\n#ifdef BRDF\nuniform sampler2D u_normalTexture;\n#endif\n#ifdef SLOPE_ANALYSIS\nuniform float uTopLevel;\nuniform float uLevel;\nvarying vec2 texCoordRotate;\n#endif\n#ifdef APPLY_MODIFY\nuniform sampler2D uModifyRasterTexture;\n#endif\nvarying vec4 clip_vertex;\nvec4 getPosition(vec3 position, float height, vec2 textureCoordinates);\nfloat get2DYPositionFraction(vec2 textureCoordinates);\nvec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn u_modifiedModelViewProjection * vec4(position, 1.0);\n}\nfloat get2DMercatorYPositionFraction(vec2 textureCoordinates)\n{\nconst float maxTileWidth = 0.003068;\nfloat positionFraction = textureCoordinates.y;\nfloat southLatitude = u_southAndNorthLatitude.x;\nfloat northLatitude = u_southAndNorthLatitude.y;\nif (northLatitude - southLatitude > maxTileWidth)\n{\nfloat southMercatorY = u_southMercatorYAndOneOverHeight.x;\nfloat oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;\nfloat currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);\ncurrentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);\npositionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);\n}\nreturn positionFraction;\n}\nfloat get2DGeographicYPositionFraction(vec2 textureCoordinates)\n{\nreturn textureCoordinates.y;\n}\nvec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)\n{\nfloat yPositionFraction = get2DYPositionFraction(textureCoordinates);\nvec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\nreturn u_modifiedModelViewProjection * rtcPosition2D;\n}\nvec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn getPositionPlanarEarth(position, 0.0, textureCoordinates);\n}\nvec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn getPositionPlanarEarth(position, height, textureCoordinates);\n}\nvec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)\n{\nvec3 position3DWC = position + u_center3D;\nfloat yPositionFraction = get2DYPositionFraction(textureCoordinates);\nvec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\nvec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);\nreturn czm_modelViewProjection * morphPosition;\n}\n#ifdef QUANTIZATION_BITS12\nuniform vec2 u_minMaxHeight;\nuniform mat4 u_scaleAndBias;\n#endif\nvoid main()\n{\n#ifdef QUANTIZATION_BITS12\nvec2 xy = czm_decompressTextureCoordinates(compressed0.x);\nvec2 zh = czm_decompressTextureCoordinates(compressed0.y);\nvec3 position = vec3(xy, zh.x);\nfloat height = zh.y;\nvec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);\nheight = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;\nv_height2 = height;\nposition = (u_scaleAndBias * vec4(position, 1.0)).xyz;\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\nfloat encodedNormal = compressed1;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\nfloat encodedNormal = 0.0;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = compressed0.w;\n#else\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = 0.0;\n#endif\n#else\nvec3 position = position3DAndHeight.xyz;\nfloat height = position3DAndHeight.w;\nv_height2 = height;\nvec2 textureCoordinates = textureCoordAndEncodedNormals.xy;\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = textureCoordAndEncodedNormals.z;\nfloat encodedNormal = textureCoordAndEncodedNormals.w;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = textureCoordAndEncodedNormals.z;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = textureCoordAndEncodedNormals.z;\nfloat encodedNormal = 0.0;\n#else\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = 0.0;\n#endif\n#endif\nvec3 position3DWC = position + u_center3D;\ngl_Position = getPosition(position, height, textureCoordinates);\n#ifdef APPLY_MODIFY\nvec4 packHeight = texture2D(uModifyRasterTexture, textureCoordinates);\nif(packHeight.w > 0.5)\n{\nvec3 modifyPosition = normalize(position3DWC);\ngl_Position = getPosition(modifyPosition - u_center3D, height, textureCoordinates);\n}\n#endif\n#ifdef WEBGPU\ngl_Position.y *= yFactor__;\n#endif\nv_textureCoordinates = vec3(textureCoordinates, webMercatorT);\n#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\nv_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\nv_positionMC = position3DWC;\nvec3 normalMC = czm_octDecode(encodedNormal);\nv_normalMC = normalMC;\nv_normalEC = czm_normal3D * v_normalMC;\n#elif defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(GENERATE_POSITION) || defined(HDR)\nv_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\nv_positionMC = position3DWC;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(TRANSLUCENT) || defined(UNDERGROUND_COLOR)\nAtmosphereColor atmosFogColor = computeGroundAtmosphereFromSpace(position3DWC, false, vec3(0.0));\nv_fogMieColor = atmosFogColor.mie;\nv_fogRayleighColor = atmosFogColor.rayleigh;\nv_distance = length((czm_modelView3D * vec4(position3DWC - czm_relativeOrigin, 1.0)).xyz);\n#endif\n#ifdef APPLY_MATERIAL\nvec3 finalNormal = normalMC;\nvec3 ellipsoidNormal = normalize(position3DWC.xyz);\nv_slope = abs(dot(ellipsoidNormal, finalNormal));\nv_height = height;\n#endif\nclip_vertex = czm_inverseProjection * gl_Position;\nif(u_useNormalTexture > 0.5){\nv_positionEC = (u_modifiedModelView * vec4(position.xyz, 1.0)).xyz;\nvertNorm = normalize(position3DWC);\n#ifdef BRDF\nvec2 normalTextureTranslation = u_normalTextureTranslationAndScale.xy;\nvec2 normalTextureScale = u_normalTextureTranslationAndScale.zw;\nvec2 normalTextureCoordinates = v_textureCoordinates.xy * normalTextureScale + normalTextureTranslation;\nvec3 realNormal = texture2D(u_normalTexture, normalTextureCoordinates.xy).xyz;\nrealNormal = (realNormal - 0.5) * 2.0;\nvec3 zAxis = normalize(vertNorm);\nvec3 xAxis = normalize(vec3(-vertNorm.y, vertNorm.x, 0));\nvec3 yAxis = normalize(cross(zAxis, xAxis));\nmat3 matrix = mat3(xAxis, yAxis, zAxis);\nvec3 vNormal = czm_normal3D * matrix * realNormal;\nv_normalEC = normalize(vNormal);\n#endif\n}\n#ifdef SLOPE_ANALYSIS\nfloat levelSpan = min(uLevel - uTopLevel, 2.0);\nfloat arrowTextureScale = pow(2.0,levelSpan);\ntexCoordRotate = v_textureCoordinates.xy * arrowTextureScale;\n#endif\n}\n",le$9="const float fInnerRadius = 6378137.0;\nconst float fOuterRadius = 6378137.0 * 1.025;\nconst float fOuterRadius2 = fOuterRadius * fOuterRadius;\nconst float Kr = 0.0025;\nconst float Km = 0.0015;\nconst float ESun = 15.0;\nconst float fKrESun = Kr * ESun;\nconst float fKmESun = Km * ESun;\nconst float fKr4PI = Kr * 4.0 * czm_pi;\nconst float fKm4PI = Km * 4.0 * czm_pi;\nconst float fScale = 1.0 / (fOuterRadius - fInnerRadius);\nconst float fScaleDepth = 0.25;\nconst float fScaleOverScaleDepth = fScale / fScaleDepth;\nstruct AtmosphereColor\n{\nvec3 mie;\nvec3 rayleigh;\n};\nconst int nSamples = 2;\nconst float fSamples = 2.0;\nfloat scale(float fCos)\n{\nfloat x = 1.0 - fCos;\nreturn fScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\nAtmosphereColor computeGroundAtmosphereFromSpace(vec3 v3Pos, bool dynamicLighting, vec3 lightDirectionWC)\n{\nvec3 v3InvWavelength = vec3(1.0 / pow(0.650, 4.0), 1.0 / pow(0.570, 4.0), 1.0 / pow(0.475, 4.0));\nvec3 v3Ray = v3Pos - czm_viewerPositionECEF;\nfloat fFar = length(v3Ray);\nv3Ray /= fFar;\nfloat fCameraHeight = length(czm_viewerPositionECEF);\nfloat fCameraHeight2 = fCameraHeight * fCameraHeight;\nfloat B = 2.0 * length(czm_viewerPositionECEF) * dot(normalize(czm_viewerPositionECEF), v3Ray);\nfloat C = fCameraHeight2 - fOuterRadius2;\nfloat fDet = max(0.0, B*B - 4.0 * C);\nfloat fNear = 0.5 * (-B - sqrt(fDet));\nvec3 v3Start = czm_viewerPositionECEF + v3Ray * fNear;\nfFar -= fNear;\nfloat fDepth = exp((fInnerRadius - fOuterRadius) / fScaleDepth);\nfloat fLightAngle = czm_branchFreeTernary(dynamicLighting, dot(lightDirectionWC, v3Pos) / length(v3Pos), 1.0);\nfloat fCameraAngle = dot(-v3Ray, v3Pos) / length(v3Pos);\nfloat fCameraScale = scale(fCameraAngle);\nfloat fLightScale = scale(fLightAngle);\nfloat fCameraOffset = fDepth*fCameraScale;\nfloat fTemp = (fLightScale + fCameraScale);\nfloat fSampleLength = fFar / fSamples;\nfloat fScaledLength = fSampleLength * fScale;\nvec3 v3SampleRay = v3Ray * fSampleLength;\nvec3 v3SamplePoint = v3Start + v3SampleRay * 0.5;\nvec3 v3FrontColor = vec3(0.0);\nvec3 v3Attenuate = vec3(0.0);\nfor(int i=0; i<nSamples; i++)\n{\nfloat fHeight = length(v3SamplePoint);\nfloat fDepth = exp(fScaleOverScaleDepth * (fInnerRadius - fHeight));\nfloat fScatter = fDepth*fTemp - fCameraOffset;\nv3Attenuate = exp(-fScatter * (v3InvWavelength * fKr4PI + fKm4PI));\nv3FrontColor += v3Attenuate * (fDepth * fScaledLength);\nv3SamplePoint += v3SampleRay;\n}\nAtmosphereColor color;\ncolor.mie = v3FrontColor * (v3InvWavelength * fKrESun + fKmESun);\ncolor.rayleigh = v3Attenuate;\nreturn color;\n}\n";function Pe$6(e,t,i,n,r,o,a,s){this.numberOfDayTextures=e,this.flags=t,this.material=i,this.shaderProgram=n,this.clippingShaderState=r,this.mvtTextureObj=o,this.numberOfGridTextures=a,this.gridUpdate=s}function U$f(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function Oe$7(e){var t;switch(e){case C$14.SCENE3D:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }";break;case C$14.SCENE2D:case C$14.COLUMBUS_VIEW:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }";break;case C$14.MORPHING:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }"}return t}function Le$6(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}function pe$8(e,t){if(!e$2e(e)||!e$2e(t))return!1;if(e===t)return!0;if(e.length!=t.length)return!1;for(var i=e.length,n=0;n<i;n++)if(e[n].textureIndex!==t[n].textureIndex||e[n].selectColor!==t[n].selectColor)return!1;return!0}U$f.prototype.getShaderProgram=function(e){var t=e.frameState,i=e.surfaceTile,n=e.numberOfDayTextures,r=e.applyBrightness,o=e.applyContrast,a=e.applyHue,s=e.applySaturation,l=e.applyGamma,u=e.applyAlpha,c=e.applySplit,h=e.applySwipe,d=e.applyGlobeSwipe,f=e.showReflectiveOcean,p=e.showOceanWaves,_=e.enableLighting,m=e.dynamicAtmosphereLighting,g=e.dynamicAtmosphereLightingFromSun,x=e.showGroundAtmosphere,y=e.perFragmentGroundAtmosphere,v=e.hasVertexNormals,$=e.hasRoughness,b=e.useWebMercatorProjection,T=e.enableFog,C=e.enableClippingPlanes,S=e.clippingPlanes,w=e.clippedByBoundaries,E=e.hasImageryLayerCutout,P=e.colorCorrect,A=e.isHeight,L=e.isColor,M=e.hasNormalMap,R=e.hasHypsometricSetting,O=e.hasFlood,D=e.hasSlopeAnalysis,I=e.applyGlobeSplit;e.highlightFillTile,e.colorToAlpha;var B=e.mvtTextureObj,F=e.numberOfGridTextures,N=e.gridUpdate,G=e.applyPolygonOffset,z=e.applyModify,U=e.applyExtract,V=e.excavationRegion,k=e.excavationOuter,W=e.applyImageryClip,H=e.hasHypsometricRegion,q=e.applySlopeRegion;const j=e.translucent,X=e.showUndergroundColor;var Y=0,Z="",K=i.renderedMesh.encoding;K.quantization===ye$j.BITS12&&(Y=1,Z="QUANTIZATION_BITS12");var Q=0;e$2e(i.terrainData)&&i.terrainData._createdByUpsampling&&(Q=1);var J=0,ee="";w&&(J=1,ee="TILE_LIMIT_RECTANGLE");var te=0,ie="";E&&(te=1,ie="APPLY_IMAGERY_CUTOUT");var ne=t.mode,re=ne|r<<2|o<<3|a<<4|s<<5|l<<6|u<<7|f<<8|p<<9|_<<10|x<<11|y<<12|v<<13|b<<14|T<<15|Y<<16|c<<17|C<<18|Q<<19|J<<20|te<<21|P<<22|A<<23|L<<24|M<<25|D<<26|I<<27|z<<28|V<<29|k<<30|$<<31;re=re+"_"+(I|R<<1|h<<2|d<<3|G<<4|O<<5|W<<6|H<<7|q<<8|j<<9);var oe=0;e$2e(S)&&S.length>0&&(oe=C?S.clippingPlanesState:0);var ae=i.surfaceShader;if(e$2e(ae)&&ae.numberOfDayTextures===n&&ae.flags===re&&ae.material===this.material&&ae.clippingShaderState===oe&&pe$8(ae.mvtTextureObj,B)&&ae.numberOfGridTextures===F&&ae.gridUpdate===N)return ae.shaderProgram;var se=this._shadersByTexturesFlags[n+F];if(e$2e(se)||(se=this._shadersByTexturesFlags[n+F]={}),!e$2e(ae=se[re])||ae.material!==this.material||ae.clippingShaderState!==oe||!pe$8(ae.mvtTextureObj,B)||N||ae.numberOfGridTextures!=F){var le=this.baseVertexShaderSource.clone(),ue=this.baseFragmentShaderSource.clone();0!==oe&&ue.sources.unshift(f$H(S,t.context)),le.defines.push(Z,""),ue.defines.push("TEXTURE_UNITS "+n,ee,ie),ue.defines.push("GRIDTEXTURE_UNITS "+F,ee,ie),r&&ue.defines.push("APPLY_BRIGHTNESS"),o&&ue.defines.push("APPLY_CONTRAST"),a&&ue.defines.push("APPLY_HUE"),s&&ue.defines.push("APPLY_SATURATION"),l&&ue.defines.push("APPLY_GAMMA"),u&&ue.defines.push("APPLY_ALPHA"),f&&(ue.defines.push("SHOW_REFLECTIVE_OCEAN"),le.defines.push("SHOW_REFLECTIVE_OCEAN")),p&&ue.defines.push("SHOW_OCEAN_WAVES"),G&&ue.defines.push("POLYGON_OFFSET"),_&&(le.defines.push("ENABLE_LIGHTING"),ue.defines.push("ENABLE_LIGHTING"),v?(le.defines.push("ENABLE_VERTEX_LIGHTING"),ue.defines.push("ENABLE_VERTEX_LIGHTING")):(le.defines.push("ENABLE_DAYNIGHT_SHADING"),ue.defines.push("ENABLE_DAYNIGHT_SHADING"))),($&&M||_&&v)&&(le.defines.push(D$V.BRDF),ue.defines.push(D$V.BRDF),e$2e(t.specularEnvironmentMaps)&&ue.defines.push(D$V.IBL)),m&&(ue.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),g&&ue.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN")),x&&(le.defines.push("GROUND_ATMOSPHERE"),ue.defines.push("GROUND_ATMOSPHERE"),!t.context.webgpu&&y&&ue.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE")),le.defines.push("INCLUDE_WEB_MERCATOR_Y"),ue.defines.push("INCLUDE_WEB_MERCATOR_Y"),T&&(le.defines.push("FOG"),ue.defines.push("FOG")),c&&ue.defines.push("APPLY_SPLIT"),h&&ue.defines.push("APPLY_SWIPE"),I&&ue.defines.push("APPLY_GLOBESPLIT"),d&&ue.defines.push("APPLY_GLOBESWIPE"),C&&ue.defines.push("ENABLE_CLIPPING_PLANES"),P&&ue.defines.push("COLOR_CORRECT"),A&&(le.defines.push("Height_Map"),ue.defines.push("Height_Map")),L&&le.defines.push("Color_Map"),z&&!U&&le.defines.push("APPLY_MODIFY"),V&&ue.defines.push("Excavate_Region"),k&&ue.defines.push("Excavate_Outer"),W&&ue.defines.push("Apply_ImageryClip"),R&&ue.defines.push("HYPSOMETRIC_ANALYSIS"),H&&ue.defines.push("HYPSOMETRIC_REGION"),O&&(ue.defines.push("FLOOD_ANALYSIS"),le.defines.push("FLOOD_ANALYSIS")),D&&M&&(ue.defines.push("SLOPE_ANALYSIS"),le.defines.push("SLOPE_ANALYSIS")),D&&q&&M&&ue.defines.push("SlopeRegion"),j&&(le.defines.push("TRANSLUCENT"),ue.defines.push("TRANSLUCENT")),X&&(le.defines.push("UNDERGROUND_COLOR"),ue.defines.push("UNDERGROUND_COLOR"));var ce="vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates)\n{\n vec4 color = initialColor;\n";ce+=" vec2 realTextureCoord;\n vec4 currentTextureColor;\n",E&&(ce+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(var he=0;he<n;++he)ce+="realTextureCoord = computeTextureCoord(\n",ce+="u_dayTextureUseWebMercatorT["+he+"] ? textureCoordinates.xz : textureCoordinates.xy,\nu_dayTextureTranslationAndScale["+he+"],\nu_dayTextureSize["+he+"],\nu_dayTextureFlipY["+he+"]);\ncurrentTextureColor = texture2D(u_dayTextures["+he+"], realTextureCoord);\n\n",ce+=E?"cutoutAndColorResult = u_dayTextureCutoutRectangles["+he+"];\ntexelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\ncutoutAndColorResult = czm_sampleAndBlend(\n":"color = czm_sampleAndBlend(\n",ce+=" currentTextureColor,\n color,\n u_dayTextureUseWebMercatorT["+he+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+he+"],\n u_transparentBackColor["+he+"],\n u_imageryClipEnable["+he+"],\n "+(u?"u_dayTextureAlpha["+he+"]":"1.0")+",\n "+(r?"u_dayTextureBrightness["+he+"]":"0.0")+",\n "+(o?"u_dayTextureContrast["+he+"]":"0.0")+",\n "+(a?"u_dayTextureHue["+he+"]":"0.0")+",\n "+(s?"u_dayTextureSaturation["+he+"]":"0.0")+",\n "+(l?"u_dayTextureOneOverGamma["+he+"]":"0.0")+",\n "+(c?"u_dayTextureSplit["+he+"]":"vec2(0.0,0.0)")+",\n "+(h?"u_dayTextureSwipeRegion["+he+"]":"vec4(0.0,0.0,0.0,0.0)")+"\n);\n",E&&(ce+="color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n");for(he=0;he<F;++he)ce+=" color = gridTextureSampleAndBlend(\n color,\n u_gridTextures["+he+"],\n u_gridTextureUseWebMercatorT["+he+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_gridTextureTexCoordsRectangle["+he+"],\n u_gridTextureTranslationAndScale["+he+"]);\n";ce+=" return color;\n}",ue.sources.push(ce),le.sources.push(Oe$7(ne)),le.sources.push(Le$6(b)),le.name="globeVS"+ne,ue.name="globeFS"+ne;var de=r$14.fromCache({context:t.context,vertexShaderSource:le,fragmentShaderSource:ue,attributeLocations:K.getAttributeLocations()});ae=se[re]=new Pe$6(n,re,this.material,de,oe,B,F,N)}return i.surfaceShader=ae,ae.shaderProgram},U$f.prototype.destroy=function(){var e,t,i=this._shadersByTexturesFlags;for(var n in i)if(i.hasOwnProperty(n)){var r=i[n];if(!e$2e(r))continue;for(e in r)r.hasOwnProperty(e)&&(e$2e(t=r[e])&&t.shaderProgram.destroy())}return i$11(this)};var E$e={FAILED:0,UNLOADED:1,TRANSITIONING:2,RECEIVED:3,TEXTURE_LODED:4,READY:5,UPDATE:6},_$e=Object.freeze(E$e);function n$c(e,t,i,n,r){if(this.gridLayer=e,this.x=t,this.y=i,this.level=n,this.request=void 0,0!==n){var o=t/2|0,a=i/2|0,s=n-1;this.parent=e._getGridFromCache(o,a,s)}(this.state=_$e.UNLOADED,this.gridBuffer=void 0,this.gridUrl=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!e$2e(r)&&e.gridProvider.ready)&&(r=e.gridProvider.tilingScheme.tileXYToRectangle(t,i,n));this.rectangle=r,this.needUpdate=!1}function d$j(e,t,i){this.readyGrid=void 0,this.loadingGrid=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i}function p$b(e,t){this._gridProvider=e,t=u$Z(t,{}),this._context=t.context,this._show=!0,this.show=!0,this._rectangle=u$Z(t.rectangle,h$18.MAX_VALUE),this._gridCache=[],e$2e(t.maxCategory)?this._MaxCategory=t.maxCategory:e.ready?this._MaxCategory=e.maxCategory:this._isNeedUpdate=!0,this._isNeedUpdate=!1,this._isUpdate=!0,e$2e(t.minCategory)?this._MinCategory=t.minCategory:e.ready?this._MinCategory=e.minCategory:this._isNeedUpdate=!0,this._hypsometricSetting=void 0,e$2e(t.hypsometricSetting)&&D$c(this,t),this._filterMode=k$S.FilterMode.LINEAR}function b$j(e,t,i,n,r){var o=n+1,a=e._gridProvider;if(e$2e(a)&&!(a.maxLevel<o))for(var s=Object.keys(e._gridCache),l=0;l<2;l++)for(var u=2*t+l,c=0;c<2;c++){var h=2*i+c,d=w$e(u,h,o);for(l=0;l<s.length;l++)if(d==s[l]){var f=e._gridCache[d];if(R$f(f,r)){var p=b$j(e,u,h,o);return e$2e(p)&&p.state==_$e.READY?p:f.state==_$e.READY?f:void 0}}}}function R$f(e,t){return!!e$2e(e)&&h$18.contains(e.rectangle,t)}n$c.prototype.addReference=function(){++this.referenceCount},n$c.prototype.releaseReference=function(){return--this.referenceCount,0===this.referenceCount?(this.gridLayer._removeGridFromCache(this),e$2e(this.parent)&&this.parent.releaseReference(),e$2e(this.girlBuffer)&&e$2e(this.girlBuffer.destroy)&&this.girlBuffer.destroy(),e$2e(this.texture)&&this.texture.destroy(),e$2e(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),i$11(this),0):this.referenceCount},n$c.prototype._processStateMachine=function(e,t,i){return this.state===_$e.UNLOADED&&!i&&(this.state=_$e.TRANSITIONING,this.gridLayer._requestGridTile(this)),(this.state===_$e.RECEIVED||this.state===_$e.UPDATE)&&(this.state=_$e.TRANSITIONING,this.gridLayer._createTexture(e.context,this)),!0},d$j.prototype.freeResources=function(){e$2e(this.readyImagery)&&this.readyImagery.releaseReference(),e$2e(this.loadingImagery)&&this.loadingImagery.releaseReference()},d$j.prototype._processStateMachine=function(e,t,i){var n=this.loadingGrid;if(null==n){if(!e$2e(this.readyGrid)||this.readyGrid.state!=_$e.UPDATE)return!1;this.loadingGrid=this.readyGrid,this.readyGrid=void 0,n=this.loadingGrid}var r=n.gridLayer;return n._processStateMachine(t,!this.useWebMercatorT,i),n.state===_$e.READY&&(e$2e(this.readyGrid)&&this.readyGrid.releaseReference(),this.readyGrid=this.loadingGrid,this.loadingGrid=void 0,this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this),!0)},Object.defineProperties(p$b.prototype,{gridProvider:{get:function(){return this._gridProvider}},rectangle:{get:function(){return this._rectangle}},dataMaxValue:{get:function(){if(!this._isNeedUpdate)return this._MaxCategory;if(!this._gridProvider.ready)throw new DeveloperError("dataMaxValue must not be called before the grid provider is ready");this._MaxCategory=this._gridProvider.maxCategory,this._isNeedUpdate=!1}},dataMinValue:{get:function(){if(!this._isNeedUpdate)return this._MinCategory;if(!this._gridProvider.ready)throw new DeveloperError("dataMinValue must not be called before the grid provider is ready");this._MinCategory=this._gridProvider.minCategory,this._isNeedUpdate=!1}},hypsometricSetting:{get:function(){return{hypsometricSetting:this._hypsometricSetting,analysisMode:this._hypAnalysisMode}},set:function(e){D$c(this,e),this._isUpdate=!0}}}),p$b.prototype.destroy=function(){return i$11(this)},p$b.prototype.cancelReprojections=function(){},p$b.prototype.queueReprojectionCommands=function(e){},p$b.prototype.getViewableRectangle=function(){var e=this._gridProvider,t=this._rectangle;return e.readyPromise.then((function(){return h$18.intersection(e.rectangle,t)}))},p$b.prototype._getGridFromCache=function(e,t,i,n){var r=w$e(e,t,i),o=(this._gridCache.length,this._gridCache[r]);return e$2e(o)||(o=new n$c(this,e,t,i,n),this._gridCache[r]=o),o.addReference(),o},p$b.prototype.getGridValue=function(e){for(var t=Object.values(this._gridCache),i=void 0,n=0;n<t.length;n++){var r=t[n];if(r.state==_$e.READY)if(R$f(r,e)){var o=b$j(this,r.x,r.y,r.level,e);i=e$2e(o)?o:r;break}}if(!e$2e(i))return-1;var a=(e.longitude-i.rectangle.west)/i.rectangle.width,s=(i.rectangle.north-e.latitude)/i.rectangle.height;a=Math.max(Math.floor(a*this._gridProvider.cellWidth),0),s=Math.max(Math.floor(s*this._gridProvider.cellHeight),0);var l=i.gridBuffer;return G$g(this._gridProvider,l,a,s,this._filterMode)},p$b.prototype._removeGridFromCache=function(e){var t=w$e(e.x,e.y,e.level);delete this._gridCache[t]},p$b.prototype._requestGridTile=function(e){var t=this._gridProvider;function i(t){if(!e$2e(t))return n();e.gridBuffer=t,e.state=_$e.RECEIVED}function n(){if(e.request.state===W$1c.CANCELLED)return e.gridBuffer=void 0,e.state=_$e.UNLOADED,void(e.request=void 0);e.state=_$e.FAILED,e.request=void 0}!function(){var r=new r$1c({throttle:!1,throttleByServer:!0,type:U$1f.TERRAIN});e.request=r;var o=t._requestGridTile(e.x,e.y,e.level,r);e$2e(o)?(e.state=_$e.RECEIVING,o$1l(o,i,n)):(e.state=_$e.UNLOADED,e.request=void 0)}()},p$b.prototype._createTexture=function(e,t){var i=this._gridProvider,n=t.gridBuffer;if(null==n||null==i||!i.ready)return!1;this._isNeedUpdate&&this._gridProvider.ready&&(this._MinCategory=this._gridProvider.minCategory,this._MaxCategory=this._gridProvider.maxCategory,this._isNeedUpdate=!1),this._context=e,null==this._hypsometricSetting&&Q$9(this),null==t.texture&&(t.texture=new t$U({context:this._context,width:i.cellWidth,height:i.cellHeight,pixelFormat:V$12.RGBA,flipY:!1}));for(var r=i.cellWidth*i.cellHeight,o=new Uint8Array(4*r),a=0;a<i.cellHeight;a++)for(var s=0;s<i.cellWidth;s++){var l=(i.cellHeight-1-a)*i.cellWidth+s,u=G$g(i,n,s,a,this._filterMode);if(u<this._hypsometricSetting.MinVisibleValue||u>this._hypsometricSetting.MaxVisibleValue||u<this._hypsometricSetting.ColorTableMinKey||u>this._hypsometricSetting.ColorTableMaxKey)o[4*l+0]=0,o[4*l+1]=0,o[4*l+2]=0,o[4*l+3]=0;else{var c=this._hypsometricSetting.ColorTable.getColor(u);if(!e$2e(c)){o[4*l+0]=0,o[4*l+1]=0,o[4*l+2]=0,o[4*l+3]=0;continue}o[4*l+0]=255*c.red,o[4*l+1]=255*c.green,o[4*l+2]=255*c.blue,o[4*l+3]=255*c.alpha}}t.texture.copyFrom({width:i.cellWidth,height:i.cellHeight,arrayBufferView:o}),t.state=_$e.READY};var E$d=new h$18,J$9=new h$18,M$g=new h$18,A$f=new h$18;function Z$d(e,t,i,n,r,o){var a,s=t.rectangle.width/512,l=t.rectangle.height/512,u=e.tilingScheme,c=h$18.clone(t.rectangle,A$f),h=u.tileXYToRectangle(i.northwestTileCoordinates.x,i.northwestTileCoordinates.y,o),d=h$18.intersection(h,n,M$g);return r?(u.rectangleToNativeRectangle(c,c),u.rectangleToNativeRectangle(h,h),u.rectangleToNativeRectangle(d,d),u.rectangleToNativeRectangle(n,n),a=u.tileXYToNativeRectangle.bind(u),s=c.width/512,l=c.height/512):a=u.tileXYToRectangle.bind(u),{veryCloseX:s,veryCloseY:l,terrainRectangle:c,gridRectangle:h,clippedGridRectangle:d,gridTileXYToRectangle:a}}function z$d(e,t,i,n,r,o,a,s){var l,u,c=0,h=1;Math.abs(i.clippedGridRectangle.west-i.terrainRectangle.west)>=i.veryCloseX&&(c=Math.min(1,(i.clippedGridRectangle.west-i.terrainRectangle.west)/i.terrainRectangle.width)),Math.abs(i.clippedGridRectangle.north-i.terrainRectangle.north)>=i.veryCloseY&&(h=Math.max(0,(i.clippedGridRectangle.north-i.terrainRectangle.south)/i.terrainRectangle.height));for(var d=h,f=n.northwestTileCoordinates.x;f<=n.southeastTileCoordinates.x;f++)if(l=c,i.gridRectangle=i.gridTileXYToRectangle(f,n.northwestTileCoordinates.y,o),i.clippedGridRectangle=h$18.simpleIntersection(i.gridRectangle,r,M$g),e$2e(i.clippedGridRectangle)){c=Math.min(1,(i.clippedGridRectangle.east-i.terrainRectangle.west)/i.terrainRectangle.width),f===n.southeastTileCoordinates.x&&Math.abs(i.clippedGridRectangle.east-i.terrainRectangle.east)<i.veryCloseX&&(c=1),h=d;for(var p=n.northwestTileCoordinates.y;p<=n.southeastTileCoordinates.y;p++)if(u=h,i.gridRectangle=i.gridTileXYToRectangle(f,p,o),i.clippedGridRectangle=h$18.simpleIntersection(i.gridRectangle,r,M$g),e$2e(i.clippedGridRectangle)){h=Math.max(0,(i.clippedGridRectangle.south-i.terrainRectangle.south)/i.terrainRectangle.height),p===n.southeastTileCoordinates.y&&Math.abs(i.clippedGridRectangle.south-i.terrainRectangle.south)<i.veryCloseY&&(h=0);var _=new e$2c(l,h,c,u),m=e._getGridFromCache(f,p,o);t.gridImagery.splice(s,0,new d$j(m,_,a)),++s}}}function D$c(e,t){if(e$2e(t)&&e$2e(t.hypsometricSetting))e$2e(e._hypsometricSetting)&&e._hypsometricSetting.destroy(),e._hypsometricSetting=t.hypsometricSetting,e._hypsometricSetting._emissionTextureChanged=!0,e._filterMode=e._hypsometricSetting.filterMode,e$2e(e._hypsometricSetting.ColorTable)&&e._hypsometricSetting.ColorTable.generateBuffer();else if(e$2e(e._hypsometricSetting._hypsometricSetting))return e._hypsometricSetting.destroy(),void(e._hypsometricSetting=void 0);$$b(e)}function Q$9(e){if(e._isNeedUpdate&&e._gridProvider.ready&&(e._MinCategory=e._gridProvider.minCategory,e._MaxCategory=e._gridProvider.maxCategory,e._isNeedUpdate=!1),null==e._hypsometricSetting){var t=new i$T;e._hypsometricSetting=new u$L,e._hypsometricSetting.MaxVisibleValue=0;for(var i=[e$1X.fromCssColorString("#AAF0E9"),e$1X.fromCssColorString("#B0F2D3"),e$1X.fromCssColorString("#B0F4BC"),e$1X.fromCssColorString("#BFF8B2"),e$1X.fromCssColorString("#DAFBB2"),e$1X.fromCssColorString("#EDF9AD"),e$1X.fromCssColorString("#DCEC91"),e$1X.fromCssColorString("#A0D567"),e$1X.fromCssColorString("#60BD42"),e$1X.fromCssColorString("#2CA432"),e$1X.fromCssColorString("#148E35"),e$1X.fromCssColorString("#20853D"),e$1X.fromCssColorString("#559037"),e$1X.fromCssColorString("#819D2F"),e$1X.fromCssColorString("#ABA826"),e$1X.fromCssColorString("#D7B117"),e$1X.fromCssColorString("#EBA509"),e$1X.fromCssColorString("#E18302"),e$1X.fromCssColorString("#CB5902"),e$1X.fromCssColorString("#C53602"),e$1X.fromCssColorString("#9D1901"),e$1X.fromCssColorString("#820C01"),e$1X.fromCssColorString("#760F03"),e$1X.fromCssColorString("#721906"),e$1X.fromCssColorString("#702007"),e$1X.fromCssColorString("#6E280A"),e$1X.fromCssColorString("#6A2D0C"),e$1X.fromCssColorString("#733C1B"),e$1X.fromCssColorString("#815032"),e$1X.fromCssColorString("#8E664D"),e$1X.fromCssColorString("#997C6C"),e$1X.fromCssColorString("#A69992")],n=(e._MaxCategory-e._MinCategory)/31,r=0;r<32;r++)t.insert(e._MinCategory+n*r,i[r]);e._hypsometricSetting.ColorTable=t,e._hypsometricSetting.DisplayMode=k$S.DisplayMode.FACE_AND_LINE,e._hypsometricSetting.Opacity=.618,e._hypsometricSetting.ColorTableMaxKey=e._MaxCategory,e._hypsometricSetting.ColorTableMinKey=e._MinCategory,e._hypsometricSetting.MaxVisibleValue=e._MaxCategory,e._hypsometricSetting.MinVisibleValue=e._MinCategory,e._hypsometricSetting.ColorTable.generateBuffer()}}function w$e(e,t,i){return JSON.stringify([e,t,i])}function $$b(e){for(var t=Object.values(e._gridCache),i=0;i<t.length;i++){var n=t[i];n.state==_$e.READY&&(n.state=_$e.UPDATE,n.needUpdate=!0)}}function P$f(e,t,i,n){var r=0;i.south>0?r=i.south:i.north<0&&(r=i.north);var o=e._gridProvider,a=I$d(e,1*t.getLevelMaximumGeometricError(n),r,e$2e(o.resolution)?o.resolution:1,t.tilingScheme._tileWidth);a=Math.max(0,a);var s=o.maxLevel;if(a>s&&(a=s),e$2e(o.minLevel)){var l=o.minLevel;a<l&&(a=l)}return a}function I$d(e,t,i,n,r){var o=e._gridProvider,a=o.tilingScheme,s=a.ellipsoid,l=o.tilingScheme.projection instanceof n$1d?1:Math.cos(i),u=a.rectangle,c=s.maximumRadius*u.width*l/(o.cellWidth*a.getNumberOfXTilesAtLevel(0)/n)/t*(o.cellWidth/r),h=Math.log(c)/Math.log(2);return 0|Math.round(h)}function L$f(e,t,i,n){var r=e.tilingScheme,o=r.positionToTileXY(h$18.northwest(t),i),a=r.positionToTileXY(h$18.southeast(t),i),s=n.width/512,l=n.height/512,u=r.tileXYToRectangle(o.x,o.y,i);Math.abs(u.south-n.north)<l&&o.y<a.y&&++o.y,Math.abs(u.east-n.west)<s&&o.x<a.x&&++o.x;var c=r.tileXYToRectangle(a.x,a.y,i);return Math.abs(c.north-n.south)<l&&a.y>o.y&&--a.y,Math.abs(c.west-n.east)<s&&a.x>o.x&&--a.x,{northwestTileCoordinates:o,southeastTileCoordinates:a}}function G$g(e,t,i,n,r){if(!e$2e(e))throw new DeveloperError("getValue must not be called before the grid provider is ready");if(r==k$S.FilterMode.NEAREST)return t[n*e.cellWidth+i];for(var o=0,a=0,s=0;s<2;s++)for(var l=0;l<2;l++){var u=i+s;u=Math.min(u,e.cellWidth-1);var c=n+l;o+=t[(c=Math.min(c,e.cellHeight-1))*e.cellWidth+u],a++}return a<=0?-99999:o/=a}function n$b(){this._layers=[],this.layerAdded=new o$1h,this.layerRemoved=new o$1h,this.layerMoved=new o$1h,this.layerShownOrHidden=new o$1h,this.layerUpdate=new o$1h}function g$i(e,t){if(!e$2e(t))throw new t$15("layer is required.");var i=e.indexOf(t);if(-1===i)throw new t$15("layer is not in this collection.");return i}function b$i(e,t,i){var n=e._layers;if((t=e$2d.clamp(t,0,n.length-1))!==(i=e$2d.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t)}}p$b.prototype._createTileImagerySkeletons=function(e,t,i){var n=e.data,r=this._gridProvider;if(!this.show||!r.ready)return!1;e$2e(i)||(i=n.gridImagery.length);var o=r.tilingScheme.projection instanceof t$N&&e.rectangle.north<t$N.MaximumLatitude&&e.rectangle.south>-t$N.MaximumLatitude,a=h$18.intersection(r.rectangle,this._rectangle,E$d),s=h$18.intersection(e.rectangle,a,J$9);if(null==s)return!1;var l=P$f(this,t,s,e.level),u=L$f(r,s,l,e.rectangle);return e.rectangle.width,e.rectangle.height,z$d(this,n,Z$d(r,e,u,a,o,l),u,a,l,o,i),!0},p$b.prototype._calculateTextureTranslationAndScale=function(e,t){var i=t.readyGrid.rectangle,n=e.rectangle;if(t.useWebMercatorT){var r=t.girdLayer.gridProvider.tilingScheme;i=r.rectangleToNativeRectangle(i,E$d),n=r.rectangleToNativeRectangle(n,A$f)}var o=n.width,a=n.height,s=o/i.width,l=a/i.height;return new e$2c(s*(n.west-i.west)/o,l*(n.south-i.south)/a,s,l)},Object.defineProperties(n$b.prototype,{length:{get:function(){return this._layers.length}}}),n$b.prototype.add=function(e,t){var i=e$2e(t);if(!e$2e(e))throw new t$15("layer is required.");if(i){if(t<0)throw new t$15("index must be greater than or equal to zero.");if(t>this._layers.length)throw new t$15("index must be less than or equal to the number of layers.")}i?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t)},n$b.prototype.addImageryProvider=function(e,t){if(!e$2e(e))throw new t$15("imageryProvider is required.");var i=new h$R(e);return i._imageryLayers=this,this.add(i,t),i},n$b.prototype.addVectorTileProvider=function(e,t){if(!e$2e(e))throw new t$15("imageryProvider is required.");var i=new h$R(e,{minimumTerrainLevel:e.minimumTerrainLevel,maximumTerrainLevel:e.maximumTerrainLevel,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter});return this.add(i,t),i},n$b.prototype.addGridProvider=function(e,t){if(!e$2e(e))throw new t$15("gridProvider is required.");var i=new p$b(e);return this.add(i,t),i},n$b.prototype.remove=function(e,t,i){t=u$Z(t,!0);i=u$Z(i,!1);var n=this._layers.indexOf(e);return-1!==n&&(e._imageryProvider&&e._imageryProvider instanceof M$S&&!i?void 0:(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0))},n$b.prototype.removeAll=function(e){e=u$Z(e,!0);for(var t=this._layers,i=0,n=t.length;i<n;i++){var r=t[i];this.layerRemoved.raiseEvent(r,i),e&&r.destroy()}this._layers=[]},n$b.prototype.contains=function(e){return-1!==this.indexOf(e)},n$b.prototype.indexOf=function(e){return this._layers.indexOf(e)},n$b.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.","index");return this._layers[e]},n$b.prototype.raise=function(e){var t=g$i(this._layers,e);b$i(this,t,t+1)},n$b.prototype.lower=function(e){var t=g$i(this._layers,e);b$i(this,t,t-1)},n$b.prototype.raiseToTop=function(e){var t=g$i(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},n$b.prototype.lowerToBottom=function(e){var t=g$i(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var H$j=new h$18;function r$h(e,t){this._terrainProvider=e}function o$i(){this._layers=[],this.layerAdded=new o$1h,this.layerRemoved=new o$1h,this.layerMoved=new o$1h,this.layerShownOrHidden=new o$1h,this._globe=void 0}function f$h(e,t){if(!e$2e(t))throw new t$15("layer is required.");var i=e.indexOf(t);if(-1===i)throw new t$15("layer is not in this collection.");return i}function p$a(e,t,i){var n=e._layers;if((t=e$2d.clamp(t,0,n.length-1))!==(i=e$2d.clamp(i,0,n.length-1))){var r=n[t];n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t)}}function e$9(e){this._ellipsoid=new s$H(e.ellipsoid,o$1p.ZERO)}function h$e(e){if(!e$2e(e))throw new t$15("options is required.");if(!e$2e(e.x))throw new t$15("options.x is required.");if(!e$2e(e.y))throw new t$15("options.y is required.");if(e.x<0||e.y<0)throw new t$15("options.x and options.y must be greater than or equal to zero.");if(!e$2e(e.level))throw new t$15("options.level is required and must be greater than or equal to zero.");if(!e$2e(e.tilingScheme))throw new t$15("options.tilingScheme is required.");this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=D$J.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=re$A.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0,this._rasterTextureSize=void 0,this._rasterFBO=void 0,this._rasterTexture=void 0,this._rasterized=!1,this._clearCommand=new t$W({color:new e$1X(0,0,0,0),depth:1}),this._2DRasterized=!1,this._2DRasterTexture=void 0,this._mvtLoaded=!1,this._clipRasterTexture=void 0,this._clipRasterFbo=void 0,this._clipRegionsCount=0,this._clipRegionRasterized=!1,this.isModified=!1,0===this._level?this.showInvalid=!1:this.showInvalid=e.parent.showInvalid,this.zoomLevel=-1,this._renderThisFrame=!1,this._useParentImage=!1}function I$c(e){e$2e(e)&&e.freeResources()}n$b.prototype.pickImageryLayerFeatures=function(e,t){var i=t.globe.pick(e,t);if(e$2e(i)){for(var n,r=t.globe.ellipsoid.cartesianToCartographic(i),o=t.globe._surface._tilesToRender,a=0;!e$2e(n)&&a<o.length;++a){var s=o[a];h$18.contains(s.rectangle,r)&&(n=s)}if(e$2e(n)){for(var l=n.data.imagery,u=[],c=[],h=l.length-1;h>=0;--h){var d=l[h],f=d.readyImagery;if(e$2e(f)){var p=f.imageryLayer.imageryProvider;if(e$2e(p.pickFeatures)&&h$18.contains(f.rectangle,r)){var _=H$j,m=1/1024;if(_.west=e$2d.lerp(n.rectangle.west,n.rectangle.east,d.textureCoordinateRectangle.x-m),_.east=e$2d.lerp(n.rectangle.west,n.rectangle.east,d.textureCoordinateRectangle.z+m),_.south=e$2d.lerp(n.rectangle.south,n.rectangle.north,d.textureCoordinateRectangle.y-m),_.north=e$2d.lerp(n.rectangle.south,n.rectangle.north,d.textureCoordinateRectangle.w+m),h$18.contains(_,r)){var g=p.pickFeatures(f.x,f.y,f.level,r.longitude,r.latitude);!e$2e(g)||(u.push(g),c.push(f.imageryLayer))}}}}if(0!==u.length)return o$1l.all(u,(function(e){for(var t=[],i=0;i<e.length;++i){var n=e[i],o=c[i];if(e$2e(n)&&n.length>0)for(var a=0;a<n.length;++a){var s=n[a];s.imageryLayer=o,e$2e(s.position)||(s.position=r),t.push(s)}}return t}))}}},n$b.prototype.queueReprojectionCommands=function(e){for(var t=this._layers,i=0,n=t.length;i<n;++i)t[i].queueReprojectionCommands(e)},n$b.prototype.cancelReprojections=function(){for(var e=this._layers,t=0,i=e.length;t<i;++t)e[t].cancelReprojections()},n$b.prototype.isDestroyed=function(){return!1},n$b.prototype.destroy=function(){return this.removeAll(!0),i$11(this)},n$b.prototype._update=function(){var e,t,i,n,r=!0,o=this._layers;for(i=0,n=o.length;i<n;++i)(t=o[i])._layerIndex=i,e$2e(t._imageryProvider)&&(t._imageryProvider._id=t._layerIndex),t.show?(t._isBaseLayer=r,r=!1):t._isBaseLayer=!1,t.show!==t._show&&(e$2e(t._show)&&(e$2e(e)||(e=[]),e.push(t)),t._show=t.show),e$2e(t.gridProvider)&&t._isUpdate&&this.layerUpdate.raiseEvent(t,t._layerIndex);if(e$2e(e))for(i=0,n=e.length;i<n;++i)t=e[i],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},n$b.prototype._maxDetailLevelOffset=function(){for(var e=0,t=this._layers,i=0,n=t.length;i<n;++i){var r=t[i]._detailLevelOffset;t[i].featherEdgesEnabled&&r<1&&(r=1),e=Math.max(r,e)}return e},n$b.prototype.saveLocalCache=function(){for(var e=0,t=this._layers.length;e<t;e++)this._layers[e]instanceof h$R&&this._layers[e].saveLocalCache()},Object.defineProperties(r$h.prototype,{terrainProvider:{get:function(){return this._terrainProvider}}}),r$h.prototype.isDestroyed=function(){return!1},r$h.prototype.destroy=function(){return i$11(this)},Object.defineProperties(o$i.prototype,{length:{get:function(){return this._layers.length}}}),o$i.prototype.add=function(e,t){var i=e$2e(t);if(!e$2e(e))throw new t$15("layer is required.");if(i){if(t<0)throw new t$15("index must be greater than or equal to zero.");if(t>this._layers.length)throw new t$15("index must be less than or equal to the number of layers.")}i?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),e$2e(this._globe)&&e$2e(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerAdded.raiseEvent(e,t)},o$i.prototype.addTerrainProvider=function(e,t){if(!e$2e(e))throw new t$15("terrainProvider is required.");var i=new r$h(e);return this.add(i,t),e$2e(this._globe)&&e$2e(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),i},o$i.prototype.remove=function(e,t){t=u$Z(t,!0);var i=this._layers.indexOf(e);return-1!==i&&(this._layers.splice(i,1),this._update(),this.layerRemoved.raiseEvent(e,i),t&&e.destroy(),e$2e(this._globe)&&e$2e(this._globe._surface)&&(0===this._layers.length&&(this._globe.terrainProvider=new t$z({ellipsoid:this._globe.ellipsoid})),this._globe._surface.invalidateAllTiles()),!0)},o$i.prototype.removeAll=function(e){e=u$Z(e,!0);for(var t=this._layers,i=0,n=t.length;i<n;i++){var r=t[i];this.layerRemoved.raiseEvent(r,i),e&&r.destroy()}e$2e(this._globe)&&e$2e(this._globe._surface)&&(this._globe.terrainProvider=new t$z({ellipsoid:this._globe.ellipsoid}),this._globe._surface.invalidateAllTiles()),this._layers=[]},o$i.prototype.contains=function(e){return-1!==this.indexOf(e)},o$i.prototype.indexOf=function(e){return this._layers.indexOf(e)},o$i.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.","index");return this._layers[e]},o$i.prototype.raise=function(e){var t=f$h(this._layers,e);p$a(this,t,t+1),e$2e(this._globe)&&e$2e(this._globe._surface)&&this._globe._surface.invalidateAllTiles()},o$i.prototype.lower=function(e){var t=f$h(this._layers,e);p$a(this,t,t-1),e$2e(this._globe)&&e$2e(this._globe._surface)&&this._globe._surface.invalidateAllTiles()},o$i.prototype.raiseToTop=function(e){var t=f$h(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),e$2e(this._globe)&&e$2e(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},o$i.prototype.lowerToBottom=function(e){var t=f$h(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),e$2e(this._globe)&&e$2e(this._globe._surface)&&this._globe._surface.invalidateAllTiles(),this.layerMoved.raiseEvent(e,0,t))},o$i.prototype.isDestroyed=function(){return!1},o$i.prototype.destroy=function(){return this.removeAll(!0),i$11(this)},o$i.prototype._update=function(){var e,t,i,n,r=!0,o=this._layers;for(i=0,n=o.length;i<n;++i)(t=o[i])._layerIndex=i,e$2e(t._terrainProvider)&&(t._terrainProvider._id=t._layerIndex),t.show?(t._isBaseLayer=r,r=!1):t._isBaseLayer=!1,t.show!==t._show&&(e$2e(t._show)&&(e$2e(e)||(e=[]),e.push(t)),t._show=t.show);if(e$2e(e))for(i=0,n=e.length;i<n;++i)t=e[i],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},Object.defineProperties(e$9.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),h$e.createLevelZeroTiles=function(e){if(!e$2e(e))throw new t$15("tilingScheme is required.");for(var t=e.getNumberOfXTilesAtLevel(0),i=e.getNumberOfYTilesAtLevel(0),n=new Array(t*i),r=0,o=0;o<i;++o)for(var a=0;a<t;++a)n[r++]=new h$e({tilingScheme:e,x:a,y:o,level:0});return n},h$e.prototype._updateCustomData=function(e,t,i){var n,r,o,a=this.customData;if(e$2e(t)&&e$2e(i)){for(a=a.filter((function(e){return-1===i.indexOf(e)})),this._customData=a,o=this._rectangle,n=0;n<t.length;++n)r=t[n],h$18.contains(o,r.positionCartographic)&&a.push(r);this._frameUpdated=e}else{var s=this._parent;if(e$2e(s)&&this._frameUpdated!==s._frameUpdated){a.length=0,o=this._rectangle;var l=s.customData;for(n=0;n<l.length;++n)r=l[n],h$18.contains(o,r.positionCartographic)&&a.push(r);this._frameUpdated=s._frameUpdated}}},Object.defineProperties(h$e.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return e$2e(this._southwestChild)||(this._southwestChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return e$2e(this._southeastChild)||(this._southeastChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return e$2e(this._northwestChild)||(this._northwestChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return e$2e(this._northeastChild)||(this._northeastChild=new h$e({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<re$A.DONE}},eligibleForUnloading:{get:function(){var e=!0;return e$2e(this.data)&&(e$2e(e=this.data.eligibleForUnloading)||(e=!0)),e}}}),h$e.prototype.findLevelZeroTile=function(e,t,i){var n=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=n:t>=n&&(t-=n),!(i<0||i>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter((function(e){return e.x===t&&e.y===i}))[0]},h$e.prototype.findTileToWest=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;var i=t.findTileToWest(e);return void 0!==i?t.southwestChild===this?i.southeastChild:i.northeastChild:void 0},h$e.prototype.findTileToEast=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;var i=t.findTileToEast(e);return void 0!==i?t.southeastChild===this?i.southwestChild:i.northwestChild:void 0},h$e.prototype.findTileToSouth=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;var i=t.findTileToSouth(e);return void 0!==i?t.southwestChild===this?i.northwestChild:i.northeastChild:void 0},h$e.prototype.findTileToNorth=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;var i=t.findTileToNorth(e);return void 0!==i?t.northwestChild===this?i.southwestChild:i.southeastChild:void 0},h$e.prototype.freeResources=function(){this.state=re$A.START,this.renderable=!1,this.upsampledFromParent=!1,e$2e(this.data)&&e$2e(this.data.freeResources)&&this.data.freeResources(),I$c(this._southwestChild),this._southwestChild=void 0,I$c(this._southeastChild),this._southeastChild=void 0,I$c(this._northwestChild),this._northwestChild=void 0,I$c(this._northeastChild),this._northeastChild=void 0,this._rasterTexture=this._rasterTexture&&!this._rasterTexture.isDestroyed()&&this._rasterTexture.destroy(),this._rasterFBO=this._rasterFBO&&!this._rasterFBO.isDestroyed()&&this._rasterFBO.destroy(),this._rasterFBO=void 0,this._rasterized=!1,this._2DRasterTexture=this._2DRasterTexture&&!this._2DRasterTexture.isDestroyed()&&this._2DRasterTexture.destroy(),this._2DRasterized=!1,this._mvtLoaded=!1,this._clipRasterTexture=this._clipRasterTexture&&!this._clipRasterTexture.isDestroyed()&&this._clipRasterTexture.destroy(),this._clipRasterFbo=this._clipRasterFbo&&!this._clipRasterFbo.isDestroyed()&&this._clipRasterFbo.destroy(),this._clipRegionsCount=0,this._clipRegionRasterized=!1,this.isModified=!1};var Y$9=new h$18,m$f=new f$1a;h$e.prototype.createRealtimeRasterFBO=function(e){this._rasterTexture=new t$U({context:e.context,width:this._rasterTextureSize,height:this._rasterTextureSize,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}),this._rasterFBO=new t$V({context:e.context,colorTextures:[this._rasterTexture],destroyAttachments:!1})};var H$i=new p$1d;function Z$c(e,t){var i=f$1a.clone(t.context.uniformState._viewport),n=e$2d.toDegrees(e._rectangle.west),r=e$2d.toDegrees(e._rectangle.east),o=e$2d.toDegrees(e._rectangle.north),a=e$2d.toDegrees(e._rectangle.south),s=t.camera,l=s.frustum.clipPlane,u=s.heading,c=s.pitch,h=s.roll,d=new o$1p;1===t._fboState.frameBufferType&&s.disableReflection(),o$1p.clone(s._positionWC,d),p$1d.clone(s.transform,H$i),s._setTransform(p$1d.IDENTITY);var f=new a$V({width:r-n,aspectRatio:1,near:1,far:100}),p=new o$1p(.5*(n+r),.5*(o+a),50),_=new o$1p(0,0,-1),m=new o$1p(0,1,0);r=o$1p.cross(_,m,new o$1p);return p$1d.computeView(p,_,m,r,t.context.uniformState.view),t.context.uniformState.updateFrustum(f),{position:d,viewport:i,waterPlane:l,heading:u,pitch:c,roll:h}}function C$e(e){if(!e$2e(e)||!e$2e(e.tileProvider))throw new t$15("options.tileProvider is required.");if(e$2e(e.tileProvider.quadtree))throw new t$15("A QuadtreeTileProvider can only be used with a single QuadtreePrimitive");this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};var t=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new i$L,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=u$Z(e.maximumScreenSpaceError,2),this.tileCacheSize=u$Z(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!0,this._occluders=new e$9({ellipsoid:t}),this._tileLoadProgressEvent=new o$1h,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0,this._tilesToRenderOld=[],this._levelZeroTilesOld=[],this._zeroTileReady=!1,this._freeAllBakTiles=!1,this._visible=!0,this._delicateImagerylength=16}function Ce$5(e){if(e._zeroTileReady){e._tilesToRenderOld.length=0;for(var t=e._levelZeroTilesOld,i=0;i<t.length;++i){for(var n=t[i],r=n.customData,o=r.length,a=0;a<o;++a){var s=r[a];s.level=0,e._addHeightCallbacks.push(s)}n.freeResources()}e._levelZeroTilesOld.length=0}}function be$5(e){var t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,le$8(e);var i=e._levelZeroTiles;if(e$2e(i))if(e._zeroTileReady){e._tilesToRenderOld.length=0;for(var n=0;n<i.length;++n){for(var r=i[n].customData,o=r.length,a=0;a<o;++a){var s=r[a];s.level=0,e._addHeightCallbacks.push(s)}i[n].freeResources()}}else e._tilesToRenderOld=e._tilesToRender.slice(0),e._levelZeroTilesOld=e._levelZeroTiles.slice(0);e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}function le$8(e){var t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}function me$9(e,t){var i=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;(i!==e._lastTileLoadQueueLength||e._tilesInvalidated)&&(t.afterRender.push(o$1h.prototype.raiseEvent.bind(e._tileLoadProgressEvent,i)),e._lastTileLoadQueueLength=i);var n=e._debug;n.enableDebugOutput&&!n.suspendLodUpdate&&(n.maxDepth=e._tilesToRender.reduce((function(e,t){return Math.max(e,t.level)}),-1),n.tilesRendered=e._tilesToRender.length,(n.tilesVisited!==n.lastTilesVisited||n.tilesRendered!==n.lastTilesRendered||n.tilesCulled!==n.lastTilesCulled||n.maxDepth!==n.lastMaxDepth||n.tilesWaitingForChildren!==n.lastTilesWaitingForChildren||n.maxDepthVisited!==n.lastMaxDepthVisited)&&(console.log("Visited "+n.tilesVisited+", Rendered: "+n.tilesRendered+", Culled: "+n.tilesCulled+", Max Depth Rendered: "+n.maxDepth+", Max Depth Visited: "+n.maxDepthVisited+", Waiting for children: "+n.tilesWaitingForChildren),n.lastTilesVisited=n.tilesVisited,n.lastTilesRendered=n.tilesRendered,n.lastTilesCulled=n.tilesCulled,n.lastMaxDepth=n.maxDepth,n.lastTilesWaitingForChildren=n.tilesWaitingForChildren,n.lastMaxDepthVisited=n.maxDepthVisited))}h$e.prototype.resetCamera=function(e,t){var i=e.camera;1===e._fboState.frameBufferType&&t.waterPlane&&i.enableReflection(t.waterPlane),i._setTransform(H$i),i.setView({destination:t.position,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},convert:!1}),e.context.uniformState.update(e),e.context.uniformState.updateFrustum(i.frustum),e.context.uniformState.viewport=t.viewport},h$e.prototype.realtimeRasterVectors=function(e,t){if(!(this.level<2||(e.rasterPerFrame&&e.camera.zoomLevel!==this.zoomLevel&&(this._rasterized=!1),this._rasterized))){this.zoomLevel=e.camera.zoomLevel;var i=0;2===this._level&&(i=1),t._rasterCurrentFBOIdx=i,this._rasterTextureSize=t._rasterTextureSizes[i],this._rasterized=!0,m$f.width=this._rasterTextureSize,m$f.height=this._rasterTextureSize;for(var n=e.commandListRealtimeRaster,r=[],o=[],a=0;a<n.length;a++){var s=!1;if(e$2e(n[a]._globeIndex))if(this._level>=n[a]._globeIndex.level){var l=Math.pow(2,this._level-n[a]._globeIndex.level),u=Math.floor(this.y/l),c=Math.floor(this.x/l);u===n[a]._globeIndex.row&&c===n[a]._globeIndex.col&&(s=!0)}else{l=Math.pow(2,n[a]._globeIndex.level-this._level),u=Math.floor(n[a]._globeIndex.row/l),c=Math.floor(n[a]._globeIndex.col/l);u===this.y&&c===this.x&&(s=!0)}else{var h,d=new h$18((h=n[a]._boundingVolume instanceof i$1d?n[a]._boundingVolume:i$1d.fromOrientedBoundingBox(n[a]._boundingVolume)).center.x-h.radius,h.center.y-h.radius,h.center.x+h.radius,h.center.y+h.radius);d.west=e$2d.toRadians(d.west),d.north=e$2d.toRadians(d.north),d.east=e$2d.toRadians(d.east),d.south=e$2d.toRadians(d.south),e$2e(h$18.intersection(d,this._rectangle,Y$9))&&(s=!0)}s&&(n[a]._primitiveType===W$18.TRIANGLES?r.push(n[a]):o.push(n[a]))}if(0===r.length&&0===o.length)return void(e$2e(this._rasterFBO)&&(this._clearCommand.framebuffer=this._rasterFBO,this._clearCommand.execute(e.context)));e$2e(this._rasterTexture)||this.createRealtimeRasterFBO(e);var f=!1,p=t._rasterLineFBOs[i],_=t._rasterAAFBOs[i];e.rasterLineWidth>1&&o.length>0&&(f=!0,this._clearCommand.framebuffer=p,this._clearCommand.execute(e.context)),this._clearCommand.framebuffer=_,this._clearCommand.execute(e.context),this._clearCommand.framebuffer=this._rasterFBO,this._clearCommand.execute(e.context);var m=Z$c(this,e),g={},x={};for(a=0;a<r.length;a++){e$2e(g[y=r[a].layerId])?g[y].push(r[a]):g[y]=[r[a]]}for(a=0;a<o.length;a++){var y;e$2e(x[y=o[a].layerId])?x[y].push(o[a]):x[y]=[o[a]]}if(e$2e(e.rasterLayerIds))for(var v=0;v<e.rasterLayerIds.length;v++){var $=e.rasterLayerIds[v],b=g[$],T=x[$];if(e$2e(b))for(a=0;a<b.length;a++)e$2e(b[a].shaderProgram)&&(b[a].renderState=d$1m.fromCache({viewport:m$f,depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),b[a].framebuffer=_,b[a].execute(e.context));if(e$2e(T))for(a=0;a<T.length;a++)e$2e(T[a].shaderProgram)&&(T[a].renderState=d$1m.fromCache({viewport:m$f}),T[a].framebuffer=f?p:_,T[a].execute(e.context))}e.context.webgpu&&e.context.engine.flushFramebuffer(),this.resetCamera(e,m),f&&(t._lineExpandCommand.framebuffer=_,t._lineExpandCommand.renderState=d$1m.fromCache({viewport:m$f}),t._lineExpandCommand.execute(e.context)),t._lineFXAACommand.framebuffer=this._rasterFBO,t._lineFXAACommand.renderState=d$1m.fromCache({viewport:m$f}),t._lineFXAACommand.execute(e.context)}},h$e.prototype.renderVectorBy2DCanvas=function(e,t){var i=e.rasterVectorCollection,n=i.bounds;if(e$2e(n)){var r=!1;if(e$2e(h$18.intersection(n,this._rectangle,Y$9))&&(r=!0),r&&!this._2DRasterized){this._2DRasterized=!0,e$2e(this._2DRasterTexture)||(this._2DRasterTexture=new t$U({context:e.context,width:i.canvasWidth,height:i.canvasHeight,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}));var o=i.draw(this._rectangle);this._2DRasterTexture.copyFrom(o),this._2DRasterTexture.textureAlpha=i.alpha}}},h$e.prototype.rasterClipRegion=function(e,t){if(!(e._fboState.name.indexOf("_excavationGlobeHeight")>-1||this._level<2)){var i=[].concat(t._excavateRegions.values).concat(t._modifyRegions.values).concat(t._imageryClipRegions.values).concat(t._extractRegions.values);e$2e(t._slopeRegion)&&i.push(t._slopeRegion),e$2e(t._hypsometricRegion)&&i.push(t._hypsometricRegion);var n=i.length;if(!(n<1||e.camera.frustum instanceof a$V||this._clipRegionsCount===n)){e$2e(this._clipRasterFbo)||(this._clipRasterTexture=new t$U({context:e.context,width:256,height:256,pixelFormat:V$12.RGBA}),this._clipRasterFbo=new t$V({context:e.context,colorTextures:[this._clipRasterTexture],destroyAttachments:!1})),this._clearCommand.framebuffer=this._clipRasterFbo,this._clearCommand.execute(e.context),m$f.width=256,m$f.height=256;for(var r=Z$c(this,e),o=!1,a=0;a<n;a++){var s=i[a];if(e$2e(h$18.intersection(s.rectangle,this._rectangle))){var l=s.command;!e$2e(s.command)||(o=!0,l.renderState=d$1m.fromCache({viewport:m$f,cull:{enabled:!1}}),l.framebuffer=this._clipRasterFbo,l.execute(e.context))}}if(this.resetCamera(e,r),(o=o||t.clippingType===R$L.KeepInside)&&(this._clipRegionsCount=n),this._clipRegionRasterized=o,o){var u=this._level+" "+this._x+" "+this._y;t._clipRasterTilesMap[u]=this}}}},h$e.prototype.setRasterValidTerrainCamera=function(e,t){var i=f$1a.clone(t.context.uniformState._viewport),n=t.camera;o$1p.clone(n.position,oldPosition),o$1p.clone(n.direction,oldDirection),o$1p.clone(n.up,oldUp),n.setView({destination:new o$1p(16383.5,16383.5,5e4),orientation:{direction:new o$1p(0,0,-1),up:new o$1p(0,1,0)},convert:!1});var r=new a$V({width:32767,aspectRatio:1,near:1,far:1e5});return t.context.uniformState.update(t),t.context.uniformState.updateFrustum(r),{position:oldPosition,direction:oldDirection,upDirection:oldUp,viewport:i}},h$e.prototype.setShowInvalid=function(e){this.showInvalid!==e&&(this.showInvalid=e,e$2e(this.data)&&this.data.setShowInvalid(e))},Object.defineProperties(C$e.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}}),C$e.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0,this._zeroTileReady=!1},C$e.prototype.forEachLoadedTile=function(e){for(var t=this._tileReplacementQueue.head;e$2e(t);)t.state!==re$A.START&&e(t),t=t.replacementNext},C$e.prototype.forEachRenderedTile=function(e){for(var t=this._tilesToRender,i=0,n=t.length;i<n;++i)e(t[i])},C$e.prototype.updateHeight=function(e,t,i){var n=this,r={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t,scene:i,removeFunc:function(){for(var e=n._addHeightCallbacks,t=e.length,i=0;i<t;++i)if(e[i]===r){e.splice(i,1);break}n._removeHeightCallbacks.push(r)}};return n._addHeightCallbacks.push(r),r.removeFunc},C$e.prototype.update=function(e){e$2e(this._tileProvider.update)&&this._tileProvider.update(e)},C$e.prototype.beginFrame=function(e){!e.passes.render||(this._tilesInvalidated&&(be$5(this),this._tilesInvalidated=!1),this._freeAllBakTiles&&(Ce$5(this),this._freeAllBakTiles=!1),this._tileProvider.initialize(e),le$8(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())},C$e.prototype.render=function(e){var t=e.passes,i=this._tileProvider;t.render&&(i.beginUpdate(e),ye$4(this,e),ke$3(this,e),i.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&i.updateForPick(e)},C$e.prototype.showInvalid=function(e){var t,i,n,r=[];for(t=0,i=this._levelZeroTiles.length;t<i;++t)r.push(this._levelZeroTiles[t]);for(;n=r.pop();)n.setShowInvalid(e),this._tileToUpdateHeights.push(n),e$2e(n._southeastChild)&&r.push(n._southeastChild),e$2e(n._southwestChild)&&r.push(n._southwestChild),e$2e(n._northeastChild)&&r.push(n._northeastChild),e$2e(n._northwestChild)&&r.push(n._northwestChild)},C$e.prototype.endFrame=function(e){if(e.passes.render&&e.mode!==C$14.MORPHING){if(e.camera._scene._mvtVisibleControl)for(var t=e.camera._scene._mvtVisibleLevel,i=this._tileReplacementQueue.head;e$2e(i);){if(!1===i._mvtLoaded&&i._level>e.camera._endLevel-t&&e$2e(i.data)&&e$2e(i.data.imagery))for(var n=i.data.imagery,r=0;r<n.length;r++)if(e$2e(n[r].loadingImagery)){n[r].loadingImagery.imageryLayer._imageryProvider instanceof M$S&&(i._mvtLoaded=n[r].processStateMachine(i,e))}i=i.replacementNext}!0===this.tileProvider.terrainProvider._needRefresh&&(this.invalidateAllTiles(),this.tileProvider.terrainProvider._needRefresh=!1),we$3(this,e),Ae$7(this,e),me$9(this,e)}},C$e.prototype.isDestroyed=function(){return!1},C$e.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._tileReplacementQueue.markStartOfRenderFrame(),this._tileReplacementQueue.trimTiles(0,0)};var w$d,ae$6=new a$18;function pe$7(e,t){var i=h$18.center(e.rectangle,ae$6),n=i.longitude-w$d.longitude,r=i.latitude-w$d.latitude,o=(i=h$18.center(t.rectangle,ae$6)).longitude-w$d.longitude,a=i.latitude-w$d.latitude;return n*n+r*r-(o*o+a*a)}var Pe$5=new o$1p,O$c=[];function Ee$7(e,t,i){if(t>5){for(var n=[],r=0;r<e.length;++r)e[r].level===t&&n.push(e[r]);if(n.length<i)for(r=0;r<n.length;++r)n[r]._useParentImage=!0}}function ye$4(e,t){var i=e._debug;if(!i.suspendLodUpdate){var n=e._tilesToRender;n.length=0;for(var r=e._tileReplacementQueue.head;r!==e._tileReplacementQueue.tail;)r._renderThisFrame=!1,r._useParentImage=!1,r=r.replacementNext;var o,a=e._tileProvider;if(!e$2e(e._levelZeroTiles)){if(!a.ready)return;var s=a.tilingScheme;e._levelZeroTiles=h$e.createLevelZeroTiles(s);var l=e._levelZeroTiles.length;if(O$c.length<l)for(O$c=new Array(l),o=0;o<l;++o)void 0===O$c[o]&&(O$c[o]=new H$h)}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;var u=e._levelZeroTiles,c=u.length>1?e._occluders:void 0;w$d=t.camera.positionCartographic,u.sort(pe$7);var h,d=e._addHeightCallbacks,f=e._removeHeightCallbacks,p=t.frameNumber;if(d.length>0||f.length>0){for(o=0,h=u.length;o<h;++o)(r=u[o])._updateCustomData(p,d,f);d.length=0,f.length=0}var _=t.camera;e._cameraPositionCartographic=_.positionCartographic;var m=p$1d.getTranslation(_.transform,Pe$5);for(e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(m,e._cameraReferenceFrameOriginCartographic),o=0,h=u.length;o<h;++o)r=u[o],e._tileReplacementQueue.markTileRendered(r),r.renderable?R$e(e,r,a,t,c,!1,O$c[o]):(m$e(e,e._tileLoadQueueHigh,r,t),++i.tilesWaitingForChildren);for(var g=0,x=22,y=0;y<n.length;++y)g=Math.max(n[y].level,g),x=Math.min(n[y].level,x);t.camera._endLevel=g,g-x>3&&Ee$7(n,g,e._delicateImagerylength),e._zeroTileReady||(e._tilesToRenderOld.length>0?n.length>2&&(e._zeroTileReady=!0,e._freeAllBakTiles=!0):e._zeroTileReady=!0),e._lastSelectionFrameNumber=p}}function m$e(e,t,i,n){!i.needsLoading||(void 0!==e.tileProvider.computeTileLoadPriority&&(i._loadPriority=e.tileProvider.computeTileLoadPriority(i,n)),t.push(i))}function H$h(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function te$5(){this.southwest=new H$h,this.southeast=new H$h,this.northwest=new H$h,this.northeast=new H$h}te$5.prototype.combine=function(e){var t=this.southwest,i=this.southeast,n=this.northwest,r=this.northeast;e.allAreRenderable=t.allAreRenderable&&i.allAreRenderable&&n.allAreRenderable&&r.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||r.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+i.notYetRenderableCount+n.notYetRenderableCount+r.notYetRenderableCount};for(var U$e=new Array(30),G$f=0;G$f<U$e.length;++G$f)U$e[G$f]=new te$5;function De$6(e,t,i,n,r){var o=e._debug;++o.tilesVisited,e._tileReplacementQueue.markTileRendered(i),i._updateCustomData(t.frameNumber),i.level>o.maxDepthVisited&&(o.maxDepthVisited=i.level);var a=Ne$5(e,t,i)<e.maximumScreenSpaceError;if(e._tileProvider._terrainProvider._enablePrjArea&&a){var s=i._level+2,l=4*i._x,u=4*i._y;for(let t=0;t<e._tilesToRender.length;t++){const i=e._tilesToRender[t];if(i._level==s&&(i._x==l-1&&i._y==u||i._x==l&&i._y==u-1||i._x==l+3&&i._y==u-1||i._x==l+4&&i._y==u||i._x==l+4&&i._y==u+3||i._x==l+3&&i._y==u+4||i._x==l&&i._y==u+4||i._x==l-1&&i._y==u+3)){a=!1;break}}}var c=i.southwestChild,h=i.southeastChild,d=i.northwestChild,f=i.northeastChild,p=e._lastSelectionFrameNumber,_=i._lastSelectionResultFrame===p?i._lastSelectionResult:D$J.NONE,m=e.tileProvider;if(a||n){var g=D$J.originalResult(_)===D$J.RENDERED,x=D$J.originalResult(_)===D$J.CULLED||_===D$J.NONE,y=i.state===re$A.DONE,v=g||x||y;if(v||e$2e(m.canRenderWithoutLosingDetail)&&(v=m.canRenderWithoutLosingDetail(i)),v)return a&&m$e(e,e._tileLoadQueueMedium,i,t),B$9(e,i),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$J.RENDERED,r.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.RENDERED,void(r.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));n=!0,a&&m$e(e,e._tileLoadQueueHigh,i,t)}if(m.canRefine(i)){if(c.upsampledFromParent&&h.upsampledFromParent&&d.upsampledFromParent&&f.upsampledFromParent)return B$9(e,i),m$e(e,e._tileLoadQueueMedium,i,t),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(h),e._tileReplacementQueue.markTileRendered(d),e._tileReplacementQueue.markTileRendered(f),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$J.RENDERED,r.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.RENDERED,void(r.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.REFINED;var $=e._tilesToRender.length,b=e._tileLoadQueueLow.length,T=e._tileLoadQueueMedium.length,C=e._tileLoadQueueHigh.length,S=e._tileToUpdateHeights.length;if(Fe$6(e,c,h,d,f,t,n,r),$!==e._tilesToRender.length){var w=r.allAreRenderable,E=r.anyWereRenderedLastFrame,P=r.notYetRenderableCount,A=!1;if(!w&&!E){for(var L=e._tilesToRender,M=$;M<L.length;++M)for(var R=L[M];void 0!==R&&R._lastSelectionResult!==D$J.KICKED&&R!==i;)R._lastSelectionResult=D$J.kick(R._lastSelectionResult),R=R.parent;e._tilesToRender.length=$,e._tileToUpdateHeights.length=S,B$9(e,i),i._lastSelectionResult=D$J.RENDERED;var O=_===D$J.RENDERED;!O&&P>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=b,e._tileLoadQueueMedium.length=T,e._tileLoadQueueHigh.length=C,m$e(e,e._tileLoadQueueMedium,i,t),r.notYetRenderableCount=i.renderable?0:1,A=!0),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=O,O||e._tileToUpdateHeights.push(i),++o.tilesWaitingForChildren}e.preloadAncestors&&!A&&m$e(e,e._tileLoadQueueLow,i,t)}}else i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=D$J.RENDERED,B$9(e,i),m$e(e,e._tileLoadQueueHigh,i,t),r.allAreRenderable=i.renderable,r.anyWereRenderedLastFrame=_===D$J.RENDERED,r.notYetRenderableCount=i.renderable?0:1}function Fe$6(e,t,i,n,r,o,a,s){if(!(t.level>=U$e.length)){var l=o.camera.positionCartographic,u=e._tileProvider,c=e._occluders,h=U$e[t.level],d=h.southwest,f=h.southeast,p=h.northwest,_=h.northeast;l.longitude<t.rectangle.east?l.latitude<t.rectangle.north?(R$e(e,t,u,o,c,a,d),R$e(e,i,u,o,c,a,f),R$e(e,n,u,o,c,a,p),R$e(e,r,u,o,c,a,_)):(R$e(e,n,u,o,c,a,p),R$e(e,t,u,o,c,a,d),R$e(e,r,u,o,c,a,_),R$e(e,i,u,o,c,a,f)):l.latitude<t.rectangle.north?(R$e(e,i,u,o,c,a,f),R$e(e,t,u,o,c,a,d),R$e(e,r,u,o,c,a,_),R$e(e,n,u,o,c,a,p)):(R$e(e,r,u,o,c,a,_),R$e(e,n,u,o,c,a,p),R$e(e,i,u,o,c,a,f),R$e(e,t,u,o,c,a,d)),h.combine(s)}}function Qe$3(e,t){var i=t.rectangle;return e$2e(e._cameraPositionCartographic)&&h$18.contains(i,e._cameraPositionCartographic)||e$2e(e._cameraReferenceFrameOriginCartographic)&&h$18.contains(i,e._cameraReferenceFrameOriginCartographic)}function R$e(e,t,i,n,r,o,a){if(i.computeTileVisibility(t,n,r)!==fe$r.NONE)return De$6(e,n,t,o,a);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),a.allAreRenderable=!0,a.anyWereRenderedLastFrame=!1,a.notYetRenderableCount=0,Qe$3(e,t)){(!e$2e(t.data)||!e$2e(t.data.vertexArray))&&m$e(e,e._tileLoadQueueMedium,t,n);var s=e._lastSelectionFrameNumber,l=t._lastSelectionResultFrame===s?t._lastSelectionResult:D$J.NONE;l!==D$J.CULLED_BUT_NEEDED&&l!==D$J.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=D$J.CULLED_BUT_NEEDED}else e.preloadSiblings||0===t.level?(m$e(e,e._tileLoadQueueLow,t,n),t._lastSelectionResult=D$J.CULLED):t._lastSelectionResult=D$J.CULLED;t._lastSelectionResultFrame=n.frameNumber}function Ne$5(e,t,i){if(t.mode===C$14.SCENE2D||t.camera.frustum instanceof a$V||t.camera.frustum instanceof l$11)return xe$4(e,t,i);if(i.isModified&&i.level>18)return 0;var n,r=i._distance;if(e._tileProvider._terrainProvider._enablePrjArea){var o=i.data.tileBoundingRegion._orientedBoundingBox.calculateBoxArea(t.camera.positionWC,t.mode,r,t.camera.frustum.sseDenominator,t.context.drawingBufferHeight,-1,t.context.uniformState.mvpViewPort,t.mapProjection);n=Math.sqrt(o/e$2d.PI_OVER_FOUR)/288}else{n=e._tileProvider.getLevelMaximumGeometricError(i.level)*t.context.drawingBufferHeight/(r*t.camera.frustum.sseDenominator)}return 0==e._tileProvider._terrainProvider._enablePrjArea&&t.fog.enabled&&(n-=e$2d.fog(r,t.fog.density)*t.fog.sse),n}function xe$4(e,t,i){var n=t.camera.frustum;e$2e(n._offCenterFrustum)&&(n=n._offCenterFrustum);var r=t.context,o=r.drawingBufferWidth,a=r.drawingBufferHeight,s=e._tileProvider.getLevelMaximumGeometricError(i.level)/(Math.max(n.top-n.bottom,n.right-n.left)/Math.max(o,a));return t.fog.enabled&&t.mode!==C$14.SCENE2D&&(s-=e$2d.fog(i._distance,t.fog.density)*t.fog.sse),s}function B$9(e,t){t._renderThisFrame=!0,e._tilesToRender.push(t)}function we$3(e,t){var i=e._tileLoadQueueHigh,n=e._tileLoadQueueMedium,r=e._tileLoadQueueLow;if(0!==i.length||0!==n.length||0!==r.length){e._tileReplacementQueue.trimTiles(e.tileCacheSize,e.tileCacheSizeForMVT);var o=Et$c()+e._loadQueueTimeSlice,a=e._tileProvider,s=q$c(e,t,a,o,i,!1);s=q$c(e,t,a,o,n,s),q$c(e,t,a,o,r,s)}}function Oe$6(e,t){return e._loadPriority-t._loadPriority}function q$c(e,t,i,n,r,o){void 0!==i.computeTileLoadPriority&&r.sort(Oe$6);for(var a=0,s=r.length;a<s&&(Et$c()<n||!o);++a){var l=r[a];e._tileReplacementQueue.markTileRendered(l),i.loadTile(t,l),o=!0}return o}var Q$8=new f$19,K$9=new a$18,D$b=new o$1p,He$4=[];function Ae$7(e,t){if(!e.tileProvider.ready)return;const i=He$4;i.length=0;const n=e._tileToUpdateHeights,r=Et$c()+e._updateHeightsTimeSlice,o=t.mode,a=t.mapProjection,s=e.tileProvider.tilingScheme.ellipsoid;let l;for(;n.length>0;){const t=n[0];if(!e$2e(t.data)||!e$2e(t.data.mesh)){const r=t._lastSelectionResultFrame===e._lastSelectionFrameNumber?t._lastSelectionResult:D$J.NONE;(r===D$J.RENDERED||r===D$J.CULLED_BUT_NEEDED)&&i.push(t),n.shift(),e._lastTileIndex=0;continue}const u=t.customData,c=u.length;let h=!1;for(l=e._lastTileIndex;l<c;++l){const e=u[l],i=t.data.terrainData;if(e$2e(i)&&i.wasCreatedByUpsampling(),t.level>e.level){if(e$2e(e.positionOnEllipsoidSurface)||(e.positionOnEllipsoidSurface=o$1p.fromRadians(e.positionCartographic.longitude,e.positionCartographic.latitude,0,s)),o===C$14.SCENE3D){const i=s.geodeticSurfaceNormal(e.positionOnEllipsoidSurface,Q$8.direction);if(!e$2e(s.getSurfaceNormalIntersectionWithZAxis(e.positionOnEllipsoidSurface,11500,Q$8.origin))){let n=0;e$2e(t.data.tileBoundingRegion)&&(n=t.data.tileBoundingRegion.minimumHeight);const r=Math.min(n,-11500),o=o$1p.multiplyByScalar(i,Math.abs(r)+1,D$b);o$1p.subtract(e.positionOnEllipsoidSurface,o,Q$8.origin)}}else a$18.clone(e.positionCartographic,K$9),K$9.height=-11500,a.project(K$9,D$b),o$1p.fromElements(D$b.z,D$b.x,D$b.y,D$b),o$1p.clone(D$b,Q$8.origin),o$1p.clone(o$1p.UNIT_X,Q$8.direction);const i=t.data.pick(Q$8,o,a,!1,D$b);e$2e(i)&&(e$2e(e.callback)&&e.callback(i),e.level=t.level)}if(Et$c()>=r){h=!0;break}}if(h){e._lastTileIndex=l;break}e._lastTileIndex=0,n.shift()}for(l=0;l<i.length;l++)n.push(i[l])}function ke$3(e,t){for(var i=e._tileProvider,n=e._zeroTileReady?e._tilesToRender:e._tilesToRenderOld,r=0,o=n.length;r<o;++r){var a=n[r];i.showTileThisFrame(a,t)}}function p$9(e){this._bounds=void 0;var t=512;this._canvas=document.createElement("canvas"),this._canvas.height=t,this._canvas.width=t,this._pickCanvas=document.createElement("canvas"),this._pickCanvas.height=t,this._pickCanvas.width=t,this._polygons=new e$1Q,this._polygonHoles=new e$1Q,this._polylines=new e$1Q,this._quadtreePrimitive=e,this._alpha=1}Object.defineProperties(p$9.prototype,{bounds:{get:function(){return this._bounds}},canvasWidth:{get:function(){return this._canvas.width}},canvasHeight:{get:function(){return this._canvas.height}},alpha:{get:function(){return this._alpha},set:function(e){this._alpha=e}}});var T$g=new h$18;function f$g(e,t){if(e$2e(t)){var i=e._rectangle;e$2e(h$18.intersection(t,i,T$g))&&(e._2DRasterized=!1),e$2e(e._southwestChild)&&f$g(e._southwestChild,t),e$2e(e._southeastChild)&&f$g(e._southeastChild,t),e$2e(e._northwestChild)&&f$g(e._northwestChild,t),e$2e(e._northeastChild)&&f$g(e._northeastChild,t)}}function Z$b(e){var t,i,n=e._polygons,r=n.values.length;for(t=0;t<r;t++)i=n.values[t].bounds,e$2e(e._bounds)?e._bounds=h$18.union(i,e._bounds):e._bounds=i;for(r=(n=e._polygonHoles).values.length,t=0;t<r;t++)i=n.values[t].bounds,e$2e(e._bounds)?e._bounds=h$18.union(i,e._bounds):e._bounds=i;for(r=(n=e._polylines).values.length,t=0;t<r;t++)i=n.values[t].bounds,e$2e(e._bounds)?e._bounds=h$18.union(i,e._bounds):e._bounds=i}function x$f(e,t,i,n){for(var r=e.length,o=[],a=i/t.width,s=n/t.height,l=0;l<r;l++){var u=e[l],c=new o$1o;c.x=(u.longitude-t.west)*a,c.y=(t.north-u.latitude)*s,c.x=Math.floor(c.x+.5),c.y=Math.floor(c.y+.5),o.push(c)}return o}function O$b(e,t,i,n,r,o){var a,s=t.values.length;for(a=0;a<s;a++){var l=t.values[a];if(e$2e(h$18.intersection(l.bounds,i,T$g))){var u;u=e$2e(l.selected)&&l.selected?e$1X.BLUE:o?new e$1X(0,0,0,1):l.fillColor;var c=x$f(l.positions,i,n,r);t$d.drawPolygon(e,{canvasPostions:c,fillColor:u,lineColor:l.lineColor,lineWidth:l.lineWidth})}}}function M$f(e,t,i,n,r){var o,a=t.values.length;for(o=0;o<a;o++){var s=t.values[o];if(e$2e(h$18.intersection(s.bounds,i,T$g))){var l=x$f(s.positions,i,n,r);t$d.drawSimplePolyline(e,{canvasPostions:l,lineColor:s.lineColor,lineWidth:s.lineWidth})}}}function W$g(e,t){var i=Math.floor(e/65536),n=e-65536*i,r=Math.floor(n/256),o=n-256*r,a=1;return e$2e(t)&&(a=t/256),new e$1X(o/256,r/256,i/256,a)}p$9.prototype.add=function(e){var t=e.name,i=e.positions,n=new h$18,r=u$Z(e.geometryType,C$q.POLYGON),o=u$Z(e.pickId,0);h$18.fromCartographicArray(i,n);var a={pickId:o,positions:i,bounds:n,fillColor:e.fillColor,lineColor:e.lineColor,lineWidth:e.lineWidth};r==C$q.POLYLINE?this._polylines.set(t,a):r==C$q.POLYGON?this._polygons.set(t,a):r==C$q.POLYGON_HOLE&&this._polygonHoles.set(t,a),Z$b(this),f$g(this._quadtreePrimitive._levelZeroTiles[0],n),f$g(this._quadtreePrimitive._levelZeroTiles[1],n)},p$9.prototype.remove=function(e){var t;if(this._polygons.contains(e)){var i=this._polygons.get(e);e$2e(i)&&(t=i.bounds),this._polygons.remove(e)}if(this._polygonHoles.contains(e)){var n=this._polygonHoles.get(e);e$2e(n)&&(t=n.bounds),this._polygonHoles.remove(e)}if(this._polylines.contains(e)){var r=this._polylines.get(e);e$2e(r)&&(t=r.bounds),this._polylines.remove(e)}f$g(this._quadtreePrimitive._levelZeroTiles[0],t),f$g(this._quadtreePrimitive._levelZeroTiles[1],t)},p$9.prototype.removeAll=function(){this._polylines.removeAll(),this._polygons.removeAll(),this._polygonHoles.removeAll(),f$g(this._quadtreePrimitive._levelZeroTiles[0],this._bounds),f$g(this._quadtreePrimitive._levelZeroTiles[1],this._bounds)},p$9.prototype.draw=function(e){var t=this._canvas.getContext("2d");return t.clearRect(0,0,this._canvas.width,this._canvas.height),O$b(t,this._polygons,e,this._canvas.width,this._canvas.height,!1),O$b(t,this._polygonHoles,e,this._canvas.width,this._canvas.height,!0),M$f(t,this._polylines,e,this._canvas.width,this._canvas.height),this._canvas};var c$c=new h$18;function i$d(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=h$18.clone(h$18.MAX_VALUE)}function h$d(e){var t=new t$z({ellipsoid:e=u$Z(e,t$12.WGS84)}),i=new n$b,n=new o$i;this._ellipsoid=e,this._imageryLayerCollection=i,this._terrainLayerCollection=n,this._surfaceShaderSet=new U$f,this._material=void 0,this._surface=new C$e({tileProvider:new R$H({terrainProvider:t,imageryLayers:i,terrainLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainLayerCollection._globe=this,this._rasterVectorCollection=new p$9(this._surface),this._terrainProvider=t,this._defaultTerrainProvider=t,this._terrainProviderChanged=new o$1h,J$8(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new t$10({url:n$17("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.tileCacheSizeForMVT=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!0,this.fillHighlightColor=void 0,this.enableLighting=!1,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!0,this.lightingFadeOutDistance=1e7,this.lightingFadeInDistance=2e7,this.nightFadeOutDistance=1e7,this.nightFadeInDistance=5e7,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!0,this.shadows=W$X.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this._globeAlpha=1,this._splitDirection=new o$1o(0,0),this._sceneMode=C$14.SCENE3D,this.clippingType=R$L.KeepOutside,this.showExcavationSide=!0,this._scene=void 0,this._excavationNormalTextureUrl=n$17("Assets/Textures/excavationregion_top_Normal.jpg"),this._excavationSideNormalTextureUrl=n$17("Assets/Textures/excavationregion_side_Normal.jpg"),this._floodFlagTexture=void 0,this._floodRect=new e$2c,this._translucency=new i$d,this._undergroundColor=e$1X.clone(e$1X.BLACK),this._undergroundColorAlphaByDistance=new o$Y(e.maximumRadius/1e3,0,e.maximumRadius/5,1)}function J$8(e){var t=[],i=e$2e(e._material)&&(e._material.shaderSource.match(/slope/)||e._material.shaderSource.match("normalEC")),n=[le$9];!e$2e(e._material)||i&&!e._terrainProvider.requestVertexNormals?e._surface._tileProvider.uniformMap=void 0:(n.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.uniformMap=e._material._uniforms),n.push(Ne$6),e._surfaceShaderSet.baseVertexShaderSource=new s$V({sources:[le$9,He$5],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new s$V({sources:n,defines:t}),e._surfaceShaderSet.material=e._material}function Ke$3(e){return function(t,i){return i$1d.distanceSquaredTo(t.pickBoundingSphere,e)-i$1d.distanceSquaredTo(i.pickBoundingSphere,e)}}p$9.prototype.getPickID=function(e){var t,i=this._polygons,n=i.values.length,r=[],o=0;for(t=0;t<n;t++){var a=i.values[t].bounds;h$18.contains(a,e)&&(0==o?h$18.clone(a,c$c):c$c=h$18.union(a,c$c),o++,r.push(i.values[t]))}if(0==o)return-1;var s=this._pickCanvas.getContext("2d");for(n=r.length,t=0;t<n;t++){var l=r[t],u=x$f(l.positions,c$c,this._pickCanvas.width,this._pickCanvas.height),c=W$g(l.pickId);t$d.drawPolygon(s,{canvasPostions:u,fillColor:c,lineColor:c})}var h=(e.longitude-c$c.west)/c$c.width*this._pickCanvas.width,d=(c$c.north-e.latitude)/c$c.height*this._pickCanvas.height;h=Math.floor(h+.5);var f=4*((d=Math.floor(d+.5))*this._pickCanvas.width+h),p=s.getImageData(0,0,this._pickCanvas.width,this._pickCanvas.height),_=p.data[f],m=p.data[f+1],g=p.data[f+2];return p.data[f+3],_+256*m+256*g*256},p$9.prototype.setSelection=function(e){var t,i=this._polygons,n=i.values.length,r=0,o=!1;for(t=0;t<n;t++){var a=i.values[t],s=a.pickId,l=a.bounds;o=!1,s===e?(a.selected=!0,o=!0):(e$2e(a.selected)&&a.selected&&(o=!0),a.selected=!1),o&&(0==r?h$18.clone(l,c$c):c$c=h$18.union(l,c$c),r++)}f$g(this._quadtreePrimitive._levelZeroTiles[0],c$c),f$g(this._quadtreePrimitive._levelZeroTiles[1],c$c)},p$9.prototype.isDestroyed=function(){return!1},p$9.prototype.destroy=function(){return i$11(this)},Object.defineProperties(i$d.prototype,{enabled:{get:function(){return this._enabled},set:function(e){o$1q.typeOf.bool("enabled",e),this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("frontFaceAlpha",e,0),o$1q.typeOf.number.lessThanOrEquals("frontFaceAlpha",e,1),this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){if(e$2e(e)&&e.far<e.near)throw new t$15("far distance must be greater than near distance.");this._frontFaceAlphaByDistance=o$Y.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){o$1q.typeOf.number.greaterThanOrEquals("backFaceAlpha",e,0),o$1q.typeOf.number.lessThanOrEquals("backFaceAlpha",e,1),this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){if(e$2e(e)&&e.far<e.near)throw new t$15("far distance must be greater than near distance.");this._backFaceAlphaByDistance=o$Y.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){e$2e(e)||(e=h$18.clone(h$18.MAX_VALUE)),h$18.clone(e,this._rectangle)}}}),new p$1d(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Object.defineProperties(h$d.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},terrainLayers:{get:function(){return this._terrainLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tileLoadedEvent:{get:function(){return this._surface.tileProvider.tileLoadedEvent}},tilesLoaded:{get:function(){return!e$2e(this._surface)||this._surface.tileProvider.ready&&0===this._surface._tileLoadQueueHigh.length&&0===this._surface._tileLoadQueueMedium.length&&0===this._surface._tileLoadQueueLow.length}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){e$2e(e)||(e=h$18.clone(h$18.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),e$2e(this._material)&&J$8(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,J$8(this))}},globeAlpha:{get:function(){return this._globeAlpha},set:function(e){e$2e(e)&&e>=0&&e<=1&&(this._globeAlpha=e,this._translucency.enabled=e<1,this._translucency.frontFaceAlpha=e,this._translucency.backFaceAlpha=e,this._surface.tileProvider.globeAlpha=e)}},cullEnabled:{get:function(){return this._surface._tileProvider._cullEnabled},set:function(e){if(o$1q.typeOf.bool("cullEnabled",e),e$2e(e)&&(this._surface._tileProvider._cullEnabled=e,e$2e(this._surface._tileProvider._renderState))){var t=d$1m.getState(this._surface._tileProvider._renderState);t.cull.enabled=e,this._surface._tileProvider._renderState=d$1m.fromCache(t)}}},HypsometricSetting:{get:function(){return{hypsometricSetting:this._surface._tileProvider._hypsometricSetting,analysisMode:this._surface._tileProvider._hypAnalysisMode,altitudeMode:this._surface._tileProvider._style3D._altitudeMode}},set:function(e){if(this.removeRasterRegions(),this._surface._tileProvider._bUseHypColorTable=!1,this._surface._tileProvider._hypsometricRegionUpdate=!0,e$2e(this._surface._tileProvider._hypsometricRegion)&&(e$2e(this._surface._tileProvider._hypsometricRegion.command)&&(this._surface._tileProvider._hypsometricRegion.command.vertexArray.destroy(),this._surface._tileProvider._hypsometricRegion.command.shaderProgram.destroy()),this._surface._tileProvider._hypsometricRegion=null),e$2e(e)&&e$2e(e.hypsometricSetting)){if(this._surface._tileProvider._hypAnalysisMode=e.analysisMode||this._surface._tileProvider._hypAnalysisMode,this._surface._tileProvider._hypsometricSetting=u$L.clone(e.hypsometricSetting,this._surface._tileProvider._hypsometricSetting),this._surface._tileProvider._hypsometricSetting.ColorTable.generateBuffer(),e$2e(this._surface._tileProvider._hypsometricTexture)&&this._surface._tileProvider._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._surface._tileProvider._hypsometricSetting.ColorTable._imageBuffer}),this._surface._tileProvider._hypAnalysisMode!=k$S.AnalysisRegionMode.ARM_NONE&&(this._surface._tileProvider._bUseHypColorTable=!0),this._surface._tileProvider._hypsometricSetting.UpdatePolygonRegion&&this._surface._tileProvider._hypAnalysisMode==k$S.AnalysisRegionMode.ARM_REGION&&this._surface._tileProvider._hypsometricSetting.CoverageArea.length>0){var t=this._surface._tileProvider._hypsometricSetting.CoverageArea,i=o$1p.fromDegreesArrayHeights(t),n=h$18.fromCartesianArray(i),r=U$18.createGeometry(new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(t)}}));this._surface._tileProvider._hypsometricRegion={rectangle:n,worldGeometry:r,modelMatrix:p$1d.fromTranslation(new o$1p(t[0],t[1],0),new p$1d),command:void 0}}}else e$2e(this._surface._tileProvider._hypsometricSetting)&&(this._surface._tileProvider._hypsometricSetting.destroy(),this._surface._tileProvider._hypsometricSetting=void 0)}},SlopeSetting:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Globe_SlopeSetting"),{slopeSetting:this._surface._tileProvider._slopeSetting,analysisMode:this._surface._tileProvider._slopeAnalysisMode,altitudeMode:this._surface._tileProvider._style3D._altitudeMode}},set:function(e){if(LicenseChecker.LICENSECHECKER.verify("Globe_SlopeSetting"),this.removeRasterRegions(),this._surface._tileProvider._bUseSlopeColorTable=!1,this._surface._tileProvider._slopeRegionUpdate=!0,e$2e(this._surface._tileProvider._slopeRegion)&&(e$2e(this._surface._tileProvider._slopeRegion.command)&&(this._surface._tileProvider._slopeRegion.command.vertexArray.destroy(),this._surface._tileProvider._slopeRegion.command.shaderProgram.destroy()),this._surface._tileProvider._slopeRegion=null),e$2e(e)&&e$2e(e.slopeSetting)){if(this._surface._tileProvider._slopeAnalysisMode=e.analysisMode,this._surface._tileProvider._slopeSetting=l$K.clone(e.slopeSetting,this._surface._tileProvider._slopeSetting),this._surface._tileProvider._slopeSetting.ColorTable.generateBuffer(),e$2e(this._surface._tileProvider._slopeColorTexture)&&this._surface._tileProvider._slopeColorTexture.copyFrom({width:1024,height:64,arrayBufferView:this._surface._tileProvider._slopeSetting.ColorTable._imageBuffer}),this._surface._tileProvider._slopeAnalysisMode!=k$S.AnalysisRegionMode.ARM_NONE&&(this._surface._tileProvider._bUseSlopeColorTable=!0),this._surface._tileProvider._slopeSetting.UpdatePolygonRegion&&this._surface._tileProvider._slopeAnalysisMode==k$S.AnalysisRegionMode.ARM_REGION&&this._surface._tileProvider._slopeSetting.CoverageArea.length>0){var t=this._surface._tileProvider._slopeSetting.CoverageArea,i=o$1p.fromDegreesArrayHeights(t),n=h$18.fromCartesianArray(i),r=U$18.createGeometry(new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(t)}}));this._surface._tileProvider._slopeRegion={rectangle:n,worldGeometry:r,modelMatrix:p$1d.fromTranslation(new o$1p(t[0],t[1],0),new p$1d),command:void 0}}}else e$2e(this._surface._tileProvider._slopeSetting)&&(this._surface._tileProvider._slopeSetting.destroy(),this._surface._tileProvider._slopeSetting=void 0)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){o$1o.clone(e,this._splitDirection),o$1o.clone(e,this._surface._tileProvider._splitDirection)}},swipeRegion:{get:function(){var e=this._surface._tileProvider._swipeRegion;return new f$1a(e.x,e.y,e.z-e.x,e.w-e.y)},set:function(e){if(e$2e(e)){if(!(e instanceof f$1a))throw new t$15("swipeRegion must be a instance of BoundingRectangle.");e$2c.fromElements(e.x,e.y,e.x+e.width,e.y+e.height,this._surface._tileProvider._swipeRegion)}}},swipeEnabled:{get:function(){return this._surface._tileProvider._swipeEnabled},set:function(e){e!==this._swipeEnabled&&(e?this.splitDirection=new o$1o(0,0):e$2c.fromElements(0,0,1,1,this._surface._tileProvider._swipeRegion),this._surface._tileProvider._swipeEnabled=e)}},imageryLodTolerance:{get:function(){return this._surface._delicateImagerylength},set:function(e){"number"==typeof e&&(this._surface._delicateImagerylength=e)}},excavationSideTextureUrl:{get:function(){return this._surface.tileProvider._excavationSideTextureUrl},set:function(e){this._surface.tileProvider._excavationSideTextureUrl=e}},excavationBottomTextureUrl:{get:function(){return this._surface.tileProvider._excavationBottomTextureUrl},set:function(e){this._surface.tileProvider._excavationBottomTextureUrl=e}},translucency:{get:function(){return this._translucency}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=e$1X.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){if(e$2e(e)&&e.far<e.near)throw new t$15("far distance must be greater than near distance.");this._undergroundColorAlphaByDistance=o$Y.clone(e,this._undergroundColorAlphaByDistance)}}});var Qe$2=[],Ye$3={start:0,stop:0};h$d.prototype.pickWorldCoordinates=function(e,t,i){if(!e$2e(e))throw new t$15("ray is required");if(!e$2e(t))throw new t$15("scene is required");var n=t.mode,r=t.mapProjection,o=Qe$2;o.length=0;var a,s,l,u=this._surface._tilesToRender,c=u.length;for(s=0;s<c;++s){var h=(a=u[s]).data;if(e$2e(h)){var d=h.pickBoundingSphere;if(n!==C$14.SCENE3D)h.pickBoundingSphere=d=i$1d.fromRectangleWithHeights2D(a.rectangle,r,h.tileBoundingRegion.minimumHeight,h.tileBoundingRegion.maximumHeight,d),o$1p.fromElements(d.center.z,d.center.x,d.center.y,d.center);else{if(!e$2e(h.renderedMesh))continue;i$1d.clone(h.renderedMesh.boundingSphere3D,d)}e$2e(g$1j.raySphere(e,d,Ye$3))&&o.push(h)}}for(o.sort(Ke$3(e.origin)),c=o.length,s=0;s<c&&!e$2e(l=o[s].pick(e,t.mode,t.mapProjection,!0,i));++s);return l};var $$a=new o$1p,ee$8=new o$1p,re$7=new o$1p;h$d.prototype.computeSurfaceArea=function(e,t,i){var n,r=e._polygonHierarchy.positions;if(!e$2e(i)){for(var o=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,u=0;u<r.length;u++){var c=a$18.fromCartesian(r[u]);o=Math.min(c.longitude,o),a=Math.max(c.longitude,a),s=Math.min(c.latitude,s),l=Math.max(c.latitude,l)}var h=a$18.toCartesian(new a$18(o,s,0)),d=a$18.toCartesian(new a$18(a,l,0));n=o$1p.angleBetween(h,d)}for(var f=U$18.fromPositions({positions:r,granularity:e$2e(i)?i:n/32}),p=U$18.createGeometry(f),_=0,m={},g=0;g<p.indices.length;g+=3){var x,y,v,$=p.indices[g];if(e$2e(m[$]))x=m[$];else{x=new o$1p(p.attributes.position.values[3*$],p.attributes.position.values[3*$+1],p.attributes.position.values[3*$+2]);var b=a$18.fromCartesian(x),T=this.getHeight(b);if(!e$2e(T))continue;b=a$18.fromRadians(b.longitude,b.latitude,T),x=a$18.toCartesian(b,t),m[$]=o$1p.clone(x)}var C=p.indices[g+1];if(e$2e(m[C]))y=m[C];else{y=new o$1p(p.attributes.position.values[3*C],p.attributes.position.values[3*C+1],p.attributes.position.values[3*C+2]);var S=a$18.fromCartesian(y),w=this.getHeight(S);if(!e$2e(w))continue;S=a$18.fromRadians(S.longitude,S.latitude,w),y=a$18.toCartesian(S,t),m[C]=o$1p.clone(y)}var E=p.indices[g+2];if(e$2e(m[E]))v=m[E];else{v=new o$1p(p.attributes.position.values[3*E],p.attributes.position.values[3*E+1],p.attributes.position.values[3*E+2]);var P=a$18.fromCartesian(v),A=this.getHeight(P);if(!e$2e(A))continue;P=a$18.fromRadians(P.longitude,P.latitude,A),v=a$18.toCartesian(P,t),m[E]=o$1p.clone(v)}$$a=o$1p.subtract(y,x,$$a),ee$8=o$1p.subtract(v,x,ee$8),re$7=o$1p.cross($$a,ee$8,re$7),_+=.5*o$1p.magnitude(re$7)}return _},h$d.prototype.getVisibleTiles=function(){for(var e=[],t=this._surface._tilesToRender,i=0;i<t.length;i++)e.push({x:t[i].x,y:t[i].y,level:t[i].level});return e},h$d.prototype.computeSurfaceDistance=function(e,t){for(var i=e._positions,n=0,r=[],o=i.length-1,a=0;a<o;a++)for(var s=i[a],l=i[a+1],u=o$1p.angleBetween(s,l)/64,c=e$2d.chordLength(u,6378137),h=y$Z.subdivideLine(s,l,c,r),d=o$1p.unpackArray(h),f=d.length-1,p=0;p<f;p++){var _=d[p],m=a$18.fromCartesian(_),g=this.getHeight(m);if(e$2e(g)){m=a$18.fromRadians(m.longitude,m.latitude,g);var x=a$18.toCartesian(m),y=d[p+1];if(m=a$18.fromCartesian(y),e$2e(g=this.getHeight(m))){m=a$18.fromRadians(m.longitude,m.latitude,g);var v=a$18.toCartesian(m);n+=o$1p.distance(x,v)}}}return n};var Je$3=new a$18;h$d.prototype.pick=function(e,t,i){if(this.show){if(e$2e(i=this.pickWorldCoordinates(e,t,i))&&t.mode!==C$14.SCENE3D){i=o$1p.fromElements(i.y,i.z,i.x,i);var n=t.mapProjection.unproject(i,Je$3);i=t.globe.ellipsoid.cartographicToCartesian(n,i)}return i}};var $e$3=new o$1p,me$8=new o$1p,er$1=new a$18,rr$1=new f$19;function G$e(e,t){return h$18.contains(e.rectangle,t)?e:void 0}function he$7(e){for(var t=Number.MAX_VALUE,i=-Number.MAX_VALUE,n=2,r=e.length;n<r;n+=3){var o=e[n];t=Math.min(t,o),i=Math.max(i,o)}return{min:t,max:i}}function tr$2(e,t,i){var n=h$18.center(t,new o$1p);n.height=i,n=a$18.toCartesian(n);var r=o$1p.distance(e[0],e[1])/90,o=[];for(let t=0;t<e.length;t++){var a=new o$1p,s=o$1p.subtract(e[t],n,new o$1p);o$1p.normalize(s,s),o$1p.multiplyComponents(s,new o$1p(r,r,r),a),o$1p.subtract(e[t],a,a);var l=a$18.fromCartesian(a),u=e$2d.toDegrees(l.longitude),c=e$2d.toDegrees(l.latitude);o.push(u),o.push(c),o.push(l.height)}return o}function ir$2(e,t){var i=e.mapProjection,n=i.ellipsoid,r=new o$1p,o=new a$18;return n.cartesianToCartographic(t,o),i.project(o,r),o$1p.fromElements(r.z,r.x,r.y)}function fe$6(e,t){if(!e$2e(t._surface)||!e$2e(t._surface._tileProvider))return!1;var i=t._surface._tileProvider;if(e$2e(t._slopeSetting)&&i._modifyRegions.values.length>0)return!1;var n=t._surface._levelZeroTiles;if(!e$2e(n))return!1;var r,o,a=n.length;for(o=0;o<a&&(r=n[o],!h$18.contains(r.rectangle,e));++o);if(o>=a)return!1;for(;r._lastSelectionResult===D$J.REFINED;)r=G$e(r.southwestChild,e)||G$e(r.southeastChild,e)||G$e(r.northwestChild,e)||r.northeastChild;for(var s=r.data,l=s.normalTexture,u=s.terrainData.normalTexture;!(u||(r=r.parent,u=r.data.terrainData.normalTexture,l=r.data.normalTexture,r.level<10)););if(!e$2e(u)||!e$2e(l))return!1;var c=parseInt((e.longitude-r.rectangle.west)/(r.rectangle.east-r.rectangle.west)*l.width)+parseInt((r.rectangle.north-e.latitude)/(r.rectangle.north-r.rectangle.south)*l.height)*l.width,h=new o$1p;return h.x=2*(u[3*c]/255-.5),h.y=2*(u[3*c+1]/255-.5),h.z=2*(u[3*c+2]/255-.5),o$1p.normalize(h,h),h}function a$a(){this._colorTexture=void 0,this._depthStencilTexture=void 0,this._globeDepthTexture=void 0,this._tempGlobeDepthTexture=void 0,this._tempCopyDepthTexture=void 0,this._colorRenderBuffer=void 0,this._depthStencilRenderbuffer=void 0,this._copyDepthFramebuffer=void 0,this._tempCopyDepthFramebuffer=void 0,this._updateDepthFramebuffer=void 0,this._framebufferWithTexture=void 0,this._framebufferWithRenderbuffer=void 0,this._isMSAA=!1,this._clearColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._viewport=new f$1a,this._rs=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useLogDepth=void 0,this._useHdr=void 0,this._debugGlobeDepthViewportCommand=void 0,this._numSamples=1}function O$a(e,t,i,n){if(!e$2e(e._debugGlobeDepthViewportCommand)||n!==e._useLogDepth){var r=new s$V({defines:[n?"LOG_DEPTH":""],sources:["uniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float z_window = czm_unpackDepth(texture2D(u_depthTexture, v_textureCoordinates));\n z_window = czm_reverseLogDepth(z_window); \n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]});e._debugGlobeDepthViewportCommand=t.createViewportQuadCommand(r,{shaderProgramName:"debugGlobeDepth",uniformMap:{u_depthTexture:function(){return e._globeDepthTexture}},owner:e}),e._useLogDepth=n}e._debugGlobeDepthViewportCommand.execute(t,i)}function M$e(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&!e._depthStencilTexture.isDestroyed()&&e._depthStencilTexture.destroy(),e._globeDepthTexture=e._globeDepthTexture&&!e._globeDepthTexture.isDestroyed()&&e._globeDepthTexture.destroy()}function U$d(e){e._colorRenderBuffer=e._colorRenderBuffer&&!e._colorRenderBuffer.isDestroyed()&&e._colorRenderBuffer.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&!e._depthStencilRenderbuffer.isDestroyed()&&e._depthStencilRenderbuffer.destroy()}function N$a(e){e._framebufferWithTexture=e._framebufferWithTexture&&!e._framebufferWithTexture.isDestroyed()&&e._framebufferWithTexture.destroy(),e._framebufferWithRenderbuffer=e._framebufferWithRenderbuffer&&!e._framebufferWithRenderbuffer.isDestroyed()&&e._framebufferWithRenderbuffer.destroy(),e._copyDepthFramebuffer=e._copyDepthFramebuffer&&!e._copyDepthFramebuffer.isDestroyed()&&e._copyDepthFramebuffer.destroy()}function l$e(e){e._tempCopyDepthFramebuffer=e._tempCopyDepthFramebuffer&&!e._tempCopyDepthFramebuffer.isDestroyed()&&e._tempCopyDepthFramebuffer.destroy(),e._updateDepthFramebuffer=e._updateDepthFramebuffer&&!e._updateDepthFramebuffer.isDestroyed()&&e._updateDepthFramebuffer.destroy(),e._tempGlobeDepthTexture=e._tempGlobeDepthTexture&&!e._tempGlobeDepthTexture.isDestroyed()&&e._tempGlobeDepthTexture.destroy()}function W$f(e,t,i,n,r){e._tempGlobeDepthTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}),e._tempCopyDepthFramebuffer=new t$V({context:t,colorTextures:[e._tempGlobeDepthTexture],destroyAttachments:!1}),r.framebuffer.depthStencilTexture,e._isMSAA&&e._depthStencilTexture,e._updateDepthFramebuffer=new t$V({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}function z$c(e,t,i,n,r,o){var a=o?t.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT:_$_.UNSIGNED_BYTE;e._colorTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:a,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST}),samples:r}),e._depthStencilTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8,samples:r}),e._globeDepthTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})}function I$b(e,t,i,n,r,o){if(!e._isMSAA)return;var a=o?t.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT:_$_.UNSIGNED_BYTE;const s=M$13.getColorFormat(a);e._colorRenderBuffer=new r$10({context:t,width:i,height:n,pixelDatatype:a,format:s,samples:r}),e._depthStencilRenderbuffer=new r$10({context:t,width:i,height:n,format:M$13.DEPTH_STENCIL,samples:r})}function V$e(e,t){e._isMSAA&&(e._framebufferWithRenderbuffer=new t$V({context:t,colorRenderbuffers:[e._colorRenderBuffer],depthStencilRenderbuffer:e._depthStencilRenderbuffer,destroyAttachments:!1})),e._framebufferWithTexture=new t$V({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._copyDepthFramebuffer=new t$V({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}function H$g(e,t,i,n,r,o){!t.webgpu&&r>1&&(e._isMSAA=!0);var a=e._colorTexture,s=!e$2e(a)||a.width!==i||a.height!==n||o!==e._useHdr||r!==e._numSamples;(!e$2e(e._framebufferWithTexture)||s)&&(M$e(e),N$a(e),z$c(e,t,i,n,r,o),I$b(e,t,i,n,r,o),V$e(e,t))}function w$c(e,t,i,n,r){e._viewport.width=i,e._viewport.height=n;var o=!f$1a.equals(e._viewport,r.viewport),a=o!==e._useScissorTest;e._useScissorTest=o,f$1a.equals(e._scissorRectangle,r.viewport)||(e._scissorRectangle=f$1a.clone(r.viewport,e._scissorRectangle),a=!0),(!e$2e(e._rs)||!f$1a.equals(e._viewport,e._rs.viewport)||a)&&(e._rs=d$1m.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsUpdate=d$1m.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!1,frontFunction:m$Z.EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.KEEP},backFunction:m$Z.NEVER,reference:u$M.CESIUM_3D_TILE_MASK,mask:u$M.CESIUM_3D_TILE_MASK}})),e$2e(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(t.webgpu?C$15:v$O,{shaderProgramName:"copyDepthGlobeDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e._depthStencilTexture}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer,e._copyDepthCommand.renderState=e._rs,e$2e(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(ie$7,{shaderProgramName:"copyColorGlobeDepth",uniformMap:{colorTexture:function(){return e._colorTexture}},owner:e})),e$2e(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(t.webgpu?C$15:v$O,{shaderProgramName:"tempCopyDepthGlobeDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer,e._tempCopyDepthCommand.renderState=e._rs,e$2e(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(ie$7,{shaderProgramName:"updateDepthGlobeDepth",uniformMap:{colorTexture:function(){return e._tempGlobeDepthTexture}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer,e._updateDepthCommand.renderState=e._rsUpdate,e$2e(e._clearColorCommand)||(e._clearColorCommand=new t$W({color:new e$1X(0,0,0,0),stencil:0,owner:e})),e._isMSAA?e._clearColorCommand.framebuffer=e._framebufferWithRenderbuffer:e._clearColorCommand.framebuffer=e._framebufferWithTexture}function p$8(){this._framebuffer=new s$g({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new s$g,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new f$1a,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}function C$d(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function S$b(e,t,i,n,r){const o=r?t.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT:_$_.UNSIGNED_BYTE;e._framebuffer.update(t,i,n,1,o),e._packedDepthFramebuffer.update(t,i,n)}function k$a(e,t,i,n,r){e._viewport.width=i,e._viewport.height=n;const o=!f$1a.equals(e._viewport,r.viewport);let a=o!==e._useScissorTest;e._useScissorTest=o,f$1a.equals(e._scissorRectangle,r.viewport)||(e._scissorRectangle=f$1a.clone(r.viewport,e._scissorRectangle),a=!0),(!e$2e(e._renderState)||!f$1a.equals(e._viewport,e._renderState.viewport)||a)&&(e._renderState=d$1m.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),e$2e(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(t.webgpu?C$15:v$O,{shaderProgramName:"globeTranslucency_packedDepth",useWGSL:t.webgpu,uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),e$2e(e._clearCommand)||(e._clearCommand=new t$W({color:new e$1X(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer.framebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e.classificationFramebuffer,e._clearCommand.renderState=e._renderState}h$d.prototype.getHeight=function(e){if(!e$2e(e))throw new t$15("cartographic is required");var t=this._surface._levelZeroTiles;if(e$2e(t)){var i,n,r=t.length;for(n=0;n<r&&(i=t[n],!h$18.contains(i.rectangle,e));++n);if(!(n>=r)){for(;i._lastSelectionResult===D$J.REFINED;)i=G$e(i.southwestChild,e)||G$e(i.southeastChild,e)||G$e(i.northwestChild,e)||i.northeastChild;if(e$2e(i.data)&&e$2e(i.data.renderedMesh)){var o=this._surface._tileProvider.tilingScheme.ellipsoid,a=o$1p.fromRadians(e.longitude,e.latitude,0,o,$e$3),s=rr$1,l=o.geodeticSurfaceNormal(a,s.direction);if(!e$2e(o.getSurfaceNormalIntersectionWithZAxis(a,11500,s.origin))){var u=Math.min(u$Z(i.data.minimumHeight,0),-11500),c=o$1p.multiplyByScalar(l,Math.abs(u)+1,me$8);o$1p.subtract(a,c,s.origin)}if(e$2e(i.data.terrainData)&&i.data.terrainData instanceof p$O)return i.data.terrainData.interpolateHeight(i.rectangle,e.longitude,e.latitude);var h=i.data.pick(s,void 0,void 0,!1,me$8);if(e$2e(h))return o.cartesianToCartographic(h,er$1).height}}}},h$d.prototype.update=function(e){!this.show||(e.passes.render&&this._surface.update(e),e.rasterVectorCollection=this._rasterVectorCollection,this.computeGlobeBottomLevel(e))},h$d.prototype.computeGlobeBottomLevel=function(e){for(var t=e.camera.frustum.fov,i=512/Math.tan(.5*t),n=e.camera.position,r=new a$18.fromCartesian(n),o=new o$1p.fromRadians(r.longitude,r.latitude,0),a=i/o$1p.distance(n,o),s=0,l=0;l<22;l++){var u=1<<l,c=Math.PI/u,h=o$1p.fromRadians(r.longitude+.5*c,r.latitude+.5*c),d=o$1p.fromRadians(r.longitude+.5*c,r.latitude-.5*c),f=o$1p.fromRadians(r.longitude-.5*c,r.latitude-.5*c),p=o$1p.fromRadians(r.longitude-.5*c,r.latitude+.5*c),_=o$1p.distance(h,d),m=o$1p.distance(d,f),g=o$1p.distance(f,p),x=o$1p.distance(p,h);if(Math.max(Math.max(Math.max(_,m),g),x)/8*a<32||21==l){s=l;break}}e.globeBottomLevel=s},h$d.prototype.beginFrame=function(e){var t=this._surface,i=t.tileProvider,n=this.terrainProvider,r=this.showWaterEffect&&n.ready&&n.hasWaterMask;if(this._sceneMode=e.mode,r&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;var o=this._oceanNormalMapResource,a=o.url;if(e$2e(a)){var s=this;o$1l(o.fetchImage(),(function(t){a===s._oceanNormalMapResource.url&&(s._oceanNormalMap=s._oceanNormalMap&&s._oceanNormalMap.destroy(),s._oceanNormalMap=new t$U({context:e.context,source:t}))}))}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}var l=e.passes,u=e.mode;l.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,t.tileCacheSizeForMVT=this.tileCacheSizeForMVT,t.loadingDescendantLimit=this.loadingDescendantLimit,t.preloadAncestors=this.preloadAncestors,t.preloadSiblings=this.preloadSiblings,i.terrainProvider=this.terrainProvider,i.lightingFadeOutDistance=this.lightingFadeOutDistance,i.lightingFadeInDistance=this.lightingFadeInDistance,i.nightFadeOutDistance=this.nightFadeOutDistance,i.nightFadeInDistance=this.nightFadeInDistance,i.zoomedOutOceanSpecularIntensity=u===C$14.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,i.hasWaterMask=r,i.oceanNormalMap=this._oceanNormalMap,i.enableLighting=this.enableLighting,i.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,i.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,i.showGroundAtmosphere=this.showGroundAtmosphere,i.shadows=this.shadows,i.hueShift=this.atmosphereHueShift,i.saturationShift=this.atmosphereSaturationShift,i.brightnessShift=this.atmosphereBrightnessShift,i.fillHighlightColor=this.fillHighlightColor,i.showSkirts=this.showSkirts,i.backFaceCulling=this.backFaceCulling,i.clippingType=this.clippingType,i.showExcavationSide=this.showExcavationSide,i.excavationNormalTextureUrl=this._excavationNormalTextureUrl,i.excavationSideNormalTextureUrl=this._excavationSideNormalTextureUrl,i.undergroundColor=this._undergroundColor,i.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,t.beginFrame(e))},h$d.prototype.render=function(e){if(this.show){e$2e(this._material)&&this._material.update(e.context);var t=this._surface,i=e.passes;i.render&&t.render(e),i.pick&&t.render(e)}},h$d.prototype.endFrame=function(e){!this.show||e.passes.render&&this._surface.endFrame(e)},h$d.prototype.isDestroyed=function(){return!1},h$d.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),i$11(this)},h$d.prototype.addModifyRegion=function(e){var t=e.name,i=e.position;if(!e$2e(t)||!e$2e(i))return!1;var n=this._surface._tileProvider;if(n._modifyRegions.contains(t))return!1;var r=he$7(i),o=r.min,a=r.max,s=o$1p.fromDegreesArrayHeights(i),l=U$18.createGeometry(new U$18({polygonHierarchy:{positions:s},extrudedHeight:Math.min(-1e3,o),perPositionHeight:!0})),u=U$18.createGeometry(new U$18({polygonHierarchy:{positions:s},perPositionHeight:!0})),c=h$18.fromCartesianArray(s),h={geometry:l,worldGeometry:u,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),rectangle:c,minimumHeight:Math.min(-1e3,o),maximumHeight:a,command:void 0};return n._modifyRegions.set(t,h),n._modifyRegionUpdate=!0,!0},h$d.prototype.removeModifyRegion=function(e){var t=this._surface._tileProvider,i=t._modifyRegions;if(i.contains(e)){var n=i.get(e);e$2e(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),n.command=void 0,t._modifyRegions.remove(e),t._modifyRegionUpdate=!0}},h$d.prototype.removeAllModifyRegion=function(){for(var e=this._surface._tileProvider,t=Object.keys(e._modifyRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeModifyRegion(r)}e._modifyRegions.removeAll()},h$d.prototype.addExcavationRegion=function(e){var t=e.name,i=e.position,n=e.height;if(!e$2e(t)||!e$2e(i)||!e$2e(n))return!1;var r=this._surface._tileProvider;if(r._excavateRegions.contains(t))return!1;var o=i.length;i.length/3%2!=0&&(i.push(i[o-1-2]),i.push(i[o-1-1]),i.push(i[o-1]));for(var a=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),s=Number.MAX_VALUE,l=0,u=i.length;l<u;l+=3)s=Math.min(s,i[l+2]);var c=U$18.createGeometry(a),h=U$18.createGeometry(a),d=U$18.createGeometry(a),f=o$1p.fromDegreesArrayHeights(i),p={rectangle:h$18.fromCartesianArray(f),geometry:c,worldGeometry:h,colorGeometry:d,positions:i,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),command:void 0,name:t,height:s-n};return r._excavateRegions.set(t,p),r._excavateRegionUpdate=!0,r._excavateTransparent=u$Z(e.transparent,!0),r._excavateTextureWrap=u$Z(e.textureWrap,q$1a.REPEAT),r._excavateExtendHeight=n,!0},h$d.prototype.removeExcavationRegion=function(e){var t=this._surface._tileProvider,i=t._excavateRegions;if(i.contains(e)){t._removeExcavationCommands(e);var n=i.get(e);e$2e(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),e$2e(n.removeListenerFunc)&&n.removeListenerFunc(),n.command=void 0,i.remove(e),0===i.length&&(t._onceExcavateRegionsEmpty=!0),t._excavateRegionUpdate=!0}},h$d.prototype.removeAllExcavationRegion=function(){var e=this._surface._tileProvider;e._removeAllExcavationCommands();for(var t=Object.keys(e._excavateRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeExcavationRegion(r)}e._excavateRegions.removeAll()},h$d.prototype.addExtractRegion=function(e){var t=e.name,i=e.position,n=e.height,r=u$Z(e.extractHeight,100),o=u$Z(e.granularity,1);if(!e$2e(t)||!e$2e(i)||!e$2e(n))return!1;var a=this._surface._tileProvider;if(a._extractRegions.contains(t))return!1;var s=1,l=[],u=o$1p.fromDegreesArrayHeights(i);let c=[...u,u[0]];for(let e=1;e<c.length;e++){s+=o$1p.distance(c[e-1],c[e]),l.push(s)}var h=i.length;i.length/3%2!=0&&(i.push(i[h-1-2]),i.push(i[h-1-1]),i.push(i[h-1]));var d=he$7(i),f=d.min,p=d.max;p+=r;var _=o$1p.fromDegreesArrayHeights(i),m=h$18.fromCartesianArray(_),g=Math.PI/Math.pow(2,11);g=g/64*o;var x=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)},granularity:g});i=tr$2(_,m,p);var y=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),v={rectangle:m,geometry:U$18.createGeometry(y),geometry_extract:U$18.createGeometry(x),colorGeometry:U$18.createGeometry(y),worldGeometry:U$18.createGeometry(y),positions:i,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),command:void 0,name:t,height:f-n,minimumHeight:Math.min(0,f),maximumHeight:p,sideLengths:l,round:s};return a._extractRegions.set(t,v),a._extractRegionsUpdate=!0,a._extractTransparent=u$Z(e.transparent,!0),a._extractTextureWrap=u$Z(e.textureWrap,q$1a.REPEAT),a._extractExtendHeight=r,a._excavateTransparent=u$Z(e.transparent,!0),a._excavateTextureWrap=u$Z(e.textureWrap,q$1a.REPEAT),!0},h$d.prototype.removeExtractRegion=function(e){var t=this._surface._tileProvider,i=t._extractRegions;if(i.contains(e)){t._removeExtractCommands(e);var n=i.get(e);e$2e(n.command)&&(n.command.vertexArray=n.command.vertexArray&&!n.command.vertexArray.isDestroyed()&&n.command.vertexArray.destroy(),n.command.shaderProgram=n.command.shaderProgram&&!n.command.shaderProgram.isDestroyed()&&n.command.shaderProgram.destroy()),n.command=void 0,i.remove(e),0===i.length&&(t._onceExcavateRegionsEmpty=!0),t._extractRegionsUpdate=!0,n.command=void 0,t._modifyRegions.remove(e),t._modifyRegionUpdate=!0,t._extractExtendHeight=void 0}},h$d.prototype.removeAllExtractRegion=function(){var e=this._surface._tileProvider;e._removeAllExtractCommands();for(var t=Object.keys(e._extractRegions._hash),i=0,n=t.length;i<n;i++){var r=t[i];this.removeExtractRegion(r)}e._extractRegions.removeAll(),e._extractExtendHeight=void 0},h$d.prototype.addImageryClipRegions=function(e){var t=e.name,i=e.position;if(e$2e(t)&&e$2e(i)&&e$2e(e.layers)){var n=this._surface._tileProvider;if(n._imageryClipRegions.contains(t))return!1;for(var r=new U$18({polygonHierarchy:{positions:o$1p.fromDegreesArrayHeights(i)}}),o=U$18.createGeometry(r),a=U$18.createGeometry(r),s=o$1p.fromDegreesArrayHeights(i),l={rectangle:h$18.fromCartesianArray(s),geometry:o,worldGeometry:a,positions:i,modelMatrix:p$1d.fromTranslation(new o$1p(i[0],i[1],0),new p$1d),command:void 0,name:t},u=0,c=e.layers.length;u<c;u++)e.layers[u].enableImageryClip=!0;n._imageryClipRegions.set(t,l),n._imageryClipRegionUpate=!0}},h$d.prototype.removeImageryClipRegion=function(e,t){var i=this._surface._tileProvider,n=i._imageryClipRegions;if(n.contains(e)){var r=n.get(e);if(e$2e(r.command)&&(r.command.vertexArray=r.command.vertexArray&&!r.command.vertexArray.isDestroyed()&&r.command.vertexArray.destroy(),r.command.shaderProgram=r.command.shaderProgram&&!r.command.shaderProgram.isDestroyed()&&r.command.shaderProgram.destroy()),r.command=void 0,n.remove(e),0===n.length){for(var o=0,a=t.length;o<a;o++)t[o].enableImageryClip=!1;i._onceImageryClipRegionsEmpty=!0}i._imageryClipRegionUpate=!0}},h$d.prototype.clearCustomClipBox=function(){this.clippingPlanes=void 0},h$d.prototype.setCustomClipBox=function(e){if(!(e.dimensions&&e.position||e.planePos&&e.planeNormal))throw new t$15("globe box clip, position and dimensions is required!");if(e.dimensions){var t,i=e.position,n=new i$16(e$2e(e.heading)?e.heading:0,e$2e(e.pitch)?e.pitch:0,e$2e(e.roll)?e.roll:0);if(this._sceneMode===C$14.SCENE3D)t=m$19.headingPitchRollToFixedFrame(i,n,t$12.WGS84,m$19.eastNorthUpToFixedFrame,new p$1d);else{var r=ir$2(this._scene,i);t=p$1d.setTranslation(p$1d.clone(p$1d.IDENTITY),r,new p$1d)}var o=-.5*e.dimensions.x,a=-.5*e.dimensions.y,s=-.5*e.dimensions.z;e$2e(e.clipLineColor)?e.clipLineColor:e$1X.WHITE;var l=[new a$I(new o$1p(1,0,0),o),new a$I(new o$1p(-1,0,0),o),new a$I(new o$1p(0,1,0),a),new a$I(new o$1p(0,-1,0),a),new a$I(new o$1p(0,0,1),s),new a$I(new o$1p(0,0,-1),s)]}else{l=[];for(var u=0;u<e.planePos.length;u++){var c=e.planePos[u],h=e.planeNormal[u],d=-o$1p.dot(h,c);l.push(new a$I(h,d))}}return this.clippingPlanes=new h$L({modelMatrix:t,planes:l,edgeWidth:1,edgeColor:e$1X.WHITE,unionClippingRegions:!e$2e(e.dimensions),enabled:!0}),!0},h$d.prototype.setPolygonOffset=function(e,t){0!=e||0!=t?(this._surface._tileProvider._polygonOffset.enabled=!0,o$1o.fromElements(e,t,this._surface._tileProvider._polygonOffset.value)):(this._surface._tileProvider._polygonOffset.enabled=!1,o$1o.fromElements(0,0,this._surface._tileProvider._polygonOffset.value))},h$d.prototype.hasTerrainAnalysis=function(){if(!e$2e(this._surface)||!e$2e(this._surface._tileProvider))return!1;var e=this._surface._tileProvider;return!!(e$2e(e._excavateRegions)&&e._excavateRegions.values.length>0||e$2e(e._modifyRegions)&&e._modifyRegions.values.length>0||e$2e(e._hypsometricSetting)&&e._hypsometricSetting.CoverageArea.length>0||e$2e(e._slopeSetting)&&e._slopeSetting.CoverageArea.length>0)},h$d.prototype.getSlopeValue=function(e){var t=fe$6(e,this);return t?Math.acos(Math.abs(t.z))*e$2d.DEGREES_PER_RADIAN:0},h$d.prototype.getSlopeDirectionValue=function(e){var t=fe$6(e,this);if(!t)return 0;t.z=0;var i=o$1p.angleBetween(t,o$1p.UNIT_Y);return i=i/e$2d.PI*180,i=o$1p.dot(t,o$1p.UNIT_X)<0?360-i:i},h$d.prototype.setPBRMaterialFromJSON=function(e){if(LicenseChecker.LICENSECHECKER.verify("Globe_setPBRMaterial"),this._surface.tileProvider._pbrParameter===Xe$e.NONE){var t=this;u$P(e).then((function(e){var i=e.material,n=i.pbrMetallicRoughness;i.textureunitstates,t._surface.tileProvider._PBRMaterialParams.baseColorFactor=e$2e(n.baseColor)?e$2c.fromElements(n.baseColor.x,n.baseColor.y,n.baseColor.z,n.baseColor.w):t._surface.tileProvider._PBRMaterialParams.baseColorFactor,t._surface.tileProvider._PBRMaterialParams.baseColorTextureIndex=e$2e(n.baseColorTextureIndex)?n.baseColorTextureIndex:t._surface.tileProvider._PBRMaterialParams.baseColorTextureIndex,t._surface.tileProvider._PBRMaterialParams.emissionFactor=e$2e(n.emissiveFactor)?o$1p.fromElements(n.emissiveFactor.x,n.emissiveFactor.y,n.emissiveFactor.z):t._surface.tileProvider._PBRMaterialParams.emissionFactor,t._surface.tileProvider._PBRMaterialParams.emissionTextureIndex=e$2e(n.emissiveTextureIndex)?n.emissiveTextureIndex:-1,t._surface.tileProvider._PBRMaterialParams.metallic=e$2e(n.metallicFactor)?n.metallicFactor:t._surface.tileProvider._PBRMaterialParams.metallic,t._surface.tileProvider._PBRMaterialParams.roughness=e$2e(n.roughnessFactor)?n.roughnessFactor:t._surface.tileProvider._PBRMaterialParams.roughness,t._surface.tileProvider._PBRMaterialParams.occlusionTextureIndex=e$2e(n.occlusionTextureIndex)?n.occlusionTextureIndex:-1,t._surface.tileProvider._PBRMaterialParams.normalTextureIndex=e$2e(n.normalTextureIndex)?n.normalTextureIndex:-1}))}},h$d.prototype.removePBRMaterial=function(){this._surface.tileProvider._PBRMaterialParams={metallic:0,roughness:0,baseColorFactor:new e$2c(1,1,1,1),baseColorTextureIndex:-1,emissionFactor:o$1p.UNIT_XYZ,emissionTextureIndex:-1,occlusionTextureIndex:-1,normalTextureIndex:-1}},h$d.prototype._setFloodTexture=function(e,t){this._floodFlagTexture=e,this._floodRect=t},h$d.prototype._removeFloodTexture=function(){this._floodFlagTexture=void 0,this._floodRect=void 0},h$d.prototype.removeRasterRegions=function(){var e=this._surface._tileProvider,t=e._clipRasterTilesMap;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n._clipRasterTexture=n._clipRasterTexture&&!n._clipRasterTexture.isDestroyed()&&n._clipRasterTexture.destroy(),n._clipRasterFbo=n._clipRasterFbo&&!n._clipRasterFbo.isDestroyed()&&n._clipRasterFbo.destroy(),n._clipRegionsCount=0,n._clipRegionRasterized=!1}e._clipRasterTilesMap={}},Object.defineProperties(a$a.prototype,{framebuffer:{get:function(){return this._isMSAA?this._framebufferWithRenderbuffer:this._framebufferWithTexture}},framebufferWithTexture:{get:function(){return this._framebufferWithTexture}},depthStencilTexture:{get:function(){return this._depthStencilTexture}}}),a$a.prototype.executeDebugGlobeDepth=function(e,t,i){O$a(this,e,t,i)},a$a.prototype.update=function(e,t,i,n,r){var o=i.width,a=i.height;H$g(this,e,o,a,n,r),w$c(this,e,o,a,t),e.uniformState.globeDepthTexture=void 0,this._numSamples=n,this._useHdr=r},a$a.prototype.executeCopyDepth=function(e,t){e$2e(this._copyDepthCommand)&&(this.prepareColorTextures(e,!1),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture)},a$a.prototype.executeUpdateDepth=function(e,t,i){var n=t.framebuffer.depthStencilTexture;if(!e$2e(n)||!i&&n===this._depthStencilTexture)if(this._isMSAA&&i){if(e$2e(this._updateDepthCommand)){if(!e$2e(this._updateDepthFramebuffer)||this._updateDepthFramebuffer.getColorTexture(0)!==this._globeDepthTexture){r=this._globeDepthTexture.width,o=this._globeDepthTexture.height;l$e(this),W$f(this,e,r,o,t),w$c(this,e,r,o,t)}this.prepareColorTextures(e,!1),this._tempCopyDepthTexture=this._depthStencilTexture,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture}}else e$2e(this._copyDepthCommand)&&(this.prepareColorTextures(e,!1),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture);else if(e$2e(this._updateDepthCommand)){if(!e$2e(this._updateDepthFramebuffer)||this._updateDepthFramebuffer.getColorTexture(0)!==this._globeDepthTexture){var r=this._globeDepthTexture.width,o=this._globeDepthTexture.height;l$e(this),W$f(this,e,r,o,t),w$c(this,e,r,o,t)}this._tempCopyDepthTexture=n,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture}},a$a.prototype.executeCopyColor=function(e,t){e$2e(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)},a$a.prototype.prepareColorTextures=function(e,t){this._numSamples>1&&t$V.blitFramebuffers(e,this._framebufferWithRenderbuffer,this._framebufferWithTexture,t)},a$a.prototype.clear=function(e,t,i){var n=this._clearColorCommand;e$2e(n)&&(e$1X.clone(i,n.color),n.execute(e,t))},a$a.prototype.isDestroyed=function(){return!1},a$a.prototype.destroy=function(){M$e(this),U$d(this),N$a(this),l$e(this),e$2e(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),e$2e(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy());var e=this._debugGlobeDepthViewportCommand;return e$2e(e)&&(e.shaderProgram=e.shaderProgram.destroy()),i$11(this)},Object.defineProperties(p$8.prototype,{classificationTexture:{get:function(){return this._framebuffer.getColorTexture()}},classificationFramebuffer:{get:function(){return this._framebuffer.framebuffer}},packedDepthFramebuffer:{get:function(){return this._packedDepthFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._framebuffer.getDepthStencilTexture()}},depthStencilRenderbuffer:{get:function(){return this._framebuffer.getDepthStencilRenderbuffer()}},packedDepthTexture:{get:function(){return this._packedDepthFramebuffer.getColorTexture()}}}),p$8.prototype.updateAndClear=function(e,t,i,n){const r=t.width,o=t.height;S$b(this,i,r,o,e),k$a(this,i,r,o,n),this._useHdr=e},p$8.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)},p$8.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture},p$8.prototype.isDestroyed=function(){return!1},p$8.prototype.destroy=function(){return C$d(this),i$11(this)};const u$c={OPAQUE_FRONT_FACE:0,OPAQUE_BACK_FACE:1,DEPTH_ONLY_FRONT_FACE:2,DEPTH_ONLY_BACK_FACE:3,DEPTH_ONLY_FRONT_AND_BACK_FACE:4,TRANSLUCENT_FRONT_FACE:5,TRANSLUCENT_BACK_FACE:6,TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:7,TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:8,PICK_FRONT_FACE:9,PICK_BACK_FACE:10,DERIVED_COMMANDS_MAXIMUM_LENGTH:11},p$7=u$c.DERIVED_COMMANDS_MAXIMUM_LENGTH,q$b=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function F$c(){this._frontFaceAlphaByDistance=new o$Y(0,1,0,1),this._backFaceAlphaByDistance=new o$Y(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=h$18.clone(h$18.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(p$7),this._derivedBlendCommandTypes=new Array(p$7),this._derivedPickCommandTypes=new Array(p$7),this._derivedCommandTypesToUpdate=new Array(p$7),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}function z$b(e,t,i,n){return e?e$2e(i)?(o$Y.clone(i,n),n.nearValue*=t,n.farValue*=t,n):(n.nearValue=t,n.farValue=t,n):(n.nearValue=1,n.farValue=1,n)}function Y$8(e,t,i){return e&&(i.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function se$5(e,t){const i=e._frontFaceTranslucent,n=e._backFaceTranslucent;return i&&(t.cameraUnderground||n)}function le$7(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function ue$7(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function me$7(e,t,i){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!i.depthTestAgainstTerrain&&t.mode!==C$14.SCENE2D&&t.context.depthTexture}function fe$5(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function he$6(e,t){e._derivedCommandsLength=U$c(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=U$c(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=U$c(e,t,!1,!0,e._derivedPickCommandTypes);let i,n=0;for(i=0;i<e._derivedCommandsLength;++i)n|=1<<e._derivedCommandTypes[i];for(i=0;i<e._derivedBlendCommandsLength;++i)n|=1<<e._derivedBlendCommandTypes[i];for(i=0;i<e._derivedPickCommandsLength;++i)n|=1<<e._derivedPickCommandTypes[i];let r=0;for(i=0;i<p$7;++i)(n&1<<i)>0&&(e._derivedCommandTypesToUpdate[r++]=i);e._derivedCommandsToUpdateLength=r;const o=n!==e._derivedCommandKey;e._derivedCommandKey=n,e._derivedCommandsDirty=o,!e$2e(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=Se$4())}function U$c(e,t,i,n,r){let o=0;const a=e._frontFaceTranslucent,s=e._backFaceTranslucent;if(!a)return o;const l=t.cameraUnderground,u=e._requiresManualDepthTest,c=n?u$c.PICK_FRONT_FACE:u?u$c.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:u$c.TRANSLUCENT_FRONT_FACE,h=n?u$c.PICK_BACK_FACE:u?u$c.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:u$c.TRANSLUCENT_BACK_FACE;return t.mode===C$14.SCENE2D?(r[o++]=u$c.DEPTH_ONLY_FRONT_FACE,r[o++]=c,o):(s?(i||(r[o++]=u$c.DEPTH_ONLY_FRONT_AND_BACK_FACE),l?(r[o++]=c,r[o++]=h):(r[o++]=h,r[o++]=c)):l?(i||(r[o++]=u$c.DEPTH_ONLY_BACK_FACE),r[o++]=u$c.OPAQUE_FRONT_FACE,r[o++]=h):(i||(r[o++]=u$c.DEPTH_ONLY_FRONT_FACE),r[o++]=u$c.OPAQUE_BACK_FACE,r[o++]=c),o)}function h$c(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}function Q$7(e,t){return e.indexOf(t)>-1}function _e$3(e,t){h$c(e.defines,"TRANSLUCENT"),h$c(t.defines,"TRANSLUCENT")}function Te$5(e,t){h$c(e.defines,"GROUND_ATMOSPHERE"),h$c(t.defines,"GROUND_ATMOSPHERE"),h$c(e.defines,"FOG"),h$c(t.defines,"FOG"),h$c(e.defines,"TRANSLUCENT"),h$c(t.defines,"TRANSLUCENT")}function M$d(e,t){if(Q$7(t.defines,"TILE_LIMIT_RECTANGLE")||Q$7(t.defines,"ENABLE_CLIPPING_PLANES"))return;t.sources=["void main() \n{ \n gl_FragColor = vec4(1.0); \n} \n"]}function B$8(e,t){const i=t.sources,n=i.length;for(let e=0;e<n;++e)i[e]=s$V.replaceMain(i[e],"czm_globe_translucency_main");i.push("\n\nuniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n#ifdef MANUAL_DEPTH_TEST \n float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st)); \n if (logDepthOrDepth != 0.0) \n { \n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); \n float depthEC = eyeCoordinate.z / eyeCoordinate.w; \n if (v_positionEC.z < depthEC) \n { \n discard; \n } \n } \n#endif \n czm_globe_translucency_main(); \n vec4 classificationColor = texture(u_classificationTexture, st); \n if (classificationColor.a > 0.0) \n { \n // Reverse premultiplication process to get the correct composited result of the classification primitives \n classificationColor.rgb /= classificationColor.a; \n } \n gl_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + gl_FragColor * (1.0 - classificationColor.a); \n} \n")}function X$9(e,t){B$8(e,t),h$c(e.defines,"GROUND_ATMOSPHERE"),h$c(t.defines,"GROUND_ATMOSPHERE"),h$c(e.defines,"FOG"),h$c(t.defines,"FOG")}function Ce$4(e,t){B$8(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function ge$7(e,t){X$9(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function j$c(e,t){t.sources=["uniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n vec4 pickColor = texture(u_classificationTexture, st); \n if (pickColor == vec4(0.0)) \n { \n discard; \n } \n gl_FragColor = pickColor; \n} \n"]}function pe$6(e,t,i,n,r,o){if(!e$2e(r))return t;if(!n&&e$2e(i))return i;let a=e.shaderCache.getDerivedShaderProgram(t,o);if(!e$2e(a)){const i=t._attributeLocations,n=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();n.defines=e$2e(n.defines)?n.defines.slice(0):[],s.defines=e$2e(s.defines)?s.defines.slice(0):[],r(n,s),a=e.shaderCache.createDerivedShaderProgram(t,o,{vertexShaderSource:n,fragmentShaderSource:s,attributeLocations:i})}return a}function Fe$5(e){e.cull.face=G$1a.BACK,e.cull.enabled=!0}function Ae$6(e){e.cull.face=G$1a.FRONT,e.cull.enabled=!0}function De$5(e){e.cull.face=G$1a.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function Ee$6(e){e.cull.face=G$1a.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function ye$3(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function J$7(e){e.cull.face=G$1a.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=Ee$r.ALPHA_BLEND}function W$e(e){e.cull.face=G$1a.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=Ee$r.ALPHA_BLEND}function ve$5(e){e.cull.face=G$1a.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function Ne$4(e){e.cull.face=G$1a.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function Oe$5(e,t,i,n,r){if(!e$2e(n))return e;if(!i&&e$2e(t))return t;let o=r[e.id];if(!e$2e(o)){const t=d$1m.getState(e);n(t),o=d$1m.fromCache(t),r[e.id]=o}return o}function E$c(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function be$4(e,t,i,n,r){return e$2e(r)?!n&&e$2e(i)?i:p$19(t,r(e),!1):t}function _$d(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function Se$4(){return[new _$d({pass:Le$q.GLOBE,pickOnly:!1,getShaderProgramFunction:_e$3,getRenderStateFunction:Fe$5,getUniformMapFunction:void 0}),new _$d({pass:Le$q.GLOBE,pickOnly:!1,getShaderProgramFunction:Te$5,getRenderStateFunction:Ae$6,getUniformMapFunction:void 0}),new _$d({pass:Le$q.GLOBE,pickOnly:!1,getShaderProgramFunction:M$d,getRenderStateFunction:De$5,getUniformMapFunction:void 0}),new _$d({pass:Le$q.GLOBE,pickOnly:!1,getShaderProgramFunction:M$d,getRenderStateFunction:Ee$6,getUniformMapFunction:void 0}),new _$d({pass:Le$q.GLOBE,pickOnly:!1,getShaderProgramFunction:M$d,getRenderStateFunction:ye$3,getUniformMapFunction:void 0}),new _$d({pass:Le$q.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:B$8,getRenderStateFunction:J$7,getUniformMapFunction:E$c}),new _$d({pass:Le$q.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:X$9,getRenderStateFunction:W$e,getUniformMapFunction:E$c}),new _$d({pass:Le$q.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Ce$4,getRenderStateFunction:J$7,getUniformMapFunction:E$c}),new _$d({pass:Le$q.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:ge$7,getRenderStateFunction:W$e,getUniformMapFunction:E$c}),new _$d({pass:Le$q.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:j$c,getRenderStateFunction:ve$5,getUniformMapFunction:E$c}),new _$d({pass:Le$q.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:j$c,getRenderStateFunction:Ne$4,getUniformMapFunction:E$c})]}Object.defineProperties(F$c.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent},set:function(e){this._frontFaceTranslucent=e}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}}),F$c.prototype.update=function(e){const t=e.globe;if(!e$2e(t)||!t.show)return this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,void(this._useDepthPlane=!1);this._frontFaceAlphaByDistance=z$b(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=z$b(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=Y$8(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=Y$8(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=me$7(this,e,t),this._sunVisibleThroughGlobe=se$5(this,e),this._environmentVisible=le$7(this,e),this._useDepthPlane=ue$7(this,e),this._numberOfTextureUniforms=fe$5(this),this._rectangle=h$18.clone(t.translucency.rectangle,this._rectangle),he$6(this,e)};const Z$a=new Array(p$7),$$9=new Array(p$7);function Pe$4(e,t,i,n,r,o,a){let s=t.derivedCommands.globeTranslucency;const l=e._derivedCommandsDirty;if(t.dirty||!e$2e(s)||l){t.dirty=!1,e$2e(s)||(s={},t.derivedCommands.globeTranslucency=s);const l=a.frameNumber,u=u$Z(s.uniformMapDirtyFrame,0),c=u$Z(s.shaderProgramDirtyFrame,0),h=u$Z(s.renderStateDirtyFrame,0),d=s.uniformMap!==t.uniformMap,f=s.shaderProgramId!==t.shaderProgram.id,p=s.renderStateId!==t.renderState.id;d&&(s.uniformMapDirtyFrame=l),f&&(s.shaderProgramDirtyFrame=l),p&&(s.renderStateDirtyFrame=l),s.uniformMap=t.uniformMap,s.shaderProgramId=t.shaderProgram.id,s.renderStateId=t.renderState.id;for(let _=0;_<i;++_){const i=o[_],m=n[_],g=r[_];let x,y,v,$=s[g];e$2e($)?(x=$.uniformMap,y=$.shaderProgram,v=$.renderState):(x=void 0,y=void 0,v=void 0),$=i$$.shallowClone(t,$),s[g]=$;const b=u$Z($.derivedCommands.uniformMapDirtyFrame,0),T=u$Z($.derivedCommands.shaderProgramDirtyFrame,0),C=u$Z($.derivedCommands.renderStateDirtyFrame,0),S=d||b<u,w=f||T<c,E=p||C<h;S&&($.derivedCommands.uniformMapDirtyFrame=l),w&&($.derivedCommands.shaderProgramDirtyFrame=l),E&&($.derivedCommands.renderStateDirtyFrame=l),$.derivedCommands.type=m,$.pass=i.pass,$.pickOnly=i.pickOnly,$.uniformMap=be$4(e,t.uniformMap,x,S,i.getUniformMapFunction),$.shaderProgram=pe$6(a.context,t.shaderProgram,y,w,i.getShaderProgramFunction,g),$.renderState=Oe$5(t.renderState,v,E,i.getRenderStateFunction,i.renderStateCache)}}}function ee$7(e,t,i,n,r,o,a){for(let s=0;s<t;++s){const t=e[s],l=t.derivedCommands.type;(!e$2e(a)||a.indexOf(l)>-1)&&i(t,n,r,o)}}function ne$6(e,t,i,n,r,o){for(let a=0;a<t;++a)i(e[a],n,r,o)}F$c.prototype.updateDerivedCommands=function(e,t){const i=this._derivedCommandTypesToUpdate,n=this._derivedCommandsToUpdateLength;if(0!==n){for(let e=0;e<n;++e)$$9[e]=this._derivedCommandPacks[i[e]],Z$a[e]=q$b[i[e]];Pe$4(this,e,n,i,Z$a,$$9,t)}},F$c.prototype.pushDerivedCommands=function(e,t,i){const n=i.passes.pick;if(n&&t)return;let r=this._derivedCommandTypes,o=this._derivedCommandsLength;if(n?(r=this._derivedPickCommandTypes,o=this._derivedPickCommandsLength):t&&(r=this._derivedBlendCommandTypes,o=this._derivedBlendCommandsLength),0===o)return void i.commandList.push(e);const a=e.derivedCommands.globeTranslucency;for(let e=0;e<o;++e){const t=q$b[r[e]];i.commandList.push(a[t])}};const Le$5=[u$c.OPAQUE_FRONT_FACE,u$c.OPAQUE_BACK_FACE],Re$5=[u$c.DEPTH_ONLY_FRONT_FACE,u$c.DEPTH_ONLY_BACK_FACE,u$c.DEPTH_ONLY_FRONT_AND_BACK_FACE];function v$b(){this._image=new Image}function h$b(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).url)&&!e$2e(e.metadata))throw new t$15("options.url or options.metadata is required.");var t;if(e$2e(e.metadata))t=e.metadata;else{var i=t$10.createIfNeeded(e.url);t=new c$G(i)}this._metadata=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new g$15({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new h$18(-e$2d.PI,-e$2d.PI,e$2d.PI,e$2d.PI),ellipsoid:e.ellipsoid});var n=e.credit;"string"==typeof n&&(n=new r$U(n)),this._credit=n,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,e$2e(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new v$b),this._errorEvent=new o$1h,this._ready=!1;var r,o=this;this._readyPromise=t.readyPromise.then((function(e){if(!t.imageryPresent){var i=new t$13("The server "+t.url+" doesn't have imagery");return r=l$V.handleError(r,o,o._errorEvent,i.message,void 0,void 0,void 0,i),o$1l.reject(i)}return l$V.handleSuccess(r),o._ready=e,e})).otherwise((function(e){return r=l$V.handleError(r,o,o._errorEvent,e.message,void 0,void 0,void 0,e),o$1l.reject(e)}))}function j$b(e,t,i,n,r,o){var a=c$G.tileXYToQuadKey(i,n,r),s=t.imageryVersion;return s=e$2e(s)&&s>0?s:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1-0"+a+"-i."+s.toString(),request:o})}function x$e(e){var t="JFIF";if(e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3))return"image/jpeg";var i="PNG";return e[1]===i.charCodeAt(0)&&e[2]===i.charCodeAt(1)&&e[3]===i.charCodeAt(2)?"image/png":void 0}function F$b(e){for(var t=R$B.Reader.create(e),i=t.len,n={};t.pos<i;){var r=t.uint32();switch(r>>>3){case 1:n.imageType=t.uint32();break;case 2:n.imageData=t.bytes();break;case 3:n.alphaType=t.uint32();break;case 4:n.imageAlpha=t.bytes();break;case 5:var o=n.copyrightIds;if(e$2e(o)||(o=n.copyrightIds=[]),2==(7&r))for(var a=t.uint32()+t.pos;t.pos<a;)o.push(t.uint32());else o.push(t.uint32());break;default:t.skipType(7&r)}}var s=n.imageType;if(e$2e(s))switch(s){case 0:n.imageType="image/jpeg";break;case 4:n.imageType="image/png";break;default:throw new t$13("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}var l=n.alphaType;return e$2e(l)&&0!==l&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete n.alphaType,delete n.imageAlpha),n}F$c.prototype.executeGlobeCommands=function(e,t,i,n,r){const o=n.context,a=e.commands[Le$q.GLOBE],s=e.indices[Le$q.GLOBE];0!==s&&(this._globeTranslucencyFramebuffer=i,i.clearClassification(o,r),ee$7(a,s,t,n,o,r,Le$5))},F$c.prototype.executeGlobeClassificationCommands=function(e,t,i,n,r){const o=n.context,a=e.commands[Le$q.GLOBE],s=e.indices[Le$q.GLOBE],l=e.commands[Le$q.TERRAIN_CLASSIFICATION],u=e.indices[Le$q.TERRAIN_CLASSIFICATION];if(0===s||0===u)return;const c=this._frontFaceTranslucent,h=this._backFaceTranslucent;if((!c||!h)&&ne$6(l,u,t,n,o,r),!c&&!h)return;this._globeTranslucencyFramebuffer=i;const d=o.uniformState.globeDepthTexture,f=r.framebuffer;if(r.framebuffer=i.classificationFramebuffer,ee$7(a,s,t,n,o,r,Re$5),o.depthTexture){const e=i.packDepth(o,r);o.uniformState.globeDepthTexture=e}ne$6(l,u,t,n,o,r),o.uniformState.globeDepthTexture=d,r.framebuffer=f},v$b.prototype.isReady=function(){return!0},v$b.prototype.shouldDiscardImage=function(e){return e===this._image},Object.defineProperties(h$b.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new t$15("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}}),h$b.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new t$15("getTileCredits must not be called before the imagery provider is ready.");var n=this._metadata,r=n.getTileInformation(e,t,i);if(e$2e(r)){var o=n.providers[r.imageryProvider];if(e$2e(o))return[o]}},h$b.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=this._tileDiscardPolicy._image,o=this._metadata,a=c$G.tileXYToQuadKey(e,t,i),s=o.getTileInformation(e,t,i);if(!e$2e(s)){if(o.isValid(a)){var l=new r$1c({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction});return void o.populateSubtree(e,t,i,l)}return r}if(!s.hasImagery())return r;var u=j$b(this,s,e,t,i,n).fetchArrayBuffer();return e$2e(u)?u.then((function(e){f$M(o.key,e);var t,i=new Uint8Array(e),n=o.protoImagery;if((!e$2e(n)||!n)&&(t=x$e(i)),!e$2e(t)&&(!e$2e(n)||n)){var a=F$b(i);t=a.imageType,i=a.imageData}return e$2e(t)&&e$2e(i)?w$R({uint8Array:i,format:t,flipY:!0}):r})):void 0},h$b.prototype.pickFeatures=function(e,t,i,n,r){};var f$f=new e$1X(1,1,1,.4),m$d=new e$1X(0,1,0,.05),v$a=new e$1X(0,.5,0,.2);function o$h(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._tilingScheme=e$2e(e.tilingScheme)?e.tilingScheme:new g$15({ellipsoid:e.ellipsoid}),this._cells=u$Z(e.cells,8),this._color=u$Z(e.color,f$f),this._glowColor=u$Z(e.glowColor,m$d),this._glowWidth=u$Z(e.glowWidth,6),this._backgroundColor=u$Z(e.backgroundColor,v$a),this._errorEvent=new o$1h,this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._canvasSize=u$Z(e.canvasSize,256),this._canvas=this._createGridCanvas(),this._readyPromise=o$1l.resolve(!0)}Object.defineProperties(o$h.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),o$h.prototype._drawGrid=function(e){for(var t=this._canvasSize,i=0;i<=this._cells;++i){var n=1+i/this._cells*(t-1);e.moveTo(n,0),e.lineTo(n,t),e.moveTo(0,n),e.lineTo(t,n)}e.stroke()},o$h.prototype._createGridCanvas=function(){var e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;var t=this._canvasSize,i=e.getContext("2d"),n=this._backgroundColor.toCssColorString();i.fillStyle=n,i.fillRect(0,0,t,t);var r=this._glowColor.toCssColorString();i.strokeStyle=r,i.lineWidth=this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i),i.lineWidth=.5*this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i);var o=this._color.toCssColorString();return i.strokeStyle=o,i.lineWidth=2,i.strokeRect(0,0,t,t),i.lineWidth=1,this._drawGrid(i),e},o$h.prototype.getTileCredits=function(e,t,i){},o$h.prototype.requestImage=function(e,t,i,n){return this._canvas},o$h.prototype.pickFeatures=function(e,t,i,n,r){};var y$d={None:0,Attribute:1,Slope:2,Aspect:3};function w$b(e){e=u$Z(e,{}),this._url=e.url+"/",this._useConfigFile=u$Z(e.useConfigFile,!0),this._compressType="NONE",this._tilingScheme=void 0,this._rectangle=void 0,this._levels=[],this._maxCategory=90,this._minCategory=0,this._dataType=y$d.NONE;var t=e.credit;"string"==typeof t&&(t=new Credit(t)),this._credit=t,this._ready=!1,this._readyPromise=o$1l.defer();var i,n=u$Z(e.ellipsoid,t$12.WGS84),r=this;function o(e){r._compressType=e.getElementsByTagName("sml:CompressType")[0].textContent;var t=e.getElementsByTagName("sml:Type")[0].textContent;"Slope"==t?r._dataType=y$d.Slope:"Aspect"==t?r._dataType=y$d.Aspect:"Attribute"==t&&(r._dataType=y$d.Attribute),r._cellWidth=parseInt(e.getElementsByTagName("sml:CellWidth")[0].textContent),r._cellHeight=parseInt(e.getElementsByTagName("sml:CellHeight")[0].textContent),r._maxCategory=parseInt(e.getElementsByTagName("sml:MaxHeight")[0].textContent),r._minCategory=parseInt(e.getElementsByTagName("sml:MinHeight")[0].textContent),r._tilingScheme=new g$15({ellipsoid:n}),r._tilingScheme.isSct=!0;var i=e.getElementsByTagName("sml:Bounds")[0],o=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Left")[0].textContent)),a=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Bottom")[0].textContent)),s=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Right")[0].textContent)),l=e$2d.toRadians(parseFloat(i.getElementsByTagName("sml:Top")[0].textContent));r._rectangle=new h$18(o,a,s,l);for(var u=e.getElementsByTagName("sml:Levels")[0].getElementsByTagName("sml:Level"),c=0;c<u.length;++c){var h=u[c];r._levels.push(parseInt(h.textContent))}r._ready=!0,r._readyPromise.resolve(!0)}function a(e){var t=u$Z(e,"An error occurred while accessing "+r._url+".");i=TileProviderError.handleError(i,r,r._errorEvent,t,void 0,void 0,void 0,s),r._readyPromise.reject(new RuntimeError(t))}function s(){if(!e$2e(e.rectangle)||!e$2e(e.levels))throw new t$15("options.rectangles,options.levels is required.");r._compressType=u$Z(e.compressType,"ZIP"),r._attType=y$d.SLOPE,r._cellWidth=u$Z(e._cellWidth,32),r._cellHeight=u$Z(e._cellHeight,32),r._maxCategory=u$Z(e.maxCategory,90),r._minCategory=u$Z(e.minCategory,0),r._tilingScheme=new g$15({ellipsoid:n}),r._rectangle=e.rectangle,r._levels=e.levels}this._useConfigFile?o$1l(d$1f(r._url+"config"),o,a):s(),this._styleEngine=new e$1u}Object.defineProperties(w$b.prototype,{url:{get:function(){return this._url}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){if(!this.ready)throw new t$15("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},cellWidth:{get:function(){return this._cellWidth}},cellHeight:{get:function(){return this._cellHeight}},minLevel:{get:function(){return this._levels.length>0?Math.min(this._levels[0],this._levels[this._levels.length-1]):-1}},maxLevel:{get:function(){return this._levels.length>0?Math.max(this._levels[0],this._levels[this._levels.length-1]):-1}},minCategory:{get:function(){if(!this._ready)throw new t$15("minCategory must not be called before the grid provider is ready");return this._minCategory}},maxCategory:{get:function(){if(!this._ready)throw new t$15("maxCategory must not be called before the grid provider is ready");return this._maxCategory}}}),w$b.prototype.getTileCredits=function(e,t,i){};var W$d=new h$18;function R$d(e,t){var n,r;if(2===(n="ZIP"===e._compressType?nt$b.inflate(t).buffer:t[i]).byteLength/(e._cellWidth*e._cellHeight)){var o=new Int16Array(n,0,e._cellWidth*e._cellHeight);r=[];for(var a=0;a<o.length;a++)r.push(parseFloat(o[a]))}else r=new Float32Array(n,0,e._cellWidth*e._cellHeight);return r}function o$g(e){e=u$Z(e,{}),this._height=this._width=u$Z(e.quality,2048);var t=u$Z(e.intensityRange,new o$1o(0,1));this._minIntensity=t.x,this._maxIntensity=t.y,this._context=e.context,this._bounds=e.bounds,this._fbIntensity=void 0,this._intensityCommand=void 0,this._heatMapCommand=void 0,this._sp=void 0,this._va=void 0,this._vertexSize=8,this._maxPointCount=1e4,this._pointCount=0,this._bufferIndex=0,this._vertexBufferData=new Float32Array(this._maxPointCount*this._vertexSize*6),this._vertexBufferViews=[];for(var i=this._maxPointCount,n=0;n<i;n++)this._vertexBufferViews.push(new Float32Array(this._vertexBufferData.buffer,0,n*this._vertexSize*6));this._clearCommand=new t$W({color:new e$1X(0,0,0,0)}),this._data=void 0,this._dataIndex=0,this._fbHeatMap=x$d(this._context,this._width,this._height,_$_.UNSIGNED_BYTE),this._clearCommand.framebuffer=this._fbHeatMap,this._clearCommand.execute(this._context),this._maxPerFrameDrawCount=5e3}function x$d(e,t,i,n){return new t$V({context:e,colorTextures:[new t$U({context:e,width:t,height:i,pixelDatatype:n})]})}function R$c(e,t){if(!e$2e(t._sp)){var i=new s$V({sources:[["attribute vec4 aPosition;","attribute vec4 aIntensity;","varying vec2 vOff;","varying vec2 vDim;","varying float vIntensity;","uniform vec4 uBounds;","void main()","{","vDim = abs(aPosition.zw);","vOff = aPosition.zw;","vec2 pos = aPosition.xy + aPosition.zw;","vIntensity = aIntensity.x;","gl_Position = vec4(((pos - uBounds.xy) / uBounds.zw) * 2.0 - 1.0, 0.0, 1.0);","}"].join("\n")]}),n=new s$V({sources:[["varying vec2 vOff;","varying vec2 vDim;","varying float vIntensity;","void main()","{","float falloff = (1.0 - smoothstep(0.0, 1.0, length(vOff/vDim)));","float intensity = falloff*vIntensity;","gl_FragColor = vec4(intensity);","}"].join("\n")]});t._sp=r$14.fromCache({context:e,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:{aPosition:0,aIntensity:1}})}}function T$f(e,t){if(!e$2e(t._va)){var i=t._vertexBufferViews[t._pointCount],n=t$X.createVertexBuffer({context:e,typedArray:i,usage:A$18.STREAM_DRAW}),r=[{index:0,vertexBuffer:n,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:32,normalize:!1},{index:1,vertexBuffer:n,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,offsetInBytes:16,strideInBytes:32,normalize:!1}];t._va=new c$13({context:e,attributes:r})}}function S$a(e,t){var i=new i$$({primitiveType:W$18.TRIANGLES,count:6*t._pointCount});T$f(e,t),R$c(e,t),i.vertexArray=t._va,i.shaderProgram=t._sp,i.renderState=d$1m.fromCache({depthTest:{enabled:!1},viewport:new f$1a(0,0,t._width,t._height),blending:{enabled:!0,functionDestinationRgb:de$y.ONE,functionDestinationAlpha:de$y.ONE}});var n=new e$2c(t.bounds.x,t.bounds.y,t.bounds.width,t.bounds.height);return i.uniformMap={uBounds:function(){return n}},i.framebuffer=t._fbIntensity,i}function V$d(e,t){var i=["uniform sampler2D uIntensityTexture;","varying vec2 v_textureCoordinates;","float linstep(float low, float high, float value) {","return clamp((value-low)/(high-low), 0.0, 1.0);","}","float fade(float low, float high, float value){","float mid = (low+high)*0.5;","float range = (high-low)*0.5;","float x = 1.0 - clamp(abs(mid-value)/range, 0.0, 1.0);","return smoothstep(0.0, 1.0, x);","}","vec3 getColor(float intensity){","vec3 blue = vec3(0.0, 0.0, 1.0);","vec3 cyan = vec3(0.0, 1.0, 1.0);","vec3 green = vec3(0.0, 1.0, 0.0);","vec3 yellow = vec3(1.0, 1.0, 0.0);","vec3 red = vec3(1.0, 0.0, 0.0);","vec3 color = fade(-0.25, 0.25, intensity)*blue + fade(0.0, 0.5, intensity)*cyan + fade(0.25, 0.75, intensity)*green + fade(0.5, 1.0, intensity)*yellow + smoothstep(0.75, 1.0, intensity)*red;","return color;","}","vec4 alphaFun(vec3 color, float intensity){","float alpha = smoothstep(0.0, 1.0, intensity);","return vec4(color*alpha, alpha);","}","void main(){","float intensity = smoothstep(0.0, 1.0, texture2D(uIntensityTexture, v_textureCoordinates).r);","vec3 color = getColor(intensity);","gl_FragColor = alphaFun(color, intensity);","}"].join("\n"),n=e.createViewportQuadCommand(i,{uniformMap:{uIntensityTexture:function(){return t._fbIntensity.getColorTexture(0)}},renderState:d$1m.fromCache({viewport:new f$1a(0,0,t._width,t._height),blending:{enabled:!0,functionDestinationRgb:de$y.ONE,functionDestinationAlpha:de$y.ONE}}),owner:t});return n.framebuffer=t._fbHeatMap,n}function H$f(e){if(e$2e(e._va)){var t=e._va.getAttribute(0).vertexBuffer,i=t._getBuffer(),n=t._gl;n.bindBuffer(de$y.ARRAY_BUFFER,i),n.bufferData(de$y.ARRAY_BUFFER,e._vertexBufferViews[e._pointCount],A$18.STREAM_DRAW),n.bindBuffer(de$y.ARRAY_BUFFER,null)}}function t$a(){this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._texture=void 0,this._classifiedTexture=void 0,this._depthStencilTexture=void 0,this._fbo=void 0,this._fboClassified=void 0,this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new t$W({color:new e$1X(0,0,0,0),owner:this}),this._clearCommand=new t$W({color:new e$1X(0,0,0,0),depth:1,stencil:0});var e=this;this._uniformMap={colorTexture:function(){return e._texture},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._classifiedTexture}}}w$b.prototype._requestGridTile=function(e,t,i,n){if(!this.ready)throw new t$15("requestTileGrid must not be called before ready returns true.");var r=[],o=this._tilingScheme.tileXYToRectangle(e,t,i),a=this;if(this._levels[this._levels.length-1],e$2e(h$18.intersection(this._rectangle,o,W$d))){var s=this._levels[0],l=i;if(l<=this._levels[this._levels.length-1]&&l>=s){var u=i+"_"+e+"_"+t,c=a._url+"data/index/"+t+"/"+e+".bil?level="+l,h=o$10(c);e$2e(h)&&(h.id=u,h.url=c,r.push(h))}}return o$1l.all(r,(function(e){for(var t=0;t<e.length;t++){return R$d(a,e[t])}}),(function(e){return o$1l.reject(e)}))},Object.defineProperties(o$g.prototype,{texture:{get:function(){return this._fbHeatMap.getColorTexture(0)}},bounds:{set:function(e){this._bounds=e},get:function(){return this._bounds}},maxPerFrameDrawCount:{set:function(e){this._maxPerFrameDrawCount=e},get:function(){return this._maxPerFrameDrawCount}}}),o$g.prototype.addVertex=function(e,t,i,n,r){this._vertexBufferData[this._bufferIndex++]=e,this._vertexBufferData[this._bufferIndex++]=t,this._vertexBufferData[this._bufferIndex++]=i,this._vertexBufferData[this._bufferIndex++]=n,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r,this._vertexBufferData[this._bufferIndex++]=r},o$g.prototype.addPoint=function(e,t,i,n){this._pointCount>=this._maxPointCount-1&&this.draw(this._context),n=u$Z(n,50),i=u$Z(i,.2);var r=.5*n;this.addVertex(e,t,-r,-r,i),this.addVertex(e,t,+r,-r,i),this.addVertex(e,t,-r,+r,i),this.addVertex(e,t,-r,+r,i),this.addVertex(e,t,+r,-r,i),this.addVertex(e,t,+r,+r,i),this._pointCount++},o$g.prototype.setData=function(e){this._data=e},o$g.prototype.drawIntensity=function(e){e$2e(this._fbIntensity)||(this._fbIntensity=x$d(e,this._width,this._height,_$_.HALF_FLOAT)),e$2e(this._intensityCommand)||(this._intensityCommand=S$a(e,this)),this._intensityCommand.count=6*this._pointCount,H$f(this),this._intensityCommand.execute(e)},o$g.prototype.drawHeatMap=function(e){this._clearCommand.framebuffer=this._fbHeatMap,this._clearCommand.execute(e),e$2e(this._heatMapCommand)||(this._heatMapCommand=V$d(e,this)),this._heatMapCommand.execute(e)},o$g.prototype.draw=function(e){this.drawIntensity(e),this.drawHeatMap(e),this._bufferIndex=0,this._pointCount=0},o$g.prototype.update=function(e){if(this._context=e.context,e$2e(this._data)){for(var t=Math.min(this._data.length,this._dataIndex+this._maxPerFrameDrawCount),i=.002*this._bounds.width,n=this._dataIndex;n<t;n++){var r=this._data[n];r.x,r.y;var o=u$Z(r.intensity,.1);o=(o-this._minIntensity)/this._maxIntensity,this.addPoint(r.x,r.y,o,i)}this._dataIndex=t,this._dataIndex>=this._data.length&&(this._data=void 0,this._dataIndex=0)}this._pointCount<1||this.draw(e.context)},o$g.prototype.destroy=function(){return this._fbIntensity=this._fbIntensity&&this._fbIntensity.destroy(),this._fbHeatMap=this._fbHeatMap&&this._fbHeatMap.destroy(),this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy(),this._vertexBufferData=void 0,this._vertexBufferViews=void 0,this._data=void 0,i$11(this)},Object.defineProperties(t$a.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}}),t$a.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var I$a={depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$Z.EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.KEEP},backFunction:m$Z.NEVER,reference:0,mask:u$M.CLASSIFICATION_MASK},blending:Ee$r.ALPHA_BLEND},L$e={depthMask:!1,stencilTest:{enabled:!0,frontFunction:m$Z.NOT_EQUAL,frontOperation:{fail:n$_.KEEP,zFail:n$_.KEEP,zPass:n$_.KEEP},backFunction:m$Z.NEVER,reference:0,mask:u$M.CLASSIFICATION_MASK},blending:Ee$r.ALPHA_BLEND},N$9={depthMask:!0,depthTest:{enabled:!0},stencilTest:u$M.setCesium3DTileBit(),stencilMask:u$M.CESIUM_3D_TILE_MASK,blending:Ee$r.ALPHA_BLEND},M$c="#extension GL_EXT_frag_depth : enable\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform sampler2D classifiedTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n bool isClassified = all(equal(texture2D(classifiedTexture, v_textureCoordinates), vec4(0.0)));\n#ifdef UNCLASSIFIED\n vec4 highlightColor = czm_invertClassificationColor;\n if (isClassified)\n {\n discard;\n }\n#else\n vec4 highlightColor = vec4(1.0);\n if (!isClassified)\n {\n discard;\n }\n#endif\n gl_FragColor = color * highlightColor;\n gl_FragDepthEXT = texture2D(depthTexture, v_textureCoordinates).r;\n}\n",U$b="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n#ifdef UNCLASSIFIED\n gl_FragColor = color * czm_invertClassificationColor;\n#else\n gl_FragColor = color;\n#endif\n}\n";function n$a(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}function o$f(e){if(e$2e(e)&&e.length!==i$R.NUMBER_OF_JOB_TYPES)throw new t$15("A budget must be specified for each job type; budgets.length should equal JobType.NUMBER_OF_JOB_TYPES.");var t=new Array(i$R.NUMBER_OF_JOB_TYPES);t[i$R.TEXTURE]=new n$a(e$2e(e)?e[i$R.TEXTURE]:10),t[i$R.PROGRAM]=new n$a(e$2e(e)?e[i$R.PROGRAM]:10),t[i$R.BUFFER]=new n$a(e$2e(e)?e[i$R.BUFFER]:30);var i,n=t.length,r=0;for(i=0;i<n;++i)r+=t[i].total;var o=new Array(n);for(i=0;i<n;++i)o[i]=!1;this._totalBudget=r,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=o}function r$g(){}t$a.prototype.update=function(e){var t=this._texture,i=!e$2e(t)||this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;var n,r,o=e.drawingBufferWidth,a=e.drawingBufferHeight,s=!e$2e(t)||t.width!==o||t.height!==a;((s||i)&&(this._texture=this._texture&&this._texture.destroy(),this._classifiedTexture=this._classifiedTexture&&this._classifiedTexture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._texture=new t$U({context:e,width:o,height:a,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}),e$2e(this._previousFramebuffer)||(this._classifiedTexture=new t$U({context:e,width:o,height:a,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}),this._depthStencilTexture=new t$U({context:e,width:o,height:a,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8}))),!e$2e(this._fbo)||s||i)&&(this._fbo=this._fbo&&this._fbo.destroy(),this._fboClassified=this._fboClassified&&this._fboClassified.destroy(),e$2e(this._previousFramebuffer)?(n=this._previousFramebuffer.depthStencilTexture,r=this._previousFramebuffer.depthStencilRenderbuffer):n=this._depthStencilTexture,this._fbo=new t$V({context:e,colorTextures:[this._texture],depthStencilTexture:n,depthStencilRenderbuffer:r,destroyAttachments:!1}),e$2e(this._previousFramebuffer)||(this._fboClassified=new t$V({context:e,colorTextures:[this._classifiedTexture],depthStencilTexture:n,destroyAttachments:!1})));if(e$2e(this._rsUnclassified)||(this._rsUnclassified=d$1m.fromCache(I$a),this._rsClassified=d$1m.fromCache(L$e),this._rsDefault=d$1m.fromCache(N$9)),!e$2e(this._unclassifiedCommand)||i){e$2e(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());var l=e$2e(this._previousFramebuffer)?U$b:M$c,u=new s$V({defines:["UNCLASSIFIED"],sources:[l]}),c=new s$V({sources:[l]});this._unclassifiedCommand=e.createViewportQuadCommand(u,{renderState:e$2e(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(c,{renderState:e$2e(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),e$2e(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),e$2e(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(ie$7,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}},t$a.prototype.clear=function(e,t){var i=t.framebuffer;e$2e(this._previousFramebuffer)?(t.framebuffer=this._fbo,this._clearColorCommand.execute(e,t)):(t.framebuffer=this._fbo,this._clearCommand.execute(e,t),t.framebuffer=this._fboClassified,this._clearCommand.execute(e,t)),t.framebuffer=i},t$a.prototype.executeClassified=function(e,t){if(!e$2e(this._previousFramebuffer)){var i=t.framebuffer;t.framebuffer=this._fboClassified,this._translucentCommand.execute(e,t),t.framebuffer=i}this._classifiedCommand.execute(e,t)},t$a.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)},t$a.prototype.isDestroyed=function(){return!1},t$a.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._texture=this._texture&&this._texture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),e$2e(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),i$11(this)},Object.defineProperties(n$a.prototype,{total:{get:function(){return this._total}}}),o$f.getTimestamp=Et$c,Object.defineProperties(o$f.prototype,{totalBudget:{get:function(){return this._totalBudget}}}),o$f.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget},o$f.prototype.resetBudgets=function(){for(var e=this._budgets,t=e.length,i=0;i<t;++i){var n=e[i];n.starvedLastFrame=n.starvedThisFrame,n.starvedThisFrame=!1,n.usedThisFrame=0,n.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0},o$f.prototype.execute=function(e,t){var i,n=this._budgets,r=n[t],o=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&o)return r.starvedThisFrame=!0,!1;if(r.usedThisFrame+r.stolenFromMeThisFrame>=r.total){var a,s=n.length;for(a=0;a<s&&(!((i=n[a]).usedThisFrame+i.stolenFromMeThisFrame<i.total)||i.starvedLastFrame);++a);if(a===s&&o)return!1;o&&(r.starvedThisFrame=!0)}var l=o$f.getTimestamp();e.execute();var u=o$f.getTimestamp()-l;return this._totalUsedThisFrame+=u,i?i.stolenFromMeThisFrame+=u:r.usedThisFrame+=u,this._executedThisFrame[t]=!0,!0},Object.defineProperties(r$g.prototype,{color:{get:t$15.throwInstantiationError},intensity:{get:t$15.throwInstantiationError}});var e$8={SUN_LIGHT:0,LIGHT_GROUP1:1},Ze$4=Object.freeze(e$8),p$6=/\/$/,d$i=new r$U('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function o$e(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).styleId;if(!e$2e(t))throw new t$15("options.styleId is required.");var i=t$10.createIfNeeded(u$Z(e.url,"https://api.mapbox.com/styles/v1/")),n=e$U.getAccessToken(e.accessToken);this._styleId=t,this._accessToken=n,this._accessTokenErrorCredit=r$U.clone(e$U.getErrorCredit(e.accessToken));var r=u$Z(e.tilesize,512);this._tilesize=r;var o=u$Z(e.username,"mapbox");this._username=o;var a,s=e$2e(e.scaleFactor)?"@2x":"",l=i.getUrlComponent();p$6.test(l)||(l+="/"),l+=this._username+"/"+t+"/tiles/"+this._tilesize+"/{z}/{x}/{y}"+s,i.url=l,i.setQueryParameters({access_token:n}),e$2e(e.credit)?"string"==typeof(a=e.credit)&&(a=new r$U(a)):a=d$i,this._resource=i,this._imageryProvider=new _$g({url:i,credit:a,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function n$9(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).textureUrl;e$2e(t)||(t=n$17("Assets/Textures/moonSmall.jpg")),this.show=u$Z(e.show,!0),this.textureUrl=t,this._ellipsoid=u$Z(e.ellipsoid,t$12.MOON),this.onlySunLighting=u$Z(e.onlySunLighting,!0),this._ellipsoidPrimitive=new p$c({radii:this.ellipsoid.radii,material:r$Y.fromType(r$Y.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new h$I}function x$c(){}function y$c(e,t,i,n,r,o,a){var s=e.xDimName,l=e.yDimName,u=e.zDimName,c=e.timeDimName,h=e.dimensions,d=e.dimensionIndices,f=e.buffer,p=h[d[t]];if(0==p.size&&t<d.length-1)y$c(e,t+1,i,n,r,o,a);else for(var _=p.name===s,m=p.name===l,g=p.name===u,x=e$2e(c)&&p.name===c,y=0;y<p.size;y++)if(_?i=y:m?n=y:g?r=y:x&&(o=y),t==d.length-1){var v=f.readFloat32();a.maxValue=Math.max(a.maxValue,v),a.minValue=Math.min(a.minValue,v);var $=r*e.xDimSize*e.yDimSize+n*e.xDimSize+i;a.array[o][$]=v}else y$c(e,t+1,i,n,r,o,a)}function E$b(e,t,i,n){var r=t.offset;t.size,t.type;var o=t.dimensions,a=e.recordDimension;n.seek(r),e.buffer=n,e.dimensions=i,e.dimensionIndices=o;var s=e.xDimName,l=e.yDimName,u=e.zDimName,c=e.timeDimName;e.xDimSize=0,e.yDimSize=0,e.zDimSize=0;for(var h=1,d=0;d<i.length;d++)i[d].name==s?e.xDimSize=i[d].size:i[d].name==l?e.yDimSize=i[d].size:i[d].name==u?e.zDimSize=i[d].size:e$2e(c)&&i[d].name==c&&(h=i[d].size);a.length>0&&(h=a.length,e.timeDimName=null);var f={array:[]},p=0;for(p=0;p<h;p++)f.array[p]=[];if(f.maxValue=Number.MIN_VALUE,f.minValue=Number.MAX_VALUE,f.xDimSize=e.xDimSize,f.yDimSize=e.yDimSize,f.zDimSize=e.zDimSize,f.timeDimSize=h,a.length>0)for(p=0;p<h;p++)n.seek(r+a.recordStep*p),y$c(e,0,0,0,0,p,f);else y$c(e,0,0,0,0,0,f);return f}function e$7(e){}Object.defineProperties(o$e.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),o$e.prototype.getTileCredits=function(e,t,i){if(e$2e(this._accessTokenErrorCredit))return[this._accessTokenErrorCredit]},o$e.prototype.requestImage=function(e,t,i,n){return this._imageryProvider.requestImage(e,t,i,n)},o$e.prototype.pickFeatures=function(e,t,i,n,r){return this._imageryProvider.pickFeatures(e,t,i,n,r)},o$e._defaultCredit=d$i,Object.defineProperties(n$9.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),new p$1e,new p$1e,new o$1p,n$9.prototype.update=function(e){},n$9.prototype.isDestroyed=function(){return!1},n$9.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),i$11(this)},x$c.loadData=function(e,t){var i=e.header,n=e.buffer,r=i.dimensions;i.globalAttributes;var o=i.variables;t.recordDimension=i.recordDimension;for(var a=0,s=0;s<o.length;s++)if(o[s].name==t.variableName){a=s;break}return E$b(t,o[a],r,n)},e$7.prototype.isReady=function(){return!0},e$7.prototype.shouldDiscardImage=function(e){return!1};var y$b="#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\nuniform vec4 u_bgColor;\nuniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nif (texture2D(u_depthTexture, v_textureCoordinates).r < 1.0)\n{\n#ifdef MRT\ngl_FragData[0] = u_bgColor;\ngl_FragData[1] = vec4(u_bgColor.a);\n#else\ngl_FragColor = u_bgColor;\n#endif\nreturn;\n}\ndiscard;\n}\n",L$d="\nuniform u_bgColor : vec4<f32>;\n\nvar u_depthTexture : texture_depth_2d;\nvar u_depthTextureSampler : sampler;\n\nvarying v_textureCoordinates : vec2<f32>;\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n if (textureSample(u_depthTexture, u_depthTextureSampler, v_textureCoordinates) >= 1.0)\n {\n discard;\n }\n gl_FragData0 = uniforms.u_bgColor;\n gl_FragData1 = vec4(uniforms.u_bgColor.a);\n}\n",N$8="uniform sampler2D u_opaque;\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 opaque = texture2D(u_opaque, v_textureCoordinates);\nvec4 accum = texture2D(u_accumulation, v_textureCoordinates);\nfloat r = texture2D(u_revealage, v_textureCoordinates).r;\n#ifdef MRT\nvec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n#else\nvec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);\n#endif\ngl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\nif (opaque != czm_backgroundColor)\n{\ngl_FragColor.a = 1.0;\n}\n}\n";function C$c(e){this._numSamples=1,this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;var t=e.colorBufferFloat&&e.depthTexture&&e.floatBlend;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._useWebGPU=e.webgpu,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=void 0,this._alphaFBO=void 0,this._adjustTranslucentFBO=void 0,this._adjustAlphaFBO=void 0,this._opaqueClearCommand=new t$W({color:new e$1X(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new t$W({color:new e$1X(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new t$W({color:new e$1X(0,0,0,0),owner:this}),this._alphaClearCommand=new t$W({color:new e$1X(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new f$1a,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function P$e(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function x$b(e){e._translucentFBO=e._translucentFBO&&!e._translucentFBO.isDestroyed()&&e._translucentFBO.destroy(),e._alphaFBO=e._alphaFBO&&!e._alphaFBO.isDestroyed()&&e._alphaFBO.destroy(),e._adjustTranslucentFBO=e._adjustTranslucentFBO&&!e._adjustTranslucentFBO.isDestroyed()&&e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO=e._adjustAlphaFBO&&!e._adjustAlphaFBO.isDestroyed()&&e._adjustAlphaFBO.destroy()}function z$a(e){P$e(e),x$b(e)}function I$9(e,t,i,n){P$e(e),e._accumulationTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:t.webgpu?_$_.HALF_FLOAT:_$_.FLOAT,samples:e._numSamples});var r=new Float32Array(i*n*4);e._revealageTexture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:t.webgpu?_$_.HALF_FLOAT:_$_.FLOAT,source:{arrayBufferView:r,width:i,height:n},flipY:!1,samples:e._numSamples})}function W$c(e,t){x$b(e);var i=de$y.FRAMEBUFFER_COMPLETE,n=!0;if(e._translucentMRTSupport&&(e._translucentFBO=new t$V({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new t$V({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1}),(e._translucentFBO.status!==i||e._adjustTranslucentFBO.status!==i)&&(x$b(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO=new t$V({context:t,colorTextures:[e._accumulationTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._alphaFBO=new t$V({context:t,colorTextures:[e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new t$V({context:t,colorTextures:[e._accumulationTexture],destroyAttachments:!1}),e._adjustAlphaFBO=new t$V({context:t,colorTextures:[e._revealageTexture],destroyAttachments:!1});var r=e._translucentFBO.status===i,o=e._alphaFBO.status===i,a=e._adjustTranslucentFBO.status===i,s=e._adjustAlphaFBO.status===i;(!r||!o||!a||!s)&&(z$a(e),e._translucentMultipassSupport=!1,n=!1)}return n}C$c.prototype.update=function(e,t,i,n,r){if(!this.isSupported())return;this._opaqueFBO=i,this._opaqueTexture=i.getColorTexture(0),this._depthStencilTexture=i.depthStencilTexture;var o=this._opaqueTexture.width,a=this._opaqueTexture.height,s=this._accumulationTexture,l=!e$2e(s)||s.width!==o||s.height!==a||n!==this._useHDR;const u=this._numSamples!==r;if((l||u)&&(this._numSamples=r,I$9(this,e,o,a)),e$2e(this._translucentFBO)&&!l&&!u||W$c(this,e)){this._useHDR=n;var c,h,d=this;e$2e(this._compositeCommand)||(c=new s$V({sources:[N$8]}),this._translucentMRTSupport&&c.defines.push("MRT"),h={u_opaque:function(){return d._opaqueTexture},u_accumulation:function(){return d._accumulationTexture},u_revealage:function(){return d._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(c,{shaderProgramName:"CompositeOITFS",uniformMap:h,owner:this})),e$2e(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(c=new s$V({defines:["MRT"],sources:[e.webgpu?L$d:y$b],useWGSL:e.webgpu}),h={u_bgColor:function(){return d._translucentMRTClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(c,{shaderProgramName:"AdjustTranslucentOIT",useWGSL:e.webgpu,uniformMap:h,owner:this})):this._translucentMultipassSupport&&(c=new s$V({sources:[y$b]}),h={u_bgColor:function(){return d._translucentMultipassClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(c,{uniformMap:h,owner:this}),h={u_bgColor:function(){return d._alphaClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(c,{uniformMap:h,owner:this}))),this._viewport.width=o,this._viewport.height=a;var f=!f$1a.equals(this._viewport,t.viewport),p=f!==this._useScissorTest;this._useScissorTest=f,f$1a.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=f$1a.clone(t.viewport,this._scissorRectangle),p=!0),(!e$2e(this._rs)||!f$1a.equals(this._viewport,this._rs.viewport)||p)&&(this._rs=d$1m.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),e$2e(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),e$2e(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)}};var G$d={enabled:!0,color:new e$1X(0,0,0,0),equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.ONE,functionDestinationRgb:l$13.ONE,functionSourceAlpha:l$13.ZERO,functionDestinationAlpha:l$13.ONE_MINUS_SOURCE_ALPHA},H$e={enabled:!0,color:new e$1X(0,0,0,0),equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.ONE,functionDestinationRgb:l$13.ONE,functionSourceAlpha:l$13.ONE,functionDestinationAlpha:l$13.ONE},U$a={enabled:!0,color:new e$1X(0,0,0,0),equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.ZERO,functionDestinationRgb:l$13.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:l$13.ZERO,functionDestinationAlpha:l$13.ONE_MINUS_SOURCE_ALPHA};function R$b(e,t,i,n){var r=i[n.id];if(!e$2e(r)){var o=d$1m.getState(n);o.depthMask=!1,o.blending=t,r=d$1m.fromCache(o),i[n.id]=r}return r}function V$c(e,t,i){return R$b(t,G$d,e._translucentRenderStateCache,i)}function Q$6(e,t,i){return R$b(t,H$e,e._translucentRenderStateCache,i)}function Z$9(e,t,i){return R$b(t,U$a,e._alphaRenderStateCache,i)}var X$8=" vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n",Y$7=" var Ci : vec3<f32> = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n var ai = czm_gl_FragColor.a;\n var wzi = czm_alphaWeight(ai);\n gl_FragData0 = vec4<f32>(Ci * wzi, ai);\n gl_FragData1 = vec4<f32>(ai * wzi);\n",k$9=" vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragColor = vec4(Ci, ai) * wzi;\n",J$6=" float ai = czm_gl_FragColor.a;\n gl_FragColor = vec4(ai);\n";function D$a(e,t,i,n){var r=e.shaderCache.getDerivedShaderProgram(t,i);if(!e$2e(r)){var o=t._attributeLocations,a=t.fragmentShaderSource.clone(),s=a.useWGSL;if(a.sources=a.sources.map((function(e){return e=(e=(e=(e=s$V.replaceMain(e,"czm_translucent_main",s)).replace(/gl_FragColor/g,"czm_gl_FragColor")).replace(/\bdiscard\b/g,"czm_discard = true")).replace(/czm_phong/g,"czm_translucentPhong")})),s)a.sources.splice(0,0,"var<private> czm_gl_FragColor : vec4<f32>;\nvar<private> czm_discard : bool = false;\n"),a.sources.push("@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n"+n+"}\n");else{var l="";e.webgpu&&(l="#ifdef WEBGPU \n layout(location = 0) out vec4 glFragData[2]; \n#endif \n"),a.sources.splice(0,0,(-1!==n.indexOf("gl_FragData")?"#extension GL_EXT_draw_buffers : enable \n"+l:"")+"vec4 czm_gl_FragColor;\nbool czm_discard = false;\n"),a.sources.push("void main()\n{\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n"+n+"}\n")}r=e.shaderCache.createDerivedShaderProgram(t,i,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:o})}return r}function K$8(e,t){return D$a(e,t,"translucentMRT",t.fragmentShaderSource.useWGSL?Y$7:X$8)}function $$8(e,t){return D$a(e,t,"translucentMultipass",k$9)}function ee$6(e,t){return D$a(e,t,"alphaMultipass",J$6)}function ae$5(e,t,i,n,r,o){var a,s,l=t.context,u=t.frameState.useLogDepth,c=t._hdr,h=n.framebuffer,d=r.length,f=t.frameState.shadowState.lightShadowsEnabled;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(l,n),n.framebuffer=e._adjustAlphaFBO,e._adjustAlphaCommand.execute(l,n);var p=e._opaqueFBO;for(n.framebuffer=e._translucentFBO,s=0;s<d;++s)a=r[s],a=u?a.derivedCommands.logDepth.command:a,a=c?a.derivedCommands.hdr.command:a,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.translucentCommand:a.derivedCommands.oit.translucentCommand,t,l,n,p);for(e$2e(o)&&(a=o.unclassifiedCommand,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.translucentCommand:a.derivedCommands.oit.translucentCommand,t,l,n,p)),n.framebuffer=e._alphaFBO,s=0;s<d;++s)a=r[s],a=u?a.derivedCommands.logDepth.command:a,a=c?a.derivedCommands.hdr.command:a,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.alphaCommand:a.derivedCommands.oit.alphaCommand,t,l,n,p);e$2e(o)&&(a=o.unclassifiedCommand,i(f&&a.receiveShadows?a.derivedCommands.oit.shadows.alphaCommand:a.derivedCommands.oit.alphaCommand,t,l,n,p)),n.framebuffer=h}function re$6(e,t,i,n,r,o){var a=t.context,s=t.frameState.useLogDepth,l=t._hdr,u=n.framebuffer,c=r.length,h=t.frameState.shadowState.lightShadowsEnabled;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(a,n);var d=e._opaqueFBO;n.framebuffer=e._translucentFBO;for(var f,p=0;p<c;++p)f=r[p],f=s?f.derivedCommands.logDepth.command:f,f=l?f.derivedCommands.hdr.command:f,i(h&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,t,a,n,d);e$2e(o)&&(f=o.unclassifiedCommand,i(h&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand,t,a,n,d)),n.framebuffer=u}C$c.prototype.createDerivedCommands=function(e,t,i){var n,r,o,a,s,l;(e$2e(i)||(i={}),this._translucentMRTSupport)?(e$2e(i.translucentCommand)&&(n=i.translucentCommand.shaderProgram,r=i.translucentCommand.renderState),i.translucentCommand=i$$.shallowClone(e,i.translucentCommand),e$2e(n)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=n,i.translucentCommand.renderState=r):(i.translucentCommand.shaderProgram=K$8(t,e.shaderProgram),i.translucentCommand.renderState=V$c(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id)):(e$2e(i.translucentCommand)&&(o=i.translucentCommand.shaderProgram,a=i.translucentCommand.renderState,s=i.alphaCommand.shaderProgram,l=i.alphaCommand.renderState),i.translucentCommand=i$$.shallowClone(e,i.translucentCommand),i.alphaCommand=i$$.shallowClone(e,i.alphaCommand),e$2e(o)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=o,i.translucentCommand.renderState=a,i.alphaCommand.shaderProgram=s,i.alphaCommand.renderState=l):(i.translucentCommand.shaderProgram=$$8(t,e.shaderProgram),i.translucentCommand.renderState=Q$6(this,t,e.renderState),i.alphaCommand.shaderProgram=ee$6(t,e.shaderProgram),i.alphaCommand.renderState=Z$9(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id));return i},C$c.prototype.executeCommands=function(e,t,i,n,r){this._translucentMRTSupport?re$6(this,e,t,i,n,r):ae$5(this,e,t,i,n,r)},C$c.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)},C$c.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._opaqueFBO,e$1X.clone(i,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO,this._alphaClearCommand.execute(e,t)),t.framebuffer=n},C$c.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport},C$c.prototype.setOpaqueTexture=function(e){this._opaqueTexture=e},C$c.prototype.isDestroyed=function(){return!1},C$c.prototype.destroy=function(){return z$a(this),e$2e(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),e$2e(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),e$2e(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),i$11(this)};var x$a=new r$U("MapQuest, Open Street Map and contributors, CC-BY-SA");function a$9(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=t$10.createIfNeeded(u$Z(e.url,"https://a.tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+="{z}/{x}/{y}."+u$Z(e.fileExtension,"png");var i=new c$S({ellipsoid:e.ellipsoid}),n=u$Z(e.minimumLevel,0),r=e.maximumLevel,o=u$Z(e.rectangle,i.rectangle),a=i.positionToTileXY(h$18.southwest(o),n),s=i.positionToTileXY(h$18.northeast(o),n),l=(Math.abs(s.x-a.x)+1)*(Math.abs(s.y-a.y)+1);if(l>4)throw new t$15("The rectangle and minimumLevel indicate that there are "+l+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");var u=u$Z(e.credit,x$a);"string"==typeof u&&(u=new r$U(u)),_$g.call(this,{url:t,credit:u,tilingScheme:i,tileWidth:256,tileHeight:256,minimumLevel:n,maximumLevel:r,rectangle:o})}function m$c(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.time=u$Z(e.time,0),this.minimum=u$Z(e.minimum,0),this.maximum=u$Z(e.maximum,50),this._complete=!1}function e$6(e){throw new t$15("This type should not be instantiated directly. Instead, use BoxEmitter, CircleEmitter, ConeEmitter or SphereEmitter.")}e$2e(Object.create)&&(a$9.prototype=Object.create(_$g.prototype),a$9.prototype.constructor=a$9),Object.defineProperties(m$c.prototype,{complete:{get:function(){return this._complete}}}),e$6.prototype.emit=function(e){t$15.throwInstantiationError()};var N$7="uniform sampler2D u_colorTexture;\nuniform sampler2D u_transitionAndCountTexture;\nvarying vec2 v_textureCoordinates;\nfloat erf(float x){\nif (abs(x) > 2.629639){\nreturn sign(x);\n}\nelse {\nfloat z = 0.289226 * x * x - 1.0;\nreturn ((((((0.0145688 * z - 0.0348595) * z + 0.0503913) * z - 0.0897001) * z + 0.156097) * z - 0.249431) * z + 0.533201) * x;\n}\n}\nfloat VDMTransmission(vec2 transition, float depth){\nfloat variance = max(transition.y - transition.x * transition.x, 0.0);\nreturn clamp(0.5 * (1.0 + erf((depth - transition.x) / sqrt(variance * 2.0))), 0.0, 1.0);\n}\nvoid main()\n{\nvec4 color = texture2D(u_colorTexture, v_textureCoordinates);\nif(color.a < 0.01){\ndiscard;\n}\nfloat scene_depth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));\nif(scene_depth > 0.0){\nvec3 transitionAndCount = texture2D(u_transitionAndCountTexture, v_textureCoordinates).xyz;\nfloat count = transitionAndCount.z;\nvec2 transition = transitionAndCount.xy;\ntransition /= count;\nfloat vdmAlpha = VDMTransmission(transition, scene_depth);\ncolor.a = min(color.a, vdmAlpha);\n}\ngl_FragColor = color;\n}\n";function u$b(){this._colorFBO=void 0,this._transitionFBO=void 0,this._colorTexture=void 0,this._transitionTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._passType=Le$q.OPAQUE,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},this.quality=.25,this.enable=!1,this._useLogDepth=!1,this._particleSp=void 0,this._useHdr=!1,this.useHdr=this._useHdr}var G$c={enabled:!0,color:new e$1X(0,0,0,0),equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.SOURCE_ALPHA,functionDestinationRgb:l$13.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:l$13.ONE,functionDestinationAlpha:l$13.ONE},f$e=new f$1a;function q$a(e,t){var i=e[t.id];if(!e$2e(i)||i.viewport.width!=f$e.width||i.viewport.height!=f$e.height){var n=d$1m.getState(t);n.viewport=f$e,i=d$1m.fromCache(n),e[t.id]=i}return i}function S$9(){return new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}function y$a(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._transitionTexture=e._transitionTexture&&!e._transitionTexture.isDestroyed()&&e._transitionTexture.destroy(),e._colorFBO=e._colorFBO&&!e._colorFBO.isDestroyed()&&e._colorFBO.destroy(),e._transitionFBO=e._transitionFBO&&!e._transitionFBO.isDestroyed()&&e._transitionFBO.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}function U$9(e,t){var i=e._screenWidth,n=e._screenHeight;e._colorTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,sampler:S$9()}),e._transitionTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT,sampler:S$9()}),e._colorFBO=new t$V({context:t,colorTextures:[e._colorTexture],destroyAttachments:!1}),e._transitionFBO=new t$V({context:t,colorTextures:[e._transitionTexture],destroyAttachments:!1})}function I$8(e,t){var i=[];e._useLogDepth&&i.push("LOG_DEPTH");var n=new s$V({sources:[N$7],defines:i}),r={u_colorTexture:function(){return e._colorTexture},u_transitionAndCountTexture:function(){return e._transitionTexture}},o=d$1m.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:G$c});e._drawCommand=t.createViewportQuadCommand(n,{uniformMap:r,renderState:o,pass:e._passType,owner:e}),e._clearCommand=new t$W({color:new e$1X(0,0,0,0),depth:1,renderState:d$1m.fromCache(),pass:e._passType,owner:e})}function V$b(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._colorTexture,o=!1,a=e$2e(r)&&(r.width!==i||r.height!==n);return(!e$2e(r)||a)&&(y$a(e),U$9(e,t),I$8(e,t),o=!0),o}function D$9(e){return e.drawBuffers&&e.fragmentDepth}function r$f(){this._drawCommand=void 0,this.enable=!1,this._particleStateTexture=void 0,this._initialized=!1}function a$8(e){e._drawCommand=void 0,e._clearCommand=void 0}function h$a(e,t){var i=new s$V({sources:[ie$7]}),n={colorTexture:function(){return e._particleStateTexture}},r=d$1m.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Ee$r.ALPHA_BLEND});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:e._passType,owner:e})}function c$b(e,t){var i=!1;return e._initialized||(a$8(e),h$a(e,t),i=!0,e._initialized=!0),i}function d$h(e){return e.drawBuffers&&e.fragmentDepth}function i$c(e){if("string"==typeof e){var t=document.getElementById(e);if(null===t)throw new t$15('Element with id "'+e+'" does not exist in the document.');e=t}return e}function o$d(e){var t=i$c((e=u$Z(e,u$Z.EMPTY_OBJECT)).container);if(!e$2e(t))throw new t$15("container is required");this._container=t;var i=document.createElement("div");i.className="supermap3d-performanceDisplay";var n=document.createElement("div");n.className="supermap3d-performanceDisplay-fps",this._fpsText=document.createTextNode(""),n.appendChild(this._fpsText);var r=document.createElement("div");r.className="supermap3d-performanceDisplay-ms",this._msText=document.createTextNode(""),r.appendChild(this._msText),i.appendChild(r),i.appendChild(n),this._container.appendChild(i),this._lastFpsSampleTime=Et$c(),this._lastMsSampleTime=Et$c(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;var o=document.createElement("div");o.className="supermap3d-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),o.appendChild(this._throttledText),i.appendChild(o);var a=document.createElement("div");a.className="supermap3d-performanceDisplay-ms",this._trangleCountText=document.createTextNode(""),a.appendChild(this._trangleCountText),i.appendChild(a)}u$b.isSupported=D$9,u$b.prototype.update=function(e,t){if(D$9(e.context)&&this.enable){var i=e.context;this._screenWidth=Math.floor(i.drawingBufferWidth*this.quality),this._screenHeight=Math.floor(i.drawingBufferHeight*this.quality),f$e.width=this._screenWidth,f$e.height=this._screenHeight,this._useLogDepth=e.useLogDepth,this._useHdr=t,V$b(this,i)}},u$b.prototype.execute=function(e,t){!e$2e(this._drawCommand)||!this.enable||!e$2e(e.uniformState)||!e$2e(e.uniformState.globeDepthTexture)||this._drawCommand.execute(e,t)},u$b.prototype.executeCommand=function(e,t,i,n,r){if(0!=r){var o,a,s=e.context,l=e.frameState.useLogDepth,u=e._hdr,c=i.framebuffer;for(i.framebuffer=this._colorFBO,a=0;a<r;++a)o=n[a],o=l?o.derivedCommands.logDepth.command:o,t(o=u?o.derivedCommands.hdr.command:o,e,s,i);for(i.framebuffer=this._transitionFBO,a=0;a<r;++a){if(o=n[a],o=l?o.derivedCommands.logDepth.command:o,o=u?o.derivedCommands.hdr.command:o,!e$2e(this._particleSp)||this._useHdr!==this.useHdr){this.useHdr=this._useHdr;var h=o.shaderProgram.fragmentShaderSource.clone(),d=o.shaderProgram.vertexShaderSource.clone();h.defines.push("PARTICLESYSTEM"),this._particleSp=r$14.fromCache({context:s,vertexShaderSource:d,fragmentShaderSource:h})}var f=o.shaderProgram;o._shaderProgram=this._particleSp,t(o,e,s,i),o._shaderProgram=f}i.framebuffer=c}},u$b.prototype.clear=function(e,t){!e$2e(this._clearCommand)||!this.enable||(this._clearCommand.framebuffer=this._colorFBO,this._clearCommand.execute(e,t),this._clearCommand.framebuffer=this._transitionFBO,this._clearCommand.execute(e,t))},u$b.prototype.createDerivedCommands=function(e){!e$2e(e)||(this.enable=!0,e$2e(this._colorFBO)&&(e.renderState=q$a(this._renderStateCache,e.renderState)))},u$b.prototype.isDestroyed=function(){return!1},u$b.prototype.destroy=function(){return y$a(this),i$11(this)},r$f.isSupported=d$h,r$f.prototype.update=function(e){if(this.enable=!0,d$h(e.context)&&this.enable)c$b(this,e.context)},r$f.prototype.execute=function(e,t){!e$2e(this._drawCommand)||!this.enable||!e$2e(e.uniformState)||!e$2e(e.uniformState.globeDepthTexture)||this._drawCommand.execute(e,t)},r$f.prototype.isDestroyed=function(){return!1},r$f.prototype.destroy=function(){return a$8(this),i$11(this)},Object.defineProperties(o$d.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(this._throttledText.nodeValue=e?"(throttled)":"",this._throttled=e)}},trangleCount:{set:function(e){this._trangleCount!==e&&(this._trangleCount=e,this._trangleCountText.nodeValue=e)}}}),o$d.prototype.update=function(e){var t=Et$c(),i=u$Z(e,!0);this._fpsFrameCount++;var n=t-this._lastFpsSampleTime;if(n>1e3){var r="N/A";i&&(r=1e3*this._fpsFrameCount/n|0),this._fpsText.nodeValue=r+" FPS",this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;var o=t-this._lastMsSampleTime;if(o>200){var a="N/A";i&&(a=(o/this._msFrameCount).toFixed(2)),this._msText.nodeValue=a+" MS",this._lastMsSampleTime=t,this._msFrameCount=0}},o$d.prototype.destroy=function(){return i$11(this)};var P$d="varying v_textureCoordinates : vec2<f32>;\nvar u_depthTexture : texture_depth_multisampled_2d;\nvar u_depthTextureSampler : sampler;\nfn packDepth(depth : f32) -> vec4<f32> {\n var enc : vec4<f32> = (vec4<f32>(1.0, 255.0, 65025.0, 16581375.0) * depth);\n enc = fract(enc);\n enc = (enc - (vec4<f32>(enc.y, enc.z, enc.w, enc.w) * vec4<f32>(0.003921569, 0.003921569, 0.003921569, 0.0)));\n return enc;\n}\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var sampleCount = i32(textureNumSamples(u_depthTexture));\n var sampleCoord = vec2<i32>(v_textureCoordinates * vec2<f32>(textureDimensions(u_depthTexture)));\n var accumValue : f32;\n for(var i = 0i; i < sampleCount; i += 1i){\n accumValue += textureLoad(u_depthTexture, sampleCoord, i);\n }\n var depth = accumValue / f32(sampleCount);\n gl_FragColor = packDepth(depth);\n}\n";function f$d(){this._framebuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._useLogDepth=void 0,this._debugPickDepthViewportCommand=void 0}function w$a(e,t,i,n){if(!e$2e(e._debugPickDepthViewportCommand)||n!==e._useLogDepth){var r=new s$V({defines:[n?"LOG_DEPTH":""],sources:["uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float z_window = czm_unpackDepth(texture2D(u_texture, v_textureCoordinates));\n z_window = czm_reverseLogDepth(z_window); \n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]});e._debugPickDepthViewportCommand=t.createViewportQuadCommand(r,{shaderProgramName:"spDebugPickDepth",uniformMap:{u_texture:function(){return e._depthTexture}},owner:e}),e._useLogDepth=n}e._debugPickDepthViewportCommand.execute(t,i)}function s$c(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function h$9(e){e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy()}function b$h(e,t,i,n){e._depthTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE})}function T$e(e,t,i,n){s$c(e),h$9(e),b$h(e,t,i,n),e._framebuffer=new t$V({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function D$8(e,t,i){var n=i.width,r=i.height,o=e._depthTexture,a=!e$2e(o)||o.width!==n||o.height!==r;(!e$2e(e._framebuffer)||a)&&T$e(e,t,n,r)}function S$8(e,t,i){if(t.depthTexture){if(!e$2e(e._copyDepthCommand)){var n=t.webgpu?i._inner._samples>1?P$d:C$15:v$O;e._copyDepthCommand=t.createViewportQuadCommand(n,{shaderProgramName:"spCopyDepthPickDepth",useWGSL:t.webgpu,renderState:d$1m.fromCache(),uniformMap:{u_depthTexture:function(){return e._textureToCopy}},owner:e})}}else if(!e$2e(e._copyDepthCommand)){n="uniform sampler2D u_depthStencilTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = texture2D(u_depthStencilTexture, v_textureCoordinates).rgba;\n}\n";e._copyDepthCommand=t.createViewportQuadCommand(n,{shaderProgramName:"spCopyDepthPickDepth",renderState:d$1m.fromCache(),uniformMap:{u_depthStencilTexture:function(){return e._textureToCopy}},owner:e})}e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._framebuffer}f$d.prototype.executeDebugPickDepth=function(e,t,i){w$a(this,e,t,i)},f$d.prototype.update=function(e,t){D$8(this,e,t),S$8(this,e,t)},new e$2c;var z$9=new e$2c(1,1/255,1/65025,1/16581375);function _$c(e){var t=[];e$2c.unpackArray(e,t);for(var i=Number.POSITIVE_INFINITY,n=0;n<t.length;n++){var r=t[n];e$2c.divideByScalar(r,255,r),i=Math.min(i,e$2c.dot(r,z$9))}return i}function s$b(){this._depthStencilTexture=void 0,this._colorTexture=void 0,this._framebuffer=void 0,this._passState=void 0}function l$d(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy(),e._colorTexture=e._colorTexture&&e._colorTexture.destroy()}function w$9(e,t){var i=t.drawingBufferWidth,n=t.drawingBufferHeight;t.depthTexture?(e._depthStencilTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8}),e._colorTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE}),e._framebuffer=new t$V({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1})):(e._depthStencilTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE}),e._framebuffer=new t$V({context:t,colorTextures:[e._depthStencilTexture],depthStencilRenderbuffer:new r$10({context:t,width:i,height:n,format:M$13.DEPTH_STENCIL}),destroyAttachments:!1}));var r=new n$$(t);r.blendingEnabled=!1,r.scissorTest={enabled:!0,rectangle:new f$1a},r.viewport=new f$1a,e._passState=r}function f$c(e){var t=new n$$(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new f$1a},t.viewport=new f$1a,this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}function w$8(e,t,i,n){for(var r=Math.max(e,t),o=r*r,a=Math.floor(.5*e),s=Math.floor(.5*t),l=0,u=0,c=0,h=-1,d=0;d<o;++d){if(-a<=l&&l<=a&&-s<=u&&u<=s){var f=4*((s-u)*e+l+a),p=e$1X.byteToRgba(n[f],n[f+1],n[f+2],n[f+3]),_=i.getObjectByPickId(p);if(e$2e(_))return _}if(l===u||l<0&&-l===u||l>0&&l===1-u){var m=c;c=-h,h=m}l+=c,u+=h}}function a$7(e){var t=new n$$(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new f$1a},t.viewport=new f$1a,this._environmentVisible={isSunVisible:!1,isMoonVisible:!1,isSkyAtmosphereVisible:!1,isSkyBoxVisible:!1,isGlobalVisible:!1,isObjectVisible:!0,isOnlyS3MObjectVisible:!0,isUnderGlobeVisible:!1},this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}function L$c(e,t,i){var n,r,o=e.context,a=[],s=t.frustum.near,l=t.frustum.far,u=e.logarithmicDepthBuffer?e.logarithmicDepthFarToNearRatio:e.farToNearRatio;Y$6(s,l,u,Math.ceil(Math.log(l/s)/Math.log(u)),e.logarithmicDepthBuffer,a,!1,void 0),o.depthTexture&&(n=new a$a),e._useOIT&&o.depthTexture&&(r=new C$c(o));var c=new n$$(o);c.viewport=f$1a.clone(i),this.camera=t,this._cameraClone=v$K.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=i,this.passState=c,this.pickFramebuffer=new f$c(o),this.pickPointFramebuffer=new a$7(o),this.pickDepthFramebuffer=new s$b,this.sceneFramebuffer=new n$i,this.normalFramebuffer=new s$h(o),this.globeDepth=n,this.globeTranslucencyFramebuffer=new p$8,this.oit=r,this.pickDepths=[],this.debugGlobeDepths=[],this.frustumCommandsList=a,this.debugFrustumStatistics=void 0,this.updateFrustums=!1}f$d.prototype.getDepth=function(e,t,i,n){var r=1;return e$2e(n)&&(r+=n),t-=Math.floor(.5*r),i-=Math.floor(.5*r),_$c(e.readPixels({x:t,y:i,width:r,height:r,framebuffer:this._framebuffer}))},f$d.prototype.getDepthPromise=function(e,t,i,n){var r=1;return e$2e(n)&&(r+=n),t-=Math.floor(.5*r),i-=Math.floor(.5*r),e.readPixelsAsync({x:t,y:i,width:r,height:r,framebuffer:this._framebuffer}).then((e=>{var t=_$c(e);return Promise.resolve(t)})).catch((e=>(console.log("PickDepth.prototype.getDepth readPixelsAsync failed."),Promise.resolve(void 0))))},f$d.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},f$d.prototype.isDestroyed=function(){return!1},f$d.prototype.destroy=function(){return s$c(this),h$9(this),this._copyDepthCommand.shaderProgram=e$2e(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy(),i$11(this)},s$b.prototype.update=function(e,t,i){var n=i.width,r=i.height;(!e$2e(this._framebuffer)||n!==this._depthStencilTexture.width||r!==this._depthStencilTexture.height)&&(l$d(this),w$9(this,e));var o=this._framebuffer,a=this._passState;return a.framebuffer=o,a.viewport.width=n,a.viewport.height=r,a.scissorTest.rectangle.x=t.x,a.scissorTest.rectangle.y=r-t.y,a.scissorTest.rectangle.width=1,a.scissorTest.rectangle.height=1,a},s$b.prototype.isDestroyed=function(){return!1},s$b.prototype.destroy=function(){return l$d(this),i$11(this)},f$c.prototype.begin=function(e,t,i){var n=this._context,r=t.width,o=t.height;return f$1a.clone(e,this._passState.scissorTest.rectangle),this._passState.scissorTest.enabled=!i,(!e$2e(this._fb)||this._width!==r||this._height!==o)&&(this._width=r,this._height=o,this._fb=this._fb&&this._fb.destroy(),this._fb=new t$V({context:n,colorTextures:[new t$U({context:n,width:r,height:o})],depthStencilTexture:new t$U({context:n,width:r,height:o,pixelFormat:V$12.DEPTH_STENCIL,pixelDatatype:_$_.UNSIGNED_INT_24_8})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=r,this._passState.viewport.height=o,this._passState},f$c.prototype.endAsync=function(e){var t=u$Z(e.width,1),i=u$Z(e.height,1),n=this._context;return n.readPixelsAsync({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb}).then((e=>(n.pixels=e,Promise.resolve(w$8(t,i,n,e))))).catch((e=>(console.log("Context.readPixels failed."),Promise.resolve(void 0))))},f$c.prototype.end=function(e){var t=u$Z(e.width,1),i=u$Z(e.height,1),n=this._context,r=n.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb});return n.pixels=r,w$8(t,i,n,r)},f$c.prototype.isDestroyed=function(){return!1},f$c.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),i$11(this)},a$7.prototype.begin=function(e,t){var i=this._context,n=t.width,r=t.height;return f$1a.clone(e,this._passState.scissorTest.rectangle),(!e$2e(this._fb)||this._width!==n||this._height!==r)&&(this._width=n,this._height=r,this._fb=this._fb&&this._fb.destroy(),this._fb=new t$V({context:i,colorTextures:[new t$U({context:i,width:n,height:r,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT})],depthStencilRenderbuffer:new r$10({context:i,width:n,height:r,format:M$13.DEPTH_STENCIL})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=n,this._passState.viewport.height=r,this._passState},a$7.prototype.end=function(e){var t=u$Z(e.width,1),i=u$Z(e.height,1),n=this._context,r=n.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb});n.pixels=r;for(var o=Math.max(t,i),a=o*o,s=Math.floor(.5*t),l=Math.floor(.5*i),u=0,c=0,h=0,d=-1,f=0;f<a;++f){if(-s<=u&&u<=s&&-l<=c&&c<=l){var p=4*((l-c)*t+u+s),_=new e$2c(r[p],r[p+1],r[p+2],1);if(_.z<-e$2d.EPSILON10)return _}if(u===c||u<0&&-u===c||u>0&&u===1-c){var m=h;h=-d,d=m}u+=h,c+=d}},a$7.prototype.isDestroyed=function(){return!1},a$7.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),i$11(this)};var z$8=new o$1p,W$b=new o$1p;function vt$2(e,t){var i=Math.max(Math.abs(e.x),Math.abs(t.x)),n=Math.max(Math.abs(e.y),Math.abs(t.y)),r=Math.max(Math.abs(e.z),Math.abs(t.z));return Math.max(Math.max(i,n),r)}function dt$4(e,t,i){var n=1/Math.max(1,vt$2(e.position,t.position));return o$1p.multiplyByScalar(e.position,n,z$8),o$1p.multiplyByScalar(t.position,n,W$b),o$1p.equalsEpsilon(z$8,W$b,i)&&o$1p.equalsEpsilon(e.direction,t.direction,i)&&o$1p.equalsEpsilon(e.up,t.up,i)&&o$1p.equalsEpsilon(e.right,t.right,i)&&p$1d.equalsEpsilon(e.transform,t.transform,i)&&e.frustum.equalsEpsilon(t.frustum,i)}function Y$6(e,t,i,n,r,o,a,s){o.length=n;for(var l=0;l<n;++l){var u,c;a?(u=Math.min(t-s,e+l*s),c=Math.min(t,u+s)):(c=i*(u=Math.max(e,Math.pow(i,l)*e)),r||(c=Math.min(t,c)));var h=o[l];e$2e(h)?(h.near=u,h.far=c):h=o[l]=new i$e(u,c)}}function bt$2(e,t,i,n){e.debugShowFrustums&&(i.debugOverlappingFrustums=0);for(var r=t.frustumCommandsList,o=r.length,a=0;a<o;++a){var s=r[a],l=s.near,u=s.far;if(!(n.start>u)){if(n.stop<l)break;var c=i.pass,h=s.indices[c]++;if(s.commands[c][h]=i,e.debugShowFrustums&&(i.debugOverlappingFrustums|=1<<a),i.executeInClosestFrustum)break}}if(e.debugShowFrustums){var d=t.debugFrustumStatistics.commandsInFrustums;d[i.debugOverlappingFrustums]=e$2e(d[i.debugOverlappingFrustums])?d[i.debugOverlappingFrustums]+1:1,++t.debugFrustumStatistics.totalCommands}e.updateDerivedCommands(i)}L$c.prototype.checkForCameraUpdates=function(e){var t=this.camera,i=this._cameraClone;return dt$4(t,i,e$2d.EPSILON6)?(this._cameraStartFired&&Et$c()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=Et$c(),v$K.clone(t,i),!0)};var H$d=new i$X,o$c=new o$1n;L$c.prototype.createPotentiallyVisibleSet=function(e){var t=e.frameState,i=t.camera,n=i.directionWC,r=i.positionWC,o=e._computeCommandList,a=e._overlayCommandList,s=e._logDepthOverlayCommandList,l=e._overlayAgainstDepthCommandList,u=t.commandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});for(var c=this.frustumCommandsList,h=c.length,d=Le$q.NUMBER_OF_PASSES,f=0;f<h;++f)for(var p=0;p<d;++p)c[f].indices[p]=0;o.length=0,a.length=0,s.length=0,l.length=0;for(var _=Number.MAX_VALUE,m=-Number.MAX_VALUE,g=!1,x=t.shadowState.shadowsEnabled,y=Number.MAX_VALUE,v=-Number.MAX_VALUE,$=Number.MAX_VALUE,b=t.mode===C$14.SCENE3D?t.occluder:void 0,T=t.cullingVolume,C=H$d.planes,S=0;S<5;++S)C[S]=T.planes[S];T=H$d;for(var w=u.length,E=0;E<w;++E){var P=u[E];if(e.terrainProvider.isShowGlobe||!0!==P.invalid){var A=P.pass;if(A===Le$q.COMPUTE)o.push(P);else if(A===Le$q.LOG_DEPTH_OVERLAY)s.push(P),e.updateDerivedCommands(P);else if(A===Le$q.OVERLAY)a.push(P),e.updateDerivedCommands(P);else if(A===Le$q.OVERLAY_AGAINST_DEPTH)l.push(P),e.updateDerivedCommands(P);else{var L=P.boundingVolume;if(e$2e(L)){if(!e.isVisible(P,T,b))continue;if(o$c=L.computePlaneDistances(r,n,o$c),_=Math.min(_,o$c.start),m=Math.max(m,o$c.stop),x&&P.receiveShadows&&o$c.start<C$Z.MAXIMUM_DISTANCE&&!(A===Le$q.GLOBE&&o$c.start<-100&&o$c.stop>100)){var M=o$c.stop-o$c.start;A!==Le$q.GLOBE&&o$c.start<100&&($=Math.min($,M));var R=Math.max(o$c.start,C$Z.NEAR_PLANE);y=Math.min(y,R),v=Math.max(v,o$c.stop)}}else o$c.start=i.frustum.near,o$c.stop=i.frustum.far,g=!(P instanceof t$W);bt$2(e,this,P,o$c)}}}g?(_=i.frustum.near,m=i.frustum.far):(_=Math.min(Math.max(_,i.frustum.near),i.frustum.far),_=t.useLogDepth?_:Math.max(_,1),m=Math.max(Math.min(m,i.frustum.far),_),x&&(y=Math.min(Math.max(y,i.frustum.near),i.frustum.far),v=Math.max(Math.min(v,i.frustum.far),y+1))),x&&!t.passes.pick&&(t.shadowState.nearPlane=Math.max(y,.1),t.shadowState.farPlane=v,t.shadowState.closestObjectSize=$);var O,D=e.mode===C$14.SCENE2D,I=t.useLogDepth,B=I?e.logarithmicDepthFarToNearRatio:e.farToNearRatio;!t.useLogDepth&&t.context.depthTexture&&(t.passes.fbo||t._isDepth||e.compositor.isScanEnable())&&(B=e.logarithmicDepthFarToNearRatio,_=Math.max(_,1)),D?(m=Math.min(m,i.position.z+e.nearToFarDistance2D),_=Math.min(_,m),O=Math.ceil(Math.max(1,m-_)/e.nearToFarDistance2D)):O=Math.ceil(Math.log(m/_)/Math.log(B)),(this.updateFrustums||_!==Number.MAX_VALUE&&(O!==h||0!==c.length&&(_<c[0].near||m>c[h-1].far&&(I||!e$2d.equalsEpsilon(m,c[h-1].far,e$2d.EPSILON8)))))&&(this.updateFrustums=!1,Y$6(_,m,B,O,I,c,D,e.nearToFarDistance2D),this.createPotentiallyVisibleSet(e));var F=t.frustumSplits;F.length=O+1;for(var N=0;N<O;++N)F[N]=c[N].near,N===O-1&&(F[N+1]=c[N].far)},L$c.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickPointFramebuffer=this.pickPointFramebuffer&&this.pickPointFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.normalFramebuffer=this.normalFramebuffer&&this.normalFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy(),this.globeTranslucencyFramebuffer=this.globeTranslucencyFramebuffer&&this.globeTranslucencyFramebuffer.destroy();var e,t,i=this.pickDepths,n=this.debugGlobeDepths;for(t=i.length,e=0;e<t;++e)i[e].destroy();for(t=n.length,e=0;e<t;++e)n[e].destroy()};var J$5=.1,wt$3=new a$g({pass:ue$e.MOST_DETAILED_PRELOAD}),yt$2=new a$g({pass:ue$e.MOST_DETAILED_PICK}),b$g=new a$g({pass:ue$e.PICK});function d$g(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;var t=new f$1a(0,0,1,1),i=new v$K(e);i.frustum=new a$V({width:J$5,aspectRatio:1,near:.1}),this._pickOffscreenView=new L$c(e,i,t)}d$g.prototype.update=function(){this._pickPositionCacheDirty=!0},d$g.prototype.getPickDepth=function(e,t){var i=e.view.pickDepths,n=i[t];return e$2e(n)||(n=new f$d,i[t]=n),n};var kt$2=new l$11,Ct$2=new o$1p,M$b=new o$1p,Pt$2=new o$1o,Dt$3=new p$1d;function St(e,t,i,n,r){var o=e.camera,a=o.frustum;e$2e(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2*(t.x-r.x)/r.width-1;s*=.5*(a.right-a.left);var l=2*(r.height-t.y-r.y)/r.height-1;l*=.5*(a.top-a.bottom);var u=p$1d.clone(o.transform,Dt$3);o._setTransform(p$1d.IDENTITY);var c=o$1p.clone(o.position,Ct$2);o$1p.multiplyByScalar(o.right,s,M$b),o$1p.add(M$b,c,c),o$1p.multiplyByScalar(o.up,l,M$b),o$1p.add(M$b,c,c),o._setTransform(u),e.mode===C$14.SCENE2D&&o$1p.fromElements(c.z,c.x,c.y,c);var h=a.getPixelDimensions(r.width,r.height,1,1,Pt$2),d=kt$2;return d.right=.5*h.x,d.left=-d.right,d.top=.5*h.y,d.bottom=-d.top,d.near=a.near,d.far=a.far,d.computeCullingVolume(c,o.directionWC,o.upWC)}var Ft$3=new l$10,Rt$4=new o$1o;function Ot$2(e,t,i,n,r){var o=e.camera,a=o.frustum,s=a.near,l=Math.tan(.5*a.fovy),u=a.aspectRatio*l,c=(2*(t.x-r.x)/r.width-1)*s*u,h=(2*(r.height-t.y-r.y)/r.height-1)*s*l,d=a.getPixelDimensions(r.width,r.height,1,1,Rt$4),f=d.x*i*.5,p=d.y*n*.5,_=Ft$3;return _.top=h+p,_.bottom=h-p,_.right=c+f,_.left=c-f,_.near=s,_.far=a.far,_.computeCullingVolume(o.positionWC,o.directionWC,o.upWC)}function Q$5(e,t,i,n,r){var o=e.camera.frustum;return o instanceof a$V||o instanceof l$11?St(e,t,i,n,r):Ot$2(e,t,i,n,r)}var R$a=3,V$a=3,P$c=new f$1a(0,0,R$a,V$a),$$7=new o$1o,G$b=new e$1X(0,0,0,0);function Ht$2(e,t){var i=e.context,n=e.frameState,r=e.environmentState,o=e.defaultView;e.view=o;var a=o.viewport;a.x=0,a.y=0,a.width=i.drawingBufferWidth,a.height=i.drawingBufferHeight;var s=o.passState;s.viewport=f$1a.clone(a,s.viewport),e.clearPasses(n.passes),n.passes.pick=!0,n.passes.depth=!0,n.cullingVolume=Q$5(e,t,1,1,a),n.tilesetPassState=b$g,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,s=o.pickDepthFramebuffer.update(i,t,a),e.updateAndExecuteCommands(s,G$b),e.resolveFramebuffers(s),i.endFrame()}d$g.prototype.pick=function(e,t,i,n){if(!e$2e(t))throw new t$15("windowPosition is undefined.");R$a=u$Z(i,3),V$a=u$Z(n,R$a);var r=e.context,o=r.uniformState,a=e.frameState,s=e.defaultView;e.view=s;var l=s.viewport;l.x=0,l.y=0,l.width=r.drawingBufferWidth,l.height=r.drawingBufferHeight;var u=s.passState;u.viewport=f$1a.clone(l,u.viewport);var c=s$R.transformWindowToDrawingBuffer(e,t,$$7);e.jobScheduler.disableThisFrame(),e.updateFrameState(),a.cullingVolume=Q$5(e,c,R$a,V$a,l),a.invertClassification=!1,a.passes.pick=!0,a.tilesetPassState=b$g,o.update(a),e.updateEnvironment(),P$c.x=c.x-.5*(R$a-1),P$c.y=e.drawingBufferHeight-c.y-.5*(V$a-1),P$c.width=R$a,P$c.height=V$a,u=s.pickFramebuffer.begin(P$c,s.viewport),e.updateAndExecuteCommands(u,G$b),e.resolveFramebuffers(u);var h=s.pickFramebuffer.end(P$c);return r.endFrame(),h};var xt$3=new o$15,_t$3=new l$10,Vt$3=new a$V,Mt$3=new l$11;d$g.prototype.pickPositionWorldCoordinates=function(e,t,i){if(e.useDepthPicking){if(!e$2e(t))throw new t$15("windowPosition is undefined.");if(!e.context.depthTexture)throw new t$15("Picking from the depth buffer is not supported. Check pickPositionSupported.");var n=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n))return o$1p.clone(this._pickPositionCache[n],i);var r=e.frameState,o=e.context,a=o.uniformState,s=e.defaultView;e.view=s;var l=s$R.transformWindowToDrawingBuffer(e,t,$$7);e.pickTranslucentDepth?Ht$2(e,l):(e.updateFrameState(),a.update(r),e.updateEnvironment()),l.y=e.drawingBufferHeight-l.y;var u,c=e.camera;u=e$2e(c.frustum.fov)?c.frustum.clone(xt$3):e$2e(c.frustum.infiniteProjectionMatrix)?c.frustum.clone(_t$3):e$2e(c.frustum.width)?c.frustum.clone(Vt$3):c.frustum.clone(Mt$3);for(var h=s.frustumCommandsList,d=h.length,f=0;f<d;++f){var p=this.getPickDepth(e,f).getDepth(o,l.x,l.y);if(p>0&&p<1){var _,m=h[f];return e.mode===C$14.SCENE2D?(_=c.position.z,c.position.z=_-m.near+1,u.far=Math.max(1,m.far-m.near),u.near=1,a.update(r),a.updateFrustum(u)):(u.near=m.near*(0!==f?e.opaqueFrustumNearOffset:1),u.far=m.far,a.updateFrustum(u)),i=s$R.drawingBufferToWgs84Coordinates(e,l,p,i),e.mode===C$14.SCENE2D&&(c.position.z=_,a.update(r)),this._pickPositionCache[n]=o$1p.clone(i),i}}this._pickPositionCache[n]=void 0}};var Nt$3=new a$18;function j$a(e,t){var i,n,r=[],o=[],a=[],s=[];e$2e(e)||(e=Number.MAX_VALUE);for(var l=t();e$2e(l);){var u=l.object,c=l.position,h=l.exclude;if(e$2e(c)&&!e$2e(u)){r.push(l);break}if(!e$2e(u)||!e$2e(u.primitive)||!h&&(r.push(l),0>=--e))break;var d=u.primitive,f=!1;"function"==typeof d.getGeometryInstanceAttributes&&e$2e(u.id)&&(e$2e(n=d.getGeometryInstanceAttributes(u.id))&&e$2e(n.show)&&(f=!0,n.show=e$1I.toValue(!1,n.show),a.push(n))),u instanceof e$M&&(f=!0,u.show=!1,s.push(u)),f||(d.show=!1,o.push(d)),l=t()}for(i=0;i<o.length;++i)o[i].show=!0;for(i=0;i<a.length;++i)(n=a[i]).show=e$1I.toValue(!0,n.show);for(i=0;i<s.length;++i)s[i].show=!0;return r}d$g.prototype.pickPosition=function(e,t,i){if(e$2e(i=this.pickPositionWorldCoordinates(e,t,i))&&e.mode!==C$14.SCENE3D){o$1p.fromElements(i.y,i.z,i.x,i);var n=e.mapProjection,r=n.ellipsoid,o=n.unproject(i,Nt$3);r.cartographicToCartesian(o,i)}return i},d$g.prototype.drillPick=function(e,t,i,n,r){var o=this,a=j$a(i,(function(){var i=o.pick(e,t,n,r);if(e$2e(i))return{object:i,position:void 0,exclude:!1}}));return a.map((function(e){return e.object}))};var tt$4=new o$1p,Wt$3=new o$1p;function Et$3(e,t,i){this.ray=e,this.width=t,this.tilesets=i,this.ready=!1,this.deferred=o$1l.defer(),this.promise=this.deferred.promise}function rt$6(e,t,i,n){var r=t.direction,o=o$1p.mostOrthogonalAxis(r,tt$4),a=o$1p.cross(r,o,tt$4),s=o$1p.cross(r,a,Wt$3);return n.position=t.origin,n.direction=r,n.up=s,n.right=a,n.frustum.width=u$Z(i,J$5),n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC)}function Tt$2(e,t,i){var n=t.frameState,r=i.ray,o=i.width,a=i.tilesets,s=e._pickOffscreenView.camera,l=rt$6(e,r,o,s),u=wt$3;u.camera=s,u.cullingVolume=l;for(var c=!0,h=a.length,d=0;d<h;++d){var f=a[d];f.show&&t.primitives.contains(f)&&(f.updateForPass(n,u),c=c&&u.ready)}return c&&i.deferred.resolve(),c}function et$5(e,t,i){for(var n=e.length,r=0;r<n;++r){var o=e.get(r);o.show&&(e$2e(o.isCesium3DTileset)?(!e$2e(t)||-1===t.indexOf(o))&&i.push(o):o instanceof o$y&&et$5(o,t,i))}}function N$6(e,t,i,n,r,o){var a=[];if(et$5(t.primitives,n,a),0===a.length)return o$1l.resolve(o());var s=new Et$3(i,r,a);return e._mostDetailedRayPicks.push(s),s.promise.then((function(){return o()}))}function At$2(e,t){return!(!e$2e(e)||!e$2e(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function It$3(e,t,i,n,r,o,a){var s=t.context,l=s.uniformState,u=t.frameState,c=e._pickOffscreenView;t.view=c,rt$6(e,i,r,c.camera),P$c=f$1a.clone(c.viewport,P$c);var h=c.pickFramebuffer.begin(P$c,c.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),u.invertClassification=!1,u.passes.pick=!0,u.passes.offscreen=!0,c.updateFrustums=!0,u.tilesetPassState=a?yt$2:b$g,l.update(u),t.updateEnvironment(),t.updateAndExecuteCommands(h,G$b),t.resolveFramebuffers(h);var d,f=c.pickFramebuffer.end(s);if(t.context.depthTexture)for(var p=c.frustumCommandsList.length,_=0;_<p;++_){var m=e.getPickDepth(t,_).getDepth(s,0,0);if(m>0&&m<1){var g=c.frustumCommandsList[_],x=g.near*(0!==_?t.opaqueFrustumNearOffset:1),y=x+m*(g.far-x);d=f$19.getPoint(i,y);break}}if(t.view=t.defaultView,s.endFrame(),e$2e(f)||e$2e(d))return{object:f,position:d,exclude:!e$2e(d)&&o||At$2(f,n)}}function it$4(e,t,i,n,r,o,a,s){return j$a(n,(function(){return It$3(e,t,i,r,o,a,s)}))}function O$9(e,t,i,n,r,o,a){var s=it$4(e,t,i,1,n,r,o,a);if(s.length>0)return s[0]}function at$6(e,t,i,n,r,o,a,s){return it$4(e,t,i,n,r,o,a,s)}function W$a(e,t){var i=o$1l.defer();return t.then((function(t){var n=e.postRender.addEventListener((function(){i.resolve(t),n()}));e.requestRender()})).otherwise((function(e){i.reject(e)})),i.promise}d$g.prototype.updateMostDetailedRayPicks=function(e){for(var t=this._mostDetailedRayPicks,i=0;i<t.length;++i)Tt$2(this,e,t[i])&&t.splice(i--,1)},d$g.prototype.pickFromRay=function(e,t,i,n){if(o$1q.defined("ray",t),e.mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");return O$9(this,e,t,i,n,!1,!1)},d$g.prototype.drillPickFromRay=function(e,t,i,n,r){if(o$1q.defined("ray",t),e.mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");return at$6(this,e,t,i,n,r,!1,!1)},d$g.prototype.pickFromRayMostDetailed=function(e,t,i,n){if(o$1q.defined("ray",t),e.mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");var r=this;return t=f$19.clone(t),i=e$2e(i)?i.slice():i,W$a(e,N$6(r,e,t,i,n,(function(){return O$9(r,e,t,i,n,!1,!0)})))},d$g.prototype.drillPickFromRayMostDetailed=function(e,t,i,n,r){if(o$1q.defined("ray",t),e.mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");var o=this;return t=f$19.clone(t),n=e$2e(n)?n.slice():n,W$a(e,N$6(o,e,t,n,r,(function(){return at$6(o,e,t,i,n,r,!1,!0)})))};var Bt$4=new o$1p,Lt$2=new o$1p,zt$2=new f$19,ot$4=new a$18;function K$7(e,t){var i=e.globe,n=e$2e(i)?i.ellipsoid:e.mapProjection.ellipsoid,r=e$1H._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,Lt$2),a=a$18.toCartesian(t,n,Bt$4),s=zt$2;s.origin=a,s.direction=o;var l=new f$19;return f$19.getPoint(s,r,l.origin),o$1p.negate(o,l.direction),l}function nt$5(e,t){var i=e.globe,n=e$2e(i)?i.ellipsoid:e.mapProjection.ellipsoid;return K$7(e,a$18.fromCartesian(t,n,ot$4))}function ft$2(e,t){var i=e.globe,n=e$2e(i)?i.ellipsoid:e.mapProjection.ellipsoid;return a$18.fromCartesian(t,n,ot$4).height}function qt$3(e,t,i,n,r){var o=K$7(t,i);return N$6(e,t,o,n,r,(function(){var i=O$9(e,t,o,n,r,!0,!0);if(e$2e(i))return ft$2(t,i.position)}))}function bt$1(e,t,i,n,r,o){var a=nt$5(t,i);return N$6(e,t,a,n,r,(function(){var i=O$9(e,t,a,n,r,!0,!0);if(e$2e(i))return o$1p.clone(i.position,o)}))}function M$a(e){if(this._positions=u$Z(e,[new o$1p,new o$1p,new o$1p]),this.boundingSphere=i$1d.fromPoints(e),e$2e(e)){var t=U$18.fromPositions({positions:e,perPositionHeight:!0});this._geometry=U$18.createGeometry(t),this._triangleArrayByWeight=S$7(this)}this._density=1}d$g.prototype.sampleHeight=function(e,t,i,n){if(o$1q.defined("position",t),e.mode!==C$14.SCENE3D)throw new t$15("sampleHeight is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new t$15("sampleHeight requires depth texture support. Check sampleHeightSupported.");var r=O$9(this,e,K$7(e,t),i,n,!0,!1);if(e$2e(r))return ft$2(e,r.position)},d$g.prototype.clampToHeight=function(e,t,i,n,r){if(o$1q.defined("cartesian",t),e.mode!==C$14.SCENE3D)throw new t$15("clampToHeight is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new t$15("clampToHeight requires depth texture support. Check clampToHeightSupported.");var o=O$9(this,e,nt$5(e,t),i,n,!0,!1);if(e$2e(o))return o$1p.clone(o.position,r)},d$g.prototype.sampleHeightMostDetailed=function(e,t,i,n){if(o$1q.defined("positions",t),e.mode!==C$14.SCENE3D)throw new t$15("sampleHeightMostDetailed is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new t$15("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");i=e$2e(i)?i.slice():i;for(var r=t.length,o=new Array(r),a=0;a<r;++a)o[a]=qt$3(this,e,t[a],i,n);return W$a(e,o$1l.all(o).then((function(e){for(var i=e.length,n=0;n<i;++n)t[n].height=e[n];return t})))},d$g.prototype.clampToHeightMostDetailed=function(e,t,i,n){if(o$1q.defined("cartesians",t),e.mode!==C$14.SCENE3D)throw new t$15("clampToHeightMostDetailed is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new t$15("clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported.");i=e$2e(i)?i.slice():i;for(var r=t.length,o=new Array(r),a=0;a<r;++a)o[a]=bt$1(this,e,t[a],i,n,t[a]);return W$a(e,o$1l.all(o).then((function(e){for(var i=e.length,n=0;n<i;++n)t[n]=e[n];return t})))},d$g.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()},Object.defineProperties(M$a.prototype,{type:{get:function(){return"Polygon"}},positions:{get:function(){return this._positions},set:function(e){if(e$2e(e)){this._positions=e;var t=U$18.fromPositions({positions:this._positions,perPositionHeight:!0});this._geometry=U$18.createGeometry(t),this._triangleArrayByWeight=S$7(this),this.boundingSphere=i$1d.fromPoints(e),e$2e(this.owner)&&(this.owner._updateParticlePool=!0)}}},density:{set:function(e){e!==this._density&&(this._density=e,e$2e(this.owner)&&(this.owner._updateParticlePool=!0))},get:function(){return this._density}},areaFactor:{get:function(){return this._density*this._area/100|0}}});var l$c=new o$1p,_$b=new o$1p,x$9=new o$1p;function S$7(e){var t,i,n=e._geometry,r=n.indices,o=r.length/3,a=n.attributes.position.values,s=[],l=0;for(t=0;t<o;t++){var u=r[3*t],c=r[3*t+1],h=r[3*t+2];l$c.x=a[3*u],l$c.y=a[3*u+1],l$c.z=a[3*u+2],_$b.x=a[3*c],_$b.y=a[3*c+1],_$b.z=a[3*c+2],x$9.x=a[3*h],x$9.y=a[3*h+1],x$9.z=a[3*h+2];var d=j$9(l$c,_$b,x$9);l+=d,s.push(d)}e._area=l;var f=Math.max(100,10*o),p=[];for(t=0;t<o;t++){var _=Math.floor(s[t]/l*f);for(_=Math.max(1,_),i=0;i<_;i++)p.push(t)}return p}var b$f=new o$1p,W$9=new o$1p,z$7=new o$1p;function j$9(e,t,i){return b$f=o$1p.subtract(t,e,b$f),W$9=o$1p.subtract(i,e,W$9),z$7=o$1p.cross(b$f,W$9,z$7),.5*o$1p.magnitude(z$7)}function C$b(e,t,i,n,r){return(1-Math.sqrt(e))*i+Math.sqrt(e)*(1-t)*n+Math.sqrt(e)*t*r}M$a.prototype.emit=function(e){if(e$2e(this._geometry)){var t=Math.floor(e$2d.randomBetween(0,this._triangleArrayByWeight.length)),i=this._triangleArrayByWeight[t],n=this._geometry.indices[3*i],r=this._geometry.indices[3*i+1],o=this._geometry.indices[3*i+2],a=this._geometry.attributes.position.values,s=a[3*n],l=a[3*n+1],u=a[3*n+2],c=a[3*r],h=a[3*r+1],d=a[3*r+2],f=a[3*o],p=a[3*o+1],_=a[3*o+2],m=e$2d.randomBetween(0,1),g=e$2d.randomBetween(0,1),x=C$b(m,g,s,c,f),y=C$b(m,g,l,h,p),v=C$b(m,g,u,d,_);e.position=o$1p.fromElements(x,y,v,e.position),e.velocity=o$1p.normalize(e.position,e.velocity)}};var b$e="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\ncolor /= texture2D(autoExposure, vec2(0.5)).r;\n#endif\nfloat g = 0.985;\nfloat a = 0.065;\nfloat b = 0.0001;\nfloat c = 0.433;\nfloat d = 0.238;\ncolor = (color * (color + a) - b) / (color * (g * color + c) + d);\ncolor = clamp(color, 0.0, 1.0);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",A$e="uniform sampler2D randomTexture;\nuniform sampler2D depthTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\nvarying vec2 v_textureCoordinates;\nvec4 clipToEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\nposEC = posEC / posEC.w;\nreturn posEC;\n}\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\nvec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\nvec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\nvec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\nvec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\nvec3 up = posInCamera.xyz - posInCameraUp.xyz;\nvec3 down = posInCameraDown.xyz - posInCamera.xyz;\nvec3 left = posInCamera.xyz - posInCameraLeft.xyz;\nvec3 right = posInCameraRight.xyz - posInCamera.xyz;\nvec3 DX = length(left) < length(right) ? left : right;\nvec3 DY = length(up) < length(down) ? up : down;\nreturn normalize(cross(DY, DX));\n}\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\nvec4 posInCamera = clipToEye(v_textureCoordinates, depth);\nif (posInCamera.z > frustumLength)\n{\ngl_FragColor = vec4(1.0);\nreturn;\n}\nvec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\nfloat depthU = czm_readDepth(depthTexture, v_textureCoordinates - vec2(0.0, pixelSize.y));\nfloat depthD = czm_readDepth(depthTexture, v_textureCoordinates + vec2(0.0, pixelSize.y));\nfloat depthL = czm_readDepth(depthTexture, v_textureCoordinates - vec2(pixelSize.x, 0.0));\nfloat depthR = czm_readDepth(depthTexture, v_textureCoordinates + vec2(pixelSize.x, 0.0));\nvec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\nfloat ao = 0.0;\nvec2 sampleDirection = vec2(1.0, 0.0);\nfloat gapAngle = 90.0 * czm_radiansPerDegree;\nfloat randomVal = texture2D(randomTexture, v_textureCoordinates).x;\nfor (int i = 0; i < 4; i++)\n{\nfloat newGapAngle = gapAngle * (float(i) + randomVal);\nfloat cosVal = cos(newGapAngle);\nfloat sinVal = sin(newGapAngle);\nvec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\nfloat localAO = 0.0;\nfloat localStepSize = stepSize;\nfor (int j = 0; j < 6; j++)\n{\nvec2 newCoords = v_textureCoordinates + rotatedSampleDirection * localStepSize * pixelSize;\nif(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n{\nbreak;\n}\nfloat stepDepthInfo = czm_readDepth(depthTexture, newCoords);\nvec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\nvec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\nfloat len = length(diffVec);\nif (len > lengthCap)\n{\nbreak;\n}\nfloat dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\nfloat weight = len / lengthCap;\nweight = 1.0 - weight * weight;\nif (dotVal < bias)\n{\ndotVal = 0.0;\n}\nlocalAO = max(localAO, dotVal * weight);\nlocalStepSize += stepSize;\n}\nao += localAO;\n}\nao /= 4.0;\nao = 1.0 - clamp(ao, 0.0, 1.0);\nao = pow(ao, intensity);\ngl_FragColor = vec4(vec3(ao), 1.0);\n}\n",T$d="uniform sampler2D colorTexture;\nuniform sampler2D ambientOcclusionTexture;\nuniform bool ambientOcclusionOnly;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 color = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 ao = texture2D(ambientOcclusionTexture, v_textureCoordinates).rgb;\ngl_FragColor.rgb = ambientOcclusionOnly ? ao : ao * color;\n}\n",w$7="uniform sampler2D colorTexture;\nuniform float gradations;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n#ifdef CZM_SELECTED_FEATURE\nif (czm_selected()) {\ngl_FragColor = vec4(rgb, 1.0);\nreturn;\n}\n#endif\nfloat luminance = czm_luminance(rgb);\nfloat darkness = luminance * gradations;\ndarkness = (darkness - fract(darkness)) / gradations;\ngl_FragColor = vec4(vec3(darkness), 1.0);\n}\n",z$6="uniform sampler2D colorTexture;\nuniform sampler2D bloomTexture;\nuniform bool glowOnly;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\n#ifdef CZM_SELECTED_FEATURE\nif (czm_selected()) {\ngl_FragColor = color;\nreturn;\n}\n#endif\nvec4 bloom = texture2D(bloomTexture, v_textureCoordinates);\ngl_FragColor = glowOnly ? bloom : bloom + color;\n}\n",E$a="uniform sampler2D colorTexture;\nuniform float brightness;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 target = vec3(0.0);\ngl_FragColor = vec4(mix(target, rgb, brightness), 1.0);\n}\n",C$a="uniform sampler2D colorTexture;\nuniform float contrast;\nuniform float brightness;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 sceneColor = texture2D(colorTexture, v_textureCoordinates).xyz;\nsceneColor = czm_RGBToHSB(sceneColor);\nsceneColor.z += brightness;\nsceneColor = czm_HSBToRGB(sceneColor);\nfloat factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));\nsceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);\ngl_FragColor = vec4(sceneColor, 1.0);\n}\n",F$a="uniform sampler2D colorTexture;\nuniform sampler2D blurTexture;\nuniform sampler2D depthTexture;\nuniform float focalDistance;\nvarying vec2 v_textureCoordinates;\nvec4 toEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\nposInCamera = posInCamera / posInCamera.w;\nreturn posInCamera;\n}\nfloat computeDepthBlur(float depth)\n{\nfloat f;\nif (depth < focalDistance)\n{\nf = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);\n}\nelse\n{\nf = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);\nf = pow(f, 0.1);\n}\nf *= f;\nf = clamp(f, 0.0, 1.0);\nreturn pow(f, 0.5);\n}\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\nvec4 posInCamera = toEye(v_textureCoordinates, depth);\nfloat d = computeDepthBlur(-posInCamera.z);\ngl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), texture2D(blurTexture, v_textureCoordinates), d);\n}\n",R$9="uniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\ngl_FragColor = vec4(vec3(depth), 1.0);\n}\n",P$b="uniform sampler2D depthTexture;\nuniform float length;\nuniform vec4 color;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nfloat directions[3];\ndirections[0] = -1.0;\ndirections[1] = 0.0;\ndirections[2] = 1.0;\nfloat scalars[3];\nscalars[0] = 3.0;\nscalars[1] = 10.0;\nscalars[2] = 3.0;\nfloat padx = czm_pixelRatio / czm_viewport.z;\nfloat pady = czm_pixelRatio / czm_viewport.w;\n#ifdef CZM_SELECTED_FEATURE\nbool selected = false;\nfor (int i = 0; i < 3; ++i)\n{\nfloat dir = directions[i];\nselected = selected || czm_selected(vec2(-padx, dir * pady));\nselected = selected || czm_selected(vec2(padx, dir * pady));\nselected = selected || czm_selected(vec2(dir * padx, -pady));\nselected = selected || czm_selected(vec2(dir * padx, pady));\nif (selected)\n{\nbreak;\n}\n}\nif (!selected)\n{\ngl_FragColor = vec4(color.rgb, 0.0);\nreturn;\n}\n#endif\nfloat horizEdge = 0.0;\nfloat vertEdge = 0.0;\nfor (int i = 0; i < 3; ++i)\n{\nfloat dir = directions[i];\nfloat scale = scalars[i];\nhorizEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;\nhorizEdge += texture2D(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;\nvertEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;\nvertEdge += texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;\n}\nfloat len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);\ngl_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);\n}\n",O$8="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\nconst float A = 0.22;\nconst float B = 0.30;\nconst float C = 0.10;\nconst float D = 0.20;\nconst float E = 0.01;\nconst float F = 0.30;\nconst float white = 11.2;\nvec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;\nfloat w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;\nc = czm_inverseGamma(c / w);\ngl_FragColor = vec4(c, fragmentColor.a);\n}\n",D$7="varying vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nvoid main()\n{\nvec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\nvec4 color = FxaaPixelShader(\nv_textureCoordinates,\ncolorTexture,\nfxaaQualityRcpFrame,\nfxaaQualitySubpix,\nfxaaQualityEdgeThreshold,\nfxaaQualityEdgeThresholdMin);\nfloat alpha = texture2D(colorTexture, v_textureCoordinates).a;\ngl_FragColor = vec4(color.rgb, alpha);\n}\n",U$8="uniform sampler2D colorTexture;\nuniform sampler2D dirtTexture;\nuniform sampler2D starTexture;\nuniform vec2 dirtTextureDimensions;\nuniform float distortion;\nuniform float ghostDispersal;\nuniform float haloWidth;\nuniform float dirtAmount;\nuniform float earthRadius;\nuniform float intensity;\nvarying vec2 v_textureCoordinates;\n#define DISTANCE_TO_SPACE 6500000.0\nvec4 getNDCFromWC(vec3 WC, float earthRadius)\n{\nvec4 positionEC = czm_view * vec4(WC, 1.0);\npositionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);\nvec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\nreturn czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n}\nfloat isInEarth(vec2 texcoord, vec2 sceneSize)\n{\nvec2 NDC = texcoord * 2.0 - 1.0;\nvec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);\nvec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);\nNDC.xy -= earthPosSC.xy;\nfloat X = abs(NDC.x) * sceneSize.x;\nfloat Y = abs(NDC.y) * sceneSize.y;\nreturn clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));\n}\nvec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)\n{\nvec2 sceneSize = czm_viewport.zw;\nvec3 color;\nif(isSpace)\n{\ncolor.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture2D(tex, texcoord + direction * distortion.r).r;\ncolor.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture2D(tex, texcoord + direction * distortion.g).g;\ncolor.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture2D(tex, texcoord + direction * distortion.b).b;\n}\nelse\n{\ncolor.r = texture2D(tex, texcoord + direction * distortion.r).r;\ncolor.g = texture2D(tex, texcoord + direction * distortion.g).g;\ncolor.b = texture2D(tex, texcoord + direction * distortion.b).b;\n}\nreturn vec4(clamp(color, 0.0, 1.0), 0.0);\n}\nvoid main(void)\n{\nvec4 originalColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 rgb = originalColor.rgb;\nbool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;\nvec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);\nvec4 sunPositionEC = czm_view * sunPos;\nvec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);\nsunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);\nif(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))\n{\ngl_FragColor = originalColor;\nreturn;\n}\nvec2 texcoord = vec2(1.0) - v_textureCoordinates;\nvec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\nvec2 invPixelSize = 1.0 / pixelSize;\nvec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);\nvec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;\nvec3 direction = normalize(vec3(ghostVec, 0.0));\nvec4 result = vec4(0.0);\nvec4 ghost = vec4(0.0);\nfor (int i = 0; i < 4; ++i)\n{\nvec2 offset = fract(texcoord + ghostVec * float(i));\nghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);\n}\nresult += ghost;\nvec2 haloVec = normalize(ghostVec) * haloWidth;\nfloat weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\nweightForHalo = pow(1.0 - weightForHalo, 5.0);\nresult += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;\nvec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;\nif (dirtTexCoords.x > 1.0)\n{\ndirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);\n}\nif (dirtTexCoords.y > 1.0)\n{\ndirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);\n}\nresult += dirtAmount * texture2D(dirtTexture, dirtTexCoords);\nfloat camrot = czm_view[0].z + czm_view[1].y;\nfloat cosValue = cos(camrot);\nfloat sinValue = sin(camrot);\nmat3 rotation = mat3(\ncosValue, -sinValue, 0.0,\nsinValue, cosValue, 0.0,\n0.0, 0.0, 1.0\n);\nvec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);\nvec3 st2 = vec3((rotation * st1).xy, 1.0);\nvec3 st3 = st2 * 0.5 + vec3(0.5);\nvec2 lensStarTexcoord = st3.xy;\nfloat weightForLensFlare = length(vec3(sunPos.xy, 0.0));\nfloat oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);\nif (!isSpace)\n{\nresult *= oneMinusWeightForLensFlare * intensity * 0.2;\n}\nelse\n{\nresult *= oneMinusWeightForLensFlare * intensity;\nresult *= texture2D(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;\n}\nresult += texture2D(colorTexture, v_textureCoordinates);\ngl_FragColor = result;\n}\n",I$7="uniform sampler2D colorTexture;\nuniform vec3 white;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\ncolor = (color * (1.0 + color / white)) / (1.0 + color);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",X$7="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nfloat rand(vec2 co)\n{\nreturn fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);\n}\nvoid main(void)\n{\nfloat noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 green = vec3(0.0, 1.0, 0.0);\ngl_FragColor = vec4((noiseValue + rgb) * green, 1.0);\n}\n",Y$5="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\ncolor = color / (1.0 + color);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",M$9="uniform sampler2D colorTexture;\nuniform sampler2D silhouetteTexture;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec4 silhouetteColor = texture2D(silhouetteTexture, v_textureCoordinates);\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\ngl_FragColor = mix(color, silhouetteColor, silhouetteColor.a);\n}\n",G$a="uniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nuniform float scale;\nvoid main ()\n{\nvec4 oriColor = texture2D(colorTexture, v_textureCoordinates);\nvec4 fogColor = vec4(0.8, 0.8, 0.8, 0.5);\nfloat depth = texture2D(depthTexture, v_textureCoordinates).r;\nfloat f = (depth - 0.7) * min(1.0, max(scale, 0.0)) / 0.2;\ngl_FragColor = mix(oriColor, fogColor, clamp(f, 0.0, 1.0));\n}\n",j$8="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nuniform float speed;\nuniform float angle;\nfloat hash(float x){\nreturn fract(sin(x * 133.3) * 13.13);\n}\nvoid main(void){\nfloat time = czm_frameNumber / 60.0;\nvec2 resolution = czm_viewport.zw;\nvec2 uv = (gl_FragCoord.xy * 2.0 - resolution.xy) / min(resolution.x, resolution.y);\nvec3 c = vec3(0.6, 0.7, 0.8);\nfloat a = angle;\nfloat si = sin(a);\nfloat co = cos(a);\nuv *= mat2(co, -si, si, co);\nuv *= length(uv + vec2(0.0, 4.9)) * 0.3 + 1.0;\nfloat v = 1.0 - sin(hash(floor(uv.x * 100.0)) * 2.0);\nfloat b = clamp(abs(sin(speed * time * v + uv.y * (5.0 / (2.0 + v)))) - 0.95, 0.0, 1.0) * 20.0;\nc *= v * b;\ngl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c, 1.0), speed < 0.00001 ? 0.0 : 0.15);\n}\n",V$9="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nuniform int density;\nuniform float speed;\nuniform float angle;\nfloat snow(vec2 uv, float scale)\n{\nfloat time = czm_frameNumber / 60.0;\nfloat w = smoothstep(1.0 , 0.0, -uv.y * (scale / 10.0));\nif(w < 0.1) return 0.0;\nuv += time / scale;\nuv.y += time * cos(angle) * speed / scale;\nuv.x += sin(uv.y + time * sin(angle) * speed) / scale;\nuv *= scale;\nvec2 s = floor(uv);\nvec2 f = fract(uv);\nvec2 p;\nfloat k = 3.0;\nfloat d;\np = 0.5 + 0.35 * sin(11.0 * fract(sin((s + p + scale) * mat2(7, 3, 6, 5)) * 5.0)) - f;\nd = length(p);\nk = min(d, k);\nk = smoothstep(0.0, k, sin(f.x + f.y) * 0.01);\nreturn k * w * clamp(float(density) / 5.0, 1.0, 5.0);\n}\nvoid main(void){\nvec2 resolution = czm_viewport.zw;\nvec2 uv = (gl_FragCoord.xy * 2.0 - resolution.xy) / min(resolution.x, resolution.y);\nvec3 finalColor = vec3(0);\nfloat c = 0.0;\nfor (int i = 2; i < 5; i++) {\nif (density < i) {\nbreak;\n}\nc += snow(uv, float(i));\n}\nfor (int i = 6; i < 10; i+= 2) {\nif (density < i) {\nbreak;\n}\nc += snow(uv, float(i));\n}\nfor (int i = 15; i < 30; i+= 5) {\nif (density < i) {\nbreak;\n}\nc += snow(uv, float(i));\n}\nfinalColor = vec3(c);\nif(c > 0.8)\n{\nfinalColor = vec3(max(5.0, c));\n}\ngl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor, 1.0), 0.15);\n}\n",W$8="#define SMOOTH_STEPS 5\n#define REFLECTION_SAMPLES 64\n#define RIGHT_HANDED_SCENE\nuniform sampler2D colorTexture;\nuniform sampler2D reflectivitySampler;\nuniform sampler2D normalSampler;\nuniform sampler2D positionSampler;\nuniform float stepSize;\nuniform float strength;\nuniform float threshold;\nuniform float roughnessFactor;\nuniform float reflectionSpecularFalloffExponent;\nvarying vec2 v_textureCoordinates;\nstruct ReflectionInfo {\nvec3 color;\nvec4 coords;\n};\nvec3 fresnelSchlick(float cosTheta, vec3 F0)\n{\nreturn F0 + (1.0 - F0) * pow(1.0 - cosTheta, 5.0);\n}\nReflectionInfo smoothReflectionInfo(vec3 dir, vec3 hitCoord)\n{\nReflectionInfo info;\ninfo.color = vec3(0.0);\nvec4 projectedCoord;\nfloat sampledDepth;\nfor(int i = 0; i < SMOOTH_STEPS; i++)\n{\nprojectedCoord = czm_projection * vec4(hitCoord, 1.0);\nprojectedCoord.xy /= projectedCoord.w;\nprojectedCoord.xy = 0.5 * projectedCoord.xy + vec2(0.5);\nsampledDepth = (czm_view * texture2D(positionSampler, projectedCoord.xy)).z;\nfloat depth = sampledDepth - hitCoord.z;\ndir *= 0.5;\nif(depth > 0.0)\nhitCoord -= dir;\nelse\nhitCoord += dir;\ninfo.color += texture2D(colorTexture, projectedCoord.xy).rgb;\n}\nprojectedCoord = czm_projection * vec4(hitCoord, 1.0);\nprojectedCoord.xy /= projectedCoord.w;\nprojectedCoord.xy = 0.5 * projectedCoord.xy + vec2(0.5);\ninfo.coords = vec4(projectedCoord.xy, sampledDepth, 1.0);\ninfo.color += texture2D(colorTexture, projectedCoord.xy).rgb;\ninfo.color /= float(SMOOTH_STEPS + 1);\nreturn info;\n}\nReflectionInfo getReflectionInfo(vec3 dir, vec3 hitCoord)\n{\nvec3 endPos = hitCoord + dir;\nvec4 projetedEndPos = czm_projection * vec4(endPos, 1.0);\nprojetedEndPos/= projetedEndPos.w;\nprojetedEndPos.xyz = 0.5 * projetedEndPos.xyz + vec3(0.5);\nvec4 projectedStartPos = czm_projection * vec4(hitCoord, 1.0);\nprojectedStartPos /= projectedStartPos.w;\nprojectedStartPos.xyz = 0.5 * projectedStartPos.xyz + vec3(0.5);\nvec4 projectedDir = projetedEndPos - projectedStartPos;\nfloat step = 1.0 / length(projectedDir.xyz);\nReflectionInfo info;\nvec4 projectedCoord;\nfloat sampledDepth;\nfloat stepOffset = (v_textureCoordinates * czm_viewport.zw, 1.0) * step;\ndir *= stepOffset * stepSize;\nbool found = false;\nfor(int i = 0; i < REFLECTION_SAMPLES; i++)\n{\nhitCoord += dir;\nprojectedCoord = czm_projection * vec4(hitCoord, 1.0);\nprojectedCoord.xy /= projectedCoord.w;\nprojectedCoord.xy = 0.5 * projectedCoord.xy + vec2(0.5);\nsampledDepth = texture2D(positionSampler, projectedCoord.xy).z;\nfloat depth = sampledDepth - hitCoord.z;\n#ifdef RIGHT_HANDED_SCENE\ndepth *= -1.0;\n#endif\nvec3 curColor = texture2D(colorTexture, vec2(projectedCoord.x, projectedCoord.y)).rgb;\nvec4 curCoords = vec4(projectedCoord.xy, sampledDepth, 0.0);\nif(((depth - dir.z) < threshold) && depth <= 0.0 && !found)\n{\ninfo.color = curColor;\ninfo.coords = curCoords;\nfound = true;\n}\n}\nvec3 lastColor = texture2D(colorTexture, vec2(projectedCoord.x, projectedCoord.y)).rgb;\nvec4 lastCoords = vec4(projectedCoord.xy, sampledDepth, 0.0);\nif(!found){\ninfo.color = lastColor;\ninfo.coords = lastCoords;\n}\nreturn info;\n}\nvec3 hash(vec3 a)\n{\na = fract(a * 0.8);\na += dot(a, a.yxz + 19.19);\nreturn fract((a.xxy + a.yxx) * a.zyx);\n}\nvoid main(void){\nvec4 albedoFull = texture2D(colorTexture, v_textureCoordinates);\nvec3 albedo = albedoFull.rgb;\nfloat spec = texture2D(reflectivitySampler, v_textureCoordinates).r;\nfloat isSpecValid = 1.0;\nif (spec == 0.0) {\nisSpecValid = 0.0;\n}\nvec3 normal = (texture2D(normalSampler, v_textureCoordinates)).xyz;\nvec3 position = texture2D(positionSampler, v_textureCoordinates).xyz;\nvec3 reflected = normalize(reflect(normalize(position), normalize(normal)));\nfloat roughness = 1.0 - texture2D(reflectivitySampler, v_textureCoordinates).a;\nvec3 jitt = mix(vec3(0.0), hash(position), roughness) * roughnessFactor;\nReflectionInfo info = getReflectionInfo(jitt + reflected, position);\nvec2 dCoords = smoothstep(0.2, 0.6, abs(vec2(0.5, 0.5) - info.coords.xy));\nfloat screenEdgefactor = clamp(1.0 - (dCoords.x + dCoords.y), 0.0, 1.0);\nvec3 F0 = vec3(0.04);\nF0 = mix(F0, albedo, spec);\nvec3 fresnel = fresnelSchlick(max(dot(normalize(normal), normalize(position)), 0.0), F0);\n#ifdef RIGHT_HANDED_SCENE\nreflected.z *= -1.0;\n#endif\nfloat reflectionMultiplier = clamp(pow(spec * strength, reflectionSpecularFalloffExponent) * screenEdgefactor * reflected.z, 0.0, 0.9);\nfloat albedoMultiplier = 1.0 - reflectionMultiplier;\nvec3 SSR = info.color * fresnel;\ngl_FragColor = vec4((albedo * albedoMultiplier) + (SSR.xyz * reflectionMultiplier), 1.0);\n}\n",H$c="uniform sampler2D screenSpaceReflectionTexture;\nuniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec4 albedoFull = texture2D(colorTexture, v_textureCoordinates);\nvec3 albedo = albedoFull.rgb;\nvec4 SSR = texture2D(screenSpaceReflectionTexture, v_textureCoordinates);\nfloat reflectionMultiplier = SSR.a;\nfloat albedoMultiplier = 1.0 - reflectionMultiplier;\ngl_FragColor = vec4((albedo * albedoMultiplier) + (SSR.xyz * reflectionMultiplier), albedoFull.a);\n}\n",i$b={};function S$6(e){var t="#define USE_STEP_SIZE\n"+y$M,i=new p$h({name:e+"_x_direction",fragmentShader:t,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:e$j.LINEAR}),n=new p$h({name:e+"_y_direction",fragmentShader:t,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:e$j.LINEAR}),r={};return Object.defineProperties(r,{delta:{get:function(){return i.uniforms.delta},set:function(e){var t=i.uniforms,r=n.uniforms;t.delta=r.delta=e}},sigma:{get:function(){return i.uniforms.sigma},set:function(e){var t=i.uniforms,r=n.uniforms;t.sigma=r.sigma=e}},stepSize:{get:function(){return i.uniforms.stepSize},set:function(e){var t=i.uniforms,r=n.uniforms;t.stepSize=r.stepSize=e}}}),new s$f({name:e,stages:[i,n],uniforms:r})}function K$6(e){if(!e$2e(e))return i$b.createEdgeDetectionStage();for(var t=new s$f({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),i={},n="",r="",o=0;o<e.length;++o)n+="uniform sampler2D edgeTexture"+o+"; \n",r+=" vec4 edge"+o+" = texture2D(edgeTexture"+o+", v_textureCoordinates); \n if (edge"+o+".a > 0.0) \n { \n color = edge"+o+"; \n break; \n } \n",i["edgeTexture"+o]=e[o].name;return new s$f({name:"czm_edge_detection_composite",stages:[t,new p$h({name:"czm_edge_detection_combine",fragmentShader:n+"varying vec2 v_textureCoordinates; \nvoid main() { \n vec4 color = vec4(0.0); \n for (int i = 0; i < "+e.length+"; i++) \n { \n"+r+" } \n gl_FragColor = color; \n} \n",uniforms:i})]})}i$b.createBlurStage=function(){return S$6("czm_blur")},i$b.createDepthOfFieldStage=function(){var e=S$6("czm_depth_of_field_blur"),t=new p$h({name:"czm_depth_of_field_composite",fragmentShader:F$a,uniforms:{focalDistance:5,blurTexture:e.name}}),i={};return Object.defineProperties(i,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(e){t.uniforms.focalDistance=e}},delta:{get:function(){return e.uniforms.delta},set:function(t){e.uniforms.delta=t}},sigma:{get:function(){return e.uniforms.sigma},set:function(t){e.uniforms.sigma=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}}}),new s$f({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:i})},i$b.isDepthOfFieldSupported=function(e){return e.context.depthTexture},i$b.createEdgeDetectionStage=function(){return new p$h({name:"czm_edge_detection_"+e$1T(),fragmentShader:P$b,uniforms:{length:.25,color:e$1X.clone(e$1X.BLACK)}})},i$b.isEdgeDetectionSupported=function(e){return e.context.depthTexture},i$b.createSilhouetteStage=function(e){var t=K$6(e);return new s$f({name:"czm_silhouette",stages:[t,new p$h({name:"czm_silhouette_color_edges",fragmentShader:M$9,uniforms:{silhouetteTexture:t.name}})],inputPreviousStageTexture:!1,uniforms:t.uniforms})},i$b.isSilhouetteSupported=function(e){return e.context.depthTexture},i$b.createBloomStage=function(){var e=new p$h({name:"czm_bloom_contrast_bias",fragmentShader:C$a,uniforms:{contrast:128,brightness:-.3}}),t=S$6("czm_bloom_blur"),i=new s$f({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),n=new p$h({name:"czm_bloom_generate_composite",fragmentShader:z$6,uniforms:{glowOnly:!1,bloomTexture:i.name}}),r={};return Object.defineProperties(r,{glowOnly:{get:function(){return n.uniforms.glowOnly},set:function(e){n.uniforms.glowOnly=e}},contrast:{get:function(){return e.uniforms.contrast},set:function(t){e.uniforms.contrast=t}},brightness:{get:function(){return e.uniforms.brightness},set:function(t){e.uniforms.brightness=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}}}),new s$f({name:"czm_bloom",stages:[i,n],inputPreviousStageTexture:!1,uniforms:r})},i$b.createAmbientOcclusionStage=function(){var e=new p$h({name:"czm_ambient_occlusion_generate",fragmentShader:A$e,uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=S$6("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;var i=new s$f({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),n=new p$h({name:"czm_ambient_occlusion_composite",fragmentShader:T$d,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:i.name}}),r={};return Object.defineProperties(r,{intensity:{get:function(){return e.uniforms.intensity},set:function(t){e.uniforms.intensity=t}},bias:{get:function(){return e.uniforms.bias},set:function(t){e.uniforms.bias=t}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(t){e.uniforms.lengthCap=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}},frustumLength:{get:function(){return e.uniforms.frustumLength},set:function(t){e.uniforms.frustumLength=t}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(t){e.uniforms.randomTexture=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},blurStepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}},ambientOcclusionOnly:{get:function(){return n.uniforms.ambientOcclusionOnly},set:function(e){n.uniforms.ambientOcclusionOnly=e}}}),new s$f({name:"czm_ambient_occlusion",stages:[i,n],inputPreviousStageTexture:!1,uniforms:r})},i$b.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var Z$8="#define FXAA_QUALITY_PRESET 39 \n#define FXAA_QUALITY_PS 12 \n#define FXAA_QUALITY_P0 1.0 \n#define FXAA_QUALITY_P1 1.0 \n#define FXAA_QUALITY_P2 1.0 \n#define FXAA_QUALITY_P3 1.0 \n#define FXAA_QUALITY_P4 1.0 \n#define FXAA_QUALITY_P5 1.5 \n#define FXAA_QUALITY_P6 2.0 \n#define FXAA_QUALITY_P7 2.0 \n#define FXAA_QUALITY_P8 2.0 \n#define FXAA_QUALITY_P9 2.0 \n#define FXAA_QUALITY_P10 4.0 \n#define FXAA_QUALITY_P11 8.0 \n"+k$K+"\n"+D$7,q$9=L$U;i$b.createFXAAStage=function(e){return new p$h({name:"czm_FXAA",fragmentShader:e.webgpu?q$9:Z$8,sampleMode:e$j.LINEAR})},i$b.createSnowStage=function(){return new p$h({name:"czm_SnowEffect",fragmentShader:V$9,uniforms:{density:5,angle:.1,speed:2},sampleMode:e$j.LINEAR})},i$b.createRainStage=function(){return new p$h({name:"czm_RainEffect",fragmentShader:j$8,uniforms:{speed:20,angle:-.4},sampleMode:e$j.LINEAR})},i$b.createFogStage=function(){return new p$h({name:"czm_FogEffect",fragmentShader:G$a,uniforms:{scale:1},sampleMode:e$j.LINEAR})},i$b.createAcesTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_aces",fragmentShader:t+=b$e,uniforms:{autoExposure:void 0}})},i$b.createFilmicTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_filmic",fragmentShader:t+=O$8,uniforms:{autoExposure:void 0}})},i$b.createReinhardTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_reinhard",fragmentShader:t+=Y$5,uniforms:{autoExposure:void 0}})},i$b.createModifiedReinhardTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return new p$h({name:"czm_modified_reinhard",fragmentShader:t+=I$7,uniforms:{white:e$1X.WHITE,autoExposure:void 0}})},i$b.createAutoExposureStage=function(){return new a$h},i$b.createBlackAndWhiteStage=function(){return new p$h({name:"czm_black_and_white",fragmentShader:w$7,uniforms:{gradations:5}})},i$b.createBrightnessStage=function(){return new p$h({name:"czm_brightness",fragmentShader:E$a,uniforms:{brightness:.5}})},i$b.createNightVisionStage=function(){return new p$h({name:"czm_night_vision",fragmentShader:X$7})},i$b.createDepthViewStage=function(){return new p$h({name:"czm_depth_view",fragmentShader:R$9})},i$b.createLensFlareStage=function(){return new p$h({name:"czm_lens_flare",fragmentShader:U$8,uniforms:{dirtTexture:n$17("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:n$17("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,earthRadius:t$12.WGS84.maximumRadius}})},i$b.createOutlineStage=function(){var e=new p$h({name:"outline_copy",fragmentShader:ie$7}),t=new p$h({name:"outline_downSample",fragmentShader:["varying vec2 v_textureCoordinates;","void main()","{","gl_FragColor = texture2D(czm_maskTexture, v_textureCoordinates);","}"].join("\n"),textureScale:.5}),i=new p$h({name:"outline_edgeDetection",fragmentShader:["varying vec2 v_textureCoordinates;","uniform sampler2D colorTexture;","uniform vec2 colorTextureDimensions;","uniform vec3 visibleEdgeColor;","uniform vec3 hiddenEdgeColor;","void main() {","vec2 invSize = 1.0 / vec2(colorTextureDimensions.x, colorTextureDimensions.y);","vec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize);","vec4 c1 = texture2D( colorTexture, v_textureCoordinates + uvOffset.xy);","vec4 c2 = texture2D( colorTexture, v_textureCoordinates - uvOffset.xy);","vec4 c3 = texture2D( colorTexture, v_textureCoordinates + uvOffset.yw);","vec4 c4 = texture2D( colorTexture, v_textureCoordinates - uvOffset.yw);","float diff1 = (c1.r - c2.r)*0.5;","float diff2 = (c3.r - c4.r)*0.5;","float d = length( vec2(diff1, diff2) );","float a1 = min(c1.g, c2.g);","float a2 = min(c3.g, c4.g);","float visibilityFactor = min(a1, a2);","vec3 edgeColor = 1.0 - visibilityFactor > 0.001 ? visibleEdgeColor : hiddenEdgeColor;","gl_FragColor = vec4(edgeColor,1.0) * vec4(d);","}"].join("\n"),textureScale:.5,uniforms:{visibleEdgeColor:new e$1X(1,1,1),hiddenEdgeColor:new e$1X(.1,.04,.02)},sampleMode:e$j.LINEAR});i.visibleEdgeColor=new e$1X,i.hiddenEdgeColor=new e$1X;var n=["varying vec2 v_textureCoordinates;","uniform sampler2D colorTexture;","uniform vec2 colorTextureDimensions;","uniform vec2 direction;","uniform float kernelRadius;","float gaussianPdf(in float x, in float sigma) {","return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;","}","void main() {","vec2 invSize = 1.0 / colorTextureDimensions;","float weightSum = gaussianPdf(0.0, kernelRadius);","vec3 diffuseSum = texture2D( colorTexture, v_textureCoordinates).rgb * weightSum;","vec2 delta = direction * invSize * kernelRadius/float(4);","vec2 uvOffset = delta;","for( int i = 1; i <= 4; i ++ ) {","float w = gaussianPdf(uvOffset.x, kernelRadius);","vec3 sample1 = texture2D( colorTexture, v_textureCoordinates + uvOffset).rgb;","vec3 sample2 = texture2D( colorTexture, v_textureCoordinates - uvOffset).rgb;","diffuseSum += ((sample1 + sample2) * w);","weightSum += (2.0 * w);","uvOffset += delta;","}","gl_FragColor = vec4(diffuseSum/weightSum, 1.0);","}"].join("\n"),r=new p$h({name:"outline_blurHalf_X",fragmentShader:n,textureScale:.5,uniforms:{direction:{x:1,y:0},kernelRadius:1},sampleMode:e$j.LINEAR}),o=new p$h({name:"outline_blurHalf_Y",fragmentShader:n,textureScale:.5,uniforms:{direction:{x:0,y:1},kernelRadius:1},sampleMode:e$j.LINEAR}),a=new p$h({name:"outline_blurQuarter_X",fragmentShader:n,textureScale:.25,uniforms:{direction:{x:1,y:0},kernelRadius:4},sampleMode:e$j.LINEAR}),s=new p$h({name:"outline_blurQuarter_Y",fragmentShader:n,textureScale:.25,uniforms:{direction:{x:0,y:1},kernelRadius:4},sampleMode:e$j.LINEAR}),l=new p$h({name:"outline_overlayStage",fragmentShader:["varying vec2 v_textureCoordinates;","uniform sampler2D edgeTexture1;","uniform sampler2D edgeTexture2;","uniform float edgeStrength;","uniform float edgeGlow;","void main() {","vec4 edgeValue1 = texture2D(edgeTexture1, v_textureCoordinates);","vec4 edgeValue2 = texture2D(edgeTexture2, v_textureCoordinates);","vec4 maskColor = texture2D(czm_maskTexture, v_textureCoordinates);","vec4 edgeValue = edgeValue1 + edgeValue2 * edgeGlow;","vec4 finalColor = edgeStrength * maskColor.r * edgeValue;","gl_FragColor = finalColor;","}"].join("\n"),uniforms:{edgeStrength:3,edgeGlow:0,edgeTexture1:"outline_blurHalf_Y",edgeTexture2:"outline_blurQuarter_Y"},blendingState:Ee$r.ADDITIVE_BLEND,sampleMode:e$j.LINEAR}),u={};return Object.defineProperties(u,{visibleEdgeColor:{get:function(){return i.uniforms.visibleEdgeColor},set:function(e){i.uniforms.visibleEdgeColor=e$1X.clone(e)}},hiddenEdgeColor:{get:function(){return i.hiddenEdgeColor},set:function(e){i.uniforms.hiddenEdgeColor=e$1X.clone(e)}},edgeStrength:{get:function(){return l.uniforms.edgeStrength},set:function(e){l.uniforms.edgeStrength=e}},edgeGlow:{get:function(){return l.uniforms.edgeGlow},set:function(e){l.uniforms.edgeGlow=e}},edgeThickness:{get:function(){return r.uniforms.kernelRadius},set:function(e){r.uniforms.kernelRadius=e,o.uniforms.kernelRadius=e}}}),new s$f({name:"outline_overlay",stages:[e,t,i,r,o,a,s,l],inputPreviousStageTexture:!0,uniforms:u})},i$b.createScreenSpaceReflectionStage=function(e){var t=new p$h({name:"czm_Screen_Space_Reflection_Stage",fragmentShader:W$8,uniforms:{stepSize:1,strength:1,threshold:1.2,roughnessFactor:.2,reflectionSpecularFalloffExponent:3},sampleMode:e$j.LINEAR,prepassRenderer:e}),i=S$6("czm_Screen_Space_Reflection_blur");i.uniforms.stepSize=.35;var n=new s$f({name:"czm_Screen_Space_Reflection_Generate_blur",stages:[t,i]});new p$h({name:"czm_Screen_Space_Reflection_composite",fragmentShader:H$c,uniforms:{screenSpaceReflectionTexture:n.name},sampleMode:e$j.LINEAR,prepassRenderer:e});var r={};return Object.defineProperties(r,{stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}},strength:{get:function(){return t.uniforms.strength},set:function(e){t.uniforms.strength=e}},threshold:{get:function(){return t.uniforms.threshold},set:function(e){t.uniforms.threshold=e}},roughnessFactor:{get:function(){return t.uniforms.roughnessFactor},set:function(e){t.uniforms.roughnessFactor=e}},reflectionSpecularFalloffExponent:{get:function(){return t.uniforms.reflectionSpecularFalloffExponent},set:function(e){t.uniforms.reflectionSpecularFalloffExponent=e}}}),new s$f({name:"czm_Screen_Space_Reflection",stages:[t],inputPreviousStageTexture:!1,uniforms:r})};var I$6={REINHARD:0,MODIFIED_REINHARD:1,FILMIC:2,ACES:3,validate:function(e){return e===I$6.REINHARD||e===I$6.MODIFIED_REINHARD||e===I$6.FILMIC||e===I$6.ACES}},M$8=Object.freeze(I$6),T$c="precision highp float;\nprecision highp int;\nattribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvoid SMAAEdgeDetectionVS(vec2 texcoord) {\nfOffset[0] = texcoord.xyxy + u_resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );\nfOffset[1] = texcoord.xyxy + u_resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );\nfOffset[2] = texcoord.xyxy + u_resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 );\n}\nvoid main()\n{\ngl_Position = aPosition;\nv_textureCoordinates = textureCoordinates;\nSMAAEdgeDetectionVS(textureCoordinates);\n}\n",z$5="precision highp float;\nprecision highp int;\n#define SMAA_THRESHOLD 0.05\n#define SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR 2\n#define SMAA_USE_COLOR_EDGE_DETECTION 1\nuniform sampler2D inputColorTexture;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3]) {\nvec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );\nvec4 delta;\nvec3 C = texture2D( inputColorTexture, texcoord ).rgb;\nvec3 Cleft = texture2D( inputColorTexture, offset[0].xy ).rgb;\nvec3 t = abs( C - Cleft );\ndelta.x = max( max( t.r, t.g ), t.b );\nvec3 Ctop = texture2D( inputColorTexture, offset[0].zw ).rgb;\nt = abs( C - Ctop );\ndelta.y = max( max( t.r, t.g ), t.b );\nvec2 edges = step( threshold, delta.xy );\nvec3 Cright = texture2D( inputColorTexture, offset[1].xy ).rgb;\nvec3 Cbottom = texture2D( inputColorTexture, offset[1].zw ).rgb;\nvec3 Cleftleft = texture2D( inputColorTexture, offset[2].xy ).rgb;\nvec3 Ctoptop = texture2D( inputColorTexture, offset[2].zw ).rgb;\nif ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )\ndiscard;\nt = abs( C - Cright );\ndelta.z = max( max( t.r, t.g ), t.b );\nt = abs( C - Cbottom );\ndelta.w = max( max( t.r, t.g ), t.b );\nfloat maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );\nt = abs( C - Cleftleft );\ndelta.z = max( max( t.r, t.g ), t.b );\nt = abs( C - Ctoptop );\ndelta.w = max( max( t.r, t.g ), t.b );\nmaxDelta = max( max( maxDelta, delta.z ), delta.w );\nedges.xy *= step( maxDelta, float(SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR) * delta.xy );\nreturn vec4( edges, 0.0, 0.0 );\n}\nvoid main()\n{\ngl_FragColor = SMAAColorEdgeDetectionPS( v_textureCoordinates, fOffset);\n}\n",F$9="precision highp float;\nprecision highp int;\n#define SMAA_MAX_SEARCH_STEPS 8\nattribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvarying vec2 fPixCoord;\nvoid SMAABlendingWeightCalculationVS( vec2 texcoord ) {\nfPixCoord = texcoord / u_resolution;\nfOffset[ 0 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 );\nfOffset[ 1 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 );\nfOffset[ 2 ] = vec4( fOffset[ 0 ].xz, fOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * u_resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );\n}\nvoid main()\n{\ngl_Position = aPosition;\nv_textureCoordinates = textureCoordinates;\nSMAABlendingWeightCalculationVS( textureCoordinates );\n}\n",C$9="precision highp float;\nprecision highp int;\n#define SMAA_MAX_SEARCH_STEPS 8\n#define SMAA_AREATEX_MAX_DISTANCE 16\n#define SMAA_AREATEX_PIXEL_SIZE ( 1.0 / vec2( 160.0, 560.0 ) )\n#define SMAA_AREATEX_SUBTEX_SIZE ( 1.0 / 7.0 )\nuniform sampler2D tEdges;\nuniform sampler2D tArea;\nuniform sampler2D tSearch;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[3];\nvarying vec2 fPixCoord;\nvec4 SMAASampleLevelZeroOffset(vec2 coord, ivec2 offset ){\nreturn texture2D( tEdges, coord + float( offset ) * u_resolution, 0.0 );\n}\nvec2 myRound( vec2 x ) {\nreturn sign( x ) * floor( abs( x ) + 0.5 );\n}\nfloat SMAASearchLength(vec2 e, float bias, float scale ) {\ne.r = bias + e.r * scale;\nreturn 255.0 * texture2D( tSearch, e, 0.0 ).r;\n}\nfloat SMAASearchXLeft(vec2 texcoord, float end ) {\nvec2 e = vec2( 0.0, 1.0 );\nbool found = false;\nfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\nvec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\nif(!found){\ntexcoord -= vec2( 2.0, 0.0 ) * u_resolution;\ne = pixel;\n}\nif(!found && ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 )){\nfound = true;\n}\n}\ntexcoord.x += 0.25 * u_resolution.x;\ntexcoord.x += u_resolution.x;\ntexcoord.x += 2.0 * u_resolution.x;\ntexcoord.x -= u_resolution.x * SMAASearchLength(e, 0.0, 0.5);\nreturn texcoord.x;\n}\nfloat SMAASearchXRight(vec2 texcoord, float end ) {\nvec2 e = vec2( 0.0, 1.0 );\nbool found = false;\nfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\nvec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\nif(!found){\ntexcoord += vec2( 2.0, 0.0 ) * u_resolution;\ne = pixel;\n}\nif (!found && ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) )\n{\nfound = true;\n}\n}\ntexcoord.x -= 0.25 * u_resolution.x;\ntexcoord.x -= u_resolution.x;\ntexcoord.x -= 2.0 * u_resolution.x;\ntexcoord.x += u_resolution.x * SMAASearchLength(e, 0.5, 0.5 );\nreturn texcoord.x;\n}\nfloat SMAASearchYUp(vec2 texcoord, float end ) {\nvec2 e = vec2( 1.0, 0.0 );\nbool found = false;\nfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\nvec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\nif(!found){\ntexcoord += vec2( 0.0, 2.0 ) * u_resolution;\ne = pixel;\n}\nif (!found && ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ){\nfound = true;\n}\n}\ntexcoord.y -= 0.25 * u_resolution.y;\ntexcoord.y -= u_resolution.y;\ntexcoord.y -= 2.0 * u_resolution.y;\ntexcoord.y += u_resolution.y * SMAASearchLength(e.gr, 0.0, 0.5 );\nreturn texcoord.y;\n}\nfloat SMAASearchYDown(vec2 texcoord, float end ) {\nvec2 e = vec2( 1.0, 0.0 );\nbool found = false;\nfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {\nvec2 pixel = texture2D( tEdges, texcoord, 0.0 ).rg;\nif(!found){\ntexcoord -= vec2( 0.0, 2.0 ) * u_resolution;\ne = pixel;\n}\nif (!found && ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) {\nfound = true;\n}\n}\ntexcoord.y += 0.25 * u_resolution.y;\ntexcoord.y += u_resolution.y;\ntexcoord.y += 2.0 * u_resolution.y;\ntexcoord.y -= u_resolution.y * SMAASearchLength(e.gr, 0.5, 0.5 );\nreturn texcoord.y;\n}\nvec2 SMAAArea(vec2 dist, float e1, float e2, float offset ) {\nvec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * myRound( 4.0 * vec2( e1, e2 ) ) + dist;\ntexcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );\ntexcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;\nreturn texture2D( tArea, texcoord, 0.0 ).rg;\n}\nvec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], ivec4 subsampleIndices ) {\nvec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );\nvec2 e = texture2D( tEdges, texcoord ).rg;\nvec2 weightRG = vec2(0.0, 0.0);\nvec2 weightBA = vec2(0.0, 0.0);\n{\nvec2 d;\nvec2 coords;\ncoords.x = SMAASearchXLeft(offset[ 0 ].xy, offset[ 2 ].x );\ncoords.y = offset[ 1 ].y;\nd.x = coords.x;\nfloat e1 = texture2D( tEdges, coords, 0.0 ).r;\ncoords.x = SMAASearchXRight( offset[ 0 ].zw, offset[ 2 ].y );\nd.y = coords.x;\nd = d / u_resolution.x - pixcoord.x;\nvec2 sqrt_d = sqrt( abs( d ) );\ncoords.y -= 1.0 * u_resolution.y;\nfloat e2 = SMAASampleLevelZeroOffset( coords, ivec2( 1, 0 ) ).r;\nweightRG = SMAAArea(sqrt_d, e1, e2, float( subsampleIndices.y ) );\n}\n{\nvec2 d;\nvec2 coords;\ncoords.y = SMAASearchYUp(offset[ 1 ].xy, offset[ 2 ].z );\ncoords.x = offset[ 0 ].x;\nd.x = coords.y;\nfloat e1 = texture2D( tEdges, coords, 0.0 ).g;\ncoords.y = SMAASearchYDown(offset[ 1 ].zw, offset[ 2 ].w );\nd.y = coords.y;\nd = d / u_resolution.y - pixcoord.y;\nvec2 sqrt_d = sqrt( abs( d ) );\ncoords.y -= 1.0 * u_resolution.y;\nfloat e2 = SMAASampleLevelZeroOffset( coords, ivec2( 0, 1 ) ).g;\nweightBA = SMAAArea(sqrt_d, e1, e2, float( subsampleIndices.x ) );\n}\nif ( e.g > 0.0 ) {\nweights.rg = weightRG;\n}\nif ( e.r > 0.0 ) {\nweights.ba = weightBA;\n}\nreturn weights;\n}\nvoid main()\n{\ngl_FragColor = SMAABlendingWeightCalculationPS(v_textureCoordinates, fPixCoord, fOffset, ivec4(0.0));\n}\n",P$a="precision highp float;\nprecision highp int;\nattribute vec4 aPosition;\nattribute vec2 textureCoordinates;\nuniform vec2 u_resolution;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[2];\nvoid SMAANeighborhoodBlendingVS( vec2 texcoord ) {\nfOffset[ 0 ] = texcoord.xyxy + u_resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );\nfOffset[ 1 ] = texcoord.xyxy + u_resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );\n}\nvoid main()\n{\ngl_Position = aPosition;\nv_textureCoordinates = textureCoordinates;\nSMAANeighborhoodBlendingVS(textureCoordinates);\n}\n",W$7="precision highp float;\nprecision highp int;\n#define SMAA_DEBUG_SPLIT_VIEW 0\nuniform vec2 u_resolution;\nuniform sampler2D tBlendWeights;\nuniform sampler2D tColor;\nvarying vec2 v_textureCoordinates;\nvarying vec4 fOffset[2];\nvec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 inOffset[ 2 ] ) {\nvec4 a;\na.xz = texture2D( tBlendWeights, texcoord ).xz;\na.y = texture2D( tBlendWeights, inOffset[ 1 ].zw ).g;\na.w = texture2D( tBlendWeights, inOffset[ 1 ].xy ).a;\nvec4 currentColor = texture2D( tColor, texcoord, 0.0 );\nvec2 offset;\noffset.x = a.a > a.b ? a.a : -a.b;\noffset.y = a.g > a.r ? -a.g : a.r;\nif ( abs( offset.x ) > abs( offset.y )) {\noffset.y = 0.0;\n} else {\noffset.x = 0.0;\n}\nvec4 C = currentColor;\ntexcoord += sign( offset ) * u_resolution;\nvec4 Cop = texture2D( tColor, texcoord, 0.0 );\nfloat s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );\nC.xyz = pow(C.xyz, vec3(2.2));\nCop.xyz = pow(Cop.xyz, vec3(2.2));\nvec4 mixed = mix(C, Cop, s);\nmixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));\nif ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {\nreturn currentColor;\n} else {\nreturn mixed;\n}\n}\nvoid main()\n{\ngl_FragColor = SMAANeighborhoodBlendingPS( v_textureCoordinates, fOffset);\n}\n";function i$a(){this._edgeDetectionCommand=void 0,this._weightCalculationCommand=void 0,this._neighborhoodBlendingCommand=void 0,this._upSamplePassState=new n$$,this.enabled=!1,this.ready=!0,this._inputTexture=void 0,this._edgeDetectionFBO=void 0,this._weightFBO=void 0,this._blendingFBO=void 0,this._searchTexture=void 0,this._areaTexture=void 0,this._clearCommand=new t$W({color:new e$1X(0,0,0,0)}),this._resolution=new o$1o}function j$7(){return new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})}function H$b(){return new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}Object.defineProperties(i$a.prototype,{}),i$a.prototype.execute=function(e){var t=this._clearCommand;t.framebuffer=this._edgeDetectionFBO,t.execute(e),t.framebuffer=this._weightFBO,t.execute(e),t.framebuffer=this._blendingFBO,t.execute(e),this._edgeDetectionCommand.framebuffer=this._edgeDetectionFBO,this._edgeDetectionCommand.execute(e,this._upSamplePassState),this._weightCalculationCommand.framebuffer=this._weightFBO,this._weightCalculationCommand.execute(e,this._upSamplePassState),this._neighborhoodBlendingCommand.framebuffer=this._blendingFBO,this._neighborhoodBlendingCommand.execute(e,this._upSamplePassState)};var f$b=new f$1a;i$a.prototype.update=function(e){if(this.enabled){this._context=e;var t=e.drawingBufferWidth,i=e.drawingBufferHeight;this._resolution.x=1/t,this._resolution.y=1/i;var n=this;if(!e$2e(this._searchTexture)){var r=new Image;r.src=this.getSearchTexture(),r.onload=function(){n._searchTexture=new t$U({context:e,source:this,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,flipY:!1,sampler:j$7()})}}if(!e$2e(this._areaTexture)){var o=new Image;o.src=this.getAreaTexture(),o.onload=function(){n._areaTexture=new t$U({context:e,source:this,pixelFormat:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE,flipY:!1,sampler:H$b()})}}e$2e(this._edgeDetectionCommand)||this.createCommand(e);var a=this._edgeDetectionFBO,s=e$2e(a)&&a.getColorTexture(0)||void 0;if(!e$2e(s)||s.width!==t||s.height!==i){this.createFBO(t,i,e),f$b.width=t,f$b.height=i;var l=d$1m.fromCache({viewport:f$b});this._edgeDetectionCommand.renderState=l,this._weightCalculationCommand.renderState=l,this._neighborhoodBlendingCommand.renderState=l}this._upSamplePassState.context=e}},i$a.prototype.createCommand=function(e){this._edgeDetectionCommand=e.createCustomViewportQuadCommand(T$c,z$5,{shaderProgramName:"SMAAEdgeDetection",uniformMap:{},owner:this});var t=new s$V({name:"blendingWeightCalculationFS",sources:[C$9]});e.webgl2&&t.defines.push("WEBGL2"),this._weightCalculationCommand=e.createCustomViewportQuadCommand(F$9,t,{shaderProgramName:"SMAABlendingWeightCalculation",uniformMap:{},owner:this}),this._neighborhoodBlendingCommand=e.createCustomViewportQuadCommand(P$a,W$7,{shaderProgramName:"SMAANeighborhoodBlending",uniformMap:{},owner:this}),this.createUniformMap()},i$a.prototype.createUniformMap=function(){if(e$2e(this._edgeDetectionCommand)){var e=this;this._edgeDetectionCommand.uniformMap.inputColorTexture=function(){return e._inputTexture},this._edgeDetectionCommand.uniformMap.u_resolution=function(){return e._resolution},this._weightCalculationCommand.uniformMap.tEdges=function(){return e._edgeDetectionFBO.getColorTexture(0)},this._weightCalculationCommand.uniformMap.tArea=function(){return e$2e(e._areaTexture)?e._areaTexture:e._context.defaultTexture},this._weightCalculationCommand.uniformMap.tSearch=function(){return e$2e(e._searchTexture)?e._searchTexture:e._context.defaultTexture},this._weightCalculationCommand.uniformMap.u_resolution=function(){return e._resolution},this._neighborhoodBlendingCommand.uniformMap.tColor=function(){return e._inputTexture},this._neighborhoodBlendingCommand.uniformMap.tBlendWeights=function(){return e._weightFBO.getColorTexture(0)},this._neighborhoodBlendingCommand.uniformMap.u_resolution=function(){return e._resolution}}},i$a.prototype.createFBO=function(e,t,i){e$2e(this._edgeDetectionFBO)||this.destroyFBO();var n=_$_.UNSIGNED_BYTE;this._edgeDetectionFBO=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:V$12.RGBA})]}),this._weightFBO=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:V$12.RGBA})]}),this._blendingFBO=new t$V({context:i,colorTextures:[new t$U({context:i,width:e,height:t,pixelDatatype:n,pixelFormat:V$12.RGBA})]})},i$a.prototype.setInputTexture=function(e){this._inputTexture=e},i$a.prototype.getSMAATexture=function(){return this._blendingFBO.getColorTexture(0)},i$a.prototype.isDestroyed=function(){return!1},i$a.prototype.destroyFBO=function(){this._edgeDetectionFBO=this._edgeDetectionFBO&&!this._edgeDetectionFBO.isDestroyed()&&this._edgeDetectionFBO.destroy(),this._weightFBO=this._weightFBO&&!this._weightFBO.isDestroyed()&&this._weightFBO.destroy(),this._blendingFBO=this._blendingFBO&&!this._blendingFBO.isDestroyed()&&this._blendingFBO.destroy()},i$a.prototype.destroy=function(){return this.destroyFBO(),this._edgeDetectionCommand=this._edgeDetectionCommand&&this._edgeDetectionCommand.shaderProgram&&this._edgeDetectionCommand.shaderProgram.destroy(),this._weightCalculationCommand=this._weightCalculationCommand&&this._weightCalculationCommand.shaderProgram&&this._weightCalculationCommand.shaderProgram.destroy(),this._neighborhoodBlendingCommand=this._neighborhoodBlendingCommand&&this._neighborhoodBlendingCommand.shaderProgram&&this._neighborhoodBlendingCommand.shaderProgram.destroy(),i$11(this)},i$a.prototype.getAreaTexture=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAIAAACOVPcQAACBeklEQVR42u39W4xlWXrnh/3WWvuciIzMrKxrV8/0rWbY0+SQFKcb4owIkSIFCjY9AC1BT/LYBozRi+EX+cV+8IMsYAaCwRcBwjzMiw2jAWtgwC8WR5Q8mDFHZLNHTarZGrLJJllt1W2qKrsumZWZcTvn7L3W54e1vrXX3vuciLPPORFR1XE2EomorB0nVuz//r71re/y/1eMvb4Cb3N11xV/PP/2v4UBAwJG/7H8urx6/25/Gf8O5hypMQ0EEEQwAqLfoN/Z+97f/SW+/NvcgQk4sGBJK6H7N4PFVL+K+e0N11yNfkKvwUdwdlUAXPHHL38oa15f/i/46Ih6SuMSPmLAYAwyRKn7dfMGH97jaMFBYCJUgotIC2YAdu+LyW9vvubxAP8kAL8H/koAuOKP3+q6+xGnd5kdYCeECnGIJViwGJMAkQKfDvB3WZxjLKGh8VSCCzhwEWBpMc5/kBbjawT4HnwJfhr+pPBIu7uu+OOTo9vsmtQcniMBGkKFd4jDWMSCRUpLjJYNJkM+IRzQ+PQvIeAMTrBS2LEiaiR9b/5PuT6Ap/AcfAFO4Y3dA3DFH7/VS+M8k4baEAQfMI4QfbVDDGIRg7GKaIY52qAjTAgTvGBAPGIIghOCYAUrGFNgzA7Q3QhgCwfwAnwe5vDejgG44o/fbm1C5ZlYQvQDARPAIQGxCWBM+wWl37ZQESb4gImexGMDouhGLx1Cst0Saa4b4AqO4Hk4gxo+3DHAV/nx27p3JziPM2pVgoiia5MdEzCGULprIN7gEEeQ5IQxEBBBQnxhsDb5auGmAAYcHMA9eAAz8PBol8/xij9+C4Djlim4gJjWcwZBhCBgMIIYxGAVIkH3ZtcBuLdtRFMWsPGoY9rN+HoBji9VBYdwD2ZQg4cnO7OSq/z4rU5KKdwVbFAjNojCQzTlCLPFSxtamwh2jMUcEgg2Wm/6XgErIBhBckQtGN3CzbVacERgCnfgLswhnvqf7QyAq/z4rRZm1YglYE3affGITaZsdIe2FmMIpnOCap25I6jt2kCwCW0D1uAD9sZctNGXcQIHCkINDQgc78aCr+zjtw3BU/ijdpw3zhCwcaONwBvdeS2YZKkJNJsMPf2JKEvC28RXxxI0ASJyzQCjCEQrO4Q7sFArEzjZhaFc4cdv+/JFdKULM4px0DfUBI2hIsy06BqLhGTQEVdbfAIZXYMPesq6VoCHICzUyjwInO4Y411//LYLs6TDa9wvg2CC2rElgAnpTBziThxaL22MYhzfkghz6GAs2VHbbdM91VZu1MEEpupMMwKyVTb5ij9+u4VJG/5EgEMMmFF01cFai3isRbKbzb+YaU/MQbAm2XSMoUPAmvZzbuKYRIFApbtlrfFuUGd6vq2hXNnH78ZLh/iFhsQG3T4D1ib7k5CC6vY0DCbtrohgLEIClXiGtl10zc0CnEGIhhatLBva7NP58Tvw0qE8yWhARLQ8h4+AhQSP+I4F5xoU+VilGRJs6wnS7ruti/4KvAY/CfdgqjsMy4pf8fodQO8/gnuX3f/3xi3om1/h7THr+co3x93PP9+FBUfbNUjcjEmhcrkT+8K7ml7V10Jo05mpIEFy1NmCJWx9SIKKt+EjAL4Ez8EBVOB6havuT/rByPvHXK+9zUcfcbb254+9fydJknYnRr1oGfdaiAgpxu1Rx/Rek8KISftx3L+DfsLWAANn8Hvw0/AFeAGO9DFV3c6D+CcWbL8Dj9e7f+T1k8AZv/d7+PXWM/Z+VvdCrIvuAKO09RpEEQJM0Ci6+B4xhTWr4cZNOvhktabw0ta0rSJmqz3Yw5/AKXwenod7cAhTmBSPKf6JBdvH8IP17h95pXqw50/+BFnj88fev4NchyaK47OPhhtI8RFSvAfDSNh0Ck0p2gLxGkib5NJj/JWCr90EWQJvwBzO4AHcgztwAFN1evHPUVGwfXON+0debT1YeGON9Yy9/63X+OguiwmhIhQhD7l4sMqlG3D86Suc3qWZ4rWjI1X7u0Ytw6x3rIMeIOPDprfe2XzNgyj6PahhBjO4C3e6puDgXrdg+/5l948vF3bqwZetZ+z9Rx9zdIY5pInPK4Nk0t+l52xdK2B45Qd87nM8fsD5EfUhIcJcERw4RdqqH7Yde5V7m1vhNmtedkz6EDzUMF/2jJYWbC+4fzzA/Y+/8PPH3j9dcBAPIRP8JLXd5BpAu03aziOL3VVHZzz3CXWDPWd+SH2AnxIqQoTZpo9Ckc6HIrFbAbzNmlcg8Ag8NFDDAhbJvTBZXbC94P7t68EXfv6o+21gUtPETU7bbkLxvNKRFG2+KXzvtObonPP4rBvsgmaKj404DlshFole1Glfh02fE7bYR7dZ82oTewIBGn1Md6CG6YUF26X376oevOLzx95vhUmgblI6LBZwTCDY7vMq0op5WVXgsObOXJ+1x3qaBl9j1FeLxbhU9w1F+Wiba6s1X/TBz1LnUfuYDi4r2C69f1f14BWfP+p+W2GFKuC9phcELMYRRLur9DEZTUdEH+iEqWdaM7X4WOoPGI+ZYD2+wcQ+y+ioHUZ9dTDbArzxmi/bJI9BND0Ynd6lBdve/butBw8+f/T9D3ABa3AG8W3VPX4hBin+bj8dMMmSpp5pg7fJ6xrBFE2WQQEWnV8Qg3FbAWzYfM1rREEnmvkN2o1+acG2d/9u68GDzx91v3mAjb1zkpqT21OipPKO0b9TO5W0nTdOmAQm0TObts3aBKgwARtoPDiCT0gHgwnbArzxmtcLc08HgF1asN0C4Ms/fvD5I+7PhfqyXE/b7RbbrGyRQRT9ARZcwAUmgdoz0ehJ9Fn7QAhUjhDAQSw0bV3T3WbNa59jzmiP6GsWbGXDX2ytjy8+f9T97fiBPq9YeLdBmyuizZHaqXITnXiMUEEVcJ7K4j3BFPurtB4bixW8wTpweL8DC95szWMOqucFYGsWbGU7p3TxxxefP+r+oTVktxY0v5hbq3KiOKYnY8ddJVSBxuMMVffNbxwIOERShst73HZ78DZrHpmJmH3K6sGz0fe3UUj0eyRrSCGTTc+rjVNoGzNSv05srAxUBh8IhqChiQgVNIIBH3AVPnrsnXQZbLTm8ammv8eVXn/vWpaTem5IXRlt+U/LA21zhSb9cye6jcOfCnOwhIAYXAMVTUNV0QhVha9xjgA27ODJbLbmitt3tRN80lqG6N/khgot4ZVlOyO4WNg3OIMzhIZQpUEHieg2im6F91hB3I2tubql6BYNN9Hj5S7G0G2tahslBWKDnOiIvuAEDzakDQKDNFQT6gbn8E2y4BBubM230YIpBnDbMa+y3dx0n1S0BtuG62lCCXwcY0F72T1VRR3t2ONcsmDjbmzNt9RFs2LO2hQNyb022JisaI8rAWuw4HI3FuAIhZdOGIcdjLJvvObqlpqvWTJnnQbyi/1M9O8UxWhBs//H42I0q1Yb/XPGONzcmm+ri172mHKvZBpHkJaNJz6v9jxqiklDj3U4CA2ugpAaYMWqNXsdXbmJNd9egCnJEsphXNM+MnK3m0FCJ5S1kmJpa3DgPVbnQnPGWIDspW9ozbcO4K/9LkfaQO2KHuqlfFXSbdNzcEcwoqNEFE9zcIXu9/6n/ym/BC/C3aJLzEKPuYVlbFnfhZ8kcWxV3dbv4bKl28566wD+8C53aw49lTABp9PWbsB+knfc/Li3eVizf5vv/xmvnPKg5ihwKEwlrcHqucuVcVOxEv8aH37E3ZqpZypUulrHEtIWKUr+txHg+ojZDGlwnqmkGlzcVi1dLiNSJiHjfbRNOPwKpx9TVdTn3K05DBx4psIk4Ei8aCkJahRgffk4YnEXe07T4H2RR1u27E6wfQsBDofUgjFUFnwC2AiVtA+05J2zpiDK2Oa0c5fmAecN1iJzmpqFZxqYBCYhFTCsUNEmUnIcZ6aEA5rQVhEywG6w7HSW02XfOoBlQmjwulOFQAg66SvJblrTEX1YtJ3uG15T/BH1OfOQeuR8g/c0gdpT5fx2SKbs9EfHTKdM8A1GaJRHLVIwhcGyydZsbifAFVKl5EMKNU2Hryo+06BeTgqnxzYjThVySDikbtJPieco75lYfKAJOMEZBTjoITuWHXXZVhcUDIS2hpiXHV9Ku4u44bN5OYLDOkJo8w+xJSMbhBRHEdEs9JZUCkQrPMAvaHyLkxgkEHxiNkx/x2YB0mGsQ8EUWj/stW5YLhtS5SMu+/YBbNPDCkGTUybN8krRLBGPlZkVOA0j+a1+rkyQKWGaPHPLZOkJhioQYnVZ2hS3zVxMtgC46KuRwbJNd9nV2PHgb36F194ecf/Yeu2vAFe5nm/bRBFrnY4BauE8ERmZRFUn0k8hbftiVYSKMEme2dJCJSCGYAlNqh87bXOPdUkGy24P6d1ll21MBqqx48Fvv8ZHH8HZFY7j/uAq1xMJUFqCSUlJPmNbIiNsmwuMs/q9CMtsZsFO6SprzCS1Z7QL8xCQClEelpjTduDMsmWD8S1PT152BtvmIGvUeDA/yRn83u/x0/4qxoPHjx+PXY9pqX9bgMvh/Nz9kpP4pOe1/fYf3axUiMdHLlPpZCNjgtNFAhcHEDxTumNONhHrBduW+vOyY++70WWnPXj98eA4kOt/mj/5E05l9+O4o8ePx67HFqyC+qSSnyselqjZGaVK2TadbFLPWAQ4NBhHqDCCV7OTpo34AlSSylPtIdd2AJZlyzYQrDJ5lcWGNceD80CunPLGGzsfD+7wRb95NevJI5docQ3tgCyr5bGnyaPRlmwNsFELViOOx9loebGNq2moDOKpHLVP5al2cymWHbkfzGXL7kfRl44H9wZy33tvt+PB/Xnf93e+nh5ZlU18wCiRUa9m7kib9LYuOk+hudQNbxwm0AQqbfloimaB2lM5fChex+ylMwuTbfmXQtmWlenZljbdXTLuOxjI/fDDHY4Hjx8/Hrse0zXfPFxbUN1kKqSCCSk50m0Ajtx3ub9XHBKHXESb8iO6E+qGytF4nO0OG3SXzbJlhxBnKtKyl0NwybjvYCD30aMdjgePHz8eu56SVTBbgxJMliQ3Oauwg0QHxXE2Ez/EIReLdQj42Gzb4CLS0YJD9xUx7bsi0vJi5mUbW1QzL0h0PFk17rtiIPfJk52MB48fPx67npJJwyrBa2RCCQRTbGZSPCxTPOiND4G2pYyOQ4h4jINIJh5wFU1NFZt+IsZ59LSnDqBjZ2awbOku+yInunLcd8VA7rNnOxkPHj9+PGY9B0MWJJNozOJmlglvDMXDEozdhQWbgs/U6oBanGzLrdSNNnZFjOkmbi5bNt1lX7JLLhn3vXAg9/h4y/Hg8ePHI9dzQMEkWCgdRfYykYKnkP7D4rIujsujaKPBsB54vE2TS00ccvFY/Tth7JXeq1hz+qgVy04sAJawTsvOknHfCwdyT062HA8eP348Zj0vdoXF4pilKa2BROed+9fyw9rWRXeTFXESMOanvDZfJuJaSXouQdMdDJZtekZcLLvEeK04d8m474UDuaenW44Hjx8/Xns9YYqZpszGWB3AN/4VHw+k7WSFtJ3Qicuqb/NlVmgXWsxh570xg2UwxUw3WfO6B5nOuO8aA7lnZxuPB48fPx6znm1i4bsfcbaptF3zNT78eFPtwi1OaCNOqp1x3zUGcs/PN++AGD1+fMXrSVm2baTtPhPahbPhA71wIHd2bXzRa69nG+3CraTtPivahV/55tXWg8fyRY/9AdsY8VbSdp8V7cKrrgdfM//z6ILQFtJ2nxHtwmuoB4/kf74+gLeRtvvMaBdeSz34+vifx0YG20jbfTa0C6+tHrwe//NmOG0L8EbSdp8R7cLrrQe/996O+ai3ujQOskpTNULa7jOjXXj99eCd8lHvoFiwsbTdZ0a78PrrwTvlo966pLuRtB2fFe3Cm6oHP9kNH/W2FryxtN1nTLvwRurBO+Kj3pWXHidtx2dFu/Bm68Fb81HvykuPlrb7LGkX3mw9eGs+6h1Y8MbSdjegXcguQLjmevDpTQLMxtJ2N6NdyBZu9AbrwVvwUW+LbteULUpCdqm0HTelXbhNPe8G68Gb8lFvVfYfSNuxvrTdTWoXbozAzdaDZzfkorOj1oxVxlIMlpSIlpLrt8D4hrQL17z+c3h6hU/wv4Q/utps4+bm+6P/hIcf0JwQ5oQGPBL0eKPTYEXTW+eL/2DKn73J9BTXYANG57hz1cEMviVf/4tf5b/6C5pTQkMIWoAq7hTpOJjtAM4pxKu5vg5vXeUrtI09/Mo/5H+4z+Mp5xULh7cEm2QbRP2tFIKR7WM3fPf/jZ3SWCqLM2l4NxID5zB72HQXv3jj/8mLR5xXNA5v8EbFQEz7PpRfl1+MB/hlAN65qgDn3wTgH13hK7T59bmP+NIx1SHHU84nLOITt3iVz8mNO+lPrjGAnBFqmioNn1mTyk1ta47R6d4MrX7tjrnjYUpdUbv2rVr6YpVfsGG58AG8Ah9eyUN8CX4WfgV+G8LVWPDGb+Zd4cU584CtqSbMKxauxTg+dyn/LkVgA+IR8KHtejeFKRtTmLLpxN6mYVLjYxwXf5x2VofiZcp/lwKk4wGOpYDnoIZPdg/AAbwMfx0+ge9dgZvYjuqKe4HnGnykYo5TvJbG0Vj12JagRhwKa44H95ShkZa5RyLGGdfYvG7aw1TsF6iapPAS29mNS3NmsTQZCmgTzFwgL3upCTgtBTRwvGMAKrgLn4evwin8+afJRcff+8izUGUM63GOOuAs3tJkw7J4kyoNreqrpO6cYLQeFUd7TTpr5YOTLc9RUUogUOVJQ1GYJaFLAW0oTmKyYS46ZooP4S4EON3xQ5zC8/CX4CnM4c1PE8ApexpoYuzqlP3d4S3OJP8ZDK7cKWNaTlqmgDiiHwl1YsE41w1zT4iRTm3DBqxvOUsbMKKDa/EHxagtnta072ejc3DOIh5ojvh8l3tk1JF/AV6FU6jh3U8HwEazLgdCLYSQ+MYiAI2ltomkzttUb0gGHdSUUgsIYjTzLG3mObX4FBRaYtpDVNZrih9TgTeYOBxsEnN1gOCTM8Bsw/ieMc75w9kuAT6A+/AiHGvN/+Gn4KRkiuzpNNDYhDGFndWRpE6SVfm8U5bxnSgVV2jrg6JCKmneqey8VMFgq2+AM/i4L4RUbfSi27lNXZ7R7W9RTcq/q9fk4Xw3AMQd4I5ifAZz8FcVtm9SAom/dyN4lczJQW/kC42ZrHgcCoIf1oVMKkVItmMBi9cOeNHGLqOZk+QqQmrbc5YmYgxELUUN35z2iohstgfLIFmcMV7s4CFmI74L9+EFmGsi+tGnAOD4Yk9gIpo01Y4cA43BWGygMdr4YZekG3OBIUXXNukvJS8tqa06e+lSDCtnqqMFu6hWHXCF+WaYt64m9QBmNxi7Ioy7D+fa1yHw+FMAcPt7SysFLtoG4PXAk7JOA3aAxBRqUiAdU9Yp5lK3HLSRFtOim0sa8euEt08xvKjYjzeJ2GU7YawexrnKI9tmobInjFXCewpwriY9+RR4aaezFhMhGCppKwom0ChrgFlKzyPKkGlTW1YQrE9HJqu8hKGgMc6hVi5QRq0PZxNfrYNgE64utmRv6KKHRpxf6VDUaOvNP5jCEx5q185My/7RKz69UQu2im5k4/eownpxZxNLwiZ1AZTO2ZjWjkU9uaB2HFn6Q3u0JcsSx/qV9hTEApRzeBLDJQXxYmTnq7bdLa3+uqFrxLJ5w1TehnNHx5ECvCh2g2c3hHH5YsfdaSKddztfjQ6imKFGSyFwlLzxEGPp6r5IevVjk1AMx3wMqi1NxDVjLBiPs9tbsCkIY5we5/ML22zrCScFxnNtzsr9Wcc3CnD+pYO+4VXXiDE0oc/vQQ/fDK3oPESJMYXNmJa/DuloJZkcTpcYE8lIH8Dz8DJMiynNC86Mb2lNaaqP/+L7f2fcE/yP7/Lde8xfgSOdMxvOixZf/9p3+M4hT1+F+zApxg9XfUvYjc8qX2lfOOpK2gNRtB4flpFu9FTKCp2XJRgXnX6olp1zyYjTKJSkGmLE2NjUr1bxFM4AeAAHBUFIeSLqXR+NvH/M9fOnfHzOD2vCSyQJKzfgsCh+yi/Mmc35F2fUrw7miW33W9hBD1vpuUojFphIyvg7aTeoymDkIkeW3XLHmguMzbIAJejN6B5MDrhipE2y6SoFRO/AK/AcHHZHNIfiWrEe/C6cr3f/yOvrQKB+zMM55/GQdLDsR+ifr5Fiuu+/y+M78LzOE5dsNuXC3PYvYWd8NXvphLSkJIasrlD2/HOqQ+RjcRdjKTGWYhhVUm4yxlyiGPuMsZR7sMCHUBeTuNWA7if+ifXgc/hovftHXs/DV+Fvwe+f8shzMiMcweFgBly3//vwJfg5AN4450fn1Hd1Rm1aBLu22Dy3y3H2+OqMemkbGZ4jozcDjJf6596xOLpC0eMTHbKnxLxH27uZ/bMTGs2jOaMOY4m87CfQwF0dw53oa1k80JRuz/XgS+8fX3N9Af4qPIMfzKgCp4H5TDGe9GGeFPzSsZz80SlPTxXjgwJmC45njzgt2vbQ4b4OAdUK4/vWhO8d8v6EE8fMUsfakXbPpFJeLs2ubM/qdm/la3WP91uWhxXHjoWhyRUq2iJ/+5mA73zwIIo+LoZ/SgvIRjAd1IMvvn98PfgOvAJfhhm8scAKVWDuaRaK8aQ9f7vuPDH6Bj47ZXau7rqYJ66mTDwEDU6lLbCjCK0qTXyl5mnDoeNRxanj3FJbaksTk0faXxHxLrssgPkWB9LnA/MFleXcJozzjwsUvUG0X/QCve51qkMDXp9mtcyOy3rwBfdvVJK7D6/ACSzg3RoruIq5UDeESfEmVclDxnniU82vxMLtceD0hGZWzBNPMM/jSPne2OVatiTKUpY5vY7gc0LdUAWeWM5tH+O2I66AOWw9xT2BuyRVLGdoDHUsVRXOo/c+ZdRXvFfnxWyIV4upFLCl9eAL7h8Zv0QH8Ry8pA2cHzQpGesctVA37ZtklBTgHjyvdSeKY/RZw/kJMk0Y25cSNRWSigQtlULPTw+kzuJPeYEkXjQRpoGZobYsLF79pyd1dMRHInbgFTZqNLhDqiIsTNpoex2WLcy0/X6rHcdMMQvFSd5dWA++4P7xv89deACnmr36uGlL69bRCL6BSZsS6c0TU2TKK5gtWCzgAOOwQcurqk9j8whvziZSMLcq5hbuwBEsYjopUBkqw1yYBGpLA97SRElEmx5MCInBY5vgLk94iKqSWmhIGmkJ4Bi9m4L645J68LyY4wsFYBfUg5feP/6gWWm58IEmKQM89hq7KsZNaKtP5TxxrUZZVkNmMJtjbKrGxLNEbHPJxhqy7lAmbC32ZqeF6lTaknRWcYaFpfLUBh/rwaQycCCJmW15Kstv6jRHyJFry2C1ahkkIW0LO75s61+owxK1y3XqweX9m5YLM2DPFeOjn/iiqCKJ+yKXF8t5Yl/kNsqaSCryxPq5xWTFIaP8KSW0RYxqupaUf0RcTNSSdJZGcKYdYA6kdtrtmyBckfKXwqk0pHpUHlwWaffjNRBYFPUDWa8e3Lt/o0R0CdisKDM89cX0pvRHEfM8ca4t0s2Xx4kgo91MPQJ/0c9MQYq0co8MBh7bz1fio0UUHLR4aAIOvOmoYO6kwlEVODSSTliWtOtH6sPkrtctF9ZtJ9GIerBskvhdVS5cFNv9s1BU0AbdUgdK4FG+dRnjFmDTzniRMdZO1QhzMK355vigbdkpz9P6qjUGE5J2qAcXmwJ20cZUiAD0z+pGMx6xkzJkmEf40Hr4qZfVg2XzF9YOyoV5BjzVkUJngKf8lgNYwKECEHrCNDrWZzMlflS3yBhr/InyoUgBc/lKT4pxVrrC6g1YwcceK3BmNxZcAtz3j5EIpqguh9H6wc011YN75cKDLpFDxuwkrPQmUwW4KTbj9mZTwBwLq4aQMUZbHm1rylJ46dzR0dua2n3RYCWZsiHROeywyJGR7mXKlpryyCiouY56sFkBWEnkEB/raeh/Sw4162KeuAxMQpEkzy5alMY5wamMsWKKrtW2WpEWNnReZWONKWjrdsKZarpFjqCslq773PLmEhM448Pc3+FKr1+94vv/rfw4tEcu+lKTBe4kZSdijBrykwv9vbCMPcLQTygBjzVckSLPRVGslqdunwJ4oegtFOYb4SwxNgWLCmD7T9kVjTv5YDgpo0XBmN34Z/rEHp0sgyz7lngsrm4lvMm2Mr1zNOJYJ5cuxuQxwMGJq/TP5emlb8fsQBZviK4t8hFL+zbhtlpwaRSxQRWfeETjuauPsdGxsBVdO7nmP4xvzSoT29pRl7kGqz+k26B3Oy0YNV+SXbbQas1ctC/GarskRdFpKczVAF1ZXnLcpaMuzVe6lZ2g/1ndcvOVgRG3sdUAY1bKD6achijMPdMxV4muKVorSpiDHituH7rSTs7n/4y5DhRXo4FVBN4vO/zbAcxhENzGbHCzU/98Mcx5e7a31kWjw9FCe/zNeYyQjZsWb1uc7U33pN4Mji6hCLhivqfa9Ss6xLg031AgfesA/l99m9fgvnaF9JoE6bYKmkGNK3aPbHB96w3+DnxFm4hs0drLsk7U8kf/N/CvwQNtllna0rjq61sH8L80HAuvwH1tvBy2ChqWSCaYTaGN19sTvlfzFD6n+iKTbvtayfrfe9ueWh6GJFoxLdr7V72a5ZpvHcCPDzma0wTO4EgbLyedxstO81n57LYBOBzyfsOhUKsW1J1BB5vr/tz8RyqOFylQP9Tvst2JALsC5lsH8PyQ40DV4ANzYa4dedNiKNR1s+x2wwbR7q4/4cTxqEk4LWDebfisuo36JXLiWFjOtLrlNWh3K1rRS4xvHcDNlFnNmWBBAl5SWaL3oPOfnvbr5pdjVnEaeBJSYjuLEkyLLsWhKccadmOphZkOPgVdalj2QpSmfOsADhMWE2ZBu4+EEJI4wKTAuCoC4xwQbWXBltpxbjkXJtKxxabo9e7tyhlgb6gNlSbUpMh+l/FaqzVwewGu8BW1Zx7pTpQDJUjb8tsUTW6+GDXbMn3mLbXlXJiGdggxFAoUrtPS3wE4Nk02UZG2OOzlk7fRs7i95QCLo3E0jtrjnM7SR3uS1p4qtS2nJ5OwtQVHgOvArLBFijZUV9QtSl8dAY5d0E0hM0w3HS2DpIeB6m/A1+HfhJcGUq4sOxH+x3f5+VO+Ds9rYNI7zPXOYWPrtf8bYMx6fuOAX5jzNR0PdsuON+X1f7EERxMJJoU6GkTEWBvVolVlb5lh3tKCg6Wx1IbaMDdJ+9sUCc5KC46hKGCk3IVOS4TCqdBNfUs7Kd4iXf2RjnT/LLysJy3XDcHLh/vde3x8DoGvwgsa67vBk91G5Pe/HbOe7xwym0NXbtiuuDkGO2IJDh9oQvJ4cY4vdoqLDuoH9Zl2F/ofsekn8lkuhIlhQcffUtSjytFyp++p6NiE7Rqx/lodgKVoceEp/CP4FfjrquZaTtj2AvH5K/ywpn7M34K/SsoYDAdIN448I1/0/wveW289T1/lX5xBzc8N5IaHr0XMOQdHsIkDuJFifj20pBm5jzwUv9e2FhwRsvhAbalCIuIw3bhJihY3p6nTFFIZgiSYjfTf3aXuOjmeGn4bPoGvwl+CFzTRczBIuHBEeImHc37/lGfwZR0cXzVDOvaKfNHvwe+suZ771K/y/XcBlsoN996JpBhoE2toYxOznNEOS5TJc6Id5GEXLjrWo+LEWGNpPDU4WAwsIRROu+1vM+0oW37z/MBN9kqHnSArwPfgFJ7Cq/Ai3Ie7g7ncmI09v8sjzw9mzOAEXoIHxURueaAce5V80f/DOuuZwHM8vsMb5wBzOFWM7wymTXPAEvm4vcFpZ2ut0VZRjkiP2MlmLd6DIpbGSiHOjdnUHN90hRYmhTnmvhzp1iKDNj+b7t5hi79lWGwQ+HN9RsfFMy0FXbEwhfuczKgCbyxYwBmcFhhvo/7a44v+i3XWcwDP86PzpGQYdWh7csP5dBvZ1jNzdxC8pBGuxqSW5vw40nBpj5JhMwvOzN0RWqERHMr4Lv1kWX84xLR830G3j6yqZ1a8UstTlW+qJPOZ+sZ7xZPKTJLhiNOAFd6tk+jrTH31ncLOxid8+nzRb128HhUcru/y0Wn6iT254YPC6FtVSIMoW2sk727AhvTtrWKZTvgsmckfXYZWeNRXx/3YQ2OUxLDrbHtN11IwrgXT6c8dATDwLniYwxzO4RzuQqTKSC5gAofMZ1QBK3zQ4JWobFbcvJm87FK+6JXrKahLn54m3p+McXzzYtP8VF/QpJuh1OwieElEoI1pRxPS09FBrkq2tWCU59+HdhNtTIqKm8EBrw2RTOEDpG3IKo2Y7mFdLm3ZeVjYwVw11o/oznceMve4CgMfNym/utA/d/ILMR7gpXzRy9eDsgLcgbs8O2Va1L0zzIdwGGemTBuwROHeoMShkUc7P+ISY3KH5ZZeWqO8mFTxQYeXTNuzvvK5FGPdQfuu00DwYFY9dyhctEt+OJDdnucfpmyhzUJzfsJjr29l8S0bXBfwRS9ZT26tmMIdZucch5ZboMz3Nio3nIOsYHCGoDT4kUA9MiXEp9Xsui1S8th/kbWIrMBxDGLodWUQIWcvnXy+9M23xPiSMOiRPqM+YMXkUN3gXFrZJwXGzUaMpJfyRS9ZT0lPe8TpScuRlbMHeUmlaKDoNuy62iWNTWNFYjoxFzuJs8oR+RhRx7O4SVNSXpa0ZJQ0K1LAHDQ+D9IepkMXpcsq5EVCvClBUIzDhDoyKwDw1Lc59GbTeORivugw1IcuaEOaGWdNm+Ps5fQ7/tm0DjMegq3yM3vb5j12qUId5UZD2oxDSEWOZMSqFl/W+5oynWDa/aI04tJRQ2eTXusg86SQVu/nwSYwpW6wLjlqIzwLuxGIvoAvul0PS+ZNz0/akp/pniO/8JDnGyaCkzbhl6YcqmK/69prxPqtpx2+Km9al9sjL+rwMgHw4jE/C8/HQ3m1vBuL1fldbzd8mOueVJ92syqdEY4KJjSCde3mcRw2TA6szxedn+zwhZMps0XrqEsiUjnC1hw0TELC2Ek7uAAdzcheXv1BYLagspxpzSAoZZUsIzIq35MnFQ9DOrlNB30jq3L4pkhccKUAA8/ocvN1Rzx9QyOtERs4CVsJRK/DF71kPYrxYsGsm6RMh4cps5g1DOmM54Ly1ii0Hd3Y/BMk8VWFgBVmhqrkJCPBHAolwZaWzLR9Vb7bcWdX9NyUYE+uB2BKfuaeBUcjDljbYVY4DdtsVWvzRZdWnyUzDpjNl1Du3aloAjVJTNDpcIOVVhrHFF66lLfJL1zJr9PQ2nFJSBaKoDe+sAvLufZVHVzYh7W0h/c6AAZ+7Tvj6q9j68G/cTCS/3n1vLKHZwNi+P+pS0WkZNMBMUl+LDLuiE4omZy71r3UFMwNJV+VJ/GC5ixVUkBStsT4gGKh0Gm4Oy3qvq7Lbmq24nPdDuDR9deR11XzP4vFu3TYzfnIyiSVmgizUYGqkIXNdKTY9pgb9D2Ix5t0+NHkVzCdU03suWkkVZAoCONCn0T35gAeW38de43mf97sMOpSvj4aa1KYUm58USI7Wxxes03bAZdRzk6UtbzMaCQ6IxO0dy7X+XsjoD16hpsBeGz9dfzHj+R/Hp8nCxZRqkEDTaCKCSywjiaoMJ1TITE9eg7Jqnq8HL6gDwiZb0u0V0Rr/rmvqjxKuaLCX7ZWXTvAY+uvm3z8CP7nzVpngqrJpZKwWnCUjIviYVlirlGOzPLI3SMVyp/elvBUjjDkNhrtufFFErQ8pmdSlbK16toBHlt/HV8uHMX/vEGALkV3RJREiSlopxwdMXOZPLZ+ix+kAHpMKIk8UtE1ygtquttwxNhphrIZ1IBzjGF3IIGxGcBj6q8bHJBG8T9vdsoWrTFEuebEZuVxhhClH6P5Zo89OG9fwHNjtNQTpD0TG9PJLEYqvEY6Rlxy+ZZGfL0Aj62/bnQCXp//eeM4KzfQVJbgMQbUjlMFIm6TpcfWlZje7NBSV6IsEVmumWIbjiloUzQX9OzYdo8L1wjw2PrrpimONfmfNyzKklrgnEkSzT5QWYQW40YShyzqsRmMXbvVxKtGuYyMKaU1ugenLDm5Ily4iT14fP11Mx+xJv+zZ3MvnfdFqxU3a1W/FTB4m3Qfsyc1XUcdVhDeUDZXSFHHLQj/Y5jtC7ZqM0CXGwB4bP11i3LhOvzPGygYtiUBiwQV/4wFO0majijGsafHyRLu0yG6q35cL1rOpVxr2s5cM2jJYMCdc10Aj6q/blRpWJ//+dmm5psMl0KA2+AFRx9jMe2WbC4jQxnikd4DU8TwUjRVacgdlhmr3bpddzuJ9zXqr2xnxJfzP29RexdtjDVZqzkqa6PyvcojGrfkXiJ8SEtml/nYskicv0ivlxbqjemwUjMw5evdg8fUX9nOiC/lf94Q2i7MURk9nW1MSj5j8eAyV6y5CN2S6qbnw3vdA1Iwq+XOSCl663udN3IzLnrt+us25cI1+Z83SXQUldqQq0b5XOT17bGpLd6ssN1VMPf8c+jG8L3NeCnMdF+Ra3fRa9dft39/LuZ/3vwHoHrqGmQFafmiQw6eyzMxS05K4bL9uA+SKUQzCnSDkqOGokXyJvbgJ/BHI+qvY69//4rl20NsmK2ou2dTsyIALv/91/8n3P2Aao71WFGi8KKv1fRC5+J67Q/507/E/SOshqN5TsmYIjVt+kcjAx98iz/4SaojbIV1rexE7/C29HcYD/DX4a0rBOF5VTu7omsb11L/AWcVlcVZHSsqGuXLLp9ha8I//w3Mv+T4Ew7nTBsmgapoCrNFObIcN4pf/Ob/mrvHTGqqgAupL8qWjWPS9m/31jAe4DjA+4+uCoQoT/zOzlrNd3qd4SdphFxsUvYwGWbTWtISc3wNOWH+kHBMfc6kpmpwPgHWwqaSUG2ZWWheYOGQGaHB+eQ/kn6b3pOgLV+ODSn94wDvr8Bvb70/LLuiPPEr8OGVWfDmr45PZyccEmsVXZGe1pRNX9SU5+AVQkNTIVPCHF/jGmyDC9j4R9LfWcQvfiETmgMMUCMN1uNCakkweZsowdYobiMSlnKA93u7NzTXlSfe+SVbfnPQXmg9LpYAQxpwEtONyEyaueWM4FPjjyjG3uOaFmBTWDNgBXGEiQpsaWhnAqIijB07Dlsy3fUGeP989xbWkyf+FF2SNEtT1E0f4DYYVlxFlbaSMPIRMk/3iMU5pME2SIWJvjckciebkQuIRRyhUvkHg/iUljG5kzVog5hV7vIlCuBrmlhvgPfNHQM8lCf+FEGsYbMIBC0qC9a0uuy2wLXVbLBaP5kjHokCRxapkQyzI4QEcwgYHRZBp+XEFTqXFuNVzMtjXLJgX4gAid24Hjwc4N3dtVSe+NNiwTrzH4WVUOlDobUqr1FuAgYllc8pmzoVrELRHSIW8ViPxNy4xwjBpyR55I6J220qQTZYR4guvUICJiSpr9gFFle4RcF/OMB7BRiX8sSfhpNSO3lvEZCQfLUVTKT78Ek1LRLhWN+yLyTnp8qWUZ46b6vxdRGXfHVqx3eI75YaLa4iNNiK4NOW7wPW6lhbSOF9/M9qw8e/aoB3d156qTzxp8pXx5BKAsYSTOIIiPkp68GmTq7sZtvyzBQaRLNxIZ+paozHWoLFeExIhRBrWitHCAHrCF7/thhD8JhYz84wg93QRV88wLuLY8zF8sQ36qF1J455bOlgnELfshKVxYOXKVuKx0jaj22sczTQqPqtV/XDgpswmGTWWMSDw3ssyUunLLrVPGjYRsH5ggHeHSWiV8kT33ycFSfMgkoOK8apCye0J6VW6GOYvffgU9RWsukEi2kUV2nl4dOYUzRik9p7bcA4ggdJ53LxKcEe17B1R8eqAd7dOepV8sTXf5lhejoL85hUdhDdknPtKHFhljOT+bdq0hxbm35p2nc8+Ja1Iw+tJykgp0EWuAAZYwMVwac5KzYMslhvgHdHRrxKnvhTYcfKsxTxtTETkjHO7rr3zjoV25lAQHrqpV7bTiy2aXMmUhTBnKS91jhtR3GEoF0oLnWhWNnYgtcc4N0FxlcgT7yz3TgNIKkscx9jtV1ZKpWW+Ub1tc1eOv5ucdgpx+FJy9pgbLE7xDyXb/f+hLHVGeitHOi6A7ybo3sF8sS7w7cgdk0nJaOn3hLj3uyD0Zp5pazFIUXUpuTTU18d1EPkDoX8SkmWTnVIozEdbTcZjoqxhNHf1JrSS/AcvHjZ/SMHhL/7i5z+POsTUh/8BvNfYMTA8n+yU/MlTZxSJDRStqvEuLQKWwDctMTQogUDyQRoTQG5Kc6oQRE1yV1jCA7ri7jdZyK0sYTRjCR0Hnnd+y7nHxNgTULqw+8wj0mQKxpYvhjm9uSUxg+TTy7s2GtLUGcywhXSKZN275GsqlclX90J6bRI1aouxmgL7Q0Nen5ziM80SqMIo8cSOo+8XplT/5DHNWsSUr/6lLN/QQ3rDyzLruEW5enpf7KqZoShEduuSFOV7DLX7Ye+GmXb6/hnNNqKsVXuMDFpb9Y9eH3C6NGEzuOuI3gpMH/I6e+zDiH1fXi15t3vA1czsLws0TGEtmPEJdiiFPwlwKbgLHAFk4P6ZyPdymYYHGE0dutsChQBl2JcBFlrEkY/N5bQeXQ18gjunuMfMfsBlxJSx3niO485fwO4fGD5T/+3fPQqkneWVdwnw/3bMPkW9Wbqg+iC765Zk+xcT98ibKZc2EdgHcLoF8cSOo/Oc8fS+OyEULF4g4sJqXVcmfMfsc7A8v1/yfGXmL9I6Fn5pRwZhsPv0TxFNlAfZCvG+Oohi82UC5f/2IsJo0cTOm9YrDoKhFPEUr/LBYTUNht9zelHXDqwfPCIw4owp3mOcIQcLttWXFe3VZ/j5H3cIc0G6oPbCR+6Y2xF2EC5cGUm6wKC5tGEzhsWqw5hNidUiKX5gFWE1GXh4/Qplw4sVzOmx9QxU78g3EF6wnZlEN4FzJ1QPSLEZz1KfXC7vd8ssGdIbNUYpVx4UapyFUHzJoTOo1McSkeNn1M5MDQfs4qQuhhX5vQZFw8suwWTcyYTgioISk2YdmkhehG4PkE7w51inyAGGaU+uCXADabGzJR1fn3lwkty0asIo8cROm9Vy1g0yDxxtPvHDAmpu+PKnM8Ix1wwsGw91YJqhteaWgjYBmmQiebmSpwKKzE19hx7jkzSWOm66oPbzZ8Yj6kxVSpYjVAuvLzYMCRo3oTQecOOjjgi3NQ4l9K5/hOGhNTdcWVOTrlgYNkEXINbpCkBRyqhp+LdRB3g0OU6rMfW2HPCFFMV9nSp+uB2woepdbLBuJQyaw/ZFysXrlXwHxI0b0LovEkiOpXGA1Ijagf+KUNC6rKNa9bQnLFqYNkEnMc1uJrg2u64ELPBHpkgWbmwKpJoDhMwNbbGzAp7Yg31wS2T5rGtzit59PrKhesWG550CZpHEzpv2NGRaxlNjbMqpmEIzygJqQfjypycs2pg2cS2RY9r8HUqkqdEgKTWtWTKoRvOBPDYBltja2SO0RGjy9UHtxwRjA11ujbKF+ti5cIR9eCnxUg6owidtyoU5tK4NLji5Q3HCtiyF2IqLGYsHViOXTXOYxucDqG0HyttqYAKqYo3KTY1ekyDXRAm2AWh9JmsVh/ccg9WJ2E8YjG201sPq5ULxxX8n3XLXuMInbft2mk80rRGjCGctJ8/GFdmEQ9Ug4FlE1ll1Y7jtiraqm5Fe04VV8lvSVBL8hiPrfFVd8+7QH3Qbu2ipTVi8cvSGivc9cj8yvH11YMHdNSERtuOslM97feYFOPKzGcsI4zW0YGAbTAOaxCnxdfiYUmVWslxiIblCeAYr9VYR1gM7GmoPrilunSxxeT3DN/2eBQ9H11+nk1adn6VK71+5+Jfct4/el10/7KBZfNryUunWSCPxPECk1rdOv1WVSrQmpC+Tl46YD3ikQYcpunSQgzVB2VHFhxHVGKDgMEY5GLlQnP7FMDzw7IacAWnO6sBr12u+XanW2AO0wQ8pknnFhsL7KYIqhkEPmEXFkwaN5KQphbkUmG72wgw7WSm9RiL9QT925hkjiVIIhphFS9HKI6/8QAjlpXqg9W2C0apyaVDwKQwrwLY3j6ADR13ZyUNByQXHQu6RY09Hu6zMqXRaNZGS/KEJs0cJEe9VH1QdvBSJv9h09eiRmy0V2uJcqHcShcdvbSNg5fxkenkVprXM9rDVnX24/y9MVtncvbKY706anNl3ASll9a43UiacVquXGhvq4s2FP62NGKfQLIQYu9q1WmdMfmUrDGt8eDS0cXozH/fjmUH6Jruvm50hBDSaEU/2Ru2LEN/dl006TSc/g7tfJERxGMsgDUEr104pfWH9lQaN+M4KWQjwZbVc2rZVNHsyHal23wZtIs2JJqtIc/WLXXRFCpJkfE9jvWlfFbsNQ9pP5ZBS0zKh4R0aMFj1IjTcTnvi0Zz2rt7NdvQb2mgbju1plsH8MmbnEk7KbK0b+wC2iy3aX3szW8xeZvDwET6hWZYwqTXSSG+wMETKum0Dq/q+x62gt2ua2ppAo309TRk9TPazfV3qL9H8z7uhGqGqxNVg/FKx0HBl9OVUORn8Q8Jx9gFttGQUDr3tzcXX9xGgN0EpzN9mdZ3GATtPhL+CjxFDmkeEU6x56kqZRusLzALXVqkCN7zMEcqwjmywDQ6OhyUe0Xao1Qpyncrg6wKp9XfWDsaZplElvQ/b3sdweeghorwBDlHzgk1JmMc/wiERICVy2VJFdMjFuLQSp3S0W3+sngt2njwNgLssFGVQdJ0tu0KH4ky1LW4yrbkuaA6Iy9oz/qEMMXMMDWyIHhsAyFZc2peV9hc7kiKvfULxCl9iddfRK1f8kk9qvbdOoBtOg7ZkOZ5MsGrSHsokgLXUp9y88smniwWyuFSIRVmjplga3yD8Uij5QS1ZiM4U3Qw5QlSm2bXjFe6jzzBFtpg+/YBbLAWG7OPynNjlCw65fukGNdkJRf7yM1fOxVzbxOJVocFoYIaGwH22mIQkrvu1E2nGuebxIgW9U9TSiukPGU+Lt++c3DJPKhyhEEbXCQLUpae2exiKy6tMPe9mDRBFCEMTWrtwxN8qvuGnt6MoihKWS5NSyBhbH8StXoAz8PLOrRgLtOT/+4vcu+7vDLnqNvztOq7fmd8sMmY9Xzn1zj8Dq8+XVdu2Nv0IIySgEdQo3xVHps3Q5i3fLFsV4aiqzAiBhbgMDEd1uh8qZZ+lwhjkgokkOIv4xNJmyncdfUUzgB4oFMBtiu71Xumpz/P+cfUP+SlwFExwWW62r7b+LSPxqxn/gvMZ5z9C16t15UbNlq+jbGJtco7p8wbYlL4alSyfWdeuu0j7JA3JFNuVAwtst7F7FhWBbPFNKIUORndWtLraFLmMu7KFVDDOzqkeaiN33YAW/r76wR4XDN/yN1z7hejPau06EddkS/6XThfcz1fI/4K736fO48vlxt2PXJYFaeUkFS8U15XE3428xdtn2kc8GQlf1vkIaNRRnOMvLTWrZbElEHeLWi1o0dlKPAh1MVgbbVquPJ5+Cr8LU5/H/+I2QlHIU2ClXM9G8v7Rr7oc/hozfUUgsPnb3D+I+7WF8kNO92GY0SNvuxiE+2Bt8prVJTkzE64sfOstxuwfxUUoyk8VjcTlsqe2qITSFoSj6Epd4KsT6BZOWmtgE3hBfir8IzZDwgV4ZTZvD8VvPHERo8v+vL1DASHTz/i9OlKueHDjK5Rnx/JB1Vb1ioXdBra16dmt7dgik10yA/FwJSVY6XjA3oy4SqM2frqDPPSRMex9qs3XQtoWxMj7/Er8GWYsXgjaVz4OYumP2+9kbxvny/6kvWsEBw+fcb5bInc8APdhpOSs01tEqIkoiZjbAqKMruLbJYddHuHFRIyJcbdEdbl2sVLaySygunutBg96Y2/JjKRCdyHV+AEFtTvIpbKIXOamknYSiB6KV/0JetZITgcjjk5ZdaskBtWO86UF0ap6ozGXJk2WNiRUlCPFir66lzdm/SLSuK7EUdPz8f1z29Skq6F1fXg8+5UVR6bszncP4Tn4KUkkdJ8UFCY1zR1i8RmL/qQL3rlei4THG7OODlnKko4oI01kd3CaM08Ia18kC3GNoVaO9iDh+hWxSyTXFABXoau7Q6q9OxYg/OVEMw6jdbtSrJ9cBcewGmaZmg+bvkUnUUaGr+ZfnMH45Ivevl61hMcXsxYLFTu1hTm2zViCp7u0o5l+2PSUh9bDj6FgYypufBDhqK2+oXkiuHFHR3zfj+9PtA8oR0xnqX8qn+sx3bFODSbbF0X8EUvWQ8jBIcjo5bRmLOljDNtcqNtOe756h3l0VhKa9hDd2l1eqmsnh0MNMT/Cqnx6BInumhLT8luljzQ53RiJeA/0dxe5NK0o2fA1+GLXr6eNQWHNUOJssQaTRlGpLHKL9fD+IrQzTOMZS9fNQD4AnRNVxvTdjC+fJdcDDWQcyB00B0t9BDwTxXgaAfzDZ/DBXzRnfWMFRwuNqocOmX6OKNkY63h5n/fFcB28McVHqnXZVI27K0i4rDLNE9lDKV/rT+udVbD8dFFu2GGZ8mOt0kAXcoX3ZkIWVtw+MNf5NjR2FbivROHmhV1/pj2egv/fMGIOWTIWrV3Av8N9imV9IWml36H6cUjqEWNv9aNc+veb2sH46PRaHSuMBxvtW+twxctq0z+QsHhux8Q7rCY4Ct8lqsx7c6Sy0dl5T89rIeEuZKoVctIk1hNpfavER6yyH1Vvm3MbsUHy4ab4hWr/OZPcsRBphnaV65/ZcdYPNNwsjN/djlf9NqCw9U5ExCPcdhKxUgLSmfROpLp4WSUr8ojdwbncbvCf+a/YzRaEc6QOvXcGO256TXc5Lab9POvB+AWY7PigWYjzhifbovuunzRawsO24ZqQQAqguBtmpmPB7ysXJfyDDaV/aPGillgz1MdQg4u5MYaEtBNNHFjkRlSpd65lp4hd2AVPTfbV7FGpyIOfmNc/XVsPfg7vzaS/3nkvLL593ANLvMuRMGpQIhiF7kUEW9QDpAUbTWYBcbp4WpacHHY1aacqQyjGZS9HI3yCBT9kUZJhVOD+zUDvEH9ddR11fzPcTDQ5TlgB0KwqdXSavk9BC0pKp0WmcuowSw07VXmXC5guzSa4p0UvRw2lbDiYUx0ExJJRzWzi6Gm8cnEkfXXsdcG/M/jAJa0+bmCgdmQ9CYlNlSYZOKixmRsgiFxkrmW4l3KdFKv1DM8tk6WxPYJZhUUzcd8Kdtgrw/gkfXXDT7+avmfVak32qhtkg6NVdUS5wgkru1YzIkSduTW1FDwVWV3JQVJVuieTc0y4iDpFwc7/BvSalvKdQM8sv662cevz/+8sQVnjVAT0W2wLllw1JiMhJRxgDjCjLQsOzSFSgZqx7lAW1JW0e03yAD3asC+GD3NbQhbe+mN5GXH1F83KDOM4n/e5JIuH4NpdQARrFPBVptUNcjj4cVMcFSRTE2NpR1LEYbYMmfWpXgP9KejaPsLUhuvLCsVXznAG9dfx9SR1ud/3hZdCLHb1GMdPqRJgqDmm76mHbvOXDtiO2QPUcKo/TWkQ0i2JFXpBoo7vij1i1Lp3ADAo+qvG3V0rM//vFnnTE4hxd5Ka/Cor5YEdsLVJyKtDgVoHgtW11pWSjolPNMnrlrVj9Fv2Qn60twMwKPqr+N/wvr8z5tZcDsDrv06tkqyzESM85Ycv6XBWA2birlNCXrI6VbD2lx2L0vQO0QVTVVLH4SE67fgsfVXv8n7sz7/85Z7cMtbE6f088wSaR4kCkCm10s6pKbJhfqiUNGLq+0gLWC6eUAZFPnLjwqtKd8EwGvWX59t7iPW4X/eAN1svgRVSY990YZg06BD1ohLMtyFTI4pKTJsS9xREq9EOaPWiO2gpms7397x6nQJkbh+Fz2q/rqRROX6/M8bJrqlVW4l6JEptKeUFuMYUbtCQ7CIttpGc6MY93x1r1vgAnRXvY5cvwWPqb9uWQm+lP95QxdNMeWhOq1x0Db55C7GcUv2ZUuN6n8iKzsvOxibC//Yfs9Na8r2Rlz02vXXDT57FP/zJi66/EJSmsJKa8QxnoqW3VLQ+jZVUtJwJ8PNX1NQCwfNgdhhHD9on7PdRdrdGPF28rJr1F+3LBdeyv+8yYfLoMYet1vX4upNAjVvwOUWnlNXJXlkzk5Il6kqeoiL0C07qno+/CYBXq/+utlnsz7/Mzvy0tmI4zm4ag23PRN3t/CWryoUVJGm+5+K8RJ0V8Hc88/XHUX/HfiAq7t+BH+x6v8t438enWmdJwFA6ZINriLGKv/95f8lT9/FnyA1NMVEvQyaXuu+gz36f/DD73E4pwqpLcvm/o0Vle78n//+L/NPvoefp1pTJye6e4A/D082FERa5/opeH9zpvh13cNm19/4v/LDe5xMWTi8I0Ta0qKlK27AS/v3/r+/x/2GO9K2c7kVMonDpq7//jc5PKCxeNPpFVzaRr01wF8C4Pu76hXuX18H4LduTr79guuFD3n5BHfI+ZRFhY8w29TYhbbLi/bvBdqKE4fUgg1pBKnV3FEaCWOWyA+m3WpORZr/j+9TKJtW8yBTF2/ZEODI9/QavHkVdGFp/Pjn4Q+u5hXapsP5sOH+OXXA1LiKuqJxiMNbhTkbdJTCy4llEt6NnqRT4dhg1V3nbdrm6dYMecA1yTOL4PWTE9L5VzPFlLBCvlG58AhehnN4uHsAYinyJ+AZ/NkVvELbfOBUuOO5syBIEtiqHU1k9XeISX5bsimrkUUhnGDxourN8SgUsCZVtKyGbyGzHXdjOhsAvOAswSRyIBddRdEZWP6GZhNK/yjwew9ehBo+3jEADu7Ay2n8mDc+TS7awUHg0OMzR0LABhqLD4hJEh/BEGyBdGlSJoXYXtr+3HS4ijzVpgi0paWXtdruGTknXBz+11qT1Q2inxaTzQCO46P3lfLpyS4fou2PH/PupwZgCxNhGlj4IvUuWEsTkqMWm6i4xCSMc9N1RDQoCVcuGItJ/MRWefais+3synowi/dESgJjkilnWnBTGvRWmaw8oR15257t7CHmCf8HOn7cwI8+NQBXMBEmAa8PMRemrNCEhLGEhDQKcGZWS319BX9PFBEwGTbRBhLbDcaV3drFcDqk5kCTd2JF1Wp0HraqBx8U0wwBTnbpCadwBA/gTH/CDrcCs93LV8E0YlmmcyQRQnjBa8JESmGUfIjK/7fkaDJpmD2QptFNVJU1bbtIAjjWQizepOKptRjbzR9Kag6xZmMLLjHOtcLT3Tx9o/0EcTT1XN3E45u24AiwEypDJXihKjQxjLprEwcmRKclaDNZCVqr/V8mYWyFADbusiY5hvgFoU2vio49RgJLn5OsReRFN6tabeetiiy0V7KFHT3HyZLx491u95sn4K1QQSPKM9hNT0wMVvAWbzDSVdrKw4zRjZMyJIHkfq1VAVCDl/bUhNKlGq0zGr05+YAceXVPCttVk0oqjVwMPt+BBefx4yPtGVkUsqY3CHDPiCM5ngupUwCdbkpd8kbPrCWHhkmtIKLEetF2499eS1jZlIPGYnlcPXeM2KD9vLS0bW3ktYNqUllpKLn5ZrsxlIzxvDu5eHxzGLctkZLEY4PgSOg2IUVVcUONzUDBEpRaMoXNmUc0tFZrTZquiLyKxrSm3DvIW9Fil+AkhXu5PhEPx9mUNwqypDvZWdKlhIJQY7vn2OsnmBeOWnYZ0m1iwbbw1U60by5om47iHRV6fOgzjMf/DAZrlP40Z7syxpLK0lJ0gqaAK1c2KQKu7tabTXkLFz0sCftuwX++MyNeNn68k5Buq23YQhUh0SNTJa1ioQ0p4nUG2y0XilF1JqODqdImloPS4Bp111DEWT0jJjVv95uX9BBV7eB3bUWcu0acSVM23YZdd8R8UbQUxJ9wdu3oMuhdt929ME+mh6JXJ8di2RxbTi6TbrDquqV4aUKR2iwT6aZbyOwEXN3DUsWr8Hn4EhwNyHuXHh7/pdaUjtR7vnDh/d8c9xD/s5f501eQ1+CuDiCvGhk1AN/4Tf74RfxPwD3toLarR0zNtsnPzmS64KIRk861dMWCU8ArasG9T9H0ZBpsDGnjtAOM2+/LuIb2iIUGXNgl5ZmKD/Tw8TlaAuihaFP5yrw18v4x1898zIdP+DDAX1bM3GAMvPgRP/cJn3zCW013nrhHkrITyvYuwOUkcHuKlRSW5C6rzIdY4ppnF7J8aAJbQepgbJYBjCY9usGXDKQxq7RZfh9eg5d1UHMVATRaD/4BHK93/1iAgYZ/+jqPn8Dn4UExmWrpa3+ZOK6MvM3bjwfzxNWA2dhs8+51XHSPJiaAhGSpWevEs5xHLXcEGFXYiCONySH3fPWq93JIsBiSWvWyc3CAN+EcXoT7rCSANloPPoa31rt/5PUA/gp8Q/jDD3hyrjzlR8VkanfOvB1XPubt17vzxAfdSVbD1pzAnfgyF3ycadOTOTXhpEUoLC1HZyNGW3dtmjeXgr2r56JNmRwdNNWaQVBddd6rh4MhviEB9EFRD/7RGvePvCbwAL4Mx/D6M541hHO4D3e7g6PafdcZVw689z7NGTwo5om7A8sPhccT6qKcl9NJl9aM/9kX+e59Hh1yPqGuCCZxuITcsmNaJ5F7d0q6J3H48TO1/+M57085q2icdu2U+W36Ldllz9Agiv4YGljoEN908EzvDOrBF98/vtJwCC/BF2AG75xxEmjmMIcjxbjoaxqOK3/4hPOZzhMPBpYPG44CM0dTVm1LjLtUWWVz1Bcf8tEx0zs8O2A2YVHRxKYOiy/aOVoAaMu0i7ubu43njjmd4ibMHU1sIDHaQNKrZND/FZYdk54oCXetjq7E7IVl9eAL7t+oHnwXXtLx44czzoRFHBztYVwtH1d+NOMkupZ5MTM+gUmq90X+Bh9zjRlmaQ+m7YMqUL/veemcecAtOJ0yq1JnVlN27di2E0+Klp1tAJ4KRw1eMI7aJjsO3R8kPSI3fUFXnIOfdQe86sIIVtWDL7h//Ok6vj8vwDk08NEcI8zz7OhBy+WwalzZeZ4+0XniRfst9pAJqQHDGLzVQ2pheZnnv1OWhwO43/AgcvAEXEVVpa4db9sGvNK8wjaENHkfFQ4Ci5i7dqnQlPoLQrHXZDvO3BIXZbJOBrOaEbML6sFL798I4FhKihjHMsPjBUZYCMFr6nvaArxqXPn4lCa+cHfSa2cP27g3Z3ziYTRrcbQNGLQmGF3F3cBdzzzX7AILx0IB9rbwn9kx2G1FW3Inic+ZLIsVvKR8Zwfj0l1fkqo8LWY1M3IX14OX3r9RKTIO+d9XzAI8qRPGPn/4NC2n6o4rN8XJ82TOIvuVA8zLKUHRFgBCetlDZlqR1gLKjS39xoE7Bt8UvA6BxuEDjU3tFsEijgA+615tmZkXKqiEENrh41iLDDZNq4pKTWR3LZfnos81LOuNa15cD956vLMsJd1rqYp51gDUQqMYm2XsxnUhD2jg1DM7SeuJxxgrmpfISSXVIJIS5qJJSvJPEQ49DQTVIbYWJ9QWa/E2+c/oPK1drmC7WSfJRNKBO5Yjvcp7Gc3dmmI/Xh1kDTEuiSnWqQf37h+fTMhGnDf6dsS8SQfQWlqqwXXGlc/PEZ/SC5mtzIV0nAshlQdM/LvUtYutrEZ/Y+EAFtq1k28zQhOwLr1AIeANzhF8t9qzTdZf2qRKO6MWE9ohBYwibbOmrFtNmg3mcS+tB28xv2uKd/agYCvOP+GkSc+0lr7RXzyufL7QbkUpjLjEWFLqOIkAGu2B0tNlO9Eau2W1qcOUvVRgKzypKIQZ5KI3q0MLzqTNRYqiZOqmtqloIRlmkBHVpHmRYV6/HixbO6UC47KOFJnoMrVyr7wYz+SlW6GUaghYbY1I6kkxA2W1fSJokUdSh2LQ1GAimRGm0MT+uu57H5l7QgOWxERpO9moLRPgTtquWCfFlGlIjQaRly9odmzMOWY+IBO5tB4sW/0+VWGUh32qYk79EidWKrjWuiLpiVNGFWFRJVktyeXWmbgBBzVl8anPuXyNJlBJOlKLTgAbi/EYHVHxWiDaVR06GnHQNpJcWcK2jJtiCfG2sEHLzuI66sGrMK47nPIInPnu799935aOK2cvmvubrE38ZzZjrELCmXM2hM7UcpXD2oC3+ECVp7xtIuxptJ0jUr3sBmBS47TVxlvJ1Sqb/E0uLdvLj0lLr29ypdd/eMX3f6lrxGlKwKQxEGvw0qHbkbwrF3uHKwVENbIV2wZ13kNEF6zD+x24aLNMfDTCbDPnEikZFyTNttxWBXDaBuM8KtI2rmaMdUY7cXcUPstqTGvBGSrFWIpNMfbdea990bvAOC1YX0qbc6smDS1mPxSJoW4fwEXvjMmhlijDRq6qale6aJEuFGoppYDoBELQzLBuh/mZNx7jkinv0EtnUp50lO9hbNK57lZaMAWuWR5Yo9/kYwcYI0t4gWM47Umnl3YmpeBPqSyNp3K7s2DSAS/39KRuEN2bS4xvowV3dFRMx/VFcp2Yp8w2nTO9hCXtHG1kF1L4KlrJr2wKfyq77R7MKpFKzWlY9UkhYxyHWW6nBWPaudvEAl3CGcNpSXPZ6R9BbBtIl6cHL3gIBi+42CYXqCx1gfGWe7Ap0h3luyXdt1MKy4YUT9xSF01G16YEdWsouW9mgDHd3veyA97H+Ya47ZmEbqMY72oPztCGvK0onL44AvgC49saZKkWRz4veWljE1FHjbRJaWv6ZKKtl875h4CziFCZhG5rx7tefsl0aRT1bMHZjm8dwL/6u7wCRysaQblQoG5yAQN5zpatMNY/+yf8z+GLcH/Qn0iX2W2oEfXP4GvwQHuIL9AYGnaO3zqAX6946nkgqZNnUhx43DIdQtMFeOPrgy/y3Yd85HlJWwjLFkU3kFwq28xPnuPhMWeS+tDLV9Otllq7pQCf3uXJDN9wFDiUTgefHaiYbdfi3b3u8+iY6TnzhgehI1LTe8lcd7s1wJSzKbahCRxKKztTLXstGAiu3a6rPuQs5pk9TWAan5f0BZmGf7Ylxzzk/A7PAs4QPPPAHeFQ2hbFHszlgZuKZsJcUmbDC40sEU403cEjczstOEypa+YxevL4QBC8oRYqWdK6b7sK25tfE+oDZgtOQ2Jg8T41HGcBE6fTWHn4JtHcu9S7uYgU5KSCkl/mcnq+5/YBXOEr6lCUCwOTOM1taOI8mSxx1NsCXBEmLKbMAg5MkwbLmpBaFOPrNSlO2HnLiEqW3tHEwd8AeiQLmn+2gxjC3k6AxREqvKcJbTEzlpLiw4rNZK6oJdidbMMGX9FULKr0AkW+2qDEPBNNm5QAt2Ik2nftNWHetubosHLo2nG4vQA7GkcVCgVCgaDixHqo9UUn1A6OshapaNR/LPRYFV8siT1cCtJE0k/3WtaNSuUZYKPnsVIW0xXWnMUxq5+En4Kvw/MqQmVXnAXj9Z+9zM98zM/Agy7F/qqj2Nh67b8HjFnPP3iBn/tkpdzwEJX/whIcQUXOaikeliCRGUk7tiwF0rItwMEhjkZ309hikFoRAmLTpEXWuHS6y+am/KB/fM50aLEhGnSMwkpxzOov4H0AvgovwJ1iGzDLtJn/9BU+fAINfwUe6FHSLhu83viV/+/HrOePX+STT2B9uWGbrMHHLldRBlhS/CJQmcRxJFqZica01XixAZsYiH1uolZxLrR/SgxVIJjkpQP4PE9sE59LKLr7kltSBogS5tyszzH8Fvw8/AS8rNOg0xUS9fIaHwb+6et8Q/gyvKRjf5OusOzGx8evA/BP4IP11uN/grca5O0lcsPLJ5YjwI4QkJBOHa0WdMZYGxPbh2W2nR9v3WxEWqgp/G3+6VZbRLSAAZ3BhdhAaUL33VUSw9yjEsvbaQ9u4A/gGXwZXoEHOuU1GSj2chf+Mo+f8IcfcAxfIKVmyunRbYQVnoevwgfw3TXXcw++xNuP4fhyueEUNttEduRVaDttddoP0eSxLe2LENk6itYxlrxBNBYrNNKSQmeaLcm9c8UsaB5WyO6675yyQIAWSDpBVoA/gxmcwEvwoDv0m58UE7gHn+fJOa8/Ywan8EKRfjsopF83eCglX/Sfr7OeaRoQfvt1CGvIDccH5BCvw1sWIzRGC/66t0VTcLZQZtm6PlAasbOJ9iwWtUo7biktTSIPxnR24jxP1ZKaqq+2RcXM9OrBAm/AAs7hDJ5bNmGb+KIfwCs8a3jnjBrOFeMjHSCdbKr+2uOLfnOd9eiA8Hvvwwq54VbP2OqwkB48Ytc4YEOiH2vTXqodabfWEOzso4qxdbqD5L6tbtNPECqbhnA708DZH4QOJUXqScmUlks7Ot6FBuZw3n2mEbaUX7kDzxHOOQk8nKWMzAzu6ZZ8sOFw4RK+6PcuXo9tB4SbMz58ApfKDXf3szjNIIbGpD5TKTRxGkEMLjLl+K3wlWXBsCUxIDU+jbOiysESqAy1MGUJpXgwbTWzNOVEziIXZrJ+VIztl1PUBxTSo0dwn2bOmfDRPD3TRTGlfbCJvO9KvuhL1hMHhB9wPuPRLGHcdOWG2xc0U+5bQtAJT0nRTewXL1pgk2+rZAdeWmz3jxAqfNQQdzTlbF8uJ5ecEIWvTkevAHpwz7w78QujlD/Lr491bD8/1vhM2yrUQRrWXNQY4fGilfctMWYjL72UL/qS9eiA8EmN88nbNdour+PBbbAjOjIa4iBhfFg6rxeKdEGcL6p3EWR1Qq2Qkhs2DrnkRnmN9tG2EAqmgPw6hoL7Oza7B+3SCrR9tRftko+Lsf2F/mkTndN2LmzuMcKTuj/mX2+4Va3ki16+nnJY+S7MefpkidxwnV+4wkXH8TKnX0tsYzYp29DOOoSW1nf7nTh2akYiWmcJOuTidSaqESrTYpwjJJNVGQr+rLI7WsqerHW6Kp/oM2pKuV7T1QY9gjqlZp41/WfKpl56FV/0kvXQFRyeQ83xaTu5E8p5dNP3dUF34ihyI3GSpeCsywSh22ZJdWto9winhqifb7VRvgktxp13vyjrS0EjvrRfZ62uyqddSWaWYlwTPAtJZ2oZ3j/Sgi/mi+6vpzesfAcWNA0n8xVyw90GVFGuZjTXEQy+6GfLGLMLL523f5E0OmxVjDoOuRiH91RKU+vtoCtH7TgmvBLvtFXWLW15H9GTdVw8ow4IlRLeHECN9ym1e9K0I+Cbnhgv4Yu+aD2HaQJ80XDqOzSGAV4+4yCqBxrsJAX6ZTIoX36QnvzhhzzMfFW2dZVLOJfo0zbce5OvwXMFaZ81mOnlTVXpDZsQNuoYWveketKb5+6JOOsgX+NTm7H49fUTlx+WLuWL7qxnOFh4BxpmJx0p2gDzA/BUARuS6phR+pUsY7MMboAHx5xNsSVfVZcYSwqCKrqon7zM+8ecCkeS4nm3rINuaWvVNnMRI1IRpxTqx8PZUZ0Br/UEduo3B3hNvmgZfs9gQPj8vIOxd2kndir3awvJ6BLvoUuOfFWNYB0LR1OQJoUySKb9IlOBx74q1+ADC2G6rOdmFdJcD8BkfualA+BdjOOzP9uUhGUEX/TwhZsUduwRr8wNuXKurCixLBgpQI0mDbJr9dIqUuV+92ngkJZ7xduCk2yZKbfWrH1VBiTg9VdzsgRjW3CVXCvAwDd+c1z9dWw9+B+8MJL/eY15ZQ/HqvTwVdsZn5WQsgRRnMaWaecu3jFvMBEmgg+FJFZsnSl0zjB9OqPYaBD7qmoVyImFvzi41usesV0julaAR9dfR15Xzv9sEruRDyk1nb+QaLU67T885GTls6YgcY+UiMa25M/pwGrbCfzkvR3e0jjtuaFtnwuagHTSb5y7boBH119HXhvwP487jJLsLJ4XnUkHX5sLbS61dpiAXRoZSCrFJ+EjpeU3puVfitngYNo6PJrAigKktmwjyQdZpfq30mmtulaAx9Zfx15Xzv+cyeuiBFUs9zq8Kq+XB9a4PVvph3GV4E3y8HENJrN55H1X2p8VyqSKwVusJDKzXOZzplWdzBUFK9e+B4+uv468xvI/b5xtSAkBHQaPvtqWzllVvEOxPbuiE6+j2pvjcKsbvI7txnRErgfH7LdXqjq0IokKzga14GzQ23SSbCQvO6r+Or7SMIr/efOkkqSdMnj9mBx2DRsiY29Uj6+qK9ZrssCKaptR6HKURdwUYeUWA2kPzVKQO8ku2nU3Anhs/XWkBx3F/7wJtCTTTIKftthue1ty9xvNYLY/zo5KSbIuKbXpbEdSyeRyYdAIwKY2neyoc3+k1XUaufYga3T9daMUx/r8z1s10ITknIO0kuoMt+TB8jK0lpayqqjsJ2qtXAYwBU932zinimgmd6mTRDnQfr88q36NAI+tv24E8Pr8zxtasBqx0+xHH9HhlrwsxxNUfKOHQaZBITNf0uccj8GXiVmXAuPEAKSdN/4GLHhs/XWj92dN/uetNuBMnVR+XWDc25JLjo5Mg5IZIq226tmCsip2zZliL213YrTlL2hcFjpCduyim3M7/eB16q/blQsv5X/esDRbtJeabLIosWy3ycavwLhtxdWzbMmHiBTiVjJo6lCLjXZsi7p9PEPnsq6X6wd4bP11i0rD5fzPm/0A6brrIsllenZs0lCJlU4abakR59enZKrKe3BZihbTxlyZ2zl1+g0wvgmA166/bhwDrcn/7Ddz0eWZuJvfSESug6NzZsox3Z04FIxz0mUjMwVOOVTq1CQ0AhdbBGVdjG/CgsfUX7esJl3K/7ytWHRv683praW/8iDOCqWLLhpljDY1ZpzK75QiaZoOTpLKl60auHS/97oBXrv+umU9+FL+5+NtLFgjqVLCdbmj7pY5zPCPLOHNCwXGOcLquOhi8CmCWvbcuO73XmMUPab+ug3A6/A/78Bwe0bcS2+tgHn4J5pyS2WbOck0F51Vq3LcjhLvZ67p1ABbaL2H67bg78BfjKi/jr3+T/ABV3ilLmNXTI2SpvxWBtt6/Z//D0z/FXaGbSBgylzlsEGp+5//xrd4/ae4d8DUUjlslfIYS3t06HZpvfQtvv0N7AHWqtjP2pW08QD/FLy//da38vo8PNlKHf5y37Dxdfe/oj4kVIgFq3koLReSR76W/bx//n9k8jonZxzWTANVwEniDsg87sOSd/z7//PvMp3jQiptGVWFX2caezzAXwfgtzYUvbr0iozs32c3Uge7varH+CNE6cvEYmzbPZ9hMaYDdjK4V2iecf6EcEbdUDVUARda2KzO/JtCuDbNQB/iTeL0EG1JSO1jbXS+nLxtPMDPw1fh5+EPrgSEKE/8Gry5A73ui87AmxwdatyMEBCPNOCSKUeRZ2P6Myb5MRvgCHmA9ywsMifU+AYXcB6Xa5GibUC5TSyerxyh0j6QgLVpdyhfArRTTLqQjwe4HOD9s92D4Ap54odXAPBWLAwB02igG5Kkc+piN4lvODIFGAZgT+EO4Si1s7fjSR7vcQETUkRm9O+MXyo9OYhfe4xt9STQ2pcZRLayCV90b4D3jR0DYAfyxJ+eywg2IL7NTMXna7S/RpQ63JhWEM8U41ZyQGjwsVS0QBrEKLu8xwZsbi4wLcCT+OGidPIOCe1PiSc9Qt+go+vYqB7cG+B9d8cAD+WJPz0Am2gxXgU9IneOqDpAAXOsOltVuMzpdakJXrdPCzXiNVUpCeOos5cxnpQT39G+XVLhs1osQVvJKPZyNq8HDwd4d7pNDuWJPxVX7MSzqUDU6gfadKiNlUFTzLeFHHDlzO4kpa7aiKhBPGKwOqxsBAmYkOIpipyXcQSPlRTf+Tii0U3EJGaZsDER2qoB3h2hu0qe+NNwUooYU8y5mILbJe6OuX+2FTKy7bieTDAemaQyQ0CPthljSWO+xmFDIYiESjM5xKd6Ik5lvLq5GrQ3aCMLvmCA9wowLuWJb9xF59hVVP6O0CrBi3ZjZSNOvRy+I6klNVRJYRBaEzdN+imiUXQ8iVF8fsp+W4JXw7WISW7fDh7lptWkCwZ4d7QTXyBPfJMYK7SijjFppGnlIVJBJBYj7eUwtiP1IBXGI1XCsjNpbjENVpSAJ2hq2LTywEly3hUYazt31J8w2+aiLx3g3fohXixPfOMYm6zCGs9LVo9MoW3MCJE7R5u/WsOIjrqBoHUO0bJE9vxBpbhsd3+Nb4/vtPCZ4oZYCitNeYuC/8UDvDvy0qvkiW/cgqNqRyzqSZa/s0mqNGjtKOoTm14zZpUauiQgVfqtQiZjq7Q27JNaSK5ExRcrGCXO1FJYh6jR6CFqK7bZdQZ4t8g0rSlPfP1RdBtqaa9diqtzJkQ9duSryi2brQXbxDwbRUpFMBHjRj8+Nt7GDKgvph9okW7LX47gu0SpGnnFQ1S1lYldOsC7hYteR574ZuKs7Ei1lBsfdz7IZoxzzCVmmVqaSySzQbBVAWDek+N4jh9E/4VqZrJjPwiv9BC1XcvOWgO8275CVyBPvAtTVlDJfZkaZGU7NpqBogAj/xEHkeAuJihWYCxGN6e8+9JtSegFXF1TrhhLGP1fak3pebgPz192/8gB4d/6WT7+GdYnpH7hH/DJzzFiYPn/vjW0SgNpTNuPIZoAEZv8tlGw4+RLxy+ZjnKa5NdFoC7UaW0aduoYse6+bXg1DLg6UfRYwmhGEjqPvF75U558SANrElK/+MdpXvmqBpaXOa/MTZaa1DOcSiLaw9j0NNNst3c+63c7EKTpkvKHzu6bPbP0RkuHAVcbRY8ijP46MIbQeeT1mhA+5PV/inyDdQipf8LTvMXbwvoDy7IruDNVZKTfV4CTSRUYdybUCnGU7KUTDxLgCknqUm5aAW6/1p6eMsOYsphLzsHrE0Y/P5bQedx1F/4yPHnMB3/IOoTU9+BL8PhtjuFKBpZXnYNJxTuv+2XqolKR2UQgHhS5novuxVySJhBNRF3SoKK1XZbbXjVwWNyOjlqWJjrWJIy+P5bQedyldNScP+HZ61xKSK3jyrz+NiHG1hcOLL/+P+PDF2gOkekKGiNWKgJ+8Z/x8Iv4DdQHzcpZyF4v19I27w9/yPGDFQvmEpKtqv/TLiWMfn4sofMm9eAH8Ao0zzh7h4sJqYtxZd5/D7hkYPneDzl5idlzNHcIB0jVlQ+8ULzw/nc5/ojzl2juE0apD7LRnJxe04dMz2iOCFNtGFpTuXA5AhcTRo8mdN4kz30nVjEC4YTZQy4gpC7GlTlrePKhGsKKgeXpCYeO0MAd/GH7yKQUlXPLOasOH3FnSphjHuDvEu4gB8g66oNbtr6eMbFIA4fIBJkgayoXriw2XEDQPJrQeROAlY6aeYOcMf+IVYTU3XFlZufMHinGywaW3YLpObVBAsbjF4QJMsVUSayjk4voPsHJOQfPWDhCgDnmDl6XIRerD24HsGtw86RMHOLvVSHrKBdeVE26gKB5NKHzaIwLOmrqBWJYZDLhASG16c0Tn+CdRhWDgWXnqRZUTnPIHuMJTfLVpkoYy5CzylHVTGZMTwkGAo2HBlkQplrJX6U+uF1wZz2uwS1SQ12IqWaPuO4baZaEFBdukksJmkcTOm+YJSvoqPFzxFA/YUhIvWxcmSdPWTWwbAKVp6rxTtPFUZfKIwpzm4IoMfaYQLWgmlG5FME2gdBgm+J7J+rtS/XBbaVLsR7bpPQnpMFlo2doWaVceHk9+MkyguZNCJ1He+kuHTWyQAzNM5YSUg/GlTk9ZunAsg1qELVOhUSAK0LABIJHLKbqaEbHZLL1VA3VgqoiOKXYiS+HRyaEKgsfIqX64HYWbLRXy/qWoylIV9gudL1OWBNgBgTNmxA6b4txDT4gi3Ri7xFSLxtXpmmYnzAcWDZgY8d503LFogz5sbonDgkKcxGsWsE1OI+rcQtlgBBCSOKD1mtqYpIU8cTvBmAT0yZe+zUzeY92fYjTtGipXLhuR0ePoHk0ofNWBX+lo8Z7pAZDk8mEw5L7dVyZZoE/pTewbI6SNbiAL5xeygW4xPRuLCGbhcO4RIeTMFYHEJkYyEO9HmJfXMDEj/LaH781wHHZEtqSQ/69UnGpzH7LKIAZEDSPJnTesJTUa+rwTepI9dLJEawYV+ZkRn9g+QirD8vF8Mq0jFQ29js6kCS3E1+jZIhgPNanHdHFqFvPJLHqFwQqbIA4jhDxcNsOCCQLDomaL/dr5lyJaJU6FxPFjO3JOh3kVMcROo8u+C+jo05GjMF3P3/FuDLn5x2M04xXULPwaS6hBYki+MrMdZJSgPHlcB7nCR5bJ9Kr5ACUn9jk5kivdd8tk95SOGrtqu9lr2IhK65ZtEl7ZKrp7DrqwZfRUSN1el7+7NJxZbywOC8neNKTch5vsTEMNsoCCqHBCqIPRjIPkm0BjvFODGtto99rCl+d3wmHkW0FPdpZtC7MMcVtGFQjJLX5bdQ2+x9ypdc313uj8xlsrfuLgWXz1cRhZvJYX0iNVBRcVcmCXZs6aEf3RQF2WI/TcCbKmGU3IOoDJGDdDub0+hYckt6PlGu2BcxmhbTdj/klhccLGJMcqRjMJP1jW2ETqLSWJ/29MAoORluJ+6LPffBZbi5gqi5h6catQpmOT7/OFf5UorRpLzCqcMltBLhwd1are3kztrSzXO0LUbXRQcdLh/RdSZ+swRm819REDrtqzC4es6Gw4JCKlSnjYVpo0xeq33PrADbFLL3RuCmObVmPN+24kfa+AojDuM4umKe2QwCf6EN906HwjujaitDs5o0s1y+k3lgbT2W2i7FJdnwbLXhJUBq/9liTctSmFC/0OqUinb0QddTWamtjbHRFuWJJ6NpqZ8vO3fZJ37Db+2GkaPYLGHs7XTTdiFQJ68SkVJFVmY6McR5UycflNCsccHFaV9FNbR4NttLxw4pQ7wJd066Z0ohVbzihaxHVExd/ay04oxUKWt+AsdiQ9OUyZ2krzN19IZIwafSTFgIBnMV73ADj7V/K8u1MaY2sJp2HWm0f41tqwajEvdHWOJs510MaAqN4aoSiPCXtN2KSi46dUxHdaMquar82O1x5jqhDGvqmoE9LfxcY3zqA7/x3HA67r9ZG4O6Cuxu12/+TP+eLP+I+HErqDDCDVmBDO4larujNe7x8om2rMug0MX0rL1+IWwdwfR+p1TNTyNmVJ85ljWzbWuGv8/C7HD/izjkHNZNYlhZcUOKVzKFUxsxxN/kax+8zPWPSFKw80rJr9Tizyj3o1gEsdwgWGoxPezDdZ1TSENE1dLdNvuKL+I84nxKesZgxXVA1VA1OcL49dFlpFV5yJMhzyCmNQ+a4BqusPJ2bB+xo8V9u3x48VVIEPS/mc3DvAbXyoYr6VgDfh5do5hhHOCXMqBZUPhWYbWZECwVJljLgMUWOCB4MUuMaxGNUQDVI50TQ+S3kFgIcu2qKkNSHVoM0SHsgoZxP2d5HH8B9woOk4x5bPkKtAHucZsdykjxuIpbUrSILgrT8G7G5oCW+K0990o7E3T6AdW4TilH5kDjds+H64kS0mz24grtwlzDHBJqI8YJQExotPvoC4JBq0lEjjQkyBZ8oH2LnRsQ4Hu1QsgDTJbO8fQDnllitkxuVskoiKbRF9VwzMDvxHAdwB7mD9yCplhHFEyUWHx3WtwCbSMMTCUCcEmSGlg4gTXkHpZXWQ7kpznK3EmCHiXInqndkQjunG5kxTKEeGye7jWz9cyMR2mGiFQ15ENRBTbCp+Gh86vAyASdgmJq2MC6hoADQ3GosP0QHbnMHjyBQvQqfhy/BUbeHd5WY/G/9LK/8Ka8Jd7UFeNWEZvzPb458Dn8DGLOe3/wGL/4xP+HXlRt+M1PE2iLhR8t+lfgxsuh7AfO2AOf+owWhSZRYQbd622hbpKWKuU+XuvNzP0OseRDa+mObgDHJUSc/pKx31QdKffQ5OIJpt8GWjlgTwMc/w5MPCR/yl1XC2a2Yut54SvOtMev55Of45BOat9aWG27p2ZVORRvnEk1hqWMVUmqa7S2YtvlIpspuF1pt0syuZS2NV14mUidCSfzQzg+KqvIYCMljIx2YK2AO34fX4GWdu5xcIAb8MzTw+j/lyWM+Dw/gjs4GD6ehNgA48kX/AI7XXM/XAN4WHr+9ntywqoCakCqmKP0rmQrJJEErG2Upg1JObr01lKQy4jskWalKYfJ/EDLMpjNSHFEUAde2fltaDgmrNaWQ9+AAb8I5vKjz3L1n1LriB/BXkG/wwR9y/oRX4LlioHA4LzP2inzRx/DWmutRweFjeP3tNeSGlaE1Fde0OS11yOpmbIp2u/jF1n2RRZviJM0yBT3IZl2HWImKjQOxIyeU325b/qWyU9Moj1o07tS0G7qJDoGHg5m8yeCxMoEH8GU45tnrNM84D2l297DQ9t1YP7jki/7RmutRweEA77/HWXOh3HCxkRgldDQkAjNTMl2Iloc1qN5JfJeeTlyTRzxURTdn1Ixv2uKjs12AbdEWlBtmVdk2k7FFwj07PCZ9XAwW3dG+8xKzNFr4EnwBZpy9Qzhh3jDXebBpYcpuo4fQ44u+fD1dweEnHzI7v0xuuOALRUV8rXpFyfSTQYkhd7IHm07jpyhlkCmI0ALYqPTpUxXS+z4jgDj1Pflvmz5ecuItpIBxyTHpSTGWd9g1ApfD/bvwUhL4nT1EzqgX7cxfCcNmb3mPL/qi9SwTHJ49oj5ZLjccbTG3pRmlYi6JCG0mQrAt1+i2UXTZ2dv9IlQpN5naMYtviaXlTrFpoMsl3bOAFEa8sqPj2WCMrx3Yjx99qFwO59Aw/wgx+HlqNz8oZvA3exRDvuhL1jMQHPaOJ0+XyA3fp1OfM3qObEVdhxjvynxNMXQV4+GJyvOEFqeQBaIbbO7i63rpxCltdZShPFxkjM2FPVkn3TG+Rp9pO3l2RzFegGfxGDHIAh8SteR0C4HopXzRF61nheDw6TFN05Ebvq8M3VKKpGjjO6r7nhudTEGMtYM92HTDaR1FDMXJ1eThsbKfywyoWwrzRSXkc51flG3vIid62h29bIcFbTGhfV+faaB+ohj7dPN0C2e2lC96+XouFByen9AsunLDJZ9z7NExiUc0OuoYW6UZkIyx2YUR2z6/TiRjyKMx5GbbjLHvHuf7YmtKghf34LJfx63Yg8vrvN2zC7lY0x0tvKezo4HmGYDU+Gab6dFL+KI761lDcNifcjLrrr9LWZJctG1FfU1uwhoQE22ObjdfkSzY63CbU5hzs21WeTddH2BaL11Gi7lVdlxP1nkxqhnKhVY6knS3EPgVGg1JpN5cP/hivujOelhXcPj8HC/LyI6MkteVjlolBdMmF3a3DbsuAYhL44dxzthWSN065xxUd55Lmf0wRbOYOqH09/o9WbO2VtFdaMb4qBgtFJoT1SqoN8wPXMoXLb3p1PUEhxfnnLzGzBI0Ku7FxrKsNJj/8bn/H8fPIVOd3rfrklUB/DOeO+nkghgSPzrlPxluCMtOnDL4Yml6dK1r3vsgMxgtPOrMFUZbEUbTdIzii5beq72G4PD0DKnwjmBULUVFmy8t+k7fZ3pKc0Q4UC6jpVRqS9Umv8bxw35flZVOU1X7qkjnhZlsMbk24qQ6Hz7QcuL6sDC0iHHki96Uh2UdvmgZnjIvExy2TeJdMDZNSbdZyAHe/Yd1xsQhHiKzjh7GxQ4yqMPaywPkjMamvqrYpmO7Knad+ZQC5msCuAPWUoxrxVhrGv7a+KLXFhyONdTMrZ7ke23qiO40ZJUyzgYyX5XyL0mV7NiUzEs9mjtbMN0dERqwyAJpigad0B3/zRV7s4PIfXSu6YV/MK7+OrYe/JvfGMn/PHJe2fyUdtnFrKRNpXV0Y2559aWPt/G4BlvjTMtXlVIWCnNyA3YQBDmYIodFz41PvXPSa6rq9lWZawZ4dP115HXV/M/tnFkkrBOdzg6aP4pID+MZnTJ1SuuB6iZlyiox4HT2y3YBtkUKWooacBQUDTpjwaDt5poBHl1/HXltwP887lKKXxNUEyPqpGTyA699UqY/lt9yGdlUKra0fFWS+36iylVWrAyd7Uw0CZM0z7xKTOduznLIjG2Hx8cDPLb+OvK6Bv7n1DYci4CxUuRxrjBc0bb4vD3rN5Zz36ntLb83eVJIB8LiIzCmn6SMPjlX+yNlTjvIGjs+QzHPf60Aj62/jrzG8j9vYMFtm1VoRWCJdmw7z9N0t+c8cxZpPeK4aTRicS25QhrVtUp7U578chk4q04Wx4YoQSjFryUlpcQ1AbxZ/XVMknIU//OGl7Q6z9Zpxi0+3yFhSkjUDpnCIUhLWVX23KQ+L9vKvFKI0ZWFQgkDLvBoylrHNVmaw10zwCPrr5tlodfnf94EWnQ0lFRWy8pW9LbkLsyUVDc2NSTHGDtnD1uMtchjbCeb1mpxFP0YbcClhzdLu6lfO8Bj6q+bdT2sz/+8SZCV7VIxtt0DUn9L7r4cLYWDSXnseEpOGFuty0qbOVlS7NNzs5FOGJUqQpl2Q64/yBpZf90sxbE+//PGdZ02HSipCbmD6NItmQ4Lk5XUrGpDMkhbMm2ZVheNYV+VbUWTcv99+2NyX1VoafSuC+AN6q9bFIMv5X/eagNWXZxEa9JjlMwNWb00akGUkSoepp1/yRuuqHGbUn3UdBSTxBU6SEVklzWRUkPndVvw2PrrpjvxOvzPmwHc0hpmq82npi7GRro8dXp0KXnUQmhZbRL7NEVp1uuZmO45vuzKsHrktS3GLWXODVjw+vXXLYx4Hf7njRPd0i3aoAGX6W29GnaV5YdyDj9TFkakje7GHYzDoObfddHtOSpoi2SmzJHrB3hM/XUDDEbxP2/oosszcRlehWXUvzHv4TpBVktHqwenFo8uLVmy4DKLa5d3RtLrmrM3aMFr1183E4sewf+85VWeg1c5ag276NZrM9IJVNcmLEvDNaV62aq+14IAOGFsBt973Ra8Xv11YzXwNfmft7Jg2oS+XOyoC8/cwzi66Dhmgk38kUmP1CUiYWOX1bpD2zWXt2FCp7uq8703APAa9dfNdscR/M/bZLIyouVxqJfeWvG9Je+JVckHQ9+CI9NWxz+blX/KYYvO5n2tAP/vrlZ7+8/h9y+9qeB/Hnt967e5mevX10rALDWK//FaAT5MXdBXdP0C/BAes792c40H+AiAp1e1oH8HgH94g/Lttx1gp63op1eyoM/Bvw5/G/7xFbqJPcCXnmBiwDPb/YKO4FX4OjyCb289db2/Noqicw4i7N6TVtoz8tNwDH+8x/i6Ae7lmaQVENzJFb3Di/BFeAwz+Is9SjeQySpPqbLFlNmyz47z5a/AF+AYFvDmHqibSXTEzoT4Gc3OALaqAP4KPFUJ6n+1x+rGAM6Zd78bgJ0a8QN4GU614vxwD9e1Amy6CcskNrczLx1JIp6HE5UZD/DBHrFr2oNlgG4Odv226BodoryjGJ9q2T/AR3vQrsOCS0ctXZi3ruLlhpFDJYl4HmYtjQCP9rhdn4suySLKDt6wLcC52h8xPlcjju1fn+yhuw4LZsAGUuo2b4Fx2UwQu77uqRHXGtg92aN3tQCbFexc0uk93vhTXbct6y7MulLycoUljx8ngDMBg1tvJjAazpEmOtxlzclvj1vQf1Tx7QlPDpGpqgtdSKz/d9/hdy1vTfFHSmC9dGDZbLiezz7Ac801HirGZsWjydfZyPvHXL/Y8Mjzg8BxTZiuwKz4Eb8sBE9zznszmjvFwHKPIWUnwhqfVRcd4Ck0K6ate48m1oOfrX3/yOtvAsJ8zsPAM89sjnddmuLuDPjX9Bu/L7x7xpMzFk6nWtyQfPg278Gn4Aekz2ZgOmU9eJ37R14vwE/BL8G3aibCiWMWWDQ0ZtkPMnlcGeAu/Ag+8ZyecU5BPuy2ILD+sQqyZhAKmn7XZd+jIMTN9eBL7x95xVLSX4On8EcNlXDqmBlqS13jG4LpmGbkF/0CnOi3H8ETOIXzmnmtb0a16Tzxj1sUvQCBiXZGDtmB3KAefPH94xcUa/6vwRn80GOFyjEXFpba4A1e8KQfFF+259tx5XS4egYn8fQsLGrqGrHbztr+uByTahWuL1NUGbDpsnrwBfePPwHHIf9X4RnM4Z2ABWdxUBlqQ2PwhuDxoS0vvqB1JzS0P4h2nA/QgTrsJFn+Y3AOjs9JFC07CGWX1oNX3T/yHOzgDjwPn1PM3g9Jk9lZrMEpxnlPmBbjyo2+KFXRU52TJM/2ALcY57RUzjObbjqxVw++4P6RAOf58pcVsw9Daje3htriYrpDOonre3CudSe6bfkTEgHBHuDiyu5MCsc7BHhYDx7ePxLjqigXZsw+ijMHFhuwBmtoTPtOxOrTvYJDnC75dnUbhfwu/ZW9AgYd+peL68HD+0emKquiXHhWjJg/UrkJYzuiaL3E9aI/ytrCvAd4GcYZMCkSQxfUg3v3j8c4e90j5ZTPdvmJJGHnOCI2nHS8081X013pHuBlV1gB2MX1YNmWLHqqGN/TWmG0y6clJWthxNUl48q38Bi8vtMKyzzpFdSDhxZ5WBA5ZLt8Jv3895DduBlgbPYAj8C4B8hO68FDkoh5lydC4FiWvBOVqjYdqjiLv92t8yPDjrDaiHdUD15qkSURSGmXJwOMSxWAXYwr3zaAufJ66l+94vv3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/wHuD9tQd4f+0B3l97gPfXHuD9tQd4f+0B3l97gG8LwP8G/AL8O/A5OCq0Ys2KIdv/qOIXG/4mvFAMF16gZD+2Xvu/B8as5+8bfllWyg0zaNO5bfXj6vfhhwD86/Aq3NfRS9t9WPnhfnvCIw/CT8GLcFTMnpntdF/z9V+PWc/vWoIH+FL3Znv57PitcdGP4R/C34avw5fgRVUInCwbsn1yyA8C8zm/BH8NXoXnVE6wVPjdeCI38kX/3+Ct9dbz1pTmHFRu+Hm4O9Ch3clr99negxfwj+ER/DR8EV6B5+DuQOnTgUw5rnkY+FbNU3gNXh0o/JYTuWOvyBf9FvzX663HH/HejO8LwAl8Hl5YLTd8q7sqA3wbjuExfAFegQdwfyDoSkWY8swzEf6o4Qyewefg+cHNbqMQruSL/u/WWc+E5g7vnnEXgDmcDeSGb/F4cBcCgT+GGRzDU3hZYburAt9TEtHgbM6JoxJ+6NMzzTcf6c2bycv2+KK/f+l6LBzw5IwfqZJhA3M472pWT/ajKxnjv4AFnMEpnBTPND6s2J7qHbPAqcMK74T2mZ4VGB9uJA465It+/eL1WKhYOD7xHOkr1ajK7d0C4+ke4Hy9qXZwpgLr+Znm/uNFw8xQOSy8H9IzjUrd9+BIfenYaylf9FsXr8fBAadnPIEDna8IBcwlxnuA0/Wv6GAWPd7dDIKjMdSWueAsBj4M7TOd06qBbwDwKr7oleuxMOEcTuEZTHWvDYUO7aHqAe0Bbq+HEFRzOz7WVoTDQkVds7A4sIIxfCQdCefFRoIOF/NFL1mPab/nvOakSL/Q1aFtNpUb/nFOVX6gzyg/1nISyDfUhsokIzaBR9Kxm80s5mK+6P56il1jXic7nhQxsxSm3OwBHl4fFdLqi64nDQZvqE2at7cWAp/IVvrN6/BFL1mPhYrGMBfOi4PyjuSGf6wBBh7p/FZTghCNWGgMzlBbrNJoPJX2mW5mwZfyRffXo7OFi5pZcS4qZUrlViptrXtw+GQoyhDPS+ANjcGBNRiLCQDPZPMHuiZfdFpPSTcQwwKYdRNqpkjm7AFeeT0pJzALgo7g8YYGrMHS0iocy+YTm2vyRUvvpXCIpQ5pe666TJrcygnScUf/p0NDs/iAI/nqDHC8TmQT8x3NF91l76oDdQGwu61Z6E0ABv7uO1dbf/37Zlv+Zw/Pbh8f1s4Avur6657/+YYBvur6657/+YYBvur6657/+YYBvur6657/+aYBvuL6657/+VMA8FXWX/f8zzcN8BXXX/f8zzcNMFdbf93zP38KLPiK6697/uebtuArrr/u+Z9vGmCusP6653/+1FjwVdZf9/zPN7oHX339dc//fNMu+irrr3v+50+Bi+Zq6697/uebA/jz8Pudf9ht/fWv517J/XUzAP8C/BAeX9WCDrUpZ3/dEMBxgPcfbtTVvsYV5Yn32u03B3Ac4P3b8I+vxNBKeeL9dRMAlwO83959qGO78sT769oB7g3w/vGVYFzKE++v6wV4OMD7F7tckFkmT7y/rhHgpQO8b+4Y46XyxPvrugBeNcB7BRiX8sT767oAvmCA9woAHsoT76+rBJjLBnh3txOvkifeX1dswZcO8G6N7sXyxPvr6i340gHe3TnqVfLE++uKAb50gHcXLnrX8sR7gNdPRqwzwLu7Y/FO5Yn3AK9jXCMGeHdgxDuVJ75VAI8ljP7PAb3/RfjcZfePHBB+79dpfpH1CanN30d+mT1h9GqAxxJGM5LQeeQ1+Tb+EQJrElLb38VHQ94TRq900aMIo8cSOo+8Dp8QfsB8zpqE1NO3OI9Zrj1h9EV78PqE0WMJnUdeU6E+Jjyk/hbrEFIfeWbvId8H9oTRFwdZaxJGvziW0Hn0gqYB/wyZ0PwRlxJST+BOw9m77Amj14ii1yGM/txYQudN0qDzGe4EqfA/5GJCagsHcPaEPWH0esekSwmjRxM6b5JEcZ4ww50ilvAOFxBSx4yLW+A/YU8YvfY5+ALC6NGEzhtmyZoFZoarwBLeZxUhtY4rc3bKnjB6TKJjFUHzJoTOozF2YBpsjcyxDgzhQ1YRUse8+J4wenwmaylB82hC5w0zoRXUNXaRBmSMQUqiWSWkLsaVqc/ZE0aPTFUuJWgeTei8SfLZQeMxNaZSIzbII4aE1Nmr13P2hNHjc9E9guYNCZ032YlNwESMLcZiLQHkE4aE1BFg0yAR4z1h9AiAGRA0jyZ03tyIxWMajMPWBIsxYJCnlITU5ShiHYdZ94TR4wCmSxg9jtB5KyPGYzymAYexWEMwAPIsAdYdV6aObmNPGD0aYLoEzaMJnTc0Ygs+YDw0GAtqxBjkuP38bMRWCHn73xNGjz75P73WenCEJnhwyVe3AEe8TtKdJcYhBl97wuhNAObK66lvD/9J9NS75v17wuitAN5fe4D31x7g/bUHeH/tAd5fe4D3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/w/toDvAd4f/24ABzZ8o+KLsSLS+Pv/TqTb3P4hKlQrTGh+fbIBT0Axqznnb+L/V2mb3HkN5Mb/nEHeK7d4IcDld6lmDW/iH9E+AH1MdOw/Jlu2T1xNmY98sv4wHnD7D3uNHu54WUuOsBTbQuvBsPT/UfzNxGYzwkP8c+Yz3C+r/i6DcyRL/rZ+utRwWH5PmfvcvYEt9jLDS/bg0/B64DWKrQM8AL8FPwS9beQCe6EMKNZYJol37jBMy35otdaz0Bw2H/C2Smc7+WGB0HWDELBmOByA3r5QONo4V+DpzR/hFS4U8wMW1PXNB4TOqYz9urxRV++ntWCw/U59Ty9ebdWbrgfRS9AYKKN63ZokZVygr8GZ/gfIhZXIXPsAlNjPOLBby5c1eOLvmQ9lwkOy5x6QV1j5TYqpS05JtUgUHUp5toHGsVfn4NX4RnMCe+AxTpwmApTYxqMxwfCeJGjpXzRF61nbcHhUBPqWze9svwcHJ+S6NPscKrEjug78Dx8Lj3T8D4YxGIdxmJcwhi34fzZUr7olevZCw5vkOhoClq5zBPZAnygD/Tl9EzDh6kl3VhsHYcDEb+hCtJSvuiV69kLDm+WycrOTArHmB5/VYyP6jOVjwgGawk2zQOaTcc1L+aLXrKeveDwZqlKrw8U9Y1p66uK8dEzdYwBeUQAY7DbyYNezBfdWQ97weEtAKYQg2xJIkuveAT3dYeLGH+ShrWNwZgN0b2YL7qznr3g8JYAo5bQBziPjx7BPZ0d9RCQp4UZbnFdzBddor4XHN4KYMrB2qHFRIzzcLAHQZ5the5ovui94PCWAPefaYnxIdzRwdHCbuR4B+tbiy96Lzi8E4D7z7S0mEPd+eqO3cT53Z0Y8SV80XvB4Z0ADJi/f7X113f+7p7/+UYBvur6657/+YYBvur6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+VMA8FXWX/f8z58OgK+y/rrnf75RgLna+uue//lTA/CV1V/3/M837aKvvv6653++UQvmauuve/7nTwfAV1N/3fM/fzr24Cuuv+75nz8FFnxl9dc9//MOr/8/glixwRuUfM4AAAAASUVORK5CYII="},i$a.prototype.getSearchTexture=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII="};var q$8=[];function _$a(e){this._prepassRenderer=e._prepassRenderer;var t=i$b.createFXAAStage(e._scene.context),i=i$b.createAmbientOcclusionStage(),n=i$b.createBloomStage(),r=i$b.createOutlineStage(),o=i$b.createFogStage(),a=i$b.createRainStage(),s=i$b.createSnowStage(),l=i$b.createScreenSpaceReflectionStage(this._prepassRenderer);this._autoExposureEnabled=!1,this._autoExposure=i$b.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=M$8.ACES;var u=this._tonemapping;i.enabled=!1,n.enabled=!1,u.enabled=!1,o.enabled=!1,a.enabled=!1,s.enabled=!1,l.enabled=!1,t.enabled=!1;var c=new g$r(this),h={},d=q$8;for(d.push(t,i,n,u,r,o,s,a,l);d.length>0;){var f=d.pop();h[f.name]=f,f._textureCache=c;var p=f.length;if(e$2e(p))for(var _=0;_<p;++_)d.push(f.get(_))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;var m=this;i.uniforms.randomTexture=function(){return m._randomTexture},this._ao=i,this._bloom=n,this._fxaa=t,this._smaa=new i$a,this._smaa.enabled=!0,this._outline=r,this._fog=o,this._rain=a,this._snow=s,this._screenSpaceReflection=l,this._lastLength=void 0,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._smaaEnabled=void 0,this._ssrEnabled=void 0,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=h,this._textureCache=c}function U$7(e){if(e._stagesRemoved){e._stagesRemoved=!1;for(var t=[],i=e._stages,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._stages=t}}function y$9(e){for(;e$2e(e.length);)e=e.get(e.length-1);return e.outputTexture}function m$b(e,t,i,n,r){if(e$2e(e.execute))e.execute(t,i,n,r);else{var o,a=e.length;if(e.inputPreviousStageTexture)for(m$b(e.get(0),t,i,n,r),o=1;o<a;++o)m$b(e.get(o),t,y$9(e.get(o-1)),n,r);else for(o=0;o<a;++o)m$b(e.get(o),t,i,n,r)}}Object.defineProperties(_$a.prototype,{ready:{get:function(){for(var e=!1,t=this._stages,i=t.length-1;i>=0;--i){var n=t[i];e=e||n.ready&&n.enabled}var r=this._fxaa,o=this._smaa,a=this._ao,s=this._bloom,l=this._tonemapping,u=this._screenSpaceReflection;return e=(e=(e=(e=(e=(e=e||r.ready&&r.enabled)||o.ready&&o.enabled)||a.ready&&a.enabled)||s.ready&&s.enabled)||l.ready&&l.enabled)||u.ready&&u.enabled}},fxaa:{get:function(){return this._fxaa}},smaa:{get:function(){return this._smaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},outline:{get:function(){return this._outline}},rain:{get:function(){return this._rain}},snow:{get:function(){return this._snow}},screenSpaceReflection:{get:function(){return this._screenSpaceReflection}},fog:{get:function(){return this._fog}},length:{get:function(){return U$7(this),this._stages.length}},outputTexture:{get:function(){var e=this._smaa;if(e.enabled)return e.getSMAATexture();var t=this._fxaa;if(t.enabled&&t.ready)return this.getOutputTexture(t.name);for(var i=this._stages,n=i.length-1;n>=0;--n){var r=i[n];if(e$2e(r)&&r.ready&&r.enabled)return this.getOutputTexture(r.name)}var o=this._tonemapping;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);var a=this._screenSpaceReflection;if(a.screenSpaceReflection&&a.ready)return this.getOutputTexture(a.name);var s=this._bloom;if(s.enabled&&s.ready)return this.getOutputTexture(s.name);var l=this._ao;return l.enabled&&l.ready?this.getOutputTexture(l.name):void 0}},hasSelected:{get:function(){for(var e=l$R(this._stages);e.length>0;){var t=e.pop();if(e$2e(t)){if(e$2e(t.selected))return!0;var i=t.length;if(e$2e(i))for(var n=0;n<i;++n)e.push(t.get(n))}}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper!==e){if(!M$8.validate(e))throw new t$15("tonemapper was set to an invalid value.");e$2e(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());var t,i=this._autoExposureEnabled;switch(e){case M$8.REINHARD:t=i$b.createReinhardTonemappingStage(i);break;case M$8.MODIFIED_REINHARD:t=i$b.createModifiedReinhardTonemappingStage(i);break;case M$8.FILMIC:t=i$b.createFilmicTonemappingStage(i);break;default:t=i$b.createAcesTonemappingStage(i)}if(i){var n=this._autoExposure;t.uniforms.autoExposure=function(){return n.outputTexture}}this._tonemapper=e,this._tonemapping=t,e$2e(this._stageNames)&&(this._stageNames[t.name]=t,t._textureCache=this._textureCache),this._textureCacheDirty=!0}}}}),_$a.prototype.add=function(e){o$1q.typeOf.object("stage",e);var t=this._stageNames,i=q$8;for(i.push(e);i.length>0;){var n=i.pop();if(e$2e(t[n.name]))throw new t$15(n.name+" has already been added to the collection or does not have a unique name.");t[n.name]=n,n._textureCache=this._textureCache;var r=n.length;if(e$2e(r))for(var o=0;o<r;++o)i.push(n.get(o))}var a=this._stages;return e._index=a.length,a.push(e),this._textureCacheDirty=!0,e},_$a.prototype.remove=function(e){if(!this.contains(e))return!1;var t=this._stageNames,i=q$8;for(i.push(e);i.length>0;){var n=i.pop();delete t[n.name];var r=n.length;if(e$2e(r))for(var o=0;o<r;++o)i.push(n.get(o))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0},_$a.prototype.contains=function(e){return e$2e(e)&&e$2e(e._index)&&e._textureCache===this._textureCache},_$a.prototype.get=function(e){U$7(this);var t=this._stages,i=t.length;return o$1q.typeOf.number.greaterThanOrEquals("stages length",i,0),o$1q.typeOf.number.greaterThanOrEquals("index",e,0),o$1q.typeOf.number.lessThan("index",e,i),t[e]},_$a.prototype.removeAll=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)this.remove(e[i]);e.length=0},_$a.prototype.getStageByName=function(e){return this._stageNames[e]},new e$1X,new e$1X,_$a.prototype.update=function(e,t,i,n){U$7(this);var r=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=r;var a,s,l=this._stages,u=o.length=l.length,c=0;for(a=0;a<u;++a)(s=l[a]).ready&&s.enabled&&s._isSupported(e)&&(o[c++]=s);o.length=c;var h=c!==r.length;if(!h)for(a=0;a<c;++a)if(o[a]!==r[a]){h=!0;break}var d=this._ao,f=this._bloom,p=this._autoExposure,_=this._tonemapping,m=this._fxaa,g=this._smaa,x=this._outline,y=this._fog,v=this._rain,$=this._snow,b=this._screenSpaceReflection;_.enabled=i;var T=d.enabled&&d._isSupported(e),C=f.enabled&&f._isSupported(e),S=_.enabled&&_._isSupported(e),w=m.enabled&&m._isSupported(e),E=g.enabled,P=y.enabled,A=v.enabled,L=$.enabled,M=x.enabled,R=b.enabled;if((h||this._textureCacheDirty||c!==this._lastLength||T!==this._aoEnabled||P!==this._fogEnabled||A!==this._rainEnabled||L!==this._snowEnabled||C!==this._bloomEnabled||S!==this._tonemappingEnabled||w!==this._fxaaEnabled||E!==this._smaaEnabled||R!==this._ssrEnabled)&&(this._textureCache.updateDependencies(),this._lastLength=c,this._aoEnabled=T,this._fogEnabled=P,this._rainEnabled=A,this._snowEnabled=L,this._bloomEnabled=C,this._tonemappingEnabled=S,this._fxaaEnabled=w,this._smaaEnabled=E,this._ssrEnabled=R,this._textureCacheDirty=!1),e$2e(this._randomTexture)&&!T&&(this._randomTexture.destroy(),this._randomTexture=void 0),M){var O=n._layers.getSelectedLayer();e$2e(O)&&(O._selectColorType===Zr$3.SILHOUETTE_EDGE?x.uniforms.visibleEdgeColor=e$1X.clone(O._selectedLineColor):x.uniforms.visibleEdgeColor=e$1X.WHITE)}if(!e$2e(this._randomTexture)&&T){u=196608;var D=new Uint8Array(u);for(a=0;a<u;a+=3)D[a]=Math.floor(255*Math.random());this._randomTexture=new t$U({context:e,pixelFormat:V$12.RGB,pixelDatatype:_$_.UNSIGNED_BYTE,source:{arrayBufferView:D,width:256,height:256},sampler:new e$1S({wrapS:q$1a.REPEAT,wrapT:q$1a.REPEAT,minificationFilter:tt$i.NEAREST,magnificationFilter:rt$k.NEAREST})})}for(this._textureCache.update(e),m.update(e,t),g.update(e,t),d.update(e,t),f.update(e,t),_.update(e,t),x.update(e,t),y.update(e,t),v.update(e,t),$.update(e,t),b.update(e,t),this._autoExposureEnabled&&p.update(e,t),u=l.length,a=0;a<u;++a)l[a].update(e,t)},_$a.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)},_$a.prototype.getOutputTexture=function(e){var t=this.getStageByName(e);if(e$2e(t))return y$9(t)},_$a.prototype.execute=function(e,t,i,n){var r=this._activeStages,o=r.length,a=this._fxaa,s=this._smaa,l=this._ao,u=this._bloom,c=this._autoExposure,h=this._tonemapping,d=this._outline,f=this.compositor,p=this._fog,_=this._rain,m=this._snow,g=this._screenSpaceReflection,x=l.enabled&&l._isSupported(e),y=u.enabled&&u._isSupported(e),v=this._autoExposureEnabled,$=h.enabled&&h._isSupported(e),b=a.enabled&&a._isSupported(e),T=s.enabled,C=d.enabled,S=p.enabled,w=_.enabled,E=m.enabled,P=g.enabled;if(S||w||E||P||C||T||b||x||y||$||0!==o){var A=t;C&&d.ready&&e$2e(e.uniformState.maskTexture)&&(m$b(d,e,A,i,n),A=y$9(d)),e$2e(f)&&f.isEnable()&&(f.copy(e,A),f.execute(e,f.outputFbo),A=f.outputFbo.getColorTexture(0)),x&&l.ready&&(m$b(l,e,A,i,n),A=y$9(l)),y&&u.ready&&(m$b(u,e,A,i,n),A=y$9(u)),v&&c.ready&&m$b(c,e,A,i,n),$&&h.ready&&(m$b(h,e,A,i,n),A=y$9(h));var L=A;if(o>0){m$b(r[0],e,A,i,n);for(var M=1;M<o;++M)m$b(r[M],e,y$9(r[M-1]),i,n);L=y$9(r[o-1])}S&&(m$b(p,e,L,i,n),L=y$9(p)),P&&g.ready&&(m$b(g,e,L,i,n),L=y$9(g)),E&&(m$b(m,e,L,i,n),L=y$9(m)),w&&(m$b(_,e,L,i,n),L=y$9(_)),b&&a.ready&&m$b(a,e,L,i,n),T&&(s.setInputTexture(L),s.execute(e))}};var S$5=new f$1a;function v$9(e){this._url=e,this._rgbeLoader=new U$i,this._sourceData=void 0,this._loading=!1,this._width=1,this._height=1,this._inputTexture=void 0,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._outputTexture=void 0,this._pingPongTexture=void 0,this._ready=!1}_$a.prototype.copy=function(e,t,i){if(e.webgpu?(S$5.x=0,S$5.y=0,S$5.width=e.drawingBufferWidth,S$5.height=e.drawingBufferHeight):(S$5.x=0,S$5.y=0,S$5.width=e.realDrawingBufferWidth,S$5.height=e.realDrawingBufferHeight,S$5.x+=-e._curCol/e._cols*e.realDrawingBufferWidth,S$5.y+=-(e._rows-e._curRow-1)/e._rows*e.realDrawingBufferHeight),!e$2e(this._copyColorCommand)){var n,r=this;i&&!e.webgpu&&e.fragmentDepth&&e.depthTexture&&!e.webglOptions.preserveDrawingBuffer?n=new s$V({sources:[n=["#extension GL_EXT_frag_depth : enable","#extension GL_OES_standard_derivatives : enable","uniform sampler2D colorTexture;","varying vec2 v_textureCoordinates;","void main()","{","float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, v_textureCoordinates));","gl_FragDepthEXT = logDepthOrDepth;","gl_FragColor = texture2D(colorTexture, v_textureCoordinates);","}"].join("\n")],defines:i?["LOG_DEPTH"]:[]}):n=ie$7,this._copyColorCommand=e.createViewportQuadCommand(n,{shaderProgramName:"postPorcessCopyColor",uniformMap:{colorTexture:function(){return r.outputTexture}},owner:this})}var o=d$1m.fromCache({viewport:S$5,depthTest:{enabled:!e.webglOptions.preserveDrawingBuffer&&!e.webgpu}});this._copyColorCommand.renderState=o,this._copyColorCommand.framebuffer=t,(e.fragmentDepth&&e$2e(e.uniformState.globeDepthTexture)||!e.fragmentDepth||!e.depthTexture)&&this._copyColorCommand.execute(e)},_$a.prototype.isDestroyed=function(){return!1},_$a.prototype.destroy=function(){return this._fxaa.destroy(),this._smaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),i$11(this)},Object.defineProperties(v$9.prototype,{ready:{get:function(){return this._ready}},texture:{get:function(){return this._outputTexture}}});const Y$4="\n precision mediump float;\n precision mediump int;\n\n attribute vec4 position;\n attribute vec2 uv;\n attribute float faceIndex;\n\n varying vec3 vOutputDirection;\n\n // RH coordinate system; PMREM face-indexing convention\n vec3 getDirection( vec2 uv, float face ) {\n\n uv = 2.0 * uv - 1.0;\n\n vec3 direction = vec3( uv, 1.0 );\n\n if ( face == 0.0 ) {\n\n direction = direction.zyx; // ( 1, v, u ) pos x\n\n } else if ( face == 1.0 ) {\n\n direction = direction.xzy;\n direction.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n } else if ( face == 2.0 ) {\n\n direction.x *= -1.0; // ( -u, v, 1 ) pos z\n\n } else if ( face == 3.0 ) {\n\n direction = direction.zyx;\n direction.xz *= -1.0; // ( -1, v, -u ) neg x\n\n } else if ( face == 4.0 ) {\n\n direction = direction.xzy;\n direction.xy *= -1.0; // ( -u, -1, v ) neg y\n\n } else if ( face == 5.0 ) {\n\n direction.z *= -1.0; // ( u, v, -1 ) neg z\n\n }\n\n return direction;\n\n }\n\n void main() {\n\n vOutputDirection = getDirection( uv, faceIndex );\n gl_Position = vec4( position.xyz, 1.0 );\n\n }\n",ie$3="\n precision mediump float;\n precision mediump int;\n\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n\n #define RECIPROCAL_PI 0.3183098861837907\n #define RECIPROCAL_PI2 0.15915494309189535\n\n vec2 equirectUv( in vec3 dir ) {\n\n // dir is assumed to be unit length\n \n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n \n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n \n return vec2( u, v );\n \n }\n\n void main() {\n\n vec3 outputDirection = normalize( vOutputDirection );\n vec2 uv = equirectUv( outputDirection );\n\n gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n }\n",oe$6="\n precision mediump float;\n precision mediump int;\n #extension GL_EXT_shader_texture_lod : enable\n #define ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\t#define n 20\n\t#define CUBEUV_TEXEL_WIDTH 0.0013020833333333333\n\t#define CUBEUV_TEXEL_HEIGHT 0.0009765625\n\t#define CUBEUV_MAX_MIP 8.0\n\t\n varying vec3 vOutputDirection;\n\n uniform sampler2D envMap;\n uniform int samples;\n uniform float weights[ n ];\n uniform bool latitudinal;\n uniform float dTheta;\n uniform float mipInt;\n uniform vec3 poleAxis;\n\n float getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\t\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\t\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\n\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\t}\n\n vec3 getSample( float theta, vec3 axis ) {\n\n float cosTheta = cos( theta );\n // Rodrigues' axis-angle rotation\n vec3 sampleDirection = vOutputDirection * cosTheta\n + cross( axis, vOutputDirection ) * sin( theta )\n + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n return bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n }\n\n void main() {\n\n vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n if ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n }\n\n axis = normalize( axis );\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n for ( int i = 1; i < n; i++ ) {\n\n if ( i >= samples ) {\n\n break;\n\n }\n\n float theta = dTheta * float( i );\n gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n }\n \n }\n",g$h=(1+Math.sqrt(5))/2,D$6=1/g$h,E$9=20,k$8=[new o$1p(1,1,1),new o$1p(-1,1,1),new o$1p(1,1,-1),new o$1p(-1,1,-1),new o$1p(0,g$h,D$6),new o$1p(0,g$h,-D$6),new o$1p(D$6,0,g$h),new o$1p(-D$6,0,g$h),new o$1p(g$h,D$6,0),new o$1p(-g$h,D$6,0)],A$d=4,J$4=[.125,.215,.35,.446,.526,.582];function ne$5(e,t){const i=[],n=[],r=[];let o=t;const a=t-A$d+1+J$4.length;for(let s=0;s<a;s++){const a=Math.pow(2,o);n.push(a);let l=1/a;s>t-A$d?l=J$4[s-t+A$d-1]:0===s&&(l=0),r.push(l);const u=1/(a-2),c=-u,h=1+u,d=[c,c,h,c,h,h,c,c,h,h,c,h],f=6,p=6,_=3,m=2,g=1,x=new Float32Array(_*p*f),y=new Float32Array(m*p*f),v=new Float32Array(g*p*f);for(let e=0;e<f;e++){const t=e%3*2/3-1,i=e>2?0:-1,n=[t,i,0,t+2/3,i,0,t+2/3,i+1,0,t,i,0,t+2/3,i+1,0,t,i+1,0];x.set(n,_*p*e),y.set(d,m*p*e);const r=[e,e,e,e,e,e];v.set(r,g*p*e)}const $=t$X.createVertexBuffer({context:e,typedArray:x,usage:A$18.STATIC_DRAW}),b=t$X.createVertexBuffer({context:e,typedArray:y,usage:A$18.STATIC_DRAW}),T=t$X.createVertexBuffer({context:e,typedArray:v,usage:A$18.STATIC_DRAW}),C=new c$13({context:e,attributes:[{name:"position",index:0,vertexBuffer:$,componentsPerAttribute:3,componentDatatype:S$14.FLOAT},{name:"uv",index:1,vertexBuffer:b,componentsPerAttribute:2,componentDatatype:S$14.FLOAT},{name:"faceIndex",index:2,vertexBuffer:T,componentsPerAttribute:1,componentDatatype:S$14.FLOAT}]});i.push(C),o>A$d&&o--}return{lodPlanes:i,sizeLods:n,sigmas:r}}function re$5(e,t){const i=e.context,n=r$14.fromCache({context:i,vertexShaderSource:Y$4,fragmentShaderSource:ie$3,attributeLocations:{position:0,uv:1,faceIndex:2}}),r=t._lodPlanes[0],o={envMap:function(){return t._inputTexture}},a=new t$U({context:i,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,width:t._width,height:t._height}),s=new t$H({name:"Prefilter",vertexArray:r,shaderProgram:n,uniformMap:o,outputTexture:a,persists:!0,renderState:d$1m.fromCache({viewport:new f$1a(0,0,3*t._cubeSize,2*t._cubeSize)}),owner:t});t._outputTexture=a,e.commandList.push(s)}v$9.prototype._halfBlur=function(e,t,i,n,r,o,a,s){const l=this._sizeLods[n]-1,u=isFinite(o)?Math.PI/(2*l):2*Math.PI/(2*E$9-1),c=o/u,h=isFinite(o)?1+Math.floor(3*c):E$9,d=[];let f=0;for(let e=0;e<E$9;++e){const t=e/c,i=Math.exp(-t*t/2);d.push(i),0===e?f+=i:e<h&&(f+=2*i)}for(let e=0;e<d.length;e++)d[e]=d[e]/f;const{_lodMax:p}=this,_=this._sizeLods[r],m=3*_*(r>p-A$d?r-p+A$d:0),g=4*(this._cubeSize-_),x=this._lodPlanes[r],y=this._blurSP,v={envMap:function(){return this.properties.envMap},samples:function(){return this.properties.samples},weights:function(){return this.properties.weights},latitudinal:function(){return this.properties.latitudinal},dTheta:function(){return this.properties.dTheta},mipInt:function(){return this.properties.mipInt},poleAxis:function(){return this.properties.poleAxis},properties:{envMap:null,samples:1,weights:new Float32Array(E$9),latitudinal:!1,dTheta:0,mipInt:0,poleAxis:new o$1p(0,1,0)}};v.properties.envMap=t,v.properties.samples=h,v.properties.weights=d,v.properties.latitudinal="latitudinal"===a,s&&(v.properties.poleAxis=s),v.properties.dTheta=u,v.properties.mipInt=p-n;const $=new t$H({name:"PrefilterHalfBlur",vertexArray:x,shaderProgram:y,uniformMap:v,outputTexture:i,persists:!0,renderState:d$1m.fromCache({viewport:new f$1a(m,g,3*_,2*_)}),clear:!1,owner:this});e.commandList.push($)},v$9.prototype._blur=function(e,t,i,n,r,o){const a=this._pingPongTexture;this._halfBlur(e,t,a,i,n,r,"latitudinal",o),this._halfBlur(e,a,t,n,n,r,"longitudinal",o)},v$9.prototype.update=function(e){const t=e.context;e$2e(this._sourceData)||this._loading||(t$10.createIfNeeded(this._url).fetchArrayBuffer().then((e=>{this._sourceData=this._rgbeLoader.parse(e),this._loading=!1})).otherwise((e=>{this._loading=!1})),this._loading=!0);if(e$2e(this._sourceData)){if(!e$2e(this._inputTexture)){this._inputTexture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,flipY:!0,source:{arrayBufferView:this._sourceData.data,width:this._sourceData.width,height:this._sourceData.height}}),this._lodMax=Math.floor(Math.log2(this._inputTexture.width/4)),this._cubeSize=Math.pow(2,this._lodMax),this._width=3*Math.max(this._cubeSize,112),this._height=4*this._cubeSize;const{_lodMax:e}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=ne$5(t,e)),this._blurSP=r$14.fromCache({context:t,vertexShaderSource:Y$4,fragmentShaderSource:oe$6,attributeLocations:{position:0,uv:1,faceIndex:2}}),this._pingPongTexture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:_$_.HALF_FLOAT,width:this._width,height:this._height})}if(!this._ready){re$5(e,this);for(let t=1;t<this._lodPlanes.length;t++){const i=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),n=k$8[(t-1)%k$8.length];this._blur(e,this._outputTexture,t-1,t,i,n)}this._ready=!0}}},v$9.prototype.isDestroyed=function(){return!1},v$9.prototype.destroy=function(){return this._inputTexture=this._inputTexture&&this._inputTexture.destroy(),this._pingPongTexture=this._pingPongTexture&&this._pingPongTexture.destroy(),this._outputTexture=this._outputTexture&&this._outputTexture.destroy(),this._blurSP=this._blurSP&&this._blurSP.destroy(),i$11(this)};var d$f=2e4;function h$8(e){this._positionArray=e,this.type="PLANE",this.planeWidth=1,this.planeHeight=1,this._center=new o$1p,this.init(),this._volBounds=void 0}h$8.prototype.createVertices=function(e){var t=S$14.createTypedArray(S$14.FLOAT,12),i=0;return t[i++]=this._topPoint1.x-e.x,t[i++]=this._topPoint1.y-e.y,t[i++]=this._topPoint1.z-e.z,t[i++]=this._topPoint2.x-e.x,t[i++]=this._topPoint2.y-e.y,t[i++]=this._topPoint2.z-e.z,t[i++]=this._bottomPoint1.x-e.x,t[i++]=this._bottomPoint1.y-e.y,t[i++]=this._bottomPoint1.z-e.z,t[i++]=this._bottomPoint2.x-e.x,t[i++]=this._bottomPoint2.y-e.y,t[i++]=this._bottomPoint2.z-e.z,t},h$8.prototype.createTexCoords=function(){var e=S$14.createTypedArray(S$14.FLOAT,8);return e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=0,e[5]=1,e[6]=1,e[7]=1,e},h$8.prototype.createNormals=function(){return S$14.createTypedArray(S$14.FLOAT,12)},h$8.prototype.init=function(){this._topPoint1=this._positionArray[0],this._topPoint2=this._positionArray[1];var e=a$18.fromCartesian(this._positionArray[0]),t=a$18.fromCartesian(this._positionArray[1]),i=a$18.clone(e),n=a$18.clone(t);e.height+=.5*d$f,t.height+=.5*d$f,i.height-=d$f,n.height-=d$f,this._topPoint1=a$18.toCartesian(e),this._topPoint2=a$18.toCartesian(t),this._bottomPoint1=a$18.toCartesian(i),this._bottomPoint2=a$18.toCartesian(n),this.planeWidth=o$1p.distance(this._topPoint1,this._topPoint2),this.planeHeight=d$f;var r=[];r.push(this._topPoint1),r.push(this._topPoint2),r.push(this._bottomPoint1),r.push(this._bottomPoint2),this.boundingSphere=i$1d.fromPoints(r);var o=r.length,a=this;r.map((function(e){a._center.x+=e.x/o,a._center.y+=e.y/o,a._center.z+=e.z/o}));var s={};p$1d.fromRotationTranslation(p$1e.IDENTITY,this._center,s),this.modelMatrix=s},h$8.prototype.getVertexArray=function(e){var t=this.createVertices(this._center),i=t$X.createVertexBuffer({context:e,typedArray:t,usage:A$18.STATIC_DRAW}),n=this.createNormals(this._center),r=t$X.createVertexBuffer({context:e,typedArray:n,usage:A$18.STATIC_DRAW}),o=this.createTexCoords(),a=t$X.createVertexBuffer({context:e,typedArray:o,usage:A$18.STATIC_DRAW}),s=[];if(s.push({name:"aPosition",index:0,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({name:"aNormal",index:1,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1}),s.push({name:"aTexCoord",index:2,vertexBuffer:a,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:8,normalize:!1}),e$2e(this._volBounds)){for(var l=S$14.createTypedArray(S$14.FLOAT,12),u=[this._topPoint1,this._topPoint2,this._bottomPoint1,this._bottomPoint2],c=0;c<4;c++){var h=a$18.fromCartesian(u[c]),d=e$2d.toDegrees(h.longitude),f=e$2d.toDegrees(h.latitude),p=h.height,_=(d-this._volBounds.left)/(this._volBounds.right-this._volBounds.left),m=(f-this._volBounds.bottom)/(this._volBounds.top-this._volBounds.bottom),g=(p-this._volBounds.minHeight)/(this._volBounds.maxHeight-this._volBounds.minHeight);l[3*c]=_,l[3*c+1]=m,l[3*c+2]=g}var x=t$X.createVertexBuffer({context:e,typedArray:l,usage:A$18.STATIC_DRAW});s.push({index:3,vertexBuffer:x,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1})}var y=S$14.createTypedArray(S$14.UNSIGNED_SHORT,6);return y[0]=0,y[1]=1,y[2]=3,y[3]=0,y[4]=3,y[5]=2,new c$13({context:e,attributes:s,indexBuffer:t$X.createIndexBuffer({context:e,typedArray:y,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})})},h$8.prototype.destroy=function(){return i$11(this)};var _0x26ca37=(_0xaaab11=!0,function(e,t){var i=_0xaaab11?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xaaab11=!1,i}),_0x238501=_0x26ca37(void 0,(function(){return _0x238501.toString().search("(((.+)+)+)+$").toString().constructor(_0x238501).search("(((.+)+)+)+$")})),_0xaaab11;_0x238501();var V$8="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uClampIDTexture;\nuniform sampler2D uClampColorTexture;\nuniform sampler2D uModelTexture;\nuniform vec4 uModelTextureRect;\nuniform vec4 uModelColor;\nuniform vec3 uHasModelTextureAndPixelLength;\nuniform vec3 uModelTextureTiling;\nuniform vec4 uModelIDColor;\nuniform vec4 uProfilePickColor;\nuniform bool uPicking;\nuniform vec4 uHighLightColor;\nuniform float uUseOriModelTex;\nuniform float uClippingType;\nvarying vec2 v_texCoord;\nvarying float v_face;\n#ifdef Volume2\nvarying vec3 vecRotioCoord;\n#endif\nvoid main()\n{\nvec2 texCoord = vec2(gl_FragCoord.x / czm_viewport.z, gl_FragCoord.y / czm_viewport.w);\nvec4 idColor = texture2D(uClampIDTexture, texCoord) * 255.0;\nif((gl_FrontFacing && uClippingType < 1.5) || idColor.r != uModelIDColor.r || idColor.g != uModelIDColor.g || idColor.b != uModelIDColor.b)\n{\n discard;\n}\nif(uPicking){\n gl_FragColor = uProfilePickColor;\n return;\n}\nvec4 color = texture2D(uClampColorTexture, texCoord);\ntexCoord = mod(v_texCoord * uModelTextureTiling.xy, vec2(1.0));\n#ifdef GEOBOX\n if(v_face > -0.1 && v_face < 0.1)\n {\n texCoord = mod(v_texCoord * uModelTextureTiling.xy, vec2(1.0));\n }\n else if(v_face > 0.5)\n {\n texCoord = mod(v_texCoord * vec2(uModelTextureTiling.zy), vec2(1.0));\n }\n else if(v_face < -0.5)\n {\n texCoord = mod(v_texCoord * vec2(uModelTextureTiling.zx), vec2(1.0));\n }\n#endif\nvec2 pixelSize = uHasModelTextureAndPixelLength.yz;\ntexCoord = clamp(texCoord, pixelSize, 1.0 - pixelSize);\nvec2 modelTexCoord = uUseOriModelTex > 0.5 ? v_texCoord : mix(uModelTextureRect.xy, uModelTextureRect.zw, texCoord);\nvec4 texColor = texture2D(uModelTexture, modelTexCoord);\ngl_FragColor = uUseOriModelTex > 0.5 ? texColor * color * uHighLightColor : mix(uModelColor, texColor, uHasModelTextureAndPixelLength.x) * uHighLightColor * color;\n#ifdef Volume\n#ifdef Volume2\n if((vecRotioCoord.x < 1.0 && vecRotioCoord.x >0.0) && (vecRotioCoord.y < 1.0 && vecRotioCoord.y >0.0) && (vecRotioCoord.z < 1.0 && vecRotioCoord.z >0.0))\n {\n gl_FragColor = czm_getVolumeValue(vecRotioCoord);\n }\n#else\n float wValue = 0.0;\n gl_FragColor = czm_getHypsometricColor(gl_FragColor, wValue);\n#endif\n#endif\n}";function f$a(e,t,i,n){this._scene=e._scene,this._attributeLocations={aPosition:0,aNormal:1,aTexCoord:2},this._geometry=n,this._drawCommandInClampTexture=null,this._drawCommandInScene=null,this._drawCommandNormal=null,this._drawCommandInScenePreModel={},this._clampFramebuffer=null,this._name="solidModelsProfile_"+e._name+"_"+t.toString(),this._textureAtlas=e._textureAtlas,this._modelInfo=i,this._picking=!1,this._owner=e,this._clippingType=R$L.KeepInside,this._volume=void 0,this._width=1,this._height=1,this._start=!1}f$a.prototype.createCommand=function(e){var t=p$1d.clone(this._geometry.modelMatrix),i=this._geometry.boundingSphere,n=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:t,pass:Le$q.OPAQUE,cull:!1,boundingVolume:i});n.vertexArray=this._geometry.getVertexArray(e);var r=new s$V({name:"ClipPlaneVp",sources:[R$M]}),o=new s$V({name:"SolidProfileFp",sources:[V$8]});r.defines.push("HAS_TEXTURECOORD"),this._geometry.type==P$U.GEOCYLINDER?(r.defines.push("GEOCYLINDER"),o.defines.push("GEOCYLINDER")):this._geometry.type==P$U.GEOBOX&&(r.defines.push("GEOBOX"),o.defines.push("GEOBOX")),e$2e(this._volume)&&(r.defines.push("Volume"),o.defines.push("Volume"),this._volume.hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(r.defines.push("Volume2"),o.defines.push("Volume2"))),p$1d.equals(t,p$1d.IDENTITY)&&r.defines.push("USE_RelativeOrigin"),n.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),n.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:{enabled:!0},blending:Ee$r.ALPHA_BLEND});for(var a in this._drawCommandInScene=n,this._modelInfo)this.copyCommandForSingleModel(a,this._modelInfo[a],this._drawCommandInScene,e);this.createCommandInClampTexture(n,e),this.createNormalCommand(this._drawCommandInClampTexture,e)};var C$8=new o$1p,g$g=new e$2c,l$b=new o$1p,v$8=new o$1p,m$a=new e$1X;function L$b(e){e$2e(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}function r$e(){t$15.throwInstantiationError()}f$a.prototype.copyCommandForSingleModel=function(e,t,i,n){var r=i$$.shallowClone(i),o=this;r.uniformMap={uClampIDTexture:function(){var e=o._clampFramebuffer;return e$2e(e)?e.renderTexture._fb.getColorTexture(0):n.defaultTexture},uClampColorTexture:function(){var e=o._clampFramebuffer;return e$2e(e)&&2===e.renderTexture._fb.numberOfColorAttachments?e.renderTexture._fb.getColorTexture(1):n.defaultTexture},uModelColor:function(){return t.color},uHasModelTextureAndPixelLength:function(){if(v$8.x=t.textureAtlasID>=0?1:0,e$2e(o._textureAtlas)){var e=o._textureAtlas.texture.width,i=o._textureAtlas.texture.height,n=o._textureAtlas.textureCoordinates[t.textureAtlasID];if(e$2e(n)){var r=n.width*e,a=n.height*i;v$8.y=1/r,v$8.z=1/a}}return v$8},uUseOriModelTex:function(){return!e$2e(o._textureAtlas)&&e$2e(t.texture)},uModelTexture:function(){return e$2e(o._textureAtlas)?o._textureAtlas.texture:e$2e(t.texture)?t.texture:n.defaultTexture},uModelTextureRect:function(){if(e$2e(o._textureAtlas)){var e=o._textureAtlas.textureCoordinates[t.textureAtlasID];e$2e(e)&&(g$g.x=e.x,g$g.y=e.y,g$g.z=e.x+e.width,g$g.w=e.y+e.height)}return g$g},uModelTextureTiling:function(){return"PLANE"==o._geometry.type?(l$b.x=o._geometry.planeWidth/t.textureTilingU,l$b.y=o._geometry.planeHeight/t.textureTilingV):o._geometry.type==P$U.GEOCYLINDER?(l$b.x=2*Math.PI*o._geometry.geoTopRadius/t.textureTilingU,l$b.y=o._geometry.geoHeight/t.textureTilingV):o._geometry.type==P$U.GEOREGION3D?(l$b.x=o._geometry.width/t.textureTilingU,l$b.y=o._geometry.height/t.textureTilingV):o._geometry.type==P$U.GEOBOX&&(l$b.x=o._geometry.geoWidth/t.textureTilingU,l$b.y=o._geometry.geoHeight/t.textureTilingV,l$b.z=o._geometry.geoLength/t.textureTilingU),l$b},uClippingType:function(){return o._clippingType},uGeometryHeight:function(){return o._geometry.type==P$U.GEOCYLINDER?o._geometry.geoHeight:1},uModelIDColor:function(){return C$8.x=t.pickColor.x,C$8.y=t.pickColor.y,C$8.z=t.pickColor.z,C$8},uProfilePickColor:function(){return t.profilePickId.color},uPicking:function(){return o._picking},uHighLightColor:function(){var e=o._owner._selectedProfileIDs;if(0==e.length)m$a.red=1,m$a.green=1,m$a.blue=1;else{var i=!1;e.map((function(e){t.id==e&&(i=!0)})),i?(m$a.red=.7,m$a.green=.7,m$a.blue=1):(m$a.red=1,m$a.green=1,m$a.blue=1)}return m$a},uVolumeTexture:function(){return o._volume._volTexture},width:function(){return o._volume._volImageBuffer.nWidth},height:function(){return o._volume._volImageBuffer.nHeight},depth:function(){return o._volume._volImageBuffer.nDepth},sideBlockCount:function(){return o._volume._volImageBuffer.nSideBlockCount},blockLength:function(){return o._volume._volImageBuffer.nBlockLength},texLength:function(){return o._volume._volImageBuffer.nLength},uFilterMode:function(){var e=0;return e$2e(o._volume.hypsometricSetting)&&o._volume.hypsometricSetting.filterMode===k$S.FilterMode.NEAREST&&(e=1),e},uMixColorType:function(){return 0},uDataFloor:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMinKey:0},uDataCeil:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMaxKey:0},uVolumeType:function(){return e$2e(o._volume.hypsometricSetting)&&o._volume.hypsometricSetting.filterMode===k$S.FilterMode.LINEAR?0:1},uHypOpacity:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.Opacity:1},uHypContourInterval:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.LineInterval:100},uHypLineColor:function(){var e=new e$2c(0,1,1,1);return e$2e(o._volume.hypsometricSetting)&&(e.x=o._volume.hypsometricSetting.LineColor.red,e.y=o._volume.hypsometricSetting.LineColor.green,e.z=o._volume.hypsometricSetting.LineColor.blue,e.w=o._volume.hypsometricSetting.LineColor.alpha),e},uHypContourFillMode:function(){var e=1;if(e$2e(o._volume.hypsometricSetting))switch(o._volume.hypsometricSetting.DisplayMode){case k$S.DisplayMode.NONE:e=0;break;case k$S.DisplayMode.FACE:e=1;break;case k$S.DisplayMode.LINE:e=2;break;case k$S.DisplayMode.FACE_AND_LINE:e=3}return e},uHypFloor:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMinKey:0},uHypCeil:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.ColorTableMaxKey:0},uHypMaxVisibleValue:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.MaxVisibleValue:0},uHypMinVisibleValue:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.MinVisibleValue:0},uNoValueColor:function(){return e$2e(o._volume.hypsometricSetting)?o._volume.hypsometricSetting.noValueColor:e$1X.WHITE},uHypsometricVisible:function(){return 1},uHypHasAnalysisRegion:function(){return 0},uHypsometricRenderTexture:function(){return 0},uHypsometricTexture:function(){return o._volume._hypsometricTexture}},this._drawCommandInScenePreModel[e]=r},f$a.prototype.createCommandInClampTexture=function(e,t){var i=i$$.shallowClone(e);i.pass=Le$q.OPAQUE;var n={enabled:!1};this._geometry.type===P$U.GEOREGION3D&&this._clippingType===R$L.KeepOutside&&(n.enabled=!0,n.face=de$y.FRONT),i.renderState=d$1m.fromCache({cull:n,depthTest:{enabled:!0},depthMask:!0,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:_0x45bcf8.createReceiveClampObjectStencilTest(!0)}),i.uniformMap={uDiffuseColor:function(){return e$1X.WHITE}};var r=new s$V({name:"CommonNoLigthNoTextureVp",sources:[Ht$8]});p$1d.equals(e._modelMatrix,p$1d.IDENTITY)&&r.defines.push("USE_RelativeOrigin"),i.shaderProgram=r$14.fromCache({name:"ProfileRenderClampTexture",context:t,vertexShaderSource:r,fragmentShaderSource:Yt$8,attributeLocations:this._attributeLocations}),this._drawCommandInClampTexture=i},f$a.prototype.createNormalCommand=function(e){this._drawCommandNormal=i$$.shallowClone(e),this._drawCommandNormal.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:!1,colorMask:{red:!0,green:!0,blue:!0,alpha:!0},stencilTest:!1})},f$a.prototype.createClampFrameBuffer=function(e,t){e$2e(this._clampFramebuffer)||(this._frameState=t,e$2e(t._framebufferList[this._name])?this._clampFramebuffer=t._framebufferList[this._name]:(this._clampFramebuffer=e.createClampFramebuffer(),this._clampFramebuffer.renderTexture.mrt=!0,this._clampFramebuffer.isUpdate=this._start,t._framebufferList[this._name]=this._clampFramebuffer))},f$a.prototype._build=function(){this._start=!0,this._clampFramebuffer&&(this._clampFramebuffer.isUpdate=!0)},f$a.prototype.update=function(e,t,i,n){this._picking=t.passes.pick,this._frameState=t;var r=e.drawingBufferWidth,o=e.drawingBufferHeight;if((this._width!==r||this._height!==o)&&(this._width=r,this._height=o,e$2e(this._clampFramebuffer)&&(this._clampFramebuffer.renderTexture._mrt=!1)),(!e$2e(this._drawCommandInScene)||this._geometry._isGeometryDirty)&&(this.createCommand(e,t),this.createClampFrameBuffer(e,t)),t._fboState.frameBufferType==Qe$c.CLAMP)t._fboState.name==this._name&&i.push(this._drawCommandInClampTexture);else for(var a in this._geometry.type==P$U.GEOCYLINDER&&(e.webgpu&&(this._drawCommandNormal.pass=Le$q.OPAQUE-1),i.push(this._drawCommandNormal)),this._drawCommandInScenePreModel){var s=this._modelInfo[a];if(!o$1p.equals(s.pickColor,o$1p.ZERO)){var l=this._drawCommandInScenePreModel[a];i.push(l)}}},f$a.prototype.destroy=function(){return L$b(this._drawCommandInClampTexture),this._drawCommandInClampTexture=void 0,L$b(this._drawCommandInScene),this._drawCommandInScene=void 0,this._drawCommandNormal=void 0,this._drawCommandInScenePreModel={},e$2e(this._clampFramebuffer)&&(this._clampFramebuffer.destroy(),this._frameState._framebufferList[this._name]=void 0),e$2e(this._geometry)&&(this._geometry=null),i$11(this)},r$e.computeDefaultLevelZeroMaximumGeometricError=function(e){return 2*e.ellipsoid.maximumRadius*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))},Object.defineProperties(r$e.prototype,{quadtree:{get:t$15.throwInstantiationError,set:t$15.throwInstantiationError},ready:{get:t$15.throwInstantiationError},tilingScheme:{get:t$15.throwInstantiationError},errorEvent:{get:t$15.throwInstantiationError}}),r$e.prototype.update=t$15.throwInstantiationError,r$e.prototype.beginUpdate=t$15.throwInstantiationError,r$e.prototype.endUpdate=t$15.throwInstantiationError,r$e.prototype.getLevelMaximumGeometricError=t$15.throwInstantiationError,r$e.prototype.loadTile=t$15.throwInstantiationError,r$e.prototype.computeTileVisibility=t$15.throwInstantiationError,r$e.prototype.showTileThisFrame=t$15.throwInstantiationError,r$e.prototype.computeDistanceToTile=t$15.throwInstantiationError,r$e.prototype.isDestroyed=t$15.throwInstantiationError,r$e.prototype.destroy=t$15.throwInstantiationError;var e$5={LOW:1024,MEDIUM:2048,HIGH:4096},Quality=Object.freeze(e$5);function R$8(e){o$1q.typeOf.object("scene",e),this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}R$8.prototype.completeMorph=function(){e$2e(this._completeMorph)&&this._completeMorph()},R$8.prototype.morphTo2D=function(e,t){e$2e(this._completeMorph)&&this._completeMorph();var i=this._scene;this._previousMode=i.mode,this._morphToOrthographic=i.camera.frustum instanceof a$V,this._previousMode!==C$14.SCENE2D&&this._previousMode!==C$14.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,C$14.SCENE2D,!0),i._mode=C$14.MORPHING,i.camera._setTransform(p$1d.IDENTITY),this._previousMode===C$14.COLUMBUS_VIEW?be$3(this,e):Ze$3(this,e,t),0===e&&e$2e(this._completeMorph)&&this._completeMorph())};var ce$8=new o$1p,ae$4=new o$1p,se$4=new o$1p,pe$5=new o$1p,ue$6=new o$1p,me$6=new o$1p,he$5=new o$1p,fe$4=new a$18,de$4=new p$1d,ve$4=new o$15,le$6=new a$V,_e$2={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};R$8.prototype.morphToColumbusView=function(e,t){e$2e(this._completeMorph)&&this._completeMorph();var i=this._scene;if(this._previousMode=i.mode,this._previousMode!==C$14.COLUMBUS_VIEW&&this._previousMode!==C$14.MORPHING){this._scene.morphStart.raiseEvent(this,this._previousMode,C$14.COLUMBUS_VIEW,!0),i.camera._setTransform(p$1d.IDENTITY);var n,r=ce$8,o=ae$4,a=se$4;if(e>0)r.x=0,r.y=-1,r.z=1,r=o$1p.multiplyByScalar(o$1p.normalize(r,r),5*t.maximumRadius,r),o$1p.negate(o$1p.normalize(r,o),o),o$1p.cross(o$1p.UNIT_X,o,a);else{var s=i.camera;if(this._previousMode===C$14.SCENE2D)o$1p.clone(s.position,r),r.z=s.frustum.right-s.frustum.left,o$1p.negate(o$1p.UNIT_Z,o),o$1p.clone(o$1p.UNIT_Y,a);else{o$1p.clone(s.positionWC,r),o$1p.clone(s.directionWC,o),o$1p.clone(s.upWC,a);var l=t.scaleToGeodeticSurface(r,he$5),u=m$19.eastNorthUpToFixedFrame(l,t,de$4);p$1d.inverseTransformation(u,u),i.mapProjection.project(t.cartesianToCartographic(r,fe$4),r),p$1d.multiplyByPointAsVector(u,o,o),p$1d.multiplyByPointAsVector(u,a,a)}}this._morphToOrthographic?((n=le$6).width=i.camera.frustum.right-i.camera.frustum.left,n.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight):((n=ve$4).aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,n.fov=e$2d.toRadians(60));var c=_e$2;c.position=r,c.direction=o,c.up=a,c.frustum=n;var h=Ye$2(c);V$7(this,h),this._previousMode===C$14.SCENE2D?Qe$1(this,e,c,h):(c.position2D=p$1d.multiplyByPoint(v$K.TRANSFORM_2D,r,pe$5),c.direction2D=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o,ue$6),c.up2D=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,a,me$6),i._mode=C$14.MORPHING,K$5(this,e,c,h)),0===e&&e$2e(this._completeMorph)&&this._completeMorph()}};var A$c={position:new o$1p,direction:new o$1p,up:new o$1p,frustum:void 0},G$9=new o$15;function V$7(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new g$K(e._scene.canvas);var i=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=i,e._morphHandler.setInputAction(i,G$J.LEFT_DOWN),e._morphHandler.setInputAction(i,G$J.MIDDLE_DOWN),e._morphHandler.setInputAction(i,G$J.RIGHT_DOWN),e._morphHandler.setInputAction(i,G$J.WHEEL)}}function P$9(e){for(var t=e._currentTweens,i=0;i<t.length;++i)t[i].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}R$8.prototype.morphTo3D=function(e,t){e$2e(this._completeMorph)&&this._completeMorph();var i=this._scene;if(this._previousMode=i.mode,this._previousMode!==C$14.SCENE3D&&this._previousMode!==C$14.MORPHING){if(this._scene.morphStart.raiseEvent(this,this._previousMode,C$14.SCENE3D,!0),i._mode=C$14.MORPHING,i.camera._setTransform(p$1d.IDENTITY),this._previousMode===C$14.SCENE2D)Se$3(this,e,t);else{var n;e>0?(n=A$c,o$1p.fromDegrees(0,0,5*t.maximumRadius,t,n.position),o$1p.negate(n.position,n.direction),o$1p.normalize(n.direction,n.direction),o$1p.clone(o$1p.UNIT_Z,n.up)):n=x$8(this,t);var r,o=i.camera;o.frustum instanceof a$V?r=o.frustum.clone():((r=G$9).aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,r.fov=e$2d.toRadians(60)),n.frustum=r;var a=ee$5(n);V$7(this,a),B$7(this,e,n,a)}0===e&&e$2e(this._completeMorph)&&this._completeMorph()}},R$8.prototype.isDestroyed=function(){return!1},R$8.prototype.destroy=function(){return P$9(this),i$11(this)};var Te$4=new a$18,De$4=new o$1p,ge$6=new p$1d;function x$8(e,t){var i=e._scene,n=i.camera,r=A$c,o=r.position,a=r.direction,s=r.up,l=i.mapProjection.unproject(n.position,Te$4);t.cartographicToCartesian(l,o);var u=t.scaleToGeodeticSurface(o,De$4),c=m$19.eastNorthUpToFixedFrame(u,t,ge$6);return p$1d.multiplyByPointAsVector(c,n.direction,a),p$1d.multiplyByPointAsVector(c,n.up,s),r}var we$2=new o$1p,Ce$3=new o$1p,Me$7=new o$1p,Ee$5=new o$1p,Re$4=new o$1p,Oe$4=new o$1p;function B$7(e,t,i,n){t*=.5;var r=e._scene,o=r.camera,a=o$1p.clone(o.position,we$2),s=o$1p.clone(o.direction,Ce$3),l=o$1p.clone(o.up,Me$7),u=p$1d.multiplyByPoint(v$K.TRANSFORM_2D_INVERSE,i.position,Ee$5),c=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D_INVERSE,i.direction,Re$4),h=p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D_INVERSE,i.up,Oe$4);var d=r.tweens.add({duration:t,easingFunction:m$Y.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$6(a,u,e.time,o.position),w$6(s,c,e.time,o.direction),w$6(l,h,e.time,o.up),o$1p.cross(o.direction,o.up,o.right),o$1p.normalize(o.right,o.right)},complete:function(){$$6(e,r,0,1,t,n)}});e._currentTweens.push(d)}var Ve$5=new a$V,L$a=new o$1p,Z$7=new o$1p,Q$4=new o$1p,H$a=new o$1p,Y$3=new o$1p,k$7=new o$1p;function Se$3(e,t,i){t/=3;var n,r,o=e._scene,a=o.camera;t>0?(n=A$c,o$1p.fromDegrees(0,0,5*i.maximumRadius,i,n.position),o$1p.negate(n.position,n.direction),o$1p.normalize(n.direction,n.direction),o$1p.clone(o$1p.UNIT_Z,n.up)):(a.position.z=a.frustum.right-a.frustum.left,n=x$8(e,i)),e._morphToOrthographic?((r=Ve$5).aspectRatio=o.drawingBufferWidth/o.drawingBufferHeight,r.width=a.frustum.right-a.frustum.left):((r=G$9).aspectRatio=o.drawingBufferWidth/o.drawingBufferHeight,r.fov=e$2d.toRadians(60)),n.frustum=r;var s,l=ee$5(n);V$7(e,l),s=e._morphToOrthographic?function(){B$7(e,t,n,l)}:function(){J$3(e,t,n,(function(){B$7(e,t,n,l)}))},t>0?(o._mode=C$14.SCENE2D,a.flyTo({duration:t,destination:o$1p.fromDegrees(0,0,5*i.maximumRadius,i,H$a),complete:function(){o._mode=C$14.MORPHING,s()}})):s()}function w$6(e,t,i,n){return o$1p.lerp(e,t,i,n)}function X$6(e,t,i,n,r){var o=e._scene,a=o.camera;if(!(a.frustum instanceof a$V)){var s=a.frustum.fov,l=.5*e$2d.RADIANS_PER_DEGREE,u=i.position.z*Math.tan(.5*s);a.frustum.far=u/Math.tan(.5*l)+1e7;var c=o.tweens.add({duration:t,easingFunction:m$Y.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){a.frustum.fov=e$2d.lerp(s,l,e.time);var t=u/Math.tan(.5*a.frustum.fov);n(a,t)},complete:function(){a.frustum=i.frustum.clone(),r(e)}});e._currentTweens.push(c)}}var Ne$3=new o$1p,Pe$3=new o$1p,Ue$3=new o$1p,b$d=new o$1p,Ie$4=new o$1p,ye$2=new o$1p,Fe$4=new l$11,Ae$5=new f$19,Be$5=new o$1p,He$3={position:void 0,direction:void 0,up:void 0,frustum:void 0};function be$3(e,t){t*=.5;var i=e._scene,n=i.camera,r=o$1p.clone(n.position,Ne$3),o=o$1p.clone(n.direction,Pe$3),a=o$1p.clone(n.up,Ue$3),s=o$1p.negate(o$1p.UNIT_Z,Ie$4),l=o$1p.clone(o$1p.UNIT_Y,ye$2),u=b$d;if(t>0)o$1p.clone(o$1p.ZERO,b$d),u.z=5*i.mapProjection.ellipsoid.maximumRadius;else{o$1p.clone(r,b$d);var c=Ae$5;p$1d.multiplyByPoint(v$K.TRANSFORM_2D,r,c.origin),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o,c.direction);var h=i.globe;if(e$2e(h)){var d=h.pickWorldCoordinates(c,i,Be$5);e$2e(d)&&(p$1d.multiplyByPoint(v$K.TRANSFORM_2D_INVERSE,d,u),u.z+=o$1p.distance(r,u))}}var f=Fe$4;f.right=.5*u.z,f.left=-f.right,f.top=f.right*(i.drawingBufferHeight/i.drawingBufferWidth),f.bottom=-f.top;var p=He$3;p.position=u,p.direction=s,p.up=l,p.frustum=f;var _=te$4(p);function m(e,t){e.position.z=t}V$7(e,_);var g=i.tweens.add({duration:t,easingFunction:m$Y.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$6(r,u,e.time,n.position),w$6(o,s,e.time,n.direction),w$6(a,l,e.time,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right),n._adjustOrthographicFrustum(!0)},complete:function(){X$6(e,t,p,m,_)}});e._currentTweens.push(g)}var q$7=new a$18,je$3={position:new o$1p,direction:new o$1p,up:new o$1p,position2D:new o$1p,direction2D:new o$1p,up2D:new o$1p,frustum:new l$11},ze$4={position:new o$1p,direction:new o$1p,up:new o$1p,frustum:void 0},We$2=new o$1p,Ge$3=new f$19,xe$3=new p$1d,Le$4=new o$1p;function Ze$3(e,t,i){t*=.5;var n=e._scene,r=n.camera,o=je$3;if(t>0)o$1p.clone(o$1p.ZERO,o.position),o.position.z=5*i.maximumRadius,o$1p.negate(o$1p.UNIT_Z,o.direction),o$1p.clone(o$1p.UNIT_Y,o.up);else{i.cartesianToCartographic(r.positionWC,q$7),n.mapProjection.project(q$7,o.position),o$1p.negate(o$1p.UNIT_Z,o.direction),o$1p.clone(o$1p.UNIT_Y,o.up);var a=Ge$3;o$1p.clone(o.position2D,a.origin);var s=o$1p.clone(r.directionWC,a.direction),l=i.scaleToGeodeticSurface(r.positionWC,Le$4),u=m$19.eastNorthUpToFixedFrame(l,i,xe$3);p$1d.inverseTransformation(u,u),p$1d.multiplyByPointAsVector(u,s,s),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,s,s);var c=n.globe;if(e$2e(c)){var h=c.pickWorldCoordinates(a,n,We$2);if(e$2e(h)){var d=o$1p.distance(o.position2D,h);h.x+=d,o$1p.clone(h,o.position2D)}}}function f(e,t){e.position.x=t}p$1d.multiplyByPoint(v$K.TRANSFORM_2D,o.position,o.position2D),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o.direction,o.direction2D),p$1d.multiplyByPointAsVector(v$K.TRANSFORM_2D,o.up,o.up2D);var p=o.frustum;p.right=.5*o.position.z,p.left=-p.right,p.top=p.right*(n.drawingBufferHeight/n.drawingBufferWidth),p.bottom=-p.top;var _=ze$4;p$1d.multiplyByPoint(v$K.TRANSFORM_2D_INVERSE,o.position2D,_.position),o$1p.clone(o.direction,_.direction),o$1p.clone(o.up,_.up),_.frustum=p;var m=te$4(_);V$7(e,m),K$5(e,t,o,(function(){X$6(e,t,o,f,m)}))}function J$3(e,t,i,n){var r=e._scene,o=r.camera,a=o.frustum.right-o.frustum.left;o.frustum=i.frustum.clone();var s=o.frustum.fov,l=.5*e$2d.RADIANS_PER_DEGREE,u=a*Math.tan(.5*s);o.frustum.far=u/Math.tan(.5*l)+1e7,o.frustum.fov=l;var c=r.tweens.add({duration:t,easingFunction:m$Y.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){o.frustum.fov=e$2d.lerp(l,s,e.time),o.position.z=u/Math.tan(.5*o.frustum.fov)},complete:function(){n(e)}});e._currentTweens.push(c)}function Qe$1(e,t,i,n){t*=.5;var r=e._scene,o=r.camera,a=o$1p.clone(i.position,H$a),s=o$1p.clone(i.direction,Y$3),l=o$1p.clone(i.up,k$7);function u(){o.frustum=i.frustum.clone();var u=o$1p.clone(o.position,L$a),c=o$1p.clone(o.direction,Z$7),h=o$1p.clone(o.up,Q$4);u.z=a.z;var d=r.tweens.add({duration:t,easingFunction:m$Y.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$6(u,a,e.time,o.position),w$6(c,s,e.time,o.direction),w$6(h,l,e.time,o.up),o$1p.cross(o.direction,o.up,o.right),o$1p.normalize(o.right,o.right)},complete:function(){n(e)}});e._currentTweens.push(d)}r._mode=C$14.MORPHING,e._morphToOrthographic?u():J$3(e,0,i,u)}function K$5(e,t,i,n){var r=e._scene,o=r.camera,a=o$1p.clone(o.position,L$a),s=o$1p.clone(o.direction,Z$7),l=o$1p.clone(o.up,Q$4),u=o$1p.clone(i.position2D,H$a),c=o$1p.clone(i.direction2D,Y$3),h=o$1p.clone(i.up2D,k$7);var d=r.tweens.add({duration:t,easingFunction:m$Y.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){w$6(a,u,e.time,o.position),w$6(s,c,e.time,o.direction),w$6(l,h,e.time,o.up),o$1p.cross(o.direction,o.up,o.right),o$1p.normalize(o.right,o.right),o._adjustOrthographicFrustum(!0)},complete:function(){$$6(e,r,1,0,t,n)}});e._currentTweens.push(d)}function $$6(e,t,i,n,r,o){var a={object:t,property:"morphTime",startValue:i,stopValue:n,duration:r,easingFunction:m$Y.QUARTIC_OUT};e$2e(o)&&(a.complete=function(){o(e)});var s=t.tweens.addProperty(a);e._currentTweens.push(s)}function ee$5(e){return function(t){var i=t._scene;i._mode=C$14.SCENE3D,i.morphTime=C$14.getMorphTime(C$14.SCENE3D),P$9(t);var n=i.camera;(t._previousMode!==C$14.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,o$1p.clone(e.position,n.position),o$1p.clone(e.direction,n.direction),o$1p.clone(e.up,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right),n.frustum=e.frustum.clone());var r=n.frustum;i.frameState.useLogDepth&&(r.near=.1,r.far=1e10);var o=e$2e(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,C$14.SCENE3D,o)}}function te$4(e){return function(t){var i=t._scene;i._mode=C$14.SCENE2D,i.morphTime=C$14.getMorphTime(C$14.SCENE2D),P$9(t);var n=i.camera;o$1p.clone(e.position,n.position),n.position.z=2*i.mapProjection.ellipsoid.maximumRadius,o$1p.clone(e.direction,n.direction),o$1p.clone(e.up,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right),n.frustum=e.frustum.clone();var r=e$2e(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,C$14.SCENE2D,r)}}function Ye$2(e){return function(t){var i=t._scene;i._mode=C$14.COLUMBUS_VIEW,i.morphTime=C$14.getMorphTime(C$14.COLUMBUS_VIEW),P$9(t);var n=i.camera;(t._previousModeMode!==C$14.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,o$1p.clone(e.position,n.position),o$1p.clone(e.direction,n.direction),o$1p.clone(e.up,n.up),o$1p.cross(n.direction,n.up,n.right),o$1p.normalize(n.right,n.right));var r=n.frustum;i.frameState.useLogDepth&&(r.near=.1,r.far=1e10);var o=e$2e(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,C$14.COLUMBUS_VIEW,o)}}function d$e(e,t,i,n,r,o,a,s,l,u){this._tweens=e,this._tweenjs=t,this._startObject=l$1f(i),this._stopObject=l$1f(n),this._duration=r,this._delay=o,this._easingFunction=a,this._update=s,this._complete=l,this.cancel=u,this.needsStart=!0}function s$a(){this._tweens=[]}function _a(e){if(!e$2e(e))throw new t$15("scene is required.");this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.enableWalk=!1,this.walkParameters={speed:1,height:2},this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.translateEventTypes=Q$d.LEFT_DRAG,this.zoomEventTypes=[Q$d.RIGHT_DRAG,Q$d.WHEEL,Q$d.PINCH],this.rotateEventTypes=Q$d.LEFT_DRAG,this.tiltEventTypes=[Q$d.MIDDLE_DRAG,Q$d.PINCH,{eventType:Q$d.LEFT_DRAG,modifier:Aa$1.CTRL},{eventType:Q$d.RIGHT_DRAG,modifier:Aa$1.CTRL}],this.lookEventTypes={eventType:Q$d.LEFT_DRAG,modifier:Aa$1.SHIFT},this.minimumPickingTerrainHeight=15e4,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumCollisionTerrainHeight=15e4,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=75e5,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this._enableIndoorColliDetection=!1,this.minimumDetectDistance=.5,this.minimumWalkingDetectDistance=2,this._scene=e,this._globe=void 0,this._ellipsoid=void 0,this._aggregator=new l$l(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new s$a,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new o$1o(-1,-1),this._tiltCenter=new o$1p,this._rotateMousePosition=new o$1o(-1,-1),this._rotateStartPosition=new o$1p,this._strafeStartPosition=new o$1p,this._zoomMouseStart=new o$1o(-1,-1),this._zoomWorldPosition=new o$1p,this._useZoomWorldPosition=!1,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._rotatingZoom=!1;var t=e.mapProjection;this._maxCoord=t.project(new a$18(Math.PI,e$2d.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=.618,this._minimumRotateRate=.5,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._cloneCamera=void 0,this._isAroundScreenCenter=!1,this.autoTiltHeight=0,this._controlMode=vi$2.NORMAL,this._enableFusion=!1,this.panOffset={x:0,y:0},this.zoomDirty=!1,this.panDirty=!1,this.minFov=e$2d.toRadians(20),this.maxFov=e$2d.toRadians(70)}Object.defineProperties(d$e.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}}),d$e.prototype.cancelTween=function(){this._tweens.remove(this)},Object.defineProperties(s$a.prototype,{length:{get:function(){return this._tweens.length}}}),s$a.prototype.add=function(e){if(!e$2e((e=u$Z(e,u$Z.EMPTY_OBJECT)).startObject)||!e$2e(e.stopObject))throw new t$15("options.startObject and options.stopObject are required.");if(!e$2e(e.duration)||e.duration<0)throw new t$15("options.duration is required and must be positive.");if(0===e.duration)return e$2e(e.complete)&&e.complete(),new d$e(this);var t=e.duration/h$17.SECONDS_PER_MILLISECOND,i=u$Z(e.delay,0),n=i/h$17.SECONDS_PER_MILLISECOND,r=u$Z(e.easingFunction,m$Y.LINEAR_NONE),o=e.startObject,a=new f$X.Tween(o);a.to(l$1f(e.stopObject),t),a.delay(n),a.easing(r),e$2e(e.update)&&a.onUpdate((function(){e.update(o)})),a.onComplete(u$Z(e.complete,null)),a.repeat(u$Z(e._repeat,0));var s=new d$e(this,a,e.startObject,e.stopObject,e.duration,i,r,e.update,e.complete,e.cancel);return this._tweens.push(s),s},s$a.prototype.addProperty=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).object,i=e.property,n=e.startValue,r=e.stopValue;if(!e$2e(t)||!e$2e(e.property))throw new t$15("options.object and options.property are required.");if(!e$2e(t[i]))throw new t$15("options.object must have the specified property.");if(!e$2e(n)||!e$2e(r))throw new t$15("options.startValue and options.stopValue are required.");return this.add({startObject:{value:n},stopObject:{value:r},duration:u$Z(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){t[i]=e.value},complete:e.complete,cancel:e.cancel,_repeat:e._repeat})},s$a.prototype.addAlpha=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).material;if(!e$2e(t))throw new t$15("options.material is required.");var i=[];for(var n in t.uniforms)t.uniforms.hasOwnProperty(n)&&e$2e(t.uniforms[n])&&e$2e(t.uniforms[n].alpha)&&i.push(n);if(0===i.length)throw new t$15("material has no properties with alpha components.");return this.add({startObject:{alpha:u$Z(e.startValue,0)},stopObject:{alpha:u$Z(e.stopValue,1)},duration:u$Z(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){for(var n=i.length,r=0;r<n;++r)t.uniforms[i[r]].alpha=e.alpha},complete:e.complete,cancel:e.cancel})},s$a.prototype.addOffsetIncrement=function(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).material;if(!e$2e(t))throw new t$15("material is required.");if(!e$2e(t.uniforms.offset))throw new t$15("material.uniforms must have an offset property.");var i=t.uniforms;return this.addProperty({object:i,property:"offset",startValue:i.offset,stopValue:i.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})},s$a.prototype.remove=function(e){if(!e$2e(e))return!1;var t=this._tweens.indexOf(e);return-1!==t&&(e.tweenjs.stop(),e$2e(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0)},s$a.prototype.removeAll=function(){for(var e=this._tweens,t=0;t<e.length;++t){var i=e[t];i.tweenjs.stop(),e$2e(i.cancel)&&i.cancel()}e.length=0},s$a.prototype.contains=function(e){return e$2e(e)&&-1!==this._tweens.indexOf(e)},s$a.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return this._tweens[e]},s$a.prototype.update=function(e){var t=this._tweens,i=0;for(e=e$2e(e)?e/h$17.SECONDS_PER_MILLISECOND:Et$c();i<t.length;){var n=t[i],r=n.tweenjs;n.needsStart?(n.needsStart=!1,r.start(e)):r.update(e)?i++:(r.stop(),t.splice(i,1))}};var Za=0;function ne$4(e,t){if(e<0)return 0;var i=25*(1-t);return Math.exp(-i*e)}function re$4(e){return o$1o.equalsEpsilon(e.startPosition,e.endPosition,e$2d.EPSILON14)}Object.defineProperties(_a.prototype,{enableIndoorColliDetection:{get:function(){return this._enableIndoorColliDetection},set:function(e){this._enableIndoorColliDetection=e,this._scene.camera._enableIndoorColliDetection=e}},zoomFactor:{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e}},previousHeight:{set:function(e){Za=e}},controlMode:{get:function(){return this._controlMode},set:function(e){o$1q.typeOf.number.lessThanOrEquals("controlMode",e,1),o$1q.typeOf.number.greaterThanOrEquals("controlMode",e,0),this._controlMode=e}},enableFusion:{get:function(){return this._enableFusion},set:function(e){e!==this._enableFusion&&(this._enableFusion=e,this.panOffset={x:0,y:0})}}});var se$3=.4;function oe$5(e,t,i,n,r,o,a){let s=o[a];e$2e(s)||(s=o[a]={startPosition:new o$1o,endPosition:new o$1o,motion:new o$1o,inertiaEnabled:!0});const l=e.getButtonPressTime(t,i),u=e.getButtonReleaseTime(t,i),c=l&&u&&(u.getTime()-l.getTime())/1e3,h=new Date,d=u&&(h.getTime()-u.getTime())/1e3;if(l&&u&&c<se$3){const a=ne$4(d,n),l=e.getLastMovement(t,i);if(!e$2e(l)||re$4(l)||!s.inertiaEnabled||(s.motion.x=.5*(l.endPosition.x-l.startPosition.x),s.motion.y=.5*(l.endPosition.y-l.startPosition.y),s.startPosition=o$1o.clone(l.startPosition,s.startPosition),s.endPosition=o$1o.multiplyByScalar(s.motion,a,s.endPosition),s.endPosition=o$1o.add(s.startPosition,s.endPosition,s.endPosition),isNaN(s.endPosition.x)||isNaN(s.endPosition.y)||o$1o.distance(s.startPosition,s.endPosition)<.5))return;if(!e.isButtonDown(t,i)){r(o,e.getStartMousePosition(t,i),s)}}}function ve$3(e,t){if(e$2e(t)){let i=e[t];e$2e(i)&&(i.inertiaEnabled=!0);const n=e._inertiaDisablers[t];if(e$2e(n)){const t=n.length;for(let r=0;r<t;++r)i=e[n[r]],e$2e(i)&&(i.inertiaEnabled=!1)}}}var di$1=[];function b$c(e,t,i,n,r,o){if(e._scene.mode===C$14.COLUMBUS_VIEW&&e._controlMode===vi$2.DESIGN?e._isAroundScreenCenter=!0:e._isAroundScreenCenter=!1,e$2e(i)){var a=e._aggregator;e$2e(e.tiltEventTypes)&&!Array.isArray(e.tiltEventTypes)&&(e.tiltEventTypes=[e.tiltEventTypes]),Array.isArray(i)||(di$1[0]=i,i=di$1);for(var s=i.length,l=0;l<s;++l){var u=i[l],c=e$2e(u.eventType)?u.eventType:u,h=u.modifier,d=a.isMoving(c,h)&&a.getMovement(c,h),f=a.getStartMousePosition(c,h);if(e._isAroundScreenCenter){var p=e._scene.getViewport({x:10,y:10});f={x:p.width/2,y:p.height/2}}e.enableInputs&&t&&(d?(n(e,f,d),ve$3(e,o)):r<1&&"_lastInertiaTiltMovement"!=o&&"_lastInertiaZoomMovement"!=o?oe$5(a,c,h,r,n,e,o):("_lastInertiaZoomMovement"===o||"_lastInertiaTiltMovement"===o)&&a._isDown[c]&&(e._isAroundScreenCenter||(f=a.getStartMousePosition(c,void 0)),e._scene.mode===C$14.SCENE3D&&"_lastInertiaTiltMovement"===o&&e.tiltEventTypes.indexOf(c)>-1?n(e,f,a._lastMovement[c],!0):"_lastInertiaZoomMovement"==o&&a._lastMovement[c].valid&&n(e,f,a._lastMovement[c])))}}}var Ca=new f$19,me$5=new o$1p,de$3=new o$1o,fe$3=new o$1p,ue$5=new o$1o;new o$1p;var _e$1=new o$1p,he$4=new o$1p,ge$5=new o$1p,pe$4=new o$1p,ce$7=new o$1p,ye$1=new o$1p,we$1=new o$1p,Ce$2=new o$1p,le$5=new o$1p,Te$3=new o$1p,Pe$2=new o$1p,Re$3=new o$1p,Ee$4=new o$1p,Ie$3=new o$1p,q$6=new o$1p,fi$1=new o$1p,ui$1=new o$1p,Fa={orientation:new i$16};async function ha$1(e,t,i,n,r,o){var a=1;e$2e(o)&&(a=e$2d.clamp(Math.abs(o),.25,1));var s=e._scene,l=s.camera,u=s.mode;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(s.camera)),v$K.clone(e._scene.camera,e._cloneCamera),l=e._cloneCamera);var c=e.minimumZoomDistance*a,h=e.maximumZoomDistance,d=n*(r-c);d=e$2d.clamp(d,e._minimumZoomRate,e._maximumZoomRate);var f=(i.endPosition.y-i.startPosition.y)/e._scene.canvas.clientHeight,p=d*(f=Math.min(f,e.maximumMovementRatio));if(e$2e(e.thetaWindowRatio)&&Math.abs(f)<Math.abs(e.thetaWindowRatio))e.thetaWindowRatio=0;else if(e$2e(e.phiWindowRatio)&&Math.abs(f)<Math.abs(e.phiWindowRatio))e.phiWindowRatio=0;else if(!(e.enableIndoorColliDetection&&p>0&&Math.abs(r-c)<1||e.enableIndoorColliDetection&&p<0&&Math.abs(r-h)<1)){r-p<c?p=r-c-1:r-p>h&&(p=r-h);var _=Fa.orientation;if(_.heading=l.heading,_.pitch=l.pitch,_.roll=l.roll,l.frustum instanceof a$V)return void(Math.abs(p)>0&&(l.zoomIn(p),e.enableIndoorColliDetection&&$$5(e),l._adjustOrthographicFrustum()));var m=o$1o.equals(t,e._zoomMouseStart);e._isAroundScreenCenter&&(m=!1,e._useZoomWorldPosition=!1);var g,x,y=e._zoomingOnVector,v=e._rotatingZoom;if(!m&&!e._isAroundScreenCenter){if(e._zoomMouseStart=o$1o.clone(t,e._zoomMouseStart),e$2e(e._globe)&&u===C$14.SCENE2D)g=l.getPickRay(t,Ca).origin,g=o$1p.fromElements(g.y,g.z,g.x);else if(e$2e(e._globe)){var $=ea$3(e,t,me$5);$.then((e=>{g=e})),await $}e$2e(g)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=o$1p.clone(g,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,y=e._zoomingOnVector=!1,v=e._rotatingZoom=!1}if(!e._useZoomWorldPosition)return l.zoomIn(p),p<0&&(x=3),void(e.enableIndoorColliDetection&&$$5(e,x));var b=u===C$14.COLUMBUS_VIEW;if(l.positionCartographic.height<2e6&&(v=!0),!m||v){if(u===C$14.SCENE2D){var T=e._zoomWorldPosition,C=l.position;if(!o$1p.equals(T,C)&&l.positionCartographic.height<2*e._maxCoord.x){var S=l.position.x,w=o$1p.subtract(T,C,fe$3);o$1p.normalize(w,w);var E=o$1p.distance(T,C)*p/(.5*l.getMagnitude());l.move(w,.5*E),(l.position.x<0&&S>0||l.position.x>0&&S<0)&&(g=l.getPickRay(t,Ca).origin,e._zoomWorldPosition=o$1p.clone(g,e._zoomWorldPosition))}}else if(u===C$14.SCENE3D){var P=o$1p.normalize(l.position,pe$4);if(l.positionCartographic.height<3e3&&Math.abs(o$1p.dot(l.direction,P))<.6)b=!0;else{var A=s.canvas,L=ue$5;L.x=A.clientWidth/2,L.y=A.clientHeight/2;var M=void 0;if(e$2e(M)&&l.positionCartographic.height<1e6){var R=ye$1;o$1p.clone(l.position,R);var O=e._zoomWorldPosition,D=ce$7;if(D=o$1p.normalize(O,D),o$1p.dot(D,P)<0)return;var I=Ie$3,B=le$5;o$1p.clone(l.direction,B),o$1p.add(R,o$1p.multiplyByScalar(B,1e3,q$6),I);var F=Te$3,N=Pe$2;o$1p.subtract(O,R,F),o$1p.normalize(F,N);var G=o$1p.dot(P,N);if(G>=0)return void(e._zoomMouseStart.x=-1);var z=Math.acos(-G),U=o$1p.magnitude(R),V=o$1p.magnitude(O),k=U-p,W=o$1p.magnitude(F),H=Math.asin(e$2d.clamp(W/V*Math.sin(z),-1,1))-Math.asin(e$2d.clamp(k/V*Math.sin(z),-1,1))+z,q=we$1;o$1p.normalize(R,q);var j=Ce$2;j=o$1p.cross(N,q,j),j=o$1p.normalize(j,j),o$1p.normalize(o$1p.cross(q,j,q$6),B),o$1p.multiplyByScalar(o$1p.normalize(I,q$6),o$1p.magnitude(I)-p,I),o$1p.normalize(R,R),o$1p.multiplyByScalar(R,k,R);var X=Re$3;o$1p.multiplyByScalar(o$1p.add(o$1p.multiplyByScalar(q,Math.cos(H)-1,fi$1),o$1p.multiplyByScalar(B,Math.sin(H),ui$1),q$6),k,X),o$1p.add(R,X,R),o$1p.normalize(I,q),o$1p.normalize(o$1p.cross(q,j,q$6),B);var Y=Ee$4;return o$1p.multiplyByScalar(o$1p.add(o$1p.multiplyByScalar(q,Math.cos(H)-1,fi$1),o$1p.multiplyByScalar(B,Math.sin(H),ui$1),q$6),o$1p.magnitude(I),Y),o$1p.add(I,Y,I),o$1p.clone(R,l.position),o$1p.normalize(o$1p.subtract(I,R,q$6),l.direction),o$1p.clone(l.direction,l.direction),o$1p.cross(l.direction,l.up,l.right),o$1p.cross(l.right,l.direction,l.up),l.setView(Fa),void(e.enableIndoorColliDetection&&$$5(e))}if(e$2e(M)){var Z=o$1p.normalize(M,_e$1),K=o$1p.normalize(e._zoomWorldPosition,he$4),Q=o$1p.dot(K,Z);if(Q>0&&Q<1){var J=e$2d.acosClamped(Q),ee=o$1p.cross(K,Z,ge$5),te=p/(Math.abs(J)>e$2d.toRadians(20)?.75*l.positionCartographic.height:l.positionCartographic.height-p);l.rotate(ee,J*te)}}else b=!0}}e._rotatingZoom=!b}if(!m&&b||y){var ie=s$R.wgs84ToWindowCoordinates(s,e._zoomWorldPosition,de$3),ne=(u!==C$14.COLUMBUS_VIEW&&o$1o.equals(t,e._zoomMouseStart)&&e$2e(ie)?l.getPickRay(ie,Ca):l.getPickRay(t,Ca)).direction;u===C$14.COLUMBUS_VIEW&&o$1p.fromElements(ne.y,ne.z,ne.x,ne),l.move(ne,p),e._zoomingOnVector=!0}else l.zoomIn(p);l.setView(Fa),e.enableIndoorColliDetection&&$$5(e)}}function xe$2(e,t,i,n,r,o){e._ellipsoid;var a=e._scene,s=a.camera;if(a.canvas,e._globe,e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(a.camera)),v$K.clone(a.camera,e._cloneCamera),s=e._cloneCamera),!(Math.abs(i.endPosition.y-i.startPosition.y)<1)){var l=i.endPosition.y-i.startPosition.y>0?1:-1;e._aggregator._isDown[1]&&(l=i.endPosition.y-t.y>0?.2:-.2,e._isAroundScreenCenter&&(l=i.endPosition.y-i.startPosition.y>0?.2:-.2));var u=e.maximumZoomDistance,c=l*n*7e-4*48;if(e$2e(o)){var h=o$1p.distance(s.position,o),d=1*e.minimumZoomDistance,f=n*(h-d);f=e$2d.clamp(f,e._minimumZoomRate,e._maximumZoomRate);var p=l/e._scene.canvas.clientHeight,_=f*(p=Math.min(p,e.maximumMovementRatio));if(e.enableIndoorColliDetection&&_>0&&Math.abs(h-d)<.1)return}if(!(r>u&&l<0)){o$1o.equals(t,e._zoomMouseStart)||(e._zoomMouseStart=o$1o.clone(t,e._zoomMouseStart)),e.zoomActive=!0,s.position;var m=r*c;if(!e$2e(o))return void s.zoomIn(m);var g=new o$1p;o$1p.subtract(o,s.position,g);var x=new o$1p;x=o$1p.clone(s.right,x);var y=o$1p.dot(g,x),v=new o$1p;v=o$1p.multiplyByScalar(x,y,v);var $=new o$1p;$=o$1p.subtract(g,v,$);var b=new o$1p;b=o$1p.normalize($,b),new o$1p,s.move(b,m);var T=new o$1p;T=o$1p.normalize(o,T);var C=o$1p.magnitude(o),S=xi$2;S.x=S.y=S.z=C;var w=t$12.fromCartesian3(S,Di$2),E=s.pickEllipsoid(t,w,Qa);if(e$2e(E)&&!isNaN(E.x)&&!isNaN(E.y)&&!isNaN(E.z)){E=o$1p.normalize(E,E);var P=o$1p.angleBetween(T,E);if(!e$2d.equalsEpsilon(P,0,e$2d.EPSILON10)){var A=new o$1p;A=o$1p.cross(T,E,A),s.rotate(A,P),e.enableIndoorColliDetection&&$$5(e,1)}}}}}var De$3=new f$19,Me$6=new f$19,ze$3=new o$1p;function Se$2(e,t,i){var n=e._scene.camera,r=n.getPickRay(i.startPosition,De$3).origin,o=n.getPickRay(i.endPosition,Me$6).origin;r=o$1p.fromElements(r.y,r.z,r.x,r),o=o$1p.fromElements(o.y,o.z,o.x,o);var a=o$1p.subtract(r,o,ze$3),s=o$1p.magnitude(a);s>0&&(o$1p.normalize(a,a),n.move(a,s))}function _i$2(e,t,i){e$2e(i.distance)&&(i=i.distance);var n=e._scene.camera;ha$1(e,t,i,e._zoomFactor,n.getMagnitude())}var ke$2=new o$1o,be$2=new o$1o;function hi$1(e,t,i){if(e$2e(i.angleAndHeight))Ne$2(e,t,i.angleAndHeight);else{var n=e._scene,r=n.camera,o=n.canvas,a=o.clientWidth,s=o.clientHeight,l=ke$2;l.x=2/a*i.startPosition.x-1,l.y=2/s*(s-i.startPosition.y)-1,l=o$1o.normalize(l,l);var u=be$2;u.x=2/a*i.endPosition.x-1,u.y=2/s*(s-i.endPosition.y)-1,u=o$1o.normalize(u,u);var c=e$2d.acosClamped(l.x);l.y<0&&(c=e$2d.TWO_PI-c);var h=e$2d.acosClamped(u.x);u.y<0&&(h=e$2d.TWO_PI-h);var d=h-c;r.twistRight(d)}}function Ne$2(e,t,i){var n=e._rotateFactor*e._rotateRateRangeAdjustment;n>e._maximumRotateRate&&(n=e._maximumRotateRate),n<e._minimumRotateRate&&(n=e._minimumRotateRate);var r=e._scene,o=r.camera,a=r.canvas,s=(i.endPosition.x-i.startPosition.x)/a.clientWidth,l=n*(s=Math.min(s,e.maximumMovementRatio))*Math.PI*4;o.twistRight(l)}function Oe$3(e){var t=e._scene.mapMode2D===Rr$3.ROTATE;p$1d.equals(p$1d.IDENTITY,e._scene.camera.transform)?(b$c(e,e.enableTranslate,e.translateEventTypes,Se$2,e.inertiaTranslate,"_lastInertiaTranslateMovement"),b$c(e,e.enableZoom,e.zoomEventTypes,_i$2,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&b$c(e,e.enableRotate,e.tiltEventTypes,hi$1,e.inertiaSpin,"_lastInertiaTiltMovement")):(b$c(e,e.enableZoom,e.zoomEventTypes,_i$2,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&b$c(e,e.enableRotate,e.translateEventTypes,hi$1,e.inertiaSpin,"_lastInertiaSpinMovement"))}var gi$2=new f$19,We$1=new o$1p,la$1=new o$1p,ga=new o$1o;function pi$2(e,t){if(e._mode!==C$14.SCENE3D||e._multiViewportMode==B$e.NONE)return t;o$1o.clone(t,ga);for(var i=e._context,n=new f$1a(t.x,i.drawingBufferHeight-t.y),r=new f$1a,o=0;o<e._multiViewportInfo.length;o++){var a=e._multiViewportInfo[o];if(r.x=i.drawingBufferWidth*a.x,r.y=i.drawingBufferHeight*a.y,r.width=i.drawingBufferWidth*a.width,r.height=i.drawingBufferHeight*a.height,r.intersect(n)===Ae$w.INTERSECTING){var s=(n.x-r.x)/r.width,l=(n.y-r.y)/r.height;return ga.x=s*i.drawingBufferWidth,ga.y=i.drawingBufferHeight-l*i.drawingBufferHeight,ga}}return ga}function ea$3(e,t,i){var n=e._scene,r=e._globe,o=n.camera;return e$2e(r)&&n.pickPositionSupported?n.pickPositionWorldCoordinatesAsync(t,We$1,!0).then((a=>{var s,l=o.getPickRay(pi$2(e._scene,t),gi$2),u=r.pick(l,n,la$1);if((e$2e(a)?o$1p.distance(a,o.positionWC):Number.POSITIVE_INFINITY)<(e$2e(u)?o$1p.distance(u,o.positionWC):Number.POSITIVE_INFINITY))return Promise.resolve(o$1p.clone(a,i));if(e$2e(u))return Promise.resolve(o$1p.clone(u,i));if(n._environmentState.isUnderGlobeVisible&&o._positionCartographic.height<1&&e$2e(s=g$1j.rayEllipsoid(l,n._underGlobe.ellipsoid))){var c=s.start>0?s.start:s.stop;return c=Math.min(c,100),Promise.resolve(f$19.getPoint(l,c,i))}return Promise.resolve(void 0)})):Promise.resolve(void 0)}var Ve$4=new f$19,Ae$4=new f$19,ci$2=new o$1p,He$2=new o$1p,Ze$2=new o$1p,Fe$3=new o$1p,Be$4=new o$1m(o$1p.UNIT_X,0),Ue$2=new o$1o,Le$3=new o$1o;function Ba(e,t,i,n,r,o,a){var s=o$1m.fromPointNormal(o,a,Be$4),l=t.getPickRay(r.startPosition,Ve$4),u=g$1j.rayPlane(l,s,ci$2),c=t.getPickRay(n,Ae$4),h=g$1j.rayPlane(c,s,He$2);if(!e$2e(u)||!e$2e(h))return e._looking=!0,F$8(e,i,r),void o$1o.clone(i,e._translateMousePosition);var d=o$1p.subtract(u,h,Ze$2),f=d.x;d.x=d.y,d.y=d.z,d.z=f;var p=o$1p.magnitude(d);p>e$2d.EPSILON6&&(o$1p.normalize(d,d),t.move(d,p),e.enableIndoorColliDetection&&$$5(e))}function qe$1(e,t,i){if(o$1p.equals(t,e._translateMousePosition)||(e._looking=!1),o$1p.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking||e.enableWalk)F$8(e,t,i);else if(!e._strafing||e._isAroundScreenCenter){var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(n.camera)),v$K.clone(n.camera,e._cloneCamera),r=e._cloneCamera);var o=o$1o.clone(i.startPosition,Ue$2),a=o$1o.clone(i.endPosition,Le$3),s=o$1p.clone(o$1p.ZERO,Fe$3),l=o$1p.UNIT_X;r.position.z<e._minimumPickingTerrainHeight&&(n._context.webgpu||ea$3(e,o,ci$2).then((n=>{if(s.x>r.position.z&&e$2e(n)&&!e._isAroundScreenCenter)return o$1p.clone(n,e._strafeStartPosition),e._strafing=!0,Pa(e,t,i),void(e._strafeMousePosition=o$1o.clone(t,e._strafeMousePosition))}))),Ba(e,r,t,a,i,s,l)}else Pa(e,t,i)}var yi$2=new o$1o,Ua=new f$19,Ta=new o$1p,Ge$2=new o$1p,wi$2=new p$1d,Ye$1=new p$1d,Qe=new o$1p,Xe$3=new o$1m(o$1p.UNIT_X,0),La=new o$1p,qa=new a$18,Ci$2=new p$1d,Ke$2=new n$15,Je$2=new p$1e,$e$2=new o$1p;function je$2(e,t,i){if(e$2e(i.angleAndHeight)&&(i=i.angleAndHeight),(!o$1o.equals(t,e._tiltCenterMousePosition)||e._isAroundScreenCenter)&&(e._tiltCVOffMap=!1,e._looking=!1),e._looking)F$8(e,t,i);else{var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(n.camera)),v$K.clone(n.camera,e._cloneCamera),r=e._cloneCamera);var o=e._maxCoord,a=Math.abs(r.position.x)-o.x<0&&Math.abs(r.position.y)-o.y<0;(e._tiltCVOffMap||!a||r.position.z>e._minimumPickingTerrainHeight)&&(e._tiltCVOffMap=!0,li$1(e,t,i)),n._context.webgpu?Ri$2(e,t,i):n.pickPositionWorldCoordinatesAsync(t).then((n=>{e$2e(n)?Ri$2(e,t,i):(e._tiltCVOffMap=!0,li$1(e,t,i))})),e.enableIndoorColliDetection&&$$5(e)}}function li$1(e,t,i){var n=e._scene,r=n.camera,o=n.canvas,a=yi$2;a.x=o.clientWidth/2,a.y=o.clientHeight/2;var s,l=r.getPickRay(a,Ua),u=o$1p.UNIT_X,c=l.origin,h=l.direction,d=o$1p.dot(u,h);if(Math.abs(d)>e$2d.EPSILON6&&(s=-o$1p.dot(u,c)/d),!e$2e(s)||s<=0)return e._looking=!0,F$8(e,t,i),void o$1o.clone(t,e._tiltCenterMousePosition);var f=o$1p.multiplyByScalar(h,s,Ta);o$1p.add(c,f,f);var p=n.mapProjection,_=p.ellipsoid;o$1p.fromElements(f.y,f.z,f.x,f);var m=p.unproject(f,qa);_.cartographicToCartesian(m,f);var g=m$19.eastNorthUpToFixedFrame(f,_,wi$2),x=e._globe,y=e._ellipsoid;e._globe=void 0,e._ellipsoid=t$12.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var v=p$1d.clone(r.transform,Ci$2);r._setTransform(g),X$5(e,t,i,o$1p.UNIT_Z),r._setTransform(v),e._globe=x,e._ellipsoid=y;var $=y.maximumRadius;e._rotateFactor=1/$,e._rotateRateRangeAdjustment=$}function Ti$2(e,t,i,n,r){if(e$2e(i)){var o=e._scene,a=o.canvas,s=o.camera,l=yi$2;l.x=a.clientWidth/2,l.y=e._tiltCenterMousePosition.y;var u=s.getPickRay(l,Ua),c=o$1p.clone(o$1p.ZERO,Qe);c.x=i.x;var h=o$1m.fromPointNormal(c,t,Xe$3),d=g$1j.rayPlane(u,h,Ge$2),f=s._projection,p=f.ellipsoid;o$1p.fromElements(i.y,i.z,i.x,i);var _=f.unproject(i,qa);p.cartographicToCartesian(_,i);var m,g=m$19.eastNorthUpToFixedFrame(i,p,wi$2);e$2e(d)?(o$1p.fromElements(d.y,d.z,d.x,d),_=f.unproject(d,qa),p.cartographicToCartesian(_,d),m=m$19.eastNorthUpToFixedFrame(d,p,Ye$1)):m=g;var x=e._globe,y=e._ellipsoid;e._globe=void 0,e._ellipsoid=t$12.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var v=o$1p.UNIT_Z,$=p$1d.clone(s.transform,Ci$2);s._setTransform(g);var b=o$1p.cross(o$1p.UNIT_Z,o$1p.normalize(s.position,La),La),T=o$1p.dot(s.right,b);if(X$5(e,r,n,v,!1,!0),s._setTransform(m),T<0){n.startPosition.y>n.endPosition.y&&(v=void 0);var C=s.constrainedAxis;s.constrainedAxis=void 0,X$5(e,r,n,v,!0,!1),s.constrainedAxis=C}else X$5(e,r,n,v,!0,!1);if(e$2e(s.constrainedAxis)){var S=o$1p.cross(s.direction,s.constrainedAxis,$e$2);o$1p.equalsEpsilon(S,o$1p.ZERO,e$2d.EPSILON6)||(o$1p.dot(S,s.right)<0&&o$1p.negate(S,S),o$1p.cross(S,s.direction,s.up),o$1p.cross(s.direction,s.up,s.right),o$1p.normalize(s.up,s.up),o$1p.normalize(s.right,s.right))}s._setTransform($),e._globe=x,e._ellipsoid=y;var w=y.maximumRadius;e._rotateFactor=1/w,e._rotateRateRangeAdjustment=w;var E=o$1p.clone(s.positionWC,La);if(s._adjustHeightForTerrain(),!o$1p.equals(s.positionWC,E)){s._setTransform(m),s.worldToCameraCoordinatesPoint(E,E);var P=o$1p.magnitudeSquared(E);o$1p.magnitudeSquared(s.position)>P&&(o$1p.normalize(s.position,s.position),o$1p.multiplyByScalar(s.position,Math.sqrt(P),s.position));var A=o$1p.angleBetween(E,s.position),L=o$1p.cross(E,s.position,E);o$1p.normalize(L,L);var M=n$15.fromAxisAngle(L,A,Ke$2),R=p$1e.fromQuaternion(M,Je$2);p$1e.multiplyByVector(R,s.direction,s.direction),p$1e.multiplyByVector(R,s.up,s.up),o$1p.cross(s.direction,s.up,s.right),o$1p.cross(s.right,s.direction,s.up),s._setTransform($)}}}function Pi$2(e,t,i,n,r){var o=e._scene.camera;if(!e$2e(t)){var a,s=o.getPickRay(r,Ua),l=s.origin,u=s.direction,c=o$1p.dot(n,u);if(Math.abs(c)>e$2d.EPSILON6&&(a=-o$1p.dot(n,l)/c),!e$2e(a)||a<=0)return e._looking=!0,F$8(e,r,i),void o$1o.clone(r,e._tiltCenterMousePosition);t=o$1p.multiplyByScalar(u,a,Ta),o$1p.add(l,t,t)}if(o$1o.clone(r,e._tiltCenterMousePosition),e._isAroundScreenCenter){var h=new o$1p;o$1p.clone(t,h),e._tiltCenter=h}else o$1p.clone(t,e._tiltCenter)}function Ri$2(e,t,i){var n=e._scene,r=n.camera;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(n.camera)),r=e._cloneCamera);var o,a=o$1p.UNIT_X;o$1o.equals(t,e._tiltCenterMousePosition)&&!e._isAroundScreenCenter?o=o$1p.clone(e._tiltCenter,Ta):r.position.z<e._minimumPickingTerrainHeight?ea$3(e,t,Ta).then((n=>{Pi$2(e,o=n,i,a,t),Ti$2(e,a,o,i,t)})):Pi$2(e,o,i,a,t),Ti$2(e,a,o,i,t)}var at$5=new o$1o,it$3=new f$19,Ga=new o$1p;function Ei$2(e){var t=o$1p.UNIT_X,i=e.origin,n=e.direction;return-o$1p.dot(t,i)/o$1p.dot(t,n)}function et$4(e,t,i){e$2e(i.distance)&&(i=i.distance);var n=e._scene,r=n.camera,o=n.canvas,a=at$5;a.x=o.clientWidth/2,a.y=o.clientHeight/2;var s,l=r.getPickRay(a,it$3);if(r.position.z<e._minimumPickingTerrainHeight)ea$3(e,t,Ga).then((o=>{if(e$2e(o))n.pickPositionWorldCoordinatesAsync(t,Ga,!0).then((n=>{if(e$2e(n))s=o$1p.distance(l.origin,o);else{var a=r._projection.unproject(r.position),u=a$18.toCartesian(a);s=o$1p.distance(u,o)}Ea(e,i);var c=o$1p.normalize(r.position,Ra);ha$1(e,t,i,e._zoomFactor,s,o$1p.dot(c,r.direction))}));else{s=Ei$2(l),Ea(e,i);var a=o$1p.normalize(r.position,Ra);ha$1(e,t,i,e._zoomFactor,s,o$1p.dot(a,r.direction))}}));else{s=Ei$2(l),Ea(e,i);var u=o$1p.normalize(r.position,Ra);ha$1(e,t,i,e._zoomFactor,s,o$1p.dot(u,r.direction))}}function tt$3(e){var t=e._scene.camera;if(p$1d.equals(p$1d.IDENTITY,t.transform)){var i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),b$c(e,e.enableTilt,e.tiltEventTypes,je$2,e.inertiaSpin,"_lastInertiaTiltMovement"),b$c(e,e.enableTranslate,e.translateEventTypes,qe$1,e.inertiaTranslate,"_lastInertiaTranslateMovement"),b$c(e,e.enableZoom,e.zoomEventTypes,et$4,e.inertiaZoom,"_lastInertiaZoomMovement"),b$c(e,e.enableLook,e.lookEventTypes,F$8),!(e._aggregator.anyButtonDown||e$2e(e._lastInertiaZoomMovement)&&e._lastInertiaZoomMovement.active||e$2e(e._lastInertiaTranslateMovement)&&e._lastInertiaTranslateMovement.active||i.contains(e._tween))){var n=t.createCorrectPositionTween(e.bounceAnimationTime);e$2e(n)&&(e._tween=i.add(n))}i.update()}else b$c(e,e.enableRotate,e.rotateEventTypes,X$5,e.inertiaSpin,"_lastInertiaSpinMovement"),b$c(e,e.enableZoom,e.zoomEventTypes,Si$2,e.inertiaZoom,"_lastInertiaZoomMovement")}new f$19;var nt$4=new o$1m(o$1p.UNIT_X,0);new o$1p,new o$1p;var Ya=new o$1p;function Pa(e,t,i){var n=e._scene.camera,r=e._strafeStartPosition,o=e.operPlane;if(e$2e(r)&&e$2e(o)){t=i.startPosition;var a=o$1o.clone(i.endPosition,new o$1o);if(e.flipY){var s=a.y-t.y;a.y=t.y-s}var l=n.getPickRay(t,new f$19),u=n.getPickRay(a,new f$19),c=g$1j.rayPlane(l,o,new o$1p),h=g$1j.rayPlane(u,o,new o$1p);if(e$2e(c)&&e$2e(h)){var d=o$1p.normalize(c,new o$1p),f=o$1p.normalize(h,new o$1p),p=o$1p.angleBetween(d,f);if(0!=p){var _=o$1p.cross(d,f,new o$1p);n.rotate(_,p),n._adjustHeightForTerrain()}}}}var Ii$2=new o$1p,oa$2=new a$18,xi$2=new o$1p,Di$2=new t$12,rt$5=new o$1p;function Mi$2(e,t,i,n){var r=e._scene,o=r.camera,a=o$1p.magnitude(n);if(o$1p.magnitude(o.position)<a){o$1p.clone(n,e._strafeStartPosition);var s=new o$1p;e.flipY=!0,s=o$1p.add(o.direction,o.up,s),o$1p.normalize(s,s);var l=o$1m.fromPointNormal(n,s,nt$4);e.operPlane=l,e._strafing=!0,Pa(e,t,i)}else{var u=xi$2;u.x=u.y=u.z=a;var c=t$12.fromCartesian3(u,Di$2);e.operEllipsoid=c,!r.undergroundMode&&r.globe.show&&(e._limitObject=mt$1(e,c)),Xa(e,t,i,c),o$1p.clone(n,e._rotateStartPosition)}}function st$3(e,t,i){var n=e._scene,r=n.camera;if(p$1d.equals(r.transform,p$1d.IDENTITY)){var o=e._ellipsoid.geodeticSurfaceNormal(r.position,rt$5),a=e._ellipsoid.cartesianToCartographic(r.positionWC,oa$2).height,s=e._globe;if(o$1o.equals(t,e._rotateMousePosition))e._looking?F$8(e,t,i,o):e._rotating?X$5(e,t,i):e._strafing?Pa(e,t,i,e.operPlane):Xa(e,t,i,e.operEllipsoid);else{if(e._looking=!1,e._rotating=!1,e._strafing=!1,e.enableWalk)return e._limitObject=void 0,e._looking=!0,void F$8(e,t,i,o);e$2e(s)&&a<e._minimumPickingTerrainHeight?ea$3(e,t,Ya).then((o=>{if(!e$2e(o)){var a=new f$19(r.position,r.direction),l=s.pick(a,n,la$1);if(e$2e(l)){var u=s$R.wgs84ToWindowCoordinates(n,l,new o$1p);ea$3(e,new o$1o(t.x,u.y+100),Ya).then((n=>{!e$2e(n)||Mi$2(e,t,i,n)}))}else if(!e$2e(o=r.pickEllipsoid(t,s.ellipsoid,Ya)))return}Mi$2(e,t,i,o)})):e$2e(r.pickEllipsoid(i.startPosition,e._ellipsoid,Ii$2))?(e._limitObject=void 0,Xa(e,t,i,e._ellipsoid),o$1p.clone(Ii$2,e._rotateStartPosition)):a>e._minimumTrackBallHeight?(e._limitObject=void 0,e._rotating=!0,X$5(e,t,i)):(e._limitObject=void 0,e._looking=!0,F$8(e,t,i,o)),o$1o.clone(t,e._rotateMousePosition)}}else X$5(e,t,i)}function X$5(e,t,i,n,r,o){r=u$Z(r,!1),o=u$Z(o,!1);var a=e._scene,s=a.camera;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(a.camera)),s=e._cloneCamera);var l=a.canvas,u=s.constrainedAxis;e$2e(n)&&(s.constrainedAxis=n);var c=o$1p.magnitude(s.position),h=e._rotateFactor*(c-e._rotateRateRangeAdjustment);h>e._maximumRotateRate&&(h=e._maximumRotateRate),h<e._minimumRotateRate&&(h=e._minimumRotateRate);var d=(i.startPosition.x-i.endPosition.x)/l.clientWidth,f=(i.startPosition.y-i.endPosition.y)/l.clientHeight;d=Math.min(d,e.maximumMovementRatio),f=Math.min(f,e.maximumMovementRatio);var p=Math.abs(d)<Math.abs(f),_=h*d*Math.PI*2,m=h*f*Math.PI;if("ontouchstart"in window&&(m*=2),e.deltaTheta=-m,e.thetaWindowRatio=f,e.phiWindowRatio=d,!r&&!p&&s.rotateRight(_),!o&&p){var g=Math.abs(s.pitch-m),x=s.positionCartographic.height,y=e.minimumZoomDistance+1;if(!(g>-e$2d.PI_OVER_TWO&&g<e$2d.PI_OVER_TWO)||x<y&&m<0)return void(s.constrainedAxis=u);s.rotate(s.right,m)}s.constrainedAxis=u}var Qa=e$2c.clone(e$2c.UNIT_W),zi$2=e$2c.clone(e$2c.UNIT_W);new o$1p,new o$1p,new o$1p,new o$1p;var ot$3=new o$1o,vt$1=new o$1o;function mt$1(e,t){var i=e._scene,n=i.camera,r=i.globe,o=.5*Math.PI,a=new f$19(n.position,n.direction),s=r.pick(a,i,la$1);if(e$2e(s)){var l=o$1p.subtract(n.position,s,new o$1p);o=o$1p.angleBetween(s,l)}var u=e$2d.toDegrees(o);o=e$2d.toRadians(82-u);var c=n$15.fromAxisAngle(n.right,o,Oi$2),h=p$1e.fromQuaternion(c,Ia),d=new o$1p;p$1e.multiplyByVector(h,n.direction,d),o$1p.normalize(d,d);var f=new o$1p;n$15.multiplyByVec(c,n.direction,f),o$1p.normalize(f,f);var p=new f$19(n.position,d),_=g$1j.rayEllipsoid(p,t);if(e$2e(_)){var m=_.start>0?_.start:_.stop,g=f$19.getPoint(p,m,new o$1p),x=new o$1o;if(e$2e(g)){s$R.wgs84ToWindowCoordinates(i,g,x);var y=new o$1o(x.x,x.y-2),v=n.getPickRay(y,gi$2),$=g$1j.rayEllipsoid(v,t);if(e$2e($)){var b=$.start>0?$.start:$.stop,T=f$19.getPoint(v,b,new o$1p);if(e$2e(T))return{angle:.5*o$1p.angleBetween(T,g),division:x.y}}}}}function dt$3(e,t,i,n,r,o,a){var s=e._scene,l=s.camera,u=e._limitObject.division,c=e._limitObject.angle;if(t.y<u){var h=c,d=(n.y-i.y)*h*.5,f=(n.x-i.x)*h*.2,p=n$15.fromAxisAngle(l.right,d,new n$15);n$15.normalize(p,p);var _=p$1e.fromQuaternion(p,Ia);p$1e.multiplyByVector(_,r,o);var m=n$15.fromAxisAngle(l.direction,f,new n$15);n$15.normalize(m,m);var g=p$1e.fromQuaternion(m,Ia);return p$1e.multiplyByVector(g,o,o),!0}if(i.y>u&&n.y>u)return!1;if(i.y<u&&n.y>u)return!!e$2e(e._lastPosition)&&(r=l.pickEllipsoid(e._lastPosition,a),!0);var x=new o$1p,y=0;if(i.y<u&&n.y<u){y=(n.y-i.y)*c;var v=e$2e(e._lastPosition)?e._lastPosition:i;l.pickEllipsoid(v,a,r),x=o$1p.clone(r)}else if(i.y>u&&n.y<u){var $=new o$1o;$.y=u,$.x=($.y-i.y)/(n.y-i.y)*(n.x-i.x)+i.x,x=l.pickEllipsoid($,a),y=(n.y-$.y)*c}var b=new o$1p,T=n$15.fromAxisAngle(l.right,y,Oi$2),C=p$1e.fromQuaternion(T,Ia);p$1e.multiplyByVector(C,x,b);var S=new o$1o;s$R.wgs84ToWindowCoordinates(s,b,S);var w=new o$1o(n.x,S.y),E=l.pickEllipsoid(w,a);return o$1p.clone(E,o),e._lastPosition=o$1o.clone(w),!0}function Xa(e,t,i,n){var r=e._scene,o=r.camera;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(r.camera)),v$K.clone(r.camera,e._cloneCamera),o=e._cloneCamera);var a=o$1o.clone(i.startPosition,ot$3),s=o$1o.clone(i.endPosition,vt$1),l=o.pickEllipsoid(a,n,Qa),u=o.pickEllipsoid(s,n,zi$2);if(!e$2e(l)||!e$2e(u)||isNaN(l.x)||isNaN(u.x)){var c=new f$19(o.position,o.direction),h=r.globe.pick(c,r,la$1);if(e$2e(h)){var d=s$R.wgs84ToWindowCoordinates(r,h,new o$1p);if(!e$2e(d))return;var f=s.y-a.y,p=new o$1o(a.x,d.y),_=new o$1o(s.x,d.y+f);l=o.pickEllipsoid(p,n,Qa),u=o.pickEllipsoid(_,n,zi$2)}}if(e$2e(l)&&e$2e(u)&&!isNaN(l.x)&&!isNaN(u.x)&&(e$2e(e._limitObject)&&dt$3(e,t,a,s,l,u,n),e$2e(l)&&e$2e(u)&&!isNaN(l.x)&&!isNaN(u.x))){l=o.worldToCameraCoordinates(l,l),u=o.worldToCameraCoordinates(u,u);var m=o$1p.angleBetween(l,u),g=new o$1p;o$1p.cross(l,u,g),o$1p.magnitudeSquared(g)<1e-20&&(g=o$1p.cross(l,o$1p.UNIT_X,g),o$1p.magnitudeSquared(g)<1e-20&&(g=o$1p.cross(l,o$1p.UNIT_Y,g))),o$1p.normalize(g,g),o.rotate(g,m),e._enableFusion&&(e.panOffset.x+=i.endPosition.x-i.startPosition.x,e.panOffset.y+=i.endPosition.y-i.startPosition.y,e.panDirty=!0),e.enableIndoorColliDetection&&$$5(e),o._adjustHeightForTerrain()}}var Ra=new o$1p,ft$1=new a$18;function Ea(e,t){var i=e._scene,n=i.globe;if(!(e.autoTiltHeight<1)&&e$2e(n)){var r=i.camera,o=r.positionCartographic;if(o.height-n.getHeight(o)<e.autoTiltHeight){var a=t.endPosition.y-t.startPosition.y>0?1:-1,s=r.pitch+e$2d.toRadians(3)*a;s=Math.min(s,-.01),s=Math.max(s,.5*-Math.PI),r.setView({orientation:{heading:r.heading,pitch:s}})}}}function Si$2(e,t,i){var n=e._ellipsoid,r=e._scene,o=r.camera;if(e$2e(i.distance)&&(i=i.distance),e._enableFusion){var a=i.endPosition.y-i.startPosition.y;e.zoomDirty=!0;var s=e$2d.toRadians(1);a>=0?(o.frustum.fov-=s,o.frustum.fov<e.minFov&&(o.frustum.fov=e.minFov,e.zoomDirty=!1)):(o.frustum.fov+=s,o.frustum.fov>e.maxFov&&(o.frustum.fov=e.maxFov,e.zoomDirty=!1))}else{var l=n.cartesianToCartographic(o.position,ft$1).height;if(!(l<=e.minimumZoomHeight&&i.endPosition.y-i.startPosition.y>0||l>=e.maximumZoomHeight&&i.endPosition.y-i.startPosition.y<0)){var u=t;if(e.isAroundScreenCenter){var c=e._scene.getViewport({x:10,y:10});u={x:c.width/2,y:c.height/2}}ea$3(e,u,Ga).then((n=>{var a;if(a=e$2e(n)?o$1p.distance(o.position,n):l,"ontouchstart"in window){var s=o$1p.normalize(o.position,Ra);ha$1(e,t,i,e._zoomFactor,a,o$1p.dot(s,o.direction))}else xe$2(e,pi$2(r,t),i,e._zoomFactor,a,n);Ea(e,i),o._adjustHeightForTerrain()}))}}}var ut$5=new o$1o,ki$2=new f$19,pa=new o$1p;new o$1p;var bi$2=new p$1d;new p$1d;var Ni$2=new p$1d,Oi$2=new n$15,Ia=new p$1e,Wi$2=new a$18,Vi$2=new o$1p;function _t$2(e,t,i,n){var r=e._scene.camera;if(p$1d.equals(r.transform,p$1d.IDENTITY)){if(e$2e(i.angleAndHeight)&&(i=i.angleAndHeight),o$1o.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e.enableWalk||e._looking){var o=e._ellipsoid.geodeticSurfaceNormal(r.position,Vi$2);return void F$8(e,t,i,o)}var a=e._ellipsoid.cartesianToCartographic(r.position,Wi$2);e._tiltOnEllipsoid||a.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,gt$3(e,t,i,n)):pt$3(e,t,i,n)}}var ht$2=new a$18;function gt$3(e,t,i,n){var r=e._ellipsoid,o=e._scene,a=o.camera,s=.25*e.minimumZoomDistance,l=r.cartesianToCartographic(a.positionWC,ht$2).height;if(!(l-s-1<e$2d.EPSILON3&&i.endPosition.y-i.startPosition.y<0)){var u=o.canvas,c=ut$5;c.x=u.clientWidth/2,c.y=u.clientHeight/2;var h,d=a.getPickRay(c,ki$2),f=g$1j.rayEllipsoid(d,r);if(e$2e(f))h=f$19.getPoint(d,f.start,pa);else{if(!(l>e._minimumTrackBallHeight)){e._looking=!0;var p=e._ellipsoid.geodeticSurfaceNormal(a.position,Vi$2);return F$8(e,t,i,p),void o$1o.clone(t,e._tiltCenterMousePosition)}var _=g$1j.grazingAltitudeLocation(d,r);if(!e$2e(_))return;var m=r.cartesianToCartographic(_,Wi$2);m.height=0,h=r.cartographicToCartesian(m,pa)}if(o$1p.clone(h,e._tiltCenter),!n){var g=m$19.eastNorthUpToFixedFrame(h,r,bi$2),x=e._globe,y=e._ellipsoid;e._globe=void 0,e._ellipsoid=t$12.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var v=p$1d.clone(a.transform,Ni$2);a._setTransform(g),X$5(e,t,i,o$1p.UNIT_Z),a._setTransform(v),e._globe=x,e._ellipsoid=y;var $=y.maximumRadius;e._rotateFactor=1/$,e._rotateRateRangeAdjustment=$}}}var Ai$2=new o$1p;function $$5(e,t){var i=e._scene,n=i.camera,r=e._cloneCamera,o=n.position,a=r.position;if(!o$1p.equals(a,o)){var s=o$1p.subtract(a,o,Ai$2);o$1p.normalize(s,s);var l=i.collideDetection(s);if(e$2e(l)){i.mode===C$14.COLUMBUS_VIEW&&(l=o$1p.fromElements(l.y,l.z,l.x));var u=o$1p.distance(o,l);if(t=u$Z(t,e.minimumDetectDistance),u<=o$1p.distance(o,a)||u<t)return}}v$K.clone(r,i.camera)}function Hi$2(e,t,i,n,r){var o=t._ellipsoid,a=t._scene.camera;if(!r){var s=m$19.eastNorthUpToFixedFrame(e,o,bi$2),l=t._globe,u=t._ellipsoid;t._globe=void 0,t._ellipsoid=t$12.UNIT_SPHERE,t._rotateFactor=1,t._rotateRateRangeAdjustment=1;var c=o$1p.UNIT_Z,h=p$1d.clone(a.transform,Ni$2);a._setTransform(s),X$5(t,n,i,c),a._setTransform(h),t._globe=l,t._ellipsoid=u;var d=u.maximumRadius;t._rotateFactor=1/d,t._rotateRateRangeAdjustment=d,t.enableIndoorColliDetection&&$$5(t,1),a._suspendTerrainAdjustment=!1,a._adjustHeightForTerrain()}}function pt$3(e,t,i,n){var r,o,a,s=e._ellipsoid,l=e._scene,u=l.camera;e.enableIndoorColliDetection&&(e$2e(e._cloneCamera)||(e._cloneCamera=v$K.clone(l.camera)),v$K.clone(l.camera,e._cloneCamera),u=e._cloneCamera),o$1o.equals(t,e._tiltCenterMousePosition)&&!e._isAroundScreenCenter?Hi$2(r=o$1p.clone(e._tiltCenter,pa),e,i,t,n):ea$3(e,t,pa).then((l=>{if(!e$2e(r=l)){if(o=u.getPickRay(t,ki$2),!e$2e(a=g$1j.rayEllipsoid(o,s)))return;r=f$19.getPoint(o,a.start,pa)}o$1o.clone(t,e._tiltCenterMousePosition),e._tiltCenter=o$1p.clone(r,e._tiltCenter),Hi$2(r,e,i,t,n)}))}var ct$3=new o$1o,yt$1=new o$1o,Ka=new f$19,Ja=new f$19,wt$2=new o$1p,Ct$1=new o$1p;function F$8(e,t,i,n){var r=e._scene.camera,o=ct$3;o.x=i.startPosition.x,o.y=0;var a=yt$1;a.x=i.endPosition.x,a.y=0;var s,l,u=r.getPickRay(o,Ka),c=r.getPickRay(a,Ja),h=0;r.frustum instanceof a$V?(s=u.origin,l=c.origin,o$1p.add(r.direction,s,s),o$1p.add(r.direction,l,l),o$1p.subtract(s,r.position,s),o$1p.subtract(l,r.position,l),o$1p.normalize(s,s),o$1p.normalize(l,l)):(s=u.direction,l=c.direction);var d=o$1p.dot(s,l);d<1&&(h=Math.acos(d)),h=i.startPosition.x>i.endPosition.x?-h:h;var f=e._horizontalRotationAxis;if(e$2e(n)?r.look(n,-h):e$2e(f)?r.look(f,-h):r.lookLeft(h),o.x=0,o.y=i.startPosition.y,a.x=0,a.y=i.endPosition.y,s=r.getPickRay(o,Ka).direction,l=r.getPickRay(a,Ja).direction,u=r.getPickRay(o,Ka),c=r.getPickRay(a,Ja),h=0,r.frustum instanceof a$V?(s=u.origin,l=c.origin,o$1p.add(r.direction,s,s),o$1p.add(r.direction,l,l),o$1p.subtract(s,r.position,s),o$1p.subtract(l,r.position,l),o$1p.normalize(s,s),o$1p.normalize(l,l)):(s=u.direction,l=c.direction),(d=o$1p.dot(s,l))<1&&(h=Math.acos(d)),h=i.startPosition.y>i.endPosition.y?-h:h,e$2e(n=u$Z(n,f))){var p=r.direction,_=o$1p.negate(n,wt$2),m=o$1p.equalsEpsilon(p,n,e$2d.EPSILON2),g=o$1p.equalsEpsilon(p,_,e$2d.EPSILON2);if(m||g)(m&&h<0||g&&h>0)&&r.look(r.right,-h);else{d=o$1p.dot(p,n);var x=e$2d.acosClamped(d);h>0&&h>x&&(h=x-e$2d.EPSILON4),d=o$1p.dot(p,_),x=e$2d.acosClamped(d),h<0&&-h>x&&(h=-x+e$2d.EPSILON4);var y=o$1p.cross(n,p,Ct$1);r.look(y,h)}}else r.lookUp(h)}var M$7=new o$1p,Zi$1=new o$1p;function xa(e,t){var i=new f$16(t);M$7=o$1p.multiplyByScalar(e,.1,M$7),o$1p.add(t,M$7,M$7);var n=i.projectPointOntoPlane(M$7),r=i.projectPointOntoEllipsoid(n),o=i.projectPointOntoPlane(t),a=i.projectPointOntoEllipsoid(o),s=o$1p.subtract(r,a,Zi$1);return o$1p.normalize(s,s),s}function Da(e,t){var i=o$1m.ORIGIN_XY_PLANE;M$7=o$1p.multiplyByScalar(e,.1,M$7),o$1p.add(t,M$7,M$7);var n=o$1m.projectPointOntoPlane(i,M$7),r=o$1m.projectPointOntoPlane(i,t),o=o$1p.subtract(n,r,Zi$1);return o$1p.normalize(o,o),o}var $a=new f$19,oa$2=new a$18,q$6=new o$1p;function lt$1(e,t){var i=t.positionCartographic;oa$2.longitude=i.longitude,oa$2.latitude=i.latitude,oa$2.height=i.height>0?0:i.height-10,a$18.toCartesian(oa$2,void 0,q$6);var n=o$1p.subtract(q$6,t.position,q$6);o$1p.normalize(n,n),$a.origin=t.position,$a.direction=n;var r=e.pickFromRay($a);if(e$2e(r)&&e$2e(r.position)){var o=r.position;return a$18.fromCartesian(o,void 0,oa$2).height}}function Tt$1(e,t,i){var n=t.positionCartographic,r=lt$1(e,t);if(!e$2e(r)||Math.abs(n.height-r-i)<1)return t.position;n.height=r-Za>2?i+1.8:r+i,Za=n.height;var o=a$18.toCartesian(n);return e$2e(o)?o:t.position}var Ma=new o$1p,za=new o$1p;function Pt$1(e){var t=e._scene,i=t.camera,n=e._aggregator._flags,r=i.position,o=5*e.walkParameters.speed,a=e.walkParameters.height;n.moveForward&&Sa(e,xa(i.direction,r),o),n.moveBackward&&(Ma.x=-i.direction.x,Ma.y=-i.direction.y,Ma.z=-i.direction.z,Sa(e,xa(Ma,r),o)),n.moveLeft&&(za.x=-i.right.x,za.y=-i.right.y,za.z=-i.right.z,Sa(e,xa(za,r),.1*o)),n.moveRight&&Sa(e,xa(i.right,r),.1*o),i.position=Tt$1(t,i,a)}function Sa(e,t,i){var n=e._scene,r=n.camera.position;o$1p.multiplyByScalar(t,i,M$7),o$1p.add(r,M$7,M$7);var o=!0;if(!o$1p.equals(M$7,r)){var a=o$1p.subtract(M$7,r,Ai$2);o$1p.normalize(a,a);var s=n.collideDetection(a);if(e$2e(s))o$1p.distance(M$7,r)-o$1p.distance(r,s)>-e.minimumDetectDistance*Math.abs(i)&&(o=!1)}(o||!e.enableIndoorColliDetection)&&o$1p.clone(M$7,r)}function Rt$3(e){var t,i=e._scene.camera,n=e._aggregator._flags,r=i.position,o=5*e.walkParameters.speed;n.moveForward&&(t=Da(i.direction,r),i.move(t,o)),n.moveBackward&&(t=Da(i.direction,r),i.move(t,-o)),n.moveLeft&&(t=Da(i.right,r),i.move(t,-o)),n.moveRight&&(t=Da(i.right,r),i.move(t,o))}function Et$2(e){b$c(e,e.enableRotate,e.rotateEventTypes,st$3,e.inertiaSpin,"_lastInertiaSpinMovement"),b$c(e,e.enableZoom,e.zoomEventTypes,Si$2,e.inertiaZoom,"_lastInertiaZoomMovement"),b$c(e,e.enableTilt,e.tiltEventTypes,_t$2,e.inertiaSpin,"_lastInertiaTiltMovement"),b$c(e,e.enableLook,e.lookEventTypes,F$8)}_a.prototype.update=function(){p$1d.equals(this._scene.camera.transform,p$1d.IDENTITY)?(this._globe=this._scene.globe,this._ellipsoid=e$2e(this._globe)?this._globe.ellipsoid:this._scene.mapProjection.ellipsoid):(this._globe=void 0,this._ellipsoid=t$12.UNIT_SPHERE),this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight*this._scene.terrainExaggeration,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight*this._scene.terrainExaggeration,this._minimumTrackBallHeight=this.minimumTrackBallHeight*this._scene.terrainExaggeration;var e=this._ellipsoid.maximumRadius;this._rotateFactor=1/e,this._rotateRateRangeAdjustment=e;var t=this._scene.mode;t===C$14.SCENE2D?Oe$3(this):t===C$14.COLUMBUS_VIEW?(this._horizontalRotationAxis=o$1p.UNIT_Z,tt$3(this),this.enableWalk&&Rt$3(this)):t===C$14.SCENE3D&&(this._horizontalRotationAxis=void 0,Et$2(this),this.enableWalk&&Pt$1(this)),this._aggregator.reset()},_a.prototype.isDestroyed=function(){return!1},_a.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),i$11(this)};var k$6={},U$6=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function m$9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var E$8=8192,g$f=[],I$5=function(){function e(t,i){m$9(this,e),i=i||{},void 0===t&&(t=E$8),"number"==typeof t&&(t=new ArrayBuffer(t));var n=t.byteLength,r=i.offset?i.offset>>>0:0;t.buffer&&(n=t.byteLength-r,t=t.byteLength!==t.buffer.byteLength?t.buffer.slice(t.byteOffset+r,t.byteOffset+t.byteLength):r?t.buffer.slice(r):t.buffer),this.buffer=t,this.length=n,this.byteLength=n,this.byteOffset=0,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer),this._increment=n||E$8,this._mark=0}return U$6(e,[{key:"available",value:function(e){return void 0===e&&(e=1),this.offset+e<=this.length}},{key:"isLittleEndian",value:function(){return this.littleEndian}},{key:"setLittleEndian",value:function(){this.littleEndian=!0}},{key:"isBigEndian",value:function(){return!this.littleEndian}},{key:"setBigEndian",value:function(){this.littleEndian=!1}},{key:"skip",value:function(e){void 0===e&&(e=1),this.offset+=e}},{key:"seek",value:function(e){this.offset=e}},{key:"mark",value:function(){this._mark=this.offset}},{key:"reset",value:function(){this.offset=this._mark}},{key:"rewind",value:function(){this.offset=0}},{key:"ensureAvailable",value:function(e){if(void 0===e&&(e=1),!this.available(e)){var t=this._increment+this._increment;this._increment=t;var i=this.length+t,n=new Uint8Array(i);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=i,this._data=new DataView(this.buffer)}}},{key:"readBoolean",value:function(){return 0!==this.readUint8()}},{key:"readInt8",value:function(){return this._data.getInt8(this.offset++)}},{key:"readUint8",value:function(){return this._data.getUint8(this.offset++)}},{key:"readByte",value:function(){return this.readUint8()}},{key:"readBytes",value:function(e){void 0===e&&(e=1);for(var t=new Uint8Array(e),i=0;i<e;i++)t[i]=this.readByte();return t}},{key:"readInt16",value:function(){var e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}},{key:"readUint16",value:function(){var e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}},{key:"readInt32",value:function(){var e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readUint32",value:function(){var e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readFloat32",value:function(){var e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}},{key:"readFloat64",value:function(){var e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}},{key:"readChar",value:function(){return String.fromCharCode(this.readInt8())}},{key:"readChars",value:function(e){void 0===e&&(e=1),g$f.length=e;for(var t=0;t<e;t++)g$f[t]=this.readChar();return g$f.join("")}},{key:"writeBoolean",value:function(e){this.writeUint8(e?255:0)}},{key:"writeInt8",value:function(e){this.ensureAvailable(1),this._data.setInt8(this.offset++,e)}},{key:"writeUint8",value:function(e){this.ensureAvailable(1),this._data.setUint8(this.offset++,e)}},{key:"writeByte",value:function(e){this.writeUint8(e)}},{key:"writeBytes",value:function(e){this.ensureAvailable(e.length);for(var t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t])}},{key:"writeInt16",value:function(e){this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2}},{key:"writeUint16",value:function(e){this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2}},{key:"writeInt32",value:function(e){this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeUint32",value:function(e){this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeFloat32",value:function(e){this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4}},{key:"writeFloat64",value:function(e){this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8}},{key:"writeChar",value:function(e){this.writeUint8(e.charCodeAt(0))}},{key:"writeChars",value:function(e){for(var t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t))}},{key:"toArray",value:function(){return new Uint8Array(this.buffer,0,this.offset)}}]),e}(),s$9={};function A$b(e,t){if(e)throw new TypeError("Not a valid NetCDF v3.x file: "+t)}function b$b(e){e.offset%4!=0&&e.skip(4-e.offset%4)}function T$b(e){var t=e.readUint32(),i=e.readChars(t);return b$b(e),i}s$9.notNetcdf=A$b,s$9.padding=b$b,s$9.readName=T$b;var a$6={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6};function N$5(e){switch(Number(e)){case a$6.BYTE:return"byte";case a$6.CHAR:return"char";case a$6.SHORT:return"short";case a$6.INT:return"int";case a$6.FLOAT:return"float";case a$6.DOUBLE:return"double";default:return"undefined"}}function v$7(e,t){if(1!==e){for(var i=new Array(e),n=0;n<e;n++)i[n]=t();return i}return t()}function F$7(e,t,i){switch(t){case a$6.BYTE:return e.readBytes(i);case a$6.CHAR:return L$9(e.readChars(i));case a$6.SHORT:return v$7(i,e.readInt16.bind(e));case a$6.INT:return v$7(i,e.readInt32.bind(e));case a$6.FLOAT:return v$7(i,e.readFloat32.bind(e));case a$6.DOUBLE:return v$7(i,e.readFloat64.bind(e));default:return void A$b(!0,"non valid type "+t)}}function L$9(e){return 0===e.charCodeAt(e.length-1)?e.substring(0,e.length-1):e}var d$d=0,D$5=10,O$7=11,p$5=12;function R$7(e){var t={recordDimension:{length:e.readUint32()}},i=S$4(e);t.recordDimension.id=i.recordId,t.recordDimension.name=i.recordName,t.dimensions=i.dimensions,t.globalAttributes=B$6(e);var n=H$9(e,i.recordId);return t.variables=n.variables,t.recordDimension.recordStep=n.recordStep,t}function S$4(e){var t,i,n=e.readUint32();if(n===d$d)return s$9.notNetcdf(e.readUint32()!==d$d,"wrong empty tag for list of dimensions"),[];s$9.notNetcdf(n!==D$5,"wrong tag for list of dimensions");for(var r=e.readUint32(),o=new Array(r),a=0;a<r;a++){var s=s$9.readName(e),l=e.readUint32();0===l&&(t=a,i=s),o[a]={name:s,size:l}}return{dimensions:o,recordId:t,recordName:i}}function B$6(e){var t=e.readUint32();if(t===d$d)return s$9.notNetcdf(e.readUint32()!==d$d,"wrong empty tag for list of attributes"),[];s$9.notNetcdf(t!==p$5,"wrong tag for list of attributes");for(var i=e.readUint32(),n=new Array(i),r=0;r<i;r++){var o=s$9.readName(e),a=e.readUint32();s$9.notNetcdf(a<1||a>6,"non valid type "+a);var s=e.readUint32(),l=F$7(e,a,s);s$9.padding(e),n[r]={name:o,type:N$5(a),value:l}}return n}function H$9(e,t){var i=e.readUint32(),n=0;if(i===d$d)return s$9.notNetcdf(e.readUint32()!==d$d,"wrong empty tag for list of variables"),[];s$9.notNetcdf(i!==O$7,"wrong tag for list of variables");for(var r=e.readUint32(),o=new Array(r),a=0;a<r;a++){for(var s=s$9.readName(e),l=e.readUint32(),u=new Array(l),c=0;c<l;c++)u[c]=e.readUint32();var h=B$6(e),d=e.readUint32();s$9.notNetcdf(d<1&&d>6,"non valid type "+d);var f=e.readUint32(),p=e.readUint32();u[0]===t&&(n+=f),o[a]={name:s,dimensions:u,attributes:h,type:N$5(d),size:f,offset:p,record:u[0]===t}}return{variables:o,recordStep:n}}!function(){function e(t){m$9(this,e);var i=new I$5(t);i.setBigEndian(),s$9.notNetcdf("CDF"!==i.readChars(3),"should start with CDF");var n=i.readByte();s$9.notNetcdf(2===n,"64-bit offset format not supported yet"),s$9.notNetcdf(1!==n,"unknown version"),this.header=R$7(i),this.header.version=n,this.buffer=i}U$6(e,[{key:"getDataVariable",value:function(e){var t;return t="string"==typeof e?this.header.variables.find((function(t){return t.name===e})):e,s$9.notNetcdf(void 0===t,"variable not found"),this.buffer.seek(t.offset),t.record?data.record(this.buffer,t,this.header.recordDimension):data.nonRecord(this.buffer,t)}},{key:"version",get:function(){return 1===this.header.version?"classic format":"64-bit offset format"}},{key:"recordDimension",get:function(){return this.header.recordDimension}},{key:"dimensions",get:function(){return this.header.dimensions}},{key:"globalAttributes",get:function(){return this.header.globalAttributes}},{key:"variables",get:function(){return this.header.variables}}]),k$6.NetCDFReader=e}();var e$4={VolumeRendering:0,Slice:1,ContourValue:2},gt$2=Object.freeze(e$4),Ft$2="attribute vec4 aPosition;\nattribute vec3 aTexCoord0;\nvarying vec4 vTexCoord;\nvarying vec4 vNearTexCoord;\n#ifdef HAS_LIGHT\nvarying vec4 vPositionMC;\n#endif\nuniform vec3 u_volumeBoxSize;\nuniform vec3 scale;\nuniform vec3 uOffset;\nvoid main()\n{\nvTexCoord = vec4(aTexCoord0.xyz, 1.0);\ngl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n",Rt$2="varying vec4 vTexCoord;\nvarying vec4 vNearTexCoord;\nuniform sampler2D u_colorTable;\nuniform vec4 u_minMaxValueAndFiltration;\nuniform vec3 u_maxVisibleTextureCoord;\nuniform vec3 u_minVisibleTextureCoord;\nuniform sampler2D u_opacityTexture;\nuniform sampler2D u_colorTexture;\nvec4 getColorForValue(float tValue)\n{\nfloat texCoord = tValue;\ntexCoord = clamp(texCoord, 0.0, 1.0);\nvec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\ntColor.a = texture2D(u_opacityTexture, vec2(texCoord, 0.5)).r;\nreturn tColor;\n}\nvec4 getSampleValue(vec3 pos)\n{\nif(vTexCoord.x > u_maxVisibleTextureCoord.x || vTexCoord.x < u_minVisibleTextureCoord.x\n|| vTexCoord.y > u_maxVisibleTextureCoord.y || vTexCoord.y < u_minVisibleTextureCoord.y\n|| vTexCoord.z > u_maxVisibleTextureCoord.z || vTexCoord.z < u_minVisibleTextureCoord.z)\n{\ndiscard;\n}\nfloat noValue;\nfloat value = czm_getVolumeValue(pos, noValue);\nvec4 color = getColorForValue(value);\nreturn color;\n}\nvoid main()\n{\nvec3 texcood = vTexCoord.xyz;\nif(uFilterMode > 0.5)\n{\ntexcood = vNearTexCoord.xyz;\n}\ngl_FragColor = getSampleValue(texcood);\ngl_FragColor = czm_gammaCorrect(gl_FragColor);\n}\n",_0x51e734=(_0x8ace7e=!0,function(e,t){var i=_0x8ace7e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8ace7e=!1,i}),_0x3e45e5=_0x51e734(void 0,(function(){return _0x3e45e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e45e5).search("(((.+)+)+)+$")})),_0x8ace7e;_0x3e45e5();var Mt$2="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nvarying vec3 positionEC;\nvarying vec3 vTexCoord;\nvoid main()\n{\n positionEC = (czm_modelView * aPosition).xyz;\n vTexCoord = aTexCoord0.xyz;\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}",_0x4884f6=(_0x521dbf=!0,function(e,t){var i=_0x521dbf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x521dbf=!1,i}),_0x4b813f=_0x4884f6(void 0,(function(){return _0x4b813f.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b813f).search("(((.+)+)+)+$")})),_0x521dbf;_0x4b813f();var Nt$2="uniform vec3 u_camTexCoord;\nuniform vec4 u_minMaxValueAndFiltration;\n// opacity and color textures\nuniform sampler2D u_opacityTexture;\nuniform sampler2D u_colorTexture;\nuniform float u_sampleDistance;\nuniform vec4 u_gradientOpacityInfo;\n#ifdef CLIP_PLANE\nuniform vec4 u_clip_planes[6];\nuniform int u_clip_planes_count;\n#endif\n#ifdef APPLY_LIGHTING\n uniform vec3 uDiffuse;\n uniform vec3 uSpecular;\n uniform vec3 uAmbient;\n uniform float uShiness;\n#endif\n\nvarying vec3 positionEC;\nvarying vec3 vTexCoord;\n\nfloat realValueToScalarValue(float value){\n float minValue = u_minMaxValueAndFiltration.z;\n float maxValue = u_minMaxValueAndFiltration.w;\n return (value - minValue) / (maxValue - minValue);\n}\nfloat scalarValueToReaValue(float value){\n float minValue = u_minMaxValueAndFiltration.x;\n float maxValue = u_minMaxValueAndFiltration.y;\n return minValue + value * (maxValue - minValue);\n}\nfloat getTextureValue(vec3 pos)\n{\n float noValue;\n #ifdef MultiResolution\n float value = czm_getVolumeValueMultiResolution(pos, noValue);\n #else\n float value = czm_getVolumeValue(pos, noValue);\n #endif\n value = scalarValueToReaValue(value);\n return value;\n}\n\n// Given a normal compute the gradient opacity factors\nfloat computeGradientOpacityFactor(vec4 normal, float goscale, float goshift, float gomin, float gomax)\n{\n#ifdef GRADIENT_OPACITY\n return clamp(normal.a*goscale + goshift, gomin, gomax);\n#else\n return 1.0;\n#endif\n}\n\n// compute the normal and gradient magnitude for a position\nvec4 computeNormal(vec3 pos, float scalar, vec3 tstep)\n{\n vec4 result;\n result.x = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)) - scalar;\n result.y = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)) - scalar;\n result.z = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)) - scalar;\n // divide by spacing\n vec3 vSpacing = vec3(1.0);\n result.xyz /= vSpacing;\n result.w = length(result.xyz);\n // rotate to View Coords\n //result.xyz = result.x * vPlaneNormal0 + result.y * vPlaneNormal2 + result.z * vPlaneNormal4;\n if (result.w > 0.0)\n {\n result.xyz /= result.w;\n }\n return result;\n}\n\n#ifdef APPLY_LIGHTING\nvoid applyLighting(inout vec4 tColor, vec3 normal)\n{\n vec3 diffuse = uDiffuse;\n vec3 specular = uSpecular;\n vec3 ambient = uAmbient;\n float shiness = uShiness;\n vec3 normalEC = normalize(czm_normal * normal);\n float ndot = max( dot( normalEC, czm_sunDirectionEC ), 0.0 );\n ndot = ndot * 0.5 + 0.5;\n diffuse = diffuse * ndot;\n specular = specular * czm_getSpecular(czm_sunDirectionEC, normalize(-positionEC), normalEC, shiness);\n tColor.rgb = tColor.rgb*(diffuse + ambient) + specular;\n}\n#endif\n\nvec4 getColorForValue(vec3 posIS, vec3 stepIS, float tValue)\n{\n vec4 goFactor = vec4(1.0,1.0,1.0,1.0);\n#if defined(GRADIENT_OPACITY) || defined(APPLY_LIGHTING)\n vec4 normal0 = computeNormal(posIS, tValue, stepIS);\n#endif\n#ifdef GRADIENT_OPACITY\n float goscale = u_gradientOpacityInfo.z;\n float goshift = u_gradientOpacityInfo.w;\n float gomin = u_gradientOpacityInfo.x;\n float gomax = u_gradientOpacityInfo.y;\n goFactor.x = computeGradientOpacityFactor(normal0, goscale, goshift, gomin, gomax);\n#endif\n float texCoord = realValueToScalarValue(tValue);\n\ttexCoord = clamp(texCoord, 0.0, 1.0);\n vec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\n tColor.a = goFactor.x * texture2D(u_opacityTexture, vec2(texCoord, 0.5)).r;\n#ifdef APPLY_LIGHTING\n applyLighting(tColor, normal0.xyz);\n#endif\n return tColor;\n}\n\nvec4 applyBlend(vec3 posIS, vec3 endIS, vec3 stepIS, float texSampleDist)\n{\n float raySteps = 1.0 / texSampleDist;\n float jitter = 0.1;\n float stepsTraveled = jitter;\n // local vars for the loop\n vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n float tValue;\n vec4 tColor;\n // Perform initial step at the volume boundary\n // compute the scalar\n tValue = getTextureValue(posIS);\n // now map through opacity and color\n tColor = getColorForValue(posIS, stepIS, tValue);\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps);\n return tColor;\n }\n\n tColor.a = 1.0 - pow(1.0 - tColor.a, jitter);\n color = vec4(tColor.rgb * tColor.a, tColor.a);\n posIS += (jitter * stepIS);\n\n bool find = false;\n\n for (int i = 0; i < 5000 ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n // compute the scalar\n tValue = getTextureValue(posIS);\n // now map through opacity and color\n tColor = getColorForValue(posIS, stepIS, tValue);\n float mix = (1.0 - color.a);\n if(!find){\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n }\n stepsTraveled++;\n posIS += stepIS;\n if(posIS.x > 1.0 || posIS.x < 0.0 || posIS.y > 1.0 || posIS.y < 0.0 || posIS.z > 1.0 || posIS.z < 0.0){\n find = true;\n#ifndef WEBGPU\n break;\n#endif \n }\n if (color.a > 0.99) { \n color.a = 1.0;\n find = true;\n#ifndef WEBGPU\n break;\n#endif \n }\n }\n\n return vec4(color.rgb/color.a, color.a);\n}\n\nvec2 intersectBox(vec3 texel_zero, vec3 texel_dir_norm)\n{\n vec3 minV = vec3(0.0);\n vec3 maxV = vec3(1.0);\n float t1,t2;\n t1=(minV.x-texel_zero.x)/texel_dir_norm.x;\n t2=(maxV.x-texel_zero.x)/texel_dir_norm.x;\n float tminX=min(t1,t2);\n float tmaxX=max(t1,t2);\n t1=(minV.y-texel_zero.y)/texel_dir_norm.y;\n t2=(maxV.y-texel_zero.y)/texel_dir_norm.y;\n float tminY=min(t1,t2);\n float tmaxY=max(t1,t2);\n t1=(minV.z-texel_zero.z)/texel_dir_norm.z;\n t2=(maxV.z-texel_zero.z)/texel_dir_norm.z;\n float tminZ=min(t1,t2);\n float tmaxZ=max(t1,t2);\n float largest_tmin = max(max(tminX, tminY), max(tminX, tminZ));\n float smallest_tmax = min(min(tmaxX, tmaxY), min(tmaxX, tmaxZ));\n vec2 dists = vec2(largest_tmin,smallest_tmax);\n \n#ifdef CLIP_PLANE\n for(int i = 0; i < 6; i++){\n if(i == u_clip_planes_count){\n break;\n }\n float rayDirRatio = dot(texel_dir_norm, u_clip_planes[i].xyz);\n float equationResult = dot(texel_zero.xyz, u_clip_planes[i].xyz) + u_clip_planes[i].w;\n if (rayDirRatio == 0.0){\n if (equationResult < 0.0){\n dists.x = dists.y;\n }\n continue;\n }\n float result = -1.0 * equationResult / rayDirRatio;\n if (rayDirRatio < 0.0){\n dists.y = min(dists.y, result);\n }\n else {\n dists.x = max(dists.x, result);\n }\n }\n#endif\n return dists;\n}\nvoid main()\n{\n vec3 cameraDir = normalize(positionEC.xyz);\n vec3 localZero = u_camTexCoord;\n vec3 localOne = vTexCoord.xyz;\n vec3 texel_dir_norm = normalize(localOne.xyz - localZero.xyz);\n\n vec3 texel_zero = localZero.xyz;\n vec2 nearFar = intersectBox(texel_zero, texel_dir_norm);\n // 采样间隔受相机与物体之间的距离控制\n float texSampleDist = u_sampleDistance;\n vec3 texel_step = texSampleDist * texel_dir_norm;\n float tstep = length(texel_step);\n float tnear = max(nearFar.x, 0.0) + tstep;\n float tfar = nearFar.y - tstep;\n vec3 coord;\n if(tnear > tfar){\n discard;\n }\n else{\n coord = texel_zero + texel_dir_norm * tnear;\n }\n gl_FragColor = applyBlend(coord, texel_zero + texel_dir_norm * tfar, texel_step, texSampleDist);\n}",_0x4c43ec=(_0x26542f=!0,function(e,t){var i=_0x26542f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x26542f=!1,i}),_0x16afd8=_0x4c43ec(void 0,(function(){return _0x16afd8.toString().search("(((.+)+)+)+$").toString().constructor(_0x16afd8).search("(((.+)+)+)+$")})),_0x26542f;_0x16afd8();var _0x336f6e=[[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,9,1,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,11,2,0,9,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,3,8,2,8,11,11,8,9,-1,-1,-1,-1,-1,-1,-1],[3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,8,0,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,2,10,1,10,9,9,10,8,-1,-1,-1,-1,-1,-1,-1],[3,1,11,10,3,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,11,0,11,8,8,11,10,-1,-1,-1,-1,-1,-1,-1],[3,0,9,3,9,10,10,9,11,-1,-1,-1,-1,-1,-1,-1],[9,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,7,4,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,9,1,4,1,7,7,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,7,4,3,4,0,1,11,2,-1,-1,-1,-1,-1,-1,-1],[9,11,2,9,2,0,8,7,4,-1,-1,-1,-1,-1,-1,-1],[2,9,11,2,7,9,2,3,7,7,4,9,-1,-1,-1,-1],[8,7,4,3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,7,4,10,4,2,2,4,0,-1,-1,-1,-1,-1,-1,-1],[9,1,0,8,7,4,2,10,3,-1,-1,-1,-1,-1,-1,-1],[4,10,7,9,10,4,9,2,10,9,1,2,-1,-1,-1,-1],[3,1,11,3,11,10,7,4,8,-1,-1,-1,-1,-1,-1,-1],[1,11,10,1,10,4,1,4,0,7,4,10,-1,-1,-1,-1],[4,8,7,9,10,0,9,11,10,10,3,0,-1,-1,-1,-1],[4,10,7,4,9,10,9,11,10,-1,-1,-1,-1,-1,-1,-1],[9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,4,5,1,0,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,4,5,8,5,3,3,5,1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,11,2,4,5,9,-1,-1,-1,-1,-1,-1,-1],[5,11,2,5,2,4,4,2,0,-1,-1,-1,-1,-1,-1,-1],[2,5,11,3,5,2,3,4,5,3,8,4,-1,-1,-1,-1],[9,4,5,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,0,10,8,4,5,9,-1,-1,-1,-1,-1,-1,-1],[0,4,5,0,5,1,2,10,3,-1,-1,-1,-1,-1,-1,-1],[2,5,1,2,8,5,2,10,8,4,5,8,-1,-1,-1,-1],[11,10,3,11,3,1,9,4,5,-1,-1,-1,-1,-1,-1,-1],[4,5,9,0,1,8,8,1,11,8,11,10,-1,-1,-1,-1],[5,0,4,5,10,0,5,11,10,10,3,0,-1,-1,-1,-1],[5,8,4,5,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1],[9,8,7,5,9,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,0,3,9,3,5,5,3,7,-1,-1,-1,-1,-1,-1,-1],[0,8,7,0,7,1,1,7,5,-1,-1,-1,-1,-1,-1,-1],[1,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,7,9,7,5,11,2,1,-1,-1,-1,-1,-1,-1,-1],[11,2,1,9,0,5,5,0,3,5,3,7,-1,-1,-1,-1],[8,2,0,8,5,2,8,7,5,11,2,5,-1,-1,-1,-1],[2,5,11,2,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1],[7,5,9,7,9,8,3,2,10,-1,-1,-1,-1,-1,-1,-1],[9,7,5,9,2,7,9,0,2,2,10,7,-1,-1,-1,-1],[2,10,3,0,8,1,1,8,7,1,7,5,-1,-1,-1,-1],[10,1,2,10,7,1,7,5,1,-1,-1,-1,-1,-1,-1,-1],[9,8,5,8,7,5,11,3,1,11,10,3,-1,-1,-1,-1],[5,0,7,5,9,0,7,0,10,1,11,0,10,0,11,-1],[10,0,11,10,3,0,11,0,5,8,7,0,5,0,7,-1],[10,5,11,7,5,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,1,0,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,1,8,9,5,6,11,-1,-1,-1,-1,-1,-1,-1],[1,5,6,2,1,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,5,6,1,6,2,3,8,0,-1,-1,-1,-1,-1,-1,-1],[9,5,6,9,6,0,0,6,2,-1,-1,-1,-1,-1,-1,-1],[5,8,9,5,2,8,5,6,2,3,8,2,-1,-1,-1,-1],[2,10,3,11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,8,0,10,0,2,11,5,6,-1,-1,-1,-1,-1,-1,-1],[0,9,1,2,10,3,5,6,11,-1,-1,-1,-1,-1,-1,-1],[5,6,11,1,2,9,9,2,10,9,10,8,-1,-1,-1,-1],[6,10,3,6,3,5,5,3,1,-1,-1,-1,-1,-1,-1,-1],[0,10,8,0,5,10,0,1,5,5,6,10,-1,-1,-1,-1],[3,6,10,0,6,3,0,5,6,0,9,5,-1,-1,-1,-1],[6,9,5,6,10,9,10,8,9,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,4,3,7,6,11,5,-1,-1,-1,-1,-1,-1,-1],[1,0,9,5,6,11,8,7,4,-1,-1,-1,-1,-1,-1,-1],[11,5,6,1,7,9,1,3,7,7,4,9,-1,-1,-1,-1],[6,2,1,6,1,5,4,8,7,-1,-1,-1,-1,-1,-1,-1],[1,5,2,5,6,2,3,4,0,3,7,4,-1,-1,-1,-1],[8,7,4,9,5,0,0,5,6,0,6,2,-1,-1,-1,-1],[7,9,3,7,4,9,3,9,2,5,6,9,2,9,6,-1],[3,2,10,7,4,8,11,5,6,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,2,7,4,0,2,2,10,7,-1,-1,-1,-1],[0,9,1,4,8,7,2,10,3,5,6,11,-1,-1,-1,-1],[9,1,2,9,2,10,9,10,4,7,4,10,5,6,11,-1],[8,7,4,3,5,10,3,1,5,5,6,10,-1,-1,-1,-1],[5,10,1,5,6,10,1,10,0,7,4,10,0,10,4,-1],[0,9,5,0,5,6,0,6,3,10,3,6,8,7,4,-1],[6,9,5,6,10,9,4,9,7,7,9,10,-1,-1,-1,-1],[11,9,4,6,11,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,6,11,4,11,9,0,3,8,-1,-1,-1,-1,-1,-1,-1],[11,1,0,11,0,6,6,0,4,-1,-1,-1,-1,-1,-1,-1],[8,1,3,8,6,1,8,4,6,6,11,1,-1,-1,-1,-1],[1,9,4,1,4,2,2,4,6,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,9,2,2,9,4,2,4,6,-1,-1,-1,-1],[0,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,2,3,8,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1],[11,9,4,11,4,6,10,3,2,-1,-1,-1,-1,-1,-1,-1],[0,2,8,2,10,8,4,11,9,4,6,11,-1,-1,-1,-1],[3,2,10,0,6,1,0,4,6,6,11,1,-1,-1,-1,-1],[6,1,4,6,11,1,4,1,8,2,10,1,8,1,10,-1],[9,4,6,9,6,3,9,3,1,10,3,6,-1,-1,-1,-1],[8,1,10,8,0,1,10,1,6,9,4,1,6,1,4,-1],[3,6,10,3,0,6,0,4,6,-1,-1,-1,-1,-1,-1,-1],[6,8,4,10,8,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,6,11,7,11,8,8,11,9,-1,-1,-1,-1,-1,-1,-1],[0,3,7,0,7,11,0,11,9,6,11,7,-1,-1,-1,-1],[11,7,6,1,7,11,1,8,7,1,0,8,-1,-1,-1,-1],[11,7,6,11,1,7,1,3,7,-1,-1,-1,-1,-1,-1,-1],[1,6,2,1,8,6,1,9,8,8,7,6,-1,-1,-1,-1],[2,9,6,2,1,9,6,9,7,0,3,9,7,9,3,-1],[7,0,8,7,6,0,6,2,0,-1,-1,-1,-1,-1,-1,-1],[7,2,3,6,2,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,10,3,11,8,6,11,9,8,8,7,6,-1,-1,-1,-1],[2,7,0,2,10,7,0,7,9,6,11,7,9,7,11,-1],[1,0,8,1,8,7,1,7,11,6,11,7,2,10,3,-1],[10,1,2,10,7,1,11,1,6,6,1,7,-1,-1,-1,-1],[8,6,9,8,7,6,9,6,1,10,3,6,1,6,3,-1],[0,1,9,10,7,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,0,8,7,6,0,3,0,10,10,0,6,-1,-1,-1,-1],[7,6,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,9,1,8,1,3,10,6,7,-1,-1,-1,-1,-1,-1,-1],[11,2,1,6,7,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,8,0,6,7,10,-1,-1,-1,-1,-1,-1,-1],[2,0,9,2,9,11,6,7,10,-1,-1,-1,-1,-1,-1,-1],[6,7,10,2,3,11,11,3,8,11,8,9,-1,-1,-1,-1],[7,3,2,6,7,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,8,0,7,0,6,6,0,2,-1,-1,-1,-1,-1,-1,-1],[2,6,7,2,7,3,0,9,1,-1,-1,-1,-1,-1,-1,-1],[1,2,6,1,6,8,1,8,9,8,6,7,-1,-1,-1,-1],[11,6,7,11,7,1,1,7,3,-1,-1,-1,-1,-1,-1,-1],[11,6,7,1,11,7,1,7,8,1,8,0,-1,-1,-1,-1],[0,7,3,0,11,7,0,9,11,6,7,11,-1,-1,-1,-1],[7,11,6,7,8,11,8,9,11,-1,-1,-1,-1,-1,-1,-1],[6,4,8,10,6,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,6,3,6,0,0,6,4,-1,-1,-1,-1,-1,-1,-1],[8,10,6,8,6,4,9,1,0,-1,-1,-1,-1,-1,-1,-1],[9,6,4,9,3,6,9,1,3,10,6,3,-1,-1,-1,-1],[6,4,8,6,8,10,2,1,11,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,10,0,0,10,6,0,6,4,-1,-1,-1,-1],[4,8,10,4,10,6,0,9,2,2,9,11,-1,-1,-1,-1],[11,3,9,11,2,3,9,3,4,10,6,3,4,3,6,-1],[8,3,2,8,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1],[0,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,4,3,2,6,4,4,8,3,-1,-1,-1,-1],[1,4,9,1,2,4,2,6,4,-1,-1,-1,-1,-1,-1,-1],[8,3,1,8,1,6,8,6,4,6,1,11,-1,-1,-1,-1],[11,0,1,11,6,0,6,4,0,-1,-1,-1,-1,-1,-1,-1],[4,3,6,4,8,3,6,3,11,0,9,3,11,3,9,-1],[11,4,9,6,4,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,5,9,7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,5,9,10,6,7,-1,-1,-1,-1,-1,-1,-1],[5,1,0,5,0,4,7,10,6,-1,-1,-1,-1,-1,-1,-1],[10,6,7,8,4,3,3,4,5,3,5,1,-1,-1,-1,-1],[9,4,5,11,2,1,7,10,6,-1,-1,-1,-1,-1,-1,-1],[6,7,10,1,11,2,0,3,8,4,5,9,-1,-1,-1,-1],[7,10,6,5,11,4,4,11,2,4,2,0,-1,-1,-1,-1],[3,8,4,3,4,5,3,5,2,11,2,5,10,6,7,-1],[7,3,2,7,2,6,5,9,4,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,6,8,0,2,6,6,7,8,-1,-1,-1,-1],[3,2,6,3,6,7,1,0,5,5,0,4,-1,-1,-1,-1],[6,8,2,6,7,8,2,8,1,4,5,8,1,8,5,-1],[9,4,5,11,6,1,1,6,7,1,7,3,-1,-1,-1,-1],[1,11,6,1,6,7,1,7,0,8,0,7,9,4,5,-1],[4,11,0,4,5,11,0,11,3,6,7,11,3,11,7,-1],[7,11,6,7,8,11,5,11,4,4,11,8,-1,-1,-1,-1],[6,5,9,6,9,10,10,9,8,-1,-1,-1,-1,-1,-1,-1],[3,10,6,0,3,6,0,6,5,0,5,9,-1,-1,-1,-1],[0,8,10,0,10,5,0,5,1,5,10,6,-1,-1,-1,-1],[6,3,10,6,5,3,5,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,10,5,9,8,10,10,6,5,-1,-1,-1,-1],[0,3,10,0,10,6,0,6,9,5,9,6,1,11,2,-1],[10,5,8,10,6,5,8,5,0,11,2,5,0,5,2,-1],[6,3,10,6,5,3,2,3,11,11,3,5,-1,-1,-1,-1],[5,9,8,5,8,2,5,2,6,3,2,8,-1,-1,-1,-1],[9,6,5,9,0,6,0,2,6,-1,-1,-1,-1,-1,-1,-1],[1,8,5,1,0,8,5,8,6,3,2,8,6,8,2,-1],[1,6,5,2,6,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,6,3,1,11,6,3,6,8,5,9,6,8,6,9,-1],[11,0,1,11,6,0,9,0,5,5,0,6,-1,-1,-1,-1],[0,8,3,5,11,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,6,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,7,10,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,10,5,7,8,0,3,-1,-1,-1,-1,-1,-1,-1],[5,7,10,5,10,11,1,0,9,-1,-1,-1,-1,-1,-1,-1],[11,5,7,11,7,10,9,1,8,8,1,3,-1,-1,-1,-1],[10,2,1,10,1,7,7,1,5,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,7,2,1,5,7,7,10,2,-1,-1,-1,-1],[9,5,7,9,7,2,9,2,0,2,7,10,-1,-1,-1,-1],[7,2,5,7,10,2,5,2,9,3,8,2,9,2,8,-1],[2,11,5,2,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1],[8,0,2,8,2,5,8,5,7,11,5,2,-1,-1,-1,-1],[9,1,0,5,3,11,5,7,3,3,2,11,-1,-1,-1,-1],[9,2,8,9,1,2,8,2,7,11,5,2,7,2,5,-1],[1,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,7,8,0,1,7,1,5,7,-1,-1,-1,-1,-1,-1,-1],[9,3,0,9,5,3,5,7,3,-1,-1,-1,-1,-1,-1,-1],[9,7,8,5,7,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[5,4,8,5,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1],[5,4,0,5,0,10,5,10,11,10,0,3,-1,-1,-1,-1],[0,9,1,8,11,4,8,10,11,11,5,4,-1,-1,-1,-1],[11,4,10,11,5,4,10,4,3,9,1,4,3,4,1,-1],[2,1,5,2,5,8,2,8,10,4,8,5,-1,-1,-1,-1],[0,10,4,0,3,10,4,10,5,2,1,10,5,10,1,-1],[0,5,2,0,9,5,2,5,10,4,8,5,10,5,8,-1],[9,5,4,2,3,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,11,5,3,2,5,3,5,4,3,4,8,-1,-1,-1,-1],[5,2,11,5,4,2,4,0,2,-1,-1,-1,-1,-1,-1,-1],[3,2,11,3,11,5,3,5,8,4,8,5,0,9,1,-1],[5,2,11,5,4,2,1,2,9,9,2,4,-1,-1,-1,-1],[8,5,4,8,3,5,3,1,5,-1,-1,-1,-1,-1,-1,-1],[0,5,4,1,5,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,5,4,8,3,5,9,5,0,0,5,3,-1,-1,-1,-1],[9,5,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,10,4,10,9,9,10,11,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,7,9,9,7,10,9,10,11,-1,-1,-1,-1],[1,10,11,1,4,10,1,0,4,7,10,4,-1,-1,-1,-1],[3,4,1,3,8,4,1,4,11,7,10,4,11,4,10,-1],[4,7,10,9,4,10,9,10,2,9,2,1,-1,-1,-1,-1],[9,4,7,9,7,10,9,10,1,2,1,10,0,3,8,-1],[10,4,7,10,2,4,2,0,4,-1,-1,-1,-1,-1,-1,-1],[10,4,7,10,2,4,8,4,3,3,4,2,-1,-1,-1,-1],[2,11,9,2,9,7,2,7,3,7,9,4,-1,-1,-1,-1],[9,7,11,9,4,7,11,7,2,8,0,7,2,7,0,-1],[3,11,7,3,2,11,7,11,4,1,0,11,4,11,0,-1],[1,2,11,8,4,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,7,3,1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,0,1,8,8,1,7,-1,-1,-1,-1],[4,3,0,7,3,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,10,11,9,-1,-1,-1,-1,-1,-1,-1],[0,11,1,0,8,11,8,10,11,-1,-1,-1,-1,-1,-1,-1],[3,11,1,10,11,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,10,2,1,9,10,9,8,10,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,1,9,2,2,9,10,-1,-1,-1,-1],[0,10,2,8,10,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,11,9,8,-1,-1,-1,-1,-1,-1,-1],[9,2,11,0,2,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,0,8,1,1,8,11,-1,-1,-1,-1],[1,2,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,8,3,9,8,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,8,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]],_0x308ff5=[[0,1],[1,3],[2,3],[0,2],[4,5],[5,7],[6,7],[4,6],[0,4],[1,5],[2,6],[3,7]];function _0x2a9def(e){return _0x336f6e[e]}function _0x4bb34d(e){return _0x308ff5[e]}var _0x413409={getCase:_0x2a9def,getEdge:_0x4bb34d},_0x3d3a33=(_0x3a570f=!0,function(e,t){var i=_0x3a570f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a570f=!1,i}),_0x36367d=_0x3d3a33(void 0,(function(){return _0x36367d.toString().search("(((.+)+)+)+$").toString().constructor(_0x36367d).search("(((.+)+)+)+$")})),_0x3a570f;function _0x5651c5(){this._ids=[],this._voxelScalars=[],this._voxelGradients=[],this._voxelPts=[],this._edgeMap={},this.computeNormals=!0,this.mergePoints=!1,this.contourValue=0}_0x36367d(),_0x5651c5.prototype.getVoxelScalars=function(e,t,i,n,r,o,a,s){var l=this._ids,u=this._voxelScalars;l[0]=i*n+t*r[0]+e,l[1]=l[0]+1,l[2]=l[0]+r[0],l[3]=l[2]+1,l[4]=l[0]+n,l[5]=l[4]+1,l[6]=l[4]+r[0],l[7]=l[6]+1;for(let e=0;e<8;++e)u[e]=s[l[e]]},_0x5651c5.prototype.getVoxelPoints=function(e,t,i,n,r,o){var a=this._voxelPts;a[0]=r[0]+e*o[0],a[1]=r[1]+t*o[1],a[2]=r[2]+i*o[2],a[3]=a[0]+o[0],a[4]=a[1],a[5]=a[2],a[6]=a[0],a[7]=a[1]+o[1],a[8]=a[2],a[9]=a[3],a[10]=a[7],a[11]=a[2],a[12]=a[0],a[13]=a[1],a[14]=a[2]+o[2],a[15]=a[3],a[16]=a[1],a[17]=a[14],a[18]=a[0],a[19]=a[7],a[20]=a[14],a[21]=a[3],a[22]=a[7],a[23]=a[14]},_0x5651c5.prototype.getPointGradient=function(e,t,i,n,r,o,a,s){let l,u;0===e?(l=a[e+1+t*n[0]+i*r],u=a[e+t*n[0]+i*r],s[0]=(u-l)/o[0]):e===n[0]-1?(l=a[e+t*n[0]+i*r],u=a[e-1+t*n[0]+i*r],s[0]=(u-l)/o[0]):(l=a[e+1+t*n[0]+i*r],u=a[e-1+t*n[0]+i*r],s[0]=.5*(u-l)/o[0]),0===t?(l=a[e+(t+1)*n[0]+i*r],u=a[e+t*n[0]+i*r],s[1]=(u-l)/o[1]):t===n[1]-1?(l=a[e+t*n[0]+i*r],u=a[e+(t-1)*n[0]+i*r],s[1]=(u-l)/o[1]):(l=a[e+(t+1)*n[0]+i*r],u=a[e+(t-1)*n[0]+i*r],s[1]=.5*(u-l)/o[1]),0===i?(l=a[e+t*n[0]+(i+1)*r],u=a[e+t*n[0]+i*r],s[2]=(u-l)/o[2]):i===n[2]-1?(l=a[e+t*n[0]+i*r],u=a[e+t*n[0]+(i-1)*r],s[2]=(u-l)/o[2]):(l=a[e+t*n[0]+(i+1)*r],u=a[e+t*n[0]+(i-1)*r],s[2]=.5*(u-l)/o[2])},_0x5651c5.prototype.getVoxelGradients=function(e,t,i,n,r,o,a){var s=this._voxelGradients,l=[];this.getPointGradient(e,t,i,n,r,o,a,l),s[0]=l[0],s[1]=l[1],s[2]=l[2],this.getPointGradient(e+1,t,i,n,r,o,a,l),s[3]=l[0],s[4]=l[1],s[5]=l[2],this.getPointGradient(e,t+1,i,n,r,o,a,l),s[6]=l[0],s[7]=l[1],s[8]=l[2],this.getPointGradient(e+1,t+1,i,n,r,o,a,l),s[9]=l[0],s[10]=l[1],s[11]=l[2],this.getPointGradient(e,t,i+1,n,r,o,a,l),s[12]=l[0],s[13]=l[1],s[14]=l[2],this.getPointGradient(e+1,t,i+1,n,r,o,a,l),s[15]=l[0],s[16]=l[1],s[17]=l[2],this.getPointGradient(e,t+1,i+1,n,r,o,a,l),s[18]=l[0],s[19]=l[1],s[20]=l[2],this.getPointGradient(e+1,t+1,i+1,n,r,o,a,l),s[21]=l[0],s[22]=l[1],s[23]=l[2]},_0x5651c5.prototype.produceTriangles=function(e,t,i,n,r,o,a,s,l,u,c,h){var d,f,p=[1,2,4,8,16,32,64,128],_=[0,1,3,2,4,5,7,6],m=[],g=[],x=[];this.getVoxelScalars(t,i,n,r,o,a,s,l);for(var y=0,v=0;v<8;v++)this._voxelScalars[_[v]]>=e&&(y|=p[v]);var $=_0x413409.getCase(y);if(!($[0]<0)){this.getVoxelPoints(t,i,n,o,a,s),this.computeNormals&&this.getVoxelGradients(t,i,n,o,r,s,l);var b=new o$1p;for(v=0;$[v]>=0;v+=3){c.push(3);for(var T=0;T<3;T++){var C=_0x413409.getEdge($[v+T]);if(d=void 0,this.mergePoints&&(x[0]=this._ids[C[0]],x[1]=this._ids[C[1]],x[0]>x[1]&&(f=x[0],x[0]=x[1],x[1]=f),d=this._edgeMap[x]),void 0===d){var S=(e-this._voxelScalars[C[0]])/(this._voxelScalars[C[1]]-this._voxelScalars[C[0]]),w=this._voxelPts.slice(3*C[0],3*(C[0]+1)),E=this._voxelPts.slice(3*C[1],3*(C[1]+1));if(m[0]=w[0]+S*(E[0]-w[0]),m[1]=w[1]+S*(E[1]-w[1]),m[2]=w[2]+S*(E[2]-w[2]),d=u.length/3,u.push(m[0],m[1],m[2]),this.computeNormals){var P=this._voxelGradients.slice(3*C[0],3*(C[0]+1)),A=this._voxelGradients.slice(3*C[1],3*(C[1]+1));g[0]=P[0]+S*(A[0]-P[0]),g[1]=P[1]+S*(A[1]-P[1]),g[2]=P[2]+S*(A[2]-P[2]),o$1p.unpack(g,0,b),o$1p.equals(o$1p.ZERO,b)||o$1p.normalize(b,b),h.push(b.x,b.y,b.z)}this.mergePoints&&(x[0]=this._ids[C[0]],x[1]=this._ids[C[1]],x[0]>x[1]&&(f=x[0],x[0]=x[1],x[1]=f),this._edgeMap[x]=d)}c.push(d)}}}},_0x5651c5.prototype.compute=function(e){for(var t=e.xDimSize,i=e.yDimSize,n=e.zDimSize,r=(e.timeDimSize,[0,0,0]),o=[1/t,1/i,1/n],a=[t,i,n],s=e.array[0],l=[],u=[],c=[],h=a[0]*a[1],d=0;d<a[2]-1;++d)for(var f=0;f<a[1]-1;++f)for(var p=0;p<a[0]-1;++p)this.produceTriangles(this.contourValue,p,f,d,h,a,r,o,s,l,u,c);return{pBuffer:l,tBuffer:u,nBuffer:c}};var Wt$2="attribute vec4 aPosition;\nattribute vec4 aNormal;\nvarying vec3 vNormal;\nvarying vec3 positionEC;\nvoid main()\n{\nvNormal = aNormal.xyz;\npositionEC = (czm_modelView * vec4(aPosition.xyz, 1.0)).xyz;\ngl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n}\n",Ut$2="varying vec3 vNormal;\nvarying vec3 positionEC;\nuniform float uContourValue;\nuniform sampler2D u_colorTexture;\n#ifdef APPLY_LIGHTING\nuniform vec3 uDiffuse;\nuniform vec3 uSpecular;\nuniform vec3 uAmbient;\nuniform float uShiness;\n#endif\nvec4 getColorForValue(float tValue)\n{\nfloat texCoord = tValue;\ntexCoord = clamp(texCoord, 0.0, 1.0);\nvec4 tColor = texture2D(u_colorTexture, vec2(texCoord, 0.5));\nreturn tColor;\n}\n#ifdef APPLY_LIGHTING\nvoid applyLighting(inout vec4 tColor, vec3 normal)\n{\nvec3 diffuse = uDiffuse;\nvec3 specular = uSpecular;\nvec3 ambient = uAmbient;\nfloat shiness = uShiness;\nvec3 normalEC = normalize(czm_normal * normal);\nfloat ndot = max( dot( normalEC, czm_sunDirectionEC ), 0.0 );\nndot = ndot * 0.5 + 0.5;\ndiffuse = diffuse * ndot;\nspecular = specular * czm_getSpecular(czm_sunDirectionEC, normalize(-positionEC), normalEC, shiness);\ntColor.rgb = tColor.rgb*(diffuse + ambient) + specular;\n}\n#endif\nvoid main()\n{\nvec4 color = getColorForValue(uContourValue);\n#ifdef APPLY_LIGHTING\napplyLighting(color, vNormal);\n#endif\ngl_FragColor = color;\n}\n";function Qt$2(e){for(var t=1;t<e;)t<<=1;return t}function qt$2(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function _$9(e,t){this._context=e,this._floor=0,this._ceil=1,this._dataBounds=h$18.MAX_VALUE,this._zBounds=new o$1o(0,1),this._nSideBlockCount=0,this._nBlockLength=0,this._nLength=0,this._nWidth=0,this._nHeight=0,this._nDepth=0,this._volTextures=[],this._dWidth=0,this._dHeight=0,this._dDepth=0,this._matLocalView=void 0,this._boundingSphere=void 0,this._timeDimension=1,this._timeIndex=0,this._xSliceCommand=void 0,this._ySliceCommand=void 0,this._zSliceCommand=void 0,this._initialized=!1,this._layer=t,this._attributeLocations={},this._visibleBoundingBox=new O$z({minimum:o$1p.ZERO,maximum:new o$1p(1,1,1)}),this.m_vScale=new o$1p(1,1,1),this._volumeBoxCommand=void 0,this.marchingCubes=new _0x5651c5,this.outlineCommand=void 0,this._mode=C$14.SCENE3D}function Jt$1(e,t){var i=[];return i.push("Volume"),e._timeDimension>1&&i.push("TIME_ORDER"),e$2e(t._hypsometricTexture)&&i.push("HAS_COLORTABLE"),t._useGradientOpacity&&i.push("GRADIENT_OPACITY"),t._clipPlanes.length>0&&i.push("CLIP_PLANE"),t.enableLighting&&i.push("APPLY_LIGHTING"),(0!=e._visibleBoundingBox._minimum.x||0!=e._visibleBoundingBox._minimum.y||0!=e._visibleBoundingBox._minimum.z||1!=e._visibleBoundingBox._maximum.x||1!=e._visibleBoundingBox._maximum.y||1!=e._visibleBoundingBox._maximum.z)&&i.push("TEXTURECOORD_CLIP"),i}Object.defineProperties(_$9.prototype,{maxValue:{get:function(){return this._ceil}},minValue:{get:function(){return this._floor}},visibleBoundingBox:{get:function(){return this._visibleBoundingBox},set:function(e){this._visibleBoundingBox=e}}}),_$9.prototype._encodeImageData=function(e,t,i,n){for(var r=this._nLength*this._nLength*4,o=new Array(r),a=i-t,s=t,l=0;l<e.zDimSize;l++)for(var u=parseInt(l/this._nSideBlockCount)*this._nBlockLength,c=l%this._nSideBlockCount*this._nBlockLength,h=0;h<this._nBlockLength-2;h++)for(var d=0;d<this._nBlockLength-2;d++){var f=Math.min(d,e.xDimSize-1),p=Math.min(h,e.yDimSize-1),_=l*e.yDimSize*e.xDimSize+(e.yDimSize-1-p)*e.xDimSize+f,m=n[_],g=new e$2c(0,0,0,0);if(-9999!=m){m<t||m>i?m=s:s=m;var x=qt$2(m=(m-t)/a);g.x=x.x,g.y=x.y,g.z=x.z,g.w=1}var y=255*g.x,v=255*g.y,$=255*g.z,b=255*g.w;o[4*(_=(u+h)*this._nLength+c+d)]=parseInt(y),o[4*_+1]=parseInt(v),o[4*_+2]=parseInt($),o[4*_+3]=parseInt(b)}return new Uint8Array(o,0,r)},_$9.prototype._loadData=function(e,t){var i=x$c.loadData(e,t);this.output=i,this._timeDimension=i.timeDimSize,this._floor=i.minValue,this._ceil=i.maxValue,this._nWidth=i.xDimSize,this._nHeight=i.yDimSize,this._nDepth=i.zDimSize;var n=i.array;this._nSideBlockCount=Math.ceil(Math.sqrt(i.zDimSize)),this._nBlockLength=Math.max(i.xDimSize,i.yDimSize)+2,this._nLength=Qt$2(this._nBlockLength*this._nSideBlockCount-2);for(var r=[],o=0;o<this._timeDimension;o++)r.push(this._encodeImageData(i,i.minValue,i.maxValue,n[o]));return r},_$9.prototype._loadVolume=function(e,t){},_$9.prototype._loadTexture=function(e){var t=e.length,i=tt$i.LINEAR,n=rt$k.LINEAR;this._layer._filterMode===k$S.FilterMode.NEAREST&&(i=tt$i.NEAREST,n=rt$k.NEAREST);for(var r=0;r<t;r++){var o=new t$U({context:this._context,width:this._nLength,height:this._nLength,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:i,magnificationFilter:n})});o.copyFrom({width:this._nLength,height:this._nLength,arrayBufferView:e[r]}),this._volTextures.push(o)}},_$9.prototype._computePosition=function(){var e=this._mode,t=new o$1p(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);this._matLocalView=new p$1d,this._matInverseLocalView=new p$1d;var i=[];if(e===C$14.COLUMBUS_VIEW)this._vecCenter=new o$1p(t.z,t.x,t.y),p$1d.fromTranslation(this._vecCenter,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.south),i[1]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.south),i[2]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.north),i[3]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.north),i[4]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.south),i[5]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.south),i[6]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.north),i[7]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.north);else{this._vecCenter=o$1p.fromDegrees(t.x,t.y,t.z);var n=new i$16;m$19.headingPitchRollToFixedFrame(this._vecCenter,n,t$12.WGS84,m$19.eastNorthUpToFixedFrame,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.x),i[1]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.x),i[2]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.x),i[3]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.x),i[4]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.y),i[5]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.y),i[6]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.y),i[7]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.y)}this._dWidth=o$1p.distance(i[1],i[0]),this._dHeight=o$1p.distance(i[3],i[0]),this._dDepth=o$1p.distance(i[4],i[0]),this._boundingSphere=new i$1d,p$1d.multiplyByPoint(this._matLocalView,o$1p.ZERO,this._boundingSphere.center),this._boundingSphere.radius=.5*Math.sqrt(this._dWidth*this._dWidth+this._dHeight*this._dHeight+this._dDepth*this._dDepth)},_$9.prototype._createSliceCommand=function(){this._context;var e=this._mode===C$14.COLUMBUS_VIEW,t=this.GetRealBoundTop(),i=this.GetRealBoundBottom(),n=this.GetRealBoundRight(),r=this.GetRealBoundLeft();this._dWidth,this._dHeight;var o,a,s=this._layer._layerBounds.width,l=this._layer._layerBounds.height,u=this._layer._sliceCoordinate,c=Math.min(u.x,1),h=c*s,d=(c=Math.min(u.y,1))*l,f=n-r,p=t-i;e?o=a=5:(o=Math.ceil(this._dataBounds.north-this._dataBounds.south),a=Math.ceil(this._dataBounds.east-this._dataBounds.west));for(var _=a+1,m=o+1,g=(t-i)/o,x=(n-r)/a,y=_*m,v=2*_,$=2*m,b=new Float32Array(3*v),T=new Float32Array(3*v),C=new Float32Array(3*$),S=new Float32Array(3*$),w=new Float32Array(3*y),E=new Float32Array(3*y),P=this.GetRealTop(),A=this.GetRealBottom(),L=P-A,M=(c=Math.min(u.z,1))*L,R=0,O=new o$1p,D=A+M,I=(D-A)/L,B=0;B<m;B++)for(var F=i+B*g,N=0;N<_;N++){var G=r+N*x,z=e?new o$1p(D,G,F):o$1p.fromDegrees(G,F,D);p$1d.multiplyByPoint(this._matInverseLocalView,z,O),w[3*R]=O.x,w[3*R+1]=O.y,w[3*R+2]=O.z,E[3*R]=(G-r)/f,E[3*R+1]=(F-i)/p,E[3*R+2]=I,R++}R=0;var U=(t-d-i)/p;for(N=0;N<_;N++){G=r+N*x;var V=e?new o$1p(P,G,t-d):o$1p.fromDegrees(G,t-d,P);p$1d.multiplyByPoint(this._matInverseLocalView,V,O),b[6*R]=O.x,b[6*R+1]=O.y,b[6*R+2]=O.z,T[6*R]=(G-r)/f,T[6*R+1]=U,T[6*R+2]=1;var k=e?new o$1p(this._zBounds.x,G,t-d):o$1p.fromDegrees(G,t-d,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,k,O),b[6*R+3]=O.x,b[6*R+4]=O.y,b[6*R+5]=O.z,T[6*R+3]=(G-r)/f,T[6*R+4]=U,T[6*R+5]=0,R++}R=0;var W=h/f;for(B=0;B<m;B++){F=i+B*g;var H=e?new o$1p(P,r+h,F):o$1p.fromDegrees(r+h,F,P);p$1d.multiplyByPoint(this._matInverseLocalView,H,O),C[6*R]=O.x,C[6*R+1]=O.y,C[6*R+2]=O.z,S[6*R]=W,S[6*R+1]=(F-i)/p,S[6*R+2]=1;var q=e?new o$1p(this._zBounds.x,r+h,F):o$1p.fromDegrees(r+h,F,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,q,O),C[6*R+3]=O.x,C[6*R+4]=O.y,C[6*R+5]=O.z,S[6*R+3]=W,S[6*R+4]=(F-i)/p,S[6*R+5]=0,R++}for(var j=new Uint16Array(a*o*2*3),X=0,Y=0;Y<o;Y++)for(var Z=0;Z<a;Z++){var K=Z+_*Y,Q=Z+_*(Y+1),J=Z+1+_*(Y+1),ee=Z+1+_*Y;j[X++]=K,j[X++]=Q,j[X++]=ee,j[X++]=Q,j[X++]=J,j[X++]=ee}for(var te=2*o*3,ie=new Uint16Array(2*a*3),ne=new Uint16Array(te),re=0,oe=0;oe<o;oe++){K=Y=2*oe,Q=Y+1,J=Y+2,ee=Y+3;ne[re++]=K,ne[re++]=J,ne[re++]=Q,ne[re++]=Q,ne[re++]=J,ne[re++]=ee}var ae=0;for(oe=0;oe<a;oe++){K=Z=2*oe,Q=Z+1,J=Z+2,ee=Z+3;ie[ae++]=K,ie[ae++]=J,ie[ae++]=Q,ie[ae++]=Q,ie[ae++]=J,ie[ae++]=ee}var se=t$X.createVertexBuffer({context:this._context,typedArray:C,usage:A$18.STATIC_DRAW}),le=t$X.createVertexBuffer({context:this._context,typedArray:S,usage:A$18.STATIC_DRAW}),ue=t$X.createVertexBuffer({context:this._context,typedArray:b,usage:A$18.STATIC_DRAW}),ce=t$X.createVertexBuffer({context:this._context,typedArray:T,usage:A$18.STATIC_DRAW}),he=t$X.createVertexBuffer({context:this._context,typedArray:w,usage:A$18.STATIC_DRAW}),de=t$X.createVertexBuffer({context:this._context,typedArray:E,usage:A$18.STATIC_DRAW}),fe=[],pe=[],_e=[],me=this._attributeLocations;me.aPosition=0,fe.push({name:"aPosition",index:me.aPosition,vertexBuffer:se,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),pe.push({name:"aPosition",index:me.aPosition,vertexBuffer:ue,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),_e.push({name:"aPosition",index:me.aPosition,vertexBuffer:he,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),me.aTexCoord0=1,fe.push({name:"aTexCoord0",index:me.aTexCoord0,vertexBuffer:le,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),pe.push({name:"aTexCoord0",index:me.aTexCoord0,vertexBuffer:ce,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),_e.push({name:"aTexCoord0",index:me.aTexCoord0,vertexBuffer:de,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var ge=t$X.createIndexBuffer({context:this._context,typedArray:ne,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),xe=t$X.createIndexBuffer({context:this._context,typedArray:ie,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),ye=t$X.createIndexBuffer({context:this._context,typedArray:j,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),ve=new s$V({name:"VolumeRenderingVp",sources:[Ft$2]}),$e=new s$V({name:"VolumeRenderingFp",sources:[Rt$2]});ve.defines.push("Volume"),$e.defines.push("Volume"),this._timeDimension>1&&$e.defines.push("TIME_ORDER"),this._xSliceCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$q.OPAQUE,cull:!0}),this._ySliceCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$q.OPAQUE,cull:!0}),this._zSliceCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$q.OPAQUE,cull:!0}),this._xSliceCommand.vertexArray=new c$13({context:this._context,attributes:fe,indexBuffer:ge}),this._ySliceCommand.vertexArray=new c$13({context:this._context,attributes:pe,indexBuffer:xe}),this._zSliceCommand.vertexArray=new c$13({context:this._context,attributes:_e,indexBuffer:ye}),this._xSliceCommand.shaderProgram=r$14.fromCache({context:this._context,vertexShaderSource:ve,fragmentShaderSource:$e,attributeLocations:me}),this._ySliceCommand.shaderProgram=this._xSliceCommand.shaderProgram,this._zSliceCommand.shaderProgram=this._xSliceCommand.shaderProgram,this._xSliceCommand.renderState=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!0},depthMask:{enabled:!0}}),this._ySliceCommand.renderState=this._xSliceCommand.renderState,this._zSliceCommand.renderState=this._xSliceCommand.renderState},_$9.prototype._createContourCommand=function(e,t,i){var n=this._context,r=this._layer,o=e.length;if(!(o<3)){for(var a=new Float32Array(o),s=new Float32Array(i),l=this._dataBounds.west,u=this._dataBounds.south,c=this._zBounds.x,h=this._dataBounds.width,d=this._dataBounds.height,f=this._zBounds.y-this._zBounds.x,p=new o$1p,_=this._mode===C$14.COLUMBUS_VIEW,m=0;m<o;m+=3){var g=l+h*e[m],x=u+d*e[m+1],y=c+f*e[m+2],v=_?new o$1p(y,g,x):o$1p.fromDegrees(g,x,y);p$1d.multiplyByPoint(this._matInverseLocalView,v,p),a[m]=p.x,a[m+1]=p.y,a[m+2]=p.z}var $=t$X.createVertexBuffer({context:this._context,typedArray:a,usage:A$18.STATIC_DRAW}),b=t$X.createVertexBuffer({context:this._context,typedArray:s,usage:A$18.STATIC_DRAW}),T=[],C={aPosition:0};T.push({name:"aPosition",index:C.aPosition,vertexBuffer:$,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),C.aNormal=1,T.push({name:"aNormal",index:C.aNormal,vertexBuffer:b,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var S=new s$V({name:"VolumeContourVS",sources:[Wt$2]}),w=new s$V({name:"VolumeContourFS",sources:[Ut$2]});S.defines.push("Volume"),w.defines.push("Volume"),r.enableLighting&&w.defines.push("APPLY_LIGHTING"),this._contourCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$q.OPAQUE,count:o/3,cull:!0}),this._contourCommand.vertexArray=new c$13({context:this._context,attributes:T}),this._contourCommand.shaderProgram=r$14.fromCache({context:this._context,vertexShaderSource:S,fragmentShaderSource:w,attributeLocations:C}),this._contourCommand.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND});var E=this,P={u_colorTexture:function(){return e$2e(r._colorTexture)?r._colorTexture:n.defaultTexture},uVolumeTexture:function(){return E._volTextures[0]},width:function(){return E._nWidth},height:function(){return E._nHeight},depth:function(){return E._nDepth},sideBlockCount:function(){return E._nSideBlockCount},blockLength:function(){return E._nBlockLength},texLength:function(){return E._nLength},uFilterMode:function(){return r._filterMode},uContourValue:function(){return(r.contourValue-r.minValue)/(r.maxValue-r.minValue)},uDiffuse:function(){return r.material.diffuse},uAmbient:function(){return r.material.ambient},uSpecular:function(){return r.material.specular},uShiness:function(){return r.material.shiness}};this._contourCommand.uniformMap=P}},_$9.prototype.GetRealTop=function(){return this._zBounds.x+(this._zBounds.y-this._zBounds.x)*this._layer.scale.z},_$9.prototype.GetRealBottom=function(){return this._zBounds.x},_$9.prototype.GetRealBoundLeft=function(){return.5*(this._dataBounds.east+this._dataBounds.west)-.5*(this._dataBounds.east-this._dataBounds.west)*this._layer.scale.x},_$9.prototype.GetRealBoundRight=function(){return.5*(this._dataBounds.east+this._dataBounds.west)+.5*(this._dataBounds.east-this._dataBounds.west)*this._layer.scale.x},_$9.prototype.GetRealBoundTop=function(){return.5*(this._dataBounds.north+this._dataBounds.south)+.5*(this._dataBounds.north-this._dataBounds.south)*this._layer.scale.y},_$9.prototype.GetRealBoundBottom=function(){return.5*(this._dataBounds.north+this._dataBounds.south)-.5*(this._dataBounds.north-this._dataBounds.south)*this._layer.scale.y};var Xe$2=new o$1p;_$9.prototype._createVolumeBoxDrawCommand=function(e){this._context,new o$1p(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);var t,i,n=this._mode===C$14.COLUMBUS_VIEW,r=this.GetRealBoundTop(),o=this.GetRealBoundBottom(),a=this.GetRealBoundRight(),s=this.GetRealBoundLeft(),l=a-s,u=r-o;n?t=i=5:(t=Math.ceil(this._dataBounds.north-this._dataBounds.south),i=Math.ceil(this._dataBounds.east-this._dataBounds.west));for(var c=i+1,h=t+1,d=(r-o)/t,f=(a-s)/i,p=c*h,_=2*c,m=2*h,g=new Float32Array(3*_),x=new Float32Array(3*_),y=new Float32Array(3*_),v=new Float32Array(3*_),$=new Float32Array(3*m),b=new Float32Array(3*m),T=new Float32Array(3*m),C=new Float32Array(3*m),S=new Float32Array(3*p),w=new Float32Array(3*p),E=new Float32Array(3*p),P=new Float32Array(3*p),A=this.GetRealTop(),L=0,M=new o$1p,R=0;R<h;R++)for(var O=o+R*d,D=0;D<c;D++){var I=s+D*f,B=n?new o$1p(A,I,O):o$1p.fromDegrees(I,O,A);p$1d.multiplyByPoint(this._matInverseLocalView,B,M),S[3*L]=M.x,S[3*L+1]=M.y,S[3*L+2]=M.z,w[3*L]=(I-s)/l,w[3*L+1]=(O-o)/u,w[3*L+2]=1;var F=n?new o$1p(this._zBounds.x,I,O):o$1p.fromDegrees(I,O,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,F,M),E[3*L]=M.x,E[3*L+1]=M.y,E[3*L+2]=M.z,P[3*L]=(I-s)/l,P[3*L+1]=(O-o)/u,P[3*L+2]=0,L++}L=0;for(D=0;D<c;D++){I=s+D*f;var N=n?new o$1p(A,I,r):o$1p.fromDegrees(I,r,A);p$1d.multiplyByPoint(this._matInverseLocalView,N,M),g[6*L]=M.x,g[6*L+1]=M.y,g[6*L+2]=M.z,x[6*L]=(I-s)/l,x[6*L+1]=1,x[6*L+2]=1;var G=n?new o$1p(this._zBounds.x,I,r):o$1p.fromDegrees(I,r,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,G,M),g[6*L+3]=M.x,g[6*L+4]=M.y,g[6*L+5]=M.z,x[6*L+3]=(I-s)/l,x[6*L+4]=1,x[6*L+5]=0;var z=n?new o$1p(A,I,o):o$1p.fromDegrees(I,o,A);p$1d.multiplyByPoint(this._matInverseLocalView,z,M),y[6*L]=M.x,y[6*L+1]=M.y,y[6*L+2]=M.z,v[6*L]=(I-s)/l,v[6*L+1]=0,v[6*L+2]=1;var U=n?new o$1p(this._zBounds.x,I,o):o$1p.fromDegrees(I,o,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,U,M),y[6*L+3]=M.x,y[6*L+4]=M.y,y[6*L+5]=M.z,v[6*L+3]=(I-s)/l,v[6*L+4]=0,v[6*L+5]=0,L++}L=0;for(R=0;R<h;R++){O=o+R*d;var V=n?new o$1p(A,s,O):o$1p.fromDegrees(s,O,A);p$1d.multiplyByPoint(this._matInverseLocalView,V,M),$[6*L]=M.x,$[6*L+1]=M.y,$[6*L+2]=M.z,b[6*L]=0,b[6*L+1]=(O-o)/u,b[6*L+2]=1;var k=n?new o$1p(this._zBounds.x,s,O):o$1p.fromDegrees(s,O,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,k,M),$[6*L+3]=M.x,$[6*L+4]=M.y,$[6*L+5]=M.z,b[6*L+3]=0,b[6*L+4]=(O-o)/u,b[6*L+5]=0;var W=n?new o$1p(A,a,O):o$1p.fromDegrees(a,O,A);p$1d.multiplyByPoint(this._matInverseLocalView,W,M),T[6*L]=M.x,T[6*L+1]=M.y,T[6*L+2]=M.z,C[6*L]=1,C[6*L+1]=(O-o)/u,C[6*L+2]=1;var H=n?new o$1p(this._zBounds.x,a,O):o$1p.fromDegrees(a,O,this._zBounds.x);p$1d.multiplyByPoint(this._matInverseLocalView,H,M),T[6*L+3]=M.x,T[6*L+4]=M.y,T[6*L+5]=M.z,C[6*L+3]=1,C[6*L+4]=(O-o)/u,C[6*L+5]=0,L++}for(var q=i*t*2*3,j=new Uint16Array(q),X=new Uint16Array(q),Y=0,Z=0,K=0;K<t;K++)for(var Q=0;Q<i;Q++){var J=Q+c*K,ee=Q+c*(K+1),te=Q+1+c*(K+1),ie=Q+1+c*K;j[Y++]=ie,j[Y++]=ee,j[Y++]=J,j[Y++]=ie,j[Y++]=te,j[Y++]=ee,X[Z++]=J,X[Z++]=ee,X[Z++]=ie,X[Z++]=ee,X[Z++]=te,X[Z++]=ie}for(var ne=2*i*3,re=2*t*3,oe=new Uint16Array(ne),ae=new Uint16Array(ne),se=new Uint16Array(re),le=new Uint16Array(re),ue=0,ce=0,he=0;he<t;he++){J=K=2*he,ee=K+1,te=K+2,ie=K+3;se[ue++]=J,se[ue++]=te,se[ue++]=ee,se[ue++]=ee,se[ue++]=te,se[ue++]=ie,le[ce++]=ee,le[ce++]=te,le[ce++]=J,le[ce++]=ie,le[ce++]=te,le[ce++]=ee}var de=0,fe=0;for(he=0;he<i;he++){J=Q=2*he,ee=Q+1,te=Q+2,ie=Q+3;oe[de++]=J,oe[de++]=te,oe[de++]=ee,oe[de++]=ee,oe[de++]=te,oe[de++]=ie,ae[fe++]=ee,ae[fe++]=te,ae[fe++]=J,ae[fe++]=ie,ae[fe++]=te,ae[fe++]=ee}var pe=2*p+2*_+2*m,_e=new Float32Array(3*pe),me=new Float32Array(3*pe),ge=new Uint16Array(2*q+2*re+2*ne),xe=[],ye=[],ve=[];xe.push(g),xe.push(y),xe.push($),xe.push(T),xe.push(S),xe.push(E),ye.push(x),ye.push(v),ye.push(b),ye.push(C),ye.push(w),ye.push(P),ve.push(oe),ve.push(ae),ve.push(se),ve.push(le),ve.push(j),ve.push(X);for(var $e=xe.length,be=0,Te=0,Ce=0,Se=0,we=0;we<$e;we++){for(var Ee=xe[we],Pe=ye[we],Ae=ve[we],Le=0;Le<Ee.length;Le++)_e[Te++]=Ee[Le],me[Ce++]=Pe[Le];for(Le=0;Le<Ae.length;Le++)ge[Se++]=Ae[Le]+be;be+=Ee.length/3}var Me=t$X.createVertexBuffer({context:this._context,typedArray:_e,usage:A$18.STATIC_DRAW}),Re=t$X.createVertexBuffer({context:this._context,typedArray:me,usage:A$18.STATIC_DRAW}),Oe=[],De={aPosition:0};Oe.push({name:"aPosition",index:De.aPosition,vertexBuffer:Me,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),De.aTexCoord0=1,Oe.push({name:"aTexCoord0",index:De.aTexCoord0,vertexBuffer:Re,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1});var Ie=t$X.createIndexBuffer({context:this._context,typedArray:ge,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT}),Be=new s$V({name:"VolumeBoxVp",sources:[Mt$2]}),Fe=new s$V({name:"VolumeBoxFp",sources:[Nt$2]}),Ne=Jt$1(this,e);Be.defines=Ne,Fe.defines=Ne,this._volumeBoxCommand=new i$$({primitiveType:W$18.TRIANGLES,modelMatrix:this._matLocalView,boundingVolume:this._boundingSphere,pass:Le$q.OPAQUE,cull:!0}),this._volumeBoxCommand.vertexArray=new c$13({context:this._context,attributes:Oe,indexBuffer:Ie}),this._volumeBoxCommand.shaderProgram=r$14.fromCache({context:this._context,vertexShaderSource:Be,fragmentShaderSource:Fe,attributeLocations:De}),this._volumeBoxCommand.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},depthMask:{enabled:!0},blending:Ee$r.ALPHA_BLEND})};for(var Ze$1=new o$1p,Me$5=new e$2c,Ne$1=new e$2c,Ie$2=[],pt$2=0;pt$2<6;pt$2++)Ie$2.push(new e$2c);function xt$2(e,t){var i=!1,n=t.split(" ");if(n.length>1){var r=n[0],o=n[1];for(var a in e.defines)if(-1!==e.defines[a].indexOf(r))return void(e.defines[a]=r+" "+o)}else{for(var a in e.defines)if(e.defines[a]===t){i=!0;break}i||e.defines.push(t)}}function Bt$3(e,t){for(var i=-1,n=0;n<e.defines.length;n++)if(e.defines[n]===t){i=n;break}i>=0&&e.defines.splice(i,1)}function $$4(e){e$2e(e)&&(e.vertexArray=e.vertexArray&&!e.vertexArray.isDestroyed()&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&!e.shaderProgram.isDestroyed()&&e.shaderProgram.destroy(),e.renderState=void 0,e.uniformMap=void 0)}function o$b(e,t){_$9.call(this,e,t),this._orientedBoundingBox=void 0,this._level=0,this._x=0,this._y=0,this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._isVisible=!1,this._disFromCamera=0,this._rangeList=256,this._isLessLodDis=!1,this._pix=0,this._s3mLoadState=N$Q.UNLOAD,this._isRootTile=!1,this._rootTile=void 0,this._maxValue=void 0,this._minValue=void 0,this._multiTextures=[]}function G$8(e){for(var t=1;t<e;)t<<=1;return t}function H$8(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function q$5(e,t,i){var n=i.radius,r=i.center,o=o$1p.distance(e.positionWC,r);e._mode===C$14.SCENE2D&&(o=e.positionCartographic.height);var a=t.drawingBufferHeight,s=.5*e$2d.PI_OVER_FOUR,l=.5*a/Math.tan(s)*n/o;return Math.ceil(l)}_$9.prototype._createOutlineCommand=function(e){var t=new i$p(this._dWidth,this._dHeight,this._dDepth),i=(this._zBounds.y-this._zBounds.x)/2,n=o$1p.fromArray([0,0,i]),r=p$1d.fromTranslation(n),o=new p$1d;p$1d.multiply(this._matLocalView,r,o);var a=new i$$({primitiveType:W$18.LINES,modelMatrix:o,boundingVolume:this._boundingSphere,pass:Le$q.OPAQUE,cull:!0,owner:e});a.vertexArray=t.getOutlineVertexArray(this._context),a.shaderProgram=r$14.fromCache({name:"VoxelGridTileOutline",context:this._context,vertexShaderSource:Ht$8,fragmentShaderSource:Yt$8,attributeLocations:{aPosition:0}}),a.renderState=d$1m.fromCache({cull:{enabled:!0},depthTest:{enabled:!0}}),e._outlineCommand=a,this._outlineCommand=a},_$9.prototype._createUniformMap=function(e){var t=this,i={width:function(){return t._nWidth},height:function(){return t._nHeight},depth:function(){return t._nDepth},sideBlockCount:function(){return t._nSideBlockCount},blockLength:function(){return t._nBlockLength},texLength:function(){return t._nLength},u_maxVisibleTextureCoord:function(){return t._visibleBoundingBox._maximum},u_minVisibleTextureCoord:function(){return t._visibleBoundingBox._minimum},u_minMaxValueAndFiltration:function(){return Me$5.x=t._floor,Me$5.y=t._ceil,Me$5.z=e._minFiltration,Me$5.w=e._maxFiltration,Me$5},uVolumeTexture:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return t._volTextures[i]},uNextVolumeTexture:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,t._volTextures[i]},uTimeRatio:function(){return e._timeRatio},u_colorTable:function(){return e$2e(e._hypsometricTexture)?e._hypsometricTexture:t._context.defaultTexture},u_volumeBoxSize:function(){return Ze$1.x=t._dWidth,Ze$1.y=t._dHeight,Ze$1.z=t._dDepth,Ze$1},uFilterMode:function(){return e._filterMode},u_opacityTexture:function(){return e$2e(e._opacityTexture)?e._opacityTexture:t._context.defaultTexture},u_colorTexture:function(){return e$2e(e._colorTexture)?e._colorTexture:t._context.defaultTexture},u_jitterTexture:function(){return e$2e(t._jitterTexture)?t._jitterTexture:t._context.defaultTexture},u_gradientOpacityInfo:function(){if(e._useGradientOpacity){var t=e._gradientOpacityMinOpacity,i=e._gradientOpacityMaxOpacity,n=[e._gradientOpacityMinValue,e._gradientOpacityMaxValue],r=(i-t)/(n[1]-n[0]),o=-n[0]*(i-t)/(n[1]-n[0])+t;Ne$1.x=t,Ne$1.y=i,Ne$1.z=r,Ne$1.w=o}return Ne$1},u_clip_planes:function(){for(var t=e._clipPlanes.length,i=0;i<t;i++)Ie$2[i].x=e._clipPlanes[i].normal.x,Ie$2[i].y=e._clipPlanes[i].normal.y,Ie$2[i].z=e._clipPlanes[i].normal.z,Ie$2[i].w=e._clipPlanes[i].distance;return Ie$2},u_clip_planes_count:function(){return e._clipPlanes.length},uDiffuse:function(){return e.material.diffuse},uAmbient:function(){return e.material.ambient},uSpecular:function(){return e.material.specular},uShiness:function(){return e.material.shiness}},n={uOffset:function(){return new o$1p(e._sliceCoordinate.x,0,0)}},r={uOffset:function(){return new o$1p(0,e._sliceCoordinate.y,0)}},o={uOffset:function(){return new o$1p(0,0,e._sliceCoordinate.z)}};if(e$2e(this._xSliceCommand)&&(this._xSliceCommand.uniformMap=p$19(i,n),this._ySliceCommand.uniformMap=p$19(i,r),this._zSliceCommand.uniformMap=p$19(i,o)),e$2e(this._volumeBoxCommand)){var a={u_camTexCoord:function(){var e,i,n=t.frameState.camera.positionCartographic;if(t._mode===C$14.COLUMBUS_VIEW){var r=a$18.toCartesian(n),o=m$19.convertToColumbusCartesian(r);i=o.y,e=o.z}else i=e$2d.toDegrees(n.longitude),e=e$2d.toDegrees(n.latitude);var a=n.height,s=t.GetRealTop()-t._zBounds.x,l=t.GetRealBoundLeft(),u=t.GetRealBoundRight(),c=t.GetRealBoundBottom(),h=t.GetRealBoundTop();return Xe$2.x=(i-l)/(u-l),Xe$2.y=(e-c)/(h-c),Xe$2.z=(a-t._zBounds.x)/s,Xe$2},u_sampleDistance:function(){return t._layer._sampleDistance||.005}};this._volumeBoxCommand.uniformMap=p$19(i,a)}if(e$2e(this._outlineCommand)){var s={uDiffuseColor:function(){return e._outlineColor}};this._outlineCommand.uniformMap=p$19(i,s)}},_$9.prototype._initJitterTexture=function(){if(!e$2e(this._jitterTexture)){for(var e=new Uint8Array(1024),t=0;t<1024;++t)e[t]=255*Math.random();this._jitterTexture=new t$U({context:this._context,width:32,height:32,pixelFormat:this._context.webgpu||this._context.webgl2?V$12.RED:V$12.LUMINANCE,pixelDatatype:_$_.UNSIGNED_BYTE,flipY:!1}),this._jitterTexture.copyFrom({width:32,height:32,arrayBufferView:e})}},_$9.prototype._initialize=function(e,t,i){if(this.frameState=t,this._mode=t.mode,this._initialized){for(var n=this._volTextures.length,r=0;r<n;r++)this._volTextures[r].destroy();this._volTextures=[],e$2e(this._volumeBoxCommand)&&($$4(this._volumeBoxCommand),this._volumeBoxCommand=void 0),e$2e(this._outlineCommand)&&($$4(this._outlineCommand),this._outlineCommand=void 0),this._initialized=!1}this._initJitterTexture(),this._loadTexture(i),this._computePosition(),this._createVolumeBoxDrawCommand(e),this._createOutlineCommand(e),this._createSliceCommand(),this._createUniformMap(e),this._initialized=!0},_$9.prototype.update=function(e,t){if(this._mode=t.mode,(e._scaleDirty||e._sliceCoordDirty)&&(e._scaleDirty&&($$4(this._volumeBoxCommand),this._volumeBoxCommand=void 0),$$4(this._xSliceCommand),this._xSliceCommand=void 0,$$4(this._ySliceCommand),this._ySliceCommand=void 0,$$4(this._zSliceCommand),this._zSliceCommand=void 0,$$4(this._outlineCommand),this._outlineCommand=void 0,this._createVolumeBoxDrawCommand(e),this._createOutlineCommand(e),this._createSliceCommand(),this._createUniformMap(e),e._scaleDirty=!1,e._sliceCoordDirty=!1),e._contourValueDirty){if($$4(this._contourCommand),this._contourCommand=void 0,this.marchingCubes.contourValue=e.contourValue,e$2e(this.output)){var i=this.marchingCubes.compute(this.output);this._createContourCommand(i.pBuffer,i.tBuffer,i.nBuffer)}e._contourValueDirty=!1}e._volumeRenderMode===gt$2.Slice?(e$2e(this._xSliceCommand)&&t.commandList.push(this._xSliceCommand),e$2e(this._ySliceCommand)&&t.commandList.push(this._ySliceCommand),e$2e(this._zSliceCommand)&&t.commandList.push(this._zSliceCommand)):e._volumeRenderMode===gt$2.VolumeRendering?(e$2e(this._volumeBoxCommand)&&e._fillStyle!==fr$3.WireFrame&&t.commandList.push(this._volumeBoxCommand),e$2e(this._outlineCommand)&&e._fillStyle!==fr$3.Fill&&t.commandList.push(this._outlineCommand)):e._volumeRenderMode===gt$2.ContourValue&&e$2e(this._contourCommand)&&t.commandList.push(this._contourCommand),this.updateTimeDimension(e)},_$9.prototype.updateTimeDimension=function(e){this._timeDimension>1?(e._timeIndexChange&&this._timeIndex++,this._timeIndex==this._timeDimension&&(this._timeIndex=0)):this._timeIndex=0},_$9.prototype._setDataBounds=function(e){this._dataBounds=e},_$9.prototype._useGradientOpacityChanged=function(e){e?this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"GRADIENT_OPACITY"):this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"GRADIENT_OPACITY")},_$9.prototype._enableLightingChange=function(e){e?(this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"APPLY_LIGHTING"),this._appendProgramDefineForCommand(this._contourCommand,!1,!0,"APPLY_LIGHTING")):(this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"APPLY_LIGHTING"),this._removeProgramDefineForCommand(this._contourCommand,!1,!0,"APPLY_LIGHTING"))},_$9.prototype._clipPlaneChanged=function(e){e._clipPlanes.length>0?this._appendProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"CLIP_PLANE"):this._removeProgramDefineForCommand(this._volumeBoxCommand,!1,!0,"CLIP_PLANE")},_$9.prototype._setZBounds=function(e){this._zBounds=e},_$9.prototype._appendProgramDefineForCommand=function(e,t,i,n){if(e$2e(e)){var r=this._context,o=e.shaderProgram.fragmentShaderSource,a=e.shaderProgram.vertexShaderSource;t&&xt$2(a,n),i&&xt$2(o,n),e.shaderProgram.destroy(),e.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}},_$9.prototype._removeProgramDefineForCommand=function(e,t,i,n){if(e$2e(e)){var r=this._context,o=e.shaderProgram.fragmentShaderSource,a=e.shaderProgram.vertexShaderSource;t&&Bt$3(a,n),i&&Bt$3(o,n),e.shaderProgram.destroy(),e.shaderProgram=r$14.fromCache({context:r,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:this._attributeLocations})}},_$9.prototype.isDestroyed=function(){return!1},_$9.prototype.destroy=function(){for(var e=this._volTextures.length,t=0;t<e;t++)this._volTextures[t].destroy();return e$2e(this._volumeBoxCommand)&&($$4(this._volumeBoxCommand),this._volumeBoxCommand=void 0),e$2e(this._outlineCommand)&&($$4(this._outlineCommand),this._outlineCommand=void 0),e$2e(this._xSliceCommand)&&($$4(this._xSliceCommand),this._xSliceCommand=void 0),e$2e(this._ySliceCommand)&&($$4(this._ySliceCommand),this._ySliceCommand=void 0),e$2e(this._zSliceCommand)&&($$4(this._zSliceCommand),this._zSliceCommand=void 0),e$2e(this._contourCommand)&&($$4(this._contourCommand),this._contourCommand=void 0),e$2e(this._jitterTexture)&&this._jitterTexture.destroy(),this.output=void 0,this.marchingCubes=void 0,i$11(this)},o$b.prototype=new _$9,o$b.prototype.constructor=o$b,o$b.prototype.parent=_$9.prototype,Object.defineProperties(o$b.prototype,{}),o$b.prototype._encodeImageData=function(e,t,i,n){for(var r=this._nLength*this._nLength*4,o=new Array(r),a=i-t,s=t,l=0;l<e.zDimSize;l++)for(var u=parseInt(l/this._nSideBlockCount)*this._nBlockLength,c=l%this._nSideBlockCount*this._nBlockLength,h=-1;h<this._nBlockLength-1;h++)for(var d=-1;d<this._nBlockLength-1;d++){var f=Math.min(d,e.xValidSize-1),p=Math.min(h,e.yValidSize-1);f=Math.max(0,f),p=Math.max(0,p);var _=l*e.yDimSize*e.xDimSize+(e.yValidSize-1-p)*e.xDimSize+f;if(!(_<0)){var m=n[_],g=new e$2c(0,0,0,0);if(-9999!=m){m<t||m>i?m=s:s=m;var x=H$8(m=(m-t)/a);g.x=x.x,g.y=x.y,g.z=x.z,g.w=1}var y=255*g.x,v=255*g.y,$=255*g.z,b=255*g.w;o[4*(_=(u+h)*this._nLength+c+d)]=parseInt(y),o[4*_+1]=parseInt(v),o[4*_+2]=parseInt($),o[4*_+3]=parseInt(b)}}return new Uint8Array(o,0,r)},o$b.prototype._loadVolume=function(e,t){this._maxValue=t.maxValue,this._minValue=t.minValue,this._timeDimension=t.time,this._ceil=t.maxValue,this._floor=t.minValue,this._nWidth=t.xValidSize,this._nHeight=t.yValidSize,this._nDepth=t.zValidSize;var i=e.slice(36,e.byteLength),n=4*t.xDimSize*t.yDimSize*t.zDimSize;this._nSideBlockCount=Math.ceil(Math.sqrt(t.zDimSize)),this._nBlockLength=Math.max(t.xDimSize,t.yDimSize)+2,this._nLength=G$8(this._nBlockLength*this._nSideBlockCount-2);t.xValidSize,t.yValidSize,t.zValidSize;for(var r=[],o=0;o<this._timeDimension;o++){var a=new Float32Array(i.slice(o*n,(o+1)*n));r.push(this._encodeImageData(t,t.minValue,t.maxValue,a))}return r},o$b.prototype.updateTimeDimension=function(e){this._isRootTile?this._timeDimension>1?(e._timeIndexChange&&this._timeIndex++,this._timeIndex==this._timeDimension&&(this._timeIndex=0)):this._timeIndex=0:this._timeIndex=this._rootTile._timeIndex},o$b.prototype._computePosition=function(){var e=this._mode,t=new o$1p(.5*(this._dataBounds.west+this._dataBounds.east),.5*(this._dataBounds.north+this._dataBounds.south),this._zBounds.x);this._matLocalView=new p$1d,this._matInverseLocalView=new p$1d;var i=[];if(e===C$14.COLUMBUS_VIEW)this._vecCenter=new o$1p(t.z,t.x,t.y),p$1d.fromTranslation(this._vecCenter,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.south),i[1]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.south),i[2]=new o$1p(this._zBounds.x,this._dataBounds.east,this._dataBounds.north),i[3]=new o$1p(this._zBounds.x,this._dataBounds.west,this._dataBounds.north),i[4]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.south),i[5]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.south),i[6]=new o$1p(this._zBounds.y,this._dataBounds.east,this._dataBounds.north),i[7]=new o$1p(this._zBounds.y,this._dataBounds.west,this._dataBounds.north);else{this._vecCenter=o$1p.fromDegrees(t.x,t.y,t.z);var n=new i$16;m$19.headingPitchRollToFixedFrame(this._vecCenter,n,t$12.WGS84,m$19.eastNorthUpToFixedFrame,this._matLocalView),p$1d.inverse(this._matLocalView,this._matInverseLocalView),i[0]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.x),i[1]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.x),i[2]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.x),i[3]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.x),i[4]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.south,this._zBounds.y),i[5]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.south,this._zBounds.y),i[6]=o$1p.fromDegrees(this._dataBounds.east,this._dataBounds.north,this._zBounds.y),i[7]=o$1p.fromDegrees(this._dataBounds.west,this._dataBounds.north,this._zBounds.y)}this._dWidth=o$1p.distance(i[1],i[0]),this._dHeight=o$1p.distance(i[3],i[0]),this._dDepth=o$1p.distance(i[4],i[0]),this._orientedBoundingBox=y$Y.fromPoints(i,this._orientedBoundingBox),this._boundingSphere=new i$1d,p$1d.multiplyByPoint(this._matLocalView,o$1p.ZERO,this._boundingSphere.center),this._boundingSphere.radius=.5*Math.sqrt(this._dWidth*this._dWidth+this._dHeight*this._dHeight+this._dDepth*this._dDepth)},o$b.prototype.calcPixFromCam=function(e,t,i){if(this._boundingSphere){var n=e.positionWC,r=o$1p.clone(this._boundingSphere.center),o=o$1p.distance(r,n);e._mode==C$14.SCENE2D&&(o=e.positionCartographic.height),this._disFromCamera=o-this._boundingSphere.radius;var a;a=2*q$5(e,t,this._boundingSphere),this._isLessLodDis=a<=this._rangeList*i,this._pix=a}},o$b.prototype.load=function(e){var t,i,n=this._s3mLoadState,r=this;N$Q.UNLOAD===n&&(r._s3mLoadState=N$Q.LOADING,t=r._x<10?"000"+r._x:r._x<100?"00"+r._x:r._x<1e3?"0"+r._x:r._x,i=r._y<10?"000"+r._y:r._y<100?"00"+r._y:r._y<1e3?"0"+r._y:r._y,o$1l(o$10(e._url+"/"+r._level+"/"+i+"/"+t+"/"+i+"_"+t+".vol"),(function(e){r._s3mLoadState=N$Q.LOADED,r._arrayBuffer=e})).otherwise((function(e){throw new DeveloperError("Not a valid NetCDF file!")})))};var C$7=new p$1d;o$b.prototype._createUniformMap=function(e){this.parent._createUniformMap.call(this,e);var t=this,i={uMultiResolutionPara1:function(){return e$2e(t._multiTextures[0])?t._multiTextures[0].multiResolutionPara:C$7},uMultiResolutionPara2:function(){return e$2e(t._multiTextures[1])?t._multiTextures[1].multiResolutionPara:C$7},uMultiResolutionPara3:function(){return e$2e(t._multiTextures[2])?t._multiTextures[2].multiResolutionPara:C$7},uVolumeTexture1:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return e$2e(t._multiTextures[0])?t._multiTextures[0]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture1:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,e$2e(t._multiTextures[0])?t._multiTextures[0]._volTextures[i]:t._volTextures[i]},uVolumeTexture2:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return e$2e(t._multiTextures[1])?t._multiTextures[1]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture2:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,e$2e(t._multiTextures[1])?t._multiTextures[1]._volTextures[i]:t._volTextures[i]},uVolumeTexture3:function(){var i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):t._timeIndex;return e$2e(t._multiTextures[2])?t._multiTextures[2]._volTextures[i]:t._volTextures[i]},uNextVolumeTexture3:function(){var i=t._timeIndex+1;return t._timeIndex+1==t._timeDimension&&(i=t._timeIndex),i=e.frameIndex>0?Math.min(e.frameIndex,t._timeDimension-1):i,e$2e(t._multiTextures[2])?t._multiTextures[2]._volTextures[i]:t._volTextures[i]}};e$2e(this._xSliceCommand)&&(this._xSliceCommand.uniformMap=p$19(i,this._xSliceCommand.uniformMap),this._ySliceCommand.uniformMap=p$19(i,this._ySliceCommand.uniformMap),this._zSliceCommand.uniformMap=p$19(i,this._zSliceCommand.uniformMap)),e$2e(this._volumeBoxCommand)&&(this._volumeBoxCommand.uniformMap=p$19(i,this._volumeBoxCommand.uniformMap)),e$2e(this._outlineCommand)&&(this._outlineCommand.uniformMap=p$19(i,this._outlineCommand.uniformMap))},o$b.prototype._createShaderPreDefines=function(e,t){var i=this.parent._createShaderPreDefines.call(this,e,t);return i.push("MultiResolution"),i};var _0x19ee97=(_0xf7e914=!0,function(e,t){var i=_0xf7e914?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xf7e914=!1,i}),_0x1158ac=_0x19ee97(void 0,(function(){return _0x1158ac.toString().search("(((.+)+)+)+$").toString().constructor(_0x1158ac).search("(((.+)+)+)+$")})),_0xf7e914;function _0x4d473e(){this.model={clamping:!0,allowDuplicateScalars:!1,range:[0,0]},this.model.nodes=[]}_0x1158ac(),_0x4d473e.prototype.getSize=function(){return this.model.nodes.length},_0x4d473e.prototype.getType=function(){var e,t=0,i=0;this.model.nodes.length>0&&(t=this.model.nodes[0].y);for(var n=1;n<this.model.nodes.length;n++){if((e=this.model.nodes[n].y)!==t)if(e>t)switch(i){case 0:case 1:i=1;break;default:i=3}else switch(i){case 0:case 2:i=2;break;default:i=3}if(t=e,3===i)break}switch(i){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:return"Varied"}},_0x4d473e.prototype.getDataPointer=function(){var e=this.model.nodes.length;if(this.model.function=null,e>0){this.model.function=[];for(var t=0;t<e;t++)this.model.function[2*t]=this.model.nodes[t].x,this.model.function[2*t+1]=this.model.nodes[t].y}return this.model.function},_0x4d473e.prototype.getFirstNonZeroValue=function(){if(0===this.model.nodes.length)return 0;for(var e=1,t=0;t<this.model.nodes.length;t++)if(0!==this.model.nodes[t].y){e=0;break}return e?Number.MAX_VALUE:t>0?this.model.nodes[t-1].x:this.model.clamping?-Number.MAX_VALUE:this.model.nodes[0].x},_0x4d473e.prototype.getNodeValue=function(e,t){var i=this.model.nodes.length;return e<0||e>=i?-1:(t[0]=this.model.nodes[e].x,t[1]=this.model.nodes[e].y,t[2]=this.model.nodes[e].midpoint,t[3]=this.model.nodes[e].sharpness,1)},_0x4d473e.prototype.setNodeValue=function(e,t){var i=this.model.nodes.length;if(e<0||e>=i)return-1;var n=this.model.nodes[e].x;return this.model.nodes[e].x=t[0],this.model.nodes[e].y=t[1],this.model.nodes[e].midpoint=t[2],this.model.nodes[e].sharpness=t[3],n!==t[0]?this.sortAndUpdateRange():this.modified(),1},_0x4d473e.prototype.addPoint=function(e,t){this.addPointLong(e,t,.5,0)},_0x4d473e.prototype.addPointLong=function(e,t,i,n){if(i<0||i>1||n<0||n>1)return-1;this.model.allowDuplicateScalars||this.removePoint(e);var r,o={x:e,y:t,midpoint:i,sharpness:n};for(this.model.nodes.push(o),this.sortAndUpdateRange(),r=0;r<this.model.nodes.length&&this.model.nodes[r].x!==e;r++);return r<this.model.nodes.length?r:-1},_0x4d473e.prototype.setNodes=function(e){this.model.nodes!==e&&(this.model.nodes=e,this.sortAndUpdateRange())},_0x4d473e.prototype.getRange=function(){return this.model.range},_0x4d473e.prototype.updateRange=function(){var e=this.model.range.slice(),t=this.model.nodes.length;return t?(this.model.range[0]=this.model.nodes[0].x,this.model.range[1]=this.model.nodes[t-1].x):(this.model.range[0]=0,this.model.range[1]=0),(e[0]!==this.model.range[0]||e[1]!==this.model.range[1])&&(this.modified(),!0)},_0x4d473e.prototype.sortAndUpdateRange=function(e){this.model.nodes.sort((function(e,t){return e.x-t.x})),this.updateRange()||this.modified()},_0x4d473e.prototype.removePoint=function(e){var t;for(t=0;t<this.model.nodes.length&&this.model.nodes[t].x!==e;t++);if(t>=this.model.nodes.length)return-1;var i=t,n=!1;return this.model.nodes.splice(t,1),(0===t||t===this.model.nodes.length)&&(n=this.updateRange()),n||this.modified(),i},_0x4d473e.prototype.removeAllPoints=function(){this.model.nodes=[],this.sortAndUpdateRange()},_0x4d473e.prototype.addSegment=function(e,t,i,n){this.sortAndUpdateRange();for(var r=0;r<this.model.nodes.length;)this.model.nodes[r].x>=e&&this.model.nodes[r].x<=i?this.model.nodes.splice(r,1):r++;this.addPoint(e,t,.5,0),this.addPoint(i,n,.5,0)},_0x4d473e.prototype.getValue=function(e){var t=[];return this.getTable(e,e,1,t),t[0]},_0x4d473e.prototype.adjustRange=function(e){if(e.length<2)return 0;var t=this.getRange();t[0]<e[0]?this.addPoint(e[0],this.getValue(e[0])):this.addPoint(e[0],this.getValue(t[0])),t[1]>e[1]?this.addPoint(e[1],this.getValue(e[1])):this.addPoint(e[1],this.getValue(t[1])),this.sortAndUpdateRange();for(var i=0;i<this.model.nodes.length;)this.model.nodes[i].x>=e[0]&&this.model.nodes[i].x<=e[1]?this.model.nodes.splice(i,1):++i;return this.sortAndUpdateRange(),1},_0x4d473e.prototype.estimateMinNumberOfSamples=function(e,t){var i=this.findMinimumXDistance();return Math.ceil((t-e)/i)},_0x4d473e.prototype.findMinimumXDistance=function(){var e=this.model.nodes.length;if(e<2)return-1;for(var t=this.model.nodes[1].x-this.model.nodes[0].x,i=0;i<e-1;i++){var n=this.model.nodes[i+1].x-this.model.nodes[i].x;n<t&&(t=n)}return t},_0x4d473e.prototype.getTable=function(e,t,i,n,r){e$2e(r)||(r=1);var o,a=0,s=this.model.nodes.length,l=0;0!==s&&(l=this.model.nodes[s-1].y);var u=0,c=0,h=0,d=0,f=0,p=0,_=0;for(o=0;o<i;o++){var m=r*o;for(u=i>1?e+o/(i-1)*(t-e):.5*(e+t);a<s&&u>this.model.nodes[a].x;)++a<s&&(c=this.model.nodes[a-1].x,h=this.model.nodes[a].x,d=this.model.nodes[a-1].y,f=this.model.nodes[a].y,p=this.model.nodes[a-1].midpoint,_=this.model.nodes[a-1].sharpness,p<1e-5&&(p=1e-5),p>.99999&&(p=.99999));if(a>=s)n[m]=this.model.clamping?l:0;else if(0===a)n[m]=this.model.clamping?this.model.nodes[0].y:0;else{var g=(u-c)/(h-c);if(g=g<p?.5*g/p:.5+.5*(g-p)/(1-p),_>.99){if(g<.5){n[m]=d;continue}n[m]=f;continue}if(_<.01){n[m]=(1-g)*d+g*f;continue}g<.5?g=.5*(2*g)**(1+10*_):g>.5&&(g=1-.5*(2*(1-g))**(1+10*_));var x=g*g,y=x*g,v=2*y-3*x+1,$=-2*y+3*x,b=y-2*x+g,T=y-x,C=(1-_)*(f-d);n[m]=v*d+$*f+b*C+T*C;var S=d<f?d:f,w=d>f?d:f;n[m]=n[m]<S?S:n[m],n[m]=n[m]>w?w:n[m]}}},_0x4d473e.prototype.modified=function(){},_0x4d473e.clone=function(e,t){if(e$2e(e)){var i;for(e$2e(t)||(t=new _0x4d473e),i=0;i<e.model.nodes.length;i++){var n=e.model.nodes[i];t.model.nodes.push({x:n.x,y:n.y,midpoint:n.midpoint,sharpness:n.sharpness})}return t.sortAndUpdateRange(),t}};var _0x2e82cd=(_0x2c56c4=!0,function(e,t){var i=_0x2c56c4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c56c4=!1,i}),_0x499a0e=_0x2e82cd(void 0,(function(){return _0x499a0e.toString().search("(((.+)+)+)+$").toString().constructor(_0x499a0e).search("(((.+)+)+)+$")})),_0x2c56c4;_0x499a0e();var _0x20c75a={RGB:0,HSV:1,LAB:2,DIVERGING:3},_0x1fff44={LINEAR:0,LOG10:1};function _0x2ab369(e,t){var i=e[0],n=e[1],r=e[2],o=Math.sqrt(i*i+n*n+r*r),a=o>.001?Math.acos(i/o):0,s=a>.001?Math.atan2(r,n):0;t[0]=o,t[1]=a,t[2]=s}function _0x472731(e,t){var i=e[0],n=e[1],r=e[2];t[0]=i*Math.cos(n),t[1]=i*Math.sin(n)*Math.cos(r),t[2]=i*Math.sin(n)*Math.sin(r)}function _0x396d66(e,t){if(e[0]>=t-.1)return e[2];var i=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+i:e[2]-i}function _0x102e03(e,t){var i=e-t;for(i<0&&(i=-i);i>=2*Math.PI;)i-=2*Math.PI;return i>Math.PI&&(i=2*Math.PI-i),i}function _0x2d5d87(e,t,i,n){var r=[],o=[];_0x2a827b(t,r),_0x2a827b(i,o);var a=[],s=[];_0x2ab369(r,a),_0x2ab369(o,s);var l=e;if(a[1]>.05&&s[1]>.05&&_0x102e03(a[2],s[2])>.33*Math.PI){var u=Math.max(a[0],s[0]);u=Math.max(88,u),e<.5?(s[0]=u,s[1]=0,s[2]=0,l*=2):(a[0]=u,a[1]=0,a[2]=0,l=2*l-1)}a[1]<.05&&s[1]>.05?a[2]=_0x396d66(s,a[0]):s[1]<.05&&a[1]>.05&&(s[2]=_0x396d66(a,s[0]));var c=[];c[0]=(1-l)*a[0]+l*s[0],c[1]=(1-l)*a[1]+l*s[1],c[2]=(1-l)*a[2]+l*s[2];var h=[];_0x472731(c,h),_0x4db40e(h,n)}function _0x5a9a06(){this.model={clamping:!0,colorSpace:_0x20c75a.RGB,hSVWrap:!0,scale:_0x1fff44.LINEAR,nanColor:null,belowRangeColor:null,aboveRangeColor:null,useAboveRangeColor:!1,useBelowRangeColor:!1,allowDuplicateScalars:!1,table:null,tableSize:0,buildTime:null,nodes:null,discretize:!1,numberOfValues:256,range:[0,1],mappingRange:[0,1]},this.model.table=[],this.model.nodes=[],this.model.nanColor=[.5,0,0,1],this.model.belowRangeColor=[0,0,0,1],this.model.aboveRangeColor=[1,1,1,1],this.model.buildTime={}}function _0x13f70a(e,t){var i,n,r=e[0],o=e[1],a=e[2],s=1/6,l=r,u=r;o>l?l=o:o<u&&(u=o),a>l?l=a:a<u&&(u=a);const c=l;(n=c>0?(l-u)/l:0)>0?(i=r===l?s*(o-a)/(l-u):o===l?1/3+s*(a-r)/(l-u):2/3+s*(r-o)/(l-u))<0&&(i+=1):i=0,t[0]=i,t[1]=n,t[2]=c}function _0xc84f51(e,t){var i,n,r,o=e[0],a=e[1],s=e[2],l=1/3,u=1/6,c=2/3,h=5/6;o>u&&o<=l?(n=1,i=(l-o)/u,r=0):o>l&&o<=.5?(n=1,r=(o-l)/u,i=0):o>.5&&o<=c?(r=1,n=(c-o)/u,i=0):o>c&&o<=h?(r=1,i=(o-c)/u,n=0):o>h&&o<=1?(i=1,r=(1-o)/u,n=0):(i=1,n=o/u,r=0),i=a*i+(1-a),n=a*n+(1-a),r=a*r+(1-a),i*=s,n*=s,r*=s,t[0]=i,t[1]=n,t[2]=r}function _0x156c9d(e,t){var i=(e[0]+16)/116,n=e[1]/500+i,r=i-e[2]/200;i**3>.008856?i**=3:i=(i-16/116)/7.787,n**3>.008856?n**=3:n=(n-16/116)/7.787,r**3>.008856?r**=3:r=(r-16/116)/7.787;t[0]=.9505*n,t[1]=1*i,t[2]=1.089*r}function _0x89ec71(e,t){var i=e[0]/.9505,n=e[1]/1,r=e[2]/1.089;i>.008856?i**=1/3:i=7.787*i+16/116,n>.008856?n**=1/3:n=7.787*n+16/116,r>.008856?r**=1/3:r=7.787*r+16/116,t[0]=116*n-16,t[1]=500*(i-n),t[2]=200*(n-r)}function _0x1a8d22(e,t){var i=e[0],n=e[1],r=e[2],o=3.2406*i+-1.5372*n+-.4986*r,a=-.9689*i+1.8758*n+.0415*r,s=.0557*i+-.204*n+1.057*r;o>.0031308?o=1.055*o**(1/2.4)-.055:o*=12.92,a>.0031308?a=1.055*a**(1/2.4)-.055:a*=12.92,s>.0031308?s=1.055*s**(1/2.4)-.055:s*=12.92;var l=o;l<a&&(l=a),l<s&&(l=s),l>1&&(o/=l,a/=l,s/=l),o<0&&(o=0),a<0&&(a=0),s<0&&(s=0),t[0]=o,t[1]=a,t[2]=s}function _0x47ccb7(e,t){var i=e[0],n=e[1],r=e[2];i>.04045?i=((i+.055)/1.055)**2.4:i/=12.92,n>.04045?n=((n+.055)/1.055)**2.4:n/=12.92,r>.04045?r=((r+.055)/1.055)**2.4:r/=12.92,t[0]=.4124*i+.3576*n+.1805*r,t[1]=.2126*i+.7152*n+.0722*r,t[2]=.0193*i+.1192*n+.9505*r}function _0x2a827b(e,t){var i=[0,0,0];_0x47ccb7(e,i),_0x89ec71(i,t)}function _0x4db40e(e,t){var i=[0,0,0];_0x156c9d(e,i),_0x1a8d22(i,t)}function g$e(e){o$1q.defined("context",e),this._context=e,this._NetCDFData=void 0,this._NetCDFInfo=void 0,this._NetCDFBuffer=void 0,this._dictColorTable=void 0,this._hasColorTable=0,this._hypsometricTexture=void 0,this._filterMode=k$S.FilterMode.LINEAR,this._volumeRenderMode=gt$2.VolumeRendering,this._scale=new o$1p(1,1,1),this._scaleDirty=!1,this._sliceCoordDirty=!1,this._transparency=0,this._sliceCoordinate=new o$1p(.5,.5,.5),this._floor=Number.MAX_VALUE,this._ceil=Number.MIN_VALUE,this._maxFiltration=Number.MAX_VALUE,this._minFiltration=Number.MIN_VALUE,this._visible=!0,this._type="VoxelGridLayer3D",this._name=void 0,this._url=void 0,this._voxelGridTile=void 0,this._zBounds=void 0,this._layerBounds=void 0,this._version=1,this._width=0,this._height=0,this._depth=0,this._time=0,this._cellWidth=0,this._cellHeight=0,this._cellDepth=0,this._cellTime=0,this._levels=0,this._availableNode=void 0,this._volumeBuffer=void 0,this._multiTextures=[],this._textureLevelLoaded=!0,this._period=500,this._prevTime=0,this._timeRatio=0,this._timeIndexChange=!1,this._duration=1,this._startRender=!1,this._frameIndex=-1,this._useGradientOpacity=!1,this._gradientOpacityMinOpacity=0,this._gradientOpacityMaxOpacity=1,this._gradientOpacityMinValue=0,this._gradientOpacityMaxValue=1,this._clipPlanes=[],this._contourValue=0,this._contourValueDirty=!1,this._enableLighting=!1,this._material={diffuse:new e$1X(.9,.9,.9),specular:new e$1X(.2,.2,.2),ambient:new e$1X(.1,.1,.1),shiness:10},this._fillStyle=fr$3.Fill,this._outlineColor=new e$1X(1,1,1,1)}_0x5a9a06.clone=function(e,t){if(e$2e(e)){var i;for(e$2e(t)||(t=new _0x5a9a06),i=0;i<e.model.nodes.length;i++){var n=e.model.nodes[i];t.model.nodes.push({x:n.x,r:n.r,g:n.g,b:n.b,midpoint:n.midpoint,sharpness:n.sharpness})}return t.sortAndUpdateRange(),t.model.mappingRange[0]=e.model.mappingRange[0],t.model.mappingRange[1]=e.model.mappingRange[1],t}},_0x5a9a06.prototype.getSize=function(){return this.model.nodes.length},_0x5a9a06.prototype.addRGBPoint=function(e,t,i,n){this.addRGBPointLong(e,t,i,n,.5,0)},_0x5a9a06.prototype.addRGBPointLong=function(e,t,i,n,r,o){var a=u$Z(r,.5),s=u$Z(o,0);if(a<0||a>1||s<0||s>1)return-1;this.model.allowDuplicateScalars||this.removePoint(e);var l={x:e,r:t,g:i,b:n,midpoint:a,sharpness:s};this.model.nodes.push(l),this.sortAndUpdateRange();for(var u=0;u<this.model.nodes.length&&this.model.nodes[u].x!==e;u++);return u<this.model.nodes.length?u:-1},_0x5a9a06.prototype.addHSVPoint=function(e,t,i,n){this.addHSVPointLong(e,t,i,n,.5,0)},_0x5a9a06.prototype.addHSVPointLong=function(e,t,i,n,r,o){var a=u$Z(r,.5),s=u$Z(o,0),l=[];return _0xc84f51([t,i,n],l),this.addRGBPoint(e,l[0],l[1],l[2],a,s)},_0x5a9a06.prototype.setNodes=function(e){this.model.nodes!==e&&(this.model.nodes=e,this.sortAndUpdateRange())},_0x5a9a06.prototype.sortAndUpdateRange=function(){this.model.nodes.sort((function(e,t){return e.x-t.x})),this.updateRange()||this.modified()},_0x5a9a06.prototype.getRange=function(){return this.model.mappingRange},_0x5a9a06.prototype.updateRange=function(){var e=[2];e[0]=this.model.mappingRange[0],e[1]=this.model.mappingRange[1];var t=this.model.nodes.length;return t?(this.model.mappingRange[0]=this.model.nodes[0].x,this.model.mappingRange[1]=this.model.nodes[t-1].x):(this.model.mappingRange[0]=0,this.model.mappingRange[1]=0),(e[0]!==this.model.mappingRange[0]||e[1]!==this.model.mappingRange[1])&&(this.modified(),!0)},_0x5a9a06.prototype.removePoint=function(e){for(var t=0;t<this.model.nodes.length&&this.model.nodes[t].x!==e;t++);var i=t;if(t>=this.model.nodes.length)return-1;var n=!1;return this.model.nodes.splice(t,1),(0===t||t===this.model.nodes.length)&&(n=this.updateRange()),n||this.modified(),i},_0x5a9a06.prototype.movePoint=function(e,t){if(e!==t){this.removePoint(t);for(var i=0;i<this.model.nodes.length;i++)if(this.model.nodes[i].x===e){this.model.nodes[i].x=t,this.sortAndUpdateRange();break}}},_0x5a9a06.prototype.removeAllPoints=function(){this.model.nodes=[],this.sortAndUpdateRange()},_0x5a9a06.prototype.addRGBSegment=function(e,t,i,n,r,o,a,s){this.sortAndUpdateRange();for(var l=0;l<this.model.nodes.length;)this.model.nodes[l].x>=e&&this.model.nodes[l].x<=r?this.model.nodes.splice(l,1):l++;this.addRGBPointLong(e,t,i,n,.5,0),this.addRGBPointLong(r,o,a,s,.5,0),this.modified()},_0x5a9a06.prototype.addHSVSegment=function(e,t,i,n,r,o,a,s){var l=[o,a,s],u=[],c=[];_0xc84f51([t,i,n],u),_0xc84f51(l,c),this.addRGBSegment(e,u[0],u[1],u[2],r,c[0],c[1],c[2])},_0x5a9a06.prototype.mapValue=function(e){var t=[];return this.getColor(e,t),[Math.floor(255*t[0]+.5),Math.floor(255*t[1]+.5),Math.floor(255*t[2]+.5),255]},_0x5a9a06.prototype.getColor=function(e,t){if(this.model.indexedLookup){var i=this.getSize(),n=this.getAnnotatedValueIndexInternal(e);if(n<0||0===i)this.getNanColor(t);else{var r=[];this.getNodeValue(n%i,r),t[0]=r.r,t[1]=r.g,t[2]=r.b}}else this.getTable(e,e,1,t)},_0x5a9a06.prototype.getRedValue=function(e){var t=[];return this.getColor(e,t),t[0]},_0x5a9a06.prototype.getGreenValue=function(e){var t=[];return this.getColor(e,t),t[1]},_0x5a9a06.prototype.getBlueValue=function(e){var t=[];return this.getColor(e,t),t[2]},_0x5a9a06.prototype.getTable=function(e,t,i,n){if(isNaN(e)||isNaN(t))for(var r=0;r<i;r++)n[3*r+0]=this.model.nanColor[0],n[3*r+1]=this.model.nanColor[1],n[3*r+2]=this.model.nanColor[2];else{var o=0,a=this.model.nodes.length,s=0,l=0,u=0;0!==a&&(s=this.model.nodes[a-1].r,l=this.model.nodes[a-1].g,u=this.model.nodes[a-1].b);var c=0,h=0,d=0,f=[0,0,0],p=[0,0,0],_=0,m=0,g=[],x=this.model.scale===_0x1fff44.LOG10;x&&(x=this.model.mappingRange[0]>0);var y=0,v=0,$=0;x&&(y=Math.log10(e),v=Math.log10(t));for(r=0;r<i;r++){var b=3*r;if(i>1?x?c=10**($=y+r/(i-1)*(v-y)):c=e+r/(i-1)*(t-e):x?c=10**($=.5*(y+v)):c=.5*(e+t),this.model.discretize){var T=this.model.mappingRange;if(c>=T[0]&&c<=T[1]){var C=this.model.numberOfValues,S=T[1]-T[0];if(C<=1)c=T[0]+S/2;else{var w=(c-T[0])/S,E=Math.floor(C*w);c=T[0]+E/(C-1)*S}}}for(;o<a&&c>this.model.nodes[o].x;)++o<a&&(h=this.model.nodes[o-1].x,d=this.model.nodes[o].x,x&&(h=Math.log10(h),d=Math.log10(d)),f[0]=this.model.nodes[o-1].r,p[0]=this.model.nodes[o].r,f[1]=this.model.nodes[o-1].g,p[1]=this.model.nodes[o].g,f[2]=this.model.nodes[o-1].b,p[2]=this.model.nodes[o].b,_=this.model.nodes[o-1].midpoint,m=this.model.nodes[o-1].sharpness,_<1e-5&&(_=1e-5),_>.99999&&(_=.99999));if(c>this.model.mappingRange[1])n[b]=0,n[b+1]=0,n[b+2]=0,this.model.clamping&&(this.getUseAboveRangeColor()?(n[b]=this.model.aboveRangeColor[0],n[b+1]=this.model.aboveRangeColor[1],n[b+2]=this.model.aboveRangeColor[2]):(n[b]=s,n[b+1]=l,n[b+2]=u));else if(c<this.model.mappingRange[0]||!Number.isFinite(c)&&c<0)n[b]=0,n[b+1]=0,n[b+2]=0,this.model.clamping&&(this.getUseBelowRangeColor()?(n[b]=this.model.belowRangeColor[0],n[b+1]=this.model.belowRangeColor[1],n[b+2]=this.model.belowRangeColor[2]):a>0&&(n[b]=this.model.nodes[0].r,n[b+1]=this.model.nodes[0].g,n[b+2]=this.model.nodes[0].b));else if(0===o&&(Math.abs(c-e)<1e-6||this.model.discretize))a>0?(n[b]=this.model.nodes[0].r,n[b+1]=this.model.nodes[0].g,n[b+2]=this.model.nodes[0].b):(n[b]=0,n[b+1]=0,n[b+2]=0);else{var P=0;if(P=(P=x?($-h)/(d-h):(c-h)/(d-h))<_?.5*P/_:.5+.5*(P-_)/(1-_),m>.99){if(P<.5){n[b]=f[0],n[b+1]=f[1],n[b+2]=f[2];continue}n[b]=p[0],n[b+1]=p[1],n[b+2]=p[2];continue}if(m<.01){if(this.model.colorSpace===_0x20c75a.RGB)n[b]=(1-P)*f[0]+P*p[0],n[b+1]=(1-P)*f[1]+P*p[1],n[b+2]=(1-P)*f[2]+P*p[2];else if(this.model.colorSpace===_0x20c75a.HSV){var A=[];_0x13f70a(f,G=[]),_0x13f70a(p,A),this.model.hSVWrap&&(G[0]-A[0]>.5||A[0]-G[0]>.5)&&(G[0]>A[0]?G[0]-=1:A[0]-=1),(z=[])[0]=(1-P)*G[0]+P*A[0],z[0]<0&&(z[0]+=1),z[1]=(1-P)*G[1]+P*A[1],z[2]=(1-P)*G[2]+P*A[2],_0xc84f51(z,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else if(this.model.colorSpace===_0x20c75a.LAB){var L=[];_0x2a827b(f,U=[]),_0x2a827b(p,L),(V=[])[0]=(1-P)*U[0]+P*L[0],V[1]=(1-P)*U[1]+P*L[1],V[2]=(1-P)*U[2]+P*L[2],_0x4db40e(V,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else this.model.colorSpace===_0x20c75a.DIVERGING&&(_0x2d5d87(P,f,p,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]);continue}P<.5?P=.5*(2*P)**(1+10*m):P>.5&&(P=1-.5*(2*(1-P))**(1+10*m));var M,R=P*P,O=R*P,D=2*O-3*R+1,I=-2*O+3*R,B=O-2*R+P,F=O-R;if(this.model.colorSpace===_0x20c75a.RGB)for(var N=0;N<3;N++)M=(1-m)*(p[N]-f[N]),n[b+N]=D*f[N]+I*p[N]+B*M+F*M;else if(this.model.colorSpace===_0x20c75a.HSV){var G;A=[];_0x13f70a(f,G=[]),_0x13f70a(p,A),this.model.hSVWrap&&(G[0]-A[0]>.5||A[0]-G[0]>.5)&&(G[0]>A[0]?G[0]-=1:A[0]-=1);var z=[];for(N=0;N<3;N++)M=(1-m)*(A[N]-G[N]),z[N]=D*G[N]+I*A[N]+B*M+F*M,0===N&&z[N]<0&&(z[N]+=1);_0xc84f51(z,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else if(this.model.colorSpace===_0x20c75a.LAB){var U;L=[];_0x2a827b(f,U=[]),_0x2a827b(p,L);var V=[];for(N=0;N<3;N++)M=(1-m)*(L[N]-U[N]),V[N]=D*U[N]+I*L[N]+B*M+F*M;_0x4db40e(V,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]}else this.model.colorSpace===_0x20c75a.DIVERGING&&(_0x2d5d87(P,f,p,g),n[b]=g[0],n[b+1]=g[1],n[b+2]=g[2]);for(N=0;N<3;N++)n[b+N]=n[b+N]<0?0:n[b+N],n[b+N]=n[b+N]>1?1:n[b+N]}}}},_0x5a9a06.prototype.getUint8Table=function(e,t,i,n){if(n=u$Z(n,!1),this.model.tableSize===i&&this.model.tableWithAlpha!==n)return this.model.table;if(0===this.model.nodes.length)return this.model.table;var r=n?4:3;(this.model.tableSize!==i||this.model.tableWithAlpha!==n)&&(this.model.table=new Uint8Array(i*r),this.model.tableSize=i,this.model.tableWithAlpha=n);var o=[];this.getTable(e,t,i,o);for(var a=0;a<i;a++)this.model.table[a*r+0]=Math.floor(255*o[3*a+0]+.5),this.model.table[a*r+1]=Math.floor(255*o[3*a+1]+.5),this.model.table[a*r+2]=Math.floor(255*o[3*a+2]+.5),n&&(this.model.table[a*r+3]=255);return this.model.buildTime.modified(),this.model.table},_0x5a9a06.prototype.buildFunctionFromTable=function(e,t,i,n){var r=0;this.removeAllPoints(),i>1&&(r=(t-e)/(i-1));for(var o=0;o<i;o++){var a={x:e+r*o,r:n[3*o],g:n[3*o+1],b:n[3*o+2],sharpness:0,midpoint:.5};this.model.nodes.push(a)}this.sortAndUpdateRange()},_0x5a9a06.prototype.getNodeValue=function(e,t){return e<0||e>=this.model.nodes.length?-1:(t[0]=this.model.nodes[e].x,t[1]=this.model.nodes[e].r,t[2]=this.model.nodes[e].g,t[3]=this.model.nodes[e].b,t[4]=this.model.nodes[e].midpoint,t[5]=this.model.nodes[e].sharpness,1)},_0x5a9a06.prototype.setNodeValue=function(e,t){if(e<0||e>=this.model.nodes.length)return-1;var i=this.model.nodes[e].x;return this.model.nodes[e].x=t[0],this.model.nodes[e].r=t[1],this.model.nodes[e].g=t[2],this.model.nodes[e].b=t[3],this.model.nodes[e].midpoint=t[4],this.model.nodes[e].sharpness=t[5],i!==t[0]?this.sortAndUpdateRange():this.modified(),1},_0x5a9a06.prototype.getNumberOfAvailableColors=function(){return this.model.indexedLookup&&this.getSize()?this.getSize():this.model.tableSize?this.model.tableSize:16777216},_0x5a9a06.prototype.getIndexedColor=function(e,t){var i=this.getSize();if(i>0&&e>=0){var n=[];this.getNodeValue(e%i,n);for(var r=0;r<3;++r)t[r]=n[r+1];t[3]=1}else this.getNanColor(t),t[3]=1},_0x5a9a06.prototype.fillFromDataPointer=function(e,t){if(!(e<=0)&&t){this.removeAllPoints();for(var i=0;i<e;i++)this.addRGBPoint(t[4*i],t[4*i+1],t[4*i+2],t[4*i+3])}},_0x5a9a06.prototype.setMappingRange=function(e,t){var i=[e,t],n=this.getRange();if((n[1]!==i[1]||n[0]!==i[0])&&i[1]!==i[0]){for(var r=(i[1]-i[0])/(n[1]-n[0]),o=i[0]-n[0]*r,a=0;a<this.model.nodes.length;++a)this.model.nodes[a].x=this.model.nodes[a].x*r+o;this.model.mappingRange[0]=i[0],this.model.mappingRange[1]=i[1],this.modified()}},_0x5a9a06.prototype.adjustRange=function(e){var t=this.getRange(),i=[];t[0]<e[0]?(this.getColor(e[0],i),this.addRGBPoint(e[0],i[0],i[1],i[2])):(this.getColor(t[0],i),this.addRGBPoint(e[0],i[0],i[1],i[2])),t[1]>e[1]?(this.getColor(e[1],i),this.addRGBPoint(e[1],i[0],i[1],i[2])):(this.getColor(t[1],i),this.addRGBPoint(e[1],i[0],i[1],i[2])),this.sortAndUpdateRange();for(var n=0;n<this.model.nodes.length;)this.model.nodes[n].x>=e[0]&&this.model.nodes[n].x<=e[1]?this.model.nodes.splice(n,1):++n;return 1},_0x5a9a06.prototype.estimateMinNumberOfSamples=function(e,t){var i=this.findMinimumXDistance();return Math.ceil((t-e)/i)},_0x5a9a06.prototype.findMinimumXDistance=function(){if(this.model.nodes.length<2)return-1;for(var e=Number.MAX_VALUE,t=0;t<this.model.nodes.length-1;t++){var i=this.model.nodes[t+1].x-this.model.nodes[t].x;i<e&&(e=i)}return e},_0x5a9a06.prototype.mapScalarsThroughTable=function(e,t,i,n){0!==this.getSize()&&(this.model.indexedLookup?this.mapDataIndexed(e,t,i,n):this.mapData(e,t,i,n))},_0x5a9a06.prototype.mapData=function(e,t,i,n){if(0!==this.getSize()){var r=Math.floor(255*this.getAlpha()+.5),o=e.getNumberOfTuples(),a=e.getNumberOfComponents(),s=t.getData(),l=e.getData(),u=[];if(i===ScalarMappingTarget.RGBA)for(var c=0;c<o;c++){var h=l[c*a+n];this.getColor(h,u),s[4*c]=Math.floor(255*u[0]+.5),s[4*c+1]=Math.floor(255*u[1]+.5),s[4*c+2]=Math.floor(255*u[2]+.5),s[4*c+3]=r}if(i===ScalarMappingTarget.RGB)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[3*c]=Math.floor(255*u[0]+.5),s[3*c+1]=Math.floor(255*u[1]+.5),s[3*c+2]=Math.floor(255*u[2]+.5)}if(i===ScalarMappingTarget.LUMINANCE)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[c]=Math.floor(76.5*u[0]+150.45*u[1]+28.05*u[2]+.5)}if(i===ScalarMappingTarget.LUMINANCE_ALPHA)for(c=0;c<o;c++){h=l[c*a+n];this.getColor(h,u),s[2*c]=Math.floor(76.5*u[0]+150.45*u[1]+28.05*u[2]+.5),s[2*c+1]=r}}},_0x5a9a06.prototype.applyColorMap=function(e){if(e.ColorSpace&&(this.model.colorSpace=_0x20c75a[e.ColorSpace.toUpperCase()],void 0===this.model.colorSpace&&(this.model.colorSpace=_0x20c75a.RGB)),e.NanColor)for(this.model.nanColor=[].concat(e.NanColor);this.model.nanColor.length<4;)this.model.nanColor.push(1);if(e.RGBPoints){var t=e.RGBPoints.length;this.model.nodes=[];for(var i=0;i<t;i+=4)this.model.nodes.push({x:e.RGBPoints[i],r:e.RGBPoints[i+1],g:e.RGBPoints[i+2],b:e.RGBPoints[i+3],midpoint:.5,sharpness:0})}this.sortAndUpdateRange()},_0x5a9a06.prototype.modified=function(){},Object.defineProperties(g$e.prototype,{visible:{get:function(){return this._visible},set:function(e){this._visible=e}},type:{get:function(){return this._type}},layerBounds:{get:function(){return this._layerBounds},set:function(e){this._layerBounds=e}},zBounds:{get:function(){return this._zBounds},set:function(e){this._zBounds=e}},name:{get:function(){return this._name}},NetCDFInfo:{get:function(){return this._NetCDFInfo}},maxFiltration:{get:function(){return this._maxFiltration},set:function(e){this._maxFiltration=e}},minFiltration:{get:function(){return this._minFiltration},set:function(e){this._minFiltration=e}},duration:{get:function(){return this._duration},set:function(e){o$1q.typeOf.number.greaterThan("duration",e,0),o$1q.typeOf.number.greaterThan("this._time",this._time,0),this._duration=e,this._period=1e3*this._duration/this._time}},opaqueRate:{get:function(){return this._transparency},set:function(e){this._transparency!==e&&(this._transparency=e)}},filterMode:{get:function(){return this._filterMode},set:function(e){this._filterMode!==e&&(this._filterMode=e)}},maxValue:{get:function(){return this._voxelGridTile.maxValue}},minValue:{get:function(){return this._voxelGridTile.minValue}},visibleBoundingBox:{get:function(){return this._voxelGridTile.visibleBoundingBox},set:function(e){this._voxelGridTile.visibleBoundingBox=e}},scale:{get:function(){return this._scale},set:function(e){o$1p.equals(e,this._scale)||(this._scale=o$1p.clone(e,this._scale),this._scaleDirty=!0)}},volumeRenderMode:{get:function(){return this._volumeRenderMode},set:function(e){this._volumeRenderMode=e}},sliceCoordinate:{get:function(){return this._sliceCoordinate},set:function(e){this._sliceCoordinate=e,this._sliceCoordDirty=!0}},frameIndex:{get:function(){return this._frameIndex},set:function(e){"number"!=typeof e||isNaN(e)||(this._frameIndex=e)}},colorTable:{get:function(){return this._dictColorTable},set:function(e){if(!e$2e(e))return e$2e(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),void(this._hasColorTable=0);this._dictColorTable=i$T.clone(e,this._dictColorTable),this._dictColorTable.count()<1?this._hasColorTable=0:(this._dictColorTable.generateBuffer(),e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:this._context,width:1024,height:64,pixelFormat:V$12.RGBA,flipY:!1})),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._dictColorTable._imageBuffer}),this._hasColorTable=1)}},colorTransferFunction:{get:function(){return this._colorTransferFunction},set:function(e){if(e$2e(e)){this._colorTransferFunction=_0x5a9a06.clone(e,this._colorTransferFunction);for(var t=1024,i=new Uint8Array(6144),n=new Float32Array(3*t),r=0;r<1;++r){var o=e.getRange();e.getTable(o[0],o[1],t,n,1);for(var a=0;a<3*t;++a)i[r*t*6+a]=255*n[a],i[r*t*6+a+3*t]=255*n[a]}e$2e(this._colorTexture)||(this._colorTexture=new t$U({context:this._context,width:t,height:2,pixelFormat:V$12.RGBA,pixelDatatype:_$_.UNSIGNED_BYTE,flipY:!1}));var s=new Uint8Array(8192);for(a=0;a<2048;a++)s[4*a]=i[3*a],s[4*a+1]=i[3*a+1],s[4*a+2]=i[3*a+2],s[4*a+3]=255;this._colorTexture.copyFrom({width:t,height:2,arrayBufferView:s})}else e$2e(this._colorTransferFunction)&&(this._colorTransferFunction.destroy(),this._colorTransferFunction=null)}},opacityTransferFunction:{get:function(){return this._opacityTransferFunction},set:function(e){if(e$2e(e)){this._opacityTransferFunction=_0x4d473e.clone(e,this._opacityTransferFunction);for(var t=1024,i=new Float32Array(2048),n=new Float32Array(t),r=0;r<1;++r){var o=e.getRange();e.getTable(o[0],o[1],t,n,1);for(var a=0;a<t;++a)i[r*t*2+a]=1-(1-n[a]),i[r*t*2+a+t]=i[r*t*2+a]}e$2e(this._opacityTexture)||(this._opacityTexture=new t$U({context:this._context,width:t,height:2,pixelFormat:this._context.webgl2||this._context.webgpu?V$12.RED:V$12.LUMINANCE,pixelDatatype:_$_.FLOAT,flipY:!1})),this._opacityTexture.copyFrom({width:t,height:2,arrayBufferView:i})}else e$2e(this._opacityTransferFunction)&&(this._opacityTransferFunction.destroy(),this._opacityTransferFunction=null)}},useGradientOpacity:{get:function(){return this._useGradientOpacity},set:function(e){e$2e(this._voxelGridTile)&&e!=this._useGradientOpacity&&this._voxelGridTile._useGradientOpacityChanged(e),this._useGradientOpacity=e}},gradientOpacityMinOpacity:{get:function(){return this._gradientOpacityMinOpacity},set:function(e){this._gradientOpacityMinOpacity=e}},gradientOpacityMaxOpacity:{get:function(){return this._gradientOpacityMaxOpacity},set:function(e){this._gradientOpacityMaxOpacity=e}},gradientOpacityMinValue:{get:function(){return this._gradientOpacityMinValue},set:function(e){this._gradientOpacityMinValue=e}},gradientOpacityMaxValue:{get:function(){return this._gradientOpacityMaxValue},set:function(e){this._gradientOpacityMaxValue=e}},contourValue:{get:function(){return this._contourValue},set:function(e){e!==this._contourValue&&(this._contourValue=Math.min(e,this.maxValue),this._contourValue=Math.max(e,this.minValue),this._contourValueDirty=!0)}},enableLighting:{get:function(){return this._enableLighting},set:function(e){e!==this._enableLighting&&(this._enableLighting=e,this._voxelGridTile._enableLightingChange(e))}},material:{get:function(){return this._material}},outlineColor:{get:function(){return this._outlineColor},set:function(e){this._outlineColor=e}},fillStyle:{get:function(){return this._fillStyle},set:function(e){this._fillStyle=e}},sampleDistance:{set:function(e){this._sampleDistance!==e&&(this._sampleDistance=e)}}}),g$e.prototype.update=function(e,t){if(this._frameState=t,this._visible&&this._startRender){this._timeIndexChange=!1;var i=performance.now(),n=i-this._prevTime;this._timeRatio=n/this._period,n>this._period&&(this._prevTime=i,this._timeRatio=0,this._timeIndexChange=!0),e$2e(this._voxelGridTile)&&(this._voxelGridTile instanceof o$b&&this.updateMultiResolution(e,t),this._voxelGridTile.update(this,t))}},g$e.prototype.setIsMultiResolution=function(e){e$2e(this._voxelGridTile)||(e?(this._voxelGridTile=new o$b(this._context,this),this._voxelGridTile._isRootTile=!0):this._voxelGridTile=new _$9(this._context,this))};var Vt$2=new i$W("loadVol");g$e.prototype.updateMultiResolution=function(e,t){var i=t.camera,n=t.cullingVolume,r=e._gl,o=t.requests,a=this;if(this._voxelGridTile._isVisible=n.computeVisibility(this._voxelGridTile._orientedBoundingBox)!==Ae$w.OUTSIDE,this._voxelGridTile._isVisible){if(!this._voxelGridTile._initialized)return void o.push({entity:this._voxelGridTile,priority:0,owner:this});this._voxelGridTile.calcPixFromCam(i,r,1),this._updateQueue=[[this._voxelGridTile]];for(var s,l,u,c,h,d,f=[this._voxelGridTile],p=1;p<this._levels;p++){for(var _={},m=0;m<f.length;m++){if(!(b=f[m])._isLessLodDis){if(u=this._availableNode[p].resolution.x,c=this._availableNode[p].resolution.y,e$2e(b._southwestChild))_[JSON.stringify([b._southwestChild._x,b._southwestChild._y,b._southwestChild._level])]=b._southwestChild;else if(h=2*b._x,d=2*b._y+1,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._southwestChild=new o$b(this._context,this),b._southwestChild._mode=t.mode,b._southwestChild._level=b._level+1,b._southwestChild._x=h,b._southwestChild._y=d,b._southwestChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;var g=this._layerBounds.north-d*c*this._cellHeight;b._southwestChild._dataBounds=new h$18(b._dataBounds.west,g-l,b._dataBounds.west+s,g),b._southwestChild._computePosition(),b._southwestChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._southwestChild._x,b._southwestChild._y,b._southwestChild._level])]=b._southwestChild}if(e$2e(b._southeastChild))_[JSON.stringify([b._southeastChild._x,b._southeastChild._y,b._southeastChild._level])]=b._southeastChild;else if(h=2*b._x+1,d=2*b._y+1,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._southeastChild=new o$b(this._context,this),b._southeastChild._mode=t.mode,b._southeastChild._level=b._level+1,b._southeastChild._x=h,b._southeastChild._y=d,b._southeastChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;g=this._layerBounds.north-d*c*this._cellHeight;var x=this._layerBounds.west+h*u*this._cellWidth;b._southeastChild._dataBounds=new h$18(x,g-l,x+s,g),b._southeastChild._computePosition(),b._southeastChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._southeastChild._x,b._southeastChild._y,b._southeastChild._level])]=b._southeastChild}if(e$2e(b._northwestChild)?_[JSON.stringify([b._northwestChild._x,b._northwestChild._y,b._northwestChild._level])]=b._northwestChild:(h=2*b._x,d=2*b._y,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow&&(b._northwestChild=new o$b(this._context,this),b._northwestChild._mode=t.mode,b._northwestChild._level=b._level+1,b._northwestChild._x=h,b._northwestChild._y=d,b._northwestChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c,b._northwestChild._dataBounds=new h$18(b._dataBounds.west,b._dataBounds.north-l,b._dataBounds.west+s,b._dataBounds.north),b._northwestChild._computePosition(),b._northwestChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._northwestChild._x,b._northwestChild._y,b._northwestChild._level])]=b._northwestChild)),e$2e(b._northeastChild))_[JSON.stringify([b._northeastChild._x,b._northeastChild._y,b._northeastChild._level])]=b._northeastChild;else if(h=2*b._x+1,d=2*b._y,h<this._availableNode[p].EndCol&&d<this._availableNode[p].EndRow){b._northeastChild=new o$b(this._context,this),b._northeastChild._mode=t.mode,b._northeastChild._level=b._level+1,b._northeastChild._x=h,b._northeastChild._y=d,b._northeastChild._zBounds=b._zBounds,s=h==this._availableNode[p].EndCol-1?(this._availableNode[p].Width-h*this._cellWidth)*u:this._cellWidth*u,l=d==this._availableNode[p].EndRow-1?(this._availableNode[p].Height-d*this._cellHeight)*c:this._cellHeight*c;x=this._layerBounds.west+h*u*this._cellWidth;b._northeastChild._dataBounds=new h$18(x,b._dataBounds.north-l,x+s,b._dataBounds.north),b._northeastChild._computePosition(),b._northeastChild._rootTile=this._voxelGridTile,_[JSON.stringify([b._northeastChild._x,b._northeastChild._y,b._northeastChild._level])]=b._northeastChild}}}f=[];var y=0,v=void 0;for(var $ in _){var b;(b=_[$])._isVisible=n.computeVisibility(b._orientedBoundingBox)!==Ae$w.OUTSIDE,b._isVisible&&(b.calcPixFromCam(i,r,1),b._pix>y&&(y=b._pix,v=b))}if(y=0,e$2e(v)){var T=_[JSON.stringify([v._x-1,v._y,v._level])],C=_[JSON.stringify([v._x+1,v._y,v._level])],S=_[JSON.stringify([v._x,v._y-1,v._level])],w=_[JSON.stringify([v._x,v._y+1,v._level])],E=_[JSON.stringify([v._x+1,v._y-1,v._level])];e$2e(E)&&E._isVisible&&e$2e(C)&&e$2e(S)&&C._isVisible&&S._isVisible&&(y=E._pix+C._pix+S._pix,f=[S,E,v,C]);var P=_[JSON.stringify([v._x+1,v._y+1,v._level])];if(e$2e(P)&&P._isVisible&&e$2e(C)&&e$2e(w)&&C._isVisible&&w._isVisible)(L=P._pix+C._pix+w._pix)>y&&(y=L,f=[v,C,w,P]);var A=_[JSON.stringify([v._x-1,v._y+1,v._level])];if(e$2e(A)&&A._isVisible&&e$2e(T)&&e$2e(w)&&T._isVisible&&w._isVisible)(L=A._pix+T._pix+w._pix)>y&&(y=L,f=[T,v,A,w]);var L,M=_[JSON.stringify([v._x-1,v._y-1,v._level])];if(e$2e(M)&&M._isVisible&&e$2e(T)&&e$2e(S)&&T._isVisible&&S._isVisible)(L=M._pix+T._pix+S._pix)>y&&(y=L,f=[M,S,T,v]);0==f.length&&(e$2e(T)&&T._isVisible&&(y=T._pix,f=[T,v]),e$2e(C)&&C._isVisible&&C._pix>y&&(y=C._pix,f=[v,C]),e$2e(S)&&S._isVisible&&S._pix>y&&(y=S._pix,f=[S,v]),e$2e(w)&&w._isVisible&&w._pix>y&&(y=w._pix,f=[v,w]),0==f.length&&(f=[v]))}if(!(f.length>0))break;this._updateQueue.push(f);for(m=0;m<f.length;m++)f[m]._s3mLoadState===N$Q.UNLOAD&&o.push({entity:f[m],priority:0,owner:this})}if(this._textureLevelLoaded){this._multiTextures.length>this._updateQueue.length-1&&(this._multiTextures.length=this._updateQueue.length-1);var R=void 0,O=void 0,D=void 0;for(p=1;p<this._updateQueue.length;p++){var I=this._updateQueue[p],B=I.length;if(0===B)break;var F=!0;for(m=0;m<I.length;m++)if(I[m]._s3mLoadState!=N$Q.LOADED&&I[m]._s3mLoadState!=N$Q.TRANSFORMED){F=!1;break}if(!F)break;if(this._multiTextures.length<p){var N;R={textureLevel:N={}},O=I,D=this._multiTextures.length;break}if(D=p-1,!e$2e(N=this._multiTextures[D])||I[0]._x<N.startCol||I[0]._y<N.startRow||I[B-1]._x>N.endCol||I[B-1]._y>N.endRow){R={textureLevel:{}},O=I;break}}if(e$2e(R)){R._cellWidth=this._cellWidth,R._cellHeight=this._cellHeight,R._cellDepth=this._cellDepth,R._availableNode=this._availableNode[O[0]._level],R._time=this._time,R._layerBounds=this._layerBounds,R._minFiltration=this._floor,R._maxFiltration=this._ceil;var G=[];for(p=0;p<O.length;p++){var z={_x:O[p]._x,_y:O[p]._y,_level:O[p]._level,_dataBounds:O[p]._dataBounds,_s3mLoadState:O[p]._s3mLoadState,_arrayBuffer:O[p]._arrayBuffer};G.push(z)}R.arrayWork=G;var U=Vt$2.scheduleTask(R);if(!e$2e(U))return;this._textureLevelLoaded=!1;a=this;o$1l(U,(function(e){var t;if(D<a._multiTextures.length){if(e$2e(!(t=a._multiTextures[D])._volTextures))t._volTextures=[];else{for(var i=t._volTextures.length,n=0;n<i;n++)t._volTextures[n].destroy();t._volTextures=[]}t.bounds=e.textureLevel.bounds,t.cellDepth=e.textureLevel.cellDepth,t.cellHeight=e.textureLevel.cellHeight,t.cellWidth=e.textureLevel.cellWidth,t.endCol=e.textureLevel.endCol,t.endRow=e.textureLevel.endRow,t.multiResolutionTranslation=e.textureLevel.multiResolutionTranslation,t.startCol=e.textureLevel.startCol,t.startRow=e.textureLevel.startRow,t.validHeight=e.textureLevel.validHeight,t.validWidth=e.textureLevel.validWidth,t.xSpan=e.textureLevel.xSpan,t._nBlockLength=e.textureLevel._nBlockLength,t._nLength=e.textureLevel._nLength,t._nSideBlockCount=e.textureLevel._nSideBlockCount}else e$2e(!(t=e.textureLevel)._volTextures)&&(t._volTextures=[]),a._multiTextures.push(t);t.multiResolutionPara=new p$1d(t.multiResolutionTranslation.x,0,t.validWidth,t._nLength,t.multiResolutionTranslation.y,0,t.validHeight,0,t.multiResolutionTranslation.z,0,t._nSideBlockCount,0,t.multiResolutionTranslation.w,0,t._nBlockLength,0);var r=tt$i.LINEAR,o=rt$k.LINEAR;a._filterMode===k$S.FilterMode.NEAREST&&(r=tt$i.NEAREST,o=rt$k.NEAREST);for(i=e.imageDatas.length,n=0;n<i;n++){var s=new t$U({context:a._context,width:t._nLength,height:t._nLength,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:r,magnificationFilter:o})});s.copyFrom({width:t._nLength,height:t._nLength,arrayBufferView:e.imageDatas[n]}),t._volTextures.push(s)}a._textureLevelLoaded=!0;for(n=0;n<e.unzipTile.length;n++){var l=e.unzipTile[n].index,u=e.unzipTile[n].buffer;O[l]._arrayBuffer=u,O[l]._s3mLoadState=N$Q.TRANSFORMED}for(n=0;n<O.length;n++)O[n]._s3mLoadState=N$Q.TRANSFORMED}))}}var V=[];for(p=0;p<this._multiTextures.length;p++)V.push(this._multiTextures[p]);p=0;for(V.length>3&&(p=V.length-3),this._voxelGridTile._multiTextures=[];p<V.length;p++)this._voxelGridTile._multiTextures.push(V[p])}},g$e.prototype.loadEntity=function(e){e.load(this)},g$e.prototype.addClipPlane=function(e){this._clipPlanes.length>=6?console.log("at most 6 clipping planes can be specified"):(this._clipPlanes.push(e),e$2e(this._voxelGridTile)&&this._voxelGridTile._clipPlaneChanged(this))},g$e.prototype.removeAllClipPlanes=function(){var e=this._clipPlanes.length;this._clipPlanes.length=0,e$2e(this._voxelGridTile)&&e>0&&this._voxelGridTile._clipPlaneChanged(this)},g$e.prototype.removeClipPlane=function(e){e<0||e>=6||(this._clipPlanes.splice(e,1),e$2e(this._voxelGridTile)&&this._voxelGridTile._clipPlaneChanged(this))},g$e.prototype.getNumberOfClipPlanes=function(){return this._clipPlanes.length},g$e.prototype.startRender=function(e){if(this._startRender=!0,e$2e(this._voxelGridTile)){var t;if(this._voxelGridTile._setDataBounds(this._layerBounds),this._voxelGridTile._setZBounds(this._zBounds),e$2e(this._NetCDFBuffer))t=this._voxelGridTile._loadData(this._NetCDFBuffer,e),this._minFiltration==Number.MIN_VALUE&&(this._minFiltration=this._voxelGridTile._floor),this._maxFiltration==Number.MAX_VALUE&&(this._maxFiltration=this._voxelGridTile._ceil);else if(e$2e(this._volumeBuffer)){var i=this._cellWidth,n=this._cellHeight,r=this._availableNode[this._voxelGridTile._level];r.EndCol-1==this._voxelGridTile._x&&(i=r.Width-this._voxelGridTile._x*i),r.EndRow-1==this._voxelGridTile._y&&(n=r.Height-this._voxelGridTile._y*n),t=this._voxelGridTile._loadVolume(this._volumeBuffer,{maxValue:this._ceil,minValue:this._floor,time:this._time,xDimSize:this._cellWidth,yDimSize:this._cellHeight,zDimSize:this._cellDepth,xValidSize:i,yValidSize:n,zValidSize:this._cellDepth})}this._voxelGridTile._initialize(this,this._frameState,t)}},g$e.prototype.render=function(e,t){},g$e.prototype.releaseSelection=function(e,t){},g$e.prototype.isDestroyed=function(){return!1},g$e.prototype.destroy=function(){return e$2e(this._dictColorTable)&&(this._dictColorTable.destroy(),this._dictColorTable=null),e$2e(this._hypsometricTexture)&&(this._hypsometricTexture.destroy(),this._hypsometricTexture=null),e$2e(this._voxelGridTile)&&(this._voxelGridTile.destroy(),this._voxelGridTile=void 0),this._NetCDFInfo=void 0,this._NetCDFData=void 0,this._NetCDFBuffer=void 0,i$11(this)};var R$6="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\nuniform sampler2D u_opaque;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 opaque = texture2D(u_opaque, v_textureCoordinates);\nvec4 accum = texture2D(u_accumulation, v_textureCoordinates);\nfloat r = texture2D(u_revealage, v_textureCoordinates).r;\nvec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\ngl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\n}\n";function a$5(e){this._framebuffer=void 0,this._outputFramebuffer=void 0,this._accumulationTexture=void 0,this._revealageTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._passType=Le$q.OPAQUE,this._screenWidth=0,this._screenHeight=0,this._renderStateCache={},this.billboardQuality=.5,this.enable=!1}Object.defineProperties(a$5.prototype,{});var B$5={enabled:!0,color:new e$1X(0,0,0,0),equationRgb:b$17.ADD,equationAlpha:b$17.ADD,functionSourceRgb:l$13.ONE,functionDestinationRgb:l$13.ONE,functionSourceAlpha:l$13.ZERO,functionDestinationAlpha:l$13.ONE_MINUS_SOURCE_ALPHA},o$a=new f$1a;function E$7(e,t){var i=e[t.id];if(!e$2e(i)||i.viewport.width!=o$a.width||i.viewport.height!=o$a.height){var n=d$1m.getState(t);n.depthMask=!1,n.blending=B$5,n.viewport=o$a,i=d$1m.fromCache(n),e[t.id]=i}return i}function T$a(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy(),e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy(),e._outputFramebuffer=e._outputFramebuffer&&!e._outputFramebuffer.isDestroyed()&&e._outputFramebuffer.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}function O$6(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._hdr?t.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT:_$_.UNSIGNED_BYTE;e._outputFramebuffer=new t$V({context:t,colorTextures:[new t$U({context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:V$12.RGBA,pixelDatatype:r})],destroyAttachments:!0}),e._accumulationTexture=new t$U({context:t,width:i,height:n,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT});var o=new Float32Array(i*n*4);e._revealageTexture=new t$U({context:t,pixelFormat:V$12.RGBA,pixelDatatype:_$_.FLOAT,source:{arrayBufferView:o,width:i,height:n},flipY:!1}),e._framebuffer=new t$V({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1})}function H$7(e,t){var i=new s$V({sources:[R$6]}),n={u_accumulation:function(){return e._accumulationTexture},u_revealage:function(){return e._revealageTexture},u_opaque:function(){return e._opaqueTexture}},r=d$1m.fromCache({});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:n,renderState:r,pass:e._passType,owner:e}),e._clearCommand=new t$W({framebuffer:e._framebuffer,color:new e$1X(0,0,0,1),depth:1,renderState:d$1m.fromCache(),pass:e._passType,owner:e})}function M$6(e,t){var i=e._screenWidth,n=e._screenHeight,r=e._accumulationTexture,o=!1,a=e$2e(r)&&(r.width!==i||r.height!==n);return(!e$2e(r)||a)&&(T$a(e),O$6(e,t),H$7(e,t),o=!0),o}function w$5(e){return e.drawBuffers&&e.fragmentDepth}function _$8(e){if(!e$2e(e.provider))throw new t$15("options.provder and options.viewer is required.");this._provider=e.provider,this._inner=e.layer,this._imagelayerCollection=e.imagelayerCollection,this._name=e.name,this._billboardCollection=new w$O({ignoreShow:!0,scene:e.scene}),this._imageIconBillboard={},this._textBillboard={},this._imageCanvas={},this.kmlLayer=new U$n({camera:e.scene.camera,canvas:e.scene.canvas}),this.kmlLayer.clustering.enabled=!0,this.kmlLayer.clustering.pixelRange=10,e$2e(e.viewer)&&e.viewer.dataSources.add(this.kmlLayer),this.kmlLayer.clustering.clusterEvent.addEventListener((function(e,t){if(e.length>0&&e[0].billboard){var i=e[0].billboard;t.billboard.position=e[0].position.getValue(0),t.billboard.image=i.image.getValue(),t.billboard.scale=i.scale.getValue(),t.billboard.heightReference=i.heightReference.getValue(),t.billboard.scaleByDistance=i.scaleByDistance.getValue(),t.billboard.pixelOffset=i.pixelOffset.getValue()}if(e.length>0&&e[0].label){var n=e[0].label;t.label.position=e[0].position.getValue(0),t.label.text=n.text.getValue(),t.label.font=n.font.getValue(),t.label.verticalOrigin=n.verticalOrigin.getValue(),t.label.horizontalOrigin=n.horizontalOrigin.getValue(),t.label.heightReference=n.heightReference.getValue(),t.label.pixelOffset=n.pixelOffset.getValue(),t.label.scaleByDistance=n.scaleByDistance.getValue(),e$2e(n.style)&&(t.label.style=n.style.getValue()),t.label.fillColor=n.fillColor.getValue()}}))}function E$6(e,t){return t.level-e.level}a$5.isSupported=w$5,a$5.prototype.getOutputFramebuffer=function(){return this._outputFramebuffer},a$5.prototype.update=function(e,t,i){if(w$5(e.context)&&this.enable){var n=e.context;this._screenWidth=Math.floor(n.drawingBufferWidth*this.billboardQuality),this._screenHeight=Math.floor(n.drawingBufferHeight*this.billboardQuality),o$a.width=this._screenWidth,o$a.height=this._screenHeight,this._opaqueTexture=t.getColorTexture(0),this._hdr=i,M$6(this,n)}},a$5.prototype.execute=function(e,t){!e$2e(this._drawCommand)||!this.enable||this._drawCommand.execute(e,t)},a$5.prototype.clear=function(e,t){!e$2e(this._clearCommand)||!this.enable||this._clearCommand.execute(e,t)},a$5.prototype.createDerivedCommands=function(e){!e$2e(e)||(this.enable=!0,e.framebuffer=this._framebuffer,e.renderState=E$7(this._renderStateCache,e.renderState))},a$5.prototype.isDestroyed=function(){return!1},a$5.prototype.destroy=function(){return T$a(this),i$11(this)},Object.defineProperties(_$8.prototype,{tileWidth:{get:function(){return this._provider._tileWidth}},tileHeight:{get:function(){return this._provider._tileHeight}},maximumLevel:{get:function(){return this._provider._ready?this._provider._maximumLevel:-1}},minimumLevel:{get:function(){return this._provider._ready?this._provider._minimumLevel:-1}},tilingScheme:{get:function(){return this._provider._tilingScheme}},rectangle:{get:function(){return this._provider._ready?this._provider._rectangle:null}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._provider._errorEvent}},ready:{get:function(){return this._provider._ready}},readyPromise:{get:function(){return this._provider.readyPromise}},hasAlphaChannel:{get:function(){return!0}},show:{get:function(){return this._inner.show},set:function(e){this._inner.show=e}},mapboxStyle:{get:function(){return this._provider.mapboxStyle},set:function(e){this._provider.mapboxStyle=e}},alpha:{get:function(){return this._inner.alpha},set:function(e){this._inner.alpha=e}},selectColor:{get:function(){return this._inner._selectColor},set:function(e){this._inner._selectColor=e}},name:{get:function(){return this._name},set:function(e){this._name=e}},pausing:{get:function(){return this._inner._pausing},set:function(e){this._inner._pausing=e,this._provider._pausing=e}},indexedDBSetting:{get:function(){return this._provider._indexedDBSetting},set:function(e){e$2e(e)&&"boolean"==typeof e.isOpen&&(this._provider._indexedDBSetting.isOpen=e.isOpen)}}});var b$a=new o$1o,T$9=new o$1p,d$c=new o$Y;function D$4(e){return Array.isArray(e)?"rgb("+e[0]+","+e[1]+","+e[2]+")":""}function y$8(e,t,i,n){var r=t.getGeometry().getFlatCoordinates(),o=r[0],a=r[1],s=i[0]*o+i[2]*a+i[4],l=i[1]*o+i[3]*a+i[5],u=s/e._canvasWidth,c=l/e._canvasWidth,h=n.west+n.width*u,d=n.south+n.height*(1-c);return o$1p.fromRadians(h,d,0,t$12.WGS84,T$9),T$9}function G$7(e){var t=e.getId();return t-=16777216*Math.floor(t/16777216)}_$8.prototype.createIconImageBillboard=function(e){if(e$2e(e.iconImageObjects))for(var t=e.rectangle,i=e.transform,n=0,r=e.iconImageObjects.length;n<r;n++){var o=e.iconImageObjects[n],a=o.feature,s=a.index;if(e$2e(this._imageIconBillboard[s])){var l=this._imageIconBillboard[s];e.level>l.level&&(l.position=y$8(this._provider,a,i,t),l.level=e.level)}else{var u,c=o.style.layout;if(e$2e(c)&&e$2e(c["icon-image"])){var h=c["icon-image"],d=u$Z(c["icon-size"],1);if(e$2e(this._imageCanvas[h]))u=this._imageCanvas[h];else{var f=this._provider._subSpriteImage[h];if(!e$2e(f))continue;(u=document.createElement("canvas")).width=f.width,u.height=f.height,u.getContext("2d").putImageData(f,0,0),this._imageCanvas[h]=u}}b$a.x=0,b$a.y=-u.height/2,d$c.near=1500,d$c.nearValue=1.5,d$c.far=8e6,d$c.farValue=0;var p=this._billboardCollection.add({image:u,scale:d,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:k$R.CLAMP_TO_GROUND,pixelOffset:b$a,scaleByDistance:d$c,id:G$7(a)});p.position=y$8(this._provider,a,i,t),p.level=e.level,this._imageIconBillboard[s]=p}}},_$8.prototype.createTextBillboard=function(e){if(e$2e(e.textObjects))for(var t=e.rectangle,i=e.transform,n=0;n<e.textObjects.length;n++){var r=e.textObjects[n],o=r.feature,a=o.index;if(e$2e(this._textBillboard[a])){var s=this._textBillboard[a];e.level>s.level&&(s.position=y$8(this._provider,o,i,t),s.level=e.level)}else{var l=r.style,u=l.getText(),c=l.textSize,h=u.getText(),d=u.getFont(d),f=u.getTextAlign(),p=document.createElement("canvas"),_=p.getContext("2d"),m=c+"px "+d;_.font=m,_.textBaseline="top",_.textAlign=f;var g=_.measureText(h).width+2;p.width=g,p.height=c+1,_.font=m;var x=u.getFill(),y=u.getStroke();e$2e(y)&&(_.strokeStyle=D$4(y.getColor()),_.lineWidth=y.getWidth(),_.strokeText(h,0,c-3)),e$2e(x)&&(_.fillStyle=D$4(x.getColor()),_.fillText(h,0,c-3)),b$a.x=0,b$a.y=-p.height/2,d$c.near=1500,d$c.nearValue=2,d$c.far=1e6,d$c.farValue=0;var v=this._billboardCollection.add({image:p,imageId:h,disableDepthTestDistance:Number.POSITIVE_INFINITY,heightReference:k$R.CLAMP_TO_GROUND,pixelOffset:b$a,scaleByDistance:d$c,verticalOrigin:S$Q.TOP,horizontalOrigin:j$V.LEFT});v.position=y$8(this._provider,o,i,t),v.level=e.level,this._textBillboard[a]=v}}},_$8.prototype.update=function(e,t){if(e$2e(this._billboardCollection)){var i=this._inner._imageryCache,n=[];for(var r in i)n.push(i[r]);n.sort(E$6);for(var o=0;o<n.length;o++){var a=n[o];!a.isMvtTexture||a.isRendered||(a.isRendered=!0)}this._billboardCollection.update(t)}},_$8.prototype.getProperty=function(e){return this._provider.getProperty(e)},_$8.prototype.refresh=function(){e$2e(this._billboardCollection)&&this._billboardCollection.removeAll();var e=this._inner._imageryCache;for(var t in e)e[t].isRendered=!1;this._imageIconBillboard={},this._textBillboard={},this._imagelayerCollection.remove(this._inner),this._inner=this._imagelayerCollection.addImageryProvider(this._provider)},_$8.prototype.isDestroyed=function(){return!1},_$8.prototype.destroy=function(){return this._imagelayerCollection.remove(this._inner),e$2e(this._billboardCollection)&&(this._billboardCollection.destroy(),this._billboardCollection=null),i$11(this)};var e$3={NONE:0,ByKeyboard:1},Ct=Object.freeze(e$3);function r$d(e){if(!e$2e(e))throw new t$15("scene are required.");this._scene=e,this._context=e._context,this._s3mInstanceCollection=new _0xd633a7(e._context),this._s3mInstanceCollection._profile=!0,this._s3mInstanceCollection.minVisibleAltitude=-9e3,e.primitives.add(this._s3mInstanceCollection),this._textureAtlas=null,this._profileRenders=[],this._spatialQueryList=[],this._section=!0,this._name="solidModelsProfile"+this._scene._analyst3D._layerIndex,this._scene._analyst3D.add(this),this._modelInfo={},this._dataIndex=0,this._selectedProfileIDs=[],this._clippingType=R$L.KeepInside,this._visibleViewport=4095;var t=this,i=0;this._modelCount=0,this._modelPosition=[],this._addedEvent=new o$1h,this._s3mInstanceCollection.addedEvent.addEventListener((function(){++i===t._modelCount&&t._addedEvent.raiseEvent({modelPosition:t._modelPosition})})),this._volume=void 0}function K$4(e,t){var i=t._group;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=i[n];if(!e$2e(o)||0===o.renderEntities.length)continue;var a=o.renderEntities[0];r.texture=a._texture}}function H$6(e){this.pickColor=new o$1p,this.id=u$Z(e.id,0),e$2e(e.color)?this.color=e$1X.clone(e.color):this.color=e$1X.fromRandom({alpha:1}),this.textureAtlasID=-1,e$2e(e.textureMapParameter)?(this.textureTilingU=u$Z(e.textureMapParameter.UTiling,1),this.textureTilingV=u$Z(e.textureMapParameter.VTiling,1)):(this.textureTilingU=1,this.textureTilingV=1)}function S$3(e){return e===R$L.KeepOutside?j$Z.Disjoint:j$Z.Intersects}Object.defineProperties(r$d.prototype,{selectedModelIDs:{get:function(){return this._selectedProfileIDs}},clippingType:{get:function(){return this._clippingType},set:function(e){if(e!==this._clippingType){this._clippingType=e;for(var t=0;t<this._spatialQueryList.length;t++)this._spatialQueryList[t].positionMode=S$3(this._clippingType);for(t=0;t<this._profileRenders.length;t++)this._profileRenders[t]._clippingType=e}}},addedEvent:{get:function(){return this._addedEvent}},volume:{get:function(){return this._volume},set:function(e){this._volume=e,this._s3mInstanceCollection._volume=e}},mixColorType:{get:function(){return this._s3mInstanceCollection._mixColorType},set:function(e){this._s3mInstanceCollection._mixColorType!==e&&(this._s3mInstanceCollection._mixColorType=e)}}}),r$d.prototype.addProfileGeometry=function(e){if(e$2e(e)){var t=e;Array.isArray(e)&&(t=new h$8(e),e$2e(this._volume)&&(t._volBounds=this._volume._volBounds));var i=new f$a(this,this._profileRenders.length,this._modelInfo,t);i._clippingType=this._clippingType,e$2e(this._volume)&&(i._attributeLocations.aRatio=3,i._volume=this._volume),this._profileRenders.push(i)}},r$d.prototype.clearProfile=function(){this._profileRenders.map((function(e){e.destroy()})),this._profileRenders=[],this._s3mInstanceCollection._profile=!1,this._s3mInstanceCollection._spatialQueryEnable=!1,this._s3mInstanceCollection.clampToObject=!1},r$d.prototype.addProfilePlane=function(e){},r$d.prototype.addProfileCylinder=function(e){},r$d.prototype.setClipGeometry=function(e){if(e.geoType!==P$U.GEOREGION3D&&e.geoType!==P$U.GEOCYLINDER&&e.geoType!==P$U.GEOBOX&&e.geoType!==P$U.GEOMODEL3D&&!(e instanceof N$A))return!1;var t=new _0x16da97(this._scene);t.geometry=e,t.positionMode=S$3(this._clippingType),this._s3mInstanceCollection._profileMode=1,t._beQueryCollection=this._s3mInstanceCollection,this._s3mInstanceCollection._spatialQueryEnable=!0,t._profile=!0,0==this._spatialQueryList.length&&this._scene._renderPipeline.addEventListener(k$g.BeforeExecuteCommands,r$d.prototype._updateTextures,this),this._spatialQueryList.push(t)},r$d.prototype.addModels=function(e){var t=this;e.map((function(e){var i=new H$6(e),n={id:i.id,primitive:t};i.profilePickId=t._context.createPickId(n),t._modelInfo[e.model]=i,t.requestImage(e.model,e.texture),t.requestModel(e.model,e.color,e.id),t._modelCount++}))},r$d.prototype.requestImage=function(e,t){if(e$2e(t)){var i=this;e$2e(this._textureAtlas)||(this._textureAtlas=new v$I({context:this._scene._context})),this._textureAtlas.addImage(t,t).then((function(t){i._modelInfo[e].textureAtlasID=t}))}},r$d.prototype.requestModel=function(e,t,i){var n=u$Z(i,(o=this)._dataIndex);if(e$2e(e)){var r=e.replace(/\?returnContent=.*$/,"");if(".json"===(r=r.substring(r.length-5).toLowerCase()))if(e.indexOf("spatialAnalysis-")>-1){var o=this;p$$({url:e,responseType:"arraybuffer",method:"POST",data:JSON.stringify({sourceDatasetFilter:{attributeFilter:""},isLonlat:!0,returnStream:!0}),headers:{"Content-type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then((function(i){var r=new DataView(i),a=0,s=r.getInt32(a,!0);a+=4;var l=a$K(new Uint8Array(i,a,s)),u=JSON.parse(l);a+=s;var c=r.getInt32(a,!0);a+=4;var h,d,f=[];for(h=0;h<c;h++)d=r.getInt32(a,!0),f.push(d),a+=4;var p=[];for(h=0;h<c;h++){if(0===(d=f[h]))p.push(null);else{var _=new Uint8Array(i,a,d);p.push(new Uint8Array(_).buffer)}a+=d}var m=u.geometries[0],g={};g.id=n,g.position=m.position,o._modelPosition.push(g),o._s3mInstanceCollection.add(e,{position:o$1p.fromDegrees(m.position.x,m.position.y,m.position.z),color:t,id:n,scale:new o$1p(m.scaleX,m.scaleY,m.scaleZ)},p[0],!1);var x=o._s3mInstanceCollection.getInstance(e,n),y=o._modelInfo[e].pickColor;y.x=x._pickColor.x,y.y=x._pickColor.y,y.z=x._pickColor.z,o._dataIndex++}))}else u$P(e).then((function(i){if(null!=i.geometry){var r=new Uint8Array(i.geometry.model),a={};a.id=n,a.position=i.geometry.position,o._modelPosition.push(a),o._s3mInstanceCollection.add(e,{position:o$1p.fromDegrees(i.geometry.position.x,i.geometry.position.y,i.geometry.position.z),color:t,id:n,scale:new o$1p(i.geometry.scaleX,i.geometry.scaleY,i.geometry.scaleZ),hpr:i$16.fromDegrees(-i.geometry.rotationZ,i.geometry.rotationX,i.geometry.rotationY)},r.buffer);var s=o._s3mInstanceCollection.getInstance(e,n),l=o._modelInfo[e].pickColor;l.x=s._pickColor.x,l.y=s._pickColor.y,l.z=s._pickColor.z,o._dataIndex++}}));else o$10(e).then((function(i){var r=new DataView(i),a=0,s=r.getInt32(a,!0);a+=4;var l=a$K(new Uint8Array(i,a,s)),u=JSON.parse(l).geometry;if(null!=u){var c={};c.id=n,c.position=u.position,o._modelPosition.push(c),a+=s;var h=r.getInt32(a,!0);a+=4;var d,f,p=[];for(d=0;d<h;d++)f=r.getInt32(a,!0),p.push(f),a+=4;var _=[];for(d=0;d<h;d++){if(0===(f=p[d]))_.push(null);else{var m=new Uint8Array(i,a,f);_.push(new Uint8Array(m).buffer)}a+=f}o._s3mInstanceCollection.add(e,{position:o$1p.fromDegrees(u.position.x,u.position.y,u.position.z),color:t,id:n,scale:new o$1p(u.scaleX,u.scaleY,u.scaleZ),hpr:i$16.fromDegrees(-u.rotationZ,u.rotationX,u.rotationY)},_[0],!1);var g=o._s3mInstanceCollection.getInstance(e,n);o._modelInfo[e].color=g._color;var x=o._modelInfo[e].pickColor;x.x=g._pickColor.x,x.y=g._pickColor.y,x.z=g._pickColor.z,o._dataIndex++}}))}},r$d.prototype.build=function(){this._s3mInstanceCollection._profile=!0,this._s3mInstanceCollection.clampToObject=!0;for(var e=0;e<this._profileRenders.length;e++){this._profileRenders[e]._build()}},r$d.prototype.setSelected=function(e){this._selectedProfileIDs=[],this._selectedProfileIDs.push(e)},r$d.prototype.releaseSelection=function(){this._selectedProfileIDs=[]},r$d.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new t$15("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},r$d.prototype.getVisibleInViewport=function(e){if(e>8)throw new t$15("the index is 0~8");return 1<<e&this._visibleViewport},r$d.prototype.clear=function(){for(var e in e$2e(this._textureAtlas)&&(this._textureAtlas.destroy(),this._textureAtlas=null),this._profileRenders.map((function(e){e.destroy()})),this._profileRenders=[],this._s3mInstanceCollection._spatialQueryEnable=!1,this._spatialQueryList.map((function(e){e.destroy()})),this._spatialQueryList=[],this._scene._renderPipeline.removeEventListener(k$g.BeforeExecuteCommands,r$d.prototype._updateTextures,this),this._modelInfo)this._s3mInstanceCollection.removeCollection(e);this._s3mInstanceCollection.clampToObject=!1,this._modelInfo={},this._dataIndex=0},r$d.prototype.destroy=function(){return this.clear(),this._scene._analyst3D.remove(this._name,!0),this._scene.primitives.remove(this._s3mInstanceCollection),this._s3mInstanceCollection.destroy(),i$11(this)},r$d.prototype.update=function(e,t,i){this._spatialQueryList.map((function(n){n.update(e,t,i)}));var n=this._s3mInstanceCollection.clampToObject;K$4(this._modelInfo,this._s3mInstanceCollection),this._profileRenders.map((function(r){r.update(e,t,i,n)}))},r$d.prototype._updateTextures=function(){var e=this._scene._frameState,t=this;this._spatialQueryList.map((function(i){i._updateTextures(t._context,e)}))};var h$7=81;function G$6(){this.powers=new Array(h$7)}var _$7=[[.0014,0,.0065],[.0022,1e-4,.0105],[.0042,1e-4,.0201],[.0076,2e-4,.0362],[.0143,4e-4,.0679],[.0232,6e-4,.1102],[.0435,.0012,.2074],[.0776,.0022,.3713],[.1344,.004,.6456],[.2148,.0073,1.0391],[.2839,.0116,1.3856],[.3285,.0168,1.623],[.3483,.023,1.7471],[.3481,.0298,1.7826],[.3362,.038,1.7721],[.3187,.048,1.7441],[.2908,.06,1.6692],[.2511,.0739,1.5281],[.1954,.091,1.2876],[.1421,.1126,1.0419],[.0956,.139,.813],[.058,.1693,.6162],[.032,.208,.4652],[.0147,.2586,.3533],[.0049,.323,.272],[.0024,.4073,.2123],[.0093,.503,.1582],[.0291,.6082,.1117],[.0633,.71,.0782],[.1096,.7932,.0573],[.1655,.862,.0422],[.2257,.9149,.0298],[.2904,.954,.0203],[.3597,.9803,.0134],[.4334,.995,.0087],[.5121,1,.0057],[.5945,.995,.0039],[.6784,.9786,.0027],[.7621,.952,.0021],[.8425,.9154,.0018],[.9163,.87,.0017],[.9786,.8163,.0014],[1.0263,.757,.0011],[1.0567,.6949,.001],[1.0622,.631,8e-4],[1.0456,.5668,6e-4],[1.0026,.503,3e-4],[.9384,.4412,2e-4],[.8544,.381,2e-4],[.7514,.321,1e-4],[.6424,.265,0],[.5419,.217,0],[.4479,.175,0],[.3608,.1382,0],[.2835,.107,0],[.2187,.0816,0],[.1649,.061,0],[.1212,.0446,0],[.0874,.032,0],[.0636,.0232,0],[.0468,.017,0],[.0329,.0119,0],[.0227,.0082,0],[.0158,.0057,0],[.0114,.0041,0],[.0081,.0029,0],[.0058,.0021,0],[.0041,.0015,0],[.0029,.001,0],[.002,7e-4,0],[.0014,5e-4,0],[.001,4e-4,0],[7e-4,2e-4,0],[5e-4,2e-4,0],[3e-4,1e-4,0],[2e-4,1e-4,0],[2e-4,1e-4,0],[1e-4,0,0],[1e-4,0,0],[1e-4,0,0],[0,0,0]];G$6.prototype.toXYZ=function(){for(var e=new o$1p(0,0,0),t=1;t<h$7;t++){var i=t+0;i>h$7-1&&(i=h$7-1),i<1&&(i=1),e.x+=this.powers[i]*_$7[t][0],e.y+=this.powers[i]*_$7[t][1],e.z+=this.powers[i]*_$7[t][2]}return e};var t0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,.003,.004,.006,.007,.009,.011,.014,.017,.021,.025,.03,.035,.04,.044,.048,.055,.063,.071,.075,.08,.085,.091,.12,.12,.12,.12,.12,.12,.12,.119,.12,.12,.12,.1,.09,.09,.085,.08,.075,.07,.07,.065,.06,.055,.05,.045,.04,.035,.028,.25,.023,.02,.018,.016,.012,.012,.012,.012,.01,.01,.01,.008,.007,.006,.005,.003,0],L$8=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.15,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0],n$8=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.075,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.016,.015,.014,.013,.0125,1.8,2.3,2.5,2.3,1.8,.061,.003,8e-4,1e-4,1e-5,1e-5,1e-4,3e-4,6e-4];G$6.prototype.applyAtmosphericTransmittance=function(e,t,i,n,r,o){var a=.04608*i-.04586,s=e$2d.toDegrees(e);if(s<90){var l=1;l=1/(t+.50572*Math.pow(96.07995-s,-1.6364));l*=1;l*=Math.exp(-n/8435);for(var u=1.003454/Math.sqrt(t*t+.006908),c=Math.log(.35),h=c*(1.459+c*(.1595+.4129*c)),d=c*(.0783+c*(-.3824-.5874*c)),f=1-.5*Math.exp((h+d/1.8)/1.8),p=1-.5*Math.exp((h+d*t)*t),_=0;_<h$7;_++){var m,g=.38+.005*_,x=Math.exp(-l/(Math.pow(g,4)*(115.6406-1.3366/(g*g))));m=g<.5?1.0274:1.206;var y=a*Math.pow(2*g,-m),v=Math.exp(-y*l),$=2.5*n$8[_]*l,b=Math.exp(-.2385*$/Math.pow(1+20.07*$,.45)),T=Math.exp(.35*-t0[_]*u),C=Math.exp(-1.41*L$8[_]*l/Math.pow(1+118.3*L$8[_]*l,.45)),S=Math.log(g/.4),w=.945*Math.exp(-.095*S*S),E=Math.exp(-w*y*l),P=Math.exp((w-1)*y*l),A=Math.exp(-1.8/(g*g*g*g)*(115.6406-1.3366/(g*g))),L=Math.exp(-.4293*n$8[_]*2.5/Math.pow(1+36.126*n$8[_]*2.5,.45)),M=Math.exp(-2.538*L$8[_]/Math.pow(1+212.94*L$8[_],.45)),R=Math.exp(-w*y*1.8),O=Math.exp((w-1)*y*1.8),D=x*v*b*T*C;r.powers[_]=this.powers[_]*D;var I=this.powers[_]*T*b*C*t*P,B=1;g<=.45&&(B=Math.pow(g+.55,1.8));var F=L*M*O*(.5*(1-A)+(1-f)*A*(1-R)),N=I*(1-Math.pow(x,.95))/2,G=I*Math.pow(x,1.5)*(1-E)*p,z=.3*(r.powers[_]*t+N+G)*F/(1-.3*F);o.powers[_]=(N+G+z)*B,o.powers[_]<0&&(o.powers[_]=0)}}else for(_=0;_<h$7;_++)r.powers[_]=0,o.powers[_]=0};var a$4=[[.3,.305,.31,.315,.32,.325,.33,.335,.34,.345,.35,.36,.37,.38,.39,.4,.41,.42,.43,.44,.45,.46,.47,.48,.49,.5,.51,.52,.53,.54,.55,.57,.593,.61,.63,.656,.6676,.69,.71,.718,.7244,.74,.7525,.7575,.7625,.7675,.78,.8,.816,.8237,.8315,.84,.86,.88,.905,.915,.925,.93,.937,.948,.965,.98,.9935,1.04,1.07,1.1,1.12,1.13,1.145,1.161,1.17,1.2,1.24,1.27,1.29,1.32,1.35,1.395,1.4425,1.4625,1.477,1.497,1.52,1.539,1.558,1.578,1.592,1.61,1.63,1.646,1.678,1.74,1.8,1.86,1.92,1.96,1.985,2.005,2.035,2.065,2.1,2.148,2.198,2.27,2.36,2.45,2.5,2.6,2.7,2.8,2.9,3,3.1,3.2,3.3,3.4,3.5,3.6,3.7,3.8,3.9,4],[535.9,558.3,622,692.7,715.1,832.9,961.9,931.9,900.6,911.3,975.5,975.9,1119.9,1103.8,1033.8,1479.1,1701.3,1740.4,1587.2,1837,2005,2043,1987,2027,1896,1909,1927,1831,1891,1898,1892,1840,1768,1728,1658,1524,1531,1420,1399,1374,1373,1298,1269,1245,1223,1205,1183,1148,1091,1062,1038,1022,998.7,947.2,893.2,868.2,829.7,830.3,814,786.9,768.3,767,757.6,688.1,640.7,606.2,585.9,570.2,564.1,544.2,533.4,501.6,477.5,442.7,440,416.8,391.4,358.9,327.5,317.5,307.3,300.4,292.8,275.5,272.1,259.3,246.9,244,243.5,234.8,220.5,190.8,171.1,144.5,135.7,123,123.8,113,108.5,97.5,92.4,82.4,74.6,68.3,63.8,49.5,48.5,38.6,36.6,32,28.1,24.8,22.1,19.6,17.5,15.7,14.1,12.7,11.5,10.4,9.5,8.6]],i$9=81,p$4=5;function o$9(){G$6.call(this);for(var e=a$4[1].length,t=1,i=.38,n=0;n<i$9;n++){for(var r=i+.001*p$4;t<e-1&&a$4[0][t]<=r;)t++;this.powers[n]=a$4[1][t],i+=.001*p$4}}function a$3(){}function u$a(e){var t,i=Math.log(e);return t=i<=-3.94?-2.86:i>=-1.44?i-.395:Math.pow(.405*i+1.6,2.18)-2.86,Math.exp(t)}function n$7(e){var t,i=Math.log(e);return t=i<=-2.6?-.72:i>=1.9?i-1.255:Math.pow(.249*i+.65,2.7)-.72,Math.exp(t)}o$9.prototype=Object.create(G$6.prototype),o$9.prototype.constructor=G$6,a$3.Ldmax=100,a$3.LsavgC=100,a$3.LsavgR=100,a$3.k=1,a$3.mR=1,a$3.mC=1,a$3.disableToneMapping=!1,a$3.setSceneLogAvg=function(e,t){e<0&&(e=0),t<0&&(t=0),a$3.LsavgR=e/.8,a$3.LsavgC=t/.8,a$3.computeScaleFactors()},a$3.durandMapperXYZ=function(e){var t=a$3.k,i=a$3.mR,n=a$3.Ldmax,r=a$3.mC,o=-.702*e.x+1.039*e.y+.433*e.z;o<0&&(o=0);var a=new o$1p(.3*o,.3*o,.4*o),s=o$1p.multiplyByScalar(e,(1-t)*r,new o$1p),l=o$1p.multiplyByScalar(a,t*i,new o$1p),u=o$1p.add(s,l,new o$1p);e=o$1p.multiplyByScalar(u,1/n,e)},a$3.computeScaleFactors=function(){var e,t,i;a$3.Ldmax=100,e=a$3.Ldmax,t=a$3.LsavgR,i=a$3.LsavgC;var n=n$7(e);a$3.mR=n/u$a(t),a$3.mC=n/n$7(i);a$3.k=(100-.25*t)/(100+t),a$3.k<0&&(a$3.k=0)};var P$8=new p$1e(2.37067,-.90004,-.470634,-.513885,1.4253,.0885814,.00529818,-.0146949,1.0094);function l$a(){this._oneOverGammaHosek=1/2.4,this._T=3,this._lastSunT=0,this._lastSunZenith=0,this._lastMoonT=0,this._lastMoonZenith=0,this._lastMoonPhase=0,this._ephemeris=void 0,this._perezBlend=0,this._isothermalEffect=0,this._sunAboveHorizon=!1,this._sunSpectrum=new o$9,this._sunTransmittedLuminance=void 0,this._sunScatteredLuminance=void 0,this._sunTransmittedLuminanceSeaLevel=void 0,this._sunScatteredLuminanceSeaLevel=void 0,this._lunarSpectrum=new o$9,this._moonTransmittedLuminance=void 0,this._moonScatteredLuminance=void 0,this._moonTransmittedLuminanceSeaLevel=void 0,this._moonScatteredLuminanceSeaLevel=void 0,this._maxSkylightLuminance=1,this._monochromeAmbient=!0,this._lightPollution=0,this._nightSkyScale=1,this._skyLight=new e$1X,this._twilightLuminance=[],k$5(this),this._lightingChanged=!1}function k$5(e){e._twilightLuminance={},e._twilightLuminance[5]=2200,e._twilightLuminance[4]=1800,e._twilightLuminance[3]=1400,e._twilightLuminance[2]=1200,e._twilightLuminance[1]=710,e._twilightLuminance[0]=400,e._twilightLuminance[-1]=190,e._twilightLuminance[-2]=77,e._twilightLuminance[-3]=28,e._twilightLuminance[-4]=9.4,e._twilightLuminance[-5]=2.9,e._twilightLuminance[-6]=.9,e._twilightLuminance[-7]=.3,e._twilightLuminance[-8]=.11,e._twilightLuminance[-9]=.047,e._twilightLuminance[-10]=.021,e._twilightLuminance[-11]=.0092,e._twilightLuminance[-12]=.0031,e._twilightLuminance[-13]=.0022,e._twilightLuminance[-14]=.0019,e._twilightLuminance[-15]=.0018,e._twilightLuminance[-16]=.0018;for(var t in e._twilightLuminance){var i=e._twilightLuminance[t];e._twilightLuminance[t]=i/Math.PI*.1}}var p$3=new o$1p;l$a.prototype.getToneMappedSkyLight=function(){return this._skyLight};var O$5=new o$1p;function e$2(){this.year=0,this.month=0,this.day=0,this.hours=0,this.minutes=0,this.seconds=0,this.observingDST=!0,this.zoneCorrection=8}function i$8(){this._latitude=0,this._longitude=0,this._altitude=0}function a$2(){this._time=void 0,this._lastTime=new e$2,this._lastLocation=new i$8,this._T=0,this._tuncorr=0,this._epochDays=0,this._sunEclipticLongitude=0,this._sunEcl=new o$1p,this._moonEcl=new o$1p,this._sunEq=new o$1p,this._moonEq=new o$1p,this._eclipticToEquatorial=new p$1e,this._equatorialToGeographic=new p$1e,this._sunGeo=new o$1p,this._moonGeo=new o$1p,this._sunHoriz=new o$1p,this._moonHoriz=new o$1p,this._eclipticToHorizon=new p$1e,this._equatorialToHorizon=new p$1e,this._geographicToEquatorial=new p$1e,this._horizonToEquatorial=new p$1e,this._horizonToGeographic=new p$1e,this._geographicToHorizon=new p$1e,this._horizonToEcliptic=new p$1e,this._moonPhase=void 0,this._moonPhaseAngle=void 0,this._moonDistance=void 0,this._precession=new p$1e,this._forceSunHoriz=!1,this._forceMoonHoriz=!1,this._geoZUp=!0,this._primeMeridianZ=!1}function m$8(e,t,i){var n=new o$1p;return n.x=e*Math.cos(i)*Math.cos(t),n.y=e*Math.sin(i)*Math.cos(t),n.z=e*Math.sin(t),n}function T$8(e){for(;e>2*Math.PI;)e-=2*Math.PI;for(;e<0;)e+=2*Math.PI;return e}function E$5(e){var t=new o$1p;return t.x=e.y,t.y=e.z,t.z=e.x,t}function z$4(e){var t=new o$1p;return t.x=e.z,t.y=e.x,t.z=e.y,t}function q$4(e){var t,i;if(e>e$2d.toRadians(85))t=0;else{if(i=Math.tan(e),e>=e$2d.toRadians(5))t=58.1/i-.07/Math.pow(i,3)+86e-6/Math.pow(i,5);else if(e>=e$2d.toRadians(-.575)){var n=e$2d.toDegrees(e);t=1735+n*(n*(103.4+n*(.711*n-12.79))-518.2)}else t=-20.774/i;t/=3600}return e+e$2d.toRadians(t)}l$a.prototype._computeSun=function(e){var t=this._ephemeris.getSunPositionHorizon(),i=(t=o$1p.normalize(t,O$5)).y;if(this._lastSunT!==this._T||this._lastSunZenith!==i){this._lastSunT=this._T,this._lastSunZenith=i;var n=e$2d.toDegrees(Math.asin(t.y));n+=0,this._perezBlend=n>1?0:n<0?1:1-n;var r=Math.acos(i)-e$2d.toRadians(0),o=e$2d.toRadians(1),a=new G$6,s=new G$6,l=new G$6,u=new G$6;if(.5*Math.PI-r>o){this._sunAboveHorizon=!0,this._sunSpectrum.applyAtmosphericTransmittance(r,i,this._T,e,a,s),this._sunTransmittedLuminance=a.toXYZ(),this._sunScatteredLuminance=s.toXYZ(),e<1e3?(this._sunTransmittedLuminanceSeaLevel=this._sunTransmittedLuminance,this._sunScatteredLuminanceSeaLevel=this._sunScatteredLuminance):(this._sunSpectrum.applyAtmosphericTransmittance(r,i,this._T,0,l,u),this._sunTransmittedLuminanceSeaLevel=l.toXYZ(),this._sunScatteredLuminanceSeaLevel=u.toXYZ());for(var c=r/(.5*Math.PI),h=0;h<6;h++)c*=c;this._sunScatteredLuminance.x*=1+0*c,this._sunScatteredLuminance.y*=1+0*c,this._sunScatteredLuminance.z*=1+0*c,this._sunScatteredLuminanceSeaLevel.x*=1+0*c,this._sunScatteredLuminanceSeaLevel.y*=1+0*c,this._sunScatteredLuminanceSeaLevel.z*=1+0*c}else{this._sunAboveHorizon=!1;var d=Math.floor(n),f=Math.ceil(n);c=n-d;e$2e(this._twilightLuminance[d])||(this._twilightLuminance[d]=0),e$2e(this._twilightLuminance[f])||(this._twilightLuminance[f]=0);var p=this._twilightLuminance[d],_=this._twilightLuminance[f];r=.5*Math.PI-o;this._sunSpectrum.applyAtmosphericTransmittance(r,Math.cos(r),this._T,e,a,s),this._sunTransmittedLuminance=a.toXYZ(),this._sunScatteredLuminance=s.toXYZ(),e<1e3?(this._sunTransmittedLuminanceSeaLevel=this._sunTransmittedLuminance,this._sunScatteredLuminanceSeaLevel=this._sunScatteredLuminance):(this._sunSpectrum.applyAtmosphericTransmittance(r,Math.cos(r),this._T,0,l,u),this._sunTransmittedLuminanceSeaLevel=l.toXYZ(),this._sunScatteredLuminanceSeaLevel=u.toXYZ());var m=(1-c)*p+c*_,g=.25,x=m/g*.25,y=m/g*.5;(c=-n/2)>1&&(c=1),c<0&&(c=0);var v=0*m*(c*=c)+(1-c);o$1p.multiplyByScalar(this._sunTransmittedLuminance,v,this._sunTransmittedLuminance),this._sunScatteredLuminance.x=x*c+this._sunScatteredLuminance.x*(1-c),this._sunScatteredLuminance.y=m*c+this._sunScatteredLuminance.y*(1-c),this._sunScatteredLuminance.z=y*c+this._sunScatteredLuminance.z*(1-c),v=0*m*c+(1-c),o$1p.multiplyByScalar(this._sunScatteredLuminanceSeaLevel,v,this._sunScatteredLuminanceSeaLevel),this._sunScatteredLuminanceSeaLevel.x=x*c+this._sunScatteredLuminanceSeaLevel.x*(1-c),this._sunScatteredLuminanceSeaLevel.y=m*c+this._sunScatteredLuminanceSeaLevel.y*(1-c),this._sunScatteredLuminanceSeaLevel.z=y*c+this._sunScatteredLuminanceSeaLevel.z*(1-c),this._sunScatteredLuminance.x*=1,this._sunScatteredLuminance.y*=1,this._sunScatteredLuminance.z*=1,this._sunScatteredLuminanceSeaLevel.x*=1,this._sunScatteredLuminanceSeaLevel.y*=1,this._sunScatteredLuminanceSeaLevel.z*=1}}},l$a.prototype._moonLuminance=function(){var e=this._ephemeris.getMoonPositionHorizon();o$1p.clone(e,p$3),o$1p.normalize(p$3,p$3);var t=e$2d.toDegrees(Math.asin(p$3.z)),i=1738100,n=1e3*this._ephemeris.getMoonDistanceKM(),r=.001,o=this._ephemeris.getMoonPhaseAngle();o<r&&(o=r);for(var a=Math.PI-o;a<0;)a+=2*Math.PI;a<r&&(a=r);var s=683*(.144*i*i/(3*n*n)*(.095*(1-Math.sin(o/2)*Math.tan(o/2)*Math.log(1/Math.tan(o/4)))+1905*(1-Math.sin(a/2)*Math.tan(a/2)*Math.log(1/Math.tan(a/4)))))/3.14;return s*=.001,t<0&&(s*=Math.exp(1.1247*t)),s},l$a.prototype._computeMoon=function(e){var t=this._ephemeris.getMoonPositionHorizon();o$1p.clone(t,p$3),o$1p.normalize(p$3,p$3);var i=p$3.z,n=Math.acos(i),r=this._ephemeris.getMoonPhase();if(this._lastMoonT!==this._T||this._lastMoonZenith!==n||this._lastMoonPhase!==r){this._lastMoonT=this._T,this._lastMoonZenith=n,this._lastMoonPhase=r,this._lightingChanged=!0;var o=new G$6,a=new G$6;this._lunarSpectrum.applyAtmosphericTransmittance(n,i,this._T,e,o,a);var s=this._moonLuminance();this._moonTransmittedLuminance=o$1p.multiplyByScalar(o.toXYZ(),s,new o$1p),this._moonScatteredLuminance=o$1p.multiplyByScalar(a.toXYZ(),s,new o$1p);var l=new G$6,u=new G$6;this._lunarSpectrum.applyAtmosphericTransmittance(n,i,this._T,0,l,u),this._moonTransmittedLuminance=o$1p.multiplyByScalar(o.toXYZ(),s,new o$1p),this._moonScatteredLuminance=o$1p.multiplyByScalar(a.toXYZ(),s,new o$1p),this._moonTransmittedLuminanceSeaLevel=o$1p.multiplyByScalar(l.toXYZ(),s,new o$1p),this._moonScatteredLuminanceSeaLevel=o$1p.multiplyByScalar(u.toXYZ(),s,new o$1p)}},l$a.prototype.getSunColor=function(){var e=o$1p.multiplyByScalar(this._sunTransmittedLuminance,1,new o$1p);a$3.durandMapperXYZ(e);var t=p$1e.multiplyByVector(P$8,e,new o$1p);return this._applyGamma(t),new e$1X(t.x,t.y,t.z)},l$a.prototype._updateZenith=function(e){var t=this._ephemeris.getSunPositionHorizon();o$1p.normalize(t,t),new o$1p(0,1,0);this._isothermalEffect=Math.exp(-e/8435),this._isothermalEffect<0&&(this._isothermalEffect=0),this._isothermalEffect>1&&(this._isothermalEffect=1)},l$a.prototype._nightSkyLuminance=function(){return 683*(this._lightPollution+2e-6+12e-8+3e-8+51e-9+9.1e-9+9.1e-10)/3.14*this._isothermalEffect*.001*this._nightSkyScale},l$a.prototype._applyGamma=function(e){var t=0;e.x<t&&(t=e.x),e.y<t&&(t=e.y),e.z<t&&(t=e.z),t=-t,e.x=e.x+t,e.y=e.y+t,e.z=e.z+t;var i=e.x;e.y>i&&(i=e.y),e.z>i&&(i=e.z),i>1&&(e.x/=i,e.y/=i,e.z/=i);var n=this._oneOverGammaHosek;e.x>0&&(e.x=Math.pow(e.x,n)),e.y>0&&(e.y=Math.pow(e.y,n)),e.z>0&&(e.z=Math.pow(e.z,n))},l$a.prototype._computeLogAvg=function(){var e,t,i=new o$1p;o$1p.add(this._sunScatteredLuminance,this._moonScatteredLuminance,i),o$1p.add(i,this._moonTransmittedLuminance,i),i.y+=1e3*this._nightSkyLuminance(),e=i.y,t=-.702*i.x+1.039*i.y+.433*i.z,a$3.setSceneLogAvg(t,e)},l$a.prototype._computeToneMappedSkyLight=function(){var e=o$1p.multiplyByScalar(this._sunScatteredLuminance,.5,new o$1p);e.y+=1e3*this._nightSkyLuminance();var t=o$1p.multiplyByScalar(this._moonScatteredLuminance,.5,new o$1p),i=o$1p.multiplyByScalar(this._sunScatteredLuminanceSeaLevel,.5,new o$1p);i.y+=1e3*this._nightSkyLuminance();var n=o$1p.multiplyByScalar(this._moonScatteredLuminanceSeaLevel,.5,new o$1p);a$3.durandMapperXYZ(e),a$3.durandMapperXYZ(t),a$3.durandMapperXYZ(i),a$3.durandMapperXYZ(n);var r=o$1p.add(e,t,new o$1p);r.x>this._maxSkylightLuminance&&(r.x=this._maxSkylightLuminance),r.y>this._maxSkylightLuminance&&(r.y=this._maxSkylightLuminance),r.z>this._maxSkylightLuminance&&(r.z=this._maxSkylightLuminance);var o=p$1e.multiplyByVector(P$8,r,new o$1p);this._monochromeAmbient&&(o.x=o.z=o.y),this._applyGamma(o),this._skyLight=new e$1X(o.x,o.y,o.z),(r=o$1p.add(i,n,r)).x>this._maxSkylightLuminance&&(r.x=this._maxSkylightLuminance),r.y>this._maxSkylightLuminance&&(r.y=this._maxSkylightLuminance),r.z>this._maxSkylightLuminance&&(r.z=this._maxSkylightLuminance),o=p$1e.multiplyByVector(P$8,r,new o$1p),this._monochromeAmbient&&(o.x=o.z=o.y),this._applyGamma(o),this._skyLightSeaLevel=new e$1X(o.x,o.y,o.z)},l$a.prototype.setEphemeris=function(e,t){this._ephemeris=e,this._lightingChanged=!1,this._computeSun(t),this._computeMoon(t),this._updateZenith(t),this._computeLogAvg(),this._computeToneMappedSkyLight()},e$2.prototype.setTimeZone=function(e){e>=-12&&e<=12&&(this.zoneCorrection=e)},e$2.prototype.getEpoch2000Centuries=function(e){var t,i,n,r,o=this.hours+(this.minutes+this.seconds/60)/60;this.observingDST&&(o-=1),o-=this.zoneCorrection,n=this.day+o/24,this.month<3?(t=this.year-1,i=this.month+12):(t=this.year,i=this.month),r=1720996.5-Math.floor(t/100)+Math.floor(t/400)+Math.floor(365.25*t)+Math.floor(30.6001*(i+1));var a=(r-=2451545)+n;return e&&(a+=65/60/60/24),a/=36525},e$2.prototype.getEpoch1990Days=function(e){var t,i,n,r,o=this.hours+(this.minutes+this.seconds/60)/60;this.observingDST&&(o-=1),o-=this.zoneCorrection,r=this.day+o/24,this.month<3?(t=this.year-1,i=this.month+12):(t=this.year,i=this.month),n=1720996.5-Math.floor(t/100)+Math.floor(t/400)+Math.floor(365.25*t)+Math.floor(30.6001*(i+1));var a=(n-=2447891.5)+r;return e&&(a+=65/60/60/24),a},e$2.prototype.clone=function(e){return e.year=this.year,e.month=this.month,e.day=this.day,e.hours=this.hours,e.minutes=this.minutes,e.seconds=this.seconds,e},Object.defineProperties(i$8.prototype,{longitude:{get:function(){return this._longitude},set:function(e){e>=-180&&e<=180&&(this._longitude=e)}},latitude:{get:function(){return this._latitude},set:function(e){e>=-90&&e<=90&&(this._latitude=e)}},altitude:{get:function(){return this._altitude},set:function(e){this._altitude=e}}}),i$8.prototype.clone=function(e){return e._latitude=this.latitude,e._longitude=this.longitude,e._altitude=this.altitude,e},a$2.prototype.getSunPositionGeographic=function(){return this._sunGeo},a$2.prototype.getSunPositionHorizon=function(){return this._sunHoriz},a$2.prototype.computeMoonPosition=function(){var e=this._T,t=6.23+628.3019*e,i=1.628+8433.4663*e,n=2.3554+8328.6911*e,r=5.1985+7771.3772*e,o=3.8104+8399.7091*e+.1098*Math.sin(n)+.0222*Math.sin(2*r-n)+.0115*Math.sin(2*r)+.0037*Math.sin(2*n)-.0032*Math.sin(t)-.002*Math.sin(2*i)+.001*Math.sin(2*r-2*n)+.001*Math.sin(2*r-t-n)+9e-4*Math.sin(2*r+n)+8e-4*Math.sin(2*r-t)+7e-4*Math.sin(n-t)-6e-4*Math.sin(r)-5e-4*Math.sin(t+n),a=.0895*Math.sin(i)+.0049*Math.sin(n+i)+.0048*Math.sin(n-i)+.003*Math.sin(2*r-i)+.001*Math.sin(2*r+i-n)+8e-4*Math.sin(2*r-i-n)+6e-4*Math.sin(2*r+i),s=1/(.016593+904e-6*Math.cos(n)+166e-6*Math.cos(2*r-n)+137e-6*Math.cos(2*r)+49e-6*Math.cos(2*n)+15e-6*Math.cos(2*r+n)+9e-6*Math.cos(2*r-t));this._moonEcl=m$8(s,a,o),this._moonEq=p$1e.multiplyByVector(this._eclipticToEquatorial,this._moonEcl,this._moonEq),this._moonGeo=p$1e.multiplyByVector(this._equatorialToGeographic,this._moonEq,this._moonGeo),this._moonHoriz=p$1e.multiplyByVector(this._eclipticToHorizon,this._moonEcl,new o$1p),this._moonDistance=6378.137*o$1p.distance(this._moonHoriz,new o$1p(1,0,0)),o=T$8(o),this._sunEclipticLongitude=T$8(this._sunEclipticLongitude),this._moonPhaseAngle=o-this._sunEclipticLongitude,this._moonPhaseAngle=T$8(this._moonPhaseAngle),this._moonPhase=.5*(1-Math.cos(this._moonPhaseAngle))};var u$9=new o$1p;function G$5(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=1,t[3]=0,t[6]=0,t[1]=0,t[4]=n,t[7]=i,t[2]=0,t[5]=-i,t[8]=n}function v$6(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=n,t[3]=0,t[6]=-i,t[1]=0,t[4]=1,t[7]=0,t[2]=i,t[5]=0,t[8]=n}function f$9(e,t){var i=Math.sin(-e),n=Math.cos(-e);t[0]=n,t[3]=i,t[6]=0,t[1]=-i,t[4]=n,t[7]=0,t[2]=0,t[5]=0,t[8]=1}a$2.prototype.computeSunPosition=function(){var e=this._T,t=6.24+628.302*e,i=4.895048+628.331951*e+(.033417-84e-6*e)*Math.sin(t)+351e-6*Math.sin(2*t),n=1.00014-(.016708-42e-6*e)*Math.cos(t)-141e-6*Math.cos(2*t);if(this._sunEclipticLongitude=i,this._sunEcl=m$8(n,0,i),this._sunEq=p$1e.multiplyByVector(this._eclipticToEquatorial,this._sunEcl,this._sunEq),u$9=p$1e.multiplyByVector(this._equatorialToGeographic,this._sunEq,u$9),this._geoZUp?(this._sunGeo.x=u$9.x,this._sunGeo.y=u$9.y,this._sunGeo.z=u$9.z):this._primeMeridianZ?(this._sunGeo.x=u$9.y,this._sunGeo.y=u$9.z,this._sunGeo.z=u$9.x):(this._sunGeo.x=u$9.x,this._sunGeo.y=u$9.z,this._sunGeo.z=-u$9.y),this._forceSunHoriz)this._sunHoriz.x=sin(forcedSunAzimuth)*cos(forcedSunAltitude),this._sunHoriz.z=-cos(forcedSunAzimuth)*cos(forcedSunAltitude),this._sunHoriz.y=sin(forcedSunAltitude),this._sunHoriz.Normalize(),this._geoZUp?this._sunGeo=horizonToGeographic*z$4(sunHoriz):this._sunGeo=E$5(horizonToGeographic*z$4(sunHoriz)),this._sunEcl=horizonToEcliptic*z$4(sunHoriz),this._sunEq=horizonToEquatorial*z$4(sunHoriz);else{var r=new o$1p;r=p$1e.multiplyByVector(this._eclipticToHorizon,this._sunEcl,r),this._sunHoriz=E$5(r)}var o=o$1p.normalize(this._sunHoriz,new o$1p),a=o$1p.distance(this._sunHoriz,o$1p.ZERO),s=Math.asin(o.y);s=q$4(s),this._sunHoriz.y=a*Math.sin(s)},a$2.prototype.getSunPositionHorizon=function(){return this._sunHoriz},a$2.prototype.getMoonPositionHorizon=function(){return this._moonHoriz},a$2.prototype.getMoonPhase=function(){return this._moonPhase},a$2.prototype.getMoonDistanceKM=function(){return this._moonDistance},a$2.prototype.getMoonPhaseAngle=function(){return this._moonPhaseAngle};var M$5=new p$1e,g$d=new p$1e,y$7=new p$1e;function n$6(){this._ambientColor=new e$1X,this._sunColor=new e$1X,this._sky=new l$a,this._ephemeris=new a$2,this._localTime=new e$2,this._location=new i$8,this._atmosphereHeight=1e5,this._renderError=new o$1h,this._basis3=new p$1e,this._invBasis3=new p$1e,this._upVector=new o$1p(0,0,1),this._rightVector=new o$1p(-1,0,0),this._sceneMode=C$14.SCENE3D}a$2.prototype.update=function(e,t){var i=!1;if(e!==this._lastTime&&(i=!0,this._lastTime=e.clone(this._lastTime)),t!==this._lastLocation&&(i=!0,this._lastLocation=t.clone(this._lastLocation)),i){var n=this._T=e.getEpoch2000Centuries(!0);this._tuncorr=e.getEpoch2000Centuries(!1),this._epochDays=e.getEpoch1990Days(!1),f$9(.01118*n,M$5),v$6(-.00972*n,g$d),f$9(.01118*n,y$7);var r=p$1e.multiply(M$5,g$d,new p$1e);this._precession=p$1e.multiply(r,y$7,this._precession);var o=4.894961+230121.675315*this._tuncorr,a=o+e$2d.toRadians(t.longitude),s=e$2d.toRadians(t.latitude),l=.409093-227e-6*this._T;v$6(s-Math.PI/2,g$d),f$9(-a,y$7),G$5(l,M$5),r=p$1e.multiply(g$d,y$7,r),p$1e.multiply(r,this._precession,this._equatorialToHorizon),p$1e.multiply(r,M$5,this._eclipticToHorizon),p$1e.clone(M$5,this._eclipticToEquatorial),f$9(-o,this._equatorialToGeographic),p$1e.transpose(this._equatorialToGeographic,this._geographicToEquatorial),p$1e.transpose(this._equatorialToHorizon,this._horizonToEquatorial),p$1e.multiply(this._equatorialToGeographic,this._horizonToEquatorial,this._horizonToGeographic),p$1e.multiply(this._equatorialToHorizon,this._geographicToEquatorial,this._geographicToHorizon),p$1e.inverse(this._eclipticToHorizon,this._horizonToEcliptic),this.computeSunPosition(),this.computeMoonPosition()}};var T$7=new e$1X(1,.96,.94,1);function u$8(e){var t=0;e.red<t&&(t=e.red),e.green<t&&(t=e.green),e.blue<t&&(t=e.blue),t=-t,e.red+=t,e.green+=t,e.blue+=t;var i=e.red;e.green>i&&(i=e.green),e.blue>i&&(i=e.blue),i>1&&(e.red/=i,e.green/=i,e.blue/=i),e.red<0&&(e.red=0),e.green<0&&(e.green=0),e.blue<0&&(e.blue=0),e.a<0&&(e.a=0)}n$6.prototype._interpolate=function(e,t){var i=(this._atmosphereHeight+.5*this._atmosphereHeight-this._location.altitude)/(.5*this._atmosphereHeight);return i>1&&(i=1),i<0&&(i=0),e$1X.lerp(e,t,i,new e$1X)},n$6.prototype.getAmbientColor=function(){var e=this._sky.getToneMappedSkyLight();return u$8(e),this._location.altitude>this._atmosphereHeight&&(e=this._interpolate(new e$1X(0,0,0,1),e)),e},n$6.prototype.getSunColor=function(){var e=this._sky.getSunColor();return u$8(e),this._location.altitude>this._atmosphereHeight&&(e=this._interpolate(T$7,e)),e},n$6.prototype.getSunPosition=function(){if(this._sceneMode==C$14.SCENE3D)return this.getSunPositionGeographic();var e=new o$1p;return e=o$1p.clone(this._ephemeris.getSunPositionHorizon(),e),o$1p.normalize(e,e),p$1e.multiplyByVector(this._basis3,e,e),e},n$6.prototype.getSunPositionGeographic=function(){return this._ephemeris.getSunPositionGeographic()},n$6.prototype._computeLocalTime=function(e){var t=a$15.toGregorianDate(e);this._localTime.year=t.year,this._localTime.month=t.month,this._localTime.day=t.day,this._localTime.hours=t.hour,this._localTime.minutes=t.minute,this._localTime.seconds=t.second,this._localTime.setTimeZone(0)},n$6.prototype.setLocation=function(e){this._location.longitude=e$2d.toDegrees(e.longitude),this._location.latitude=e$2d.toDegrees(e.latitude),this._location.altitude=e.height};var _$6=new o$1p,g$c=new o$1p,l$9=new o$1p,C$6;n$6.prototype.updateBasis=function(){this.getXYZ(_$6,g$c,l$9,this._upVector,this._rightVector,!0),this.getBases(this._basis3,this._invBasis3,_$6,g$c,l$9)},n$6.prototype.getXYZ=function(e,t,i,n,r){i=o$1p.cross(r,n,i),o$1p.normalize(i,i),e=o$1p.cross(n,i,e),o$1p.normalize(e,e),t=o$1p.cross(i,e,t),o$1p.normalize(t,t)},n$6.prototype.getBases=function(e,t,i,n,r){e[0]=i.x,e[3]=i.y,e[6]=i.z,e[1]=n.x,e[4]=n.y,e[7]=n.z,e[2]=r.x,e[5]=r.y,e[8]=r.z,t[0]=i.x,t[3]=n.x,t[6]=r.x,t[1]=i.y,t[4]=n.y,t[7]=r.y,t[2]=i.z,t[5]=n.z,t[8]=r.z},n$6.prototype.update=function(e,t){try{this._sceneMode=t,this._sceneMode==C$14.SCENE3D||this.updateBasis(),this.setLocation(e.camera.positionCartographic),this._computeLocalTime(e.time),this._ephemeris.update(this._localTime,this._location),this._sky.setEphemeris(this._ephemeris,this._location.altitude)}catch(e){this._renderError.raiseEvent(this,e)}};class F$6{constructor(e){this.context=e;const t=e._gl;this.maxBindingPoints=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS),this._uniformBuffers=new Array}createUniformBuffer(e){const t=this.context._gl,i=t.createBuffer();return t.bindBuffer(t.UNIFORM_BUFFER,i),e instanceof Float32Array?t.bufferData(t.UNIFORM_BUFFER,e,t.STATIC_DRAW):t.bufferData(t.UNIFORM_BUFFER,new Float32Array(e),t.STATIC_DRAW),t.bindBuffer(t.UNIFORM_BUFFER,null),i}updateUniformBuffer(e,t,i,n){const r=this.context._gl;r.bindBuffer(r.UNIFORM_BUFFER,e),void 0===i&&(i=0),void 0===n?t instanceof Float32Array?r.bufferSubData(r.UNIFORM_BUFFER,i,t):r.bufferSubData(r.UNIFORM_BUFFER,i,new Float32Array(t)):t instanceof Float32Array?r.bufferSubData(r.UNIFORM_BUFFER,0,t.subarray(i,i+n)):r.bufferSubData(r.UNIFORM_BUFFER,0,new Float32Array(t).subarray(i,i+n)),r.bindBuffer(r.UNIFORM_BUFFER,null)}bindUniformBufferBase(e,t,i){const n=this.context._gl;n.bindBufferBase(n.UNIFORM_BUFFER,t,e||null)}bindUniformBlock(e,t,i){const n=this.context._gl;var r=n.getUniformBlockIndex(e,t);4294967295!==r&&n.uniformBlockBinding(e,r,i)}_releaseBuffer(e){return this.context._gl.deleteBuffer(e),!0}}function ue$4(e,t){var i="WebGL Error: ";switch(t){case e.INVALID_ENUM:i+="INVALID_ENUM";break;case e.INVALID_VALUE:i+="INVALID_VALUE";break;case e.INVALID_OPERATION:i+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:i+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:i+="CONTEXT_LOST_WEBGL lost";break;default:i+="Unknown ("+t+")"}return i}function le$4(e,t,i,n){for(var r=ue$4(e,n)+": "+t.name+"(",o=0;o<i.length;++o)0!==o&&(r+=", "),r+=i[o];return r+=");"}function de$2(e,t,i){var n=e.getError();if(n!==e.NO_ERROR)throw new t$13(le$4(e,t,i,n))}function he$3(e,t,i){return{get:function(){var n=e[t];return i(e,"get: "+t,n),e[t]},set:function(n){e[t]=n,i(e,"set: "+t,n)}}}function ce$6(e,t){if(!e$2e(t))return e;function i(i){return function(){var n=i.apply(e,arguments);return t(e,i,arguments),n}}var n={};for(var r in e){var o=e[r];o instanceof Function?n[r]=i(o):Object.defineProperty(n,r,he$3(e,r,t))}return n}function u$7(e,t){for(var i=t.length,n=0;n<i;++n){var r=e.getExtension(t[n]);if(r)return r}}function g$b(e,t){var i=i$i.call(this,e,t)||this;if(typeof WebGLRenderingContext>"u")throw new t$13("The browser does not support WebGL.");var n=e.width*i._cols,r=e.height*i._rows;e.width=300,e.height=150,(t=u$Z(t=l$1f(t,!0),{})).allowTextureFilterAnisotropic=u$Z(t.allowTextureFilterAnisotropic,!0);var o=u$Z(t.webgl,{});o.alpha=u$Z(o.alpha,!1),o.stencil=u$Z(o.stencil,!0),o.antialias=u$Z(o.antialias,!0);var a,s=u$Z(t.contextType,Me$j.Webgl2)!==Me$j.Webgl1&&typeof WebGL2RenderingContext<"u",l=!1,u=t.getWebGLStub;if(e$2e(u))a=u(e,o);else if(s&&(e$2e(a=e.getContext("webgl2",o)||e.getContext("experimental-webgl2",o)||void 0)&&(l=!0)),e$2e(a)||(a=e.getContext("webgl",o)||e.getContext("experimental-webgl",o)||void 0),!e$2e(a))throw new t$13("The browser supports WebGL, but initialization failed.");i.webglOptions=o,e.width=n,e.height=r,i._originalGLContext=a,i._gl=a,i._webgl2=l,i.validateFramebuffer=!1,i.validateShaderProgram=!1,i.logShaderCompilation=!1,i._throwOnWebGLError=!1;var c=a;i._stencilBits=c.getParameter(c.STENCIL_BITS),e$1W._maximumCombinedTextureImageUnits=c.getParameter(c.MAX_COMBINED_TEXTURE_IMAGE_UNITS),e$1W._maximumCubeMapSize=c.getParameter(c.MAX_CUBE_MAP_TEXTURE_SIZE),e$1W._maximumFragmentUniformVectors=c.getParameter(c.MAX_FRAGMENT_UNIFORM_VECTORS),e$1W._maximumTextureImageUnits=c.getParameter(c.MAX_TEXTURE_IMAGE_UNITS),e$1W._maximumRenderbufferSize=c.getParameter(c.MAX_RENDERBUFFER_SIZE),e$1W._maximumTextureSize=c.getParameter(c.MAX_TEXTURE_SIZE),e$1W._maximumVaryingVectors=c.getParameter(c.MAX_VARYING_VECTORS),e$1W._maximumVertexAttributes=c.getParameter(c.MAX_VERTEX_ATTRIBS),e$1W._maximumVertexTextureImageUnits=c.getParameter(c.MAX_VERTEX_TEXTURE_IMAGE_UNITS),e$1W._maximumVertexUniformVectors=c.getParameter(c.MAX_VERTEX_UNIFORM_VECTORS);var h=c.getParameter(c.ALIASED_LINE_WIDTH_RANGE);e$1W._minimumAliasedLineWidth=h[0],e$1W._maximumAliasedLineWidth=h[1];var d=c.getParameter(c.ALIASED_POINT_SIZE_RANGE);e$1W._minimumAliasedPointSize=d[0],e$1W._maximumAliasedPointSize=d[1];var f=c.getParameter(c.MAX_VIEWPORT_DIMS);e$1W._maximumViewportWidth=f[0],e$1W._maximumViewportHeight=f[1];var p=c.getShaderPrecisionFormat(c.FRAGMENT_SHADER,c.HIGH_FLOAT);e$1W._highpFloatSupported=0!==p.precision;var _=c.getShaderPrecisionFormat(c.FRAGMENT_SHADER,c.HIGH_INT);e$1W._highpIntSupported=0!==_.rangeMax,l&&(e$1W._uniformBufferOffsetAlignment=c.getParameter(c.UNIFORM_BUFFER_OFFSET_ALIGNMENT),e$1W._maxUniformBufferBinding=c.getParameter(c.MAX_UNIFORM_BUFFER_BINDINGS),e$1W._maxArrayTextureLayers=c.getParameter(c.MAX_ARRAY_TEXTURE_LAYERS)),i._antialias=c.getContextAttributes().antialias,i._standardDerivatives=l||!!u$7(c,["OES_standard_derivatives"]),i._blendMinmax=!!u$7(c,["EXT_blend_minmax"]),i._elementIndexUint=!!u$7(c,["OES_element_index_uint"]),i._depthTexture=!!u$7(c,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),i._fragDepth=l||!!u$7(c,["EXT_frag_depth"]),i._debugShaders=u$7(c,["WEBGL_debug_shaders"]);var m=u$7(c,["EXT_shader_texture_lod"]);i._textureFloat=!!u$7(c,["OES_texture_float"]),i._textureHalfFloat=!!u$7(c,["OES_texture_half_float"]),i._textureFloatLinear=!!u$7(c,["OES_texture_float_linear"]),i._textureHalfFloatLinear=!!u$7(c,["OES_texture_half_float_linear"]),i._sysShaderDefines=[],e$2e(i._fragDepth)&&i._fragDepth&&i._sysShaderDefines.push("GL_EXT_frag_depth"),e$2e(m)&&i._sysShaderDefines.push("GL_EXT_shader_texture_lod"),l?(i._sysShaderDefines.push("WEBGL2"),i._sysShaderDefines.push("OUTPUT_DECLARATION")):e$2e(i._standardDerivatives)&&i._standardDerivatives&&i._sysShaderDefines.push("GL_OES_standard_derivatives"),i._colorBufferFloat=!!u$7(c,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),i._floatBlend=!!u$7(c,["EXT_float_blend"]),i._colorBufferHalfFloat=!!u$7(c,["EXT_color_buffer_half_float"]),i._s3tc=!!u$7(c,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),i._pvrtc=!!u$7(c,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),i._etc1=!!u$7(c,["WEBGL_compressed_texture_etc1"]),i._astc=!!u$7(c,["WEBGL_compressed_texture_astc"]),i._etc=!!u$7(c,["WEBG_compressed_texture_etc"]),i._bc7=!!u$7(c,["EXT_texture_compression_bptc"]),f$U.setKTX2SupportedFormats(i._s3tc,i._pvrtc,i._astc,i._etc,i._etc1,i._bc7);var g,x,y,v,$,b,T,C,S,w,E=t.allowTextureFilterAnisotropic?u$7(c,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;if(i._textureFilterAnisotropic=E,e$1W._maximumTextureFilterAnisotropy=e$2e(E)?c.getParameter(E.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1,l){var P=i;g=function(){return P._gl.createVertexArray()},x=function(e){P._gl.bindVertexArray(e)},y=function(e){P._gl.deleteVertexArray(e)},v=function(e,t,i,n,r){c.drawElementsInstanced(e,t,i,n,r)},$=function(e,t,i,n){c.drawArraysInstanced(e,t,i,n)},b=function(e,t){c.vertexAttribDivisor(e,t)},T=function(e){c.drawBuffers(e)}}else e$2e(C=u$7(c,["OES_vertex_array_object"]))&&(g=function(){return C.createVertexArrayOES()},x=function(e){C.bindVertexArrayOES(e)},y=function(e){C.deleteVertexArrayOES(e)}),e$2e(S=u$7(c,["ANGLE_instanced_arrays"]))&&(v=function(e,t,i,n,r){S.drawElementsInstancedANGLE(e,t,i,n,r)},$=function(e,t,i,n){S.drawArraysInstancedANGLE(e,t,i,n)},b=function(e,t){S.vertexAttribDivisorANGLE(e,t)}),e$2e(w=u$7(c,["WEBGL_draw_buffers"]))&&(T=function(e){w.drawBuffersWEBGL(e)});i.glCreateVertexArray=g,i.glBindVertexArray=x,i.glDeleteVertexArray=y,i.glDrawElementsInstanced=v,i.glDrawArraysInstanced=$,i.glVertexAttribDivisor=b,i.glDrawBuffers=T,i._vertexArrayObject=!!C,i._instancedArrays=!!S,i._drawBuffers=!!w,e$1W._maximumDrawBuffers=i.drawBuffers?c.getParameter(de$y.MAX_DRAW_BUFFERS):1,e$1W._maximumColorAttachments=i.drawBuffers?c.getParameter(de$y.MAX_COLOR_ATTACHMENTS):1,e$1W._maximumSamples=i._webgl2?c.getParameter(c.MAX_SAMPLES):1,d$1m.apply(c,i._defaultRenderState,i._defaultPassState);const A=c.getExtension("WEBGL_debug_renderer_info");if(A){var L=c.getParameter(A.UNMASKED_RENDERER_WEBGL);ti$4._autoSetMaxMemory(L)}i._floatTexSixPlaces=r$p(i),l&&(i._uniformBufferEngine=new F$6(i))}function me$4(e){if(e.validateFramebuffer){var t=e._gl,i=t.checkFramebufferStatus(t.FRAMEBUFFER);if(i!==t.FRAMEBUFFER_COMPLETE){var n;switch(i){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:n="Framebuffer is not complete. Incomplete attachment: at least one attachment point with a renderbuffer or texture attached has its attached object no longer in existence or has an attached image with a width or height of zero, or the color attachment point has a non-color-renderable image attached, or the depth attachment point has a non-depth-renderable image attached, or the stencil attachment point has a non-stencil-renderable image attached. Color-renderable formats include GL_RGBA4, GL_RGB5_A1, and GL_RGB565. GL_DEPTH_COMPONENT16 is the only depth-renderable format. GL_STENCIL_INDEX8 is the only stencil-renderable format.";break;case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:n="Framebuffer is not complete. Incomplete dimensions: not all attached images have the same width and height.";break;case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:n="Framebuffer is not complete. Missing attachment: no images are attached to the framebuffer.";break;case t.FRAMEBUFFER_UNSUPPORTED:n="Framebuffer is not complete. Unsupported: the combination of internal formats of the attached images violates an implementation-dependent set of restrictions."}throw new t$15(n)}}}function Z$6(e,t,i,n){var r=e._currentRenderState,o=e._currentPassState,a=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,d$1m.partialApply(e._gl,r,t,o,i,a,i.viewport,n)}function X$4(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;var i=C$6;if(e$2e(t))t._bind(),me$4(e),i=t._getActiveColorAttachments();else{var n=e._gl;n.bindFramebuffer(n.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(i)}}i$i&&(g$b.__proto__=i$i),g$b.prototype=Object.create(i$i&&i$i.prototype),g$b.prototype.constructor=i$i,Object.defineProperties(g$b.prototype,{webgl2:{get:function(){return this._webgl2}},webgpu:{get:function(){return!1}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return this._stencilBits>=8}},antialias:{get:function(){return this._antialias}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},floatTextureSixPlaces:{get:function(){return this._floatTexSixPlaces}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},etc1:{get:function(){return this._etc1}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=ce$6(this._originalGLContext,e?de$2:void 0)}},drawingBufferHeight:{get:function(){return Math.floor(this._gl.drawingBufferHeight)}},drawingBufferWidth:{get:function(){return Math.floor(this._gl.drawingBufferWidth)}},realDrawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight*this._rows}},realDrawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth*this._cols}}}),typeof WebGLRenderingContext<"u"&&(C$6=[de$y.BACK]);var ge$4=new t$W;function Ee$3(e,t,i,n,r){if(e$2e(t)&&r.depthTest&&r.depthTest.enabled&&!t.hasDepthAttachment)throw new t$15("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");X$4(e,t),Z$6(e,r,i,!1),n._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,n.maximumTextureUnitIndex)}function pe$3(e,t,i,n){var r=t._primitiveType,o=t._vertexArray,a=t._offset,s=t._count,l=t.instanceCount;if(!W$18.validate(r))throw new t$15("drawCommand.primitiveType is required and must be valid.");if(o$1q.defined("drawCommand.vertexArray",o),o$1q.typeOf.number.greaterThanOrEquals("drawCommand.offset",a,0),e$2e(s)&&o$1q.typeOf.number.greaterThanOrEquals("drawCommand.count",s,0),o$1q.typeOf.number.greaterThanOrEquals("drawCommand.instanceCount",l,0),l>0&&!e.instancedArrays)throw new t$15("Instanced arrays extension is not supported");e._us.model=u$Z(t._modelMatrix,p$1d.IDENTITY),e._us.useRelativeOrigin=t.useRelativeOrigin,i._setUniforms(n,e._us,e.validateShaderProgram,t),o._bind(),e$2e(t._transformFeedback)&&t._transformFeedback.begin();var u=o.indexBuffer;e$2e(u)?(a*=u.bytesPerIndex,s=u$Z(s,u.numberOfIndices),0===l?(r===W$18.TRIANGLES&&(e._trangleCount+=s/3),e._gl.drawElements(r,s,u.indexDatatype,a)):(r===W$18.TRIANGLES&&(e._trangleCount+=s/3*l),e.glDrawElementsInstanced(r,s,u.indexDatatype,a,l))):(s=u$Z(s,o.numberOfVertices),0===l?e._gl.drawArrays(r,a,s):e.glDrawArraysInstanced(r,a,s,l)),e$2e(t._transformFeedback)&&t._transformFeedback.end(),o._unBind()}g$b.prototype.clear=function(e,t){e=u$Z(e,ge$4),t=u$Z(t,this._defaultPassState);var i=this._gl,n=0,r=e.color,o=e.depth,a=e.stencil;e$2e(r)&&(e$1X.equals(this._clearColor,r)||(e$1X.clone(r,this._clearColor),i.clearColor(r.red,r.green,r.blue,r.alpha)),n|=i.COLOR_BUFFER_BIT),e$2e(o)&&(o!==this._clearDepth&&(this._clearDepth=o,i.clearDepth(o)),n|=i.DEPTH_BUFFER_BIT),e$2e(a)&&(a!==this._clearStencil&&(this._clearStencil=a,i.clearStencil(a)),n|=i.STENCIL_BUFFER_BIT),Z$6(this,u$Z(e.renderState,this._defaultRenderState),t,!0),X$4(this,u$Z(e.framebuffer,t.framebuffer)),i.clear(n)},g$b.prototype.draw=function(e,t,i,n){o$1q.defined("drawCommand",e),o$1q.defined("drawCommand.shaderProgram",e._shaderProgram),t=u$Z(t,this._defaultPassState);var r=u$Z(e._framebuffer,t.framebuffer),o=u$Z(e._renderState,this._defaultRenderState);i=u$Z(i,e._shaderProgram),n=u$Z(n,e._uniformMap),Ee$3(this,r,t,i,o),pe$3(this,e,i,n)},g$b.prototype.endFrame=function(){var e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);var t=C$6;this.drawBuffers&&this.glDrawBuffers(t);var i=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(var n=0;n<i;++n)e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)},g$b.prototype.readPixels=function(e){var t=this._gl;e=u$Z(e,u$Z.EMPTY_OBJECT);var i=Math.max(u$Z(e.x,0),0),n=Math.max(u$Z(e.y,0),0),r=u$Z(e.width,t.drawingBufferWidth),o=u$Z(e.height,t.drawingBufferHeight),a=e.framebuffer;o$1q.typeOf.number.greaterThan("readState.width",r,0),o$1q.typeOf.number.greaterThan("readState.height",o,0);var s=_$_.UNSIGNED_BYTE;e$2e(a)&&a.numberOfColorAttachments>0&&(s=a.getColorTexture(0).pixelDatatype);var l=V$12.createTypedArray(V$12.RGBA,s,r,o);return X$4(this,a),t.readPixels(i,n,r,o,V$12.RGBA,s,l),l},g$b.prototype.readPixelsAsync=function(e){var t=this.readPixels(e);return Promise.resolve(t)},g$b.prototype.resize=function(){},g$b.prototype.isDestroyed=function(){return!1},g$b.prototype.destroy=function(){return i$i.prototype.destroy.call(this),i$11(this)};var _0x2f3cb=(_0x2569cd=!0,function(e,t){var i=_0x2569cd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2569cd=!1,i}),_0x194e6a=_0x2f3cb(void 0,(function(){return _0x194e6a.toString().search("(((.+)+)+)+$").toString().constructor(_0x194e6a).search("(((.+)+)+)+$")})),_0x2569cd;_0x194e6a();var A$a="\nattribute vec4 aPosition;\n//varying vec3 v_position;\n\nuniform Mesh {\n uniform mat4 uModelMatrix;\n};\n\nvoid main()\n{\n //v_position = aPosition.xyz + vec3(0.5);\n gl_Position = czm_viewProjection * uModelMatrix * vec4(aPosition.xyz, 1.0);\n czm_vertexLogDepth();\n}",_0x233838=(_0x522dc6=!0,function(e,t){var i=_0x522dc6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x522dc6=!1,i}),_0x30e652=_0x233838(void 0,(function(){return _0x30e652.toString().search("(((.+)+)+)+$").toString().constructor(_0x30e652).search("(((.+)+)+)+$")})),_0x522dc6;_0x30e652();var g$a="\n//varying vec3 v_position;\n\nvoid main()\n{\n gl_FragColor = vec4(1.0);\n czm_writeLogDepth();\n}";function t$9(e){this._context=e,this._showDebugOcclusionMesh=!0,this._prepareResources()}t$9.prototype.initDrawCommand=function(e){e.shaderProgram=this._shaderProgram,e.vertexArray=this._vertexArray,e.renderState=this._renderState},t$9.prototype._prepareResources=function(){for(var e=O$z.getUnitBox(),t=e.attributes.position.values,i=new Float32Array(t.length),n=0;n<t.length;n++)i[n]=t[n];var r=t$X.createVertexBuffer({context:this._context,typedArray:i,usage:A$18.STATIC_DRAW}),o=[],a={aPosition:0};o.push({name:"aPosition",index:a.aPosition,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:S$14.FLOAT,offsetInBytes:0,strideInBytes:12,normalize:!1});var s=t$X.createIndexBuffer({context:this._context,typedArray:e.indices,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});this._vertexArray=new c$13({context:this._context,attributes:o,indexBuffer:s});var l=new s$V({name:"OcclusionVp",sources:[A$a]});l.defines.push("LOG_DEPTH");var u=new s$V({name:"OcclusionFp",sources:[g$a]});u.defines.push("LOG_DEPTH"),this._shaderProgram=r$14.fromCache({name:"OcclusionMesh",context:this._context,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:a}),this._renderState=d$1m.fromCache({depthMask:!1,colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0},blending:Ee$r.ALPHA_BLEND,cull:{enabled:!0}})},t$9.prototype.dispose=function(){this._vertexArray&&!this._vertexArray.isDestroyed()&&this._vertexArray.destroy()};var _0x59dc22=(_0xe73772=!0,function(e,t){var i=_0xe73772?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe73772=!1,i}),_0x2cdf8e=_0x59dc22(void 0,(function(){return _0x2cdf8e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cdf8e).search("(((.+)+)+)+$")})),_0xe73772;_0x2cdf8e(),_0x265690.prototype.setAlphaConstants=function(e,t,i,n){this._alphaState.setAlphaBlendConstants(e,t,i,n)},_0x265690.prototype.setAlphaMode=function(e,t){if(void 0===t&&(t=!1),this._alphaMode!==e){switch(e){case _0x333f62.ALPHA_DISABLE:this._alphaState.alphaBlend=!1;break;case _0x333f62.ALPHA_PREMULTIPLIED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_PREMULTIPLIED_PORTERDUFF:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_COMBINE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ADD:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_SUBTRACT:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ZERO,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_MULTIPLY:this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_COLOR,this._gl.ZERO,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_MAXIMIZED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_INTERPOLATE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.CONSTANT_COLOR,this._gl.ONE_MINUS_CONSTANT_COLOR,this._gl.CONSTANT_ALPHA,this._gl.ONE_MINUS_CONSTANT_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_SCREENMODE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ONEONE_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ALPHATOCOLOR:this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_ALPHA,this._gl.ONE,this._gl.ZERO,this._gl.ZERO),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_REVERSEONEMINUS:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE_MINUS_DST_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_SRC_DSTONEMINUSSRCALPHA:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ONEONE_ONEZERO:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ONE,this._gl.ZERO),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_EXCLUSION:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_LAYER_ACCUMULATE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0}!t&&(this.depthCullingState.depthMask=e===_0x333f62.ALPHA_DISABLE),this._alphaMode=e}},_0x265690.prototype.getAlphaMode=function(){return this._alphaMode},_0x265690.prototype.setAlphaEquation=function(e){if(this._alphaEquation!==e){switch(e){case _0x333f62.ALPHA_EQUATION_ADD:this._alphaState.setAlphaEquationParameters(_0x333f62.GL_ALPHA_EQUATION_ADD,_0x333f62.GL_ALPHA_EQUATION_ADD);break;case _0x333f62.ALPHA_EQUATION_SUBSTRACT:this._alphaState.setAlphaEquationParameters(_0x333f62.GL_ALPHA_EQUATION_SUBTRACT,_0x333f62.GL_ALPHA_EQUATION_SUBTRACT);break;case _0x333f62.ALPHA_EQUATION_REVERSE_SUBTRACT:this._alphaState.setAlphaEquationParameters(_0x333f62.GL_ALPHA_EQUATION_REVERSE_SUBTRACT,_0x333f62.GL_ALPHA_EQUATION_REVERSE_SUBTRACT);break;case _0x333f62.ALPHA_EQUATION_MAX:this._alphaState.setAlphaEquationParameters(_0x333f62.GL_ALPHA_EQUATION_MAX,_0x333f62.GL_ALPHA_EQUATION_MAX);break;case _0x333f62.ALPHA_EQUATION_MIN:this._alphaState.setAlphaEquationParameters(_0x333f62.GL_ALPHA_EQUATION_MIN,_0x333f62.GL_ALPHA_EQUATION_MIN);break;case _0x333f62.ALPHA_EQUATION_DARKEN:this._alphaState.setAlphaEquationParameters(_0x333f62.GL_ALPHA_EQUATION_MIN,_0x333f62.GL_ALPHA_EQUATION_ADD)}this._alphaEquation=e}},_0x265690.prototype.getAlphaEquation=function(){return this._alphaEquation};var _0x2865de=(_0x2a78f1=!0,function(e,t){var i=_0x2a78f1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a78f1=!1,i}),_0x14a3d9=_0x2865de(void 0,(function(){return _0x14a3d9.toString().search("(((.+)+)+)+$").toString().constructor(_0x14a3d9).search("(((.+)+)+)+$")})),_0x2a78f1;_0x14a3d9(),_0x4cd9cc.prototype.setAlphaMode=function(e,t){if(void 0===t&&(t=!1),this._alphaMode!==e||!(e===_0x333f62.ALPHA_DISABLE&&!this._alphaState.alphaBlend||e!==_0x333f62.ALPHA_DISABLE&&this._alphaState.alphaBlend)){switch(e){case _0x333f62.ALPHA_DISABLE:this._alphaState.alphaBlend=!1;break;case _0x333f62.ALPHA_PREMULTIPLIED:this._alphaState.setAlphaBlendFunctionParameters(1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_PREMULTIPLIED_PORTERDUFF:this._alphaState.setAlphaBlendFunctionParameters(1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_COMBINE:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(1,1,0,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ADD:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA,1,0,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_SUBTRACT:this._alphaState.setAlphaBlendFunctionParameters(0,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,1,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_MULTIPLY:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_DST_COLOR,0,1,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_MAXIMIZED:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,1,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_INTERPOLATE:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_CONSTANT_COLOR,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR,_0x333f62.GL_ALPHA_FUNCTION_CONSTANT_ALPHA,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_SCREENMODE:this._alphaState.setAlphaBlendFunctionParameters(1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ONEONE_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(1,1,1,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ALPHATOCOLOR:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_DST_ALPHA,1,0,0),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_REVERSEONEMINUS:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_SRC_DSTONEMINUSSRCALPHA:this._alphaState.setAlphaBlendFunctionParameters(1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_ONEONE_ONEZERO:this._alphaState.setAlphaBlendFunctionParameters(1,1,1,0),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_EXCLUSION:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR,0,1),this._alphaState.alphaBlend=!0;break;case _0x333f62.ALPHA_LAYER_ACCUMULATE:this._alphaState.setAlphaBlendFunctionParameters(_0x333f62.GL_ALPHA_FUNCTION_SRC_ALPHA,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA,1,_0x333f62.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0}!t&&(this.setDepthWrite(e===_0xf48096.ALPHA_DISABLE),this._cacheRenderPipeline.setDepthWriteEnabled(e===_0xf48096.ALPHA_DISABLE)),this._alphaMode=e,this._cacheRenderPipeline.setAlphaBlendEnabled(this._alphaState.alphaBlend),this._cacheRenderPipeline.setAlphaBlendFactors(this._alphaState._blendFunctionParameters,this._alphaState._blendEquationParameters)}},_0x4cd9cc.prototype.setAlphaEquation=function(e){_0xf48096.prototype.setAlphaEquation.call(this,e),this._cacheRenderPipeline.setAlphaBlendFactors(this._alphaState._blendFunctionParameters,this._alphaState._blendEquationParameters)};var _0x5781d3=(_0x113698=!0,function(e,t){var i=_0x113698?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x113698=!1,i}),_0x1ac2e4=_0x5781d3(void 0,(function(){return _0x1ac2e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x1ac2e4).search("(((.+)+)+)+$")})),_0x113698;_0x1ac2e4(),_0x4cd9cc.prototype._createDepthStencilCubeTexture=function(e,t){var i=new InternalTexture(this,InternalTextureSource.DepthStencil);i.isCube=!0;var n=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,samples:1},t);return i.format=n.generateStencil?_0x333f62.TEXTUREFORMAT_DEPTH24_STENCIL8:_0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT,this._setupDepthStencilTexture(i,e,n.generateStencil,n.bilinearFiltering,n.comparisonFunction,n.samples),this._textureHelper.createGPUTextureForInternalTexture(i),this._internalTexturesCache.push(i),i},_0x4cd9cc.prototype.createCubeTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=this;return void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=null),void 0===l&&(l=!1),void 0===u&&(u=0),void 0===c&&(c=0),void 0===h&&(h=null),void 0===d&&(d=!1),this.createCubeTextureBase(e,t,i,!!n,r,o,a,s,l,u,c,h,null,(function(e,t){var i=t,o=i[0].width,s=o;f._setCubeMapTextureParams(e,!n),e.format=null!=a?a:-1;var l=f._textureHelper.createGPUTextureForInternalTexture(e,o,s);f._textureHelper.updateCubeTextures(i,l.underlyingResource,o,s,l.format,!1,!1,0,0),!n&&f._generateMipmaps(e,f._uploadEncoder),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),r&&r()}),!!d)},_0x4cd9cc.prototype._setCubeMapTextureParams=function(e,t,i){e.samplingMode=t?_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE:_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE,e._cachedWrapU=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,e._cachedWrapV=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,i&&(e._maxLodLevel=i)};var _0x2fb003=(_0x787a90=!0,function(e,t){var i=_0x787a90?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x787a90=!1,i}),_0x348833=_0x2fb003(void 0,(function(){return _0x348833.toString().search("(((.+)+)+)+$").toString().constructor(_0x348833).search("(((.+)+)+)+$")})),_0x787a90;_0x348833(),_0x4cd9cc.prototype._debugPushGroup=function(e,t){this._options.enableGPUDebugMarkers&&(0===t||1===t?(0===t?this._renderEncoder:this._renderTargetEncoder).pushDebugGroup(e):this._currentRenderPass?this._currentRenderPass.pushDebugGroup(e):this._pendingDebugCommands.push(["push",e]))},_0x4cd9cc.prototype._debugPopGroup=function(e){this._options.enableGPUDebugMarkers&&(0===e||1===e?(0===e?this._renderEncoder:this._renderTargetEncoder).popDebugGroup():this._currentRenderPass?this._currentRenderPass.popDebugGroup():this._pendingDebugCommands.push(["pop",null]))},_0x4cd9cc.prototype._debugInsertMarker=function(e,t){this._options.enableGPUDebugMarkers&&(0===t||1===t?(0===t?this._renderEncoder:this._renderTargetEncoder).insertDebugMarker(e):this._currentRenderPass?this._currentRenderPass.insertDebugMarker(e):this._pendingDebugCommands.push(["insert",e]))},_0x4cd9cc.prototype._debugFlushPendingCommands=function(){for(var e=0;e<this._pendingDebugCommands.length;++e){var t=this._pendingDebugCommands[e],i=t[0],n=t[1];switch(i){case"push":this._debugPushGroup(n);break;case"pop":this._debugPopGroup();break;case"insert":this._debugInsertMarker(n)}}this._pendingDebugCommands.length=0};var _0x2d761c=(_0xe04421=!0,function(e,t){var i=_0xe04421?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe04421=!1,i}),_0x3a8482=_0x2d761c(void 0,(function(){return _0x3a8482.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a8482).search("(((.+)+)+)+$")})),_0xe04421;_0x3a8482(),_0x4cd9cc.prototype.updateDynamicIndexBuffer=function(e,t,i){void 0===i&&(i=0);var n,r=e;n=e.is32Bits?t instanceof Uint32Array?t:new Uint32Array(t):t instanceof Uint16Array?t:new Uint16Array(t),this._bufferManager.setSubData(r,i,n)},_0x4cd9cc.prototype.updateDynamicVertexBuffer=function(e,t,i,n){var r,o=e;void 0===i&&(i=0),void 0===n?n=(r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t).byteLength:r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t,this._bufferManager.setSubData(o,i,r,0,n)};var _0x3ad8fe=(_0x8d7bc4=!0,function(e,t){var i=_0x8d7bc4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x8d7bc4=!1,i}),_0x14fe50=_0x3ad8fe(void 0,(function(){return _0x14fe50.toString().search("(((.+)+)+)+$").toString().constructor(_0x14fe50).search("(((.+)+)+)+$")})),_0x8d7bc4;_0x14fe50(),_0x4cd9cc.prototype.createDynamicTexture=function(e,t,i,n){var r=new InternalTexture(this,InternalTextureSource.Dynamic);return r.baseWidth=e,r.baseHeight=t,i&&(e=this.needPOTTextures?_0x265690.GetExponentOfTwo(e,this._caps.maxTextureSize):e,t=this.needPOTTextures?_0x265690.GetExponentOfTwo(t,this._caps.maxTextureSize):t),r.width=e,r.height=t,r.isReady=!1,r.generateMipMaps=i,r.samplingMode=n,this.updateTextureSamplingMode(n,r),this._internalTexturesCache.push(r),r},_0x4cd9cc.prototype.updateDynamicTexture=function(e,t,i,n,r,o,a){var s;if(void 0===n&&(n=!1),e){var l=t.width,u=t.height,c=e._hardwareTexture;!(null===(s=e._hardwareTexture)||void 0===s?void 0:s.underlyingResource)&&(c=this._textureHelper.createGPUTextureForInternalTexture(e,l,u)),this._textureHelper.updateTexture(t,e,l,u,e.depth,c.format,0,0,i,n,0,0,a),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder),e.isReady=!0}};var _0x4e438e=(_0x1d88bc=!0,function(e,t){var i=_0x1d88bc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d88bc=!1,i}),_0x314bf6=_0x4e438e(void 0,(function(){return _0x314bf6.toString().search("(((.+)+)+)+$").toString().constructor(_0x314bf6).search("(((.+)+)+)+$")})),_0x1d88bc;function _0x5049e5(e){return _0x5228e4$1.call(this,e)||this}_0x314bf6(),_0x5228e4$1&&(_0x5049e5.__proto__=_0x5228e4$1),_0x5049e5.prototype=Object.create(_0x5228e4$1&&_0x5228e4$1.prototype),_0x5049e5.prototype.constructor=_0x5228e4$1;var _0x2d0375=(_0x2ca0a5=!0,function(e,t){var i=_0x2ca0a5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ca0a5=!1,i}),_0x8ef12c=_0x2d0375(void 0,(function(){return _0x8ef12c.toString().search("(((.+)+)+)+$").toString().constructor(_0x8ef12c).search("(((.+)+)+)+$")})),_0x2ca0a5;_0x8ef12c(),_0x4cd9cc.prototype.createExternalTexture=function(e){return new _0x5049e5(e)},_0x4cd9cc.prototype.setExternalTexture=function(e,t){t?this._setInternalTexture(e,t):this._currentMaterialContext.setTexture(e,null)};var _0x213ee2=(_0x3d821a=!0,function(e,t){var i=_0x3d821a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3d821a=!1,i}),_0x1802d7=_0x213ee2(void 0,(function(){return _0x1802d7.toString().search("(((.+)+)+)+$").toString().constructor(_0x1802d7).search("(((.+)+)+)+$")})),_0x3d821a;_0x1802d7(),_0x4cd9cc.prototype.unBindMultiColorAttachmentFramebuffer=function(e,t,i){void 0===t&&(t=!1),i&&i();var n=e._attachments.length;this._currentRenderPass&&this._currentRenderPass!==this._mainRenderPassWrapper.renderPass&&this._endRenderTargetRenderPass();for(var r=0;r<n;r++){var o=e.textures[r];o.generateMipMaps&&!t&&!o.isCube&&this._generateMipmaps(o)}this._currentRenderTarget=null,this._mrtAttachments=[],this._cacheRenderPipeline.setMRT([]),this._cacheRenderPipeline.setMRTAttachments(this._mrtAttachments),this._currentRenderPass=this._mainRenderPassWrapper.renderPass,this._setDepthTextureFormat(this._mainRenderPassWrapper),this._setColorFormat(this._mainRenderPassWrapper)},_0x4cd9cc.prototype.createMultipleRenderTarget=function(e,t,i){var n,r=!1,o=!0,a=!1,s=!1,l=_0x333f62.TEXTUREFORMAT_DEPTH16,u=1,c=_0x333f62.TEXTURETYPE_UNSIGNED_INT,h=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE,d=new Array,f=new Array,p=new Array,_=this._createHardwareRenderTargetWrapper(!0,!1,e);void 0!==t&&(r=void 0!==t.generateMipMaps&&t.generateMipMaps,o=void 0===t.generateDepthBuffer||t.generateDepthBuffer,a=void 0!==t.generateStencilBuffer&&t.generateStencilBuffer,s=void 0!==t.generateDepthTexture&&t.generateDepthTexture,u=t.textureCount||1,l=null!==(n=t.depthTextureFormat)&&void 0!==n?n:_0x333f62.TEXTUREFORMAT_DEPTH16,t.types&&(d=t.types),t.samplingModes&&(f=t.samplingModes),t.useSRGBBuffers&&(p=t.useSRGBBuffers));var m=e.width||e,g=e.height||e,x=null;(o||a||s)&&(x=_.createDepthStencilTexture(0,!1,a,1,l));var y=[],v=[],$=[];_._generateDepthBuffer=o,_._generateStencilBuffer=a,_._attachments=v,_._defaultAttachments=$;for(var b=0;b<u;b++){var T=f[b]||h,C=d[b]||c,S=p[b]||false;C!==_0x333f62.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?C===_0x333f62.TEXTURETYPE_HALF_FLOAT&&!this._caps.textureHalfFloatLinearFiltering&&(T=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE):T=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,C===_0x333f62.TEXTURETYPE_FLOAT&&!this._caps.textureFloat&&(C=_0x333f62.TEXTURETYPE_UNSIGNED_INT,_Misc_logger__WEBPACK_IMPORTED_MODULE_1__.Logger.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type"));var w=new InternalTexture(this,InternalTextureSource.MultiRenderTarget);y.push(w),v.push(b+1),$.push(i?b+1:0===b?1:0),w.baseWidth=m,w.baseHeight=g,w.width=m,w.height=g,w.isReady=!0,w.samples=1,w.generateMipMaps=r,w.samplingMode=T,w.type=C,w._cachedWrapU=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,w._cachedWrapV=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,w._useSRGBBuffer=S,this._internalTexturesCache.push(w),this._textureHelper.createGPUTextureForInternalTexture(w)}return x&&(x.incrementReferences(),y.push(x),this._internalTexturesCache.push(x)),_.setTextures(y),_},_0x4cd9cc.prototype.updateMultipleRenderTargetTextureSampleCount=function(e,t){if(!e||!e.textures||e.textures[0].samples===t)return t;var i=e.textures.length;if(0===i)return 1;t=Math.min(t,this.getCaps().maxMSAASamples);for(var n=0;n<i;++n){var r=e.textures[n];this._textureHelper.createMSAATexture(r,t),r.samples=t}return e._depthStencilTexture&&e._depthStencilTexture!==e.textures[e.textures.length-1]&&(this._textureHelper.createMSAATexture(e._depthStencilTexture,t),e._depthStencilTexture.samples=t),t},_0x4cd9cc.prototype.bindAttachments=function(e){0!==e.length&&this._currentRenderTarget&&(this._mrtAttachments=e,this._currentRenderPass&&this._cacheRenderPipeline.setMRTAttachments(e))},_0x4cd9cc.prototype.buildTextureLayout=function(e){for(var t=[],i=0;i<e.length;i++)e[i]?t.push(i+1):t.push(0);return t},_0x4cd9cc.prototype.restoreSingleAttachment=function(){},_0x4cd9cc.prototype.restoreSingleAttachmentForRenderTarget=function(){};var _0x4b6273=(_0x27d620=!0,function(e,t){var i=_0x27d620?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27d620=!1,i}),_0x3f0411=_0x4b6273(void 0,(function(){return _0x3f0411.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f0411).search("(((.+)+)+)+$")})),_0x27d620;_0x3f0411(),_0x4cd9cc.prototype.getGPUFrameTimeCounter=function(){return this._timestampQuery.gpuFrameTimeCounter},_0x4cd9cc.prototype.captureGPUFrameTime=function(e){this._timestampQuery.enable=e&&!!this._caps.timerQuery},_0x4cd9cc.prototype.createQuery=function(){return this._occlusionQuery.createQuery()},_0x4cd9cc.prototype.deleteQuery=function(e){return this._occlusionQuery.deleteQuery(e),this},_0x4cd9cc.prototype.isQueryResultAvailable=function(e){return this._occlusionQuery.isQueryResultAvailable(e)},_0x4cd9cc.prototype.getQueryResult=function(e){return this._occlusionQuery.getQueryResult(e)},_0x4cd9cc.prototype.getQueryResultFrameID=function(e){return this._occlusionQuery.getQueryResultFrameID()},_0x4cd9cc.prototype.beginOcclusionQuery=function(e,t){var i;return this.compatibilityMode?!!this._occlusionQuery.canBeginQuery&&(null===(i=this._currentRenderPass)||void 0===i||i.beginOcclusionQuery(t),!0):((0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget).addItem(new WebGPURenderItemBeginOcclusionQuery(t)),!0)},_0x4cd9cc.prototype.endOcclusionQuery=function(){var e;this.compatibilityMode?null===(e=this._currentRenderPass)||void 0===e||e.endOcclusionQuery():(0===this._getCurrentRenderPassIndex()?this._bundleList:this._bundleListRenderTarget).addItem(new WebGPURenderItemEndOcclusionQuery);return this};var _0x47d563=(_0x45a8aa=!0,function(e,t){var i=_0x45a8aa?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45a8aa=!1,i}),_0x440a31=_0x47d563(void 0,(function(){return _0x440a31.toString().search("(((.+)+)+)+$").toString().constructor(_0x440a31).search("(((.+)+)+)+$")})),_0x45a8aa;function _0x25b577(e,t,i,n){var r,o=1;n===_0x333f62.TEXTURETYPE_FLOAT?r=new Float32Array(t*i*4):n===_0x333f62.TEXTURETYPE_HALF_FLOAT?(r=new Uint16Array(t*i*4),o=15360):r=n===_0x333f62.TEXTURETYPE_UNSIGNED_INTEGER?new Uint32Array(t*i*4):new Uint8Array(t*i*4);for(var a=0;a<t;a++)for(var s=0;s<i;s++){var l=3*(s*t+a),u=4*(s*t+a);r[u+0]=e[l+0],r[u+1]=e[l+1],r[u+2]=e[l+2],r[u+3]=o}return r}_0x440a31(),_0x4cd9cc.prototype.createRawTexture=function(e,t,i,n,r,o,a,s,l,u,c,h,d){void 0===s&&(s=null),void 0===l&&(l=_0x333f62.TEXTURETYPE_UNSIGNED_INT),void 0===u&&(u=0),void 0===c&&(c=!1),void 0===h&&(h=1),void 0===d&&(d=1);var f=new InternalTexture(this,InternalTextureSource.Raw);return f.baseWidth=t,f.baseHeight=i,f.width=t,f.height=i,f.format=n,f.generateMipMaps=r,f.mipmapCount=h,f.samples=d,f.samplingMode=a,f.invertY=o,f._compression=s,f.type=l,f._useSRGBBuffer=c,!this._doNotHandleContextLost&&(f._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(f,t,i,void 0,u),this.updateRawTexture(f,e,n,o,s,l,c),this._internalTexturesCache.push(f),f},_0x4cd9cc.prototype.updateRawTexture=function(e,t,i,n,r,o,a,s){if(void 0===r&&(r=null),void 0===o&&(o=_0x333f62.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),void 0===s&&(s=0),e){if(!this._doNotHandleContextLost&&(e._bufferView=t,e.invertY=n,e._compression=r,e._useSRGBBuffer=a),t){var l=e._hardwareTexture;i===_0x333f62.TEXTUREFORMAT_RGB&&(t=_0x25b577(t,e.width,e.height,o));var u=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(u,e,e.width,e.height,e.depth,l.format,0,s,n,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0}},_0x4cd9cc.prototype.updateSubRawTexture=function(e,t,i,n,r,o,a,s,l,u,c,h){if(void 0===r&&(r=null),void 0===o&&(o=_0x333f62.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),void 0===h&&(h=0),e){if(!this._doNotHandleContextLost&&(e._bufferView=t,e.invertY=n,e._compression=r,e._useSRGBBuffer=a),t){var d=e._hardwareTexture;i===_0x333f62.TEXTUREFORMAT_RGB&&(t=_0x25b577(t,s,l,o));var f=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(f,e,s,l,e.depth,d.format,0,h,n,!1,u,c),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0}},_0x4cd9cc.prototype.createRawCubeTexture=function(e,t,i,n,r,o,a,s){void 0===s&&(s=null);var l=new InternalTexture(this,InternalTextureSource.CubeRaw);return n!==_0x333f62.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering?n!==_0x333f62.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering?n!==_0x333f62.TEXTURETYPE_FLOAT||this._caps.textureFloatRender?n===_0x333f62.TEXTURETYPE_HALF_FLOAT&&!this._caps.colorBufferFloat&&(r=!1,_0x50f23a.Warn("Render to half float textures is not supported. Mipmap generation forced to false.")):(r=!1,_0x50f23a.Warn("Render to float textures is not supported. Mipmap generation forced to false.")):(r=!1,a=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,_0x50f23a.Warn("Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")):(r=!1,a=_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,_0x50f23a.Warn("Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")),l.isCube=!0,l.format=i===_0x333f62.TEXTUREFORMAT_RGB?_0x333f62.TEXTUREFORMAT_RGBA:i,l.type=n,l.generateMipMaps=r,l.width=t,l.height=t,l.samplingMode=a,!this._doNotHandleContextLost&&(l._bufferViewArray=e),l._cachedWrapU=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,l._cachedWrapV=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,this._textureHelper.createGPUTextureForInternalTexture(l),e&&this.updateRawCubeTexture(l,e,i,n,o,s),l},_0x4cd9cc.prototype.updateRawCubeTexture=function(e,t,i,n,r,o){void 0===o&&(o=null),e._bufferViewArray=t,e.invertY=r,e._compression=o;for(var a=e._hardwareTexture,s=i===_0x333f62.TEXTUREFORMAT_RGB,l=[],u=0;u<t.length;++u){var c=t[u];s&&(c=_0x25b577(t[u],e.width,e.height,n)),l.push(new Uint8Array(c.buffer,c.byteOffset,c.byteLength))}this._textureHelper.updateCubeTextures(l,a.underlyingResource,e.width,e.height,a.format,r,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder),e.isReady=!0},_0x4cd9cc.prototype.createRawCubeTextureFromUrl=function(e,t,i,n,r,o,a,s,l,u,c,h){var d=this;void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===h&&(h=!1);var f=this.createRawCubeTexture(null,i,n,r,!o,h,c,null);null==t||t._addPendingData(f),f.url=e,this._internalTexturesCache.push(f);return this._loadFile(e,(function(e){!function(e){var i=f.width,o=a(e);if(o){var u=[0,2,4,1,3,5];if(s)for(var c=n===_0x333f62.TEXTUREFORMAT_RGB,p=s(o),_=f._hardwareTexture,m=[0,1,2,3,4,5],g=0;g<p.length;g++){for(var x=i>>g,y=[],v=0;v<6;v++){var $=p[g][m[v]];c&&($=_0x25b577($,x,x,r)),y.push(new Uint8Array($.buffer,$.byteOffset,$.byteLength))}d._textureHelper.updateCubeTextures(y,_.underlyingResource,x,x,_.format,h,!1,0,0)}else{for(y=[],v=0;v<6;v++)y.push(o[u[v]]);d.updateRawCubeTexture(f,y,n,r,h)}f.isReady=!0,null==t||t._removePendingData(f),l&&l()}}(e)}),void 0,null==t?void 0:t.offlineProvider,!0,(function(e,i){null==t||t._removePendingData(f),u&&e&&u(e.status+" "+e.statusText,i)})),f},_0x4cd9cc.prototype.createRawTexture3D=function(e,t,i,n,r,o,a,s,l,u,c){void 0===l&&(l=null),void 0===u&&(u=_0x333f62.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=0);var h=new InternalTexture(this,InternalTextureSource.Raw3D);return h.baseWidth=t,h.baseHeight=i,h.baseDepth=n,h.width=t,h.height=i,h.depth=n,h.format=r,h.type=u,h.generateMipMaps=o,h.samplingMode=s,h.is3D=!0,!this._doNotHandleContextLost&&(h._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(h,t,i,void 0,c),this.updateRawTexture3D(h,e,r,a,l,u),this._internalTexturesCache.push(h),h},_0x4cd9cc.prototype.updateRawTexture3D=function(e,t,i,n,r,o){if(void 0===r&&(r=null),void 0===o&&(o=_0x333f62.TEXTURETYPE_UNSIGNED_INT),!this._doNotHandleContextLost&&(e._bufferView=t,e.format=i,e.invertY=n,e._compression=r),t){var a=e._hardwareTexture;i===_0x333f62.TEXTUREFORMAT_RGB&&(t=_0x25b577(t,e.width,e.height,o));var s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(s,e,e.width,e.height,e.depth,a.format,0,0,n,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0},_0x4cd9cc.prototype.createRawTexture2DArray=function(e,t,i,n,r,o,a,s,l,u,c){void 0===l&&(l=null),void 0===u&&(u=_0x333f62.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=0);var h=new InternalTexture(this,InternalTextureSource.Raw2DArray);return h.baseWidth=t,h.baseHeight=i,h.baseDepth=n,h.width=t,h.height=i,h.depth=n,h.format=r,h.type=u,h.generateMipMaps=o,h.samplingMode=s,h.is2DArray=!0,!this._doNotHandleContextLost&&(h._bufferView=e),this._textureHelper.createGPUTextureForInternalTexture(h,t,i,n,c),this.updateRawTexture2DArray(h,e,r,a,l,u),this._internalTexturesCache.push(h),h},_0x4cd9cc.prototype.updateRawTexture2DArray=function(e,t,i,n,r,o){if(void 0===r&&(r=null),void 0===o&&(o=_0x333f62.TEXTURETYPE_UNSIGNED_INT),!this._doNotHandleContextLost&&(e._bufferView=t,e.format=i,e.invertY=n,e._compression=r),t){var a=e._hardwareTexture;i===_0x333f62.TEXTUREFORMAT_RGB&&(t=_0x25b577(t,e.width,e.height,o));var s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);this._textureHelper.updateTexture(s,e,e.width,e.height,e.depth,a.format,0,0,n,!1,0,0),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder)}e.isReady=!0};var _0x1557ba=(_0x265613=!0,function(e,t){var i=_0x265613?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x265613=!1,i}),_0xb89011=_0x1557ba(void 0,(function(){return _0xb89011.toString().search("(((.+)+)+)+$").toString().constructor(_0xb89011).search("(((.+)+)+)+$")})),_0x265613;_0xb89011(),_0x4cd9cc.prototype._readTexturePixels=function(e,t,i,n,r,o,a,s,l,u){void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=!0),void 0===s&&(s=!1),void 0===l&&(l=0),void 0===u&&(u=0);var c=e._hardwareTexture;return a&&this.flushFramebuffer(),this._textureHelper.readPixels(c.underlyingResource,l,u,t,i,c.format,n,r,o,s)},_0x4cd9cc.prototype._readTexturePixelsSync=function(){throw"_readTexturePixelsSync is unsupported in WebGPU!"};var _0x1abc72=(_0xe7f70d=!0,function(e,t){var i=_0xe7f70d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe7f70d=!1,i}),_0x1e6926=_0x1abc72(void 0,(function(){return _0x1e6926.toString().search("(((.+)+)+)+$").toString().constructor(_0x1e6926).search("(((.+)+)+)+$")})),_0xe7f70d;function _0x4ca372(){var e=_0x3ebbca.call(this,arguments)||this;return e}_0x1e6926(),_0x3ebbca&&(_0x4ca372.__proto__=_0x3ebbca),_0x4ca372.prototype=Object.create(_0x3ebbca&&_0x3ebbca.prototype),_0x4ca372.prototype.constructor=_0x3ebbca;var _0x1ffea6=(_0x2e23fc=!0,function(e,t){var i=_0x2e23fc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e23fc=!1,i}),_0x33ffeb=_0x1ffea6(void 0,(function(){return _0x33ffeb.toString().search("(((.+)+)+)+$").toString().constructor(_0x33ffeb).search("(((.+)+)+)+$")})),_0x2e23fc;_0x33ffeb(),_0x4cd9cc.prototype._createHardwareRenderTargetWrapper=function(e,t,i){var n=new _0x4ca372(e,t,i,this);return this._renderTargetWrapperCache.push(n),n},_0x4cd9cc.prototype.createRenderTargetTexture=function(e,t){var i,n=this._createHardwareRenderTargetWrapper(!1,!1,e),r={};void 0!==t&&"object"==typeof t?(r.generateMipMaps=t.generateMipMaps,r.generateDepthBuffer=void 0===t.generateDepthBuffer||t.generateDepthBuffer,r.generateStencilBuffer=r.generateDepthBuffer&&t.generateStencilBuffer,r.samplingMode=void 0===t.samplingMode?_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,r.creationFlags=null!==(i=t.creationFlags)&&void 0!==i?i:0,r.noColorTarget=!!t.noColorTarget):(r.generateMipMaps=t,r.generateDepthBuffer=!0,r.generateStencilBuffer=!1,r.samplingMode=_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE,r.creationFlags=0,r.noColorTarget=!1);var o=r.noColorTarget?null:this._createInternalTexture(e,t,!0,InternalTextureSource.RenderTarget);return n._generateDepthBuffer=r.generateDepthBuffer,n._generateStencilBuffer=!!r.generateStencilBuffer,n.setTextures(o),(n._generateDepthBuffer||n._generateStencilBuffer)&&n.createDepthStencilTexture(0,void 0===r.samplingMode||r.samplingMode===_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE||r.samplingMode===_0x333f62.TEXTURE_LINEAR_LINEAR||r.samplingMode===_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE||r.samplingMode===_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR||r.samplingMode===_0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST||r.samplingMode===_0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR||r.samplingMode===_0x333f62.TEXTURE_NEAREST_LINEAR||r.samplingMode===_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST,n._generateStencilBuffer,n.samples),o&&(void 0!==t&&"object"==typeof t&&t.createMipMaps&&!r.generateMipMaps&&(o.generateMipMaps=!0),this._textureHelper.createGPUTextureForInternalTexture(o,void 0,void 0,void 0,r.creationFlags),void 0!==t&&"object"==typeof t&&t.createMipMaps&&!r.generateMipMaps&&(o.generateMipMaps=!1)),n},_0x4cd9cc.prototype._createDepthStencilTexture=function(e,t){var i=new InternalTexture(this,InternalTextureSource.DepthStencil),n=t.samples?t.samples:1,r=!t.generateStencil||t.generateStencil,o=!!t.bilinearFiltering&&t.bilinearFiltering,a=t.depthTextureFormat?t.depthTextureFormat:r?_0x333f62.TEXTUREFORMAT_DEPTH24_STENCIL8:_0x333f62.TEXTUREFORMAT_DEPTH32_FLOAT,s=t.comparisonFunction?t.comparisonFunction:0,l={};return l.comparisonFunction=s,l.generateStencil=r,l.bilinearFiltering=o,l.samples=n,l.depthTextureFormat=a,i.format=l.depthTextureFormat,this._setupDepthStencilTexture(i,e,l.generateStencil,l.bilinearFiltering,l.comparisonFunction,l.samples),this._textureHelper.createGPUTextureForInternalTexture(i),this._internalTexturesCache.push(i),i},_0x4cd9cc.prototype._setupDepthStencilTexture=function(e,t,i,n,r,o){void 0===o&&(o=1);var a=t.width||t,s=t.height||t,l=t.layers||0;e.baseWidth=a,e.baseHeight=s,e.width=a,e.height=s,e.is2DArray=l>0,e.depth=l,e.isReady=!0,e.samples=o,e.generateMipMaps=!1,e.samplingMode=n?_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE:_0x333f62.TEXTURE_NEAREST_SAMPLINGMODE,e.type=_0x333f62.TEXTURETYPE_FLOAT,e._comparisonFunction=r,e._cachedWrapU=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE,e._cachedWrapV=_0x333f62.TEXTURE_CLAMP_ADDRESSMODE},_0x4cd9cc.prototype.updateRenderTargetTextureSampleCount=function(e,t){return e&&e.texture&&e.samples!==t?(t=Math.min(t,this.getCaps().maxMSAASamples),this._textureHelper.createMSAATexture(e.texture,t),e._depthStencilTexture&&(this._textureHelper.createMSAATexture(e._depthStencilTexture,t),e._depthStencilTexture.samples=t),e.texture.samples=t,t):t};var _0x5b02da=(_0x327eb3=!0,function(e,t){var i=_0x327eb3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x327eb3=!1,i}),_0x5cb998=_0x5b02da(void 0,(function(){return _0x5cb998.toString().search("(((.+)+)+)+$").toString().constructor(_0x5cb998).search("(((.+)+)+)+$")})),_0x327eb3;_0x5cb998(),_0x4cd9cc.prototype.createRenderTargetCubeTexture=function(e,t){var i=this._createHardwareRenderTargetWrapper(!1,!0,e),n=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:_constants__WEBPACK_IMPORTED_MODULE_2__.Constants.TEXTURETYPE_UNSIGNED_INT,samplingMode:_constants__WEBPACK_IMPORTED_MODULE_2__.Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,format:_constants__WEBPACK_IMPORTED_MODULE_2__.Constants.TEXTUREFORMAT_RGBA,samples:1},t);n.generateStencilBuffer=n.generateDepthBuffer&&n.generateStencilBuffer,i._generateDepthBuffer=n.generateDepthBuffer,i._generateStencilBuffer=n.generateStencilBuffer;var r=new InternalTexture(this,InternalTextureSource.RenderTarget);return r.width=e,r.height=e,r.depth=0,r.isReady=!0,r.isCube=!0,r.samples=n.samples,r.generateMipMaps=n.generateMipMaps,r.samplingMode=n.samplingMode,r.type=n.type,r.format=n.format,this._internalTexturesCache.push(r),i.setTextures(r),(i._generateDepthBuffer||i._generateStencilBuffer)&&i.createDepthStencilTexture(0,void 0===n.samplingMode||n.samplingMode===_0x333f62.TEXTURE_BILINEAR_SAMPLINGMODE||n.samplingMode===_0x333f62.TEXTURE_LINEAR_LINEAR||n.samplingMode===_0x333f62.TEXTURE_TRILINEAR_SAMPLINGMODE||n.samplingMode===_0x333f62.TEXTURE_LINEAR_LINEAR_MIPLINEAR||n.samplingMode===_0x333f62.TEXTURE_NEAREST_LINEAR_MIPNEAREST||n.samplingMode===_0x333f62.TEXTURE_NEAREST_LINEAR_MIPLINEAR||n.samplingMode===_0x333f62.TEXTURE_NEAREST_LINEAR||n.samplingMode===_0x333f62.TEXTURE_LINEAR_LINEAR_MIPNEAREST,i._generateStencilBuffer,i.samples),t&&t.createMipMaps&&!n.generateMipMaps&&(r.generateMipMaps=!0),this._textureHelper.createGPUTextureForInternalTexture(r),t&&t.createMipMaps&&!n.generateMipMaps&&(r.generateMipMaps=!1),i};var _0x5b53af=(_0x43a0fc=!0,function(e,t){var i=_0x43a0fc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x43a0fc=!1,i}),_0x2cc4d2=_0x5b53af(void 0,(function(){return _0x2cc4d2.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cc4d2).search("(((.+)+)+)+$")})),_0x43a0fc;_0x2cc4d2(),_0x4cd9cc.prototype.setTextureSampler=function(e,t){var i;null===(i=this._currentMaterialContext)||void 0===i||i.setSampler(e,t)};var _0x19b1cc=(_0x2c103b=!0,function(e,t){var i=_0x2c103b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c103b=!1,i}),_0x5c55e5=_0x19b1cc(void 0,(function(){return _0x5c55e5.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c55e5).search("(((.+)+)+)+$")})),_0x2c103b;_0x5c55e5(),_0x57b60b.prototype.setStorageBuffer=function(e,t){this._engine.setStorageBuffer(e,t)},_0x4cd9cc.prototype.createStorageBuffer=function(e,t){return this._createBuffer(e,t|_0x333f62.BUFFER_CREATIONFLAG_STORAGE)},_0x4cd9cc.prototype.updateStorageBuffer=function(e,t,i,n){var r,o=e;void 0===i&&(i=0),void 0===n?n=(r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t).byteLength:r=t instanceof Array?new Float32Array(t):t instanceof ArrayBuffer?new Uint8Array(t):t,this._bufferManager.setSubData(o,i,r,0,n)},_0x4cd9cc.prototype.readFromStorageBuffer=function(e,t,i,n){var r=this;i=i||e.capacity;var o=this._bufferManager.createRawBuffer(i,_0x5213c6.BufferUsage.MapRead|_0x5213c6.BufferUsage.CopyDst);return this._renderTargetEncoder.copyBufferToBuffer(e.underlyingResource,null!=t?t:0,o,0,i),new Promise((function(e,t){r.onEndFrameObservable.addOnce((function(){o.mapAsync(_0x5213c6.MapMode.Read,0,i).then((function(){var t=o.getMappedRange(0,i),a=n;if(void 0===a)(a=new Uint8Array(i)).set(new Uint8Array(t));else{var s=a.constructor;(a=new s(a.buffer)).set(new s(t))}o.unmap(),r._bufferManager.releaseBuffer(o),e(a)}),(function(e){return t(e)}))}))}))},_0x4cd9cc.prototype.setStorageBuffer=function(e,t){var i,n;null===(i=this._currentDrawContext)||void 0===i||i.setBuffer(e,null!==(n=null==t?void 0:t.getBuffer())&&void 0!==n?n:null)};var _0x387f22=(_0x6d593=!0,function(e,t){var i=_0x6d593?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x6d593=!1,i}),_0x2826db=_0x387f22(void 0,(function(){return _0x2826db.toString().search("(((.+)+)+)+$").toString().constructor(_0x2826db).search("(((.+)+)+)+$")})),_0x6d593;_0x2826db(),_0x4cd9cc.prototype.createUniformBuffer=function(e){var t;return t=e instanceof Array?new Float32Array(e):e,this._bufferManager.createBuffer(t,_0x5213c6.BufferUsage.Uniform|_0x5213c6.BufferUsage.CopyDst)},_0x4cd9cc.prototype.createDynamicUniformBuffer=function(e){return this.createUniformBuffer(e)},_0x4cd9cc.prototype.updateUniformBuffer=function(e,t,i,n){void 0===i&&(i=0);var r,o=e;void 0===n?n=(r=t instanceof Float32Array?t:new Float32Array(t)).byteLength:r=t instanceof Float32Array?t:new Float32Array(t),this._bufferManager.setSubData(o,i,r,0,n)},_0x4cd9cc.prototype.bindUniformBufferBase=function(e,t,i){this._currentDrawContext.setBuffer(i,e)},_0x4cd9cc.prototype.bindUniformBlock=function(){};var _0x4a7659=(_0x1c2711=!0,function(e,t){var i=_0x1c2711?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c2711=!1,i}),_0x546c47=_0x4a7659(void 0,(function(){return _0x546c47.toString().search("(((.+)+)+)+$").toString().constructor(_0x546c47).search("(((.+)+)+)+$")})),_0x1c2711;function _0x5415fd(e){return!(!e||void 0===e.underlyingResource)}function f$8(e,t,i){var n=i$i.call(this,e,t)||this;n._engine=i;var r=i.caps;n._drawBuffers=r.drawBuffersExtension,e$1W._maximumCombinedTextureImageUnits=r.maxCombinedTexturesImageUnits,e$1W._maximumCubeMapSize=u$Z(r.maxCubemapTextureSize,8192),e$1W._maximumFragmentUniformVectors=r.maxFragmentUniformVectors,e$1W._maximumTextureImageUnits=u$Z(r.maxTexturesImageUnits,16),e$1W._maximumRenderbufferSize=u$Z(r.maxRenderTextureSize,4096),e$1W._maximumTextureSize=u$Z(r.maxTextureSize,4096),e$1W._maximumVaryingVectors=u$Z(r.maxVaryingVectors,16),e$1W._maximumVertexAttributes=u$Z(r.maxVertexAttribs,16),e$1W._maximumVertexTextureImageUnits=u$Z(r.maxVertexTextureImageUnits,16),e$1W._maximumVertexUniformVectors=u$Z(r.maxVertexUniformVectors,256),e$1W._minimumAliasedLineWidth=1,e$1W._maximumAliasedLineWidth=1,e$1W._minimumAliasedPointSize=1,e$1W._maximumAliasedPointSize=1,e$1W._maximumViewportWidth=32767,e$1W._maximumViewportHeight=32767,e$1W._highpFloatSupported=r.highPrecisionShaderSupported,e$1W._highpIntSupported=r.highPrecisionShaderSupported,e$1W._maximumTextureFilterAnisotropy=r.maxAnisotropy,e$1W._maximumDrawBuffers=n.drawBuffers?16:1,e$1W._maximumColorAttachments=n.drawBuffers?16:1,e$1W._maximumSamples=r.maxMSAASamples,n._antialias=!0,n._standardDerivatives=r.standardDerivatives,n._blendMinmax=r.blendMinMax,n._elementIndexUint=!0,n._depthTexture=r.depthTextureExtension,n._fragDepth=r.fragmentDepthSupported,n._debugShaders=!1;var o=r.textureLOD;n._textureFloat=r.textureFloat,n._textureHalfFloat=r.textureHalfFloat,n._textureFloatLinear=r.textureFloatLinearFiltering,n._textureHalfFloatLinear=r.textureHalfFloatLinearFiltering,n._sysShaderDefines=[],e$2e(n._standardDerivatives)&&n._standardDerivatives&&n._sysShaderDefines.push("GL_OES_standard_derivatives"),e$2e(n._fragDepth)&&n._fragDepth&&n._sysShaderDefines.push("GL_EXT_frag_depth"),e$2e(o)&&n._sysShaderDefines.push("GL_EXT_shader_texture_lod"),n._sysShaderDefines.push("WEBGPU"),n._colorBufferFloat=r.colorBufferFloat,n._floatBlend=!0,n._colorBufferHalfFloat=r.textureHalfFloat,n._s3tc=r.s3tc,n._pvrtc=r.pvrtc,n._etc1=r.etc1,n._astc=r.astc,n._etc=r.etc1,n._bc7=r.bptc,f$U.setKTX2SupportedFormats(n._s3tc,n._pvrtc,n._astc,n._etc,n._etc1,n._bc7),n.webglOptions={},i.saveCompiledShaderInIndexDB=!1,p$1d.halfZRange=!0}function B$4(e,t,i,n,r,o,a){var s=e._currentRenderState,l=e._currentPassState,u=e._currentViewport;e._currentRenderState=t,e._currentPassState=i,e._currentViewport=i.viewport,d$1m.partialApply(e._engine,s,t,l,i,u,i.viewport,n,r,o,a)}function b$9(e,t){t!==e._currentFramebuffer&&(e._currentFramebuffer=t,e$2e(t)?t._bind():e.engine.restoreDefaultFramebuffer())}_0x546c47(),_0x4cd9cc.prototype.updateVideoTexture=function(e,t,i){var n,r=this;if(e&&!e._isDisabled){void 0===this._videoTextureSupported&&(this._videoTextureSupported=!0);var o=e._hardwareTexture;!(null===(n=e._hardwareTexture)||void 0===n?void 0:n.underlyingResource)&&(o=this._textureHelper.createGPUTextureForInternalTexture(e)),_0x5415fd(t)?(this._textureHelper.copyVideoToTexture(t,e,o.format,!i),e.generateMipMaps&&this._generateMipmaps(e,this._uploadEncoder),e.isReady=!0):t&&this.createImageBitmap(t).then((function(t){r._textureHelper.updateTexture(t,e,e.width,e.height,e.depth,o.format,0,0,!i,!1,0,0),e.generateMipMaps&&r._generateMipmaps(e,r._uploadEncoder),e.isReady=!0})).catch((function(){e.isReady=!0}))}},i$i&&(f$8.__proto__=i$i),f$8.prototype=Object.create(i$i&&i$i.prototype),f$8.prototype.constructor=i$i,Object.defineProperties(f$8.prototype,{webgl2:{get:function(){return null}},webgpu:{get:function(){return!0}},engine:{get:function(){return this._engine}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return!0}},antialias:{get:function(){return this._antialias}},standardDerivatives:{get:function(){return!0}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},floatTextureSixPlaces:{get:function(){return!0}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},etc1:{get:function(){return this._etc1}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=wrapGL(this._originalGLContext,e?throwOnError:void 0)}},drawingBufferHeight:{get:function(){return this._engine.getRenderHeight(!0)}},drawingBufferWidth:{get:function(){return this._engine.getRenderWidth(!0)}},realDrawingBufferHeight:{get:function(){return this._engine.getRenderHeight(!0)}},realDrawingBufferWidth:{get:function(){return this._engine.getRenderWidth(!0)}}});var P$7=new t$W;function R$5(e,t,i,n,r){b$9(e,t);var o=e.drawingBufferWidth,a=e.drawingBufferHeight;e$2e(t)&&(o=t.textureSize.width,a=t.textureSize.height),B$4(e,r,i,!1,o,a,t),n._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,n.maximumTextureUnitIndex)}function A$9(e,t,i,n){var r=t._primitiveType,o=t._vertexArray,a=t._offset,s=t.instanceCount,l=e._engine;e._us.model=u$Z(t._modelMatrix,p$1d.IDENTITY),e._us.useRelativeOrigin=t.useRelativeOrigin,i._setUniforms(n,e._us,e.validateShaderProgram,t),o._bind();var u=R$12.toFillMode(r),c=t.occlusionQueryID;const h=e._engine.currentRenderPassId;c&&(void 0===e._renderPassIdForOcclusionQuery&&(e._renderPassIdForOcclusionQuery=l.createRenderPassId("Render pass for occlusion query")),l.currentRenderPassId=e._renderPassIdForOcclusionQuery,l._getCurrentRenderPass(),l.beginOcclusionQuery(null,c));var d=o.indexBuffer;if(e$2e(d)){const i=t._count||d.numberOfIndices;e._trangleCount+=i/3,l.drawElementsType(u,a,i,s,t)}else{const e=t._count||o.numberOfVertices;l.drawArraysType(u,a,e,s,t)}c&&(l.endOcclusionQuery(),l.currentRenderPassId=h)}f$8.prototype.clear=function(e,t){e=u$Z(e,P$7),t=u$Z(t,this._defaultPassState);var i=e.color,n=e.depth,r=e.stencil,o=null;e$2e(i)&&((o={}).r=i.red,o.g=i.green,o.b=i.blue,o.a=i.alpha);var a=!1;e$2e(n)&&(n!==this._clearDepth&&(this._clearDepth=n),a=!0);var s=!1;e$2e(r)&&(r!==this._clearStencil&&(this._clearStencil=r),s=!0);var l=u$Z(e.framebuffer,t.framebuffer);b$9(this,l);var u=this.drawingBufferWidth,c=this.drawingBufferHeight;B$4(this,u$Z(e.renderState,this._defaultRenderState),t,!0,u,c,l);this._engine.clear(o,!0,a,s),this._engine.flushFramebuffer()},f$8.prototype.draw=function(e,t,i,n){t=u$Z(t,this._defaultPassState);var r=u$Z(e._framebuffer,t.framebuffer),o=u$Z(e._renderState,this._defaultRenderState);i=u$Z(i,e._shaderProgram),n=u$Z(n,e._uniformMap),i._isReady()||i._createEffect(),e$2e(r)?e.setActiveFrameBufferID(r._inner.id):e.setActiveFrameBufferID(0),R$5(this,r,t,i,o),A$9(this,e,i,n)},f$8.prototype.endFrame=function(){this._engine.beginFrame(),this._engine.endFrame()};var g$9=new Array;f$8.prototype.readPixels=function(e){return console.log("webgpu use readPixelsAsync instead."),g$9[0]=0,g$9[1]=0,g$9[2]=0,g$9[3]=0,g$9},f$8.prototype.readPixelsAsync=function(e){e=u$Z(e,u$Z.EMPTY_OBJECT);var t=Math.max(u$Z(e.x,0),0),i=Math.max(u$Z(e.y,0),0),n=u$Z(e.width,this.drawingBufferWidth),r=u$Z(e.height,this.drawingBufferHeight),o=e.framebuffer;if(o$1q.typeOf.number.greaterThan("readState.width",n,0),o$1q.typeOf.number.greaterThan("readState.height",r,0),e$2e(o)){var a=o.getColorTexture(0)._inner.internalTexture._hardwareTexture;return this._engine.flushFramebuffer(),this._engine._textureHelper.readPixels(a.underlyingResource,t,i,n,r,a.format,0,0,null,!1)}return b$9(this,o),this._engine.readPixels(t,i,n,r)},f$8.prototype.resize=function(){this._engine.resize(!0)},f$8.prototype.isDestroyed=function(){return!1},f$8.prototype.destroy=function(){return i$i.prototype.destroy.call(this),i$11(this)};var ke$1=new r$U("MapQuest, SuperMap iServer Imagery"),ee$4=[1.690163571602655e-9,3.3803271432053056e-9,6.760654286410611e-9,1.3521308572821242e-8,2.7042617145642484e-8,5.408523429128511e-8,1.0817046858256998e-7,2.1634093716513974e-7,4.3268187433028044e-7,8.653637486605571e-7,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652,.007089059829027304,.014178119658054609,.028356239316109217,.056712478632218434,.11342495726443687,.2684991452887374],se$2=[1.690163571602655e-9,3.38026990562e-9,6.76053981124e-9,1.352107962249e-8,2.704215924497e-8,5.408431848995e-8,1.0816863697989e-7,2.1633727395979e-7,4.3267454791958e-7,8.6534909583916e-7,173069819167831e-20,346139638335662e-20,692279276671324e-20,1384558553342649e-20,2769117106685297e-20,5538234213370595e-20,.0001107646842674119,.0002215293685348238,.0004430587370696476,.0008861174741392952,.0017722349482785903,.0035444698965571807,.007088939793114361],P$6=function(e){if(!e$2e((e=u$Z(e,{})).url))throw new t$15("options.url is required.");this._baseUrl=e.url,this._prjCoordSys=e.prjCoordSys;var t=(n=e.url).substring(0,n.indexOf("/datas"));this.tablename=n.substring(n.indexOf("datas/")+6,n.length);var i=this;new l$14({name:t+this.tablename}).then((function(e){e.checkObjectStoreExit(i.tablename)?i._indexedDBScheduler=e:e.createObjectStore(i.tablename).then((function(){i._indexedDBScheduler=e}))})),this._indexedDBSetting={isOpen:!1,clear:function(){i._indexedDBScheduler.clear(i.tablename)},cache:[]},this.isSci3D=!1,this.isTileMap=u$Z(e.isTileMap,!1);var n=n$1a(e.url);if(this._packingRequest=e.packingRequest,n.indexOf("rest/maps")>-1?(this.isTileMap=!0,this.layersID=e.layersID):n.indexOf("rest/realspace")>-1&&(this.isSci3D=!0),this._url=n,this._resource=t$10.createIfNeeded(n),this._resolution=e$2e(e.highResolution)?2:1,this._transparent=u$Z(e.transparent,!0),this._name=e.name||"",this._urlTemplate=void 0,this._errorEvent=new o$1h,this._fileExtension="png",this._tileWidth=256,this._tileHeight=256,this._tileFormat=e.tileFormat||"png",this._scales=ee$4,this._rasterfunction=u$Z(e.rasterfunction,void 0),this._regions=e.regions,this._cache=u$Z(e._cache,!0),this._isBlock=!1,this._blockCache={},this._blockCacheQueue=new r$R,this._blockCacheSize=100,this._blockScale=0,this._tileversion=u$Z(e.tileversion,""),this._minimumLevel=u$Z(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=void 0,this._tilingScheme=e.tilingScheme,this._subdomains=e.subdomains,e$2e(e.tilingScheme)&&e$2e(e.tilingScheme._scaleDenominators)){this._scales=[];for(var r=0;r<e.tilingScheme._scaleDenominators.length;r++)this._scales[r]=1/e.tilingScheme._scaleDenominators[r]}this._flipY=!1,this._tileDiscardPolicy=e.tileDiscardPolicy,this._fRatio=u$Z(e.ratio,e$2d.DEGREES_PER_RADIAN/t$12.WGS84.maximumRadius),this._coordUnit="DEGREE",this._customRequestHeaders=e.customRequestHeaders;var o=u$Z(e.credit,ke$1);this._cacheKey=u$Z(e.cacheKey,""),this._cacheEnabled=u$Z(e.cacheEnabled,!0),"string"==typeof o&&(o=new r$U(o)),this._credit=o,this._ready=!1,this._readyPromise=o$1l.defer();i=this;e$2e(this._subdomains)&&(n=n.replace(/({.*?})/g,(function(e,t){if(!e$2e(i._subdomains.length))throw new t$15("detected subdomain url scheme, but no subdomain provided.");return"{s}"===t?i._subdomains[0]:e}))),this._layerStatusParameters=u$Z(e.layerStatusParameters,void 0),this._layerStatusParametersID=void 0;var a,s=!0;function l(){if(i.isTileMap){var e=n.slice(0,-1)+".json";e$2e(a$O.CREDENTIAL)&&(e=e$2e(a$O.CREDENTIAL._keymap[i._baseUrl])?a$O.addTokenWithKey(i._baseUrl,e):a$O.addToken(e)),e$2e(i._prjCoordSys)&&(e=e.includes("?")?e+"&prjCoordSys="+JSON.stringify(i._prjCoordSys):e+"?prjCoordSys="+JSON.stringify(i._prjCoordSys)),LicenseChecker.LICENSECHECKER.getLicense(e).then((function(e){LicenseChecker.LICENSECHECKER.check(e)}));var t=u$P(e,i.customRequestHeaders);o$1l.all([t,s]).then(c,h)}else{var r=n+"config";e$2e(a$O.CREDENTIAL)&&(r=e$2e(a$O.CREDENTIAL._keymap[i._baseUrl])?a$O.addTokenWithKey(i._baseUrl,r):a$O.addToken(r)),LicenseChecker.LICENSECHECKER.getLicense(r).then((function(e){LicenseChecker.LICENSECHECKER.check(e)})),o$1l.all([u$Q(r,i._customRequestHeaders),s]).then(u,h)}}function u(t){var n=function(e){var t=(e=d.parseFromString(e,"application/xml")).childNodes[0],n="http://www.supermap.com/SuperMapCache/sci3d",r=u$Z(Ae$3(t,"xmlns:sml"),n);K$3(t,"Version",r);var o=Ke$1(F$5(t,"StoreType",r),"BlockScale");"number"==typeof o&&(i._isBlock=!0,i._blockScale=o);for(var a=Pe$1(F$5(t,"Levels",r),"Level",r),s=[],l=0,u=a.length;l<u;l++)s.push(parseInt(a[l].textContent,10));var c=F$5(t,"Bounds",r),h=K$3(c,"Left",r),f=K$3(c,"Right",r),p=K$3(c,"Top",r),_=K$3(c,"Bottom",r),m=me$3(t,"FileExtentName",r),g=K$3(t,"CellWidth",r),x=K$3(t,"CellHeight",r),y=me$3(t,"CacheName",r);return i._name||(i._name=y||""),{left:h,right:f,top:p,bottom:_,fileExtentName:m,levels:s,imageSizeWidth:g,imageSizeHeight:x}}(t[0]);i._fileExtension=u$Z(n.fileExtentName,"png"),i._tileWidth=u$Z(n.imageSizeWidth,256),i._tileHeight=u$Z(n.imageSizeHeight,256);var r=n.levels,o=r.length;i._minimumLevel=u$Z(r[0],0),i._maximumLevel=u$Z(i._maximumLevel,r[o-1]),e$2e(i._tilingScheme)||(i._tilingScheme=new g$15({ellipsoid:e.ellipsoid}));var a,s,l,u,c=i._tilingScheme;e$2e(i._rectangle)||e$2e(n.left)&&e$2e(n.right)&&e$2e(n.top)&&e$2e(n.bottom)&&(a=e$2d.toRadians(n.left),l=e$2d.toRadians(n.right),s=e$2d.toRadians(n.bottom),u=e$2d.toRadians(n.top),a>Math.PI&&(o$1p.globalOffset.x=Math.floor(a/Math.PI)*Math.PI,a-=o$1p.globalOffset.x,l-=o$1p.globalOffset.x,o$1p.globalOffset.x*=6378137),u>.5*Math.PI&&(o$1p.globalOffset.y=Math.floor((u+.5*Math.PI)/Math.PI)*Math.PI,u-=o$1p.globalOffset.y,s-=o$1p.globalOffset.y,o$1p.globalOffset.y*=6378137),i._rectangle=new h$18(a,s,l,u));i._rectangle.west<c.rectangle.west&&(i._rectangle.west=c.rectangle.west),i._rectangle.east>c.rectangle.east&&(i._rectangle.east=c.rectangle.east),i._rectangle.south<c.rectangle.south&&(i._rectangle.south=c.rectangle.south),i._rectangle.north>c.rectangle.north&&(i._rectangle.north=c.rectangle.north);var h=c.positionToTileXY(h$18.southwest(i._rectangle),i._minimumLevel),f=c.positionToTileXY(h$18.northeast(i._rectangle),i._minimumLevel);(Math.abs(f.x-h.x)+1)*(Math.abs(f.y-h.y)+1)>4&&(i._minimumLevel=0),i._tilingScheme=c,i._urlTemplate=i._url+"data/index/{y}/{x}.{fileExtension}?level={level}",i._ready=!0,i._readyPromise.resolve(!0)}function c(t){var n=t[0],r=n.prjCoordSys.coordUnit;i._coordUnit=r;var o=n.prjCoordSys.epsgCode,a=n.bounds,s=n.visibleScales;if(i.customScales=s&&s.length>0,"DEGREE"==r){var l=3857==o?85:90,u=i._resolution;if(i._tilingScheme=new g$15({numberOfLevelZeroTilesX:2*u,numberOfLevelZeroTilesY:u}),a.left=e$2d.clamp(a.left,-180,180),a.bottom=e$2d.clamp(a.bottom,-l,l),a.right=e$2d.clamp(a.right,-180,180),a.top=e$2d.clamp(a.top,-l,l),e$2d.equalsEpsilon(a.left,a.right,e$2d.EPSILON7)&&(a.right+=e$2d.EPSILON5),e$2d.equalsEpsilon(a.top,a.bottom,e$2d.EPSILON7)&&(a.top+=e$2d.EPSILON5),i._rectangle=h$18.fromDegrees(a.left,a.bottom,a.right,a.top),i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-180,"y":90}{tileversion}',(s=u$Z(e.scales,s)).length>0){var c=[];for(var h=i.customScales?0:u;h<s.length;h++)c.push(1/s[h]);i._tilingScheme._scaleDenominators=c,n.dpi&&(i._tilingScheme._customDPI=new o$1o(n.dpi,n.dpi)),i._tilingScheme._rectangle=i._rectangle,i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":'+a.left+',"y":'+a.top+"}{tileversion}",i._maximumLevel=c.length}}else{var d=new o$1p(a.left,a.bottom,0);d.x>20037508.342789244&&(o$1p.globalOffset.x=20037508.342789244*Math.floor(d.x/20037508.342789244),d.x=d.x-o$1p.globalOffset.x),d.y>10018754.171394622&&(o$1p.globalOffset.y=20037508.342789244*Math.floor((d.y+10018754.171394622)/20037508.342789244),d.y=d.y-o$1p.globalOffset.y);var f=new o$1p(a.right,a.top,0);if(f.x=Math.min(20037508.342789244,f.x-o$1p.globalOffset.x),f.y=Math.min(20037508.342789244,f.y-o$1p.globalOffset.y),e$2e(i._tilingScheme)){c=[];if(i._tilingScheme._scaleDenominators){c=i._tilingScheme._scaleDenominators;for(var p=[],_=0;_<i._tilingScheme._scaleDenominators.length;_++)p.push(1/i._tilingScheme._scaleDenominators[_]);s=p}else for(h=0;h<s.length;h++)c.push(1/s[h]);i._tilingScheme._scaleDenominators=c,!e$2e(i._tilingScheme._customDPI)&&n.dpi&&(i._tilingScheme._customDPI=new o$1o(n.dpi,n.dpi)),i._tilingScheme._rectangleNortheastInMeters=f,i._tilingScheme._rectangleSouthwestInMeters=d;var m=i._tilingScheme._projection.unproject(d),g=i._tilingScheme._projection.unproject(f);if(i._tilingScheme._rectangle=new h$18(m.longitude,m.latitude,g.longitude,g.latitude),s.length>0){var x=s[0];u=.0254/(n.dpi*x);i._tilingScheme._numberOfLevelZeroTilesX=Math.ceil((f.x-d.x)/u/n.viewer.width),i._tilingScheme._numberOfLevelZeroTilesY=Math.ceil((f.y-d.y)/u/n.viewer.height)}}else{var y,v,$=e$2e(n.prjCoordSys)&&3857==n.prjCoordSys.epsgCode,b=$?new t$N:new n$1d;c=[];if(!$){for(h=0;h<s.length;h++)c.push(1/s[h]);if(s.length>0){n.viewBounds.rightTop,n.viewBounds.leftBottom;x=s[0],u=.0254/(n.dpi*x);y=Math.ceil((f.x-d.x)/u/n.viewer.width),v=Math.ceil((f.y-d.y)/u/n.viewer.height)}}!$&&s.length>0?i._tilingScheme=new c$S({numberOfLevelZeroTilesX:y,numberOfLevelZeroTilesY:v,projection:b,rectangleSouthwestInMeters:d,rectangleNortheastInMeters:f,customDPI:new o$1o(n.dpi,n.dpi),scaleDenominators:c}):i._tilingScheme=new c$S({projection:b})}m=i._tilingScheme._projection.unproject(d),g=i._tilingScheme._projection.unproject(f);i._rectangle=new h$18(m.longitude,m.latitude,g.longitude,g.latitude),!$&&(s.length>0||c.length>0)?i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":'+a.left+',"y":'+a.top+"}{tileversion}":i._urlTemplate=i._url+"tileImage."+i._tileFormat+"?transparent={transparent}&cacheEnabled="+i._cacheEnabled+'&_cache={_cache}&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-20037508.342789248 ,"y":20037508.342789095}{tileversion}'}if(e$2e(s)&&Array.isArray(s)&&s.length>1)if(i._tilingScheme.projection instanceof n$1d)i._scales=s,i._maximumLevel=s.length-1-i._resolution;else{var T=s[s.length-1];i._maximumLevel=Oe$2(i,T),e$2e(n.prjCoordSys.name)&&n.prjCoordSys.name.indexOf("Beijing")>-1&&n.prjCoordSys.name.indexOf("1954")>-1&&(i._scales=se$2)}else e$2e(i._maximumLevel)||(i._maximumLevel=i._scales.length-1);"GCS_Beijing_1954"===n.prjCoordSys.name&&(!e$2e(s)||0==s.length)&&(i._scales=se$2),i._urlTemplate=i._urlTemplate.replace("{transparent}",i._transparent),i._urlTemplate=i._urlTemplate.replace("{_cache}",i._cache),e$2e(i._rasterfunction)&&(i._urlTemplate=i._urlTemplate+"&rasterfunction={rasterfunction}"),i.layersID&&(i._urlTemplate=i._urlTemplate+"&layersID="+i.layersID),e$2e(i._regions)&&(i._urlTemplate=i._urlTemplate+"®ions="+i._regions),e$2e(i._prjCoordSys)&&(i._urlTemplate=i._urlTemplate+"&prjCoordSys="+JSON.stringify(i._prjCoordSys)),i._rectangle||(i._rectangle=u$Z(e.rectangle,i._tilingScheme.rectangle)),i._ready=!0,i._readyPromise.resolve(!0)}function h(e){var t="An error occurred while accessing "+i._url+".";a=l$V.handleError(a,i,i._errorEvent,t,void 0,void 0,void 0,l),i._readyPromise.reject(new t$13(t))}this._layerStatusParameters&&(s=ce$5(this)),l();var d=new DOMParser};function oe$4(e){var t=[];if(e$2e(e.subLayers)&&e.subLayers.length>0)for(var i=0;i<e.subLayers.length;i++){var n=oe$4(e.subLayers[i]);t.push(n)}return{type:"UGC",name:e.layerName,visible:e.isVisible,displayFilter:e.displayFilter||null,subLayers:{layers:t}}}function ce$5(e){var t=o$1l.defer(),i=e._url+"tempLayersSet.rjson";return e$2e(a$O.CREDENTIAL)&&(i=a$O.addToken(i)),t$10.createIfNeeded(i).post(JSON.stringify(null)).then((function(i){for(var n=JSON.parse(i),r=[],o=0;o<e._layerStatusParameters.length;o++){var a=e._layerStatusParameters[o];r.push(oe$4(a))}var s=e._url.slice(0,-1),l=s.lastIndexOf("/"),u=e._baseUrl+n.newResourceLocation.substring(n.newResourceLocation.indexOf("/tempLayersSet"));e$2e(a$O.CREDENTIAL)&&(u=a$O.addToken(u));var c=t$10.createIfNeeded(u),h=[{type:"UGC",visible:!0,subLayers:{layers:r},name:s.slice(l+1)}];c.put(JSON.stringify(h)).then((function(){e._layerStatusParametersID=n.newResourceID,t.resolve(e._layerStatusParametersID)})).otherwise((function(){t.reject("修改图层失败")}))})),t.promise}function Oe$2(e,t){for(var i=e._scales.length;i--;)if(e._scales[i]<=t)return i}function te$3(e,t,i,n,r){var o;if(e.isTileMap){var a,s=""===e._tileversion?"":"&tileversion="+e._tileversion;if("DEGREE"===e._coordUnit)if(1===e.packingRequest)o=e._urlTemplate.replace("&x={x}&y={y}&scale={scale}","").replace("{tileversion}",s).replace("tileImage","tileImages").replace("&_cache=true","");else{let r=e.customScales?0:e.resolution;a=e._scales[n+r]||ee$4[n],o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{scale}",a.toString()).replace("{tileversion}",s)}else"METER"===e._coordUnit&&(1===e.packingRequest?o=e._urlTemplate.replace("&x={x}&y={y}&scale={scale}","").replace("{tileversion}",s).replace("tileImage","tileImages").replace("&_cache=true",""):(a=e._scales[n],o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{scale}",a.toString()).replace("{tileversion}",s)))}else o=e._urlTemplate.replace("{x}",t).replace("{y}",i).replace("{level}",n).replace("{fileExtension}",e._fileExtension);if(e$2e(e._subdomains)){var l=e._subdomains,u=l[(t+i+n)%l.length];o=o.replace(Me$4,(function(e,t){return"{s}"===t?u:e}))}return e$2e(a$O.CREDENTIAL)&&(o=a$O.addToken(o)),o}function V$6(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}function ue$3(e,t,i,n){var r=e._blockScale,o=Math.pow(2,r),a=Math.floor(t/o),s=t%o,l=Math.floor(i/o),u=i%o;return{x:a,y:l,url:te$3(e,a,l,n),col:s,row:u,level:n,blockSize:o}}Object.defineProperties(P$6.prototype,{url:{get:function(){return this._url}},name:{get:function(){return this._name},set:function(e){this._name=e}},customRequestHeaders:{get:function(){return this._customRequestHeaders},set:function(e){this._customRequestHeaders=e}},tileWidth:{get:function(){if(!this._ready)throw new t$15("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new t$15("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},tileFormat:{get:function(){return this._tileFormat}},tileversion:{get:function(){return this._tileversion}},maximumLevel:{get:function(){if(!this._ready)throw new t$15("maximumLevel must not be called before the imagery provider is ready.");return 1===this.resolution?this._maximumLevel:this._maximumLevel-1}},minimumLevel:{get:function(){if(!this._ready)throw new t$15("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}},tilingScheme:{get:function(){if(!this._ready)throw new t$15("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new t$15("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},ratio:{get:function(){return this._fRatio},set:function(e){this._fRatio=e}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},resolution:{get:function(){return this._resolution}},flipY:{get:function(){return this._flipY},set:function(e){this._flipY=e}},packingRequest:{get:function(){return this._packingRequest}},isBlock:{get:function(){return this._isBlock}},blockCache:{get:function(){return this._blockCache}},blockCacheQueue:{get:function(){return this._blockCacheQueue}},blockCacheSize:{get:function(){return this._blockCacheSize}},subdomains:{get:function(){return this._subdomains},set:function(e){if(e$2e(e)&&!e$2e(e.length))throw new t$15("Excepted SuperMapImageryProvider.subdomains to be type of Array.");this._subdomains=e}},layerStatusParameters:{get:function(){return this._layerStatusParameters}}}),P$6.prototype.setLayerStatusParameters=function(e){if(!e$2e(e))throw new t$15("Parameter is required.");if(!e$2e(e.length))throw new t$15("Expected parameter to be type of Array.");return this._layerStatusParameters=e,ce$5(this)},P$6.prototype.getTileCredits=function(e,t,i){};var Me$4=/({.*?})/g;P$6.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new t$15("requestImage must not be called before the imagery provider is ready.");var r=te$3(this,e,t,i);if(this.isSci3D){var o=1<<i;r=te$3(this,e+o$1p.globalOffset.x/(6378137*Math.PI)*o,t+o$1p.globalOffset.y/(6378137*Math.PI)*o,i)}e$2e(this._layerStatusParametersID)&&(r+="&layersID="+this._layerStatusParametersID),e$2e(a$O.CREDENTIAL)&&e$2e(a$O.CREDENTIAL._keymap[this._baseUrl])&&(r=a$O.addTokenWithKey(this._baseUrl,r));var a=this,s={};e$2e(this._rasterfunction)&&(s.rasterfunction=JSON.stringify(this._rasterfunction));var l=this._resource.getDerivedResource({url:r,request:n,templateValues:s});if(n.quadKey=V$6(e,t,i),this._packingRequest===Z$P.QuadKey&&this._isBlock){n.type=U$1f.BLOCKPACK,n.throttle=!0;var u=ue$3(this,e,t,i);if(l.url=u.url,n.blockInfo=u,n.quadKey=V$6(u.x,u.y,u.level),n.providerName=this.url,e$2e(h=this.blockCache[n.quadKey]))return this.blockCacheQueue.touch(h),h.data}else if(this._packingRequest===Z$P.QuadKey){if(n.type=U$1f.PACK,this.isTileMap){var c=this._scales[i+this.resolution]||ee$4[i];n.quadKey=c+":"+e+":"+t}else n.quadKey=V$6(e,t,i);n.providerName=this.url,n.throttle=!0}else if(this._isBlock){n.type=U$1f.BLOCK;var h;u=ue$3(this,e,t,i);if(l.url=u.url,n.blockInfo=u,n.quadKey=V$6(u.x,u.y,u.level),n.providerName=this.url,e$2e(h=this.blockCache[n.quadKey])&&e$2e(h.data))return this.blockCacheQueue.touch(h),h.data;if(!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable){var d,f=o$1l.defer();return e$2e(this._indexedDBScheduler)&&e$2e(d=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey))?(o$1l(d,(function(e){e$2e(e)?f.resolve(e):f.resolve("cacheError")}),(function(e){f.resolve("cacheError")})),f):p(a,l)}}if(!0===this._indexedDBSetting.isOpen&&!0===n.cacheEnable)return e$2e(this._indexedDBScheduler)&&e$2e(d=this._indexedDBScheduler.getElementFromDB(this.tablename,n.quadKey))?o$1l(d,(function(e){return e$2e(e)?e:"cacheError"}),(function(e){return"cacheError"})):p(a,l);function p(e,t){if(e._isBlock){var i=e.blockCache[n.quadKey];if(e$2e(i))return i.promise;var r=fe$2(e,t);return e$2e(r)?(i=new e$1e(e,n.quadKey),e.blockCache[n.quadKey]=i,i.promise=r,i.promise):void 0}return fe$2(e,t)}return p(a,l)};var Be$3=/\.ktx$/i,je$1=/\.crn$/i,he$2=/\.dxtz/i;function fe$2(e,t){o$1q.defined("url",t);var i=t$10.createIfNeeded(t);return e.isBlock||e.packingRequest===Z$P.QuadKey?(he$2.test(i.url)&&(e.flipY=!0),i.fetchArrayBuffer()):Be$3.test(i.url)?k$W(i):je$1.test(i.url)?a$P(i):he$2.test(i.url)?(e.flipY=!0,B$M(i)):e$2e(e.tileDiscardPolicy)?i.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):(e$2e(e._customRequestHeaders)&&(i.headers=p$19(i.headers,e._customRequestHeaders)),e._cacheKey.length>0?i.fetchArrayBuffer():i.fetchBlob())}function Ke$1(e,t){if(e$2e(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function Ae$3(e,t){if(e$2e(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function F$5(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function Pe$1(e,t,i){if(e$2e(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function K$3(e,t,i){var n=F$5(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function me$3(e,t,i){var n=F$5(e,t,i);if(e$2e(n))return n.textContent.trim()}P$6.prototype.pickFeatures=function(){};var tr$1=function(e){var t,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,r=Math.ceil,o=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",l=1e14,u=14,c=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,f=1e9;function p(e){var t=0|e;return e>0||e===t?t:t-1}function _(e){for(var t,i,n=1,r=e.length,o=e[0]+"";n<r;){for(t=e[n++]+"",i=u-t.length;i--;t="0"+t);o+=t}for(r=o.length;48===o.charCodeAt(--r););return o.slice(0,r+1||1)}function m(e,t){var i,n,r=e.c,o=t.c,a=e.s,s=t.s,l=e.e,u=t.e;if(!a||!s)return null;if(i=r&&!r[0],n=o&&!o[0],i||n)return i?n?0:-s:a;if(a!=s)return a;if(i=a<0,n=l==u,!r||!o)return n?0:!r^i?1:-1;if(!n)return l>u^i?1:-1;for(s=(l=r.length)<(u=o.length)?l:u,a=0;a<s;a++)if(r[a]!=o[a])return r[a]>o[a]^i?1:-1;return l==u?0:l>u^i?1:-1}function g(e,t,i,n){if(e<t||e>i||e!==o(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<t||e>i?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function x(e){var t=e.c.length-1;return p(e.e/u)==t&&e.c[t]%2!=0}function y(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function v(e,t,i){var n,r;if(t<0){for(r=i+".";++t;r+=i);e=r+e}else if(++t>(n=e.length)){for(r=i,t-=n;--t;r+=i);e+=r}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}return t=function e(t){var $,b,T,C=F.prototype={constructor:F,toString:null,valueOf:null},S=new F(1),w=20,E=4,P=-7,A=21,L=-1e7,M=1e7,R=!1,O=1,D=0,I={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},B="0123456789abcdefghijklmnopqrstuvwxyz";function F(e,t){var n,r,a,l,h,d,f,p,_=this;if(!(_ instanceof F))return new F(e,t);if(null==t){if(e&&!0===e._isBigNumber)return _.s=e.s,void(!e.c||e.e>M?_.c=_.e=null:e.e<L?_.c=[_.e=0]:(_.e=e.e,_.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(_.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,h=e;h>=10;h/=10,l++);return void(l>M?_.c=_.e=null:(_.e=l,_.c=[e]))}p=String(e)}else{if(!i.test(p=String(e)))return T(_,p,d);_.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(l=p.indexOf("."))>-1&&(p=p.replace(".","")),(h=p.search(/e/i))>0?(l<0&&(l=h),l+=+p.slice(h+1),p=p.substring(0,h)):l<0&&(l=p.length)}else{if(g(t,2,B.length,"Base"),10==t)return U(_=new F(e),w+_.e+1,E);if(p=String(e),d="number"==typeof e){if(0*e!=0)return T(_,p,d,t);if(_.s=1/e<0?(p=p.slice(1),-1):1,F.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else _.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(n=B.slice(0,t),l=h=0,f=p.length;h<f;h++)if(n.indexOf(r=p.charAt(h))<0){if("."==r){if(h>l){l=f;continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,h=-1,l=0;continue}return T(_,String(e),d,t)}d=!1,(l=(p=b(p,t,10,_.s)).indexOf("."))>-1?p=p.replace(".",""):l=p.length}for(h=0;48===p.charCodeAt(h);h++);for(f=p.length;48===p.charCodeAt(--f););if(p=p.slice(h,++f)){if(f-=h,d&&F.DEBUG&&f>15&&(e>c||e!==o(e)))throw Error(s+_.s*e);if((l=l-h-1)>M)_.c=_.e=null;else if(l<L)_.c=[_.e=0];else{if(_.e=l,_.c=[],h=(l+1)%u,l<0&&(h+=u),h<f){for(h&&_.c.push(+p.slice(0,h)),f-=u;h<f;)_.c.push(+p.slice(h,h+=u));h=u-(p=p.slice(h)).length}else h-=f;for(;h--;p+="0");_.c.push(+p)}}else _.c=[_.e=0]}function N(e,t,i,n){var r,o,a,s,l;if(null==i?i=E:g(i,0,8),!e.c)return e.toString();if(r=e.c[0],a=e.e,null==t)l=_(e.c),l=1==n||2==n&&(a<=P||a>=A)?y(l,a):v(l,a,"0");else if(o=(e=U(new F(e),t,i)).e,s=(l=_(e.c)).length,1==n||2==n&&(t<=o||o<=P)){for(;s<t;l+="0",s++);l=y(l,o)}else if(t-=a,l=v(l,o,"0"),o+1>s){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-s)>0)for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&r?"-"+l:l}function G(e,t){for(var i,n=1,r=new F(e[0]);n<e.length;n++){if(!(i=new F(e[n])).s){r=i;break}t.call(r,i)&&(r=i)}return r}function z(e,t,i){for(var n=1,r=t.length;!t[--r];t.pop());for(r=t[0];r>=10;r/=10,n++);return(i=n+i*u-1)>M?e.c=e.e=null:i<L?e.c=[e.e=0]:(e.e=i,e.c=t),e}function U(e,t,i,n){var a,s,c,d,f,p,_,m=e.c,g=h;if(m){e:{for(a=1,d=m[0];d>=10;d/=10,a++);if((s=t-a)<0)s+=u,c=t,_=(f=m[p=0])/g[a-c-1]%10|0;else if((p=r((s+1)/u))>=m.length){if(!n)break e;for(;m.length<=p;m.push(0));f=_=0,a=1,c=(s%=u)-u+1}else{for(f=d=m[p],a=1;d>=10;d/=10,a++);_=(c=(s%=u)-u+a)<0?0:f/g[a-c-1]%10|0}if(n=n||t<0||null!=m[p+1]||(c<0?f:f%g[a-c-1]),n=i<4?(_||n)&&(0==i||i==(e.s<0?3:2)):_>5||5==_&&(4==i||n||6==i&&(s>0?c>0?f/g[a-c]:0:m[p-1])%10&1||i==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=g[(u-t%u)%u],e.e=-t||0):m[0]=e.e=0,e;if(0==s?(m.length=p,d=1,p--):(m.length=p+1,d=g[u-s],m[p]=c>0?o(f/g[a-c]%g[c])*d:0),n)for(;;){if(0==p){for(s=1,c=m[0];c>=10;c/=10,s++);for(c=m[0]+=d,d=1;c>=10;c/=10,d++);s!=d&&(e.e++,m[0]==l&&(m[0]=1));break}if(m[p]+=d,m[p]!=l)break;m[p--]=0,d=1}for(s=m.length;0===m[--s];m.pop());}e.e>M?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}function V(e){var t,i=e.e;return null===i?e.toString():(t=_(e.c),t=i<=P||i>=A?y(t,i):v(t,i,"0"),e.s<0?"-"+t:t)}return F.clone=e,F.ROUND_UP=0,F.ROUND_DOWN=1,F.ROUND_CEIL=2,F.ROUND_FLOOR=3,F.ROUND_HALF_UP=4,F.ROUND_HALF_DOWN=5,F.ROUND_HALF_EVEN=6,F.ROUND_HALF_CEIL=7,F.ROUND_HALF_FLOOR=8,F.EUCLID=9,F.config=F.set=function(e){var t,i;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(g(i=e[t],0,f,t),w=i),e.hasOwnProperty(t="ROUNDING_MODE")&&(g(i=e[t],0,8,t),E=i),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((i=e[t])&&i.pop?(g(i[0],-f,0,t),g(i[1],0,f,t),P=i[0],A=i[1]):(g(i,-f,f,t),P=-(A=i<0?-i:i))),e.hasOwnProperty(t="RANGE"))if((i=e[t])&&i.pop)g(i[0],-f,-1,t),g(i[1],1,f,t),L=i[0],M=i[1];else{if(g(i,-f,f,t),!i)throw Error(a+t+" cannot be zero: "+i);L=-(M=i<0?-i:i)}if(e.hasOwnProperty(t="CRYPTO")){if((i=e[t])!==!!i)throw Error(a+t+" not true or false: "+i);if(i){if(!(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes)))throw R=!i,Error(a+"crypto unavailable");R=i}else R=i}if(e.hasOwnProperty(t="MODULO_MODE")&&(g(i=e[t],0,9,t),O=i),e.hasOwnProperty(t="POW_PRECISION")&&(g(i=e[t],0,f,t),D=i),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(i=e[t]))throw Error(a+t+" not an object: "+i);I=i}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(i=e[t])||/^.$|[+-.\s]|(.).*\1/.test(i))throw Error(a+t+" invalid: "+i);B=i}}return{DECIMAL_PLACES:w,ROUNDING_MODE:E,EXPONENTIAL_AT:[P,A],RANGE:[L,M],CRYPTO:R,MODULO_MODE:O,POW_PRECISION:D,FORMAT:I,ALPHABET:B}},F.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!F.DEBUG)return!0;var t,i,n=e.c,r=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&r>=-f&&r<=f&&r===o(r)){if(0===n[0]){if(0===r&&1===n.length)return!0;break e}if((t=(r+1)%u)<1&&(t+=u),String(n[0]).length==t){for(t=0;t<n.length;t++)if((i=n[t])<0||i>=l||i!==o(i))break e;if(0!==i)return!0}}}else if(null===n&&null===r&&(null===s||1===s||-1===s))return!0;throw Error(a+"Invalid BigNumber: "+e)},F.maximum=F.max=function(){return G(arguments,C.lt)},F.minimum=F.min=function(){return G(arguments,C.gt)},F.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return o(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var i,n,s,l,c,d=0,p=[],_=new F(S);if(null==e?e=w:g(e,0,f),l=r(e/u),R)if(crypto.getRandomValues){for(i=crypto.getRandomValues(new Uint32Array(l*=2));d<l;)(c=131072*i[d]+(i[d+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),i[d]=n[0],i[d+1]=n[1]):(p.push(c%1e14),d+=2);d=l/2}else{if(!crypto.randomBytes)throw R=!1,Error(a+"crypto unavailable");for(i=crypto.randomBytes(l*=7);d<l;)(c=281474976710656*(31&i[d])+1099511627776*i[d+1]+4294967296*i[d+2]+16777216*i[d+3]+(i[d+4]<<16)+(i[d+5]<<8)+i[d+6])>=9e15?crypto.randomBytes(7).copy(i,d):(p.push(c%1e14),d+=7);d=l/7}if(!R)for(;d<l;)(c=t())<9e15&&(p[d++]=c%1e14);for(l=p[--d],e%=u,l&&e&&(c=h[u-e],p[d]=o(l/c)*c);0===p[d];p.pop(),d--);if(d<0)p=[s=0];else{for(s=-1;0===p[0];p.splice(0,1),s-=u);for(d=1,c=p[0];c>=10;c/=10,d++);d<u&&(s-=u-d)}return _.e=s,_.c=p,_}}(),F.sum=function(){for(var e=1,t=arguments,i=new F(t[0]);e<t.length;)i=i.plus(t[e++]);return i},b=function(){var e="0123456789";function t(e,t,i,n){for(var r,o,a=[0],s=0,l=e.length;s<l;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),r=0;r<a.length;r++)a[r]>i-1&&(null==a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/i|0,a[r]%=i)}return a.reverse()}return function(i,n,r,o,a){var s,l,u,c,h,d,f,p,m=i.indexOf("."),g=w,x=E;for(m>=0&&(c=D,D=0,i=i.replace(".",""),d=(p=new F(n)).pow(i.length-m),D=c,p.c=t(v(_(d.c),d.e,"0"),10,r,e),p.e=p.c.length),u=c=(f=t(i,n,r,a?(s=B,e):(s=e,B))).length;0==f[--c];f.pop());if(!f[0])return s.charAt(0);if(m<0?--u:(d.c=f,d.e=u,d.s=o,f=(d=$(d,p,g,x,r)).c,h=d.r,u=d.e),m=f[l=u+g+1],c=r/2,h=h||l<0||null!=f[l+1],h=x<4?(null!=m||h)&&(0==x||x==(d.s<0?3:2)):m>c||m==c&&(4==x||h||6==x&&1&f[l-1]||x==(d.s<0?8:7)),l<1||!f[0])i=h?v(s.charAt(1),-g,s.charAt(0)):s.charAt(0);else{if(f.length=l,h)for(--r;++f[--l]>r;)f[l]=0,l||(++u,f=[1].concat(f));for(c=f.length;!f[--c];);for(m=0,i="";m<=c;i+=s.charAt(f[m++]));i=v(i,u,s.charAt(0))}return i}}(),$=function(){function e(e,t,i){var n,r,o,a,s=0,l=e.length,u=t%d,c=t/d|0;for(e=e.slice();l--;)s=((r=u*(o=e[l]%d)+(n=c*o+(a=e[l]/d|0)*u)%d*d+s)/i|0)+(n/d|0)+c*a,e[l]=r%i;return s&&(e=[s].concat(e)),e}function t(e,t,i,n){var r,o;if(i!=n)o=i>n?1:-1;else for(r=o=0;r<i;r++)if(e[r]!=t[r]){o=e[r]>t[r]?1:-1;break}return o}function i(e,t,i,n){for(var r=0;i--;)e[i]-=r,r=e[i]<t[i]?1:0,e[i]=r*n+e[i]-t[i];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,r,a,s,c){var h,d,f,_,m,g,x,y,v,$,b,T,C,S,w,E,P,A=n.s==r.s?1:-1,L=n.c,M=r.c;if(!(L&&L[0]&&M&&M[0]))return new F(n.s&&r.s&&(L?!M||L[0]!=M[0]:M)?L&&0==L[0]||!M?0*A:A/0:NaN);for(v=(y=new F(A)).c=[],A=a+(d=n.e-r.e)+1,c||(c=l,d=p(n.e/u)-p(r.e/u),A=A/u|0),f=0;M[f]==(L[f]||0);f++);if(M[f]>(L[f]||0)&&d--,A<0)v.push(1),_=!0;else{for(S=L.length,E=M.length,f=0,A+=2,(m=o(c/(M[0]+1)))>1&&(M=e(M,m,c),L=e(L,m,c),E=M.length,S=L.length),C=E,b=($=L.slice(0,E)).length;b<E;$[b++]=0);P=M.slice(),P=[0].concat(P),w=M[0],M[1]>=c/2&&w++;do{if(m=0,(h=t(M,$,E,b))<0){if(T=$[0],E!=b&&(T=T*c+($[1]||0)),(m=o(T/w))>1)for(m>=c&&(m=c-1),x=(g=e(M,m,c)).length,b=$.length;1==t(g,$,x,b);)m--,i(g,E<x?P:M,x,c),x=g.length,h=1;else 0==m&&(h=m=1),x=(g=M.slice()).length;if(x<b&&(g=[0].concat(g)),i($,g,b,c),b=$.length,-1==h)for(;t(M,$,E,b)<1;)m++,i($,E<b?P:M,b,c),b=$.length}else 0===h&&(m++,$=[0]);v[f++]=m,$[0]?$[b++]=L[C]||0:($=[L[C]],b=1)}while((C++<S||null!=$[0])&&A--);_=null!=$[0],v[0]||v.splice(0,1)}if(c==l){for(f=1,A=v[0];A>=10;A/=10,f++);U(y,a+(y.e=f+d*u-1)+1,s,_)}else y.e=d,y.r=+_;return y}}(),T=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,i=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,r=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,s,l,u){var c,h=l?s:s.replace(r,"");if(n.test(h))o.s=isNaN(h)?null:h<0?-1:1;else{if(!l&&(h=h.replace(e,(function(e,t,i){return c="x"==(i=i.toLowerCase())?16:"b"==i?2:8,u&&u!=c?e:t})),u&&(c=u,h=h.replace(t,"$1").replace(i,"0.$1")),s!=h))return new F(h,c);if(F.DEBUG)throw Error(a+"Not a"+(u?" base "+u:"")+" number: "+s);o.s=null}o.c=o.e=null}}(),C.absoluteValue=C.abs=function(){var e=new F(this);return e.s<0&&(e.s=1),e},C.comparedTo=function(e,t){return m(this,new F(e,t))},C.decimalPlaces=C.dp=function(e,t){var i,n,r,o=this;if(null!=e)return g(e,0,f),null==t?t=E:g(t,0,8),U(new F(o),e+o.e+1,t);if(!(i=o.c))return null;if(n=((r=i.length-1)-p(this.e/u))*u,r=i[r])for(;r%10==0;r/=10,n--);return n<0&&(n=0),n},C.dividedBy=C.div=function(e,t){return $(this,new F(e,t),w,E)},C.dividedToIntegerBy=C.idiv=function(e,t){return $(this,new F(e,t),0,1)},C.exponentiatedBy=C.pow=function(e,t){var i,n,s,l,c,h,d,f,p=this;if((e=new F(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+V(e));if(null!=t&&(t=new F(t)),c=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return f=new F(Math.pow(+V(p),c?2-x(e):+V(e))),t?f.mod(t):f;if(h=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new F(NaN);(n=!h&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||c&&p.c[1]>=24e7:p.c[0]<8e13||c&&p.c[0]<=9999975e7)))return l=p.s<0&&x(e)?-0:0,p.e>-1&&(l=1/l),new F(h?1/l:l);D&&(l=r(D/u+2))}for(c?(i=new F(.5),h&&(e.s=1),d=x(e)):d=(s=Math.abs(+V(e)))%2,f=new F(S);;){if(d){if(!(f=f.times(p)).c)break;l?f.c.length>l&&(f.c.length=l):n&&(f=f.mod(t))}if(s){if(0===(s=o(s/2)))break;d=s%2}else if(U(e=e.times(i),e.e+1,1),e.e>14)d=x(e);else{if(0===(s=+V(e)))break;d=s%2}p=p.times(p),l?p.c&&p.c.length>l&&(p.c.length=l):n&&(p=p.mod(t))}return n?f:(h&&(f=S.div(f)),t?f.mod(t):l?U(f,D,E,undefined):f)},C.integerValue=function(e){var t=new F(this);return null==e?e=E:g(e,0,8),U(t,t.e+1,e)},C.isEqualTo=C.eq=function(e,t){return 0===m(this,new F(e,t))},C.isFinite=function(){return!!this.c},C.isGreaterThan=C.gt=function(e,t){return m(this,new F(e,t))>0},C.isGreaterThanOrEqualTo=C.gte=function(e,t){return 1===(t=m(this,new F(e,t)))||0===t},C.isInteger=function(){return!!this.c&&p(this.e/u)>this.c.length-2},C.isLessThan=C.lt=function(e,t){return m(this,new F(e,t))<0},C.isLessThanOrEqualTo=C.lte=function(e,t){return-1===(t=m(this,new F(e,t)))||0===t},C.isNaN=function(){return!this.s},C.isNegative=function(){return this.s<0},C.isPositive=function(){return this.s>0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.minus=function(e,t){var i,n,r,o,a=this,s=a.s;if(t=(e=new F(e,t)).s,!s||!t)return new F(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/u,h=e.e/u,d=a.c,f=e.c;if(!c||!h){if(!d||!f)return d?(e.s=-t,e):new F(f?a:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new F(d[0]?a:3==E?-0:0)}if(c=p(c),h=p(h),d=d.slice(),s=c-h){for((o=s<0)?(s=-s,r=d):(h=c,r=f),r.reverse(),t=s;t--;r.push(0));r.reverse()}else for(n=(o=(s=d.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(d[t]!=f[t]){o=d[t]<f[t];break}if(o&&(r=d,d=f,f=r,e.s=-e.s),(t=(n=f.length)-(i=d.length))>0)for(;t--;d[i++]=0);for(t=l-1;n>s;){if(d[--n]<f[n]){for(i=n;i&&!d[--i];d[i]=t);--d[i],d[n]+=l}d[n]-=f[n]}for(;0==d[0];d.splice(0,1),--h);return d[0]?z(e,d,h):(e.s=3==E?-1:1,e.c=[e.e=0],e)},C.modulo=C.mod=function(e,t){var i,n,r=this;return e=new F(e,t),!r.c||!e.s||e.c&&!e.c[0]?new F(NaN):!e.c||r.c&&!r.c[0]?new F(r):(9==O?(n=e.s,e.s=1,i=$(r,e,0,3),e.s=n,i.s*=n):i=$(r,e,0,O),!(e=r.minus(i.times(e))).c[0]&&1==O&&(e.s=r.s),e)},C.multipliedBy=C.times=function(e,t){var i,n,r,o,a,s,c,h,f,_,m,g,x,y,v,$=this,b=$.c,T=(e=new F(e,t)).c;if(!(b&&T&&b[0]&&T[0]))return!$.s||!e.s||b&&!b[0]&&!T||T&&!T[0]&&!b?e.c=e.e=e.s=null:(e.s*=$.s,b&&T?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=p($.e/u)+p(e.e/u),e.s*=$.s,(c=b.length)<(_=T.length)&&(x=b,b=T,T=x,r=c,c=_,_=r),r=c+_,x=[];r--;x.push(0));for(y=l,v=d,r=_;--r>=0;){for(i=0,m=T[r]%v,g=T[r]/v|0,o=r+(a=c);o>r;)i=((h=m*(h=b[--a]%v)+(s=g*h+(f=b[a]/v|0)*m)%v*v+x[o]+i)/y|0)+(s/v|0)+g*f,x[o--]=h%y;x[o]=i}return i?++n:x.splice(0,1),z(e,x,n)},C.negated=function(){var e=new F(this);return e.s=-e.s||null,e},C.plus=function(e,t){var i,n=this,r=n.s;if(t=(e=new F(e,t)).s,!r||!t)return new F(NaN);if(r!=t)return e.s=-t,n.minus(e);var o=n.e/u,a=e.e/u,s=n.c,c=e.c;if(!o||!a){if(!s||!c)return new F(r/0);if(!s[0]||!c[0])return c[0]?e:new F(s[0]?n:0*r)}if(o=p(o),a=p(a),s=s.slice(),r=o-a){for(r>0?(a=o,i=c):(r=-r,i=s),i.reverse();r--;i.push(0));i.reverse()}for((r=s.length)-(t=c.length)<0&&(i=c,c=s,s=i,t=r),r=0;t;)r=(s[--t]=s[t]+c[t]+r)/l|0,s[t]=l===s[t]?0:s[t]%l;return r&&(s=[r].concat(s),++a),z(e,s,a)},C.precision=C.sd=function(e,t){var i,n,r,o=this;if(null!=e&&e!==!!e)return g(e,1,f),null==t?t=E:g(t,0,8),U(new F(o),e,t);if(!(i=o.c))return null;if(n=(r=i.length-1)*u+1,r=i[r]){for(;r%10==0;r/=10,n--);for(r=i[0];r>=10;r/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},C.shiftedBy=function(e){return g(e,-c,c),this.times("1e"+e)},C.squareRoot=C.sqrt=function(){var e,t,i,n,r,o=this,a=o.c,s=o.s,l=o.e,u=w+4,c=new F("0.5");if(1!==s||!a||!a[0])return new F(!s||s<0&&(!a||a[0])?NaN:a?o:1/0);if(0==(s=Math.sqrt(+V(o)))||s==1/0?(((t=_(a)).length+l)%2==0&&(t+="0"),s=Math.sqrt(+t),l=p((l+1)/2)-(l<0||l%2),s==1/0?t="1e"+l:t=(t=s.toExponential()).slice(0,t.indexOf("e")+1)+l,i=new F(t)):i=new F(s+""),i.c[0])for((s=(l=i.e)+u)<3&&(s=0);;)if(r=i,i=c.times(r.plus($(o,r,u,1))),_(r.c).slice(0,s)===(t=_(i.c)).slice(0,s)){if(i.e<l&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(n||"4999"!=t)){(!+t||!+t.slice(1)&&"5"==t.charAt(0))&&(U(i,i.e+w+2,1),e=!i.times(i).eq(o));break}if(!n&&(U(r,r.e+w+2,0),r.times(r).eq(o))){i=r;break}u+=4,s+=4,n=1}return U(i,i.e+w+1,E,e)},C.toExponential=function(e,t){return null!=e&&(g(e,0,f),e++),N(this,e,t,1)},C.toFixed=function(e,t){return null!=e&&(g(e,0,f),e=e+this.e+1),N(this,e,t)},C.toFormat=function(e,t,i){var n,r=this;if(null==i)null!=e&&t&&"object"==typeof t?(i=t,t=null):e&&"object"==typeof e?(i=e,e=t=null):i=I;else if("object"!=typeof i)throw Error(a+"Argument not an object: "+i);if(n=r.toFixed(e,t),r.c){var o,s=n.split("."),l=+i.groupSize,u=+i.secondaryGroupSize,c=i.groupSeparator||"",h=s[0],d=s[1],f=r.s<0,p=f?h.slice(1):h,_=p.length;if(u&&(o=l,l=u,u=o,_-=o),l>0&&_>0){for(o=_%l||l,h=p.substr(0,o);o<_;o+=l)h+=c+p.substr(o,l);u>0&&(h+=c+p.slice(o)),f&&(h="-"+h)}n=d?h+(i.decimalSeparator||"")+((u=+i.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):d):h}return(i.prefix||"")+n+(i.suffix||"")},C.toFraction=function(e){var t,i,n,r,o,s,l,c,d,f,p,m,g=this,x=g.c;if(null!=e&&(!(l=new F(e)).isInteger()&&(l.c||1!==l.s)||l.lt(S)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+V(l));if(!x)return new F(g);for(t=new F(S),d=i=new F(S),n=c=new F(S),m=_(x),o=t.e=m.length-g.e-1,t.c[0]=h[(s=o%u)<0?u+s:s],e=!e||l.comparedTo(t)>0?o>0?t:d:l,s=M,M=1/0,l=new F(m),c.c[0]=0;f=$(l,t,0,1),1!=(r=i.plus(f.times(n))).comparedTo(e);)i=n,n=r,d=c.plus(f.times(r=d)),c=r,t=l.minus(f.times(r=t)),l=r;return r=$(e.minus(i),n,0,1),c=c.plus(r.times(d)),i=i.plus(r.times(n)),c.s=d.s=g.s,p=$(d,n,o*=2,E).minus(g).abs().comparedTo($(c,i,o,E).minus(g).abs())<1?[d,n]:[c,i],M=s,p},C.toNumber=function(){return+V(this)},C.toPrecision=function(e,t){return null!=e&&g(e,1,f),N(this,e,t,2)},C.toString=function(e){var t,i=this,n=i.s,r=i.e;return null===r?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=r<=P||r>=A?y(_(i.c),r):v(_(i.c),r,"0"):10===e?t=v(_((i=U(new F(i),w+r+1,E)).c),i.e,"0"):(g(e,2,B.length,"Base"),t=b(v(_(i.c),r,"0"),10,e,n,!0)),n<0&&i.c[0]&&(t="-"+t)),t},C.valueOf=C.toJSON=function(){return V(this)},C._isBigNumber=!0,n&&(C[Symbol.toStringTag]="BigNumber",C[Symbol.for("nodejs.util.inspect.custom")]=C.valueOf),null!=t&&F.set(t),F}(),t.default=t.BigNumber=t,"function"==typeof define&&define.amd?define((function(){return t})):typeof module<"u"&&module.exports?module.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t),t}(),ee$3={},Me$3={iServer:0,oss:1};function De$2(e,t){this.RSAAuthenticationStatus={},this._customRequestHeaders=e.customRequestHeaders,this._scene=t,this.camera=t.camera}function xr$1(e){var t={},i=e.firstChild,n=s$T.queryStringValue(i,"Version");t.version=n;var r=s$T.queryStringValue(i,"FileType");t.fileType=r;var o=s$T.queryFirstNode(i,"WaterEffect"),a=s$T.queryNumericValue(o,"AverageHeight");t.averageHeight=a;var s=s$T.queryNodes(o,"GpuProgramParameters");t.gpuProgramParameters=[];for(var l=0,u=s.length;l<u;l++){var c={gpuConstants:[],atuoConstants:[]},h=s[l],d=s$T.queryFirstNode(h,"GpuConstants");if(d)for(var f=s$T.queryNodes(d,"GpuConstantDefinition"),p=0,_=f.length;p<_;p++){var m={},g=f[p],x=s$T.queryNumericValue(g,"ConstType");m.constType=x;var y=s$T.queryNumericValue(g,"Index");m.index=y;var v=s$T.queryStringValue(g,"Name");m.name=v;var $=s$T.queryNumericValue(g,"ArraySize");m.arraySize=$;var b=s$T.queryNumericValue(g,"Multiple");m.multiple=b;var T=s$T.queryFirstNode(g,"ArrayFloat");if(m.arrayFloat=[],T)for(var C=s$T.queryNodes(T,"Float"),S=0;S<$;){var w=parseFloat(C[S].textContent);m.arrayFloat.push(w),S++}c.gpuConstants.push(m)}var E=s$T.queryFirstNode(h,"AutoConstants");if(E){var P=s$T.queryNodes(E,"AutoConstantEntry");for(p=0,_=P.length;p<_;p++){m={};var A=P[p],L=s$T.queryNumericValue(A,"ParamType");m.paramType=L;v=s$T.queryStringValue(A,"Name");m.name=v;var M=s$T.queryNumericValue(A,"PhysicalIndex");m.physicalIndex=M;var R=s$T.queryNumericValue(A,"ElementCount");m.elementCount=R;var O=s$T.queryNumericValue(A,"Data");m.data=O;var D=s$T.queryNumericValue(A,"FData");m.fData=D;var I=s$T.queryBooleanValue(A,"IsReal");m.isReal=I,c.atuoConstants.push(m)}}t.gpuProgramParameters.push(c)}return t}function Xr$1(e,t,i,n){var r=o$1l.defer(),o=e.toString()+"indexData.dat";if(e$2e(a$O.CREDENTIAL)&&(o=a$O.addToken(o)),i===Tr$4.KEY_VALUE){var a=m$1c(n.split("?")[1]),s={suffix:"dat"},l=m$1d(s=Object.assign(s,a),!0),u=n.match(/(\S*)\/config/);u.length>0&&(o=u[0]+"?"+l)}return o$1l(d$1f(o,t),(function(e){for(var t=new e$1Q,i=e.firstChild,n=i.namespace,o=s$T.queryFirstNode(i,"FieldDefines",n),a=s$T.queryChildNodes(o,"FieldDefine",n),s=0;s<a.length;s++){var l=s$T.queryStringAttribute(a[s],"Name"),u=s$T.queryStringAttribute(a[s],"Type"),c=s$T.queryStringAttribute(a[s],"Size");t.set(l,{type:u,size:c})}r.resolve(t)}),(function(){r.reject()})),r.promise}function Kr$1(e,t,i,n){var r=o$1l.defer();if(e$2e(i)){var o,a=e.toString();if(n===Tr$4.KEY_VALUE){var s=m$1c(a.split("?")[1]),l={suffix:"attribute.json"},u=m$1d(l=Object.assign(l,s),!0),c=a.match(/(\S*)\/config/);c.length>0&&(o=c[0]+"?"+u)}else{var h=a.substring(0,a.indexOf("/realspace")+10);o=a+"attribute.json",e$2e(a$O.CREDENTIAL)&&(o=e$2e(a$O.CREDENTIAL._keymap[h])?a$O.addTokenWithKey(h,o):a$O.addToken(o))}o$1l(u$P(o,t),(function(e){if(e.layerInfos){for(var t=e.layerInfos[0].fieldInfos,i=new e$1Q,n=0;n<t.length;n++)i.set(t[n].name,{type:t[n].type,size:t[n].size});var o,a=void 0;if(e$2e(e.indexInfos)){o={},a={};n=0;for(var s=e.indexInfos.length;n<s;n++){var l=e.indexInfos[n],u=f$Q(l.rootNodePath);o[u=u.replace(".s3mb","")]=l.indexInfo,a[l.rootNodePath.replace(".s3mb","")]=l.indexInfo}}r.resolve({fieldsInfo:i,indexInfoMap:o,indexInfoAttributeMap:a})}else r.reject()}),(function(){r.reject()}))}else r.reject();return r.promise}function Gr(e,t,i){if(e&&t){var n=e.firstChild;if(n){var r=n.namespaceURI,o=s$T.queryFirstNode(n,"AttachFiles",r);if(o){for(var a=s$T.queryNodes(o,"AttachFile",r),s=[],l=0,u=a.length;l<u;l++){var c=a[l].textContent;if(c.indexOf("water")>0){var h=t+c;s.push(d$1f(h,i))}}if(!s.length)return;var d=o$1l.defer();return o$1l.all(s,(function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];if(!r)break;var o=xr$1(r);t.push(o)}d.resolve(t)}),(function(){})),d.promise}}}}function Yr$1(e,t,i){if(e&&t){var n=e.extensions;if(e$2e(n)&&e$2e(n.attachFiles)){for(var r=n.attachFiles,o=[],a=0,s=r.length;a<s;a++){var l=r[a].attachFile;if(l.indexOf(".water")>0){var u=t+l;e$2e(a$O.CREDENTIAL)&&(u=a$O.addToken(u)),o.push(d$1f(u,i))}}if(o.length){var c=o$1l.defer();return o$1l.all(o,(function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];if(!r)break;var o=xr$1(r);t.push(o)}c.resolve(t)}),(function(){})),c.promise}}}}function Zr$1(e,t,i){var n=e.firstChild,r=n.namespace;if("Spatial3DModel"===n.localName){s$T.queryStringValue(n,"Asset",r),s$T.queryStringValue(n,"Version",r);var o=s$T.queryStringValue(n,"DataType",r);s$T.queryStringValue(n,"PyramidSplitType",r),s$T.queryStringValue(n,"LodType",r);var a=s$T.queryFirstNode(n,"Position",r),s=s$T.queryNumericValue(a,"X",r),l=s$T.queryNumericValue(a,"Y",r),u=s$T.queryNumericValue(a,"Z",r);if(e$2e(ie=s$T.queryFirstNode(n,"GeoBounds",r))){var c=s$T.queryNumericValue(ie,"Left",r),h=s$T.queryNumericValue(ie,"Top",r),d=s$T.queryNumericValue(ie,"Right",r),f=s$T.queryNumericValue(ie,"Bottom",r);Q=h$18.fromDegrees(c,f,d,h)}var p=s$T.queryFirstNode(n,"HeightRange",r),_=s$T.queryNumericValue(p,"Min",r),m=s$T.queryNumericValue(p,"Max",r),g=s$T.queryFirstNode(n,"CategoryRange",r),x=s$T.queryNumericValue(g,"MaxCategory",r),y=s$T.queryNumericValue(g,"MinCategory",r),v=s$T.queryFirstNode(n,"WDescript",r),$=s$T.queryFirstNode(v,"Range",r),b=s$T.queryNumericValue($,"Min",r),T=s$T.queryNumericValue($,"Max",r);x=x||T,y=y||b;var C=s$T.queryFirstNode(n,"Extensions",r),S=s$T.queryStringValue(C,"FileType",r);s$T.queryStringValue(C,"TileSplitType",r);var w=s$T.queryBooleanValue(C,"TextureSharing",r),E=s$T.queryBooleanValue(C,"TransparencyOptimization",r),P=s$T.queryStringValue(C,"VertexWeightMode",r),A=s$T.queryStringValue(C,"ProcessType",r),L={};(Ce=t.split("?")).length>1&&(L=m$1c(Ce[1]),t=Ce[0]);for(var M=new h$16(i===Me$3.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),R=[],O=/\\+/g,D=s$T.queryFirstNode(n,"Tiles",r),I=!1,B=0,F=(Se=s$T.queryNodes(D,"Tile",r)).length;B<F;B++){var N=Se[B],G=(De=s$T.queryStringValue(N,"Url",r)).lastIndexOf(".");".s3mbz"===De.substring(G,De.length)&&(I=!0);var z=i$1b(De=(De=De.replace(O,"/")).replace(/(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,"")),U=f$Q(De);(Ie={}).relativePath=new h$16(z),Ie.name=U;var V=s$T.queryFirstNode(N,"Boundingbox",r);if(e$2e(V)){var k=s$T.queryFirstNode(V,"Min",r),W=s$T.queryFirstNode(V,"Max",r),H=s$T.queryNumericValue(k,"X",r),q=s$T.queryNumericValue(k,"Y",r),j=s$T.queryNumericValue(k,"Z",r),X=s$T.queryNumericValue(W,"X",r),Y=s$T.queryNumericValue(W,"Y",r),Z=s$T.queryNumericValue(W,"Z",r),K=new i$1d;i$1d.fromCornerPoints(new o$1p(H,q,j),new o$1p(X,Y,Z),K),Ie.bSphere=K}R.push(Ie)}return{position:{lon:s,lat:l,height:u},fileType:S,maxInstensity:0,minInstensity:0,maxHeight:m,minHeight:_,maxCategory:x,minCategory:y,layerBounds:Q,baseUri:M,rootEntities:R,isTextureShare:w,urlArguments:L,isS3MB:!0,isS3MZ:I,processType:A,dataType:o,isTransparencyOptimization:E,vertexWeightMode:P}}S=s$T.queryStringValue(n,"FileType",r),w=s$T.queryBooleanValue(n,"TextureSharing",r),E=s$T.queryBooleanValue(n,"TransparencyOptimization",r),P=s$T.queryStringValue(n,"VertexWeightMode",r);var Q,J=s$T.queryFirstNode(n,"InstensityRange",r),ee=s$T.queryNumericValue(J,"MinInstensity",r),te=s$T.queryNumericValue(J,"MaxInstensity",r),ie=(p=s$T.queryFirstNode(n,"HeightRange",r),_=s$T.queryNumericValue(p,"MinHeight",r),m=s$T.queryNumericValue(p,"MaxHeight",r),g=s$T.queryFirstNode(n,"CategoryRange",r),x=s$T.queryNumericValue(g,"MaxCategory",r),y=s$T.queryNumericValue(g,"MinCategory",r),A=s$T.queryStringValue(n,"ProcessType",r),a=s$T.queryFirstNode(n,"Position",r),s=s$T.queryNumericValue(a,"X",r),l=s$T.queryNumericValue(a,"Y",r),u=s$T.queryNumericValue(a,"Z",r),s$T.queryFirstNode(n,"Bounds",r)),ne=s$T.queryFirstNode(n,"BoundingBox",r),re=s$T.queryStringValue(n,"IDFieldName",r),oe=s$T.queryStringValue(n,"AttributeExtentName",r);if(e$2e(ie)){c=s$T.queryNumericValue(ie,"Left",r),h=s$T.queryNumericValue(ie,"Top",r),d=s$T.queryNumericValue(ie,"Right",r),f=s$T.queryNumericValue(ie,"Bottom",r);Q=h$18.fromDegrees(c,f,d,h)}else if(e$2e(ne)){var ae=s$T.queryNumericValue(ne,"MinX",r),se=s$T.queryNumericValue(ne,"MinY",r);s$T.queryNumericValue(ne,"MinZ",r);var le=s$T.queryNumericValue(ne,"MaxX",r),ue=s$T.queryNumericValue(ne,"MaxY",r);s$T.queryNumericValue(ne,"MaxZ",r),ae=180*Math.abs(ae)/(6378137*Math.PI),se=180*Math.abs(se)/(6378137*Math.PI),le=180*Math.abs(le)/(6378137*Math.PI),ue=180*Math.abs(ue)/(6378137*Math.PI),Q=h$18.fromDegrees(s-ae,l-se,s+le,l+ue)}else Q=h$18.fromDegrees(s-1e-5,l-1e-5,s+1e-5,l+1e-5);var ce=void 0,he=s$T.queryNodes(n,"Vol",r);if(e$2e(he)&&he.length>0){var de=[],fe=[],pe=[],_e=[];for(B=0,F=he.length;B<F;B++){var me=he[B],ge=s$T.queryStringValue(me,"Name",r);de.push(ge);var xe=s$T.queryStringValue(me,"AttachFileExt",r);_e.push(xe);var ye=s$T.queryFirstNode(me,"VolumeValueRange",r);if(e$2e(ye)){var ve=s$T.queryNumericValue(ye,"MinValue",r),$e=s$T.queryNumericValue(ye,"MaxValue",r);fe.push($e),pe.push(ve)}}ce={bVolume:!0,strVolumeExts:_e,volNames:de,maxValues:fe,minValues:pe}}var be=s$T.queryFirstNode(n,"VolumeValueRange",r);if(e$2e(be)){ve=s$T.queryNumericValue(be,"MinValue",r),$e=s$T.queryNumericValue(be,"MaxValue",r);var Te=s$T.queryStringValue(n,"AttachFileExt",r);e$2e(ce)?(ce.volNames.push(""),ce.maxValues.push($e),ce.minValues.push(ve)):ce={bVolume:!0,strVolumeExts:[Te],volNames:[""],maxValues:[$e],minValues:[ve]}}var Ce;L={};(Ce=t.split("?")).length>1&&(L=m$1c(Ce[1]),t=Ce[0]);M=new h$16(i===Me$3.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),R=[],O=/\\+/g,D=s$T.queryFirstNode(n,"OSGFiles",r);var Se,we=!1;if((Se=s$T.queryNodes(D,"Files",r)).length>0)for(B=0,F=Se.length;B<F;B++){N=Se[B];(De=s$T.queryStringValue(N,"FileName",r)).endsWith(".osgb")&&(we=!0);z=i$1b(De=(De=De.replace(O,"/")).replace(/(\.s3m)|(\.osgb)/gi,"")),U=f$Q(De);(Ie={}).relativePath=new h$16(z),Ie.name=U;var Ee=s$T.queryFirstNode(N,"BoundingSphere",r);if(e$2e(Ee)&&Ee.childNodes.length){var Pe=s$T.queryNumericValue(Ee,"CenterX",r),Ae=s$T.queryNumericValue(Ee,"CenterY",r),Le=s$T.queryNumericValue(Ee,"CenterZ",r),Me=s$T.queryNumericValue(Ee,"Radius",r),Re=new o$1p(Pe,Ae,Le);Ie.bSphere=new i$1d(Re,Me)}R.push(Ie)}else{var Oe=s$T.queryNodes(D,"FileName",r);for(B=0,F=Oe.length;B<F;B++){var De;(De=Oe[B].textContent).endsWith(".osgb")&&(we=!0);var Ie;z=i$1b(De=(De=De.replace(O,"/")).replace(/(\.s3m)|(\.osgb)/gi,"")),U=f$Q(De);(Ie={}).relativePath=new h$16(z),Ie.name=U,R.push(Ie)}}var Be=void 0,Fe=s$T.queryFirstNode(n,"Levels",r);if(e$2e(Fe)){var Ne=s$T.queryNodes(Fe,"Level",r);e$2e(Ne)&&Ne.length>0&&(Be=parseInt(Ne[0].textContent))}return{position:{lon:s,lat:l,height:u},fileType:S,maxInstensity:te,minInstensity:ee,maxHeight:m,minHeight:_,maxCategory:x,minCategory:y,processType:A,layerBounds:Q,volumeObj:ce,baseUri:M,rootEntities:R,urlArguments:L,isTextureShare:w,isS3MB:!1,isOSGB:we,isTransparencyOptimization:E,vertexWeightMode:P,level:Be,idFieldName:re,attributeExtentName:oe}}function wr$1(e,t,i){e.asset,e.version;var n=e.dataType;e.pyramidSplitType,e.lodType;var r,o,a,s,l=e.position.x,u=e.position.y,c=e.position.z,h=e.position.units;if(e$2e(e.geoBounds)){var d=e.geoBounds.left,f=e.geoBounds.top,p=e.geoBounds.right,_=e.geoBounds.bottom;d>180||_>180||p>180||f>180?(d>20037508.342789244&&(d-=20037508.342789244*Math.floor(d/20037508.342789244)),p>20037508.342789244&&(p-=20037508.342789244*Math.floor(p/20037508.342789244)),f>10018754.171394622&&(f-=20037508.342789244*Math.floor((f+10018754.171394622)/20037508.342789244)),_>10018754.171394622&&(_-=20037508.342789244*Math.floor((_+10018754.171394622)/20037508.342789244)),V=new h$18(d/=6378137,_/=6378137,p/=6378137,f/=6378137)):V=h$18.fromDegrees(d,_,p,f)}if(e$2e(e.heightRange)&&(r=e.heightRange.min,o=e.heightRange.max),e$2e(e.wDescript)){var m=e.wDescript.range;a=m.min,s=m.max}else if(e$2e(e.vertexAttributeDescript))for(let t=0;t<e.vertexAttributeDescript.length;t++){var g=e.vertexAttributeDescript[t];if("VertexWeight"==g.category){a=g.range.min[0],s=g.range.max[0];break}}var x,y,v,$,b,T,C,S,w,E,P,A,L,M,R=e.extensions,O=!0,D=-1;if(R.hasOwnProperty("s3m:FileType")&&(x=R["s3m:FileType"]),R.hasOwnProperty("s3m:TileSplitType")&&R["s3m:TileSplitType"],R.hasOwnProperty("s3m:ProcessType")&&(T=R["s3m:ProcessType"]),R.hasOwnProperty("IDFieldName")&&(C=R.IDFieldName),R.hasOwnProperty("textureLOD")&&(O="TRUE"===R.textureLOD),R.hasOwnProperty("s3m:MaterialType")&&(w=R["s3m:MaterialType"]),R.hasOwnProperty("globeType")&&(A=R.globeType),R.hasOwnProperty("temporalCount")&&(D=parseInt(R.temporalCount)),R.hasOwnProperty("levels"))for(var I=0,B=R.levels.length;I<B;I++){L=R.levels[I].level;break}R.hasOwnProperty("sml:Level")&&(L=parseInt(R["sml:Level"])),R.hasOwnProperty("s3m:TextureSharing")&&(y="TRUE"===R["s3m:TextureSharing"]),R.hasOwnProperty("s3m:TransparencyOptimization")&&(v="TRUE"===R["s3m:TransparencyOptimization"]),R.hasOwnProperty("s3m:VertexCompressionType")&&($=R["s3m:VertexCompressionType"]),R.hasOwnProperty("s3m:VertexWeightMode")&&(b=R["s3m:VertexWeightMode"]),R.hasOwnProperty("s3m:AttributeExtentName")&&(S=R["s3m:AttributeExtentName"]),R.hasOwnProperty("associateMaterialUrl")&&(E=R.associateMaterialUrl),R.hasOwnProperty("hasAttributeIndex")&&(P="TRUE"==R.hasAttributeIndex),R.hasOwnProperty("historicalRecord")&&(M=R.historicalRecord);var F=[],N=new e$1Q;if(R.hasOwnProperty("pointCloudLayers"))for(I=0,B=R.pointCloudLayers.length;I<B;I++){var G=R.pointCloudLayers[I].layerName;if(e$2e(G)){var z=R.pointCloudLayers[I].layerBounds;F.push(G),N.set(G,z)}else{var U=R.pointCloudLayers[I].layer,V=new h$18;N.set(U,V),F.push(U)}}var k=void 0,W=e.extensions.vol;if(e$2e(W)&&W.length>0)for(var H=[],q=[],j=[],X=[],Y=(I=0,W.length);I<Y;I++){var Z=W[I],K=Z.volName;H.push(K);var Q=Z.volType;X.push(Q);var J=Z.volRangeMin,ee=Z.volRangeMax;q.push(ee),j.push(J),k={bVolume:!0,strVolumeExts:X,volNames:H,maxValues:q,minValues:j}}var te=void 0,ie=e.extensions.map;if(e$2e(ie)&&ie.length>0){var ne=[],re=[];for(I=0,Y=ie.length;I<Y;I++){var oe=ie[I];K=oe.mapName;ne.push(K);Q=oe.dataType;re.push(Q),te={mapExts:re,mapNames:ne}}}var ae={},se=t.split("?");se.length>1&&(ae=m$1c(se[1]),t=se[0]);var le=new h$16(i===Me$3.oss?t.substring(0,t.lastIndexOf("/")+1):t.replace(/config$/g,"data/path/")),ue=[],ce=/\\+/g,he=!1,de=!1,fe=!1,pe=e.tiles||e.rootTiles;for(I=0,B=pe.length;I<B;I++)if(e$2e(pe[I])){var _e=pe[I].url,me=_e.lastIndexOf("."),ge=_e.substring(me,_e.length);".s3mbz"===ge?he=!0:".s3mblock"===ge?de=!0:".osgb"===ge&&(fe=!0);var xe=i$1b(_e=(_e=_e.replace(ce,"/")).replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)|(\.osgb)/gi,"")),ye=f$Q(_e),ve={};if(ve.relativePath=new h$16(xe),ve.name=ye,e$2e(pe[I].boundingbox))if(e$2e(pe[I].boundingbox.center))ve.obb=pe[I].boundingbox;else{var $e=pe[I].boundingbox.min.x,be=pe[I].boundingbox.min.y,Te=pe[I].boundingbox.min.z,Ce=pe[I].boundingbox.max.x,Se=pe[I].boundingbox.max.y,we=pe[I].boundingbox.max.z;ve.min=new o$1p($e,be,Te),ve.max=new o$1p(Ce,Se,we);var Ee=new i$1d;i$1d.fromCornerPoints(ve.min,ve.max,Ee),ve.bSphere=Ee}ue.push(ve)}return{position:{lon:l,lat:u,height:c,units:h},fileType:x,maxInstensity:0,minInstensity:0,maxHeight:o,minHeight:r,maxCategory:s,minCategory:a,layerBounds:V,volumeObj:k,maps:te,baseUri:le,rootEntities:ue,isTextureShare:y,urlArguments:ae,isS3MB:!0,isS3MZ:he,isS3MBlock:de,isOSGB:fe,dataType:n,isTransparencyOptimization:v,vertexCompressionType:$,vertexWeightMode:b,level:L,pointCloudLayerNames:F,processType:T,groupNameBounds:N,idFieldName:C,attributeExtentName:S,materialType:w,textureLod:O,associateMaterialUrl:E,globeType:A,temporalCount:D,hasAttributeIndex:P,historicalRecord:M}}function Mr$1(e,t,i,n,r,o,a){a=u$Z(a,!1),o$1l(e,(function(e){if(n.fieldsInfo=e.fieldsInfo,n.indexInfoMap=e.indexInfoMap,n.indexInfoAttributeMap=e.indexInfoAttributeMap,e$2e(o.isFlyMode)&&!0===o.isFlyMode&&e$2e(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x1a71e8(n);a||t._layers.add(e,r),e$2e(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}),1e3)}});else{var s=new _0x1a71e8(n);a||t._layers.add(s,r),e$2e(t._clipRegions)&&s._setServerClipRegions(t._clipRegions,1),i.resolve(s)}}),(function(){if(!0===o.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x1a71e8(n);a||t._layers.add(e,r),e$2e(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}});else{var e=new _0x1a71e8(n);a||t._layers.add(e,r),e$2e(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}function ir$1(e,t,i,n,r,o,a,s){if(n.useWebsocket){var l=new i$W("websocketTaskProcessor");l.scheduleTask({data:"init",scpUrl:e});var u=e.substring(e.indexOf("datas")+6,e.indexOf("/data/path"))+".scp";l.scheduleTask({dataType:"json",data:"/"+u}).then((function(u){var c=wr$1(u,e,n.serverType);c.context=t.context,c.gl=t.context._gl,c.name=r,c.supportCompressType=t._supportCompressType,c.urlType=n.urlType,c.cullEnabled=n.cullEnabled,c.horizontalLine=n.horizontalLine,c.style3D=n.style3D,c.selectEnable=n.selectable,c.isVisible=n.isVisible,c.minVisibleAltitude=n.minVisibleAltitude,c.maxVisibleAltitude=n.maxVisibleAltitude,c.minVisibleDistance=n.minVisibleDistance,c.maxVisibleDistance=n.maxVisibleDistance,c.shadowType=n.shadowType,c.heading=n.heading,c.lodRangeScale=n.lodRangeScale,c.polygonOffset=n.polygonOffset,c.brightness=n.brightness,c.constrast=n.constrast,c.hue=n.hue,c.saturation=n.saturation,c.gamma=n.gamma,c.effect=n.effect,c.ignoreNormal=u$Z(n.ignoreNormal,!1),c.groupName=u$Z(n.groupName,""),c.cacheKey=u$Z(n.cacheKey,""),c._isJson=!0,c.sceneMode=t.mode,c.scene=t,c.useMercatorProject=n.useMercatorProject,c.scpUrl=a,c.queryFieldNames=n.queryFieldNames,c.subdomainConfig=n.subdomainConfig,c.customRequestHeaders=n.customRequestHeaders,c.LoadingPriority=n.LoadingPriority,c.cullMode=n.cullMode;var h=new _0x1a71e8(c);h._wstTaskProcessor=l,s||t._layers.add(h,o),e$2e(t._clipRegions)&&h._setServerClipRegions(t._clipRegions,1),i.resolve(h)}))}else d$1f(e,n.customRequestHeaders).then((function(l){var u=Zr$1(l,e,n.serverType);u.context=t.context,u.gl=t.context._gl,u.name=r,u.supportCompressType=t._supportCompressType,u.urlType=n.urlType,u.cullEnabled=n.cullEnabled,u.horizontalLine=n.horizontalLine,u.style3D=n.style3D,u.selectEnable=n.selectable,u.isVisible=n.isVisible,u.minVisibleAltitude=n.minVisibleAltitude,u.maxVisibleAltitude=n.maxVisibleAltitude,u.minVisibleDistance=n.minVisibleDistance,u.maxVisibleDistance=n.maxVisibleDistance,u.shadowType=n.shadowType,u.heading=n.heading,u.lodRangeScale=n.lodRangeScale,u.polygonOffset=n.polygonOffset,u.brightness=n.brightness,u.constrast=n.constrast,u.hue=n.hue,u.saturation=n.saturation,u.gamma=n.gamma,u.effect=n.effect,u.ignoreNormal=u$Z(n.ignoreNormal,!1),u.groupName=u$Z(n.groupName,""),u.cacheKey=u$Z(n.cacheKey,""),u.customRequestHeaders=n.customRequestHeaders,u.sceneMode=t.mode,u.loadVolumeData=u$Z(n.loadVolumeData,!0),u.scene=t,u.useMercatorProject=n.useMercatorProject,u.scpUrl=a,u.queryFieldNames=n.queryFieldNames,u.subdomainConfig=n.subdomainConfig,u.useMercatorProject=n.useMercatorProject,u.cullMode=n.cullMode;var c=Xr$1(u.baseUri,n.customRequestHeaders,n.urlType,u.scpUrl);o$1l(Gr(l,u.baseUri,n.customRequestHeaders),(function(e){u.waterEffectSet=e,o$1l(c,(function(e){if(u.fieldsInfo=e,e$2e(n.isFlyMode)&&!0===n.isFlyMode&&e$2e(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x1a71e8(u);t._layers.add(e,o),i.resolve(e)}),1e3)}});else{var r=new _0x1a71e8(u);s||t._layers.add(r,o),e$2e(t._clipRegions)&&r._setServerClipRegions(t._clipRegions,1),i.resolve(r)}}),(function(){if(!0===n.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x1a71e8(u);t._layers.add(e,o),i.resolve(e)}});else{var e=new _0x1a71e8(u);s||t._layers.add(e,o),e$2e(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}),(function(){o$1l(c,(function(e){if(u.fieldsInfo=e,e$2e(n.isFlyMode)&&!0===n.isFlyMode&&e$2e(bounds))t.camera.flyTo({destination:bounds,complete:function(){setTimeout((function(){var e=new _0x1a71e8(u);s||t._layers.add(e,o),i.resolve(e)}),1e3)}});else{var r=new _0x1a71e8(u);s||t._layers.add(r,o),e$2e(t._clipRegions)&&r._setServerClipRegions(t._clipRegions,1),i.resolve(r)}}),(function(){if(!0===n.isFlyMode)t.camera.flyTo({destination:bounds,complete:function(){var e=new _0x1a71e8(u);t._layers.add(e,o),i.resolve(e)}});else{var e=new _0x1a71e8(u);s||t._layers.add(e,o),e$2e(t._clipRegions)&&e._setServerClipRegions(t._clipRegions,1),i.resolve(e)}}))}))}),(function(l){u$P(e,n.customRequestHeaders).then((function(l){var u=wr$1(l,e,n.serverType);u.context=t.context,u.gl=t.context._gl,u.name=r,u.supportCompressType=t._supportCompressType,u.urlType=n.urlType,u.cullEnabled=n.cullEnabled,u.horizontalLine=n.horizontalLine,u.style3D=n.style3D,u.selectEnable=n.selectable,u.isVisible=n.isVisible,u.minVisibleAltitude=n.minVisibleAltitude,u.maxVisibleAltitude=n.maxVisibleAltitude,u.minVisibleDistance=n.minVisibleDistance,u.maxVisibleDistance=n.maxVisibleDistance,u.shadowType=n.shadowType,u.heading=n.heading,u.lodRangeScale=n.lodRangeScale,u.polygonOffset=n.polygonOffset,u.brightness=n.brightness,u.constrast=n.constrast,u.hue=n.hue,u.saturation=n.saturation,u.gamma=n.gamma,u.effect=n.effect,u.ignoreNormal=u$Z(n.ignoreNormal,!1),u.groupName=u$Z(n.groupName,""),u.cacheKey=u$Z(n.cacheKey,""),u._isJson=!0,u.sceneMode=t.mode,u.scene=t,u.useMercatorProject=n.useMercatorProject,u.scpUrl=a,u.queryFieldNames=n.queryFieldNames,u.subdomainConfig=n.subdomainConfig,u.customRequestHeaders=n.customRequestHeaders,u.useMercatorProject=n.useMercatorProject,u.cullMode=n.cullMode;var c=Kr$1(u.baseUri,n.customRequestHeaders,u.attributeExtentName,u.urlType);o$1l(Yr$1(l,u.baseUri,n.customRequestHeaders),(function(e){u.waterEffectSet=e,Mr$1(c,t,i,u,o,n,s)}),(function(){Mr$1(c,t,i,u,o,n,s)}))}),(function(e){i.reject("add s3m layer failed,"+e)}))})).otherwise((function(e){i.reject("add s3m layer failed,"+e)}))}function Er$1(e,t,i){var n=i&&i.lexicographical,r=i&&i.zeroExtend,o=e.split("."),a=t.split(".");function s(e){return(n?/^\d+[A-Za-z]*$/:/^\d+$/).test(e)}if(!o.every(s)||!a.every(s))return NaN;if(r){for(;o.length<a.length;)o.push("0");for(;a.length<o.length;)a.push("0")}n||(o=o.map(Number),a=a.map(Number));for(var l=0;l<o.length;++l){if(a.length==l)return 1;if(o[l]!=a[l])return o[l]>a[l]?1:-1}}function Ur$1(e,t,i){return u$P(e,i).then((function(i){if(!(i.length<1)){var n=void 0;if(e$2e(t)){for(var r=0;r<i.length;r++){var o=i[r];if(o.name===t){n=o;break}}if(!e$2e(n))return void console.error("no named scene was found!")}else n=i[0];var a=new h$16(e);return a.path=new h$16(n.path).path,{name:n.name,path:a.toString()}}}))}function $r$1(e,t,i){var n=e+"/layers.json";return e$2e(a$O.CREDENTIAL)&&(n=e$2e(a$O.CREDENTIAL._keymap[i])?a$O.addTokenWithKey(i,n):a$O.addToken(n)),u$P(n,t).then((function(e){for(var t={s3m:[],imagery:[],s3mGroup:[],terrain:void 0},i=0,n=e.length;i<n;i++){var r=e[i],o=r.layer3DType;"OSGBLayer"==o?t.s3m.push(r):"ImageFileLayer"==o?t.imagery.push(r):"TerrainFileLayer"==o?t.terrain=r:"OSGBGroup"==o&&t.s3mGroup.push(r)}return t}))}Object.defineProperties(De$2.prototype,{}),De$2.prototype.open=function(e,t,i){i=u$Z(i,{});var n=/({.*?})/g;if(e.indexOf("?token")>-1&&e.indexOf("realspace")>-1){var r=new h$16(e),o=m$1c(r.query);r.query=void 0,e=r.toString();var a={};if(e$2e(i.subdomains))for(let t=0;t<i.subdomains.length;t++){var s=e.replace(/({.*?})/g,i.subdomains[t]);a={rooturl:s,type:"token",value:o.token},e$2e(a$O.CREDENTIAL)?s in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([a]):a$O.CREDENTIAL=new a$O([a])}else{if(n.test(e))throw new t$15("detected subdomain url scheme, but no subdomain provided.");a={rooturl:e,type:"token",value:o.token},e$2e(a$O.CREDENTIAL)?e in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([a]):a$O.CREDENTIAL=new a$O([a])}}if("realspace"!=e.slice(-9))throw new t$15("open scene url error!");i=u$Z(i,{}),this.customRequestHeaders=u$Z(this.customRequestHeaders,i.customRequestHeaders);var l=u$Z(i.useMercatorProject,!1),u=u$Z(i.autoSetView,!0),c=e,h=i.subdomains;if(e$2e(h))e=e.replace(n,(function(e,t){if(!e$2e(h.length))throw new t$15("detected subdomain url scheme, but no subdomain provided.");if("{s}"===t)return h[0]}));else if(n.test(e))throw new t$15("detected subdomain url scheme, but no subdomain provided.");var d=e+"/scenes.json";e$2e(a$O.CREDENTIAL)&&(d=e$2e(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,d):a$O.addToken(d));var f=this,p=this._scene,_=this.camera,m=o$1l.defer();return Ur$1(d,t,f._customRequestHeaders).then((function(t){if(e$2e(t)){var n=t.path.indexOf("?");-1!==n&&(t.path=t.path.substring(0,n));var r=t.path+".json";e$2e(a$O.CREDENTIAL)&&(r=e$2e(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,r):a$O.addToken(r)),ea$2(r,f._customRequestHeaders).then((function(t){try{var i,n;if(e$2e(t.clipRegions)){for(var r=[],o=0;o<t.clipRegions.length;o++){for(var a=[],s=0;s<t.clipRegions[o].points.length;s++)a.push(t.clipRegions[o].points[s].x),a.push(t.clipRegions[o].points[s].y),a.push(t.clipRegions[o].points[s].z||0);r.push(a)}p._clipRegions=r}n=-1!==e.indexOf("/iserver")?e.substring(0,e.indexOf("/iserver")+8)+"/_setup.json":e.substring(0,e.indexOf("/realspace")+10)+"/_setup.json",e$2e(a$O.CREDENTIAL)&&(n=e$2e(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,n):a$O.addToken(n)),"NONEARTHFLAT"===t.sceneType?u$P(n,f._customRequestHeaders).then((function(e){if(p.mode=C$14.COLUMBUS_VIEW,!e$2e(e.systemUGOVersion)||Er$1("11.1.0.22305",e.systemUGOVersion)>0?t.camera.tilt-=Math.PI:t.camera.tilt-=Math.PI/2,i=new o$1p(t.camera.longitude,t.camera.latitude,t.camera.altitude),l){var n=(new t$N).unproject(i);i=p.camera._projection.project(n)}var r=i.x,o=i.y;r>20037508.342789244&&(r-=20037508.342789244*Math.floor(r/20037508.342789244)),o>10018754.171394622&&(o-=20037508.342789244*Math.floor((o+10018754.171394622)/20037508.342789244)),i.x=r,i.y=o,u&&_.setView({destination:i,orientation:{heading:t.camera.heading,pitch:t.camera.tilt,roll:0},convert:!1})})).otherwise((function(){if(p.mode=C$14.COLUMBUS_VIEW,t.camera.tilt-=Math.PI/2,i=new o$1p(t.camera.longitude,t.camera.latitude,t.camera.altitude),l){var e=(new t$N).unproject(i);i=p.camera._projection.project(e)}var n=i.x,r=i.y;n>20037508.342789244&&(n-=20037508.342789244*Math.floor(n/20037508.342789244)),r>10018754.171394622&&(r-=20037508.342789244*Math.floor((r+10018754.171394622)/20037508.342789244)),i.x=n,i.y=r,u&&_.setView({destination:i,orientation:{heading:t.camera.heading,pitch:t.camera.tilt,roll:0},convert:!1})})):(t.camera.tilt-=90,i=o$1p.fromDegrees(t.camera.longitude,t.camera.latitude,t.camera.altitude),u&&_.setView({destination:i,orientation:{heading:e$2d.toRadians(t.camera.heading),pitch:e$2d.toRadians(t.camera.tilt),roll:0},convert:!1}),u$P(n,f._customRequestHeaders).then((function(e){if((!e$2e(e.systemUGOVersion)||Er$1("10.1.0.18325",e.systemUGOVersion)>0)&&-90!==t.camera.tilt){var n=new f$19(i,_.direction),r=g$1j.rayEllipsoid(n,t$12.WGS84);if(r){var o=o$1p.normalize(i,new o$1p);o$1p.negate(o,o);var a=new f$19(i,o),s=g$1j.rayEllipsoid(a,t$12.WGS84);if(s){var l=r.start>0?r.start:r.stop,u=f$19.getPoint(n,l,new o$1p),c=s.start>0?s.start:s.stop,h=f$19.getPoint(a,c,new o$1p),d=o$1p.cross(u,h,new o$1p),f=o$1p.angleBetween(u,h);_.rotate(d,-f)}}}})))}catch(e){m.reject("camera set view failed,"+e)}})).otherwise((function(e){m.reject("get scene config failed,"+e)})),$r$1(t.path,f._customRequestHeaders,e).then((function(n){for(var r=n.s3m,o=n.imagery,a=n.terrain,s=n.s3mGroup,u=t.path+"/layers/",d=[],_=r.length-1,g=_;g>=0;g--){var x=r[g],y=u+encodeURIComponent(x.name)+"/extendxml.xml";e$2e(a$O.CREDENTIAL)&&(y=e$2e(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,y):a$O.addToken(y)),function(t){t=p.layers._s3mLayerAddedIndex;var i=sr$1(y,f._customRequestHeaders).then((function(i){try{var n=e+"/datas/"+encodeURIComponent(i.name)+"/config";if(i.customRequestHeaders=f._customRequestHeaders,i.useMercatorProject=l,i.subdomainConfig={subdomains:h,urlScheme:c},!e$2e(i.groupName)||""===i.groupName)return f.addS3MTilesLayerByScp(n,i,t);var r=p.layers.find(i.groupName),o=!r;if(!r){var a={scene:p,name:i.groupName};r=new _0x17cdca(a),p.layers.add(r)}if(i.index=t,i.ready=!1,r._layerConfigs.set(n,i),r._s3mURLs[t]=n,o)return r}catch(e){m.reject("add S3M layer"+i.name+" failed,"+e)}})).otherwise((function(e){m.reject("get S3M layer config failed,"+e+",layer name is "+x.name)}));p.layers._s3mLayerAddedIndex++,e$2e(i)&&d.push(i)}(_-g)}for(g=s.length-1;g>=0;g--){x=s[g],y=u+encodeURIComponent(x.name)+"/extendxml.xml";e$2e(a$O.CREDENTIAL)&&(y=e$2e(a$O.CREDENTIAL._keymap[e])?a$O.addTokenWithKey(e,y):a$O.addToken(y)),function(t){var i=sr$1(y,f._customRequestHeaders).then((function(i){try{var n=e+"/datas/"+encodeURIComponent(i.name)+"/config";return f.addS3MGroupLayer(n,i,t)}catch(e){m.reject("add S3MGroup layer"+i.name+" failed,"+e)}})).otherwise((function(e){m.reject("get S3MGroup layer config failed,"+e+",layer name is "+x.name)}));d.push(i)}(s.length-1-g)}for(g=o.length-1;g>=0;g--){var v=c+"/datas/"+encodeURIComponent(o[g].name),$=new P$6({url:v,subdomains:h,customRequestHeaders:f._customRequestHeaders});try{var b=p.imageryLayers.addImageryProvider($);o[g].maxVisibleAltitude>0&&(b.maxHeight=o[g].maxVisibleAltitude,b.minHeight=o[g].minVisibleAltitude),d.push(b)}catch(e){m.reject("add imagery layer "+o[g].name+" failed,"+e)}}if(e$2e(a)){var T=c+"/datas/"+encodeURIComponent(a.name);try{p.terrainProvider=new ne$u({url:T,isSct:!0,subdomains:h,customRequestHeaders:f._customRequestHeaders,invisibility:u$Z(i.invisibility,!1)}),d.push(p.terrainProvider)}catch(e){m.reject("add terrain layer "+a.name+" failed,"+e)}}o$1l.all(d,(function(e){for(var t=[],i=0;i<e.length;i++)e$2e(e[i])&&t.push(e[i]);m.resolve(t)}),(function(e){m.reject("add all layers failed,"+e)}))})).otherwise((function(e){m.reject("get layer list failed,"+e)}))}else m.reject("scene list response null!")})).otherwise((function(e){m.reject("get scene list failed,"+e)})),m.promise},De$2.prototype.addS3MTilesLayerByScp=function(e,t,i,n){t=u$Z(t,{});var r=/({.*?})/g;if(e.indexOf("?token")>-1){var o=new h$16(e),a=m$1c(o.query);o.query=void 0,e=o.toString();var s={};if(e$2e(t.subdomains))for(let i=0;i<t.subdomains.length;i++){var l=e.replace(/({.*?})/g,t.subdomains[i]);s={rooturl:l,type:"token",value:a.token},e$2e(a$O.CREDENTIAL)?l in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([s]):a$O.CREDENTIAL=new a$O([s])}else{if(r.test(e))throw new t$15("detected subdomain url scheme, but no subdomain provided.");s={rooturl:e,type:"token",value:a.token},e$2e(a$O.CREDENTIAL)?e in a$O.CREDENTIAL._keymap||a$O.CREDENTIAL.addCredential([s]):a$O.CREDENTIAL=new a$O([s])}}if(!e$2e(e))throw new t$15("add s3m tiles layer,url is required.");if(e$2e(t.subdomains))e=e.replace(r,(function(e,i){if(!e$2e(t.subdomains.length))throw new t$15("detected subdomain url scheme, but no subdomain provided.");if("{s}"===i)return t.subdomains[0]}));else if(r.test(e))throw new t$15("detected subdomain url scheme, but no subdomain provided.");t=t||{};var u=o$1l.defer();n=u$Z(n,!1);var c,h,d=e,f=u$Z(t.name,f$Q(d)),p=this,_=this._scene;if((-1!==e.indexOf("ws://")||-1!==e.indexOf("wss://"))&&(t.useWebsocket=!0),t.useWebsocket)return ir$1(d,_,u,t,f,i,m,n),u.promise;(c=-1!==e.indexOf("aliyuncs")||-1!==e.indexOf("oss-cn")?Me$3.oss:Me$3.iServer)===Me$3.iServer&&(h=1===t.urlType?e+"&authentication=login":e.substring(0,e.indexOf("rest/realspace")+14));var m=e;return e$2e(a$O.CREDENTIAL)&&(d=e$2e(a$O.CREDENTIAL._keymap[d])?a$O.addTokenWithKey(d,d):a$O.addToken(d)),LicenseChecker.LICENSECHECKER.getLicense(d).then((function(e){LicenseChecker.LICENSECHECKER.check(e)})),c===Me$3.iServer?(t.serverType=Me$3.iServer,e$2e(this.RSAAuthenticationStatus[h])?(0===this.RSAAuthenticationStatus[h]&&(e$2e(ee$3[h])||(ee$3[h]={}),e$2e(ee$3[h][d])||(ee$3[h][d]={scene:_,deferred:u,options:t,layerName:f,index:i})),1===this.RSAAuthenticationStatus[h]&&ir$1(d,_,u,t,f,i,m,n),2===this.RSAAuthenticationStatus[h]&&u.reject("add s3m layer failed,"+d)):(this.RSAAuthenticationStatus[h]=0,ra$2(h,t.urlType,t.customRequestHeaders,d).then((function(){if(p.RSAAuthenticationStatus[h]=1,ir$1(d,_,u,t,f,i,m,n),e$2e(ee$3[h]))for(var e in ee$3[h]){var r=u$Z(ee$3[h][e].options.groupName,n);ir$1(e,ee$3[h][e].scene,ee$3[h][e].deferred,ee$3[h][e].options,ee$3[h][e].layerName,ee$3[h][e].index,void 0,r),delete ee$3[h][e]}}),(function(e){p.RSAAuthenticationStatus[h]=2,delete ee$3[h],u.reject("add s3m layer failed,"+e.url)})).otherwise((function(e){p.RSAAuthenticationStatus[h]=2,delete ee$3[h],u.reject("add s3m layer failed,"&e.url)})))):(t.serverType=Me$3.oss,ir$1(d,_,u,t,f,i,m,n)),u.promise},De$2.prototype.addS3MGroupLayer=function(e,t,i){if(!e$2e(e))throw new t$15("add S3MGroup layer,url is required.");t=t||{};var n=e;e$2e(a$O.CREDENTIAL)&&(n=a$O.addToken(n));var r=u$Z(t.name,f$Q(n)),o=this,a=o$1l.defer();return u$P(n).then((function(e){var t={name:r,url:n,layerBounds:e.geobounds,layers:e.layers,scene:o},a=new _0x17cdca(t);o._layers.add(a,i)})).otherwise((function(e){a.reject("add S3MGroup layer failed,"+e)})),a.promise},De$2.prototype.addLayerService=function(e,t,i){if(!e$2e(e)||!e$2e(t)||!e$2e(i))throw new t$15("url and sceneName and layerName is required!");if("realspace"!=e.slice(-9))throw new t$15("open scene url error!");var n=this,r=e+"/scenes/"+encodeURIComponent(t)+"/layers/"+encodeURIComponent(i)+"/extendxml.xml";e$2e(a$O.CREDENTIAL)&&(r=a$O.addToken(r));var o=o$1l.defer();return sr$1(r,n._customRequestHeaders).then((function(t){try{var i=e+"/datas/"+encodeURIComponent(t.name)+"/config";t.customRequestHeaders=n._customRequestHeaders;var r=n.addS3MTilesLayerByScp(i,t);o.resolve(r)}catch(e){o.reject("add S3M layer"+t.name+" failed,"+e)}})).otherwise((function(e){o.reject("get S3M layer config failed,"+e+",layer name is "+i)})),o.promise};var Jr$1=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,Ir$1=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)\)$/i;function sr$1(e,t,i){return e$2e(i)||(i=o$1l.defer()),d$1f(e,t).then((function(n){try{var r=Qr$1(n);i.resolve(r)}catch{sr$1(e,t,i)}})).otherwise((function(){sr$1(e,t,i)})),i.promise}function Qr$1(e){if(!e$2e(e))throw new t$15("get s3m layer config failed,xml document undefined.");var t,i=e.firstChild,n=i.namespaceURI,r=s$T.queryStringValue(i,"LayerName",n),o=s$T.queryFirstNode(i,"GeoBounds",n);if(e$2e(o)){var a=s$T.queryNumericValue(o,"bottom",n),s=s$T.queryNumericValue(o,"left",n),l=s$T.queryNumericValue(o,"top",n),u=s$T.queryNumericValue(o,"right",n);s>180||a>180||u>180||l>180?(s>20037508.342789244&&(s-=20037508.342789244*Math.floor(s/20037508.342789244)),u>20037508.342789244&&(u-=20037508.342789244*Math.floor(u/20037508.342789244)),l>10018754.171394622&&(l-=20037508.342789244*Math.floor((l+10018754.171394622)/20037508.342789244)),a>10018754.171394622&&(a-=20037508.342789244*Math.floor((a+10018754.171394622)/20037508.342789244)),t=new h$18(s/=6378137,a/=6378137,u/=6378137,l/=6378137)):t=h$18.fromDegrees(s,a,u,l)}var c=s$T.queryFirstNode(i,"Options",n),h=s$T.queryStringValue(i,"WithinLayer3DGroup",n),d=s$T.queryBooleanValue(c,"Selectable",n),f=s$T.queryBooleanValue(c,"Visible",n),p=s$T.queryNumericValue(c,"VisibleAltitudeMin",n),_=s$T.queryNumericValue(c,"VisibleAltitudeMax",n);_=0==_?Number.MAX_VALUE:_;var m=s$T.queryNumericValue(c,"VisibleDistanceMin",n),g=s$T.queryNumericValue(c,"VisibleDistanceMax",n),x=s$T.queryStringValue(c,"ShadowType",n),y=0;"SELECTION"==x?y=1:"ALL"==x&&(y=2);var v=!1;"S3MB"==s$T.queryStringValue(i,"CacheFileType",n)&&(v=!0);var $=s$T.queryFirstNode(i,"Style",n);if(!e$2e($)){var b=s$T.queryFirstNode(i,"LayerStyle",n);if(e$2e(b)&&!e$2e($=s$T.queryFirstNode(b,"Style",n)))throw new t$15("get s3m layer config failed,extendxml.xml foamat error,layer name is "+r)}var T=s$T.queryNumericValue($,"LineWidth",n),C=s$T.queryStringValue($,"FillForeColor",n),S=Jr$1.exec(C),w=new e$1X;if(null!==S){var E=parseFloat(S[1]);E=189==E?255:E;var P=parseFloat(S[2]);P=235==P?255:P,w.red=e$2d.clamp(E/255,0,1),w.green=e$2d.clamp(P/255,0,1),w.blue=e$2d.clamp(parseFloat(S[3])%256/255,0,1),w.alpha=e$2d.clamp(parseFloat(S[3])%65536/256/255,0,1)}var A=s$T.queryFirstNode($,"Style3D",n),L=new e$1v;if(e$2e(A)){var M=s$T.queryStringValue(A,"Fill3DMode",n),R=fr$3.Fill;"FILL_LINE"==M?R=fr$3.WireFrame:"FILL_FACEANDLINE"==M&&(R=fr$3.Fill_And_WireFrame);var O=s$T.queryNumericValue(A,"PointSize",n),D=s$T.queryStringValue(A,"LineColor",n),I=(S=Ir$1.exec(D),new e$1X);null!==S&&(I.red=e$2d.clamp(parseFloat(S[1]),0,1),I.green=e$2d.clamp(parseFloat(S[2]),0,1),I.blue=e$2d.clamp(parseFloat(S[3]),0,1),I.alpha=e$2d.clamp(parseFloat(S[4]),0,1));var B=s$T.queryNumericValue($,"MarkerSize",n)||0;B*=2,O=Math.max(O,B);var F=s$T.queryStringValue(A,"ColorPoint",n);S=Ir$1.exec(F);var N=new e$1X;null!==S&&(N.red=e$2d.clamp(parseFloat(S[1]),0,1),N.green=e$2d.clamp(parseFloat(S[2]),0,1),N.blue=e$2d.clamp(parseFloat(S[3]),0,1),N.alpha=e$2d.clamp(parseFloat(S[4]),0,1));var G=s$T.queryNumericValue(A,"BottomAltitude",n);s$T.queryStringValue(A,"AltitudeMode",n);var z=s$T.queryStringValue(A,"BillboardMode",n),U=s$T.queryBooleanValue(A,"FixedPixelSize",n);z="AUTO_Z_AXIAL"==z?yr$2.FixedZ:"FIXED_ANGLE"==z?yr$2.FixedXYZ:yr$2.None;var V=e$2d.toRadians(s$T.queryNumericValue(A,"RotateX",n)),k=e$2d.toRadians(s$T.queryNumericValue(A,"RotateY",n)),W=e$2d.toRadians(s$T.queryNumericValue(A,"RotateZ",n));new i$16(V,k,W),L.fillForeColor=w,L.bottomAltitude=G,L.lineWidth=T,L.lineColor=I,L.pointSize=O,L.pointColor=N,L.fillStyle=R,L.billboardMode=z,L.fixedPixelSize=U}var H=void 0,q=s$T.queryFirstNode(i,"Effect",n);if(e$2e(q)){var j=s$T.queryStringValue(q,"EffectType",n);if("Region"===j){H=new _0x2adae6;var X=s$T.queryNumericValue(q,"Type",n);H.setValue("RegionType",X);var Y=s$T.queryNumericValue(q,"ForeColor",n),Z=e$1X.fromRgba(Y);H.setValue("ForeColor",Z);var K=s$T.queryNumericValue(q,"BackColor",n),Q=e$1X.fromRgba(K);H.setValue("BackColor",Q);var J=s$T.queryNumericValue(q,"WidthX",n);H.setValue("WidthX",J);var ee=s$T.queryNumericValue(q,"WidthY",n);H.setValue("WidthY",ee);var te=s$T.queryNumericValue(q,"OffsetX",n);H.setValue("OffsetX",te);var ie=s$T.queryNumericValue(q,"OffsetY",n);H.setValue("OffsetY",ie);var ne=s$T.queryNumericValue(q,"RepeatX",n);H.setValue("RepeatX",ne);var re=s$T.queryNumericValue(q,"RepeatY",n);H.setValue("RepeatY",re);var oe=s$T.queryNumericValue(q,"RotationAngle",n);H.setValue("RotationAngle",oe)}else if("Polyline"===j){H=new _0x5175d0;X=s$T.queryNumericValue(q,"Type",n);H.setValue("PolylineType",X);var ae=s$T.queryNumericValue(q,"Color",n),se=e$1X.fromRgba(ae);H.setValue("Color",se);var le=s$T.queryNumericValue(q,"Width",n);H.setValue("Width",le);var ue=s$T.queryBooleanValue(q,"IsArrow",n);H.setValue("IsArrow",ue);var ce=s$T.queryNumericValue(q,"GapColor",n),he=e$1X.fromRgba(ce);H.setValue("GapColor",he);var de=s$T.queryNumericValue(q,"DashLength",n);H.setValue("DashLength",de);var fe=s$T.queryNumericValue(q,"DashPattern",n);H.setValue("DashPattern",fe);var pe=s$T.queryBooleanValue(q,"IsMove",n);H.setValue("IsMove",pe);var _e=s$T.queryNumericValue(q,"GlowPower",n);H.setValue("GlowPower",_e);var me=s$T.queryNumericValue(q,"OutlineColor",n),ge=e$1X.fromRgba(me);H.setValue("OutlineColor",ge);var xe=s$T.queryNumericValue(q,"OutlineWidth",n);H.setValue("OutlineWidth",xe)}}var ye=s$T.queryNumericValue(i,"LODRangeScale",n),ve=s$T.queryFirstNode(i,"PolygonOffset",n),$e=s$T.queryNumericValue(ve,"Constant",n),be=s$T.queryNumericValue(ve,"SlopeScale",n),Te=0!==$e&&0!==be,Ce=s$T.queryFirstNode(i,"ColorParams",n);return{name:r,groupName:h,layerBounds:t,isS3MB:v,style3D:L,selectEnable:d,isVisible:f,minVisibleAltitude:p,maxVisibleAltitude:_,minVisibleDistance:m,maxVisibleDistance:g,shadowType:y,heading:W,lodRangeScale:ye,polygonOffset:{enabled:Te,units:$e,factor:be},brightness:s$T.queryNumericValue(Ce,"Brightness",n),constrast:s$T.queryNumericValue(Ce,"Constrast",n),hue:s$T.queryNumericValue(Ce,"Hue",n),saturation:s$T.queryNumericValue(Ce,"Saturation",n),gamma:s$T.queryNumericValue(Ce,"Gamma",n),effect:H,cullMode:s$T.queryStringValue(i,"RenderCullMode",n)}}function ea$2(e,t){return u$P(e,t).then((function(e){return e}))}function ra$2(e,t,i,n){var r,o,a=o$1l.defer();return 1===t?(r=e,o=e):(r=e+"/login.json",o=e+"/login.json"),e$2e(a$O.CREDENTIAL)&&(n=n.substring(0,n.indexOf("?")),e$2e(a$O.CREDENTIAL._keymap[n])?(r=a$O.addTokenWithKey(n,r),o=a$O.addTokenWithKey(n,o)):(r=a$O.addToken(r),o=a$O.addToken(o))),u$P(r,i).then((function(t){var n=Number(t.jsessionID),r=aa$2(Number(t.random),397245148883021,0x8f461e7bf61d5),s={jsessionID:n.toString(),random:r.toString()},l=new XMLHttpRequest;if(u$W.contains(e)&&(l.withCredentials=!0),l.open("POST",o,!0),l.onreadystatechange=function(){if(4===l.readyState)if(200===l.status||201===l.status){var e={};try{e=JSON.parse(l.response)}catch{-1!==(l.response||l.responseText).toString().indexOf("isSucceed : true")&&(e.succeed=!0)}!0===e.succeed?a.resolve(!0):a.reject(!1)}else a.reject(!1)},e$2e(i))for(var u in i)i.hasOwnProperty(u)&&l.setRequestHeader(u,i[u]);l.send(JSON.stringify(s))}),(function(e){a.reject({status:!1,url:n})})).otherwise((function(){a.reject({status:!1,url:n})})),a.promise}function aa$2(e,t,i){for(var n=new tr$1(e),r=new tr$1(t),o=new tr$1(1),a=new tr$1(2),s=new tr$1(1);r.toNumber()>0;)0===r.mod(a).toNumber()?(r=r.dividedBy(a),n=n.multipliedBy(n).mod(i)):(r=r.minus(s),o=o.multipliedBy(n).mod(i));return o.toNumber()}De$2.prototype.isDestroyed=function(){return!1},De$2.prototype.destroy=function(){return i$11(this)};var Te$2=function(e){return function(){e.frameState.afterRender.push((function(){e.requestRender()}))}};function pi$1(e,t,i){this.ray=e,this.width=t,this.primitives=i,this.ready=!1,this.deferred=o$1l.defer(),this.promise=this.deferred.promise}function w$4(e){var t,i=(e=u$Z(e,u$Z.EMPTY_OBJECT)).canvas,n=e.contextOptions,r=e.creditContainer,o=e.creditViewport;if(!e$2e(i))throw new t$15("options and options.canvas are required.");t=e$2e(e.contextOptions)&&e.contextOptions.contextType===Me$j.WebGPU?new f$8(i,n,e.engine):new g$b(i,n);var a=e$2e(r);a||((r=document.createElement("div")).style.position="absolute",r.style.bottom="0",r.style["text-shadow"]="0 0 2px #000000",r.style.color="#ffffff",r.style["font-size"]="10px",r.style["padding-right"]="5px",i.parentNode.appendChild(r)),e$2e(o)||(o=i.parentNode),this._id=e$1T(),this._jobScheduler=new o$f,this._frameState=new h$f(t,new r$l(r,"_",o),this._jobScheduler),this._frameState.scene3DOnly=u$Z(e.scene3DOnly,!1),this._removeCreditContainer=!a,this._creditContainer=r;var s=new n$$(t);s.viewport=new f$1a,s.viewport.x=0,s.viewport.y=0,s.viewport.width=t.drawingBufferWidth,s.viewport.height=t.drawingBufferHeight,this._passState=s,this._canvas=i,this._context=t,this._computeEngine=new f$n(t),this._globe=void 0,this._globeTranslucencyState=new F$c,this._globeHeight=void 0,this._cameraUnderground=!1,this._primitives=new o$y,this._groundPrimitives=new o$y,this._asyncRayPicks=[],this._logDepthBuffer=t.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new s$a,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._overlayAgainstDepthCommandList=[],this._logDepthOverlayCommandList=[],this._useOIT=u$Z(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new c$d,this._clearColorCommand=new t$W({color:new e$1X,stencil:0,owner:this}),this._depthOnlyRenderStateCache={},this._pickRenderStateCache={},this._transitioner=new R$8(this),this._preUpdate=new o$1h,this._postUpdate=new o$1h,this._renderError=new o$1h,this._preRender=new o$1h,this._postRender=new o$1h,this._pickPositionCache={},this._pickPositionCacheDirty=!1,this._minimumDisableDepthTestDistance=0,this.frustumTolerance=0,this._msaaSamples=e.contextOptions?u$Z(e.contextOptions.msaaLevel,1):1,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new o$1h,this.morphComplete=new o$1h,this.skyBox=void 0,this._cloudBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=e$1X.clone(e$1X.BLACK),this._mode=C$14.SCENE3D,this._mapProjection=e$2e(e.mapProjection)?e.mapProjection:new n$1d,this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e11,this.nearToFarDistance2D=175e4,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowGlobeDepth=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.fog=new g$j,this._sunCamera=new v$K(this),this.shadowMap=new C$Z({context:t,lightCamera:this._sunCamera,enabled:u$Z(e.shadows,!1),pcss:u$Z(e.pcss,!0),shadowQuality:u$Z(e.shadowQuality,0)}),this._analysisShadowMap=void 0,this.invertClassification=!1,this.invertClassificationColor=e$1X.clone(e$1X.WHITE),this._actualInvertClassificationColor=e$1X.clone(this._invertClassificationColor),this._invertClassification=new t$a,this.focalLength=void 0,this.eyeSeparation=void 0,this._brdfLutGenerator=new t$c,this._terrainExaggeration=u$Z(e.terrainExaggeration,1),this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new _a(this),this._mapMode2D=u$Z(e.mapMode2D,Rr$3.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostEffect:!1,usePostProcessSelected:!1,useWebVR:!1,usePrepass:!1},this._environmentVisible={isSunVisible:!0,isMoonVisible:!0,isSkyAtmosphereVisible:!0,isSkyBoxVisible:!0,isGlobalVisible:!0,isObjectVisible:!0,isOnlyS3MObjectVisible:!1,isBillboardVisible:!0},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=u$Z(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=u$Z(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=r$1b.requestCompletedEvent.addEventListener(Te$2(this)),this._removeTaskProcessorListenerCallback=i$W.taskCompletedEvent.addEventListener(Te$2(this)),this._removeGlobeCallbacks=[];var l=new f$1a(0,0,t.drawingBufferWidth,t.drawingBufferHeight),u=new v$K(this);this._logDepthBuffer&&(u.frustum.near=.1,u.frustum.far=1e10),this.preloadFlightCamera=new v$K(this),this.preloadFlightCullingVolume=void 0,this._picking=new d$g(this);var c=new f$1a(0,0,1,1),h=new v$K(this);h.frustum=new a$V({width:.1,aspectRatio:1,near:.1}),this._view=new L$c(this,u,l),this._pickOffscreenView=new L$c(this,h,c),this.pickOffscreenDefaultWidth=.1,this._defaultView=new L$c(this,u,l),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this._sunColor=new o$1p(1.8,1.85,2),this._lightGroup=Ze$4.SUN_LIGHT,this._presetLightSource=[],this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentMapAtlas=void 0,this._supportCompressType=0,t.s3tc?this._supportCompressType=1:t.pvrtc?this._supportCompressType=2:t.etc1&&(this._supportCompressType=3),this._plotLayers=new _0x386d8c,this._layers=new u$k,ti$4._attachLayers(this._layers),this._undergroundMode=!1,this._undergroundDepth=1e4,this._analyst3D=new u$k,this._vectorTileMaps=new u$k,this._vectorTileSource=new e$1Q,this._multiViewportMode=B$e.NONE,this._multiViewportInfo=[],this._renderPipeline=new _0x5430eb(this),this.postProcessStages=new _$a(this._renderPipeline),this._lightSource=new s$J(t),this.compositor=new o$m(t),kt$1(this,0,a$15.now()),W$6(this),this.initializeFrame(),this._pickPointEnabled=!1,this._pickPointInterval=200,this._pos=void 0,this._pickPointTolerance=3,this._pickTolerance=3,this._pickDepthTolerance=0,this._rasterPickTexture=void 0,this._rasterPickFBO=void 0,this.voxelGridPostRender=new a$5({}),this.particlePostRender=new u$b({}),this.particleTrailsPostRenderer=new r$f({}),this._pickResult={pickFrameNumber:-1,pickObject:void 0},this._walkingMode=Ct.NONE,this._pickRect=void 0,this._isUpdatePickCommand=!1,this._pickRectFramebuffer=void 0,this._mvtVisibleControl=!1,this._mvtVisibleLevel=0,this._maskEnabled=!1,this._enableCompositor=!0,this._overlapDisplayedThreshold=0,this._overlapDisplayOptions={allowIconWithTextDisplay:!0},this._pbrMaterlParameters=[],this._saveLocalCachePerformance=!0,this._toneMappingExposure=1,this._envMapIntensity=1,this._sceneConfigLoader=new De$2(e,this),this._silverLightingAtmosphere=new n$6,t.uniformState._silverLightingAtmosphere=this._silverLightingAtmosphere,t.uniformState._sceneUBO._initUniformMap(t),o$15.isNDCHalfZRange=t.webgpu,this._waterReflectionDistinctQuality=5}function ci$1(e,t){for(var i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;var n=[];e$2e(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(Te$2(e))),n.push(t.terrainProviderChanged.addEventListener(Te$2(e)))),e._removeGlobeCallbacks=n}function vi$1(e,t){e.enableVertexCapture(t)}function _i$1(e,t){e.disableVertexCapture(t)}function Dt$2(e,t,i){var n=e._frameState,r=e._context,o=e._view.oit,a=n.shadowState.lightShadowMaps,s=n.shadowState.lightShadowsEnabled,l=e._environmentState.usePrepass,u=t.derivedCommands;e$2e(t.pickId)&&(u.picking=l$i.createPickDerivedCommand(e,t,r,u.picking)),!t.pickOnly&&t.pass!==Le$q.TERRAIN_CLASSIFICATION&&t.pass!==Le$q.ClampObject&&(u.depth=l$i.createDepthOnlyDerivedCommand(e,t,r,u.depth)),n.passes.normal&&(u.normal=l$i.createNormalDerivedCommand(t,r)),u.originalCommand=t,e._hdr&&(u.hdr=l$i.createHdrCommand(t,r,u.hdr),u=(t=u.hdr.command).derivedCommands),l&&t.pass==Le$q.S3MTiles&&(u.prepass=l$i.createPrepassDerivedCommand(e,t,r,u.prepass)),s&&t.receiveShadows&&(u.shadows=C$Z.createReceiveDerivedCommand(a,t,i,r,u.shadows)),t.pass===Le$q.TRANSLUCENT&&e$2e(o)&&o.isSupported()&&(s&&t.receiveShadows?(u.oit=e$2e(u.oit)?u.oit:{},u.oit.shadows=o.createDerivedCommands(u.shadows.receiveCommand,r,u.oit.shadows)):u.oit=o.createDerivedCommands(t,r,u.oit)),t.pass===Le$q.Voxel_Billboard&&e$2e(e.voxelGridPostRender)&&e.voxelGridPostRender.createDerivedCommands(t),t.pass===Le$q.Particle&&e$2e(e.particlePostRender)&&e.particlePostRender.createDerivedCommands(t),e._maskEnabled&&(u.mask=l$i.createMaskCommand(t,r,u.mask))}Object.defineProperties(w$4.prototype,{waterReflectionDistinctQuality:{get:function(){return this._waterReflectionDistinctQuality},set:function(e){this._waterReflectionDistinctQuality=Math.min(Math.floor(e),5)}},toneMappingExposure:{get:function(){return this._toneMappingExposure},set:function(e){this._toneMappingExposure=e}},envMapIntensity:{get:function(){return this._envMapIntensity},set:function(e){this._envMapIntensity=e}},canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},maximumAliasedLineWidth:{get:function(){return e$1W.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return e$1W.maximumCubeMapSize}},pickPositionSupported:{get:function(){return!0}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return u$A.isSupported(this._context)}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,ci$1(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(e$2e(this.globe))return this.globe.imageryLayers}},terrainLayers:{get:function(){if(e$2e(this.globe))return this.globe.terrainLayers}},terrainProvider:{get:function(){if(e$2e(this.globe))return this.globe.terrainProvider},set:function(e){e$2e(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(e$2e(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},customRequestHeaders:{get:function(){return this._sceneConfigLoader._customRequestHeaders},set:function(e){this._sceneConfigLoader._customRequestHeaders=e}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){if(this.scene3DOnly&&e!==C$14.SCENE3D)throw new t$15("Only SceneMode.SCENE3D is valid when scene3DOnly is true.");if(e===C$14.SCENE2D)this.morphTo2D(0);else if(e===C$14.SCENE3D)this.morphTo3D(0);else{if(e!==C$14.COLUMBUS_VIEW)throw new t$15("value must be a valid SceneMode enumeration.");this.morphToColumbusView(0)}this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},terrainExaggeration:{get:function(){return this._terrainExaggeration},set:function(e){this._terrainExaggeration!==e&&e$2e(this.globe)&&this.globe._surface.invalidateAllTiles(),this._terrainExaggeration=e}},useWebVR:{get:function(){return this._useWebVR},set:function(e){if(this.camera.frustum instanceof a$V)throw new t$15("VR is unsupported with an orthographic projection.");this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new v$K(this),e$2e(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new h$g(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},imagerySplitPosition:{get:function(){return this._frameState.imagerySplitPosition},set:function(e){this._frameState.imagerySplitPosition=e}},globeSplitPosition:{get:function(){return this._frameState.globeSplitPosition},set:function(e){this._frameState.globeSplitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){if(!e$2e(e)||e<0)throw new t$15("minimumDisableDepthTestDistance must be greater than or equal to 0.0.");this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0,this._defaultView.updateFrustums=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){var t=this._context,i=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=i!==this._hdr,this._hdr=i}},highDynamicRangeSupported:{get:function(){var e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},sunColor:{get:function(){return this._sunColor},set:function(e){this._sunColor=e}},opaqueFrustumNearOffset:{get:function(){return this._frameState.useLogDepth?.9:.9999}},layers:{get:function(){return this._layers}},plotLayers:{get:function(){return this._plotLayers}},multiViewportMode:{get:function(){return this._multiViewportMode},set:function(e){switch(this._multiViewportInfo.length=0,e){case B$e.NONE:this._frameState.multiViewportIndex=-1;break;case B$e.HORIZONTAL:this._multiViewportInfo[0]=new f$1a(0,0,.5,1),this._multiViewportInfo[1]=new f$1a(.5,0,.5,1);break;case B$e.VERTICAL:this._multiViewportInfo[0]=new f$1a(0,.5,1,.5),this._multiViewportInfo[1]=new f$1a(0,0,1,.5);break;case B$e.QUAD:this._multiViewportInfo[0]=new f$1a(0,.5,.5,.5),this._multiViewportInfo[1]=new f$1a(.5,.5,.5,.5),this._multiViewportInfo[2]=new f$1a(.5,0,.5,.5),this._multiViewportInfo[3]=new f$1a(0,0,.5,.5);break;case B$e.TRIPLE:this._multiViewportInfo[2]=new f$1a(0,.5,.5,.5),this._multiViewportInfo[1]=new f$1a(.5,.5,.5,.5),this._multiViewportInfo[0]=new f$1a(0,0,1,.5);break;case B$e.VerticalTrisection:this._multiViewportInfo[2]=new f$1a(2/3,0,1/3,1),this._multiViewportInfo[1]=new f$1a(1/3,0,1/3,1),this._multiViewportInfo[0]=new f$1a(0,0,1/3,1);break;case B$e.FIVE_DIVISIONS:this._multiViewportInfo[4]=new f$1a(0,0,.5,.5),this._multiViewportInfo[3]=new f$1a(0,.5,.5,.5),this._multiViewportInfo[2]=new f$1a(.5,0,.5,1/3),this._multiViewportInfo[1]=new f$1a(.5,1/3,.5,1/3),this._multiViewportInfo[0]=new f$1a(.5,2/3,.5,1/3);break;case B$e.SIX_DIVISIONS:this._multiViewportInfo[5]=new f$1a(2/3,0,1/3,1/3),this._multiViewportInfo[4]=new f$1a(2/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new f$1a(2/3,2/3,1/3,1/3),this._multiViewportInfo[2]=new f$1a(1/3,0,1/3,1/3),this._multiViewportInfo[1]=new f$1a(0,0,1/3,1/3),this._multiViewportInfo[0]=new f$1a(0,1/3,2/3,2/3);break;case B$e.SEVEN_DIVISIONS:this._multiViewportInfo[6]=new f$1a(0,0,.3,.5),this._multiViewportInfo[5]=new f$1a(.3,0,.4,1/3),this._multiViewportInfo[4]=new f$1a(.7,0,.3,.5),this._multiViewportInfo[3]=new f$1a(.7,.5,.3,.5),this._multiViewportInfo[2]=new f$1a(.3,2/3,.4,1/3),this._multiViewportInfo[1]=new f$1a(0,.5,.3,.5),this._multiViewportInfo[0]=new f$1a(.3,1/3,.4,1/3);break;case B$e.EIGHT_DIVISIONS:this._multiViewportInfo[0]=new f$1a(.5,0,.5,1/3),this._multiViewportInfo[1]=new f$1a(0,0,.5,1/3),this._multiViewportInfo[2]=new f$1a(2/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new f$1a(1/3,1/3,1/3,1/3),this._multiViewportInfo[4]=new f$1a(0,1/3,1/3,1/3),this._multiViewportInfo[5]=new f$1a(2/3,2/3,1/3,1/3),this._multiViewportInfo[6]=new f$1a(1/3,2/3,1/3,1/3),this._multiViewportInfo[7]=new f$1a(0,2/3,1/3,1/3);break;case B$e.NINE_DIVISIONS:this._multiViewportInfo[8]=new f$1a(2/3,0,1/3,1/3),this._multiViewportInfo[7]=new f$1a(1/3,0,1/3,1/3),this._multiViewportInfo[6]=new f$1a(0,0,1/3,1/3),this._multiViewportInfo[5]=new f$1a(2/3,1/3,1/3,1/3),this._multiViewportInfo[4]=new f$1a(1/3,1/3,1/3,1/3),this._multiViewportInfo[3]=new f$1a(0,1/3,1/3,1/3),this._multiViewportInfo[2]=new f$1a(2/3,2/3,1/3,1/3),this._multiViewportInfo[1]=new f$1a(1/3,2/3,1/3,1/3),this._multiViewportInfo[0]=new f$1a(0,2/3,1/3,1/3);break;default:throw new t$15("the mode is error")}e!==B$e.NONE&&this._multiViewportMode===B$e.NONE?(this._frameState.creditDisplay.container.style.visibility="hidden",!e$2e(this._deviceOrientationCameraController)&&this._useWebVR&&(this._deviceOrientationCameraController=new h$g(this),this._aspectRatioVR=this._camera.frustum.aspectRatio)):e===B$e.NONE&&this._multiViewportMode!==B$e.NONE&&(this._frameState.creditDisplay.container.style.visibility="visible",this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this.drawingBufferWidth/this.drawingBufferHeight),this._multiViewportMode=e}},undergroundMode:{get:function(){return this._undergroundMode},set:function(e){e$2e(e)&&(this._undergroundMode=e)}},undergroundDepth:{get:function(){return this._undergroundDepth},set:function(e){this._undergroundDepth=e}},lightSource:{get:function(){return this._lightSource}},cloudBox:{get:function(){return this._cloudBox},set:function(e){e$2e(e)||e$2e(this._cloudBox)&&this.cloudBox.remove(),this._cloudBox=e}},enableOcclude:{get:function(){return this._enableOcclude},set:function(e){this._enableOcclude=e}},bloomEffect:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Scene_bloomEffect"),this.compositor.bloomEffect}},scanEffect:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Scene_scanEffect"),this.compositor.scanEffect}},depthOfFieldEffect:{get:function(){return this.compositor.depthOfFieldEffect}},ssaoEffect:{get:function(){return this.compositor.SSAOEffect}},colorCorrection:{get:function(){return this.compositor.colorCorrection}},hdrEnabled:{get:function(){return LicenseChecker.LICENSECHECKER.verify("Scene_hdrEnabled"),this._hdr},set:function(e){LicenseChecker.LICENSECHECKER.verify("Scene_hdrEnabled");var t=this._context,i=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=i!==this._hdr,this._hdr=i}},toneMappingEnabled:{get:function(){return this.compositor.toneMappingEnabled},set:function(e){return this.compositor.toneMappingEnabled=e}},pickPoint:{get:function(){return this._pos}},pickPointEnabled:{get:function(){return this._pickPointEnabled},set:function(e){this._pickPointEnabled=e;for(var t=0;t<this._layers._layerQueue.length;t++){var i={};i.layer=this._layers._layerQueue[t],i.layer instanceof _0x1a71e8&&(e?i.layer.traverseRenderEntity(i,vi$1):i.layer.traverseRenderEntity(i,_i$1))}}},pickPointInterval:{get:function(){return this._pickPointInterval},set:function(e){this._pickPointInterval=e}},pickPointTolerance:{get:function(){return this._pickPointTolerance},set:function(e){this._pickPointTolerance=e}},pickDepthTolerance:{get:function(){return this._pickDepthTolerance},set:function(e){this._pickDepthTolerance=e}},rasterVectorCollection:{get:function(){return this.globe._rasterVectorCollection}},walkingMode:{get:function(){return this._walkingMode},set:function(e){if(e!==this._walkingMode){this._walkingMode=e;var t=this._screenSpaceCameraController;t.previousHeight=void 0,e===Ct.ByKeyboard?(t.enableWalk=!0,t.enableLook=!1,this.mode===C$14.SCENE3D?t.enableTranslate=!1:this.mode===C$14.COLUMBUS_VIEW&&(t.enableTranslate=!0)):(t.enableWalk=!1,t.enableTranslate=!0,t.enableZoom=!0,t.enableTilt=!0,t.enableLook=!0)}}},enableOutline:{get:function(){var e=this.layers.getSelectedLayer();return!(!e$2e(e)||e.getSelection().length<1)&&e.selectColorType===Zr$3.SILHOUETTE_EDGE}},maskEnabled:{get:function(){return this._maskEnabled}},lightGroup:{get:function(){return this._lightGroup},set:function(e){e!==this._lightGroup&&(this._lightGroup=e,Ci$1(this,e))}},enableCompositor:{get:function(){return this._enableCompositor},set:function(e){o$1q.typeOf.bool("Scene.enableCompositor",e),this._enableCompositor=e}},overlapDisplayedThreshold:{get:function(){return this._overlapDisplayedThreshold},set:function(e){o$1q.typeOf.number("Scene.clusterRange",e),this._overlapDisplayedThreshold=e}},overlapDisplayOptions:{get:function(){return this._overlapDisplayOptions},set:function(e){o$1q.typeOf.object("Scene.overlapDisplayOptions",e),this._overlapDisplayOptions=e}},cameraUnderground:{get:function(){return this._cameraUnderground}}}),w$4.prototype.setVectorTilesLayersControl=function(e,t){this._mvtVisibleControl=e,this._mvtVisibleLevel=t},w$4.prototype.getCompressedTextureFormatSupported=function(e){var t=this.context;return("WEBGL_compressed_texture_s3tc"===e||"s3tc"===e)&&t.s3tc||("WEBGL_compressed_texture_pvrtc"===e||"pvrtc"===e)&&t.pvrtc||("WEBGL_compressed_texture_etc1"===e||"etc1"===e)&&t.etc1},w$4.prototype.updateDerivedCommands=function(e){if(e$2e(e.derivedCommands)){var t=this._frameState,i=this._context,n=!1,r=t.shadowState.lastDirtyTime;e.lastDirtyTime!==r&&(e.lastDirtyTime=r,e.dirty=!0,n=!0);var o=t.useLogDepth,a=this._hdr,s=this._environmentState.usePrepass,l=t.passes.normal,u=this._maskEnabled,c=e.derivedCommands,h=e$2e(c.logDepth),d=e$2e(c.hdr),f=e$2e(c.normal),p=e$2e(c.mask),_=e$2e(c.prepass),m=e$2e(c.originalCommand),g=o&&!h,x=a&&!d,y=s&&!_,v=l&&!f,$=u&&!p,b=!(o&&a||m);if(e.dirty=e.dirty||this._logDepthBufferDirty||this._hdrDirty||this._maskEnabled||g||x||b||$||v||y,e.dirty){e.dirty=!1;var T=t.shadowState.shadowMaps;t.shadowState.shadowsEnabled&&e.castShadows&&(c.shadows=C$Z.createCastDerivedCommand(T,e,n,i,c.shadows)),(h||g)&&(c.logDepth=l$i.createLogDepthCommand(e,i,c.logDepth),Dt$2(this,c.logDepth.command,n)),(m||b)&&Dt$2(this,e,n)}}};var gi$1=new a$g({pass:ue$e.RENDER}),Je$1=new a$g({pass:ue$e.PRELOAD}),Xe$1=new a$g({pass:ue$e.PRELOAD_FLIGHT}),wi$1=new a$g({pass:ue$e.REQUEST_RENDER_MODE_DEFER_CHECK});new a$g({pass:ue$e.MOST_DETAILED_PRELOAD});var yi$1=new a$g({pass:ue$e.MOST_DETAILED_PICK}),$e$1=new a$g({pass:ue$e.PICK}),xt$1=new i$1d,et$3;function bi$1(e){var t=e.globe;if(e._mode===C$14.SCENE3D&&e$2e(t)&&t.show&&!e._cameraUnderground&&!e._globeTranslucencyState.translucent){var i=t.ellipsoid;return xt$1.radius=i.minimumRadius,et$3=d$U.fromBoundingSphere(xt$1,e.camera.positionWC,et$3)}}function tt$2(e){e.render=!1,e.pick=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1,e.asynchronous=!1,e.fbo=!1,e.normal=!1}function kt$1(e,t,i){var n=e._frameState;n.frameNumber=t,n.time=a$15.clone(i,n.time)}function Ci$1(e,t){for(var i=0;i<e._presetLightSource.length;i++)e.removeLightSource(e._presetLightSource[i]);if(e._presetLightSource.length=0,t===Ze$4.SUN_LIGHT)e.hdrEnabled=!1,e.sun.show=!0,e._lightSource.ambientLightColor=new e$1X(.76,.76,.76,1);else if(t===Ze$4.LIGHT_GROUP1){e.hdrEnabled=!1,e.sun.show=!1,e._lightSource.ambientLightColor=new e$1X(.5,.5,.5,1);var n=new c$i(new o$1p.fromDegrees(116.191153,40.147532,450),{targetPosition:new o$1p.fromDegrees(116.19106,40.147858,430),color:new e$1X(.9,.9,.9,1),intensity:.78});e.addLightSource(n),e._presetLightSource.push(n);var r=new c$i(new o$1p.fromDegrees(116.192153,40.147432,490),{targetPosition:new o$1p.fromDegrees(116.19106,40.147858,430),color:new e$1X(.9,.9,.9,1),intensity:.25});e.addLightSource(r),e._presetLightSource.push(r)}}function W$6(e){var t=e.camera,i=e._frameState;i.commandList.length=0,i.shadowMaps.length=0,i.brdfLutGenerator=e._brdfLutGenerator,i.environmentMap=e.skyBox&&e.skyBox._cubeMap,i.mode=e._mode,i.morphTime=e.morphTime,i.mapProjection=e.mapProjection,i.camera=t,i.cullingVolume=t.frustum.computeCullingVolume(t.positionWC,t.directionWC,t.upWC,e.frustumTolerance),i.cullingVolume.enableFusion=e$2e(e.context.curFusionViewMatrix),i.occluder=bi$1(e),i.terrainExaggeration=e._terrainExaggeration,i.minimumDisableDepthTestDistance=e._minimumDisableDepthTestDistance,i.invertClassification=e.invertClassification,i.useLogDepth=e._logDepthBuffer&&!(e.camera.frustum instanceof a$V||e.camera.frustum instanceof l$11),i.sunColor=e._sunColor,e._lightSource.sunLightON=e$2e(e.sun)&&e.sun.show,i.lightSource=e._lightSource,i.shadowDarkness=e.shadowMap.darkness,i.toneMappingExposure=e.toneMappingExposure,i.envMapIntensity=e.envMapIntensity,e$2e(e._specularEnvironmentMapAtlas)&&e._specularEnvironmentMapAtlas.ready?(i.specularEnvironmentMaps=e._specularEnvironmentMapAtlas.texture,i.specularEnvironmentMapsMaximumLOD=e._specularEnvironmentMapAtlas.maximumMipmapLevel):(i.specularEnvironmentMaps=void 0,i.specularEnvironmentMapsMaximumLOD=void 0),e$2e(e._pmremGenerator)&&e._pmremGenerator.ready?i.hdrEnvMap=e._pmremGenerator.texture:i.hdrEnvMap=void 0,i.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,e._actualInvertClassificationColor=e$1X.clone(e.invertClassificationColor,e._actualInvertClassificationColor),t$a.isTranslucencySupported(e._context)||(e._actualInvertClassificationColor.alpha=1),i.invertClassificationColor=e._actualInvertClassificationColor,e$2e(e.globe)?i.maximumScreenSpaceError=e.globe.maximumScreenSpaceError:i.maximumScreenSpaceError=2,tt$2(i.passes),i.tilesetPassState=void 0,i.pbrMaterialsArr=e._pbrMaterlParameters,e.context._trangleCount=0,i.cameraUnderground=e._cameraUnderground,i.globeTranslucencyState=e._globeTranslucencyState}w$4.prototype.updateFrameState=function(){return W$6(this)};var Vt$1=new i$X;w$4.prototype.isVisible=function(e,t,i){return e$2e(e)&&(!e$2e(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==Ae$w.OUTSIDE&&(!e$2e(i)||!(e.occlude&&!this._undergroundMode)||!e.boundingVolume.isOccluded(i)))};var Ee$2=new o$15,Fe$2=new l$10,Re$2=new a$V,Le$2=new l$11;w$4.prototype.updateAndExecuteCommands=function(e,t,i){this._renderPipeline.updateAndExecuteCommands(e,t)};var Si$1=/(\.hdr$)/i;function G$4(e){var t=e._frameState,i=e._view,n=e._environmentState,r=t.passes.render,o=t.passes.offscreen,a=e.skyAtmosphere,s=e.globe;const l=e._globeTranslucencyState;if(!r||e._mode!==C$14.SCENE2D&&i.camera.frustum instanceof a$V||!l.environmentVisible)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{e$2e(a)&&e$2e(s)&&(a.setDynamicAtmosphereColor(s.enableLighting),n.isReadyForAtmosphere=n.isReadyForAtmosphere||s._surface._tilesToRender.length>0),n.skyAtmosphereCommand=e$2e(a)?a.update(t):void 0,n.skyBoxCommand=e$2e(e.skyBox)?e.skyBox.update(t,e._hdr):void 0;var u=e$2e(e.sun)?e.sun.update(t,i.passState,e._hdr):void 0;n.sunDrawCommand=e$2e(u)?u.drawCommand:void 0,n.sunComputeCommand=e$2e(u)?u.computeCommand:void 0,n.moonCommand=e$2e(e.moon)?e.moon.update(t):void 0,e$2e(e.cloudBox)&&e.cloudBox.update(t)}var c=n.clearGlobeDepth=e$2e(s)&&(!s.depthTestAgainstTerrain||e.mode===C$14.SCENE2D);(n.useDepthPlane=c&&e.mode===C$14.SCENE3D&&l.useDepthPlane)&&e._depthPlane.update(t),n.renderTranslucentDepthForPick=!1,n.useWebVR=e._useWebVR&&e.mode!==C$14.SCENE2D&&!o;for(var h=t.mode!==C$14.SCENE3D||l.sunVisibleThroughGlobe?void 0:t.occluder,d=t.cullingVolume,f=Vt$1.planes,p=0;p<5;++p)f[p]=d.planes[p];d=Vt$1,n.isSkyAtmosphereVisible=e$2e(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=e.isVisible(n.sunDrawCommand,d,h),n.isMoonVisible=e.isVisible(n.moonCommand,d,h);var _=e.specularEnvironmentMaps,m=e._specularEnvironmentMapAtlas;e$2e(_)?Si$1.test(_)?e$2e(e._pmremGenerator)||(e._pmremGenerator=new v$9(_)):(!e$2e(m)||m.url!==_)&&(m=m&&m.destroy(),e._specularEnvironmentMapAtlas=new u$A(_)):e$2e(m)?(m.destroy(),e._specularEnvironmentMapAtlas=void 0):e$2e(e._pmremGenerator)&&(e._pmremGenerator=e._pmremGenerator.destroy()),e$2e(e._specularEnvironmentMapAtlas)&&e._specularEnvironmentMapAtlas.update(t),e$2e(e._pmremGenerator)&&e._pmremGenerator.update(t)}function Tt(e){for(var t=e._frameState.afterRender,i=0,n=t.length;i<n;++i)t[i](),e.requestRender();t.length=0}function Pi$1(e){const t=e._globe,i=e.camera.positionCartographic;if(e$2e(t)&&t.show&&e$2e(i))return t.getHeight(i)}function Di$1(e){const t=e.camera,i=e._mode,n=e.globe;e._screenSpaceCameraController;const r=t.positionCartographic;if(!e$2e(r)||!e$2e(n)||!n.show||i===C$14.SCENE2D||i===C$14.MORPHING)return!1;const o=e._globeHeight;return e$2e(o)&&r.height<o}function xi$1(e,t){if(e.debugShowFramesPerSecond){if(!e$2e(e._performanceDisplay)){var i=document.createElement("div");i.className="supermap3d-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(i);var n=new o$d({container:i});e._performanceDisplay=n,e._performanceContainer=i}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.trangleCount=e.context._trangleCount,e._performanceDisplay.update(t)}else e$2e(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function ki$1(e){e._jobScheduler.resetBudgets();var t=e._frameState;e.primitives.prePassesUpdate(t),e$2e(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function Vi$1(e){var t=e._frameState;e.primitives.postPassesUpdate(t),r$1b.update()}function Ti$1(e){var t=e._frameState;e$2e(e.globe)&&e.globe.update(t),t.creditDisplay.update()}w$4.prototype.updateEnvironment=function(){return G$4(this)},w$4.prototype.resolveFramebuffers=function(e){this._renderPipeline.resolveFramebuffers(e)},w$4.prototype.initializeFrame=function(){1e4==this._shaderFrameCount++&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeight=Pi$1(this),this._cameraUnderground=Di$1(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),e$2e(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};var Ei$1=new e$1X,Et$1=0,rt$4=0;const Fi$1=50,Ft$1=100;function Ri$1(){var e=performance.now(),t=!1;return e-Et$1<Fi$1?++rt$4>Ft$1&&(t=!0):rt$4=0,Et$1=e,t}var Rt$1=!1,it$2=0;function Li$1(){return Rt$1?it$2++:it$2=0,it$2>Ft$1}function Bi$1(e){e._pickPositionCacheDirty=!0;var t=e.context,i=t.uniformState,n=e._frameState,r=e._defaultView;e._view=r,W$6(e),n.passes.render=!0,n.passes.postProcess=e.postProcessStages.hasSelected,n.tilesetPassState=gi$1;var o=u$Z(e.backgroundColor,e$1X.BLACK);e._hdr&&((o=e$1X.clone(o,Ei$1)).red=Math.pow(o.red,e.gamma),o.green=Math.pow(o.green,e.gamma),o.blue=Math.pow(o.blue,e.gamma)),n.backgroundColor=o,n.creditDisplay.beginFrame(),e.fog.update(n),i.update(n);var a=e.shadowMap;e$2e(a)&&a.enabled&&(o$1p.negate(i.sunDirectionWC,e._sunCamera.direction),n.shadowMaps.push(a),e$2e(e._analysisShadowMap)&&n.shadowMaps.push(e._analysisShadowMap)),e._computeCommandList.length=0,e._logDepthOverlayCommandList.length=0,e._overlayCommandList.length=0,e._overlayAgainstDepthCommandList.length=0;var s=r.viewport;s.x=0,s.y=0,s.width=t.drawingBufferWidth,s.height=t.drawingBufferHeight;var l=r.passState;if(l.framebuffer=void 0,l.blendingEnabled=void 0,l.scissorTest=void 0,l.viewport=f$1a.clone(s,l.viewport),e$2e(e.globe)&&e.globe.beginFrame(n),e$2e(e.terrainProvider)){var u=e.terrainProvider;e$2e(u._minHeight)&&e$2e(u._maxHeight)&&(n.minTerrainHeight=u._minHeight,n.maxTerrainHeight=u._maxHeight)}na$1(e),sa$1(e),ua(e),fa(e),st$2(e),ma(e),ut$4(e),G$4(e);var c=e._layers;n=e._frameState;c.render(t,n),e._plotLayers.render(n,t),e._renderPipeline.updateAndExecuteCommands(l,o),e._renderPipeline.resolveFramebuffers(l),l.framebuffer=void 0,e._renderPipeline.executeOverlayCommands(l),jt$1(e),e.layers.endFrame(n),e$2e(e.globe)&&(e.globe.endFrame(n),e.globe.tilesLoaded||(e._renderRequested=!0),e.camera._computeSensitivePosition()),Mi$1(e,n),e._lightSource.resetChange(),n.creditDisplay.endFrame(),t.endFrame(),(!e._saveLocalCachePerformance||Ri$1()&&Li$1())&&(e.layers.saveLocalCache(),e.imageryLayers.saveLocalCache(),e.terrainProvider instanceof ne$u&&e.terrainProvider.saveLocalCache())}function Mi$1(e,t){for(var i=e.layers._layerQueue.length,n=0;n<i;n++){var r=e.layers._layerQueue[n];e$2e(r._imageryLayer)&&e$2e(r._layerScheduler)&&r._layerScheduler.loadImagery(r,t)}}function re$3(e,t){try{t(e)}catch(t){if(e._renderError.raiseEvent(e,t),e.rethrowRenderErrors)throw t}}function Oi$1(e){return e._picking.updateMostDetailedRayPicks(e)}function Ni$1(e){var t=e._frameState;Je$1.camera=t.camera,Je$1.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,Je$1)}function Ii$1(e){e.primitives.updateForPass(e._frameState,wi$1)}w$4.prototype.render=function(e){if(this.terrainLayers._layers.length>0&&e$2e(this._globe)){var t=this.terrainLayers._layers.length-1;this._globe._terrainProvider=this._globe._terrainLayerCollection._layers[t]._terrainProvider}if(e$2e(this._globe._terrainProvider._visible)&&this._globe._surface._visible!==this._globe._terrainProvider._visible){var i=this._globe._terrainProvider._visible;this._globe._surface.showInvalid(!i),this._globe._surface._visible=i}e$2e(e)||(e=a$15.now());var n=this._frameState;n.newFrame=!1,this._jobScheduler.resetBudgets();var r=this._view.checkForCameraUpdates(this),o=!this.requestRenderMode||this._renderRequested||r||this._logDepthBufferDirty||this._hdrDirty||this.mode===C$14.MORPHING;if(!o&&e$2e(this.maximumRenderTimeChange)&&e$2e(this._lastRenderTime)){var a=Math.abs(a$15.secondsDifference(this._lastRenderTime,e));o=o||a>this.maximumRenderTimeChange}o&&(this._lastRenderTime=a$15.clone(e,this._lastRenderTime),this._renderRequested=!1,kt$1(this,e$2d.incrementWrap(n.frameNumber,15e6,1),e),n.newFrame=!0,this.mode===C$14.SCENE3D&&(this._silverLightingAtmosphere.update(n,this.mode),this._lightSource._enableAmbientLightColor||e$1X.clone(this._silverLightingAtmosphere.getAmbientColor(),this._lightSource._ambientLightColor),this._lightSource._enableSunLightColor||e$1X.clone(this._silverLightingAtmosphere.getSunColor(),this._lightSource._sunLightColor)));this._preUpdate.raiseEvent(this,e),re$3(this,Ti$1),re$3(this,ki$1),this.primitives.show&&(re$3(this,Oi$1),re$3(this,Ni$1),re$3(this,Zi),o||re$3(this,Ii$1)),this._postUpdate.raiseEvent(this,e),o&&(this._preRender.raiseEvent(this,e),re$3(this,Bi$1)),xi$1(this,o),re$3(this,Vi$1),Rt$1=0==r$1b.activeRequestLength,Tt(this),o&&this._postRender.raiseEvent(this,e),this._logDepthBufferDirty=!1,this._hdrDirty=!1},w$4.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)},w$4.prototype.requestRender=function(){this._renderRequested=!0},w$4.prototype.clampLineWidth=function(e){return Math.max(e$1W.minimumAliasedLineWidth,Math.min(e,e$1W.maximumAliasedLineWidth))};var Hi$1=new l$11,Ai$1=new o$1p,Be$2=new o$1p,Wi$1=new o$1o,Gi=new p$1d;function Ui$1(e,t,i,n,r){var o=e.camera,a=o.frustum;e$2e(a._offCenterFrustum)&&(a=a._offCenterFrustum);var s=2*(t.x-r.x)/r.width-1;s*=.5*(a.right-a.left);var l=2*(r.height-t.y-r.y)/r.height-1;l*=.5*(a.top-a.bottom);var u=p$1d.clone(o.transform,Gi);o._setTransform(p$1d.IDENTITY);var c=o$1p.clone(o.position,Ai$1);o$1p.multiplyByScalar(o.right,s,Be$2),o$1p.add(Be$2,c,c),o$1p.multiplyByScalar(o.up,l,Be$2),o$1p.add(Be$2,c,c),o._setTransform(u),e.mode===C$14.SCENE2D&&o$1p.fromElements(c.z,c.x,c.y,c);var h=a.getPixelDimensions(r.width,r.height,1,1,Wi$1),d=Hi$1;return d.right=.5*h.x,d.left=-d.right,d.top=.5*h.y,d.bottom=-d.top,d.near=a.near,d.far=a.far,d.computeCullingVolume(c,o.directionWC,o.upWC)}var qi$1=new l$10,zi$1=new o$1o;function Qi(e,t,i,n,r){var o=e.camera,a=o.frustum,s=a.near,l=Math.tan(.5*a.fovy),u=a.aspectRatio*l,c=(2*(t.x-r.x)/r.width-1)*s*u,h=(2*(r.height-t.y-r.y)/r.height-1)*s*l,d=a.getPixelDimensions(r.width,r.height,1,1,zi$1),f=d.x*i*.5,p=d.y*n*.5,_=qi$1;return _.top=h+p,_.bottom=h-p,_.right=c+f,_.left=c-f,_.near=s,_.far=a.far,_.computeCullingVolume(o.positionWC,o.directionWC,o.upWC)}function pe$2(e,t,i,n,r){var o=e.camera.frustum;return o instanceof a$V||o instanceof l$11?Ui$1(e,t,i,n,r):Qi(e,t,i,n,r)}var N$4=3,I$4=3,F$4=new f$1a(0,0,N$4,I$4),ie$2=new e$1X(0,0,0,0),ce$4=new o$1o,ve$2=new o$1p;function Lt$1(e,t,i,n,r){N$4=u$Z(i,e._pickTolerance),I$4=u$Z(n,N$4);var o=e._context,a=o.uniformState,s=e._frameState,l=e._defaultView;e._view=l;var u=l.viewport;u.x=0,u.y=0,u.width=o.drawingBufferWidth,u.height=o.drawingBufferHeight;var c=l.passState;c.viewport=f$1a.clone(u,c.viewport);var h=s$R.transformWindowToDrawingBuffer(e,t,ce$4);if(e._multiViewportMode!==B$e.NONE){var d=le$3(e,h);if(h.y=o.drawingBufferHeight-h.y,d>-1){s.multiViewportIndex=d;var f=e._multiViewportInfo[d];x$7.x=o.drawingBufferWidth*f.x,x$7.y=o.drawingBufferHeight*f.y,x$7.width=o.drawingBufferWidth*f.width,x$7.height=o.drawingBufferHeight*f.height;var p=(h.x-x$7.x)/x$7.width,_=(h.y-x$7.y)/x$7.height;h.x=p*o.drawingBufferWidth,h.y=(1-_)*o.drawingBufferHeight}}for(var m=l.frustumCommandsList.length,g=[],x=0;x<m;++x){var y=e._picking.getPickDepth(e,x).getDepthPromise(o,h.x,h.y);g.push(y)}Promise.all(g).then((t=>{for(var i=0;i<t.length;i++){var n=t[i];n>0&&n<1&&(ve$2=s$R.drawingBufferToWgs84Coordinates(e,h,n,ve$2))}o._pickPosition[0]=ve$2.x,o._pickPosition[1]=ve$2.y,o._pickPosition[2]=ve$2.z;var r=a$18.fromCartesian(ve$2);e$2e(r)&&(o._pickPositionHeight=r.height)})),e._jobScheduler.disableThisFrame(),W$6(e),s.cullingVolume=pe$2(e,h,N$4,I$4,u),s.invertClassification=!1,s.passes.pick=!0,s.tilesetPassState=$e$1,a.update(s),G$4(e);var v=!1,$=e.particlePostRender,b=e.particleTrailsPostRenderer;($.enable||b.enable)&&(v=!0),F$4.x=e$2d.clamp(h.x-.5*(N$4-1),0,e.drawingBufferWidth-N$4),F$4.y=e$2d.clamp(e.drawingBufferHeight-h.y-.5*(I$4-1),0,e.drawingBufferHeight-I$4),F$4.width=N$4,F$4.height=I$4,c=l.pickFramebuffer.begin(F$4,l.viewport,v),e._renderPipeline.updateAndExecuteCommands(c,ie$2),e._renderPipeline.executeOverlayCommands(c),e._renderPipeline.resolveFramebuffers(c)}function Bt$2(e,t,i){for(var n=0,r=e._primitives.length;n<r;n++){var o=e._primitives._primitives[n];o.type==bt$6.INSTANCED_LAYER&&o.setUnSelected()}var a=e._analyst3D.layerQueue;for(n=0,r=a.length;n<r;n++){var s=a[n];s instanceof r$d&&s.releaseSelection()}if(e$2e(t)&&e$2e(t.primitive)&&(t.primitive.type===bt$6.INSTANCED_OBJECT||t.primitive instanceof r$d)&&t.primitive.setSelected(t.id),e$2e(t)&&e$2e(t.primitive)&&t.primitive instanceof _0x4881fc){var l=t.id.split("_");2==l.length&&t.primitive.setPolygonOffset(l[1])}else{var u=e$2e(t)&&e$2e(t.primitive)&&t.primitive instanceof _0x1a71e8;u?(e._layers._setSelection(t),e$2e(t.primitive)&&!1===t.primitive.selectEnabled&&(t=void 0)):e._layers.releaseSelection()}var c={isS3MTilesLayerSel:!1,pickedObject:void 0};return e$2e(t)||(c=e.pickRasterData(i)),!u&&c.isS3MTilesLayerSel?(e._frameState.commandListRealtimeRaster.length=0,c.pickedObject):(e$2e(t)&&e$2e(t.collection)&&(e$2e(t.collection._isS3MTileLabels)&&t.collection._isS3MTileLabels||t.collection._isMVT)&&e$2e(t.collection.setSelection)&&t.collection.setSelection(t.id),e._pickResult.pickFrameNumber=e._frameState.frameNumber,e._pickResult.pickObject=t,e._pickResult.pickObject)}w$4.prototype.pick=function(e,t,i,n){if(!e$2e(e))throw new t$15("windowPosition is undefined.");if(!this.requestRenderMode&&Math.abs(this._frameState.frameNumber-this._pickResult.pickFrameNumber)<5&&!e$2e(n))return this._pickResult.pickObject;var r=this._defaultView,o=this._context;Lt$1(this,e,t,i);var a=r.pickFramebuffer.end(F$4);return o.endFrame(),Bt$2(this,a,e),a},w$4.prototype.pickAsync=function(e,t,i,n){if(!e$2e(e))throw new t$15("windowPosition is undefined.");if(!this.requestRenderMode&&Math.abs(this._frameState.frameNumber-this._pickResult.pickFrameNumber)<5&&!e$2e(n))return Promise.resolve(this._pickResult.pickObject);var r=this._defaultView;this._context,Lt$1(this,e,t,i);var o=this;return r.pickFramebuffer.endAsync(F$4).then((t=>(t=Bt$2(o,t,e),Promise.resolve(t))))};var ae$3=new h$18,Mt$1=new o$1p,Ot$1=new o$1p,Nt$1=new o$1p,Me$2=new o$1p,Ki=new o$1p(0,0,-1),ji$1=new o$1p(0,1,0),Yi$1=new f$1a(0,0,1,1),K$2=new o$1o;function at$4(e,t){var i=e._context,n=e._frameState,r=e._environmentState,o=e.globe.translucency.enabled;o&&(e.globe.translucency.enabled=!1,e._globeTranslucencyState.translucent=!1);var a=e.globe.depthTestAgainstTerrain;e.globe.depthTestAgainstTerrain=!0;var s=e._defaultView;e._view=s;var l=s.viewport;l.x=0,l.y=0,l.width=i.drawingBufferWidth,l.height=i.drawingBufferHeight;var u=s.passState;u.viewport=f$1a.clone(l,u.viewport),tt$2(n.passes),n.passes.pick=!0,n.passes.depth=!0,n.cullingVolume=pe$2(e,t,1,1,l),G$4(e),r.renderTranslucentDepthForPick=!0,u=s.pickDepthFramebuffer.update(i,t,l),e._renderPipeline.updateAndExecuteCommands(u,ie$2),e._renderPipeline.resolveFramebuffers(u),e.globe.depthTestAgainstTerrain=a,o&&(e.globe.translucency.enabled=!0,e._globeTranslucencyState.translucent=!0),i.endFrame()}function le$3(e,t){if(e._mode===C$14.SCENE2D||e._multiViewportMode==B$e.NONE)return-1;for(var i=e._context,n=new f$1a(t.x,i.drawingBufferHeight-t.y),r=new f$1a,o=-1,a=0;a<e._multiViewportInfo.length;a++){var s=e._multiViewportInfo[a];if(r.x=i.drawingBufferWidth*s.x,r.y=i.drawingBufferHeight*s.y,r.width=i.drawingBufferWidth*s.width,r.height=i.drawingBufferHeight*s.height,r.intersect(n)===Ae$w.INTERSECTING){o=a;break}}return o}w$4.prototype.pickRasterData=function(e,t,i){if(!e$2e(e))throw new t$15("windowPosition is undefined.");var n=this._frameState,r=n.commandListRealtimeRaster;if(0===r.length)return{isS3MTilesLayerSel:!1,pickedObject:void 0};var o=this.pickPosition(e),a=a$18.fromCartesian(o),s=e$2d.toDegrees(a.longitude),l=e$2d.toDegrees(a.latitude);K$2.x=e.x,K$2.y=e.y+1;var u=this.pickPosition(K$2),c=a$18.fromCartesian(u),h=e$2d.toDegrees(c.latitude);K$2.x=e.x,K$2.y=e.y-1,u=this.pickPosition(K$2),c=a$18.fromCartesian(u);var d=e$2d.toDegrees(c.latitude);K$2.x=e.x-1,K$2.y=e.y,u=this.pickPosition(K$2),c=a$18.fromCartesian(u);var f=e$2d.toDegrees(c.longitude);K$2.x=e.x+1,K$2.y=e.y,u=this.pickPosition(K$2),c=a$18.fromCartesian(u);for(var p=e$2d.toDegrees(c.longitude),_=Math.abs(p-f),m=Math.abs(d-h),g=[],x=0;x<r.length;x++)ae$3.west=r[x]._boundingVolume.center.x-r[x]._boundingVolume.radius,ae$3.south=r[x]._boundingVolume.center.y-r[x]._boundingVolume.radius,ae$3.east=r[x]._boundingVolume.center.x+r[x]._boundingVolume.radius,ae$3.north=r[x]._boundingVolume.center.y+r[x]._boundingVolume.radius,s<ae$3.east&&s>ae$3.west&&l<ae$3.north&&l>ae$3.south&&g.push(r[x]);if(0===g.length)return{isS3MTilesLayerSel:!1,pickedObject:void 0};e$2e(this._rasterPickTexture)||(this._rasterPickTexture=new t$U({context:n.context,width:1,height:1,pixelFormat:V$12.RGBA,sampler:new e$1S({wrapS:q$1a.CLAMP_TO_EDGE,wrapT:q$1a.CLAMP_TO_EDGE,minificationFilter:tt$i.LINEAR,magnificationFilter:rt$k.LINEAR})}),this._rasterPickFBO=new t$V({context:n.context,colorTextures:[this._rasterPickTexture],destroyAttachments:!1}));var y=this._clearColorCommand.framebuffer;this._clearColorCommand.framebuffer=this._rasterPickFBO,this._clearColorCommand.execute(n.context);var v=n.camera;o$1p.clone(v.position,Mt$1),o$1p.clone(v.direction,Ot$1),o$1p.clone(v.up,Nt$1);var $=s-_,b=s+_,T=l+m,C=l-m;Me$2.x=.5*($+b),Me$2.y=.5*(T+C),Me$2.z=5,v.setView({destination:Me$2,orientation:{direction:Ki,up:ji$1},convert:!1});var S=new a$V({width:b-$,aspectRatio:1,near:1,far:10});n.context.uniformState.update(n),n.context.uniformState.updateFrustum(S);for(x=0;x<g.length;x++){g[x].renderState=d$1m.fromCache({viewport:Yi$1}),g[x].framebuffer=this._rasterPickFBO;var w=g[x].derivedCommands;w.picking=l$i.createPickDerivedCommand(this,g[x],n.context,w.picking),g[x].derivedCommands.picking.pickCommand.execute(n.context)}v.setView({destination:Mt$1,orientation:{direction:Ot$1,up:Nt$1},convert:!1}),n.context.uniformState.update(n),n.context.uniformState.updateFrustum(v.frustum);var E=n.context.readPixels({x:0,y:0,width:1,height:1,framebuffer:this._rasterPickFBO});n.context.pixels=E;var P=e$1X.byteToRgba(E[0],E[1],E[2],E[3]),A=n.context.getObjectByPickId(P),L=e$2e(A)&&e$2e(A.primitive)&&A.primitive instanceof _0x1a71e8;return L?this._layers._setSelection(A):this._layers.releaseSelection(),this._clearColorCommand.execute(n.context),this._clearColorCommand.framebuffer=y,{isS3MTilesLayerSel:L,pickedObject:A}},w$4.prototype.pickRasterData2D=function(e,t,i){var n=this.pickPosition(e),r=a$18.fromCartesian(n),o=this._frameState.rasterVectorCollection,a=o.getPickID(r);o.setSelection(a)},w$4.prototype.pointPick=function(e){if(!e$2e(e))throw new t$15("windowPosition is undefined.");var t=this._pickPointTolerance,i=t;N$4=u$Z(t,3),I$4=u$Z(i,N$4);var n=this._context,r=n.uniformState,o=this._frameState,a=this._defaultView;this._view=a;var s=a.viewport;s.x=0,s.y=0,s.width=n.drawingBufferWidth,s.height=n.drawingBufferHeight;var l=a.passState;l.viewport=f$1a.clone(s,l.viewport);var u=s$R.transformWindowToDrawingBuffer(this,e,m);if(this._multiViewportMode!==B$e.NONE){var c=le$3(this,u);if(u.y=n.drawingBufferHeight-u.y,c>-1){o.multiViewportIndex=c;var h=this._multiViewportInfo[c];x$7.x=n.drawingBufferWidth*h.x,x$7.y=n.drawingBufferHeight*h.y,x$7.width=n.drawingBufferWidth*h.width,x$7.height=n.drawingBufferHeight*h.height;var d=(u.x-x$7.x)/x$7.width,f=(u.y-x$7.y)/x$7.height;u.x=d*n.drawingBufferWidth,u.y=f*n.drawingBufferHeight,u.y=n.drawingBufferHeight-H$5.y}}this._jobScheduler.disableThisFrame(),W$6(this),o.cullingVolume=pe$2(this,u,N$4,I$4,s),o.invertClassification=!1,o.passes.pick=!0;var p=this._environmentVisible;this._environmentVisible=a.pickPointFramebuffer._environmentVisible,r.update(o),G$4(this),F$4.x=u.x-.5*(N$4-1),F$4.y=this.drawingBufferHeight-u.y-.5*(I$4-1),F$4.width=N$4,F$4.height=I$4,l=a.pickPointFramebuffer.begin(F$4,a.viewport),this._renderPipeline.updateAndExecuteCommands(l,ie$2),this._renderPipeline.resolveFramebuffers(l);var _=a.pickPointFramebuffer.end(F$4);if(n.endFrame(),this._environmentVisible=p,e$2e(_))if(_.z>-e$2d.EPSILON10)this._pos=void 0;else{var m=new e$2c,g=o$1p.magnitude(_);p$1d.multiplyByVector(o.camera.inverseViewMatrix,_,m);var x=s$R.wgs84ToWindowCoordinates(this,m,new o$1o),y=this.pickPosition(x,new o$1p);if(e$2e(y)&&!(g>o$1p.distance(y,o.camera.position)+5))return this._pos=new e$2c,e$2c.clone(m,this._pos),this._pos;this._pos=void 0}else this._pos=void 0},w$4.prototype.pickNormal=function(e){if(!e$2e(e))throw new t$15("windowPosition is undefined.");N$4=1,I$4=1;var t=this._context,i=t.uniformState,n=this._frameState,r=this._defaultView;this._view=r;var o=r.viewport;o.x=0,o.y=0,o.width=t.drawingBufferWidth,o.height=t.drawingBufferHeight;var a=r.passState;a.viewport=f$1a.clone(o,a.viewport);var s=s$R.transformWindowToDrawingBuffer(this,e,ce$4);if(this._multiViewportMode!==B$e.NONE){var l=le$3(this,s);if(s.y=t.drawingBufferHeight-s.y,l>-1){n.multiViewportIndex=l;var u=this._multiViewportInfo[l];x$7.x=t.drawingBufferWidth*u.x,x$7.y=t.drawingBufferHeight*u.y,x$7.width=t.drawingBufferWidth*u.width,x$7.height=t.drawingBufferHeight*u.height;var c=(s.x-x$7.x)/x$7.width,h=(s.y-x$7.y)/x$7.height;s.x=c*t.drawingBufferWidth,s.y=h*t.drawingBufferHeight,s.y=t.drawingBufferHeight-H$5.y}}this._jobScheduler.disableThisFrame(),W$6(this),n.cullingVolume=pe$2(this,s,N$4,I$4,o),n.invertClassification=!1,n.passes.pick=!0,n.passes.normal=!0;var d=this._environmentVisible;this._environmentVisible=r.normalFramebuffer._environmentVisible,i.update(n),G$4(this),F$4.x=s.x-.5*(N$4-1),F$4.y=this.drawingBufferHeight-s.y-.5*(I$4-1),F$4.width=N$4,F$4.height=I$4,a=r.normalFramebuffer.begin(F$4,r.viewport),this._renderPipeline.updateAndExecuteCommands(a,ie$2),this._renderPipeline.resolveFramebuffers(a);var f=r.normalFramebuffer.end(F$4);if(t.endFrame(),n.passes.pick=!1,n.passes.normal=!1,this._environmentVisible=d,e$2e(f))return f},w$4.prototype.pickNormalAsync=function(e){if(!e$2e(e))throw new t$15("windowPosition is undefined.");N$4=1,I$4=1;var t=this._context,i=t.uniformState,n=this._frameState,r=this._defaultView;this._view=r;var o=r.viewport;o.x=0,o.y=0,o.width=t.drawingBufferWidth,o.height=t.drawingBufferHeight;var a=r.passState;a.viewport=f$1a.clone(o,a.viewport);var s=s$R.transformWindowToDrawingBuffer(this,e,ce$4);if(this._multiViewportMode!==B$e.NONE){var l=le$3(this,s);if(s.y=t.drawingBufferHeight-s.y,l>-1){n.multiViewportIndex=l;var u=this._multiViewportInfo[l];x$7.x=t.drawingBufferWidth*u.x,x$7.y=t.drawingBufferHeight*u.y,x$7.width=t.drawingBufferWidth*u.width,x$7.height=t.drawingBufferHeight*u.height;var c=(s.x-x$7.x)/x$7.width,h=(s.y-x$7.y)/x$7.height;s.x=c*t.drawingBufferWidth,s.y=h*t.drawingBufferHeight,s.y=t.drawingBufferHeight-H$5.y}}this._jobScheduler.disableThisFrame(),W$6(this),n.cullingVolume=pe$2(this,s,N$4,I$4,o),n.invertClassification=!1,n.passes.pick=!0,n.passes.normal=!0;var d=this._environmentVisible;return this._environmentVisible=r.normalFramebuffer._environmentVisible,i.update(n),G$4(this),F$4.x=s.x-.5*(N$4-1),F$4.y=this.drawingBufferHeight-s.y-.5*(I$4-1),F$4.width=N$4,F$4.height=I$4,a=r.normalFramebuffer.begin(F$4,r.viewport),this._renderPipeline.updateAndExecuteCommands(a,ie$2),this._renderPipeline.resolveFramebuffers(a),r.normalFramebuffer.endAsync(F$4).then((e=>(t.endFrame(),n.passes.pick=!1,n.passes.normal=!1,this._environmentVisible=d,e$2e(e)?Promise.resolve(e):Promise.resolve(void 0))))};var x$7=new f$1a,H$5=new o$1o,_e=new o$1o;function It$2(e,t,i,n){var r=e._multiViewportInfo[n];x$7.x=i.drawingBufferWidth*r.x,x$7.y=i.drawingBufferHeight*r.y,x$7.width=i.drawingBufferWidth*r.width,x$7.height=i.drawingBufferHeight*r.height;var o=(H$5.x-x$7.x)/x$7.width,a=(H$5.y-x$7.y)/x$7.height;H$5.x=o*i.drawingBufferWidth,H$5.y=a*i.drawingBufferHeight,_e.x=H$5.x,_e.y=i.drawingBufferHeight-H$5.y}w$4.prototype.pickPositionWorldCoordinates=function(e,t,i){if(this.useDepthPicking){if(!e$2e(e))throw new t$15("windowPosition is undefined.");var n=e.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n))return o$1p.clone(this._pickPositionCache[n],t);var r=this._frameState,o=this._context,a=o.uniformState,s=this._defaultView;this._view=s;var l=s$R.transformWindowToDrawingBuffer(this,e,ce$4);if(o$1o.clone(l,_e),this.pickTranslucentDepth){if(this._multiViewportMode!==B$e.NONE){var u=le$3(this,l);o$1o.clone(l,H$5),H$5.y=o.drawingBufferHeight-H$5.y,u>-1&&(r.multiViewportIndex=u,It$2(this,r,o,u),W$6(this,r.frameNumber,r.time),r.tilesetPassState=$e$1)}at$4(this,_e)}else W$6(this,r.frameNumber,r.time),a.update(r),G$4(this);this._multiViewportMode!==B$e.NONE?l=H$5:l.y=this.drawingBufferHeight-l.y;var c,h=this.camera;c=e$2e(h.frustum.fov)?h.frustum.clone(Ee$2):e$2e(h.frustum.infiniteProjectionMatrix)?h.frustum.clone(Fe$2):e$2e(h.frustum.width)?h.frustum.clone(Re$2):h.frustum.clone(Le$2);for(var d=s.frustumCommandsList,f=d.length,p=0;p<f;++p){var _=this._picking.getPickDepth(this,p).getDepth(o,l.x,l.y,e$2e(i)&&i?this._pickDepthTolerance:0);if(_>0&&_<1){var m,g=d[p];return this.mode===C$14.SCENE2D?(m=h.position.z,h.position.z=m-g.near+1,c.far=Math.max(1,g.far-g.near),c.near=1,a.update(r),a.updateFrustum(c)):(c.near=g.near*(0!==p?this.opaqueFrustumNearOffset:1),c.far=g.far,a.updateFrustum(c)),t=s$R.drawingBufferToWgs84Coordinates(this,l,_,t),this.mode===C$14.SCENE2D&&(h.position.z=m,a.update(r)),this._pickPositionCache[n]=o$1p.clone(t),t}}this._pickPositionCache[n]=void 0}},w$4.prototype.pickPositionWorldCoordinatesAsync=function(e,t,i){if(!this.useDepthPicking)return Promise.resolve(void 0);if(!e$2e(e))throw new t$15("windowPosition is undefined.");var n=e.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n)){var r=o$1p.clone(this._pickPositionCache[n],t);return Promise.resolve(r)}var o=this._frameState,a=this._context,s=a.uniformState,l=this._defaultView;this._view=l;var u=s$R.transformWindowToDrawingBuffer(this,e,ce$4);if(o$1o.clone(u,_e),this.pickTranslucentDepth){if(this._multiViewportMode!==B$e.NONE){var c=le$3(this,u);o$1o.clone(u,H$5),H$5.y=a.drawingBufferHeight-H$5.y,c>-1&&(o.multiViewportIndex=c,It$2(this,o,a,c),W$6(this,o.frameNumber,o.time))}at$4(this,_e)}else W$6(this,o.frameNumber,o.time),s.update(o),G$4(this);this._multiViewportMode!==B$e.NONE?u=H$5:u.y=this.drawingBufferHeight-u.y;var h,d=this.camera;h=e$2e(d.frustum.fov)?d.frustum.clone(Ee$2):e$2e(d.frustum.infiniteProjectionMatrix)?d.frustum.clone(Fe$2):e$2e(d.frustum.width)?d.frustum.clone(Re$2):d.frustum.clone(Le$2);for(var f=l.frustumCommandsList,p=f.length,_=[],m=0;m<p;++m){var g=this._picking.getPickDepth(this,m).getDepthPromise(a,u.x,u.y,e$2e(i)&&i?this._pickDepthTolerance:0);_.push(g)}var x=this;return Promise.all(_).then((e=>{for(var i=0;i<e.length;i++){var r=e[i];if(!(r<=0||r>=1)){var a,l=f[i];return x.mode===C$14.SCENE2D?(a=d.position.z,d.position.z=a-l.near+1,h.far=Math.max(1,l.far-l.near),h.near=1,s.update(o),s.updateFrustum(h)):(h.near=l.near*(0!==i?x.opaqueFrustumNearOffset:1),h.far=l.far,s.updateFrustum(h)),t=s$R.drawingBufferToWgs84Coordinates(x,u,r,t),x.mode===C$14.SCENE2D&&(d.position.z=a,s.update(o)),x._pickPositionCache[n]=o$1p.clone(t),Promise.resolve(t)}}return x._pickPositionCache[n]=void 0,Promise.resolve(void 0)}))};var Ht$1=new a$18;function At$1(e,t){var i,n,r=[],o=[],a=[],s=[],l=Object.create(null);e$2e(e)||(e=Number.MAX_VALUE);for(var u=t();e$2e(u);){var c=u.object,h=u.position,d=u.exclude;if(e$2e(h)&&!e$2e(c)){r.push(u);break}if(!e$2e(c)||!e$2e(c.primitive)||!d&&(r.push(u),0>=--e))break;var f=c.primitive,p=!1;if("function"==typeof f.getGeometryInstanceAttributes&&e$2e(c.id)&&(e$2e(n=f.getGeometryInstanceAttributes(c.id))&&e$2e(n.show)&&(p=!0,n.show=e$1I.toValue(!1,n.show),a.push(n))),c instanceof e$M&&(p=!0,c.show=!1,s.push(c)),f instanceof _0x1a71e8){p=!0,f.setOnlyObjsVisible([c.id],!1);var _=f.id;(l[_]=l[_]||{}).layer=f,(l[_].ids=l[_].ids||[]).push(c.id)}p||(f.show=!1,o.push(f)),u=t()}for(i=0;i<o.length;++i)o[i].show=!0,o[i]instanceof _0x24f13b&&o[i].setSelected();for(var m in l){var g=l[m];g.layer.setOnlyObjsVisible(g.ids,!0)}for(i=0;i<a.length;++i)(n=a[i]).show=e$1I.toValue(!0,n.show);for(i=0;i<s.length;++i)s[i].show=!0;return r}function Zi(e){var t=e._frameState;t.camera.canPreloadFlight()&&(Xe$1.camera=e.preloadFlightCamera,Xe$1.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,Xe$1))}w$4.prototype.pickPosition=function(e,t){if(e$2e(t=this.pickPositionWorldCoordinates(e,t))&&this.mode!==C$14.SCENE3D){o$1p.fromElements(t.y,t.z,t.x,t);var i=this.mapProjection,n=i.ellipsoid,r=i.unproject(t,Ht$1);n.cartographicToCartesian(r,t)}return t},w$4.prototype.pickPositionAsync=function(e,t){var i=this;return this.pickPositionWorldCoordinatesAsync(e,t).then((e=>{if(e$2e(t=e)&&i.mode!==C$14.SCENE3D){o$1p.fromElements(t.y,t.z,t.x,t);var n=i.mapProjection,r=n.ellipsoid,o=n.unproject(t,Ht$1);r.cartographicToCartesian(o,t)}return Promise.resolve(t)}))},w$4.prototype.pickPosition2D=function(e,t){if(e$2e(t=this.pickPositionWorldCoordinates(e,t)))return e$2e(t)&&this.mode!==C$14.SCENE3D&&o$1p.fromElements(t.y,t.z,t.x,t),t.x+=o$1p.globalOffset.x,t.y+=o$1p.globalOffset.y,t.z+=o$1p.globalOffset.z,t},w$4.prototype.pickPosition2DAsync=function(e,t){var i=this;return this.pickPositionWorldCoordinatesAsync(e,t).then((e=>{if(e$2e(t=e))return e$2e(t)&&i.mode!==C$14.SCENE3D&&o$1p.fromElements(t.y,t.z,t.x,t),t.x+=o$1p.globalOffset.x,t.y+=o$1p.globalOffset.y,t.z+=o$1p.globalOffset.z,Promise.resolve(t)}))},w$4.prototype.pickTileCoordinate=function(e){function t(e,t){return h$18.contains(e.rectangle,t)?e:void 0}if(!e$2e(e))throw new t$15("windowPosition is required");var i=this.globe._surface._levelZeroTiles;if(e$2e(i)){var n,r;try{n=this.pickPosition(e,new o$1p),r=a$18.fromCartesian(n)}catch{return}for(var o=r.longitude,a=r.latitude,s=t(i[0],r)||t(i[1],r);s._lastSelectionResult===D$J.REFINED;)s=t(s.southwestChild,r)||t(s.southeastChild,r)||t(s.northwestChild,r)||s.northeastChild;var l=s.rectangle,u=(o-l.west)/l.width,c=(l.north-a)/l.height;return{x:s.x,y:s.y,level:s.level,xRatio:u,yRatio:c}}},w$4.prototype.drillPick=function(e,t,i,n){var r=this,o=At$1(t,(function(){var t=r.pick(e,i,n,!0);if(e$2e(t))return{object:t,position:void 0,exclude:!1}}));return o.map((function(e){return e.object}))};var Wt$1=new o$1p,Ji=new o$1p;function Gt$1(e,t,i,n){var r=t.direction,o=o$1p.mostOrthogonalAxis(r,Wt$1),a=o$1p.cross(r,o,Wt$1),s=o$1p.cross(r,a,Ji);n.position=t.origin,n.direction=r,n.up=s,n.right=a,n.frustum.width=u$Z(i,e.pickOffscreenDefaultWidth)}function ot$2(e,t,i,n,r){for(var o=[],a=e.primitives,s=a.length,l=0;l<s;++l){var u=a.get(l);u instanceof p$u&&u.show&&(!e$2e(i)||-1===i.indexOf(u))&&o.push(u)}if(0===o.length)return o$1l.resolve(r());var c=new pi$1(t,n,o);return e._asyncRayPicks.push(c),c.promise.then((function(){return r()}))}function $i$1(e,t){return!(!e$2e(e)||!e$2e(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function ea$1(e,t,i,n,r,o,a){var s=e._context,l=s.uniformState,u=e._frameState,c=e._pickOffscreenView;e._view=c,Gt$1(e,t,n,c.camera),F$4=f$1a.clone(c.viewport,F$4);var h=c.pickFramebuffer.begin(F$4,c.viewport);e._jobScheduler.disableThisFrame(),e$2e(e.camera.frustum.left)&&(u.cullingVolume=pe$2(e,{x:0,y:0},1,1,c.viewport)),W$6(e),u.invertClassification=!1,u.passes.pick=!0,u.passes.offscreen=!0,u.passes.asynchronous=o,c.updateFrustums=!0,u.tilesetPassState=a?yi$1:$e$1,l.update(u),G$4(e),e._renderPipeline.updateAndExecuteCommands(h,ie$2),e._renderPipeline.resolveFramebuffers(h);var d,f=c.pickFramebuffer.end(s);if(e._context.depthTexture)for(var p=c.frustumCommandsList.length,_=0;_<p;++_){var m=e._picking.getPickDepth(e,_).getDepth(s,0,0);if(m>0&&m<1){var g=c.frustumCommandsList[_],x=g.near*(0!==_?e.opaqueFrustumNearOffset:1),y=x+m*(g.far-x);d=f$19.getPoint(t,y);break}}if(e._view=e._defaultView,s.endFrame(),u.passes.pick=!1,u.passes.offscreen=!1,e$2e(f)||e$2e(d))return{object:f,position:d,exclude:!e$2e(d)&&r||$i$1(f,i)}}function Ut$1(e,t,i,n,r,o,a,s){return At$1(i,(function(){return ea$1(e,t,n,r,o,a,s)}))}function ge$3(e,t,i,n,r,o){var a=Ut$1(e,t,1,i,n,r,o,!1);if(a.length>0)return a[0]}function qt$1(e,t,i,n,r,o,a){return Ut$1(e,t,i,n,r,o,a,!0)}w$4.prototype.pickFromRay=function(e,t,i){if(o$1q.defined("ray",e),this._mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");return ge$3(this,e,t,i,!1,!1)},w$4.prototype.drillPickFromRay=function(e,t,i,n){if(o$1q.defined("ray",e),this._mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");return qt$1(this,e,t,i,n,!1,!1)},w$4.prototype.pickFromRayMostDetailed=function(e,t,i){if(o$1q.defined("ray",e),this._mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");var n=this;return e=f$19.clone(e),t=e$2e(t)?t.slice():t,ot$2(this,e,t,i,(function(){return ge$3(n,e,t,i,!1,!0)}))},w$4.prototype.drillPickFromRayMostDetailed=function(e,t,i,n){if(o$1q.defined("ray",e),this._mode!==C$14.SCENE3D)throw new t$15("Ray intersections are only supported in 3D mode.");var r=this;return e=f$19.clone(e),i=e$2e(i)?i.slice():i,ot$2(this,e,i,n,(function(){return qt$1(r,e,t,i,n,!1,!0)}))};var ta$1=new o$1p,ra$1=new o$1p,ia$1=new f$19,zt$1=new a$18;function nt$3(e,t){var i=e.globe,n=e$2e(i)?i.ellipsoid:e.mapProjection.ellipsoid,r=e$1H._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,ra$1),a=a$18.toCartesian(t,n,ta$1),s=ia$1;s.origin=a,s.direction=o;var l=new f$19;return f$19.getPoint(s,r,l.origin),o$1p.negate(o,l.direction),l}function Qt$1(e,t){var i=e.globe,n=e$2e(i)?i.ellipsoid:e.mapProjection.ellipsoid;return nt$3(e,a$18.fromCartesian(t,n,zt$1))}function Kt$1(e,t){var i=e.globe,n=e$2e(i)?i.ellipsoid:e.mapProjection.ellipsoid;return a$18.fromCartesian(t,n,zt$1).height}function aa$1(e,t,i,n){var r=nt$3(e,t);return ot$2(e,r,i,n,(function(){var t=ge$3(e,r,i,n,!0,!0);if(e$2e(t))return Kt$1(e,t.position)}))}w$4.prototype.sampleHeight=function(e,t,i){if(o$1q.defined("position",e),this._mode!==C$14.SCENE3D)throw new t$15("sampleHeight is only supported in 3D mode.");if(!this.sampleHeightSupported)throw new t$15("sampleHeight requires depth texture support. Check sampleHeightSupported.");var n=ge$3(this,nt$3(this,e),t,i,!0,!1);if(e$2e(n))return Kt$1(this,n.position)},w$4.prototype.clampToHeight=function(e,t,i,n){if(o$1q.defined("cartesian",e),this._mode!==C$14.SCENE3D)throw new t$15("sampleHeight is only supported in 3D mode.");if(!this.clampToHeightSupported)throw new t$15("clampToHeight requires depth texture support. Check clampToHeightSupported.");i instanceof o$1p&&(n=i,i=void 0,t$11("clampToHeight-parameter-change","clampToHeight now takes an optional width argument before the result argument in SuperMap3D. The previous function definition will no longer work in 1.56."));var r=ge$3(this,Qt$1(this,e),t,i,!0,!1);if(e$2e(r))return o$1p.clone(r.position,n)},w$4.prototype.sampleHeightMostDetailed=function(e,t,i){if(o$1q.defined("positions",e),this._mode!==C$14.SCENE3D)throw new t$15("sampleHeightMostDetailed is only supported in 3D mode.");if(!this.sampleHeightSupported)throw new t$15("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");t=e$2e(t)?t.slice():t;for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=aa$1(this,e[o],t,i);return o$1l.all(r).then((function(t){for(var i=t.length,n=0;n<i;++n)e[n].height=t[n];return e}))},w$4.prototype.clampToHeightMostDetailed=function(e,t,i){return this._picking.clampToHeightMostDetailed(this,e,t,i)},w$4.prototype.cartesianToCanvasCoordinates=function(e,t){return s$R.wgs84ToWindowCoordinates(this,e,t)},w$4.prototype.completeMorph=function(){this._transitioner.completeMorph()},w$4.prototype.morphTo2D=function(e){var t,i=this.globe;t=e$2e(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=u$Z(e,2),this._transitioner.morphTo2D(e,t)},w$4.prototype.morphToColumbusView=function(e){var t,i=this.globe;t=e$2e(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=u$Z(e,2),this._transitioner.morphToColumbusView(e,t)},w$4.prototype.morphTo3D=function(e){var t,i=this.globe;t=e$2e(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=u$Z(e,2),this._transitioner.morphTo3D(e,t)},w$4.prototype.getViewport=function(e){if(this._multiViewportMode!==B$e.NONE){var t=le$3(this,s$R.transformWindowToDrawingBuffer(this,e,ce$4));if(t>-1){var i=this._context,n=new f$1a,r=this._multiViewportInfo[t];return n.x=i.drawingBufferWidth*r.x,n.y=i.drawingBufferHeight*r.y,n.width=i.drawingBufferWidth*r.width,n.height=i.drawingBufferHeight*r.height,n}}return(n=new f$1a).x=0,n.y=0,n.width=this._canvas.clientWidth,n.height=this._canvas.clientHeight,n},w$4.prototype.addS3MTilesLayerByScp=function(e,t,i,n){return this._sceneConfigLoader.addS3MTilesLayerByScp(e,t,i,n)},w$4.prototype.addS3MGroupLayer=function(e,t,i){return this._sceneConfigLoader.addS3MGroupLayer(e,t,i)},w$4.prototype.open=function(e,t,i){return this._sceneConfigLoader.open(e,t,i)},w$4.prototype.addVectorTilesLayer=function(e){return e.renderer="canvas",this.addVectorTilesMap(e)},w$4.prototype.getVectorTilesLayer=function(e){return this.getVectorTilesMap(e)},w$4.prototype.removeVectorTilesLayer=function(e){return this.removeVectorTilesMap(e)},w$4.prototype.addVectorTilesMap=function(e){if(!e$2e(e.url))throw new t$15("url is required!");var t=e.name||e$1T();e.name=t;var i=this._vectorTileSource.get(t);if(e$2e(i))return this._vectorTileMaps.find(e.name);i=new M$S(this._context,e),this._vectorTileSource.set(t,i);var n=this.imageryLayers.addVectorTileProvider(i);i.innerLayer=n,e$2e(this._frameState.mvtLayerCount)?this._frameState.mvtLayerCount++:this._frameState.mvtLayerCount=1;var r=new i$P({provider:i,layer:i.innerLayer,imagelayerCollection:this.imageryLayers,scene:this,viewer:e.viewer,name:e.name||e$1T(),layerConfig:e.layerConfig,swipeEnabled:u$Z(e.swipeEnabled,!1),swipeRegion:u$Z(e.swipeRegion,new f$1a(0,0,1,1)),enableMorphing:e.enableMorphing,realtime:e.realtime,billboardMode:e.billboardMode,customRequestHeaders:e.customRequestHeaders,labelDepthTestEnabled:e.labelDepthTestEnabled,lineAntialiasing:e.lineAntialiasing});return e.isTdt&&(i._ready=!0,r._isTdt=!0),i.innerLayer.kmlLayer=r.kmlLayer,i._owner=r,this._vectorTileMaps.add(r),r},w$4.prototype.getVectorTilesMap=function(e){if(!e$2e(e))throw new t$15("name is required!");return this._vectorTileMaps.find(e)},w$4.prototype.removeVectorTilesMap=function(e){var t=this._vectorTileMaps.find(e);return!!e$2e(t)&&(this._removeCoverImageryLayer(t),this._vectorTileMaps.remove(e),this._vectorTileSource.remove(e),!0)},w$4.prototype._removeCoverImageryLayer=function(e){for(var t=0;t<this._layers.layerQueue.length;t++){var i=this._layers.layerQueue[t];i._imageryLayer===e&&i._removeCoverImageryLayer()}},w$4.prototype.addLayerService=function(e,t,i){return this._sceneConfigLoader.addLayerService(e,t,i)},w$4.prototype.addS3MInstanceCollection=function(e,t){var i=new S3MInstanceCollection({url:e,instanceAttrs:t,gl:this._context._gl,context:this._context});return this.primitives.add(i),i};var oa$1=new o$1p;function na$1(e){var t=e._context;t.uniformState;var i=e._frameState,n=i.camera,r=n.positionWC,o=i.cullingVolume,a=i.mode===C$14.SCENE3D?i.occluder:void 0;if(e$2e(e._reflectFramebuffer)||(e._reflectFramebuffer=t.createReflectFramebuffer(),i._framebufferList.water=e._reflectFramebuffer),e._reflectFramebuffer.distinctQuality=e._waterReflectionDistinctQuality,e.postProcessStages.screenSpaceReflection.enabled)e._reflectFramebuffer.isUpdate=!1;else{for(var s=6378137,l=0,u=0;u<e.layers._layerQueue.length;u++){var c=e.layers._layerQueue[u];if(e$2e(c._waterPlanes)){var h=c._waterPlanes;for(var d in h._hash){var f=h.get(d);if(!(o.computeVisibility(f.boundingVolume)==Ae$w.OUTSIDE||e$2e(a)&&f.boundingVolume.isOccluded(a)))(_=(_=e$2e(f.boundingVolume.radius)?o$1p.distance(f.boundingVolume.center,r)-f.boundingVolume.radius:Math.sqrt(y$Y.distanceSquaredTo(f.boundingVolume,r)))<.01?.01:_)<s&&(s=_,l=f.distance),e._reflectFramebuffer.isUpdate=!0}}}var p=e._analyst3D.layerQueue.length;for(u=0;u<p;u++){if(-1!=e._analyst3D.layerQueue[u]._name.search("floodAnalysis3D")){var _,m=e._analyst3D.layerQueue[u];(_=(_=o$1p.distance(m._boundingSphere.center,r)-m._boundingSphere.radius)<.01?.01:_)<s&&(s=_,l=m._waterHeight),e._reflectFramebuffer.isUpdate=!0}}if(!e._reflectFramebuffer.isUpdate||s>5e4)e._reflectFramebuffer.isUpdate=!1;else{if(e.mode==C$14.SCENE3D){l+=o$1p.magnitude(n.positionWC)-n.positionCartographic.height,e._reflectFramebuffer._reflectPlane.normal=o$1p.normalize(r,oa$1);var g=new o$1p;e._reflectFramebuffer._reflectPlane.normal.clone(g),o$1p.multiplyByScalar(g,l,g),o$1p.subtract(g,t._relativeOrigin,g),e._reflectFramebuffer._reflectPlane.distance=-o$1p.dot(g,e._reflectFramebuffer._reflectPlane.normal)}else e._reflectFramebuffer._reflectPlane.normal=o$1p.UNIT_X,e._reflectFramebuffer._reflectPlane.distance=-l;e._reflectFramebuffer.isUpdate=!0}}}function sa$1(e){var t=e._context;t.uniformState;var i=e._frameState;t.numNormalAndDepthObject>0?(e$2e(e._normalFramebuffer)||(e._normalFramebuffer=t.createNormalFramebuffer(),i._framebufferList.normalAndDepth=e._normalFramebuffer),e._normalFramebuffer.isUpdate=!0):e$2e(e._normalFramebuffer)&&(e._normalFramebuffer.isUpdate=!1)}function ua(e){var t=e._context;t.uniformState;var i=e._frameState;t.numPostEffectFilterObject>0?(e$2e(e._postEffectFilterFramebuffer)||(e._postEffectFilterFramebuffer=t.createPostEffectFilterlFramebuffer(),i._framebufferList.postEffectFilter=e._postEffectFilterFramebuffer),e._postEffectFilterFramebuffer.isUpdate=!0):e$2e(e._postEffectFilterFramebuffer)&&(e._postEffectFilterFramebuffer.isUpdate=!1)}function fa(e){var t=e._context;t.uniformState;var i=e._frameState;t.numClampClipPlaneLayer>0?(e$2e(e._clampFramebuffer)||(e._clampFramebuffer=t.createClampFramebuffer(),i._framebufferList.clampTexture=e._clampFramebuffer),e._clampFramebuffer.isUpdate=!0):e$2e(e._clampFramebuffer)&&(e._clampFramebuffer.isUpdate=!1)}function st$2(e){var t=e._context;t.uniformState;var i=e._frameState;e._isUpdatePickCommand?(e$2e(e._pickRectFramebuffer)||(e._pickRectFramebuffer=t.createPickRectFramebuffer(),i._framebufferList.pickRectTexture=e._pickRectFramebuffer,e._pickRectFramebuffer.beginFunc=function(){this._renderTexture._passState.scissorTest={enabled:!0,rectangle:{x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}}}),e._pickRectFramebuffer.isUpdate=!0,e._isUpdatePickCommand=!1):e$2e(e._pickRectFramebuffer)&&(e._pickRectFramebuffer.isUpdate=!1)}function jt$1(e){if(e$2e(e._pickRectFramebuffer)&&e._pickRectFramebuffer.isUpdate){for(var t=e._context,i=e._pickRectFramebuffer.renderTexture._width,n=e._pickRectFramebuffer.renderTexture._height,r=t.readPixels({framebuffer:e._pickRectFramebuffer.renderTexture._fb,x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}),o=[],a=[],s=[],l=e._layers.layerQueue,u=0;u<l.length;u++){s[g=Oe$1(_=l[u].id)]=u,o.push(g),a[g]=[]}r.length;for(var c=0;c<i;c++)for(var h=0;h<n;h++){var d=4*(h*i+c);if(0!==r[d]||0!==r[d+1]||0!==r[d+2]){var f=e$1X.byteToRgba(r[d],r[d+1],r[d+2],r[d+3]),p=t.getObjectByPickId(f);if(e$2e(p)){var _=p.primitive.id,m=p.id,g=Oe$1(_),x=o.indexOf(g);if(x>=0){var y=l[s[g]];if(0==a[g].length)(b=[]).push(m),a[g]=b;else(x=a[g].indexOf(m))<0&&a[g].push(m)}}}}for(var v=Object.keys(a),$=0;$<v.length;$++){var b;y=l[u=s[v[$]]];(b=a[v[$]]).length>0&&y.setSelection(b)}}}function la(e){if(!e$2e(e._pickRectFramebuffer)||!e._pickRectFramebuffer.isUpdate)return Promise.resolve();var t=e._context,i=e._pickRectFramebuffer.renderTexture._width,n=e._pickRectFramebuffer.renderTexture._height;return t.readPixelsAsync({framebuffer:e._pickRectFramebuffer.renderTexture._fb,x:e._pickRect.x,y:e._pickRect.y,width:e._pickRect.z-e._pickRect.x||1,height:e._pickRect.w-e._pickRect.y||1}).then((r=>{for(var o=[],a=[],s=[],l=e._layers.layerQueue,u=0;u<l.length;u++){s[g=Oe$1(_=l[u].id)]=u,o.push(g),a[g]=[]}r.length;for(var c=0;c<i;c++)for(var h=0;h<n;h++){var d=4*(h*i+c);if(0!==r[d]||0!==r[d+1]||0!==r[d+2]){var f=e$1X.byteToRgba(r[d],r[d+1],r[d+2],r[d+3]),p=t.getObjectByPickId(f);if(e$2e(p)){var _=p.primitive.id,m=p.id,g=Oe$1(_),x=o.indexOf(g);if(x>=0){var y=l[s[g]];if(0==a[g].length)(b=[]).push(m),a[g]=b;else(x=a[g].indexOf(m))<0&&a[g].push(m)}}}}for(var v=Object.keys(a),$=0;$<v.length;$++){var b;y=l[u=s[v[$]]];(b=a[v[$]]).length>0&&y.setSelection(b)}return Promise.resolve()}))}function Oe$1(e){return"id_"+e}function ha(e,t,i){var n=e._context,r=e._frameState,o=t.begin(r),a=e._environmentVisible;e._environmentVisible=t.environmentVisible;var s=r.useType,l=r._isDepth;if(r.useType=t.useType,r._isDepth=!1,e._multiViewportMode!==B$e.NONE)for(var u=0;u<4;u++)if(1<<u&t._visibleViewport){r.multiViewportIndex=u;break}e._renderPipeline.updateAndExecuteCommandsForPostEffect(o,u$Z(e.backgroundColor,e$1X.BLACK)),r.multiViewportIndex=-1,t.update(o,e._pickDepths),e._environmentState,r.commandList.length=0,n.endFrame(),t.end(r),r._isDepth=l,r.useType=s,e._environmentVisible=a}function ut$4(e){var t=e._context,i=t.uniformState,n=e._frameState,r=n.camera,o=n._framebufferList;n.passes.fbo=!0;var a=e.enableCompositor;for(var s in e.enableCompositor=!0,o){var l=o[s];if(e$2e(l)&&l.isUpdate&&(!l.isDestroyed||!l.isDestroyed())){var u=n.useType,c=n._isDepth,h=n._fboState.name,d=n._fboState.enabled,f=n._fboState.frameBufferType,p=e._sunCamera.direction;if(n._fboState.name=s,n._fboState.enabled=!0,n._fboState.frameBufferType=l.frameBufferType,l.frameBufferType===Qe$c.POSTEFFECT_FILTER)ha(e,l);else{var _=r.frustum.near;l.frameBufferType===Qe$c.REFLECT&&(r.frustum.near=1);var m=l.begin(n),g=e._environmentVisible;e._environmentVisible=l.environmentVisible,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.update(n);var x=e.shadowMap;e$2e(x)&&x.enabled&&o$1p.negate(i.sunDirectionWC,e._sunCamera.direction);var y=n.shadowState.nearPlane,v=n.shadowState.farPlane,$=n.shadowState.closestObjectSize;if(n.useType=l.useType,n._isDepth=(6&l.useType)>0||1&l.useType&&l.isManualDepth,e._multiViewportMode!==B$e.NONE)for(var b=0;b<4;b++)if(1<<b&l._visibleViewport){n.multiViewportIndex=b;break}G$4(e),e._renderPipeline.updateAndExecuteCommands(m,u$Z(e.backgroundColor,e$1X.BLACK)),n.multiViewportIndex=-1;var T=e._environmentState;if(!t.webgpu&&e._msaaSamples>1&&T.useGlobeDepthFramebuffer){var C=e._view.globeDepth;l.update(t,m,C.framebufferWithTexture)}else l.update(t,m,m.framebuffer);n._fboState.frameBufferType!==Qe$c.CLAMP&&e._renderPipeline.resolveFramebuffers(m),n.commandList.length=0,t.endFrame(),Tt(e),l.end(n),e$2e(x)&&x.enabled&&-1!==n._fboState.name.indexOf("ShadowQueryPoints")&&(e._sunCamera.direction=p),"water"==n._fboState.name&&(r.frustum.near=_),e._environmentVisible=g,n.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.update(n),e$2e(x)&&x.enabled&&o$1p.negate(i.sunDirectionWC,e._sunCamera.direction),n.shadowState.nearPlane=y,n.shadowState.farPlane=v,n.shadowState.closestObjectSize=$}n._fboState.name=h,n._fboState.enabled=d,n._fboState.frameBufferType=f,n._isDepth=c,n.useType=u}}n.passes.fbo=!1,e.enableCompositor=a}function Yt$1(e,t){var i=e._context,n=i.uniformState,r=e._frameState,o=r.camera,a=e.shadowMap.enabled,s=r.shadowState.shadowsEnabled;r.passes.fbo=!0,e.shadowMap.enabled=!1,r.shadowState.shadowsEnabled=!1;var l=r.useType,u=r._isDepth,c=r._fboState.name,h=r._fboState.enabled,d=r._fboState.frameBufferType;r._fboState.enabled=!0,r._fboState.frameBufferType=t.frameBufferType;var f=t.begin(r),p=e._environmentVisible;e._environmentVisible=t.environmentVisible,r.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.update(r),r.useType=t.useType,r._isDepth=(6&t.useType)>0||1&t.useType&&t.isManualDepth,G$4(e),e._renderPipeline.updateAndExecuteCommands(f,u$Z(e.backgroundColor,e$1X.BLACK));var _=e._environmentState;if(!i.webgpu&&e._msaaSamples>1&&_.useGlobeDepthFramebuffer){var m=e._view.globeDepth;t.update(i,f,m.framebufferWithTexture)}else t.update(i,f,f.framebuffer);e._renderPipeline.resolveFramebuffers(f),r.commandList.length=0,i.endFrame(),t.end(r),e._environmentVisible=p,r.cullingVolume=o.frustum.computeCullingVolume(o.positionWC,o.directionWC,o.upWC),n.update(r),r._fboState.name=c,r._fboState.enabled=h,r._fboState.frameBufferType=d,r._isDepth=u,r.useType=l,r.passes.fbo=!1,e.shadowMap.enabled=a,r.shadowState.shadowsEnabled=s}function ma(e){var t=e._context.uniformState;if(!e.enableOutline||e.camera._positionCartographic.height>2e3)return t.nonSelDepthTexture=void 0,void(t.maskTexture=void 0);var i=e.nonSelDepthbuffer;e$2e(i)||((i=e.nonSelDepthbuffer=new s$U(e.context)).environmentVisible.isObjectVisible=!0,i.environmentVisible.isGlobalVisible=!0,i.isUpdate=!0,i._beginFunc=function(t){t.passes.pick=!0,t.passes.depth=!0,e.layers.getSelectedLayer().selectedColor.alpha=0},i._endFunc=function(t){t.passes.pick=!1,t.passes.depth=!1,e.layers.getSelectedLayer().selectedColor.alpha=1}),Yt$1(e,i),t.nonSelDepthTexture=i.depthTexture;var n=e.selMaskBuffer;e$2e(n)||((n=e.selMaskBuffer=new t$E(e.context))._useHeight=!1,n.environmentVisible.isObjectVisible=!0,n.environmentVisible.isOnlyS3MObjectVisible=!0,n.environmentVisible.isGlobalVisible=!1,n.isUpdate=!0),e._maskEnabled=!0;var r=e.backgroundColor;e.backgroundColor=e$1X.clone(e$1X.WHITE),Yt$1(e,n),e.backgroundColor=r,e._maskEnabled=!1,t.maskTexture=n.renderTexture._fb.getColorTexture(0)}w$4.prototype.addFieldLayer=function(e){if(!e$2e(e))throw new t$15("url is required!");var t=this;if(e.indexOf(".nc")>-1){var i=o$1l.defer();return o$1l(o$10(e),(function(e){var n=new k$6(e),r=new i$g(t._context);r._NetCDFBuffer=n,r.NetCDFInfo=n.header,t._layers.add(r),i.resolve(r)})).otherwise((function(e){throw i.reject(e.message),new t$15("Not a valid NetCDF file!")})),i.promise}},w$4.prototype.addVoxelGridLayer=function(e,t){if(!e$2e(e))throw new t$15("url is required!");var i=this,n=o$1l.defer();return e.indexOf(".nc")>-1?(o$1l(o$10(e),(function(e){var r=new k$6.NetCDFReader(e),o=new g$e(i._context);o._NetCDFBuffer=r,o._NetCDFInfo=r.header,o._name=t,i._layers.add(o),n.resolve(o)})).otherwise((function(e){throw new t$15("Not a valid NetCDF file!")})),n.promise):(o$1l(u$Q(e),(function(t){for(var r=(t=(new DOMParser).parseFromString(t,"application/xml")).childNodes[0],o=u$Z(s$T.queryStringAttribute(r,"xmlns:sml"),"http://www.supermap.com/SuperMapCache/scvo"),a=s$T.queryNumericValue(r,"Version",o),s=s$T.queryStringValue(r,"CacheName",o),l=(s$T.queryStringValue(r,"StoreType",o),s$T.queryStringValue(r,"FileExtentName",o),s$T.queryStringValue(r,"Type",o),s$T.queryStringValue(r,"VolumeType",o),s$T.queryNumericValue(r,"Width",o)),u=s$T.queryNumericValue(r,"Height",o),c=s$T.queryNumericValue(r,"Depth",o),h=s$T.queryNumericValue(r,"Time",o),d=s$T.queryNumericValue(r,"CellWidth",o),f=s$T.queryNumericValue(r,"CellHeight",o),p=s$T.queryNumericValue(r,"CellDepth",o),_=s$T.queryNumericValue(r,"CellTime",o),m=s$T.queryFirstNode(r,"Bounds",o),g=s$T.queryNumericValue(m,"Left",o),x=s$T.queryNumericValue(m,"Right",o),y=s$T.queryNumericValue(m,"Top",o),v=s$T.queryNumericValue(m,"Bottom",o),$=s$T.queryNumericValue(r,"MaxAltitude",o),b=s$T.queryNumericValue(r,"MinAltitude",o),T=s$T.queryNumericValue(r,"MaxValue",o),C=s$T.queryNumericValue(r,"MinValue",o),S=s$T.queryNumericValue(r,"Levels",o),w=s$T.queryFirstNode(r,"Available",o),E=s$T.queryNodes(w,"TilesBounds",o),P=[],A=0,L=E.length;A<L;A++){var M=s$T.queryNumericAttribute(E[A],"level",o),R=s$T.queryNodes(E[A],"TileBounds",o),O=s$T.queryNumericValue(R[0],"StartCol",o),D=s$T.queryNumericValue(R[0],"StartRow",o),I=s$T.queryNumericValue(R[0],"EndCol",o),B=s$T.queryNumericValue(R[0],"EndRow",o);P[M]={StartCol:O,StartRow:D,EndCol:I,EndRow:B}}var F=new g$e(i._context);F.setIsMultiResolution(!0);var N=e.lastIndexOf("/");F._url=e.slice(0,N),F._name=s,F._version=a,F._width=l,F._height=u,F._zBounds=new o$1o(b,$),F._layerBounds=new h$18(g,v,x,y);var G=F._layerBounds.width/l,z=F._layerBounds.height/u;for(A=P.length-1;A>=0;A--)P[A].Width=l,P[A].Height=u,l=Math.floor(.5*l),u=Math.floor(.5*u),P[A].resolution=new o$1o(G,z),G*=2,z*=2;F._depth=c,F._time=h,F._levels=S,F._cellWidth=d,F._cellHeight=f,F._cellDepth=p,F._cellTime=_,F._maxFiltration=T,F._minFiltration=C,F._floor=C,F._ceil=T,F._availableNode=P,o$1l(o$10(F._url+"/0/0000/0000/0000_0000.vol"),(function(e){var t=e.slice(16,e.byteLength);F._volumeBuffer=nt$b.inflate(t).buffer,i._layers.add(F),n.resolve(F)})).otherwise((function(e){throw new t$15("Not load root file!")}))})).otherwise((function(e){throw new t$15("Not a valid SCVO file!")})),n.promise)},w$4.prototype.renderIds=function(e){var t=this._context,i=this._defaultView;this._view=i;var n=i.viewport;n.x=0,n.y=0,n.width=t.drawingBufferWidth,n.height=t.drawingBufferHeight,F$4.x=0,F$4.y=0,F$4.width=t.drawingBufferWidth,F$4.height=t.drawingBufferHeight;var r=t.uniformState,o=this._frameState;W$6(this),o.invertClassification=!1,o.passes.pick=!0,r.update(o);var a=i.pickFramebuffer.begin(F$4,n),s=this._environmentVisible.isGlobalVisible;this._environmentVisible.isGlobalVisible=!1,this._environmentVisible.isOnlyS3MObjectVisible=!0;var l=this.camera,u=o$1p.clone(l.position),c=l.heading,h=l.pitch,d=l.roll;this.camera.setView(e),G$4(this),this._renderPipeline.updateAndExecuteCommands(a,ie$2),this._renderPipeline.resolveFramebuffers(a),t.endFrame(),this._environmentVisible.isGlobalVisible=s,this._environmentVisible.isOnlyS3MObjectVisible=!1,l.setView({destination:u,orientation:{heading:c,pitch:h,roll:d}})},w$4.prototype.pickRect=function(e,t){var i=e$2d.clamp(this._context.drawingBufferHeight-e.y,0,this._context.drawingBufferHeight),n=e$2d.clamp(this._context.drawingBufferHeight-t.y,0,this._context.drawingBufferHeight),r=Math.min(e.x,t.x),o=Math.min(i,n),a=Math.max(e.x,t.x),s=Math.max(i,n),l=new e$2c;l.x=r/this._context.drawingBufferWidth,l.y=o/this._context.drawingBufferHeight,l.z=a/this._context.drawingBufferWidth,l.w=s/this._context.drawingBufferHeight,this._isUpdatePickCommand=!0,this._pickRect=new e$2c(r,o,a,s);for(var u=0,c=this._layers.layerQueue.length;u<c;u++){this._layers.layerQueue[u].selectBound=l}},w$4.prototype.getPickRectIDs=function(){for(var e=new e$1Q,t=this._layers.layerQueue,i={},n=!1,r=0;r<t.length;r++){i[(_=t[r]).id]=Object.keys(_._objsVisibleMap),n=!!_._objsVisibleMap[i[_.id][0]]}for(var o=0;o<10;o++){this._isUpdatePickCommand=!0,this.initializeFrame(),this._renderForQuery();var a=!1;for(r=0;r<t.length;r++){var s=(_=t[r]).getSelection();if(!(s.length<=0)){if(e.contains(_.id)){var l;l=s.concat(e.get(_.id).ids),s=l}for(var u=[],c=(o=0,s.length);o<c;o++){var h=s[o],d=i[_.id].indexOf(h);(n&&d>-1||!n&&-1===d)&&u.push(h)}var f={layerName:_.name,layerIndex:r,ids:u};e.set(_.id,f),a=!0,_.releaseSelection(),_.setObjsVisible(s,!1)}}if(!a)break}var p=[];this._isUpdatePickCommand=!1;for(o=0;o<e.values.length;o++){var _;(_=t[e.values[o].layerIndex]).setObjsVisible([],!1),n||_.setOnlyObjsVisible(i[_.id],n);var m={layerName:e.values[o].layerName,ids:e.values[o].ids};p.push(m)}return p},w$4.prototype.getPickRectIDsAsync=function(){var e=new Promise(((e,t)=>{for(var i=new e$1Q,n=this._layers.layerQueue,r={},o=!1,a=0;a<n.length;a++){var s=n[a];r[s.id]=Object.keys(s._objsVisibleMap),o=!!s._objsVisibleMap[r[s.id][0]]}for(var l=0,u=0;u<10;u++)this._isUpdatePickCommand=!0,this.initializeFrame(),this._renderForQueryAsync().then((()=>{l++;for(var t=0;t<n.length;t++){var a=(m=n[t]).getSelection();if(!(a.length<=0)){if(i.contains(m.id)){var s;s=a.concat(i.get(m.id).ids),a=s}for(var u=[],c=0,h=a.length;c<h;c++){var d=a[c],f=r[m.id].indexOf(d);(o&&f>-1||!o&&-1===f)&&u.push(d)}var p={layerName:m.name,layerIndex:t,ids:u};i.set(m.id,p),m.releaseSelection()}}if(10===l){var _=[];this._isUpdatePickCommand=!1;for(c=0;c<i.values.length;c++){var m=n[i.values[c].layerIndex];o||m.setOnlyObjsVisible(r[m.id],o);var g={layerName:i.values[c].layerName,ids:i.values[c].ids};_.push(g)}e(_)}}))}));return e},w$4.prototype._renderForQuery=function(){var e=this.context,t=e.uniformState,i=this._frameState,n=this._defaultView;this._view=n,W$6(this),i.passes.render=!0,i.passes.postProcess=this.postProcessStages.hasSelected,i.backgroundColor=u$Z(this.backgroundColor,e$1X.BLACK),t.update(i);var r=n.viewport;r.x=0,r.y=0,r.width=e.drawingBufferWidth,r.height=e.drawingBufferHeight;var o=n.passState;o.framebuffer=void 0,o.blendingEnabled=void 0,o.scissorTest=void 0,o.viewport=f$1a.clone(r,o.viewport),st$2(this),ut$4(this),G$4(this),this._renderPipeline.resolveFramebuffers(o),o.framebuffer=void 0,jt$1(this),e.endFrame()},w$4.prototype._renderForQueryAsync=function(){var e=this.context,t=e.uniformState,i=this._frameState,n=this._defaultView;this._view=n,W$6(this),i.passes.render=!0,i.passes.postProcess=this.postProcessStages.hasSelected,i.backgroundColor=u$Z(this.backgroundColor,e$1X.BLACK),t.update(i);var r=n.viewport;r.x=0,r.y=0,r.width=e.drawingBufferWidth,r.height=e.drawingBufferHeight;var o=n.passState;return o.framebuffer=void 0,o.blendingEnabled=void 0,o.scissorTest=void 0,o.viewport=f$1a.clone(r,o.viewport),st$2(this),ut$4(this),G$4(this),this._renderPipeline.resolveFramebuffers(o),o.framebuffer=void 0,la(this).then((()=>(e.endFrame(),Promise.resolve())))},w$4.prototype.getHeight=function(e,t){var i=this._context,n=i.uniformState,r=this._frameState;this._environmentState;var o=this._defaultView;this._view=o;var a=o.viewport;a.x=0,a.y=0,a.width=i.drawingBufferWidth,a.height=i.drawingBufferHeight;var s=new o$1o(.5*i.drawingBufferWidth,.5*i.drawingBufferHeight),l=o.passState;l.viewport=f$1a.clone(a,l.viewport),tt$2(r.passes),r.passes.pick=!0,r.passes.depth=!0,G$4(this),l=o.pickDepthFramebuffer.update(i,s,a);var u,c=this.camera,h=o$1p.clone(c.positionWC),d=o$1p.clone(c.direction),f=o$1p.clone(c.up);c.setView({destination:o$1p.fromDegrees(e,t,9e3)}),this._renderPipeline.updateAndExecuteCommands(l,ie$2),this._renderPipeline.resolveFramebuffers(l),i.endFrame(),u=e$2e(c.frustum.fov)?c.frustum.clone(Ee$2):e$2e(c.frustum.infiniteProjectionMatrix)?c.frustum.clone(Fe$2):e$2e(c.frustum.width)?c.frustum.clone(Re$2):c.frustum.clone(Le$2);for(var p,_=o.frustumCommandsList,m=_.length,g=new o$1p,x=0;x<m;++x){var y=this._picking.getPickDepth(this,x).getDepth(i,s.x,s.y);if(y>0&&y<1){var v=_[x];u.near=v.near*(0!==x?this.opaqueFrustumNearOffset:1),u.far=v.far,n.updateFrustum(u),g=s$R.drawingBufferToWgs84Coordinates(this,s,y,g),p=a$18.fromCartesian(g).height;break}}return c.setView({destination:h,orientation:{direction:d,up:f}}),p},w$4.prototype.addLightSource=function(e){LicenseChecker.LICENSECHECKER.verify("Scene_addLightSource"),e$2e(e)&&this._lightSource.addLightSource(e)},w$4.prototype.removeLightSource=function(e){!e$2e(e)||this._lightSource.removeLightSource(e)},w$4.prototype.outputSceneToFile=function(){var e=this,t=o$1l.defer(),i=!1;return this.postRender.addEventListener((function(){i||(i=!0,e.context.readPixelsAsync({}).then((i=>{var n=document.createElement("canvas");n.height=e.context.drawingBufferHeight,n.width=e.context.drawingBufferWidth;var r=n.getContext("2d"),o=r.createImageData(n.width,n.height);o.data.set(i),r.putImageData(o,0,0);var a=r.getImageData(0,0,n.width,n.height);if(e.context.webgpu)for(var s=0;s<a.height;++s)for(var l=0;l<a.width;++l){var u=s*a.width+l,c=a.data[4*u],h=a.data[4*u+2];a.data[4*u]=h,a.data[4*u+2]=c}else for(s=0;s<a.height/2;++s)for(l=0;l<a.width;++l){var d=4*s*a.width+4*l,f=4*(a.height-s)*a.width+4*l,p=(c=a.data[d],a.data[d+1]),_=(h=a.data[d+2],a.data[d+3]);a.data[d]=a.data[f],a.data[d+1]=a.data[f+1],a.data[d+2]=a.data[f+2],a.data[d+3]=a.data[f+3],a.data[f]=c,a.data[f+1]=p,a.data[f+2]=h,a.data[f+3]=_}r.clearRect(0,0,a.width,a.height),r.putImageData(a,0,0);var m=n.toDataURL();t.resolve(m)})))})),t.promise},w$4.prototype.collideDetection=function(e){if(this.mode===C$14.SCENE3D||this.mode===C$14.COLUMBUS_VIEW){var t=this._context,i=this._defaultView;this._view=i;var n=this.camera,r=t.uniformState,o=o$1p.clone(n.direction),a=o$1p.clone(n.up),s=o$1p.cross(e,n.right,new o$1p);n.setView({destination:n.position,orientation:{direction:e,up:s},convert:n._mode!==C$14.COLUMBUS_VIEW});var l,u=new o$1o(.5*t.drawingBufferWidth,.5*t.drawingBufferHeight);at$4(this,u),this.camera.setView({destination:this.camera.position,orientation:{direction:o,up:a},convert:n._mode!==C$14.COLUMBUS_VIEW}),l=e$2e(n.frustum.fov)?n.frustum.clone(Ee$2):e$2e(n.frustum.infiniteProjectionMatrix)?n.frustum.clone(Fe$2):e$2e(n.frustum.width)?n.frustum.clone(Re$2):n.frustum.clone(Le$2);for(var c=i.frustumCommandsList,h=c.length,d=new o$1p,f=0;f<h;++f){var p=this._picking.getPickDepth(this,f).getDepth(t,u.x,u.y);if(p>0&&p<1){var _=c[f];return l.near=_.near*(0!==f?this.opaqueFrustumNearOffset:1),l.far=_.far,r.updateFrustum(l),s$R.drawingBufferToWgs84Coordinates(this,u,p,d)}}}},w$4.prototype.parsePBRFromJson=function(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(t$10.createIfNeeded(e[i]).fetchJson());var r=this;o$1l.all(t,(function(e){for(var t=0,i=e.length;t<i;t++){var n=e[t].material,o=new p$1d,a=n.pbrMetallicRoughness;n.textureunitstates,o[0]=a.roughnessFactor,o[1]=a.metallicFactor,o[2]=a.baseColor.x,o[3]=a.baseColor.y,o[4]=a.baseColor.z,o[5]=a.baseColor.w,r._pbrMaterlParameters.push(o)}}))},w$4.prototype.isDestroyed=function(){return!1},w$4.prototype.destroy=function(){this.layers.removeAll(),this.layers.endFrame(this._frameState),this._analyst3D.removeAll(),this._vectorTileMaps.removeAll(),this._plotLayers.removeAll(),this.compositor.destroy(),this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.cloudBox=this.cloudBox&&this.cloudBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this.moon=this.moon&&this.moon.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy(),this._view=void 0,this.shadowMap=this.shadowMap&&this.shadowMap.destroy(),this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),e$2e(this._reflectFramebuffer)&&(this._reflectFramebuffer.destroy(),this._frameState._framebufferList.water=void 0),e$2e(this._normalFramebuffer)&&(this._normalFramebuffer.destroy(),this._frameState._framebufferList.normalAndDepth=void 0),e$2e(this._postEffectFilterFramebuffer)&&(this._postEffectFilterFramebuffer.destroy(),this._frameState._framebufferList.postEffectFilter=void 0),e$2e(this._clampFramebuffer)&&(this._clampFramebuffer.destroy(),this._frameState._framebufferList.clampTexture=void 0),e$2e(this._pickRectFramebuffer)&&(this._pickRectFramebuffer.destroy(),this._frameState._framebufferList.pickRectTexture=void 0),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),e$2e(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(var e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,this._rasterPickTexture=this._rasterPickTexture&&!this._rasterPickTexture.isDestroyed()&&this._rasterPickTexture.destroy(),this._rasterPickFBO=this._rasterPickFBO&&!this._rasterPickFBO.isDestroyed()&&this._rasterPickFBO.destroy(),e$2e(this.voxelGridPostRender)&&this.voxelGridPostRender.destroy(),this.voxelGridPostRender=void 0,e$2e(this.particlePostRender)&&this.particlePostRender.destroy(),this.particlePostRender=void 0,e$2e(this.particleTrailsPostRenderer)&&this.particleTrailsPostRenderer.destroy(),this.particleTrailsPostRenderer=void 0,e$2e(this.nonSelDepthbuffer)&&this.nonSelDepthbuffer.destroy(),e$2e(this.selMaskBuffer)&&this.selMaskBuffer.destroy(),e$2e(this._renderPipeline)&&this._renderPipeline.destroy(),i$11(this)};var g$8="uniform vec3 u_radiiAndDynamicAtmosphereColor;\nuniform float u_atmosphereLightIntensity;\nuniform float u_atmosphereRayleighScaleHeight;\nuniform float u_atmosphereMieScaleHeight;\nuniform float u_atmosphereMieAnisotropy;\nuniform vec3 u_atmosphereRayleighCoefficient;\nuniform vec3 u_atmosphereMieCoefficient;\nconst float ATMOSPHERE_THICKNESS = 111e3;\nconst int PRIMARY_STEPS_MAX = 16;\nconst int LIGHT_STEPS_MAX = 4;\nfloat approximateTanh(float x) {\nfloat x2 = x * x;\nreturn max(-1.0, min(+1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));\n}\nvoid computeScattering(\nczm_ray primaryRay,\nfloat primaryRayLength,\nvec3 lightDirection,\nfloat atmosphereInnerRadius,\nout vec3 rayleighColor,\nout vec3 mieColor,\nout float opacity\n) {\nrayleighColor = vec3(0.0);\nmieColor = vec3(0.0);\nopacity = 0.0;\nfloat atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\nvec3 origin = vec3(0.0);\nczm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);\nif (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {\nreturn;\n}\nfloat x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);\nfloat w_stop_gt_lprl = 0.5 * (1.0 + approximateTanh(x));\nfloat start_0 = primaryRayAtmosphereIntersect.start;\nprimaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);\nprimaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));\nfloat x_o_a = start_0 - ATMOSPHERE_THICKNESS;\nfloat w_inside_atmosphere = 1.0 - 0.5 * (1.0 + approximateTanh(x_o_a));\nint PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0);\nint LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0);\nfloat rayPositionLength = primaryRayAtmosphereIntersect.start;\nfloat totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;\nfloat rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));\nfloat rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));\nvec3 rayleighAccumulation = vec3(0.0);\nvec3 mieAccumulation = vec3(0.0);\nvec2 opticalDepth = vec2(0.0);\nvec2 heightScale = vec2(u_atmosphereRayleighScaleHeight, u_atmosphereMieScaleHeight);\nfor (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {\nif (i >= PRIMARY_STEPS) {\nbreak;\n}\nvec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);\nfloat sampleHeight = length(samplePosition) - atmosphereInnerRadius;\nvec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;\nopticalDepth += sampleDensity;\nczm_ray lightRay = czm_ray(samplePosition, lightDirection);\nczm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);\nfloat lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);\nfloat lightPositionLength = 0.0;\nvec2 lightOpticalDepth = vec2(0.0);\nfor (int j = 0; j < LIGHT_STEPS_MAX; ++j) {\nif (j >= LIGHT_STEPS) {\nbreak;\n}\nvec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);\nfloat lightHeight = length(lightPosition) - atmosphereInnerRadius;\nlightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;\nlightPositionLength += lightStepLength;\n}\nvec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));\nrayleighAccumulation += sampleDensity.x * attenuation;\nmieAccumulation += sampleDensity.y * attenuation;\nrayPositionLength += (rayStepLength += rayStepLengthIncrease);\n}\nrayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation;\nmieColor = u_atmosphereMieCoefficient * mieAccumulation;\nopacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x))));\n}\nvec4 computeAtmosphereColor(\nvec3 positionWC,\nvec3 lightDirection,\nvec3 rayleighColor,\nvec3 mieColor,\nfloat opacity\n) {\nvec3 cameraToPositionWC = positionWC - czm_viewerPositionECEF;\nvec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\nfloat cosAngle = dot(cameraToPositionWCDirection, lightDirection);\nfloat cosAngleSq = cosAngle * cosAngle;\nfloat G = u_atmosphereMieAnisotropy;\nfloat GSq = G * G;\nfloat rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);\nfloat miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));\nvec3 rayleigh = rayleighPhase * rayleighColor;\nvec3 mie = miePhase * mieColor;\nvec3 color = (rayleigh + mie) * u_atmosphereLightIntensity;\nreturn vec4(color, opacity);\n}\n",x$6="float interpolateByDistance(vec4 nearFarScalar, float distance)\n{\nfloat startDistance = nearFarScalar.x;\nfloat startValue = nearFarScalar.y;\nfloat endDistance = nearFarScalar.z;\nfloat endValue = nearFarScalar.w;\nfloat t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\nreturn mix(startValue, endValue, t);\n}\nvec3 getLightDirection(vec3 positionWC)\n{\nfloat lightEnum = u_radiiAndDynamicAtmosphereColor.z;\nvec3 lightDirection =\npositionWC * float(lightEnum == 0.0) +\nczm_lightDirectionWC * float(lightEnum == 1.0) +\nczm_sunDirectionWC * float(lightEnum == 2.0);\nreturn normalize(lightDirection);\n}\nvoid computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity, out float underTranslucentGlobe)\n{\nfloat ellipsoidRadiiDifference = czm_ellipsoidRadii.x - czm_ellipsoidRadii.z;\nfloat distanceAdjustMin = czm_ellipsoidRadii.x / 4.0;\nfloat distanceAdjustMax = czm_ellipsoidRadii.x;\nfloat distanceAdjustModifier = ellipsoidRadiiDifference / 2.0;\nfloat distanceAdjust = distanceAdjustModifier * clamp((czm_eyeHeight - distanceAdjustMin) / (distanceAdjustMax - distanceAdjustMin), 0.0, 1.0);\nfloat radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust;\nfloat atmosphereInnerRadius = (length(czm_viewerPositionECEF) - czm_eyeHeight) - radiusAdjust;\nvec3 cameraToPositionWC = positionWC - czm_viewerPositionECEF;\nvec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);\nczm_ray primaryRay = czm_ray(czm_viewerPositionECEF, cameraToPositionWCDirection);\nunderTranslucentGlobe = 0.0;\n#if defined(GLOBE_TRANSLUCENT)\nczm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust);\nif (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) {\nvec3 direction = normalize(positionWC);\nczm_ray ellipsoidRay = czm_ray(positionWC, -direction);\nczm_raySegment ellipsoidIntersection = czm_rayEllipsoidIntersectionInterval(ellipsoidRay, vec3(0.0), czm_ellipsoidInverseRadii);\nvec3 onEarth = positionWC - (direction * ellipsoidIntersection.start);\nfloat angle = dot(normalize(czm_viewerPositionECEF), normalize(onEarth));\nopacity = interpolateByDistance(vec4(0.0, 1.0, czm_ellipsoidRadii.x, 0.0), length(czm_viewerPositionECEF - onEarth));\nvec3 horizonColor = vec3(0.1, 0.2, 0.3);\nvec3 nearColor = vec3(0.0);\nrayleighColor = mix(nearColor, horizonColor, exp(-angle) * opacity);\nunderTranslucentGlobe = 1.0;\nreturn;\n}\n#endif\ncomputeScattering(\nprimaryRay,\nlength(cameraToPositionWC),\nlightDirection,\natmosphereInnerRadius,\nrayleighColor,\nmieColor,\nopacity\n);\nfloat cameraHeight = czm_eyeHeight + atmosphereInnerRadius;\nfloat atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;\nopacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0);\nfloat nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;\nopacity *= pow(nightAlpha, 0.5);\n}\n",B$3="varying vec3 v_outerPositionWC;\nuniform vec3 u_hsbShift;\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\nvarying float v_opacity;\nvarying float v_translucent;\n#endif\nvoid main (void)\n{\nvec3 lightDirection = getLightDirection(v_outerPositionWC);\nvec3 mieColor;\nvec3 rayleighColor;\nfloat opacity;\nfloat translucent;\n#ifdef PER_FRAGMENT_ATMOSPHERE\ncomputeAtmosphereScattering(\nv_outerPositionWC,\nlightDirection,\nrayleighColor,\nmieColor,\nopacity,\ntranslucent\n);\n#else\nmieColor = v_mieColor;\nrayleighColor = v_rayleighColor;\nopacity = v_opacity;\ntranslucent = v_translucent;\n#endif\nvec4 color = computeAtmosphereColor(v_outerPositionWC, lightDirection, rayleighColor, mieColor, opacity);\n#ifndef HDR\ncolor.rgb = czm_acesTonemapping(color.rgb);\ncolor.rgb = czm_inverseGamma(color.rgb);\n#endif\n#ifdef COLOR_CORRECT\nvec3 hsb = czm_RGBToHSB(color.rgb);\nhsb.x += u_hsbShift.x;\nhsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0);\nhsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0;\ncolor.rgb = czm_HSBToRGB(hsb);\n#endif\nif (translucent == 0.0) {\ncolor.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime);\n}\ngl_FragColor = color;\n}\n",I$3="attribute vec4 position;\nvarying vec3 v_outerPositionWC;\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\nvarying float v_opacity;\nvarying float v_translucent;\n#endif\nvoid main(void)\n{\nvec4 positionWC = czm_model * position;\nvec3 lightDirection = getLightDirection(positionWC.xyz);\n#ifndef PER_FRAGMENT_ATMOSPHERE\ncomputeAtmosphereScattering(\npositionWC.xyz,\nlightDirection,\nv_rayleighColor,\nv_mieColor,\nv_opacity,\nv_translucent\n);\n#endif\nv_outerPositionWC = positionWC.xyz;\nvec4 realPosition = czm_model * position;\nrealPosition.xyz -= czm_relativeOrigin;\ngl_Position = czm_viewProjection * realPosition;\n}\n";function h$6(e){e=u$Z(e,t$12.WGS84),this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;const t=o$1p.multiplyByScalar(e.radii,1.025,new o$1p);this._scaleMatrix=p$1d.fromScale(t),this._modelMatrix=new p$1d,this._command=new i$$({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new o$1p(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new o$1p(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new o$1p;const i=new o$1p;i.x=1.025*e.maximumRadius,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;const n=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return n._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return n._hueSaturationBrightness.x=n.hueShift,n._hueSaturationBrightness.y=n.saturationShift,n._hueSaturationBrightness.z=n.brightnessShift,n._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return n.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return n.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return n.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return n.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return n.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return n.atmosphereMieAnisotropy}}}Object.defineProperties(h$6.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),h$6.prototype.setDynamicAtmosphereColor=function(e,t){const i=e?t?2:1:0;this._radiiAndDynamicAtmosphereColor.z=i};const u$6=new p$1d;function V$5(e){return!(e$2d.equalsEpsilon(e.hueShift,0,e$2d.EPSILON7)&&e$2d.equalsEpsilon(e.saturationShift,0,e$2d.EPSILON7)&&e$2d.equalsEpsilon(e.brightnessShift,0,e$2d.EPSILON7))}h$6.prototype.update=function(e,t){if(!this.show)return;const i=e.mode;if(i!==C$14.SCENE3D&&i!==C$14.MORPHING||!e.passes.render)return;const n=p$1d.fromRotationTranslation(e.context.uniformState.inverseViewRotation,o$1p.ZERO,u$6),r=p$1d.multiplyTransformation(n,v$y.Y_UP_TO_Z_UP,u$6),o=p$1d.multiply(this._scaleMatrix,r,u$6);p$1d.clone(o,this._modelMatrix);const a=e.context,s=V$5(this),l=e.globeTranslucencyState.translucent,u=this.perFragmentAtmosphere||l||!e$2e(t)||!t.show,c=this._command;if(!e$2e(c.vertexArray)){const e=b$O.createGeometry(new b$O({radii:new o$1p(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:n$13.POSITION_ONLY}));this._attributeLocations=k$14.createAttributeLocations(e),c.vertexArray=c$13.fromGeometry({context:a,geometry:e,attributeLocations:this._attributeLocations,bufferUsage:A$18.STATIC_DRAW}),c.renderState=d$1m.fromCache({cull:{enabled:!0,face:G$1a.FRONT},blending:Ee$r.ALPHA_BLEND,depthMask:!1})}const h=s|u<<2|l<<3;if(h!==this._flags){this._flags=h;const e=[];s&&e.push("COLOR_CORRECT"),u&&e.push("PER_FRAGMENT_ATMOSPHERE"),l&&e.push("GLOBE_TRANSLUCENT");const t=new s$V({name:"SkyAtmosphereVS",defines:e,sources:[g$8,x$6,I$3]}),i=new s$V({name:"SkyAtmosphereFS",defines:e,sources:[g$8,x$6,B$3]});this._spSkyAtmosphere=r$14.fromCache({context:a,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:this._attributeLocations}),c.shaderProgram=this._spSkyAtmosphere}return c},h$6.prototype.isDestroyed=function(){return!1},h$6.prototype.destroy=function(){const e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),i$11(this)};var J$2="uniform samplerCube u_cubeMap;\nuniform float u_alpha;\nvarying vec3 v_texCoord;\nvoid main()\n{\nvec4 color = textureCube(u_cubeMap, normalize(v_texCoord));\nfloat alpha = czm_sceneMode == czm_sceneModeColumbusView ? u_alpha : u_alpha * czm_morphTime;\ngl_FragColor = vec4(czm_gammaCorrect(color).rgb, alpha);\n}\n",$$3="attribute vec3 position;\nuniform mat3 u_rotateMatrix;\nvarying vec3 v_texCoord;\nvoid main()\n{\nif (czm_sceneMode == czm_sceneModeColumbusView) {\nvec3 worldPosition = czm_entireFrustum.y * position;\ngl_Position = czm_modelViewProjection * vec4(worldPosition, 1.0);\nvec3 texCoord = normalize(worldPosition);\nv_texCoord = texCoord.zxy;\n}\nelse{\nvec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\ngl_Position = czm_projection * vec4(p, 1.0);\nv_texCoord = position.xyz;\n}\n}\n";function h$5(e){LicenseChecker.LICENSECHECKER.verify("SkyBox"),this.sources=e.sources,this._sources=void 0,this.show=u$Z(e.show,!0),this._command=new i$$({modelMatrix:p$1d.clone(p$1d.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0,this.alpha=1,this._uSpeed=0,this._vSpeed=0,this._wSpeed=0,this._horizontalRotationAngle=0,this._axisChanged=!0,this.imageUrl=e.imageUrl,this._imageUrl=void 0,this._PreprocessCubeMap=void 0}function oe$3(e){return!(0!==e._horizontalRotationAngle||0!==e._wSpeed||0!==e._uSpeed||0!==e._vSpeed)}Object.defineProperties(h$5.prototype,{USpeed:{get:function(){return this._uSpeed},set:function(e){o$1q.typeOf.number("SkyBox.uSpeed",e),this._uSpeed=e,this._axisChanged=!0}},VSpeed:{get:function(){return this._vSpeed},set:function(e){o$1q.typeOf.number("SkyBox.vSpeed",e),this._vSpeed=e,this._axisChanged=!0}},WSpeed:{get:function(){return this._wSpeed},set:function(e){o$1q.typeOf.number("SkyBox.wSpeed",e),this._wSpeed=e,this._axisChanged=!0}},horizontalRotationAngle:{get:function(){return this._horizontalRotationAngle},set:function(e){o$1q.typeOf.number("SkyBox.horizontalRotationAngle",e),this._horizontalRotationAngle=e,this._axisChanged=!0}}});var ae$2=new o$1p,S$2=new o$1p,w$3=new o$1p,C$5=new o$1p,ne$3=new o$1p(1,1,1),A$8=new n$15,d$b=new o$1p,P$5=0,R$4=p$1d.IDENTITY.clone(new p$1d);function t$8(){}h$5.prototype.update=function(e,t){oe$3(this)||LicenseChecker.LICENSECHECKER.verify("SkyBox");var i=this;if(this.show&&(e.mode===C$14.SCENE3D||e.mode===C$14.COLUMBUS_VIEW||e.mode===C$14.MORPHING)&&e.passes.render){var n=e.context;if(this._sources!==this.sources){this._sources=this.sources;var r=this.sources;if(!(e$2e(r.positiveX)&&e$2e(r.negativeX)&&e$2e(r.positiveY)&&e$2e(r.negativeY)&&e$2e(r.positiveZ)&&e$2e(r.negativeZ)))throw new t$15("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof r.positiveX!=typeof r.negativeX||typeof r.positiveX!=typeof r.positiveY||typeof r.positiveX!=typeof r.negativeY||typeof r.positiveX!=typeof r.positiveZ||typeof r.positiveX!=typeof r.negativeZ)throw new t$15("this.sources properties must all be the same type.");"string"==typeof r.positiveX?d$q(n,this._sources).then((function(e){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=e})):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new e$1P({context:n,source:r}))}this._imageUrl!==this.imageUrl&&!this._sources&&(this._imageUrl=this.imageUrl,this._PreprocessCubeMap=new b$s(n,this._imageUrl)),e$2e(this._PreprocessCubeMap)&&(this._PreprocessCubeMap.update(e),this._PreprocessCubeMap.ready&&(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=this._PreprocessCubeMap.cubeMap,this._PreprocessCubeMap=void 0));var o=this._command;if(e.mode===C$14.COLUMBUS_VIEW?o.modelMatrix=e.camera._actualInvTransform:o.modelMatrix=m$19.eastNorthUpToFixedFrame(e.camera._positionWC),o.removeAllFastBundleAndBindGroups(),this._axisChanged){var a=p$1d.multiplyByPoint(o.modelMatrix,o$1p.ZERO,ae$2),s=p$1d.multiplyByPoint(o.modelMatrix,o$1p.UNIT_X,S$2),l=p$1d.multiplyByPoint(o.modelMatrix,o$1p.UNIT_Y,w$3),u=p$1d.multiplyByPoint(o.modelMatrix,o$1p.UNIT_Z,C$5),c=o$1p.subtract(s,a,S$2),h=o$1p.subtract(l,a,w$3),d=o$1p.subtract(u,a,C$5),f=n$15.fromAxisAngle(c,this._uSpeed*performance.now()/1e5),p=n$15.fromAxisAngle(h,this._vSpeed*performance.now()/1e5),_=n$15.fromAxisAngle(d,this._wSpeed*performance.now()/1e5);this._horizontalRotationAngle&&(_=n$15.fromAxisAngle(d,this._horizontalRotationAngle));var m=n$15.multiply(f,n$15.multiply(p,_,A$8),A$8);d$b=n$15.computeAxis(m,d$b),P$5=Math.max(Math.max(Math.abs(this._uSpeed),Math.abs(this._vSpeed)),Math.abs(this._wSpeed)),this._axisChanged=!1}var g=p$1d.IDENTITY.clone(R$4);if(!o$1p.equals(d$b,o$1p.ZERO)&&!e.camera.bReflect){var x=P$5*performance.now()/1e5;this._horizontalRotationAngle&&(x=this._horizontalRotationAngle),g=p$1d.fromTranslationQuaternionRotationScale(o$1p.ZERO,n$15.fromAxisAngle(d$b,x),ne$3,R$4),p$1d.multiply(g,o.modelMatrix,o.modelMatrix)}if(!e$2e(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return i._cubeMap},u_rotateMatrix:function(){return p$1d.getRotation(o.modelMatrix,new p$1e)},u_alpha:function(){return i.alpha}};var y=O$z.createGeometry(O$z.fromDimensions({dimensions:new o$1p(2,2,2),vertexFormat:n$13.POSITION_ONLY})),v=this._attributeLocations=k$14.createAttributeLocations(y);o.vertexArray=c$13.fromGeometry({context:n,geometry:y,attributeLocations:v,bufferUsage:A$18.STATIC_DRAW}),o.renderState=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND})}if(!e$2e(o.shaderProgram)||this._useHdr!==t){var $=new s$V({defines:[t?"HDR":""],sources:[J$2]});o.shaderProgram=r$14.fromCache({name:"spSkyBox",context:n,vertexShaderSource:$$3,fragmentShaderSource:$,attributeLocations:this._attributeLocations}),this._useHdr=t}if(e$2e(this._cubeMap))return o}},h$5.prototype.isDestroyed=function(){return!1},h$5.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),i$11(this)},t$8.prototype.evaluate=function(e,t){t$15.throwInstantiationError()},t$8.prototype.evaluateColor=function(e,t){t$15.throwInstantiationError()},t$8.prototype.getShaderFunction=function(e,t,i,n){t$15.throwInstantiationError()};var rt$3="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color = texture2D(u_texture, v_textureCoordinates);\ngl_FragColor = czm_gammaCorrect(color);\n}\n",et$2="uniform float u_radiusTS;\nvarying vec2 v_textureCoordinates;\nvec2 rotate(vec2 p, vec2 direction)\n{\nreturn vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);\n}\nvec4 addBurst(vec2 position, vec2 direction, float lengthScalar)\n{\nvec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);\nfloat radius = length(rotatedPosition) * lengthScalar;\nfloat burst = 1.0 - smoothstep(0.0, 0.55, radius);\nreturn vec4(burst);\n}\nvoid main()\n{\nfloat lengthScalar = 2.0 / sqrt(2.0);\nvec2 position = v_textureCoordinates - vec2(0.5);\nfloat radius = length(position) * lengthScalar;\nfloat surface = step(radius, u_radiusTS);\nvec4 color = vec4(vec2(1.0), surface + 0.2, surface);\nfloat glow = 1.0 - smoothstep(0.0, 0.55, radius);\ncolor.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;\nvec4 burst = vec4(0.0);\nburst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar);\nburst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar);\nburst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar);\ncolor += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;\ngl_FragColor = clamp(color, vec4(0.0), vec4(1.0));\n}\n",it$1="attribute vec2 direction;\nuniform float u_size;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 position;\nif (czm_morphTime == 1.0)\n{\nposition = vec4(czm_sunPositionWC, 1.0);\n}\nelse\n{\nposition = vec4(czm_sunPositionColumbusView.zxy, 1.0);\n}\nvec4 positionEC = czm_view * position;\nvec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\nvec2 halfSize = vec2(u_size * 0.5);\nhalfSize *= ((direction * 2.0) - 1.0);\ngl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);\nv_textureCoordinates = direction;\n}\n",nt$2="attribute direction : vec2<f32>;\n\nuniform u_size : f32;\n\nvarying v_textureCoordinates : vec2<f32>;\n\n@vertex\nfn main(input : VertexInputs) -> FragmentInputs { \n var position : vec4<f32>;\n if (uniforms.czm_morphTime == 1.0)\n {\n position = vec4<f32>(uniforms.czm_sunPositionWC, 1.0);\n }\n else\n {\n position = vec4<f32>(uniforms.czm_sunPositionColumbusView.zxy, 1.0);\n }\n \n var positionEC = uniforms.czm_view * position;\n var positionWC = czm_eyeToWindowCoordinates(positionEC);\n \n var halfSize = vec2<f32>(uniforms.u_size * 0.5);\n halfSize *= ((direction * 2.0) - 1.0);\n \n gl_Position = uniforms.czm_viewportOrthographic * vec4<f32>(positionWC.xy + halfSize, -positionWC.z, 1.0);\n \n v_textureCoordinates = direction;\n}\n",at$3="\nvar u_texture : texture_2d<f32>;\nvar u_textureSampler : sampler;\n\nvarying v_textureCoordinates : vec2<f32>;\n\nfn gammaCorrect(color : vec4<f32>) -> vec4<f32>\n{\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3(uniforms.czm_gamma));\n#endif\n return color;\n}\n\n@fragment\nfn main(input : FragmentInputs) -> FragmentOutputs {\n var color = textureSample(u_texture, u_textureSampler, v_textureCoordinates);\n gl_FragColor = gammaCorrect(color);\n}\n";function u$5(){this.show=!0,this._drawCommand=new i$$({primitiveType:W$18.TRIANGLES,boundingVolume:new i$1d,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new i$1d,this._boundingVolume2D=new i$1d,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;var e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(u$5.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var ut$3=new o$1o,st$1=new o$1o,dt$2=new e$2c,s$8=new e$2c;u$5.prototype.update=function(e,t,i){if(this.show){var n=e.mode;if(n!==C$14.SCENE2D&&n!==C$14.MORPHING&&e.passes.render){var r=e.context,o=t.viewport.width,a=t.viewport.height;if(!e$2e(this._texture)||o!==this._drawingBufferWidth||a!==this._drawingBufferHeight||this._glowFactorDirty||i!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=o,this._drawingBufferHeight=a,this._glowFactorDirty=!1,this._useHdr=i;var s=Math.max(o,a);s=Math.pow(2,Math.ceil(Math.log(s)/Math.log(2))-2),s=Math.max(1,s);var l=i?r.halfFloatingPointTexture?_$_.HALF_FLOAT:_$_.FLOAT:_$_.UNSIGNED_BYTE;this._texture=new t$U({context:r,width:s,height:s,pixelFormat:V$12.RGBA,pixelDatatype:l}),this._glowLengthTS=5*this._glowFactor,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;var u=this,c={u_radiusTS:function(){return u._radiusTS}},h=r$14.fromCache({name:"SunTextureSP",context:r,vertexShaderSource:ot$8,fragmentShaderSource:et$2,attributeLocations:{aPosition:0,textureCoordinates:1}});this._commands.computeCommand=new t$H({name:"Sun",shaderProgram:h,outputTexture:this._texture,uniformMap:c,persists:!1,owner:this,postExecute:function(){u._commands.computeCommand.shaderProgram._isReady()&&(u._commands.computeCommand=void 0)}})}var d=this._drawCommand;if(!e$2e(d.vertexArray)){var f={direction:0},p=new Float32Array(8);p[0]=0,p[1]=0,p[2]=255,p[3]=0,p[4]=255,p[5]=255,p[6]=0,p[7]=255;var _=t$X.createVertexBuffer({context:r,typedArray:p,usage:A$18.STATIC_DRAW}),m=[{name:"direction",index:f.direction,vertexBuffer:_,componentsPerAttribute:2,normalize:!0,componentDatatype:S$14.FLOAT}],g=t$X.createIndexBuffer({context:r,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT});d.vertexArray=new c$13({context:r,attributes:m,indexBuffer:g}),d.shaderProgram=r$14.fromCache({name:"spSun",context:r,vertexShaderSource:r.webgpu?nt$2:it$1,fragmentShaderSource:r.webgpu?at$3:rt$3,attributeLocations:f,useWGSL:r.webgpu}),d.renderState=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND}),d.uniformMap=this._uniformMap}var x=r.uniformState.sunPositionWC,y=r.uniformState.sunPositionColumbusView,v=this._boundingVolume,$=this._boundingVolume2D;o$1p.clone(x,v.center),$.center.x=y.z,$.center.y=y.x,$.center.z=y.y,v.radius=e$2d.SOLAR_RADIUS+e$2d.SOLAR_RADIUS*this._glowLengthTS,$.radius=v.radius,n===C$14.SCENE3D?i$1d.clone(v,d.boundingVolume):n===C$14.COLUMBUS_VIEW&&i$1d.clone($,d.boundingVolume);var b=s$R.computeActualWgs84Position(e,x,s$8),T=o$1p.magnitude(o$1p.subtract(b,e.camera.position,s$8)),C=r.uniformState.projection,S=dt$2;S.x=0,S.y=0,S.z=-T,S.w=1;var w=p$1d.multiplyByVector(C,S,s$8),E=s$R.clipToGLWindowCoordinates(t.viewport,w,ut$3);S.x=e$2d.SOLAR_RADIUS;var P=p$1d.multiplyByVector(C,S,s$8),A=s$R.clipToGLWindowCoordinates(t.viewport,P,st$1);return this._size=o$1o.magnitude(o$1o.subtract(A,E,s$8)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands}}},u$5.prototype.isDestroyed=function(){return!1},u$5.prototype.destroy=function(){var e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),i$11(this)};var L$7=null;try{L$7=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function s$7(e,t,i){this.low=0|e,this.high=0|t,this.unsigned=!!i}function l$8(e){return!0===(e&&e.__isLong__)}s$7.prototype.__isLong__,Object.defineProperty(s$7.prototype,"__isLong__",{value:!0}),s$7.isLong=l$8;var M$4={},R$3={};function d$a(e,t){var i,n,r;return t?(r=0<=(e>>>=0)&&e<256)&&(n=R$3[e])?n:(i=e$1(e,(0|e)<0?-1:0,!0),r&&(R$3[e]=i),i):(r=-128<=(e|=0)&&e<128)&&(n=M$4[e])?n:(i=e$1(e,e<0?-1:0,!1),r&&(M$4[e]=i),i)}function v$5(e,t){if(isNaN(e))return t?U$5:q$3;if(t){if(e<0)return U$5;if(e>=Z$5)return H$4}else{if(e<=-P$4)return c$a;if(e+1>=P$4)return D$3}return e<0?v$5(-e,t).neg():e$1(e%T$6|0,e/T$6|0,t)}function e$1(e,t,i){return new s$7(e,t,i)}s$7.fromInt=d$a,s$7.fromNumber=v$5,s$7.fromBits=e$1;var x$5=Math.pow;function I$2(e,t,i){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return q$3;if("number"==typeof t?(i=t,t=!1):t=!!t,(i=i||10)<2||36<i)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return I$2(e.substring(1),t,i).neg();for(var r=v$5(x$5(i,8)),o=q$3,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),l=parseInt(e.substring(a,a+s),i);if(s<8){var u=v$5(x$5(i,s));o=o.mul(u).add(v$5(l))}else o=(o=o.mul(r)).add(v$5(l))}return o.unsigned=t,o}function O$4(e,t){return"number"==typeof e?v$5(e,t):"string"==typeof e?I$2(e,t):e$1(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}s$7.fromString=I$2,s$7.fromValue=O$4;var W$5=65536,C$4=1<<24,T$6=W$5*W$5,Z$5=T$6*T$6,P$4=Z$5/2,S$1=d$a(C$4),q$3=d$a(0);s$7.ZERO=q$3;var U$5=d$a(0,!0);s$7.UZERO=U$5;var b$8=d$a(1);s$7.ONE=b$8;var V$4=d$a(1,!0);s$7.UONE=V$4;var A$7=d$a(-1);s$7.NEG_ONE=A$7;var D$3=e$1(-1,2147483647,!1);s$7.MAX_VALUE=D$3;var H$4=e$1(-1,-1,!0);s$7.MAX_UNSIGNED_VALUE=H$4;var c$a=e$1(0,-2147483648,!1);s$7.MIN_VALUE=c$a;var h$4=s$7.prototype;h$4.toInt=function(){return this.unsigned?this.low>>>0:this.low},h$4.toNumber=function(){return this.unsigned?(this.high>>>0)*T$6+(this.low>>>0):this.high*T$6+(this.low>>>0)},h$4.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(c$a)){var t=v$5(e),i=this.div(t),n=i.mul(t).sub(this);return i.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var r=v$5(x$5(e,6),this.unsigned),o=this,a="";;){var s=o.div(r),l=(o.sub(s.mul(r)).toInt()>>>0).toString(e);if((o=s).isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},h$4.getHighBits=function(){return this.high},h$4.getHighBitsUnsigned=function(){return this.high>>>0},h$4.getLowBits=function(){return this.low},h$4.getLowBitsUnsigned=function(){return this.low>>>0},h$4.getNumBitsAbs=function(){if(this.isNegative())return this.eq(c$a)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},h$4.isZero=function(){return 0===this.high&&0===this.low},h$4.eqz=h$4.isZero,h$4.isNegative=function(){return!this.unsigned&&this.high<0},h$4.isPositive=function(){return this.unsigned||this.high>=0},h$4.isOdd=function(){return 1==(1&this.low)},h$4.isEven=function(){return 0==(1&this.low)},h$4.equals=function(e){return l$8(e)||(e=O$4(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},h$4.eq=h$4.equals,h$4.notEquals=function(e){return!this.eq(e)},h$4.neq=h$4.notEquals,h$4.ne=h$4.notEquals,h$4.lessThan=function(e){return this.comp(e)<0},h$4.lt=h$4.lessThan,h$4.lessThanOrEqual=function(e){return this.comp(e)<=0},h$4.lte=h$4.lessThanOrEqual,h$4.le=h$4.lessThanOrEqual,h$4.greaterThan=function(e){return this.comp(e)>0},h$4.gt=h$4.greaterThan,h$4.greaterThanOrEqual=function(e){return this.comp(e)>=0},h$4.gte=h$4.greaterThanOrEqual,h$4.ge=h$4.greaterThanOrEqual,h$4.compare=function(e){if(l$8(e)||(e=O$4(e)),this.eq(e))return 0;var t=this.isNegative(),i=e.isNegative();return t&&!i?-1:!t&&i?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},h$4.comp=h$4.compare,h$4.negate=function(){return!this.unsigned&&this.eq(c$a)?c$a:this.not().add(b$8)},h$4.neg=h$4.negate,h$4.add=function(e){l$8(e)||(e=O$4(e));var t=this.high>>>16,i=65535&this.high,n=this.low>>>16,r=65535&this.low,o=e.high>>>16,a=65535&e.high,s=e.low>>>16,l=0,u=0,c=0,h=0;return c+=(h+=r+(65535&e.low))>>>16,u+=(c+=n+s)>>>16,l+=(u+=i+a)>>>16,l+=t+o,e$1((c&=65535)<<16|(h&=65535),(l&=65535)<<16|(u&=65535),this.unsigned)},h$4.subtract=function(e){return l$8(e)||(e=O$4(e)),this.add(e.neg())},h$4.sub=h$4.subtract,h$4.multiply=function(e){if(this.isZero())return q$3;if(l$8(e)||(e=O$4(e)),L$7)return e$1(L$7.mul(this.low,this.high,e.low,e.high),L$7.get_high(),this.unsigned);if(e.isZero())return q$3;if(this.eq(c$a))return e.isOdd()?c$a:q$3;if(e.eq(c$a))return this.isOdd()?c$a:q$3;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(S$1)&&e.lt(S$1))return v$5(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,i=65535&this.high,n=this.low>>>16,r=65535&this.low,o=e.high>>>16,a=65535&e.high,s=e.low>>>16,l=65535&e.low,u=0,c=0,h=0,d=0;return h+=(d+=r*l)>>>16,c+=(h+=n*l)>>>16,h&=65535,c+=(h+=r*s)>>>16,u+=(c+=i*l)>>>16,c&=65535,u+=(c+=n*s)>>>16,c&=65535,u+=(c+=r*a)>>>16,u+=t*l+i*s+n*a+r*o,e$1((h&=65535)<<16|(d&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},h$4.mul=h$4.multiply,h$4.divide=function(e){if(l$8(e)||(e=O$4(e)),e.isZero())throw Error("division by zero");var t,i,n;if(L$7)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?e$1((this.unsigned?L$7.div_u:L$7.div_s)(this.low,this.high,e.low,e.high),L$7.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?U$5:q$3;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return U$5;if(e.gt(this.shru(1)))return V$4;n=U$5}else{if(this.eq(c$a))return e.eq(b$8)||e.eq(A$7)?c$a:e.eq(c$a)?b$8:(t=this.shr(1).div(e).shl(1)).eq(q$3)?e.isNegative()?b$8:A$7:(i=this.sub(e.mul(t)),n=t.add(i.div(e)));if(e.eq(c$a))return this.unsigned?U$5:q$3;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=q$3}for(i=this;i.gte(e);){t=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var r=Math.ceil(Math.log(t)/Math.LN2),o=r<=48?1:x$5(2,r-48),a=v$5(t),s=a.mul(e);s.isNegative()||s.gt(i);)s=(a=v$5(t-=o,this.unsigned)).mul(e);a.isZero()&&(a=b$8),n=n.add(a),i=i.sub(s)}return n},h$4.div=h$4.divide,h$4.modulo=function(e){return l$8(e)||(e=O$4(e)),L$7?e$1((this.unsigned?L$7.rem_u:L$7.rem_s)(this.low,this.high,e.low,e.high),L$7.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},h$4.mod=h$4.modulo,h$4.rem=h$4.modulo,h$4.not=function(){return e$1(~this.low,~this.high,this.unsigned)},h$4.and=function(e){return l$8(e)||(e=O$4(e)),e$1(this.low&e.low,this.high&e.high,this.unsigned)},h$4.or=function(e){return l$8(e)||(e=O$4(e)),e$1(this.low|e.low,this.high|e.high,this.unsigned)},h$4.xor=function(e){return l$8(e)||(e=O$4(e)),e$1(this.low^e.low,this.high^e.high,this.unsigned)},h$4.shiftLeft=function(e){return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$1(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):e$1(0,this.low<<e-32,this.unsigned)},h$4.shl=h$4.shiftLeft,h$4.shiftRight=function(e){return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$1(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):e$1(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},h$4.shr=h$4.shiftRight,h$4.shiftRightUnsigned=function(e){return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?e$1(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):e$1(32===e?this.high:this.high>>>e-32,0,this.unsigned)},h$4.shru=h$4.shiftRightUnsigned,h$4.shr_u=h$4.shiftRightUnsigned,h$4.rotateLeft=function(e){var t;return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?e$1(this.high,this.low,this.unsigned):e<32?(t=32-e,e$1(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),e$1(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},h$4.rotl=h$4.rotateLeft,h$4.rotateRight=function(e){var t;return l$8(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?e$1(this.high,this.low,this.unsigned):e<32?(t=32-e,e$1(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),e$1(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},h$4.rotr=h$4.rotateRight,h$4.toSigned=function(){return this.unsigned?e$1(this.low,this.high,!1):this},h$4.toUnsigned=function(){return this.unsigned?this:e$1(this.low,this.high,!0)},h$4.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},h$4.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},h$4.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},s$7.fromBytes=function(e,t,i){return i?s$7.fromBytesLE(e,t):s$7.fromBytesBE(e,t)},s$7.fromBytesLE=function(e,t){return new s$7(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},s$7.fromBytesBE=function(e,t){return new s$7(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var u$4=function(e,t,i){if(typeof e>"u"&&(e=u$4.DEFAULT_CAPACITY),typeof t>"u"&&(t=u$4.DEFAULT_ENDIAN),typeof i>"u"&&(i=u$4.DEFAULT_NOASSERT),!i){if((e|=0)<0)throw RangeError("Illegal capacity");t=!!t,i=!!i}this.buffer=0===e?x$4:new ArrayBuffer(e),this.view=0===e?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=e,this.littleEndian=t,this.noAssert=i};u$4.VERSION="5.0.1",u$4.LITTLE_ENDIAN=!0,u$4.BIG_ENDIAN=!1,u$4.DEFAULT_CAPACITY=16,u$4.DEFAULT_ENDIAN=u$4.BIG_ENDIAN,u$4.DEFAULT_NOASSERT=!1,u$4.Long=s$7||null;var l$7=u$4.prototype;l$7.__isByteBuffer__,Object.defineProperty(l$7,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var x$4=new ArrayBuffer(0),I$1=String.fromCharCode;function c$9(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function d$9(){var e=[],t=[];return function(){if(0===arguments.length)return t.join("")+I$1.apply(String,e);e.length+arguments.length>1024&&(t.push(I$1.apply(String,e)),e.length=0),Array.prototype.push.apply(e,arguments)}}function E$4(e,t,i,n,r){var o,a,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=i?r-1:0,d=i?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)}function m$7(e,t,i,n,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,r),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;e[i+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;e[i+f]=255&a,f+=p,a/=256,u-=8);e[i+f-p]|=128*_}u$4.accessor=function(){return Uint8Array},u$4.allocate=function(e,t,i){return new u$4(e,t,i)},u$4.concat=function(e,t,i,n){("boolean"==typeof t||"string"!=typeof t)&&(n=i,i=t,t=void 0);for(var r,o=0,a=0,s=e.length;a<s;++a)u$4.isByteBuffer(e[a])||(e[a]=u$4.wrap(e[a],t)),(r=e[a].limit-e[a].offset)>0&&(o+=r);if(0===o)return new u$4(0,i,n);var l,u=new u$4(o,i,n);for(a=0;a<s;)!((r=(l=e[a++]).limit-l.offset)<=0)&&(u.view.set(l.view.subarray(l.offset,l.limit),u.offset),u.offset+=r);return u.limit=u.offset,u.offset=0,u},u$4.isByteBuffer=function(e){return!0===(e&&e.__isByteBuffer__)},u$4.type=function(){return ArrayBuffer},u$4.wrap=function(e,t,i,n){if("string"!=typeof t&&(n=i,i=t,t=void 0),"string"==typeof e)switch(typeof t>"u"&&(t="utf8"),t){case"base64":return u$4.fromBase64(e,i);case"hex":return u$4.fromHex(e,i);case"binary":return u$4.fromBinary(e,i);case"utf8":return u$4.fromUTF8(e,i);case"debug":return u$4.fromDebug(e,i);default:throw Error("Unsupported encoding: "+t)}if(null===e||"object"!=typeof e)throw TypeError("Illegal buffer");var r;if(u$4.isByteBuffer(e))return(r=l$7.clone.call(e)).markedOffset=-1,r;if(e instanceof Uint8Array)r=new u$4(0,i,n),e.length>0&&(r.buffer=e.buffer,r.offset=e.byteOffset,r.limit=e.byteOffset+e.byteLength,r.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)r=new u$4(0,i,n),e.byteLength>0&&(r.buffer=e,r.offset=0,r.limit=e.byteLength,r.view=e.byteLength>0?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");(r=new u$4(e.length,i,n)).limit=e.length;for(var o=0;o<e.length;++o)r.view[o]=e[o]}return r},l$7.writeBitSet=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t,o=e.length,a=o>>3,s=0;for(t+=this.writeVarint32(o,t);a--;)n=1&!!e[s++]|(1&!!e[s++])<<1|(1&!!e[s++])<<2|(1&!!e[s++])<<3|(1&!!e[s++])<<4|(1&!!e[s++])<<5|(1&!!e[s++])<<6|(1&!!e[s++])<<7,this.writeByte(n,t++);if(s<o){var l=0;for(n=0;s<o;)n|=(1&!!e[s++])<<l++;this.writeByte(n,t++)}return i?(this.offset=t,this):t-r},l$7.readBitSet=function(e){var t=typeof e>"u";t&&(e=this.offset);var i,n=this.readVarint32(e),r=n.value,o=r>>3,a=0,s=[];for(e+=n.length;o--;)i=this.readByte(e++),s[a++]=!!(1&i),s[a++]=!!(2&i),s[a++]=!!(4&i),s[a++]=!!(8&i),s[a++]=!!(16&i),s[a++]=!!(32&i),s[a++]=!!(64&i),s[a++]=!!(128&i);if(a<r){var l=0;for(i=this.readByte(e++);a<r;)s[a++]=!!(i>>l++&1)}return t&&(this.offset=e),s},l$7.readBytes=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}var n=this.slice(t,t+e);return i&&(this.offset+=e),n},l$7.writeBytes=l$7.append,l$7.writeInt8=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=1,this.view[t]=e,i&&(this.offset+=1),this},l$7.writeByte=l$7.writeInt8,l$7.readInt8=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=this.view[e];return 128==(128&i)&&(i=-(255-i+1)),t&&(this.offset+=1),i},l$7.readByte=l$7.readInt8,l$7.writeUint8=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=1,this.view[t]=e,i&&(this.offset+=1),this},l$7.writeUInt8=l$7.writeUint8,l$7.readUint8=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=this.view[e];return t&&(this.offset+=1),i},l$7.readUInt8=l$7.readUint8,l$7.writeInt16=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),i&&(this.offset+=2),this},l$7.writeShort=l$7.writeInt16,l$7.readInt16=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e],i|=this.view[e+1]<<8):(i=this.view[e]<<8,i|=this.view[e+1]),32768==(32768&i)&&(i=-(65535-i+1)),t&&(this.offset+=2),i},l$7.readShort=l$7.readInt16,l$7.writeUint16=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),i&&(this.offset+=2),this},l$7.writeUInt16=l$7.writeUint16,l$7.readUint16=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e],i|=this.view[e+1]<<8):(i=this.view[e]<<8,i|=this.view[e+1]),t&&(this.offset+=2),i},l$7.readUInt16=l$7.readUint16,l$7.writeInt32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),i&&(this.offset+=4),this},l$7.writeInt=l$7.writeInt32,l$7.readInt32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0),i|=0,t&&(this.offset+=4),i},l$7.readInt=l$7.readInt32,l$7.writeUint32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),i&&(this.offset+=4),this},l$7.writeUInt32=l$7.writeUint32,l$7.readUint32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0),t&&(this.offset+=4),i},l$7.readUInt32=l$7.readUint32,s$7&&(l$7.writeInt64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s$7.fromNumber(e);else if("string"==typeof e)e=s$7.fromString(e);else if(!(e&&e instanceof s$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s$7.fromNumber(e):"string"==typeof e&&(e=s$7.fromString(e)),t+=8;var n=this.buffer.byteLength;t>n&&this.resize((n*=2)>t?n:t),t-=8;var r=e.low,o=e.high;return this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=o>>>24&255,this.view[t+2]=o>>>16&255,this.view[t+1]=o>>>8&255,this.view[t]=255&o):(this.view[t]=o>>>24&255,this.view[t+1]=o>>>16&255,this.view[t+2]=o>>>8&255,this.view[t+3]=255&o,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),i&&(this.offset+=8),this},l$7.writeLong=l$7.writeInt64,l$7.readInt64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=0,n=0;this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0);var r=new s$7(i,n,!1);return t&&(this.offset+=8),r},l$7.readLong=l$7.readInt64,l$7.writeUint64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s$7.fromNumber(e);else if("string"==typeof e)e=s$7.fromString(e);else if(!(e&&e instanceof s$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s$7.fromNumber(e):"string"==typeof e&&(e=s$7.fromString(e)),t+=8;var n=this.buffer.byteLength;t>n&&this.resize((n*=2)>t?n:t),t-=8;var r=e.low,o=e.high;return this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=o>>>24&255,this.view[t+2]=o>>>16&255,this.view[t+1]=o>>>8&255,this.view[t]=255&o):(this.view[t]=o>>>24&255,this.view[t+1]=o>>>16&255,this.view[t+2]=o>>>8&255,this.view[t+3]=255&o,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),i&&(this.offset+=8),this},l$7.writeUInt64=l$7.writeUint64,l$7.readUint64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=0,n=0;this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0);var r=new s$7(i,n,!0);return t&&(this.offset+=8),r},l$7.readUInt64=l$7.readUint64),l$7.writeFloat32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,m$7(this.view,e,t,this.littleEndian,23,4),i&&(this.offset+=4),this},l$7.writeFloat=l$7.writeFloat32,l$7.readFloat32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=E$4(this.view,e,this.littleEndian,23,4);return t&&(this.offset+=4),i},l$7.readFloat=l$7.readFloat32,l$7.writeFloat64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=8,m$7(this.view,e,t,this.littleEndian,52,8),i&&(this.offset+=8),this},l$7.writeDouble=l$7.writeFloat64,l$7.readFloat64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=E$4(this.view,e,this.littleEndian,52,8);return t&&(this.offset+=8),i},l$7.readDouble=l$7.readFloat64,u$4.MAX_VARINT32_BYTES=5,u$4.calculateVarint32=function(e){return(e>>>=0)<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},u$4.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},u$4.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},l$7.writeVarint32=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=u$4.calculateVarint32(e);t+=r;var o=this.buffer.byteLength;for(t>o&&this.resize((o*=2)>t?o:t),t-=r,e>>>=0;e>=128;)n=127&e|128,this.view[t++]=n,e>>>=7;return this.view[t++]=e,i?(this.offset=t,this):r},l$7.writeVarint32ZigZag=function(e,t){return this.writeVarint32(u$4.zigZagEncode32(e),t)},l$7.readVarint32=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,n=0,r=0;do{if(!this.noAssert&&e>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}i=this.view[e++],n<5&&(r|=(127&i)<<7*n),++n}while(0!=(128&i));return r|=0,t?(this.offset=e,r):{value:r,length:n}},l$7.readVarint32ZigZag=function(e){var t=this.readVarint32(e);return"object"==typeof t?t.value=u$4.zigZagDecode32(t.value):t=u$4.zigZagDecode32(t),t},s$7&&(u$4.MAX_VARINT64_BYTES=10,u$4.calculateVarint64=function(e){"number"==typeof e?e=s$7.fromNumber(e):"string"==typeof e&&(e=s$7.fromString(e));var t=e.toInt()>>>0,i=e.shiftRightUnsigned(28).toInt()>>>0,n=e.shiftRightUnsigned(56).toInt()>>>0;return 0==n?0==i?t<16384?t<128?1:2:t<1<<21?3:4:i<16384?i<128?5:6:i<1<<21?7:8:n<128?9:10},u$4.zigZagEncode64=function(e){return"number"==typeof e?e=s$7.fromNumber(e,!1):"string"==typeof e?e=s$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},u$4.zigZagDecode64=function(e){return"number"==typeof e?e=s$7.fromNumber(e,!1):"string"==typeof e?e=s$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(s$7.ONE).toSigned().negate()).toSigned()},l$7.writeVarint64=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s$7.fromNumber(e);else if("string"==typeof e)e=s$7.fromString(e);else if(!(e&&e instanceof s$7))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s$7.fromNumber(e,!1):"string"==typeof e?e=s$7.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned());var n=u$4.calculateVarint64(e),r=e.toInt()>>>0,o=e.shiftRightUnsigned(28).toInt()>>>0,a=e.shiftRightUnsigned(56).toInt()>>>0;t+=n;var s=this.buffer.byteLength;switch(t>s&&this.resize((s*=2)>t?s:t),t-=n,n){case 10:this.view[t+9]=a>>>7&1;case 9:this.view[t+8]=9!==n?128|a:127&a;case 8:this.view[t+7]=8!==n?o>>>21|128:o>>>21&127;case 7:this.view[t+6]=7!==n?o>>>14|128:o>>>14&127;case 6:this.view[t+5]=6!==n?o>>>7|128:o>>>7&127;case 5:this.view[t+4]=5!==n?128|o:127&o;case 4:this.view[t+3]=4!==n?r>>>21|128:r>>>21&127;case 3:this.view[t+2]=3!==n?r>>>14|128:r>>>14&127;case 2:this.view[t+1]=2!==n?r>>>7|128:r>>>7&127;case 1:this.view[t]=1!==n?128|r:127&r}return i?(this.offset+=n,this):n},l$7.writeVarint64ZigZag=function(e,t){return this.writeVarint64(u$4.zigZagEncode64(e),t)},l$7.readVarint64=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=e,n=0,r=0,o=0,a=0;if(n=127&(a=this.view[e++]),128&a&&(n|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&typeof a>"u")&&(n|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&typeof a>"u")&&(n|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&typeof a>"u")&&(r=127&(a=this.view[e++]),(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&typeof a>"u")&&(r|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&typeof a>"u")&&(o=127&(a=this.view[e++]),(128&a||this.noAssert&&typeof a>"u")&&(o|=(127&(a=this.view[e++]))<<7,128&a||this.noAssert&&typeof a>"u"))))))))))throw Error("Buffer overrun");var s=s$7.fromBits(n|r<<28,r>>>4|o<<24,!1);return t?(this.offset=e,s):{value:s,length:e-i}},l$7.readVarint64ZigZag=function(e){var t=this.readVarint64(e);return t&&t.value instanceof s$7?t.value=u$4.zigZagDecode64(t.value):t=u$4.zigZagDecode64(t),t}),l$7.writeCString=function(e,t){var i=typeof t>"u";i&&(t=this.offset);var n,r=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(n=0;n<r;++n)if(0===e.charCodeAt(n))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}r=b$7.calculateUTF16asUTF8(c$9(e))[1],t+=r+1;var o=this.buffer.byteLength;return t>o&&this.resize((o*=2)>t?o:t),t-=r+1,b$7.encodeUTF16toUTF8(c$9(e),function(e){this.view[t++]=e}.bind(this)),this.view[t++]=0,i?(this.offset=t,this):r},l$7.readCString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,n=e,r=-1;return b$7.decodeUTF8toUTF16(function(){if(0===r)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return 0===(r=this.view[e++])?null:r}.bind(this),i=d$9(),!0),t?(this.offset=e,i()):{string:i(),length:e-n}},l$7.writeIString=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t;n=b$7.calculateUTF16asUTF8(c$9(e),this.noAssert)[1],t+=4+n;var o=this.buffer.byteLength;if(t>o&&this.resize((o*=2)>t?o:t),t-=4+n,this.littleEndian?(this.view[t+3]=n>>>24&255,this.view[t+2]=n>>>16&255,this.view[t+1]=n>>>8&255,this.view[t]=255&n):(this.view[t]=n>>>24&255,this.view[t+1]=n>>>16&255,this.view[t+2]=n>>>8&255,this.view[t+3]=255&n),t+=4,b$7.encodeUTF16toUTF8(c$9(e),function(e){this.view[t++]=e}.bind(this)),t!==r+4+n)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+n));return i?(this.offset=t,this):t-r},l$7.readIString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=e,n=this.readUint32(e),r=this.readUTF8String(n,u$4.METRICS_BYTES,e+=4);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-i}},u$4.METRICS_CHARS="c",u$4.METRICS_BYTES="b",l$7.writeUTF8String=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t;n=b$7.calculateUTF16asUTF8(c$9(e))[1],t+=n;var o=this.buffer.byteLength;return t>o&&this.resize((o*=2)>t?o:t),t-=n,b$7.encodeUTF16toUTF8(c$9(e),function(e){this.view[t++]=e}.bind(this)),i?(this.offset=t,this):t-r},l$7.writeString=l$7.writeUTF8String,u$4.calculateUTF8Chars=function(e){return b$7.calculateUTF16asUTF8(c$9(e))[0]},u$4.calculateUTF8Bytes=function(e){return b$7.calculateUTF16asUTF8(c$9(e))[1]},u$4.calculateString=u$4.calculateUTF8Bytes,l$7.readUTF8String=function(e,t,i){"number"==typeof t&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),typeof t>"u"&&(t=u$4.METRICS_CHARS),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var r,o=0,a=i;if(t===u$4.METRICS_CHARS){if(r=d$9(),b$7.decodeUTF8(function(){return o<e&&i<this.limit?this.view[i++]:null}.bind(this),(function(e){++o,b$7.UTF8toUTF16(e,r)})),o!==e)throw RangeError("Illegal range: Truncated data, "+o+" == "+e);return n?(this.offset=i,r()):{string:r(),length:i-a}}if(t===u$4.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+"+e+") <= "+this.buffer.byteLength)}var s=i+e;if(b$7.decodeUTF8toUTF16(function(){return i<s?this.view[i++]:null}.bind(this),r=d$9(),this.noAssert),i!==s)throw RangeError("Illegal range: Truncated data, "+i+" == "+s);return n?(this.offset=i,r()):{string:r(),length:i-a}}throw TypeError("Unsupported metrics: "+t)},l$7.readString=l$7.readUTF8String,l$7.writeVString=function(e,t){var i=typeof t>"u";if(i&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r,o=t;n=b$7.calculateUTF16asUTF8(c$9(e),this.noAssert)[1],r=u$4.calculateVarint32(n),t+=r+n;var a=this.buffer.byteLength;if(t>a&&this.resize((a*=2)>t?a:t),t-=r+n,t+=this.writeVarint32(n,t),b$7.encodeUTF16toUTF8(c$9(e),function(e){this.view[t++]=e}.bind(this)),t!==o+n+r)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+n+r));return i?(this.offset=t,this):t-o},l$7.readVString=function(e){var t=typeof e>"u";if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=e,n=this.readVarint32(e),r=this.readUTF8String(n.value,u$4.METRICS_BYTES,e+=n.length);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-i}},l$7.append=function(e,t,i){("number"==typeof t||"string"!=typeof t)&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}e instanceof u$4||(e=u$4.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;i+=r;var o=this.buffer.byteLength;return i>o&&this.resize((o*=2)>i?o:i),i-=r,this.view.set(e.view.subarray(e.offset,e.limit),i),e.offset+=r,n&&(this.offset+=r),this},l$7.appendTo=function(e,t){return e.append(this,t),this},l$7.assert=function(e){return this.noAssert=!e,this},l$7.capacity=function(){return this.buffer.byteLength},l$7.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},l$7.clone=function(e){var t=new u$4(0,this.littleEndian,this.noAssert);return e?(t.buffer=new ArrayBuffer(this.buffer.byteLength),t.view=new Uint8Array(t.buffer)):(t.buffer=this.buffer,t.view=this.view),t.offset=this.offset,t.markedOffset=this.markedOffset,t.limit=this.limit,t},l$7.compact=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var i=t-e;if(0===i)return this.buffer=x$4,this.view=null,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(i),r=new Uint8Array(n);return r.set(this.view.subarray(e,t)),this.buffer=n,this.view=r,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=i,this},l$7.copy=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(e===t)return new u$4(0,this.littleEndian,this.noAssert);var i=t-e,n=new u$4(i,this.littleEndian,this.noAssert);return n.offset=0,n.limit=i,n.markedOffset>=0&&(n.markedOffset-=e),this.copyTo(n,0,e,t),n},l$7.copyTo=function(e,t,i,n){var r,o;if(!this.noAssert&&!u$4.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(t=(o=typeof t>"u")?e.offset:0|t,i=(r=typeof i>"u")?this.offset:0|i,n=typeof n>"u"?this.limit:0|n,t<0||t>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+t+" <= "+e.buffer.byteLength);if(i<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+i+" <= "+this.buffer.byteLength);var a=n-i;return 0===a?e:(e.ensureCapacity(t+a),e.view.set(this.view.subarray(i,n),t),r&&(this.offset+=a),o&&(e.offset+=a),this)},l$7.ensureCapacity=function(e){var t=this.buffer.byteLength;return t<e?this.resize((t*=2)>e?t:e):this},l$7.fill=function(e,t,i){var n=typeof t>"u";if(n&&(t=this.offset),"string"==typeof e&&e.length>0&&(e=e.charCodeAt(0)),typeof t>"u"&&(t=this.offset),typeof i>"u"&&(i=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(t>=i)return this;for(;t<i;)this.view[t++]=e;return n&&(this.offset=t),this},l$7.flip=function(){return this.limit=this.offset,this.offset=0,this},l$7.mark=function(e){if(e=typeof e>"u"?this.offset:e,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},l$7.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},l$7.LE=function(e){return this.littleEndian=!(typeof e<"u")||!!e,this},l$7.BE=function(e){return this.littleEndian=typeof e<"u"&&!e,this},l$7.prepend=function(e,t,i){("number"==typeof t||"string"!=typeof t)&&(i=t,t=void 0);var n=typeof i>"u";if(n&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}e instanceof u$4||(e=u$4.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;var o=r-i;if(o>0){var a=new ArrayBuffer(this.buffer.byteLength+o),s=new Uint8Array(a);s.set(this.view.subarray(i,this.buffer.byteLength),r),this.buffer=a,this.view=s,this.offset+=o,this.markedOffset>=0&&(this.markedOffset+=o),this.limit+=o,i+=o}else new Uint8Array(this.buffer);return this.view.set(e.view.subarray(e.offset,e.limit),i-r),e.offset=e.limit,n&&(this.offset-=r),this},l$7.prependTo=function(e,t){return e.prepend(this,t),this},l$7.printDebug=function(e){"function"!=typeof e&&(e=console.log.bind(console)),e(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},l$7.remaining=function(){return this.limit-this.offset},l$7.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},l$7.resize=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal capacity: "+e+" (not an integer)");if((e|=0)<0)throw RangeError("Illegal capacity: 0 <= "+e)}if(this.buffer.byteLength<e){var t=new ArrayBuffer(e),i=new Uint8Array(t);i.set(this.view),this.buffer=t,this.view=i}return this},l$7.reverse=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t||Array.prototype.reverse.call(this.view.subarray(e,t)),this},l$7.skip=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},l$7.slice=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i=this.clone();return i.offset=e,i.limit=t,i},l$7.toBuffer=function(e){var t=this.offset,i=this.limit;if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal limit: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(!e&&0===t&&i===this.buffer.byteLength)return this.buffer;if(t===i)return x$4;var n=new ArrayBuffer(i-t);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(t,i),0),n},l$7.toArrayBuffer=l$7.toBuffer,l$7.toString=function(e,t,i){if(typeof e>"u")return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof e&&(i=t=e="utf8"),e){case"utf8":return this.toUTF8(t,i);case"base64":return this.toBase64(t,i);case"hex":return this.toHex(t,i);case"binary":return this.toBinary(t,i);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var T$5=function(){for(var e={},t=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],i=[],n=0,r=t.length;n<r;++n)i[t[n]]=n;return e.encode=function(e,i){for(var n,r;null!==(n=e());)i(t[n>>2&63]),r=(3&n)<<4,null!==(n=e())?(i(t[63&((r|=n>>4&15)|n>>4&15)]),r=(15&n)<<2,null!==(n=e())?(i(t[63&(r|n>>6&3)]),i(t[63&n])):(i(t[63&r]),i(61))):(i(t[63&r]),i(61),i(61))},e.decode=function(e,t){var n,r,o;function a(e){throw Error("Illegal character code: "+e)}for(;null!==(n=e());)if(typeof(r=i[n])>"u"&&a(n),null!==(n=e())&&(typeof(o=i[n])>"u"&&a(n),t(r<<2>>>0|(48&o)>>4),null!==(n=e()))){if(typeof(r=i[n])>"u"){if(61===n)break;a(n)}if(t((15&o)<<4>>>0|(60&r)>>2),null!==(n=e())){if(typeof(o=i[n])>"u"){if(61===n)break;a(n)}t((3&r)<<6>>>0|o)}}},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},e}();l$7.toBase64=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity||e>t)throw RangeError("begin, end");var i;return T$5.encode(function(){return e<t?this.view[e++]:null}.bind(this),i=d$9()),i()},u$4.fromBase64=function(e,t){if("string"!=typeof e)throw TypeError("str");var i=new u$4(e.length/4*3,t),n=0;return T$5.decode(c$9(e),(function(e){i.view[n++]=e})),i.limit=n,i},u$4.btoa=function(e){return u$4.fromBinary(e).toBase64()},u$4.atob=function(e){return u$4.fromBase64(e).toBinary()},l$7.toBinary=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity()||e>t)throw RangeError("begin, end");if(e===t)return"";for(var i=[],n=[];e<t;)i.push(this.view[e++]),i.length>=1024&&(n.push(String.fromCharCode.apply(String,i)),i=[]);return n.join("")+String.fromCharCode.apply(String,i)},u$4.fromBinary=function(e,t){if("string"!=typeof e)throw TypeError("str");for(var i,n=0,r=e.length,o=new u$4(r,t);n<r;){if((i=e.charCodeAt(n))>255)throw RangeError("illegal char code: "+i);o.view[n++]=i}return o.limit=r,o},l$7.toDebug=function(e){for(var t,i=-1,n=this.buffer.byteLength,r="",o="",a="";i<n;){if(-1!==i&&(r+=(t=this.view[i])<16?"0"+t.toString(16).toUpperCase():t.toString(16).toUpperCase(),e&&(o+=t>32&&t<127?String.fromCharCode(t):".")),++i,e&&i>0&&i%16==0&&i!==n){for(;r.length<51;)r+=" ";a+=r+o+"\n",r=o=""}i===this.offset&&i===this.limit?r+=i===this.markedOffset?"!":"|":i===this.offset?r+=i===this.markedOffset?"[":"<":i===this.limit?r+=i===this.markedOffset?"]":">":r+=i===this.markedOffset?"'":e||0!==i&&i!==n?" ":""}if(e&&" "!==r){for(;r.length<51;)r+=" ";a+=r+o+"\n"}return e?a:r},u$4.fromDebug=function(e,t,i){for(var n,r,o=e.length,a=new u$4((o+1)/3|0,t,i),s=0,l=0,u=!1,c=!1,h=!1,d=!1,f=!1;s<o;){switch(n=e.charAt(s++)){case"!":if(!i){if(c||h||d){f=!0;break}c=h=d=!0}a.offset=a.markedOffset=a.limit=l,u=!1;break;case"|":if(!i){if(c||d){f=!0;break}c=d=!0}a.offset=a.limit=l,u=!1;break;case"[":if(!i){if(c||h){f=!0;break}c=h=!0}a.offset=a.markedOffset=l,u=!1;break;case"<":if(!i){if(c){f=!0;break}c=!0}a.offset=l,u=!1;break;case"]":if(!i){if(d||h){f=!0;break}d=h=!0}a.limit=a.markedOffset=l,u=!1;break;case">":if(!i){if(d){f=!0;break}d=!0}a.limit=l,u=!1;break;case"'":if(!i){if(h){f=!0;break}h=!0}a.markedOffset=l,u=!1;break;case" ":u=!1;break;default:if(!i&&u){f=!0;break}if(r=parseInt(n+e.charAt(s++),16),!i&&(isNaN(r)||r<0||r>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[l++]=r,u=!0}if(f)throw TypeError("Illegal str: Invalid symbol at "+s)}if(!i){if(!c||!d)throw TypeError("Illegal str: Missing offset or limit");if(l<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+l+" < "+o)}return a},l$7.toHex=function(e,t){if(e=typeof e>"u"?this.offset:e,t=typeof t>"u"?this.limit:t,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var i,n=new Array(t-e);e<t;)(i=this.view[e++])<16?n.push("0",i.toString(16)):n.push(i.toString(16));return n.join("")},u$4.fromHex=function(e,t,i){if(!i){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if(e.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var n,r=e.length,o=new u$4(r/2|0,t),a=0,s=0;a<r;a+=2){if(n=parseInt(e.substring(a,a+2),16),!i&&(!isFinite(n)||n<0||n>255))throw TypeError("Illegal str: Contains non-hex characters");o.view[s++]=n}return o.limit=s,o};var b$7=function(){var e={MAX_CODEPOINT:1114111,encodeUTF8:function(e,t){var i=null;for("number"==typeof e&&(i=e,e=function(){return null});null!==i||null!==(i=e());)i<128?t(127&i):i<2048?(t(i>>6&31|192),t(63&i|128)):i<65536?(t(i>>12&15|224),t(i>>6&63|128),t(63&i|128)):(t(i>>18&7|240),t(i>>12&63|128),t(i>>6&63|128),t(63&i|128)),i=null},decodeUTF8:function(e,t){for(var i,n,r,o,a=function(e){e=e.slice(0,e.indexOf(null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(i=e());)if(0==(128&i))t(i);else if(192==(224&i))null===(n=e())&&a([i,n]),t((31&i)<<6|63&n);else if(224==(240&i))(null===(n=e())||null===(r=e()))&&a([i,n,r]),t((15&i)<<12|(63&n)<<6|63&r);else{if(240!=(248&i))throw RangeError("Illegal starting byte: "+i);(null===(n=e())||null===(r=e())||null===(o=e()))&&a([i,n,r,o]),t((7&i)<<18|(63&n)<<12|(63&r)<<6|63&o)}},UTF16toUTF8:function(e,t){for(var i,n=null;null!==(i=null!==n?n:e());)i>=55296&&i<=57343&&null!==(n=e())&&n>=56320&&n<=57343?(t(1024*(i-55296)+n-56320+65536),n=null):t(i);null!==n&&t(n)},UTF8toUTF16:function(e,t){var i=null;for("number"==typeof e&&(i=e,e=function(){return null});null!==i||null!==(i=e());)i<=65535?t(i):(t(55296+((i-=65536)>>10)),t(i%1024+56320)),i=null},encodeUTF16toUTF8:function(t,i){e.UTF16toUTF8(t,(function(t){e.encodeUTF8(t,i)}))},decodeUTF8toUTF16:function(t,i){e.decodeUTF8(t,(function(t){e.UTF8toUTF16(t,i)}))},calculateCodePoint:function(e){return e<128?1:e<2048?2:e<65536?3:4},calculateUTF8:function(e){for(var t,i=0;null!==(t=e());)i+=t<128?1:t<2048?2:t<65536?3:4;return i},calculateUTF16asUTF8:function(t){var i=0,n=0;return e.UTF16toUTF8(t,(function(e){++i,n+=e<128?1:e<2048?2:e<65536?3:4})),[i,n]}};return e}();l$7.toUTF8=function(e,t){if(typeof e>"u"&&(e=this.offset),typeof t>"u"&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i;try{b$7.decodeUTF8toUTF16(function(){return e<t?this.view[e++]:null}.bind(this),i=d$9())}catch{if(e!==t)throw RangeError("Illegal range: Truncated data, "+e+" != "+t)}return i()},u$4.fromUTF8=function(e,t,i){if(!i&&"string"!=typeof e)throw TypeError("Illegal str: Not a string");var n=new u$4(b$7.calculateUTF16asUTF8(c$9(e),!0)[1],t,i),r=0;return b$7.encodeUTF16toUTF8(c$9(e),(function(e){n.view[r++]=e})),n.limit=r,n};var f$7={};function h$3(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this.proxy=e.proxy,this.viewer=e.viewer,this.url=e.url,this.metadata=u$Z(e.metadata,{boundBox:{minX:-180,minY:-90,maxX:180,maxY:90},minLevel:1,maxLevel:20}),this.roadMetadata=e.roadMetadata,this.roadUrl=e.roadUrl,this.labelGraphics=e.labelGraphics?e.labelGraphics:{},this.billboardGraphics=e.billboardGraphics?e.billboardGraphics:{},this.aotuCollide=u$Z(e.aotuCollide,!0),this.collisionPadding=e.collisionPadding?e.collisionPadding:[3,5,3,5],this.subdomains=e.subdomains,Array.isArray(this.subdomains)?this.subdomains=this.subdomains.slice():e$2e(this.subdomains)&&0<this.subdomains.length?this.subdomains=this.subdomains.split(""):this.subdomains=["t0","t1","t2","t3","t4","t5","t6","t7"],this.token=e.token,this.depthTestOptimization=u$Z(e.depthTestOptimization,!1),this.dTOElevation=u$Z(e.dTOElevation,2e4),this.dTOPitch=u$Z(e.dTOPitch,-1.22),this.tileCache=[],this.labelCache=[],this._isInitial=!1,this._latelyGrid=[],this._latelyRefreshStamp=0,this._latelyCollisionStamp=0;var t=e$1T();this._UUID="TDT_WTFS_LABEL_"+t,this._UUIDRoad="TDT_WTFS_LABEL_ROAD_"+t,this._isDTP=!1,this.viewer.camera.percentageChanged=.18,this.bindEvent()}function G$3(e,t){return t.minX>=e.minX&&t.minX<=e.maxX&&t.minY>=e.minY&&t.minY<=e.maxY||t.maxX>=e.minX&&t.maxX<=e.maxX&&t.maxY>=e.minY&&t.maxY<=e.maxY||t.minX>=e.minX&&t.minX<=e.maxX&&t.maxY>=e.minY&&t.maxY<=e.maxY||t.maxX>=e.minX&&t.maxX<=e.maxX&&t.minY>=e.minY&&t.minY<=e.maxY}function A$6(e){return e.coord.x}function N$3(e){return e.coord.y}function F$3(e){return{x:e.anno.collisionBox.x,y:e.anno.collisionBox.y,width:e.anno.collisionBox.width,height:e.anno.collisionBox.height}}function M$3(e,t,i,n,r,o,a,s){a.anno;var l=s,u={x:i,y:n,width:r-i,height:o-n},c=l.x,h=l.y,d=u.x,f=u.y;return!(c>d+u.width||c+l.width<d||h+l.height<f||h>f+u.height)}f$7.ByteBuffer=u$4,f$7.Long=u$4.Long||null,f$7.VERSION="5.0.3",f$7.WIRE_TYPES={},f$7.WIRE_TYPES.VARINT=0,f$7.WIRE_TYPES.BITS64=1,f$7.WIRE_TYPES.LDELIM=2,f$7.WIRE_TYPES.STARTGROUP=3,f$7.WIRE_TYPES.ENDGROUP=4,f$7.WIRE_TYPES.BITS32=5,f$7.PACKABLE_WIRE_TYPES=[f$7.WIRE_TYPES.VARINT,f$7.WIRE_TYPES.BITS64,f$7.WIRE_TYPES.BITS32],f$7.TYPES={int32:{name:"int32",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},uint32:{name:"uint32",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},sint32:{name:"sint32",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},int64:{name:"int64",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:f$7.Long?f$7.Long.ZERO:void 0},uint64:{name:"uint64",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:f$7.Long?f$7.Long.UZERO:void 0},sint64:{name:"sint64",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:f$7.Long?f$7.Long.ZERO:void 0},bool:{name:"bool",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:!1},double:{name:"double",wireType:f$7.WIRE_TYPES.BITS64,defaultValue:0},string:{name:"string",wireType:f$7.WIRE_TYPES.LDELIM,defaultValue:""},bytes:{name:"bytes",wireType:f$7.WIRE_TYPES.LDELIM,defaultValue:null},fixed32:{name:"fixed32",wireType:f$7.WIRE_TYPES.BITS32,defaultValue:0},sfixed32:{name:"sfixed32",wireType:f$7.WIRE_TYPES.BITS32,defaultValue:0},fixed64:{name:"fixed64",wireType:f$7.WIRE_TYPES.BITS64,defaultValue:f$7.Long?f$7.Long.UZERO:void 0},sfixed64:{name:"sfixed64",wireType:f$7.WIRE_TYPES.BITS64,defaultValue:f$7.Long?f$7.Long.ZERO:void 0},float:{name:"float",wireType:f$7.WIRE_TYPES.BITS32,defaultValue:0},enum:{name:"enum",wireType:f$7.WIRE_TYPES.VARINT,defaultValue:0},message:{name:"message",wireType:f$7.WIRE_TYPES.LDELIM,defaultValue:null},group:{name:"group",wireType:f$7.WIRE_TYPES.STARTGROUP,defaultValue:null}},f$7.MAP_KEY_TYPES=[f$7.TYPES.int32,f$7.TYPES.sint32,f$7.TYPES.sfixed32,f$7.TYPES.uint32,f$7.TYPES.fixed32,f$7.TYPES.int64,f$7.TYPES.sint64,f$7.TYPES.sfixed64,f$7.TYPES.uint64,f$7.TYPES.fixed64,f$7.TYPES.bool,f$7.TYPES.string,f$7.TYPES.bytes],f$7.ID_MIN=1,f$7.ID_MAX=536870911,f$7.convertFieldsToCamelCase=!1,f$7.populateAccessors=!0,f$7.populateDefaults=!0,f$7.Util=function(){var e={};return e.IS_NODE="object"==typeof process&&process+""=="[object process]"&&!process.browser,e.XHR=function(){for(var e=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],t=null,i=0;i<e.length;i++){try{t=e[i]()}catch{continue}break}if(!t)throw Error("XMLHttpRequest is not supported");return t},e.fetch=function(t,i){if(i&&"function"!=typeof i&&(i=null),e.IS_NODE){var n=require("fs");if(i)n.readFile(t,(function(e,t){i(e?null:""+t)}));else try{return n.readFileSync(t)}catch{return null}}else{var r=e.XHR();if(r.open("GET",t,!!i),r.setRequestHeader("Accept","text/plain"),"function"==typeof r.overrideMimeType&&r.overrideMimeType("text/plain"),!i)return r.send(null),200==r.status||0==r.status&&"string"==typeof r.responseText?r.responseText:null;if(r.onreadystatechange=function(){4==r.readyState&&(200==r.status||0==r.status&&"string"==typeof r.responseText?i(r.responseText):i(null))},4==r.readyState)return;r.send(null)}},e.toCamelCase=function(e){return e.replace(/_([a-zA-Z])/g,(function(e,t){return t.toUpperCase()}))},e}(),f$7.Lang={DELIM:/[\s\{\}=;:\[\],'"\(\)<>]/g,RULE:/^(?:required|optional|repeated|map)$/,TYPE:/^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,NAME:/^[a-zA-Z_][a-zA-Z_0-9]*$/,TYPEDEF:/^[a-zA-Z][a-zA-Z_0-9]*$/,TYPEREF:/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,FQTYPEREF:/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/,NUMBER:/^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,NUMBER_DEC:/^(?:[1-9][0-9]*|0)$/,NUMBER_HEX:/^0[xX][0-9a-fA-F]+$/,NUMBER_OCT:/^0[0-7]+$/,NUMBER_FLT:/^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,BOOL:/^(?:true|false)$/i,ID:/^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,NEGID:/^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,WHITESPACE:/\s/,STRING:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,STRING_DQ:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,STRING_SQ:/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},f$7.DotProto=function(e,t){var i={},n=function(e){this.source=e+"",this.index=0,this.line=1,this.stack=[],this._stringOpen=null},r=n.prototype;r._readString=function(){var e='"'===this._stringOpen?t.STRING_DQ:t.STRING_SQ;e.lastIndex=this.index-1;var i=e.exec(this.source);if(!i)throw Error("unterminated string");return this.index=e.lastIndex,this.stack.push(this._stringOpen),this._stringOpen=null,i[1]},r.next=function(){if(this.stack.length>0)return this.stack.shift();if(this.index>=this.source.length)return null;if(null!==this._stringOpen)return this._readString();var e,i,n;do{for(e=!1;t.WHITESPACE.test(n=this.source.charAt(this.index));)if("\n"===n&&++this.line,++this.index===this.source.length)return null;if("/"===this.source.charAt(this.index))if(++this.index,"/"===this.source.charAt(this.index)){for(;"\n"!==this.source.charAt(++this.index);)if(this.index==this.source.length)return null;++this.index,++this.line,e=!0}else{if("*"!==(n=this.source.charAt(this.index)))return"/";do{if("\n"===n&&++this.line,++this.index===this.source.length)return null;i=n,n=this.source.charAt(this.index)}while("*"!==i||"/"!==n);++this.index,e=!0}}while(e);if(this.index===this.source.length)return null;var r=this.index;if(t.DELIM.lastIndex=0,!t.DELIM.test(this.source.charAt(r++)))for(;r<this.source.length&&!t.DELIM.test(this.source.charAt(r));)++r;var o=this.source.substring(this.index,this.index=r);return('"'===o||"'"===o)&&(this._stringOpen=o),o},r.peek=function(){if(0===this.stack.length){var e=this.next();if(null===e)return null;this.stack.push(e)}return this.stack[0]},r.skip=function(e){var t=this.next();if(t!==e)throw Error("illegal '"+t+"', '"+e+"' expected")},r.omit=function(e){return this.peek()===e&&(this.next(),!0)},r.toString=function(){return"Tokenizer ("+this.index+"/"+this.source.length+" at line "+this.line+")"},i.Tokenizer=n;var o=function(e){this.tn=new n(e),this.proto3=!1},a=o.prototype;function s(e,i){var n=-1,r=1;if("-"==e.charAt(0)&&(r=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))n=parseInt(e);else if(t.NUMBER_HEX.test(e))n=parseInt(e.substring(2),16);else{if(!t.NUMBER_OCT.test(e))throw Error("illegal id value: "+(r<0?"-":"")+e);n=parseInt(e.substring(1),8)}if(n=r*n|0,!i&&n<0)throw Error("illegal id value: "+(r<0?"-":"")+e);return n}function l(e){var i=1;if("-"==e.charAt(0)&&(i=-1,e=e.substring(1)),t.NUMBER_DEC.test(e))return i*parseInt(e,10);if(t.NUMBER_HEX.test(e))return i*parseInt(e.substring(2),16);if(t.NUMBER_OCT.test(e))return i*parseInt(e.substring(1),8);if("inf"===e)return i*(1/0);if("nan"===e)return NaN;if(t.NUMBER_FLT.test(e))return i*parseFloat(e);throw Error("illegal number value: "+(i<0?"-":"")+e)}function u(e,t,i){typeof e[t]>"u"?e[t]=i:(Array.isArray(e[t])||(e[t]=[e[t]]),e[t].push(i))}return a.parse=function(){var e,i,n={name:"[ROOT]",package:null,messages:[],enums:[],imports:[],options:{},services:[]},r=!0;try{for(;e=this.tn.next();)switch(e){case"package":if(!r||null!==n.package)throw Error("unexpected 'package'");if(e=this.tn.next(),!t.TYPEREF.test(e))throw Error("illegal package name: "+e);this.tn.skip(";"),n.package=e;break;case"import":if(!r)throw Error("unexpected 'import'");("public"===(e=this.tn.peek())||(i="weak"===e))&&this.tn.next(),e=this._readString(),this.tn.skip(";"),i||n.imports.push(e);break;case"syntax":if(!r)throw Error("unexpected 'syntax'");this.tn.skip("="),"proto3"===(n.syntax=this._readString())&&(this.proto3=!0),this.tn.skip(";");break;case"message":this._parseMessage(n,null),r=!1;break;case"enum":this._parseEnum(n),r=!1;break;case"option":this._parseOption(n);break;case"service":this._parseService(n);break;case"extend":this._parseExtend(n);break;default:throw Error("unexpected '"+e+"'")}}catch(e){throw e.message="Parse error at line "+this.tn.line+": "+e.message,e}return delete n.name,n},o.parse=function(e){return new o(e).parse()},a._readString=function(){var e,t,i="";do{if("'"!==(t=this.tn.next())&&'"'!==t)throw Error("illegal string delimiter: "+t);i+=this.tn.next(),this.tn.skip(t),e=this.tn.peek()}while('"'===e||'"'===e);return i},a._readValue=function(e){var i=this.tn.peek();if('"'===i||"'"===i)return this._readString();if(this.tn.next(),t.NUMBER.test(i))return l(i);if(t.BOOL.test(i))return"true"===i.toLowerCase();if(e&&t.TYPEREF.test(i))return i;throw Error("illegal value: "+i)},a._parseOption=function(e,i){var n=this.tn.next(),r=!1;if("("===n&&(r=!0,n=this.tn.next()),!t.TYPEREF.test(n))throw Error("illegal option name: "+n);var o=n;r&&(this.tn.skip(")"),o="("+o+")",n=this.tn.peek(),t.FQTYPEREF.test(n)&&(o+=n,this.tn.next())),this.tn.skip("="),this._parseOptionValue(e,o),i||this.tn.skip(";")},a._parseOptionValue=function(e,i){var n=this.tn.peek();if("{"!==n)u(e.options,i,this._readValue(!0));else for(this.tn.skip("{");"}"!==(n=this.tn.next());){if(!t.NAME.test(n))throw Error("illegal option name: "+i+"."+n);this.tn.omit(":")?u(e.options,i+"."+n,this._readValue(!0)):this._parseOptionValue(e,i+"."+n)}},a._parseService=function(e){var i=this.tn.next();if(!t.NAME.test(i))throw Error("illegal service name at line "+this.tn.line+": "+i);var n={name:i,rpc:{},options:{}};for(this.tn.skip("{");"}"!==(i=this.tn.next());)if("option"===i)this._parseOption(n);else{if("rpc"!==i)throw Error("illegal service token: "+i);this._parseServiceRPC(n)}this.tn.omit(";"),e.services.push(n)},a._parseServiceRPC=function(e){var i="rpc",n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal rpc service method name: "+n);var r=n,o={request:null,response:null,request_stream:!1,response_stream:!1,options:{}};if(this.tn.skip("("),"stream"===(n=this.tn.next()).toLowerCase()&&(o.request_stream=!0,n=this.tn.next()),!t.TYPEREF.test(n))throw Error("illegal rpc service request type: "+n);if(o.request=n,this.tn.skip(")"),"returns"!==(n=this.tn.next()).toLowerCase())throw Error("illegal rpc service request type delimiter: "+n);if(this.tn.skip("("),"stream"===(n=this.tn.next()).toLowerCase()&&(o.response_stream=!0,n=this.tn.next()),o.response=n,this.tn.skip(")"),"{"===(n=this.tn.peek())){for(this.tn.next();"}"!==(n=this.tn.next());){if("option"!==n)throw Error("illegal rpc service token: "+n);this._parseOption(o)}this.tn.omit(";")}else this.tn.skip(";");typeof e[i]>"u"&&(e[i]={}),e[i][r]=o},a._parseMessage=function(e,i){var n=!!i,r=this.tn.next(),o={name:"",fields:[],enums:[],messages:[],options:{},services:[],oneofs:{}};if(!t.NAME.test(r))throw Error("illegal "+(n?"group":"message")+" name: "+r);for(o.name=r,n&&(this.tn.skip("="),i.id=s(this.tn.next()),o.isGroup=!0),"["===(r=this.tn.peek())&&i&&this._parseFieldOptions(i),this.tn.skip("{");"}"!==(r=this.tn.next());)if(t.RULE.test(r))this._parseMessageField(o,r);else if("oneof"===r)this._parseMessageOneOf(o);else if("enum"===r)this._parseEnum(o);else if("message"===r)this._parseMessage(o);else if("option"===r)this._parseOption(o);else if("service"===r)this._parseService(o);else if("extensions"===r)o.hasOwnProperty("extensions")?o.extensions=o.extensions.concat(this._parseExtensionRanges()):o.extensions=this._parseExtensionRanges();else if("reserved"===r)this._parseIgnored();else if("extend"===r)this._parseExtend(o);else{if(!t.TYPEREF.test(r))throw Error("illegal message token: "+r);if(!this.proto3)throw Error("illegal field rule: "+r);this._parseMessageField(o,"optional",r)}return this.tn.omit(";"),e.messages.push(o),o},a._parseIgnored=function(){for(;";"!==this.tn.peek();)this.tn.next();this.tn.skip(";")},a._parseMessageField=function(e,i,n){if(!t.RULE.test(i))throw Error("illegal message field rule: "+i);var r,o={rule:i,type:"",name:"",options:{},id:0};if("map"===i){if(n)throw Error("illegal type: "+n);if(this.tn.skip("<"),r=this.tn.next(),!t.TYPE.test(r)&&!t.TYPEREF.test(r))throw Error("illegal message field type: "+r);if(o.keytype=r,this.tn.skip(","),r=this.tn.next(),!t.TYPE.test(r)&&!t.TYPEREF.test(r))throw Error("illegal message field: "+r);if(o.type=r,this.tn.skip(">"),r=this.tn.next(),!t.NAME.test(r))throw Error("illegal message field name: "+r);o.name=r,this.tn.skip("="),o.id=s(this.tn.next()),"["===(r=this.tn.peek())&&this._parseFieldOptions(o),this.tn.skip(";")}else if("group"===(n=typeof n<"u"?n:this.tn.next())){var a=this._parseMessage(e,o);if(!/^[A-Z]/.test(a.name))throw Error("illegal group name: "+a.name);o.type=a.name,o.name=a.name.toLowerCase(),this.tn.omit(";")}else{if(!t.TYPE.test(n)&&!t.TYPEREF.test(n))throw Error("illegal message field type: "+n);if(o.type=n,r=this.tn.next(),!t.NAME.test(r))throw Error("illegal message field name: "+r);o.name=r,this.tn.skip("="),o.id=s(this.tn.next()),"["===(r=this.tn.peek())&&this._parseFieldOptions(o),this.tn.skip(";")}return e.fields.push(o),o},a._parseMessageOneOf=function(e){var i=this.tn.next();if(!t.NAME.test(i))throw Error("illegal oneof name: "+i);var n,r=i,o=[];for(this.tn.skip("{");"}"!==(i=this.tn.next());)(n=this._parseMessageField(e,"optional",i)).oneof=r,o.push(n.id);this.tn.omit(";"),e.oneofs[r]=o},a._parseFieldOptions=function(e){this.tn.skip("[");for(var t=!0;"]"!==this.tn.peek();)t||this.tn.skip(","),this._parseOption(e,!0),t=!1;this.tn.next()},a._parseEnum=function(e){var i={name:"",values:[],options:{}},n=this.tn.next();if(!t.NAME.test(n))throw Error("illegal name: "+n);for(i.name=n,this.tn.skip("{");"}"!==(n=this.tn.next());)if("option"===n)this._parseOption(i);else{if(!t.NAME.test(n))throw Error("illegal name: "+n);this.tn.skip("=");var r={name:n,id:s(this.tn.next(),!0)};"["===(n=this.tn.peek())&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),i.values.push(r)}this.tn.omit(";"),e.enums.push(i)},a._parseExtensionRanges=function(){var t,i,n,r=[];do{for(i=[];;){switch(t=this.tn.next()){case"min":n=e.ID_MIN;break;case"max":n=e.ID_MAX;break;default:n=l(t)}if(i.push(n),2===i.length)break;if("to"!==this.tn.peek()){i.push(n);break}this.tn.next()}r.push(i)}while(this.tn.omit(","));return this.tn.skip(";"),r},a._parseExtend=function(e){var i=this.tn.next();if(!t.TYPEREF.test(i))throw Error("illegal extend reference: "+i);var n={ref:i,fields:[]};for(this.tn.skip("{");"}"!==(i=this.tn.next());)if(t.RULE.test(i))this._parseMessageField(n,i);else{if(!t.TYPEREF.test(i))throw Error("illegal extend token: "+i);if(!this.proto3)throw Error("illegal field rule: "+i);this._parseMessageField(n,"optional",i)}return this.tn.omit(";"),e.messages.push(n),n},a.toString=function(){return"Parser at line "+this.tn.line},i.Parser=o,i}(f$7,f$7.Lang),f$7.Reflect=function(e){var t={},i=function(e,t,i){this.builder=e,this.parent=t,this.name=i,this.className},n=i.prototype;n.fqn=function(){for(var e=this.name,t=this;;){if(null==(t=t.parent))break;e=t.name+"."+e}return e},n.toString=function(e){return(e?this.className+" ":"")+this.fqn()},n.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},t.T=i;var r=function(e,t,n,r,o){i.call(this,e,t,n),this.className="Namespace",this.children=[],this.options=r||{},this.syntax=o||"proto2"},o=r.prototype=Object.create(i.prototype);o.getChildren=function(e){if(null==(e=e||null))return this.children.slice();for(var t=[],i=0,n=this.children.length;i<n;++i)this.children[i]instanceof e&&t.push(this.children[i]);return t},o.addChild=function(e){var t;if(t=this.getChild(e.name))if(t instanceof u.Field&&t.name!==t.originalName&&null===this.getChild(t.originalName))t.name=t.originalName;else{if(!(e instanceof u.Field&&e.name!==e.originalName&&null===this.getChild(e.originalName)))throw Error("Duplicate name in namespace "+this.toString(!0)+": "+e.name);e.name=e.originalName}this.children.push(e)},o.getChild=function(e){for(var t="number"==typeof e?"id":"name",i=0,n=this.children.length;i<n;++i)if(this.children[i][t]===e)return this.children[i];return null},o.resolve=function(e,i){var n,r="string"==typeof e?e.split("."):e,o=this,a=0;if(""===r[a]){for(;null!==o.parent;)o=o.parent;a++}do{do{if(!(o instanceof t.Namespace)){o=null;break}if(!(n=o.getChild(r[a]))||!(n instanceof t.T)||i&&!(n instanceof t.Namespace)){o=null;break}o=n,a++}while(a<r.length);if(null!=o)break;if(null!==this.parent)return this.parent.resolve(e,i)}while(null!=o);return o},o.qn=function(e){var i=[],n=e;do{i.unshift(n.name),n=n.parent}while(null!==n);for(var r=1;r<=i.length;r++){var o=i.slice(i.length-r);if(e===this.resolve(o,e instanceof t.Namespace))return o.join(".")}return e.fqn()},o.build=function(){for(var e,t={},i=this.children,n=0,o=i.length;n<o;++n)(e=i[n])instanceof r&&(t[e.name]=e.build());return Object.defineProperty&&Object.defineProperty(t,"$options",{value:this.buildOpt()}),t},o.buildOpt=function(){for(var e={},t=Object.keys(this.options),i=0,n=t.length;i<n;++i){var r=t[i],o=this.options[t[i]];e[r]=o}return e},o.getOption=function(e){return typeof e>"u"?this.options:typeof this.options[e]<"u"?this.options[e]:null},t.Namespace=r;var a=function(t,i,n,r,o){if(this.type=t,this.resolvedType=i,this.isMapKey=n,this.syntax=r,this.name=o,n&&e.MAP_KEY_TYPES.indexOf(t)<0)throw Error("Invalid map key type: "+t.name)},s=a.prototype;function l(t,i){if(t&&"number"==typeof t.low&&"number"==typeof t.high&&"boolean"==typeof t.unsigned&&t.low==t.low&&t.high==t.high)return new e.Long(t.low,t.high,typeof i>"u"?t.unsigned:i);if("string"==typeof t)return e.Long.fromString(t,i||!1,10);if("number"==typeof t)return e.Long.fromNumber(t,i||!1);throw Error("not convertible to Long")}a.defaultFieldValue=function(t){if("string"==typeof t&&(t=e.TYPES[t]),typeof t.defaultValue>"u")throw Error("default value for type "+t.name+" is not supported");return t==e.TYPES.bytes?new u$4(0):t.defaultValue},s.toString=function(){return(this.name||"")+(this.isMapKey?"map":"value")+" element"},s.verifyValue=function(t){var i=this;function n(e,t){throw Error("Illegal value for "+i.toString(!0)+" of type "+i.type.name+": "+e+" ("+t+")")}switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),t>4294967295?0|t:t;case e.TYPES.uint32:case e.TYPES.fixed32:return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),t<0?t>>>0:t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:if(e.Long)try{return l(t,!1)}catch(e){n(typeof t,e.message)}else n(typeof t,"requires Long.js");case e.TYPES.uint64:case e.TYPES.fixed64:if(e.Long)try{return l(t,!0)}catch(e){n(typeof t,e.message)}else n(typeof t,"requires Long.js");case e.TYPES.bool:return"boolean"!=typeof t&&n(typeof t,"not a boolean"),t;case e.TYPES.float:case e.TYPES.double:return"number"!=typeof t&&n(typeof t,"not a number"),t;case e.TYPES.string:return"string"!=typeof t&&!(t&&t instanceof String)&&n(typeof t,"not a string"),""+t;case e.TYPES.bytes:return u$4.isByteBuffer(t)?t:u$4.wrap(t,"base64");case e.TYPES.enum:var r=this.resolvedType.getChildren(e.Reflect.Enum.Value);for(a=0;a<r.length;a++){if(r[a].name==t)return r[a].id;if(r[a].id==t)return r[a].id}if("proto3"===this.syntax)return("number"!=typeof t||t==t&&t%1!=0)&&n(typeof t,"not an integer"),(t>4294967295||t<0)&&n(typeof t,"not in range for uint32"),t;n(t,"not a valid enum value");case e.TYPES.group:case e.TYPES.message:if((!t||"object"!=typeof t)&&n(typeof t,"object expected"),t instanceof this.resolvedType.clazz)return t;if(t instanceof e.Builder.Message){var o={};for(var a in t)t.hasOwnProperty(a)&&(o[a]=t[a]);t=o}return new this.resolvedType.clazz(t)}throw Error("[INTERNAL] Illegal value for "+this.toString(!0)+": "+t+" (undefined type "+this.type+")")},s.calculateLength=function(t,i){if(null===i)return 0;var n;switch(this.type){case e.TYPES.int32:return i<0?u$4.calculateVarint64(i):u$4.calculateVarint32(i);case e.TYPES.uint32:return u$4.calculateVarint32(i);case e.TYPES.sint32:return u$4.calculateVarint32(u$4.zigZagEncode32(i));case e.TYPES.fixed32:case e.TYPES.sfixed32:case e.TYPES.float:return 4;case e.TYPES.int64:case e.TYPES.uint64:return u$4.calculateVarint64(i);case e.TYPES.sint64:return u$4.calculateVarint64(u$4.zigZagEncode64(i));case e.TYPES.fixed64:case e.TYPES.sfixed64:return 8;case e.TYPES.bool:return 1;case e.TYPES.enum:return u$4.calculateVarint32(i);case e.TYPES.double:return 8;case e.TYPES.string:return n=u$4.calculateUTF8Bytes(i),u$4.calculateVarint32(n)+n;case e.TYPES.bytes:if(i.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+i.remaining()+" bytes remaining");return u$4.calculateVarint32(i.remaining())+i.remaining();case e.TYPES.message:return n=this.resolvedType.calculate(i),u$4.calculateVarint32(n)+n;case e.TYPES.group:return(n=this.resolvedType.calculate(i))+u$4.calculateVarint32(t<<3|e.WIRE_TYPES.ENDGROUP)}throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+i+" (unknown type)")},s.encodeValue=function(t,i,n){if(null===i)return n;switch(this.type){case e.TYPES.int32:i<0?n.writeVarint64(i):n.writeVarint32(i);break;case e.TYPES.uint32:n.writeVarint32(i);break;case e.TYPES.sint32:n.writeVarint32ZigZag(i);break;case e.TYPES.fixed32:n.writeUint32(i);break;case e.TYPES.sfixed32:n.writeInt32(i);break;case e.TYPES.int64:case e.TYPES.uint64:n.writeVarint64(i);break;case e.TYPES.sint64:n.writeVarint64ZigZag(i);break;case e.TYPES.fixed64:n.writeUint64(i);break;case e.TYPES.sfixed64:n.writeInt64(i);break;case e.TYPES.bool:"string"==typeof i?n.writeVarint32("false"===i.toLowerCase()?0:!!i):n.writeVarint32(i?1:0);break;case e.TYPES.enum:n.writeVarint32(i);break;case e.TYPES.float:n.writeFloat32(i);break;case e.TYPES.double:n.writeFloat64(i);break;case e.TYPES.string:n.writeVString(i);break;case e.TYPES.bytes:if(i.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+i.remaining()+" bytes remaining");var r=i.offset;n.writeVarint32(i.remaining()),n.append(i),i.offset=r;break;case e.TYPES.message:var o=(new u$4).LE();this.resolvedType.encode(i,o),n.writeVarint32(o.offset),n.append(o.flip());break;case e.TYPES.group:this.resolvedType.encode(i,n),n.writeVarint32(t<<3|e.WIRE_TYPES.ENDGROUP);break;default:throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+i+" (unknown type)")}return n},s.decode=function(t,i,n){if(i!=this.type.wireType)throw Error("Unexpected wire type for element");var r,o;switch(this.type){case e.TYPES.int32:return 0|t.readVarint32();case e.TYPES.uint32:return t.readVarint32()>>>0;case e.TYPES.sint32:return 0|t.readVarint32ZigZag();case e.TYPES.fixed32:return t.readUint32()>>>0;case e.TYPES.sfixed32:return 0|t.readInt32();case e.TYPES.int64:return t.readVarint64();case e.TYPES.uint64:return t.readVarint64().toUnsigned();case e.TYPES.sint64:return t.readVarint64ZigZag();case e.TYPES.fixed64:return t.readUint64();case e.TYPES.sfixed64:return t.readInt64();case e.TYPES.bool:return!!t.readVarint32();case e.TYPES.enum:return t.readVarint32();case e.TYPES.float:return t.readFloat();case e.TYPES.double:return t.readDouble();case e.TYPES.string:return t.readVString();case e.TYPES.bytes:if(o=t.readVarint32(),t.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+t.remaining());return(r=t.clone()).limit=r.offset+o,t.offset+=o,r;case e.TYPES.message:return o=t.readVarint32(),this.resolvedType.decode(t,o);case e.TYPES.group:return this.resolvedType.decode(t,-1,n)}throw Error("[INTERNAL] Illegal decode type")},s.valueFromString=function(t){if(!this.isMapKey)throw Error("valueFromString() called on non-map-key element");switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return this.verifyValue(parseInt(t));case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return this.verifyValue(t);case e.TYPES.bool:return"true"===t;case e.TYPES.string:return this.verifyValue(t);case e.TYPES.bytes:return u$4.fromBinary(t)}},s.valueToString=function(t){if(!this.isMapKey)throw Error("valueToString() called on non-map-key element");return this.type===e.TYPES.bytes?t.toString("binary"):t.toString()},t.Element=a;var u=function(e,t,i,n,o,a){r.call(this,e,t,i,n,a),this.className="Message",this.extensions=void 0,this.clazz=null,this.isGroup=!!o,this._fields=null,this._fieldsById=null,this._fieldsByName=null},c=u.prototype=Object.create(r.prototype);function h(t,i){var n=i.readVarint32(),r=7&n,o=n>>>3;switch(r){case e.WIRE_TYPES.VARINT:do{n=i.readUint8()}while(128==(128&n));break;case e.WIRE_TYPES.BITS64:i.offset+=8;break;case e.WIRE_TYPES.LDELIM:n=i.readVarint32(),i.offset+=n;break;case e.WIRE_TYPES.STARTGROUP:h(o,i);break;case e.WIRE_TYPES.ENDGROUP:if(o===t)return!1;throw Error("Illegal GROUPEND after unknown group: "+o+" ("+t+" expected)");case e.WIRE_TYPES.BITS32:i.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+t+": "+r)}return!0}c.build=function(t){if(this.clazz&&!t)return this.clazz;var i=function(e,t){var i=t.getChildren(e.Reflect.Message.Field),n=t.getChildren(e.Reflect.Message.OneOf),r=function(o,a){e.Builder.Message.call(this);for(var s=0,l=n.length;s<l;++s)this[n[s].name]=null;for(s=0,l=i.length;s<l;++s){var u=i[s];this[u.name]=u.repeated?[]:u.map?new e.Map(u):null,(u.required||"proto3"===t.syntax)&&null!==u.defaultValue&&(this[u.name]=u.defaultValue)}var c;if(arguments.length>0)if(1!==arguments.length||null===o||"object"!=typeof o||!("function"!=typeof o.encode||o instanceof r)||Array.isArray(o)||o instanceof e.Map||u$4.isByteBuffer(o)||o instanceof ArrayBuffer||e.Long&&o instanceof e.Long)for(s=0,l=arguments.length;s<l;++s)typeof(c=arguments[s])<"u"&&this.$set(i[s].name,c);else this.$set(o)},o=r.prototype=Object.create(e.Builder.Message.prototype);o.add=function(i,n,r){var o=t._fieldsByName[i];if(!r){if(!o)throw Error(this+"#"+i+" is undefined");if(!(o instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+o.toString(!0));if(!o.repeated)throw Error(this+"#"+i+" is not a repeated field");n=o.verifyValue(n,!0)}return null===this[i]&&(this[i]=[]),this[i].push(n),this},o.$add=o.add,o.set=function(i,n,r){if(i&&"object"==typeof i){for(var o in r=n,i)i.hasOwnProperty(o)&&typeof(n=i[o])<"u"&&void 0===t._oneofsByName[o]&&this.$set(o,n,r);return this}var a=t._fieldsByName[i];if(r)this[i]=n;else{if(!a)throw Error(this+"#"+i+" is not a field: undefined");if(!(a instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+a.toString(!0));this[a.name]=n=a.verifyValue(n)}if(a&&a.oneof){var s=this[a.oneof.name];null!==n?(null!==s&&s!==a.name&&(this[s]=null),this[a.oneof.name]=a.name):s===i&&(this[a.oneof.name]=null)}return this},o.$set=o.set,o.get=function(i,n){if(n)return this[i];var r=t._fieldsByName[i];if(!(r&&r instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: undefined");if(!(r instanceof e.Reflect.Message.Field))throw Error(this+"#"+i+" is not a field: "+r.toString(!0));return this[r.name]},o.$get=o.get;for(var a=0;a<i.length;a++){var s=i[a];s instanceof e.Reflect.Message.ExtensionField||t.builder.options.populateAccessors&&function(e){var i=e.originalName.replace(/(_[a-zA-Z])/g,(function(e){return e.toUpperCase().replace("_","")}));i=i.substring(0,1).toUpperCase()+i.substring(1);var n=e.originalName.replace(/([A-Z])/g,(function(e){return"_"+e})),r=function(t,i){return this[e.name]=i?t:e.verifyValue(t),this},a=function(){return this[e.name]};null===t.getChild("set"+i)&&(o["set"+i]=r),null===t.getChild("set_"+n)&&(o["set_"+n]=r),null===t.getChild("get"+i)&&(o["get"+i]=a),null===t.getChild("get_"+n)&&(o["get_"+n]=a)}(s)}function l(t,i,n,r){if(null===t||"object"!=typeof t){if(r&&r instanceof e.Reflect.Enum){var o=e.Reflect.Enum.getName(r.object,t);if(null!==o)return o}return t}if(u$4.isByteBuffer(t))return i?t.toBase64():t.toBuffer();if(e.Long.isLong(t))return n?t.toString():e.Long.fromValue(t);var a;if(Array.isArray(t))return a=[],t.forEach((function(e,t){a[t]=l(e,i,n,r)})),a;if(a={},t instanceof e.Map){for(var s=t.entries(),u=s.next();!u.done;u=s.next())a[t.keyElem.valueToString(u.value[0])]=l(u.value[1],i,n,t.valueElem.resolvedType);return a}var c=t.$type,h=void 0;for(var d in t)t.hasOwnProperty(d)&&(c&&(h=c.getChild(d))?a[d]=l(t[d],i,n,h.resolvedType):a[d]=l(t[d],i,n));return a}return o.encode=function(e,i){"boolean"==typeof e&&(i=e,e=void 0);var n=!1;e||(e=new u$4,n=!0);var r=e.littleEndian;try{return t.encode(this,e.LE(),i),(n?e.flip():e).LE(r)}catch(t){throw e.LE(r),t}},r.encode=function(e,t,i){return new r(e).encode(t,i)},o.calculate=function(){return t.calculate(this)},o.encodeDelimited=function(e,i){var n=!1;e||(e=new u$4,n=!0);var r=(new u$4).LE();return t.encode(this,r,i).flip(),e.writeVarint32(r.remaining()),e.append(r),n?e.flip():e},o.encodeAB=function(){try{return this.encode().toArrayBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toArrayBuffer()),e}},o.toArrayBuffer=o.encodeAB,o.encodeNB=function(){try{return this.encode().toBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBuffer()),e}},o.toBuffer=o.encodeNB,o.encode64=function(){try{return this.encode().toBase64()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBase64()),e}},o.toBase64=o.encode64,o.encodeHex=function(){try{return this.encode().toHex()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toHex()),e}},o.toHex=o.encodeHex,o.toRaw=function(e,t){return l(this,!!e,!!t,this.$type)},o.encodeJSON=function(){return JSON.stringify(l(this,!0,!0,this.$type))},r.decode=function(e,i,n){"string"==typeof i&&(n=i,i=-1),"string"==typeof e?e=u$4.wrap(e,n||"base64"):u$4.isByteBuffer(e)||(e=u$4.wrap(e));var r=e.littleEndian;try{var o=t.decode(e.LE(),i);return e.LE(r),o}catch(t){throw e.LE(r),t}},r.decodeDelimited=function(e,i){if("string"==typeof e?e=u$4.wrap(e,i||"base64"):u$4.isByteBuffer(e)||(e=u$4.wrap(e)),e.remaining()<1)return null;var n=e.offset,r=e.readVarint32();if(e.remaining()<r)return e.offset=n,null;try{var o=t.decode(e.slice(e.offset,e.offset+r).LE());return e.offset+=r,o}catch(t){throw e.offset+=r,t}},r.decode64=function(e){return r.decode(e,"base64")},r.decodeHex=function(e){return r.decode(e,"hex")},r.decodeJSON=function(e){return new r(JSON.parse(e))},o.toString=function(){return t.toString()},Object.defineProperty&&(Object.defineProperty(r,"$options",{value:t.buildOpt()}),Object.defineProperty(o,"$options",{value:r.$options}),Object.defineProperty(r,"$type",{value:t}),Object.defineProperty(o,"$type",{value:t})),r}(e,this);this._fields=[],this._fieldsById={},this._fieldsByName={},this._oneofsByName={};for(var n,r=0,o=this.children.length;r<o;r++)if((n=this.children[r])instanceof _||n instanceof u||n instanceof x){if(i.hasOwnProperty(n.name))throw Error("Illegal reflect child of "+this.toString(!0)+": "+n.toString(!0)+" cannot override static property '"+n.name+"'");i[n.name]=n.build()}else if(n instanceof u.Field)n.build(),this._fields.push(n),this._fieldsById[n.id]=n,this._fieldsByName[n.name]=n;else if(n instanceof u.OneOf)this._oneofsByName[n.name]=n;else if(!(n instanceof u.OneOf||n instanceof g))throw Error("Illegal reflect child of "+this.toString(!0)+": "+this.children[r].toString(!0));return this.clazz=i},c.encode=function(e,t,i){for(var n,r,o=null,a=0,s=this._fields.length;a<s;++a)r=e[(n=this._fields[a]).name],n.required&&null===r?null===o&&(o=n):n.encode(i?r:n.verifyValue(r),t,e);if(null!==o){var l=Error("Missing at least one required field for "+this.toString(!0)+": "+o);throw l.encoded=t,l}return t},c.calculate=function(e){for(var t,i,n=0,r=0,o=this._fields.length;r<o;++r){if(i=e[(t=this._fields[r]).name],t.required&&null===i)throw Error("Missing at least one required field for "+this.toString(!0)+": "+t);n+=t.calculate(i,e)}return n},c.decode=function(t,i,n){"number"!=typeof i&&(i=-1);for(var r,o,a,s,l=t.offset,u=new this.clazz;t.offset<l+i||-1===i&&t.remaining()>0;){if(a=(r=t.readVarint32())>>>3,(o=7&r)===e.WIRE_TYPES.ENDGROUP){if(a!==n)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+a+" ("+(n?n+" expected":"not a group")+")");break}if(s=this._fieldsById[a]){if(s.repeated&&!s.options.packed)u[s.name].push(s.decode(o,t));else if(s.map){var c=s.decode(o,t);u[s.name].set(c[0],c[1])}else if(u[s.name]=s.decode(o,t),s.oneof){var d=u[s.oneof.name];null!==d&&d!==s.name&&(u[d]=null),u[s.oneof.name]=s.name}}else switch(o){case e.WIRE_TYPES.VARINT:t.readVarint32();break;case e.WIRE_TYPES.BITS32:t.offset+=4;break;case e.WIRE_TYPES.BITS64:t.offset+=8;break;case e.WIRE_TYPES.LDELIM:var f=t.readVarint32();t.offset+=f;break;case e.WIRE_TYPES.STARTGROUP:for(;h(a,t););break;default:throw Error("Illegal wire type for unknown field "+a+" in "+this.toString(!0)+"#decode: "+o)}}for(var p=0,_=this._fields.length;p<_;++p)if(null===u[(s=this._fields[p]).name])if("proto3"===this.syntax)u[s.name]=s.defaultValue;else{if(s.required){var m=Error("Missing at least one required field for "+this.toString(!0)+": "+s.name);throw m.decoded=u,m}e.populateDefaults&&null!==s.defaultValue&&(u[s.name]=s.defaultValue)}return u},t.Message=u;var d=function(t,n,r,o,a,s,l,c,h,d){i.call(this,t,n,s),this.className="Message.Field",this.required="required"===r,this.repeated="repeated"===r,this.map="map"===r,this.keyType=o||null,this.type=a,this.resolvedType=null,this.id=l,this.options=c||{},this.defaultValue=null,this.oneof=h||null,this.syntax=d||"proto2",this.originalName=this.name,this.element=null,this.keyElement=null,this.builder.options.convertFieldsToCamelCase&&!(this instanceof u.ExtensionField)&&(this.name=e.Util.toCamelCase(this.name))},f=d.prototype=Object.create(i.prototype);f.build=function(){this.element=new a(this.type,this.resolvedType,!1,this.syntax,this.name),this.map&&(this.keyElement=new a(this.keyType,void 0,!0,this.syntax,this.name)),"proto3"!==this.syntax||this.repeated||this.map?typeof this.options.default<"u"&&(this.defaultValue=this.verifyValue(this.options.default)):this.defaultValue=a.defaultFieldValue(this.type)},f.verifyValue=function(t,i){i=i||!1;var n,r=this;function o(e,t){throw Error("Illegal value for "+r.toString(!0)+" of type "+r.type.name+": "+e+" ("+t+")")}if(null===t)return this.required&&o(typeof t,"required"),"proto3"===this.syntax&&this.type!==e.TYPES.message&&o(typeof t,"proto3 field without field presence cannot be null"),null;if(this.repeated&&!i){Array.isArray(t)||(t=[t]);var a=[];for(n=0;n<t.length;n++)a.push(this.element.verifyValue(t[n]));return a}return this.map&&!i?t instanceof e.Map?t:(t instanceof Object||o(typeof t,"expected ProtoBuf.Map or raw object for map field"),new e.Map(this,t)):(!this.repeated&&Array.isArray(t)&&o(typeof t,"no array expected"),this.element.verifyValue(t))},f.hasWirePresence=function(t,i){if("proto3"!==this.syntax)return null!==t;if(this.oneof&&i[this.oneof.name]===this.name)return!0;switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return 0!==t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return 0!==t.low||0!==t.high;case e.TYPES.bool:return t;case e.TYPES.float:case e.TYPES.double:return 0!==t;case e.TYPES.string:return t.length>0;case e.TYPES.bytes:return t.remaining()>0;case e.TYPES.enum:return 0!==t;case e.TYPES.message:return null!==t;default:return!0}},f.encode=function(t,i,n){if(null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===t||this.repeated&&0==t.length)return i;try{var r;if(this.repeated)if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){i.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),i.ensureCapacity(i.offset+=1);var o=i.offset;for(r=0;r<t.length;r++)this.element.encodeValue(this.id,t[r],i);var a=i.offset-o,s=u$4.calculateVarint32(a);if(s>1){var l=i.slice(o,i.offset);o+=s-1,i.offset=o,i.append(l)}i.writeVarint32(a,o-s)}else for(r=0;r<t.length;r++)i.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,t[r],i);else this.map?t.forEach((function(t,n,r){var o=u$4.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,n)+u$4.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,t);i.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),i.writeVarint32(o),i.writeVarint32(8|this.keyType.wireType),this.keyElement.encodeValue(1,n,i),i.writeVarint32(16|this.type.wireType),this.element.encodeValue(2,t,i)}),this):this.hasWirePresence(t,n)&&(i.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,t,i))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+t+" ("+e+")")}return i},f.calculate=function(t,i){if(t=this.verifyValue(t),null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===t||this.repeated&&0==t.length)return 0;var n=0;try{var r,o;if(this.repeated)if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){for(n+=u$4.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),o=0,r=0;r<t.length;r++)o+=this.element.calculateLength(this.id,t[r]);n+=u$4.calculateVarint32(o),n+=o}else for(r=0;r<t.length;r++)n+=u$4.calculateVarint32(this.id<<3|this.type.wireType),n+=this.element.calculateLength(this.id,t[r]);else this.map?t.forEach((function(t,i,r){var o=u$4.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,i)+u$4.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,t);n+=u$4.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),n+=u$4.calculateVarint32(o),n+=o}),this):this.hasWirePresence(t,i)&&(n+=u$4.calculateVarint32(this.id<<3|this.type.wireType),n+=this.element.calculateLength(this.id,t))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+t+" ("+e+")")}return n},f.decode=function(t,i,n){var r,o;if(!(!this.map&&t==this.type.wireType||!n&&this.repeated&&this.options.packed&&t==e.WIRE_TYPES.LDELIM||this.map&&t==e.WIRE_TYPES.LDELIM))throw Error("Illegal wire type for field "+this.toString(!0)+": "+t+" ("+this.type.wireType+" expected)");if(t==e.WIRE_TYPES.LDELIM&&this.repeated&&this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0&&!n){o=i.readVarint32(),o=i.offset+o;for(var s=[];i.offset<o;)s.push(this.decode(this.type.wireType,i,!0));return s}if(this.map){var l=a.defaultFieldValue(this.keyType);if(r=a.defaultFieldValue(this.type),o=i.readVarint32(),i.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+i.remaining());var u=i.clone();for(u.limit=u.offset+o,i.offset+=o;u.remaining()>0;){var c=u.readVarint32();t=7&c;var h=c>>>3;if(1===h)l=this.keyElement.decode(u,t,h);else{if(2!==h)throw Error("Unexpected tag in map field key/value submessage");r=this.element.decode(u,t,h)}}return[l,r]}return this.element.decode(i,t,this.id)},t.Message.Field=d;var p=function(e,t,i,n,r,o,a){d.call(this,e,t,i,null,n,r,o,a),this.extension};p.prototype=Object.create(d.prototype),t.Message.ExtensionField=p;t.Message.OneOf=function(e,t,n){i.call(this,e,t,n),this.fields=[]};var _=function(e,t,i,n,o){r.call(this,e,t,i,n,o),this.className="Enum",this.object=null};_.getName=function(e,t){for(var i,n=Object.keys(e),r=0;r<n.length;++r)if(e[i=n[r]]===t)return i;return null},(_.prototype=Object.create(r.prototype)).build=function(t){if(this.object&&!t)return this.object;for(var i=new e.Builder.Enum,n=this.getChildren(_.Value),r=0,o=n.length;r<o;++r)i[n[r].name]=n[r].id;return Object.defineProperty&&Object.defineProperty(i,"$options",{value:this.buildOpt(),enumerable:!1}),this.object=i},t.Enum=_;var m=function(e,t,n,r){i.call(this,e,t,n),this.className="Enum.Value",this.id=r};m.prototype=Object.create(i.prototype),t.Enum.Value=m;var g=function(e,t,n,r){i.call(this,e,t,n),this.field=r};g.prototype=Object.create(i.prototype),t.Extension=g;var x=function(e,t,i,n){r.call(this,e,t,i,n),this.className="Service",this.clazz=null};(x.prototype=Object.create(r.prototype)).build=function(t){return this.clazz&&!t?this.clazz:this.clazz=function(e,t){for(var i=function(t){e.Builder.Service.call(this),this.rpcImpl=t||function(e,t,i){setTimeout(i.bind(this,Error("Not implemented")),0)}},n=i.prototype=Object.create(e.Builder.Service.prototype),r=t.getChildren(e.Reflect.Service.RPCMethod),o=0;o<r.length;o++)!function(e){n[e.name]=function(i,n){try{try{i=e.resolvedRequestType.clazz.decode(u$4.wrap(i))}catch(e){if(!(e instanceof TypeError))throw e}if(null===i||"object"!=typeof i)throw Error("Illegal arguments");i instanceof e.resolvedRequestType.clazz||(i=new e.resolvedRequestType.clazz(i)),this.rpcImpl(e.fqn(),i,(function(i,r){if(i)n(i);else{null===r&&(r="");try{r=e.resolvedResponseType.clazz.decode(r)}catch{}r&&r instanceof e.resolvedResponseType.clazz?n(null,r):n(Error("Illegal response type received in service method "+t.name+"#"+e.name))}}))}catch(e){setTimeout(n.bind(this,e),0)}},i[e.name]=function(t,n,r){new i(t)[e.name](n,r)},Object.defineProperty&&(Object.defineProperty(i[e.name],"$options",{value:e.buildOpt()}),Object.defineProperty(n[e.name],"$options",{value:i[e.name].$options}))}(r[o]);return Object.defineProperty&&(Object.defineProperty(i,"$options",{value:t.buildOpt()}),Object.defineProperty(n,"$options",{value:i.$options}),Object.defineProperty(i,"$type",{value:t}),Object.defineProperty(n,"$type",{value:t})),i}(e,this)},t.Service=x;var y=function(e,t,n,r){i.call(this,e,t,n),this.className="Service.Method",this.options=r||{}};(y.prototype=Object.create(i.prototype)).buildOpt=o.buildOpt,t.Service.Method=y;var v=function(e,t,i,n,r,o,a,s){y.call(this,e,t,i,s),this.className="Service.RPCMethod",this.requestName=n,this.responseName=r,this.requestStream=o,this.responseStream=a,this.resolvedRequestType=null,this.resolvedResponseType=null};return v.prototype=Object.create(y.prototype),t.Service.RPCMethod=v,t}(f$7),f$7.Builder=function(e,t,i){var n=function(e){this.ns=new i.Namespace(this,null,""),this.ptr=this.ns,this.resolved=!1,this.result=null,this.files={},this.importRoot=null,this.options=e||{}},r=n.prototype;function o(e){e.messages&&e.messages.forEach((function(t){t.syntax=e.syntax,o(t)})),e.enums&&e.enums.forEach((function(t){t.syntax=e.syntax}))}return n.isMessage=function(e){return!("string"!=typeof e.name||typeof e.values<"u"||typeof e.rpc<"u")},n.isMessageField=function(e){return!("string"!=typeof e.rule||"string"!=typeof e.name||"string"!=typeof e.type||typeof e.id>"u")},n.isEnum=function(e){return!("string"!=typeof e.name||typeof e.values>"u"||!Array.isArray(e.values)||0===e.values.length)},n.isService=function(e){return!("string"!=typeof e.name||"object"!=typeof e.rpc||!e.rpc)},n.isExtend=function(e){return"string"==typeof e.ref},r.reset=function(){return this.ptr=this.ns,this},r.define=function(e){if("string"!=typeof e||!t.TYPEREF.test(e))throw Error("illegal namespace: "+e);return e.split(".").forEach((function(e){var t=this.ptr.getChild(e);null===t&&this.ptr.addChild(t=new i.Namespace(this,this.ptr,e)),this.ptr=t}),this),this},r.create=function(t){if(!t)return this;if(Array.isArray(t)){if(0===t.length)return this;t=t.slice()}else t=[t];for(var r=[t];r.length>0;){if(t=r.pop(),!Array.isArray(t))throw Error("not a valid namespace: "+JSON.stringify(t));for(;t.length>0;){var o=t.shift();if(n.isMessage(o)){var a=new i.Message(this,this.ptr,o.name,o.options,o.isGroup,o.syntax),s={};o.oneofs&&Object.keys(o.oneofs).forEach((function(e){a.addChild(s[e]=new i.Message.OneOf(this,a,e))}),this),o.fields&&o.fields.forEach((function(e){if(null!==a.getChild(0|e.id))throw Error("duplicate or invalid field id in "+a.name+": "+e.id);if(e.options&&"object"!=typeof e.options)throw Error("illegal field options in "+a.name+"#"+e.name);var t=null;if("string"==typeof e.oneof&&!(t=s[e.oneof]))throw Error("illegal oneof in "+a.name+"#"+e.name+": "+e.oneof);e=new i.Message.Field(this,a,e.rule,e.keytype,e.type,e.name,e.id,e.options,t,o.syntax),t&&t.fields.push(e),a.addChild(e)}),this);var l=[];if(o.enums&&o.enums.forEach((function(e){l.push(e)})),o.messages&&o.messages.forEach((function(e){l.push(e)})),o.services&&o.services.forEach((function(e){l.push(e)})),o.extensions&&("number"==typeof o.extensions[0]?a.extensions=[o.extensions]:a.extensions=o.extensions),this.ptr.addChild(a),l.length>0){r.push(t),t=l,l=null,this.ptr=a,a=null;continue}l=null}else if(n.isEnum(o))a=new i.Enum(this,this.ptr,o.name,o.options,o.syntax),o.values.forEach((function(e){a.addChild(new i.Enum.Value(this,a,e.name,e.id))}),this),this.ptr.addChild(a);else if(n.isService(o))a=new i.Service(this,this.ptr,o.name,o.options),Object.keys(o.rpc).forEach((function(e){var t=o.rpc[e];a.addChild(new i.Service.RPCMethod(this,a,e,t.request,t.response,!!t.request_stream,!!t.response_stream,t.options))}),this),this.ptr.addChild(a);else{if(!n.isExtend(o))throw Error("not a valid definition: "+JSON.stringify(o));if(a=this.ptr.resolve(o.ref,!0))o.fields.forEach((function(t){if(null!==a.getChild(0|t.id))throw Error("duplicate extended field id in "+a.name+": "+t.id);if(a.extensions){var n=!1;if(a.extensions.forEach((function(e){t.id>=e[0]&&t.id<=e[1]&&(n=!0)})),!n)throw Error("illegal extended field id in "+a.name+": "+t.id+" (not within valid ranges)")}var r=t.name;this.options.convertFieldsToCamelCase&&(r=e.Util.toCamelCase(r));var o=new i.Message.ExtensionField(this,a,t.rule,t.type,this.ptr.fqn()+"."+r,t.id,t.options),s=new i.Extension(this,this.ptr,t.name,o);o.extension=s,this.ptr.addChild(s),a.addChild(o)}),this);else if(!/\.?google\.protobuf\./.test(o.ref))throw Error("extended message "+o.ref+" is not defined")}o=null,a=null}t=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},r.import=function(t,i){var n="/";if("string"==typeof i){if(e.Util.IS_NODE&&(i=require("path").resolve(i)),!0===this.files[i])return this.reset();this.files[i]=!0}else if("object"==typeof i){var r,a=i.root;if(e.Util.IS_NODE&&(a=require("path").resolve(a)),(a.indexOf("\\")>=0||i.file.indexOf("\\")>=0)&&(n="\\"),r=e.Util.IS_NODE?require("path").join(a,i.file):a+n+i.file,!0===this.files[r])return this.reset();this.files[r]=!0}if(t.imports&&t.imports.length>0){var s,l=!1;"object"==typeof i?(this.importRoot=i.root,l=!0,s=this.importRoot,i=i.file,(s.indexOf("\\")>=0||i.indexOf("\\")>=0)&&(n="\\")):"string"==typeof i?this.importRoot?s=this.importRoot:i.indexOf("/")>=0?""===(s=i.replace(/\/[^\/]*$/,""))&&(s="/"):i.indexOf("\\")>=0?(s=i.replace(/\\[^\\]*$/,""),n="\\"):s=".":s=null;for(var u=0;u<t.imports.length;u++)if("string"==typeof t.imports[u]){if(!s)throw Error("cannot determine import root");var c=t.imports[u];if("google/protobuf/descriptor.proto"===c||(c=e.Util.IS_NODE?require("path").join(s,c):s+n+c,!0===this.files[c]))continue;/\.proto$/i.test(c)&&!e.DotProto&&(c=c.replace(/\.proto$/,".json"));var h=e.Util.fetch(c);if(null===h)throw Error("failed to import '"+c+"' in '"+i+"': file not found");/\.json$/i.test(c)?this.import(JSON.parse(h+""),c):this.import(e.DotProto.Parser.parse(h),c)}else i?/\.(\w+)$/.test(i)?this.import(t.imports[u],i.replace(/^(.+)\.(\w+)$/,(function(e,t,i){return t+"_import"+u+"."+i}))):this.import(t.imports[u],i+"_import"+u):this.import(t.imports[u]);l&&(this.importRoot=null)}t.package&&this.define(t.package),t.syntax&&o(t);var d=this.ptr;return t.options&&Object.keys(t.options).forEach((function(e){d.options[e]=t.options[e]})),t.messages&&(this.create(t.messages),this.ptr=d),t.enums&&(this.create(t.enums),this.ptr=d),t.services&&(this.create(t.services),this.ptr=d),t.extends&&this.create(t.extends),this.reset()},r.resolveAll=function(){var n;if(null==this.ptr||"object"==typeof this.ptr.type)return this;if(this.ptr instanceof i.Namespace)this.ptr.children.forEach((function(e){this.ptr=e,this.resolveAll()}),this);else if(this.ptr instanceof i.Message.Field){if(t.TYPE.test(this.ptr.type))this.ptr.type=e.TYPES[this.ptr.type];else{if(!t.TYPEREF.test(this.ptr.type))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(!(n=(this.ptr instanceof i.Message.ExtensionField?this.ptr.extension.parent:this.ptr.parent).resolve(this.ptr.type,!0)))throw Error("unresolvable type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(this.ptr.resolvedType=n,n instanceof i.Enum){if(this.ptr.type=e.TYPES.enum,"proto3"===this.ptr.syntax&&"proto3"!==n.syntax)throw Error("proto3 message cannot reference proto2 enum")}else{if(!(n instanceof i.Message))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);this.ptr.type=n.isGroup?e.TYPES.group:e.TYPES.message}}if(this.ptr.map){if(!t.TYPE.test(this.ptr.keyType))throw Error("illegal key type for map field in "+this.ptr.toString(!0)+": "+this.ptr.keyType);this.ptr.keyType=e.TYPES[this.ptr.keyType]}"proto3"===this.ptr.syntax&&this.ptr.repeated&&void 0===this.ptr.options.packed&&-1!==e.PACKABLE_WIRE_TYPES.indexOf(this.ptr.type.wireType)&&(this.ptr.options.packed=!0)}else if(this.ptr instanceof e.Reflect.Service.Method){if(!(this.ptr instanceof e.Reflect.Service.RPCMethod))throw Error("illegal service type in "+this.ptr.toString(!0));if(!((n=this.ptr.parent.resolve(this.ptr.requestName,!0))&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.requestName);if(this.ptr.resolvedRequestType=n,!((n=this.ptr.parent.resolve(this.ptr.responseName,!0))&&n instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.responseName);this.ptr.resolvedResponseType=n}else if(!(this.ptr instanceof e.Reflect.Message.OneOf||this.ptr instanceof e.Reflect.Extension||this.ptr instanceof e.Reflect.Enum.Value))throw Error("illegal object in namespace: "+typeof this.ptr+": "+this.ptr);return this.reset()},r.build=function(e){if(this.reset(),this.resolved||(this.resolveAll(),this.resolved=!0,this.result=null),null===this.result&&(this.result=this.ns.build()),!e)return this.result;for(var t="string"==typeof e?e.split("."):e,i=this.result,n=0;n<t.length;n++){if(!i[t[n]]){i=null;break}i=i[t[n]]}return i},r.lookup=function(e,t){return e?this.ns.resolve(e,t):this.ns},r.toString=function(){return"Builder"},n.Message=function(){},n.Enum=function(){},n.Service=function(){},n}(f$7,f$7.Lang,f$7.Reflect),f$7.Map=function(e,t){var i=function(e,i){if(!e.map)throw Error("field is not a map");if(this.field=e,this.keyElem=new t.Element(e.keyType,null,!0,e.syntax),this.valueElem=new t.Element(e.type,e.resolvedType,!1,e.syntax),this.map={},Object.defineProperty(this,"size",{get:function(){return Object.keys(this.map).length}}),i)for(var n=Object.keys(i),r=0;r<n.length;r++){var o=this.keyElem.valueFromString(n[r]),a=this.valueElem.verifyValue(i[n[r]]);this.map[this.keyElem.valueToString(o)]={key:o,value:a}}},n=i.prototype;function r(e){var t=0;return{next:function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}}return n.clear=function(){this.map={}},n.delete=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e)),i=t in this.map;return delete this.map[t],i},n.entries=function(){for(var e,t=[],i=Object.keys(this.map),n=0;n<i.length;n++)t.push([(e=this.map[i[n]]).key,e.value]);return r(t)},n.keys=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].key);return r(e)},n.values=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].value);return r(e)},n.forEach=function(e,t){for(var i,n=Object.keys(this.map),r=0;r<n.length;r++)e.call(t,(i=this.map[n[r]]).value,i.key,this)},n.set=function(e,t){var i=this.keyElem.verifyValue(e),n=this.valueElem.verifyValue(t);return this.map[this.keyElem.valueToString(i)]={key:i,value:n},this},n.get=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e));if(t in this.map)return this.map[t].value},n.has=function(e){return this.keyElem.valueToString(this.keyElem.verifyValue(e))in this.map},i}(0,f$7.Reflect),f$7.loadProto=function(e,t,i){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(i=t,t=void 0),f$7.loadJson(f$7.DotProto.Parser.parse(e),t,i)},f$7.protoFromString=f$7.loadProto,f$7.loadProtoFile=function(e,t,i){if(t&&"object"==typeof t?(i=t,t=null):(!t||"function"!=typeof t)&&(t=null),t)return f$7.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,(function(n){if(null!==n)try{t(null,f$7.loadProto(n,i,e))}catch(e){t(e)}else t(Error("Failed to fetch file"))}));var n=f$7.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===n?null:f$7.loadProto(n,i,e)},f$7.protoFromFile=f$7.loadProtoFile,f$7.newBuilder=function(e){return typeof(e=e||{}).convertFieldsToCamelCase>"u"&&(e.convertFieldsToCamelCase=f$7.convertFieldsToCamelCase),typeof e.populateAccessors>"u"&&(e.populateAccessors=f$7.populateAccessors),new f$7.Builder(e)},f$7.loadJson=function(e,t,i){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(i=t,t=null),(!t||"object"!=typeof t)&&(t=f$7.newBuilder()),"string"==typeof e&&(e=JSON.parse(e)),t.import(e,i),t.resolveAll(),t},f$7.loadJsonFile=function(e,t,i){if(t&&"object"==typeof t?(i=t,t=null):(!t||"function"!=typeof t)&&(t=null),t)return f$7.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,(function(n){if(null!==n)try{t(null,f$7.loadJson(JSON.parse(n),i,e))}catch(e){t(e)}else t(Error("Failed to fetch file"))}));var n=f$7.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===n?null:f$7.loadJson(JSON.parse(n),i,e)},h$3.prototype.getCacheTile=function(e,t,i,n){for(var r=0;r<this.tileCache.length;r++)if(this.tileCache[r].x===e&&this.tileCache[r].y===t&&this.tileCache[r].z===i&&this.tileCache[r].t===n)return this.tileCache[r];return null},h$3.prototype.addCacheTile=function(e){this.tileCache.length>999&&this.tileCache.splice(0,500),this.removeCacheTile(e.x,e.y,e.z,e.t),this.tileCache.push(e)},h$3.prototype.removeCacheTile=function(e,t,i,n){for(var r=0;r<this.tileCache.length;r++)if(this.tileCache[r].x===e&&this.tileCache[r].y===t&&this.tileCache[r].z===i&&this.tileCache[r].t===n){this.tileCache.splice(r,1);break}},h$3.prototype.getCacheLabel=function(e){for(var t=0;t<this.labelCache.length;t++)if(this.labelCache[t].name===this._UUID&&this.labelCache[t].oid===e)return this.labelCache[t];return null},h$3.prototype.addCacheLabel=function(e){this.labelCache.length>999&&this.labelCache.splice(0,250),this.removeCacheLabel(e.oid),e.timestamp=(new Date).getTime(),this.labelCache.push(e)},h$3.prototype.removeCacheLabel=function(e){for(var t=0;t<this.labelCache.length;t++)if(this.labelCache[t].name===this._UUID&&this.labelCache[t].oid===e){this.labelCache.splice(t,1);break}},h$3.prototype.getTileUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.url+"/GetTiles?lxys={z},{x},{y}"+(this.token?"&tk="+this.token:"")},h$3.prototype.getIcoUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.url+"/GetIcon?id={id}"+(this.token?"&tk="+this.token:"")},h$3.prototype.getRoadTileUrl=function(){return(this.proxy?this.proxy.proxy:"")+this.roadUrl},h$3.prototype._cluster=function(e){if(!(e$2e(e)&&e<.05)){var t=this;clearTimeout(this._timer);var i=this.viewer.scene.globe._surface;if(i._tilesToRender.length<8||0<i._tileLoadQueueHigh.length)this._timer=setTimeout((function(){t._cluster()}),100);else{var n=this.getTilesToRender();if(this.compareArray(n,this._latelyGrid))return;this._queueCall(n),t.delaySynchronous()}}},h$3.prototype._changed=function(e){if(!(e$2e(e)&&e<.05)){var t=(new Date).getTime(),i=t-this._latelyRefreshStamp,n=t-this._latelyCollisionStamp;if(i>300&&this._cluster(),n>150&&this.aotuCollide&&this.collisionDetection(),this.depthTestOptimization){var r=this.viewer.scene,o=r.globe,a=r.camera,s=a.positionCartographic.height,l=a.pitch,u=this.dTOElevation,c=this.dTOPitch;this._isDTP=o.depthTestAgainstTerrain=s<u&&c<l}}},h$3.prototype._queueCall=function(e){var t=this;t._latelyGrid=e,t._latelyRefreshStamp=(new Date).getTime(),e.forEach((function(e,i,n){if(t.metadata&&G$3(t.metadata.boundBox,e.boundBox)){if(t.metadata.minLevel>e.level+1||t.metadata.maxLevel<e.level+1)return;var r=t.getCacheTile(e.x,e.y,e.level+1,0);if(r)t.addLabelAndIco(r);else{var o=t.getTileUrl().replace("{z}",e.level+1).replace("{y}",e.y).replace("{x}",e.x).replace("{s}",t.subdomains[(e.x+e.y+e.level)%t.subdomains.length]);(a=new XMLHttpRequest).open("GET",o,!0),a.responseType="arraybuffer",a.onload=function(){if(!(a.status<200||300<=a.status)){var e=t.CutString(a.response);if(e)(i=H$3(e)).x=this.tile.x,i.y=this.tile.y,i.z=this.tile.z,i.t=0,t.addCacheTile(i),t.addLabelAndIco(i);else{var i={x:this.tile.x,y:this.tile.y,z:this.tile.z,t:0};t.addCacheTile(i),t.delaySynchronous()}}},a.onerror=function(e){console.error(e)},a.send(),a.tile={x:e.x,y:e.y,z:e.level+1}}}if(t.roadMetadata&&G$3(t.roadMetadata.boundBox,e.boundBox)){if(t.roadMetadata.minLevel>e.level+1||t.roadMetadata.maxLevel<e.level+1)return;if(b=t.getCacheTile(e.x,e.y,e.level+1,1))t.addLabelAndIco(b);else{var a,s=t.getRoadTileUrl().replace("{z}",e.level+1).replace("{y}",e.y).replace("{x}",e.x);(a=new XMLHttpRequest).open("GET",s,!0),a.responseType="json",a.onload=function(){if(!(a.status<200||300<=a.status)){var e=a.response;if(e){var i={pois:e.map((function(e,t,i){return{oid:e.LabelPoint.X+"_"+e.LabelPoint.Y,name:e.Feature.properties.Name,coordinate:[e.LabelPoint.X,e.LabelPoint.Y,e.LabelPoint.Z?e.LabelPoint.Z:0]}})),x:this.tile.x,y:this.tile.y,z:this.tile.z,t:1};t.addCacheTile(i),t.addLabelAndIco(i)}else i={x:this.tile.x,y:this.tile.y,z:this.tile.z,t:1};t.addCacheTile(i),t.delaySynchronous()}},a.onerror=function(e){console.error(e)},a.send(),a.tile={x:e.x,y:e.y,z:e.level+1}}}}))},h$3.prototype.getTilesToRender=function(){var e=this.viewer.scene.globe._surface._tilesToRender.map((function(e){return{x:e.x,y:e.y,level:e.level,boundBox:{minX:e$2d.toDegrees(e.rectangle.west),minY:e$2d.toDegrees(e.rectangle.south),maxX:e$2d.toDegrees(e.rectangle.east),maxY:e$2d.toDegrees(e.rectangle.north)}}})).sort((function(e,t){return t.level-e.level}));return e},h$3.prototype.addLabelAndIco=function(e){if(e.pois)for(var t=0;t<e.pois.length;t++){var i=this.getCacheLabel(e.pois[t].oid);i=i||this.createLabel(e.pois[t],e),this.addCacheLabel(i)}this.delaySynchronous()},h$3.prototype.delaySynchronous=function(){var e=this;clearTimeout(this._timer2),e._timer2=setTimeout((function(){e.synchronousLabel()}),100)},h$3.prototype.synchronousLabel=function(){for(var e=0;e<this.labelCache.length;e++)this.labelCache[e].timestamp>=this._latelyRefreshStamp&&!this.viewer.entities.contains(this.labelCache[e])&&(this._isInitial&&this.aotuCollide&&(this.labelCache[e].show=!1),this.viewer.entities.add(this.labelCache[e]));if(!this._isInitial){for(e=0;e<this.viewer.entities.values.length;e++)!this.viewer.entities.values[e].name||this.viewer.entities.values[e].name!==this._UUID&&this.viewer.entities.values[e].name!==this._UUIDRoad||this.viewer.entities.values[e].timestamp<this._latelyRefreshStamp&&(this.viewer.entities.remove(this.viewer.entities.values[e]),e--);this.aotuCollide&&this.collisionDetection()}},h$3.prototype.createLabel=function(e,t){if(e$2e(e)){var i={show:!0,position:o$1p.fromDegrees(e.coordinate[0],e.coordinate[1],e.coordinate[2]),label:{text:e.name}};i.label.font=this.labelGraphics.font||e.fontSize+"px "+t.stringTable[e.fontNameIndex]||"30px 微软雅黑",i.label.style=this.labelGraphics.style||R$S.FILL_AND_OUTLINE,i.label.scale=this.labelGraphics.scale||e.scale||1,i.label.showBackground=this.labelGraphics.showBackground||e.showBackground||!1,i.label.backgroundColor=this.labelGraphics.backgroundColor||e.backgroundColor,i.label.backgroundPadding=this.labelGraphics.backgroundPadding||e.backgroundPadding,i.label.pixelOffset=this.labelGraphics.pixelOffset||e.pixelOffset||new o$1o(0,0),i.label.eyeOffset=this.labelGraphics.eyeOffset||e.eyeOffset,i.label.horizontalOrigin=this.labelGraphics.horizontalOrigin||e.horizontalOrigin,i.label.verticalOrigin=this.labelGraphics.verticalOrigin||e.verticalOrigin,i.label.heightReference=this.labelGraphics.heightReference||k$R.NONE,i.label.fillColor=this.labelGraphics.fillColor||e$1X.fromCssColorString(this.HexadecimalConversion(e.fontColor)),i.label.outlineColor=this.labelGraphics.outlineWidth||e$1X.fromCssColorString(this.HexadecimalConversion(e.shiningColor)),i.label.outlineWidth=this.labelGraphics.outlineWidth||e.shiningSize,i.label.translucencyByDistance=void 0,i.label.pixelOffsetScaleByDistance=void 0,i.label.scaleByDistance=this.labelGraphics.scaleByDistance||void 0,i.label.distanceDisplayCondition=void 0,i.label.disableDepthTestDistance=Number.POSITIVE_INFINITY;var n=new h$W(i);return n.name=t.t?this._UUIDRoad:this._UUID,n.oid=e.oid,n.priority=e.priority?e.priority:0,n.xyz=t.x+"_"+t.y+"_"+(t.z-1),n}},h$3.prototype.collisionDetection=function(){var e=this.viewer.scene._view.viewport,t=e.x,i=e.x+e.width,n=e.y,r=e.y+e.height,o=[],a=this,s=this.viewer.entities.values;s.sort((function(e,t){return e.priority-t.priority})),s.map((function(e){if(e.name&&(e.name===a._UUID||e.name===a._UUIDRoad)){var s=s$R.wgs84ToDrawingBufferCoordinates(a.viewer.scene,e.position.getValue(0));if(e$2e(s)){e._screenSpacePosition=s;var l=a.getLabelReact({point:s,entity:e});e.collisionBox=l,s.x>=t&&s.x<=i&&s.y>=n&&s.y<=r?(e.show=!0,o.push({anno:e,clustered:!0,coord:s})):e.show=!1}else e.show=!1}}));for(var l=O$D(o,A$6,N$3,64,Int32Array),u=o.length,c=0;c<u;c++){for(var h=o[c],d=h.anno.collisionBox,f=l.intersect(d.x,d.y,d.x+d.width,d.y+d.height,o,F$3,M$3),p=f.length,_=0,m=0;m<p;m++){var g=f[m],x=o[g];c!==g&&!x.clustered&&++_}_<1?h.clustered=!1:h.anno.show=!1}},h$3.prototype.bindEvent=function(){this.viewer.scene.camera.moveEnd.addEventListener(this._cluster,this),this.viewer.scene.camera.changed.addEventListener(this._changed,this);this.viewer.scene.terrainProvider.readyPromise.then(this._cluster.bind(this))},h$3.prototype.unbindEvent=function(){this.viewer.scene.camera.moveEnd.removeEventListener(this._cluster,this),this.viewer.scene.camera.changed.removeEventListener(this._changed,this)},h$3.prototype.activate=function(){this._latelyGrid=[],this._cluster()},h$3.prototype.destroy=function(){for(var e=0;e<this.viewer.entities.values.length;e++)!this.viewer.entities.values[e].name||this.viewer.entities.values[e].name!==this._UUID&&this.viewer.entities.values[e].name!==this._UUIDRoad||(this.viewer.entities.remove(this.viewer.entities.values[e]),e--);this.viewer.camera.percentageChanged=.5,this.unbindEvent(),this.handler=this.handler&&this.handler.destroy(),this.proxy=void 0,this.viewer=void 0,this.url=void 0,this.labelGraphics=void 0,this.billboardGraphics=void 0,this.aotuCollide=void 0,this.collisionPadding=void 0,this.tileCache=void 0,this.labelCache=void 0,this._latelyGrid=void 0,this._latelyRefreshStamp=void 0,this._roadTileset=void 0},h$3.prototype.compareArray=function(e,t){for(var i=!1,n=0;n<e.length;n++){for(var r=!1,o=0;o<t.length;o++)if(e[n].x===t[o].x&&e[n].y===t[o].y&&e[n].level===t[o].level){r=!0;break}if(!r){i=!0;break}}return!i},h$3.prototype.getLabelReact=function(e){var t=parseInt(e.entity.label.font);t=t>0?t:15;for(var i=e.entity.label.text.getValue(0).split("\n"),n=0,r=i.length,o=0;o<i.length;o++){var a=V$3(i[o])/2;n<a&&(n=a)}var s=e.entity.billboard?e.entity.billboard.width.getValue(0)*e.entity.billboard.scale.getValue(0):1,l=e.entity.billboard?e.entity.billboard.height.getValue(0)*e.entity.billboard.scale.getValue(0):1,u=e.entity.label.pixelOffset,c=u.getValue(0).x;c<0&&(c=0);var h=u.getValue(0).y;return h<0&&(h=0),{x:(e.point?e.point.x:-999)-s/2-this.collisionPadding[3],y:(e.point?e.point.y:-999)-l/2-this.collisionPadding[0],width:t*e.entity.label.scale.getValue(0)*n+c+s+this.collisionPadding[1],height:t*e.entity.label.scale.getValue(0)*(r+.5*(r-1))+h+l/2+this.collisionPadding[2]}},h$3.prototype.CutString=function(e){if(!e)return"";var t=e.byteLength;return t<=28?"":e.slice(19,t-9)},h$3.prototype.HexadecimalConversion=function(e){if(4278190080===e)return"#000000";var t=4278190080|parseInt(-Number(e));if(e="",(t=t.toString(16).substring(1)).length<6)for(var i=6-t.length,n=0;n<i;n++)e+="0";return"#"+e+t},h$3.prototype.getLabelVisibility=function(e){if(!e)return!1;var t=this.viewer.canvas.getBoundingClientRect();return!(e.x<-10||e.x>t.right+10||e.y<-10||e.y>t.bottom+10)};var V$3=function(e){for(var t=0,i=0;i<e.length;i++)null!=e.charAt(i).match(/[^\x00-\xff]/gi)?t+=2:t+=1;return t},H$3=function(e){var t={stringTable:[],pois:[],enumGeometryType:[{ePoint:0},{eMultiLineString:1},{ePolygon:2}],enumZCoordType:[{eCloseGround:0},{eCloseSeaSurface:1},{eRelativelyGround:2},{eAbsolute:3}]},i=function(){if(!f$7)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return f$7.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;} ;message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Interate = 5;optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI.proto").build("GEOPOI").PBPOITile}(),n=function(){if(!f$7)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return f$7.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;};enum enumZCoordType {eCloseGround = 0;eCloseSeaSurface = 1;eRelativelyGround = 2;eAbsolute = 3;};message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Interate = 5;optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];optional enumZCoordType ZCoordType = 16 [default = eAbsolute];};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI2.proto").build("GEOPOI").PBPOITile}(),r=function(){if(!f$7)throw new Error("ProtoBuf.js is not present. Please see www/index.html for manual setup instructions.");return f$7.loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;};enum enumZCoordType {eCloseGround = 0;eCloseSeaSurface = 1;eRelativelyGround = 2;eAbsolute = 3;};message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Priority = 5;repeated int32 Interates =6 [packed=true];optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32\tFontNameIndex=13 [default =0];optional int32\tFontSize=14 [default =18];optional uint32\tFontColor=15 [default =0];optional enumZCoordType ZCoordType = 16 [default = eAbsolute];optional int32 FontStyle=17;optional int32 ShiningSize=18;};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};","GEOPOI","GeoPOI3.proto").build("GEOPOI").PBPOITile}();t.pois.length=0;var o,a=e;try{o=r.decode(a)}catch{console.log("message")}if(!o)try{results=n.decode(a)}catch{console.log("message"),results=i.decode(a)}t.version=parseInt(o.Version.toString()),t.titleKey=parseInt(o.TileKey.toString()),t.stringTable=[];for(var s=o.StringTable.s.length,l=0;l<s;l++)t.stringTable.push(o.StringTable.s[l].toString());return o.POIS.forEach((function(e){var i={};i.oid=parseInt(e.OID.toString())+"_"+t.titleKey,i.name=e.Name.toString(),i.symbolID=parseInt(e.SymbolID.toString()),i.displayHeight=e.DisplayHeight,i.shiningColor=e.ShiningColor,i.fontNameIndex=e.FontNameIndex,i.fontSize=e.FontSize,i.fontColor=e.FontColor,e.ZCoordType&&(i.zCoordType=e.ZCoordType),i.geometryType=e.GeometryType,i.coordinate=e.Coordinates,i.priority=void 0===e.Priority?null:e.Priority,i.interates=void 0===e.Interates?null:e.Interates,i.fontStyle=void 0===e.FontStyle?null:e.FontStyle,i.shiningSize=void 0===e.ShiningSize?null:e.ShiningSize,t.pois.push(i)})),t},_$5={IMG_W:"img_w",IMG_C:"img_c",CIA_W:"cia_w",CIA_C:"cia_c",VEC_W:"vec_w",VEC_C:"vec_c",TER_W:"ter_w",TER_C:"ter_c",CVA_W:"cva_w",CVA_C:"cva_c",CTA_W:"cta_w",CTA_C:"cta_c",IBO_W:"ibo_w",IBO_C:"ibo_c",EIA_W:"eia_w",EIA_C:"eia_c",EVA_W:"eva_w",EVA_C:"eva_c"},t$7=Object.freeze(_$5);function f$6(e){e=u$Z(e,{}),this._mapStyle=u$Z(e.mapStyle,t$7.IMG_W),this._url=u$Z(e.url,_$4[this._mapStyle]),this._token=e.token,this._layer=u$Z(e.layer,r$c[this._mapStyle]),this._style=u$Z(e.style,"default"),this._tileMatrixSetID=u$Z(e.tileMatrixSetID,a$1[this._mapStyle]),this._tileMatrixLabels=u$Z(e.tileMatrixLabels,i$7[this._mapStyle]),this._format=u$Z(e.format,n$5[this._mapStyle]),this._epsgCode=s$6[this._mapStyle],this._tilingScheme=u$Z(e.tilingScheme,new c$S({})),"4490"==this._epsgCode&&(this._tilingScheme=new g$15),this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._minimumLevel=u$Z(e.minimumLevel,0),this._maximumLevel=u$Z(e.maximumLevel,i$7[this._mapStyle].length),this._rectangle=u$Z(e.rectangle,this._tilingScheme.rectangle),this._readyPromise=o$1l.resolve(!0),this._errorEvent=new o$1h;var t=e.credit;this._credit="string"==typeof t?new r$U(t):t,this._subdomains=u$Z(e.subdomains,["t0","t1","t2","t3","t4","t5","t6","t7"]),this._tileDiscardPolicy=e.tileDiscardPolicy;var i=this,n=this._url;i.tablename=this._url,new l$14({name:n}).then((function(e){e.checkObjectStoreExit(i.tablename)?i._indexedDBScheduler=e:e.createObjectStore(i.tablename).then((function(){i._indexedDBScheduler=e}))})),i._indexedDBSetting={isOpen:!1,clear:function(){i._indexedDBScheduler.clear(i.tablename)},cache:[]}}function B$2(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<<r,a=0;i$Q(t,o)?i$Q(e,o)&&(a|=1):(a|=2,i$Q(e,o)||(a|=1)),n+=a}return n}Object.defineProperties(f$6.prototype,{url:{get:function(){return this._url}},mapStyle:{get:function(){return this._mapStyle}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},errorEvent:{get:function(){return this._errorEvent}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}}}),f$6.prototype.requestImage=function(e,t,i,n){var r=D$2(this,e,t,i),o=B$2(e,t,i);if(n.quadKey=o,!0===this._indexedDBSetting.isOpen&&n.cacheEnable){if(e$2e(this._indexedDBScheduler)){var a=this._indexedDBScheduler.getElementFromDB(this.tablename,o);return e$2e(a)?o$1l(a,(function(e){return e$2e(e)?e:"cacheError"}),(function(e){return"cacheError"})):e$i.loadImage(this,r)}return e$i.loadImage(this,r)}return e$i.loadImage(this,r)};var L$6=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function D$2(e,t,i,n){"900913"==e._epsgCode&&(n-=1);var r=e._tileMatrixLabels,o=e$2e(r)?r[n]:n.toString(),a=e._subdomains,s=e._url.replace("[subdomain]",a[(t+i+n)%a.length]),l=new h$16(s),u=m$1c(u$Z(l.query,""));(u=p$19(L$6,u)).tilematrix=o,u.layer=e._layer,u.style=e._style,u.tilerow=i,u.tilecol=t,u.tilematrixset=e._tileMatrixSetID,u.format=e._format,l.query=m$1d(u),s=l.toString();var c=e._proxy;return e$2e(c)&&(s=c.getURL(s)),e$2e(e._token)&&(s+="&tk="+e._token),s}f$6.prototype.pickFeatures=function(){};var _$4={};_$4[t$7.IMG_W]="https://[subdomain].tianditu.gov.cn/img_w/wmts",_$4[t$7.IMG_C]="https://[subdomain].tianditu.gov.cn/img_c/wmts",_$4[t$7.CIA_W]="https://[subdomain].tianditu.gov.cn/cia_w/wmts",_$4[t$7.CIA_C]="https://[subdomain].tianditu.gov.cn/cia_c/wmts",_$4[t$7.VEC_W]="https://[subdomain].tianditu.gov.cn/vec_w/wmts",_$4[t$7.VEC_C]="https://[subdomain].tianditu.gov.cn/vec_c/wmts",_$4[t$7.TER_W]="https://[subdomain].tianditu.gov.cn/ter_w/wmts",_$4[t$7.TER_C]="https://[subdomain].tianditu.gov.cn/ter_c/wmts",_$4[t$7.CVA_W]="https://[subdomain].tianditu.gov.cn/cva_w/wmts",_$4[t$7.CVA_C]="https://[subdomain].tianditu.gov.cn/cva_c/wmts",_$4[t$7.CTA_W]="https://[subdomain].tianditu.gov.cn/cta_w/wmts",_$4[t$7.CTA_C]="https://[subdomain].tianditu.gov.cn/cta_c/wmts",_$4[t$7.EIA_W]="https://[subdomain].tianditu.gov.cn/eia_w/wmts",_$4[t$7.EIA_C]="https://[subdomain].tianditu.gov.cn/eia_c/wmts",_$4[t$7.EVA_W]="https://[subdomain].tianditu.gov.cn/eva_w/wmts",_$4[t$7.EVA_C]="https://[subdomain].tianditu.gov.cn/eva_c/wmts",_$4[t$7.IBO_W]="https://[subdomain].tianditu.gov.cn/ibo_w/wmts",_$4[t$7.IBO_C]="https://[subdomain].tianditu.gov.cn/ibo_c/wmts";var r$c={};r$c[t$7.IMG_W]="img",r$c[t$7.IMG_C]="img",r$c[t$7.IBO_W]="ibo",r$c[t$7.IBO_C]="ibo",r$c[t$7.CIA_W]="cia",r$c[t$7.CIA_C]="cia",r$c[t$7.VEC_W]="vec",r$c[t$7.VEC_C]="vec",r$c[t$7.TER_W]="ter",r$c[t$7.TER_C]="ter",r$c[t$7.CVA_W]="cva",r$c[t$7.CVA_C]="cva",r$c[t$7.CTA_W]="cta",r$c[t$7.CTA_C]="cta",r$c[t$7.EIA_W]="eia",r$c[t$7.EIA_C]="eia",r$c[t$7.EVA_W]="eva",r$c[t$7.EVA_C]="eva";var a$1={};a$1[t$7.IMG_W]="w",a$1[t$7.IMG_C]="c",a$1[t$7.IBO_W]="w",a$1[t$7.IBO_C]="c",a$1[t$7.CIA_W]="w",a$1[t$7.CIA_C]="c",a$1[t$7.VEC_W]="w",a$1[t$7.VEC_C]="c",a$1[t$7.TER_W]="w",a$1[t$7.TER_C]="c",a$1[t$7.CVA_W]="w",a$1[t$7.CVA_C]="c",a$1[t$7.CTA_W]="w",a$1[t$7.CTA_C]="c",a$1[t$7.EIA_W]="w",a$1[t$7.EIA_C]="c",a$1[t$7.EVA_W]="w",a$1[t$7.EVA_C]="c";var n$5={};n$5[t$7.IMG_W]="tiles",n$5[t$7.IMG_C]="tiles",n$5[t$7.IBO_W]="tiles",n$5[t$7.IBO_C]="tiles",n$5[t$7.CIA_W]="tiles",n$5[t$7.CIA_C]="tiles",n$5[t$7.VEC_W]="tiles",n$5[t$7.VEC_C]="tiles",n$5[t$7.TER_W]="tiles",n$5[t$7.TER_C]="tiles",n$5[t$7.CVA_W]="tiles",n$5[t$7.CVA_C]="tiles",n$5[t$7.CTA_W]="tiles",n$5[t$7.CTA_C]="tiles",n$5[t$7.EIA_W]="tiles",n$5[t$7.EIA_C]="tiles",n$5[t$7.EVA_W]="tiles",n$5[t$7.EVA_C]="tiles";var s$6={};s$6[t$7.IMG_W]="900913",s$6[t$7.IMG_C]="4490",s$6[t$7.IBO_W]="900913",s$6[t$7.IBO_C]="4490",s$6[t$7.CIA_W]="900913",s$6[t$7.CIA_C]="4490",s$6[t$7.VEC_W]="900913",s$6[t$7.VEC_C]="4490",s$6[t$7.TER_W]="900913",s$6[t$7.TER_C]="4490",s$6[t$7.CVA_W]="900913",s$6[t$7.CVA_C]="4490",s$6[t$7.CTA_W]="900913",s$6[t$7.CTA_C]="4490",s$6[t$7.EIA_W]="900913",s$6[t$7.EIA_C]="4490",s$6[t$7.EVA_W]="900913",s$6[t$7.EVA_C]="4490";var i$7={};function d$8(e){if(!e$2e(e)||!e$2e(e.token))throw new t$15("options.token is required.");if(!e$2e(e)||!e$2e(e.url))throw new t$15("options.url is required.");this._url=e.url+"&tk="+e.token,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():e$2e(this._subdomains)&&this._subdomains.length>0?this._subdomains=[this._subdomains]:this._subdomains=["t0","t1","t2","t3","t4","t5","t6","t7"],this._dataType=u$Z(e.dataType,"int"),this._errorEvent=new o$1h,this._ready=!0,this._readyPromise=o$1l.resolve(!0),this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0};var t=e.credit;"string"==typeof t&&(t=new r$U(t)),this._credit=t;var i=u$Z(e.ellipsoid,t$12.WGS84);this._tilingScheme=new g$15({ellipsoid:i}),this._heightmapWidth=64,this._heightmapHeight=64,this._levelZeroMaximumGeometricError=I$12.getEstimatedLevelZeroGeometricErrorForAHeightmap(i,Math.min(this._heightmapWidth,this._heightmapHeight),this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._minimumLevel=u$Z(e.minimumLevel,5),this._maximumLevel=u$Z(e.maximumLevel,25),this._hasWaterMask=!1,this._hasVertexNormals=!1}function A$5(e,t){return(t=e$2e(t)?t:new r$1c({url:e})).requestFunction=function(){var t=new XMLHttpRequest;t.open("get",e,!0),t.responseType="arraybuffer",t.async=!1,t.send(null);var i=o$1l.defer();return t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status&&e$2e(t.response)){for(var e=new DataView(t.response),n=e.byteLength,r=new Uint8Array(n),o=0;o<n;o++)r[o]=e.getUint8(o,!0);if(n>1e3){var a=nt$b.inflate(r).buffer;e$2e(a)?i.resolve(new Uint8Array(a)):i.reject(!1)}else i.reject(!1)}else(t.status>=400||0===t.status)&&i.reject(!1)},i.promise},r$1b.request(t)}function o$8(){}function n$4(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._tilingScheme=e$2e(e.tilingScheme)?e.tilingScheme:new g$15({ellipsoid:e.ellipsoid}),this._color=u$Z(e.color,e$1X.YELLOW),this._errorEvent=new o$1h,this._tileWidth=u$Z(e.tileWidth,256),this._tileHeight=u$Z(e.tileHeight,256),this._readyPromise=o$1l.resolve(!0)}function r$b(e){t$15.throwInstantiationError()}i$7[t$7.IMG_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.IMG_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.IBO_W]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.IBO_C]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.CIA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.CIA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.VEC_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.VEC_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.TER_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],i$7[t$7.TER_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14"],i$7[t$7.CVA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.CVA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],i$7[t$7.CTA_W]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.CTA_C]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"],i$7[t$7.EIA_W]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.EIA_C]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.EVA_W]=["1","2","3","4","5","6","7","8","9","10"],i$7[t$7.EVA_C]=["1","2","3","4","5","6","7","8","9","10"],Object.defineProperties(d$8.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),d$8.prototype.requestTileGeometry=function(e,t,i,n){if(i<this._maximumLevel&&i>=this._minimumLevel){var r=this._url.replace("{s}",this._subdomains[(e+t+i)%this._subdomains.length]),o=-1===r.indexOf("?")?"?":"&",a=A$5(r+o+"x="+e+"&y="+t+"&l="+(i+1));if(!e$2e(a))return;var s=this;return o$1l(a,(function(e){var t=s.transformBuffer(e);return e$2e(t)?new T$L({buffer:t,width:s._heightmapWidth,height:s._heightmapHeight,childTileMask:void 0,structure:s._terrainDataStructure}):new T$L({buffer:s.getvHeightBuffer(),width:s._heightmapWidth,height:s._heightmapHeight,childTileMask:void 0,structure:s._terrainDataStructure})}))}if(i<this._minimumLevel)return new T$L({buffer:this.getvHeightBuffer(),width:this._heightmapWidth,height:this._heightmapHeight,childTileMask:void 0,structure:this._terrainDataStructure})},d$8.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},d$8.prototype.getTileDataAvailable=function(e,t,i){return i<25},d$8.prototype.getvHeightBuffer=function(){var e=this._vHeightBuffer;if(!e$2e(e)){e=this._vHeightBuffer=new Uint8ClampedArray(this._heightmapWidth*this._heightmapHeight*4);for(var t=this._heightmapWidth*this._heightmapHeight*4,i=0;i<t;)e[i++]=15,e[i++]=66,e[i++]=64,e[i++]=255}return e},d$8.prototype.transformBuffer=function(e){var t=2;"int"===this._dataType?t=2:"float"===this._dataType&&(t=4);var i,n,r,o,a,s,l,u=new ArrayBuffer(t),c=new DataView(u),h=this._heightmapWidth,d=this._heightmapHeight,f=new Uint8Array(h*d*4);for(i=0;i<d;i++)for(n=0;n<h;n++){r=parseInt(149*i/(d-1)),o=parseInt(149*n/(h-1)),4===t?(a=t*(150*r+o),c.setInt8(0,e[a]),c.setInt8(0,e[a+1]),c.setInt8(0,e[a+2]),c.setInt8(0,e[a+3]),l=c.getFloat32(0,!0)):l=e[a=t*(150*r+o)]+256*e[a+1],(l>1e4||l<-2e3)&&(l=0);var p=(l+1e3)/.001;f[s=4*(i*h+n)]=p/65536,f[s+1]=(p-256*f[s]*256)/256,f[s+2]=p-256*f[s]*256-256*f[s+1],f[s+3]=256}return f},o$8.prototype.boundingVolume=void 0,o$8.prototype.boundingSphere=void 0,o$8.prototype.distanceToCamera=function(e){t$15.throwInstantiationError()},o$8.prototype.intersectPlane=function(e){t$15.throwInstantiationError()},o$8.prototype.createDebugVolume=function(e){t$15.throwInstantiationError()},Object.defineProperties(n$4.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),n$4.prototype.getTileCredits=function(e,t,i){},n$4.prototype.requestImage=function(e,t,i,n){var r=document.createElement("canvas");r.width=256,r.height=256;var o=r.getContext("2d"),a=this._color.toCssColorString();return o.strokeStyle=a,o.lineWidth=2,o.strokeRect(1,1,255,255),o.font="bold 25px Arial",o.textAlign="center",o.fillStyle=a,o.fillText("L: "+i,124,86),o.fillText("X: "+e,124,136),o.fillText("Y: "+t,124,186),r},n$4.prototype.pickFeatures=function(e,t,i,n,r){},r$b.prototype.isReady=t$15.throwInstantiationError,r$b.prototype.shouldDiscardImage=t$15.throwInstantiationError;var e={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},TileState=Object.freeze(e);function g$7(e){e=u$Z(e,u$Z.EMPTY_OBJECT),o$1q.typeOf.object("options.clock",e.clock),o$1q.typeOf.object("options.intervals",e.intervals),this.show=u$Z(e.show,!0),this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this.shadows=u$Z(e.shadows,W$X.ENABLED),this.maximumMemoryUsage=u$Z(e.maximumMemoryUsage,256),this.shading=new o$Z(e.shading),this.style=e.style,this.frameFailed=new o$1h,this.frameChanged=new o$1h,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new m$W,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._readyPromise=o$1l.defer(),this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=d$1s(new Array(5),0),this._runningAverage=0}function W$4(e){return"uniform vec4 czm_pickColor;\n"+e}function X$3(e){return function(t){return p$19(t,{czm_pickColor:function(){return e._pickId.color}})}}function Z$4(){return"czm_pickColor"}Object.defineProperties(g$7.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){h$L.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(e$2e(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}},readyPromise:{get:function(){return this._readyPromise.promise}}}),g$7.prototype.makeStyleDirty=function(){this._styleDirty=!0},g$7.prototype._getAverageLoadTime=function(){return 0===this._runningLength?.05:this._runningAverage};var $$2=new a$15;function k$4(e){var t=e._clock,i=t.canAnimate&&t.shouldAnimate,n=t.multiplier;return i?n:0}function p$2(e,t){return e._intervals.indexOf(t.start)}function ee$2(e,t){var i=e._intervals,n=e._clock,r=k$4(e);if(0!==r){var o=e._getAverageLoadTime(),a=a$15.addSeconds(n.currentTime,o*r,$$2),s=i.indexOf(a);return s===p$2(e,t)&&(r>=0?++s:--s),i.get(s)}}function ie$1(e){var t=e._intervals,i=e._clock.currentTime,n=t.indexOf(i);return t.get(n)}function ne$2(e,t,i){var n=k$4(e),r=p$2(e,t),o=p$2(e,i);return n>=0?r>=o:r<=o}function re$2(e,t){return function(i){var n=e$2e(i.message)?i.message:i.toString();e.frameFailed.numberOfListeners>0?e.frameFailed.raiseEvent({uri:t,message:n}):(console.log("A frame failed to load: "+t),console.log("Error: "+n))}}function te$2(e,t,i){var n=p$2(e,t),r=e._frames,o=r[n];if(!e$2e(o)){var a=t.data.transform,s=e$2e(a)?p$1d.fromArray(a):void 0,l=t.data.uri;o={pointCloud:void 0,transform:s,timestamp:Et$c(),sequential:!0,ready:!1,touchedFrameNumber:i.frameNumber},r[n]=o,t$10.fetchArrayBuffer({url:l}).then((function(t){return o.pointCloud=new ie$g({arrayBuffer:t,cull:!0,fragmentShaderLoaded:W$4,uniformMapLoaded:X$3(e),pickIdLoaded:Z$4}),o.pointCloud.readyPromise})).otherwise(re$2(e,l))}return o}function ae$1(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function se$1(e,t,i,n){t.touchedFrameNumber<n.frameNumber-1&&(t.sequential=!1);var r=t.pointCloud;if(e$2e(r)&&!t.ready){var o=n.commandList,a=o.length;if(A$4(e,t,i,n),r.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=r.geometryByteLength,o.length=a,t.sequential))ae$1(e,(Et$c()-t.timestamp)/1e3)}t.touchedFrameNumber=n.frameNumber}var oe$2=new p$1d;function le$2(e,t){var i=e.shading;return e$2e(i)&&e$2e(i.baseResolution)?i.baseResolution:e$2e(t.boundingSphere)?e$2d.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function ue$2(e){var t=e.shading;return e$2e(t)&&e$2e(t.maximumAttenuation)?t.maximumAttenuation:10}var de$1=new o$Z;function A$4(e,t,i,n){var r=u$Z(e.shading,de$1),o=t.pointCloud,a=u$Z(t.transform,p$1d.IDENTITY);o.modelMatrix=p$1d.multiplyTransformation(e.modelMatrix,a,oe$2),o.style=e.style,o.time=i.timeSinceLoad,o.shadows=e.shadows,o.clippingPlanes=e._clippingPlanes,o.isClipped=i.isClipped,o.attenuation=r.attenuation,o.backFaceCulling=r.backFaceCulling,o.normalShading=r.normalShading,o.geometricError=le$2(e,o),o.geometricErrorScale=r.geometricErrorScale,o.maximumAttenuation=ue$2(e),o.update(n),t.touchedFrameNumber=n.frameNumber}function L$5(e,t,i,n){se$1(e,te$2(e,t,n),i,n)}function me$2(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function T$4(e,t){for(var i=e._frames,n=i.length,r=0;r<n;++r){var o=i[r];if(e$2e(o)&&(!e$2e(t)||t(o))){var a=o.pointCloud;o.ready&&(e._totalMemoryUsageInBytes-=a.geometryByteLength),e$2e(a)&&a.destroy(),o===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),i[r]=void 0}}}function ce$3(e,t){var i=p$2(e,t),n=e._frames[i];if(e$2e(n)&&n.ready)return n}function E$3(e,t,i,n,r){return!!e$2e(i)&&(!!i.ready||(L$5(e,t,n,r),i.ready))}function fe$1(e,t,i,n,r){var o,a,s=e._intervals,l=e._frames,u=p$2(e,i),c=p$2(e,t);if(u>=c){for(o=u;o>=c;--o)if(E$3(e,a=s.get(o),l[o],n,r))return a}else for(o=u;o<=c;++o)if(E$3(e,a=s.get(o),l[o],n,r))return a;return t}function ge$2(e,t,i){for(var n=e._frames,r=n.length,o=0;o<r;++o){var a=n[o];e$2e(a)&&e$2e(a.pointCloud)&&(a.pointCloud.clippingPlanesDirty=t,a.pointCloud.styleDirty=i)}}var y$6={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};function t$6(e,t){this._show=u$Z(t,!0),this._command=new i$$({owner:this}),this._radius=6378137-e,this._ellipsoid=t$12.fromCartesian3(new o$1p(this._radius,this._radius,this._radius)),this._baseColor=new e$1X(0,0,0,1)}g$7.prototype.update=function(e){if(e.mode!==C$14.MORPHING&&this.show){e$2e(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),e$2e(this._loadTimestamp)||(this._loadTimestamp=a$15.clone(e.time));var t=Math.max(1e3*a$15.secondsDifference(e.time,this._loadTimestamp),0),i=this._clippingPlanes,n=0,r=!1,o=e$2e(i)&&i.enabled;o&&(i.update(e),n=i.clippingPlanesState),this._clippingPlanesState!==n&&(this._clippingPlanesState=n,r=!0);var a=this._styleDirty;this._styleDirty=!1,(r||a)&&ge$2(this,r,a),y$6.timeSinceLoad=t,y$6.isClipped=o;var s=this.shading,l=this._pointCloudEyeDomeLighting,u=e.commandList,c=u.length,h=this._previousInterval,d=this._nextInterval,f=ie$1(this);if(e$2e(f)){var p=!1,_=k$4(this),m=0===_;_!==this._clockMultiplier&&(p=!0,this._clockMultiplier=_),(!e$2e(h)||m)&&(h=f),(!e$2e(d)||p||ne$2(this,f,d))&&(d=ee$2(this,f));var g=ce$3(this,h=fe$1(this,h,f,y$6,e));e$2e(g)||(L$5(this,h,y$6,e),g=this._lastRenderedFrame),e$2e(g)&&A$4(this,g,y$6,e),e$2e(d)&&L$5(this,d,y$6,e);var x=this;e$2e(g)&&!e$2e(this._lastRenderedFrame)&&e.afterRender.push((function(){x._readyPromise.resolve(x)})),e$2e(g)&&g!==this._lastRenderedFrame&&x.frameChanged.numberOfListeners>0&&e.afterRender.push((function(){x.frameChanged.raiseEvent(x)})),this._previousInterval=h,this._nextInterval=d,this._lastRenderedFrame=g,this._totalMemoryUsageInBytes>1024*this.maximumMemoryUsage*1024&&T$4(this,me$2(e));var y=u.length-c;e$2e(s)&&s.attenuation&&s.eyeDomeLighting&&y>0&&l.update(e,c,s)}}},g$7.prototype.isDestroyed=function(){return!1},g$7.prototype.destroy=function(){return T$4(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),i$11(this)},Object.defineProperties(t$6.prototype,{show:{get:function(){return this._show},set:function(e){o$1q.defined("UnderGlobe show",e),this._show=e}},radius:{get:function(){return this._radius},set:function(e){if(o$1q.defined("UnderGlobe radius",e),this._radius!==e){var t=this._command;e$2e(t)&&(t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),this._ellipsoid=t$12.fromCartesian3(new o$1p(this._radius,this._radius,this._radius))}this._radius=e}},ellipsoid:{get:function(){return this._ellipsoid}},baseColor:{get:function(){return this._baseColor},set:function(e){o$1q.defined("UnderGlobe baseColor",e),this._baseColor=e}}});var O$3="attribute vec4 position;\nvoid main(void)\n{\ngl_Position = czm_modelViewProjection * vec4(position.xyz - czm_relativeOrigin, 1.0);\n}",U$4="uniform vec4 uBaseColor;\nvoid main (void)\n{\ngl_FragColor = uBaseColor;\n}";t$6.prototype.update=function(e){var t=e.camera.positionCartographic.height;if(this._show&&e.passes.render&&!(t>1e4)){var i=e.mode;if(i===C$14.SCENE3D||i===C$14.MORPHING){var n=this._command,r=this;if(!e$2e(n.vertexArray)){var o=e.context,a=b$O.createGeometry(new b$O({radii:new o$1p(this._radius,this._radius,this._radius),slicePartitions:256,stackPartitions:256,vertexFormat:n$13.POSITION_ONLY})),s=k$14.createAttributeLocations(a);n.vertexArray=c$13.fromGeometry({context:o,geometry:a,attributeLocations:s,bufferUsage:A$18.STATIC_DRAW}),n.renderState=d$1m.fromCache({cull:{enabled:!0}}),n.uniformMap={uBaseColor:function(){return r._baseColor}};var l=new s$V({sources:[O$3]}),u=new s$V({sources:[U$4]});n.shaderProgram=r$14.fromCache({context:o,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:s})}return n}}},t$6.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),i$11(this)};var _$3="varying vec2 v_textureCoordinates;\nvoid main()\n{\nczm_materialInput materialInput;\nmaterialInput.s = v_textureCoordinates.s;\nmaterialInput.st = v_textureCoordinates;\nmaterialInput.str = vec3(v_textureCoordinates, 0.0);\nmaterialInput.normalEC = vec3(0.0, 0.0, -1.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n}\n";function o$7(e,t){this.show=!0,e$2e(e)||(e=new f$1a),this.rectangle=f$1a.clone(e),e$2e(t)||(t=r$Y.fromType(r$Y.ColorType,{color:new e$1X(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}function A$3(e){this._url=e.url,this._hypsometricTexture=void 0,this.hypsometricSetting=e.hypsometricSetting,this._ready=!1,this._volBounds=void 0,this._volImageBuffer=void 0,this._volTexture=void 0,this._dataBuffer=void 0,this.loadData(this._url)}function pt$1(e,t,i){for(var n=e.length/4,r=new Float32Array(e.buffer,e.byteOffset,n),o=0;o<r.length;o++){var a=r[o],s=4*o;if(a<0||a>1)e[s+0]=255,e[s+1]=255,e[s+2]=255,e[s+3]=255;else{a=a*(t._ceiling-t._floor)+t._floor,i&&(a=Math.round(a));var l=t._dictColorTable.getColor(a);e[s+0]=255*l.red,e[s+1]=255*l.green,e[s+2]=255*l.blue,e[s+3]=255*l.alpha}}return new Uint8Array(e.buffer,0,e.length)}function gt$1(e){var t=new o$1p(1,255,65025);(t=o$1p.multiplyByScalar(t,e,t)).x=t.x-Math.floor(t.x),t.y=t.y-Math.floor(t.y),t.z=t.z-Math.floor(t.z);var i=new o$1p,n=new o$1p(1/255,1/255,0);return i.x=t.y*n.x,i.y=t.z*n.y,i.z=t.z*n.z,t=o$1p.subtract(t,i,t)}function ut$2(e){for(var t=e.length/4,i=new Float32Array(e.buffer,e.byteOffset,t),n=0;n<i.length;n++){var r,o,a,s,l=i[n],u=4*n,c=new e$2c(0,0,0,0);if(l>=0&&l<=1){l<e$2d.EPSILON9?l=e$2d.EPSILON9:1-l<e$2d.EPSILON9&&(l=1-e$2d.EPSILON9);var h=gt$1(l);c.x=h.x,c.y=h.y,c.z=h.z,c.w=1}r=255*c.x,o=255*c.y,a=255*c.z,s=255*c.w,e[u+0]=parseInt(r),e[u+1]=parseInt(o),e[u+2]=parseInt(a),e[u+3]=parseInt(s)}return new Uint8Array(e.buffer,0,e.length)}o$7.prototype.update=function(e){if(this.show){if(!e$2e(this.material))throw new t$15("this.material must be defined.");if(!e$2e(this.rectangle))throw new t$15("this.rectangle must be defined.");var t=this._rs;if((!e$2e(t)||!f$1a.equals(t.viewport,this.rectangle))&&(this._rs=d$1m.fromCache({blending:Ee$r.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render){var i=e.context;if(this._material!==this.material||!e$2e(this._overlayCommand)){this._material=this.material,e$2e(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();var n=new s$V({sources:[this._material.shaderSource,_$3]});this._overlayCommand=i.createViewportQuadCommand(n,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Le$q.OVERLAY}this._material.update(i),this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}}},o$7.prototype.isDestroyed=function(){return!1},o$7.prototype.destroy=function(){return e$2e(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),i$11(this)},Object.defineProperties(A$3.prototype,{hypsometricSetting:{get:function(){return this._hypsometricSetting},set:function(e){this._hypsometricSetting=e}}});var d$7=-9999,ct$2=new DOMParser;function _t$1(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(a.localName===t)return a}}A$3.prototype.loadData=function(e){var t=this;t._ready=!1;var i=u$Q(e+"/config");!e$2e(i)||i.then((function(i){var n=_t$1((i=ct$2.parseFromString(i,"application/xml")).childNodes[0],"sml:Bounds").textContent.split("\n"),r=Number(n[1]),o=Number(n[2]),a=Number(n[3]),s=Number(n[4]),l='/data/index/1/1.stream?bounds={"leftBottom":{"x":xLeft,"y":yBottom},"rightTop":{"x":xRight,"y":yTop}}';l=l.replace("xLeft",r).replace("yBottom",s).replace("xRight",a).replace("yTop",o);var u=o$10(e+l);!e$2e(u)||u.then((function(e){var i=new Uint8Array(e,8),n=nt$b.inflate(i).buffer,r=new Float64Array(n,0,1),o=new Uint32Array(n,48,1);if(0===r[0]||3200===o[0]||3201===o[0]){var a=0;0===r[0]&&(a=8);var s=new Float64Array(n,a,6),l={left:s[0],top:s[1],right:s[2],bottom:s[3],minHeight:s[4]<s[5]?s[4]:s[5],maxHeight:s[4]>s[5]?s[4]:s[5]},u=new Uint32Array(n,48+a,7),c=u[0],h=u[1],d=u[2],f=u[3],p=u[4],_=u[5],m=u[6],g=new Uint8Array(n,76+a,f*f*4),x=new Float32Array(n,76+a,f*f),y=!1;Math.abs(t._hypsometricSetting._ceiling-Math.round(t._hypsometricSetting._ceiling))<e$2d.EPSILON6&&Math.abs(t._hypsometricSetting._floor-Math.round(t._hypsometricSetting._floor))<e$2d.EPSILON6&&(y=!0),t._dataBuffer=new Float32Array(p*_*m);for(var v=0;v<m;v++)for(var $=Math.floor(v/h),b=v%h,T=0;T<_;T++)for(var C=d*$+T,S=0;S<p;S++){var w=C*f+(d*b+S);if(x[w]<0||x[w]>1)t._dataBuffer[v*_*p+T*p+S]=d$7;else{var E=x[w]*(t._hypsometricSetting._ceiling-t._hypsometricSetting._floor)+t._hypsometricSetting._floor;y&&(E=Math.round(E)),t._dataBuffer[v*_*p+T*p+S]=E}}t._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST?pt$1(g,t.hypsometricSetting,y):ut$2(g);var P={nFormat:c,nSideBlockCount:h,nBlockLength:d,nLength:f,nWidth:p,nHeight:_,nDepth:m,imageArray:g};t._volBounds=l,t._volImageBuffer=P,t._ready=!0}e=null})).otherwise((function(e){}))})).otherwise((function(e){}))},A$3.prototype.loadTexture=function(e){if(!e$2e(this._volTexture)){var t=tt$i.NEAREST,i=rt$k.NEAREST;if(this._hypsometricSetting.filterMode!==k$S.FilterMode.NEAREST)t=tt$i.LINEAR,i=rt$k.LINEAR;this._volTexture=new t$U({context:e,width:this._volImageBuffer.nLength,height:this._volImageBuffer.nLength,pixelFormat:V$12.RGBA,flipY:!1,sampler:new e$1S({minificationFilter:t,magnificationFilter:i})}),this._volTexture.copyFrom({width:this._volImageBuffer.nLength,height:this._volImageBuffer.nLength,arrayBufferView:this._volImageBuffer.imageArray}),this._volImageBuffer.imageArray=null}e$2e(this._hypsometricTexture)||(this._hypsometricTexture=new t$U({context:e,width:1024,height:64,pixelFormat:V$12.RGBA,flipY:!1}),this._hypsometricTexture.copyFrom({width:1024,height:64,arrayBufferView:this._hypsometricSetting.ColorTable._imageBuffer}))},A$3.prototype.getPixel=function(e,t,i){var n=i*this._volImageBuffer.nWidth*this._volImageBuffer.nHeight+t*this._volImageBuffer.nWidth+e;return this._dataBuffer[n]},A$3.prototype.getValue=function(e){var t=SuperMap3D.Cartographic.fromCartesian(e),i=SuperMap3D.Math.toDegrees(t.longitude),n=SuperMap3D.Math.toDegrees(t.latitude),r=t.height,o=(i-this._volBounds.left)/(this._volBounds.right-this._volBounds.left);if(!(o>1||o<0)){var a=(n-this._volBounds.bottom)/(this._volBounds.top-this._volBounds.bottom);if(!(a>1||a<0)){var s=(r-this._volBounds.minHeight)/(this._volBounds.maxHeight-this._volBounds.minHeight);if(!(s>1||s<0)){var l=o*this._volImageBuffer.nWidth-.5,u=a*this._volImageBuffer.nHeight-.5,c=s*(this._volImageBuffer.nDepth-1),h=Math.floor(l),d=Math.ceil(l),f=Math.floor(u),p=Math.ceil(u),_=Math.floor(c),m=Math.ceil(c);if(h=e$2d.clamp(h,0,this._volImageBuffer.nWidth-1),d=e$2d.clamp(d,0,this._volImageBuffer.nWidth-1),f=e$2d.clamp(f,0,this._volImageBuffer.nHeight-1),p=e$2d.clamp(p,0,this._volImageBuffer.nHeight-1),_=e$2d.clamp(_,0,this._volImageBuffer.nDepth-1),m=e$2d.clamp(m,0,this._volImageBuffer.nDepth-1),this._hypsometricSetting.filterMode===k$S.FilterMode.NEAREST)return l=l-h>.5?d:h,u=u-f>.5?p:f,c=c-_>.5?m:_,M=this.getPixel(l,u,c);var g=this.getPixel(h,f,_),x=this.getPixel(d,f,_);g==d$7&&(g=0),x==d$7&&(x=0);var y=g;h!=d&&(y=x*(l-h)+g*(d-l));var v=this.getPixel(h,p,_),$=this.getPixel(d,p,_);v==d$7&&(v=0),$==d$7&&($=0);var b=v;h!=d&&(b=$*(l-h)+v*(d-l));var T=b;if(f!=p)T=b*(u-f)+y*(p-u);var C=this.getPixel(h,f,m),S=this.getPixel(d,f,m);C==d$7&&(C=0),S==d$7&&(S=0);var w=C;h!=d&&(w=S*(l-h)+C*(d-l));var E=this.getPixel(h,p,m),P=this.getPixel(d,p,m);E==d$7&&(E=0),P==d$7&&(P=0);var A=E;h!=d&&(A=P*(l-h)+E*(d-l));var L=A;if(f!=p)L=A*(u-f)+w*(p-u);var M=L;if(_!=m)M=L*(c-_)+T*(m-c);return M}}}};var ve$1="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nuniform vec4 u_tileRangeAndImageSize;\nattribute vec4 volTexCoord;\nvarying vec4 v_volTexCoord;\nvarying vec2 v_textureCoordinates;\nfloat getGlobeDepth(vec4 positionEC){\nvec4 posWC = czm_eyeToWindowCoordinates(positionEC);\nfloat globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\nif (globeDepth == 0.0){\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction)\n{\nvec2 halfSize = imageSize * scale * czm_resolutionScale * 0.5;\nhalfSize *= ((direction * 2.0) - 1.0);\npositionEC.xy += halfSize;\nreturn positionEC;\n}\nvoid main()\n{\nvec3 positionHigh = positionHighAndScale.xyz;\nvec3 positionLow = positionLowAndRotation.xyz;\nfloat scale = positionHighAndScale.w;\nvec2 textureCoordinates = direction;\nvec2 imageSize = u_tileRangeAndImageSize.zw;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\nfloat depthsilon = 10.0;\nfloat globeDepth = getGlobeDepth(positionEC);\nif (globeDepth != 0.0 && positionEC.z + depthsilon < globeDepth)\n{\npositionEC.xyz = vec3(0.0);\n}\nelse{\npositionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction);\n}\ngl_Position = czm_projection * positionEC;\nv_textureCoordinates = textureCoordinates;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth();\n#endif\nv_volTexCoord = volTexCoord;\nvec2 halfSize = imageSize * scale * czm_resolutionScale * 0.5 / u_tileRangeAndImageSize.xy;\nhalfSize *= ((direction * 2.0) - 1.0);\nv_volTexCoord.xy += halfSize;\n}\n",pe$1="#extension GL_EXT_draw_buffers : enable\nuniform sampler2D u_atlas;\nuniform vec4 u_voxelGridLayerColor;\nuniform sampler2D u_colorTable;\nuniform vec4 u_minMaxValueAndFiltration;\nuniform vec3 u_maxVisibleTextureCoord;\nuniform vec3 u_minVisibleTextureCoord;\nvarying vec4 v_volTexCoord;\nvarying vec2 v_textureCoordinates;\nbool getSampleValueForVolume(float volumeValue, out vec4 colorFromColorTable)\n{\nfloat minValue = u_minMaxValueAndFiltration.x;\nfloat maxValue = u_minMaxValueAndFiltration.y;\nfloat minFiltration = u_minMaxValueAndFiltration.z;\nfloat maxFiltration = u_minMaxValueAndFiltration.w;\ncolorFromColorTable = vec4(1.0);\nfloat realValue = minValue + volumeValue * (maxValue - minValue);\nif(realValue > maxFiltration || realValue < minFiltration)\n{\nreturn false;\n}\n#ifdef HAS_COLORTABLE\ncolorFromColorTable = texture2D(u_colorTable, vec2(0.0, 1.0 - realValue)).rgba;\n#endif\nreturn true;\n}\nvoid main()\n{\nvec4 color = texture2D(u_atlas, v_textureCoordinates);\ncolor = czm_gammaCorrect(color);\nif (color.a < 0.005)\n{\ndiscard;\n}\n#ifdef TEXTURECOORD_CLIP\nif(v_volTexCoord.x > u_maxVisibleTextureCoord.x || v_volTexCoord.x < u_minVisibleTextureCoord.x\n|| v_volTexCoord.y > u_maxVisibleTextureCoord.y || v_volTexCoord.y < u_minVisibleTextureCoord.y\n|| v_volTexCoord.z > u_maxVisibleTextureCoord.z || v_volTexCoord.z < u_minVisibleTextureCoord.z)\n{\ndiscard;\n}\n#endif\nvec4 volumeColor = vec4(1.0);\nfloat noValue;\nfloat volumeValue = czm_getVolumeValue(v_volTexCoord.xyz, noValue);\nvec4 colorFromColorTable = vec4(1.0);\nif(!getSampleValueForVolume(volumeValue, colorFromColorTable))\n{\ndiscard;\n}\n#ifdef HAS_COLORTABLE\nvolumeColor = colorFromColorTable;\n#else\nfloat power = volumeValue * 40.0 - 30.0;\nvec3 hdrColor = u_voxelGridLayerColor.rgb * pow(2.0, power);\nvolumeColor.rgb = hdrColor;\n#endif\ncolor.rgb *= volumeColor.rgb;\nczm_writeLogDepth();\n#ifdef OIT\nvec3 Ci = color.rgb * color.a;\nfloat ai = color.a;\nfloat wzi = czm_alphaWeight(ai);\ngl_FragData[0] = vec4(Ci * wzi, ai);\ngl_FragData[1] = vec4(ai * wzi);\n#else\ngl_FragColor = color;\n#endif\n}\n",me$1=n$J.POSITION_INDEX,ee$1=n$J.NUMBER_OF_PROPERTIES,m$6,Ae$2={positionHighAndScale:0,positionLowAndRotation:1,volTexCoord:3},ge$1={direction:0,positionHighAndScale:1,positionLowAndRotation:2,volTexCoord:3},z$3;function c$8(e){e=u$Z(e,u$Z.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(ee$1),this._maxScale=1,this._allSizedInMeters=!0,this._baseVolume=new i$1d,this._baseVolumeWC=new i$1d,this._baseVolume2D=new i$1d,this._boundingVolume=new i$1d,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=p$1d.clone(u$Z(e.modelMatrix,p$1d.IDENTITY)),this._modelMatrix=p$1d.clone(p$1d.IDENTITY),this.debugShowBoundingVolume=u$Z(e.debugShowBoundingVolume,!1),this.volumeShaderPredefine=u$Z(e.volumeShaderPredefine,[]),this._volumeShaderPredefine=void 0,this._mode=C$14.SCENE3D,this._highlightColor=e$1X.clone(e$1X.WHITE);var t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture}};var i=this._scene;e$2e(i)&&e$2e(i.terrainProviderChanged)&&(this._removeCallbackFunc=i.terrainProviderChanged.addEventListener((function(){for(var e=this._billboards,t=e.length,i=0;i<t;++i)e[i]._updateClamping()}),this)),this.transparent=u$Z(e.OIT,!0),this._transparent=void 0,this._postRender=e.postRender}function te$1(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function W$3(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;for(var t=[],i=e._billboards,n=i.length,r=0,o=0;r<n;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._billboards=t}}function ye(e){var t=e.cache.billboardCollection_indexBufferBatched;if(e$2e(t))return t;for(var i=new Uint16Array(98298),n=0,r=0;n<98298;n+=6,r+=4)i[n]=r,i[n+1]=r+1,i[n+2]=r+2,i[n+3]=r+0,i[n+4]=r+2,i[n+5]=r+3;return(t=t$X.createIndexBuffer({context:e,typedArray:i,usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=t,t}function Te$1(e){var t=e.cache.billboardCollection_indexBufferInstanced;return e$2e(t)||((t=t$X.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:A$18.STATIC_DRAW,indexDatatype:ce$z.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function Ie$1(e){var t=e.cache.billboardCollection_vertexBufferInstanced;return e$2e(t)||((t=t$X.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:A$18.STATIC_DRAW})).vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}function Se$1(e,t,i,n){var r=[{index:m$6.positionHighAndScale,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:A$18.STATIC_DRAW},{index:m$6.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:A$18.STATIC_DRAW},{index:m$6.volTexCoord,componentsPerAttribute:4,componentDatatype:S$14.FLOAT,usage:A$18.STATIC_DRAW}];return i&&r.push({index:m$6.direction,componentsPerAttribute:2,componentDatatype:S$14.FLOAT,vertexBuffer:Ie$1(e)}),e$2e(n)&&r.push({index:m$6.a_batchId,componentsPerAttribute:1,componentDatatyps:S$14.FLOAT,bufferUsage:A$18.STATIC_DRAW}),new v$F(e,r,i?t:4*t,i)}Object.defineProperties(c$8.prototype,{length:{get:function(){return W$3(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}}}),c$8.prototype.add=function(e){var t=new n$J(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t},c$8.prototype.remove=function(e){return!!this.contains(e)&&(this._billboards[e._index]=null,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},c$8.prototype.removeAll=function(){te$1(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},c$8.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},c$8.prototype.contains=function(e){return e$2e(e)&&e._billboardCollection===this},c$8.prototype.get=function(e){if(!e$2e(e))throw new t$15("index is required.");return W$3(this),this._billboards[e]};var H$2=new i$12;function re$1(e,t,i,n,r){var o,a=n[m$6.positionHighAndScale],s=n[m$6.positionLowAndRotation],l=r._getActualPosition();e._mode===C$14.SCENE3D&&(i$1d.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),i$12.fromCartesian(l,H$2);var u=r.scale,c=r.rotation;0!==c&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,u);var h=H$2.high,d=H$2.low;e._instanced?(a(o=r._index,h.x,h.y,h.z,u),s(o,d.x,d.y,d.z,c)):(a((o=4*r._index)+0,h.x,h.y,h.z,u),a(o+1,h.x,h.y,h.z,u),a(o+2,h.x,h.y,h.z,u),a(o+3,h.x,h.y,h.z,u),s(o+0,d.x,d.y,d.z,c),s(o+1,d.x,d.y,d.z,c),s(o+2,d.x,d.y,d.z,c),s(o+3,d.x,d.y,d.z,c))}function De$1(e,t,i,n,r){var o,a=n[m$6.volTexCoord],s=0,l=0,u=0;e$2e(r._volTexCoord)&&(s=r._volTexCoord.x,l=r._volTexCoord.y,u=r._volTexCoord.z),e._instanced?a(o=r._index,s,l,u,0):(a((o=4*r._index)+0,s,l,u,0),a(o+1,s,l,u,0),a(o+2,s,l,u,0),a(o+3,s,l,u,0))}function be$1(e,t,i,n,r){re$1(e,t,i,n,r),De$1(e,t,i,n,r)}function G$2(e,t,i,n,r,o){var a;n.mode===C$14.SCENE3D?(a=e._baseVolume,e._boundingVolumeDirty=!0):a=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var u=t[l],c=u.position,h=n$J._computeActualPosition(u,c,n,r);e$2e(h)&&(u._setActualPosition(h),o?s.push(h):i$1d.expand(a,h,a))}o&&i$1d.fromPoints(s,a)}function Ce$1(e,t){var i=t.mode,n=e._billboards,r=e._billboardsToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==C$14.SCENE3D&&!p$1d.equals(o,e.modelMatrix)?(e._mode=i,p$1d.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===C$14.SCENE3D||i===C$14.SCENE2D||i===C$14.COLUMBUS_VIEW)&&G$2(e,n,n.length,t,o,!0)):i===C$14.MORPHING?G$2(e,n,n.length,t,o,!0):(i===C$14.SCENE2D||i===C$14.COLUMBUS_VIEW)&&G$2(e,r,e._billboardsToUpdateIndex,t,o,!1)}function Ve$3(e){var t=e._volumeShaderPredefine,i=e.volumeShaderPredefine;if(!e$2e(t)||t.length!==i.length)return!0;for(var n=0;n<i.length;n++)if(t[n]!=i[n])return!0;return!1}var Ee$1=[];c$8.prototype.update=function(e){W$3(this);var t=this._billboards,i=t.length,n=e.context;this._instanced=n.instancedArrays,m$6=this._instanced?ge$1:Ae$2,z$3=this._instanced?Te$1:ye;var r=this._textureAtlas;if(!e$2e(r)){r=this._textureAtlas=new v$I({context:n});for(var o=0;o<i;++o)t[o]._loadImage()}var a=r.textureCoordinates;if(0!==a.length){Ce$1(this,e),i=(t=this._billboards).length;var s=this._billboardsToUpdate,l=this._billboardsToUpdateIndex,u=this._propertiesChanged,c=r.guid,h=this._createVertexArray||this._textureAtlasGUID!==c;this._textureAtlasGUID=c;var d,f=e.passes;if(f.pick,h){this._createVertexArray=!1;for(var p=0;p<ee$1;++p)u[p]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),i>0){this._vaf=Se$1(n,i,this._instanced,this._batchTable),d=this._vaf.writers;for(var _=0;_<i;++_){var m=this._billboards[_];m._dirty=!1,be$1(this,n,a,d,m)}this._vaf.commit(z$3(n))}this._billboardsToUpdateIndex=0}else if(l>0){var g=Ee$1;g.length=0,u[me$1]&&g.push(re$1);var x=g.length;if(d=this._vaf.writers,l/i>.1){for(var y=0;y<l;++y){var v=s[y];v._dirty=!1;for(var $=0;$<x;++$)g[$](this,n,a,d,v)}this._vaf.commit(z$3(n))}else{for(var b=0;b<l;++b){var T=s[b];T._dirty=!1;for(var C=0;C<x;++C)g[C](this,n,a,d,T);this._instanced?this._vaf.subCommit(T._index,1):this._vaf.subCommit(4*T._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(l>1.5*i&&(s.length=i),e$2e(this._vaf)&&e$2e(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,i$1d.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var S,w=p$1d.IDENTITY;e.mode===C$14.SCENE3D?(w=this.modelMatrix,S=i$1d.clone(this._baseVolumeWC,this._boundingVolume)):S=i$1d.clone(this._baseVolume2D,this._boundingVolume);var E=this._transparent!==this.transparent;this._transparent=this.transparent;var P,A,L=Ve$3(this);if(this._volumeShaderPredefine=this.volumeShaderPredefine,E&&(this._rsTranslucent=d$1m.fromCache({depthTest:{enabled:!1,func:de$y.LESS},depthMask:!this._transparent,blending:Ee$r.ALPHA_BLEND})),E||L)P=new s$V({defines:this._volumeShaderPredefine,sources:[ve$1]}),this._instanced&&P.defines.push("INSTANCED"),A=new s$V({defines:this._volumeShaderPredefine,sources:[pe$1]}),this._transparent&&A.defines.push("OIT"),this._sp=r$14.replaceCache({context:n,shaderProgram:this._sp,vertexShaderSource:P,fragmentShaderSource:A,attributeLocations:m$6});var M=e.commandList;if(f.render||f.pick){var R=this._colorCommands,O=this._vaf.va,D=O.length,I=this._uniforms;R.length=D;for(var B=0;B<D;++B){var F=R[B];e$2e(F)||(F=R[B]=new i$$),F.pass=Le$q.Voxel_Billboard,F.boundingVolume=S,F.modelMatrix=w,F.count=O[B].indicesCount,F.shaderProgram=this._sp,F.uniformMap=I,F.vertexArray=O[B].va,F.renderState=this._rsTranslucent,F.debugShowBoundingVolume=this.debugShowBoundingVolume,this._instanced&&(F.count=6,F.instanceCount=i),M.push(F)}}}}},c$8.prototype.isDestroyed=function(){return!1},c$8.prototype.destroy=function(){return e$2e(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),te$1(this._billboards),i$11(this)};var kr=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;typeof __filename<"u"&&(kr=kr||__filename);var c$7=typeof assimpjs<"u"?assimpjs:{},pe,Pr;c$7.ready=new Promise((function(e,t){pe=e,Pr=t}));var me=Object.assign({},c$7),Vr="./this.program",ge="object"==typeof window,ir="function"==typeof importScripts,cr="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,I="",lr,dr,Cr;function Pt(e){return c$7.locateFile?c$7.locateFile(e,I):I+e}if(cr){var Yr=require("fs"),qr=require("path");I=ir?qr.dirname(I)+"/":__dirname+"/",lr=(e,t)=>(e=Fr(e)?new URL(e):qr.normalize(e),Yr.readFileSync(e,t?void 0:"utf8")),Cr=e=>{var t=lr(e,!0);return t.buffer||(t=new Uint8Array(t)),t},dr=(e,t,i)=>{e=Fr(e)?new URL(e):qr.normalize(e),Yr.readFile(e,(function(e,n){e?i(e):t(n.buffer)}))},!c$7.thisProgram&&process.argv.length>1&&(Vr=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),c$7.inspect=function(){return"[Emscripten Module object]"}}else(ge||ir)&&(ir?I=self.location.href:typeof document<"u"&&document.currentScript&&(I=document.currentScript.src),kr&&(I=kr),I=0!==I.indexOf("blob:")?I.substr(0,I.replace(/[?#].*/,"").lastIndexOf("/")+1):"",lr=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ir&&(Cr=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),dr=(e,t,i)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)});var Xr=c$7.print||console.log.bind(console),K$1=c$7.printErr||console.warn.bind(console),vr;Object.assign(c$7,me),me=null,c$7.arguments&&c$7.arguments,c$7.thisProgram&&(Vr=c$7.thisProgram),c$7.quit&&c$7.quit,c$7.wasmBinary&&(vr=c$7.wasmBinary),c$7.noExitRuntime,"object"!=typeof WebAssembly&&B$1("no native wasm support detected");var Tr,we=!1,U$3,W$2,Z$3,Sr,b$6,S,be,ke;function Ee(e,t){e||B$1(t)}function Pe(){var e=Tr.buffer;c$7.HEAP8=U$3=new Int8Array(e),c$7.HEAP16=Z$3=new Int16Array(e),c$7.HEAP32=b$6=new Int32Array(e),c$7.HEAPU8=W$2=new Uint8Array(e),c$7.HEAPU16=Sr=new Uint16Array(e),c$7.HEAPU32=S=new Uint32Array(e),c$7.HEAPF32=be=new Float32Array(e),c$7.HEAPF64=ke=new Float64Array(e)}var Ce,Te=[],Se=[],je=[];function jt(){if(c$7.preRun)for("function"==typeof c$7.preRun&&(c$7.preRun=[c$7.preRun]);c$7.preRun.length;)Dt$1(c$7.preRun.shift());Jr(Te)}function Ft(){!c$7.noFSInit&&!o$6.init.initialized&&o$6.init(),o$6.ignorePermissions=!1,Jr(Se)}function At(){if(c$7.postRun)for("function"==typeof c$7.postRun&&(c$7.postRun=[c$7.postRun]);c$7.postRun.length;)Rt(c$7.postRun.shift());Jr(je)}function Dt$1(e){Te.unshift(e)}function Mt(e){Se.unshift(e)}function Rt(e){je.unshift(e)}var rr=0,hr=null;function Kr(e){rr++,c$7.monitorRunDependencies&&c$7.monitorRunDependencies(rr)}function jr(e){if(rr--,c$7.monitorRunDependencies&&c$7.monitorRunDependencies(rr),0==rr&&hr){var t=hr;hr=null,t()}}function B$1(e){c$7.onAbort&&c$7.onAbort(e),K$1(e="Aborted("+e+")"),we=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw Pr(t),t}var $t="data:application/octet-stream;base64,",or,T$3,H$1;function Fe$1(e){return e.startsWith($t)}function Fr(e){return e.startsWith("file://")}function Ae$1(e){try{if(e==or&&vr)return new Uint8Array(vr);if(Cr)return Cr(e);throw"both async and sync fetching of the wasm failed"}catch(e){B$1(e)}}function Ot(e){if(!vr&&(ge||ir)){if("function"==typeof fetch&&!Fr(e))return fetch(e,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((function(){return Ae$1(e)}));if(dr)return new Promise((function(t,i){dr(e,(function(e){t(new Uint8Array(e))}),i)}))}return Promise.resolve().then((function(){return Ae$1(e)}))}function De(e,t,i){return Ot(e).then((function(e){return WebAssembly.instantiate(e,t)})).then((function(e){return e})).then(i,(function(e){K$1("failed to asynchronously prepare wasm: "+e),B$1(e)}))}function Ut(e,t,i,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||Fe$1(t)||Fr(t)||cr||"function"!=typeof fetch?De(t,i,n):fetch(t,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,i).then(n,(function(e){return K$1("wasm streaming compile failed: "+e),K$1("falling back to ArrayBuffer instantiation"),De(t,i,n)}))}))}function Ht(){var e={a:Xi};function t(e,t){var i=e.exports;return c$7.asm=i,Tr=c$7.asm.jb,Pe(),Ce=c$7.asm.nb,Mt(c$7.asm.kb),jr(),i}if(Kr(),c$7.instantiateWasm)try{return c$7.instantiateWasm(e,t)}catch(e){K$1("Module.instantiateWasm callback failed with error: "+e),Pr(e)}return Ut(vr,or,e,(function(e){t(e.instance)})).catch(Pr),{}}function Jr(e){for(;e.length>0;)e.shift()(c$7)}or="ThirdParty/assimpjs.wasm",Fe$1(or)||(or=Pt(or));var er=[];function Qr(e){e.add_ref()}var Ar=0;function xt(e){var t=new pr(e);return t.get_caught()||(t.set_caught(!0),Ar--),t.set_rethrown(!1),er.push(t),Qr(t),t.get_exception_ptr()}function Lt(){if(!er.length)return 0;var e=er[er.length-1];return Qr(e),e.excPtr}var Dr=[];function k$3(e){var t=Dr[e];return t||(e>=Dr.length&&(Dr.length=e+1),Dr[e]=t=Ce.get(e)),t}function Me$1(e){if(e.release_ref()&&!e.get_rethrown()){var t=e.get_destructor();t&&k$3(t)(e.excPtr),tt$1(e.excPtr)}}function pr(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){S[this.ptr+4>>2]=e},this.get_type=function(){return S[this.ptr+4>>2]},this.set_destructor=function(e){S[this.ptr+8>>2]=e},this.get_destructor=function(){return S[this.ptr+8>>2]},this.set_refcount=function(e){b$6[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,U$3[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=U$3[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,U$3[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=U$3[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=b$6[this.ptr>>2];b$6[this.ptr>>2]=e+1},this.release_ref=function(){var e=b$6[this.ptr>>2];return b$6[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){S[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return S[this.ptr+16>>2]},this.get_exception_ptr=function(){if(at$2(this.get_type()))return S[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function Wt(e){!e||Me$1(new pr(e))}var V$2=0;function zt(){g$6(0),Me$1(er.pop()),V$2=0}function It$1(e){throw V$2||(V$2=e),V$2}function Mr(){var e=V$2;if(!e)return br(0),0;var t=new pr(e);t.set_adjusted_ptr(e);var i=t.get_type();if(!i)return br(0),e;for(var n=0;n<arguments.length;n++){var r=arguments[n];if(0===r||r===i)break;var o=t.ptr+16;if(ot$1(r,i,o))return br(r),e}return br(i),e}var Nt=Mr,Bt$1=Mr,Vt=Mr,Yt=Mr;function qt(e){!e||Qr(new pr(e))}function Xt(){var e=er.pop();e||B$1("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(er.push(e),e.set_rethrown(!0),e.set_caught(!1),Ar++),V$2=t}function Gt(e,t,i){throw new pr(e).init(t,i),Ar++,V$2=e}function Kt(){return Ar}var F$2={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var i=0,n=e.length-1;n>=0;n--){var r=e[n];"."===r?e.splice(n,1):".."===r?(e.splice(n,1),i++):i&&(e.splice(n,1),i--)}if(t)for(;i;i--)e.unshift("..");return e},normalize:e=>{var t=F$2.isAbs(e),i="/"===e.substr(-1);return e=F$2.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),!e&&!t&&(e="."),e&&i&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=F$2.splitPath(e),i=t[0],n=t[1];return i||n?(n&&(n=n.substr(0,n.length-1)),i+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=F$2.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return F$2.normalize(e.join("/"))},join2:(e,t)=>F$2.normalize(e+"/"+t)};function Jt(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(cr)try{var e=require("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch{}B$1("initRandomDevice")}function Re$1(e){return(Re$1=Jt())(e)}var Y$2={resolve:function(){for(var e="",t=!1,i=arguments.length-1;i>=-1&&!t;i--){var n=i>=0?arguments[i]:o$6.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=F$2.isAbs(n)}return(t?"/":"")+(e=F$2.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function i(e){for(var t=0;t<e.length&&""===e[t];t++);for(var i=e.length-1;i>=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=Y$2.resolve(e).substr(1),t=Y$2.resolve(t).substr(1);for(var n=i(e.split("/")),r=i(t.split("/")),o=Math.min(n.length,r.length),a=o,s=0;s<o;s++)if(n[s]!==r[s]){a=s;break}var l=[];for(s=a;s<n.length;s++)l.push("..");return(l=l.concat(r.slice(a))).join("/")}};function mr(e){for(var t=0,i=0;i<e.length;++i){var n=e.charCodeAt(i);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++i):t+=3}return t}function Zr(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+3>=o)break;t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r}function Rr(e,t,i){var n=i>0?i:mr(e)+1,r=new Array(n),o=Zr(e,r,0,r.length);return t&&(r.length=o),r}var J$1={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){J$1.ttys[e]={input:[],output:[],ops:t},o$6.registerDevice(e,J$1.stream_ops)},stream_ops:{open:function(e){var t=J$1.ttys[e.node.rdev];if(!t)throw new o$6.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,i,n,r){if(!e.tty||!e.tty.ops.get_char)throw new o$6.ErrnoError(60);for(var o=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch{throw new o$6.ErrnoError(29)}if(void 0===s&&0===o)throw new o$6.ErrnoError(6);if(null==s)break;o++,t[i+a]=s}return o&&(e.node.timestamp=Date.now()),o},write:function(e,t,i,n,r){if(!e.tty||!e.tty.ops.put_char)throw new o$6.ErrnoError(60);try{for(var o=0;o<n;o++)e.tty.ops.put_char(e.tty,t[i+o])}catch{throw new o$6.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if(cr){var i=Buffer.alloc(256),n=0;try{n=Yr.readSync(process.stdin.fd,i,0,256,-1)}catch(e){if(!e.toString().includes("EOF"))throw e;n=0}t=n>0?i.slice(0,n).toString("utf-8"):null}else typeof window<"u"&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&(null!==(t=readline())&&(t+="\n"));if(!t)return null;e.input=Rr(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(Xr(ar(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(Xr(ar(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(K$1(ar(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(K$1(ar(e.output,0)),e.output=[])}}};function $e(e){B$1()}var P$3={ops_table:null,mount:function(e){return P$3.createNode(null,"/",16895,0)},createNode:function(e,t,i,n){if(o$6.isBlkdev(i)||o$6.isFIFO(i))throw new o$6.ErrnoError(63);P$3.ops_table||(P$3.ops_table={dir:{node:{getattr:P$3.node_ops.getattr,setattr:P$3.node_ops.setattr,lookup:P$3.node_ops.lookup,mknod:P$3.node_ops.mknod,rename:P$3.node_ops.rename,unlink:P$3.node_ops.unlink,rmdir:P$3.node_ops.rmdir,readdir:P$3.node_ops.readdir,symlink:P$3.node_ops.symlink},stream:{llseek:P$3.stream_ops.llseek}},file:{node:{getattr:P$3.node_ops.getattr,setattr:P$3.node_ops.setattr},stream:{llseek:P$3.stream_ops.llseek,read:P$3.stream_ops.read,write:P$3.stream_ops.write,allocate:P$3.stream_ops.allocate,mmap:P$3.stream_ops.mmap,msync:P$3.stream_ops.msync}},link:{node:{getattr:P$3.node_ops.getattr,setattr:P$3.node_ops.setattr,readlink:P$3.node_ops.readlink},stream:{}},chrdev:{node:{getattr:P$3.node_ops.getattr,setattr:P$3.node_ops.setattr},stream:o$6.chrdev_stream_ops}});var r=o$6.createNode(e,t,i,n);return o$6.isDir(r.mode)?(r.node_ops=P$3.ops_table.dir.node,r.stream_ops=P$3.ops_table.dir.stream,r.contents={}):o$6.isFile(r.mode)?(r.node_ops=P$3.ops_table.file.node,r.stream_ops=P$3.ops_table.file.stream,r.usedBytes=0,r.contents=null):o$6.isLink(r.mode)?(r.node_ops=P$3.ops_table.link.node,r.stream_ops=P$3.ops_table.link.stream):o$6.isChrdev(r.mode)&&(r.node_ops=P$3.ops_table.chrdev.node,r.stream_ops=P$3.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r,e.timestamp=r.timestamp),r},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var i=e.contents?e.contents.length:0;if(!(i>=t)){t=Math.max(t,i*(i<1048576?2:1.125)>>>0),0!=i&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var i=e.contents;e.contents=new Uint8Array(t),i&&e.contents.set(i.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=o$6.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,o$6.isDir(e.mode)?t.size=4096:o$6.isFile(e.mode)?t.size=e.usedBytes:o$6.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&P$3.resizeFileStorage(e,t.size)},lookup:function(e,t){throw o$6.genericErrors[44]},mknod:function(e,t,i,n){return P$3.createNode(e,t,i,n)},rename:function(e,t,i){if(o$6.isDir(e.mode)){var n;try{n=o$6.lookupNode(t,i)}catch{}if(n)for(var r in n.contents)throw new o$6.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=i,t.contents[i]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var i=o$6.lookupNode(e,t);for(var n in i.contents)throw new o$6.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var i in e.contents)!e.contents.hasOwnProperty(i)||t.push(i);return t},symlink:function(e,t,i){var n=P$3.createNode(e,t,41471,0);return n.link=i,n},readlink:function(e){if(!o$6.isLink(e.mode))throw new o$6.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,i,n,r){var o=e.node.contents;if(r>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-r,n);if(a>8&&o.subarray)t.set(o.subarray(r,r+a),i);else for(var s=0;s<a;s++)t[i+s]=o[r+s];return a},write:function(e,t,i,n,r,o){if(t.buffer===U$3.buffer&&(o=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(o)return a.contents=t.subarray(i,i+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===r)return a.contents=t.slice(i,i+n),a.usedBytes=n,n;if(r+n<=a.usedBytes)return a.contents.set(t.subarray(i,i+n),r),n}if(P$3.expandFileStorage(a,r+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(i,i+n),r);else for(var s=0;s<n;s++)a.contents[r+s]=t[i+s];return a.usedBytes=Math.max(a.usedBytes,r+n),n},llseek:function(e,t,i){var n=t;if(1===i?n+=e.position:2===i&&o$6.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new o$6.ErrnoError(28);return n},allocate:function(e,t,i){P$3.expandFileStorage(e.node,t+i),e.node.usedBytes=Math.max(e.node.usedBytes,t+i)},mmap:function(e,t,i,n,r){if(!o$6.isFile(e.node.mode))throw new o$6.ErrnoError(43);var o,a,s=e.node.contents;if(2&r||s.buffer!==U$3.buffer){if((i>0||i+t<s.length)&&(s=s.subarray?s.subarray(i,i+t):Array.prototype.slice.call(s,i,i+t)),a=!0,!(o=$e()))throw new o$6.ErrnoError(48);U$3.set(s,o)}else a=!1,o=s.byteOffset;return{ptr:o,allocated:a}},msync:function(e,t,i,n,r){return P$3.stream_ops.write(e,t,0,n,i,!1),0}}};function Qt(e,t,i,n){var r=n?"":"al "+e;dr(e,(i=>{Ee(i,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(i)),r&&jr()}),(t=>{if(!i)throw'Loading data file "'+e+'" failed.';i()})),r&&Kr()}var o$6={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=Y$2.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new o$6.ErrnoError(32);for(var i=e.split("/").filter((e=>!!e)),n=o$6.root,r="/",o=0;o<i.length;o++){var a=o===i.length-1;if(a&&t.parent)break;if(n=o$6.lookupNode(n,i[o]),r=F$2.join2(r,i[o]),o$6.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;o$6.isLink(n.mode);){var l=o$6.readlink(r);if(r=Y$2.resolve(F$2.dirname(r),l),n=o$6.lookupPath(r,{recurse_count:t.recurse_count+1}).node,s++>40)throw new o$6.ErrnoError(32)}}return{path:r,node:n}},getPath:e=>{for(var t;;){if(o$6.isRoot(e)){var i=e.mount.mountpoint;return t?"/"!==i[i.length-1]?i+"/"+t:i+t:i}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var i=0,n=0;n<t.length;n++)i=(i<<5)-i+t.charCodeAt(n)|0;return(e+i>>>0)%o$6.nameTable.length},hashAddNode:e=>{var t=o$6.hashName(e.parent.id,e.name);e.name_next=o$6.nameTable[t],o$6.nameTable[t]=e},hashRemoveNode:e=>{var t=o$6.hashName(e.parent.id,e.name);if(o$6.nameTable[t]===e)o$6.nameTable[t]=e.name_next;else for(var i=o$6.nameTable[t];i;){if(i.name_next===e){i.name_next=e.name_next;break}i=i.name_next}},lookupNode:(e,t)=>{var i=o$6.mayLookup(e);if(i)throw new o$6.ErrnoError(i,e);for(var n=o$6.hashName(e.id,t),r=o$6.nameTable[n];r;r=r.name_next){var o=r.name;if(r.parent.id===e.id&&o===t)return r}return o$6.lookup(e,t)},createNode:(e,t,i,n)=>{var r=new o$6.FSNode(e,t,i,n);return o$6.hashAddNode(r),r},destroyNode:e=>{o$6.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=o$6.flagModes[e];if(typeof t>"u")throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>o$6.ignorePermissions?0:t.includes("r")&&!(292&e.mode)||t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0,mayLookup:e=>o$6.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,t)=>{try{o$6.lookupNode(e,t);return 20}catch{}return o$6.nodePermissions(e,"wx")},mayDelete:(e,t,i)=>{var n;try{n=o$6.lookupNode(e,t)}catch(e){return e.errno}var r=o$6.nodePermissions(e,"wx");if(r)return r;if(i){if(!o$6.isDir(n.mode))return 54;if(o$6.isRoot(n)||o$6.getPath(n)===o$6.cwd())return 10}else if(o$6.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?o$6.isLink(e.mode)?32:o$6.isDir(e.mode)&&("r"!==o$6.flagsToPermissionString(t)||512&t)?31:o$6.nodePermissions(e,o$6.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=o$6.MAX_OPEN_FDS)=>{for(var i=e;i<=t;i++)if(!o$6.streams[i])return i;throw new o$6.ErrnoError(33)},getStream:e=>o$6.streams[e],createStream:(e,t,i)=>{o$6.FSStream||(o$6.FSStream=function(){this.shared={}},o$6.FSStream.prototype={},Object.defineProperties(o$6.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new o$6.FSStream,e);var n=o$6.nextfd(t,i);return e.fd=n,o$6.streams[n]=e,e},closeStream:e=>{o$6.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=o$6.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new o$6.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{o$6.devices[e]={stream_ops:t}},getDevice:e=>o$6.devices[e],getMounts:e=>{for(var t=[],i=[e];i.length;){var n=i.pop();t.push(n),i.push.apply(i,n.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),o$6.syncFSRequests++,o$6.syncFSRequests>1&&K$1("warning: "+o$6.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var i=o$6.getMounts(o$6.root.mount),n=0;function r(e){return o$6.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,r(e));++n>=i.length&&r(null)}i.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:(e,t,i)=>{var n,r="/"===i,o=!i;if(r&&o$6.root)throw new o$6.ErrnoError(10);if(!r&&!o){var a=o$6.lookupPath(i,{follow_mount:!1});if(i=a.path,n=a.node,o$6.isMountpoint(n))throw new o$6.ErrnoError(10);if(!o$6.isDir(n.mode))throw new o$6.ErrnoError(54)}var s={type:e,opts:t,mountpoint:i,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,r?o$6.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount:e=>{var t=o$6.lookupPath(e,{follow_mount:!1});if(!o$6.isMountpoint(t.node))throw new o$6.ErrnoError(28);var i=t.node,n=i.mounted,r=o$6.getMounts(n);Object.keys(o$6.nameTable).forEach((e=>{for(var t=o$6.nameTable[e];t;){var i=t.name_next;r.includes(t.mount)&&o$6.destroyNode(t),t=i}})),i.mounted=null;var o=i.mount.mounts.indexOf(n);i.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,i)=>{var n=o$6.lookupPath(e,{parent:!0}).node,r=F$2.basename(e);if(!r||"."===r||".."===r)throw new o$6.ErrnoError(28);var o=o$6.mayCreate(n,r);if(o)throw new o$6.ErrnoError(o);if(!n.node_ops.mknod)throw new o$6.ErrnoError(63);return n.node_ops.mknod(n,r,t,i)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,o$6.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,o$6.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var i=e.split("/"),n="",r=0;r<i.length;++r)if(i[r]){n+="/"+i[r];try{o$6.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,i)=>(typeof i>"u"&&(i=t,t=438),t|=8192,o$6.mknod(e,t,i)),symlink:(e,t)=>{if(!Y$2.resolve(e))throw new o$6.ErrnoError(44);var i=o$6.lookupPath(t,{parent:!0}).node;if(!i)throw new o$6.ErrnoError(44);var n=F$2.basename(t),r=o$6.mayCreate(i,n);if(r)throw new o$6.ErrnoError(r);if(!i.node_ops.symlink)throw new o$6.ErrnoError(63);return i.node_ops.symlink(i,n,e)},rename:(e,t)=>{var i,n,r=F$2.dirname(e),o=F$2.dirname(t),a=F$2.basename(e),s=F$2.basename(t);if(i=o$6.lookupPath(e,{parent:!0}).node,n=o$6.lookupPath(t,{parent:!0}).node,!i||!n)throw new o$6.ErrnoError(44);if(i.mount!==n.mount)throw new o$6.ErrnoError(75);var l,u=o$6.lookupNode(i,a),c=Y$2.relative(e,o);if("."!==c.charAt(0))throw new o$6.ErrnoError(28);if("."!==(c=Y$2.relative(t,r)).charAt(0))throw new o$6.ErrnoError(55);try{l=o$6.lookupNode(n,s)}catch{}if(u!==l){var h=o$6.isDir(u.mode),d=o$6.mayDelete(i,a,h);if(d)throw new o$6.ErrnoError(d);if(d=l?o$6.mayDelete(n,s,h):o$6.mayCreate(n,s))throw new o$6.ErrnoError(d);if(!i.node_ops.rename)throw new o$6.ErrnoError(63);if(o$6.isMountpoint(u)||l&&o$6.isMountpoint(l))throw new o$6.ErrnoError(10);if(n!==i&&(d=o$6.nodePermissions(i,"w")))throw new o$6.ErrnoError(d);o$6.hashRemoveNode(u);try{i.node_ops.rename(u,n,s)}catch(e){throw e}finally{o$6.hashAddNode(u)}}},rmdir:e=>{var t=o$6.lookupPath(e,{parent:!0}).node,i=F$2.basename(e),n=o$6.lookupNode(t,i),r=o$6.mayDelete(t,i,!0);if(r)throw new o$6.ErrnoError(r);if(!t.node_ops.rmdir)throw new o$6.ErrnoError(63);if(o$6.isMountpoint(n))throw new o$6.ErrnoError(10);t.node_ops.rmdir(t,i),o$6.destroyNode(n)},readdir:e=>{var t=o$6.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new o$6.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=o$6.lookupPath(e,{parent:!0}).node;if(!t)throw new o$6.ErrnoError(44);var i=F$2.basename(e),n=o$6.lookupNode(t,i),r=o$6.mayDelete(t,i,!1);if(r)throw new o$6.ErrnoError(r);if(!t.node_ops.unlink)throw new o$6.ErrnoError(63);if(o$6.isMountpoint(n))throw new o$6.ErrnoError(10);t.node_ops.unlink(t,i),o$6.destroyNode(n)},readlink:e=>{var t=o$6.lookupPath(e).node;if(!t)throw new o$6.ErrnoError(44);if(!t.node_ops.readlink)throw new o$6.ErrnoError(28);return Y$2.resolve(o$6.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var i=o$6.lookupPath(e,{follow:!t}).node;if(!i)throw new o$6.ErrnoError(44);if(!i.node_ops.getattr)throw new o$6.ErrnoError(63);return i.node_ops.getattr(i)},lstat:e=>o$6.stat(e,!0),chmod:(e,t,i)=>{var n;"string"==typeof e?n=o$6.lookupPath(e,{follow:!i}).node:n=e;if(!n.node_ops.setattr)throw new o$6.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{o$6.chmod(e,t,!0)},fchmod:(e,t)=>{var i=o$6.getStream(e);if(!i)throw new o$6.ErrnoError(8);o$6.chmod(i.node,t)},chown:(e,t,i,n)=>{var r;"string"==typeof e?r=o$6.lookupPath(e,{follow:!n}).node:r=e;if(!r.node_ops.setattr)throw new o$6.ErrnoError(63);r.node_ops.setattr(r,{timestamp:Date.now()})},lchown:(e,t,i)=>{o$6.chown(e,t,i,!0)},fchown:(e,t,i)=>{var n=o$6.getStream(e);if(!n)throw new o$6.ErrnoError(8);o$6.chown(n.node,t,i)},truncate:(e,t)=>{if(t<0)throw new o$6.ErrnoError(28);var i;"string"==typeof e?i=o$6.lookupPath(e,{follow:!0}).node:i=e;if(!i.node_ops.setattr)throw new o$6.ErrnoError(63);if(o$6.isDir(i.mode))throw new o$6.ErrnoError(31);if(!o$6.isFile(i.mode))throw new o$6.ErrnoError(28);var n=o$6.nodePermissions(i,"w");if(n)throw new o$6.ErrnoError(n);i.node_ops.setattr(i,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var i=o$6.getStream(e);if(!i)throw new o$6.ErrnoError(8);if(0==(2097155&i.flags))throw new o$6.ErrnoError(28);o$6.truncate(i.node,t)},utime:(e,t,i)=>{var n=o$6.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,i)})},open:(e,t,i)=>{if(""===e)throw new o$6.ErrnoError(44);var n;if(i=typeof i>"u"?438:i,i=64&(t="string"==typeof t?o$6.modeStringToFlags(t):t)?4095&i|32768:0,"object"==typeof e)n=e;else{e=F$2.normalize(e);try{n=o$6.lookupPath(e,{follow:!(131072&t)}).node}catch{}}var r=!1;if(64&t)if(n){if(128&t)throw new o$6.ErrnoError(20)}else n=o$6.mknod(e,i,0),r=!0;if(!n)throw new o$6.ErrnoError(44);if(o$6.isChrdev(n.mode)&&(t&=-513),65536&t&&!o$6.isDir(n.mode))throw new o$6.ErrnoError(54);if(!r){var o=o$6.mayOpen(n,t);if(o)throw new o$6.ErrnoError(o)}512&t&&!r&&o$6.truncate(n,0),t&=-131713;var a=o$6.createStream({node:n,path:o$6.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),c$7.logReadFiles&&!(1&t)&&(o$6.readFiles||(o$6.readFiles={}),e in o$6.readFiles||(o$6.readFiles[e]=1)),a},close:e=>{if(o$6.isClosed(e))throw new o$6.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{o$6.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,i)=>{if(o$6.isClosed(e))throw new o$6.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new o$6.ErrnoError(70);if(0!=i&&1!=i&&2!=i)throw new o$6.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,i),e.ungotten=[],e.position},read:(e,t,i,n,r)=>{if(n<0||r<0)throw new o$6.ErrnoError(28);if(o$6.isClosed(e))throw new o$6.ErrnoError(8);if(1==(2097155&e.flags))throw new o$6.ErrnoError(8);if(o$6.isDir(e.node.mode))throw new o$6.ErrnoError(31);if(!e.stream_ops.read)throw new o$6.ErrnoError(28);var o=typeof r<"u";if(o){if(!e.seekable)throw new o$6.ErrnoError(70)}else r=e.position;var a=e.stream_ops.read(e,t,i,n,r);return o||(e.position+=a),a},write:(e,t,i,n,r,o)=>{if(n<0||r<0)throw new o$6.ErrnoError(28);if(o$6.isClosed(e))throw new o$6.ErrnoError(8);if(0==(2097155&e.flags))throw new o$6.ErrnoError(8);if(o$6.isDir(e.node.mode))throw new o$6.ErrnoError(31);if(!e.stream_ops.write)throw new o$6.ErrnoError(28);e.seekable&&1024&e.flags&&o$6.llseek(e,0,2);var a=typeof r<"u";if(a){if(!e.seekable)throw new o$6.ErrnoError(70)}else r=e.position;var s=e.stream_ops.write(e,t,i,n,r,o);return a||(e.position+=s),s},allocate:(e,t,i)=>{if(o$6.isClosed(e))throw new o$6.ErrnoError(8);if(t<0||i<=0)throw new o$6.ErrnoError(28);if(0==(2097155&e.flags))throw new o$6.ErrnoError(8);if(!o$6.isFile(e.node.mode)&&!o$6.isDir(e.node.mode))throw new o$6.ErrnoError(43);if(!e.stream_ops.allocate)throw new o$6.ErrnoError(138);e.stream_ops.allocate(e,t,i)},mmap:(e,t,i,n,r)=>{if(0!=(2&n)&&0==(2&r)&&2!=(2097155&e.flags))throw new o$6.ErrnoError(2);if(1==(2097155&e.flags))throw new o$6.ErrnoError(2);if(!e.stream_ops.mmap)throw new o$6.ErrnoError(43);return e.stream_ops.mmap(e,t,i,n,r)},msync:(e,t,i,n,r)=>e.stream_ops.msync?e.stream_ops.msync(e,t,i,n,r):0,munmap:e=>0,ioctl:(e,t,i)=>{if(!e.stream_ops.ioctl)throw new o$6.ErrnoError(59);return e.stream_ops.ioctl(e,t,i)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var i,n=o$6.open(e,t.flags),r=o$6.stat(e).size,o=new Uint8Array(r);return o$6.read(n,o,0,r,0),"utf8"===t.encoding?i=ar(o,0):"binary"===t.encoding&&(i=o),o$6.close(n),i},writeFile:(e,t,i={})=>{i.flags=i.flags||577;var n=o$6.open(e,i.flags,i.mode);if("string"==typeof t){var r=new Uint8Array(mr(t)+1),o=Zr(t,r,0,r.length);o$6.write(n,r,0,o,void 0,i.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");o$6.write(n,t,0,t.byteLength,void 0,i.canOwn)}o$6.close(n)},cwd:()=>o$6.currentPath,chdir:e=>{var t=o$6.lookupPath(e,{follow:!0});if(null===t.node)throw new o$6.ErrnoError(44);if(!o$6.isDir(t.node.mode))throw new o$6.ErrnoError(54);var i=o$6.nodePermissions(t.node,"x");if(i)throw new o$6.ErrnoError(i);o$6.currentPath=t.path},createDefaultDirectories:()=>{o$6.mkdir("/tmp"),o$6.mkdir("/home"),o$6.mkdir("/home/web_user")},createDefaultDevices:()=>{o$6.mkdir("/dev"),o$6.registerDevice(o$6.makedev(1,3),{read:()=>0,write:(e,t,i,n,r)=>n}),o$6.mkdev("/dev/null",o$6.makedev(1,3)),J$1.register(o$6.makedev(5,0),J$1.default_tty_ops),J$1.register(o$6.makedev(6,0),J$1.default_tty1_ops),o$6.mkdev("/dev/tty",o$6.makedev(5,0)),o$6.mkdev("/dev/tty1",o$6.makedev(6,0));var e=new Uint8Array(1024),t=0,i=()=>(0===t&&(t=Re$1(e).byteLength),e[--t]);o$6.createDevice("/dev","random",i),o$6.createDevice("/dev","urandom",i),o$6.mkdir("/dev/shm"),o$6.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{o$6.mkdir("/proc");var e=o$6.mkdir("/proc/self");o$6.mkdir("/proc/self/fd"),o$6.mount({mount:()=>{var t=o$6.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var i=+t,n=o$6.getStream(i);if(!n)throw new o$6.ErrnoError(8);var r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{c$7.stdin?o$6.createDevice("/dev","stdin",c$7.stdin):o$6.symlink("/dev/tty","/dev/stdin"),c$7.stdout?o$6.createDevice("/dev","stdout",null,c$7.stdout):o$6.symlink("/dev/tty","/dev/stdout"),c$7.stderr?o$6.createDevice("/dev","stderr",null,c$7.stderr):o$6.symlink("/dev/tty1","/dev/stderr"),o$6.open("/dev/stdin",0),o$6.open("/dev/stdout",1),o$6.open("/dev/stderr",1)},ensureErrnoError:()=>{o$6.ErrnoError||(o$6.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},o$6.ErrnoError.prototype=new Error,o$6.ErrnoError.prototype.constructor=o$6.ErrnoError,[44].forEach((e=>{o$6.genericErrors[e]=new o$6.ErrnoError(e),o$6.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{o$6.ensureErrnoError(),o$6.nameTable=new Array(4096),o$6.mount(P$3,{},"/"),o$6.createDefaultDirectories(),o$6.createDefaultDevices(),o$6.createSpecialDirectories(),o$6.filesystems={MEMFS:P$3}},init:(e,t,i)=>{o$6.init.initialized=!0,o$6.ensureErrnoError(),c$7.stdin=e||c$7.stdin,c$7.stdout=t||c$7.stdout,c$7.stderr=i||c$7.stderr,o$6.createStandardStreams()},quit:()=>{o$6.init.initialized=!1;for(var e=0;e<o$6.streams.length;e++){var t=o$6.streams[e];!t||o$6.close(t)}},getMode:(e,t)=>{var i=0;return e&&(i|=365),t&&(i|=146),i},findObject:(e,t)=>{var i=o$6.analyzePath(e,t);return i.exists?i.object:null},analyzePath:(e,t)=>{try{e=(n=o$6.lookupPath(e,{follow:!t})).path}catch{}var i={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=o$6.lookupPath(e,{parent:!0});i.parentExists=!0,i.parentPath=n.path,i.parentObject=n.node,i.name=F$2.basename(e),n=o$6.lookupPath(e,{follow:!t}),i.exists=!0,i.path=n.path,i.object=n.node,i.name=n.node.name,i.isRoot="/"===n.path}catch(e){i.error=e.errno}return i},createPath:(e,t,i,n)=>{e="string"==typeof e?e:o$6.getPath(e);for(var r=t.split("/").reverse();r.length;){var o=r.pop();if(o){var a=F$2.join2(e,o);try{o$6.mkdir(a)}catch{}e=a}}return a},createFile:(e,t,i,n,r)=>{var o=F$2.join2("string"==typeof e?e:o$6.getPath(e),t),a=o$6.getMode(n,r);return o$6.create(o,a)},createDataFile:(e,t,i,n,r,o)=>{var a=t;e&&(e="string"==typeof e?e:o$6.getPath(e),a=t?F$2.join2(e,t):e);var s=o$6.getMode(n,r),l=o$6.create(a,s);if(i){if("string"==typeof i){for(var u=new Array(i.length),c=0,h=i.length;c<h;++c)u[c]=i.charCodeAt(c);i=u}o$6.chmod(l,146|s);var d=o$6.open(l,577);o$6.write(d,i,0,i.length,0,o),o$6.close(d),o$6.chmod(l,s)}return l},createDevice:(e,t,i,n)=>{var r=F$2.join2("string"==typeof e?e:o$6.getPath(e),t),o=o$6.getMode(!!i,!!n);o$6.createDevice.major||(o$6.createDevice.major=64);var a=o$6.makedev(o$6.createDevice.major++,0);return o$6.registerDevice(a,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,t,n,r,o)=>{for(var a=0,s=0;s<r;s++){var l;try{l=i()}catch{throw new o$6.ErrnoError(29)}if(void 0===l&&0===a)throw new o$6.ErrnoError(6);if(null==l)break;a++,t[n+s]=l}return a&&(e.node.timestamp=Date.now()),a},write:(e,t,i,r,o)=>{for(var a=0;a<r;a++)try{n(t[i+a])}catch{throw new o$6.ErrnoError(29)}return r&&(e.node.timestamp=Date.now()),a}}),o$6.mkdev(r,o,a)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!lr)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Rr(lr(e.url),!0),e.usedBytes=e.contents.length}catch{throw new o$6.ErrnoError(29)}},createLazyFile:(e,t,i,n,r)=>{function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,i=e/this.chunkSize|0;return this.getter(i)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),r=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;r||(a=n);var s=this;s.setDataGetter((e=>{var t=e*a,r=(e+1)*a-1;if(r=Math.min(r,n-1),typeof s.chunks[e]>"u"&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var r=new XMLHttpRequest;if(r.open("GET",i,!1),n!==a&&r.setRequestHeader("Range","bytes="+e+"-"+t),r.responseType="arraybuffer",r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+i+". Status: "+r.status);return void 0!==r.response?new Uint8Array(r.response||[]):Rr(r.responseText||"",!0)})(t,r)),typeof s.chunks[e]>"u")throw new Error("doXHR failed!");return s.chunks[e]})),(o||!n)&&(a=n=1,n=this.getter(0).length,a=n,Xr("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!ir)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new o;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:i};var l=o$6.createFile(e,t,s,n,r);s.contents?l.contents=s.contents:s.url&&(l.contents=null,l.url=s.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var u={};function c(e,t,i,n,r){var o=e.node.contents;if(r>=o.length)return 0;var a=Math.min(o.length-r,n);if(o.slice)for(var s=0;s<a;s++)t[i+s]=o[r+s];else for(s=0;s<a;s++)t[i+s]=o.get(r+s);return a}return Object.keys(l.stream_ops).forEach((e=>{var t=l.stream_ops[e];u[e]=function(){return o$6.forceLoadFile(l),t.apply(null,arguments)}})),u.read=(e,t,i,n,r)=>(o$6.forceLoadFile(l),c(e,t,i,n,r)),u.mmap=(e,t,i,n,r)=>{o$6.forceLoadFile(l);var o=$e();if(!o)throw new o$6.ErrnoError(48);return c(e,U$3,o,t,i),{ptr:o,allocated:!0}},l.stream_ops=u,l},createPreloadedFile:(e,t,i,n,r,o,a,s,l,u)=>{var c=t?Y$2.resolve(F$2.join2(e,t)):e;function h(i){function h(i){u&&u(),s||o$6.createDataFile(e,t,i,n,r,l),o&&o(),jr()}Browser.handledByPreloadPlugin(i,c,h,(()=>{a&&a(),jr()}))||h(i)}Kr(),"string"==typeof i?Qt(i,(e=>h(e)),a):h(i)}},Oe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function ar(e,t,i){for(var n=t+i,r=t;e[r]&&!(r>=n);)++r;if(r-t>16&&e.buffer&&Oe)return Oe.decode(e.subarray(t,r));for(var o="";t<r;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var l=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|l:(7&a)<<18|s<<12|l<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var u=a-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function $r(e,t){return e?ar(W$2,e,t):""}var A$2={DEFAULT_POLLMASK:5,calculateAt:function(e,t,i){if(F$2.isAbs(t))return t;var n;-100===e?n=o$6.cwd():n=A$2.getStreamFromFD(e).path;if(0==t.length){if(!i)throw new o$6.ErrnoError(44);return n}return F$2.join2(n,t)},doStat:function(e,t,i){try{var n=e(t)}catch(e){if(e&&e.node&&F$2.normalize(t)!==F$2.normalize(o$6.getPath(e.node)))return-54;throw e}b$6[i>>2]=n.dev,b$6[i+8>>2]=n.ino,b$6[i+12>>2]=n.mode,S[i+16>>2]=n.nlink,b$6[i+20>>2]=n.uid,b$6[i+24>>2]=n.gid,b$6[i+28>>2]=n.rdev,H$1=[n.size>>>0,(T$3=n.size,+Math.abs(T$3)>=1?T$3>0?(0|Math.min(+Math.floor(T$3/4294967296),4294967295))>>>0:~~+Math.ceil((T$3-+(~~T$3>>>0))/4294967296)>>>0:0)],b$6[i+40>>2]=H$1[0],b$6[i+44>>2]=H$1[1],b$6[i+48>>2]=4096,b$6[i+52>>2]=n.blocks;var r=n.atime.getTime(),o=n.mtime.getTime(),a=n.ctime.getTime();return H$1=[Math.floor(r/1e3)>>>0,(T$3=Math.floor(r/1e3),+Math.abs(T$3)>=1?T$3>0?(0|Math.min(+Math.floor(T$3/4294967296),4294967295))>>>0:~~+Math.ceil((T$3-+(~~T$3>>>0))/4294967296)>>>0:0)],b$6[i+56>>2]=H$1[0],b$6[i+60>>2]=H$1[1],S[i+64>>2]=r%1e3*1e3,H$1=[Math.floor(o/1e3)>>>0,(T$3=Math.floor(o/1e3),+Math.abs(T$3)>=1?T$3>0?(0|Math.min(+Math.floor(T$3/4294967296),4294967295))>>>0:~~+Math.ceil((T$3-+(~~T$3>>>0))/4294967296)>>>0:0)],b$6[i+72>>2]=H$1[0],b$6[i+76>>2]=H$1[1],S[i+80>>2]=o%1e3*1e3,H$1=[Math.floor(a/1e3)>>>0,(T$3=Math.floor(a/1e3),+Math.abs(T$3)>=1?T$3>0?(0|Math.min(+Math.floor(T$3/4294967296),4294967295))>>>0:~~+Math.ceil((T$3-+(~~T$3>>>0))/4294967296)>>>0:0)],b$6[i+88>>2]=H$1[0],b$6[i+92>>2]=H$1[1],S[i+96>>2]=a%1e3*1e3,H$1=[n.ino>>>0,(T$3=n.ino,+Math.abs(T$3)>=1?T$3>0?(0|Math.min(+Math.floor(T$3/4294967296),4294967295))>>>0:~~+Math.ceil((T$3-+(~~T$3>>>0))/4294967296)>>>0:0)],b$6[i+104>>2]=H$1[0],b$6[i+108>>2]=H$1[1],0},doMsync:function(e,t,i,n,r){if(!o$6.isFile(t.node.mode))throw new o$6.ErrnoError(43);if(2&n)return 0;var o=W$2.slice(e,e+i);o$6.msync(t,o,r,i,n)},varargs:void 0,get:function(){return A$2.varargs+=4,b$6[A$2.varargs-4>>2]},getStr:function(e){return $r(e)},getStreamFromFD:function(e){var t=o$6.getStream(e);if(!t)throw new o$6.ErrnoError(8);return t}};function Zt(e){try{return e=A$2.getStr(e),o$6.chdir(e),0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function rn(e){return b$6[it()>>2]=e,e}function en(e,t,i){A$2.varargs=i;try{var n=A$2.getStreamFromFD(e);switch(t){case 0:return(r=A$2.get())<0?-28:o$6.createStream(n,r).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var r=A$2.get();return n.flags|=r,0;case 5:r=A$2.get();return Z$3[r+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return rn(28),-1}}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function re(e,t,i){return Zr(e,W$2,t,i)}function tn(e,t){try{if(0===t)return-28;var i=o$6.cwd(),n=mr(i)+1;return t<n?-68:(re(i,e,t),n)}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function nn(e,t,i){A$2.varargs=i;try{var n=A$2.getStreamFromFD(e);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var r=A$2.get();return b$6[r>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:r=A$2.get();return o$6.ioctl(n,t,r);default:return-28}}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function on(e,t,i){try{return t=A$2.getStr(t),t=A$2.calculateAt(e,t),"/"===(t=F$2.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),o$6.mkdir(t,i,0),0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function an(e,t,i,n){A$2.varargs=n;try{t=A$2.getStr(t),t=A$2.calculateAt(e,t);var r=n?A$2.get():0;return o$6.open(t,i,r).fd}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function sn(e,t,i,n){try{if(t=A$2.getStr(t),t=A$2.calculateAt(e,t),n<=0)return-28;var r=o$6.readlink(t),o=Math.min(n,mr(r)),a=U$3[i+o];return re(r,i,n+1),U$3[i+o]=a,o}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function un(e){try{return e=A$2.getStr(e),o$6.rmdir(e),0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function fn(e,t){try{return e=A$2.getStr(e),A$2.doStat(o$6.stat,e,t)}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function cn(e,t,i){try{return t=A$2.getStr(t),t=A$2.calculateAt(e,t),0===i?o$6.unlink(t):512===i?o$6.rmdir(t):B$1("Invalid flags passed to unlinkat"),0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return-e.errno}}function ln(e,t,i,n,r){}function ee(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function dn(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ue$1=e}var Ue$1=void 0;function z$2(e){for(var t="",i=e;W$2[i];)t+=Ue$1[W$2[i++]];return t}var sr={},tr={},Or={},vn=48,hn=57;function te(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=vn&&t<=hn?"_"+e:e}function ne$1(e,t){return{[e=te(e)]:function(){return t.apply(this,arguments)}}[e]}function ie(e,t){var i=ne$1(t,(function(e){this.name=t,this.message=e;var i=new Error(e).stack;void 0!==i&&(this.stack=this.toString()+"\n"+i.replace(/^Error(:[^\n]*)?\n/,""))}));return i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},i}var ur=void 0;function j$6(e){throw new ur(e)}var He$1=void 0;function Ur(e){throw new He$1(e)}function fr(e,t,i){function n(t){var n=i(t);n.length!==e.length&&Ur("Mismatched type converter count");for(var r=0;r<e.length;++r)q$2(e[r],n[r])}e.forEach((function(e){Or[e]=t}));var r=new Array(t.length),o=[],a=0;t.forEach(((e,t)=>{tr.hasOwnProperty(e)?r[t]=tr[e]:(o.push(e),sr.hasOwnProperty(e)||(sr[e]=[]),sr[e].push((()=>{r[t]=tr[e],++a===o.length&&n(r)})))})),0===o.length&&n(r)}function q$2(e,t,i={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||j$6('type "'+n+'" must have a positive integer typeid pointer'),tr.hasOwnProperty(e)){if(i.ignoreDuplicateRegistrations)return;j$6("Cannot register type '"+n+"' twice")}if(tr[e]=t,delete Or[e],sr.hasOwnProperty(e)){var r=sr[e];delete sr[e],r.forEach((e=>e()))}}function pn(e,t,i,n,r){var o=ee(i);q$2(e,{name:t=z$2(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===i)n=U$3;else if(2===i)n=Z$3;else{if(4!==i)throw new TypeError("Unknown boolean type size: "+t);n=b$6}return this.fromWireType(n[e>>o])},destructorFunction:null})}function mn(e){if(!(this instanceof Q$3&&e instanceof Q$3))return!1;for(var t=this.$$.ptrType.registeredClass,i=this.$$.ptr,n=e.$$.ptrType.registeredClass,r=e.$$.ptr;t.baseClass;)i=t.upcast(i),t=t.baseClass;for(;n.baseClass;)r=n.upcast(r),n=n.baseClass;return t===n&&i===r}function yn(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function oe$1(e){j$6(function(e){return e.$$.ptrType.registeredClass.name}(e)+" instance already deleted")}var ae=!1;function xe$1(e){}function _n(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function Le$1(e){e.count.value-=1,0===e.count.value&&_n(e)}function We(e,t,i){if(t===i)return e;if(void 0===i.baseClass)return null;var n=We(e,t,i.baseClass);return null===n?null:i.downcast(n)}var ze$2={};function gn(){return Object.keys(gr).length}function wn(){var e=[];for(var t in gr)gr.hasOwnProperty(t)&&e.push(gr[t]);return e}var yr=[];function se(){for(;yr.length;){var e=yr.pop();e.$$.deleteScheduled=!1,e.delete()}}var _r=void 0;function En(e){_r=e,yr.length&&_r&&_r(se)}function bn(){c$7.getInheritedInstanceCount=gn,c$7.getLiveInheritedInstances=wn,c$7.flushPendingDeletes=se,c$7.setDelayFunction=En}var gr={};function kn(e,t){for(void 0===t&&j$6("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function Pn(e,t){return t=kn(e,t),gr[t]}function Hr(e,t){return(!t.ptrType||!t.ptr)&&Ur("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&Ur("Both smartPtrType and smartPtr must be specified"),t.count={value:1},wr(Object.create(e,{$$:{value:t}}))}function Cn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var i=Pn(this.registeredClass,t);if(void 0!==i){if(0===i.$$.count.value)return i.$$.ptr=t,i.$$.smartPtr=e,i.clone();var n=i.clone();return this.destructor(e),n}function r(){return this.isSmartPointer?Hr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Hr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,a=this.registeredClass.getActualType(t),s=ze$2[a];if(!s)return r.call(this);o=this.isConst?s.constPointerType:s.pointerType;var l=We(t,this.registeredClass,o.registeredClass);return null===l?r.call(this):this.isSmartPointer?Hr(o.registeredClass.instancePrototype,{ptrType:o,ptr:l,smartPtrType:this,smartPtr:e}):Hr(o.registeredClass.instancePrototype,{ptrType:o,ptr:l})}function wr(e){return typeof FinalizationRegistry>"u"?(wr=e=>e,e):(ae=new FinalizationRegistry((e=>{Le$1(e.$$)})),wr=e=>{var t=e.$$;if(!!t.smartPtr){var i={$$:t};ae.register(e,i,e)}return e},xe$1=e=>ae.unregister(e),wr(e))}function Tn(){if(this.$$.ptr||oe$1(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=wr(Object.create(Object.getPrototypeOf(this),{$$:{value:yn(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Sn(){this.$$.ptr||oe$1(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&j$6("Object already scheduled for deletion"),xe$1(this),Le$1(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function jn(){return!this.$$.ptr}function Fn(){return this.$$.ptr||oe$1(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&j$6("Object already scheduled for deletion"),yr.push(this),1===yr.length&&_r&&_r(se),this.$$.deleteScheduled=!0,this}function An(){Q$3.prototype.isAliasOf=mn,Q$3.prototype.clone=Tn,Q$3.prototype.delete=Sn,Q$3.prototype.isDeleted=jn,Q$3.prototype.deleteLater=Fn}function Q$3(){}function Ie(e,t,i){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||j$6("Function '"+i+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function Ne(e,t,i){c$7.hasOwnProperty(e)?((void 0===i||void 0!==c$7[e].overloadTable&&void 0!==c$7[e].overloadTable[i])&&j$6("Cannot register public name '"+e+"' twice"),Ie(c$7,e,e),c$7.hasOwnProperty(i)&&j$6("Cannot register multiple overloads of a function with the same number of arguments ("+i+")!"),c$7[e].overloadTable[i]=t):(c$7[e]=t,void 0!==i&&(c$7[e].numArguments=i))}function Dn(e,t,i,n,r,o,a,s){this.name=e,this.constructor=t,this.instancePrototype=i,this.rawDestructor=n,this.baseClass=r,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function ue$1(e,t,i){for(;t!==i;)t.upcast||j$6("Expected null or instance of "+i.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Mn(e,t){if(null===t)return this.isReference&&j$6("null is not a valid "+this.name),0;t.$$||j$6('Cannot pass "'+de(t)+'" as a '+this.name),t.$$.ptr||j$6("Cannot pass deleted object as a pointer of type "+this.name);var i=t.$$.ptrType.registeredClass;return ue$1(t.$$.ptr,i,this.registeredClass)}function Rn(e,t){var i;if(null===t)return this.isReference&&j$6("null is not a valid "+this.name),this.isSmartPointer?(i=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,i),i):0;t.$$||j$6('Cannot pass "'+de(t)+'" as a '+this.name),t.$$.ptr||j$6("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&j$6("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(i=ue$1(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&j$6("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?i=t.$$.smartPtr:j$6("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:i=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)i=t.$$.smartPtr;else{var r=t.clone();i=this.rawShare(i,x$3.toHandle((function(){r.delete()}))),null!==e&&e.push(this.rawDestructor,i)}break;default:j$6("Unsupporting sharing policy")}return i}function $n(e,t){if(null===t)return this.isReference&&j$6("null is not a valid "+this.name),0;t.$$||j$6('Cannot pass "'+de(t)+'" as a '+this.name),t.$$.ptr||j$6("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&j$6("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var i=t.$$.ptrType.registeredClass;return ue$1(t.$$.ptr,i,this.registeredClass)}function xr(e){return this.fromWireType(b$6[e>>2])}function On(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Un(e){this.rawDestructor&&this.rawDestructor(e)}function Hn(e){null!==e&&e.delete()}function xn(){X$2.prototype.getPointee=On,X$2.prototype.destructor=Un,X$2.prototype.argPackAdvance=8,X$2.prototype.readValueFromPointer=xr,X$2.prototype.deleteObject=Hn,X$2.prototype.fromWireType=Cn}function X$2(e,t,i,n,r,o,a,s,l,u,c){this.name=e,this.registeredClass=t,this.isReference=i,this.isConst=n,this.isSmartPointer=r,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=u,this.rawDestructor=c,r||void 0!==t.baseClass?this.toWireType=Rn:n?(this.toWireType=Mn,this.destructorFunction=null):(this.toWireType=$n,this.destructorFunction=null)}function Be$1(e,t,i){c$7.hasOwnProperty(e)||Ur("Replacing nonexistant public symbol"),void 0!==c$7[e].overloadTable&&void 0!==i?c$7[e].overloadTable[i]=t:(c$7[e]=t,c$7[e].argCount=i)}function Ln(e,t,i){var n=c$7["dynCall_"+e];return i&&i.length?n.apply(null,[t].concat(i)):n.call(null,t)}function Wn(e,t,i){return e.includes("j")?Ln(e,t,i):k$3(t).apply(null,i)}function zn(e,t){var i=[];return function(){return i.length=0,Object.assign(i,arguments),Wn(e,t,i)}}function nr(e,t){var i=(e=z$2(e)).includes("j")?zn(e,t):k$3(t);return"function"!=typeof i&&j$6("unknown function pointer with signature "+e+": "+t),i}var Ve$2=void 0;function Ye(e){var t=nt$1(e),i=z$2(t);return G$1(t),i}function Lr(e,t){var i=[],n={};throw t.forEach((function e(t){if(!n[t]&&!tr[t]){if(Or[t])return void Or[t].forEach(e);i.push(t),n[t]=!0}})),new Ve$2(e+": "+i.map(Ye).join([", "]))}function In(e,t,i,n,r,o,a,s,l,u,c,h,d){c=z$2(c),o=nr(r,o),s&&(s=nr(a,s)),u&&(u=nr(l,u)),d=nr(h,d);var f=te(c);Ne(f,(function(){Lr("Cannot construct "+c+" due to unbound types",[n])})),fr([e,t,i],n?[n]:[],(function(t){var i,r;t=t[0],n?r=(i=t.registeredClass).instancePrototype:r=Q$3.prototype;var a=ne$1(f,(function(){if(Object.getPrototypeOf(this)!==l)throw new ur("Use 'new' to construct "+c);if(void 0===h.constructor_body)throw new ur(c+" has no accessible constructor");var e=h.constructor_body[arguments.length];if(void 0===e)throw new ur("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(h.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),l=Object.create(r,{constructor:{value:a}});a.prototype=l;var h=new Dn(c,a,l,d,i,o,s,u),p=new X$2(c,h,!0,!1,!1),_=new X$2(c+"*",h,!1,!1,!1),m=new X$2(c+" const*",h,!1,!0,!1);return ze$2[e]={pointerType:_,constPointerType:m},Be$1(f,a),[p,_,m]}))}function fe(e,t){for(var i=[],n=0;n<e;n++)i.push(S[t+4*n>>2]);return i}function qe(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Nn(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var i=ne$1(e.name||"unknownFunctionName",(function(){}));i.prototype=e.prototype;var n=new i,r=e.apply(n,t);return r instanceof Object?r:n}function ce$2(e,t,i,n,r,o){var a=t.length;a<2&&j$6("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==i,l=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){l=!0;break}var c="void"!==t[0].name,h="",d="";for(u=0;u<a-2;++u)h+=(0!==u?", ":"")+"arg"+u,d+=(0!==u?", ":"")+"arg"+u+"Wired";var f="return function "+te(e)+"("+h+") {\nif (arguments.length !== "+(a-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(a-2)+" args!');\n}\n";l&&(f+="var destructors = [];\n");var p=l?"destructors":"null",_=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],m=[j$6,n,r,qe,t[0],t[1]];s&&(f+="var thisWired = classParam.toWireType("+p+", this);\n");for(u=0;u<a-2;++u)f+="var arg"+u+"Wired = argType"+u+".toWireType("+p+", arg"+u+"); // "+t[u+2].name+"\n",_.push("argType"+u),m.push(t[u+2]);if(s&&(d="thisWired"+(d.length>0?", ":"")+d),f+=(c||o?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",l)f+="runDestructors(destructors);\n";else for(u=s?1:2;u<t.length;++u){var g=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==t[u].destructorFunction&&(f+=g+"_dtor("+g+"); // "+t[u].name+"\n",_.push(g+"_dtor"),m.push(t[u].destructorFunction))}return c&&(f+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),f+="}\n",_.push(f),Nn(Function,_).apply(null,m)}function Bn(e,t,i,n,r,o){Ee(t>0);var a=fe(t,i);r=nr(n,r),fr([],[e],(function(e){var i="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new ur("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=()=>{Lr("Cannot construct "+e.name+" due to unbound types",a)},fr([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=ce$2(i,n,null,r,o),[]})),[]}))}function Vn(e,t,i,n,r,o,a,s,l){var u=fe(i,n);t=z$2(t),o=nr(r,o),fr([],[e],(function(e){var n=(e=e[0]).name+"."+t;function r(){Lr("Cannot call "+n+" due to unbound types",u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,h=c[t];return void 0===h||void 0===h.overloadTable&&h.className!==e.name&&h.argCount===i-2?(r.argCount=i-2,r.className=e.name,c[t]=r):(Ie(c,t,n),c[t].overloadTable[i-2]=r),fr([],u,(function(r){var s=ce$2(n,r,e,o,a,l);return void 0===c[t].overloadTable?(s.argCount=i-2,c[t]=s):c[t].overloadTable[i-2]=s,[]})),[]}))}function Yn(){this.allocated=[void 0],this.freelist=[],this.get=function(e){return this.allocated[e]},this.allocate=function(e){let t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},this.free=function(e){this.allocated[e]=void 0,this.freelist.push(e)}}var N$2=new Yn;function le$1(e){e>=N$2.reserved&&0==--N$2.get(e).refcount&&N$2.free(e)}function qn(){for(var e=0,t=N$2.reserved;t<N$2.allocated.length;++t)void 0!==N$2.allocated[t]&&++e;return e}function Xn(){N$2.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),N$2.reserved=N$2.allocated.length,c$7.count_emval_handles=qn}var x$3={toValue:e=>(e||j$6("Cannot use deleted val. handle = "+e),N$2.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return N$2.allocate({refcount:1,value:e})}}};function Gn(e,t){q$2(e,{name:t=z$2(t),fromWireType:function(e){var t=x$3.toValue(e);return le$1(e),t},toWireType:function(e,t){return x$3.toHandle(t)},argPackAdvance:8,readValueFromPointer:xr,destructorFunction:null})}function de(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Kn(e,t){switch(t){case 2:return function(e){return this.fromWireType(be[e>>2])};case 3:return function(e){return this.fromWireType(ke[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Jn(e,t,i){var n=ee(i);q$2(e,{name:t=z$2(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:Kn(t,n),destructorFunction:null})}function Qn(e,t,i,n,r,o,a){var s=fe(t,i);e=z$2(e),r=nr(n,r),Ne(e,(function(){Lr("Cannot call "+e+" due to unbound types",s)}),t-1),fr([],s,(function(i){var n=[i[0],null].concat(i.slice(1));return Be$1(e,ce$2(e,n,null,r,o,a),t-1),[]}))}function Zn(e,t,i){switch(t){case 0:return i?function(e){return U$3[e]}:function(e){return W$2[e]};case 1:return i?function(e){return Z$3[e>>1]}:function(e){return Sr[e>>1]};case 2:return i?function(e){return b$6[e>>2]}:function(e){return S[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function ri(e,t,i,n,r){t=z$2(t);var o=ee(i),a=e=>e;if(0===n){var s=32-8*i;a=e=>e<<s>>>s}var l,u=t.includes("unsigned");l=u?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},q$2(e,{name:t,fromWireType:a,toWireType:l,argPackAdvance:8,readValueFromPointer:Zn(t,o,0!==n),destructorFunction:null})}function ei(e,t,i){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function r(e){var t=S,i=t[e>>=2],r=t[e+1];return new n(t.buffer,r,i)}q$2(e,{name:i=z$2(i),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ignoreDuplicateRegistrations:!0})}function ti(e,t){var i="std::string"===(t=z$2(t));q$2(e,{name:t,fromWireType:function(e){var t,n=S[e>>2],r=e+4;if(i)for(var o=r,a=0;a<=n;++a){var s=r+a;if(a==n||0==W$2[s]){var l=$r(o,s-o);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),o=s+1}}else{var u=new Array(n);for(a=0;a<n;++a)u[a]=String.fromCharCode(W$2[r+a]);t=u.join("")}return G$1(e),t},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n,r="string"==typeof t;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||j$6("Cannot pass non-string to std::string"),n=i&&r?mr(t):t.length;var o=he$1(4+n+1),a=o+4;if(S[o>>2]=n,i&&r)re(t,a,n+1);else if(r)for(var s=0;s<n;++s){var l=t.charCodeAt(s);l>255&&(G$1(a),j$6("String has UTF-16 code units that do not fit in 8 bits")),W$2[a+s]=l}else for(s=0;s<n;++s)W$2[a+s]=t[s];return null!==e&&e.push(G$1,o),o},argPackAdvance:8,readValueFromPointer:xr,destructorFunction:function(e){G$1(e)}})}var Xe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function ni(e,t){for(var i=e,n=i>>1,r=n+t/2;!(n>=r)&&Sr[n];)++n;if((i=n<<1)-e>32&&Xe)return Xe.decode(W$2.subarray(e,i));for(var o="",a=0;!(a>=t/2);++a){var s=Z$3[e+2*a>>1];if(0==s)break;o+=String.fromCharCode(s)}return o}function ii(e,t,i){if(void 0===i&&(i=2147483647),i<2)return 0;for(var n=t,r=(i-=2)<2*e.length?i/2:e.length,o=0;o<r;++o){var a=e.charCodeAt(o);Z$3[t>>1]=a,t+=2}return Z$3[t>>1]=0,t-n}function oi(e){return 2*e.length}function ai(e,t){for(var i=0,n="";!(i>=t/4);){var r=b$6[e+4*i>>2];if(0==r)break;if(++i,r>=65536){var o=r-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(r)}return n}function si(e,t,i){if(void 0===i&&(i=2147483647),i<4)return 0;for(var n=t,r=n+i-4,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o);if(b$6[t>>2]=a,(t+=4)+4>r)break}return b$6[t>>2]=0,t-n}function ui(e){for(var t=0,i=0;i<e.length;++i){var n=e.charCodeAt(i);n>=55296&&n<=57343&&++i,t+=4}return t}function fi(e,t,i){var n,r,o,a,s;i=z$2(i),2===t?(n=ni,r=ii,a=oi,o=()=>Sr,s=1):4===t&&(n=ai,r=si,a=ui,o=()=>S,s=2),q$2(e,{name:i,fromWireType:function(e){for(var i,r=S[e>>2],a=o(),l=e+4,u=0;u<=r;++u){var c=e+4+u*t;if(u==r||0==a[c>>s]){var h=n(l,c-l);void 0===i?i=h:(i+=String.fromCharCode(0),i+=h),l=c+t}}return G$1(e),i},toWireType:function(e,n){"string"!=typeof n&&j$6("Cannot pass non-string to C++ string type "+i);var o=a(n),l=he$1(4+o+t);return S[l>>2]=o>>s,r(n,l+4,o+t),null!==e&&e.push(G$1,l),l},argPackAdvance:8,readValueFromPointer:xr,destructorFunction:function(e){G$1(e)}})}function ci(e,t){q$2(e,{isVoid:!0,name:t=z$2(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}var li=!0;function di(){return li}function Wr(e,t){var i=tr[e];return void 0===i&&j$6(t+" has unknown type "+Ye(e)),i}function vi(e,t,i){e=x$3.toValue(e),t=Wr(t,"emval::as");var n=[],r=x$3.toHandle(n);return S[i>>2]=r,t.toWireType(n,e)}function hi(e,t){for(var i=new Array(e),n=0;n<e;++n)i[n]=Wr(S[t+4*n>>2],"parameter "+n);return i}function pi(e,t,i,n){e=x$3.toValue(e);for(var r=hi(t,i),o=new Array(t),a=0;a<t;++a){var s=r[a];o[a]=s.readValueFromPointer(n),n+=s.argPackAdvance}var l=e.apply(void 0,o);return x$3.toHandle(l)}var mi={};function Ge$1(e){var t=mi[e];return void 0===t?z$2(e):t}function Ke(){return"object"==typeof globalThis?globalThis:Function("return this")()}function yi(e){return 0===e?x$3.toHandle(Ke()):(e=Ge$1(e),x$3.toHandle(Ke()[e]))}function _i(e,t){return e=x$3.toValue(e),t=x$3.toValue(t),x$3.toHandle(e[t])}function gi(e){e>4&&(N$2.get(e).refcount+=1)}function wi(e){for(var t="",i=0;i<e;++i)t+=(0!==i?", ":"")+"arg"+i;var n="return function emval_allocator_"+e+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(i=0;i<e;++i)n+="var argType"+i+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+i+"');\nvar arg"+i+" = argType"+i+".readValueFromPointer(args);\nargs += argType"+i+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+t+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(Wr,c$7,x$3.toHandle,(()=>S))}var Je={};function Ei(e,t,i,n){e=x$3.toValue(e);var r=Je[t];return r||(r=wi(t),Je[t]=r),r(e,i,n)}function bi(e){return x$3.toHandle(Ge$1(e))}function ki(e){qe(x$3.toValue(e)),le$1(e)}function Pi(e,t){var i=(e=Wr(e,"_emval_take_value")).readValueFromPointer(t);return x$3.toHandle(i)}function Ci(){B$1("")}function Ti(){return Date.now()}function Si(e,t,i){W$2.copyWithin(e,t,t+i)}function ji(){return 2147483648}function Fi(e){var t=Tr.buffer;try{return Tr.grow(e-t.byteLength+65535>>>16),Pe(),1}catch{}}function Ai(e){var t=W$2.length;e>>>=0;var i=ji();if(e>i)return!1;let n=(e,t)=>e+(t-e%t)%t;for(var r=1;r<=4;r*=2){var o=t*(1+.2/r);if(o=Math.min(o,e+100663296),Fi(Math.min(i,n(Math.max(e,o),65536))))return!0}return!1}var ve={};function Di(){return Vr||"./this.program"}function Er(){if(!Er.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Di()};for(var t in ve)void 0===ve[t]?delete e[t]:e[t]=ve[t];var i=[];for(var t in e)i.push(t+"="+e[t]);Er.strings=i}return Er.strings}function Mi(e,t){for(var i=0;i<e.length;++i)U$3[t++>>0]=e.charCodeAt(i);U$3[t>>0]=0}function Ri(e,t){var i=0;return Er().forEach((function(n,r){var o=t+i;S[e+4*r>>2]=o,Mi(n,o),i+=n.length+1})),0}function $i(e,t){var i=Er();S[e>>2]=i.length;var n=0;return i.forEach((function(e){n+=e.length+1})),S[t>>2]=n,0}function Oi(e){try{var t=A$2.getStreamFromFD(e);return o$6.close(t),0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return e.errno}}function Ui(e,t,i,n){for(var r=0,o=0;o<i;o++){var a=S[t>>2],s=S[t+4>>2];t+=8;var l=o$6.read(e,U$3,a,s,n);if(l<0)return-1;if(r+=l,l<s)break;typeof n<"u"&&(n+=l)}return r}function Hi(e,t,i,n){try{var r=Ui(A$2.getStreamFromFD(e),t,i);return S[n>>2]=r,0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return e.errno}}function xi(e,t){return t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN}function Li(e,t,i,n,r){try{var o=xi(t,i);if(isNaN(o))return 61;var a=A$2.getStreamFromFD(e);return o$6.llseek(a,o,n),H$1=[a.position>>>0,(T$3=a.position,+Math.abs(T$3)>=1?T$3>0?(0|Math.min(+Math.floor(T$3/4294967296),4294967295))>>>0:~~+Math.ceil((T$3-+(~~T$3>>>0))/4294967296)>>>0:0)],b$6[r>>2]=H$1[0],b$6[r+4>>2]=H$1[1],a.getdents&&0===o&&0===n&&(a.getdents=null),0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return e.errno}}function Wi(e,t,i,n){for(var r=0,o=0;o<i;o++){var a=S[t>>2],s=S[t+4>>2];t+=8;var l=o$6.write(e,U$3,a,s,n);if(l<0)return-1;r+=l,typeof n<"u"&&(n+=l)}return r}function zi(e,t,i,n){try{var r=Wi(A$2.getStreamFromFD(e),t,i);return S[n>>2]=r,0}catch(e){if(typeof o$6>"u"||"ErrnoError"!==e.name)throw e;return e.errno}}function Ii(e){return e}function zr(e){return e%4==0&&(e%100!=0||e%400==0)}function Ni(e,t){for(var i=0,n=0;n<=t;i+=e[n++]);return i}var Ze=[31,29,31,30,31,30,31,31,30,31,30,31],rt$2=[31,28,31,30,31,30,31,31,30,31,30,31];function Bi(e,t){for(var i=new Date(e.getTime());t>0;){var n=zr(i.getFullYear()),r=i.getMonth(),o=(n?Ze:rt$2)[r];if(!(t>o-i.getDate()))return i.setDate(i.getDate()+t),i;t-=o-i.getDate()+1,i.setDate(1),r<11?i.setMonth(r+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1))}return i}function Vi(e,t){U$3.set(e,t)}function Yi(e,t,i,n){var r=b$6[n+40>>2],o={tm_sec:b$6[n>>2],tm_min:b$6[n+4>>2],tm_hour:b$6[n+8>>2],tm_mday:b$6[n+12>>2],tm_mon:b$6[n+16>>2],tm_year:b$6[n+20>>2],tm_wday:b$6[n+24>>2],tm_yday:b$6[n+28>>2],tm_isdst:b$6[n+32>>2],tm_gmtoff:b$6[n+36>>2],tm_zone:r?$r(r):""},a=$r(i),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)a=a.replace(new RegExp(l,"g"),s[l]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(e,t,i){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=i[0]+n;return n}function d(e,t){return h(e,t,"0")}function f(e,t){function i(e){return e<0?-1:e>0?1:0}var n;return 0===(n=i(e.getFullYear()-t.getFullYear()))&&0===(n=i(e.getMonth()-t.getMonth()))&&(n=i(e.getDate()-t.getDate())),n}function p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function _(e){var t=Bi(new Date(e.tm_year+1900,0,1),e.tm_yday),i=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),r=p(i),o=p(n);return f(r,t)<=0?f(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return u[e.tm_wday].substring(0,3)},"%A":function(e){return u[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return h(e.tm_mday,2," ")},"%g":function(e){return _(e).toString().substring(2)},"%G":function(e){return _(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+Ni(zr(e.tm_year+1900)?Ze:rt$2,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return d(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var i=(e.tm_wday+371-e.tm_yday)%7;4!=i&&(3!=i||!zr(e.tm_year))&&(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&zr(e.tm_year%400-1))&&t++}return d(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,i=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(i?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in a=a.replace(/%%/g,"\0\0"),m)a.includes(l)&&(a=a.replace(new RegExp(l,"g"),m[l](o)));var g=Rr(a=a.replace(/\0\0/g,"%"),!1);return g.length>t?0:(Vi(g,e),g.length-1)}function qi(e,t,i,n,r){return Yi(e,t,i,n)}var et$1=function(e,t,i,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=o$6.nextInode++,this.name=t,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=n},Ir=365,Nr=146;Object.defineProperties(et$1.prototype,{read:{get:function(){return(this.mode&Ir)===Ir},set:function(e){e?this.mode|=Ir:this.mode&=~Ir}},write:{get:function(){return(this.mode&Nr)===Nr},set:function(e){e?this.mode|=Nr:this.mode&=~Nr}},isFolder:{get:function(){return o$6.isDir(this.mode)}},isDevice:{get:function(){return o$6.isChrdev(this.mode)}}}),o$6.FSNode=et$1,o$6.staticInit(),dn(),ur=c$7.BindingError=ie(Error,"BindingError"),He$1=c$7.InternalError=ie(Error,"InternalError"),An(),bn(),xn(),Ve$2=c$7.UnboundTypeError=ie(Error,"UnboundTypeError"),Xn();var Xi={t:xt,ja:Lt,Z:Wt,u:zt,a:Nt,i:Bt$1,z:Vt,C:Yt,ka:qt,da:Xt,m:Gt,la:Kt,c:It$1,za:Zt,aa:en,ta:tn,wa:nn,ua:on,xa:an,sa:sn,qa:un,pa:fn,ra:cn,Ya:ln,Ba:pn,X:In,W:Bn,N:Vn,Aa:Gn,ca:Jn,fa:Qn,I:ri,E:ei,ba:ti,S:fi,Ca:ci,ma:di,Qa:vi,Na:pi,Ra:le$1,La:yi,Sa:_i,Ma:gi,Ka:Ei,Ta:bi,Pa:ki,Oa:Pi,R:Ci,na:Ti,ya:Si,oa:Ai,ha:Ri,ia:$i,_:Oi,va:Hi,Xa:Li,$:zi,P:vo,x:Eo,M:Po,A:Lo,j:mo,b:no,Ea:zo,d:uo,ea:_o,g:io,k:ho,Y:Bo,o:yo,p:fo,r:ko$1,y:Ro,F:Oo,J:$o,K:Uo,fb:Ko,eb:Jo,Va:aa,ab:ea,$a:ta,Wa:oa,ga:Yo,Ua:sa,l:ao,Ga:xo,h:lo,Fa:Wo,Ha:Ho,e:oo,Ia:Mo,V:bo,f:so,L:Do,n:co,T:No,q:go,Da:Io,s:po,w:wo,D:Co,G:To,B:Ao,O:Fo,U:So,Ja:jo,Q:Vo,gb:Go,bb:ra,cb:Zo,db:Qo,_a:na,hb:Xo,Za:ia,ib:qo,v:Ii,H:qi};Ht();var tt$1=function(){return(tt$1=c$7.asm.lb).apply(null,arguments)},he$1=function(){return(he$1=c$7.asm.mb).apply(null,arguments)},G$1=function(){return(G$1=c$7.asm.ob).apply(null,arguments)},nt$1=c$7.___getTypeName=function(){return(nt$1=c$7.___getTypeName=c$7.asm.pb).apply(null,arguments)};c$7.__embind_initialize_bindings=function(){return(c$7.__embind_initialize_bindings=c$7.asm.qb).apply(null,arguments)};var it=function(){return(it=c$7.asm.rb).apply(null,arguments)},g$6=function(){return(g$6=c$7.asm.sb).apply(null,arguments)},br=function(){return(br=c$7.asm.tb).apply(null,arguments)},w$2=function(){return(w$2=c$7.asm.ub).apply(null,arguments)},E$2=function(){return(E$2=c$7.asm.vb).apply(null,arguments)},ot$1=function(){return(ot$1=c$7.asm.wb).apply(null,arguments)},at$2=function(){return(at$2=c$7.asm.xb).apply(null,arguments)},st=c$7.dynCall_ji=function(){return(st=c$7.dynCall_ji=c$7.asm.yb).apply(null,arguments)},ut$1=c$7.dynCall_vijii=function(){return(ut$1=c$7.dynCall_vijii=c$7.asm.zb).apply(null,arguments)},ft=c$7.dynCall_viiiiijjii=function(){return(ft=c$7.dynCall_viiiiijjii=c$7.asm.Ab).apply(null,arguments)},ct$1=c$7.dynCall_viiji=function(){return(ct$1=c$7.dynCall_viiji=c$7.asm.Bb).apply(null,arguments)},lt=c$7.dynCall_iiiiiijjii=function(){return(lt=c$7.dynCall_iiiiiijjii=c$7.asm.Cb).apply(null,arguments)},dt$1=c$7.dynCall_iiiiiijjiii=function(){return(dt$1=c$7.dynCall_iiiiiijjiii=c$7.asm.Db).apply(null,arguments)},vt=c$7.dynCall_viiijj=function(){return(vt=c$7.dynCall_viiijj=c$7.asm.Eb).apply(null,arguments)},ht$1=c$7.dynCall_viiiijjii=function(){return(ht$1=c$7.dynCall_viiiijjii=c$7.asm.Fb).apply(null,arguments)},pt=c$7.dynCall_viiiijjiii=function(){return(pt=c$7.dynCall_viiiijjiii=c$7.asm.Gb).apply(null,arguments)},mt=c$7.dynCall_iijiii=function(){return(mt=c$7.dynCall_iijiii=c$7.asm.Hb).apply(null,arguments)},yt=c$7.dynCall_iijiiiii=function(){return(yt=c$7.dynCall_iijiiiii=c$7.asm.Ib).apply(null,arguments)},_t=c$7.dynCall_viij=function(){return(_t=c$7.dynCall_viij=c$7.asm.Jb).apply(null,arguments)},gt=c$7.dynCall_viijii=function(){return(gt=c$7.dynCall_viijii=c$7.asm.Kb).apply(null,arguments)};c$7.dynCall_jii=function(){return(c$7.dynCall_jii=c$7.asm.Lb).apply(null,arguments)},c$7.dynCall_viji=function(){return(c$7.dynCall_viji=c$7.asm.Mb).apply(null,arguments)},c$7.dynCall_iiiji=function(){return(c$7.dynCall_iiiji=c$7.asm.Nb).apply(null,arguments)},c$7.dynCall_jiji=function(){return(c$7.dynCall_jiji=c$7.asm.Ob).apply(null,arguments)};var wt$1=c$7.dynCall_j=function(){return(wt$1=c$7.dynCall_j=c$7.asm.Pb).apply(null,arguments)},Et=c$7.dynCall_iiiiij=function(){return(Et=c$7.dynCall_iiiiij=c$7.asm.Qb).apply(null,arguments)},bt=c$7.dynCall_jiiii=function(){return(bt=c$7.dynCall_jiiii=c$7.asm.Rb).apply(null,arguments)},Br,Module;function no(e,t){var i=w$2();try{return k$3(e)(t)}catch(e){if(E$2(i),e!==e+0)throw e;g$6(1,0)}}function io(e,t,i,n){var r=w$2();try{return k$3(e)(t,i,n)}catch(e){if(E$2(r),e!==e+0)throw e;g$6(1,0)}}function oo(e,t,i){var n=w$2();try{k$3(e)(t,i)}catch(e){if(E$2(n),e!==e+0)throw e;g$6(1,0)}}function ao(e){var t=w$2();try{k$3(e)()}catch(e){if(E$2(t),e!==e+0)throw e;g$6(1,0)}}function so(e,t,i,n){var r=w$2();try{k$3(e)(t,i,n)}catch(e){if(E$2(r),e!==e+0)throw e;g$6(1,0)}}function uo(e,t,i){var n=w$2();try{return k$3(e)(t,i)}catch(e){if(E$2(n),e!==e+0)throw e;g$6(1,0)}}function fo(e,t,i,n,r,o,a){var s=w$2();try{return k$3(e)(t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function co(e,t,i,n,r){var o=w$2();try{k$3(e)(t,i,n,r)}catch(e){if(E$2(o),e!==e+0)throw e;g$6(1,0)}}function lo(e,t){var i=w$2();try{k$3(e)(t)}catch(e){if(E$2(i),e!==e+0)throw e;g$6(1,0)}}function vo(e,t,i,n){var r=w$2();try{return k$3(e)(t,i,n)}catch(e){if(E$2(r),e!==e+0)throw e;g$6(1,0)}}function ho(e,t,i,n,r){var o=w$2();try{return k$3(e)(t,i,n,r)}catch(e){if(E$2(o),e!==e+0)throw e;g$6(1,0)}}function po(e,t,i,n,r,o,a){var s=w$2();try{k$3(e)(t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function mo(e){var t=w$2();try{return k$3(e)()}catch(e){if(E$2(t),e!==e+0)throw e;g$6(1,0)}}function yo(e,t,i,n,r,o){var a=w$2();try{return k$3(e)(t,i,n,r,o)}catch(e){if(E$2(a),e!==e+0)throw e;g$6(1,0)}}function _o(e,t,i,n){var r=w$2();try{return k$3(e)(t,i,n)}catch(e){if(E$2(r),e!==e+0)throw e;g$6(1,0)}}function go(e,t,i,n,r,o){var a=w$2();try{k$3(e)(t,i,n,r,o)}catch(e){if(E$2(a),e!==e+0)throw e;g$6(1,0)}}function wo(e,t,i,n,r,o,a,s){var l=w$2();try{k$3(e)(t,i,n,r,o,a,s)}catch(e){if(E$2(l),e!==e+0)throw e;g$6(1,0)}}function Eo(e,t){var i=w$2();try{return k$3(e)(t)}catch(e){if(E$2(i),e!==e+0)throw e;g$6(1,0)}}function bo(e,t,i,n,r){var o=w$2();try{k$3(e)(t,i,n,r)}catch(e){if(E$2(o),e!==e+0)throw e;g$6(1,0)}}function ko$1(e,t,i,n,r,o,a,s){var l=w$2();try{return k$3(e)(t,i,n,r,o,a,s)}catch(e){if(E$2(l),e!==e+0)throw e;g$6(1,0)}}function Po(e,t,i){var n=w$2();try{return k$3(e)(t,i)}catch(e){if(E$2(n),e!==e+0)throw e;g$6(1,0)}}function Co(e,t,i,n,r,o,a,s,l){var u=w$2();try{k$3(e)(t,i,n,r,o,a,s,l)}catch(e){if(E$2(u),e!==e+0)throw e;g$6(1,0)}}function To(e,t,i,n,r,o,a,s,l,u){var c=w$2();try{k$3(e)(t,i,n,r,o,a,s,l,u)}catch(e){if(E$2(c),e!==e+0)throw e;g$6(1,0)}}function So(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=w$2();try{k$3(e)(t,i,n,r,o,a,s,l,u,c,h,d)}catch(e){if(E$2(f),e!==e+0)throw e;g$6(1,0)}}function jo(e,t,i,n,r,o,a,s,l,u,c,h,d,f){var p=w$2();try{k$3(e)(t,i,n,r,o,a,s,l,u,c,h,d,f)}catch(e){if(E$2(p),e!==e+0)throw e;g$6(1,0)}}function Fo(e,t,i,n,r,o,a,s,l,u,c,h){var d=w$2();try{k$3(e)(t,i,n,r,o,a,s,l,u,c,h)}catch(e){if(E$2(d),e!==e+0)throw e;g$6(1,0)}}function Ao(e,t,i,n,r,o,a,s,l,u,c){var h=w$2();try{k$3(e)(t,i,n,r,o,a,s,l,u,c)}catch(e){if(E$2(h),e!==e+0)throw e;g$6(1,0)}}function Do(e,t,i,n,r,o,a){var s=w$2();try{k$3(e)(t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function Mo(e,t,i,n){var r=w$2();try{k$3(e)(t,i,n)}catch(e){if(E$2(r),e!==e+0)throw e;g$6(1,0)}}function Ro(e,t,i,n,r,o,a,s,l){var u=w$2();try{return k$3(e)(t,i,n,r,o,a,s,l)}catch(e){if(E$2(u),e!==e+0)throw e;g$6(1,0)}}function $o(e,t,i,n,r,o,a,s,l,u,c){var h=w$2();try{return k$3(e)(t,i,n,r,o,a,s,l,u,c)}catch(e){if(E$2(h),e!==e+0)throw e;g$6(1,0)}}function Oo(e,t,i,n,r,o,a,s,l,u){var c=w$2();try{return k$3(e)(t,i,n,r,o,a,s,l,u)}catch(e){if(E$2(c),e!==e+0)throw e;g$6(1,0)}}function Uo(e,t,i,n,r,o,a,s,l,u,c,h){var d=w$2();try{return k$3(e)(t,i,n,r,o,a,s,l,u,c,h)}catch(e){if(E$2(d),e!==e+0)throw e;g$6(1,0)}}function Ho(e,t,i,n,r){var o=w$2();try{k$3(e)(t,i,n,r)}catch(e){if(E$2(o),e!==e+0)throw e;g$6(1,0)}}function xo(e,t,i,n,r,o,a){var s=w$2();try{k$3(e)(t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function Lo(e,t,i,n){var r=w$2();try{return k$3(e)(t,i,n)}catch(e){if(E$2(r),e!==e+0)throw e;g$6(1,0)}}function Wo(e,t,i){var n=w$2();try{k$3(e)(t,i)}catch(e){if(E$2(n),e!==e+0)throw e;g$6(1,0)}}function zo(e,t,i){var n=w$2();try{return k$3(e)(t,i)}catch(e){if(E$2(n),e!==e+0)throw e;g$6(1,0)}}function Io(e,t,i,n,r,o,a){var s=w$2();try{k$3(e)(t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function No(e,t,i,n,r,o,a){var s=w$2();try{k$3(e)(t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function Bo(e,t,i,n,r,o){var a=w$2();try{return k$3(e)(t,i,n,r,o)}catch(e){if(E$2(a),e!==e+0)throw e;g$6(1,0)}}function Vo(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_){var m=w$2();try{k$3(e)(t,i,n,r,o,a,s,l,u,c,h,d,f,p,_)}catch(e){if(E$2(m),e!==e+0)throw e;g$6(1,0)}}function Yo(e,t){var i=w$2();try{return st(e,t)}catch(e){if(E$2(i),e!==e+0)throw e;g$6(1,0)}}function qo(e,t,i,n,r,o){var a=w$2();try{ut$1(e,t,i,n,r,o)}catch(e){if(E$2(a),e!==e+0)throw e;g$6(1,0)}}function Xo(e,t,i,n,r,o){var a=w$2();try{ct$1(e,t,i,n,r,o)}catch(e){if(E$2(a),e!==e+0)throw e;g$6(1,0)}}function Go(e,t,i,n,r,o,a,s,l,u,c,h){var d=w$2();try{ft(e,t,i,n,r,o,a,s,l,u,c,h)}catch(e){if(E$2(d),e!==e+0)throw e;g$6(1,0)}}function Ko(e,t,i,n,r,o,a,s,l,u,c,h){var d=w$2();try{return lt(e,t,i,n,r,o,a,s,l,u,c,h)}catch(e){if(E$2(d),e!==e+0)throw e;g$6(1,0)}}function Jo(e,t,i,n,r,o,a,s,l,u,c,h,d){var f=w$2();try{return dt$1(e,t,i,n,r,o,a,s,l,u,c,h,d)}catch(e){if(E$2(f),e!==e+0)throw e;g$6(1,0)}}function Qo(e,t,i,n,r,o,a,s){var l=w$2();try{vt(e,t,i,n,r,o,a,s)}catch(e){if(E$2(l),e!==e+0)throw e;g$6(1,0)}}function Zo(e,t,i,n,r,o,a,s,l,u,c,h){var d=w$2();try{pt(e,t,i,n,r,o,a,s,l,u,c,h)}catch(e){if(E$2(d),e!==e+0)throw e;g$6(1,0)}}function ra(e,t,i,n,r,o,a,s,l,u,c){var h=w$2();try{ht$1(e,t,i,n,r,o,a,s,l,u,c)}catch(e){if(E$2(h),e!==e+0)throw e;g$6(1,0)}}function ea(e,t,i,n,r,o,a){var s=w$2();try{return mt(e,t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function ta(e,t,i,n,r,o,a,s,l){var u=w$2();try{return yt(e,t,i,n,r,o,a,s,l)}catch(e){if(E$2(u),e!==e+0)throw e;g$6(1,0)}}function na(e,t,i,n,r){var o=w$2();try{_t(e,t,i,n,r)}catch(e){if(E$2(o),e!==e+0)throw e;g$6(1,0)}}function ia(e,t,i,n,r,o,a){var s=w$2();try{gt(e,t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function oa(e){var t=w$2();try{return wt$1(e)}catch(e){if(E$2(t),e!==e+0)throw e;g$6(1,0)}}function aa(e,t,i,n,r,o,a){var s=w$2();try{return Et(e,t,i,n,r,o,a)}catch(e){if(E$2(s),e!==e+0)throw e;g$6(1,0)}}function sa(e,t,i,n,r){var o=w$2();try{return bt(e,t,i,n,r)}catch(e){if(E$2(o),e!==e+0)throw e;g$6(1,0)}}function kt(){function e(){Br||(Br=!0,c$7.calledRun=!0,!we&&(Ft(),pe(c$7),c$7.onRuntimeInitialized&&c$7.onRuntimeInitialized(),At()))}rr>0||(jt(),rr>0)||(c$7.setStatus?(c$7.setStatus("Running..."),setTimeout((function(){setTimeout((function(){c$7.setStatus("")}),1),e()}),1)):e())}if(c$7.dynCall_iiiiijj=function(){return(c$7.dynCall_iiiiijj=c$7.asm.Sb).apply(null,arguments)},c$7.dynCall_iiiiiijj=function(){return(c$7.dynCall_iiiiiijj=c$7.asm.Tb).apply(null,arguments)},hr=function e(){Br||kt(),Br||(hr=e)},c$7.preInit)for("function"==typeof c$7.preInit&&(c$7.preInit=[c$7.preInit]);c$7.preInit.length>0;)c$7.preInit.pop()();kt(),Module||(Module=(typeof Module<"u"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1,nodeFS,nodePath;if(Module.ENVIRONMENT)if("WEB"===Module.ENVIRONMENT)ENVIRONMENT_IS_WEB=!0;else if("WORKER"===Module.ENVIRONMENT)ENVIRONMENT_IS_WORKER=!0;else if("NODE"===Module.ENVIRONMENT)ENVIRONMENT_IS_NODE=!0;else{if("SHELL"!==Module.ENVIRONMENT)throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");ENVIRONMENT_IS_SHELL=!0}else ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"function"==typeof require&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE)Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn),Module.read=function(e,t){nodeFS||(nodeFS=require("fs")),nodePath||(nodePath=require("path")),e=nodePath.normalize(e);var i=nodeFS.readFileSync(e);return t?i:i.toString()},Module.readBinary=function(e){var t=Module.read(e,!0);return t.buffer||(t=new Uint8Array(t)),assert(t.buffer),t},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),process.on("uncaughtException",(function(e){if(!(e instanceof ExitStatus))throw e})),Module.inspect=function(){return"[Emscripten Module object]"};else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<"u"&&(Module.printErr=printErr),typeof read<"u"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(e){if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));var t=read(e,"binary");return assert("object"==typeof t),t},typeof scriptArgs<"u"?Module.arguments=scriptArgs:typeof arguments<"u"&&(Module.arguments=arguments),"function"==typeof quit&&(Module.quit=function(e,t){quit(e)});else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw"Unknown runtime environment. Where are we?";if(Module.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),Module.readAsync=function(e,t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):i()},n.onerror=i,n.send(null)},typeof arguments<"u"&&(Module.arguments=arguments),typeof console<"u")Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<"u"?function(e){dump(e)}:function(e){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>"u"&&(Module.setWindowTitle=function(e){document.title=e})}function globalEval(e){eval.call(null,e)}for(var key in!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(e,t){throw t}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[],moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(e){return tempRet0=e,e},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(e){STACKTOP=e},getNativeTypeSize:function(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":case"float":return 4;case"i64":case"double":return 8;default:if("*"===e[e.length-1])return Runtime.QUANTUM_SIZE;if("i"===e[0]){var t=parseInt(e.substr(1));return assert(t%8==0),t/8}return 0}},getNativeFieldSize:function(e){return Math.max(Runtime.getNativeTypeSize(e),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(e,t){return"double"===t||"i64"===t?7&e&&(assert(4==(7&e)),e+=4):assert(0==(3&e)),e},getAlignSize:function(e,t,i){return i||"i64"!=e&&"double"!=e?e?Math.min(t||(e?Runtime.getNativeFieldSize(e):0),Runtime.QUANTUM_SIZE):Math.min(t,8):8},dynCall:function(e,t,i){return i&&i.length?Module["dynCall_"+e].apply(null,[t].concat(i)):Module["dynCall_"+e].call(null,t)},functionPointers:[],addFunction:function(e){for(var t=0;t<Runtime.functionPointers.length;t++)if(!Runtime.functionPointers[t])return Runtime.functionPointers[t]=e,2*(1+t);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},removeFunction:function(e){Runtime.functionPointers[(e-2)/2]=null},warnOnce:function(e){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[e]||(Runtime.warnOnce.shown[e]=1,Module.printErr(e))},funcWrappers:{},getFuncWrapper:function(e,t){assert(t),Runtime.funcWrappers[t]||(Runtime.funcWrappers[t]={});var i=Runtime.funcWrappers[t];return i[e]||(1===t.length?i[e]=function(){return Runtime.dynCall(t,e)}:2===t.length?i[e]=function(i){return Runtime.dynCall(t,e,[i])}:i[e]=function(){return Runtime.dynCall(t,e,Array.prototype.slice.call(arguments))}),i[e]},getCompilerSetting:function(e){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},stackAlloc:function(e){var t=STACKTOP;return STACKTOP=(STACKTOP=STACKTOP+e|0)+15&-16,t},staticAlloc:function(e){var t=STATICTOP;return STATICTOP=(STATICTOP=STATICTOP+e|0)+15&-16,t},dynamicAlloc:function(e){var t=HEAP32[DYNAMICTOP_PTR>>2],i=-16&(t+e+15|0);if((HEAP32[DYNAMICTOP_PTR>>2]=i,i>=TOTAL_MEMORY)&&!enlargeMemory())return HEAP32[DYNAMICTOP_PTR>>2]=t,0;return t},alignMemory:function(e,t){return e=Math.ceil(e/(t||16))*(t||16)},makeBigInt:function(e,t,i){return i?+(e>>>0)+4294967296*+(t>>>0):+(e>>>0)+4294967296*+(0|t)},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,cwrap,ccall;function assert(e,t){e||abort("Assertion failed: "+t)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(e){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}function setValue(e,t,i,n){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":HEAP8[e>>0]=t;break;case"i16":HEAP16[e>>1]=t;break;case"i32":HEAP32[e>>2]=t;break;case"i64":tempI64=[t>>>0,(tempDouble=t,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=t;break;case"double":HEAPF64[e>>3]=t;break;default:abort("invalid type for setValue: "+i)}}function getValue(e,t,i){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return HEAP8[e>>0];case"i16":return HEAP16[e>>1];case"i32":case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];default:abort("invalid type for setValue: "+t)}return null}(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(e){var t=Runtime.stackAlloc(e.length);return writeArrayToMemory(e,t),t},stringToC:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);stringToUTF8(e,t=Runtime.stackAlloc(i),i)}return t}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,t,i,n,r){var o=getCFunc(e),a=[],s=0;if(n)for(var l=0;l<n.length;l++){var u=toC[i[l]];u?(0===s&&(s=Runtime.stackSave()),a[l]=u(n[l])):a[l]=n[l]}var c=o.apply(null,a);if("string"===t&&(c=Pointer_stringify(c)),0!==s){if(r&&r.async)return void EmterpreterAsync.asyncFinalizers.push((function(){Runtime.stackRestore(s)}));Runtime.stackRestore(s)}return c};var sourceRegex=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(e){var t=e.toString().match(sourceRegex).slice(1);return{arguments:t[0],body:t[1],returnValue:t[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource)for(var e in JSsource={},JSfuncs)JSfuncs.hasOwnProperty(e)&&(JSsource[e]=parseJSFunc(JSfuncs[e]))}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every((function(e){return"number"===e})),numericRet="string"!==returnType;if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map((function(e,t){return"$"+t})),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if("number"!==type){var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";",funcstr+=convertCode.body+";",funcstr+=arg+"=("+convertCode.returnValue+");"}}}var cfuncname=parseJSFunc((function(){return cfunc})).returnValue;if(funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");",!numericRet){var strgfy=parseJSFunc((function(){return Pointer_stringify})).returnValue;funcstr+="ret = "+strgfy+"(ret);"}return numericArgs||(ensureJSsource(),funcstr+=JSsource.stackRestore.body.replace("()","(stack)")+";"),funcstr+="return ret})",eval(funcstr)}})(),Module.ccall=ccall,Module.cwrap=cwrap,Module.setValue=setValue,Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;function allocate(e,t,i,n){var r,o;"number"==typeof e?(r=!0,o=e):(r=!1,o=e.length);var a,s="string"==typeof t?t:null;if(a=i==ALLOC_NONE?n:["function"==typeof _malloc?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][void 0===i?ALLOC_STATIC:i](Math.max(o,s?1:t.length)),r){var l;n=a;for(assert(0==(3&a)),l=a+(-4&o);n<l;n+=4)HEAP32[n>>2]=0;for(l=a+o;n<l;)HEAP8[n++>>0]=0;return a}if("i8"===s)return e.subarray||e.slice?HEAPU8.set(e,a):HEAPU8.set(new Uint8Array(e),a),a;for(var u,c,h,d=0;d<o;){var f=e[d];("function"==typeof f&&(f=Runtime.getFunctionIndex(f)),0!==(u=s||t[d]))?("i64"==u&&(u="i32"),setValue(a+d,f,u),h!==u&&(c=Runtime.getNativeTypeSize(u),h=u),d+=c):d++}return a}function getMemory(e){return staticSealed?runtimeInitialized?_malloc(e):Runtime.dynamicAlloc(e):Runtime.staticAlloc(e)}function Pointer_stringify(e,t){if(0===t||!e)return"";for(var i,n=0,r=0;n|=i=HEAPU8[e+r>>0],(0!=i||t)&&(r++,!t||r!=t););t||(t=r);var o="";if(n<128){for(var a,s=1024;t>0;)a=String.fromCharCode.apply(String,HEAPU8.subarray(e,e+Math.min(t,s))),o=o?o+a:a,e+=s,t-=s;return o}return Module.UTF8ToString(e)}function AsciiToString(e){for(var t="";;){var i=HEAP8[e++>>0];if(!i)return t;t+=String.fromCharCode(i)}}function stringToAscii(e,t){return writeAsciiToMemory(e,t,!1)}Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE,Module.allocate=allocate,Module.getMemory=getMemory,Module.Pointer_stringify=Pointer_stringify,Module.AsciiToString=AsciiToString,Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(e,t){for(var i=t;e[i];)++i;if(i-t>16&&e.subarray&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,i));for(var n,r,o,a,s,l="";;){if(!(n=e[t++]))return l;if(128&n)if(r=63&e[t++],192!=(224&n))if(o=63&e[t++],224==(240&n)?n=(15&n)<<12|r<<6|o:(a=63&e[t++],240==(248&n)?n=(7&n)<<18|r<<12|o<<6|a:(s=63&e[t++],248==(252&n)?n=(3&n)<<24|r<<18|o<<12|a<<6|s:n=(1&n)<<30|r<<24|o<<18|a<<12|s<<6|63&e[t++])),n<65536)l+=String.fromCharCode(n);else{var u=n-65536;l+=String.fromCharCode(55296|u>>10,56320|1023&u)}else l+=String.fromCharCode((31&n)<<6|r);else l+=String.fromCharCode(n)}}function UTF8ToString(e){return UTF8ArrayToString(HEAPU8,e)}function stringToUTF8Array(e,t,i,n){if(!(n>0))return 0;for(var r=i,o=i+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(i>=o)break;t[i++]=s}else if(s<=2047){if(i+1>=o)break;t[i++]=192|s>>6,t[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;t[i++]=224|s>>12,t[i++]=128|s>>6&63,t[i++]=128|63&s}else if(s<=2097151){if(i+3>=o)break;t[i++]=240|s>>18,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}else if(s<=67108863){if(i+4>=o)break;t[i++]=248|s>>24,t[i++]=128|s>>18&63,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}else{if(i+5>=o)break;t[i++]=252|s>>30,t[i++]=128|s>>24&63,t[i++]=128|s>>18&63,t[i++]=128|s>>12&63,t[i++]=128|s>>6&63,t[i++]=128|63&s}}return t[i]=0,i-r}function stringToUTF8(e,t,i){return stringToUTF8Array(e,HEAPU8,t,i)}function lengthBytesUTF8(e){for(var t=0,i=0;i<e.length;++i){var n=e.charCodeAt(i);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++i)),n<=127?++t:t+=n<=2047?2:n<=65535?3:n<=2097151?4:n<=67108863?5:6}return t}function demangle(e){var t=Module.___cxa_demangle||Module.__cxa_demangle;if(t){try{var i=e.substr(1),n=lengthBytesUTF8(i)+1,r=_malloc(n);stringToUTF8(i,r,n);var o=_malloc(4),a=t(r,0,0,o);if(0===getValue(o,"i32")&&a)return Pointer_stringify(a)}catch{}finally{r&&_free(r),o&&_free(o),a&&_free(a)}return e}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function demangleAll(e){return e.replace(/__Z[\w\d_]+/g,(function(e){var t=demangle(e);return e===t?e:e+" ["+t+"]"}))}function jsStackTrace(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function stackTrace(){var e=jsStackTrace();return Module.extraStackTrace&&(e+="\n"+Module.extraStackTrace()),demangleAll(e)}Module.UTF8ArrayToString=UTF8ArrayToString,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8Array=stringToUTF8Array,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,typeof TextDecoder<"u"&&new TextDecoder("utf-16le"),Module.stackTrace=stackTrace;var WASM_PAGE_SIZE=65536,ASMJS_PAGE_SIZE=16777216,MIN_TOTAL_MEMORY=16777216,HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR,byteLength;function alignUp(e,t){return e%t>0&&(e+=t-e%t),e}function updateGlobalBuffer(e){Module.buffer=buffer=e}function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){var e=Module.usingWasm?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE,t=2147483648-e;if(HEAP32[DYNAMICTOP_PTR>>2]>t)return!1;var i=TOTAL_MEMORY;for(TOTAL_MEMORY=Math.max(TOTAL_MEMORY,MIN_TOTAL_MEMORY);TOTAL_MEMORY<HEAP32[DYNAMICTOP_PTR>>2];)TOTAL_MEMORY=TOTAL_MEMORY<=536870912?alignUp(2*TOTAL_MEMORY,e):Math.min(alignUp((3*TOTAL_MEMORY+2147483648)/4,e),t);var n=Module.reallocBuffer(TOTAL_MEMORY);return n&&n.byteLength==TOTAL_MEMORY?(updateGlobalBuffer(n),updateGlobalBufferViews(),!0):(TOTAL_MEMORY=i,!1)}STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1,Module.reallocBuffer||(Module.reallocBuffer=function(e){var t;try{if(ArrayBuffer.transfer)t=ArrayBuffer.transfer(buffer,e);else{var i=HEAP8;t=new ArrayBuffer(e),new Int8Array(t).set(i)}}catch{return!1}return!!_emscripten_replace_memory(t)&&t});try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get),byteLength(new ArrayBuffer(4))}catch(d){byteLength=function(e){return e.byteLength}}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216;function getTotalMemory(){return TOTAL_MEMORY}if(TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),buffer=Module.buffer?Module.buffer:new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews(),HEAP32[0]=1668509029,HEAP16[1]=25459,115!==HEAPU8[2]||99!==HEAPU8[3])throw"Runtime error: expected the system to be little-endian!";function callRuntimeCallbacks(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?Module.dynCall_v(i):Module.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}}Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__)}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPreMain(e){__ATMAIN__.unshift(e)}function addOnExit(e){__ATEXIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}function intArrayFromString(e,t,i){var n=i>0?i:lengthBytesUTF8(e)+1,r=new Array(n),o=stringToUTF8Array(e,r,0,r.length);return t&&(r.length=o),r}function intArrayToString(e){for(var t=[],i=0;i<e.length;i++){var n=e[i];n>255&&(n&=255),t.push(String.fromCharCode(n))}return t.join("")}function writeStringToMemory(e,t,i){var n,r;Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!"),i&&(r=t+lengthBytesUTF8(e),n=HEAP8[r]),stringToUTF8(e,t,1/0),i&&(HEAP8[r]=n)}function writeArrayToMemory(e,t){HEAP8.set(e,t)}function writeAsciiToMemory(e,t,i){for(var n=0;n<e.length;++n)HEAP8[t++>>0]=e.charCodeAt(n);i||(HEAP8[t>>0]=0)}Module.addOnPreRun=addOnPreRun,Module.addOnInit=addOnInit,Module.addOnPreMain=addOnPreMain,Module.addOnExit=addOnExit,Module.addOnPostRun=addOnPostRun,Module.intArrayFromString=intArrayFromString,Module.intArrayToString=intArrayToString,Module.writeStringToMemory=writeStringToMemory,Module.writeArrayToMemory=writeArrayToMemory,Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||-5!==Math.imul(4294967295,5))&&(Math.imul=function(e,t){var i=65535&e,n=65535&t;return i*n+((e>>>16)*n+i*(t>>>16)<<16)|0}),Math.imul=Math.imul,Math.clz32||(Math.clz32=function(e){e>>>=0;for(var t=0;t<32;t++)if(e&1<<31-t)return t;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_min=Math.min,runDependencies=0,dependenciesFulfilled=null;function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={},STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+6192,__ATINIT__.push(),allocate([228,2,0,0,81,16,0,0,12,3,0,0,177,16,0,0,32,0,0,0,0,0,0,0,12,3,0,0,94,16,0,0,48,0,0,0,0,0,0,0,228,2,0,0,127,16,0,0,12,3,0,0,140,16,0,0,16,0,0,0,0,0,0,0,12,3,0,0,183,17,0,0,32,0,0,0,0,0,0,0,12,3,0,0,147,17,0,0,72,0,0,0,0,0,0,0,108,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,32,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,1,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,40,20,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,16,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,56,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,37,115,40,37,117,41,58,32,65,115,115,101,114,116,105,111,110,32,102,97,105,108,117,114,101,58,32,34,37,115,34,10,0,109,95,115,105,122,101,32,60,61,32,109,95,99,97,112,97,99,105,116,121,0,46,47,105,110,99,92,99,114,110,95,100,101,99,111,109,112,46,104,0,109,105,110,95,110,101,119,95,99,97,112,97,99,105,116,121,32,60,32,40,48,120,55,70,70,70,48,48,48,48,85,32,47,32,101,108,101,109,101,110,116,95,115,105,122,101,41,0,110,101,119,95,99,97,112,97,99,105,116,121,32,38,38,32,40,110,101,119,95,99,97,112,97,99,105,116,121,32,62,32,109,95,99,97,112,97,99,105,116,121,41,0,110,117,109,95,99,111,100,101,115,91,99,93,0,115,111,114,116,101,100,95,112,111,115,32,60,32,116,111,116,97,108,95,117,115,101,100,95,115,121,109,115,0,112,67,111,100,101,115,105,122,101,115,91,115,121,109,95,105,110,100,101,120,93,32,61,61,32,99,111,100,101,115,105,122,101,0,116,32,60,32,40,49,85,32,60,60,32,116,97,98,108,101,95,98,105,116,115,41,0,109,95,108,111,111,107,117,112,91,116,93,32,61,61,32,99,85,73,78,84,51,50,95,77,65,88,0,99,114,110,100,95,109,97,108,108,111,99,58,32,115,105,122,101,32,116,111,111,32,98,105,103,0,99,114,110,100,95,109,97,108,108,111,99,58,32,111,117,116,32,111,102,32,109,101,109,111,114,121,0,40,40,117,105,110,116,51,50,41,112,95,110,101,119,32,38,32,40,67,82,78,68,95,77,73,78,95,65,76,76,79,67,95,65,76,73,71,78,77,69,78,84,32,45,32,49,41,41,32,61,61,32,48,0,99,114,110,100,95,114,101,97,108,108,111,99,58,32,98,97,100,32,112,116,114,0,99,114,110,100,95,102,114,101,101,58,32,98,97,100,32,112,116,114,0,102,97,108,115,101,0,40,116,111,116,97,108,95,115,121,109,115,32,62,61,32,49,41,32,38,38,32,40,116,111,116,97,108,95,115,121,109,115,32,60,61,32,112,114,101,102,105,120,95,99,111,100,105,110,103,58,58,99,77,97,120,83,117,112,112,111,114,116,101,100,83,121,109,115,41,0,17,18,19,20,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,16,48,0,110,117,109,95,98,105,116,115,32,60,61,32,51,50,85,0,109,95,98,105,116,95,99,111,117,110,116,32,60,61,32,99,66,105,116,66,117,102,83,105,122,101,0,116,32,33,61,32,99,85,73,78,84,51,50,95,77,65,88,0,109,111,100,101,108,46,109,95,99,111,100,101,95,115,105,122,101,115,91,115,121,109,93,32,61,61,32,108,101,110,0,0,2,3,1,0,2,3,4,5,6,7,1,40,108,101,110,32,62,61,32,49,41,32,38,38,32,40,108,101,110,32,60,61,32,99,77,97,120,69,120,112,101,99,116,101,100,67,111,100,101,83,105,122,101,41,0,105,32,60,32,109,95,115,105,122,101,0,110,101,120,116,95,108,101,118,101,108,95,111,102,115,32,62,32,99,117,114,95,108,101,118,101,108,95,111,102,115,0,1,2,2,3,3,3,3,4,0,0,0,0,0,0,1,1,0,1,0,1,0,0,1,2,1,2,0,0,0,1,0,2,1,0,2,0,0,1,2,3,110,117,109,32,38,38,32,40,110,117,109,32,61,61,32,126,110,117,109,95,99,104,101,99,107,41,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,83,116,57,101,120,99,101,112,116,105,111,110,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,83,116,57,116,121,112,101,95,105,110,102,111,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;function _abort(){Module.abort()}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}STATICTOP+=16;var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function(e){if(!e||EXCEPTIONS.infos[e])return e;for(var t in EXCEPTIONS.infos){if(EXCEPTIONS.infos[t].adjusted===e)return t}return e},addRef:function(e){e&&EXCEPTIONS.infos[e].refcount++},decRef:function(e){if(e){var t=EXCEPTIONS.infos[e];assert(t.refcount>0),t.refcount--,0===t.refcount&&!t.rethrown&&(t.destructor&&Module.dynCall_vi(t.destructor,e),delete EXCEPTIONS.infos[e],___cxa_free_exception(e))}},clearRef:function(e){e&&(EXCEPTIONS.infos[e].refcount=0)}};function ___cxa_begin_catch(e){var t=EXCEPTIONS.infos[e];return t&&!t.caught&&(t.caught=!0,__ZSt18uncaught_exceptionv.uncaught_exception--),t&&(t.rethrown=!1),EXCEPTIONS.caught.push(e),EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(e)),e}function _pthread_once(e,t){_pthread_once.seen||(_pthread_once.seen={}),!(e in _pthread_once.seen)&&(Module.dynCall_v(t),_pthread_once.seen[e]=1)}function _emscripten_memcpy_big(e,t,i){return HEAPU8.set(HEAPU8.subarray(t,t+i),e),e}var SYSCALLS={varargs:0,get:function(e){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(){return Pointer_stringify(SYSCALLS.get())},get64:function(){var e=SYSCALLS.get(),t=SYSCALLS.get();return assert(e>=0?0===t:-1===t),e},getZero:function(){assert(0===SYSCALLS.get())}};function ___syscall6(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.getStreamFromFD();return FS.close(i),0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC),PTHREAD_SPECIFIC={};function _pthread_getspecific(e){return PTHREAD_SPECIFIC[e]||0}function ___setErrNo(e){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=e),e}var PTHREAD_SPECIFIC_NEXT_KEY=1,ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _pthread_key_create(e,t){return 0==e?ERRNO_CODES.EINVAL:(HEAP32[e>>2]=PTHREAD_SPECIFIC_NEXT_KEY,PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0,PTHREAD_SPECIFIC_NEXT_KEY++,0)}function ___resumeException(e){throw EXCEPTIONS.last||(EXCEPTIONS.last=e),e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var e=EXCEPTIONS.last;if(!e)return Runtime.setTempRet0(0),0;var t=EXCEPTIONS.infos[e],i=t.type;if(!i)return Runtime.setTempRet0(0),0|e;var n=Array.prototype.slice.call(arguments);Module.___cxa_is_pointer_type(i),___cxa_find_matching_catch.buffer||(___cxa_find_matching_catch.buffer=_malloc(4)),HEAP32[___cxa_find_matching_catch.buffer>>2]=e,e=___cxa_find_matching_catch.buffer;for(var r=0;r<n.length;r++)if(n[r]&&Module.___cxa_can_catch(n[r],i,e))return e=HEAP32[e>>2],t.adjusted=e,Runtime.setTempRet0(n[r]),0|e;return e=HEAP32[e>>2],Runtime.setTempRet0(i),0|e}function ___gxx_personality_v0(){}function _pthread_setspecific(e,t){return e in PTHREAD_SPECIFIC?(PTHREAD_SPECIFIC[e]=t,0):ERRNO_CODES.EINVAL}function ___syscall140(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.getStreamFromFD(),n=(SYSCALLS.get(),SYSCALLS.get()),r=SYSCALLS.get(),o=SYSCALLS.get(),a=n;return FS.llseek(i,a,o),HEAP32[r>>2]=i.position,i.getdents&&0===a&&0===o&&(i.getdents=null),0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function ___syscall146(e,t){SYSCALLS.varargs=t;try{var i=SYSCALLS.get(),n=SYSCALLS.get(),r=SYSCALLS.get(),o=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(e,t){var i=___syscall146.buffers[e];assert(i),0===t||10===t?((1===e?Module.print:Module.printErr)(UTF8ArrayToString(i,0)),i.length=0):i.push(t)});for(var a=0;a<r;a++){for(var s=HEAP32[n+8*a>>2],l=HEAP32[n+(8*a+4)>>2],u=0;u<l;u++)___syscall146.printChar(i,HEAPU8[s+u]);o+=l}return o}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function ___syscall54(e,t){SYSCALLS.varargs=t;try{return 0}catch(e){return(typeof FS>"u"||!(e instanceof FS.ErrnoError))&&abort(e),-e.errno}}function invoke_iiii(e,t,i,n){try{return Module.dynCall_iiii(e,t,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiiii(e,t,i,n,r,o){try{Module.dynCall_viiiii(e,t,i,n,r,o)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_vi(e,t){try{Module.dynCall_vi(e,t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_ii(e,t){try{return Module.dynCall_ii(e,t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viii(e,t,i,n){try{Module.dynCall_viii(e,t,i,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_v(e){try{Module.dynCall_v(e)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiiiii(e,t,i,n,r,o,a){try{Module.dynCall_viiiiii(e,t,i,n,r,o,a)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}function invoke_viiii(e,t,i,n,r){try{Module.dynCall_viiii(e,t,i,n,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;Module.setThrew(1,0)}}__ATEXIT__.push((function(){var e=Module._fflush;e&&e(0);var t=___syscall146.printChar;if(t){var i=___syscall146.buffers;i[1].length&&t(1,10),i[2].length&&t(2,10)}})),DYNAMICTOP_PTR=allocate(1,"i32",ALLOC_STATIC),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX),HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE,staticSealed=!0,Module.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:1/0,byteLength:byteLength},Module.asmLibraryArg={abort:abort,assert:assert,enlargeMemory:enlargeMemory,getTotalMemory:getTotalMemory,abortOnCannotGrowMemory:abortOnCannotGrowMemory,invoke_iiii:invoke_iiii,invoke_viiiii:invoke_viiiii,invoke_vi:invoke_vi,invoke_ii:invoke_ii,invoke_viii:invoke_viii,invoke_v:invoke_v,invoke_viiiiii:invoke_viiiiii,invoke_viiii:invoke_viiii,_pthread_getspecific:_pthread_getspecific,___syscall54:___syscall54,_pthread_setspecific:_pthread_setspecific,___gxx_personality_v0:___gxx_personality_v0,___syscall6:___syscall6,___setErrNo:___setErrNo,_abort:_abort,___cxa_begin_catch:___cxa_begin_catch,_pthread_once:_pthread_once,_emscripten_memcpy_big:_emscripten_memcpy_big,_pthread_key_create:_pthread_key_create,___syscall140:___syscall140,___resumeException:___resumeException,___cxa_find_matching_catch:___cxa_find_matching_catch,___syscall146:___syscall146,__ZSt18uncaught_exceptionv:__ZSt18uncaught_exceptionv,DYNAMICTOP_PTR:DYNAMICTOP_PTR,tempDoublePtr:tempDoublePtr,ABORT:ABORT,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX,cttz_i8:cttz_i8};var asm=function(e,t,i){var n=e.Int8Array,r=new n(i),o=e.Int16Array,a=new o(i),s=e.Int32Array,l=new s(i),u=e.Uint8Array,c=new u(i),h=e.Uint16Array,d=new h(i),f=e.Uint32Array;new f(i);var p=e.Float32Array;new p(i);var _=e.Float64Array,m=new _(i),g=e.byteLength,x=0|t.DYNAMICTOP_PTR,y=0|t.tempDoublePtr;t.ABORT;var v=0|t.STACKTOP;t.STACK_MAX;var $=0|t.cttz_i8;e.NaN,e.Infinity;var b=0;e.Math.floor,e.Math.abs,e.Math.sqrt,e.Math.pow,e.Math.cos,e.Math.sin,e.Math.tan,e.Math.acos,e.Math.asin,e.Math.atan,e.Math.atan2,e.Math.exp,e.Math.log,e.Math.ceil;var T=e.Math.imul;e.Math.min,e.Math.max;var C=e.Math.clz32,S=t.abort;t.assert;var w=t.enlargeMemory,E=t.getTotalMemory,P=t.abortOnCannotGrowMemory;t.invoke_iiii,t.invoke_viiiii,t.invoke_vi,t.invoke_ii,t.invoke_viii,t.invoke_v,t.invoke_viiiiii,t.invoke_viiii;var A=t._pthread_getspecific,L=t.___syscall54,M=t._pthread_setspecific;t.___gxx_personality_v0;var R=t.___syscall6,O=t.___setErrNo,D=t._abort;t.___cxa_begin_catch;var I=t._pthread_once,B=t._emscripten_memcpy_big,F=t._pthread_key_create,N=t.___syscall140;t.___resumeException,t.___cxa_find_matching_catch;var G=t.___syscall146;function z(e){e|=0;var t,i=0,n=0,r=0,o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,y=0,$=0,b=0,T=0;t=v,v=v+16|0,p=t;do{if(e>>>0<245){if(e=(h=e>>>0<11?16:e+11&-8)>>>3,3&(n=(f=0|l[1144])>>>e)|0)return r=0|l[(n=(e=4616+((i=(1&n^1)+e|0)<<1<<2)|0)+8|0)>>2],(0|e)==(0|(a=0|l[(o=r+8|0)>>2]))?l[1144]=f&~(1<<i):(l[a+12>>2]=e,l[n>>2]=a),T=i<<3,l[r+4>>2]=3|T,l[(T=r+T+4|0)>>2]=1|l[T>>2],v=t,0|(T=o);if(h>>>0>(d=0|l[1146])>>>0){if(0|n)return i=((i=n<<e&((i=2<<e)|0-i))&0-i)-1|0,o=0|l[(e=(i=4616+((r=((n=(i>>>=s=i>>>12&16)>>>5&8)|s|(o=(i>>>=n)>>>2&4)|(e=(i>>>=o)>>>1&2)|(r=(i>>>=e)>>>1&1))+(i>>>r)|0)<<1<<2)|0)+8|0)>>2],(0|i)==(0|(n=0|l[(s=o+8|0)>>2]))?(e=f&~(1<<r),l[1144]=e):(l[n+12>>2]=i,l[e>>2]=n,e=f),a=(r<<3)-h|0,l[o+4>>2]=3|h,l[(r=o+h|0)+4>>2]=1|a,l[r+a>>2]=a,0|d&&(o=0|l[1149],n=4616+((i=d>>>3)<<1<<2)|0,e&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=o,l[i+12>>2]=o,l[o+8>>2]=i,l[o+12>>2]=n),l[1146]=a,l[1149]=r,v=t,0|(T=s);if(u=0|l[1145]){if(n=(u&0-u)-1|0,e=0|l[4880+(((a=(n>>>=s=n>>>12&16)>>>5&8)|s|(c=(n>>>=a)>>>2&4)|(r=(n>>>=c)>>>1&2)|(e=(n>>>=r)>>>1&1))+(n>>>e)<<2)>>2],n=(-8&l[e+4>>2])-h|0,r=0|l[e+16+((0==(0|l[e+16>>2])&1)<<2)>>2]){do{n=(c=(s=(-8&l[r+4>>2])-h|0)>>>0<n>>>0)?s:n,e=c?r:e,r=0|l[r+16+((0==(0|l[r+16>>2])&1)<<2)>>2]}while(0!=(0|r));c=e,a=n}else c=e,a=n;if(c>>>0<(s=c+h|0)>>>0){o=0|l[c+24>>2],i=0|l[c+12>>2];do{if((0|i)==(0|c)){if(!(i=0|l[(e=c+20|0)>>2])&&!(i=0|l[(e=c+16|0)>>2])){n=0;break}for(;;)if(0|(r=0|l[(n=i+20|0)>>2]))i=r,e=n;else{if(!(r=0|l[(n=i+16|0)>>2]))break;i=r,e=n}l[e>>2]=0,n=i}else n=0|l[c+8>>2],l[n+12>>2]=i,l[i+8>>2]=n,n=i}while(0);do{if(0|o){if(i=0|l[c+28>>2],(0|c)==(0|l[(e=4880+(i<<2)|0)>>2])){if(l[e>>2]=n,!n){l[1145]=u&~(1<<i);break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|c)&1)<<2)>>2]=n,!n)break;l[n+24>>2]=o,0|(i=0|l[c+16>>2])&&(l[n+16>>2]=i,l[i+24>>2]=n),0|(i=0|l[c+20>>2])&&(l[n+20>>2]=i,l[i+24>>2]=n)}}while(0);return a>>>0<16?(T=a+h|0,l[c+4>>2]=3|T,l[(T=c+T+4|0)>>2]=1|l[T>>2]):(l[c+4>>2]=3|h,l[s+4>>2]=1|a,l[s+a>>2]=a,0|d&&(r=0|l[1149],n=4616+((i=d>>>3)<<1<<2)|0,f&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=f|i,i=n,e=n+8|0),l[e>>2]=r,l[i+12>>2]=r,l[r+8>>2]=i,l[r+12>>2]=n),l[1146]=a,l[1149]=s),v=t,0|(T=c+8|0)}f=h}else f=h}else f=h}else if(e>>>0<=4294967231)if(h=-8&(e=e+11|0),c=0|l[1145]){r=0-h|0,(e>>>=8)?h>>>0>16777215?u=31:u=h>>>((u=14-((d=((b=e<<(f=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|f|(u=((b<<=d)+245760|0)>>>16&2))+(b<<u>>>15)|0)+7|0)&1|u<<1:u=0,n=0|l[4880+(u<<2)>>2];e:do{if(n)for(e=0,s=h<<(31==(0|u)?0:25-(u>>>1)|0),a=0;;){if((o=(-8&l[n+4>>2])-h|0)>>>0<r>>>0){if(!o){e=n,r=0,o=n,b=61;break e}e=n,r=o}if(a=0==(0|(o=0|l[n+20>>2]))|(0|o)==(0|(n=0|l[n+16+(s>>>31<<2)>>2]))?a:o,o=0==(0|n)){n=a,b=57;break}s<<=1&(1^o)}else n=0,e=0,b=57}while(0);if(57==(0|b)){if(0==(0|n)&0==(0|e)){if(!(e=c&((e=2<<u)|0-e))){f=h;break}f=(e&0-e)-1|0,e=0,n=0|l[4880+(((a=(f>>>=s=f>>>12&16)>>>5&8)|s|(u=(f>>>=a)>>>2&4)|(d=(f>>>=u)>>>1&2)|(n=(f>>>=d)>>>1&1))+(f>>>n)<<2)>>2]}n?(o=n,b=61):(u=e,s=r)}if(61==(0|b))for(;;){if(b=0,n=(f=(n=(-8&l[o+4>>2])-h|0)>>>0<r>>>0)?n:r,e=f?o:e,!(o=0|l[o+16+((0==(0|l[o+16>>2])&1)<<2)>>2])){u=e,s=n;break}r=n,b=61}if(0!=(0|u)&&s>>>0<((0|l[1146])-h|0)>>>0){if(u>>>0>=(a=u+h|0)>>>0)return v=t,0|(T=0);o=0|l[u+24>>2],i=0|l[u+12>>2];do{if((0|i)==(0|u)){if(!(i=0|l[(e=u+20|0)>>2])&&!(i=0|l[(e=u+16|0)>>2])){i=0;break}for(;;)if(0|(r=0|l[(n=i+20|0)>>2]))i=r,e=n;else{if(!(r=0|l[(n=i+16|0)>>2]))break;i=r,e=n}l[e>>2]=0}else T=0|l[u+8>>2],l[T+12>>2]=i,l[i+8>>2]=T}while(0);do{if(o){if(e=0|l[u+28>>2],(0|u)==(0|l[(n=4880+(e<<2)|0)>>2])){if(l[n>>2]=i,!i){r=c&~(1<<e),l[1145]=r;break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|u)&1)<<2)>>2]=i,!i){r=c;break}l[i+24>>2]=o,0|(e=0|l[u+16>>2])&&(l[i+16>>2]=e,l[e+24>>2]=i),(e=0|l[u+20>>2])&&(l[i+20>>2]=e,l[e+24>>2]=i),r=c}else r=c}while(0);do{if(s>>>0>=16){if(l[u+4>>2]=3|h,l[a+4>>2]=1|s,l[a+s>>2]=s,i=s>>>3,s>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=a,l[i+12>>2]=a,l[a+8>>2]=i,l[a+12>>2]=n;break}if((i=s>>>8)?s>>>0>16777215?i=31:i=s>>>((i=14-(($=((T=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(i=((T<<=$)+245760|0)>>>16&2))+(T<<i>>>15)|0)+7|0)&1|i<<1:i=0,n=4880+(i<<2)|0,l[a+28>>2]=i,l[(e=a+16|0)+4>>2]=0,l[e>>2]=0,!(r&(e=1<<i))){l[1145]=r|e,l[n>>2]=a,l[a+24>>2]=n,l[a+12>>2]=a,l[a+8>>2]=a;break}for(e=s<<(31==(0|i)?0:25-(i>>>1)|0),n=0|l[n>>2];;){if((-8&l[n+4>>2]|0)==(0|s)){b=97;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=96;break}e<<=1,n=i}if(96==(0|b)){l[r>>2]=a,l[a+24>>2]=n,l[a+12>>2]=a,l[a+8>>2]=a;break}if(97==(0|b)){T=0|l[(b=n+8|0)>>2],l[T+12>>2]=a,l[b>>2]=a,l[a+8>>2]=T,l[a+12>>2]=n,l[a+24>>2]=0;break}}else T=s+h|0,l[u+4>>2]=3|T,l[(T=u+T+4|0)>>2]=1|l[T>>2]}while(0);return v=t,0|(T=u+8|0)}f=h}else f=h;else f=-1}while(0);if((n=0|l[1146])>>>0>=f>>>0)return i=n-f|0,e=0|l[1149],i>>>0>15?(T=e+f|0,l[1149]=T,l[1146]=i,l[T+4>>2]=1|i,l[T+i>>2]=i,l[e+4>>2]=3|f):(l[1146]=0,l[1149]=0,l[e+4>>2]=3|n,l[(T=e+n+4|0)>>2]=1|l[T>>2]),v=t,0|(T=e+8|0);if((s=0|l[1147])>>>0>f>>>0)return $=s-f|0,l[1147]=$,b=(T=0|l[1150])+f|0,l[1150]=b,l[b+4>>2]=1|$,l[T+4>>2]=3|f,v=t,0|(T=T+8|0);if(0|l[1262]?e=0|l[1264]:(l[1264]=4096,l[1263]=4096,l[1265]=-1,l[1266]=-1,l[1267]=0,l[1255]=0,e=-16&p^1431655768,l[p>>2]=e,l[1262]=e,e=4096),u=f+48|0,(h=(a=e+(c=f+47|0)|0)&(o=0-e|0))>>>0<=f>>>0||0|(e=0|l[1254])&&(p=(d=0|l[1252])+h|0)>>>0<=d>>>0|p>>>0>e>>>0)return v=t,0|(T=0);e:do{if(4&l[1255])i=0,b=133;else{n=0|l[1150];t:do{if(n){for(r=5024;!((e=0|l[r>>2])>>>0<=n>>>0&&(g=r+4|0,(e+(0|l[g>>2])|0)>>>0>n>>>0));){if(!(e=0|l[r+8>>2])){b=118;break t}r=e}if((i=a-s&o)>>>0<2147483647)if((0|(e=0|Se(0|i)))==((0|l[r>>2])+(0|l[g>>2])|0)){if(-1!=(0|e)){s=i,a=e,b=135;break e}}else r=e,b=126;else i=0}else b=118}while(0);do{if(118==(0|b))if(-1!=(0|(n=0|Se(0)))&&(i=n,m=(i=(0==((m=(_=0|l[1263])+-1|0)&i|0)?0:(m+i&0-_)-i|0)+h|0)+(_=0|l[1252])|0,i>>>0>f>>>0&i>>>0<2147483647)){if(0|(g=0|l[1254])&&m>>>0<=_>>>0|m>>>0>g>>>0){i=0;break}if((0|(e=0|Se(0|i)))==(0|n)){s=i,a=n,b=135;break e}r=e,b=126}else i=0}while(0);do{if(126==(0|b)){if(n=0-i|0,!(u>>>0>i>>>0&i>>>0<2147483647&-1!=(0|r))){if(-1==(0|r)){i=0;break}s=i,a=r,b=135;break e}if((e=c-i+(e=0|l[1264])&0-e)>>>0>=2147483647){s=i,a=r,b=135;break e}if(-1==(0|Se(0|e))){Se(0|n),i=0;break}s=e+i|0,a=r,b=135;break e}}while(0);l[1255]=4|l[1255],b=133}}while(0);if(133==(0|b)&&h>>>0<2147483647&&!(-1==(0|($=0|Se(0|h)))|1^(y=(x=(g=0|Se(0))-$|0)>>>0>(f+40|0)>>>0)|$>>>0<g>>>0&-1!=(0|$)&-1!=(0|g)^1)&&(s=y?x:i,a=$,b=135),135==(0|b)){i=(0|l[1252])+s|0,l[1252]=i,i>>>0>(0|l[1253])>>>0&&(l[1253]=i),c=0|l[1150];do{if(c){for(i=5024;;){if((0|a)==((e=0|l[i>>2])+(r=0|l[(n=i+4|0)>>2])|0)){b=145;break}if(!(o=0|l[i+8>>2]))break;i=o}if(145==(0|b)&&0==(8&l[i+12>>2]|0)&&c>>>0<a>>>0&c>>>0>=e>>>0){l[n>>2]=r+s,b=c+(T=0==(7&(T=c+8|0)|0)?0:0-T&7)|0,T=(0|l[1147])+(s-T)|0,l[1150]=b,l[1147]=T,l[b+4>>2]=1|T,l[b+T+4>>2]=40,l[1151]=l[1266];break}for(a>>>0<(0|l[1148])>>>0&&(l[1148]=a),n=a+s|0,i=5024;;){if((0|l[i>>2])==(0|n)){b=153;break}if(!(e=0|l[i+8>>2]))break;i=e}if(153==(0|b)&&0==(8&l[i+12>>2]|0)){l[i>>2]=a,l[(d=i+4|0)>>2]=(0|l[d>>2])+s,h=(d=a+(0==(7&(d=a+8|0)|0)?0:0-d&7)|0)+f|0,u=(i=n+(0==(7&(i=n+8|0)|0)?0:0-i&7)|0)-d-f|0,l[d+4>>2]=3|f;do{if((0|i)!=(0|c)){if((0|i)==(0|l[1149])){T=(0|l[1146])+u|0,l[1146]=T,l[1149]=h,l[h+4>>2]=1|T,l[h+T>>2]=T;break}if(1==(3&(e=0|l[i+4>>2])|0)){s=-8&e,r=e>>>3;e:do{if(e>>>0<256){if(e=0|l[i+8>>2],(0|(n=0|l[i+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<r);break}l[e+12>>2]=n,l[n+8>>2]=e;break}a=0|l[i+24>>2],e=0|l[i+12>>2];do{if((0|e)==(0|i)){if(!(e=0|l[(n=(r=i+16|0)+4|0)>>2])){if(!(e=0|l[r>>2])){e=0;break}n=r}for(;;)if(0|(o=0|l[(r=e+20|0)>>2]))e=o,n=r;else{if(!(o=0|l[(r=e+16|0)>>2]))break;e=o,n=r}l[n>>2]=0}else T=0|l[i+8>>2],l[T+12>>2]=e,l[e+8>>2]=T}while(0);if(!a)break;r=4880+((n=0|l[i+28>>2])<<2)|0;do{if((0|i)==(0|l[r>>2])){if(l[r>>2]=e,0|e)break;l[1145]=l[1145]&~(1<<n);break e}if(l[a+16+(((0|l[a+16>>2])!=(0|i)&1)<<2)>>2]=e,!e)break e}while(0);if(l[e+24>>2]=a,0|(r=0|l[(n=i+16|0)>>2])&&(l[e+16>>2]=r,l[r+24>>2]=e),!(n=0|l[n+4>>2]))break;l[e+20>>2]=n,l[n+24>>2]=e}while(0);i=i+s|0,o=s+u|0}else o=u;if(l[(i=i+4|0)>>2]=-2&l[i>>2],l[h+4>>2]=1|o,l[h+o>>2]=o,i=o>>>3,o>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=h,l[i+12>>2]=h,l[h+8>>2]=i,l[h+12>>2]=n;break}i=o>>>8;do{if(i){if(o>>>0>16777215){i=31;break}i=o>>>((i=14-(($=((T=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(i=((T<<=$)+245760|0)>>>16&2))+(T<<i>>>15)|0)+7|0)&1|i<<1}else i=0}while(0);if(r=4880+(i<<2)|0,l[h+28>>2]=i,l[(e=h+16|0)+4>>2]=0,l[e>>2]=0,!((e=0|l[1145])&(n=1<<i))){l[1145]=e|n,l[r>>2]=h,l[h+24>>2]=r,l[h+12>>2]=h,l[h+8>>2]=h;break}for(e=o<<(31==(0|i)?0:25-(i>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|o)){b=194;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=193;break}e<<=1,n=i}if(193==(0|b)){l[r>>2]=h,l[h+24>>2]=n,l[h+12>>2]=h,l[h+8>>2]=h;break}if(194==(0|b)){T=0|l[(b=n+8|0)>>2],l[T+12>>2]=h,l[b>>2]=h,l[h+8>>2]=T,l[h+12>>2]=n,l[h+24>>2]=0;break}}else T=(0|l[1147])+u|0,l[1147]=T,l[1150]=h,l[h+4>>2]=1|T}while(0);return v=t,0|(T=d+8|0)}for(i=5024;!((e=0|l[i>>2])>>>0<=c>>>0&&(T=e+(0|l[i+4>>2])|0,T>>>0>c>>>0));)i=0|l[i+8>>2];i=(e=(e=(o=T+-47|0)+(0==(7&(e=o+8|0)|0)?0:0-e&7)|0)>>>0<(o=c+16|0)>>>0?c:e)+8|0,b=a+(n=0==(7&(n=a+8|0)|0)?0:0-n&7)|0,n=s+-40-n|0,l[1150]=b,l[1147]=n,l[b+4>>2]=1|n,l[b+n+4>>2]=40,l[1151]=l[1266],l[(n=e+4|0)>>2]=27,l[i>>2]=l[1256],l[i+4>>2]=l[1257],l[i+8>>2]=l[1258],l[i+12>>2]=l[1259],l[1256]=a,l[1257]=s,l[1259]=0,l[1258]=i,i=e+24|0;do{b=i,l[(i=i+4|0)>>2]=7}while((b+8|0)>>>0<T>>>0);if((0|e)!=(0|c)){if(a=e-c|0,l[n>>2]=-2&l[n>>2],l[c+4>>2]=1|a,l[e>>2]=a,i=a>>>3,a>>>0<256){n=4616+(i<<1<<2)|0,(e=0|l[1144])&(i=1<<i)?i=0|l[(e=n+8|0)>>2]:(l[1144]=e|i,i=n,e=n+8|0),l[e>>2]=c,l[i+12>>2]=c,l[c+8>>2]=i,l[c+12>>2]=n;break}if((i=a>>>8)?a>>>0>16777215?n=31:n=a>>>((n=14-(($=((T=i<<(b=(i+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(n=((T<<=$)+245760|0)>>>16&2))+(T<<n>>>15)|0)+7|0)&1|n<<1:n=0,r=4880+(n<<2)|0,l[c+28>>2]=n,l[c+20>>2]=0,l[o>>2]=0,!((i=0|l[1145])&(e=1<<n))){l[1145]=i|e,l[r>>2]=c,l[c+24>>2]=r,l[c+12>>2]=c,l[c+8>>2]=c;break}for(e=a<<(31==(0|n)?0:25-(n>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|a)){b=216;break}if(!(i=0|l[(r=n+16+(e>>>31<<2)|0)>>2])){b=215;break}e<<=1,n=i}if(215==(0|b)){l[r>>2]=c,l[c+24>>2]=n,l[c+12>>2]=c,l[c+8>>2]=c;break}if(216==(0|b)){T=0|l[(b=n+8|0)>>2],l[T+12>>2]=c,l[b>>2]=c,l[c+8>>2]=T,l[c+12>>2]=n,l[c+24>>2]=0;break}}}else{0==(0|(T=0|l[1148]))|a>>>0<T>>>0&&(l[1148]=a),l[1256]=a,l[1257]=s,l[1259]=0,l[1153]=l[1262],l[1152]=-1,i=0;do{l[(T=4616+(i<<1<<2)|0)+12>>2]=T,l[T+8>>2]=T,i=i+1|0}while(32!=(0|i));b=a+(T=0==(7&(T=a+8|0)|0)?0:0-T&7)|0,T=s+-40-T|0,l[1150]=b,l[1147]=T,l[b+4>>2]=1|T,l[b+T+4>>2]=40,l[1151]=l[1266]}}while(0);if((i=0|l[1147])>>>0>f>>>0)return $=i-f|0,l[1147]=$,b=(T=0|l[1150])+f|0,l[1150]=b,l[b+4>>2]=1|$,l[T+4>>2]=3|f,v=t,0|(T=T+8|0)}return T=0|tt(),l[T>>2]=12,v=t,0|(T=0)}function U(e,t,i,n,o,a){e|=0,t=+t,i|=0,n|=0,o|=0,a|=0;var s,u=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,y=0,$=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,D=0;s=v,v=v+560|0,d=s+8|0,O=D=s+524|0,f=s+512|0,l[($=s)>>2]=0,R=f+12|0,Ne(t),(0|b)<0?(t=-t,L=1,A=2087):(L=0!=(2049&o|0)&1,A=0==(2048&o|0)?0==(1&o|0)?2088:2093:2090),Ne(t),M=2146435072&b;do{if(M>>>0<2146435072|2146435072==(0|M)&!1){if((u=0!=(g=2*+et(t,$)))&&(l[$>>2]=(0|l[$>>2])-1),97==(0|(S=32|a))){m=0==(0|(x=32&a))?A:A+9|0,_=2|L,u=12-n|0;do{if(!(n>>>0>11|0==(0|u))){t=8;do{u=u+-1|0,t*=16}while(0!=(0|u));if(45==(0|r[m>>0])){t=-(t+(-g-t));break}t=g+t-t;break}t=g}while(0);(0|(u=0|xe(u=(0|(h=0|l[$>>2]))<0?0-h|0:h,((0|u)<0)<<31>>31,R)))==(0|R)&&(r[(u=f+11|0)>>0]=48),r[u+-1>>0]=43+(h>>31&2),r[(p=u+-2|0)>>0]=a+15,f=(0|n)<1,d=0==(8&o|0),u=D;do{M=~~t,h=u+1|0,r[u>>0]=c[2122+M>>0]|x,t=16*(t-+(0|M)),1!=(h-O|0)||d&f&0==t?u=h:(r[h>>0]=46,u=u+2|0)}while(0!=t);M=u-O|0,be(e,32,i,u=(O=R-p|0)+_+(R=0!=(0|n)&(M+-2|0)<(0|n)?n+2|0:M)|0,o),Ve(e,m,_),be(e,48,i,u,65536^o),Ve(e,D,M),be(e,48,R-M|0,0,0),Ve(e,p,O),be(e,32,i,u,8192^o);break}h=(0|n)<0?6:n,u?(u=(0|l[$>>2])-28|0,l[$>>2]=u,t=268435456*g):(t=g,u=0|l[$>>2]),d=M=(0|u)<0?d:d+288|0;do{E=~~t>>>0,l[d>>2]=E,d=d+4|0,t=1e9*(t-+(E>>>0))}while(0!=t);if((0|u)>0)for(f=M,_=d;;){if(p=(0|u)<29?u:29,(u=_+-4|0)>>>0>=f>>>0){d=0;do{C=0|Me(0|(w=0|Ge(0|(w=0|De(0|l[u>>2],0,0|p)),0|b,0|d,0)),0|(E=b),1e9,0),l[u>>2]=C,d=0|je(0|w,0|E,1e9,0),u=u+-4|0}while(u>>>0>=f>>>0);d&&(l[(f=f+-4|0)>>2]=d)}for(d=_;!(d>>>0<=f>>>0)&&!(0|l[(u=d+-4|0)>>2]);)d=u;if(u=(0|l[$>>2])-p|0,l[$>>2]=u,!((0|u)>0))break;_=d}else f=M;if((0|u)<0){n=1+((h+25|0)/9|0)|0,y=102==(0|S);do{if(x=(0|(x=0-u|0))<9?x:9,f>>>0<d>>>0){p=(1<<x)-1|0,_=1e9>>>x,m=0,u=f;do{E=0|l[u>>2],l[u>>2]=(E>>>x)+m,m=0|T(E&p,_),u=u+4|0}while(u>>>0<d>>>0);u=0==(0|l[f>>2])?f+4|0:f,m?(l[d>>2]=m,f=u,u=d+4|0):(f=u,u=d)}else f=0==(0|l[f>>2])?f+4|0:f,u=d;d=(u-(d=y?M:f)>>2|0)>(0|n)?d+(n<<2)|0:u,u=(0|l[$>>2])+x|0,l[$>>2]=u}while((0|u)<0);u=f,n=d}else u=f,n=d;if(E=M,u>>>0<n>>>0){if(d=9*(E-u>>2)|0,(p=0|l[u>>2])>>>0>=10){f=10;do{f=10*f|0,d=d+1|0}while(p>>>0>=f>>>0)}}else d=0;if((0|(f=h-(102!=(0|S)?d:0)+(((C=0!=(0|h))&(y=103==(0|S)))<<31>>31)|0))<((9*(n-E>>2)|0)-9|0)){if(x=M+4+(((0|(f=f+9216|0))/9|0)-1024<<2)|0,(0|(f=1+((0|f)%9|0)|0))<9){p=10;do{p=10*p|0,f=f+1|0}while(9!=(0|f))}else p=10;if((f=(x+4|0)==(0|n))&0==(0|(m=((_=0|l[x>>2])>>>0)%(p>>>0)|0)))f=x;else if(g=0==(1&((_>>>0)/(p>>>0)|0)|0)?9007199254740992:9007199254740994,t=m>>>0<(w=(0|p)/2|0)>>>0?.5:f&(0|m)==(0|w)?1:1.5,L&&(t=(w=45==(0|r[A>>0]))?-t:t,g=w?-g:g),f=_-m|0,l[x>>2]=f,g+t!=g){if(w=f+p|0,l[x>>2]=w,w>>>0>999999999)for(d=x;f=d+-4|0,l[d>>2]=0,f>>>0<u>>>0&&(l[(u=u+-4|0)>>2]=0),w=1+(0|l[f>>2])|0,l[f>>2]=w,w>>>0>999999999;)d=f;else f=x;if(d=9*(E-u>>2)|0,(_=0|l[u>>2])>>>0>=10){p=10;do{p=10*p|0,d=d+1|0}while(_>>>0>=p>>>0)}}else f=x;f=n>>>0>(f=f+4|0)>>>0?f:n,w=u}else f=n,w=u;for(S=f;;){if(S>>>0<=w>>>0){$=0;break}if(0|l[(u=S+-4|0)>>2]){$=1;break}S=u}n=0-d|0;do{if(y){if((0|(u=(1&(1^C))+h|0))>(0|d)&(0|d)>-5?(p=a+-1|0,h=u+-1-d|0):(p=a+-2|0,h=u+-1|0),!(u=8&o)){if($&&0!=(0|(P=0|l[S+-4>>2])))if((P>>>0)%10|0)f=0;else{f=0,u=10;do{u=10*u|0,f=f+1|0}while(!(0|(P>>>0)%(u>>>0)))}else f=9;if(u=(9*(S-E>>2)|0)-9|0,102==(32|p)){h=(0|h)<(0|(x=(0|(x=u-f|0))>0?x:0))?h:x,x=0;break}h=(0|h)<(0|(x=(0|(x=u+d-f|0))>0?x:0))?h:x,x=0;break}x=u}else p=a,x=8&o}while(0);if(_=0!=(0|(y=h|x))&1,m=102==(32|p))C=0,u=(0|d)>0?d:0;else{if(((f=R)-(u=0|xe(u=(0|d)<0?n:d,((0|u)<0)<<31>>31,R))|0)<2)do{r[(u=u+-1|0)>>0]=48}while((f-u|0)<2);r[u+-1>>0]=43+(d>>31&2),r[(u=u+-2|0)>>0]=p,C=u,u=f-u|0}if(be(e,32,i,u=L+1+h+_+u|0,o),Ve(e,A,L),be(e,48,i,u,65536^o),m){_=x=D+9|0,m=D+8|0,f=p=w>>>0>M>>>0?M:w;do{if(d=0|xe(0|l[f>>2],0,x),(0|f)==(0|p))(0|d)==(0|x)&&(r[m>>0]=48,d=m);else if(d>>>0>D>>>0){de(0|D,48,d-O|0);do{d=d+-1|0}while(d>>>0>D>>>0)}Ve(e,d,_-d|0),f=f+4|0}while(f>>>0<=M>>>0);if(0|y&&Ve(e,2138,1),f>>>0<S>>>0&(0|h)>0)for(;;){if((d=0|xe(0|l[f>>2],0,x))>>>0>D>>>0){de(0|D,48,d-O|0);do{d=d+-1|0}while(d>>>0>D>>>0)}if(Ve(e,d,(0|h)<9?h:9),d=h+-9|0,!((f=f+4|0)>>>0<S>>>0&(0|h)>9)){h=d;break}h=d}be(e,48,h+9|0,9,0)}else{if(y=$?S:w+4|0,(0|h)>-1){x=0==(0|x),n=$=D+9|0,_=0-O|0,m=D+8|0,p=w;do{(0|(d=0|xe(0|l[p>>2],0,$)))==(0|$)&&(r[m>>0]=48,d=m);do{if((0|p)==(0|w)){if(f=d+1|0,Ve(e,d,1),x&(0|h)<1){d=f;break}Ve(e,2138,1),d=f}else{if(d>>>0<=D>>>0)break;de(0|D,48,d+_|0);do{d=d+-1|0}while(d>>>0>D>>>0)}}while(0);Ve(e,d,(0|h)>(0|(O=n-d|0))?O:h),h=h-O|0,p=p+4|0}while(p>>>0<y>>>0&(0|h)>-1)}be(e,48,h+18|0,18,0),Ve(e,C,R-C|0)}be(e,32,i,u,8192^o)}else D=0!=(32&a|0),be(e,32,i,u=L+3|0,-65537&o),Ve(e,A,L),Ve(e,t!=t|!1?D?2114:2118:D?2106:2110,3),be(e,32,i,u,8192^o)}while(0);return v=s,0|((0|u)<(0|i)?i:u)}function V(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0,o|=0;var s,u,c,h,d,f,p,_,g,x=0,y=0,$=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0;g=v,v=v+64|0,f=g,O=g+24|0,p=g+8|0,_=g+20|0,l[(d=g+16|0)>>2]=t,s=0!=(0|e),c=u=O+40|0,O=O+39|0,h=p+4|0,y=0,x=0,S=0;e:for(;;){do{if((0|x)>-1){if((0|y)>(2147483647-x|0)){x=0|tt(),l[x>>2]=75,x=-1;break}x=y+x|0;break}}while(0);if(!((y=0|r[t>>0])<<24>>24)){R=87;break}$=t;t:for(;;){switch(y<<24>>24){case 37:y=$,R=9;break t;case 0:y=$;break t}M=$+1|0,l[d>>2]=M,y=0|r[M>>0],$=M}t:do{if(9==(0|R))for(;;){if(R=0,37!=(0|r[$+1>>0]))break t;if(y=y+1|0,$=$+2|0,l[d>>2]=$,37!=(0|r[$>>0]))break;R=9}}while(0);if(y=y-t|0,s&&Ve(e,t,y),0|y)t=$;else{(y=(0|r[(T=$+1|0)>>0])-48|0)>>>0<10?(L=(M=36==(0|r[$+2>>0]))?y:-1,S=M?1:S,T=M?$+3|0:T):L=-1,l[d>>2]=T,$=((y=0|r[T>>0])<<24>>24)-32|0;t:do{if($>>>0<32)for(C=0,w=y;;){if(!(75913&(y=1<<$))){y=w;break t}if(C|=y,T=T+1|0,l[d>>2]=T,($=((y=0|r[T>>0])<<24>>24)-32|0)>>>0>=32)break;w=y}else C=0}while(0);if(y<<24>>24==42){if((y=(0|r[($=T+1|0)>>0])-48|0)>>>0<10&&36==(0|r[T+2>>0]))l[o+(y<<2)>>2]=10,y=0|l[n+((0|r[$>>0])-48<<3)>>2],S=1,T=T+3|0;else{if(0|S){x=-1;break}s?(S=3+(0|l[i>>2])&-4,y=0|l[S>>2],l[i>>2]=S+4,S=0,T=$):(y=0,S=0,T=$)}l[d>>2]=T,y=(M=(0|y)<0)?0-y|0:y,C=M?8192|C:C}else{if((0|(y=0|we(d)))<0){x=-1;break}T=0|l[d>>2]}do{if(46==(0|r[T>>0])){if(42!=(0|r[T+1>>0])){l[d>>2]=T+1,$=0|we(d),T=0|l[d>>2];break}if(($=(0|r[(w=T+2|0)>>0])-48|0)>>>0<10&&36==(0|r[T+3>>0])){l[o+($<<2)>>2]=10,$=0|l[n+((0|r[w>>0])-48<<3)>>2],T=T+4|0,l[d>>2]=T;break}if(0|S){x=-1;break e}s?(M=3+(0|l[i>>2])&-4,$=0|l[M>>2],l[i>>2]=M+4):$=0,l[d>>2]=w,T=w}else $=-1}while(0);for(A=0;;){if(((0|r[T>>0])-65|0)>>>0>57){x=-1;break e}if(M=T+1|0,l[d>>2]=M,!(((E=255&(w=0|r[(0|r[T>>0])-65+(1606+(58*A|0))>>0]))+-1|0)>>>0<8))break;A=E,T=M}if(!(w<<24>>24)){x=-1;break}P=(0|L)>-1;do{if(w<<24>>24==19){if(P){x=-1;break e}R=49}else{if(P){l[o+(L<<2)>>2]=E,L=0|l[(P=n+(L<<3)|0)+4>>2],l[(R=f)>>2]=l[P>>2],l[R+4>>2]=L,R=49;break}if(!s){x=0;break e}Z(f,E,i)}}while(0);if(49!=(0|R)||(R=0,s)){T=0!=(0|A)&3==(15&(T=0|r[T>>0])|0)?-33&T:T,P=-65537&C,L=0==(8192&C|0)?C:P;t:do{switch(0|T){case 110:switch((255&A)<<24>>24){case 0:case 1:case 6:l[l[f>>2]>>2]=x,y=0,t=M;continue e;case 2:case 7:y=0|l[f>>2],l[y>>2]=x,l[y+4>>2]=((0|x)<0)<<31>>31,y=0,t=M;continue e;case 3:a[l[f>>2]>>1]=x,y=0,t=M;continue e;case 4:r[l[f>>2]>>0]=x,y=0,t=M;continue e;default:y=0,t=M;continue e}case 112:T=120,$=$>>>0>8?$:8,t=8|L,R=61;break;case 88:case 120:t=L,R=61;break;case 111:C=0,w=2070,$=0==(8&L|0)|(0|$)>(0|(P=c-(E=0|Le(t=0|l[(T=f)>>2],T=0|l[T+4>>2],u))|0))?$:P+1|0,P=L,R=67;break;case 105:case 100:if(t=0|l[(T=f)>>2],(0|(T=0|l[T+4>>2]))<0){t=0|Fe(0,0,0|t,0|T),T=b,l[(C=f)>>2]=t,l[C+4>>2]=T,C=1,w=2070,R=66;break t}C=0!=(2049&L|0)&1,w=0==(2048&L|0)?0==(1&L|0)?2070:2072:2071,R=66;break t;case 117:C=0,w=2070,t=0|l[(T=f)>>2],T=0|l[T+4>>2],R=66;break;case 99:r[O>>0]=l[f>>2],t=O,C=0,w=2070,E=u,T=1,$=P;break;case 109:T=0|tt(),T=0|ke(0|l[T>>2]),R=71;break;case 115:T=0|(T=0|l[f>>2])?T:2080,R=71;break;case 67:l[p>>2]=l[f>>2],l[h>>2]=0,l[f>>2]=p,E=-1,T=p,R=75;break;case 83:t=0|l[f>>2],$?(E=$,T=t,R=75):(be(e,32,y,0,L),t=0,R=84);break;case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:y=0|U(e,+m[f>>3],y,$,L,T),t=M;continue e;default:C=0,w=2070,E=u,T=$,$=L}}while(0);t:do{if(61==(0|R))L=f,A=0|l[L>>2],L=0|l[L+4>>2],E=0|Ee(A,L,u,32&T),w=0==(8&t|0)|0==(0|A)&0==(0|L),C=w?0:2,w=w?2070:2070+(T>>4)|0,P=t,t=A,T=L,R=67;else if(66==(0|R))E=0|xe(t,T,u),P=L,R=67;else if(71==(0|R))R=0,L=0|se(T,0,$),A=0==(0|L),t=T,C=0,w=2070,E=A?T+$|0:L,T=A?$:L-T|0,$=P;else if(75==(0|R)){for(R=0,w=T,t=0,$=0;(C=0|l[w>>2])&&!((0|($=0|We(_,C)))<0|$>>>0>(E-t|0)>>>0)&&E>>>0>(t=$+t|0)>>>0;)w=w+4|0;if((0|$)<0){x=-1;break e}if(be(e,32,y,t,L),t)for(C=0;;){if(!($=0|l[T>>2])){R=84;break t}if((0|(C=($=0|We(_,$))+C|0))>(0|t)){R=84;break t}if(Ve(e,_,$),C>>>0>=t>>>0){R=84;break}T=T+4|0}else t=0,R=84}}while(0);if(67==(0|R))R=0,L=0!=(0|$)|(T=0!=(0|t)|0!=(0|T)),T=c-E+(1&(1^T))|0,t=L?E:u,E=u,T=L?(0|$)>(0|T)?$:T:$,$=(0|$)>-1?-65537&P:P;else if(84==(0|R)){R=0,be(e,32,y,t,8192^L),y=(0|y)>(0|t)?y:t,t=M;continue}be(e,32,y=(0|y)<(0|(L=(P=(0|T)<(0|(A=E-t|0))?A:T)+C|0))?L:y,L,$),Ve(e,w,C),be(e,48,y,L,65536^$),be(e,48,P,A,0),Ve(e,t,A),be(e,32,y,L,8192^$),t=M}else y=0,t=M}}e:do{if(87==(0|R)&&!e)if(S){for(x=1;t=0|l[o+(x<<2)>>2];)if(Z(n+(x<<3)|0,t,i),(0|(x=x+1|0))>=10){x=1;break e}for(;;){if(0|l[o+(x<<2)>>2]){x=-1;break e}if((0|(x=x+1|0))>=10){x=1;break}}}else x=0}while(0);return v=g,0|x}function k(e,t){t|=0;var i,n,o,a,s,u,h,d,f,p,_,m,g,x,y,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0;if(y=v,v=v+704|0,g=y+144|0,m=y+128|0,_=y+112|0,p=y+96|0,f=y+80|0,d=y+64|0,h=y+48|0,x=y+32|0,i=y+16|0,w=y,o=y+184|0,L=y+160|0,a=0|function(e,t){e|=0;var i=0,n=0,r=0,o=0,a=0,s=0,u=0,h=0;if(h=v,v=v+528|0,a=h,o=h+16|0,!(t|=0))return v=h,0|(u=0);if(t>>>0<=16)return u=0|ae(e,t),v=h,0|u;if(s=0|ae(e,t+-16|0),(0|(t=0|l[(u=e+20|0)>>2]))<16){n=e+4|0,r=e+8|0,i=e+16|0;do{(0|(e=0|l[n>>2]))==(0|l[r>>2])?e=0:(l[n>>2]=e+1,e=0|c[e>>0]),t=t+8|0,l[u>>2]=t,(0|t)>=33&&(l[a>>2]=866,l[a+4>>2]=3208,l[a+8>>2]=1366,Oe(o,812,a),$e(o),t=0|l[u>>2]),e=e<<32-t|l[i>>2],l[i>>2]=e}while((0|t)<16)}else i=e=e+16|0,e=0|l[e>>2];return l[i>>2]=e<<16,l[u>>2]=t+-16,v=h,0|(u=e>>>16|s<<16)}(e|=0,14),!a)return function(e){var t=0,i=0,n=0,o=0,a=0,s=0;if(s=v,v=v+544|0,a=s+16|0,n=s,o=s+32|0,l[(e|=0)>>2]=0,0|(i=0|l[(t=e+4|0)>>2])&&(7&i?(l[n>>2]=866,l[n+4>>2]=2506,l[n+8>>2]=1232,Oe(o,812,n),$e(o)):_e(i,0,0,1,0),l[t>>2]=0,l[e+8>>2]=0,l[e+12>>2]=0),r[e+16>>0]=0,!(t=0|l[(e=e+20|0)>>2]))return void(v=s);re(t),7&t?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1232,Oe(o,812,a),$e(o)):_e(t,0,0,1,0),l[e>>2]=0,v=s}(t),v=y,0|(L=1);if(s=t+4|0,(0|($=0|l[(u=t+8|0)>>2]))!=(0|a)){if($>>>0<=a>>>0){do{if((0|l[t+12>>2])>>>0<a>>>0){if(0|K(s,a,($+1|0)==(0|a),1,0)){$=0|l[u>>2];break}return r[t+16>>0]=1,v=y,0|(L=0)}}while(0);de((0|l[s>>2])+$|0,0,a-$|0)}l[u>>2]=a}if(de(0|l[s>>2],0,0|a),(0|($=0|l[(n=e+20|0)>>2]))<5){C=e+4|0,S=e+8|0,T=e+16|0;do{(0|(b=0|l[C>>2]))==(0|l[S>>2])?b=0:(l[C>>2]=b+1,b=0|c[b>>0]),$=$+8|0,l[n>>2]=$,(0|$)>=33&&(l[w>>2]=866,l[w+4>>2]=3208,l[w+8>>2]=1366,Oe(o,812,w),$e(o),$=0|l[n>>2]),b=b<<32-$|l[T>>2],l[T>>2]=b}while((0|$)<5)}else T=b=e+16|0,b=0|l[b>>2];if(P=b>>>27,l[T>>2]=b<<5,l[n>>2]=$+-5,(P+-1|0)>>>0>20)return v=y,0|(L=0);l[L+20>>2]=0,l[L>>2]=0,l[L+4>>2]=0,l[L+8>>2]=0,l[L+12>>2]=0,r[L+16>>0]=0,$=L+4|0,b=L+8|0;e:do{if(0|K($,21,0,1,0)){C=0|l[b>>2],de((E=0|l[$>>2])+C|0,0,21-C|0),l[b>>2]=21,C=e+4|0,S=e+8|0,w=e+16|0,T=0;do{if((0|($=0|l[n>>2]))<3)do{(0|(b=0|l[C>>2]))==(0|l[S>>2])?b=0:(l[C>>2]=b+1,b=0|c[b>>0]),$=$+8|0,l[n>>2]=$,(0|$)>=33&&(l[i>>2]=866,l[i+4>>2]=3208,l[i+8>>2]=1366,Oe(o,812,i),$e(o),$=0|l[n>>2]),b=b<<32-$|l[w>>2],l[w>>2]=b}while((0|$)<3);else b=0|l[w>>2];l[w>>2]=b<<3,l[n>>2]=$+-3,r[E+(0|c[1327+T>>0])>>0]=b>>>29,T=T+1|0}while((0|T)!=(0|P));if(0|ne(L)){w=e+4|0,E=e+8|0,P=e+16|0,$=0;t:do{S=a-$|0,T=0|X(e,L);i:do{if(T>>>0<17)(0|l[u>>2])>>>0<=$>>>0&&(l[x>>2]=866,l[x+4>>2]=910,l[x+8>>2]=1497,Oe(o,812,x),$e(o)),r[(0|l[s>>2])+$>>0]=T,$=$+1|0;else switch(0|T){case 17:if((0|(b=0|l[n>>2]))<3)do{(0|(T=0|l[w>>2]))==(0|l[E>>2])?T=0:(l[w>>2]=T+1,T=0|c[T>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[h>>2]=866,l[h+4>>2]=3208,l[h+8>>2]=1366,Oe(o,812,h),$e(o),b=0|l[n>>2]),T=T<<32-b|l[P>>2],l[P>>2]=T}while((0|b)<3);else T=0|l[P>>2];if(l[P>>2]=T<<3,l[n>>2]=b+-3,b=(T=3+(T>>>29)|0)>>>0>S>>>0){$=0;break e}$=(b?0:T)+$|0;break i;case 18:if((0|(b=0|l[n>>2]))<7)do{(0|(T=0|l[w>>2]))==(0|l[E>>2])?T=0:(l[w>>2]=T+1,T=0|c[T>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[d>>2]=866,l[d+4>>2]=3208,l[d+8>>2]=1366,Oe(o,812,d),$e(o),b=0|l[n>>2]),T=T<<32-b|l[P>>2],l[P>>2]=T}while((0|b)<7);else T=0|l[P>>2];if(l[P>>2]=T<<7,l[n>>2]=b+-7,b=(T=11+(T>>>25)|0)>>>0>S>>>0){$=0;break e}$=(b?0:T)+$|0;break i;default:if((T+-19|0)>>>0>=2){A=81;break t}if(b=0|l[n>>2],19==(0|T)){if((0|b)<2)for(T=b;(0|(b=0|l[w>>2]))==(0|l[E>>2])?C=0:(l[w>>2]=b+1,C=0|c[b>>0]),b=T+8|0,l[n>>2]=b,(0|b)>=33&&(l[f>>2]=866,l[f+4>>2]=3208,l[f+8>>2]=1366,Oe(o,812,f),$e(o),b=0|l[n>>2]),T=C<<32-b|l[P>>2],l[P>>2]=T,(0|b)<2;)T=b;else T=0|l[P>>2];l[P>>2]=T<<2,T>>>=30,C=3,b=b+-2|0}else{if((0|b)<6)do{(0|(T=0|l[w>>2]))==(0|l[E>>2])?T=0:(l[w>>2]=T+1,T=0|c[T>>0]),b=b+8|0,l[n>>2]=b,(0|b)>=33&&(l[p>>2]=866,l[p+4>>2]=3208,l[p+8>>2]=1366,Oe(o,812,p),$e(o),b=0|l[n>>2]),T=T<<32-b|l[P>>2],l[P>>2]=T}while((0|b)<6);else T=0|l[P>>2];l[P>>2]=T<<6,T>>>=26,C=7,b=b+-6|0}if(l[n>>2]=b,0==(0|$)|(T=T+C|0)>>>0>S>>>0){$=0;break e}if(b=$+-1|0,(0|l[u>>2])>>>0<=b>>>0&&(l[_>>2]=866,l[_+4>>2]=910,l[_+8>>2]=1497,Oe(o,812,_),$e(o)),!((C=0|r[(0|l[s>>2])+b>>0])<<24>>24)){$=0;break e}if($>>>0>=(b=T+$|0)>>>0)break i;do{(0|l[u>>2])>>>0<=$>>>0&&(l[m>>2]=866,l[m+4>>2]=910,l[m+8>>2]=1497,Oe(o,812,m),$e(o)),r[(0|l[s>>2])+$>>0]=C,$=$+1|0}while((0|$)!=(0|b));$=b}}while(0)}while(a>>>0>$>>>0);if(81==(0|A)){l[g>>2]=866,l[g+4>>2]=3149,l[g+8>>2]=1348,Oe(o,812,g),$e(o),$=0;break}$=(0|a)==(0|$)?0|ne(t):0}else $=0}else r[L+16>>0]=1,$=0}while(0);return ce(L),v=y,0|(L=$)}function W(e,t,i,n){i|=0;var o,s,u,h,f,p,_=0,m=0,g=0,x=0,y=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,D=0,I=0,B=0,F=0;if(p=v,v=v+880|0,B=p+144|0,f=p+128|0,h=p+112|0,u=p+96|0,D=p+80|0,A=p+64|0,E=p+48|0,P=p+32|0,T=p+16|0,b=p,o=p+360|0,s=p+296|0,F=p+224|0,w=p+156|0,0==(0|(t|=0))|(n|=0)>>>0>11)return v=p,0|(F=0);l[(e|=0)>>2]=t,m=(_=F)+68|0;do{l[_>>2]=0,_=_+4|0}while((0|_)<(0|m));_=0;do{m=F+((255&(I=0|r[i+_>>0]))<<2)|0,I<<24>>24&&(l[m>>2]=1+(0|l[m>>2])),_=_+1|0}while((0|_)!=(0|t));for(m=0,g=0,x=0,y=-1,$=1;(_=0|l[F+($<<2)>>2])?(l[s+((C=$+-1|0)<<2)>>2]=m,m=_+m|0,I=16-$|0,l[e+28+(C<<2)>>2]=1+(m+-1<<I|(1<<I)-1),l[e+96+(C<<2)>>2]=g,l[w+($<<2)>>2]=g,C=_+g|0,x=x>>>0>$>>>0?x:$,y=y>>>0<$>>>0?y:$):(l[e+28+($+-1<<2)>>2]=0,C=g),17!=(0|($=$+1|0));)m<<=1,g=C;l[e+4>>2]=C,m=e+172|0;do{if(C>>>0>(0|l[m>>2])>>>0){(_=C+-1|0)&C?(_|=_>>>16,_|=_>>>8,_|=_>>>4,_=(_=1+((_|=_>>>2)>>>1|_)|0)>>>0>t>>>0?t:_):_=C,l[m>>2]=_,_=0|l[(g=e+176|0)>>2];do{if(0|_){if(I=0|l[_+-4>>2],_=_+-8|0,0!=(0|I)&&(0|I)==(0|~l[_>>2])||(l[b>>2]=866,l[b+4>>2]=651,l[b+8>>2]=1579,Oe(o,812,b),$e(o)),7&_){l[T>>2]=866,l[T+4>>2]=2506,l[T+8>>2]=1232,Oe(o,812,T),$e(o);break}_e(_,0,0,1,0);break}}while(0);if(m=0|he(8+((_=0|(_=0|l[m>>2])?_:1)<<1)|0,0)){l[m+4>>2]=_,l[m>>2]=~_,l[g>>2]=m+8,S=24;break}l[g>>2]=0,n=0;break}S=24}while(0);e:do{if(24==(0|S)){r[(I=e+24|0)>>0]=y,r[e+25>>0]=x,g=e+176|0,m=0;do{_=255&(O=0|r[i+m>>0]),O<<24>>24&&(0|l[F+(_<<2)>>2]||(l[P>>2]=866,l[P+4>>2]=2276,l[P+8>>2]=977,Oe(o,812,P),$e(o)),_=0|l[(O=w+(_<<2)|0)>>2],l[O>>2]=_+1,_>>>0>=C>>>0&&(l[E>>2]=866,l[E+4>>2]=2280,l[E+8>>2]=990,Oe(o,812,E),$e(o)),a[(0|l[g>>2])+(_<<1)>>1]=m),m=m+1|0}while((0|m)!=(0|t));if(R=(0|c[I>>0])>>>0<n>>>0?n:0,l[(O=e+8|0)>>2]=R,M=0!=(0|R)){L=1<<R,_=e+164|0;do{if(L>>>0>(0|l[_>>2])>>>0){l[_>>2]=L,_=0|l[(g=e+168|0)>>2];do{if(0|_){if(P=0|l[_+-4>>2],_=_+-8|0,0!=(0|P)&&(0|P)==(0|~l[_>>2])||(l[A>>2]=866,l[A+4>>2]=651,l[A+8>>2]=1579,Oe(o,812,A),$e(o)),7&_){l[D>>2]=866,l[D+4>>2]=2506,l[D+8>>2]=1232,Oe(o,812,D),$e(o);break}_e(_,0,0,1,0);break}}while(0);if(m=0|he((_=L<<2)+8|0,0)){D=m+8|0,l[m+4>>2]=L,l[m>>2]=~L,l[g>>2]=D,m=D;break}l[g>>2]=0,n=0;break e}_=L<<2,g=m=e+168|0,m=0|l[m>>2]}while(0);de(0|m,-1,0|_),E=e+176|0,w=1;do{if(0|l[F+(w<<2)>>2]&&(A=1<<(P=R-w|0),m=0|l[s+((_=w+-1|0)<<2)>>2],_>>>0>=16&&(l[u>>2]=866,l[u+4>>2]=1960,l[u+8>>2]=1453,Oe(o,812,u),$e(o)),m>>>0<=(t=0==(0|(t=0|l[e+28+(_<<2)>>2]))?-1:(t+-1|0)>>>(16-w|0))>>>0)){C=(0|l[e+96+(_<<2)>>2])-m|0,S=w<<16;do{_=0|d[(0|l[E>>2])+(C+m<<1)>>1],(0|c[i+_>>0])!=(0|w)&&(l[h>>2]=866,l[h+4>>2]=2322,l[h+8>>2]=1019,Oe(o,812,h),$e(o)),T=m<<P,$=_|S,y=0;do{(b=y+T|0)>>>0>=L>>>0&&(l[f>>2]=866,l[f+4>>2]=2328,l[f+8>>2]=1053,Oe(o,812,f),$e(o)),_=0|l[g>>2],-1!=(0|l[_+(b<<2)>>2])&&(l[B>>2]=866,l[B+4>>2]=2330,l[B+8>>2]=1076,Oe(o,812,B),$e(o),_=0|l[g>>2]),l[_+(b<<2)>>2]=$,y=y+1|0}while(y>>>0<A>>>0);m=m+1|0}while(m>>>0<=t>>>0)}w=w+1|0}while(R>>>0>=w>>>0)}l[(_=e+96|0)>>2]=(0|l[_>>2])-(0|l[s>>2]),l[(_=e+100|0)>>2]=(0|l[_>>2])-(0|l[s+4>>2]),l[(_=e+104|0)>>2]=(0|l[_>>2])-(0|l[s+8>>2]),l[(_=e+108|0)>>2]=(0|l[_>>2])-(0|l[s+12>>2]),l[(_=e+112|0)>>2]=(0|l[_>>2])-(0|l[s+16>>2]),l[(_=e+116|0)>>2]=(0|l[_>>2])-(0|l[s+20>>2]),l[(_=e+120|0)>>2]=(0|l[_>>2])-(0|l[s+24>>2]),l[(_=e+124|0)>>2]=(0|l[_>>2])-(0|l[s+28>>2]),l[(_=e+128|0)>>2]=(0|l[_>>2])-(0|l[s+32>>2]),l[(_=e+132|0)>>2]=(0|l[_>>2])-(0|l[s+36>>2]),l[(_=e+136|0)>>2]=(0|l[_>>2])-(0|l[s+40>>2]),l[(_=e+140|0)>>2]=(0|l[_>>2])-(0|l[s+44>>2]),l[(_=e+144|0)>>2]=(0|l[_>>2])-(0|l[s+48>>2]),l[(_=e+148|0)>>2]=(0|l[_>>2])-(0|l[s+52>>2]),l[(_=e+152|0)>>2]=(0|l[_>>2])-(0|l[s+56>>2]),l[(_=e+156|0)>>2]=(0|l[_>>2])-(0|l[s+60>>2]),l[(_=e+16|0)>>2]=0,l[(m=e+20|0)>>2]=c[I>>0];t:do{if(M){do{if(!n)break t;B=n,n=n+-1|0}while(!(0|l[F+(B<<2)>>2]));if(l[_>>2]=l[e+28+(n<<2)>>2],n=R+1|0,l[m>>2]=n,n>>>0<=x>>>0){for(;!(0|l[F+(n<<2)>>2]);)if((n=n+1|0)>>>0>x>>>0)break t;l[m>>2]=n}}}while(0);l[e+92>>2]=-1,l[e+160>>2]=1048575,l[e+12>>2]=32-(0|l[O>>2]),n=1}}while(0);return v=p,0|(F=n)}function H(e){var t=0,i=0,n=0,r=0,o=0,a=0,s=0,u=0;if(e|=0){i=e+-8|0,r=0|l[1148],u=i+(t=-8&(e=0|l[e+-4>>2]))|0;do{if(1&e)s=i,a=i;else{if(n=0|l[i>>2],!(3&e)||(o=n+t|0,(a=i+(0-n)|0)>>>0<r>>>0))return;if((0|a)==(0|l[1149])){if(3!=(3&(t=0|l[(e=u+4|0)>>2])|0)){s=a,t=o;break}return l[1146]=o,l[e>>2]=-2&t,l[a+4>>2]=1|o,void(l[a+o>>2]=o)}if(i=n>>>3,n>>>0<256){if(e=0|l[a+8>>2],(0|(t=0|l[a+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<i),s=a,t=o;break}l[e+12>>2]=t,l[t+8>>2]=e,s=a,t=o;break}r=0|l[a+24>>2],e=0|l[a+12>>2];do{if((0|e)==(0|a)){if(!(e=0|l[(t=(i=a+16|0)+4|0)>>2])){if(!(e=0|l[i>>2])){e=0;break}t=i}for(;;)if(0|(n=0|l[(i=e+20|0)>>2]))e=n,t=i;else{if(!(n=0|l[(i=e+16|0)>>2]))break;e=n,t=i}l[t>>2]=0}else s=0|l[a+8>>2],l[s+12>>2]=e,l[e+8>>2]=s}while(0);if(r){if(t=0|l[a+28>>2],(0|a)==(0|l[(i=4880+(t<<2)|0)>>2])){if(l[i>>2]=e,!e){l[1145]=l[1145]&~(1<<t),s=a,t=o;break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|a)&1)<<2)>>2]=e,!e){s=a,t=o;break}l[e+24>>2]=r,0|(i=0|l[(t=a+16|0)>>2])&&(l[e+16>>2]=i,l[i+24>>2]=e),(t=0|l[t+4>>2])?(l[e+20>>2]=t,l[t+24>>2]=e,s=a,t=o):(s=a,t=o)}else s=a,t=o}}while(0);if(!(a>>>0>=u>>>0)&&1&(n=0|l[(e=u+4|0)>>2])){if(2&n)l[e>>2]=-2&n,l[s+4>>2]=1|t,l[a+t>>2]=t,r=t;else{if(e=0|l[1149],(0|u)==(0|l[1150])){if(u=(0|l[1147])+t|0,l[1147]=u,l[1150]=s,l[s+4>>2]=1|u,(0|s)!=(0|e))return;return l[1149]=0,void(l[1146]=0)}if((0|u)==(0|e))return u=(0|l[1146])+t|0,l[1146]=u,l[1149]=a,l[s+4>>2]=1|u,void(l[a+u>>2]=u);r=(-8&n)+t|0,i=n>>>3;do{if(n>>>0<256){if(t=0|l[u+8>>2],(0|(e=0|l[u+12>>2]))==(0|t)){l[1144]=l[1144]&~(1<<i);break}l[t+12>>2]=e,l[e+8>>2]=t;break}o=0|l[u+24>>2],e=0|l[u+12>>2];do{if((0|e)==(0|u)){if(!(e=0|l[(t=(i=u+16|0)+4|0)>>2])){if(!(e=0|l[i>>2])){i=0;break}t=i}for(;;)if(0|(n=0|l[(i=e+20|0)>>2]))e=n,t=i;else{if(!(n=0|l[(i=e+16|0)>>2]))break;e=n,t=i}l[t>>2]=0,i=e}else i=0|l[u+8>>2],l[i+12>>2]=e,l[e+8>>2]=i,i=e}while(0);if(0|o){if(e=0|l[u+28>>2],(0|u)==(0|l[(t=4880+(e<<2)|0)>>2])){if(l[t>>2]=i,!i){l[1145]=l[1145]&~(1<<e);break}}else if(l[o+16+(((0|l[o+16>>2])!=(0|u)&1)<<2)>>2]=i,!i)break;l[i+24>>2]=o,0|(t=0|l[(e=u+16|0)>>2])&&(l[i+16>>2]=t,l[t+24>>2]=i),0|(e=0|l[e+4>>2])&&(l[i+20>>2]=e,l[e+24>>2]=i)}}while(0);if(l[s+4>>2]=1|r,l[a+r>>2]=r,(0|s)==(0|l[1149]))return void(l[1146]=r)}if(e=r>>>3,r>>>0<256)return i=4616+(e<<1<<2)|0,(t=0|l[1144])&(e=1<<e)?e=0|l[(t=i+8|0)>>2]:(l[1144]=t|e,e=i,t=i+8|0),l[t>>2]=s,l[e+12>>2]=s,l[s+8>>2]=e,void(l[s+12>>2]=i);(e=r>>>8)?r>>>0>16777215?e=31:e=r>>>((e=14-((o=((u=e<<(a=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(e=((u<<=o)+245760|0)>>>16&2))+(u<<e>>>15)|0)+7|0)&1|e<<1:e=0,n=4880+(e<<2)|0,l[s+28>>2]=e,l[s+20>>2]=0,l[s+16>>2]=0,t=0|l[1145],i=1<<e;do{if(t&i){for(t=r<<(31==(0|e)?0:25-(e>>>1)|0),i=0|l[n>>2];;){if((-8&l[i+4>>2]|0)==(0|r)){e=73;break}if(!(e=0|l[(n=i+16+(t>>>31<<2)|0)>>2])){e=72;break}t<<=1,i=e}if(72==(0|e)){l[n>>2]=s,l[s+24>>2]=i,l[s+12>>2]=s,l[s+8>>2]=s;break}if(73==(0|e)){u=0|l[(a=i+8|0)>>2],l[u+12>>2]=s,l[a>>2]=s,l[s+8>>2]=u,l[s+12>>2]=i,l[s+24>>2]=0;break}}else l[1145]=t|i,l[n>>2]=s,l[s+24>>2]=n,l[s+12>>2]=s,l[s+8>>2]=s}while(0);if(u=(0|l[1152])-1|0,l[1152]=u,u)return;for(e=5032;e=0|l[e>>2];)e=e+8|0;l[1152]=-1}}}function q(e,t){var i=0,n=0,r=0,o=0,a=0,s=0,u=0;u=(e|=0)+(t|=0)|0,i=0|l[e+4>>2];do{if(1&i)s=e,i=t;else{if(n=0|l[e>>2],!(3&i))return;if(a=n+t|0,(0|(o=e+(0-n)|0))==(0|l[1149])){if(3!=(3&(i=0|l[(e=u+4|0)>>2])|0)){s=o,i=a;break}return l[1146]=a,l[e>>2]=-2&i,l[o+4>>2]=1|a,void(l[o+a>>2]=a)}if(t=n>>>3,n>>>0<256){if(e=0|l[o+8>>2],(0|(i=0|l[o+12>>2]))==(0|e)){l[1144]=l[1144]&~(1<<t),s=o,i=a;break}l[e+12>>2]=i,l[i+8>>2]=e,s=o,i=a;break}r=0|l[o+24>>2],e=0|l[o+12>>2];do{if((0|e)==(0|o)){if(!(e=0|l[(i=(t=o+16|0)+4|0)>>2])){if(!(e=0|l[t>>2])){e=0;break}i=t}for(;;)if(0|(n=0|l[(t=e+20|0)>>2]))e=n,i=t;else{if(!(n=0|l[(t=e+16|0)>>2]))break;e=n,i=t}l[i>>2]=0}else s=0|l[o+8>>2],l[s+12>>2]=e,l[e+8>>2]=s}while(0);if(r){if(i=0|l[o+28>>2],(0|o)==(0|l[(t=4880+(i<<2)|0)>>2])){if(l[t>>2]=e,!e){l[1145]=l[1145]&~(1<<i),s=o,i=a;break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|o)&1)<<2)>>2]=e,!e){s=o,i=a;break}l[e+24>>2]=r,0|(t=0|l[(i=o+16|0)>>2])&&(l[e+16>>2]=t,l[t+24>>2]=e),(i=0|l[i+4>>2])?(l[e+20>>2]=i,l[i+24>>2]=e,s=o,i=a):(s=o,i=a)}else s=o,i=a}}while(0);if(2&(n=0|l[(e=u+4|0)>>2]))l[e>>2]=-2&n,l[s+4>>2]=1|i,l[s+i>>2]=i;else{if(e=0|l[1149],(0|u)==(0|l[1150])){if(u=(0|l[1147])+i|0,l[1147]=u,l[1150]=s,l[s+4>>2]=1|u,(0|s)!=(0|e))return;return l[1149]=0,void(l[1146]=0)}if((0|u)==(0|e))return u=(0|l[1146])+i|0,l[1146]=u,l[1149]=s,l[s+4>>2]=1|u,void(l[s+u>>2]=u);o=(-8&n)+i|0,t=n>>>3;do{if(n>>>0<256){if(i=0|l[u+8>>2],(0|(e=0|l[u+12>>2]))==(0|i)){l[1144]=l[1144]&~(1<<t);break}l[i+12>>2]=e,l[e+8>>2]=i;break}r=0|l[u+24>>2],e=0|l[u+12>>2];do{if((0|e)==(0|u)){if(!(e=0|l[(i=(t=u+16|0)+4|0)>>2])){if(!(e=0|l[t>>2])){t=0;break}i=t}for(;;)if(0|(n=0|l[(t=e+20|0)>>2]))e=n,i=t;else{if(!(n=0|l[(t=e+16|0)>>2]))break;e=n,i=t}l[i>>2]=0,t=e}else t=0|l[u+8>>2],l[t+12>>2]=e,l[e+8>>2]=t,t=e}while(0);if(0|r){if(e=0|l[u+28>>2],(0|u)==(0|l[(i=4880+(e<<2)|0)>>2])){if(l[i>>2]=t,!t){l[1145]=l[1145]&~(1<<e);break}}else if(l[r+16+(((0|l[r+16>>2])!=(0|u)&1)<<2)>>2]=t,!t)break;l[t+24>>2]=r,0|(i=0|l[(e=u+16|0)>>2])&&(l[t+16>>2]=i,l[i+24>>2]=t),0|(e=0|l[e+4>>2])&&(l[t+20>>2]=e,l[e+24>>2]=t)}}while(0);if(l[s+4>>2]=1|o,l[s+o>>2]=o,(0|s)==(0|l[1149]))return void(l[1146]=o);i=o}if(e=i>>>3,i>>>0<256)return t=4616+(e<<1<<2)|0,(i=0|l[1144])&(e=1<<e)?e=0|l[(i=t+8|0)>>2]:(l[1144]=i|e,e=t,i=t+8|0),l[i>>2]=s,l[e+12>>2]=s,l[s+8>>2]=e,void(l[s+12>>2]=t);if((e=i>>>8)?i>>>0>16777215?e=31:e=i>>>((e=14-((o=((u=e<<(a=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(e=((u<<=o)+245760|0)>>>16&2))+(u<<e>>>15)|0)+7|0)&1|e<<1:e=0,r=4880+(e<<2)|0,l[s+28>>2]=e,l[s+20>>2]=0,l[s+16>>2]=0,!((t=0|l[1145])&(n=1<<e)))return l[1145]=t|n,l[r>>2]=s,l[s+24>>2]=r,l[s+12>>2]=s,void(l[s+8>>2]=s);for(t=i<<(31==(0|e)?0:25-(e>>>1)|0),n=0|l[r>>2];;){if((-8&l[n+4>>2]|0)==(0|i)){e=69;break}if(!(e=0|l[(r=n+16+(t>>>31<<2)|0)>>2])){e=68;break}t<<=1,n=e}return 68==(0|e)?(l[r>>2]=s,l[s+24>>2]=n,l[s+12>>2]=s,void(l[s+8>>2]=s)):69==(0|e)?(u=0|l[(a=n+8|0)>>2],l[u+12>>2]=s,l[a>>2]=s,l[s+8>>2]=u,l[s+12>>2]=n,void(l[s+24>>2]=0)):void 0}function j(e,t,i,n,r){r|=0;var o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0,_=0;if(h=e|=0,a=i|=0,s=f=n|=0,!(c=u=t|=0))return o=0!=(0|r),s?o?(l[r>>2]=0|e,l[r+4>>2]=0&t,b=f=0,0|(r=0)):(b=f=0,0|(r=0)):(o&&(l[r>>2]=(h>>>0)%(a>>>0),l[r+4>>2]=0),b=f=0,0|(r=(h>>>0)/(a>>>0)>>>0));o=0==(0|s);do{if(a){if(!o){if((o=(0|C(0|s))-(0|C(0|c))|0)>>>0<=31){a=d=o+1|0,e=h>>>(d>>>0)&(t=o-31>>31)|c<<(s=31-o|0),t&=c>>>(d>>>0),o=0,s=h<<s;break}return r?(l[r>>2]=0|e,l[r+4>>2]=u|0&t,b=f=0,0|(r=0)):(b=f=0,0|(r=0))}if((o=a-1|0)&a|0){a=s=33+(0|C(0|a))-(0|C(0|c))|0,e=(d=32-s|0)-1>>31&c>>>((p=s-32|0)>>>0)|(c<<d|h>>>(s>>>0))&(t=p>>31),t&=c>>>(s>>>0),o=h<<(_=64-s|0)&(u=d>>31),s=(c<<_|h>>>(p>>>0))&u|h<<d&s-33>>31;break}return 0|r&&(l[r>>2]=o&h,l[r+4>>2]=0),1==(0|a)?(b=p=u|0&t,0|(_=0|e)):(_=0|Pe(0|a),b=p=c>>>(_>>>0)|0,0|(_=c<<32-_|h>>>(_>>>0)|0))}if(o)return 0|r&&(l[r>>2]=(c>>>0)%(a>>>0),l[r+4>>2]=0),b=p=0,0|(_=(c>>>0)/(a>>>0)>>>0);if(!h)return 0|r&&(l[r>>2]=0,l[r+4>>2]=(c>>>0)%(s>>>0)),b=p=0,0|(_=(c>>>0)/(s>>>0)>>>0);if(!((o=s-1|0)&s))return 0|r&&(l[r>>2]=0|e,l[r+4>>2]=o&c|0&t),p=0,_=c>>>((0|Pe(0|s))>>>0),b=p,0|_;if((o=(0|C(0|s))-(0|C(0|c))|0)>>>0<=30){a=t=o+1|0,e=c<<(s=31-o|0)|h>>>(t>>>0),t=c>>>(t>>>0),o=0,s=h<<s;break}return r?(l[r>>2]=0|e,l[r+4>>2]=u|0&t,b=p=0,0|(_=0)):(b=p=0,0|(_=0))}while(0);if(a){c=0|Ge(0|(d=0|i),0|(h=f|0&n),-1,-1),i=b,u=s,s=0;do{n=u,u=o>>>31|u<<1,o=s|o<<1,Fe(0|c,0|i,0|(n=e<<1|n>>>31|0),0|(f=e>>>31|t<<1|0)),s=1&(p=(_=b)>>31|((0|_)<0?-1:0)<<1),e=0|Fe(0|n,0|f,p&d|0,(((0|_)<0?-1:0)>>31|((0|_)<0?-1:0)<<1)&h|0),t=b,a=a-1|0}while(0!=(0|a));c=u,u=0}else c=s,u=0,s=0;return a=0,0|r&&(l[r>>2]=e,l[r+4>>2]=t),b=p=(0|o)>>>31|(c|a)<<1|0&(a<<1|o>>>31)|u,0|(_=-2&(o<<1|0)|s)}function X(e,t){e|=0;var i,n,r,o,a,s,u,h,f=0,p=0,_=0,m=0,g=0,x=0;h=v,v=v+576|0,r=h+48|0,a=h+32|0,o=h+16|0,n=h,u=h+64|0,s=0|l[(t|=0)+20>>2],(0|(i=0|l[(x=e+20|0)>>2]))<24?(p=(f=0|l[(g=e+4|0)>>2])>>>0<(_=0|l[e+8>>2])>>>0,(0|i)<16?(p?(m=(0|c[f>>0])<<8,f=f+1|0):m=0,f>>>0<_>>>0?(_=0|c[f>>0],f=f+1|0):_=0,l[g>>2]=f,l[x>>2]=i+16,p=16,f=_|m):(p?(l[g>>2]=f+1,f=0|c[f>>0]):f=0,l[x>>2]=i+8,p=24),_=l[(g=e+16|0)>>2]|f<<p-i,l[g>>2]=_):(g=_=e+16|0,_=0|l[_>>2]),m=1+(_>>>16)|0;do{if(!(m>>>0<=(0|l[s+16>>2])>>>0)){for(p=0|l[s+20>>2];m>>>0>(0|l[s+28+((f=p+-1|0)<<2)>>2])>>>0;)p=p+1|0;if((f=(_>>>(32-p|0))+(0|l[s+96+(f<<2)>>2])|0)>>>0<(0|l[t>>2])>>>0){f=0|d[(0|l[s+176>>2])+(f<<1)>>1];break}return l[r>>2]=866,l[r+4>>2]=3275,l[r+8>>2]=1348,Oe(u,812,r),$e(u),v=h,0|(x=0)}-1==(0|(p=0|l[(0|l[s+168>>2])+(_>>>(32-(0|l[s+8>>2])|0)<<2)>>2]))&&(l[n>>2]=866,l[n+4>>2]=3253,l[n+8>>2]=1393,Oe(u,812,n),$e(u)),f=65535&p,p>>>=16,(0|l[t+8>>2])>>>0<=f>>>0&&(l[o>>2]=866,l[o+4>>2]=909,l[o+8>>2]=1497,Oe(u,812,o),$e(u)),(0|c[(0|l[t+4>>2])+f>>0])!=(0|p)&&(l[a>>2]=866,l[a+4>>2]=3257,l[a+8>>2]=1410,Oe(u,812,a),$e(u))}while(0);return l[g>>2]=l[g>>2]<<p,l[x>>2]=(0|l[x>>2])-p,v=h,0|(x=f)}function Y(e){var t,i,n,o,a,s=0,u=0,c=0;if(a=v,v=v+576|0,c=a+48|0,n=a+32|0,i=a+16|0,t=a,o=a+64|0,l[(e|=0)>>2]=0,0|(u=0|l[(s=e+284|0)>>2])&&(7&u?(l[t>>2]=866,l[t+4>>2]=2506,l[t+8>>2]=1232,Oe(o,812,t),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+288>>2]=0,l[e+292>>2]=0),r[e+296>>0]=0,0|(u=0|l[(s=e+268|0)>>2])&&(7&u?(l[i>>2]=866,l[i+4>>2]=2506,l[i+8>>2]=1232,Oe(o,812,i),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+272>>2]=0,l[e+276>>2]=0),r[e+280>>0]=0,0|(u=0|l[(s=e+252|0)>>2])&&(7&u?(l[n>>2]=866,l[n+4>>2]=2506,l[n+8>>2]=1232,Oe(o,812,n),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+256>>2]=0,l[e+260>>2]=0),r[e+264>>0]=0,!(u=0|l[(s=e+236|0)>>2]))return r[(c=e+248|0)>>0]=0,ce(c=e+212|0),ce(c=e+188|0),ce(c=e+164|0),ce(c=e+140|0),ce(c=e+116|0),void(v=a);7&u?(l[c>>2]=866,l[c+4>>2]=2506,l[c+8>>2]=1232,Oe(o,812,c),$e(o)):_e(u,0,0,1,0),l[s>>2]=0,l[e+240>>2]=0,l[e+244>>2]=0,r[(c=e+248|0)>>0]=0,ce(c=e+212|0),ce(c=e+188|0),ce(c=e+164|0),ce(c=e+140|0),ce(c=e+116|0),v=a}function Z(e,t,i){e|=0,t|=0,i|=0;var n=0,r=0,o=0;e:do{if(t>>>0<=20){switch(0|t){case 9:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[e>>2]=t;break e;case 10:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[(n=e)>>2]=t,l[n+4>>2]=((0|t)<0)<<31>>31;break e;case 11:n=3+(0|l[i>>2])&-4,t=0|l[n>>2],l[i>>2]=n+4,l[(n=e)>>2]=t,l[n+4>>2]=0;break e;case 12:n=7+(0|l[i>>2])&-8,r=0|l[(t=n)>>2],t=0|l[t+4>>2],l[i>>2]=n+8,l[(n=e)>>2]=r,l[n+4>>2]=t;break e;case 13:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,n=(65535&n)<<16>>16,l[(r=e)>>2]=n,l[r+4>>2]=((0|n)<0)<<31>>31;break e;case 14:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,l[(r=e)>>2]=65535&n,l[r+4>>2]=0;break e;case 15:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,n=(255&n)<<24>>24,l[(r=e)>>2]=n,l[r+4>>2]=((0|n)<0)<<31>>31;break e;case 16:r=3+(0|l[i>>2])&-4,n=0|l[r>>2],l[i>>2]=r+4,l[(r=e)>>2]=255&n,l[r+4>>2]=0;break e;case 17:case 18:r=7+(0|l[i>>2])&-8,o=+m[r>>3],l[i>>2]=r+8,m[e>>3]=o;break e;default:break e}}}while(0)}function K(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0;var o,a,s,u,c,h,d=0,f=0,p=0,_=0;if(h=v,v=v+576|0,u=h+48|0,o=h+32|0,f=h+16|0,d=h,s=h+64|0,c=h+60|0,_=(e|=0)+8|0,(0|l[(a=e+4|0)>>2])>>>0>(0|l[_>>2])>>>0&&(l[d>>2]=866,l[d+4>>2]=2123,l[d+8>>2]=845,Oe(s,812,d),$e(s)),(2147418112/(n>>>0)|0)>>>0<=t>>>0&&(l[f>>2]=866,l[f+4>>2]=2124,l[f+8>>2]=885,Oe(s,812,f),$e(s)),(d=0|l[_>>2])>>>0>=t>>>0)return v=h,0|(_=1);if(i&&0!=((p=t+-1|0)&t|0)?(t=p>>>16|p,t|=t>>>8,t|=t>>>4,(t=1+((t|=t>>>2)>>>1|t)|0)?i=9:(t=0,i=10)):i=9,9==(0|i)&&t>>>0<=d>>>0&&(i=10),10==(0|i)&&(l[o>>2]=866,l[o+4>>2]=2133,l[o+8>>2]=933,Oe(s,812,o),$e(s)),p=0|T(t,n),r)if(f=0|he(p,c)){ct[0&r](f,0|l[e>>2],0|l[a>>2]),d=0|l[e>>2];do{if(0|d){if(7&d){l[u>>2]=866,l[u+4>>2]=2506,l[u+8>>2]=1232,Oe(s,812,u),$e(s);break}_e(d,0,0,1,0);break}}while(0);l[e>>2]=f,i=20}else t=0;else d=0|function(e,t,i,n){t|=0,i|=0,n|=0;var r=0,o=0,a=0,s=0,u=0,c=0;return c=v,v=v+560|0,u=c+32|0,o=c+16|0,r=c,a=c+48|0,s=c+44|0,7&(e|=0)|0?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1210,Oe(a,812,r),$e(a),v=c,0|(u=0)):t>>>0>2147418112?(l[o>>2]=866,l[o+4>>2]=2506,l[o+8>>2]=1103,Oe(a,812,o),$e(a),v=c,0|(u=0)):(l[s>>2]=t,e=0|_e(e,t,s,n,0),0|i&&(l[i>>2]=l[s>>2]),7&e|0&&(l[u>>2]=866,l[u+4>>2]=2558,l[u+8>>2]=1156,Oe(a,812,u),$e(a)),v=c,0|(u=e))}(0|l[e>>2],p,c,1),d?(l[e>>2]=d,i=20):t=0;return 20==(0|i)&&((d=0|l[c>>2])>>>0>p>>>0&&(t=(d>>>0)/(n>>>0)|0),l[_>>2]=t,t=1),v=h,0|(_=t)}function Q(e,t,i,n,o,a,s){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0;var u=0,h=0,f=0,p=0;if(p=0|l[(e|=0)+88>>2],h=(((h=(c[p+12>>0]<<8|c[p+13>>0])>>>s)>>>0>1?h:1)+3|0)>>>2,f=(((f=(c[p+14>>0]<<8|c[p+15>>0])>>>s)>>>0>1?f:1)+3|0)>>>2,s=0|r[(p=p+18|0)>>0],s=0|T(h,s<<24>>24==0|s<<24>>24==9?8:16),a){if(!(0==(3&a|0)&s>>>0<=a>>>0))return 0|(o=0);s=a}if((0|T(s,f))>>>0>o>>>0||(a=(h+1|0)>>>1,u=(f+1|0)>>>1,!i))return 0|(o=0);switch(l[e+92>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,0|r[p>>0]){case 0:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,d,f,p,_,m,g,x,y,$,b,C,S,w,E,P,A,L,M,R,O,D,I,B,F,N,G,z,U,V,k,W,H=0,q=0,j=0,Y=0,Z=0,K=0,Q=0,J=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0;if(W=v,v=v+656|0,V=W+112|0,z=W+96|0,G=W+80|0,N=W+64|0,F=W+48|0,k=W+32|0,U=W+16|0,B=W,D=W+144|0,I=W+128|0,w=0|l[(S=240+(e|=0)|0)>>2],P=0|l[(E=e+256|0)>>2],A=255&(se=0|r[17+(0|l[e+88>>2])>>0]),!(se<<24>>24))return v=W,1;M=0==(0|u),O=(R=s+-1|0)<<4,se=u+-1|0,g=0!=(1&a|0),x=n<<1,y=e+92|0,$=e+116|0,b=e+140|0,C=e+236|0,m=0!=(1&o|0),_=e+188|0,h=e+252|0,d=1+(L=n>>>2)|0,f=L+2|0,p=L+3|0,ae=0,a=0,i=0,o=1;do{if(!M)for(re=0|l[t+(ae<<2)>>2],oe=0;;){if(q=0==(0|(ie=1&oe)),te=(ie<<5^32)-16|0,ie=(ie<<1^2)-1|0,ne=g&(e=(0|oe)==(0|se)),(0|(H=q?0:R))!=(0|(ee=q?s:-1)))for(J=g&e^1,Q=q?re:re+O|0;;){1==(0|o)&&(o=512|X(y,$)),K=7&o,o>>>=3,q=0|c[1539+K>>0],e=0;do{i=(Z=(Y=(j=(0|X(y,b))+i|0)-w|0)>>31)&j|Y&~Z,(0|l[S>>2])>>>0<=i>>>0&&(l[B>>2]=866,l[B+4>>2]=910,l[B+8>>2]=1497,Oe(D,812,B),$e(D)),l[I+(e<<2)>>2]=l[(0|l[C>>2])+(i<<2)>>2],e=e+1|0}while(e>>>0<q>>>0);if(ne|(Z=m&(0|H)==(0|R))){Y=0;do{e=Q+(0|T(Y,n))|0,j=0==(0|Y)|J,q=Y<<1,a=(a=(le=(ue=(0|X(y,_))+a|0)-P|0)>>31)&ue|le&~a;do{if(Z){if(!j){a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a;break}l[e>>2]=l[I+((0|c[1547+(K<<2)+q>>0])<<2)>>2],(0|l[E>>2])>>>0<=a>>>0&&(l[z>>2]=866,l[z+4>>2]=910,l[z+8>>2]=1497,Oe(D,812,z),$e(D)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2],a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a}else j&&(l[e>>2]=l[I+((0|c[1547+(K<<2)+q>>0])<<2)>>2],(0|l[E>>2])>>>0<=a>>>0&&(l[G>>2]=866,l[G+4>>2]=910,l[G+8>>2]=1497,Oe(D,812,G),$e(D)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2]),e=e+8|0,a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a,j&&(l[e>>2]=l[I+((0|c[1547+(K<<2)+(1|q)>>0])<<2)>>2],(0|l[E>>2])>>>0<=a>>>0&&(l[V>>2]=866,l[V+4>>2]=910,l[V+8>>2]=1497,Oe(D,812,V),$e(D)),l[e+4>>2]=l[(0|l[h>>2])+(a<<2)>>2])}while(0);Y=Y+1|0}while(2!=(0|Y))}else l[Q>>2]=l[I+((0|c[1547+(K<<2)>>0])<<2)>>2],a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[U>>2]=866,l[U+4>>2]=910,l[U+8>>2]=1497,Oe(D,812,U),$e(D)),l[Q+4>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[Q+8>>2]=l[I+((0|c[1547+(K<<2)+1>>0])<<2)>>2],a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[k>>2]=866,l[k+4>>2]=910,l[k+8>>2]=1497,Oe(D,812,k),$e(D)),l[Q+12>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[Q+(L<<2)>>2]=l[I+((0|c[1547+(K<<2)+2>>0])<<2)>>2],a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[F>>2]=866,l[F+4>>2]=910,l[F+8>>2]=1497,Oe(D,812,F),$e(D)),l[Q+(d<<2)>>2]=l[(0|l[h>>2])+(a<<2)>>2],l[Q+(f<<2)>>2]=l[I+((0|c[1547+(K<<2)+3>>0])<<2)>>2],a=(a=(ue=(le=(0|X(y,_))+a|0)-P|0)>>31)&le|ue&~a,(0|l[E>>2])>>>0<=a>>>0&&(l[N>>2]=866,l[N+4>>2]=910,l[N+8>>2]=1497,Oe(D,812,N),$e(D)),l[Q+(p<<2)>>2]=l[(0|l[h>>2])+(a<<2)>>2];if((0|(H=ie+H|0))==(0|ee))break;Q=Q+te|0}if((0|(oe=oe+1|0))==(0|u))break;re=re+x|0}ae=ae+1|0}while((0|ae)!=(0|A));return v=W,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 4:case 6:case 5:case 3:case 2:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,g,x,y,$,b,T,C,S,w,E,P,A,L,M,R,O,D,I,B,F,N,G,z,U,V,k,W,H,q,j,Y=0,Z=0,K=0,Q=0,J=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0,ce=0,he=0,de=0,fe=0,pe=0,_e=0,me=0;if(j=v,v=v+640|0,W=j+80|0,k=j+64|0,V=j+48|0,q=j+32|0,H=j+16|0,U=j,G=j+128|0,z=j+112|0,g=j+96|0,y=0|l[(x=240+(e|=0)|0)>>2],b=0|l[($=e+256|0)>>2],C=0|l[(T=e+272|0)>>2],me=0|l[e+88>>2],S=(0|c[me+63>>0])<<8|0|c[me+64>>0],w=255&(me=0|r[me+17>>0]),!(me<<24>>24))return v=j,1;E=0==(0|u),A=(P=s+-1|0)<<5,L=u+-1|0,M=n<<1,R=e+92|0,O=e+116|0,D=e+164|0,I=e+268|0,B=e+140|0,F=e+236|0,N=e+212|0,me=e+188|0,m=0==(1&o|0),_=0==(1&a|0),f=e+288|0,p=e+284|0,h=e+252|0,_e=0,e=0,a=0,o=0,i=0,Y=1;do{if(!E)for(fe=0|l[t+(_e<<2)>>2],pe=0;;){if(K=0==(0|(de=1&pe)),he=(de<<6^64)-32|0,de=(de<<1^2)-1|0,(0|(Z=K?0:P))!=(0|(ue=K?s:-1)))for(ce=_|(0|pe)!=(0|L),le=K?fe:fe+A|0;;){1==(0|Y)&&(Y=512|X(R,O)),se=7&Y,Y>>>=3,Q=0|c[1539+se>>0],K=0;do{a=(ae=(oe=(re=(0|X(R,D))+a|0)-C|0)>>31)&re|oe&~ae,(0|l[T>>2])>>>0<=a>>>0&&(l[U>>2]=866,l[U+4>>2]=910,l[U+8>>2]=1497,Oe(G,812,U),$e(G)),l[g+(K<<2)>>2]=d[(0|l[I>>2])+(a<<1)>>1],K=K+1|0}while(K>>>0<Q>>>0);K=0;do{i=(ae=(oe=(re=(0|X(R,B))+i|0)-y|0)>>31)&re|oe&~ae,(0|l[x>>2])>>>0<=i>>>0&&(l[H>>2]=866,l[H+4>>2]=910,l[H+8>>2]=1497,Oe(G,812,H),$e(G)),l[z+(K<<2)>>2]=l[(0|l[F>>2])+(i<<2)>>2],K=K+1|0}while(K>>>0<Q>>>0);for(ae=m|(0|Z)!=(0|P),re=0,oe=le;;){if(te=ce|0==(0|re),ie=re<<1,ae)for(J=0,ee=oe;e=(e=(Q=(ne=(0|X(R,N))+e|0)-S|0)>>31)&ne|Q&~e,o=(o=(ne=(Q=(0|X(R,me))+o|0)-b|0)>>31)&Q|ne&~o,te&&(K=0|c[J+ie+(1547+(se<<2))>>0],Q=3*e|0,(0|l[f>>2])>>>0<=Q>>>0&&(l[q>>2]=866,l[q+4>>2]=910,l[q+8>>2]=1497,Oe(G,812,q),$e(G)),ne=(0|l[p>>2])+(Q<<1)|0,l[ee>>2]=(0|d[ne>>1])<<16|l[g+(K<<2)>>2],l[ee+4>>2]=(0|d[ne+4>>1])<<16|0|d[ne+2>>1],l[ee+8>>2]=l[z+(K<<2)>>2],(0|l[$>>2])>>>0<=o>>>0&&(l[V>>2]=866,l[V+4>>2]=910,l[V+8>>2]=1497,Oe(G,812,V),$e(G)),l[ee+12>>2]=l[(0|l[h>>2])+(o<<2)>>2]),2!=(0|(J=J+1|0));)ee=ee+16|0;else for(ne=1^te,te=1547+(se<<2)+ie|0,J=0,ee=oe;e=(e=(Q=(ie=(0|X(R,N))+e|0)-S|0)>>31)&ie|Q&~e,o=(o=(ie=(Q=(0|X(R,me))+o|0)-b|0)>>31)&Q|ie&~o,0!=(0|J)|ne||(K=0|c[te>>0],Q=3*e|0,(0|l[f>>2])>>>0<=Q>>>0&&(l[k>>2]=866,l[k+4>>2]=910,l[k+8>>2]=1497,Oe(G,812,k),$e(G)),ie=(0|l[p>>2])+(Q<<1)|0,l[ee>>2]=(0|d[ie>>1])<<16|l[g+(K<<2)>>2],l[ee+4>>2]=(0|d[ie+4>>1])<<16|0|d[ie+2>>1],l[ee+8>>2]=l[z+(K<<2)>>2],(0|l[$>>2])>>>0<=o>>>0&&(l[W>>2]=866,l[W+4>>2]=910,l[W+8>>2]=1497,Oe(G,812,W),$e(G)),l[ee+12>>2]=l[(0|l[h>>2])+(o<<2)>>2]),2!=(0|(J=J+1|0));)ee=ee+16|0;if(2==(0|(re=re+1|0)))break;oe=oe+n|0}if((0|(Z=de+Z|0))==(0|ue))break;le=le+he|0}if((0|(pe=pe+1|0))==(0|u))break;fe=fe+M|0}_e=_e+1|0}while((0|_e)!=(0|w));return v=j,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 9:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,g,x,y,$,b,T,C,S,w,E,P,A,L,M,R,O,D,I,B,F=0,N=0,G=0,z=0,U=0,V=0,k=0,W=0,H=0,q=0,j=0,Y=0,Z=0,K=0,Q=0,J=0,ee=0,te=0;if(B=v,v=v+592|0,O=B+48|0,I=B+32|0,D=B+16|0,R=B,L=B+80|0,M=B+64|0,g=0|l[(m=272+(e|=0)|0)>>2],te=0|l[e+88>>2],x=(0|c[te+63>>0])<<8|0|c[te+64>>0],y=255&(te=0|r[te+17>>0]),!(te<<24>>24))return v=B,1;$=0==(0|u),T=(b=s+-1|0)<<4,C=u+-1|0,S=n<<1,w=e+92|0,E=e+116|0,P=e+164|0,A=e+268|0,te=e+212|0,_=0==(1&o|0),p=0==(1&a|0),f=e+288|0,h=e+284|0,ee=0,o=0,i=0,a=1;do{if(!$)for(Q=0|l[t+(ee<<2)>>2],J=0;;){if(F=0==(0|(K=1&J)),Z=(K<<5^32)-16|0,K=(K<<1^2)-1|0,(0|(e=F?0:b))!=(0|(j=F?s:-1)))for(Y=p|(0|J)!=(0|C),q=F?Q:Q+T|0;;){1==(0|a)&&(a=512|X(w,E)),H=7&a,a>>>=3,N=0|c[1539+H>>0],F=0;do{i=(W=(k=(V=(0|X(w,P))+i|0)-g|0)>>31)&V|k&~W,(0|l[m>>2])>>>0<=i>>>0&&(l[R>>2]=866,l[R+4>>2]=910,l[R+8>>2]=1497,Oe(L,812,R),$e(L)),l[M+(F<<2)>>2]=d[(0|l[A>>2])+(i<<1)>>1],F=F+1|0}while(F>>>0<N>>>0);for(W=_|(0|e)!=(0|b),V=0,k=q;U=Y|0==(0|V),N=V<<1,z=(z=(G=(F=(0|X(w,te))+o|0)-x|0)>>31)&F|G&~z,W?(U&&(o=0|c[1547+(H<<2)+N>>0],F=3*z|0,(0|l[f>>2])>>>0<=F>>>0&&(l[D>>2]=866,l[D+4>>2]=910,l[D+8>>2]=1497,Oe(L,812,D),$e(L)),G=(0|l[h>>2])+(F<<1)|0,l[k>>2]=(0|d[G>>1])<<16|l[M+(o<<2)>>2],l[k+4>>2]=(0|d[G+4>>1])<<16|0|d[G+2>>1]),G=k+8|0,o=(o=(z=(F=(0|X(w,te))+z|0)-x|0)>>31)&F|z&~o,U&&(F=0|c[1547+(H<<2)+(1|N)>>0],N=3*o|0,(0|l[f>>2])>>>0<=N>>>0&&(l[O>>2]=866,l[O+4>>2]=910,l[O+8>>2]=1497,Oe(L,812,O),$e(L)),U=(0|l[h>>2])+(N<<1)|0,l[G>>2]=(0|d[U>>1])<<16|l[M+(F<<2)>>2],l[k+12>>2]=(0|d[U+4>>1])<<16|0|d[U+2>>1])):(U&&(o=0|c[1547+(H<<2)+N>>0],F=3*z|0,(0|l[f>>2])>>>0<=F>>>0&&(l[I>>2]=866,l[I+4>>2]=910,l[I+8>>2]=1497,Oe(L,812,I),$e(L)),U=(0|l[h>>2])+(F<<1)|0,l[k>>2]=(0|d[U>>1])<<16|l[M+(o<<2)>>2],l[k+4>>2]=(0|d[U+4>>1])<<16|0|d[U+2>>1]),o=(o=(U=(z=(0|X(w,te))+z|0)-x|0)>>31)&z|U&~o),2!=(0|(V=V+1|0));)k=k+n|0;if((0|(e=K+e|0))==(0|j))break;q=q+Z|0}if((0|(J=J+1|0))==(0|u))break;Q=Q+S|0}ee=ee+1|0}while((0|ee)!=(0|y));return v=B,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;case 8:case 7:if(!(0|function(e,t,i,n,o,a,s,u){t|=0,i|=0,n|=0,o|=0,a|=0,s|=0,u|=0;var h,f,p,_,m,g,x,y,$,b,T,C,S,w,E,P,A,L,M,R,O,D,I,B,F,N,G,z=0,U=0,V=0,k=0,W=0,H=0,q=0,j=0,Y=0,Z=0,K=0,Q=0,J=0,ee=0,te=0,ie=0,ne=0,re=0,oe=0,ae=0,se=0,le=0,ue=0,ce=0,he=0;if(G=v,v=v+640|0,B=G+80|0,I=G+64|0,D=G+48|0,N=G+32|0,F=G+16|0,O=G,M=G+128|0,R=G+112|0,m=G+96|0,x=0|l[(g=272+(e|=0)|0)>>2],he=0|l[e+88>>2],y=(0|c[he+63>>0])<<8|0|c[he+64>>0],$=255&(he=0|r[he+17>>0]),!(he<<24>>24))return v=G,1;b=0==(0|u),C=(T=s+-1|0)<<5,S=u+-1|0,w=n<<1,E=e+92|0,P=e+116|0,A=e+164|0,L=e+268|0,he=e+212|0,_=0==(1&o|0),p=0==(1&a|0),f=e+288|0,h=e+284|0,ce=0,e=0,a=0,o=0,i=0,z=1;do{if(!b)for(le=0|l[t+(ce<<2)>>2],ue=0;;){if(V=0==(0|(se=1&ue)),ae=(se<<6^64)-32|0,se=(se<<1^2)-1|0,(0|(U=V?0:T))!=(0|(re=V?s:-1)))for(oe=p|(0|ue)!=(0|S),ne=V?le:le+C|0;;){1==(0|z)&&(z=512|X(E,P)),ie=7&z,z>>>=3,k=0|c[1539+ie>>0],V=0;do{i=(te=(ee=(J=(0|X(E,A))+i|0)-x|0)>>31)&J|ee&~te,(0|l[g>>2])>>>0<=i>>>0&&(l[O>>2]=866,l[O+4>>2]=910,l[O+8>>2]=1497,Oe(M,812,O),$e(M)),l[R+(V<<2)>>2]=d[(0|l[L>>2])+(i<<1)>>1],V=V+1|0}while(V>>>0<k>>>0);V=0;do{a=(te=(ee=(J=(0|X(E,A))+a|0)-x|0)>>31)&J|ee&~te,(0|l[g>>2])>>>0<=a>>>0&&(l[F>>2]=866,l[F+4>>2]=910,l[F+8>>2]=1497,Oe(M,812,F),$e(M)),l[m+(V<<2)>>2]=d[(0|l[L>>2])+(a<<1)>>1],V=V+1|0}while(V>>>0<k>>>0);for(te=_|(0|U)!=(0|T),J=0,ee=ne;;){if(Z=oe|0==(0|J),K=J<<1,te)for(j=0,Y=ee;o=(o=(q=(Q=(0|X(E,he))+o|0)-y|0)>>31)&Q|q&~o,e=(e=(Q=(q=(0|X(E,he))+e|0)-y|0)>>31)&q|Q&~e,Z&&(q=0|c[j+K+(1547+(ie<<2))>>0],k=3*o|0,(V=0|l[f>>2])>>>0<=k>>>0&&(l[N>>2]=866,l[N+4>>2]=910,l[N+8>>2]=1497,Oe(M,812,N),$e(M),V=0|l[f>>2]),k=(W=0|l[h>>2])+(k<<1)|0,V>>>0>(H=3*e|0)>>>0?V=W:(l[D>>2]=866,l[D+4>>2]=910,l[D+8>>2]=1497,Oe(M,812,D),$e(M),V=0|l[h>>2]),Q=V+(H<<1)|0,l[Y>>2]=(0|d[k>>1])<<16|l[R+(q<<2)>>2],l[Y+4>>2]=(0|d[k+4>>1])<<16|0|d[k+2>>1],l[Y+8>>2]=(0|d[Q>>1])<<16|l[m+(q<<2)>>2],l[Y+12>>2]=(0|d[Q+4>>1])<<16|0|d[Q+2>>1]),2!=(0|(j=j+1|0));)Y=Y+16|0;else for(Q=1^Z,Z=1547+(ie<<2)+K|0,j=0,Y=ee;o=(o=(q=(K=(0|X(E,he))+o|0)-y|0)>>31)&K|q&~o,e=(e=(K=(q=(0|X(E,he))+e|0)-y|0)>>31)&q|K&~e,0!=(0|j)|Q||(q=0|c[Z>>0],k=3*o|0,(V=0|l[f>>2])>>>0<=k>>>0&&(l[I>>2]=866,l[I+4>>2]=910,l[I+8>>2]=1497,Oe(M,812,I),$e(M),V=0|l[f>>2]),k=(W=0|l[h>>2])+(k<<1)|0,V>>>0>(H=3*e|0)>>>0?V=W:(l[B>>2]=866,l[B+4>>2]=910,l[B+8>>2]=1497,Oe(M,812,B),$e(M),V=0|l[h>>2]),K=V+(H<<1)|0,l[Y>>2]=(0|d[k>>1])<<16|l[R+(q<<2)>>2],l[Y+4>>2]=(0|d[k+4>>1])<<16|0|d[k+2>>1],l[Y+8>>2]=(0|d[K>>1])<<16|l[m+(q<<2)>>2],l[Y+12>>2]=(0|d[K+4>>1])<<16|0|d[K+2>>1]),2!=(0|(j=j+1|0));)Y=Y+16|0;if(2==(0|(J=J+1|0)))break;ee=ee+n|0}if((0|(U=se+U|0))==(0|re))break;ne=ne+ae|0}if((0|(ue=ue+1|0))==(0|u))break;le=le+w|0}ce=ce+1|0}while((0|ce)!=(0|$));return v=G,1}(e,n,o,s,h,f,a,u)))return 0|(o=0);break;default:return 0|(o=0)}return 0|(o=1)}function J(e,t,i){e|=0,t|=0;var n,o,a=0;if((0|(i|=0))>=8192)return 0|B(0|e,0|t,0|i);if(o=0|e,n=e+i|0,(3&e)==(3&t)){for(;3&e;){if(!i)return 0|o;r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0,i=i-1|0}for(a=(i=-4&n|0)-64|0;(0|e)<=(0|a);)l[e>>2]=l[t>>2],l[e+4>>2]=l[t+4>>2],l[e+8>>2]=l[t+8>>2],l[e+12>>2]=l[t+12>>2],l[e+16>>2]=l[t+16>>2],l[e+20>>2]=l[t+20>>2],l[e+24>>2]=l[t+24>>2],l[e+28>>2]=l[t+28>>2],l[e+32>>2]=l[t+32>>2],l[e+36>>2]=l[t+36>>2],l[e+40>>2]=l[t+40>>2],l[e+44>>2]=l[t+44>>2],l[e+48>>2]=l[t+48>>2],l[e+52>>2]=l[t+52>>2],l[e+56>>2]=l[t+56>>2],l[e+60>>2]=l[t+60>>2],e=e+64|0,t=t+64|0;for(;(0|e)<(0|i);)l[e>>2]=l[t>>2],e=e+4|0,t=t+4|0}else for(i=n-4|0;(0|e)<(0|i);)r[e>>0]=0|r[t>>0],r[e+1>>0]=0|r[t+1>>0],r[e+2>>0]=0|r[t+2>>0],r[e+3>>0]=0|r[t+3>>0],e=e+4|0,t=t+4|0;for(;(0|e)<(0|n);)r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0;return 0|o}function ee(e,t,i){t|=0,i|=0;var n,r,o,a,s,u=0,c=0,h=0,d=0,f=0,p=0;s=v,v=v+48|0,a=s+16|0,h=s,c=s+32|0,u=0|l[(r=(e|=0)+28|0)>>2],l[c>>2]=u,u=(0|l[(o=e+20|0)>>2])-u|0,l[c+4>>2]=u,l[c+8>>2]=t,l[c+12>>2]=i,u=u+i|0,n=e+60|0,l[h>>2]=l[n>>2],l[h+4>>2]=c,l[h+8>>2]=2,h=0|ze(0|G(146,0|h));e:do{if((0|u)!=(0|h)){for(t=2;!((0|h)<0);)if(u=u-h|0,t=((f=h>>>0>(p=0|l[c+4>>2])>>>0)<<31>>31)+t|0,p=h-(f?p:0)|0,l[(c=f?c+8|0:c)>>2]=(0|l[c>>2])+p,l[(f=c+4|0)>>2]=(0|l[f>>2])-p,l[a>>2]=l[n>>2],l[a+4>>2]=c,l[a+8>>2]=t,(0|u)==(0|(h=0|ze(0|G(146,0|a))))){d=3;break e}l[e+16>>2]=0,l[r>>2]=0,l[o>>2]=0,l[e>>2]=32|l[e>>2],i=2==(0|t)?0:i-(0|l[c+4>>2])|0}else d=3}while(0);return 3==(0|d)&&(p=0|l[e+44>>2],l[e+16>>2]=p+(0|l[e+48>>2]),l[r>>2]=p,l[o>>2]=p),v=s,0|i}function te(e,t,i){e|=0,t|=0,i|=0;var n,o,a,s,u,c=0,h=0,d=0,f=0,p=0,_=0,m=0;u=v,v=v+224|0,n=u+120|0,a=u,s=u+136|0,h=(c=o=u+80|0)+40|0;do{l[c>>2]=0,c=c+4|0}while((0|c)<(0|h));return l[n>>2]=l[i>>2],(0|V(0,t,n,a,o))<0?i=-1:(l[e+76>>2],m=32&(i=0|l[e>>2]),(0|r[e+74>>0])<1&&(l[e>>2]=-33&i),0|l[(c=e+48|0)>>2]?i=0|V(e,t,n,a,o):(d=0|l[(h=e+44|0)>>2],l[h>>2]=s,l[(f=e+28|0)>>2]=s,l[(p=e+20|0)>>2]=s,l[c>>2]=80,l[(_=e+16|0)>>2]=s+80,i=0|V(e,t,n,a,o),d&&(at[7&l[e+36>>2]](e,0,0),i=0==(0|l[p>>2])?-1:i,l[h>>2]=d,l[c>>2]=0,l[_>>2]=0,l[f>>2]=0,l[p>>2]=0)),c=0|l[e>>2],l[e>>2]=c|m,i=0==(32&c|0)?i:-1),v=u,0|i}function ie(e,t,i,n){t|=0,i|=0,n|=0;var o,s,u,c,h,d,f,p=0,_=0;f=v,v=v+64|0,h=f,_=0|l[(e|=0)>>2],d=e+(0|l[_+-8>>2])|0,_=0|l[_+-4>>2],l[h>>2]=i,l[h+4>>2]=e,l[h+8>>2]=t,l[h+12>>2]=n,t=h+20|0,n=h+24|0,o=h+28|0,s=h+32|0,u=h+40|0,c=(p=e=h+16|0)+36|0;do{l[p>>2]=0,p=p+4|0}while((0|p)<(0|c));a[e+36>>1]=0,r[e+38>>0]=0;e:do{if(0|He(_,i))l[h+48>>2]=1,dt[3&l[20+(0|l[_>>2])>>2]](_,h,d,d,1,0),e=1==(0|l[n>>2])?d:0;else{switch(st[3&l[24+(0|l[_>>2])>>2]](_,h,d,1,0),0|l[h+36>>2]){case 0:e=1==(0|l[u>>2])&1==(0|l[o>>2])&1==(0|l[s>>2])?0|l[t>>2]:0;break e;case 1:break;default:e=0;break e}if(1!=(0|l[n>>2])&&!(0==(0|l[u>>2])&1==(0|l[o>>2])&1==(0|l[s>>2]))){e=0;break}e=0|l[e>>2]}}while(0);return v=f,0|e}function ne(e){var t,i=0,n=0,r=0,o=0,a=0,s=0,u=0;if(t=v,v=v+544|0,s=t+16|0,i=t,o=t+32|0,((n=0|l[(a=(e|=0)+8|0)>>2])+-1|0)>>>0>=8192&&(l[i>>2]=866,l[i+4>>2]=3006,l[i+8>>2]=1257,Oe(o,812,i),$e(o)),l[e>>2]=n,(i=0|l[(r=e+20|0)>>2])?u=n:((i=0|he(180,0))?(l[(u=i+164|0)>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0):i=0,l[r>>2]=i,u=0|l[e>>2]),0|l[a>>2]?s=u:(l[s>>2]=866,l[s+4>>2]=910,l[s+8>>2]=1497,Oe(o,812,s),$e(o),s=0|l[e>>2]),o=0|l[e+4>>2],!(s>>>0>16))return e=0|W(i,u,o,e=0),v=t,0|e;for(n=s,r=0;a=r+1|0,n>>>0>3;)n>>>=1,r=a;return e=0|W(i,u,o,e=255&((e=r+2+(32!=(0|a)&1<<a>>>0<s>>>0&1)|0)>>>0<11?e:11)),v=t,0|e}function re(e){var t,i,n,r,o,a,s=0,u=0;a=v,v=v+576|0,r=a+48|0,o=a+32|0,i=a+16|0,t=a,n=a+64|0,s=0|l[(e|=0)+168>>2];do{if(0|s){if(u=0|l[s+-4>>2],s=s+-8|0,0!=(0|u)&&(0|u)==(0|~l[s>>2])||(l[t>>2]=866,l[t+4>>2]=651,l[t+8>>2]=1579,Oe(n,812,t),$e(n)),7&s){l[i>>2]=866,l[i+4>>2]=2506,l[i+8>>2]=1232,Oe(n,812,i),$e(n);break}_e(s,0,0,1,0);break}}while(0);if(s=0|l[e+176>>2])return u=0|l[s+-4>>2],s=s+-8|0,0!=(0|u)&&(0|u)==(0|~l[s>>2])||(l[o>>2]=866,l[o+4>>2]=651,l[o+8>>2]=1579,Oe(n,812,o),$e(n)),7&s?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1232,Oe(n,812,r),$e(n),void(v=a)):(_e(s,0,0,1,0),void(v=a));v=a}function oe(e,t,i){var n=0;return!(0!=(0|(e|=0))&(t|=0)>>>0>73&0!=(0|(i|=0)))||40!=(0|l[i>>2])||18552!=((0|c[e>>0])<<8|0|c[e+1>>0]|0)||((0|c[e+2>>0])<<8|0|c[e+3>>0])>>>0<74||((0|c[e+7>>0])<<16|(0|c[e+6>>0])<<24|(0|c[e+8>>0])<<8|0|c[e+9>>0])>>>0>t>>>0?0|(i=0):(l[i+4>>2]=(0|c[e+12>>0])<<8|0|c[e+13>>0],l[i+8>>2]=(0|c[e+14>>0])<<8|0|c[e+15>>0],l[i+12>>2]=c[e+16>>0],l[i+16>>2]=c[e+17>>0],t=e+18|0,l[(n=i+32|0)>>2]=c[t>>0],l[n+4>>2]=0,t=0|r[t>>0],l[i+20>>2]=t<<24>>24==0|t<<24>>24==9?8:16,l[i+24>>2]=(0|c[e+26>>0])<<16|(0|c[e+25>>0])<<24|(0|c[e+27>>0])<<8|0|c[e+28>>0],l[i+28>>2]=(0|c[e+30>>0])<<16|(0|c[e+29>>0])<<24|(0|c[e+31>>0])<<8|0|c[e+32>>0],0|(i=1))}function ae(e,t){e|=0;var i,n,r,o=0,a=0,s=0,u=0,h=0;if(r=v,v=v+544|0,h=r+16|0,o=r,u=r+32|0,(t|=0)>>>0>=33&&(l[o>>2]=866,l[o+4>>2]=3199,l[o+8>>2]=1350,Oe(u,812,o),$e(u)),(0|(o=0|l[(n=e+20|0)>>2]))>=(0|t))return s=a=e+16|0,u=o,h=(a=0|l[a>>2])>>>(h=32-t|0),a<<=t,l[s>>2]=a,t=u-t|0,l[n>>2]=t,v=r,0|h;a=e+4|0,s=e+8|0,i=e+16|0;do{(0|(e=0|l[a>>2]))==(0|l[s>>2])?e=0:(l[a>>2]=e+1,e=0|c[e>>0]),o=o+8|0,l[n>>2]=o,(0|o)>=33&&(l[h>>2]=866,l[h+4>>2]=3208,l[h+8>>2]=1366,Oe(u,812,h),$e(u),o=0|l[n>>2]),e=e<<32-o|l[i>>2],l[i>>2]=e}while((0|o)<(0|t));return h=e>>>(h=32-t|0),u=e<<t,l[i>>2]=u,t=o-t|0,l[n>>2]=t,v=r,0|h}function se(e,t,i){e|=0;var n=0,o=0,a=0,s=0;a=255&(t|=0),n=0!=(0|(i|=0));e:do{if(n&0!=(3&e|0))for(o=255&t;;){if((0|r[e>>0])==o<<24>>24){s=6;break e}if(!((n=0!=(0|(i=i+-1|0)))&0!=(3&(e=e+1|0)|0))){s=5;break}}else s=5}while(0);5==(0|s)&&(n?s=6:i=0);e:do{if(6==(0|s)&&(o=255&t,(0|r[e>>0])!=o<<24>>24)){n=0|T(a,16843009);t:do{if(i>>>0>3){for(;!((-2139062144&(a=l[e>>2]^n)^-2139062144)&a+-16843009|0);)if(e=e+4|0,(i=i+-4|0)>>>0<=3){s=11;break t}}else s=11}while(0);if(11==(0|s)&&!i){i=0;break}for(;;){if((0|r[e>>0])==o<<24>>24)break e;if(e=e+1|0,!(i=i+-1|0)){i=0;break}}}}while(0);return 0|(0|i?e:0)}function le(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0;var o,a,s,u=0,h=0,d=0;return s=v,v=v+528|0,d=s,h=s+16|0,o=0|l[(e|=0)+88>>2],a=(0|c[o+70+(r<<2)+1>>0])<<16|(0|c[o+70+(r<<2)>>0])<<24|(0|c[o+70+(r<<2)+2>>0])<<8|0|c[o+70+(r<<2)+3>>0],(u=(u=r+1|0)>>>0<(0|c[o+16>>0])>>>0?(0|c[o+70+(u<<2)+1>>0])<<16|(0|c[o+70+(u<<2)>>0])<<24|(0|c[o+70+(u<<2)+2>>0])<<8|0|c[o+70+(u<<2)+3>>0]:0|l[e+8>>2])>>>0>a>>>0?(d=0|Q(e,h=(h=0|l[(h=e+4|0)>>2])+a|0,d=u-a|0,t,i,n,r),v=s,0|d):(l[d>>2]=866,l[d+4>>2]=3694,l[d+8>>2]=1508,Oe(h,812,d),$e(h),d=0|Q(e,h=(h=0|l[(h=e+4|0)>>2])+a|0,d=u-a|0,t,i,n,r),v=s,0|d)}function ue(e,t,i){e|=0,t|=0;var n=0,o=0,a=0,s=0,u=0;(o=0|l[(n=(i|=0)+16|0)>>2])?a=5:0|Te(i)?n=0:(o=0|l[n>>2],a=5);e:do{if(5==(0|a)){if(n=s=0|l[(u=i+20|0)>>2],(o-s|0)>>>0<t>>>0){n=0|at[7&l[i+36>>2]](i,e,t);break}t:do{if((0|r[i+75>>0])>-1){for(s=t;;){if(!s){a=0,o=e;break t}if(10==(0|r[e+(o=s+-1|0)>>0]))break;s=o}if((n=0|at[7&l[i+36>>2]](i,e,s))>>>0<s>>>0)break e;a=s,o=e+s|0,t=t-s|0,n=0|l[u>>2]}else a=0,o=e}while(0);J(0|n,0|o,0|t),l[u>>2]=(0|l[u>>2])+t,n=a+t|0}}while(0);return 0|n}function ce(e){var t,i,n=0,o=0,a=0;i=v,v=v+544|0,a=i+16|0,o=i,t=i+32|0,n=0|l[(e|=0)+20>>2];do{if(0|n){if(re(n),7&n){l[o>>2]=866,l[o+4>>2]=2506,l[o+8>>2]=1232,Oe(t,812,o),$e(t);break}_e(n,0,0,1,0);break}}while(0);if(!(o=0|l[(n=e+4|0)>>2]))return r[(a=e+16|0)>>0]=0,void(v=i);7&o?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1232,Oe(t,812,a),$e(t)):_e(o,0,0,1,0),l[n>>2]=0,l[e+8>>2]=0,l[e+12>>2]=0,r[(a=e+16|0)>>0]=0,v=i}function he(e,t){t|=0;var i,n,r,o,a=0,s=0,u=0;return o=v,v=v+560|0,u=o+32|0,r=o+16|0,a=o,n=o+48|0,i=o+44|0,(s=0|(s=(e|=0)+3&-4)?s:4)>>>0>2147418112?(l[a>>2]=866,l[a+4>>2]=2506,l[a+8>>2]=1103,Oe(n,812,a),$e(n),v=o,0|(u=0)):(l[i>>2]=s,e=0|_e(0,s,i,1,0),a=0|l[i>>2],0|t&&(l[t>>2]=a),0==(0|e)|a>>>0<s>>>0?(l[r>>2]=866,l[r+4>>2]=2506,l[r+8>>2]=1129,Oe(n,812,r),$e(n),e=0):7&e&&(l[u>>2]=866,l[u+4>>2]=2533,l[u+8>>2]=1156,Oe(n,812,u),$e(n)),v=o,0|(u=e))}function de(e,t,i){t|=0;var n,o=0,a=0,s=0;if(n=(e|=0)+(i|=0)|0,t&=255,(0|i)>=67){for(;3&e;)r[e>>0]=t,e=e+1|0;for(a=(o=-4&n|0)-64|0,s=t|t<<8|t<<16|t<<24;(0|e)<=(0|a);)l[e>>2]=s,l[e+4>>2]=s,l[e+8>>2]=s,l[e+12>>2]=s,l[e+16>>2]=s,l[e+20>>2]=s,l[e+24>>2]=s,l[e+28>>2]=s,l[e+32>>2]=s,l[e+36>>2]=s,l[e+40>>2]=s,l[e+44>>2]=s,l[e+48>>2]=s,l[e+52>>2]=s,l[e+56>>2]=s,l[e+60>>2]=s,e=e+64|0;for(;(0|e)<(0|o);)l[e>>2]=s,e=e+4|0}for(;(0|e)<(0|n);)r[e>>0]=t,e=e+1|0;return n-i|0}function fe(e,t,i,n,o){e|=0,i|=0,n|=0,o|=0;var a=0,s=0,u=0,c=0;r[(t|=0)+53>>0]=1;do{if((0|l[t+4>>2])==(0|n)){if(r[t+52>>0]=1,u=t+54|0,c=t+48|0,s=t+24|0,e=t+36|0,!(a=0|l[(n=t+16|0)>>2])){if(l[n>>2]=i,l[s>>2]=o,l[e>>2]=1,!(1==(0|l[c>>2])&1==(0|o)))break;r[u>>0]=1;break}if((0|a)!=(0|i)){l[e>>2]=1+(0|l[e>>2]),r[u>>0]=1;break}2==(0|(e=0|l[s>>2]))&&(l[s>>2]=o,e=o),1==(0|l[c>>2])&1==(0|e)&&(r[u>>0]=1)}}while(0)}function pe(e,t){e|=0;var i,n,o,a=0,s=0,u=0,h=0;o=v,v=v+16|0,n=255&(t|=0),r[(i=o)>>0]=n,(u=0|l[(s=e+16|0)>>2])?h=4:0|Te(e)?a=-1:(u=0|l[s>>2],h=4);do{if(4==(0|h)){if((s=0|l[(h=e+20|0)>>2])>>>0<u>>>0&&(0|(a=255&t))!=(0|r[e+75>>0])){l[h>>2]=s+1,r[s>>0]=n;break}a=1==(0|at[7&l[e+36>>2]](e,i,1))?0|c[i>>0]:-1}}while(0);return v=o,0|a}function _e(e,t,i,n,r){e|=0,t|=0,i|=0,n|=0,r|=0;do{if(e){if(!t){if(H(e),!i){t=0;break}l[i>>2]=0,t=0;break}n?e=0==(0|(t=0|ye(e,t)))?e:t:t=0,i&&(r=0|Re(e),l[i>>2]=r)}else t=0|z(t),i&&(e=t?0|Re(t):0,l[i>>2]=e)}while(0);return 0|t}function me(e,t){e=+e,t|=0;var i,n,r=0;switch(m[y>>3]=e,2047&(n=0|Ie(0|(r=0|l[y>>2]),0|(i=0|l[y+4>>2]),52))){case 0:0!=e?(e=+me(0x10000000000000000*e,t),r=(0|l[t>>2])-64|0):r=0,l[t>>2]=r;break;case 2047:break;default:l[t>>2]=(2047&n)-1022,l[y>>2]=r,l[y+4>>2]=-2146435073&i|1071644672,e=+m[y>>3]}return+e}function ge(e,t){e|=0,t|=0;var i=0,n=0;for(n=0;;){if((0|c[2140+n>>0])==(0|e)){e=2;break}if(87==(0|(i=n+1|0))){i=2228,n=87,e=5;break}n=i}if(2==(0|e)&&(n?(i=2228,e=5):i=2228),5==(0|e))for(;;){do{e=i,i=i+1|0}while(0!=(0|r[e>>0]));if(!(n=n+-1|0))break;e=5}return 0|function(e,t){return 0|function(e,t){return e|=0,t=(t|=0)?0|function(e,t,i){t|=0,i|=0;var n,o=0,a=0,s=0,u=0,c=0,h=0,d=0,f=0,p=0;n=1794895138+(0|l[(e|=0)>>2])|0,s=0|qe(0|l[e+8>>2],n),o=0|qe(0|l[e+12>>2],n),a=0|qe(0|l[e+16>>2],n);e:do{if(s>>>0<t>>>2>>>0&&(p=t-(s<<2)|0,o>>>0<p>>>0&a>>>0<p>>>0)&&0==(3&(a|o)|0)){for(p=o>>>2,f=a>>>2,d=0;;){if(o=0|qe(0|l[e+((a=(u=(h=d+(c=s>>>1)|0)<<1)+p|0)<<2)>>2],n),!((a=0|qe(0|l[e+(a+1<<2)>>2],n))>>>0<t>>>0&o>>>0<(t-a|0)>>>0)){o=0;break e}if(0|r[e+(a+o)>>0]){o=0;break e}if(!(o=0|Ce(i,e+a|0)))break;if(o=(0|o)<0,1==(0|s)){o=0;break e}d=o?d:h,s=o?c:s-c|0}a=0|qe(0|l[e+((o=u+f|0)<<2)>>2],n),o=(o=0|qe(0|l[e+(o+1<<2)>>2],n))>>>0<t>>>0&a>>>0<(t-o|0)>>>0&&0==(0|r[e+(o+a)>>0])?e+o|0:0}else o=0}while(0);return 0|o}(0|l[t>>2],0|l[t+4>>2],e):0,0|(0|t?t:e)}(e|=0,t|=0)}(i,0|l[t+20>>2])}function xe(e,t,i){i|=0;var n=0;if((t|=0)>>>0>0|0==(0|t)&(e|=0)>>>0>4294967295){for(;n=0|Me(0|e,0|t,10,0),r[(i=i+-1|0)>>0]=255&n|48,n=e,e=0|je(0|e,0|t,10,0),t>>>0>9|9==(0|t)&n>>>0>4294967295;)t=b;t=e}else t=e;if(t)for(;r[(i=i+-1|0)>>0]=48|(t>>>0)%10,!(t>>>0<10);)t=(t>>>0)/10|0;return 0|i}function ye(e,t){t|=0;var i=0,n=0;return(e|=0)?t>>>0>4294967231?(t=0|tt(),l[t>>2]=12,0|(t=0)):(i=0|function(e,t){t|=0;var i,n=0,r=0,o=0,a=0,s=0,u=0,c=0,h=0,d=0;if(i=(e|=0)+(n=-8&(h=0|l[(d=e+4|0)>>2]))|0,!(3&h))return t>>>0<256?0|(e=0):(n>>>0>=(t+4|0)>>>0&&(n-t|0)>>>0<=l[1264]<<1>>>0||(e=0),0|e);if(n>>>0>=t>>>0)return(n=n-t|0)>>>0<=15||(c=e+t|0,l[d>>2]=1&h|t|2,l[c+4>>2]=3|n,l[(d=c+n+4|0)>>2]=1|l[d>>2],q(c,n)),0|e;if((0|i)==(0|l[1150]))return n=(c=(0|l[1147])+n|0)-t|0,r=e+t|0,c>>>0<=t>>>0?0|(e=0):(l[d>>2]=1&h|t|2,l[r+4>>2]=1|n,l[1150]=r,l[1147]=n,0|e);if((0|i)==(0|l[1149]))return(o=(0|l[1146])+n|0)>>>0<t>>>0?0|(e=0):(r=1&h,(n=o-t|0)>>>0>15?(c=(h=e+t|0)+n|0,l[d>>2]=r|t|2,l[h+4>>2]=1|n,l[c>>2]=n,l[(r=c+4|0)>>2]=-2&l[r>>2],r=h):(l[d>>2]=r|o|2,l[(r=e+o+4|0)>>2]=1|l[r>>2],r=0,n=0),l[1146]=n,l[1149]=r,0|e);if(2&(r=0|l[i+4>>2])|0||(u=(-8&r)+n|0)>>>0<t>>>0)return 0;c=u-t|0,o=r>>>3;do{if(r>>>0<256){if(r=0|l[i+8>>2],(0|(n=0|l[i+12>>2]))==(0|r)){l[1144]=l[1144]&~(1<<o);break}l[r+12>>2]=n,l[n+8>>2]=r;break}s=0|l[i+24>>2],n=0|l[i+12>>2];do{if((0|n)==(0|i)){if(n=0|l[(r=4+(o=i+16|0)|0)>>2])a=r;else{if(!(n=0|l[o>>2])){o=0;break}a=o}for(;;)if(0|(r=0|l[(o=n+20|0)>>2]))n=r,a=o;else{if(!(o=0|l[(r=n+16|0)>>2]))break;n=o,a=r}l[a>>2]=0,o=n}else o=0|l[i+8>>2],l[o+12>>2]=n,l[n+8>>2]=o,o=n}while(0);if(0|s){if(n=0|l[i+28>>2],(0|i)==(0|l[(r=4880+(n<<2)|0)>>2])){if(l[r>>2]=o,!o){l[1145]=l[1145]&~(1<<n);break}}else if(l[s+16+(((0|l[s+16>>2])!=(0|i)&1)<<2)>>2]=o,!o)break;l[o+24>>2]=s,0|(r=0|l[(n=i+16|0)>>2])&&(l[o+16>>2]=r,l[r+24>>2]=o),0|(n=0|l[n+4>>2])&&(l[o+20>>2]=n,l[n+24>>2]=o)}}while(0);return n=1&h,c>>>0<16?(l[d>>2]=u|n|2,l[(d=e+u+4|0)>>2]=1|l[d>>2],0|e):(h=e+t|0,l[d>>2]=n|t|2,l[h+4>>2]=3|c,l[(d=h+c+4|0)>>2]=1|l[d>>2],q(h,c),0|e)}(e+-8|0,t>>>0<11?16:t+11&-8),0|i?0|(t=i+8|0):(i=0|z(t))?(J(0|i,0|e,0|((n=(-8&(n=0|l[e+-4>>2]))-(0==(3&n|0)?8:4)|0)>>>0<t>>>0?n:t)),H(e),0|(t=i)):0|(t=0)):0|(t=0|z(t))}function ve(e,t,i,n){e|=0,i|=0,n|=0;var o,a,s;o=0|l[(e=(t|=0)+16|0)>>2],a=t+36|0,s=t+24|0;do{if(o){if((0|o)!=(0|i)){l[a>>2]=1+(0|l[a>>2]),l[s>>2]=2,r[t+54>>0]=1;break}2==(0|l[s>>2])&&(l[s>>2]=n)}else l[e>>2]=i,l[s>>2]=n,l[a>>2]=1}while(0)}function $e(e){e|=0;var t,i=0,n=0;t=0|l[119],l[t+76>>2];do{if((0|Ue(e,t))<0)e=1;else{if(10!=(0|r[t+75>>0])&&(n=0|l[(i=t+20|0)>>2])>>>0<(0|l[t+16>>2])>>>0){l[i>>2]=n+1,r[n>>0]=10,e=0;break}e=(0|pe(t,10))<0}}while(0);return e<<31>>31|0}function be(e,t,i,n,r){e|=0,t|=0;var o,a;if(a=v,v=v+256|0,o=a,(0|(i|=0))>(0|(n|=0))&0==(73728&(r|=0)|0)){if(de(0|o,0|t,0|((r=i-n|0)>>>0<256?r:256)),r>>>0>255){t=i-n|0;do{Ve(e,o,256),r=r+-256|0}while(r>>>0>255);r=255&t}Ve(e,o,r)}v=a}function Te(e){var t=0,i=0;return i=0|r[(t=(e|=0)+74|0)>>0],r[t>>0]=i+255|i,8&(t=0|l[e>>2])?(l[e>>2]=32|t,e=-1):(l[e+8>>2]=0,l[e+4>>2]=0,i=0|l[e+44>>2],l[e+28>>2]=i,l[e+20>>2]=i,l[e+16>>2]=i+(0|l[e+48>>2]),e=0),0|e}function Ce(e,t){t|=0;var i=0,n=0;if(i=0|r[(e|=0)>>0],n=0|r[t>>0],i<<24>>24==0||i<<24>>24!=n<<24>>24)e=n;else{do{t=t+1|0,i=0|r[(e=e+1|0)>>0],n=0|r[t>>0]}while(i<<24>>24!=0&&i<<24>>24==n<<24>>24);e=n}return(255&i)-(255&e)|0}function Se(e){var t,i;return(0|(i=(e|=0)+15&-16|0))>0&(0|(e=(t=0|l[x>>2])+i|0))<(0|t)|(0|e)<0?(P(),O(12),-1):(l[x>>2]=e,(0|e)>(0|E())&&0==(0|w())?(l[x>>2]=t,O(12),-1):0|t)}function we(e){var t=0,i=0,n=0;if(i=0|l[(e|=0)>>2],(n=(0|r[i>>0])-48|0)>>>0<10){t=0;do{t=n+(10*t|0)|0,i=i+1|0,l[e>>2]=i,n=(0|r[i>>0])-48|0}while(n>>>0<10)}else t=0;return 0|t}function Ee(e,t,i,n){if(i|=0,n|=0,!(0==(0|(e|=0))&0==(0|(t|=0))))do{r[(i=i+-1|0)>>0]=0|c[2122+(15&e)>>0]|n,e=0|Ie(0|e,0|t,4),t=b}while(!(0==(0|e)&0==(0|t)));return 0|i}function Pe(e){var t=0;return(0|(t=0|r[$+(255&(e|=0))>>0]))<8?0|t:(0|(t=0|r[$+(e>>8&255)>>0]))<8?t+8|0:(0|(t=0|r[$+(e>>16&255)>>0]))<8?t+16|0:24+(0|r[$+(e>>>24)>>0])|0}function Ae(e,t,i,n){i|=0,n|=0;var r=0;(0|l[(t|=0)+4>>2])==(0|i)&&1!=(0|l[(r=t+28|0)>>2])&&(l[r>>2]=n)}function Le(e,t,i){if(i|=0,!(0==(0|(e|=0))&0==(0|(t|=0))))do{r[(i=i+-1|0)>>0]=7&e|48,e=0|Ie(0|e,0|t,3),t=b}while(!(0==(0|e)&0==(0|t)));return 0|i}function Me(e,t,i,n){var r,o;return o=v,v=v+16|0,j(e|=0,t|=0,i|=0,n|=0,r=0|o),v=o,b=0|l[r+4>>2],0|l[r>>2]}function Re(e){var t=0;return(e|=0)?0|(1==(0|(e=3&(t=0|l[e+-4>>2])))?0:(-8&t)-(0==(0|e)?8:4)|0):0}function Oe(e,t,i){e|=0,t|=0,i|=0;var n,o;return n=v,v=v+16|0,l[(o=n)>>2]=i,i=0|function(e,t,i){return 0|function(e,t,i,n){e|=0,t|=0,i|=0,n|=0;var o,a,s=0,u=0,c=0,h=0,d=0;a=v,v=v+128|0,s=a+124|0,c=604,o=(u=d=a)+124|0;do{l[u>>2]=l[c>>2],u=u+4|0,c=c+4|0}while((0|u)<(0|o));return(t+-1|0)>>>0>2147483646?t?(t=0|tt(),l[t>>2]=75,t=-1):(e=s,t=1,h=4):h=4,4==(0|h)&&(h=t>>>0>(h=-2-e|0)>>>0?h:t,l[d+48>>2]=h,l[(s=d+20|0)>>2]=e,l[d+44>>2]=e,t=e+h|0,l[(e=d+16|0)>>2]=t,l[d+28>>2]=t,t=0|te(d,i,n),h&&(d=0|l[s>>2],r[d+(((0|d)==(0|l[e>>2]))<<31>>31)>>0]=0)),v=a,0|t}(e|=0,2147483647,t|=0,i|=0)}(e,t,o),v=n,0|i}function De(e,t,i){return e|=0,t|=0,(0|(i|=0))<32?(b=t<<i|(e&(1<<i)-1<<32-i)>>>32-i,e<<i):(b=e<<i-32,0)}function Ie(e,t,i){return e|=0,t|=0,(0|(i|=0))<32?(b=t>>>i,e>>>i|(t&(1<<i)-1)<<32-i):(b=0,t>>>i-32|0)}function Be(e,t){e|=0,t|=0;var i;i=v,v=v+16|0,l[i>>2]=t,te(t=0|l[26],e,i),function(e,t){var i,n=0,o=0,a=0,s=0;i=255&(e|=0),n=255&e,l[76+(t|=0)>>2],s=3;do{if(3==(0|s)){if((0|n)!=(0|r[t+75>>0])&&(a=0|l[(o=t+20|0)>>2])>>>0<(0|l[t+16>>2])>>>0){l[o>>2]=a+1,r[a>>0]=i;break}n=0|pe(t,e)}}while(0)}(10,t),D()}function Fe(e,t,i,n){return b=n=(t|=0)-(n|=0)-((i|=0)>>>0>(e|=0)>>>0|0)>>>0,0|e-i>>>0}function Ne(e){e=+e;var t;return m[y>>3]=e,t=0|l[y>>2],b=0|l[y+4>>2],0|t}function Ge(e,t,i,n){return b=(t|=0)+(n|=0)+((i=(e|=0)+(i|=0)>>>0)>>>0<e>>>0|0)>>>0,0|i}function ze(e){var t=0;return(e|=0)>>>0>4294963200&&(t=0|tt(),l[t>>2]=0-e,e=-1),0|e}function Ue(e,t){t|=0;var i;return i=0|function(e){var t,i=0,n=0;t=e|=0;e:do{if(3&t)for(i=t;;){if(!(0|r[e>>0])){e=i;break e}if(!(3&(i=e=e+1|0))){n=4;break}}else n=4}while(0);if(4==(0|n)){for(;!((-2139062144&(i=0|l[e>>2])^-2139062144)&i+-16843009);)e=e+4|0;if((255&i)<<24>>24)do{e=e+1|0}while(0!=(0|r[e>>0]))}return e-t|0}(e|=0),((0|function(e,t,i,n){var r;return e|=0,n|=0,r=0|T(i|=0,t|=0),i=0==(0|t)?0:i,(0|(e=(l[n+76>>2],0|ue(e,r,n))))!=(0|r)&&(i=(e>>>0)/(t>>>0)|0),0|i}(e,1,i,t))!=(0|i))<<31>>31|0}function Ve(e,t,i){t|=0,i|=0,32&l[(e|=0)>>2]||ue(t,i,e)}function ke(e){e|=0;var t;return t=188+(0|it())|0,0|ge(e,0|l[t>>2])}function We(e,t){return t|=0,e=(e|=0)?0|function(e,t,i){e|=0,t|=0,i|=0;do{if(e){if(t>>>0<128){r[e>>0]=t,e=1;break}if(i=188+(0|it())|0,!(0|l[l[i>>2]>>2])){if(57216==(-128&t|0)){r[e>>0]=t,e=1;break}e=0|tt(),l[e>>2]=84,e=-1;break}if(t>>>0<2048){r[e>>0]=t>>>6|192,r[e+1>>0]=63&t|128,e=2;break}if(t>>>0<55296|57344==(-8192&t|0)){r[e>>0]=t>>>12|224,r[e+1>>0]=t>>>6&63|128,r[e+2>>0]=63&t|128,e=3;break}if((t+-65536|0)>>>0<1048576){r[e>>0]=t>>>18|240,r[e+1>>0]=t>>>12&63|128,r[e+2>>0]=t>>>6&63|128,r[e+3>>0]=63&t|128,e=4;break}e=0|tt(),l[e>>2]=84,e=-1;break}e=1}while(0);return 0|e}(e,t,0):0,0|e}function He(e,t,i){return(0|(e|=0))==(0|(t|=0))|0}function qe(e,t){t|=0;var i;return i=0|Xe(0|(e|=0)),0|(0==(0|t)?e:i)}function je(e,t,i,n){return 0|j(e|=0,t|=0,i|=0,n|=0,0)}function Xe(e){return(255&(e|=0))<<24|(e>>8&255)<<16|(e>>16&255)<<8|e>>>24|0}function Ye(e,t,i,n,r,o){S(6)}function Ze(e,t,i,n,r){S(1)}function Ke(e){(function(e){H(e|=0)})(e|=0)}function Qe(e,t,i,n){S(7)}function Je(e,t,i){return S(0),0}function et(e,t){return+ +me(e=+e,t|=0)}function tt(){return 64+(0|it())|0}function it(){return 232}function nt(e){}function rt(e){S(2)}function ot(){S(5)}t.__ZSt18uncaught_exceptionv;var at=[Je,ee,function(e,t,i){var n,r,o;return e|=0,t|=0,i|=0,r=v,v=v+32|0,n=r+20|0,l[(o=r)>>2]=l[e+60>>2],l[o+4>>2]=0,l[o+8>>2]=t,l[o+12>>2]=n,l[o+16>>2]=i,(0|ze(0|N(140,0|o)))<0?(l[n>>2]=-1,e=-1):e=0|l[n>>2],v=r,0|e},function(e,t,i){t|=0,i|=0;var n,o=0;return n=v,v=v+32|0,o=n,l[(e|=0)+36>>2]=1,0==(64&l[e>>2]|0)&&(l[o>>2]=l[e+60>>2],l[o+4>>2]=21523,l[o+8>>2]=n+16,0|L(54,0|o))&&(r[e+75>>0]=-1),o=0|ee(e,t,i),v=n,0|o},function(e,t,i){var n,r;return t|=0,i|=0,J(0|(r=0|l[(n=(e|=0)+20|0)>>2]),0|t,0|(e=(e=(0|l[e+16>>2])-r|0)>>>0>i>>>0?i:e)),l[n>>2]=(0|l[n>>2])+e,0|i},function(e,t,i){i|=0;var n,r,o=0,a=0;if(r=v,v=v+64|0,n=r,0|He(e|=0,t|=0))t=1;else if(0!=(0|t)&&0!=(0|(a=0|ie(t,32,16,0)))){o=(t=n+4|0)+52|0;do{l[t>>2]=0,t=t+4|0}while((0|t)<(0|o));l[n>>2]=a,l[n+8>>2]=e,l[n+12>>2]=-1,l[n+48>>2]=1,ft[3&l[28+(0|l[a>>2])>>2]](a,n,0|l[i>>2],1),1==(0|l[n+24>>2])?(l[i>>2]=l[n+16>>2],t=1):t=0}else t=0;return v=r,0|t},Je,Je],st=[Ze,function(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0;var a=0;do{if(0|He(e,0|l[t+8>>2]))Ae(0,t,i,n);else if(0|He(e,0|l[t>>2])){if(e=t+32|0,(0|l[t+16>>2])!=(0|i)&&(0|l[(a=t+20|0)>>2])!=(0|i)){l[e>>2]=n,l[a>>2]=i,l[(n=t+40|0)>>2]=1+(0|l[n>>2]),1==(0|l[t+36>>2])&&2==(0|l[t+24>>2])&&(r[t+54>>0]=1),l[t+44>>2]=4;break}1==(0|n)&&(l[e>>2]=1)}}while(0)},function(e,t,i,n,o){e|=0,t|=0,i|=0,n|=0,o|=0;var a=0,s=0,u=0,c=0;do{if(0|He(e,0|l[t+8>>2]))Ae(0,t,i,n);else{if(a=e+8|0,!(0|He(e,0|l[t>>2]))){u=0|l[a>>2],st[3&l[24+(0|l[u>>2])>>2]](u,t,i,n,o);break}if(e=t+32|0,(0|l[t+16>>2])!=(0|i)&&(0|l[(s=t+20|0)>>2])!=(0|i)){if(l[e>>2]=n,4==(0|l[(n=t+44|0)>>2]))break;r[(e=t+52|0)>>0]=0,r[(c=t+53|0)>>0]=0,a=0|l[a>>2],dt[3&l[20+(0|l[a>>2])>>2]](a,t,i,i,1,o),0|r[c>>0]?0|r[e>>0]?e=3:(e=3,u=11):(e=4,u=11),11==(0|u)&&(l[s>>2]=i,l[(c=t+40|0)>>2]=1+(0|l[c>>2]),1==(0|l[t+36>>2])&&2==(0|l[t+24>>2])&&(r[t+54>>0]=1)),l[n>>2]=e;break}1==(0|n)&&(l[e>>2]=1)}}while(0)},Ze],lt=[rt,nt,Ke,nt,nt,Ke,function(e){var t;t=v,v=v+16|0,H(e|=0),0|M(0|l[1285],0)?Be(4406,t):v=t},rt],ut=[function(e){return S(3),0},function(e){var t,i;return t=v,v=v+16|0,i=t,e=0|function(e){return 0|(e|=0)}(0|l[(e|=0)+60>>2]),l[i>>2]=e,e=0|ze(0|R(6,0|i)),v=t,0|e}],ct=[function(e,t,i){S(4)}],ht=[ot,function(){var e,t,i,n=0,r=0,o=0,a=0,s=0;a=v,v=v+48|0,i=a+32|0,e=a+24|0,s=a+16|0,t=a,a=a+36|0,n=0|function(){var e=0,t=0;if(e=v,v=v+16|0,!(0|I(5136,2)))return t=0|A(0|l[1285]),v=e,0|t;Be(4307,e);return 0}(),0|n&&0|(o=0|l[n>>2])&&(1126902528==(-256&(r=0|l[(n=o+48|0)>>2])|0)&1129074247==(0|(n=0|l[n+4>>2]))||(l[e>>2]=4168,Be(4118,e)),n=1126902529==(0|r)&1129074247==(0|n)?0|l[o+44>>2]:o+80|0,l[a>>2]=n,o=0|l[o>>2],n=0|l[o+4>>2],0|at[7&l[16+(0|l[2])>>2]](8,o,a)?(s=0|l[a>>2],s=0|ut[1&l[8+(0|l[s>>2])>>2]](s),l[t>>2]=4168,l[t+4>>2]=n,l[t+8>>2]=s,Be(4032,t)):(l[s>>2]=4168,l[s+4>>2]=n,Be(4077,s))),Be(4156,i)},function(){var e;e=v,v=v+16|0,0|F(5140,6)?Be(4356,e):v=e},ot],dt=[Ye,function(e,t,i,n,r,o){i|=0,n|=0,r|=0,0|He(e|=0,0|l[(t|=0)+8>>2])&&fe(0,t,i,n,r)},function(e,t,i,n,r,o){i|=0,n|=0,r|=0,o|=0,0|He(e|=0,0|l[(t|=0)+8>>2])?fe(0,t,i,n,r):(e=0|l[e+8>>2],dt[3&l[20+(0|l[e>>2])>>2]](e,t,i,n,r,o))},Ye],ft=[Qe,function(e,t,i,n){i|=0,n|=0,0|He(e|=0,0|l[(t|=0)+8>>2])&&ve(0,t,i,n)},function(e,t,i,n){i|=0,n|=0,0|He(e|=0,0|l[(t|=0)+8>>2])?ve(0,t,i,n):(e=0|l[e+8>>2],ft[3&l[28+(0|l[e>>2])>>2]](e,t,i,n))},Qe];return{stackSave:function(){return 0|v},_i64Subtract:Fe,_crn_get_bytes_per_block:function(e,t){e|=0,t|=0;var i,n,r,o=0;switch(r=v,v=v+576|0,n=r+40|0,i=r+56|0,l[(o=r)>>2]=40,oe(e,t,o),e=0|l[(t=o+32|0)+4>>2],0|l[t>>2]){case 0:case 9:case 10:if(!e)return v=r,0|(o=8);e=14;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:e=e?14:13;break;default:e=14}return 13==(0|e)?(v=r,0|(o=16)):14==(0|e)?(l[n>>2]=866,l[n+4>>2]=2672,l[n+8>>2]=1251,Oe(i,812,n),$e(i),v=r,0|(o=0)):0},setThrew:function(e,t){},dynCall_viii:function(e,t,i,n){t|=0,i|=0,n|=0,ct[0&(e|=0)](0|t,0|i,0|n)},_bitshift64Lshr:Ie,_bitshift64Shl:De,dynCall_viiii:function(e,t,i,n,r){t|=0,i|=0,n|=0,r|=0,ft[3&(e|=0)](0|t,0|i,0|n,0|r)},setTempRet0:function(e){b=e|=0},_crn_decompress:function(e,t,i,n,o,s){e|=0,t|=0,i|=0,n|=0,o|=0,s|=0;var u,h,d,f,p=0,_=0,m=0,g=0,x=0;switch(f=v,v=v+592|0,d=f+56|0,m=f+40|0,u=f+72|0,h=f+68|0,l[(x=f)>>2]=40,oe(e,t,x),p=(0|l[x+4>>2])>>>o,_=(0|l[x+8>>2])>>>o,n=0|l[(x=x+32|0)+4>>2],0|l[x>>2]){case 0:case 9:case 10:n?g=14:x=8;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:g=n?14:13;break;default:g=14}13==(0|g)?x=16:14==(0|g)&&(l[m>>2]=866,l[m+4>>2]=2672,l[m+8>>2]=1251,Oe(u,812,m),$e(u),x=0),l[h>>2]=i,g=0|function(e,t){var i=0,n=0,o=0,s=0,u=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0;if(m=v,v=v+528|0,p=m,h=m+16|0,0==(0|(e|=0))|(t|=0)>>>0<62||!(d=0|he(300,0)))return v=m,0|(g=0);l[d>>2]=519686845,l[d+4>>2]=0,l[d+8>>2]=0,f=d+88|0,i=d+136|0,n=d+160|0,o=d+184|0,s=d+208|0,u=d+232|0,l[(_=d+252|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,l[(_=d+268|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,l[(_=d+284|0)>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,r[_+12>>0]=0,g=(_=f)+44|0;do{l[_>>2]=0,_=_+4|0}while((0|_)<(0|g));return r[f+44>>0]=0,l[i>>2]=0,l[i+4>>2]=0,l[i+8>>2]=0,l[i+12>>2]=0,l[i+16>>2]=0,r[i+20>>0]=0,l[n>>2]=0,l[n+4>>2]=0,l[n+8>>2]=0,l[n+12>>2]=0,l[n+16>>2]=0,r[n+20>>0]=0,l[o>>2]=0,l[o+4>>2]=0,l[o+8>>2]=0,l[o+12>>2]=0,l[o+16>>2]=0,r[o+20>>0]=0,l[s>>2]=0,l[s+4>>2]=0,l[s+8>>2]=0,l[s+12>>2]=0,l[s+16>>2]=0,r[s+20>>0]=0,l[u>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0,r[u+16>>0]=0,0|function(e,t,i){e|=0;var n=0,o=0;return!(0==(0|(t|=0))|(i|=0)>>>0<74)&&18552==((0|c[t>>0])<<8|0|c[t+1>>0]|0)&&((0|c[t+2>>0])<<8|0|c[t+3>>0])>>>0>=74&&((0|c[t+7>>0])<<16|(0|c[t+6>>0])<<24|(0|c[t+8>>0])<<8|0|c[t+9>>0])>>>0<=i>>>0?(l[(n=e+88|0)>>2]=t,l[e+4>>2]=t,l[e+8>>2]=i,0|function(e){var t=0,i=0,n=0,r=0;if(r=92+(e|=0)|0,i=0|l[(n=e+88|0)>>2],t=(0|l[e+4>>2])+((0|c[i+68>>0])<<8|(0|c[i+67>>0])<<16|0|c[i+69>>0])|0,!((i=(0|c[i+65>>0])<<8|0|c[i+66>>0])&&(l[r>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,0|k(r,e+116|0))))return 0|(r=0);t=0|l[n>>2];do{if((0|c[t+39>>0])<<8|0|c[t+40>>0]){if(!(0|k(r,e+140|0)))return 0|(r=0);if(0|k(r,e+188|0)){t=0|l[n>>2];break}return 0|(r=0)}if(!((0|c[t+55>>0])<<8|0|c[t+56>>0]))return 0|(r=0)}while(0);return!((0|c[t+55>>0])<<8|0|c[t+56>>0]|0)||0|k(r,e+164|0)&&0|k(r,e+212|0)?0|(r=1):0|(r=0)}(e)?(t=0|l[n>>2],(0|c[t+39>>0])<<8|0|c[t+40>>0]?0|function(e){var t=0,i=0,n=0,o=0,a=0,s=0,u=0,h=0,d=0,f=0,p=0,_=0,m=0;if(m=v,v=v+576|0,s=m,o=m+64|0,_=m+16|0,t=0|l[(n=88+(e|=0)|0)>>2],p=(0|c[t+39>>0])<<8|0|c[t+40>>0],d=e+236|0,(0|(i=0|l[(a=e+240|0)>>2]))!=(0|p)){if(i>>>0<=p>>>0){do{if((0|l[e+244>>2])>>>0<p>>>0){if(0|K(d,p,(i+1|0)==(0|p),4,0)){t=0|l[a>>2];break}return r[e+248>>0]=1,v=m,0|(_=0)}t=i}while(0);de((0|l[d>>2])+(t<<2)|0,0,p-t<<2|0),t=0|l[n>>2]}l[a>>2]=p}if(f=e+92|0,i=(0|l[e+4>>2])+((0|c[t+34>>0])<<8|(0|c[t+33>>0])<<16|0|c[t+35>>0])|0,!(t=(0|c[t+37>>0])<<8|(0|c[t+36>>0])<<16|0|c[t+38>>0]))return v=m,0|(_=0);if(l[f>>2]=i,l[e+96>>2]=i,l[e+104>>2]=t,l[e+100>>2]=i+t,l[e+108>>2]=0,l[e+112>>2]=0,u=_+20|0,l[_>>2]=0,l[_+4>>2]=0,l[_+8>>2]=0,l[_+12>>2]=0,r[_+16>>0]=0,h=_+24|0,l[_+44>>2]=0,l[u>>2]=0,l[u+4>>2]=0,l[u+8>>2]=0,l[u+12>>2]=0,l[u+16>>2]=0,r[u+20>>0]=0,0|k(f,_)&&0|k(f,h))if(0|l[a>>2]||(l[s>>2]=866,l[s+4>>2]=910,l[s+8>>2]=1497,Oe(o,812,s),$e(o)),p)for(s=0,u=0,i=0|l[d>>2],n=0,e=0,t=0,o=0,a=0;;){if(s=(0|X(f,_))+s&31,a=(0|X(f,h))+a&63,o=(0|X(f,_))+o&31,t=(0|X(f,_))+t|0,e=(0|X(f,h))+e&63,n=(0|X(f,_))+n&31,l[i>>2]=a<<5|s<<11|o|t<<27|e<<21|n<<16,(u=u+1|0)>>>0>=p>>>0){t=1;break}i=i+4|0,t&=31}else t=1;else t=0;return ce(_+24|0),ce(_),v=m,0|(_=t)}(e)&&0|function(e){var t,i,n,o,a,s,u=0,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,y=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,D=0,I=0,B=0,F=0,N=0,G=0,z=0,U=0,V=0,W=0;if(s=v,v=v+1008|0,_=s,p=s+496|0,A=s+472|0,n=s+276|0,o=s+80|0,a=s+16|0,h=0|l[88+(e|=0)>>2],t=(0|c[h+47>>0])<<8|0|c[h+48>>0],i=e+92|0,u=(0|l[e+4>>2])+((0|c[h+42>>0])<<8|(0|c[h+41>>0])<<16|0|c[h+43>>0])|0,!(h=(0|c[h+45>>0])<<8|(0|c[h+44>>0])<<16|0|c[h+46>>0]))return v=s,0;if(l[i>>2]=u,l[e+96>>2]=u,l[e+104>>2]=h,l[e+100>>2]=u+h,l[e+108>>2]=0,l[e+112>>2]=0,l[A+20>>2]=0,l[A>>2]=0,l[A+4>>2]=0,l[A+8>>2]=0,l[A+12>>2]=0,r[A+16>>0]=0,0|k(i,A)){for(u=0,h=-3,d=-3;l[n+(u<<2)>>2]=d,l[o+(u<<2)>>2]=h,f=(0|d)>2,49!=(0|(u=u+1|0));)h=(1&f)+h|0,d=f?-3:d+1|0;h=(u=a)+64|0;do{l[u>>2]=0,u=u+4|0}while((0|u)<(0|h));d=e+252|0,u=0|l[(h=e+256|0)>>2];e:do{if((0|u)==(0|t))m=13;else{if(u>>>0<=t>>>0){do{if((0|l[e+260>>2])>>>0<t>>>0){if(0|K(d,t,(u+1|0)==(0|t),4,0)){u=0|l[h>>2];break}r[e+264>>0]=1,u=0;break e}}while(0);de((0|l[d>>2])+(u<<2)|0,0,t-u<<2|0)}l[h>>2]=t,m=13}}while(0);do{if(13==(0|m)){if(!t){l[_>>2]=866,l[_+4>>2]=910,l[_+8>>2]=1497,Oe(p,812,_),$e(p),u=1;break}for(e=a+4|0,p=a+8|0,_=a+12|0,m=a+16|0,g=a+20|0,x=a+24|0,y=a+28|0,$=a+32|0,b=a+36|0,T=a+40|0,C=a+44|0,S=a+48|0,w=a+52|0,E=a+56|0,P=a+60|0,f=0,u=0|l[d>>2],h=0|l[e>>2],d=0|l[a>>2];V=0|X(i,A),d=d+(0|l[n+(V<<2)>>2])&3,h=h+(0|l[o+(V<<2)>>2])&3,V=0|X(i,A),W=(0|l[p>>2])+(0|l[n+(V<<2)>>2])&3,l[p>>2]=W,V=(0|l[_>>2])+(0|l[o+(V<<2)>>2])&3,l[_>>2]=V,z=0|X(i,A),U=(0|l[m>>2])+(0|l[n+(z<<2)>>2])&3,l[m>>2]=U,z=(0|l[g>>2])+(0|l[o+(z<<2)>>2])&3,l[g>>2]=z,N=0|X(i,A),G=(0|l[x>>2])+(0|l[n+(N<<2)>>2])&3,l[x>>2]=G,N=(0|l[y>>2])+(0|l[o+(N<<2)>>2])&3,l[y>>2]=N,B=0|X(i,A),F=(0|l[$>>2])+(0|l[n+(B<<2)>>2])&3,l[$>>2]=F,B=(0|l[b>>2])+(0|l[o+(B<<2)>>2])&3,l[b>>2]=B,D=0|X(i,A),I=(0|l[T>>2])+(0|l[n+(D<<2)>>2])&3,l[T>>2]=I,D=(0|l[C>>2])+(0|l[o+(D<<2)>>2])&3,l[C>>2]=D,R=0|X(i,A),O=(0|l[S>>2])+(0|l[n+(R<<2)>>2])&3,l[S>>2]=O,R=(0|l[w>>2])+(0|l[o+(R<<2)>>2])&3,l[w>>2]=R,L=0|X(i,A),M=(0|l[E>>2])+(0|l[n+(L<<2)>>2])&3,l[E>>2]=M,L=(0|l[P>>2])+(0|l[o+(L<<2)>>2])&3,l[P>>2]=L,l[u>>2]=(0|c[1441+h>>0])<<2|0|c[1441+d>>0]|(0|c[1441+W>>0])<<4|(0|c[1441+V>>0])<<6|(0|c[1441+U>>0])<<8|(0|c[1441+z>>0])<<10|(0|c[1441+G>>0])<<12|(0|c[1441+N>>0])<<14|(0|c[1441+F>>0])<<16|(0|c[1441+B>>0])<<18|(0|c[1441+I>>0])<<20|(0|c[1441+D>>0])<<22|(0|c[1441+O>>0])<<24|(0|c[1441+R>>0])<<26|(0|c[1441+M>>0])<<28|(0|c[1441+L>>0])<<30,!((f=f+1|0)>>>0>=t>>>0);)u=u+4|0;l[a>>2]=d,l[e>>2]=h,u=1}}while(0)}else u=0;return ce(A),v=s,0|u}(e)&&(t=0|l[n>>2],o=11):o=11,11!=(0|o)||(0|c[t+55>>0])<<8|0|c[t+56>>0]&&!(0|function(e){var t=0,i=0,n=0,o=0,s=0,u=0,h=0,d=0,f=0;if(f=v,v=v+560|0,o=f,n=f+40|0,d=f+16|0,i=0|l[88+(e|=0)>>2],u=(0|c[i+55>>0])<<8|0|c[i+56>>0],h=e+92|0,t=(0|l[e+4>>2])+((0|c[i+50>>0])<<8|(0|c[i+49>>0])<<16|0|c[i+51>>0])|0,!(i=(0|c[i+53>>0])<<8|(0|c[i+52>>0])<<16|0|c[i+54>>0]))return v=f,0|(d=0);l[h>>2]=t,l[e+96>>2]=t,l[e+104>>2]=i,l[e+100>>2]=t+i,l[e+108>>2]=0,l[e+112>>2]=0,l[d+20>>2]=0,l[d>>2]=0,l[d+4>>2]=0,l[d+8>>2]=0,l[d+12>>2]=0,r[d+16>>0]=0;e:do{if(0|k(h,d)){if(s=e+268|0,(0|(t=0|l[(i=e+272|0)>>2]))!=(0|u)){if(t>>>0<=u>>>0){do{if((0|l[e+276>>2])>>>0<u>>>0){if(0|K(s,u,(t+1|0)==(0|u),2,0)){t=0|l[i>>2];break}r[e+280>>0]=1,t=0;break e}}while(0);de((0|l[s>>2])+(t<<1)|0,0,u-t<<1|0)}l[i>>2]=u}if(!u){l[o>>2]=866,l[o+4>>2]=910,l[o+8>>2]=1497,Oe(n,812,o),$e(n),t=1;break}for(i=0,e=0,n=0,t=0|l[s>>2];;){if(n=(s=0|X(h,d))+n&255,e=(0|X(h,d))+e&255,a[t>>1]=e<<8|n,(i=i+1|0)>>>0>=u>>>0){t=1;break}t=t+2|0}}else t=0}while(0);return ce(d),v=f,0|(d=t)}(e)&&0|function(e){var t,i,n,o,s,u,h=0,d=0,f=0,p=0,_=0,m=0,g=0,x=0,y=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,D=0,I=0,B=0,F=0,N=0,G=0,z=0,U=0,V=0,W=0,H=0,q=0,j=0;if(u=v,v=v+2416|0,m=u,_=u+1904|0,H=u+1880|0,n=u+980|0,o=u+80|0,s=u+16|0,d=0|l[88+(e|=0)>>2],t=(0|c[d+63>>0])<<8|0|c[d+64>>0],i=e+92|0,h=(0|l[e+4>>2])+((0|c[d+58>>0])<<8|(0|c[d+57>>0])<<16|0|c[d+59>>0])|0,!(d=(0|c[d+61>>0])<<8|(0|c[d+60>>0])<<16|0|c[d+62>>0]))return v=u,0;if(l[i>>2]=h,l[e+96>>2]=h,l[e+104>>2]=d,l[e+100>>2]=h+d,l[e+108>>2]=0,l[e+112>>2]=0,l[H+20>>2]=0,l[H>>2]=0,l[H+4>>2]=0,l[H+8>>2]=0,l[H+12>>2]=0,r[H+16>>0]=0,0|k(i,H)){for(h=0,d=-7,f=-7;l[n+(h<<2)>>2]=f,l[o+(h<<2)>>2]=d,p=(0|f)>6,225!=(0|(h=h+1|0));)d=(1&p)+d|0,f=p?-7:f+1|0;d=(h=s)+64|0;do{l[h>>2]=0,h=h+4|0}while((0|h)<(0|d));p=e+284|0,d=3*t|0,h=0|l[(f=e+288|0)>>2];e:do{if((0|h)==(0|d))g=13;else{if(h>>>0<=d>>>0){do{if((0|l[e+292>>2])>>>0<d>>>0){if(0|K(p,d,(h+1|0)==(0|d),2,0)){h=0|l[f>>2];break}r[e+296>>0]=1,h=0;break e}}while(0);de((0|l[p>>2])+(h<<1)|0,0,d-h<<1|0)}l[f>>2]=d,g=13}}while(0);do{if(13==(0|g)){if(!t){l[m>>2]=866,l[m+4>>2]=910,l[m+8>>2]=1497,Oe(_,812,m),$e(_),h=1;break}for(A=s+4|0,L=s+8|0,M=s+12|0,R=s+16|0,O=s+20|0,D=s+24|0,I=s+28|0,B=s+32|0,F=s+36|0,N=s+40|0,G=s+44|0,z=s+48|0,U=s+52|0,V=s+56|0,W=s+60|0,P=0,h=0|l[p>>2],d=0|l[s>>2],f=0|l[A>>2],p=0|l[L>>2],e=0|l[M>>2],_=0|l[R>>2],m=0|l[O>>2],g=0|l[D>>2],x=0|l[I>>2],y=0|l[B>>2],$=0|l[F>>2],b=0|l[N>>2],T=0|l[G>>2],C=0,S=0,w=0,E=0;j=0|X(i,H),d=d+(0|l[n+(j<<2)>>2])&7,f=f+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),p=p+(0|l[n+(j<<2)>>2])&7,e=e+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),_=_+(0|l[n+(j<<2)>>2])&7,m=m+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),g=g+(0|l[n+(j<<2)>>2])&7,x=x+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),y=y+(0|l[n+(j<<2)>>2])&7,$=$+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),b=b+(0|l[n+(j<<2)>>2])&7,T=T+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),C=C+(0|l[n+(j<<2)>>2])&7,S=S+(0|l[o+(j<<2)>>2])&7,j=0|X(i,H),w=w+(0|l[n+(j<<2)>>2])&7,E=E+(0|l[o+(j<<2)>>2])&7,j=0|c[1445+m>>0],a[h>>1]=(0|c[1445+f>>0])<<3|0|c[1445+d>>0]|(0|c[1445+p>>0])<<6|(0|c[1445+e>>0])<<9|(0|c[1445+_>>0])<<12|j<<15,q=0|c[1445+b>>0],a[h+2>>1]=(0|c[1445+g>>0])<<2|j>>>1|(0|c[1445+x>>0])<<5|(0|c[1445+y>>0])<<8|(0|c[1445+$>>0])<<11|q<<14,a[h+4>>1]=(0|c[1445+T>>0])<<1|q>>>2|(0|c[1445+C>>0])<<4|(0|c[1445+S>>0])<<7|(0|c[1445+w>>0])<<10|(0|c[1445+E>>0])<<13,!((P=P+1|0)>>>0>=t>>>0);)h=h+6|0;l[s>>2]=d,l[A>>2]=f,l[L>>2]=p,l[M>>2]=e,l[R>>2]=_,l[O>>2]=m,l[D>>2]=g,l[I>>2]=x,l[B>>2]=y,l[F>>2]=$,l[N>>2]=b,l[G>>2]=T,l[z>>2]=C,l[U>>2]=S,l[V>>2]=w,l[W>>2]=E,h=1}}while(0)}else h=0;return ce(H),v=u,0|h}(e))?0|(o=0):0|(o=1)):0|(o=0)):(l[e+88>>2]=0,0|(o=0))}(d,e,t)?(v=m,0|(g=d)):(Y(d),7&d?(l[p>>2]=866,l[p+4>>2]=2506,l[p+8>>2]=1232,Oe(h,812,p),$e(h),v=m,0|(g=0)):(_e(d,0,0,1,0),v=m,0|(g=0)))}(e,t),t=s+o|0;do{if(t>>>0>o>>>0){if(!g){for(n=i;n=n+(0|T(0|T((p+3|0)>>>2,x),(_+3|0)>>>2))|0,(0|(o=o+1|0))!=(0|t);)_>>>=1,p>>>=1;l[h>>2]=n;break}for(e=_,n=i;_=0|T((p+3|0)>>>2,x),!(o>>>0>15|(m=0|T(_,(e+3|0)>>>2))>>>0<8)&&519686845==(0|l[g>>2])&&(le(g,h,m,_,o),n=0|l[h>>2]),n=n+m|0,l[h>>2]=n,(0|(o=o+1|0))!=(0|t);)e>>>=1,p>>>=1}}while(0);if(g){if(519686845==(0|l[g>>2]))return Y(g),7&g?(l[d>>2]=866,l[d+4>>2]=2506,l[d+8>>2]=1232,Oe(u,812,d),$e(u),void(v=f)):(_e(g,0,0,1,0),void(v=f));v=f}else v=f},_memset:de,_sbrk:Se,_memcpy:J,stackAlloc:function(e){var t;return t=v,v=(v=v+(e|=0)|0)+15&-16,0|t},_crn_get_height:function(e,t){var i,n;return e|=0,t|=0,n=v,v=v+48|0,l[(i=n)>>2]=40,oe(e,t,i),v=n,0|l[i+8>>2]},dynCall_vi:function(e,t){t|=0,lt[7&(e|=0)](0|t)},getTempRet0:function(){return 0|b},_crn_get_levels:function(e,t){var i,n;return e|=0,t|=0,n=v,v=v+48|0,l[(i=n)>>2]=40,oe(e,t,i),v=n,0|l[i+12>>2]},_crn_get_uncompressed_size:function(e,t,i){e|=0,t|=0,i|=0;var n,r,o,a,s=0,u=0;switch(a=v,v=v+576|0,o=a+40|0,r=a+56|0,l[(u=a)>>2]=40,oe(e,t,u),n=(3+((0|l[u+4>>2])>>>i)|0)>>>2,t=(3+((0|l[u+8>>2])>>>i)|0)>>>2,e=0|l[(i=u+32|0)+4>>2],0|l[i>>2]){case 0:case 9:case 10:e?s=14:e=8;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:s=e?14:13;break;default:s=14}return 13==(0|s)?e=16:14==(0|s)&&(l[o>>2]=866,l[o+4>>2]=2672,l[o+8>>2]=1251,Oe(r,812,o),$e(r),e=0),u=0|T(0|T(t,n),e),v=a,0|u},_i64Add:Ge,dynCall_iiii:function(e,t,i,n){return t|=0,i|=0,n|=0,0|at[7&(e|=0)](0|t,0|i,0|n)},_emscripten_get_global_libc:function(){return 5072},dynCall_ii:function(e,t){return t|=0,0|ut[1&(e|=0)](0|t)},___udivdi3:je,_llvm_bswap_i32:Xe,dynCall_viiiii:function(e,t,i,n,r,o){t|=0,i|=0,n|=0,r|=0,o|=0,st[3&(e|=0)](0|t,0|i,0|n,0|r,0|o)},___cxa_can_catch:function(e,t,i){var n,r;return e|=0,t|=0,i|=0,r=v,v=v+16|0,l[(n=r)>>2]=l[i>>2],(e=0|at[7&l[16+(0|l[e>>2])>>2]](e,t,n))&&(l[i>>2]=l[n>>2]),v=r,1&e|0},_free:H,runPostSets:function(){},dynCall_viiiiii:function(e,t,i,n,r,o,a){t|=0,i|=0,n|=0,r|=0,o|=0,a|=0,dt[3&(e|=0)](0|t,0|i,0|n,0|r,0|o,0|a)},establishStackSpace:function(e,t){v=e|=0},___uremdi3:Me,___cxa_is_pointer_type:function(e){return 1&(e=(e|=0)?0!=(0|ie(e,32,88,0)):0)|0},stackRestore:function(e){v=e|=0},_malloc:z,_emscripten_replace_memory:function(e){return!(16777215&g(e)||g(e)<=16777215||g(e)>2147483648)&&(r=new n(e),a=new o(e),l=new s(e),c=new u(e),d=new h(e),new f(e),new p(e),m=new _(e),i=e,!0)},dynCall_v:function(e){ht[3&(e|=0)]()},_crn_get_width:function(e,t){var i,n;return e|=0,t|=0,n=v,v=v+48|0,l[(i=n)>>2]=40,oe(e,t,i),v=n,0|l[i+4>>2]},_crn_get_dxt_format:function(e,t){var i,n;return e|=0,t|=0,n=v,v=v+48|0,l[(i=n)>>2]=40,oe(e,t,i),v=n,0|l[i+32>>2]}}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer);Module.stackSave=asm.stackSave,Module.getTempRet0=asm.getTempRet0,Module._memset=asm._memset,Module.setThrew=asm.setThrew,Module._bitshift64Lshr=asm._bitshift64Lshr,Module._bitshift64Shl=asm._bitshift64Shl,Module.setTempRet0=asm.setTempRet0,Module._crn_decompress=asm._crn_decompress,Module._crn_get_bytes_per_block=asm._crn_get_bytes_per_block,Module._sbrk=asm._sbrk,Module._memcpy=asm._memcpy,Module.stackAlloc=asm.stackAlloc,Module._crn_get_height=asm._crn_get_height,Module._i64Subtract=asm._i64Subtract,Module._crn_get_levels=asm._crn_get_levels,Module._crn_get_uncompressed_size=asm._crn_get_uncompressed_size,Module._i64Add=asm._i64Add,Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,Module.___udivdi3=asm.___udivdi3,Module._llvm_bswap_i32=asm._llvm_bswap_i32,Module.___cxa_can_catch=asm.___cxa_can_catch;var _free=Module._free=asm._free;Module.runPostSets=asm.runPostSets,Module.establishStackSpace=asm.establishStackSpace,Module.___uremdi3=asm.___uremdi3,Module.___cxa_is_pointer_type=asm.___cxa_is_pointer_type,Module.stackRestore=asm.stackRestore;var _malloc=Module._malloc=asm._malloc,_emscripten_replace_memory=Module._emscripten_replace_memory=asm._emscripten_replace_memory,initialStackTop;function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function run(e){function t(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(e),postRun()))}e=e||Module.arguments,runDependencies>0||(preRun(),runDependencies>0)||Module.calledRun||(Module.setStatus?(Module.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module.setStatus("")}),1),t()}),1)):t())}function exit(e,t){t&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(e)),ENVIRONMENT_IS_NODE&&process.exit(e),Module.quit(e,new ExitStatus(e)))}Module._crn_get_width=asm._crn_get_width,Module._crn_get_dxt_format=asm._crn_get_dxt_format,Module.dynCall_iiii=asm.dynCall_iiii,Module.dynCall_viiiii=asm.dynCall_viiiii,Module.dynCall_vi=asm.dynCall_vi,Module.dynCall_ii=asm.dynCall_ii,Module.dynCall_viii=asm.dynCall_viii,Module.dynCall_v=asm.dynCall_v,Module.dynCall_viiiiii=asm.dynCall_viiiiii,Module.dynCall_viiii=asm.dynCall_viiii,Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm,ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus,dependenciesFulfilled=function e(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=e)},Module.callMain=Module.callMain=function(e){e=e||[],ensureInitRuntime();var t=e.length+1;function i(){for(var e=0;e<3;e++)n.push(0)}var n=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];i();for(var r=0;r<t-1;r+=1)n.push(allocate(intArrayFromString(e[r]),"i8",ALLOC_NORMAL)),i();n.push(0),n=allocate(n,"i32",ALLOC_NORMAL);try{exit(Module._main(t,n,0),!0)}catch(e){if(e instanceof ExitStatus)return;if("SimulateInfiniteLoop"==e)return void(Module.noExitRuntime=!0);var o=e;e&&"object"==typeof e&&e.stack&&(o=[e,e.stack]),Module.printErr("exception thrown: "+o),Module.quit(1,e)}},Module.run=Module.run=run,Module.exit=Module.exit=exit;var abortDecorators=[];function abort(e){Module.onAbort&&Module.onAbort(e),void 0!==e?(Module.print(e),Module.printErr(e),e=JSON.stringify(e)):e="",ABORT=!0;var t="abort("+e+") at "+stackTrace()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw abortDecorators&&abortDecorators.forEach((function(i){t=i(t,e)})),t}if(Module.abort=Module.abort=abort,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),Module.noExitRuntime=!0,run();var Module$1=Module,G;typeof ko<"u"&&(G=ko),function(e){var t=this||(0,eval)("this"),i=t.document,n=t.navigator,r=t.jQuery,o=t.JSON;r||typeof jQuery>"u"||(r=jQuery),function(a,s){function l(e,t){return(null===e||typeof e in _)&&e===t}function u(t,i){var n;return function(){n||(n=p.a.setTimeout((function(){n=e,t()}),i))}}function c(e,t){var i;return function(){clearTimeout(i),i=p.a.setTimeout(e,t)}}function h(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function d(e,t){null!==t&&t.s&&t.s()}function f(e,t){var i=this.qd,n=i[v];n.ra||(this.Qb&&this.mb[t]?(i.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):n.I[t]||i.uc(t,e,n.J?{da:e}:i.$c(e)),e.Ja&&e.gd())}var p=typeof a<"u"?a:{};p.b=function(e,t){for(var i=e.split("."),n=p,r=0;r<i.length-1;r++)n=n[i[r]];n[i[i.length-1]]=t},p.L=function(e,t,i){e[t]=i},p.version="3.5.1",p.b("version",p.version),p.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},p.a=function(){function a(e,t){for(var i in e)c.call(e,i)&&t(i,e[i])}function s(e,t){if(t)for(var i in t)c.call(t,i)&&(e[i]=t[i]);return e}function l(e,t){return e.__proto__=t,e}function u(e,t,i,n){var r=e[t].match(y)||[];p.a.D(i.match(y),(function(e){p.a.Na(r,e,n)})),e[t]=r.join(" ")}var c=Object.prototype.hasOwnProperty,h={__proto__:[]}instanceof Array,d="function"==typeof Symbol,f={},_={};f[n&&/Firefox\/2/i.test(n.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],f.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),a(f,(function(e,t){if(t.length)for(var i=0,n=t.length;i<n;i++)_[t[i]]=e}));var m,g={propertychange:!0},x=i&&function(){for(var t=3,n=i.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e",r[0];);return 4<t?t:e}(),y=/\S+/g;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(e,t,i){for(var n=0,r=e.length;n<r;n++)t.call(i,e[n],n,e)},A:"function"==typeof Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t)}:function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},Lb:function(t,i,n){for(var r=0,o=t.length;r<o;r++)if(i.call(n,t[r],r,t))return t[r];return e},Pa:function(e,t){var i=p.a.A(e,t);0<i?e.splice(i,1):0===i&&e.shift()},wc:function(e){var t=[];return e&&p.a.D(e,(function(e){0>p.a.A(t,e)&&t.push(e)})),t},Mb:function(e,t,i){var n=[];if(e)for(var r=0,o=e.length;r<o;r++)n.push(t.call(i,e[r],r));return n},jb:function(e,t,i){var n=[];if(e)for(var r=0,o=e.length;r<o;r++)t.call(i,e[r],r)&&n.push(e[r]);return n},Nb:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var i=0,n=t.length;i<n;i++)e.push(t[i]);return e},Na:function(e,t,i){var n=p.a.A(p.a.bc(e),t);0>n?i&&e.push(t):i||e.splice(n,1)},Ba:h,extend:s,setPrototypeOf:l,Ab:h?l:s,P:a,Ga:function(e,t,i){if(!e)return e;var n,r={};for(n in e)c.call(e,n)&&(r[n]=t.call(i,e[n],n,e));return r},Tb:function(e){for(;e.firstChild;)p.removeNode(e.firstChild)},Yb:function(e){for(var t=((e=p.a.la(e))[0]&&e[0].ownerDocument||i).createElement("div"),n=0,r=e.length;n<r;n++)t.appendChild(p.oa(e[n]));return t},Ca:function(e,t){for(var i=0,n=e.length,r=[];i<n;i++){var o=e[i].cloneNode(!0);r.push(t?p.oa(o):o)}return r},va:function(e,t){if(p.a.Tb(e),t)for(var i=0,n=t.length;i<n;i++)e.appendChild(t[i])},Xc:function(e,t){var i=e.nodeType?[e]:e;if(0<i.length){for(var n=i[0],r=n.parentNode,o=0,a=t.length;o<a;o++)r.insertBefore(t[o],n);for(o=0,a=i.length;o<a;o++)p.removeNode(i[o])}},Ua:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.splice(0,1);for(;1<e.length&&e[e.length-1].parentNode!==t;)e.length--;if(1<e.length){var i=e[0],n=e[e.length-1];for(e.length=0;i!==n;)e.push(i),i=i.nextSibling;e.push(n)}}return e},Zc:function(e,t){7>x?e.setAttribute("selected",t):e.selected=t},Db:function(t){return null===t||t===e?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},vd:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(1!==e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Sb:function(e){return p.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!p.a.Lb(e,p.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return p.onError?function(){try{return e.apply(this,arguments)}catch(e){throw p.onError&&p.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(p.a.Ac(e),t)},Gc:function(e){setTimeout((function(){throw p.onError&&p.onError(e),e}),0)},B:function(e,t,i){var n=p.a.Ac(i);if(i=g[t],p.options.useOnlyNativeEvents||i||!r)if(i||"function"!=typeof e.addEventListener){if(!(typeof e.attachEvent<"u"))throw Error("Browser doesn't support addEventListener or attachEvent");var o=function(t){n.call(e,t)},a="on"+t;e.attachEvent(a,o),p.a.K.za(e,(function(){e.detachEvent(a,o)}))}else e.addEventListener(t,n,!1);else m||(m="function"==typeof r(e).on?"on":"bind"),r(e)[m](t,n)},Fb:function(e,n){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var o;if(o=!("input"!==p.a.R(e)||!e.type||"click"!=n.toLowerCase()||"checkbox"!=(o=e.type)&&"radio"!=o),p.options.useOnlyNativeEvents||!r||o)if("function"==typeof i.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(o=i.createEvent(_[n]||"HTMLEvents")).initEvent(n,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(o)}else if(o&&e.click)e.click();else{if(!(typeof e.fireEvent<"u"))throw Error("Browser doesn't support triggering events");e.fireEvent("on"+n)}else r(e).trigger(n)},f:function(e){return p.O(e)?e():e},bc:function(e){return p.O(e)?e.v():e},Eb:function(e,t,i){var n;t&&("object"==typeof e.classList?(n=e.classList[i?"add":"remove"],p.a.D(t.match(y),(function(t){n.call(e.classList,t)}))):"string"==typeof e.className.baseVal?u(e.className,"baseVal",t,i):u(e,"className",t,i))},Bb:function(t,i){var n=p.a.f(i);(null===n||n===e)&&(n="");var r=p.h.firstChild(t);!r||3!=r.nodeType||p.h.nextSibling(r)?p.h.va(t,[t.ownerDocument.createTextNode(n)]):r.data=n,p.a.Ad(t)},Yc:function(e,t){if(e.name=t,7>=x)try{var n=e.name.replace(/[&<>'"]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}));e.mergeAttributes(i.createElement("<input name='"+n+"'/>"),!1)}catch{}},Ad:function(e){9<=x&&(e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom)},wd:function(e){if(x){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=p.a.f(e),t=p.a.f(t);for(var i=[],n=e;n<=t;n++)i.push(n);return i},la:function(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(e[i]);return t},Da:function(e){return d?Symbol(e):e},Zd:6===x,$d:7===x,W:x,Lc:function(e,t){for(var i=p.a.la(e.getElementsByTagName("input")).concat(p.a.la(e.getElementsByTagName("textarea"))),n="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},r=[],o=i.length-1;0<=o;o--)n(i[o])&&r.push(i[o]);return r},Nd:function(e){return"string"==typeof e&&(e=p.a.Db(e))?o&&o.parse?o.parse(e):new Function("return "+e)():null},hc:function(e,t,i){if(!o||!o.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js.");return o.stringify(p.a.f(e),t,i)},Od:function(e,t,n){var r=(n=n||{}).params||{},o=n.includeFields||this.Jc,s=e;if("object"==typeof e&&"form"===p.a.R(e)){s=e.action;for(var l=o.length-1;0<=l;l--)for(var u=p.a.Lc(e,o[l]),c=u.length-1;0<=c;c--)r[u[c].name]=u[c].value}t=p.a.f(t);var h=i.createElement("form");for(var d in h.style.display="none",h.action=s,h.method="post",t)(e=i.createElement("input")).type="hidden",e.name=d,e.value=p.a.hc(p.a.f(t[d])),h.appendChild(e);a(r,(function(e,t){var n=i.createElement("input");n.type="hidden",n.name=e,n.value=t,h.appendChild(n)})),i.body.appendChild(h),n.submitter?n.submitter(h):h.submit(),setTimeout((function(){h.parentNode.removeChild(h)}),0)}}}(),p.b("utils",p.a),p.b("utils.arrayForEach",p.a.D),p.b("utils.arrayFirst",p.a.Lb),p.b("utils.arrayFilter",p.a.jb),p.b("utils.arrayGetDistinctValues",p.a.wc),p.b("utils.arrayIndexOf",p.a.A),p.b("utils.arrayMap",p.a.Mb),p.b("utils.arrayPushAll",p.a.Nb),p.b("utils.arrayRemoveItem",p.a.Pa),p.b("utils.cloneNodes",p.a.Ca),p.b("utils.createSymbolOrString",p.a.Da),p.b("utils.extend",p.a.extend),p.b("utils.fieldsIncludedWithJsonPost",p.a.Jc),p.b("utils.getFormFields",p.a.Lc),p.b("utils.objectMap",p.a.Ga),p.b("utils.peekObservable",p.a.bc),p.b("utils.postJson",p.a.Od),p.b("utils.parseJson",p.a.Nd),p.b("utils.registerEventHandler",p.a.B),p.b("utils.stringifyJson",p.a.hc),p.b("utils.range",p.a.Pd),p.b("utils.toggleDomNodeCssClass",p.a.Eb),p.b("utils.triggerEvent",p.a.Fb),p.b("utils.unwrapObservable",p.a.f),p.b("utils.objectForEach",p.a.P),p.b("utils.addOrRemoveItem",p.a.Na),p.b("utils.setTextContent",p.a.Bb),p.b("unwrap",p.a.f),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(1===arguments.length)return function(){return t.apply(e,arguments)};var i=Array.prototype.slice.call(arguments,1);return function(){var n=i.slice(0);return n.push.apply(n,arguments),t.apply(e,n)}}),p.a.g=new function(){var t,i,n=0,r="__ko__"+(new Date).getTime(),o={};return p.a.W?(t=function(t,i){var a=t[r];if(!a||"null"===a||!o[a]){if(!i)return e;a=t[r]="ko"+n++,o[a]={}}return o[a]},i=function(e){var t=e[r];return!!t&&(delete o[t],e[r]=null,!0)}):(t=function(e,t){var i=e[r];return!i&&t&&(i=e[r]={}),i},i=function(e){return!!e[r]&&(delete e[r],!0)}),{get:function(e,i){var n=t(e,!1);return n&&n[i]},set:function(i,n,r){(i=t(i,r!==e))&&(i[n]=r)},Ub:function(e,i,n){return(e=t(e,!0))[i]||(e[i]=n)},clear:i,Z:function(){return n+++r}}},p.b("utils.domData",p.a.g),p.b("utils.domData.clear",p.a.g.clear),p.a.K=new function(){function t(t,i){var n=p.a.g.get(t,o);return n===e&&i&&(n=[],p.a.g.set(t,o,n)),n}function i(e){if(i=t(e,!1))for(var i=i.slice(0),r=0;r<i.length;r++)i[r](e);p.a.g.clear(e),p.a.K.cleanExternalData(e),s[e.nodeType]&&n(e.childNodes,!0)}function n(e,t){for(var n,r=[],o=0;o<e.length;o++)if((!t||8===e[o].nodeType)&&(i(r[r.length]=n=e[o]),e[o]!==n))for(;o--&&-1==p.a.A(r,e[o]););}var o=p.a.g.Z(),a={1:!0,8:!0,9:!0},s={1:!0,9:!0};return{za:function(e,i){if("function"!=typeof i)throw Error("Callback must be a function");t(e,!0).push(i)},yb:function(i,n){var r=t(i,!1);r&&(p.a.Pa(r,n),0==r.length&&p.a.g.set(i,o,e))},oa:function(e){return p.u.G((function(){a[e.nodeType]&&(i(e),s[e.nodeType]&&n(e.getElementsByTagName("*")))})),e},removeNode:function(e){p.oa(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){r&&"function"==typeof r.cleanData&&r.cleanData([e])}}},p.oa=p.a.K.oa,p.removeNode=p.a.K.removeNode,p.b("cleanNode",p.oa),p.b("removeNode",p.removeNode),p.b("utils.domNodeDisposal",p.a.K),p.b("utils.domNodeDisposal.addDisposeCallback",p.a.K.za),p.b("utils.domNodeDisposal.removeDisposeCallback",p.a.K.yb),function(){var n=[0,"",""],o=[1,"<table>","</table>"],a=[3,"<table><tbody><tr>","</tr></tbody></table>"],s=[1,"<select multiple='multiple'>","</select>"],l={thead:o,tbody:o,tfoot:o,tr:[2,"<table><tbody>","</tbody></table>"],td:a,th:a,option:s,optgroup:s},u=8>=p.a.W;p.a.ua=function(e,o){var a;if(r){if(r.parseHTML)a=r.parseHTML(e,o)||[];else if((a=r.clean([e],o))&&a[0]){for(var s=a[0];s.parentNode&&11!==s.parentNode.nodeType;)s=s.parentNode;s.parentNode&&s.parentNode.removeChild(s)}}else{(a=o)||(a=i),s=a.parentWindow||a.defaultView||t;var c,h=p.a.Db(e).toLowerCase(),d=a.createElement("div");for(c=(h=h.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&l[h[1]]||n,h=c[0],c="ignored<div>"+c[1]+e+c[2]+"</div>","function"==typeof s.innerShiv?d.appendChild(s.innerShiv(c)):(u&&a.body.appendChild(d),d.innerHTML=c,u&&d.parentNode.removeChild(d));h--;)d=d.lastChild;a=p.a.la(d.lastChild.childNodes)}return a},p.a.Md=function(e,t){var i=p.a.ua(e,t);return i.length&&i[0].parentElement||p.a.Yb(i)},p.a.fc=function(t,i){if(p.a.Tb(t),null!==(i=p.a.f(i))&&i!==e)if("string"!=typeof i&&(i=i.toString()),r)r(t).html(i);else for(var n=p.a.ua(i,t.ownerDocument),o=0;o<n.length;o++)t.appendChild(n[o])}}(),p.b("utils.parseHtmlFragment",p.a.ua),p.b("utils.setHtml",p.a.fc),p.aa=function(){function t(e,i){if(e)if(8==e.nodeType)null!=(n=p.aa.Uc(e.nodeValue))&&i.push({ud:e,Kd:n});else if(1==e.nodeType)for(var n=0,r=e.childNodes,o=r.length;n<o;n++)t(r[n],i)}var i={};return{Xb:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var t=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return i[t]=e,"\x3c!--[ko_memo:"+t+"]--\x3e"},bd:function(t,n){var r=i[t];if(r===e)throw Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized.");try{return r.apply(null,n||[]),!0}finally{delete i[t]}},cd:function(e,i){var n=[];t(e,n);for(var r=0,o=n.length;r<o;r++){var a=n[r].ud,s=[a];i&&p.a.Nb(s,i),p.aa.bd(n[r].Kd,s),a.nodeValue="",a.parentNode&&a.parentNode.removeChild(a)}},Uc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),p.b("memoization",p.aa),p.b("memoization.memoize",p.aa.Xb),p.b("memoization.unmemoize",p.aa.bd),p.b("memoization.parseMemoText",p.aa.Uc),p.b("memoization.unmemoizeDomNodeAndDescendants",p.aa.cd),p.na=function(){function e(){if(a)for(var e,t=a,i=0;l<a;)if(e=o[l++]){if(l>t){if(5e3<=++i){l=a,p.a.Gc(Error("'Too much recursion' after processing "+i+" task groups."));break}t=a}try{e()}catch(e){p.a.Gc(e)}}}function n(){e(),l=a=o.length=0}var r,o=[],a=0,s=1,l=0;return r=t.MutationObserver?function(e){var t=i.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(n):i&&"onreadystatechange"in i.createElement("script")?function(e){var t=i.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,i.documentElement.removeChild(t),t=null,e()},i.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},{scheduler:r,zb:function(e){return a||p.na.scheduler(n),o[a++]=e,s++},cancel:function(e){(e-=s-a)>=l&&e<a&&(o[e]=null)},resetForTesting:function(){var e=a-l;return l=a=o.length=0,e},Sd:e}}(),p.b("tasks",p.na),p.b("tasks.schedule",p.na.zb),p.b("tasks.runEarly",p.na.Sd),p.Ta={throttle:function(e,t){e.throttleEvaluation=t;var i=null;return p.$({read:e,write:function(n){clearTimeout(i),i=p.a.setTimeout((function(){e(n)}),t)}})},rateLimit:function(e,t){var i,n,r;"number"==typeof t?i=t:(i=t.timeout,n=t.method),e.Hb=!1,r="function"==typeof n?n:"notifyWhenChangesStop"==n?c:u,e.ub((function(e){return r(e,i,t)}))},deferred:function(t,i){if(!0!==i)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");t.Hb||(t.Hb=!0,t.ub((function(i){var n,r=!1;return function(){if(!r){p.na.cancel(n),n=p.na.zb(i);try{r=!0,t.notifySubscribers(e,"dirty")}finally{r=!1}}}})))},notify:function(e,t){e.equalityComparer="always"==t?null:l}};var _={undefined:1,boolean:1,number:1,string:1};p.b("extenders",p.Ta),p.ic=function(e,t,i){this.da=e,this.lc=t,this.mc=i,this.Ib=!1,this.fb=this.Jb=null,p.L(this,"dispose",this.s),p.L(this,"disposeWhenNodeIsRemoved",this.l)},p.ic.prototype.s=function(){this.Ib||(this.fb&&p.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},p.ic.prototype.l=function(e){this.Jb=e,p.a.K.za(e,this.fb=this.s.bind(this))},p.T=function(){p.a.Ab(this,m),m.qb(this)};var m={qb:function(e){e.U={change:[]},e.sc=1},subscribe:function(e,t,i){var n=this;i=i||"change";var r=new p.ic(n,t?e.bind(t):e,(function(){p.a.Pa(n.U[i],r),n.hb&&n.hb(i)}));return n.Qa&&n.Qa(i),n.U[i]||(n.U[i]=[]),n.U[i].push(r),r},notifySubscribers:function(e,t){if("change"===(t=t||"change")&&this.Gb(),this.Wa(t)){var i="change"===t&&this.ed||this.U[t].slice(0);try{p.u.xc();for(var n,r=0;n=i[r];++r)n.Ib||n.lc(e)}finally{p.u.end()}}},ob:function(){return this.sc},Dd:function(e){return this.ob()!==e},Gb:function(){++this.sc},ub:function(e){var t,i,n,r,o,a=this,s=p.O(a);a.gb||(a.gb=a.notifySubscribers,a.notifySubscribers=h);var l=e((function(){a.Ja=!1,s&&r===a&&(r=a.nc?a.nc():a());var e=i||o&&a.sb(n,r);o=i=t=!1,e&&a.gb(n=r)}));a.qc=function(e,i){i&&a.Ja||(o=!i),a.ed=a.U.change.slice(0),a.Ja=t=!0,r=e,l()},a.pc=function(e){t||(n=e,a.gb(e,"beforeChange"))},a.rc=function(){o=!0},a.gd=function(){a.sb(n,a.v(!0))&&(i=!0)}},Wa:function(e){return this.U[e]&&this.U[e].length},Bd:function(e){if(e)return this.U[e]&&this.U[e].length||0;var t=0;return p.a.P(this.U,(function(e,i){"dirty"!==e&&(t+=i.length)})),t},sb:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},toString:function(){return"[object Object]"},extend:function(e){var t=this;return e&&p.a.P(e,(function(e,i){var n=p.Ta[e];"function"==typeof n&&(t=n(t,i)||t)})),t}};p.L(m,"init",m.qb),p.L(m,"subscribe",m.subscribe),p.L(m,"extend",m.extend),p.L(m,"getSubscriptionsCount",m.Bd),p.a.Ba&&p.a.setPrototypeOf(m,Function.prototype),p.T.fn=m,p.Qc=function(e){return null!=e&&"function"==typeof e.subscribe&&"function"==typeof e.notifySubscribers},p.b("subscribable",p.T),p.b("isSubscribable",p.Qc),p.S=p.u=function(){function e(e){n.push(i),i=e}function t(){i=n.pop()}var i,n=[],r=0;return{xc:e,end:t,cc:function(e){if(i){if(!p.Qc(e))throw Error("Only subscribable things can act as dependencies");i.od.call(i.pd,e,e.fd||(e.fd=++r))}},G:function(i,n,r){try{return e(),i.apply(n,r||[])}finally{t()}},qa:function(){if(i)return i.o.qa()},Va:function(){if(i)return i.o.Va()},Ya:function(){if(i)return i.Ya},o:function(){if(i)return i.o}}}(),p.b("computedContext",p.S),p.b("computedContext.getDependenciesCount",p.S.qa),p.b("computedContext.getDependencies",p.S.Va),p.b("computedContext.isInitial",p.S.Ya),p.b("computedContext.registerDependency",p.S.cc),p.b("ignoreDependencies",p.Yd=p.u.G);var g=p.a.Da("_latestValue");p.ta=function(e){function t(){return 0<arguments.length?(t.sb(t[g],arguments[0])&&(t.ya(),t[g]=arguments[0],t.xa()),this):(p.u.cc(t),t[g])}return t[g]=e,p.a.Ba||p.a.extend(t,p.T.fn),p.T.fn.qb(t),p.a.Ab(t,x),p.options.deferUpdates&&p.Ta.deferred(t,!0),t};var x={equalityComparer:l,v:function(){return this[g]},xa:function(){this.notifySubscribers(this[g],"spectate"),this.notifySubscribers(this[g])},ya:function(){this.notifySubscribers(this[g],"beforeChange")}};p.a.Ba&&p.a.setPrototypeOf(x,p.T.fn);var y=p.ta.Ma="__ko_proto__";x[y]=p.ta,p.O=function(e){if((e="function"==typeof e&&e[y])&&e!==x[y]&&e!==p.o.fn[y])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e},p.Za=function(e){return"function"==typeof e&&(e[y]===x[y]||e[y]===p.o.fn[y]&&e.Nc)},p.b("observable",p.ta),p.b("isObservable",p.O),p.b("isWriteableObservable",p.Za),p.b("isWritableObservable",p.Za),p.b("observable.fn",x),p.L(x,"peek",x.v),p.L(x,"valueHasMutated",x.xa),p.L(x,"valueWillMutate",x.ya),p.Ha=function(e){if("object"!=typeof(e=e||[])||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=p.ta(e),p.a.Ab(e,p.Ha.fn),e.extend({trackArrayChanges:!0})},p.Ha.fn={remove:function(e){for(var t=this.v(),i=[],n="function"!=typeof e||p.O(e)?function(t){return t===e}:e,r=0;r<t.length;r++){var o=t[r];if(n(o)){if(0===i.length&&this.ya(),t[r]!==o)throw Error("Array modified during remove; cannot remove item");i.push(o),t.splice(r,1),r--}}return i.length&&this.xa(),i},removeAll:function(t){if(t===e){var i=this.v(),n=i.slice(0);return this.ya(),i.splice(0,i.length),this.xa(),n}return t?this.remove((function(e){return 0<=p.a.A(t,e)})):[]},destroy:function(e){var t=this.v(),i="function"!=typeof e||p.O(e)?function(t){return t===e}:e;this.ya();for(var n=t.length-1;0<=n;n--){var r=t[n];i(r)&&(r._destroy=!0)}this.xa()},destroyAll:function(t){return t===e?this.destroy((function(){return!0})):t?this.destroy((function(e){return 0<=p.a.A(t,e)})):[]},indexOf:function(e){var t=this();return p.a.A(t,e)},replace:function(e,t){var i=this.indexOf(e);0<=i&&(this.ya(),this.v()[i]=t,this.xa())},sorted:function(e){var t=this().slice(0);return e?t.sort(e):t.sort()},reversed:function(){return this().slice(0).reverse()}},p.a.Ba&&p.a.setPrototypeOf(p.Ha.fn,p.ta.fn),p.a.D("pop push reverse shift sort splice unshift".split(" "),(function(e){p.Ha.fn[e]=function(){var t=this.v();this.ya(),this.zc(t,e,arguments);var i=t[e].apply(t,arguments);return this.xa(),i===t?this:i}})),p.a.D(["slice"],(function(e){p.Ha.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}})),p.Pc=function(e){return p.O(e)&&"function"==typeof e.remove&&"function"==typeof e.push},p.b("observableArray",p.Ha),p.b("isObservableArray",p.Pc),p.Ta.trackArrayChanges=function(t,i){function n(){function e(){if(u){var e,i=[].concat(t.v()||[]);t.Wa("arrayChange")&&((!l||1<u)&&(l=p.a.Pb(a,i,t.Ob)),e=l),a=i,l=null,u=0,e&&e.length&&t.notifySubscribers(e,"arrayChange")}}s?e():(s=!0,o=t.subscribe((function(){++u}),null,"spectate"),a=[].concat(t.v()||[]),l=null,r=t.subscribe(e))}if(t.Ob={},i&&"object"==typeof i&&p.a.extend(t.Ob,i),t.Ob.sparse=!0,!t.zc){var r,o,a,s=!1,l=null,u=0,c=t.Qa,h=t.hb;t.Qa=function(e){c&&c.call(t,e),"arrayChange"===e&&n()},t.hb=function(i){h&&h.call(t,i),"arrayChange"!==i||t.Wa("arrayChange")||(r&&r.s(),o&&o.s(),o=r=null,s=!1,a=e)},t.zc=function(e,t,i){function n(e,t,i){return r[r.length]={status:e,value:t,index:i}}if(s&&!u){var r=[],o=e.length,a=i.length,c=0;switch(t){case"push":c=o;case"unshift":for(t=0;t<a;t++)n("added",i[t],c+t);break;case"pop":c=o-1;case"shift":o&&n("deleted",e[c],c);break;case"splice":t=Math.min(Math.max(0,0>i[0]?o+i[0]:i[0]),o),o=1===a?o:Math.min(t+(i[1]||0),o),a=t+a-2,c=Math.max(o,a);for(var h=[],d=[],f=2;t<c;++t,++f)t<o&&d.push(n("deleted",e[t],t)),t<a&&h.push(n("added",i[f],t));p.a.Kc(d,h);break;default:return}l=r}}}};var v=p.a.Da("_state");p.o=p.$=function(t,i,n){function r(){if(0<arguments.length){if("function"!=typeof o)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return o.apply(a.nb,arguments),this}return a.ra||p.u.cc(r),(a.ka||a.J&&r.Xa())&&r.ha(),a.X}if("object"==typeof t?n=t:(n=n||{},t&&(n.read=t)),"function"!=typeof n.read)throw Error("Pass a function that returns the value of the ko.computed");var o=n.write,a={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:n.read,nb:i||n.owner,l:n.disposeWhenNodeIsRemoved||n.l||null,Sa:n.disposeWhen||n.Sa,Rb:null,I:{},V:0,Ic:null};return r[v]=a,r.Nc="function"==typeof o,p.a.Ba||p.a.extend(r,p.T.fn),p.T.fn.qb(r),p.a.Ab(r,$),n.pure?(a.wb=!0,a.J=!0,p.a.extend(r,b)):n.deferEvaluation&&p.a.extend(r,T),p.options.deferUpdates&&p.Ta.deferred(r,!0),a.l&&(a.jc=!0,a.l.nodeType||(a.l=null)),a.J||n.deferEvaluation||r.ha(),a.l&&r.ja()&&p.a.K.za(a.l,a.Rb=function(){r.s()}),r};var $={equalityComparer:l,qa:function(){return this[v].V},Va:function(){var e=[];return p.a.P(this[v].I,(function(t,i){e[i.Ka]=i.da})),e},Vb:function(e){if(!this[v].V)return!1;var t=this.Va();return-1!==p.a.A(t,e)||!!p.a.Lb(t,(function(t){return t.Vb&&t.Vb(e)}))},uc:function(e,t,i){if(this[v].wb&&t===this)throw Error("A 'pure' computed must not be called recursively");this[v].I[e]=i,i.Ka=this[v].V++,i.La=t.ob()},Xa:function(){var e,t,i=this[v].I;for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)&&(t=i[e],this.Ia&&t.da.Ja||t.da.Dd(t.La)))return!0},Jd:function(){this.Ia&&!this[v].rb&&this.Ia(!1)},ja:function(){var e=this[v];return e.ka||0<e.V},Rd:function(){this.Ja?this[v].ka&&(this[v].sa=!0):this.Hc()},$c:function(e){if(e.Hb){var t=e.subscribe(this.Jd,this,"dirty"),i=e.subscribe(this.Rd,this);return{da:e,s:function(){t.s(),i.s()}}}return e.subscribe(this.Hc,this)},Hc:function(){var e=this,t=e.throttleEvaluation;t&&0<=t?(clearTimeout(this[v].Ic),this[v].Ic=p.a.setTimeout((function(){e.ha(!0)}),t)):e.Ia?e.Ia(!0):e.ha(!0)},ha:function(e){var t=this[v],i=t.Sa,n=!1;if(!t.rb&&!t.ra){if(t.l&&!p.a.Sb(t.l)||i&&i()){if(!t.jc)return void this.s()}else t.jc=!1;t.rb=!0;try{n=this.zd(e)}finally{t.rb=!1}return n}},zd:function(t){var i=this[v],n=!1,r=i.wb?e:!i.V;n={qd:this,mb:i.I,Qb:i.V},p.u.xc({pd:n,od:f,o:this,Ya:r}),i.I={},i.V=0;var o=this.yd(i,n);return i.V?n=this.sb(i.X,o):(this.s(),n=!0),n&&(i.J?this.Gb():this.notifySubscribers(i.X,"beforeChange"),i.X=o,this.notifySubscribers(i.X,"spectate"),!i.J&&t&&this.notifySubscribers(i.X),this.rc&&this.rc()),r&&this.notifySubscribers(i.X,"awake"),n},yd:function(e,t){try{var i=e.Wc;return e.nb?i.call(e.nb):i()}finally{p.u.end(),t.Qb&&!e.J&&p.a.P(t.mb,d),e.sa=e.ka=!1}},v:function(e){var t=this[v];return(t.ka&&(e||!t.V)||t.J&&this.Xa())&&this.ha(),t.X},ub:function(e){p.T.fn.ub.call(this,e),this.nc=function(){return this[v].J||(this[v].sa?this.ha():this[v].ka=!1),this[v].X},this.Ia=function(e){this.pc(this[v].X),this[v].ka=!0,e&&(this[v].sa=!0),this.qc(this,!e)}},s:function(){var t=this[v];!t.J&&t.I&&p.a.P(t.I,(function(e,t){t.s&&t.s()})),t.l&&t.Rb&&p.a.K.yb(t.l,t.Rb),t.I=e,t.V=0,t.ra=!0,t.sa=!1,t.ka=!1,t.J=!1,t.l=e,t.Sa=e,t.Wc=e,this.Nc||(t.nb=e)}},b={Qa:function(e){var t=this,i=t[v];if(!i.ra&&i.J&&"change"==e){if(i.J=!1,i.sa||t.Xa())i.I=null,i.V=0,t.ha()&&t.Gb();else{var n=[];p.a.P(i.I,(function(e,t){n[t.Ka]=e})),p.a.D(n,(function(e,n){var r=i.I[e],o=t.$c(r.da);o.Ka=n,o.La=r.La,i.I[e]=o})),t.Xa()&&t.ha()&&t.Gb()}i.ra||t.notifySubscribers(i.X,"awake")}},hb:function(t){var i=this[v];i.ra||"change"!=t||this.Wa("change")||(p.a.P(i.I,(function(e,t){t.s&&(i.I[e]={da:t.da,Ka:t.Ka,La:t.La},t.s())})),i.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var e=this[v];return e.J&&(e.sa||this.Xa())&&this.ha(),p.T.fn.ob.call(this)}},T={Qa:function(e){"change"!=e&&"beforeChange"!=e||this.v()}};p.a.Ba&&p.a.setPrototypeOf($,p.T.fn);var C=p.ta.Ma;$[C]=p.o,p.Oc=function(e){return"function"==typeof e&&e[C]===$[C]},p.Fd=function(e){return p.Oc(e)&&e[v]&&e[v].wb},p.b("computed",p.o),p.b("dependentObservable",p.o),p.b("isComputed",p.Oc),p.b("isPureComputed",p.Fd),p.b("computed.fn",$),p.L($,"peek",$.v),p.L($,"dispose",$.s),p.L($,"isActive",$.ja),p.L($,"getDependenciesCount",$.qa),p.L($,"getDependencies",$.Va),p.xb=function(e,t){return"function"==typeof e?p.o(e,t,{pure:!0}):((e=p.a.extend({},e)).pure=!0,p.o(e,t))},p.b("pureComputed",p.xb),function(){function t(r,o,a){if(a=a||new n,"object"!=typeof(r=o(r))||null===r||r===e||r instanceof RegExp||r instanceof Date||r instanceof String||r instanceof Number||r instanceof Boolean)return r;var s=r instanceof Array?[]:{};return a.save(r,s),i(r,(function(i){var n=o(r[i]);switch(typeof n){case"boolean":case"number":case"string":case"function":s[i]=n;break;case"object":case"undefined":var l=a.get(n);s[i]=l!==e?l:t(n,o,a)}})),s}function i(e,t){if(e instanceof Array){for(var i=0;i<e.length;i++)t(i);"function"==typeof e.toJSON&&t("toJSON")}else for(i in e)t(i)}function n(){this.keys=[],this.values=[]}p.ad=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return t(e,(function(e){for(var t=0;p.O(e)&&10>t;t++)e=e();return e}))},p.toJSON=function(e,t,i){return e=p.ad(e),p.a.hc(e,t,i)},n.prototype={constructor:n,save:function(e,t){var i=p.a.A(this.keys,e);0<=i?this.values[i]=t:(this.keys.push(e),this.values.push(t))},get:function(t){return 0<=(t=p.a.A(this.keys,t))?this.values[t]:e}}}(),p.b("toJS",p.ad),p.b("toJSON",p.toJSON),p.Wd=function(e,t,i){function n(t){var n=p.xb(e,i).extend({ma:"always"}),r=n.subscribe((function(e){e&&(r.s(),t(e))}));return n.notifySubscribers(n.v()),r}return"function"!=typeof Promise||t?n(t.bind(i)):new Promise(n)},p.b("when",p.Wd),p.w={M:function(t){switch(p.a.R(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?p.a.g.get(t,p.c.options.$b):7>=p.a.W?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?p.w.M(t.options[t.selectedIndex]):e;default:return t.value}},cb:function(t,i,n){switch(p.a.R(t)){case"option":"string"==typeof i?(p.a.g.set(t,p.c.options.$b,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i):(p.a.g.set(t,p.c.options.$b,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:"");break;case"select":(""===i||null===i)&&(i=e);for(var r,o=-1,a=0,s=t.options.length;a<s;++a)if((r=p.w.M(t.options[a]))==i||""===r&&i===e){o=a;break}(n||0<=o||i===e&&1<t.size)&&(t.selectedIndex=o,6===p.a.W&&p.a.setTimeout((function(){t.selectedIndex=o}),0));break;default:(null===i||i===e)&&(i=""),t.value=i}}},p.b("selectExtensions",p.w),p.b("selectExtensions.readValue",p.w.M),p.b("selectExtensions.writeValue",p.w.cb),p.m=function(){function e(e){123===(e=p.a.Db(e)).charCodeAt(0)&&(e=e.slice(1,-1));var t,i=[],a=(e+="\n,").match(n),s=[],l=0;if(1<a.length){for(var u,c=0;u=a[c];++c){var h=u.charCodeAt(0);if(44===h){if(0>=l){i.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=l=0,s=[];continue}}else if(58===h){if(!l&&!t&&1===s.length){t=s.pop();continue}}else{if(47===h&&1<u.length&&(47===u.charCodeAt(1)||42===u.charCodeAt(1)))continue;47===h&&c&&1<u.length?(h=a[c-1].match(r))&&!o[h[0]]&&(a=(e=e.substr(e.indexOf(u)+1)).match(n),c=-1,u="/"):40===h||123===h||91===h?++l:41===h||125===h||93===h?--l:t||s.length||34!==h&&39!==h||(u=u.slice(1,-1))}s.push(u)}if(0<l)throw Error("Unbalanced parentheses, braces, or brackets")}return i}var t=["true","false","null","undefined"],i=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,n=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),r=/[\])"'A-Za-z0-9_$]+$/,o={in:1,return:1,typeof:1},a={};return{Ra:[],wa:a,ac:e,vb:function(n,r){function o(e,n){var r;if(!c){var h=p.getBindingHandler(e);if(h&&h.preprocess&&!(n=h.preprocess(n,e,o)))return;(h=a[e])&&(r=n,0<=p.a.A(t,r)?r=!1:(h=r.match(i),r=null!==h&&(h[1]?"Object("+h[1]+")"+h[2]:r)),h=r),h&&l.push("'"+("string"==typeof a[e]?a[e]:e)+"':function(_z){"+r+"=_z}")}u&&(n="function(){return "+n+" }"),s.push("'"+e+"':"+n)}var s=[],l=[],u=(r=r||{}).valueAccessors,c=r.bindingParams,h="string"==typeof n?e(n):n;return p.a.D(h,(function(e){o(e.key||e.unknown,e.value)})),l.length&&o("_ko_property_writers","{"+l.join(",")+" }"),s.join(",")},Id:function(e,t){for(var i=0;i<e.length;i++)if(e[i].key==t)return!0;return!1},eb:function(e,t,i,n,r){e&&p.O(e)?!p.Za(e)||r&&e.v()===n||e(n):(e=t.get("_ko_property_writers"))&&e[i]&&e[i](n)}}}(),p.b("expressionRewriting",p.m),p.b("expressionRewriting.bindingRewriteValidators",p.m.Ra),p.b("expressionRewriting.parseObjectLiteral",p.m.ac),p.b("expressionRewriting.preProcessBindings",p.m.vb),p.b("expressionRewriting._twoWayBindings",p.m.wa),p.b("jsonExpressionRewriting",p.m),p.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",p.m.vb),function(){function e(e){return 8==e.nodeType&&a.test(o?e.text:e.nodeValue)}function t(e){return 8==e.nodeType&&s.test(o?e.text:e.nodeValue)}function n(i,n){for(var r=i,o=1,a=[];r=r.nextSibling;){if(t(r)&&(p.a.g.set(r,u,!0),0==--o))return a;a.push(r),e(r)&&o++}if(!n)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function r(e,t){var i=n(e,t);return i?0<i.length?i[i.length-1].nextSibling:e.nextSibling:null}var o=i&&"\x3c!--test--\x3e"===i.createComment("test").text,a=o?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,s=o?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0},u="__ko_matchedEndComment__";p.h={ea:{},childNodes:function(t){return e(t)?n(t):t.childNodes},Ea:function(t){if(e(t))for(var i=0,n=(t=p.h.childNodes(t)).length;i<n;i++)p.removeNode(t[i]);else p.a.Tb(t)},va:function(t,i){if(e(t)){p.h.Ea(t);for(var n=t.nextSibling,r=0,o=i.length;r<o;r++)n.parentNode.insertBefore(i[r],n)}else p.a.va(t,i)},Vc:function(t,i){var n;e(t)?(n=t.nextSibling,t=t.parentNode):n=t.firstChild,n?i!==n&&t.insertBefore(i,n):t.appendChild(i)},Wb:function(t,i,n){n?(n=n.nextSibling,e(t)&&(t=t.parentNode),n?i!==n&&t.insertBefore(i,n):t.appendChild(i)):p.h.Vc(t,i)},firstChild:function(i){if(e(i))return!i.nextSibling||t(i.nextSibling)?null:i.nextSibling;if(i.firstChild&&t(i.firstChild))throw Error("Found invalid end comment, as the first child of "+i);return i.firstChild},nextSibling:function(i){if(e(i)&&(i=r(i)),i.nextSibling&&t(i.nextSibling)){var n=i.nextSibling;if(t(n)&&!p.a.g.get(n,u))throw Error("Found end comment without a matching opening comment, as child of "+i);return null}return i.nextSibling},Cd:e,Vd:function(e){return(e=(o?e.text:e.nodeValue).match(a))?e[1]:null},Sc:function(i){if(l[p.a.R(i)]){var n=i.firstChild;if(n)do{if(1===n.nodeType){var o,a=null;if(o=n.firstChild)do{if(a)a.push(o);else if(e(o)){var s=r(o,!0);s?o=s:a=[o]}else t(o)&&(a=[o])}while(o=o.nextSibling);if(o=a)for(a=n.nextSibling,s=0;s<o.length;s++)a?i.insertBefore(o[s],a):i.appendChild(o[s])}}while(n=n.nextSibling)}}}}(),p.b("virtualElements",p.h),p.b("virtualElements.allowedBindings",p.h.ea),p.b("virtualElements.emptyNode",p.h.Ea),p.b("virtualElements.insertAfter",p.h.Wb),p.b("virtualElements.prepend",p.h.Vc),p.b("virtualElements.setDomNodeChildren",p.h.va),p.ga=function(){this.nd={}},p.a.extend(p.ga.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||p.j.getComponentNameForNode(e);case 8:return p.h.Cd(e);default:return!1}},getBindings:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e):null;return p.j.tc(i,e,t,!1)},getBindingAccessors:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e,{valueAccessors:!0}):null;return p.j.tc(i,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return p.h.Vd(e);default:return null}},parseBindingsString:function(e,t,i,n){try{var r,o=this.nd,a=e+(n&&n.valueAccessors||"");if(!(r=o[a])){var s,l="with($context){with($data||{}){return{"+p.m.vb(e,n)+"}}}";s=new Function("$context","$element",l),r=o[a]=s}return r(t,i)}catch(t){throw t.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+t.message,t}}}),p.ga.instance=new p.ga,p.b("bindingProvider",p.ga),function(){function n(e){var t=(e=p.a.g.get(e,b))&&e.N;t&&(e.N=null,t.Tc())}function o(e,t,i){this.node=e,this.yc=t,this.kb=[],this.H=!1,t.N||p.a.K.za(e,n),i&&i.N&&(i.N.kb.push(e),this.Kb=i)}function a(e){return function(){return e}}function s(e){return e()}function l(e){return p.a.Ga(p.u.G(e),(function(t,i){return function(){return e()[i]}}))}function u(e,t,i){return"function"==typeof e?l(e.bind(null,t,i)):p.a.Ga(e,a)}function c(e,t){return l(this.getBindings.bind(this,e,t))}function h(e,t){var i=p.h.firstChild(t);if(i){var n,r=p.ga.instance,o=r.preprocessNode;if(o){for(;n=i;)i=p.h.nextSibling(n),o.call(r,n);i=p.h.firstChild(t)}for(;n=i;)i=p.h.nextSibling(n),d(e,n)}p.i.ma(t,p.i.H)}function d(e,t){var i=e,n=1===t.nodeType;n&&p.h.Sc(t),(n||p.ga.instance.nodeHasBindings(t))&&(i=_(t,null,e).bindingContextForDescendants),i&&!v[p.a.R(t)]&&h(i,t)}function f(e){var t=[],i={},n=[];return p.a.P(e,(function r(o){if(!i[o]){var a=p.getBindingHandler(o);a&&(a.after&&(n.push(o),p.a.D(a.after,(function(t){if(e[t]){if(-1!==p.a.A(n,t))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+n.join(", "));r(t)}})),n.length--),t.push({key:o,Mc:a})),i[o]=!0}})),t}function _(t,i,n){var r,o=p.a.g.Ub(t,b,{}),a=o.hd;if(!i){if(a)throw Error("You cannot apply bindings multiple times to the same element.");o.hd=!0}if(a||(o.context=n),o.Zb||(o.Zb={}),i&&"function"!=typeof i)r=i;else{var l=p.ga.instance,u=l.getBindingAccessors||c,h=p.$((function(){return(r=i?i(n,t):u.call(l,t,n))&&(n[g]&&n[g](),n[y]&&n[y]()),r}),null,{l:t});r&&h.ja()||(h=null)}var d,_=n;if(r){var m=function(){return p.a.Ga(h?h():r,s)},x=h?function(e){return function(){return s(h()[e])}}:function(e){return r[e]};m.get=function(e){return r[e]&&s(x(e))},m.has=function(e){return e in r},p.i.H in r&&p.i.subscribe(t,p.i.H,(function(){var e=(0,r[p.i.H])();if(e){var i=p.h.childNodes(t);i.length&&e(i,p.Ec(i[0]))}})),p.i.pa in r&&(_=p.i.Cb(t,n),p.i.subscribe(t,p.i.pa,(function(){var e=(0,r[p.i.pa])();e&&p.h.firstChild(t)&&e(t)}))),o=f(r),p.a.D(o,(function(i){var n=i.Mc.init,o=i.Mc.update,a=i.key;if(8===t.nodeType&&!p.h.ea[a])throw Error("The binding '"+a+"' cannot be used with virtual elements");try{"function"==typeof n&&p.u.G((function(){var i=n(t,x(a),m,_.$data,_);if(i&&i.controlsDescendantBindings){if(d!==e)throw Error("Multiple bindings ("+d+" and "+a+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");d=a}})),"function"==typeof o&&p.$((function(){o(t,x(a),m,_.$data,_)}),null,{l:t})}catch(e){throw e.message='Unable to process binding "'+a+": "+r[a]+'"\nMessage: '+e.message,e}}))}return{shouldBindDescendants:o=d===e,bindingContextForDescendants:o&&_}}function m(t,i){return t&&t instanceof p.fa?t:new p.fa(t,e,e,i)}var g=p.a.Da("_subscribable"),x=p.a.Da("_ancestorBindingInfo"),y=p.a.Da("_dataDependency");p.c={};var v={script:!0,textarea:!0,template:!0};p.getBindingHandler=function(e){return p.c[e]};var $={};p.fa=function(t,i,n,r,o){function a(){var e=h?c():c,t=p.a.f(e);return i?(p.a.extend(l,i),x in i&&(l[x]=i[x])):(l.$parents=[],l.$root=t,l.ko=p),l[g]=s,u?t=l.$data:(l.$rawData=e,l.$data=t),n&&(l[n]=t),r&&r(l,i,t),i&&i[g]&&!p.S.o().Vb(i[g])&&i[g](),d&&(l[y]=d),l.$data}var s,l=this,u=t===$,c=u?e:t,h="function"==typeof c&&!p.O(c),d=o&&o.dataDependency;o&&o.exportDependencies?a():((s=p.xb(a)).v(),s.ja()?s.equalityComparer=null:l[g]=e)},p.fa.prototype.createChildContext=function(e,t,i,n){if(!n&&t&&"object"==typeof t&&(t=(n=t).as,i=n.extend),t&&n&&n.noChildContext){var r="function"==typeof e&&!p.O(e);return new p.fa($,this,null,(function(n){i&&i(n),n[t]=r?e():e}),n)}return new p.fa(e,this,t,(function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),i&&i(e)}),n)},p.fa.prototype.extend=function(e,t){return new p.fa($,this,null,(function(t){p.a.extend(t,"function"==typeof e?e(t):e)}),t)};var b=p.a.g.Z();o.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},o.prototype.sd=function(e){p.a.Pa(this.kb,e),!this.kb.length&&this.H&&this.Cc()},o.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,p.a.K.yb(this.node,n),p.i.ma(this.node,p.i.pa),this.Tc())},p.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(e,t,i,n,r){var o=p.a.g.Ub(e,b,{});return o.Fa||(o.Fa=new p.T),r&&r.notifyImmediately&&o.Zb[t]&&p.u.G(i,n,[e]),o.Fa.subscribe(i,n,t)},ma:function(t,i){var n=p.a.g.get(t,b);if(n&&(n.Zb[i]=!0,n.Fa&&n.Fa.notifySubscribers(t,i),i==p.i.H))if(n.N)n.N.Cc();else if(n.N===e&&n.Fa&&n.Fa.Wa(p.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")},Cb:function(e,t){var i=p.a.g.Ub(e,b,{});return i.N||(i.N=new o(e,i,t[x])),t[x]==i?t:t.extend((function(e){e[x]=i}))}},p.Td=function(e){return(e=p.a.g.get(e,b))&&e.context},p.ib=function(e,t,i){return 1===e.nodeType&&p.h.Sc(e),_(e,t,m(i))},p.ld=function(e,t,i){return i=m(i),p.ib(e,u(t,i,e),i)},p.Oa=function(e,t){1!==t.nodeType&&8!==t.nodeType||h(m(e),t)},p.vc=function(e,n,o){if(!r&&t.jQuery&&(r=t.jQuery),2>arguments.length){if(!(n=i.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!n||1!==n.nodeType&&8!==n.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");d(m(e,o),n)},p.Dc=function(t){return!t||1!==t.nodeType&&8!==t.nodeType?e:p.Td(t)},p.Ec=function(t){return(t=p.Dc(t))?t.$data:e},p.b("bindingHandlers",p.c),p.b("bindingEvent",p.i),p.b("bindingEvent.subscribe",p.i.subscribe),p.b("bindingEvent.startPossiblyAsyncContentBinding",p.i.Cb),p.b("applyBindings",p.vc),p.b("applyBindingsToDescendants",p.Oa),p.b("applyBindingAccessorsToNode",p.ib),p.b("applyBindingsToNode",p.ld),p.b("contextFor",p.Dc),p.b("dataFor",p.Ec)}(),function(e){function t(t,n){var a,s=Object.prototype.hasOwnProperty.call(r,t)?r[t]:e;s?s.subscribe(n):((s=r[t]=new p.T).subscribe(n),i(t,(function(e,i){var n=!(!i||!i.synchronous);o[t]={definition:e,Gd:n},delete r[t],a||n?s.notifySubscribers(e):p.na.zb((function(){s.notifySubscribers(e)}))})),a=!0)}function i(e,t){n("getConfig",[e],(function(i){i?n("loadComponent",[e,i],(function(e){t(e,i)})):t(null,null)}))}function n(t,i,r,o){o||(o=p.j.loaders.slice(0));var a=o.shift();if(a){var s=a[t];if(s){var l=!1;if(s.apply(a,i.concat((function(e){l?r(null):null!==e?r(e):n(t,i,r,o)})))!==e&&(l=!0,!a.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else n(t,i,r,o)}else r(null)}var r={},o={};p.j={get:function(i,n){var r=Object.prototype.hasOwnProperty.call(o,i)?o[i]:e;r?r.Gd?p.u.G((function(){n(r.definition)})):p.na.zb((function(){n(r.definition)})):t(i,n)},Bc:function(e){delete o[e]},oc:n},p.j.loaders=[],p.b("components",p.j),p.b("components.get",p.j.get),p.b("components.clearCachedDefinition",p.j.Bc)}(),function(){function e(e,t,i,n){function r(){0==--s&&n(o)}var o={},s=2,l=i.template;i=i.viewModel,l?a(t,l,(function(t){p.j.oc("loadTemplate",[e,t],(function(e){o.template=e,r()}))})):r(),i?a(t,i,(function(t){p.j.oc("loadViewModel",[e,t],(function(e){o[c]=e,r()}))})):r()}function n(e,t,i){if("function"==typeof t)i((function(e){return new t(e)}));else if("function"==typeof t[c])i(t[c]);else if("instance"in t){var r=t.instance;i((function(){return r}))}else"viewModel"in t?n(e,t.viewModel,i):e("Unknown viewModel value: "+t)}function r(e){switch(p.a.R(e)){case"script":return p.a.ua(e.text);case"textarea":return p.a.ua(e.value);case"template":if(o(e.content))return p.a.Ca(e.content.childNodes)}return p.a.Ca(e.childNodes)}function o(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function a(e,i,n){"string"==typeof i.require?s||t.require?(s||t.require)([i.require],(function(e){e&&"object"==typeof e&&e.Xd&&e.default&&(e=e.default),n(e)})):e("Uses require, but no AMD loader is present"):n(i)}function l(e){return function(t){throw Error("Component '"+e+"': "+t)}}var u={};p.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(p.j.tb(e))throw Error("Component "+e+" is already registered");u[e]=t},p.j.tb=function(e){return Object.prototype.hasOwnProperty.call(u,e)},p.j.unregister=function(e){delete u[e],p.j.Bc(e)},p.j.Fc={getConfig:function(e,t){t(p.j.tb(e)?u[e]:null)},loadComponent:function(t,i,n){var r=l(t);a(r,i,(function(i){e(t,r,i,n)}))},loadTemplate:function(e,n,a){if(e=l(e),"string"==typeof n)a(p.a.ua(n));else if(n instanceof Array)a(n);else if(o(n))a(p.a.la(n.childNodes));else if(n.element)if(n=n.element,t.HTMLElement?n instanceof HTMLElement:n&&n.tagName&&1===n.nodeType)a(r(n));else if("string"==typeof n){var s=i.getElementById(n);s?a(r(s)):e("Cannot find element with ID "+n)}else e("Unknown element type: "+n);else e("Unknown template value: "+n)},loadViewModel:function(e,t,i){n(l(e),t,i)}};var c="createViewModel";p.b("components.register",p.j.register),p.b("components.isRegistered",p.j.tb),p.b("components.unregister",p.j.unregister),p.b("components.defaultLoader",p.j.Fc),p.j.loaders.push(p.j.Fc),p.j.dd=u}(),function(){function e(e,i){if(n=e.getAttribute("params")){var n=t.parseBindingsString(n,i,e,{valueAccessors:!0,bindingParams:!0}),r=(n=p.a.Ga(n,(function(t){return p.o(t,null,{l:e})})),p.a.Ga(n,(function(t){var i=t.v();return t.ja()?p.o({read:function(){return p.a.f(t())},write:p.Za(i)&&function(e){t()(e)},l:e}):i})));return Object.prototype.hasOwnProperty.call(r,"$raw")||(r.$raw=n),r}return{$raw:{}}}p.j.getComponentNameForNode=function(e){var t=p.a.R(e);if(p.j.tb(t)&&(-1!=t.indexOf("-")||""+e=="[object HTMLUnknownElement]"||8>=p.a.W&&e.tagName===t))return t},p.j.tc=function(t,i,n,r){if(1===i.nodeType){var o=p.j.getComponentNameForNode(i);if(o){if((t=t||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var a={name:o,params:e(i,n)};t.component=r?function(){return a}:a}}return t};var t=new p.ga;9>p.a.W&&(p.j.register=function(e){return function(t){return e.apply(this,arguments)}}(p.j.register),i.createDocumentFragment=function(e){return function(){var t=e();return p.j.dd,t}}(i.createDocumentFragment))}(),function(){function e(e,t,i){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=p.a.Ca(t),p.h.va(i,e)}function t(e,t,i){var n=e.createViewModel;return n?n.call(e,t,i):t}var i=0;p.c.component={init:function(n,r,o,a,s){function l(){var e=u&&u.dispose;"function"==typeof e&&e.call(u),h&&h.s(),c=u=h=null}var u,c,h,d=p.a.la(p.h.childNodes(n));return p.h.Ea(n),p.a.K.za(n,l),p.o((function(){var o,a,f=p.a.f(r());if("string"==typeof f?o=f:(o=p.a.f(f.name),a=p.a.f(f.params)),!o)throw Error("No component name specified");var _=p.i.Cb(n,s),m=c=++i;p.j.get(o,(function(i){if(c===m){if(l(),!i)throw Error("Unknown component '"+o+"'");e(o,i,n);var r=t(i,a,{element:n,templateNodes:d});i=_.createChildContext(r,{extend:function(e){e.$component=r,e.$componentTemplateNodes=d}}),r&&r.koDescendantsComplete&&(h=p.i.subscribe(n,p.i.pa,r.koDescendantsComplete,r)),u=r,p.Oa(i,n)}}))}),null,{l:n}),{controlsDescendantBindings:!0}}},p.h.ea.component=!0}();var S={class:"className",for:"htmlFor"};p.c.attr={update:function(t,i){var n=p.a.f(i())||{};p.a.P(n,(function(i,n){n=p.a.f(n);var r=i.indexOf(":"),o=(r="lookupNamespaceURI"in t&&0<r&&t.lookupNamespaceURI(i.substr(0,r)),!1===n||null===n||n===e);o?r?t.removeAttributeNS(r,i):t.removeAttribute(i):n=n.toString(),8>=p.a.W&&i in S?(i=S[i],o?t.removeAttribute(i):t[i]=n):o||(r?t.setAttributeNS(r,i,n):t.setAttribute(i,n)),"name"===i&&p.a.Yc(t,o?"":n)}))}},p.c.checked={after:["value","attr"],init:function(t,i,n){function r(){var r=t.checked,o=a();if(!p.S.Ya()&&(r||!l&&!p.S.qa())){var u=p.u.G(i);if(c){var d=h?u.v():u,_=f;f=o,_!==o?r&&(p.a.Na(d,o,!0),p.a.Na(d,_,!1)):p.a.Na(d,o,r),h&&p.Za(u)&&u(d)}else s&&(o===e?o=r:r||(o=e)),p.m.eb(u,n,"checked",o,!0)}}function o(){var n=p.a.f(i()),r=a();c?(t.checked=0<=p.a.A(n,r),f=r):t.checked=s&&r===e?!!n:a()===n}var a=p.xb((function(){return n.has("checkedValue")?p.a.f(n.get("checkedValue")):d?n.has("value")?p.a.f(n.get("value")):t.value:void 0})),s="checkbox"==t.type,l="radio"==t.type;if(s||l){var u=i(),c=s&&p.a.f(u)instanceof Array,h=!(c&&u.push&&u.splice),d=l||c,f=c?a():e;l&&!t.name&&p.c.uniqueName.init(t,(function(){return!0})),p.o(r,null,{l:t}),p.a.B(t,"click",r),p.o(o,null,{l:t}),u=e}}},p.m.wa.checked=!0,p.c.checkedValue={update:function(e,t){e.value=p.a.f(t())}},p.c.class={update:function(e,t){var i=p.a.Db(p.a.f(t()));p.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=i,p.a.Eb(e,i,!0)}},p.c.css={update:function(e,t){var i=p.a.f(t());null!==i&&"object"==typeof i?p.a.P(i,(function(t,i){i=p.a.f(i),p.a.Eb(e,t,i)})):p.c.class.update(e,t)}},p.c.enable={update:function(e,t){var i=p.a.f(t());i&&e.disabled?e.removeAttribute("disabled"):i||e.disabled||(e.disabled=!0)}},p.c.disable={update:function(e,t){p.c.enable.update(e,(function(){return!p.a.f(t())}))}},p.c.event={init:function(e,t,i,n,r){var o=t()||{};p.a.P(o,(function(o){"string"==typeof o&&p.a.B(e,o,(function(e){var a,s=t()[o];if(s){try{var l=p.a.la(arguments);n=r.$data,l.unshift(n),a=s.apply(n,l)}finally{!0!==a&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===i.get(o+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}}))}))}},p.c.foreach={Rc:function(e){return function(){var t=e(),i=p.a.bc(t);return i&&"number"!=typeof i.length?(p.a.f(t),{foreach:i.data,as:i.as,noChildContext:i.noChildContext,includeDestroyed:i.includeDestroyed,afterAdd:i.afterAdd,beforeRemove:i.beforeRemove,afterRender:i.afterRender,beforeMove:i.beforeMove,afterMove:i.afterMove,templateEngine:p.ba.Ma}):{foreach:t,templateEngine:p.ba.Ma}}},init:function(e,t){return p.c.template.init(e,p.c.foreach.Rc(t))},update:function(e,t,i,n,r){return p.c.template.update(e,p.c.foreach.Rc(t),i,n,r)}},p.m.Ra.foreach=!1,p.h.ea.foreach=!0,p.c.hasfocus={init:function(e,t,i){function n(n){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var o;try{o=r.activeElement}catch{o=r.body}n=o===e}r=t(),p.m.eb(r,i,"hasfocus",n,!0),e.__ko_hasfocusLastValue=n,e.__ko_hasfocusUpdating=!1}var r=n.bind(null,!0),o=n.bind(null,!1);p.a.B(e,"focus",r),p.a.B(e,"focusin",r),p.a.B(e,"blur",o),p.a.B(e,"focusout",o),e.__ko_hasfocusLastValue=!1},update:function(e,t){var i=!!p.a.f(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===i||(i?e.focus():e.blur(),!i&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),p.u.G(p.a.Fb,null,[e,i?"focusin":"focusout"]))}},p.m.wa.hasfocus=!0,p.c.hasFocus=p.c.hasfocus,p.m.wa.hasFocus="hasfocus",p.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){p.a.fc(e,t())}},function(){function e(e,t,i){p.c[e]={init:function(e,n,r,o,a){var s,l,u,c,h,d={};if(t){o=r.get("as");var f=r.get("noChildContext");d={as:o,noChildContext:f,exportDependencies:h=!(o&&f)}}return c=(u="render"==r.get("completeOn"))||r.has(p.i.pa),p.o((function(){var r,o=p.a.f(n()),f=!i!=!o,_=!l;(h||f!==s)&&(c&&(a=p.i.Cb(e,a)),f&&((!t||h)&&(d.dataDependency=p.S.o()),r=t?a.createChildContext("function"==typeof o?o:n,d):p.S.qa()?a.extend(null,d):a),_&&p.S.qa()&&(l=p.a.Ca(p.h.childNodes(e),!0)),f?(_||p.h.va(e,p.a.Ca(l)),p.Oa(r,e)):(p.h.Ea(e),u||p.i.ma(e,p.i.H)),s=f)}),null,{l:e}),{controlsDescendantBindings:!0}}},p.m.Ra[e]=!1,p.h.ea[e]=!0}e("if"),e("ifnot",!1,!0),e("with",!0)}(),p.c.let={init:function(e,t,i,n,r){return t=r.extend(t),p.Oa(t,e),{controlsDescendantBindings:!0}}},p.h.ea.let=!0;var w={};p.c.options={init:function(e){if("select"!==p.a.R(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,n){function r(){return p.a.jb(t.options,(function(e){return e.selected}))}function o(e,t,i){var n=typeof t;return"function"==n?t(e):"string"==n?e[t]:i}function a(e,i){if(_&&c)p.i.ma(t,p.i.H);else if(f.length){var n=0<=p.a.A(f,p.w.M(i[0]));p.a.Zc(i[0],n),_&&!n&&p.u.G(p.a.Fb,null,[t,"change"])}}var s=t.multiple,l=0!=t.length&&s?t.scrollTop:null,u=p.a.f(i()),c=n.get("valueAllowUnset")&&n.has("value"),h=n.get("optionsIncludeDestroyed");i={};var d,f=[];c||(s?f=p.a.Mb(r(),p.w.M):0<=t.selectedIndex&&f.push(p.w.M(t.options[t.selectedIndex]))),u&&(typeof u.length>"u"&&(u=[u]),d=p.a.jb(u,(function(t){return h||t===e||null===t||!p.a.f(t._destroy)})),n.has("optionsCaption")&&null!==(u=p.a.f(n.get("optionsCaption")))&&u!==e&&d.unshift(w));var _=!1;i.beforeRemove=function(e){t.removeChild(e)},u=a,n.has("optionsAfterRender")&&"function"==typeof n.get("optionsAfterRender")&&(u=function(t,i){a(0,i),p.u.G(n.get("optionsAfterRender"),null,[i[0],t!==w?t:e])}),p.a.ec(t,d,(function(i,r,a){return a.length&&(f=!c&&a[0].selected?[p.w.M(a[0])]:[],_=!0),r=t.ownerDocument.createElement("option"),i===w?(p.a.Bb(r,n.get("optionsCaption")),p.w.cb(r,e)):(a=o(i,n.get("optionsValue"),i),p.w.cb(r,p.a.f(a)),i=o(i,n.get("optionsText"),a),p.a.Bb(r,i)),[r]}),i,u),c||(s?f.length&&r().length<f.length:f.length&&0<=t.selectedIndex?p.w.M(t.options[t.selectedIndex])!==f[0]:f.length||0<=t.selectedIndex)&&p.u.G(p.a.Fb,null,[t,"change"]),(c||p.S.Ya())&&p.i.ma(t,p.i.H),p.a.wd(t),l&&20<Math.abs(l-t.scrollTop)&&(t.scrollTop=l)}},p.c.options.$b=p.a.g.Z(),p.c.selectedOptions={init:function(e,t,i){function n(){var n=t(),r=[];p.a.D(e.getElementsByTagName("option"),(function(e){e.selected&&r.push(p.w.M(e))})),p.m.eb(n,i,"selectedOptions",r)}function r(){var i=p.a.f(t()),n=e.scrollTop;i&&"number"==typeof i.length&&p.a.D(e.getElementsByTagName("option"),(function(e){var t=0<=p.a.A(i,p.w.M(e));e.selected!=t&&p.a.Zc(e,t)})),e.scrollTop=n}if("select"!=p.a.R(e))throw Error("selectedOptions binding applies only to SELECT elements");var o;p.i.subscribe(e,p.i.H,(function(){o?n():(p.a.B(e,"change",n),o=p.o(r,null,{l:e}))}),null,{notifyImmediately:!0})},update:function(){}},p.m.wa.selectedOptions=!0,p.c.style={update:function(t,i){var n=p.a.f(i()||{});p.a.P(n,(function(i,n){if((null===(n=p.a.f(n))||n===e||!1===n)&&(n=""),r)r(t).css(i,n);else if(/^--/.test(i))t.style.setProperty(i,n);else{i=i.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));var o=t.style[i];t.style[i]=n,n===o||t.style[i]!=o||isNaN(n)||(t.style[i]=n+"px")}}))}},p.c.submit={init:function(e,t,i,n,r){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");p.a.B(e,"submit",(function(i){var n,o=t();try{n=o.call(r.$data,e)}finally{!0!==n&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}}))}},p.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){p.a.Bb(e,t())}},p.h.ea.text=!0,function(){if(t&&t.navigator){var i,n,r,o,a,s=function(e){if(e)return parseFloat(e[1])},l=t.navigator.userAgent;(i=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(a=s(l.match(/Edge\/([^ ]+)$/)))||s(l.match(/Chrome\/([^ ]+)/))||(n=s(l.match(/Version\/([^ ]+) Safari/)))||(r=s(l.match(/Firefox\/([^ ]+)/)))||(o=p.a.W||s(l.match(/MSIE ([^ ]+)/)))||(o=s(l.match(/rv:([^ )]+)/)))}if(8<=o&&10>o)var u=p.a.g.Z(),c=p.a.g.Z(),h=function(e){var t=this.activeElement;(t=t&&p.a.g.get(t,c))&&t(e)},d=function(e,t){var i=e.ownerDocument;p.a.g.get(i,u)||(p.a.g.set(i,u,!0),p.a.B(i,"selectionchange",h)),p.a.g.set(e,c,t)};p.c.textInput={init:function(t,s,l){function u(e,i){p.a.B(t,e,i)}function c(){var i=p.a.f(s());(null===i||i===e)&&(i=""),m!==e&&i===m?p.a.setTimeout(c,4):t.value!==i&&(y=!0,t.value=i,y=!1,g=t.value)}function h(){_||(m=t.value,_=p.a.setTimeout(f,4))}function f(){clearTimeout(_),m=_=e;var i=t.value;g!==i&&(g=i,p.m.eb(s(),l,"textInput",i))}var _,m,g=t.value,x=9==p.a.W?h:f,y=!1;o&&u("keypress",f),11>o&&u("propertychange",(function(e){y||"value"!==e.propertyName||x()})),8==o&&(u("keyup",f),u("keydown",f)),d&&(d(t,x),u("dragend",h)),(!o||9<=o)&&u("input",x),5>n&&"textarea"===p.a.R(t)?(u("keydown",h),u("paste",h),u("cut",h)):11>i?u("keydown",h):4>r?(u("DOMAutoComplete",f),u("dragdrop",f),u("drop",f)):a&&"number"===t.type&&u("keydown",h),u("change",f),u("blur",f),p.o(c,null,{l:t})}},p.m.wa.textInput=!0,p.c.textinput={preprocess:function(e,t,i){i("textInput",e)}}}(),p.c.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++p.c.uniqueName.rd;p.a.Yc(e,i)}}},p.c.uniqueName.rd=0,p.c.using={init:function(e,t,i,n,r){var o;return i.has("as")&&(o={as:i.get("as"),noChildContext:i.get("noChildContext")}),t=r.createChildContext(t,o),p.Oa(t,e),{controlsDescendantBindings:!0}}},p.h.ea.using=!0,p.c.value={init:function(t,i,n){var r=p.a.R(t),o="input"==r;if(!o||"checkbox"!=t.type&&"radio"!=t.type){var a=[],s=n.get("valueUpdate"),l=!1,u=null;s&&(a="string"==typeof s?[s]:p.a.wc(s),p.a.Pa(a,"change"));var c,h,d=function(){u=null,l=!1;var e=i(),r=p.w.M(t);p.m.eb(e,n,"value",r)};!p.a.W||!o||"text"!=t.type||"off"==t.autocomplete||t.form&&"off"==t.form.autocomplete||-1!=p.a.A(a,"propertychange")||(p.a.B(t,"propertychange",(function(){l=!0})),p.a.B(t,"focus",(function(){l=!1})),p.a.B(t,"blur",(function(){l&&d()}))),p.a.D(a,(function(e){var i=d;p.a.Ud(e,"after")&&(i=function(){u=p.w.M(t),p.a.setTimeout(d,0)},e=e.substring(5)),p.a.B(t,e,i)})),c=o&&"file"==t.type?function(){var n=p.a.f(i());null===n||n===e||""===n?t.value="":p.u.G(d)}:function(){var o=p.a.f(i()),a=p.w.M(t);null!==u&&o===u?p.a.setTimeout(c,0):(o!==a||a===e)&&("select"===r?(a=n.get("valueAllowUnset"),p.w.cb(t,o,a),a||o===p.w.M(t)||p.u.G(d)):p.w.cb(t,o))},"select"===r?p.i.subscribe(t,p.i.H,(function(){h?n.get("valueAllowUnset")?c():d():(p.a.B(t,"change",d),h=p.o(c,null,{l:t}))}),null,{notifyImmediately:!0}):(p.a.B(t,"change",d),p.o(c,null,{l:t}))}else p.ib(t,{checkedValue:i})},update:function(){}},p.m.wa.value=!0,p.c.visible={update:function(e,t){var i=p.a.f(t()),n="none"!=e.style.display;i&&!n?e.style.display="":!i&&n&&(e.style.display="none")}},p.c.hidden={update:function(e,t){p.c.visible.update(e,(function(){return!p.a.f(t())}))}},function(e){p.c[e]={init:function(t,i,n,r,o){return p.c.event.init.call(this,t,(function(){var t={};return t[e]=i(),t}),n,r,o)}}}("click"),p.ca=function(){},p.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},p.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},p.ca.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){var n=(t=t||i).getElementById(e);if(!n)throw Error("Cannot find template with ID "+e);return new p.C.F(n)}if(1==e.nodeType||8==e.nodeType)return new p.C.ia(e);throw Error("Unknown template type: "+e)},p.ca.prototype.renderTemplate=function(e,t,i,n){return e=this.makeTemplateSource(e,n),this.renderTemplateSource(e,t,i,n)},p.ca.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},p.ca.prototype.rewriteTemplate=function(e,t,i){t=t((e=this.makeTemplateSource(e,i)).text()),e.text(t),e.data("isRewritten",!0)},p.b("templateEngine",p.ca),p.kc=function(){function e(e,t,i,n){e=p.m.ac(e);for(var r=p.m.Ra,o=0;o<e.length;o++){var a=e[o].key;if(Object.prototype.hasOwnProperty.call(r,a)){var s=r[a];if("function"==typeof s){if(a=s(e[o].value))throw Error(a)}else if(!s)throw Error("This template engine does not support the '"+a+"' binding within its templates")}}return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+p.m.vb(e,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",n.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(e,t,i){t.isTemplateRewritten(e,i)||t.rewriteTemplate(e,(function(e){return p.kc.Ld(e,t)}),i)},Ld:function(n,r){return n.replace(t,(function(t,i,n,o,a){return e(a,i,n,r)})).replace(i,(function(t,i){return e(i,"\x3c!-- ko --\x3e","#comment",r)}))},md:function(e,t){return p.aa.Xb((function(i,n){var r=i.nextSibling;r&&r.nodeName.toLowerCase()===t&&p.ib(r,e,n)}))}}}(),p.b("__tr_ambtns",p.kc.md),function(){p.C={},p.C.F=function(e){if(this.F=e){var t=p.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},p.C.F.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[e];var t=arguments[0];"innerHTML"===e?p.a.fc(this.F,t):this.F[e]=t};var t=p.a.g.Z()+"_";p.C.F.prototype.data=function(e){if(1===arguments.length)return p.a.g.get(this.F,t+e);p.a.g.set(this.F,t+e,arguments[1])};var i=p.a.g.Z();p.C.F.prototype.nodes=function(){var t=this.F;if(0==arguments.length){var n=p.a.g.get(t,i)||{},r=n.lb||(3===this.ab?t.content:4===this.ab?t:e);if(!r||n.jd){var o=this.text();o&&o!==n.bb&&(r=p.a.Md(o,t.ownerDocument),p.a.g.set(t,i,{lb:r,bb:o,jd:!0}))}return r}n=arguments[0],this.ab!==e&&this.text(""),p.a.g.set(t,i,{lb:n})},p.C.ia=function(e){this.F=e},p.C.ia.prototype=new p.C.F,p.C.ia.prototype.constructor=p.C.ia,p.C.ia.prototype.text=function(){if(0==arguments.length){var t=p.a.g.get(this.F,i)||{};return t.bb===e&&t.lb&&(t.bb=t.lb.innerHTML),t.bb}p.a.g.set(this.F,i,{bb:arguments[0]})},p.b("templateSources",p.C),p.b("templateSources.domElement",p.C.F),p.b("templateSources.anonymousTemplate",p.C.ia)}(),function(){function t(e,t,i){var n;for(t=p.h.nextSibling(t);e&&(n=e)!==t;)i(n,e=p.h.nextSibling(n))}function i(e,i){if(e.length){var n=e[0],r=e[e.length-1],o=n.parentNode,a=p.ga.instance,s=a.preprocessNode;if(s){if(t(n,r,(function(e,t){var i=e.previousSibling,o=s.call(a,e);o&&(e===n&&(n=o[0]||t),e===r&&(r=o[o.length-1]||i))})),e.length=0,!n)return;n===r?e.push(n):(e.push(n,r),p.a.Ua(e,o))}t(n,r,(function(e){1!==e.nodeType&&8!==e.nodeType||p.vc(i,e)})),t(n,r,(function(e){1!==e.nodeType&&8!==e.nodeType||p.aa.cd(e,[i])})),p.a.Ua(e,o)}}function n(e){return e.nodeType?e:0<e.length?e[0]:null}function r(e,t,r,o,s){s=s||{};var l=(e&&n(e)||r||{}).ownerDocument,u=s.templateEngine||a;if(p.kc.xd(r,u,l),"number"!=typeof(r=u.renderTemplate(r,o,s,l)).length||0<r.length&&"number"!=typeof r[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(l=!1,t){case"replaceChildren":p.h.va(e,r),l=!0;break;case"replaceNode":p.a.Xc(e,r),l=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t)}return l&&(i(r,o),s.afterRender&&p.u.G(s.afterRender,null,[r,o[s.as||"$data"]]),"replaceChildren"==t&&p.i.ma(e,p.i.H)),r}function o(e,t,i){return p.O(e)?e():"function"==typeof e?e(t,i):e}var a;p.gc=function(t){if(t!=e&&!(t instanceof p.ca))throw Error("templateEngine must inherit from ko.templateEngine");a=t},p.dc=function(t,i,s,l,u){if(((s=s||{}).templateEngine||a)==e)throw Error("Set a template engine before calling renderTemplate");if(u=u||"replaceChildren",l){var c=n(l);return p.$((function(){var e=i&&i instanceof p.fa?i:new p.fa(i,null,null,null,{exportDependencies:!0}),a=o(t,e.$data,e);e=r(l,u,a,e,s),"replaceNode"==u&&(c=n(l=e))}),null,{Sa:function(){return!c||!p.a.Sb(c)},l:c&&"replaceNode"==u?c.parentNode:c})}return p.aa.Xb((function(e){p.dc(t,i,s,e,"replaceNode")}))},p.Qd=function(t,n,a,s,l){function u(e,t){p.u.G(p.a.ec,null,[s,e,h,a,c,t]),p.i.ma(s,p.i.H)}function c(e,t){i(t,d),a.afterRender&&a.afterRender(t,e),d=null}function h(e,i){d=l.createChildContext(e,{as:f,noChildContext:a.noChildContext,extend:function(e){e.$index=i,f&&(e[f+"Index"]=i)}});var n=o(t,e,d);return r(s,"ignoreTargetNode",n,d,a)}var d,f=a.as,_=!1===a.includeDestroyed||p.options.foreachHidesDestroyed&&!a.includeDestroyed;if(_||a.beforeRemove||!p.Pc(n))return p.$((function(){var t=p.a.f(n)||[];typeof t.length>"u"&&(t=[t]),_&&(t=p.a.jb(t,(function(t){return t===e||null===t||!p.a.f(t._destroy)}))),u(t)}),null,{l:s});u(n.v());var m=n.subscribe((function(e){u(n(),e)}),null,"arrayChange");return m.l(s),m};var s=p.a.g.Z(),l=p.a.g.Z();p.c.template={init:function(e,t){var i=p.a.f(t());if("string"==typeof i||"name"in i)p.h.Ea(e);else if("nodes"in i){if(i=i.nodes||[],p.O(i))throw Error('The "nodes" option must be a plain, non-observable array.');var n=i[0]&&i[0].parentNode;n&&p.a.g.get(n,l)||(n=p.a.Yb(i),p.a.g.set(n,l,!0)),new p.C.ia(e).nodes(n)}else{if(!(0<(i=p.h.childNodes(e)).length))throw Error("Anonymous template defined, but no template content was provided");n=p.a.Yb(i),new p.C.ia(e).nodes(n)}return{controlsDescendantBindings:!0}},update:function(t,i,n,r,o){var a=i();n=!0,r=null,"string"==typeof(i=p.a.f(a))?i={}:(a="name"in i?i.name:t,"if"in i&&(n=p.a.f(i.if)),n&&"ifnot"in i&&(n=!p.a.f(i.ifnot)),n&&!a&&(n=!1)),"foreach"in i?r=p.Qd(a,n&&i.foreach||[],i,t,o):n?(n=o,"data"in i&&(n=o.createChildContext(i.data,{as:i.as,noChildContext:i.noChildContext,exportDependencies:!0})),r=p.dc(a,n,i,t)):p.h.Ea(t),o=r,(i=p.a.g.get(t,s))&&"function"==typeof i.s&&i.s(),p.a.g.set(t,s,!o||o.ja&&!o.ja()?e:o)}},p.m.Ra.template=function(e){return 1==(e=p.m.ac(e)).length&&e[0].unknown||p.m.Id(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"},p.h.ea.template=!0}(),p.b("setTemplateEngine",p.gc),p.b("renderTemplate",p.dc),p.a.Kc=function(e,t,i){var n,r,o,a,s;if(e.length&&t.length)for(n=r=0;(!i||n<i)&&(a=e[r]);++r){for(o=0;s=t[o];++o)if(a.value===s.value){a.moved=s.index,s.moved=a.index,t.splice(o,1),n=o=0;break}n+=o}},p.a.Pb=function(){function e(e,t,i,n,r){var o,a,s,l,u,c=Math.min,h=Math.max,d=[],f=e.length,_=t.length,m=_-f||1,g=f+_+1;for(o=0;o<=f;o++)for(l=s,d.push(s=[]),u=c(_,o+m),a=h(0,o-1);a<=u;a++)s[a]=a?o?e[o-1]===t[a-1]?l[a-1]:c(l[a]||g,s[a-1]||g)+1:a+1:o+1;for(c=[],h=[],m=[],o=f,a=_;o||a;)_=d[o][a]-1,a&&_===d[o][a-1]?h.push(c[c.length]={status:i,value:t[--a],index:a}):o&&_===d[o-1][a]?m.push(c[c.length]={status:n,value:e[--o],index:o}):(--a,--o,r.sparse||c.push({status:"retained",value:t[a]}));return p.a.Kc(m,h,!r.dontLimitMoves&&10*f),c.reverse()}return function(t,i,n){return n="boolean"==typeof n?{dontLimitMoves:n}:n||{},i=i||[],(t=t||[]).length<i.length?e(t,i,"added","deleted",n):e(i,t,"deleted","added",n)}}(),p.b("utils.compareArrays",p.a.Pb),function(){function t(t,i,n,r,o){var a=[],s=p.$((function(){var e=i(n,o,p.a.Ua(a,t))||[];0<a.length&&(p.a.Xc(a,e),r&&p.u.G(r,null,[n,e,o])),a.length=0,p.a.Nb(a,e)}),null,{l:t,Sa:function(){return!p.a.kd(a)}});return{Y:a,$:s.ja()?s:e}}var i=p.a.g.Z(),n=p.a.g.Z();p.a.ec=function(r,o,a,s,l,u){function c(e){f={Aa:e,pb:p.ta(b++)},v.push(f),y||E.push(f)}function h(e){f=x[e],b!==f.pb.v()&&w.push(f),f.pb(b++),p.a.Ua(f.Y,r),v.push(f)}function d(e,t){if(e)for(var i=0,n=t.length;i<n;i++)p.a.D(t[i].Y,(function(n){e(n,i,t[i].Aa)}))}typeof(o=o||[]).length>"u"&&(o=[o]),s=s||{};var f,_,m,g,x=p.a.g.get(r,i),y=!x,v=[],$=0,b=0,T=[],C=[],S=[],w=[],E=[],P=0;if(y)p.a.D(o,c);else{if(!u||x&&x._countWaitingForRemove){var A=p.a.Mb(x,(function(e){return e.Aa}));u=p.a.Pb(A,o,{dontLimitMoves:s.dontLimitMoves,sparse:!0})}var L,M,R;for(A=0;L=u[A];A++)switch(M=L.moved,R=L.index,L.status){case"deleted":for(;$<R;)h($++);M===e&&((f=x[$]).$&&(f.$.s(),f.$=e),p.a.Ua(f.Y,r).length&&(s.beforeRemove&&(v.push(f),P++,f.Aa===n?f=null:S.push(f)),f&&T.push.apply(T,f.Y))),$++;break;case"added":for(;b<R;)h($++);M!==e?(C.push(v.length),h(M)):c(L.value)}for(;b<o.length;)h($++);v._countWaitingForRemove=P}p.a.g.set(r,i,v),d(s.beforeMove,w),p.a.D(T,s.beforeRemove?p.oa:p.removeNode);try{g=r.ownerDocument.activeElement}catch{}if(C.length)for(;(A=C.shift())!=e;){for(f=v[A],_=e;A;)if((m=v[--A].Y)&&m.length){_=m[m.length-1];break}for(o=0;$=f.Y[o];_=$,o++)p.h.Wb(r,$,_)}for(A=0;f=v[A];A++){for(f.Y||p.a.extend(f,t(r,a,f.Aa,l,f.pb)),o=0;$=f.Y[o];_=$,o++)p.h.Wb(r,$,_);!f.Ed&&l&&(l(f.Aa,f.Y,f.pb),f.Ed=!0,_=f.Y[f.Y.length-1])}for(g&&r.ownerDocument.activeElement!=g&&g.focus(),d(s.beforeRemove,S),A=0;A<S.length;++A)S[A].Aa=n;d(s.afterMove,w),d(s.afterAdd,E)}}(),p.b("utils.setDomNodeChildrenFromArrayMapping",p.a.ec),p.ba=function(){this.allowTemplateRewriting=!1},p.ba.prototype=new p.ca,p.ba.prototype.constructor=p.ba,p.ba.prototype.renderTemplateSource=function(e,t,i,n){return(t=9>p.a.W||!e.nodes?null:e.nodes())?p.a.la(t.cloneNode(!0).childNodes):(e=e.text(),p.a.ua(e,n))},p.ba.Ma=new p.ba,p.gc(p.ba.Ma),p.b("nativeTemplateEngine",p.ba),function(){p.$a=function(){var e=this.Hd=function(){if(!r||!r.tmpl)return 0;try{if(0<=r.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch{}return 1}();this.renderTemplateSource=function(t,n,o,a){if(a=a||i,o=o||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=t.data("precompiled");return s||(s=t.text()||"",s=r.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),t.data("precompiled",s)),t=[n.$data],n=r.extend({koBindingContext:n},o.templateOptions),(n=r.tmpl(s,t,n)).appendTo(a.createElement("div")),r.fragments={},n},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){i.write("<script type='text/html' id='"+e+"'>"+t+"<\/script>")},0<e&&(r.tmpl.tag.ko_code={open:"__.push($1 || '');"},r.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},p.$a.prototype=new p.ca,p.$a.prototype.constructor=p.$a;var e=new p.$a;0<e.Hd&&p.gc(e),p.b("jqueryTmplTemplateEngine",p.$a)}()}(t.ko={})}();var ce$1=ko;typeof window<"u"?(ko=window.ko,typeof G<"u"?window.ko=G:delete window.ko):(ko=global.ko,typeof G<"u"?global.ko=G:delete global.ko);var s$5="__knockoutObservables",o$5="__knockoutSubscribable";function f$5(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var i=this,n=c$6(e,!0);return(t=t||Object.getOwnPropertyNames(e)).forEach((function(t){if(t!==s$5&&t!==o$5&&!(t in n)){var r=e[t],o=r instanceof Array,a=i.isObservable(r)?r:o?i.observableArray(r):i.observable(r);Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:a,set:i.isWriteableObservable(a)?a:void 0}),n[t]=a,o&&d$6(i,a)}})),e}function c$6(e,t){var i=e[s$5];return!i&&t&&(i={},Object.defineProperty(e,s$5,{value:i})),i}function v$4(e,t,i){var n={owner:e,deferEvaluation:!0};if("function"==typeof i)n.read=i;else{if("value"in i)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof i.get)throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');n.read=i.get,n.write=i.set}return e[t]=this.computed(n),f$5.call(this,e,[t]),e}function d$6(e,t){var i=null;e.computed((function(){i&&(i.dispose(),i=null);var n=t();n instanceof Array&&(i=h$2(e,t,n))}))}function h$2(e,t,i){return y$5(e,i).subscribe(t)}function y$5(e,t){var i=t[o$5];if(!i){i=new e.subscribable,Object.defineProperty(t,o$5,{value:i});var n={};p$1(t,i,n),A$1(e,t,i,n)}return i}function p$1(e,t,i){["pop","push","reverse","shift","sort","splice","unshift"].forEach((function(n){var r=e[n];e[n]=function(){var e=r.apply(this,arguments);return!0!==i.pause&&t.notifySubscribers(this),e}}))}function A$1(e,t,i,n){["remove","removeAll","destroy","destroyAll","replace"].forEach((function(r){Object.defineProperty(t,r,{enumerable:!1,value:function(){var o;n.pause=!0;try{o=e.observableArray.fn[r].apply(e.observableArray(t),arguments)}finally{n.pause=!1}return i.notifySubscribers(t),o}})}))}function b$5(e,t){if(!e)return null;var i=c$6(e,!1);return i&&i[t]||null}function g$5(e,t){var i=b$5(e,t);i&&i.valueHasMutated()}function w$1(e){e.track=f$5,e.getObservable=b$5,e.valueHasMutated=g$5,e.defineProperty=v$4}var t$5={attachToKo:w$1},d$5="http://www.w3.org/2000/svg",v$3="supermap3d-svgPath-svg",g$4={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,i){var n=document.createElementNS(d$5,"svg:svg");n.setAttribute("class",v$3);var r=document.createElementNS(d$5,"path");return n.appendChild(r),e.virtualElements.setDomNodeChildren(t,[n]),e.computed({read:function(){var t=e.unwrap(i());r.setAttribute("d",e.unwrap(t.path));var o=e.unwrap(t.width),a=e.unwrap(t.height);n.setAttribute("width",o),n.setAttribute("height",a),n.setAttribute("viewBox","0 0 "+o+" "+a),t.css&&n.setAttribute("class",v$3+" "+e.unwrap(t.css))},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}};t$5.attachToKo(ce$1),g$4.register(ce$1);var j$5={};!function(){var e=function(){var e={defaultNoDataValue:-34027999387901484e22,decode:function(o,a){var s=(a=a||{}).encodedMaskData||null===a.encodedMaskData,l=r(o,a.inputOffset||0,s),u=null!==a.noDataValue?a.noDataValue:e.defaultNoDataValue,c=t(l,a.pixelType||Float32Array,a.encodedMaskData,u,a.returnMask),h={width:l.width,height:l.height,pixelData:c.resultPixels,minValue:c.minValue,maxValue:l.pixels.maxValue,noDataValue:u};return c.resultMask&&(h.maskData=c.resultMask),a.returnEncodedMask&&l.mask&&(h.encodedMaskData=l.mask.bitset?l.mask.bitset:null),a.returnFileInfo&&(h.fileInfo=i(l),a.computeUsedBitDepths&&(h.fileInfo.bitDepths=n(l))),h}},t=function(e,t,i,n,r){var a,s,l,u=0,c=e.pixels.numBlocksX,h=e.pixels.numBlocksY,d=Math.floor(e.width/c),f=Math.floor(e.height/h),p=2*e.maxZError,_=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),s=new t(e.width*e.height),r&&i&&(l=new Uint8Array(e.width*e.height));for(var m,g,x=new Float32Array(d*f),y=0;y<=h;y++){var v=y!==h?f:e.height%h;if(0!==v)for(var $=0;$<=c;$++){var b=$!==c?d:e.width%c;if(0!==b){var T,C,S,w,E=y*e.width*f+$*d,P=e.width-b,A=e.pixels.blocks[u];if(A.encoding<2?(0===A.encoding?T=A.rawData:(o(A.stuffedData,A.bitsPerPixel,A.numValidPixels,A.offset,p,x,e.pixels.maxValue),T=x),C=0):S=2===A.encoding?0:A.offset,i)for(g=0;g<v;g++){for(7&E&&(w=i[E>>3],w<<=7&E),m=0;m<b;m++)7&E||(w=i[E>>3]),128&w?(l&&(l[E]=1),_=_>(a=A.encoding<2?T[C++]:S)?a:_,s[E++]=a):(l&&(l[E]=0),s[E++]=n),w<<=1;E+=P}else if(A.encoding<2)for(g=0;g<v;g++){for(m=0;m<b;m++)_=_>(a=T[C++])?a:_,s[E++]=a;E+=P}else for(_=_>S?S:_,g=0;g<v;g++){for(m=0;m<b;m++)s[E++]=S;E+=P}if(1===A.encoding&&C!==A.numValidPixels)throw"Block and Mask do not match";u++}}}return{resultPixels:s,resultMask:l,minValue:_}},i=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},n=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,i={},n=0;n<t;n++){var r=e.pixels.blocks[n];0===r.encoding?i.float32=!0:1===r.encoding?i[r.bitsPerPixel]=!0:i[0]=!0}return Object.keys(i)},r=function(e,t,i){var n={},r=new Uint8Array(e,t,10);if(n.fileIdentifierString=String.fromCharCode.apply(null,r),"CntZImage"!==n.fileIdentifierString.trim())throw"Unexpected file identifier string: "+n.fileIdentifierString;t+=10;var o=new DataView(e,t,24);if(n.fileVersion=o.getInt32(0,!0),n.imageType=o.getInt32(4,!0),n.height=o.getUint32(8,!0),n.width=o.getUint32(12,!0),n.maxZError=o.getFloat64(16,!0),t+=24,!i)if(o=new DataView(e,t,16),n.mask={},n.mask.numBlocksY=o.getUint32(0,!0),n.mask.numBlocksX=o.getUint32(4,!0),n.mask.numBytes=o.getUint32(8,!0),n.mask.maxValue=o.getFloat32(12,!0),t+=16,n.mask.numBytes>0){var a=new Uint8Array(Math.ceil(n.width*n.height/8)),s=(o=new DataView(e,t,n.mask.numBytes)).getInt16(0,!0),l=2,u=0;do{if(s>0)for(;s--;)a[u++]=o.getUint8(l++);else{var c=o.getUint8(l++);for(s=-s;s--;)a[u++]=c}s=o.getInt16(l,!0),l+=2}while(l<n.mask.numBytes);if(-32768!==s||u<a.length)throw"Unexpected end of mask RLE encoding";n.mask.bitset=a,t+=n.mask.numBytes}else 0==(n.mask.numBytes|n.mask.numBlocksY|n.mask.maxValue)&&(n.mask.bitset=new Uint8Array(Math.ceil(n.width*n.height/8)));o=new DataView(e,t,16),n.pixels={},n.pixels.numBlocksY=o.getUint32(0,!0),n.pixels.numBlocksX=o.getUint32(4,!0),n.pixels.numBytes=o.getUint32(8,!0),n.pixels.maxValue=o.getFloat32(12,!0),t+=16;var h=n.pixels.numBlocksX,d=n.pixels.numBlocksY,f=h+(n.width%h>0?1:0),p=d+(n.height%d>0?1:0);n.pixels.blocks=new Array(f*p);for(var _=0,m=0;m<p;m++)for(var g=0;g<f;g++){var x=0,y=e.byteLength-t;o=new DataView(e,t,Math.min(10,y));var v={};n.pixels.blocks[_++]=v;var $=o.getUint8(0);if(x++,v.encoding=63&$,v.encoding>3)throw"Invalid block encoding ("+v.encoding+")";if(2!==v.encoding){if(0!==$&&2!==$){if($>>=6,v.offsetType=$,2===$)v.offset=o.getInt8(1),x++;else if(1===$)v.offset=o.getInt16(1,!0),x+=2;else{if(0!==$)throw"Invalid block offset type";v.offset=o.getFloat32(1,!0),x+=4}if(1===v.encoding)if($=o.getUint8(x),x++,v.bitsPerPixel=63&$,$>>=6,v.numValidPixelsType=$,2===$)v.numValidPixels=o.getUint8(x),x++;else if(1===$)v.numValidPixels=o.getUint16(x,!0),x+=2;else{if(0!==$)throw"Invalid valid pixel count type";v.numValidPixels=o.getUint32(x,!0),x+=4}}var b;if(t+=x,3!==v.encoding)if(0===v.encoding){var T=(n.pixels.numBytes-1)/4;if(T!==Math.floor(T))throw"uncompressed block has invalid length";b=new ArrayBuffer(4*T),new Uint8Array(b).set(new Uint8Array(e,t,4*T));var C=new Float32Array(b);v.rawData=C,t+=4*T}else if(1===v.encoding){var S=Math.ceil(v.numValidPixels*v.bitsPerPixel/8),w=Math.ceil(S/4);b=new ArrayBuffer(4*w),new Uint8Array(b).set(new Uint8Array(e,t,S)),v.stuffedData=new Uint32Array(b),t+=S}}else t++}return n.eofOffset=t,n},o=function(e,t,i,n,r,o,a){var s,l,u,c=(1<<t)-1,h=0,d=0,f=Math.ceil((a-n)/r),p=4*e.length-Math.ceil(t*i/8);for(e[e.length-1]<<=8*p,s=0;s<i;s++){if(0===d&&(u=e[h++],d=32),d>=t)l=u>>>d-t&c,d-=t;else{var _=t-d;l=(u&c)<<_&c,l+=(u=e[h++])>>>(d=32-_)}o[s]=l<f?n+l*r:a}return o};return e}(),t=function(){var e=function(e,t,i,n,r,o,a,s){var l,u,c,h,d,f=(1<<i)-1,p=0,_=0,m=4*e.length-Math.ceil(i*n/8);if(e[e.length-1]<<=8*m,r)for(l=0;l<n;l++)0===_&&(c=e[p++],_=32),_>=i?(u=c>>>_-i&f,_-=i):(u=(c&f)<<(h=i-_)&f,u+=(c=e[p++])>>>(_=32-h)),t[l]=r[u];else for(d=Math.ceil((s-o)/a),l=0;l<n;l++)0===_&&(c=e[p++],_=32),_>=i?(u=c>>>_-i&f,_-=i):(u=(c&f)<<(h=i-_)&f,u+=(c=e[p++])>>>(_=32-h)),t[l]=u<d?o+u*a:s},t=function(e,t,i,n,r,o){var a,s=(1<<t)-1,l=0,u=0,c=0,h=0,d=0,f=[],p=4*e.length-Math.ceil(t*i/8);e[e.length-1]<<=8*p;var _=Math.ceil((o-n)/r);for(u=0;u<i;u++)0===h&&(a=e[l++],h=32),h>=t?(d=a>>>h-t&s,h-=t):(d=(a&s)<<(c=t-h)&s,d+=(a=e[l++])>>>(h=32-c)),f[u]=d<_?n+d*r:o;return f.unshift(n),f},i=function(e,t,i,n,r,o,a,s){var l,u,c,h,d=(1<<i)-1,f=0,p=0,_=0;if(r)for(l=0;l<n;l++)0===p&&(c=e[f++],p=32,_=0),p>=i?(u=c>>>_&d,p-=i,_+=i):(u=c>>>_&d,p=32-(h=i-p),u|=((c=e[f++])&(1<<h)-1)<<i-h,_=h),t[l]=r[u];else{var m=Math.ceil((s-o)/a);for(l=0;l<n;l++)0===p&&(c=e[f++],p=32,_=0),p>=i?(u=c>>>_&d,p-=i,_+=i):(u=c>>>_&d,p=32-(h=i-p),u|=((c=e[f++])&(1<<h)-1)<<i-h,_=h),t[l]=u<m?o+u*a:s}return t},n=function(e,t,i,n,r,o){var a,s=(1<<t)-1,l=0,u=0,c=0,h=0,d=0,f=0,p=[],_=Math.ceil((o-n)/r);for(u=0;u<i;u++)0===h&&(a=e[l++],h=32,f=0),h>=t?(d=a>>>f&s,h-=t,f+=t):(d=a>>>f&s,h=32-(c=t-h),d|=((a=e[l++])&(1<<c)-1)<<t-c,f=c),p[u]=d<_?n+d*r:o;return p.unshift(n),p},r=function(e,t,i,n){var r,o,a,s,l=(1<<i)-1,u=0,c=0,h=4*e.length-Math.ceil(i*n/8);for(e[e.length-1]<<=8*h,r=0;r<n;r++)0===c&&(a=e[u++],c=32),c>=i?(o=a>>>c-i&l,c-=i):(o=(a&l)<<(s=i-c)&l,o+=(a=e[u++])>>>(c=32-s)),t[r]=o;return t},o=function(e,t,i,n){var r,o,a,s,l=(1<<i)-1,u=0,c=0,h=0;for(r=0;r<n;r++)0===c&&(a=e[u++],c=32,h=0),c>=i?(o=a>>>h&l,c-=i,h+=i):(o=a>>>h&l,c=32-(s=i-c),o|=((a=e[u++])&(1<<s)-1)<<i-s,h=s),t[r]=o;return t},a={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,i=65535,n=e.length,r=Math.floor(n/2),o=0;r;){var a=r>=359?359:r;r-=a;do{t+=e[o++]<<8,i+=t+=e[o++]}while(--a);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&n&&(i+=t+=e[o]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,n=new Uint8Array(e,i,6),r={};if(r.fileIdentifierString=String.fromCharCode.apply(null,n),0!==r.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+r.fileIdentifierString;i+=6;var o,a=new DataView(e,i,8),s=a.getInt32(0,!0);if(r.fileVersion=s,i+=4,s>=3&&(r.checksum=a.getUint32(4,!0),i+=4),a=new DataView(e,i,12),r.height=a.getUint32(0,!0),r.width=a.getUint32(4,!0),i+=8,s>=4?(r.numDims=a.getUint32(8,!0),i+=4):r.numDims=1,a=new DataView(e,i,40),r.numValidPixel=a.getUint32(0,!0),r.microBlockSize=a.getInt32(4,!0),r.blobSize=a.getInt32(8,!0),r.imageType=a.getInt32(12,!0),r.maxZError=a.getFloat64(16,!0),r.zMin=a.getFloat64(24,!0),r.zMax=a.getFloat64(32,!0),i+=40,t.headerInfo=r,t.ptr=i,s>=3&&(o=s>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-o,r.blobSize-14))!==r.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,n=this.getDataTypeArray(i.imageType),r=i.numDims*this.getDataTypeSize(i.imageType),o=this.readSubArray(e,t.ptr,n,r),a=this.readSubArray(e,t.ptr+r,n,r);t.ptr+=2*r;var s,l=!0;for(s=0;s<i.numDims;s++)if(o[s]!==a[s]){l=!1;break}return i.minValues=o,i.maxValues=a,l},readSubArray:function(e,t,i,n){var r;if(i===Uint8Array)r=new Uint8Array(e,t,n);else{var o=new ArrayBuffer(n);new Uint8Array(o).set(new Uint8Array(e,t,n)),r=new i(o)}return r},readMask:function(e,t){var i,n,r=t.ptr,o=t.headerInfo,a=o.width*o.height,s=o.numValidPixel,l=new DataView(e,r,4),u={};if(u.numBytes=l.getUint32(0,!0),r+=4,(0===s||a===s)&&0!==u.numBytes)throw"invalid mask";if(0===s)i=new Uint8Array(Math.ceil(a/8)),u.bitset=i,n=new Uint8Array(a),t.pixels.resultMask=n,r+=u.numBytes;else if(u.numBytes>0){i=new Uint8Array(Math.ceil(a/8));var c=(l=new DataView(e,r,u.numBytes)).getInt16(0,!0),h=2,d=0,f=0;do{if(c>0)for(;c--;)i[d++]=l.getUint8(h++);else for(f=l.getUint8(h++),c=-c;c--;)i[d++]=f;c=l.getInt16(h,!0),h+=2}while(h<u.numBytes);if(-32768!==c||d<i.length)throw"Unexpected end of mask RLE encoding";n=new Uint8Array(a);var p=0,_=0;for(_=0;_<a;_++)7&_?(p=i[_>>3],p<<=7&_):p=i[_>>3],128&p&&(n[_]=1);t.pixels.resultMask=n,u.bitset=i,r+=u.numBytes}return t.ptr=r,t.mask=u,!0},readDataOneSweep:function(e,t,i){var n,r=t.ptr,o=t.headerInfo,s=o.numDims,l=o.width*o.height,u=o.imageType,c=o.numValidPixel*a.getDataTypeSize(u)*s,h=t.pixels.resultMask;if(i===Uint8Array)n=new Uint8Array(e,r,c);else{var d=new ArrayBuffer(c);new Uint8Array(d).set(new Uint8Array(e,r,c)),n=new i(d)}if(n.length===l*s)t.pixels.resultPixels=n;else{t.pixels.resultPixels=new i(l*s);var f=0,p=0,_=0,m=0;if(s>1)for(_=0;_<s;_++)for(m=_*l,p=0;p<l;p++)h[p]&&(t.pixels.resultPixels[m+p]=n[f++]);else for(p=0;p<l;p++)h[p]&&(t.pixels.resultPixels[p]=n[f++])}return r+=c,t.ptr=r,!0},readHuffmanTree:function(e,t){var i=this.HUFFMAN_LUT_BITS_MAX,n=new DataView(e,t.ptr,16);if(t.ptr+=16,n.getInt32(0,!0)<2)throw"unsupported Huffman version";var r=n.getInt32(4,!0),o=n.getInt32(8,!0),l=n.getInt32(12,!0);if(o>=l)return!1;var u=new Uint32Array(l-o);a.decodeBits(e,t,u);var c,h,d,f,p=[];for(c=o;c<l;c++)p[h=c-(c<r?0:r)]={first:u[c-o],second:null};var _=e.byteLength-t.ptr,m=Math.ceil(_/4),g=new ArrayBuffer(4*m);new Uint8Array(g).set(new Uint8Array(e,t.ptr,_));var x,y=new Uint32Array(g),v=0,$=0;for(x=y[0],c=o;c<l;c++)(f=p[h=c-(c<r?0:r)].first)>0&&(p[h].second=x<<v>>>32-f,32-v>=f?32===(v+=f)&&(v=0,x=y[++$]):(v+=f-32,x=y[++$],p[h].second|=x>>>32-v));var b=0,T=0,C=new s;for(c=0;c<p.length;c++)void 0!==p[c]&&(b=Math.max(b,p[c].first));T=b>=i?i:b,b>=30&&console.log("WARning, large NUM LUT BITS IS "+b);var S,w,E,P,A,L=[];for(c=o;c<l;c++)if((f=p[h=c-(c<r?0:r)].first)>0)if(S=[f,h],f<=T)for(w=p[h].second<<T-f,E=1<<T-f,d=0;d<E;d++)L[w|d]=S;else for(w=p[h].second,A=C,P=f-1;P>=0;P--)w>>>P&1?(A.right||(A.right=new s),A=A.right):(A.left||(A.left=new s),A=A.left),0===P&&!A.val&&(A.val=S[1]);return{decodeLut:L,numBitsLUTQick:T,numBitsLUT:b,tree:C,stuffedData:y,srcPtr:$,bitPos:v}},readHuffman:function(e,t,i){var n,r,o,a,s,l,u,c,h,d=t.headerInfo,f=d.numDims,p=t.headerInfo.height,_=t.headerInfo.width,m=_*p,g=this.readHuffmanTree(e,t),x=g.decodeLut,y=g.tree,v=g.stuffedData,$=g.srcPtr,b=g.bitPos,T=g.numBitsLUTQick,C=g.numBitsLUT,S=0===t.headerInfo.imageType?128:0,w=t.pixels.resultMask,E=0;b>0&&($++,b=0);var P,A=v[$],L=1===t.encodeMode,M=new i(m*f),R=M;for(P=0;P<d.numDims;P++){if(f>1&&(R=new i(M.buffer,m*P,m),E=0),t.headerInfo.numValidPixel===_*p)for(c=0,l=0;l<p;l++)for(u=0;u<_;u++,c++){if(r=0,s=a=A<<b>>>32-T,32-b<T&&(s=a|=v[$+1]>>>64-b-T),x[s])r=x[s][1],b+=x[s][0];else for(s=a=A<<b>>>32-C,32-b<C&&(s=a|=v[$+1]>>>64-b-C),n=y,h=0;h<C;h++)if(!(n=a>>>C-h-1&1?n.right:n.left).left&&!n.right){r=n.val,b=b+h+1;break}b>=32&&(b-=32,A=v[++$]),o=r-S,L?(o+=u>0?E:l>0?R[c-_]:E,o&=255,R[c]=o,E=o):R[c]=o}else for(c=0,l=0;l<p;l++)for(u=0;u<_;u++,c++)if(w[c]){if(r=0,s=a=A<<b>>>32-T,32-b<T&&(s=a|=v[$+1]>>>64-b-T),x[s])r=x[s][1],b+=x[s][0];else for(s=a=A<<b>>>32-C,32-b<C&&(s=a|=v[$+1]>>>64-b-C),n=y,h=0;h<C;h++)if(!(n=a>>>C-h-1&1?n.right:n.left).left&&!n.right){r=n.val,b=b+h+1;break}b>=32&&(b-=32,A=v[++$]),o=r-S,L?(u>0&&w[c-1]?o+=E:l>0&&w[c-_]?o+=R[c-_]:o+=E,o&=255,R[c]=o,E=o):R[c]=o}t.ptr=t.ptr+4*($+1)+(b>0?4:0)}t.pixels.resultPixels=M},decodeBits:function(a,s,l,u,c){var h=s.headerInfo,d=h.fileVersion,f=0,p=a.byteLength-s.ptr>=5?5:a.byteLength-s.ptr,_=new DataView(a,s.ptr,p),m=_.getUint8(0);f++;var g=m>>6,x=0===g?4:3-g,y=(32&m)>0,v=31&m,$=0;if(1===x)$=_.getUint8(f),f++;else if(2===x)$=_.getUint16(f,!0),f+=2;else{if(4!==x)throw"Invalid valid pixel count type";$=_.getUint32(f,!0),f+=4}var b,T,C,S,w,E,P,A,L,M=2*h.maxZError,R=h.numDims>1?h.maxValues[c]:h.zMax;if(y){for(s.counter.lut++,A=_.getUint8(f),f++,S=Math.ceil((A-1)*v/8),w=Math.ceil(S/4),T=new ArrayBuffer(4*w),C=new Uint8Array(T),s.ptr+=f,C.set(new Uint8Array(a,s.ptr,S)),P=new Uint32Array(T),s.ptr+=S,L=0;A-1>>>L;)L++;S=Math.ceil($*L/8),w=Math.ceil(S/4),T=new ArrayBuffer(4*w),(C=new Uint8Array(T)).set(new Uint8Array(a,s.ptr,S)),b=new Uint32Array(T),s.ptr+=S,E=d>=3?n(P,v,A-1,u,M,R):t(P,v,A-1,u,M,R),d>=3?i(b,l,L,$,E):e(b,l,L,$,E)}else s.counter.bitstuffer++,L=v,s.ptr+=f,L>0&&(S=Math.ceil($*L/8),w=Math.ceil(S/4),T=new ArrayBuffer(4*w),(C=new Uint8Array(T)).set(new Uint8Array(a,s.ptr,S)),b=new Uint32Array(T),s.ptr+=S,d>=3?null===u?o(b,l,L,$):i(b,l,L,$,!1,u,M,R):null===u?r(b,l,L,$):e(b,l,L,$,!1,u,M,R))},readTiles:function(e,t,i){var n=t.headerInfo,r=n.width,o=n.height,s=n.microBlockSize,l=n.imageType,u=a.getDataTypeSize(l),c=Math.ceil(r/s),h=Math.ceil(o/s);t.pixels.numBlocksY=h,t.pixels.numBlocksX=c,t.pixels.ptr=0;var d,f,p,_,m,g,x,y,v=0,$=0,b=0,T=0,C=0,S=0,w=0,E=0,P=0,A=0,L=0,M=0,R=0,O=0,D=0,I=new i(s*s),B=o%s||s,F=r%s||s,N=n.numDims,G=t.pixels.resultMask,z=t.pixels.resultPixels;for(b=0;b<h;b++)for(C=b!==h-1?s:B,T=0;T<c;T++)for(A=b*r*s+T*s,L=r-(S=T!==c-1?s:F),y=0;y<N;y++){if(N>1&&(z=new i(t.pixels.resultPixels.buffer,r*o*y*u,r*o)),w=e.byteLength-t.ptr,f={},D=0,D++,P=(E=(d=new DataView(e,t.ptr,Math.min(10,w))).getUint8(0))>>6&255,(E>>2&15)!==(T*s>>3&15))throw"integrity issue";if((m=3&E)>3)throw t.ptr+=D,"Invalid block encoding ("+m+")";if(2!==m)if(0===m){if(t.counter.uncompressed++,t.ptr+=D,M=(M=C*S*u)<(R=e.byteLength-t.ptr)?M:R,p=new ArrayBuffer(M%u==0?M:M+u-M%u),new Uint8Array(p).set(new Uint8Array(e,t.ptr,M)),_=new i(p),O=0,G)for(v=0;v<C;v++){for($=0;$<S;$++)G[A]&&(z[A]=_[O++]),A++;A+=L}else for(v=0;v<C;v++){for($=0;$<S;$++)z[A++]=_[O++];A+=L}t.ptr+=O*u}else if(g=a.getDataTypeUsed(l,P),x=a.getOnePixel(f,D,g,d),D+=a.getDataTypeSize(g),3===m)if(t.ptr+=D,t.counter.constantoffset++,G)for(v=0;v<C;v++){for($=0;$<S;$++)G[A]&&(z[A]=x),A++;A+=L}else for(v=0;v<C;v++){for($=0;$<S;$++)z[A++]=x;A+=L}else if(t.ptr+=D,a.decodeBits(e,t,I,x,y),D=0,G)for(v=0;v<C;v++){for($=0;$<S;$++)G[A]&&(z[A]=I[D++]),A++;A+=L}else for(v=0;v<C;v++){for($=0;$<S;$++)z[A++]=I[D++];A+=L}else t.counter.constant++,t.ptr+=D}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:a.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t=e.headerInfo.zMax,i=e.headerInfo.numDims,n=e.headerInfo.height*e.headerInfo.width,r=n*i,o=0,a=0,s=0,l=e.pixels.resultMask;if(l)if(i>1)for(o=0;o<i;o++)for(s=o*n,a=0;a<n;a++)l[a]&&(e.pixels.resultPixels[s+a]=t);else for(a=0;a<n;a++)l[a]&&(e.pixels.resultPixels[a]=t);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(t);else for(a=0;a<r;a++)e.pixels.resultPixels[a]=t},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:default:t=Float32Array;break;case 7:t=Float64Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:default:t="F32";break;case 7:t="F64"}return t},isValidPixelValue:function(e,t){if(null===t)return!1;var i;switch(e){case 0:i=t>=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,n){var r=0;switch(i){case 0:r=n.getInt8(t);break;case 1:r=n.getUint8(t);break;case 2:r=n.getInt16(t,!0);break;case 3:r=n.getUint16(t,!0);break;case 4:r=n.getInt32(t,!0);break;case 5:r=n.getUInt32(t,!0);break;case 6:r=n.getFloat32(t,!0);break;case 7:r=n.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return r}},s=function(e,t,i){this.val=e,this.left=t,this.right=i},l={decode:function(e,t){var i=(t=t||{}).noDataValue,n=0,r={};if(r.ptr=t.inputOffset||0,r.pixels={},a.readHeaderInfo(e,r)){var o=r.headerInfo,s=o.fileVersion,l=a.getDataTypeArray(o.imageType);a.readMask(e,r),o.numValidPixel!==o.width*o.height&&!r.pixels.resultMask&&(r.pixels.resultMask=t.maskData);var u,c=o.width*o.height;if(r.pixels.resultPixels=new l(c*o.numDims),r.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==o.numValidPixel)if(o.zMax===o.zMin)a.constructConstantSurface(r);else if(s>=4&&a.checkMinMaxRanges(e,r))a.constructConstantSurface(r);else{var h=new DataView(e,r.ptr,2),d=h.getUint8(0);if(r.ptr++,d)a.readDataOneSweep(e,r,l);else if(s>1&&o.imageType<=1&&Math.abs(o.maxZError-.5)<1e-5){var f=h.getUint8(1);if(r.ptr++,r.encodeMode=f,f>2||s<4&&f>1)throw"Invalid Huffman flag "+f;f?a.readHuffman(e,r,l):a.readTiles(e,r,l)}else a.readTiles(e,r,l)}r.eofOffset=r.ptr,t.inputOffset?(u=r.headerInfo.blobSize+t.inputOffset-r.ptr,Math.abs(u)>=1&&(r.eofOffset=t.inputOffset+r.headerInfo.blobSize)):(u=r.headerInfo.blobSize-r.ptr,Math.abs(u)>=1&&(r.eofOffset=r.headerInfo.blobSize));var p={width:o.width,height:o.height,pixelData:r.pixels.resultPixels,minValue:o.zMin,maxValue:o.zMax,validPixelCount:o.numValidPixel,dimCount:o.numDims,dimStats:{minValues:o.minValues,maxValues:o.maxValues},maskData:r.pixels.resultMask};if(r.pixels.resultMask&&a.isValidPixelValue(o.imageType,i)){var _=r.pixels.resultMask;for(n=0;n<c;n++)_[n]||(p.pixelData[n]=i);p.noDataValue=i}return r.noDataValue=i,t.returnFileInfo&&(p.fileInfo=a.formatFileInfo(r)),p}},getBandCount:function(e){for(var t=0,i=0,n={ptr:0,pixels:{}};i<e.byteLength-58;)a.readHeaderInfo(e,n),i+=n.headerInfo.blobSize,t++,n.ptr=i;return t}};return l}(),i=function(){var e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]}(),n={decode:function(n,r){if(!i)throw"Big endian system is not supported.";var o,a,s,l,u,c=(r=r||{}).inputOffset||0,h=new Uint8Array(n,c,10),d=String.fromCharCode.apply(null,h);if("CntZImage"===d.trim())o=e,a=1;else{if("Lerc2"!==d.substring(0,5))throw"Unexpected file identifier string: "+d;o=t,a=2}for(var f,p,_,m=0,g=n.byteLength-10,x=[],y={width:0,height:0,pixels:[],pixelType:r.pixelType,mask:null,statistics:[]};c<g;){var v=o.decode(n,{inputOffset:c,encodedMaskData:f,maskData:_,returnMask:0===m,returnEncodedMask:0===m,returnFileInfo:!0,pixelType:r.pixelType||null,noDataValue:r.noDataValue||null});c=v.fileInfo.eofOffset,0===m&&(f=v.encodedMaskData,_=v.maskData,y.width=v.width,y.height=v.height,y.dimCount=v.dimCount||1,y.pixelType=v.pixelType||v.fileInfo.pixelType,y.mask=v.maskData),a>1&&v.fileInfo.mask&&v.fileInfo.mask.numBytes>0&&x.push(v.maskData),m++,y.pixels.push(v.pixelData),y.statistics.push({minValue:v.minValue,maxValue:v.maxValue,noDataValue:v.noDataValue,dimStats:v.dimStats})}if(a>1&&x.length>1){for(u=y.width*y.height,y.bandMasks=x,(_=new Uint8Array(u)).set(x[0]),s=1;s<x.length;s++)for(p=x[s],l=0;l<u;l++)_[l]=_[l]&p[l];y.maskData=_}return y}};j$5.Lerc=n}();var LercDecode=j$5.Lerc,V$1=function(){var e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if("object"!=typeof WebAssembly)return{supported:!1};var i="B9h79tEBBBE8fV9gBB9gVUUUUUEU9gIUUUB9gEUEU9gIUUUEUIKQBEEEDDDILLLVE9wEEEVIEBEOWEUEC+Q/IEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBEy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBDe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBIl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBLk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBOL79iv9rBRQ+x8yQDBK/qMEZU8jJJJJBCJ/EB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rADZ1JJJBHWCJ/ABAD9uC/wfBgGOCJDAOCJD6eHdAICEFHLCBHQDNINAQAE9PMEAdAEAQ9rAQAdFAE6eHKDNDNADtMBAKCSFGOC9wgHXAOCL4CIFCD4HMAWCJDFHpCBHSALHZINDNARAZ9rAM9PMBCBHLXIKAZAMFHLDNAXtMBCBHhCBHIINDNARAL9rCk9PMBCBHLXVKAWCJ/CBFAIFHODNDNDNDNDNAZAICO4FrBBAhCOg4CIgpLBEDIBKAO9CB83IBAOCWF9CB83IBXIKAOALrBLALrBBGoCO4GaAaCIsGae86BBAOCEFALCLFAaFGarBBAoCL4CIgGcAcCIsGce86BBAOCDFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCIFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCLFAaAoFGarBBALrBEGoCO4GcAcCIsGce86BBAOCVFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCOFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCRFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCWFAaAoFGarBBALrBDGoCO4GcAcCIsGce86BBAOCdFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCQFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCKFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCXFAaAoFGorBBALrBIGLCO4GaAaCIsGae86BBAOCMFAoAaFGorBBALCL4CIgGaAaCIsGae86BBAOCpFAoAaFGorBBALCD4CIgGaAaCIsGae86BBAOCSFAoAaFGOrBBALCIgGLALCIsGLe86BBAOALFHLXDKAOALrBWALrBBGoCL4GaAaCSsGae86BBAOCEFALCWFAaFGarBBAoCSgGoAoCSsGoe86BBAOCDFAaAoFGorBBALrBEGaCL4GcAcCSsGce86BBAOCIFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCLFAoAaFGorBBALrBDGaCL4GcAcCSsGce86BBAOCVFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCOFAoAaFGorBBALrBIGaCL4GcAcCSsGce86BBAOCRFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCWFAoAaFGorBBALrBLGaCL4GcAcCSsGce86BBAOCdFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCQFAoAaFGorBBALrBVGaCL4GcAcCSsGce86BBAOCKFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCXFAoAaFGorBBALrBOGaCL4GcAcCSsGce86BBAOCMFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCpFAoAaFGorBBALrBRGLCL4GaAaCSsGae86BBAOCSFAoAaFGOrBBALCSgGLALCSsGLe86BBAOALFHLXEKAOAL8pBB83BBAOCWFALCWF8pBB83BBALCZFHLKAhCDFHhAICZFGIAX6MBKKDNALMBCBHLXIKDNAKtMBAWASFrBBHhCBHOApHIINAIAWCJ/CBFAOFrBBGZCE4CBAZCEg9r7AhFGh86BBAIADFHIAOCEFGOAK9HMBKKApCEFHpALHZASCEFGSAD9HMBKKABAQAD2FAWCJDFAKAD2Z1JJJB8aAWAWCJDFAKCUFAD2FADZ1JJJB8aKAKCBALeAQFHQALMBKC9+HOXEKCBC99ARAL9rADCAADCA0eseHOKAVCJ/EBF8kJJJJBAOK+OoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJEZ+JJJJB8aAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK+lVOEUE99DUD99EUD99DNDNADCL9HMBAEtMEINDNDNjBBBzjBBB+/ABCDFGD8sBB+yAB8sBBGI+yGL+L+TABCEFGV8sBBGO+yGR+L+TGWjBBBB9gGdeAWjBB/+9CAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI86BBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD86BBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD86BBABCLFHBAECUFGEMBXDKKAEtMBINDNDNjBBBzjBBB+/ABCLFGD8uEB+yAB8uEBGI+yGL+L+TABCDFGV8uEBGO+yGR+L+TGWjBBBB9gGdeAWjB/+fsAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI87EBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD87EBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD87EBABCWFHBAECUFGEMBKKK/SILIUI99IUE99DNAEtMBCBHIABHLINDNDNj/zL81zALCOF8uEBGVCIv+y+VGOAL8uEB+ynGRjB/+fsnjBBBzjBBB+/ARjBBBB9gemGW+LjBBB9P9dtMBAW+oHdXEKCJJJJ94HdKALCLF8uEBHQALCDF8uEBHKABAVCEFCIgAIvCETFAd87EBDNDNAOAK+ynGWjB/+fsnjBBBzjBBB+/AWjBBBB9gemGX+LjBBB9P9dtMBAX+oHKXEKCJJJJ94HKKABAVCDFCIgAIvCETFAK87EBDNDNAOAQ+ynGOjB/+fsnjBBBzjBBB+/AOjBBBB9gemGX+LjBBB9P9dtMBAX+oHQXEKCJJJJ94HQKABAVCUFCIgAIvCETFAQ87EBDNDNjBBJzARARn+TAWAWn+TAOAOn+TGRjBBBBARjBBBB9ge+RjB/+fsnjBBBzmGR+LjBBB9P9dtMBAR+oHQXEKCJJJJ94HQKABAVCIgAIvCETFAQ87EBALCWFHLAICLFHIAECUFGEMBKKK6BDNADCD4AE2GEtMBINABABYDBGDCWTCW91+yADCk91ClTCJJJ/8IF++nuDBABCLFHBAECUFGEMBKKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABKKKEBCJWKLZ9kBB";WebAssembly.validate(e)&&(i="B9h79tEBBBE5V9gBB9gVUUUUUEU9gIUUUB9gDUUB9gEUEUIMXBBEBEEDIDIDLLVE9wEEEVIEBEOWEUEC+Q/aEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBDy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBLe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBOk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBWl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBQL79iv9rBKQ/j6XLBZIK9+EVU8jJJJJBCZ9rHBCBHEINCBHDCBHIINABCWFADFAICJUAEAD4CEgGLe86BBAIALFHIADCEFGDCW9HMBKAEC+Q+YJJBFAI86BBAECITC+Q1JJBFAB8pIW83IBAECEFGECJD9HMBKK1HLSUD97EUO978jJJJJBCJ/KB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rAD/8QBBCJ/ABAD9uC/wfBgGOCJDAOCJD6eHWAICEFHOCBHdDNINAdAE9PMEAWAEAd9rAdAWFAE6eHQDNDNADtMBAQCSFGLC9wgGKCI2HXAKCETHMALCL4CIFCD4HpCBHSINAOHZCBHhDNINDNARAZ9rAp9PMBCBHOXVKAVCJ/CBFAhAK2FHoAZApFHOCBHIDNAKC/AB6MBARAO9rC/gB6MBCBHLINAoALFHIDNDNDNDNDNAZALCO4FrBBGaCIgpLBEDIBKAICBPhPKLBXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLBAOCZFHOKDNDNDNDNDNAaCD4CIgpLBEDIBKAICBPhPKLZXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLZAOCZFHOKDNDNDNDNDNAaCL4CIgpLBEDIBKAICBPhPKLAXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLAAOCZFHOKDNDNDNDNDNAaCO4pLBEDIBKAICBPhPKL8wXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCLFAlPqBFAaC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCWFAlPqBFAaC+Q+YJJBFrBBFHOXEKAIAOPBBBPKL8wAOCZFHOKALC/ABFHIALCJEFAK0MEAIHLARAO9rC/fB0MBKKDNAIAK9PMBAICI4HLINDNARAO9rCk9PMBCBHOXRKAoAIFHaDNDNDNDNDNAZAICO4FrBBALCOg4CIgpLBEDIBKAaCBPhPKLBXIKAaAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAaAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAaAOPBBBPKLBAOCZFHOKALCDFHLAICZFGIAK6MBKKDNAOtMBAOHZAhCEFGhCLsMDXEKKCBHOXIKDNAKtMBAVCJDFASFHIAVASFPBDBHlCBHaINAIAVCJ/CBFAaFGLPBLBGxCEP9tAxCEPSGcP9OP9hP9RGxALAKFPBLBGkCEP9tAkAcP9OP9hP9RGkPMBZEhDoIaLcVxOqRlGyALAMFPBLBG8aCEP9tA8aAcP9OP9hP9RG8aALAXFPBLBGeCEP9tAeAcP9OP9hP9RGePMBZEhDoIaLcVxOqRlG3PMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIAlP9uGlPeBbDBAIADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAyA3PMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWkdyQ8aKeX3M5p8eS8fGxA8aAePMWkdyQ8aKeX3M5p8eS8fGkPMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFHIAaCZFGaAK6MBKKASCLFGSAD6MBKKABAdAD2FAVCJDFAQAD2/8QBBAVAVCJDFAQCUFAD2FAD/8QBBKAQCBAOeAdFHdAOMBKC9+HOXEKCBC99ARAO9rADCAADCA0eseHOKAVCJ/KBF8kJJJJBAOKWBZ+BJJJBK+KoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJE/8KBAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK/xVDIUO978jJJJJBCA9rGI8kJJJJBDNDNADCL9HMBDNAEC98gGLtMBABHDCBHVINADADPBBBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKBBADCZFHDAVCLFGVAL6MBKKALAE9PMEAIAECIgGVCDTGDvCBCZAD9r/8KBAIABALCDTFGLAD/8QBBDNAVtMBAIAIPBLBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKLBKALAIAD/8QBBXEKABAEC98gGDZ+HJJJBADAE9PMBAIAECIgGLCITGVFCBCAAV9r/8KBAIABADCITFGDAV/8QBBAIALZ+HJJJBADAIAV/8QBBKAICAF8kJJJJBK+yIDDUR97DNAEtMBCBHDINABCZFGIAIPBBBGLCBPhGVCJJ98P3ECJJ98P3IGOP9OABPBBBGRALPMLVORXMpScxql358e8fCffEPhP9OP/6EARALPMBEDIWdQKZhoaky8aeGLCZP+sEP/6EGWP/gEALCZP+rECZP+sEP/6EGdP/gEP/kEP/lEGLjB/+fsPaAdALAVP+2EGVAdCJJJJ94PhGQP9OP9RP/kEGdAdP/mEALALP/mEAWAVAWAQP9OP9RP/kEGLALP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGVP/kECZP+rEAdAWP/mEAVP/kECffIPhP9OP9QGdALAWP/mEAVP/kECUPSCBPlDCBPlICBPlOCBPlRCBPlQCBPlKCBPlpCBPlSP9OGLPMWdkyQK8aeXM35pS8e8fP9QPKBBABARAOP9OAdALPMBEZhDIoaLVcxORqlP9QPKBBABCAFHBADCLFGDAE6MBKKK94EIU8jJJJJBCA9rGI8kJJJJBABAEC98gGLZ+JJJJBDNALAE9PMBAIAECIgGVCITGEFCBCAAE9r/8KBAIABALCITFGBAE/8QBBAIAVZ+JJJJBABAIAE/8QBBKAICAF8kJJJJBK/hILDUE97EUV978jJJJJBCZ9rHDDNAEtMBCBHIINADABPBBBGLABCZFGVPBBBGOPMLVORXMpScxql358e8fGRCZP+sEGWCLP+rEPKLBABjBBJzPaj/zL81zPaAWCIPhP9QP/6EP/nEGWALAOPMBEDIWdQKZhoaky8aeGLCZP+rECZP+sEP/6EP/mEGOAOP/mEAWALCZP+sEP/6EP/mEGdAdP/mEAWARCZP+rECZP+sEP/6EP/mEGRARP/mEP/kEP/kEP/lECBPhP+4EP/jEjB/+fsPaGWP/mEjBBN0PaGLP/kECffIPhGQP9OAdAWP/mEALP/kECZP+rEP9QGdARAWP/mEALP/kECZP+rEAOAWP/mEALP/kEAQP9OP9QGWPMBEZhDIoaLVcxORqlGLP5BADPBLBPeB+t+J83IBABCWFALP5EADPBLBPeE+t+J83IBAVAdAWPMWdkyQK8aeXM35pS8e8fGWP5BADPBLBPeD+t+J83IBABCkFAWP5EADPBLBPeI+t+J83IBABCAFHBAICLFGIAE6MBKKK/3EDIUE978jJJJJBC/AB9rHIDNADCD4AE2GLC98gGVtMBCBHDABHEINAEAEPBBBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKBBAECZFHEADCLFGDAV6MBKKDNAVAL9PMBAIALCIgGDCDTGEvCBC/ABAE9r/8KBAIABAVCDTFGVAE/8QBBDNADtMBAIAIPBLBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKLBKAVAIAE/8QBBKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIKKKEBCJWKLZ9tBB");var n,r=WebAssembly.instantiate(function(e){for(var i=new Uint8Array(e.length),n=0;n<e.length;++n){var r=e.charCodeAt(n);i[n]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}var o=0;for(n=0;n<e.length;++n)i[o++]=i[n]<60?t[i[n]]:64*(i[n]-60)+i[++n];return i.buffer.slice(0,o)}(i),{}).then((function(e){(n=e.instance).exports.__wasm_call_ctors()}));function o(e,t,i,r,o,a){var s=n.exports.sbrk,l=i+3&-4,u=s(l*r),c=s(o.length),h=new Uint8Array(n.exports.memory.buffer);h.set(o,c);var d=e(u,i,r,c,o.length);if(0==d&&a&&a(u,l,r),t.set(h.subarray(u,u+i*r)),s(u-s(0)),0!=d)throw new Error("Malformed buffer data: "+d)}var a={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},s={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return{ready:r,supported:!0,decodeVertexBuffer:function(e,t,i,r,s){o(n.exports.meshopt_decodeVertexBuffer,e,t,i,r,n.exports[a[s]])},decodeIndexBuffer:function(e,t,i,r){o(n.exports.meshopt_decodeIndexBuffer,e,t,i,r)},decodeIndexSequence:function(e,t,i,r){o(n.exports.meshopt_decodeIndexSequence,e,t,i,r)},decodeGltfBuffer:function(e,t,i,r,l,u){o(n.exports[s[l]],e,t,i,r,n.exports[a[u]])}}}(),C$3={};!function(e,t){e.NoSleep=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=i(1),a=o.webm,s=o.mp4,l=typeof navigator<"u"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,u=function(){function e(){var t=this;r(this,e),l?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("muted",""),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",a),this._addSourceToVideo(this.noSleepVideo,"mp4",s),this.noSleepVideo.addEventListener("loadedmetadata",(function(){t.noSleepVideo.duration<=1?t.noSleepVideo.setAttribute("loop",""):t.noSleepVideo.addEventListener("timeupdate",(function(){t.noSleepVideo.currentTime>.5&&(t.noSleepVideo.currentTime=Math.random())}))})))}return n(e,[{key:"_addSourceToVideo",value:function(e,t,i){var n=document.createElement("source");n.src=i,n.type="video/"+t,e.appendChild(n)}},{key:"enable",value:function(){l?(this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n .\n "),this.noSleepTimer=window.setInterval((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3)):this.noSleepVideo.play()}},{key:"disable",value:function(){l?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),e}();e.exports=u},function(e,t,i){e.exports={webm:"data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA=",mp4:"data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}}])}(C$3);var b$4=C$3.NoSleep;function t$4(){}t$4.array={},t$4.array.binarySearch=function(e,t,i){for(var n,r,o=i||t$4.array.numberSafeCompareFunction,a=0,s=e.length,l=!1;a<s;)(r=+o(e[n=a+(s-a>>1)],t))<0?a=n+1:(s=n,l=!r);return l?a:~a},t$4.array.numberSafeCompareFunction=function(e,t){return e>t?1:e<t?-1:0},t$4.array.includes=function(e,t){return e.indexOf(t)>=0},t$4.array.linearFindNearest=function(e,t,i){var n,r=e.length;if(e[0]<=t)return 0;if(t<=e[r-1])return r-1;if(i>0){for(n=1;n<r;++n)if(e[n]<t)return n-1}else if(i<0){for(n=1;n<r;++n)if(e[n]<=t)return n}else for(n=1;n<r;++n){if(e[n]==t)return n;if(e[n]<t)return e[n-1]-t<t-e[n]?n-1:n}return r-1},t$4.array.reverseSubArray=function(e,t,i){for(;t<i;){var n=e[t];e[t]=e[i],e[i]=n,++t,--i}},t$4.array.extend=function(e,t){var i,n=Array.isArray(t)?t:[t],r=n.length;for(i=0;i<r;i++)e[e.length]=n[i]},t$4.array.remove=function(e,t){var i=e.indexOf(t),n=i>-1;return n&&e.splice(i,1),n},t$4.array.find=function(e,t){for(var i,n=e.length>>>0,r=0;r<n;r++)if(t(i=e[r],r,e))return i;return null},t$4.array.equals=function(e,t){var i=e.length;if(i!==t.length)return!1;for(var n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0},t$4.array.stableSort=function(e,t){var i,n=e.length,r=Array(e.length);for(i=0;i<n;i++)r[i]={index:i,value:e[i]};for(r.sort((function(e,i){return t(e.value,i.value)||e.index-i.index})),i=0;i<e.length;i++)e[i]=r[i].value},t$4.array.findIndex=function(e,t){var i,n=!e.every((function(n,r){return i=r,!t(n,r,e)}));return n?i:-1},t$4.array.isSorted=function(e,t,i){var n=t||t$4.array.numberSafeCompareFunction;return e.every((function(t,r){if(0===r)return!0;var o=n(e[r-1],t);return!(o>0||i&&0===o)}))},t$4.ASSUME_TOUCH=!1,t$4.DEFAULT_MAX_ZOOM=42,t$4.DEFAULT_MIN_ZOOM=0,t$4.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD=.5,t$4.DEFAULT_TILE_SIZE=256,t$4.DEFAULT_WMS_VERSION="1.3.0",t$4.ENABLE_CANVAS=!0,t$4.ENABLE_PROJ4JS=!0,t$4.ENABLE_RASTER_REPROJECTION=!0,t$4.ENABLE_WEBGL=!0,t$4.DEBUG_WEBGL=!0,t$4.INITIAL_ATLAS_SIZE=256,t$4.MAX_ATLAS_SIZE=-1,t$4.MOUSEWHEELZOOM_MAXDELTA=1,t$4.OVERVIEWMAP_MAX_RATIO=.75,t$4.OVERVIEWMAP_MIN_RATIO=.1,t$4.RASTER_REPROJECTION_MAX_SOURCE_TILES=100,t$4.RASTER_REPROJECTION_MAX_SUBDIVISION=10,t$4.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH=.25,t$4.SIMPLIFY_TOLERANCE=.5,t$4.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK=1024,t$4.VERSION="",t$4.inherits=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},t$4.nullFunction=function(){},t$4.getUid=function(e){return e.ol_uid||(e.ol_uid=++t$4.uidCounter_)},t$4.asserts={},t$4.asserts.assert=function(e,t){},t$4.has={};var U$2=typeof navigator<"u"?navigator.userAgent.toLowerCase():"";function r$a(e){e$2e(e)||(e=new u$H),this._clock=e,this._eventHelper=new n$x,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=ce$1.observable(a$15.now()),this.systemTime.equalityComparer=a$15.equals,this.startTime=ce$1.observable(e.startTime),this.startTime.equalityComparer=a$15.equals,this.startTime.subscribe((function(t){e.startTime=t,this.synchronize()}),this),this.stopTime=ce$1.observable(e.stopTime),this.stopTime.equalityComparer=a$15.equals,this.stopTime.subscribe((function(t){e.stopTime=t,this.synchronize()}),this),this.currentTime=ce$1.observable(e.currentTime),this.currentTime.equalityComparer=a$15.equals,this.currentTime.subscribe((function(t){e.currentTime=t,this.synchronize()}),this),this.multiplier=ce$1.observable(e.multiplier),this.multiplier.subscribe((function(t){e.multiplier=t,this.synchronize()}),this),this.clockStep=ce$1.observable(e.clockStep),this.clockStep.subscribe((function(t){e.clockStep=t,this.synchronize()}),this),this.clockRange=ce$1.observable(e.clockRange),this.clockRange.subscribe((function(t){e.clockRange=t,this.synchronize()}),this),this.canAnimate=ce$1.observable(e.canAnimate),this.canAnimate.subscribe((function(t){e.canAnimate=t,this.synchronize()}),this),this.shouldAnimate=ce$1.observable(e.shouldAnimate),this.shouldAnimate.subscribe((function(t){e.shouldAnimate=t,this.synchronize()}),this),ce$1.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}function t$3(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,t$15.throwInstantiationError()}function s$4(e,t){if(!e$2e(e))throw new t$15("func is required.");t=u$Z(t,!0);var i=new o$1h,n=new o$1h;function r(){if(!r.canExecute)throw new t$15("Cannot execute command, canExecute is false.");var t,o={args:arguments,cancel:!1};return i.raiseEvent(o),o.cancel||(t=e.apply(null,arguments),n.raiseEvent(t)),t}return r.canExecute=t,ce$1.track(r,["canExecute"]),Object.defineProperties(r,{beforeExecute:{value:i},afterExecute:{value:n}}),r}t$4.has.FIREFOX=-1!==U$2.indexOf("firefox"),t$4.has.SAFARI=-1!==U$2.indexOf("safari")&&-1==U$2.indexOf("chrom"),t$4.has.WEBKIT=-1!==U$2.indexOf("webkit")&&-1==U$2.indexOf("edge"),t$4.has.MAC=-1!==U$2.indexOf("macintosh"),t$4.has.DEVICE_PIXEL_RATIO=1,t$4.has.CANVAS_LINE_DASH=!0,t$4.structs={},t$4.CollectionEventType={ADD:"add",REMOVE:"remove"},t$4.ObjectEventType={PROPERTYCHANGE:"propertychange"},t$4.events={},t$4.events.bindListener_=function(e){var t=function(t){var i=e.listener,n=e.bindTo||e.target;return e.callOnce&&t$4.events.unlistenByKey(e),i.call(n,t)};return e.boundListener=t,t},t$4.events.findListener_=function(e,t,i,n){for(var r,o=0,a=e.length;o<a;++o)if((r=e[o]).listener===t&&r.bindTo===i)return n&&(r.deleteIndex=o),r},t$4.events.getListeners=function(e,t){var i=e.ol_lm;return i?i[t]:void 0},t$4.events.getListenerMap_=function(e){var t=e.ol_lm;return t||(t=e.ol_lm={}),t},t$4.events.removeListeners_=function(e,t){var i=t$4.events.getListeners(e,t);if(i){for(var n=0,r=i.length;n<r;++n)e.removeEventListener(t,i[n].boundListener),t$4.obj.clear(i[n]);i.length=0;var o=e.ol_lm;o&&(delete o[t],0===Object.keys(o).length&&delete e.ol_lm)}},t$4.events.listen=function(e,t,i,n,r){var o=t$4.events.getListenerMap_(e),a=o[t];a||(a=o[t]=[]);var s=t$4.events.findListener_(a,i,n,!1);return s?r||(s.callOnce=!1):(s={bindTo:n,callOnce:!!r,listener:i,target:e,type:t},e.addEventListener(t,t$4.events.bindListener_(s)),a.push(s)),s},t$4.events.listenOnce=function(e,t,i,n){return t$4.events.listen(e,t,i,n,!0)},t$4.events.unlisten=function(e,t,i,n){var r=t$4.events.getListeners(e,t);if(r){var o=t$4.events.findListener_(r,i,n,!0);o&&t$4.events.unlistenByKey(o)}},t$4.events.unlistenByKey=function(e){if(e&&e.target){e.target.removeEventListener(e.type,e.boundListener);var t=t$4.events.getListeners(e.target,e.type);if(t){var i="deleteIndex"in e?e.deleteIndex:t.indexOf(e);-1!==i&&t.splice(i,1),0===t.length&&t$4.events.removeListeners_(e.target,e.type)}t$4.obj.clear(e)}},t$4.events.unlistenAll=function(e){var t=t$4.events.getListenerMap_(e);for(var i in t)t$4.events.removeListeners_(e,i)},t$4.Disposable=function(){},t$4.Disposable.prototype.disposed_=!1,t$4.Disposable.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())},t$4.Disposable.prototype.disposeInternal=t$4.nullFunction,t$4.events.Event={},t$4.events.Event=function(e){this.propagationStopped,this.type=e,this.target=null},t$4.events.Event.prototype.preventDefault=t$4.events.Event.prototype.stopPropagation=function(){this.propagationStopped=!0},t$4.events.Event.stopPropagation=function(e){e.stopPropagation()},t$4.events.Event.preventDefault=function(e){e.preventDefault()},t$4.events.EventTarget={},t$4.events.EventTarget=function(){t$4.Disposable.call(this),this.pendingRemovals_={},this.dispatching_={},this.listeners_={}},t$4.inherits(t$4.events.EventTarget,t$4.Disposable),t$4.events.EventTarget.prototype.addEventListener=function(e,t){var i=this.listeners_[e];i||(i=this.listeners_[e]=[]),-1===i.indexOf(t)&&i.push(t)},t$4.events.EventTarget.prototype.dispatchEvent=function(e){var t="string"==typeof e?new t$4.events.Event(e):e,i=t.type;t.target=this;var n,r=this.listeners_[i];if(r){i in this.dispatching_||(this.dispatching_[i]=0,this.pendingRemovals_[i]=0),++this.dispatching_[i];for(var o=0,a=r.length;o<a;++o)if(!1===r[o].call(this,t)||t.propagationStopped){n=!1;break}if(--this.dispatching_[i],0===this.dispatching_[i]){var s=this.pendingRemovals_[i];for(delete this.pendingRemovals_[i];s--;)this.removeEventListener(i,t$4.nullFunction);delete this.dispatching_[i]}return n}},t$4.events.EventTarget.prototype.disposeInternal=function(){t$4.events.unlistenAll(this)},t$4.events.EventTarget.prototype.getListeners=function(e){return this.listeners_[e]},t$4.events.EventTarget.prototype.hasListener=function(e){return e?e in this.listeners_:Object.keys(this.listeners_).length>0},t$4.events.EventTarget.prototype.removeEventListener=function(e,t){var i=this.listeners_[e];if(i){var n=i.indexOf(t);e in this.pendingRemovals_?(i[n]=t$4.nullFunction,++this.pendingRemovals_[e]):(i.splice(n,1),0===i.length&&delete this.listeners_[e])}},t$4.events.EventType={CHANGE:"change",CLEAR:"clear",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",ERROR:"error",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",MOUSEDOWN:"mousedown",MOUSEMOVE:"mousemove",MOUSEOUT:"mouseout",MOUSEUP:"mouseup",MOUSEWHEEL:"mousewheel",MSPOINTERDOWN:"MSPointerDown",RESIZE:"resize",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",WHEEL:"wheel"},t$4.Observable=function(){this.revision_=0},t$4.inherits(t$4.Observable,t$4.events.EventTarget),t$4.Observable.unByKey=function(e){if(Array.isArray(e))for(var t=0,i=e.length;t<i;++t)t$4.events.unlistenByKey(e[t]);else t$4.events.unlistenByKey(e)},t$4.Observable.prototype.changed=function(){++this.revision_},t$4.Observable.prototype.dispatchEvent,t$4.Observable.prototype.getRevision=function(){return this.revision_},t$4.Observable.prototype.on=function(e,t,i){if(Array.isArray(e)){for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=t$4.events.listen(this,e[o],t,i);return r}return t$4.events.listen(this,e,t,i)},t$4.Observable.prototype.once=function(e,t,i){if(Array.isArray(e)){for(var n=e.length,r=new Array(n),o=0;o<n;++o)r[o]=t$4.events.listenOnce(this,e[o],t,i);return r}return t$4.events.listenOnce(this,e,t,i)},t$4.Observable.prototype.un=function(e,t,i){if(Array.isArray(e))for(var n=0,r=e.length;n<r;++n)t$4.events.unlisten(this,e[n],t,i);else t$4.events.unlisten(this,e,t,i)},t$4.uidCounter_=0,t$4.Object=function(e){t$4.Observable.call(this),t$4.getUid(this),this.values_={},void 0!==e&&this.setProperties(e)},t$4.inherits(t$4.Object,t$4.Observable),t$4.Object.changeEventTypeCache_={},t$4.Object.getChangeEventType=function(e){return t$4.Object.changeEventTypeCache_.hasOwnProperty(e)?t$4.Object.changeEventTypeCache_[e]:t$4.Object.changeEventTypeCache_[e]="change:"+e},t$4.Object.prototype.get=function(e){var t;return this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t},t$4.Object.prototype.getKeys=function(){return Object.keys(this.values_)},t$4.Object.prototype.getProperties=function(){return t$4.obj.assign({},this.values_)},t$4.Object.prototype.notify=function(e,t){},t$4.Object.prototype.set=function(e,t,i){if(i)this.values_[e]=t;else{var n=this.values_[e];this.values_[e]=t,n!==t&&this.notify(e,n)}},t$4.Object.prototype.setProperties=function(e,t){var i;for(i in e)this.set(i,e[i],t)},t$4.Object.prototype.unset=function(e,t){if(e in this.values_){var i=this.values_[e];delete this.values_[e],t||this.notify(e,i)}},t$4.Object.Event=function(e,t,i){t$4.events.Event.call(this,e),this.key=t,this.oldValue=i},t$4.inherits(t$4.Object.Event,t$4.events.Event),t$4.functions={},t$4.functions.TRUE=function(){return!0},t$4.functions.FALSE=function(){return!1},t$4.math={},t$4.math.clamp=function(e,t,i){return Math.min(Math.max(e,t),i)},t$4.math.cosh=function(){var e;return e="cosh"in Math?Math.cosh:function(e){var t=Math.exp(e);return(t+1/t)/2},e}(),t$4.math.roundUpToPowerOfTwo=function(e){return t$4.asserts.assert(0<e,29),Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},t$4.math.squaredSegmentDistance=function(e,t,i,n,r,o){var a=r-i,s=o-n;if(0!==a||0!==s){var l=((e-i)*a+(t-n)*s)/(a*a+s*s);l>1?(i=r,n=o):l>0&&(i+=a*l,n+=s*l)}return t$4.math.squaredDistance(e,t,i,n)},t$4.math.squaredDistance=function(e,t,i,n){var r=i-e,o=n-t;return r*r+o*o},t$4.math.solveLinearSystem=function(e){for(var t=e.length,i=0;i<t;i++){for(var n=i,r=Math.abs(e[i][i]),o=i+1;o<t;o++){var a=Math.abs(e[o][i]);a>r&&(r=a,n=o)}if(0===r)return null;var s=e[n];e[n]=e[i],e[i]=s;for(var l=i+1;l<t;l++)for(var u=-e[l][i]/e[i][i],c=i;c<t+1;c++)i==c?e[l][c]=0:e[l][c]+=u*e[i][c]}for(var h=new Array(t),d=t-1;d>=0;d--){h[d]=e[d][t]/e[d][d];for(var f=d-1;f>=0;f--)e[f][t]-=e[f][d]*h[d]}return h},t$4.math.toDegrees=function(e){return 180*e/Math.PI},t$4.math.toRadians=function(e){return e*Math.PI/180},t$4.math.modulo=function(e,t){var i=e%t;return i*t<0?i+t:i},t$4.math.lerp=function(e,t,i){return e+i*(t-e)},t$4.ImageState={IDLE:0,LOADING:1,LOADED:2,ERROR:3},t$4.color={},t$4.color.HEX_COLOR_RE_=/^#(?:[0-9a-f]{3,4}){1,2}$/i,t$4.color.NAMED_COLOR_RE_=/^([a-z]*)$/i,t$4.color.asArray=function(e){return Array.isArray(e)?e:t$4.color.fromString(e)},t$4.color.asString=function(e){return"string"==typeof e?e:t$4.color.toString(e)},t$4.color.fromNamed=function(e){var t=document.createElement("div");t.style.color=e,document.body.appendChild(t);var i=getComputedStyle(t).color;return document.body.removeChild(t),i},t$4.color.fromString=function(){var e={},t=0;return function(i){var n;if(e.hasOwnProperty(i))n=e[i];else{if(t>=1024){var r,o=0;for(r in e)0==(3&o++)&&(delete e[r],--t)}n=t$4.color.fromStringInternal_(i),e[i]=n,++t}return n}}(),t$4.color.fromStringInternal_=function(e){var t,i,n,r,o,a;if(t$4.color.NAMED_COLOR_RE_.exec(e)&&(e=t$4.color.fromNamed(e)),t$4.color.HEX_COLOR_RE_.exec(e)){var s,l=e.length-1;s=l<=4?1:2;var u=4===l||8===l;t=parseInt(e.substr(1+0*s,s),16),i=parseInt(e.substr(1+1*s,s),16),n=parseInt(e.substr(1+2*s,s),16),r=u?parseInt(e.substr(1+3*s,s),16):255,1==s&&(t=(t<<4)+t,i=(i<<4)+i,n=(n<<4)+n,u&&(r=(r<<4)+r)),o=[t,i,n,r/255]}else 0==e.indexOf("rgba(")?(a=e.slice(5,-1).split(",").map(Number),o=t$4.color.normalize(a)):0==e.indexOf("rgb(")?((a=e.slice(4,-1).split(",").map(Number)).push(1),o=t$4.color.normalize(a)):t$4.asserts.assert(!1,14);return o},t$4.color.normalize=function(e,t){var i=t||[];return i[0]=t$4.math.clamp(e[0]+.5|0,0,255),i[1]=t$4.math.clamp(e[1]+.5|0,0,255),i[2]=t$4.math.clamp(e[2]+.5|0,0,255),i[3]=t$4.math.clamp(e[3],0,1),i},t$4.color.toString=function(e){var t=e[0];t!=(0|t)&&(t=t+.5|0);var i=e[1];i!=(0|i)&&(i=i+.5|0);var n=e[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+t+","+i+","+n+","+(void 0===e[3]?1:e[3])+")"},t$4.colorlike={},t$4.colorlike.asColorLike=function(e){return t$4.colorlike.isColorLike(e)?e:t$4.color.asString(e)},t$4.colorlike.isColorLike=function(e){return"string"==typeof e||e instanceof CanvasPattern||e instanceof CanvasGradient},t$4.css={},t$4.css.CLASS_HIDDEN="ol-hidden",t$4.css.CLASS_SELECTABLE="ol-selectable",t$4.css.CLASS_UNSELECTABLE="ol-unselectable",t$4.css.CLASS_UNSUPPORTED="ol-unsupported",t$4.css.CLASS_CONTROL="ol-control",t$4.css.getFontFamilies=function(){var e,t={};return function(i){if(e||(e=document.createElement("div").style),!(i in t)){e.font=i;var n=e.fontFamily;if(e.font="",!n)return null;t[i]=n.split(/,\s?/)}return t[i]}}(),t$4.dom={},t$4.dom.createCanvasContext2D=function(e,t){return(e&&t?new OffscreenCanvas(e,t):new OffscreenCanvas(1,1)).getContext("2d")},t$4.dom.outerWidth=function(e){var t=e.offsetWidth,i=getComputedStyle(e);return t+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)},t$4.dom.outerHeight=function(e){var t=e.offsetHeight,i=getComputedStyle(e);return t+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)},t$4.dom.replaceNode=function(e,t){var i=t.parentNode;i&&i.replaceChild(e,t)},t$4.dom.removeNode=function(e){return e&&e.parentNode?e.parentNode.removeChild(e):null},t$4.dom.removeChildren=function(e){for(;e.lastChild;)e.removeChild(e.lastChild)},t$4.extent={},t$4.extent.Corner={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},t$4.extent.Relationship={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16},t$4.extent.boundingExtent=function(e){for(var t=t$4.extent.createEmpty(),i=0,n=e.length;i<n;++i)t$4.extent.extendCoordinate(t,e[i]);return t},t$4.extent.boundingExtentXYs_=function(e,t,i){var n=Math.min.apply(null,e),r=Math.min.apply(null,t),o=Math.max.apply(null,e),a=Math.max.apply(null,t);return t$4.extent.createOrUpdate(n,r,o,a,i)},t$4.extent.buffer=function(e,t,i){return i?(i[0]=e[0]-t,i[1]=e[1]-t,i[2]=e[2]+t,i[3]=e[3]+t,i):[e[0]-t,e[1]-t,e[2]+t,e[3]+t]},t$4.extent.clone=function(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e.slice()},t$4.extent.closestSquaredDistanceXY=function(e,t,i){var n,r;return(n=t<e[0]?e[0]-t:e[2]<t?t-e[2]:0)*n+(r=i<e[1]?e[1]-i:e[3]<i?i-e[3]:0)*r},t$4.extent.containsCoordinate=function(e,t){return t$4.extent.containsXY(e,t[0],t[1])},t$4.extent.containsExtent=function(e,t){return e[0]<=t[0]&&t[2]<=e[2]&&e[1]<=t[1]&&t[3]<=e[3]},t$4.extent.containsXY=function(e,t,i){return e[0]<=t&&t<=e[2]&&e[1]<=i&&i<=e[3]},t$4.extent.coordinateRelationship=function(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=t[0],s=t[1],l=t$4.extent.Relationship.UNKNOWN;return a<i?l|=t$4.extent.Relationship.LEFT:a>r&&(l|=t$4.extent.Relationship.RIGHT),s<n?l|=t$4.extent.Relationship.BELOW:s>o&&(l|=t$4.extent.Relationship.ABOVE),l===t$4.extent.Relationship.UNKNOWN&&(l=t$4.extent.Relationship.INTERSECTING),l},t$4.extent.createEmpty=function(){return[1/0,1/0,-1/0,-1/0]},t$4.extent.createOrUpdate=function(e,t,i,n,r){return r?(r[0]=e,r[1]=t,r[2]=i,r[3]=n,r):[e,t,i,n]},t$4.extent.createOrUpdateEmpty=function(e){return t$4.extent.createOrUpdate(1/0,1/0,-1/0,-1/0,e)},t$4.extent.createOrUpdateFromCoordinate=function(e,t){var i=e[0],n=e[1];return t$4.extent.createOrUpdate(i,n,i,n,t)},t$4.extent.createOrUpdateFromCoordinates=function(e,t){var i=t$4.extent.createOrUpdateEmpty(t);return t$4.extent.extendCoordinates(i,e)},t$4.extent.createOrUpdateFromFlatCoordinates=function(e,t,i,n,r){var o=t$4.extent.createOrUpdateEmpty(r);return t$4.extent.extendFlatCoordinates(o,e,t,i,n)},t$4.extent.createOrUpdateFromRings=function(e,t){var i=t$4.extent.createOrUpdateEmpty(t);return t$4.extent.extendRings(i,e)},t$4.extent.equals=function(e,t){return e[0]==t[0]&&e[2]==t[2]&&e[1]==t[1]&&e[3]==t[3]},t$4.extent.extend=function(e,t){return t[0]<e[0]&&(e[0]=t[0]),t[2]>e[2]&&(e[2]=t[2]),t[1]<e[1]&&(e[1]=t[1]),t[3]>e[3]&&(e[3]=t[3]),e},t$4.extent.extendCoordinate=function(e,t){t[0]<e[0]&&(e[0]=t[0]),t[0]>e[2]&&(e[2]=t[0]),t[1]<e[1]&&(e[1]=t[1]),t[1]>e[3]&&(e[3]=t[1])},t$4.extent.extendCoordinates=function(e,t){var i,n;for(i=0,n=t.length;i<n;++i)t$4.extent.extendCoordinate(e,t[i]);return e},t$4.extent.extendFlatCoordinates=function(e,t,i,n,r){for(;i<n;i+=r)t$4.extent.extendXY(e,t[i],t[i+1]);return e},t$4.extent.extendRings=function(e,t){var i,n;for(i=0,n=t.length;i<n;++i)t$4.extent.extendCoordinates(e,t[i]);return e},t$4.extent.extendXY=function(e,t,i){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],i),e[2]=Math.max(e[2],t),e[3]=Math.max(e[3],i)},t$4.extent.forEachCorner=function(e,t,i){var n;return!!((n=t.call(i,t$4.extent.getBottomLeft(e)))||(n=t.call(i,t$4.extent.getBottomRight(e)),n)||(n=t.call(i,t$4.extent.getTopRight(e)),n)||(n=t.call(i,t$4.extent.getTopLeft(e)),n))&&n},t$4.extent.getArea=function(e){var t=0;return t$4.extent.isEmpty(e)||(t=t$4.extent.getWidth(e)*t$4.extent.getHeight(e)),t},t$4.extent.getBottomLeft=function(e){return[e[0],e[1]]},t$4.extent.getBottomRight=function(e){return[e[2],e[1]]},t$4.extent.getCenter=function(e){return[(e[0]+e[2])/2,(e[1]+e[3])/2]},t$4.extent.getCorner=function(e,t){var i;return t===t$4.extent.Corner.BOTTOM_LEFT?i=t$4.extent.getBottomLeft(e):t===t$4.extent.Corner.BOTTOM_RIGHT?i=t$4.extent.getBottomRight(e):t===t$4.extent.Corner.TOP_LEFT?i=t$4.extent.getTopLeft(e):t===t$4.extent.Corner.TOP_RIGHT?i=t$4.extent.getTopRight(e):t$4.asserts.assert(!1,13),i},t$4.extent.getEnlargedArea=function(e,t){var i=Math.min(e[0],t[0]),n=Math.min(e[1],t[1]);return(Math.max(e[2],t[2])-i)*(Math.max(e[3],t[3])-n)},t$4.extent.getForViewAndSize=function(e,t,i,n,r){var o=t*n[0]/2,a=t*n[1]/2,s=Math.cos(i),l=Math.sin(i),u=o*s,c=o*l,h=a*s,d=a*l,f=e[0],p=e[1],_=f-u+d,m=f-u-d,g=f+u-d,x=f+u+d,y=p-c-h,v=p-c+h,$=p+c+h,b=p+c-h;return t$4.extent.createOrUpdate(Math.min(_,m,g,x),Math.min(y,v,$,b),Math.max(_,m,g,x),Math.max(y,v,$,b),r)},t$4.extent.getHeight=function(e){return e[3]-e[1]},t$4.extent.getIntersectionArea=function(e,t){var i=t$4.extent.getIntersection(e,t);return t$4.extent.getArea(i)},t$4.extent.getIntersection=function(e,t,i){var n=i||t$4.extent.createEmpty();return t$4.extent.intersects(e,t)&&(e[0]>t[0]?n[0]=e[0]:n[0]=t[0],e[1]>t[1]?n[1]=e[1]:n[1]=t[1],e[2]<t[2]?n[2]=e[2]:n[2]=t[2],e[3]<t[3]?n[3]=e[3]:n[3]=t[3]),n},t$4.extent.getMargin=function(e){return t$4.extent.getWidth(e)+t$4.extent.getHeight(e)},t$4.extent.getSize=function(e){return[e[2]-e[0],e[3]-e[1]]},t$4.extent.getTopLeft=function(e){return[e[0],e[3]]},t$4.extent.getTopRight=function(e){return[e[2],e[3]]},t$4.extent.getWidth=function(e){return e[2]-e[0]},t$4.extent.intersects=function(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]},t$4.extent.isEmpty=function(e){return e[2]<e[0]||e[3]<e[1]},t$4.extent.returnOrUpdate=function(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e},t$4.extent.scaleFromCenter=function(e,t){var i=(e[2]-e[0])/2*(t-1),n=(e[3]-e[1])/2*(t-1);e[0]-=i,e[2]+=i,e[1]-=n,e[3]+=n},t$4.extent.intersectsSegment=function(e,t,i){var n=!1,r=t$4.extent.coordinateRelationship(e,t),o=t$4.extent.coordinateRelationship(e,i);if(r===t$4.extent.Relationship.INTERSECTING||o===t$4.extent.Relationship.INTERSECTING)n=!0;else{var a,s,l=e[0],u=e[1],c=e[2],h=e[3],d=t[0],f=t[1],p=i[0],_=i[1],m=(_-f)/(p-d);!!(o&t$4.extent.Relationship.ABOVE)&&!(r&t$4.extent.Relationship.ABOVE)&&(n=(a=p-(_-h)/m)>=l&&a<=c),!n&&!!(o&t$4.extent.Relationship.RIGHT)&&!(r&t$4.extent.Relationship.RIGHT)&&(n=(s=_-(p-c)*m)>=u&&s<=h),!n&&!!(o&t$4.extent.Relationship.BELOW)&&!(r&t$4.extent.Relationship.BELOW)&&(n=(a=p-(_-u)/m)>=l&&a<=c),!n&&o&t$4.extent.Relationship.LEFT&&!(r&t$4.extent.Relationship.LEFT)&&(n=(s=_-(p-l)*m)>=u&&s<=h)}return n},t$4.extent.applyTransform=function(e,t,i){var n=[e[0],e[1],e[0],e[3],e[2],e[1],e[2],e[3]];t(n,n,2);var r=[n[0],n[2],n[4],n[6]],o=[n[1],n[3],n[5],n[7]];return t$4.extent.boundingExtentXYs_(r,o,i)},t$4.obj={},t$4.obj.assign="function"==typeof Object.assign?Object.assign:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(e),n=1,r=arguments.length;n<r;++n){var o=arguments[n];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(i[a]=o[a])}return i},t$4.obj.clear=function(e){for(var t in e)delete e[t]},t$4.obj.getValues=function(e){var t=[];for(var i in e)t.push(e[i]);return t},t$4.obj.isEmpty=function(e){var t;for(t in e)return!1;return!t},t$4.transform={},t$4.transform.tmp_=new Array(6),t$4.transform.create=function(){return[1,0,0,1,0,0]},t$4.transform.reset=function(e){return t$4.transform.set(e,1,0,0,1,0,0)},t$4.transform.multiply=function(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],u=t[1],c=t[2],h=t[3],d=t[4],f=t[5];return e[0]=i*l+r*u,e[1]=n*l+o*u,e[2]=i*c+r*h,e[3]=n*c+o*h,e[4]=i*d+r*f+a,e[5]=n*d+o*f+s,e},t$4.transform.set=function(e,t,i,n,r,o,a){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e[4]=o,e[5]=a,e},t$4.transform.setFromArray=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},t$4.transform.apply=function(e,t){var i=t[0],n=t[1];return t[0]=e[0]*i+e[2]*n+e[4],t[1]=e[1]*i+e[3]*n+e[5],t},t$4.transform.rotate=function(e,t){var i=Math.cos(t),n=Math.sin(t);return t$4.transform.multiply(e,t$4.transform.set(t$4.transform.tmp_,i,n,-n,i,0,0))},t$4.transform.scale=function(e,t,i){return t$4.transform.multiply(e,t$4.transform.set(t$4.transform.tmp_,t,0,0,i,0,0))},t$4.transform.translate=function(e,t,i){return t$4.transform.multiply(e,t$4.transform.set(t$4.transform.tmp_,1,0,0,1,t,i))},t$4.transform.compose=function(e,t,i,n,r,o,a,s){var l=Math.sin(o),u=Math.cos(o);return e[0]=n*u,e[1]=r*l,e[2]=-n*l,e[3]=r*u,e[4]=a*n*u-s*n*l+t,e[5]=a*r*l+s*r*u+i,e},t$4.transform.invert=function(e){var t=t$4.transform.determinant(e),i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5];return e[0]=o/t,e[1]=-n/t,e[2]=-r/t,e[3]=i/t,e[4]=(r*s-o*a)/t,e[5]=-(i*s-n*a)/t,e},t$4.transform.determinant=function(e){return e[0]*e[3]-e[1]*e[2]},t$4.geom={},t$4.geom.flat={},t$4.geom.flat.center={},t$4.geom.flat.reverse={},t$4.geom.flat.orient={},t$4.geom.flat.transform={},t$4.geom.flat.transform.transform2D=function(e,t,i,n,r,o){var a,s=o||[],l=0;for(a=t;a<i;a+=n){var u=e[a],c=e[a+1];s[l++]=r[0]*u+r[2]*c+r[4],s[l++]=r[1]*u+r[3]*c+r[5]}return o&&s.length!=l&&(s.length=l),s},t$4.geom.flat.transform.rotate=function(e,t,i,n,r,o,a){for(var s=a||[],l=Math.cos(r),u=Math.sin(r),c=o[0],h=o[1],d=0,f=t;f<i;f+=n){var p=e[f]-c,_=e[f+1]-h;s[d++]=c+p*l-_*u,s[d++]=h+p*u+_*l;for(var m=f+2;m<f+n;++m)s[d++]=e[m]}return a&&s.length!=d&&(s.length=d),s},t$4.geom.flat.transform.scale=function(e,t,i,n,r,o,a,s){for(var l=s||[],u=a[0],c=a[1],h=0,d=t;d<i;d+=n){var f=e[d]-u,p=e[d+1]-c;l[h++]=u+r*f,l[h++]=c+o*p;for(var _=d+2;_<d+n;++_)l[h++]=e[_]}return s&&l.length!=h&&(l.length=h),l},t$4.geom.GeometryLayout={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"},t$4.geom.flat.reverse.coordinates=function(e,t,i,n){for(;t<i-n;){var r;for(r=0;r<n;++r){var o=e[t+r];e[t+r]=e[i-n+r],e[i-n+r]=o}t+=n,i-=n}},t$4.geom.flat.orient.linearRingIsClockwise=function(e,t,i,n){for(var r=0,o=e[i-n],a=e[i-n+1];t<i;t+=n){var s=e[t],l=e[t+1];r+=(s-o)*(l+a),o=s,a=l}return r>0},t$4.geom.flat.orient.linearRingsAreOriented=function(e,t,i,n,r){var o,a,s=void 0!==r&&r;for(o=0,a=i.length;o<a;++o){var l=i[o],u=t$4.geom.flat.orient.linearRingIsClockwise(e,t,l,n);if(0===o){if(s&&u||!s&&!u)return!1}else if(s&&!u||!s&&u)return!1;t=l}return!0},t$4.geom.flat.orient.linearRingssAreOriented=function(e,t,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o)if(!t$4.geom.flat.orient.linearRingsAreOriented(e,t,i[o],n,r))return!1;return!0},t$4.geom.flat.orient.orientLinearRings=function(e,t,i,n,r){var o,a,s=void 0!==r&&r;for(o=0,a=i.length;o<a;++o){var l=i[o],u=t$4.geom.flat.orient.linearRingIsClockwise(e,t,l,n);(0===o?s&&u||!s&&!u:s&&!u||!s&&u)&&t$4.geom.flat.reverse.coordinates(e,t,l,n),t=l}return t},t$4.geom.flat.orient.orientLinearRingss=function(e,t,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o)t=t$4.geom.flat.orient.orientLinearRings(e,t,i[o],n,r);return t},t$4.geom.flat.simplify={},t$4.geom.flat.simplify.lineString=function(e,t,i,n,r,o,a){var s=void 0!==a?a:[];return o||(i=t$4.geom.flat.simplify.radialDistance(e,t,i,n,r,s,0),e=s,t=0,n=2),s.length=t$4.geom.flat.simplify.douglasPeucker(e,t,i,n,r,s,0),s},t$4.geom.flat.simplify.douglasPeucker=function(e,t,i,n,r,o,a){var s=(i-t)/n;if(s<3){for(;t<i;t+=n)o[a++]=e[t],o[a++]=e[t+1];return a}var l=new Array(s);l[0]=1,l[s-1]=1;for(var u,c=[t,i-n],h=0;c.length>0;){var d=c.pop(),f=c.pop(),p=0,_=e[f],m=e[f+1],g=e[d],x=e[d+1];for(u=f+n;u<d;u+=n){var y=e[u],v=e[u+1],$=t$4.math.squaredSegmentDistance(y,v,_,m,g,x);$>p&&(h=u,p=$)}p>r&&(l[(h-t)/n]=1,f+n<h&&c.push(f,h),h+n<d&&c.push(h,d))}for(u=0;u<s;++u)l[u]&&(o[a++]=e[t+u*n],o[a++]=e[t+u*n+1]);return a},t$4.geom.flat.simplify.douglasPeuckers=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l];a=t$4.geom.flat.simplify.douglasPeucker(e,t,c,n,r,o,a),s.push(a),t=c}return a},t$4.geom.flat.simplify.douglasPeuckerss=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l],h=[];a=t$4.geom.flat.simplify.douglasPeuckers(e,t,c,n,r,o,a,h),s.push(h),t=c[c.length-1]}return a},t$4.geom.flat.simplify.radialDistance=function(e,t,i,n,r,o,a){if(i<=t+n){for(;t<i;t+=n)o[a++]=e[t],o[a++]=e[t+1];return a}var s=e[t],l=e[t+1];o[a++]=s,o[a++]=l;var u=s,c=l;for(t+=n;t<i;t+=n)u=e[t],c=e[t+1],t$4.math.squaredDistance(s,l,u,c)>r&&(o[a++]=u,o[a++]=c,s=u,l=c);return(u!=s||c!=l)&&(o[a++]=u,o[a++]=c),a},t$4.geom.flat.simplify.snap=function(e,t){return t*Math.round(e/t)},t$4.geom.flat.simplify.quantize=function(e,t,i,n,r,o,a){if(t==i)return a;var s,l,u=t$4.geom.flat.simplify.snap(e[t],r),c=t$4.geom.flat.simplify.snap(e[t+1],r);t+=n,o[a++]=u,o[a++]=c;do{if(s=t$4.geom.flat.simplify.snap(e[t],r),l=t$4.geom.flat.simplify.snap(e[t+1],r),(t+=n)==i)return o[a++]=s,o[a++]=l,a}while(s==u&&l==c);for(;t<i;){var h,d;if(h=t$4.geom.flat.simplify.snap(e[t],r),d=t$4.geom.flat.simplify.snap(e[t+1],r),t+=n,h!=s||d!=l){var f=s-u,p=l-c,_=h-u,m=d-c;if(f*m==p*_&&(f<0&&_<f||f==_||f>0&&_>f)&&(p<0&&m<p||p==m||p>0&&m>p)){s=h,l=d;continue}o[a++]=s,o[a++]=l,u=s,c=l,s=h,l=d}}return o[a++]=s,o[a++]=l,a},t$4.geom.flat.simplify.quantizes=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l];a=t$4.geom.flat.simplify.quantize(e,t,c,n,r,o,a),s.push(a),t=c}return a},t$4.geom.flat.simplify.quantizess=function(e,t,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var c=i[l],h=[];a=t$4.geom.flat.simplify.quantizes(e,t,c,n,r,o,a,h),s.push(h),t=c[c.length-1]}return a},t$4.geom.GeometryType={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},t$4.geom.Geometry=function(){t$4.Object.call(this),this.extent_=t$4.extent.createEmpty(),this.extentRevision_=-1,this.simplifiedGeometryCache={},this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.tmpTransform_=t$4.transform.create()},t$4.inherits(t$4.geom.Geometry,t$4.Object),t$4.geom.Geometry.prototype.clone=function(){},t$4.geom.Geometry.prototype.closestPointXY=function(e,t,i,n){},t$4.geom.Geometry.prototype.getClosestPoint=function(e,t){var i=t||[NaN,NaN];return this.closestPointXY(e[0],e[1],i,1/0),i},t$4.geom.Geometry.prototype.intersectsCoordinate=function(e){return this.containsXY(e[0],e[1])},t$4.geom.Geometry.prototype.computeExtent=function(e){},t$4.geom.Geometry.prototype.containsXY=t$4.functions.FALSE,t$4.geom.Geometry.prototype.getExtent=function(e){return this.extentRevision_!=this.getRevision()&&(this.extent_=this.computeExtent(this.extent_),this.extentRevision_=this.getRevision()),t$4.extent.returnOrUpdate(this.extent_,e)},t$4.geom.Geometry.prototype.rotate=function(e,t){},t$4.geom.Geometry.prototype.scale=function(e,t,i){},t$4.geom.Geometry.prototype.simplify=function(e){return this.getSimplifiedGeometry(e*e)},t$4.geom.Geometry.prototype.getSimplifiedGeometry=function(e){},t$4.geom.Geometry.prototype.getType=function(){},t$4.geom.Geometry.prototype.applyTransform=function(e){},t$4.geom.Geometry.prototype.intersectsExtent=function(e){},t$4.geom.Geometry.prototype.translate=function(e,t){},t$4.geom.Geometry.prototype.transform=function(e,t){var i=this.tmpTransform_,n=(e=t$4.proj.get(e)).getUnits()==t$4.proj.Units.TILE_PIXELS?function(n,r,o){var a=e.getExtent(),s=e.getWorldExtent(),l=t$4.extent.getHeight(s)/t$4.extent.getHeight(a);return t$4.transform.compose(i,s[0],s[3],l,-l,0,0,0),t$4.geom.flat.transform.transform2D(n,0,n.length,o,i,r),t$4.proj.getTransform(e,t)(n,r,o)}:t$4.proj.getTransform(e,t);return this.applyTransform(n),this},t$4.geom.SimpleGeometry=function(){t$4.geom.Geometry.call(this),this.layout=t$4.geom.GeometryLayout.XY,this.stride=2,this.flatCoordinates=null},t$4.inherits(t$4.geom.SimpleGeometry,t$4.geom.Geometry),t$4.geom.SimpleGeometry.getLayoutForStride_=function(e){var t;return 2==e?t=t$4.geom.GeometryLayout.XY:3==e?t=t$4.geom.GeometryLayout.XYZ:4==e&&(t=t$4.geom.GeometryLayout.XYZM),t},t$4.geom.SimpleGeometry.getStrideForLayout=function(e){var t;return e==t$4.geom.GeometryLayout.XY?t=2:e==t$4.geom.GeometryLayout.XYZ||e==t$4.geom.GeometryLayout.XYM?t=3:e==t$4.geom.GeometryLayout.XYZM&&(t=4),t},t$4.geom.SimpleGeometry.prototype.containsXY=t$4.functions.FALSE,t$4.geom.SimpleGeometry.prototype.computeExtent=function(e){return t$4.extent.createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t$4.geom.SimpleGeometry.prototype.getCoordinates=function(){},t$4.geom.SimpleGeometry.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},t$4.geom.SimpleGeometry.prototype.getFlatCoordinates=function(){return this.flatCoordinates},t$4.geom.SimpleGeometry.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},t$4.geom.SimpleGeometry.prototype.getLayout=function(){return this.layout},t$4.geom.SimpleGeometry.prototype.getSimplifiedGeometry=function(e){if(this.simplifiedGeometryRevision!=this.getRevision()&&(t$4.obj.clear(this.simplifiedGeometryCache),this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var t=e.toString();if(this.simplifiedGeometryCache.hasOwnProperty(t))return this.simplifiedGeometryCache[t];var i=this.getSimplifiedGeometryInternal(e);return i.getFlatCoordinates().length<this.flatCoordinates.length?(this.simplifiedGeometryCache[t]=i,i):(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)},t$4.geom.SimpleGeometry.prototype.getSimplifiedGeometryInternal=function(e){return this},t$4.geom.SimpleGeometry.prototype.getStride=function(){return this.stride},t$4.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal=function(e,t){this.stride=t$4.geom.SimpleGeometry.getStrideForLayout(e),this.layout=e,this.flatCoordinates=t},t$4.geom.SimpleGeometry.prototype.setCoordinates=function(e,t){},t$4.geom.SimpleGeometry.prototype.setLayout=function(e,t,i){var n;if(e)n=t$4.geom.SimpleGeometry.getStrideForLayout(e);else{var r;for(r=0;r<i;++r){if(0===t.length)return this.layout=t$4.geom.GeometryLayout.XY,void(this.stride=2);t=t[0]}n=t.length,e=t$4.geom.SimpleGeometry.getLayoutForStride_(n)}this.layout=e,this.stride=n},t$4.geom.SimpleGeometry.prototype.applyTransform=function(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},t$4.geom.SimpleGeometry.prototype.rotate=function(e,t){var i=this.getFlatCoordinates();if(i){var n=this.getStride();t$4.geom.flat.transform.rotate(i,0,i.length,n,e,t,i),this.changed()}},t$4.geom.SimpleGeometry.prototype.scale=function(e,t,i){var n=t;void 0===n&&(n=e);var r=i;r||(r=t$4.extent.getCenter(this.getExtent()));var o=this.getFlatCoordinates();if(o){var a=this.getStride();t$4.geom.flat.transform.scale(o,0,o.length,a,e,n,r,o),this.changed()}},t$4.geom.SimpleGeometry.prototype.translate=function(e,t){var i=this.getFlatCoordinates();if(i){var n=this.getStride();t$4.geom.flat.transform.translate(i,0,i.length,n,e,t,i),this.changed()}},t$4.geom.SimpleGeometry.transform2D=function(e,t,i){var n=e.getFlatCoordinates();if(n){var r=e.getStride();return t$4.geom.flat.transform.transform2D(n,0,n.length,r,t,i)}return null},t$4.geom.Polygon=function(e,t){t$4.geom.SimpleGeometry.call(this),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.Polygon,t$4.geom.SimpleGeometry),t$4.geom.Polygon.prototype.appendLinearRing=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},t$4.geom.Polygon.prototype.clone=function(){var e=new t$4.geom.Polygon(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice()),e},t$4.geom.Polygon.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,i,n))},t$4.geom.Polygon.prototype.containsXY=function(e,t){return t$4.geom.flat.contains.linearRingsContainsXY(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)},t$4.geom.Polygon.prototype.getArea=function(){return t$4.geom.flat.area.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},t$4.geom.Polygon.prototype.getCoordinates=function(e){var t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),t$4.geom.flat.orient.orientLinearRings(t,0,this.ends_,this.stride,e)):t=this.flatCoordinates,t$4.geom.flat.inflate.coordinatess(t,0,this.ends_,this.stride)},t$4.geom.Polygon.prototype.getEnds=function(){return this.ends_},t$4.geom.Polygon.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var e=t$4.extent.getCenter(this.getExtent());this.flatInteriorPoint_=t$4.geom.flat.interiorpoint.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},t$4.geom.Polygon.prototype.getInteriorPoint=function(){return new t$4.geom.Point(this.getFlatInteriorPoint(),t$4.geom.GeometryLayout.XYM)},t$4.geom.Polygon.prototype.getLinearRingCount=function(){return this.ends_.length},t$4.geom.Polygon.prototype.getLinearRing=function(e){if(e<0||this.ends_.length<=e)return null;var t=new t$4.geom.LinearRing(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e])),t},t$4.geom.Polygon.prototype.getLinearRings=function(){var e,t,i=this.layout,n=this.flatCoordinates,r=this.ends_,o=[],a=0;for(e=0,t=r.length;e<t;++e){var s=r[e],l=new t$4.geom.LinearRing(null);l.setFlatCoordinates(i,n.slice(a,s)),o.push(l),a=s}return o},t$4.geom.Polygon.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;t$4.geom.flat.orient.linearRingsAreOriented(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=t$4.geom.flat.orient.orientLinearRings(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t$4.geom.Polygon.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$4.geom.flat.simplify.quantizes(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,i);var n=new t$4.geom.Polygon(null);return n.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t,i),n},t$4.geom.Polygon.prototype.getType=function(){return t$4.geom.GeometryType.POLYGON},t$4.geom.Polygon.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)},t$4.geom.Polygon.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$4.geom.flat.deflate.coordinatess(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1]}else this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null,this.ends_)},t$4.geom.Polygon.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.ends_=i},t$4.geom.Polygon.circular=function(e,t,i,n){var r,o=n||32,a=[];for(r=0;r<o;++r)t$4.array.extend(a,e.offset(t,i,2*Math.PI*r/o));a.push(a[0],a[1]);var s=new t$4.geom.Polygon(null);return s.setFlatCoordinates(t$4.geom.GeometryLayout.XY,a,[a.length]),s},t$4.geom.Polygon.fromExtent=function(e){var t=e[0],i=e[1],n=e[2],r=e[3],o=[t,i,t,r,n,r,n,i,t,i],a=new t$4.geom.Polygon(null);return a.setFlatCoordinates(t$4.geom.GeometryLayout.XY,o,[o.length]),a},t$4.geom.Polygon.fromCircle=function(e,t,i){for(var n=t||32,r=e.getStride(),o=e.getLayout(),a=new t$4.geom.Polygon(null,o),s=r*(n+1),l=new Array(s),u=0;u<s;u++)l[u]=0;var c=[l.length];return a.setFlatCoordinates(o,l,c),t$4.geom.Polygon.makeRegular(a,e.getCenter(),e.getRadius(),i),a},t$4.geom.Polygon.makeRegular=function(e,t,i,n){for(var r,o,a=e.getFlatCoordinates(),s=e.getLayout(),l=e.getStride(),u=e.getEnds(),c=a.length/l-1,h=n||0,d=0;d<=c;++d)o=d*l,r=h+2*t$4.math.modulo(d,c)*Math.PI/c,a[o]=t[0]+i*Math.cos(r),a[o+1]=t[1]+i*Math.sin(r);e.setFlatCoordinates(s,a,u)},t$4.geom.LineString=function(e,t){t$4.geom.SimpleGeometry.call(this),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.LineString,t$4.geom.SimpleGeometry),t$4.geom.LineString.prototype.appendCoordinate=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()},t$4.geom.LineString.prototype.clone=function(){var e=new t$4.geom.LineString(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$4.geom.LineString.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getMaxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,i,n))},t$4.geom.LineString.prototype.forEachSegment=function(e,t){return t$4.geom.flat.segments.forEach(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t)},t$4.geom.LineString.prototype.getCoordinateAtM=function(e,t){if(this.layout!=t$4.geom.GeometryLayout.XYM&&this.layout!=t$4.geom.GeometryLayout.XYZM)return null;var i=void 0!==t&&t;return t$4.geom.flat.interpolate.lineStringCoordinateAtM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,i)},t$4.geom.LineString.prototype.getCoordinates=function(){return t$4.geom.flat.inflate.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$4.geom.LineString.prototype.getCoordinateAt=function(e,t){return t$4.geom.flat.interpolate.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t)},t$4.geom.LineString.prototype.getLength=function(){return t$4.geom.flat.length.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$4.geom.LineString.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},t$4.geom.LineString.prototype.getSimplifiedGeometryInternal=function(e){var t=[];t.length=t$4.geom.flat.simplify.douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0);var i=new t$4.geom.LineString(null);return i.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t),i},t$4.geom.LineString.prototype.getType=function(){return t$4.geom.GeometryType.LINE_STRING},t$4.geom.LineString.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t$4.geom.LineString.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$4.geom.flat.deflate.coordinates(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null)},t$4.geom.LineString.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$4.geom.Point=function(e,t){t$4.geom.SimpleGeometry.call(this),this.setCoordinates(e,t)},t$4.inherits(t$4.geom.Point,t$4.geom.SimpleGeometry),t$4.geom.Point.prototype.clone=function(){var e=new t$4.geom.Point(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$4.geom.Point.prototype.closestPointXY=function(e,t,i,n){var r=this.flatCoordinates,o=t$4.math.squaredDistance(e,t,r[0],r[1]);if(o<n){var a,s=this.stride;for(a=0;a<s;++a)i[a]=r[a];return i.length=s,o}return n},t$4.geom.Point.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},t$4.geom.Point.prototype.computeExtent=function(e){return t$4.extent.createOrUpdateFromCoordinate(this.flatCoordinates,e)},t$4.geom.Point.prototype.getType=function(){return t$4.geom.GeometryType.POINT},t$4.geom.Point.prototype.intersectsExtent=function(e){return t$4.extent.containsXY(e,this.flatCoordinates[0],this.flatCoordinates[1])},t$4.geom.Point.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$4.geom.flat.deflate.coordinate(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null)},t$4.geom.Point.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$4.geom.MultiLineString=function(e,t){t$4.geom.SimpleGeometry.call(this),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.MultiLineString,t$4.geom.SimpleGeometry),t$4.geom.MultiLineString.prototype.appendLineString=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates().slice()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},t$4.geom.MultiLineString.prototype.clone=function(){var e=new t$4.geom.MultiLineString(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice()),e},t$4.geom.MultiLineString.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,i,n))},t$4.geom.MultiLineString.prototype.getCoordinateAtM=function(e,t,i){if(this.layout!=t$4.geom.GeometryLayout.XYM&&this.layout!=t$4.geom.GeometryLayout.XYZM||0===this.flatCoordinates.length)return null;var n=void 0!==t&&t,r=void 0!==i&&i;return t$4.geom.flat.interpolate.lineStringsCoordinateAtM(this.flatCoordinates,0,this.ends_,this.stride,e,n,r)},t$4.geom.MultiLineString.prototype.getCoordinates=function(){return t$4.geom.flat.inflate.coordinatess(this.flatCoordinates,0,this.ends_,this.stride)},t$4.geom.MultiLineString.prototype.getEnds=function(){return this.ends_},t$4.geom.MultiLineString.prototype.getLineString=function(e){if(e<0||this.ends_.length<=e)return null;var t=new t$4.geom.LineString(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e])),t},t$4.geom.MultiLineString.prototype.getLineStrings=function(){var e,t,i=this.flatCoordinates,n=this.ends_,r=this.layout,o=[],a=0;for(e=0,t=n.length;e<t;++e){var s=n[e],l=new t$4.geom.LineString(null);l.setFlatCoordinates(r,i.slice(a,s)),o.push(l),a=s}return o},t$4.geom.MultiLineString.prototype.getFlatMidpoints=function(){var e,t,i=[],n=this.flatCoordinates,r=0,o=this.ends_,a=this.stride;for(e=0,t=o.length;e<t;++e){var s=o[e],l=t$4.geom.flat.interpolate.lineString(n,r,s,a,.5);t$4.array.extend(i,l),r=s}return i},t$4.geom.MultiLineString.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$4.geom.flat.simplify.douglasPeuckers(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,i);var n=new t$4.geom.MultiLineString(null);return n.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t,i),n},t$4.geom.MultiLineString.prototype.getType=function(){return t$4.geom.GeometryType.MULTI_LINE_STRING},t$4.geom.MultiLineString.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.lineStrings(this.flatCoordinates,0,this.ends_,this.stride,e)},t$4.geom.MultiLineString.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$4.geom.flat.deflate.coordinatess(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}else this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null,this.ends_)},t$4.geom.MultiLineString.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.ends_=i,this.changed()},t$4.geom.MultiLineString.prototype.setLineStrings=function(e){var t,i,n=this.getLayout(),r=[],o=[];for(t=0,i=e.length;t<i;++t){var a=e[t];0===t&&(n=a.getLayout()),t$4.array.extend(r,a.getFlatCoordinates()),o.push(r.length)}this.setFlatCoordinates(n,r,o)},t$4.geom.MultiPoint=function(e,t){t$4.geom.SimpleGeometry.call(this),this.setCoordinates(e,t)},t$4.inherits(t$4.geom.MultiPoint,t$4.geom.SimpleGeometry),t$4.geom.MultiPoint.prototype.appendPoint=function(e){this.flatCoordinates?t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()},t$4.geom.MultiPoint.prototype.clone=function(){var e=new t$4.geom.MultiPoint(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),e},t$4.geom.MultiPoint.prototype.closestPointXY=function(e,t,i,n){if(n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t))return n;var r,o,a,s=this.flatCoordinates,l=this.stride;for(r=0,o=s.length;r<o;r+=l){var u=t$4.math.squaredDistance(e,t,s[r],s[r+1]);if(u<n){for(n=u,a=0;a<l;++a)i[a]=s[r+a];i.length=l}}return n},t$4.geom.MultiPoint.prototype.getCoordinates=function(){return t$4.geom.flat.inflate.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},t$4.geom.MultiPoint.prototype.getPoint=function(e){var t=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;if(e<0||t<=e)return null;var i=new t$4.geom.Point(null);return i.setFlatCoordinates(this.layout,this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride)),i},t$4.geom.MultiPoint.prototype.getPoints=function(){var e,t,i=this.flatCoordinates,n=this.layout,r=this.stride,o=[];for(e=0,t=i.length;e<t;e+=r){var a=new t$4.geom.Point(null);a.setFlatCoordinates(n,i.slice(e,e+r)),o.push(a)}return o},t$4.geom.MultiPoint.prototype.getType=function(){return t$4.geom.GeometryType.MULTI_POINT},t$4.geom.MultiPoint.prototype.intersectsExtent=function(e){var t,i,n,r,o=this.flatCoordinates,a=this.stride;for(t=0,i=o.length;t<i;t+=a)if(n=o[t],r=o[t+1],t$4.extent.containsXY(e,n,r))return!0;return!1},t$4.geom.MultiPoint.prototype.setCoordinates=function(e,t){e?(this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=t$4.geom.flat.deflate.coordinates(this.flatCoordinates,0,e,this.stride),this.changed()):this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null)},t$4.geom.MultiPoint.prototype.setFlatCoordinates=function(e,t){this.setFlatCoordinatesInternal(e,t),this.changed()},t$4.geom.flat.center.linearRingss={},t$4.geom.flat.center.linearRingss=function(e,t,i,n){var r,o,a=[],s=t$4.extent.createEmpty();for(r=0,o=i.length;r<o;++r){var l=i[r];s=t$4.extent.createOrUpdateFromFlatCoordinates(e,t,l[0],n),a.push((s[0]+s[2])/2,(s[1]+s[3])/2),t=l[l.length-1]}return a},t$4.geom.MultiPolygon=function(e,t){t$4.geom.SimpleGeometry.call(this),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,this.setCoordinates(e,t)},t$4.inherits(t$4.geom.MultiPolygon,t$4.geom.SimpleGeometry),t$4.geom.MultiPolygon.prototype.appendPolygon=function(e){var t;if(this.flatCoordinates){var i,n,r=this.flatCoordinates.length;for(t$4.array.extend(this.flatCoordinates,e.getFlatCoordinates()),i=0,n=(t=e.getEnds().slice()).length;i<n;++i)t[i]+=r}else this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();this.endss_.push(t),this.changed()},t$4.geom.MultiPolygon.prototype.clone=function(){for(var e=new t$4.geom.MultiPolygon(null),t=this.endss_.length,i=new Array(t),n=0;n<t;++n)i[n]=this.endss_[n].slice();return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),i),e},t$4.geom.MultiPolygon.prototype.closestPointXY=function(e,t,i,n){return n<t$4.extent.closestSquaredDistanceXY(this.getExtent(),e,t)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(t$4.geom.flat.closest.getssMaxSquaredDelta(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),t$4.geom.flat.closest.getssClosestPoint(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,t,i,n))},t$4.geom.MultiPolygon.prototype.containsXY=function(e,t){return t$4.geom.flat.contains.linearRingssContainsXY(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)},t$4.geom.MultiPolygon.prototype.getArea=function(){return t$4.geom.flat.area.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},t$4.geom.MultiPolygon.prototype.getCoordinates=function(e){var t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),t$4.geom.flat.orient.orientLinearRingss(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,t$4.geom.flat.inflate.coordinatesss(t,0,this.endss_,this.stride)},t$4.geom.MultiPolygon.prototype.getEndss=function(){return this.endss_},t$4.geom.MultiPolygon.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var e=t$4.geom.flat.center.linearRingss(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=t$4.geom.flat.interiorpoint.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},t$4.geom.MultiPolygon.prototype.getInteriorPoints=function(){var e=new t$4.geom.MultiPoint(null);return e.setFlatCoordinates(t$4.geom.GeometryLayout.XYM,this.getFlatInteriorPoints().slice()),e},t$4.geom.MultiPolygon.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;t$4.geom.flat.orient.linearRingssAreOriented(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=t$4.geom.flat.orient.orientLinearRingss(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},t$4.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal=function(e){var t=[],i=[];t.length=t$4.geom.flat.simplify.quantizess(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,i);var n=new t$4.geom.MultiPolygon(null);return n.setFlatCoordinates(t$4.geom.GeometryLayout.XY,t,i),n},t$4.geom.MultiPolygon.prototype.getPolygon=function(e){if(e<0||this.endss_.length<=e)return null;var t;if(0===e)t=0;else{var i=this.endss_[e-1];t=i[i.length-1]}var n,r,o=this.endss_[e].slice(),a=o[o.length-1];if(0!==t)for(n=0,r=o.length;n<r;++n)o[n]-=t;var s=new t$4.geom.Polygon(null);return s.setFlatCoordinates(this.layout,this.flatCoordinates.slice(t,a),o),s},t$4.geom.MultiPolygon.prototype.getPolygons=function(){var e,t,i,n,r=this.layout,o=this.flatCoordinates,a=this.endss_,s=[],l=0;for(e=0,t=a.length;e<t;++e){var u=a[e].slice(),c=u[u.length-1];if(0!==l)for(i=0,n=u.length;i<n;++i)u[i]-=l;var h=new t$4.geom.Polygon(null);h.setFlatCoordinates(r,o.slice(l,c),u),s.push(h),l=c}return s},t$4.geom.MultiPolygon.prototype.getType=function(){return t$4.geom.GeometryType.MULTI_POLYGON},t$4.geom.MultiPolygon.prototype.intersectsExtent=function(e){return t$4.geom.flat.intersectsextent.linearRingss(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)},t$4.geom.MultiPolygon.prototype.setCoordinates=function(e,t){if(e){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=t$4.geom.flat.deflate.coordinatesss(this.flatCoordinates,0,e,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{var n=i[i.length-1];this.flatCoordinates.length=0===n.length?0:n[n.length-1]}this.changed()}else this.setFlatCoordinates(t$4.geom.GeometryLayout.XY,null,this.endss_)},t$4.geom.MultiPolygon.prototype.setFlatCoordinates=function(e,t,i){this.setFlatCoordinatesInternal(e,t),this.endss_=i,this.changed()},t$4.geom.MultiPolygon.prototype.setPolygons=function(e){var t,i,n,r=this.getLayout(),o=[],a=[];for(t=0,i=e.length;t<i;++t){var s=e[t];0===t&&(r=s.getLayout());var l,u,c=o.length;for(l=0,u=(n=s.getEnds()).length;l<u;++l)n[l]+=c;t$4.array.extend(o,s.getFlatCoordinates()),a.push(n)}this.setFlatCoordinates(r,o,a)},t$4.Feature=function(e){if(t$4.Object.call(this),this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,void 0!==e)if(e instanceof t$4.geom.Geometry||!e){var t=e;this.setGeometry(t)}else{var i=e;this.setProperties(i)}},t$4.inherits(t$4.Feature,t$4.Object),t$4.Feature.prototype.clone=function(){var e=new t$4.Feature(this.getProperties());e.setGeometryName(this.getGeometryName());var t=this.getGeometry();t&&e.setGeometry(t.clone());var i=this.getStyle();return i&&e.setStyle(i),e},t$4.Feature.prototype.getGeometry=function(){return this.get(this.geometryName_)},t$4.Feature.prototype.getId=function(){return this.id_},t$4.Feature.prototype.getGeometryName=function(){return this.geometryName_},t$4.Feature.prototype.getStyle=function(){return this.style_},t$4.Feature.prototype.getStyleFunction=function(){return this.styleFunction_},t$4.Feature.prototype.handleGeometryChange_=function(){this.changed()},t$4.Feature.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(t$4.events.unlistenByKey(this.geometryChangeKey_),this.geometryChangeKey_=null);var e=this.getGeometry();e&&(this.geometryChangeKey_=t$4.events.listen(e,t$4.events.EventType.CHANGE,this.handleGeometryChange_,this)),this.changed()},t$4.Feature.prototype.setGeometry=function(e){this.set(this.geometryName_,e)},t$4.Feature.prototype.setStyle=function(e){this.style_=e,this.styleFunction_=e?t$4.Feature.createStyleFunction(e):void 0,this.changed()},t$4.Feature.prototype.setId=function(e){this.id_=e,this.changed()},t$4.Feature.prototype.setGeometryName=function(e){t$4.events.unlisten(this,t$4.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this),this.geometryName_=e,t$4.events.listen(this,t$4.Object.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this),this.handleGeometryChanged_()},t$4.Feature.createStyleFunction=function(e){var t,i;"function"==typeof e?t=2==e.length?function(t){return e(this,t)}:e:(Array.isArray(e)?i=e:(t$4.asserts.assert(e instanceof t$4.style.Style,41),i=[e]),t=function(){return i});return t},t$4.format={},t$4.format.Feature=function(){this.defaultDataProjection=null,this.defaultFeatureProjection=null},t$4.format.Feature.prototype.getReadOptions=function(e,t){var i;return t&&(i={dataProjection:t.dataProjection?t.dataProjection:this.readProjection(e),featureProjection:t.featureProjection}),this.adaptOptions(i)},t$4.format.Feature.prototype.adaptOptions=function(e){return t$4.obj.assign({dataProjection:this.defaultDataProjection,featureProjection:this.defaultFeatureProjection},e)},t$4.format.Feature.prototype.getLastExtent=function(){return null},t$4.format.Feature.prototype.getType=function(){},t$4.format.Feature.prototype.readFeature=function(e,t){},t$4.format.Feature.prototype.readFeatures=function(e,t){},t$4.format.Feature.prototype.readGeometry=function(e,t){},t$4.format.Feature.prototype.readProjection=function(e){},t$4.format.Feature.prototype.writeFeature=function(e,t){},t$4.format.Feature.prototype.writeFeatures=function(e,t){},t$4.format.Feature.prototype.writeGeometry=function(e,t){},t$4.format.Feature.transformWithOptions=function(e,t,i){var n;if(n=e,t&&i&&void 0!==i.decimals){var r=Math.pow(10,i.decimals);n===e&&(n=n.clone()),n.applyTransform((function(e){for(var t=0,i=e.length;t<i;++t)e[t]=Math.round(e[t]*r)/r;return e}))}return n},t$4.format.MVT=function(e){t$4.format.Feature.call(this);var t=e||{};this.featureClass_=t.featureClass?t.featureClass:t$4.render.Feature,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.extent_=null},t$4.inherits(t$4.format.MVT,t$4.format.Feature),t$4.format.MVT.pbfReaders_={layers:function(e,t,i){if(3===e){var n={keys:[],values:[],features:[]},r=i.readVarint()+i.pos;i.readFields(t$4.format.MVT.pbfReaders_.layer,n,r),n.length=n.features.length,n.length&&(t[n.name]=n)}},layer:function(e,t,i){if(15===e)t.version=i.readVarint();else if(1===e)t.name=i.readString();else if(5===e)t.extent=i.readVarint();else if(2===e)t.features.push(i.pos);else if(3===e)t.keys.push(i.readString());else if(4===e){for(var n=null,r=i.readVarint()+i.pos;i.pos<r;)n=1===(e=i.readVarint()>>3)?i.readString():2===e?i.readFloat():3===e?i.readDouble():4===e?i.readVarint64():5===e?i.readVarint():6===e?i.readSVarint():7===e?i.readBoolean():null;t.values.push(n)}},feature:function(e,t,i){if(1==e)t.id=i.readVarint();else if(2==e)for(var n=i.readVarint()+i.pos;i.pos<n;){var r=t.layer.keys[i.readVarint()],o=t.layer.values[i.readVarint()];t.properties[r]=o}else 3==e?t.type=i.readVarint():4==e&&(t.geometry=i.pos)}},t$4.format.MVT.readRawFeature_=function(e,t,i){e.pos=t.features[i];var n=e.readVarint()+e.pos,r={layer:t,type:0,properties:{}};return e.readFields(t$4.format.MVT.pbfReaders_.feature,r,n),r},t$4.format.MVT.readRawGeometry_=function(e,t,i,n){e.pos=t.geometry;for(var r=e.readVarint()+e.pos,o=1,a=0,s=0,l=0,u=0,c=0;e.pos<r;){if(!a){var h=e.readVarint();o=7&h,a=h>>3}a--,1===o||2===o?(s+=e.readSVarint(),l+=e.readSVarint(),1===o&&u>c&&(n.push(u),c=u),i.push(s,l),u+=2):7===o?u>c&&(i.push(i[c],i[c+1]),u+=2):t$4.asserts.assert(!1,59)}u>c&&(n.push(u),c=u)},t$4.format.MVT.getGeometryType_=function(e,t){var i;return 1===e?i=1===t?t$4.geom.GeometryType.POINT:t$4.geom.GeometryType.MULTI_POINT:2===e?i=1===t?t$4.geom.GeometryType.LINE_STRING:t$4.geom.GeometryType.MULTI_LINE_STRING:3===e&&(i=t$4.geom.GeometryType.POLYGON),i},t$4.format.MVT.prototype.createFeature_=function(e,t,i){var n=t.type;if(0===n)return null;var r,o=t.id,a=t.properties;a[this.layerName_]=t.layer.name;var s=[],l=[];t$4.format.MVT.readRawGeometry_(e,t,s,l);var u,c=t$4.format.MVT.getGeometryType_(n,l.length);if(c==t$4.geom.GeometryType.POLYGON){for(var h=[],d=0,f=0,p=0,_=l.length;p<_;++p){var m=l[p];t$4.geom.flat.orient.linearRingIsClockwise(s,d,m,2)||(h.push(l.slice(f,p+1)),f=p+1),d=m}h.length>1?(l=h,u=new t$4.geom.MultiPolygon(null)):u=new t$4.geom.Polygon(null)}else u=c===t$4.geom.GeometryType.POINT?new t$4.geom.Point(null):c===t$4.geom.GeometryType.LINE_STRING?new t$4.geom.LineString(null):c===t$4.geom.GeometryType.POLYGON?new t$4.geom.Polygon(null):c===t$4.geom.GeometryType.MULTI_POINT?new t$4.geom.MultiPoint(null):c===t$4.geom.GeometryType.MULTI_LINE_STRING?new t$4.geom.MultiLineString(null):null;u.setFlatCoordinates(t$4.geom.GeometryLayout.XY,s,l),r=new this.featureClass_,this.geometryName_&&r.setGeometryName(this.geometryName_);var g=t$4.format.Feature.transformWithOptions(u,!1,this.adaptOptions(i));return r.setGeometry(g),r.setId(o),r.setProperties(a),r},t$4.format.MVT.prototype.readFeatures=function(e,t){var i,n=this.layers_,r=new h$V(e),o=r.readFields(t$4.format.MVT.pbfReaders_.layers,{}),a=[];for(var s in o)if(!n||-1!=n.indexOf(s)){if(void 0!==t){var l=t.needSourceLayerNames;if(void 0!==l&&void 0===l[s])continue}for(var u,c=0,h=(i=o[s]).length;c<h;++c)u=t$4.format.MVT.readRawFeature_(r,i,c),a.push(this.createFeature_(r,u));this.extent_=i?[0,0,i.extent,i.extent]:null}return a},t$4.style={},t$4.style.IconImageCache=function(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32},t$4.style.IconImageCache.getKey=function(e,t,i){return t+":"+e+":"+(i?t$4.color.asString(i):"null")},t$4.style.IconImageCache.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t$4.style.IconImageCache.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){var e,t,i=0;for(e in this.cache_)t=this.cache_[e],0==(3&i++)&&!t.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}},t$4.style.IconImageCache.prototype.get=function(e,t,i){var n=t$4.style.IconImageCache.getKey(e,t,i);return n in this.cache_?this.cache_[n]:null},t$4.style.IconImageCache.prototype.set=function(e,t,i,n){var r=t$4.style.IconImageCache.getKey(e,t,i);this.cache_[r]=n,++this.cacheSize_},t$4.style.IconImageCache.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},t$4.style.iconImageCache=new t$4.style.IconImageCache,t$4.style.Image=function(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.snapToPixel_=e.snapToPixel},t$4.style.Image.prototype.getOpacity=function(){return this.opacity_},t$4.style.Image.prototype.getRotateWithView=function(){return this.rotateWithView_},t$4.style.Image.prototype.getRotation=function(){return this.rotation_},t$4.style.Image.prototype.getScale=function(){return this.scale_},t$4.style.Image.prototype.getSnapToPixel=function(){return this.snapToPixel_},t$4.style.Image.prototype.getAnchor=function(){},t$4.style.Image.prototype.getImage=function(e){},t$4.style.Image.prototype.getHitDetectionImage=function(e){},t$4.style.Image.prototype.getImageState=function(){},t$4.style.Image.prototype.getImageSize=function(){},t$4.style.Image.prototype.getHitDetectionImageSize=function(){},t$4.style.Image.prototype.getOrigin=function(){},t$4.style.Image.prototype.getSize=function(){},t$4.style.Image.prototype.setOpacity=function(e){this.opacity_=e},t$4.style.Image.prototype.setRotateWithView=function(e){this.rotateWithView_=e},t$4.style.Image.prototype.setRotation=function(e){this.rotation_=e},t$4.style.Image.prototype.setScale=function(e){this.scale_=e},t$4.style.Image.prototype.setSnapToPixel=function(e){this.snapToPixel_=e},t$4.style.Image.prototype.listenImageChange=function(e,t){},t$4.style.Image.prototype.load=function(){},t$4.style.Image.prototype.unlistenImageChange=function(e,t){},t$4.style.RegularShape=function(e){this.checksums_=null,this.canvas_=null,this.hitDetectionCanvas_=null,this.fill_=void 0!==e.fill?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=void 0!==e.radius?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=void 0!==e.angle?e.angle:0,this.stroke_=void 0!==e.stroke?e.stroke:null,this.anchor_=null,this.size_=null,this.imageSize_=null,this.hitDetectionImageSize_=null,this.atlasManager_=e.atlasManager,this.render_(this.atlasManager_);var t=void 0===e.snapToPixel||e.snapToPixel,i=void 0!==e.rotateWithView&&e.rotateWithView;t$4.style.Image.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:1,snapToPixel:t})},t$4.inherits(t$4.style.RegularShape,t$4.style.Image),t$4.style.RegularShape.prototype.clone=function(){var e=new t$4.style.RegularShape({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),snapToPixel:this.getSnapToPixel(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),atlasManager:this.atlasManager_});return e.setOpacity(this.getOpacity()),e.setScale(this.getScale()),e},t$4.style.RegularShape.prototype.getAnchor=function(){return this.anchor_},t$4.style.RegularShape.prototype.getAngle=function(){return this.angle_},t$4.style.RegularShape.prototype.getFill=function(){return this.fill_},t$4.style.RegularShape.prototype.getHitDetectionImage=function(e){return this.hitDetectionCanvas_},t$4.style.RegularShape.prototype.getImage=function(e){return this.canvas_},t$4.style.RegularShape.prototype.getImageSize=function(){return this.imageSize_},t$4.style.RegularShape.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},t$4.style.RegularShape.prototype.getImageState=function(){return t$4.ImageState.LOADED},t$4.style.RegularShape.prototype.getOrigin=function(){return this.origin_},t$4.style.RegularShape.prototype.getPoints=function(){return this.points_},t$4.style.RegularShape.prototype.getRadius=function(){return this.radius_},t$4.style.RegularShape.prototype.getRadius2=function(){return this.radius2_},t$4.style.RegularShape.prototype.getSize=function(){return this.size_},t$4.style.RegularShape.prototype.getStroke=function(){return this.stroke_},t$4.style.RegularShape.prototype.listenImageChange=function(e,t){},t$4.style.RegularShape.prototype.load=function(){},t$4.style.RegularShape.prototype.unlistenImageChange=function(e,t){},t$4.style.RegularShape.prototype.render_=function(e){var t,i,n="",r="",o=0,a=null,s=0,l=0;this.stroke_&&(null===(i=this.stroke_.getColor())&&(i=t$4.render.canvas.defaultStrokeStyle),i=t$4.colorlike.asColorLike(i),void 0===(l=this.stroke_.getWidth())&&(l=t$4.render.canvas.defaultLineWidth),a=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset(),t$4.has.CANVAS_LINE_DASH||(a=null,s=0),void 0===(r=this.stroke_.getLineJoin())&&(r=t$4.render.canvas.defaultLineJoin),void 0===(n=this.stroke_.getLineCap())&&(n=t$4.render.canvas.defaultLineCap),void 0===(o=this.stroke_.getMiterLimit())&&(o=t$4.render.canvas.defaultMiterLimit));var u=2*(this.radius_+l)+1,c={strokeStyle:i,strokeWidth:l,size:u,lineCap:n,lineDash:a,lineDashOffset:s,lineJoin:r,miterLimit:o};if(void 0===e){var h=t$4.dom.createCanvasContext2D(u,u);this.canvas_=h.canvas,t=u=this.canvas_.width,this.draw_(c,h,0,0),this.createHitDetectionCanvas_(c)}else{u=Math.round(u);var d,f=!this.fill_;f&&(d=this.drawHitDetectionCanvas_.bind(this,c));var p=this.getChecksum(),_=e.add(p,u,u,this.draw_.bind(this,c),d);this.canvas_=_.image,this.origin_=[_.offsetX,_.offsetY],t=_.image.width,f?(this.hitDetectionCanvas_=_.hitImage,this.hitDetectionImageSize_=[_.hitImage.width,_.hitImage.height]):(this.hitDetectionCanvas_=this.canvas_,this.hitDetectionImageSize_=[t,t])}this.anchor_=[u/2,u/2],this.size_=[u,u],this.imageSize_=[t,t]},t$4.style.RegularShape.prototype.draw_=function(e,t,i,n){var r,o,a;t.setTransform(1,0,0,1,0,0),t.translate(i,n),t.beginPath();var s=this.points_;if(s===1/0)t.arc(e.size/2,e.size/2,this.radius_,0,2*Math.PI,!0);else{var l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(s*=2),r=0;r<=s;r++)o=2*r*Math.PI/s-Math.PI/2+this.angle_,a=r%2==0?this.radius_:l,t.lineTo(e.size/2+a*Math.cos(o),e.size/2+a*Math.sin(o))}if(this.fill_){var u=this.fill_.getColor();null===u&&(u=t$4.render.canvas.defaultFillStyle),t.fillStyle=t$4.colorlike.asColorLike(u),t.fill()}this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke()),t.closePath()},t$4.style.RegularShape.prototype.createHitDetectionCanvas_=function(e){if(this.hitDetectionImageSize_=[e.size,e.size],this.fill_)this.hitDetectionCanvas_=this.canvas_;else{var t=t$4.dom.createCanvasContext2D(e.size,e.size);this.hitDetectionCanvas_=t.canvas,this.drawHitDetectionCanvas_(e,t,0,0)}},t$4.style.RegularShape.prototype.drawHitDetectionCanvas_=function(e,t,i,n){t.setTransform(1,0,0,1,0,0),t.translate(i,n),t.beginPath();var r=this.points_;if(r===1/0)t.arc(e.size/2,e.size/2,this.radius_,0,2*Math.PI,!0);else{var o,a,s,l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(r*=2),o=0;o<=r;o++)s=2*o*Math.PI/r-Math.PI/2+this.angle_,a=o%2==0?this.radius_:l,t.lineTo(e.size/2+a*Math.cos(s),e.size/2+a*Math.sin(s))}t.fillStyle=t$4.render.canvas.defaultFillStyle,t.fill(),this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.stroke()),t.closePath()},t$4.style.RegularShape.prototype.getChecksum=function(){var e=this.stroke_?this.stroke_.getChecksum():"-",t=this.fill_?this.fill_.getChecksum():"-";if(!this.checksums_||e!=this.checksums_[1]||t!=this.checksums_[2]||this.radius_!=this.checksums_[3]||this.radius2_!=this.checksums_[4]||this.angle_!=this.checksums_[5]||this.points_!=this.checksums_[6]){var i="r"+e+t+(void 0!==this.radius_?this.radius_.toString():"-")+(void 0!==this.radius2_?this.radius2_.toString():"-")+(void 0!==this.angle_?this.angle_.toString():"-")+(void 0!==this.points_?this.points_.toString():"-");this.checksums_=[i,e,t,this.radius_,this.radius2_,this.angle_,this.points_]}return this.checksums_[0]},t$4.style.Circle=function(e){var t=e||{};t$4.style.RegularShape.call(this,{points:1/0,fill:t.fill,radius:t.radius,snapToPixel:t.snapToPixel,stroke:t.stroke,atlasManager:t.atlasManager})},t$4.inherits(t$4.style.Circle,t$4.style.RegularShape),t$4.style.Circle.prototype.clone=function(){var e=new t$4.style.Circle({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),snapToPixel:this.getSnapToPixel(),atlasManager:this.atlasManager_});return e.setOpacity(this.getOpacity()),e.setScale(this.getScale()),e},t$4.style.Circle.prototype.setRadius=function(e){this.radius_=e,this.render_(this.atlasManager_)},t$4.style.Fill=function(e){var t=e||{};this.color_=void 0!==t.color?t.color:null,this.checksum_=void 0},t$4.style.Fill.prototype.clone=function(){var e=this.getColor();return new t$4.style.Fill({color:e&&e.slice?e.slice():e||void 0})},t$4.style.Fill.prototype.getColor=function(){return this.color_},t$4.style.Fill.prototype.setColor=function(e){this.color_=e,this.checksum_=void 0},t$4.style.Fill.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.color_ instanceof CanvasPattern||this.color_ instanceof CanvasGradient?this.checksum_=t$4.getUid(this.color_).toString():this.checksum_="f"+(this.color_?t$4.color.asString(this.color_):"-")),this.checksum_},t$4.style.Stroke=function(e){var t=e||{};this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width,this.checksum_=void 0},t$4.style.Stroke.prototype.clone=function(){var e=this.getColor();return new t$4.style.Stroke({color:e&&e.slice?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t$4.style.Stroke.prototype.getColor=function(){return this.color_},t$4.style.Stroke.prototype.getLineCap=function(){return this.lineCap_},t$4.style.Stroke.prototype.getLineDash=function(){return this.lineDash_},t$4.style.Stroke.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t$4.style.Stroke.prototype.getLineJoin=function(){return this.lineJoin_},t$4.style.Stroke.prototype.getMiterLimit=function(){return this.miterLimit_},t$4.style.Stroke.prototype.getWidth=function(){return this.width_},t$4.style.Stroke.prototype.setColor=function(e){this.color_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineCap=function(e){this.lineCap_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineDash=function(e){this.lineDash_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineDashOffset=function(e){this.lineDashOffset_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setLineJoin=function(e){this.lineJoin_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setMiterLimit=function(e){this.miterLimit_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.setWidth=function(e){this.width_=e,this.checksum_=void 0},t$4.style.Stroke.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.checksum_="s",this.color_?"string"==typeof this.color_?this.checksum_+=this.color_:this.checksum_+=t$4.getUid(this.color_).toString():this.checksum_+="-",this.checksum_+=","+(void 0!==this.lineCap_?this.lineCap_.toString():"-")+","+(this.lineDash_?this.lineDash_.toString():"-")+","+(void 0!==this.lineDashOffset_?this.lineDashOffset_:"-")+","+(void 0!==this.lineJoin_?this.lineJoin_:"-")+","+(void 0!==this.miterLimit_?this.miterLimit_.toString():"-")+","+(void 0!==this.width_?this.width_.toString():"-")),this.checksum_},t$4.style.IconAnchorUnits={FRACTION:"fraction",PIXELS:"pixels"},t$4.style.IconImage=function(e,t,i,n,r,o){t$4.events.EventTarget.call(this),this.hitDetectionImage_=null,this.image_=e||new Image,null!==n&&(this.image_.crossOrigin=n),this.canvas_=o?document.createElement("CANVAS"):null,this.color_=o,this.imageListenerKeys_=null,this.imageState_=r,this.size_=i,this.src_=t,this.tainting_=!1,this.imageState_==t$4.ImageState.LOADED&&this.determineTainting_()},t$4.inherits(t$4.style.IconImage,t$4.events.EventTarget),t$4.style.IconImage.get=function(e,t,i,n,r,o){var a=t$4.style.iconImageCache,s=a.get(t,n,o);return s||(s=new t$4.style.IconImage(e,t,i,n,r,o),a.set(t,n,o,s)),s},t$4.style.IconImage.prototype.determineTainting_=function(){var e=t$4.dom.createCanvasContext2D(1,1);try{e.drawImage(this.image_,0,0),e.getImageData(0,0,1,1)}catch{this.tainting_=!0}},t$4.style.IconImage.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(t$4.events.EventType.CHANGE)},t$4.style.IconImage.prototype.handleImageError_=function(){this.imageState_=t$4.ImageState.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},t$4.style.IconImage.prototype.handleImageLoad_=function(){this.imageState_=t$4.ImageState.LOADED,this.size_&&(this.image_.width=this.size_[0],this.image_.height=this.size_[1]),this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.determineTainting_(),this.replaceColor_(),this.dispatchChangeEvent_()},t$4.style.IconImage.prototype.getImage=function(e){return this.canvas_?this.canvas_:this.image_},t$4.style.IconImage.prototype.getImageState=function(){return this.imageState_},t$4.style.IconImage.prototype.getHitDetectionImage=function(e){if(!this.hitDetectionImage_)if(this.tainting_){var t=this.size_[0],i=this.size_[1],n=t$4.dom.createCanvasContext2D(t,i);n.fillRect(0,0,t,i),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},t$4.style.IconImage.prototype.getSize=function(){return this.size_},t$4.style.IconImage.prototype.getSrc=function(){return this.src_},t$4.style.IconImage.prototype.load=function(){if(this.imageState_==t$4.ImageState.IDLE){this.imageState_=t$4.ImageState.LOADING,this.imageListenerKeys_=[t$4.events.listenOnce(this.image_,t$4.events.EventType.ERROR,this.handleImageError_,this),t$4.events.listenOnce(this.image_,t$4.events.EventType.LOAD,this.handleImageLoad_,this)];try{this.image_.src=this.src_}catch{this.handleImageError_()}}},t$4.style.IconImage.prototype.replaceColor_=function(){if(!this.tainting_&&null!==this.color_){this.canvas_.width=this.image_.width,this.canvas_.height=this.image_.height;var e=this.canvas_.getContext("2d");e.drawImage(this.image_,0,0);for(var t=e.getImageData(0,0,this.image_.width,this.image_.height),i=t.data,n=this.color_[0]/255,r=this.color_[1]/255,o=this.color_[2]/255,a=0,s=i.length;a<s;a+=4)i[a]*=n,i[a+1]*=r,i[a+2]*=o;e.putImageData(t,0,0)}},t$4.style.IconImage.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(t$4.events.unlistenByKey),this.imageListenerKeys_=null},t$4.style.IconOrigin={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},t$4.style.Icon=function(e){var t=e||{};this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:t$4.style.IconOrigin.TOP_LEFT,this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:t$4.style.IconAnchorUnits.FRACTION,this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:t$4.style.IconAnchorUnits.FRACTION,this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;var i=void 0!==t.img?t.img:null,n=void 0!==t.imgSize?t.imgSize:null,r=t.src;(void 0===r||0===r.length)&&i&&(r=i.src||t$4.getUid(i).toString());var o=void 0!==t.src?t$4.ImageState.IDLE:t$4.ImageState.LOADED;this.color_=void 0!==t.color?t$4.color.asArray(t.color):null,this.iconImage_=t$4.style.IconImage.get(i,r,n,this.crossOrigin_,o,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:t$4.style.IconOrigin.TOP_LEFT,this.origin_=null,this.size_=void 0!==t.size?t.size:null;var a=void 0!==t.opacity?t.opacity:1,s=void 0!==t.rotateWithView&&t.rotateWithView,l=void 0!==t.rotation?t.rotation:0,u=void 0!==t.scale?t.scale:1,c=void 0===t.snapToPixel||t.snapToPixel;t$4.style.Image.call(this,{opacity:a,rotation:l,scale:u,snapToPixel:c,rotateWithView:s})},t$4.inherits(t$4.style.Icon,t$4.style.Image),t$4.style.Icon.prototype.clone=function(){return new t$4.style.Icon({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:this.getScale(),snapToPixel:this.getSnapToPixel(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},t$4.style.Icon.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var e=this.anchor_,t=this.getSize();if(this.anchorXUnits_==t$4.style.IconAnchorUnits.FRACTION||this.anchorYUnits_==t$4.style.IconAnchorUnits.FRACTION){if(!t)return null;e=this.anchor_.slice(),this.anchorXUnits_==t$4.style.IconAnchorUnits.FRACTION&&(e[0]*=t[0]),this.anchorYUnits_==t$4.style.IconAnchorUnits.FRACTION&&(e[1]*=t[1])}if(this.anchorOrigin_!=t$4.style.IconOrigin.TOP_LEFT){if(!t)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_==t$4.style.IconOrigin.TOP_RIGHT||this.anchorOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[0]=-e[0]+t[0]),(this.anchorOrigin_==t$4.style.IconOrigin.BOTTOM_LEFT||this.anchorOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[1]=-e[1]+t[1])}return this.normalizedAnchor_=e,this.normalizedAnchor_},t$4.style.Icon.prototype.getColor=function(){return this.color_},t$4.style.Icon.prototype.getImage=function(e){return this.iconImage_.getImage(e)},t$4.style.Icon.prototype.getImageSize=function(){return this.iconImage_.getSize()},t$4.style.Icon.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},t$4.style.Icon.prototype.getImageState=function(){return this.iconImage_.getImageState()},t$4.style.Icon.prototype.getHitDetectionImage=function(e){return this.iconImage_.getHitDetectionImage(e)},t$4.style.Icon.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var e=this.offset_;if(this.offsetOrigin_!=t$4.style.IconOrigin.TOP_LEFT){var t=this.getSize(),i=this.iconImage_.getSize();if(!t||!i)return null;e=e.slice(),(this.offsetOrigin_==t$4.style.IconOrigin.TOP_RIGHT||this.offsetOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[0]=i[0]-t[0]-e[0]),(this.offsetOrigin_==t$4.style.IconOrigin.BOTTOM_LEFT||this.offsetOrigin_==t$4.style.IconOrigin.BOTTOM_RIGHT)&&(e[1]=i[1]-t[1]-e[1])}return this.origin_=e,this.origin_},t$4.style.Icon.prototype.getSrc=function(){return this.iconImage_.getSrc()},t$4.style.Icon.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},t$4.style.Icon.prototype.listenImageChange=function(e,t){return t$4.events.listen(this.iconImage_,t$4.events.EventType.CHANGE,e,t)},t$4.style.Icon.prototype.load=function(){this.iconImage_.load()},t$4.style.Icon.prototype.unlistenImageChange=function(e,t){t$4.events.unlisten(this.iconImage_,t$4.events.EventType.CHANGE,e,t)},t$4.style.Text=function(e){var t=e||{};this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.text_=t.text,this.textAlign_=t.textAlign,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new t$4.style.Fill({color:t$4.style.Text.DEFAULT_FILL_COLOR_}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:t$4.style.TextPlacement.POINT;var i=void 0===t.overflow?t.exceedLength:t.overflow;this.overflow_=void 0!==i&&i,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding},t$4.style.Text.DEFAULT_FILL_COLOR_="#333",t$4.style.Text.prototype.clone=function(){return new t$4.style.Text({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:this.getScale(),text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY()})},t$4.style.Text.prototype.getOverflow=function(){return this.overflow_},t$4.style.Text.prototype.getFont=function(){return this.font_},t$4.style.Text.prototype.getMaxAngle=function(){return this.maxAngle_},t$4.style.Text.prototype.getPlacement=function(){return this.placement_},t$4.style.Text.prototype.getOffsetX=function(){return this.offsetX_},t$4.style.Text.prototype.getOffsetY=function(){return this.offsetY_},t$4.style.Text.prototype.getFill=function(){return this.fill_},t$4.style.Text.prototype.getRotateWithView=function(){return this.rotateWithView_},t$4.style.Text.prototype.getRotation=function(){return this.rotation_},t$4.style.Text.prototype.getScale=function(){return this.scale_},t$4.style.Text.prototype.getStroke=function(){return this.stroke_},t$4.style.Text.prototype.getText=function(){return this.text_},t$4.style.Text.prototype.getTextAlign=function(){return this.textAlign_},t$4.style.Text.prototype.getTextBaseline=function(){return this.textBaseline_},t$4.style.Text.prototype.getBackgroundFill=function(){return this.backgroundFill_},t$4.style.Text.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t$4.style.Text.prototype.getPadding=function(){return this.padding_},t$4.style.Text.prototype.setOverflow=function(e){this.overflow_=e},t$4.style.Text.prototype.setFont=function(e){this.font_=e},t$4.style.Text.prototype.setMaxAngle=function(e){this.maxAngle_=e},t$4.style.Text.prototype.setOffsetX=function(e){this.offsetX_=e},t$4.style.Text.prototype.setOffsetY=function(e){this.offsetY_=e},t$4.style.Text.prototype.setPlacement=function(e){this.placement_=e},t$4.style.Text.prototype.setFill=function(e){this.fill_=e},t$4.style.Text.prototype.setRotation=function(e){this.rotation_=e},t$4.style.Text.prototype.setScale=function(e){this.scale_=e},t$4.style.Text.prototype.setStroke=function(e){this.stroke_=e},t$4.style.Text.prototype.setText=function(e){this.text_=e},t$4.style.Text.prototype.setTextAlign=function(e){this.textAlign_=e},t$4.style.Text.prototype.setTextBaseline=function(e){this.textBaseline_=e},t$4.style.Text.prototype.setBackgroundFill=function(e){this.backgroundFill_=e},t$4.style.Text.prototype.setBackgroundStroke=function(e){this.backgroundStroke_=e},t$4.style.Text.prototype.setPadding=function(e){this.padding_=e},t$4.style.Style=function(e){var t=e||{};this.geometry_=null,this.geometryFunction_=t$4.style.Style.defaultGeometryFunction,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex},t$4.style.Style.prototype.clone=function(){var e=this.getGeometry();return e&&e.clone&&(e=e.clone()),new t$4.style.Style({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t$4.style.Style.prototype.getRenderer=function(){return this.renderer_},t$4.style.Style.prototype.setRenderer=function(e){this.renderer_=e},t$4.style.Style.prototype.getGeometry=function(){return this.geometry_},t$4.style.Style.prototype.getGeometryFunction=function(){return this.geometryFunction_},t$4.style.Style.prototype.getFill=function(){return this.fill_},t$4.style.Style.prototype.setFill=function(e){this.fill_=e},t$4.style.Style.prototype.getImage=function(){return this.image_},t$4.style.Style.prototype.setImage=function(e){this.image_=e},t$4.style.Style.prototype.getStroke=function(){return this.stroke_},t$4.style.Style.prototype.setStroke=function(e){this.stroke_=e},t$4.style.Style.prototype.getText=function(){return this.text_},t$4.style.Style.prototype.setText=function(e){this.text_=e},t$4.style.Style.prototype.getZIndex=function(){return this.zIndex_},t$4.style.Style.prototype.setGeometry=function(e){"function"==typeof e?this.geometryFunction_=e:"string"==typeof e?this.geometryFunction_=function(t){return t.get(e)}:e?void 0!==e&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=t$4.style.Style.defaultGeometryFunction,this.geometry_=e},t$4.style.Style.prototype.setZIndex=function(e){this.zIndex_=e},t$4.style.Style.createFunction=function(e){var t,i;"function"==typeof e?t=e:(Array.isArray(e)?i=e:(t$4.asserts.assert(e instanceof t$4.style.Style,41),i=[e]),t=function(){return i});return t},t$4.style.Style.default_=null,t$4.style.Style.defaultFunction=function(e,t){if(!t$4.style.Style.default_){var i=new t$4.style.Fill({color:"rgba(255,255,255,0.4)"}),n=new t$4.style.Stroke({color:"#3399CC",width:1.25});t$4.style.Style.default_=[new t$4.style.Style({image:new t$4.style.Circle({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return t$4.style.Style.default_},t$4.style.Style.createDefaultEditing=function(){var e={},t=[255,255,255,1],i=[0,153,255,1];return e[t$4.geom.GeometryType.POLYGON]=[new t$4.style.Style({fill:new t$4.style.Fill({color:[255,255,255,.5]})})],e[t$4.geom.GeometryType.MULTI_POLYGON]=e[t$4.geom.GeometryType.POLYGON],e[t$4.geom.GeometryType.LINE_STRING]=[new t$4.style.Style({stroke:new t$4.style.Stroke({color:t,width:5})}),new t$4.style.Style({stroke:new t$4.style.Stroke({color:i,width:3})})],e[t$4.geom.GeometryType.MULTI_LINE_STRING]=e[t$4.geom.GeometryType.LINE_STRING],e[t$4.geom.GeometryType.CIRCLE]=e[t$4.geom.GeometryType.POLYGON].concat(e[t$4.geom.GeometryType.LINE_STRING]),e[t$4.geom.GeometryType.POINT]=[new t$4.style.Style({image:new t$4.style.Circle({radius:6,fill:new t$4.style.Fill({color:i}),stroke:new t$4.style.Stroke({color:t,width:1.5})}),zIndex:1/0})],e[t$4.geom.GeometryType.MULTI_POINT]=e[t$4.geom.GeometryType.POINT],e[t$4.geom.GeometryType.GEOMETRY_COLLECTION]=e[t$4.geom.GeometryType.POLYGON].concat(e[t$4.geom.GeometryType.LINE_STRING],e[t$4.geom.GeometryType.POINT]),e},t$4.style.Style.defaultGeometryFunction=function(e){return e.getGeometry()},t$4.ext={},t$4.ext.rbush=function(){},function(){!function(e){var t=n,i=n;function n(e,t,i,n,o){r(e,t,i||0,n||e.length-1,o||a)}function r(e,t,i,n,a){for(;n>i;){if(n-i>600){var s=n-i+1,l=t-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);r(e,t,Math.max(i,Math.floor(t-l*c/s+h)),Math.min(n,Math.floor(t+(s-l)*c/s+h)),a)}var d=e[t],f=i,p=n;for(o(e,i,t),a(e[n],d)>0&&o(e,i,n);f<p;){for(o(e,f,p),f++,p--;a(e[f],d)<0;)f++;for(;a(e[p],d)>0;)p--}0===a(e[i],d)?o(e,i,p):o(e,++p,n),p<=t&&(i=p+1),t<=p&&(n=p-1)}}function o(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function a(e,t){return e<t?-1:e>t?1:0}t.default=i;var s=l;function l(e,t){if(!(this instanceof l))return new l(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function u(e,t,i){if(!i)return t.indexOf(e);for(var n=0;n<t.length;n++)if(i(e,t[n]))return n;return-1}function c(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,n,r){r||(r=$(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=t;a<i;a++)o=e.children[a],d(r,e.leaf?n(o):o);return r}function d(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function f(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function _(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function x(e,t){var i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function $(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(e,i,n,r,o){for(var a,s=[i,n];s.length;)!((n=s.pop())-(i=s.pop())<=r)&&(a=i+Math.ceil((n-i)/r/2)*r,t(e,a,i,n,o),s.push(i,a,a,n))}l.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,i=[],n=this.toBBox;if(!v(e,t))return i;for(var r,o,a,s,l=[];t;){for(r=0,o=t.children.length;r<o;r++)a=t.children[r],v(e,s=t.leaf?n(a):a)&&(t.leaf?i.push(a):y(e,s)?this._all(a,i):l.push(a));t=l.pop()}return i},collides:function(e){var t=this.data,i=this.toBBox;if(!v(e,t))return!1;for(var n,r,o,a,s=[];t;){for(n=0,r=t.children.length;n<r;n++)if(o=t.children[n],v(e,a=t.leaf?i(o):o)){if(t.leaf||y(e,a))return!0;s.push(o)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=$([]),this},remove:function(e,t){if(!e)return this;for(var i,n,r,o,a=this.data,s=this.toBBox(e),l=[],c=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=c.pop(),o=!0),a.leaf&&-1!==(r=u(e,a.children,t)))return a.children.splice(r,1),l.push(a),this._condense(l),this;o||a.leaf||!y(a,s)?n?(i++,a=n.children[i],o=!1):a=null:(l.push(a),c.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:f,compareMinY:p,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},_build:function(e,t,i,n){var r,o=i-t+1,a=this._maxEntries;if(o<=a)return c(r=$(e.slice(t,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=$([])).leaf=!1,r.height=n;var s,l,u,h,d=Math.ceil(o/a),f=d*Math.ceil(Math.sqrt(a));for(b(e,t,i,f,this.compareMinX),s=t;s<=i;s+=f)for(b(e,s,u=Math.min(s+f-1,i),d,this.compareMinY),l=s;l<=u;l+=d)h=Math.min(l+d-1,u),r.children.push(this._build(e,l,h,n-1));return c(r,this.toBBox),r},_chooseSubtree:function(e,t,i,n){for(var r,o,a,s,l,u,c,h;n.push(t),!t.leaf&&n.length-1!==i;){for(c=h=1/0,r=0,o=t.children.length;r<o;r++)l=_(a=t.children[r]),(u=g(e,a)-l)<h?(h=u,c=l<c?l:c,s=a):u===h&&l<c&&(c=l,s=a);t=s||t.children[0]}return t},_insert:function(e,t,i){var n=this.toBBox,r=i?e:n(e),o=[],a=this._chooseSubtree(r,this.data,t,o);for(a.children.push(e),d(a,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},_split:function(e,t){var i=e[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=$(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,c(i,this.toBBox),c(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(e,t){this.data=$([e,t]),this.data.height=e.height+1,this.data.leaf=!1,c(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,i){var n,r,o,a,s,l,u,c;for(l=u=1/0,n=t;n<=i-t;n++)a=x(r=h(e,0,n,this.toBBox),o=h(e,n,i,this.toBBox)),s=_(r)+_(o),a<l?(l=a,c=n,u=s<u?s:u):a===l&&s<u&&(u=s,c=n);return c},_chooseSplitAxis:function(e,t,i){var n=e.leaf?this.compareMinX:f,r=e.leaf?this.compareMinY:p;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)},_allDistMargin:function(e,t,i,n){e.children.sort(n);var r,o,a=this.toBBox,s=h(e,0,t,a),l=h(e,i-t,i,a),u=m(s)+m(l);for(r=t;r<i-t;r++)o=e.children[r],d(s,e.leaf?a(o):o),u+=m(s);for(r=i-t-1;r>=t;r--)o=e.children[r],d(l,e.leaf?a(o):o),u+=m(l);return u},_adjustParentBBoxes:function(e,t,i){for(var n=i;n>=0;n--)d(t[n],e)},_condense:function(e){for(var t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children).splice(t.indexOf(e[i]),1):this.clear():c(e[i],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}},e.default=s}(this.rbush=this.rbush||{})}.call(t$4.ext),t$4.ext.rbush=t$4.ext.rbush.default,t$4.render={},t$4.render.VectorContext=function(){},t$4.render.VectorContext.prototype.drawCustom=function(e,t,i){},t$4.render.VectorContext.prototype.drawGeometry=function(e){},t$4.render.VectorContext.prototype.setStyle=function(e){},t$4.render.VectorContext.prototype.drawCircle=function(e,t){},t$4.render.VectorContext.prototype.drawFeature=function(e,t){},t$4.render.VectorContext.prototype.drawGeometryCollection=function(e,t){},t$4.render.VectorContext.prototype.drawLineString=function(e,t){},t$4.render.VectorContext.prototype.drawMultiLineString=function(e,t){},t$4.render.VectorContext.prototype.drawMultiPoint=function(e,t){},t$4.render.VectorContext.prototype.drawMultiPolygon=function(e,t){},t$4.render.VectorContext.prototype.drawPoint=function(e,t){},t$4.render.VectorContext.prototype.drawPolygon=function(e,t){},t$4.render.VectorContext.prototype.drawText=function(e,t){},t$4.render.VectorContext.prototype.setFillStrokeStyle=function(e,t){},t$4.render.VectorContext.prototype.setImageStyle=function(e,t){},t$4.render.VectorContext.prototype.setTextStyle=function(e,t){},t$4.render.ReplayGroup={},t$4.render.ReplayGroup=function(){},t$4.render.ReplayGroup.prototype.getReplay=function(e,t){},t$4.render.ReplayGroup.prototype.isEmpty=function(){},t$4.render.ReplayType={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"},t$4.geom.flat.length={},t$4.geom.flat.length.lineString=function(e,t,i,n){var r,o=e[t],a=e[t+1],s=0;for(r=t+n;r<i;r+=n){var l=e[r],u=e[r+1];s+=Math.sqrt((l-o)*(l-o)+(u-a)*(u-a)),o=l,a=u}return s},t$4.geom.flat.length.linearRing=function(e,t,i,n){var r=t$4.geom.flat.length.lineString(e,t,i,n),o=e[i-n]-e[t],a=e[i-n+1]-e[t+1];return r+=Math.sqrt(o*o+a*a)},t$4.geom.flat.textpath={},t$4.geom.flat.textpath.lineString=function(e,t,i,n,r,o,a,s){for(var l,u,c,h=[],d=e[t]>e[i-n],f=r.length,p=e[t],_=e[t+1],m=e[t+=n],g=e[t+1],x=0,y=Math.sqrt(Math.pow(m-p,2)+Math.pow(g-_,2)),v="",$=0,b=0;b<f;++b){u=d?f-b-1:b;var T=r.charAt(u),C=o(v=d?T+v:v+T)-$;$+=C;for(var S=a+C/2;t<i-n&&x+y<S;)p=m,_=g,m=e[t+=n],g=e[t+1],x+=y,y=Math.sqrt(Math.pow(m-p,2)+Math.pow(g-_,2));var w=S-x,E=Math.atan2(g-_,m-p);if(d&&(E+=E>0?-Math.PI:Math.PI),void 0!==c){var P=E-c;if(P+=P>Math.PI?-2*Math.PI:P<-Math.PI?2*Math.PI:0,Math.abs(P)>s)return null}var A=w/y,L=t$4.math.lerp(p,m,A),M=t$4.math.lerp(_,g,A);c==E?(d&&(l[0]=L,l[1]=M,l[2]=C/2),l[4]=v):($=C,l=[L,M,C/2,E,v=T],d?h.unshift(l):h.push(l),c=E),a+=C}return h},t$4.structs.LRUCache=function(e){t$4.events.EventTarget.call(this),this.highWaterMark=void 0!==e?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t$4.inherits(t$4.structs.LRUCache,t$4.events.EventTarget),t$4.structs.LRUCache.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark},t$4.structs.LRUCache.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null,this.dispatchEvent(t$4.events.EventType.CLEAR)},t$4.structs.LRUCache.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},t$4.structs.LRUCache.prototype.forEach=function(e,t){for(var i=this.oldest_;i;)e.call(t,i.value_,i.key_,this),i=i.newer},t$4.structs.LRUCache.prototype.get=function(e){var t=this.entries_[e];return t$4.asserts.assert(void 0!==t,15),t===this.newest_||(t===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(t.newer.older=t.older,t.older.newer=t.newer),t.newer=null,t.older=this.newest_,this.newest_.newer=t,this.newest_=t),t.value_},t$4.structs.LRUCache.prototype.remove=function(e){var t=this.entries_[e];return t$4.asserts.assert(void 0!==t,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_},t$4.structs.LRUCache.prototype.getCount=function(){return this.count_},t$4.structs.LRUCache.prototype.getKeys=function(){var e,t=new Array(this.count_),i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t},t$4.structs.LRUCache.prototype.getValues=function(){var e,t=new Array(this.count_),i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t},t$4.structs.LRUCache.prototype.peekLast=function(){return this.oldest_.value_},t$4.structs.LRUCache.prototype.peekLastKey=function(){return this.oldest_.key_},t$4.structs.LRUCache.prototype.peekFirstKey=function(){return this.newest_.key_},t$4.structs.LRUCache.prototype.pop=function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_},t$4.structs.LRUCache.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},t$4.structs.LRUCache.prototype.set=function(e,t){t$4.asserts.assert(!(e in this.entries_),16);var i={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_},t$4.structs.LRUCache.prototype.prune=function(){for(;this.canExpireCache();)this.pop()},t$4.render.canvas={},t$4.render.canvas.defaultFont="10px sans-serif",t$4.render.canvas.defaultFillStyle=[0,0,0,1],t$4.render.canvas.defaultLineCap="round",t$4.render.canvas.defaultLineDash=[],t$4.render.canvas.defaultLineDashOffset=0,t$4.render.canvas.defaultLineJoin="round",t$4.render.canvas.defaultMiterLimit=10,t$4.render.canvas.defaultStrokeStyle=[0,0,0,1],t$4.render.canvas.defaultTextAlign="center",t$4.render.canvas.defaultTextBaseline="middle",t$4.render.canvas.defaultPadding=[0,0,0,0],t$4.render.canvas.defaultLineWidth=1,t$4.render.canvas.labelCache=new t$4.structs.LRUCache,t$4.render.canvas.checkedFonts_={},t$4.render.canvas.measureContext_=null,t$4.render.canvas.textHeights_={},t$4.render.canvas.checkFont=function(){var e,t,i=t$4.render.canvas.checkedFonts_,n=t$4.render.canvas.labelCache,r="wmytzilWMYTZIL@#/&?$%10";function o(e){var i=t$4.render.canvas.getMeasureContext();i.font="32px monospace",t=i.measureText(r).width;var n=!0;"monospace"!=e&&(i.font="32px "+e+",monospace",n=i.measureText(r).width!=t);return n}function a(){var t=!0;for(var r in i)i[r]<60&&(o(r)?(i[r]=60,t$4.obj.clear(t$4.render.canvas.textHeights_),t$4.render.canvas.measureContext_=null,n.clear()):(++i[r],t=!1));t&&(window.clearInterval(e),e=void 0)}return function(t){var n=t$4.css.getFontFamilies(t);if(n)for(var r=0,s=n.length;r<s;++r){var l=n[r];l in i||(i[l]=60,o(l)||(i[l]=0,void 0===e&&(e=window.setInterval(a,32))))}}}(),t$4.render.canvas.getMeasureContext=function(){var e=t$4.render.canvas.measureContext_;return e||(e=t$4.render.canvas.measureContext_=t$4.dom.createCanvasContext2D(1,1)),e},t$4.render.canvas.measureTextHeight=function(){var e=t$4.render.canvas.textHeights_;return function(t){var i=e[t];return null==i&&(i=e[t]=19),i}}(),t$4.render.canvas.measureTextWidth=function(e,t){var i=t$4.render.canvas.getMeasureContext();return e!=i.font&&(i.font=e),i.measureText(t).width},t$4.render.canvas.rotateAtOffset=function(e,t,i,n){0!==t&&(e.translate(i,n),e.rotate(t),e.translate(-i,-n))},t$4.render.canvas.resetTransform_=t$4.transform.create(),t$4.render.canvas.drawImage=function(e,t,i,n,r,o,a,s,l,u,c){var h;1!=i&&(h=e.globalAlpha,e.globalAlpha=h*i),t&&e.setTransform.apply(e,t),e.drawImage(n,r,o,a,s,l,u,a*c,s*c),h&&(e.globalAlpha=h),t&&e.setTransform.apply(e,t$4.render.canvas.resetTransform_)},t$4.render.canvas.Instruction={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},t$4.render.replay={},t$4.render.replay.ORDER=[t$4.render.ReplayType.POLYGON,t$4.render.ReplayType.CIRCLE,t$4.render.ReplayType.LINE_STRING,t$4.render.ReplayType.IMAGE,t$4.render.ReplayType.TEXT,t$4.render.ReplayType.DEFAULT],t$4.render.replay.TEXT_ALIGN={},t$4.render.replay.TEXT_ALIGN.left=0,t$4.render.replay.TEXT_ALIGN.end=0,t$4.render.replay.TEXT_ALIGN.center=.5,t$4.render.replay.TEXT_ALIGN.right=1,t$4.render.replay.TEXT_ALIGN.start=1,t$4.render.replay.TEXT_ALIGN.top=0,t$4.render.replay.TEXT_ALIGN.middle=.5,t$4.render.replay.TEXT_ALIGN.hanging=.2,t$4.render.replay.TEXT_ALIGN.alphabetic=.8,t$4.render.replay.TEXT_ALIGN.ideographic=.8,t$4.render.replay.TEXT_ALIGN.bottom=1,t$4.render.canvas.Replay=function(e,t,i,n,r,o){t$4.render.VectorContext.call(this),this.declutterTree=o,this.tmpExtent_=t$4.extent.createEmpty(),this.tolerance=e,this.maxExtent=t,this.overlaps=r,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.fillOrigin_,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.coordinateCache_={},this.renderedTransform_=t$4.transform.create(),this.hitDetectionInstructions=[],this.pixelCoordinates_=null,this.state={},this.viewRotation_=0,this.tmpLocalTransform_=t$4.transform.create(),this.resetTransform_=t$4.transform.create()},t$4.inherits(t$4.render.canvas.Replay,t$4.render.VectorContext),t$4.render.canvas.Replay.prototype.replayTextBackground_=function(e,t,i,n,r,o,a){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,i),e.lineTo.apply(e,n),e.lineTo.apply(e,r),e.lineTo.apply(e,t),o&&(this.fillOrigin_=o[2],this.fill_(e)),a&&(this.setStrokeStyle_(e,a),e.stroke())},t$4.render.canvas.Replay.prototype.replayImage_=function(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g){var x=m||g,y=this.tmpLocalTransform_;t-=r*=d,i-=o*=d,f&&(t=Math.round(t),i=Math.round(i));var v,$,b,T,C=p+u>n.width?n.width-u:p,S=s+c>n.height?n.height-c:s,w=this.tmpExtent_,E=_[3]+C*d+_[1],P=_[0]+S*d+_[2],A=t-_[3],L=i-_[0];(x||0!==h)&&(v=[A,L],$=[A+E,L],b=[A+E,L+P],T=[A,L+P]);var M=null;if(0!==h){var R=t+r,O=i+o;M=t$4.transform.compose(y,R,O,1,1,h,-R,-O),t$4.extent.createOrUpdateEmpty(w),t$4.extent.extendCoordinate(w,t$4.transform.apply(y,v)),t$4.extent.extendCoordinate(w,t$4.transform.apply(y,$)),t$4.extent.extendCoordinate(w,t$4.transform.apply(y,b)),t$4.extent.extendCoordinate(w,t$4.transform.apply(y,T))}else t$4.extent.createOrUpdate(A,L,A+E,L+P,w);var D=e.canvas,I=w[0]<=D.width&&w[2]>=0&&w[1]<=D.height&&w[3]>=0;if(a){if(!I&&1==a[4])return;t$4.extent.extend(a,w);var B=I?[e,M?M.slice(0):null,l,n,u,c,C,S,t,i,d]:null;B&&x&&B.push(m,g,v,$,b,T),a.push(B)}else I&&(x&&this.replayTextBackground_(e,v,$,b,T,m,g),t$4.render.canvas.drawImage(e,M,l,n,u,c,C,S,t,i,d))},t$4.render.canvas.Replay.prototype.applyPixelRatio=function(e){var t=this.pixelRatio;return 1==t?e:e.map((function(e){return e*t}))},t$4.render.canvas.Replay.prototype.appendFlatCoordinates=function(e,t,i,n,r,o){var a=this.coordinates.length,s=this.getBufferedMaxExtent();o&&(t+=n);var l,u,c,h=[e[t],e[t+1]],d=[NaN,NaN],f=!0;for(l=t+n;l<i;l+=n)d[0]=e[l],d[1]=e[l+1],(c=t$4.extent.coordinateRelationship(s,d))!==u?(f&&(this.coordinates[a++]=h[0],this.coordinates[a++]=h[1]),this.coordinates[a++]=d[0],this.coordinates[a++]=d[1],f=!1):c===t$4.extent.Relationship.INTERSECTING?(this.coordinates[a++]=d[0],this.coordinates[a++]=d[1],f=!1):f=!0,h[0]=d[0],h[1]=d[1],u=c;return(r&&f||l===t+n)&&(this.coordinates[a++]=h[0],this.coordinates[a++]=h[1]),a},t$4.render.canvas.Replay.prototype.drawCustomCoordinates_=function(e,t,i,n,r){for(var o=0,a=i.length;o<a;++o){var s=i[o],l=this.appendFlatCoordinates(e,t,s,n,!1,!1);r.push(l),t=s}return t},t$4.render.canvas.Replay.prototype.drawCustom=function(e,t,i){this.beginGeometry(e,t);var n,r,o,a,s,l=e.getType(),u=e.getStride(),c=this.coordinates.length;if(l==t$4.geom.GeometryType.MULTI_POLYGON){n=(e=e).getOrientedFlatCoordinates(),a=[];var h=e.getEndss();s=0;for(var d=0,f=h.length;d<f;++d){var p=[];s=this.drawCustomCoordinates_(n,s,h[d],u,p),a.push(p)}this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,a,e,i,t$4.geom.flat.inflate.coordinatesss])}else l==t$4.geom.GeometryType.POLYGON||l==t$4.geom.GeometryType.MULTI_LINE_STRING?(o=[],n=l==t$4.geom.GeometryType.POLYGON?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),s=this.drawCustomCoordinates_(n,0,e.getEnds(),u,o),this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,o,e,i,t$4.geom.flat.inflate.coordinatess])):l==t$4.geom.GeometryType.LINE_STRING||l==t$4.geom.GeometryType.MULTI_POINT?(n=e.getFlatCoordinates(),r=this.appendFlatCoordinates(n,0,n.length,u,!1,!1),this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,r,e,i,t$4.geom.flat.inflate.coordinates])):l==t$4.geom.GeometryType.POINT&&(n=e.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),r=this.coordinates.length,this.instructions.push([t$4.render.canvas.Instruction.CUSTOM,c,r,e,i]));this.endGeometry(e,t)},t$4.render.canvas.Replay.prototype.beginGeometry=function(e,t){this.beginGeometryInstruction1_=[t$4.render.canvas.Instruction.BEGIN_GEOMETRY,t,0],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[t$4.render.canvas.Instruction.BEGIN_GEOMETRY,t,0],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},t$4.render.canvas.Replay.prototype.fill_=function(e){if(this.fillOrigin_){var t=t$4.transform.apply(this.renderedTransform_,this.fillOrigin_.slice());e.translate(t[0],t[1]),e.rotate(this.viewRotation_)}e.fill(),this.fillOrigin_&&e.setTransform.apply(e,t$4.render.canvas.resetTransform_)},t$4.render.canvas.Replay.prototype.setStrokeStyle_=function(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],t$4.has.CANVAS_LINE_DASH&&(e.lineDashOffset=t[7],e.setLineDash(t[6]))},t$4.render.canvas.Replay.prototype.renderDeclutter_=function(e,t){if(e&&e.length>5){var i=e[4];if(1==i||i==e.length-5){var n={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};if(!this.declutterTree.collides(n)){this.declutterTree.insert(n);for(var r=t$4.render.canvas.drawImage,o=5,a=e.length;o<a;++o){var s=e[o];s&&(s.length>11&&this.replayTextBackground_(s[0],s[13],s[14],s[15],s[16],s[11],s[12]),r.apply(void 0,s))}}e.length=5,t$4.extent.createOrUpdateEmpty(e)}}},t$4.render.canvas.Replay.prototype.replay_=function(e,t,i,n,r,o){var a;this.pixelCoordinates_&&t$4.array.equals(t,this.renderedTransform_)?a=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),a=t$4.geom.flat.transform.transform2D(this.coordinates,0,this.coordinates.length,2,t,this.pixelCoordinates_),t$4.transform.setFromArray(this.renderedTransform_,t));for(var s,l,u,c,h,d,f,p,_,m=!t$4.obj.isEmpty(i),g=0,x=n.length,y=0,v=0,$=0,b=null,T=null,C=this.coordinateCache_,S=this.viewRotation_,w={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:S},E=this.instructions!=n||this.overlaps?0:200;g<x;){var P,A,L,M=n[g];switch(M[0]){case t$4.render.canvas.Instruction.BEGIN_GEOMETRY:P=M[1],m&&i[t$4.getUid(P).toString()]||!P.getGeometry()?g=M[2]:void 0===o||t$4.extent.intersects(o,P.getGeometry().getExtent())?++g:g=M[2]+1;break;case t$4.render.canvas.Instruction.BEGIN_PATH:v>E&&(this.fill_(e),v=0),$>E&&(e.stroke(),$=0),!v&&!$&&(e.beginPath(),c=h=NaN),++g;break;case t$4.render.canvas.Instruction.CIRCLE:var R=a[y=M[1]],O=a[y+1],D=a[y+2]-R,I=a[y+3]-O,B=Math.sqrt(D*D+I*I);e.moveTo(R+B,O),e.arc(R,O,B,0,2*Math.PI,!0),++g;break;case t$4.render.canvas.Instruction.CLOSE_PATH:e.closePath(),++g;break;case t$4.render.canvas.Instruction.CUSTOM:y=M[1],s=M[2];var F=M[3],N=M[4],G=6==M.length?M[5]:void 0;w.geometry=F,w.feature=P,g in C||(C[g]=[]);var z=C[g];G?G(a,y,s,2,z):(z[0]=a[y],z[1]=a[y+1],z.length=2),N(z,w),++g;break;case t$4.render.canvas.Instruction.DRAW_IMAGE:y=M[1],s=M[2],_=M[3],l=M[4],u=M[5],p=r?null:M[6];var U,V,k,W=M[7],H=M[8],q=M[9],j=M[10],X=M[11],Y=M[12],Z=M[13],K=M[14],Q=M[15];for(M.length>16?(U=M[16],V=M[17],k=M[18]):(U=t$4.render.canvas.defaultPadding,V=k=!1),X&&(Y+=S);y<s;y+=2)this.replayImage_(e,a[y],a[y+1],_,l,u,p,W,H,q,j,Y,Z,K,Q,U,V?b:null,k?T:null);this.renderDeclutter_(p,P),++g;break;case t$4.render.canvas.Instruction.DRAW_CHARS:var J=M[1],ee=M[2],te=M[3];p=r?null:M[4];var ie=M[5],ne=M[6],re=M[7],oe=M[8],ae=M[9],se=M[10],le=M[11],ue=M[12],ce=M[13],he=M[14],de=t$4.geom.flat.length.lineString(a,J,ee,2),fe=oe(ue);if(ie||fe<=de){var pe=this.textStates[ce].textAlign,_e=(de-fe)*t$4.render.replay.TEXT_ALIGN[pe],me=t$4.geom.flat.textpath.lineString(a,J,ee,2,ue,oe,_e,re);if(me){var ge,xe,ye,ve,$e;if(se)for(ge=0,xe=me.length;ge<xe;++ge)ye=($e=me[ge])[4],ve=this.getImage(ye,ce,"",se),l=$e[2]+le,u=te*ve.height+2*(.5-te)*le-ae,this.replayImage_(e,$e[0],$e[1],ve,l,u,p,ve.height,1,0,0,$e[3],he,!1,ve.width,t$4.render.canvas.defaultPadding,null,null);if(ne)for(ge=0,xe=me.length;ge<xe;++ge)ye=($e=me[ge])[4],ve=this.getImage(ye,ce,ne,""),l=$e[2],u=te*ve.height-ae,this.replayImage_(e,$e[0],$e[1],ve,l,u,p,ve.height,1,0,0,$e[3],he,!1,ve.width,t$4.render.canvas.defaultPadding,null,null)}}this.renderDeclutter_(p,P),++g;break;case t$4.render.canvas.Instruction.END_GEOMETRY:if(void 0!==r){var be=r(P=M[1]);if(be)return be}++g;break;case t$4.render.canvas.Instruction.FILL:E?v++:this.fill_(e),++g;break;case t$4.render.canvas.Instruction.MOVE_TO_LINE_TO:for(y=M[1],s=M[2],A=a[y],f=(L=a[y+1])+.5|0,((d=A+.5|0)!==c||f!==h)&&(e.moveTo(A,L),c=d,h=f),y+=2;y<s;y+=2)d=(A=a[y])+.5|0,f=(L=a[y+1])+.5|0,(y==s-2||d!==c||f!==h)&&(e.lineTo(A,L),c=d,h=f);++g;break;case t$4.render.canvas.Instruction.SET_FILL_STYLE:b=M,this.fillOrigin_=M[2],v&&(this.fill_(e),v=0,$&&(e.stroke(),$=0)),e.fillStyle=M[1],++g;break;case t$4.render.canvas.Instruction.SET_STROKE_STYLE:T=M,$&&(e.stroke(),$=0),this.setStrokeStyle_(e,M),++g;break;case t$4.render.canvas.Instruction.STROKE:E?$++:e.stroke(),++g;break;default:++g}}v&&this.fill_(e),$&&e.stroke()},t$4.render.canvas.Replay.prototype.replay=function(e,t,i,n){this.viewRotation_=i,this.replay_(e,t,n,this.instructions,void 0,void 0)},t$4.render.canvas.Replay.prototype.replayHitDetection=function(e,t,i,n,r,o){return this.viewRotation_=i,this.replay_(e,t,n,this.hitDetectionInstructions,r,o)},t$4.render.canvas.Replay.prototype.reverseHitDetectionInstructions=function(){var e=this.hitDetectionInstructions;e.reverse();var t,i,n,r=e.length,o=-1;for(t=0;t<r;++t)(n=(i=e[t])[0])==t$4.render.canvas.Instruction.END_GEOMETRY?o=t:n==t$4.render.canvas.Instruction.BEGIN_GEOMETRY&&(i[2]=t,t$4.array.reverseSubArray(this.hitDetectionInstructions,o,t),o=-1)},t$4.render.canvas.Replay.prototype.setFillStrokeStyle=function(e,t){var i=this.state;if(e){var n=e.getColor();i.fillStyle=t$4.colorlike.asColorLike(n||t$4.render.canvas.defaultFillStyle)}else i.fillStyle=void 0;if(t){var r=t.getColor();i.strokeStyle=t$4.colorlike.asColorLike(r||t$4.render.canvas.defaultStrokeStyle);var o=t.getLineCap();i.lineCap=void 0!==o?o:t$4.render.canvas.defaultLineCap;var a=t.getLineDash();i.lineDash=a?a.slice():t$4.render.canvas.defaultLineDash;var s=t.getLineDashOffset();i.lineDashOffset=s||t$4.render.canvas.defaultLineDashOffset;var l=t.getLineJoin();i.lineJoin=void 0!==l?l:t$4.render.canvas.defaultLineJoin;var u=t.getWidth();i.lineWidth=void 0!==u?u:t$4.render.canvas.defaultLineWidth;var c=t.getMiterLimit();i.miterLimit=void 0!==c?c:t$4.render.canvas.defaultMiterLimit,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},t$4.render.canvas.Replay.prototype.applyFill=function(e,t){var i=e.fillStyle,n=[t$4.render.canvas.Instruction.SET_FILL_STYLE,i];if("string"!=typeof i){var r=t.getExtent();n.push([r[0],r[3]])}this.instructions.push(n)},t$4.render.canvas.Replay.prototype.applyStroke=function(e){this.instructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio])},t$4.render.canvas.Replay.prototype.updateFillStyle=function(e,t,i){var n=e.fillStyle;("string"!=typeof n||e.currentFillStyle!=n)&&(t.call(this,e,i),e.currentFillStyle=n)},t$4.render.canvas.Replay.prototype.updateStrokeStyle=function(e,t){var i=e.strokeStyle,n=e.lineCap,r=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,s=e.lineWidth,l=e.miterLimit;(e.currentStrokeStyle!=i||e.currentLineCap!=n||r!=e.currentLineDash&&!t$4.array.equals(e.currentLineDash,r)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=s||e.currentMiterLimit!=l)&&(t.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=n,e.currentLineDash=r,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=s,e.currentMiterLimit=l)},t$4.render.canvas.Replay.prototype.endGeometry=function(e,t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var i=[t$4.render.canvas.Instruction.END_GEOMETRY,t];this.instructions.push(i),this.hitDetectionInstructions.push(i)},t$4.render.canvas.Replay.prototype.finish=t$4.nullFunction,t$4.render.canvas.Replay.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=t$4.extent.clone(this.maxExtent),this.maxLineWidth>0)){var e=this.resolution*(this.maxLineWidth+1)/2;t$4.extent.buffer(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},t$4.render.canvas.ImageReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o),this.declutterGroup_=null,this.hitDetectionImage_=null,this.image_=null,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.snapToPixel_=void 0,this.width_=void 0},t$4.inherits(t$4.render.canvas.ImageReplay,t$4.render.canvas.Replay),t$4.render.canvas.ImageReplay.prototype.drawCoordinates_=function(e,t,i,n){return this.appendFlatCoordinates(e,t,i,n,!1,!1)},t$4.render.canvas.ImageReplay.prototype.drawPoint=function(e,t){if(this.image_){this.beginGeometry(e,t);var i=e.getFlatCoordinates(),n=e.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]),this.endGeometry(e,t)}},t$4.render.canvas.ImageReplay.prototype.drawMultiPoint=function(e,t){if(this.image_){this.beginGeometry(e,t);var i=e.getFlatCoordinates(),n=e.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]),this.endGeometry(e,t)}},t$4.render.canvas.ImageReplay.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.snapToPixel_=void 0,this.width_=void 0},t$4.render.canvas.ImageReplay.prototype.setImageStyle=function(e,t){var i=e.getAnchor(),n=e.getSize(),r=e.getHitDetectionImage(1),o=e.getImage(1),a=e.getOrigin();this.anchorX_=i[0],this.anchorY_=i[1],this.declutterGroup_=t,this.hitDetectionImage_=r,this.image_=o,this.height_=n[1],this.opacity_=e.getOpacity(),this.originX_=a[0],this.originY_=a[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScale(),this.snapToPixel_=e.getSnapToPixel(),this.width_=n[0]},t$4.render.canvas.LineStringReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o)},t$4.inherits(t$4.render.canvas.LineStringReplay,t$4.render.canvas.Replay),t$4.render.canvas.LineStringReplay.prototype.drawFlatCoordinates_=function(e,t,i,n){var r=this.coordinates.length,o=this.appendFlatCoordinates(e,t,i,n,!1,!1),a=[t$4.render.canvas.Instruction.MOVE_TO_LINE_TO,r,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i},t$4.render.canvas.LineStringReplay.prototype.drawLineString=function(e,t){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],[t$4.render.canvas.Instruction.BEGIN_PATH]);var o=e.getFlatCoordinates(),a=e.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.STROKE]),this.endGeometry(e,t)}},t$4.render.canvas.LineStringReplay.prototype.drawMultiLineString=function(e,t){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],[t$4.render.canvas.Instruction.BEGIN_PATH]);var o,a,s=e.getEnds(),l=e.getFlatCoordinates(),u=e.getStride(),c=0;for(o=0,a=s.length;o<a;++o)c=this.drawFlatCoordinates_(l,c,s[o],u);this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.STROKE]),this.endGeometry(e,t)}},t$4.render.canvas.LineStringReplay.prototype.finish=function(){var e=this.state;null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push([t$4.render.canvas.Instruction.STROKE]),this.reverseHitDetectionInstructions(),this.state=null},t$4.render.canvas.LineStringReplay.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push([t$4.render.canvas.Instruction.STROKE]),e.lastStroke=this.coordinates.length),e.lastStroke=0,t$4.render.canvas.Replay.prototype.applyStroke.call(this,e),this.instructions.push([t$4.render.canvas.Instruction.BEGIN_PATH])},t$4.render.canvas.PolygonReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o)},t$4.inherits(t$4.render.canvas.PolygonReplay,t$4.render.canvas.Replay),t$4.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_=function(e,t,i,n){var r=this.state,o=void 0!==r.fillStyle,a=null!=r.strokeStyle,s=i.length,l=[t$4.render.canvas.Instruction.BEGIN_PATH];this.instructions.push(l),this.hitDetectionInstructions.push(l);for(var u=0;u<s;++u){var c=i[u],h=this.coordinates.length,d=this.appendFlatCoordinates(e,t,c,n,!0,!a),f=[t$4.render.canvas.Instruction.MOVE_TO_LINE_TO,h,d];if(this.instructions.push(f),this.hitDetectionInstructions.push(f),a){var p=[t$4.render.canvas.Instruction.CLOSE_PATH];this.instructions.push(p),this.hitDetectionInstructions.push(p)}t=c}var _=[t$4.render.canvas.Instruction.FILL];if(this.hitDetectionInstructions.push(_),o&&this.instructions.push(_),a){var m=[t$4.render.canvas.Instruction.STROKE];this.instructions.push(m),this.hitDetectionInstructions.push(m)}return t},t$4.render.canvas.PolygonReplay.prototype.drawCircle=function(e,t){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_FILL_STYLE,t$4.color.asString(t$4.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=e.getFlatCoordinates(),a=e.getStride(),s=this.coordinates.length;this.appendFlatCoordinates(o,0,o.length,a,!1,!1);var l=[t$4.render.canvas.Instruction.BEGIN_PATH],u=[t$4.render.canvas.Instruction.CIRCLE,s];this.instructions.push(l,u),this.hitDetectionInstructions.push(l,u);var c=[t$4.render.canvas.Instruction.FILL];if(this.hitDetectionInstructions.push(c),void 0!==i.fillStyle&&this.instructions.push(c),void 0!==i.strokeStyle){var h=[t$4.render.canvas.Instruction.STROKE];this.instructions.push(h),this.hitDetectionInstructions.push(h)}this.endGeometry(e,t)}},t$4.render.canvas.PolygonReplay.prototype.drawPolygon=function(e,t){var i=this.state;this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_FILL_STYLE,t$4.color.asString(t$4.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var n=e.getEnds(),r=e.getOrientedFlatCoordinates(),o=e.getStride();this.drawFlatCoordinatess_(r,0,n,o),this.endGeometry(e,t)},t$4.render.canvas.PolygonReplay.prototype.drawMultiPolygon=function(e,t){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(e),this.beginGeometry(e,t),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_FILL_STYLE,t$4.color.asString(t$4.render.canvas.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o,a,s=e.getEndss(),l=e.getOrientedFlatCoordinates(),u=e.getStride(),c=0;for(o=0,a=s.length;o<a;++o)c=this.drawFlatCoordinatess_(l,c,s[o],u);this.endGeometry(e,t)}},t$4.render.canvas.PolygonReplay.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e){var t,i,n=this.coordinates;for(t=0,i=n.length;t<i;++t)n[t]=t$4.geom.flat.simplify.snap(n[t],e)}},t$4.render.canvas.PolygonReplay.prototype.setFillStrokeStyles_=function(e){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.applyFill,e),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},t$4.geom.flat.straightchunk={},t$4.geom.flat.straightchunk.lineString=function(e,t,i,n,r){var o,a,s,l,u,c,h,d,f,p=i,_=i,m=0,g=0,x=i;for(o=i;o<n;o+=r){var y=t[o],v=t[o+1];void 0!==l&&(d=y-l,f=v-u,s=Math.sqrt(d*d+f*f),void 0!==c&&(g+=a,Math.acos((c*d+h*f)/(a*s))>e&&(g>m&&(m=g,p=x,_=o),g=0,x=o-r)),a=s,c=d,h=f),l=y,u=v}return(g+=s)>m?[x,o]:[p,_]},t$4.style.TextPlacement={POINT:"point",LINE:"line"},t$4.render.canvas.TextReplay=function(e,t,i,n,r,o){t$4.render.canvas.Replay.call(this,e,t,i,n,r,o),this.declutterGroup_,this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.widths_={},t$4.render.canvas.labelCache.prune()},t$4.inherits(t$4.render.canvas.TextReplay,t$4.render.canvas.Replay),t$4.render.canvas.TextReplay.measureTextWidths=function(e,t,i){var n,r,o=t.length,a=0;for(r=0;r<o;++r)n=t$4.render.canvas.measureTextWidth(e,t[r]),a=Math.max(a,n),i.push(n);return a},t$4.render.canvas.TextReplay.prototype.drawText=function(e,t){var i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(i||n)){var o,a,s=this.coordinates.length,l=e.getType(),u=null,c=2,h=2;if(r.placement===t$4.style.TextPlacement.LINE){if(!t$4.extent.intersects(this.getBufferedMaxExtent(),e.getExtent()))return;var d;if(u=e.getFlatCoordinates(),h=e.getStride(),l==t$4.geom.GeometryType.LINE_STRING)d=[u.length];else if(l==t$4.geom.GeometryType.MULTI_LINE_STRING)d=e.getEnds();else if(l==t$4.geom.GeometryType.POLYGON)d=e.getEnds().slice(0,1);else if(l==t$4.geom.GeometryType.MULTI_POLYGON){var f=e.getEndss();for(d=[],o=0,a=f.length;o<a;++o)d.push(f[o][0])}this.beginGeometry(e,t);for(var p,_=r.textAlign,m=0,g=0,x=d.length;g<x;++g){if(null==_){var y=t$4.geom.flat.straightchunk.lineString(r.maxAngle,u,m,d[g],h);m=y[0],p=y[1]}else p=d[g];for(o=m;o<p;o+=h)this.coordinates.push(u[o],u[o+1]);c=this.coordinates.length,m=d[g],this.drawChars_(s,c,this.declutterGroup_),s=c}this.endGeometry(e,t)}else{var v=this.getImage(this.text_,this.textKey_,this.fillKey_,this.strokeKey_),$=v.width/this.pixelRatio;switch(l){case t$4.geom.GeometryType.POINT:case t$4.geom.GeometryType.MULTI_POINT:c=(u=e.getFlatCoordinates()).length;break;case t$4.geom.GeometryType.LINE_STRING:u=e.getFlatMidpoint();break;case t$4.geom.GeometryType.CIRCLE:u=e.getCenter();break;case t$4.geom.GeometryType.MULTI_LINE_STRING:c=(u=e.getFlatMidpoints()).length;break;case t$4.geom.GeometryType.POLYGON:if(u=e.getFlatInteriorPoint(),!r.overflow&&u[2]/this.resolution<$)return;h=3;break;case t$4.geom.GeometryType.MULTI_POLYGON:var b=e.getFlatInteriorPoints();for(u=[],o=0,a=b.length;o<a;o+=3)(r.overflow||b[o+2]/this.resolution>=$)&&u.push(b[o],b[o+1]);if(0==(c=u.length))return}c=this.appendFlatCoordinates(u,0,c,h,!1,!1),this.beginGeometry(e,t),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),this.updateFillStyle(this.state,this.applyFill,e),this.updateStrokeStyle(this.state,this.applyStroke)),this.drawTextImage_(v,s,c),this.endGeometry(e,t)}}},t$4.render.canvas.TextReplay.prototype.getImage=function(e,t,i,n){var r,o=n+t+e+i+this.pixelRatio,a=t$4.render.canvas.labelCache;if(!a.containsKey(o)){var s=n?this.strokeStates[n]||this.textStrokeState_:null,l=i?this.fillStates[i]||this.textFillState_:null,u=this.textStates[t]||this.textState_,c=this.pixelRatio,h=u.scale*c,d=t$4.render.replay.TEXT_ALIGN[u.textAlign||t$4.render.canvas.defaultTextAlign],f=n&&s.lineWidth?s.lineWidth:0,p=e.split("\n"),_=p.length,m=[],g=t$4.render.canvas.TextReplay.measureTextWidths(u.font,p,m),x=t$4.render.canvas.measureTextHeight(u.font),y=x*_,v=g+f,$=t$4.dom.createCanvasContext2D(Math.ceil(v*h),Math.ceil((y+f)*h));r=$.canvas,a.set(o,r),1!=h&&$.scale(h,h),$.font=u.font,n&&($.strokeStyle=s.strokeStyle,$.lineWidth=f*(t$4.has.SAFARI?h:1),$.lineCap=s.lineCap,$.lineJoin=s.lineJoin,$.miterLimit=s.miterLimit,t$4.has.CANVAS_LINE_DASH&&s.lineDash.length&&($.setLineDash(s.lineDash),$.lineDashOffset=s.lineDashOffset)),i&&($.fillStyle=l.fillStyle),$.textBaseline="middle",$.textAlign="center";var b,T=.5-d,C=d*r.width/h+T*f;if(n)for(b=0;b<_;++b)$.strokeText(p[b],C+T*m[b],.5*(f+x)+b*x);if(i)for(b=0;b<_;++b)$.fillText(p[b],C+T*m[b],.5*(f+x)+b*x)}return a.get(o)},t$4.render.canvas.TextReplay.prototype.drawTextImage_=function(e,t,i){var n=this.textState_,r=this.textStrokeState_,o=this.pixelRatio,a=t$4.render.replay.TEXT_ALIGN[n.textAlign||t$4.render.canvas.defaultTextAlign],s=t$4.render.replay.TEXT_ALIGN[n.textBaseline],l=r&&r.lineWidth?r.lineWidth:0,u=a*e.width/o+2*(.5-a)*l,c=s*e.height/o+2*(.5-s)*l;this.instructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,t,i,e,(u-this.textOffsetX_)*o,(c-this.textOffsetY_)*o,this.declutterGroup_,e.height,1,0,0,this.textRotateWithView_,this.textRotation_,1,!0,e.width,n.padding==t$4.render.canvas.defaultPadding?t$4.render.canvas.defaultPadding:n.padding.map((function(e){return e*o})),!!n.backgroundFill,!!n.backgroundStroke]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_IMAGE,t,i,e,(u-this.textOffsetX_)*o,(c-this.textOffsetY_)*o,this.declutterGroup_,e.height,1,0,0,this.textRotateWithView_,this.textRotation_,1/o,!0,e.width,n.padding,!!n.backgroundFill,!!n.backgroundStroke])},t$4.render.canvas.TextReplay.prototype.drawChars_=function(e,t,i){var n=this.textStrokeState_,r=this.textState_,o=this.textFillState_,a=this.strokeKey_;n&&(a in this.strokeStates||(this.strokeStates[a]={strokeStyle:n.strokeStyle,lineCap:n.lineCap,lineDashOffset:n.lineDashOffset,lineWidth:n.lineWidth,lineJoin:n.lineJoin,miterLimit:n.miterLimit,lineDash:n.lineDash}));var s=this.textKey_;this.textKey_ in this.textStates||(this.textStates[this.textKey_]={font:r.font,textAlign:r.textAlign||t$4.render.canvas.defaultTextAlign,scale:r.scale});var l=this.fillKey_;o&&(l in this.fillStates||(this.fillStates[l]={fillStyle:o.fillStyle}));var u=this.pixelRatio,c=t$4.render.replay.TEXT_ALIGN[r.textBaseline],h=this.textOffsetY_*u,d=this.text_,f=r.font,p=r.scale,_=n?n.lineWidth*p/2:0,m=this.widths_[f];m||(this.widths_[f]=m={}),this.instructions.push([t$4.render.canvas.Instruction.DRAW_CHARS,e,t,c,i,r.overflow,l,r.maxAngle,function(e){var t=m[e];return t||(t=m[e]=t$4.render.canvas.measureTextWidth(f,e)),t*p*u},h,a,_*u,d,s,1]),this.hitDetectionInstructions.push([t$4.render.canvas.Instruction.DRAW_CHARS,e,t,c,i,r.overflow,l,r.maxAngle,function(e){var t=m[e];return t||(t=m[e]=t$4.render.canvas.measureTextWidth(f,e)),t*p},h,a,_,d,s,1/u])},t$4.render.canvas.TextReplay.prototype.setTextStyle=function(e,t){var i,n,r;if(e){this.declutterGroup_=t;var o=e.getFill();o?((n=this.textFillState_)||(n=this.textFillState_={}),n.fillStyle=t$4.colorlike.asColorLike(o.getColor()||t$4.render.canvas.defaultFillStyle)):n=this.textFillState_=null;var a=e.getStroke();if(a){(r=this.textStrokeState_)||(r=this.textStrokeState_={});var s=a.getLineDash(),l=a.getLineDashOffset(),u=a.getWidth(),c=a.getMiterLimit();r.lineCap=a.getLineCap()||t$4.render.canvas.defaultLineCap,r.lineDash=s?s.slice():t$4.render.canvas.defaultLineDash,r.lineDashOffset=void 0===l?t$4.render.canvas.defaultLineDashOffset:l,r.lineJoin=a.getLineJoin()||t$4.render.canvas.defaultLineJoin,r.lineWidth=void 0===u?t$4.render.canvas.defaultLineWidth:u,r.miterLimit=void 0===c?t$4.render.canvas.defaultMiterLimit:c,r.strokeStyle=t$4.colorlike.asColorLike(a.getColor()||t$4.render.canvas.defaultStrokeStyle)}else r=this.textStrokeState_=null;i=this.textState_;var h=e.getFont()||t$4.render.canvas.defaultFont,d=e.getScale();i.overflow=e.getOverflow(),i.font=h,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.textBaseline=e.getTextBaseline()||t$4.render.canvas.defaultTextBaseline,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||t$4.render.canvas.defaultPadding,i.scale=void 0===d?1:d;var f=e.getOffsetX(),p=e.getOffsetY(),_=e.getRotateWithView(),m=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===p?0:p,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0===m?0:m,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:t$4.getUid(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+t$4.getUid(n.fillStyle):""}else this.text_=""},t$4.render.canvas.ReplayGroup=function(e,t,i,n,r,o,a){t$4.render.ReplayGroup.call(this),this.declutterTree_=o,this.declutterGroup_=null,this.tolerance_=e,this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=i,this.renderBuffer_=a,this.replaysByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=t$4.transform.create()},t$4.inherits(t$4.render.canvas.ReplayGroup,t$4.render.ReplayGroup),t$4.render.canvas.ReplayGroup.circleArrayCache_={0:[[!0]]},t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_=function(e,t,i){var n,r=Math.floor(e.length/2);if(t>=r)for(n=r;n<t;n++)e[n][i]=!0;else if(t<r)for(n=t+1;n<r;n++)e[n][i]=!0},t$4.render.canvas.ReplayGroup.getCircleArray_=function(e){if(void 0!==t$4.render.canvas.ReplayGroup.circleArrayCache_[e])return t$4.render.canvas.ReplayGroup.circleArrayCache_[e];for(var t=2*e+1,i=new Array(t),n=0;n<t;n++)i[n]=new Array(t);for(var r=e,o=0,a=0;r>=o;)t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+r,e+o),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+o,e+r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-o,e+r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-r,e+o),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-r,e-o),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e-o,e-r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+o,e-r),t$4.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(i,e+r,e-o),2*((a+=1+2*++o)-r)+1>0&&(a+=1-2*(r-=1));return t$4.render.canvas.ReplayGroup.circleArrayCache_[e]=i,i},t$4.render.canvas.ReplayGroup.replayDeclutter=function(e,t,i){for(var n=Object.keys(e).map(Number).sort(t$4.array.numberSafeCompareFunction),r={},o=0,a=n.length;o<a;++o)for(var s=e[n[o].toString()],l=0,u=s.length;l<u;){var c=s[l++],h=s[l++];c.replay(t,h,i,r)}},t$4.render.canvas.ReplayGroup.prototype.addDeclutter=function(e){var t=null;return this.declutterTree_&&(e?(t=this.declutterGroup_)[4]++:(t=this.declutterGroup_=t$4.extent.createEmpty()).push(1)),t},t$4.render.canvas.ReplayGroup.prototype.clip=function(e,t){var i=this.getClipCoords(t);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()},t$4.render.canvas.ReplayGroup.prototype.hasReplays=function(e){for(var t in this.replaysByZIndex_)for(var i=this.replaysByZIndex_[t],n=0,r=e.length;n<r;++n)if(e[n]in i)return!0;return!1},t$4.render.canvas.ReplayGroup.prototype.finish=function(){var e;for(e in this.replaysByZIndex_){var t,i=this.replaysByZIndex_[e];for(t in i)i[t].finish()}},t$4.render.canvas.ReplayGroup.prototype.forEachFeatureAtCoordinate=function(e,t,i,n,r,o,a){var s,l=2*(n=Math.round(n))+1,u=t$4.transform.compose(this.hitDetectionTransform_,n+.5,n+.5,1/t,-1/t,-i,-e[0],-e[1]),c=this.hitDetectionContext_;c.canvas.width!==l||c.canvas.height!==l?(c.canvas.width=l,c.canvas.height=l):c.clearRect(0,0,l,l),void 0!==this.renderBuffer_&&(s=t$4.extent.createEmpty(),t$4.extent.extendCoordinate(s,e),t$4.extent.buffer(s,t*(this.renderBuffer_+n),s));var h,d,f=t$4.render.canvas.ReplayGroup.getCircleArray_(n);function p(e){for(var t=c.getImageData(0,0,l,l).data,i=0;i<l;i++)for(var n=0;n<l;n++)if(f[i][n]&&t[4*(n*l+i)+3]>0){var r;return(!(h&&(d==t$4.render.ReplayType.IMAGE||d==t$4.render.ReplayType.TEXT))||-1!==h.indexOf(e))&&(r=o(e)),r?r:void c.clearRect(0,0,l,l)}}this.declutterTree_&&(h=this.declutterTree_.all().map((function(e){return e.value})));var _,m,g,x,y,v=Object.keys(this.replaysByZIndex_).map(Number);for(v.sort(t$4.array.numberSafeCompareFunction),_=v.length-1;_>=0;--_){var $=v[_].toString();for(g=this.replaysByZIndex_[$],m=t$4.render.replay.ORDER.length-1;m>=0;--m)if(void 0!==(x=g[d=t$4.render.replay.ORDER[m]]))if(!a||d!=t$4.render.ReplayType.IMAGE&&d!=t$4.render.ReplayType.TEXT){if(y=x.replayHitDetection(c,u,i,r,p,s))return y}else{var b=a[$];b?b.push(x,u.slice(0)):a[$]=[x,u.slice(0)]}}},t$4.render.canvas.ReplayGroup.prototype.getClipCoords=function(e){var t=this.maxExtent_,i=t[0],n=t[1],r=t[2],o=t[3],a=[i,n,i,o,r,o,r,n];return t$4.geom.flat.transform.transform2D(a,0,8,2,e,a),a},t$4.render.canvas.ReplayGroup.prototype.getReplay=function(e,t){var i=void 0!==e?e.toString():"0",n=this.replaysByZIndex_[i];void 0===n&&(n={},this.replaysByZIndex_[i]=n);var r=n[t];void 0===r&&(r=new(0,t$4.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_[t])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_),n[t]=r);return r},t$4.render.canvas.ReplayGroup.prototype.getReplays=function(){return this.replaysByZIndex_},t$4.render.canvas.ReplayGroup.prototype.isEmpty=function(){return t$4.obj.isEmpty(this.replaysByZIndex_)},t$4.render.canvas.ReplayGroup.prototype.replay=function(e,t,i,n,r,o){var a=Object.keys(this.replaysByZIndex_).map(Number);a.sort(t$4.array.numberSafeCompareFunction),e.save(),this.clip(e,t);var s,l,u,c,h,d,f=r||t$4.render.replay.ORDER;for(s=0,l=a.length;s<l;++s){var p=a[s].toString();for(h=this.replaysByZIndex_[p],u=0,c=f.length;u<c;++u){var _=f[u];if(void 0!==(d=h[_]))if(!o||_!=t$4.render.ReplayType.IMAGE&&_!=t$4.render.ReplayType.TEXT)d.replay(e,t,i,n);else{var m=o[p];m?m.push(d,t.slice(0)):o[p]=[d,t.slice(0)]}}}e.restore()},t$4.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_={Circle:t$4.render.canvas.PolygonReplay,Default:t$4.render.canvas.Replay,Image:t$4.render.canvas.ImageReplay,LineString:t$4.render.canvas.LineStringReplay,Polygon:t$4.render.canvas.PolygonReplay,Text:t$4.render.canvas.TextReplay},t$4.renderer={},t$4.renderer.vector={},t$4.renderer.vector.defaultOrder=function(e,t){return t$4.getUid(e)-t$4.getUid(t)},t$4.renderer.vector.getSquaredTolerance=function(e,t){var i=t$4.renderer.vector.getTolerance(e,t);return i*i},t$4.renderer.vector.getTolerance=function(e,t){return t$4.SIMPLIFY_TOLERANCE*e/t},t$4.renderer.vector.renderCircleGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var a=e.getReplay(i.getZIndex(),t$4.render.ReplayType.CIRCLE);a.setFillStrokeStyle(r,o),a.drawCircle(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$4.renderer.vector.renderFeature=function(e,t,i,n,r,o){var a,s,l=!1;return(a=i.getImage())&&((s=a.getImageState())==t$4.ImageState.LOADED||s==t$4.ImageState.ERROR?a.unlistenImageChange(r,o):(s==t$4.ImageState.IDLE&&a.load(),s=a.getImageState(),a.listenImageChange(r,o),l=!0)),t$4.renderer.vector.renderFeature_(e,t,i,n),l},t$4.renderer.vector.renderFeature_=function(e,t,i,n){var r=i.getGeometryFunction()(t);if(r){var o=r.getSimplifiedGeometry(n);if(i.getRenderer())t$4.renderer.vector.renderGeometry_(e,o,i,t);else(0,t$4.renderer.vector.GEOMETRY_RENDERERS_[o.getType()])(e,o,i,t)}},t$4.renderer.vector.renderGeometry_=function(e,t,i,n){if(t.getType()!=t$4.geom.GeometryType.GEOMETRY_COLLECTION)e.getReplay(i.getZIndex(),t$4.render.ReplayType.DEFAULT).drawCustom(t,n,i.getRenderer());else for(var r=t.getGeometries(),o=0,a=r.length;o<a;++o)t$4.renderer.vector.renderGeometry_(e,r[o],i,n)},t$4.renderer.vector.renderGeometryCollectionGeometry_=function(e,t,i,n){var r,o,a=t.getGeometriesArray();for(r=0,o=a.length;r<o;++r){(0,t$4.renderer.vector.GEOMETRY_RENDERERS_[a[r].getType()])(e,a[r],i,n)}},t$4.renderer.vector.renderLineStringGeometry_=function(e,t,i,n){var r=i.getStroke();if(r){var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.LINE_STRING);o.setFillStrokeStyle(null,r),o.drawLineString(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!1)),s.drawText(t,n)}},t$4.renderer.vector.renderMultiLineStringGeometry_=function(e,t,i,n){var r=i.getStroke();if(r){var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.LINE_STRING);o.setFillStrokeStyle(null,r),o.drawMultiLineString(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!1)),s.drawText(t,n)}},t$4.renderer.vector.renderMultiPolygonGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(o||r){var a=e.getReplay(i.getZIndex(),t$4.render.ReplayType.POLYGON);a.setFillStrokeStyle(r,o),a.drawMultiPolygon(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$4.renderer.vector.renderPointGeometry_=function(e,t,i,n){var r=i.getImage();if(r){if(r.getImageState()!=t$4.ImageState.LOADED)return;var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.IMAGE);o.setImageStyle(r,e.addDeclutter(!1)),o.drawPoint(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!!r)),s.drawText(t,n)}},t$4.renderer.vector.renderMultiPointGeometry_=function(e,t,i,n){var r=i.getImage();if(r){if(r.getImageState()!=t$4.ImageState.LOADED)return;var o=e.getReplay(i.getZIndex(),t$4.render.ReplayType.IMAGE);o.setImageStyle(r,e.addDeclutter(!1)),o.drawMultiPoint(t,n)}var a=i.getText();if(a){var s=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);s.setTextStyle(a,e.addDeclutter(!!r)),s.drawText(t,n)}},t$4.renderer.vector.renderPolygonGeometry_=function(e,t,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var a=e.getReplay(i.getZIndex(),t$4.render.ReplayType.POLYGON);a.setFillStrokeStyle(r,o),a.drawPolygon(t,n)}var s=i.getText();if(s){var l=e.getReplay(i.getZIndex(),t$4.render.ReplayType.TEXT);l.setTextStyle(s,e.addDeclutter(!1)),l.drawText(t,n)}},t$4.renderer.vector.GEOMETRY_RENDERERS_={Point:t$4.renderer.vector.renderPointGeometry_,LineString:t$4.renderer.vector.renderLineStringGeometry_,Polygon:t$4.renderer.vector.renderPolygonGeometry_,MultiPoint:t$4.renderer.vector.renderMultiPointGeometry_,MultiLineString:t$4.renderer.vector.renderMultiLineStringGeometry_,MultiPolygon:t$4.renderer.vector.renderMultiPolygonGeometry_,GeometryCollection:t$4.renderer.vector.renderGeometryCollectionGeometry_,Circle:t$4.renderer.vector.renderCircleGeometry_},Object.defineProperties(r$a.prototype,{clock:{get:function(){return this._clock}}}),r$a.prototype.synchronize=function(){var e=this._clock;this.systemTime=a$15.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate},r$a.prototype.isDestroyed=function(){return!1},r$a.prototype.destroy=function(){this._eventHelper.removeAll(),i$11(this)};var o$4={};function c$5(e,t,i,n,r){return i.call(n,e[t]),ce$1.getObservable(e,t).subscribe(i,n,r)}function r$9(e,t){if(!e$2e(e))throw new t$15("command is required.");this._command=e,t=u$Z(t,u$Z.EMPTY_OBJECT),this.toggled=u$Z(t.toggled,!1),this.tooltip=u$Z(t.tooltip,""),ce$1.track(this,["toggled","tooltip"])}o$4.createCheckbox=function(e,t,i){o$1q.typeOf.string("labelText",e),o$1q.typeOf.string("checkedBinding",t);var n=document.createElement("div"),r=document.createElement("label"),o=document.createElement("input");o.type="checkbox";var a="checked: "+t;return e$2e(i)&&(a+=", enable: "+i),o.setAttribute("data-bind",a),r.appendChild(o),r.appendChild(document.createTextNode(e)),n.appendChild(r),n},o$4.createSection=function(e,t,i,n){o$1q.defined("panel",e),o$1q.typeOf.string("headerText",t),o$1q.typeOf.string("sectionVisibleBinding",i),o$1q.typeOf.string("toggleSectionVisibilityBinding",n);var r=document.createElement("div");r.className="supermap3d-cesiumInspector-section",r.setAttribute("data-bind",'css: { "supermap3d-cesiumInspector-section-collapsed": !'+i+" }"),e.appendChild(r);var o=document.createElement("h3");o.className="supermap3d-cesiumInspector-sectionHeader",o.appendChild(document.createTextNode(t)),o.setAttribute("data-bind","click: "+n),r.appendChild(o);var a=document.createElement("div");return a.className="supermap3d-cesiumInspector-sectionContent",r.appendChild(a),a},Object.defineProperties(r$9.prototype,{command:{get:function(){return this._command}}});var _0x1c2e12=(_0x518b97=!0,function(e,t){var i=_0x518b97?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x518b97=!1,i}),_0x1d62b3=_0x1c2e12(void 0,(function(){return _0x1d62b3.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d62b3).search("(((.+)+)+)+$")})),_0x518b97;function _0x82cfb9(e){this.clampMode=0,this.handlerDis=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.Distance,this.clampMode),this.handlerArea=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.Area,this.clampMode),this.handlerHeight=new WebGLPlot.MeasureHandler(e,WebGLPlot.MeasureMode.DVH)}_0x1d62b3(),_0x82cfb9.prototype.calDistance=function(){this.handlerDis.measureEvt.addEventListener(function(e){var t=Number(e.distance),i=t>1e3?(t/1e3).toFixed(2)+"km":t.toFixed(2)+"m";this.handlerDis.disLabel.text=WebGLPlot.plotI18n("Distance")+":"+i}.bind(this)),this.deactiveAll(),this.handlerDis&&this.handlerDis.activate()},_0x82cfb9.prototype.calArea=function(){this.handlerArea.measureEvt.addEventListener(function(e){var t=Number(e.area),i=t>1e6?(t/1e6).toFixed(2)+"km²":t.toFixed(2)+"㎡";this.handlerArea.areaLabel.text=WebGLPlot.plotI18n("Area")+":"+i}.bind(this)),this.deactiveAll(),this.handlerArea&&this.handlerArea.activate()},_0x82cfb9.prototype.calHeight=function(){this.handlerHeight.measureEvt.addEventListener((e=>{var t=e.distance>1e3?(e.distance/1e3).toFixed(2)+"km":e.distance+"m",i=e.verticalHeight>1e3?(e.verticalHeight/1e3).toFixed(2)+"km":e.verticalHeight+"m",n=e.horizontalDistance>1e3?(e.horizontalDistance/1e3).toFixed(2)+"km":e.horizontalDistance+"m";this.handlerHeight.disLabel.text=WebGLPlot.plotI18n("SpaceDistance")+":"+t,this.handlerHeight.vLabel.text=WebGLPlot.plotI18n("VerticalHeight")+":"+i,this.handlerHeight.hLabel.text=WebGLPlot.plotI18n("LevelDistance")+":"+n})),this.handlerHeight.clear(),this.deactiveAll(),this.handlerHeight&&this.handlerHeight.activate()},_0x82cfb9.prototype.clear=function(){this.deactiveAll(),this.handlerDis&&this.handlerDis.clear(),this.handlerArea&&this.handlerArea.clear(),this.handlerHeight&&this.handlerHeight.clear()},_0x82cfb9.prototype.deactiveAll=function(){this.handlerDis&&this.handlerDis.deactivate(),this.handlerArea&&this.handlerArea.deactivate(),this.handlerHeight&&this.handlerHeight.deactivate()};var _0x55debf=(_0xba868a=!0,function(e,t){var i=_0xba868a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xba868a=!1,i}),_0x32e19a=_0x55debf(void 0,(function(){return _0x32e19a.toString().search("(((.+)+)+)+$").toString().constructor(_0x32e19a).search("(((.+)+)+)+$")})),_0xba868a;_0x32e19a();var _0x2bbdab=null,_0x55e448=null;function _0x253cc(e){this.sightline=new WebGLPlot.Sightline(e.scene),this.handlerPoint=new WebGLPlot.DrawHandler(e,WebGLPlot.DrawMode.Point),this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.scene.canvas),this.sightline.lineWidth=5,this.sightline.build(),this.num=0,this.viewer=e,_0x2bbdab=this.sightline,_0x55e448=this.num}function _0x589efd(e){_0x55e448+=1;var t=_0x295a48(e),i="point"+_0x55e448;_0x2bbdab.addTargetPoint({position:t,name:i})}function _0x295a48(e){var t=WebGLPlot.Cartographic.fromCartesian(e);return[WebGLPlot.CesiumMath.toDegrees(t.longitude),WebGLPlot.CesiumMath.toDegrees(t.latitude),t.height]}_0x253cc.prototype.activate=function(){var e=!0;if(this.sightline.removeAllTargetPoint(),this.handlerPoint.clear(),this.num=0,!this.handlerPoint.active){var t=null;this.handlerPoint.activate(),this.handlerPoint.drawEvt.addEventListener(function(i){var n=_0x295a48(i.object.position);this.sightline.viewPosition=n,e=!1,t=i}.bind(this)),this.handler.setInputAction(function(i){e||t||_0x589efd(this.viewer.scene.pickPosition(i.position));t=null}.bind(this),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction(function(t){if(!e){var i=this.viewer.scene.pickPosition(t.endPosition);if(this.num>0){this.sightline.removeAllTargetPoint("point0");var n=Cartesian2toDegress(i);sightline.addTargetPoint({position:n,name:"point0"})}}}.bind(this),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(){e||(this.viewer.enableCursorStyle=!0,this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK))}.bind(this),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}},_0x253cc.prototype.clear=function(){this.handlerPoint.deactivate(),this.handlerPoint.clear(),this.num=0,this.viewer.entities.removeAll(),this.sightline.removeAllTargetPoint()},_0x253cc.prototype.deactivate=function(){this.handlerPoint.deactivate()};var _0x5cfc90=(_0x4586bc=!0,function(e,t){var i=_0x4586bc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4586bc=!1,i}),_0x5134b4=_0x5cfc90(void 0,(function(){return _0x5134b4.toString().search("(((.+)+)+)+$").toString().constructor(_0x5134b4).search("(((.+)+)+)+$")})),_0x4586bc;function _0x4dfa3a(e){(WebGLPlot.ViewShed3D||WebGLPlot.DrawHandler)&&(this.pointHandler=new WebGLPlot.DrawHandler(e,WebGLPlot.DrawMode.Point),this.viewshed3D=new WebGLPlot.ViewShed3D(e.scene)),this.viewer=e,this.handler=new WebGLPlot.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.viewer.scene.ViewFlag=!0,this.viewPosition=null}_0x5134b4(),_0x4dfa3a.prototype.activate=function(){this.pointHandler.active||(this.viewshed3D.distance=.1,this.viewer.scene.ViewFlag=!0,this.pointHandler.activate(),this.handler.setInputAction(function(e){if(!this.viewer.scene.ViewFlag){var t=e.endPosition,i=this.viewer.scene.pickPosition(t);if(WebGLPlot.Cartesian3.distance(this.viewPosition,i)>0){var n=WebGLPlot.Cartographic.fromCartesian(i),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=n.height;this.viewshed3D.setDistDirByPoint([r,o,a])}}}.bind(this),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(e){this.viewer.scene.ViewFlag=!0}.bind(this),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this.handler.setInputAction(function(e){!this.viewer.scene.ViewFlag&&.1!==this.viewshed3D.distance&&(this.viewer.scene.ViewFlag=!0)}.bind(this),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.pointHandler.drawEvt.addEventListener(function(e){var t=e.object,i=t.position;this.viewPosition=i;var n=WebGLPlot.Cartographic.fromCartesian(i),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=n.height+1.8;t.position=WebGLPlot.Cartesian3.fromDegrees(r,o,a),this.viewer.scene.ViewFlag&&(this.viewshed3D.viewPosition=[r,o,a],this.viewshed3D.build(),this.viewer.scene.ViewFlag=!1)}.bind(this)))},_0x4dfa3a.prototype.clear=function(){this.viewer.entities.removeAll(),this.viewshed3D.distance=.1,this.viewer.scene.ViewFlag=!0,this.pointHandler.clear()},_0x4dfa3a.prototype.deactivate=function(){this.pointHandler.deactivate(),this.viewer.scene.ViewFlag=!0};var _0x2e02dd=(_0x287e0a=!0,function(e,t){var i=_0x287e0a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x287e0a=!1,i}),_0x5a5292=_0x2e02dd(void 0,(function(){return _0x5a5292.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a5292).search("(((.+)+)+)+$")})),_0x287e0a;function _0x10b943(e){if(!WebGLPlot.DrawHandler&&!WebGLPlot.SlopeSetting)throw new WebGLPlot.DeveloperError("SuperMap_DrawHandler SlopeSetting is required.");this.viewer=e,this.handlerPolygon=new WebGLPlot.DrawHandler(this.viewer,WebGLPlot.DrawMode.Polygon,1),this.slope=new WebGLPlot.SlopeSetting;var t=_0x406a95(this.viewer._element);this.handlerPolygon.activeEvt.addEventListener(function(e){1==e?(this.viewer.enableCursorStyle=!1,this.viewer._element.style.cursor="crosshair"):(this.viewer.enableCursorStyle=!0,this.viewer._element.style.cursor="")}.bind(this)),this.handlerPolygon.movingEvt.addEventListener((function(e){e.x<200&&e.y<150&&t.setVisible(!1)})),this.handlerPolygon.drawEvt.addEventListener(function(e){if(e.object.positions){var i=[].concat(e.object.positions);t.setVisible(!1);for(var n=[],r=0,o=i.length;r<o;r++){var a=WebGLPlot.Cartographic.fromCartesian(i[r]),s=WebGLPlot.CesiumMath.toDegrees(a.longitude),l=WebGLPlot.CesiumMath.toDegrees(a.latitude),u=a.height;-1==n.indexOf(s)&&-1==n.indexOf(l)&&(n.push(s),n.push(l),n.push(u))}this.slope.CoverageArea=n;var c=WebGLPlot.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION;this.viewer.scene.globe.SlopeSetting={slopeSetting:this.slope,analysisMode:c},this.handlerPolygon.polygon.show=!1,this.handlerPolygon.polyline.show=!0,this.handlerPolygon.deactivate(),this.handlerPolygon.activate()}else this.clear()}.bind(this))}function _0x406a95(e){var t=function(e){var t=document.createElement("DIV");t.className="twipsy right";var i=document.createElement("DIV");i.className="twipsy-arrow",t.appendChild(i);var n=document.createElement("DIV");n.className="twipsy-inner",t.appendChild(n),this._div=t,this._title=n,this.message="",e.appendChild(t);var r=this;t.onmousemove=function(e){r.showAt({x:e.clientX,y:e.clientY},r.message)}};return t.prototype.setVisible=function(e){this._div.style.display=e?"block":"none"},t.prototype.showAt=function(e,t){e&&t&&(this.setVisible(!0),this._title.innerHTML=t,this._div.style.left=e.x+10+"px",this._div.style.top=e.y-this._div.clientHeight/2+"px",this.message=t)},new t(e)}_0x5a5292(),_0x10b943.prototype.activate=function(){if(this.slope){this.slope.DisplayMode=WebGLPlot.SlopeSettingEnum.DisplayMode.FACE_AND_ARROW,this.slope.MaxVisibleValue=78,this.slope.MinVisibleValue=0;var e=new WebGLPlot.ColorTable;e.insert(80,new WebGLPlot.Color(1,0,0)),e.insert(50,new WebGLPlot.Color(221/255,224/255,7/255)),e.insert(30,new WebGLPlot.Color(20/255,187/255,18/255)),e.insert(20,new WebGLPlot.Color(0,161/255,1)),e.insert(0,new WebGLPlot.Color(9/255,9/255,1)),this.slope.ColorTable=e,this.slope.Opacity=.5,this.handlerPolygon.activate()}},_0x10b943.prototype.deactivate=function(){this.handlerPolygon.deactivate()},_0x10b943.prototype.clear=function(){!this.slope||(this.slope.CoverageArea=[],null!=this.viewer.scene.globe.SlopeSetting.slopeSetting&&(this.viewer.scene.globe.SlopeSetting={slopeSetting:this.slope,analysisMode:WebGLPlot.HypsometricSettingEnum.AnalysisRegionMode.ARM_NONE},this.handlerPolygon.clear(),this.handlerPolygon.deactivate()))};var _0x529804=(_0x500260=!0,function(e,t){var i=_0x500260?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x500260=!1,i}),_0x502115=_0x529804(void 0,(function(){return _0x502115.toString().search("(((.+)+)+)+$").toString().constructor(_0x502115).search("(((.+)+)+)+$")})),_0x500260;function _0x5b82ce(e){null!=e&&(this.measurementTool=new _0x82cfb9(e),this.sightLineTool=new _0x253cc(e),this.viewshedTool=new _0x4dfa3a(e),this.terrainSlopeTool=new _0x10b943(e))}_0x502115(),_0x5b82ce.prototype.activeDisMeasure=function(){this.measurementTool.calDistance()},_0x5b82ce.prototype.activeAreaMeasure=function(){this.measurementTool.calArea()},_0x5b82ce.prototype.activeHeightMeasure=function(){this.measurementTool.calHeight()},_0x5b82ce.prototype.activeSightLine=function(){this.sightLineTool.activate()},_0x5b82ce.prototype.activeViewShed=function(){this.viewshedTool.activate()},_0x5b82ce.prototype.activeTerrainSlope=function(){this.terrainSlopeTool.activate()},_0x5b82ce.prototype.clear=function(){this.measurementTool.clear(),this.sightLineTool.clear(),this.viewshedTool.clear(),this.terrainSlopeTool.clear()},_0x5b82ce.prototype.deactivate=function(){this.measurementTool.deactiveAll(),this.sightLineTool.deactivate(),this.viewshedTool.deactivate(),this.terrainSlopeTool.deactivate()};var _0x47ba8a=(_0x3a57b3=!0,function(e,t){var i=_0x3a57b3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a57b3=!1,i}),_0x3003b0=_0x47ba8a(void 0,(function(){return _0x3003b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x3003b0).search("(((.+)+)+)+$")})),_0x3a57b3;function _0x2c1b91(){this._code=_0x1c668c.SYMBOL_ARBITRARYPOLYGON,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_ARBITRARYPOLYGON,this._symbolName=WebGLPlot.plotI18n("polygon"),this._minEditPts=3,this._maxEditPts=9999}_0x3003b0(),_0x2c1b91.prototype.getMinEditPts=function(){return this._minEditPts},_0x2c1b91.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x2c1b91.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;for(var i=[],n=0;n<t.length;++n)i.push(t[n].clone());return i.push(t[0].clone()),new _0x4c78d5({symbolType:this._symbolType,points:i})},_0x2c1b91.prototype.getSymbolName=function(){return this._symbolName};var _0x1a2b25=(_0x335cd7=!0,function(e,t){var i=_0x335cd7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x335cd7=!1,i}),_0xe92b42=_0x1a2b25(void 0,(function(){return _0xe92b42.toString().search("(((.+)+)+)+$").toString().constructor(_0xe92b42).search("(((.+)+)+)+$")})),_0x335cd7;function _0x26b741(){this._code=_0x1c668c.SYMBOL_BRACE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_BRACE,this._symbolName=WebGLPlot.plotI18n("brace"),this._minEditPts=2,this._maxEditPts=2,this._scaleValues=[],this._scaleValues.push(.1),this._scaleValues.push(.1),this._scalePoints=[]}_0xe92b42(),_0x26b741.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x26b741.prototype.getMinEditPts=function(){return this._minEditPts},_0x26b741.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2===t.length&&_0x2909c1.isSamePt(t[0],t[1]))return null;for(var i=[],n=0;n<t.length;++n)i.push(t[n].clone());i.length;var r=i[0],o=i[1],a=_0x2909c1.distance(r,o);this._scaleValues.length<2&&(this._scaleValues=[],this._scaleValues.push(.1),this._scaleValues.push(.1));var s=this._scaleValues[0],l=this._scaleValues[1],u=new WebGLPlot.Cartesian3(a*s,a*s,0),c=new WebGLPlot.Cartesian3(a*(.5-l/2),0,0),h=new WebGLPlot.Cartesian3(.5*a,-a*l,0),d=new WebGLPlot.Cartesian3(a*(.5+l/2),0,0),f=new WebGLPlot.Cartesian3(a*(1-s),a*s,0),p=[],_=180*Math.PI/180,m=270*Math.PI/180,g=3*Math.PI/180;for(n=_;n<=m;n+=g){var x=new WebGLPlot.Cartesian3(u.x+a*s,u.y,0);x=_0x2909c1.rotateAngle(u,n,x),p.push(x)}p.push(c),p.push(h),p.push(d),_=270*Math.PI/180,m=360*Math.PI/180;for(n=_;n<=m;n+=g){x=new WebGLPlot.Cartesian3(f.x+a*s,f.y,0);x=_0x2909c1.rotateAngle(f,n,x),p.push(x)}for(var y=_0x2909c1.radian(r,o),v=[],$=0;$<p.length;$++){var b=new WebGLPlot.Cartesian3(p[$].x+r.x,p[$].y+r.y,0);b=_0x2909c1.rotateAngle(r,y,b),v.push(b)}var T=new _0x4c78d5({points:v,symbolType:_0x1c668c.SYMBOL_POLYLINE}),C=new WebGLPlot.Cartesian3(a*s,0,0),S=new WebGLPlot.Cartesian3(C.x+r.x,C.y+r.y,0);S=_0x2909c1.rotateAngle(r,y,S),this._scalePoints.push(S);var w=new WebGLPlot.Cartesian3(h.x+r.x,h.y+r.y,0);return w=_0x2909c1.rotateAngle(r,y,w),this._scalePoints.push(w),T},_0x26b741.prototype.modifyScalePoint=function(e,t,i){var n=e.points,r=_0x2909c1.distance(n[0],n[1]);if(0===t){var o=_0x2909c1.distance(n[0],i)/r;o>0&&o<.4&&(this._scaleValues[0]=o)}else if(1===t){var a=new WebGLPlot.Cartesian3((n[0].x+n[1].x)/2,(n[0].y+n[1].y)/2,0);new WebGLPlot.Cartesian3(i.x,a.y,0);var s=_0x2909c1.distance(i,a)/r;0<s&&.2>s&&(this._scaleValues[1]=s)}return this.calculateParts({points:n})},_0x26b741.prototype.getSymbolName=function(){return this._symbolName};var _0x166a1a=(_0x51b571=!0,function(e,t){var i=_0x51b571?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51b571=!1,i}),_0x53cf7a=_0x166a1a(void 0,(function(){return _0x53cf7a.toString().search("(((.+)+)+)+$").toString().constructor(_0x53cf7a).search("(((.+)+)+)+$")})),_0x51b571;function _0x431d2c(){this._code=_0x1c668c.SYMBOL_CONCENTRICCIRCLE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_CONCENTRICCIRCLE,this._symbolName=WebGLPlot.plotI18n("concentricCircle"),this._startAngle=0,this._endAngle=360,this._minEditPts=3,this._maxEditPts=3}_0x53cf7a(),_0x431d2c.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x431d2c.prototype.getMinEditPts=function(){return this._minEditPts},_0x431d2c.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;for(var t=[],i=0;i<e.points.length;++i)t.push(e.points[i].clone());if(t.length<this._minEditPts||2===t.length&&_0x2909c1.isSamePt(t[0],t[1]))return null;for(2===t.length&&t.push(t[1].clone());this._startAngle>360;)this._startAngle-=360;for(;this._startAngle<0;)this._startAngle+=360;for(;this._endAngle>360;)this._endAngle-=360;for(;this._endAngle<0;)this._endAngle+=360;for(;this._endAngle<this._startAngle;)this._endAngle+=360;for(var n=_0x2909c1.distance(t[0],t[1]),r=_0x2909c1.distance(t[0],t[2]),o=[],a=[],s=[],l=Math.PI/180,u=(this._endAngle-this._startAngle)/72,c=this._startAngle;c<this._endAngle+u/2;c+=u){var h=t[0].x+n*Math.cos(c*l),d=t[0].y+n*Math.sin(c*l),f=t[0].x+r*Math.cos(c*l),p=t[0].y+r*Math.sin(c*l);o.push(new WebGLPlot.Cartesian3(h,d,0)),a.push(new WebGLPlot.Cartesian3(f,p,0))}o.push(o[0].clone()),a.push(a[0].clone());var _=new _0x4c78d5({points:o,symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON});s.push(_);var m=new _0x4c78d5({points:a,symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON});return s.push(m),s},_0x431d2c.prototype.getSymbolName=function(){return this._symbolName};var _0x3f249a=(_0x620ce0=!0,function(e,t){var i=_0x620ce0?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x620ce0=!1,i}),_0x5f3fd2=_0x3f249a(void 0,(function(){return _0x5f3fd2.toString().search("(((.+)+)+)+$").toString().constructor(_0x5f3fd2).search("(((.+)+)+)+$")})),_0x620ce0;function _0x105b3f(){this._code=_0x1c668c.SYMBOL_CURVEEIGHT,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_CURVEEIGHT,this._symbolName=WebGLPlot.plotI18n("curveEight"),this._minEditPts=2,this._maxEditPts=3}_0x5f3fd2(),_0x105b3f.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x105b3f.prototype.getMinEditPts=function(){return this._minEditPts},_0x105b3f.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2==t.length&&_0x2909c1.isSamePt(t[0],t[1]))return null;var i,n,r,o,a=[];if(2===t.length){var s=t[0].clone(),l=t[1].clone(),u=_0x2909c1.distance(s,l)/2,c=180*_0x2909c1.radian(s,l)/Math.PI,h=new WebGLPlot.Cartesian3((s.x+l.x)/2,(s.y+l.y)/2,0);i=_0x2909c1.circlePoint(h,u,u,c+90);a=[];var d=new _0x4c78d5({points:r=_0x2909c1.calcCirclePts(u,i),symbolType:_0x1c668c.SYMBOL_CIRCLE});a.push(d),n=_0x2909c1.circlePoint(h,3*u,3*u,c+90);var f=new _0x4c78d5({points:o=_0x2909c1.calcCirclePts(u,n),symbolType:_0x1c668c.SYMBOL_CIRCLE});a.push(f)}else{s=t[0],l=t[1];var p=t[2];c=0;c=_0x2909c1.isRight(p,s,l)?180*_0x2909c1.radian(l,s)/Math.PI+90:180*_0x2909c1.radian(s,l)/Math.PI+90;u=_0x2909c1.distance(s,l)/2,h=new WebGLPlot.Cartesian3((s.x+l.x)/2,(s.y+l.y)/2,0);i=_0x2909c1.circlePoint(h,u,u,c);var _=_0x2909c1.plumbLineLen(p,s,l);if(_<=4*u)n=_0x2909c1.circlePoint(h,3*u,3*u,c),r=_0x2909c1.calcCirclePts(u,i),a.push(new _0x4c78d5({points:r,symbolType:_0x1c668c.SYMBOL_SYMBOL_ARBITRARYPOLYGON})),o=_0x2909c1.calcCirclePts(u,n),a.push(new _0x4c78d5({points:o,symbolType:_0x1c668c.SYMBOL_SYMBOL_ARBITRARYPOLYGON}));else{n=_0x2909c1.circlePoint(h,_-u,_-u,c);for(var m=180*Math.acos(u/(_-2*u))/Math.PI,g=c-m,x=c-180+m,y=c-180-m+360,v=[],$=c+m-360;$<=g;$+=4){var b=_0x2909c1.circlePoint(i,u,u,$);v.push(b)}var T=_0x2909c1.circlePoint(i,u,u,g);v.push(T);var C=[];for($=x;$<y;$+=4){b=_0x2909c1.circlePoint(n,u,u,$);C.push(b)}var S=_0x2909c1.circlePoint(n,u,u,y);C.push(S);var w=[];w=w.concat(v);for($=C.length-1;$>=0;$--)w.push(C[$]);w.push(w[0].clone()),a.push(new _0x4c78d5({points:w,symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON}))}}return a},_0x105b3f.prototype.getSymbolName=function(){return this._symbolName};var _0x3a0bfe=(_0x1138b2=!0,function(e,t){var i=_0x1138b2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1138b2=!1,i}),_0x4a0619=_0x3a0bfe(void 0,(function(){return _0x4a0619.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a0619).search("(((.+)+)+)+$")})),_0x1138b2;function _0x399148(){this._code=_0x1c668c.SYMBOL_KIDNEY,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_KIDNEY,this._symbolName=WebGLPlot.plotI18n("kidney"),this._minEditPts=2,this._maxEditPts=3}_0x4a0619(),_0x399148.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x399148.prototype.getMinEditPts=function(){return this._minEditPts},_0x399148.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;return 2==t.length&&_0x2909c1.isSamePt(t[0],t[1])||t.length<this._minEditPts?null:new _0x4c78d5({points:_0x2909c1.generateKidneyShapePts(t),symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON})},_0x399148.prototype.getSymbolName=function(){return this._symbolName};var _0x28af7a=(_0x458831=!0,function(e,t){var i=_0x458831?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x458831=!1,i}),_0x3a6a34=_0x28af7a(void 0,(function(){return _0x3a6a34.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a6a34).search("(((.+)+)+)+$")})),_0x458831;function _0x1daae0(){this._code=_0x1c668c.SYMBOL_PIE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_PIE,this._symbolName=WebGLPlot.plotI18n("sector"),this._maxEditPts=3,this._minEditPts=3}_0x3a6a34(),_0x1daae0.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;var i,n=_0x2909c1.innerAngle(t[0],t[1],t[2]),r=_0x2909c1.distance(t[0],t[1]),o=_0x2909c1.radian(t[0],t[1]),a=_0x2909c1.radian(t[0],t[2]),s=[];return s.push(t[0]),(s=s.concat(_0x2909c1.generateArcSpatialData(t[0],r,r,n,o,a))).push(t[0]),0!==s.length&&(i=new _0x4c78d5({symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON,points:s})),i},_0x1daae0.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x1daae0.prototype.getMinEditPts=function(){return this._minEditPts},_0x1daae0.prototype.getSymbolName=function(){return this._symbolName};var _0xa1e8ea=(_0x113d82=!0,function(e,t){var i=_0x113d82?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x113d82=!1,i}),_0x26a419=_0xa1e8ea(void 0,(function(){return _0x26a419.toString().search("(((.+)+)+)+$").toString().constructor(_0x26a419).search("(((.+)+)+)+$")})),_0x113d82;function _0x5ea7dc(){this._code=_0x1c668c.SYMBOL_POLYBEZIERCLOSED,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_POLYBEZIERCLOSED,this._symbolName=WebGLPlot.plotI18n("closedBesselCurve"),this._minEditPts=3,this._maxEditPts=9999}_0x26a419(),_0x5ea7dc.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points,i=t.length;if(2==i&&_0x2909c1.isSamePt(t[0],t[1])||i<this._minEditPts)return null;for(var n=[],r=0;r<i;++r)n.push(t[r].clone());n.push(t[0].clone());var o=_0x2909c1.generateBezierCtrlPts(n),a=_0x2909c1.generateBezierPointsWithCtrlPts(o);return new _0x4c78d5({points:a=_0x2909c1.clearNextSamePts(a),symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON})},_0x5ea7dc.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5ea7dc.prototype.getMinEditPts=function(){return this._minEditPts},_0x5ea7dc.prototype.getSymbolName=function(){return this._symbolName};var _0x439cd0=(_0x17de2e=!0,function(e,t){var i=_0x17de2e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x17de2e=!1,i}),_0x1d238d=_0x439cd0(void 0,(function(){return _0x1d238d.toString().search("(((.+)+)+)+$").toString().constructor(_0x1d238d).search("(((.+)+)+)+$")})),_0x17de2e;function _0x5e520d(){this._code=_0x1c668c.SYMBOL_POLYLINE,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_POLYLINE,this._symbolName=WebGLPlot.plotI18n("polyLine"),this._minEditPts=2,this._maxEditPts=9999}_0x1d238d(),_0x5e520d.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;return null===t||t.length<this._minEditPts||t.length<this._minEditPts?null:new _0x4c78d5({symbolType:this._symbolType,points:t})},_0x5e520d.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5e520d.prototype.getMinEditPts=function(){return this._minEditPts},_0x5e520d.prototype.getSymbolName=function(){return this._symbolName};var _0x4193ee=(_0x3aeab6=!0,function(e,t){var i=_0x3aeab6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3aeab6=!1,i}),_0x5e5813=_0x4193ee(void 0,(function(){return _0x5e5813.toString().search("(((.+)+)+)+$").toString().constructor(_0x5e5813).search("(((.+)+)+)+$")})),_0x3aeab6;function _0x362083(){this._code=_0x1c668c.SYMBOL_REGULARPOLYGON,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_REGULARPOLYGON,this._symbolName=WebGLPlot.plotI18n("regularPolygon"),this._minEditPts=2,this._maxEditPts=9999}_0x5e5813(),_0x362083.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(null===t||t.length<this._minEditPts)return null;var i=[],n=t.length,r=2*Math.PI/(n+1),o=Math.PI/2,a=_0x2909c1.distance(t[0],t[n-1]),s=new WebGLPlot.Cartesian3(t[0].x+a,t[0].y,t[0].z).clone();s=_0x2909c1.rotateAngle(t[0],o,s),i.push(s.clone());for(var l=1;l<n+1;++l)s=_0x2909c1.rotateAngle(t[0],r,s),i.push(s.clone());return i.push(i[0]),new _0x4c78d5({symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON,points:i})},_0x362083.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x362083.prototype.getMinEditPts=function(){return this._minEditPts},_0x362083.prototype.getSymbolName=function(){return this._symbolName};var _0x18a725=(_0x141fd1=!0,function(e,t){var i=_0x141fd1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x141fd1=!1,i}),_0x3b6af9=_0x18a725(void 0,(function(){return _0x3b6af9.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b6af9).search("(((.+)+)+)+$")})),_0x141fd1;function _0x41bd10(){this._code=_0x1c668c.SYMBOL_RUNWAY,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_RUNWAY,this._symbolName=WebGLPlot.plotI18n("runway"),this._scalePoints=[],this._scaleValues=[],this._scaleValues.push(.2),this._minEditPts=2,this._maxEditPts=2}_0x3b6af9(),_0x41bd10.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x41bd10.prototype.getMinEditPts=function(){return this._minEditPts},_0x41bd10.prototype.getSymbolName=function(){return this._symbolName},_0x41bd10.prototype.calculateParts=function(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts||2===t.length&&_0x2909c1.isSamePt(t[0],t[1]))return null;for(var i=t[0].clone(),n=t[1].clone(),r=_0x2909c1.distance(i,n)*this._scaleValues[0],o=_0x2909c1.parallel(t,r/2),a=_0x2909c1.parallel(t,-r/2),s=180*_0x2909c1.radian(i,n)/Math.PI,l=[],u=s+90;u<=s+270;u+=10){var c=_0x2909c1.circlePoint(i,r/2,r/2,u);l.push(c)}for(var h=[],d=s-90;d<=s+90;d+=10){c=_0x2909c1.circlePoint(n,r/2,r/2,d);h.push(c)}var f=[];f=(f=(f=(f=f.concat(l)).concat(a)).concat(h)).concat(o);var p=new _0x4c78d5({points:f=_0x2909c1.clearNextSamePts(f),symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON}),_=new WebGLPlot.Cartesian3(l[0].x,l[0].y,l[0].z);return this._scalePoints.push(_),p},_0x41bd10.prototype.modifyScalePoint=function(e,t,i){if(0==t){var n=_0x2909c1.distance(i,e.points[0]),r=_0x2909c1.distance(e.points[0],e.points[1]);this._scalePoints[0]=2*n/r}};var _0x588169=(_0x5aa292=!0,function(e,t){var i=_0x5aa292?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5aa292=!1,i}),_0x32ea84=_0x588169(void 0,(function(){return _0x32ea84.toString().search("(((.+)+)+)+$").toString().constructor(_0x32ea84).search("(((.+)+)+)+$")})),_0x5aa292;function _0x5d985d(){this._code=_0x1c668c.SYMBOL_TRAPEZOID,this._libID=0,this._symbolType=_0x1c668c.SYMBOL_TRAPEZOID,this._symbolName=WebGLPlot.plotI18n("trapezoid"),this._minEditPts=3,this._maxEditPts=3}_0x32ea84(),_0x5d985d.prototype.calculateParts=function(e){if(!defined(e)||!defined(e.points))return null;var t=e.points;if(t.length<this._minEditPts)return null;t.length;var i=[],n=t[0].clone(),r=t[1].clone(),o=t[2].clone(),a=new WebGLPlot.Cartesian3(0,0,0);_0x2909c1.getTrapezoidPoints(1,o,r,n,a),i.push(n),i.push(r),i.push(o),i.push(a);var s,l=_0x2909c1.intersectLines(n,r,o,a),u=l.intersectPoint;return l.isIntersectLines&&(u.x>n.x&&u.x<r.x||u.y>n.y&&u.y<r.y||u.x<n.x&&u.x>r.x||u.y<n.y&&u.y>r.y)&&(i[0]=a,i[3]=n),4===i.length&&(i.push(i[0].clone()),s=new _0x4c78d5({symbolType:_0x1c668c.SYMBOL_ARBITRARYPOLYGON,points:i})),s},_0x5d985d.prototype.getMaxEditPts=function(){return this._maxEditPts},_0x5d985d.prototype.getMinEditPts=function(){return this._minEditPts},_0x5d985d.prototype.getSymbolName=function(){return this._symbolName};var _0xbc7073=(_0x5a4a82=!0,function(e,t){var i=_0x5a4a82?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a4a82=!1,i}),_0x3c51a3=_0xbc7073(void 0,(function(){return _0x3c51a3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c51a3).search("(((.+)+)+)+$")})),_0x5a4a82;function _0x392e98(){}_0x3c51a3(),_0x392e98.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%2525")).replace(/&/g,"%26");case Array:for(var i=[],n=0,r=t.length;n<r;n++)i.push(this.toJSON(t[n]));return"["+i.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){for(i=[],n=0,r=t.length;n<r;n++)i.push(this.toJSON(t[n]));return"["+i.join(",")+"]"}i=[];for(var o in t)"function"!=typeof t[o]&&"CLASS_NAME"!==o&&"parent"!==o&&i.push('"'+o+'":'+this.toJSON(t[o]));return i.length>0?"{"+i.join(",")+"}":"{}"}return t.toString()}},_0x392e98.geoGraphicObjectToSmlFeature=function(e,t){return WebGLPlot.defined(e)?e.getSymbolData():null},_0x392e98.smlFeatureToGeoGraphicObject=function(e,t){t.geoJsonToGeoGraphicObject(e)};var _0x5f41ef=(_0x462c22=!0,function(e,t){var i=_0x462c22?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x462c22=!1,i}),_0x8ef3b2=_0x5f41ef(void 0,(function(){return _0x8ef3b2.toString().search("(((.+)+)+)+$").toString().constructor(_0x8ef3b2).search("(((.+)+)+)+$")})),_0x462c22;function _0x483060(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.layerName=WebGLPlot.defaultValue(e.layerName,""),this.spatialAnalystUrl=WebGLPlot.defaultValue(e.spatialAnalystUrl,null),this.useCanvas2=WebGLPlot.defaultValue(e.useCanvas2,!1),this.useCanvas=WebGLPlot.defaultValue(e.useCanvas,!1),this.features=WebGLPlot.defaultValue(e.features,[])}_0x8ef3b2();var _0xde9d5c=(_0x20afc6=!0,function(e,t){var i=_0x20afc6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x20afc6=!1,i}),_0x5748d4=_0xde9d5c(void 0,(function(){return _0x5748d4.toString().search("(((.+)+)+)+$").toString().constructor(_0x5748d4).search("(((.+)+)+)+$")})),_0x20afc6;function _0x545b8d(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),WebGLPlot.Check.defined("options.url",e.url);var t=e.url,i=e.responseType,n=WebGLPlot.defaultValue(e.method,"GET"),r=e.data,o=e.headers,a=e.overrideMimeType;t=WebGLPlot.defaultValue(t,e.url);var s=WebGLPlot.defined(e.request)?e.request:new WebGLPlot.Request;return s.url=t,s.requestFunction=function(e){var l=WebGLPlot.when.defer(),u=_0x545b8d.load(WebGLPlot.defaultValue(e,t),i,n,r,o,l,a);return WebGLPlot.defined(u)&&WebGLPlot.defined(u.abort)&&(s.cancelFunction=function(){u.abort()}),l.promise},WebGLPlot.RequestScheduler.request(s)}_0x5748d4();var _0x1c8d7b=/^data:(.*?)(;base64)?,(.*)$/;function _0x902b8b(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function _0x2f3485(e,t){for(var i=_0x902b8b(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return n}function _0x2c4b6a(e,t){t=WebGLPlot.defaultValue(t,"");var i=e[1],n=!!e[2],r=e[3];switch(t){case"":case"text":return _0x902b8b(n,r);case"arraybuffer":return _0x2f3485(n,r);case"blob":var o=_0x2f3485(n,r);return new Blob([o],{type:i});case"document":return(new DOMParser).parseFromString(_0x902b8b(n,r),i);case"json":return JSON.parse(_0x902b8b(n,r));default:throw new WebGLPlot.DeveloperError("Unhandled responseType: "+t)}}_0x545b8d.load=function(e,t,i,n,r,o,a){var s=_0x1c8d7b.exec(e);if(null===s){var l=new XMLHttpRequest;if(WebGLPlot.TrustedServers.contains(e)&&(l.withCredentials=!0),WebGLPlot.defined(a)&&WebGLPlot.defined(l.overrideMimeType)&&l.overrideMimeType(a),l.open(i,e,!0),WebGLPlot.defined(r))for(var u in r)r.hasOwnProperty(u)&&l.setRequestHeader(u,r[u]);WebGLPlot.defined(t)&&(l.responseType=t);var c=!1;return"string"==typeof e&&(c=0===e.indexOf("file://")),l.onload=function(){if(!(l.status<200||l.status>=300)||c&&0===l.status){var e=l.response,i=l.responseType;if(!WebGLPlot.defined(e)||WebGLPlot.defined(t)&&i!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===i||"document"===i)&&WebGLPlot.defined(l.responseXML)&&l.responseXML.hasChildNodes()?o.resolve(l.responseXML):""!==i&&"text"!==i||!WebGLPlot.defined(l.responseText)?o.reject(new WebGLPlot.RuntimeError("Invalid XMLHttpRequest response type.")):o.resolve(l.responseText);else o.resolve(e)}else o.reject(new WebGLPlot.RequestErrorEvent(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){o.reject(new WebGLPlot.RequestErrorEvent)},l.send(n),l}o.resolve(_0x2c4b6a(s,t))},_0x545b8d.defaultLoad=_0x545b8d.load;var _0x103584=(_0x19afe7=!0,function(e,t){var i=_0x19afe7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x19afe7=!1,i}),_0x3441f3=_0x103584(void 0,(function(){return _0x3441f3.toString().search("(((.+)+)+)+$").toString().constructor(_0x3441f3).search("(((.+)+)+)+$")})),_0x19afe7;function _0x2d198d(e,t,i){return _0x545b8d({url:e,headers:t,request:i})}_0x3441f3();var _0x245251=(_0x4fbb25=!0,function(e,t){var i=_0x4fbb25?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4fbb25=!1,i}),_0x36abc8=_0x245251(void 0,(function(){return _0x36abc8.toString().search("(((.+)+)+)+$").toString().constructor(_0x36abc8).search("(((.+)+)+)+$")})),_0x4fbb25;_0x36abc8();var _0x4bb626={Accept:"application/json,*/*;q=0.01"};function _0x386520(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("url is required.");WebGLPlot.defined(t)?WebGLPlot.defined(t.Accept)||((t=WebGLPlot.clone(t)).Accept=_0x4bb626.Accept):t=_0x4bb626;var n=_0x2d198d(e,t,i);if(WebGLPlot.defined(n))return n.then((function(e){return JSON.parse(e)}))}var _0x5366dd=(_0x2ba86e=!0,function(e,t){var i=_0x2ba86e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2ba86e=!1,i}),_0x33e6ef=_0x5366dd(void 0,(function(){return _0x33e6ef.toString().search("(((.+)+)+)+$").toString().constructor(_0x33e6ef).search("(((.+)+)+)+$")})),_0x2ba86e;function _0x102a68(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.smlInfo=WebGLPlot.defaultValue(e.smlInfo,void 0),this.mapInfo=WebGLPlot.defaultValue(e.mapInfo,""),this.layerDatas=WebGLPlot.defaultValue(e.layerDatas,void 0)}_0x33e6ef(),_0x102a68.prototype.destory=function(){this.smlInfo=null,this.mapInfo=null,this.layerDatas=null};var _0xa2fe75=(_0x144cba=!0,function(e,t){var i=_0x144cba?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x144cba=!1,i}),_0x30bf76=_0xa2fe75(void 0,(function(){return _0x30bf76.toString().search("(((.+)+)+)+$").toString().constructor(_0x30bf76).search("(((.+)+)+)+$")})),_0x144cba;function _0x1e67d8(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.smlName=WebGLPlot.defaultValue(e.smlName,""),this.smlDesc=WebGLPlot.defaultValue(e.smlDesc,""),this.smlSeclevel=WebGLPlot.defaultValue(e.smlSeclevel,""),this.smlDepat=WebGLPlot.defaultValue(e.smlDepat,""),this.smlAuthor=WebGLPlot.defaultValue(e.smlAuthor,""),this.smlTime=WebGLPlot.defaultValue(e.smlTime,"")}_0x30bf76(),_0x1e67d8.prototype.fromJSON=function(e){this.smlName=e.SMLName,this.smlDesc=e.SMLDesc,this.smlSeclevel=e.SMLSeclevel,this.smlDepat=e.SMLDepat,this.smlAuthor=e.SMLAuthor,this.smlTime=e.SMLTime},_0x1e67d8.prototype.toJSON=function(){return'{"SMLName":'+WebGLPlot.toJSON(this.smlName)+',"SMLDesc":'+WebGLPlot.toJSON(this.smlDesc)+',"SMLSeclevel":'+WebGLPlot.toJSON(this.smlSeclevel)+',"SMLDepat":'+WebGLPlot.toJSON(this.smlDepat)+',"SMLAuthor":'+WebGLPlot.toJSON(this.smlAuthor)+',"SMLTime":'+WebGLPlot.toJSON(this.smlTime)+"}"},_0x1e67d8.prototype.destroy=function(){this.smlName="",this.smlDesc="",this.smlAuthor="",this.smlSeclevel="",this.smlDepat="",this.smlTime=""};var _0x4824e8=(_0x1fd86b=!0,function(e,t){var i=_0x1fd86b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1fd86b=!1,i}),_0x14cf12=_0x4824e8(void 0,(function(){return _0x14cf12.toString().search("(((.+)+)+)+$").toString().constructor(_0x14cf12).search("(((.+)+)+)+$")})),_0x1fd86b;_0x14cf12();var WebGLPlot$9=window.WebGLPlot=window.WebGLPlot||{},_0x177c60=new Map;function _0x1c2819(e){e=WebGLPlot$9.defaultValue(e,WebGLPlot$9.defaultValue.EMPTY_OBJECT),this._scene=WebGLPlot$9.defaultValue(e.scene,void 0),this._serverUrl=WebGLPlot$9.defaultValue(e.serverUrl,""),this._smlInfo=WebGLPlot$9.defaultValue(e.smlInfo,new _0x1e67d8),this._smlFileName=WebGLPlot$9.defaultValue(e.smlFileName,"situationMap"),this._sitData=WebGLPlot$9.defaultValue(e.sitData,new _0x102a68),this._openSmlFileCompleted=new WebGLPlot$9.Event,this._openSmlFileFailed=new WebGLPlot$9.Event,this._saveSmlFileCompleted=new WebGLPlot$9.Event,this._saveSmlFileFailed=new WebGLPlot$9.Event,this._getSmlInfosCompleted=new WebGLPlot$9.Event,this._getSmlInfosFailed=new WebGLPlot$9.Event,this._getSmlInfoCompleted=new WebGLPlot$9.Event,this._getSmlInfoFailed=new WebGLPlot$9.Event,this._deleteSmlFileCompleted=new WebGLPlot$9.Event,this._deleteSmlFileFailed=new WebGLPlot$9.Event,this._openLocalSmlFileCompleted=new WebGLPlot$9.Event,this._openLocalSmlFileFailed=new WebGLPlot$9.Event,this._addSmlFileCompleted=new WebGLPlot$9.Event,this._addSmlFileFailed=new WebGLPlot$9.Event,this._addSmlFileToLayerCompleted=new WebGLPlot$9.Event,this._addSmlFileToLayerFailed=new WebGLPlot$9.Event,this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},e.options&&e.options.serviceParams&&_0x2909c1.extend(this.options,e.options)}_0x1c2819.getInstance=function(e){let t;return e.scene&&(t=_0x177c60.get(e.scene._plottingID)),WebGLPlot$9.defined(e)&&!WebGLPlot$9.defined(t)&&(t=new WebGLPlot$9.SitDataManager(e),_0x177c60.set(e.scene._plottingID,t)),t},_0x1c2819.prototype.openJsonSitData=function(e,t){!WebGLPlot$9.defined(e)||null===e||((!WebGLPlot$9.defined(t)||""===t)&&(t="situationMap"),this._getCompletedInit(e,t))},_0x1c2819.prototype.openAndUploadLocalSmlFile=function(e){var t=this;this.uploadSmlFile((function(i){i.success?t.openSmlFileOnServer(i.smlFileName,e):t._openSmlFileFailed.raiseEvent()}))},_0x1c2819.prototype.openLocalSmlFile=function(){if(!window.FileReader)return;let e=document.createElement("input");e.setAttribute("type","file"),e.click(),e.onchange=function(){if(!e.files||0===e.files.length)return;let t=e.files[0].name;var i=new FileReader;i.readAsText(e.files[0]),i.onloadstart=function(e){(e.total>=5242880||e.total<=0)&&_self._openLocalSmlFileFailed.raiseEvent()},i.onerror=function(e){_self._openLocalSmlFileFailed.raiseEvent()},i.onloadend=function(){_self._openLocalSmlFileCompleted.raiseEvent()},i.onload=function(i){self._getCompletedInit(JSON.parse(i.target.result),t),e.remove()}}},_0x1c2819.prototype.addLocalSmlFile=function(e){var t=this;this.uploadSmlFile((function(i){if(!i.success)throw new WebGLPlot$9.DeveloperError("uploadSmlFile failed!!!");t.addSmlFileOnServer(i.smlFileName,e)}))},_0x1c2819.prototype.uploadSmlFile=function(e){if(!window.FileReader)return;let t=document.createElement("input");t.setAttribute("type","file"),t.click();var i=this;t.onchange=function(){if(!t.files||0===t.files.length)return;const n=t.files[0].name.split(".")[0];var r=new FileReader;r.readAsText(t.files[0]),r.onload=function(r){var o=WebGLPlot$9.smlFileService(i._serverUrl,i.options.serviceParams);if(!o)return;let a=JSON.parse(r.target.result);var s=o.editSmlFileParams;s.method="POST",s.sitData=a,s.smlFileName=n,s.isCover=!0,o.smlFileService.editSMLFile(s,(function(t){t.result.succeed&&"function"==typeof e?e({success:!0,smlFileName:n,message:"success"}):"function"==typeof e&&e({success:!1,message:"failed"})}),i),t.remove()}}},_0x1c2819.prototype.addSmlFileToLayer=function(e){var t=this;this.uploadSmlFile((function(i){i.success?t.addSmlFileToLayerOnServer(i.smlFileName,e):t._addSmlFileToLayerFailed.raiseEvent()}))},_0x1c2819.prototype.addSmlFileOnServer=function(e,t){var i=this,n=this._scene;var r=WebGLPlot$9.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?function(e){if(WebGLPlot$9.defined(e)){for(var r=e.layerDatas,o=null,a=0;a<r.length;++a)if(null!==r[a].layerName){var s=_0x2909c1.getPlotLayers(n);if(null===s)return;o=s.find(r[a].layerName),t&&!WebGLPlot$9.defined(o)&&(o=new _0x394df6(n,r[a].layerName),s.add(o)),WebGLPlot$9.defined(o)&&i._load(r[a],o)}null!==o?i._addSmlFileCompleted.raiseEvent():i._addSmlFileFailed.raiseEvent()}}(e.result):i._addSmlFileFailed.raiseEvent()}),this)}},_0x1c2819.prototype.addSmlFileToLayerOnServer=function(e,t){var i=this,n=this._scene;var r=WebGLPlot$9.smlFileService(this._serverUrl,this.options.serviceParams);if(r){var o=r.editSmlFileParams;o.method="GET",o.smlFileName=e,r.smlFileService.editSMLFile(o,(function(e){e.result.succeed?function(e){if(WebGLPlot$9.defined(e)){var r,o=e.layerDatas,a=_0x2909c1.getPlotLayers(n);r=a.find(t),WebGLPlot$9.defined(r)||(r=new _0x394df6(n,t),a.add(r));for(var s=0;s<o.length;++s)i._load(o[s],r);i._addSmlFileToLayerCompleted.raiseEvent()}}(e.result):i._addSmlFileToLayerFailed.raiseEvent()}),this)}},_0x1c2819.prototype.downloadSmlFileUrl=function(e){return"smlFileDownload/"+e+".sml"},_0x1c2819.prototype.openSmlFileOnServer=function(e,t){var i=this;var n=WebGLPlot$9.smlFileService(this._serverUrl,this.options.serviceParams);if(n){var r=n.editSmlFileParams;r.method="GET",r.smlFileName=e,n.smlFileService.editSMLFile(r,(function(n){var r;n.result&&n.result.succeed?(r=n.result,i._getCompletedInit(r,e),"function"==typeof t&&t({success:!0,smlFileName:e,sitDataLayers:i.getPlottingLayers()})):(i._openSmlFileFailed.raiseEvent(),"function"==typeof t&&t({success:!1,message:"Open failed"}))}),this)}},_0x1c2819.prototype.deleteSmlFileOnServer=function(e){var t=this;var i={smlFileName:e},n=this.buildUrl(i);n+="?isCover=false";var r=WebGLPlot$9.EditSmlFile(n,this.options.serviceParams);if(r){var o=r.editSmlFile;o.events.on({processCompleted:function(e){t._deleteSmlFileCompleted.raiseEvent()},processFailed:function(e){t._deleteSmlFileFailed.raiseEvent()},scope:this});var a=r.editSmlFileParams;a.method="DELETE",a.smlFileName=e,o.processAsync(a)}},_0x1c2819.prototype.updateLayerData=function(e){if(WebGLPlot$9.defined(this._sitData)&&WebGLPlot$9.defined(this._sitData.layerDatas))for(var t=0;t<this._sitData.layerDatas.length;++t)if(e._name==this._sitData.layerDatas[t].layerName){for(var i=this._sitData.layerDatas[t],n=[],r=e.geoGraphicObjects,o=0;o<r.length;++o){var a,s=r[o];a=_0x392e98.geoGraphicObjectToSmlFeature(s,s.feature),n.push(a)}i.features=n,i.isEditable=e.isEditable,i.isLocked=e.isLocked,i.isSelected=e.isSelected,i.vivibility=e.visibility}},_0x1c2819.prototype.getSmlInfos=function(e,t){var i=this;var n=e*t,r=t,o=i._serverUrl,a=o.substr(o.length-1,1);o+="/"===a?"smlInfos":"/smlInfos",o+=".json",_0x386520(o+="?start="+n+"&count="+r).then((function(e){var t;t=e,i._getSmlInfosCompleted.raiseEvent(t)}),(function(e){var t;t=e,i._getSmlInfosFailed.raiseEvent(t)}))},_0x1c2819.prototype.getSmlInfo=function(e){this._scene;var t={smlFileName:e};_0x386520(this.buildUrl(t)).then((function(e){!function(e){this._getSmlInfoCompleted.raiseEvent(e.smlInfo)}(e)}),(function(e){!function(e){this._getSmlInfoFailed.raiseEvent(null)}()}))},_0x1c2819.prototype.saveAsSmlFile=function(e){this._save(e,!0)},_0x1c2819.prototype.newSmlFile=function(){this._smlFileName="",this._smlInfo.destroy();for(var e,t=_0x2909c1.getPlotLayers(this._scene),i=0;i<t._layerQueue.length;++i)(e=t.findByIndex(i))instanceof _0x394df6&&t.remove(e._name);_0x4786d3.removeAll(this._scene)},_0x1c2819.prototype._getCompletedInit=function(e,t){this._smlFileName=t,this.openSitDataFromJson(e)},_0x1c2819.prototype.openSitDataFromJson=function(e){this._smlInfo.fromJSON(e.smlInfo),e.mapInfo&&(this._sitData.mapInfo=e.mapInfo),this._sitData.layerDatas=e.layerDatas;var t=e.layerDatas,i=this._scene,n=_0x2909c1.getPlotLayers(i);if(null!==n){for(var r,o=n._layerQueue.length,a=0;a<o;){var s=n.findByIndex(a);s instanceof _0x394df6?(s._removeAll(!0),n.remove(s._name),o--):a++}for(var l=0;l<t.length;++l)r=new _0x394df6(i,t[l].layerName),n.add(r),this._load(t[l],r),void 0!==t[l].isEditable&&null!==t[l].isEditable&&(r._isEditable=t[l].isEditable),void 0!==t[l].isSelected&&null!==t[l].isSelected&&(r._isSelected=t[l].isSelected),void 0!==t[l].isLocked&&null!==t[l].isLocked&&(r.isLocked=t[l].isLocked),void 0!==t[l].visibility&&null!==t[l].visibility&&(r.visibility=t[l].visibility),WebGLPlot$9.defined(t[l]._bIsUseDepthTest)&&r.setUseDepthTest(t[l]._bIsUseDepthTest);this._openSmlFileCompleted.raiseEvent(e)}},_0x1c2819.prototype._load=function(e,t){for(var i=0,n=e.features.length;i<n;++i){var r=e.features[i];null!==r&&(r.hasOwnProperty("isEdit")||(r.isEdit=!0),_0x392e98.smlFeatureToGeoGraphicObject(r,t))}},_0x1c2819.prototype.saveSmlFile=function(e,t){WebGLPlot$9.defined(e)||(e=this.smlFileName),WebGLPlot$9.defined(t)||(t=!0),this._save(e,t)},_0x1c2819.prototype._save=function(e,t){_0x25263a.getInstance({scene:this._scene}).reset();var i=this;function n(e){var t,n;e?(n=e,i._saveSmlFileCompleted.raiseEvent(n)):i._saveSmlFileFailed.raiseEvent(t)}var r=i._serverUrl,o=WebGLPlot$9.smlFileService(r,this.options.serviceParams);if(o){var a=o.editSmlFileParams;a.method="POST",a.sitData=this.saveSitData(),a.smlFileName=e,a.isCover=t,o.smlFileService.editSMLFile(a,(function(e){e.result.succeed?n({success:!0}):n({success:!1})}),this)}},_0x1c2819.prototype.saveSitData=function(){var e=this._scene,t=new _0x102a68;t.smlInfo=this._smlInfo,this._sitData.mapInfo?t.mapInfo=this._sitData.mapInfo:t.mapInfo={zoom:4,centerX:112.5,centerY:36.5},t.layerDatas=[];var i=_0x2909c1.getPlotLayers(e);if(null===i)return t;for(var n,r,o=0;o<i._layerQueue.length;++o)if((n=i.findByIndex(o))instanceof _0x394df6){(r=new _0x483060).layerName=n._name,r.spatialAnalystUrl=WebGLPlot$9.defaultValue(n.spatialAnalystUrl,null),r.useCanvas=!0,r.isEditable=n.isEditable,r.isLocked=n.isLocked,r.isSelected=n.isSelected,r.visibility=n.visibility,r._bIsUseDepthTest=n._bIsUseDepthTest;for(var a=0;a<n.geoGraphicObjects.length;++a){var s=_0x392e98.geoGraphicObjectToSmlFeature(n.geoGraphicObjects[a]);r.features.push(s)}t.layerDatas.push(r)}return t},_0x1c2819.prototype.getPlottingLayers=function(){for(var e=[],t=this._scene,i=_0x2909c1.getPlotLayers(t),n=0;n<i._layerQueue.length;++n){var r=i.findByIndex(n);r instanceof _0x394df6&&e.push(r)}return e},_0x1c2819.prototype.buildUrl=function(e){var t=this._serverUrl,i=t.substr(t.length-1,1);t+="/"===i?"smlInfos/":"/smlInfos/";var n=e.smlFileName,r=RegExp(/./);return n.match(r)&&(n=n.split(".")[0]),t+=n+".json"},Object.defineProperties(_0x1c2819.prototype,{scene:{get:function(){return this._scene}},serverUrl:{get:function(){return this._serverUrl}},smlInfo:{get:function(){return this._smlInfo},set:function(e){e!==this._smlInfo&&(this._smlInfo=e)}},smlFileName:{get:function(){return this._smlFileName},set:function(e){e!==this._smlFileName&&(this._smlFileName=e)}},openSmlFileCompleted:{get:function(){return this._openSmlFileCompleted}},openSmlFileFailed:{get:function(){return this._openSmlFileFailed}},saveSmlFileFailed:{get:function(){return this._saveSmlFileFailed}},saveSmlFileCompleted:{get:function(){return this._saveSmlFileCompleted}},getSmlInfosCompleted:{get:function(){return this._getSmlInfosCompleted}},getSmlInfosFailed:{get:function(){return this._getSmlInfosFailed}},getSmlInfoCompleted:{get:function(){return this._getSmlInfoCompleted}},getSmlInfoFailed:{get:function(){return this._getSmlInfoFailed}},openLocalSmlFileCompleted:{get:function(){return this._openLocalSmlFileCompleted}},openLocalSmlFileFailed:{get:function(){return this._openLocalSmlFileFailed}},addSmlFileToLayerCompleted:{get:function(){return this._addSmlFileToLayerCompleted}},addSmlFileToLayerFailed:{get:function(){return this._addSmlFileToLayerFailed}},addSmlFileCompleted:{get:function(){return this._addSmlFileCompleted}},addSmlFileFailed:{get:function(){return this._addSmlFileFailed}},deleteSmlFileCompleted:{get:function(){return this._deleteSmlFileCompleted}},deleteSmlFileFailed:{get:function(){return this._deleteSmlFileFailed}}}),WebGLPlot$9.SitDataManager=_0x1c2819;var _0x556e86=(_0x2e74f3=!0,function(e,t){var i=_0x2e74f3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e74f3=!1,i}),_0x2bddce=_0x556e86(void 0,(function(){return _0x2bddce.toString().search("(((.+)+)+)+$").toString().constructor(_0x2bddce).search("(((.+)+)+)+$")})),_0x2e74f3;function _0x10cb0b(e){this.style=this.getDefaultStyle(),this.viewer=e,this.rainStage=null,this.snowStage=null}_0x2bddce(),_0x10cb0b.prototype.smoke=function(e,t){var i=this.createSmokeSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x10cb0b.prototype.flame=function(e,t){var i=this.createFlameSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x10cb0b.prototype.blast=function(e,t){var i=this.createBlastSystem(e,t);return this.viewer.scene.primitives.add(i),i},_0x10cb0b.prototype.removeEfficiency=function(e){this.viewer.scene.primitives.remove(e)},_0x10cb0b.prototype.startRain=function(){this.rain()},_0x10cb0b.prototype.stopRain=function(){null!==this.rainStage&&(this.viewer.scene.postProcessStages.remove(this.rainStage),this.rainStage=null)},_0x10cb0b.prototype.startSnow=function(){this.snow()},_0x10cb0b.prototype.stopSnow=function(){null!==this.snowStage&&(this.viewer.scene.postProcessStages.remove(this.snowStage),this.snowStage=null)},_0x10cb0b.prototype.rain=function(){if(null===this.rainStage){var e=new Cesium.PostProcessStage({name:"czm_rain",fragmentShader:"uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n \n float hash(float x){\n return fract(sin(x*133.3)*13.13);\n }\n \n void main(void){\n \n float time = czm_frameNumber / 60.0;\n vec2 resolution = czm_viewport.zw;\n \n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 c=vec3(.6,.7,.8);\n \n float a=-.4;\n float si=sin(a),co=cos(a);\n uv*=mat2(co,-si,si,co);\n uv*=length(uv+vec2(0,4.9))*.3+1.;\n \n float v=1.-sin(hash(floor(uv.x*100.))*100.);\n float b=clamp(abs(sin(15.*time*v+uv.y*(10./(2.+v))))-.95,0.,1.)*4.;\n c*=v*b; \n \n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c,1), 0.5); \n }\n"});this.viewer.scene.postProcessStages.add(e),this.rainStage=e}},_0x10cb0b.prototype.snow=function(){if(null===this.snowStage){var e=new Cesium.PostProcessStage({name:"czm_snow",fragmentShader:"uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n \n float snow(vec2 uv,float scale)\n {\n float time = czm_frameNumber / 60.0;\n float w=smoothstep(1.,0.,-uv.y*(scale/10.));if(w<.1)return 0.;\n uv+=time/scale;uv.y+=time*2./scale;uv.x+=sin(uv.y+time*.5)/scale;\n uv*=scale;vec2 s=floor(uv),f=fract(uv),p;float k=3.,d;\n p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;d=length(p);k=min(d,k);\n k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\n return k*w;\n }\n \n void main(void){\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 finalColor=vec3(0);\n float c = 0.0;\n c+=snow(uv,30.)*.0;\n c+=snow(uv,20.)*.0;\n c+=snow(uv,15.)*.0;\n c+=snow(uv,10.);\n c+=snow(uv,8.);\n c+=snow(uv,6.);\n c+=snow(uv,5.);\n finalColor=(vec3(c)); \n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.5); \n \n }\n "});this.viewer.scene.postProcessStages.add(e),this.snowStage=e}},_0x10cb0b.prototype.createSmokeSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:new WebGLPlot.Color(0,0,0,.6),endColor:new WebGLPlot.Color(0,0,0,0),startScale:this.style.startScale,endScale:this.style.endScale,minimumParticleLife:this.style.minimumParticleLife,maximumParticleLife:this.style.maximumParticleLife,minimumSpeed:this.style.minimumSpeed,maximumSpeed:this.style.maximumSpeed,imageSize:new WebGLPlot.Cartesian2(this.style.particleSize,this.style.particleSize),emissionRate:this.style.emissionRate,lifetime:16,emitter:new WebGLPlot.CircleEmitter(5),sizeInMeters:!0,performance:!1,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x10cb0b.prototype.createFlameSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:new WebGLPlot.Color(1,1,1,1),endColor:new WebGLPlot.Color(.5,0,0,0),startScale:this.style.startScale,endScale:1.5,minimumParticleLife:this.style.minimumParticleLife,maximumParticleLife:this.style.maximumParticleLife,minimumSpeed:this.style.minimumSpeed,maximumSpeed:this.style.maximumSpeed,imageSize:new WebGLPlot.Cartesian2(2,2),emissionRate:this.style.emissionRate,lifetime:16,loop:!0,emitter:new WebGLPlot.ConeEmitter(.785398185),sizeInMeters:!0,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x10cb0b.prototype.createBlastSystem=function(e,t){var i=this.viewer.entities.add({position:WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z)});return new WebGLPlot.ParticleSystem({image:e,startColor:WebGLPlot.Color.RED.withAlpha(.7),endColor:WebGLPlot.Color.YELLOW.withAlpha(.3),startScale:1,endScale:2,particleLife:1,speed:5,imageSize:new WebGLPlot.Cartesian2(2,2),emissionRate:50,lifetime:5,loop:!0,emitter:new WebGLPlot.BoxEmitter(new WebGLPlot.Cartesian3(1,1,1)),sizeInMeters:!0,modelMatrix:this.computeModelMatrix(i,WebGLPlot.JulianDate.now()),emitterModelMatrix:this.computeEmitterModelMatrix()})},_0x10cb0b.prototype.getDefaultStyle=function(e){return{fireImage:e,startScale:0,endScale:1.5,minimumParticleLife:1.5,maximumParticleLife:1.8,minimumSpeed:7,maximumSpeed:9,particleSize:2,emissionRate:200}},_0x10cb0b.prototype.computeModelMatrix=function(e,t){var i=WebGLPlot.Property.getValueOrUndefined(e.position,t,new WebGLPlot.Cartesian3);if(WebGLPlot.defined(i)){var n=WebGLPlot.Property.getValueOrUndefined(e.orientation,t,new WebGLPlot.Quaternion);if(WebGLPlot.defined(n))r=WebGLPlot.Matrix4.fromRotationTranslation(WebGLPlot.Matrix3.fromQuaternion(n,new WebGLPlot.Matrix3),i,new WebGLPlot.Matrix4);else var r=WebGLPlot.Transforms.eastNorthUpToFixedFrame(i,void 0,new WebGLPlot.Matrix4);return r}},_0x10cb0b.prototype.computeEmitterModelMatrix=function(){var e=WebGLPlot.HeadingPitchRoll.fromDegrees(0,0,0,new WebGLPlot.HeadingPitchRoll),t=new WebGLPlot.TranslationRotationScale;return t.translation=WebGLPlot.Cartesian3.fromElements(2.5,4,1,new WebGLPlot.Cartesian3),t.rotation=WebGLPlot.Quaternion.fromHeadingPitchRoll(e,new WebGLPlot.Quaternion),WebGLPlot.Matrix4.fromTranslationRotationScale(t,new WebGLPlot.Matrix4)};var _0x3cd34a=(_0x3c6f5f=!0,function(e,t){var i=_0x3c6f5f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3c6f5f=!1,i}),_0x34b7bd=_0x3cd34a(void 0,(function(){return _0x34b7bd.toString().search("(((.+)+)+)+$").toString().constructor(_0x34b7bd).search("(((.+)+)+)+$")})),_0x3c6f5f;_0x34b7bd();var _0x5375f6={u_globeMinimumAltitude:function(){return 55e3}};function _0x5c1673(e){var t=(e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT)).appearance,i=e.geometryInstances;if(!WebGLPlot.defined(t)&&WebGLPlot.defined(i))for(var n=Array.isArray(i)?i:[i],r=n.length,o=0;o<r;o++){var a=n[o].attributes;if(WebGLPlot.defined(a)&&WebGLPlot.defined(a.color)){t=new WebGLPlot.PerInstanceColorAppearance({flat:!0});break}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=WebGLPlot.defaultValue(e.show,!0),this.classificationType=WebGLPlot.defaultValue(e.classificationType,WebGLPlot.ClassificationType.BOTH),this.debugShowBoundingVolume=WebGLPlot.defaultValue(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=WebGLPlot.defaultValue(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._readyPromise=WebGLPlot.when.defer(),this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=WebGLPlot.defaultValue(e.maxTerrainHeight,WebGLPlot.ApproximateTerrainHeights._defaultMaxTerrainHeight),this._minTerrainHeight=WebGLPlot.defaultValue(e.minTerrainHeight,WebGLPlot.ApproximateTerrainHeights._defaultMinTerrainHeight),this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:WebGLPlot.defaultValue(e.vertexCacheOptimize,!1),interleave:WebGLPlot.defaultValue(e.interleave,!1),releaseGeometryInstances:WebGLPlot.defaultValue(e.releaseGeometryInstances,!0),allowPicking:WebGLPlot.defaultValue(e.allowPicking,!0),asynchronous:WebGLPlot.defaultValue(e.asynchronous,!0),compressVertices:WebGLPlot.defaultValue(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:_0x5375f6,classificationType:this.classificationType}}function _0x132895(e){return function(t,i){return e._maxTerrainHeight}}function _0xa7ebb1(e){return function(t,i){return e._minHeight}}Object.defineProperties(_0x5c1673.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),_0x5c1673.isSupported=WebGLPlot.ClassificationPrimitive.isSupported;var _0x437e2d=new WebGLPlot.Cartesian3,_0x597fb7=new WebGLPlot.Cartesian3,_0x3792b6=new WebGLPlot.Cartesian3,_0x5e7fb0=new WebGLPlot.Cartographic,_0x4ad76e=new WebGLPlot.Rectangle;function _0x247de1(e,t){var i=e.mapProjection.ellipsoid;if(!WebGLPlot.defined(t.attributes)||!WebGLPlot.defined(t.attributes.position3DHigh))return WebGLPlot.defined(t.rectangle)?t.rectangle:void 0;for(var n=t.attributes.position3DHigh.values,r=t.attributes.position3DLow.values,o=n.length,a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=0;c<o;c+=3){var h=WebGLPlot.Cartesian3.unpack(n,c,_0x437e2d),d=WebGLPlot.Cartesian3.unpack(r,c,_0x597fb7),f=WebGLPlot.Cartesian3.add(h,d,_0x3792b6),p=i.cartesianToCartographic(f,_0x5e7fb0),_=p.latitude,m=p.longitude;a=Math.min(a,_),s=Math.min(s,m),l=Math.max(l,_),u=Math.max(u,m)}var g=_0x4ad76e;return g.north=l,g.south=a,g.east=u,g.west=s,g}function _0x15b5dc(e,t,i){var n=t.mapProjection.ellipsoid,r=_0x247de1(t,i);if(e.geometryInstances){var o=Number.MIN_VALUE,a=Number.MAX_VALUE,s=!1;for(let t=0;t<e.geometryInstances.length>0;t++){var l=e.geometryInstances[t].geometry._groundBottomAltitude,u=e.geometryInstances[t].geometry._groundExtrudedHeight;if(WebGLPlot.defined(l)&&WebGLPlot.defined(u)){var c=l+u;o=Math.max(o,c),a=Math.min(a,l),s=!0}}e._maxHeight=s?o:e._maxHeight,e._minHeight=s?a:e._minHeight}var h=(Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances])[0].geometry._granularity,d=WebGLPlot.OrientedBoundingBox.fromRectangle(r,_0xa7ebb1(e)(h,n),_0x132895(e)(h,n),n);if(e._boundingVolumes.push(d),!t.scene3DOnly){var f=t.mapProjection,p=WebGLPlot.BoundingSphere.fromRectangleWithHeights2D(r,f,e._maxHeight,e._minHeight);WebGLPlot.Cartesian3.fromElements(p.center.z,p.center.x,p.center.y,p.center),e._boundingVolumes2D.push(p)}}function _0x42dbde(e,t){return Math.floor(e%t/3)}function _0x10d472(e,t,i,n,r,o,a){var s=e._primitive;i.mode!==WebGLPlot.SceneMode.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&t.derivedCommands&&t.derivedCommands.appearance2D&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=a,i.commandList.push(t)}function _0x1f21a5(e,t,i,n,r,o){var a=e._primitive;i.mode!==WebGLPlot.SceneMode.SCENE3D&&t.shaderProgram===a._spPick&&a._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=n,t.boundingVolume=o,t.cull=r,i.commandList.push(t)}function _0x50cc66(e,t,i,n,r,o,a,s){var l;l=t.mode===WebGLPlot.SceneMode.SCENE3D?e._boundingVolumes:e._boundingVolumes2D;var u,c,h=e.classificationType,d=h!==WebGLPlot.ClassificationType.CESIUM_3D_TILE&&h!==WebGLPlot.ClassificationType.S3M_TILE,f=h!==WebGLPlot.ClassificationType.TERRAIN&&h!==WebGLPlot.ClassificationType.S3M_TILE,p=h!==WebGLPlot.ClassificationType.TERRAIN&&h!==WebGLPlot.ClassificationType.CESIUM_3D_TILE,_=t.passes,m=e._primitive;if(_.render){var g=i.length;for(u=0;u<g;++u)c=l[_0x42dbde(u,g)],d&&_0x10d472(e,i[u],t,r,o,c,a),f&&_0x10d472(e,i[u].derivedCommands.tileset,t,r,o,c,a),p&&_0x10d472(e,i[u].derivedCommands.s3mtiles,t,r,o,c,a);if(t.invertClassification){var x=m._commandsIgnoreShow,y=x.length;for(u=0;u<y;++u)c=l[Math.floor(u/2)],_0x10d472(e,x[u],t,r,o,c,a)}}if(_.pick){var v,$=n.length;for(e._useFragmentCulling||(v=m._primitive._pickOffsets),u=0;u<$;++u){if(c=l[_0x42dbde(u,$)],!e._useFragmentCulling)c=l[v[_0x42dbde(u,$)].index];d&&_0x1f21a5(e,n[u],t,r,o,c),f&&_0x1f21a5(e,n[u].derivedCommands.tileset,t,r,o,c),p&&_0x10d472(e,n[u].derivedCommands.s3mtiles,t,r,o,c,a)}}}_0x5c1673.initializeTerrainHeights=function(){return WebGLPlot.ApproximateTerrainHeights.initialize()},_0x5c1673.prototype.update=function(e){if(WebGLPlot.defined(this._primitive)||WebGLPlot.defined(this.geometryInstances)){if(!WebGLPlot.ApproximateTerrainHeights.initialized){if(!this.asynchronous)throw new WebGLPlot.DeveloperError("For synchronous GroundPrimitives, you must call PlotGroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");return void _0x5c1673.initializeTerrainHeights()}var t=this,i=this._classificationPrimitiveOptions;if(!WebGLPlot.defined(this._primitive)){var n,r,o,a,s,l=e.mapProjection.ellipsoid,u=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=u.length,h=new Array(c);for(a=0;a<c;++a){var d=_0x247de1(e,r=(n=u[a]).geometry);WebGLPlot.defined(s)?WebGLPlot.defined(d)&&WebGLPlot.Rectangle.union(s,d,s):s=WebGLPlot.Rectangle.clone(d);var f=n.id;if(WebGLPlot.defined(f)&&WebGLPlot.defined(d)){var p=WebGLPlot.ApproximateTerrainHeights.getBoundingSphere(d,l);this._boundingSpheresKeys.push(f),this._boundingSpheres.push(p)}if(o=r.constructor,!WebGLPlot.defined(o)||!WebGLPlot.defined(o.createShadowVolume))throw new WebGLPlot.DeveloperError("Not all of the geometry instances have PlotGroundPrimitive support.")}var _=e.terrainExaggeration;this._minHeight=this._minTerrainHeight*_,this._maxHeight=this._maxTerrainHeight*_;var m=_0x5c1673._supportsMaterials(e.context);if(this._useFragmentCulling=m,m){var g,x=!0;for(a=0;a<c;++a)if(s=_0x247de1(e,r=(n=u[a]).geometry),WebGLPlot.ShadowVolumeAppearance.shouldUseSphericalCoordinates(s)){x=!1;break}for(a=0;a<c;++a){o=(r=(n=u[a]).geometry).constructor;var y=_0x247de1(e,r),v=r.textureCoordinateRotationPoints,$=e.context.floatTextureSixPlaces;g=x?WebGLPlot.ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes(y,v,l,e.mapProjection,$,this._maxHeight):WebGLPlot.ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes(y,v,l,e.mapProjection,$);var b=n.attributes;for(var T in b)b.hasOwnProperty(T)&&(g[T]=b[T]);n.created?h[a]=new WebGLPlot.GeometryInstance({geometry:n._groundGeometry,attributes:g,id:n.id}):(h[a]=new WebGLPlot.GeometryInstance({geometry:o.createShadowVolume(r,_0xa7ebb1(this),_0x132895(this)),attributes:g,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0)}}else for(a=0;a<c;++a)o=(r=(n=u[a]).geometry).constructor,n.created?h[a]=new WebGLPlot.GeometryInstance({geometry:r,attributes:n.attributes,id:n.id}):(h[a]=new WebGLPlot.GeometryInstance({geometry:o.createShadowVolume(r,_0xa7ebb1(this),_0x132895(this)),attributes:n.attributes,id:n.id}),n._groundGeometry=h[a].geometry,n.created=!0);i.geometryInstances=h,i.appearance=this.appearance,i._createBoundingVolumeFunction=function(e,i){_0x15b5dc(t,e,i)},i._updateAndQueueCommandsFunction=function(e,i,n,r,o,a,s,l){_0x50cc66(t,i,n,r,o,a,s)},this._primitive=new WebGLPlot.ClassificationPrimitive(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0);var i=e._error;WebGLPlot.defined(i)?t._readyPromise.reject(i):t._readyPromise.resolve(t)}))}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},_0x5c1673.prototype.getBoundingSphere=function(e){var t=this._boundingSpheresKeys.indexOf(e);if(-1!==t)return this._boundingSpheres[t]},_0x5c1673.prototype.getGeometryInstanceAttributes=function(e){if(!WebGLPlot.defined(this._primitive))throw new WebGLPlot.DeveloperError("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},_0x5c1673.prototype.isDestroyed=function(){return!1},_0x5c1673.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),WebGLPlot.destroyObject(this)},_0x5c1673._supportsMaterials=function(e){return e.depthTexture},_0x5c1673.supportsMaterials=function(e){return WebGLPlot.Check.typeOf.object("scene",e),_0x5c1673._supportsMaterials(e.frameState.context)};var _0x38d5b7=(_0x37d294=!0,function(e,t){var i=_0x37d294?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37d294=!1,i}),_0x3bd03f=_0x38d5b7(void 0,(function(){return _0x3bd03f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3bd03f).search("(((.+)+)+)+$")})),_0x37d294;function _0x48550f(e){if(!e||!e.scene)throw new WebGLPlot.defined("GroundEffect scene is required.");this._scene=e.scene,this._show=WebGLPlot.defaultValue(e.show,!0),this._positions=WebGLPlot.defaultValue(e.positions,!0),this._color=WebGLPlot.defaultValue(e.color,WebGLPlot.Color.BLACK.withAlpha(.8)),this._maxTerrainHeight=WebGLPlot.defaultValue(e.maxTerrainHeight,void 0),this._minTerrainHeight=WebGLPlot.defaultValue(e.minTerrainHeight,void 0),this._id=WebGLPlot.defaultValue(e.id,WebGLPlot.createGuid()),this.initialize()}_0x3bd03f(),_0x48550f.prototype.initialize=function(){if(Array.isArray(this._positions)&&!(this._positions.length<3)){this._primitive&&this.destroy();var e=WebGLPlot.Cartesian3.fromDegreesArray(this._positions),t=new WebGLPlot.PolygonHierarchy(e),i=new WebGLPlot.PolygonGeometry({polygonHierarchy:t}),n={show:new WebGLPlot.ShowGeometryInstanceAttribute(this._show),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(this._color)},r=new WebGLPlot.GeometryInstance({geometry:i,attributes:n,id:this._id}),o=new _0x5c1673({show:this._show,asynchronous:!0,geometryInstances:r,classificationType:3,appearance:new WebGLPlot.PerInstanceColorAppearance,maxTerrainHeight:this._maxTerrainHeight,minTerrainHeight:this._minTerrainHeight});this._primitive=this._scene.primitives.add(o)}},_0x48550f.prototype.destroy=function(){this._scene&&this._primitive&&(this._scene.primitives.removeAndDestroy(this._primitive),this._primitive=void 0)},_0x48550f.prototype._update=function(){this.destroy(),this.initialize()},Object.defineProperties(_0x48550f.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._primitive&&(this._primitive.show=e))}},positions:{get:function(){return this._positions},set:function(e){Array.isArray(e)&&e.length>=3&&(this._positions=e,this._update())}},color:{get:function(){return this._color},set:function(e){WebGLPlot.Color.equals(e,this._color)||(this._color=e,this._update())}},maxTerrainHeight:{get:function(){return this._maxTerrainHeight},set:function(e){this._maxTerrainHeight!==e&&(this._maxTerrainHeight=e,this._update())}},minTerrainHeight:{get:function(){return this._minTerrainHeight},set:function(e){this._minTerrainHeight!==e&&(this._minTerrainHeight=e,this._update())}}});const _0x2a1e2f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4424ad=_0x2a1e2f(void 0,(function(){return _0x4424ad.toString().search("(((.+)+)+)+$").toString().constructor(_0x4424ad).search("(((.+)+)+)+$")}));function _0x2a2c3d(e){if(!e)throw new WebGLPlot.DeveloperError("CameraMoveHandler is required to initialize viewer");this._cameraMoveRate=100;let t=e.scene.globe.ellipsoid;_0x2a2c3d.flags={looking:!1,moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1};let i=this;e.clock.onTick.addEventListener((function(n){const r=e.camera,o=t.cartesianToCartographic(r.position).height/i._cameraMoveRate;_0x2a2c3d.flags.moveForward&&r.moveForward(o),_0x2a2c3d.flags.moveBackward&&r.moveBackward(o),_0x2a2c3d.flags.moveUp&&r.moveUp(o),_0x2a2c3d.flags.moveDown&&r.moveDown(o),_0x2a2c3d.flags.moveLeft&&r.moveLeft(o),_0x2a2c3d.flags.moveRight&&r.moveRight(o)}))}function _0x25cb6f(e){switch(e){case"Z".charCodeAt(0):return"moveForward";case"X".charCodeAt(0):return"moveBackward";case"W".charCodeAt(0):return"moveUp";case"S".charCodeAt(0):return"moveDown";case"D".charCodeAt(0):return"moveRight";case"A".charCodeAt(0):case 37:return"moveLeft";case 38:return"moveUp";case 39:return"moveRight";case 40:return"moveDown";default:return}}_0x4424ad(),_0x2a2c3d.prototype.activate=function(){document.addEventListener("keydown",this.keydown,!1),document.addEventListener("keyup",this.keyup,!1)},_0x2a2c3d.prototype.deActivate=function(){document.removeEventListener("keydown",this.keydown),document.removeEventListener("keyup",this.keyup)},_0x2a2c3d.prototype.keydown=function(e){const t=_0x25cb6f(e.keyCode);typeof t<"u"&&(_0x2a2c3d.flags[t]=!0)},_0x2a2c3d.prototype.keyup=function(e){const t=_0x25cb6f(e.keyCode);typeof t<"u"&&(_0x2a2c3d.flags[t]=!1)},Object.defineProperties(_0x2a2c3d.prototype,{cameraMoveRate:{get:function(){return this._cameraMoveRate},set:function(e){if(e===this._cameraMoveRate||"number"!=typeof e)return!1;this._cameraMoveRate=e}}});var _0x851894=(_0xee019d=!0,function(e,t){var i=_0xee019d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xee019d=!1,i}),_0x47ad60=_0x851894(void 0,(function(){return _0x47ad60.toString().search("(((.+)+)+)+$").toString().constructor(_0x47ad60).search("(((.+)+)+)+$")})),_0xee019d;function _0x21611c(e){e=e||{},this.method=e.method?e.method:"POST",this.sitData=e.sitData?e.sitData:null,this.smlFileName=e.smlFileName?e.smlFileName:"",this.isCover=!!e.isCover&&e.isCover,this.CLASS_NAME="SuperMap.EditSmlFileParameters"}_0x47ad60(),_0x21611c.prototype.destroy=function(){var e=this;e.method="POST",e.sitData=null,e.isCover=!1,e.smlFileName=""},_0x21611c.toJsonParameters=function(e){if(e)return WebGLPlot.toJSON(e.sitData)};var _0x3b4041=(_0x145227=!0,function(e,t){var i=_0x145227?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x145227=!1,i}),_0x580b87=_0x3b4041(void 0,(function(){return _0x580b87.toString().search("(((.+)+)+)+$").toString().constructor(_0x580b87).search("(((.+)+)+)+$")})),_0x145227;_0x580b87();class _0x5b4a7d extends _0x476176{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i=this;i.events=new _0x421885(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),this.CLASS_NAME="SuperMap.EditSmlFileService"}destroy(){super.destroy()}processAsync(e){if(e){var t=this,i=e.method,n=t.url.substr(t.url.length-1,1);t.url+="/"==n?"smlInfos/":"/smlInfos/",t.url+=e.smlFileName+".json",t.url+="?isCover="+e.isCover;var r=null;e.method&&"POST"===e.method&&(r=_0x21611c.toJsonParameters(e)),t.request({method:i,data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}const _0x3292bb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2fbeb3=_0x3292bb(void 0,(function(){return _0x2fbeb3.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fbeb3).search("(((.+)+)+)+$")}));function _0x29d385(e){e=e||{},this.libID=e.libID,this.code=e.code,this.inputPoints=e.inputPoints?e.inputPoints:null,this.symbolRank=e.symbolRank?e.symbolRank:0,this.negativeImage=!!e.negativeImage&&e.negativeImage,this.surroundLineType=e.surroundLineType?e.surroundLineType:0,this.subSymbols=e.subSymbols?e.subSymbols:null,this.scaleValues=e.scaleValues?e.scaleValues:null,this.scalePoints=e.scalePoints?e.scalePoints:null,this.newScalePoint=e.newScalePoint?e.newScalePoint:null,this.newScalePointIndex=e.newScalePointIndex?e.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}_0x2fbeb3(),_0x29d385.prototype.destroy=function(){var e=this;e.libID=null,e.code=null,e.inputPoints=null,e.symbolRank=null,e.negativeImage=null,e.surroundLineType=null,e.subSymbols=null,e.scaleValues=null,e.scalePoints=null,e.newScalePoint=null,e.newScalePointIndex=null},_0x29d385.toUrlParameters=function(e){if(e&&null!==e.libID&&null!==e.code){var t="libID="+encodeURIComponent(e.libID)+"&code="+encodeURIComponent(e.code);if(e.inputPoints&&null!==e.inputPoints&&0!==e.inputPoints.length){let i="[";for(let t=0;t<e.inputPoints.length;t++)t===e.inputPoints.length-1?i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"}]":i+='{"x":'+e.inputPoints[t].x+', "y":'+e.inputPoints[t].y+"},";t+="&inputPoints="+encodeURIComponent(i)}if(e.scalePoints&&null!==e.scalePoints&&0!==e.scalePoints.length){let i="[";for(let t=0;t<e.scalePoints.length;t++)t===e.scalePoints.length-1?i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"}]":i+='{"x":'+e.scalePoints[t].x+', "y":'+e.scalePoints[t].y+"},";t+="&scalePoints="+encodeURIComponent(i)}if(e.scaleValues&&null!==e.scaleValues&&0!==e.scaleValues.length){let i="[";for(let t=0;t<e.scaleValues.length;t++)t===e.scaleValues.length-1?i+=e.scaleValues[t]+"]":i+=e.scaleValues[t]+",";t+="&scaleValues="+encodeURIComponent(i)}if(e.subSymbols&&null!==e.subSymbols&&0!==e.subSymbols.length){let i="[";for(let t=0;t<e.subSymbols.length;t++)t===e.subSymbols.length-1?i+=e.subSymbols[t].code+"]":i+=e.subSymbols[t].code+",";t+="&subSymbols="+encodeURIComponent(i)}return e.newScalePoint&&null!==e.newScalePoint&&(t+="&newScalePoint="+encodeURIComponent('{"x":'+e.newScalePoint.x+', "y":'+e.newScalePoint.y+"}")),e.newScalePointIndex&&null!==e.newScalePointIndex&&(t+="&newScalePointIndex="+encodeURIComponent(e.newScalePointIndex)),e.symbolRank&&null!==e.symbolRank&&(t+="&symbolRank="+encodeURIComponent(e.symbolRank)),e.negativeImage&&null!==e.negativeImage&&(t+="&negativeImage="+encodeURIComponent(e.negativeImage)),e.surroundLineType&&null!==e.surroundLineType&&(t+="&surroundLineType="+encodeURIComponent(e.surroundLineType)),t}};var _0x26b4a3=(_0x592e30=!0,function(e,t){var i=_0x592e30?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x592e30=!1,i}),_0x48a323=_0x26b4a3(void 0,(function(){return _0x48a323.toString().search("(((.+)+)+)+$").toString().constructor(_0x48a323).search("(((.+)+)+)+$")})),_0x592e30;_0x48a323();class _0xa6b4bc extends _0x476176{constructor(e,t){super(e,t),(t=t||{})&&this.extend(this,t);var i,n=this;n.events=new _0x421885(n,null,n.EVENT_TYPES,!0),n.eventListeners instanceof Object&&n.events.on(n.eventListeners),i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"smlInfos":"/smlInfos",n.url+=".json",this.CLASS_NAME="SuperMap.GetSMLInfosService"}destroy(){super.destroy()}processAsync(e){if(e){var t=this;t.url+=_0x29d385.toUrlParameters(e),t.request({method:"GET",data:null,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}extend(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&void 0!==t.toString&&(e.toString=t.toString)}return e}}var _0x1f2324=(_0x1d2163=!0,function(e,t){var i=_0x1d2163?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d2163=!1,i}),_0x421d6c=_0x1f2324(void 0,(function(){return _0x421d6c.toString().search("(((.+)+)+)+$").toString().constructor(_0x421d6c).search("(((.+)+)+)+$")})),_0x1d2163;function _0x583b79(e,t){this.url=e,this.options=t}_0x421d6c(),_0x583b79.prototype.getSMLInfos=function(e,t,i){var n=this;return i||(i=n),new _0xa6b4bc(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n},_0x583b79.prototype.editSMLFile=function(e,t,i){var n=this;return i||(i=n),new _0x5b4a7d(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,serverType:n.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e),n};var _0x61db6=(_0x1ae4f7=!0,function(e,t){var i=_0x1ae4f7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ae4f7=!1,i}),_0x3a4160=_0x61db6(void 0,(function(){return _0x3a4160.toString().search("(((.+)+)+)+$").toString().constructor(_0x3a4160).search("(((.+)+)+)+$")})),_0x1ae4f7;_0x3a4160();class _0x204238 extends _0x476176{constructor(e,t){super(e,t=t||{});var i,n=this;i=n.url.substr(n.url.length-1,1),n.url+="/"==i?"graphicObject.json?":"/graphicObject.json?",this.CLASS_NAME="SuperMap.GetSymbolInfoService"}destroy(){super.destroy()}processAsync(e){if(e){var t,i=this;t=_0x51e0df.toUrlParameters(e),i.url+=t,e.dynamicToken&&(i.url+="&dynamicToken="+e.dynamicToken),navigator.userAgent.toUpperCase().includes("MSIE")&&(i.url=encodeURI(i.url)),i.request({method:"GET",params:null,scope:i,success:i.myServiceProcessCompleted,failure:i.serviceProcessFailed})}}myServiceProcessCompleted(e){null!=(e=this.transformResult(e))&&null!=e.textStyle2D&&null!=e.textStyle2D.fontHeight&&(e.textStyle2D.fontHeight=3),this.events.triggerEvent("processCompleted",{result:e})}transformResult(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e}}var _0x211ef3=(_0xaa7370=!0,function(e,t){var i=_0xaa7370?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xaa7370=!1,i}),_0x13588b=_0x211ef3(void 0,(function(){return _0x13588b.toString().search("(((.+)+)+)+$").toString().constructor(_0x13588b).search("(((.+)+)+)+$")})),_0xaa7370;_0x13588b();var WebGLPlot$8=window.WebGLPlot=window.WebGLPlot||{};function _0x14876e(){}var createAlgo=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoSymbol({libID:e.libID,code:e.code}):void 0},getDefaultStyle=function(e){return void 0!==SuperMapAlgoPlot?_0x48d607.defaultStyle:void 0},getSpatialData=function(e,t){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.Primitives.getSpatialData(e,t):void 0},getServerData=function(e,t,i,n){if(void 0===i&&(i=_0x48d607.serverUrl),void 0===SuperMap||0===e||WebGLPlot$8.getLibManager(n).getSymbolLibByLibId(this.libID))return 0===e?e:null;var r=new _0x51e0df;return r.libID=e,r.code=t,r.surroundLineType=1,{getSymbolInfoParameters:r,getSymbolInfo:new _0x204238(i,WebGLPlot$8.getLibManager(n).options.serviceParams)}},toJSON=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.toJSON(e):""},clonePoints=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.clonePoints(e):[]},EditSmlFile=function(e,t){return void 0!==SuperMap?{editSmlFile:new _0x5b4a7d(e,t),editSmlFileParams:new _0x21611c}:void 0},smlFileService=function(e,t){return{smlFileService:new _0x583b79(e,t),editSmlFileParams:new _0x21611c}},isAccessServer=function(e,t){return void 0!==SuperMapAlgoPlot&&SuperMapAlgoPlot.AlgoSymbolFactory.isAccessServer(e,t)},polylineDistance=function(e){return void 0!==SuperMapAlgoPlot?SuperMapAlgoPlot.PlottingUtil.polylineDistance(e):0},analysisSymbolCells=function(e){if(void 0!==SuperMapAlgoPlot)return SuperMapAlgoPlot.AnalysisSymbol.analysisSymbolCells(e)},rotateAngle=function(e,t,i){void 0!==SuperMapAlgoPlot&&SuperMapAlgoPlot.PlottingUtil.rotateAngle(e,t,i)},plotI18n=function(e){if(void 0!==SuperMapAlgoPlot)return SuperMapAlgoPlot.plotI18n(e)},getLibManager=function(e){let t=WebGLPlot$8.Plotting.g_Plotting.get(e);if(t)return t.getSymbolLibManager()},createProperty=function(e,t){return new _0x117656(e,t)};WebGLPlot$8.createAlgo=createAlgo,WebGLPlot$8.getDefaultStyle=getDefaultStyle,WebGLPlot$8.getSpatialData=getSpatialData,WebGLPlot$8.getServerData=getServerData,WebGLPlot$8.toJSON=toJSON,WebGLPlot$8.EditSmlFile=EditSmlFile,WebGLPlot$8.clonePoints=clonePoints,WebGLPlot$8.isAccessServer=isAccessServer,WebGLPlot$8.polylineDistance=polylineDistance,WebGLPlot$8.analysisSymbolCells=analysisSymbolCells,WebGLPlot$8.rotateAngle=rotateAngle,WebGLPlot$8.plotI18n=plotI18n,WebGLPlot$8.getLibManager=getLibManager,WebGLPlot$8.createProperty=createProperty,WebGLPlot$8.smlFileService=smlFileService,function(e){var t,i=(t=!0,function(e,i){var n=t?function(){if(i){var t=i.apply(e,arguments);return i=null,t}}:function(){};return t=!1,n}),n=i(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));(n(),"object"==typeof exports&&typeof module<"u")?module.exports=e():"function"==typeof define&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).html2canvas=e()}((function(){return function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){(function(e){!function(n){var r="object"==typeof i&&i&&!i.nodeType&&i,o="object"==typeof t&&t&&!t.nodeType&&t,a="object"==typeof e&&e;(a.global===a||a.window===a||a.self===a)&&(n=a);var s,l,u=2147483647,c=36,h=/^xn--/,d=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=Math.floor,m=String.fromCharCode;function g(e){throw new RangeError(p[e])}function x(e,t){for(var i=e.length,n=[];i--;)n[i]=t(e[i]);return n}function y(e,t){var i=e.split("@"),n="";return i.length>1&&(n=i[0]+"@",e=i[1]),n+x((e=e.replace(f,".")).split("."),t).join(".")}function v(e){for(var t,i,n=[],r=0,o=e.length;r<o;)(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<o?56320==(64512&(i=e.charCodeAt(r++)))?n.push(((1023&t)<<10)+(1023&i)+65536):(n.push(t),r--):n.push(t);return n}function $(e){return x(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,i){var n=0;for(e=i?_(e/700):e>>1,e+=_(e/t);e>455;n+=c)e=_(e/35);return _(n+36*e/(e+38))}function C(e){var t,i,n,r,o,a,s,l,h,d,f,p=[],m=e.length,x=0,y=128,v=72;for((i=e.lastIndexOf("-"))<0&&(i=0),n=0;n<i;++n)e.charCodeAt(n)>=128&&g("not-basic"),p.push(e.charCodeAt(n));for(r=i>0?i+1:0;r<m;){for(o=x,a=1,s=c;r>=m&&g("invalid-input"),((l=(f=e.charCodeAt(r++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:c)>=c||l>_((u-x)/a))&&g("overflow"),x+=l*a,!(l<(h=s<=v?1:s>=v+26?26:s-v));s+=c)a>_(u/(d=c-h))&&g("overflow"),a*=d;v=T(x-o,t=p.length+1,0==o),_(x/t)>u-y&&g("overflow"),y+=_(x/t),x%=t,p.splice(x++,0,y)}return $(p)}function S(e){var t,i,n,r,o,a,s,l,h,d,f,p,x,y,$,C=[];for(p=(e=v(e)).length,t=128,i=0,o=72,a=0;a<p;++a)(f=e[a])<128&&C.push(m(f));for(n=r=C.length,r&&C.push("-");n<p;){for(s=u,a=0;a<p;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>_((u-i)/(x=n+1))&&g("overflow"),i+=(s-t)*x,t=s,a=0;a<p;++a)if((f=e[a])<t&&++i>u&&g("overflow"),f==t){for(l=i,h=c;!(l<(d=h<=o?1:h>=o+26?26:h-o));h+=c)$=l-d,y=c-d,C.push(m(b(d+$%y,0))),l=_($/y);C.push(m(b(l,0))),o=T(i,x,n==r),i=0,++n}++i,++t}return C.join("")}if(s={version:"1.4.1",ucs2:{decode:v,encode:$},decode:C,encode:S,toASCII:function(e){return y(e,(function(e){return d.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return y(e,(function(e){return h.test(e)?C(e.slice(4).toLowerCase()):e}))}},r&&o)if(t.exports==r)o.exports=s;else for(l in s)s.hasOwnProperty(l)&&(r[l]=s[l]);else n.punycode=s}(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,i){var n=e("./log");function r(e,t){for(var i=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),o=e.firstChild;o;)(!0===t||1!==o.nodeType||"SCRIPT"!==o.nodeName)&&i.appendChild(r(o,t)),o=o.nextSibling;return 1===e.nodeType&&(i._scrollTop=e.scrollTop,i._scrollLeft=e.scrollLeft,"CANVAS"===e.nodeName?function(e,t){try{t&&(t.width=e.width,t.height=e.height,t.getContext("2d").putImageData(e.getContext("2d").getImageData(0,0,e.width,e.height),0,0))}catch(t){n("Unable to copy canvas content from",e,t)}}(e,i):("TEXTAREA"===e.nodeName||"SELECT"===e.nodeName)&&(i.value=e.value)),i}function o(e){if(1===e.nodeType){e.scrollTop=e._scrollTop,e.scrollLeft=e._scrollLeft;for(var t=e.firstChild;t;)o(t),t=t.nextSibling}}t.exports=function(e,t,i,n,a,s,l){var u=r(e.documentElement,a.javascriptEnabled),c=t.createElement("iframe");return c.className="html2canvas-container",c.style.visibility="hidden",c.style.position="fixed",c.style.left="-10000px",c.style.top="0px",c.style.border="0",c.width=i,c.height=n,c.scrolling="no",t.body.appendChild(c),new Promise((function(t){var i,n,r,h=c.contentWindow.document;c.contentWindow.onload=c.onload=function(){var e=setInterval((function(){h.body.childNodes.length>0&&(o(h.documentElement),clearInterval(e),"view"===a.type&&(c.contentWindow.scrollTo(s,l),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(c.contentWindow.scrollY!==l||c.contentWindow.scrollX!==s)&&(h.documentElement.style.top=-l+"px",h.documentElement.style.left=-s+"px",h.documentElement.style.position="absolute")),t(c))}),50)},h.open(),h.write("<!DOCTYPE html><html></html>"),n=s,r=l,(i=e).defaultView&&(n!==i.defaultView.pageXOffset||r!==i.defaultView.pageYOffset)&&i.defaultView.scrollTo(n,r),h.replaceChild(h.adoptNode(u),h.documentElement),h.close()}))}},{"./log":13}],3:[function(e,t,i){function n(e){this.r=0,this.g=0,this.b=0,this.a=null,this.fromArray(e)||this.namedColor(e)||this.rgb(e)||this.rgba(e)||this.hex6(e)||this.hex3(e)}n.prototype.darken=function(e){var t=1-e;return new n([Math.round(this.r*t),Math.round(this.g*t),Math.round(this.b*t),this.a])},n.prototype.isTransparent=function(){return 0===this.a},n.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},n.prototype.fromArray=function(e){return Array.isArray(e)&&(this.r=Math.min(e[0],255),this.g=Math.min(e[1],255),this.b=Math.min(e[2],255),e.length>3&&(this.a=e[3])),Array.isArray(e)};var r=/^#([a-f0-9]{3})$/i;n.prototype.hex3=function(e){var t;return null!==(t=e.match(r))&&(this.r=parseInt(t[1][0]+t[1][0],16),this.g=parseInt(t[1][1]+t[1][1],16),this.b=parseInt(t[1][2]+t[1][2],16)),null!==t};var o=/^#([a-f0-9]{6})$/i;n.prototype.hex6=function(e){var t=null;return null!==(t=e.match(o))&&(this.r=parseInt(t[1].substring(0,2),16),this.g=parseInt(t[1].substring(2,4),16),this.b=parseInt(t[1].substring(4,6),16)),null!==t};var a=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;n.prototype.rgb=function(e){var t;return null!==(t=e.match(a))&&(this.r=Number(t[1]),this.g=Number(t[2]),this.b=Number(t[3])),null!==t};var s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;n.prototype.rgba=function(e){var t;return null!==(t=e.match(s))&&(this.r=Number(t[1]),this.g=Number(t[2]),this.b=Number(t[3]),this.a=Number(t[4])),null!==t},n.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},n.prototype.namedColor=function(e){e=e.toLowerCase();var t=l[e];if(t)this.r=t[0],this.g=t[1],this.b=t[2];else if("transparent"===e)return this.r=this.g=this.b=this.a=0,!0;return!!t},n.prototype.isColor=!0;var l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};t.exports=n},{}],4:[function(e,t,i){var n=e("./support"),r=e("./renderers/canvas"),o=e("./imageloader"),a=e("./nodeparser"),s=e("./nodecontainer"),l=e("./log"),u=e("./utils"),c=e("./clone"),h=e("./proxy").loadUrlDocument,d=u.getBounds,f="data-html2canvas-node",p=0;function _(e,t){var i,n,o=p++;if((t=t||{}).logging&&(l.options.logging=!0,l.options.start=Date.now()),t.async=typeof t.async>"u"||t.async,t.allowTaint=!(typeof t.allowTaint>"u")&&t.allowTaint,t.removeContainer=typeof t.removeContainer>"u"||t.removeContainer,t.javascriptEnabled=!(typeof t.javascriptEnabled>"u")&&t.javascriptEnabled,t.imageTimeout=typeof t.imageTimeout>"u"?1e4:t.imageTimeout,t.renderer="function"==typeof t.renderer?t.renderer:r,t.strict=!!t.strict,"string"==typeof e){if("string"!=typeof t.proxy)return Promise.reject("Proxy must be used when rendering url");var a=null!=t.width?t.width:window.innerWidth,s=null!=t.height?t.height:window.innerHeight;return h((i=e,n=document.createElement("a"),n.href=i,n.href=n.href,n),t.proxy,document,a,s,t).then((function(e){return g(e.contentWindow.document.documentElement,e,t,a,s)}))}var u,d,_,m,x,y=(void 0===e?[document.documentElement]:e.length?e:[e])[0];return y.setAttribute(f+o,o),(u=y.ownerDocument,d=t,_=y.ownerDocument.defaultView.innerWidth,m=y.ownerDocument.defaultView.innerHeight,x=o,c(u,u,_,m,d,u.defaultView.pageXOffset,u.defaultView.pageYOffset).then((function(e){l("Document cloned");var t=f+x,i="["+t+"='"+x+"']";u.querySelector(i).removeAttribute(t);var n=e.contentWindow,r=n.document.querySelector(i);return("function"==typeof d.onclone?Promise.resolve(d.onclone(n.document)):Promise.resolve(!0)).then((function(){return g(r,e,d,_,m)}))}))).then((function(e){return"function"==typeof t.onrendered&&(l("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),t.onrendered(e)),e}))}_.CanvasRenderer=r,_.NodeContainer=s,_.log=l,_.utils=u;var m=typeof document>"u"||"function"!=typeof Object.create||"function"!=typeof document.createElement("canvas").getContext?function(){return Promise.reject("No canvas support")}:_;function g(e,t,i,r,s){var u=t.contentWindow,c=new n(u.document),h=new o(i,c),f=d(e),p="view"===i.type?r:f.right+1,_="view"===i.type?s:f.bottom+1,m=new i.renderer(p,_,h,i,document);return new a(e,m,c,h,i).ready.then((function(){var n,r;if(l("Finished rendering"),"view"===i.type)n=x(m.canvas,{width:m.canvas.width,height:m.canvas.height,top:0,left:0,x:0,y:0});else if(e===u.document.body||e===u.document.documentElement||null!=i.canvas)n=m.canvas;else if(i.scale){var o={width:null!=i.width?i.width:f.width,height:null!=i.height?i.height:f.height,top:f.top,left:f.left,x:0,y:0},a={};for(var s in o)o.hasOwnProperty(s)&&(a[s]=o[s]*i.scale);(n=x(m.canvas,a)).style.width=o.width+"px",n.style.height=o.height+"px"}else n=x(m.canvas,{width:null!=i.width?i.width:f.width,height:null!=i.height?i.height:f.height,top:f.top,left:f.left,x:0,y:0});return r=t,i.removeContainer&&(r.parentNode.removeChild(r),l("Cleaned up container")),n}))}function x(e,t){var i=document.createElement("canvas"),n=Math.min(e.width-1,Math.max(0,t.left)),r=Math.min(e.width,Math.max(1,t.left+t.width)),o=Math.min(e.height-1,Math.max(0,t.top)),a=Math.min(e.height,Math.max(1,t.top+t.height));i.width=t.width,i.height=t.height;var s=r-n,u=a-o;return l("Cropping canvas at:","left:",t.left,"top:",t.top,"width:",s,"height:",u),l("Resulting crop with width",t.width,"and height",t.height,"with x",n,"and y",o),i.getContext("2d").drawImage(e,n,o,s,u,t.x,t.y,s,u),i}t.exports=m},{"./clone":2,"./imageloader":11,"./log":13,"./nodecontainer":14,"./nodeparser":15,"./proxy":16,"./renderers/canvas":20,"./support":22,"./utils":26}],5:[function(e,t,i){var n=e("./log"),r=e("./utils").smallImage;t.exports=function e(t){if(this.src=t,n("DummyImageContainer for",t),!this.promise||!this.image){n("Initiating DummyImageContainer"),e.prototype.image=new Image;var i=this.image;e.prototype.promise=new Promise((function(e,t){i.onload=e,i.onerror=t,i.src=r(),!0===i.complete&&e(i)}))}}},{"./log":13,"./utils":26}],6:[function(e,t,i){var n=e("./utils").smallImage;t.exports=function(e,t){var i,r,o=document.createElement("div"),a=document.createElement("img"),s=document.createElement("span"),l="Hidden Text";o.style.visibility="hidden",o.style.fontFamily=e,o.style.fontSize=t,o.style.margin=0,o.style.padding=0,document.body.appendChild(o),a.src=n(),a.width=1,a.height=1,a.style.margin=0,a.style.padding=0,a.style.verticalAlign="baseline",s.style.fontFamily=e,s.style.fontSize=t,s.style.margin=0,s.style.padding=0,s.appendChild(document.createTextNode(l)),o.appendChild(s),o.appendChild(a),i=a.offsetTop-s.offsetTop+1,o.removeChild(s),o.appendChild(document.createTextNode(l)),o.style.lineHeight="normal",a.style.verticalAlign="super",r=a.offsetTop-o.offsetTop+1,document.body.removeChild(o),this.baseline=i,this.lineWidth=1,this.middle=r}},{"./utils":26}],7:[function(e,t,i){var n=e("./font");function r(){this.data={}}r.prototype.getMetrics=function(e,t){return void 0===this.data[e+"-"+t]&&(this.data[e+"-"+t]=new n(e,t)),this.data[e+"-"+t]},t.exports=r},{"./font":6}],8:[function(e,t,i){var n=e("./utils").getBounds,r=e("./proxy").loadUrlDocument;function o(t,i,r){this.image=null,this.src=t;var o=this,a=n(t);this.promise=(i?new Promise((function(e){"about:blank"===t.contentWindow.document.URL||null==t.contentWindow.document.documentElement?t.contentWindow.onload=t.onload=function(){e(t)}:e(t)})):this.proxyLoad(r.proxy,a,r)).then((function(t){return e("./core")(t.contentWindow.document.documentElement,{type:"view",width:t.width,height:t.height,proxy:r.proxy,javascriptEnabled:r.javascriptEnabled,removeContainer:r.removeContainer,allowTaint:r.allowTaint,imageTimeout:r.imageTimeout/2})})).then((function(e){return o.image=e}))}o.prototype.proxyLoad=function(e,t,i){var n=this.src;return r(n.src,e,n.ownerDocument,t.width,t.height,i)},t.exports=o},{"./core":4,"./proxy":16,"./utils":26}],9:[function(e,t,i){function n(e){this.src=e.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=Promise.resolve(!0)}n.TYPES={LINEAR:1,RADIAL:2},n.REGEXP_COLORSTOP=/^\s*(rgba?\(\s*\d{1,3},\s*\d{1,3},\s*\d{1,3}(?:,\s*[0-9\.]+)?\s*\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\s+(\d{1,3}(?:\.\d+)?)(%|px)?)?(?:\s|$)/i,t.exports=n},{}],10:[function(e,t,i){t.exports=function(e,t){this.src=e,this.image=new Image;var i=this;this.tainted=null,this.promise=new Promise((function(n,r){i.image.onload=n,i.image.onerror=r,t&&(i.image.crossOrigin="anonymous"),i.image.src=e,!0===i.image.complete&&n(i.image)}))}},{}],11:[function(e,t,i){var n=e("./log"),r=e("./imagecontainer"),o=e("./dummyimagecontainer"),a=e("./proxyimagecontainer"),s=e("./framecontainer"),l=e("./svgcontainer"),u=e("./svgnodecontainer"),c=e("./lineargradientcontainer"),h=e("./webkitgradientcontainer"),d=e("./utils").bind;function f(e,t){this.link=null,this.options=e,this.support=t,this.origin=this.getOrigin(window.location.href)}f.prototype.findImages=function(e){var t=[];return e.reduce((function(e,t){switch(t.node.nodeName){case"IMG":return e.concat([{args:[t.node.src],method:"url"}]);case"svg":case"IFRAME":return e.concat([{args:[t.node],method:t.node.nodeName}])}return e}),[]).forEach(this.addImage(t,this.loadImage),this),t},f.prototype.findBackgroundImage=function(e,t){return t.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(e,this.loadImage),this),e},f.prototype.addImage=function(e,t){return function(i){i.args.forEach((function(r){this.imageExists(e,r)||(e.splice(0,0,t.call(this,i)),n("Added image #"+e.length,"string"==typeof r?r.substring(0,100):r))}),this)}},f.prototype.hasImageBackground=function(e){return"none"!==e.method},f.prototype.loadImage=function(e){if("url"===e.method){var t=e.args[0];return!this.isSVG(t)||this.support.svg||this.options.allowTaint?t.match(/data:image\/.*;base64,/i)?new r(t.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(t)||!0===this.options.allowTaint||this.isSVG(t)?new r(t,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new r(t,!0):this.options.proxy?new a(t,this.options.proxy):new o(t):new l(t)}return"linear-gradient"===e.method?new c(e):"gradient"===e.method?new h(e):"svg"===e.method?new u(e.args[0],this.support.svg):"IFRAME"===e.method?new s(e.args[0],this.isSameOrigin(e.args[0].src),this.options):new o(e)},f.prototype.isSVG=function(e){return"svg"===e.substring(e.length-3).toLowerCase()||l.prototype.isInline(e)},f.prototype.imageExists=function(e,t){return e.some((function(e){return e.src===t}))},f.prototype.isSameOrigin=function(e){return this.getOrigin(e)===this.origin},f.prototype.getOrigin=function(e){var t=this.link||(this.link=document.createElement("a"));return t.href=e,t.href=t.href,t.protocol+t.hostname+t.port},f.prototype.getPromise=function(e){return this.timeout(e,this.options.imageTimeout).catch((function(){return new o(e.src).promise.then((function(t){e.image=t}))}))},f.prototype.get=function(e){var t=null;return this.images.some((function(i){return(t=i).src===e}))?t:null},f.prototype.fetch=function(e){return this.images=e.reduce(d(this.findBackgroundImage,this),this.findImages(e)),this.images.forEach((function(e,t){e.promise.then((function(){n("Succesfully loaded image #"+(t+1),e)}),(function(i){n("Failed loading image #"+(t+1),e,i)}))})),this.ready=Promise.all(this.images.map(this.getPromise,this)),n("Finished searching images"),this},f.prototype.timeout=function(e,t){var i,r=Promise.race([e.promise,new Promise((function(r,o){i=setTimeout((function(){n("Timed out loading image",e),o(e)}),t)}))]).then((function(e){return clearTimeout(i),e}));return r.catch((function(){clearTimeout(i)})),r},t.exports=f},{"./dummyimagecontainer":5,"./framecontainer":8,"./imagecontainer":10,"./lineargradientcontainer":12,"./log":13,"./proxyimagecontainer":17,"./svgcontainer":23,"./svgnodecontainer":24,"./utils":26,"./webkitgradientcontainer":27}],12:[function(e,t,i){var n=e("./gradientcontainer"),r=e("./color");function o(e){n.apply(this,arguments),this.type=n.TYPES.LINEAR;var t=o.REGEXP_DIRECTION.test(e.args[0])||!n.REGEXP_COLORSTOP.test(e.args[0]);t?e.args[0].split(/\s+/).reverse().forEach((function(e,t){switch(e){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var i=this.y0,n=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=n,this.y1=i;break;case"center":break;default:var r=.01*parseFloat(e,10);if(isNaN(r))break;0===t?(this.y0=r,this.y1=1-this.y0):(this.x0=r,this.x1=1-this.x0)}}),this):(this.y0=0,this.y1=1),this.colorStops=e.args.slice(t?1:0).map((function(e){var t=e.match(n.REGEXP_COLORSTOP),i=+t[2],o=0===i?"%":t[3];return{color:new r(t[1]),stop:"%"===o?i/100:null}})),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach((function(e,t){null===e.stop&&this.colorStops.slice(t).some((function(i,n){return null!==i.stop&&(e.stop=(i.stop-this.colorStops[t-1].stop)/(n+1)+this.colorStops[t-1].stop,!0)}),this)}),this)}o.prototype=Object.create(n.prototype),o.REGEXP_DIRECTION=/^\s*(?:to|left|right|top|bottom|center|\d{1,3}(?:\.\d+)?%?)(?:\s|$)/i,t.exports=o},{"./color":3,"./gradientcontainer":9}],13:[function(e,t,i){var n=function(){n.options.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-n.options.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))};n.options={logging:!1},t.exports=n},{}],14:[function(e,t,i){var n=e("./color"),r=e("./utils"),o=r.getBounds,a=r.parseBackgrounds,s=r.offsetBounds;function l(e,t){this.node=e,this.parent=t,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function u(e){return-1!==e.toString().indexOf("%")}function c(e){return e.replace("px","")}function h(e){return parseFloat(e)}l.prototype.cloneTo=function(e){e.visible=this.visible,e.borders=this.borders,e.bounds=this.bounds,e.clip=this.clip,e.backgroundClip=this.backgroundClip,e.computedStyles=this.computedStyles,e.styles=this.styles,e.backgroundImages=this.backgroundImages,e.opacity=this.opacity},l.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat("opacity"):this.opacity},l.prototype.assignStack=function(e){this.stack=e,e.children.push(this)},l.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},l.prototype.css=function(e){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[e]||(this.styles[e]=this.computedStyles[e])},l.prototype.prefixedCss=function(e){var t=this.css(e);return void 0===t&&["webkit","moz","ms","o"].some((function(i){return void 0!==(t=this.css(i+e.substr(0,1).toUpperCase()+e.substr(1)))}),this),void 0===t?null:t},l.prototype.computedStyle=function(e){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,e)},l.prototype.cssInt=function(e){var t=parseInt(this.css(e),10);return isNaN(t)?0:t},l.prototype.color=function(e){return this.colors[e]||(this.colors[e]=new n(this.css(e)))},l.prototype.cssFloat=function(e){var t=parseFloat(this.css(e));return isNaN(t)?0:t},l.prototype.fontWeight=function(){var e=this.css("fontWeight");switch(parseInt(e,10)){case 401:e="bold";break;case 400:e="normal"}return e},l.prototype.parseClip=function(){var e=this.css("clip").match(this.CLIP);return e?{top:parseInt(e[1],10),right:parseInt(e[2],10),bottom:parseInt(e[3],10),left:parseInt(e[4],10)}:null},l.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=a(this.css("backgroundImage")))},l.prototype.cssList=function(e,t){var i=(this.css(e)||"").split(",");return 1===(i=(i=i[t||0]||i[0]||"auto").trim().split(" ")).length&&(i=[i[0],u(i[0])?"auto":i[0]]),i},l.prototype.parseBackgroundSize=function(e,t,i){var n,r,o=this.cssList("backgroundSize",i);if(u(o[0]))n=e.width*parseFloat(o[0])/100;else{if(/contain|cover/.test(o[0])){var a=e.width/e.height,s=t.width/t.height;return a<s^"contain"===o[0]?{width:e.height*s,height:e.height}:{width:e.width,height:e.width/s}}n=parseInt(o[0],10)}return r="auto"===o[0]&&"auto"===o[1]?t.height:"auto"===o[1]?n/t.width*t.height:u(o[1])?e.height*parseFloat(o[1])/100:parseInt(o[1],10),"auto"===o[0]&&(n=r/t.height*t.width),{width:n,height:r}},l.prototype.parseBackgroundPosition=function(e,t,i,n){var r,o,a=this.cssList("backgroundPosition",i);return r=u(a[0])?(e.width-(n||t).width)*(parseFloat(a[0])/100):parseInt(a[0],10),o="auto"===a[1]?r/t.width*t.height:u(a[1])?(e.height-(n||t).height)*parseFloat(a[1])/100:parseInt(a[1],10),"auto"===a[0]&&(r=o/t.height*t.width),{left:r,top:o}},l.prototype.parseBackgroundRepeat=function(e){return this.cssList("backgroundRepeat",e)[0]},l.prototype.parseTextShadows=function(){var e=this.css("textShadow"),t=[];if(e&&"none"!==e)for(var i=e.match(this.TEXT_SHADOW_PROPERTY),r=0;i&&r<i.length;r++){var o=i[r].match(this.TEXT_SHADOW_VALUES);t.push({color:new n(o[0]),offsetX:o[1]?parseFloat(o[1].replace("px","")):0,offsetY:o[2]?parseFloat(o[2].replace("px","")):0,blur:o[3]?o[3].replace("px",""):0})}return t},l.prototype.parseTransform=function(){if(!this.transformData)if(this.hasTransform()){var e=this.parseBounds(),t=this.prefixedCss("transformOrigin").split(" ").map(c).map(h);t[0]+=e.left,t[1]+=e.top,this.transformData={origin:t,matrix:this.parseTransformMatrix()}}else this.transformData={origin:[0,0],matrix:[1,0,0,1,0,0]};return this.transformData},l.prototype.parseTransformMatrix=function(){if(!this.transformMatrix){var e=this.prefixedCss("transform"),t=e?function(e){if(e&&"matrix"===e[1])return e[2].split(",").map((function(e){return parseFloat(e.trim())}));if(e&&"matrix3d"===e[1]){var t=e[2].split(",").map((function(e){return parseFloat(e.trim())}));return[t[0],t[1],t[4],t[5],t[12],t[13]]}}(e.match(this.MATRIX_PROPERTY)):null;this.transformMatrix=t||[1,0,0,1,0,0]}return this.transformMatrix},l.prototype.inverseTransform=function(){var e,t,i,n,r,o,a,s,l,u=this.parseTransform();return{origin:u.origin,matrix:(e=u.matrix,t=e[0],i=e[2],n=e[4],r=e[1],o=e[3],a=e[5],s=t*o-i*r,l=[o,-r,-i,t,i*a-n*o,n*r-t*a].map((function(e){return e/s})),l)}},l.prototype.parseBounds=function(){return this.bounds||(this.bounds=this.hasTransform()?s(this.node):o(this.node))},l.prototype.hasTransform=function(){return"1,0,0,1,0,0"!==this.parseTransformMatrix().join(",")||this.parent&&this.parent.hasTransform()},l.prototype.getValue=function(){var e,t,i=this.node.value||"";return"SELECT"===this.node.tagName?(e=this.node,i=(t=e.options[e.selectedIndex||0])&&t.text||""):"password"===this.node.type&&(i=Array(i.length+1).join("•")),0===i.length?this.node.placeholder||"":i},l.prototype.MATRIX_PROPERTY=/(matrix|matrix3d)\((.+)\)/,l.prototype.TEXT_SHADOW_PROPERTY=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,l.prototype.TEXT_SHADOW_VALUES=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g,l.prototype.CLIP=/^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/,t.exports=l},{"./color":3,"./utils":26}],15:[function(e,t,i){var n=e("./log"),r=e("punycode"),o=e("./nodecontainer"),a=e("./textcontainer"),s=e("./pseudoelementcontainer"),l=e("./fontmetrics"),u=e("./color"),c=e("./stackingcontext"),h=e("./utils"),d=h.bind,f=h.getBounds,p=h.parseBackgrounds,_=h.offsetBounds;function m(e,t,i,r,a){n("Starting NodeParser"),this.renderer=t,this.options=a,this.range=null,this.support=i,this.renderQueue=[],this.stack=new c(!0,1,e.ownerDocument,null);var s=new o(e,null);if(a.background&&t.rectangle(0,0,t.width,t.height,new u(a.background)),e===e.ownerDocument.documentElement){var h=new o(s.color("backgroundColor").isTransparent()?e.ownerDocument.body:e.ownerDocument.documentElement,null);t.rectangle(0,0,t.width,t.height,h.color("backgroundColor"))}s.visibile=s.isElementVisible(),this.createPseudoHideStyles(e.ownerDocument),this.disableAnimations(e.ownerDocument),this.nodes=k([s].concat(this.getChildren(s)).filter((function(e){return e.visible=e.isElementVisible()})).map(this.getPseudoElements,this)),this.fontMetrics=new l,n("Fetched nodes, total:",this.nodes.length),n("Calculate overflow clips"),this.calculateOverflowClips(),n("Start fetching images"),this.images=r.fetch(this.nodes.filter(F)),this.ready=this.images.ready.then(d((function(){return n("Images loaded, starting parsing"),n("Creating stacking contexts"),this.createStackingContexts(),n("Sorting stacking contexts"),this.sortStackingContexts(this.stack),this.parse(this.stack),n("Render queue created with "+this.renderQueue.length+" items"),new Promise(d((function(e){a.async?"function"==typeof a.async?a.async.call(this,this.renderQueue,e):this.renderQueue.length>0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,e)):e():(this.renderQueue.forEach(this.paint,this),e())}),this))}),this))}function g(e){return e.parent&&e.parent.clip.length}function x(){}m.prototype.calculateOverflowClips=function(){this.nodes.forEach((function(e){if(F(e)){N(e)&&e.appendToDOM(),e.borders=this.parseBorders(e);var t="hidden"===e.css("overflow")?[e.borders.clip]:[],i=e.parseClip();i&&-1!==["absolute","fixed"].indexOf(e.css("position"))&&t.push([["rect",e.bounds.left+i.left,e.bounds.top+i.top,i.right-i.left,i.bottom-i.top]]),e.clip=g(e)?e.parent.clip.concat(t):t,e.backgroundClip="hidden"!==e.css("overflow")?e.clip.concat([e.borders.clip]):e.clip,N(e)&&e.cleanDOM()}else G(e)&&(e.clip=g(e)?e.parent.clip:[]);N(e)||(e.bounds=null)}),this)},m.prototype.asyncRenderer=function(e,t,i){i=i||Date.now(),this.paint(e[this.renderIndex++]),e.length===this.renderIndex?t():i+20>Date.now()?this.asyncRenderer(e,t,i):setTimeout(d((function(){this.asyncRenderer(e,t)}),this),0)},m.prototype.createPseudoHideStyles=function(e){this.createStyles(e,"."+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},m.prototype.disableAnimations=function(e){this.createStyles(e,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},m.prototype.createStyles=function(e,t){var i=e.createElement("style");i.innerHTML=t,e.body.appendChild(i)},m.prototype.getPseudoElements=function(e){var t=[[e]];if(e.node.nodeType===Node.ELEMENT_NODE){var i=this.getPseudoElement(e,":before"),n=this.getPseudoElement(e,":after");i&&t.push(i),n&&t.push(n)}return k(t)},m.prototype.getPseudoElement=function(e,t){var i,n,r=e.computedStyle(t);if(!r||!r.content||"none"===r.content||"-moz-alt-content"===r.content||"none"===r.display)return null;for(var o=(i=r.content,n=void 0,(n=i.substr(0,1))===i.substr(i.length-1)&&n.match(/'|"/)?i.substr(1,i.length-2):i),l="url"===o.substr(0,3),u=document.createElement(l?"img":"html2canvaspseudoelement"),c=new s(u,e,t),h=r.length-1;h>=0;h--){var d=r.item(h).replace(/(\-[a-z])/g,(function(e){return e.toUpperCase().replace("-","")}));u.style[d]=r[d]}if(u.className=s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+s.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,l)return u.src=p(o)[0].args[0],[c];var f=document.createTextNode(o);return u.appendChild(f),[c,new a(f,c)]},m.prototype.getChildren=function(e){return k([].filter.call(e.node.childNodes,O).map((function(t){var i=[t.nodeType===Node.TEXT_NODE?new a(t,e):new o(t,e)].filter(V);return t.nodeType===Node.ELEMENT_NODE&&i.length&&"TEXTAREA"!==t.tagName?i[0].isElementVisible()?i.concat(this.getChildren(i[0])):[]:i}),this))},m.prototype.newStackingContext=function(e,t){var i=new c(t,e.getOpacity(),e.node,e.parent);e.cloneTo(i),(t?i.getParentStack(this):i.parent.stack).contexts.push(i),e.stack=i},m.prototype.createStackingContexts=function(){this.nodes.forEach((function(e){var t,i;F(e)&&(this.isRootElement(e)||e.getOpacity()<1||(i=(t=e).css("position"),"auto"!==(-1!==["absolute","relative","fixed"].indexOf(i)?t.css("zIndex"):"auto"))||this.isBodyWithTransparentRoot(e)||e.hasTransform())?this.newStackingContext(e,!0):F(e)&&(D(e)&&A(e)||-1!==["inline-block","inline-table"].indexOf(e.css("display"))||I(e))?this.newStackingContext(e,!1):e.assignStack(e.parent.stack)}),this)},m.prototype.isBodyWithTransparentRoot=function(e){return"BODY"===e.node.nodeName&&e.parent.color("backgroundColor").isTransparent()},m.prototype.isRootElement=function(e){return null===e.parent},m.prototype.sortStackingContexts=function(e){var t;e.contexts.sort((t=e.contexts.slice(0),function(e,i){return e.cssInt("zIndex")+t.indexOf(e)/t.length-(i.cssInt("zIndex")+t.indexOf(i)/t.length)})),e.contexts.forEach(this.sortStackingContexts,this)},m.prototype.parseTextBounds=function(e){return function(t,i,n){if("none"!==e.parent.css("textDecoration").substr(0,4)||0!==t.trim().length){if(this.support.rangeBounds&&!e.parent.hasTransform()){var r=n.slice(0,i).join("").length;return this.getRangeBounds(e.node,r,t.length)}if(e.node&&"string"==typeof e.node.data){var o=e.node.splitText(t.length),a=this.getWrapperBounds(e.node,e.parent.hasTransform());return e.node=o,a}}else(!this.support.rangeBounds||e.parent.hasTransform())&&(e.node=e.node.splitText(t.length));return{}}},m.prototype.getWrapperBounds=function(e,t){var i=e.ownerDocument.createElement("html2canvaswrapper"),n=e.parentNode,r=e.cloneNode(!0);i.appendChild(e.cloneNode(!0)),n.replaceChild(i,e);var o=t?_(i):f(i);return n.replaceChild(r,i),o},m.prototype.getRangeBounds=function(e,t,i){var n=this.range||(this.range=e.ownerDocument.createRange());return n.setStart(e,t),n.setEnd(e,t+i),n.getBoundingClientRect()},m.prototype.parse=function(e){var t=e.contexts.filter(E),i=e.children.filter(F),n=i.filter(B(I)),r=n.filter(B(D)).filter(B(L)),o=i.filter(B(D)).filter(I),a=n.filter(B(D)).filter(L),s=e.contexts.concat(n.filter(D)).filter(A),l=e.children.filter(G).filter(R),u=e.contexts.filter(P);t.concat(r).concat(o).concat(a).concat(s).concat(l).concat(u).forEach((function(e){this.renderQueue.push(e),M(e)&&(this.parse(e),this.renderQueue.push(new x))}),this)},m.prototype.paint=function(e){try{e instanceof x?this.renderer.ctx.restore():G(e)?(N(e.parent)&&e.parent.appendToDOM(),this.paintText(e),N(e.parent)&&e.parent.cleanDOM()):this.paintNode(e)}catch(e){if(n(e),this.options.strict)throw e}},m.prototype.paintNode=function(e){M(e)&&(this.renderer.setOpacity(e.opacity),this.renderer.ctx.save(),e.hasTransform()&&this.renderer.setTransform(e.parseTransform())),"INPUT"===e.node.nodeName&&"checkbox"===e.node.type?this.paintCheckbox(e):"INPUT"===e.node.nodeName&&"radio"===e.node.type?this.paintRadio(e):this.paintElement(e)},m.prototype.paintElement=function(e){var t=e.parseBounds();this.renderer.clip(e.backgroundClip,(function(){this.renderer.renderBackground(e,t,e.borders.borders.map(U))}),this,e),this.renderer.mask(e.backgroundClip,(function(){this.renderer.renderShadows(e,e.borders.clip)}),this,e),this.renderer.clip(e.clip,(function(){this.renderer.renderBorders(e.borders.borders)}),this,e),this.renderer.clip(e.backgroundClip,(function(){switch(e.node.nodeName){case"svg":case"IFRAME":var i=this.images.get(e.node);i?this.renderer.renderImage(e,t,e.borders,i):n("Error loading <"+e.node.nodeName+">",e.node);break;case"IMG":var r=this.images.get(e.node.src);r?this.renderer.renderImage(e,t,e.borders,r):n("Error loading <img>",e.node.src);break;case"CANVAS":this.renderer.renderImage(e,t,e.borders,{image:e.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(e)}}),this,e)},m.prototype.paintCheckbox=function(e){var t=e.parseBounds(),i=Math.min(t.width,t.height),n={width:i-1,height:i-1,top:t.top,left:t.left},r=[3,3],o=[r,r,r,r],a=[1,1,1,1].map((function(e){return{color:new u("#A5A5A5"),width:e}})),s=b(n,o,a);this.renderer.clip(e.backgroundClip,(function(){this.renderer.rectangle(n.left+1,n.top+1,n.width-2,n.height-2,new u("#DEDEDE")),this.renderer.renderBorders(v(a,n,s,o)),e.node.checked&&(this.renderer.font(new u("#424242"),"normal","normal","bold",i-3+"px","arial"),this.renderer.text("✔",n.left+i/6,n.top+i-1))}),this,e)},m.prototype.paintRadio=function(e){var t=e.parseBounds(),i=Math.min(t.width,t.height)-2;this.renderer.clip(e.backgroundClip,(function(){this.renderer.circleStroke(t.left+1,t.top+1,i,new u("#DEDEDE"),1,new u("#A5A5A5")),e.node.checked&&this.renderer.circle(Math.ceil(t.left+i/4)+1,Math.ceil(t.top+i/4)+1,Math.floor(i/2),new u("#424242"))}),this,e)},m.prototype.paintFormValue=function(e){var t=e.getValue();if(t.length>0){var i=e.node.ownerDocument,r=i.createElement("html2canvaswrapper");["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"].forEach((function(t){try{r.style[t]=e.css(t)}catch(e){n("html2canvas: Parse: Exception caught in renderFormValue: "+e.message)}}));var o=e.parseBounds();r.style.position="fixed",r.style.left=o.left+"px",r.style.top=o.top+"px",r.textContent=t,i.body.appendChild(r),this.paintText(new a(r.firstChild,e)),i.body.removeChild(r)}},m.prototype.paintText=function(e){e.applyTextTransform();var t,i=r.ucs2.decode(e.node.data),n=(!this.options.letterRendering||/^(normal|none|0px)$/.test(e.parent.css("letterSpacing")))&&(t=e.node.data,!/[^\u0000-\u00ff]/.test(t)),o=n?function(e){for(var t,i=[],n=0,o=!1;e.length;)W(e[n])===o?((t=e.splice(0,n)).length&&i.push(r.ucs2.encode(t)),o=!o,n=0):n++,n>=e.length&&(t=e.splice(0,n)).length&&i.push(r.ucs2.encode(t));return i}(i):i.map((function(e){return r.ucs2.encode([e])}));n||(e.parent.node.style.fontVariantLigatures="none");var a=e.parent.fontWeight(),s=e.parent.css("fontSize"),l=e.parent.css("fontFamily"),u=e.parent.parseTextShadows();this.renderer.font(e.parent.color("color"),e.parent.css("fontStyle"),e.parent.css("fontVariant"),a,s,l),u.length?this.renderer.fontShadow(u[0].color,u[0].offsetX,u[0].offsetY,u[0].blur):this.renderer.clearShadow(),this.renderer.clip(e.parent.clip,(function(){o.map(this.parseTextBounds(e),this).forEach((function(t,i){t&&(this.renderer.text(o[i],t.left,t.bottom),this.renderTextDecoration(e.parent,t,this.fontMetrics.getMetrics(l,s)))}),this)}),this,e.parent)},m.prototype.renderTextDecoration=function(e,t,i){switch(e.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(t.left,Math.round(t.top+i.baseline+i.lineWidth),t.width,1,e.color("color"));break;case"overline":this.renderer.rectangle(t.left,Math.round(t.top),t.width,1,e.color("color"));break;case"line-through":this.renderer.rectangle(t.left,Math.ceil(t.top+i.middle+i.lineWidth),t.width,1,e.color("color"))}};var y={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};function v(e,t,i,n){var r={top:t.top+e[0].width/2,right:t.right-e[1].width/2,bottom:t.bottom-e[2].width/2,left:t.left+e[3].width/2};return e.map((function(o,a){if(o.width>0){var s=t.left,l=t.top,u=t.width,c=t.height-e[2].width;switch(a){case 0:c=e[0].width,o.args=C({c1:[s,l],c2:[s+u,l],c3:[s+u-e[1].width,l+c],c4:[s+e[3].width,l+c]},n[0],n[1],i.topLeftOuter,i.topLeftInner,i.topRightOuter,i.topRightInner),o.pathArgs=S({c1:[r.left,r.top],c2:[r.right,r.top]},n[0],n[1],i.topLeft,i.topRight);break;case 1:s=t.left+t.width-e[1].width,u=e[1].width,o.args=C({c1:[s+u,l],c2:[s+u,l+c+e[2].width],c3:[s,l+c],c4:[s,l+e[0].width]},n[1],n[2],i.topRightOuter,i.topRightInner,i.bottomRightOuter,i.bottomRightInner),o.pathArgs=S({c1:[r.right,r.top],c2:[r.right,r.bottom]},n[1],n[2],i.topRight,i.bottomRight);break;case 2:l=l+t.height-e[2].width,c=e[2].width,o.args=C({c1:[s+u,l+c],c2:[s,l+c],c3:[s+e[3].width,l],c4:[s+u-e[3].width,l]},n[2],n[3],i.bottomRightOuter,i.bottomRightInner,i.bottomLeftOuter,i.bottomLeftInner),o.pathArgs=S({c1:[r.right,r.bottom],c2:[r.left,r.bottom]},n[2],n[3],i.bottomRight,i.bottomLeft);break;case 3:u=e[3].width,o.args=C({c1:[s,l+c+e[2].width],c2:[s,l],c3:[s+u,l+e[0].width],c4:[s+u,l+c]},n[3],n[0],i.bottomLeftOuter,i.bottomLeftInner,i.topLeftOuter,i.topLeftInner),o.pathArgs=S({c1:[r.left,r.bottom],c2:[r.left,r.top]},n[3],n[0],i.bottomLeft,i.topLeft)}}return o}))}function $(e,t,i,n){var r=(Math.sqrt(2)-1)/3*4,o=i*r,a=n*r,s=e+i,l=t+n;return{topLeft:T({x:e,y:l},{x:e,y:l-a},{x:s-o,y:t},{x:s,y:t}),topRight:T({x:e,y:t},{x:e+o,y:t},{x:s,y:l-a},{x:s,y:l}),bottomRight:T({x:s,y:t},{x:s,y:t+a},{x:e+o,y:l},{x:e,y:l}),bottomLeft:T({x:s,y:l},{x:s-o,y:l},{x:e,y:t+a},{x:e,y:t})}}function b(e,t,i){var n=e.left,r=e.top,o=e.width,a=e.height,s=t[0][0]<o/2?t[0][0]:o/2,l=t[0][1]<a/2?t[0][1]:a/2,u=t[1][0]<o/2?t[1][0]:o/2,c=t[1][1]<a/2?t[1][1]:a/2,h=t[2][0]<o/2?t[2][0]:o/2,d=t[2][1]<a/2?t[2][1]:a/2,f=t[3][0]<o/2?t[3][0]:o/2,p=t[3][1]<a/2?t[3][1]:a/2,_=o-u,m=a-d,g=o-h,x=a-p;return{topLeft:$(n+i[3].width/2,r+i[0].width/2,Math.max(0,s-i[3].width/2),Math.max(0,l-i[0].width/2)).topLeft.subdivide(.5),topRight:$(n+Math.min(_,o+i[3].width/2),r+i[0].width/2,_>o+i[3].width/2?0:u-i[3].width/2,c-i[0].width/2).topRight.subdivide(.5),bottomRight:$(n+Math.min(g,o-i[3].width/2),r+Math.min(m,a+i[0].width/2),Math.max(0,h-i[1].width/2),d-i[2].width/2).bottomRight.subdivide(.5),bottomLeft:$(n+i[3].width/2,r+x,Math.max(0,f-i[3].width/2),p-i[2].width/2).bottomLeft.subdivide(.5),topLeftOuter:$(n,r,s,l).topLeft.subdivide(.5),topLeftInner:$(n+i[3].width,r+i[0].width,Math.max(0,s-i[3].width),Math.max(0,l-i[0].width)).topLeft.subdivide(.5),topRightOuter:$(n+_,r,u,c).topRight.subdivide(.5),topRightInner:$(n+Math.min(_,o+i[3].width),r+i[0].width,_>o+i[3].width?0:u-i[3].width,c-i[0].width).topRight.subdivide(.5),bottomRightOuter:$(n+g,r+m,h,d).bottomRight.subdivide(.5),bottomRightInner:$(n+Math.min(g,o-i[3].width),r+Math.min(m,a+i[0].width),Math.max(0,h-i[1].width),d-i[2].width).bottomRight.subdivide(.5),bottomLeftOuter:$(n,r+x,f,p).bottomLeft.subdivide(.5),bottomLeftInner:$(n+i[3].width,r+x,Math.max(0,f-i[3].width),p-i[2].width).bottomLeft.subdivide(.5)}}function T(e,t,i,n){var r=function(e,t,i){return{x:e.x+(t.x-e.x)*i,y:e.y+(t.y-e.y)*i}};return{start:e,startControl:t,endControl:i,end:n,subdivide:function(o){var a=r(e,t,o),s=r(t,i,o),l=r(i,n,o),u=r(a,s,o),c=r(s,l,o),h=r(u,c,o);return[T(e,a,u,h),T(h,c,l,n)]},curveTo:function(e){e.push(["bezierCurve",t.x,t.y,i.x,i.y,n.x,n.y])},curveToReversed:function(n){n.push(["bezierCurve",i.x,i.y,t.x,t.y,e.x,e.y])}}}function C(e,t,i,n,r,o,a){var s=[];return t[0]>0||t[1]>0?(s.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(s)):s.push(["line",e.c1[0],e.c1[1]]),i[0]>0||i[1]>0?(s.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(s),s.push(["line",a[0].end.x,a[0].end.y]),a[0].curveToReversed(s)):(s.push(["line",e.c2[0],e.c2[1]]),s.push(["line",e.c3[0],e.c3[1]])),t[0]>0||t[1]>0?(s.push(["line",r[1].end.x,r[1].end.y]),r[1].curveToReversed(s)):s.push(["line",e.c4[0],e.c4[1]]),s}function S(e,t,i,n,r){var o=[];return t[0]>0||t[1]>0?(o.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(o)):o.push(["line",e.c1[0],e.c1[1]]),i[0]>0||i[1]>0?(o.push(["line",r[0].start.x,r[0].start.y]),r[0].curveTo(o)):o.push(["line",e.c2[0],e.c2[1]]),o}function w(e,t,i,n,r,o,a){t[0]>0||t[1]>0?(e.push(["line",n[0].start.x,n[0].start.y]),n[0].curveTo(e),n[1].curveTo(e)):e.push(["line",o,a]),(i[0]>0||i[1]>0)&&e.push(["line",r[0].start.x,r[0].start.y])}function E(e){return e.cssInt("zIndex")<0}function P(e){return e.cssInt("zIndex")>0}function A(e){return 0===e.cssInt("zIndex")}function L(e){return-1!==["inline","inline-block","inline-table"].indexOf(e.css("display"))}function M(e){return e instanceof c}function R(e){return e.node.data.trim().length>0}function O(e){return e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE}function D(e){return"static"!==e.css("position")}function I(e){return"none"!==e.css("float")}function B(e){var t=this;return function(){return!e.apply(t,arguments)}}function F(e){return e.node.nodeType===Node.ELEMENT_NODE}function N(e){return!0===e.isPseudoElement}function G(e){return e.node.nodeType===Node.TEXT_NODE}function z(e){return parseInt(e,10)}function U(e){return e.width}function V(e){return e.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(e.node.nodeName)}function k(e){return[].concat.apply([],e)}function W(e){return-1!==[32,13,10,9,45].indexOf(e)}m.prototype.parseBorders=function(e){var t,i=e.parseBounds(),n=(t=e,["TopLeft","TopRight","BottomRight","BottomLeft"].map((function(e){var i=t.css("border"+e+"Radius").split(" ");return i.length<=1&&(i[1]=i[0]),i.map(z)}))),r=["Top","Right","Bottom","Left"].map((function(t,i){var n=e.css("border"+t+"Style"),r=e.color("border"+t+"Color");"inset"===n&&r.isBlack()&&(r=new u([255,255,255,r.a]));var o=y[n]?y[n][i]:null;return{width:e.cssInt("border"+t+"Width"),color:o?r[o[0]](o[1]):r,style:n,pathArgs:null,args:null}})),o=b(i,n,r);return{clip:this.parseBackgroundClip(e,o,r,n,i),borders:v(r,i,o,n)}},m.prototype.parseBackgroundClip=function(e,t,i,n,r){var o=[];switch(e.css("backgroundClip")){case"content-box":case"padding-box":w(o,n[0],n[1],t.topLeftInner,t.topRightInner,r.left+i[3].width,r.top+i[0].width),w(o,n[1],n[2],t.topRightInner,t.bottomRightInner,r.left+r.width-i[1].width,r.top+i[0].width),w(o,n[2],n[3],t.bottomRightInner,t.bottomLeftInner,r.left+r.width-i[1].width,r.top+r.height-i[2].width),w(o,n[3],n[0],t.bottomLeftInner,t.topLeftInner,r.left+i[3].width,r.top+r.height-i[2].width);break;default:w(o,n[0],n[1],t.topLeftOuter,t.topRightOuter,r.left,r.top),w(o,n[1],n[2],t.topRightOuter,t.bottomRightOuter,r.left+r.width,r.top),w(o,n[2],n[3],t.bottomRightOuter,t.bottomLeftOuter,r.left+r.width,r.top+r.height),w(o,n[3],n[0],t.bottomLeftOuter,t.topLeftOuter,r.left,r.top+r.height)}return o},t.exports=m},{"./color":3,"./fontmetrics":7,"./log":13,"./nodecontainer":14,"./pseudoelementcontainer":18,"./stackingcontext":21,"./textcontainer":25,"./utils":26,punycode:1}],16:[function(e,t,i){var n=e("./xhr"),r=e("./utils"),o=e("./log"),a=e("./clone"),s=r.decode64;function l(e,t,i){var r="withCredentials"in new XMLHttpRequest;if(!t)return Promise.reject("No proxy configured");var o=h(r),a=d(t,e,o);return r?n(a):c(i,a,o).then((function(e){return s(e.content)}))}var u=0;function c(e,t,i){return new Promise((function(n,r){var o=e.createElement("script"),a=function(){delete window.html2canvas.proxy[i],e.body.removeChild(o)};window.html2canvas.proxy[i]=function(e){a(),n(e)},o.src=t,o.onerror=function(e){a(),r(e)},e.body.appendChild(o)}))}function h(e){return e?"":"html2canvas_"+Date.now()+"_"+ ++u+"_"+Math.round(1e5*Math.random())}function d(e,t,i){return e+"?url="+encodeURIComponent(t)+(i.length?"&callback=html2canvas.proxy."+i:"")}i.Proxy=l,i.ProxyURL=function(e,t,i){var n="crossOrigin"in new Image,r=h(n),o=d(t,e,r);return n?Promise.resolve(o):c(i,o,r).then((function(e){return"data:"+e.type+";base64,"+e.content}))},i.loadUrlDocument=function(e,t,i,n,r,s){return new l(e,t,window.document).then((u=e,function(e){var t,i=new DOMParser;try{t=i.parseFromString(e,"text/html")}catch{o("DOMParser not supported, falling back to createHTMLDocument"),t=document.implementation.createHTMLDocument("");try{t.open(),t.write(e),t.close()}catch{o("createHTMLDocument write not supported, falling back to document.body.innerHTML"),t.body.innerHTML=e}}var n=t.querySelector("base");if(!n||!n.href.host){var r=t.createElement("base");r.href=u,t.head.insertBefore(r,t.head.firstChild)}return t})).then((function(e){return a(e,i,n,r,s,0,0)}));var u}},{"./clone":2,"./log":13,"./utils":26,"./xhr":28}],17:[function(e,t,i){var n=e("./proxy").ProxyURL;t.exports=function(e,t){var i=document.createElement("a");i.href=e,e=i.href,this.src=e,this.image=new Image;var r=this;this.promise=new Promise((function(i,o){r.image.crossOrigin="Anonymous",r.image.onload=i,r.image.onerror=o,new n(e,t,document).then((function(e){r.image.src=e})).catch(o)}))}},{"./proxy":16}],18:[function(e,t,i){var n=e("./nodecontainer");function r(e,t,i){n.call(this,e,t),this.isPseudoElement=!0,this.before=":before"===i}r.prototype.cloneTo=function(e){r.prototype.cloneTo.call(this,e),e.isPseudoElement=!0,e.before=this.before},r.prototype=Object.create(n.prototype),r.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},r.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},r.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",t.exports=r},{"./nodecontainer":14}],19:[function(e,t,i){var n=e("./log");function r(e,t,i,n,r){this.width=e,this.height=t,this.images=i,this.options=n,this.document=r}r.prototype.renderImage=function(e,t,i,n){var r=e.cssInt("paddingLeft"),o=e.cssInt("paddingTop"),a=e.cssInt("paddingRight"),s=e.cssInt("paddingBottom"),l=i.borders,u=t.width-(l[1].width+l[3].width+r+a),c=t.height-(l[0].width+l[2].width+o+s);this.drawImage(n,0,0,n.image.width||u,n.image.height||c,t.left+r+l[3].width,t.top+o+l[0].width,u,c)},r.prototype.renderBackground=function(e,t,i){t.height>0&&t.width>0&&(this.renderBackgroundColor(e,t),this.renderBackgroundImage(e,t,i))},r.prototype.renderBackgroundColor=function(e,t){var i=e.color("backgroundColor");i.isTransparent()||this.rectangle(t.left,t.top,t.width,t.height,i)},r.prototype.renderShadows=function(e,t){var i=e.css("boxShadow");if("none"!==i){var n=i.split(/,(?![^(]*\))/);this.shadow(t,n)}},r.prototype.renderBorders=function(e){e.forEach(this.renderBorder,this)},r.prototype.renderBorder=function(e){if(!e.color.isTransparent()&&null!==e.args)if("dashed"===e.style||"dotted"===e.style){var t="dashed"===e.style?3:e.width;this.ctx.setLineDash([t]),this.path(e.pathArgs),this.ctx.strokeStyle=e.color,this.ctx.lineWidth=e.width,this.ctx.stroke()}else this.drawShape(e.args,e.color)},r.prototype.renderBackgroundImage=function(e,t,i){e.parseBackgroundImages().reverse().forEach((function(r,o,a){switch(r.method){case"url":var s=this.images.get(r.args[0]);s?this.renderBackgroundRepeating(e,t,s,a.length-(o+1),i):n("Error loading background-image",r.args[0]);break;case"linear-gradient":case"gradient":var l=this.images.get(r.value);l?this.renderBackgroundGradient(l,t,i):n("Error loading background-image",r.args[0]);break;case"none":break;default:n("Unknown background-image type",r.args[0])}}),this)},r.prototype.renderBackgroundRepeating=function(e,t,i,n,r){var o=e.parseBackgroundSize(t,i.image,n),a=e.parseBackgroundPosition(t,i.image,n,o);switch(e.parseBackgroundRepeat(n)){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(i,a,o,t,t.left+r[3],t.top+a.top+r[0],99999,o.height,r);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(i,a,o,t,t.left+a.left+r[3],t.top+r[0],o.width,99999,r);break;case"no-repeat":this.backgroundRepeatShape(i,a,o,t,t.left+a.left+r[3],t.top+a.top+r[0],o.width,o.height,r);break;default:this.renderBackgroundRepeat(i,a,o,{top:t.top,left:t.left},r[3],r[0])}},t.exports=r},{"./log":13}],20:[function(e,t,i){var n=e("../renderer"),r=e("../lineargradientcontainer"),o=e("../log");function a(e,t){n.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.options.canvas||(this.options.dpi&&(this.options.scale=this.options.dpi/96),this.options.scale?(this.canvas.style.width=e+"px",this.canvas.style.height=t+"px",this.canvas.width=Math.floor(e*this.options.scale),this.canvas.height=Math.floor(t*this.options.scale),this.ctx.scale(this.options.scale,this.options.scale)):(this.canvas.width=e,this.canvas.height=t)),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},o("Initialized CanvasRenderer with size",e,"x",t)}function s(e){return e.length>0}a.prototype=Object.create(n.prototype),a.prototype.setFillStyle=function(e){return this.ctx.fillStyle="object"==typeof e&&e.isColor?e.toString():e,this.ctx},a.prototype.rectangle=function(e,t,i,n,r){this.setFillStyle(r).fillRect(e,t,i,n)},a.prototype.circle=function(e,t,i,n){this.setFillStyle(n),this.ctx.beginPath(),this.ctx.arc(e+i/2,t+i/2,i/2,0,2*Math.PI,!0),this.ctx.closePath(),this.ctx.fill()},a.prototype.circleStroke=function(e,t,i,n,r,o){this.circle(e,t,i,n),this.ctx.strokeStyle=o.toString(),this.ctx.stroke()},a.prototype.shadow=function(e,t){var i=this.setFillStyle("white");i.save(),this.shape(e),t.forEach((function(e){var t=function(e){var t={color:/^(#|rgb|hsl|(?!(inset|initial|inherit))\D+)/i,inset:/^inset/i,px:/px$/i},i=["x","y","blur","spread"],n=e.split(/ (?![^(]*\))/),r={};for(var o in t)r[o]=n.filter(t[o].test.bind(t[o])),r[o]=0===r[o].length?null:1===r[o].length?r[o][0]:r[o];for(var a=0;a<r.px.length;a++)r[i[a]]=parseInt(r.px[a]);return r}(e);t.inset||(i.shadowOffsetX=t.x,i.shadowOffsetY=t.y,i.shadowColor=t.color,i.shadowBlur=t.blur,i.fill())}),this),i.restore()},a.prototype.drawShape=function(e,t){this.shape(e),this.setFillStyle(t).fill()},a.prototype.taints=function(e){if(null===e.tainted){this.taintCtx.drawImage(e.image,0,0);try{this.taintCtx.getImageData(0,0,1,1),e.tainted=!1}catch{this.taintCtx=document.createElement("canvas").getContext("2d"),e.tainted=!0}}return e.tainted},a.prototype.drawImage=function(e,t,i,n,r,o,a,s,l){(!this.taints(e)||this.options.allowTaint)&&this.ctx.drawImage(e.image,t,i,n,r,o,a,s,l)},a.prototype.clip=function(e,t,i,n){this.ctx.save(),n&&n.hasTransform()?(this.setTransform(n.inverseTransform()),e.filter(s).forEach((function(e){this.shape(e).clip()}),this),this.setTransform(n.parseTransform())):e.filter(s).forEach((function(e){this.shape(e).clip()}),this),t.call(i),this.ctx.restore()},a.prototype.mask=function(e,t,i,n){var r=e[e.length-1];if(r&&r.length){var o=[["rect",this.canvas.width,0,-this.canvas.width,this.canvas.height]].concat(r).concat([r[0]]);e=e.slice(0,-1).concat([o])}this.clip(e,t,i,n)},a.prototype.shape=function(e){return this.ctx.beginPath(),e.forEach((function(e,t){"rect"===e[0]?this.ctx.rect.apply(this.ctx,e.slice(1)):this.ctx[0===t?"moveTo":e[0]+"To"].apply(this.ctx,e.slice(1))}),this),this.ctx.closePath(),this.ctx},a.prototype.path=function(e){return this.ctx.beginPath(),e.forEach((function(e,t){"rect"===e[0]?this.ctx.rect.apply(this.ctx,e.slice(1)):this.ctx[0===t?"moveTo":e[0]+"To"].apply(this.ctx,e.slice(1))}),this),this.ctx},a.prototype.font=function(e,t,i,n,r,o){i=/^(normal|small-caps)$/i.test(i)?i:"",this.setFillStyle(e).font=[t,i,n,r,o].join(" ").split(",")[0]},a.prototype.fontShadow=function(e,t,i,n){this.setVariable("shadowColor",e.toString()).setVariable("shadowOffsetY",t).setVariable("shadowOffsetX",i).setVariable("shadowBlur",n)},a.prototype.clearShadow=function(){this.setVariable("shadowColor","rgba(0,0,0,0)")},a.prototype.setOpacity=function(e){this.ctx.globalAlpha=e},a.prototype.setTransform=function(e){this.ctx.translate(e.origin[0],e.origin[1]),this.ctx.transform.apply(this.ctx,e.matrix),this.ctx.translate(-e.origin[0],-e.origin[1])},a.prototype.setVariable=function(e,t){return this.variables[e]!==t&&(this.variables[e]=this.ctx[e]=t),this},a.prototype.text=function(e,t,i){this.ctx.fillText(e,t,i)},a.prototype.backgroundRepeatShape=function(e,t,i,n,r,o,a,s,l){var u=[["line",Math.round(r),Math.round(o)],["line",Math.round(r+a),Math.round(o)],["line",Math.round(r+a),Math.round(s+o)],["line",Math.round(r),Math.round(s+o)]];this.clip([u],(function(){this.renderBackgroundRepeat(e,t,i,n,l[3],l[0])}),this)},a.prototype.renderBackgroundRepeat=function(e,t,i,n,r,o){var a=Math.round(n.left+t.left+r),s=Math.round(n.top+t.top+o);this.setFillStyle(this.ctx.createPattern(this.resizeImage(e,i),"repeat")),this.ctx.translate(a,s),this.ctx.fill(),this.ctx.translate(-a,-s)},a.prototype.renderBackgroundGradient=function(e,t){if(e instanceof r){var i=this.ctx.createLinearGradient(t.left+t.width*e.x0,t.top+t.height*e.y0,t.left+t.width*e.x1,t.top+t.height*e.y1);e.colorStops.forEach((function(e){i.addColorStop(e.stop,e.color.toString())})),this.rectangle(t.left,t.top,t.width,t.height,i)}},a.prototype.resizeImage=function(e,t){var i=e.image;if(i.width===t.width&&i.height===t.height)return i;var n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(i,0,0,i.width,i.height,0,0,t.width,t.height),n},t.exports=a},{"../lineargradientcontainer":12,"../log":13,"../renderer":19}],21:[function(e,t,i){var n=e("./nodecontainer");function r(e,t,i,r){n.call(this,i,r),this.ownStacking=e,this.contexts=[],this.children=[],this.opacity=(this.parent?this.parent.stack.opacity:1)*t}r.prototype=Object.create(n.prototype),r.prototype.getParentStack=function(e){var t=this.parent?this.parent.stack:null;return t?t.ownStacking?t:t.getParentStack(e):e.stack},t.exports=r},{"./nodecontainer":14}],22:[function(e,t,i){function n(e){this.rangeBounds=this.testRangeBounds(e),this.cors=this.testCORS(),this.svg=this.testSVG()}n.prototype.testRangeBounds=function(e){var t,i,n=!1;return e.createRange&&((t=e.createRange()).getBoundingClientRect&&((i=e.createElement("boundtest")).style.height="123px",i.style.display="block",e.body.appendChild(i),t.selectNode(i),123===t.getBoundingClientRect().height&&(n=!0),e.body.removeChild(i))),n},n.prototype.testCORS=function(){return typeof(new Image).crossOrigin<"u"},n.prototype.testSVG=function(){var e=new Image,t=document.createElement("canvas"),i=t.getContext("2d");e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(e,0,0),t.toDataURL()}catch{return!1}return!0},t.exports=n},{}],23:[function(e,t,i){var n=e("./xhr"),r=e("./utils").decode64;function o(e){this.src=e,this.image=null;var t=this;this.promise=this.hasFabric().then((function(){return t.isInline(e)?Promise.resolve(t.inlineFormatting(e)):n(e)})).then((function(e){return new Promise((function(i){window.html2canvas.svg.fabric.loadSVGFromString(e,t.createCanvas.call(t,i))}))}))}o.prototype.hasFabric=function(){return window.html2canvas.svg&&window.html2canvas.svg.fabric?Promise.resolve():Promise.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},o.prototype.inlineFormatting=function(e){return/^data:image\/svg\+xml;base64,/.test(e)?this.decode64(this.removeContentType(e)):this.removeContentType(e)},o.prototype.removeContentType=function(e){return e.replace(/^data:image\/svg\+xml(;base64)?,/,"")},o.prototype.isInline=function(e){return/^data:image\/svg\+xml/i.test(e)},o.prototype.createCanvas=function(e){var t=this;return function(i,n){var r=new window.html2canvas.svg.fabric.StaticCanvas("c");t.image=r.lowerCanvasEl,r.setWidth(n.width).setHeight(n.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(i,n)).renderAll(),e(r.lowerCanvasEl)}},o.prototype.decode64=function(e){return"function"==typeof window.atob?window.atob(e):r(e)},t.exports=o},{"./utils":26,"./xhr":28}],24:[function(e,t,i){var n=e("./svgcontainer");function r(e,t){this.src=e,this.image=null;var i=this;this.promise=t?new Promise((function(t,n){i.image=new Image,i.image.onload=t,i.image.onerror=n,i.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(e),!0===i.image.complete&&t(i.image)})):this.hasFabric().then((function(){return new Promise((function(t){window.html2canvas.svg.fabric.parseSVGDocument(e,i.createCanvas.call(i,t))}))}))}r.prototype=Object.create(n.prototype),t.exports=r},{"./svgcontainer":23}],25:[function(e,t,i){var n=e("./nodecontainer");function r(e,t){n.call(this,e,t)}function o(e,t,i){if(e.length>0)return t+i.toUpperCase()}r.prototype=Object.create(n.prototype),r.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},r.prototype.transform=function(e){var t=this.node.data;switch(e){case"lowercase":return t.toLowerCase();case"capitalize":return t.replace(/(^|\s|:|-|\(|\))([a-z])/g,o);case"uppercase":return t.toUpperCase();default:return t}},t.exports=r},{"./nodecontainer":14}],26:[function(e,t,i){i.smallImage=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},i.bind=function(e,t){return function(){return e.apply(t,arguments)}},i.decode64=function(e){var t,i,n,r,o,a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=e.length,c="";for(t=0;t<u;t+=4)o=l.indexOf(e[t])<<2|(i=l.indexOf(e[t+1]))>>4,a=(15&i)<<4|(n=l.indexOf(e[t+2]))>>2,s=(3&n)<<6|(r=l.indexOf(e[t+3])),c+=64===n?String.fromCharCode(o):64===r||-1===r?String.fromCharCode(o,a):String.fromCharCode(o,a,s);return c},i.getBounds=function(e){if(e.getBoundingClientRect){var t=e.getBoundingClientRect(),i=null==e.offsetWidth?t.width:e.offsetWidth;return{top:t.top,bottom:t.bottom||t.top+t.height,right:t.left+i,left:t.left,width:i,height:null==e.offsetHeight?t.height:e.offsetHeight}}return{}},i.offsetBounds=function(e){var t=e.offsetParent?i.offsetBounds(e.offsetParent):{top:0,left:0};return{top:e.offsetTop+t.top,bottom:e.offsetTop+e.offsetHeight+t.top,right:e.offsetLeft+t.left+e.offsetWidth,left:e.offsetLeft+t.left,width:e.offsetWidth,height:e.offsetHeight}},i.parseBackgrounds=function(e){var t,i,n,r,o,a,s,l=[],u=0,c=0,h=function(){t&&('"'===i.substr(0,1)&&(i=i.substr(1,i.length-2)),i&&s.push(i),"-"===t.substr(0,1)&&(r=t.indexOf("-",1)+1)>0&&(n=t.substr(0,r),t=t.substr(r)),l.push({prefix:n,method:t.toLowerCase(),value:o,args:s,image:null})),s=[],t=n=i=o=""};return s=[],t=n=i=o="",e.split("").forEach((function(e){if(!(0===u&&" \r\n\t".indexOf(e)>-1)){switch(e){case'"':a?a===e&&(a=null):a=e;break;case"(":if(a)break;if(0===u)return u=1,void(o+=e);c++;break;case")":if(a)break;if(1===u){if(0===c)return u=0,o+=e,void h();c--}break;case",":if(a)break;if(0===u)return void h();if(1===u&&0===c&&!t.match(/^url$/i))return s.push(i),i="",void(o+=e)}o+=e,0===u?t+=e:i+=e}})),h(),l}},{}],27:[function(e,t,i){var n=e("./gradientcontainer");function r(e){n.apply(this,arguments),this.type="linear"===e.args[0]?n.TYPES.LINEAR:n.TYPES.RADIAL}r.prototype=Object.create(n.prototype),t.exports=r},{"./gradientcontainer":9}],28:[function(e,t,i){t.exports=function(e){return new Promise((function(t,i){var n=new XMLHttpRequest;n.open("GET",e),n.onload=function(){200===n.status?t(n.responseText):i(new Error(n.statusText))},n.onerror=function(){i(new Error("Network Error"))},n.send()}))}},{}]},{},[4])(4)}));var _0x4a4fab=html2canvas,_0x39853b=(_0x289862=!0,function(e,t){var i=_0x289862?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x289862=!1,i}),_0x55cd10=_0x39853b(void 0,(function(){return _0x55cd10.toString().search("(((.+)+)+)+$").toString().constructor(_0x55cd10).search("(((.+)+)+)+$")})),_0x289862;_0x55cd10();class _0x3c4ba1{constructor(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.rotateX=WebGLPlot.defaultValue(e.rotateX,0),this.rotateY=WebGLPlot.defaultValue(e.rotateY,0),this.rotateZ=WebGLPlot.defaultValue(e.rotateZ,0),this.offsetX=WebGLPlot.defaultValue(e.offsetX,0),this.offsetY=WebGLPlot.defaultValue(e.offsetY,0),this.offsetZ=WebGLPlot.defaultValue(e.offsetZ,0)}}var _0x443ecd=(_0x130afe=!0,function(e,t){var i=_0x130afe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x130afe=!1,i}),_0x4a6571=_0x443ecd(void 0,(function(){return _0x4a6571.toString().search("(((.+)+)+)+$").toString().constructor(_0x4a6571).search("(((.+)+)+)+$")})),_0x130afe;_0x4a6571();var _0x509f23=Object.freeze({simple:0,detail:1,notitle:2,notitle2:3,element:4}),_0x33c5a3=(_0xa1c9f4=!0,function(e,t){var i=_0xa1c9f4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xa1c9f4=!1,i}),_0x227143=_0x33c5a3(void 0,(function(){return _0x227143.toString().search("(((.+)+)+)+$").toString().constructor(_0x227143).search("(((.+)+)+)+$")})),_0xa1c9f4;_0x227143();var WebGLPlot$7=window.WebGLPlot=window.WebGLPlot||{};class _0x504ed3{constructor(){this.boxModelMatrix=null,this.symbol=null,this.fixedFrameTransform=WebGLPlot$7.Transforms.localFrameToFixedFrameGenerator("north","west")}static getElement(e){var t=null,i=null;return e===_0x509f23.detail?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0),i=".popup {position: absolute;border:0.1px solid white;}.popup-content-wrapper {max-height: 200px;overflow-y: auto;text-align: left;/*border-radius: 6px;*/background-color:rgb(48, 123, 250,0.3);}.popup-content {/* margin: 5px 20px;*/color: rgb(255, 255, 255); line-height: 0.5;font-size:xx-small;font-weight:normal;}.popup-content div {text-align: center;background-color: #8585bf;}.popup-content div {line-height: 1;}.popup-content table {margin-left: 1px;margin-right: 3px;}.popup-content table tr {height: 15px;}"):e===_0x509f23.notitle?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0),i=".popup {z-index:100;position: absolute;/*margin-left:400px;*/border:0.1px solid white;margin:1px;}.popup-content div{color: rgb(255, 255, 255);font-size:small;}.popup-content-wrapper {max-height: 200px;overflow-y: auto;/*height: 133px;padding: 1px;*/text-align: left;/*border-radius: 6px;*/background-color:rgb(67, 60, 252, 0.45);}.popup-content {color: rgb(255, 255, 255); line-height: 1;font-size:xx-small;font-weight:normal;}.popup-content div {line-height: 1;}.popup-content table {margin-left: 1px;margin-right: 3px;}.popup-content table tr {height: 15px;}"):e===_0x509f23.notitle2?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div id="trackPopUpLink" class="popup-content"></div></div></div>').get(0),i=".popup {position: absolute;border:0.05px solid white;padding:1px;}.popup-content div{color: rgb(255, 255, 255);font-size:small;}.popup-content-wrapper {height:50%;text-align: left;background-color:rgb(48, 123, 250,0.3);}.popup-content {color: rgb(255, 255, 255); line-height: 1;font-size:xx-small;font-weight:normal;}.popup-content div {line-height: 1;}.popup-content table {margin-left: 1px;margin-right: 3px;}.popup-content table tr {height: 15px;}"):e===_0x509f23.notitle3?(t=$('<div id="trackPopUpContent" class="popup"><div class="popup-content-wrapper"><div class="main"><div id="trackPopUpLink" class="popup-content"></div></div></div></div>').get(0),i=".popup {position: absolute;}.popup-content {padding:11.6px;color: rgb(255, 255, 255); line-height: 1;font-size:xx-small;font-weight:normal;}.popup-content div {line-height: 1;}.popup-content table tr {height: 15px;}.popup-content-wrapper .main{background: url('../Source/Assets/Images/overlayer.png') no-repeat;background-size: cover;}"):e===_0x509f23.simple&&(t=$('<div id="trackPopUpContent" class="popup"></div>').get(0),i=".popup {z-index: -1;position: absolute;text-align: center;/*font-weight:bold;*/color: rgb(255, 255, 255);background-color:rgb(255,0,0,0.3);border:0.1px solid red;}"),{element:t,style:i}}static getModelHeight(e){if(void 0===e)return 0;this.symbol=e.clone();var t=e.localPoints[0].clone(),i=e._model;let n=i.modelMatrix;var r=i._boundingSphere.center;let o=r.x>r.y?r.x:r.y;o=(o>r.z?o:r.z)*i.scale;var a=_0x2909c1.getModelMinAndMaxCorner(i),s=i.scale,l=WebGLPlot$7.Cartesian3.multiplyByScalar(WebGLPlot$7.Cartesian3.fromElements(a.minCorner.z,a.minCorner.x,a.minCorner.y),s,new WebGLPlot$7.Cartesian3),u=WebGLPlot$7.Cartesian3.multiplyByScalar(WebGLPlot$7.Cartesian3.fromElements(a.maxCorner.z,a.maxCorner.x,a.maxCorner.y),s,new WebGLPlot$7.Cartesian3),c=new WebGLPlot$7.AxisAlignedBoundingBox(l,u);this.BoundingBoxCenter=c.center,this.boxModelMatrix=this.computeBoundingBoxMatrix(t,e._modelRotate,n.clone(),this.fixedFrameTransform);var h=this.getLinePts(t,u,l,this.boxModelMatrix),d=[];for(let e=0;e<h.length;e++){let t=WebGLPlot$7.Cartographic.fromCartesian(h[e]);var f=WebGLPlot$7.CesiumMath.toDegrees(t.latitude),p=WebGLPlot$7.CesiumMath.toDegrees(t.longitude);let i=t.height;d.push({x:p,y:f,z:i})}return d}static getLinePts(e,t,i,n){var r=0,o=0,a=0,s=0;return WebGLPlot$7.defined(t)&&WebGLPlot$7.defined(i)?(r=Math.abs(t.x-i.x)/2,o=Math.abs(t.y-i.y)/2,a=i.z<=0?t.z:t.z-i.z,s=r>o?o:r):(s=(this.centerMax+this.modelRadius)/2,a=1.5*this.centerMax+this.modelRadius/2),this.rotateCircleCenter=WebGLPlot$7.Cartesian3.fromDegrees(e.x,e.y,a+e.z),this.computeHeightLines(r,o,s,a,n)}static computeHeightLines(e,t,i,n,r){var o=[],a=new WebGLPlot$7.Cartesian3,s=new WebGLPlot$7.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot$7.Cartesian3.fromDegrees(this.symbol.localPoints[0].x,this.symbol.localPoints[0].y,this.symbol.localPoints[0].z),h=new WebGLPlot$7.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.symbol?h.heading=d*this.symbol._modelRotate.z:h.heading=d*this.symbol.vectorRotate.z;var f=WebGLPlot$7.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot$7.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot$7.Cartesian3.multiplyByScalar(new WebGLPlot$7.Cartesian3(l,1,u),i,s),a=WebGLPlot$7.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot$7.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot$7.Cartesian3.multiplyByScalar(new WebGLPlot$7.Cartesian3(l,1,.7*u),i,s),a=WebGLPlot$7.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot$7.Cartesian3(a.x,a.y,a.z)),o}static computeBoundingBoxMatrix(e,t,i,n){var r=WebGLPlot$7.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot$7.HeadingPitchRoll,a=Math.PI/180;return o.pitch=0,o.roll=0,o.heading=a*t.z+90*a,WebGLPlot$7.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot$7.Ellipsoid.WGS84,n,i),i}}var _0x474aeb=(_0x1dd577=!0,function(e,t){var i=_0x1dd577?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1dd577=!1,i}),_0x12943f=_0x474aeb(void 0,(function(){return _0x12943f.toString().search("(((.+)+)+)+$").toString().constructor(_0x12943f).search("(((.+)+)+)+$")})),_0x1dd577;_0x12943f();var WebGLPlot$6=window.WebGLPlot=window.WebGLPlot||{};class _0x3b1009 extends _0x10d3db{constructor(e,t){if(!WebGLPlot$6.defined(t))throw new WebGLPlot$6.DeveloperError("OverLayerPicture viewer is required.");(e=WebGLPlot$6.defaultValue(e,WebGLPlot$6.defaultValue.EMPTY_OBJECT)).scene=t.scene,super(e),this.position=e.position.clone(),this.symbol=e.model,this.content=e.content,this.style=e.style,this.showline=e.showline,this.viewer=t,this.primitive=null,this._element=null,this._images=null,this._id=null,this._divContent=null,this._endPosition=e.position.clone(),this._bimHeight=0,this._modelHeight=0,this._lineEnd=null,this._initOverlayer(),this._initHandler()}updateEffect(e){WebGLPlot$6.defined(e.point)&&(this._getModelHeight(),e.point.z=this._modelHeight,this.setPosition(e.point)),WebGLPlot$6.defined(e.visible)&&this.setVisible(e.visible)}_initOverlayer(){if(this.style===_0x509f23.detail){var e=_0x504ed3.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);var t="";for(var i in this.content)"title"===i?t="<div>"+this.content[i]+"</div><table><tbody>":t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=WebGLPlot$6.createGuid(),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=WebGLPlot$6.createGuid(),this._divContent=this._element}else if(this.style===_0x509f23.notitle||this.style===_0x509f23.notitle2||this.style===_0x509f23.notitle3){e=_0x504ed3.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t='<div class="information">'+WebGLPlot$6.plotI18n("OVERLAYER_DETAIL")+"</div><table><tbody>";for(var i in this.content)t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=WebGLPlot$6.createGuid(),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=WebGLPlot$6.createGuid(),this._divContent=this._element}else if(this.style===_0x509f23.simple){e=_0x504ed3.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t=this.content;this._element.id=WebGLPlot$6.createGuid(),this._element.append(t),this._divContent=this._element}else this.style===_0x509f23.element&&(this.bpDom=document.createElement("div"),this.bpDom.style.cssText=this.content.style.cssText,this.bpDom.id=WebGLPlot$6.createGuid(),this.bpDom.appendChild(this.content),document.body.appendChild(this.bpDom),this._divContent=this.bpDom);var n=this._divContent.offsetWidth,r=this._divContent.offsetHeight,o=1.5,a=document.createElement("canvas"),s=a.getContext("2d");a.width=n*o,a.height=r*o,a.style.width=n+"px",a.style.height=r+"px",s.scale(o,o);var l={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:a,width:n,height:r,foreignObjectRendering:!0,tainTest:!1};_0x4a4fab(this._divContent,l).then(function(e){let t=e.toDataURL("image/png",1);this.images=t,this._divContent.style.display="none",this._create()}.bind(this))}_create(){this._getModelHeight(),this._endPosition.x=this.position.x,this._endPosition.y=this.position.y,this._endPosition.z=this._modelHeight,this.position.z=this._endPosition.z,this._id=WebGLPlot$6.createGuid();let e={id:this._id,show:!0,position:WebGLPlot$6.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z),image:this.images,pixelOffset:new WebGLPlot$6.Cartesian2(0,0),horizontalOrigin:WebGLPlot$6.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$6.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,sizeInMeters:!1,scale:1};if(this._billboard&&(_0x4786d3.removeBillboard(this._billboard,this.viewer.scene),this._billboard=void 0),this._billboard=_0x4786d3.addBillboard(e,this.viewer.scene),!this._polyline){let e={show:this.showline,width:1,positions:[WebGLPlot$6.Cartesian3.fromDegrees(this.position.x,this.position.y,this.position.z),WebGLPlot$6.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z)]};this._polyline=_0x4786d3.addOverLayerPolyLine(e,this.viewer.scene)}}_getModelHeight(){var e=_0x504ed3.getModelHeight(this.symbol);let t=this.viewer.scene.sampleHeight(new WebGLPlot$6.Cartographic(WebGLPlot$6.CesiumMath.toRadians(e[0].x),WebGLPlot$6.CesiumMath.toRadians(e[0].y))),i=this.viewer.scene.sampleHeight(new WebGLPlot$6.Cartographic(WebGLPlot$6.CesiumMath.toRadians(e[1].x),WebGLPlot$6.CesiumMath.toRadians(e[1].y)));e[0].z<e[1].z?(this._bimHeight=t,this._modelHeight=e[1].z):(this._bimHeight=i,this._modelHeight=e[0].z)}delete(){this._billboard&&(_0x4786d3.removeBillboard(this._billboard,this.viewer.scene),this._billboard=void 0),this._polyline&&(_0x4786d3.removeOverLayerPolyLine(this._polyline,this.viewer.scene),this._polyline=void 0)}setPosition(e){this._endPosition=e,this._billboard&&(this._billboard.position=WebGLPlot$6.Cartesian3.fromDegrees(e.x,e.y,e.z)),this._polyline&&(this._polyline.positions=[WebGLPlot$6.Cartesian3.fromDegrees(this.position.x,this.position.y,this.position.z),WebGLPlot$6.Cartesian3.fromDegrees(this._endPosition.x,this._endPosition.y,this._endPosition.z)])}setShowline(e){this._polyline&&(this.showline=e,this._polyline.show=this.showline)}_initHandler(){var e=!1,t=-1,i=new WebGLPlot$6.ScreenSpaceEventHandler(viewer.scene.canvas);i.setInputAction(function(i){var n=viewer.scene.pick(i.position);n?null===n.id||n.id!==this._id||e?(e=!1,t=-1,this.viewer.scene.canvas.style.cursor="default"):(e=!0,t=n.id,this.viewer.scene.canvas.style.cursor="move"):(e=!1,t=-1,this.viewer.scene.canvas.style.cursor="default")}.bind(this),WebGLPlot$6.ScreenSpaceEventType.LEFT_CLICK),i.setInputAction(function(i){e=!1,t=-1}.bind(this),WebGLPlot$6.ScreenSpaceEventType.RIGHT_CLICK),i.setInputAction(function(i){if(e&&-1!==t){var n=this._bimHeight,r=WebGLPlot$6.Cartesian3.fromDegrees(this.position.x,this.position.y,n),o=WebGLPlot$6.SceneTransforms.wgs84ToWindowCoordinates(scene,r),a=this._modifyModelPosition(this.position,i.endPosition);i.endPosition.y=o.y;var s=_0x2909c1.getPosition(this.viewer.scene,i.endPosition);this._endPosition={x:s.x,y:s.y,z:a.z};var l=WebGLPlot$6.Cartesian3.fromDegrees(s.x,s.y,a.z);this._billboard.position=l,this._polyline.positions=[WebGLPlot$6.Cartesian3.fromDegrees(this.position.x,this.position.y,this.position.z),WebGLPlot$6.Cartesian3.fromDegrees(s.x,s.y,a.z)]}}.bind(this),WebGLPlot$6.ScreenSpaceEventType.MOUSE_MOVE)}_modifyModelPosition(e,t){var i=1,n=this.viewer.scene,r=WebGLPlot$6.SceneTransforms.transformWindowToDrawingBuffer(n,t);r.y=n.drawingBufferHeight-r.y;var o=WebGLPlot$6.Cartesian3.fromDegrees(e.x,e.y,0),a=WebGLPlot$6.SceneTransforms.wgs84ToWindowCoordinates(n,o),s=this._getAltitudeByLogical(o,r,n);if(WebGLPlot$6.defined(s)){a.y<t.y&&(i=-1);var l=WebGLPlot$6.Cartesian3.distance(o,s)*i,u=n.globe.ellipsoid.cartesianToCartographic(s),c=WebGLPlot$6.CesiumMath.toDegrees(u.latitude);return new _0x23de81(WebGLPlot$6.CesiumMath.toDegrees(u.longitude),c,l)}}_getAltitudeByLogical(e,t,i){var n=WebGLPlot$6.Cartographic.fromCartesian(e);n.height+=1,n=WebGLPlot$6.Cartesian3.fromRadians(n.longitude,n.latitude,n.height);var r=WebGLPlot$6.SceneTransforms.wgs84ToWindowCoordinates(i,e),o=WebGLPlot$6.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(o){var a;o.x===r.x?(-1,a=0):o.y===r.y?(0,a=-1):a=-1/((o.y-r.y)/(o.x-r.x));var s=i._view.viewport,l={left:s.x,right:s.x+s.width,bottom:s.y,top:s.y+s.height},u=_0x2909c1.intersectionOfRectByPointslopeline(t,a,l),c=u[0],h=u[1],d=new WebGLPlot$6.Cartesian3,f=new WebGLPlot$6.Cartesian3;WebGLPlot$6.SceneTransforms.drawingBufferToWgs84Coordinates(i,c,1,d),WebGLPlot$6.SceneTransforms.drawingBufferToWgs84Coordinates(i,h,1,f);var p=i.camera.position,_=new WebGLPlot$6.Cartesian3;WebGLPlot$6.Cartesian3.subtract(e,n,_);var m=new WebGLPlot$6.Cartesian3;WebGLPlot$6.Cartesian3.negate(_,m),WebGLPlot$6.Cartesian3.normalize(_,_),WebGLPlot$6.Cartesian3.normalize(m,m);var g=new WebGLPlot$6.Ray(e,_),x=new WebGLPlot$6.Ray(e,m),y=WebGLPlot$6.IntersectionTests.rayTriangleParametric(g,d,f,p);if(y)return WebGLPlot$6.Ray.getPoint(g,y);if(y=WebGLPlot$6.IntersectionTests.rayTriangleParametric(x,d,f,p))return WebGLPlot$6.Ray.getPoint(x,y)}}setVisible(e){this.setShowline(e),this._billboard&&(this._billboard.show=e)}destroy(){this.delete()}clone(){}}var _0x721f7f=(_0x1d47a2=!0,function(e,t){var i=_0x1d47a2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d47a2=!1,i}),_0x351293=_0x721f7f(void 0,(function(){return _0x351293.toString().search("(((.+)+)+)+$").toString().constructor(_0x351293).search("(((.+)+)+)+$")})),_0x1d47a2;_0x351293();var WebGLPlot$5=window.WebGLPlot=window.WebGLPlot||{};class _0x77f391 extends _0x10d3db{constructor(e,t){if(!WebGLPlot$5.defined(t))throw new WebGLPlot$5.DeveloperError("OverLayerPicture viewer is required.");(e=WebGLPlot$5.defaultValue(e,WebGLPlot$5.defaultValue.EMPTY_OBJECT)).scene=t.scene,super(e),this.position=e.position,this.symbol=e.model,this.content=e.content,this.style=e.style,this.viewer=t,this.primitive=null,this._element=null,this._images=null,this._width=0,this._height=0,this._divContent=null,this._offSetOptions=new _0x3c4ba1,this._initOverlayer()}updateEffect(e){WebGLPlot$5.defined(e.point)&&this.setOffSet(e.point,void 0),WebGLPlot$5.defined(e.visible)&&this.setVisible(e.visible)}_initOverlayer(){if(this.style===_0x509f23.detail){var e=_0x504ed3.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.style=document.createElement("style"),this.style.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.style);var t="";for(var i in this.content)"title"===i?t="<div>"+this.content[i]+"</div><table><tbody>":t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=Math.random().toString(15).slice(2,15),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=Math.random().toString(15).slice(2,15),this._divContent=this._element}else if(this.style===_0x509f23.simple){e=_0x504ed3.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t=this.content;this._element.id=Math.random().toString(15).slice(2,15),this._element.append(t),this._divContent=this._element}else if(this.style===_0x509f23.element){this.bpDom=document.createElement("div"),this.bpDom.style.cssText=this.content.style.cssText;var n=Math.random().toString(15);this.bpDom.id=n.slice(2,n.length),this.bpDom.appendChild(this.content),document.body.appendChild(this.bpDom),this._divContent=this.bpDom}else if(this.style===_0x509f23.notitle||this.style===_0x509f23.notitle2||this.style===_0x509f23.notitle3){e=_0x504ed3.getElement(this.style);this._element=e.element,document.body.appendChild(this._element),this.htmlstyle=document.createElement("style"),this.htmlstyle.innerHTML=e.style,this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.htmlstyle);t='<div class="information">'+WebGLPlot$5.plotI18n("OVERLAYER_DETAIL")+"</div><table><tbody>";for(var i in this.content)t+="<tr><td>"+i+": </th><td>"+this.content[i]+"</td></tr>";t+="</tbody></table>",this._element.id=Math.random().toString(15).slice(2,15),$("#trackPopUpLink").append(t),$("#trackPopUpLink").get(0).id=Math.random().toString(15).slice(2,15),this._divContent=this._element}this._width=this._divContent.offsetWidth,this._height=this._divContent.offsetHeight;var r=1.5,o=document.createElement("canvas"),a=o.getContext("2d");o.width=this._width*r,o.height=this._height*r,o.style.width=this._width+"px",o.style.height=this._height+"px",o.style.background="transparent",a.scale(r,r),a.mozImageSmoothingEnabled=!1,a.webkitImageSmoothingEnabled=!1,a.msImageSmoothingEnabled=!1,a.imageSmoothingEnabled=!1,a.globalAlpha=.1,document.documentElement.scrollTop||document.body.scrollTop;var s={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:o,width:this._width,height:this._height,foreignObjectRendering:!0,tainTest:!1};_0x4a4fab(this._divContent,s).then(function(e){var t=new Image;t.src=e.toDataURL("image/png",1),this._images=t,this._divContent.style.display="none",this._create()}.bind(this))}_create(){this.setOffSet(this.position,void 0)}setOffSet(e,t){if(e&&(!WebGLPlot$5.defined(t)||t instanceof _0x3c4ba1)){WebGLPlot$5.defined(t)&&(this._offSetOptions=t);var i=e.x,n=e.y,r=this.viewer.scene.sampleHeight(new WebGLPlot$5.Cartographic(WebGLPlot$5.CesiumMath.toRadians(this.position.x),WebGLPlot$5.CesiumMath.toRadians(this.position.y)))+.5,o=this._offSetOptions.rotateX,a=this._offSetOptions.rotateY,s=this._offSetOptions.rotateZ;i+=this._offSetOptions.offsetX,n+=this._offSetOptions.offsetY,r+=this._offSetOptions.offsetZ;var l=new WebGLPlot$5.Cartesian3(this._width/40,this._height/40,1),u=WebGLPlot$5.Cartesian3.fromDegrees(i,n,r),c=WebGLPlot$5.Transforms.eastNorthUpToFixedFrame(u),h=WebGLPlot$5.Matrix4.fromRotationTranslation(WebGLPlot$5.Matrix3.fromRotationX(WebGLPlot$5.CesiumMath.toRadians(90+o))),d=WebGLPlot$5.Matrix4.fromRotationTranslation(WebGLPlot$5.Matrix3.fromRotationY(WebGLPlot$5.CesiumMath.toRadians(180+a))),f=WebGLPlot$5.Matrix4.fromRotationTranslation(WebGLPlot$5.Matrix3.fromRotationZ(WebGLPlot$5.CesiumMath.toRadians(0+s))),p=new WebGLPlot$5.Matrix4,_=new WebGLPlot$5.Matrix4,m=new WebGLPlot$5.Matrix4,g=WebGLPlot$5.Matrix4.fromScale(l);WebGLPlot$5.Matrix4.multiply(c,h,p),WebGLPlot$5.Matrix4.multiply(p,g,p),WebGLPlot$5.Matrix4.multiply(p,d,_),WebGLPlot$5.Matrix4.multiply(_,f,m),null!==this.primitive&&this.delete();var x=new WebGLPlot$5.PlaneGeometry,y=new WebGLPlot$5.GeometryInstance({geometry:x,modelMatrix:m}),v=new WebGLPlot$5.Material({fabric:{type:"DiffuseMap",uniforms:{image:this._images}},translucent:!0});this.primitive=this.viewer.scene.primitives.add(new WebGLPlot$5.Primitive({geometryInstances:y,appearance:new WebGLPlot$5.MaterialAppearance({closed:!0,translucent:!0,material:v})}))}}setVisible(e){null!==this.primitive&&(this.primitive.show=e)}delete(){null!==this.primitive&&(this.viewer.scene.primitives.removeAndDestroy(this.primitive),this.primitive=void 0)}destroy(){this.delete()}clone(){}}var _0x4d5d3d=(_0x2e21ca=!0,function(e,t){var i=_0x2e21ca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e21ca=!1,i}),_0xe65ade=_0x4d5d3d(void 0,(function(){return _0xe65ade.toString().search("(((.+)+)+)+$").toString().constructor(_0xe65ade).search("(((.+)+)+)+$")})),_0x2e21ca;_0xe65ade();var WebGLPlot$4=window.WebGLPlot=window.WebGLPlot||{};function _0x2f7f36(e,t){void 0===e.showLine?this.showLine=!0:this.showLine=e.showLine,this.scene=t.scene,this.position=this.lonLatToPixel(e.position),void 0===this.position&&(this.position={x:100,y:200,z:0}),this.finalPosition=e.position,this.style=document.createElement("style"),this.style.innerHTML=".dialog{min-width:150px;min-height:100px;position:absolute; background-color: rgba(42, 69, 105,.3);border: none;display: block;left:"+this.position.x+"px;top:"+this.position.y+"px;z-index: 1;\n}\n.dialog-content{padding:4px;color:#00a7d0}\n",this.head=document.getElementsByTagName("head").item(0),this.head.appendChild(this.style),this.bpDom=document.createElement("div"),this.bpDom.classList.add("dialog"),this.bpDom.style.cssText="display: block;";var i=Math.random().toString(15);this.bpDom.id=i.slice(2,i.length),this.bpDom.position=e.position,this.canvasDom=document.createElement("canvas"),this.canvasDom.id=this.bpDom.id+"c",this.canvasDom.style.cssText="position: absolute; z-index: 1",document.body.appendChild(this.canvasDom),this.contentDom=document.createElement("div"),this.contentDom.classList.add("dialog-content"),this.contentDom.appendChild(e.element),this.bpDom.appendChild(this.contentDom),document.body.appendChild(this.bpDom),this.Dragging(this.getDraggingDialog).enable(),this.self=this,this.canvas=document.getElementById(this.bpDom.id+"c"),this.lineCtx=this.canvas.getContext("2d"),this.bpDiv=document.getElementById(this.bpDom.id),this.bpPosition=this.getCordInContainer(this.bpDiv),t.camera.changed.addEventListener(function(){var t=document.getElementsByClassName("dialog");for(let e=0;e<t.length;e++){this.bpDiv=t[e],this.bpPosition=this.getCordInContainer(t[e]);var i=this.bpDiv.id,n=document.getElementById(i+"c");this.lineCtx=n.getContext("2d"),this.canvas=n,this.position=this.lonLatToPixel(this.bpDiv.position),void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx)}var r=this.lonLatToPixel(this.finalPosition),o=this.lonLatToPixel(e.position),a=null!==r&&r.x>=0&&r.y>=0&&r.x<this.scene.drawingBufferWidth&&r.y<this.scene.drawingBufferHeight,s=null!==o&&o.x>=0&&o.y>=0&&o.x<this.scene.drawingBufferWidth&&o.y<this.scene.drawingBufferHeight;if(a&&s){this.setLineVisible(!0),this.bpDiv.style.cssText="display: block;",this.pt=this.pixelToLonlat(r);var l=WebGLPlot$4.Cartesian3.fromDegrees(this.pt[0],this.pt[1]),u=new WebGLPlot$4.Cartesian2,c=this.scene.cartesianToCanvasCoordinates(l,u);WebGLPlot$4.defined(c)&&(this.bpDom.style.top=c.y+"px",this.bpDom.style.left=c.x+"px")}else this.bpDiv.style.cssText="display: none;",this.setLineVisible(!1)}.bind(this))}_0x2f7f36.prototype.Dragging=function(e){var t=null,i=0,n=0,r=null,o=o=>{switch(o.type){case"touchstart":case"mousedown":if(null!=(t=e(o))){this.bpDiv=t,this.bpPosition=this.getCordInContainer(this.bpDiv);var a=this.bpDiv.id,s=document.getElementById(a+"c");this.lineCtx=s.getContext("2d"),this.canvas=s,this.position=this.lonLatToPixel(this.bpDiv.position)}r=o.touches?o.touches[0]:o,null!=t&&(i=r.clientX-t.offsetLeft,n=r.clientY-t.offsetTop);break;case"touchmove":case"mousemove":r=o.touches?o.touches[0]:o,null!=t&&(t.style.left=r.clientX-i+"px",t.style.top=r.clientY-n+"px",void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx));break;case"touchend":case"mouseup":t=null,i=0,n=0;var l={x:this.bpDom.offsetLeft,y:this.bpDom.offsetTop};null!==l&&l.x>=0&&l.y>=0&&l.x<this.scene.drawingBufferWidth&&l.y<this.scene.drawingBufferHeight&&(this.finalPosition=this.pixelToLonlat(l))}};return{enable:function(){document.addEventListener("mousedown",o),document.addEventListener("mousemove",o),document.addEventListener("mouseup",o),document.addEventListener("touchstart",o),document.addEventListener("touchmove",o),document.addEventListener("touchend",o)},disable:function(){document.removeEventListener("mousedown",o),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",o),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",o),document.removeEventListener("touchend",o)}}},_0x2f7f36.prototype.getDraggingDialog=function(e){for(var t=e.target;t&&-1==t.className.indexOf("dialog");)t=t.offsetParent;return t},_0x2f7f36.prototype.getCordInContainer=function(e){return{x:e.getBoundingClientRect().left,y:e.getBoundingClientRect().top}},_0x2f7f36.prototype.getMinDisPoint=function(){let e={x:this.bpDiv.offsetLeft,y:this.bpDiv.offsetTop},t={x:this.bpDiv.offsetLeft,y:this.bpDiv.offsetTop+this.bpDiv.clientHeight},i={x:this.bpDiv.offsetLeft+this.bpDiv.clientWidth,y:this.bpDiv.offsetTop},n={x:this.bpDiv.offsetLeft+this.bpDiv.clientWidth,y:this.bpDiv.offsetTop+this.bpDiv.clientHeight};this.position;let r=(this.position.x-e.x)*(this.position.x-e.x)+(this.position.y-e.y)*(this.position.y-e.y),o=(this.position.x-t.x)*(this.position.x-t.x)+(this.position.y-t.y)*(this.position.y-t.y),a=(this.position.x-i.x)*(this.position.x-i.x)+(this.position.y-i.y)*(this.position.y-i.y),s=(this.position.x-n.x)*(this.position.x-n.x)+(this.position.y-n.y)*(this.position.y-n.y),l=[];l.push(r),l.push(o),l.push(a),l.push(s);let u=l[0],c=0;for(var h=1;h<l.length;h++)l[h]<u&&(u=l[h],c=h);return 0==c?e:1==c?t:2==c?i:3==c?n:null},_0x2f7f36.prototype.drawLine=function(e,t){let i=this.getMinDisPoint();if(null==i||0==i.x&&0==i.y)return;let n=Math.abs(i.x-this.position.x),r=Math.abs(this.position.y-i.y),o=this.position.x,a=this.position.y,s=i.x,l=i.y,u=Math.min(o,s),c=Math.min(a,l);e.width=Math.abs(n),e.height=Math.abs(r),e.style.setProperty("left",u+"px",""),e.style.setProperty("top",c+"px",""),e.style.setProperty("pointer-events","none"),t.clearRect(0,0,e.width,e.height),t.beginPath(),t.moveTo(o-u,a-c),t.lineTo(s-u,l-c),t.stroke()},_0x2f7f36.prototype.lonLatToPixel=function(e){2===e.length&&(e[2]=0);var t=WebGLPlot$4.Cartesian3.fromDegrees(e[0],e[1],e[2]);return WebGLPlot$4.SceneTransforms.wgs84ToWindowCoordinates(this.scene,t)},_0x2f7f36.prototype.pixelToLonlat=function(e){var t=this.scene.pickPosition(e),i=Cesium.Cartographic.fromCartesian(t);return[Cesium.Math.toDegrees(i.longitude),Cesium.Math.toDegrees(i.latitude),i.height]},_0x2f7f36.prototype.setPosition=function(e){this.position=this.lonLatToPixel(e),null!=this.position&&(this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height),this.drawLine(this.canvas,this.lineCtx))},_0x2f7f36.prototype.setLineVisible=function(e){this.showLine=e,e?void 0!==this.position&&this.drawLine(this.canvas,this.lineCtx):this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height)},_0x2f7f36.prototype.getPosition=function(){return this.bpDiv.position},_0x2f7f36.prototype.setContent=function(e){this.contentDom.childNodes.forEach((e=>e.remove())),this.contentDom.appendChild(e)},_0x2f7f36.prototype.setVisible=function(e){const t=this.bpDiv;if(t&&e){t.style.cssText="display: block;";var i=this.bpDiv.id,n=document.getElementById(i+"c");this.lineCtx=n.getContext("2d"),this.canvas=n,this.position=this.lonLatToPixel(this.bpDiv.position),void 0!==this.position&&this.showLine&&this.drawLine(this.canvas,this.lineCtx)}else t.style.cssText="display: none;",this.lineCtx.clearRect(0,0,this.canvas.width,this.canvas.height)},_0x2f7f36.prototype.remove=function(){document.body.removeChild(this.bpDiv),document.body.removeChild(this.canvas)},_0x2f7f36.prototype.updateDom=function(e){this.contentDom.childNodes.forEach((e=>e.remove())),this.contentDom.appendChild(e)};var _0x5cec4d=(_0x4583ca=!0,function(e,t){var i=_0x4583ca?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4583ca=!1,i}),_0x5d1e20=_0x5cec4d(void 0,(function(){return _0x5d1e20.toString().search("(((.+)+)+)+$").toString().constructor(_0x5d1e20).search("(((.+)+)+)+$")})),_0x4583ca;_0x5d1e20();var _0x3db533=new WebGLPlot.Cartesian3,_0x5a7e30=new WebGLPlot.Cartesian3,_0x35ecbf=new WebGLPlot.Cartesian3,_0x410461=new WebGLPlot.Cartesian3,_0x11b1a9=new WebGLPlot.Cartesian3;function _0x1fc894(e){this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),this.positions=WebGLPlot.defaultValue(e.customPts,[]),this.numThetas=WebGLPlot.defaultValue(e.slicePartitions,65),this.numPhis=WebGLPlot.defaultValue(e.stackPartitions,65),this.vertexFormat=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),this._offsetAttribute=e.offsetAttribute,this._indices=e.indices,this._workerName="createPlotCustomRadarGeometry"}function _0x84d02(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_0x1fc894.createGeometry=function(e,t){if(e.numPhis<2||e.numThetas<2||e.positions.length<2)return;let i=_0x84d02(e.positions),n=e.numThetas,r=e.numPhis;var o=e.vertexFormat,a=n*r,s=6*a,l=WebGLPlot.IndexDatatype.createTypedArray(a,s),u=o.normal?new Float32Array(3*a):void 0,c=o.tangent?new Float32Array(3*a):void 0,h=o.bitangent?new Float32Array(3*a):void 0,d=o.st?new Float32Array(2*a):void 0;if(e._indices)l=e._indices;else{var f,p;let e=0;var _,m;if(t)for(f=0;f<=r-1;f++)for(_=f*n,m=(f+1)*n,p=0;p<n-1;p++)l[e++]=m+p,l[e++]=m+p+1,l[e++]=_+p+1,l[e++]=m+p,l[e++]=_+p+1,l[e++]=_+p;else for(f=0;f<=r-1;f++)for(_=f*n,m=(f+1)*n,p=0;p<n-1;p++)0===p&&(l[e++]=0,l[e++]=_,l[e++]=m),l[e++]=m+p,l[e++]=m+p+1,l[e++]=_+p+1,l[e++]=m+p,l[e++]=_+p+1,l[e++]=_+p,p===n-2&&(l[e++]=0,l[e++]=_+p+1,l[e++]=m+p+1)}var g=new WebGLPlot.GeometryAttributes;o.position&&(g.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:i}));var x,y=0,v=0,$=0,b=0,T=WebGLPlot.Ellipsoid.fromCartesian3(e.radii);if(o.st||o.normal||o.tangent||o.bitangent){for(f=0;f<a;f++){x=T;var C=WebGLPlot.Cartesian3.fromArray(i,3*f,_0x3db533);0===C.x&&(C.x=1e-10),0===C.y&&(C.y=1e-10),0===C.z&&(C.z=1e-10);var S=x.geodeticSurfaceNormal(C,_0x5a7e30);if(o.st){var w=WebGLPlot.Cartesian2.negate(S,_0x11b1a9);d[y++]=Math.atan2(w.y,w.x)/WebGLPlot.CesiumMath.TWO_PI+.5,d[y++]=Math.asin(S.z)/WebGLPlot.CesiumMath.PI+.5}if(o.normal&&(u[v++]=S.x,u[v++]=S.y,u[v++]=S.z),o.tangent||o.bitangent){var E,P=_0x35ecbf;if(E=!isTopOpen&&f>=0&&f<0+2*n?WebGLPlot.Cartesian3.UNIT_X:WebGLPlot.Cartesian3.UNIT_Z,WebGLPlot.Cartesian3.cross(E,S,P),WebGLPlot.Cartesian3.normalize(P,P),o.tangent&&(c[$++]=P.x,c[$++]=P.y,c[$++]=P.z),o.bitangent){var A=WebGLPlot.Cartesian3.cross(S,P,_0x410461);WebGLPlot.Cartesian3.normalize(A,A),h[b++]=A.x,h[b++]=A.y,h[b++]=A.z}}}o.st&&(g.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),o.normal&&(g.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:u})),o.tangent&&(g.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),o.bitangent&&(g.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:h}))}if(WebGLPlot.defined(e._offsetAttribute)){var L=i.length,M=new Uint8Array(L/3),R=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(M,R),g.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:M})}return new WebGLPlot.Geometry({attributes:g,indices:l,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(T),offsetAttribute:e._offsetAttribute})};var _0x78f787=(_0x59788f=!0,function(e,t){var i=_0x59788f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59788f=!1,i}),_0x22ac30=_0x78f787(void 0,(function(){return _0x22ac30.toString().search("(((.+)+)+)+$").toString().constructor(_0x22ac30).search("(((.+)+)+)+$")})),_0x59788f;function _0xe8531(e){this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),this.positions=WebGLPlot.defaultValue(e.customPts,[]),this.slicePartitions=WebGLPlot.defaultValue(e.slicePartitions,65),this.stackPartitions=WebGLPlot.defaultValue(e.stackPartitions,65),this.vertexFormat=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT),this._offsetAttribute=e.offsetAttribute,this._workerName="createPlotCustomRadarOutlineGeometry"}function _0x1eefd4(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_0x22ac30(),_0xe8531.createGeometry=function(e,t){if(e.numPhis<3||e.numThetas<3||e.positions.length<3)return;var i=WebGLPlot.Ellipsoid.fromCartesian3(e.radii);let n=_0x1eefd4(e.positions),r=e.slicePartitions,o=e.stackPartitions;var a,s,l=r*o,u=4*l,c=WebGLPlot.IndexDatatype.createTypedArray(l,u);let h=0;if(t){for(a=0;a<o;a++){var d=a*r;for(s=0;s<r-1;s++)c[h++]=d+s,c[h++]=d+s+1}for(a=0;a<r-1;a++)for(s=0;s<o-1;s++)c[h++]=a+s*r,c[h++]=a+(s+1)*r}else{for(a=0;a<o;a++){d=a*r;for(s=0;s<r-1;s++)c[h++]=d+s,c[h++]=d+s+1}for(a=0;a<=r-1;a++)for(s=0;s<o-1;s++)c[h++]=a+s*r,c[h++]=a+(s+1)*r}var f=new WebGLPlot.GeometryAttributes({position:new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})});if(WebGLPlot.defined(e._offsetAttribute)){var p=n.length,_=new Uint8Array(p/3),m=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(_,m),f.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new WebGLPlot.Geometry({attributes:f,indices:c,primitiveType:WebGLPlot.PrimitiveType.LINES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(i),offsetAttribute:e._offsetAttribute})};var _0x47abbe=(_0x26ffdc=!0,function(e,t){var i=_0x26ffdc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x26ffdc=!1,i}),_0x2ef0de=_0x47abbe(void 0,(function(){return _0x2ef0de.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ef0de).search("(((.+)+)+)+$")})),_0x26ffdc;_0x2ef0de();var _0x3393e0=new WebGLPlot.Cartesian3,_0x4b44a4=new WebGLPlot.Cartesian3,_0x537e04=new WebGLPlot.Cartesian3,_0x4a94a3=new WebGLPlot.Cartesian3,_0x597df6=new WebGLPlot.Cartesian3,_0xc6eee4=new WebGLPlot.Cartesian3(1,1,1),_0x487b6f=Math.cos,_0xba82f0=Math.sin;function _0x3daff3(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT);var t=WebGLPlot.defaultValue(e.scale,1),i=WebGLPlot.defaultValue(e.radii,_0xc6eee4),n=WebGLPlot.defaultValue(e.innerRadii,i),r=WebGLPlot.defaultValue(e._minimumClock,0),o=WebGLPlot.defaultValue(e._maximumClock,WebGLPlot.CesiumMath.TWO_PI),a=WebGLPlot.defaultValue(e._minimumCone,0),s=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),l=Math.round(WebGLPlot.defaultValue(e.stackPartitions,64)),u=Math.round(WebGLPlot.defaultValue(e.slicePartitions,64)),c=WebGLPlot.defaultValue(e.vertexFormat,WebGLPlot.VertexFormat.DEFAULT);if(u<3)throw new WebGLPlot.DeveloperError("options.slicePartitions cannot be less than three.");if(l<3)throw new WebGLPlot.DeveloperError("options.stackPartitions cannot be less than three.");this._radii=new WebGLPlot.Cartesian3(i.x*t,i.y*t,i.z*t),this._innerRadii=new WebGLPlot.Cartesian3(n.x*t,n.y*t,n.z*t),this._minimumClock=r,this._maximumClock=o,this._minimumCone=a,this._maximumCone=s,this._stackPartitions=l,this._slicePartitions=u,this._vertexFormat=WebGLPlot.VertexFormat.clone(c),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}_0x3daff3.packedLength=2*WebGLPlot.Cartesian3.packedLength+WebGLPlot.VertexFormat.packedLength+7,_0x3daff3.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.Cartesian3.pack(e._radii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.Cartesian3.pack(e._innerRadii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.VertexFormat.pack(e._vertexFormat,t,i),i+=WebGLPlot.VertexFormat.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x10f0d9=new WebGLPlot.Cartesian3,_0x1230ff=new WebGLPlot.Cartesian3,_0x46b17b=new WebGLPlot.VertexFormat,_0x102deb={radii:_0x10f0d9,innerRadii:_0x1230ff,vertexFormat:_0x46b17b,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0},_0x2c59d6;_0x3daff3.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.Cartesian3.unpack(e,t,_0x10f0d9);t+=WebGLPlot.Cartesian3.packedLength;var r=WebGLPlot.Cartesian3.unpack(e,t,_0x1230ff);t+=WebGLPlot.Cartesian3.packedLength;var o=WebGLPlot.VertexFormat.unpack(e,t,_0x46b17b);t+=WebGLPlot.VertexFormat.packedLength;var a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return WebGLPlot.defined(i)?(i._radii=WebGLPlot.Cartesian3.clone(n,i._radii),i._innerRadii=WebGLPlot.Cartesian3.clone(r,i._innerRadii),i._vertexFormat=WebGLPlot.VertexFormat.clone(o,i._vertexFormat),i._minimumClock=a,i._maximumClock=s,i._minimumCone=l,i._maximumCone=u,i._stackPartitions=c,i._slicePartitions=h,i._offsetAttribute=-1===d?void 0:d,i):(_0x102deb.minimumClock=a,_0x102deb.maximumClock=s,_0x102deb.minimumCone=l,_0x102deb.maximumCone=u,_0x102deb.stackPartitions=c,_0x102deb.slicePartitions=h,_0x102deb.offsetAttribute=-1===d?void 0:d,new _0x3daff3(_0x102deb))},_0x3daff3.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._vertexFormat,l=e._slicePartitions+1,u=e._stackPartitions+1;(l=Math.round(l*Math.abs(r-n)/WebGLPlot.CesiumMath.TWO_PI))<2&&(l=2),(u=Math.round(u*Math.abs(a-o)/WebGLPlot.CesiumMath.PI))<2&&(u=2);var c,h,d=0,f=[o],p=[n];for(c=0;c<u;c++)f.push(o+c*(a-o)/(u-1));for(f.push(a),h=0;h<l;h++)p.push(n+h*(r-n)/(l-1));p.push(r);var _=f.length,m=p.length,g=0,x=1,y=i.x!==t.x||i.y!==t.y||i.z!==t.z,v=!1,$=!1,b=!1;y&&(x=2,o>0&&(v=!0,g+=l-1),a<WebGLPlot.CesiumMath.PI&&($=!0,g+=l-1),(r-n)%WebGLPlot.CesiumMath.TWO_PI?(b=!0,g+=2*(u-1)+1):g+=1);var T=m*_*x,C=new Float64Array(3*T),S=WebGLPlot.arrayFill(new Array(T),!1),w=WebGLPlot.arrayFill(new Array(T),!1),E=l*u*x,P=6*(E+g+1-(l+u)*x),A=WebGLPlot.IndexDatatype.createTypedArray(E,P),L=s.normal?new Float32Array(3*T):void 0,M=s.tangent?new Float32Array(3*T):void 0,R=s.bitangent?new Float32Array(3*T):void 0,O=s.st?new Float32Array(2*T):void 0,D=new Array(_),I=new Array(_);for(c=0;c<_;c++)D[c]=_0xba82f0(f[c]),I[c]=_0x487b6f(f[c]);var B=new Array(m),F=new Array(m);for(h=0;h<m;h++)F[h]=_0x487b6f(p[h]),B[h]=_0xba82f0(p[h]);for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=t.x*D[c]*F[h],C[d++]=t.y*D[c]*B[h],C[d++]=t.z*I[c];var N,G,z,U,V=T/2;if(y)for(c=0;c<_;c++)for(h=0;h<m;h++)C[d++]=i.x*D[c]*F[h],C[d++]=i.y*D[c]*B[h],C[d++]=i.z*I[c],S[V]=!0,c>0&&c!==_-1&&0!==h&&h!==m-1&&(w[V]=!0),V++;for(d=0,c=1;c<_-2;c++)for(N=c*m,G=(c+1)*m,h=1;h<m-2;h++)A[d++]=G+h,A[d++]=G+h+1,A[d++]=N+h+1,A[d++]=G+h,A[d++]=N+h+1,A[d++]=N+h;if(y){var k=_*m;for(c=1;c<_-2;c++)for(N=k+c*m,G=k+(c+1)*m,h=1;h<m-2;h++)A[d++]=G+h,A[d++]=N+h,A[d++]=N+h+1,A[d++]=G+h,A[d++]=N+h+1,A[d++]=G+h+1}if(y){if(v)for(U=_*m,c=1;c<m-2;c++)A[d++]=c,A[d++]=c+1,A[d++]=U+c+1,A[d++]=c,A[d++]=U+c+1,A[d++]=U+c;if($)for(z=_*m-m,U=_*m*x-m,c=1;c<m-2;c++)A[d++]=z+c+1,A[d++]=z+c,A[d++]=U+c,A[d++]=z+c+1,A[d++]=U+c,A[d++]=U+c+1}if(b){for(c=1;c<_-2;c++)U=m*_+m*c,z=m*c,A[d++]=U,A[d++]=z+m,A[d++]=z,A[d++]=U,A[d++]=U+m,A[d++]=z+m;for(c=1;c<_-2;c++)U=m*_+m*(c+1)-1,z=m*(c+1)-1,A[d++]=z+m,A[d++]=U,A[d++]=z,A[d++]=z+m,A[d++]=U+m,A[d++]=U}var W=new WebGLPlot.GeometryAttributes;s.position&&(W.position=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:C}));var H,q=0,j=0,X=0,Y=0,Z=T/2,K=WebGLPlot.Ellipsoid.fromCartesian3(t),Q=WebGLPlot.Ellipsoid.fromCartesian3(i);if(s.st||s.normal||s.tangent||s.bitangent){for(c=0;c<T;c++){H=S[c]?Q:K;var J=WebGLPlot.Cartesian3.fromArray(C,3*c,_0x3393e0),ee=H.geodeticSurfaceNormal(J,_0x4b44a4);if(w[c]&&WebGLPlot.Cartesian3.negate(ee,ee),s.st){var te=WebGLPlot.Cartesian2.negate(ee,_0x597df6);O[q++]=Math.atan2(te.y,te.x)/WebGLPlot.CesiumMath.TWO_PI+.5,O[q++]=Math.asin(ee.z)/WebGLPlot.CesiumMath.PI+.5}if(s.normal&&(L[j++]=ee.x,L[j++]=ee.y,L[j++]=ee.z),s.tangent||s.bitangent){var ie,ne=_0x537e04,re=0;if(S[c]&&(re=Z),ie=!v&&c>=re&&c<re+2*m?WebGLPlot.Cartesian3.UNIT_X:WebGLPlot.Cartesian3.UNIT_Z,WebGLPlot.Cartesian3.cross(ie,ee,ne),WebGLPlot.Cartesian3.normalize(ne,ne),s.tangent&&(M[X++]=ne.x,M[X++]=ne.y,M[X++]=ne.z),s.bitangent){var oe=WebGLPlot.Cartesian3.cross(ee,ne,_0x4a94a3);WebGLPlot.Cartesian3.normalize(oe,oe),R[Y++]=oe.x,R[Y++]=oe.y,R[Y++]=oe.z}}}s.st&&(W.st=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:O})),s.normal&&(W.normal=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),s.tangent&&(W.tangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:M})),s.bitangent&&(W.bitangent=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R}))}if(WebGLPlot.defined(e._offsetAttribute)){var ae=C.length,se=new Uint8Array(ae/3),le=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(se,le),W.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:se})}return new WebGLPlot.Geometry({attributes:W,indices:A,primitiveType:WebGLPlot.PrimitiveType.TRIANGLES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(K),offsetAttribute:e._offsetAttribute})}}},_0x3daff3.getUnitEllipsoid=function(){return WebGLPlot.defined(_0x2c59d6)||(_0x2c59d6=_0x3daff3.createGeometry(new _0x3daff3({radii:new WebGLPlot.Cartesian3(1,1,1),vertexFormat:WebGLPlot.VertexFormat.POSITION_ONLY}))),_0x2c59d6};var _0x33aaa4=(_0x3bab97=!0,function(e,t){var i=_0x3bab97?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3bab97=!1,i}),_0x209c0e=_0x33aaa4(void 0,(function(){return _0x209c0e.toString().search("(((.+)+)+)+$").toString().constructor(_0x209c0e).search("(((.+)+)+)+$")})),_0x3bab97;_0x209c0e();var _0x4a4269=new WebGLPlot.Cartesian3(1,1,1),_0x14009c=Math.cos,_0x3c24fe=Math.sin;function _0x465603(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT);var t=WebGLPlot.defaultValue(e.scale,1),i=WebGLPlot.defaultValue(e.radii,_0x4a4269),n=WebGLPlot.defaultValue(e.innerRadii,i),r=WebGLPlot.defaultValue(e._minimumClock,0),o=WebGLPlot.defaultValue(e._maximumClock,WebGLPlot.CesiumMath.TWO_PI),a=WebGLPlot.defaultValue(e._minimumCone,0),s=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),l=Math.round(WebGLPlot.defaultValue(e.stackPartitions,10)),u=Math.round(WebGLPlot.defaultValue(e.slicePartitions,8)),c=Math.round(WebGLPlot.defaultValue(e.subdivisions,128));if(l<1)throw new WebGLPlot.DeveloperError("options.stackPartitions cannot be less than 1");if(u<0)throw new WebGLPlot.DeveloperError("options.slicePartitions cannot be less than 0");if(c<0)throw new WebGLPlot.DeveloperError("options.subdivisions must be greater than or equal to zero.");if(WebGLPlot.defined(e.offsetAttribute)&&e.offsetAttribute===WebGLPlot.GeometryOffsetAttribute.TOP)throw new WebGLPlot.DeveloperError("WebGLPlot.GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=new WebGLPlot.Cartesian3(i.x*t,i.y*t,i.z*t),this._innerRadii=new WebGLPlot.Cartesian3(n.x*t,n.y*t,n.z*t),this._minimumClock=r,this._maximumClock=o,this._minimumCone=a,this._maximumCone=s,this._stackPartitions=l,this._slicePartitions=u,this._subdivisions=c,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}_0x465603.packedLength=2*WebGLPlot.Cartesian3.packedLength+8,_0x465603.pack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("value is required");if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("array is required");return i=WebGLPlot.defaultValue(i,0),WebGLPlot.Cartesian3.pack(e._radii,t,i),i+=WebGLPlot.Cartesian3.packedLength,WebGLPlot.Cartesian3.pack(e._innerRadii,t,i),i+=WebGLPlot.Cartesian3.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i++]=e._subdivisions,t[i]=WebGLPlot.defaultValue(e._offsetAttribute,-1),t};var _0x261c36=new WebGLPlot.Cartesian3,_0x13dfd8=new WebGLPlot.Cartesian3,_0x40572c={radii:_0x261c36,innerRadii:_0x13dfd8,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};_0x465603.unpack=function(e,t,i){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("array is required");t=WebGLPlot.defaultValue(t,0);var n=WebGLPlot.Cartesian3.unpack(e,t,_0x261c36);t+=WebGLPlot.Cartesian3.packedLength;var r=WebGLPlot.Cartesian3.unpack(e,t,_0x13dfd8);t+=WebGLPlot.Cartesian3.packedLength;var o=e[t++],a=e[t++],s=e[t++],l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return WebGLPlot.defined(i)?(i._radii=WebGLPlot.Cartesian3.clone(n,i._radii),i._innerRadii=WebGLPlot.Cartesian3.clone(r,i._innerRadii),i._minimumClock=o,i._maximumClock=a,i._minimumCone=s,i._maximumCone=l,i._stackPartitions=u,i._slicePartitions=c,i._subdivisions=h,i._offsetAttribute=-1===d?void 0:d,i):(_0x40572c.minimumClock=o,_0x40572c.maximumClock=a,_0x40572c.minimumCone=s,_0x40572c.maximumCone=l,_0x40572c.stackPartitions=u,_0x40572c.slicePartitions=c,_0x40572c.subdivisions=h,_0x40572c.offsetAttribute=-1===d?void 0:d,new _0x465603(_0x40572c))},_0x465603.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var n=e._minimumClock,r=e._maximumClock,o=e._minimumCone,a=e._maximumCone,s=e._subdivisions,l=WebGLPlot.Ellipsoid.fromCartesian3(t),u=e._slicePartitions+1,c=e._stackPartitions+1;(u=Math.round(u*Math.abs(r-n)/WebGLPlot.CesiumMath.TWO_PI))<2&&(u=2),(c=Math.round(c*Math.abs(a-o)/WebGLPlot.CesiumMath.PI))<2&&(c=2);var h=0,d=1,f=i.x!==t.x||i.y!==t.y||i.z!==t.z,p=!1,_=!1;f&&(d=2,o>0&&(p=!0,h+=u),a<WebGLPlot.CesiumMath.PI&&(_=!0,h+=u));var m,g,x,y,v=s*d*(c+u),$=new Float64Array(3*v),b=2*(v+h-(u+c)*d),T=WebGLPlot.IndexDatatype.createTypedArray(v,b),C=0,S=new Array(c),w=new Array(c);for(m=0;m<c;m++)y=o+m*(a-o)/(c-1),S[m]=_0x3c24fe(y),w[m]=_0x14009c(y);var E=new Array(s),P=new Array(s);for(m=0;m<s;m++)x=n+m*(r-n)/(s-1),E[m]=_0x3c24fe(x),P[m]=_0x14009c(x);for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<c;m++)for(g=0;g<s;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(S.length=s,w.length=s,m=0;m<s;m++)y=o+m*(a-o)/(s-1),S[m]=_0x3c24fe(y),w[m]=_0x14009c(y);for(E.length=u,P.length=u,m=0;m<u;m++)x=n+m*(r-n)/(u-1),E[m]=_0x3c24fe(x),P[m]=_0x14009c(x);for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=t.x*S[m]*P[g],$[C++]=t.y*S[m]*E[g],$[C++]=t.z*w[m];if(f)for(m=0;m<s;m++)for(g=0;g<u;g++)$[C++]=i.x*S[m]*P[g],$[C++]=i.y*S[m]*E[g],$[C++]=i.z*w[m];for(C=0,m=0;m<c*d;m++){var A=m*s;for(g=0;g<s-1;g++)T[C++]=A+g,T[C++]=A+g+1}var L=c*s*d;for(m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f)for(L=c*s*d+u*s,m=0;m<u;m++)for(g=0;g<s-1;g++)T[C++]=L+m+g*u,T[C++]=L+m+(g+1)*u;if(f){var M=c*s*d,R=M+s*u;if(p)for(m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m;if(_)for(M+=s*u-u,R+=s*u-u,m=0;m<u;m++)T[C++]=M+m,T[C++]=R+m}var O=new WebGLPlot.GeometryAttributes({position:new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:$})});if(WebGLPlot.defined(e._offsetAttribute)){var D=$.length,I=new Uint8Array(D/3),B=e._offsetAttribute===WebGLPlot.GeometryOffsetAttribute.NONE?0:1;WebGLPlot.arrayFill(I,B),O.applyOffset=new WebGLPlot.GeometryAttribute({componentDatatype:WebGLPlot.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new WebGLPlot.Geometry({attributes:O,indices:T,primitiveType:WebGLPlot.PrimitiveType.LINES,boundingSphere:WebGLPlot.BoundingSphere.fromEllipsoid(l),offsetAttribute:e._offsetAttribute})}}};const _0x3aafda=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x7cca8f=_0x3aafda(void 0,(function(){return _0x7cca8f.toString().search("(((.+)+)+)+$").toString().constructor(_0x7cca8f).search("(((.+)+)+)+$")}));_0x7cca8f();var _0x2b9fc2=void 0;function _0x16f21a(e){if(!e)throw new WebGLPlot.DeveloperError("PlotRadarUpdater scene is required.");_0x2b9fc2||(this.start(50),this._primitives=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._primitives)),this.radarArray=[]}_0x16f21a.getInstance=function(e){return _0x2b9fc2||(_0x2b9fc2=new _0x16f21a(e)),_0x2b9fc2},_0x16f21a.prototype.add=function(e){e.PlotRadarType&&this.radarArray.push(e)},_0x16f21a.prototype.radarUpdate=function(e){for(let t=0;t<this.radarArray.length;t++)this.radarArray[t]._updated(e)},_0x16f21a.prototype.start=function(e){this.stop();let t=this;this.IntervalID=setInterval((function(){t.radarUpdate(e)}),e)},_0x16f21a.prototype.stop=function(){clearInterval(this.IntervalID),this.IntervalID=-1},_0x16f21a.prototype.destroy=function(){this.stop(),_0x2b9fc2=void 0,this._primitives.destroy()};const _0x12e196=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x25d2e7=_0x12e196(void 0,(function(){return _0x25d2e7.toString().search("(((.+)+)+)+$").toString().constructor(_0x25d2e7).search("(((.+)+)+)+$")}));_0x25d2e7();class _0x4638ce extends _0x10d3db{constructor(e,t){super(e),this._scene=t,this._isNeedUpdate=!1,this.PlotRadarType="PlotRadarBase",e&&(this._scale=WebGLPlot$e.defaultValue(e.scale,1),this._id=WebGLPlot$e.defaultValue(e.id,WebGLPlot$e.createGuid()),this._point=WebGLPlot$e.defaultValue(e.point,new WebGLPlot$e.Cartesian3),this._offset=WebGLPlot$e.defaultValue(e.offset,new WebGLPlot$e.Cartesian3),this._customPts=WebGLPlot$e.defaultValue(e.customPts,[]),this._radii=WebGLPlot$e.defaultValue(e.radii,new WebGLPlot$e.Cartesian3(1,1,1)),this._slicePartitions=WebGLPlot$e.defaultValue(e.slicePartitions,67),this._stackPartitions=WebGLPlot$e.defaultValue(e.stackPartitions,67),this._show=WebGLPlot$e.defaultValue(e.show,!0),this._fill=WebGLPlot$e.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$e.defaultValue(e.fillColor,new WebGLPlot$e.Color(1,0,0,.5)),this._outline=WebGLPlot$e.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$e.defaultValue(e.outlineColor,new WebGLPlot$e.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$e.defaultValue(e.outlineWidth,1),e.rotate?this._rotate=new WebGLPlot$e.Cartesian3(WebGLPlot$e.CesiumMath.toRadians(e.rotate.x),WebGLPlot$e.CesiumMath.toRadians(e.rotate.y),WebGLPlot$e.CesiumMath.toRadians(e.rotate.z)):this._rotate=new WebGLPlot$e.Cartesian3(0,0,0),this.shadows=WebGLPlot$e.defaultValue(e.shadows,WebGLPlot$e.ShadowMode.DISABLED)),t&&(_0x16f21a.getInstance(t).add(this),this._primitives=_0x16f21a.getInstance()._primitives),this._primitive=void 0,this._outlinePrimitive=void 0}updateEffect(e){WebGLPlot$e.defined(e.point)&&(this.point=e.point),WebGLPlot$e.defined(e.rotate)&&(this.rotate=e.rotate),WebGLPlot$e.defined(e.visible)&&(this.show=e.visible)}_createRadarPrimitive(){var e=new WebGLPlot$e.HeadingPitchRoll(this._rotate.z,this._rotate.y,this._rotate.x);const t=WebGLPlot$e.Cartesian3.fromDegrees(this.point.x+this._offset.x,this.point.y+this._offset.y,this.point.z+this._offset.z),i=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(t,e);this.isFill&&this._addFillPrimitive(i),this.isOutline&&this._addOutlinePrimitive(i)}_addFillPrimitive(e){if(this._primitive&&this._primitives.removeAndDestroy(this._primitive),!this.show)return;let t=this._createFillPrimitive(e);this._primitive=this._primitives.add(t)}_addOutlinePrimitive(e){if(this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),!this.show)return;let t=this._createOutlinePrimitive(e);this._outlinePrimitive=this._primitives.add(t)}_createFillPrimitive(e,t){t||(t=this);var i={show:new WebGLPlot$e.ShowGeometryInstanceAttribute(t.isFill),distanceDisplayCondition:new WebGLPlot$e.DistanceDisplayConditionGeometryInstanceAttribute,color:void 0,offset:void 0},n=new WebGLPlot$e.MaterialAppearance({material:WebGLPlot$e.Material.fromType(WebGLPlot$e.Material.ColorType,{color:t.fillColor}),translucent:!0,closed:!0});let r=this._createRadarFillGeometry(t),o=new WebGLPlot$e.GeometryInstance({id:t.id,geometry:r,modelMatrix:e,attributes:i});return new WebGLPlot$e.Primitive({geometryInstances:o,appearance:n,asynchronous:!1,shadows:t.shadows})}_createOutlinePrimitive(e,t){t||(t=this);var i={show:new WebGLPlot$e.ShowGeometryInstanceAttribute(t.isOutline),distanceDisplayCondition:new WebGLPlot$e.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot$e.ColorGeometryInstanceAttribute.fromColor(t.outlineColor),offset:void 0};let n=this._createRadarOutLineGeometry(t),r=new WebGLPlot$e.GeometryInstance({id:t.id,geometry:n,modelMatrix:e,attributes:i}),o=new WebGLPlot$e.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:t.outlineWidth}});return new WebGLPlot$e.Primitive({geometryInstances:r,appearance:o,asynchronous:!1,shadows:t.shadows})}clone(e){if(!WebGLPlot$e.defined(e))throw new WebGLPlot$e.DeveloperError("PlotRadar clone result is required.");return e.PlotRadarType="PlotRadarBase",e._scene=this._scene,e._id=this.id,e._point=this.point.clone(),e._rotate=this._rotate.clone(),e._radii=this.radii.clone(),e._slicePartitions=this.slicePartitions,e._stackPartitions=this.stackPartitions,e._show=this.show,e._fill=this.isFill,e._fillColor=this.fillColor,e._outline=this.isOutline,e._outlineColor=this.outlineColor,e._outlineWidth=this._outlineWidth,e.shadows=this.shadows,e._customPts=this._customPts,e}getEffectParameter(){let e={};return e.point=this.point,e.rotate=this.rotate,e.visible=this.visible,e}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[])}toGeoJson(){return{}}fromGeoJson(e){}}Object.defineProperties(_0x4638ce.prototype,{id:{get:function(){return this._id},set:function(e){"string"==typeof e&&this._id!==e&&(this._id=e)}},point:{get:function(){return this._point},set:function(e){(e instanceof WebGLPlot$e.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._point)&&(this._point=e.clone(),this._scanArray&&this._scanArray.length>0&&this._scanArray.forEach((t=>{t.point=e})),this._isNeedUpdate=!0)}},offset:{get:function(){return this._offset},set:function(e){(e instanceof WebGLPlot$e.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._offset)&&(this._offset=e,this._scanArray&&this._scanArray.length>0&&this._scanArray.forEach((t=>{t.offset=e})),this._isNeedUpdate=!0)}},rotate:{get:function(){return new WebGLPlot$e.Cartesian3(WebGLPlot$e.CesiumMath.toDegrees(this._rotate.x),WebGLPlot$e.CesiumMath.toDegrees(this._rotate.y),WebGLPlot$e.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot$e.Cartesian3||e instanceof _0x23de81){let t=new WebGLPlot$e.Cartesian3(WebGLPlot$e.CesiumMath.toRadians(e.x),WebGLPlot$e.CesiumMath.toRadians(e.y),WebGLPlot$e.CesiumMath.toRadians(e.z));WebGLPlot$e.Cartesian3(t,this._rotate)||(this._rotate=t,this._isNeedUpdate=!0)}}},slicePartitions:{get:function(){return this._slicePartitions},set:function(e){"number"==typeof e&&this._slicePartitions!==e&&(this._slicePartitions=e,this._isNeedUpdate=!0)}},stackPartitions:{get:function(){return this._stackPartitions}},show:{get:function(){return this._show},set:function(e){"boolean"==typeof e&&this._show!==e&&(this._show=e,this._isNeedUpdate=!0)}},isFill:{get:function(){return this._fill},set:function(e){"boolean"==typeof e&&this._fill!==e&&(this._fill=e,this._primitive&&(this._primitive.show=e))}},isOutline:{get:function(){return this._outline},set:function(e){"boolean"==typeof e&&this._outline!==e&&(this._outline=e,this._outlinePrimitive&&(this._outlinePrimitive.show=e))}},fillColor:{get:function(){return this._fillColor},set:function(e){e instanceof WebGLPlot$e.Color&&!WebGLPlot$e.Color.equals(e,this._fillColor)&&(this._fillColor=e,this._primitive&&(this._primitive.appearance.material=WebGLPlot$e.Material.fromType(WebGLPlot$e.Material.ColorType,{color:e})))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){e instanceof WebGLPlot$e.Color&&!WebGLPlot$e.Color.equals(e,this._outlineColor)&&(this._outlineColor=e,this._isNeedUpdate=!0)}},material:{get:function(){return this._fillColor},set:function(e){if(e instanceof WebGLPlot$e.Color&&!WebGLPlot$e.Color.equals(e,this._fillColor)){this.fillColor=e;let t=2*e.alpha>=1?1:2*e.alpha;this.outlineColor=new WebGLPlot$e.Color(e.red,e.green,e.blue,t)}}},radii:{get:function(){return this._radii},set:function(e){(e instanceof WebGLPlot$e.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._radii)&&(this._radii=e.clone(),this._createScan&&this._createScan(),this._isNeedUpdate=!0)}},isShowScan:{get:function(){return this._isShowScan},set:function(e){"boolean"==typeof e&&this.__isShowScan!==e&&(this._isShowScan=e)}},dScanSpeed:{get:function(){return WebGLPlot$e.CesiumMath.toDegrees(this._dScanSpeed)},set:function(e){if("number"==typeof e){let t=WebGLPlot$e.CesiumMath.toRadians(e);this._dScanSpeed=t}}},scale:{get:function(){return this._scale},set:function(e){"number"==typeof e&&this._scale!==e&&(this._scale=e,this._isNeedUpdate=!0)}}});var _0x275507=(_0x106acc=!0,function(e,t){var i=_0x106acc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x106acc=!1,i}),_0x39263a=_0x275507(void 0,(function(){return _0x39263a.toString().search("(((.+)+)+)+$").toString().constructor(_0x39263a).search("(((.+)+)+)+$")})),_0x106acc;_0x39263a();var _0x2a1630={PlotMechanicalRadar:0,PlotParameterRadar:1,PlotWarningRadar:2,PlotScanRadar:3,PlotRotateRadar:4,PlotCustomRadar:5},_0x2c0193=Object.freeze(_0x2a1630),_0x53c1b5=(_0x59ea31=!0,function(e,t){var i=_0x59ea31?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59ea31=!1,i}),_0x5a049d=_0x53c1b5(void 0,(function(){return _0x5a049d.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a049d).search("(((.+)+)+)+$")})),_0x59ea31;_0x5a049d();class _0x3e0fb4 extends _0x4638ce{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotCustomRadar scene is required.");super(e,t),this.PlotRadarType=_0x2c0193.PlotCustomRadar,this._add2Scene()}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive())}_add2Scene(){this._createRadarPrimitive()}_createRadarFillGeometry(e){return _0x1fc894.createGeometry(new _0x1fc894({customPts:e._customPts,slicePartitions:e.slicePartitions,stackPartitions:e.stackPartitions,radii:e.radii}),!0)}_createRadarOutLineGeometry(e){return _0xe8531.createGeometry(new _0xe8531({customPts:e._customPts,slicePartitions:e.slicePartitions,stackPartitions:e.stackPartitions,radii:e.radii}),!0)}getScanPts(e,t){var i=[];for(let r=0;r<e.length;r++){var n=[];const o=e[r];for(let e=0;e<t;e++){const t=o[e];n.push(t)}i.push(n)}return i}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e.rotate=this.rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x3e0fb4(this,this._scene)}}Object.defineProperties(_0x3e0fb4.prototype,{customPts:{get:function(){return this._customPts},set:function(e){Array.isArray(e)&&(this._customPts=e,this._isNeedUpdate=!0)}}});const _0x268597=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1be771=_0x268597(void 0,(function(){return _0x1be771.toString().search("(((.+)+)+)+$").toString().constructor(_0x1be771).search("(((.+)+)+)+$")}));_0x1be771();class _0x2de2c6 extends _0x4638ce{constructor(e){super(e),this.PlotRadarType="PlotRotateRadarScan",this._slicePartitions=2,this._computeScanPts(e)}_computeScanPts(e){WebGLPlot.defined(e)&&(this.scanAngle=e.rotateAngle*(this._slicePartitions/e.slicePartitions),e._radarPts.length>3&&this._getScanPts(e._radarPts))}_getScanPts(e){this._radarPts=[];for(let i=0;i<e.length;i++){var t=[];const n=e[i];for(let e=0;e<this._slicePartitions;e++){const i=n[e];t.push(i)}this._radarPts.push(t)}}clone(e){return(!WebGLPlot.defined(e)||!(e instanceof _0x2de2c6))&&(e=new _0x2de2c6),(e=super.clone(e))._radarPts=this._radarPts,e.PlotRadarType=this.PlotRadarType,e._slicePartitions=this._slicePartitions,e.scanAngle=this.scanAngle,e._isNeedUpdate=!0,e}}const _0x33f217=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x8f77a1=_0x33f217(void 0,(function(){return _0x8f77a1.toString().search("(((.+)+)+)+$").toString().constructor(_0x8f77a1).search("(((.+)+)+)+$")}));_0x8f77a1();class _0xbdfb44 extends _0x4638ce{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotRotateRadar scene is required.");super(e,t),this.PlotRadarType=_0x2c0193.PlotRotateRadar,this._primitiveScnaFillArry=[],this._primitiveScnaOutLineArry=[],this._scanArray=[],this._merge(e),this._add2Scene()}getScanArray(){return this._scanArray}setScanArray(e){this.removeAllScanArray();for(let t=0;t<e.length;t++){const i=e[t];i instanceof _0x2de2c6&&this._scanArray.push(i)}return this._createScanGeoArray(),this._scanArray}addScan(e){(!e||!(e instanceof _0x2de2c6))&&(e=new _0x2de2c6(this)),this._scanArray.push(e),this._createScanGeoArray()}removeAllScanArray(){this._removeAllScanArrayPrimitive(),this._scanArray=[]}removeScan(e){if(this._primitiveScnaFillArry.length>e){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaFillArry.splice(e,1)}if(this._primitiveScnaOutLineArry.length>e){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaOutLineArry.splice(e,1)}return this._scanArray.length>e&&(this._scanArray.splice(e,1),this._createScanGeoArray(),!0)}setScan(e,t){return e instanceof _0x2de2c6&&(this.removeScan(t),this._scanArray.splice(t,0,e),this._createScanGeoArray(),!0)}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[]),this.removeAllScanArray()}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive());const t=this._dScanSpeed*e/1e3;this._updated_Scan(-t)}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScan()}_createScan(){if(this.removeAllScanArray(),!this.isShowScan||!this.show)return;const e=this.rotateAngle/this.scanCount;for(let r=0;r<this.scanCount;r++){var t=new _0x2de2c6(this),i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*r);t._rotate=i,t.material=this.scanColor,this._scanArray.push(t);var n=new WebGLPlot.HeadingPitchRoll(t._rotate.z,t._rotate.y,t._rotate.x);const o=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this._offset.x,t.point.y+this._offset.y,t.point.z+this._offset.z),a=WebGLPlot.Transforms.headingPitchRollToFixedFrame(o,n);if(t.isFill){let e=this._createFillPrimitive(a,t);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(a,t);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan(e){if(this._removeAllScanArrayPrimitive(),this.isShowScan&&this.show)for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n];this.rotateAngle>=WebGLPlot.CesiumMath.TWO_PI?(t._rotate.z+=e,Math.abs(t._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(t._rotate.z=t._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(t.__bIsBack_?t._rotate.z-=e:t._rotate.z+=e,-t._rotate.z>=this.rotateAngle-this._rotate.z-t.scanAngle/2?t.__bIsBack_=!0:-t._rotate.z<=-this._rotate.z&&(t.__bIsBack_=!1));var i=new WebGLPlot.HeadingPitchRoll(t._rotate.z,t._rotate.y,t._rotate.x);const r=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this.offset.x,t.point.y+this.offset.y,t.point.z+this.offset.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,i);if(t.isFill){let e=this._createFillPrimitive(o,t);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(o,t);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_removeAllScanArrayPrimitive(){if(this._primitiveScnaFillArry.length>0){for(let e=0;e<this._primitiveScnaFillArry.length;e++){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaFillArry=[]}if(this._primitiveScnaOutLineArry.length>0){for(let e=0;e<this._primitiveScnaOutLineArry.length;e++){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaOutLineArry=[]}}_createRadarFillGeometry(e){return e||(e=this),_0x1fc894.createGeometry(new _0x1fc894({customPts:e._radarPts,slicePartitions:e.slicePartitions,stackPartitions:e._radarPts.length,radii:e.radii}),e.isClose)}_createRadarOutLineGeometry(e){return e||(e=this),_0xe8531.createGeometry(new _0xe8531({customPts:e._radarPts,slicePartitions:e.slicePartitions,stackPartitions:e._radarPts.length,radii:e.radii}),e.isClose)}_computerRadarPts(){if(this._customPts.length<3)throw new WebGLPlot.defined("PlotRotateRadar Property customPts.length < 3.");let e=[];for(let n=0;n<this._customPts.length;n++){const r=this._customPts[n],o=this.rotateAngle/(this.slicePartitions-1);for(var t=[],i=0;i<this.slicePartitions;i++){const e=i*o;t.push(new WebGLPlot.Cartesian3(r.x*Math.cos(e),r.x*Math.sin(e),r.y))}e.push(t)}return e}_createScanGeoArray(){const e=this.rotateAngle/this._scanArray.length;for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n],i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*n);t._rotate=i}}_merge(e){this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,.5)),e.dScanSpeed?this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),e.rotateAngle?this.rotateAngle=WebGLPlot.CesiumMath.toRadians(e.rotateAngle):this.rotateAngle=WebGLPlot.CesiumMath.toRadians(360),this.isClose=this.rotateAngle%WebGLPlot.CesiumMath.TWO_PI==0,this._radarPts=this._computerRadarPts()}}Object.defineProperties(_0xbdfb44.prototype,{customPts:{get:function(){return this._customPts},set:function(e){Array.isArray(e)&&(this._customPts=e,this._radarPts=this._computerRadarPts())}}});const _0x532198=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x204d9d=_0x532198(void 0,(function(){return _0x204d9d.toString().search("(((.+)+)+)+$").toString().constructor(_0x204d9d).search("(((.+)+)+)+$")}));_0x204d9d();class _0x28b85b extends _0xbdfb44{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotMechanicalRadar scene is required.");e.rotateAngle=360,e.scale=WebGLPlot.defaultValue(e.scale,1),e.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1e4,1e4,1e4)),e.cellAngle=WebGLPlot.defaultValue(e.cellAngle,5),e.customPts=_0x2d8b0b(e.radii.x/10*e.scale),e.slicePartitions=e.rotateAngle/e.cellAngle,super(e,t),this.PlotRadarType=_0x2c0193.PlotMechanicalRadar}}function _0x2d8b0b(e){var t=[];return t.push(new WebGLPlot.Cartesian3(0,0,0)),t.push(new WebGLPlot.Cartesian3(1.10296043731977*e,.046804145634484*e,0)),t.push(new WebGLPlot.Cartesian3(2.21610390044188*e,.11759698792659*e,0)),t.push(new WebGLPlot.Cartesian3(3.23948463412258*e,.207919742367934*e,0)),t.push(new WebGLPlot.Cartesian3(4.24306826853316*e,.304605633553736*e,0)),t.push(new WebGLPlot.Cartesian3(5.07593366806073*e,.449055607644075*e,0)),t.push(new WebGLPlot.Cartesian3(6.09774013826592*e,.626275021765735*e,0)),t.push(new WebGLPlot.Cartesian3(6.82649676873021*e,.854033937659516*e,0)),t.push(new WebGLPlot.Cartesian3(7.59836360255064*e,1.13340451890574*e,0)),t.push(new WebGLPlot.Cartesian3(8.12046765798091*e,1.39526442140232*e,0)),t.push(new WebGLPlot.Cartesian3(8.77215268479149*e,1.76316819829927*e,0)),t.push(new WebGLPlot.Cartesian3(9.24420050024946*e,2.26394442518268*e,0)),t.push(new WebGLPlot.Cartesian3(9.41437066670075*e,2.78004341750028*e,0)),t.push(new WebGLPlot.Cartesian3(9.37677016147896*e,3.37826190260998*e,0)),t.push(new WebGLPlot.Cartesian3(9.02402463279236*e,4.05665157036142*e,0)),t.push(new WebGLPlot.Cartesian3(8.49067600110484*e,4.52027646588052*e,0)),t.push(new WebGLPlot.Cartesian3(7.93178024681909*e,4.83964546832953*e,0)),t.push(new WebGLPlot.Cartesian3(7.37859457443028*e,4.95818525526998*e,0)),t.push(new WebGLPlot.Cartesian3(6.73933014626123*e,4.97031713954619*e,0)),t.push(new WebGLPlot.Cartesian3(6.1144105659988*e,4.8548345993221*e,0)),t.push(new WebGLPlot.Cartesian3(5.51606295388907*e,4.68304158511523*e,0)),t.push(new WebGLPlot.Cartesian3(4.84103177562709*e,4.34900006813962*e,0)),t.push(new WebGLPlot.Cartesian3(4.09846873384157*e,3.95082720446673*e,0)),t.push(new WebGLPlot.Cartesian3(3.26846203349058*e,3.4279079135254*e,0)),t.push(new WebGLPlot.Cartesian3(2.2493811983941*e,2.68004157158963*e,0)),t.push(new WebGLPlot.Cartesian3(1.43802404023069*e,1.88816148893958*e,0)),t.push(new WebGLPlot.Cartesian3(.67580571600966*e,.925081705540024*e,0)),t.push(new WebGLPlot.Cartesian3(0,0,0)),t}Object.defineProperties(_0x28b85b.prototype,{radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._radii)){this._radii=e.clone(),this.customPts=_0x2d8b0b(this._radii.x/10*this._scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e,this.customPts=_0x2d8b0b(this._radii.x/10*e);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}}});const _0x363c10=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2dfc92=_0x363c10(void 0,(function(){return _0x2dfc92.toString().search("(((.+)+)+)+$").toString().constructor(_0x2dfc92).search("(((.+)+)+)+$")}));_0x2dfc92();class _0x3ed677 extends _0x4638ce{constructor(e){if(super(e),this.PlotRadarType="PlotParameterRadarScan",this.scale=WebGLPlot.defaultValue(e.scale,1),this.radii=WebGLPlot.defaultValue(e.radii,0),this.innerRadii=WebGLPlot.defaultValue(e.innerRadii,0),this._minimumClock=WebGLPlot.CesiumMath.toRadians(0),this._maximumClock=WebGLPlot.CesiumMath.toRadians(5),this._minimumCone=WebGLPlot.defaultValue(e._minimumCone,0),this._maximumCone=WebGLPlot.defaultValue(e._maximumCone,WebGLPlot.CesiumMath.PI),this.heightReference=WebGLPlot.defaultValue(e.heightReference,void 0),this.subdivisions=WebGLPlot.defaultValue(e.subdivisions,128),this.shadows=WebGLPlot.defaultValue(e.shadows,WebGLPlot.ShadowMode.DISABLED),this.distanceDisplayCondition=WebGLPlot.defaultValue(e.distanceDisplayCondition,new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute),this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this.isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),this.__bIsBack_=void 0,this._minimumClock>this._maximumClock){let e=this._minimumClock;this._minimumClock=this._maximumClock,this._maximumClock=e}this.scanAngle=this._maximumClock-this._minimumClock,"PlotParameterRadar"===e.PlotRadarType&&(this.isOutline=!1)}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e.rotate=this.rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x3ed677(this)}}const _0x10d7f7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4b9cff=_0x10d7f7(void 0,(function(){return _0x4b9cff.toString().search("(((.+)+)+)+$").toString().constructor(_0x4b9cff).search("(((.+)+)+)+$")}));_0x4b9cff();class _0x3f4ebc extends _0x4638ce{constructor(e,t){super(e,t),this.PlotRadarType=_0x2c0193.PlotParameterRadar,this._primitiveScnaFillArry=[],this._primitiveScnaOutLineArry=[],this._scanArray=[],this._merge(e),this._add2Scene()}getScanArray(){return this._scanArray}setScanArray(e){this.removeAllScanArray();for(let t=0;t<e.length;t++){const i=e[t];i instanceof _0x3ed677&&this._scanArray.push(i)}return this._createScanGeoArray(),this._scanArray}addScan(e){(!e||!(e instanceof _0x3ed677))&&(e=new _0x3ed677(this)),this._scanArray.push(e),this._createScanGeoArray()}removeAllScanArray(){this._removeAllScanArrayPrimitive(),this._scanArray=[]}removeScan(e){if(this._primitiveScnaFillArry.length>e){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaFillArry.splice(e,1)}if(this._primitiveScnaOutLineArry.length>e){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0,this._primitiveScnaOutLineArry.splice(e,1)}return this._scanArray.length>e&&(this._scanArray.splice(e,1),this._createScanGeoArray(),!0)}setScan(e,t){return!(t>=this._scanArray.length)&&((!e||!(e instanceof _0x3ed677))&&(e=new _0x3ed677(this)),this.removeScan(t),this._scanArray.splice(t,0,e),this._createScanGeoArray(),!0)}_updated(e){this._isNeedUpdate&&(this._isNeedUpdate=!1,this._createRadarPrimitive());const t=this._dScanSpeed*e/1e3;this._updated_Scan(-t)}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScan()}_createScan(){if(this.removeAllScanArray(),!this.isShowScan||!this.show)return;const e=(this._maximumClock-this._minimumClock)/this.scanCount;for(let r=0;r<this.scanCount;r++){var t=new _0x3ed677(this),i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-this._minimumClock-e*r);t._rotate=i,t.material=this.scanColor,this._scanArray.push(t);var n=new WebGLPlot.HeadingPitchRoll(t._rotate.z,t._rotate.y,t._rotate.x);const o=WebGLPlot.Cartesian3.fromDegrees(t.point.x+this.offset.x,t.point.y+this.offset.y,t.point.z+this.offset.z),a=WebGLPlot.Transforms.headingPitchRollToFixedFrame(o,n);if(t.isFill){let e=this._createFillPrimitive(a,t);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(t.isOutline){let e=this._createOutlinePrimitive(a,t);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan(e){if(this._removeAllScanArrayPrimitive(),this.isShowScan&&this.show)for(let i=0;i<this._scanArray.length;i++){const n=this._scanArray[i];this.radarClock>=WebGLPlot.CesiumMath.TWO_PI?(n._rotate.z+=e,Math.abs(n._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(n._rotate.z=n._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(n.__bIsBack_?n._rotate.z-=e:n._rotate.z+=e,-n._rotate.z>=this._maximumClock-this._rotate.z-n.scanAngle?n.__bIsBack_=!0:-n._rotate.z<=this._minimumClock-this._rotate.z&&(n.__bIsBack_=!1));var t=new WebGLPlot.HeadingPitchRoll(n._rotate.z,n._rotate.y,n._rotate.x);const r=WebGLPlot.Cartesian3.fromDegrees(n.point.x+this.offset.x,n.point.y+this.offset.y,n.point.z+this.offset.z),o=WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,t);if(n.isFill){let e=this._createFillPrimitive(o,n);this._primitiveScnaFillArry.push(this._primitives.add(e))}if(n.isOutline){let e=this._createOutlinePrimitive(o,n);this._primitiveScnaOutLineArry.push(this._primitives.add(e))}}}_updated_Scan2(e){if(this._primitiveScnaFillArry.length>0)for(let o=0;o<this._primitiveScnaFillArry.length;o++){let a=this._primitiveScnaFillArry[o];const s=this._scanArray[o];this.radarClock>=WebGLPlot.CesiumMath.TWO_PI?(s._rotate.z+=e,Math.abs(s._rotate.z)>=WebGLPlot.CesiumMath.TWO_PI&&(s._rotate.z=s._rotate.z%WebGLPlot.CesiumMath.TWO_PI)):(s.__bIsBack_?s._rotate.z-=e:s._rotate.z+=e,-s._rotate.z>=this._maximumClock-this._rotate.z-s.scanAngle?s.__bIsBack_=!0:-s._rotate.z<=this._minimumClock-this._rotate.z&&(s.__bIsBack_=!1));const l=WebGLPlot.Cartesian3.fromDegrees(s.point.x,s.point.y,s.point.z);var t=WebGLPlot.Matrix4.fromTranslation(l),i=WebGLPlot.Cartesian3.multiplyByScalar(l,-1,new WebGLPlot.Cartesian3),n=WebGLPlot.Matrix4.fromTranslation(i);let u=WebGLPlot.Matrix3.fromRotationX(s._rotate.x),c=WebGLPlot.Matrix3.fromRotationY(s._rotate.y),h=WebGLPlot.Matrix3.fromRotationZ(s._rotate.z);n=WebGLPlot.Matrix4.multiplyByMatrix3(n,u,n),n=WebGLPlot.Matrix4.multiplyByMatrix3(n,c,n),n=WebGLPlot.Matrix4.multiplyByMatrix3(n,h,n);var r=WebGLPlot.Matrix4.multiply(t,n,new WebGLPlot.Matrix4);a.modelMatrix=r}if(this._primitiveScnaOutLineArry.length>0)for(let e=0;e<this._primitiveScnaOutLineArry.length;e++)this._primitiveScnaOutLineArry[e]}_createRadarFillGeometry(e){return _0x3daff3.createGeometry(new _0x3daff3(e))}_createRadarOutLineGeometry(e){return _0x465603.createGeometry(new _0x465603(e))}_removeAllScanArrayPrimitive(){if(this._primitiveScnaFillArry.length>0){for(let e=0;e<this._primitiveScnaFillArry.length;e++){let t=this._primitiveScnaFillArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaFillArry=[]}if(this._primitiveScnaOutLineArry.length>0){for(let e=0;e<this._primitiveScnaOutLineArry.length;e++){let t=this._primitiveScnaOutLineArry[e];this._primitives.removeAndDestroy(t),t=void 0}this._primitiveScnaOutLineArry=[]}}_createScanGeoArray(){const e=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let n=0;n<this._scanArray.length;n++){var t=this._scanArray[n],i=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*n);t._rotate=i,t.scanAngle=t.maximumClock-t.minimumClock}}clone(e){return WebGLPlot.defined(e)?(e.PlotRadarType=this.PlotRadarType,e.id=this.id,e.point=this.point.clone(),e._rotate=this._rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this._innerRadii,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.fillColor,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x3f4ebc(this)}_merge(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("PlotParameterRadar merge source is required.");if(this._innerRadii=WebGLPlot.defaultValue(e.innerRadii,0),e.minimumClock?this._minimumClock=WebGLPlot.CesiumMath.toRadians(e.minimumClock):this._minimumClock=0,e.maximumClock?this._maximumClock=WebGLPlot.CesiumMath.toRadians(e.maximumClock):this._maximumClock=WebGLPlot.CesiumMath.TWO_PI,e.minimumCone?this._minimumCone=WebGLPlot.CesiumMath.toRadians(e.minimumCone):this._minimumCone=0,e.maximumCone?this._maximumCone=WebGLPlot.CesiumMath.toRadians(e.maximumCone):this._maximumCone=WebGLPlot.CesiumMath.PI,this.heightReference=WebGLPlot.defaultValue(e.heightReference,void 0),this.distanceDisplayCondition=WebGLPlot.defaultValue(e.distanceDisplayCondition,new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute),this.scanCount=WebGLPlot.defaultValue(e.scanCount,1),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this.scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),e.dScanSpeed?this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this._dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),this._minimumClock>this._maximumClock){let e=this._minimumClock;this._minimumClock=this._maximumClock,this._maximumClock=e}this.radarClock=this._maximumClock-this._minimumClock}destroy(){this._isNeedUpdate=!1,this._primitive&&this._primitives.removeAndDestroy(this._primitive),this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this._scanArray&&this._scanArray.length>0&&(this._scanArray.forEach((e=>{e.destroy()})),this._scanArray=[]),this.removeAllScanArray()}}Object.defineProperties(_0x3f4ebc.prototype,{point:{get:function(){return this._point},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._point)){this._point=e.clone();for(let t=0;t<this._scanArray.length;t++){this._scanArray[t].point=e}this._isNeedUpdate=!0}}},rotate:{get:function(){return new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toDegrees(this._rotate.x),WebGLPlot.CesiumMath.toDegrees(this._rotate.y),WebGLPlot.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81){let i=new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toRadians(e.x),WebGLPlot.CesiumMath.toRadians(e.y),WebGLPlot.CesiumMath.toRadians(e.z));if(!WebGLPlot.Cartesian3(i,this._rotate)){this._rotate=i;const e=(this._maximumClock-this._minimumClock)/this.scanCount;for(let i=0;i<this._scanArray.length;i++){const n=this._scanArray[i];var t=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-e*i);n._rotate=t}this._isNeedUpdate=!0}}}},innerRadii:{get:function(){return this._innerRadii.x<=1e-8||this._innerRadii.y<=1e-8||this._innerRadii.z<=1e-8?new _0x23de81(0,0,0):this._innerRadii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._point)){(e.x<=0||e.y<=0||e.z<=0)&&(e=new _0x23de81(1e-8,1e-8,1e-8)),this._innerRadii=e.clone(),this._innerRadii.x>this.radii.x&&(this._innerRadii=this.radii.clone());for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].innerRadii=this.innerRadii.clone()}this._isNeedUpdate=!0}}},radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._point)){this._radii=e.clone(),this._innerRadii.x>this.radii.x&&(this._innerRadii=this.radii.clone());for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].radii=this.radii.clone()}this._isNeedUpdate=!0}}},minimumClock:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._minimumClock)},set:function(e){if("number"!=typeof e||e===this.minimumClock||e>this.maximumClock)return;this._minimumClock=WebGLPlot.CesiumMath.toRadians(e),this._isNeedUpdate=!0;const t=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let e=0;e<this._scanArray.length;e++){var i=this._scanArray[e],n=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-t*e);i._rotate=n}this.radarClock=this._maximumClock-this._minimumClock}},maximumClock:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._maximumClock)},set:function(e){if("number"!=typeof e||e===this.maximumClock||e<this.minimumClock)return;this._maximumClock=WebGLPlot.CesiumMath.toRadians(e),this._isNeedUpdate=!0;const t=(this._maximumClock-this._minimumClock)/this._scanArray.length;for(let e=0;e<this._scanArray.length;e++){var i=this._scanArray[e],n=new WebGLPlot.Cartesian3(this._rotate.x,this._rotate.y,this._rotate.z-t*e);i._rotate=n}this.radarClock=this._maximumClock-this._minimumClock}},minimumCone:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._minimumCone)},set:function(e){if("number"==typeof e&&e!==this.minimumCone){this._minimumCone=WebGLPlot.CesiumMath.toRadians(e);for(let e=0;e<this._scanArray.length;e++){this._scanArray[e]._minimumCone=this._minimumCone}this._isNeedUpdate=!0}}},maximumCone:{get:function(){return WebGLPlot.CesiumMath.toDegrees(this._maximumCone)},set:function(e){if("number"==typeof e&&e!==this.maximumCone){this._maximumCone=WebGLPlot.CesiumMath.toRadians(e);for(let e=0;e<this._scanArray.length;e++){this._scanArray[e]._maximumCone=this._maximumCone}this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e;for(let e=0;e<this._scanArray.length;e++){this._scanArray[e].scale=this._scale}this._isNeedUpdate=!0}}}});var _0xa16377=(_0xae7f04=!0,function(e,t){var i=_0xae7f04?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xae7f04=!1,i}),_0x5c561d=_0xa16377(void 0,(function(){return _0x5c561d.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c561d).search("(((.+)+)+)+$")})),_0xae7f04;_0x5c561d();class _0x342bfb extends _0x4638ce{constructor(e){super(e),this._slicePartitions=2,this.scaningRow=0,e._radarPts.length>3&&this._computeScanPts(e._radarPts),this.PlotRadarType="PlotScanRadarScan",e.scanConeColor&&(this._fillColor=e.scanConeColor),this.isBackIng=!1}_computeScanPts(e){const t=e[0],i=e[this.scaningRow+1],n=e[this.scaningRow+2];var r=[];r.push(new WebGLPlot.Cartesian3(t[0].x,t[0].y,t[0].z)),r.push(new WebGLPlot.Cartesian3(t[1].x,t[1].y,t[1].z));var o=[];o.push(new WebGLPlot.Cartesian3(i[0].x,i[0].y,i[0].z)),o.push(new WebGLPlot.Cartesian3(i[1].x,i[1].y,i[1].z));var a=[];a.push(new WebGLPlot.Cartesian3(n[0].x,n[0].y,n[0].z)),a.push(new WebGLPlot.Cartesian3(n[1].x,n[1].y,n[1].z));var s=[];s.push(new WebGLPlot.Cartesian3(t[0].x,t[0].y,t[0].z)),s.push(new WebGLPlot.Cartesian3(t[1].x,t[1].y,t[1].z)),this._radarPts=[r,o,a,s],this._indices=[0,3,2,0,4,5,0,2,4,0,5,3,4,2,3,3,5,4]}}const _0x458257=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2dd787=_0x458257(void 0,(function(){return _0x2dd787.toString().search("(((.+)+)+)+$").toString().constructor(_0x2dd787).search("(((.+)+)+)+$")}));_0x2dd787();class _0x49f493 extends _0x4638ce{constructor(e,t){super(e,t),this._primitiveScnaFill=void 0,this._primitiveScnaOutLine=void 0,this.PlotRadarType=_0x2c0193.PlotScanRadar,e.isShowScan&&(this.scaningRow=1),this._fillPrimitives=[],this._merge(e),this._add2Scene()}_updated(e){if(this._isNeedUpdate&&(this._isNeedUpdate=!1,this._computeRadarPts2(),this._createRadarPrimitive()),this.isShowScan){const t=this.dScanSpeed*e/1e3;this._updated_Scan(-t)}}_updated_Scan(e){if(this._removeScanConePrimitive(),!this.scanCone)return;this.scaningRow%2!=0?this.scanCone.isBackIng=!1:(e*=-1,this.scanCone.isBackIng=!0),this.scanCone._rotate.z+=e,(-this.scanCone._rotate.z+this.cellAngle>=-this._rotate.z+this.scanHAngle||-this.scanCone._rotate.z<=-this._rotate.z&&this.scanCone.isBackIng)&&(this.scaningRow+=1,this.scanCone.scaningRow+=1,this.scaningRow-1>=this.scanVAngle/this.cellAngle&&(this.scanCone.scaningRow=0,this.scaningRow=1,this.scanCone._rotate.z=this._rotate.z),this._isNeedUpdate=!0,this.scanCone._computeScanPts(this._radarPts));var t=new WebGLPlot.HeadingPitchRoll(this.scanCone._rotate.z,this._rotate.y,this._rotate.x);const i=WebGLPlot.Cartesian3.fromDegrees(this.scanCone.point.x+this.offset.x,this.scanCone.point.y+this.offset.y,this.scanCone.point.z+this.offset.z),n=WebGLPlot.Transforms.headingPitchRollToFixedFrame(i,t);if(this.scanCone.isFill){let e=this._createFillPrimitive(n,this.scanCone);this._primitiveScnaFill=this._primitives.add(e[0])}if(this.scanCone.isOutline){let e=this._createOutlinePrimitive(n,this.scanCone);this._primitiveScnaOutLine=this._primitives.add(e)}}_add2Scene(){this._createRadarPrimitive(),this.isShowScan&&this._createScanCone()}_createRadarFillGeometry(e,t){return e||(e=this),t||(t=e._radarPts),_0x1fc894.createGeometry(new _0x1fc894({customPts:t,slicePartitions:e.slicePartitions,stackPartitions:t.length,radii:e.radii,indices:e._indices}),this.isClose)}_createRadarOutLineGeometry(e,t){return e||(e=this),t||(t=e._radarPts),_0xe8531.createGeometry(new _0xe8531({customPts:t,slicePartitions:e.slicePartitions,stackPartitions:t.length,radii:this.radii}),this.isClose)}_createScanCone(){this._removeScanConePrimitive(),this.scanCone||(this.scanCone=new _0x342bfb(this)),this.scanCone.rotate=this.rotate,this.scanCone.material=this.scanConeColor;var e=new WebGLPlot.HeadingPitchRoll(this.scanCone._rotate.z,this.scanCone._rotate.y,this.scanCone._rotate.x);const t=WebGLPlot.Cartesian3.fromDegrees(this.point.x+this.offset.x,this.point.y+this.offset.y,this.point.z+this.offset.z),i=WebGLPlot.Transforms.headingPitchRollToFixedFrame(t,e);if(this.scanCone.isFill){let e=this._createFillPrimitive(i,this.scanCone);this._primitiveScnaFill=this._primitives.add(e[0])}if(this.scanCone.isOutline){let e=this._createOutlinePrimitive(i,this.scanCone);this._primitiveScnaOutLine=this._primitives.add(e)}}_removeScanConePrimitive(){this._primitiveScnaFill&&(this._primitives.removeAndDestroy(this._primitiveScnaFill),this._primitiveScnaFill=void 0),this._primitiveScnaOutLine&&(this._primitives.removeAndDestroy(this._primitiveScnaOutLine),this._primitiveScnaOutLine=void 0)}_addFillPrimitive(e){if(this._fillPrimitives.length>0){for(var t in this._fillPrimitives)this._primitives.removeAndDestroy(this._fillPrimitives[t]);this._fillPrimitives=[]}let i=this._createFillPrimitive(e);for(var t in i)this._fillPrimitives.push(this._primitives.add(i[t]))}_createFillPrimitive(e,t){t||(t=this);var i=[],n={show:new WebGLPlot.ShowGeometryInstanceAttribute(t.isFill),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:void 0,offset:void 0},r=new WebGLPlot.MaterialAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:t.fillColor}),translucent:!0,closed:!0});let o=this._createRadarFillGeometry(t,t._radarPts1),a=new WebGLPlot.GeometryInstance({id:t.id,geometry:o,modelMatrix:e,attributes:n}),s=new WebGLPlot.Primitive({geometryInstances:a,appearance:r,asynchronous:!1,shadows:t.shadows});if(i.push(s),t._radarPts2&&t._radarPts2.length>2){let r=this._createRadarFillGeometry(t,t._radarPts2),o=new WebGLPlot.GeometryInstance({id:t.id,geometry:r,modelMatrix:e,attributes:n});var l=new WebGLPlot.MaterialAppearance({material:WebGLPlot.Material.fromType(WebGLPlot.Material.ColorType,{color:t.scanedColor}),translucent:!0,closed:!0});let a=new WebGLPlot.Primitive({geometryInstances:o,appearance:l,asynchronous:!1,shadows:t.shadows});i.push(a)}return i}_createOutlinePrimitive(e,t){t||(t=this);var i={show:new WebGLPlot.ShowGeometryInstanceAttribute(t.isOutline),distanceDisplayCondition:new WebGLPlot.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(t.outlineColor),offset:void 0};let n=this._createRadarOutLineGeometry(t,t._radarPts),r=new WebGLPlot.GeometryInstance({id:t.id,geometry:n,modelMatrix:e,attributes:i}),o=new WebGLPlot.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:t.outlineWidth}});return new WebGLPlot.Primitive({geometryInstances:r,appearance:o,asynchronous:!1,shadows:t.shadows})}_merge(e){if(!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("PlotScanRadar merge source is required.");this.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1,1,1)),e.cellAngle?this.cellAngle=WebGLPlot.CesiumMath.toRadians(e.cellAngle):this.cellAngle=WebGLPlot.CesiumMath.toRadians(5);let t=30,i=60,n=WebGLPlot.CesiumMath.toDegrees(this.cellAngle);WebGLPlot.defined(e.scanVAngle)?t=e.scanVAngle%n!=0?e.scanVAngle+(n-e.scanVAngle%n):e.scanVAngle:t%n!=0?t+=n-t%n:t=t,WebGLPlot.defined(e.scanHAngle)?i=e.scanHAngle%n!=0?e.scanHAngle+(n-e.scanHAngle%n):e.scanHAngle:i%n!=0?i+=n-i%n:i=i,this.scanVAngle=WebGLPlot.CesiumMath.toRadians(t),this.scanHAngle=WebGLPlot.CesiumMath.toRadians(i),this._stackPartitions=t/n+1,this._slicePartitions=i/n+1,this.scanHAngle>=WebGLPlot.CesiumMath.TWO_PI&&(this.isClose=!0),this._isShowScan=WebGLPlot.defaultValue(e.isShowScan,!1),this._scanConeColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(0,1,0,.8)),this._scanedColor=WebGLPlot.defaultValue(e.scanedColor,new WebGLPlot.Color(0,1,0,.3)),e.dScanSpeed?this.dScanSpeed=WebGLPlot.CesiumMath.toRadians(e.dScanSpeed):this.dScanSpeed=WebGLPlot.CesiumMath.toRadians(20),this._computeRadarPts(),this._computeRadarPts2()}_computeRadarPts(){const e=this.radii.x*this.scale;this._customPts=[],this._customPts.push(new WebGLPlot.Cartesian2(0,0));for(let t=0;t<=this.scanVAngle;t+=this.cellAngle){const i=Math.cos(t)*e,n=Math.sin(t)*e;this._customPts.push(new WebGLPlot.Cartesian2(i,n))}this._customPts.push(new WebGLPlot.Cartesian2(0,0));let t=[];for(let e=0;e<this._customPts.length;e++){const r=this._customPts[e];for(var i=[],n=0;n<=this.scanHAngle;n+=this.cellAngle)i.push(new WebGLPlot.Cartesian3(r.x*Math.cos(n),r.x*Math.sin(n),r.y));t.push(i)}this._radarPts=t}_computeRadarPts2(){const e=this.radii.x*this.scale;this._customPts1=[],this._customPts1.push(new WebGLPlot.Cartesian2(0,0));for(let t=this.scaningRow*this.cellAngle;t<=this.scanVAngle;t+=this.cellAngle){const i=Math.cos(t)*e,n=Math.sin(t)*e;this._customPts1.push(new WebGLPlot.Cartesian2(i,n))}if(this._customPts1.push(new WebGLPlot.Cartesian2(0,0)),this._customPts2=[],this.scaningRow>0){this._customPts2.push(new WebGLPlot.Cartesian2(0,0));for(let t=0;t<=this.scaningRow*this.cellAngle;t+=this.cellAngle){const i=Math.cos(t)*e,n=Math.sin(t)*e;this._customPts2.push(new WebGLPlot.Cartesian2(i,n))}this._customPts2.push(new WebGLPlot.Cartesian2(0,0))}let t=[];for(let e=0;e<this._customPts1.length;e++){const r=this._customPts1[e];for(var i=[],n=0;n<=this.scanHAngle;n+=this.cellAngle)i.push(new WebGLPlot.Cartesian3(r.x*Math.cos(n),r.x*Math.sin(n),r.y));t.push(i)}this._radarPts1=t;let r=[];for(let e=0;e<this._customPts2.length;e++){const t=this._customPts2[e];for(i=[],n=0;n<=this.scanHAngle;n+=this.cellAngle)i.push(new WebGLPlot.Cartesian3(t.x*Math.cos(n),t.x*Math.sin(n),t.y));r.push(i)}this._radarPts2=r}clone(e){return WebGLPlot.defined(e)?(e.id=this.id,e.point=this.point.clone(),e._rotate=this._rotate.clone(),e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new _0x49f493(this,this._scene)}destroy(){if(this._removeScanConePrimitive(),this._fillPrimitives.length>0){for(var e in this._fillPrimitives)this._primitives.removeAndDestroy(this._fillPrimitives[e]);this._fillPrimitives=[]}this._outlinePrimitive&&this._primitives.removeAndDestroy(this._outlinePrimitive),this.scanCone=void 0}}Object.defineProperties(_0x49f493.prototype,{point:{get:function(){return this._point},set:function(e){(e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._point)&&(this._point=e.clone(),this.scanCone.point=e.clone(),this._isNeedUpdate=!0)}},radii:{get:function(){return this._radii},set:function(e){(e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._radii)&&(this._radii=e.clone(),this._computeRadarPts(),this._computeRadarPts2(),this.scanCone._computeScanPts(this._radarPts),this._isNeedUpdate=!0)}},scale:{get:function(){return this._scale},set:function(e){"number"==typeof e&&this._scale!==e&&(this._scale=e,this._computeRadarPts(),this._computeRadarPts2(),this.scanCone._computeScanPts(this._radarPts),this._isNeedUpdate=!0)}},rotate:{get:function(){return new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toDegrees(0),WebGLPlot.CesiumMath.toDegrees(0),WebGLPlot.CesiumMath.toDegrees(this._rotate.z))},set:function(e){if(e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81){let t=new WebGLPlot.Cartesian3(WebGLPlot.CesiumMath.toRadians(0),WebGLPlot.CesiumMath.toRadians(0),WebGLPlot.CesiumMath.toRadians(e.z));WebGLPlot.Cartesian3.equals(t,this._rotate)||(this._rotate=t,this._createScanCone(),this._isNeedUpdate=!0)}}},scanedColor:{get:function(){return this._scanedColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._scanedColor)&&(this._scanedColor=e,this._createRadarPrimitive())}},fillColor:{get:function(){return this._fillColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._fillColor)&&(this._fillColor=e,this._createRadarPrimitive())}},scanConeColor:{get:function(){return this._scanConeColor},set:function(e){e instanceof WebGLPlot.Color&&!WebGLPlot.Color.equals(e,this._scanConeColor)&&(this._scanConeColor=e,this._createScanCone())}}});const _0x112a89=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2490bd=_0x112a89(void 0,(function(){return _0x2490bd.toString().search("(((.+)+)+)+$").toString().constructor(_0x2490bd).search("(((.+)+)+)+$")}));_0x2490bd();class _0x46b837 extends _0xbdfb44{constructor(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("PlotWarningRadar scene is required.");e.rotateAngle=360,e.radii=WebGLPlot.defaultValue(e.radii,new WebGLPlot.Cartesian3(1e4,1e4,1e4)),e.cellAngle=WebGLPlot.defaultValue(e.cellAngle,5),e.customPts=_0x47389e(e.radii.x),e.slicePartitions=e.rotateAngle/e.cellAngle,super(e,t),this.PlotRadarType=_0x2c0193.PlotWarningRadar}clone(e){if(!WebGLPlot.defined(e)){var t=new _0x46b837(this,this._scene);return t.id=WebGLPlot.createGuid(),t}return e._id=this.id,e._point=this.point.clone(),e._rotate=this.rotate.clone(),e._show=this.show,e._radii=this.radii,e._innerRadii=this.innerRadii,e._minimumClock=this.minimumClock,e._maximumClock=this.maximumClock,e._minimumCone=this.minimumCone,e._maximumCone=this.maximumCone,e._heightReference=this.heightReference,e._fill=this.fill,e._material=this.material,e._outline=this.outline,e._outlineColor=this.outlineColor,e._outlineWidth=this.outlineWidth,e._stackPartitions=this.stackPartitions,e._slicePartitions=this.slicePartitions,e._shadows=this.shadows,e._distanceDisplayCondition=this.distanceDisplayCondition,e}}function _0x47389e(e){return[new WebGLPlot.Cartesian3(0,e/5,0),new WebGLPlot.Cartesian3(e,e/5*2,0),new WebGLPlot.Cartesian3(e,0,0),new WebGLPlot.Cartesian3(0,e/5,0)]}Object.defineProperties(_0x46b837.prototype,{radii:{get:function(){return this._radii},set:function(e){if((e instanceof WebGLPlot.Cartesian3||e instanceof _0x23de81)&&!_0x23de81.equals(e,this._radii)){this._radii=e.clone(),this.customPts=_0x47389e(this._radii.x*this.scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}},scale:{get:function(){return this._scale},set:function(e){if("number"==typeof e&&this._scale!==e){this._scale=e,this.customPts=_0x47389e(this._radii.x*this.scale);for(let e=0;e<this._scanArray.length;e++)this._scanArray[e]._computeScanPts(this);this._isNeedUpdate=!0}}}});var _0x275007=(_0x51c252=!0,function(e,t){var i=_0x51c252?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51c252=!1,i}),_0x12bf19=_0x275007(void 0,(function(){return _0x12bf19.toString().search("(((.+)+)+)+$").toString().constructor(_0x12bf19).search("(((.+)+)+)+$")})),_0x51c252;_0x12bf19();var _0x241bfe={LocationPt:0,ScalePt:1,AlgoMovePt:2,UnkownPt:4},_0x9797a1=Object.freeze(_0x241bfe),_0x36c68b=(_0x37a8ce=!0,function(e,t){var i=_0x37a8ce?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37a8ce=!1,i}),_0x332745=_0x36c68b(void 0,(function(){return _0x332745.toString().search("(((.+)+)+)+$").toString().constructor(_0x332745).search("(((.+)+)+)+$")})),_0x37a8ce;function _0x841f89(e,t){this._scene=e,this._graphicObject=null,this._ctrlPoints=new WebGLPlot.BillboardCollection,this._scene.primitives.add(this._ctrlPoints),this.positionPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointWhite_Go.png"),this.scalePointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointYellow_Go.png"),this.anchorPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointRed_Go.png"),this.handle=t,this.isShiftPress=!1,this.shiftKeyDownFun=void 0,this.shiftKeyUpFun=void 0,this.editHeightMode=!1,this.ctrlPointCallBack=null}function _0x156f5e(e,t,i){e[t]=i}function _0x23af04(e,t,i){for(var n=0;n<e._ctrlPoints.length;++n){var r=e._ctrlPoints.get(n);r.index===t.index&&r.type===t.type||(r.show=i)}}function _0x12775c(e,t,i,n){if(e._graphicObject){var r=1,o=e._scene,a=WebGLPlot.SceneTransforms.transformWindowToDrawingBuffer(o,n);a.y=o.drawingBufferHeight-a.y;var s=WebGLPlot.Cartesian3.fromDegrees(e.startPoint.x,e.startPoint.y,0),l=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(o,s),u=_0x841f89.getAltitudeByLogical(s,a,o);if(WebGLPlot.defined(u)){l.y<n.y&&(r=-1);var c=WebGLPlot.Cartesian3.distance(s,u)*r,h=new _0x23de81(e.startPoint.x,e.startPoint.y,c);if(WebGLPlot.defined(i.index)){var d=i.index;t.localPoints[d]=h}else WebGLPlot.defined(i.annotationIndex)&&(t._localPoint=h);_0x2909c1.isSymbolDot(t.symbolType)?e._graphicObject.billboard.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z):e._graphicObject._initialize=!1,i.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z),e._graphicObject._wholeHeight=0}}}function _0x2329f1(e,t,i,n){if(WebGLPlot.defined(n)&&t._graphicObject){var r,o=i.type;t.getCtrlPt(i.type,i.index);var a=t._graphicObject;if(0===e)o===_0x9797a1.LocationPt&&t.isShiftPress&&(t.editHeightMode=!0),o===_0x9797a1.ScalePt&&(i.startScalePtn=n);else if(1===e){if(o===_0x9797a1.LocationPt&&(t.editHeightMode?_0x12775c(t,t._graphicObject,i,n):(t._graphicObject.localPoints[i.index]=n,_0x2909c1.isSymbolDot(t._graphicObject.symbolType)?(t._graphicObject.__setEffectParameter({point:n}),t._graphicObject.billboard.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)):t._graphicObject.localPoints[0]=new WebGLPlot.Cartesian3(n.x,n.y,n.z),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z))),o===_0x9797a1.ScalePt){if(null===t._graphicObject)return;r=t.modifyDotSymbolSize(n,i.startScalePtn),a._sizeInMeters?(a.showMode===_0x2bcc5b.Grid&&(a.billboard.scale=a.symbolSizeInMeters.x/a.gridSymbolSize.x*r,i.eyeOffset=new WebGLPlot.Cartesian3(i.eyeOffsetX*r,i.eyeOffsetY*r,0)),a.showMode===_0x2bcc5b.Picture&&(a.billboard.scale=a.symbolPictureSizeInMeters.x/a._pictureSymbolSize.x*r,i.eyeOffset=new WebGLPlot.Cartesian3(i.eyeOffsetX*r,i.eyeOffsetY*r,0))):(i.pixelOffset=new WebGLPlot.Cartesian3(i.pixelOffsetX*r,i.pixelOffsetY*r,0),a.billboard.scale=r)}}else 2===e&&o===_0x9797a1.ScalePt&&(r=t.modifyDotSymbolSize(n,i.startScalePtn),a._sizeInMeters?(a.showMode===_0x2bcc5b.Grid&&(a.symbolSizeInMeters=new WebGLPlot.Cartesian2(a.symbolSizeInMeters.x*r,a.symbolSizeInMeters.y*r)),a.showMode===_0x2bcc5b.Picture&&(a.symbolPictureSizeInMeters=new WebGLPlot.Cartesian2(a.symbolPictureSizeInMeters.x*r,a.symbolPictureSizeInMeters.y*r))):(i.pixelOffsetX*=r,i.pixelOffsetY*=r,a.showMode===_0x2bcc5b.Picture?(a.pictureSymbolSize.x*=r,a.pictureSymbolSize.y*=r):a.showMode===_0x2bcc5b.Grid&&(a.gridSymbolSize.x*=r,a.gridSymbolSize.y*=r)),a._initialize=!1,t.createCtrlPoints(a))}}function _0x202fe6(e,t,i,n){if(WebGLPlot.defined(n)&&WebGLPlot.defined(t._graphicObject)){var r=i.type,o=i.index;if(r===_0x9797a1.LocationPt){if(t.editHeightMode)_0x12775c(t,t._graphicObject,i,n);else{if(!(n instanceof _0x23de81))return;var a=SuperMapAlgoPlot.PlottingUtil.clonePoints(t._graphicObject.localPoints);if(a[o]=n,(a=_0x2909c1.clearNextSamePts(a)).length!==t._graphicObject.localPoints.length)return;t._graphicObject.localPoints[o]=n,t.isogon&&0!==o&&(o=1),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)}t._graphicObject._isScalePtModify=!1}else if(r===_0x9797a1.ScalePt){if(!(n instanceof _0x23de81))return;if(1===e){t._graphicObject._isScalePtModify=!0,t._graphicObject._modifyScalePtParams={index:o,position:n};var s=_0x5f2d78(t._graphicObject._scalePoints);i.position=s[o]}else if(2===e){var l=t._graphicObject._scalePoints[o],u=WebGLPlot.Cartesian3.fromDegrees(l.x,l.y,l.z);i.position=u,t._graphicObject._isScalePtModify=!1}}else if(r===_0x9797a1.AlgoMovePt){if(!(n instanceof _0x23de81))return;t.getCtrlPt(r,o).position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z);for(var c=n.x-t.redPntPos.x,h=n.y-t.redPntPos.y,d=0;d<t._graphicObject.localPoints.length;++d){var f=t._graphicObject.localPoints[d];t._graphicObject.localPoints[d]=new WebGLPlot.Cartesian3(f.x+c,f.y+h,f.z)}t._graphicObject._isScalePtModify=!1,t.redPntPos.x=n.x,t.redPntPos.y=n.y}t._graphicObject._initialize=!1}}function _0x567f36(e,t,i){if(i instanceof _0x23de81&&e._graphicObject&&e._graphicObject.annotationArray){var n=0,r=0;e._graphicObject.code;var o=e._graphicObject.symbolType;if(_0x2909c1.isSymbolDot(o)||t.type!==_0x9797a1.AlgoMovePt){if(!_0x2909c1.isSymbolDot(o)&&o!==_0x1c668c.SYMBOL_TEXT||t.type!==_0x9797a1.LocationPt)return;n=i.x-e._graphicObject.localPoints[t.index].x,r=i.y-e._graphicObject.localPoints[t.index].y}else n=i.x-e.redPntPos.x,r=i.y-e.redPntPos.y;for(var a=0;a<e._graphicObject.annotationArray.length;a++){var s=e._graphicObject.annotationArray[a];s._localPoint.x+=n,s._localPoint.y+=r,s._localPoint.z=i.z}}}function _0x144858(e,t,i,n){if(WebGLPlot.defined(n)&&t._graphicObject){if(WebGLPlot.defined(i.index)){_0x567f36(t,i,n);var r=t._graphicObject.symbolType;t._graphicObject.code,_0x2909c1.isSymbolDot(r)||r===_0x1c668c.SYMBOL_TEXT?_0x2329f1(e,t,i,n):_0x202fe6(e,t,i,n)}else if(t._graphicObject.annotationArray.length>0){var o=t._graphicObject.annotationArray[i.annotationIndex];t.editHeightMode?_0x12775c(t,o,i,n):n instanceof _0x23de81&&(o._localPoint=n,i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z))}0===e&&t.isShiftPress?t.editHeightMode=!0:2===e&&(t._graphicObject._initialize=!1)}}function _0x5f2d78(e){var t=[];if(!WebGLPlot.defined(e)||0===e.length)return t;for(var i=0;i<e.length;++i){var n=e[i];t.push(n.x),t.push(n.y),t.push(0)}return WebGLPlot.Cartesian3.fromDegreesArrayHeights(t)}function _0x5ddfa0(e,t,i,n){if(t.editHeightMode){var r=1,o=t._scene,a=WebGLPlot.SceneTransforms.transformWindowToDrawingBuffer(o,n);a.y=o.drawingBufferHeight-a.y;var s=WebGLPlot.Cartesian3.fromDegrees(t.startPoint.x,t.startPoint.y,0),l=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(o,s),u=_0x841f89.getAltitudeByLogical(s,a,o);if(!WebGLPlot.defined(u))return;l.y<n.y&&(r=-1);var c=WebGLPlot.Cartesian3.distance(s,u)*r,h=new _0x23de81(t.startPoint.x,t.startPoint.y,c);t._graphicObject instanceof _0x8c2e6e&&t._graphicObject.setOffset(h,!0),i.position=WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,h.z)}else{if(!(n instanceof _0x23de81))return;var d=WebGLPlot.Cartographic.fromCartesian(i.position),f=new _0x23de81(WebGLPlot.CesiumMath.toDegrees(d.longitude),WebGLPlot.CesiumMath.toDegrees(d.latitude),d.height),p=new _0x23de81(n.x-f.x,n.y-f.y,n.z-f.z);t._graphicObject instanceof _0x8c2e6e&&t._graphicObject.setOffset(p),i.position=WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)}}_0x332745(),_0x841f89.prototype.createCtrlPoint=function(e,t){if(WebGLPlot.defined(e)){var i=this;this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t){i.isShiftPress&&(i.editHeightMode=!0),_0x144858(0,i,e,t),_0x23af04(i,e,!1)},onDrag:function(e,t){_0x144858(1,i,e,t)},onDragEnd:function(t,n){_0x144858(2,i,t,n),i.createCtrlPoints(i._graphicObject),i.handle._featureModifiedEvent.raiseEvent(e),_0x5ac1e1.getInstance().symbolModified.raiseEvent(e),t.type===_0x9797a1.LocationPt&&i.handle._featureDragEvent.raiseEvent(i._graphicObject)}}},e.code;var n=e.symbolType,r=null,o=new WebGLPlot.Cartesian3(0,0,0),a=[];if(t===_0x9797a1.LocationPt)r=this.positionPointIconUrl,0===e.libID&&_0x1c668c.SYMBOL_REGULARPOLYGON===e.code?(a.push(e.localPoints[0]),a.push(e.localPoints[e.localPoints.length-1]),this.isogon=!0):0===e.libID&&_0x1c668c.SYMBOL_TEXT===e.code?a.push(e.localPoints[0]):a=e.localPoints;else if(t===_0x9797a1.ScalePt)r=this.scalePointIconUrl,_0x2909c1.isSymbolDot(n)?(o=i.getSaclePtOffset(e),a=e.localPoints):n!==_0x1c668c.SYMBOL_DOT&&n!==_0x1c668c.SYMBOL_TEXT&&(a=e._scalePoints);else if(t===_0x9797a1.AlgoMovePt){r=this.anchorPointIconUrl,a.push(i.computeRedPoint(e));var s=i.computeRedPoint(e);i.redPntPos=s}var l=Number.MIN_VALUE;this._scene.globe.depthTestAgainstTerrain&&(l=Number.MAX_VALUE);for(var u=0;u<a.length;++u){(void 0===a[u].z||isNaN(a[u].z))&&(a[u].z=0);var c={show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(a[u].x,a[u].y,a[u].z),scale:2,image:r,id:e.id,disableDepthTestDistance:l};if(e._sizeInMeters?c.eyeOffset=o:c.pixelOffset=o,(c=this._ctrlPoints.add(c)).index=u,c.type=t,c.SymbolType=_0x1c668c.SYMBOL_UNKNOW,e._sizeInMeters)c.eyeOffsetX=o.x,c.eyeOffsetY=o.y;else{if(void 0===o)return;c.pixelOffsetX=o.x,c.pixelOffsetY=o.y}this.addCallback(c,i.ctrlPointCallBack)}}},_0x841f89.prototype.createCtrlPoints=function(e){if(this.removeAll(),e&&this.handle._plottingLayer._isEditable){this._graphicObject=e;var t=e.symbolType;t===_0x1c668c.SYMBOL_DOT&&e.showMode===_0x2bcc5b.Marker||(this.createCtrlPoint(e,_0x9797a1.LocationPt),this.createCtrlPoint(e,_0x9797a1.ScalePt),!_0x2909c1.isSymbolDot(e.symbolType)&&t!==_0x1c668c.SYMBOL_TEXT&&this.createCtrlPoint(e,_0x9797a1.AlgoMovePt),this.createAnnotationArrayCtrlPoints(e))}},_0x841f89.prototype.createAnnotationArrayCtrlPoints=function(e){if(e&&e.annotationArray.length>0)for(var t=0;t<e.annotationArray.length;t++){var i=e.annotationArray[t];this.createAnnotationCtrlPoint(i,t)}},_0x841f89.prototype.createAnnotationCtrlPoint=function(e,t){if(this._graphicObject){var i=e._localPoint,n=this._ctrlPoints.add({show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(i.x,i.y,i.z),scale:2,image:this.scalePointIconUrl,id:this._graphicObject.id,horizontalOrigin:WebGLPlot.HorizontalOrigin.LEFT});n.annotationIndex=t,n.type=_0x9797a1.LocationPt,n.SymbolType=_0x1c668c.SYMBOL_UNKNOW,this.addCallback(n,this.ctrlPointCallBack)}},_0x841f89.prototype.addCallback=function(e,t){var i=this;t.dragHandlers&&(_0x156f5e(e,"LEFT_DOWN",(function(n,r){function o(n,r){_0x2909c1.screenSpaceCameraController(i._scene,!1),void 0!==e.index&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(n,r),void 0!==e.annotationIndex&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(n,r)}function a(n,o){r.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x2909c1.screenSpaceCameraController(i._scene,!0),void 0!==e.index&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(n,o),void 0!==e.annotationIndex&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(n,o)}r.setInputAction((function(t){if(i._graphicObject)if(i.editHeightMode||e.type===_0x9797a1.ScalePt&&_0x2909c1.isSymbolDot(i._graphicObject.symbolType))o(e,t.endPosition);else{var n=_0x2909c1.getPosition(i._scene,t.endPosition);o(e,n)}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.setInputAction((function(t){i.editHeightMode||e.type===_0x9797a1.ScalePt&&_0x2909c1.isSymbolDot(i._graphicObject.symbolType)?a(e,t.position):a(e,_0x2909c1.getPosition(i._scene,t.position))}),WebGLPlot.ScreenSpaceEventType.LEFT_UP),void 0!==e.index&&t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(e,n),void 0!==e.annotationIndex&&t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(e,n)})),_0x156f5e(e,"mouseMove",(function(t){i.editHeightMode||(i.isShiftPress&&0===e.type?i._scene._canvas.style.cursor="n-resize":i._scene._canvas.style.cursor="default")})),_0x156f5e(e,"mouseOut",(function(e){i.editHeightMode||(i._scene._canvas.style.cursor="")})))},_0x841f89.prototype.getSaclePtOffset=function(e){var t,i,n=e.billboardBoundsLineWidth,r=new WebGLPlot.Cartesian3(0,0,0);if(e.showMode===_0x2bcc5b.Picture){let o=e._dotGrid._canvas.getContext("2d").measureText(e._textContent).width;t=(o>e.pictureSymbolSize.x?o:e.pictureSymbolSize.x)+n,i=e.pictureSymbolSize.y+n,e.sizeInMeters&&(i*=-1,t*=e.billboard.scale,i*=e.billboard.scale),r=new WebGLPlot.Cartesian3(t/2*e.scale,-i*e.scale,0)}else if(e.showMode===_0x2bcc5b.Grid){if(null===e._dotGrid)return;t=e._dotGrid.selectedRectBounds.x+e._dotGrid.selectedRectBounds.width-e._dotGrid._canvas.width/2,i=e._dotGrid._canvas.height-e._dotGrid.selectedRectBounds.y,i-=e._dotGrid._OffsetText_Down,e.sizeInMeters&&(i*=-1,t*=e.billboard.scale/e.scale,i*=e.billboard.scale/e.scale),r=new WebGLPlot.Cartesian3(t,-i,0)}return r},_0x841f89.prototype.getCtrlPt=function(e,t){for(var i=0;i<this._ctrlPoints.length;i++){var n=this._ctrlPoints.get(i);if(n.type===e&&t===n.index)return this._ctrlPoints.get(i)}return null},_0x841f89.prototype.removeAll=function(){this._ctrlPoints.removeAll(),this._graphicObject=null},_0x841f89.prototype.modifyDotSymbolSize=function(e,t){if(this._graphicObject){if(!WebGLPlot.defined(e))return this._graphicObject.billboard.scale;var i=this._scene,n=this._graphicObject.localPoints[0],r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,WebGLPlot.Cartesian3.fromDegrees(n.x,n.y,n.z)),o=_0x2909c1.distance(r,t);return _0x2909c1.distance(r,e)/o}},_0x841f89.prototype.addListener=function(){var e=this;e.handle._featureRemoveEvent.addEventListener((function(){WebGLPlot.defined(e._ctrlPoints)&&e._ctrlPoints.removeAll()})),e.shiftKeyDownFun=function(t){72===t.keyCode&&(e.isShiftPress=!0)},e.shiftKeyUpFun=function(t){72===t.keyCode&&(e.isShiftPress=!1,e.editHeightMode=!1)},document.addEventListener("keydown",e.shiftKeyDownFun),document.addEventListener("keyup",e.shiftKeyUpFun)},_0x841f89.prototype.removeListener=function(){document.removeEventListener("keydown",this.shiftKeyDownFun),document.removeEventListener("keyup",this.shiftKeyUpFun)},_0x841f89.getAltitudeByLogical=function(e,t,i){var n=WebGLPlot.Cartographic.fromCartesian(e);n.height+=1,n=WebGLPlot.Cartesian3.fromRadians(n.longitude,n.latitude,n.height);var r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,e),o=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(o){var a;o.x===r.x?(-1,a=0):o.y===r.y?(0,a=-1):a=-1/((o.y-r.y)/(o.x-r.x));var s=i._view.viewport,l={left:s.x,right:s.x+s.width,bottom:s.y,top:s.y+s.height},u=_0x2909c1.intersectionOfRectByPointslopeline(t,a,l),c=u[0],h=u[1],d=new WebGLPlot.Cartesian3,f=new WebGLPlot.Cartesian3;WebGLPlot.SceneTransforms.drawingBufferToWgs84Coordinates(i,c,1,d),WebGLPlot.SceneTransforms.drawingBufferToWgs84Coordinates(i,h,1,f);var p=i.camera.position,_=new WebGLPlot.Cartesian3;WebGLPlot.Cartesian3.subtract(e,n,_);var m=new WebGLPlot.Cartesian3;WebGLPlot.Cartesian3.negate(_,m),WebGLPlot.Cartesian3.normalize(_,_),WebGLPlot.Cartesian3.normalize(m,m);var g=new WebGLPlot.Ray(e,_),x=new WebGLPlot.Ray(e,m),y=WebGLPlot.IntersectionTests.rayTriangleParametric(g,d,f,p);if(y)return WebGLPlot.Ray.getPoint(g,y);if(y=WebGLPlot.IntersectionTests.rayTriangleParametric(x,d,f,p))return WebGLPlot.Ray.getPoint(x,y)}},_0x841f89.prototype.computeRedPoint=function(e){if(WebGLPlot.defined(e)||"function"!==e.computeBounds){var t=e.computeBounds(),i=this.pixelDisToRealDis(t,3);return new WebGLPlot.Cartesian3(t.x,t.y-i,t.z)}},_0x841f89.prototype.pixelDisToRealDis=function(e,t){var i=this._scene,n=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),r=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(i,n);if(!WebGLPlot.defined(r))return 0;var o=new WebGLPlot.Cartesian3(r.x+t,r.y,0),a=_0x2909c1.getPosition(i,r),s=_0x2909c1.getPosition(i,o);return _0x2909c1.distance(a,s)},_0x841f89.prototype.createGroupObjectCtrlPoint=function(e,t,i){if(WebGLPlot.defined(e)){this._graphicObject=e;var n=this;this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t){n.isShiftPress&&(n.editHeightMode=!0),n.handle.removeGroupObjectEditObject(),_0x5ddfa0(0,n,e,t)},onDrag:function(e,t){_0x5ddfa0(1,n,e,t)},onDragEnd:function(t,i){_0x5ddfa0(2,n,t,i),n.handle._featureModifiedEvent.raiseEvent(e),_0x5ac1e1.getInstance().symbolModified.raiseEvent(e),n.handle.drawGroupObjectEditObject(n._graphicObject,!0)}}};var r=null;i===_0x9797a1.LocationPt&&(r=this.positionPointIconUrl);var o=Number.MIN_VALUE;this._scene.globe.depthTestAgainstTerrain&&(o=Number.MAX_VALUE),(void 0===t.z||isNaN(t.z))&&(t.z=0);var a={show:!0,position:new WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,t.z),scale:2,image:r,id:e.id,disableDepthTestDistance:o};(a=this._ctrlPoints.add(a)).index=0,a.type=i,a.SymbolType=_0x1c668c.SYMBOL_UNKNOW,this.addCallback(a,n.ctrlPointCallBack)}};var _0x4c5f88=(_0x47f66f=!0,function(e,t){var i=_0x47f66f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47f66f=!1,i}),_0x5c8396=_0x4c5f88(void 0,(function(){return _0x5c8396.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c8396).search("(((.+)+)+)+$")})),_0x47f66f;function _0xd9687d(e,t){this._scene=e,this.handle=t,this.model=null,this.fixedFrameTransform=WebGLPlot.Transforms.localFrameToFixedFrameGenerator("north","west"),this.initCallBack()}function _0x379a7e(e,t,i){e[t]=i}function _0x4a0f88(e){e.destoryBoundsCtrl(),e.model?(e.createModelCtrl(),e.geoEdit._modelScale.x=e.model.scale):e.vector&&e.createVectorCtrl(e)}function _0x30be08(e){e.scaleLeft1.show=!1,e.rotateCircle.show=!1,e.heightCtrl.show=!1,e.boxBounds.show=!1,e.moveFillCtrl.show=!1}function _0x30e610(e,t,i,n){var r=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot.HeadingPitchRoll,a=Math.PI/180;return o.pitch=a*t.x,o.roll=a*t.y,o.heading=a*t.z,WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot.Ellipsoid.WGS84,n,i),i}function _0x3f61be(e,t,i,n){var r=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),o=new WebGLPlot.HeadingPitchRoll,a=Math.PI/180;return o.pitch=0,o.roll=0,o.heading=a*t.z+90*a,WebGLPlot.Transforms.headingPitchRollToFixedFrame(r,o,WebGLPlot.Ellipsoid.WGS84,n,i),i}function _0x53f636(e,t,i){if(WebGLPlot.defined(i)&&_0x1c6256(t)){var n=e._scene;if("heightCtrl"===t._instanceIds[0]){_0x30be08(e);var r=_0x2909c1.pixelHeightToRealHeight(n,e.pixeStartPoint,i);e.geoEdit.localPoints[0].z=e.startPoint.z+r;var o=new _0x23de81(e.geoEdit.localPoints[0].x,e.geoEdit.localPoints[0].y,e.geoEdit.localPoints[0].z);e.geoEdit.localPoints[0]=o,e.model&&_0x30e610(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform),e.vector&&e.geoEdit.initSymbol(!0)}if("moveFillCtrl"===t._instanceIds[0]&&(_0x30be08(e),e.geoEdit.localPoints[0].x=i.x,e.geoEdit.localPoints[0].y=i.y,e.model?_0x30e610(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform):e.vector&&e.geoEdit.initSymbol(!0)),"rotateCircle"===t._instanceIds[0]){var a=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(n,e.rotateCircleCenter),s=i,l=_0x2909c1.radian(a,e.rotateStartPosition),u=_0x2909c1.radian(a,s)-l;e.model&&(e.geoEdit._modelRotate.z=e.startRotate+180*u/Math.PI,_0x30e610(e.geoEdit.localPoints[0],e.geoEdit._modelRotate,e.geoEdit._model.modelMatrix,e.fixedFrameTransform)),e.vector&&(e.geoEdit.vectorRotate.z=e.startRotate+180*u/Math.PI,e.geoEdit.initSymbol(!0))}if("ScaleLeft1_1"===t._instanceIds[0]){var c=e.geoEdit.localPoints[0],h=WebGLPlot.SceneTransforms.wgs84ToWindowCoordinates(n,WebGLPlot.Cartesian3.fromDegrees(c.x,c.y,c.z)),d=_0x2909c1.distance(h,e.startSCalePtn),f=_0x2909c1.distance(h,i)/d;e.model&&(e.geoEdit._model.scale=e.startScale*f),e.vector&&(e.geoEdit._vectorScale=e.startScale*f,e.geoEdit.initSymbol(!0))}}}function _0x1c6256(e){return!!(e&&e._instanceIds&&e._instanceIds.length>0)}_0x5c8396(),_0xd9687d.prototype.initCallBack=function(){this.ctrlPointCallBack={dragHandlers:{onDragStart:function(e,t,i,n){if("rotateCircle"===t._instanceIds[0]){if(!i)return;e.rotateStartPosition=n,e.startRotate=e.geoEdit._modelRotate.z}"ScaleLeft1_1"===t._instanceIds[0]&&(e.startSCalePtn=n,e.model?e.startScale=e.geoEdit._modelScale.x:e.vector&&(e.startScale=e.geoEdit.vectorScale))},onDrag:function(e,t,i){_0x53f636(e,t,i)},onDragEnd:function(e,t,i){_0x1c6256(t)&&"moveFillCtrl"===t._instanceIds[0]&&e.handle._featureDragEvent.raiseEvent(e.geoEdit),_0x4a0f88(e),e.geoEdit._initialize=!1,e.geoEdit.__setEffectParameter({point:e.geoEdit.localPoints[0],rotate:e.geoEdit.modelRotate}),e.handle._featureModifiedEvent.raiseEvent(e.geoEdit),_0x5ac1e1.getInstance().symbolModified.raiseEvent(e.geoEdit)}}}},_0xd9687d.prototype.addCallback=function(e,t){var i=this;t.dragHandlers&&(_0x379a7e(e,"LEFT_DOWN",(function(n,r){function o(e,n){_0x2909c1.screenSpaceCameraController(i._scene,!1),void 0!==e.type&&t.dragHandlers.onDrag&&t.dragHandlers.onDrag(i,e,n)}if(r.setInputAction((function(t){if(_0x1c6256(e))if("heightCtrl"===e._instanceIds[0]||"ScaleLeft1_1"===e._instanceIds[0]||"rotateCircle"===e._instanceIds[0])o(e,t.endPosition);else{var n=_0x2909c1.getPosition(i._scene,t.endPosition);o(e,n)}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.setInputAction((function(n){var o;!_0x1c6256(e)||(o=_0x2909c1.getPosition(i._scene,n.position),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),r.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x2909c1.screenSpaceCameraController(i._scene,!0),void 0!==e.type&&t.dragHandlers.onDragEnd&&t.dragHandlers.onDragEnd(i,e,o))}),WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x1c6256(e)){if("rotateCircle"===e._instanceIds[0]||"ScaleLeft1_1"===e._instanceIds[0]){var a=_0x2909c1.getPosition(i._scene,n);t.dragHandlers.onDragStart&&t.dragHandlers.onDragStart(i,e,a,n)}if("heightCtrl"===e._instanceIds[0]){var s=i.geoEdit.localPoints[0].clone();i.startPoint=s,i.pixeStartPoint=n}}})),_0x379a7e(e,"mouseMove",(function(t){if(i.editHeightMode||!_0x1c6256(e))return;i._scene._canvas.style.cursor="default";var n=null;if(n=e.getGeometryInstanceAttributes("heightCtrl"))return i._scene._canvas.style.cursor="n-resize",void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)));if(n=e.getGeometryInstanceAttributes("rotateCircle"))return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)));n=e.getGeometryInstanceAttributes("ScaleLeft1_1");let r=e.getGeometryInstanceAttributes("ScaleLeft1_2");return n&&r?(r.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)),void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,0,0,1)))):void 0})),_0x379a7e(e,"mouseOut",(function(t){if(i.editHeightMode)return;i._scene._canvas.style.cursor="";var n=e.getGeometryInstanceAttributes("heightCtrl");if(n)return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,0,1,1)));if(n=e.getGeometryInstanceAttributes("rotateCircle"))return void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(1,1,0,1)));n=e.getGeometryInstanceAttributes("ScaleLeft1_1");let r=e.getGeometryInstanceAttributes("ScaleLeft1_2");return n?(r.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,1,0,1)),void(n.color=WebGLPlot.ColorGeometryInstanceAttribute.toValue(new WebGLPlot.Color(0,1,0,1)))):void 0})))},_0xd9687d.prototype.hideModeEditBouds=function(e){!WebGLPlot.defined(this.boxBounds)||null===this.boxBounds||(this.scaleLeft1.show=e,this.rotateCircle.show=e,this.heightCtrl.show=e,this.boxBounds.show=e,this.moveFillCtrl.show=e)},_0xd9687d.prototype.createModeEditBouds=function(e){e&&!WebGLPlot.defined(this.boxBounds)||e&&WebGLPlot.defined(this.boxBounds)?this.createModelCtrl():e||this.destoryBoundsCtrl()},_0xd9687d.prototype.createModelCtrl=function(){if(this.vector=null,this.handle._graphicObject){this.geoEdit=this.handle._graphicObject;var e=this.geoEdit.localPoints[0];this.model=this.geoEdit._model,this.modelMatrix=this.model.modelMatrix;var t=this.model._boundingSphere.center;this.centerMax=t.x>t.y?t.x:t.y,this.centerMax=(this.centerMax>t.z?this.centerMax:t.z)*this.model.scale,this.modelRadius=this.model._initialRadius*this.model.scale;var i=new WebGLPlot.Cartesian3(this.modelRadius+this.centerMax,this.modelRadius+this.centerMax,this.modelRadius+this.centerMax),n=new _0x23de81(e.x,e.y,e.z),r=_0x2909c1.getModelMinAndMaxCorner(this.model),o=this.model.scale;if(0!==this.geoEdit._modelRotate.x||0!==this.geoEdit._modelRotate.y){var a=Math.abs(this.model._maxCorner.x-r.minCorner.x),s=Math.abs(this.model._maxCorner.y-r.minCorner.y),l=Math.abs(this.model._maxCorner.z-r.minCorner.z),u=a>s?a:s,c=a<s?a:s;o*=(u>l?u:l)/(c<l?c:l)}var h=Math.abs(r.minCorner.z)>Math.abs(r.minCorner.x)?r.minCorner.z:r.minCorner.x,d=Math.abs(r.maxCorner.z)>Math.abs(r.maxCorner.x)?r.maxCorner.z:r.maxCorner.x,f=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(h,h,r.minCorner.y),o,new WebGLPlot.Cartesian3),p=WebGLPlot.Cartesian3.multiplyByScalar(WebGLPlot.Cartesian3.fromElements(d,d,r.maxCorner.y),o,new WebGLPlot.Cartesian3),_=new WebGLPlot.AxisAlignedBoundingBox(f,p);this.BoundingBoxCenter=_.center,this.boxBounds=this.createBoxGeometry(n,i,_);var m=this.getLinePts(e,p,f,this.boxModelMatrix);if(this.moveFillCtrl=this.createFillCtrl(m.moveFillCtrl,new WebGLPlot.Color(1,1,0,.3),"moveFillCtrl"),this.scaleLeft1=this.createScaleLeft1(m.left1[0],m.left1[1]),this.rotateCircle=this.createRotateCircle(m.rotateCircle),this.heightCtrl=this.createHeightCtrl(m.heightCtrl),!this.handle._plottingLayer._isEditable)return void(this.boxBounds=this._scene._primitives.add(this.boxBounds));this.scaleLeft1=this._scene._primitives.add(this.scaleLeft1),this.rotateCircle=this._scene._primitives.add(this.rotateCircle),this.heightCtrl=this._scene._primitives.add(this.heightCtrl),this.moveFillCtrl=this._scene._primitives.add(this.moveFillCtrl),this.boxBounds=this._scene._primitives.add(this.boxBounds),this.addCallback(this.scaleLeft1,this.ctrlPointCallBack),this.addCallback(this.rotateCircle,this.ctrlPointCallBack),this.addCallback(this.heightCtrl,this.ctrlPointCallBack),this.addCallback(this.moveFillCtrl,this.ctrlPointCallBack)}},_0xd9687d.prototype.createBoxGeometry=function(e,t,i){if(null===e||null===t)return null;var n,r=[];return this.model?this.boxModelMatrix=_0x3f61be(e,this.geoEdit._modelRotate,this.modelMatrix.clone(),this.fixedFrameTransform):this.vector?this.boxModelMatrix=_0x3f61be(e,this.geoEdit.vectorRotate,this.modelMatrix.clone(),this.fixedFrameTransform):this.boxModelMatrix=_0x3f61be(e,new WebGLPlot.Cartesian3(0,0,0),new WebGLPlot.Matrix4,this.fixedFrameTransform),n=WebGLPlot.defined(i)?WebGLPlot.BoxOutlineGeometry.fromAxisAlignedBoundingBox(i):WebGLPlot.BoxOutlineGeometry.fromDimensions({dimensions:t}),r.push(new WebGLPlot.GeometryInstance({geometry:n,modelMatrix:this.boxModelMatrix,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(WebGLPlot.Color.YELLOW)}})),new WebGLPlot.Primitive({geometryInstances:r,appearance:new WebGLPlot.PerInstanceColorAppearance({flat:!0,translucent:!1,renderState:{lineWidth:Math.min(3,this._scene.maximumAliasedLineWidth)}})})},_0xd9687d.prototype.createScaleLeft1=function(e,t){var i=[],n=new WebGLPlot.Color(0,1,0);return i.push(this.createLineGometryInstance(e,6,n,"ScaleLeft1_1")),i.push(this.createLineGometryInstance(t,6,n,"ScaleLeft1_2")),this.createPrimitive(i)},_0xd9687d.prototype.createRotateCircle=function(e){var t=[],i=new WebGLPlot.Color(1,1,0);return t.push(this.createLineGometryInstance(e,3,i,"rotateCircle")),this.createPrimitive(t)},_0xd9687d.prototype.createHeightCtrl=function(e){var t=[],i=new WebGLPlot.Color(0,0,1);return t.push(this.createLineGometryInstance(e,5,i,"heightCtrl")),this.createPrimitive(t)},_0xd9687d.prototype.createPrimitive=function(e){var t=WebGLPlot.Material.fromType("Color",{color:new WebGLPlot.Color(1,1,0,1),fill:!0}),i=new WebGLPlot.PolylineColorAppearance({translucent:!0,closed:!0,material:t}),n=new WebGLPlot.Primitive({geometryInstances:e,appearance:i,asynchronous:!1,compressVertices:!0,show:!0});return n.type="ModelEdit",n.SymbolType=1,n},_0xd9687d.prototype.createLineGometryInstance=function(e,t,i,n){var r=new WebGLPlot.PolylineGeometry({positions:e,width:t}),o=WebGLPlot.PolylineGeometry.createGeometry(r);return i=WebGLPlot.ColorGeometryInstanceAttribute.fromColor(i),new WebGLPlot.GeometryInstance({geometry:o,id:n,attributes:{color:i}})},_0xd9687d.prototype.getLinePts=function(e,t,i,n){var r=[],o=[],a=[],s=[],l=0,u=0,c=0,h=0;WebGLPlot.defined(t)&&WebGLPlot.defined(i)?(l=Math.abs(t.x-i.x)/2,u=Math.abs(t.y-i.y)/2,c=i.z<=0?t.z:t.z-i.z,h=l>u?u:l):(h=(this.centerMax+this.modelRadius)/2,c=1.5*this.centerMax+this.modelRadius/2),c=Math.abs(c),this.rotateCircleCenter=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,c+e.z);var d=this.computeHeightLines(l,u,h,c,n);a=a.concat(d);var f=this.computeScaleLines(l,u,h,c,n);r.push(f[0]),r.push(f[1]),r.push(f[2]),o.push(f[3]),o.push(f[4]),this.scaleLeft1Pnt=f[1],this.rotateCircle=this.computeRotateCircle(h,c,n);var p=this.computeMoveFill(h,c,n);return s.push(p[0]),s.push(p[1]),s.push(p[2]),s.push(p[3]),{left1:[r,o],rotateCircle:this.rotateCircle,heightCtrl:a,moveFillCtrl:s}},_0xd9687d.prototype.createFillCtrl=function(e,t,i){var n=WebGLPlot.PolygonGeometry.fromPositions({positions:e,perPositionHeight:!0}),r=WebGLPlot.PolygonGeometry.createGeometry(n),o=new WebGLPlot.GeometryInstance({geometry:r,id:i}),a=new WebGLPlot.Material.fromType("Color",{color:t,fill:!0}),s=new WebGLPlot.Primitive({geometryInstances:[o],appearance:new WebGLPlot.EllipsoidSurfaceAppearance({material:a,aboveGround:!0}),show:this._display,asynchronous:!1});return s.type="ModelEdit",s.SymbolType=1,s},_0xd9687d.prototype.getCartesian3ByLength=function(e,t,i,n){var r,o,a,s,l;(!WebGLPlot.defined(t)||!WebGLPlot.defined(i)||!WebGLPlot.defined(n))&&(t=0,i=0,n=0),r=Math.sqrt(e.x*e.x+e.y*e.y),o=Math.sqrt(r*r+e.z*e.z);var u=Math.acos((o*o+r*r-e.z*e.z)/(2*o*r));o+=n,l=Math.sin(u)*o;var c=Math.cos(u)*o;return a=c*e.x/r,s=c*e.y/r,new WebGLPlot.Cartesian3(a,s,l)},_0xd9687d.prototype.computeHeightLines=function(e,t,i,n,r){var o=[],a=new WebGLPlot.Cartesian3,s=new WebGLPlot.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot.Cartesian3.fromDegrees(this.geoEdit.localPoints[0].x,this.geoEdit.localPoints[0].y,this.geoEdit.localPoints[0].z),h=new WebGLPlot.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.model?h.heading=d*this.geoEdit._modelRotate.z:h.heading=d*this.geoEdit.vectorRotate.z;var f=WebGLPlot.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1*l,1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-1*l,1,.7*u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),o},_0xd9687d.prototype.computeScaleLines=function(e,t,i,n,r){var o=[],a=new WebGLPlot.Cartesian3,s=new WebGLPlot.Cartesian3,l=0,u=0;0!==e&&0!==t?(i=e,l=(t+this.BoundingBoxCenter.y)/i,u=n/i):0!==i&&(l=1,u=n/i);var c=WebGLPlot.Cartesian3.fromDegrees(this.geoEdit.localPoints[0].x,this.geoEdit.localPoints[0].y,this.geoEdit.localPoints[0].z),h=new WebGLPlot.HeadingPitchRoll,d=Math.PI/180;h.pitch=0,h.roll=0,this.model?h.heading=d*this.geoEdit._modelRotate.z:h.heading=d*this.geoEdit.vectorRotate.z;var f=WebGLPlot.Transforms.headingPitchRollToFixedFrame(c,h,WebGLPlot.Ellipsoid.WGS84,this.fixedFrameTransform,r.clone());return s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-.8,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.8*l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),s=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(l,-1,.8*u),i,s),a=WebGLPlot.Matrix4.multiplyByPoint(f,s,a),o.push(new WebGLPlot.Cartesian3(a.x,a.y,a.z)),o},_0xd9687d.prototype.computeMoveFill=function(e,t,i){var n=[],r=new WebGLPlot.Cartesian3,o=new WebGLPlot.Cartesian3,a=t/e;return o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.3,.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-.3,.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(-.3,-.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.3,-.3,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z)),n},_0xd9687d.prototype.computeRotateCircle=function(e,t,i){for(var n=[],r=new WebGLPlot.Cartesian3,o=new WebGLPlot.Cartesian3,a=t/e,s=_0x2909c1.calcCirclePts(1,new WebGLPlot.Cartesian3(0,0,0),72),l=0;l<s.length;l++)o=WebGLPlot.Cartesian3.multiplyByScalar(new WebGLPlot.Cartesian3(.8*s[l].x,.8*s[l].y,a),e,o),r=WebGLPlot.Matrix4.multiplyByPoint(i,o,r),n.push(new WebGLPlot.Cartesian3(r.x,r.y,r.z));return n},_0xd9687d.prototype.createVectorEditBouds=function(e){e&&!WebGLPlot.defined(this.boxBounds)?this.createVectorCtrl(this):e&&WebGLPlot.defined(this.boxBounds)?(_0x30be08(this),this.createVectorCtrl(this)):e||this.destoryBoundsCtrl()},_0xd9687d.prototype.destoryBoundsCtrl=function(){this.scaleLeft1&&(this.scaleLeft1.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.scaleLeft1),this.scaleLeft1=void 0),this.rotateCircle&&(this.rotateCircle.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.rotateCircle),this.rotateCircle=void 0),this.heightCtrl&&(this.heightCtrl.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.heightCtrl),this.heightCtrl=void 0),this.moveFillCtrl&&(this.moveFillCtrl.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.moveFillCtrl),this.moveFillCtrl=void 0),this.boxBounds&&(this.boxBounds.mouseMove=void 0,this._scene._primitives.removeAndDestroy(this.boxBounds),this.boxBounds=void 0)},_0xd9687d.prototype.createVectorCtrl=function(e){if(this.handle._graphicObject){this.model=null,this.geoEdit=this.handle._graphicObject;var t=this.geoEdit.localPoints[0];this.vector=this.geoEdit._dotVector,this.modelMatrix=this.vector.modelMatrix,this.centerMax=this.vector.vectorHeight/2,this.modelRadius=this.vector.vectorHeight/2;var i=new WebGLPlot.Cartesian3(e.modelRadius+this.centerMax,e.modelRadius+this.centerMax,e.modelRadius+this.centerMax),n=new _0x23de81(t.x,t.y,this.centerMax+t.z);e.boxBounds=e.createBoxGeometry(n,i);var r=_0x3f61be(t,this.geoEdit.vectorRotate,this.vector.modelMatrix.clone(),this.fixedFrameTransform),o=e.getLinePts(t,void 0,void 0,r);if(e.moveFillCtrl=e.createFillCtrl(o.moveFillCtrl,new WebGLPlot.Color(1,1,0,.3),"moveFillCtrl"),e.scaleLeft1=e.createScaleLeft1(o.left1[0],o.left1[1]),e.rotateCircle=e.createRotateCircle(o.rotateCircle),e.heightCtrl=e.createHeightCtrl(o.heightCtrl),!this.handle._plottingLayer._isEditable)return void(e.boxBounds=e._scene._primitives.add(e.boxBounds));e.scaleLeft1=e._scene._primitives.add(e.scaleLeft1),e.rotateCircle=e._scene._primitives.add(e.rotateCircle),e.heightCtrl=e._scene._primitives.add(e.heightCtrl),e.moveFillCtrl=e._scene._primitives.add(e.moveFillCtrl),e.boxBounds=e._scene._primitives.add(e.boxBounds),e.addCallback(e.scaleLeft1,e.ctrlPointCallBack),e.addCallback(e.rotateCircle,e.ctrlPointCallBack),e.addCallback(e.heightCtrl,e.ctrlPointCallBack),e.addCallback(e.moveFillCtrl,e.ctrlPointCallBack)}};var _0x2a4c83=(_0x5f4e2f=!0,function(e,t){var i=_0x5f4e2f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5f4e2f=!1,i}),_0x4d2d95=_0x2a4c83(void 0,(function(){return _0x4d2d95.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d2d95).search("(((.+)+)+)+$")})),_0x5f4e2f;function _0x4ea0dc(e,t){if(!WebGLPlot.defined(t))throw new WebGLPlot.DeveloperError("plottingLayer is required!");this._scene=e,this._plottingLayer=t,this._active=!1,t._plottingEdit=this,this.CtrlPosition=new _0x841f89(e,this),this.ModelEditControl=new _0xd9687d(e,this),this.pasteGeoJson=null,this.initialize()}function _0x14111a(e,t,i,n){if(i&&i._plottingLayer&&i._plottingLayer._scene&&i._plottingLayer._isSelected&&t){if("LEFT_DOWN"!==e||WebGLPlot.defined(i._graphicObject)){var r=[],o=[];o=void 0===n?i._scene.drillPick(t,void 0,10,10):i._scene.drillPick(t,void 0,n.width,n.height);for(var a=[],s=0;s<o.length;s++)if(o[s]&&o[s].id&&null!==o[s].primitive&&WebGLPlot.defined(o[s].primitive.SymbolType)){var l=i._plottingLayer.getFeatureByUuid(o[s].id);l&&a.push(l),r.push(o[s])}if(void 0!==n)return a;for(var u=!1,c=0;c<r.length;c++)if("heightCtrl"===r[c].id){u=!0;break}for(s=0;s<r.length;s++){var h,d=r[s];if(d&&d.primitive&&d.primitive[e]){if(0===d.primitive.type&&i.CtrlPosition.isShiftPress&&(void 0!==d.primitive.index?i._graphicObject instanceof _0x8c2e6e?(h=i._graphicObject._centerPt3D,WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h):(h=i._graphicObject.localPoints[d.primitive.index],WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h):void 0!==d.primitive.annotationIndex&&(h=i._graphicObject.annotationArray[d.primitive.annotationIndex].localPoint,WebGLPlot.Cartesian3.fromDegrees(h.x,h.y,0),i.CtrlPosition.startPoint=h)),!u){d.primitive[e](t,i._CtrlPointhandler);break}if("heightCtrl"===d.id){d.primitive[e](t,i._CtrlPointhandler);break}}else if(d&&d.primitive&&d.id&&"LEFT_CLICK"===e){var f=i._plottingLayer.getFeatureByUuid(d.id);if(f instanceof _0x8c2e6e)return i.releaseSelection(),i.drawGroupObjectEditObject(f,!0),i._graphicObject=f,i._graphicObject._isSelected=!0,i._graphicObject._isEdit=!0,i._plottingLayer.setSelectedFeatureByID(f._id),void i._featureSelectedEvent.raiseEvent(i._graphicObject);if(WebGLPlot.defined(i._graphicObject)){if(i._graphicObject.id===d.id)return;if(i.unSelection(!0),i._graphicObject=i._plottingLayer.getFeatureByUuid(d.id),!WebGLPlot.defined(i._graphicObject))return;return void i.DoSelectObjectEdit(f)}if(!f)continue;return i._graphicObject=f,void i.DoSelectObjectEdit(f)}}if("LEFT_CLICK"===e&&(!WebGLPlot.defined(r)||0===r.length)&&WebGLPlot.defined(i._graphicObject)){const e=i._graphicObject.id;i.unSelection(!0);var p=i._featureReleaseEvent;let t=i._plottingLayer.getFeatureByUuid(e);p.raiseEvent(t)}}}else i.releaseSelection()}function _0x45026d(e){const t=_0xf6490f(e.keyCode);let i=_self._graphicObject;if(i&&(i.showMode===_0x2bcc5b.Marker||i.code===_0x1c668c.SYMBOL_Model))switch(t){case"Z":i.modelScale*=1.1;break;case"X":i.modelScale*=.9;break;case"W":i.modelRotate.y+=1,i._initialize=!1;break;case"S":i.modelRotate.y-=1,i._initialize=!1;break;case"A":i.modelRotate.z-=1,i._initialize=!1;break;case"D":i.modelRotate.z+=1,i._initialize=!1;break;case"Q":i.modelRotate.x+=1,i._initialize=!1;break;case"E":i.modelRotate.x-=1,i._initialize=!1}}function _0xf6490f(e){switch(e){case"Z".charCodeAt(0):return"Z";case"X".charCodeAt(0):return"X";case"W".charCodeAt(0):case 38:return"W";case"S".charCodeAt(0):case 40:return"S";case"D".charCodeAt(0):case 39:return"D";case"A".charCodeAt(0):case 37:return"A";case"Q".charCodeAt(0):return"Q";case"E".charCodeAt(0):return"E";default:return}}_0x4d2d95(),_0x4ea0dc.prototype.initialize=function(){this._graphicObject=void 0,this._handler=new WebGLPlot.ScreenSpaceEventHandler(this._scene.canvas),this._ctrlPoints=new WebGLPlot.BillboardCollection,this._scene.primitives.add(this._ctrlPoints),this.positionPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointWhite_Go.png"),this.scalePointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointYellow_Go.png"),this.anchorPointIconUrl=WebGLPlot.buildModuleUrl("Widgets/Images/PlotImages/pointRed_Go.png"),this._featureSelectedEvent=new WebGLPlot.Event,this._featureModifiedEvent=new WebGLPlot.Event,this._featureReleaseEvent=new WebGLPlot.Event,this._featureRemoveEvent=new WebGLPlot.Event,this.isShiftPress=!1,this.shiftKeyDownFun=void 0,this.shiftKeyUpFun=void 0,this.editHeightMode=!1,this._CtrlPointhandler=new WebGLPlot.ScreenSpaceEventHandler(this._scene.canvas),this._featureLeftClickEvent=new WebGLPlot.Event,this._featureRightClickEvent=new WebGLPlot.Event,this._sceneLeftClickEvent=new WebGLPlot.Event,this._sceneRightClickEvent=new WebGLPlot.Event,this._featureDragEvent=new WebGLPlot.Event,this._featureDoubleClickEvent=new WebGLPlot.Event,this.CtrlPosition.addListener();let e=this;this._handler.setInputAction((function(t){!e._active||_0x14111a("LEFT_CLICK",t.position,e)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK);var t=null;this._handler.setInputAction((function(i){if(WebGLPlot.defined(e._graphicObject)&&(e._graphicObject.showMode===_0x2bcc5b.Vector||e._graphicObject.showMode===_0x2bcc5b.Marker)&&e._active){var n=e._scene.pick(i.endPosition);t&&(!n||t!==n.primitive)&&(!(t.isDestroyed&&t.isDestroyed())&&t.mouseOut(i.endPosition),t=null),n&&n.primitive&&((n=n.primitive).mouseOut&&(t=n),n.mouseMove&&n.mouseMove(i.endPosition))}}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this._handler.setInputAction((function(t){!e._active||_0x14111a("LEFT_DOWN",t.position,e,void 0)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),this._handler28s=new WebGLPlot.ScreenSpaceEventHandler(e._scene.canvas),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),i?e._featureLeftClickEvent.raiseEvent(i,t.position):e._sceneLeftClickEvent.raiseEvent(t.position)}}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),i?e._featureRightClickEvent.raiseEvent(i,t.position):e._sceneRightClickEvent.raiseEvent(t.position)}}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this._handler28s.setInputAction((function(t){if(e._active){var i=null,n=e._scene.pick(t.position);n&&n.id&&null!==n.primitive&&WebGLPlot.defined(n.primitive.SymbolType)&&(i=e._plottingLayer.getFeatureByUuid(n.id)),e._featureDoubleClickEvent.raiseEvent(i,t.position)}}),WebGLPlot.ScreenSpaceEventType.LEFT_DOUBLE_CLICK)},_0x4ea0dc.prototype.setPlottingLayer=function(e){return!!e&&(this.releaseSelection(),this._plottingLayer=e,e._plottingEdit=this,!0)},Object.defineProperties(_0x4ea0dc.prototype,{plottingLayer:{get:function(){return this._plottingLayer},set:function(e){e!==this._plottingLayer&&(this._plottingLayer=e)}},SelectedEvent:{get:function(){return this._featureSelectedEvent}},FeatureSelectedEvent:{get:function(){return this._featureSelectedEvent}},ModifiedEvent:{get:function(){return this._featureModifiedEvent}},FeatureModifiedEvent:{get:function(){return this._featureModifiedEvent}},UnSelectedEvent:{get:function(){return this._featureReleaseEvent}},RemoveFeatureEvent:{get:function(){return this._featureRemoveEvent}},FeatureRemoveEvent:{get:function(){return this._featureRemoveEvent}},FeatureLeftClickEvent:{get:function(){return this._featureLeftClickEvent}},FeatureRightClickEvent:{get:function(){return this._featureRightClickEvent}},SceneLeftClickEvent:{get:function(){return this._sceneLeftClickEvent}},SceneRightClickEvent:{get:function(){return this._sceneRightClickEvent}},FeatureDoubleClickEvent:{get:function(){return this._featureDoubleClickEvent}},FeatureDragEvent:{get:function(){return this._featureDragEvent}}}),_0x4ea0dc.prototype.unSelection=function(e){WebGLPlot.defined(this._graphicObject)&&e&&_0x5ac1e1.getInstance().symbolUnSelected.raiseEvent(this._graphicObject.id),this.releaseSelection(!1)},_0x4ea0dc.prototype.releaseSelection=function(e){WebGLPlot.defined(this._graphicObject)&&(this.clearAllEditCtrl(),e||(this._plottingLayer._selectedFeature=void 0))},_0x4ea0dc.prototype.clearAllEditCtrl=function(){WebGLPlot.defined(this._graphicObject)&&null!==this._graphicObject&&(this.CtrlPosition.removeAll(),this._graphicObject._initialize=!1,this._graphicObject._isSelected=!1,this._graphicObject instanceof _0x8c2e6e&&this.drawGroupObjectEditObject(this._graphicObject,!1),_0x2bcc5b.Marker===this._graphicObject.showMode&&this.drawModelEditObject(!1),_0x2bcc5b.Vector===this._graphicObject.showMode&&this.drawVectorEditObject(!1),this._graphicObject=null)},_0x4ea0dc.prototype.activate=function(){!this._plottingLayer||!this._plottingLayer._isSelected||this.isActive()||(this._active=!0)},_0x4ea0dc.prototype.pickRect=function(e,t){var i=t.x-e.x,n=t.y-e.y,r=(t.x+e.x)/2,o=(t.y+e.y)/2;return _0x14111a("LEFT_CLICK",new WebGLPlot.Cartesian2(r,o),this,{width:i,height:n})},_0x4ea0dc.prototype.DoSelectObject=function(e,t=!0){this._graphicObject=e,this._graphicObject._isEdit=!0,this._graphicObject._isSelected=!0,this._plottingLayer._selectedFeature=e,this._graphicObject._initialize=!1,t&&(this._featureSelectedEvent.raiseEvent(this._graphicObject),_0x5ac1e1.getInstance().symbolSelected.raiseEvent(this._graphicObject))},_0x4ea0dc.prototype.DoSelectObjectEdit=function(e){!e||!(e instanceof _0x2d9130)||!this._plottingLayer.isSelected||(this.releaseSelection(),this.DoSelectObject(e),this._plottingLayer._isEditable&&this.drawSymbolExtend(e))},_0x4ea0dc.prototype.drawSymbolExtend=function(e){var t=e.symbolType;e.showMode,_0x1c668c.SYMBOL_UNKNOW!==t&&(_0x1c668c.SYMBOL_Model!==t||_0x1c668c.SYMBOL_DOT!==t||_0x1c668c.SYMBOL_PICTURE!==t)&&this.createCtrlPoints(e)},_0x4ea0dc.prototype.addAnnotationArrayPositionPt=function(e,t){this.CtrlPosition.createAnnotationCtrlPoint(e,t)},_0x4ea0dc.prototype.deactivate=function(){this.releaseSelection(),this._active=!1},_0x4ea0dc.prototype.isActive=function(){return this._active},_0x4ea0dc.prototype.createCtrlPoints=function(e){this.CtrlPosition.createCtrlPoints(e),this.ModelEditControl.hideModeEditBouds(!1)},_0x4ea0dc.prototype.drawModelEditObject=function(e){this.CtrlPosition.removeAll(),this._graphicObject&&_0x2bcc5b.Marker===this._graphicObject.showMode&&(this.ModelEditControl.destoryBoundsCtrl(),this.ModelEditControl.createModeEditBouds(e))},_0x4ea0dc.prototype.drawVectorEditObject=function(e){this.CtrlPosition.removeAll(),this.ModelEditControl.destoryBoundsCtrl(),this.ModelEditControl.createVectorEditBouds(e)},_0x4ea0dc.prototype.drawGroupObjectEditObject=function(e,t){if(e instanceof _0x8c2e6e)if(t&&!this.groupObjectEditObject){var i=e.getBounds(),n=.5*(i.max_X+i.min_X),r=.5*(i.max_Y+i.min_Y);i.max_Z,i.min_Z;var o=new WebGLPlot.Cartesian3(i.min_X,i.max_Y,0),a=new WebGLPlot.Cartesian3(i.max_X,i.max_Y,0),s=new WebGLPlot.Cartesian3(i.min_X,i.min_Y,0),l=_0x2909c1.getSpaceDistance(o,a)+i.modelRadius,u=_0x2909c1.getSpaceDistance(o,s)+i.modelRadius,c=i.max_Z-i.min_Z;c=c>i.modelRadius?c:i.modelRadius,e._centerPt3D=new WebGLPlot.Cartesian3(n,r,i.min_Z);var h=new WebGLPlot.Cartesian3(l,u,c);h.z<0&&(h.z=0);var d=this.ModelEditControl.createBoxGeometry(new WebGLPlot.Cartesian3(n,r,i.min_Z+.5*c),h);this.groupObjectEditObject=this._scene.primitives.add(d),this.CtrlPosition._ctrlPoints.removeAll(),this.CtrlPosition.createGroupObjectCtrlPoint(e,e._centerPt3D,0)}else t||(this.CtrlPosition._ctrlPoints.removeAll(),this._scene.primitives.remove(this.groupObjectEditObject),this.groupObjectEditObject=null)},_0x4ea0dc.prototype.removeGroupObjectEditObject=function(){this.groupObjectEditObject&&(this._scene.primitives.remove(this.groupObjectEditObject),this.groupObjectEditObject=null)},_0x4ea0dc.prototype.cut=function(){null!==this._graphicObject&&this._plottingLayer&&this._plottingLayer._isEditable&&(this.pasteGeoJson=_0x2d9130.toGeoJson(this._graphicObject,this.pasteGeoJson),this._plottingLayer.removeGeoGraphicObject(this._graphicObject))},_0x4ea0dc.prototype.copy=function(){null!==this._graphicObject&&(this.pasteGeoJson=_0x2d9130.toGeoJson(this._graphicObject,this.pasteGeoJson))},_0x4ea0dc.prototype.paste=function(e){if(null!==this.pasteGeoJson&&this._plottingLayer&&this._plottingLayer._isEditable){var t=JSON.parse(this.pasteGeoJson);if(t.uuid=WebGLPlot.createGuid(),WebGLPlot.defined(e))if(parseInt(t.symbolType)===_0x1c668c.SYMBOL_DOT||parseInt(t.symbolType)===_0x1c668c.SYMBOL_TEXT)t.localePoints[0].x=e.x,t.localePoints[0].y=e.y,t.localePoints[0].z=e.z;else for(var i=e.x-t._CenterPosition.x,n=e.y-t._CenterPosition.y,r=0;r<t.localePoints.length;++r)t.localePoints[r].x=t.localePoints[r].x+i,t.localePoints[r].y=t.localePoints[r].y+n,t.localePoints[r].z=e.z;this._plottingLayer.geoJsonToGeoGraphicObject(t)}},_0x4ea0dc.prototype.clearCopyOrCut=function(){this.pasteGeoJson=null},_0x4ea0dc.prototype.activateModelShortCutEdit=function(){this.ModelScaleShortCuts_Active||document.addEventListener("keydown",_0x45026d,!1),this.ModelScaleShortCuts_Active=!0},_0x4ea0dc.prototype.deActivateModelShortCutEdit=function(){document.removeEventListener("keydown",_0x45026d),this.ModelScaleShortCuts_Active=!1};var _0x100499=(_0x53ed4b=!0,function(e,t){var i=_0x53ed4b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53ed4b=!1,i}),_0x403b5f=_0x100499(void 0,(function(){return _0x403b5f.toString().search("(((.+)+)+)+$").toString().constructor(_0x403b5f).search("(((.+)+)+)+$")})),_0x53ed4b;function _0xc0ccbe(e,t){if(!WebGLPlot.defined(t)||!WebGLPlot.defined(e))throw new WebGLPlot.DeveloperError("plottingLayer || scene is required!");this._handler=new WebGLPlot.ScreenSpaceEventHandler(e.canvas),this._scene=e,this._isDrawing=!1,this._geoGraphicObject=void 0,this._layer=t,this._active=!1,this._drawFinishEvent=new WebGLPlot.Event,this._drawControlEndEvent=new WebGLPlot.Event,this._libID=-1,this._code=-1,this._Url="",this._serverUrl="";var i=this;this._handler.setInputAction((function(e){_0x4c3fd5(e,i)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this._handler.setInputAction((function(e){_0x5cbd9a(e,i)}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this._handler.setInputAction((function(e){_0x4f50ec(e,i)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),this._handler.setInputAction((function(e){_0x1da04f(e,i)}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}function _0x4c3fd5(e,t){var i=t;if(i._active&&i._layer&&i&&i._active){var n=i._scene,r=_0x2909c1.getPosition(n,e.position);if(r)if(i._isDrawing){if(null===i._geoGraphicObject||void 0===i._geoGraphicObject)return void(i._isDrawing=!1);i._geoGraphicObject.localPoints.length>=i._geoGraphicObject.getMaxEditPts()?_0x318638(t):(r.z+=1,i._geoGraphicObject.localPoints.push(r),i._geoGraphicObject._initialize=!1)}else{i._isDrawing=!0;var o=null;if(0===i._libID){switch(i._code){case _0x1c668c.SYMBOL_Model:case _0x1c668c.SYMBOL_PICTURE:case _0x1c668c.SYMBOL_POINT:o=new _0x4844fd({layer:i._layer,libID:i._libID,code:i._code,localPoints:[]}),i._code===_0x1c668c.SYMBOL_Model?(o._modelPath=i._Url,o._showMode=_0x2bcc5b.Marker):i._code===_0x1c668c.SYMBOL_PICTURE&&(o._picturePath=i._Url,o._showMode=_0x2bcc5b.Picture);break;default:o=new _0x330d7a({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],isDrawing:!0,isEdit:!1})}o._symbolType=i._code}else void 0!==i._serverData&&null!==i._serverData&&i._serverData.symbolType===_0x1c668c.SYMBOL_DOT?o=new _0x4844fd({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],serverData:i._serverData}):i._serverData.symbolType===_0x1c668c.SYMBOL_ALGO&&(o=new _0x330d7a({layer:i._layer,libID:i._libID,code:i._code,localPoints:[],serverData:i._serverData,isDrawing:!0}));if(null===o||o._symbolType===_0x1c668c.SYMBOL_UNKNOW)return void(i._isDrawing=!1);_0x2909c1.isSymbolDot(o._symbolType)?(i._geoGraphicObject=o,i._geoGraphicObject.localPoints.push(r),i._layer.isEditable&&i._layer._geoGraphicObjects.push(o),_0x318638(t)):(i._geoGraphicObject=o,i._geoGraphicObject.localPoints.push(r),i._layer.isEditable&&i._layer._geoGraphicObjects.push(o),0===i._libID&&34===i._code&&_0x318638(t))}}}function _0x5cbd9a(e,t){var i=t;if(i._active&&i&&i._active&&i._isDrawing&&i._geoGraphicObject){var n=i._scene,r=_0x2909c1.getPosition(n,e.endPosition);if(r)i._geoGraphicObject.localPoints.length>=2&&i._geoGraphicObject.localPoints.pop(),i._geoGraphicObject.localPoints.push(r),i._geoGraphicObject._initialize=!1}}function _0x4f50ec(e,t){var i=t;if(i._active){if(i._geoGraphicObject._symbolType!==_0x1c668c.SYMBOL_DOT){var n=i._geoGraphicObject.localPoints.length;i._geoGraphicObject.localPoints.splice(n-2,2)}_0x318638(t)}}function _0x1da04f(e,t){var i=t;i._active?(_0x318638(t),i._drawControlEndEvent.raiseEvent(t._geoGraphicObject),i._serverData=null,t._isDrawing||t.deactivate()):i._scene._canvas.style.cursor=""}function _0x318638(e){var t=e;if(t._isDrawing&&WebGLPlot.defined(t._geoGraphicObject)){var i=t._geoGraphicObject;if(_0x2909c1.clearSamePtsXY(i.localPoints).length<i.getMinEditPts())return t._layer.removeGeoGraphicObject(i),t._isDrawing=!1,void(t._geoGraphicObject=void 0);t._geoGraphicObject.isDrawing=!1,t._geoGraphicObject._initialize=!1,t._isDrawing=!1,t._drawFinishEvent.raiseEvent(e._geoGraphicObject),t._layer.symbolAddedEvent.raiseEvent(e._geoGraphicObject),_0x5ac1e1.getInstance().symbolAdded.raiseEvent(e._geoGraphicObject,t._layer.name)}}function _0x5eb9f6(e){e.setDrawPrototype()}_0x403b5f(),_0xc0ccbe.prototype.activate=function(e,t,i){if(this._layer&&this._layer._scene&&this._layer.isEditable)if(WebGLPlot.defined(e)&&WebGLPlot.defined(t)){if("number"!=typeof e||"number"!=typeof t)return void console.log("PlotDrawControl activate libID or code should be number");(!WebGLPlot.defined(i)||null==i)&&(i=""),this._libID=e,this._code=t,this._Url=i,0===e?this.setDrawPrototype():this.getServerData(this._libID,this._code,_0x5eb9f6(this))}else(null===this._serverData||!WebGLPlot.defined(this._serverData))&&0!==this._libID&&!WebGLPlot.getLibManager(this._scene._plottingID).useServerData&&this.getServerDataFromLocal(symbolLibManager,this._libID,this._code),this.setDrawPrototype()},_0xc0ccbe.prototype.setDrawPrototype=function(){-1===this._libID&&-1===this._code||(this._active=!0,this._scene._canvas.style.cursor="crosshair",_0x2909c1.screenSpaceCameraController(this._scene,!1))},_0xc0ccbe.prototype.setAction=function(e,t,i){if(!this._active&&((!WebGLPlot.defined(i)||null==i)&&(i=""),WebGLPlot.defined(e)&&WebGLPlot.defined(t)&&null!==e&&null!==t&&this._layer&&this._layer._scene)){if("number"!=typeof e||"number"!=typeof t)return void console.log("PlotDrawControl setAction libId or code should be number");this._libID=e,this._code=t,this._Url=i,0!==e&&this.getServerData(this._libID,this._code)}},_0xc0ccbe.prototype.getServerData=function(e,t,i){var n=this,r=WebGLPlot.getLibManager(this._layer._scene._plottingID),o=r.getSymbolData(e,t);if(WebGLPlot.defined(o)&&null!==o)return n._serverData=o,void(i&&i());var a=WebGLPlot.getServerData(e,t,void 0,this._layer._scene._plottingID);!a||(a.getSymbolInfo.events.on({processCompleted:function(t){return n._serverData=t.result,r.setSymbolData(e,t.result),i&&i(),!0},processFailed:function(){},scope:n}),a.getSymbolInfo.processAsync(a.getSymbolInfoParameters))},_0xc0ccbe.prototype.getServerDataFromLocal=function(e,t,i){var n=e.localSymbolLibData;this._serverData=n[t][i]},Object.defineProperties(_0xc0ccbe.prototype,{libID:{get:function(){return this._libID}},code:{get:function(){return this._code}},serverUrl:{get:function(){return this._serverUrl},set:function(e){e!==this._serverUrl&&(this._serverUrl=e)}},drawFinishEvent:{get:function(){return this._drawFinishEvent}},drawControlEndEvent:{get:function(){return this._drawControlEndEvent}},plottingLayer:{get:function(){return this._layer},set:function(e){e!==this._layer&&(this._layer=e)}}}),_0xc0ccbe.prototype.setPlottingLayer=function(e){return!!e&&(this._layer=e,!0)},_0xc0ccbe.prototype.deactivate=function(){this._active=!1,this._isDrawing=!1,this._libID=-1,this._code=-1,delete this._geoGraphicObject,this._scene._canvas.style.cursor="",_0x2909c1.screenSpaceCameraController(this._layer._scene,!0)};const _0x1bc001=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x51c91a=_0x1bc001(void 0,(function(){return _0x51c91a.toString().search("(((.+)+)+)+$").toString().constructor(_0x51c91a).search("(((.+)+)+)+$")}));_0x51c91a();class _0x4cd539{constructor(e,t){this._isGroup=t,this._UUID=WebGLPlot$e.createGuid(),this._name=e,this._parentNode=void 0,this._childNodes=[],this._isModified=!1}_getRootNode(){let e=this;for(;!e.isRootNode();)e=e._parentNode;return e}_removeGeoEntityNode(e){let t=this.findNode(e);if(!t.isGroupNode()){let i=t._parentNode,n=i.indexOf(e);i._childNodes.splice(n,1),this._isModified=!0,this._save()}}_getParentNode(){return this._parentNode}_clear(){this._childNodes.splice(0),this._isModified=!0,this._save()}_isModify(){return!!this._isModified||(this._childNodes.forEach((e=>{if(e._isModify())return!0})),!1)}_setIsModify(e){this._isModified=e,this._childNodes.forEach((t=>{t._setIsModify(e)}))}_save(){_0x2e28f1.getInstance()._saveGeoEntity(!1)}_fromJson(e,t){if(!WebGLPlot$e.defined(t))return;let i=JSON.parse(e);!WebGLPlot$e.defined(i)||(WebGLPlot$e.defined(i.isGroup)&&(this._isGroup=i.isGroup),WebGLPlot$e.defined(i.UUID)&&(this._UUID=i.UUID),WebGLPlot$e.defined(i.name)&&(this._name=i.name),WebGLPlot$e.defined(i.parentUUID)&&(this._parentNode=t.findNode(i.parentUUID)),WebGLPlot$e.defined(i.childNodes)&&(this._childNodes=[],i.childNodes.forEach((e=>{let i=new _0x4cd539("",!1);this._childNodes.push(i),i._fromJson(e,t)}))))}_toJson(){let e={};return e.hasOwnProperty("isGroup")||(e.isGroup=this._isGroup),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),WebGLPlot$e.defined(this._parentNode)&&(e.hasOwnProperty("parentUUID")||(e.parentUUID=this._parentNode.getUUID())),e.hasOwnProperty("childNodes")||(e.childNodes=[],this._childNodes.forEach((t=>{e.childNodes.push(t._toJson())}))),JSON.stringify(e)}isRootNode(){return void 0===this._parentNode}isGroupNode(){return this._isGroup}getUUID(){return this._UUID}getName(){return this._name}setName(e){this._name=e,this._isModified=!0,this._save()}createGroupNode(e){let t;return this._isGroup&&(t=new _0x4cd539(e,!0),t._parentNode=this,this._childNodes.push(t),this._isModified=!0,this._save()),t}createGeoEntityNode(e){let t;return this._isGroup&&(t=new _0x4cd539(e.getName(),!1),t._UUID=e.getUUID(),t._parentNode=this,this._childNodes.push(t),this._isModified=!0,this._save()),t}getChildNodes(){return this._childNodes}findNode(e){let t;if(this._UUID===e)return this;for(let i=0;i<this._childNodes.length;i++){const n=this._childNodes[i];if(n.getUUID()===e){t=n;break}if(n._isGroup&&(t=n.findNode(e),WebGLPlot$e.defined(t)))break}return t}indexOf(e){let t=-1;for(let i=0;i<this._childNodes.length;i++)if(this._childNodes[i].getUUID()===e){t=i;break}return t}moveNodeTo(e,t,i){if(!this.isGroupNode()||!t.isGroupNode()||e>=this._childNodes.length)return!1;let n=this._childNodes.splice(e,1);if(0===n.length)return!1;let r=n[0];return r._parentNode=t,-1===i||i>=t.getChildNodes().length?t._childNodes.push(r):t._childNodes.splice(i,0,r),this._isModified=!0,this._save(),!0}moveTo(e,t){if(!e.isGroupNode())return!1;let i=this._getParentNode();if(WebGLPlot$e.defined(i)){let n=i.indexOf(this.UUID);if(i.moveNodeTo(n,e,t))return this._isModified=!0,this._save(),!0}return!1}}const _0xfa5b25=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x388518=_0xfa5b25(void 0,(function(){return _0x388518.toString().search("(((.+)+)+)+$").toString().constructor(_0x388518).search("(((.+)+)+)+$")}));_0x388518();class _0xf52e1d{constructor(){this._mapModelPathToModelSize=void 0}static cartesian3ToDegrees(e){let t=WebGLPlot$e.Cartographic.fromCartesian(e);return new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(t.longitude),WebGLPlot$e.CesiumMath.toDegrees(t.latitude),t.height)}static degreesToCartesian3(e){return WebGLPlot$e.Cartesian3.fromDegrees(e.x,e.y,e.z)}static getPositionFromModelMatrix(e){let t=WebGLPlot$e.Matrix4.getTranslation(e,new WebGLPlot$e.Cartesian3);return this.cartesian3ToDegrees(t)}static getScaleFromModelMatrix(e){let t=WebGLPlot$e.Matrix4.getScale(e,new WebGLPlot$e.Cartesian3);return this.cartesian3ToDegrees(t)}static getRotationFromModelMatrix(e){let t=WebGLPlot$e.Matrix4.getRotation(e,new WebGLPlot$e.Matrix4),i=WebGLPlot$e.Matrix4.getMatrix3(t,new WebGLPlot$e.Matrix3),n=WebGLPlot$e.Quaternion.fromRotationMatrix(i),r=WebGLPlot$e.HeadingPitchRoll.fromQuaternion(n);return new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(r.pitch),WebGLPlot$e.CesiumMath.toDegrees(r.roll),WebGLPlot$e.CesiumMath.toDegrees(r.heading))}static getHeading(e,t){let i=WebGLPlot$e.Transforms.eastNorthUpToFixedFrame(e),n=Cesium.Cartesian3.subtract(t,e,new Cesium.Cartesian3),r=WebGLPlot$e.Matrix4.multiplyByPointAsVector(WebGLPlot$e.Matrix4.inverse(i,new WebGLPlot$e.Matrix4),n,new WebGLPlot$e.Cartesian3),o=WebGLPlot$e.Cartesian3.normalize(r,new WebGLPlot$e.Cartesian3),a=Math.atan2(o.y,o.x)-WebGLPlot$e.CesiumMath.PI_OVER_TWO;return WebGLPlot$e.CesiumMath.TWO_PI-WebGLPlot$e.CesiumMath.zeroToTwoPi(a)}static getPitch(e,t){let i=WebGLPlot$e.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$e.Cartesian3.subtract(t,e,new WebGLPlot$e.Cartesian3),r=WebGLPlot$e.Matrix4.multiplyByPointAsVector(WebGLPlot$e.Matrix4.inverse(i,i),n,n);return WebGLPlot$e.Cartesian3.normalize(r,r),WebGLPlot$e.CesiumMath.PI_OVER_TWO-WebGLPlot$e.CesiumMath.acosClamped(r.z)}static getModelSize(e){WebGLPlot$e.defined(this._mapModelPathToModelSize)||(this._mapModelPathToModelSize=new Map);let t=(e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT)).modelPath,i=e.scene,n=this._mapModelPathToModelSize.get(t);if(WebGLPlot$e.defined(n))return n;if(!WebGLPlot$e.defined(i))return;const r=t.split(".");let o=r[r.length-1];if("gltf"===o||"glb"===o){let e=i.primitives.add(WebGLPlot$e.Model.fromGltf({url:t})),n=this;e.readyPromise.then((function(e){if(WebGLPlot$e.defined(e._maxCorner)&&WebGLPlot$e.defined(e._minCorner)){var r=Math.abs(e._maxCorner.x-e._minCorner.x),o=Math.abs(e._maxCorner.y-e._minCorner.y),a=Math.abs(e._maxCorner.z-e._minCorner.z);n._mapModelPathToModelSize.set(t,new _0x23de81(r,o,a)),i.primitives.remove(e)}}))}return n}static getModelSizeSyn(e){if(!WebGLPlot$e.defined(e)||WebGLPlot$e.defined(e.modelPath))return;let t=e.modelPath,i=e.modelJson,n=this._mapModelPathToModelSize.get(t);if(WebGLPlot$e.defined(n))return n;if(WebGLPlot$e.defined(e.modelJson))return;for(var r=new WebGLPlot$e.Cartesian3,o=new WebGLPlot$e.Cartesian3,a=i.nodes,s=i.meshes,l=i.scenes[i.scene].nodes,u=l.length,c=[],h=new WebGLPlot$e.Cartesian3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),d=new WebGLPlot$e.Cartesian3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),f=0;f<u;++f){var p=a[l[f]];for(p._transformToRoot=WebGLPlot$e.ModelUtility.getTransform(p),c.push(p);c.length>0;){var _=(p=c.pop())._transformToRoot,m=p.mesh;if(WebGLPlot$e.defined(m))for(var g=s[m].primitives,x=g.length,y=0;y<x;++y){var v=g[y].attributes.POSITION;if(WebGLPlot$e.defined(v)){var $=WebGLPlot$e.ModelUtility.getAccessorMinMax(i,v),b=WebGLPlot$e.Cartesian3.fromArray($.min,0,r),T=WebGLPlot$e.Cartesian3.fromArray($.max,0,o);WebGLPlot$e.defined(h)&&WebGLPlot$e.defined(d)&&(WebGLPlot$e.Matrix4.multiplyByPoint(_,b,b),WebGLPlot$e.Matrix4.multiplyByPoint(_,T,T),WebGLPlot$e.Cartesian3.minimumByComponent(h,b,h),WebGLPlot$e.Cartesian3.maximumByComponent(d,T,d))}}var C=p.children;if(WebGLPlot$e.defined(C))for(var S=C.length,w=0;w<S;++w){var E=a[C[w]];E._transformToRoot=WebGLPlot$e.ModelUtility.getTransform(E),WebGLPlot$e.Matrix4.multiplyTransformation(_,E._transformToRoot,E._transformToRoot),c.push(E)}delete p._transformToRoot}}let P={};if(P._minCorner=h,P._maxCorner=d,WebGLPlot$e.defined(P._maxCorner)&&WebGLPlot$e.defined(P._minCorner)){var A=Math.abs(P._maxCorner.x-P._minCorner.x),L=Math.abs(P._maxCorner.y-P._minCorner.y),M=Math.abs(P._maxCorner.z-P._minCorner.z);this._mapModelPathToModelSize.set(t,new WebGLPlot$e.PlotPoint3D(A,L,M))}return n=this._mapModelPathToModelSize.get(t),n}static getPositionByDistanceOnOld(e,t,i,n){if(e.length>=2&&t>=0&&i>=0&&n>=0){if(0==t)return{index:i,point:e[i],distanceIndexOld:n};let r=n;for(let n=i;n<e.length-1;n++){let i=e[n],o=e[n+1],a=WebGLPlot$e.Cartesian3.distance(i,o);if(r+=a,r==t)return{index:n+1,point:o,distanceIndexOld:r};if(r>t){let e=(r-t)/a,s=o.x+(i.x-o.x)*e,l=o.y+(i.y-o.y)*e,u=o.z+(i.z-o.z)*e;return{index:n,point:new WebGLPlot$e.Cartesian3(s,l,u),distanceIndexOld:r-a}}}}return{index:-1,point:new WebGLPlot$e.Cartesian3}}static getPositionByDistance(e,t){if(e.length>=2&&t>=0){if(0==t)return{index:0,point:e[0],distanceIndex:0};let i=0;for(let n=0;n<e.length-1;n++){let r=e[n],o=e[n+1],a=WebGLPlot$e.Cartesian3.distance(r,o);if(i+=a,i==t)return{index:n+1,point:o,distanceIndex:i};if(i>t){let e=(i-t)/a,s=o.x+(r.x-o.x)*e,l=o.y+(r.y-o.y)*e,u=o.z+(r.z-o.z)*e;return{index:n,point:new WebGLPlot$e.Cartesian3(s,l,u),distanceIndex:i-a}}}}return{index:-1,point:new WebGLPlot$e.Cartesian3,distanceIndex:0}}static getAllDistance(e){let t=0;for(let i=0;i<e.length-1;i++){let n=e[i],r=e[i+1];t+=WebGLPlot$e.Cartesian3.distance(n,r)}return t}static calcControlPosMatrix(e,t,i){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t))return null;let n=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west"),r=null;if(e.getShowMode()!=_0x2bcc5b.Marker){const t=this.degreesToCartesian3(e.getPosition());r=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(t,new WebGLPlot$e.HeadingPitchRoll,WebGLPlot$e.Ellipsoid.WGS84,n)}else{const o=e.getModelRotate(),a=WebGLPlot$e.HeadingPitchRoll.fromDegrees(o.z,o.x,o.y,new WebGLPlot$e.HeadingPitchRoll),s=this.degreesToCartesian3(e.getPosition()),l=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(s,a,WebGLPlot$e.Ellipsoid.WGS84,n),u=e.getModelScale(),c=e.getModelPath(),h=this.getModelSize({modelPath:c,scene:i});if(WebGLPlot$e.defined(h)){const e=WebGLPlot$e.Cartesian3.fromElements(h.x*t.y*u,h.y*t.x*u,h.z*t.z*u);r=WebGLPlot$e.Matrix4.multiplyByTranslation(l,e,new WebGLPlot$e.Matrix4)}}return r}static calcControlPoint(e,t,i){if(0==t.x&&0==t.y&&0==t.z)return e.getPosition();let n=this.calcControlPosMatrix(e,t,i);return WebGLPlot$e.defined(n)?this.getPositionFromModelMatrix(n):null}static colorToObject(e){var t=new Object;return t.alpha=255*e.alpha,t.red=255*e.red,t.green=255*e.green,t.blue=255*e.blue,t}static objectToColor(e){var t=new WebGLPlot$e.Color;return t.red=e.red/255,t.green=e.green/255,t.blue=e.blue/255,t.alpha=e.alpha/255,WebGLPlot$e.defined(e.red)||(t.red=1),WebGLPlot$e.defined(e.green)||(t.green=1),WebGLPlot$e.defined(e.blue)||(t.blue=1),WebGLPlot$e.defined(e.alpha)||(t.alpha=1),t}static circlePoint(e,t,i,n){n*=Math.PI/180;let r=e.x+t*Math.cos(n),o=e.y+i*Math.sin(n);return new Cesium.Cartesian2(r,o)}static calcCameraDistance(e,t){if(WebGLPlot$e.defined(e)&&WebGLPlot$e.defined(t)){let i=this.degreesToCartesian3(e);return WebGLPlot$e.Cartesian3.distance(i,t.camera.positionWC)}return null}}const _0x5c64ab=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x261f98=_0x5c64ab(void 0,(function(){return _0x261f98.toString().search("(((.+)+)+)+$").toString().constructor(_0x261f98).search("(((.+)+)+)+$")}));_0x261f98();class _0x15cea8{constructor(){this._symbolStyle=new _0x291171,this._lineSymbolID=0,this._lineWidth=3,this._surroundLineWidth=3,this._gridSymbolSize=new WebGLPlot$e.Cartesian2(-1,-1),this._symbolRank=0}clone(){let e=new _0x15cea8;return e._symbolStyle=this._symbolStyle.clone(),e._lineSymbolID=this._lineSymbolID,e._lineWidth=this._lineWidth,e._surroundLineWidth=this._surroundLineWidth,e._gridSymbolSize=this._gridSymbolSize,e._symbolRank=this._symbolRank,e}getSymbolStyle(){return this._symbolStyle}setSymbolStyle(e){this._symbolStyle=e}getLineSymbolID(){return this._lineSymbolID}setLineSymbolID(e){this._lineSymbolID=e}getLineWidth(){return this._lineWidth}setLineWidth(e){this._lineWidth=e}getSurroundLineWidth(){return this._surroundLineWidth}setSurroundLineWidth(e){this._surroundLineWidth=e}getGridSymbolSize(){return this._gridSymbolSize}setGridSymbolSize(e){this._gridSymbolSize=e}getSymbolRank(){return this._symbolRank}setSymbolRank(e){this._symbolRank=e}setGeoGraphicObjectStyle(e){e.symbolStyle=this._symbolStyle,e.lineSymbolID=this._lineSymbolID,e.gridLineWidth=this._lineWidth,e.gridSurroundLineWidth=this._surroundLineWidth,-1!=this._gridSymbolSize.x&&-1!=this._gridSymbolSize.y&&(e.gridSymbolSize=this._gridSymbolSize),e.symbolRank=this._symbolRank}getGeoGraphicObjectStyle(e){this._symbolStyle=e.symbolStyle,this._lineSymbolID=e.lineSymbolID,this._lineWidth=e.gridLineWidth,this._surroundLineWidth=e.gridSurroundLineWidth,this._gridSymbolSize=e.gridSymbolSize,this._symbolRank=e.symbolRank}toJson(){let e={};if(!e.hasOwnProperty("symbolStyle")){var t={};t.lineColor=_0xf52e1d.colorToObject(this._symbolStyle.lineColor),t.fillSymbolID=this._symbolStyle._fillSymbolID,t.fillBackColor=_0xf52e1d.colorToObject(this._symbolStyle._fillBackColor),t.fillForeColor=_0xf52e1d.colorToObject(this._symbolStyle._fillForeColor),t.fillBackOpaque=this._symbolStyle._fillBackOpaque,t.fillGradientMode=this._symbolStyle._fillGradientMode,t.fillCenterOffsetX=this._symbolStyle.fillGradientOffsetRatioX,t.fillCenterOffsetY=this._symbolStyle.fillGradientOffsetRatioY,t.fillAngle=this._symbolStyle.fillGradientAngle,t.fillOpaqueRate=100-this._symbolStyle.fillOpaqueRate,t.lineWidth3D=this._symbolStyle.lineWidth,e.symbolStyle=t}return e.hasOwnProperty("lineSymbolID")||(e.lineSymbolID=this._lineSymbolID),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("surroundLineWidth")||(e.surroundLineWidth=this._surroundLineWidth),e.hasOwnProperty("gridSymbolSize")||(e.gridSymbolSize={x:this._gridSymbolSize.x,y:this._gridSymbolSize.y}),e.hasOwnProperty("symbolRank")||(e.symbolRank=this._symbolRank),JSON.stringify(e)}fromJson(e){let t=JSON.parse(e);if(WebGLPlot$e.defined(t.symbolStyle)){let e=t.symbolStyle;WebGLPlot$e.defined(e.lineColor)&&(this._symbolStyle.lineColor=_0xf52e1d.objectToColor(e.lineColor),this._symbolStyle._opacity=this._symbolStyle.lineColor.alpha),WebGLPlot$e.defined(e.fillSymbolID)&&(this._symbolStyle.fillSymbolID=e.fillSymbolID),WebGLPlot$e.defined(e.fillForeColor)&&(this._symbolStyle.fillForeColor=_0xf52e1d.objectToColor(e.fillForeColor)),WebGLPlot$e.defined(e.fillBackColor)&&(this._symbolStyle.fillBackColor=_0xf52e1d.objectToColor(e.fillBackColor)),WebGLPlot$e.defined(e.fillGradientMode)&&(this._symbolStyle.fillGradientMode=e.fillGradientMode),WebGLPlot$e.defined(e.fillBackOpaque)&&(this._symbolStyle.fillBackOpaque=e.fillBackOpaque),WebGLPlot$e.defined(e.fillGradientAngle)&&(this._symbolStyle.fillGradientAngle=e.fillGradientAngle),WebGLPlot$e.defined(e.fillOpaqueRate)&&(this._symbolStyle.fillOpaqueRate=100-e.fillOpaqueRate),WebGLPlot$e.defined(e.fillGradientAngle)&&(this._symbolStyle.fillGradientAngle=e.fillGradientAngle),WebGLPlot$e.defined(e.fillGradientOffsetRatioX)&&(this._symbolStyle.fillGradientOffsetRatioX=e.fillGradientOffsetRatioX),WebGLPlot$e.defined(e.fillGradientOffsetRatioY)&&(this._symbolStyle.fillGradientOffsetRatioY=e.fillGradientOffsetRatioY),WebGLPlot$e.defined(e.lineWidth3D)?this._symbolStyle.lineWidth=e.lineWidth3D:this._symbolStyle.lineWidth=3}WebGLPlot$e.defined(t.lineSymbolID)&&(this._lineSymbolID=t.lineSymbolID),WebGLPlot$e.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$e.defined(t.surroundLineWidth)&&(this._surroundLineWidth=t.surroundLineWidth),WebGLPlot$e.defined(t.gridSymbolSize)&&(this._gridSymbolSize=new WebGLPlot$e.Cartesian2(t.gridSymbolSize.x,t.gridSymbolSize.y)),WebGLPlot$e.defined(t.symbolRank)&&(this._symbolRank=t.symbolRank)}}const _0x1753c2=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x38769b=_0x1753c2(void 0,(function(){return _0x38769b.toString().search("(((.+)+)+)+$").toString().constructor(_0x38769b).search("(((.+)+)+)+$")}));_0x38769b();class _0x4920fc{constructor(){this._position=new _0x23de81,this._isPositionUpdate=!1,this._modelScale=1,this._isModelScaleUpdate=!1,this._vectorScale=1,this._isVectorScaleUpdate=!1,this._modelRotate=new _0x23de81,this._isModelRotateUpdate=!1,this._vectorRotate=new _0x23de81,this._isVectorRotateUpdate=!1,this._modelPath="",this._isModelPathUpdate=!1,this._visible=!0,this._isVisibleUpdate=!1,this._dotPlotLibID=0,this._isDotPlotLibIDUpdate=!1,this._dotPlotCode=0,this._isDotPlotCodeUpdate=!1,this._dotPlotStyle=new _0x15cea8,this._isDotPlotStyleUpdate=!1,this._pictureSymbolSize=new WebGLPlot$e.Cartesian2(0,0),this._isPictureSymbolSizeUpdate=!1,this._picturePath="",this._isPicturePathUpdate=!1,this._showMode=_0x2bcc5b.Unkown,this._isShowModeUpdate=!1,this._isDistanceChangeMode=!1,this._isDistanceChangeModeUpdate=!1,this._changeModeDistance=5e3,this._isChangeModeDistanceUpdate=!1}_update(e){this._position=e._position,this._isPositionUpdate=!0,this._modelScale=e._modelScale,this._isModelScaleUpdate=!0,this._vectorScale=e._vectorScale,this._isVectorScaleUpdate=!0,this._modelRotate=e._modelRotate,this._isModelRotateUpdate=!0,this._vectorRotate=e._vectorRotate,this._isVectorRotateUpdate=!0,this._modelPath=e._modelPath,this._isModelPathUpdate=!0,this._visible=e._visible,this._isVisibleUpdate=!0,this._dotPlotLibID=e._dotPlotLibID,this._isDotPlotLibIDUpdate=!0,this._dotPlotCode=e._dotPlotCode,this._isDotPlotCodeUpdate=!0,this._dotPlotStyle=e._dotPlotStyle,this._isDotPlotStyleUpdate=!0,this._pictureSymbolSize=e._pictureSymbolSize,this._isPictureSymbolSizeUpdate=!0,this._picturePath=e._picturePath,this._isPicturePathUpdate=!0,this._showMode=e._showMode,this._isShowModeUpdate=!0,this._isDistanceChangeMode=e._isDistanceChangeMode,this._isDistanceChangeModeUpdate=!0,this._changeModeDistance=e._changeModeDistance,this._isChangeModeDistanceUpdate=!0}_merge(e){e._isPositionUpdate&&(this._position=new _0x23de81(e._position.x,e._position.y,e._position.z),this._isPositionUpdate=!0),e._isModelScaleUpdate&&(this._modelScale=e._modelScale,this._isModelScaleUpdate=!0),e._isVectorScaleUpdate&&(this._vectorScale=e._vectorScale,this._isVectorScaleUpdate=!0),e._isModelRotateUpdate&&(this._modelRotate=new _0x23de81(e._modelRotate.x,e._modelRotate.y,e._modelRotate.z),this._isModelRotateUpdate=!0),e._isVectorRotateUpdate&&(this._vectorRotate=new _0x23de81(e._vectorRotate.x,e._vectorRotate.y,e._vectorRotate.z),this._isVectorRotateUpdate=!0),e._isModelPathUpdate&&(this._modelPath=e._modelPath,this._isModelPathUpdate=!0),e._isVisibleUpdate&&(this._visible=e._visible,this._isVisibleUpdate=!0),e._isDotPlotLibIDUpdate&&(this._dotPlotLibID=e._dotPlotLibID,this._isDotPlotLibIDUpdate=!0),e._isDotPlotCodeUpdate&&(this._dotPlotCode=e._dotPlotCode,this._isDotPlotCodeUpdate=!0),e._isDotPlotStyleUpdate&&(this._dotPlotStyle=e._dotPlotStyle.clone(),this._isDotPlotStyleUpdate=!0),e._isPictureSymbolSizeUpdate&&(this._pictureSymbolSize=new WebGLPlot$e.Cartesian2(e._pictureSymbolSize.x,e._pictureSymbolSize.y),this._isPictureSymbolSizeUpdate=!0),e._isPicturePathUpdate&&(this._picturePath=e._picturePath,this._isPicturePathUpdate=!0),e._isShowModeUpdate&&(this._showMode=e._showMode,this._isShowModeUpdate=!0),e._isDistanceChangeModeUpdate&&(this._isDistanceChangeMode=e._isDistanceChangeMode,this._isDistanceChangeModeUpdate=!0),e._isChangeModeDistanceUpdate&&(this._changeModeDistance=e._changeModeDistance,this._isChangeModeDistanceUpdate=!0)}_initParm(e,t,i,n,r,o,a,s,l,u,c,h,d,f,p){this._position=new _0x23de81(e.x,e.y,e.z),this._isPositionUpdate=!1,this._modelScale=t,this._isModelScaleUpdate=!1,this._vectorScale=i,this._isVectorScaleUpdate=!1,this._modelRotate=new _0x23de81(n.x,n.y,n.z),this._isModelRotateUpdate=!1,this._vectorRotate=new _0x23de81(r.x,r.y,r.z),this._isVectorRotateUpdate=!1,this._modelPath=o,this._isModelPathUpdate=!1,this._visible=a,this._isVisibleUpdate=!1,this._dotPlotLibID=s,this._isDotPlotLibIDUpdate=!1,this._dotPlotCode=l,this._isDotPlotCodeUpdate=!1,this._dotPlotStyle=u,this._isDotPlotStyleUpdate=!1,this._pictureSymbolSize=new WebGLPlot$e.Cartesian2(c.x,c.y),this._isPictureSymbolSizeUpdate=!1,this._picturePath=h,this._isPicturePathUpdate=!1,this._showMode=d,this._isShowModeUpdate=!1,this._isDistanceChangeMode=f,this._isDistanceChangeModeUpdate=!1,this._changeModeDistance=p,this._isChangeModeDistanceUpdate=!1}_toJson(){let e={};return e.hasOwnProperty("position")||(e.position={x:this._position.x,y:this._position.y,z:this._position.z}),e.hasOwnProperty("isPositionUpdate")||(e.isPositionUpdate=this._isPositionUpdate),e.hasOwnProperty("modelScale")||(e.modelScale=this._modelScale),e.hasOwnProperty("isModelScaleUpdate")||(e.isModelScaleUpdate=this._isModelScaleUpdate),e.hasOwnProperty("vectorScale")||(e.vectorScale=this._vectorScale),e.hasOwnProperty("isVectorScaleUpdate")||(e.isVectorScaleUpdate=this._isVectorScaleUpdate),e.hasOwnProperty("modelRotate")||(e.modelRotate={x:this._modelRotate.x,y:this._modelRotate.y,z:this._modelRotate.z}),e.hasOwnProperty("isModelRotateUpdate")||(e.isModelRotateUpdate=this._isModelRotateUpdate),e.hasOwnProperty("vectorRotate")||(e.vectorRotate={x:this._vectorRotate.x,y:this._vectorRotate.y,z:this._vectorRotate.z}),e.hasOwnProperty("isVectorRotateUpdate")||(e.isVectorRotateUpdate=this._isVectorRotateUpdate),e.hasOwnProperty("modelPath")||(e.modelPath=this._modelPath),e.hasOwnProperty("isModelPathUpdate")||(e.isModelPathUpdate=this._isModelPathUpdate),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("isVisibleUpdate")||(e.isVisibleUpdate=this._isVisibleUpdate),e.hasOwnProperty("dotPlotLibID")||(e.dotPlotLibID=this._dotPlotLibID),e.hasOwnProperty("isDotPlotLibIDUpdate")||(e._isDotPlotLibIDUpdate=this._isDotPlotLibIDUpdate),e.hasOwnProperty("dotPlotCode")||(e.dotPlotCode=this._dotPlotCode),e.hasOwnProperty("isDotPlotCodeUpdate")||(e._isDotPlotCodeUpdate=this._isDotPlotCodeUpdate),e.hasOwnProperty("dotPlotSyle")||(e.dotPlotStyle=this._dotPlotStyle.toJson()),e.hasOwnProperty("isDotPlotStyleUpdate")||(e._isDotPlotStyleUpdate=this._isDotPlotStyleUpdate),e.hasOwnProperty("pictureSymbolSize")||(e.pictureSymbolSize={x:this._pictureSymbolSize.x,y:this._pictureSymbolSize.y}),e.hasOwnProperty("isPictureSymbolSizeUpdate")||(e.isPictureSymbolSizeUpdate=this._isPictureSymbolSizeUpdate),e.hasOwnProperty("picturePath")||(e.picturePath=this._picturePath),e.hasOwnProperty("isPicturePathUpdate")||(e.isPicturePathUpdate=this._isPicturePathUpdate),e.hasOwnProperty("showMode")||(e.showMode=this._showMode),e.hasOwnProperty("isShowModeUpdate")||(e.isShowModeUpdate=this._isShowModeUpdate),e.hasOwnProperty("isDistanceChangeMode")||(e.isDistanceChangeMode=this._isDistanceChangeMode),e.hasOwnProperty("isDistanceChangeModeUpdate")||(e.isDistanceChangeModeUpdate=this._isDistanceChangeModeUpdate),e.hasOwnProperty("changeModeDistance")||(e.changeModeDistance=this._changeModeDistance),e.hasOwnProperty("isChangeModeDistanceUpdate")||(e.isChangeModeDistanceUpdate=this._isChangeModeDistanceUpdate),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);if(WebGLPlot$e.defined(t.position)&&(this._position=new _0x23de81(t.position.x,t.position.y,t.position.z)),WebGLPlot$e.defined(t.isPositionUpdate)&&(this._isPositionUpdate=t.isPositionUpdate),WebGLPlot$e.defined(t.modelScale)&&(this._modelScale=t.modelScale),WebGLPlot$e.defined(t.isModelScaleUpdate)&&(this._isModelScaleUpdate=t.isModelScaleUpdate),WebGLPlot$e.defined(t.vectorScale)&&(this._vectorScale=t.vectorScale),WebGLPlot$e.defined(t.isVectorScaleUpdate)&&(this._isVectorScaleUpdate=t.isVectorScaleUpdate),WebGLPlot$e.defined(t.modelRotate)&&(this._modelRotate=new _0x23de81(t.modelRotate.x,t.modelRotate.y,t.modelRotate.z)),WebGLPlot$e.defined(t.isModelRotateUpdate)&&(this._isModelRotateUpdate=t.isModelRotateUpdate),WebGLPlot$e.defined(t.vectorRotate)&&(this._vectorRotate=new _0x23de81(t.vectorRotate.x,t.vectorRotate.y,t.vectorRotate.z)),WebGLPlot$e.defined(t.isVectorRotateUpdate)&&(this._isVectorRotateUpdate=t.isVectorRotateUpdate),WebGLPlot$e.defined(t.modelPath)&&(this._modelPath=t.modelPath),WebGLPlot$e.defined(t.isModelRotateUpdate)&&(this._isModelPathUpdate=t.isModelPathUpdate),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.isVisibleUpdate)&&(this._isVisibleUpdate=t.isVisibleUpdate),WebGLPlot$e.defined(t.dotPlotLibID)&&(this._dotPlotLibID=t.dotPlotLibID),WebGLPlot$e.defined(t.isDotPlotParmUpdate)&&(this._isDotPlotLibIDUpdate=t.isDotPlotLibIDUpdate),WebGLPlot$e.defined(t.dotPlotCode)&&(this._dotPlotCode=t.dotPlotCode),WebGLPlot$e.defined(t.isDotPlotCodeUpdate)&&(this._isDotPlotCodeUpdate=t.isDotPlotCodeUpdate),WebGLPlot$e.defined(t.dotPlotStyle)){let e=new _0x15cea8;e.fromJson(t.dotPlotStyle),this._dotPlotStyle=e}WebGLPlot$e.defined(t.isDotPlotStyleUpdate)&&(this._isDotPlotStyleUpdate=t.isDotPlotStyleUpdate),WebGLPlot$e.defined(t.pictureSymbolSize)&&(this._pictureSymbolSize=new WebGLPlot$e.Cartesian2(t.pictureSymbolSize.x,t.pictureSymbolSize.y)),WebGLPlot$e.defined(t.isPictureSymbolSizeUpdate)&&(this._isPictureSymbolSizeUpdate=t.isPictureSymbolSizeUpdate),WebGLPlot$e.defined(t.picturePath)&&(this._picturePath=t.picturePath),WebGLPlot$e.defined(t.isPicturePathUpdate)&&(this._isPicturePathUpdate=t.isPicturePathUpdate),WebGLPlot$e.defined(t.showMode)&&(this._showMode=t.showMode),WebGLPlot$e.defined(t.isShowModeUpdate)&&(this._isShowModeUpdate=t.isShowModeUpdate),WebGLPlot$e.defined(t.isDistanceChangeMode)&&(this._isDistanceChangeMode=t.isDistanceChangeMode),WebGLPlot$e.defined(t.isDistanceChangeModeUpdate)&&(this._isDistanceChangeModeUpdate=t.isDistanceChangeModeUpdate),WebGLPlot$e.defined(t.changeModeDistance)&&(this._changeModeDistance=t.changeModeDistance),WebGLPlot$e.defined(t.isChangeModeDistanceUpdate)&&(this._isChangeModeDistanceUpdate=t.isChangeModeDistanceUpdate)}clone(){let e=new _0x4920fc;return e._position=new _0x23de81(this._position.x,this._position.y,this._position.z),e._isPositionUpdate=this._isPositionUpdate,e._modelScale=this._modelScale,e._isModelScaleUpdate=this._isModelScaleUpdate,e._vectorScale=this._vectorScale,e._isVectorScaleUpdate=this._isVectorScaleUpdate,e._modelRotate=new _0x23de81(this._modelRotate.x,this._modelRotate.y,this._modelRotate.z),e._isModelRotateUpdate=this._isModelRotateUpdate,e._vectorRotate=new _0x23de81(this._vectorRotate.x,this._vectorRotate.y,this._vectorRotate.z),e._isVectorRotateUpdate=this._isVectorRotateUpdate,e._modelPath=this._modelPath,e._isModelPathUpdate=this._isModelPathUpdate,e._visible=this._visible,e._isVisibleUpdate=this._isVisibleUpdate,e._dotPlotLibID=this._dotPlotLibID,e._isDotPlotLibIDUpdate=this._isDotPlotLibIDUpdate,e._dotPlotCode=this._dotPlotCode,e._isDotPlotCodeUpdate=this._isDotPlotCodeUpdate,e._dotPlotStyle=this._dotPlotStyle.clone(),e._isDotPlotStyleUpdate=this._isDotPlotStyleUpdate,e._pictureSymbolSize=new WebGLPlot$e.Cartesian2(this._pictureSymbolSize.x,this._pictureSymbolSize.y),e._isPictureSymbolSizeUpdate=this._isPictureSymbolSizeUpdate,e._picturePath=this._picturePath,e._isPicturePathUpdate=this._isPicturePathUpdate,e._showMode=this._showMode,e._isShowModeUpdate=this._isShowModeUpdate,e._isDistanceChangeMode=this._isDistanceChangeMode,e._isDistanceChangeModeUpdate=this._isDistanceChangeModeUpdate,e._changeModeDistance=this._changeModeDistance,e._isChangeModeDistanceUpdate=this._isChangeModeDistanceUpdate,e}setPosition(e){this._position=e,this._isPositionUpdate=!0}getPosition(){return this._position}isPositionUpdate(){return this._isPositionUpdate}setModelScale(e){this._modelScale=e,this._isModelScaleUpdate=!0}getModelScale(){return this._modelScale}isModelScaleUpdate(){return this._isModelScaleUpdate}setVectorScale(e){this._vectorScale=e,this._isVectorScaleUpdate=!0}getVectorScale(){return this._vectorScale}isVectorScaleUpdate(){return this._isVectorScaleUpdate}setModelRotate(e){this._modelRotate=e,this._isModelRotateUpdate=!0}getModelRotate(){return this._modelRotate}isModelRotateUpdate(){return this._isModelRotateUpdate}setVectorRotate(e){this._vectorRotate=e,this._isVectorRotateUpdate=!0}getVectorRotate(){return this._vectorRotate}isVectorRotateUpdate(){return this._isVectorRotateUpdate}setModelPath(e){this._modelPath=e,this._isModelPathUpdate=!0}getModelPath(){return this._modelPath}isModelPathUpdate(){return this._isModelPathUpdate}setDotPlotLibID(e){this._dotPlotLibID=e,this._isDotPlotLibIDUpdate=!0}getDotPlotLibID(){return this._dotPlotLibID}isDotPlotLibIDUpdate(){return this._isDotPlotLibIDUpdate}setDotPlotCode(e){this._dotPlotCode=e,this._isDotPlotCodeUpdate=!0}getDotPlotCode(){return this._dotPlotCode}isDotPlotCodeUpdate(){return this._isDotPlotCodeUpdate}setDotPlotStyle(e){this._dotPlotStyle=e,this._isDotPlotStyleUpdate=!0}getDotPlotStyle(){return this._dotPlotStyle}isDotPlotStyleUpdate(){return this._isDotPlotStyleUpdate}setVisible(e){this._visible=e,this._isVisibleUpdate=!0}isVisible(){return this._visible}isVisibleUpdate(){return this._isVisibleUpdate}setPicturePath(e){this._picturePath=e,this._isPicturePathUpdate=!0}getPicturePath(){return this._picturePath}isPicturePathUpdate(){return this._isPicturePathUpdate}setPictureSymbolSize(e){this._pictureSymbolSize=e,this._isPictureSymbolSizeUpdate=!0}getPictureSymbolSize(){return this._pictureSymbolSize}isPictureSymbolSizeUpdate(){return this._isPictureSymbolSizeUpdate}setShowMode(e){this._showMode=e,this._isShowModeUpdate=!0}getShowMode(){return this._showMode}isShowModeUpdate(){return this._isShowModeUpdate}setIsDistanceChangeMode(e){this._isDistanceChangeMode=e,this._isDistanceChangeModeUpdate=!0}getIsDistanceChangeMode(){return this._isDistanceChangeMode}isDistanceChangeModeUpdate(){return this._isDistanceChangeModeUpdate}setChangeModeDistance(e){this._changeModeDistance=e,this._isChangeModeDistanceUpdate=!0}getChangeModeDistance(){return this._changeModeDistance}isChangeModeDistanceUpdate(){return this._isChangeModeDistanceUpdate}}var _0x9a7668=(_0xe09243=!0,function(e,t){var i=_0xe09243?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xe09243=!1,i}),_0x38401d=_0x9a7668(void 0,(function(){return _0x38401d.toString().search("(((.+)+)+)+$").toString().constructor(_0x38401d).search("(((.+)+)+)+$")})),_0xe09243;_0x38401d();var _0x5826a4={UNKNOW:0,WAKE:1,ROTORWASH:2,FIRESMOKE:3,BURST:4,TAILFLAME:5,TAILGAS:6,RADAR:7,SCANWAVE:8,SCANCONE:9,DETECTIONCONE:10,TRACKLINE:11,ATTACKLINE:12,SIGN:13,COMMUNICATIONLINK:14,DYNAMICMODEL:15,TEXT:16,EXTENDACTION:17,AUGMENT:18,ANNULARDIFFUSION:19},_0xaadec6=Object.freeze(_0x5826a4);const _0x7fff87=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe0b1c6=_0x7fff87(void 0,(function(){return _0xe0b1c6.toString().search("(((.+)+)+)+$").toString().constructor(_0xe0b1c6).search("(((.+)+)+)+$")}));_0xe0b1c6();class _0x1b7397{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._name=WebGLPlot$e.defaultValue(e.name,""),this._geoEntity=WebGLPlot$e.defaultValue(e.geoEntity,null),this._visible=WebGLPlot$e.defaultValue(e.visible,!0),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._UUID=WebGLPlot$e.createGuid(),this._type=_0xaadec6.UNKNOW,this._geoEntityParameter=void 0,this._initialized=!1,this._scene=void 0;let t=this;this._execute=function(e,i){t._executeFunction(e),t._initialized||(t._removeEffectFromScene(e),t._visible?t._initialized=t._addEffectToScene(e):t._initialized=!0)}}getType(){return this._type}setGeoEntity(e){this._geoEntity=e}getGeoEntity(){return this._geoEntity}setVisible(e){this._visible=e,this._initialized=!1}isVisible(){return this._visible}setOffset(e){this._pntOffset=e,this._initialized=!1}getOffset(){return this._pntOffset}setChangeSizeFlowModel(e){this._bChangeSizeFlowModel=e}isChangeSizeFlowModel(){return this._bChangeSizeFlowModel}getUUID(){return this._UUID}addEffectToScene(e){this._scene=e,e.preUpdate.addEventListener(this._execute)}removeEffectFromScene(e){e.preUpdate.removeEventListener(this._execute),this._removeEffectFromScene(e),this._initialized=!1}setGeoEntityParameter(e,t){}_addEffectToScene(e){}_removeEffectFromScene(e){}_executeFunction(e){}destroy(){}toJSON(){return{}}fromJSON(e){}clone(){}getName(){return this._name}setName(e){this._name=e}}const _0x5c3c8e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x58fcbd=_0x5c3c8e(void 0,(function(){return _0x58fcbd.toString().search("(((.+)+)+)+$").toString().constructor(_0x58fcbd).search("(((.+)+)+)+$")}));_0x58fcbd();class _0x5a68dc extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.TAILFLAME,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectTailflame_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,-.5,.5)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._crossDiameter=WebGLPlot$e.defaultValue(e.crossDiameter,20),this._particleTailflame=void 0}setCrossDiameter(e){this._crossDiameter=e,this._initialized=!1}getCrossDiameter(){return this._crossDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._particleTailflame)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._particleTailflame.emitterModelMatrix=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){if(0==this._geoEntityParameter.getModelScale()){let t=1*e.getModelScale();this._crossDiameter=t}else{let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._crossDiameter*=t}this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleTailflame=this._createTailFlameParticle(e),WebGLPlot$e.defined(this._particleTailflame)&&(e.primitives.add(this._particleTailflame),t=!0),t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._particleTailflame)&&e.primitives.contains(this._particleTailflame)&&e.primitives.remove(this._particleTailflame),this._particleTailflame=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("crossDiameter")||(e.crossDiameter=this._crossDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.crossDiameter)&&(this._crossDiameter=t.crossDiameter),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x5a68dc;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._crossDiameter=this._crossDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createTailFlameParticle(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset)||!WebGLPlot$e.defined(this._crossDiameter))return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=this._crossDiameter/1,n=1*i;n<.5&&(n=.5);let r=20*i,o=80*i;return new WebGLPlot$e.ParticleSystem({image:_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/flame.png",startColor:new WebGLPlot$e.Color(1,1,1,1),endColor:new WebGLPlot$e.Color(.5,0,0,0),startScale:1,endScale:1,minimumParticleLife:.1,maximumParticleLife:.3,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$e.Cartesian2(n,n),emissionRate:600,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$e.ConeEmitter(WebGLPlot$e.CesiumMath.toRadians(10)),sizeInMeters:!0})}_calcControlPoint(e,t,i){const n=_0xf52e1d.calcControlPosMatrix(e,t,i);if(!WebGLPlot$e.defined(n))return null;const r=WebGLPlot$e.HeadingPitchRoll.fromDegrees(0,90,0,new WebGLPlot$e.HeadingPitchRoll),o=WebGLPlot$e.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$e.Matrix3);return WebGLPlot$e.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$e.Matrix4)}}const _0x48c900=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x179ad4=_0x48c900(void 0,(function(){return _0x179ad4.toString().search("(((.+)+)+)+$").toString().constructor(_0x179ad4).search("(((.+)+)+)+$")}));_0x179ad4();class _0x1d9822 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.TAILGAS,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectTailgas_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,-.5,.5)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._crossDiameter=WebGLPlot$e.defaultValue(e.crossDiameter,20),this._particleTailgas=void 0}setCrossDiameter(e){this._crossDiameter=e,this._initialized=!1}getCrossDiameter(){return this._crossDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._particleTailgas)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._particleTailgas.emitterModelMatrix=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._crossDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleTailgas=this._createTailgasParticle(e),WebGLPlot$e.defined(this._particleTailgas)&&(e.primitives.add(this._particleTailgas),t=!0),t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._particleTailgas)&&e.primitives.contains(this._particleTailgas)&&e.primitives.remove(this._particleTailgas),this._particleTailgas=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("crossDiameter")||(e.crossDiameter=this._crossDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.crossDiameter)&&(this._crossDiameter=t.crossDiameter),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x1d9822;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._crossDiameter=this._crossDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createTailgasParticle(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset)||!WebGLPlot$e.defined(this._crossDiameter))return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=this._crossDiameter/1,n=1*i;n<.5&&(n=.5);let r=5*i,o=5*i;return new WebGLPlot$e.ParticleSystem({image:_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/gas.png",startColor:new WebGLPlot$e.Color(.57,.57,.57,1),endColor:new WebGLPlot$e.Color(.57,.57,.57,0),startScale:1,endScale:1,minimumParticleLife:7,maximumParticleLife:7,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$e.Cartesian2(n,n),emissionRate:80,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$e.ConeEmitter(WebGLPlot$e.CesiumMath.toRadians(5)),sizeInMeters:!0})}_calcControlPoint(e,t,i){const n=_0xf52e1d.calcControlPosMatrix(e,t,i);if(!WebGLPlot$e.defined(n))return null;const r=WebGLPlot$e.HeadingPitchRoll.fromDegrees(0,90,0,new WebGLPlot$e.HeadingPitchRoll),o=WebGLPlot$e.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$e.Matrix3);return WebGLPlot$e.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$e.Matrix4)}}const _0x43933a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x497efa=_0x43933a(void 0,(function(){return _0x497efa.toString().search("(((.+)+)+)+$").toString().constructor(_0x497efa).search("(((.+)+)+)+$")}));_0x497efa();class _0x492aac extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.FIRESMOKE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectFiresmoke_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,.5)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._firesmokeDiameter=WebGLPlot$e.defaultValue(e.firesmokeDiameter,50),this._particleFiresmoke=void 0}setFiresmokeDiameter(e){this._firesmokeDiameter=e,this._initialized=!1}getFiresmokeDiameter(){return this._firesmokeDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._particleFiresmoke)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._particleFiresmoke.emitterModelMatrix=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._firesmokeDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._particleFiresmoke=this._createFiresmokeParticle(e),WebGLPlot$e.defined(this._particleFiresmoke)&&(e.primitives.add(this._particleFiresmoke),t=!0),t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._particleFiresmoke)&&e.primitives.contains(this._particleFiresmoke)&&e.primitives.remove(this._particleFiresmoke),this._particleFiresmoke=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("firesmokeDiameter")||(e.firesmokeDiameter=this._firesmokeDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.firesmokeDiameter)&&(this._firesmokeDiameter=t.firesmokeDiameter),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x492aac;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._firesmokeDiameter=this._firesmokeDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createFiresmokeParticle(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset)||!WebGLPlot$e.defined(this._firesmokeDiameter)||this._firesmokeDiameter<=0)return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=this._firesmokeDiameter/1,n=1*i;n<.5&&(n=.5);let r=7*i,o=9*i;return new WebGLPlot$e.ParticleSystem({image:_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/fire.png",startColor:new WebGLPlot$e.Color(1,1,1,1),endColor:new WebGLPlot$e.Color(.2,0,0,0),startScale:3,endScale:3,minimumParticleLife:1.5,maximumParticleLife:1.8,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$e.Cartesian2(n,n),emissionRate:200,lifetime:6,loop:!0,emitterModelMatrix:t,emitter:new WebGLPlot$e.ConeEmitter(WebGLPlot$e.CesiumMath.toRadians(30)),sizeInMeters:!0})}_calcControlPoint(e,t,i){let n=_0xf52e1d.calcControlPoint(e,t,i);return WebGLPlot$e.defined(n)?WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(_0xf52e1d.degreesToCartesian3(n),new WebGLPlot$e.HeadingPitchRoll,WebGLPlot$e.Ellipsoid.WGS84,WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west")):null}}const _0x35821b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4d0c02=_0x35821b(void 0,(function(){return _0x4d0c02.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d0c02).search("(((.+)+)+)+$")}));_0x4d0c02();class _0x584c60 extends _0x1b7397{constructor(){super(),this._UUID="GeoEntityEffectExtend_"+WebGLPlot$e.createGuid(),this._type=_0xaadec6.EXTENDACTION,this._name="",this._param=""}toJSON(){let e={};return e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("param")||(e.param=this._param),JSON.stringify(e)}fromJSON(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.param)&&(this._param=t.param)}_executeExtend(){_0x584c60.extendCallBacks.forEach(((e,t)=>{t(e,this._name,this._param)}))}getName(){return this._name}setName(e){this._name=e}getParam(){return this._param}setParam(e){this._param=e}static addExtendCallBack(e,t){WebGLPlot$e.defined(_0x584c60.extendCallBacks.get(e))||_0x584c60.extendCallBacks.set(e,t)}static removeExtendCallBack(e){WebGLPlot$e.defined(_0x584c60.extendCallBacks.get(e))&&_0x584c60.extendCallBacks.delete(e)}}_0x584c60.extendCallBacks=new Map;var _0x1e0f65=(_0x47f197=!0,function(e,t){var i=_0x47f197?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x47f197=!1,i}),_0x3c74f9=_0x1e0f65(void 0,(function(){return _0x3c74f9.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c74f9).search("(((.+)+)+)+$")})),_0x47f197;_0x3c74f9();class _0x496759 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new WebGLPlot$e.Cartesian3(0,0,0)),this._type=_0xaadec6.DYNAMICMODEL,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectDynamic_"+WebGLPlot$e.createGuid(),this._dynamicModelUrl=WebGLPlot$e.defaultValue(e.dynamicModelUrl,""),this._angleTimes=WebGLPlot$e.defaultValue(e.angleTimes,[{time:3,start:{x:0,y:0,z:0},end:{x:45,y:45,z:45},isloop:!0}]),this._scaleTimes=WebGLPlot$e.defaultValue(e.scaleTimes,[{time:3,start:500,end:2e3,isloop:!0}]),this._dynamicModel=void 0,this._angleLoop=WebGLPlot$e.defaultValue(e.angleLoop,!1),this._scaleLoop=WebGLPlot$e.defaultValue(e.scaleLoop,!1),this._gapTime=WebGLPlot$e.defaultValue(e.gapTime,30),this._timer=null}setModelPath(e){this._dynamicModelUrl=e,this._initialized=!1}getModelPath(){return this._dynamicModelUrl}setAngleTimes(e){this._angleTimes=e,this._initialized=!1}getAngleTimes(){return this._angleTimes}setScaleTimes(e){this._scaleTimes=e,this._initialized=!1}getScaleTimes(){return this._scaleTimes}setAngleLoop(e){this._angleLoop=e,this._initialized=!1}getAngleLoop(){return this._angleLoop}setScaleLoop(e){this._scaleLoop=e,this._initialized=!1}getScaleLoop(){return this._scaleLoop}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._dynamicModel)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0xf52e1d.calcControlPosMatrix(e,this._pntOffset,null);WebGLPlot$e.defined(t)&&(this._dynamicModel.modelMatrix=t)}e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()||this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)&&(this._initialized=!1)}this._geoEntityParameter=e}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("dynamicModelUrl")||(e.dynamicModelUrl=this._dynamicModelUrl);let t=[];if(!e.hasOwnProperty("angleTimes")){e.angleTimes=t;for(var i=0;i<this._angleTimes.length;i++)!e.angleTimes.hasOwnProperty("time")&&!e.angleTimes.hasOwnProperty("start")&&!e.angleTimes.hasOwnProperty("end")&&!e.angleTimes.hasOwnProperty("isloop")&&e.angleTimes.push({time:this._angleTimes[i].time,start:this._angleTimes[i].start,end:this._angleTimes[i].end,isloop:this._angleTimes[i].isloop})}let n=[];if(!e.hasOwnProperty("scaleTimes")){e.scaleTimes=n;for(i=0;i<this._scaleTimes.length;i++)!e.scaleTimes.hasOwnProperty("time")&&!e.scaleTimes.hasOwnProperty("start")&&!e.scaleTimes.hasOwnProperty("end")&&!e.scaleTimes.hasOwnProperty("isloop")&&e.scaleTimes.push({time:this._scaleTimes[i].time,start:this._scaleTimes[i].start,end:this._scaleTimes[i].end,isloop:this._scaleTimes[i].isloop})}return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("angleLoop")||(e.angleLoop=this._angleLoop),e.hasOwnProperty("scaleLoop")||(e.scaleLoop=this._scaleLoop),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);if(WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.angleTimes))for(var i=0;i<t.angleTimes.length;i++)WebGLPlot$e.defined(t.angleTimes[i].time),WebGLPlot$e.defined(t.angleTimes[i].start),WebGLPlot$e.defined(t.angleTimes[i].end),WebGLPlot$e.defined(t.angleTimes[i].isloop)&&this._angleTimes.push({time:t.angleTimes[i].time,start:t.angleTimes[i].start,end:t.angleTimes[i].end,isloop:t.angleTimes[i].isloop});if(WebGLPlot$e.defined(t.scaleTimes))for(i=0;i<t.scaleTimes.length;i++)WebGLPlot$e.defined(t.scaleTimes[i].time),WebGLPlot$e.defined(t.scaleTimes[i].start),WebGLPlot$e.defined(t.scaleTimes[i].end),WebGLPlot$e.defined(t.scaleTimes[i].isloop)&&this._scaleTimes.push({time:t.scaleTimes[i].time,start:t.scaleTimes[i].start,end:t.scaleTimes[i].end,isloop:t.scaleTimes[i].isloop});WebGLPlot$e.defined(t.angleLoop)&&(this._angleLoop=t.angleLoop),WebGLPlot$e.defined(t.scaleLoop)&&(this._scaleLoop=t.scaleLoop)}clone(){let e=new _0x496759;return e.name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._initialized=this._initialized,e._dynamicModelUrl=this._dynamicModelUrl,e._angleTimes=this._angleTimes,e._scaleTimes=this._scaleTimes,e._angleLoop=this._angleLoop,e._scaleLoop=this._scaleLoop,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e}_addEffectToScene(e){let t=!1;if(this._dynamicModel=this._createDynamicModel(e),WebGLPlot$e.defined(this._dynamicModel)){e.primitives.add(this._dynamicModel);var i=this._getdata(this._angleTimes,this._scaleTimes);this._startChange(i),t=!0}return t}_startChange(e){var t=new WebGLPlot$e.JulianDate.fromDate(new Date),i=new WebGLPlot$e.JulianDate.fromDate(new Date),n=new WebGLPlot$e.JulianDate.fromDate(new Date),r=t,o=i,a=e.angle.as[0].x,s=e.angle.as[0].y,l=e.angle.as[0].z,u=e.scale.ss[0],c=this._dynamicModel.modelMatrix,h=e.angle.at,d=e.scale.st,f=0,p=0;h.forEach((e=>{f+=e})),d.forEach((e=>{p+=e}));var _=null;_=f>p?f:p;let m=this;this._timer=setInterval((function(){var g=new WebGLPlot$e.JulianDate.fromDate(new Date),x=WebGLPlot$e.JulianDate.secondsDifference(g,r),y=WebGLPlot$e.JulianDate.secondsDifference(g,o),v=WebGLPlot$e.JulianDate.secondsDifference(g,t),$=WebGLPlot$e.JulianDate.secondsDifference(g,i),b=WebGLPlot$e.JulianDate.secondsDifference(g,n),T=m._findIndex(v,h),C=m._findIndex($,d),S=1e3*x,w=1e3*y;r=g,o=g;var E=m._dynamicModel.modelMatrix;if(v<=f){let t=S*e.angleVX[T],i=S*e.angleVY[T],n=S*e.angleVZ[T];a+=t,s+=i,l+=n;const r=WebGLPlot$e.HeadingPitchRoll.fromDegrees(l,a,s,new WebGLPlot$e.HeadingPitchRoll),o=WebGLPlot$e.Matrix4.getTranslation(E,new WebGLPlot$e.Cartesian3);let u=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west");E=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(o,r,WebGLPlot$e.Ellipsoid.WGS84,u)}if(v<=f)try{WebGLPlot$e.defined(E)&&(m._dynamicModel.modelMatrix=E)}catch(e){console.log(e)}if($<=p)try{u+=w*e.scaleVS[C],m._dynamicModel.scale=u}catch(e){console.log(e)}if(b>_){if(m._angleLoop){t=WebGLPlot$e.JulianDate.fromDate(new Date),r=t;try{m._dynamicModel.modelMatrix=c,a=e.angle.as[0].x,s=e.angle.as[0].y,l=e.angle.as[0].z}catch(e){console.log(e)}}if(m._scaleLoop){i=WebGLPlot$e.JulianDate.fromDate(new Date),o=i;try{m._dynamicModel.scale=e.scale.ss[0],u=e.scale.ss[0]}catch(e){console.log(e)}}(m._angleLoop||m._scaleLoop)&&(n=WebGLPlot$e.JulianDate.fromDate(new Date)),!m._angleLoop&&!m._scaleLoop&&clearInterval(m._timer)}}),m._gapTime)}_getdata(e,t){for(var i=[],n=[],r=[],o=[],a=[],s=[],l=[],u=[],c=0;c<e.length;c++)i.push(e[c].time),n.push(e[c].start),r.push(e[c].end),o.push(e[c].isloop);for(c=0;c<t.length;c++)a.push(t[c].time),s.push(t[c].start),l.push(t[c].end),u.push(t[c].isloop);var h=[],d=[],f=[],p=[];for(c=0;c<i.length;c++){var _=this._calspeed(i[c],n[c].x,r[c].x),m=this._calspeed(i[c],n[c].y,r[c].y),g=this._calspeed(i[c],n[c].z,r[c].z);h.push(_),d.push(m),f.push(g)}for(c=0;c<a.length;c++){var x=this._calspeed(a[c],s[c],l[c]);p.push(x)}return{angle:{at:i,as:n,ae:r,al:o},scale:{st:a,ss:s,se:l,sl:u},angleVX:h,angleVY:d,angleVZ:f,scaleVS:p}}_calspeed(e,t,i){return(i-t)/(e*=1e3)}_findIndex(e,t){for(var i=[],n=0,r=0;r<t.length;r++)n+=t[r],i.push(n);var o=0;for(r=0;r<i.length;r++)if(e<i[r]){o=r;break}return o}_removeEffectFromScene(e){WebGLPlot$e.defined(this._timer)&&clearInterval(this._timer),WebGLPlot$e.defined(this._dynamicModel)&&e.primitives.contains(this._dynamicModel)&&e.primitives.remove(this._dynamicModel),this._dynamicModel=null}_createDynamicModel(){if(!(WebGLPlot$e.defined(this._geoEntityParameter)&&WebGLPlot$e.defined(this._pntOffset)&&WebGLPlot$e.defined(this._angleTimes)&&WebGLPlot$e.defined(this._scaleTimes)))return null;var e=_0xf52e1d.calcControlPosMatrix(this._geoEntityParameter,this._pntOffset,scene);return WebGLPlot$e.defined(e)?new WebGLPlot$e.Model.fromGltf({url:this._dynamicModelUrl,modelMatrix:e,allowPicking:!0}):null}}const _0x35a8ca=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x49ecc0=_0x35a8ca(void 0,(function(){return _0x49ecc0.toString().search("(((.+)+)+)+$").toString().constructor(_0x49ecc0).search("(((.+)+)+)+$")}));_0x49ecc0();const _0x165a1c={AXES:0,STREAMER:1,WALL:2};var _0x51a685=Object.freeze(_0x165a1c);const _0x55c0ea=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x789444=_0x55c0ea(void 0,(function(){return _0x789444.toString().search("(((.+)+)+)+$").toString().constructor(_0x789444).search("(((.+)+)+)+$")}));_0x789444();class _0x297e6a extends _0x1b7397{constructor(e){super(e),e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._UUID="GeoEntityEffectTrackline"+WebGLPlot.createGuid(),this._pntOffset=WebGLPlot.defaultValue(e.pntOffset,new _0x23de81(0,-.5,.5)),this._type=_0xaadec6.TRACKLINE,this._name=WebGLPlot.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._trackType=_0x51a685.AXES,this._initialColor=WebGLPlot.defaultValue(e.initialColor,WebGLPlot.Color.RED),this._lineWidth=WebGLPlot.defaultValue(e.lineWidth,1),this._streamerWidth=WebGLPlot.defaultValue(e.streamerWidth,1),this._showPntCount=WebGLPlot.defaultValue(e.showPntCount,500),this._aryGradientColors=WebGLPlot.defaultValue(e.aryGradientColors,[]),this._pntsTmp=[],this._wallCollection=null,this._polylineCollection=null,this._polygonCollection=null,this._appearance=new WebGLPlot.PerInstanceColorAppearance}setTrackType(e){this._trackType!==e&&(this._trackType=e,this._initialized=!1)}getTrackType(){return this._trackType}setTrackColor(e){this._initialColor=e}getTrackColor(){return this._initialColor}setLineWidth(e){this._lineWidth!==e&&(this._lineWidth=e,this._initialized=!1)}getLineWidth(){return this._lineWidth}setStreamerWidth(e){this._streamerWidth!==e&&(this._streamerWidth=e,this._initialized=!1)}getStreamerWidth(){return this._streamerWidth}setShowPntCount(e){this._showPntCount=e}getShowPntCount(){return this._showPntCount}setGradients(e){this._aryGradientColors=e}getGradients(){return this._aryGradientColors}setGeoEntityParameter(e,t){WebGLPlot.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(e.getPosition())&&this._updateTrack(e),this._geoEntityParameter=e}_addEffectToScene(e){this._polylineCollection=new WebGLPlot.PolylineCollection,e.primitives.add(this._polylineCollection),this._wallCollection=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._wallCollection),this._polygonCollection=new WebGLPlot.PrimitiveCollection,e.primitives.add(this._polygonCollection);let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);return WebGLPlot.defined(t)}_removeEffectFromScene(e){WebGLPlot.defined(this._polylineCollection)&&this._polylineCollection.removeAll(),WebGLPlot.defined(this._wallCollection)&&this._wallCollection.removeAll(),WebGLPlot.defined(this._polygonCollection)&&this._polygonCollection.removeAll(),this._pntsTmp=[]}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("trackType")||(e.trackType=this._trackType),e.hasOwnProperty("initialColor")||(e.initialColor=this._initialColor.toCssColorString()),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("streamerWidth")||(e.streamerWidth=this._streamerWidth),e.hasOwnProperty("showPntCount")||(e.showPntCount=this._showPntCount),e.hasOwnProperty("aryGradientColors")||(e.aryGradientColors=[],this._aryGradientColors.forEach((t=>{e.aryGradientColors.push(t.toCssColorString())}))),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),WebGLPlot.toJSON(e)}fromJSON(e){if(!WebGLPlot.defined(e))return;let t=JSON.parse(e);WebGLPlot.defined(t.type)&&(this._type=t.type),WebGLPlot.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot.defined(t.name)&&(this._name=t.name),WebGLPlot.defined(t.trackType)&&(this._trackType=t.trackType),WebGLPlot.defined(t.initialColor)&&(this._initialColor=WebGLPlot.Color.fromCssColorString(t.initialColor)),WebGLPlot.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot.defined(t.streamerWidth)&&(this._streamerWidth=t.streamerWidth),WebGLPlot.defined(t.showPntCount)&&(this._showPntCount=t.showPntCount),WebGLPlot.defined(t.aryGradientColors)&&(this._aryGradientColors=[],t.aryGradientColors.forEach((e=>{this._aryGradientColors.push(WebGLPlot.Color.fromCssColorString(e))}))),WebGLPlot.defined(t.visible)&&(this._visible=t.visible),WebGLPlot.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot.defined(t.offset)&&(WebGLPlot.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x297e6a;return e._name=this._name,e._type=this._type,e._trackType=this._trackType,e._initialColor=this._initialColor.clone(),e._lineWidth=this._lineWidth,e._streamerWidth=this._streamerWidth,e._showPntCount=this._showPntCount,e._aryGradientColors=this._aryGradientColors,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_updateTrack(e){this._trackType===_0x51a685.AXES?this._updateTrackLine(e):this._trackType===_0x51a685.STREAMER?this._updateTrackStreamer(e):this._trackType===_0x51a685.WALL&&this._updateTrackWall(e)}_updateTrackLine(e){if(0==e.getModelScale())return;let t=_0xf52e1d.degreesToCartesian3(_0xf52e1d.calcControlPoint(e,this._pntOffset,this._scene));if(0===this._pntsTmp.length)this._pntsTmp.push(t);else if(1===this._pntsTmp.length){let e=[];e.push(this._pntsTmp[0]),e.push(t),this._polylineCollection.add({positions:e,width:this._lineWidth,material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}})}),this._pntsTmp.push(t)}else{let e=[];for(e.push(this._pntsTmp[1]),e.push(t),this._polylineCollection.add({positions:e,width:this._lineWidth,material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}})}),this._pntsTmp[1]=t;this._polylineCollection.length>this._showPntCount&&this._showPntCount>0;)this._polylineCollection.remove(this._polylineCollection.get(0));for(let e=0,t=0;e<this._polylineCollection.length;e++,t++){let i=(t+1)/this._polylineCollection.length,n=this._calcGradientColor(i),r=this._polylineCollection.get(e);null!=r&&(r.material.uniforms.color=n)}}}_updateTrackStreamer(e){let t=this._streamerWidth/2,i=new _0x23de81(this._pntOffset.x-t,this._pntOffset.y,this._pntOffset.z),n=new _0x23de81(this._pntOffset.x+t,this._pntOffset.y,this._pntOffset.z),r=_0xf52e1d.calcControlPoint(e,i,this._scene),o=_0xf52e1d.calcControlPoint(e,n,this._scene);if(!WebGLPlot.defined(r)||!WebGLPlot.defined(o))return;let a=_0xf52e1d.degreesToCartesian3(r),s=_0xf52e1d.degreesToCartesian3(o);if(0===this._pntsTmp.length)this._pntsTmp.push(a),this._pntsTmp.push(s);else if(2===this._pntsTmp.length){let e=[];e.push(this._pntsTmp[0]),e.push(a),e.push(s),e.push(this._pntsTmp[1]),e.push(this._pntsTmp[0]),this._polygonCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(e),perPositionHeight:!0}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp.push(a),this._pntsTmp.push(s)}else{let e=[];for(e.push(this._pntsTmp[2]),e.push(a),e.push(s),e.push(this._pntsTmp[3]),e.push(this._pntsTmp[2]),this._polygonCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(e),perPositionHeight:!0}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp[2]=a,this._pntsTmp[3]=s;this._polygonCollection.length>this._showPntCount&&this._showPntCount>0;)this._polygonCollection.remove(this._polygonCollection.get(0));for(let e=0,t=0;e<this._polygonCollection.length;e++,t++){let i=(t+1)/this._polygonCollection.length,n=this._calcGradientColor(i),r=this._polygonCollection.get(e);null!=r&&(r.appearance.material.uniforms.color=n)}}}_updateTrackWall(e){let t=_0xf52e1d.degreesToCartesian3(e.getPosition());if(0===this._pntsTmp.length)this._pntsTmp.push(t);else if(1===this._pntsTmp.length){let e=[];e.push(this._pntsTmp[0]),e.push(t),this._wallCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.WallGeometry({positions:e}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp.push(t)}else{let e=[];for(e.push(this._pntsTmp[1]),e.push(t),this._wallCollection.add(new WebGLPlot.Primitive({geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.WallGeometry({positions:e}),materialSupport:WebGLPlot.MaterialAppearance.MaterialSupport.BASIC.vertexFormat}),appearance:new WebGLPlot.MaterialAppearance({material:new WebGLPlot.Material({fabric:{type:"Color",uniforms:{color:this._initialColor}}}),faceForward:!0})})),this._pntsTmp[1]=t;this._wallCollection.length>this._showPntCount&&this._showPntCount>0;)this._wallCollection.remove(this._wallCollection.get(0));for(let e=0,t=0;e<this._wallCollection.length;e++,t++){let i=(t+1)/this._wallCollection.length,n=this._calcGradientColor(i),r=this._wallCollection.get(e);null!=r&&(r.appearance.material.uniforms.color=n)}}}_calcGradientColor(e){let t=this._initialColor;if(this._aryGradientColors.length>0){let i=this._aryGradientColors.slice().reverse(),n=i.length-1,r=1;for(;r/n<=e&&r<n;)r++;let o=r-1,a=o/n,s=i[o],l=i[o+1];if(e===a)t=new WebGLPlot.Color(s.r,s.g,s.b,s.a);else{let i=(e-a)*n,r=s.red+(l.red-s.red)*i,o=s.green+(l.green-s.green)*i,u=s.blue+(l.blue-s.blue)*i,c=s.alpha+(l.alpha-s.alpha)*i;t=new WebGLPlot.Color(r,o,u,c)}}return t}}const _0x153df0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x47f188=_0x153df0(void 0,(function(){return _0x47f188.toString().search("(((.+)+)+)+$").toString().constructor(_0x47f188).search("(((.+)+)+)+$")}));_0x47f188();class _0x42e779 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.ATTACKLINE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAttackline"+WebGLPlot$e.createGuid(),this._visible=WebGLPlot$e.defaultValue(e.visible,!0),this._pathInfo=WebGLPlot$e.defaultValue(e.pathInfo,[{totalLengthProportion:.3,relativeHeight:200},{totalLengthProportion:.5,relativeHeight:100},{totalLengthProportion:.7,relativeHeight:300}]),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,-.5,.5)),WebGLPlot$e.defined(e.start)&&(this._start=new WebGLPlot$e.Cartesian3.fromDegrees(e.start.x,e.start.y,e.start.z)),WebGLPlot$e.defined(e.target)&&(this._target=new WebGLPlot$e.Cartesian3.fromDegrees(e.target.x,e.target.y,e.target.z)),this._attactModelPath=WebGLPlot$e.defaultValue(e.attactModelPath,""),this._attactModelScale=WebGLPlot$e.defaultValue(e.attactModelScale,40),this._during=WebGLPlot$e.defaultValue(e.during,5),this._lineWide=WebGLPlot$e.defaultValue(e.lineWide,1),this._lineColor=WebGLPlot$e.defaultValue(e.lineColor,new WebGLPlot$e.Color(0,255,0)),this._Attackline=void 0,this._modelLinePrimitice=void 0,this._ispause=!1,this._isBack=!1,this._isForward=!1,this._isRewind=!1}setPathInfo(e){this._pathInfo=e,this._initialized=!1}getPathInfo(){return this._pathInfo}setStartpoint(e){this._start=e,this._initialized=!1}getStartpoint(){return _0xf52e1d.cartesian3ToDegrees(this._start)}setTargetpoint(e){this._target=e,this._initialized=!1}getTargetpoint(){return _0xf52e1d.cartesian3ToDegrees(this._target)}setAttactModelPath(e){this._attactModelPath=decodeURI(e),this._initialized=!1}getAttactModelPath(){return this._attactModelPath}setAttactModelScale(e){this._attactModelScale=e,this._initialized=!1}getAttactModelScale(){return this._attactModelScale}setDuring(e){this._during=e,this._initialized=!1}getDuring(){return this._during}setLineWide(e){this._lineWide=e,this._initialized=!1}getLineWide(){return this._lineWide}setLineColor(e){this._lineColor=e,this._initialized=!1}getLineColor(){return this._lineColor}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible);let t=[];if(!e.hasOwnProperty("pathInfo")){e.pathInfo=t;for(var i=0;i<this._pathInfo.length;i++)!e.pathInfo.hasOwnProperty("totalLengthProportion")&&!e.pathInfo.hasOwnProperty("relativeHeight")&&e.pathInfo.push({totalLengthProportion:this._pathInfo[i].totalLengthProportion,relativeHeight:this._pathInfo[i].relativeHeight})}return e.hasOwnProperty("start")||(e.start=this._start),e.hasOwnProperty("target")||(e.target=this._target),e.hasOwnProperty("attactModelPath")||(e.attactModelPath=this._attactModelPath),e.hasOwnProperty("attactModelScale")||(e.attactModelScale=this._attactModelScale),e.hasOwnProperty("during")||(e.during=this._during),e.hasOwnProperty("lineWide")||(e.lineWide=this._lineWide),e.hasOwnProperty("lineColor")||(e.lineColor=_0xf52e1d.colorToObject(this._lineColor)),WebGLPlot$e.toJSON(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);if(WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),this._pathInfo=[],WebGLPlot$e.defined(t.pathInfo))for(var i=0;i<t.pathInfo.length;i++)WebGLPlot$e.defined(t.pathInfo[i].totalLengthProportion),WebGLPlot$e.defined(t.pathInfo[i].relativeHeight)&&this._pathInfo.push({totalLengthProportion:t.pathInfo[i].totalLengthProportion,relativeHeight:t.pathInfo[i].relativeHeight});WebGLPlot$e.defined(t.start)&&(this._start=t.start),WebGLPlot$e.defined(t.target)&&(this._target=t.target),WebGLPlot$e.defined(t.attactModelPath)&&(this._attactModelPath=t.attactModelPath),WebGLPlot$e.defined(t.attactModelScale)&&(this._attactModelScale=t.attactModelScale),WebGLPlot$e.defined(t.during)&&(this._during=t.during),WebGLPlot$e.defined(t.lineWide)&&(this._lineWide=t.lineWide),WebGLPlot$e.defined(t.lineColor)&&(this._lineColor=_0xf52e1d.objectToColor(t.lineColor))}clone(){let e=new _0x42e779;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pathInfo=this._pathInfo,e._start=this._start,e._target=this._target,e._attactModelPath=this._attactModelPath,e._attactModelScale=this._attactModelScale,e._during=this._during,e._lineWide=this._lineWide,e._lineColor=this._lineColor.clone(),e._initialized=this._initialized,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e}_addEffectToScene(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return!1;let t=!1,i=this._createAttackline(e);if(!WebGLPlot$e.defined(i))return!1;if(this._Attackline=i,WebGLPlot$e.defined(this._Attackline)){var n=this._start,r=this._target,o=this._pathInfo,a=this._during,s=this._calPoints(n,r,o),l=this._createCurve3D(s),u=this._getAllDistance(l.curvePath3D)/(1e3*a),c=WebGLPlot$e.JulianDate.fromDate(new Date),h=0,d=new WebGLPlot$e.HeadingPitchRoll,f=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west"),p=this._lineColor,_=this._lineWide;this._modelLinePrimitice=e.primitives.add(new WebGLPlot$e.PolylineCollection);var m=l.curvePath3D[0],g=WebGLPlot$e.Cartographic.fromCartesian(m),x=WebGLPlot$e.CesiumMath.toDegrees(g.longitude),y=WebGLPlot$e.CesiumMath.toDegrees(g.latitude),v=g.height;m=[{lon:x,lat:y,height:v}];var $=this;this._ispause,this._isBack,this._isBack,this._isRewind,setInterval((function(){var e,t=WebGLPlot$e.JulianDate.fromDate(new Date),i=1e3*(t.secondsOfDay-c.secondsOfDay);if(c=t,$._ispause)return;e=$._isBack?-u:u,$._isForward&&(h+=2e3*e*1),$._isRewind&&(h-=2e3*e*1);var n=h+i*e*1;h=n;var r=_0xf52e1d.getPositionByDistance(l.curvePath3D,n);let o=r.index;if(!(o>=l.curvePath3D.length||-1==o)){if(o<l.curvePath3D.length-1){var a=l.curvePath3D[o+1];const e=$._getHeading(l.curvePath3D[o],a);e&&(d.heading=e);const t=$._getPitch(l.curvePath3D[o],a);t&&(d.pitch=t)}var s=WebGLPlot$e.Cartographic.fromCartesian(r.point),g=[{lon:WebGLPlot$e.CesiumMath.toDegrees(s.longitude),lat:WebGLPlot$e.CesiumMath.toDegrees(s.latitude),height:s.height}],x=new WebGLPlot$e.Cartesian3.fromDegreesArrayHeights([m[0].lon,m[0].lat,m[0].height,g[0].lon,g[0].lat,g[0].height]),y=new WebGLPlot$e.Matrix4;WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(r.point,d,WebGLPlot$e.Ellipsoid.WGS84,f,y);var v=WebGLPlot$e.Matrix3.fromRotationZ(WebGLPlot$e.CesiumMath.toRadians(180));y=WebGLPlot$e.Matrix4.multiplyByMatrix3(y,v,new WebGLPlot$e.Matrix4),WebGLPlot$e.defined(y)&&WebGLPlot$e.defined($._Attackline)&&($._Attackline.modelMatrix=y,$._modelLinePrimitice.add({positions:x,width:_,material:new WebGLPlot$e.Material.fromType("Color",{color:p})})),m=g}}),30),t=!0}return t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._Attackline)&&WebGLPlot$e.defined(this._modelLinePrimitice)&&(e.primitives.contains(this._Attackline)&&(e.primitives.remove(this._Attackline),this._Attackline=null),e.primitives.contains(this._modelLinePrimitice)&&(e.primitives.remove(this._modelLinePrimitice),this._modelLinePrimitice=null))}setGeoEntityParameter(e,t){this._geoEntityParameter=e}_createAttackline(e){var t,i,n=this._attactModelPath,r=this._pathInfo,o=this._attactModelScale;let a=this._calcControlPoint(this._start,this._geoEntityParameter,this._pntOffset,e),s=this._calcControlPoint(this._target,this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(a)&&!WebGLPlot$e.defined(s))return null;t=_0xf52e1d.getPositionFromModelMatrix(a),i=_0xf52e1d.getPositionFromModelMatrix(s);var l=this._calPoints(t,i,r),u=this._createCurve3D(l),c=new WebGLPlot$e.HeadingPitchRoll;const h=this._getHeading(u.curvePath3D[0],u.curvePath3D[1]);h&&(c.heading=h);const d=this._getPitch(u.curvePath3D[0],u.curvePath3D[1]);d&&(c.pitch=d);var f=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west"),p=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(u.curvePath3D[0],c,WebGLPlot$e.Ellipsoid.WGS84,f);return viewer.scene.primitives.add(WebGLPlot$e.Model.fromGltf({url:n,scale:o,modelMatrix:p}))}_calPoints(e,t,i){var n=[];n.push(e);for(var r=e.x-t.x,o=e.y-t.y,a=e.z-t.z,s=0;s<i.length;s++){var l=i[s].totalLengthProportion,u=new WebGLPlot$e.Cartesian3(e.x-r*l,e.y-o*l,e.z-a*l+i[s].relativeHeight);n.push(u)}return n.push(t),n}_getHeading(e,t){let i=WebGLPlot$e.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$e.Cartesian3.subtract(t,e,new Cesium.Cartesian3),r=WebGLPlot$e.Matrix4.multiplyByPointAsVector(WebGLPlot$e.Matrix4.inverse(i,new WebGLPlot$e.Matrix4),n,new WebGLPlot$e.Cartesian3),o=WebGLPlot$e.Cartesian3.normalize(r,new WebGLPlot$e.Cartesian3),a=Math.atan2(o.y,o.x)-WebGLPlot$e.CesiumMath.PI_OVER_TWO;return WebGLPlot$e.CesiumMath.TWO_PI-WebGLPlot$e.CesiumMath.zeroToTwoPi(a)}_getPitch(e,t){let i=WebGLPlot$e.Transforms.eastNorthUpToFixedFrame(e),n=WebGLPlot$e.Cartesian3.subtract(t,e,new WebGLPlot$e.Cartesian3),r=WebGLPlot$e.Matrix4.multiplyByPointAsVector(WebGLPlot$e.Matrix4.inverse(i,i),n,n);return WebGLPlot$e.Cartesian3.normalize(r,r),WebGLPlot$e.CesiumMath.PI_OVER_TWO-WebGLPlot$e.CesiumMath.acosClamped(r.z)}_getAllDistance(e){let t=0;for(let i=0;i<e.length-1;i++){let n=e[i],r=e[i+1];t+=WebGLPlot$e.Cartesian3.distance(n,r)}return t}_createCurve3D(e){let t=this._getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$e.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new WebGLPlot$e.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_calcControlPoint(e,t,i,n){const r=t.getModelRotate(),o=WebGLPlot$e.HeadingPitchRoll.fromDegrees(r.z,r.x,r.y,new WebGLPlot$e.HeadingPitchRoll),a=_0xf52e1d.degreesToCartesian3(e);let s=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west");const l=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(a,o,WebGLPlot$e.Ellipsoid.WGS84,s),u=t.getModelScale(),c=t.getModelPath(),h=_0xf52e1d.getModelSize({modelPath:c,scene:n});if(!WebGLPlot$e.defined(h))return null;const d=WebGLPlot$e.Cartesian3.fromElements(h.x*i.x*u,h.y*i.y*u,h.z*i.z*u),f=WebGLPlot$e.Matrix4.multiplyByTranslation(l,d,new WebGLPlot$e.Matrix4),p=WebGLPlot$e.HeadingPitchRoll.fromDegrees(0,90,0,new WebGLPlot$e.HeadingPitchRoll),_=WebGLPlot$e.Matrix3.fromHeadingPitchRoll(p,new WebGLPlot$e.Matrix3);return WebGLPlot$e.Matrix4.multiplyByMatrix3(f,_,new WebGLPlot$e.Matrix4)}}const _0x32af59=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x13965d=_0x32af59(void 0,(function(){return _0x13965d.toString().search("(((.+)+)+)+$").toString().constructor(_0x13965d).search("(((.+)+)+)+$")}));_0x13965d();const _0x1ed5fe={ColorMode:0,TextureMode:1};var _0xa16fcf=Object.freeze(_0x1ed5fe);const _0x278aca=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x411935=_0x278aca(void 0,(function(){return _0x411935.toString().search("(((.+)+)+)+$").toString().constructor(_0x411935).search("(((.+)+)+)+$")}));_0x411935();class _0x3cd5dc extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._UUID="GeoEntityEffectScanWave_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new WebGLPlot$e.Cartesian3(0,.5,.5)),this._type=WebGLPlot$e.defaultValue(e.type,_0xaadec6.SCANWAVE),this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._length=WebGLPlot$e.defaultValue(e.length,15),this._width=WebGLPlot$e.defaultValue(e.width,5),this._height=WebGLPlot$e.defaultValue(e.height,3),this._scanAngle=WebGLPlot$e.defaultValue(e.scanAngle,30),this._sectionSlices=WebGLPlot$e.defaultValue(e.sectionSlices,360),this._initRotate=WebGLPlot$e.defaultValue(e.initRotate,new WebGLPlot$e.Cartesian3(90,0,0)),this._repeatCount=WebGLPlot$e.defaultValue(e.repeatCount,8),this._flowSpeed=WebGLPlot$e.defaultValue(e.flowSpeed,3),this._scanAxis=WebGLPlot$e.defaultValue(e.scanAxis,0),this._scanSpeed=WebGLPlot$e.defaultValue(e.scanSpeed,.5),this._picturePath=WebGLPlot$e.defaultValue(e.picturePath,""),this._pictureColorScale=WebGLPlot$e.defaultValue(e.pictureColorScale,5),this._colorBack=WebGLPlot$e.defaultValue(e.colorBack,new WebGLPlot$e.Color(0,1,0,.3)),this._colorBackScale=WebGLPlot$e.defaultValue(e.colorBackScale,1),this._colorForward=WebGLPlot$e.defaultValue(e.colorForward,new WebGLPlot$e.Color(1,1,0,1)),this._colorForwardScale=WebGLPlot$e.defaultValue(e.colorForwardScale,5),this._colorForwardLengthRatio=WebGLPlot$e.defaultValue(e.colorForwardLengthRatio,.08),this._sectionAngle=WebGLPlot$e.defaultValue(e.sectionAngle,360),this._mode=WebGLPlot$e.defaultValue(e.mode,_0xa16fcf.ColorMode),this._scanWavePrimitive=void 0,this._currentRotateDirection=1,this._currentRotateDirectionAngle=0}getLength(){return this._length}setLength(e){this._length=e,this._initialized=!1}getWidth(){return this._width}setWidth(e){this._width=e,this._initialized=!1}getHeight(){return this._height}setHeight(e){this._height=e,this._initialized=!1}getScanAngle(){return this._scanAngle}setScanAngle(e){this._scanAngle=e}getSectionSlices(){return this._sectionSlices}setSectionSlices(e){this._sectionSlices=e,this._initialized=!1}getInitRotate(){return this._initRotate}setInitRotate(e){this._initRotate=e,this._initialized=!1}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getFlowSpeed(){return this._flowSpeed}setFlowSpeed(e){this._flowSpeed=e,this._initialized=!1}getScanAxis(){return this._scanAxis}setScanAxis(e){this._scanAxis=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getPicturePath(){return this._picturePath}setPicturePath(e){this._picturePath=e,this._initialized=!1}getPictureColorScale(){return this._pictureColorScale}setPictureColorScale(e){this._pictureColorScale=e,this._initialized=!1}getColorBack(){return this._colorBack}setColorBack(e){this._colorBack=e,this._initialized=!1}getColorBackScale(){return this._colorBackScale}setColorBackScale(e){this._colorBackScale=e,this._initialized=!1}getColorForward(){return this._colorForward}setColorForward(e){this._colorForward=e,this._initialized=!1}getColorForwardScale(){return this._colorForwardScale}setColorForwardScale(e){this._colorForwardScale=e,this._initialized=!1}getColorForwardLengthRatio(){return this._colorForwardLengthRatio}setColorForwardLengthRatio(e){this._colorForwardLengthRatio=e,this._initialized=!1}getSectionAngle(){return this._sectionAngle}setSectionAngle(e){this._sectionAngle=e,this._initialized=!1}getMode(){return this._mode}setMode(e){this._mode=e,this._initialized=!1}_addEffectToScene(e){let t=!1;return this._scanWavePrimitive=this._createScanWavePrimitive(e),WebGLPlot$e.defined(this._scanWavePrimitive)&&(e.primitives.add(this._scanWavePrimitive),t=!0),t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._scanWavePrimitive)&&e.primitives.contains(this._scanWavePrimitive)&&e.primitives.remove(this._scanWavePrimitive),this._scanWavePrimitive=void 0}_executeFunction(e){if(!WebGLPlot$e.defined(this._scanWavePrimitive)||!this._visible||this._scanAngle<=0)return;let t=this._scanAngle/2;(this._currentRotateDirectionAngle>t||this._currentRotateDirectionAngle<-t)&&(this._currentRotateDirection=-this._currentRotateDirection);let i=this._scanSpeed*this._currentRotateDirection;this._currentRotateDirectionAngle+=i;let n=this._getRotateMatrix(i);this._scanWavePrimitive.modelMatrix=WebGLPlot$e.Matrix4.multiplyByMatrix3(this._scanWavePrimitive.modelMatrix,n,new WebGLPlot$e.Matrix4)}_getRotateMatrix(e){let t;return 0===this._scanAxis?t=WebGLPlot$e.Matrix3.fromRotationX(WebGLPlot$e.CesiumMath.toRadians(e)):1===this._scanAxis?t=WebGLPlot$e.Matrix3.fromRotationY(WebGLPlot$e.CesiumMath.toRadians(e)):2===this._scanAxis&&(t=WebGLPlot$e.Matrix3.fromRotationZ(WebGLPlot$e.CesiumMath.toRadians(e))),t}_createScanWavePrimitive(e){this._currentRotateDirection=1,this._currentRotateDirectionAngle=0;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=this._generateGeometry();if(!WebGLPlot$e.defined(i))return;let n,r="";r=this._mode===_0xa16fcf.ColorMode?" uniform vec4 colorForward; uniform float colorForwardScale; uniform vec4 colorBack; uniform float colorBackScale; uniform float repeat; uniform float flowSpeed; uniform float colorForwardLengthRatio; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); float sp = 1.0 / repeat; float dis = materialInput.st.t; float m = mod(dis - fract(czm_frameNumber * 0.001 * flowSpeed), sp); if(m <= sp * colorForwardLengthRatio){ material.diffuse = colorForward.rgb * colorForwardScale; material.alpha = colorForward.a; } else { material.diffuse = colorBack.rgb * colorBackScale; material.alpha = colorBack.a; } return material; }":" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }",n=this._mode===_0xa16fcf.ColorMode?new WebGLPlot$e.Material({fabric:{uniforms:{colorForward:this._colorForward,colorForwardScale:this._colorForwardScale,colorBack:this._colorBack,colorBackScale:this._colorBackScale,repeat:this._repeatCount,flowSpeed:this._flowSpeed,colorForwardLengthRatio:this._colorForwardLengthRatio},source:r},translucent:!0}):new WebGLPlot$e.Material({fabric:{uniforms:{picture:this._picturePath,pictureColorScale:this._pictureColorScale,repeat:new WebGLPlot$e.Cartesian2(1,this._repeatCount),flowSpeed:this._flowSpeed},source:r},translucent:!0});let o=e.frameState;o.scene3DOnly=!0;let a=new WebGLPlot$e.MaterialAppearance({material:n,faceForward:!1,closed:!0,frameState:o});return new WebGLPlot$e.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$e.GeometryInstance({geometry:i}),asynchronous:!1,appearance:a,modelMatrix:t})}_generateGeometry(){let e=this._sectionSlices,t=new Array(3*(e+1)),i=this._sectionAngle/e;for(let n=0;n<e+1;n++)if(0==n)t[3*n]=0,t[3*n+1]=0,t[3*n+2]=0;else{let e=_0xf52e1d.circlePoint(new WebGLPlot$e.Cartesian2(0,0),this._height,this._width,i*n);t[3*n]=e.x,t[3*n+1]=e.y,t[3*n+2]=-this._length}let n=new Float64Array(t),r=WebGLPlot$e.BoundingSphere.fromVertices(t),o=new Array(3*e);for(let t=0;t<e;t++)t==e-1?(o[3*t]=0,o[3*t+1]=t+1,o[3*t+2]=1):(o[3*t]=0,o[3*t+1]=t+1,o[3*t+2]=t+2);this._sectionAngle<360&&o.splice(o.length-3,3);let a=new Uint16Array(o),s=new Array(4*(e+1));for(let t=0;t<e+1;t++)s[4*t]=1,s[4*t+1]=1,s[4*t+2]=1,s[4*t+3]=1;let l=new Array(2*(e+1));if(this._mode===_0xa16fcf.ColorMode)for(let t=0;t<e+1;t++)0==t?(l[2*t]=0,l[2*t+1]=0):(l[2*t]=0,l[2*t+1]=1);else for(let t=0;t<e+1;t++)0==t?(l[2*t]=.5,l[2*t+1]=0):(l[2*t]=1/e/2+1/e*(t-1),l[2*t+1]=1);let u=new WebGLPlot$e.GeometryAttributes;return u.position=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n}),u.color=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:new Float32Array(s)}),u.st=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(l)}),new WebGLPlot$e.Geometry({attributes:u,indices:a,primitiveType:WebGLPlot$e.PrimitiveType.TRIANGLES,boundingSphere:r})}_calcModelMatrix(e,t){let i=WebGLPlot$e.Matrix3.fromRotationX(WebGLPlot$e.CesiumMath.toRadians(t.x));return e=WebGLPlot$e.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$e.Matrix4),i=WebGLPlot$e.Matrix3.fromRotationY(WebGLPlot$e.CesiumMath.toRadians(t.y)),e=WebGLPlot$e.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$e.Matrix4),i=WebGLPlot$e.Matrix3.fromRotationZ(WebGLPlot$e.CesiumMath.toRadians(t.z)),e=WebGLPlot$e.Matrix4.multiplyByMatrix3(e,i,new WebGLPlot$e.Matrix4)}_calcControlPoint(e,t,i){const n=_0xf52e1d.calcControlPosMatrix(e,t,i);if(!WebGLPlot$e.defined(n))return null;const r=WebGLPlot$e.HeadingPitchRoll.fromDegrees(this._initRotate.z,this._initRotate.x,this._initRotate.y,new WebGLPlot$e.HeadingPitchRoll),o=WebGLPlot$e.Matrix3.fromHeadingPitchRoll(r,new WebGLPlot$e.Matrix3);return WebGLPlot$e.Matrix4.multiplyByMatrix3(n,o,new WebGLPlot$e.Matrix4)}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._scanWavePrimitive)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);if(WebGLPlot$e.defined(t)){let e=this._getRotateMatrix(this._currentRotateDirectionAngle);this._scanWavePrimitive.modelMatrix=WebGLPlot$e.Matrix4.multiplyByMatrix3(t,e,new WebGLPlot$e.Matrix4)}}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._length*=t,this._width*=t,this._height*=t,this._initialized=!1}}this._geoEntityParameter=e}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("length")||(e.length=this._length),e.hasOwnProperty("width")||(e.width=this._width),e.hasOwnProperty("height")||(e.height=this._height),e.hasOwnProperty("scanAngle")||(e.scanAngle=this._scanAngle),e.hasOwnProperty("sectionSlices")||(e.sectionSlices=this._sectionAngle),e.hasOwnProperty("initRotate")||(e.initRotate={x:this._initRotate.x,y:this._initRotate.y,z:this._initRotate.z}),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("flowSpeed")||(e.flowSpeed=this._flowSpeed),e.hasOwnProperty("scanAxis")||(e.scanAxis=this._scanAxis),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("picturePath")||(e._picturePath=this._picturePath),e.hasOwnProperty("pictureColorScale")||(e.pictureColorScale=this._pictureColorScale),e.hasOwnProperty("colorBack")||(e.colorBack=_0xf52e1d.colorToObject(this._colorBack)),e.hasOwnProperty("colorBackScale")||(e.colorBackScale=this._colorBackScale),e.hasOwnProperty("colorForward")||(e.colorForward=_0xf52e1d.colorToObject(this._colorForward)),e.hasOwnProperty("colorForwardScale")||(e.colorForwardScale=this._colorForwardScale),e.hasOwnProperty("colorForwardLengthRatio")||(e.colorForwardLengthRatio=this._colorForwardLengthRatio),e.hasOwnProperty("sectionAngle")||(e.sectionAngle=this._sectionAngle),e.hasOwnProperty("mode")||(e.mode=this._mode),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$e.defined(t.length)&&(this._length=t.length),WebGLPlot$e.defined(t.width)&&(this._width=t.width),WebGLPlot$e.defined(t.height)&&(this._height=t.height),WebGLPlot$e.defined(t.scanAngle)&&(this._scanAngle=t.scanAngle),WebGLPlot$e.defined(t.sectionSlices)&&(this._sectionSlices=t.sectionSlices),WebGLPlot$e.defined(t.initRotate)&&(this._initRotate=new WebGLPlot$e.Cartesian3(t.initRotate.x,t.initRotate.y,t.initRotate.z)),WebGLPlot$e.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$e.defined(this.flowSpeed)&&(this._flowSpeed=t.flowSpeed),WebGLPlot$e.defined(t.scanAxis)&&(this._scanAxis=t.scanAxis),WebGLPlot$e.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$e.defined(t.picturePath)&&(this._picturePath=t.picturePath),WebGLPlot$e.defined(t.pictureColorScale)&&(this._pictureColorScale=t.pictureColorScale),WebGLPlot$e.defined(t.colorBack)&&(this._colorBack=_0xf52e1d.objectToColor(t.colorBack)),WebGLPlot$e.defined(t.colorBackScale)&&(this._colorBackScale=t.colorBackScale),WebGLPlot$e.defined(t.colorForward)&&(this._colorForward=_0xf52e1d.objectToColor(t.colorForward)),WebGLPlot$e.defined(t.colorForwardScale)&&(this._colorForwardScale=t.colorForwardScale),WebGLPlot$e.defined(t.colorForwardLengthRatio)&&(this._colorForwardLengthRatio=t.colorForwardLengthRatio),WebGLPlot$e.defined(t.sectionAngle)&&(this._sectionAngle=t.sectionAngle),WebGLPlot$e.defined(t.mode)&&(this._mode=t.mode)}clone(){let e=new _0x3cd5dc;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new WebGLPlot$e.Cartesian3(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._length=this._length,e._width=this._width,e._height=this._height,e._scanAngle=this._scanAngle,e._sectionSlices=this._sectionSlices,e._initRotate=this._initRotate,e._repeatCount=this._repeatCount,e._flowSpeed=this._flowSpeed,e._scanAxis=this._scanAxis,e._scanSpeed=this._scanSpeed,e._picturePath=this._picturePath,e._pictureColorScale=this._pictureColorScale,e._colorBack=this._colorBack.clone(),e._colorBackScale=this._colorBackScale,e._colorForward=this._colorForward.clone(),e._colorForwardScale=this._colorForwardScale,e._colorForwardLengthRatio=this._colorForwardLengthRatio,e._sectionAngle=this._sectionAngle,e._mode=this._mode,e}}const _0x798c14=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x238bc0=_0x798c14(void 0,(function(){return _0x238bc0.toString().search("(((.+)+)+)+$").toString().constructor(_0x238bc0).search("(((.+)+)+)+$")}));_0x238bc0();class _0x236442 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.BURST,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectBurst_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,.5)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._burstDiameter=WebGLPlot$e.defaultValue(e.burstDiameter,50),this._paricleBurst=void 0}setBurstDiameter(e){this._burstDiameter=e,this._initialized=!1}getBurstDiameter(){return this._burstDiameter}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._paricleBurst)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._paricleBurst.emitterModelMatrix=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._burstDiameter*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._paricleBurst=this._createBurstParticle(e),WebGLPlot$e.defined(this._paricleBurst)&&(e.primitives.add(this._paricleBurst),t=!0),t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._paricleBurst)&&e.primitives.contains(this._paricleBurst)&&e.primitives.remove(this._paricleBurst),this._paricleBurst=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("burstDiameter")||(e.burstDiameter=this._burstDiameter),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.burstDiameter)&&(this._burstDiameter=t.burstDiameter),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x236442;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._burstDiameter=this._burstDiameter,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createBurstParticle(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset)||!WebGLPlot$e.defined(this._burstDiameter)||this._burstDiameter<=0)return null;let t=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=this._burstDiameter/1,n=1*i;n<.5&&(n=.5);let r=2*i,o=2*i;return new WebGLPlot$e.ParticleSystem({image:_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/explosion.png",startColor:new Cesium.Color(1,1,1,1),endColor:new Cesium.Color(.5,0,0,0),startScale:1,endScale:.8,minimumParticleLife:.5,maximumParticleLife:1.2,minimumSpeed:r,maximumSpeed:o,imageSize:new WebGLPlot$e.Cartesian2(n,n),emissionRate:300,lifetime:1,bursts:[{time:0,minimum:500,maximum:500},{time:1,minimum:500,maximum:500}],loop:!0,emitterModelMatrix:t,emitter:new Cesium.SphereEmitter(n),sizeInMeters:!0})}_calcControlPoint(e,t,i){let n=_0xf52e1d.calcControlPoint(e,t,i);return WebGLPlot$e.defined(n)?WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(_0xf52e1d.degreesToCartesian3(n),new WebGLPlot$e.HeadingPitchRoll,WebGLPlot$e.Ellipsoid.WGS84,WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west")):null}}const _0x2372e1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3b6372=_0x2372e1(void 0,(function(){return _0x3b6372.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b6372).search("(((.+)+)+)+$")}));_0x3b6372();class _0x458424 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,-.5,.5)),this._type=_0xaadec6.AUGMENT,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAugment_"+WebGLPlot$e.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._augmentPicture=WebGLPlot$e.defaultValue(e.augmentPicture,_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/AugPicture/Augment_Blue.png"),this._pictureWidth=WebGLPlot$e.defaultValue(e.pictureWidth,50),this._pictureHeight=WebGLPlot$e.defaultValue(e.pictureHeight,50),this._minDistanceDisplay=WebGLPlot$e.defaultValue(e.minDistanceDisplay,10),this._maxDistanceDisplay=WebGLPlot$e.defaultValue(e.maxDistanceDisplay,5e4),this._augmentCollection=null,this._augmentGeo=null}setAugmentPicture(e){this._augmentPicture=e,this._initialized=!1}getAugmentPicture(){return this._augmentPicture}setPictureWidth(e){this._pictureWidth=e,this._initialized=!1}getPictureWidth(){return this._pictureWidth}setPictureHeight(e){this._pictureHeight=e,this._initialized=!1}getPictureHeight(){return this._pictureHeight}setMinDistanceDisplay(e){this._minDistanceDisplay=e,this._initialized=!1}getMinDistanceDisplay(){return this._minDistanceDisplay}setMaxDistanceDisplay(e){this._maxDistanceDisplay=e,this._initialized=!1}getMaxDistanceDisplay(){return this._maxDistanceDisplay}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._augmentGeo)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())){let t=_0xf52e1d.degreesToCartesian3(e.getPosition());WebGLPlot$e.defined(t)&&(this._augmentGeo.position=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._pictureWidth*=t,this._pictureHeight*=t,this._initialized=!1}}this._geoEntityParameter=e}_executeFunction(e){if(!WebGLPlot$e.defined(this._augmentGeo)||!WebGLPlot$e.defined(this._geoEntityParameter)||!this._augmentGeo.show)return;let t=Math.abs(WebGLPlot$e.CesiumMath.toDegrees(e.camera.pitch))/90*this._pictureHeight;t!=this._augmentGeo.height&&(this._augmentGeo.height=t)}_addEffectToScene(e){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(this._augmentPicture))return!1;if(!WebGLPlot$e.defined(this._geoEntityParameter))return;let t=_0xf52e1d.degreesToCartesian3(this._geoEntityParameter.getPosition());return this._augmentCollection=e.primitives.add(new WebGLPlot$e.BillboardCollection),this._augmentGeo=this._augmentCollection.add({position:t,image:this._augmentPicture,horizontalOrigin:WebGLPlot$e.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$e.VerticalOrigin.CENTER,distanceDisplayCondition:new WebGLPlot$e.DistanceDisplayCondition(this._minDistanceDisplay,this._maxDistanceDisplay),show:!0,width:this._pictureWidth,height:this._pictureHeight}),!!WebGLPlot$e.defined(this._augmentGeo)}_removeEffectFromScene(e){WebGLPlot$e.defined(this._augmentGeo)&&WebGLPlot$e.defined(this._augmentCollection)&&e.primitives.contains(this._augmentCollection)&&(e.primitives.remove(this._augmentCollection),this._augmentCollection=void 0,this._augmentGeo=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel),e.hasOwnProperty("augmentPicture")||(e.augmentPicture=this._augmentPicture),e.hasOwnProperty("pictureWidth")||(e.pictureWidth=this._pictureWidth),e.hasOwnProperty("pictureHeight")||(e.pictureHeight=this._pictureHeight),e.hasOwnProperty("minDistanceDisplay")||(e.minDistanceDisplay=this._minDistanceDisplay),e.hasOwnProperty("maxDistanceDisplay")||(e.maxDistanceDisplay=this._maxDistanceDisplay),e.hasOwnProperty("visible")||(e.visible=this._visible);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.augmentPicture)&&(this._augmentPicture=t.augmentPicture),WebGLPlot$e.defined(t.pictureWidth)&&(this._pictureWidth=t.pictureWidth),WebGLPlot$e.defined(t.pictureHeight)&&(this._pictureHeight=t.pictureHeight),WebGLPlot$e.defined(t.minDistanceDisplay)&&(this._minDistanceDisplay=t.minDistanceDisplay),WebGLPlot$e.defined(t.maxDistanceDisplay)&&(this._maxDistanceDisplay=t.maxDistanceDisplay),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x458424;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._augmentPicture=this._augmentPicture,e._pictureWidth=this._pictureWidth,e._pictureHeight=this._pictureHeight,e._minDistanceDisplay=this._minDistanceDisplay,e._maxDistanceDisplay=this._maxDistanceDisplay,e}}const _0x7765a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x975dda=_0x7765a(void 0,(function(){return _0x975dda.toString().search("(((.+)+)+)+$").toString().constructor(_0x975dda).search("(((.+)+)+)+$")}));_0x975dda();const _0xf4d434={ScanCone_ARC:0,ScanCone_FLAT:1};var _0x1892f9=Object.freeze(_0xf4d434);const _0x548510=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe5ec3=_0x548510(void 0,(function(){return _0xe5ec3.toString().search("(((.+)+)+)+$").toString().constructor(_0xe5ec3).search("(((.+)+)+)+$")}));_0xe5ec3();class _0x524880 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,.3,.5)),this._type=_0xaadec6.SCANCONE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectScancone_"+WebGLPlot$e.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$e.defaultValue(e.radius,15e3),this._scanHAngle=WebGLPlot$e.defaultValue(e.scanHAngle,50),this._scanVAngle=WebGLPlot$e.defaultValue(e.scanVAngle,30),this._cellAngle=WebGLPlot$e.defaultValue(e.cellAngle,5),this._isFill=WebGLPlot$e.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$e.defaultValue(e.fillColor,new WebGLPlot$e.Color(1,0,0,.3)),this._isOutline=WebGLPlot$e.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$e.defaultValue(e.outlineColor,new WebGLPlot$e.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$e.defaultValue(e.outlineWidth,1),this._scanConeType=WebGLPlot$e.defaultValue(e.scanConeType,_0x1892f9.ScanCone_ARC),this._scanSpeed=WebGLPlot$e.defaultValue(e.scanSpeed,.5),this._pitchAngle=WebGLPlot$e.defaultValue(e.pitchAngle,0),this._scanRange=WebGLPlot$e.defaultValue(e.scanRange,30),this._linePrimitiveCone=null,this._fillPrimitiveCone=null,this._currentScanAngle=0,this._unitScanAngle=1}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._fillPrimitiveCone)||WebGLPlot$e.defined(this._linePrimitiveCone)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=this._calcControlPoint(e,this._pntOffset,new _0x23de81(this._pitchAngle,this._currentScanAngle,0),this._scene);WebGLPlot$e.defined(t)&&(WebGLPlot$e.defined(this._fillPrimitiveCone)&&(this._fillPrimitiveCone.modelMatrix=t),WebGLPlot$e.defined(this._linePrimitiveCone)&&(this._linePrimitiveCone.modelMatrix=t))}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){this._currentScanAngle=0;let t=!1;if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return!1;let i=this._calcControlPoint(this._geoEntityParameter,this._pntOffset,new _0x23de81(this._pitchAngle,0,0),e);return!!WebGLPlot$e.defined(i)&&(this._isOutline&&(this._linePrimitiveCone=this._createLinePrimitiveCone(i),WebGLPlot$e.defined(this._linePrimitiveCone)&&(e.primitives.add(this._linePrimitiveCone),t=!0)),this._isFill&&(this._fillPrimitiveCone=this._createFillPrimitiveCone(i),WebGLPlot$e.defined(this._fillPrimitiveCone)&&(e.primitives.add(this._fillPrimitiveCone),t=!0)),t)}_removeEffectFromScene(e){WebGLPlot$e.defined(this._linePrimitiveCone)&&e.primitives.contains(this._linePrimitiveCone)&&e.primitives.remove(this._linePrimitiveCone),WebGLPlot$e.defined(this._fillPrimitiveCone)&&e.primitives.contains(this._fillPrimitiveCone)&&e.primitives.remove(this._fillPrimitiveCone),this._linePrimitiveCone=null,this._fillPrimitiveCone=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("radius")||(e.radius=this._radius),e.hasOwnProperty("scanHAngle")||(e.scanHAngle=this._scanHAngle),e.hasOwnProperty("scanVAngle")||(e.scanVAngle=this._scanVAngle),e.hasOwnProperty("cellAngle")||(e.cellAngle=this._cellAngle),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),e.hasOwnProperty("outlineWidth")||(e.outlineWidth=this._outlineWidth),e.hasOwnProperty("scanConeType")||(e.scanConeType=this._scanConeType),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("pitchAngle")||(e.pitchAngle=this._pitchAngle),e.hasOwnProperty("scanRange")||(e.scanRange=this._scanRange),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$e.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$e.defined(t.scanHAngle)&&(this._scanHAngle=t.scanHAngle),WebGLPlot$e.defined(t.scanVAngle)&&(this._scanVAngle=t.scanVAngle),WebGLPlot$e.defined(t.cellAngle)&&(this._cellAngle=t.cellAngle),WebGLPlot$e.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$e.defined(t.fillColor)&&(this._fillColor=WebGLPlot$e.Color.fromCssColorString(t.fillColor)),WebGLPlot$e.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$e.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$e.Color.fromCssColorString(t.outlineColor)),WebGLPlot$e.defined(t.outlineWidth)&&(this._outlineWidth=t.outlineWidth),WebGLPlot$e.defined(t.scanConeType)&&(this._scanConeType=t.scanConeType),WebGLPlot$e.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$e.defined(t.pitchAngle)&&(this._pitchAngle=t.pitchAngle),WebGLPlot$e.defined(t.scanRange)&&(this._scanRange=t.scanRange)}clone(){let e=new _0x524880;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._radius=this._radius,e._scanHAngle=this._scanHAngle,e._scanVAngle=this._scanVAngle,e._cellAngle=this._cellAngle,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth,e._scanConeType=this._scanConeType,e._scanSpeed=this._scanSpeed,e._pitchAngle=this._pitchAngle,e._scanRange=this._scanRange,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanHAngle(e){this._scanHAngle=e,this._initialized=!1}getScanHAngle(){return this._scanHAngle}setScanVAngle(e){this._scanVAngle=e,this._initialized=!1}getScanVAngle(){return this._scanVAngle}setCellAngle(e){this._cellAngle=e,this._initialized=!1}getCellAngle(){return this._cellAngle}setIsFill(e){this._isFill=e,this._initialized=!1}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e,this._initialized=!1}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e,this._initialized=!1}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e,this._initialized=!1}getOutlineColor(){return this._outlineColor}setOutlineWidth(e){this._outlineWidth=e,this._initialized=!1}getOutlineWidth(){return this._outlineWidth}setScanConeType(e){this._scanConeType=e,this._initialized=!1}getScanConeType(){return this._scanConeType}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setPitchAngle(e){this._pitchAngle=e,this._initialized=!1}getPitchAngle(){return this._pitchAngle}setScanRange(e){this._scanRange=e}getScanRange(){return this._scanRange}_executeFunction(e){if(!WebGLPlot$e.defined(this._linePrimitiveCone)&&!WebGLPlot$e.defined(this._fillPrimitiveCone)||!this._visible||this._scanRange<=0)return;let t=this._scanRange/2;(this._currentScanAngle>t||this._currentScanAngle<-t)&&(this._unitScanAngle=-this._unitScanAngle);let i=this._scanSpeed*this._unitScanAngle;this._currentScanAngle+=i;let n=WebGLPlot$e.Matrix3.fromRotationZ(WebGLPlot$e.CesiumMath.toRadians(i));WebGLPlot$e.defined(this._linePrimitiveCone)&&(this._linePrimitiveCone.modelMatrix=WebGLPlot$e.Matrix4.multiplyByMatrix3(this._linePrimitiveCone.modelMatrix,n,new WebGLPlot$e.Matrix4)),WebGLPlot$e.defined(this._fillPrimitiveCone)&&(this._fillPrimitiveCone.modelMatrix=WebGLPlot$e.Matrix4.multiplyByMatrix3(this._fillPrimitiveCone.modelMatrix,n,new WebGLPlot$e.Matrix4))}_createFillPrimitiveCone(e){if(!WebGLPlot$e.defined(e))return null;let t=this._createFillGeometry();if(!WebGLPlot$e.defined(t))return null;let i=new WebGLPlot$e.Material({fabric:{type:"Color",uniforms:{color:this._fillColor}},translucent:!0}),n=scene.frameState;n.scene3DOnly=!0;let r=new WebGLPlot$e.MaterialAppearance({material:i,faceForward:!1,closed:!0,frameState:n});return new WebGLPlot$e.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$e.GeometryInstance({geometry:WebGLPlot$e.GeometryPipeline.computeNormal(t)}),asynchronous:!1,modelMatrix:e,appearance:r})}_createLinePrimitiveCone(e){let t=this._outlineWidth,i=this._outlineColor;if(!WebGLPlot$e.defined(e))return null;let n=this._createLineGeometry();return WebGLPlot$e.defined(n)?new WebGLPlot$e.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$e.GeometryInstance({geometry:n,attributes:{show:new WebGLPlot$e.ShowGeometryInstanceAttribute(!0),distanceDisplayCondition:new WebGLPlot$e.DistanceDisplayConditionGeometryInstanceAttribute,color:WebGLPlot$e.ColorGeometryInstanceAttribute.fromColor(i),offset:void 0}}),asynchronous:!1,modelMatrix:e,appearance:new WebGLPlot$e.PerInstanceColorAppearance({flat:!0,translucent:!0,renderState:{lineWidth:t}})}):null}_createFillGeometry(){let e=this._scanConeType,t=this._radius,i=WebGLPlot$e.CesiumMath.toRadians(this._scanVAngle),n=WebGLPlot$e.CesiumMath.toRadians(this._scanHAngle),r=WebGLPlot$e.CesiumMath.toRadians(this._cellAngle);i%r!=0&&(i+=r-i%r),n%r!=0&&(n+=r-n%r);let o=0,a=[],s=0,l=n/r,u=i/r,c=new Array(l*u*6+6*u+6*l),h=[],d=l+1,f=u+1,p=-i/2;for(let i=0;i<f;i++){let n=p+r*i;const o=Math.cos(n)*t,a=Math.sin(n)*t;e==_0x1892f9.ScanCone_ARC?h.push(new WebGLPlot$e.Cartesian2(o,a)):e==_0x1892f9.ScanCone_FLAT&&h.push(new WebGLPlot$e.Cartesian2(t,a))}for(let t=0;t<h.length;t++){const i=h[t];let o=-n/2;for(let t=0;t<d;t++){let n=o+r*t;e==_0x1892f9.ScanCone_ARC?a.push(new WebGLPlot$e.Cartesian3(i.x*Math.cos(n),i.x*Math.sin(n),i.y)):e==_0x1892f9.ScanCone_FLAT&&a.push(new WebGLPlot$e.Cartesian3(i.x,i.x*Math.sin(n),i.y))}}for(let e=0;e<f-1;e++){let t=e*d;for(let e=0;e<d-1;e++)c[s++]=t+e,c[s++]=t+e+1,c[s++]=t+d+e,c[s++]=t+d+e,c[s++]=t+e+1,c[s++]=t+d+e+1}o=a.length;let _=[];for(let e=0;e<f;e++)_.push(a[e*d+d-1]);_.push(new WebGLPlot$e.Cartesian3(0,0,0));for(let e=0;e<f-1;e++)c[s++]=o+(e+1),c[s++]=o+e,c[s++]=o+_.length-1;a=a.concat(_),o=a.length;let m=[];for(let e=0;e<d;e++)m.push(a[e]);m.push(new WebGLPlot$e.Cartesian3(0,0,0));for(let e=0;e<d-1;e++)c[s++]=o+e,c[s++]=o+(e+1),c[s++]=o+m.length-1;a=a.concat(m),o=a.length;let g=[];for(let e=0;e<f;e++)g.push(a[e*d]);g.push(new WebGLPlot$e.Cartesian3(0,0,0));for(let e=0;e<f-1;e++)c[s++]=o+e,c[s++]=o+(e+1),c[s++]=o+g.length-1;a=a.concat(g),o=a.length;let x=[];for(let e=0;e<d;e++)x.push(a[e+(f-1)*d]);x.push(new WebGLPlot$e.Cartesian3(0,0,0));for(let e=0;e<d-1;e++)c[s++]=o+e,c[s++]=o+(e+1),c[s++]=o+x.length-1;a=a.concat(x);let y=this._ptsTransform([a]),v=new Uint16Array(c),$=WebGLPlot$e.BoundingSphere.fromVertices(y),b=new WebGLPlot$e.GeometryAttributes;b.position=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(y)});let T=new Array(y.length/3*2);for(let e=0;e<y.length/3;e+=2)T[e]=1,T[e+1]=1;return b.st=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(T)}),new WebGLPlot$e.Geometry({attributes:b,indices:v,primitiveType:WebGLPlot$e.PrimitiveType.TRIANGLES,boundingSphere:$})}_createLineGeometry(){let e=this._scanConeType,t=this._radius,i=WebGLPlot$e.CesiumMath.toRadians(this._scanVAngle),n=WebGLPlot$e.CesiumMath.toRadians(this._scanHAngle),r=WebGLPlot$e.CesiumMath.toRadians(this._cellAngle);i%r!=0&&(i+=r-i%r),n%r!=0&&(n+=r-n%r);let o=[],a=n/r+1,s=i/r+1,l=[],u=-i/2;for(let i=0;i<s;i++){let n=u+r*i;const o=Math.cos(n)*t,a=Math.sin(n)*t;e==_0x1892f9.ScanCone_ARC?l.push(new WebGLPlot$e.Cartesian2(o,a)):e==_0x1892f9.ScanCone_FLAT&&l.push(new WebGLPlot$e.Cartesian2(t,a))}for(let t=0;t<l.length;t++){const i=l[t];let s=-n/2;for(let t=0;t<a;t++){let n=s+r*t;e==_0x1892f9.ScanCone_ARC?o.push(new WebGLPlot$e.Cartesian3(i.x*Math.cos(n),i.x*Math.sin(n),i.y)):e==_0x1892f9.ScanCone_FLAT&&o.push(new WebGLPlot$e.Cartesian3(i.x,i.x*Math.sin(n),i.y))}}let c=this._ptsTransform([o]),h=a*s,d=WebGLPlot$e.IndexDatatype.createTypedArray(h,4*h+8),f=0,p=h;for(let e=0;e<s;e++)for(let t=0;t<a-1;t++)d[f++]=e*a+t,d[f++]=e*a+t+1;for(let e=0;e<a;e++)for(let t=0;t<s-1;t++)d[f++]=e+t*a,d[f++]=e+(t+1)*a;d[f++]=p,d[f++]=0,d[f++]=p,d[f++]=a-1,d[f++]=p,d[f++]=(s-1)*a,d[f++]=p,d[f++]=s*a-1;let _=new WebGLPlot$e.GeometryAttributes;_.position=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(c)});let m=new Array(c.length/3*2);for(let e=0;e<c.length/3;e+=2)m[e]=1,m[e+1]=1;return _.st=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(m)}),new WebGLPlot$e.Geometry({attributes:_,indices:d,primitiveType:WebGLPlot$e.PrimitiveType.LINES,boundingSphere:WebGLPlot$e.BoundingSphere.fromVertices(c)})}_ptsTransform(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}_calcControlPoint(e,t,i,n){const r=_0xf52e1d.calcControlPosMatrix(e,t,n);if(!WebGLPlot$e.defined(r))return null;const o=WebGLPlot$e.HeadingPitchRoll.fromDegrees(i.y,i.x,i.z,new WebGLPlot$e.HeadingPitchRoll),a=WebGLPlot$e.Matrix3.fromHeadingPitchRoll(o,new WebGLPlot$e.Matrix3);return WebGLPlot$e.Matrix4.multiplyByMatrix3(r,a,new WebGLPlot$e.Matrix4)}}const _0x334a8a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x54bb8c=_0x334a8a(void 0,(function(){return _0x54bb8c.toString().search("(((.+)+)+)+$").toString().constructor(_0x54bb8c).search("(((.+)+)+)+$")}));_0x54bb8c();class _0x570f72 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.DETECTIONCONE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectDetecttoncone"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._bottomRadius=WebGLPlot$e.defaultValue(e.bottomRadius,15e4),this._bottomPosition=e.bottomPosition,this._repeatCount=WebGLPlot$e.defaultValue(e.repeatCount,8),this._colorBack=WebGLPlot$e.defaultValue(e.colorBack,new WebGLPlot$e.Color(0,1,0,.3)),this._colorBackScale=WebGLPlot$e.defaultValue(e.colorBackScale,1),this._colorForward=WebGLPlot$e.defaultValue(e.colorForward,new WebGLPlot$e.Color(1,1,0,1)),this._colorForwardScale=WebGLPlot$e.defaultValue(e.colorForwardScale,5),this._flowSpeed=WebGLPlot$e.defaultValue(e.flowSpeed,3),this._mode=WebGLPlot$e.defaultValue(e.mdoe,_0xa16fcf.ColorMode),this._picturePath=WebGLPlot$e.defaultValue(e.picturePath,""),this._pictureColorScale=WebGLPlot$e.defaultValue(e.pictureColorScale,5),this._speed=WebGLPlot$e.defaultValue(e.speed,.005),this._detecttoncone=void 0,this._currentScale=0}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getFlowSpeed(){return this._flowSpeed}setFlowSpeed(e){this._flowSpeed=e,this._initialized=!1}getPicturePath(){return this._picturePath}setPicturePath(e){this._picturePath=e,this._initialized=!1}getPictureColorScale(){return this._pictureColorScale}setPictureColorScale(e){this._pictureColorScale=e,this._initialized=!1}getColorBack(){return this._colorBack}setColorBack(e){this._colorBack=e,this._initialized=!1}getColorBackScale(){return this._colorBackScale}setColorBackScale(e){this._colorBackScale=e,this._initialized=!1}getColorForward(){return this._colorForward}setColorForward(e){this._colorForward=e,this._initialized=!1}getColorForwardScale(){return this._colorForwardScale}setColorForwardScale(e){this._colorForwardScale=e,this._initialized=!1}setRadius(e){this._bottomRadius=e,this._initialized=!1}getRadius(){return this._bottomRadius}setPosition(e){this._bottomPosition=e,this._initialized=!1}getPosition(){return this._bottomPosition}setSpeed(e){this._speed=e,this._initialized=!1}getSpeed(){return this._speed}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("bottomRadius")||(e.bottomRadius=this._bottomRadius),e.hasOwnProperty("bottomPosition")||(e.bottomPosition={x:this._bottomPosition.x,y:this._bottomPosition.y,z:this._bottomPosition.z}),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("flowSpeed")||(e.flowSpeed=this._flowSpeed),e.hasOwnProperty("picturePath")||(e.picturePath=this._picturePath),e.hasOwnProperty("pictureColorScale")||(e.pictureColorScale=this._pictureColorScale),e.hasOwnProperty("colorBack")||(e.colorBack=this._colorBack.toCssColorString()),e.hasOwnProperty("colorBackScale")||(e.colorBackScale=this._colorBackScale),e.hasOwnProperty("colorForward")||(e.colorForward=this._colorForward.toCssColorString()),e.hasOwnProperty("colorForwardScale")||(e.colorForwardScale=this._colorForwardScale),e.hasOwnProperty("mode")||(e.mode=this._mode),e.hasOwnProperty("speed")||(e.speed=this._speed),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$e.defined(t.bottomRadius)&&(this._bottomRadius=t.bottomRadius),WebGLPlot$e.defined(t.bottomPosition)&&(this._bottomPosition=new _0x23de81(t.bottomPosition.x,t.bottomPosition.y,t.bottomPosition.z)),WebGLPlot$e.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$e.defined(this.flowSpeed)&&(this._flowSpeed=t.flowSpeed),WebGLPlot$e.defined(t.picturePath)&&(this._picturePath=t.picturePath),WebGLPlot$e.defined(t.pictureColorScale)&&(this._pictureColorScale=t.pictureColorScale),WebGLPlot$e.defined(t.colorBack)&&(this._colorBack=WebGLPlot$e.Color.fromCssColorString(t.colorBack)),WebGLPlot$e.defined(t.colorBackScale)&&(this._colorBackScale=t.colorBackScale),WebGLPlot$e.defined(t.colorForward)&&(this._colorForward=WebGLPlot$e.Color.fromCssColorString(t.colorForward)),WebGLPlot$e.defined(t.colorForwardScale)&&(this._colorForwardScale=t.colorForwardScale),WebGLPlot$e.defined(t.mode)&&(this._mode=t.mode),WebGLPlot$e.defined(t.speed)&&(this._speed=t.speed)}clone(){let e=new _0x570f72;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bottomRadius=this._bottomRadius,e._bottomPosition=new _0x23de81(this._bottomPosition.x,this._bottomPosition.y,this._bottomPosition.z),e._repeatCount=this._repeatCount,e._flowSpeed=this._flowSpeed,e._pictureColorScale=this._pictureColorScale,e._colorBack=this._colorBack.clone(),e._colorBackScale=this._colorBackScale,e._colorForward=this._colorForward.clone(),e._colorForwardScale=this._colorForwardScale,e._mode=this._mode,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._speed=this._speed}setGeoEntityParameter(e,t){this._geoEntityParameter=e,this._initialized=!1}_executeFunction(e){!WebGLPlot$e.defined(this._detecttoncone)||!this._visible||this._currentScale>1||(this._currentScale+=this._speed,this._detecttoncone.modelMatrix=WebGLPlot$e.Matrix4.setScale(this._detecttoncone.modelMatrix,new WebGLPlot$e.Cartesian3(this._currentScale,this._currentScale,this._currentScale),new WebGLPlot$e.Matrix4))}_addEffectToScene(e){let t=!1;return this._detecttoncone=this._createDetecttoncone(e),WebGLPlot$e.defined(this._detecttoncone)&&(e.primitives.add(this._detecttoncone),t=!0),t}_removeEffectFromScene(e){WebGLPlot$e.defined(this._detecttoncone)&&e.primitives.contains(this._detecttoncone)&&e.primitives.remove(this._detecttoncone),this._currentScale=0,this._detecttoncone=null}_createDetecttoncone(e){let t;t=null!=this._bottomPosition?_0xf52e1d.degreesToCartesian3(this._bottomPosition):WebGLPlot$e.Cartesian3.fromDegrees(this._geoEntityParameter.getPosition().x,this._geoEntityParameter.getPosition().y,0);let i=this._bottomRadius,n=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(n))return null;n=_0xf52e1d.degreesToCartesian3(n);let r=WebGLPlot$e.Transforms.eastNorthUpToFixedFrame(n);if(r=WebGLPlot$e.Matrix4.setScale(r,new WebGLPlot$e.Cartesian3(.005,.005,.005),new WebGLPlot$e.Matrix4),!WebGLPlot$e.defined(r))return null;let o,a="";a=this._mode===_0xa16fcf.ColorMode?" uniform vec4 colorForward; uniform float colorForwardScale; uniform vec4 colorBack; uniform float colorBackScale; uniform float repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); float sp = 1.0 / repeat; vec2 st = materialInput.st; float dis = distance(st, vec2(0.0, 0.0)); float m = mod(dis - fract(czm_frameNumber * 0.001 * flowSpeed), sp); float a = step(sp / repeat * 0.2, m); if(a == 0.0){ material.diffuse = colorForward.rgb * colorForwardScale; material.alpha = colorForward.a; } else { material.diffuse = colorBack.rgb * colorBackScale; material.alpha = colorBack.a; } return material; }":" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }",o=this._mode===_0xa16fcf.ColorMode?new WebGLPlot$e.Material({fabric:{uniforms:{colorForward:this._colorForward,colorForwardScale:this._colorForwardScale,colorBack:this._colorBack,colorBackScale:this._colorBackScale,repeat:this._repeatCount,flowSpeed:this._flowSpeed},source:a},translucent:!0}):new WebGLPlot$e.Material({fabric:{uniforms:{picture:this._picturePath,pictureColorScale:this._pictureColorScale,repeat:new WebGLPlot$e.Cartesian2(1,this._repeatCount),flowSpeed:this._flowSpeed},source:a},translucent:!0});let s=e.frameState;s.scene3DOnly=!0;let l=_0xf52e1d.degreesToCartesian3(this._geoEntityParameter.getPosition()),u=this._generateGeometry(t,l,i),c=new WebGLPlot$e.GeometryInstance({geometry:u});return new WebGLPlot$e.Primitive({geometryInstances:c,appearance:new WebGLPlot$e.MaterialAppearance({material:o,faceForward:!1,closed:!0,frameState:s}),releaseGeometryInstances:!1,modelMatrix:r,asynchronous:!1})}_create(e){let t=this._geoEntityParameter.getPosition(),i=this._geoEntityParameter.getModelRotate(),n=WebGLPlot$e.HeadingPitchRoll.fromDegrees(i.z,i.x,i.y,new WebGLPlot$e.HeadingPitchRoll),r=this._detecttonconeColor,o=this._geoEntityParameter.getPosition().z,a=WebGLPlot$e.Cartesian3.fromDegrees(t.x,t.y,.5*t.z),s=WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west");const l=WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(a,n,WebGLPlot$e.Ellipsoid.WGS84,s);let u=new WebGLPlot$e.CylinderGeometry({length:o,topRadius:0,bottomRadius:.5*o,vertexFormat:WebGLPlot$e.MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat}),c=new WebGLPlot$e.GeometryInstance({geometry:u,modelMatrix:l,id:"Detecttoncone"});const h=new WebGLPlot$e.Material({fabric:{type:"VtxfShader1",uniforms:{color:r,repeat:30,offset:0,thickness:.3},source:"uniform vec4 color;\n uniform float repeat;\n uniform float offset;\n uniform float thickness;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n float sp = 1.0 / repeat;\n vec2 st = materialInput.st;\n float dis = distance(st,vec2(0.5));\n float m = mod(dis + offset,sp);\n float a = step(sp * (1.0 - thickness), m);\n material.diffuse = color.rgb;\n material.alpha = a*color.a;\n return material;}"},translucent:!1}),d=new WebGLPlot$e.MaterialAppearance({material:h,faceForward:!1,closed:!0});return new WebGLPlot$e.Primitive({geometryInstances:[c],appearance:d})}_generateGeometry(e,t,i){let n=361,r=new Array(1086),o=WebGLPlot$e.Transforms.eastNorthUpToFixedFrame(t),a=WebGLPlot$e.Matrix4.inverse(o,new WebGLPlot$e.Matrix4);WebGLPlot$e.Matrix4.multiplyByPoint(a,t,new WebGLPlot$e.Cartesian3);let s=WebGLPlot$e.Matrix4.multiplyByPoint(a,e,new WebGLPlot$e.Cartesian3),l=this._bottomPosition.z-this._geoEntityParameter.getPosition().z;for(let e=0;e<362;e++)if(0==e)r[3*e]=0,r[3*e+1]=0,r[3*e+2]=0;else{let t=_0xf52e1d.circlePoint(s,i,i,1*e);r[3*e]=t.x,r[3*e+1]=t.y,r[3*e+2]=l}let u=new Float64Array(r),c=WebGLPlot$e.BoundingSphere.fromVertices(r),h=new Array(1083);for(let e=0;e<n;e++)360==e?(h[3*e]=0,h[3*e+1]=e+1,h[3*e+2]=1):(h[3*e]=0,h[3*e+1]=e+1,h[3*e+2]=e+2);h.splice(h.length-3,3);let d=new Uint16Array(h),f=new Array(1448);for(let e=0;e<362;e++)f[4*e]=1,f[4*e+1]=1,f[4*e+2]=1,f[4*e+3]=1;let p=new Array(724);for(let e=0;e<362;e++)0==e?(p[2*e]=0,p[2*e+1]=0):(p[2*e]=1,p[2*e+1]=1);let _=new WebGLPlot$e.GeometryAttributes;return _.position=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),_.color=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:new Float32Array(f)}),_.st=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(p)}),new WebGLPlot$e.Geometry({attributes:_,indices:d,primitiveType:WebGLPlot$e.PrimitiveType.TRIANGLES,boundingSphere:c})}_getRotateMatrix(e){let t;return 0===this._scanAxis?t=WebGLPlot$e.Matrix3.fromRotationX(WebGLPlot$e.CesiumMath.toRadians(e)):1===this._scanAxis?t=WebGLPlot$e.Matrix3.fromRotationY(WebGLPlot$e.CesiumMath.toRadians(e)):2===this._scanAxis&&(t=WebGLPlot$e.Matrix3.fromRotationZ(WebGLPlot$e.CesiumMath.toRadians(e))),t}}const _0x4693d0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x17685f=_0x4693d0(void 0,(function(){return _0x17685f.toString().search("(((.+)+)+)+$").toString().constructor(_0x17685f).search("(((.+)+)+)+$")}));_0x17685f();const _0x361e43={SIMPLE:0,TITLE:1,PICTUREBACKGROUND_WHALE:2,PICTUREBACKGROUND_SCIENCE:3,PICTUREBACKGROUND_FUTURE:4};var _0x1837ea=Object.freeze(_0x361e43);const _0x2b81c7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe69822=_0x2b81c7(void 0,(function(){return _0xe69822.toString().search("(((.+)+)+)+$").toString().constructor(_0xe69822).search("(((.+)+)+)+$")}));_0xe69822();class _0x392050 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,.5)),this._type=_0xaadec6.SIGN,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectSign_"+WebGLPlot$e.createGuid(),this._imagePath=WebGLPlot$e.defaultValue(e.imagePath,""),this._text=WebGLPlot$e.defaultValue(e.text,"飞机"),this._billboardCollection=null,this._signType=WebGLPlot$e.defaultValue(e.signType,_0x1837ea.SIMPLE),this._scale=WebGLPlot$e.defaultValue(e.scale,1)}setImagePath(e){this._imagePath=e,this._initialized=!1}getImagePath(){return this._imagePath}setText(e){this._text=e,this._initialized=!1}getText(){return this._text}setSignType(e){this._signType=e,this._initialized=!1}getSignType(){return this._signType}setScale(e){this._scale=e,this._initialized=!1}getScale(){return this._scale}setGeoEntityParameter(e,t){if(null!=this._billboardCollection&&this._billboardCollection.length>0){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!==e.getShowMode()||e.getShowMode()===_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0xf52e1d.calcControlPoint(e,this._pntOffset,null);WebGLPlot$e.defined(t)&&(t=_0xf52e1d.degreesToCartesian3(t),this._billboardCollection.get(0).position=t)}e.getShowMode()===_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!==e.getModelPath()||this._geoEntityParameter.getModelScale()!==e.getModelScale())&&(this._initialized=!1)}if(WebGLPlot$e.defined(this._geoEntityParameter)){let t=this._geoEntityParameter.getModelScale();this._geoEntityParameter=e,this._bChangeSizeFlowModel||this._geoEntityParameter.setModelScale(t)}else this._geoEntityParameter=e}_addEffectToScene(e){let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);return!!WebGLPlot$e.defined(t)&&(t=_0xf52e1d.degreesToCartesian3(t),this._createSign(e,function(i){if(WebGLPlot$e.defined(this._billboardCollection)||(this._billboardCollection=e.primitives.add(new WebGLPlot$e.BillboardCollection)),0===this._billboardCollection.length&&this._billboardCollection.add({show:!0,position:t,image:i,pixelOffset:new WebGLPlot$e.Cartesian2(0,0),horizontalOrigin:WebGLPlot$e.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$e.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,sizeInMeters:!1,scale:1}),WebGLPlot$e.defined(this._billboardCollection)&&this._billboardCollection.length>0)return this._initialized=!0,!0}.bind(this)),!0)}_removeEffectFromScene(e){WebGLPlot$e.defined(e)&&WebGLPlot$e.defined(this._billboardCollection)&&e.primitives.remove(this._billboardCollection),this._billboardCollection=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("imagePath")||(e.imagePath=this._imagePath),e.hasOwnProperty("text")||(e.text=this._text),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("changeSizeFlowModel")||(e.changeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.imagePath)&&(this._imagePath=t.imagePath),WebGLPlot$e.defined(t.text)&&(this._text=t.text),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.changeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.changeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x392050;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._imagePath=this._imagePath,e._text=this._text,e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e}_createSign(e,t){let i="red",n=30,r=30,o=null;if(this._signType===_0x1837ea.SIMPLE&&"string"!=typeof this._text||this._signType!==_0x1837ea.SIMPLE&&"object"!=typeof this._text)return;if(this._signType===_0x1837ea.SIMPLE){let e={element:$('<div id="simpleSign" class="simpleSign"></div>').get(0),style:".simpleSign {z-index: -1;position: absolute;text-align: center;color: rgb(255, 255, 255);background-color:rgb(255,0,0,0.5);border:2px solid red;}"},t=e.element;document.body.appendChild(t);let i=document.createElement("style");i.innerHTML=e.style,document.getElementsByTagName("head").item(0).appendChild(i),t.id=Math.random().toString(15).slice(2,15),t.append(this._text),o=t}else if(this._signType===_0x1837ea.TITLE){let e={element:$('<div id="titleSign" class="titleSign"><div class="titleSignContent-wrapper"><div id="titleSignContent" class="titleSignContent"></div></div></div>').get(0),style:".titleSign {z-index: -1;position: absolute;border:2px solid rgb(0,160,233);padding:0.1px;border-bottom: 2px solid rgb(0,255,0);}.titleSignContent-wrapper {max-height: 200px;overflow-y: auto;text-align: left;/*border-radius: 6px;*/background-color:rgb(164,255,176,0.5);padding: 5px;padding-top: 8px;}.titleSignContent {/* margin: 5px 20px;*/line-height: 0.5;font-size:xx-small;font-weight:normal;}.titleSignContent div {text-align: center;color: rgb(226, 249, 46);}.titleSignContent div {line-height: 1;}.titleSignContent table {margin-left: 2px;margin-right: 2px;color: rgb(238, 154, 78);}.titleSignContent table tr {height: 15px;}"};i="green";let t=e.element;document.body.appendChild(t);let n=document.createElement("style");n.innerHTML=e.style,document.getElementsByTagName("head").item(0).appendChild(n);let r="";for(let e in this._text)"title"===e?r="<div>"+this._text[e]+"</div><table><tbody>":r+="<tr><td>"+e+": </th><td>"+this._text[e]+"</td></tr>";r+="</tbody></table>",t.id=Math.random().toString(15).slice(2,15),$("#titleSignContent").append(r),$("#titleSignContent").get(0).id=Math.random().toString(15).slice(2,15),o=t}else if(this._signType===_0x1837ea.PICTUREBACKGROUND_WHALE||this._signType===_0x1837ea.PICTUREBACKGROUND_SCIENCE||this._signType===_0x1837ea.PICTUREBACKGROUND_FUTURE){let e=_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/鲸鱼.png",t="padding: 20px;padding-right: 45px;";i="#8b9ec6",this._signType===_0x1837ea.PICTUREBACKGROUND_SCIENCE?(e=_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/科技.png",n=36,r=20,t="padding: 20px",i="#1cd0fd"):this._signType===_0x1837ea.PICTUREBACKGROUND_FUTURE&&(e=_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Sign/未来.png",n=45,r=0,t="padding: 20px;padding-top: 55px;padding-bottom: 55px",i="#1cd0fd");let a={element:$('<div id="pictureSign" class="pictureSign"><div class="pictureSign-wrapper"><div id="pictureSignContent" class="pictureSignContent"></div></div></div>').get(0),style:".pictureSign {z-index: -1;position: absolute;background-image: url("+e+");background-size: 100% 100%;"+t+"}.pictureSign-wrapper {max-height: 200px;overflow-y: auto;text-align: left;}.pictureSignContent {line-height: 0.5;font-size:xx-small;font-weight:normal;}.pictureSignContent div {text-align: center;color: rgb(0, 255, 0);}.pictureSignContent div {line-height: 1;}.pictureSignContent table {margin-left: 2px;margin-right: 2px;color: rgb(238, 154, 78);}.pictureSignContent table tr {height: 15px;}"},s=a.element;document.body.appendChild(s);let l=document.createElement("style");l.innerHTML=a.style,document.getElementsByTagName("head").item(0).appendChild(l);let u="";for(let e in this._text)"title"===e?u="<div>"+this._text[e]+"</div><table><tbody>":u+="<tr><td>"+e+": </th><td>"+this._text[e]+"</td></tr>";u+="</tbody></table>",s.id=Math.random().toString(15).slice(2,15),$("#pictureSignContent").append(u),$("#pictureSignContent").get(0).id=Math.random().toString(15).slice(2,15),o=s}let a=o.offsetWidth,s=o.offsetHeight+r,l=document.createElement("canvas");l.width=a*this._scale,l.height=s*this._scale,l.style.width=a+"px",l.style.height=s+"px";let u=l.getContext("2d");u.scale(this._scale,this._scale),u.beginPath(),u.moveTo(a/2,s-n),u.lineTo(a/2,s),u.strokeStyle=i,u.stroke();let c={backgroundColor:null,useCORS:!0,allowTaint:!1,canvas:l,width:a,height:s,foreignObjectRendering:!0,tainTest:!1,scale:this._scale};_0x4a4fab(o,c).then((function(e){let i=new Image;i.src=e.toDataURL("image/png",1),document.body.removeChild(o),"function"==typeof t&&t(i)}))}}const _0x12b23a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xeae18=_0x12b23a(void 0,(function(){return _0xeae18.toString().search("(((.+)+)+)+$").toString().constructor(_0xeae18).search("(((.+)+)+)+$")}));_0xeae18();class _0x597b34 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this._pntOffset=WebGLPlot.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._type=_0xaadec6.ANNULARDIFFUSION,this._name=WebGLPlot.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type})),this._UUID="GeoEntityEffectAnnularDiffusion_"+WebGLPlot.createGuid(),this._bChangeSizeFlowModel=WebGLPlot.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot.defaultValue(e.radius,1e3),this._scanColor=WebGLPlot.defaultValue(e.scanColor,new WebGLPlot.Color(1,0,0,1)),this._scanSpeed=WebGLPlot.defaultValue(e.scanSpeed,5),WebGLPlot.defined(e.repeat)?this.setRepeat(e.repeat):this._repeat=1,this._diffusionPrimitive=void 0}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanColor(e){this._scanColor=e,this._initialized=!1}getScanColor(){return this._scanColor}setRepeat(e){let t=parseInt(e);t<1?t=1:t>5&&(t=5),this._repeat=t,this._initialized=!1}getRepeat(){return this._repeat}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setGeoEntityParameter(e,t){if(WebGLPlot.defined(this._diffusionPrimitive)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()||e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())){let t=_0xf52e1d.calcControlPosMatrix(e,this._pntOffset,this._scene);WebGLPlot.defined(t)&&(this._initialized=!1)}if(e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;return this._diffusionPrimitive=this._createAnnularDiffusion(e),WebGLPlot.defined(this._diffusionPrimitive)&&(e.primitives.add(this._diffusionPrimitive),t=!0),t}_removeEffectFromScene(e){WebGLPlot.defined(this._diffusionPrimitive)&&e.primitives.contains(this._diffusionPrimitive)&&e.primitives.remove(this._diffusionPrimitive),this._diffusionPrimitive=null}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("radius")||(e.radius=this._radius),e.hasOwnProperty("scanColor")||(e.scanColor=this._scanColor.toCssColorString()),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("repeat")||(e.repeat=this._repeat),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);return e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot.defined(e))return;let t=JSON.parse(e);WebGLPlot.defined(t.type)&&(this._type=t.type),WebGLPlot.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot.defined(t.name)&&(this._name=t.name),WebGLPlot.defined(t.radius)&&(this._radius=t.radius),WebGLPlot.defined(t.scanColor)&&(this._scanColor=WebGLPlot.Color.fromCssColorString(t.scanColor)),WebGLPlot.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot.defined(t.repeat)&&(this._repeat=t.repeat),WebGLPlot.defined(t.visible)&&(this._visible=t.visible),WebGLPlot.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot.defined(t.offset)&&(WebGLPlot.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z))}clone(){let e=new _0x597b34;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._radius=this._radius,e._scanColor=this._scanColor.clone(),e._scanSpeed=this._scanSpeed,e._repeat=this._repeat,e}_createAnnularDiffusion(){if(!WebGLPlot.defined(this._geoEntityParameter)||!WebGLPlot.defined(this._pntOffset)||!WebGLPlot.defined(this._radius))return null;let e=_0xf52e1d.calcControlPosMatrix(this._geoEntityParameter,this._pntOffset,scene);if(!WebGLPlot.defined(e))return null;let t=_0xf52e1d.getPositionFromModelMatrix(e);let i=new WebGLPlot.Material({fabric:{type:"MyAnnularDiffusion",uniforms:{color:this._scanColor,speed:this._scanSpeed,count:this._repeat,gradient:.2},source:"uniform vec4 color;\n uniform float speed;\n uniform float count;\n uniform float gradient;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(czm_frameNumber * speed / 1000.0);\n vec3 str = materialInput.str;\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = 0.0;\n for(int i = 0; i <= 5; i++){\n if(float(i) <= count){\n disNum = perDis * float(i) - dis + per / count;\n if(disNum > 0.0){\n if(disNum < perDis){\n bl = 1.0 - disNum / perDis;\n } else if(disNum - perDis < perDis){\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl,(1.0 + 10.0 * (1.0 - gradient)));\n }\n }\n }\n }\n return material;\n }"}});return new WebGLPlot.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot.GeometryInstance({geometry:new WebGLPlot.EllipseGeometry({center:_0xf52e1d.degreesToCartesian3(t),semiMajorAxis:this._radius,semiMinorAxis:this._radius,height:t.z})}),appearance:new WebGLPlot.EllipsoidSurfaceAppearance({material:i})})}}var _0x1c4ae4=(_0x3957f8=!0,function(e,t){var i=_0x3957f8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3957f8=!1,i}),_0x4cccb7=_0x1c4ae4(void 0,(function(){return _0x4cccb7.toString().search("(((.+)+)+)+$").toString().constructor(_0x4cccb7).search("(((.+)+)+)+$")})),_0x3957f8;_0x4cccb7();var _0x2b898b={UNKNOW:0,BASICLINE:1,DASHLINE:2,METEORLINE:3,TUBULAR:4,ARROW:5},_0x2f1f44=Object.freeze(_0x2b898b);const _0x26f345=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x18bab6=_0x26f345(void 0,(function(){return _0x18bab6.toString().search("(((.+)+)+)+$").toString().constructor(_0x18bab6).search("(((.+)+)+)+$")}));_0x18bab6();class _0x33a928 extends _0x1b7397{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.COMMUNICATIONLINK,this._linkType=_0x2f1f44.UNKNOW,this._UUID=WebGLPlot$e.createGuid(),this._bChangeSizeFlowModel=!1,this._startUUID=WebGLPlot$e.defaultValue(e.startUUID,""),this._endUUID=WebGLPlot$e.defaultValue(e.endUUID,""),this._startOffset=WebGLPlot$e.defaultValue(e.startOffset,new _0x23de81(0,0,.5)),this._endOffset=WebGLPlot$e.defaultValue(e.endOffset,new _0x23de81(0,0,.5)),this._maxVisibleDistance=WebGLPlot$e.defaultValue(e.maxVisibleDistance,-1),this._linkPrimitive=void 0,this._pntStart=void 0,this._pntEnd=void 0}getLinkType(){return this._linkType}setStartUUID(e){this._startUUID=e}getStartUUID(){return this._startUUID}setEndUUID(e){this._endUUID=e}getEndUUID(){return this._endUUID}setStartOffset(e){this._startOffset=e}getStartOffset(){return this._startOffset}setEndOffset(e){this._endOffset=e}getEndOffset(){return this._endOffset}setMaxVisibleDistance(e){this._maxVisibleDistance=e}getMaxVisibleDistance(){return this._maxVisibleDistance}_executeFunction(e){if(WebGLPlot$e.defined(this._pntStart)&&WebGLPlot$e.defined(this._pntEnd)&&this._visible){let t=WebGLPlot$e.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),i=WebGLPlot$e.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z),n=Math.sqrt(WebGLPlot$e.Cartesian3.distanceSquared(t,i)),r=!0;-1!=this._maxVisibleDistance&&(r=n<=this._maxVisibleDistance),r&&!WebGLPlot$e.defined(this._linkPrimitive)?this._addEffectToScene(e):!r&&WebGLPlot$e.defined(this._linkPrimitive)&&this._removeEffectFromScene(e)}}}const _0x580857=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2f1834=_0x580857(void 0,(function(){return _0x2f1834.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f1834).search("(((.+)+)+)+$")}));_0x2f1834();class _0x4ec5ba extends _0x33a928{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._linkType=_0x2f1f44.BASICLINE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="BasicLineCommunicationLink_"+WebGLPlot$e.createGuid(),this._speedV=WebGLPlot$e.defaultValue(e.speedV,5),this._lineWidth=WebGLPlot$e.defaultValue(e.lineWidth,1),this._signalLengthRatio=WebGLPlot$e.defaultValue(e.signalLengthRatio,.15),this._signalColor=WebGLPlot$e.defaultValue(e.signalColor,new WebGLPlot$e.Color(.21,1,.027,.78)),this._linkLineColor=WebGLPlot$e.defaultValue(e.linkLineColor,new WebGLPlot$e.Color(.92,.92,.92,.19)),this._bBothWay=WebGLPlot$e.defaultValue(e.bBothWay,!0),this._polylineCollection=void 0,this._linkPrimitive=void 0,this._direct=1;let t=this;this._executeAni=function(e,i){if(!WebGLPlot$e.defined(t._linkPrimitive)||!WebGLPlot$e.defined(t._polylineCollection))return;let n=.001*t._speedV,r=t._linkPrimitive.material.uniforms.start;t._bBothWay?(r<=0&&(t._direct=1),r+t._signalLengthRatio>=1&&(t._direct=-1),r+=n*t._direct):r>.8?r=0:r+=n,t._linkPrimitive.material.uniforms.start=r}}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0xf52e1d.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$e.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0xf52e1d.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$e.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$e.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x1b8e09.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$e.defined(t)&&(this._pntStart=_0xf52e1d.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x1b8e09.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$e.defined(i)&&(this._pntEnd=_0xf52e1d.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$e.defined(this._pntStart)||!WebGLPlot$e.defined(this._pntEnd))return!1;let n=new WebGLPlot$e.Material({fabric:{type:"MyBaseLineMaterial",uniforms:{color:this._signalColor,color1:this._linkLineColor,start:0,signalLengthRatio:this._signalLengthRatio},source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; \n if(st.s > start && st.s < start + signalLengthRatio){ material.diffuse = color.rgb; \n material.alpha = color.a; \n }\n else{\n material.diffuse = color1.rgb; \n material.alpha = color1.a; \n }\n return material;\n }"}});this._polylineCollection=new WebGLPlot$e.PolylineCollection;let r=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(r),width:this._lineWidth,material:n});let o=!1;return WebGLPlot$e.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),e.preUpdate.addEventListener(this._executeAni),o=!0),o}_removeEffectFromScene(e){WebGLPlot$e.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.preUpdate.removeEventListener(this._executeAni),e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("signalLengthRatio")||(e.signalLengthRatio=this._signalLengthRatio),e.hasOwnProperty("signalColor")||(e.signalColor=this._signalColor.toCssColorString()),e.hasOwnProperty("linkLineColor")||(e.linkLineColor=this._linkLineColor.toCssColorString()),e.hasOwnProperty("bBothWay")||(e.bBothWay=this._bBothWay),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$e.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$e.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$e.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$e.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$e.defined(t.signalLengthRatio)&&(this._signalLengthRatio=t.signalLengthRatio),WebGLPlot$e.defined(t.signalColor)&&(this._signalColor=WebGLPlot$e.Color.fromCssColorString(t.signalColor)),WebGLPlot$e.defined(t.linkLineColor)&&(this._linkLineColor=WebGLPlot$e.Color.fromCssColorString(t.linkLineColor)),WebGLPlot$e.defined(t.bBothWay)&&(this._bBothWay=t.bBothWay),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.startOffset)&&(WebGLPlot$e.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$e.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$e.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$e.defined(t.endOffset)&&(WebGLPlot$e.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$e.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$e.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x4ec5ba;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x23de81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x23de81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._signalLengthRatio=this._signalLengthRatio,e._signalColor=WebGLPlot$e.Color.clone(this._signalColor),e._linkLineColor=WebGLPlot$e.Color.clone(this._linkLineColor),e._bBothWay=this._bBothWay,e}setSpeedV(e){this._speedV=e}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setSignalLengthRatio(e){this._signalLengthRatio=e,this._initialized=!1}getSignalLengthRatio(){return this._signalLengthRatio}setSignalColor(e){this._signalColor=e,this._initialized=!1}getSignalColor(){return this._signalColor}setLinkLineColor(e){this._linkLineColor=e,this._initialized=!1}getLinkLineColor(){return this._linkLineColor}setbBothWay(e){this._bBothWay=e}getbBothWay(){return this._bBothWay}}const _0x12e083=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2d83a5=_0x12e083(void 0,(function(){return _0x2d83a5.toString().search("(((.+)+)+)+$").toString().constructor(_0x2d83a5).search("(((.+)+)+)+$")}));_0x2d83a5();class _0x2d907f extends _0x33a928{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._linkType=_0x2f1f44.ARROW,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="ArrowCommunicationLink_"+WebGLPlot$e.createGuid(),this._speedV=WebGLPlot$e.defaultValue(e.speedV,1),this._lineWidth=WebGLPlot$e.defaultValue(e.lineWidth,5),this._repeatCount=WebGLPlot$e.defaultValue(e.repeatCount,50),this._arrowImage=WebGLPlot$e.defaultValue(e.arrowImage,_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/Arrow.png"),this._polylineCollection=null,this._linkPrimitive=void 0}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0xf52e1d.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$e.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0xf52e1d.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$e.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$e.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x1b8e09.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$e.defined(t)&&(this._pntStart=_0xf52e1d.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x1b8e09.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$e.defined(i)&&(this._pntEnd=_0xf52e1d.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$e.defined(this._pntStart)||!WebGLPlot$e.defined(this._pntEnd))return!1;let n=new WebGLPlot$e.Material({fabric:{type:"MyArrowImage",uniforms:{image:this._arrowImage,repeat:new WebGLPlot$e.Cartesian2(this._repeatCount,1),time:this._speedV},source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = repeat * materialInput.st;\n vec4 colorImage = texture2D(image, vec2(fract(st.s - czm_frameNumber * time * 0.005), st.t));\n material.alpha = colorImage.a;\n material.diffuse = colorImage.rgb;\n return material;\n }"}});this._polylineCollection=new WebGLPlot$e.PolylineCollection;let r=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(r),width:this._lineWidth,material:n});let o=!1;return WebGLPlot$e.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),o=!0),o}_removeEffectFromScene(e){WebGLPlot$e.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("arrowImage")||(e.arrowImage=this._arrowImage),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$e.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$e.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$e.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$e.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$e.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$e.defined(t.arrowImage)&&(this._arrowImage=t.arrowImage),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.startOffset)&&(WebGLPlot$e.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$e.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$e.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$e.defined(t.endOffset)&&(WebGLPlot$e.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$e.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$e.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x2d907f;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x23de81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x23de81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._repeatCount=this._repeatCount,e._arrowImage=this._arrowImage,e}setSpeedV(e){this._speedV=e,this._initialized=!1}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setRepeatCount(e){this._repeatCount=e,this._initialized=!1}getRepeatCount(){return this._repeatCount}setArrowImage(e){this._arrowImage=e,this._initialized=!1}getArrowImage(){return this._arrowImage}}const _0x1b6bac=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe61de3=_0x1b6bac(void 0,(function(){return _0xe61de3.toString().search("(((.+)+)+)+$").toString().constructor(_0xe61de3).search("(((.+)+)+)+$")}));_0xe61de3();class _0x2e6536 extends _0x33a928{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._linkType=_0x2f1f44.TUBULAR,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="TubularCommunicationLink_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,.5)),!WebGLPlot$e.defined(e.sectionSlices)||e.sectionSlices<3||e.sectionSlices>128?this._sectionSlices=60:this._sectionSlices=e.sectionSlices,this._topRadius=WebGLPlot$e.defaultValue(e.topRadius,1e3),this._bottomRadius=WebGLPlot$e.defaultValue(e.bottomRadius,1e3),this._speedV=WebGLPlot$e.defaultValue(e.speedV,1.5),this._repeatCount=WebGLPlot$e.defaultValue(e.repeatCount,10),this._image=WebGLPlot$e.defaultValue(e.image,_0x1b8e09.getResourceURI()+"/iserver/mgis/situationSimulation/Picture/TubularLinkSpacer.png"),this._linkPrimitive=void 0,this._linkLength=0}getSectionSlices(){return this._sectionSlices}setSectionSlices(e){!WebGLPlot$e.defined(e)||e<3||e>128||(this._sectionSlices=e,this._initialized=!1)}getTopRadius(){return this._topRadius}setTopRadius(e){this._topRadius=e,this._initialized=!1}getBottomRadius(){return this._bottomRadius}setBottomRadius(e){this._bottomRadius=e,this._initialized=!1}getSpeedV(){return this._speedV}setSpeedV(e){this._speedV=e}getRepeatCount(){return this._repeatCount}setRepeatCount(e){this._repeatCount=e}getImage(){return this._image}setImage(e){this._image=e,this._initialized=!1}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0xf52e1d.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$e.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0xf52e1d.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$e.defined(this._pntEnd)&&(i=!0)),i){let e=this._getModelMatrix(this._pntStart,this._pntEnd),t=WebGLPlot$e.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),i=WebGLPlot$e.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z),n=WebGLPlot$e.Cartesian3.distance(t,i)/this._linkLength;this._linkPrimitive.modelMatrix=WebGLPlot$e.Matrix4.multiplyByScale(e,new WebGLPlot$e.Cartesian3(n,1,1),new WebGLPlot$e.Matrix4)}}this._geoEntityParameter=e}_addEffectToScene(e){let t=!1;this._pntStart=void 0;let i=_0x1b8e09.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$e.defined(i)&&(this._pntStart=_0xf52e1d.calcControlPoint(i,this._startOffset,e)),this._pntEnd=void 0;let n=_0x1b8e09.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$e.defined(n)&&(this._pntEnd=_0xf52e1d.calcControlPoint(n,this._endOffset,e)),!WebGLPlot$e.defined(this._pntStart)||!WebGLPlot$e.defined(this._pntEnd))return!1;let r=this._getModelMatrix(this._pntStart,this._pntEnd);return!!WebGLPlot$e.defined(r)&&(this._linkPrimitive=this._createFillPrimitive(r),WebGLPlot$e.defined(this._linkPrimitive)&&(e.primitives.add(this._linkPrimitive),t=!0),t)}_removeEffectFromScene(e){WebGLPlot$e.defined(this._linkPrimitive)&&e.primitives.contains(this._linkPrimitive)&&(e.primitives.remove(this._linkPrimitive),this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("sectionSlices")||(e.sectionSlices=this._sectionSlices),e.hasOwnProperty("topRadius")||(e.topRadius=this._topRadius),e.hasOwnProperty("bottomRadius")||(e.bottomRadius=this._bottomRadius),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("repeatCount")||(e.repeatCount=this._repeatCount),e.hasOwnProperty("image")||(e.image=this._image),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$e.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$e.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$e.defined(t.sectionSlices)&&(this._sectionSlices=t.sectionSlices),WebGLPlot$e.defined(t.topRadius)&&(this._topRadius=t.topRadius),WebGLPlot$e.defined(t.bottomRadius)&&(this._bottomRadius=t.bottomRadius),WebGLPlot$e.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$e.defined(t.repeatCount)&&(this._repeatCount=t.repeatCount),WebGLPlot$e.defined(t.image)&&(this._image=t.image),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.startOffset)&&(WebGLPlot$e.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$e.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$e.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$e.defined(t.endOffset)&&(WebGLPlot$e.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$e.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$e.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x2e6536;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x23de81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x23de81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._sectionSlices=this._sectionSlices,e._topRadius=this._topRadius,e._bottomRadius=this._bottomRadius,e._speedV=this._speedV,e._repeatCount=this._repeatCount,e._image=this._image,e}_getModelMatrix(e,t){const i=_0xf52e1d.degreesToCartesian3(e),n=_0xf52e1d.degreesToCartesian3(t);let r=new WebGLPlot$e.HeadingPitchRoll,o=_0xf52e1d.getHeading(i,n);o&&(r.heading=o);let a=_0xf52e1d.getPitch(i,n);return a&&(r.pitch=a),WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(i,r,WebGLPlot$e.Ellipsoid.WGS84,WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west"))}_createFillPrimitive(e){if(!WebGLPlot$e.defined(e))return null;let t=this._createFillGeometry();if(!WebGLPlot$e.defined(t))return null;let i=new WebGLPlot$e.Material({fabric:{type:"TubularImage",uniforms:{picture:this._image,pictureColorScale:1,repeat:new WebGLPlot$e.Cartesian2(1,this._repeatCount),flowSpeed:this._speedV},source:" uniform sampler2D picture; uniform float pictureColorScale; uniform vec2 repeat; uniform float flowSpeed; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec2 st = materialInput.st; vec4 colorImage = texture2D(picture, vec2(fract(repeat.x * st.s), fract(repeat.y * st.t - czm_frameNumber * 0.005 * flowSpeed))); material.diffuse = colorImage.rgb * pictureColorScale; material.alpha = colorImage.a; return material; }"}}),n=scene.frameState;n.scene3DOnly=!0;let r=new WebGLPlot$e.MaterialAppearance({material:i,faceForward:!1,closed:!0,frameState:n});return new WebGLPlot$e.Primitive({releaseGeometryInstances:!1,geometryInstances:new WebGLPlot$e.GeometryInstance({geometry:WebGLPlot$e.GeometryPipeline.computeNormal(t)}),asynchronous:!1,modelMatrix:e,appearance:r})}_createFillGeometry(){let e=WebGLPlot$e.Cartesian3.fromDegrees(this._pntStart.x,this._pntStart.y,this._pntStart.z),t=WebGLPlot$e.Cartesian3.fromDegrees(this._pntEnd.x,this._pntEnd.y,this._pntEnd.z);this._linkLength=WebGLPlot$e.Cartesian3.distance(e,t);let i=this._linkLength,n=this._topRadius,r=this._bottomRadius,o=this._sectionSlices,a=[],s=[],l=WebGLPlot$e.CesiumMath.toRadians(360/o);for(let e=0;e<o;e++){let t=l*e;const o=Math.cos(t)*n,u=Math.sin(t)*n;a.push(new WebGLPlot$e.Cartesian3(0,o,u));const c=Math.cos(t)*r,h=Math.sin(t)*r;s.push(new WebGLPlot$e.Cartesian3(i,c,h))}let u=[],c=s.length;u=a.concat(s);let h=this._ptsTransform([u]),d=WebGLPlot$e.BoundingSphere.fromVertices(h),f=new Array(2*c*3),p=0;for(let e=0;e<c-1;e++)f[p++]=e,f[p++]=e+1,f[p++]=c+e,f[p++]=e+1,f[p++]=c+(e+1),f[p++]=c+e;f[p++]=c-1,f[p++]=0,f[p++]=2*c-1,f[p++]=0,f[p++]=c,f[p++]=2*c-1;let _=new Uint16Array(f),m=new WebGLPlot$e.GeometryAttributes;m.position=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:new Float64Array(h)});let g=0,x=2*u.length,y=new Array(x);for(let e=0;e<u.length;e++){let t=e,i=0;e>=c&&(t=e-c,i=1),y[g++]=1*t/c,y[g++]=i}return m.st=new WebGLPlot$e.GeometryAttribute({componentDatatype:WebGLPlot$e.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(y)}),new WebGLPlot$e.Geometry({attributes:m,indices:_,primitiveType:WebGLPlot$e.PrimitiveType.TRIANGLES,boundingSphere:d})}_ptsTransform(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++){const i=n[e];t.push(i.x),t.push(i.y),t.push(i.z)}}return t}}const _0x289351=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x55e4a4=_0x289351(void 0,(function(){return _0x55e4a4.toString().search("(((.+)+)+)+$").toString().constructor(_0x55e4a4).search("(((.+)+)+)+$")}));_0x55e4a4();class _0x4071a9 extends _0x33a928{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._linkType=_0x2f1f44.METEORLINE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="MeteorCommunicationLink_"+WebGLPlot$e.createGuid(),this._color=WebGLPlot$e.defaultValue(e.color,new WebGLPlot$e.Color(1,1,.3,.8)),this._speedV=WebGLPlot$e.defaultValue(e.speedV,1),this._percent=WebGLPlot$e.defaultValue(e.percent,.1),this._gradient=WebGLPlot$e.defaultValue(e.gradient,.01),this._lineWidth=WebGLPlot$e.defaultValue(e.lineWidth,1),this._linkPrimitive=void 0,this._polylineCollection=void 0}getColor(){return this._color}setColor(e){this._color=e}getSpeedV(){return this._speedV}setSpeedV(e){this._speedV=e}getPercent(){return this._percent}setPercent(e){this._percent=e}getGradient(){return this._gradient}setGradient(e){this._gradient=e}getLineWidth(){return this._lineWidth}setLineWidth(e){this._lineWidth=e}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0xf52e1d.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$e.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0xf52e1d.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$e.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$e.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x1b8e09.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$e.defined(t)&&(this._pntStart=_0xf52e1d.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x1b8e09.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$e.defined(i)&&(this._pntEnd=_0xf52e1d.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$e.defined(this._pntStart)||!WebGLPlot$e.defined(this._pntEnd))return!1;let n=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z],r=new WebGLPlot$e.Material({fabric:{type:"MeteorLine",uniforms:{color:this._color,speedV:this._speedV,percent:this._percent,gradient:this._gradient},source:"\n uniform vec4 color;\n uniform float speedV;\n uniform float percent;\n uniform float gradient;\n \n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float t =fract(czm_frameNumber * speedV / 1000.0);\n t *= (1.0 + percent);\n float alpha = smoothstep(t- percent, t, st.s) * step(-t, -st.s);\n \n if(alpha < 1.0 && alpha > 0.0){\n material.diffuse = color.rgb;\n alpha = alpha * (pow(2.0, alpha * 5.0) / pow(2.0, 5.0));\n }else{\n material.diffuse = color.rgb;\n }\n alpha += gradient;\n material.alpha = alpha;\n \n return material;\n }\n "}});this._polylineCollection=new WebGLPlot$e.PolylineCollection,this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(n),width:this._lineWidth,material:r});let o=!1;return WebGLPlot$e.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),o=!0),o}_removeEffectFromScene(e){WebGLPlot$e.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("color")||(e.color=this._color),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("percent")||(e.percent=this._percent),e.hasOwnProperty("gradient")||(e.gradient=this._gradient),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$e.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$e.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$e.defined(t.color)&&(this._color=t.color),WebGLPlot$e.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$e.defined(t.percent)&&(this._percent=t.percent),WebGLPlot$e.defined(t.gradient)&&(this._gradient=t.gradient),WebGLPlot$e.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.startOffset)&&(WebGLPlot$e.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$e.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$e.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$e.defined(t.endOffset)&&(WebGLPlot$e.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$e.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$e.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x4071a9;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._initialized=this._initialized,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x23de81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x23de81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._color=WebGLPlot$e.Color.clone(this._color),e._speedV=this._speedV,e._percent=this._percent,e._gradient=this._gradient,e._wide=this._wide,e}}const _0xd65e14=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2af003=_0xd65e14(void 0,(function(){return _0x2af003.toString().search("(((.+)+)+)+$").toString().constructor(_0x2af003).search("(((.+)+)+)+$")}));_0x2af003();class _0x124e32 extends _0x33a928{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._linkType=_0x2f1f44.DASHLINE,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,linkType:this._linkType})),this._UUID="DashLineCommunicationLink"+WebGLPlot$e.createGuid(),this._speedV=WebGLPlot$e.defaultValue(e.speedV,5),this._lineWidth=WebGLPlot$e.defaultValue(e.lineWidth,1),this._dashLength=WebGLPlot$e.defaultValue(e.dashLength,30),this._dashPattern=WebGLPlot$e.defaultValue(e.dashPattern,255),this._signalColor=WebGLPlot$e.defaultValue(e.signalColor,new WebGLPlot$e.Color(1,0,0,1)),this._gapColor=WebGLPlot$e.defaultValue(e.gapColor,new WebGLPlot$e.Color(0,0,0,0)),this._polylineCollection=void 0,this._linkPrimitive=void 0}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._linkPrimitive)){let i=!1,n=e.getPosition();if(this._startUUID==t?WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntStart=_0xf52e1d.calcControlPoint(e,this._startOffset,this._scene),WebGLPlot$e.defined(this._pntStart)&&(i=!0)):this._endUUID==t&&WebGLPlot$e.defined(this._geoEntityParameter)&&!this._geoEntityParameter.getPosition().equals(n)&&(this._pntEnd=_0xf52e1d.calcControlPoint(e,this._endOffset,this._scene),WebGLPlot$e.defined(this._pntEnd)&&(i=!0)),i){let e=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive.positions=WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(e)}}this._geoEntityParameter=e}_addEffectToScene(e){WebGLPlot$e.defined(this._linkPrimitive)&&this._removeEffectFromScene(e),this._pntStart=void 0;let t=_0x1b8e09.getGeoEntityParamByUUID(this._startUUID);WebGLPlot$e.defined(t)&&(this._pntStart=_0xf52e1d.calcControlPoint(t,this._startOffset,e)),this._pntEnd=void 0;let i=_0x1b8e09.getGeoEntityParamByUUID(this._endUUID);if(WebGLPlot$e.defined(i)&&(this._pntEnd=_0xf52e1d.calcControlPoint(i,this._endOffset,e)),!WebGLPlot$e.defined(this._pntStart)||!WebGLPlot$e.defined(this._pntEnd))return!1;let n=new Cesium.Material({fabric:{type:"MyDashLineMaterial",uniforms:{color:this._signalColor,gapColor:this._gapColor,dashLength:this._dashLength,dashPattern:this._dashPattern,speedV:this._speedV},source:"uniform vec4 gapColor;\n uniform float dashLength;\n uniform float dashPattern;\n uniform float xy;\n varying float v_polylineAngle;\n \n const float maskLength = 16.0;\n \n mat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(\n c, s,\n -s, c\n );\n }\n \n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n \n // Get the relative position within the dash from 0 to 1\n float dashPosition = fract(pos.x/ (dashLength * czm_pixelRatio) + czm_frameNumber * 0.01 * speedV);\n // Figure out the mask index.\n float maskIndex = floor(dashPosition * maskLength);\n // Test the bit mask.\n float maskTest = floor((dashPattern) / pow(2.0, maskIndex));\n vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\n if (fragColor.a < 0.005) { // matches 0/255 and 1/255\n discard;\n }\n \n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n }"},translucent:!0});this._polylineCollection=new WebGLPlot$e.PolylineCollection;let r=[this._pntStart.x,this._pntStart.y,this._pntStart.z,this._pntEnd.x,this._pntEnd.y,this._pntEnd.z];this._linkPrimitive=this._polylineCollection.add({positions:WebGLPlot$e.Cartesian3.fromDegreesArrayHeights(r),width:this._lineWidth,material:n});let o=!1;return WebGLPlot$e.defined(this._linkPrimitive)&&(e.primitives.add(this._polylineCollection),o=!0),o}_removeEffectFromScene(e){WebGLPlot$e.defined(this._polylineCollection)&&e.primitives.contains(this._polylineCollection)&&(e.primitives.remove(this._polylineCollection),this._polylineCollection=void 0,this._linkPrimitive=void 0)}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("linkType")||(e.linkType=this._linkType),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("startUUID")||(e.startUUID=this._startUUID),e.hasOwnProperty("endUUID")||(e.endUUID=this._endUUID),e.hasOwnProperty("maxVisibleDistance")||(e.maxVisibleDistance=this._maxVisibleDistance),e.hasOwnProperty("speedV")||(e.speedV=this._speedV),e.hasOwnProperty("lineWidth")||(e.lineWidth=this._lineWidth),e.hasOwnProperty("dashLength")||(e.dashLength=this._dashLength),e.hasOwnProperty("dashPattern")||(e.dashPattern=this._dashPattern),e.hasOwnProperty("signalColor")||(e.signalColor=this._signalColor.toCssColorString()),e.hasOwnProperty("gapColor")||(e.gapColor=this._gapColor.toCssColorString()),e.hasOwnProperty("visible")||(e.visible=this._visible);e.hasOwnProperty("startOffset")||(e.startOffset={},e.startOffset.hasOwnProperty("x")||(e.startOffset.x=this._startOffset.x),e.startOffset.hasOwnProperty("y")||(e.startOffset.y=this._startOffset.y),e.startOffset.hasOwnProperty("z")||(e.startOffset.z=this._startOffset.z));return e.hasOwnProperty("endOffset")||(e.endOffset={},e.endOffset.hasOwnProperty("x")||(e.endOffset.x=this._endOffset.x),e.endOffset.hasOwnProperty("y")||(e.endOffset.y=this._endOffset.y),e.endOffset.hasOwnProperty("z")||(e.endOffset.z=this._endOffset.z)),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.linkType)&&(this._linkType=t.linkType),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.startUUID)&&(this._startUUID=t.startUUID),WebGLPlot$e.defined(t.endUUID)&&(this._endUUID=t.endUUID),WebGLPlot$e.defined(t.maxVisibleDistance)&&(this._maxVisibleDistance=t.maxVisibleDistance),WebGLPlot$e.defined(t.speedV)&&(this._speedV=t.speedV),WebGLPlot$e.defined(t.lineWidth)&&(this._lineWidth=t.lineWidth),WebGLPlot$e.defined(t.dashLength)&&(this._dashLength=t.dashLength),WebGLPlot$e.defined(t.dashPattern)&&(this._dashPattern=t.dashPattern),WebGLPlot$e.defined(t.signalColor)&&(this._signalColor=WebGLPlot$e.Color.fromCssColorString(t.signalColor)),WebGLPlot$e.defined(t.gapColor)&&(this._gapColor=WebGLPlot$e.Color.fromCssColorString(t.gapColor)),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.startOffset)&&(WebGLPlot$e.defined(t.startOffset.x)&&(this._startOffset.x=t.startOffset.x),WebGLPlot$e.defined(t.startOffset.y)&&(this._startOffset.y=t.startOffset.y),WebGLPlot$e.defined(t.startOffset.z)&&(this._startOffset.z=t.startOffset.z)),WebGLPlot$e.defined(t.endOffset)&&(WebGLPlot$e.defined(t.endOffset.x)&&(this._endOffset.x=t.endOffset.x),WebGLPlot$e.defined(t.endOffset.y)&&(this._endOffset.y=t.endOffset.y),WebGLPlot$e.defined(t.endOffset.z)&&(this._endOffset.z=t.endOffset.z))}clone(){let e=new _0x124e32;return e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._linkType=this._linkType,e._startUUID=this._startUUID,e._endUUID=this._endUUID,e._startOffset=new _0x23de81(this._startOffset.x,this._startOffset.y,this._startOffset.z),e._endOffset=new _0x23de81(this._endOffset.x,this._endOffset.y,this._endOffset.z),e._maxVisibleDistance=this._maxVisibleDistance,e._speedV=this._speedV,e._lineWidth=this._lineWidth,e._dashLength=this._dashLength,e._dashPattern=this._dashPattern,e._signalColor=WebGLPlot$e.Color.clone(this._signalColor),e._gapColor=WebGLPlot$e.Color.clone(this._gapColor),e}setSpeedV(e){this._speedV=e}getSpeedV(){return this._speedV}setLineWidth(e){this._lineWidth=e,this._initialized=!1}getLineWidth(){return this._lineWidth}setDashLength(e){this._dashLength=e,this._initialized=!1}getDashLength(){return this._dashLength}setDashPattern(e){this._dashPattern=e,this._initialized=!1}getDashPattern(){return this._dashPattern}setSignalColor(e){this._signalColor=e,this._initialized=!1}getSignalColor(){return this._signalColor}setGapColor(e){this._gapColor=e,this._initialized=!1}getGapColor(){return this._gapColor}}const _0x432e25=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x49380d=_0x432e25(void 0,(function(){return _0x49380d.toString().search("(((.+)+)+)+$").toString().constructor(_0x49380d).search("(((.+)+)+)+$")}));_0x49380d();class _0x2ceb89{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._shadows=WebGLPlot$e.defaultValue(e.shadows,WebGLPlot$e.ShadowMode.DISABLED),this._isFill=WebGLPlot$e.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$e.defaultValue(e.fillColor,new WebGLPlot$e.Color(1,1,0,.5)),this._isOutline=WebGLPlot$e.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$e.defaultValue(e.outlineColor,new WebGLPlot$e.Color(1,1,0,1))}setShadows(e){this._shadows=e}getShadows(){return this._shadows}setIsFill(e){this._isFill=e}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e}getOutlineColor(){return this._outlineColor}toJSON(){let e={};return e.hasOwnProperty("shadows")||(e.shadows=this._shadows),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.shadows)&&(this._shadows=t.shadows),WebGLPlot$e.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$e.defined(t.fillColor)&&(this._fillColor=WebGLPlot$e.Color.fromCssColorString(t.fillColor)),WebGLPlot$e.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$e.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$e.Color.fromCssColorString(t.outlineColor))}clone(){let e=new _0x2ceb89;return e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e}_updateScan(e){e.shadows=this._shadows,e.isFill=this._isFill,e.fillColor=this._fillColor.clone(),e.isOutline=this._isOutline,e.outlineColor=this._outlineColor.clone()}}const _0x1540c7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5c7c85=_0x1540c7(void 0,(function(){return _0x5c7c85.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c7c85).search("(((.+)+)+)+$")}));_0x5c7c85();class _0x208f92 extends _0x1b7397{constructor(e){if(super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._type=_0xaadec6.RADAR,this._radarType=_0x2c0193.PlotCustomRadar,this._UUID=WebGLPlot$e.createGuid(),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._scanSpeed=WebGLPlot$e.defaultValue(e.scanSpeed,60),this._shadows=WebGLPlot$e.defaultValue(e.shadows,WebGLPlot$e.ShadowMode.DISABLED),this._isFill=WebGLPlot$e.defaultValue(e.isFill,!0),this._fillColor=WebGLPlot$e.defaultValue(e.fillColor,new WebGLPlot$e.Color(1,0,0,.3)),this._isOutline=WebGLPlot$e.defaultValue(e.isOutline,!0),this._outlineColor=WebGLPlot$e.defaultValue(e.outlineColor,new WebGLPlot$e.Color(1,0,0,1)),this._outlineWidth=WebGLPlot$e.defaultValue(e.outlineWidth,1),this._isShowScan=!0,WebGLPlot$e.defined(e.arrGeoEntityEffectRadarScans))this._arrGeoEntityEffectRadarScans=e.arrGeoEntityEffectRadarScans;else{let e=[];for(let t=0;t<3;t++){let t=new _0x2ceb89;e.push(t)}this._arrGeoEntityEffectRadarScans=e}}getRadarType(){return this._radarType}setScanSpeed(e){this._scanSpeed=e,this._initialized=!1}getScanSpeed(){return this._scanSpeed}setShadows(e){this._shadows=e,this._initialized=!1}getShadows(){return this._shadows}setIsFill(e){this._isFill=e,this._initialized=!1}getIsFill(){return this._isFill}setFillColor(e){this._fillColor=e,this._initialized=!1}getFillColor(){return this._fillColor}setIsOutline(e){this._isOutline=e,this._initialized=!1}getIsOutline(){return this._isOutline}setOutlineColor(e){this._outlineColor=e,this._initialized=!1}getOutlineColor(){return this._outlineColor}setOutlineWidth(e){this._outlineWidth=e,this._initialized=!1}getOutlineWidth(){return this._outlineWidth}getGeoEntityEffectRadarScans(){return this._arrGeoEntityEffectRadarScans}setGeoEntityEffectRadarScans(e){this._arrGeoEntityEffectRadarScans=e,this._initialized=!1}toJSON(){let e={};e.hasOwnProperty("type")||(e.type=this._type),e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("name")||(e.name=this._name),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("bChangeSizeFlowModel")||(e.bChangeSizeFlowModel=this._bChangeSizeFlowModel);e.hasOwnProperty("offset")||(e.offset={},e.offset.hasOwnProperty("x")||(e.offset.x=this._pntOffset.x),e.offset.hasOwnProperty("y")||(e.offset.y=this._pntOffset.y),e.offset.hasOwnProperty("z")||(e.offset.z=this._pntOffset.z)),e.hasOwnProperty("scanSpeed")||(e.scanSpeed=this._scanSpeed),e.hasOwnProperty("shadows")||(e.shadows=this._shadows),e.hasOwnProperty("isFill")||(e.isFill=this._isFill),e.hasOwnProperty("fillColor")||(e.fillColor=this._fillColor.toCssColorString()),e.hasOwnProperty("isOutline")||(e.isOutline=this._isOutline),e.hasOwnProperty("outlineColor")||(e.outlineColor=this._outlineColor.toCssColorString()),e.hasOwnProperty("outlineWidth")||(e.outlineWidth=this._outlineWidth);let t=[];return e.hasOwnProperty("arrGeoEntityEffectRadarScans")||(e.arrGeoEntityEffectRadarScans=t,this._arrGeoEntityEffectRadarScans.forEach((e=>{t.push(e.toJSON())}))),JSON.stringify(e)}fromJSON(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.type)&&(this._type=t.type),WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.bChangeSizeFlowModel)&&(this._bChangeSizeFlowModel=t.bChangeSizeFlowModel),WebGLPlot$e.defined(t.offset)&&(WebGLPlot$e.defined(t.offset.x)&&(this._pntOffset.x=t.offset.x),WebGLPlot$e.defined(t.offset.y)&&(this._pntOffset.y=t.offset.y),WebGLPlot$e.defined(t.offset.z)&&(this._pntOffset.z=t.offset.z)),WebGLPlot$e.defined(t.scanSpeed)&&(this._scanSpeed=t.scanSpeed),WebGLPlot$e.defined(t.shadows)&&(this._shadows=t.shadows),WebGLPlot$e.defined(t.isFill)&&(this._isFill=t.isFill),WebGLPlot$e.defined(t.fillColor)&&(this._fillColor=WebGLPlot$e.Color.fromCssColorString(t.fillColor)),WebGLPlot$e.defined(t.isOutline)&&(this._isOutline=t.isOutline),WebGLPlot$e.defined(t.outlineColor)&&(this._outlineColor=WebGLPlot$e.Color.fromCssColorString(t.outlineColor)),WebGLPlot$e.defined(t.outlineWidth)&&(this._outlineWidth=t.outlineWidth),this._arrGeoEntityEffectRadarScans=[],t.arrGeoEntityEffectRadarScans.forEach((e=>{let t=new _0x2ceb89;t.fromJSON(e),this._arrGeoEntityEffectRadarScans.push(t)}))}}const _0x4bc750=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3c07f6=_0x4bc750(void 0,(function(){return _0x3c07f6.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c07f6).search("(((.+)+)+)+$")}));_0x3c07f6();class _0x57d7b0 extends _0x208f92{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._radarType=_0x2c0193.PlotMechanicalRadar,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectMechanicalRadar_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$e.defaultValue(e.radius,15e4),this._mechanicalRadar=null,this._cellAngle=5,this._isShowScan=!0}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._mechanicalRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0xf52e1d.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._mechanicalRadar.point=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._mechanicalRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return null;let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=new _0x23de81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x2bcc5b.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._mechanicalRadar=new _0x28b85b({id:this._UUID,point:t,rotate:new WebGLPlot$e.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,cellAngle:this._cellAngle,radii:new WebGLPlot$e.Cartesian3(this._radius,this._radius,this._radius),isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$e.defined(this._mechanicalRadar))return!1;let n=this._mechanicalRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._mechanicalRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$e.defined(this._mechanicalRadar)&&(this._mechanicalRadar.destroy(),this._mechanicalRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$e.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$e.defined(t.radius)&&(this._radius=t.radius)}clone(){let e=new _0x57d7b0;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}}const _0x5e9747=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4c4c3c=_0x5e9747(void 0,(function(){return _0x4c4c3c.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c4c3c).search("(((.+)+)+)+$")}));_0x4c4c3c();class _0x3897ec extends _0x208f92{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._radarType=_0x2c0193.PlotParameterRadar,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectParameterRadar_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$e.defaultValue(e.radius,15e4),this._innerRadius=WebGLPlot$e.defaultValue(e.innerRadius,5e3),this._minimumClock=WebGLPlot$e.defaultValue(e.minimumClock,0),this._maximumClock=WebGLPlot$e.defaultValue(e.maximumClock,360),this._minimumCone=WebGLPlot$e.defaultValue(e.minimumCone,0),this._maximumCone=WebGLPlot$e.defaultValue(e.maximumCone,90),this._parameterRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._parameterRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0xf52e1d.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._parameterRadar.point=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._parameterRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._innerRadius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return null;let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=new _0x23de81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x2bcc5b.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._parameterRadar=new _0x3f4ebc({id:this._UUID,point:t,rotate:new WebGLPlot$e.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,radii:new WebGLPlot$e.Cartesian3(this._radius,this._radius,this._radius),innerRadii:new WebGLPlot$e.Cartesian3(this._innerRadius,this._innerRadius,this._innerRadius),minimumClock:this._minimumClock,maximumClock:this._maximumClock,minimumCone:this._minimumCone,maximumCone:this._maximumCone,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$e.defined(this._parameterRadar))return!1;let n=this._parameterRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._parameterRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$e.defined(this._parameterRadar)&&(this._parameterRadar.destroy(),this._parameterRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),t.hasOwnProperty("innerRadius")||(t.innerRadius=this._innerRadius),t.hasOwnProperty("minimumClock")||(t.minimumClock=this._minimumClock),t.hasOwnProperty("maximumClock")||(t.maximumClock=this._maximumClock),t.hasOwnProperty("minimumCone")||(t.minimumCone=this._minimumCone),t.hasOwnProperty("maximumCone")||(t.maximumCone=this._maximumCone),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$e.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$e.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$e.defined(t.innerRadius)&&(this._innerRadius=t.innerRadius),WebGLPlot$e.defined(t.minimumClock)&&(this._minimumClock=t.minimumClock),WebGLPlot$e.defined(t.maximumClock)&&(this._maximumClock=t.maximumClock),WebGLPlot$e.defined(t.minimumCone)&&(this._minimumCone=t.minimumCone),WebGLPlot$e.defined(t.maximumCone)&&(this._maximumCone=t.maximumCone)}clone(){let e=new _0x3897ec;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e._innerRadius=this._innerRadius,e._minimumClock=this._minimumClock,e._maximumClock=this._maximumClock,e._minimumCone=this._minimumCone,e._maximumCone=this._maximumCone,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setInnerRadius(e){this._innerRadius=e,this._initialized=!1}getInnerRadius(){return this._innerRadius}setMinimumClock(e){this._minimumClock=e,this._initialized=!1}getMinimumClock(){return this._minimumClock}setMaximumClock(e){this._maximumClock=e,this._initialized=!1}getMaximumClock(){return this._maximumClock}setMinimumCone(e){this._minimumCone=e,this._initialized=!1}getMinimumCone(){return this._minimumCone}setMaximumCone(e){this._maximumCone=e,this._initialized=!1}getMaximumCone(){return this._maximumCone}}const _0x198536=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4532b0=_0x198536(void 0,(function(){return _0x4532b0.toString().search("(((.+)+)+)+$").toString().constructor(_0x4532b0).search("(((.+)+)+)+$")}));_0x4532b0();class _0x54c3a0 extends _0x208f92{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._radarType=_0x2c0193.PlotWarningRadar,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectWarningRadar_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$e.defaultValue(e.radius,15e4),this._warningRadar=null,this._cellAngle=5}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._warningRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0xf52e1d.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._warningRadar.point=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._warningRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return null;let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=new _0x23de81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x2bcc5b.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._warningRadar=new _0x46b837({id:this._UUID,point:t,rotate:new WebGLPlot$e.Cartesian3(i.x,i.y,i.z),dScanSpeed:this._scanSpeed,shadows:this._shadows,cellAngle:this._cellAngle,radii:new WebGLPlot$e.Cartesian3(this._radius,this._radius,this._radius),isFill:this._isFill,fillColor:this._fillColor.clone(),isOutline:this._isOutline,outlineColor:this._outlineColor.clone(),outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,show:!0},e),!WebGLPlot$e.defined(this._warningRadar))return!1;let n=this._warningRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._warningRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$e.defined(this._warningRadar)&&(this._warningRadar.destroy(),this._warningRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$e.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$e.defined(t.radius)&&(this._radius=t.radius)}clone(){let e=new _0x54c3a0;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}}const _0x3744cb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3875ee=_0x3744cb(void 0,(function(){return _0x3875ee.toString().search("(((.+)+)+)+$").toString().constructor(_0x3875ee).search("(((.+)+)+)+$")}));_0x3875ee();class _0xc2c75d extends _0x208f92{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._radarType=_0x2c0193.PlotScanRadar,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectScanRadar_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._scanSpeed=WebGLPlot$e.defaultValue(e.scanSpeed,30),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0),this._radius=WebGLPlot$e.defaultValue(e.radius,15e4),this._scanVAngle=WebGLPlot$e.defaultValue(e.scanVAngle,30),this._scanHAngle=WebGLPlot$e.defaultValue(e.scanHAngle,90),this._cellAngle=WebGLPlot$e.defaultValue(e.cellAngle,5),this._scanColor=WebGLPlot$e.defaultValue(e.scanColor,new WebGLPlot$e.Color(1,0,0,.3)),this._scanedColor=WebGLPlot$e.defaultValue(e.scanedColor,new WebGLPlot$e.Color(0,1,0,.3)),this._scanRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._scanRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0xf52e1d.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._scanRadar.point=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._scanRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._radius*=t,this._initialized=!1}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return null;let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=new _0x23de81(0,0,0);return this._geoEntityParameter.getShowMode()==_0x2bcc5b.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._scanRadar=new _0x49f493({id:this._UUID,point:t,rotate:new WebGLPlot$e.Cartesian3(i.x,i.y,i.z-45),scale:this._radius,dScanSpeed:this._scanSpeed,shadows:this._shadows,scanVAngle:this._scanVAngle,scanHAngle:this._scanHAngle,cellAngle:this._cellAngle,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanColor:this._scanColor,scanedColor:this._scanedColor,show:!0},e),!!WebGLPlot$e.defined(this._scanRadar)}_removeEffectFromScene(e){WebGLPlot$e.defined(this._scanRadar)&&(this._scanRadar.destroy(),this._scanRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);return t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("radius")||(t.radius=this._radius),t.hasOwnProperty("scanVAngle")||(t.scanVAngle=this._scanVAngle),t.hasOwnProperty("scanHAngle")||(t.scanHAngle=this._scanHAngle),t.hasOwnProperty("cellAngle")||(t.cellAngle=this._cellAngle),t.hasOwnProperty("scanColor")||(t.scanColor=this._scanColor.toCssColorString()),t.hasOwnProperty("scanedColor")||(t.scanedColor=this._scanedColor.toCssColorString()),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$e.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$e.defined(t.radius)&&(this._radius=t.radius),WebGLPlot$e.defined(t.scanVAngle)&&(this._scanVAngle=t.scanVAngle),WebGLPlot$e.defined(t.scanHAngle)&&(this._scanHAngle=t.scanHAngle),WebGLPlot$e.defined(t.cellAngle)&&(this._cellAngle=t.cellAngle),WebGLPlot$e.defined(t.scanColor)&&(this._scanColor=WebGLPlot$e.Color.fromCssColorString(t.scanColor)),WebGLPlot$e.defined(t.scanedColor)&&(this._scanedColor=WebGLPlot$e.Color.fromCssColorString(t.scanedColor))}clone(){let e=new _0xc2c75d;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._radius=this._radius,e._scanVAngle=this._scanVAngle,e._scanHAngle=this._scanHAngle,e._cellAngle=this._cellAngle,e._scanColor=this._scanColor.clone(),e._scanedColor=this._scanedColor.clone(),e}setRadius(e){this._radius=e,this._initialized=!1}getRadius(){return this._radius}setScanVAngle(e){this._scanVAngle=e}getScanVAngle(){return this._scanVAngle}setScanHAngle(e){this._scanHAngle=e}getScanHAngle(){return this._scanHAngle}setCellAngle(e){this._cellAngle=e}getCellAngle(){return this._cellAngle}setScanColor(e){this._scanColor=e}getScanColor(){return this._scanColor}setScanedColor(e){this._scanedColor=e}getScanedColor(){return this._scanedColor}}const _0x15091e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x404e16=_0x15091e(void 0,(function(){return _0x404e16.toString().search("(((.+)+)+)+$").toString().constructor(_0x404e16).search("(((.+)+)+)+$")}));_0x404e16();class _0x425466 extends _0x208f92{constructor(e){super(e),e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._radarType=_0x2c0193.PlotRotateRadar,this._name=WebGLPlot$e.defaultValue(e.name,_0x1b8e09.getDefaultName({effectType:this._type,radarType:this._radarType})),this._UUID="GeoEntityEffectRotateRadar_"+WebGLPlot$e.createGuid(),this._pntOffset=WebGLPlot$e.defaultValue(e.pntOffset,new _0x23de81(0,0,0)),this._bChangeSizeFlowModel=WebGLPlot$e.defaultValue(e.bChangeSizeFlowModel,!0);var t=[new WebGLPlot$e.Cartesian3(0,2e3,0),new WebGLPlot$e.Cartesian3(2e4,8e3,0),new WebGLPlot$e.Cartesian3(4e4,2e3,0),new WebGLPlot$e.Cartesian3(0,2e3,0)];this._customPts=WebGLPlot$e.defaultValue(e.customPts,t),this._customAngle=WebGLPlot$e.defaultValue(e.customAngle,360),this._rotateRadar=null}setGeoEntityParameter(e,t){if(WebGLPlot$e.defined(this._rotateRadar)){if(!this._geoEntityParameter.getPosition().equals(e.getPosition())||this._geoEntityParameter.getShowMode()!=e.getShowMode()){let t=_0xf52e1d.calcControlPoint(e,this._pntOffset,this._scene);WebGLPlot$e.defined(t)&&(this._rotateRadar.point=t)}if(e.getShowMode()==_0x2bcc5b.Marker&&!this._geoEntityParameter.getModelRotate().equals(e.getModelRotate())&&(this._rotateRadar.rotate=e.getModelRotate()),e.getShowMode()==_0x2bcc5b.Marker&&(this._geoEntityParameter.getModelPath()!=e.getModelPath()&&(this._initialized=!1),this._geoEntityParameter.getModelScale()!=e.getModelScale()&&this._bChangeSizeFlowModel)){let t=1*e.getModelScale()/this._geoEntityParameter.getModelScale();this._rotateRadar.scale*=t}}this._geoEntityParameter=e}_addEffectToScene(e){if(!WebGLPlot$e.defined(this._geoEntityParameter)||!WebGLPlot$e.defined(this._pntOffset))return null;let t=_0xf52e1d.calcControlPoint(this._geoEntityParameter,this._pntOffset,e);if(!WebGLPlot$e.defined(t))return null;let i=new _0x23de81(0,0,0);if(this._geoEntityParameter.getShowMode()==_0x2bcc5b.Marker&&(i=this._geoEntityParameter.getModelRotate()),this._rotateRadar=new _0xbdfb44({id:this._UUID,point:t,rotate:new WebGLPlot$e.Cartesian3(i.x,i.y,i.z-45),dScanSpeed:this._scanSpeed,shadows:this._shadows,isFill:this._isFill,fillColor:this._fillColor,isOutline:this._isOutline,outlineColor:this._outlineColor,outlineWidth:this._outlineWidth,isShowScan:this._isShowScan,scanCount:this._arrGeoEntityEffectRadarScans.length,scanColor:this._scanColor,customPts:this._customPts,rotateAngle:this._customAngle,slicePartitions:this._customAngle/5,show:!0},e),!WebGLPlot$e.defined(this._rotateRadar))return!1;this._rotateRadar.scale=this._geoEntityParameter.getModelScale();let n=this._rotateRadar.getScanArray();for(let e=0;e<n.length;e++)this._arrGeoEntityEffectRadarScans[e]._updateScan(n[e]);return this._rotateRadar.setScanArray(n),this._initialized=!0,!0}_removeEffectFromScene(e){WebGLPlot$e.defined(this._rotateRadar)&&(this._rotateRadar.destroy(),this._rotateRadar=null)}toJSON(){let e=super.toJSON(),t=JSON.parse(e);t.hasOwnProperty("radarType")||(t.radarType=this._radarType),t.hasOwnProperty("customAngle")||(t.customAngle=this._customAngle);return t.hasOwnProperty("customPts")||(t.customPts=[]),this._customPts.forEach((e=>{t.customPts.push({x:e.x,y:e.y,z:e.z})})),JSON.stringify(t)}fromJSON(e){super.fromJSON(e);let t=JSON.parse(e);WebGLPlot$e.defined(t.radarType)&&(this._radarType=t.radarType),WebGLPlot$e.defined(t.customAngle)&&(this._customAngle=t.customAngle),WebGLPlot$e.defined(t.customPts)&&(this._customPts=[],t.customPts.forEach((e=>{this._customPts.push(new WebGLPlot$e.Cartesian3(e.x,e.y,e.z))})))}clone(){let e=new _0x425466;e._name=this._name,e._type=this._type,e._visible=this._visible,e._pntOffset=new _0x23de81(this._pntOffset.x,this._pntOffset.y,this._pntOffset.z),e._bChangeSizeFlowModel=this._bChangeSizeFlowModel,e._scanSpeed=this._scanSpeed,e._shadows=this._shadows,e._isFill=this._isFill,e._fillColor=this._fillColor.clone(),e._isOutline=this._isOutline,e._outlineColor=this._outlineColor.clone(),e._outlineWidth=this._outlineWidth;let t=[];for(let e=0;e<this._arrGeoEntityEffectRadarScans.length;e++)t.push(this._arrGeoEntityEffectRadarScans[e].clone());return e._arrGeoEntityEffectRadarScans=t,e._radarType=this._radarType,e._customAngle=this._customAngle,e._customPts=[],this._customPts.forEach((t=>{e._customPts.push(new WebGLPlot$e.Cartesian3(t.x,t.y,t.z))})),e}}const _0x48b0c4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x23d3ab=_0x48b0c4(void 0,(function(){return _0x23d3ab.toString().search("(((.+)+)+)+$").toString().constructor(_0x23d3ab).search("(((.+)+)+)+$")}));_0x23d3ab();class _0x1b8e09{constructor(){}static createGeoEntityEffectFromJson(e){let t,i,n,r,o=JSON.parse(e);return WebGLPlot$e.defined(o.type)&&(i=o.type,o.type===_0xaadec6.COMMUNICATIONLINK?WebGLPlot$e.defined(o.linkType)&&(n=o.linkType):o.type===_0xaadec6.RADAR&&WebGLPlot$e.defined(o.radarType)&&(r=o.radarType),t=this.createGeoEntityEffectFromType({effectType:i,linkType:n,radarType:r}),WebGLPlot$e.defined(t)&&t.fromJSON(e)),t}static createGeoEntityEffectFromType(e){let t,i=(e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT)).effectType,n=e.linkType,r=e.radarType;switch(i){case _0xaadec6.WAKE:case _0xaadec6.ROTORWASH:break;case _0xaadec6.FIRESMOKE:t=new _0x492aac;break;case _0xaadec6.BURST:t=new _0x236442;break;case _0xaadec6.TAILFLAME:t=new _0x5a68dc;break;case _0xaadec6.TAILGAS:t=new _0x1d9822;break;case _0xaadec6.RADAR:switch(r){case _0x2c0193.PlotMechanicalRadar:t=new _0x57d7b0;break;case _0x2c0193.PlotParameterRadar:t=new _0x3897ec;break;case _0x2c0193.PlotWarningRadar:t=new _0x54c3a0;break;case _0x2c0193.PlotScanRadar:t=new _0xc2c75d;break;case _0x2c0193.PlotRotateRadar:t=new _0x425466}break;case _0xaadec6.SCANWAVE:t=new _0x3cd5dc;break;case _0xaadec6.SCANCONE:t=new _0x524880;break;case _0xaadec6.DETECTIONCONE:t=new _0x570f72;break;case _0xaadec6.TRACKLINE:t=new _0x297e6a;break;case _0xaadec6.ATTACKLINE:t=new _0x42e779;break;case _0xaadec6.SIGN:t=new _0x392050;break;case _0xaadec6.COMMUNICATIONLINK:switch(n){case _0x2f1f44.BASICLINE:t=new _0x4ec5ba;break;case _0x2f1f44.ARROW:t=new _0x2d907f;break;case _0x2f1f44.TUBULAR:t=new _0x2e6536;break;case _0x2f1f44.METEORLINE:t=new _0x4071a9;break;case _0x2f1f44.DASHLINE:t=new _0x124e32}break;case _0xaadec6.DYNAMICMODEL:t=new _0x496759;break;case _0xaadec6.TEXT:break;case _0xaadec6.EXTENDACTION:t=new _0x584c60;break;case _0xaadec6.AUGMENT:t=new _0x458424;break;case _0xaadec6.ANNULARDIFFUSION:t=new _0x597b34}return t}static linkToAnotherGeoEntity(e,t,i){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t))return!1;let n=null;if(t.getStartUUID()==e?n=t.getEndUUID():t.getEndUUID()===e&&(n=t.getStartUUID()),!WebGLPlot$e.defined(n))return!1;let r=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(n);WebGLPlot$e.defined(r)||(r=_0x2e28f1.getInstance().getGeoEntityManager().getGeoEntityByUUID(n)),WebGLPlot$e.defined(r)||(r=_0x2e28f1.getInstance().getSatelliteEntityManager().getSatelliteEntityByUUID(n));let o=!1;return WebGLPlot$e.defined(r)&&(o=i?r._connectLinkToGeoEntity(t):r._disConnectLinkToGeoEntity(t)),o}static getGeoEntityParamByUUID(e){if(!WebGLPlot$e.defined(e))return;let t,i=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(e);return WebGLPlot$e.defined(i)||(i=_0x2e28f1.getInstance().getGeoEntityManager().getGeoEntityByUUID(e)),WebGLPlot$e.defined(i)||(i=_0x2e28f1.getInstance().getSatelliteEntityManager().getSatelliteEntityByUUID(e)),WebGLPlot$e.defined(i)&&(t=i.getGeoEntityParameter()),t}static getResourceURI(){return _0x2e28f1.getInstance().getURI()}static getDefaultName(e){let t=(e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT)).effectType,i=e.linkType,n=e.radarType,r="";switch(t){case _0xaadec6.WAKE:case _0xaadec6.ROTORWASH:break;case _0xaadec6.FIRESMOKE:r="燃烧";break;case _0xaadec6.BURST:r="爆炸";break;case _0xaadec6.TAILFLAME:r="尾焰";break;case _0xaadec6.TAILGAS:r="尾气";break;case _0xaadec6.RADAR:switch(n){case _0x2c0193.PlotMechanicalRadar:r="机械雷达";break;case _0x2c0193.PlotParameterRadar:r="参数雷达";break;case _0x2c0193.PlotWarningRadar:r="预警雷达";break;case _0x2c0193.PlotScanRadar:r="扫描雷达";break;case _0x2c0193.PlotRotateRadar:r="旋转雷达"}break;case _0xaadec6.SCANWAVE:r="扫描波";break;case _0xaadec6.SCANCONE:r="扫描棱锥";break;case _0xaadec6.DETECTIONCONE:r="探视锥";break;case _0xaadec6.TRACKLINE:r="尾迹";break;case _0xaadec6.ATTACKLINE:r="攻击线";break;case _0xaadec6.SIGN:r="标牌";break;case _0xaadec6.COMMUNICATIONLINK:switch(i){case _0x2f1f44.BASICLINE:r="基础线";break;case _0x2f1f44.ARROW:r="箭头线";break;case _0x2f1f44.TUBULAR:r="管状线";break;case _0x2f1f44.METEORLINE:r="流星线";break;case _0x2f1f44.DASHLINE:r="间断线"}break;case _0xaadec6.DYNAMICMODEL:r="渐变体";break;case _0xaadec6.TEXT:r="文本";break;case _0xaadec6.EXTENDACTION:r="扩展特效";break;case _0xaadec6.AUGMENT:r="增强";break;case _0xaadec6.ANNULARDIFFUSION:r="扩散圆"}return r}}const _0x2bddea=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x36087d=_0x2bddea(void 0,(function(){return _0x36087d.toString().search("(((.+)+)+)+$").toString().constructor(_0x36087d).search("(((.+)+)+)+$")}));_0x36087d();class _0x3fd6e5{constructor(e){this._geoGraphicObject=e,this._name="",this._geoEntityEffects=[];let t=this;this._getScene().preUpdate.addEventListener((function(){let e=t.getGeoEntityParameter();if(e.getIsDistanceChangeMode()){let i=_0xf52e1d.calcCameraDistance(e.getPosition(),t._getScene());i>e.getChangeModeDistance()&&e.getShowMode()!==_0x2bcc5b.Picture?e.setShowMode(_0x2bcc5b.Picture):i<e.getChangeModeDistance()&&e.getShowMode()!==_0x2bcc5b.Marker&&e.setShowMode(_0x2bcc5b.Marker),t.setGeoEntityParameter(e)}})),this._isModified=!1,this._isMoveGeoEntity=!1,this._isDistanceChangeMode=!1,this._changeModeDistance=5e3}_getGeoGraphicObject(){return this._geoGraphicObject}_getScene(){return this._geoGraphicObject.layer._scene}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){this._isMoveGeoEntity||_0x2e28f1.getInstance()._saveGeoEntity(!1)}destroy(){this.clearGeoEntityEffects()}clone(e){e.id=WebGLPlot$e.createGuid();let t=new _0x3fd6e5(e);t._name=this._name;let i=[];return this._geoEntityEffects.forEach((e=>{let t=e.clone();e.getType()!=_0xaadec6.COMMUNICATIONLINK&&i.push(t)})),t.updateGeoEntityEffects(i),t}setName(e){this._name=e,this._isModified=!0,this._save()}getName(){return this._name}setUUID(e){this._geoGraphicObject.id=e}getUUID(){return this._geoGraphicObject.id}setGeoEntityParameter(e){WebGLPlot$e.defined(this._geoGraphicObject)&&(e.isPositionUpdate()&&(this._geoGraphicObject.localPoints=[e.getPosition()]),e.isModelScaleUpdate()&&(this._geoGraphicObject.modelScale=e.getModelScale()),e.isVectorScaleUpdate()&&(this._geoGraphicObject.vectorScale=e.getVectorScale()),e.isModelRotateUpdate()&&(this._geoGraphicObject.modelRotate=e.getModelRotate()),e.isVectorRotateUpdate()&&(this._geoGraphicObject.vectorRotate=e.getVectorRotate()),e.isModelPathUpdate()&&(this._geoGraphicObject.modelPath=e.getModelPath()),e.isVisibleUpdate()&&(this._geoGraphicObject.display=e.isVisible()),e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())):e.isDotPlotLibIDUpdate()&&!e.isDotPlotCodeUpdate()?(this._geoGraphicObject.__dotPlotLibID=e.getDotPlotLibID(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())):!e.isDotPlotLibIDUpdate()&&e.isDotPlotCodeUpdate()&&(this._geoGraphicObject.__dotPlotCode=e.getDotPlotCode(),this._geoGraphicObject.setGeoEntityShowMode(this._geoGraphicObject.getGeoEntityShowMode())),e.isDotPlotStyleUpdate()&&e.getDotPlotStyle().setGeoGraphicObjectStyle(this._geoGraphicObject),e.isPictureSymbolSizeUpdate()&&(this._geoGraphicObject.pictureSymbolSize=e.getPictureSymbolSize()),e.isPicturePathUpdate()&&(this._geoGraphicObject.picturePath=e.getPicturePath()),e.isShowModeUpdate()&&this._geoGraphicObject.setGeoEntityShowMode(e.getShowMode()),e.isChangeModeDistanceUpdate()&&(this._changeModeDistance=e.getChangeModeDistance()),e.isDistanceChangeModeUpdate()&&(this._isDistanceChangeMode=e.getIsDistanceChangeMode()),this._geoEntityEffects.forEach((e=>{e.setGeoEntityParameter(this.getGeoEntityParameter(),this.getUUID())})),this._isModified=!0,this._save())}getGeoEntityParameter(){if(WebGLPlot$e.defined(this._geoGraphicObject)){let e=new _0x4920fc,t=new _0x15cea8;return t.getGeoGraphicObjectStyle(this._geoGraphicObject),e._initParm(this._geoGraphicObject.localPoints[0],this._geoGraphicObject.modelScale,this._geoGraphicObject.vectorScale,this._geoGraphicObject.modelRotate,this._geoGraphicObject.vectorRotate,this._geoGraphicObject.modelPath,this._geoGraphicObject.display,this._geoGraphicObject.__dotPlotLibID,this._geoGraphicObject.__dotPlotCode,t,this._geoGraphicObject.pictureSymbolSize,this._geoGraphicObject.picturePath,this._geoGraphicObject.getGeoEntityShowMode(),this._isDistanceChangeMode,this._changeModeDistance),e}}toJson(){if(WebGLPlot$e.defined(this._geoGraphicObject)){let e={},t=JSON.stringify(this._geoGraphicObject.getSymbolData());if(e.hasOwnProperty("geoGraphicObject")||(e.geoGraphicObject=t),!e.hasOwnProperty("geoEntity")){let t={};t.hasOwnProperty("name")||(t.name=this._name),t.hasOwnProperty("isDistanceChangeMode")||(t.isDistanceChangeMode=this._isDistanceChangeMode),t.hasOwnProperty("changeModeDistance")||(t.changeModeDistance=this._changeModeDistance),t.hasOwnProperty("geoEntityEffects")||(t.geoEntityEffects=[],this._geoEntityEffects.forEach((e=>{(e.getType()!=_0xaadec6.COMMUNICATIONLINK||e.getStartUUID()===this.getUUID())&&t.geoEntityEffects.push(e.toJSON())}))),e.geoEntity=JSON.stringify(t)}return JSON.stringify(e)}return""}fromJson(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.name)&&(this._name=t.name),WebGLPlot$e.defined(t.isDistanceChangeMode)&&(this._isDistanceChangeMode=t.isDistanceChangeMode),WebGLPlot$e.defined(t.changeModeDistance)&&(this._changeModeDistance=t.changeModeDistance),WebGLPlot$e.defined(t.geoEntityEffects)&&t.geoEntityEffects.forEach((e=>{let t=_0x1b8e09.createGeoEntityEffectFromJson(e);WebGLPlot$e.defined(t)&&(t.setGeoEntity(this),t.getType()!=_0xaadec6.COMMUNICATIONLINK&&this.addGeoEntityEffect(t))}))}getGeoEntityEffects(){return this._geoEntityEffects}addGeoEntityEffect(e){for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID())return!1;let t=this._getScene();return WebGLPlot$e.defined(t)&&(e.setGeoEntityParameter(this.getGeoEntityParameter(),this.getUUID()),e.addEffectToScene(t)),this._geoEntityEffects.push(e),e.getType()===_0xaadec6.COMMUNICATIONLINK&&_0x1b8e09.linkToAnotherGeoEntity(this.getUUID(),e,!0),this._isModified=!0,this._save(),!0}removeGeoEntityEffect(e){for(let t=0;t<this._geoEntityEffects.length;t++){const i=this._geoEntityEffects[t];if(i.getUUID()===e){i.getType()===_0xaadec6.COMMUNICATIONLINK&&_0x1b8e09.linkToAnotherGeoEntity(this.getUUID(),i,!1);let e=this._getScene();return WebGLPlot$e.defined(e)&&i.removeEffectFromScene(e),this._geoEntityEffects.splice(t,1),!0}}return this._isModified=!0,this._save(),!1}updateGeoEntityEffects(e){for(let e=0;e<this._geoEntityEffects.length;e++){const t=this._geoEntityEffects[e];t.getType()===_0xaadec6.COMMUNICATIONLINK&&_0x1b8e09.linkToAnotherGeoEntity(this.getUUID(),t,!1);let i=this._getScene();WebGLPlot$e.defined(i)&&t.removeEffectFromScene(i)}this._geoEntityEffects.splice(0),e.forEach((e=>{this.addGeoEntityEffect(e)})),this._isModified=!0,this._save()}updateGeoEntityEffect(e){let t=-1;for(let i=0;i<this.geoEntityEffects.length;i++)if(this.geoEntityEffects[i].getUUID()===e.getUUID()){t=i;break}-1!==t&&(this.removeGeoEntityEffect(e.getUUID()),this.addGeoEntityEffect(e),this._isModified=!0,this._save())}clearGeoEntityEffects(){this.updateGeoEntityEffects([])}_connectLinkToGeoEntity(e){if(!WebGLPlot$e.defined(e))return!1;for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID())return!1;return this._geoEntityEffects.push(e),!0}_disConnectLinkToGeoEntity(e){if(!WebGLPlot$e.defined(e))return!1;let t=!1,i=-1;for(let t=0;t<this._geoEntityEffects.length;t++)if(this._geoEntityEffects[t].getUUID()===e.getUUID()){i=t;break}return-1!=i&&(this._geoEntityEffects.splice(i,1),t=!0),t}}const _0x56d16b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2c934a=_0x56d16b(void 0,(function(){return _0x2c934a.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c934a).search("(((.+)+)+)+$")}));_0x2c934a();class _0x3c98af{constructor(){this._geoEntitys=new Map,this._geoEntityRootNode=new _0x4cd539("GeoEntityRootNode",!0),this._geoEntityLayer=void 0,this._geoEntityEditControl=void 0,this._geoEntityDrawControl=void 0,this._addGeoEntitys=[],this._removeEntityUUIDs=[]}_setScene(e){this._geoEntityLayer=new _0x394df6(e,"GeoEntitys"),e.plotLayers.add(this._geoEntityLayer),this._geoEntityEditControl=new _0x4ea0dc(e,this._geoEntityLayer),this._geoEntityDrawControl=new _0xc0ccbe(e,this._geoEntityLayer)}_getAddAndRemoveGeoEntitys(){return{add:this._addGeoEntitys,remove:this._removeEntityUUIDs}}_clearAddAndRemoveGeoEntitys(){this._addGeoEntitys.splice(0),this._removeEntityUUIDs.splice(0)}_save(){_0x2e28f1.getInstance()._saveGeoEntity(!1)}_removeAllGeoEntityFromScene(){this._geoEntitys.forEach(((e,t)=>{e.clearGeoEntityEffects();let i=e._getGeoGraphicObject();WebGLPlot$e.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i)})),this._geoEntitys.clear(),this._geoEntityRootNode._clear()}addGeoEntity(e){if(WebGLPlot$e.defined(this.getGeoEntityByUUID(e.getGeoEntity().getUUID())))return"";if(this._geoEntityLayer.addFeature(e)){let t=new _0x3fd6e5(e);e.setGeoEntity(t);let i=t.getUUID();return this._geoEntitys.set(i,t),this._geoEntityRootNode.createGeoEntityNode(t),this._addGeoEntitys.push(t),this._save(),i}return""}addGeoEntityModel(e,t,i,n,r){let o=this;this._geoEntityLayer.createSymbol(0,99999,[t],{url:i},(function(t){t.feature.__dotPlotLibID=0,t.feature.__dotPlotCode=99998;let i=_0x2e28f1.getInstance().getURI();t.feature.picturePath=i+"/iserver/mgis/situationSimulation/Picture/DafaultPicture.png",WebGLPlot$e.defined(r)&&(WebGLPlot$e.defined(r.modelScale)&&(t.feature.modelScale=r.modelScale),WebGLPlot$e.defined(r.modelRotate)&&(t.feature.modelRotate=r.modelRotate),WebGLPlot$e.defined(r.picturePath)&&(t.feature.picturePath=r.picturePath),WebGLPlot$e.defined(r.pictureSymbolSize)&&(t.feature.pictureSymbolSize=r.pictureSymbolSize),WebGLPlot$e.defined(r.plotLibID)&&WebGLPlot$e.defined(r.plotCode)&&(t.feature.__dotPlotLibID=r.plotLibID,t.feature.__dotPlotCode=r.plotCode),WebGLPlot$e.defined(r.dotPlotStyle)&&r.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$e.defined(r.vectorScale)&&(t.feature.vectorScale=r.vectorScale),WebGLPlot$e.defined(r.vectorRotate)&&(t.feature.vectorRotate=r.vectorRotate),WebGLPlot$e.defined(r.visible)&&(t.feature.display=r.visible));let a=new _0x3fd6e5(t.feature);t.feature.setGeoEntity(a),a.setName(e);let s=a.getUUID();o._geoEntitys.set(s,a),o._geoEntityRootNode.createGeoEntityNode(a),"function"==typeof n&&n({UUID:s}),o._addGeoEntitys.push(a),o._save()}))}addGeoEntityPicture(e,t,i,n,r){let o=this;this._geoEntityLayer.createSymbol(0,20,[t],{url:i},(function(t){t.feature.__dotPlotLibID=0,t.feature.__dotPlotCode=99998;let i=_0x2e28f1.getInstance().getURI();t.feature.modelPath=i+"/iserver/mgis/situationSimulation/Model/DafaultModel.gltf",WebGLPlot$e.defined(r)&&(WebGLPlot$e.defined(r.modelScale)&&(t.feature.modelScale=r.modelScale),WebGLPlot$e.defined(r.modelRotate)&&(t.feature.modelRotate=r.modelRotate),WebGLPlot$e.defined(r.modelPath)&&(t.feature.modelPath=r.modelPath),WebGLPlot$e.defined(r.pictureSymbolSize)&&(t.feature.pictureSymbolSize=r.pictureSymbolSize),WebGLPlot$e.defined(r.plotLibID)&&WebGLPlot$e.defined(r.plotCode)&&(t.feature.__dotPlotLibID=r.plotLibID,t.feature.__dotPlotCode=r.plotCode),WebGLPlot$e.defined(r.dotPlotStyle)&&r.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$e.defined(r.vectorScale)&&(t.feature.vectorScale=r.vectorScale),WebGLPlot$e.defined(r.vectorRotate)&&(t.feature.vectorRotate=r.vectorRotate),WebGLPlot$e.defined(r.visible)&&(t.feature.display=r.visible));let a=new _0x3fd6e5(t.feature);t.feature.setGeoEntity(a),a.setName(e);let s=a.getUUID();o._geoEntitys.set(s,a),o._geoEntityRootNode.createGeoEntityNode(a),"function"==typeof n&&n({UUID:s}),o._addGeoEntitys.push(a),o._save()}))}addGeoEntityDotPlot(e,t,i,n,r,o){let a=this;this._geoEntityLayer.createSymbol(i,n,[t],(function(t){t.feature.__dotPlotLibID=t.feature.libID,t.feature.__dotPlotCode=t.feature.code;let i=_0x2e28f1.getInstance().getURI();t.feature.modelPath=i+"/iserver/mgis/situationSimulation/Model/DafaultModel.gltf",t.feature.picturePath=i+"/iserver/mgis/situationSimulation/Picture/DafaultPicture.png",WebGLPlot$e.defined(o)&&(WebGLPlot$e.defined(o.modelScale)&&(t.feature.modelScale=o.modelScale),WebGLPlot$e.defined(o.modelRotate)&&(t.feature.modelRotate=o.modelRotate),WebGLPlot$e.defined(o.modelPath)&&(t.feature.modelPath=o.modelPath),WebGLPlot$e.defined(o.picturePath)&&(t.feature.picturePath=o.picturePath),WebGLPlot$e.defined(o.pictureSymbolSize)&&(t.feature.pictureSymbolSize=o.pictureSymbolSize),WebGLPlot$e.defined(o.dotPlotStyle)&&o.dotPlotStyle.setGeoGraphicObjectStyle(t.feature),WebGLPlot$e.defined(o.vectorScale)&&(t.feature.vectorScale=o.vectorScale),WebGLPlot$e.defined(o.vectorRotate)&&(t.feature.vectorRotate=o.vectorRotate),WebGLPlot$e.defined(o.visible)&&(t.feature.display=o.visible));let n=new _0x3fd6e5(t.feature);t.feature.setGeoEntity(n),n.setName(e);let s=n.getUUID();a._geoEntitys.set(s,n),a._geoEntityRootNode.createGeoEntityNode(n),"function"==typeof r&&r({UUID:s}),a._addGeoEntitys.push(n),a._save()}))}removeGeoEntity(e){let t=this._geoEntitys.get(e);if(WebGLPlot$e.defined(t)){let i=t._getGeoGraphicObject();if(t.clearGeoEntityEffects(),WebGLPlot$e.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i))return this._geoEntityRootNode._removeGeoEntityNode(e),this._geoEntitys.delete(e),this._removeEntityUUIDs.push(e),this._save(),!0}return!1}removeAllGeoEntity(){this._geoEntitys.forEach(((e,t)=>{e.clearGeoEntityEffects();let i=e._getGeoGraphicObject();WebGLPlot$e.defined(i)&&this._geoEntityLayer.removeGeoGraphicObject(i),this._removeEntityUUIDs.push(t)})),this._geoEntitys.clear(),this._geoEntityRootNode._clear(),this._save()}getGeoEntityByUUID(e){return this._geoEntitys.get(e)}isGeoEntityLayerEditable(){return!!WebGLPlot$e.defined(this._geoEntityEditControl)&&this._geoEntityEditControl.isActive()}setGeoEntityLayerEditable(e){WebGLPlot$e.defined(this._geoEntityEditControl)&&(e?this._geoEntityEditControl.activate():this._geoEntityEditControl.deactivate())}getGeoEntityRootNode(){return this._geoEntityRootNode}getGeoEntitys(){return this._geoEntitys}toJson(){let e=new Map;this._geoEntitys.forEach(((t,i)=>{e.set(t.getUUID(),t.toJson())}));let t=this._geoEntityRootNode._toJson();return{geoEntityJsons:e,geoEntityNodeJson:t}}fromJson(e,t){let i=e.geoEntityJsons,n=e.geoEntityNodeJson;if(this.removeAllGeoEntity(!1),WebGLPlot$e.defined(this._geoEntityLayer)){let e=this,n=[],r=new Map;i.forEach(((o,a)=>{if(o.length>0){let s=JSON.parse(o);WebGLPlot$e.defined(s.geoGraphicObject)&&this._geoEntityLayer.geoJsonToGeoGraphicObject(JSON.parse(s.geoGraphicObject),(function(o){if(WebGLPlot$e.defined(s.geoEntity)){let l=o.feature;if(WebGLPlot$e.defined(l)){let o=new _0x3fd6e5(l);l.setGeoEntity(o),o.fromJson(s.geoEntity),e._geoEntitys.set(a,o),n.push(a),"function"==typeof t&&n.length===i.size&&t({UUIDs:n}),r.set(o,s)}}}))}})),this._fromJsonLink(r)}this._geoEntityRootNode._clear(),n.length>0&&this._geoEntityRootNode._fromJson(n,this._geoEntityRootNode)}_fromJsonLink(e){e.forEach(((e,t)=>{let i=JSON.parse(e.geoEntity);WebGLPlot$e.defined(i.geoEntityEffects)&&i.geoEntityEffects.forEach((e=>{let i=_0x1b8e09.createGeoEntityEffectFromJson(e);WebGLPlot$e.defined(i)&&i.getType()==_0xaadec6.COMMUNICATIONLINK&&t.getUUID()===i.getStartUUID()&&t.addGeoEntityEffect(i)}))}))}}function _0x415334(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),WebGLPlot$e.PolylineCollection.call(this,e),this._visible=WebGLPlot$e.defaultValue(e.visible,!0),this._orbitsWidth=WebGLPlot$e.defaultValue(e.orbitsWidth,1),this._orbitsColor=WebGLPlot$e.defaultValue(e.orbitsColor,new WebGLPlot$e.Color(.8,.8,.2,.39)),this._initialized=!1}(function(){const e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),t=e(this,(function(){return t.toString().search("(((.+)+)+)+$").toString().constructor(t).search("(((.+)+)+)+$")}));t();var i=function(){};i.prototype=WebGLPlot$e.PolylineCollection.prototype,_0x415334.prototype=new i,_0x415334.prototype.constructor=_0x415334,_0x415334.prototype.update=function(e){!this._visible&&!this._initialized||(i.prototype.update.apply(this,Array.prototype.slice.apply(arguments)),this._initialized&&(this._initialized=!1))}})(),Object.defineProperties(_0x415334.prototype,{visible:{get:function(){return this._visible},set:function(e){for(let t=0;t<this.length;t++)this.get(t).show=e;this._visible=e,this._initialized=!0}},orbitsWidth:{get:function(){return this._orbitsWidth},set:function(e){for(let t=0;t<this.length;t++)this.get(t).width=e;this._orbitsWidth=e,this._initialized=!0}},orbitsColor:{get:function(){return this._orbitsWidth},set:function(e){for(let t=0;t<this.length;t++)this.get(t).material=WebGLPlot$e.Material.fromType("Color",{color:e});this._orbitsColor=e,this._initialized=!0}}}),function(e,t){var i,n=(i=!0,function(e,t){var n=i?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return i=!1,n}),r=n(this,(function(){return r.toString().search("(((.+)+)+)+$").toString().constructor(r).search("(((.+)+)+)+$")}));r(),"object"==typeof exports&&typeof module<"u"?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).SatelliteToolkit=t()}(void 0,(function(){var e=Math.PI,t=2*e,i=e/180,n=180/e,r=1440,o=398600.8,a=6378.135,s=60/Math.sqrt(650942.9922085947),l=a*s/60,u=1/s,c=.001082616,h=-253881e-11,d=-165597e-11,f=h/c,p=2/3;function _(e,t){for(var i=[31,e%4==0?29:28,31,30,31,30,31,31,30,31,30,31],n=Math.floor(t),r=1,o=0;n>o+i[r-1]&&r<12;)o+=i[r-1],r+=1;var a=r,s=n-o,l=24*(t-n),u=Math.floor(l);l=60*(l-u);var c=Math.floor(l);return{mon:a,day:s,hr:u,minute:c,sec:60*(l-c)}}function m(e,t,i,n,r,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;return 367*e-Math.floor(7*(e+Math.floor((t+9)/12))*.25)+Math.floor(275*t/9)+i+1721013.5+((a/6e4+o/60+r)/60+n)/24}function g(e,t,i,n,r,o,a){if(e instanceof Date){var s=e;return m(s.getUTCFullYear(),s.getUTCMonth()+1,s.getUTCDate(),s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds())}return m(e,t,i,n,r,o,a)}function x(i,n){var r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b=i.e3,T=i.ee2,C=i.peo,S=i.pgho,w=i.pho,E=i.pinco,P=i.plo,A=i.se2,L=i.se3,M=i.sgh2,R=i.sgh3,O=i.sgh4,D=i.sh2,I=i.sh3,B=i.si2,F=i.si3,N=i.sl2,G=i.sl3,z=i.sl4,U=i.t,V=i.xgh2,k=i.xgh3,W=i.xgh4,H=i.xh2,q=i.xh3,j=i.xi2,X=i.xi3,Y=i.xl2,Z=i.xl3,K=i.xl4,Q=i.zmol,J=i.zmos,ee=n.init,te=n.opsmode,ie=n.ep,ne=n.inclp,re=n.nodep,oe=n.argpp,ae=n.mp;$=J+119459e-10*U,"y"===ee&&($=J),v=$+.0335*Math.sin($);var se=A*(c=.5*(g=Math.sin(v))*g-.25)+L*(h=-.5*g*Math.cos(v)),le=B*c+F*h,ue=N*c+G*h+z*g,ce=M*c+R*h+O*g,he=D*c+I*h;return $=Q+.00015835218*U,"y"===ee&&($=Q),v=$+.1098*Math.sin($),d=se+(T*(c=.5*(g=Math.sin(v))*g-.25)+b*(h=-.5*g*Math.cos(v))),_=le+(j*c+X*h),m=ue+(Y*c+Z*h+K*g),f=ce+(V*c+k*h+W*g),p=he+(H*c+q*h),"n"===ee&&(m-=P,f-=S,p-=w,ne+=_-=E,ie+=d-=C,s=Math.sin(ne),a=Math.cos(ne),ne>=.2?(oe+=f-=a*(p/=s),re+=p,ae+=m):(r=s*(u=Math.sin(re)),o=s*(l=Math.cos(re)),r+=p*l+_*a*u,o+=-p*u+_*a*l,(re%=t)<0&&"a"===te&&(re+=t),x=ae+oe+a*re,x+=m+f-_*re*s,y=re,(re=Math.atan2(r,o))<0&&"a"===te&&(re+=t),Math.abs(y-re)>e&&(re<y?re+=t:re-=t),oe=x-(ae+=m)-a*re)),{ep:ie,inclp:ne,nodep:re,argpp:oe,mp:ae}}function y(e){var n=(e-2451545)/36525,r=-62e-7*n*n*n+.093104*n*n+3164400184.812866*n+67310.54841;return(r=r*i/240%t)<0&&(r+=t),r}function v(){return(arguments.length<=0?void 0:arguments[0])instanceof Date||arguments.length>1?y(g.apply(void 0,arguments)):y.apply(void 0,arguments)}function $(i,n){var r,o,u,c,h,d,_,m,g,y,v,$,b,T,C,S,w,E,P,A,L,M,R,O,D,I;i.t=n,i.error=0;var B=i.mo+i.mdot*i.t,F=i.argpo+i.argpdot*i.t,N=i.nodeo+i.nodedot*i.t;m=F,A=B;var G=i.t*i.t;if(M=N+i.nodecf*G,S=1-i.cc1*i.t,w=i.bstar*i.cc4*i.t,E=i.t2cof*G,1!==i.isimp){d=i.omgcof*i.t;var z=1+i.eta*Math.cos(B);A=B+(C=d+i.xmcof*(z*z*z-i.delmo)),m=F-C,$=(v=G*i.t)*i.t,S=S-i.d2*G-i.d3*v-i.d4*$,w+=i.bstar*i.cc5*(Math.sin(A)-i.sinmao),E=E+i.t3cof*v+$*(i.t4cof+i.t*i.t5cof)}L=i.no;var U=i.ecco;if(P=i.inclo,"d"===i.method){b=i.t;var V=function(e){var i,n,r,o,a,s,l,u,c=e.irez,h=e.d2201,d=e.d2211,f=e.d3210,p=e.d3222,_=e.d4410,m=e.d4422,g=e.d5220,x=e.d5232,y=e.d5421,v=e.d5433,$=e.dedt,b=e.del1,T=e.del2,C=e.del3,S=e.didt,w=e.dmdt,E=e.dnodt,P=e.domdt,A=e.argpo,L=e.argpdot,M=e.t,R=e.tc,O=e.gsto,D=e.xfact,I=e.xlamo,B=e.no,F=e.atime,N=e.em,G=e.argpm,z=e.inclm,U=e.xli,V=e.mm,k=e.xni,W=e.nodem,H=e.nm,q=.13130908,j=2.8843198,X=.37448087,Y=5.7686396,Z=.95240898,K=1.8014998,Q=1.050833,J=4.4108898,ee=259200,te=0,ie=0,ne=(O+.0043752690880113*R)%t;if(N+=$*M,z+=S*M,G+=P*M,W+=E*M,V+=w*M,0!==c){(0===F||M*F<=0||Math.abs(M)<Math.abs(F))&&(F=0,k=B,U=I),i=M>0?720:-720;for(var re=381;381===re;)2!==c?(l=b*Math.sin(U-q)+T*Math.sin(2*(U-j))+C*Math.sin(3*(U-X)),a=k+D,s=b*Math.cos(U-q)+2*T*Math.cos(2*(U-j))+3*C*Math.cos(3*(U-X)),s*=a):(r=(u=A+L*F)+u,n=U+U,l=h*Math.sin(r+U-Y)+d*Math.sin(U-Y)+f*Math.sin(u+U-Z)+p*Math.sin(-u+U-Z)+_*Math.sin(r+n-K)+m*Math.sin(n-K)+g*Math.sin(u+U-Q)+x*Math.sin(-u+U-Q)+y*Math.sin(u+n-J)+v*Math.sin(-u+n-J),a=k+D,s=h*Math.cos(r+U-Y)+d*Math.cos(U-Y)+f*Math.cos(u+U-Z)+p*Math.cos(-u+U-Z)+g*Math.cos(u+U-Q)+x*Math.cos(-u+U-Q)+2*(_*Math.cos(r+n-K)+m*Math.cos(n-K)+y*Math.cos(u+n-J)+v*Math.cos(-u+n-J)),s*=a),Math.abs(M-F)>=720?re=381:(ie=M-F,re=0),381===re&&(U+=a*i+l*ee,k+=l*i+s*ee,F+=i);H=k+l*ie+s*ie*ie*.5,o=U+a*ie+l*ie*ie*.5,1!==c?(V=o-2*W+2*ne,te=H-B):(V=o-W-G+ne,te=H-B),H=B+te}return{atime:F,em:N,argpm:G,inclm:z,xli:U,mm:V,xni:k,nodem:W,dndt:te,nm:H}}({irez:i.irez,d2201:i.d2201,d2211:i.d2211,d3210:i.d3210,d3222:i.d3222,d4410:i.d4410,d4422:i.d4422,d5220:i.d5220,d5232:i.d5232,d5421:i.d5421,d5433:i.d5433,dedt:i.dedt,del1:i.del1,del2:i.del2,del3:i.del3,didt:i.didt,dmdt:i.dmdt,dnodt:i.dnodt,domdt:i.domdt,argpo:i.argpo,argpdot:i.argpdot,t:i.t,tc:b,gsto:i.gsto,xfact:i.xfact,xlamo:i.xlamo,no:i.no,atime:i.atime,em:U,argpm:m,inclm:P,xli:i.xli,mm:A,xni:i.xni,nodem:M,nm:L});U=V.em,m=V.argpm,P=V.inclm,A=V.mm,M=V.nodem,L=V.nm}if(L<=0)return i.error=2,[!1,!1];var k=Math.pow(s/L,p)*S*S;if(L=s/Math.pow(k,1.5),(U-=w)>=1||U<-.001)return i.error=1,[!1,!1];U<1e-6&&(U=1e-6),O=(A+=i.no*E)+m+M;var W=U;if(R=P,g=m%=t,I=M%=t,D=A=((O%=t)-m-M)%t,c=Math.sin(P),u=Math.cos(P),"d"===i.method){var H=x(i,{inclo:i.inclo,init:"n",ep:W,inclp:R,nodep:I,argpp:g,mp:D,opsmode:i.operationmode});if(W=H.ep,I=H.nodep,g=H.argpp,D=H.mp,(R=H.inclp)<0&&(R=-R,I+=e,g-=e),W<0||W>1)return i.error=3,[!1,!1]}"d"===i.method&&(c=Math.sin(R),u=Math.cos(R),i.aycof=-.5*f*c,Math.abs(u+1)>15e-13?i.xlcof=-.25*f*c*(3+5*u)/(1+u):i.xlcof=-.25*f*c*(3+5*u)/15e-13);var q=W*Math.cos(g);C=1/(k*(1-W*W));var j=W*Math.sin(g)+C*i.aycof,X=(D+g+I+C*i.xlcof*q-I)%t;_=X,T=9999.9;for(var Y=1;Math.abs(T)>=1e-12&&Y<=10;)o=Math.sin(_),T=(X-j*(r=Math.cos(_))+q*o-_)/(T=1-r*q-o*j),Math.abs(T)>=.95&&(T=T>0?.95:-.95),_+=T,Y+=1;var Z=q*r+j*o,K=q*o-j*r,Q=q*q+j*j,J=k*(1-Q);if(J<0)return i.error=4,[!1,!1];var ee=k*(1-Z),te=Math.sqrt(k)*K/ee,ie=Math.sqrt(J)/ee,ne=Math.sqrt(1-Q),re=k/ee*(o-j-q*(C=K/(1+ne))),oe=k/ee*(r-q+j*C);y=Math.atan2(re,oe);var ae=(oe+oe)*re,se=1-2*re*re,le=541308e-9*(C=1/J),ue=le*C;"d"===i.method&&(h=u*u,i.con41=3*h-1,i.x1mth2=1-h,i.x7thm1=7*h-1);var ce=ee*(1-1.5*ue*ne*i.con41)+.5*le*i.x1mth2*se;if(ce<1)return i.error=6,{position:!1,velocity:!1};y-=.25*ue*i.x7thm1*ae;var he=I+1.5*ue*u*ae,de=R+1.5*ue*u*c*se,fe=te-L*le*i.x1mth2*ae/s,pe=ie+L*le*(i.x1mth2*se+1.5*i.con41)/s,_e=Math.sin(y),me=Math.cos(y),ge=Math.sin(he),xe=Math.cos(he),ye=Math.sin(de),ve=Math.cos(de),$e=-ge*ve,be=xe*ve,Te=$e*_e+xe*me,Ce=be*_e+ge*me,Se=ye*_e;return{position:{x:ce*Te*a,y:ce*Ce*a,z:ce*Se*a},velocity:{x:(fe*Te+pe*($e*me-xe*_e))*l,y:(fe*Ce+pe*(be*me-ge*_e))*l,z:(fe*Se+pe*(ye*me))*l}}}function b(i,n){var r,o,l,h,d,_,m,g,y,b,T,C,S,w,E,P,A,L,M,R,O,D,I,B,F,N,G,z,U,V,k,W,H,q,j,X,Y,Z,K,Q,J,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he=n.opsmode,de=n.satn,fe=n.epoch,pe=n.xbstar,_e=n.xecco,me=n.xargpo,ge=n.xinclo,xe=n.xmo,ye=n.xno,ve=n.xnodeo;i.isimp=0,i.method="n",i.aycof=0,i.con41=0,i.cc1=0,i.cc4=0,i.cc5=0,i.d2=0,i.d3=0,i.d4=0,i.delmo=0,i.eta=0,i.argpdot=0,i.omgcof=0,i.sinmao=0,i.t=0,i.t2cof=0,i.t3cof=0,i.t4cof=0,i.t5cof=0,i.x1mth2=0,i.x7thm1=0,i.mdot=0,i.nodedot=0,i.xlcof=0,i.xmcof=0,i.nodecf=0,i.irez=0,i.d2201=0,i.d2211=0,i.d3210=0,i.d3222=0,i.d4410=0,i.d4422=0,i.d5220=0,i.d5232=0,i.d5421=0,i.d5433=0,i.dedt=0,i.del1=0,i.del2=0,i.del3=0,i.didt=0,i.dmdt=0,i.dnodt=0,i.domdt=0,i.e3=0,i.ee2=0,i.peo=0,i.pgho=0,i.pho=0,i.pinco=0,i.plo=0,i.se2=0,i.se3=0,i.sgh2=0,i.sgh3=0,i.sgh4=0,i.sh2=0,i.sh3=0,i.si2=0,i.si3=0,i.sl2=0,i.sl3=0,i.sl4=0,i.gsto=0,i.xfact=0,i.xgh2=0,i.xgh3=0,i.xgh4=0,i.xh2=0,i.xh3=0,i.xi2=0,i.xi3=0,i.xl2=0,i.xl3=0,i.xl4=0,i.xlamo=0,i.zmol=0,i.zmos=0,i.atime=0,i.xli=0,i.xni=0,i.bstar=pe,i.ecco=_e,i.argpo=me,i.inclo=ge,i.mo=xe,i.no=ye,i.nodeo=ve,i.operationmode=he;i.init="y",i.t=0;var $e=function(e){var i=e.ecco,n=e.epoch,r=e.inclo,o=e.opsmode,a=e.no,l=i*i,u=1-l,h=Math.sqrt(u),d=Math.cos(r),f=d*d,_=Math.pow(s/a,p),m=.75*c*(3*f-1)/(h*u),g=m/(_*_),x=_*(1-g*g-g*(1/3+134*g*g/81));a/=1+(g=m/(x*x));var y,$=Math.pow(s/a,p),b=Math.sin(r),T=$*u,C=1-5*f,S=-C-f-f,w=1/$,E=T*T,P=$*(1-i);if("a"===o){var A=n-7305,L=Math.floor(A+1e-8),M=.017202791694070362;(y=(1.7321343856509375+M*L+(M+t)*(A-L)+A*A*5075514194322695e-30)%t)<0&&(y+=t)}else y=v(n+2433281.5);return{no:a,method:"n",ainv:w,ao:$,con41:S,con42:C,cosio:d,cosio2:f,eccsq:l,omeosq:u,posq:E,rp:P,rteosq:h,sinio:b,gsto:y}}({satn:de,ecco:i.ecco,epoch:fe,inclo:i.inclo,no:i.no,method:i.method,opsmode:i.operationmode}),be=$e.ao,Te=$e.con42,Ce=$e.cosio,Se=$e.cosio2,we=$e.eccsq,Ee=$e.omeosq,Pe=$e.posq,Ae=$e.rp,Le=$e.rteosq,Me=$e.sinio;if(i.no=$e.no,i.con41=$e.con41,i.gsto=$e.gsto,i.a=Math.pow(i.no*u,-2/3),i.alta=i.a*(1+i.ecco)-1,i.altp=i.a*(1-i.ecco)-1,i.error=0,Ee>=0||i.no>=0){if(i.isimp=0,Ae<220/a+1&&(i.isimp=1),B=1.0122292801892716,L=1.880279159015271e-9,(E=(Ae-1)*a)<156){B=E-78,E<98&&(B=20);var Re=(120-B)/a;L=Re*Re*Re*Re,B=B/a+1}P=1/Pe,ee=1/(be-B),i.eta=be*i.ecco*ee,C=i.eta*i.eta,T=i.ecco*i.eta,A=Math.abs(1-C),h=(m=(_=L*Math.pow(ee,4))/Math.pow(A,3.5))*i.no*(be*(1+1.5*C+T*(4+C))+.375*c*ee/A*i.con41*(8+3*C*(8+C))),i.cc1=i.bstar*h,d=0,i.ecco>1e-4&&(d=-2*_*ee*f*i.no*Me/i.ecco),i.x1mth2=1-Se,i.cc4=2*i.no*m*be*Ee*(i.eta*(2+.5*C)+i.ecco*(.5+2*C)-c*ee/(be*A)*(-3*i.con41*(1-2*T+C*(1.5-.5*T))+.75*i.x1mth2*(2*C-T*(1+C))*Math.cos(2*i.argpo))),i.cc5=2*m*be*Ee*(1+2.75*(C+T)+T*C),g=Se*Se,Q=.5*(K=1.5*c*P*i.no)*c*P,J=7.762359375e-7*P*P*i.no,i.mdot=i.no+.5*K*Le*i.con41+.0625*Q*Le*(13-78*Se+137*g),i.argpdot=-.5*K*Te+.0625*Q*(7-114*Se+395*g)+J*(3-36*Se+49*g),ie=-K*Ce,i.nodedot=ie+(.5*Q*(4-19*Se)+2*J*(3-7*Se))*Ce,te=i.argpdot+i.nodedot,i.omgcof=i.bstar*d*Math.cos(i.argpo),i.xmcof=0,i.ecco>1e-4&&(i.xmcof=-p*_*i.bstar/T),i.nodecf=3.5*Ee*ie*i.cc1,i.t2cof=1.5*i.cc1,Math.abs(Ce+1)>15e-13?i.xlcof=-.25*f*Me*(3+5*Ce)/(1+Ce):i.xlcof=-.25*f*Me*(3+5*Ce)/15e-13,i.aycof=-.5*f*Me;var Oe=1+i.eta*Math.cos(i.mo);if(i.delmo=Oe*Oe*Oe,i.sinmao=Math.sin(i.mo),i.x7thm1=7*Se-1,2*e/i.no>=225){i.method="d",i.isimp=1,0,S=i.inclo;var De=function(e){var i,n,r,o,a,s,l,u,c,h,d,f,p,_,m,g,x,y,v,$,b,T,C,S,w,E,P,A,L,M,R,O,D,I,B,F,N,G,z,U,V,k,W,H,q,j,X,Y,Z,K,Q,J,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he=e.epoch,de=e.ep,fe=e.argpp,pe=e.tc,_e=e.inclp,me=e.nodep,ge=.01675,xe=.0549,ye=e.np,ve=de,$e=Math.sin(me),be=Math.cos(me),Te=Math.sin(fe),Ce=Math.cos(fe),Se=Math.sin(_e),we=Math.cos(_e),Ee=ve*ve,Pe=1-Ee,Ae=Math.sqrt(Pe),Le=he+18261.5+pe/1440,Me=(4.523602-.00092422029*Le)%t,Re=Math.sin(Me),Oe=Math.cos(Me),De=.91375164-.03568096*Oe,Ie=Math.sqrt(1-De*De),Be=.089683511*Re/Ie,Fe=Math.sqrt(1-Be*Be),Ne=5.8351514+.001944368*Le,Ge=.39785416*Re/Ie,ze=Fe*Oe+.91744867*Be*Re;Ge=Math.atan2(Ge,ze),Ge+=Ne-Me;var Ue=Math.cos(Ge),Ve=Math.sin(Ge);$=.1945905,b=-.98088458,S=.91744867,w=.39785416,T=be,C=$e,d=29864797e-13;for(var ke=1/ye,We=0;We<2;)ie=-6*(i=$*T+b*S*C)*(a=-Se*(l=-$*C+b*S*T)+we*(u=b*w))+Ee*(-24*(f=i*Ce+(n=we*l+Se*u)*Te)*(y=a*Ce)-6*(_=-i*Te+n*Ce)*(g=a*Te)),ne=-6*(i*(s=-Se*(c=b*C+$*S*T)+we*(h=$*w))+(r=-b*T+$*S*C)*a)+Ee*(-24*((p=r*Ce+(o=we*c+Se*h)*Te)*y+f*(v=s*Ce))+-6*(_*(x=s*Te)+(m=-r*Te+o*Ce)*g)),re=-6*r*s+Ee*(-24*p*v-6*m*x),oe=6*n*a+Ee*(24*f*g-6*_*y),ae=6*(o*a+n*s)+Ee*(24*(p*g+f*x)-6*(m*y+_*v)),se=6*o*s+Ee*(24*p*x-6*m*v),J=(J=3*(i*i+n*n)+(le=12*f*f-3*_*_)*Ee)+J+Pe*le,ee=(ee=6*(i*r+n*o)+(ue=24*f*p-6*_*m)*Ee)+ee+Pe*ue,te=(te=3*(r*r+o*o)+(ce=12*p*p-3*m*m)*Ee)+te+Pe*ce,j=-.5*(X=d*ke)/Ae,q=-15*ve*(Y=X*Ae),Z=f*_+p*m,K=p*_+f*m,Q=p*m-f*_,1===(We+=1)&&(E=q,P=j,A=X,L=Y,M=Z,R=K,O=Q,D=J,I=ee,B=te,F=ie,N=ne,G=re,z=oe,U=ae,V=se,k=le,W=ue,H=ce,$=Ue,b=Ve,S=De,w=Ie,T=Fe*be+Be*$e,C=$e*Fe-be*Be,d=4.7968065e-7);return{snodm:$e,cnodm:be,sinim:Se,cosim:we,sinomm:Te,cosomm:Ce,day:Le,e3:2*q*Q,ee2:2*q*K,em:ve,emsq:Ee,gam:Ne,peo:0,pgho:0,pho:0,pinco:0,plo:0,rtemsq:Ae,se2:2*E*R,se3:2*E*O,sgh2:2*L*W,sgh3:2*L*(H-k),sgh4:-18*L*ge,sh2:-2*P*U,sh3:-2*P*(V-z),si2:2*P*N,si3:2*P*(G-F),sl2:-2*A*I,sl3:-2*A*(B-D),sl4:-2*A*(-21-9*Ee)*ge,s1:q,s2:j,s3:X,s4:Y,s5:Z,s6:K,s7:Q,ss1:E,ss2:P,ss3:A,ss4:L,ss5:M,ss6:R,ss7:O,sz1:D,sz2:I,sz3:B,sz11:F,sz12:N,sz13:G,sz21:z,sz22:U,sz23:V,sz31:k,sz32:W,sz33:H,xgh2:2*Y*ue,xgh3:2*Y*(ce-le),xgh4:-18*Y*xe,xh2:-2*j*ae,xh3:-2*j*(se-oe),xi2:2*j*ne,xi3:2*j*(re-ie),xl2:-2*X*ee,xl3:-2*X*(te-J),xl4:-2*X*(-21-9*Ee)*xe,nm:ye,z1:J,z2:ee,z3:te,z11:ie,z12:ne,z13:re,z21:oe,z22:ae,z23:se,z31:le,z32:ue,z33:ce,zmol:(.2299715*Le-Ne+4.7199672)%t,zmos:(6.2565837+.017201977*Le)%t}}({epoch:fe,ep:i.ecco,argpp:i.argpo,tc:0,inclp:i.inclo,nodep:i.nodeo,np:i.no,e3:i.e3,ee2:i.ee2,peo:i.peo,pgho:i.pgho,pho:i.pho,pinco:i.pinco,plo:i.plo,se2:i.se2,se3:i.se3,sgh2:i.sgh2,sgh3:i.sgh3,sgh4:i.sgh4,sh2:i.sh2,sh3:i.sh3,si2:i.si2,si3:i.si3,sl2:i.sl2,sl3:i.sl3,sl4:i.sl4,xgh2:i.xgh2,xgh3:i.xgh3,xgh4:i.xgh4,xh2:i.xh2,xh3:i.xh3,xi2:i.xi2,xi3:i.xi3,xl2:i.xl2,xl3:i.xl3,xl4:i.xl4,zmol:i.zmol,zmos:i.zmos});i.e3=De.e3,i.ee2=De.ee2,i.peo=De.peo,i.pgho=De.pgho,i.pho=De.pho,i.pinco=De.pinco,i.plo=De.plo,i.se2=De.se2,i.se3=De.se3,i.sgh2=De.sgh2,i.sgh3=De.sgh3,i.sgh4=De.sgh4,i.sh2=De.sh2,i.sh3=De.sh3,i.si2=De.si2,i.si3=De.si3,i.sl2=De.sl2,i.sl3=De.sl3,i.sl4=De.sl4,o=De.sinim,r=De.cosim,y=De.em,b=De.emsq,M=De.s1,R=De.s2,O=De.s3,D=De.s4,I=De.s5,F=De.ss1,N=De.ss2,G=De.ss3,z=De.ss4,U=De.ss5,V=De.sz1,k=De.sz3,W=De.sz11,H=De.sz13,q=De.sz21,j=De.sz23,X=De.sz31,Y=De.sz33,i.xgh2=De.xgh2,i.xgh3=De.xgh3,i.xgh4=De.xgh4,i.xh2=De.xh2,i.xh3=De.xh3,i.xi2=De.xi2,i.xi3=De.xi3,i.xl2=De.xl2,i.xl3=De.xl3,i.xl4=De.xl4,i.zmol=De.zmol,i.zmos=De.zmos,w=De.nm,ne=De.z1,re=De.z3,oe=De.z11,ae=De.z13,se=De.z21,le=De.z23,ue=De.z31,ce=De.z33;var Ie=x(i,{inclo:S,init:i.init,ep:i.ecco,inclp:i.inclo,nodep:i.nodeo,argpp:i.argpo,mp:i.mo,opsmode:i.operationmode});i.ecco=Ie.ep,i.inclo=Ie.inclp,i.nodeo=Ie.nodep,i.argpo=Ie.argpp,i.mo=Ie.mp,0,0,0;var Be=function(i){var n,r,o,a,l,u,c,h,d,f,_,m,g,x,y,v,$,b=i.cosim,T=i.argpo,C=i.s1,S=i.s2,w=i.s3,E=i.s4,P=i.s5,A=i.sinim,L=i.ss1,M=i.ss2,R=i.ss3,O=i.ss4,D=i.ss5,I=i.sz1,B=i.sz3,F=i.sz11,N=i.sz13,G=i.sz21,z=i.sz23,U=i.sz31,V=i.sz33,k=i.t,W=i.tc,H=i.gsto,q=i.mo,j=i.mdot,X=i.no,Y=i.nodeo,Z=i.nodedot,K=i.xpidot,Q=i.z1,J=i.z3,ee=i.z11,te=i.z13,ie=i.z21,ne=i.z23,re=i.z31,oe=i.z33,ae=i.ecco,se=i.eccsq,le=i.emsq,ue=i.em,ce=i.argpm,he=i.inclm,de=i.mm,fe=i.nm,pe=i.nodem,_e=i.irez,me=i.atime,ge=i.d2201,xe=i.d2211,ye=i.d3210,ve=i.d3222,$e=i.d4410,be=i.d4422,Te=i.d5220,Ce=i.d5232,Se=i.d5421,we=i.d5433,Ee=i.dedt,Pe=i.didt,Ae=i.dmdt,Le=i.dnodt,Me=i.domdt,Re=i.del1,Oe=i.del2,De=i.del3,Ie=i.xfact,Be=i.xlamo,Fe=i.xli,Ne=i.xni,Ge=.0043752690880113,ze=.00015835218,Ue=119459e-10;_e=0,fe<.0052359877&&fe>.0034906585&&(_e=1),fe>=.00826&&fe<=.00924&&ue>=.5&&(_e=2);var Ve=-Ue*M*(G+z);(he<.052359877||he>e-.052359877)&&(Ve=0),0!==A&&(Ve/=A);var ke=-ze*S*(ie+ne);(he<.052359877||he>e-.052359877)&&(ke=0),Me=O*Ue*(U+V-6)-b*Ve+E*ze*(re+oe-6),Le=Ve,0!==A&&(Me-=b/A*ke,Le+=ke/A);var We=(H+W*Ge)%t;if(ue+=(Ee=L*Ue*D+C*ze*P)*k,he+=(Pe=M*Ue*(F+N)+S*ze*(ee+te))*k,ce+=Me*k,pe+=Le*k,de+=(Ae=-Ue*R*(I+B-14-6*le)-ze*w*(Q+J-14-6*le))*k,0!==_e){if(y=Math.pow(fe/s,p),2===_e){var He=ue,qe=le;$=(ue=ae)*(le=se),ue<=.65?(o=3.616-13.247*ue+16.29*le,a=117.39*ue-19.302-228.419*le+156.591*$,l=109.7927*ue-18.9068-214.6334*le+146.5816*$,u=242.694*ue-41.122-471.094*le+313.953*$,c=841.88*ue-146.407-1629.014*le+1083.435*$,h=3017.977*ue-532.114-5740.032*le+3708.276*$):(o=331.819*ue-72.099-508.738*le+266.724*$,a=1582.851*ue-346.844-2415.925*le+1246.113*$,l=1554.908*ue-342.585-2366.899*le+1215.972*$,u=4758.686*ue-1052.797-7193.992*le+3651.957*$,c=16178.11*ue-3581.69-24462.77*le+12422.52*$,h=ue>.715?29936.92*ue-5149.66-54087.36*le+31324.56*$:1464.74-4664.75*ue+3763.64*le),ue<.7?(_=4988.61*ue-919.2277-9064.77*le+5542.21*$,d=4568.6173*ue-822.71072-8491.4146*le+5337.524*$,f=4690.25*ue-853.666-8624.77*le+5341.4*$):(_=161616.52*ue-37995.78-229838.2*le+109377.94*$,d=218913.95*ue-51752.104-309468.16*le+146349.42*$,f=170470.89*ue-40023.88-242699.48*le+115605.82*$),ge=(g=17891679e-13*(x=fe*fe*3*(y*y)))*(n=.75*(1+2*b+(v=b*b)))*(-.306-.44*(ue-.64)),xe=g*(1.5*(m=A*A))*o,ye=(g=3.7393792e-7*(x*=y))*(1.875*A*(1-2*b-3*v))*a,ve=g*(-1.875*A*(1+2*b-3*v))*l,$e=(g=2*(x*=y)*7.3636953e-9)*(35*m*n)*u,be=g*(39.375*m*m)*c,Te=(g=1.1428639e-7*(x*=y))*(9.84375*A*(m*(1-2*b-5*v)+.33333333*(4*b-2+6*v)))*h,Ce=g*(A*(4.92187512*m*(-2-4*b+10*v)+6.56250012*(1+2*b-3*v)))*f,Se=(g=2*x*2.1765803e-9)*(29.53125*A*(2-8*b+v*(8*b-12+10*v)))*d,we=g*(29.53125*A*(-2-8*b+v*(12+8*b-10*v)))*_,Be=(q+Y+Y-(We+We))%t,Ie=j+Ae+2*(Z+Le-Ge)-X,ue=He,le=qe}1===_e&&(r=1+b,Oe=2*(Re=3*fe*fe*y*y)*(n=.75*(1+b)*(1+b))*(1+le*(.8125*le-2.5))*17891679e-13,De=3*Re*(r*=1.875*r*r)*(1+le*(6.60937*le-6))*2.2123015e-7*y,Re=Re*(.9375*A*A*(1+3*b)-.75*(1+b))*(a=1+2*le)*21460748e-13*y,Be=(q+Y+T-We)%t,Ie=j+K+Ae+Me+Le-(X+Ge)),Fe=Be,Ne=X,me=0,fe=X+0}return{em:ue,argpm:ce,inclm:he,mm:de,nm:fe,nodem:pe,irez:_e,atime:me,d2201:ge,d2211:xe,d3210:ye,d3222:ve,d4410:$e,d4422:be,d5220:Te,d5232:Ce,d5421:Se,d5433:we,dedt:Ee,didt:Pe,dmdt:Ae,dndt:0,dnodt:Le,domdt:Me,del1:Re,del2:Oe,del3:De,xfact:Ie,xlamo:Be,xli:Fe,xni:Ne}}({cosim:r,emsq:b,argpo:i.argpo,s1:M,s2:R,s3:O,s4:D,s5:I,sinim:o,ss1:F,ss2:N,ss3:G,ss4:z,ss5:U,sz1:V,sz3:k,sz11:W,sz13:H,sz21:q,sz23:j,sz31:X,sz33:Y,t:i.t,tc:0,gsto:i.gsto,mo:i.mo,mdot:i.mdot,no:i.no,nodeo:i.nodeo,nodedot:i.nodedot,xpidot:te,z1:ne,z3:re,z11:oe,z13:ae,z21:se,z23:le,z31:ue,z33:ce,ecco:i.ecco,eccsq:we,em:y,argpm:0,inclm:S,mm:0,nm:w,nodem:0,irez:i.irez,atime:i.atime,d2201:i.d2201,d2211:i.d2211,d3210:i.d3210,d3222:i.d3222,d4410:i.d4410,d4422:i.d4422,d5220:i.d5220,d5232:i.d5232,d5421:i.d5421,d5433:i.d5433,dedt:i.dedt,didt:i.didt,dmdt:i.dmdt,dnodt:i.dnodt,domdt:i.domdt,del1:i.del1,del2:i.del2,del3:i.del3,xfact:i.xfact,xlamo:i.xlamo,xli:i.xli,xni:i.xni});i.irez=Be.irez,i.atime=Be.atime,i.d2201=Be.d2201,i.d2211=Be.d2211,i.d3210=Be.d3210,i.d3222=Be.d3222,i.d4410=Be.d4410,i.d4422=Be.d4422,i.d5220=Be.d5220,i.d5232=Be.d5232,i.d5421=Be.d5421,i.d5433=Be.d5433,i.dedt=Be.dedt,i.didt=Be.didt,i.dmdt=Be.dmdt,i.dnodt=Be.dnodt,i.domdt=Be.domdt,i.del1=Be.del1,i.del2=Be.del2,i.del3=Be.del3,i.xfact=Be.xfact,i.xlamo=Be.xlamo,i.xli=Be.xli,i.xni=Be.xni}1!==i.isimp&&(l=i.cc1*i.cc1,i.d2=4*be*ee*l,Z=i.d2*ee*i.cc1/3,i.d3=(17*be+B)*Z,i.d4=.5*Z*be*ee*(221*be+31*B)*i.cc1,i.t3cof=i.d2+2*l,i.t4cof=.25*(3*i.d3+i.cc1*(12*i.d2+10*l)),i.t5cof=.2*(3*i.d4+12*i.cc1*i.d3+6*i.d2*i.d2+15*l*(2*i.d2+l)))}$(i,0),i.init="n"}function T(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return C(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function S(e){return e*n}function w(e){return e*i}function E(e){var t=e.longitude,i=e.latitude,n=e.height,r=6378.137,o=.006694380004260718,a=r/Math.sqrt(1-o*(Math.sin(i)*Math.sin(i)));return{x:(a+n)*Math.cos(i)*Math.cos(t),y:(a+n)*Math.cos(i)*Math.sin(t),z:(a*(1-o)+n)*Math.sin(i)}}var P={constants:Object.freeze({__proto__:null,deg2rad:i,earthRadius:a,j2:c,j3:h,j3oj2:f,j4:d,minutesPerDay:r,mu:o,pi:e,rad2deg:n,tumin:u,twoPi:t,vkmpersec:l,x2o3:p,xke:s}),propagate:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],o=Array.prototype.slice.call(t,1),a=g.apply(void 0,T(o)),s=(a-n.jdsatepoch)*r;return $(n,s)},sgp4:$,twoline2satrec:function(t,n){var r=1440/(2*e),o=0,a={error:0};a.satnum=t.substring(2,7),a.epochyr=parseInt(t.substring(18,20),10),a.epochdays=parseFloat(t.substring(20,32)),a.ndot=parseFloat(t.substring(33,43)),a.nddot=parseFloat(".".concat(parseInt(t.substring(44,50),10),"E").concat(t.substring(50,52))),a.bstar=parseFloat("".concat(t.substring(53,54),".").concat(parseInt(t.substring(54,59),10),"E").concat(t.substring(59,61))),a.inclo=parseFloat(n.substring(8,16)),a.nodeo=parseFloat(n.substring(17,25)),a.ecco=parseFloat(".".concat(n.substring(26,33))),a.argpo=parseFloat(n.substring(34,42)),a.mo=parseFloat(n.substring(43,51)),a.no=parseFloat(n.substring(52,63)),a.nc=parseFloat(n.substring(52,63)),a.no/=r,a.inclo*=i,a.nodeo*=i,a.argpo*=i,a.mo*=i;var s=_(o=a.epochyr<57?a.epochyr+2e3:a.epochyr+1900,a.epochdays),l=s.mon,u=s.day,c=s.hr,h=s.minute,d=s.sec;return a.jdsatepoch=g(o,l,u,c,h,d),b(a,{opsmode:"i",satn:a.satnum,epoch:a.jdsatepoch-2433281.5,xbstar:a.bstar,xecco:a.ecco,xargpo:a.argpo,xinclo:a.inclo,xmo:a.mo,xno:a.no,xnodeo:a.nodeo}),a},gstime:v,jday:g,invjday:function(e,t){var i=e-2415019.5,n=i/365.25,r=1900+Math.floor(n),o=Math.floor(.25*(r-1901)),a=i-(365*(r-1900)+o)+1e-11;a<1&&(a=i-(365*((r-=1)-1900)+(o=Math.floor(.25*(r-1901)))));var s=_(r,a),l=s.mon,u=s.day,c=s.hr,h=s.minute,d=s.sec-864e-9;return t?[r,l,u,c,h,Math.floor(d)]:new Date(Date.UTC(r,l-1,u,c,h,Math.floor(d)))},dopplerFactor:function(e,t,i){var n=7292115e-11,r={x:t.x-e.x,y:t.y-e.y,z:t.z-e.z};r.w=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)+Math.pow(r.z,2));var o=i.x+n*e.y,a=i.y-n*e.x,s=i.z,l=(r.x*o+r.y*a+r.z*s)/r.w;return 1+l/299792.458*(l>=0?1:-1)},radiansToDegrees:S,degreesToRadians:w,degreesLat:function(t){if(t<-e/2||t>e/2)throw new RangeError("Latitude radians must be in range [-pi/2; pi/2].");return S(t)},degreesLong:function(t){if(t<-e||t>e)throw new RangeError("Longitude radians must be in range [-pi; pi].");return S(t)},radiansLat:function(e){if(e<-90||e>90)throw new RangeError("Latitude degrees must be in range [-90; 90].");return w(e)},radiansLong:function(e){if(e<-180||e>180)throw new RangeError("Longitude degrees must be in range [-180; 180].");return w(e)},geodeticToEcf:E,eciToGeodetic:function(i,n){for(var r=6378.137,o=Math.sqrt(i.x*i.x+i.y*i.y),a=.006694380004260718,s=Math.atan2(i.y,i.x)-n;s<-e;)s+=t;for(;s>e;)s-=t;for(var l,u=0,c=Math.atan2(i.z,Math.sqrt(i.x*i.x+i.y*i.y));u<20;)l=1/Math.sqrt(1-a*(Math.sin(c)*Math.sin(c))),c=Math.atan2(i.z+r*l*a*Math.sin(c),o),u+=1;return{longitude:s,latitude:c,height:o/Math.cos(c)-r*l}},eciToEcf:function(e,t){return{x:e.x*Math.cos(t)+e.y*Math.sin(t),y:e.x*-Math.sin(t)+e.y*Math.cos(t),z:e.z}},ecfToEci:function(e,t){return{x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t),z:e.z}},ecfToLookAngles:function(t,i){var n,r,o,a,s,l,u,c,h,d,f,p,_,m,g=(r=i,o=(n=t).longitude,a=n.latitude,s=E(n),l=r.x-s.x,u=r.y-s.y,c=r.z-s.z,{topS:Math.sin(a)*Math.cos(o)*l+Math.sin(a)*Math.sin(o)*u-Math.cos(a)*c,topE:-Math.sin(o)*l+Math.cos(o)*u,topZ:Math.cos(a)*Math.cos(o)*l+Math.cos(a)*Math.sin(o)*u+Math.sin(a)*c});return d=(h=g).topS,f=h.topE,p=h.topZ,_=Math.sqrt(d*d+f*f+p*p),m=Math.asin(p/_),{azimuth:Math.atan2(-f,d)+e,elevation:m,rangeSat:_}}};return P}));var _0x3121bb=SatelliteToolkit;const _0x25a3bb=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x571615=_0x25a3bb(void 0,(function(){return _0x571615.toString().search("(((.+)+)+)+$").toString().constructor(_0x571615).search("(((.+)+)+)+$")}));_0x571615();class _0x5bf86f{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._name=WebGLPlot$e.defaultValue(e.name,void 0),this._tleLine1=WebGLPlot$e.defaultValue(e.tleLine1,void 0),this._tleLine2=WebGLPlot$e.defaultValue(e.tleLine2,void 0),this._networking=WebGLPlot$e.defaultValue(e.networking,void 0),this._mapExtendProperty=new Map,this._satrec=_0x3121bb.twoline2satrec(this._tleLine1,this._tleLine2)}setName(e){this._name}getName(){return this._name}getUUID(){return this._name+" #"+this._satrec.satnum}setNetworking(e){this._networking=e}getNetworking(){return this._networking}getPositionEci(e){let t=null,i=_0x3121bb.propagate(this._satrec,new Date(e)).position;return WebGLPlot$e.defined(i)&&!isNaN(i.x)&&!isNaN(i.y)&&!isNaN(i.z)&&(t=new WebGLPlot$e.Cartesian3(1e3*i.x,1e3*i.y,1e3*i.z)),t}getPositionMatrix(e){var t=new WebGLPlot$e.HeadingPitchRoll;const i=this.getPositionEci(e),n=this.getPositionEci(e+1e3),r=_0xf52e1d.getHeading(i,n);r&&(t.heading=r);const o=_0xf52e1d.getPitch(i,n);return o&&(t.pitch=o),WebGLPlot$e.Transforms.headingPitchRollToFixedFrame(i,t,WebGLPlot$e.Ellipsoid.WGS84,new WebGLPlot$e.Transforms.localFrameToFixedFrameGenerator("north","west"))}getOrbitPoints(e){let t=864e5/this._satrec.nc/100,i=[];for(let n=0;n<100;n++){let r=e+parseInt(n*t),o=this.getPositionEci(r);null!=o&&i.push(o)}return i.push(i[0].clone()),i}getExtendProperty(e){return this._mapExtendProperty.get(e)}setExtendProperty(e,t){this._mapExtendProperty.set(e,t)}removeExtendProperty(e){this._mapExtendProperty.delete(e)}getllExtendProperty(){return this._mapExtendProperty}removeAllExtendProperty(){this._mapExtendProperty.clear()}toGeoJson(){let e={};if(!e.hasOwnProperty("SatelliteProperty")){const e=Object.fromEntries(_mapExtendProperty);dataJSON.SatelliteProperty=e}return JSON.stringify(e)}fromGeoJson(e){let t=e.SatelliteProperty;_mapExtendProperty=new Map(Object.entries(t))}clone(){let e=new _0x5bf86f({name:this._name,tleLine1:this._tleLine1,tleLine2:this._tleLine2,networking:this._networking});return this._mapExtendProperty.forEach(((t,i)=>{e._mapExtendProperty.set(i,t)})),e}}const _0x35cd1f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xad5652=_0x35cd1f(void 0,(function(){return _0xad5652.toString().search("(((.+)+)+)+$").toString().constructor(_0xad5652).search("(((.+)+)+)+$")}));_0xad5652();class _0x464966{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._groupName=WebGLPlot$e.defaultValue(e.groupName,""),this._modelPath=WebGLPlot$e.defaultValue(e.modelPath,""),this._modelScale=WebGLPlot$e.defaultValue(e.modelScale,1e4),this._visible=WebGLPlot$e.defaultValue(e.visible,!0),this._orbitsVisible=WebGLPlot$e.defaultValue(e.orbitsVisible,!0),this._orbitsWidth=WebGLPlot$e.defaultValue(e.orbitsWidth,1),this._orbitsColor=WebGLPlot$e.defaultValue(e.orbitsColor,new WebGLPlot$e.Color(.8,.8,.2,.39)),this._tleFilePaths=WebGLPlot$e.defaultValue(e.tleFilePaths,[]),this._scene=void 0,this._mapSatellites=new Map,this._tleInfos=[],this._lUTCtime=void 0,this._isModel=void 0,this._satelliteCollection=void 0,this._orbitsCollection=[],this._POLYLINE_ALL_COUNT=150}setScene(e){if(WebGLPlot$e.defined(e)){this._scene=e,this._scene.primitives.add(this._satelliteCollection);const t=this._orbitsCollection.length;for(let e=0;e<t;e++)this._scene.primitives.add(this._orbitsCollection[e])}}getAllSatelliteScale(){return this._modelScale}setAllSatelliteScale(e){const t=this._satelliteCollection.length;for(let i=0;i<t;i++){this._satelliteCollection.get(i).scale=e}this._modelScale=e,this._saveToScheme()}isVisible(){return this._visible}setVisible(e){this._visible=e;const t=this._satelliteCollection.length;for(let i=0;i<t;i++){this._satelliteCollection.get(i).show=e}let i=!1;this._visible&&this._orbitsVisible&&(i=!0);for(let e=0;e<this._orbitsCollection.length;e++)this._orbitsCollection[e].visible=i;this._saveToScheme()}isOrbitsVisible(){return this._orbitsVisible}setOrbitsVisible(e){this._orbitsVisible=e;let t=!1;this._visible&&this._orbitsVisible&&(t=!0);const i=this._orbitsCollection.length;for(let e=0;e<i;e++)this._orbitsCollection[e].visible=t;this._saveToScheme()}getOrbitsWidth(){return Number(this._orbitsWidth)}setOrbitsWidth(e){const t=this._orbitsCollection.length;for(let i=0;i<t;i++)this._orbitsCollection[i].orbitsWidth=e;this._orbitsWidth=e,this._saveToScheme()}getOrbitsColor(){return this._orbitsColor}setOrbitsColor(e){const t=this._orbitsCollection.length;for(let i=0;i<t;i++)this._orbitsCollection[i].orbitsColor=e;this._orbitsColor=e,this._saveToScheme()}getGroupName(){return this._groupName}getSatelliteFileNames(){let e=[];const t=this._tleInfos.length;for(let i=0;i<t;i++)e.push(this._tleInfos[i].fileName);return e}getSatellites(e){const t=this._tleInfos.length;for(let i=0;i<t;i++){const t=this._tleInfos[i];if(t.fileName===e)return t.satellites}return[]}getSatellitePos(e){let t=null;const i=this._satelliteCollection.length;for(let n=0;n<i;n++){const i=this._satelliteCollection.get(n);if(WebGLPlot$e.defined(i)&&i.id===e){t=this._isModel?_0xf52e1d.getPositionFromModelMatrix(i.modelMatrix):_0xf52e1d.cartesian3ToDegrees(i.position);break}}return t}getSatelliteZRotation(e){let t=new _0x23de81(0,0,0);const i=this._satelliteCollection.length;for(let r=0;r<i;r++){const i=this._satelliteCollection.get(r);if(WebGLPlot$e.defined(i)&&i.id===e&&this._isModel){const i=this._mapSatellites.get(e);var n=new WebGLPlot$e.HeadingPitchRoll;const r=i.getPositionEci(this._lUTCtime),o=i.getPositionEci(this._lUTCtime+1e3),a=_0xf52e1d.getHeading(r,o);a&&(n.heading=a);const s=_0xf52e1d.getPitch(r,o);s&&(n.pitch=s),t=new _0x23de81(WebGLPlot$e.CesiumMath.toDegrees(n.pitch),WebGLPlot$e.CesiumMath.toDegrees(n.roll),WebGLPlot$e.CesiumMath.toDegrees(n.heading))}}return t}setGroupModelPath(e){if(WebGLPlot$e.defined(e)&&-1!==e.lastIndexOf(".")){WebGLPlot$e.defined(this._satelliteCollection)&&WebGLPlot$e.defined(this._scene)&&this._scene.primitives.contains(this._satelliteCollection)&&this._scene.primitives.remove(this._satelliteCollection),this._modelPath=e,this._isModel=this._isModelPath(e),this._isModel?this._satelliteCollection=new WebGLPlot$e.PrimitiveCollection:this._satelliteCollection=new WebGLPlot$e.BillboardCollection;for(let e of this._mapSatellites.values())if(this._isModel){let t=e.getPositionMatrix(this._lUTCtime);this._satelliteCollection.add(WebGLPlot$e.Model.fromGltf({id:e.getUUID(),url:this._modelPath,scale:this._modelScale,modelMatrix:t,show:this._visible}))}else{const t=e.getPositionEci(this._lUTCtime);this._satelliteCollection.add({id:e.getUUID(),position:t,image:this._modelPath,scale:this._modelScale,horizontalOrigin:WebGLPlot$e.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$e.VerticalOrigin.CENTER,show:this._visible})}WebGLPlot$e.defined(this._scene)&&this._scene.primitives.add(this._satelliteCollection),this._saveToScheme()}}getGroupModelPath(){return this._modelPath}setGroupModelScale(e){this._modelScale=e;const t=this._satelliteCollection.length;for(let i=0;i<t;i++){let t=this._satelliteCollection.get(i);WebGLPlot$e.defined(t)&&(t.scale=e)}this._saveToScheme()}getGroupModelScale(){return this._modelScale}isModel(){return this._isModel}updateAllSatellitePosition(e){const t=this._satelliteCollection.length;for(let i=0;i<t;i++){const t=this._satelliteCollection.get(i);if(!WebGLPlot$e.defined(t))continue;let n=this.getSatelliteByUUID(t.id);if(!WebGLPlot$e.defined(n))continue;let r=n.getPositionEci(e);WebGLPlot$e.defined(r)&&(this._isModel?t.modelMatrix=n.getPositionMatrix(e):t.position=r)}}updateAllOrbitPosition(e){const t=this._orbitsCollection.length;for(let i=0;i<t;i++){const t=this._orbitsCollection[i].length;for(let n=0;n<t;n++){let t=this._orbitsCollection[i].get(n),r=this._mapSatellites.get(t.id);WebGLPlot$e.defined(r)&&(t.point3Ds=r.getPositionMatrix(e))}}}getSatelliteByUUID(e){return this._mapSatellites.get(e)}_removeSatelliteFromScene(e){if(!WebGLPlot$e.defined(e))return!1;let t=!1;const i=this._satelliteCollection.length;let n=null;for(let t=0;t<i;t++){const i=this._satelliteCollection.get(t);if(WebGLPlot$e.defined(i)&&i.id===e){n=i;break}}null!=n&&(this._satelliteCollection.remove(n),t=!0);let r=!1;const o=this._orbitsCollection.length;for(let t=0;t<o&&!r;t++){let i=null,n=this._orbitsCollection[t];const o=n.length;for(let t=0;t<o;t++){const r=n.get(t);if(WebGLPlot$e.defined(r)&&r.id===e){i=r;break}}null!=i&&(n.remove(i),r=!0)}return t&&r}_addSatelliteToScene(e){if(!WebGLPlot$e.defined(e))return!1;const t=this._mapSatellites.get(e);if(!WebGLPlot$e.defined(t))return!1;if(this._isModel){let e=t.getPositionMatrix(this._lUTCtime);this._satelliteCollection.add(WebGLPlot$e.Model.fromGltf({id:t.getUUID(),url:this._modelPath,scale:this._modelScale,modelMatrix:e,show:this._visible}))}else{const e=t.getPositionEci(this._lUTCtime);this._satelliteCollection.add({id:t.getUUID(),position:e,image:this._modelPath,scale:this._modelScale,horizontalOrigin:WebGLPlot$e.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$e.VerticalOrigin.CENTER,show:this._visible})}const i=t.getOrbitPoints(this._lUTCtime);let n=this._orbitsCollection[this._orbitsCollection.length-1];return n.add({id:t.getUUID(),positions:i}),n.orbitsColor=this._orbitsColor,n.orbitsWidth=this._orbitsWidth,n.orbitsVisible=this._orbitsVisible,!0}fromJson(e){if(!WebGLPlot$e.defined(e))return;let t=JSON.parse(e);WebGLPlot$e.defined(t.groupName)&&(this._groupName=t.groupName),WebGLPlot$e.defined(t.modelPath)&&(this._modelPath=t.modelPath),WebGLPlot$e.defined(t.modelScale)&&(this._modelScale=t.modelScale),WebGLPlot$e.defined(t.visible)&&(this._visible=t.visible),WebGLPlot$e.defined(t.orbitsVisible)&&(this._orbitsVisible=t.orbitsVisible),WebGLPlot$e.defined(t.orbitsWidth)&&(this._orbitsWidth=t.orbitsWidth),WebGLPlot$e.defined(t.orbitsColor)&&(this._orbitsColor=WebGLPlot$e.Color.fromCssColorString(t.orbitsColor)),WebGLPlot$e.defined(t.tleFilePaths)&&(this._tleFilePaths=[],t.tleFilePaths.forEach((e=>{this._tleFilePaths.push(e)})))}toJson(){let e={};e.hasOwnProperty("groupName")||(e.groupName=this._groupName),e.hasOwnProperty("modelPath")||(e.modelPath=this._modelPath),e.hasOwnProperty("modelScale")||(e.modelScale=this._modelScale),e.hasOwnProperty("visible")||(e.visible=this._visible),e.hasOwnProperty("orbitsVisible")||(e.orbitsVisible=this._orbitsVisible),e.hasOwnProperty("orbitsWidth")||(e.orbitsWidth=this._orbitsWidth),e.hasOwnProperty("orbitsColor")||(e.orbitsColor=this._orbitsColor.toCssColorString());let t=[];return e.hasOwnProperty("tleFilePaths")||(this._tleFilePaths.forEach((e=>{t.push(e)})),e.tleFilePaths=t),JSON.stringify(e)}initGroup(){if(!WebGLPlot$e.defined(this._modelPath)||!WebGLPlot$e.defined(this._tleFilePaths)||!WebGLPlot$e.defined(this._groupName))return;let e=_0x2e28f1.getInstance().getURI();if(!WebGLPlot$e.defined(e))return;this._lUTCtime=Date.now(),this._isModel=this._isModelPath(this._modelPath),this._isModel?this._satelliteCollection=new WebGLPlot$e.PrimitiveCollection:this._satelliteCollection=new WebGLPlot$e.BillboardCollection,this._POLYLINE_ALL_COUNT=150,this._orbitsCollection=[],this._orbitsCollection.push(new _0x415334),this._tleInfos=[];let t=this._tleFilePaths.length;for(let i=0;i<t;i++){let t=this._loadTLE(e+this._tleFilePaths[i]);WebGLPlot$e.defined(t)&&(this._tleInfos.push(t),this._addSatellites(t))}this.setOrbitsColor(this._orbitsColor),this.setOrbitsWidth(this._orbitsWidth),this.setOrbitsVisible(this._orbitsVisible)}destory(){if(WebGLPlot$e.defined(this._scene)){WebGLPlot$e.defined(this._satelliteCollection)&&this._scene.primitives.remove(this._satelliteCollection);const e=this._orbitsCollection.length;for(let t=0;t<e;t++)WebGLPlot$e.defined(this._orbitsCollection[t])&&this._scene.primitives.remove(this._orbitsCollection[t])}this._satelliteCollection=void 0,this._orbitsCollection=[],this._tleInfos=[]}_loadTLE(e){if(!WebGLPlot$e.defined(e))return null;var t=(e=e.replace(/\\+/g,"/")).lastIndexOf("/");if(-1==t)return null;let i=e.substring(t+1),n=i.substring(0,i.lastIndexOf(".")),r=[];var o;(o=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open("GET",e,!1),o.send();let a=o.responseText.split(/\r\n/).filter((function(e){return e&&e.trim()})),s=0,l=a.length/3;for(let e=0;e<l;e++){let e=new _0x5bf86f({name:a[s].trim(),tleLine1:a[s+1].trim(),tleLine2:a[s+2].trim(),networking:n});null!=e&&r.push(e),s+=3}return{fileName:n,filePath:e,satellites:r}}_addSatellites(e){let t=this._orbitsCollection[this._orbitsCollection.length-1],i=e.satellites.length;for(let n=0;n<i;n++){let i=e.satellites[n];if(!WebGLPlot$e.defined(i))continue;this._mapSatellites.set(i.getUUID(),i);const r=i.getPositionEci(this._lUTCtime);if(null==r)continue;const o=i.getOrbitPoints(this._lUTCtime);if(WebGLPlot$e.defined(o)&&0!=o.length){if(this._isModel){let e=i.getPositionMatrix(this._lUTCtime);this._satelliteCollection.add(WebGLPlot$e.Model.fromGltf({id:i.getUUID(),url:this._modelPath,scale:this._modelScale,modelMatrix:e,show:this._visible}))}else this._satelliteCollection.add({id:i.getUUID(),position:r,image:this._modelPath,scale:this._modelScale,horizontalOrigin:WebGLPlot$e.HorizontalOrigin.CENTER,verticalOrigin:WebGLPlot$e.VerticalOrigin.CENTER,show:this._visible});t.length>this._POLYLINE_ALL_COUNT&&(t=new _0x415334,this._orbitsCollection.push(t)),t.add({id:i.getUUID(),positions:o})}}}_saveToScheme(){_0x2e28f1.getInstance().getSatelliteManager()._setIsModify(!0),_0x2e28f1.getInstance().getSatelliteManager()._save()}_isModelPath(e){let t=!1;if(WebGLPlot$e.defined(e)){let i=e.lastIndexOf(".");if(-1!=i){let n=e.substring(i+1).toUpperCase();("GLTF"===n||"GLB"===n)&&(t=!0)}}return t}}const _0x4ad14a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2cb9a4=_0x4ad14a(void 0,(function(){return _0x2cb9a4.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cb9a4).search("(((.+)+)+)+$")}));_0x2cb9a4();class _0x5e00a7{constructor(){this._scene=void 0,this._arrSatelliteGroup=[],this._isModified=!1}setScene(e){this._scene=e}getGroups(){return this._arrSatelliteGroup}getGroup(e){const t=this._arrSatelliteGroup.length;for(let i=0;i<t;i++)if(this._arrSatelliteGroup[i].getGroupName()===e)return this._arrSatelliteGroup[i];return null}updateAllSatellitePosition(e){const t=this._arrSatelliteGroup.length;for(let i=0;i<t;i++)this._arrSatelliteGroup[i].updateAllSatellitePosition(e)}updateAllOrbitPosition(e){const t=this._arrSatelliteGroup.length;for(let e=0;e<t;e++)this._arrSatelliteGroup[e].updateAllOrbitPosition()}fromJson(e){let t=this._arrSatelliteGroup.length;for(let e=0;e<t;e++)this._arrSatelliteGroup[e].destory();if(this._arrSatelliteGroup=[],e.length>0){let t=JSON.parse(e);WebGLPlot$e.defined(t.groups)&&t.groups.forEach((e=>{let t=new _0x464966;t.fromJson(JSON.stringify(e)),t.initGroup(),WebGLPlot$e.defined(this._scene)&&t.setScene(this._scene),this._arrSatelliteGroup.push(t)}))}}toJson(){let e={},t=[];return this._arrSatelliteGroup.forEach((e=>{t.push(JSON.parse(e.toJson()))})),e.hasOwnProperty("groups")||(e.groups=t),JSON.stringify(e)}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){this._isModified&&_0x2e28f1.getInstance()._saveSatelliteGroups(!1)}}const _0x32aff3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x42111d=_0x32aff3(void 0,(function(){return _0x42111d.toString().search("(((.+)+)+)+$").toString().constructor(_0x42111d).search("(((.+)+)+)+$")}));_0x42111d();const _0x1cc0d7={ENTITY:0,SCRIPT:1,SATELLITE:2};var _0x489b6c=Object.freeze(_0x1cc0d7);const _0x28c581=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x275ee3=_0x28c581(void 0,(function(){return _0x275ee3.toString().search("(((.+)+)+)+$").toString().constructor(_0x275ee3).search("(((.+)+)+)+$")}));_0x275ee3();class _0x2e5655 extends _0x3fd6e5{constructor(e){super(e.geoGraphicObject),this._satelliteGroupName=e.satelliteGroupName,this._satellite=e.satellite,this._orbit=e.orbit,this._name=this._satellite.getUUID(),this._orbitVisible=void 0,WebGLPlot$e.defined(e.orbit)&&(this.setOrbitVisible(e.orbitVisible),this.setOrbitWidth(e.orbitWidth),this.setOrbitColor(e.orbitColor))}setGeoEntityParameter(e){super.setGeoEntityParameter(e),e.isVisible()&&this._orbitVisible?this._orbit.show=!0:this._orbit.show=!1,this._isModified=!0,this._save()}getSatellite(){return this._satellite}getSatelliteGroupName(){return this._satelliteGroupName}getOrbit(){return this._orbit}isOrbitVisible(){if(WebGLPlot$e.defined(this._orbit))return this._orbit.show}setOrbitVisible(e){this.getGeoEntityParameter().isVisible()&&e?this._orbit.show=!0:this._orbit.show=!1,this._orbitVisible=e,this._isModified=!0,this._save()}getOrbitWidth(){if(WebGLPlot$e.defined(this._orbit))return this._orbit.width}setOrbitWidth(e){this._orbit.width=e,this._isModified=!0,this._save()}getOrbitColor(){if(WebGLPlot$e.defined(this._orbit))return this._orbit.material.uniforms.color}setOrbitColor(e){this._orbit.material.uniforms.color=e,this._isModified=!0,this._save()}updateOrbitPosition(e){let t=this._satellite.getOrbitPoints(e);this._orbit.positions=t}toJson(){let e=super.toJson();if(""==e)return"";let t=JSON.parse(e);t.hasOwnProperty("satellite")||(t.satellite={},t.satellite.hasOwnProperty("satelliteGroupName")||(t.satellite.satelliteGroupName=this._satelliteGroupName),t.satellite.hasOwnProperty("satelliteUUID")||(t.satellite.satelliteUUID=this._satellite.getUUID()));return t.hasOwnProperty("orbit")||(t.orbit={},t.orbit.hasOwnProperty("orbitVisible")||(t.orbit.orbitVisible=this._orbitVisible),t.orbit.hasOwnProperty("orbitWidth")||(t.orbit.orbitWidth=this._orbit.width),t.orbit.hasOwnProperty("orbitColor")||(t.orbit.orbitColor=this._orbit.material.uniforms.color.toCssColorString())),JSON.stringify(t)}fromJson(e){return super.fromJson(e)}_save(){this._isMoveGeoEntity||_0x2e28f1.getInstance()._saveSatelliteGeoEntity(!1)}}const _0x5a3eb3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x45d966=_0x5a3eb3(void 0,(function(){return _0x45d966.toString().search("(((.+)+)+)+$").toString().constructor(_0x45d966).search("(((.+)+)+)+$")}));_0x45d966();class _0x535f91{constructor(){this._mapSatelliteEntitys=new Map,this._scene=void 0,this._geoEntityLayer=void 0,this._satelliteOrbitsLayer=new _0x415334,this._addGeoEntitys=[],this._removeEntityUUIDs=[]}setScene(e){WebGLPlot$e.defined(e)&&(this._geoEntityLayer=new _0x394df6(e,"SatelliteEntitys"),e.plotLayers.add(this._geoEntityLayer),e.primitives.add(this._satelliteOrbitsLayer),this._scene=e)}addSatelliteEntity(e,t,i,n){if(!WebGLPlot$e.defined(t))return;const r=t.getGroup(i);if(!WebGLPlot$e.defined(r))return;let o=r.getSatelliteByUUID(e);if(!WebGLPlot$e.defined(o))return;let a=o.getName(),s=r.getAllSatelliteScale(),l=r.getOrbitsWidth(),u=r.getOrbitsColor(),c=r.getSatelliteZRotation(o.getUUID()),h=r.getSatellitePos(o.getUUID()),d=r.getGroupModelPath(),f=r.isModel(),p=this;if(f)this._geoEntityLayer.createSymbol(0,99999,[h],{url:d},(function(e){if(WebGLPlot$e.defined(e)){e.feature.__dotPlotLibID=0,e.feature.__dotPlotCode=99998;let t=o.getOrbitPoints(r._lUTCtime),h=p._satelliteOrbitsLayer.add({id:o.getUUID(),positions:t}),d=new _0x2e5655({geoGraphicObject:e.feature,satelliteGroupName:i,satellite:o,orbit:h,orbitWidth:l,orbitColor:u,orbitVisible:true});e.feature.setGeoEntity(d),p._mapSatelliteEntitys.set(d.getUUID(),d),p._addGeoEntitys.push(d),p._save();let f=d.getGeoEntityParameter();f.setModelScale(s),f.setModelRotate(c),d.setGeoEntityParameter(f),d.setName(a),r._removeSatelliteFromScene(o.getUUID()),"function"==typeof n&&n({uuid:d.getUUID()})}}));else{let e=new Image;e.src=d,e.onload=function(){let t=new WebGLPlot$e.Cartesian2(e.width*s,e.height*s),c=p;p._geoEntityLayer.createSymbol(0,20,[h],{url:d},(function(e){if(WebGLPlot$e.defined(e)){e.feature.__dotPlotLibID=0,e.feature.__dotPlotCode=99998,e.feature.anchorPoint=new WebGLPlot$e.Cartesian2(.5,1.5);let s=o.getOrbitPoints(r._lUTCtime),h=c._satelliteOrbitsLayer.add({id:o.getUUID(),positions:s}),d=new _0x2e5655({geoGraphicObject:e.feature,satelliteGroupName:i,satellite:o,orbit:h,orbitWidth:l,orbitColor:u,orbitVisible:true});e.feature.setGeoEntity(d),c._mapSatelliteEntitys.set(d.getUUID(),d),c._addGeoEntitys.push(d),c._save();let f=d.getGeoEntityParameter();f.setPictureSymbolSize(t),d.setGeoEntityParameter(f),d.setName(a),r._removeSatelliteFromScene(o.getUUID()),"function"==typeof n&&n({uuid:d.getUUID()})}}))}}}removeSatelliteEntity(e,t){let i=this._convertEntityToSatellite(e,t);return i&&(this._removeEntityUUIDs.push(e),this._save()),i}getSatelliteEntityByUUID(e){return this._mapSatelliteEntitys.get(e)}getSatelliteEntitys(){let e=[];for(let t of this._mapSatelliteEntitys.values())e.push(t);return e}updateAllSatelliteEntityPosition(e){for(let t of this._mapSatelliteEntitys.values()){let i=t.getSatellite();if(WebGLPlot$e.defined(i)){let n=i.getPositionEci(e);if(WebGLPlot$e.defined(n)){let e=t.getGeoEntityParameter();e.setPosition(_0xf52e1d.cartesian3ToDegrees(n)),t.setGeoEntityParameter(e)}}}}updateAllOrbitPosition(e){for(let t of this._mapSatelliteEntitys.values())t.updateOrbitPosition(e)}removeAllSatelliteEntity(e){this._mapSatelliteEntitys.forEach(((t,i)=>{this._convertEntityToSatellite(i,e)&&this._removeEntityUUIDs.push(i)})),this._mapSatelliteEntitys.clear(),this._save()}toJson(){let e=new Map;return this._mapSatelliteEntitys.forEach(((t,i)=>{e.set(t.getUUID(),t.toJson())})),e}fromJson(e,t){let i=e.satelliteEntityJsons,n=e.satelliteManager;if(this.removeAllSatelliteEntity(n),!WebGLPlot$e.defined(this._geoEntityLayer))return;let r=this,o=[];i.forEach(((e,a)=>{let s=JSON.parse(e);WebGLPlot$e.defined(s.geoGraphicObject)&&this._geoEntityLayer.geoJsonToGeoGraphicObject(JSON.parse(s.geoGraphicObject),(function(e){if(WebGLPlot$e.defined(e)){let a=e.feature;if(WebGLPlot$e.defined(a)){let e,l,u,c,h;if(WebGLPlot$e.defined(s.satellite)&&(e=n.getGroup(s.satellite.satelliteGroupName),l=e.getSatelliteByUUID(s.satellite.satelliteUUID)),WebGLPlot$e.defined(s.orbit)&&(u=s.orbit.orbitVisible,c=s.orbit.orbitWidth,h=WebGLPlot$e.Color.fromCssColorString(s.orbit.orbitColor)),WebGLPlot$e.defined(s.geoEntity)&&WebGLPlot$e.defined(e)&&WebGLPlot$e.defined(l)){let n=l.getOrbitPoints(e._lUTCtime),d=r._satelliteOrbitsLayer.add({id:l.getUUID(),positions:n}),f=new _0x2e5655({geoGraphicObject:a,satelliteGroupName:e.getGroupName(),satellite:l,orbit:d,orbitWidth:c,orbitColor:h,orbitVisible:u});f.fromJson(s.geoEntity),a.setGeoEntity(f),r._mapSatelliteEntitys.set(f.getUUID(),f),o.push(f.getUUID()),"function"==typeof t&&o.length===i.size&&t({UUIDs:o})}}}}))}))}_convertEntityToSatellite(e,t){if(!WebGLPlot$e.defined(t))return!1;const i=this._mapSatelliteEntitys.get(e);if(!WebGLPlot$e.defined(i))return!1;const n=i.getSatelliteGroupName();if(!WebGLPlot$e.defined(n))return!1;this._satelliteOrbitsLayer.remove(i.getOrbit()),this._mapSatelliteEntitys.delete(e);let r=i._getGeoGraphicObject();WebGLPlot$e.defined(r)&&(r.removeAllGeoEffect(),this._geoEntityLayer.removeGeoGraphicObject(r));const o=t.getGroup(n);return!!WebGLPlot$e.defined(o)&&(o._addSatelliteToScene(i.getSatellite().getUUID()),!0)}_removeAllSatelliteEntityFromScene(e){this._mapSatelliteEntitys.forEach(((t,i)=>{this._convertEntityToSatellite(i,e)})),this._mapSatelliteEntitys.clear()}_getAddAndRemoveGeoEntitys(){return{add:this._addGeoEntitys,remove:this._removeEntityUUIDs}}_clearAddAndRemoveGeoEntitys(){this._addGeoEntitys.splice(0),this._removeEntityUUIDs.splice(0)}_save(){_0x2e28f1.getInstance()._saveSatelliteGeoEntity(!1)}}const _0x3db4e9=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x251594=_0x3db4e9(void 0,(function(){return _0x251594.toString().search("(((.+)+)+)+$").toString().constructor(_0x251594).search("(((.+)+)+)+$")}));_0x251594();class _0x56b6ed{constructor(e){this._UUID=WebGLPlot$e.createGuid(),this._geoEntityParameter=WebGLPlot$e.defaultValue(e,new _0x4920fc)}_getGeoEntityParameter(){return this._geoEntityParameter}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityParameter")||(e.geoEntityParameter=this._geoEntityParameter._toJson()),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.geoEntityParameter)&&this._geoEntityParameter._fromJson(t.geoEntityParameter)}clone(){let e=new _0x56b6ed;return e._UUID=this._UUID,e._geoEntityParameter=this._geoEntityParameter.clone(),e}getUUID(){return this._UUID}setModelPath(e){this._geoEntityParameter.setModelPath(e)}getModelPath(){return this._geoEntityParameter.getModelPath()}setDotPlotLibID(e){this._geoEntityParameter.setDotPlotLibID(e)}getDotPlotLibID(){return this._geoEntityParameter.getDotPlotLibID()}setDotPlotCode(e){this._geoEntityParameter.setDotPlotCode(e)}getDotPlotCode(){return this._geoEntityParameter.getDotPlotCode()}setDotPlotStyle(e){this._geoEntityParameter.setDotPlotStyle(e)}getDotPlotStyle(){return this._geoEntityParameter.getDotPlotStyle()}setVisible(e){this._geoEntityParameter.setVisible(e)}isVisible(){return this._visible}setPicturePath(e){this._geoEntityParameter.setPicturePath(e)}getPicturePath(){return this._geoEntityParameter.getPicturePath()}setShowMode(e){this._geoEntityParameter.setShowMode(e)}getShowMode(){return this._geoEntityParameter.getShowMode()}setIsDistanceChangeMode(e){this._geoEntityParameter.setIsDistanceChangeMode(e)}getIsDistanceChangeMode(){return this._geoEntityParameter.getIsDistanceChangeMode()}setChangeModeDistance(e){this._geoEntityParameter.setChangeModeDistance(e)}getChangeModeDistance(){return this._geoEntityParameter.getChangeModeDistance()}}const _0x38cda1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x173131=_0x38cda1(void 0,(function(){return _0x173131.toString().search("(((.+)+)+)+$").toString().constructor(_0x173131).search("(((.+)+)+)+$")}));_0x173131();class _0x5a492f{constructor(e){this._UUID=WebGLPlot$e.createGuid(),this._geoEntityEffects=WebGLPlot$e.defaultValue(e,[])}_fromJson(e){let t=JSON.parse(e);!WebGLPlot$e.defined(t)||(WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.geoEntityEffects)&&(this._geoEntityEffects=[],t.geoEntityEffects.forEach((e=>{this._geoEntityEffects.push(_0x1b8e09.createGeoEntityEffectFromJson(e))}))))}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityEffects")||(e.geoEntityEffects=[],this._geoEntityEffects.forEach((t=>{e.geoEntityEffects.push(t.toJSON())}))),JSON.stringify(e)}getUUID(){return this._UUID}setGeoEntityEffects(e){this._geoEntityEffects=e}getGeoEntityEffects(){return this._geoEntityEffects}}const _0x4ba655=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x415728=_0x4ba655(void 0,(function(){return _0x415728.toString().search("(((.+)+)+)+$").toString().constructor(_0x415728).search("(((.+)+)+)+$")}));_0x415728();class _0x1e6774{constructor(){this._UUID=WebGLPlot$e.createGuid(),this._isTimeMode=!0,this._time=void 0,this._speed=void 0,this._isCurvePath=!1,this._pathPoint3D=void 0,this._scalePoint2D=void 0,this._originPosition=void 0,this._targetPosition=void 0,this._originGeoEntityUUID=void 0,this._targetGeoEntityUUID=void 0}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("isTimeMode")||(e.isTimeMode=this._isTimeMode),!e.hasOwnProperty("time")&&WebGLPlot$e.defined(this._time)&&(e.time=this._time),!e.hasOwnProperty("speed")&&WebGLPlot$e.defined(this._speed)&&(e.speed=this._speed),e.hasOwnProperty("isCurvePath")||(e.isCurvePath=this._isCurvePath),!e.hasOwnProperty("pathPoint3D")&&WebGLPlot$e.defined(this._pathPoint3D)&&(e.pathPoint3D=[],this._pathPoint3D.forEach((t=>{e.pathPoint3D.push({x:t.x,y:t.y,z:t.z})}))),!e.hasOwnProperty("scalePoint2D")&&WebGLPlot$e.defined(this._scalePoint2D)&&(e.scalePoint2D=[],this._scalePoint2D.forEach((t=>{e.scalePoint2D.push({x:t.x,y:t.y})}))),!e.hasOwnProperty("originPosition")&&WebGLPlot$e.defined(this._originPosition)&&(e.originPosition={x:this._originPosition.x,y:this._originPosition.y,z:this._originPosition.z}),!e.hasOwnProperty("targetPosition")&&WebGLPlot$e.defined(this._targetPosition)&&(e.targetPosition={x:this._targetPosition.x,y:this._targetPosition.y,z:this._targetPosition.z}),!e.hasOwnProperty("targetGeoEntityUUID")&&WebGLPlot$e.defined(this._targetGeoEntityUUID)&&(e.targetGeoEntityUUID=this._targetGeoEntityUUID),!e.hasOwnProperty("originGeoEntityUUID")&&WebGLPlot$e.defined(this._originGeoEntityUUID)&&(e.originGeoEntityUUID=this._originGeoEntityUUID),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.isTimeMode)&&(this._isTimeMode=t.isTimeMode),WebGLPlot$e.defined(t.time)&&(this._time=t.time),WebGLPlot$e.defined(t.speed)&&(this._speed=t.speed),WebGLPlot$e.defined(t.isCurvePath)&&(this._isCurvePath=t.isCurvePath),WebGLPlot$e.defined(t.pathPoint3D)&&(this._pathPoint3D=[],t.pathPoint3D.forEach((e=>{this._pathPoint3D.push(new _0x23de81(e.x,e.y,e.z))}))),WebGLPlot$e.defined(t.scalePoint2D)&&(this._scalePoint2D=[],t.scalePoint2D.forEach((e=>{this._scalePoint2D.push(new WebGLPlot$e.Cartesian2(e.x,e.y))}))),WebGLPlot$e.defined(t.targetPosition)&&(this._targetPosition=new _0x23de81(t.targetPosition.x,t.targetPosition.y,t.targetPosition.z)),WebGLPlot$e.defined(t.originPosition)&&(this._originPosition=new _0x23de81(t.originPosition.x,t.originPosition.y,t.originPosition.z)),WebGLPlot$e.defined(t.targetGeoEntityUUID)&&(this._targetGeoEntityUUID=t.targetGeoEntityUUID),WebGLPlot$e.defined(t.originGeoEntityUUID)&&(this._originGeoEntityUUID=t.originGeoEntityUUID)}getUUID(){return this._UUID}setIsTimeMode(e){this._isTimeMode=e}isTimeMode(){return this._isTimeMode}setTime(e){this._time=e}getTime(){return this._time}setSpeed(e){this._speed=e}getSpeed(){return this._speed}setScalePoint2D(e){this._scalePoint2D=e,this._pathPoint3D=void 0}getScalePoint2D(){return this._scalePoint2D}setPathPoint3D(e){this._pathPoint3D=e,this._scalePoint2D=void 0}getPathPoint3D(){return this._pathPoint3D}setTargetPosition(e){this._targetPosition=e}getTargetPosition(){return this._targetPosition}setOriginPosition(e){this._originPosition=e}getOriginPosition(){return this._originPosition}setTargetGeoEntityUUID(e){this._targetGeoEntityUUID=e}getTargetGeoEntityUUID(){return this._targetGeoEntityUUID}setOriginGeoEntityUUID(e){this._originGeoEntityUUID=e}getOriginGeoEntityUUID(){return this._originGeoEntityUUID}setIsCurvePath(e){this._isCurvePath=e}isCurvePath(){return this._isCurvePath}clone(){let e=new _0x1e6774;return e._UUID=this._UUID,e._isTimeMode=this._isTimeMode,e._time=this._time,e._speed=this._speed,e._isCurvePath=this._isCurvePath,WebGLPlot$e.defined(this._pathPoint3D)&&(e._pathPoint3D=[],this._pathPoint3D.forEach((t=>{e._pathPoint3D.push(new _0x23de81(t.x,t.y,t.z))}))),WebGLPlot$e.defined(this._scalePoint2D)&&(e._scalePoint2D=[],this._scalePoint2D.forEach((t=>{e._scalePoint2D.push(new WebGLPlot$e.Cartesian2(t.x,t.y))}))),e._originPosition=this._originPosition,e._targetPosition=this._targetPosition,e._targetGeoEntityUUID=this._targetGeoEntityUUID,e._originGeoEntityUUID=this._originGeoEntityUUID,e}}var _0x37701d=(_0x5c0174=!0,function(e,t){var i=_0x5c0174?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5c0174=!1,i}),_0x43cb64=_0x37701d(void 0,(function(){return _0x43cb64.toString().search("(((.+)+)+)+$").toString().constructor(_0x43cb64).search("(((.+)+)+)+$")})),_0x5c0174;_0x43cb64();var _0xbe49b1={NO:0,ONEWAY:1,BOTHWAY:2},_0x4c8ffe=Object.freeze(_0xbe49b1);const _0x18b194=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x10aeb7=_0x18b194(void 0,(function(){return _0x10aeb7.toString().search("(((.+)+)+)+$").toString().constructor(_0x10aeb7).search("(((.+)+)+)+$")}));_0x10aeb7();class _0x4d2fe0{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._time=WebGLPlot$e.defaultValue(e.time,0),this._startRotation=WebGLPlot$e.defaultValue(e.startRotation,new _0x23de81(0,0,0)),this._endRotation=WebGLPlot$e.defaultValue(e.endRotation,new _0x23de81(0,0,0)),this._cyclicType=WebGLPlot$e.defaultValue(e.cyclicType,_0x4c8ffe.NO),this._isGradient=WebGLPlot$e.defaultValue(e.isGradient,!0),WebGLPlot$e.defined(e.time)||WebGLPlot$e.defined(e.totalTime)?this._totalTime=WebGLPlot$e.defaultValue(e.totalTime,e.time):this._totalTime=void 0,this._UUID=WebGLPlot$e.createGuid()}getUUID(){return this._UUID}setTotalTime(e){this._totalTime=e}getTotalTime(){return this._totalTime}setTime(e){this._time=e,WebGLPlot$e.defined(this._totalTime)||(this._totalTime=this._time)}getTime(){return this._time}setStartRotation(e){this._startRotation=e}getStartRotation(){return this._startRotation}setEndRotation(e){this._endRotation=e}getEndRotation(){return this._endRotation}setCyclicType(e){this._cyclicType=e}getCyclicType(){return this._cyclicType}setIsGradient(e){this._isGradient=e}isGradient(){return this._isGradient}_toJson(){let e={};e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("time")||(e.time=this._time);e.hasOwnProperty("startRotation")||(e.startRotation={},e.startRotation.hasOwnProperty("x")||(e.startRotation.x=this._startRotation.x),e.startRotation.hasOwnProperty("y")||(e.startRotation.y=this._startRotation.y),e.startRotation.hasOwnProperty("z")||(e.startRotation.z=this._startRotation.z));return e.hasOwnProperty("endRotation")||(e.endRotation={},e.endRotation.hasOwnProperty("x")||(e.endRotation.x=this._endRotation.x),e.endRotation.hasOwnProperty("y")||(e.endRotation.y=this._endRotation.y),e.endRotation.hasOwnProperty("z")||(e.endRotation.z=this._endRotation.z)),e.hasOwnProperty("cyclicType")||(e.cyclicType=this._cyclicType),e.hasOwnProperty("isGradient")||(e.isGradient=this._isGradient),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.time)&&(this._time=t.time),WebGLPlot$e.defined(t.startRotation)&&(WebGLPlot$e.defined(t.startRotation.x)&&(this._startRotation.x=t.startRotation.x),WebGLPlot$e.defined(t.startRotation.y)&&(this._startRotation.y=t.startRotation.y),WebGLPlot$e.defined(t.startRotation.z)&&(this._startRotation.z=t.startRotation.z)),WebGLPlot$e.defined(t.endRotation)&&(WebGLPlot$e.defined(t.endRotation.x)&&(this._endRotation.x=t.endRotation.x),WebGLPlot$e.defined(t.endRotation.y)&&(this._endRotation.y=t.endRotation.y),WebGLPlot$e.defined(t.endRotation.z)&&(this._endRotation.z=t.endRotation.z)),WebGLPlot$e.defined(t.cyclicType)&&(this._cyclicType=t.cyclicType),WebGLPlot$e.defined(t.isGradient)&&(this._isGradient=t.isGradient)}}const _0x9ff03d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x15a13a=_0x9ff03d(void 0,(function(){return _0x15a13a.toString().search("(((.+)+)+)+$").toString().constructor(_0x15a13a).search("(((.+)+)+)+$")}));_0x15a13a();class _0xc7aed0{constructor(e){e=WebGLPlot$e.defaultValue(e,WebGLPlot$e.defaultValue.EMPTY_OBJECT),this._time=WebGLPlot$e.defaultValue(e.time,0),this._startScale=WebGLPlot$e.defaultValue(e.startScale,1),this._endScale=WebGLPlot$e.defaultValue(e.endScale,1),this._cyclicType=WebGLPlot$e.defaultValue(e.cyclicType,_0x4c8ffe.NO),this._isGradient=WebGLPlot$e.defaultValue(e.isGradient,!0),WebGLPlot$e.defined(e.time)||WebGLPlot$e.defined(e.totalTime)?this._totalTime=WebGLPlot$e.defaultValue(e.totalTime,e.time):this._totalTime=void 0,this._UUID=WebGLPlot$e.createGuid()}getUUID(){return this._UUID}setTotalTime(e){this._totalTime=e}getTotalTime(){return this._totalTime}setTime(e){this._time=e,WebGLPlot$e.defined(this._totalTime)||(this._totalTime=this._time)}getTime(){return this._time}setStartScale(e){this._startScale=e}getStartScale(){return this._startScale}setEndScale(e){this._endScale=e}getEndScale(){return this._endScale}setCyclicType(e){this._cyclicType=e}getCyclicType(){return this._cyclicType}setIsGradient(e){this._isGradient=e}isGradient(){return this._isGradient}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("time")||(e.time=this._time),e.hasOwnProperty("startScale")||(e.startScale=this._startScale),e.hasOwnProperty("endScale")||(e.endScale=this._endScale),e.hasOwnProperty("cyclicType")||(e.cyclicType=this._cyclicType),e.hasOwnProperty("isGradient")||(e.isGradient=this._isGradient),JSON.stringify(e)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.time)&&(this._time=t.time),WebGLPlot$e.defined(t.startScale)&&(this._startScale=t.startScale),WebGLPlot$e.defined(t.endScale)&&(this._endScale=t.endScale),WebGLPlot$e.defined(t.cyclicType)&&(this._cyclicType=t.cyclicType),WebGLPlot$e.defined(t.isGradient)&&(this._isGradient=t.isGradient)}}const _0xdb8c76=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x185e26=_0xdb8c76(void 0,(function(){return _0x185e26.toString().search("(((.+)+)+)+$").toString().constructor(_0x185e26).search("(((.+)+)+)+$")}));_0x185e26();class _0xcc97e1{constructor(e,t,i,n,r,o,a){this._geoEntityUUID=e,this._geoEntityMoveParameter=t,this._executeManagerCalc=n,this._groupIndex=r,this._speed=0,this._curvePath3D=[],this._controlPointIndexs=[],this._isToTarget=!1,this._lastTime=void 0,this._lastDistance=0,this._isFinished=!1,this._isChangeCurve=!1,this._moveMode=-1,this._position=o,this._rotation=a,this._geoEntityMoveParameter=t,this._init(t,i)}_createCurve3D(e){let t=_0xf52e1d.getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$e.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new Cesium.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_init(e,t){let i=e.isTimeMode(),n=e.getTime(),r=e.getSpeed(),o=e.getPathPoint3D(),a=e.getScalePoint2D();if(i&&WebGLPlot$e.defined(n)){let i=1e3*n;if(i>0){let n,r=[],s=e.getOriginGeoEntityUUID();WebGLPlot$e.defined(s)&&(n=this._executeManagerCalc._getPosition(this._groupIndex,s,t));let l,u=e.getTargetGeoEntityUUID();if(WebGLPlot$e.defined(u)&&(l=this._executeManagerCalc._getPosition(this._groupIndex,u,t+i)),WebGLPlot$e.defined(o))WebGLPlot$e.defined(n)&&r.push(n),o.forEach((e=>{r.push(e)})),WebGLPlot$e.defined(l)&&r.push(l);else if(WebGLPlot$e.defined(a)){if(WebGLPlot$e.defined(n)&&WebGLPlot$e.defined(l)){let e=[n,l];r=[n,l];let t=_0xf52e1d.getAllDistance(e);a.forEach((i=>{let n=t*i.x,o=_0xf52e1d.getPositionByDistance(e,n);r.splice(r.length-1,0,new WebGLPlot$e.Cartesian3(o.point.x,o.point.y,o.point.z+i.y))}))}}else WebGLPlot$e.defined(n)&&r.push(n),WebGLPlot$e.defined(l)&&r.push(l);if(r=this._convertToCartesian3(r),r.length>=2&&_0xf52e1d.getAllDistance(r)>.001){if(this._moveMode=0,e.isCurvePath()){let e=this._createCurve3D(r);this._curvePath3D=e.curvePath3D}else this._curvePath3D=r;let n=_0xf52e1d.getAllDistance(this._curvePath3D);this._speed=n/i,this._lastTime=t,this._lastDistance=0}}}else if(!i&&WebGLPlot$e.defined(r)){let i=r/1e3;if(i>0){let n,r=[],s=e.getOriginGeoEntityUUID();WebGLPlot$e.defined(s)&&(n=this._executeManagerCalc._getPosition(this._groupIndex,s,t));let l,u=e.getTargetGeoEntityUUID();if(WebGLPlot$e.defined(u)&&(l=this._executeManagerCalc._getPosition(this._groupIndex,u,t)),WebGLPlot$e.defined(o))WebGLPlot$e.defined(n)&&r.push(n),o.forEach((e=>{r.push(e)})),WebGLPlot$e.defined(l)&&r.push(l);else if(WebGLPlot$e.defined(a)){if(WebGLPlot$e.defined(n)&&WebGLPlot$e.defined(l)){let e=[n,l];r=[n,l];let t=_0xf52e1d.getAllDistance(e);a.forEach((i=>{let n=t*i.x,o=_0xf52e1d.getPositionByDistance(e,n);r.splice(r.length-1,0,new WebGLPlot$e.Cartesian3(o.point.x,o.point.y,o.point.z+i.y))}))}}else WebGLPlot$e.defined(n)&&r.push(n),WebGLPlot$e.defined(l)&&r.push(l);if(r=this._convertToCartesian3(r),r.length>=2&&_0xf52e1d.getAllDistance(r)>.001){if(WebGLPlot$e.defined(l)?this._moveMode=1:this._moveMode=0,e.isCurvePath()){let e=this._createCurve3D(r);this._curvePath3D=e.curvePath3D,this._controlPointIndexs=e.controlPointIndexs}else{this._curvePath3D=r;for(let e=0;e<r.length;e++)this._controlPointIndexs.push(e)}1===this._moveMode&&this._controlPointIndexs.splice(this._controlPointIndexs.length-1,1),this._speed=i,this._lastTime=t,this._lastDistance=0}}}}_convertToCartesian3(e){let t=[];return e.forEach((e=>{t.push(_0xf52e1d.degreesToCartesian3(e))})),t}_caclulate(e){if(!this._isFinished)if(this._geoEntityMoveParameter.isTimeMode()&&0===this._geoEntityMoveParameter.getTime()){this._isFinished=!0;let t,i=this._geoEntityMoveParameter.getTargetGeoEntityUUID();if(WebGLPlot$e.defined(i)&&(t=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityMoveParameter.getTargetGeoEntityUUID(),e)),!WebGLPlot$e.defined(t)){let e=this._geoEntityMoveParameter.getPathPoint3D();WebGLPlot$e.defined(e)&&e.length>0&&(t=e[e.length-1])}WebGLPlot$e.defined(t)&&(this._position=t)}else{let t=e-this._lastTime;this._lastTime=e;let i=this._lastDistance+t*this._speed;this._lastDistance=i;let n=[];if(this._isToTarget){let t=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityUUID,e),i=this._executeManagerCalc._getPosition(this._groupIndex,this._geoEntityMoveParameter.getTargetGeoEntityUUID(),e),r=_0xf52e1d.degreesToCartesian3(t),o=_0xf52e1d.degreesToCartesian3(i);WebGLPlot$e.defined(t)&&WebGLPlot$e.defined(i)&&WebGLPlot$e.Cartesian3.distance(this._curvePath3D[this._curvePath3D.length-1],o)>.001?(this._isChangeCurve?this._curvePath3D.splice(this._curvePath3D.length-1):(this._curvePath3D.splice(this._controlPointIndexs[this._controlPointIndexs.length-1]),this._isChangeCurve=!0),n.push(r),n.push(o),this._curvePath3D=this._curvePath3D.concat(n),n=this._curvePath3D):n=this._curvePath3D}else n=this._curvePath3D;if(i>_0xf52e1d.getAllDistance(n))this._isFinished=!0;else{let e=_0xf52e1d.getPositionByDistance(n,i),t=e.index;if(t<n.length&&t>=0){if(!this._isToTarget&&1===this._moveMode&&t>=this._controlPointIndexs[this._controlPointIndexs.length-1]&&(this._isToTarget=!0),this._position=_0xf52e1d.cartesian3ToDegrees(e.point),t!==n.length-1){let i=n[t+1];if(e.point.x!==i.x||e.point.y!==i.y||e.point.z!==i.z){let t=_0xf52e1d.getPitch(e.point,i),n=_0xf52e1d.getHeading(e.point,i);if(t&&n){let e=new _0x23de81(0);e.x=WebGLPlot$e.CesiumMath.toDegrees(t),e.z=WebGLPlot$e.CesiumMath.toDegrees(n),this._rotation=e}}}}else this._isFinished=!0}}return{position:this._position,rotation:this._rotation}}}const _0x39bdf3=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xca4cc0=_0x39bdf3(void 0,(function(){return _0xca4cc0.toString().search("(((.+)+)+)+$").toString().constructor(_0xca4cc0).search("(((.+)+)+)+$")}));_0xca4cc0();class _0x9cc9ee{constructor(e,t){this._geoEntityRotationParameter=e,this._speed=void 0,this._startTime=t,this._cyclicStartTime=void 0,this._lastTime=void 0,this._isBack=!1,this._isFinished=!1,this._rotate=void 0,this._init(e,t)}_init(e,t){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t))return void(this._isFinished=!0);let i=1e3*e.getTime();if(i<0)return void(this._isFinished=!0);let n=e.getStartRotation(),r=e.getEndRotation();this._isBack&&(n=e.getEndRotation(),r=e.getStartRotation()),this._speed=new _0x23de81(0,0,0),e.isGradient()&&(this._speed=new _0x23de81((r.x-n.x)/i,(r.y-n.y)/i,(r.z-n.z)/i)),this._cyclicStartTime=t,this._lastTime=t,this._rotate=new _0x23de81(n.x,n.y,n.z),this._isFinished=!1}_caclulate(e){if(WebGLPlot$e.defined(this._geoEntityRotationParameter)){if(this._isFinished)return this._rotate;if(e-this._startTime>1e3*this._geoEntityRotationParameter.getTotalTime()&&(this._isFinished=!0),e-this._cyclicStartTime>1e3*this._geoEntityRotationParameter.getTime()){let t=this._geoEntityRotationParameter.getCyclicType();t==_0x4c8ffe.NO?(this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isFinished=!0):t==_0x4c8ffe.ONEWAY?(this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isFinished||this._init(this._geoEntityRotationParameter,e)):t==_0x4c8ffe.BOTHWAY&&(this._isBack?this._rotate=this._geoEntityRotationParameter.getStartRotation().clone():this._rotate=this._geoEntityRotationParameter.getEndRotation().clone(),this._isBack=!this._isBack,this._isFinished||this._init(this._geoEntityRotationParameter,e))}else{let t=e-this._lastTime;this._lastTime=e;let i=this._rotate.x+t*this._speed.x,n=this._rotate.y+t*this._speed.y,r=this._rotate.z+t*this._speed.z;this._rotate=new _0x23de81(i,n,r)}return this._rotate}}}const _0xc29ed9=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x323d40=_0xc29ed9(void 0,(function(){return _0x323d40.toString().search("(((.+)+)+)+$").toString().constructor(_0x323d40).search("(((.+)+)+)+$")}));_0x323d40();class _0x4f7cca{constructor(e,t){this._geoEntityScaleParameter=e,this._speed=void 0,this._startTime=t,this._cyclicStartTime=void 0,this._lastTime=void 0,this._isBack=!1,this._isFinished=!1,this._scale=void 0,this._init(e,t)}_init(e,t){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t))return void(this._isFinished=!0);let i=1e3*e.getTime();if(i<0)return void(this._isFinished=!0);let n=e.getStartScale(),r=e.getEndScale();this._isBack&&(n=e.getEndScale(),r=e.getStartScale()),this._speed=0,e.isGradient()&&(this._speed=(r-n)/i),this._cyclicStartTime=t,this._lastTime=t,this._scale=n,this._isFinished=!1}_caclulate(e){if(WebGLPlot$e.defined(this._geoEntityScaleParameter)){if(this._isFinished)return this._scale;if(e-this._startTime>1e3*this._geoEntityScaleParameter.getTotalTime()&&(this._isFinished=!0),e-this._cyclicStartTime>1e3*this._geoEntityScaleParameter.getTime()){let t=this._geoEntityScaleParameter.getCyclicType();t==_0x4c8ffe.NO?(this._isFinished=!0,this._scale=this._geoEntityScaleParameter.getEndScale()):t==_0x4c8ffe.ONEWAY?(this._scale=this._geoEntityScaleParameter.getEndScale(),this._isFinished||this._init(this._geoEntityScaleParameter,e)):t==_0x4c8ffe.BOTHWAY&&(this._isBack?this._scale=this._geoEntityScaleParameter.getStartScale():this._scale=this._geoEntityScaleParameter.getEndScale(),this._isBack=!this._isBack,this._isFinished||this._init(this._geoEntityScaleParameter,e))}else{let t=e-this._lastTime;this._lastTime=e,this._scale+=t*this._speed}return this._scale}}}const _0x547199=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x305126=_0x547199(void 0,(function(){return _0x305126.toString().search("(((.+)+)+)+$").toString().constructor(_0x305126).search("(((.+)+)+)+$")}));_0x305126();class _0x2ac9f9{constructor(e,t,i){this._deductionScript=e,this._executeManagerCalc=t,this._currentGroupIndex=i,this._currentGeoEntityBasicParameter=void 0,this._currentGeoEntityEffectParameter=void 0,this._currentGeoEntityMoveParameter=void 0,this._currentGeoEntityRotationParameter=void 0,this._currentGeoEntityScaleParameter=void 0,this._geoEntity=void 0,this._finishTime=void 0,this._geoEntityMoveCalc=void 0,this._geoEntityRotationCalc=void 0,this._geoEntityScaleCalc=void 0,this._position=void 0,this._scale=void 0,this._rotation=void 0,this._startTime=void 0}_getGeoEntityUUID(){return this._deductionScript.getGeoEntityUUID()}_setGeoEntityMoveParameter(e,t){this._geoEntityMoveCalc=new _0xcc97e1(this._deductionScript.getGeoEntityUUID(),e,t,this._executeManagerCalc,this._currentGroupIndex,this._position,this._rotation)}_setGeoEntityRotationParameter(e,t){this._geoEntityRotationCalc=new _0x9cc9ee(e,t)}_setGeoEntityScaleParameter(e,t){this._geoEntityScaleCalc=new _0x4f7cca(e,t)}_getPosition(){return this._position}_start(e){this._startTime=e,this._geoEntity=_0x2e28f1.getInstance().getGeoEntityManager().getGeoEntityByUUID(this._deductionScript.getGeoEntityUUID()),WebGLPlot$e.defined(this._geoEntity)&&(this._position=this._geoEntity.getGeoEntityParameter().getPosition(),this._rotation=this._geoEntity.getGeoEntityParameter().getModelRotate(),this._scale=this._geoEntity.getGeoEntityParameter().getModelScale())}_excuteMove(e){if(!WebGLPlot$e.defined(this._geoEntityMoveCalc))return;let t={},i=this._geoEntityMoveCalc._caclulate(e);return WebGLPlot$e.defined(i)&&(WebGLPlot$e.defined(i.position)&&(t.position=i.position),WebGLPlot$e.defined(i.rotation)&&(t.moveRotate=i.rotation)),t}_excuteRotation(e){if(!WebGLPlot$e.defined(this._geoEntityRotationCalc))return;let t=this._geoEntityRotationCalc._caclulate(e);return WebGLPlot$e.defined(t)?t:void 0}_excuteScale(e){if(!WebGLPlot$e.defined(this._geoEntityScaleCalc))return;let t=this._geoEntityScaleCalc._caclulate(e);return WebGLPlot$e.defined(t)?t:void 0}_isLegal(e){if(!WebGLPlot$e.defined(e))return!1;let t=e._getGeoEntityParameter();return!!(t._isModelPathUpdate&&t._isVisibleUpdate&&t._isDotPlotLibIDUpdate&&t._isDotPlotCodeUpdate&&t._isDotPlotStyleUpdate&&t._isPicturePathUpdate&&t._isShowModeUpdate&&t._isDistanceChangeModeUpdate&&t._isChangeModeDistanceUpdate)}_execute(e){if(this._isDeductionScriptExecuteStop(e))return;let t=e-this._startTime,i=t/1e3,n=this._deductionScript.getGeoEntityBasicParameterTimes();for(let e=0;e<n.length;e++){let t=n[e],r=this._deductionScript.getGeoEntityBasicParameter(t);if(i>=t){if(e===n.length-1){this._currentGeoEntityBasicParameter=r.clone();break}if(i<n[e+1]){this._currentGeoEntityBasicParameter=r.clone();break}}}let r=this._deductionScript.getGeoEntityEffectParameterTimes();for(let e=0;e<r.length;e++){let t=r[e],n=this._deductionScript.getGeoEntityEffectParameter(t);if(i>=t){if(e===r.length-1){this._currentGeoEntityEffectParameter=n;break}if(i<r[e+1]){this._currentGeoEntityEffectParameter=n;break}}}let o,a,s=this._deductionScript.getGeoEntityMoveParameterTimes();for(let e=0;e<s.length;e++){let t=s[e],n=this._deductionScript.getGeoEntityMoveParameter(t);if(i>=t){if(e===s.length-1){o=n,a=1e3*t;break}if(i<s[e+1]){o=n,a=1e3*t;break}}}let l,u,c=this._deductionScript.getGeoEntityRotationParameterTimes();for(let e=0;e<c.length;e++){let t=c[e],n=this._deductionScript.getGeoEntityRotationParameter(t);if(i>=t){if(e===c.length-1){l=n,u=1e3*t;break}if(i<c[e+1]){l=n,u=1e3*t;break}}}let h,d,f=this._deductionScript.getGeoEntityScaleParameterTimes();for(let e=0;e<f.length;e++){let t=f[e],n=this._deductionScript.getGeoEntityScaleParameter(t);if(i>=t){if(e===f.length-1){h=n,d=1e3*t;break}if(i<f[e+1]){h=n,d=1e3*t;break}}}!WebGLPlot$e.defined(this._currentGeoEntityBasicParameter)&&WebGLPlot$e.defined(this._geoEntity)&&(this._currentGeoEntityBasicParameter=new _0x56b6ed,this._currentGeoEntityBasicParameter._UUID="InitGeoEntityBasicParameter",this._currentGeoEntityBasicParameter._geoEntityParameter=this._geoEntity.getGeoEntityParameter()),WebGLPlot$e.defined(this._currentGeoEntityEffectParameter)||(this._currentGeoEntityEffectParameter=new _0x5a492f,this._currentGeoEntityEffectParameter._UUID="InitGeoEntityEffectParameter",WebGLPlot$e.defined(this._geoEntity)&&this._geoEntity.getGeoEntityEffects().forEach((e=>{this._currentGeoEntityEffectParameter._geoEntityEffects.push(e.clone())}))),WebGLPlot$e.defined(o)&&(!WebGLPlot$e.defined(this._currentGeoEntityMoveParameter)||this._currentGeoEntityMoveParameter.getUUID()!=o.getUUID())&&(this._currentGeoEntityMoveParameter=o,this._setGeoEntityMoveParameter(o,a)),WebGLPlot$e.defined(l)&&(!WebGLPlot$e.defined(this._currentGeoEntityRotationParameter)||this._currentGeoEntityRotationParameter.getUUID()!=l.getUUID())&&(this._currentGeoEntityRotationParameter=l,this._setGeoEntityRotationParameter(l,u)),WebGLPlot$e.defined(h)&&(!WebGLPlot$e.defined(this._currentGeoEntityScaleParameter)||this._currentGeoEntityScaleParameter.getUUID()!=h.getUUID())&&(this._currentGeoEntityScaleParameter=h,this._setGeoEntityScaleParameter(h,d));let p={position:this._position,rotation:this._rotation,scale:this._scale};p.UUID=this._deductionScript.getGeoEntityUUID(),WebGLPlot$e.defined(this._currentGeoEntityMoveParameter)&&(p.geoEntityMoveParameter={UUID:this._currentGeoEntityMoveParameter.getUUID(),geoEntityMoveParameter:this._currentGeoEntityMoveParameter}),WebGLPlot$e.defined(this._currentGeoEntityBasicParameter)&&(p.geoEntityBasicParameter={UUID:this._currentGeoEntityBasicParameter.getUUID(),geoEntityBasicParameter:this._currentGeoEntityBasicParameter}),WebGLPlot$e.defined(this._currentGeoEntityEffectParameter)&&(p.geoEntityEffectParameter={UUID:this._currentGeoEntityEffectParameter.getUUID(),geoEntityEffectParameter:this._currentGeoEntityEffectParameter});let _=this._excuteMove(t),m=this._excuteRotation(t),g=this._excuteScale(t);return WebGLPlot$e.defined(_)&&WebGLPlot$e.defined(_.position)&&(p.position=_.position),WebGLPlot$e.defined(_)&&WebGLPlot$e.defined(_.moveRotate)&&(p.rotation=_.moveRotate),WebGLPlot$e.defined(m)&&(p.rotation=new _0x23de81(p.rotation.x+m.x,p.rotation.y+m.y,p.rotation.z+m.z)),WebGLPlot$e.defined(g)&&(p.scale=g),p}_isDeductionScriptExecuteStop(e){let t=!1,i=this._deductionScript.getGeoEntityMoveParameterTimes();if(0===i.length)t=!0;else{let e=i[i.length-1];WebGLPlot$e.defined(this._currentGeoEntityMoveParameter)&&this._currentGeoEntityMoveParameter.getUUID()===this._deductionScript.getGeoEntityMoveParameter(e).getUUID()&&(!WebGLPlot$e.defined(this._geoEntityMoveCalc)||!0===this._geoEntityMoveCalc._isFinished)&&(t=!0)}let n=!1,r=this._deductionScript.getGeoEntityRotationParameterTimes();if(0===r.length)n=!0;else{let e=r[r.length-1];WebGLPlot$e.defined(this._currentGeoEntityRotationParameter)&&this._currentGeoEntityRotationParameter.getUUID()===this._deductionScript.getGeoEntityRotationParameter(e).getUUID()&&(!WebGLPlot$e.defined(this._geoEntityRotationCalc)||!0===this._geoEntityRotationCalc._isFinished)&&(n=!0)}let o=!1,a=this._deductionScript.getGeoEntityScaleParameterTimes();if(0===a.length)o=!0;else{let e=a[a.length-1];WebGLPlot$e.defined(this._currentGeoEntityScaleParameter)&&this._currentGeoEntityScaleParameter.getUUID()===this._deductionScript.getGeoEntityScaleParameter(e).getUUID()&&(!WebGLPlot$e.defined(this._geoEntityScaleCalc)||!0===this._geoEntityScaleCalc._isFinished)&&(o=!0)}let s=!1,l=this._deductionScript.getGeoEntityBasicParameterTimes();if(0===l.length)s=!0;else{let e=l[l.length-1];WebGLPlot$e.defined(this._currentGeoEntityBasicParameter)&&this._currentGeoEntityBasicParameter.getUUID()===this._deductionScript.getGeoEntityBasicParameter(e).getUUID()&&(s=!0)}let u=!1,c=this._deductionScript.getGeoEntityEffectParameterTimes();if(0===c.length)u=!0;else{let e=c[c.length-1];WebGLPlot$e.defined(this._currentGeoEntityEffectParameter)&&this._currentGeoEntityEffectParameter.getUUID()===this._deductionScript.getGeoEntityEffectParameter(e).getUUID()&&(u=!0)}if(t&&n&&o&&s&&u){if(this._deductionScript.getDelayFinishTime()>0){if(!WebGLPlot$e.defined(this._finishTime))return this._finishTime=e,!1;if(e-this._finishTime<=1e3*this._deductionScript.getDelayFinishTime())return!1}return!0}return!1}}const _0x35d5f9=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xda1e28=_0x35d5f9(void 0,(function(){return _0xda1e28.toString().search("(((.+)+)+)+$").toString().constructor(_0xda1e28).search("(((.+)+)+)+$")}));_0xda1e28();class _0x820831{constructor(){this._deductionScriptGroups=void 0,this._allActions=void 0}static getInstance(){return _0x820831._instance||(_0x820831._instance=new _0x820831),_0x820831._instance}_reset(){this._deductionScriptGroups=void 0,this._allActions=void 0}_getAllActions(){return this._allActions}_containDeductionScriptGeoEntity(e,t){let i=e.getDeductionScripts();for(let e=0;e<i.length;e++)if(i[e].getGeoEntityUUID()===t)return i[e]}_calcDeductionScript(e,t,i,n,r){if(-1!==t.indexOf(n.getUUID()))return;n.getGeoEntityMoveParameterTimes().forEach((o=>{let a=n.getGeoEntityMoveParameter(o),s=a.getOriginGeoEntityUUID(),l=a.getTargetGeoEntityUUID();if(WebGLPlot$e.defined(s)&&s!==n.getGeoEntityUUID()){let n=this._containDeductionScriptGeoEntity(i,s);WebGLPlot$e.defined(n)&&-1===t.indexOf(n.getUUID())&&this._calcDeductionScript(e,t,i,n,r)}if(WebGLPlot$e.defined(l)){let n=this._containDeductionScriptGeoEntity(i,l);WebGLPlot$e.defined(n)&&-1===t.indexOf(n.getUUID())&&this._calcDeductionScript(e,t,i,n,r)}})),t.push(n.getUUID()),e.set(n.getGeoEntityUUID(),[]);let o=new _0x2ac9f9(n,this,r);o._start(0);let a=10;for(;;){let t=o._execute(a);if(!WebGLPlot$e.defined(t))break;t.time=a,e.get(n.getGeoEntityUUID()).push(t),a+=10}}_getPosition(e,t,i){let n;if(WebGLPlot$e.defined(this._allActions)){let r=this._allActions.groupActions;if(r.length>0){let o=r[e].actions;if(o.has(t)){let e=o.get(t);for(let t=0;t<e.length;t++){let r=e[t];if(i>=r.time){if(t===e.length-1){n=r.position;break}if(i<e[t+1].time){n=r.position;break}}}}if(!WebGLPlot$e.defined(n))for(let i=e-1;i>=0;i--){let e=r[i].actions;if(e.has(t)){let i=e.get(t);i.length>0&&(n=i[i.length-1].position);break}}}}if(!WebGLPlot$e.defined(n)){let e=_0x2e28f1.getInstance().getGeoEntityManager().getGeoEntityByUUID(t);WebGLPlot$e.defined(e)&&(n=e.getGeoEntityParameter().getPosition())}return n}_calcute(){this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._allActions={};let e=0,t=[];this._allActions.groupActions=t;for(let i=0;i<this._deductionScriptGroups.length;i++){let n=this._deductionScriptGroups[i],r={};t.push(r);let o=new Map;r.actions=o;let a=[],s=n.getDeductionScriptExtend()._getDeductionScript();this._calcDeductionScript(o,a,n,s,i),n.getDeductionScripts().forEach((e=>{this._calcDeductionScript(o,a,n,e,i)}));let l=0;o.forEach(((e,t)=>{if(e.length>0){let t=e[e.length-1].time;t>l&&(l=t)}})),r.time=l,e+=l}this._allActions.time=e,console.log(this._allActions)}_findGeoEntityMoveParameter(e){if(WebGLPlot$e.defined(this._deductionScriptGroups))for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t].getDeductionScripts();for(let n=0;n<i.length;n++){let r=i[n],o=r.getGeoEntityMoveParameterTimes();for(let i=0;i<o.length;i++){let n=r.getGeoEntityMoveParameter(o[i]);if(n.getUUID()===e)return{geoEntityMoveParameter:n,deductionScript:r,groupIndex:t,time:o[i]}}}}}_indexOfDeductionScript(e){if(WebGLPlot$e.defined(this._deductionScriptGroups))for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t].getDeductionScripts();for(let n=0;n<i.length;n++)if(i[n].getUUID()===e)return t}return-1}_calcGeoEntityMoveParameter(e,t,i){let n=this._getMoveParameterTime(e.getUUID()),r=this._getMoveParameterSpeed(e.getUUID());WebGLPlot$e.defined(n)&&WebGLPlot$e.defined(r)&&(WebGLPlot$e.defined(e.getOriginGeoEntityUUID())&&e.setOriginPosition(this._getPosition(i,e.getOriginGeoEntityUUID(),1e3*t)),WebGLPlot$e.defined(e.getTargetGeoEntityUUID())&&WebGLPlot$e.defined(n)&&e.setTargetPosition(this._getPosition(i,e.getTargetGeoEntityUUID(),1e3*(t+n))),e.setTime(n),e.setSpeed(r))}_getMoveParameterTime(e){let t;if(WebGLPlot$e.defined(this._deductionScriptGroups)){let i=this._findGeoEntityMoveParameter(e);if(WebGLPlot$e.defined(i)){t=i.geoEntityMoveParameter.getTime();let n=i.groupIndex,r=i.deductionScript.getGeoEntityUUID();if(!i.geoEntityMoveParameter.isTimeMode()&&WebGLPlot$e.defined(n)&&WebGLPlot$e.defined(r)&&WebGLPlot$e.defined(this._allActions)){let i=this._allActions.groupActions;if(n<i.length){let o=i[n].actions;if(o.has(r)){let i=o.get(r);if(WebGLPlot$e.defined(i)){let n;for(let r=0;r<i.length;r++){let o=i[r];if(Cesium.defined(o.geoEntityMoveParameter)&&o.geoEntityMoveParameter.UUID===e)WebGLPlot$e.defined(n)||(n=o.time);else if(WebGLPlot$e.defined(n)){t=(o.time-n)/1e3;break}}Cesium.defined(n)&&!Cesium.defined(t)&&(t=(i[i.length-1].time-n)/1e3)}}}}}}return t}_getMoveParameterSpeed(e){let t;if(WebGLPlot$e.defined(this._deductionScriptGroups)){let i=this._findGeoEntityMoveParameter(e);if(WebGLPlot$e.defined(i)){t=i.geoEntityMoveParameter.getSpeed();let n=i.groupIndex,r=i.deductionScript.getGeoEntityUUID();if(i.geoEntityMoveParameter.isTimeMode()&&WebGLPlot$e.defined(n)&&WebGLPlot$e.defined(r)&&WebGLPlot$e.defined(this._allActions)){let i,o,a=this._allActions.groupActions;if(n<a.length){let t=a[n].actions;if(t.has(r)){let n=t.get(r);if(WebGLPlot$e.defined(n)){let t;for(let r=0;r<n.length;r++){let a=n[r];if(Cesium.defined(a.geoEntityMoveParameter)&&a.geoEntityMoveParameter.UUID===e)WebGLPlot$e.defined(i)||(t=a.time,i=[]),i.push(a.position);else if(WebGLPlot$e.defined(t)){o=(a.time-t)/1e3;break}}WebGLPlot$e.defined(t)&&!WebGLPlot$e.defined(o)&&(o=(n[n.length-1].time-t)/1e3)}}}let s=[];i.forEach((e=>{s.push(_0xf52e1d.degreesToCartesian3(e))})),t=_0xf52e1d.getAllDistance(s)/o}}}return t}_getDependsDeductionScriptInfos(e,t){let i=[];if(WebGLPlot$e.defined(this._deductionScriptGroups)&&e<this._deductionScriptGroups.length)for(let n=e;n<this._deductionScriptGroups.length;n++)this._deductionScriptGroups[n].getDeductionScripts().forEach((r=>{if(r.getGeoEntityUUID()!==t||n!==e){let e=r.getGeoEntityMoveParameterTimes();for(let o=0;o<e.length;o++){let a=r.getGeoEntityMoveParameter(e[o]);(a.getOriginGeoEntityUUID()===t||a.getTargetGeoEntityUUID()===t)&&i.push({deductionScript:r,groupIndex:n})}}}));return i}_calcFlowMoveParameter(e,t,i){e.getGeoEntityMoveParameterTimes().forEach((n=>{if(n>t){let t=e.getGeoEntityMoveParameter(n);this._calcGeoEntityMoveParameter(t,n,i)}}))}_updateGeoEntityMoveParameter(e,t,i){let n=this._indexOfDeductionScript(e.getUUID());this._calcGeoEntityMoveParameter(i,t,n),this._calcFlowMoveParameter(e,t,n),this._getDependsDeductionScriptInfos(n,e.getGeoEntityUUID()).forEach((e=>{let t=e.deductionScript.getGeoEntityMoveParameterTimes();t.length>0&&this._updateGeoEntityMoveParameter(e.deductionScript,t[0],e.deductionScript.getGeoEntityMoveParameter(t[0]))}))}_removeGeoEntityMoveParameter(e,t){let i=this._indexOfDeductionScript(e.getUUID());this._calcFlowMoveParameter(e,t,i),this._getDependsDeductionScriptInfos(i,e.getGeoEntityUUID()).forEach((e=>{let t=e.deductionScript.getGeoEntityMoveParameterTimes();t.length>0&&this._updateGeoEntityMoveParameter(e.deductionScript,t[0],e.deductionScript.getGeoEntityMoveParameter(t[0]))}))}}const _0x2c117b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4c6ab6=_0x2c117b(void 0,(function(){return _0x4c6ab6.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c6ab6).search("(((.+)+)+)+$")}));_0x4c6ab6();class _0x3fc8dd{constructor(e){this._UUID=WebGLPlot$e.createGuid(),this._geoEntityUUID=e,this._delayFinishTime=0,this._geoEntityBasicParameters=new Map,this._geoEntityEffectParameters=new Map,this._geoEntityMoveParameters=new Map,this._geoEntityRotationParameters=new Map,this._geoEntityScaleParameters=new Map,this._isModified=!1}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){_0x2e28f1.getInstance()._saveDeductionScript(!1)}_fromJson(e){let t=JSON.parse(e);WebGLPlot$e.defined(t.UUID)&&(this._UUID=t.UUID),WebGLPlot$e.defined(t.geoEntityUUID)&&(this._geoEntityUUID=t.geoEntityUUID),WebGLPlot$e.defined(t.delayFinishTime)&&(this._delayFinishTime=t.delayFinishTime),WebGLPlot$e.defined(t.geoBaseEntityParameters)&&(this._geoEntityBasicParameters.clear(),t.geoBaseEntityParameters.forEach((e=>{let t=e.time,i=new _0x56b6ed;i._fromJson(e.geoEntityBasicParameter),this._geoEntityBasicParameters.set(t,i)}))),WebGLPlot$e.defined(t.geoEntityEffectParameters)&&(this._geoEntityEffectParameters.clear(),t.geoEntityEffectParameters.forEach((e=>{let t=e.time,i=new _0x5a492f;i._fromJson(e.geoEntityEffectParameter),this._geoEntityEffectParameters.set(t,i)}))),WebGLPlot$e.defined(t.geoEntityMoveParameters)&&(this._geoEntityMoveParameters.clear(),t.geoEntityMoveParameters.forEach((e=>{let t=e.time,i=new _0x1e6774;i._fromJson(e.geoEntityMoveParameter),this._geoEntityMoveParameters.set(t,i)}))),WebGLPlot$e.defined(t.geoEntityRotationParameters)&&(this._geoEntityRotationParameters.clear(),t.geoEntityRotationParameters.forEach((e=>{let t=e.time,i=new _0x4d2fe0;i._fromJson(e.geoEntityRotationParameter),this._geoEntityRotationParameters.set(t,i)}))),WebGLPlot$e.defined(t.geoEntityScaleParameters)&&(this._geoEntityScaleParameters.clear(),t.geoEntityScaleParameters.forEach((e=>{let t=e.time,i=new _0xc7aed0;i._fromJson(e.geoEntityScaleParameter),this._geoEntityScaleParameters.set(t,i)})))}_toJson(){let e={};return e.hasOwnProperty("UUID")||(e.UUID=this._UUID),e.hasOwnProperty("geoEntityUUID")||(e.geoEntityUUID=this._geoEntityUUID),e.hasOwnProperty("delayFinishTime")||(e.delayFinishTime=this._delayFinishTime),e.hasOwnProperty("geoBaseEntityParameters")||(e.geoBaseEntityParameters=[],this._geoEntityBasicParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityBasicParameter")||(n.geoEntityBasicParameter=t._toJson()),e.geoBaseEntityParameters.push(n)}))),e.hasOwnProperty("geoEntityEffectParameters")||(e.geoEntityEffectParameters=[],this._geoEntityEffectParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityEffectParameter")||(n.geoEntityEffectParameter=t._toJson()),e.geoEntityEffectParameters.push(n)}))),e.hasOwnProperty("geoEntityMoveParameters")||(e.geoEntityMoveParameters=[],this._geoEntityMoveParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityMoveParameter")||(n.geoEntityMoveParameter=t._toJson()),e.geoEntityMoveParameters.push(n)}))),e.hasOwnProperty("geoEntityRotationParameters")||(e.geoEntityRotationParameters=[],this._geoEntityRotationParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityRotationParameter")||(n.geoEntityRotationParameter=t._toJson()),e.geoEntityRotationParameters.push(n)}))),e.hasOwnProperty("geoEntityScaleParameters")||(e.geoEntityScaleParameters=[],this._geoEntityScaleParameters.forEach(((t,i)=>{let n={};n.hasOwnProperty("time")||(n.time=i),n.hasOwnProperty("geoEntityScaleParameter")||(n.geoEntityScaleParameter=t._toJson()),e.geoEntityScaleParameters.push(n)}))),JSON.stringify(e)}_getTotalTime(){let e=0,t=this.getGeoEntityBasicParameterTimes();if(t.length>0){let i=1e3*t[t.length-1];e<i&&(e=i)}let i=this.getGeoEntityEffectParameterTimes();if(i.length>0){let t=1e3*i[i.length-1];e<t&&(e=t)}let n=this.getGeoEntityMoveParameterTimes();if(n.length>0){let t=n[n.length-1],i=this.getGeoEntityMoveParameter(t),r=1e3*(n[n.length-1]+i.getTime());e<r&&(e=r)}let r=this.getGeoEntityRotationParameterTimes();if(r.length>0){let t=r[r.length-1],i=this.getGeoEntityRotationParameter(t),n=1e3*(r[r.length-1]+i.getTotalTime());e<n&&(e=n)}let o=this.getGeoEntityScaleParameterTimes();if(o.length>0){let t=o[o.length-1],i=this.getGeoEntityScaleParameter(t),n=1e3*(o[o.length-1]+i.getTotalTime());e<n&&(e=n)}return e+=1e3*this._delayFinishTime,e}getGeoEntityUUID(){return this._geoEntityUUID}getUUID(){return this._UUID}getGeoEntityBasicParameterTimes(){let e=[];return this._geoEntityBasicParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityBasicParameter(e){let t;return this._geoEntityBasicParameters.has(e)&&(t=this._geoEntityBasicParameters.get(e)),t}setGeoEntityBasicParameter(e,t){this._geoEntityBasicParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityBasicParameter(e){this._geoEntityBasicParameters.has(e)&&(this._geoEntityBasicParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityEffectParameterTimes(){let e=[];return this._geoEntityEffectParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityEffectParameter(e){let t;return this._geoEntityEffectParameters.has(e)&&(t=this._geoEntityEffectParameters.get(e)),t}setGeoEntityEffectParameter(e,t){this._geoEntityEffectParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityEffectParameter(e){this._geoEntityEffectParameters.has(e)&&(this._geoEntityEffectParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityMoveParameterTimes(){let e=[];return this._geoEntityMoveParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityMoveParameter(e){let t;return this._geoEntityMoveParameters.has(e)&&(t=this._geoEntityMoveParameters.get(e)),t}setGeoEntityMoveParameter(e,t){this._geoEntityMoveParameters.set(e,t),_0x820831.getInstance()._calcute(),_0x820831.getInstance()._updateGeoEntityMoveParameter(this,e,t),this._isModified=!0,this._save()}removeGeoEntityMoveParameter(e){this._geoEntityMoveParameters.has(e)&&(this._geoEntityMoveParameters.delete(e),_0x820831.getInstance()._calcute(),_0x820831.getInstance()._removeGeoEntityMoveParameter(this,e),this._isModified=!0,this._save())}setDelayFinishTime(e){this._delayFinishTime=e,this._isModified=!0,this._save()}getDelayFinishTime(){return this._delayFinishTime}getGeoEntityRotationParameterTimes(){let e=[];return this._geoEntityRotationParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityRotationParameter(e){let t;return this._geoEntityRotationParameters.has(e)&&(t=this._geoEntityRotationParameters.get(e)),t}setGeoEntityRotationParameter(e,t){this._geoEntityRotationParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityRotationParameter(e){this._geoEntityRotationParameters.has(e)&&(this._geoEntityRotationParameters.delete(e),this._isModified=!0,this._save())}getGeoEntityScaleParameterTimes(){let e=[];return this._geoEntityScaleParameters.forEach(((t,i)=>{e.push(i)})),e.sort((function(e,t){return e-t})),e}getGeoEntityScaleParameter(e){let t;return this._geoEntityScaleParameters.has(e)&&(t=this._geoEntityScaleParameters.get(e)),t}setGeoEntityScaleParameter(e,t){this._geoEntityScaleParameters.set(e,t),this._isModified=!0,this._save()}removeGeoEntityScaleParameter(e){this._geoEntityScaleParameters.has(e)&&(this._geoEntityScaleParameters.delete(e),this._isModified=!0,this._save())}}const _0x5316b8=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5b1da6=_0x5316b8(void 0,(function(){return _0x5b1da6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b1da6).search("(((.+)+)+)+$")}));_0x5b1da6();class _0x4de595{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityMoveParameter=void 0,this._speed=0,this._curvePath3D=[],this._startTime=void 0,this._isFinished=!1,this._position=void 0,this._rotation=void 0,this._geoEntityMoveParameter=void 0,this._allDistance=void 0,this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityMoveParameterUUID=void 0}_init(e,t,i,n){this._geoEntityMoveParameter=e,this._startTime=t,this._position=i,this._rotation=n;let r=e.getSpeed()/1e3;if(r>0){let t=[],i=e.getPathPoint3D(),n=e.getScalePoint2D(),o=e.getOriginPosition(),a=e.getTargetPosition();if(WebGLPlot$e.defined(i))WebGLPlot$e.defined(o)&&t.push(o),i.forEach((e=>{t.push(e)})),WebGLPlot$e.defined(a)&&t.push(a);else if(WebGLPlot$e.defined(n)){if(WebGLPlot$e.defined(o)&&WebGLPlot$e.defined(a)){let e=[o,a];t=[o,a];let i=_0xf52e1d.getAllDistance(e);n.forEach((n=>{let r=i*n.x,o=_0xf52e1d.getPositionByDistance(e,r);t.splice(t.length-1,0,new WebGLPlot$e.Cartesian3(o.point.x,o.point.y,o.point.z+n.y))}))}}else WebGLPlot$e.defined(o)&&t.push(o),WebGLPlot$e.defined(a)&&t.push(a);if(t=this._convertToCartesian3(t),t.length>=2&&_0xf52e1d.getAllDistance(t)>.001){if(e.isCurvePath()){let e=this._createCurve3D(t);this._curvePath3D=e.curvePath3D}else this._curvePath3D=t;this._speed=r}}this._allDistance=_0xf52e1d.getAllDistance(this._curvePath3D),this._isFinished=!1}_update(e,t,i){let n={},r=e/1e3,o=this._getCurrentGeoEntityMoveParameter(r);if(WebGLPlot$e.defined(o.geoEntityMoveParameter)&&WebGLPlot$e.defined(o.geoEntityMoveParameterActionTime)){this._currentGeoEntityMoveParameterUUID!=o.geoEntityMoveParameter.getUUID()&&(this._currentGeoEntityMoveParameterUUID=o.geoEntityMoveParameter.getUUID(),this._init(o.geoEntityMoveParameter,o.geoEntityMoveParameterActionTime,t,i));let r=this._caclulate(e);WebGLPlot$e.defined(r)&&(n.position=r.position,n.isCurrent=!0,n.finishTime=o.geoEntityMoveParameterActionTime+1e3*this._geoEntityMoveParameter.getTime(),n.isFinished=this._isFinished,n.rotation=r.rotation)}else{let e,r,o;if(this._groupIndex>0)for(let t=this._groupIndex-1;t>=0;t--){let i=this._deductionScriptGroups[t]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$e.defined(i)){let n=i.getGeoEntityMoveParameterTimes();if(n.length>0){e=n[n.length-1],r=i.getGeoEntityMoveParameter(e),o=t;break}}}if(WebGLPlot$e.defined(r)){let t=new _0x4de595;t._init(r);let i,a=t._getFinalPosition(),s=t._curvePath3D;if(s.length>1){let e=_0xf52e1d.getPitch(s[s.length-2],s[s.length-1]),t=_0xf52e1d.getHeading(s[s.length-2],s[s.length-1]);e&&t&&(i=new _0x23de81(0),i.x=WebGLPlot$e.CesiumMath.toDegrees(e),i.z=WebGLPlot$e.CesiumMath.toDegrees(t))}n.position=a,n.isCurrent=!1,n.rotation=i,n.groupIndex=o,n.finishTime=1e3*(e+r.getTime())}else n.position=t,n.isCurrent=!1,n.rotation=i}return n}_getCurrentGeoEntityMoveParameter(e){let t,i,n=this._deductionScript.getGeoEntityMoveParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityMoveParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityMoveParameter:t,geoEntityMoveParameterActionTime:i}}_createCurve3D(e){let t=_0xf52e1d.getAllDistance(e),i=[];i.push(0);let n=0;for(let r=0;r<e.length-2;r++){let o=e[r],a=e[r+1];n+=WebGLPlot$e.Cartesian3.distance(o,a),i.push(n/t)}i.push(1);let r=new Cesium.CatmullRomSpline({points:e,times:i}),o=100*e.length,a=[];for(let e=0;e<=o;e++){let t=r.evaluate(e/o);a.push(t)}let s=[];return i.forEach((e=>{s.push(e*o)})),{curvePath3D:a,controlPointIndexs:s}}_convertToCartesian3(e){let t=[];return e.forEach((e=>{t.push(_0xf52e1d.degreesToCartesian3(e))})),t}_getFinalPosition(){let e=this._geoEntityMoveParameter.getTargetPosition();if(WebGLPlot$e.defined(e))return e;let t=this._geoEntityMoveParameter.getPathPoint3D();return t.length>0&&(e=t[t.length-1]),WebGLPlot$e.defined(e)||(e=this._geoEntityMoveParameter.getOriginPosition(),WebGLPlot$e.defined(e))?e:void 0}_caclulate(e){if(!this._isFinished)if(this._geoEntityMoveParameter.isTimeMode()&&0===this._geoEntityMoveParameter.getTime())this._isFinished=!0,this._position=this._getFinalPosition();else{let t=(e-this._startTime)*this._speed;if(t>this._allDistance)this._isFinished=!0,this._currentGeoEntityMoveParameterUUID=void 0;else{let e=_0xf52e1d.getPositionByDistance(this._curvePath3D,t),i=e.index;if(i<=this._curvePath3D.length&&i>=0){if(this._position=_0xf52e1d.cartesian3ToDegrees(e.point),i!==this._curvePath3D.length-1){let t=this._curvePath3D[i+1];if(e.point.x!==t.x||e.point.y!==t.y||e.point.z!==t.z){let i=_0xf52e1d.getPitch(e.point,t),n=_0xf52e1d.getHeading(e.point,t);if(i&&n){let e=new _0x23de81(0);e.x=WebGLPlot$e.CesiumMath.toDegrees(i),e.z=WebGLPlot$e.CesiumMath.toDegrees(n),this._rotation=e}}}}else this._isFinished=!0,this._currentGeoEntityMoveParameterUUID=void 0}if(this._isFinished){let e=this._getFinalPosition();if(WebGLPlot$e.defined(e)&&(this._position=e),!WebGLPlot$e.defined(this._curvePath3D)){let e=this._geoEntityMoveParameter.getPathPoint3D();if(WebGLPlot$e.defined(e)&&e.length>0&&e.length>1){let t=_0xf52e1d.getPitch(e[e.length-2],e[e.length-1]),i=_0xf52e1d.getHeading(e[e.length-2],e[e.length-1]);if(t&&i){let e=new _0x23de81(0);e.x=WebGLPlot$e.CesiumMath.toDegrees(t),e.z=WebGLPlot$e.CesiumMath.toDegrees(i),this._rotation=e}}}}}return{position:this._position,rotation:this._rotation}}}const _0x176109=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3684c5=_0x176109(void 0,(function(){return _0x3684c5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3684c5).search("(((.+)+)+)+$")}));_0x3684c5();class _0x17d8f6{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityRotationParameter=void 0,this._speed=void 0,this._startTime=void 0,this._isBack=!1,this._isFinished=!1,this._rotate=void 0,this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityRotationParameterUUID=void 0,this._startRotation=void 0,this._endRotation=void 0}_init(e,t){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t))return void(this._isFinished=!0);this._geoEntityRotationParameter=e,this._startTime=t,this._rotate=new _0x23de81(0);let i=1e3*e.getTime();i<0?this._isFinished=!0:(this._startRotation=e.getStartRotation(),this._endRotation=e.getEndRotation(),(!WebGLPlot$e.defined(this._startRotation)||!WebGLPlot$e.defined(this._endRotation)||this._startRotation.x===this._endRotation.x&&this._startRotation.y===this._endRotation.y&&this._startRotation.z===this._endRotation.z)&&(this._isFinished=!0),e.isGradient()&&(this._speed=new _0x23de81((this._endRotation.x-this._startRotation.x)/i,(this._endRotation.y-this._startRotation.y)/i,(this._endRotation.z-this._startRotation.z)/i),e.getCyclicType()==_0x4c8ffe.BOTHWAY&&(this._speed=new _0x23de81(2*this._speed.x,2*this._speed.y,2*this._speed.z))),this._isFinished=!1)}_update(e){let t=e/1e3,i=this._getCurrentGeoEntityRotationParameter(t);if(WebGLPlot$e.defined(i.geoEntityRotationParameter)&&WebGLPlot$e.defined(i.geoEntityRotationParameterActionTime))return this._currentGeoEntityRotationParameterUUID!=i.geoEntityRotationParameter.getUUID()&&(this._currentGeoEntityRotationParameterUUID=i.geoEntityRotationParameter.getUUID(),this._init(i.geoEntityRotationParameter,i.geoEntityRotationParameterActionTime)),{rotation:this._caclulate(e),isCurrent:!0,isFinished:this._isFinished};{let e,t,i;if(this._groupIndex>0)for(let n=this._groupIndex-1;n>=0;n--){let r=this._deductionScriptGroups[n]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$e.defined(r)){let o=r.getGeoEntityRotationParameterTimes();if(o.length>0){e=o[o.length-1],t=r.getGeoEntityRotationParameter(e),i=n;break}}}if(WebGLPlot$e.defined(t)){let n=new _0x17d8f6;return n._init(t),{rotation:n._caclulate(1e3*t.getTotalTime()+1),isCurrent:!1,groupIndex:i,finishTime:1e3*(e+t.getTotalTime())}}return{rotation:new _0x23de81(0),isCurrent:!1}}}_getCurrentGeoEntityRotationParameter(e){let t,i,n=this._deductionScript.getGeoEntityRotationParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityRotationParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityRotationParameter:t,geoEntityRotationParameterActionTime:i}}_caclulate(e){if(!WebGLPlot$e.defined(this._geoEntityRotationParameter))return;if(this._isFinished)return this._rotate;let t=this._geoEntityRotationParameter.getCyclicType(),i=1e3*this._geoEntityRotationParameter.getTime(),n=this._geoEntityRotationParameter.isGradient(),r=e-this._startTime;if(t==_0x4c8ffe.NO)if(r>=i)this._isFinished=!0,this._rotate=this._endRotation.clone();else if(n){let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x23de81(e,t,i)}else this._rotate=this._startRotation.clone();else{let e=1e3*this._geoEntityRotationParameter.getTotalTime();if(r>=e){this._isFinished=!0;let r=e%i;if(0===r)n?t==_0x4c8ffe.ONEWAY?this._rotate=this._endRotation.clone():t==_0x4c8ffe.BOTHWAY&&(this._rotate=this._startRotation.clone()):this._rotate=this._endRotation.clone();else if(n){if(t==_0x4c8ffe.ONEWAY){let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x23de81(e,t,i)}else if(t==_0x4c8ffe.BOTHWAY){let e=i/2;if(r>e){let t=this._endRotation.x-(r-e)*this._speed.x,i=this._endRotation.y-(r-e)*this._speed.y,n=this._endRotation.z-(r-e)*this._speed.z;this._rotate=new _0x23de81(t,i,n)}else{let e=this._startRotation.x+r*this._speed.x,t=this._startRotation.y+r*this._speed.y,i=this._startRotation.z+r*this._speed.z;this._rotate=new _0x23de81(e,t,i)}}}else{let e=i/2;this._rotate=r>e?this._endRotation.clone():this._startRotation.clone()}}else{let e=r%i;if(n){if(t==_0x4c8ffe.ONEWAY){let t=this._startRotation.x+e*this._speed.x,i=this._startRotation.y+e*this._speed.y,n=this._startRotation.z+e*this._speed.z;this._rotate=new _0x23de81(t,i,n)}else if(t==_0x4c8ffe.BOTHWAY){let t=i/2;if(e>t){let i=this._endRotation.x-(e-t)*this._speed.x,n=this._endRotation.y-(e-t)*this._speed.y,r=this._endRotation.z-(e-t)*this._speed.z;this._rotate=new _0x23de81(i,n,r)}else{let t=this._startRotation.x+e*this._speed.x,i=this._startRotation.y+e*this._speed.y,n=this._startRotation.z+e*this._speed.z;this._rotate=new _0x23de81(t,i,n)}}}else{let t=i/2;this._rotate=e>t?this._endRotation.clone():this._startRotation.clone()}}}return this._rotate}}const _0x37ca4a=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2ac6e2=_0x37ca4a(void 0,(function(){return _0x2ac6e2.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ac6e2).search("(((.+)+)+)+$")}));_0x2ac6e2();class _0x179128{constructor(e,t){this._deductionScript=e,this._groupIndex=t,this._geoEntityScaleParameter=void 0,this._speed=void 0,this._startTime=void 0,this._cyclicStartTime=void 0,this._isBack=!1,this._isFinished=!1,this._scale=void 0,this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityScaleParameterUUID=void 0,this._startScale=void 0,this._endScale=void 0}_init(e,t,i){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(t))return void(this._isFinished=!0);this._geoEntityScaleParameter=e,this._startTime=t,this._scale=i;let n=1e3*e.getTime();n<0?this._isFinished=!0:(this._startScale=e.getStartScale(),WebGLPlot$e.defined(this._startScale)||(this._startScale=i),this._endScale=e.getEndScale(),WebGLPlot$e.defined(this._endScale)||(this._endScale=i),this._startScale!==this._endScale?(e.isGradient()&&(this._speed=(this._endScale-this._startScale)/n,this._geoEntityScaleParameter.getCyclicType()==_0x4c8ffe.BOTHWAY&&(this._speed=2*this._speed)),this._isFinished=!1):this._isFinished=!0)}_update(e){let t=e/1e3,i=this._getCurrentGeoEntityScaleParameter(t);if(WebGLPlot$e.defined(i.geoEntityScaleParameter)&&WebGLPlot$e.defined(i.geoEntityScaleParameterActionTime))return this._currentGeoEntityScaleParameterUUID!=i.geoEntityScaleParameter.getUUID()&&(this._currentGeoEntityScaleParameterUUID=i.geoEntityScaleParameter.getUUID(),this._init(i.geoEntityScaleParameter,i.geoEntityScaleParameterActionTime)),this._caclulate(e);{let e,t;if(this._groupIndex>0)for(let i=this._groupIndex-1;i>=0;i--){let n=this._deductionScriptGroups[i]._getDeductionScriptByGeoEntityUUID(this._deductionScript.getGeoEntityUUID());if(WebGLPlot$e.defined(n)){let i=n.getGeoEntityScaleParameterTimes();if(i.length>0){e=i[i.length-1],t=n.getGeoEntityScaleParameter(e);break}}}if(WebGLPlot$e.defined(t)){let e=new _0x179128;return e._init(t),e._caclulate(1e3*t.getTotalTime()+1)}return this._scale}}_getCurrentGeoEntityScaleParameter(e){let t,i,n=this._deductionScript.getGeoEntityScaleParameterTimes();for(let r=0;r<n.length;r++){let o=n[r],a=this._deductionScript.getGeoEntityScaleParameter(o);if(e>=o){if(r===n.length-1){t=a,i=1e3*o;break}if(e<n[r+1]){t=a,i=1e3*o;break}}}return{geoEntityScaleParameter:t,geoEntityScaleParameterActionTime:i}}_caclulate(e){if(!WebGLPlot$e.defined(this._geoEntityScaleParameter))return;if(this._isFinished)return this._scale;let t=this._geoEntityScaleParameter.getCyclicType(),i=1e3*this._geoEntityScaleParameter.getTime(),n=this._geoEntityScaleParameter.getStartScale();WebGLPlot$e.defined(n)||(n=this._initScale);let r=this._geoEntityScaleParameter.getEndScale();WebGLPlot$e.defined(n)||(r=this._initScale);let o=this._geoEntityScaleParameter.isGradient(),a=e-this._startTime;if(t==_0x4c8ffe.NO)a>=i?(this._isFinished=!0,this._scale=r):this._scale=o?n+a*this._speed:this._initScale;else{let e=1e3*this._geoEntityScaleParameter.getTotalTime();if(a>=e){this._isFinished=!0;let a=e%i;if(0===a)o?t==_0x4c8ffe.ONEWAY?this._scale=r:t==_0x4c8ffe.BOTHWAY&&(this._scale=n):this._scale=r;else if(o){if(t==_0x4c8ffe.ONEWAY)this._scale=n+a*this._speed;else if(t==_0x4c8ffe.BOTHWAY){let e=i/2;this._scale=a>e?r-(a-e)*this._speed:n+a*this._speed}}else{let e=i/2;this._scale=a>e?r:n}}else{let e=a%i;if(o){if(t==_0x4c8ffe.ONEWAY)this._scale=n+e*this._speed;else if(t==_0x4c8ffe.BOTHWAY){let t=i/2;this._scale=e>t?r-(e-t)*this._speed:n+e*this._speed}}else{let t=i/2;this._scale=e>t?r:n}}}return this._scale}}const _0x2fe827=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xb18f52=_0x2fe827(void 0,(function(){return _0xb18f52.toString().search("(((.+)+)+)+$").toString().constructor(_0xb18f52).search("(((.+)+)+)+$")}));_0xb18f52();class _0x5a32e4{constructor(e,t,i,n,r){this._geoEntity=e,this._moveGeoEntity=t,this._deductionScript=i,this._groupIndex=n,this._geoEntityStartVisible=r,this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityBasicParameterUUID=void 0}_setGeoEntityBasicParamerter(e){WebGLPlot$e.defined(this._moveGeoEntity)&&this._moveGeoEntity.setGeoEntityParameter(e._getGeoEntityParameter())}_caclulate(e){if(!WebGLPlot$e.defined(this._geoEntity)||!WebGLPlot$e.defined(this._deductionScript))return;let t,i=this._deductionScript.getGeoEntityBasicParameterTimes();for(let n=0;n<i.length;n++){let r=i[n],o=this._deductionScript.getGeoEntityBasicParameter(r);if(e>=r){if(n===i.length-1){t=o;break}if(e<i[n+1]){t=o;break}}}if(!WebGLPlot$e.defined(t)&&this._groupIndex>0)for(let e=this._groupIndex-1;e>=0;e--){let i=this._deductionScriptGroups[e]._getDeductionScriptByGeoEntityUUID(this._geoEntity.getUUID());if(WebGLPlot$e.defined(i)){let e=i.getGeoEntityBasicParameterTimes();if(e.length>0){t=i.getGeoEntityBasicParameter(e[e.length-1]);break}}}if(WebGLPlot$e.defined(t))return{geoEntityBasicParameter:t,geoEntityBasicParameterUUID:t.getUUID()};{let e=this._geoEntity.getGeoEntityParameter(),t=new _0x4920fc;return t._update(e),t.setVisible(this._geoEntityStartVisible),{geoEntityBasicParameter:new _0x56b6ed(t),geoEntityBasicParameterUUID:"initGeoEntityBasicParameter"}}}_update(e){let t=e/1e3,i=this._caclulate(t);WebGLPlot$e.defined(i)&&WebGLPlot$e.defined(i.geoEntityBasicParameter)&&this._currentGeoEntityBasicParameterUUID!==i.geoEntityBasicParameterUUID&&(this._setGeoEntityBasicParamerter(i.geoEntityBasicParameter),this._currentGeoEntityBasicParameterUUID=i.geoEntityBasicParameterUUID)}}const _0x3d0f06=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x587758=_0x3d0f06(void 0,(function(){return _0x587758.toString().search("(((.+)+)+)+$").toString().constructor(_0x587758).search("(((.+)+)+)+$")}));_0x587758();class _0x1c7405{constructor(e,t,i,n,r){this._geoEntity=e,this._moveGeoEntity=t,this._deductionScript=i,this._groupIndex=n,this._geoEntityStartEffectVisible=r,this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._currentGeoEntityEffectParameterUUID=void 0}_setGeoEntityEffectParameter(e){let t=e.getGeoEntityEffects(),i=[];t.forEach((e=>{let t=e.clone();if(t.setGeoEntity(this._moveGeoEntity),t.getType()==_0xaadec6.COMMUNICATIONLINK){let e=t.getStartUUID(),i=t.getEndUUID();if(this._geoEntity.getUUID()==e){e=this._moveGeoEntity.getUUID();let t=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(i);WebGLPlot$e.defined(t)&&(i=t.getUUID())}else if(this._geoEntity.getUUID()==i){i=this._moveGeoEntity.getUUID();let t=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(e);WebGLPlot$e.defined(t)&&(e=t.getUUID())}t.setStartUUID(e),t.setEndUUID(i)}i.push(t)})),this._moveGeoEntity.updateGeoEntityEffects(i)}_caclulate(e){if(!WebGLPlot$e.defined(this._geoEntity)||!WebGLPlot$e.defined(this._deductionScript))return;let t,i=this._deductionScript.getGeoEntityEffectParameterTimes();for(let n=0;n<i.length;n++){let r=i[n],o=this._deductionScript.getGeoEntityEffectParameter(r);if(e>=r){if(n===i.length-1){t=o;break}if(e<i[n+1]){t=o;break}}}if(!WebGLPlot$e.defined(t)&&this._groupIndex>0)for(let e=this._groupIndex-1;e>=0;e--){let i=this._deductionScriptGroups[e]._getDeductionScriptByGeoEntityUUID(this._geoEntity.getUUID());if(WebGLPlot$e.defined(i)){let e=i.getGeoEntityEffectParameterTimes();if(e.length>0){t=i.getGeoEntityEffectParameter(e[e.length-1]);break}}}if(WebGLPlot$e.defined(t))return{geoEntityEffectParameter:t,geoEntityEffectParameterUUID:t.getUUID()};{let e=this._geoEntity.getGeoEntityEffects(),t=[];return e.forEach((e=>{let i=e.clone(),n=this._geoEntityStartEffectVisible.get(e.getUUID());i.setVisible(n),t.push(i)})),{geoEntityEffectParameter:new _0x5a492f(t),geoEntityEffectParameterUUID:"initGeoEntityEffectParameter"}}}_update(e){let t=e/1e3,i=this._caclulate(t);WebGLPlot$e.defined(i)&&WebGLPlot$e.defined(i.geoEntityEffectParameter)&&this._currentGeoEntityEffectParameterUUID!==i.geoEntityEffectParameterUUID&&(this._setGeoEntityEffectParameter(i.geoEntityEffectParameter),this._currentGeoEntityEffectParameterUUID=i.geoEntityEffectParameterUUID)}}const _0x20e2ae=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x264807=_0x20e2ae(void 0,(function(){return _0x264807.toString().search("(((.+)+)+)+$").toString().constructor(_0x264807).search("(((.+)+)+)+$")}));_0x264807();class _0x42795a{constructor(e,t,i){this._geoEntityMoveLayer=e,this._deductionScript=t,this._groupIndex=i,this._geoEntity=void 0,this._moveGeoEntity=void 0,this._position=void 0,this._scale=void 0,this._rotation=void 0,this._currentExtendEffectParameterUUID=void 0,this._deductionScriptActionBasicParm=void 0,this._deductionScriptActionEffect=void 0,this._deductionScriptActionMove=void 0,this._deductionScriptActionRotation=void 0,this._deductionScriptActionScale=void 0,this._geoEntityStartEffectVisible=void 0,this._geoEntityStartVisible=void 0,this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups()}_getMoveGeoEntity(){return this._moveGeoEntity}_getGeoEntityUUID(){return this._deductionScript.getGeoEntityUUID()}_setGeoEntityParamerter(e){WebGLPlot$e.defined(this._moveGeoEntity)&&this._moveGeoEntity.setGeoEntityParameter(e)}_setExtendEffectParameter(e){e.getGeoEntityEffects().forEach((e=>{e.getType()===_0xaadec6.EXTENDACTION&&e._executeExtend()}))}_updateDeductionScript(e,t){this._deductionScript=e,this._groupIndex=t,this._currentGeoEntityEffectParameterUUID=void 0,this._deductionScriptActionBasicParm=new _0x5a32e4(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionEffect=new _0x1c7405(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionMove=new _0x4de595(this._deductionScript,this._groupIndex),this._deductionScriptActionRotation=new _0x17d8f6(this._deductionScript,this._groupIndex),this._deductionScriptActionScale=new _0x179128(this._deductionScript,this._groupIndex)}_start(){let e=_0x2e28f1.getInstance().getGeoEntityManager();if(!WebGLPlot$e.defined(e)||(this._geoEntity=e.getGeoEntityByUUID(this._deductionScript.getGeoEntityUUID()),!WebGLPlot$e.defined(this._geoEntity)))return;let t=this._geoEntity._getGeoGraphicObject();if(!WebGLPlot$e.defined(t))return;let i=t.clone();this._geoEntityStartEffectVisible=new Map,this._geoEntity.getGeoEntityEffects().forEach((e=>{e.getType()!=_0xaadec6.COMMUNICATIONLINK&&(this._geoEntityStartEffectVisible.set(e.getUUID(),e.isVisible()),e.setVisible(!1))}));let n=[];if(t.getGeoEntity().getGeoEntityEffects().forEach((e=>{e.getType()==_0xaadec6.COMMUNICATIONLINK&&n.push(e)})),n.forEach((e=>{let n=t.getGeoEntity().getUUID(),r=i.getGeoEntity().getUUID(),o=!1,a=e.getStartUUID();n==a&&(o=!0,a=e.getEndUUID());let s=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(a);if(WebGLPlot$e.defined(s))o?e.setStartUUID(r):e.setEndUUID(r),i.getGeoEntity()._connectLinkToGeoEntity(e);else{let t=e.clone();o?t.setStartUUID(r):t.setEndUUID(r),i.getGeoEntity().addGeoEntityEffect(t),this._geoEntityStartEffectVisible.set(e.getUUID(),e.isVisible()),e.isVisible()&&e.setVisible(!1)}})),this._geoEntityMoveLayer.addFeature(i),this._geoEntityStartVisible=this._geoEntity.getGeoEntityParameter().isVisible(),this._geoEntityStartVisible){let e=new _0x4920fc;e.setVisible(!1),this._geoEntity.setGeoEntityParameter(e)}this._moveGeoEntity=i.getGeoEntity(),this._moveGeoEntity._isMoveGeoEntity=!0,this._position=this._geoEntity.getGeoEntityParameter().getPosition(),this._rotation=this._geoEntity.getGeoEntityParameter().getModelRotate(),this._scale=this._geoEntity.getGeoEntityParameter().getModelScale(),this._deductionScriptActionBasicParm=new _0x5a32e4(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartVisible),this._deductionScriptActionEffect=new _0x1c7405(this._geoEntity,this._moveGeoEntity,this._deductionScript,this._groupIndex,this._geoEntityStartEffectVisible),this._deductionScriptActionMove=new _0x4de595(this._deductionScript,this._groupIndex),this._deductionScriptActionRotation=new _0x17d8f6(this._deductionScript,this._groupIndex),this._deductionScriptActionScale=new _0x179128(this._deductionScript,this._groupIndex)}_reset(e){if(!WebGLPlot$e.defined(this._geoEntity)||!WebGLPlot$e.defined(this._moveGeoEntity))return;let t=new _0x4920fc;if(e){t.setVisible(this._geoEntityStartVisible),this._geoEntity.getGeoEntityEffects().forEach((e=>{let t=this._geoEntityStartEffectVisible.get(e.getUUID());if(e.getType()==_0xaadec6.COMMUNICATIONLINK){let i=e.getStartUUID();i==this._geoEntity.getUUID()&&(i=e.getEndUUID());let n=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(i);WebGLPlot$e.defined(n)||e.setVisible(t)}else e.setVisible(t)}));let e=this._moveGeoEntity.getGeoEntityEffects(),i=[],n=[];e.forEach((e=>{if(e.getType()==_0xaadec6.COMMUNICATIONLINK){let t=!1,r=e.getStartUUID();r==this._moveGeoEntity.getUUID()&&(t=!0,r=e.getEndUUID());let o=_0x2e28f1.getInstance().getDeductionScriptManager()._getMoveGeoEntityByUUID(r);WebGLPlot$e.defined(o)?(t?e.setStartUUID(this._geoEntity.getUUID()):e.setEndUUID(this._geoEntity.getUUID()),n.push(e)):i.push(e)}})),i.forEach((e=>{this._moveGeoEntity.removeGeoEntityEffect(e.getUUID())})),n.forEach((e=>{this._moveGeoEntity._disConnectLinkToGeoEntity(e),this._geoEntity._connectLinkToGeoEntity(e)}))}else{let e=this._moveGeoEntity.getGeoEntityParameter();WebGLPlot$e.defined(e)&&t._update(e);let i=[],n=[];this._moveGeoEntity.getGeoEntityEffects().forEach((e=>{e.getType()==_0xaadec6.COMMUNICATIONLINK?i.push(e):n.push(e.clone())})),this._geoEntity.updateGeoEntityEffects(n),i.forEach((e=>{this._moveGeoEntity._disConnectLinkToGeoEntity(e),this._geoEntity._connectLinkToGeoEntity(e)}))}this._geoEntity.setGeoEntityParameter(t),this._geoEntityMoveLayer.removeGeoGraphicObject(this._moveGeoEntity._getGeoGraphicObject()),this._moveGeoEntity=void 0}_execute(e){if(WebGLPlot$e.defined(this._geoEntity)){this._deductionScriptActionBasicParm._update(e),this._deductionScriptActionEffect._update(e);let t=this._deductionScriptActionMove._update(e,this._position,this._rotation),i=this._deductionScriptActionRotation._update(e),n=this._deductionScriptActionScale._update(e);if(WebGLPlot$e.defined(t)||WebGLPlot$e.defined(i)||WebGLPlot$e.defined(n)){let e=new _0x4920fc;WebGLPlot$e.defined(t)&&WebGLPlot$e.defined(t.position)&&e.setPosition(t.position);let r=new _0x23de81(0);if(t.isCurrent?r=i.isCurrent?t.isFinished?i.isFinished&&t.currentFinishTime>i.currentFinishTime?new _0x23de81(t.rotation.x,i.rotation.y,t.rotation.z):new _0x23de81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):i.isFinished?new _0x23de81(t.rotation.x,i.rotation.y,t.rotation.z):new _0x23de81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):new _0x23de81(t.rotation.x,i.rotation.y,t.rotation.z):i.isCurrent?r=new _0x23de81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):WebGLPlot$e.defined(t.groupIndex)?WebGLPlot$e.defined(i.groupIndex)?t.groupIndex===i.groupIndex?r=t.finishTime>i.finishTime?new _0x23de81(t.rotation.x,i.rotation.y,t.rotation.z):new _0x23de81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):t.groupIndex<i.groupIndex?r=new _0x23de81(t.rotation.x+i.rotation.x,i.rotation.y,t.rotation.z+i.rotation.z):t.groupIndex>i.groupIndex&&(r=new _0x23de81(t.rotation.x,i.rotation.y,t.rotation.z)):r=t.rotation:r=WebGLPlot$e.defined(i.groupIndex)?new _0x23de81(t.rotation.x+i.rotation.x,t.rotation.y+i.rotation.y,t.rotation.z+i.rotation.z):t.rotation,e.setModelRotate(r),e.setVectorRotate(r),WebGLPlot$e.defined(n)){e.setModelScale(n),e.setVectorRotate(n);let t=this._moveGeoEntity._getGeoGraphicObject()._symbolSizeInLib;if(-1!=t.x&&-1!=t.y){let i=this._moveGeoEntity.getGeoEntityParameter().getDotPlotStyle();0===n?i.setGridSymbolSize(new WebGLPlot$e.Cartesian2(.1,.1)):i.setGridSymbolSize(new WebGLPlot$e.Cartesian2(t.x*n,t.y*n)),e.setDotPlotStyle(i)}let i=new WebGLPlot$e.Cartesian2(64,64);e.setPictureSymbolSize(new WebGLPlot$e.Cartesian2(i.x*n,i.y*n))}this._setGeoEntityParamerter(e)}}else{let t,i=e/1e3,n=this._deductionScript.getGeoEntityEffectParameterTimes();for(let e=0;e<n.length;e++){let r=n[e],o=this._deductionScript.getGeoEntityEffectParameter(r);if(i>=r){if(e===n.length-1){t=o;break}if(i<n[e+1]){t=o;break}}}WebGLPlot$e.defined(t)&&this._currentExtendEffectParameterUUID!==t.getUUID()&&(this._setExtendEffectParameter(t),this._currentExtendEffectParameterUUID=t.getUUID())}}}var _0x349d34=(_0x1d2fa3=!0,function(e,t){var i=_0x1d2fa3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d2fa3=!1,i}),_0x49ce5c=_0x349d34(void 0,(function(){return _0x49ce5c.toString().search("(((.+)+)+)+$").toString().constructor(_0x49ce5c).search("(((.+)+)+)+$")})),_0x1d2fa3;_0x49ce5c();var _0x4d689c={Ready:0,Executing:1,Stop:2},_0x1c1a40=Object.freeze(_0x4d689c);const _0x2e4946=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x210d10=_0x2e4946(void 0,(function(){return _0x210d10.toString().search("(((.+)+)+)+$").toString().constructor(_0x210d10).search("(((.+)+)+)+$")}));_0x210d10();class _0x1a5240{constructor(e,t,i){this._geoEntityMoveLayer=e,this._deductionScriptGroup=t,this._deductionScriptExcuteManager=i,this._deductionScriptExcutes=[],this._executeState=_0x1c1a40.Ready,this._totalTime=this._calcTotalTime()}_calcTotalTime(){let e=this._deductionScriptGroup.getDeductionScripts(),t=0;e.forEach((e=>{let i=e._getTotalTime();t<i&&(t=i)}));let i=this._deductionScriptGroup.getDeductionScriptExtend()._getDeductionScript()._getTotalTime();return t<i&&(t=i),t}_getTotalTime(){return this._totalTime}_getExecuteState(){return this._executeState}_getDeductionScriptExcutes(){return this._deductionScriptExcutes}_execute(e,t){this._executeState===_0x1c1a40.Executing&&this._deductionScriptExcutes.forEach((i=>{i._execute(e,t)}))}_start(e){let t=this._deductionScriptGroup.getDeductionScripts();for(let i=0;i<t.length;i++){let n=t[i],r=this._deductionScriptExcuteManager._getDeductionScriptExecute(n.getGeoEntityUUID());WebGLPlot$e.defined(r)?r._updateDeductionScript(n,e):(r=new _0x42795a(this._geoEntityMoveLayer,n,e),r._start()),this._deductionScriptExcutes.push(r)}let i=this._deductionScriptGroup.getDeductionScriptExtend()._getDeductionScript(),n=new _0x42795a(this._geoEntityMoveLayer,i,e);n._start(),this._deductionScriptExcutes.push(n),this._executeState=_0x1c1a40.Executing}_reset(e){this._deductionScriptExcutes.forEach((t=>{this._executeState!==_0x1c1a40.Ready&&t._reset(e)})),this._executeState=_0x1c1a40.Ready}}var _0x2b0b55=(_0x4876ab=!0,function(e,t){var i=_0x4876ab?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4876ab=!1,i}),_0x48a126=_0x2b0b55(void 0,(function(){return _0x48a126.toString().search("(((.+)+)+)+$").toString().constructor(_0x48a126).search("(((.+)+)+)+$")})),_0x4876ab;_0x48a126();var _0x2afae9={NoReset:0,ManualReset:1,AutoReset:2},_0x2b1f2e=Object.freeze(_0x2afae9);const _0x11d5c1=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x305ed5=_0x11d5c1(void 0,(function(){return _0x305ed5.toString().search("(((.+)+)+)+$").toString().constructor(_0x305ed5).search("(((.+)+)+)+$")}));_0x305ed5();class _0x3c9d86{constructor(e){this._geoEntityMoveLayer=e,this._UUID=WebGLPlot$e.createGuid(),this._resetType=_0x2b1f2e.AutoReset,this._executeState=_0x1c1a40.Ready,this._executeCallBackFunction=void 0,this._groupIndex=-1,this._deductionScriptExecuteGroups=[],this._currentDeductionScriptExecuteGroup=void 0,this._totalPassTime=0,this._lastTime=void 0}_getUUID(){return this._UUID}_getDeductionScriptExecute(e){for(let t=0;t<=this._groupIndex;t++){let i=this._deductionScriptExecuteGroups[t]._getDeductionScriptExcutes();if(WebGLPlot$e.defined(i))for(let t=0;t<i.length;t++){const n=i[t];if(n._getGeoEntityUUID()===e)return n}}}_execute(e){if(this._executeState===_0x1c1a40.Executing){let t=e-this._lastTime;if(this._totalPassTime+=t,this._totalPassTime>0){let e=-1,t=0;for(let i=0;i<this._deductionScriptExecuteGroups.length;i++){let n=t+this._deductionScriptExecuteGroups[i]._getTotalTime();if(this._totalPassTime>=t&&this._totalPassTime<n+30){e=i;break}t=n}-1===e?this._stop():e!=this._groupIndex?(this._groupIndex=e,this._currentDeductionScriptExecuteGroup=this._deductionScriptExecuteGroups[this._groupIndex],this._currentDeductionScriptExecuteGroup._start(e)):this._currentDeductionScriptExecuteGroup._execute(this._totalPassTime-t,this._deductionScriptGroups[e-1]),WebGLPlot$e.defined(this._executeCallBackFunction)&&this._executeCallBackFunction({allPassTime:this._totalPassTime,groupIndex:this._groupIndex,groupPassTime:this._totalPassTime-t})}}this._lastTime=e}_start(e){this._deductionScriptGroups=_0x2e28f1.getInstance().getDeductionScriptManager().getDeductionScriptGroups(),this._lastTime=e,this._deductionScriptGroups.forEach((e=>{let t=new _0x1a5240(this._geoEntityMoveLayer,e,this);this._deductionScriptExecuteGroups.push(t)})),this._executeState=_0x1c1a40.Executing;let t=0;return this._deductionScriptExecuteGroups.forEach((e=>{t+=e._getTotalTime()})),t}_stop(){this._executeState===_0x1c1a40.Executing&&(this._resetType===_0x2b1f2e.AutoReset||this._resetType===_0x2b1f2e.NoReset?this._reset(this._UUID):this._executeState=_0x1c1a40.Stop)}_reset(){this._executeState!==_0x1c1a40.Ready&&(this._deductionScriptExecuteGroups.forEach((e=>{this._resetType===_0x2b1f2e.NoReset?e._reset(!1):e._reset(!0)})),this._executeState=_0x1c1a40.Ready,this._groupIndex=-1,this._deductionScriptExecuteGroups=[],this._currentDeductionScriptExecuteGroup=void 0,this._totalPassTime=0,this._lastTime=void 0)}_setExecuteCallBackFunc(e){this._executeCallBackFunction=e}_setResetType(e){this._resetType=e}}var _0x1993fe=(_0x160323=!0,function(e,t){var i=_0x160323?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x160323=!1,i}),_0x221a72=_0x1993fe(void 0,(function(){return _0x221a72.toString().search("(((.+)+)+)+$").toString().constructor(_0x221a72).search("(((.+)+)+)+$")})),_0x160323;_0x221a72();class _0x209786{constructor(){this._deductionScript=new _0x3fc8dd("Extend"),this._isModified=!1}_getDeductionScript(){return this._deductionScript}_isModify(){return this._isModified}_setIsModify(e){this._isModified=e}_save(){_0x2e28f1.getInstance()._saveDeductionScript(!1)}_toJson(){return this._deductionScript._toJson()}_fromJson(e){this._deductionScript._fromJson(e)}getUUID(){return this._deductionScript.getUUID()}getGeoEntityEffectExtendParameterTimes(){return this._deductionScript.getGeoEntityEffectParameterTimes()}getGeoEntityEffectExtendParameter(e){this._deductionScript.getGeoEntityEffectParameter(e)}setGeoEntityEffectExtendParameter(e,t){this._deductionScript.setGeoEntityEffectParameter(e,t),this._isModified=!0,this._save()}removeGeoEntityEffectExtendParameter(e){this._deductionScript.removeGeoEntityEffectParameter(e),this._isModified=!0,this._save()}getDelayFinishTime(){return this._deductionScript.getDelayFinishTime()}setDelayFinishTime(e){this._deductionScript.setDelayFinishTime(e),this._isModified=!0}}const _0x5f1a8d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x6080de=_0x5f1a8d(void 0,(function(){return _0x6080de.toString().search("(((.+)+)+)+$").toString().constructor(_0x6080de).search("(((.+)+)+)+$")}));_0x6080de();class _0x5f47f0{constructor(e){this._deductionScriptManager=e,this._UUID=WebGLPlot$e.createGuid(),this._name="",this._deductionScripts=[],this._deductionScriptExtend=new _0x209786,this._isModified=!1}_fromJson(e,t){let i=JSON.parse(e);WebGLPlot$e.defined(i.UUID)&&(this._UUID=i.UUID),WebGLPlot$e.defined(i.name)&&(this._name=i.name),WebGLPlot$e.defined(i.deductionScriptUUIDs)&&(this._deductionScripts.splice(0),i.deductionScriptUUIDs.forEach((e=>{this._deductionScripts.push(t.get(e))}))),WebGLPlot$e.defined(i.deductionScriptExtend)&&this._deductionScriptExtend._fromJson(i.deductionScriptExtend)}_toJson(){let e=new Map,t={};return t.hasOwnProperty("UUID")||(t.UUID=this._UUID),t.hasOwnProperty("name")||(t.name=this._name),t.hasOwnProperty("deductionScriptUUIDs")||(t.deductionScriptUUIDs=[],this._deductionScripts.forEach((i=>{e.set(i.getUUID(),i._toJson()),t.deductionScriptUUIDs.push(i.getUUID())}))),t.hasOwnProperty("deductionScriptExtend")||(t.deductionScriptExtend=this._deductionScriptExtend._toJson()),{deductionScriptJsons:e,json:JSON.stringify(t)}}_isModify(){return!!this._isModified||!!this._deductionScriptExtend._isModify()}_setIsModify(e){this._isModified=e,this._deductionScriptExtend._setIsModify(e)}_save(){_0x2e28f1.getInstance()._saveDeductionScript(!1)}_getDeductionScriptByGeoEntityUUID(e){for(let t=0;t<this._deductionScripts.length;t++){let i=this._deductionScripts[t];if(i.getGeoEntityUUID()===e)return i}}createDeductionScript(e){let t=new _0x3fc8dd(e);return this._deductionScripts.push(t),this._deductionScriptManager._addDeductionScripts.push(t),this._isModified=!0,this._save(),t}removeDeductionScript(e){for(let t=0;t<this._deductionScripts.length;t++){const i=this._deductionScripts[t];if(i.getUUID()===e){let n=i.getGeoEntityMoveParameterTimes();for(let e=n.length-1;e>=0;e--)i.removeGeoEntityMoveParameter(n[e]);this._deductionScripts.splice(t,1),this._deductionScriptManager._removeDeductionScriptUUIDs.push(e),this._isModified=!0,this._save();break}}}getDeductionScripts(){return this._deductionScripts}setName(e){this._name=e,this._isModified=!0,this._save()}getName(){return this._name}getUUID(){return this._UUID}getDeductionScriptExtend(){return this._deductionScriptExtend}}const _0xd87666=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3550f5=_0xd87666(void 0,(function(){return _0x3550f5.toString().search("(((.+)+)+)+$").toString().constructor(_0x3550f5).search("(((.+)+)+)+$")}));_0x3550f5();class _0x1a04d1{constructor(){this._deductionScriptGroups=[],this._scene=void 0,this._geoEntityMoveLayer=void 0,this._deductionScriptExecuteManager=void 0,this._addDeductionScripts=[],this._removeDeductionScriptUUIDs=[],this._isGroupInfoModified=!1}_setScene(e){this._geoEntityMoveLayer=new _0x394df6(e,"GeoEntityMoveLayer"),e.plotLayers.add(this._geoEntityMoveLayer),this._scene=e,this._deductionScriptExecuteManager=new _0x3c9d86(this._geoEntityMoveLayer)}_execute(e){WebGLPlot$e.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._execute(e)}_getDeductionScriptExecute(e){if(WebGLPlot$e.defined(this._deductionScriptExecuteManager)){let t=this._deductionScriptExecuteManager._getDeductionScriptExecute(e);if(WebGLPlot$e.defined(t))return t}}_saveDeduscriptGroupsDataToScheme(){let e=_0x2e28f1.getInstance()._getOpenedSchemeName();if(WebGLPlot$e.defined(e)){let t=[];this._deductionScriptGroups.forEach((e=>{let i=e._toJson();t.push(i.json)})),_0x2e28f1.getInstance().getSituationSimulationSchemeManager().saveScriptStructure(e,t)}}_getAddAndRemoveDeductionScripts(){return{add:this._addDeductionScripts,remove:this._removeDeductionScriptUUIDs}}_clearAddAndRemoveDeductionScripts(){this._addDeductionScripts.splice(0),this._removeDeductionScriptUUIDs.splice(0)}_isGroupInfoModify(){if(this._isGroupInfoModified)return!0;for(let e=0;e<this._deductionScriptGroups.length;e++)if(this._deductionScriptGroups[e]._isModify())return!0;return!1}_setIsGroupInfoModify(e){this._isGroupInfoModified=e,this._deductionScriptGroups.forEach((t=>{t._setIsModify(e)}))}_save(){_0x2e28f1.getInstance()._saveDeductionScript(!1)}_start(e){return this._reset(),this._deductionScriptExecuteManager._start(e)}_stop(){WebGLPlot$e.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._stop()}_reset(){WebGLPlot$e.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._reset(),_0x2e28f1.getInstance().getGeoEntityEffectExtendFactory().clearText()}_setResetType(e){WebGLPlot$e.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._setResetType(e)}_setExecuteCallBackFunc(e){WebGLPlot$e.defined(this._deductionScriptExecuteManager)&&this._deductionScriptExecuteManager._setExecuteCallBackFunc(e)}_removeAllScriptGroupFromScene(){this._deductionScriptGroups.splice(0)}getDeductionScriptGroups(){return this._deductionScriptGroups}removeScriptGroup(e){for(let t=0;t<this._deductionScriptGroups.length;t++){const i=this._deductionScriptGroups[t];if(i.getUUID()===e){i.getDeductionScripts().forEach((e=>{this._removeDeductionScriptUUIDs.push(e.getUUID())})),this._deductionScriptGroups.splice(t,1),this._isGroupInfoModified=!0,this._save();break}}}getScriptGroupByUUID(e){for(let t=0;t<this._deductionScriptGroups.length;t++){let i=this._deductionScriptGroups[t];if(i.getUUID()===e)return i}}removeAllScriptGroup(){this._deductionScriptGroups.forEach((e=>{e.getDeductionScripts().forEach((e=>{this._removeDeductionScriptUUIDs.push(e.getUUID())}))})),this._deductionScriptGroups.splice(0),this._isGroupInfoModified=!0,this._save()}createScriptGroup(e){let t=new _0x5f47f0(this);return t.setName(e),this._deductionScriptGroups.push(t),this._isGroupInfoModified=!0,this._save(),t}toJson(){let e=new Map,t=[];return this._deductionScriptGroups.forEach((i=>{let n=i._toJson();e=new Map([...e,...n.deductionScriptJsons]),t.push(n.json)})),{deductionScriptJsons:e,deductionScriptGroupJsons:JSON.stringify(t)}}fromJson(e){this.removeAllScriptGroup(!1);let t=e.deductionScriptJsons,i=new Map;if(t.forEach(((e,t)=>{if(e.length>0){let n=new _0x3fc8dd("");n._fromJson(e),i.set(t,n)}})),e.deductionScriptGroupJsons.length>0){let t=JSON.parse(e.deductionScriptGroupJsons);WebGLPlot$e.defined(t)&&t.forEach((e=>{let t=new _0x5f47f0(this);t._fromJson(e,i),this._deductionScriptGroups.push(t)}))}}_getMoveGeoEntityByUUID(e){let t=this._getDeductionScriptExecute(e);if(WebGLPlot$e.defined(t))return t._getMoveGeoEntity();if(WebGLPlot$e.defined(this._deductionScriptExecuteManager))for(let t=0;t<=this._deductionScriptExecuteManager._groupIndex;t++){let i=this._deductionScriptExecuteManager._deductionScriptExecuteGroups[t]._getDeductionScriptExcutes();if(WebGLPlot$e.defined(i))for(let t=0;t<i.length;t++){const n=i[t];if(WebGLPlot$e.defined(n)&&WebGLPlot$e.defined(n._getMoveGeoEntity())){let t=n._getMoveGeoEntity();if(t.getUUID()==e)return t}}}return null}}const _0x33cb65=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3b696f=_0x33cb65(void 0,(function(){return _0x3b696f.toString().search("(((.+)+)+)+$").toString().constructor(_0x3b696f).search("(((.+)+)+)+$")}));_0x3b696f();class _0x572365{constructor(){this._datasetNameSuffix=["_Structure","_Entity","_Script","_Satellite"],this._commit=this._getCommit(),this._URI=null}_setURI(e){this._URI=e,this._SatelliteConfigURI=e+"/iserver/mgis/situationSimulation/Satellite/SatelliteGroupsTemplate.json",this._datasetsURI=e+"/iserver/services/data-SituationSimulationSchemeWorkspace/rest/data/datasources/SituationSimulationSchemeDatasource/datasets",this._featureResultsURI=e+"/iserver/services/data-SituationSimulationSchemeWorkspace/rest/data/featureResults.rjson?returnContent=true"}newScheme(e){if(null==e||0===e.length||/^\d/.test(e))return!1;let t=this._queryFeatures("metadata","SchemeName",e);if(null==t||null!=t&&t.length>0)return!1;let i=this._datasetsURI+"/metadata/features.rjson",n=[{fieldNames:["SmID","SmUserID","SchemeName"],fieldValues:["0","0",e],geometry:null}];this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(WebGLPlot$e.toJSON(n));for(let t=0;t<this._datasetNameSuffix.length;t++){let i={datasetType:"TABULAR",datasetName:e+this._datasetNameSuffix[t]};if(this._commit.open("POST",encodeURI(this._datasetsURI+".json"),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(i)),JSON.parse(this._commit.responseText,null).succeed){let i=this._datasetsURI+"/"+e+this._datasetNameSuffix[t]+"/fields.rjson",n=["uuid","Content"];0===t&&(n=["EntityStructure","ScriptStructure","SatelliteGroupStructure"]);for(let e=0;e<n.length;e++){let t={isZeroLengthAllowed:"false",maxLength:"100000",isRequired:"false",name:n[e],caption:n[e],type:"WTEXT",defaultValue:"null",isSystemField:"false"};this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(t))}}}let r=this._loadSateGroupInfos(this._SatelliteConfigURI);return WebGLPlot$e.defined(r)&&this.saveSatelliteGroupStructure(e,r),!0}getAllSchemeName(){let e=this._queryFeatures("metadata","",""),t=[];if(null!=e)for(let i=0;i<e.length;i++)t.push(e[i].fieldValues[2]);return t}deleteScheme(e){let t=this._datasetsURI+"/metadata/features.rjson?_method=DELETE&deleteMode=SQL",i={attributeFilter:'SchemeName="'+e+'"'};this._commit.open("POST",encodeURI(t),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(WebGLPlot$e.toJSON(i));for(let t=0;t<this._datasetNameSuffix.length;t++){let i=this._datasetsURI+"/"+e+this._datasetNameSuffix[t]+".rjson";this._commit.open("DELETE",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null)}}saveEntityStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","EntityStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","EntityStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getEntityStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[2]:""}saveScriptStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","ScriptStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","ScriptStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getScriptStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[3]:""}saveSatelliteGroupStructure(e,t){let i=this._datasetsURI+"/"+e+"_Structure/features.rjson";this._commit.open("GET",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let n=JSON.parse(this._commit.responseText,null),r=[{fieldNames:["SmID","SmUserID","SatelliteGroupStructure"],fieldValues:["1","0",t],geometry:null}];return 0!==n.featureCount&&(i+="?_method=PUT",r=[{ID:1,fieldNames:["SmID","SmUserID","SatelliteGroupStructure"],fieldValues:["1","0",t],geometry:null}]),this._commit.open("POST",encodeURI(i),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(r)),n=JSON.parse(this._commit.responseText,null),n.succeed}getSatelliteGroupStructure(e){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let t={getFeatureMode:"ID",datasetNames:["SituationSimulationSchemeDatasource:"+e+"_Structure"],ids:[1]};this._commit.send(JSON.stringify(t));let i=JSON.parse(this._commit.responseText,null);return null!=i&&i.featureCount>0?i.features[0].fieldValues[4]:""}addFeature(e,t,i,n){return this._editFeature(e,t,i,n)}addFeatures(e,t,i){i.forEach(((i,n)=>{this._editFeature(e,t,n,i)}))}getFeatures(e,t){let i=this._getDatasetNameSuffix(t),n=this._queryFeatures(e+i,"","");const r=new Map;if(null!=n)for(let e=0;e<n.length;e++)r.set(n[e].fieldValues[2],n[e].fieldValues[3]);return r}updateFeature(e,t,i,n){return this._editFeature(e,t,i,n)}updateFeatures(e,t,i){let n=this._getDatasetNameSuffix(t),r=this._datasetsURI+"/"+e+n+"/features.rjson";this._commit.open("GET",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(null);let o=JSON.parse(this._commit.responseText,null);if(null!=o&&o.featureCount>0){r=this._datasetsURI+"/"+e+n+"/features.rjson?_method=DELETE&deleteMode=SQL";let t={attributeFilter:"SmID>=0"};this._commit.open("POST",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(t))}i.forEach(((i,n)=>{this._editFeature(e,t,n,i)}))}deleteFeature(e,t,i){let n=this._getDatasetNameSuffix(t),r=this._datasetsURI+"/"+e+n+"/features.rjson?_method=DELETE&deleteMode=SQL",o={attributeFilter:'uuid="'+i+'"'};return this._commit.open("POST",encodeURI(r),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(o)),JSON.parse(this._commit.responseText,null).succeed}_getCommit(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{this.commit=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}_editFeature(e,t,i,n){let r=this._getDatasetNameSuffix(t),o=this._queryFeatures(e+r,"uuid",i),a=this._datasetsURI+"/"+e+r+"/features.rjson",s=[{fieldNames:["SmID","SmUserID","uuid","Content"],fieldValues:["0","0",i,n],geometry:null}];return null!=o&&o.length>0&&(a+="?_method=PUT",s=[{ID:o[0].ID,fieldNames:["SmID","SmUserID","Content"],fieldValues:["0","0",n],geometry:null}]),this._commit.open("POST",encodeURI(a),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(JSON.stringify(s)),JSON.parse(this._commit.responseText,null).succeed}_getDatasetNameSuffix(e){let t="";switch(e){case _0x489b6c.ENTITY:t="_Entity";break;case _0x489b6c.SCRIPT:t="_Script";break;case _0x489b6c.SATELLITE:t="_Satellite"}return t}_queryFeatures(e,t,i){this._commit.open("POST",encodeURI(this._featureResultsURI),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");let n={getFeatureMode:"SQL",datasetNames:["SituationSimulationSchemeDatasource:"+e],maxFeatures:1e4,queryParameter:{sortClause:null,ids:null,name:null,attributeFilter:0===t.length?"":t+'="'+i+'"',groupClause:null,linkItems:null,joinItems:null,fields:null}};this._commit.send(WebGLPlot$e.toJSON(n));let r=JSON.parse(this._commit.responseText,null);return null==r?null:r.features}_loadSateGroupInfos(e){if(!WebGLPlot$e.defined(e)||!WebGLPlot$e.defined(this._URI))return null;var t;if(-1==(e=e.replace(/\\+/g,"/")).lastIndexOf("/"))return null;(t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open("GET",e,!1),t.send();var i=t.responseText;if(!WebGLPlot$e.defined(i))return null;let n=JSON.parse(i);return WebGLPlot$e.defined(n.groups)&&n.groups.forEach((e=>{WebGLPlot$e.defined(e.modelPath)&&(e.modelPath=this._URI+e.modelPath)})),JSON.stringify(n)}_convertToRgba(e){if(e.startsWith("RGBA(")&&e.endsWith(")")){let t=e.replace("RGBA(","");t=t.substring(0,t.lastIndexOf(")"));let i=t.split(",");if(4===i.length)return new WebGLPlot$e.Color(i[0].trim(),i[1].trim(),i[2].trim(),i[3].trim())}return null}}const _0xa3a7ad=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4d95e4=_0xa3a7ad(void 0,(function(){return _0x4d95e4.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d95e4).search("(((.+)+)+)+$")}));_0x4d95e4();class _0x2d2a0c{constructor(){this._textNames=[],this._funcs=new Map,this._time=void 0}_execute(e){this._time=e,this._funcs.forEach(((e,t)=>{e.func(e.parms)}))}init(e){let t=this;WebGLPlot$e.defined(e.viewer)&&_0x584c60.addExtendCallBack((function(e,t,i){if("camera"===t){let t=e.viewer,n=JSON.parse(i);t.camera.flyTo({destination:new Cesium.Cartesian3(n.position.x,n.position.y,n.position.z),orientation:{heading:n.heading,pitch:n.pitch,roll:n.roll},duration:n.duration})}}),{viewer:e.viewer}),WebGLPlot$e.defined(e.document)&&_0x584c60.addExtendCallBack((function(e,i,n){if("text"===i){let i=e.document,r=JSON.parse(n),o=i.createElement("Div");o.onselectstart=function(){return!1},o.style.position="absolute",o.style.zIndex="9999",o.style.whiteSpace="pre-wrap",o.style.wordBreak="break-all",o.style.width=r.width,o.style.height=r.height,o.style.background=r.backColor,o.style.webkitBorderRadius=r.borderRadius,o.style.paddingLeft=r.paddingLeft,o.style.paddingRight=r.paddingRight,o.style.paddingTop=r.paddingTop,o.style.paddingBottom=r.paddingBottom;let a=r.texts;for(let e=0;e<a.length;e++){let t=a[e],n=i.createElement("p");n.style.marginTop="0px",n.style.marginBottom="0px";let r=t.fontSize,s=r.slice(0,r.length-2);n.style.paddingTop=String(Number(s)/2)+"px",n.style.paddingBottom=String(Number(s)/2)+"px",n.style.color=t.color,n.style.fontFamily=t.fontFamily,n.style.fontSize=t.fontSize,n.style.fontWeight=t.fontWeight,n.style.fontStyle=t.fontStyle,n.style.lineHeight=t.lineHeight,n.style.letterSpacing=t.letterSpacing,n.style.textDecoration=t.textDecoration,n.style.textShadow=t.textShadow,n.style["-webkit-text-stroke"]=t.stroke,n.style.textAlign=t.textAlign,"left"===n.style.textAlign?n.style.marginLeft=t.margin:"right"===n.style.textAlign&&(n.style.marginRight=t.margin);let l=i.createTextNode(t.text);n.appendChild(l),o.appendChild(n)}i.body.appendChild(o);let s=o.offsetWidth,l=o.offsetHeight;switch(r.position.type){case 0:o.style.left=r.position.customPos.left,o.style.top=r.position.customPos.top;break;case 1:o.style.left="1px",o.style.top="1px";break;case 2:o.style.left="calc(50% - "+String(s/2)+"px)",o.style.top="1px";break;case 3:o.style.left="calc(100% - "+String(s+1)+"px)",o.style.top="1px";break;case 4:o.style.left="1px",o.style.top="calc(50% - "+String(l/2)+"px)";break;case 5:o.style.left="calc(50% - "+String(s/2)+"px)",o.style.top="calc(50% - "+String(l/2)+"px)";break;case 6:o.style.left="calc(100% - "+String(s+1)+"px)",o.style.top="calc(50% - "+String(l/2)+"px)";break;case 7:o.style.left="1px",o.style.top="calc(100% - "+String(l+1)+"px)";break;case 8:o.style.left="calc(50% - "+String(s/2)+"px)",o.style.top="calc(100% - "+String(l+1)+"px)";break;case 9:o.style.left="calc(50% - "+String(s+1)+"px)",o.style.top="calc(100% - "+String(l+1)+"px)"}let u=WebGLPlot$e.createGuid(),c=function(e){if(t._time-e.startTime>e.time){e.div.remove(),t._funcs.delete(u);for(let e=0;e<t._textNames.length;e++)if(t._textNames[e]===u){t._textNames.splice(e,1);break}}};t._funcs.set(u,{parms:{startTime:t._time,time:r.time,div:o},func:c}),t._textNames.push(u)}}),{document:e.document})}clearText(){this._textNames.forEach((e=>{this._funcs.get(e).parms.div.remove(),this._funcs.delete(e)})),this._textNames=[]}createCameraFlyExtendEffect(e){let t=new _0x584c60;t.setName("camera");let i={};return i.position={x:e.position.x,y:e.position.y,z:e.position.z},i.heading=e.heading,i.pitch=e.pitch,i.roll=e.roll,i.duration=e.duration,t.setParam(JSON.stringify(i)),t}createTextExtendEffect(e){if(!WebGLPlot$e.defined(e.texts))return;let t=new _0x584c60;t.setName("text");let i={};return i.time=WebGLPlot$e.defaultValue(1e3*e.time,3e3),i.width=WebGLPlot$e.defined(e.width)?String(e.width)+"px":"",i.height=WebGLPlot$e.defined(e.height)?String(e.height)+"px":"",WebGLPlot$e.defined(e.position)?(i.position={type:WebGLPlot$e.defaultValue(e.position.type,8)},WebGLPlot$e.defined(e.position.customPos)?i.position.customPos={left:WebGLPlot$e.defined(e.position.customPos.x)?String(e.position.customPos.x)+"px":"0px",top:WebGLPlot$e.defined(e.position.customPos.y)?String(e.position.customPos.y)+"px":"0px"}:i.position.customPos={left:"0px",top:"0px"}):i.position={type:8},i.backColor=WebGLPlot$e.defined(e.backColor)?e.backColor.toCssColorString():"white",i.borderRadius=WebGLPlot$e.defined(e.borderRadius)?e.borderRadius+"px":"0px",i.paddingLeft=WebGLPlot$e.defined(e.paddingLeft)?String(e.paddingLeft)+"px":"0px",i.paddingRight=WebGLPlot$e.defined(e.paddingRight)?String(e.paddingRight)+"px":"0px",i.paddingTop=WebGLPlot$e.defined(e.paddingTop)?String(e.paddingTop)+"px":"0px",i.paddingBottom=WebGLPlot$e.defined(e.paddingBottom)?String(e.paddingBottom)+"px":"0px",i.texts=[],e.texts.forEach((e=>{let t={text:WebGLPlot$e.defaultValue(e.text,"Text"),fontFamily:WebGLPlot$e.defaultValue(e.fontFamily,"Microsoft YaHei"),fontStyle:WebGLPlot$e.defaultValue(e.fontStyle,"normal"),lineHeight:WebGLPlot$e.defaultValue(e.lineHeight,1),fontSize:WebGLPlot$e.defined(e.fontSize)?String(e.fontSize)+"px":"16px",fontWeight:WebGLPlot$e.defined(e.fontWeight)?String(e.fontWeight)+"px":"normal",letterSpacing:WebGLPlot$e.defined(e.letterSpacing)?String(e.letterSpacing)+"px":"0px",color:WebGLPlot$e.defined(e.color)?e.color.toCssColorString():"black",textAlign:WebGLPlot$e.defaultValue(e.textAlign,"left"),margin:WebGLPlot$e.defined(e.margin)?String(e.margin)+"px":"0px"};if(WebGLPlot$e.defined(e.textDecoration)){let i=WebGLPlot$e.defined(e.textDecoration.type)?e.textDecoration.type:"none",n=WebGLPlot$e.defined(e.textDecoration.color)?e.textDecoration.color.toCssColorString():"black";t.textDecoration=i+" "+n}if(WebGLPlot$e.defined(e.textShadow)){let i=WebGLPlot$e.defined(e.textShadow.color)?e.textShadow.color.toCssColorString():"black",n=WebGLPlot$e.defined(e.textShadow.left)?String(e.textShadow.left)+"px":"4px",r=WebGLPlot$e.defined(e.textShadow.top)?String(e.textShadow.top)+"px":"4px",o=WebGLPlot$e.defined(e.textShadow.size)?String(e.textShadow.size)+"px":"4px";t.textShadow=i+" "+n+" "+r+" "+o}if(WebGLPlot$e.defined(e.stroke)){let i=WebGLPlot$e.defined(e.stroke.width)?String(e.stroke.width)+"px":"0px",n=WebGLPlot$e.defined(e.stroke.color)?e.stroke.color.toCssColorString():"black";t.stroke=i+" "+n}i.texts.push(t)})),t.setParam(JSON.stringify(i)),t}}const _0x3ea46e=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe6c571=_0x3ea46e(void 0,(function(){return _0xe6c571.toString().search("(((.+)+)+)+$").toString().constructor(_0xe6c571).search("(((.+)+)+)+$")}));_0xe6c571();class _0x120b1f{constructor(){this._bPlay=!1,this._lUTCTime=(new Date).getTime(),this._lSimulationTime=this._lUTCTime,this._dSimulationSpeed=1,this._lCumnlativeTime=0,this._bReverse=!1,this._bAutoUpdate=!1,this._lOrbitTime=this._lSimulationTime;let e=this;this._timer=setInterval((function(){e._execute()}),30)}setResetType(e){_0x2e28f1.getInstance().getDeductionScriptManager()._setResetType(e)}start(){return this._bPlay=!0,_0x2e28f1.getInstance().getDeductionScriptManager()._start(this._lSimulationTime)}stop(){this._bPlay=!1,_0x2e28f1.getInstance().getDeductionScriptManager()._stop()}reset(){this._bPlay=!1,_0x2e28f1.getInstance().getDeductionScriptManager()._reset()}pause(){this._bPlay=!1}continue(){this._bPlay=!0}setExecutePassTimeOffset(e){this._lSimulationTime+=e}setExecuteCallBackFunc(e){_0x2e28f1.getInstance().getDeductionScriptManager()._setExecuteCallBackFunc(e)}getUTCTime(){return this._lUTCTime}setSimulationSpeed(e){this._dSimulationSpeed=e}getSimulationSpeed(){return this._dSimulationSpeed}setSimulationTime(e){this._lSimulationTime=e,this._executeSatellite(),this._executeDeductionScript()}getSimulationTime(){return this._lSimulationTime}setIsReverse(e){this._bReverse=e}getIsReverse(){return this._bReverse}getAutoUpdate(){return this._bAutoUpdate}isPlay(){return this._bPlay}updataAllOrbitPosition(){_0x2e28f1.getInstance().getSatelliteManager().updateAllOrbitPosition(this._lSimulationTime)}_execute(){let e=(new Date).getTime();if(this._bPlay){let t=(e-this._lUTCTime)*this._dSimulationSpeed;this._bReverse?this._lSimulationTime=this._lSimulationTime-t:this._lSimulationTime=this._lSimulationTime+t,this._executeSatellite(),this._executeDeductionScript(),this._lCumnlativeTime=0}this._lUTCTime=e}_executeSatellite(){_0x2e28f1.getInstance().getSatelliteManager().updateAllSatellitePosition(this._lSimulationTime),_0x2e28f1.getInstance().getSatelliteEntityManager().updateAllSatelliteEntityPosition(this._lSimulationTime)}_executeDeductionScript(){_0x2e28f1.getInstance().getDeductionScriptManager()._execute(this._lSimulationTime),_0x2e28f1.getInstance().getGeoEntityEffectExtendFactory()._execute(this._lSimulationTime)}}const _0x2590d4=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x22f061=_0x2590d4(void 0,(function(){return _0x22f061.toString().search("(((.+)+)+)+$").toString().constructor(_0x22f061).search("(((.+)+)+)+$")}));_0x22f061();class _0x2e28f1{constructor(){this._geoEntityManager=new _0x3c98af,this._satelliteEntityManager=new _0x535f91,this._satelliteManager=new _0x5e00a7,this._deductionScriptManager=new _0x1a04d1,this._situationSimulationSchemeManager=new _0x572365,this._geoEntityEffectExtendFactory=new _0x2d2a0c,this._simulationController=new _0x120b1f,this._schemeName=void 0,this._isAutoSave=!1,this._uri=void 0}_getOpenedSchemeName(){return this._schemeName}_saveGeoEntity(e){if(e||this._isAutoSave){if(!WebGLPlot$e.defined(this._schemeName))return;let e=this._geoEntityManager._getAddAndRemoveGeoEntitys();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x489b6c.ENTITY,e.getUUID(),e.toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x489b6c.ENTITY,e)}));let t=this._geoEntityManager.getGeoEntityRootNode();(e.add.length>0||e.remove.length>0||t._isModify())&&(this._situationSimulationSchemeManager.saveEntityStructure(this._schemeName,t._toJson()),t._isModify()&&t._setIsModify(!1)),this._geoEntityManager.getGeoEntitys().forEach((t=>{-1===e.add.indexOf(t)&&t._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x489b6c.ENTITY,t.getUUID(),t.toJson()),t._setIsModify(!1))})),this._geoEntityManager._clearAddAndRemoveGeoEntitys()}}_saveSatelliteGeoEntity(e){if(e||this._isAutoSave){if(!WebGLPlot$e.defined(this._schemeName))return;let e=this._satelliteEntityManager._getAddAndRemoveGeoEntitys();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x489b6c.SATELLITE,e.getUUID(),e.toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x489b6c.SATELLITE,e)})),this._satelliteEntityManager.getSatelliteEntitys().forEach((t=>{-1===e.add.indexOf(t)&&t._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x489b6c.SATELLITE,t.getUUID(),t.toJson()),t._setIsModify(!1))})),this._satelliteEntityManager._clearAddAndRemoveGeoEntitys()}}_saveDeductionScript(e){if(e||this._isAutoSave){if(!WebGLPlot$e.defined(this._schemeName))return;let e=this._deductionScriptManager._getAddAndRemoveDeductionScripts();e.add.forEach((e=>{this._situationSimulationSchemeManager.addFeature(this._schemeName,_0x489b6c.SCRIPT,e.getUUID(),e._toJson())})),e.remove.forEach((e=>{this._situationSimulationSchemeManager.deleteFeature(this._schemeName,_0x489b6c.SCRIPT,e)})),(e.add.length>0||e.remove.length>0||this._deductionScriptManager._isGroupInfoModify())&&(this._situationSimulationSchemeManager.saveScriptStructure(this._schemeName,this._deductionScriptManager.toJson().deductionScriptGroupJsons),this._deductionScriptManager._isGroupInfoModify()&&this._deductionScriptManager._setIsGroupInfoModify(!1)),this._deductionScriptManager.getDeductionScriptGroups().forEach((e=>{e.getDeductionScripts().forEach((e=>{e._isModify()&&(this._situationSimulationSchemeManager.updateFeature(this._schemeName,_0x489b6c.SCRIPT,e.getUUID(),e._toJson()),e._setIsModify(!1))}))}))}}_saveSatelliteGroups(e){if(e||this._isAutoSave){if(!WebGLPlot$e.defined(this._schemeName))return;this._satelliteManager._isModify()&&(this._situationSimulationSchemeManager.saveSatelliteGroupStructure(this._schemeName,this._satelliteManager.toJson()),this._satelliteManager._setIsModify(!1))}}static getInstance(){return _0x2e28f1._instance||(_0x2e28f1._instance=new _0x2e28f1),_0x2e28f1._instance}getSimulationController(){return this._simulationController}getGeoEntityManager(){return this._geoEntityManager}getSatelliteEntityManager(){return this._satelliteEntityManager}getSatelliteManager(){return this._satelliteManager}getDeductionScriptManager(){return this._deductionScriptManager}getSituationSimulationSchemeManager(){return this._situationSimulationSchemeManager}getGeoEntityEffectExtendFactory(){return this._geoEntityEffectExtendFactory}setScene(e){this._geoEntityManager._setScene(e),this._satelliteEntityManager.setScene(e),this._satelliteManager.setScene(e),this._deductionScriptManager._setScene(e)}openScheme(e,t){let i=this._isAutoSave;this._isAutoSave=!1;let n=this._situationSimulationSchemeManager.getSatelliteGroupStructure(e);this._satelliteManager.fromJson(n);let r=this._situationSimulationSchemeManager.getFeatures(e,_0x489b6c.ENTITY),o=this._situationSimulationSchemeManager.getEntityStructure(e);this._geoEntityManager.fromJson({geoEntityJsons:r,geoEntityNodeJson:o},(function(e){"function"==typeof t&&t(e)}));let a=this._situationSimulationSchemeManager.getFeatures(e,_0x489b6c.SCRIPT),s=this._situationSimulationSchemeManager.getScriptStructure(e);this._deductionScriptManager.fromJson({deductionScriptJsons:a,deductionScriptGroupJsons:s});let l=this._situationSimulationSchemeManager.getFeatures(e,_0x489b6c.SATELLITE);this._satelliteEntityManager.fromJson({satelliteEntityJsons:l,satelliteManager:this._satelliteManager},(function(e){"function"==typeof t&&t(e)})),this._schemeName=e,this._isAutoSave=i}closeScheme(){let e=this._isAutoSave;this._isAutoSave=!1,this._geoEntityManager._removeAllGeoEntityFromScene(),this._deductionScriptManager._removeAllScriptGroupFromScene(),this._satelliteEntityManager._removeAllSatelliteEntityFromScene(this._satelliteManager),this._schemeName=void 0,this._isAutoSave=e}saveScheme(){this._saveGeoEntity(!0),this._saveSatelliteGeoEntity(!0),this._saveDeductionScript(!0),this._saveSatelliteGroups(!0)}setIsAutoSave(e){this._isAutoSave=e}isAutoSave(){return this._isAutoSave}setURI(e){this._situationSimulationSchemeManager._setURI(e),this._uri=e}getURI(){return this._uri}}var _0x143301=(_0x49e33d=!0,function(e,t){var i=_0x49e33d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49e33d=!1,i}),_0x253a07=_0x143301(void 0,(function(){return _0x253a07.toString().search("(((.+)+)+)+$").toString().constructor(_0x253a07).search("(((.+)+)+)+$")})),_0x49e33d;_0x253a07();var WebGLPlot$3=window.WebGLPlot=window.WebGLPlot||{};function _0x181e05(e){e=e||{},this.defaultFlag=!!e.defaultFlag&&e.defaultFlag,this.symbolStyle=new _0x291171,this.symbolTextStyle=new _0x40b7f2,this._gridSymbolSize=e.gridSymbolSize?e.gridSymbolSize:new WebGLPlot$3.Cartesian2(-1,-1),this._lineSymbolID=e.lineSymbolID?e.lineSymbolID:-1,this._gridLineWidth=e.gridLineWidth?e.gridLineWidth:-1,this._modelPath=e.modelPath?e.modelPath:"",this.CLASS_NAME="DefaultStyle"}Object.defineProperties(_0x181e05.prototype,{lineColor:{get:function(){return this.symbolStyle._lineColor},set:function(e){e!==this.symbolStyle._lineColor&&(this.symbolStyle.lineColor=e)}},lineWidth:{get:function(){return this.symbolStyle._lineWidth},set:function(e){e!==this.symbolStyle._lineWidth&&(this.symbolStyle.lineWidth=e)}},fillBackColor:{get:function(){return this.symbolStyle._fillBackColor},set:function(e){e!==this.symbolStyle._fillBackColor&&(this.symbolStyle.fillBackColor=e)}},fillForeColor:{get:function(){return this.symbolStyle._fillForeColor},set:function(e){e!==this.symbolStyle._fillForeColor&&(this.symbolStyle.fillForeColor=e)}},fillBackOpaque:{get:function(){return this.symbolStyle._fillBackOpaque},set:function(e){e!==this.symbolStyle._fillBackOpaque&&(this.symbolStyle.fillBackOpaque=e)}},fillGradientAngle:{get:function(){return this.symbolStyle._fillGradientAngle},set:function(e){e!==this.symbolStyle._fillGradientAngle&&(this.symbolStyle.fillGradientAngle=e)}},fillGradientMode:{get:function(){return this.symbolStyle._fillGradientMode},set:function(e){e!==this.symbolStyle._fillGradientMode&&(this.symbolStyle.fillGradientMode=e)}},fillGradientOffsetRatioY:{get:function(){return this.symbolStyle._fillGradientOffsetRatioY},set:function(e){e!==this.symbolStyle._fillGradientOffsetRatioY&&(this.symbolStyle.fillGradientOffsetRatioY=e)}},fillGradientOffsetRatioX:{get:function(){return this.symbolStyle._fillGradientOffsetRatioX},set:function(e){e!==this.symbolStyle._fillGradientOffsetRatioX&&(this.symbolStyle.fillGradientOffsetRatioX=e)}},fillSymbolID:{get:function(){return this.symbolStyle._fillSymbolID},set:function(e){e!==this.symbolStyle._fillSymbolID&&(this.symbolStyle.fillSymbolID=e)}},fillOpaqueRate:{get:function(){return this.symbolStyle._fillOpaqueRate},set:function(e){e===this.symbolStyle._fillOpaqueRate||e>100||e<0||(this.symbolStyle.fillOpaqueRate=e)}},surroundLineWidth:{get:function(){return this.symbolStyle._surroundLineWidth},set:function(e){e!==this.symbolStyle._surroundLineWidth&&(this.symbolStyle.surroundLineWidth=e)}},surroundLineColor:{get:function(){return this.symbolStyle._surroundLineColor},set:function(e){e!==this.symbolStyle._surroundLineColor&&(this.symbolStyle.surroundLineColor=e)}},opacity:{get:function(){return this.symbolStyle._opacity},set:function(e){e!==this.symbolStyle._opacity&&(this.symbolStyle.opacity=e)}},surroundLineType:{get:function(){return this.symbolStyle._surroundLineType},set:function(e){e!==this.symbolStyle._surroundLineType&&(this.symbolStyle.surroundLineType=e)}},height:{get:function(){return this.symbolTextStyle._height},set:function(e){e!==this.symbolTextStyle._height&&(this.symbolTextStyle.height=e)}},foreColor:{get:function(){return this.symbolTextStyle._foreColor},set:function(e){e!==this.symbolTextStyle._foreColor&&(this.symbolTextStyle.foreColor=e)}},backColor:{get:function(){return this.symbolTextStyle._backColor},set:function(e){e!==this.symbolTextStyle._backColor&&(this.symbolTextStyle.backColor=e)}},outline:{get:function(){return this.symbolTextStyle._outline},set:function(e){e!==this.symbolTextStyle._outline&&(this.symbolTextStyle.outline=e)}},fontName:{get:function(){return this.symbolTextStyle._fontName},set:function(e){e!==this.symbolTextStyle._fontName&&(this.symbolTextStyle.fontName=e)}},italic:{get:function(){return this.symbolTextStyle._italic},set:function(e){e!==this.symbolTextStyle._italic&&(this.symbolTextStyle.italic=e)}},bold:{get:function(){return this.symbolTextStyle._bold},set:function(e){e!==this.symbolTextStyle._bold&&(this.symbolTextStyle.bold=e)}},align:{get:function(){return this.symbolTextStyle._align},set:function(e){e!==this.symbolTextStyle._italic&&(this.symbolTextStyle.align=e)}},italicAngle:{get:function(){return this.symbolTextStyle._italicAngle},set:function(e){e!==this.symbolTextStyle._italicAngle&&(this.symbolTextStyle.italicAngle=e)}},shadow:{get:function(){return this.symbolTextStyle._shadow},set:function(e){e!==this.symbolTextStyle._shadow&&(this.symbolTextStyle.shadow=e)}},sizeFixed:{get:function(){return this.symbolTextStyle._sizeFixed},set:function(e){e!==this.symbolTextStyle._sizeFixed&&(this.symbolTextStyle.sizeFixed=e)}},underline:{get:function(){return this.symbolTextStyle._underline},set:function(e){e!==this.symbolTextStyle._underline&&(this.symbolTextStyle.underline=e)}},backOpaque:{get:function(){return this.symbolTextStyle._backOpaque},set:function(e){e!==this.symbolTextStyle._backOpaque&&(this.symbolTextStyle.backOpaque=e)}},strikeout:{get:function(){return this.symbolTextStyle._strikeout},set:function(e){e!==this.symbolTextStyle._strikeout&&(this.symbolTextStyle.strikeout=e)}},borderSpacingWidth:{get:function(){return this._borderSpacingWidth},set:function(e){e!==this._borderSpacingWidth&&(this._borderSpacingWidth=e)}},outlineWidth:{get:function(){return this.symbolTextStyle._outlineWidth},set:function(e){e!==this.symbolTextStyle._outlineWidth&&(this.symbolTextStyle.outlineWidth=e)}},fontWidth:{get:function(){return this.symbolTextStyle._fontWidth},set:function(e){e!==this.symbolTextStyle._fontWidth&&(this.symbolTextStyle.fontWidth=e)}},opaqueRate:{get:function(){return this.symbolTextStyle._opaqueRate},set:function(e){e!==this.symbolTextStyle._opaqueRate&&(this.symbolTextStyle.opaqueRate=e)}},stringAlignment:{get:function(){return this.symbolTextStyle._stringAlignment},set:function(e){e!==this.symbolTextStyle._stringAlignment&&(this.symbolTextStyle.stringAlignment=e)}},text3DScale:{get:function(){return this.symbolTextStyle._text3DScale},set:function(e){e!==this.symbolTextStyle._text3DScale&&(this.symbolTextStyle.text3DScale=e)}},fontWeight:{get:function(){return this.symbolTextStyle._fontWeight},set:function(e){e!==this.symbolTextStyle._fontWeight&&(this.symbolTextStyle.fontWeight=e)}},fontSize:{get:function(){return this.symbolTextStyle._fontSize},set:function(e){e!==this.symbolTextStyle._fontSize&&(this.symbolTextStyle.fontSize=e)}},outlineColor:{get:function(){return this.symbolTextStyle._outlineColor},set:function(e){e!==this.symbolTextStyle._outlineColor&&(this.symbolTextStyle.outlineColor=e)}},gridSymbolSize:{get:function(){return this._gridSymbolSize},set:function(e){e.x>0&&e.y>0&&(this._gridSymbolSize=e)}},lineSymbolID:{get:function(){return this._lineSymbolID},set:function(e){this._lineSymbolID!==e&&(this._lineSymbolID=e)}},gridLineWidth:{get:function(){return this._gridLineWidth},set:function(e){this._gridLineWidth!==e&&(this._gridLineWidth=e)}},modelPath:{get:function(){return this._modelPath},set:function(e){this._modelPath!==e&&(this._modelPath=e)}}}),WebGLPlot$3.DefaultStyle=_0x181e05;var _0x2188f6=(_0x441ebc=!0,function(e,t){var i=_0x441ebc?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x441ebc=!1,i}),_0x545870=_0x2188f6(void 0,(function(){return _0x545870.toString().search("(((.+)+)+)+$").toString().constructor(_0x545870).search("(((.+)+)+)+$")})),_0x441ebc;_0x545870();var WebGLPlot$2=window.WebGLPlot=window.WebGLPlot||{};function _0x29b810(e){e=e||{},this.properties=e.properties?e.properties:[],this.CLASS_NAME="ExtendProperty"}function t$2(e){this._shaderProgramText=e.shaderProgramText,this._name=e.name,this._context=e.context}function r$8(e,t){this.name=e.name,this._engine=e.engine,this._shaderProgram=e.shaderProgram,this._threadGroupsize=[],this._computerShader=new _0x45d8f5(this.name,this._engine,{computeSource:this._shaderProgram},t)}_0x29b810.prototype.addProperty=function(e,t){var i=this.findProperty(e);return null===i?this.properties.push(WebGLPlot$2.createProperty(e,t)):i.setValue(t),!0},_0x29b810.prototype.deleteProperty=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties.slice(t,1),!0;return!1},_0x29b810.prototype.findProperty=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties[t];return null},_0x29b810.prototype.getPropertyValue=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key===e)return this.properties[t].value;return null},_0x29b810.prototype.getPropertyByIndex=function(e){return e<this.properties.length?this.properties[e]:null},_0x29b810.prototype.getPropertyCount=function(){return this.properties.length},_0x29b810.prototype.destroy=function(){this.properties=null},WebGLPlot$2.ExtendProperty=_0x29b810,Object.defineProperties(t$2.prototype,{shaderProgram:{get:function(){return this._shaderProgramText}},shaderName:{get:function(){return this._name}},engine:{get:function(){return this._context.engine}}}),Object.defineProperties(r$8.prototype,{threadGroupsize:{get:function(){return this._threadGroupsize}}}),r$8.prototype.dispatch=function(e,t,i,n){e$2e(t)||(t=1),e$2e(i)||(i=1),0==this.threadGroupsize.length&&this.getThreadGroupSizes(this._shaderProgram);const r=this.threadGroupsize,o=Math.ceil(e/r[0]),a=Math.ceil(t/r[1]),s=Math.ceil(i/r[2]);return e$2e(n)?this._computerShader.dispatchWhenReady(o,a,s,n):(this._computerShader.dispatch(o,a,s),null)},r$8.prototype.getThreadGroupSizes=function(e){var t=/workgroup_size\s*?\(\s*?(\d+)\s*?,\s*?(\d+)\s*?,\s*?(\d+)/g.exec(e);return t=t?[0|t[1],0|t[2],0|t[3]]:[1,1,1],this._threadGroupsize=t,t},r$8.prototype.bindStorageBuffer=function(e,t){this._computerShader.setStorageBuffer(e,t)},r$8.prototype.bindUniformBuffer=function(e,t){this._computerShader.setUniformBuffer(e,t)},r$8.prototype.bindTextureSampler=function(e,t){this._computerShader.setTextureSampler(e,t)},r$8.prototype.bindStorageTexture=function(e,t){this._computerShader.setStorageTexture(e,t)},r$8.prototype.bindTexture=function(e,t,i){this._computerShader.setTexture(e,t,i)};var _0x408a20=(_0x376f44=!0,function(e,t){var i=_0x376f44?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x376f44=!1,i}),_0x11e83e=_0x408a20(void 0,(function(){return _0x11e83e.toString().search("(((.+)+)+)+$").toString().constructor(_0x11e83e).search("(((.+)+)+)+$")})),_0x376f44;_0x11e83e();var CommonNoLigthOneTextureVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\n#ifdef RENDER_POINT\nuniform float uPointSize;\n#endif\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n gl_Position = depthClampFarPlane(pos);\n vTexCoord = aTexCoord0.xy;\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n#ifdef RENDER_POINT\n gl_PointSize = uPointSize;\n#endif\n}",_0x54e704=(_0x49d88=!0,function(e,t){var i=_0x49d88?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x49d88=!1,i}),_0x154bb1=_0x54e704(void 0,(function(){return _0x154bb1.toString().search("(((.+)+)+)+$").toString().constructor(_0x154bb1).search("(((.+)+)+)+$")})),_0x49d88;_0x154bb1();var CommonOneTextureFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uTexture0;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n\tgl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec2 texcoord = vTexCoord.xy;\n gl_FragColor = texture2D(uTexture0, texcoord);\n}",_0x1e7009=(_0x24e464=!0,function(e,t){var i=_0x24e464?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24e464=!1,i}),_0x3e45cb=_0x1e7009(void 0,(function(){return _0x3e45cb.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e45cb).search("(((.+)+)+)+$")})),_0x24e464;_0x3e45cb();var DepthMapAnalysisVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\nuniform mat4 uRenderTextureMatrix;\nvarying vec4 renderTextureCoord;\nvarying float texcoordX;\n#ifdef LOG_DEPTH\nvarying float v_rttLogZ;\n#endif\nvarying vec4 vPositionEC;\nvoid main()\n{\n gl_Position = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n vec4 viewPos = czm_modelView * vec4(aPosition.xyz, 1.0);\n vPositionEC = viewPos;\n renderTextureCoord = uRenderTextureMatrix * viewPos;\n texcoordX = aTexCoord0.x;\n}",_0x379980=(_0x37dc8b=!0,function(e,t){var i=_0x37dc8b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37dc8b=!1,i}),_0x10612b=_0x379980(void 0,(function(){return _0x10612b.toString().search("(((.+)+)+)+$").toString().constructor(_0x10612b).search("(((.+)+)+)+$")})),_0x37dc8b;_0x10612b();var ModifyRegionBottomFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D uColorTexture;\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\nuniform vec4 uGeoBounds;\nuniform vec4 uHypRect;\n\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying float fHeight;\n\n\nfloat computeMixCon(float height)\n{\n\tfloat distanceToContour = mod(height - 0.0002, uHypContourInterval);\n\tfloat dxc = abs(dFdx(height));\n\tfloat dyc = abs(dFdy(height));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float height)\n{\n\tfloat threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat contourRate = (height - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tvec2 contourCoord = vec2(0.0, finalCoord);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvoid main()\n{\n#ifdef GL_EXT_frag_depth\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n#ifdef WEBGL2\n gl_FragDepthEXT = min(fWindowZ * gl_FragCoord.w, 1.0);\n#endif\n vec2 texcoord = vTexCoord.xy;\n gl_FragColor = texture2D(uColorTexture, texcoord);\n if(uHypHasColorTable > 0.1)\n {\n float bNext = 1.0;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexCoord.xy;\n polyTexCoord.x = polyTexCoord.x * (uGeoBounds.z - uGeoBounds.x) + uGeoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uGeoBounds.w - uGeoBounds.y) + uGeoBounds.y;\n if(polyTexCoord.x>uHypRect.x && polyTexCoord.x<uHypRect.z && polyTexCoord.y> uHypRect.y&& polyTexCoord.y < uHypRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uHypRect.x, uHypRect.w);\n polyTexCoord.x = polyTexCoord.x / (uHypRect.z - uHypRect.x);\n polyTexCoord.y = 1.0 - polyTexCoord.y / (uHypRect.y - uHypRect.w);\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n bNext = 0.0;\n }\n }\n else\n {\n bNext = 0.0;\n }\n }\n if(bNext > 0.2)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(fHeight <= uHypMaxVisibleValue && fHeight >= uHypMinVisibleValue)\n {\n#ifdef GL_OES_standard_derivatives\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fHeight);\n contourMapColor = mix(computeContourMapColor(fHeight), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fHeight);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fHeight);\n }\n else\n {\n finalOpacity = 0.0;\n }\n }\n else\n {\n finalOpacity = 0.5;\n }\n gl_FragColor = mix(gl_FragColor, contourMapColor, finalOpacity);\n }\n }\n}",_0x4f0dd6=(_0x1e0f84=!0,function(e,t){var i=_0x1e0f84?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e0f84=!1,i}),_0x5a213b=_0x4f0dd6(void 0,(function(){return _0x5a213b.toString().search("(((.+)+)+)+$").toString().constructor(_0x5a213b).search("(((.+)+)+)+$")})),_0x1e0f84;_0x5a213b();var ModifyRegionBottomVp="attribute vec4 aPosition;\nattribute vec2 aTexCoord0;\n#ifdef RENDER_POINT\nuniform float uPointSize;\n#endif\n\nvarying vec4 clip_vertex;\nvarying float fWindowZ;\nvarying vec2 vTexCoord;\nvarying float fHeight;\n\nvec4 depthClampFarPlane(vec4 clipPos)\n{\n\tfWindowZ = (0.5 * (clipPos.z / clipPos.w) + 0.5) * clipPos.w;\n\tclipPos.z = min(clipPos.z, clipPos.w);\n\treturn clipPos;\n}\nvoid main()\n{\n vec4 pos = czm_modelViewProjection * vec4(aPosition.xyz, 1.0);\n gl_Position = depthClampFarPlane(pos);\n vTexCoord = aTexCoord0.xy;\n clip_vertex = czm_modelView * vec4(aPosition.xyz, 1.0);\n fHeight = aPosition.w;\n#ifdef RENDER_POINT\n gl_PointSize = uPointSize;\n#endif\n}",_0x346d05=(_0x40cc79=!0,function(e,t){var i=_0x40cc79?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x40cc79=!1,i}),_0x160d21=_0x346d05(void 0,(function(){return _0x160d21.toString().search("(((.+)+)+)+$").toString().constructor(_0x160d21).search("(((.+)+)+)+$")})),_0x40cc79;_0x160d21();var ModifyRegionOuterFS="varying vec2 vTexCoord;\nuniform sampler2D uColorTexture;\nvoid main()\n{\n gl_FragColor = texture2D(uColorTexture, vTexCoord);\n}",_0x128ac1=(_0x160fd2=!0,function(e,t){var i=_0x160fd2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x160fd2=!1,i}),_0x5c51cf=_0x128ac1(void 0,(function(){return _0x5c51cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c51cf).search("(((.+)+)+)+$")})),_0x160fd2;_0x5c51cf();var ModifyRegionOuterVS="attribute vec4 aPosition;\nattribute vec2 aTexCoord;\nuniform vec2 uMinMaxModifyHeight;\nvarying vec2 vTexCoord;\nuniform sampler2D uHeightTexture;\nvoid main()\n{\n float terrainHeight = czm_unpackValue(texture2D(uHeightTexture, aTexCoord));\n float height = aPosition.z + terrainHeight;\n vec4 vertexPos = vec4(aPosition.xy, height, 1.0);\n gl_Position = czm_modelViewProjection * vertexPos;\n vTexCoord = aTexCoord;\n}",_0x14464a=(_0x37d141=!0,function(e,t){var i=_0x37d141?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x37d141=!1,i}),_0x5149c6=_0x14464a(void 0,(function(){return _0x5149c6.toString().search("(((.+)+)+)+$").toString().constructor(_0x5149c6).search("(((.+)+)+)+$")})),_0x37d141;_0x5149c6();var ModifyRegionSideFp="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D uHeightTexture;\nuniform sampler2D uColorTexture;\n\nuniform sampler2D uHypsometricTexture;\nuniform sampler2D uHypsometricRenderTexture;\nuniform float uHypHasColorTable;\nuniform float uHypContourFillMode;\nuniform float uHypContourInterval;\nuniform float uHypOpacity;\nuniform float uHypMaxVisibleValue;\nuniform float uHypMinVisibleValue;\nuniform float uHypFloor;\nuniform float uHypCeil;\nuniform vec4 uHypLineColor;\nuniform float uHypHasAnalysisRegion;\nuniform vec4 uGeoBounds;\nuniform vec4 uHypRect;\nvarying vec2 vTexcoord;\nvarying float fHeight;\nvarying float height;\nvarying float regionHeight;\n#ifdef Excavation\nvarying vec2 vTexcoord1;\n#endif\n\nfloat computeMixCon(float height)\n{\n\tfloat distanceToContour = mod(height - 0.0002, uHypContourInterval);\n\tfloat dxc = abs(dFdx(height));\n\tfloat dyc = abs(dFdy(height));\n\tfloat dF = max(dxc, dyc);\n\treturn (distanceToContour < dF) ? 1.0 : 0.0;\n}\n\nvec4 computeContourMapColor(float height)\n{\n\tfloat threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n\tfloat contourRate = (height - uHypFloor) / threshold;\n\tfloat finalCoord = clamp(contourRate, 0.0, 1.0);\n\tvec2 contourCoord = vec2(0.0, finalCoord);\n\treturn texture2D(uHypsometricTexture, contourCoord).rgba;\n}\n\nvoid main()\n{\nczm_writeDepthClampedToFarPlane();\n\tvec2 texcoord = vTexcoord;\n#ifdef Excavation\n\ttexcoord = vTexcoord1;\n#endif\nfloat terrainHeight = max(czm_unpackValue(texture2D(uHeightTexture, vTexcoord)), 0.0);\nif(terrainHeight < -10000.0 || terrainHeight > 20000.0){\n terrainHeight = 0.0;\n}\n#ifndef Excavation\n if(regionHeight > terrainHeight)\n {\n if(height > regionHeight|| height < terrainHeight - 500.0)\n {\n discard;\n }\n }\n else\n {\n if(height > terrainHeight || height < regionHeight - 500.0)\n {\n discard;\n }\n }\n#else\n if(height > terrainHeight || height < regionHeight)\n {\n discard;\n }\n#endif\n\tgl_FragColor = vec4(texture2D(uColorTexture, texcoord).rgb, 1.0);\n\tif(uHypHasColorTable > 0.1)\n {\n float bNext = 1.0;\n if(uHypHasAnalysisRegion > 0.1)\n {\n vec2 polyTexCoord = vTexcoord.xy;\n polyTexCoord.x = polyTexCoord.x * (uGeoBounds.z - uGeoBounds.x) + uGeoBounds.x;\n polyTexCoord.y = polyTexCoord.y * (uGeoBounds.w - uGeoBounds.y) + uGeoBounds.y;\n if(polyTexCoord.x>uHypRect.x && polyTexCoord.x<uHypRect.z && polyTexCoord.y> uHypRect.y&& polyTexCoord.y < uHypRect.w)\n {\n polyTexCoord.xy = polyTexCoord.xy - vec2(uHypRect.x, uHypRect.w);\n polyTexCoord.x = polyTexCoord.x / (uHypRect.z - uHypRect.x);\n polyTexCoord.y = 1.0 - polyTexCoord.y / (uHypRect.y - uHypRect.w);\n vec4 hypColor = texture2D(uHypsometricRenderTexture, polyTexCoord);\n if(hypColor.r < 0.1)\n {\n bNext = 0.0;\n }\n }\n else\n {\n bNext = 0.0;\n }\n }\n if(bNext > 0.2)\n {\n vec4 contourMapColor = vec4(1.0);\n float finalOpacity = uHypOpacity;\n if(fHeight <= uHypMaxVisibleValue && fHeight >= uHypMinVisibleValue)\n {\n#ifdef GL_OES_standard_derivatives\n if(uHypContourFillMode > 2.9)\n {\n float mix_con = computeMixCon(fHeight);\n contourMapColor = mix(computeContourMapColor(fHeight), uHypLineColor, mix_con);\n }\n else if(uHypContourFillMode > 1.9)\n {\n finalOpacity = computeMixCon(fHeight);\n contourMapColor = uHypLineColor;\n }\n else if(uHypContourFillMode > 0.9)\n#else\n if(uHypContourFillMode > 0.9)\n#endif\n {\n contourMapColor = computeContourMapColor(fHeight);\n }\n else\n {\n finalOpacity = 0.0;\n }\n }\n else\n {\n finalOpacity = 0.5;\n }\n gl_FragColor = mix(gl_FragColor, contourMapColor, finalOpacity);\n }\n }\n}",_0x7a4782=(_0x4eb208=!0,function(e,t){var i=_0x4eb208?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4eb208=!1,i}),_0x48dd6c=_0x7a4782(void 0,(function(){return _0x48dd6c.toString().search("(((.+)+)+)+$").toString().constructor(_0x48dd6c).search("(((.+)+)+)+$")})),_0x4eb208;_0x48dd6c();var ModifyRegionSideVp="attribute vec4 aPosition;\nattribute vec4 aTexCoord0;\nattribute vec4 aTexCoord1;\n\nuniform sampler2D uTexture0;\nvarying vec2 vTexcoord;\nvarying float fHeight;\nvarying float height;\nvarying float regionHeight;\n#ifdef Excavation\nvarying vec2 vTexcoord1;\n#endif\n\nvoid main()\n{\n\tvTexcoord = aTexCoord0.xy;\n#ifdef Excavation\n\tvTexcoord1 = aTexCoord1.xy;\n#endif\n\tgl_Position = czm_depthClampFarPlane(czm_modelViewProjection * vec4(aPosition.xyz, 1.0));\n\theight = aPosition.w;\n\tregionHeight = aTexCoord0.z;\n}",_0x28770c=(_0x1d37df=!0,function(e,t){var i=_0x1d37df?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1d37df=!1,i}),_0x1b7abd=_0x28770c(void 0,(function(){return _0x1b7abd.toString().search("(((.+)+)+)+$").toString().constructor(_0x1b7abd).search("(((.+)+)+)+$")})),_0x1d37df;_0x1b7abd();var S3MTilesBillboardVp="attribute vec3 aPosition; \n \nattribute vec3 aNormal; \n \nattribute vec4 aTexCoord0; \n \nattribute vec4 aTexCoord1; \n \n#ifdef VertexColor \nattribute vec4 aColor; \n#endif \n#ifdef BatchTable \nattribute float batchId; \n#endif \n \nvarying vec4 vColor; \nvarying float fVertexColor; \nvarying vec4 vSecondColor; \nvarying vec4 vAmbientColor; \nvarying vec2 vTexCoord; \nvarying vec2 vSecondTexCoord; \nvarying vec4 clip_vertex; \n \nuniform vec4 uDiffuseColor; \nuniform vec4 uAmbientColor; \n \nvoid main() \n{ \n vTexCoord = aTexCoord0.xy; \n vSecondTexCoord = aTexCoord1.xy; \n\tvec4 vertexColor = vec4(1.0); \n#ifdef VertexColor \n vertexColor = aColor; \n#endif \n#ifdef BatchTable \n vSecondColor = czm_batchTable_pickColor(batchId); \n vec4 operationType = czm_batchTable_operation(batchId); \n vec4 objsColor = czm_batchTable_color(batchId); \n czm_s3mBatchOperation(operationType, objsColor, uSelColor, vertexColor); \n#endif \n vColor = vertexColor * uDiffuseColor; \n fVertexColor = vertexColor.a; \n vec4 viewPos = czm_modelView * vec4(aPosition, 1.0); \n viewPos.xyz = viewPos.xyz + aNormal; \n clip_vertex = viewPos; \n gl_Position = czm_projection * viewPos; \n vAmbientColor = uAmbientColor; \n}",_0xb35eb5=(_0x31ec1e=!0,function(e,t){var i=_0x31ec1e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x31ec1e=!1,i}),_0x12dc23=_0xb35eb5(void 0,(function(){return _0x12dc23.toString().search("(((.+)+)+)+$").toString().constructor(_0x12dc23).search("(((.+)+)+)+$")})),_0x31ec1e;_0x12dc23();var S3MVoxelGridFp="#extension GL_EXT_draw_buffers : enable\nvarying vec4 vColor;\nvarying vec4 vPosition;\nvarying vec4 vPositionMC;\nvarying float v_pixelDistance;\nvoid main()\n{\n#ifdef CLIP\n czm_clip(czm_modelView * vec4(vPositionMC.xyz, 1.0), 1.0);\n#endif\n vec4 color = vColor;\n float distanceToCenter = length(gl_PointCoord - vec2(0.5));\n float maxDistance = max(0.0, 0.5 - v_pixelDistance);\n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n color.a *= wholeAlpha;\n\tcolor = czm_gammaCorrect(color);\n#ifdef EXCAVATION\n if(czm_executeExcavation())\n {\n discard;\n }\n#endif\n#ifdef OIT\n vec3 Ci = color.rgb * color.a;\n float ai = color.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n#else\n gl_FragColor = color;\n#endif\n}",_0x103279=(_0x5a1ea3=!0,function(e,t){var i=_0x5a1ea3?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5a1ea3=!1,i}),_0x58fba0=_0x103279(void 0,(function(){return _0x58fba0.toString().search("(((.+)+)+)+$").toString().constructor(_0x58fba0).search("(((.+)+)+)+$")})),_0x5a1ea3;_0x58fba0();var S3MVoxelGridVp="attribute vec4 aPosition;\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n#endif\nattribute vec4 aColor;\nvarying float v_pixelDistance;\nvarying vec4 vPosition;\nuniform mat4 uGeoMatrix;\n#ifdef EXCAVATION\n varying vec4 vExcavationVertexPos;\n#endif\n#ifdef HYPSOMETRIC\n uniform sampler2D uHypsometricTexture;\n uniform float uHypOpacity;\n uniform float uHypContourFillMode;\n uniform float uHypFloor;\n uniform float uHypCeil;\n uniform float uHypMaxVisibleValue;\n uniform float uHypMinVisibleValue;\n uniform vec4 uNoValueColor;\n#endif\n uniform float uPointCloudSize;\n uniform vec4 uFillForeColor;\n varying vec4 vColor;\n varying vec4 vPositionMC;\n#ifdef HYPSOMETRIC\nvec4 computeContourMapColor(float fValue)\n{\n float threshold = clamp(abs(uHypCeil - uHypFloor), 0.000001, 20000.0);\n float contourRate = (fValue - uHypFloor) / threshold;\n float finalCoord = clamp(contourRate, 0.0, 1.0);\n float count = floor(finalCoord * 16.0);\n float y = (count*2.0 + 1.0)/32.0;\n float x = fract(finalCoord*16.0);\n if(y > 1.0)\n {\n x = 1.0;\n }\n vec2 contourCoord = vec2(x, y);\n return texture2D(uHypsometricTexture, contourCoord).rgba;\n}\nvec4 getHypsometricColor(vec4 oriColor, float fValue)\n{\n vec4 contourMapColor = vec4(0.0);\n float finalOpacity = uHypOpacity;\n contourMapColor = computeContourMapColor(fValue);\n finalOpacity *= sign(uHypContourFillMode);\n vec4 mixColor = mix(vec4(1.0,1.0,1.0,1.0), contourMapColor, finalOpacity);\n return mixColor;\n}\n#endif\n\nfloat getGlobeDepth(vec4 positionEC)\n{\n vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n if (globeDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n\nvoid main()\n{\n vec4 vertexPos = aPosition;\n vertexPos.w = 1.0;\n vPositionMC.xyz = vertexPos.xyz;\n vPositionMC.w = 0.0;\n vColor = aColor;\n float wValue = aTexCoord0.x;\n gl_Position = czm_modelViewProjection * vertexPos;\n#ifdef HYPSOMETRIC\n if(wValue > uHypMaxVisibleValue || wValue < uHypMinVisibleValue)\n {\n gl_Position = czm_projection * vec4(0.0, 0.0, 0.0, 1.0);\n }\n vColor = getHypsometricColor(vColor, wValue);\n#endif\n#ifdef EXCAVATION\n vExcavationVertexPos = uGeoMatrix * vertexPos;\n#endif\n vColor *= uFillForeColor;\n vPosition = czm_modelView * vertexPos;\n float depthsilon = 10.0;\n float globeDepth = getGlobeDepth(vPosition);\n if (globeDepth != 0.0 && vPosition.z + depthsilon < globeDepth)\n {\n gl_Position = czm_projection * vec4(0.0, 0.0, 0.0, 1.0);\n }\n float mpp = czm_metersPerPixel(vPosition);\n float pointSize = uPointCloudSize / mpp;\n v_pixelDistance = 2.0 / pointSize;\n gl_PointSize = pointSize;\n}",_0x472b2d=(_0x280451=!0,function(e,t){var i=_0x280451?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x280451=!1,i}),_0x4c5e43=_0x472b2d(void 0,(function(){return _0x4c5e43.toString().search("(((.+)+)+)+$").toString().constructor(_0x4c5e43).search("(((.+)+)+)+$")})),_0x280451;_0x4c5e43();var SightlineAnalysisFp="uniform sampler2D uTexture0;\nuniform vec4 uVisibleColor;\nuniform vec4 uHiddenColor;\n\nvarying vec4 renderTextureCoord;\nvarying float texcoordX;\nvarying vec4 vPositionEC;void main()\n{\n vec4 resultColor = vec4(uVisibleColor.rgb, 1.0);\n vec4 texCoord = renderTextureCoord / renderTextureCoord.w;\n float depth = texCoord.z * 0.5 + 0.5;\n // float depthBias = 0.0005 * max(-vPositionEC.z * 0.01, 1.0);\n // depth -= depthBias;\n texCoord.xy = texCoord.xy * 0.5 + 0.5;\n if(abs(texcoordX - 1.0) < 0.0001)\n {\n\t\tfloat z_window = czm_unpackDepth(texture2D(uTexture0, texCoord.xy));\n\t\tif(z_window < depth && z_window > 0.0 && z_window < 1.0)\n\t\t{\n\t\t\tresultColor = vec4(uHiddenColor.rgb, 1.0);\n\t\t}\n }\n else\n {\n\t\tresultColor = vec4(0.4, 0.4, 0.4, 1.0);\n }\n gl_FragColor = resultColor;\n}";const _0x57e7b0=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x2b1d5e=_0x57e7b0(void 0,(function(){return _0x2b1d5e.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b1d5e).search("(((.+)+)+)+$")}));function _0x47febb(e){var t=_0x37a515.call(this)||this;t._layer=e,t._name=_0x2e0417.Polyline,this._initUniformMap()}_0x2b1d5e(),_0x37a515&&(_0x47febb.__proto__=_0x37a515),_0x47febb.prototype=Object.create(_0x37a515&&_0x37a515.prototype),_0x47febb.prototype.constructor=_0x37a515,Object.defineProperties(_0x47febb.prototype,{}),_0x47febb.prototype._initUBOStruct=function(){const e=this._ubo;e.addUniform("uForeColor",4),e.addUniform("uBackColor",4),e.addUniform("uRotationAngle",1),e.addUniform("uType",1),e.addUniform("uLineWidthX",1),e.addUniform("uLineWidthY",1),e.addUniform("uRepeatX",1),e.addUniform("uRepeatY",1),e.addUniform("uOffsetX",1),e.addUniform("uOffsetY",1)},_0x47febb.prototype._initUBO=function(e){e.webgl2?this._ubo=new e$1C(e._uniformBufferEngine,void 0,!1,this._name,!1,!1):this._ubo=new _0x5c4ccd(e.engine,void 0,!1,this._name,!1,!1),this._initUBOStruct(),this._ubo.create()},_0x47febb.prototype.update=function(e){if(!e.webgpu&&!e.webgl2)return;e$2e(this._ubo)||this._initUBO(e);const t=this._layer,i=this._ubo,n=t._effect;i.updateDirectColor4("uForeColor",n._foreColor),i.updateDirectColor4("uBackColor",n._backColor),i.updateFloat("uRotationAngle",n._rotationAngle),i.updateFloat("uType",n._type),i.updateFloat("uLineWidthX",n._lineWidthX),i.updateFloat("uLineWidthY",n._lineWidthY),i.updateFloat("uRepeatX",n._repeatX),i.updateFloat("uRepeatY",n._repeatY),i.updateFloat("uOffsetX",n._offsetX),i.updateFloat("uOffsetY",n._offsetY),i.update()},_0x47febb.prototype.setToEffect=function(e){e.bindUniformBuffer(this._ubo.getBuffer(),this._name)},_0x47febb.prototype._setTextureToEffect=function(e,t,i){if(e$2e(t)&&e$2e(e.getEngine)){var n=e.getEngine(),r=t._inner._texture.getInternalTexture();n._setInternalTexture(i,r,i)}},_0x47febb.prototype._initUniformMap=function(){const e=this._layer;var t=e._context;if(t.webgl2||t.webgpu)return;const i=e._effect;var n={uForeColor:function(){return i._foreColor},uBackColor:function(){return i._backColor},uRotationAngle:function(){return i._rotationAngle},uType:function(){return i._type},uLineWidthX:function(){return i._lineWidthX},uLineWidthY:function(){return i._lineWidthY},uRepeatX:function(){return i._repeatX},uRepeatY:function(){return i._repeatY},uOffsetX:function(){return i._offsetX},uOffsetY:function(){return i._offsetY}};this._uniformMap=n},_0x47febb.prototype.isDestroyed=function(){return!1},_0x47febb.prototype.destroy=function(){return e$2e(this._ubo)&&this._ubo.dispose(),i$11(this)};var RasterLayerUboDecl="\n uniform RasterLayer {\n \n };\n",N$1="http://www.w3.org/2000/svg",O$2="http://www.w3.org/1999/xlink",w,x$2=e$1X.fromCssColorString("rgba(247,250,255,0.384)"),E$1=e$1X.fromCssColorString("rgba(143,191,255,0.216)"),M$2=e$1X.fromCssColorString("rgba(153,197,255,0.098)"),k$2=e$1X.fromCssColorString("rgba(255,255,255,0.086)"),K=e$1X.fromCssColorString("rgba(255,255,255,0.267)"),X$1=e$1X.fromCssColorString("rgba(255,255,255,0)"),F$1=e$1X.fromCssColorString("rgba(66,67,68,0.3)"),W$1=e$1X.fromCssColorString("rgba(0,0,0,0.5)");function b$3(e){return e$1X.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}function c$4(e){var t=document.createElementNS(N$1,e.tagName);for(var i in e)if(e.hasOwnProperty(i)&&"tagName"!==i)if("children"===i){var n,r=e.children.length;for(n=0;n<r;++n)t.appendChild(c$4(e.children[n]))}else 0===i.indexOf("xlink:")?t.setAttributeNS(O$2,i.substring(6),e[i]):"textContent"===i?t.textContent=e[i]:t.setAttribute(i,e[i]);return t}function B(e,t,i){var n=document.createElementNS(N$1,"text");n.setAttribute("x",e),n.setAttribute("y",t),n.setAttribute("class","supermap3d-animation-svgText");var r=document.createElementNS(N$1,"tspan");return r.textContent=i,n.appendChild(r),n}function q$1(e,t,i){e.setAttribute("transform","translate(100,100) rotate("+i+")"),t.setAttribute("transform","rotate("+i+")")}var R$2=new e$1X;function i$6(e,t){var i=t.alpha,n=1-i;return R$2.red=e.red*n+t.red*i,R$2.green=e.green*n+t.green*i,R$2.blue=e.blue*n+t.blue*i,R$2.toCssColorString()}function z$1(e,t,i){return c$4({tagName:"g",class:"supermap3d-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"rect",class:"supermap3d-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect",class:"supermap3d-animation-buttonMain",width:32,height:32,rx:4,ry:4},{tagName:"use",class:"supermap3d-animation-buttonPath","xlink:href":i},{tagName:"title",textContent:""}]})}function J(e,t,i){return c$4({tagName:"g",class:"supermap3d-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"use",class:"supermap3d-animation-buttonGlow","xlink:href":"#animation_pathWingButton"},{tagName:"use",class:"supermap3d-animation-buttonMain","xlink:href":"#animation_pathWingButton"},{tagName:"use",class:"supermap3d-animation-buttonPath","xlink:href":i},{tagName:"title",textContent:""}]})}function Q$2(e,t){var i=e._viewModel,n=i.shuttleRingDragging;if(!n||w===e)if("mousedown"===t.type||n&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||n&&"touchmove"===t.type&&1===t.touches.length){var r,o,a=e._centerX,s=e._centerY,l=e._svgNode.getBoundingClientRect();if("touchstart"===t.type||"touchmove"===t.type?(r=t.touches[0].clientX,o=t.touches[0].clientY):(r=t.clientX,o=t.clientY),!n&&(r>l.right||r<l.left||o<l.top||o>l.bottom))return;var u=e._shuttleRingPointer.getBoundingClientRect(),c=r-a-l.left,h=o-s-l.top,d=180*Math.atan2(h,c)/Math.PI+90;d>180&&(d-=360);var f=i.shuttleRingAngle;n||r<u.right&&r>u.left&&o>u.top&&o<u.bottom?(w=e,i.shuttleRingDragging=!0,i.shuttleRingAngle=d):d<f?i.slower():d>f&&i.faster(),t.preventDefault()}else e===w&&(w=void 0),i.shuttleRingDragging=!1}function f$4(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;var i=this;this._clickFunction=function(){var e=i._viewModel.command;e.canExecute&&e()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[c$5(t,"toggled",this.setToggled,this),c$5(t,"tooltip",this.setTooltip,this),c$5(t.command,"canExecute",this.setEnabled,this)]}function y$4(e,t){if(!e$2e(e))throw new t$15("container is required.");if(!e$2e(t))throw new t$15("viewModel is required.");e=i$c(e),this._viewModel=t,this._container=e,this._centerX=0,this._centerY=0,this._defsElement=void 0,this._svgNode=void 0,this._topG=void 0,this._lastHeight=void 0,this._lastWidth=void 0;var i=document.createElement("style");i.textContent=".supermap3d-animation-rectButton .supermap3d-animation-buttonGlow { filter: url(#animation_blurred); }.supermap3d-animation-rectButton .supermap3d-animation-buttonMain { fill: url(#animation_buttonNormal); }.supermap3d-animation-buttonToggled .supermap3d-animation-buttonMain { fill: url(#animation_buttonToggled); }.supermap3d-animation-rectButton:hover .supermap3d-animation-buttonMain { fill: url(#animation_buttonHovered); }.supermap3d-animation-buttonDisabled .supermap3d-animation-buttonMain { fill: url(#animation_buttonDisabled); }.supermap3d-animation-shuttleRingG .supermap3d-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.supermap3d-animation-shuttleRingG:hover .supermap3d-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.supermap3d-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.supermap3d-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.supermap3d-animation-knobOuter { fill: url(#animation_knobOuter); }.supermap3d-animation-knobInner { fill: url(#animation_knobInner); }",document.head.insertBefore(i,document.head.childNodes[0]);var n=document.createElement("div");n.className="supermap3d-animation-theme",n.innerHTML='<div class="supermap3d-animation-themeNormal"></div><div class="supermap3d-animation-themeHover"></div><div class="supermap3d-animation-themeSelect"></div><div class="supermap3d-animation-themeDisabled"></div><div class="supermap3d-animation-themeKnob"></div><div class="supermap3d-animation-themePointer"></div><div class="supermap3d-animation-themeSwoosh"></div><div class="supermap3d-animation-themeSwooshHover"></div>',this._theme=n,this._themeNormal=n.childNodes[0],this._themeHover=n.childNodes[1],this._themeSelect=n.childNodes[2],this._themeDisabled=n.childNodes[3],this._themeKnob=n.childNodes[4],this._themePointer=n.childNodes[5],this._themeSwoosh=n.childNodes[6],this._themeSwooshHover=n.childNodes[7];var r=document.createElementNS(N$1,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",O$2);var o=document.createElementNS(N$1,"g");this._topG=o,this._realtimeSVG=new f$4(J(3,4,"#animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new f$4(z$1(44,99,"#animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new f$4(z$1(124,99,"#animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new f$4(z$1(84,99,"#animation_pathPause"),t.pauseViewModel);var a=document.createElementNS(N$1,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);var s=c$4({tagName:"circle",class:"supermap3d-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=s;var l=c$4({tagName:"g",class:"supermap3d-animation-shuttleRingSwoosh",children:[{tagName:"use",transform:"translate(100,97) scale(-1,1)","xlink:href":"#animation_pathSwooshFX"},{tagName:"use",transform:"translate(100,97)","xlink:href":"#animation_pathSwooshFX"},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=l,this._shuttleRingPointer=c$4({tagName:"use",class:"supermap3d-animation-shuttleRingPointer","xlink:href":"#animation_pathPointer"});var u=c$4({tagName:"g",transform:"translate(100,100)"});this._knobOuter=c$4({tagName:"circle",class:"supermap3d-animation-knobOuter",cx:0,cy:0,r:71});var c=c$4({tagName:"circle",class:"supermap3d-animation-knobInner",cx:0,cy:0,r:61});this._knobDate=B(0,-24,""),this._knobTime=B(0,-7,""),this._knobStatus=B(0,-41,"");var h=c$4({tagName:"circle",class:"supermap3d-animation-blank",cx:0,cy:0,r:61}),d=document.createElementNS(N$1,"g");d.setAttribute("class","supermap3d-animation-shuttleRingG"),e.appendChild(n),o.appendChild(d),o.appendChild(u),o.appendChild(a),d.appendChild(s),d.appendChild(l),d.appendChild(this._shuttleRingPointer),u.appendChild(this._knobOuter),u.appendChild(c),u.appendChild(this._knobDate),u.appendChild(this._knobTime),u.appendChild(this._knobStatus),u.appendChild(h),r.appendChild(o),e.appendChild(r);var f=this;function p(e){Q$2(f,e)}this._mouseCallback=p,s.addEventListener("mousedown",p,!0),s.addEventListener("touchstart",p,!0),l.addEventListener("mousedown",p,!0),l.addEventListener("touchstart",p,!0),document.addEventListener("mousemove",p,!0),document.addEventListener("touchmove",p,!0),document.addEventListener("mouseup",p,!0),document.addEventListener("touchend",p,!0),document.addEventListener("touchcancel",p,!0),this._shuttleRingPointer.addEventListener("mousedown",p,!0),this._shuttleRingPointer.addEventListener("touchstart",p,!0),this._knobOuter.addEventListener("mousedown",p,!0),this._knobOuter.addEventListener("touchstart",p,!0);var _,m=this._knobTime.childNodes[0],g=this._knobDate.childNodes[0],x=this._knobStatus.childNodes[0];this._subscriptions=[c$5(t.pauseViewModel,"toggled",(function(e){_!==e&&((_=e)?f._shuttleRingPointer.setAttribute("class","supermap3d-animation-shuttleRingPausePointer"):f._shuttleRingPointer.setAttribute("class","supermap3d-animation-shuttleRingPointer"))})),c$5(t,"shuttleRingAngle",(function(e){q$1(f._shuttleRingPointer,f._knobOuter,e)})),c$5(t,"dateLabel",(function(e){g.textContent!==e&&(g.textContent=e)})),c$5(t,"timeLabel",(function(e){m.textContent!==e&&(m.textContent=e)})),c$5(t,"multiplierLabel",(function(e){x.textContent!==e&&(x.textContent=e)}))],this.applyThemeChanges(),this.resize()}f$4.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);for(var e=this._subscriptions,t=0,i=e.length;t<i;t++)e[t].dispose();i$11(this)},f$4.prototype.isDestroyed=function(){return!1},f$4.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e)return void this.svgElement.setAttribute("class","supermap3d-animation-buttonDisabled");if(this._toggled)return void this.svgElement.setAttribute("class","supermap3d-animation-rectButton supermap3d-animation-buttonToggled");this.svgElement.setAttribute("class","supermap3d-animation-rectButton")}},f$4.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","supermap3d-animation-rectButton supermap3d-animation-buttonToggled"):this.svgElement.setAttribute("class","supermap3d-animation-rectButton")))},f$4.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e},Object.defineProperties(y$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),y$4.prototype.isDestroyed=function(){return!1},y$4.prototype.destroy=function(){e$2e(this._observer)&&(this._observer.disconnect(),this._observer=void 0);var e=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",e,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",e,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",e,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",e,!0),document.removeEventListener("mousemove",e,!0),document.removeEventListener("touchmove",e,!0),document.removeEventListener("mouseup",e,!0),document.removeEventListener("touchend",e,!0),document.removeEventListener("touchcancel",e,!0),this._shuttleRingPointer.removeEventListener("mousedown",e,!0),this._shuttleRingPointer.removeEventListener("touchstart",e,!0),this._knobOuter.removeEventListener("mousedown",e,!0),this._knobOuter.removeEventListener("touchstart",e,!0),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();for(var t=this._subscriptions,i=0,n=t.length;i<n;i++)t[i].dispose();return i$11(this)},y$4.prototype.resize=function(){var e=this._container.clientWidth,t=this._container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){var i=this._svgNode,n=200,r=132,o=e,a=t;0===e&&0===t?(o=n,a=r):0===e?(a=t,o=n*(t/r)):0===t&&(o=e,a=r*(e/n));var s=o/n,l=a/r;i.style.cssText="width: "+o+"px; height: "+a+"px; position: absolute; bottom: 0; left: 0; overflow: hidden;",i.setAttribute("width",o),i.setAttribute("height",a),i.setAttribute("viewBox","0 0 "+o+" "+a),this._topG.setAttribute("transform","scale("+s+","+l+")"),this._centerX=Math.max(1,100*s),this._centerY=Math.max(1,100*l),this._lastHeight=e,this._lastWidth=t}},y$4.prototype.applyThemeChanges=function(){if(!document.body.contains(this._container)){if(e$2e(this._observer))return;var e=this;return e._observer=new MutationObserver((function(){document.body.contains(e._container)&&(e._observer.disconnect(),e._observer=void 0,e.applyThemeChanges())})),void e._observer.observe(document,{childList:!0,subtree:!0})}var t=b$3(this._themeNormal),i=b$3(this._themeHover),n=b$3(this._themeSelect),r=b$3(this._themeDisabled),o=b$3(this._themeKnob),a=b$3(this._themePointer),s=b$3(this._themeSwoosh),l=b$3(this._themeSwooshHover),u=c$4({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(t,x$2)},{tagName:"stop",offset:"12%","stop-color":i$6(t,E$1)},{tagName:"stop",offset:"46%","stop-color":i$6(t,M$2)},{tagName:"stop",offset:"81%","stop-color":i$6(t,k$2)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(i,x$2)},{tagName:"stop",offset:"12%","stop-color":i$6(i,E$1)},{tagName:"stop",offset:"46%","stop-color":i$6(i,M$2)},{tagName:"stop",offset:"81%","stop-color":i$6(i,k$2)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(n,x$2)},{tagName:"stop",offset:"12%","stop-color":i$6(n,E$1)},{tagName:"stop",offset:"46%","stop-color":i$6(n,M$2)},{tagName:"stop",offset:"81%","stop-color":i$6(n,k$2)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":i$6(r,K)},{tagName:"stop",offset:"75%","stop-color":i$6(r,X$1)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,in:"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":s.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":l.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":i$6(a,W$1)},{tagName:"stop",offset:"100%","stop-color":i$6(a,W$1)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":i$6(o,x$2)},{tagName:"stop",offset:"60%","stop-color":i$6(o,F$1)},{tagName:"stop",offset:"85%","stop-color":i$6(o,E$1)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":i$6(o,F$1)},{tagName:"stop",offset:"60%","stop-color":i$6(o,x$2)},{tagName:"stop",offset:"85%","stop-color":i$6(o,k$2)}]},{id:"animation_pathReset",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},{id:"animation_pathPause",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},{id:"animation_pathPlay",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},{id:"animation_pathPlayReverse",tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},{id:"animation_pathLoop",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},{id:"animation_pathClock",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},{id:"animation_pathWingButton",tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},{id:"animation_pathPointer",tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},{id:"animation_pathSwooshFX",tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}]});e$2e(this._defsElement)?this._svgNode.replaceChild(u,this._defsElement):this._svgNode.appendChild(u),this._defsElement=u};var F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],f$3=15,_$2=105;function R$1(e,t){return e-t}function y$3(e,t){var i=a$17(t,e,R$1);return i<0?~i:i}function b$2(e,t){if(Math.abs(e)<=f$3)return e/f$3;var i,n=f$3,r=_$2;return e>0?(i=(Math.log(t[t.length-1])-0)/(r-n),Math.exp(0+i*(e-n))):(i=(Math.log(-t[0])-0)/(r-n),-Math.exp(0+i*(Math.abs(e)-n)))}function C$2(e,t,i){if(i.clockStep===g$R.SYSTEM_CLOCK)return f$3;if(Math.abs(e)<=1)return e*f$3;var n=t[t.length-1];e>n?e=n:e<-n&&(e=-n);var r,o=f$3,a=_$2;return e>0?(r=(Math.log(n)-0)/(a-o),(Math.log(e)-0)/r+o):(r=(Math.log(-t[0])-0)/(a-o),-((Math.log(Math.abs(e))-0)/r+o))}function m$5(e){if(!e$2e(e))throw new t$15("clockViewModel is required.");var t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=m$5.defaultDateFormatter,this._timeFormatter=m$5.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,ce$1.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(m$5.defaultTicks),this.timeLabel=void 0,ce$1.defineProperty(this,"timeLabel",(function(){return t._timeFormatter(t._clockViewModel.currentTime,t)})),this.dateLabel=void 0,ce$1.defineProperty(this,"dateLabel",(function(){return t._dateFormatter(t._clockViewModel.currentTime,t)})),this.multiplierLabel=void 0,ce$1.defineProperty(this,"multiplierLabel",(function(){var e=t._clockViewModel;if(e.clockStep===g$R.SYSTEM_CLOCK)return"Today";var i=e.multiplier;return i%1==0?i.toFixed(0)+"x":i.toFixed(3).replace(/0{0,3}$/,"")+"x"})),this.shuttleRingAngle=void 0,ce$1.defineProperty(this,"shuttleRingAngle",{get:function(){return C$2(e.multiplier,t._allShuttleRingTicks,e)},set:function(e){e=Math.max(Math.min(e,_$2),-_$2);var i=t._allShuttleRingTicks,n=t._clockViewModel;if(n.clockStep=g$R.SYSTEM_CLOCK_MULTIPLIER,Math.abs(e)!==_$2){var r=b$2(e,i);if(t.snapToTicks)r=i[y$3(r,i)];else if(0!==r){var o=Math.abs(r);if(o>100){var a=o.toFixed(0).length-2,s=Math.pow(10,a);r=Math.round(r/s)*s|0}else o>f$3?r=Math.round(r):o>1?r=+r.toFixed(1):o>0&&(r=+r.toFixed(2))}n.multiplier=r}else n.multiplier=e>0?i[i.length-1]:i[0]}}),this._canAnimate=void 0,ce$1.defineProperty(this,"_canAnimate",(function(){var e=t._clockViewModel,i=e.clockRange;if(t.shuttleRingDragging||i===tt$a.UNBOUNDED)return!0;var n=e.multiplier,r=e.currentTime,o=e.startTime,a=!1;if(i===tt$a.LOOP_STOP)a=a$15.greaterThan(r,o)||r.equals(o)&&n>0;else{var s=e.stopTime;a=a$15.greaterThan(r,o)&&a$15.lessThan(r,s)||r.equals(o)&&n>0||r.equals(s)&&n<0}return a||(e.shouldAnimate=!1),a})),this._isSystemTimeAvailable=void 0,ce$1.defineProperty(this,"_isSystemTimeAvailable",(function(){var e=t._clockViewModel;if(e.clockRange===tt$a.UNBOUNDED)return!0;var i=e.systemTime;return a$15.greaterThanOrEquals(i,e.startTime)&&a$15.lessThanOrEquals(i,e.stopTime)})),this._isAnimating=void 0,ce$1.defineProperty(this,"_isAnimating",(function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)}));var i=s$4((function(){var e=t._clockViewModel;e.shouldAnimate?e.shouldAnimate=!1:t._canAnimate&&(e.shouldAnimate=!0)}));this._pauseViewModel=new r$9(i,{toggled:ce$1.computed((function(){return!t._isAnimating})),tooltip:"Pause"});var n=s$4((function(){var e=t._clockViewModel,i=e.multiplier;i>0&&(e.multiplier=-i),e.shouldAnimate=!0}));this._playReverseViewModel=new r$9(n,{toggled:ce$1.computed((function(){return t._isAnimating&&e.multiplier<0})),tooltip:"Play Reverse"});var r=s$4((function(){var e=t._clockViewModel,i=e.multiplier;i<0&&(e.multiplier=-i),e.shouldAnimate=!0}));this._playForwardViewModel=new r$9(r,{toggled:ce$1.computed((function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==g$R.SYSTEM_CLOCK})),tooltip:"Play Forward"});var o=s$4((function(){t._clockViewModel.clockStep=g$R.SYSTEM_CLOCK}),ce$1.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new r$9(o,{toggled:ce$1.computed((function(){return e.clockStep===g$R.SYSTEM_CLOCK})),tooltip:ce$1.computed((function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"}))}),this._slower=s$4((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,n=y$3(e.multiplier,i)-1;n>=0&&(e.multiplier=i[n])})),this._faster=s$4((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,n=y$3(e.multiplier,i)+1;n<i.length&&(e.multiplier=i[n])}))}function V(e){var t=(e=u$Z(e,u$Z.EMPTY_OBJECT)).globe,i=u$Z(e.imageryProviderViewModels,[]),n=u$Z(e.terrainProviderViewModels,[]);if(!e$2e(t))throw new t$15("globe is required");this._globe=t,this.imageryProviderViewModels=i.slice(0),this.terrainProviderViewModels=n.slice(0),this.dropDownVisible=!1,ce$1.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);var r=ce$1.getObservable(this,"imageryProviderViewModels"),o=ce$1.pureComputed((function(){var e,t=r(),i={};for(e=0;e<t.length;e++){var n=t[e],o=n.category;e$2e(i[o])?i[o].push(n):i[o]=[n]}var a=Object.keys(i),s=[];for(e=0;e<a.length;e++){var l=a[e];s.push({name:l,providers:i[l]})}return s}));this._imageryProviders=o;var a=ce$1.getObservable(this,"terrainProviderViewModels"),s=ce$1.pureComputed((function(){var e,t=a(),i={};for(e=0;e<t.length;e++){var n=t[e],r=n.category;e$2e(i[r])?i[r].push(n):i[r]=[n]}var o=Object.keys(i),s=[];for(e=0;e<o.length;e++){var l=o[e];s.push({name:l,providers:i[l]})}return s}));this._terrainProviders=s,this.buttonTooltip=void 0,ce$1.defineProperty(this,"buttonTooltip",(function(){var e=this.selectedImagery,t=this.selectedTerrain,i=e$2e(e)?e.name:void 0,n=e$2e(t)?t.name:void 0;return e$2e(i)&&e$2e(n)?i+"\n"+n:e$2e(i)?i:n})),this.buttonImageUrl=void 0,ce$1.defineProperty(this,"buttonImageUrl",(function(){var e=this.selectedImagery;if(e$2e(e))return e.iconUrl})),this.selectedImagery=void 0;var l=ce$1.observable();this._currentImageryProviders=[],ce$1.defineProperty(this,"selectedImagery",{get:function(){return l()},set:function(e){if(l()!==e){var t,i=this._currentImageryProviders,n=i.length,r=this._globe.imageryLayers,o=!1;for(t=0;t<n;t++)for(var a=r.length,s=0;s<a;s++){var u=r.get(s);if(u.imageryProvider===i[t]){r.remove(u),o=!0;break}}if(e$2e(e)){var c=e.creationCommand();if(Array.isArray(c)){for(t=c.length-1;t>=0;t--)r.addImageryProvider(c[t],0);this._currentImageryProviders=c.slice(0)}else if(this._currentImageryProviders=[c],o)r.addImageryProvider(c,0);else{var h=r.get(0);e$2e(h)&&r.remove(h),r.addImageryProvider(c,0)}}l(e),this.dropDownVisible=!1}else this.dropDownVisible=!1}}),this.selectedTerrain=void 0;var u=ce$1.observable();ce$1.defineProperty(this,"selectedTerrain",{get:function(){return u()},set:function(e){var t;u()!==e?(e$2e(e)&&(t=e.creationCommand()),this._globe.depthTestAgainstTerrain=!(t instanceof t$z),this._globe.terrainProvider=t,u(e),this.dropDownVisible=!1):this.dropDownVisible=!1}});var c=this;this._toggleDropDown=s$4((function(){c.dropDownVisible=!c.dropDownVisible})),this.selectedImagery=u$Z(e.selectedImageryProviderViewModel,i[0]),this.selectedTerrain=u$Z(e.selectedTerrainProviderViewModel,n[0])}function g$3(e,t){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e);var i=new V(t),n=document.createElement("button");n.type="button",n.className="supermap3d-button supermap3d-toolbar-button",n.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(n);var r=document.createElement("img");r.setAttribute("draggable","false"),r.className="supermap3d-baseLayerPicker-selected",r.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),n.appendChild(r);var o=document.createElement("div");o.className="supermap3d-baseLayerPicker-dropDown",o.setAttribute("data-bind",'css: { "supermap3d-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(o);var a=document.createElement("div");a.className="supermap3d-baseLayerPicker-sectionTitle",a.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),a.innerHTML="Imagery",o.appendChild(a);var s=document.createElement("div");s.className="supermap3d-baseLayerPicker-section",s.setAttribute("data-bind","foreach: _imageryProviders"),o.appendChild(s);var l=document.createElement("div");l.className="supermap3d-baseLayerPicker-category",s.appendChild(l);var u=document.createElement("div");u.className="supermap3d-baseLayerPicker-categoryTitle",u.setAttribute("data-bind","text: name"),l.appendChild(u);var c=document.createElement("div");c.className="supermap3d-baseLayerPicker-choices",c.setAttribute("data-bind","foreach: providers"),l.appendChild(c);var h=document.createElement("div");h.className="supermap3d-baseLayerPicker-item",h.setAttribute("data-bind",'css: { "supermap3d-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),c.appendChild(h);var d=document.createElement("img");d.className="supermap3d-baseLayerPicker-itemIcon",d.setAttribute("data-bind","attr: { src: iconUrl }"),d.setAttribute("draggable","false"),h.appendChild(d);var f=document.createElement("div");f.className="supermap3d-baseLayerPicker-itemLabel",f.setAttribute("data-bind","text: name"),h.appendChild(f);var p=document.createElement("div");p.className="supermap3d-baseLayerPicker-sectionTitle",p.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),p.innerHTML="Terrain",o.appendChild(p);var _=document.createElement("div");_.className="supermap3d-baseLayerPicker-section",_.setAttribute("data-bind","foreach: _terrainProviders"),o.appendChild(_);var m=document.createElement("div");m.className="supermap3d-baseLayerPicker-category",_.appendChild(m);var g=document.createElement("div");g.className="supermap3d-baseLayerPicker-categoryTitle",g.setAttribute("data-bind","text: name"),m.appendChild(g);var x=document.createElement("div");x.className="supermap3d-baseLayerPicker-choices",x.setAttribute("data-bind","foreach: providers"),m.appendChild(x);var y=document.createElement("div");y.className="supermap3d-baseLayerPicker-item",y.setAttribute("data-bind",'css: { "supermap3d-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),x.appendChild(y);var v=document.createElement("img");v.className="supermap3d-baseLayerPicker-itemIcon",v.setAttribute("data-bind","attr: { src: iconUrl }"),v.setAttribute("draggable","false"),y.appendChild(v);var $=document.createElement("div");$.className="supermap3d-baseLayerPicker-itemLabel",$.setAttribute("data-bind","text: name"),y.appendChild($),ce$1.applyBindings(i,n),ce$1.applyBindings(i,o),this._viewModel=i,this._container=e,this._element=n,this._dropPanel=o,this._closeDropDown=function(e){n.contains(e.target)||o.contains(e.target)||(i.dropDownVisible=!1)},s$Z.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function i$5(e){if(!e$2e(e.name))throw new t$15("options.name is required.");if(!e$2e(e.tooltip))throw new t$15("options.tooltip is required.");if(!e$2e(e.iconUrl))throw new t$15("options.iconUrl is required.");if("function"!=typeof e.creationFunction)throw new t$15("options.creationFunction is required.");var t=e.creationFunction;e$2e(t.canExecute)||(t=s$4(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=u$Z(e.category,""),ce$1.track(this,["name","tooltip","iconUrl"])}function m$4(){var e=[];return e.push(new i$5({name:"Bing Maps Aerial",iconUrl:n$17("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return o$k({style:n$e.AERIAL})}})),e.push(new i$5({name:"Bing Maps Aerial with Labels",iconUrl:n$17("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return o$k({style:n$e.AERIAL_WITH_LABELS})}})),e.push(new i$5({name:"Bing Maps Roads",iconUrl:n$17("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return o$k({style:n$e.ROAD})}})),e.push(new i$5({name:"Mapbox Satellite",tooltip:"Mapbox satellite imagery ",iconUrl:n$17("Widgets/Images/ImageryProviders/mapboxSatellite.png"),category:"Other",creationFunction:function(){return new m$h({mapId:"mapbox.satellite"})}})),e.push(new i$5({name:"Mapbox Streets",tooltip:"Mapbox streets imagery",iconUrl:n$17("Widgets/Images/ImageryProviders/mapboxTerrain.png"),category:"Other",creationFunction:function(){return new m$h({mapId:"mapbox.streets"})}})),e.push(new i$5({name:"Mapbox Streets Classic",tooltip:"Mapbox streets basic imagery",iconUrl:n$17("Widgets/Images/ImageryProviders/mapboxStreets.png"),category:"Other",creationFunction:function(){return new m$h({mapId:"mapbox.streets-basic"})}})),e.push(new i$5({name:"ESRI World Imagery",iconUrl:n$17("Widgets/Images/ImageryProviders/esriWorldImagery.png"),tooltip:"World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. The map includes NASA Blue Marble: Next Generation 500m resolution imagery at small scales (above 1:1,000,000), i-cubed 15m eSAT imagery at medium-to-large scales (down to 1:70,000) for the world, and USGS 15m Landsat imagery for Antarctica. The map features 0.3m resolution imagery in the continental United States and 0.6m resolution imagery in parts of Western Europe from DigitalGlobe. In other parts of the world, 1 meter resolution imagery is available from GeoEye IKONOS, i-cubed Nationwide Prime, Getmapping, AeroGRID, IGN Spain, and IGP Portugal. Additionally, imagery at different resolutions has been contributed by the GIS User Community.\n",category:"Other",creationFunction:function(){return new b$q({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",enablePickFeatures:!1})}})),e.push(new i$5({name:"ESRI World Street Map",iconUrl:n$17("Widgets/Images/ImageryProviders/esriWorldStreetMap.png"),tooltip:"This worldwide street map presents highway-level data for the world. Street-level data includes the United States; much of Canada; Japan; most countries in Europe; Australia and New Zealand; India; parts of South America including Argentina, Brazil, Chile, Colombia, and Venezuela; Ghana; and parts of southern Africa including Botswana, Lesotho, Namibia, South Africa, and Swaziland.\n",category:"Other",creationFunction:function(){return new b$q({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",enablePickFeatures:!1})}})),e.push(new i$5({name:"ESRI National Geographic",iconUrl:n$17("Widgets/Images/ImageryProviders/esriNationalGeographic.png"),tooltip:"This web map contains the National Geographic World Map service. This map service is designed to be used as a general reference map for informational and educational purposes as well as a basemap by GIS professionals and other users for creating web maps and web mapping applications.\n",category:"Other",creationFunction:function(){return new b$q({url:"https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/",enablePickFeatures:!1})}})),e.push(new i$5({name:"Open­Street­Map",iconUrl:n$17("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:"OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org",category:"Other",creationFunction:function(){return L$j({url:"https://a.tile.openstreetmap.org/"})}})),e.push(new i$5({name:"Stamen Watercolor",iconUrl:n$17("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:"Reminiscent of hand drawn maps, Stamen watercolor maps apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.\n",category:"Other",creationFunction:function(){return L$j({url:"https://stamen-tiles.a.ssl.fastly.net/watercolor/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new i$5({name:"Stamen Toner",iconUrl:n$17("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:"A high contrast black and white map.\n",category:"Other",creationFunction:function(){return L$j({url:"https://stamen-tiles.a.ssl.fastly.net/toner/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new i$5({name:"Sentinel-2",iconUrl:n$17("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"SuperMap3D ion",creationFunction:function(){return new o$l({assetId:3954})}})),e.push(new i$5({name:"Blue Marble",iconUrl:n$17("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"SuperMap3D ion",creationFunction:function(){return new o$l({assetId:3845})}})),e.push(new i$5({name:"Earth at night",iconUrl:n$17("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"SuperMap3D ion",creationFunction:function(){return new o$l({assetId:3812})}})),e.push(new i$5({name:"Natural Earth II",iconUrl:n$17("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\n",category:"SuperMap3D ion",creationFunction:function(){return te$8({url:n$17("Assets/Textures/NaturalEarthII")})}})),e}function n$3(){var e=[];return e.push(new i$5({name:"WGS84 Ellipsoid",iconUrl:n$17("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"SuperMap3D ion",creationFunction:function(){return new t$z}})),e.push(new i$5({name:"SuperMap3D World Terrain",iconUrl:n$17("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by SuperMap3D ion",category:"SuperMap3D ion",creationFunction:function(){return u$G({requestWaterMask:!0,requestVertexNormals:!0})}})),e}function ne(e){return function(t){var i=e._scene.pick(t.position);e$2e(i)&&i.primitive instanceof p$u&&(e.tileset=i.primitive),e.pickActive=!1}}function Y$1(e,t){t?e._eventHandler.setInputAction((function(t){var i=e._scene.pick(t.endPosition);e$2e(i)&&i.primitive instanceof p$u&&(e.tileset=i.primitive)}),G$J.MOUSE_MOVE):(e._eventHandler.removeInputAction(G$J.MOUSE_MOVE),e.picking=e.picking)}m$5.defaultDateFormatter=function(e,t){var i=a$15.toGregorianDate(e);return F[i.month-1]+" "+i.day+" "+i.year},m$5.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800],m$5.defaultTimeFormatter=function(e,t){var i=a$15.toGregorianDate(e),n=Math.round(i.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?$$15("%02d:%02d:%02d.%03d",i.hour,i.minute,i.second,n):$$15("%02d:%02d:%02d UTC",i.hour,i.minute,i.second)},m$5.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)},m$5.prototype.setShuttleRingTicks=function(e){if(!e$2e(e))throw new t$15("positiveTicks is required.");var t,i,n,r={},o=this._sortedFilteredPositiveTicks;for(o.length=0,t=0,i=e.length;t<i;++t)n=e[t],r.hasOwnProperty(n)||(r[n]=!0,o.push(n));o.sort(R$1);var a=[];for(t=(i=o.length)-1;t>=0;--t)0!==(n=o[t])&&a.push(-n);Array.prototype.push.apply(a,o),this._allShuttleRingTicks=a},Object.defineProperties(m$5.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){if("function"!=typeof e)throw new t$15("dateFormatter must be a function");this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){if("function"!=typeof e)throw new t$15("timeFormatter must be a function");this._timeFormatter=e}}}),m$5._maxShuttleRingAngle=_$2,m$5._realtimeShuttleRingAngle=f$3,Object.defineProperties(V.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}}),Object.defineProperties(g$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),g$3.prototype.isDestroyed=function(){return!1},g$3.prototype.destroy=function(){return s$Z.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ce$1.cleanNode(this._element),ce$1.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),i$11(this)},Object.defineProperties(i$5.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var oe={maximumFractionDigits:3};function P$2(e){var t=e/1048576;return t<1?t.toLocaleString(void 0,oe):Math.round(t).toLocaleString()}function y$2(e,t){if(!e$2e(e))return"";var i=t?e._statisticsLastPick:e._statisticsLastRender,n='<ul class="supermap3d-cesiumInspector-statistics">';return n+="<li><strong>Visited: </strong>"+i.visited.toLocaleString()+"</li><li><strong>Selected: </strong>"+i.selected.toLocaleString()+"</li><li><strong>Commands: </strong>"+i.numberOfCommands.toLocaleString()+"</li>",n+="</ul>",t||(n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Requests: </strong>"+i.numberOfPendingRequests.toLocaleString()+"</li><li><strong>Attempted: </strong>"+i.numberOfAttemptedRequests.toLocaleString()+"</li><li><strong>Processing: </strong>"+i.numberOfTilesProcessing.toLocaleString()+"</li><li><strong>Content Ready: </strong>"+i.numberOfTilesWithContentReady.toLocaleString()+"</li><li><strong>Total: </strong>"+i.numberOfTilesTotal.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Features Selected: </strong>"+i.numberOfFeaturesSelected.toLocaleString()+"</li><li><strong>Features Loaded: </strong>"+i.numberOfFeaturesLoaded.toLocaleString()+"</li><li><strong>Points Selected: </strong>"+i.numberOfPointsSelected.toLocaleString()+"</li><li><strong>Points Loaded: </strong>"+i.numberOfPointsLoaded.toLocaleString()+"</li><li><strong>Triangles Selected: </strong>"+i.numberOfTrianglesSelected.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Tiles styled: </strong>"+i.numberOfTilesStyled.toLocaleString()+"</li><li><strong>Features styled: </strong>"+i.numberOfFeaturesStyled.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Children Union Culled: </strong>"+i.numberOfTilesCulledWithChildrenUnion.toLocaleString()+"</li>",n+="</ul>",n+='<ul class="supermap3d-cesiumInspector-statistics">',n+="<li><strong>Geometry Memory (MB): </strong>"+P$2(i.geometryByteLength)+"</li><li><strong>Texture Memory (MB): </strong>"+P$2(i.texturesByteLength)+"</li><li><strong>Batch Table Memory (MB): </strong>"+P$2(i.batchTableByteLength)+"</li>",n+="</ul>"),n}var le=[{text:"Highlight",value:L$I.HIGHLIGHT},{text:"Replace",value:L$I.REPLACE},{text:"Mix",value:L$I.MIX}],Z$2=new e$1X(1,1,0,.4),ce=new e$1X,v$2=new e$1X;function l$6(e,t){o$1q.typeOf.object("scene",e),o$1q.typeOf.object("performanceContainer",t);var i=this,n=e.canvas;this._eventHandler=new g$K(n),this._scene=e,this._performanceContainer=t,this._canvas=n,this._performanceDisplay=new o$d({container:t}),this._statisticsText="",this._pickStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this._tileset=void 0,this._feature=void 0,this._tile=void 0,ce$1.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_editorError","showPickStatistics","showStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile"]),this._properties=ce$1.observable({}),this.properties=[],ce$1.defineProperty(this,"properties",(function(){var e=[],t=i._properties();for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}));var r=ce$1.observable();ce$1.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return r()},set:function(e){r(e),e$2e(i._tileset)&&(i._tileset.dynamicScreenSpaceError=e)}}),this.dynamicScreenSpaceError=!1;var o=ce$1.observable();ce$1.defineProperty(this,"colorBlendMode",{get:function(){return o()},set:function(e){o(e),e$2e(i._tileset)&&(i._tileset.colorBlendMode=e,i._scene.requestRender())}}),this.colorBlendMode=L$I.HIGHLIGHT;var a=ce$1.observable();ce$1.defineProperty(this,"picking",{get:function(){return a()},set:function(t){a(t),t?i._eventHandler.setInputAction((function(t){var n=e.pick(t.endPosition);if(n instanceof e$M?(i.feature=n,i.tile=n.content.tile):e$2e(n)&&e$2e(n.content)?(i.feature=void 0,i.tile=n.content.tile):(i.feature=void 0,i.tile=void 0),e$2e(i._tileset)){var r;if(f&&e$2e(n)&&e$2e(n.content))e.pickPositionSupported&&(e$2e(r=e.pickPosition(t.endPosition))&&(i._tileset.debugPickPosition=r)),i._tileset.debugPickedTile=n.content.tile;else i._tileset.debugPickedTile=void 0;i._scene.requestRender()}}),G$J.MOUSE_MOVE):(i.feature=void 0,i.tile=void 0,i._eventHandler.removeInputAction(G$J.MOUSE_MOVE))}}),this.picking=!0;var s=ce$1.observable();ce$1.defineProperty(this,"colorize",{get:function(){return s()},set:function(e){s(e),e$2e(i._tileset)&&(i._tileset.debugColorizeTiles=e,i._scene.requestRender())}}),this.colorize=!1;var l=ce$1.observable();ce$1.defineProperty(this,"wireframe",{get:function(){return l()},set:function(e){l(e),e$2e(i._tileset)&&(i._tileset.debugWireframe=e,i._scene.requestRender())}}),this.wireframe=!1;var u=ce$1.observable();ce$1.defineProperty(this,"showBoundingVolumes",{get:function(){return u()},set:function(e){u(e),e$2e(i._tileset)&&(i._tileset.debugShowBoundingVolume=e,i._scene.requestRender())}}),this.showBoundingVolumes=!1;var c=ce$1.observable();ce$1.defineProperty(this,"showContentBoundingVolumes",{get:function(){return c()},set:function(e){c(e),e$2e(i._tileset)&&(i._tileset.debugShowContentBoundingVolume=e,i._scene.requestRender())}}),this.showContentBoundingVolumes=!1;var h=ce$1.observable();ce$1.defineProperty(this,"showRequestVolumes",{get:function(){return h()},set:function(e){h(e),e$2e(i._tileset)&&(i._tileset.debugShowViewerRequestVolume=e,i._scene.requestRender())}}),this.showRequestVolumes=!1;var d=ce$1.observable();ce$1.defineProperty(this,"freezeFrame",{get:function(){return d()},set:function(e){d(e),e$2e(i._tileset)&&(i._tileset.debugFreezeFrame=e,i._scene.debugShowFrustumPlanes=e,i._scene.requestRender())}}),this.freezeFrame=!1;var f=ce$1.observable();ce$1.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return f()},set:function(e){f(e),e$2e(i._tileset)&&(i._tileset.debugPickedTileLabelOnly=e,i._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;var p=ce$1.observable();ce$1.defineProperty(this,"showGeometricError",{get:function(){return p()},set:function(e){p(e),e$2e(i._tileset)&&(i._tileset.debugShowGeometricError=e,i._scene.requestRender())}}),this.showGeometricError=!1;var _=ce$1.observable();ce$1.defineProperty(this,"showRenderingStatistics",{get:function(){return _()},set:function(e){_(e),e$2e(i._tileset)&&(i._tileset.debugShowRenderingStatistics=e,i._scene.requestRender())}}),this.showRenderingStatistics=!1;var m=ce$1.observable();ce$1.defineProperty(this,"showMemoryUsage",{get:function(){return m()},set:function(e){m(e),e$2e(i._tileset)&&(i._tileset.debugShowMemoryUsage=e,i._scene.requestRender())}}),this.showMemoryUsage=!1;var g=ce$1.observable();ce$1.defineProperty(this,"showUrl",{get:function(){return g()},set:function(e){g(e),e$2e(i._tileset)&&(i._tileset.debugShowUrl=e,i._scene.requestRender())}}),this.showUrl=!1;var x=ce$1.observable();ce$1.defineProperty(this,"maximumScreenSpaceError",{get:function(){return x()},set:function(e){e=Number(e),isNaN(e)||(x(e),e$2e(i._tileset)&&(i._tileset.maximumScreenSpaceError=e))}}),this.maximumScreenSpaceError=16;var y=ce$1.observable();ce$1.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return y()},set:function(e){e=Number(e),isNaN(e)||(y(e),e$2e(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorDensity=e))}}),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,ce$1.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(y(),1/6)},set:function(e){y(Math.pow(e,6))}});var v=ce$1.observable();ce$1.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return v()},set:function(e){e=Number(e),isNaN(e)||(v(e),e$2e(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorFactor=e))}}),this.dynamicScreenSpaceErrorFactor=4;var $=ne(this),b=ce$1.observable();ce$1.defineProperty(this,"pickActive",{get:function(){return b()},set:function(e){b(e),e?i._eventHandler.setInputAction($,G$J.LEFT_CLICK):i._eventHandler.removeInputAction(G$J.LEFT_CLICK)}});var T=ce$1.observable();ce$1.defineProperty(this,"pointCloudShading",{get:function(){return T()},set:function(e){T(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.attenuation=e)}}),this.pointCloudShading=!1;var C=ce$1.observable();ce$1.defineProperty(this,"geometricErrorScale",{get:function(){return C()},set:function(e){e=Number(e),isNaN(e)||(C(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.geometricErrorScale=e))}}),this.geometricErrorScale=1;var S=ce$1.observable();ce$1.defineProperty(this,"maximumAttenuation",{get:function(){return S()},set:function(e){e=Number(e),isNaN(e)||(S(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.maximumAttenuation=0===e?void 0:e))}}),this.maximumAttenuation=0;var w=ce$1.observable();ce$1.defineProperty(this,"baseResolution",{get:function(){return w()},set:function(e){e=Number(e),isNaN(e)||(w(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.baseResolution=0===e?void 0:e))}}),this.baseResolution=0;var E=ce$1.observable();ce$1.defineProperty(this,"eyeDomeLighting",{get:function(){return E()},set:function(e){E(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLighting=e)}}),this.eyeDomeLighting=!1;var P=ce$1.observable();ce$1.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return P()},set:function(e){e=Number(e),isNaN(e)||(P(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingStrength=e))}}),this.eyeDomeLightingStrength=1;var A=ce$1.observable();ce$1.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return A()},set:function(e){e=Number(e),isNaN(e)||(A(e),e$2e(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingRadius=e))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;var L=ce$1.observable();ce$1.defineProperty(this,"skipLevelOfDetail",{get:function(){return L()},set:function(e){L(e),e$2e(i._tileset)&&(i._tileset.skipLevelOfDetail=e)}}),this.skipLevelOfDetail=!0;var M=ce$1.observable();ce$1.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return M()},set:function(e){e=Number(e),isNaN(e)||(M(e),e$2e(i._tileset)&&(i._tileset.skipScreenSpaceErrorFactor=e))}}),this.skipScreenSpaceErrorFactor=16;var R=ce$1.observable();ce$1.defineProperty(this,"baseScreenSpaceError",{get:function(){return R()},set:function(e){e=Number(e),isNaN(e)||(R(e),e$2e(i._tileset)&&(i._tileset.baseScreenSpaceError=e))}}),this.baseScreenSpaceError=1024;var O=ce$1.observable();ce$1.defineProperty(this,"skipLevels",{get:function(){return O()},set:function(e){e=Number(e),isNaN(e)||(O(e),e$2e(i._tileset)&&(i._tileset.skipLevels=e))}}),this.skipLevels=1;var D=ce$1.observable();ce$1.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return D()},set:function(e){D(e),e$2e(i._tileset)&&(i._tileset.immediatelyLoadDesiredLevelOfDetail=e)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;var I=ce$1.observable();ce$1.defineProperty(this,"loadSiblings",{get:function(){return I()},set:function(e){I(e),e$2e(i._tileset)&&(i._tileset.loadSiblings=e)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()})),e$2e(this._tileset)||Y$1(this,!0)}function k$1(e){if(e.featuresLength>0)return!0;var t=e.innerContents;if(e$2e(t)){for(var i=t.length,n=0;n<i;++n)if(!k$1(t[n]))return!1;return!0}return!1}function y$1(e,t){o$1q.defined("container",e),o$1q.typeOf.object("scene",t),e=i$c(e);var i=document.createElement("div"),n=document.createElement("div");n.setAttribute("data-bind","visible: performance");var r=new l$6(t,n);this._viewModel=r,this._container=e,this._element=i;var o=document.createElement("div");o.textContent="3D Tiles Inspector",o.className="supermap3d-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),i.appendChild(o),i.className="supermap3d-cesiumInspector supermap3d-3DTilesInspector",i.setAttribute("data-bind",'css: { "supermap3d-cesiumInspector-visible" : inspectorVisible, "supermap3d-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(i);var a=document.createElement("div");this._panel=a,a.className="supermap3d-cesiumInspector-dropDown",i.appendChild(a);var s=o$4.createSection,l=o$4.createCheckbox,u=s(a,"Tileset","tilesetVisible","toggleTileset"),c=s(a,"Display","displayVisible","toggleDisplay"),h=s(a,"Update","updateVisible","toggleUpdate"),d=s(a,"Logging","loggingVisible","toggleLogging"),f=s(a,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),p=s(a,"Style","styleVisible","toggleStyle"),_=s(a,"Optimization","optimizationVisible","toggleOptimization"),m=document.createElement("div");m.className="field-group";var g=document.createElement("label");g.className="field-label",g.appendChild(document.createTextNode("Properties: "));var x=document.createElement("div");x.setAttribute("data-bind","text: properties"),m.appendChild(g),m.appendChild(x),u.appendChild(m),u.appendChild(L$4("togglePickTileset","Pick Tileset","pickActive")),u.appendChild(L$4("trimTilesCache","Trim Tiles Cache")),u.appendChild(l("Enable Picking","picking")),c.appendChild(l("Colorize","colorize")),c.appendChild(l("Wireframe","wireframe")),c.appendChild(l("Bounding Volumes","showBoundingVolumes")),c.appendChild(l("Content Volumes","showContentBoundingVolumes")),c.appendChild(l("Request Volumes","showRequestVolumes")),c.appendChild(l("Point Cloud Shading","pointCloudShading"));var y=document.createElement("div");y.setAttribute("data-bind","visible: pointCloudShading"),y.appendChild(r$7("geometricErrorScale",0,2,.01,"Geometric Error Scale")),y.appendChild(r$7("maximumAttenuation",0,32,1,"Maximum Attenuation")),y.appendChild(r$7("baseResolution",0,1,.01,"Base Resolution")),y.appendChild(l("Eye Dome Lighting (EDL)","eyeDomeLighting")),c.appendChild(y);var v=document.createElement("div");v.setAttribute("data-bind","visible: eyeDomeLighting"),v.appendChild(r$7("eyeDomeLightingStrength",0,2,.1,"EDL Strength")),v.appendChild(r$7("eyeDomeLightingRadius",0,4,.1,"EDL Radius")),y.appendChild(v),h.appendChild(l("Freeze Frame","freezeFrame")),h.appendChild(l("Dynamic Screen Space Error","dynamicScreenSpaceError"));var $=document.createElement("div");$.appendChild(r$7("maximumScreenSpaceError",0,128,1,"Maximum Screen Space Error")),h.appendChild($);var b=document.createElement("div");b.setAttribute("data-bind","visible: dynamicScreenSpaceError"),b.appendChild(r$7("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"Screen Space Error Density","dynamicScreenSpaceErrorDensity")),b.appendChild(r$7("dynamicScreenSpaceErrorFactor",1,10,.1,"Screen Space Error Factor")),h.appendChild(b),d.appendChild(l("Performance","performance")),d.appendChild(n),d.appendChild(l("Statistics","showStatistics"));var T=document.createElement("div");T.className="supermap3d-3dTilesInspector-statistics",T.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),d.appendChild(T),d.appendChild(l("Pick Statistics","showPickStatistics"));var C=document.createElement("div");C.className="supermap3d-3dTilesInspector-statistics",C.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),d.appendChild(C);var S=document.createElement("div");p.appendChild(S),S.appendChild(document.createTextNode("Color Blend Mode: "));var w=document.createElement("select");w.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),S.appendChild(w);var E=document.createElement("textarea");E.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),S.className="supermap3d-cesiumInspector-styleEditor",S.appendChild(E);var P=L$4("compileStyle","Compile (Ctrl+Enter)");S.appendChild(P);var A=document.createElement("div");A.className="supermap3d-cesiumInspector-error",A.setAttribute("data-bind","text: editorError"),S.appendChild(A),f.appendChild(l("Show Picked Only","showOnlyPickedTileDebugLabel")),f.appendChild(l("Geometric Error","showGeometricError")),f.appendChild(l("Rendering Statistics","showRenderingStatistics")),f.appendChild(l("Memory Usage (MB)","showMemoryUsage")),f.appendChild(l("Url","showUrl")),_.appendChild(l("Skip Tile LODs","skipLevelOfDetail"));var L=document.createElement("div");L.appendChild(r$7("skipScreenSpaceErrorFactor",1,50,1,"Skip SSE Factor")),_.appendChild(L);var M=document.createElement("div");M.appendChild(r$7("baseScreenSpaceError",0,4096,1,"SSE before skipping LOD")),_.appendChild(M);var R=document.createElement("div");R.appendChild(r$7("skipLevels",0,10,1,"Min. levels to skip")),_.appendChild(R),_.appendChild(l("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),_.appendChild(l("Load siblings of visible tiles","loadSiblings")),ce$1.applyBindings(r,i)}function r$7(e,t,i,n,r,o){o=u$Z(o,e);var a=document.createElement("input");a.setAttribute("data-bind","value: "+o),a.type="number";var s=document.createElement("input");s.type="range",s.min=t,s.max=i,s.step=n,s.setAttribute("data-bind",'valueUpdate: "input", value: '+e);var l=document.createElement("div");l.appendChild(s);var u=document.createElement("div");return u.className="supermap3d-cesiumInspector-slider",u.appendChild(document.createTextNode(r)),u.appendChild(a),u.appendChild(l),u}function L$4(e,t,i){var n=document.createElement("button");n.type="button",n.textContent=t,n.className="supermap3d-cesiumInspector-pickButton";var r="click: "+e;return e$2e(i)&&(r+=', css: {"supermap3d-cesiumInspector-pickButtonHighlight" : '+i+"}"),n.setAttribute("data-bind",r),n}function M$1(e){var t;if(e$2e(e)){t="Command Statistics";var i=e.commandsInFrustums;for(var n in i)if(i.hasOwnProperty(n)){var r,o=parseInt(n,10);if(7===o)r="1, 2 and 3";else{for(var a=[],s=2;s>=0;s--){var l=Math.pow(2,s);o>=l&&(a.push(s+1),o-=l)}r=a.reverse().join(" and ")}t+="<br>    "+i[n]+" in frustum "+r}t+="<br>Total: "+e.totalCommands}return t}function g$2(e,t,i){var n=Math.min(i,t);return n=Math.max(n,e)}function m$3(e,t){if(!e$2e(e))throw new t$15("scene is required");if(!e$2e(t))throw new t$15("performanceContainer is required");var i=this,n=e.canvas,r=new g$K(n);this._eventHandler=r,this._scene=e,this._canvas=n,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;var o,a=this._scene.globe;function s(e){var t=i._scene.pick({x:e.position.x,y:e.position.y});e$2e(t)&&(i.primitive=e$2e(t.collection)?t.collection:t.primitive),i._scene.requestRender(),i.pickPrimitiveActive=!1}function l(e){var t,n=a.ellipsoid,r=i._scene.camera.pickEllipsoid({x:e.position.x,y:e.position.y},n);if(e$2e(r))for(var o=n.cartesianToCartographic(r),s=a._surface.tileProvider._tilesToRenderByTextureCount,l=0;!t&&l<s.length;++l){var u=s[l];if(e$2e(u))for(var c=0;!t&&c<u.length;++c){var h=u[c];h$18.contains(h.rectangle,o)&&(t=h)}}i.tile=t,i.pickTileActive=!1}a.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.globeDepth=!1,this.pickDepth=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",ce$1.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","globeDepth","pickDepth","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=s$4((function(){i.dropDownVisible=!i.dropDownVisible})),this._toggleGeneral=s$4((function(){i.generalVisible=!i.generalVisible})),this._togglePrimitives=s$4((function(){i.primitivesVisible=!i.primitivesVisible})),this._toggleTerrain=s$4((function(){i.terrainVisible=!i.terrainVisible})),this._frustumsSubscription=ce$1.getObservable(this,"frustums").subscribe((function(e){i._scene.debugShowFrustums=e,i._scene.requestRender()})),this._frustumPlanesSubscription=ce$1.getObservable(this,"frustumPlanes").subscribe((function(e){i._scene.debugShowFrustumPlanes=e,i._scene.requestRender()})),this._performanceSubscription=ce$1.getObservable(this,"performance").subscribe((function(e){e?i._performanceDisplay=new o$d({container:i._performanceContainer}):i._performanceContainer.innerHTML=""})),this._showPrimitiveBoundingSphere=s$4((function(){return i._primitive.debugShowBoundingVolume=i.primitiveBoundingSphere,i._scene.requestRender(),!0})),this._primitiveBoundingSphereSubscription=ce$1.getObservable(this,"primitiveBoundingSphere").subscribe((function(){i._showPrimitiveBoundingSphere()})),this._showPrimitiveReferenceFrame=s$4((function(){if(i.primitiveReferenceFrame){var e=i._primitive.modelMatrix;i._modelMatrixPrimitive=new s$d({modelMatrix:e}),i._scene.primitives.add(i._modelMatrixPrimitive)}else e$2e(i._modelMatrixPrimitive)&&(i._scene.primitives.remove(i._modelMatrixPrimitive),i._modelMatrixPrimitive=void 0);return i._scene.requestRender(),!0})),this._primitiveReferenceFrameSubscription=ce$1.getObservable(this,"primitiveReferenceFrame").subscribe((function(){i._showPrimitiveReferenceFrame()})),this._doFilterPrimitive=s$4((function(){return i.filterPrimitive?i._scene.debugCommandFilter=function(e){return!(!e$2e(i._modelMatrixPrimitive)||e.owner!==i._modelMatrixPrimitive._primitive)||!!e$2e(i._primitive)&&(e.owner===i._primitive||e.owner===i._primitive._billboardCollection||e.owner.primitive===i._primitive)}:i._scene.debugCommandFilter=void 0,!0})),this._filterPrimitiveSubscription=ce$1.getObservable(this,"filterPrimitive").subscribe((function(){i._doFilterPrimitive(),i._scene.requestRender()})),this._wireframeSubscription=ce$1.getObservable(this,"wireframe").subscribe((function(e){a._surface.tileProvider._debug.wireframe=e,i._scene.requestRender()})),this._globeDepthSubscription=ce$1.getObservable(this,"globeDepth").subscribe((function(e){i._scene.debugShowGlobeDepth=e,i._scene.requestRender()})),this._pickDepthSubscription=ce$1.getObservable(this,"pickDepth").subscribe((function(e){i._scene.debugShowPickDepth=e,i._scene.requestRender()})),this._depthFrustumSubscription=ce$1.getObservable(this,"depthFrustum").subscribe((function(e){i._scene.debugShowDepthFrustum=e,i._scene.requestRender()})),this._incrementDepthFrustum=s$4((function(){var e=i.depthFrustum+1;return i.depthFrustum=g$2(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._decrementDepthFrustum=s$4((function(){var e=i.depthFrustum-1;return i.depthFrustum=g$2(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._suspendUpdatesSubscription=ce$1.getObservable(this,"suspendUpdates").subscribe((function(e){a._surface._debug.suspendLodUpdate=e,e||(i.filterTile=!1)})),this._showTileCoordinates=s$4((function(){return i.tileCoordinates&&!e$2e(o)?o=e.imageryLayers.addImageryProvider(new n$4({tilingScheme:e.terrainProvider.tilingScheme})):!i.tileCoordinates&&e$2e(o)&&(e.imageryLayers.remove(o),o=void 0),!0})),this._tileCoordinatesSubscription=ce$1.getObservable(this,"tileCoordinates").subscribe((function(){i._showTileCoordinates(),i._scene.requestRender()})),this._tileBoundingSphereSubscription=ce$1.getObservable(this,"tileBoundingSphere").subscribe((function(){i._showTileBoundingSphere(),i._scene.requestRender()})),this._showTileBoundingSphere=s$4((function(){return i.tileBoundingSphere?a._surface.tileProvider._debug.boundingSphereTile=i._tile:a._surface.tileProvider._debug.boundingSphereTile=void 0,i._scene.requestRender(),!0})),this._doFilterTile=s$4((function(){return i.filterTile?(i.suspendUpdates=!0,a._surface._tilesToRender=[],e$2e(i._tile)&&i._tile.renderable&&a._surface._tilesToRender.push(i._tile)):i.suspendUpdates=!1,!0})),this._filterTileSubscription=ce$1.getObservable(this,"filterTile").subscribe((function(){i.doFilterTile(),i._scene.requestRender()})),this._pickPrimitive=s$4((function(){i.pickPrimitiveActive=!i.pickPrimitiveActive})),this._pickPrimitiveActiveSubscription=ce$1.getObservable(this,"pickPrimitiveActive").subscribe((function(e){e?r.setInputAction(s,G$J.LEFT_CLICK):r.removeInputAction(G$J.LEFT_CLICK)})),this._pickTile=s$4((function(){i.pickTileActive=!i.pickTileActive})),this._pickTileActiveSubscription=ce$1.getObservable(this,"pickTileActive").subscribe((function(e){e?r.setInputAction(l,G$J.LEFT_CLICK):r.removeInputAction(G$J.LEFT_CLICK)})),this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()}))}function g$1(e,t){if(!e$2e(e))throw new t$15("container is required.");if(!e$2e(t))throw new t$15("scene is required.");e=i$c(e);var i=document.createElement("div"),n=new m$3(t,i);this._viewModel=n,this._container=e;var r=document.createElement("div");this._element=r;var o=document.createElement("div");o.textContent="SuperMap3D Inspector",o.className="supermap3d-cesiumInspector-button",o.setAttribute("data-bind","click: toggleDropDown"),r.appendChild(o),r.className="supermap3d-cesiumInspector",r.setAttribute("data-bind",'css: { "supermap3d-cesiumInspector-visible" : dropDownVisible, "supermap3d-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);var a=document.createElement("div");this._panel=a,a.className="supermap3d-cesiumInspector-dropDown",r.appendChild(a);var s=o$4.createSection,l=o$4.createCheckbox,u=s(a,"General","generalVisible","toggleGeneral"),c=l("Show Frustums","frustums"),h=document.createElement("div");h.className="supermap3d-cesiumInspector-frustumStatistics",h.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),c.appendChild(h),u.appendChild(c),u.appendChild(l("Show Frustum Planes","frustumPlanes")),u.appendChild(l("Performance Display","performance")),i.className="supermap3d-cesiumInspector-performanceDisplay",u.appendChild(i);var d=document.createElement("div");d.className="supermap3d-cesiumInspector-shaderCache",d.setAttribute("data-bind","html: shaderCacheText"),u.appendChild(d);var f=document.createElement("div");u.appendChild(f);var p=document.createElement("span");p.setAttribute("data-bind",'html: "     Frustum:"'),f.appendChild(p);var _=document.createElement("span");_.setAttribute("data-bind","text: depthFrustumText"),f.appendChild(_);var m=document.createElement("input");m.type="button",m.value="-",m.className="supermap3d-cesiumInspector-pickButton",m.setAttribute("data-bind","click: decrementDepthFrustum"),f.appendChild(m);var g=document.createElement("input");g.type="button",g.value="+",g.className="supermap3d-cesiumInspector-pickButton",g.setAttribute("data-bind","click: incrementDepthFrustum"),f.appendChild(g);var x=s(a,"Primitives","primitivesVisible","togglePrimitives"),y=document.createElement("div");y.className="supermap3d-cesiumInspector-pickSection",x.appendChild(y);var v=document.createElement("input");v.type="button",v.value="Pick a primitive",v.className="supermap3d-cesiumInspector-pickButton",v.setAttribute("data-bind",'css: {"supermap3d-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');var $=document.createElement("div");$.className="supermap3d-cesiumInspector-center",$.appendChild(v),y.appendChild($),y.appendChild(l("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),y.appendChild(l("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=l("Show only selected","filterPrimitive","hasPickedPrimitive"),y.appendChild(this._primitiveOnly);var b=s(a,"Terrain","terrainVisible","toggleTerrain"),T=document.createElement("div");T.className="supermap3d-cesiumInspector-pickSection",b.appendChild(T);var C=document.createElement("input");C.type="button",C.value="Pick a tile",C.className="supermap3d-cesiumInspector-pickButton",C.setAttribute("data-bind",'css: {"supermap3d-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),($=document.createElement("div")).appendChild(C),$.className="supermap3d-cesiumInspector-center",T.appendChild($);var S=document.createElement("div");T.appendChild(S);var w=document.createElement("input");w.type="button",w.value="Parent",w.className="supermap3d-cesiumInspector-pickButton",w.setAttribute("data-bind","click: selectParent");var E=document.createElement("input");E.type="button",E.value="NW",E.className="supermap3d-cesiumInspector-pickButton",E.setAttribute("data-bind","click: selectNW");var P=document.createElement("input");P.type="button",P.value="NE",P.className="supermap3d-cesiumInspector-pickButton",P.setAttribute("data-bind","click: selectNE");var A=document.createElement("input");A.type="button",A.value="SW",A.className="supermap3d-cesiumInspector-pickButton",A.setAttribute("data-bind","click: selectSW");var L=document.createElement("input");L.type="button",L.value="SE",L.className="supermap3d-cesiumInspector-pickButton",L.setAttribute("data-bind","click: selectSE");var M=document.createElement("div");M.className="supermap3d-cesiumInspector-tileText",S.className="supermap3d-cesiumInspector-frustumStatistics",S.appendChild(M),S.setAttribute("data-bind","visible: hasPickedTile"),M.setAttribute("data-bind","html: tileText");var R=document.createElement("div");R.className="supermap3d-cesiumInspector-relativeText",R.textContent="Select relative:",S.appendChild(R);var O=document.createElement("table"),D=document.createElement("tr"),I=document.createElement("tr"),B=document.createElement("td");B.appendChild(w);var F=document.createElement("td");F.appendChild(E);var N=document.createElement("td");N.appendChild(P),D.appendChild(B),D.appendChild(F),D.appendChild(N);var G=document.createElement("td"),z=document.createElement("td");z.appendChild(A);var U=document.createElement("td");U.appendChild(L),I.appendChild(G),I.appendChild(z),I.appendChild(U),O.appendChild(D),O.appendChild(I),S.appendChild(O),T.appendChild(l("Show bounding volume","tileBoundingSphere","hasPickedTile")),T.appendChild(l("Show only selected","filterTile","hasPickedTile")),b.appendChild(l("Wireframe","wireframe")),b.appendChild(l("Suspend LOD update","suspendUpdates")),b.appendChild(l("Show tile coordinates","tileCoordinates")),ce$1.applyBindings(n,this._element)}function r$6(e){var t=this,i=ce$1.observable(l$1e.fullscreen),n=ce$1.observable(l$1e.enabled);this.isFullscreen=void 0,ce$1.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,ce$1.defineProperty(this,"isFullscreenEnabled",{get:function(){return n()},set:function(e){n(e&&l$1e.enabled)}}),this.tooltip=void 0,ce$1.defineProperty(this,"tooltip",(function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"})),this._command=s$4((function(){l$1e.fullscreen?l$1e.exitFullscreen():l$1e.requestFullscreen(t._fullscreenElement)}),ce$1.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=u$Z(i$c(e),document.body),this._callback=function(){i(l$1e.fullscreen)},document.addEventListener(l$1e.changeEventName,this._callback)}Object.defineProperties(l$6.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},colorBlendModes:{get:function(){return le}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,e$2e(e)){var t=this;e.readyPromise.then((function(e){t.isDestroyed()||t._properties(e.properties)}));for(var i=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],n=i.length,r=0;r<n;++r){var o=i[r];this[o]=this[o]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings;var a=e.pointCloudShading;this.pointCloudShading=a.attenuation,this.geometricErrorScale=a.geometricErrorScale,this.maximumAttenuation=a.maximumAttenuation?a.maximumAttenuation:0,this.baseResolution=a.baseResolution?a.baseResolution:0,this.eyeDomeLighting=a.eyeDomeLighting,this.eyeDomeLightingStrength=a.eyeDomeLightingStrength,this.eyeDomeLightingRadius=a.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=y$2(e,!1),this._pickStatisticsText=y$2(e,!0),Y$1(this,!1)}},feature:{get:function(){return this._feature},set:function(e){if(this._feature!==e){var t=this._feature;e$2e(t)&&!t.content.isDestroyed()&&(!this.colorize&&e$2e(this._style)?t.color=e$2e(this._style.color)?this._style.color.evaluateColor(t,ce):e$1X.WHITE:t.color=v$2,this._scene.requestRender()),e$2e(e)&&(e$1X.clone(e.color,v$2),e.color=Z$2,this._scene.requestRender()),this._feature=e}}},tile:{get:function(){return this._tile},set:function(e){if(this._tile!==e){var t=this._tile;e$2e(t)&&!t.isDestroyed()&&!k$1(t.content)&&(t.color=v$2,this._scene.requestRender()),e$2e(e)&&!k$1(e.content)&&(e$1X.clone(e.color,v$2),e.color=Z$2,this._scene.requestRender()),this._tile=e}}}}),l$6.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive},l$6.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible},l$6.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible},l$6.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible},l$6.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible},l$6.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible},l$6.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible},l$6.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible},l$6.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible},l$6.prototype.trimTilesCache=function(){e$2e(this._tileset)&&this._tileset.trimLoadedTiles()},l$6.prototype.compileStyle=function(){var e=this._tileset;if(e$2e(e)&&this.styleString!==JSON.stringify(e.style)){this._editorError="";try{0===this.styleString.length&&(this.styleString="{}"),this._style=new d$n(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(e){this._editorError=e.toString()}this.feature=this._feature,this.tile=this._tile}},l$6.prototype.styleEditorKeyPress=function(e,t){if(9===t.keyCode){t.preventDefault();var i,n=t.target,r=n.selectionStart,o=n.selectionEnd,a=o,s=n.value.slice(r,o).split("\n"),l=s.length;if(t.shiftKey)for(i=0;i<l;++i)" "===s[i][0]&&(" "===s[i][1]?(s[i]=s[i].substr(2),a-=2):(s[i]=s[i].substr(1),a-=1));else for(i=0;i<l;++i)s[i]=" "+s[i],a+=2;var u=s.join("\n");n.value=n.value.slice(0,r)+u+n.value.slice(o),n.selectionStart=r!==o?r:a,n.selectionEnd=a}else t.ctrlKey&&(10===t.keyCode||13===t.keyCode)&&this.compileStyle();return!0},l$6.prototype._update=function(){var e=this._tileset;if(this.performance&&this._performanceDisplay.update(),e$2e(e)){if(e.isDestroyed())return this.tile=void 0,this.feature=void 0,void(this.tileset=void 0);var t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=y$2(e,!1),this._pickStatisticsText=y$2(e,!0))},l$6.prototype.isDestroyed=function(){return!1},l$6.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();var e=this;return this._definedProperties.forEach((function(t){ce$1.getObservable(e,t).dispose()})),i$11(this)},l$6.getStatistics=y$2,Object.defineProperties(y$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),y$1.prototype.isDestroyed=function(){return!1},y$1.prototype.destroy=function(){return ce$1.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),i$11(this)},Object.defineProperties(m$3.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.parent}))}},selectNW:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.northwestChild}))}},selectNE:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.northeastChild}))}},selectSW:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.southwestChild}))}},selectSE:{get:function(){var e=this;return s$4((function(){e.tile=e.tile.southeastChild}))}},primitive:{get:function(){return this._primitive},set:function(e){var t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,e$2e(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,e$2e(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout((function(){e.show=!0}),50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(e$2e(e)){if(this.hasPickedTile=!0,e!==this._tile){this.tileText="L: "+e.level+" X: "+e.x+" Y: "+e.y,this.tileText+="<br>SW corner: "+e.rectangle.west+", "+e.rectangle.south,this.tileText+="<br>NE corner: "+e.rectangle.east+", "+e.rectangle.north;var t=e.data;e$2e(t)?this.tileText+="<br>Min: "+t.minimumHeight+" Max: "+t.maximumHeight:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}}),m$3.prototype._update=function(){this.frustums&&(this.frustumStatisticText=M$1(this._scene.debugFrustumStatistics));var e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=g$2(1,e,this.depthFrustum),this.depthFrustumText=this.depthFrustum+" of "+e,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText="Cached shaders: "+this._scene.context.shaderCache.numberOfShaders},m$3.prototype.isDestroyed=function(){return!1},m$3.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._globeDepthSubscription.dispose(),this._pickDepthSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),i$11(this)},Object.defineProperties(g$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),g$1.prototype.isDestroyed=function(){return!1},g$1.prototype.destroy=function(){return ce$1.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),i$11(this)},Object.defineProperties(r$6.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){if(!(e instanceof Element))throw new t$15("value must be a valid Element.");this._fullscreenElement=e}},command:{get:function(){return this._command}}}),r$6.prototype.isDestroyed=function(){return!1},r$6.prototype.destroy=function(){document.removeEventListener(l$1e.changeEventName,this._callback),i$11(this)};var c$3="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",d$4="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function r$5(e,t){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e);var i=new r$6(t);i._exitFullScreenPath=d$4,i._enterFullScreenPath=c$3;var n=document.createElement("button");n.type="button",n.className="supermap3d-button supermap3d-fullscreenButton",n.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(n),ce$1.applyBindings(i,n),this._container=e,this._viewModel=i,this._element=n}function D$1(e){if(!e$2e(e)||!e$2e(e.scene)||!e$2e(e.viewer))throw new t$15("options.scene and optinss.viewer is required.");this._viewer=e.viewer,this._url=u$Z(e.url,"//dev.virtualearth.net/"),this._url.length>0&&"/"!==this._url[this._url.length-1]&&(this._url+="/"),this._key=e$12.getKey(e.key),this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodeInProgress=void 0,this._complete=new o$1h,this._dataSource=void 0;var t=this;this._searchCommand=s$4((function(){t.isSearchInProgress?U$1(t):Q$1(t)})),this.keepExpanded=!1,ce$1.track(this,["_searchText","_isSearchInProgress","keepExpanded"]),this.isSearchInProgress=void 0,ce$1.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,ce$1.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(e){if("string"!=typeof e)throw new t$15("value must be a valid string.");this._searchText=e}}),this.flightDuration=void 0,ce$1.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(e){if(e$2e(e)&&e<0)throw new t$15("value must be positive.");this._flightDuration=e}})}function j$4(e,t){e._scene.camera.flyTo({destination:t,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:p$1d.IDENTITY})}Object.defineProperties(r$5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),r$5.prototype.isDestroyed=function(){return!1},r$5.prototype.destroy=function(){return this._viewModel.destroy(),ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$11(this)},Object.defineProperties(D$1.prototype,{url:{get:function(){return this._url}},key:{get:function(){return this._key}},complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},dataSource:{get:function(){return this._dataSource}}});var L$3="https://www.supermapol.com/iserver/services/localsearch/rest/searchdatas/China/poiinfos.json";function Q$1(e){var t=e.searchText;if(!/^\s*$/.test(t)){var i=t.match(/[^\s,\n]+/g);if(2===i.length||3===i.length){var n=+i[0],r=+i[1],o=3===i.length?+i[2]:300;if(!isNaN(n)&&!isNaN(r)&&!isNaN(o))return void j$4(e,o$1p.fromDegrees(n,r,o))}e._isSearchInProgress=!0;var a={key:e.geoKey},s=t.match(/[^\s-\n]+/g);2===s.length?(a.city=s[0],a.keywords=s[1]):a.keywords=s[0],t$10.fetch({url:L$3,queryParameters:a}).then((t=>{t=JSON.parse(t);if(e._isSearchInProgress=!1,e$2e(t.error))return e._isSearchInProgress=!1,void(e.searchText=t.error.errorMsg);e$2e(e._datasource)&&(e._viewer.dataSources.remove(e._datasource),e._datasource=void 0);var i=t.poiInfos[0];e._searchText=i.name;var n=i.location;n.lon=n.x,n.lat=n.y,!e$2e(o$1p.fromDegrees(n.x,n.y,500))||(e._datasource=Y(t,e),e._viewer.dataSources.add(e._datasource),o$1l(e._datasource,(function(t){e._datasource=t,e._viewer.flyTo(t)}),(function(e){console.log(e)})))})).catch((e=>{console.log("error",e)}))}}function U$1(e){e._isSearchInProgress=!1,e$2e(e._geocodeInProgress)&&(e._geocodeInProgress.cancel=!0,e._geocodeInProgress=void 0)}function Y(e,t){for(var i={type:"FeatureCollection",features:[]},n=e.poiInfos,r=[],o=0,a=n.length;o<a;o++){var s=n[o];s.address;var l=s.location,u=e$2d.toRadians(l.x),c=e$2d.toRadians(l.y);r.push(new a$18(u,c))}return o$1l(y$C(t._viewer.terrainProvider,9,r),(function(e){for(var t=0,r=n.length;t<r;t++){var o=n[t],a=o.address,s=e[t],l={type:"Feature",geometry:{type:"Point",coordinates:[e$2d.toDegrees(s.longitude),e$2d.toDegrees(s.latitude),s.height]},properties:{title:o.name,"marker-color":"#B9EB14",tel:o.telephone,address:a}};i.features.push(l)}return(new y$p).loadPoiJsonData(i)}))}var l$5="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",f$2="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function s$3(e){if(!e$2e(e)||!e$2e(e.container))throw new t$15("options.container is required.");if(!e$2e(e.scene)||!e$2e(e.viewer))throw new t$15("options.scene and options.viewer is required.");var t=i$c(e.container),i=new D$1(e);i._startSearchPath=l$5,i._stopSearchPath=f$2;var n=document.createElement("form");n.setAttribute("data-bind","submit: search");var r=document.createElement("input");r.type="search",r.className="supermap3d-geocoder-input",r.setAttribute("placeholder","Enter an address or landmark..."),r.setAttribute("data-bind",'value: searchText,valueUpdate: "afterkeydown",disable: isSearchInProgress,css: { "supermap3d-geocoder-input-wide" : keepExpanded || searchText.length > 0 }'),n.appendChild(r);var o=document.createElement("span");o.className="supermap3d-geocoder-searchButton",o.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),n.appendChild(o),t.appendChild(n),ce$1.applyBindings(i,n),this._container=t,this._viewModel=i,this._form=n,this._onInputBegin=function(e){t.contains(e.target)||r.blur()},this._onInputEnd=function(e){t.contains(e.target)&&r.focus()},s$Z.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),document.addEventListener("pointerup",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),document.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),document.addEventListener("touchend",this._onInputEnd,!0))}function r$4(e,t){if(!e$2e(e))throw new t$15("scene is required.");this._scene=e,this._duration=t;var i=this;this._command=s$4((function(){i._scene.camera.flyHome(i._duration)})),this.tooltip="View Home",ce$1.track(this,["tooltip"])}function o$3(e,t,i){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e);var n=new r$4(t,i);n._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";var r=document.createElement("button");r.type="button",r.className="supermap3d-button supermap3d-toolbar-button supermap3d-home-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(r),ce$1.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}Object.defineProperties(s$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),s$3.prototype.isDestroyed=function(){return!1},s$3.prototype.destroy=function(){return s$Z.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),document.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),document.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),document.removeEventListener("touchend",this._onInputEnd,!0)),ce$1.cleanNode(this._form),this._container.removeChild(this._form),i$11(this)},Object.defineProperties(r$4.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){if(e$2e(e)&&e<0)throw new t$15("value must be positive.");this._duration=e}}}),Object.defineProperties(o$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),o$3.prototype.isDestroyed=function(){return!1},o$3.prototype.destroy=function(){return ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$11(this)};var r$3="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",o$2="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function t$1(){this._cameraClicked=new o$1h,this._closeClicked=new o$1h,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",ce$1.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="supermap3d-infoBox-loadingContainer"><span class="supermap3d-infoBox-loading"></span></div>',this.cameraIconPath=void 0,ce$1.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?o$2:r$3}}),ce$1.defineProperty(this,"_bodyless",{get:function(){return!e$2e(this.description)||0===this.description.length}})}function l$4(e){o$1q.defined("container",e),e=i$c(e);var t=document.createElement("div");t.className="supermap3d-infoBox",t.setAttribute("data-bind",'css: { "supermap3d-infoBox-visible" : showInfo, "supermap3d-infoBox-bodyless" : _bodyless }'),e.appendChild(t);var i=document.createElement("div");i.className="supermap3d-infoBox-title",i.setAttribute("data-bind","text: titleText"),t.appendChild(i);var n=document.createElement("button");n.type="button",n.className="supermap3d-button supermap3d-infoBox-camera",n.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(n);var r=document.createElement("button");r.type="button",r.className="supermap3d-infoBox-close",r.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),r.innerHTML="×",t.appendChild(r);var o=document.createElement("iframe");o.className="supermap3d-infoBox-iframe",o.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),o.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),o.setAttribute("allowfullscreen",!0),t.appendChild(o);var a=new t$1;ce$1.applyBindings(a,t),this._container=e,this._element=t,this._frame=o,this._viewModel=a,this._descriptionSubscription=void 0;var s=this;o.addEventListener("load",(function(){var e=o.contentDocument,i=e.createElement("link");i.href=n$17("Widgets/InfoBox/InfoBoxDescription.css"),i.rel="stylesheet",i.type="text/css";var n=e.createElement("div");n.className="supermap3d-infoBox-description",e.head.appendChild(i),e.body.appendChild(n),s._descriptionSubscription=c$5(a,"description",(function(e){o.style.height="5px",n.innerHTML=e;var i=null,r=n.firstElementChild;if(null!==r&&1===n.childNodes.length){var a=window.getComputedStyle(r);if(null!==a){var s=a["background-color"],l=e$1X.fromCssColorString(s);e$2e(l)&&0!==l.alpha&&(i=a["background-color"])}}t.style["background-color"]=i;var u=n.getBoundingClientRect().height;o.style.height=u+"px"}))})),o.setAttribute("src","about:blank")}t$1.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},Object.defineProperties(t$1.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}}),Object.defineProperties(l$4.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),l$4.prototype.isDestroyed=function(){return!1},l$4.prototype.destroy=function(){var e=this._container;return ce$1.cleanNode(this._element),e.removeChild(this._element),e$2e(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),i$11(this)};var n$2=function(e){var t=document.createElement("div");t.innerHTML=e;for(var i=document.createDocumentFragment();t.firstChild;)i.appendChild(t.firstChild);return i},f$1=function(e,t,i){t=i$c(t);var n,r=n$2(e),o=[];for(n=0;n<r.childNodes.length;++n)o.push(r.childNodes[n]);for(t.appendChild(r),n=0;n<o.length;++n){var a=o[n];(1===a.nodeType||8===a.nodeType)&&ce$1.applyBindings(i,a)}return o},y=function(e,t){if(!e$2e(e)||!e$2e(e.viewer)||!e$2e(e.scene))throw new t$15("options and options.viewer and optins.scene is required.");this.viewer=e.viewer,this.viewer.afterViewerChanged=new o$1h,this.viewer.beforeViewerChanged=new o$1h,this.scene=e.scene,this.eventHelper=new n$x,this.showCompass=e$2e(this.scene),this.heading=this.showCompass?this.scene.camera.heading:0,this.isOrbiting=!1,this.orbitCursorAngle=0,this.isRotating=!1,this.rotateInitialCursorAngle=void 0,this.rotateFrame=void 0,this.rotateMouseMoveFunction=void 0,this.rotateMouseUpFunction=void 0,this._unsubcribeFromPostRender=void 0,this.tiltbarLeft=56,this.tiltbarTop=3,this.isTilting=!1,this.zoombarTop=65,this.tiltInitialCursorAngle=0,this.screenSpaceEventHandler=new g$K(t),this.clickStartPosition=null,ce$1.track(this,["showCompass","heading","isOrbiting","orbitCursorAngle","isRotating","tiltbarLeft","tiltbarTop","isTilting","zoombarTop"]);var i=this;function n(){e$2e(i.viewer)?(i._unsubcribeFromPostRender&&(i._unsubcribeFromPostRender(),i._unsubcribeFromPostRender=void 0),i.showCompass=!0,i._unsubcribeFromPostRender=i.scene.postRender.addEventListener((function(){var e=Math.abs(i.scene.camera.heading-i.heading);if((e<e$2d.PI_OVER_TWO||e>3*e$2d.PI_OVER_TWO)&&(i.heading=i.scene.camera.heading),i.scene.screenSpaceCameraController,!i.isTilting){var t=i.scene.camera.pitch+e$2d.PI_OVER_TWO,n=e$2d.PI_OVER_TWO/20,r=Math.floor(t/n);r=(r=r>19?19:r)<0?0:r,i.tiltbarLeft=C$1[r].x,i.tiltbarTop=C$1[r].y}}))):(i._unsubcribeFromPostRender&&(i._unsubcribeFromPostRender(),i._unsubcribeFromPostRender=void 0),i.showCompass=!1)}this.eventHelper.add(this.viewer.afterViewerChanged,n,this),function(){var t=e$2d.PI_OVER_TWO+e.scene.camera.pitch,n=Math.PI/2/20,r=Math.floor(t/n);r=(r=r>19?19:r)<0?0:r,i.tiltbarLeft=C$1[r].x,i.tiltbarTop=C$1[r].y}(),n()},z=new o$1o;new o$1p,y.prototype.handleZoomBarScrollMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e.screenSpaceEventHandler.removeInputAction(G$J.MOUSE_MOVE),e$2e(e.zoombarTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoombarTickFunction),e.zoomBarScrollMouseUpFunction=void 0,e.zoombarTickFunction=void 0,e.isZoomBarScrolling=!0;var i=e.viewer.scene.camera;e.zoombarTickFunction=function(t){var n=e.zoombarTop-65;n>0?e.viewer.scene.mode===C$14.COLUMBUS_VIEW||e.viewer.scene.mode===C$14.SCENE2D?i.zoomOut():L$2(e,-1):n<0&&(e.viewer.scene.mode===C$14.COLUMBUS_VIEW||e.viewer.scene.mode===C$14.SCENE2D?i.zoomIn():L$2(e,1))},e.zoomBarScrollMouseMoveFunction=function(t,n){var r=e.zoombarTop,o=t.endPosition.y-t.startPosition.y+r;o=(o=o<0?0:o)>120?120:o,e.zoombarTop=o,e.zoombarTop-r>0?e.viewer.scene.mode===C$14.COLUMBUS_VIEW?i.zoomOut():L$2(e,-1):e.viewer.scene.mode===C$14.COLUMBUS_VIEW?i.zoomIn():L$2(e,1)},e.zoomBarScrollMouseUpFunction=function(t){e.isZoomBarScrolling=!1,e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e.screenSpaceEventHandler.removeInputAction(G$J.MOUSE_MOVE),e$2e(e.zoombarTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoombarTickFunction),e.zoomBarScrollMouseUpFunction=void 0,e.zoomBarScrollMouseMoveFunction=void 0,e.zoombarTickFunction=void 0,e.zoombarTop=65},e.screenSpaceEventHandler.setInputAction(e.zoomBarScrollMouseUpFunction,G$J.LEFT_UP),e.screenSpaceEventHandler.setInputAction(e.zoomBarScrollMouseMoveFunction,G$J.MOUSE_MOVE),e.viewer.clock.onTick.addEventListener(e.zoombarTickFunction)},y.prototype.handleZoomInMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e$2e(e.zoominTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoominTickFunction),e.zoominMouseUpFunction=void 0,e.zoominTickFunction=void 0,e.isZoomin=!0,e.zoominLastTimestamp=Et$c();var i=e.viewer.scene,n=i.camera;e.zoominTickFunction=function(t){if(e.viewer.scene.mode===C$14.COLUMBUS_VIEW){var r=j$3(i,1);e$2e(r)&&n.zoomIn(r)}else e.viewer.scene.mode===C$14.SCENE2D?n.zoomIn():L$2(e,1)},e.zoominMouseUpFunction=function(t){e.isZoomin=!1,e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e$2e(e.zoominTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoominTickFunction),e.zoominMouseUpFunction=void 0,e.zoominTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.zoominMouseUpFunction,G$J.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.zoominTickFunction)},y.prototype.handleZoomOutMouseDown=function(e,t){e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e$2e(e.zoomoutTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoomoutTickFunction),e.zoomoutMouseUpFunction=void 0,e.zoomoutTickFunction=void 0,e.iszoomout=!0,e.zoomoutLastTimestamp=Et$c();var i=e.viewer.scene,n=i.camera;e.zoomoutTickFunction=function(t){if(e.viewer.scene.mode===C$14.COLUMBUS_VIEW){var r=j$3(i,1);e$2e(r)&&n.zoomOut(r)}else e.viewer.scene.mode===C$14.SCENE2D?n.zoomOut():L$2(e,-1)},e.zoomoutMouseUpFunction=function(t){e.iszoomout=!1,e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e$2e(e.zoomoutTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.zoomoutTickFunction),e.zoomoutMouseUpFunction=void 0,e.zoomoutTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.zoomoutMouseUpFunction,G$J.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.zoomoutTickFunction)};var X=1;function M(e,t,i){e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e$2e(e.rotateEastTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.rotateEastTickFunction),e.rotateEastMouseUpFunction=void 0,e.rotateEastTickFunction=void 0,e.isrotateEasting=!0,e.rotateEastLastTimestamp=Et$c(),e.viewer.scene.camera;var n=e$2d.PI_OVER_TWO-Math.atan2(-i.y,i.x),r=Math.PI/4,o=0,a=1,s=2,l=3,u=4;o=n>=-r&&n<=r?u:n>=r&&n<=3*r?s:n>=3*r&&n<=5*r?l:a,e.rotateEastTickFunction=function(t){var i=e.viewer.scene.camera,r=Et$c();switch(e.rotateEastLastTimestamp,n=20*Math.abs(i._positionCartographic.height/6378317)*5e-4,o){case a:i.rotate(i.up,n);break;case s:i.rotate(i.up,-n);break;case l:i.rotate(i.right,-n);break;case u:i.rotate(i.right,n)}e.rotateLastTimestamp=r},e.rotateEastMouseUpFunction=function(t){e.isRotateEasting=!1,e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e$2e(e.rotateEastTickFunction)&&e.viewer.clock.onTick.removeEventListener(e.rotateEastTickFunction),e.rotateEastMouseUpFunction=void 0,e.rotateEastTickFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.rotateEastMouseUpFunction,G$J.LEFT_UP),e.viewer.clock.onTick.addEventListener(e.rotateEastTickFunction)}y.prototype.handleMouseDown=function(e,t){var i=t.currentTarget,n=t.currentTarget.getBoundingClientRect();X=n.height/i.clientHeight,n.width;var r=new o$1o((n.right-n.left)/2,(n.bottom-n.top)/2),o=0;o="mousedown"===t.type?new o$1o(t.clientX-n.left,t.clientY-n.top):new o$1o(t.originalEvent.touches[0].clientX-n.left,t.originalEvent.touches[0].clientY-n.top);var a=o$1o.subtract(o,r,z);this.clickStartPosition=new o$1o(t.clientX,t.clientY);var s=o$1o.magnitude(a);if((s/=X)>30&&s<45)tt(this,i,a);else{if(!(s>50&&s<70))return e.viewer.scene.mode===C$14.SCENE2D?void 0:M(this,i,a);if(e.viewer.scene.mode===C$14.SCENE2D)return;var l=e$2d.PI_OVER_TWO-Math.atan2(-a.y,a.x);l>=0&&l<=e$2d.PI_OVER_TWO&&nt(this,i,a)}},y.prototype.handleMouseUp=function(e,t){var i=t.currentTarget.getBoundingClientRect(),n=new o$1o((i.right-i.left)/2,(i.bottom-i.top)/2),r=0;r="mouseup"===t.type?new o$1o(t.clientX-i.left,t.clientY-i.top):new o$1o(t.originalEvent.touches[0].clientX-i.left,t.originalEvent.touches[0].clientY-i.top);var o=o$1o.subtract(r,n,z),a=o$1o.magnitude(o);if(a>30&&a<45){var s=e$2d.toDegrees(Math.atan2(-o.y,o.x)),l=new o$1o(t.clientX,t.clientY),u=l.x-this.clickStartPosition.x,c=l.y-this.clickStartPosition.y;if(Math.sqrt(u*u+c*c)>5)return;var h=e$2d.toDegrees(e.heading),d=Math.abs(s-h),f=e.viewer.scene;(s>0&&h>0&&h<90&&d>80&&d<100||d>260&&d<280)&&f.camera.flyTo({destination:f.camera.position,orientation:{heading:0,pitch:f.camera.pitch}})}};var x$1=new p$1d,W=new p$1d,d$3=new o$1p,N=new o$1o;function tt(e,t,i){e.screenSpaceEventHandler.removeInputAction(G$J.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e.rotateMouseMoveFunction=void 0,e.rotateMouseUpFunction=void 0,e.isRotating=!0,e.rotateInitialCursorAngle=Math.atan2(-i.y,i.x);var n=e.viewer.scene,r=n.camera,o=N;o.x=n.canvas.clientWidth/2,o.y=n.canvas.clientHeight/2;var a=r.pickEllipsoid(o,n.globe.ellipsoid,d$3);e$2e(a)?(e.rotateFrame=m$19.eastNorthUpToFixedFrame(a,n.globe.ellipsoid,W),e.rotateIsLook=!1):(e.rotateFrame=m$19.eastNorthUpToFixedFrame(r.positionWC,n.globe.ellipsoid,W),e.rotateIsLook=!0);var s=p$1d.clone(r.transform,x$1);r.lookAtTransform(e.rotateFrame),e.rotateInitialCameraAngle=-r.heading,e.rotateInitialCameraDistance=o$1p.magnitude(new o$1p(r.position.x,r.position.y,0)),r.lookAtTransform(s),e.rotateMouseMoveFunction=function(i,n){var r=t.getBoundingClientRect(),o=new o$1o((r.right-r.left)/2,(r.bottom-r.top)/2),a=new o$1o(n.clientX-r.left,n.clientY-r.top),s=o$1o.subtract(a,o,z),l=Math.atan2(-s.y,s.x)-e.rotateInitialCursorAngle,u=e$2d.zeroToTwoPi(e.rotateInitialCameraAngle-l),c=e.viewer.scene.camera,h=p$1d.clone(c.transform,x$1);c.lookAtTransform(e.rotateFrame);var d=-c.heading;c.rotateRight(u-d),c.lookAtTransform(h)},e.rotateMouseUpFunction=function(t){e.isRotating=!1,e.screenSpaceEventHandler.removeInputAction(G$J.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e.rotateMouseMoveFunction=void 0,e.rotateMouseUpFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.rotateMouseMoveFunction,G$J.MOUSE_MOVE),e.screenSpaceEventHandler.setInputAction(e.rotateMouseUpFunction,G$J.LEFT_UP)}var C$1=[{x:56,y:3},{x:59,y:4},{x:64,y:5},{x:69,y:6},{x:74,y:7},{x:79,y:9},{x:84,y:12},{x:89,y:15},{x:92,y:19},{x:94,y:20},{x:99,y:25},{x:104,y:34},{x:106,y:40},{x:107,y:44},{x:107,y:46},{x:107,y:48},{x:107,y:50},{x:107,y:52},{x:107,y:54},{x:107,y:56}],Z$1=Math.PI/40;function nt(e,t,i){e.screenSpaceEventHandler.removeInputAction(G$J.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e.tiltMouseMoveFunction=void 0,e.tiltMouseUpFunction=void 0;var n=e$2d.PI_OVER_TWO-Math.atan2(-i.y,i.x);n=(n=n<0?0:n)>e$2d.PI_OVER_TWO?e$2d.PI_OVER_TWO:n,e.tiltInitialCursorAngle=n,e.isTilting=!0;var r=e.viewer.scene,o=r.camera,a=N;a.x=r.canvas.clientWidth/2,a.y=r.canvas.clientHeight/2;for(var s=o.pickEllipsoid(a,r.globe.ellipsoid,d$3);!e$2e(s)&&a.y<r.canvas.clientHeight;)a.y+=5,s=o.pickEllipsoid(a,r.globe.ellipsoid,d$3);!e$2e(s)||(e.tiltFrame=m$19.eastNorthUpToFixedFrame(s,r.globe.ellipsoid,W),e.tiltMouseMoveFunction=function(i,n){e.isTilting=!0;var r=t.getBoundingClientRect(),o=new o$1o((r.right-r.left)/2,(r.bottom-r.top)/2),a=new o$1o(n.clientX-r.left,n.clientY-r.top),s=o$1o.subtract(a,o,z),l=e$2d.PI_OVER_TWO-Math.atan2(-s.y,s.x);l=(l=l<0?0:l)>e$2d.PI_OVER_TWO?e$2d.PI_OVER_TWO:l;var u=e.viewer.scene.camera,c=p$1d.clone(u.transform,x$1);u.lookAtTransform(e.tiltFrame);var h=l-e.tiltInitialCursorAngle;u.rotateUp(h),e.tiltInitialCursorAngle=l,u.lookAtTransform(c);var d=Math.ceil(l/Z$1),f=C$1[d=d>19?19:d];e.tiltbarLeft=f.x,e.tiltbarTop=f.y},e.tiltMouseUpFunction=function(t){e.isTilting=!1,e.screenSpaceEventHandler.removeInputAction(G$J.MOUSE_MOVE),e.screenSpaceEventHandler.removeInputAction(G$J.LEFT_UP),e.tiltMouseMoveFunction=void 0,e.tiltMouseUpFunction=void 0},e.screenSpaceEventHandler.setInputAction(e.tiltMouseMoveFunction,G$J.MOUSE_MOVE),e.screenSpaceEventHandler.setInputAction(e.tiltMouseUpFunction,G$J.LEFT_UP))}function j$3(e,t){var i=e.camera,n=e.canvas,r=new o$1o;r.x=n.clientWidth/2,r.y=n.clientHeight/2;var o=q(e,r);if(e$2e(o)){var a=o$1p.distance(i.positionWC,o),s=.0618*t*.2;return a*(s=a>300?s:2*s)}}function L$2(e,t){var i=e.viewer.scene,n=i.camera,r=i.canvas,o=new o$1o;o.x=r.clientWidth/2,o.y=r.clientHeight/2;var a=q(i,o);if(e$2e(a)){var s=o$1p.distance(n.position,a),l=.0618*t*.2;l=s>300?l:2*l,n.position;var u=s*l,c=new o$1p;o$1p.subtract(a,n.position,c);var h=new o$1p,d=(h=o$1p.clone(n.right,h),o$1p.dot(c,h)),f=new o$1p;f=o$1p.multiplyByScalar(h,d,f);var p=new o$1p;p=o$1p.subtract(c,f,p);var _=new o$1p;_=o$1p.normalize(p,_),new o$1p,n.move(_,u);var m=new o$1p;m=o$1p.normalize(a,m);var g=o$1p.magnitude(a),x=t$12.fromCartesian3(g),y=n.pickEllipsoid(o,x,new o$1p);if(e$2e(y)&&!isNaN(y.x)&&!isNaN(y.y)&&!isNaN(y.z)&&(y=o$1p.normalize(y,y),!(n._positionCartographic.height<0))){var v=o$1p.angleBetween(m,y);if(!e$2d.equalsEpsilon(v,0,e$2d.EPSILON10)){var $=new o$1p;$=o$1p.cross(m,y,$),n.rotate($,v)}}}}var et=new f$19,rt$1=new o$1p,at$1=new o$1p;function q(e,t){var i=e.globe,n=e.camera;if(e$2e(i)){var r;e.pickPositionSupported&&(r=e.pickPositionWorldCoordinates(t,rt$1));var o=n.getPickRay(t,et),a=i.pick(o,e,at$1);return(e$2e(r)?o$1p.distance(r,n.positionWC):Number.POSITIVE_INFINITY)<(e$2e(a)?o$1p.distance(a,n.positionWC):Number.POSITIVE_INFINITY)?r:a}}var t=function(e){if(!e$2e(e)||!e$2e(e.container))throw new t$15("options.container is required.");if(!e$2e(e.scene))throw new t$15("options.scene is required.");if(!e$2e(e.viewer))throw new t$15("options.viewer is required.");var t=i$c(e.container);this._viewModel=new y(e,t),m$2(t,this._viewModel),s$Z.isPCBroswer()||(document.querySelector(".sm-zoom").style.visibility="visible",document.querySelector(".sm-compass-tiltbar").style.visibility="visible",document.querySelector(".sm-compass-arrows").style.visibility="visible",document.querySelector(".sm-compass-tilt").style.visibility="visible")};function m$2(e,t){var i=['<div class="sm-compass" data-bind="visible: showCompass, event: { mousedown: handleMouseDown , touchstart : handleMouseDown, mouseup: handleMouseUp, touchend: handleMouseUp}">','<div class="sm-compass-tilt"></div>',"<div class=\"sm-compass-tiltbar\" data-bind = \"style : { left : + tiltbarLeft + 'px',top : + tiltbarTop + 'px'}\"></div>",'<div class="sm-compass-arrows"></div>',"<div class=\"sm-compass-outer-ring\" data-bind=\"style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }\"></div>",'<div class="arrows_e_active"></div>','<div class="arrows_n_active"></div>','<div class="arrows_s_active"></div>','<div class="arrows_w_active"></div>',"</div>",'<div class="sm-zoom">','<div class="sm-zoomin" data-bind="event : {mousedown : handleZoomInMouseDown,touchstart : handleZoomInMouseDown}"></div>','<div class="sm-zoomout" data-bind="event : {mousedown : handleZoomOutMouseDown, touchstart : handleZoomOutMouseDown}"></div>','<div class="sm-zoombar" data-bind="event : {mousedown : handleZoomBarScrollMouseDown, touchstart : handleZoomBarScrollMouseDown},style : {top : + zoombarTop + \'px\' }"></div>'," </div>"].join("");f$1(i,e,t)}function i$4(){this.showInstructions=!1;var e=this;this._command=s$4((function(){e.showInstructions=!e.showInstructions})),this._showClick=s$4((function(){e._touch=!1})),this._showTouch=s$4((function(){e._touch=!0})),this._touch=!1,this.tooltip="Navigation Instructions",ce$1.track(this,["tooltip","showInstructions","_touch"])}function l$3(e){if(!e$2e(e)||!e$2e(e.container))throw new t$15("options.container is required.");var t=i$c(e.container),i=new i$4,n=u$Z(e.instructionsInitiallyVisible,!1);i.showInstructions=n,i._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";var r=document.createElement("span");r.className="supermap3d-navigationHelpButton-wrapper",t.appendChild(r);var o=document.createElement("button");o.type="button",o.className="supermap3d-button supermap3d-toolbar-button supermap3d-navigation-help-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),r.appendChild(o);var a=document.createElement("div");a.className="supermap3d-navigation-help",a.setAttribute("data-bind",'css: { "supermap3d-navigation-help-visible" : showInstructions}'),r.appendChild(a);var s=document.createElement("button");s.type="button",s.className="supermap3d-navigation-button supermap3d-navigation-button-left",s.setAttribute("data-bind",'click: showClick, css: {"supermap3d-navigation-button-selected": !_touch, "supermap3d-navigation-button-unselected": _touch}');var l=document.createElement("img");l.src=n$17("Widgets/Images/NavigationHelp/Mouse.svg"),l.className="supermap3d-navigation-button-icon",l.style.width="25px",l.style.height="25px",s.appendChild(l),s.appendChild(document.createTextNode("Mouse"));var u=document.createElement("button");u.type="button",u.className="supermap3d-navigation-button supermap3d-navigation-button-right",u.setAttribute("data-bind",'click: showTouch, css: {"supermap3d-navigation-button-selected": _touch, "supermap3d-navigation-button-unselected": !_touch}');var c=document.createElement("img");c.src=n$17("Widgets/Images/NavigationHelp/Touch.svg"),c.className="supermap3d-navigation-button-icon",c.style.width="25px",c.style.height="25px",u.appendChild(c),u.appendChild(document.createTextNode("Touch")),a.appendChild(s),a.appendChild(u);var h=document.createElement("div");h.className="supermap3d-click-navigation-help supermap3d-navigation-help-instructions",h.setAttribute("data-bind",'css: { "supermap3d-click-navigation-help-visible" : !_touch}'),h.innerHTML=' <table> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/MouseLeft.svg")+'" width="48" height="48" /></td> <td> <div class="supermap3d-navigation-help-pan">Pan view</div> <div class="supermap3d-navigation-help-details">Left click + drag</div> </td> </tr> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/MouseRight.svg")+'" width="48" height="48" /></td> <td> <div class="supermap3d-navigation-help-zoom">Zoom view</div> <div class="supermap3d-navigation-help-details">Right click + drag, or</div> <div class="supermap3d-navigation-help-details">Mouse wheel scroll</div> </td> </tr> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/MouseMiddle.svg")+'" width="48" height="48" /></td> <td> <div class="supermap3d-navigation-help-rotate">Rotate view</div> <div class="supermap3d-navigation-help-details">Middle click + drag, or</div> <div class="supermap3d-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>',a.appendChild(h);var d=document.createElement("div");d.className="supermap3d-touch-navigation-help supermap3d-navigation-help-instructions",d.setAttribute("data-bind",'css: { "supermap3d-touch-navigation-help-visible" : _touch}'),d.innerHTML=' <table> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/TouchDrag.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-pan">Pan view</div> <div class="supermap3d-navigation-help-details">One finger drag</div> </td> </tr> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/TouchZoom.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-zoom">Zoom view</div> <div class="supermap3d-navigation-help-details">Two finger pinch</div> </td> </tr> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/TouchTilt.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-rotate">Tilt view</div> <div class="supermap3d-navigation-help-details">Two finger drag, same direction</div> </td> </tr> <tr> <td><img src="'+n$17("Widgets/Images/NavigationHelp/TouchRotate.svg")+'" width="70" height="48" /></td> <td> <div class="supermap3d-navigation-help-tilt">Rotate view</div> <div class="supermap3d-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>',a.appendChild(d),ce$1.applyBindings(i,r),this._container=t,this._viewModel=i,this._wrapper=r,this._closeInstructions=function(e){r.contains(e.target)||(i.showInstructions=!1)},s$Z.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}function r$2(e){if(!e$2e(e)||!e$2e(e.scene))throw new t$15("options.scene is required.");this._scene=e.scene,this.lowFrameRateMessage=u$Z(e.lowFrameRateMessage,"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,ce$1.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);var t=this;this._dismissMessage=s$4((function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0}));var i=i$f.fromScene(e.scene);this._unsubscribeLowFrameRate=i.lowFrameRate.addEventListener((function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)})),this._unsubscribeNominalFrameRate=i.nominalFrameRate.addEventListener((function(){t.showingLowFrameRateMessage=!1}))}function i$3(e){if(!e$2e(e)||!e$2e(e.container))throw new t$15("options.container is required.");if(!e$2e(e.scene))throw new t$15("options.scene is required.");var t=i$c(e.container),i=new r$2(e),n=document.createElement("div");n.className="supermap3d-performance-watchdog-message-area",n.setAttribute("data-bind","visible: showingLowFrameRateMessage");var r=document.createElement("button");r.setAttribute("type","button"),r.className="supermap3d-performance-watchdog-message-dismiss",r.innerHTML="×",r.setAttribute("data-bind","click: dismissMessage"),n.appendChild(r);var o=document.createElement("div");o.className="supermap3d-performance-watchdog-message",o.setAttribute("data-bind","html: lowFrameRateMessage"),n.appendChild(o),t.appendChild(n),ce$1.applyBindings(i,n),this._container=t,this._viewModel=i,this._element=n}function o$1(e){if(!e$2e(e))throw new t$15("scene is required.");this._scene=e,this._orthographic=e.camera.frustum instanceof a$V,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,ce$1.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);var t=this;ce$1.defineProperty(this,"selectedTooltip",(function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective})),this._toggleDropDown=s$4((function(){t.sceneMode===C$14.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)})),this._eventHelper=new n$x,this._eventHelper.add(e.morphComplete,(function(e,i,n,r){t.sceneMode=n,t._orthographic=n===C$14.SCENE2D||t._scene.camera.frustum instanceof a$V})),this._eventHelper.add(e.preRender,(function(){t._flightInProgress=e$2e(e.camera._currentFlight)})),this._switchToPerspective=s$4((function(){t.sceneMode!==C$14.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)})),this._switchToOrthographic=s$4((function(){t.sceneMode!==C$14.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)})),this._sceneMode=C$14}Object.defineProperties(t.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Object.defineProperties(i$4.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}}),Object.defineProperties(l$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),l$3.prototype.isDestroyed=function(){return!1},l$3.prototype.destroy=function(){return s$Z.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),ce$1.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i$11(this)},Object.defineProperties(r$2.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}}),r$2.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),i$11(this)},Object.defineProperties(i$3.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),i$3.prototype.isDestroyed=function(){return!1},i$3.prototype.destroy=function(){return this._viewModel.destroy(),ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$11(this)},Object.defineProperties(o$1.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}}),o$1.prototype.isDestroyed=function(){return!1},o$1.prototype.destroy=function(){this._eventHelper.removeAll(),i$11(this)};var v$1="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",b$1="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function n$1(e,t){if(!e$2e(e))throw new t$15("container is required.");if(!e$2e(t))throw new t$15("scene is required.");e=i$c(e);var i=new o$1(t);i._perspectivePath=v$1,i._orthographicPath=b$1;var n=document.createElement("span");n.className="supermap3d-projectionPicker-wrapper supermap3d-toolbar-button",e.appendChild(n);var r=document.createElement("button");r.type="button",r.className="supermap3d-button supermap3d-toolbar-button",r.setAttribute("data-bind",'css: { "supermap3d-projectionPicker-buttonPerspective": !_orthographic, "supermap3d-projectionPicker-buttonOrthographic": _orthographic, "supermap3d-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "supermap3d-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "supermap3d-projectionPicker-iconPerspective" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "supermap3d-projectionPicker-iconOrthographic" } --\x3e\x3c!-- /ko --\x3e',n.appendChild(r);var o=document.createElement("button");o.type="button",o.className="supermap3d-button supermap3d-toolbar-button supermap3d-projectionPicker-dropDown-icon",o.setAttribute("data-bind",'css: { "supermap3d-projectionPicker-visible" : (dropDownVisible && _orthographic), "supermap3d-projectionPicker-none" : !_orthographic, "supermap3d-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),n.appendChild(o);var a=document.createElement("button");a.type="button",a.className="supermap3d-button supermap3d-toolbar-button supermap3d-projectionPicker-dropDown-icon",a.setAttribute("data-bind",'css: { "supermap3d-projectionPicker-visible" : (dropDownVisible && !_orthographic), "supermap3d-projectionPicker-none" : _orthographic, "supermap3d-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),n.appendChild(a),ce$1.applyBindings(i,n),this._viewModel=i,this._container=e,this._wrapper=n,this._closeDropDown=function(e){n.contains(e.target)||(i.dropDownVisible=!1)},s$Z.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function i$2(e,t){if(!e$2e(e))throw new t$15("scene is required.");this._scene=e;var i=this;this._eventHelper=new n$x,this._eventHelper.add(e.morphStart,(function(e,t,n,r){i.sceneMode=n,i.dropDownVisible=!1})),this._duration=u$Z(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",ce$1.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,ce$1.defineProperty(this,"selectedTooltip",(function(){var e=i.sceneMode;return e===C$14.SCENE2D?i.tooltip2D:e===C$14.SCENE3D?i.tooltip3D:i.tooltipColumbusView})),this._toggleDropDown=s$4((function(){i.dropDownVisible=!i.dropDownVisible})),this._morphTo2D=s$4((function(){e.morphTo2D(i._duration)})),this._morphTo3D=s$4((function(){e.morphTo3D(i._duration)})),this._morphToColumbusView=s$4((function(){e.morphToColumbusView(i._duration)})),this._sceneMode=C$14}Object.defineProperties(n$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),n$1.prototype.isDestroyed=function(){return!1},n$1.prototype.destroy=function(){return this._viewModel.destroy(),s$Z.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ce$1.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i$11(this)},Object.defineProperties(i$2.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){if(e<0)throw new t$15("duration value must be positive.");this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}}),i$2.prototype.isDestroyed=function(){return!1},i$2.prototype.destroy=function(){this._eventHelper.removeAll(),i$11(this)};var D="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",P$1="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",_$1="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function c$2(e,t,i){if(!e$2e(e))throw new t$15("container is required.");if(!e$2e(t))throw new t$15("scene is required.");e=i$c(e);var n=new i$2(t,i);n._globePath=D,n._flatMapPath=P$1,n._columbusViewPath=_$1;var r=document.createElement("span");r.className="supermap3d-sceneModePicker-wrapper supermap3d-toolbar-button",e.appendChild(r);var o=document.createElement("button");o.type="button",o.className="supermap3d-button supermap3d-toolbar-button",o.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "supermap3d-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "supermap3d-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "supermap3d-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "supermap3d-sceneModePicker-slide-svg supermap3d-sceneModePicker-icon3D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "supermap3d-sceneModePicker-slide-svg supermap3d-sceneModePicker-icon2D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "supermap3d-sceneModePicker-slide-svg supermap3d-sceneModePicker-iconColumbusView" } --\x3e\x3c!-- /ko --\x3e',r.appendChild(o);var a=document.createElement("button");a.type="button",a.className="supermap3d-button supermap3d-toolbar-button supermap3d-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "supermap3d-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "supermap3d-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),r.appendChild(a);var s=document.createElement("button");s.type="button",s.className="supermap3d-button supermap3d-toolbar-button supermap3d-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "supermap3d-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "supermap3d-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),r.appendChild(s);var l=document.createElement("button");l.type="button",l.className="supermap3d-button supermap3d-toolbar-button supermap3d-sceneModePicker-dropDown-icon",l.setAttribute("data-bind",'css: { "supermap3d-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "supermap3d-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "supermap3d-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),r.appendChild(l),ce$1.applyBindings(n,r),this._viewModel=n,this._container=e,this._wrapper=r,this._closeDropDown=function(e){r.contains(e.target)||(n.dropDownVisible=!1)},s$Z.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(c$2.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),c$2.prototype.isDestroyed=function(){return!1},c$2.prototype.destroy=function(){return this._viewModel.destroy(),s$Z.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ce$1.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i$11(this)};var m$1=new o$1o,s$2="-1000px";function n(e,t,i){if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(t))throw new t$15("selectionIndicatorElement is required.");if(!e$2e(i))throw new t$15("container is required.");this._scene=e,this._screenPositionX=s$2,this._screenPositionY=s$2,this._tweens=e.tweens,this._container=u$Z(i,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,ce$1.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,ce$1.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&e$2e(this.position)}}),ce$1.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return s$R.wgs84ToWindowCoordinates(e,t,i)}}function i$1(e,t){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e),this._container=e;var i=document.createElement("div");i.className="supermap3d-selection-wrapper",i.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "supermap3d-selection-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var r="http://www.w3.org/2000/svg",o=document.createElementNS(r,"svg:svg");o.setAttribute("width",160),o.setAttribute("height",160),o.setAttribute("viewBox","0 0 160 160");var a=document.createElementNS(r,"g");a.setAttribute("transform","translate(80,80)"),o.appendChild(a);var s=document.createElementNS(r,"path");s.setAttribute("data-bind","attr: { transform: _transform }"),s.setAttribute("d","M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z"),a.appendChild(s),i.appendChild(o);var l=new n(t,this._element,this._container);this._viewModel=l,ce$1.applyBindings(this._viewModel,this._element)}n.prototype.update=function(){if(this.showSelection&&e$2e(this.position)){var e=this.computeScreenSpacePosition(this.position,m$1);if(e$2e(e)){var t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,r=this._selectionIndicatorElement.clientWidth,o=.5*r;e.x=Math.min(Math.max(e.x,-r),i+r)-o,e.y=Math.min(Math.max(e.y,-r),n+r)-o,this._screenPositionX=Math.floor(e.x+.25)+"px",this._screenPositionY=Math.floor(e.y+.25)+"px"}else this._screenPositionX=s$2,this._screenPositionY=s$2}},n.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:m$Y.EXPONENTIAL_OUT})},n.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:m$Y.EXPONENTIAL_OUT})},Object.defineProperties(n.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(i$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),i$1.prototype.isDestroyed=function(){return!1},i$1.prototype.destroy=function(){var e=this._container;return ce$1.cleanNode(this._element),e.removeChild(this._element),i$11(this)};var C={UNLOAD:0,LOADING:1,LOADED:2,LOST:3},Be=new i$W("S3MTilesParser",1e4);function g(e,t,i,n,r){this._viewer=e,this._context=t,this._state=C.UNLOAD,this._url=i,this._gl=t._gl,this._renderEntities=[],this._visible=!1,this._scale=u$Z(r,1),this._position=o$1p.clone(n),this._modelMatrix=m$19.eastNorthUpToFixedFrame(n,void 0,new p$1d),null!==t.s3tc?this._supportCompressType=1:null!==t.pvrtc?this._supportCompressType=2:null!==t.etc1&&(this._supportCompressType=3)}function Ue(e){let t=o$1p.distance(e._position,e._viewer.camera.position),i=e._viewer.camera.frustum.near,n=e._viewer.scene._view.viewport.height,r=e._viewer.camera.frustum.fov;return 25/n*Math.tan(r/2)*i*2/(i/(i+t))}function d$2(e,t,i){if(e$2e(e))for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var a=n[o];if(e$2e(i)){if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}else if(a.localName===t)return a}}function he(e,t,i){if(e$2e(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;a<o;a++){var s=r[a];e$2e(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}}function Fe(e,t,i){if(!e$2e(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;a<o;a++){var s=r[a];e$2e(i)?s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s):s.localName===t&&n.push(s)}return n}function l$2(e,t,i){var n=d$2(e,t,i);if(e$2e(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function R(e,t,i){var n=d$2(e,t,i);if(e$2e(n))return n.textContent.trim()}function Ve$1(e,t,i){var n=d$2(e,t,i);if(e$2e(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}Object.defineProperties(g.prototype,{visible:{set:function(e){this._visible=e},get:function(){return this._visible}},position:{get:function(){return this._position}},scale:{get:function(){return this._scale}}}),g.prototype.setModelMatrix=function(e,t){this._position=o$1p.clone(t);var i=Ue(this),n=m$19.eastNorthUpToFixedFrame(t,void 0,new p$1d);p$1d.multiplyByUniformScale(n,i,this._modelMatrix);for(var r=this._renderEntities,o=0,a=r.length;o<a;o++){var s=r[o],l=s._oriCenter,u=s._colorCommand;e$2e(u)&&(u.modelMatrix=p$1d.clone(this._modelMatrix),p$1d.multiplyByPoint(this._modelMatrix,l,u.boundingVolume.center))}},g.prototype.load=function(){var e=this,t=this._state;if(C.UNLOAD==t){var i=o$O(this._url,(function(e){return o$10(e)}));e$2e(i)&&(this._state=C.LOADING,i.then((function(t){Ge(e,t)}),(function(e){this._state=C.UNLOAD})))}},g.prototype.update=function(e){if(this._visible&&!e.passes.fbo){if(!this._ready)return void this.load();e.context;var t=this._renderEntities;if(t&&0!=t.length)for(var i=0,n=t.length;i<n;i++){var r=t[i];e$2e(r._colorCommand)&&!o$1p.equals(r._colorCommand.boundingVolume.center,o$1p.ZERO)&&e.commandList.push(r._colorCommand)}}},g.prototype.isDestroyed=function(){return!1},g.prototype.destroy=function(){for(var e=this._renderEntities,t=0,i=e.length;t<i;t++){e[t].destroy()}return this._renderEntities.length=0,this._viewer._tiltIndicator=void 0,i$11(this)};var Me=new s$T;function Ge(e,t){var i={buffer:t,supportCompressType:e._supportCompressType},n=Be.scheduleTask(i,[t]);e$2e(n)?n.then((function(t){if(t.result){e._gl;for(var i=e._context,n=Me.read(t.xmlDoc).firstChild,r=n.namespaceURI,o=Fe(d$2(n,"Material3Ds",r),"material",r),a={},s=0,l=o.length;s<l;s++){var u=o[s],c=R(u,"name",r),h=new _0xf77618({});a[c]=h;var d=d$2(u,"Ambient",r),f=l$2(d,"AmbientR",r),p=l$2(d,"AmbientG",r),_=l$2(d,"AmbientB",r),m=l$2(d,"AmbientA",r);h._ambientColor=new e$1X(f,p,_,m);var g=d$2(u,"Diffuse",r);f=l$2(g,"DiffuseR",r),p=l$2(g,"DiffuseG",r),_=l$2(g,"DiffuseB",r),m=l$2(g,"DiffuseA",r),h._diffuseColor=new e$1X(f,p,_,m);var x=d$2(u,"Specular",r);f=l$2(x,"SpecularR",r),p=l$2(x,"SpecularG",r),_=l$2(x,"SpecularB",r),m=l$2(x,"SpecularA",r),h._specularColor=new e$1X(f,p,_,m);var y=l$2(u,"Shininess",r);h._shininess=y,d$2(u,"TransparentSorting",r),h._bTransparentSorting=Ve$1(u,"TransparentSorting",r);var v=d$2(u,"texture",r),$=R(v,"name",r),b=d$2(v,"AddressMode",r),T=R(b,"u",r),S=R(b,"v",r);T="TAM_WRAP"===T?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE,S="TAM_WRAP"===S?q$1a.REPEAT:q$1a.CLAMP_TO_EDGE;var w=t.texturePackage[$];if(e$2e(w)){$=i._id+"_"+$;var E=Se$e.CreateTexture($,i,w.width,w.height,w.nFormat,w.compressType,w.imageBuffer,!1,T,S);h._textures.push(E)}}var P=he(d$2(n,"PageLods",r),"Geode",r);for(s=0,l=P.length;s<l;s++){for(var A=P[s],L=R(A,"GeoDeModMatrix",r).split(","),M=0;M<16;M++)L[M]=parseFloat(L[M]);L=p$1d.unpack(L,0);for(var O=he(A,"GeoName",r),D=[],I=0,B=O.length;I<B;I++){var F=O[I].textContent.trim();D.push(F)}for(var N=[],G=new i$1d,z=0;z<D.length;z++){var U=ze$1(W=(k=t.geoPackage[D[z]]).vertexPackage,L);N.push(U)}var V=new o$1p;N.length>0&&(i$1d.fromBoundingSpheres(N,G),V=o$1p.clone(G.center),N.length=0),e.oriRadius=G.radius;for(B=0;B<D.length;B++){var k,W=(k=t.geoPackage[D[B]]).vertexPackage,H=k.arrIndexPackage,q={};for(var j in H){var X=H[j];if(e$2e(X)){h=a[c=X.materialCode];q[c]=h}}var Y=new T$2({vertexPackage:W,arrIndexPackage:H,version:t.version,mapPass:q,boundingVolume:G,oriCenter:V,owner:e});Y.initialize(e._context),e._renderEntities.push(Y)}}e._ready=!0,e._state=C.LOADED}else e._state=C.UNLOAD})):e.state=C.UNLOAD}function ze$1(e,t){for(var i=[],n=new i$1d,r=new o$1p,o=(new o$1p,e.vertexAttributes[0]),a=o.componentsPerAttribute,s=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4),l=0;l<e.verticesCount;l++)o$1p.fromArray(s,a*l,r),i.push(o$1p.clone(r));return i$1d.fromPoints(i,n),i.length=0,i$1d.transform(n,t,n),n}function T$2(e){var t=(e=e||{}).arrIndexPackage,i=e.vertexPackage,n=e.mapPass;this._arrIndexPackage=t,this._vertexPackage=i,this._owner=e.owner,this._attributeLocations={},this._initialize=!1,this._mapPass=n,this._boundingVolume=e.boundingVolume,this._oriCenter=e.oriCenter}function s$1(e,t,i){this._color=e,this._height=t,this._base=u$Z(i,0)}function v(e,t,i,n){this.interval=e,this.height=t,this.color=i||new e$1X(.5,.5,.5,1),this.backgroundColor=n||new e$1X(0,0,0,0)}T$2.prototype.initialize=function(e){this._initialize||(this.createCommand(e),this._initialize=!0)},T$2.prototype.createVertexData=function(e){var t=this._vertexPackage.vertexAttributes;for(var i in this._vertexPackage.attrLocation){var n=this._vertexPackage.attrLocation[i];this._vertexPackage.vertexAttributes[n].name=i}for(var r=0,o=t.length;r<o;r++){var a=t[r];!e$2e(a.typedArray)||(a.vertexBuffer=t$X.createVertexBuffer({context:e,typedArray:a.typedArray,usage:A$18.STATIC_DRAW}),a.typedArray=null,delete a.typedArray)}return this._attributeLocations=this._vertexPackage.attrLocation,t},T$2.prototype.createCommand=function(e){var t=this.createVertexData(e),i=Le$q.OPAQUE,n=d$1m.fromCache({cull:{enabled:!1},depthTest:{enabled:!1},blending:Ee$r.ALPHA_BLEND}),r=this._vertexPackage.verticesCount,o=this._arrIndexPackage[0];if(e$2e(o)){var a=ce$z.UNSIGNED_SHORT;(1===o.indexType||r>=e$2d.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(a=ce$z.UNSIGNED_INT);var s=t$X.createIndexBuffer({context:e,typedArray:o.indicesTypedArray,usage:A$18.STATIC_DRAW,indexDatatype:a}),l=this._mapPass[o.materialCode]||_0xf77618.Default,u=W$18.TRIANGLES;switch(o.primitiveType){case 1:u=W$18.POINTS;break;case 2:u=W$18.LINES;break;case 4:u=W$18.TRIANGLES}var c=new i$$({primitiveType:u,boundingVolume:this._boundingVolume,pass:i,owner:this,cull:!1,modelMatrix:p$1d.clone(this._owner._modelMatrix)});c.vertexArray=new c$13({context:e,attributes:t,indexBuffer:s});var h=new s$V({name:"tiltIndicatorVS",sources:["attribute vec4 aPosition;\n attribute vec3 aNormal;\n attribute vec4 aTexCoord0;\n #ifdef VertexColor\n attribute vec4 aColor;\n #endif\n uniform vec4 uAmbientColor;\n uniform vec4 uDiffuseColor;\n uniform vec4 uSpecularColor;\n varying vec2 vTexCoord;\n varying vec4 vColor;\n const float SHIFT_LEFT8 = 256.0;\n const float SHIFT_RIGHT8 = 1.0 / 256.0;\n const vec4 LIGHT_COLOR = vec4(0.8, 0.8, 0.8, 1.0);\n vec4 vertexColor = vec4(1.0);\n #ifdef VertexColor\n vertexColor = aColor;\n #endif\n void main()\n {\n vec4 vertexPos = aPosition;\n vTexCoord = aTexCoord0.xy;\n vertexPos.w = 1.0;\n gl_Position = czm_modelViewProjection * vertexPos;\n vColor = vertexColor;\n vec4 eyePosition = czm_modelView * vertexPos;\n vec3 normal = normalize(aNormal);\n vec3 lightDirection = normalize(czm_sunPositionWC - vec3(eyePosition));\n float nDotL = max(dot(lightDirection, normal), 0.0);\n vec4 diffuse = uDiffuseColor * LIGHT_COLOR * nDotL;\n vec4 ambient = uAmbientColor * LIGHT_COLOR;\n vec4 materialColor = clamp(diffuse + ambient, vec4(0.0), vec4(1.0));\n vColor = vColor * materialColor;\n }"]}),d=new s$V({name:"tiltIndicatorFS",sources:["#ifdef TEXTURE_ENABLE\n uniform sampler2D uTexture;\n #endif\n varying vec2 vTexCoord;\n varying vec4 vColor;\n void main()\n {\n #ifdef TEXTURE_ENABLE\n vec2 vecTexCoord = vec2(vTexCoord.x,1.0-vTexCoord.y);\n gl_FragColor = texture2D(uTexture, vecTexCoord.xy, 0.0) * vColor;\n #else\n gl_FragColor = vColor;\n #endif\n if(gl_FragColor.a < 0.1)\n {\n discard;\n }\n }"]});e$2e(this._attributeLocations.aTexCoord0)&&l._textures.length>0&&d.defines.push("TEXTURE_ENABLE"),e$2e(this._attributeLocations.aColor)&&h.defines.push("VertexColor"),c.shaderProgram=r$14.fromCache({context:e,vertexShaderSource:h,fragmentShaderSource:d,attributeLocations:this._attributeLocations}),c.uniformMap={uTexture:function(){return l._textures[0]},uAmbientColor:function(){return l._ambientColor},uDiffuseColor:function(){return l._diffuseColor},uSpecularColor:function(){return l._specularColor}},c.renderState=n,this._colorCommand=c,this._vertexPackage=null,this._arrIndexPackage.length=0}},T$2.prototype.isDestroyed=function(){return!1},T$2.prototype.destroy=function(){for(var e in this._mapPass)this._mapPass.hasOwnProperty(e)&&this._mapPass[e].destroy();return this._mapPass.length=0,e$2e(this._colorCommand)&&(this._colorCommand.vertexArray=this._colorCommand.vertexArray&&!this._colorCommand.vertexArray.isDestroyed()&&this._colorCommand.vertexArray.destroy(),this._colorCommand.shaderProgram=this._colorCommand.shaderProgram&&!this._colorCommand.shaderProgram.isDestroyed()&&this._colorCommand.shaderProgram.destroy(),this._colorCommand=void 0),this._vertexPackage=null,this._arrIndexPackage.length=0,this._attributeLocations=void 0,i$11(this)},s$1.prototype.getHeight=function(){return this._height},s$1.prototype.getBase=function(){return this._base},s$1.prototype.getStartTime=function(){return this._start},s$1.prototype.getStopTime=function(){return this._stop},s$1.prototype.setRange=function(e,t){this._start=e,this._stop=t},s$1.prototype.render=function(e){var t="";if(this._start&&this._stop&&this._color){var i=a$15.secondsDifference(this._start,e.epochJulian),n=Math.round(e.timeBarWidth*e.getAlpha(i)),r=a$15.secondsDifference(this._stop,e.epochJulian),o=Math.round(e.timeBarWidth*e.getAlpha(r))-n;n<0&&(o+=n,n=0),n+o>e.timeBarWidth&&(o=e.timeBarWidth-n),o>0&&(t='<span class="supermap3d-timeline-highlight" style="left: '+n.toString()+"px; width: "+o.toString()+"px; bottom: "+this._base.toString()+"px; height: "+this._height+"px; background-color: "+this._color+';"></span>')}return t},v.prototype.render=function(e,t){var i=this.interval.start,n=this.interval.stop,r=t.startJulian,o=a$15.addSeconds(t.startJulian,t.duration,new a$15);if(a$15.lessThan(i,r)&&a$15.greaterThan(n,o))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(a$15.lessThanOrEquals(i,o)&&a$15.greaterThanOrEquals(n,r)){var a,s,l;for(a=0;a<t.timeBarWidth;++a){var u=a$15.addSeconds(t.startJulian,a/t.timeBarWidth*t.duration,new a$15);!e$2e(s)&&a$15.greaterThanOrEquals(u,i)?s=a:!e$2e(l)&&a$15.greaterThanOrEquals(u,n)&&(l=a)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),e$2e(s)&&(e$2e(l)||(l=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(s,t.y,Math.max(l-s,1),this.height))}};var Z=1e12,_={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},c$1={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},T$1=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6];function u$3(e,t){if(!e$2e(e))throw new t$15("container is required.");if(!e$2e(t))throw new t$15("clock is required.");e=i$c(e),this.container=e;var i=document.createElement("div");i.className="supermap3d-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=_.none,this._touchMode=c$1.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="supermap3d-timeline-bar"></div><div class="supermap3d-timeline-trackContainer"><canvas class="supermap3d-timeline-tracks" width="10" height="1"></canvas></div><div class="supermap3d-timeline-needle"></div><span class="supermap3d-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=ot(this),this._onMouseUp=at(this),this._onMouseMove=rt(this),this._onMouseWheel=ht(this),this._onTouchStart=ct(this),this._onTouchMove=dt(this),this._onTouchEnd=ut(this);var n=this._timeBarEle;document.addEventListener("mouseup",this._onMouseUp,!1),document.addEventListener("mousemove",this._onMouseMove,!1),n.addEventListener("mousedown",this._onMouseDown,!1),n.addEventListener("touchstart",this._onTouchStart,!1),n.addEventListener("touchend",this._onTouchEnd,!1),n.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}function A(e){return e<10?"0"+e.toString():e.toString()}function ot(e){return function(t){e._mouseMode!==_.touchOnly&&(0===t.button?(e._mouseMode=_.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,2===t.button?e._mouseMode=_.zoom:e._mouseMode=_.slide)),t.preventDefault()}}function at(e){return function(t){e._mouseMode=_.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function rt(e){return function(t){var i;if(e._mouseMode===_.scrub){t.preventDefault();var n=t.clientX-e._topDiv.getBoundingClientRect().left;n<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):n>e._topDiv.clientWidth||(e._timelineDragLocation=void 0,e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===_.slide){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i){var r=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(a$15.addSeconds(e._startJulian,r,new a$15),a$15.addSeconds(e._endJulian,r,new a$15))}}else e._mouseMode===_.zoom&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i&&e.zoomFrom(Math.pow(1.01,i)))}}function ht(e){return function(t){var i=t.wheelDeltaY||t.wheelDelta||-t.detail;i/=Z=Math.max(Math.min(Math.abs(i),Z),1),e.zoomFrom(Math.pow(1.05,-i))}}function ct(e){return function(t){var i,n,r=t.touches.length,o=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=_.touchOnly,1===r?(i=a$15.secondsDifference(e._scrubJulian,e._startJulian),n=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+o),Math.abs(t.touches[0].clientX-n)<50?(e._touchMode=c$1.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===r?"-16px 0":"0 0")):(e._touchMode=c$1.singleTap,e._touchState.centerX=t.touches[0].clientX-o)):2===r?(e._touchMode=c$1.slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-o,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=c$1.ignore}}function ut(e){return function(t){var i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===c$1.singleTap?(e._touchMode=c$1.scrub,e._onTouchMove(t)):e._touchMode===c$1.scrub&&e._onTouchMove(t),e._mouseMode=_.touchOnly,1!==i?e._touchMode=i>0?c$1.ignore:c$1.none:e._touchMode===c$1.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function dt(e){return function(t){var i,n,r,o,a,s,l=1,u=e._topDiv.getBoundingClientRect().left;e._touchMode===c$1.singleTap&&(e._touchMode=c$1.slideZoom),e._mouseMode=_.touchOnly,e._touchMode===c$1.scrub?(t.preventDefault(),1===t.changedTouches.length&&((n=t.changedTouches[0].clientX-u)>=0&&n<=e._topDiv.clientWidth&&e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===c$1.slideZoom&&(2===(r=t.touches.length)?(o=.5*(t.touches[0].clientX+t.touches[1].clientX)-u,a=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===r&&(o=t.touches[0].clientX-u,a=0),e$2e(o)&&(a>0&&e._touchState.spanX>0?(l=e._touchState.spanX/a,s=a$15.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-o*e._timeBarSecondsSpan*l)/e._topDiv.clientWidth,new a$15)):(i=e._touchState.centerX-o,s=a$15.addSeconds(e._startJulian,i*e._timeBarSecondsSpan/e._topDiv.clientWidth,new a$15)),e.zoomTo(s,a$15.addSeconds(s,e._timeBarSecondsSpan*l,new a$15)),e._touchState.centerX=o,e._touchState.spanX=a))}}function f(e){return n$17("Assets/Textures/SkyBox/tycho2t3_80_"+e+".jpg")}function U(e){e._renderLoopRunning=!0;var t=0;p$H((function i(n){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{var r=e._targetFrameRate;if(e$2e(r)){var o=1e3/r,a=n-t;a>o&&(e.resize(),e.render(),t=n-a%o),p$H(i)}else e.resize(),e.render(),p$H(i)}catch(t){e._errorListenerEvent.raiseEvent(t)}else e._renderLoopRunning=!1}))}function j$2(e){var t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,e._pixelRatio=t,e$2e(e._scene)&&(e._scene.pixelRatio=t),t}function x(e){var t=e._canvas,i=t.clientWidth,n=t.clientHeight,r=j$2(e);e._canvasClientWidth=i,e._canvasClientHeight=n,i*=r,n*=r,t.width=i,t.height=n,e._canRender=0!==i&&0!==n,e._lastDevicePixelRatio=window.devicePixelRatio}function L$1(e){var t=e._canvas,i=t.width,n=t.height;if(0!==i&&0!==n){var r=e._scene.camera.frustum;e$2e(r.aspectRatio)?r.aspectRatio=i/n:(r.top=r.right*(n/i),r.bottom=-r.top)}}function u$2(e,t){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e),t=u$Z(t,{}),this._options=t;var i=document.createElement("div");i.className="supermap3d-widget",e.appendChild(i);var n=document.createElement("canvas"),r=s$Z.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=r,r&&(n.style.imageRendering=s$Z.imageRenderingValue()),n.oncontextmenu=function(){return!1},n.onselectstart=function(){return!1},i.appendChild(n);var o=document.createElement("div");o.className="supermap3d-widget-credits";var a=e$2e(t.creditContainer)?i$c(t.creditContainer):i;a.appendChild(o);var s=e$2e(t.creditViewport)?i$c(t.creditViewport):i,l=u$Z(t.showRenderLoopErrors,!0),u=u$Z(t.useBrowserRecommendedResolution,!0);this._element=i,this._container=e,this._canvas=n,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=s,this._creditContainer=a,this._innerCreditContainer=o,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=l,this._resolutionScale=1,this._useBrowserRecommendedResolution=u,this._forceResize=!1,this._clock=e$2e(t.clock)?t.clock:new u$H,this._isShowErrorPanel=!0,this._errorListenerEvent=new o$1h,x(this),(!e$2e(t.contextOptions)||!e$2e(t.contextOptions)||t.contextOptions.contextType!=Me$j.WebGPU)&&this._initScene()}function E(e){var t=!1,i=window.screen;return e$2e(i)&&(e$2e(i.lockOrientation)?t=i.lockOrientation(e):e$2e(i.mozLockOrientation)?t=i.mozLockOrientation(e):e$2e(i.msLockOrientation)?t=i.msLockOrientation(e):e$2e(i.orientation&&i.orientation.lock)&&(t=i.orientation.lock(e))),t}function u$1(){var e=window.screen;e$2e(e)&&(e$2e(e.unlockOrientation)?e.unlockOrientation():e$2e(e.mozUnlockOrientation)?e.mozUnlockOrientation():e$2e(e.msUnlockOrientation)?e.msUnlockOrientation():e$2e(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function O$1(e,t,i,n){n()||(i()?(t.useWebVR=!1,e._locked&&(u$1(),e._locked=!1),e._noSleep.disable(),l$1e.exitFullscreen(),i(!1)):(l$1e.fullscreen||l$1e.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=E("landscape")),t.useWebVR=!0,i(!0)))}function a(e,t){if(!e$2e(e))throw new t$15("scene is required.");var i=this,n=ce$1.observable(l$1e.enabled),r=ce$1.observable(!1);this.isVRMode=void 0,ce$1.defineProperty(this,"isVRMode",{get:function(){return r()}}),this.isVREnabled=void 0,ce$1.defineProperty(this,"isVREnabled",{get:function(){return n()},set:function(e){n(e&&l$1e.enabled)}}),this.tooltip=void 0,ce$1.defineProperty(this,"tooltip",(function(){return n()?r()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"}));var o=ce$1.observable(!1);this._isOrthographic=void 0,ce$1.defineProperty(this,"_isOrthographic",{get:function(){return o()}}),this._eventHelper=new n$x,this._eventHelper.add(e.preRender,(function(){o(e.camera.frustum instanceof a$V)})),this._locked=!1,this._noSleep=new b$4,this._command=s$4((function(){O$1(i,e,r,o)}),ce$1.getObservable(this,"isVREnabled")),this._vrElement=u$Z(i$c(t),document.body),this._callback=function(){!l$1e.fullscreen&&r()&&(e.useWebVR=!1,i._locked&&(u$1(),i._locked=!1),i._noSleep.disable(),r(!1))},document.addEventListener(l$1e.changeEventName,this._callback)}u$3.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},u$3.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},u$3.prototype.isDestroyed=function(){return!1},u$3.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this),document.removeEventListener("mouseup",this._onMouseUp,!1),document.removeEventListener("mousemove",this._onMouseMove,!1);var e=this._timeBarEle;e.removeEventListener("mousedown",this._onMouseDown,!1),e.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),e.removeEventListener("mousewheel",this._onMouseWheel,!1),e.removeEventListener("touchstart",this._onTouchStart,!1),e.removeEventListener("touchmove",this._onTouchMove,!1),e.removeEventListener("touchend",this._onTouchEnd,!1),e.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),i$11(this)},u$3.prototype.addHighlightRange=function(e,t,i){var n=new s$1(e,t,i);return this._highlightRanges.push(n),this.resize(),n},u$3.prototype.addTrack=function(e,t,i,n){var r=new v(e,t,i,n);return this._trackList.push(r),this._lastHeight=void 0,this.resize(),r},u$3.prototype.zoomTo=function(e,t){if(!e$2e(e))throw new t$15("startTime is required.");if(!e$2e(t))throw new t$15("stopTime is required");if(a$15.lessThanOrEquals(t,e))throw new t$15("Start time must come before end time.");if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=a$15.secondsDifference(t,e),this._clock&&this._clock.clockRange!==tt$a.UNBOUNDED){var i=this._clock.startTime,n=this._clock.stopTime,r=a$15.secondsDifference(n,i),o=a$15.secondsDifference(i,this._startJulian),a=a$15.secondsDifference(n,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):o>0?(this._endJulian=a$15.addSeconds(this._endJulian,o,new a$15),this._startJulian=i,this._timeBarSecondsSpan=a$15.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=a$15.addSeconds(this._startJulian,a,new a$15),this._endJulian=n,this._timeBarSecondsSpan=a$15.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();var s=document.createEvent("Event");s.initEvent("setzoom",!0,!0),s.startJulian=this._startJulian,s.endJulian=this._endJulian,s.epochJulian=this._epochJulian,s.totalSpan=this._timeBarSecondsSpan,s.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(s)},u$3.prototype.zoomFrom=function(e){var t=a$15.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;var i=this._timeBarSecondsSpan-t;this.zoomTo(a$15.addSeconds(this._startJulian,t-t*e,new a$15),a$15.addSeconds(this._endJulian,i*e-i,new a$15))},u$3.prototype.makeLabel=function(e){var t=a$15.toGregorianDate(e),i=t.hour+8;return i>=24&&(i-=24),A(i)+":"+A(t.minute)+":"+A(t.second)},u$3.prototype.smallestTicInPixels=7,u$3.prototype._makeTics=function(){var e,t=this._timeBarEle,i=a$15.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(i*this._topDiv.clientWidth/this._timeBarSecondsSpan),r=n-8,o=this;this._needleEle.style.left=n.toString()+"px";var a="",s=.01,l=31536e6,u=1e-10,c=0,h=this._timeBarSecondsSpan;h<s?(h=s,this._timeBarSecondsSpan=s,this._endJulian=a$15.addSeconds(this._startJulian,s,new a$15)):h>l&&(h=l,this._timeBarSecondsSpan=l,this._endJulian=a$15.addSeconds(this._startJulian,l,new a$15));var d=this._timeBarEle.clientWidth;d<10&&(d=10);var f,p=this._startJulian,_=Math.min(h/d*1e-5,.4),m=a$15.toGregorianDate(p);f=h>31536e4?a$15.fromDate(new Date(Date.UTC(100*Math.floor(m.year/100),0))):h>31536e3?a$15.fromDate(new Date(Date.UTC(10*Math.floor(m.year/10),0))):h>86400?a$15.fromDate(new Date(Date.UTC(m.year,0))):a$15.fromDate(new Date(Date.UTC(m.year,m.month,m.day)));var g=a$15.secondsDifference(this._startJulian,a$15.addSeconds(f,_,new a$15)),x=g+h;function y(e){return Math.floor(g/e)*e}function v(e,t){return Math.ceil(e/t+.5)*t}function $(e){return(e-g)/h}function b(e,t){return e-t*Math.round(e/t)}this._epochJulian=f,this._rulerEle.innerHTML=this.makeLabel(a$15.addSeconds(this._endJulian,-s,new a$15));var T=this._rulerEle.offsetWidth+20;T<30&&(T=180);var C=c;c-=u;var S={startTime:g,startJulian:p,epochJulian:f,duration:h,timeBarWidth:d,getAlpha:$};this._highlightRanges.forEach((function(e){a+=e.render(S)}));var w=0,E=0,P=0,A=T/d;A>1&&(A=1),A*=this._timeBarSecondsSpan;var L,M=-1,R=-1,O=T$1.length;for(L=0;L<O;++L){var D=T$1[L];if(++M,w=D,D>A&&D>c)break;R<0&&d*(D/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(R=M)}if(M>0){for(;M>0;)if(--M,Math.abs(b(w,T$1[M]))<1e-5){T$1[M]>=c&&(E=T$1[M]);break}if(R>=0)for(;R<M;){if(Math.abs(b(E,T$1[R]))<1e-5&&T$1[R]>=c){P=T$1[R];break}++R}}(c=C)>u&&P<1e-5&&Math.abs(c-w)>u&&(P=c,c<=w+u&&(E=0));var I,B=-999999;if(d*(P/this._timeBarSecondsSpan)>=3)for(e=y(P);e<=x;e=v(e,P))a+='<span class="supermap3d-timeline-ticTiny" style="left: '+Math.round(d*$(e)).toString()+'px;"></span>';if(d*(E/this._timeBarSecondsSpan)>=3)for(e=y(E);e<=x;e=v(e,E))a+='<span class="supermap3d-timeline-ticSub" style="left: '+Math.round(d*$(e)).toString()+'px;"></span>';if(d*(w/this._timeBarSecondsSpan)>=2){this._mainTicSpan=w,x+=w,e=y(w);for(var F=a$15.computeTaiMinusUtc(f);e<=x;){var N=a$15.addSeconds(p,e-g,new a$15);if(w>2.1){var G=a$15.computeTaiMinusUtc(N);Math.abs(G-F)>.1&&(e+=G-F,N=a$15.addSeconds(p,e-g,new a$15))}var z=Math.round(d*$(e)),U=this.makeLabel(N);this._rulerEle.innerHTML=U,(I=this._rulerEle.offsetWidth)<10&&(I=T);var V=z-(I/2-1);V>B?(B=V+I+271,a+='<span class="supermap3d-timeline-ticMain" style="left: '+z.toString()+'px;"></span><span class="supermap3d-timeline-ticLabel" style="left: '+V.toString()+'px;">'+U+"</span>"):a+='<span class="supermap3d-timeline-ticSub" style="left: '+z.toString()+'px;"></span>',e=v(e,w)}}else this._mainTicSpan=-1;a+='<span class="supermap3d-timeline-icon16" style="left:'+r+'px;bottom:0;background-position: 0 0;"></span>',t.innerHTML=a,this._scrubElement=t.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),S.y=0,this._trackList.forEach((function(e){e.render(o._context,S),S.y+=e.height}))},u$3.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;var e=this._scrubElement;if(e$2e(this._scrubElement)){var t=a$15.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==i&&(this._lastXPos=i,e.style.left=i-8+"px",this._needleEle.style.left=i+"px")}e$2e(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(a$15.addSeconds(this._startJulian,this._timelineDrag,new a$15),a$15.addSeconds(this._endJulian,this._timelineDrag,new a$15)))},u$3.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=a$15.addSeconds(this._startJulian,t,new a$15),this._scrubElement){var i=e-8;this._scrubElement.style.left=i.toString()+"px",this._needleEle.style.left=e.toString()+"px"}var n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)},u$3.prototype.resize=function(){var e=this.container.clientWidth,t=this.container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){this._trackContainer.style.height=t+"px";var i=1;this._trackList.forEach((function(e){i+=e.height})),this._trackListEle.style.height=i.toString()+"px",this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=i,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t}},Object.defineProperties(u$2.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},scenePromise:{get:function(){if(e$2e(this._options)&&e$2e(this._options.contextOptions)&&e$2e(this._options.contextOptions.contextType)&&this._options.contextOptions.contextType==Me$j.WebGPU){var e=this;return _0x4cd9cc.CreateAsync(this._canvas,{doNotHandleContextLost:!0,deviceDescriptor:{requiredFeatures:["depth-clamping","depth32float-stencil8","depth24unorm-stencil8","texture-compression-bc","timestamp-query"]}}).then((function(t){return e._options.engine=t,t.compatibilityMode=!1,e._initScene(),console.log("SuperMap - WebGPU Engine"),e._scene})).catch((function(e){console.log("Can not create WebGPU Device and/or context.")}))}return Promise.resolve(this._scene)}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){if(e<=0)throw new t$15("targetFrameRate must be greater than 0, or undefined.");this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&U(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){if(e<=0)throw new t$15("resolutionScale must be greater than 0.");this._resolutionScale=e,this._forceResize=!0}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}},setErrorPanelIsShow:{get:function(){return this._isShowErrorPanel},set:function(e){this._isShowErrorPanel!==e&&(this._isShowErrorPanel=e)}},errorListenerEvent:{get:function(){return this._errorListenerEvent}}}),u$2.prototype._initScene=function(){var e=this._options;try{var t=new w$4({canvas:this._canvas,contextOptions:e.contextOptions,engine:e.engine,creditContainer:this._innerCreditContainer,creditViewport:this._creditViewport,mapProjection:e.mapProjection,orderIndependentTranslucency:e.orderIndependentTranslucency,scene3DOnly:u$Z(e.scene3DOnly,!1),terrainExaggeration:e.terrainExaggeration,shadows:e.shadows,mapMode2D:e.mapMode2D,requestRenderMode:e.requestRenderMode,maximumRenderTimeChange:e.maximumRenderTimeChange,pcss:e.pcss,shadowQuality:u$Z(e.shadowQuality,0)});t.pixelRatio=this._pixelRatio,this._scene=t,t.camera.constrainedAxis=o$1p.UNIT_Z,L$1(this);var i=u$Z(t.mapProjection.ellipsoid,t$12.WGS84),n=e.globe;e$2e(n)||(n=new h$d(i)),!1!==n&&(t.globe=n,t.globe.shadows=u$Z(e.terrainShadows,W$X.RECEIVE_ONLY));var r=e.skyBox;e$2e(r)||(r=new h$5({sources:{positiveX:f("px"),negativeX:f("mx"),positiveY:f("py"),negativeY:f("my"),positiveZ:f("pz"),negativeZ:f("mz")}})),!1!==r&&(t.skyBox=r,t.sun=new u$5,t.moon=new n$9);var o=e.cloudBox;e$2e(o)&&(t.cloudBox=o);var a=e.skyAtmosphere;e$2e(a)||(a=new h$6(i)),!1!==a&&(t.skyAtmosphere=a);var s=!1!==e.globe&&e.imageryProvider;e$2e(s)||(s=new u$f({url:n$17("Assets/Textures/GlobalBkLayer.jpg")})),!1!==s&&t.imageryLayers.addImageryProvider(s),e$2e(e.terrainProvider)&&!1!==e.globe&&(t.terrainProvider=e.terrainProvider,e.terrainProvider.readyPromise.otherwise((function(){t.terrainProvider=t.globe._defaultTerrainProvider}))),e$2e(e.gridProvider)&&t.imageryLayers.addGridProvider(e.gridProvider),this._screenSpaceEventHandler=new g$K(this._canvas,!1),e$2e(e.sceneMode)&&(e.sceneMode===C$14.SCENE2D&&this._scene.morphTo2D(0),e.sceneMode===C$14.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=u$Z(e.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=e.targetFrameRate;var l=this;t.renderError.addEventListener((function(e,t){if(l._useDefaultRenderLoop=!1,l._renderLoopRunning=!1,l._showRenderLoopErrors){l.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,t)}}))}catch(e){if(this._showRenderLoopErrors){this.showErrorPanel("Error constructing Widget.","verify your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:",e)}throw e}},u$2.prototype.showErrorPanel=function(e,t,i){var n=this._element,r=document.createElement("div");r.className="supermap3d-widget-errorPanel",!1===this.setErrorPanelIsShow?r.style.display="none":r.style.display="block";var o=document.createElement("div");o.className="supermap3d-widget-errorPanel-content",r.appendChild(o);var a=document.createElement("div");a.className="cessupermap3dium-widget-errorPanel-header",a.appendChild(document.createTextNode(e)),o.appendChild(a);var s=document.createElement("div");function l(){s.style.maxHeight=Math.max(Math.round(.9*n.clientHeight-100),30)+"px"}if(s.className="supermap3d-widget-errorPanel-scroll",o.appendChild(s),l(),e$2e(window.addEventListener)&&window.addEventListener("resize",l,!1),e$2e(t)){var u=document.createElement("div");u.className="supermap3d-widget-errorPanel-message",u.innerHTML="<p>"+t+"</p>",s.appendChild(u)}var c="(no error details available)";e$2e(i)&&(c=f$T(i));var h=document.createElement("div");h.className="supermap3d-widget-errorPanel-message",h.appendChild(document.createTextNode(c)),s.appendChild(h);var d=document.createElement("div");d.className="supermap3d-widget-errorPanel-buttonPanel",o.appendChild(d);var f=document.createElement("button");f.setAttribute("type","button"),f.className="supermap3d-button",f.appendChild(document.createTextNode("OK")),f.onclick=function(){e$2e(l)&&e$2e(window.removeEventListener)&&window.removeEventListener("resize",l,!1),n.removeChild(r)},d.appendChild(f),n.appendChild(r),typeof console<"u"&&console.error(e+"\n"+t+"\n"+c)},u$2.prototype.isDestroyed=function(){return!1},u$2.prototype.destroy=function(){this._scene=this._scene&&this._scene.destroy(),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),i$11(this)},u$2.prototype.resize=function(){var e=this._canvas,t=e.clientWidth,i=e.clientHeight;!this._forceResize&&this._canvasClientWidth===t&&this._canvasClientHeight===i&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,x(this),L$1(this),this._scene.requestRender())},u$2.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();var e=this._clock.tick();this._scene.render(e)}else this._clock.tick()},Object.defineProperties(a.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){if(!(e instanceof Element))throw new t$15("value must be a valid Element.");this._vrElement=e}},command:{get:function(){return this._command}}}),a.prototype.isDestroyed=function(){return!1},a.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(l$1e.changeEventName,this._callback),i$11(this)};var p="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",h$1="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function r$1(e,t,i){if(!e$2e(e))throw new t$15("container is required.");if(!e$2e(t))throw new t$15("scene is required.");e=i$c(e);var n=new a(t,i);n._exitVRPath=h$1,n._enterVRPath=p;var r=document.createElement("button");r.type="button",r.className="supermap3d-button supermap3d-vrButton",r.setAttribute("data-bind",'css: { "supermap3d-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(r),ce$1.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}Object.defineProperties(r$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),r$1.prototype.isDestroyed=function(){return!1},r$1.prototype.destroy=function(){return this._viewModel.destroy(),ce$1.cleanNode(this._element),this._container.removeChild(this._element),i$11(this)},new o$1o;var l$1="-1000px";function r(e,t,i){if(!e$2e(e))throw new t$15("scene is required.");if(!e$2e(t))throw new t$15("zoomIndicatorElement is required.");if(!e$2e(i))throw new t$15("container is required.");this._scene=e,this._screenPositionX=l$1,this._screenPositionY=l$1,this._tweens=e.tweens,this._container=u$Z(i,document.body),this._zoomIndicatorElement=t,this._scale=1,this._opacity=1,this.position=void 0,this.showSelection=!1,ce$1.track(this,["position","_screenPositionX","_screenPositionY","_opacity","showSelection"]),this.isVisible=void 0,ce$1.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&e$2e(this.position)}}),ce$1.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return s$R.wgs84ToWindowCoordinates(e,t,i)}}function o(e,t){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e),this._container=e;var i=document.createElement("div");i.className="supermap3d-zoom-wrapper",i.setAttribute("data-bind",' style: { "top" : _screenPositionY, "left" : _screenPositionX,"opacity" : _opacity }, css: { "supermap3d-zoom-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var n=document.createElement("img");n.src=n$17("Widgets/Images/ZoomIndicator/zoom_Identifiers.png"),n.style.width="48px",n.style.height="48px",i.appendChild(n);var o=new r(t,this._element,this._container);this._viewModel=o,ce$1.applyBindings(this._viewModel,this._element)}r.prototype.update=function(){var e=this.scene._screenSpaceCameraController;if(e.zoomActive){e.zoomActive=!1;var t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,r=o$1o.clone(e._zoomMouseStart);r.x=Math.min(Math.max(r.x,-48),i+48)-24,r.y=Math.min(Math.max(r.y,-48),n+48)-24,this._screenPositionX=Math.floor(r.x+.25)+"px",this._screenPositionY=Math.floor(r.y+.25)+"px",this._opacity=1,this.showSelection=!0,this.animateDepart()}},r.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:m$Y.EXPONENTIAL_OUT})},r.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_opacity",startValue:this._opacity,stopValue:0,duration:1,easingFunction:m$Y.EXPONENTIAL_OUT})},Object.defineProperties(r.prototype,{container:{get:function(){return this._container}},zoomIndicatorElement:{get:function(){return this._zoomIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(o.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),o.prototype.isDestroyed=function(){return!1},o.prototype.destroy=function(){var e=this._container;return ce$1.cleanNode(this._element),e.removeChild(this._element),i$11(this)};var P=new i$1d;function xe(e){var t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function Le(e,t){if(e$2e(e.scene._frameState)&&e$2e(e.scene._frameState.pickIDColor)&&(e.scene._frameState.pickIDColor=new e$1X(1,1,1,1)),e$2e(e._activeBillboard)){if(e$2e(e._activeBillboard.billboard._billboardsBySymbol))for(var i=e._activeBillboard.billboard._billboardsBySymbol.length,n=0;n<i;n++)e._activeBillboard.billboard._billboardsBySymbol[n].color=e._activeBillboard.originalColor;e._activeBillboard=void 0}return e.scene.pickAsync(t.position).then((i=>{if(i){var n=u$Z(i.id,i.primitive.id);if(n instanceof h$W)return Promise.resolve(n);if(e$2e(i.primitive)){if(e.scene.layers._layerQueue.length>0&&wt(e,t.position),e$2e(i.collection)&&i.collection._isMVT){if(e$2e(i.primitive)&&i.primitive instanceof n$J&&e$2e(i.primitive._billboardsBySymbol))for(var r=0;r<i.primitive._billboardsBySymbol.length;r++)e._activeBillboard={billboard:i.primitive,originalColor:e$1X.clone(i.primitive._billboardsBySymbol[r].color)},i.primitive._billboardsBySymbol[r].color=e$1X.CYAN;var o={pickResult:{featureID:i.primitive._id,layerID:i.primitive._mvtLayerID,mapName:i.primitive._mapName,position:i.primitive._position,primitive:i.primitive,properties:i.primitive._mvtProperties}};return Promise.resolve(o)}for(var a=e.scene._vectorTileSource.values.length-1;a>=0;a--){var s=e.scene._vectorTileSource.values[a];s._MVTStyle.cancelHighLight(s)}return Promise.resolve(i)}}return e$2e(e.scene.globe)?Promise.resolve(Ae(e.scene,t.position)):Promise.resolve(!1)}))}function Ve(e,t,i){if(e$2e(i)){var n=i.clock;e$2e(n)&&(n.getValue(t),e$2e(e)&&(e.updateFromClock(),e.zoomTo(n.startTime,n.stopTime)))}}var Re=new o$1p;function Ae(e,t){var i=null,n=e._frameState;return e.pickPositionAsync(t).then((t=>{if(!e$2e(t))return Promise.resolve(null);for(var r=a$18.fromCartesian(t),o=e._vectorTileSource.values.length-1;o>=0;o--){var a=e._vectorTileSource.values[o];if((!e$2e(a._selectEnabled)||a._selectEnabled)&&e$2e(i=a.pick(r,n)))return i.mapName=a._owner._name,Promise.resolve(new h$W({id:i.featureID,layerID:i.layerID,pickResult:i}))}return Promise.resolve(null)}))}function wt(e,t){var i=e.scene,n=i.layers.pickFeatures(t,i);if(!e$2e(n))return!1;var r=new h$W({id:"Loading...",description:"Loading feature information..."});o$1l(n,(function(i){if(e$2e(i)){var n=i.fieldNames,r=i.fieldValues;if(e$2e(n)&&e$2e(r)){for(var o={},a=0,s=n.length;a<s;a++)o[n[a]]=r[a];var l=new h$W({feature:o});if(e.scene.pickPositionAsync(t).then((e=>{l.scenePos=e})),e$2e(o.position)){var u=e.scene.globe.ellipsoid.cartographicToCartesian(o.position,Re);l.position=new r$V(u)}e$2e(i.geometry)&&(o.geometry=i.geometry),e.selectedEntity=l,e.pickEvent.raiseEvent(o)}else e.selectedEntity=void 0}else e.selectedEntity=void 0}),(function(){e.selectedEntity===r&&(e.selectedEntity=void 0)}))}function Bt(e,t){var i=e._geocoder,n=e._homeButton,r=e._sceneModePicker,o=e._projectionPicker,a=e._baseLayerPicker,s=e._animation,l=e._timeline,u=e._fullscreenButton,c=e._infoBox,h=e._selectionIndicator,d=t?"hidden":"visible";if(e$2e(i)&&(i.container.style.visibility=d),e$2e(n)&&(n.container.style.visibility=d),e$2e(r)&&(r.container.style.visibility=d),e$2e(o)&&(o.container.style.visibility=d),e$2e(a)&&(a.container.style.visibility=d),e$2e(s)&&(s.container.style.visibility=d),e$2e(l)&&(l.container.style.visibility=d),e$2e(u)&&u.viewModel.isFullscreenEnabled&&(u.container.style.visibility=d),e$2e(c)&&(c.container.style.visibility=d),e$2e(h)&&(h.container.style.visibility=d),e._container){var f=t||!e$2e(u)?0:u.container.clientWidth;e._vrButton.container.style.right=f+"px",e.forceResize()}}function u(e,t){if(!e$2e(e))throw new t$15("container is required.");e=i$c(e),this._container=e;var i=(!e$2e((t=u$Z(t,u$Z.EMPTY_OBJECT)).globe)||!1!==t.globe)&&e$2e(t.baseLayerPicker)&&!1!==t.baseLayerPicker;if(!i&&e$2e(t.selectedImageryProviderViewModel))throw new t$15("options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.imageryProvider instead or set options.baseLayerPicker to true.");if(!i&&e$2e(t.selectedTerrainProviderViewModel))throw new t$15("options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.terrainProvider instead or set options.baseLayerPicker to true.");var n=document.createElement("div");n.className="supermap3d-viewer",e.appendChild(n);var r=document.createElement("div");r.className="supermap3d-viewer-WidgetContainer",n.appendChild(r);var o=document.createElement("div");o.className="supermap3d-viewer-bottom",n.appendChild(o),this._bottomContainer=o,this._viewerContainer=n;var a,s=u$Z(t.scene3DOnly,!1);if(e$2e(t.clockViewModel))a=t.clockViewModel.clock;else{var l=new Date;l.setHours(10),new r$a(a=new u$H({currentTime:a$15.fromDate(l)}))}a.shouldAnimate=u$Z(t.shouldAnimate,!1),this._clock=a;var u=new u$2(r,{terrainProvider:t.terrainProvider,imageryProvider:!i&&!e$2e(t.imageryProvider)&&void 0,gridProvider:t.gridProvider,clock:a,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:e$2e(t.creditContainer)?t.creditContainer:o,creditViewport:t.creditViewport,scene3DOnly:s,terrainExaggeration:t.terrainExaggeration,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,cloudBox:t.cloudBox,pcss:t.pcss,shadowQuality:t.shadowQuality});this._Widget=u,this._options=t,(!e$2e(t.contextOptions)||!e$2e(t.contextOptions.contextType)||t.contextOptions.contextType!=Me$j.WebGPU)&&this._initScene(t)}Object.defineProperties(u.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},Widget:{get:function(){return this._Widget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},navigation:{get:function(){return this._navigation}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._Widget.canvas}},cesiumLogo:{get:function(){return this._Widget.cesiumLogo}},scene:{get:function(){return this._Widget.scene}},scenePromise:{get:function(){var e=this;return this._Widget.scenePromise.then((t=>(e$2e(e._options)&&e$2e(e._options.contextOptions)&&e$2e(e._options.contextOptions.contextType)&&e._options.contextOptions.contextType==Me$j.WebGPU&&e._initScene(e._options),Promise.resolve(t))))}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainLayers:{get:function(){return this.scene.terrainLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e;var t=this;e.readyPromise.otherwise((function(){t.scene.terrainProvider=t.scene.globe._defaultTerrainProvider}))}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._Widget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._Widget.targetFrameRate},set:function(e){this._Widget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._Widget.useDefaultRenderLoop},set:function(e){this._Widget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._Widget.resolutionScale},set:function(e){this._Widget.resolutionScale=e,this._forceResize=!0}},useBrowserRecommendedResolution:{get:function(){return this._Widget.useBrowserRecommendedResolution},set:function(e){this._Widget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,ue(this);var t=this.scene,i=t.mode;e$2e(e)&&e$2e(e.position)?this._needTrackedEntityUpdate=!0:(this._needTrackedEntityUpdate=!1,(i===C$14.COLUMBUS_VIEW||i===C$14.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(i===C$14.COLUMBUS_VIEW||i===C$14.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(p$1d.IDENTITY)),this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;var t=e$2e(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;e$2e(e)?e$2e(t)&&t.animateAppear():e$2e(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,Ve(this._timeline,this.clock,e))}}}),u.prototype._initScene=function(e){var i=this,n=this._Widget.scene,r=e.dataSources,a=!1;e$2e(r)||(r=new i$t,a=!0);var s,l=new u$p({scene:n,dataSourceCollection:r}),c=this._clock,h=!1;e$2e(e.clockViewModel)?s=e.clockViewModel:(s=new r$a(c),h=!0);var d=new n$x;d.add(c.onTick,u.prototype._onTick,this),d.add(n.morphStart,u.prototype._clearTrackedObject,this);var f,p,_=this._viewerContainer;if(!e$2e(e.selectionIndicator)||!1!==e.selectionIndicator){var m=document.createElement("div");m.className="supermap3d-viewer-selectionIndicatorContainer",_.appendChild(m),f=new i$1(m,n)}if(!e$2e(e.infoBox)||!1!==e.infoBox){var g=document.createElement("div");g.className="supermap3d-viewer-infoBoxContainer",_.appendChild(g);var x=(p=new l$4(g)).viewModel;d.add(x.cameraClicked,u.prototype._onInfoBoxCameraClicked,this),d.add(x.closeClicked,u.prototype._onInfoBoxClockClicked,this)}var y,v,$=document.createElement("div");if($.className="supermap3d-viewer-toolbar",_.appendChild($),e$2e(e.geocoder)&&!1!==e.geocoder){var b,T=document.createElement("div");T.className="supermap3d-viewer-geocoderContainer",$.appendChild(T),e$2e(e.geocoder)&&"boolean"!=typeof e.geocoder&&(b=Array.isArray(e.geocoder)?e.geocoder:[e.geocoder]),y=new s$3({container:T,geocoderServices:b,scene:n,viewer:this}),d.add(y.viewModel.search.beforeExecute,u.prototype._clearObjects,this)}if(e$2e(e.homeButton)&&!1!==e.homeButton&&(v=new o$3($,n),e$2e(y)&&d.add(v.viewModel.command.afterExecute,(function(){var e=y.viewModel;e.searchText="",e.isSearchInProgress&&e.search()})),d.add(v.viewModel.command.beforeExecute,u.prototype._clearTrackedObject,this)),!0===e.sceneModePicker&&w)throw new t$15("options.sceneModePicker is not available when options.scene3DOnly is set to true.");var C,S,w=u$Z(e.scene3DOnly,!1);!w&&e$2e(e.sceneModePicker)&&!1!==e.sceneModePicker&&(C=new c$2($,n)),e.projectionPicker&&(S=new n$1($,n));var E,P,A,L,M,R,O,D,I,B,F,N,G=(!e$2e(e.globe)||!1!==e.globe)&&e$2e(e.baseLayerPicker)&&!1!==e.baseLayerPicker;if(G){var z=u$Z(e.imageryProviderViewModels,m$4()),U=u$Z(e.terrainProviderViewModels,n$3());E=new g$3($,{globe:n.globe,imageryProviderViewModels:z,selectedImageryProviderViewModel:e.selectedImageryProviderViewModel,terrainProviderViewModels:U,selectedTerrainProviderViewModel:e.selectedTerrainProviderViewModel}),P=$.getElementsByClassName("supermap3d-baseLayerPicker-dropDown")[0]}if(e$2e(e.imageryProvider)&&!1!==e.imageryProvider&&(G&&(E.viewModel.selectedImagery=void 0),n.imageryLayers.removeAll(),n.imageryLayers.addImageryProvider(e.imageryProvider)),e$2e(e.terrainProvider)&&(G&&(E.viewModel.selectedTerrain=void 0),n.terrainProvider=e.terrainProvider),e$2e(e.navigationHelpButton)&&!1!==e.navigationHelpButton){var V=!0;try{if(e$2e(window.localStorage)){var k=window.localStorage.getItem("supermap3d-hasSeenNavHelp");e$2e(k)&&Boolean(k)?V=!1:window.localStorage.setItem("supermap3d-hasSeenNavHelp","true")}}catch{}A=new l$3({container:$,instructionsInitiallyVisible:u$Z(e.navigationInstructionsInitiallyVisible,V)})}if(e$2e(e.animation)&&!1!==e.animation){var W=document.createElement("div");W.className="supermap3d-viewer-animationContainer",_.appendChild(W),L=new y$4(W,new m$5(s))}if(e$2e(e.timeline)&&!1!==e.timeline){var H=document.createElement("div");H.className="supermap3d-viewer-timelineContainer",_.appendChild(H),(M=new u$3(H,c)).addEventListener("settime",xe,!1);var q=a$15.clone(c.startTime);q.secondsOfDay=14400;var j=a$15.clone(c.stopTime);j.secondsOfDay=14400,M.zoomTo(q,j)}if(e$2e(e.fullscreenButton)&&!1!==e.fullscreenButton&&((D=document.createElement("div")).className="supermap3d-viewer-fullscreenContainer",_.appendChild(D),O=c$5((R=new r$5(D,e.fullscreenElement)).viewModel,"isFullscreenEnabled",(function(e){D.style.display=e?"block":"none",e$2e(M)&&(M.container.style.right=D.clientWidth+"px",M.resize())}))),e.vrButton){var X=document.createElement("div");X.className="supermap3d-viewer-vrContainer",_.appendChild(X),B=c$5((I=new r$1(X,n,e.fullScreenElement)).viewModel,"isVREnabled",(function(e){X.style.display=e?"block":"none",e$2e(R)&&(X.style.right=D.clientWidth+"px"),e$2e(M)&&(M.container.style.right=X.clientWidth+"px",M.resize())})),F=c$5(I.viewModel,"isVRMode",(function(e){Bt(i,e)}))}if(!e$2e(e.navigation)||!1!==e.navigation){var Y=document.createElement("div");Y.className="supermap3d-viewer-navigationContainer",_.appendChild(Y),N=new t({container:Y,scene:n,viewer:this})}this._scratchHoldUrl="url("+n$17("Widgets/Images/cur/Hold.cur")+"), auto",this._scratchPanUrl="url("+n$17("Widgets/Images/cur/Pan.cur")+"), auto",this._activeBillboard=void 0,this._baseLayerPickerDropDown=P,this._fullscreenSubscription=O,this._vrSubscription=B,this._vrModeSubscription=F,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=u$Z(e.automaticallyTrackDataSourceClocks,!0),this._element=_,this._selectionIndicator=f,this._infoBox=p,this._dataSourceCollection=r,this._destroyDataSourceCollection=a,this._dataSourceDisplay=l,this._clockViewModel=s,this._destroyClockViewModel=h,this._toolbar=$,this._homeButton=v,this._sceneModePicker=C,this._projectionPicker=S,this._baseLayerPicker=E,this._navigationHelpButton=A,this._animation=L,this._timeline=M,this._fullscreenButton=R,this._vrButton=I,this._geocoder=y,this._navigation=N,this._eventHelper=d,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=e$2e(p)||e$2e(f),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._clockTrackedDataSource=void 0,this._forceResize=!1,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new o$1h,this._trackedEntityChanged=new o$1h,this._capturePointSize=16,this._capturePointColor=e$1X.fromCssColorString("#0173c7"),ce$1.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),d.add(r.dataSourceAdded,u.prototype._onDataSourceAdded,this),d.add(r.dataSourceRemoved,u.prototype._onDataSourceRemoved,this),d.add(n.postUpdate,u.prototype.resize,this),d.add(n.postRender,u.prototype._postRender,this);for(var Z=r.length,K=0;K<Z;K++)this._dataSourceAdded(r,r.get(K));this._dataSourceAdded(void 0,l.defaultDataSource),d.add(r.dataSourceAdded,u.prototype._dataSourceAdded,this),d.add(r.dataSourceRemoved,u.prototype._dataSourceRemoved,this);var Q=this._Widget;Q.screenSpaceEventHandler.setInputAction((function(e){Le(i,e).then((e=>{i.selectedEntity=e}))}),G$J.LEFT_CLICK),Q.screenSpaceEventHandler.setInputAction((function(e){Le(i,e).then((e=>{var t=e;e$2e(t)?r$_.getValueOrUndefined(t.position,i.clock.currentTime)?i.trackedEntity=t:i.zoomTo(t):e$2e(i.trackedEntity)&&(i.trackedEntity=void 0)}))}),G$J.LEFT_DOUBLE_CLICK),this.pickEvent=new o$1h;var J=document.createElement("div");J.className="supermap3d-viewer-zoomIndicatorContainer",_.appendChild(J),this._zoomIndicator=new o(J,Q.scene);var ee=this._zoomIndicator._viewModel;ee._screenPositionX="100px",ee._screenPositionY="100px",ee.position="absolute",ee.showSelection=!1},u.prototype.extend=function(e,t){if(!e$2e(e))throw new t$15("mixin is required.");e(this,t)},u.prototype.resize=function(){var e=this._Widget,t=this._container,i=t.clientWidth,n=t.clientHeight,r=e$2e(this._animation),o=e$2e(this._timeline);if(this._forceResize||i!==this._lastWidth||n!==this._lastHeight){e.resize(),this.scene.context.resize(),this._forceResize=!1;var a=n-125,s=this._baseLayerPickerDropDown;e$2e(s)&&(s.style.maxHeight=a+"px"),e$2e(this._infoBox)&&(this._infoBox.viewModel.maxHeight=a);var l,u=this._timeline,c=0,h=0,d=0;if(r&&"hidden"!==window.getComputedStyle(this._animation.container).visibility){var f=this._lastWidth;l=this._animation.container,i>900?(c=169,f<=900&&(l.style.width="169px",l.style.height="112px",this._animation.resize())):i>=600?(c=136,(f<600||f>900)&&(l.style.width="136px",l.style.height="90px",this._animation.resize())):(c=106,(f>600||0===f)&&(l.style.width="106px",l.style.height="70px",this._animation.resize())),h=c+5}if(o&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility){var p=this._fullscreenButton,_=this._vrButton,m=u.container,g=m.style;d=m.clientHeight+3,g.left=c+"px";var x=0;e$2e(p)&&(x+=p.container.clientWidth),e$2e(_)&&(x+=_.container.clientWidth),g.right=x+"px",u.resize()}this._bottomContainer.style.left=h+"px",this._bottomContainer.style.bottom=d+"px",this._lastWidth=i,this._lastHeight=n}},u.prototype.forceResize=function(){this._lastWidth=0,this.resize()},u.prototype.render=function(){this._Widget.render()},u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){var e;this.screenSpaceEventHandler.removeInputAction(G$J.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(G$J.LEFT_DOUBLE_CLICK);var t=this.dataSources,i=t.length;for(e=0;e<i;e++)this._dataSourceRemoved(t,t.get(e));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),e$2e(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),e$2e(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),e$2e(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),e$2e(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),e$2e(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),e$2e(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),e$2e(this._timeline)&&(this._timeline.removeEventListener("settime",xe,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),e$2e(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),e$2e(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),e$2e(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),e$2e(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._Widget=this._Widget.destroy(),this._destroyDataSourceCollection&&!this._dataSourceCollection.isDestroyed()&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),i$11(this)},u.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(u.prototype._onEntityCollectionChanged,this)},u.prototype._dataSourceRemoved=function(e,t){var i=t.entities;i.collectionChanged.removeEventListener(u.prototype._onEntityCollectionChanged,this),e$2e(this.trackedEntity)&&i.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),e$2e(this.selectedEntity)&&i.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};var Q=!1,H,ze=0;function He(e,t,i,n){if(!e$2e(t))throw new t$15("zoomTarget is required.");ue(e);var r=o$1l.defer();return e._zoomPromise=r,e._zoomIsFlight=n,e._zoomOptions=i,o$1l(t,(function(t){if(e._zoomPromise===r){if(t instanceof h$R)return void t.getViewableRectangle().then((function(t){return a$d(t,e.scene)})).then((function(t){e._zoomPromise===r&&(e._zoomTarget=t)}));if(t instanceof p$u)return void(e._zoomTarget=t);if(t instanceof g$7)return void(e._zoomTarget=t);if(t.isLoading&&e$2e(t.loadingEvent)){var i=t.loadingEvent.addEventListener((function(){i(),e._zoomPromise===r&&(e._zoomTarget=t.entities.values.slice(0))}));return}if(Array.isArray(t))return void(e._zoomTarget=t.slice(0));if(t instanceof _0x1a71e8)return void(e._zoomTarget=t.layerBounds);if(t instanceof p$b)return void t.getViewableRectangle().then((function(t){return a$d(t,e.scene)})).then((function(t){e._zoomPromise===r&&(e._zoomTarget=t)}));e$2e((t=u$Z(t.values,t)).entities)&&(t=t.entities.values),Array.isArray(t)?e._zoomTarget=t.slice(0):e._zoomTarget=[t]}})),e.scene.requestRender(),r.promise}function T(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function ue(e){var t=e._zoomPromise;e$2e(t)&&(T(e),t.resolve(!1))}function It(e){var t=e._zoomTarget;if(e$2e(t)&&e.scene.mode!==C$14.MORPHING){var i=e.scene,n=i.camera,r=e._zoomPromise,o=u$Z(e._zoomOptions,{});if(t instanceof p$u)return t.readyPromise.then((function(){var i=t.boundingSphere;e$2e(o.offset)||(o.offset=new a$T(0,-.5,i.radius)),s={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(t.boundingSphere,s):(n.viewBoundingSphere(i,o.offset),n.lookAtTransform(p$1d.IDENTITY),r.resolve(!0)),T(e)}));if(t instanceof g$7)return t.readyPromise.then((function(){var i=t.boundingSphere;e$2e(o.offset)||(o.offset=new a$T(0,-.5,i.radius)),s={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(i,s):(n.viewBoundingSphere(i,o.offset),n.lookAtTransform(p$1d.IDENTITY),r.resolve(!0)),T(e)}));if(t instanceof a$18)return s={destination:i.mapProjection.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}},e._zoomIsFlight?n.flyTo(s):(n.setView(s),r.resolve(!0)),void T(e);var a=t;if(a instanceof h$18){var s={offset:o.offset,destination:a,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)}};if(e._zoomIsFlight){var l=i$1d.fromRectangle3D(t);n.flyToBoundingSphere(l,s)}else n.setView(s),r.resolve(!0);return void T(e)}for(var u=[],c=0,h=a.length;c<h;c++){var d=e._dataSourceDisplay.getBoundingSphere(a[c],!1,P);if(d===R$w.PENDING)return;d!==R$w.FAILED&&u.push(i$1d.clone(P))}if(0===u.length)return void ue(e);e.trackedEntity=void 0,l=i$1d.fromBoundingSpheres(u),e._zoomIsFlight?(T(e),n.flyToBoundingSphere(l,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){r.resolve(!0)},cancel:function(){r.resolve(!1)},offset:o.offset})):(n.viewBoundingSphere(l,o.offset),n.lookAtTransform(p$1d.IDENTITY),T(e),r.resolve(!0))}}function Dt(e){if(e._needTrackedEntityUpdate){var t=e._trackedEntity,i=e.clock.currentTime;if(e$2e(r$_.getValueOrUndefined(t.position,i))){var n=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,P);if(r!==R$w.PENDING){var o=n.mode;(o===C$14.COLUMBUS_VIEW||o===C$14.SCENE2D)&&(n.screenSpaceCameraController.enableTranslate=!1),(o===C$14.COLUMBUS_VIEW||o===C$14.SCENE3D)&&(n.screenSpaceCameraController.enableTilt=!1);var a=r!==R$w.FAILED?P:void 0;e._entityView=new V$l(t,n,n.mapProjection.ellipsoid),e._entityView.update(i,a),e._needTrackedEntityUpdate=!1}}}}function s(e){o$1q.typeOf.object("viewer",e);var t=document.createElement("div");t.className="supermap3d-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);var i=new y$1(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return i}}})}function c(e){if(!e$2e(e))throw new t$15("viewer is required.");var t=document.createElement("div");t.className="supermap3d-viewer-cesiumInspectorContainer",e.container.appendChild(t);var i=new g$1(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return i}}})}function $$1(e,t){if(!e$2e(e))throw new t$15("viewer is required.");if(e.hasOwnProperty("dropTarget"))throw new t$15("dropTarget is already defined by another mixin.");if(e.hasOwnProperty("dropEnabled"))throw new t$15("dropEnabled is already defined by another mixin.");if(e.hasOwnProperty("dropError"))throw new t$15("dropError is already defined by another mixin.");if(e.hasOwnProperty("clearOnDrop"))throw new t$15("clearOnDrop is already defined by another mixin.");if(e.hasOwnProperty("flyToOnDrop"))throw new t$15("flyToOnDrop is already defined by another mixin.");t=u$Z(t,u$Z.EMPTY_OBJECT);var i=!0,n=u$Z(t.flyToOnDrop,!0),r=new o$1h,o=u$Z(t.clearOnDrop,!0),a=u$Z(t.dropTarget,e.container),s=u$Z(t.clampToGround,!0),l=t.proxy;function u(t){d$1(t),o&&(e.entities.removeAll(),e.dataSources.removeAll());for(var i=t.dataTransfer.files,n=i.length,r=0;r<n;r++){var a=i[r],u=new FileReader;u.onload=j$1(e,a,l,s),u.onerror=k(e,a),u.readAsText(a)}}a=i$c(a),Object.defineProperties(e,{dropTarget:{get:function(){return a},set:function(e){if(!e$2e(e))throw new t$15("value is required.");O(a,u),h(a=e,u)}},dropEnabled:{get:function(){return i},set:function(e){e!==i&&(e?h(a,u):O(a,u),i=e)}},dropError:{get:function(){return r}},clearOnDrop:{get:function(){return o},set:function(e){o=e}},flyToOnDrop:{get:function(){return n},set:function(e){n=e}},proxy:{get:function(){return l},set:function(e){l=e}},clampToGround:{get:function(){return s},set:function(e){s=e}}}),h(a,u),e.destroy=e$P(e,e.destroy,(function(){e.dropEnabled=!1})),e._handleDrop=u}function d$1(e){e.stopPropagation(),e.preventDefault()}function O(e,t){var i=e;e$2e(i)&&(i.removeEventListener("drop",t,!1),i.removeEventListener("dragenter",d$1,!1),i.removeEventListener("dragover",d$1,!1),i.removeEventListener("dragexit",d$1,!1))}function h(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",d$1,!1),e.addEventListener("dragover",d$1,!1),e.addEventListener("dragexit",d$1,!1)}function j$1(e,t,i,n){var r=e.scene;return function(o){var a=t.name;try{var s;if(/\.czml$/i.test(a))s=E$w.load(JSON.parse(o.target.result),{sourceUri:a});else if(/\.geojson$/i.test(a)||/\.json$/i.test(a)||/\.topojson$/i.test(a))s=y$p.load(JSON.parse(o.target.result),{sourceUri:a,clampToGround:n});else{if(!/\.(kml|kmz)$/i.test(a))return void e.dropError.raiseEvent(e,a,"Unrecognized file: "+a);s=U$n.load(t,{sourceUri:a,proxy:i,camera:r.camera,canvas:r.canvas,clampToGround:n})}e$2e(s)&&e.dataSources.add(s).then((function(t){e.flyToOnDrop&&e.flyTo(t)})).otherwise((function(t){e.dropError.raiseEvent(e,a,t)}))}catch(t){e.dropError.raiseEvent(e,a,t)}}}function k(e,t){return function(i){e.dropError.raiseEvent(e,t.name,i.target.error)}}function m(e,t){if(!e$2e(e))throw new t$15("viewer is required.");t=u$Z(t,u$Z.EMPTY_OBJECT);var i=new i$3({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return i}}})}u.prototype._onTick=function(e){var t=e.currentTime,i=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=i);var n=this._entityView;if(e$2e(n)){var r=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(r,!1,P)===R$w.DONE&&n.update(t,P)}var o,a=!1,s=this.selectedEntity,l=e$2e(s)&&this._enableInfoOrSelection,u=this.customInfobox;if(e$2e(u))if(this._enableInfoOrSelection=!1,e$2e(s)&&e$2e(s.scenePos)){var c=this.scene.canvas.height,h=s.scenePos,d=new o$1o;s$R.wgs84ToWindowCoordinates(this.scene,h,d),u.style.bottom=c-d.y+45+"px",u.style.left=d.x-70+"px",u.style.visibility="visible"}else u.style.visibility="hidden";(l=e$2e(s)&&this._enableInfoOrSelection)&&s.isShowing&&s.isAvailable(t)&&(this._dataSourceDisplay.getBoundingSphere(s,!0,P)!==R$w.FAILED?o=P.center:e$2e(s.position)&&(o=s.position.getValue(t,o)),a=e$2e(o));var f=e$2e(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;e$2e(f)&&(f.position=o$1p.clone(o,f.position),f.showSelection=l&&a,f.update());var p=e$2e(this._infoBox)?this._infoBox.viewModel:void 0;e$2e(p)&&(p.showInfo=l,p.enableCamera=a,p.isCameraTracking=this.trackedEntity===this.selectedEntity,l?(p.titleText=u$Z(s.name,s.id),p.description=r$_.getValueOrDefault(s.description,t,"")):(p.titleText="",p.description="")),this._zoomIndicator._viewModel.update();var _=this.scene._screenSpaceCameraController,m=_.tiltEventTypes,x=_._aggregator._isDown;(x[m[0]]&&3==this.scene.mode?(e$2e(this._tiltIndicator)?this._tiltIndicator.setModelMatrix(this.scene.frameState,_._tiltCenter):(this._tiltIndicator=new g(this,this.scene.context,n$17("Widgets/Images/compass.s3m"),_._tiltCenter),this.scene.primitives.add(this._tiltIndicator)),this._tiltIndicator._visible=!0):e$2e(this._tiltIndicator)&&(this._tiltIndicator._visible=!1),e$2e(this.enableCursorStyle)&&0==this.enableCursorStyle)||(""==this._element.style.cursor&&(this._element.style.cursor=this._scratchPanUrl),x[_.rotateEventTypes]?Q||(Q=!0,this._element.style.cursor=this._scratchHoldUrl):Q&&(Q=!1,this._element.style.cursor=this._scratchPanUrl));if(_._scene.pickPointEnabled){e$2e(this.pointCloudIndicator)||(this.pointCloudIndicator=this.entities.add({id:"pont-cloud-indicator",position:new n$X((function(){return _._scene.pickPoint}),!1),point:{pixelSize:this._capturePointSize,color:this._capturePointColor,disableDepthTestDistance:Number.POSITIVE_INFINITY}})),this.pointCloudIndicator.show=!0;var y=_._aggregator;e$2e(H)||(H=o$1o.clone(y.currentMousePosition));var v=Et$c();if(v-ze>_._scene.pickPointInterval){ze=v;var $=o$1o.clone(y.currentMousePosition),b=$.x-H.x,T=$.y-H.y,C=Math.sqrt(b*b+T*T);H=o$1o.clone(y.currentMousePosition),C>5&&_._scene.pointPick($)}}else e$2e(this.pointCloudIndicator)&&(this.pointCloudIndicator.show=!1)},u.prototype._onEntityCollectionChanged=function(e,t,i){for(var n=i.length,r=0;r<n;r++){var o=i[r];this.trackedEntity===o&&(this.trackedEntity=void 0),this.selectedEntity===o&&(this.selectedEntity=void 0)}},u.prototype._onInfoBoxCameraClicked=function(e){e.isCameraTracking&&this.trackedEntity===this.selectedEntity?this.trackedEntity=void 0:e$2e(this.selectedEntity.position)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)},u.prototype._clearTrackedObject=function(){this.trackedEntity=void 0},u.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0},u.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0},u.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Ve(this.timeline,this.clock,e)},u.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);var i=t.entities.id,n=this._eventHelper.add(t.changedEvent,u.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[i]=n},u.prototype._onDataSourceRemoved=function(e,t){var i=this.clockTrackedDataSource===t,n=t.entities.id;if(this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0,i){var r=e.length;this._automaticallyTrackDataSourceClocks&&r>0?this.clockTrackedDataSource=e.get(r-1):this.clockTrackedDataSource=void 0}},u.prototype.zoomTo=function(e,t){return He(this,e,{offset:t},!1)},u.prototype.flyTo=function(e,t){return He(this,e,t,!0)},u.prototype._postRender=function(){It(this),Dt(this)};const _0x47df05=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5df888=_0x47df05(void 0,(function(){return _0x5df888.toString().search("(((.+)+)+)+$").toString().constructor(_0x5df888).search("(((.+)+)+)+$")}));_0x5df888();var _0x264886,_0x11c773=[],_0x29ef83=.1,_0x4e9110,_0x1c230e,_0x2e5895="Selection_Cube";function _0x558853(e){this._scene=e,_0x264886=new WebGLPlot.ScreenSpaceEventHandler(e.canvas)}function _0x1b213c(e,t){let i=[];if(e&&e.plotLayers){let t=e.plotLayers._layerQueue.length;for(let n=0;n<t;n++){let t=e.plotLayers._layerQueue[n];if(WebGLPlot.defined(t)&&t instanceof _0x394df6){let e=t._geoGraphicObjects.length;for(let n=0;n<e;n++){let e=t._geoGraphicObjects[n];_0x516ab4(e)&&i.push(e)}}}}"function"==typeof t&&t({geoArray:i})}function _0x516ab4(e){let t=_0x11c773[0].x>_0x11c773[1].x?_0x11c773[0].x:_0x11c773[1].x,i=_0x11c773[0].y>_0x11c773[1].y?_0x11c773[0].y:_0x11c773[1].y,n=_0x11c773[0].z>_0x29ef83?_0x11c773[0].z:_0x29ef83,r=_0x11c773[0].x<_0x11c773[1].x?_0x11c773[0].x:_0x11c773[1].x,o=_0x11c773[0].y<_0x11c773[1].y?_0x11c773[0].y:_0x11c773[1].y,a=_0x11c773[0].z<_0x29ef83?_0x11c773[0].z:_0x29ef83,s=e.localPoints.length;for(let l=0;l<s;l++){let s=e.localPoints[l];if(s.x>r&&s.x<t&&s.y>o&&s.y<i&&s.z>a&&s.z<n)return!0}return!1}function _0x3e423a(e,t){_0x264886.setInputAction((function(i){var n=_0x2909c1.getPosition(e._scene,i.position);if(n){if(_0x11c773.length>=3)return _0x1c230e=i.position,_0x596e87(),_0x1b213c(e._scene,t),void e.deActivate();2===_0x11c773.length&&(_0x11c773[_0x11c773.length-1]=n,_0x4e9110=i.position),0===_0x11c773.length&&_0x11c773.push(n),_0x11c773.push(n),_0x11c773.length>=2&&_0x596e87()}}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x264886.setInputAction((function(t){var i=_0x2909c1.getPosition(e._scene,t.endPosition);_0x11c773.length>=2&&(_0x11c773.pop(),_0x11c773.push(i),_0x11c773.length>=3&&(_0x1c230e=t.endPosition),_0x596e87(e._scene))}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE)}function _0x596e87(e){if(!e||_0x11c773.length<2||_0x11c773[0].x===_0x11c773[1].x&&_0x11c773[0].y===_0x11c773[1].y)return;var t=WebGLPlot.Cartesian3.fromDegrees(_0x11c773[0].x,_0x11c773[0].y,_0x11c773[0].z),i=[t,WebGLPlot.Cartesian3.fromDegrees(_0x11c773[1].x,_0x11c773[0].y,_0x11c773[0].z),WebGLPlot.Cartesian3.fromDegrees(_0x11c773[1].x,_0x11c773[1].y,_0x11c773[0].z),WebGLPlot.Cartesian3.fromDegrees(_0x11c773[0].x,_0x11c773[1].y,_0x11c773[0].z),t];if(_0x4e9110&&_0x1c230e){let t=e.camera;var n=t.getPickRay(_0x4e9110),r=new WebGLPlot.Cartesian2(_0x4e9110.x+1,_0x4e9110.y),o=t.getPickRay(r),a=e.globe.pick(n,e),s=e.globe.pick(o,e);let i=WebGLPlot.Cartesian3.distance(a,s);_0x29ef83=(_0x4e9110.y-_0x1c230e.y)*i}const l=new WebGLPlot.PolygonGeometry({polygonHierarchy:new WebGLPlot.PolygonHierarchy(i),perPositionHeight:!0,closeTop:!0,closeBottom:!0,extrudedHeight:_0x29ef83}),u=WebGLPlot.PolygonGeometry.createGeometry(l);var c=new WebGLPlot.GeometryInstance({geometry:u,attributes:{color:WebGLPlot.ColorGeometryInstanceAttribute.fromColor(new WebGLPlot.Color(1,0,0,.2))}});_0x4786d3.setScaneInstances(_0x2e5895,[c],this._scene)}WebGLPlot.g_CubeHandler=null,_0x558853.getInstance=function(e){return WebGLPlot.defined(e)&&(!WebGLPlot.g_CubeHandler||WebGLPlot.g_CubeHandler._scene!==e)&&(WebGLPlot.g_CubeHandler=new _0x558853(e)),WebGLPlot.g_CubeHandler},_0x558853.prototype.activate=function(e){_0x11c773=[],_0x3e423a(this,e)},_0x558853.prototype.deActivate=function(){_0x11c773=[],_0x264886&&(_0x264886.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x264886.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE)),_0x29ef83=.1,_0x4e9110=void 0,_0x1c230e=void 0,_0x4786d3.setScaneInstances(_0x2e5895,[],this._scene)};const _0x48f8ca=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x33fcd4=_0x48f8ca(void 0,(function(){return _0x33fcd4.toString().search("(((.+)+)+)+$").toString().constructor(_0x33fcd4).search("(((.+)+)+)+$")}));_0x33fcd4();let _0x4244c8,_0x3cb87f,_0x122435=!1,_0x3b9953,_0x38423e=[],_0xa1956e;function _0x81479b(e,t){this.dom=e,this.viewer=t,_0x3cb87f=this,_0x3b9953=new WebGLPlot.ScreenSpaceEventHandler(e),_0xa1956e=new _0x2b172d(e),this.isDestroyed=!1,this.activeEvt=new WebGLPlot.Event,this.cancelEvt=new WebGLPlot.Event,this.movingEvt=new WebGLPlot.Event,this.drawEvt=new WebGLPlot.Event}function _0x2b172d(e){this.rect=document.createElement("div"),this.rect.style.visibility="hidden",e.appendChild(this.rect),this.leftTopPoint=new WebGLPlot.Cartesian2,this.rightBottomPoint=new WebGLPlot.Cartesian2,_0x2b172d.prototype.setPosition=function(e,t){let i,n,r,o,a=t.x-e.x,s=t.y-e.y;a<0?(i=t.x,r=-a):(i=e.x,r=a),s<0?(n=t.y,o=-s):(n=e.y,o=s),this.leftTopPoint=new WebGLPlot.Cartesian2(i,n),this.rightBottomPoint=new WebGLPlot.Cartesian2(i+r,n+o),this.rect.style="position:fixed;top:"+n+"px;left:"+i+"px;width:"+r+"px;height:"+o+"px;border:2px dashed #333;",this.setVisible(!0)},_0x2b172d.prototype.setVisible=function(e){this.rect.style.visibility=e?"visible":"hidden"},_0x2b172d.prototype.getRectPoint=function(){return{leftTopPoint:this.leftTopPoint,rightBottomPoint:this.rightBottomPoint}},_0x2b172d.prototype.destroy=function(){e.removeChild(_0xa1956e),this.rect=null}}function _0x6916c0(e,t){let i=t.screenSpaceCameraController;i.enableRotate=e,i.enableTranslate=e,i.enableZoom=e,i.enableTilt=e,i.enableLook=e}function _0xf5f99b(e,t,i){t?(i.enableCursorStyle=!1,i._element.style.cursor="",e.style.cursor="default"):i.enableCursorStyle=!0}function _0x2044f9(){_0x3b9953.setInputAction((function(e){_0x122435=!0,_0x4244c8=new WebGLPlot.Cartesian2(e.position.x,e.position.y)}),WebGLPlot.ScreenSpaceEventType.LEFT_DOWN);let e=function(e){_0x3cb87f.cancelEvt.raiseEvent(),"Shift"===e.key&&_0x122435&&!_0x3cb87f.isDestroyed&&(_0x122435=!1,_0xa1956e.setVisible(!1))};document.addEventListener("keyup",e),_0x38423e.push((function(){document.removeEventListener("keyup",e)})),_0x3b9953.setInputAction((function(e){let t=e.endPosition;_0x3cb87f.activeEvt.raiseEvent(t),_0x122435&&(_0xa1956e.setPosition(_0x4244c8,t),_0xa1956e.setVisible(!0),_0x3cb87f.movingEvt.raiseEvent(_0xa1956e.getRectPoint()))}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),_0x3b9953.setInputAction((function(e){_0x122435=!1,_0xa1956e.setVisible(!1),_0x3cb87f.drawEvt.raiseEvent(_0xa1956e.getRectPoint())}),WebGLPlot.ScreenSpaceEventType.LEFT_UP)}function _0x2c6799(){_0x3b9953.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_DOWN),_0x3b9953.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),_0x3b9953.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP),_0x3b9953.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_UP)}_0x81479b.prototype.destroy=function(){if(!this.isDestroyed){_0x6916c0(!0,this.viewer.scene),_0x2c6799();for(let e=0,t=_0x38423e.length;e<t;e++)_0x38423e[e]();_0x3b9953.destroy(),_0xa1956e.destroy(),_0xa1956e=null,this.isDestroyed=!0}},_0x81479b.prototype.activate=function(){this.isDestroyed||(_0x6916c0(!1,this.viewer.scene),_0xf5f99b(this.dom,!0,this.viewer),_0x2044f9())},_0x81479b.prototype.deactivate=function(){this.isDestroyed||(_0x6916c0(!0,this.viewer.scene),_0xf5f99b(this.dom,!1,this.viewer),_0x2c6799())};var _0x3994ba=(_0x1ea0c7=!0,function(e,t){var i=_0x1ea0c7?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1ea0c7=!1,i}),_0x58c0d3=_0x3994ba(void 0,(function(){return _0x58c0d3.toString().search("(((.+)+)+)+$").toString().constructor(_0x58c0d3).search("(((.+)+)+)+$")})),_0x1ea0c7;_0x58c0d3();var _0xd5c6ca={GEOJSON:"GEOJSON",ISERVER:"ISERVER"};class NetworkAnalystServiceBase extends _0x5958f9{constructor(e,t){super(e,t),this.format=_0xd5c6ca.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t,i=this;(e=_0x278499.transformResult(e))&&i.format===_0xd5c6ca.GEOJSON&&"function"==typeof i.toGeoJSONResult&&(t=i.toGeoJSONResult(e)),t||(t=e),i.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){return null}}function _0x2e06c5(){}_0x2e06c5.extend=function(e,t){if(e=e||{},t){for(var i in t){var n=t[i];void 0!==n&&(e[i]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},_0x2e06c5.copy=function(e,t){var i;if(e=e||{},t)for(var n in e)typeof(i=t[n])<"u"&&(e[n]=i)},_0x2e06c5.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"===_typeof(e[t])&&e[t]instanceof Array){for(var i in e[t])e[t][i].destroy&&e[t][i].destroy();e[t].length=0}else"object"===_typeof(e[t])&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},_0x2e06c5.getElement=function(){for(var e=[],t=0,i=arguments.length;t<i;t++){var n=arguments[t];if("string"==typeof n&&(n=document.getElementById(n)),1===arguments.length)return n;e.push(n)}return e},_0x2e06c5.isElement=function(e){return!(!e||1!==e.nodeType)},_0x2e06c5.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},_0x2e06c5.removeItem=function(e,t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1);return e},_0x2e06c5.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},_0x2e06c5.modifyDOMElement=function(e,t,i,n,r,o,a,s){t&&(e.id=t),i&&(e.style.left=i.x+"px",e.style.top=i.y+"px"),n&&(e.style.width=n.w+"px",e.style.height=n.h+"px"),r&&(e.style.position=r),o&&(e.style.border=o),a&&(e.style.overflow=a),parseFloat(s)>=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},_0x2e06c5.applyDefaults=function(e,t){e=e||{};var i="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!i&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!i&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},_0x2e06c5.getParameterString=function(e){var t=[];for(var i in e){var n,r=e[i];if(null!=r&&"function"!=typeof r)n=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(i)+"="+n)}return t.join("&")},_0x2e06c5.urlAppend=function(e,t){var i=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);i+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return i},_0x2e06c5.urlPathAppend=function(e,t){var i=e;if(!t)return i;0===t.indexOf("/")&&(t=t.substring(1));var n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),i="".concat(n[0]).concat(t).concat(n.length>1?"?".concat(n[1]):"")},_0x2e06c5.DEFAULT_PRECISION=14,_0x2e06c5.toFloat=function(e,t){return null==t&&(t=_0x2e06c5.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},_0x2e06c5.rad=function(e){return e*Math.PI/180},_0x2e06c5.getParameters=function(e){e=e??window.location.href;var t="";if(StringExt.contains(e,"?")){var i=e.indexOf("?")+1,n=StringExt.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(i,n)}for(var r={},o=t.split(/[&;]/),a=0,s=o.length;a<s;++a){var l=o[a].split("=");if(l[0]){var u=l[0];try{u=decodeURIComponent(u)}catch{u=unescape(u)}var c=(l[1]||"").replace(/\+/g," ");try{c=decodeURIComponent(c)}catch{c=unescape(c)}1==(c=c.split(",")).length&&(c=c[0]),r[u]=c}}return r},_0x2e06c5.lastSeqID=0,_0x2e06c5.createUniqueID=function(e){return null==e&&(e="id_"),_0x2e06c5.lastSeqID+=1,e+_0x2e06c5.lastSeqID},_0x2e06c5.normalizeScale=function(e){return e>1?1/e:e},_0x2e06c5.getResolutionFromScale=function(e,t){var i;e&&(null==t&&(t="degrees"),i=1/(_0x2e06c5.normalizeScale(e)*_0x30af6f[t]*_0x108625));return i},_0x2e06c5.getScaleFromResolution=function(e,t){return null==t&&(t="degrees"),e*_0x30af6f[t]*_0x108625},_0x2e06c5.getBrowser=function(){return _0x4f2d9b},_0x2e06c5.isSupportCanvas=_0x1c0f3b,_0x2e06c5.supportCanvas=function(){return _0x2e06c5.isSupportCanvas},_0x2e06c5.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),n=i.indexOf("//");if(-1===t)return!0;var r,o=r=e.substring(0,t),a=i.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==o.toLowerCase())return!1;var c=(o=e.substring(t+2)).indexOf(":");t=o.indexOf("/");var h,d=o.substring(0,t);return-1!==c?h=o.substring(0,c):(h=o.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),h===document.domain&&d===l},_0x2e06c5.calculateDpi=function(e,t,i,n,r){if(e&&t&&i){var o,a=1e4,s=e.getWidth(),l=e.getHeight(),u=t.w,c=t.h;if(r=r||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){var h=s/u,d=l/c;o=254/(h>d?h:d)/i/(2*Math.PI*r/360)/a}else{o=254/(s/u)/i/a}return o}},_0x2e06c5.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var i="",n=0,r=t.length;n<r;n++)i+=_0x2e06c5.toJSON(t[n]),n!==t.length-1&&(i+=",");return"["+i+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"===_typeof(t)){if(t.length){for(var o=[],a=0,s=t.length;a<s;a++)o.push(_0x2e06c5.toJSON(t[a]));return"["+o.join(",")+"]"}var l=[];for(var u in t)"function"!=typeof t[u]&&"CLASS_NAME"!==u&&"parent"!==u&&l.push("'"+u+"':"+_0x2e06c5.toJSON(t[u]));return l.length>0?"{"+l.join(",")+"}":"{}"}return t.toString()}},_0x2e06c5.getResolutionFromScaleDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?(e=_0x2e06c5.normalizeScale(e),"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r):-1},_0x2e06c5.getScaleFromResolutionDpi=function(e,t,i,n){var r=1e4;return n=n||6378137,i=i||"",e>0&&t>0?"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*n/360)/r:254/t/e/r:-1},_0x2e06c5.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},_0x2e06c5.copyAttributes=function(e,t){if(e=e||{},t)for(var i in t){var n=t[i];void 0!==n&&"CLASS_NAME"!==i&&"function"!=typeof n&&(e[i]=n)}return e},_0x2e06c5.copyAttributesWithClip=function(e,t,i){if(e=e||{},t)for(var n in t){var r=!1;if(i&&i.length)for(var o=0,a=i.length;o<a;o++)if(n===i[o]){r=!0;break}if(!0!==r){var s=t[n];void 0!==s&&"CLASS_NAME"!==n&&"function"!=typeof s&&(e[n]=s)}}return e},_0x2e06c5.cloneObject=function(e){if(null===e||"object"!==_typeof(e))return e;if(e instanceof Date){var t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.slice(0);if(e instanceof Object){var i={};for(var n in e)e.hasOwnProperty(n)&&(i[n]=_0x2e06c5.cloneObject(e[n]));return i}throw new Error("Unable to copy obj! Its type isn't supported.")},_0x2e06c5.lineIntersection=function(e,t,i,n){var r,o,a=null,s=(n.x-i.x)*(e.y-i.y)-(n.y-i.y)*(e.x-i.x),l=(t.x-e.x)*(e.y-i.y)-(t.y-e.y)*(e.x-i.x),u=(n.y-i.y)*(t.x-e.x)-(n.x-i.x)*(t.y-e.y);if(0!=u)o=l/u,a=(r=s/u)>=0&&o<=1&&r<=1&&o>=0?new Geometry.Point(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y)):"No Intersection";else if(0==s&&0==l){var c=Math.max(e.y,t.y),h=Math.min(e.y,t.y),d=Math.max(e.x,t.x),f=Math.min(e.x,t.x);a=(i.y>=h&&i.y<=c||n.y>=h&&n.y<=c)&&i.x>=f&&i.x<=d||n.x>=f&&n.x<=d?"Coincident":"Parallel"}else a="Parallel";return a},_0x2e06c5.getTextBounds=function(e,t,i){document.body.appendChild(i),i.style.width="auto",i.style.height="auto",e.fontSize&&(i.style.fontSize=e.fontSize),e.fontFamily&&(i.style.fontFamily=e.fontFamily),e.fontWeight&&(i.style.fontWeight=e.fontWeight),i.style.position="relative",i.style.visibility="hidden",i.style.display="inline-block",i.innerHTML=t;var n=i.clientWidth,r=i.clientHeight;return document.body.removeChild(i),{textWidth:n,textHeight:r}},_0x2e06c5.convertPath=function(e,t){return t?e.replace(/\{([\w-\.]+)\}/g,(function(e,i){var n;return n=t.hasOwnProperty(i)?paramToString(t[i]):e,encodeURIComponent(n)})):e};var _0x108625=96,_0x30af6f={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};_0x30af6f.in=_0x30af6f.inches,_0x30af6f.degrees=_0x30af6f.dd,_0x30af6f.nmi=1852*_0x30af6f.m;var _0x4f2d9b=function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));i();var n,r="",o="",a="pc",s=navigator.userAgent.toLowerCase();return s.indexOf("msie")>-1||s.indexOf("trident")>-1&&s.indexOf("rv")>-1?(r="msie",n=s.match(/msie ([\d.]+)/)||s.match(/rv:([\d.]+)/)):s.indexOf("chrome")>-1?(r="chrome",n=s.match(/chrome\/([\d.]+)/)):s.indexOf("firefox")>-1?(r="firefox",n=s.match(/firefox\/([\d.]+)/)):s.indexOf("opera")>-1?(r="opera",n=s.match(/version\/([\d.]+)/)):s.indexOf("safari")>-1&&(r="safari",n=s.match(/version\/([\d.]+)/)),o=n?n[1]:"",s.indexOf("ipad")>-1||s.indexOf("ipod")>-1||s.indexOf("iphone")>-1?a="apple":s.indexOf("android")>-1&&(o=(n=s.match(/version\/([\d.]+)/))?n[1]:"",a="android"),{name:r,version:o,device:a}}(),_0x1c0f3b=(_0x46ab38=!0,_0x493857=_0x4f2d9b,document.createElement("canvas").getContext?("firefox"===_0x493857.name&&parseFloat(_0x493857.version)<5&&(_0x46ab38=!1),"safari"===_0x493857.name&&parseFloat(_0x493857.version)<4&&(_0x46ab38=!1),"opera"===_0x493857.name&&parseFloat(_0x493857.version)<10&&(_0x46ab38=!1),"msie"===_0x493857.name&&parseFloat(_0x493857.version)<9&&(_0x46ab38=!1)):_0x46ab38=!1,_0x46ab38),_0x46ab38,_0x493857,_0x2f498d=(_0x242b43=!0,function(e,t){var i=_0x242b43?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x242b43=!1,i}),_0x537e4a=_0x2f498d(void 0,(function(){return _0x537e4a.toString().search("(((.+)+)+)+$").toString().constructor(_0x537e4a).search("(((.+)+)+)+$")})),_0x242b43;_0x537e4a();class BurstPipelineAnalystService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof BurstPipelineAnalystParameters))return null;var t,i=this;if(i.url=_0x2e06c5.urlPathAppend(i.url,"burstAnalyse"),t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");if(null===e.edgeID&&null===e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}var _0x3e8cd4=(_0x242030=!0,function(e,t){var i=_0x242030?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x242030=!1,i}),_0x3e383e=_0x3e8cd4(void 0,(function(){return _0x3e383e.toString().search("(((.+)+)+)+$").toString().constructor(_0x3e383e).search("(((.+)+)+)+$")})),_0x242030;_0x3e383e();class TransportationAnalystResultSetting{constructor(e){!e||(this.returnEdgeFeatures=!1,this.returnEdgeGeometry=!1,this.returnEdgeIDs=!1,this.returnNodeFeatures=!1,this.returnNodeGeometry=!1,this.returnNodeIDs=!1,this.returnPathGuides=!1,this.returnRoutes=!1,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystResultSetting")}destroy(){var e=this;e.returnEdgeFeatures=null,e.returnEdgeGeometry=null,e.returnEdgeIDs=null,e.returnNodeFeatures=null,e.returnNodeGeometry=null,e.returnNodeIDs=null,e.returnPathGuides=null,e.returnRoutes=null}}var _0x2803d3=(_0x33538b=!0,function(e,t){var i=_0x33538b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33538b=!1,i}),_0x9dc897=_0x2803d3(void 0,(function(){return _0x9dc897.toString().search("(((.+)+)+)+$").toString().constructor(_0x9dc897).search("(((.+)+)+)+$")})),_0x33538b;_0x9dc897();class TransportationAnalystParameter{constructor(e){!e||(this.barrierEdgeIDs=null,this.barrierNodeIDs=null,this.barrierPoints=null,this.weightFieldName=null,this.turnWeightField=null,this.resultSetting=new TransportationAnalystResultSetting,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystParameter")}destroy(){var e=this;if(e.barrierEdgeIDs=null,e.barrierNodeIDs=null,e.weightFieldName=null,e.turnWeightField=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.barrierPoints&&e.barrierPoints.length)for(var t in e.barrierPoints)e.barrierPoints[t].destroy();e.barrierPoints=null}}var _0x4e96fe=(_0x3dc939=!0,function(e,t){var i=_0x3dc939?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3dc939=!1,i}),_0x5b8013=_0x4e96fe(void 0,(function(){return _0x5b8013.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b8013).search("(((.+)+)+)+$")})),_0x3dc939;_0x5b8013();class ComputeWeightMatrixParameters{constructor(e){this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.ComputeWeightMatrixParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x16098c=(_0x585787=!0,function(e,t){var i=_0x585787?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x585787=!1,i}),_0x49d708=_0x16098c(void 0,(function(){return _0x49d708.toString().search("(((.+)+)+)+$").toString().constructor(_0x49d708).search("(((.+)+)+)+$")})),_0x585787;_0x49d708();class ComputeWeightMatrixService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ComputeWeightMatrixService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ComputeWeightMatrixParameters){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"weightmatrix"),t={parameter:_0x278499.toJSON(e.parameter),nodes:i.getJson(e.isAnalyzeById,e.nodes)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}}var _0x1054d9=(_0x465424=!0,function(e,t){var i=_0x465424?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x465424=!1,i}),_0x2e9548=_0x1054d9(void 0,(function(){return _0x2e9548.toString().search("(((.+)+)+)+$").toString().constructor(_0x2e9548).search("(((.+)+)+)+$")})),_0x465424;_0x2e9548();class _0x211aff{constructor(e){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=!1,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalyst3DParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null}}var _0x106818=(_0x3fe529=!0,function(e,t){var i=_0x3fe529?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3fe529=!1,i}),_0x45d965=_0x106818(void 0,(function(){return _0x45d965.toString().search("(((.+)+)+)+$").toString().constructor(_0x45d965).search("(((.+)+)+)+$")})),_0x3fe529;_0x45d965();class FacilityAnalystStreamParameters{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,this.queryType=null,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystStreamParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null,e.type=null}}var _0x3848ba=(_0x520e73=!0,function(e,t){var i=_0x520e73?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x520e73=!1,i}),_0x43fd43=_0x3848ba(void 0,(function(){return _0x43fd43.toString().search("(((.+)+)+)+$").toString().constructor(_0x43fd43).search("(((.+)+)+)+$")})),_0x520e73;_0x43fd43();class FacilityAnalystStreamService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystStreamService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FacilityAnalystStreamParameters){var t,i=this;if(0===e.queryType)i.url=_0x2e06c5.urlPathAppend(i.url,"upstreamcirticalfaclilities");else{if(1!==e.queryType)return;i.url=_0x2e06c5.urlPathAppend(i.url,"downstreamcirticalfaclilities")}t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},(null===e.edgeID||null===e.nodeID)&&(null===e.edgeID&&null===e.nodeID||(null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})))}}}var _0x2cc3ce=(_0x581fb5=!0,function(e,t){var i=_0x581fb5?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x581fb5=!1,i}),_0x2ad429=_0x2cc3ce(void 0,(function(){return _0x2ad429.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ad429).search("(((.+)+)+)+$")})),_0x581fb5;_0x2ad429();class _0x61bc6c extends _0x211aff{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DParameters"}destroy(){super.destroy()}}var _0x2a678a=(_0x53c455=!0,function(e,t){var i=_0x53c455?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53c455=!1,i}),_0x507e6c=_0x2a678a(void 0,(function(){return _0x507e6c.toString().search("(((.+)+)+)+$").toString().constructor(_0x507e6c).search("(((.+)+)+)+$")})),_0x53c455;_0x507e6c();class _0x4d0341 extends _0x5958f9{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _0x61bc6c){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"tracedownresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}var _0x28f8b4=(_0x39ab1e=!0,function(e,t){var i=_0x39ab1e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x39ab1e=!1,i}),_0x535c48=_0x28f8b4(void 0,(function(){return _0x535c48.toString().search("(((.+)+)+)+$").toString().constructor(_0x535c48).search("(((.+)+)+)+$")})),_0x39ab1e;_0x535c48();class _0x2932d4 extends _0x211aff{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DParameters"}destroy(){super.destroy()}}var _0x511f86=(_0x375e89=!0,function(e,t){var i=_0x375e89?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x375e89=!1,i}),_0x1f8f92=_0x511f86(void 0,(function(){return _0x1f8f92.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f8f92).search("(((.+)+)+)+$")})),_0x375e89;_0x1f8f92();class _0x2499f1 extends _0x5958f9{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _0x2932d4){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"traceupresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}var _0x4c6f68=(_0x5441da=!0,function(e,t){var i=_0x5441da?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5441da=!1,i}),_0x337ff2=_0x4c6f68(void 0,(function(){return _0x337ff2.toString().search("(((.+)+)+)+$").toString().constructor(_0x337ff2).search("(((.+)+)+)+$")})),_0x5441da;_0x337ff2();class _0x551fc0{constructor(e,t,i,n){_0x278499.isArray(e)&&(n=e[3],i=e[2],t=e[1],e=e[0]),this.left=null!=e?_0x278499.toFloat(e):this.left,this.bottom=null!=t?_0x278499.toFloat(t):this.bottom,this.right=null!=i?_0x278499.toFloat(i):this.right,this.top=null!=n?_0x278499.toFloat(n):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new _0x551fc0(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var i=Math.pow(10,e),n=Math.round(this.left*i)/i,r=Math.round(this.bottom*i)/i,o=Math.round(this.right*i)/i,a=Math.round(this.top*i)/i;return!0===t?r+","+n+","+a+","+o:n+","+r+","+o+","+a}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new Size(this.getWidth(),this.getHeight())}getCenterPixel(){return new Pixel((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new LonLat((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var i,n;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(i=t.lon,n=t.lat):(i=t.x,n=t.y);var r=(this.left-i)*e+i,o=(this.bottom-n)*e+n,a=(this.right-i)*e+i,s=(this.top-n)*e+n;return new _0x551fc0(r,o,a,s)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new _0x551fc0(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new _0x551fc0(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new _0x551fc0(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var i=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!i){var r=n.getWidth(),o=(n.left+n.right)/2,a=Math.round((e.lon-o)/r);i=this.containsLonLat({lon:e.lon-a*r,lat:e.lat},{inclusive:t.inclusive})}return i}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,i){if(null==i&&(i=!0),null==e||null==t)return!1;return i?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var i=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else i=this;null==t.inclusive&&(t.inclusive=!0);var n=!1,r=i.left===e.right||i.right===e.left||i.top===e.bottom||i.bottom===e.top;if(t.inclusive||!r){var o=e.bottom>=i.bottom&&e.bottom<=i.top||i.bottom>=e.bottom&&i.bottom<=e.top,a=e.top>=i.bottom&&e.top<=i.top||i.top>e.bottom&&i.top<e.top,s=e.left>=i.left&&e.left<=i.right||i.left>=e.left&&i.left<=e.right,l=e.right>=i.left&&e.right<=i.right||i.right>=e.left&&i.right<=e.right;n=(o||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),h=!u.containsBounds(i),d=!u.containsBounds(e);h&&!d?(e=e.add(-c,0),n=i.intersectsBounds(e,{inclusive:t.inclusive})):d&&!h&&(i=i.add(-c,0),n=e.intersectsBounds(i,{inclusive:t.inclusive}))}return n}containsBounds(e,t,i){null==t&&(t=!1),null==i&&(i=!0);var n=this.contains(e.left,e.bottom,i),r=this.contains(e.right,e.bottom,i),o=this.contains(e.left,e.top,i),a=this.contains(e.right,e.top,i);return t?n||r||o||a:n&&r&&o&&a}determineQuadrant(e){var t="",i=this.getCenterLonLat();return t+=e.lat<i.lat?"b":"t",t+=e.lon<i.lon?"l":"r"}wrapDateLine(e,t){var i=(t=t||{}).leftTolerance||0,n=t.rightTolerance||0,r=this.clone();if(e){for(var o=e.getWidth();r.left<e.left&&r.right-n<=e.left;)r=r.add(o,0);for(;r.left+i>=e.right&&r.right>e.right;)r=r.add(-o,0);var a=r.left+i;a<e.right&&a>e.left&&r.right-n>e.right&&(r=r.add(-o,0))}return r}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}fromString(e,t){var i=e.split(",");return _0x551fc0.fromArray(i,t)}fromArray(e,t){return!0===t?new _0x551fc0(e[1],e[0],e[3],e[2]):new _0x551fc0(e[0],e[1],e[2],e[3])}fromSize(e){return new _0x551fc0(0,e.h,e.w,0)}oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}var _0x338cc9=(_0x4d7f66=!0,function(e,t){var i=_0x4d7f66?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d7f66=!1,i}),_0x3220f2=_0x338cc9(void 0,(function(){return _0x3220f2.toString().search("(((.+)+)+)+$").toString().constructor(_0x3220f2).search("(((.+)+)+)+$")})),_0x4d7f66;_0x3220f2();class _0x204609{constructor(){this.CLASS_NAME="SuperMap.GeometryServer",this.id=_0x278499.createUniqueID(this.CLASS_NAME+"_"),this.parent=null,this.bounds=null,this.SRID=null}destroy(){this.id=null,this.bounds=null,this.SRID=null}clone(){return new _0x204609}setBounds(e){e&&(this.bounds=e.clone())}clearBounds(){this.bounds=null,this.parent&&this.parent.clearBounds()}extendBounds(e){this.getBounds()?this.bounds.extend(e):this.setBounds(e)}getBounds(){return null==this.bounds&&this.calculateBounds(),this.bounds}calculateBounds(){}getVertices(e){}getArea(){return 0}}var _0x3281d4=(_0x220560=!0,function(e,t){var i=_0x220560?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x220560=!1,i}),_0xde3fc5=_0x3281d4(void 0,(function(){return _0xde3fc5.toString().search("(((.+)+)+)+$").toString().constructor(_0xde3fc5).search("(((.+)+)+)+$")})),_0x220560;_0xde3fc5();class Collection$1 extends _0x204609{constructor(e){super(),this.components=[],this.componentTypes=null,null!=e&&this.addComponents(e),this.CLASS_NAME="SuperMap.Geometry.Collection",this.geometryType="Collection"}destroy(){this.components.length=0,this.components=null,super.destroy()}clone(){for(var e=new Collection$1,t=0,i=this.components.length;t<i;t++)e.addComponent(this.components[t].clone());return _0x278499.applyDefaults(e,this),e}getComponentsString(){for(var e=[],t=0,i=this.components.length;t<i;t++)e.push(this.components[t].toShortString());return e.join(",")}calculateBounds(){this.bounds=null;var e=new _0x551fc0,t=this.components;if(t)for(var i=0,n=t.length;i<n;i++)e.extend(t[i].getBounds());null!=e.left&&null!=e.bottom&&null!=e.right&&null!=e.top&&this.setBounds(e)}addComponents(e){_0x278499.isArray(e)||(e=[e]);for(var t=0,i=e.length;t<i;t++)this.addComponent(e[t])}addComponent(e,t){var i=!1;if(e&&(null==this.componentTypes||_0x278499.indexOf(this.componentTypes,e.CLASS_NAME)>-1)){if(null!=t&&t<this.components.length){var n=this.components.slice(0,t),r=this.components.slice(t,this.components.length);n.push(e),this.components=n.concat(r)}else this.components.push(e);e.parent=this,this.clearBounds(),i=!0}return i}removeComponents(e){var t=!1;_0x278499.isArray(e)||(e=[e]);for(var i=e.length-1;i>=0;--i)t=this.removeComponent(e[i])||t;return t}removeComponent(e){return _0x278499.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,i=this.components.length;t<i;t++)e+=this.components[t].getArea();return e}equals(e){var t=!0;if(e&&e.CLASS_NAME&&this.CLASS_NAME===e.CLASS_NAME)if(_0x278499.isArray(e.components)&&e.components.length===this.components.length){for(var i=0,n=this.components.length;i<n;++i)if(!this.components[i].equals(e.components[i])){t=!1;break}}else t=!1;else t=!1;return t}getVertices(e){for(var t=[],i=0,n=this.components.length;i<n;++i)Array.prototype.push.apply(t,this.components[i].getVertices(e));return t}}var _0x805d8d=(_0x33bf57=!0,function(e,t){var i=_0x33bf57?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x33bf57=!1,i}),_0x5b0c6f=_0x805d8d(void 0,(function(){return _0x5b0c6f.toString().search("(((.+)+)+)+$").toString().constructor(_0x5b0c6f).search("(((.+)+)+)+$")})),_0x33bf57;_0x5b0c6f();class MultiPolygon extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Polygon"],this.CLASS_NAME="SuperMap.Geometry.MultiPolygon",this.geometryType="MultiPolygon"}}var _0x3a5fce=(_0x51bf0d=!0,function(e,t){var i=_0x51bf0d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x51bf0d=!1,i}),_0xcd062a=_0x3a5fce(void 0,(function(){return _0xcd062a.toString().search("(((.+)+)+)+$").toString().constructor(_0xcd062a).search("(((.+)+)+)+$")})),_0x51bf0d;_0xcd062a();class Point$1 extends _0x204609{constructor(e,t,i,n){super(e,t,i,n),this.x=parseFloat(e),this.y=parseFloat(t),this.tag=n||0==n?parseFloat(n):null,this.type=i||"Point",this.CLASS_NAME="SuperMap.Geometry.Point",this.geometryType="Point"}clone(e){return null==e&&(e=new Point$1(this.x,this.y)),_0x278499.applyDefaults(e,this),e}calculateBounds(){this.bounds=new _0x551fc0(this.x,this.y,this.x,this.y)}equals(e){var t=!1;return null!=e&&(t=this.x===e.x&&this.y===e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}move(e,t){this.x=this.x+e,this.y=this.y+t,this.clearBounds()}toShortString(){return this.x+", "+this.y}destroy(){this.x=null,this.y=null,this.tag=null,super.destroy()}getVertices(){return[this]}}var _0x4ea5ed=(_0x1c7a61=!0,function(e,t){var i=_0x1c7a61?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1c7a61=!1,i}),_0x2b2857=_0x4ea5ed(void 0,(function(){return _0x2b2857.toString().search("(((.+)+)+)+$").toString().constructor(_0x2b2857).search("(((.+)+)+)+$")})),_0x1c7a61;_0x2b2857();class MultiPoint extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.MultiPoint",this.geometryType="MultiPoint"}addPoint(e,t){this.addComponent(e,t)}removePoint(e){this.removeComponent(e)}}var _0x5be3ef=(_0x219a64=!0,function(e,t){var i=_0x219a64?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x219a64=!1,i}),_0x4f3f20=_0x5be3ef(void 0,(function(){return _0x4f3f20.toString().search("(((.+)+)+)+$").toString().constructor(_0x4f3f20).search("(((.+)+)+)+$")})),_0x219a64;_0x4f3f20();class Curve extends MultiPoint{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point","SuperMap.PointWithMeasure"],this.CLASS_NAME="SuperMap.Geometry.Curve",this.geometryType="Curve"}}var _0x263751=(_0x2a3d18=!0,function(e,t){var i=_0x2a3d18?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2a3d18=!1,i}),_0x38c8cf=_0x263751(void 0,(function(){return _0x38c8cf.toString().search("(((.+)+)+)+$").toString().constructor(_0x38c8cf).search("(((.+)+)+)+$")})),_0x2a3d18;_0x38c8cf();class LineString extends Curve{constructor(e){super(e),this.CLASS_NAME="SuperMap.Geometry.LineString",this.geometryType="LineString"}removeComponent(e){var t=this.components&&this.components.length>2;return t&&LineString_get(LineString_getPrototypeOf(LineString.prototype),"removeComponent",this).apply(this,arguments),t}getSortedSegments(){for(var e,t,i=this.components.length-1,n=new Array(i),r=0;r<i;++r)e=this.components[r],t=this.components[r+1],e.x<t.x?n[r]={x1:e.x,y1:e.y,x2:t.x,y2:t.y}:n[r]={x1:t.x,y1:t.y,x2:e.x,y2:e.y};return n.sort((function(e,t){return e.x1-t.x1}))}getVertices(e){return!0===e?[this.components[0],this.components[this.components.length-1]]:!1===e?this.components.slice(1,this.components.length-1):this.components.slice()}calculateCircle(e){if(e.length<3)return e;var t={},i=e[0],n=e[1],r=e[2],o=0,a=0,s=!0,l=0,u=0,c=0,h=[],d=(r.y-i.y)/(r.x-i.x),f=r.y-d*r.x;if(r.x!=i.x&&r.y!=i.y&&n.y==d*n.x+f||r.x==i.x&&n.x==i.x||r.y==i.y&&n.y==i.y||r.x==i.x&&r.y==i.y||r.x==n.x&&r.y==n.y||i.x==n.x&&i.y==n.y)h.push(i),h.push(n),h.push(r);else{var p=(n.x*n.x+n.y*n.y-(i.x*i.x+i.y*i.y))*(2*(r.y-i.y))-(r.x*r.x+r.y*r.y-(i.x*i.x+i.y*i.y))*(2*(n.y-i.y)),_=2*(n.x-i.x)*(r.x*r.x+r.y*r.y-(i.x*i.x+i.y*i.y))-2*(r.x-i.x)*(n.x*n.x+n.y*n.y-(i.x*i.x+i.y*i.y)),m=4*((n.x-i.x)*(r.y-i.y)-(r.x-i.x)*(n.y-i.y));t.x=p/m,t.y=_/m;var g=(2*(o=Math.sqrt((i.x-t.x)*(i.x-t.x)+(i.y-t.y)*(i.y-t.y)))*o-((i.x-r.x)*(i.x-r.x)+(i.y-r.y)*(i.y-r.y)))/(2*o*o);g=(g=g>=1?1:g)<=-1?-1:g,c=180*Math.acos(g)/Math.PI,a=(c=r.x==i.x?t.x>i.x&&n.x>i.x||t.x<i.x&&n.x<i.x?360-c:c:t.y>d*t.x+f&&n.y>d*n.x+f||t.y<d*t.x+f&&n.y<d*n.x+f?360-c:c)/72,r.y!=i.y?r.x==i.x?r.y>i.y?n.x<i.x&&(s=!1):n.x>i.x&&(s=!1):r.x<i.x?n.y<d*n.x+f&&(s=!1):n.y>d*n.x+f&&(s=!1):r.x>i.x?n.y>i.y&&(s=!1):n.y<i.y&&(s=!1);var x=(i.y-t.y)/(i.x-t.x),y=x>=0?180*Math.atan(x)/Math.PI:Math.abs(180*Math.atan(x)/Math.PI)+90,v=Math.abs(t.y);i.y==v&&v==r.y&&i.x<r.x&&(y+=180);var $=i.y-t.y;h.push(i);for(var b=1;b<72;b++){l=a*b,u=y,s?$>=0?x>=0?u+=l:u=180-(u-90)+l:u=x>0?u-180+l:90-u+l:$>=0?x>=0?u-=l:u=180-(u-90)-l:u=x>=0?u-180-l:90-u-l,u=u*Math.PI/180;var T=t.x+o*Math.cos(u),C=t.y+o*Math.sin(u);h.push(new Point(T,C))}h.push(r)}return h}createLineEPS(e){var t=[],i=e.length;if(i<2)return e;for(var n=0;n<i;){if("LTypeArc"==e[n].type){var r=LineString.createLineArc(t,n,i,e);t=r[0],n=r[1]}else t.push(e[n]),n++}return t}createLineArc(e,t,i,n){if(0==t){var r=LineString.addPointEPS(n,t,i,"LTypeArc");Array.prototype.push.apply(e,r[0]),t=r[1]+1}else if(t==i-1){var o=[n[t-1],n[t]],a=LineString.calculateCircle(o);Array.prototype.push.apply(e,a),t++}else{var s=LineString.addPointEPS(n,t,i,"LTypeArc");e.pop(),Array.prototype.push.apply(e,s[0]),t=s[1]+1}return[e,t]}addPointEPS(e,t,i,n){var r,o=[],a=t+1;return 0==t?Array.prototype.push.apply(o,[e[t],e[t+1]]):t==i-1?Array.prototype.push.apply(o,[e[t-1],e[t]]):Array.prototype.push.apply(o,[e[t-1],e[t],e[t+1]]),"LTypeCurve"==n?r=LineString.calculatePointsFBZN(o):"LTypeArc"==n&&(r=LineString.calculateCircle(o)),[r,a]}}var _0x6f4cd5=(_0x24220a=!0,function(e,t){var i=_0x24220a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24220a=!1,i}),_0x1fdeb7=_0x6f4cd5(void 0,(function(){return _0x1fdeb7.toString().search("(((.+)+)+)+$").toString().constructor(_0x1fdeb7).search("(((.+)+)+)+$")})),_0x24220a;_0x1fdeb7();class MultiLineString extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Geometry.MultiLineString",this.geometryType="MultiLineString"}}var _0x1e5ba0=(_0x2c94e9=!0,function(e,t){var i=_0x2c94e9?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2c94e9=!1,i}),_0x5ea51c=_0x1e5ba0(void 0,(function(){return _0x5ea51c.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ea51c).search("(((.+)+)+)+$")})),_0x2c94e9;_0x5ea51c();class LinearRing extends LineString{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var i=!1,n=this.components.pop();(null!=t||!e.equals(n))&&(i=LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,arguments));var r=this.components[0];return LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,[r]),i}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"removeComponent",this).apply(this,arguments);var i=this.components[0];LinearRing_get(LinearRing_getPrototypeOf(LinearRing.prototype),"addComponent",this).apply(this,[i])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,i=0,n=this.components.length;i<n-1;i++){var r=this.components[i],o=this.components[i+1];t+=(r.x+o.x)*(o.y-r.y)}e=-t/2}return e}getVertices(e){return!0===e?[]:this.components.slice(0,this.components.length-1)}}var _0x39701b=(_0xedb9a1=!0,function(e,t){var i=_0xedb9a1?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xedb9a1=!1,i}),_0x2cb336=_0x39701b(void 0,(function(){return _0x2cb336.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cb336).search("(((.+)+)+)+$")})),_0xedb9a1;_0x2cb336();class Polygon extends Collection$1{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LinearRing"],this.CLASS_NAME="SuperMap.Geometry.Polygon",this.geometryType="Polygon"}getArea(){var e=0;if(this.components&&this.components.length>0){e+=Math.abs(this.components[0].getArea());for(var t=1,i=this.components.length;t<i;t++)e-=Math.abs(this.components[t].getArea())}return e}}var _0x110b9d=(_0x335f86=!0,function(e,t){var i=_0x335f86?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x335f86=!1,i}),_0x80fb76=_0x110b9d(void 0,(function(){return _0x80fb76.toString().search("(((.+)+)+)+$").toString().constructor(_0x80fb76).search("(((.+)+)+)+$")})),_0x335f86;_0x80fb76();class Feature{constructor(e,t,i){this.CLASS_NAME="SuperMap.Feature",this.layer=e,this.id=_0x278499.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=t,this.data=i??{}}destroy(){this.id=null,this.lonlat=null,this.data=null}}var _0x26c875=(_0x24ffd8=!0,function(e,t){var i=_0x24ffd8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24ffd8=!1,i}),_0x2f772f=_0x26c875(void 0,(function(){return _0x2f772f.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f772f).search("(((.+)+)+)+$")})),_0x24ffd8;_0x2f772f();var _0x25fd66={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"};class Vector extends Feature{constructor(e,t,i){super(null,null,t),this.fid=null,this.geometry=e||null,this.attributes={},t&&(this.attributes=Util.extend(_this.attributes,t)),this.bounds=null,this.state=null,this.style=i||null,this.url=null,this.lonlat=null,this.CLASS_NAME="SuperMap.Feature.Vector",Vector.style={default:{fillColor:"#ee9900",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},select:{fillColor:"blue",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},temporary:{fillColor:"#66cccc",fillOpacity:.2,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"default",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},delete:{display:"none"}}}destroy(){this.layer&&(this.layer.removeFeatures(this),this.layer=null),this.geometry=null,Vector_get(Vector_getPrototypeOf(Vector.prototype),"destroy",this).call(this)}clone(){return new Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style)}toState(e){if(e===_0x25fd66.UPDATE)switch(this.state){case _0x25fd66.UNKNOWN:case _0x25fd66.DELETE:this.state=e}else if(e===_0x25fd66.INSERT)if(this.state===_0x25fd66.UNKNOWN);else this.state=e;else if(e===_0x25fd66.DELETE)switch(this.state){case _0x25fd66.INSERT:case _0x25fd66.DELETE:break;case _0x25fd66.UNKNOWN:case _0x25fd66.UPDATE:this.state=e}else e===_0x25fd66.UNKNOWN&&(this.state=e)}}var _0x1987ed=(_0x44e23d=!0,function(e,t){var i=_0x44e23d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x44e23d=!1,i}),_0x21844b=_0x1987ed(void 0,(function(){return _0x21844b.toString().search("(((.+)+)+)+$").toString().constructor(_0x21844b).search("(((.+)+)+)+$")})),_0x44e23d;_0x21844b();class PointWithMeasure extends Point$1{constructor(e){super(e),this.measure=null,this.CLASS_NAME="SuperMap.PointWithMeasure"}equals(e){var t=!1;if(null!=e){var i=this.x===e.x&&this.y===e.y&&this.measure===e.measure,n=isNaN(this.x)&&isNaN(this.y)&&isNaN(this.measure),r=isNaN(e.x)&&isNaN(e.y)&&isNaN(e.measure);t=i||n&&r}return t}static toJson(){var e="{";return null!=this.measure&&null!=this.measure&&(e+='"measure":'+this.measure+","),e+='"x":'+this.x+",",e+='"y":'+this.y,e+="}"}destroy(){var e=this;e.measure=null,e.x=null,e.y=null}static fromJson(e){if(e)return new PointWithMeasure({x:e.x,y:e.y,measure:e.measure})}}var _0x2c9e3b=(_0x156171=!0,function(e,t){var i=_0x156171?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x156171=!1,i}),_0x2c5fbe=_0x2c9e3b(void 0,(function(){return _0x2c5fbe.toString().search("(((.+)+)+)+$").toString().constructor(_0x2c5fbe).search("(((.+)+)+)+$")})),_0x156171;_0x2c5fbe();class Route extends Collection$1{constructor(e,t){super(e,t),this.id=null,this.center=null,this.style=null,this.length=null,this.maxM=null,this.minM=null,this.parts=null,this.points=null,this.type=null,this.componentTypes=["SuperMap.Geometry.LinearRing","SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Route",this.geometryType="LINEM"}static toJson(){var e="{";if(null!=this.id&&null!=this.id&&(e+='"id":'+this.id+","),null!=this.center&&null!=this.center&&(e+='"center":'+this.center+","),null!=this.style&&null!=this.style&&(e+='"style":'+this.style+","),null!=this.length&&null!=this.length&&(e+='"length":'+this.length+","),null!=this.maxM&&null!=this.maxM&&(e+='"maxM":'+this.maxM+","),null!=this.minM&&null!=this.minM&&(e+='"minM":'+this.minM+","),null!=this.type&&null!=this.type&&(e+='"type":"'+this.type+'",'),null!=this.parts&&null!=this.parts){e+='"parts":['+this.parts[0];for(var t=1;t<this.parts.length;t++)e+=","+this.parts[t];e+="],"}if(null!=this.components&&this.components.length>0){e+='"points":[';for(var i=0,n=this.components.length;i<n;i++)for(var r=0,o=this.components[i].components.length;r<o;r++)e+=this.components[i].components[r].toJson()+",";e=e.replace(/,$/g,""),e+="]"}return e=e.replace(/,$/g,""),e+="}"}destroy(){var e=this;e.id=null,e.center=null,e.style=null,e.length=null,e.maxM=null,e.minM=null,e.type=null,e.parts=null,e.components.length=0,e.components=null,e.componentTypes=null}static fromJson(e){if(e){var t=e.parts||[],i=e.points||[],n=t.length,r=[];if(!(n>0))return null;for(var o=0,a=0,s=[];o<n;o++){for(var l=0;l<t[o];l++)s.push(PointWithMeasure.fromJson(i[a+l]));a+=t[o],s[0].equals(s[t[o]-1])?r.push(new LinearRing(s)):r.push(new LineString(s)),s=[]}return new Route(r,{id:e.id,center:e.center,style:e.style,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type,parts:e.parts})}}}var _0x2d380a=(_0x1e5cb8=!0,function(e,t){var i=_0x1e5cb8?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1e5cb8=!1,i}),_0x53589c=_0x2d380a(void 0,(function(){return _0x53589c.toString().search("(((.+)+)+)+$").toString().constructor(_0x53589c).search("(((.+)+)+)+$")})),_0x1e5cb8;_0x53589c();var _0x46c692={LINE:"LINE",LINEM:"LINEM",POINT:"POINT",REGION:"REGION",POINTEPS:"POINTEPS",LINEEPS:"LINEEPS",REGIONEPS:"REGIONEPS",ELLIPSE:"ELLIPSE",CIRCLE:"CIRCLE",TEXT:"TEXT",RECTANGLE:"RECTANGLE",UNKNOWN:"UNKNOWN",GEOCOMPOUND:"GEOCOMPOUND"};class ServerGeometry{constructor(e){this.id=0,this.style=null,this.parts=null,this.points=null,this.type=null,this.prjCoordSys=null,e&&_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.ServerGeometry"}destroy(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}toGeometry(){var e=this;switch(e.type.toUpperCase()){case _0x46c692.POINT:return e.toGeoPoint();case _0x46c692.LINE:return e.toGeoLine();case _0x46c692.LINEM:return e.toGeoLinem();case _0x46c692.REGION:return e.toGeoRegion();case _0x46c692.POINTEPS:return e.toGeoPoint();case _0x46c692.LINEEPS:return e.toGeoLineEPS();case _0x46c692.REGIONEPS:return e.toGeoRegionEPS();case _0x46c692.GEOCOMPOUND:return e.transformGeoCompound()}}toGeoPoint(){var e=this.parts||[],t=this.points||[],i=e.length;if(i>0){if(1===i)return new Point$1(t[0].x,t[0].y);for(var n=[],r=0;r<i;r++)n.push(new Point$1(t[r].x,t[r].y));return new MultiPoint(n)}return null}toGeoLine(){var e=this.parts||[],t=this.points||[],i=e.length;if(i>0){if(1===i){for(var n=[],r=0;r<e[0];r++)n.push(new Point$1(t[r].x,t[r].y));return n[0].equals(n[e[0]-1])?new LinearRing(n):new LineString(n)}for(var o=[],a=0;a<i;a++){for(var s=[],l=0;l<e[a];l++)s.push(new Point$1(t[l].x,t[l].y));o.push(new LineString(s)),t.splice(0,e[a])}return new MultiLineString(o)}return null}toGeoLineEPS(){var e,t,i,n,r,o=this.parts||[],a=this.points||[],s=o.length;if(s>0){if(1===s){for(e=0,i=[];e<o[0];e++)i.push(new Point$1(a[e].x,a[e].y,a[e].type));return i[0].equals(i[o[0]-1])?(r=LineString.createLineEPS(i),new LinearRing(r)):(r=LineString.createLineEPS(i),new LineString(r))}for(e=0,n=[];e<s;e++){for(t=0,i=[];t<o[e];t++)i.push(new Point$1(a[t].x,a[t].y));r=LineString.createLineEPS(i),n.push(new LineString(r)),a.splice(0,o[e])}return new MultiLineString(n)}return null}toGeoLinem(){return Route.fromJson(this)}toGeoRegion(){var e=this,t=e.parts||[],i=e.partTopo||[],n=e.points||[],r=t.length;if(r<=0)return null;var o=[],a=[];if(1==r){for(var s=0;s<n.length;s++)a.push(new Point$1(n[s].x,n[s].y));return o.push(new Polygon([new LinearRing(a)])),new MultiPolygon(o)}for(var l=[],u=[],c=[],h=[],d=[],f=0,p=0;f<r;f++){for(var _=0;_<t[f];_++)a.push(new Point$1(n[p+_].x,n[p+_].y));p+=t[f];var m=new Polygon([new LinearRing(a)]);a=[],c.push(m),0===i.length&&h.push(m.getBounds()),d.push(1),u.push(m.getArea())}if(0===i.length){ServerGeometry.bubbleSort(u,c,i,h);for(var g=[],x=1;x<c.length;x++)for(var y=x-1;y>=0;y--)if(g[x]=-1,h[y].containsBounds(h[x])){d[x]=-1*d[y],d[x]<0&&(g[x]=y);break}for(var v=0;v<c.length;v++)d[v]>0?o.push(c[v]):(o[g[v]].components=o[g[v]].components.concat(c[v].components),o.push(""))}else{o=new Array;for(var $=0;$<c.length;$++)if(i[$]&&-1==i[$]?l=l.concat(c[$].components):(l.length>0&&o.length>0&&(o[o.length-1].components=o[o.length-1].components.concat(l),l=[]),o.push(c[$])),$==r-1){var b=o.length;if(b)o[b-1].components=o[b-1].components.concat(l);else for(var T=0,C=l.length;T<C;T++)o.push(new Polygon(l))}}return new MultiPolygon(o)}toGeoRegionEPS(){var e=this,t=e.parts||[],i=e.partTopo||[],n=e.points||[],r=t.length;if(r<=0)return null;var o,a=[],s=[];if(1==r){for(var l=0;l<n.length;l++)s.push(new Point$1(n[l].x,n[l].y));return o=LineString.createLineEPS(s),a.push(new Polygon([new LinearRing(o)])),new MultiPolygon(a)}for(var u=[],c=[],h=[],d=[],f=[],p=0,_=0;p<r;p++){for(var m=0;m<t[p];m++)s.push(new Point$1(n[_+m].x,n[_+m].y));_+=t[p],o=LineString.createLineEPS(s);var g=new Polygon([new LinearRing(o)]);s=[],h.push(g),0===i.length&&d.push(g.getBounds()),f.push(1),c.push(g.getArea())}if(0===i.length){ServerGeometry.bubbleSort(c,h,i,d);for(var x=[],y=1;y<h.length;y++)for(var v=y-1;v>=0;v--)if(x[y]=-1,d[v].containsBounds(d[y])){f[y]=-1*f[v],f[y]<0&&(x[y]=v);break}for(var $=0;$<h.length;$++)f[$]>0?a.push(h[$]):(a[x[$]].components=a[x[$]].components.concat(h[$].components),a.push(""))}else{a=new Array;for(var b=0;b<h.length;b++)if(i[b]&&-1==i[b]?u=u.concat(h[b].components):(u.length>0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(u),u=[]),a.push(h[b])),b==r-1){var T=a.length;if(T)a[T-1].components=a[T-1].components.concat(u);else for(var C=0,S=u.length;C<S;C++)a.push(new Polygon(u))}}return new MultiPolygon(a)}transformGeoCompound(){var e=this.geoParts||[],t=e.length;if(t<=0)return null;for(var i=[],n=0;n<t;n++){var r=e[n];i.push(new ServerGeometry(r).toGeometry())}return new Collection(i)}fromJson(e){if(e)return new ServerGeometry({id:e.id,style:ServerStyle.fromJson(e.style),parts:e.parts,partTopo:e.partTopo,points:e.points,center:e.center,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type})}fromGeometry(e){if(e){var t=0,i=[],n=[],r=null,o=e.components,a=e.CLASS_NAME,s={epsgCode:e.SRID};if(isNaN(e.id)||(t=e.id),"SuperMap.Geometry.LinearRing"!=a&&"SuperMap.Geometry.LineString"!=a&&(e instanceof MultiPoint||e instanceof MultiLineString)){for(var l=o.length,u=0;u<l;u++){var c=o[u].getVertices(),h=c.length;i.push(h);for(var d=0;d<h;d++)n.push(new Point$1(c[d].x,c[d].y))}r="SuperMap.Geometry.MultiPoint"==a?_0x46c692.POINT:_0x46c692.LINE}else if(e instanceof MultiPolygon){for(var f=o.length,p=0;p<f;p++)for(var _=o[p].components,m=_.length,g=0;g<m;g++){var x=_[g].getVertices(),y=x.length+1;i.push(y);for(var v=0;v<y-1;v++)n.push(new Point$1(x[v].x,x[v].y));n.push(new Point$1(x[0].x,x[0].y))}r=_0x46c692.REGION}else if(e instanceof Polygon){for(var $=o.length,b=0;b<$;b++){var T=o[b].getVertices(),C=T.length+1;i.push(C);for(var S=0;S<C-1;S++)n.push(new Point$1(T[S].x,T[S].y));n.push(new Point$1(T[0].x,T[0].y))}r=_0x46c692.REGION}else{for(var w=e.getVertices(),E=w.length,P=0;P<E;P++)n.push(new Point$1(w[P].x,w[P].y));e instanceof LinearRing&&(n.push(new Point$1(w[0].x,w[0].y)),E++),i.push(E),r=e instanceof Point$1?_0x46c692.POINT:_0x46c692.LINE}return new ServerGeometry({id:t,style:null,parts:i,points:n,type:r,prjCoordSys:s})}}IsClockWise(e){var t=e.length;if(t<3)return 0;var i=e[0].y*(e[t-1].x-e[1].x);e.push(e[0]);for(var n=1;n<t;n++)i+=e[n].y*(e[n-1].x-e[n+1].x);return.5*i}bubbleSort(e,t,i,n){for(var r=0;r<e.length;r++)for(var o=0;o<e.length;o++)if(e[r]>e[o]){var a=e[o];e[o]=e[r],e[r]=a;var s=t[o];if(t[o]=t[r],t[r]=s,i&&i.length>0){var l=i[o];i[o]=i[r],i[r]=l}if(n&&n.length>0){var u=n[o];n[o]=n[r],n[r]=u}}}}var _0x46bdf9=(_0x56c590=!0,function(e,t){var i=_0x56c590?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x56c590=!1,i}),_0x15c609=_0x46bdf9(void 0,(function(){return _0x15c609.toString().search("(((.+)+)+)+$").toString().constructor(_0x15c609).search("(((.+)+)+)+$")})),_0x56c590;_0x15c609();class _0x19437a extends _0x4590c8{constructor(e){super(e),this.ignoreExtraDims=!0,this.CLASS_NAME="SuperMap.Format.GeoJSON",this.parseCoords={point:function(e){if(!1===this.ignoreExtraDims&&2!=e.length)throw"Only 2D points are supported: "+e;return new Point$1(e[0],e[1])},multipoint:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.point.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiPoint(t)},linestring:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.point.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new LineString(t)},multilinestring:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.linestring.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiLineString(t)},polygon:function(e){for(var t,i,n=[],r=0,o=e.length;r<o;++r){try{i=this.parseCoords.linestring.apply(this,[e[r]])}catch(e){throw e}t=new LinearRing(i.components),n.push(t)}return new Polygon(n)},multipolygon:function(e){for(var t=[],i=null,n=0,r=e.length;n<r;++n){try{i=this.parseCoords.polygon.apply(this,[e[n]])}catch(e){throw e}t.push(i)}return new MultiPolygon(t)},box:function(e){if(2!=e.length)throw"GeoJSON box coordinates must have 2 elements";return new Polygon([new LinearRing([new Point$1(e[0][0],e[0][1]),new Point$1(e[1][0],e[0][1]),new Point$1(e[1][0],e[1][1]),new Point$1(e[0][0],e[1][1]),new Point$1(e[0][0],e[0][1])])])}},this.extract={feature:function(e){var t=this.extract.geometry.apply(this,[e.geometry]),i={type:"Feature",properties:this.createAttributes(e),geometry:t};return e.geometry&&"TEXT"===e.geometry.type&&(i.properties.texts=e.geometry.texts,i.properties.textStyle=e.geometry.textStyle),e.fid&&(i.id=e.fid),e.ID&&(i.id=e.ID),i},geometry:function(e){if(null==e)return null;!e.parts&&e.points&&(e.parts=[e.points.length]);var t,i=e.hasOwnProperty("geometryType")?e:new ServerGeometry(e).toGeometry()||e,n=i.geometryType||i.type;return"LinearRing"===n&&(n="LineString"),"LINEM"===n&&(n="MultiLineString"),t=this.extract[n.toLowerCase()].apply(this,[i]),"Collection"===(n="TEXT"===n?"Point":n)?{type:"GeometryCollection",geometries:t}:{type:n,coordinates:t}},point:function(e){var t=[e.x,e.y];for(var i in e)"x"!==i&&"y"!==i&&null!==e[i]&&!isNaN(e[i])&&t.push(e[i]);return t},text:function(e){return[e.points[0].x,e.points[0].y]},multipoint:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t},linestring:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t},multilinestring:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.linestring.apply(this,[e.components[i]]));return t},polygon:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.linestring.apply(this,[e.components[i]]));return t},multipolygon:function(e){for(var t=[],i=0,n=e.components.length;i<n;++i)t.push(this.extract.polygon.apply(this,[e.components[i]]));return t},collection:function(e){for(var t=e.components.length,i=new Array(t),n=0;n<t;++n)i[n]=this.extract.geometry.apply(this,[e.components[n]]);return i}}}read(e,t,i){t=t||"FeatureCollection";var n=null,r=null;if((r="string"==typeof e?GeoJSON_get(GeoJSON_getPrototypeOf(_0x19437a.prototype),"read",this).call(this,e,i):e)&&"string"==typeof r.type&&this.isValidType(r,t))switch(t){case"Geometry":try{n=this.parseGeometry(r)}catch{}break;case"Feature":try{(n=this.parseFeature(r)).type="Feature"}catch{}break;case"FeatureCollection":switch(n=[],r.type){case"Feature":try{n.push(this.parseFeature(r))}catch{n=null}break;case"FeatureCollection":for(var o=0,a=r.features.length;o<a;++o)try{n.push(this.parseFeature(r.features[o]))}catch{n=null}break;default:try{var s=this.parseGeometry(r);n.push(new Vector(s))}catch{n=null}}}return n}write(e,t){return GeoJSON_get(GeoJSON_getPrototypeOf(_0x19437a.prototype),"write",this).call(this,this.toGeoJSON(e),t)}fromGeoJSON(e,t,i){var n=this,r=this.read(e,t,i);return Array.isArray(r)?r.map((function(e){return n._toiSevrerFeature(e)})):this._toiSevrerFeature(r)}toGeoJSON(e){var t={type:null};if(Array.isArray(e)){t.type="FeatureCollection";var i=e.length;t.features=new Array(i);for(var n=0;n<i;++n){var r=e[n];if(s(r)){var o={};o.geometry=r,t.features[n]=this.extract.feature.apply(this,[o])}else t.features[n]=this.extract.feature.apply(this,[r])}}else if(s(e)){var a={};a.geometry=e,t=this.extract.feature.apply(this,[a])}else t=this.extract.feature.apply(this,[e]);function s(e){return e.hasOwnProperty("parts")&&e.hasOwnProperty("points")||e.hasOwnProperty("geoParts")}return t}isValidType(e,t){var i=!1;switch(t){case"Geometry":-1==_0x278499.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],e.type)||(i=!0);break;case"FeatureCollection":i=!0;break;default:e.type==t&&(i=!0)}return i}parseFeature(e){var t,i,n,r;n=e.properties?e.properties:{},r=e.geometry&&e.geometry.bbox||e.bbox;try{i=this.parseGeometry(e.geometry)}catch(e){throw e}return t=new Vector(i,n),r&&(t.bounds=_0x551fc0.fromArray(r)),e.id&&(t.fid=e.id),t}parseGeometry(e){if(null==e)return null;var t;if("GeometryCollection"==e.type){if(!Array.isArray(e.geometries))throw"GeometryCollection must have geometries array: "+e;for(var i=e.geometries.length,n=new Array(i),r=0;r<i;++r)n[r]=this.parseGeometry.apply(this,[e.geometries[r]]);t=new Collection$1(n)}else{if(!Array.isArray(e.coordinates))throw"Geometry must have coordinates array: "+e;if(!this.parseCoords[e.type.toLowerCase()])throw"Unsupported geometry type: "+e.type;try{t=this.parseCoords[e.type.toLowerCase()].apply(this,[e.coordinates])}catch(e){throw e}}return t}createCRSObject(e){var t=e.layer.projection.toString(),i={};if(t.match(/epsg:/i)){var n=parseInt(t.substring(t.indexOf(":")+1));i=4326==n?{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"name",properties:{name:"EPSG:"+n}}}return i}_toiSevrerFeature(e){var t=e.attributes,i=[],n=[];for(var r in t)i.push(r),n.push(t[r]);var o={fieldNames:i,fieldValues:n,geometry:ServerGeometry.fromGeometry(e.geometry)};return o.geometry.id=e.fid,o}createAttributes(e){if(!e)return null;return{}}}var _0x45b403=(_0x2db74e=!0,function(e,t){var i=_0x2db74e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2db74e=!1,i}),_0x54b1e2=_0x45b403(void 0,(function(){return _0x54b1e2.toString().search("(((.+)+)+)+$").toString().constructor(_0x54b1e2).search("(((.+)+)+)+$")})),_0x2db74e;_0x54b1e2();class FindClosestFacilitiesService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindClosestFacilitiesService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindClosestFacilitiesParameters){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"closestfacility"),t={expectFacilityCount:e.expectFacilityCount,fromEvent:e.fromEvent,maxWeight:e.maxWeight,parameter:_0x278499.toJSON(e.parameter),event:_0x278499.toJSON(e.event),facilities:i.getJson(e.isAnalyzeById,e.facilities)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new _0x19437a;return e.facilityPathList.map((function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e})),e}}var _0x551656=(_0x523aad=!0,function(e,t){var i=_0x523aad?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x523aad=!1,i}),_0x5730d5=_0x551656(void 0,(function(){return _0x5730d5.toString().search("(((.+)+)+)+$").toString().constructor(_0x5730d5).search("(((.+)+)+)+$")})),_0x523aad;_0x5730d5();class FindLocationParameters{constructor(e){this.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FindLocationParameters"}destroy(){var e=this;if(e.expectedSupplyCenterCount=null,e.isFromCenter=null,e.turnWeightField=null,e.weightName=null,e.supplyCenters){for(var t=0,i=e.supplyCenters,n=i.length;t<n;t++)i[t].destroy();e.supplyCenters=null}}}var _0x523470=(_0x344de6=!0,function(e,t){var i=_0x344de6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x344de6=!1,i}),_0x46242e=_0x523470(void 0,(function(){return _0x46242e.toString().search("(((.+)+)+)+$").toString().constructor(_0x46242e).search("(((.+)+)+)+$")})),_0x344de6;_0x46242e();class FindLocationService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindLocationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindLocationParameters){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"location"),t={isFromCenter:e.isFromCenter,expectedSupplyCenterCount:e.expectedSupplyCenterCount,weightName:e.weightName,turnWeightField:e.turnWeightField,returnEdgeFeature:!0,returnEdgeGeometry:!0,returnNodeFeature:!0,mapParameter:_0x278499.toJSON(e.mapParameter),supplyCenters:i.getCentersJson(e.supplyCenters)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getCentersJson(e){for(var t="[",i=e?e.length:0,n=0;n<i;n++)n>0&&(t+=","),t+=_0x278499.toJSON(e[n]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new _0x19437a;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}var _0x56eb22=(_0x445516=!0,function(e,t){var i=_0x445516?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x445516=!1,i}),_0x5be6a7=_0x56eb22(void 0,(function(){return _0x5be6a7.toString().search("(((.+)+)+)+$").toString().constructor(_0x5be6a7).search("(((.+)+)+)+$")})),_0x445516;_0x5be6a7();class FindMTSPPathsParameters{constructor(e){this.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FindMTSPPathsParameters"}destroy(){var e=this;e.centers=null,e.hasLeastTotalCost=null,e.isAnalyzeById=null,e.nodes=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x31227a=(_0x53e96b=!0,function(e,t){var i=_0x53e96b?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x53e96b=!1,i}),_0x48a7c8=_0x31227a(void 0,(function(){return _0x48a7c8.toString().search("(((.+)+)+)+$").toString().constructor(_0x48a7c8).search("(((.+)+)+)+$")})),_0x53e96b;_0x48a7c8();class FindMTSPPathsService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindMTSPPathsParameters){var t,i=this,n=i.getJson(e.isAnalyzeById,e.centers),r=i.getJson(e.isAnalyzeById,e.nodes);i.url=_0x2e06c5.urlPathAppend(i.url,"mtsppath"),t={centers:n,nodes:r,parameter:_0x278499.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new _0x19437a;return e.pathList.map((function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e})),e}}var _0x192ac3=(_0x24fe3d=!0,function(e,t){var i=_0x24fe3d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24fe3d=!1,i}),_0xee59ba=_0x192ac3(void 0,(function(){return _0xee59ba.toString().search("(((.+)+)+)+$").toString().constructor(_0xee59ba).search("(((.+)+)+)+$")})),_0x24fe3d;_0xee59ba();class FindPathParameters{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FindPathParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.hasLeastEdgeCount=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x28bf5a=(_0x5ed5e2=!0,function(e,t){var i=_0x5ed5e2?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x5ed5e2=!1,i}),_0x5ba370=_0x28bf5a(void 0,(function(){return _0x5ba370.toString().search("(((.+)+)+)+$").toString().constructor(_0x5ba370).search("(((.+)+)+)+$")})),_0x5ed5e2;_0x5ba370();class FindPathService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindPathParameters){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"path"),t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:_0x278499.toJSON(e.parameter),nodes:i.getJson(e.isAnalyzeById,e.nodes)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new _0x19437a;return e.pathList.forEach((function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))})),e}}var _0x5775cf=(_0x1b5d32=!0,function(e,t){var i=_0x1b5d32?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1b5d32=!1,i}),_0x2ac4ef=_0x5775cf(void 0,(function(){return _0x2ac4ef.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ac4ef).search("(((.+)+)+)+$")})),_0x1b5d32;_0x2ac4ef();class FindServiceAreasParameters{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new TransportationAnalystParameter,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FindServiceAreasParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.isCenterMutuallyExclusive=null,e.centers=null,e.isFromCenter=null,e.weights=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0x533090=(_0x162499=!0,function(e,t){var i=_0x162499?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x162499=!1,i}),_0x200222=_0x533090(void 0,(function(){return _0x200222.toString().search("(((.+)+)+)+$").toString().constructor(_0x200222).search("(((.+)+)+)+$")})),_0x162499;_0x200222();class FindServiceAreasService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){this.destroy()}processAsync(e){if(e instanceof FindServiceAreasParameters){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"servicearea"),t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:_0x278499.toJSON(e.parameter),centers:i.getJson(e.isAnalyzeById,e.centers),weights:i.getJson(!0,e.weights)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",n=t?t.length:0;if(!1===e)for(var r=0;r<n;r++)r>0&&(i+=","),i+='{"x":'+t[r].x+',"y":'+t[r].y+"}";else if(!0===e)for(var o=0;o<n;o++)o>0&&(i+=","),i+=t[o];return i+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new _0x19437a;return e.serviceAreaList.map((function(e){return e.serviceRegion&&(e.serviceRegion=t.toGeoJSON(e.serviceRegion)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e.routes&&(e.routes=t.toGeoJSON(e.routes)),e})),e}}var _0x34a074=(_0x399716=!0,function(e,t){var i=_0x399716?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x399716=!1,i}),_0x23a91d=_0x34a074(void 0,(function(){return _0x23a91d.toString().search("(((.+)+)+)+$").toString().constructor(_0x23a91d).search("(((.+)+)+)+$")})),_0x399716;_0x23a91d();class FindTSPPathsParameters{constructor(e){this.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new TransportationAnalystParameter,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.FindTSPPathsParameters"}destroy(){var e=this;e.endNodeAssigned=null,e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}var _0xcd95eb=(_0x371a76=!0,function(e,t){var i=_0x371a76?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x371a76=!1,i}),_0xfb5575=_0xcd95eb(void 0,(function(){return _0xfb5575.toString().search("(((.+)+)+)+$").toString().constructor(_0xfb5575).search("(((.+)+)+)+$")})),_0x371a76;_0xfb5575();class FindTSPPathsService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof FindTSPPathsParameters){var t,i=this;i.url=_0x2e06c5.urlPathAppend(i.url,"tsppath"),t={parameter:_0x278499.toJSON(e.parameter),endNodeAssigned:e.endNodeAssigned,nodes:i.getNodesJson(e)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getNodesJson(e){var t,i,n,r,o="";if(!1===e.isAnalyzeById){for(t="[",i=0,n=(r=e.nodes).length;i<n;i++)i>0&&(t+=","),t+='{"x":'+r[i].x+',"y":'+r[i].y+"}";o+=t+="]"}else if(!0===e.isAnalyzeById){for(var a="[",s=e.nodes,l=s.length,u=0;u<l;u++)u>0&&(a+=","),a+=s[u];o+=a+="]"}return o}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new _0x19437a;return e.tspPathList.forEach((function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))})),e}}var _0x5cddc5={extend:function(e){var t,i,n,r;for(i=1,n=arguments.length;i<n;i++)for(t in r=arguments[i])e[t]=r[t];return e},create:Object.create||function(){var e,t=(e=!0,function(t,i){var n=e?function(){if(i){var e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}),i=t(this,(function(){return i.toString().search("(((.+)+)+)+$").toString().constructor(i).search("(((.+)+)+)+$")}));function n(){}return i(),function(e){return n.prototype=e,new n}}(),bind:function(e,t){var i=Array.prototype.slice;if(e.bind)return e.bind.apply(e,i.call(arguments,1));var n=i.call(arguments,2);return function(){return e.apply(t,n.length?n.concat(i.call(arguments)):arguments)}},stamp:function(e){return e._leaflet_id=e._leaflet_id||++L.Util.lastId,e._leaflet_id},lastId:0,throttle:function(e,t,i){var n,r,o,a;return a=function(){n=!1,r&&(o.apply(i,r),r=!1)},o=function(){n?r=arguments:(e.apply(i,arguments),setTimeout(a,t),n=!0)},o},wrapNum:function(e,t,i){var n=t[1],r=t[0],o=n-r;return e===n&&i?e:((e-r)%o+o)%o+r},falseFn:function(){return!1},formatNum:function(e,t){var i=Math.pow(10,t||5);return Math.round(e*i)/i},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},splitWords:function(e){return _0x5cddc5.trim(e).split(/\s+/)},setOptions:function(e,t){for(var i in e.hasOwnProperty("options")||(e.options=e.options?_0x5cddc5.create(e.options):{}),t)e.options[i]=t[i];return e.options},getParamString:function(e,t,i){var n=[];for(var r in e)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(e[r]));return(t&&-1!==t.indexOf("?")?"&":"?")+n.join("&")},template:function(e,t){return e.replace(_0x5cddc5.templateRe,(function(e,i){var n=t[i];if(void 0===n)throw new Error("No value provided for variable "+e);return"function"==typeof n&&(n=n(t)),n}))},templateRe:/\{ *([\w_\-]+) *\}/g,isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},indexOf:function(e,t){for(var i=0;i<e.length;i++)if(e[i]===t)return i;return-1},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},_0x57fb1f=(_0x2210dd=!0,function(e,t){var i=_0x2210dd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2210dd=!1,i}),_0x106d75=_0x57fb1f(void 0,(function(){return _0x106d75.toString().search("(((.+)+)+)+$").toString().constructor(_0x106d75).search("(((.+)+)+)+$")})),_0x2210dd;function _0x1523c4(){}_0x106d75(),_0x1523c4.extend=function(e){var t=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=t.__super__=this.prototype,n=_0x5cddc5.create(i);for(var r in n.constructor=t,t.prototype=n,this)this.hasOwnProperty(r)&&"prototype"!==r&&(t[r]=this[r]);return e.statics&&(_0x5cddc5.extend(t,e.statics),delete e.statics),e.includes&&(_0x5cddc5.extend.apply(null,[n].concat(e.includes)),delete e.includes),n.options&&(e.options=_0x5cddc5.extend(_0x5cddc5.create(n.options),e.options)),_0x5cddc5.extend(n,e),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=n._initHooks.length;e<t;e++)n._initHooks[e].call(this)}},t},_0x1523c4.include=function(e){return _0x5cddc5.extend(this.prototype,e),this},_0x1523c4.mergeOptions=function(e){return _0x5cddc5.extend(this.prototype.options,e),this},_0x1523c4.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),i="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var _0xfe7e99=(_0x42515c=!0,function(e,t){var i=_0x42515c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x42515c=!1,i}),_0x5272fd=_0xfe7e99(void 0,(function(){return _0x5272fd.toString().search("(((.+)+)+)+$").toString().constructor(_0x5272fd).search("(((.+)+)+)+$")})),_0x42515c;_0x5272fd();var _0x38cf22=_0x1523c4.extend({on:function(e,t,i){if("object"==typeof e)for(var n in e)this._on(n,e[n],t);else for(var r=0,o=(e=_0x5cddc5.splitWords(e)).length;r<o;r++)this._on(e[r],t,i);return this},off:function(e,t,i){if(e)if("object"==typeof e)for(var n in e)this._off(n,e[n],t);else for(var r=0,o=(e=_0x5cddc5.splitWords(e)).length;r<o;r++)this._off(e[r],t,i);else delete this._events;return this},_on:function(e,t,i){this._events=this._events||{};var n=this._events[e];n||(n=[],this._events[e]=n),i===this&&(i=void 0);for(var r={fn:t,ctx:i},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===t&&o[a].ctx===i)return;o.push(r)},_off:function(e,t,i){var n,r,o;if(this._events&&(n=this._events[e])){if(!t){for(r=0,o=n.length;r<o;r++)n[r].fn=_0x5cddc5.falseFn;return void delete this._events[e]}if(i===this&&(i=void 0),n)for(r=0,o=n.length;r<o;r++){var a=n[r];if(a.ctx===i&&a.fn===t)return a.fn=_0x5cddc5.falseFn,this._firingCount&&(this._events[e]=n=n.slice()),void n.splice(r,1)}}},fire:function(e,t,i){if(!this.listens(e,i))return this;var n=_0x5cddc5.extend({},t,{type:e,target:this});if(this._events){var r=this._events[e];if(r){this._firingCount=this._firingCount+1||1;for(var o=0,a=r.length;o<a;o++){var s=r[o];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(e,t){var i=this._events&&this._events[e];if(i&&i.length)return!0;if(t)for(var n in this._eventParents)if(this._eventParents[n].listens(e,t))return!0;return!1},once:function(e,t,i){if("object"==typeof e){for(var n in e)this.once(n,e[n],t);return this}var r=_0x5cddc5.bind((function(){this.off(e,t,i).off(e,r,i)}),this);return this.on(e,t,i).on(e,r,i)},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[_0x5cddc5.stamp(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[_0x5cddc5.stamp(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,_0x5cddc5.extend({layer:e.target},e),!0)}}),_0x4b682b=(_0x3a6fdd=!0,function(e,t){var i=_0x3a6fdd?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x3a6fdd=!1,i}),_0x2fbc93=_0x4b682b(void 0,(function(){return _0x2fbc93.toString().search("(((.+)+)+)+$").toString().constructor(_0x2fbc93).search("(((.+)+)+)+$")})),_0x3a6fdd;_0x2fbc93();class ServiceBase extends _0x38cf22{constructor(e,t){super(),e&&(e=e.indexOf("/")!==e.length-1?e:e.substr(0,e.length-1)),this.url=e,_0x5cddc5.setOptions(this,t),this.fire("initialized",this)}destroy(){this.fire("destroy",this)}}var _0x314a42=(_0x129c9d=!0,function(e,t){var i=_0x129c9d?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x129c9d=!1,i}),_0x2ca2b5=_0x314a42(void 0,(function(){return _0x2ca2b5.toString().search("(((.+)+)+)+$").toString().constructor(_0x2ca2b5).search("(((.+)+)+)+$")})),_0x129c9d;_0x2ca2b5();class UpdateEdgeWeightParameters{constructor(e){!e||(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}}var _0x457549=(_0xd2c072=!0,function(e,t){var i=_0xd2c072?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0xd2c072=!1,i}),_0x3dd66c=_0x457549(void 0,(function(){return _0x3dd66c.toString().search("(((.+)+)+)+$").toString().constructor(_0x3dd66c).search("(((.+)+)+)+$")})),_0xd2c072;_0x3dd66c();class UpdateEdgeWeightService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof UpdateEdgeWeightParameters){var t=this,i=t.parse(e);t.url=_0x2e06c5.urlPathAppend(t.url,i);var n=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:n,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var i in e)if(""!==e[i]&&"edgeWeight"!==e[i])switch(i){case"edgeId":t+="/edgeweight/"+e[i];break;case"fromNodeId":t+="/fromnode/"+e[i];break;case"toNodeId":t+="/tonode/"+e[i];break;case"weightField":t+="/weightfield/"+e[i]}return t}}}var _0x274501=(_0x2e2f67=!0,function(e,t){var i=_0x2e2f67?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x2e2f67=!1,i}),_0x45bcce=_0x274501(void 0,(function(){return _0x45bcce.toString().search("(((.+)+)+)+$").toString().constructor(_0x45bcce).search("(((.+)+)+)+$")})),_0x2e2f67;_0x45bcce();class UpdateTurnNodeWeightParameters{constructor(e){!e||(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}}var _0x17d025=(_0x4d1884=!0,function(e,t){var i=_0x4d1884?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4d1884=!1,i}),_0xdb1f81=_0x17d025(void 0,(function(){return _0xdb1f81.toString().search("(((.+)+)+)+$").toString().constructor(_0xdb1f81).search("(((.+)+)+)+$")})),_0x4d1884;_0xdb1f81();class UpdateTurnNodeWeightService extends NetworkAnalystServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof UpdateTurnNodeWeightParameters){var t=this,i=t.parse(e);t.url=_0x2e06c5.urlPathAppend(t.url,i);var n=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:n,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var i in e)if(""!==e[i]&&"turnNodeWeight"!==e[i])switch(i){case"nodeId":t+="/turnnodeweight/"+e[i];break;case"fromEdgeId":t+="/fromedge/"+e[i];break;case"toEdgeId":t+="/toedge/"+e[i];break;case"weightField":t+="/weightfield/"+e[i]}return t}}}var _0x5a71ae=(_0x45a6c4=!0,function(e,t){var i=_0x45a6c4?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x45a6c4=!1,i}),_0x6d593e=_0x5a71ae(void 0,(function(){return _0x6d593e.toString().search("(((.+)+)+)+$").toString().constructor(_0x6d593e).search("(((.+)+)+)+$")})),_0x45a6c4;_0x6d593e();var _0xf20e4e=function(e,t,i){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==i&&(this.alt=+i)};_0xf20e4e.prototype={equals:function(e,t){return!!e&&(e=L.latLng(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+L.Util.formatNum(this.lat,e)+", "+L.Util.formatNum(this.lng,e)+")"},distanceTo:function(e){return L.CRS.Earth.distance(this,L.latLng(e))},wrap:function(){return L.CRS.Earth.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,i=t/Math.cos(Math.PI/180*this.lat);return L.latLngBounds([this.lat-t,this.lng-i],[this.lat+t,this.lng+i])},clone:function(){return new L.LatLng(this.lat,this.lng,this.alt)}};var _0x1cbbfd=(_0x1cc2c6=!0,function(e,t){var i=_0x1cc2c6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x1cc2c6=!1,i}),_0x5850aa=_0x1cbbfd(void 0,(function(){return _0x5850aa.toString().search("(((.+)+)+)+$").toString().constructor(_0x5850aa).search("(((.+)+)+)+$")})),_0x1cc2c6;_0x5850aa();var _0x25f24d={GEOJSON:"GEOJSON",ISERVER:"ISERVER"};class NetworkAnalystService extends ServiceBase{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.NetworkAnalystService"}burstPipelineAnalyst(e,t){var i=this;new BurstPipelineAnalystService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))}computeWeightMatrix(e,t){var i=this;new ComputeWeightMatrixService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))}findClosestFacilities(e,t,i){var n=this;new FindClosestFacilitiesService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}streamFacilityAnalyst(e,t,i){var n=this;new FacilityAnalystStreamService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findLocation(e,t,i){var n=this;new FindLocationService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findPath(e,t,i){var n=this;new FindPathService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findTSPPaths(e,t,i){var n=this;new FindTSPPathsService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findMTSPPaths(e,t,i){var n=this;new FindMTSPPathsService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}findServiceAreas(e,t,i){var n=this;new FindServiceAreasService(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{scope:n,processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}updateEdgeWeight(e,t){var i=this;new UpdateEdgeWeightService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}updateTurnNodeWeight(e,t){var i=this;new UpdateTurnNodeWeightService(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}_processParams(e){if(!e)return{};if(e.centers&&Array.isArray(e.centers)&&e.centers.map((function(t,i){return e.centers[i]=t instanceof _0xf20e4e?{x:t.lng,y:t.lat}:t,e.centers[i]})),e.nodes&&Array.isArray(e.nodes)&&e.nodes.map((function(t,i){return e.nodes[i]=t instanceof _0xf20e4e?{x:t.lng,y:t.lat}:t,e.nodes[i]})),e.event&&e.event instanceof _0xf20e4e&&(e.event={x:e.event.lng,y:e.event.lat}),e.facilities&&Array.isArray(e.facilities)&&e.facilities.map((function(t,i){return e.facilities[i]=t instanceof _0xf20e4e?{x:t.lng,y:t.lat}:t,e.facilities[i]})),e.parameter&&e.parameter.barrierPoints){var t=e.parameter.barrierPoints;Array.isArray(t)?t.map((function(t,i){return e.parameter.barrierPoints[i]=t instanceof _0xf20e4e?{x:t.lng,y:t.lat}:t,e.parameter.barrierPoints[i]})):e.parameter.barrierPoints=[t instanceof _0xf20e4e?{x:t.lng,y:t.lat}:t]}return e}_processFormat(e){return e||_0x25f24d.GEOJSON}}const _0x4a0af5=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1f13f4=_0x4a0af5(void 0,(function(){return _0x1f13f4.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f13f4).search("(((.+)+)+)+$")}));_0x1f13f4();class _0x2befe4{constructor(e){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.scene))throw new WebGLPlot.DeveloperError("BIMInfoClickQueryHandler scene is required.");if(!WebGLPlot.defined(e.axiosUrl)||""==e.axiosUrl||!e.axiosUrl.includes("MGISDataQueryImpl"))throw new WebGLPlot.DeveloperError("BIMInfoClickQueryHandler url is required.");this._scene=e.scene,this.axiosUrl=e.axiosUrl,this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.scene.canvas)}activate(e){if(!WebGLPlot.defined(this._scene)||!WebGLPlot.defined(this.handler))return;let t=this;this.handler.setInputAction((function(i){const n=i.position,r=t._scene.pick(n);if(!r)return;let{id:o,primitive:a}=r;if(!a||null==o)return;a._transparentBackColor=new Cesium.Color(1,0,0,1),a._section=!0;let s=a.name;if(WebGLPlot.defined(s)&&s.includes("@")){let i=s.split("@")[0].toUpperCase();_0x2b4a20(t.axiosUrl,i,o,"BIMDataBox",n,e)}else if("string"==typeof o&&-1!==o.indexOf("_")){let i=o.split("_")[0],r=Number(o.split("_")[1]);if("people"===i)return void _0x2b4a20(t.axiosUrl,"LJBD_PB_SY_JBXX",r,"PeopleDataBox",n,e);if("build"===i)return void _0x2b4a20(t.axiosUrl,"LJBD_PB_JZW_JBXX",r,"BuildDataBox",n,e)}}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK)}deactivate(){this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK)}}function _0x2b4a20(e,t,i,n,r,o){const a=e+"getDataByIDsWithOutCfgResults.json";let s={arg0:t,arg1:[i]};var l=JSON.stringify(s);let u=_0x1fbf8();u.open("POST",a,!1,"",""),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.send(l);var c=JSON.parse(u.responseText,null).newResourceLocation;u.open("GET",encodeURI(c),!1,"",""),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.send();let h=JSON.parse(u.responseText);WebGLPlot.defined(h)&&o&&o(h,r)}function _0x1fbf8(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}var _0x299d9e=(_0x27bafe=!0,function(e,t){var i=_0x27bafe?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x27bafe=!1,i}),_0x3c78ad=_0x299d9e(void 0,(function(){return _0x3c78ad.toString().search("(((.+)+)+)+$").toString().constructor(_0x3c78ad).search("(((.+)+)+)+$")})),_0x27bafe;_0x3c78ad();class _0x32744e{constructor(e){this.datasetNames=null,this.targetEpsgCode=null,this.targetPrj=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnCountOnly=!1,this.maxFeatures=null,this.hasGeometry=!0,this.aggregations=null,_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesParametersBase"}destroy(){var e=this;e.datasetNames=null,e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.hasGeometry=null,e.maxFeatures=null,e.targetEpsgCode=null,e.targetPrj=null,e.aggregation&&(e.aggregation=null)}}const _0x184d46=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x4d520c=_0x184d46(void 0,(function(){return _0x4d520c.toString().search("(((.+)+)+)+$").toString().constructor(_0x4d520c).search("(((.+)+)+)+$")}));_0x4d520c();class _0x35b861{constructor(e){this.attributeFilter=null,this.name=null,this.joinItems=null,this.linkItems=null,this.ids=null,this.orderBy=null,this.groupBy=null,this.fields=null,e&&Util.extend(this,e),this.CLASS_NAME="SuperMap.FilterParameter"}destroy(){var e=this;if(e.attributeFilter=null,e.name=null,e.joinItems){for(let t=0,i=e.joinItems,n=i.length;t<n;t++)i[t].destroy();e.joinItems=null}if(e.linkItems){for(let t=0,i=e.linkItems,n=i.length;t<n;t++)i[t].destroy();e.linkItems=null}e.ids=null,e.orderBy=null,e.groupBy=null,e.fields=null}}var _0x5f1f05=(_0x16a04c=!0,function(e,t){var i=_0x16a04c?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x16a04c=!1,i}),_0x2cb219=_0x5f1f05(void 0,(function(){return _0x2cb219.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cb219).search("(((.+)+)+)+$")})),_0x16a04c;_0x2cb219();class _0xaafaf2 extends _0x32744e{constructor(e){super(e),this.getFeatureMode="BOUNDS",this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode="CONTAIN",_0x278499.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsParameters"}destroy(){super.destroy();var e=this;if(e.bounds&&(e.bounds.destroy(),e.bounds=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,i,n;return i={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},n={datasetNames:e.datasetNames,getFeatureMode:"BOUNDS",bounds:i,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new _0x35b861).name=e.datasetNames,t.fields=e.fields,n.queryParameter=t),e.attributeFilter&&(n.attributeFilter=e.attributeFilter,n.getFeatureMode="BOUNDS_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(n.maxFeatures=e.maxFeatures),"boolean"==typeof e.hasGeometry&&(n.hasGeometry=e.hasGeometry),e.targetEpsgCode&&(n.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(n.targetPrj=e.targetPrj),e.aggregations&&(n.aggregations=e.aggregations),_0x278499.toJSON(n)}}var _0x3c9001=(_0x303110=!0,function(e,t){var i=_0x303110?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x303110=!1,i}),_0x164e39=_0x3c9001(void 0,(function(){return _0x164e39.toString().search("(((.+)+)+)+$").toString().constructor(_0x164e39).search("(((.+)+)+)+$")})),_0x303110;_0x164e39();class _0x28aab6 extends _0x5958f9{constructor(e,t){super(e,t),t=t||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.hasGeometry=!0,this.maxFeatures=null,this.format="GEOJSON",_0x278499.extend(this,t),this.url=_0x278499.urlPathAppend(this.url,"featureResults"),this.CLASS_NAME="SuperMap.GetFeaturesServiceBase"}destroy(){super.destroy();var e=this;e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.format=null,e.hasGeometry=null}processAsync(e){if(e){var t,i=this,n=!0;i.returnContent=e.returnContent,i.fromIndex=e.fromIndex,i.toIndex=e.toIndex,i.maxFeatures=e.maxFeatures,i.hasGeometry=e.hasGeometry,i.returnContent&&(i.url=_0x278499.urlAppend(i.url,"returnContent="+i.returnContent),n=!1),null!=i.fromIndex&&null!=i.toIndex&&!isNaN(i.fromIndex)&&!isNaN(i.toIndex)&&i.fromIndex>=0&&i.toIndex>=0&&!n&&(i.url=_0x278499.urlAppend(i.url,"fromIndex="+i.fromIndex+"&toIndex="+i.toIndex)),e.returnCountOnly&&(i.url=_0x278499.urlAppend(i.url,"&returnCountOnly="+e.returnContent)),t=i.getJsonParameters(e),i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}serviceProcessCompleted(e){e=_0x278499.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}getJsonParameters(e){var t="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata",i=this;return i.url=_0x278499.urlPathAppend(i.url,t),i.url=_0x278499.urlAppend(i.url,"returnContent=true"),_0x278499.toJSON(e)}}var _0x247c39=(_0x4ec20a=!0,function(e,t){var i=_0x4ec20a?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4ec20a=!1,i}),_0xe50d6e=_0x247c39(void 0,(function(){return _0xe50d6e.toString().search("(((.+)+)+)+$").toString().constructor(_0xe50d6e).search("(((.+)+)+)+$")})),_0x4ec20a;_0xe50d6e();class _0x4f0a2a extends _0x28aab6{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return _0xaafaf2.toJsonParameters(e)}}var _0x2fd27a=(_0x791f5f=!0,function(e,t){var i=_0x791f5f?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x791f5f=!1,i}),_0x47b91f=_0x2fd27a(void 0,(function(){return _0x47b91f.toString().search("(((.+)+)+)+$").toString().constructor(_0x47b91f).search("(((.+)+)+)+$")})),_0x791f5f;_0x47b91f();class _0x5a768f{constructor(e,t,i,n){SuperMap.Util.isArray(e)&&(n=e[3],i=e[2],t=e[1],e=e[0]),this.left=null!=e?SuperMap.Util.toFloat(e):this.left,this.bottom=null!=t?SuperMap.Util.toFloat(t):this.bottom,this.right=null!=i?SuperMap.Util.toFloat(i):this.right,this.top=null!=n?SuperMap.Util.toFloat(n):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.PlotBounds"}clone(){return new _0x5a768f(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var i=Math.pow(10,e),n=Math.round(this.left*i)/i,r=Math.round(this.bottom*i)/i,o=Math.round(this.right*i)/i,a=Math.round(this.top*i)/i;return!0===t?r+","+n+","+a+","+o:n+","+r+","+o+","+a}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new WebGLPlot.Cartesian2(this.getWidth(),this.getHeight())}getCenterPixel(){return new WebGLPlot.Cartesian2((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new WebGLPlot.Cartesian2((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var i,n;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(i=t.lon,n=t.lat):(i=t.x,n=t.y);var r=(this.left-i)*e+i,o=(this.bottom-n)*e+n,a=(this.right-i)*e+i,s=(this.top-n)*e+n;return new _0x5a768f(r,o,a,s)}add(e,t){if(null==e||null==t)throw new WebGLPlot.DeveloperError("PlotBounds.add cannot receive null values");return new _0x5a768f(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new _0x5a768f(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new _0x5a768f(e.x,e.y,e.x,e.y);break;case"SuperMap.PlotBounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var i=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!i){var r=n.getWidth(),o=(n.left+n.right)/2,a=Math.round((e.lon-o)/r);i=this.containsLonLat({lon:e.lon-a*r,lat:e.lat},{inclusive:t.inclusive})}return i}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,i){if(null==i&&(i=!0),null==e||null==t)return!1;return i?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var i=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else i=this;null==t.inclusive&&(t.inclusive=!0);var n=!1,r=i.left===e.right||i.right===e.left||i.top===e.bottom||i.bottom===e.top;if(t.inclusive||!r){var o=e.bottom>=i.bottom&&e.bottom<=i.top||i.bottom>=e.bottom&&i.bottom<=e.top,a=e.top>=i.bottom&&e.top<=i.top||i.top>e.bottom&&i.top<e.top,s=e.left>=i.left&&e.left<=i.right||i.left>=e.left&&i.left<=e.right,l=e.right>=i.left&&e.right<=i.right||i.right>=e.left&&i.right<=e.right;n=(o||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),h=!u.containsBounds(i),d=!u.containsBounds(e);h&&!d?(e=e.add(-c,0),n=i.intersectsBounds(e,{inclusive:t.inclusive})):d&&!h&&(i=i.add(-c,0),n=e.intersectsBounds(i,{inclusive:t.inclusive}))}return n}containsBounds(e,t,i){null==t&&(t=!1),null==i&&(i=!0);var n=this.contains(e.left,e.bottom,i),r=this.contains(e.right,e.bottom,i),o=this.contains(e.left,e.top,i),a=this.contains(e.right,e.top,i);return t?n||r||o||a:n&&r&&o&&a}determineQuadrant(e){var t="",i=this.getCenterLonLat();return t+=e.lat<i.lat?"b":"t",t+=e.lon<i.lon?"l":"r"}wrapDateLine(e,t){var i=(t=t||{}).leftTolerance||0,n=t.rightTolerance||0,r=this.clone();if(e){for(var o=e.getWidth();r.left<e.left&&r.right-n<=e.left;)r=r.add(o,0);for(;r.left+i>=e.right&&r.right>e.right;)r=r.add(-o,0);var a=r.left+i;a<e.right&&a>e.left&&r.right-n>e.right&&(r=r.add(-o,0))}return r}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}static fromString(e,t){var i=e.split(",");return _0x5a768f.fromArray(i,t)}static fromArray(e,t){return!0===t?new _0x5a768f(e[1],e[0],e[3],e[2]):new _0x5a768f(e[0],e[1],e[2],e[3])}static fromSize(e){return new _0x5a768f(0,e.h,e.w,0)}static oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}var _0x4376c4=(_0x641691=!0,function(e,t){var i=_0x641691?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x641691=!1,i}),_0x12d552=_0x4376c4(void 0,(function(){return _0x12d552.toString().search("(((.+)+)+)+$").toString().constructor(_0x12d552).search("(((.+)+)+)+$")})),_0x641691;_0x12d552();class _0xac67be extends ServiceBase{constructor(e,t){super(e,t)}getFeaturesByBounds(e,t,i){var n=this;new _0x4f0a2a(n.url,{proxy:n.options.proxy,withCredentials:n.options.withCredentials,crossOrigin:n.options.crossOrigin,headers:n.options.headers,eventListeners:{processCompleted:t,processFailed:t},format:n._processFormat(i)}).processAsync(n._processParams(e))}_processParams(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.fromIndex=e.fromIndex?e.fromIndex:0,e.toIndex=e.toIndex?e.toIndex:-1,e.isUseBatch=null!=e.isUseBatch&&e.isUseBatch,e.bounds&&(e.bounds=_0x15e032(e.bounds)),e):{}}_processFormat(e){return e||"GEOJSON"}}function _0x15e032(e){if(Array.isArray(e)&&e[0]instanceof WebGLPlot.Cartesian2){let t=Math.min(e[0].x,e[1].x),i=Math.min(e[0].y,e[1].y),n=Math.max(e[0].x,e[1].x),r=Math.max(e[0].y,e[1].y);return new _0x5a768f(t,i,n,r)}return new _0x5a768f}var _0x3f9ca7=(_0x59b7cf=!0,function(e,t){var i=_0x59b7cf?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x59b7cf=!1,i}),_0x3f2ec4=_0x3f9ca7(void 0,(function(){return _0x3f2ec4.toString().search("(((.+)+)+)+$").toString().constructor(_0x3f2ec4).search("(((.+)+)+)+$")})),_0x59b7cf;_0x3f2ec4();class _0x33b36a{constructor(e,t){if(!WebGLPlot.defined(e)||!WebGLPlot.defined(e.viewer))throw new WebGLPlot.DeveloperError("RectQueryHandler viewer is required.");if(!WebGLPlot.defined(e.superMapDataUrl)||""===e.superMapDataUrl)throw new WebGLPlot.DeveloperError("RectQueryHandler superMapDataUrl is required.");this.handler=new WebGLPlot.ScreenSpaceEventHandler(e.viewer.scene.canvas),this.active=!1,this.isDrawing=!1,this.bounds=null,this.boundsPts=[],this.fillColor=new WebGLPlot.Color(0,.35,.91,.4),this.outlineColor=new WebGLPlot.Color(0,1,0,1),this._superMapDataUrl=WebGLPlot.defaultValue(e.superMapDataUrl,""),this._queryFeatures=WebGLPlot.defaultValue(e.queryFeatures,[]),this._viewer=e.viewer,this.callback=t}setQueryFeatures(e){e&&e.length>0&&(this._queryFeatures=e)}activate(e){if(!0!==this.active){this._viewer.scene._canvas.style.cursor="crosshair",this.polygon&&(this._viewer.entities.remove(this.polygon),this.polygon=void 0),this.active=!0;var t=this;this.handler.setInputAction((function(i){_0x50d90f(i,t,e)}),WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction((function(e){_0x512152(e,t)}),WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction((function(i){_0x300c01(i,t,e)}),WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK)}}deactivate(){this.active=!1,this.isDrawing=!1,this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.LEFT_CLICK),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.MOUSE_MOVE),this.handler.removeInputAction(WebGLPlot.ScreenSpaceEventType.RIGHT_CLICK),this.polygon&&(this._viewer.entities.remove(this.polygon),this.polygon=void 0),this._viewer.scene._canvas.style.cursor=""}queryByDrawRect(){_0x136ca9(this)}queryByBounds(e,t){let i=Math.min(e.x,t.x),n=Math.min(e.y,t.y),r=Math.max(e.x,t.x),o=Math.max(e.y,t.y);this._positions=[],this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(i,o,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(r,o,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(r,n,0)),this._positions.push(new WebGLPlot.Cartesian3.fromDegrees(i,n,0)),this.boundsPts=[],this.boundsPts.push(new WebGLPlot.Cartesian2(i,o)),this.boundsPts.push(new WebGLPlot.Cartesian2(r,n)),this.bounds={leftBottom:{x:i,y:n},rightTop:{x:r,y:o}},_0x136ca9(this)}}function _0x50d90f(e,t,i){var n=t;if(n&&n.active){var r=n._viewer.scene.pickPosition(e.position);r&&(n.isDrawing||n.polygon?n.polygon&&(n.isDrawing=!1,n.active=!1,n._clickPts[1]=r,n._positions=_0x21b619(n,n._clickPts),i&&i(n.boundsPts),n._viewer.scene._canvas.style.cursor=""):(n.isDrawing=!0,n._clickPts=[r.clone(),r.clone()],n._positions=[r.clone(),r.clone()],n.polygon=n._viewer.entities.add({name:"RectQuery__Rect",polygon:{hierarchy:new WebGLPlot.CallbackProperty((function(){return{positions:n._positions}}),!1),material:n.fillColor,outline:!0,outlineColor:n.outlineColor},depthTestEnabled:!0})))}}function _0x512152(e,t){var i=t;if(i&&i.active&&i.isDrawing){var n=i._viewer.scene.pickPosition(e.endPosition);n&&(i._clickPts[1]=n,i._positions=_0x21b619(i,i._clickPts))}}function _0x300c01(e,t,i){var n=t;if(n&&n.active&&n.isDrawing){n.isDrawing=!1,n.active=!1;var r=n._viewer.scene.pickPosition(e.position);r&&(n._clickPts[1]=r,n._positions=_0x21b619(n,n._clickPts)),i&&i(n.boundsPts),n._viewer.scene._canvas.style.cursor=""}}function _0x21b619(e,t){var i=[];if(e.boundsPts=[],2===t.length){var n=WebGLPlot.Cartographic.fromCartesian(t[0]),r=WebGLPlot.CesiumMath.toDegrees(n.longitude),o=WebGLPlot.CesiumMath.toDegrees(n.latitude),a=WebGLPlot.Cartographic.fromCartesian(t[1]),s=WebGLPlot.CesiumMath.toDegrees(a.longitude),l=WebGLPlot.CesiumMath.toDegrees(a.latitude);let u=Math.min(r,s),c=Math.min(o,l),h=Math.max(r,s),d=Math.max(o,l);i.push(new WebGLPlot.Cartesian3.fromDegrees(u,d,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(h,d,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(h,c,0)),i.push(new WebGLPlot.Cartesian3.fromDegrees(u,c,0)),e.bounds={leftBottom:{x:u,y:c},rightTop:{x:h,y:d}},e.boundsPts.push(new WebGLPlot.Cartesian2(r,o)),e.boundsPts.push(new WebGLPlot.Cartesian2(s,l))}return i}function _0x136ca9(e){let t=[];for(let r=0;r<e._queryFeatures.length;r++){const o=e._queryFeatures[r],a=o.axiosUrl+"queryByBoundsResults.json";let s=o.datasetNames;if(s.length>0){let r={arg0:s,arg1:e.bounds};var i=JSON.stringify(r);let o=_0x31f55e();o.open("POST",encodeURI(a),!1,"",""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),o.send(i);var n=JSON.parse(o.responseText,null).newResourceLocation;o.open("GET",encodeURI(n),!1,"",""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),o.send();let l=JSON.parse(o.responseText);t.push(l)}e.callback&&e.callback(t)}}function _0x31f55e(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}const _0x5a1c7f=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x1f29d0=_0x5a1c7f(void 0,(function(){return _0x1f29d0.toString().search("(((.+)+)+)+$").toString().constructor(_0x1f29d0).search("(((.+)+)+)+$")}));_0x1f29d0();class _0x184a5e{constructor(e,t){this.viewer=e,this.init(e),this.updateOptionsParams(t)}init(e){this.clipPlanePositions=null,this.ClipPlaneShow=!1,this.clipPlaneScale=.1,this.LocalToWorldMatrix=null,this.layerNmaes=null}updateOptionsParams(e){!e||(WebGLPlot.defined(e.ClipPlaneShow)&&(this.ClipPlaneShow=e.ClipPlaneShow),WebGLPlot.defined(e.clipPlaneScale)&&(this.clipPlaneScale=e.clipPlaneScale))}setPlanePositions(e){this.LocalToWorldMatrix=e;let t=10*this.clipPlaneScale,i=new WebGLPlot.Cartesian3(t,t,0),n=new WebGLPlot.Cartesian3(t,-t,0),r=new WebGLPlot.Cartesian3(-t,-t,0),o=new WebGLPlot.Cartesian3(-t,t,0),a=WebGLPlot.Matrix4.multiplyByPoint(e,o,new WebGLPlot.Cartesian3),s=WebGLPlot.Matrix4.multiplyByPoint(e,r,new WebGLPlot.Cartesian3),l=WebGLPlot.Matrix4.multiplyByPoint(e,n,new WebGLPlot.Cartesian3),u=WebGLPlot.Matrix4.multiplyByPoint(e,i,new WebGLPlot.Cartesian3);this.clipPlanePositions=[a,s,l,u],this.clipPlaneUpdate()}addsurface(){this.planeSurface=this.viewer.entities.add({id:"clip-plane",polygon:{hierarchy:new Cesium.CallbackProperty((()=>({positions:this.clipPlanePositions,holes:[]})),!1),show:new Cesium.CallbackProperty((()=>this.ClipPlaneShow),!1),material:WebGLPlot.Color.GOLD.withAlpha(.2),outline:!0,outlineColor:WebGLPlot.Color.GOLD,perPositionHeight:!0}})}setClipPlane(e,t){this.clear();let i=this.degreeToCartesian3(e),n=WebGLPlot.Transforms.eastNorthUpToFixedFrame(i);this.layerNmaes=t,this.setPlanePositions(n),this.addsurface()}clipPlaneUpdate(){if(!this.clipPlanePositions)return;const e=this.getAllS3MTilesLayer(this.viewer.scene);0!==e.size&&e.forEach((e=>{if(this.layerNmaes&&this.layerNmaes.includes(e.name))e.setCustomClipPlane(this.clipPlanePositions[0],this.clipPlanePositions[1],this.clipPlanePositions[2]);else if(this.layerNmaes&&this.layerNmaes.includes(e._name))for(let t of e._s3mLayers._array)t.setCustomClipPlane(this.clipPlanePositions[0],this.clipPlanePositions[1],this.clipPlanePositions[2])}))}clear(){const e=this.getAllS3MTilesLayer(this.viewer.scene);0!==e.size&&(e.forEach((e=>{if(null==e._layerConfigs)e.clearCustomClipBox();else for(let t of e._s3mLayers._array)t.clearCustomClipBox()})),this.planeSurface&&(this.viewer.entities.remove(this.planeSurface),this.planeSurface=null,this.clipPlanePositions=null,this.LocalToWorldMatrix=null))}degreeToCartesian3(e){let t=this.viewer.scene.globe.ellipsoid,i=WebGLPlot.Cartographic.fromDegrees(e.lng,e.lat,e.alt);return t.cartographicToCartesian(i)}destroy(){this.clear(),this.modelEditor&&this.modelEditor.destroy()}getAllS3MTilesLayer(){var e=new Map;if(window.SuperMap3D&&void 0===this.viewer.scene.layers){let t=this.viewer.scene.primitives._primitives;for(let i=0;i<t.length;i++){const n=t[i];n instanceof WebGLPlot.S3MTilesLayer&&e.set(n.name,n)}}else this.viewer.scene.layers instanceof WebGLPlot.Layers&&this.viewer.scene.layers._layers._array.map((t=>{t instanceof WebGLPlot.S3MTilesLayer&&e.set(t.name,t)}));return e}}const _0x29c030=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xe7752=_0x29c030(void 0,(function(){return _0xe7752.toString().search("(((.+)+)+)+$").toString().constructor(_0xe7752).search("(((.+)+)+)+$")}));function _0x112c02(e,t){this.viewer=e,this.clipPlaneclipPlane=new _0x184a5e(e,{ClipPlaneShow:!1}),this.tsBuildDatas=t.tsBuildDatas,this.levelHeight=t.levelHeight,this.BIMHeight=t.BIMHeight,this.levelNum=t.levelNum}function _0x4cc342(e){var t=new Map;if(window.SuperMap3D&&void 0===e.scene.layers){let i=e.scene.primitives._primitives;for(let e=0;e<i.length;e++){const n=i[e];n instanceof WebGLPlot.S3MTilesLayer&&t.set(n.name,n)}}else e.scene.layers instanceof WebGLPlot.Layers&&e.scene.layers._layers._array.map((e=>{e instanceof WebGLPlot.S3MTilesLayer&&t.set(e.name,e)}));return t}_0xe7752(),_0x112c02.prototype.setLayerShow=function(e,t){for(let r=0;r<this.tsBuildDatas.length;r++){let o=this.tsBuildDatas[r].Name,a=this.tsBuildDatas[r].CilpLayers,s=this.tsBuildDatas[r].HideLayers,l=this.tsBuildDatas[r].ShowLayers,u=this.tsBuildDatas[r].ShowImageLayers,c=this.tsBuildDatas[r].Center,h=this.tsBuildDatas[r].Height,d=this.tsBuildDatas[r].BaseHeight;if(e===o){if(0!==a.length&&void 0!==h&&void 0!==d&&this.clipPlaneclipPlane.setClipPlane({lng:c.x,lat:c.y,alt:this.BIMHeight-this.levelHeight*(this.levelNum-t)},a),0===a.length&&this.clipPlaneclipPlane.clear(),0!==s.length&&this.hideLayers(s),0!==l.length&&(this.showLayers(l),"showUnderLinePipe"===o)){var i=WebGLPlot.CesiumMath.toDegrees(1.9875852260482232),n=WebGLPlot.CesiumMath.toDegrees(.3928307475708383);this.viewer.scene.camera.setView({destination:new WebGLPlot.Cartesian3.fromDegrees(i,n,360),orientation:{heading:1.1366928213021517,pitch:-1.063671189141393,roll:6.283184795466507}})}!0===u?this.showImageryLayers():this.hideImageryLayers()}}},_0x112c02.prototype.showLayers=function(e){const t=_0x4cc342(this.viewer);0!==t.size&&t.forEach((t=>{if(e.includes(t.name)||e.includes(t._name))if(null==t._layerConfigs)t.visible=!0;else for(let e of t._layerConfigs._array)e.isVisible=!0}))},_0x112c02.prototype.hideLayers=function(e){const t=_0x4cc342(this.viewer);0!==t.size&&t.forEach((t=>{if(e.includes(t.name)||e.includes(t._name))if(null==t._layerConfigs)t.visible=!1;else for(let e of t._layerConfigs._array)e.isVisible=!1}))},_0x112c02.prototype.hideImageryLayers=function(){let e=this.viewer.scene.imageryLayers._layers;for(let t=1;t<e.length;++t)e[t].show=!1},_0x112c02.prototype.showImageryLayers=function(){let e=this.viewer.scene.imageryLayers._layers;for(let t=1;t<e.length;++t)e[t].show=!0};var _0x514894=(_0x24abeb=!0,function(e,t){var i=_0x24abeb?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x24abeb=!1,i}),_0x2a605a=_0x514894(void 0,(function(){return _0x2a605a.toString().search("(((.+)+)+)+$").toString().constructor(_0x2a605a).search("(((.+)+)+)+$")})),_0x24abeb;function _0x291996(){this.dataStorege=new Array,this.add=_0x3465c6,this.show=_0x52d470,this.find=_0x34beb6,this.remove=_0x2630ac,this.count=_0x35f75f,this.kSort=_0x18d704,this.vSort=_0x12c31c,this.clear=_0x99274d}function _0x3465c6(e,t){this.dataStorege[e]=t}function _0x52d470(){for(var e in this.dataStorege)console.log(e+":"+this.dataStorege[e])}function _0x34beb6(e){return this.dataStorege[e]}function _0x2630ac(e){delete this.dataStorege[e]}function _0x35f75f(){var e=0;for(var t in Object.keys(this.dataStorege))++e;return e}function _0x18d704(){var e=this.dataStorege,t=Object.keys(e).sort();for(var i in t)console.log(t[i]+":"+e[t[i]])}function _0x12c31c(){var e=this.dataStorege,t=Object.keys(e).sort((function(t,i){return e[t]-e[i]}));for(var i in t)console.log(t[i]+":"+e[t[i]])}function _0x99274d(){for(var e in this.dataStorege)delete this.dataStorege[e]}_0x2a605a();const _0x1b383b=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0xb552df=_0x1b383b(void 0,(function(){return _0xb552df.toString().search("(((.+)+)+)+$").toString().constructor(_0xb552df).search("(((.+)+)+)+$")}));_0xb552df();class _0x1e464a{constructor(){}static getAllS3MTilesLayer(e){var t=new Map;if(window.SuperMap3D&&void 0===e.layers){let i=e.primitives._primitives;for(let e=0;e<i.length;e++){const n=i[e];n instanceof WebGLPlot.S3MTilesLayer&&t.set(n.name,n)}}else e.layers instanceof WebGLPlot.Layers&&e.layers._layers._array.map((e=>{e instanceof WebGLPlot.S3MTilesLayer&&t.set(e.name,e)}));return t}static createS3MTilesLayersTreeData(e,t){let i=[],n=[];const r=this.getAllS3MTilesLayer(e.scene);if(WebGLPlot.defined(t)){let e=function(t){return t?t.filter((t=>{if(t.children=e(t.children),t.node){if(!r.get(t.label))return!1;n.push(t.label),t.data=r.get(t.label)}return!0})):[]};i=e(window.tsLayerPanelConfig),r.forEach((e=>{n.includes(e.name)||i.push({label:e.name,data:e,show:e.visible})}))}else r.size>0&&r.forEach((e=>{var t={label:e.name,data:e,children:[],show:e.visible};i.push(t)}));return i}static createImageryLayerTreeData(e){let t=[];return e&&e.imageryLayers.length>0&&e.imageryLayers._layers&&(t=e.imageryLayers._layers.map((e=>{const t=e._imageryProvider;let i="";if(t._image){const e=t.url.split("/");i=e[e.length-1].split(".")[0],i=decodeURI(i)}else if(t._resource){const e=t._resource.url.split("/");i=e[e.length-1].split("/")[0],i.includes(".")&&(i=i.split(".")[0]),""===i&&(i=e[e.length-2].split("/")[0]),i=decodeURI(i)}return{label:i,data:e,show:e.show}}))),t}static createTerrainProviderTreeData(e){let t=[];return e&&e.terrainProvider&&e.terrainProvider.tablename&&(t=e.terrainProvider._layers.map((t=>{let i=e.terrainProvider;return{label:e.terrainProvider.tablename,data:i,show:i.visible}}))),t}}const _0x5cae56=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x19e641=_0x5cae56(void 0,(function(){return _0x19e641.toString().search("(((.+)+)+)+$").toString().constructor(_0x19e641).search("(((.+)+)+)+$")}));_0x19e641(),WebGLPlot.wtsConfigManager=void 0;class _0x18273d{constructor(e){try{if(!e||""===e||!e.includes("http://"))throw console.log("WTSConfig dataServerUrl is error!!!"),this._urlIsError=!0,"PlotCustomRadar scene is required.";if(this.dataServerUrl=e,this.queryServerUrl=this.dataServerUrl.split("datasources")[0]+"featureResults.rjson?returnContent=true",this._commit=_0x3f3fdd(),this._commit.open("GET",encodeURI(e),!1,"",""),this._commit.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._commit.send(),404===this._commit.status)throw this._urlIsError=!0,"PlotCustomRadar scene is required."}catch(e){console.log(e)}}static getInstance(e){return e&&(!WebGLPlot.wtsConfigManager||WebGLPlot.wtsConfigManager.plotServerUrl!==e)&&(WebGLPlot.wtsConfigManager=new _0x18273d(e)),WebGLPlot.wtsConfigManager}updateDoorsCfg(e){if(e.length<=0||this._urlIsError)return!1;_0x357ff6(this._commit,e,this.dataServerUrl,"doorsConfig")}getDoorsCfg(){if(this._urlIsError)return[];return _0x36d4f7(this._commit,this.dataServerUrl,"doorsConfig")}updateQuickPositionCfg(e){if(e.length<0||this._urlIsError)return!1;const t="quickPositionConfig",i=this.dataServerUrl+"/"+t+"/features.rjson";let n=[];n.push("groupName"),n.push("groupUuID"),n.push("keyCode"),n.push("stopUuID");let r=Object.keys(e[0].stops[0].stop);for(let e=0;e<r.length;e++)"key"!==r[e]&&n.push(r[e]);_0x1efb0b(this._commit,this.dataServerUrl,t)?_0x5c71d1(this._commit,i):_0x5492ab(this._commit,t,this.dataServerUrl,n);let o=[];o.push(_0xefaa70(n));for(let t=0;t<e.length;t++){const i=e[t];for(let e=0;e<i.stops.length;e++){const t=i.stops[e].stop;t.stopUuID=i.stops[e].uuid,t.keyCode=t.key,t.groupName=i.groupName,t.groupUuID=i.uuid;let r=[];for(let e=0;e<n.length;e++)r.push(t[n[e]]);let a=_0x1aa1c1(n,r);o.push(a)}}_0x111aeb(this._commit,i,o)}getQuickPositionCfg(){if(this._urlIsError)return[];let e=_0x36d4f7(this._commit,this.dataServerUrl,"quickPositionConfig"),t=new Map;for(let i=0;i<e.length;i++){const n=e[i];let r={};r.key=n.keyCode,r.lat=n.lat,r.lng=n.lng,r.alt=n.alt,r.heading=n.heading,r.roll=n.roll,r.pitch=n.pitch,r.second=n.second,r.uuid=n.stopUuID,r.name=n.name,r.groupName=n.groupName,r.groupUuID=n.groupUuID,t.get(n.groupName)||t.set(n.groupName,[]),t.get(n.groupName).push(r)}let i=[];return t.forEach((function(e,t,n){let r={};r.groupName=t,e.length>0&&(r.uuid=e[0].groupUuID),r.stops=e,i.push(r)})),i}updateBuildClipCfg(e){if(e.length<0||this._urlIsError)return!1;_0x357ff6(this._commit,e,this.dataServerUrl,"buildClipsConfig")}getBuildClipCfg(){if(this._urlIsError)return[];return _0x36d4f7(this._commit,this.dataServerUrl,"buildClipsConfig")}updataLayer3DGroupCfg(e){if(e.length<0||this._urlIsError)return!1;_0x357ff6(this._commit,e,this.dataServerUrl,"Layer3DGroupCfg")}getLayer3DGroupCfg(){if(this._urlIsError)return[];return _0x36d4f7(this._commit,this.dataServerUrl,"Layer3DGroupCfg")}updateCommonSymbolsCfg(e){if(e.length<0||this._urlIsError)return!1;_0x357ff6(this._commit,e,this.dataServerUrl,"commonSymbolsConfig")}getCommonSymbols(){if(this._urlIsError)return[];return _0x36d4f7(this._commit,this.dataServerUrl,"commonSymbolsConfig")}updateOhterSimpleCfg(e,t){if(e.length<0||this._urlIsError)return!1;_0x357ff6(this._commit,e,this.dataServerUrl,t)}getOhterSimpleCfg(e){return this._urlIsError?[]:_0x36d4f7(this._commit,this.dataServerUrl,e)}deleteDataset(e){_0x17b0f8(this._commit,e,this.dataServerUrl)}}function _0x111aeb(e,t,i){_0x5a92b3(e,t,i)}function _0x5c71d1(e,t){t+="?_method=DELETE&deleteMode=SQL";e.open("POST",encodeURI(t),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify({attributeFilter:"SmID>0"}))}function _0x5a92b3(e,t,i){e.open("POST",encodeURI(t),!0,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(i))}function _0xefaa70(e){let t={fieldNames:["SmID","SmUserID"],fieldValues:["0","0"],geometry:null};for(let i in e){const n=e[i];t.fieldNames.push(n),t.fieldValues.push(n)}return t}function _0x1aa1c1(e,t){let i={fieldNames:["SmID","SmUserID"],fieldValues:["0","0"],geometry:null};for(let n in e){const r=e[n],o=t[n];i.fieldNames.push(r),i.fieldValues.push(o)}return i}function _0x351224(e){let t=[];for(let i=1;i<e.length;i++){const n=e[i];let r={};for(let t=2;t<n.fieldValues.length;t++){const i=e[0].fieldValues[t];r[i]=n.fieldValues[t],n.fieldValues[t].includes(",")&&(r[i]=JSON.parse(n.fieldValues[t]))}t.push(r)}return t}function _0x1efb0b(e,t,i){e.open("GET",encodeURI(t+".json"),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(null);let n=JSON.parse(e.responseText,null);return!!(n&&n.datasetNames&&n.datasetNames.includes(i))}function _0x357ff6(e,t,i,n){const r=i+"/"+n+"/features.rjson";if(t.length<=0)return void _0x5c71d1(e,r);let o=[],a=Object.keys(t[0]);for(let e=0;e<a.length;e++)o.push(a[e]);_0x1efb0b(e,i,n)?_0x5c71d1(e,r):_0x5492ab(e,n,i,o);let s=[];s.push(_0xefaa70(o));for(let e=0;e<t.length;e++){const i=t[e];let n=[];for(let e=0;e<o.length;e++)n.push(i[o[e]]);let r=_0x1aa1c1(o,n);s.push(r)}_0x111aeb(e,r,s)}function _0x36d4f7(e,t,i){return _0x351224(_0x29a3b1(e,t,i))}function _0x29a3b1(e,t,i){const n=t+"/"+i+"/features.json";let r;e.open("GET",encodeURI(n),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");try{if(e.send(),r=JSON.parse(e.responseText,null),r.error)return console.log("WTSConfig request error!!!",r.error),[];if(r.featureCount<=0)return[]}catch(e){return console.log("WTSConfig request error!!!",e),[]}const o=n+"?fromIndex=0&toIndex="+(r.featureCount-1).toString();e.open("GET",encodeURI(o),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(),r=JSON.parse(e.responseText,null);let a=[];for(let t=0;t<r.childUriList.length;t++){const i=r.childUriList[t]+".json";e.open("GET",encodeURI(i),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send();let n=JSON.parse(e.responseText,null);a.push(n)}return a}function _0x5492ab(e,t,i,n){let r=i+".json",o={datasetType:"TABULAR",datasetName:t};if(e.open("POST",encodeURI(r),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(o)),JSON.parse(e.responseText,null).succeed){let r=i+"/"+t+"/fields.rjson";for(let t=0;t<n.length;t++){const i=n[t];let o={isZeroLengthAllowed:"true",maxLength:"50000",isRequired:"false",name:i,caption:i,type:"WTEXT",defaultValue:"null",isSystemField:"false"};e.open("POST",encodeURI(r),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(JSON.stringify(o)),JSON.parse(e.responseText,null)}}}function _0x17b0f8(e,t,i){let n=i+"/"+t+".rjson";e.open("DELETE",encodeURI(n),!1,"",""),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.send(null)}function _0x3f3fdd(){let e=null;try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch{try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch{e=null}}return!e&&typeof XMLHttpRequest<"u"&&(e=new XMLHttpRequest),e}var _0x42030b=(_0x393400=!0,function(e,t){var i=_0x393400?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x393400=!1,i}),_0x2cde66=_0x42030b(void 0,(function(){return _0x2cde66.toString().search("(((.+)+)+)+$").toString().constructor(_0x2cde66).search("(((.+)+)+)+$")})),_0x393400;function _0x5c4244(e){e=WebGLPlot.defaultValue(e,WebGLPlot.defaultValue.EMPTY_OBJECT),this.SampleDataModelsCfg=WebGLPlot.defaultValue(e.SampleDataModelsCfg,[]),this.elementsCfg=WebGLPlot.defaultValue(e.elementsCfg,[]),this.tsBuildDatas=WebGLPlot.defaultValue(e.tsBuildDatas,[]),this.geoLayerConfig=WebGLPlot.defaultValue(e.geoLayerConfig,[]),this.MGISQueryConfig=WebGLPlot.defaultValue(e.MGISQueryConfig,[]),this.tsPositions=WebGLPlot.defaultValue(e.tsPositions,[])}_0x2cde66(),_0x5c4244.prototype.fromJSON=function(e){this.SampleDataModelsCfg=e.SampleDataModelsCfg,this.elementsCfg=e.elementsCfg,this.tsBuildDatas=e.tsBuildDatas,this.geoLayerConfig=e.geoLayerConfig,this.MGISQueryConfig=e.MGISQueryConfig,this.tsPositions=e.tsPositions},_0x5c4244.prototype.toJSON=function(){return'{"SampleDataModelsCfg":'+WebGLPlot.toJSON(this.SampleDataModelsCfg)+',"elementsCfg":'+WebGLPlot.toJSON(this.elementsCfg)+',"tsBuildDatas":'+WebGLPlot.toJSON(this.tsBuildDatas)+',"geoLayerConfig":'+WebGLPlot.toJSON(this.geoLayerConfig)+',"MGISQueryConfig":'+WebGLPlot.toJSON(this.MGISQueryConfig)+',"tsPositions":'+WebGLPlot.toJSON(this.tsPositions)+"}"},_0x5c4244.prototype.destory=function(){this.SampleDataModelsCfg=null,this.elementsCfg=null,this.tsBuildDatas=null,this.geoLayerConfig=null,this.MGISQueryConfig=null,this.tsPositions=null};var _0x401449=(_0x175552=!0,function(e,t){var i=_0x175552?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x175552=!1,i}),_0x58a95b=_0x401449(void 0,(function(){return _0x58a95b.toString().search("(((.+)+)+)+$").toString().constructor(_0x58a95b).search("(((.+)+)+)+$")})),_0x175552;_0x58a95b();class _0x15a278{constructor(){}static doContourAnalyst(e,t,i,n,r){void 0===t&&(t=theCrimePoint),_0x15a278.entity&&_0x15a278.clear(e);let o=WebGLPlot.Cartesian3.fromDegrees(t.x,t.y,i);_0x15a278.entityEllipse=e.entities.add({position:o,ellipse:{height:i,semiMinorAxis:n,semiMajorAxis:n,material:new WebGLPlot.Color(1,1,0,.35),outline:!0}}),_0x15a278.entityCirclePt=e.entities.add({position:o,point:{pixelSize:5,color:WebGLPlot.Color.WHITE,outlineColor:WebGLPlot.Color.fromCssColorString("#fff"),outlineWidth:2,show:!0}}),_0x15a278.entityPolyline=e.entities.add({polyline:{show:!0,positions:WebGLPlot.Cartesian3.fromDegreesArrayHeights([t.x,t.y,i,r.x,r.y,i,r.x,r.y,0]),width:3,material:WebGLPlot.Color.fromCssColorString("#51ff00"),loop:!0,clampToGround:!1}});var a=(r.x+t.x)/2,s=(r.y+t.y)/2;_0x15a278.labels=e.scene.primitives.add(new WebGLPlot.LabelCollection({depthTestEnable:!1})),_0x15a278.labels.add({position:WebGLPlot.Cartesian3.fromDegrees(a,s,i+10),font:"500 16px sans-serif",style:WebGLPlot.LabelStyle.FILL_AND_OUTLINE,outlineWidth:1,outlineColor:WebGLPlot.Color.BLACK,showBackground:!0,backgroundColor:WebGLPlot.Color.fromCssColorString("rgba(38, 38, 38, 0.85)"),pixelOffset:new WebGLPlot.Cartesian2(15,0),pixelOffsetScaleByDistance:new WebGLPlot.NearFarScalar(150,3,15e6,.5),text:"height:"+i+"m\nradius:"+n+"m",show:!0,horizontalOrigin:WebGLPlot.HorizontalOrigin.LEFT})}static clear(e){_0x15a278.entity&&(e.entities.remove(_0x15a278.entity),e.entities.remove(_0x15a278.entityCirclePt),e.entities.remove(_0x15a278.entityPolyline),e.entities.remove(_0x15a278.labels),_0x15a278.entity=void 0),_0x15a278.textGeo&&superMapTrackingLayer.removeGeoGraphicObject(_0x15a278.textGeo)}}_0x15a278.entity=1,_0x15a278.textGeo=void 0;var _0x1d0a16=(_0x4146e6=!0,function(e,t){var i=_0x4146e6?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x4146e6=!1,i}),_0x534cd8=_0x1d0a16(void 0,(function(){return _0x534cd8.toString().search("(((.+)+)+)+$").toString().constructor(_0x534cd8).search("(((.+)+)+)+$")})),_0x4146e6;_0x534cd8();var WebGLPlot$1=window.WebGLPlot=window.WebGLPlot||{};function _0x15b84c(e){this.viewer=e.viewer,this.theCrimePoint=WebGLPlot$1.defaultValue(e.theCrimePoint,new _0x23de81(113.88122956581786,22.50809724778502,0)),this.groundEfficiency=void 0}function _0x3ba76e(e,t,i){WebGLPlot$1.defined(i)||(i=15);const n=e/6378137;for(var r=[_0xb327cc(t[1]),_0xb327cc(t[0])],o=[],a=0;a<i;a++){const e=a*(360/i)*Math.PI/180,t=r[0]+n*Math.cos(e),s=r[1]+n*Math.sin(e);o.push([_0x46998b(s),_0x46998b(t)])}return o.push(o[0]),[o]}function _0xb327cc(e){return e*Math.PI/180}function _0x46998b(e){return 180*e/Math.PI}_0x15b84c.prototype.contourAnalysisConfirm=function(e){this.groundEfficiency&&(this.groundEfficiency.destroy(),this.groundEfficiency=void 0);let t=e.height,i=e.radius,n=WebGLPlot$1.defined(e.minTerrainHeight)?e.minTerrainHeight:0;if(0===i)throw new WebGLPlot$1.DeveloperError("height or radius can not be empty!");for(var r=_0x3ba76e(i,[this.theCrimePoint.x,this.theCrimePoint.y],50),o=[],a=0;a<r[0].length;a++)o.push(r[0][a][0]),o.push(r[0][a][1]);_0x15a278.doContourAnalyst(this.viewer,this.theCrimePoint,t,i,o),this.groundEfficiency=new _0x48550f({scene:scene,id:"sniperGroundEffect",color:WebGLPlot$1.Color.RED.withAlpha(.5),positions:o,minTerrainHeight:n})},_0x15b84c.prototype.contourAnalysisClose=function(){_0x15a278.clear(this.viewer),this.groundEfficiency&&this.groundEfficiency.destroy()},WebGLPlot$1.BuildContourAnalyst=_0x15b84c;const _0x50f7c7=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x564378=_0x50f7c7(void 0,(function(){return _0x564378.toString().search("(((.+)+)+)+$").toString().constructor(_0x564378).search("(((.+)+)+)+$")}));function _0x2dc179(e){this.viewer=e,this.doorEntitise=[],this.doorExcID=-1,this._doorClickEvent=new WebGLPlot.Event}function _0x485cc2(e,t){let i=WebGLPlot.Cartesian3.fromDegrees(e.x,e.y,e.z),n=WebGLPlot.Transforms.headingPitchRollQuaternion(i,new WebGLPlot.HeadingPitchRoll(WebGLPlot.CesiumMath.toRadians(e.radians),WebGLPlot.CesiumMath.toRadians(90),0)),r=t.entities.add({position:i,box:{dimensions:new WebGLPlot.Cartesian3(e.width,e.height,.5),material:new WebGLPlot.Color(1,0,0,.5)},orientation:n,show:!1});return r.show=!0,r}function _0x485006(e,t){isNaN(e.lon)||isNaN(e.lat)||isNaN(e.height)?console.warn("flyToMap:option is not correct"):e.heading?t.camera.flyTo({destination:WebGLPlot.Cartesian3.fromDegrees(e.lon,e.lat,e.height),orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},aim:!0}):t.camera.flyTo({destination:WebGLPlot.Cartesian3.fromDegrees(e.lon,e.lat,e.height),aim:!0})}_0x564378(),_0x2dc179.prototype.createDoors=function(e){if(-1===this.doorExcID){for(let t=0;t<e.length;t++){let i=e[t];this.doorEntitise.push(_0x485cc2(i,this.viewer))}this._doorClickEvent.raiseEvent(e)}},_0x2dc179.prototype.removeDoors=function(){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1),this.doorEntitise&&this.doorEntitise.length>0&&(this.doorEntitise.map((e=>{this.viewer.entities.remove(e)})),this.doorEntitise=[])},_0x2dc179.prototype.blinkDoor=function(e){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1);var t=this.doorEntitise[e];this.doorExcID=window.setInterval(function(){t.show=!t.show}.bind(this),500)},_0x2dc179.prototype.blinkDoors=function(e){-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1);for(var t=[],i=0;i<e.length;i++)t.push(this.doorEntitise[e[i]]);this.doorExcID=window.setInterval(function(){t.map((e=>{e.show=!e.show}))}.bind(this),500)},_0x2dc179.prototype.blinkAllDoors=function(){if(-1!==this.doorExcID&&(window.clearInterval(this.doorExcID),this.doorExcID=-1),!this.doorEntitise||this.doorEntitise.length<=0)return;let e=this;this.doorExcID=window.setInterval(function(){e.doorEntitise.map((e=>{e.show=!e.show}))}.bind(this),500)},_0x2dc179.prototype.flytoLocation=function(e){_0x485006(e,this.viewer)},Object.defineProperties(_0x2dc179.prototype,{doorClickEvent:{get:function(){return this._doorClickEvent}}});const _0x2fd29c=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x5c9364=_0x2fd29c(void 0,(function(){return _0x5c9364.toString().search("(((.+)+)+)+$").toString().constructor(_0x5c9364).search("(((.+)+)+)+$")}));_0x5c9364();class _0x1eef11{constructor(){}createXMLflyLine(e){let t=new DOMParser;window.parser=t;let i=t.parseFromString("<cusxmlRoute></cusxmlRoute>","text/xml");window.xmlDoc=i;let n=this.createSceneRouteNode(i),r=this.createRouteNode(i,e),o=this.createRouteStyleNode(i);r.appendChild(o);let a=this,s=e.routeStops;if(!(s.length<2)){for(let e=0;e<s.length;e++){let t=s[e],n={longitude:t.point[0],latitude:t.point[1],altitude:t.point[2],heading:t.heading*(180/Math.PI),tilt:t.tilt*(180/Math.PI)+90},o=a.createStopNode(i,n,t,e);r.appendChild(o)}return n.appendChild(r),i.children[0].appendChild(n),i.children[0].innerHTML}}createXMLflyLines(e){let t=new DOMParser;window.parser=t;let i=t.parseFromString("<cusxmlRoute></cusxmlRoute>","text/xml");window.xmlDoc=i;let n=this.createSceneRouteNode(i);for(let t=0;t<e.length;t++){var r=e[t];let o=this.createRouteNode(i,r),a=this.createRouteStyleNode(i);o.appendChild(a);let s=this,l=r.routeStops;if(l.length<2)return void console.warn("节点数小于2");for(let e=0;e<l.length;e++){let t=l[e],n={longitude:t.point[0],latitude:t.point[1],altitude:t.point[2],heading:t.heading*(180/Math.PI),tilt:t.tilt*(180/Math.PI)+90},r=s.createStopNode(i,n,t,e);o.appendChild(r)}n.appendChild(o)}return i.children[0].appendChild(n),i.children[0].innerHTML}createSceneRouteNode(e){let t=e.createElement("SceneRoute");return t.setAttribute("xmlns","http://www.supermap.com"),t}createRouteNode(e,t){let i=e.createElement("route"),n={name:t.routeName||"飞行路线",speed:t.speed||"200",lineType:"0",showroutestop:"False",showrouteline:"False",altitudefree:"False",headingfree:"False",tiltfree:"False",flycircle:"False",alongline:t.isAlongLine||"False"};for(const e in n)i.setAttribute(e,n[e]);return i}createRouteStyleNode(e){let t=e.createElement("style"),i=e.createElement("geostyle3d"),n=e.createElement("linecolor");n.textContent="RGBA(147,112,219,255)";let r=e.createElement("linewidth");r.textContent=2;let o=e.createElement("altitudeMode");o.textContent="Absolute";let a=e.createElement("bottomAltitude");return a.textContent=0,i.appendChild(n),i.appendChild(r),i.appendChild(o),i.appendChild(a),t.appendChild(i),t}createStopNode(e,t,i,n){let r=e.createElement("routestop"),o={name:i.stopName||"Stop"+(n+1),speed:i.speed,excluded:"False",viewType:"camera"};for(const e in o)r.setAttribute(e,o[e]);let a=this.createStopCameraNode(e,t);r.appendChild(a);let s=this.createStopStyleNode(e,i);r.appendChild(s);let l=this.createStopSettingNode(e,i);return r.appendChild(l),r}createStopCameraNode(e,t){let i=e.createElement("camera");for(const n in t){let r=e.createElement(n);r.textContent=t[n],i.appendChild(r)}return i}createStopStyleNode(e,t){let i={icon:t.img,markersize:4.8,markericonscale:1,markercolor:"RGBA(255, 255, 255, 255)"},n=e.createElement("style"),r=e.createElement("geostyle3d");for(const t in i){let n=e.createElement(t);n.textContent=i[t],r.appendChild(n)}return n.appendChild(r),n}createStopSettingNode(e,t){let i=e.createElement("setting"),n={turnTime:t.surroundDuration||1.5,turnSlowly:"False",stopPlayMode:t.stopPlayMode||"StopPause",autoPlay:"False",pauseTime:t.waitTime||0,angularSpeed:1};for(const t in n){let r=e.createElement(t);r.textContent=n[t],i.appendChild(r)}return i}}const _0xa5a91d=function(){let e=!0;return function(t,i){const n=e?function(){if(i){const e=i.apply(t,arguments);return i=null,e}}:function(){};return e=!1,n}}(),_0x3d2533=_0xa5a91d(void 0,(function(){return _0x3d2533.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d2533).search("(((.+)+)+)+$")}));_0x3d2533();class _0x5bc321{constructor(e){this.viewer=e,this.flyManager,this.routeCollection,this.reader=new FileReader,this.createXml,this.flyLineXmls=new _0x291996,this.routesDictionary=new _0x291996,this.routes=[],this.duration=5,this.showRoute=!1,this.showStop=!1,this.setStopSpeed=0,this.stopPlayMode="StopPause",this.waitTime=.001,this.surroundDuration=1,this.isAlongline=!1,this.routeSpeed=0,this.initFlyManager()}initFlyManager(){this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.flyManager=new Cesium.FlyManager({scene:this.viewer.scene,routes:this.routeCollection}),this.createXml=new _0x1eef11}addStop(e){this.route=this.routesDictionary.find(e);let t=this.route.routeStops,i=this.viewer.camera.position,n=this.CartesiantoDegrees(i);var r=0;if(t.length>0){let e=t[t.length-1],i=e.point,o=Cesium.Cartesian3.fromDegrees(i[0],i[1],i[2]),a=Cesium.Cartesian3.fromDegrees(n[0],n[1],n[2]);r=Cesium.Cartesian3.distance(o,a)/this.duration,e.speed=r}let o=t.length,a="视点"+(Number(o)+1),s={uuid:Math.random().toString(15).slice(2,15),stopName:a,point:n,heading:this.viewer.camera.heading,tilt:this.viewer.camera.pitch,speed:r,stopPlayMode:this.stopPlayMode,surroundDuration:this.surroundDuration,waitTime:this.waitTime,duration:this.duration};t.push(s),this.loadRoute(e)}changeStop(e,t){this.flyManager&&this.flyManager.stop();let i=e.routename;this.route=this.routesDictionary.find(i);let n=this.route.routeStops,r=this.viewer.camera.position,o=this.CartesiantoDegrees(r),a=null,s=null,l=null;for(let t=0;t<n.length;t++){let i=n[t];if(t>0&&(s=n[t-1]),n.length!==t+1&&(l=n[t+1]),i.uuid===e.stop.uuid){a=i;break}}let u=a.speed;if(t.position&&null!==l){let e=l.point,i=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]),n=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),r=Cesium.Cartesian3.distance(i,n);u=t.duration?r/t.duration:r/a.duration}else if(t.position&&null!==s&&null===l){let e=s.point,t=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]),i=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),n=Cesium.Cartesian3.distance(t,i);s.speed=n/s.duration}else if(!t.position&&t.duration&&null!==l){o=a.point;let e=l.point,i=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2]),n=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),r=Cesium.Cartesian3.distance(i,n);t.duration&&(u=r/t.duration)}var c=null,h=null,d=null;t.position?(c=this.viewer.camera.heading,h=this.viewer.camera.pitch):(c=a.heading,h=a.tilt,o=a.point,d=t.duration?parseInt(t.duration):a.duration);let f={uuid:e.stop.uuid,stopName:t.name||e.stop.stopName,point:o,heading:c,tilt:h,speed:u,stopPlayMode:this.stopPlayMode,surroundDuration:this.surroundDuration,waitTime:this.waitTime,duration:d||this.duration};for(let t=0;t<n.length;t++)if(n[t].uuid===e.stop.uuid){n[t]=f;break}this.loadRoute(i)}locateStop(e,t){this.flyManager&&this.flyManager.stop(),this.route=this.routesDictionary.find(e);let i=this.route.routeStops;for(let e=0;e<i.length;e++){let n=i[e];if(n.stopName===t){this.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(n.point[0],n.point[1],n.point[2]),orientation:{heading:n.heading,pitch:n.tilt,roll:0},duration:1});break}}}deleteStop(e,t){this.flyManager&&this.flyManager.stop(),this.route=this.routesDictionary.find(e);let i=this.route.routeStops;for(let e=0;e<i.length;e++)if(i[e].stopName===t){i.splice(e,1);break}this.loadRoute(e)}createImage(){return this.viewer.render(),this.viewer.scene.canvas.toDataURL("image/png").replace("image/png","image/octet-stream")}addRoute(){let e={routeName:"飞行路线"+(this.routes.length+1),speed:this.routeSpeed,isAlongLine:"False",routeStops:[],showLine:!1};this.routesDictionary.add(e.routeName,e),this.routes.push(e)}changeRoute(e,t){this.flyManager&&this.flyManager.stop();let i=e.name;this.route=this.routesDictionary.find(i),this.route.routeName=t.name;let n=this.createXml.createXMLflyLine(this.route);this.routesDictionary.remove(i),this.routesDictionary.add(t.name,this.route),n&&(this.flyLineXmls.remove(i),this.flyLineXmls.add(t.name,n))}deleteRoute(e){if(this.flyManager&&this.flyManager.stop(),!(this.flyLineXmls.length<1)){this.flyLineXmls.remove(e);var t=this.routesDictionary.find(e);this.routes.splice(this.routes.indexOf(t),1),this.routesDictionary.remove(e)}}showCurRoute(e,t){let i=this.flyLineXmls.find(e),n=this.flyManager.currentRoute;if(this.route=this.routesDictionary.find(e),n.routeName===e)n.isLineVisible=t,n.isStopVisible=t,this.route.showLine=t;else{n&&n.clear(),this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.routeCollection.fromXML(i),this.flyManager.routes=this.routeCollection,this.route.showLine=!0;for(let t=0;t<this.flyManager.routes._routes.length;t++){let i=this.flyManager.routes._routes[t];i.routeName===e&&(i.isLineVisible=!0,i.isStopVisible=!0)}}}loadRoute(e){var t=this.routesDictionary.find(e);if(t.routeStops.length<2)return;let i=this.createXml.createXMLflyLine(t);if(!i||(this.flyLineXmls.add(e,i),!e))return;let n=this.flyManager.currentRoute;n&&n.clear(),this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.routeCollection.fromXML(i),this.flyManager.routes=this.routeCollection}readyPromise(){this.routesDictionary.clear(),this.flyLineXmls.clear(),this.routes=[],this.routeCollection.readyPromise.then((()=>{this.flyManager.routes=this.routeCollection;for(let e=0;e<this.routeCollection._routes.length;e++){let t=this.routeCollection._routes[e],i={routeName:t._routeName,speed:t._speed,isAlongLine:t._isAlongline,routeStops:[]};for(let e=0;e<t._stopCollection.length;e++){let n=t._stopCollection.get(e),r=n._point,o=this.CartesiantoDegrees(r),a=n._duration;(e===t._stopCollection.length-1||200===n._speed&&10===n._duration)&&(a=5);let s=n._waitTime;0===s&&(s=.001);let l={uuid:Math.random().toString(15).slice(2,15),stopName:n._stopName,point:o,heading:n._heading,tilt:n._tilt,speed:n._speed,stopPlayMode:n._stopPlayMode,surroundDuration:n._surroundDuration,waitTime:s,duration:a};i.routeStops.push(l)}this.routesDictionary.add(i.routeName,i),this.routes.push(i);let n=this.createXml.createXMLflyLine(i);if(!n)return;this.flyLineXmls.add(i.routeName,n)}}))}download(e){let t=this.flyLineXmls.find(e);if(!t)return;let i=new Blob([t]),n=document.createElement("a");n.download="view-flight-route.fpf",n.href=URL.createObjectURL(i),n.click()}downloadAll(){if(this.flyLineXmls.count()<1)return;let e=this.createXml.createXMLflyLines(this.routes);if(!e)return;let t=new Blob(["\ufeff",e],{type:"text/plain"}),i=document.createElement("a");i.download="view-flight-route.fpf",i.href=URL.createObjectURL(t),i.click()}uploading(e){this.flyManager.stop();let t=this.flyManager.currentRoute;t&&t.clear(),this.routeCollection=new Cesium.RouteCollection(viewer.entities),e&&(this.reader.onload=e=>{let t=e.target.result;this.routeCollection.fromXML(t),this.readyPromise()},this.reader.readAsText(e,"UTF-8"))}play(e){let t=this.flyLineXmls.find(e),i=this.flyManager.currentRoute;i&&i.clear(),this.routeCollection=new Cesium.RouteCollection(this.viewer.entities),this.routeCollection.fromXML(t),this.flyManager.routes=this.routeCollection,this.flyManager.readyPromise.then((()=>{this.flyManager.play()}))}pause(){this.flyManager&&this.flyManager.pause()}stop(){this.flyManager&&this.flyManager.stop()}CartesiantoDegrees(e){let t=[].concat(e),i=[];for(let e=0,n=t.length;e<n;e++){let n=Cesium.Cartographic.fromCartesian(t[e]),r=Cesium.Math.toDegrees(n.longitude),o=Cesium.Math.toDegrees(n.latitude),a=n.height;-1==i.indexOf(r)&&-1==i.indexOf(o)&&(i.push(r),i.push(o),i.push(a))}return i}}var _0xd1b838=(_0x184a33=!0,function(e,t){var i=_0x184a33?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x184a33=!1,i}),_0x5dd27d=_0xd1b838(void 0,(function(){return _0x5dd27d.toString().search("(((.+)+)+)+$").toString().constructor(_0x5dd27d).search("(((.+)+)+)+$")})),_0x184a33;_0x5dd27d();class _0x547cc0{constructor(e){this.name=WebGLPlot.defaultValue(e.name,""),this.key=WebGLPlot.defaultValue(e.key,""),this.second=WebGLPlot.defaultValue(e.second,""),e.position&&e.position.heading&&(this.heading=e.position.heading,this.pitch=e.position.pitch,this.roll=e.position.roll,this.lng=e.position.point.lng,this.lat=e.position.point.lat,this.alt=e.position.point.alt)}}var _0x1108c0=(_0x563195=!0,function(e,t){var i=_0x563195?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x563195=!1,i}),_0x2f3a40=_0x1108c0(void 0,(function(){return _0x2f3a40.toString().search("(((.+)+)+)+$").toString().constructor(_0x2f3a40).search("(((.+)+)+)+$")})),_0x563195;function _0x560429(e){this.viewer=e}_0x2f3a40(),_0x560429.prototype.addCamera=function(e,t){if(!this.viewer)return;let i=this.viewer.scene.camera,n=i.positionCartographic,r={point:{lng:Cesium.Math.toDegrees(n.longitude),lat:Cesium.Math.toDegrees(n.latitude),alt:n.height},heading:i.heading,pitch:i.pitch,roll:i.roll},o=t.root.uuid,a=this.groupDic.find(o),s=a.stops.count(),l=e+(Number(s)+1);o=Math.random().toString(15).slice(2,15),this.quickPosPara=new positionPara({name:l,position:r}),a.stops.add(o,this.quickPosPara)},_0x560429.prototype.addRoute=function(e){if(!this.viewer)return;let t=Math.random().toString(15).slice(2,15),i={groupName:e+(this.groupDic.count()+1),uuid:t,stops:new _0x291996};this.quickGroupPara=i,this.groupDic.add(t,i)},_0x560429.prototype.inputRoute=function(){for(var e in this.keyboards=[],this.groupJson=[],this.groupDic.dataStorege){var t=this.groupDic.find(e),i=[];for(var n in t.stops.dataStorege){var r=t.stops.find(n);i.push({uuid:n,stop:r}),this.keyboards.push(r)}this.groupJson.push({groupName:t.groupName,uuid:e,stops:i})}return this.groupJson},_0x560429.prototype.locateCamera=function(e){let t=e.heading,i=e.pitch,n=e.roll,r=e.lng,o=e.lat,a=e.alt;this.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(r,o,a),orientation:{heading:t,pitch:i,roll:n}})};var _0x299ec1=(_0x12c28e=!0,function(e,t){var i=_0x12c28e?function(){if(t){var i=t.apply(e,arguments);return t=null,i}}:function(){};return _0x12c28e=!1,i}),_0x3d8e63=_0x299ec1(void 0,(function(){return _0x3d8e63.toString().search("(((.+)+)+)+$").toString().constructor(_0x3d8e63).search("(((.+)+)+)+$")})),_0x12c28e;_0x3d8e63();var _0x12f1c7={on:function(e,t,i){if("object"==typeof e)for(var n in e)this._on(n,e[n],t);else for(var r=0,o=(e=splitWords(e)).length;r<o;r++)this._on(e[r],t,i);return this},off:function(e,t,i){if(e)if("object"==typeof e)for(var n in e)this._off(n,e[n],t);else for(var r=0,o=(e=splitWords(e)).length;r<o;r++)this._off(e[r],t,i);else delete this._events;return this},_on:function(e,t,i){this._events=this._events||{};var n=this._events[e];n||(n=[],this._events[e]=n),i===this&&(i=void 0);for(var r={fn:t,ctx:i},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===t&&o[a].ctx===i)return;o.push(r)},_off:function(e,t,i){var n,r,o;if(this._events&&(n=this._events[e])){if(!t){for(r=0,o=n.length;r<o;r++)n[r].fn=falseFn;return void delete this._events[e]}if(i===this&&(i=void 0),n)for(r=0,o=n.length;r<o;r++){var a=n[r];if(a.ctx===i&&a.fn===t)return a.fn=falseFn,this._firingCount&&(this._events[e]=n=n.slice()),void n.splice(r,1)}}},fire:function(e,t,i){if(!this.listens(e,i))return this;var n=extend({},t,{type:e,target:this});if(this._events){var r=this._events[e];if(r){this._firingCount=this._firingCount+1||1;for(var o=0,a=r.length;o<a;o++){var s=r[o];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(e,t){var i=this._events&&this._events[e];if(i&&i.length)return!0;if(t)for(var n in this._eventParents)if(this._eventParents[n].listens(e,t))return!0;return!1},once:function(e,t,i){if("object"==typeof e){for(var n in e)this.once(n,e[n],t);return this}var r=bind((function(){this.off(e,t,i).off(e,r,i)}),this);return this.on(e,t,i).on(e,r,i)},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[stamp(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[stamp(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,extend({layer:e.target},e),!0)}};function d(e,t,i){try{return e(t,i)}catch(e){return o$1l.reject(e)}}function l(e){var t;return function(i){var n=i.data,r=[],o={id:n.id,result:void 0,error:void 0};return o$1l(d(e,n.parameters,r)).then((function(e){o.result=e})).otherwise((function(e){e instanceof Error?o.error={name:e.name,message:e.message,stack:e.stack}:o.error=e})).always((function(){e$2e(t)||(t=u$Z(self.webkitPostMessage,self.postMessage)),n.canTransferArrayBuffer||(r.length=0);try{t(o,r)}catch(e){o.result=void 0,o.error="postMessage failed with error: "+f$T(e)+"\n with responseMessage: "+JSON.stringify(o),t(o)}}))}}var VERSION="11i(2023)",SuperMapVersion="40707";exports.AbstractMesh=_0x1d0ffc,exports.AlgoInclude=_0x14876e,exports.AlgoSymbol=_0x330d7a,exports.AlphaMode=_0x36a597,exports.AnalysisTool=_0x5b82ce,exports.Animation=_0x48b138,exports.Animation2=y$4,exports.AnimationBlink=_0x3884c0,exports.AnimationBrokenLine=_0xe89a1c,exports.AnimationCurve=_0x5b3a44,exports.AnimationFollowType=_0x192aa1,exports.AnimationGrow=_0x17c29c,exports.AnimationHide=_0xb1e5d0,exports.AnimationMoveIn=_0x2980fc,exports.AnimationMoveOut=_0x42ff63,exports.AnimationPlayType=_0x5a1aa1,exports.AnimationReduce=_0x1ecde6,exports.AnimationShow=_0x116c0b,exports.AnimationViewModel=m$5,exports.AnimationWay=_0x36afe8,exports.AnimationZoomIn=_0x5eeaa0,exports.AnimationZoomOut=_0x2c95d7,exports.Appearance=a$S,exports.ApproximateTerrainHeights=e$1H,exports.ArcGISTiledElevationTerrainProvider=_$E,exports.ArcGisGeographicTilingScheme=m$M,exports.ArcGisMapServerImageryProvider=b$q,exports.ArcType=m$1h,exports.ArrowCommunicationLink=_0x2d907f,exports.AssociativeArray=e$1Q,exports.AttributeCompression=t$$,exports.AttributeType=Q$z,exports.AutoExposure=a$h,exports.Autolinker=zr$1,exports.AutomaticUniforms=l$18,exports.Axis=v$y,exports.AxisAlignedBoundingBox=e$29,exports.BIMInfoClickQueryHandler=_0x2befe4,exports.BaseLayerPicker=g$3,exports.BaseLayerPickerViewModel=V,exports.BaseParticleSystem=_0x439851,exports.BasicLineCommunicationLink=_0x4ec5ba,exports.BatchTable=h$X,exports.Batched3DModel3DTileContent=n$p,exports.Billboard=n$J,exports.BillboardAxialVp=_0x258e9c,exports.BillboardCollection=w$O,exports.BillboardGraphics=n$V,exports.BillboardMode=yr$2,exports.BillboardPixelSizeWithAngleVp=_0xe606d6,exports.BillboardVisualizer=g$J,exports.BingMapsApi=e$12,exports.BingMapsGeocoderService=o$M,exports.BingMapsImageryProvider=o$q,exports.BingMapsStyle=I$l,exports.BlendEquation=b$17,exports.BlendFunction=l$13,exports.BlendOption=S$L,exports.BlendingState=Ee$r,exports.BlinkAnimationBlinkStyle=_0x2b55c5,exports.BlinkAnimationReplaceStyle=_0x1ab3a1,exports.BlockCacheList=r$R,exports.BlockCacheNode=e$1e,exports.BloodPosition=_0x353f01,exports.BloodVolume=_0x211e34,exports.BloomEffect=e$g,exports.BoundingBoxRenderer=t$9,exports.BoundingRectangle=f$1a,exports.BoundingSphere=i$1d,exports.BoundingSphereState=R$w,exports.Bounds=_0x551fc0,exports.BoundsOctree=d$s,exports.BoxEditor=S$m,exports.BoxEmitter=a$j,exports.BoxGeometry=O$z,exports.BoxGeometryUpdater=i$F,exports.BoxGraphics=n$U,exports.BoxOutlineGeometry=o$17,exports.BoxParticleEmitter=_0x4c62f8,exports.BrdfLutGenerator=t$c,exports.Buffer=t$X,exports.BufferGL=h$11,exports.BufferGPU=r$13,exports.BufferIDRecorder=f$$,exports.BufferManager=_0x23bf52,exports.BufferUsage=A$18,exports.BuildContourAnalyst=_0x15b84c,exports.BuildingDoors=_0x2dc179,exports.BurstPipelineAnalystService=BurstPipelineAnalystService,exports.CGCS2000MapServerImageryProvider=D$g,exports.CallbackProperty=n$X,exports.Camera=v$K,exports.CameraEventAggregator=l$l,exports.CameraEventType=Q$d,exports.CameraFlightPath=mr$5,exports.CameraMoveHandler=_0x2a2c3d,exports.Cartesian2=o$1o,exports.Cartesian3=o$1p,exports.Cartesian4=e$2c,exports.Cartographic=a$18,exports.CartographicGeocoderService=N$D,exports.CaseTable=_0x413409,exports.CategoryVisibleMode=_0x70e866,exports.Catenaryline=z$o,exports.CatmullRomSpline=c$L,exports.Cesium3DTile=c$s,exports.Cesium3DTileBatchTable=h$D,exports.Cesium3DTileColorBlendMode=L$I,exports.Cesium3DTileContent=r$n,exports.Cesium3DTileContentFactory=i$y,exports.Cesium3DTileContentState=X$q,exports.Cesium3DTileFeature=e$M,exports.Cesium3DTileFeatureTable=o$C,exports.Cesium3DTileOptimizationHint=s$q,exports.Cesium3DTileOptimizations=I$F,exports.Cesium3DTilePass=ue$e,exports.Cesium3DTilePassState=a$g,exports.Cesium3DTilePointFeature=i$A,exports.Cesium3DTileRefine=f$E,exports.Cesium3DTileStyle=d$n,exports.Cesium3DTileStyleEngine=e$1u,exports.Cesium3DTilesInspector=y$1,exports.Cesium3DTilesInspectorViewModel=l$6,exports.Cesium3DTileset=p$u,exports.Cesium3DTilesetAsyncTraversal=h$j,exports.Cesium3DTilesetCache=e$C,exports.Cesium3DTilesetGraphics=i$S,exports.Cesium3DTilesetHeatmap=a$s,exports.Cesium3DTilesetMostDetailedTraversal=f$D,exports.Cesium3DTilesetStatistics=r$x,exports.Cesium3DTilesetTraversal=W$x,exports.Cesium3DTilesetVisualizer=l$E,exports.CesiumInspector=g$1,exports.CesiumInspectorViewModel=m$3,exports.Check=o$1q,exports.CheckerboardMaterialProperty=r$w,exports.CircleEmitter=u$l,exports.CircleGeometry=n$A,exports.CircleOutlineGeometry=a$H,exports.ClampFramebuffer=t$g,exports.ClampMode=l$p,exports.Class=_0x1523c4,exports.ClassificationModel=A$F,exports.ClassificationPrimitive=x$$,exports.ClassificationType=_0x2b86ba,exports.ClearCommand=t$W,exports.ClipBuild=_0x112c02,exports.ClipPlaneDepthFp=_0x162bd8,exports.ClipPlaneFp=_0x2e70eb,exports.ClipPlaneMode=_0x1f23e7,exports.ClipPlaneVp=R$M,exports.ClippingPlane=a$I,exports.ClippingPlaneCollection=h$L,exports.ClippingType=R$L,exports.Clock=u$H,exports.ClockRange=tt$a,exports.ClockStep=g$R,exports.ClockViewModel=r$a,exports.ClosedDepthFramebuffer=a$i,exports.CloudBox=e$e,exports.Collection=Collection$1,exports.Color=e$1X,exports.Color3Gradient=_0x30da6f,exports.ColorBlendMode=I$K,exports.ColorCorrection=o$o,exports.ColorGeometryInstanceAttribute=o$16,exports.ColorGradient=_0x180241,exports.ColorMaterialProperty=t$P,exports.ColorTable=i$T,exports.ColorTransferFunction=_0x5a9a06,exports.Command=t$3,exports.CommonBillboardVp=_0x126a39,exports.CommonNoLigthNoTextureVp=Ht$8,exports.CommonNoLigthOneTextureVp=CommonNoLigthOneTextureVp,exports.CommonNoTextureFS=_0x37e2ae,exports.CommonNoTextureFp=Yt$8,exports.CommonNoTextureVS=_0x4c39c3,exports.CommonOneTextureFp=CommonOneTextureFp,exports.CommonServiceBase=_0x5958f9,exports.CommonUtil=_0x2e06c5,exports.CommunicationLinkBase=_0x33a928,exports.CommunicationLinkType=_0x2f1f44,exports.ComponentDatatype=S$14,exports.ComponentIntersectionData=w$I,exports.Composite3DTileContent=i$C,exports.CompositeEntityCollection=s$p,exports.CompositeMaterialProperty=e$A,exports.CompositePositionProperty=t$p,exports.CompositeProperty=e$B,exports.Compositor=o$m,exports.CompressedTextureBuffer=e$1K,exports.ComputeCommand=t$H,exports.ComputeEngine=f$n,exports.ComputePipeline=r$8,exports.ComputeWeightMatrixParameters=ComputeWeightMatrixParameters,exports.ComputeWeightMatrixService=ComputeWeightMatrixService,exports.ConditionsExpression=u$h,exports.ConeEmitter=n$j,exports.ConeParticleEmitter=_0x36b207,exports.ConfigData=_0x5c4244,exports.ConstantPositionProperty=r$V,exports.ConstantProperty=e$1L,exports.Context=i$i,exports.ContextGL=g$b,exports.ContextLimits=e$1W,exports.ContextType=Me$j,exports.ContextWebGPU=f$8,exports.ContourAnalyst=_0x15a278,exports.ControlMode=vi$2,exports.CoplanarPolygonGeometry=P$H,exports.CoplanarPolygonGeometryLibrary=g$Q,exports.CoplanarPolygonOutlineGeometry=a$G,exports.CornerType=ar$6,exports.CorridorGeometry=P$F,exports.CorridorGeometryLibrary=b$R,exports.CorridorGeometryUpdater=f$z,exports.CorridorGraphics=n$T,exports.CorridorOutlineGeometry=V$z,exports.Credential=a$O,exports.CredentialType=E$Y,exports.Credit=r$U,exports.CreditDisplay=r$l,exports.CtrlPosition=_0x841f89,exports.CtrlPositionType=_0x9797a1,exports.CubeMap=e$1P,exports.CubeMapFace=c$10,exports.CubeMapGL=X$X,exports.CubeMapGPU=y$S,exports.CubicRealPolynomial=j$1j,exports.CullFace=G$1a,exports.CullingVolume=i$X,exports.Curve=Curve,exports.CustomDataSource=n$o,exports.CustomGeometryUpdater=m$s,exports.CustomParticleEmitter=_0x42bbfb,exports.CustomProjection=p$L,exports.CylinderDirectedParticleEmitter=_0x5a4942,exports.CylinderGeometry=l$Q,exports.CylinderGeometryLibrary=I$S,exports.CylinderGeometryUpdater=s$n,exports.CylinderGraphics=n$S,exports.CylinderOutlineGeometry=d$Z,exports.CylinderParticleEmitter=_0x18139b,exports.CzmlDataSource=E$w,exports.DDSTexture=_0x5e76de,exports.DDSTextureGL=o$$,exports.DDSTextureGPU=o$_,exports.DDSTextureManager=Se$e,exports.DXTTextureDecode=L$W,exports.DamBreakAnalysis=r$k,exports.DashLineCommunicationLink=_0x124e32,exports.DataFileType=p$T,exports.DataSource=o$B,exports.DataSourceClock=e$z,exports.DataSourceCollection=i$t,exports.DataSourceDisplay=u$p,exports.DebugAppearance=i$h,exports.DebugCameraPrimitive=p$V,exports.DebugCommand=_0x5993b9,exports.DebugModelMatrixPrimitive=s$d,exports.DeductionScript=_0x3fc8dd,exports.DeductionScriptActionBasicParm=_0x5a32e4,exports.DeductionScriptActionEffect=_0x1c7405,exports.DeductionScriptActionMove=_0x4de595,exports.DeductionScriptActionRotation=_0x17d8f6,exports.DeductionScriptActionScale=_0x179128,exports.DeductionScriptCalc=_0x820831,exports.DeductionScriptExecute=_0x42795a,exports.DeductionScriptExecuteCalc=_0x2ac9f9,exports.DeductionScriptExecuteGroup=_0x1a5240,exports.DeductionScriptExecuteManager=_0x3c9d86,exports.DeductionScriptExecuteResetType=_0x2b1f2e,exports.DeductionScriptExecuteState=_0x1c1a40,exports.DeductionScriptExtend=_0x209786,exports.DeductionScriptGroup=_0x5f47f0,exports.DeductionScriptManager=_0x1a04d1,exports.DefaultProxy=o$L,exports.DefaultStyle=_0x181e05,exports.DepthFramebuffer=s$U,exports.DepthFunction=re$G,exports.DepthMapAnalysisVp=DepthMapAnalysisVp,exports.DepthOfFieldEffect=n$g,exports.DepthPlane=c$d,exports.DerivedCommand=l$i,exports.DeveloperError=t$15,exports.DeviceOrientationCameraController=h$g,exports.Dictionary=_0x291996,exports.DirectionalLight=c$i,exports.DiscardColorTileImagePolicy=r$j,exports.DiscardEmptyTileImagePolicy=A$n,exports.DiscardMissingTileImagePolicy=u$i,exports.DistanceDisplayCondition=r$Z,exports.DistanceDisplayConditionGeometryInstanceAttribute=t$A,exports.DotMode=_0x2bcc5b,exports.DotPlotStyle=_0x15cea8,exports.DoublyLinkedList=h$Q,exports.DracoLoader=r$A,exports.DrawCommand=i$$,exports.DrawCubeHandler=_0x558853,exports.DrawHandler=w$n,exports.DrawMode=_0x1522bc,exports.DrawRectHandler=_0x81479b,exports.DxtTexture=_0x5c31bd,exports.DynamicExtendRegionFp=_0x507f80,exports.DynamicExtendRegionVp=_0x1dd94,exports.DynamicGeometryBatch=r$s,exports.DynamicGeometryUpdater=a$C,exports.DynamicLayer3D=_0x256afc,exports.DynamicLayerVertex=_0x41f4a0,exports.DynamicObjectScane=_0x34a477,exports.DynamicObjectState=_0x15cf65,exports.EarthOrientationParameters=x$1h,exports.EarthOrientationParametersSample=n$1c,exports.EasingFunction=m$Y,exports.EdgePreprocessing=_0x511b25,exports.EditHandler=_$l,exports.EditSmlFileParameters=_0x21611c,exports.EditSmlFileService=_0x5b4a7d,exports.EfficiencyManager=_0x10cb0b,exports.EllipseGeometry=Y$A,exports.EllipseGeometryLibrary=C$L,exports.EllipseGeometryUpdater=u$s,exports.EllipseGraphics=n$R,exports.EllipseOutlineGeometry=M$K,exports.Ellipsoid=t$12,exports.EllipsoidGeodesic=E$1t,exports.EllipsoidGeometry=b$O,exports.EllipsoidGeometryUpdater=l$z,exports.EllipsoidGraphics=e$1q,exports.EllipsoidOutlineGeometry=x$13,exports.EllipsoidPrimitive=p$c,exports.EllipsoidRhumbLine=P$15,exports.EllipsoidSurfaceAppearance=t$h,exports.EllipsoidTangentPlane=f$16,exports.EllipsoidTerrainProvider=t$z,exports.EllipsoidalOccluder=s$H,exports.EmissionMaterialProperty=t$j,exports.EmissionTextureUnit=_0x3a711b,exports.Empty3DTileContent=t$r,exports.EncodedCartesian3=i$12,exports.Entity=h$W,exports.EntityCluster=a$r,exports.EntityCollection=r$v,exports.EntityView=V$l,exports.EnumConvertor=R$12,exports.Event=o$1h,exports.EventHelper=n$x,exports.Evented=_0x38cf22,exports.Events=_0x12f1c7,exports.ExcavationBottomFS=Ca$2,exports.ExcavationBottomVS=Ra$3,exports.ExcavationFS=$$M,exports.ExcavationSources=b$V,exports.ExcavationVS=Z$K,exports.Expression=L$E,exports.ExpressionNodeType=s$u,exports.ExtendProperty=_0x29b810,exports.ExtrapolationType=_0x1015ec,exports.FXAA3_11=k$K,exports.Facade=C$l,exports.FacilityAnalyst3DParameters=_0x211aff,exports.FacilityAnalystStreamParameters=FacilityAnalystStreamParameters,exports.FacilityAnalystStreamService=FacilityAnalystStreamService,exports.FacilityAnalystTracedown3DParameters=_0x61bc6c,exports.FacilityAnalystTracedown3DService=_0x4d0341,exports.FacilityAnalystTraceup3DParameters=_0x2932d4,exports.FacilityAnalystTraceup3DService=_0x2499f1,exports.FactorGradient=_0x341870,exports.Feature=Feature,exports.FeatureDetection=s$Z,exports.FeatureService=_0xac67be,exports.FieldLayer3D=i$g,exports.FillGradientMode=_0x1e78ea,exports.FillStyle=fr$3,exports.FilterParameter=_0x35b861,exports.FindClosestFacilitiesService=FindClosestFacilitiesService,exports.FindLocationParameters=FindLocationParameters,exports.FindLocationService=FindLocationService,exports.FindMTSPPathsParameters=FindMTSPPathsParameters,exports.FindMTSPPathsService=FindMTSPPathsService,exports.FindPathParameters=FindPathParameters,exports.FindPathService=FindPathService,exports.FindServiceAreasParameters=FindServiceAreasParameters,exports.FindServiceAreasService=FindServiceAreasService,exports.FindTSPPathsParameters=FindTSPPathsParameters,exports.FindTSPPathsService=FindTSPPathsService,exports.FlattenRegion=f$Z,exports.FloodAnalysis3D=I$e,exports.FlyInterpolationMode=j$16,exports.FlyManager=l$r,exports.FlyTurningMode=v$p,exports.Fog=g$j,exports.ForEach=e$L,exports.Format=_0x16512b,exports.Forward3D=_0x3fcb29,exports.FrameBufferType=Qe$c,exports.FrameRateMonitor=i$f,exports.FrameState=h$f,exports.Framebuffer=t$V,exports.FramebufferGL=a$W,exports.FramebufferGPU=r$12,exports.FramebufferManager=s$g,exports.FrustumCommands=i$e,exports.FrustumGeometry=z$U,exports.FrustumOutlineGeometry=s$O,exports.Fullscreen=l$1e,exports.FullscreenButton=r$5,exports.FullscreenButtonViewModel=r$6,exports.FunctionExt=_0xe25a5e,exports.GLBModel3DTileContent=i$z,exports.GOAnimation=_0x21ced6,exports.GOAnimationAttribute=_0x224004,exports.GOAnimationBlink=_0x400916,exports.GOAnimationGrow=_0x597fad,exports.GOAnimationManager=_0x25263a,exports.GOAnimationManagerBase=GOAnimationManagerBase,exports.GOAnimationRotate=_0x8d847f,exports.GOAnimationScale=_0x22137f,exports.GOAnimationShow=_0x1368e5,exports.GOAnimationState=_0x577f4c,exports.GOAnimationType=_0x144579,exports.GOAnimationWay=_0x371aa9,exports.GOAnimationWay_ModelGroup=_0x269f67,exports.GeoBillboard=i$q,exports.GeoBox=i$p,exports.GeoCircle3D=i$o,exports.GeoCone=r$q,exports.GeoCylinder=i$n,exports.GeoEllipsoid=i$m,exports.GeoEntity=_0x3fd6e5,exports.GeoEntityBasicParameter=_0x56b6ed,exports.GeoEntityEffect=_0x1b7397,exports.GeoEntityEffectAnnularDiffusion=_0x597b34,exports.GeoEntityEffectAttackline=_0x42e779,exports.GeoEntityEffectAugment=_0x458424,exports.GeoEntityEffectBurst=_0x236442,exports.GeoEntityEffectDetecttoncone=_0x570f72,exports.GeoEntityEffectDynamic=_0x496759,exports.GeoEntityEffectExtend=_0x584c60,exports.GeoEntityEffectExtendFactory=_0x2d2a0c,exports.GeoEntityEffectFiresmoke=_0x492aac,exports.GeoEntityEffectMechanicalRadar=_0x57d7b0,exports.GeoEntityEffectParameter=_0x5a492f,exports.GeoEntityEffectParameterRadar=_0x3897ec,exports.GeoEntityEffectRadarBase=_0x208f92,exports.GeoEntityEffectRadarScanBase=_0x2ceb89,exports.GeoEntityEffectRotateRadar=_0x425466,exports.GeoEntityEffectScanRadar=_0xc2c75d,exports.GeoEntityEffectScanWave=_0x3cd5dc,exports.GeoEntityEffectScanWaveColorMode=_0xa16fcf,exports.GeoEntityEffectScancone=_0x524880,exports.GeoEntityEffectScanconeType=_0x1892f9,exports.GeoEntityEffectSign=_0x392050,exports.GeoEntityEffectSignType=_0x1837ea,exports.GeoEntityEffectTailflame=_0x5a68dc,exports.GeoEntityEffectTailgas=_0x1d9822,exports.GeoEntityEffectToolkit=_0x1b8e09,exports.GeoEntityEffectTrackLineType=_0x51a685,exports.GeoEntityEffectTrackline=_0x297e6a,exports.GeoEntityEffectType=_0xaadec6,exports.GeoEntityEffectWarningRadar=_0x54c3a0,exports.GeoEntityManager=_0x3c98af,exports.GeoEntityMoveCalc=_0xcc97e1,exports.GeoEntityMoveParameter=_0x1e6774,exports.GeoEntityNode=_0x4cd539,exports.GeoEntityParamCyclicType=_0x4c8ffe,exports.GeoEntityParameter=_0x4920fc,exports.GeoEntityRotationCalc=_0x9cc9ee,exports.GeoEntityRotationParameter=_0x4d2fe0,exports.GeoEntityScaleCalc=_0x4f7cca,exports.GeoEntityScaleParameter=_0xc7aed0,exports.GeoGraphicObject=_0x2d9130,exports.GeoGraphicObjectConvert=_0x392e98,exports.GeoJSON=_0x19437a,exports.GeoJsonDataSource=y$p,exports.GeoLine3D=p$U,exports.GeoModel3D=t$i,exports.GeoPoint3D=e$r,exports.GeoPolyline=o$u,exports.GeoRegion3D=n$F,exports.GeoSphere=e$q,exports.GeocodeType=c$H,exports.Geocoder=s$3,exports.GeocoderService=o$K,exports.GeocoderViewModel=D$1,exports.GeographicProjection=n$1d,exports.GeographicTilingScheme=g$15,exports.Geometry=I$1p,exports.Geometry3D=o$11,exports.Geometry3DTileContent=p$w,exports.Geometry3DType=P$U,exports.GeometryAttribute=o$1c,exports.GeometryAttributes=a$_,exports.GeometryInstance=d$1o,exports.GeometryInstanceAttribute=o$13,exports.GeometryOffsetAttribute=_0x39c22a,exports.GeometryPipeline=k$14,exports.GeometryServer=_0x204609,exports.GeometryType=Me$s,exports.GeometryUpdater=i$G,exports.GeometryVisualizer=c$l,exports.GetFeatureInfoFormat=R$h,exports.GetFeaturesByBoundsParameters=_0xaafaf2,exports.GetFeaturesByBoundsService=_0x4f0a2a,exports.GetFeaturesParametersBase=_0x32744e,exports.GetFeaturesServiceBase=_0x28aab6,exports.GetLibIDsService=_0x53b796,exports.GetLibInfoParameter=_0x90ce,exports.GetLibInfoService=GetLibInfoService,exports.GetSMLInfosParameters=_0x29d385,exports.GetSMLInfosService=_0xa6b4bc,exports.GetSymbolInfoParameters=_0x51e0df,exports.GetSymbolInfoService=_0x204238,exports.Globe=h$d,exports.GlobeDepth=a$a,exports.GlobeSurfaceShaderSet=U$f,exports.GlobeSurfaceTile=v$C,exports.GlobeSurfaceTileProvider=R$H,exports.GlobeTileUBO=_0x5c8da9,exports.GlobeTranslucency=i$d,exports.GlobeTranslucencyFramebuffer=p$8,exports.GlobeTranslucencyState=F$c,exports.GltfSkeleton=_0x3248fd,exports.GltfSkeletonProcessor=_0x176948,exports.GoogleEarthEnterpriseImageryProvider=h$b,exports.GoogleEarthEnterpriseMapsProvider=n$f,exports.GoogleEarthEnterpriseMetadata=c$G,exports.GoogleEarthEnterpriseTerrainData=T$I,exports.GoogleEarthEnterpriseTerrainProvider=_$B,exports.GoogleEarthEnterpriseTileInformation=e$W,exports.GpuParticleSystem=_0x313aa5,exports.GradientHelper=_0xdebb2b,exports.GregorianDate=d$1r,exports.GridImagery=n$c,exports.GridImageryProvider=o$h,exports.GridLayer=p$b,exports.GridMaterialProperty=t$o,exports.GridProvider=w$b,exports.GridState=_$e,exports.GridTileImagery=d$j,exports.GroundEffect=_0x48550f,exports.GroundGeometryUpdater=i$x,exports.GroundPolylineGeometry=aa$5,exports.GroundPolylinePrimitive=g$13,exports.GroundPrimitive=d$15,exports.GroupObject=_0x8c2e6e,exports.HeadingPitchRange=a$T,exports.HeadingPitchRoll=i$16,exports.Heap=o$1g,exports.HeatMap=o$g,exports.HeightReference=k$R,exports.HeightmapEncoding=T$N,exports.HeightmapTerrainData=T$L,exports.HeightmapTessellator=m$P,exports.HemisphereLight=e$l,exports.HemisphericParticleEmitter=_0x4b20a8,exports.HermitePolynomialApproximation=E$J,exports.HermiteSpline=m$N,exports.HomeButton=o$3,exports.HomeButtonViewModel=r$4,exports.HorizontalOrigin=j$V,exports.HypSometric=R$$,exports.HypsometricSetting=u$L,exports.HypsometricSettingEnum=k$S,exports.Iau2000Orientation=y$F,exports.Iau2006XysData=D$17,exports.Iau2006XysSample=a$10,exports.IauOrientationAxes=h$I,exports.IauOrientationParameters=o$J,exports.ImageMarchingCubes=_0x5651c5,exports.ImageMaterialProperty=a$R,exports.Imagery=n$M,exports.ImageryLayer=h$R,exports.ImageryLayerCollection=n$b,exports.ImageryLayerFeatureInfo=o$r,exports.ImageryProvider=e$i,exports.ImagerySplitDirection=Xe$d,exports.ImageryState=wt$7,exports.IndexDatatype=ce$z,exports.IndexedDBScheduler=l$14,exports.InfoBox=l$4,exports.InfoBoxViewModel=t$1,exports.InspectorShared=o$4,exports.Instance=_0x55c8b4,exports.InstanceInfo=_0x36b665,exports.InstanceLayer=_0x468844,exports.InstanceMode=_0x14dd8d,exports.InstanceSkeletonManager=_0x13fd1b,exports.InstanceTile=_0x5bb99e,exports.InstanceTilesLayerVS=_0x260003,exports.Instanced3DModel3DTileContent=u$y,exports.InstancedType=bt$6,exports.InterpolationAlgorithm=r$L,exports.InterpolationType=_0x301856,exports.Intersect=Ae$w,exports.IntersectionTests=g$1j,exports.Intersections2D=d$10,exports.Interval=o$1n,exports.InvertClassification=t$a,exports.Ion=e$Z,exports.IonGeocoderService=s$C,exports.IonImageryProvider=o$l,exports.IonResource=n$y,exports.IonWorldImageryStyle=n$e,exports.Iso8601=o$I,exports.JSONFormat=_0x4590c8,exports.JobScheduler=o$f,exports.JobType=i$R,exports.JulianDate=a$15,exports.KTX2Transcoder=o$V,exports.KeyboardEventModifier=Aa$1,exports.KmlCamera=o$w,exports.KmlDataSource=U$n,exports.KmlLookAt=o$v,exports.KmlTour=l$s,exports.KmlTourFlyTo=a$m,exports.KmlTourWait=i$r,exports.Label=D$R,exports.LabelCollection=g$W,exports.LabelGraphics=n$Q,exports.LabelStyle=R$S,exports.LabelVisualizer=l$w,exports.LagrangePolynomialApproximation=i$J,exports.LatLng=_0xf20e4e,exports.LayerDataStruct=_0x483060,exports.LayerUboDecl=d$1h,exports.Layers=u$k,exports.LeapSecond=a$16,exports.LercDecode=LercDecode,exports.Light=r$g,exports.LightCount=_0x707ed3,exports.LightGroupType=Ze$4,exports.LightSource=s$J,exports.LightSourceType=_0x4970c2,exports.LightUBO=_0x3261f9,exports.LightUboDecl=K$W,exports.LimitBody=_0x6cc60b,exports.LimitBodyVp=_0x5ef453,exports.LineCallOut=_$K,exports.LineCallOutVp=X$O,exports.LineDisplayType=J$U,exports.LineString=LineString,exports.LinearApproximation=v$A,exports.LinearRing=LinearRing,exports.LinearSpline=r$Q,exports.LoadState=N$Q,exports.LoadingPriorityMode=_0x539352,exports.ManagedArray=r$S,exports.MapMode2D=Rr$3,exports.MapProjection=r$J,exports.MapboxApi=e$U,exports.MapboxImageryProvider=m$h,exports.MapboxStyleImageryProvider=o$e,exports.Material=r$Y,exports.MaterialAppearance=t$v,exports.MaterialExt=_0x1772f5,exports.MaterialManager=_0x27114a,exports.MaterialPass=_0xf77618,exports.MaterialProperty=r$C,exports.MaterialUboDecl=b$1b,exports.Math=e$2d,exports.Matrix2=f$15,exports.Matrix3=p$1e,exports.Matrix4=p$1d,exports.MeasureHandler=T$n,exports.MeasureMode=_0x3c1870,exports.Measurement=_0x82cfb9,exports.MemoryManager=ti$4,exports.MeshParticleEmitter=_0x4b03f3,exports.MeshProcessing=_0x49281f,exports.MeshUboDecl=u$S,exports.MeteorCommunicationLink=_0x4071a9,exports.MipmapHint=I$1e,exports.MixColorType=_0x2b839f,exports.Model=F$B,exports.ModelAnimation=a$x,exports.ModelAnimationCache=S$u,exports.ModelAnimationCollection=f$G,exports.ModelAnimationLoop=_0x1ea9f2,exports.ModelAnimationState=E$C,exports.ModelEdgeFp=_0x59e865,exports.ModelEdgeVp=_0x115b1e,exports.ModelEditControl=_0xd9687d,exports.ModelEditor=u$o,exports.ModelGraphics=t$I,exports.ModelInstance=e$H,exports.ModelInstanceCollection=w$u,exports.ModelLoadResources=t$t,exports.ModelMaterial=a$w,exports.ModelMesh=a$v,exports.ModelNode=r$z,exports.ModelObject=_0x34cdef,exports.ModelUtility=s$v,exports.ModelVisualizer=d$z,exports.ModifyRegionBottomFp=ModifyRegionBottomFp,exports.ModifyRegionBottomVp=ModifyRegionBottomVp,exports.ModifyRegionMode=_0x454473,exports.ModifyRegionOuterFS=ModifyRegionOuterFS,exports.ModifyRegionOuterVS=ModifyRegionOuterVS,exports.ModifyRegionSideFp=ModifyRegionSideFp,exports.ModifyRegionSideVp=ModifyRegionSideVp,exports.ModifyTerrain=Ne$h,exports.Module=_0x3c481f,exports.Moon=n$9,exports.MultiLineString=MultiLineString,exports.MultiPoint=MultiPoint,exports.MultiPolygon=MultiPolygon,exports.MultiTemporalFresnelFp=_0x3489f1,exports.MultiViewShed3D=_0x4f9793,exports.MultiViewShedAnalysisFp=_0x20cd45,exports.MultiViewportMode=B$e,exports.MultisampleFramebuffer=f$m,exports.MvtProviderGL=M$S,exports.Navigation=t,exports.NavigationHelpButton=l$3,exports.NavigationHelpButtonViewModel=i$4,exports.NavigationViewModel=y,exports.NearFarScalar=o$Y,exports.NetCDFParser=x$c,exports.NetworkAnalystService=NetworkAnalystService,exports.NetworkAnalystServiceBase=NetworkAnalystServiceBase,exports.NeverTileDiscardPolicy=e$7,exports.NoSleep=b$4,exports.NodeTransformationProperty=a$N,exports.NormalFramebuffer=s$h,exports.OIT=C$c,exports.ObjsOperationType=_0x27a6bb,exports.Occluder=d$U,exports.OcclusionFp=g$a,exports.OcclusionMesh=i$10,exports.OcclusionQueryStastics=e$1Y,exports.OcclusionVp=A$a,exports.OctahedralProjectedCubeMap=u$A,exports.OffsetGeometryInstanceAttribute=e$1E,exports.OpenCageGeocoderService=s$B,exports.OpenStreetMapImageryProvider=a$9,exports.OrderedGroundPrimitiveCollection=r$t,exports.OrientedBoundingBox=y$Y,exports.OrthographicFrustum=a$V,exports.OrthographicOffCenterFrustum=l$11,exports.OverLayerOffsetOptions=_0x3c4ba1,exports.OverLayerPicture=_0x3b1009,exports.OverLayerSolid=_0x77f391,exports.OverLayerStyle=_0x509f23,exports.OverLayerSymbol=_0x2f7f36,exports.OverLayerUtilityTools=_0x504ed3,exports.PBRExtensionParamterType=ie$p,exports.PBRMaterialType=Xe$e,exports.Packable=t$x,exports.PackableForInterpolation=o$G,exports.PackingRequest=Z$P,exports.PagedLOD=_0x4d13e0,exports.Particle=_0xf9b57a,exports.Particle2=a$k,exports.ParticleBillboardMode=_0xbf6524,exports.ParticleBlendMode=_0x4d4f68,exports.ParticleBurst=m$c,exports.ParticleEmitter=e$6,exports.ParticleHelper=_0x38f4df,exports.ParticlePostRenderer=u$b,exports.ParticleSystem=_0xee24b0,exports.ParticleSystem2=g$t,exports.ParticleSystemSet=_0xcf9486,exports.ParticleSystemType=v$o,exports.ParticleTrailsPostRenderer=r$f,exports.ParticleVelocityFieldEffect=P$g,exports.Pass=Le$q,exports.PassState=n$$,exports.PathGraphics=n$P,exports.PathVisualizer=w$p,exports.PeliasGeocoderService=i$K,exports.PerInstanceColorAppearance=t$Q,exports.PerformanceDisplay=o$d,exports.PerformanceWatchdog=i$3,exports.PerformanceWatchdogViewModel=r$2,exports.PerspectiveFrustum=o$15,exports.PerspectiveOffCenterFrustum=l$10,exports.PickDepth=f$d,exports.PickDepthFramebuffer=s$b,exports.PickFramebuffer=f$c,exports.PickPointFramebuffer=a$7,exports.PickRectFramebuffer=t$e,exports.Picking=d$g,exports.PiecewiseFunction=_0x4d473e,exports.PinBuilder=s$A,exports.PixelDatatype=_$_,exports.PixelFormat=V$12,exports.Plane=o$1m,exports.PlaneGeometry=f$L,exports.PlaneGeometryUpdater=p$n,exports.PlaneGraphics=e$1o,exports.PlaneOutlineGeometry=i$I,exports.PlotAnimationLayer=_0x5b011c,exports.PlotBounds=_0x5a768f,exports.PlotCesium=_0xdbf888,exports.PlotCollentionLayer=_0x23999b,exports.PlotCollentionManager=_0x4786d3,exports.PlotCommonServiceBase=_0x476176,exports.PlotCredential=_0x4893d6,exports.PlotCustomRadar=_0x3e0fb4;exports.PlotCustomRadarGeometry=_0x1fc894,exports.PlotCustomRadarOutlineGeometry=_0xe8531,exports.PlotCylinderGeometry=_0x8764e6,exports.PlotCylinderGeometryLibrary=_0x10d0f0,exports.PlotDrawControl=_0xc0ccbe,exports.PlotEditControl=_0x4ea0dc,exports.PlotEvent=_0x504b3e,exports.PlotEventManager=_0x5ac1e1,exports.PlotEvents=_0x421885,exports.PlotFetchJsonp=_0x20b2e4,exports.PlotFetchRequest=_0x11db66,exports.PlotGeoEffectBase=_0x10d3db,exports.PlotGroundPrimitive=_0x5c1673,exports.PlotLayers=_0x386d8c,exports.PlotMechanicalRadar=_0x28b85b,exports.PlotParameterRadar=_0x3f4ebc,exports.PlotParameterRadarScan=_0x3ed677,exports.PlotPoint3D=_0x23de81,exports.PlotProperty=_0x117656,exports.PlotRadarBase=_0x4638ce,exports.PlotRadarGeometry=_0x3daff3,exports.PlotRadarOutlineGeometry=_0x465603,exports.PlotRadarType=_0x2c0193,exports.PlotRadarUpdater=_0x16f21a,exports.PlotRotateRadar=_0xbdfb44,exports.PlotRotateRadarScan=_0x2de2c6,exports.PlotScanRadar=_0x49f493,exports.PlotScanRadarScan=_0x342bfb,exports.PlotServicesUtil=_0x278499,exports.PlotUtilityTools=_0x1e464a,exports.PlotWarningRadar=_0x46b837,exports.Plotting=_0x48d607,exports.PlottingLayer=_0x394df6,exports.Point=Point$1,exports.Point3D=s$N,exports.Point3Ds=t$L,exports.PointCloud=ie$g,exports.PointCloud3DTileContent=a$u,exports.PointCloudClassificationInfo=_0x2226fe,exports.PointCloudEyeDomeLighting=m$W,exports.PointCloudRenderMode=_0x2c4f4b,exports.PointCloudShading=o$Z,exports.PointGraphics=n$O,exports.PointHandler=d$v,exports.PointLight=c$h,exports.PointParticleEmitter=_0xaf014b,exports.PointPrimitive=s$o,exports.PointPrimitiveCollection=D$s,exports.PointVisualizer=v$r,exports.PointWithMeasure=PointWithMeasure,exports.Polygon=Polygon,exports.PolygonEmitter=M$a,exports.PolygonGeometry=U$18,exports.PolygonGeometryLibrary=y$Z,exports.PolygonGeometryUpdater=l$y,exports.PolygonGraphics=l$Y,exports.PolygonHandler=l$n,exports.PolygonHierarchy=e$1M,exports.PolygonOutlineGeometry=A$U,exports.PolygonPipeline=A$1f,exports.Polyline=o$14,exports.PolylineArrowMaterialProperty=t$n,exports.PolylineCollection=J$T,exports.PolylineColorAppearance=e$1F,exports.PolylineDashMaterialProperty=o$A,exports.PolylineDynamicMaterialProperty=e$v,exports.PolylineEffectUboDecl=H$14,exports.PolylineFp=_0x501956,exports.PolylineGeometry=R$A,exports.PolylineGeometryUpdater=f$r,exports.PolylineGlowMaterialProperty=t$m,exports.PolylineGraphics=a$L,exports.PolylineHandler=d$u,exports.PolylineMaterialAppearance=r$X,exports.PolylineOutlineMaterialProperty=e$y,exports.PolylinePipeline=m$X,exports.PolylineRasterVp=_0x4bddb0,exports.PolylineShadowVolumeFS=_0xfeefe2,exports.PolylineShadowVolumeVS=_0x48d945,exports.PolylineTrailMaterialProperty=o$x,exports.PolylineVisualizer=l$u,exports.PolylineVolumeGeometry=N$A,exports.PolylineVolumeGeometryLibrary=J$C,exports.PolylineVolumeGeometryUpdater=a$n,exports.PolylineVolumeGraphics=e$1n,exports.PolylineVolumeOutlineGeometry=_$z,exports.PolylineVp=_0x1568b2,exports.PositionMode=j$Z,exports.PositionProperty=t$J,exports.PositionPropertyArray=n$n,exports.PostEffectFilterlFramebuffer=t$f,exports.PostProcessStage=p$h,exports.PostProcessStageCollection=_$a,exports.PostProcessStageComposite=s$f,exports.PostProcessStageLibrary=i$b,exports.PostProcessStageSampleMode=e$j,exports.PostProcessStageTextureCache=g$r,exports.PrefilterRadianceMap=v$9,exports.PrepassRenderer=_0x4a04df,exports.PreprocessCubeMap=b$s,exports.Primitive=y$R,exports.PrimitiveCollection=o$y,exports.PrimitiveEdgeFp=_e$s,exports.PrimitiveEdgeVp=ge$q,exports.PrimitivePipeline=k$U,exports.PrimitiveState=_0x26a83e,exports.PrimitiveType=W$18,exports.Profile=_0x3c54f4,exports.ProfilePlaneGeometry=h$8,exports.ProfileRender=f$a,exports.ProgramDefines=D$V,exports.ProjectionImage=_0x337a3e,exports.ProjectionImageFp=_0x287c41,exports.ProjectionMode=_0x403af5,exports.ProjectionName=ProjectionName,exports.ProjectionPicker=n$1,exports.ProjectionPickerViewModel=o$1,exports.Property=r$_,exports.PropertyArray=i$v,exports.PropertyBag=f$V,exports.ProviderViewModel=i$5,exports.QuadraticRealPolynomial=m$1f,exports.QuadtreeOccluders=e$9,exports.QuadtreePrimitive=C$e,exports.QuadtreeTile=h$e,exports.QuadtreeTileLoadState=re$A,exports.QuadtreeTileProvider=r$e,exports.Quality=Quality,exports.QuantizedMeshTerrainData=p$O,exports.QuarticRealPolynomial=F$1i,exports.Quaternion=n$15,exports.QuaternionSpline=r$P,exports.Queue=r$17,exports.QuickPosition=_0x547cc0,exports.QuickPositionManager=_0x560429,exports.RGBELoader=U$i,exports.RPListenerType=k$g,exports.RangeMode=_0x219958,exports.RasterFramebuffer=t$E,exports.RasterGeometryType=C$q,exports.RasterLayerUboDecl=RasterLayerUboDecl,exports.RasterVectorCollection=p$9,exports.Ray=f$19,exports.RectQueryHandler=_0x33b36a,exports.Rectangle=h$18,exports.RectangleCollisionChecker=r$G,exports.RectangleGeometry=j$N,exports.RectangleGeometryLibrary=j$O,exports.RectangleGeometryUpdater=d$B,exports.RectangleGraphics=n$N,exports.RectangleOutlineGeometry=k$I,exports.ReferenceFrame=Re$l,exports.ReferenceProperty=a$p,exports.ReflectFramebuffer=i$j,exports.RegionAltitudeVectex=_0x3d8f6e,exports.RegionEffectUboDecl=q$16,exports.RegionFragment=_0x51e90e,exports.RegionMaterialFp=_0x3c68b9,exports.RegionMaterialVp=_0x33ffa2,exports.RegionTextureVertex=_0x57c608,exports.RegionVectex=_0x302e68,exports.RenderClipPlane=_0x597498,exports.RenderEntityPagedLOD=_0x4881fc,exports.RenderPipeline=_0x5430eb,exports.RenderState=d$1m,exports.RenderStateGL=t$Z,exports.RenderStateGPU=n$12,exports.RenderTexture=s$M,exports.Renderbuffer=r$10,exports.RenderbufferFormat=M$13,exports.RenderbufferGL=o$19,exports.RenderbufferGPU=r$11,exports.Renderer2D=t$d,exports.Request=r$1c,exports.RequestErrorEvent=s$$,exports.RequestScheduler=r$1b,exports.RequestState=W$1c,exports.RequestType=U$1f,exports.Resource=t$10,exports.RotateDirection=_0x520814,exports.Rotation=m$r,exports.RotationOrigin=O$K,exports.Route=f$p,exports.Route2=Route,exports.RouteCollection=d$x,exports.RouteStop=e$t,exports.RuntimeError=t$13,exports.S3MBDataParser=_0x1393e5,exports.S3MBSkeletonProcessor=_0x590c0e,exports.S3MBlock=_0x3763f9,exports.S3MBlockCache=_0x24cbe4,exports.S3MBloomEffect=_0x37a6f4,exports.S3MCompressType=_0x22a8f5,exports.S3MCreateIndexJob=_0x5659c7,exports.S3MCreateVertexJob=_0x2787b1,exports.S3MDataParser=_0x46f77a,exports.S3MDracoDecode=_0x5a4a56,exports.S3MEdgeProcessor=_0x28a85f,exports.S3MEntity=_0x128750,exports.S3MFeature=_0xee2f65,exports.S3MGroupLayer=_0x17cdca,exports.S3MInstance=_0x24f13b,exports.S3MInstanceCollection=_0xd633a7,exports.S3MInstanceCollectionVertex=_0x4b6e8f,exports.S3MLayerScheduler=_0x408010,exports.S3MLayerUBO=_0x12db87,exports.S3MMaterialUBO=_0x4f8f70,exports.S3MMeshUBO=_0x35e02f,exports.S3MOperationFSDecl=M$16,exports.S3MPBRMaterialLib=_0x3b1e53,exports.S3MPixelFormat=_0x2ddc8c,exports.S3MPointCloudEDL=_0x153701,exports.S3MPointCloudEDLFp=_0x23a343,exports.S3MPointCloudEDLFpWGSL=_0x248cf1,exports.S3MPointCloudFp=_0x589347,exports.S3MPointCloudFpWGSL=_0x138829,exports.S3MPointCloudVp=_0x21e433,exports.S3MPointCloudVpWGSL=_0x2cd408,exports.S3MPolylineEffect=_0x5175d0,exports.S3MPolylineEffectUBO=_0x8dd7b2,exports.S3MRegionEffect=_0x2adae6,exports.S3MRegionEffectUBO=_0x47febb,exports.S3MRenderStateCreator=_0x45bcf8,exports.S3MShaderProgramJob=_0x5adff0,exports.S3MSkeleton=_0x1c4b07,exports.S3MSkeletonProcessor=_0x432861,exports.S3MTaskManager=_0x29d1c7,exports.S3MTextureManager=_0x1451be,exports.S3MThemeGraph=_0x1a0b3c,exports.S3MTilesBillboardPixelSizeVp=_0x43476e,exports.S3MTilesBillboardVp=S3MTilesBillboardVp,exports.S3MTilesCommonOntTextureFP=_0x357523,exports.S3MTilesExtendPolygonShadowVP=_0xb2d90,exports.S3MTilesFontWithHaloFp=_0xf44c9d,exports.S3MTilesFpPointWGSL=_0x355815,exports.S3MTilesFpWGSL=_0x4c43d7,exports.S3MTilesFragment=_0x1931a7,exports.S3MTilesFragmentRaster=_0xb37562,exports.S3MTilesLabelStyle=_0x3c2cd7,exports.S3MTilesLayer=_0x1a71e8,exports.S3MTilesLineShadowVectex=_0x4faa00,exports.S3MTilesRectSelection=_0x4f0656,exports.S3MTilesRectSelectionWGSL=_0xcc5af2,exports.S3MTilesRegionShadowVectex=_0x5099e1,exports.S3MTilesSelection=_0x53b856,exports.S3MTilesShadowVolumeFP=_0x4a0943,exports.S3MTilesVectex=_0x359ef7,exports.S3MTilesVectexRaster=_0x903893,exports.S3MTilesVpPointWGSL=_0x108a30,exports.S3MTilesVpWGSL=_0x36d142,exports.S3MUniformMapCreator=_0x2c7aca,exports.S3MUploadSubTextureJob=_0x2445e0,exports.S3MVersion=_0x43b37d,exports.S3MVertexFactory=v$R,exports.S3MVertexPackage=_0x3ad44f,exports.S3MVolumeUBO=_0x1f4c64,exports.S3MVolumeUboDecl=X$Z,exports.S3MVoxelGridFp=S3MVoxelGridFp,exports.S3MVoxelGridVp=S3MVoxelGridVp,exports.S3MWaterLayerUBO=_0x44ae93,exports.S3ModelFP=_0x47b2f7,exports.SCTTerrainProvider=se$r,exports.SDFSettings=V$L,exports.SMAA=i$a,exports.SMLFileService=_0x583b79,exports.SQFramebuffer=t$K,exports.SRGBtoLINEAR=s$W,exports.SSAOEffect=a$f,exports.SampledPositionProperty=o$z,exports.SampledProperty=g$y,exports.Sampler=e$1S,exports.Satellite=_0x5bf86f,exports.SatelliteEntity=_0x2e5655,exports.SatelliteEntityManager=_0x535f91,exports.SatelliteGroup=_0x464966,exports.SatelliteManager=_0x5e00a7,exports.SatelliteOrbitsLayer=_0x415334,exports.SatelliteToolkit=_0x3121bb,exports.Scalar=_0x442216,exports.ScaledPositionProperty=i$s,exports.ScanEffect=h$i,exports.ScanEffectMode=A$l,exports.Scene=w$4,exports.SceneConfigLoader=De$2,exports.SceneFramebuffer=n$i,exports.SceneMode=C$14,exports.SceneModePicker=c$2,exports.SceneModePickerViewModel=i$2,exports.SceneTransforms=s$R,exports.SceneTransitioner=R$8,exports.SceneUBO=_0x3a935d,exports.SceneUboDecl=x$16,exports.ScreenSpaceCameraController=_a,exports.ScreenSpaceEventHandler=g$K,exports.ScreenSpaceEventType=G$J,exports.SelectColorType=Zr$3,exports.SelectionIndicator=i$1,exports.SelectionIndicatorViewModel=n,exports.ServerGeometry=ServerGeometry,exports.ServiceBase=ServiceBase,exports.ShaderCache=h$m,exports.ShaderChunk=to,exports.ShaderProgram=r$14,exports.ShaderProgramCompute=t$2,exports.ShaderProgramCreator=_0x273cff,exports.ShaderProgramGL=g$1a,exports.ShaderProgramGPU=m$$,exports.ShaderSource=s$V,exports.ShadowAnalysisFp=_0x46d19a,exports.ShadowMap=C$Z,exports.ShadowMapShader=g$12,exports.ShadowMode=W$X,exports.ShadowQueryFp=_0x138bac,exports.ShadowQueryPoints=_0x19393b,exports.ShadowQueryVp=_0x1f9203,exports.ShadowType=_0x325616,exports.ShadowUBO=_0x32f9aa,exports.ShadowUboDecl=J$$,exports.ShadowVolumeAppearance=y$Q,exports.SharedEDLFrameBuffer=_0x460335,exports.ShowGeometryInstanceAttribute=e$1I,exports.SightLineAnalysis=_0x253cc,exports.Sightline=_0x393ad5,exports.SightlineAnalysisFp=SightlineAnalysisFp,exports.SightlineAnalysisVp=_0x35ab06,exports.SilverLightingAtmosphere=n$6,exports.SilverLightingEphemeris=a$2,exports.SilverLightingLocalTime=e$2,exports.SilverLightingLocation=i$8,exports.SilverLightingLuminanceMapper=a$3,exports.SilverLightingSky=l$a,exports.SilverLightingSolarSpectrum=o$9,exports.SilverLightingSpectrum=G$6,exports.Simon1994PlanetaryPositions=F$G,exports.SimplePolylineGeometry=S$A,exports.SimulationController=_0x120b1f,exports.SingleTileImageryProvider=u$f,exports.SitDataManager=_0x1c2819,exports.SitDataStruct=_0x102a68,exports.SituationSimulationManager=_0x2e28f1,exports.SituationSimulationSchemeDataType=_0x489b6c,exports.SituationSimulationSchemeManager=_0x572365,exports.SituationSimulationToolkit=_0xf52e1d,exports.SkeletonProcessor=_0x18a7ac,exports.SkeletonState=_0x172047,exports.SkyAtmosphere=h$6,exports.SkyBox=h$5,exports.Skyline=_0x733981,exports.SkylineFp=_0x3315e4,exports.SkylineVp=_0x88ad48,exports.SlopeSetting=l$K,exports.SlopeSettingEnum=_0x25bb47,exports.SmlInfoStruct=_0x1e67d8,exports.SmoothStepSpline=r$O,exports.SolidModelsProfile=r$d,exports.SolidProfileFp=V$8,exports.SpatialQuery3D=_0x16da97,exports.SpatialQueryFp=_0x12eef8,exports.SpatialQueryFpWGSL=_0xaa057c,exports.SphereDirectedParticleEmitter=_0x33b36c,exports.SphereEmitter=o$s,exports.SphereGeometry=n$u,exports.SphereOutlineGeometry=a$U,exports.SphereParticleEmitter=_0x4ccf7f,exports.Spherical=c$B,exports.Spline=n$H,exports.SplitDirection=_0x2d4a08,exports.SpotLight=_$k,exports.StaticGeometryColorBatch=y$s,exports.StaticGeometryPerMaterialBatch=u$r,exports.StaticGroundGeometryColorBatch=p$l,exports.StaticGroundGeometryPerMaterialBatch=f$t,exports.StaticGroundPolylinePerMaterialBatch=m$o,exports.StaticOutlineGeometryBatch=y$r,exports.StencilConstants=u$M,exports.StencilFunction=m$Z,exports.StencilOperation=n$_,exports.StopPlayMode=A$s,exports.StripeMaterialProperty=i$u,exports.StripeOrientation=mr$2,exports.Style3D=e$1v,exports.StyleExpression=t$8,exports.SubEmitter=_0x5e1712,exports.SubEmitterType=_0x5142be,exports.SubTextureCache=_0x4bc96b,exports.SubTextureManager=_0x57fbd1,exports.Sun=u$5,exports.SunLight=i$k,exports.SunPostProcess=s$e,exports.SuperMapImageryProvider=P$6,exports.SuperMapTerrainProvider=ne$u,exports.SuperMapVersion=SuperMapVersion,exports.SupportTools=f$J,exports.SurroundLineType=_0x3fcacb,exports.SvgPathBindingHandler=g$4,exports.SymbolAlgoUtil=_0x2909c1,exports.SymbolAnnotation=_0x39500c,exports.SymbolArbitraryPolygon=_0x2c1b91,exports.SymbolArc=_0x5cf148,exports.SymbolBrace=_0x26b741,exports.SymbolCell=_0x4c78d5,exports.SymbolChord=_0x10c3cc,exports.SymbolCircle=_0x4d54a5,exports.SymbolConcentricCircle=_0x431d2c,exports.SymbolCurveEight=_0x105b3f,exports.SymbolDot=_0x4844fd,exports.SymbolDotGraphic=_0x3bca92,exports.SymbolDotPicture=_0x231a11,exports.SymbolDotVector=_0x180939,exports.SymbolEllipse=_0x509a13,exports.SymbolKidney=_0x399148,exports.SymbolLib=_0x467baf,exports.SymbolLibManager=_0x18c058,exports.SymbolLibService=_0x5228e4,exports.SymbolParallelogram=_0x3b0548,exports.SymbolPie=_0x1daae0,exports.SymbolPolyBezier=_0x1e88b8,exports.SymbolPolyBezierClosed=_0x5ea7dc,exports.SymbolPolyline=_0x5e520d,exports.SymbolRectangle=_0x5f1d0b,exports.SymbolRegularPolygon=_0x362083,exports.SymbolRunWay=_0x41bd10,exports.SymbolStyle=_0x291171,exports.SymbolTextStyle=_0x40b7f2,exports.SymbolTrapezoid=_0x5d985d,exports.SymbolType=_0x1c668c,exports.TSClipPlane=_0x184a5e,exports.TaskProcessor=i$W,exports.TemporalAA=a$e,exports.TemporalSetting=o$U,exports.TerrainData=r$E,exports.TerrainEncoding=h$M,exports.TerrainFillMesh=Q$L,exports.TerrainLayer=r$h,exports.TerrainLayerCollection=o$i,exports.TerrainMesh=T$M,exports.TerrainOffsetProperty=h$E,exports.TerrainProvider=I$12,exports.TerrainQuantization=ye$j,exports.TerrainSlopeAnalysis=_0x10b943,exports.TerrainState=Ee$j,exports.TextOverlapInfo=_0x21df38,exports.TextPos=_0x26dfeb,exports.Texture=t$U,exports.Texture3D=e$k,exports.Texture3DGL=E$m,exports.Texture3DGPU=f$l,exports.TextureAtlas=v$I,exports.TextureCache=r$o,exports.TextureGL=w$V,exports.TextureGPU=u$R,exports.TextureMagnificationFilter=rt$k,exports.TextureManager=_0xa08fda,exports.TextureMinificationFilter=tt$i,exports.TextureWrap=q$1a,exports.ThreeDModeling=_0x680f96,exports.TiandituAnnotationProvider=h$3,exports.TiandituImageryProvider=f$6,exports.TiandituMapsStyle=t$7,exports.TiandituTerrainProvider=d$8,exports.TileAvailability=n$C,exports.TileBoundingRegion=y$K,exports.TileBoundingSphere=t$q,exports.TileBoundingVolume=o$8,exports.TileCoordinatesImageryProvider=n$4,exports.TileDiscardPolicy=r$b,exports.TileEdge=T$K,exports.TileImagery=o$T,exports.TileMapServiceImageryProvider=g$n,exports.TileOrientedBoundingBox=c$t,exports.TileProviderError=l$V,exports.TileReplacementQueue=i$L,exports.TileSelectionResult=D$J,exports.TileState=TileState,exports.TileTerrain=x$R,exports.Tileset3DTileContent=t$s,exports.TilingScheme=o$D,exports.TiltIndicator=g,exports.TimeConstants=h$17,exports.TimeDynamicImagery=f$R,exports.TimeDynamicPointCloud=g$7,exports.TimeInterval=d$W,exports.TimeIntervalCollection=c$A,exports.TimeIntervalCollectionPositionProperty=t$l,exports.TimeIntervalCollectionProperty=t$k,exports.TimeStandard=H$1d,exports.Timeline=u$3,exports.TimelineHighlightRange=s$1,exports.TimelineTrack=v,exports.Tipsify=D$14,exports.ToggleButtonViewModel=r$9,exports.Tonemapper=M$8,exports.TransformFeedback=s$i,exports.Transforms=m$19,exports.TranslationRotationScale=e$1_,exports.TransportationAnalystParameter=TransportationAnalystParameter,exports.TransportationAnalystResultSetting=TransportationAnalystResultSetting,exports.TridiagonalSystemSolver=m$O,exports.TrustedServers=u$W,exports.TubularCommunicationLink=_0x2e6536,exports.Tween=f$X,exports.TweenCollection=s$a,exports.UBOBase=_0x37a515,exports.UBONames=_0x2e0417,exports.UBONames2=UBONames,exports.UnderGlobe=t$6,exports.UniformBufferEngineGL=F$6,exports.UniformBufferGL=e$1C,exports.UniformState=P$l,exports.UniformlyVariableMotionSpline=n$G,exports.UpdateEdgeWeightParameters=UpdateEdgeWeightParameters,exports.UpdateEdgeWeightService=UpdateEdgeWeightService,exports.UpdateTurnNodeWeightParameters=UpdateTurnNodeWeightParameters,exports.UpdateTurnNodeWeightService=UpdateTurnNodeWeightService,exports.Uri=h$16,exports.UrlTemplateImageryProvider=_$g,exports.UrlType=Tr$4,exports.Util=_0x5cddc5,exports.VERSION=VERSION,exports.VRButton=r$1,exports.VRButtonViewModel=a,exports.VRTheWorldTerrainProvider=l$J,exports.Vector=Vector,exports.Vector3DTileBatch=c$x,exports.Vector3DTileContent=y$v,exports.Vector3DTileGeometry=e$I,exports.Vector3DTilePoints=b$G,exports.Vector3DTilePolygons=a$t,exports.Vector3DTilePolylines=h$C,exports.Vector3DTilePrimitive=y$y,exports.VectorTilesLayer=_$8,exports.VectorTilesMap=i$P,exports.VelocityOrientationProperty=e$w,exports.VelocityVectorProperty=r$u,exports.VertexArray=c$13,exports.VertexArrayFacade=v$F,exports.VertexArrayGL=l$15,exports.VertexArrayGPU=m$_,exports.VertexCompressOption=_0x64fca6,exports.VertexFormat=n$13,exports.VertexWeightMode=_0x132759,exports.VerticalOrigin=S$Q,exports.VideoSynchronizer=n$t,exports.View=L$c,exports.ViewDome=_0x4036ab,exports.ViewDomeFp=_0x2232ed,exports.ViewDomeType=_0x19446b,exports.ViewDomeVp=_0x48338c,exports.ViewShed3D=_0x13f223,exports.ViewShedAnalysis=_0x4dfa3a,exports.ViewShedAnalysisFp=_0x55e263,exports.ViewShedAnalysisVp=_0x56b405,exports.Viewer=u,exports.ViewportQuad=o$7,exports.Visibility=fe$r,exports.Visualizer=r$r,exports.Volume=A$3,exports.VolumeBillboardCollection=c$8,exports.VolumeBoxFp=Nt$2,exports.VolumeBoxVp=Mt$2,exports.VolumeRenderMode=gt$2,exports.VoxelGridLayer3D=g$e,exports.VoxelGridPostRenderer=a$5,exports.VoxelGridTile=_$9,exports.VoxelGridTileMultiResolution=o$b,exports.VulkanConstants=VulkanConstants,exports.WTSConfigManager=_0x18273d,exports.WalkingMode=Ct,exports.WallGeometry=E$G,exports.WallGeometryLibrary=D$C,exports.WallGeometryUpdater=n$m,exports.WallGraphics=e$1m,exports.WallOutlineGeometry=w$x,exports.WaterLayerUboDecl=G$1f,exports.WaterMode=K$a,exports.WaterParameter=h$J,exports.WaterbodySize=s$E,exports.WaveStrength=i$O,exports.WayPathType=_0x2187ca,exports.WebGLConstants=de$y,exports.WebMapServiceImageryProvider=m$g,exports.WebMapTileServiceImageryProvider=v$E,exports.WebMercatorProjection=t$N,exports.WebMercatorTilingScheme=c$S,exports.WeightSpline=r$D,exports.Widget=u$2,exports.WindingOrder=W$13,exports.WireFrameType=_0x1d226a,exports.XML=s$T,exports.ZoomIndicator=o,exports.ZoomIndicatorViewModel=r,exports.addBuffer=a$y,exports.addDefaults=E$E,exports.addExtensionsRequired=s$x,exports.addExtensionsUsed=i$D,exports.addPipelineExtras=s$z,exports.addToArray=d$P,exports.adjustColor=O$P,exports.appendForwardSlash=n$1a,exports.arrayFill=d$1s,exports.arrayRemoveDuplicates=D$13,exports.arraySlice=l$R,exports.assimpjs=c$7,exports.barycentricCoordinates=S$$,exports.bignumber=tr$1,exports.binarySearch=a$17,exports.bitmap_sdf=b$_,exports.blinnPhong=ro$1,exports.brdf=l$16,exports.buildModuleUrl=n$17,exports.bytebuffer=u$4,exports.calcTexCoordDecl=eo,exports.calculateMipLevel=V$Z,exports.calculatePolyTexCoord=T$12,exports.cancelAnimationFrame=t$C,exports.checkFloatTexturePrecision=r$p,exports.clip=_$W,exports.clone=l$1f,exports.combine=p$19,exports.computeFlyToLocationForRectangle=a$d,exports.computeWValue=N$Y,exports.createBillboardPointCallback=i$B,exports.createCommand=s$4,exports.createDefaultImageryProviderViewModels=m$4,exports.createDefaultTerrainProviderViewModels=n$3,exports.createFragmentFromTemplate=n$2,exports.createGuid=e$1T,exports.createMaterialPropertyDescriptor=c$$,exports.createOpenStreetMapImageryProvider=L$j,exports.createPropertyDescriptor=C$10,exports.createRawPropertyDescriptor=c$X,exports.createTangentSpaceDebugPrimitive=y$e,exports.createTaskProcessorWorker=l,exports.createTileMapServiceImageryProvider=te$8,exports.createUniform=I$1m,exports.createUniformArray=V$$,exports.createUniformArrayGPU=j$1a,exports.createUniformGPU=V$_,exports.createWorldImagery=o$k,exports.createWorldTerrain=u$G,exports.crunchprevious=Module$1,exports.cubeUV_reflection=c$14,exports.decodeGoogleEarthEnterpriseData=f$M,exports.defaultValue=u$Z,exports.defined=e$2e,exports.deprecationWarning=t$11,exports.destroyObject=i$11,exports.directionLightDecl=i$Z,exports.dynamicGeometryGetBoundingSphere=h$s,exports.earcut=_0x53e246,exports.earcut_2_2_1=z$$,exports.executeExcavation=I$1i,exports.executeServerExcavationDecl=f$_,exports.exportKml=oe$a,exports.fill_style_layer=_0x304cf3,exports.findAccessorMinMax=B$y,exports.flightLineXml=_0x1eef11,exports.flyManager=_0x5bc321,exports.formatError=f$T,exports.freezeRenderState=c$16,exports.getAbsoluteUri=o$1j,exports.getAccessorByteStride=p$A,exports.getBaseUri=i$1b,exports.getBinaryAccessor=M$B,exports.getClipAndStyleCode=p$x,exports.getClippingFunction=f$H,exports.getComponentReader=c$y,exports.getElement=i$c,exports.getEmissiveTextureAtlasColor=k$_,exports.getEnvironmentColor=Z$11,exports.getExtensionFromUri=a$13,exports.getFilenameFromUri=f$Q,exports.getFusionModePosition=w$X,exports.getImagePixels=d$14,exports.getMagic=a$F,exports.getNormalEC=mo$2,exports.getNormalMatrix=z$Y,exports.getPBRParamFromTexture=A$1a,exports.getPreciseArea=R$C,exports.getStringFromTypedArray=a$K,exports.getTextureColorDecl=y$V,exports.getTimestamp=Et$c,exports.getUVMatrixDecl=E$19,exports.getVertexByFlatten=P$11,exports.getVolumeValue=j$19,exports.globeAnalysis=g$17,exports.globeOcean=D$$,exports.graphemesplitter=T$O,exports.hasExtension=i$E,exports.heightReferenceOnEntityPropertyChanged=a$B,exports.hemisphereLightDecl=e$1U,exports.html2canvas=_0x4a4fab,exports.isBitSet=i$Q,exports.isBlobUri=i$1a,exports.isCrossOriginUrl=i$19,exports.isDataUri=e$26,exports.isLeapYear=i$1c,exports.joinUrls=n$W,exports.jsep=q$C,exports.kdbush=O$D,exports.knockout=ce$1,exports.knockout_3_5_1=ce$1,exports.knockout_es5=t$5,exports.lightSourceImpl=p$11,exports.line_style_layer=_0x11ec06,exports.loadAndExecuteScript=a$11,exports.loadArrayBuffer=o$10,exports.loadBlob=l$O,exports.loadCRN=a$P,exports.loadCRNForS3M=h$U,exports.loadCubeMap=d$q,exports.loadDXTZ=B$M,exports.loadImage=t$S,exports.loadImageFromTypedArray=w$R,exports.loadImageViaBlob=c$F,exports.loadJson=u$P,exports.loadJson2=_0x386520,exports.loadJsonp=d$V,exports.loadKTX=k$W,exports.loadKTX2=f$U,exports.loadText=u$Q,exports.loadText2=_0x2d198d,exports.loadView=f$1,exports.loadWithXhr=p$$,exports.loadWithXhr2=_0x545b8d,exports.loadXML=d$1f,exports.long=s$7,exports.measureText=F$T,exports.mergeSort=m$I,exports.mersenne_twister=s$12,exports.meshopt_decoder_module=V$1,exports.modernizeShader=S$W,exports.moveTechniqueRenderStates=R$v,exports.moveTechniquesToExtension=R$u,exports.netcdf=k$6,exports.numberOfComponentsForType=r$B,exports.objectToQuery=m$1d,exports.oneTimeWarning=e$22,exports.parseGlb=O$u,exports.parseResponseHeaders=n$19,exports.pbf=h$V,exports.pointInsideTriangle=c$D,exports.pointLightDecl=m$10,exports.potpack=W$V,exports.preClipFS=C$17,exports.processModelMaterialsCommon=ue$l,exports.processPbrMaterials=he$h,exports.proj4_src=k$D,exports.protobuf=f$7,exports.protobuf_minimal=R$B,exports.purify=je$d,exports.queryToObject=m$1c,exports.quickselect=s$K,exports.rainDecl=o$1a,exports.rbush=B$B,exports.readAccessorPacked=T$B,exports.removeExtensionsRequired=s$y,exports.removeExtensionsUsed=d$N,exports.removePipelineExtras=f$F,exports.removeUnusedElements=d$L,exports.renderNormal=h$12,exports.renderNormalAndDepth=S$V,exports.renderPrePass=U$12,exports.requestAnimationFrame=p$H,exports.s3mComputeVaryings=B$_,exports.sampleTerrain=y$C,exports.sampleTerrainMostDetailed=y$B,exports.scaleToGeodeticSurface=P$1d,exports.setAlphaByWValue=F$13,exports.shaderModelBase=Y$Q,exports.shadowReceive=a$X,exports.shadowVisibility=n$10,exports.sketchMode=Q$12,exports.snowDecl=r$15,exports.splitClip=W$11,exports.spotLightDecl=t$Y,exports.sprintf=$$15,exports.subdivideArray=u$O,exports.subscribeAndEvaluate=c$5,exports.supermap3D_openlayer_4_6_5=t$4,exports.throttleRequestByServer=o$O,exports.topojson=ke$7,exports.unzip=_0x5f4c81,exports.updateAccessorComponentTypes=T$A,exports.updateVersion=re$s,exports.vertexLogDepthDecl=$$_,exports.viewerCesium3DTilesInspectorMixin=s,exports.viewerCesiumInspectorMixin=c,exports.viewerDragDropMixin=$$1,exports.viewerPerformanceWatchdogMixin=m,exports.webGLConstantToGlslType=t$w,exports.websocketScheduler=l$I,exports.when=o$1l,exports.wrapFunction=e$P,exports.writeFragDepth=L$19,exports.writeLogDepthDecl=oo$1,exports.writeTextToCanvas=x$W,exports.zip=he$a,Object.defineProperty(exports,"__esModule",{value:!0})})); diff --git a/SuperMap iEarth/public/SuperMap3D/ThirdParty/Workers/basis_transcoder.js b/SuperMap iEarth/public/SuperMap3D/ThirdParty/Workers/basis_transcoder.js index ca8b1048..6d896f36 100644 --- a/SuperMap iEarth/public/SuperMap3D/ThirdParty/Workers/basis_transcoder.js +++ b/SuperMap iEarth/public/SuperMap3D/ThirdParty/Workers/basis_transcoder.js @@ -1 +1 @@ -var BASIS=function(){var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(r=r||__filename),function(t){var e,n,o=void 0!==(t=t||{})?t:{};o.ready=new Promise((function(r,t){e=r,readyPromiseRejectza=t}));var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var u=[],s=!1,c=!1,f=!1,l=!1;s="object"==typeof window,c="function"==typeof importScripts,f="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,l=!s&&!f&&!c;var p,d,h,v,y,m="";function g(r){return o.locateFile?o.locateFile(r,m):m+r}f?(m=c?require("path").dirname(m)+"/":__dirname+"/",p=function(r,t){return v||(v=require("fs")),y||(y=require("path")),r=y.normalize(r),v.readFileSync(r,t?null:"utf8")},h=function(r){var t=p(r,!0);return t.buffer||(t=new Uint8Array(t)),A(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),u=process.argv.slice(2),process.on("uncaughtException",(function(r){if(!(r instanceof Qe))throw r})),process.on("unhandledRejection",dr),function(r){process.exit(r)},o.inspect=function(){return"[Emscripten Module object]"}):l?("undefined"!=typeof read&&(p=function(r){return read(r)}),h=function(r){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(r)):(A("object"==typeof(t=read(r,"binary"))),t)},"undefined"!=typeof scriptArgs?u=scriptArgs:void 0!==arguments&&(u=arguments),"function"==typeof quit&&function(r){quit(r)},"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(s||c)&&(c?m=self.location.href:"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),r&&(m=r),m=0!==m.indexOf("blob:")?m.substr(0,m.lastIndexOf("/")+1):"",p=function(r){var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText},c&&(h=function(r){var t=new XMLHttpRequest;return t.open("GET",r,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),d=function(r,t,e){var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):e()},n.onerror=e,n.send(null)});var w=o.print||console.log.bind(console),T=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments&&(u=o.arguments),o.thisProgram&&o.thisProgram,o.quit&&o.quit;var b,C=function(r){r};o.wasmBinary&&(b=o.wasmBinary);var $;o.noExitRuntime;"object"!=typeof WebAssembly&&dr("no native wasm support detected");var P=!1;function A(r,t){r||dr("Assertion failed: "+t)}var _="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function S(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.subarray&&_)return _.decode(r.subarray(t,o));for(var i="";t<o;){var a=r[t++];if(128&a){var u=63&r[t++];if(192!=(224&a)){var s=63&r[t++];if((a=224==(240&a)?(15&a)<<12|u<<6|s:(7&a)<<18|u<<12|s<<6|63&r[t++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|u)}else i+=String.fromCharCode(a)}return i}function W(r,t){return r?S(R,r,t):""}function E(r,t,e,n){if(!(n>0))return 0;for(var o=e,i=e+n-1,a=0;a<r.length;++a){var u=r.charCodeAt(a);if(u>=55296&&u<=57343)u=65536+((1023&u)<<10)|1023&r.charCodeAt(++a);if(u<=127){if(e>=i)break;t[e++]=u}else if(u<=2047){if(e+1>=i)break;t[e++]=192|u>>6,t[e++]=128|63&u}else if(u<=65535){if(e+2>=i)break;t[e++]=224|u>>12,t[e++]=128|u>>6&63,t[e++]=128|63&u}else{if(e+3>=i)break;t[e++]=240|u>>18,t[e++]=128|u>>12&63,t[e++]=128|u>>6&63,t[e++]=128|63&u}}return t[e]=0,e-o}function F(r,t,e){return E(r,R,t,e)}function k(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++e)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}var O,j,R,x,I,D,U,B,M,V="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function q(r,t){for(var e=r,n=e>>1,o=n+t/2;!(n>=o)&&I[n];)++n;if((e=n<<1)-r>32&&V)return V.decode(R.subarray(r,e));for(var i="",a=0;!(a>=t/2);++a){var u=x[r+2*a>>1];if(0==u)break;i+=String.fromCharCode(u)}return i}function H(r,t,e){if(void 0===e&&(e=2147483647),e<2)return 0;for(var n=t,o=(e-=2)<2*r.length?e/2:r.length,i=0;i<o;++i){var a=r.charCodeAt(i);x[t>>1]=a,t+=2}return x[t>>1]=0,t-n}function z(r){return 2*r.length}function N(r,t){for(var e=0,n="";!(e>=t/4);){var o=D[r+4*e>>2];if(0==o)break;if(++e,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function G(r,t,e){if(void 0===e&&(e=2147483647),e<4)return 0;for(var n=t,o=n+e-4,i=0;i<r.length;++i){var a=r.charCodeAt(i);if(a>=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&r.charCodeAt(++i);if(D[t>>2]=a,(t+=4)+4>o)break}return D[t>>2]=0,t-n}function L(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&++e,t+=4}return t}function X(r,t){return r%t>0&&(r+=t-r%t),r}function J(r){O=r,o.HEAP8=j=new Int8Array(r),o.HEAP16=x=new Int16Array(r),o.HEAP32=D=new Int32Array(r),o.HEAPU8=R=new Uint8Array(r),o.HEAPU16=I=new Uint16Array(r),o.HEAPU32=U=new Uint32Array(r),o.HEAPF32=B=new Float32Array(r),o.HEAPF64=M=new Float64Array(r)}o.INITIAL_MEMORY;var K,Q=[],Y=[],Z=[],rr=[];function tr(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)ir(o.preRun.shift());$r(Q)}function er(){!0,$r(Y)}function nr(){$r(Z)}function or(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)ur(o.postRun.shift());$r(rr)}function ir(r){Q.unshift(r)}function ar(r){Y.unshift(r)}function ur(r){rr.unshift(r)}var sr=0,cr=null,fr=null;function lr(r){sr++,o.monitorRunDependencies&&o.monitorRunDependencies(sr)}function pr(r){if(sr--,o.monitorRunDependencies&&o.monitorRunDependencies(sr),0==sr&&(null!==cr&&(clearInterval(cr),cr=null),fr)){var t=fr;fr=null,t()}}function dr(r){o.onAbort&&o.onAbort(r),T(r+=""),P=!0,1,r="abort("+r+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(r);throw n(t),t}function hr(r,t){return String.prototype.startsWith?r.startsWith(t):0===r.indexOf(t)}o.preloadedImages={},o.preloadedAudios={};var vr="data:application/octet-stream;base64,";function yr(r){return hr(r,vr)}var mr="file://";function gr(r){return hr(r,mr)}var wr="basis_transcoder.wasm";function Tr(r){try{if(r==wr&&b)return new Uint8Array(b);if(h)return h(r);throw"both async and sync fetching of the wasm failed"}catch(r){dr(r)}}function br(){if(!b&&(s||c)){if("function"==typeof fetch&&!gr(wr))return fetch(wr,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+wr+"'";return r.arrayBuffer()})).catch((function(){return Tr(wr)}));if(d)return new Promise((function(r,t){d(wr,(function(t){r(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return Tr(wr)}))}function Cr(){var r={a:Le};function t(r,t){var e=r.exports;o.asm=e,J(($=o.asm.K).buffer),K=o.asm.O,ar(o.asm.L),pr()}function e(r){t(r.instance)}function i(t){return br().then((function(t){return WebAssembly.instantiate(t,r)})).then(t,(function(r){T("failed to asynchronously prepare wasm: "+r),dr(r)}))}if(lr(),o.instantiateWasm)try{return o.instantiateWasm(r,t)}catch(r){return T("Module.instantiateWasm callback failed with error: "+r),!1}return(b||"function"!=typeof WebAssembly.instantiateStreaming||yr(wr)||gr(wr)||"function"!=typeof fetch?i(e):fetch(wr,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(e,(function(r){return T("wasm streaming compile failed: "+r),T("falling back to ArrayBuffer instantiation"),i(e)}))}))).catch(n),{}}function $r(r){for(;r.length>0;){var t=r.shift();if("function"!=typeof t){var e=t.func;"number"==typeof e?void 0===t.arg?K.get(e)():K.get(e)(t.arg):e(void 0===t.arg?null:t.arg)}else t(o)}}yr(wr)||(wr=g(wr));var Pr={};function Ar(r){for(;r.length;){var t=r.pop();r.pop()(t)}}function _r(r){return this.fromWireType(U[r>>2])}var Sr={},Wr={},Er={},Fr=48,kr=57;function Or(r){if(void 0===r)return"_unknown";var t=(r=r.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Fr&&t<=kr?"_"+r:r}function jr(r,t){return r=Or(r),new Function("body","return function "+r+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Rr(r,t){var e=jr(t,(function(r){this.name=t,this.message=r;var e=new Error(r).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},e}var xr=void 0;function Ir(r){throw new xr(r)}function Dr(r,t,e){function n(t){var n=e(t);n.length!==r.length&&Ir("Mismatched type converter count");for(var o=0;o<r.length;++o)Nr(r[o],n[o])}r.forEach((function(r){Er[r]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(r,t){Wr.hasOwnProperty(r)?o[t]=Wr[r]:(i.push(r),Sr.hasOwnProperty(r)||(Sr[r]=[]),Sr[r].push((function(){o[t]=Wr[r],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Ur(r){var t=Pr[r];delete Pr[r];var e=t.rawConstructor,n=t.rawDestructor,o=t.fields;Dr([r],o.map((function(r){return r.getterReturnType})).concat(o.map((function(r){return r.setterArgumentType}))),(function(r){var i={};return o.forEach((function(t,e){var n=t.fieldName,a=r[e],u=t.getter,s=t.getterContext,c=r[e+o.length],f=t.setter,l=t.setterContext;i[n]={read:function(r){return a.fromWireType(u(s,r))},write:function(r,t){var e=[];f(l,r,c.toWireType(e,t)),Ar(e)}}})),[{name:t.name,fromWireType:function(r){var t={};for(var e in i)t[e]=i[e].read(r);return n(r),t},toWireType:function(r,t){for(var o in i)if(!(o in t))throw new TypeError('Missing field: "'+o+'"');var a=e();for(o in i)i[o].write(a,t[o]);return null!==r&&r.push(n,a),a},argPackAdvance:8,readValueFromPointer:_r,destructorFunction:n}]}))}function Br(r){switch(r){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+r)}}function Mr(){for(var r=new Array(256),t=0;t<256;++t)r[t]=String.fromCharCode(t);Vr=r}var Vr=void 0;function qr(r){for(var t="",e=r;R[e];)t+=Vr[R[e++]];return t}var Hr=void 0;function zr(r){throw new Hr(r)}function Nr(r,t,e){if(e=e||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(r||zr('type "'+n+'" must have a positive integer typeid pointer'),Wr.hasOwnProperty(r)){if(e.ignoreDuplicateRegistrations)return;zr("Cannot register type '"+n+"' twice")}if(Wr[r]=t,delete Er[r],Sr.hasOwnProperty(r)){var o=Sr[r];delete Sr[r],o.forEach((function(r){r()}))}}function Gr(r,t,e,n,o){var i=Br(e);Nr(r,{name:t=qr(t),fromWireType:function(r){return!!r},toWireType:function(r,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(r){var n;if(1===e)n=j;else if(2===e)n=x;else{if(4!==e)throw new TypeError("Unknown boolean type size: "+t);n=D}return this.fromWireType(n[r>>i])},destructorFunction:null})}function Lr(r){if(!(this instanceof ct))return!1;if(!(r instanceof ct))return!1;for(var t=this.$$.ptrType.registeredClass,e=this.$$.ptr,n=r.$$.ptrType.registeredClass,o=r.$$.ptr;t.baseClass;)e=t.upcast(e),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&e===o}function Xr(r){return{count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType}}function Jr(r){zr(r.$$.ptrType.registeredClass.name+" instance already deleted")}var Kr=!1;function Qr(r){}function Yr(r){r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)}function Zr(r){r.count.value-=1,0===r.count.value&&Yr(r)}function rt(r){return"undefined"==typeof FinalizationGroup?(rt=function(r){return r},r):(Kr=new FinalizationGroup((function(r){for(var t=r.next();!t.done;t=r.next()){var e=t.value;e.ptr?Zr(e):console.warn("object already deleted: "+e.ptr)}})),rt=function(r){return Kr.register(r,r.$$,r.$$),r},Qr=function(r){Kr.unregister(r.$$)},rt(r))}function tt(){if(this.$$.ptr||Jr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=rt(Object.create(Object.getPrototypeOf(this),{$$:{value:Xr(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r}function et(){this.$$.ptr||Jr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&zr("Object already scheduled for deletion"),Qr(this),Zr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function nt(){return!this.$$.ptr}var ot=void 0,it=[];function at(){for(;it.length;){var r=it.pop();r.$$.deleteScheduled=!1,r.delete()}}function ut(){return this.$$.ptr||Jr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&zr("Object already scheduled for deletion"),it.push(this),1===it.length&&ot&&ot(at),this.$$.deleteScheduled=!0,this}function st(){ct.prototype.isAliasOf=Lr,ct.prototype.clone=tt,ct.prototype.delete=et,ct.prototype.isDeleted=nt,ct.prototype.deleteLater=ut}function ct(){}var ft={};function lt(r,t,e){if(void 0===r[t].overloadTable){var n=r[t];r[t]=function(){return r[t].overloadTable.hasOwnProperty(arguments.length)||zr("Function '"+e+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+r[t].overloadTable+")!"),r[t].overloadTable[arguments.length].apply(this,arguments)},r[t].overloadTable=[],r[t].overloadTable[n.argCount]=n}}function pt(r,t,e){o.hasOwnProperty(r)?((void 0===e||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[e])&&zr("Cannot register public name '"+r+"' twice"),lt(o,r,r),o.hasOwnProperty(e)&&zr("Cannot register multiple overloads of a function with the same number of arguments ("+e+")!"),o[r].overloadTable[e]=t):(o[r]=t,void 0!==e&&(o[r].numArguments=e))}function dt(r,t,e,n,o,i,a,u){this.name=r,this.constructor=t,this.instancePrototype=e,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=u,this.pureVirtualFunctions=[]}function ht(r,t,e){for(;t!==e;)t.upcast||zr("Expected null or instance of "+e.name+", got an instance of "+t.name),r=t.upcast(r),t=t.baseClass;return r}function vt(r,t){if(null===t)return this.isReference&&zr("null is not a valid "+this.name),0;t.$$||zr('Cannot pass "'+ae(t)+'" as a '+this.name),t.$$.ptr||zr("Cannot pass deleted object as a pointer of type "+this.name);var e=t.$$.ptrType.registeredClass;return ht(t.$$.ptr,e,this.registeredClass)}function yt(r,t){var e;if(null===t)return this.isReference&&zr("null is not a valid "+this.name),this.isSmartPointer?(e=this.rawConstructor(),null!==r&&r.push(this.rawDestructor,e),e):0;t.$$||zr('Cannot pass "'+ae(t)+'" as a '+this.name),t.$$.ptr||zr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&zr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(e=ht(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&zr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?e=t.$$.smartPtr:zr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:e=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)e=t.$$.smartPtr;else{var o=t.clone();e=this.rawShare(e,re((function(){o.delete()}))),null!==r&&r.push(this.rawDestructor,e)}break;default:zr("Unsupporting sharing policy")}return e}function mt(r,t){if(null===t)return this.isReference&&zr("null is not a valid "+this.name),0;t.$$||zr('Cannot pass "'+ae(t)+'" as a '+this.name),t.$$.ptr||zr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&zr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var e=t.$$.ptrType.registeredClass;return ht(t.$$.ptr,e,this.registeredClass)}function gt(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function wt(r){this.rawDestructor&&this.rawDestructor(r)}function Tt(r){null!==r&&r.delete()}function bt(r,t,e){if(t===e)return r;if(void 0===e.baseClass)return null;var n=bt(r,t,e.baseClass);return null===n?null:e.downcast(n)}function Ct(){return Object.keys(_t).length}function $t(){var r=[];for(var t in _t)_t.hasOwnProperty(t)&&r.push(_t[t]);return r}function Pt(r){ot=r,it.length&&ot&&ot(at)}function At(){o.getInheritedInstanceCount=Ct,o.getLiveInheritedInstances=$t,o.flushPendingDeletes=at,o.setDelayFunction=Pt}var _t={};function St(r,t){for(void 0===t&&zr("ptr should not be undefined");r.baseClass;)t=r.upcast(t),r=r.baseClass;return t}function Wt(r,t){return t=St(r,t),_t[t]}function Et(r,t){return t.ptrType&&t.ptr||Ir("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&Ir("Both smartPtrType and smartPtr must be specified"),t.count={value:1},rt(Object.create(r,{$$:{value:t}}))}function Ft(r){var t=this.getPointee(r);if(!t)return this.destructor(r),null;var e=Wt(this.registeredClass,t);if(void 0!==e){if(0===e.$$.count.value)return e.$$.ptr=t,e.$$.smartPtr=r,e.clone();var n=e.clone();return this.destructor(r),n}function o(){return this.isSmartPointer?Et(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:r}):Et(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var i,a=this.registeredClass.getActualType(t),u=ft[a];if(!u)return o.call(this);i=this.isConst?u.constPointerType:u.pointerType;var s=bt(t,this.registeredClass,i.registeredClass);return null===s?o.call(this):this.isSmartPointer?Et(i.registeredClass.instancePrototype,{ptrType:i,ptr:s,smartPtrType:this,smartPtr:r}):Et(i.registeredClass.instancePrototype,{ptrType:i,ptr:s})}function kt(){Ot.prototype.getPointee=gt,Ot.prototype.destructor=wt,Ot.prototype.argPackAdvance=8,Ot.prototype.readValueFromPointer=_r,Ot.prototype.deleteObject=Tt,Ot.prototype.fromWireType=Ft}function Ot(r,t,e,n,o,i,a,u,s,c,f){this.name=r,this.registeredClass=t,this.isReference=e,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=u,this.rawConstructor=s,this.rawShare=c,this.rawDestructor=f,o||void 0!==t.baseClass?this.toWireType=yt:n?(this.toWireType=vt,this.destructorFunction=null):(this.toWireType=mt,this.destructorFunction=null)}function jt(r,t,e){o.hasOwnProperty(r)||Ir("Replacing nonexistant public symbol"),void 0!==o[r].overloadTable&&void 0!==e?o[r].overloadTable[e]=t:(o[r]=t,o[r].argCount=e)}function Rt(r,t,e){var n=o["dynCall_"+r];return e&&e.length?n.apply(null,[t].concat(e)):n.call(null,t)}function xt(r,t,e){return-1!=r.indexOf("j")?Rt(r,t,e):K.get(t).apply(null,e)}function It(r,t){var e=[];return function(){e.length=arguments.length;for(var n=0;n<arguments.length;n++)e[n]=arguments[n];return xt(r,t,e)}}function Dt(r,t){var e=-1!=(r=qr(r)).indexOf("j")?It(r,t):K.get(t);return"function"!=typeof e&&zr("unknown function pointer with signature "+r+": "+t),e}var Ut=void 0;function Bt(r){var t=Ke(r),e=qr(t);return Je(t),e}function Mt(r,t){var e=[],n={};throw t.forEach((function r(t){n[t]||Wr[t]||(Er[t]?Er[t].forEach(r):(e.push(t),n[t]=!0))})),new Ut(r+": "+e.map(Bt).join([", "]))}function Vt(r,t,e,n,o,i,a,u,s,c,f,l,p){f=qr(f),i=Dt(o,i),u&&(u=Dt(a,u)),c&&(c=Dt(s,c)),p=Dt(l,p);var d=Or(f);pt(d,(function(){Mt("Cannot construct "+f+" due to unbound types",[n])})),Dr([r,t,e],n?[n]:[],(function(t){var e,o;t=t[0],o=n?(e=t.registeredClass).instancePrototype:ct.prototype;var a=jr(d,(function(){if(Object.getPrototypeOf(this)!==s)throw new Hr("Use 'new' to construct "+f);if(void 0===l.constructor_body)throw new Hr(f+" has no accessible constructor");var r=l.constructor_body[arguments.length];if(void 0===r)throw new Hr("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(l.constructor_body).toString()+") parameters instead!");return r.apply(this,arguments)})),s=Object.create(o,{constructor:{value:a}});a.prototype=s;var l=new dt(f,a,s,p,e,i,u,c),h=new Ot(f,l,!0,!1,!1),v=new Ot(f+"*",l,!1,!1,!1),y=new Ot(f+" const*",l,!1,!0,!1);return ft[r]={pointerType:v,constPointerType:y},jt(d,a),[h,v,y]}))}function qt(r,t){for(var e=[],n=0;n<r;n++)e.push(D[(t>>2)+n]);return e}function Ht(r,t,e,n,o,i){A(t>0);var a=qt(t,e);o=Dt(n,o);var u=[i],s=[];Dr([],[r],(function(r){var e="constructor "+(r=r[0]).name;if(void 0===r.registeredClass.constructor_body&&(r.registeredClass.constructor_body=[]),void 0!==r.registeredClass.constructor_body[t-1])throw new Hr("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+r.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return r.registeredClass.constructor_body[t-1]=function(){Mt("Cannot construct "+r.name+" due to unbound types",a)},Dr([],a,(function(n){return r.registeredClass.constructor_body[t-1]=function(){arguments.length!==t-1&&zr(e+" called with "+arguments.length+" arguments, expected "+(t-1)),s.length=0,u.length=t;for(var r=1;r<t;++r)u[r]=n[r].toWireType(s,arguments[r-1]);var i=o.apply(null,u);return Ar(s),n[0].fromWireType(i)},[]})),[]}))}function zt(r,t){if(!(r instanceof Function))throw new TypeError("new_ called with constructor type "+typeof r+" which is not a function");var e=jr(r.name||"unknownFunctionName",(function(){}));e.prototype=r.prototype;var n=new e,o=r.apply(n,t);return o instanceof Object?o:n}function Nt(r,t,e,n,o){var i=t.length;i<2&&zr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==e,u=!1,s=1;s<t.length;++s)if(null!==t[s]&&void 0===t[s].destructorFunction){u=!0;break}var c="void"!==t[0].name,f="",l="";for(s=0;s<i-2;++s)f+=(0!==s?", ":"")+"arg"+s,l+=(0!==s?", ":"")+"arg"+s+"Wired";var p="return function "+Or(r)+"("+f+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+r+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";u&&(p+="var destructors = [];\n");var d=u?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[zr,n,o,Ar,t[0],t[1]];a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n");for(s=0;s<i-2;++s)p+="var arg"+s+"Wired = argType"+s+".toWireType("+d+", arg"+s+"); // "+t[s+2].name+"\n",h.push("argType"+s),v.push(t[s+2]);if(a&&(l="thisWired"+(l.length>0?", ":"")+l),p+=(c?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",u)p+="runDestructors(destructors);\n";else for(s=a?1:2;s<t.length;++s){var y=1===s?"thisWired":"arg"+(s-2)+"Wired";null!==t[s].destructorFunction&&(p+=y+"_dtor("+y+"); // "+t[s].name+"\n",h.push(y+"_dtor"),v.push(t[s].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.push(p),zt(Function,h).apply(null,v)}function Gt(r,t,e,n,o,i,a,u){var s=qt(e,n);t=qr(t),i=Dt(o,i),Dr([],[r],(function(r){var n=(r=r[0]).name+"."+t;function o(){Mt("Cannot call "+n+" due to unbound types",s)}u&&r.registeredClass.pureVirtualFunctions.push(t);var c=r.registeredClass.instancePrototype,f=c[t];return void 0===f||void 0===f.overloadTable&&f.className!==r.name&&f.argCount===e-2?(o.argCount=e-2,o.className=r.name,c[t]=o):(lt(c,t,n),c[t].overloadTable[e-2]=o),Dr([],s,(function(o){var u=Nt(n,o,r,i,a);return void 0===c[t].overloadTable?(u.argCount=e-2,c[t]=u):c[t].overloadTable[e-2]=u,[]})),[]}))}function Lt(r,t,e){r=qr(r),Dr([],[t],(function(t){return t=t[0],o[r]=t.fromWireType(e),[]}))}var Xt=[],Jt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Kt(r){r>4&&0==--Jt[r].refcount&&(Jt[r]=void 0,Xt.push(r))}function Qt(){for(var r=0,t=5;t<Jt.length;++t)void 0!==Jt[t]&&++r;return r}function Yt(){for(var r=5;r<Jt.length;++r)if(void 0!==Jt[r])return Jt[r];return null}function Zt(){o.count_emval_handles=Qt,o.get_first_emval=Yt}function re(r){switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Xt.length?Xt.pop():Jt.length;return Jt[t]={refcount:1,value:r},t}}function te(r,t){Nr(r,{name:t=qr(t),fromWireType:function(r){var t=Jt[r].value;return Kt(r),t},toWireType:function(r,t){return re(t)},argPackAdvance:8,readValueFromPointer:_r,destructorFunction:null})}function ee(r,t,e){switch(t){case 0:return function(r){var t=e?j:R;return this.fromWireType(t[r])};case 1:return function(r){var t=e?x:I;return this.fromWireType(t[r>>1])};case 2:return function(r){var t=e?D:U;return this.fromWireType(t[r>>2])};default:throw new TypeError("Unknown integer type: "+r)}}function ne(r,t,e,n){var o=Br(e);function i(){}t=qr(t),i.values={},Nr(r,{name:t,constructor:i,fromWireType:function(r){return this.constructor.values[r]},toWireType:function(r,t){return t.value},argPackAdvance:8,readValueFromPointer:ee(t,o,n),destructorFunction:null}),pt(t,i)}function oe(r,t){var e=Wr[r];return void 0===e&&zr(t+" has unknown type "+Bt(r)),e}function ie(r,t,e){var n=oe(r,"enum");t=qr(t);var o=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:e},constructor:{value:jr(n.name+"_"+t,(function(){}))}});o.values[e]=i,o[t]=i}function ae(r){if(null===r)return"null";var t=typeof r;return"object"===t||"array"===t||"function"===t?r.toString():""+r}function ue(r,t){switch(t){case 2:return function(r){return this.fromWireType(B[r>>2])};case 3:return function(r){return this.fromWireType(M[r>>3])};default:throw new TypeError("Unknown float type: "+r)}}function se(r,t,e){var n=Br(e);Nr(r,{name:t=qr(t),fromWireType:function(r){return r},toWireType:function(r,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+ae(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:ue(t,n),destructorFunction:null})}function ce(r,t,e,n,o,i){var a=qt(t,e);r=qr(r),o=Dt(n,o),pt(r,(function(){Mt("Cannot call "+r+" due to unbound types",a)}),t-1),Dr([],a,(function(e){var n=[e[0],null].concat(e.slice(1));return jt(r,Nt(r,n,null,o,i),t-1),[]}))}function fe(r,t,e){switch(t){case 0:return e?function(r){return j[r]}:function(r){return R[r]};case 1:return e?function(r){return x[r>>1]}:function(r){return I[r>>1]};case 2:return e?function(r){return D[r>>2]}:function(r){return U[r>>2]};default:throw new TypeError("Unknown integer type: "+r)}}function le(r,t,e,n,o){t=qr(t),-1===o&&(o=4294967295);var i=Br(e),a=function(r){return r};if(0===n){var u=32-8*e;a=function(r){return r<<u>>>u}}var s=-1!=t.indexOf("unsigned");Nr(r,{name:t,fromWireType:a,toWireType:function(r,e){if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+ae(e)+'" to '+this.name);if(e<n||e>o)throw new TypeError('Passing a number "'+ae(e)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!");return s?e>>>0:0|e},argPackAdvance:8,readValueFromPointer:fe(t,i,0!==n),destructorFunction:null})}function pe(r,t,e){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(r){var t=U,e=t[r>>=2],o=t[r+1];return new n(O,o,e)}Nr(r,{name:e=qr(e),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function de(r,t){var e="std::string"===(t=qr(t));Nr(r,{name:t,fromWireType:function(r){var t,n=U[r>>2];if(e)for(var o=r+4,i=0;i<=n;++i){var a=r+4+i;if(i==n||0==R[a]){var u=W(o,a-o);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),o=a+1}}else{var s=new Array(n);for(i=0;i<n;++i)s[i]=String.fromCharCode(R[r+4+i]);t=s.join("")}return Je(r),t},toWireType:function(r,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||zr("Cannot pass non-string to std::string");var o=(e&&n?function(){return k(t)}:function(){return t.length})(),i=Xe(4+o+1);if(U[i>>2]=o,e&&n)F(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var u=t.charCodeAt(a);u>255&&(Je(i),zr("String has UTF-16 code units that do not fit in 8 bits")),R[i+4+a]=u}else for(a=0;a<o;++a)R[i+4+a]=t[a];return null!==r&&r.push(Je,i),i},argPackAdvance:8,readValueFromPointer:_r,destructorFunction:function(r){Je(r)}})}function he(r,t,e){var n,o,i,a,u;e=qr(e),2===t?(n=q,o=H,a=z,i=function(){return I},u=1):4===t&&(n=N,o=G,a=L,i=function(){return U},u=2),Nr(r,{name:e,fromWireType:function(r){for(var e,o=U[r>>2],a=i(),s=r+4,c=0;c<=o;++c){var f=r+4+c*t;if(c==o||0==a[f>>u]){var l=n(s,f-s);void 0===e?e=l:(e+=String.fromCharCode(0),e+=l),s=f+t}}return Je(r),e},toWireType:function(r,n){"string"!=typeof n&&zr("Cannot pass non-string to C++ string type "+e);var i=a(n),s=Xe(4+i+t);return U[s>>2]=i>>u,o(n,s+4,i+t),null!==r&&r.push(Je,s),s},argPackAdvance:8,readValueFromPointer:_r,destructorFunction:function(r){Je(r)}})}function ve(r,t,e,n,o,i){Pr[r]={name:qr(t),rawConstructor:Dt(e,n),rawDestructor:Dt(o,i),fields:[]}}function ye(r,t,e,n,o,i,a,u,s,c){Pr[r].fields.push({fieldName:qr(t),getterReturnType:e,getter:Dt(n,o),getterContext:i,setterArgumentType:a,setter:Dt(u,s),setterContext:c})}function me(r,t){Nr(r,{isVoid:!0,name:t=qr(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(r,t){}})}function ge(r){return r||zr("Cannot use deleted val. handle = "+r),Jt[r].value}function we(r,t,e){r=ge(r),t=oe(t,"emval::as");var n=[],o=re(n);return D[e>>2]=o,t.toWireType(n,r)}var Te={};function be(r){var t=Te[r];return void 0===t?qr(r):t}var Ce=[];function $e(r,t,e,n){(r=Ce[r])(t=ge(t),e=be(e),null,n)}function Pe(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Ae(r){return 0===r?re(Pe()):(r=be(r),re(Pe()[r]))}function _e(r){var t=Ce.length;return Ce.push(r),t}function Se(r,t){for(var e=new Array(r),n=0;n<r;++n)e[n]=oe(D[(t>>2)+n],"parameter "+n);return e}function We(r,t){for(var e=Se(r,t),n=e[0],o=n.name+"_$"+e.slice(1).map((function(r){return r.name})).join("_")+"$",i=["retType"],a=[n],u="",s=0;s<r-1;++s)u+=(0!==s?", ":"")+"arg"+s,i.push("argType"+s),a.push(e[1+s]);var c="return function "+Or("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(s=0;s<r-1;++s)c+=" var arg"+s+" = argType"+s+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=e[s+1].argPackAdvance;c+=" var rv = handle[name]("+u+");\n";for(s=0;s<r-1;++s)e[s+1].deleteObject&&(c+=" argType"+s+".deleteObject(arg"+s+");\n");return n.isVoid||(c+=" return retType.toWireType(destructors, rv);\n"),c+="};\n",i.push(c),_e(zt(Function,i).apply(null,a))}function Ee(r){return r=be(r),re(o[r])}function Fe(r,t){return re((r=ge(r))[t=ge(t)])}function ke(r){r>4&&(Jt[r].refcount+=1)}function Oe(r){for(var t="",e=0;e<r;++e)t+=(0!==e?", ":"")+"arg"+e;var n="return function emval_allocator_"+r+"(constructor, argTypes, args) {\n";for(e=0;e<r;++e)n+="var argType"+e+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+e+'], "parameter '+e+'");\nvar arg'+e+" = argType"+e+".readValueFromPointer(args);\nargs += argType"+e+"['argPackAdvance'];\n";return n+="var obj = new constructor("+t+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",n)(oe,o,re)}var je={};function Re(r,t,e,n){r=ge(r);var o=je[t];return o||(o=Oe(t),je[t]=o),o(r,e,n)}function xe(r){return re(be(r))}function Ie(r){Ar(Jt[r].value),Kt(r)}function De(){dr()}function Ue(r,t,e){R.copyWithin(r,t,t+e)}function Be(r){try{return $.grow(r-O.byteLength+65535>>>16),J($.buffer),1}catch(r){}}function Me(r){var t=R.length,e=2147483648;if((r>>>=0)>e)return!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);if(o=Math.min(o,r+100663296),Be(Math.min(e,X(Math.max(r,o),65536))))return!0}return!1}var Ve={mappings:{},buffers:[null,[],[]],printChar:function(r,t){var e=Ve.buffers[r];0===t||10===t?((1===r?w:T)(S(e,0)),e.length=0):e.push(t)},varargs:void 0,get:function(){return Ve.varargs+=4,D[Ve.varargs-4>>2]},getStr:function(r){return W(r)},get64:function(r,t){return r}};function qe(r){return 0}function He(r,t,e,n,o){}function ze(r,t,e,n){for(var o=0,i=0;i<e;i++){for(var a=D[t+8*i>>2],u=D[t+(8*i+4)>>2],s=0;s<u;s++)Ve.printChar(r,R[a+s]);o+=u}return D[n>>2]=o,0}function Ne(r){C(0|r)}xr=o.InternalError=Rr(Error,"InternalError"),Mr(),Hr=o.BindingError=Rr(Error,"BindingError"),st(),kt(),At(),Ut=o.UnboundTypeError=Rr(Error,"UnboundTypeError"),Zt();var Ge,Le={t:Ur,I:Gr,x:Vt,w:Ht,d:Gt,k:Lt,H:te,n:ne,a:ie,A:se,i:ce,j:le,h:pe,B:de,v:he,u:ve,c:ye,J:me,m:we,s:$e,b:Kt,y:Ae,p:We,r:Ee,e:Fe,g:ke,q:Re,f:xe,l:Ie,o:De,E:Ue,F:Me,G:qe,C:He,z:ze,D:Ne},Xe=(Cr(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.L).apply(null,arguments)},o._malloc=function(){return(Xe=o._malloc=o.asm.M).apply(null,arguments)}),Je=o._free=function(){return(Je=o._free=o.asm.N).apply(null,arguments)},Ke=o.___getTypeName=function(){return(Ke=o.___getTypeName=o.asm.P).apply(null,arguments)};o.___embind_register_native_and_builtin_types=function(){return(o.___embind_register_native_and_builtin_types=o.asm.Q).apply(null,arguments)},o.dynCall_jiji=function(){return(o.dynCall_jiji=o.asm.R).apply(null,arguments)};function Qe(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function Ye(r){function t(){Ge||(Ge=!0,o.calledRun=!0,P||(er(),nr(),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),or()))}r=r||u,sr>0||(tr(),sr>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(fr=function r(){Ge||Ye(),Ge||(fr=r)},o.run=Ye,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return Ye(),t.ready}}();"object"==typeof exports&&"object"==typeof module?module.exports=BASIS:"function"==typeof define&&define.amd?define([],(function(){return BASIS})):"object"==typeof exports&&(exports.BASIS=BASIS); \ No newline at end of file +var BASIS=function(){var n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(n=n||__filename),function(r){var t,e=void 0!==(r=r||{})?r:{};e.ready=new Promise((function(n,r){t=n,r}));var i,o={};for(i in e)e.hasOwnProperty(i)&&(o[i]=e[i]);var a=[],u=!1,s=!1,c=!1,l=!1;u="object"==typeof window,s="function"==typeof importScripts,c="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,l=!u&&!c&&!s;var f,p,d,y,h="";function v(n){return e.locateFile?e.locateFile(n,h):h+n}c?(h=s?require("path").dirname(h)+"/":__dirname+"/",f=function(n,r){return d||(d=require("fs")),y||(y=require("path")),n=y.normalize(n),d.readFileSync(n,r?null:"utf8")},p=function(n){var r=f(n,!0);return r.buffer||(r=new Uint8Array(r)),$(r.buffer),r},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),a=process.argv.slice(2),process.on("uncaughtException",(function(n){if(!(n instanceof te))throw n})),process.on("unhandledRejection",gn),function(n){process.exit(n)},e.inspect=function(){return"[Emscripten Module object]"}):l?("undefined"!=typeof read&&(f=function(n){return read(n)}),p=function(n){var r;return"function"==typeof readbuffer?new Uint8Array(readbuffer(n)):($("object"==typeof(r=read(n,"binary"))),r)},"undefined"!=typeof scriptArgs?a=scriptArgs:void 0!==arguments&&(a=arguments),"function"==typeof quit&&function(n){quit(n)},"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(u||s)&&(s?h=self.location.href:document.currentScript&&(h=document.currentScript.src),n&&(h=n),h=0!==h.indexOf("blob:")?h.substr(0,h.lastIndexOf("/")+1):"",f=function(n){var r=new XMLHttpRequest;return r.open("GET",n,!1),r.send(null),r.responseText},s&&(p=function(n){var r=new XMLHttpRequest;return r.open("GET",n,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),function(n,r,t){var e=new XMLHttpRequest;e.open("GET",n,!0),e.responseType="arraybuffer",e.onload=function(){200==e.status||0==e.status&&e.response?r(e.response):t()},e.onerror=t,e.send(null)});var m=e.print||console.log.bind(console),g=e.printErr||console.warn.bind(console);for(i in o)o.hasOwnProperty(i)&&(e[i]=o[i]);o=null,e.arguments&&(a=e.arguments),e.thisProgram&&e.thisProgram,e.quit&&e.quit;var C,w,b=function(n){n};e.wasmBinary&&(C=e.wasmBinary),e.noExitRuntime&&e.noExitRuntime,"object"!=typeof WebAssembly&&g("no native wasm support detected");var T=new WebAssembly.Table({initial:157,maximum:157,element:"anyfunc"}),_=!1;function $(n,r){n||gn("Assertion failed: "+r)}var P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function A(n,r,t){for(var e=r+t,i=r;n[i]&&!(i>=e);)++i;if(i-r>16&&n.subarray&&P)return P.decode(n.subarray(r,i));for(var o="";r<i;){var a=n[r++];if(128&a){var u=63&n[r++];if(192!=(224&a)){var s=63&n[r++];if((a=224==(240&a)?(15&a)<<12|u<<6|s:(7&a)<<18|u<<12|s<<6|63&n[r++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|u)}else o+=String.fromCharCode(a)}return o}function W(n,r){return n?A(B,n,r):""}function S(n,r,t,e){if(!(e>0))return 0;for(var i=t,o=t+e-1,a=0;a<n.length;++a){var u=n.charCodeAt(a);if(u>=55296&&u<=57343)u=65536+((1023&u)<<10)|1023&n.charCodeAt(++a);if(u<=127){if(t>=o)break;r[t++]=u}else if(u<=2047){if(t+1>=o)break;r[t++]=192|u>>6,r[t++]=128|63&u}else if(u<=65535){if(t+2>=o)break;r[t++]=224|u>>12,r[t++]=128|u>>6&63,r[t++]=128|63&u}else{if(t+3>=o)break;r[t++]=240|u>>18,r[t++]=128|u>>12&63,r[t++]=128|u>>6&63,r[t++]=128|63&u}}return r[t]=0,t-i}function E(n,r,t){return S(n,B,r,t)}function F(n){for(var r=0,t=0;t<n.length;++t){var e=n.charCodeAt(t);e>=55296&&e<=57343&&(e=65536+((1023&e)<<10)|1023&n.charCodeAt(++t)),e<=127?++r:r+=e<=2047?2:e<=65535?3:4}return r}var k="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function j(n,r){for(var t=n,e=t>>1,i=e+r/2;!(e>=i)&&q[e];)++e;if((t=e<<1)-n>32&&k)return k.decode(B.subarray(n,t));for(var o=0,a="";;){var u=V[n+2*o>>1];if(0==u||o==r/2)return a;++o,a+=String.fromCharCode(u)}}function O(n,r,t){if(void 0===t&&(t=2147483647),t<2)return 0;for(var e=r,i=(t-=2)<2*n.length?t/2:n.length,o=0;o<i;++o){var a=n.charCodeAt(o);V[r>>1]=a,r+=2}return V[r>>1]=0,r-e}function R(n){return 2*n.length}function x(n,r){for(var t=0,e="";!(t>=r/4);){var i=H[n+4*t>>2];if(0==i)break;if(++t,i>=65536){var o=i-65536;e+=String.fromCharCode(55296|o>>10,56320|1023&o)}else e+=String.fromCharCode(i)}return e}function I(n,r,t){if(void 0===t&&(t=2147483647),t<4)return 0;for(var e=r,i=e+t-4,o=0;o<n.length;++o){var a=n.charCodeAt(o);if(a>=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&n.charCodeAt(++o);if(H[r>>2]=a,(r+=4)+4>i)break}return H[r>>2]=0,r-e}function D(n){for(var r=0,t=0;t<n.length;++t){var e=n.charCodeAt(t);e>=55296&&e<=57343&&++t,r+=4}return r}var U,M,B,V,q,H,z,N,G,L=65536;function X(n,r){return n%r>0&&(n+=r-n%r),n}function J(n){U=n,e.HEAP8=M=new Int8Array(n),e.HEAP16=V=new Int16Array(n),e.HEAP32=H=new Int32Array(n),e.HEAPU8=B=new Uint8Array(n),e.HEAPU16=q=new Uint16Array(n),e.HEAPU32=z=new Uint32Array(n),e.HEAPF32=N=new Float32Array(n),e.HEAPF64=G=new Float64Array(n)}var Y=5552064,Z=309024,K=e.INITIAL_MEMORY||16777216;function Q(n){for(;n.length>0;){var r=n.shift();if("function"!=typeof r){var t=r.func;"number"==typeof t?void 0===r.arg?e.dynCall_v(t):e.dynCall_vi(t,r.arg):t(void 0===r.arg?null:r.arg)}else r(e)}}(w=e.wasmMemory?e.wasmMemory:new WebAssembly.Memory({initial:K/L,maximum:2147483648/L}))&&(U=w.buffer),K=U.byteLength,J(U),H[Z>>2]=Y;var nn=[],rn=[],tn=[],en=[];function on(){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)cn(e.preRun.shift());Q(nn)}function an(){!0,Q(rn)}function un(){Q(tn)}function sn(){if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)ln(e.postRun.shift());Q(en)}function cn(n){nn.unshift(n)}function ln(n){en.unshift(n)}var fn=Math.ceil,pn=Math.floor,dn=0,yn=null,hn=null;function vn(n){dn++,e.monitorRunDependencies&&e.monitorRunDependencies(dn)}function mn(n){if(dn--,e.monitorRunDependencies&&e.monitorRunDependencies(dn),0==dn&&(null!==yn&&(clearInterval(yn),yn=null),hn)){var r=hn;hn=null,r()}}function gn(n){throw e.onAbort&&e.onAbort(n),m(n+=""),g(n),_=!0,1,n="abort("+n+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(n)}function Cn(n,r){return String.prototype.startsWith?n.startsWith(r):0===n.indexOf(r)}e.preloadedImages={},e.preloadedAudios={};var wn="data:application/octet-stream;base64,";function bn(n){return Cn(n,wn)}var Tn="file://";function _n(n){return Cn(n,Tn)}var $n="basis_transcoder.wasm";function Pn(){try{if(C)return new Uint8Array(C);if(p)return p($n);throw"both async and sync fetching of the wasm failed"}catch(n){gn(n)}}function An(){return C||!u&&!s||"function"!=typeof fetch||_n($n)?new Promise((function(n,r){n(Pn())})):fetch($n,{credentials:"same-origin"}).then((function(n){if(!n.ok)throw"failed to load wasm binary file at '"+$n+"'";return n.arrayBuffer()})).catch((function(){return Pn()}))}function Wn(){var n={a:Jt};function r(n,r){var t=n.exports;e.asm=t,mn()}function t(n){r(n.instance)}function i(r){return An().then((function(r){return WebAssembly.instantiate(r,n)})).then(r,(function(n){g("failed to asynchronously prepare wasm: "+n),gn(n)}))}if(vn(),e.instantiateWasm)try{return e.instantiateWasm(n,r)}catch(n){return g("Module.instantiateWasm callback failed with error: "+n),!1}return function(){if(C||"function"!=typeof WebAssembly.instantiateStreaming||bn($n)||_n($n)||"function"!=typeof fetch)return i(t);fetch($n,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,n).then(t,(function(n){g("wasm streaming compile failed: "+n),g("falling back to ArrayBuffer instantiation"),i(t)}))}))}(),{}}bn($n)||($n=v($n)),rn.push({func:function(){Kt()}});var Sn={};function En(n){for(;n.length;){var r=n.pop();n.pop()(r)}}function Fn(n){return this.fromWireType(z[n>>2])}var kn={},jn={},On={},Rn=48,xn=57;function In(n){if(void 0===n)return"_unknown";var r=(n=n.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=Rn&&r<=xn?"_"+n:n}function Dn(n,r){return n=In(n),new Function("body","return function "+n+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(r)}function Un(n,r){var t=Dn(r,(function(n){this.name=r,this.message=n;var t=new Error(n).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},t}var Mn=void 0;function Bn(n){throw new Mn(n)}function Vn(n,r,t){function e(r){var e=t(r);e.length!==n.length&&Bn("Mismatched type converter count");for(var i=0;i<n.length;++i)Jn(n[i],e[i])}n.forEach((function(n){On[n]=r}));var i=new Array(r.length),o=[],a=0;r.forEach((function(n,r){jn.hasOwnProperty(n)?i[r]=jn[n]:(o.push(n),kn.hasOwnProperty(n)||(kn[n]=[]),kn[n].push((function(){i[r]=jn[n],++a===o.length&&e(i)})))})),0===o.length&&e(i)}function qn(n){var r=Sn[n];delete Sn[n];var t=r.rawConstructor,e=r.rawDestructor,i=r.fields;Vn([n],i.map((function(n){return n.getterReturnType})).concat(i.map((function(n){return n.setterArgumentType}))),(function(n){var o={};return i.forEach((function(r,t){var e=r.fieldName,a=n[t],u=r.getter,s=r.getterContext,c=n[t+i.length],l=r.setter,f=r.setterContext;o[e]={read:function(n){return a.fromWireType(u(s,n))},write:function(n,r){var t=[];l(f,n,c.toWireType(t,r)),En(t)}}})),[{name:r.name,fromWireType:function(n){var r={};for(var t in o)r[t]=o[t].read(n);return e(n),r},toWireType:function(n,r){for(var i in o)if(!(i in r))throw new TypeError("Missing field");var a=t();for(i in o)o[i].write(a,r[i]);return null!==n&&n.push(e,a),a},argPackAdvance:8,readValueFromPointer:Fn,destructorFunction:e}]}))}function Hn(n){switch(n){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+n)}}function zn(){for(var n=new Array(256),r=0;r<256;++r)n[r]=String.fromCharCode(r);Nn=n}var Nn=void 0;function Gn(n){for(var r="",t=n;B[t];)r+=Nn[B[t++]];return r}var Ln=void 0;function Xn(n){throw new Ln(n)}function Jn(n,r,t){if(t=t||{},!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");var e=r.name;if(n||Xn('type "'+e+'" must have a positive integer typeid pointer'),jn.hasOwnProperty(n)){if(t.ignoreDuplicateRegistrations)return;Xn("Cannot register type '"+e+"' twice")}if(jn[n]=r,delete On[n],kn.hasOwnProperty(n)){var i=kn[n];delete kn[n],i.forEach((function(n){n()}))}}function Yn(n,r,t,e,i){var o=Hn(t);Jn(n,{name:r=Gn(r),fromWireType:function(n){return!!n},toWireType:function(n,r){return r?e:i},argPackAdvance:8,readValueFromPointer:function(n){var e;if(1===t)e=M;else if(2===t)e=V;else{if(4!==t)throw new TypeError("Unknown boolean type size: "+r);e=H}return this.fromWireType(e[n>>o])},destructorFunction:null})}function Zn(n){if(!(this instanceof dr))return!1;if(!(n instanceof dr))return!1;for(var r=this.$$.ptrType.registeredClass,t=this.$$.ptr,e=n.$$.ptrType.registeredClass,i=n.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;e.baseClass;)i=e.upcast(i),e=e.baseClass;return r===e&&t===i}function Kn(n){return{count:n.count,deleteScheduled:n.deleteScheduled,preservePointerOnDelete:n.preservePointerOnDelete,ptr:n.ptr,ptrType:n.ptrType,smartPtr:n.smartPtr,smartPtrType:n.smartPtrType}}function Qn(n){Xn(n.$$.ptrType.registeredClass.name+" instance already deleted")}var nr=!1;function rr(n){}function tr(n){n.smartPtr?n.smartPtrType.rawDestructor(n.smartPtr):n.ptrType.registeredClass.rawDestructor(n.ptr)}function er(n){n.count.value-=1,0===n.count.value&&tr(n)}function ir(n){return"undefined"==typeof FinalizationGroup?(ir=function(n){return n},n):(nr=new FinalizationGroup((function(n){for(var r=n.next();!r.done;r=n.next()){var t=r.value;t.ptr?er(t):console.warn("object already deleted: "+t.ptr)}})),ir=function(n){return nr.register(n,n.$$,n.$$),n},rr=function(n){nr.unregister(n.$$)},ir(n))}function or(){if(this.$$.ptr||Qn(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var n=ir(Object.create(Object.getPrototypeOf(this),{$$:{value:Kn(this.$$)}}));return n.$$.count.value+=1,n.$$.deleteScheduled=!1,n}function ar(){this.$$.ptr||Qn(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Xn("Object already scheduled for deletion"),rr(this),er(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function ur(){return!this.$$.ptr}var sr=void 0,cr=[];function lr(){for(;cr.length;){var n=cr.pop();n.$$.deleteScheduled=!1,n.delete()}}function fr(){return this.$$.ptr||Qn(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Xn("Object already scheduled for deletion"),cr.push(this),1===cr.length&&sr&&sr(lr),this.$$.deleteScheduled=!0,this}function pr(){dr.prototype.isAliasOf=Zn,dr.prototype.clone=or,dr.prototype.delete=ar,dr.prototype.isDeleted=ur,dr.prototype.deleteLater=fr}function dr(){}var yr={};function hr(n,r,t){if(void 0===n[r].overloadTable){var e=n[r];n[r]=function(){return n[r].overloadTable.hasOwnProperty(arguments.length)||Xn("Function '"+t+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+n[r].overloadTable+")!"),n[r].overloadTable[arguments.length].apply(this,arguments)},n[r].overloadTable=[],n[r].overloadTable[e.argCount]=e}}function vr(n,r,t){e.hasOwnProperty(n)?((void 0===t||void 0!==e[n].overloadTable&&void 0!==e[n].overloadTable[t])&&Xn("Cannot register public name '"+n+"' twice"),hr(e,n,n),e.hasOwnProperty(t)&&Xn("Cannot register multiple overloads of a function with the same number of arguments ("+t+")!"),e[n].overloadTable[t]=r):(e[n]=r,void 0!==t&&(e[n].numArguments=t))}function mr(n,r,t,e,i,o,a,u){this.name=n,this.constructor=r,this.instancePrototype=t,this.rawDestructor=e,this.baseClass=i,this.getActualType=o,this.upcast=a,this.downcast=u,this.pureVirtualFunctions=[]}function gr(n,r,t){for(;r!==t;)r.upcast||Xn("Expected null or instance of "+t.name+", got an instance of "+r.name),n=r.upcast(n),r=r.baseClass;return n}function Cr(n,r){if(null===r)return this.isReference&&Xn("null is not a valid "+this.name),0;r.$$||Xn('Cannot pass "'+ut(r)+'" as a '+this.name),r.$$.ptr||Xn("Cannot pass deleted object as a pointer of type "+this.name);var t=r.$$.ptrType.registeredClass;return gr(r.$$.ptr,t,this.registeredClass)}function wr(n,r){var t;if(null===r)return this.isReference&&Xn("null is not a valid "+this.name),this.isSmartPointer?(t=this.rawConstructor(),null!==n&&n.push(this.rawDestructor,t),t):0;r.$$||Xn('Cannot pass "'+ut(r)+'" as a '+this.name),r.$$.ptr||Xn("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&r.$$.ptrType.isConst&&Xn("Cannot convert argument of type "+(r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name)+" to parameter type "+this.name);var e=r.$$.ptrType.registeredClass;if(t=gr(r.$$.ptr,e,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&Xn("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:Xn("Cannot convert argument of type "+(r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var i=r.clone();t=this.rawShare(t,rt((function(){i.delete()}))),null!==n&&n.push(this.rawDestructor,t)}break;default:Xn("Unsupporting sharing policy")}return t}function br(n,r){if(null===r)return this.isReference&&Xn("null is not a valid "+this.name),0;r.$$||Xn('Cannot pass "'+ut(r)+'" as a '+this.name),r.$$.ptr||Xn("Cannot pass deleted object as a pointer of type "+this.name),r.$$.ptrType.isConst&&Xn("Cannot convert argument of type "+r.$$.ptrType.name+" to parameter type "+this.name);var t=r.$$.ptrType.registeredClass;return gr(r.$$.ptr,t,this.registeredClass)}function Tr(n){return this.rawGetPointee&&(n=this.rawGetPointee(n)),n}function _r(n){this.rawDestructor&&this.rawDestructor(n)}function $r(n){null!==n&&n.delete()}function Pr(n,r,t){if(r===t)return n;if(void 0===t.baseClass)return null;var e=Pr(n,r,t.baseClass);return null===e?null:t.downcast(e)}function Ar(){return Object.keys(Fr).length}function Wr(){var n=[];for(var r in Fr)Fr.hasOwnProperty(r)&&n.push(Fr[r]);return n}function Sr(n){sr=n,cr.length&&sr&&sr(lr)}function Er(){e.getInheritedInstanceCount=Ar,e.getLiveInheritedInstances=Wr,e.flushPendingDeletes=lr,e.setDelayFunction=Sr}var Fr={};function kr(n,r){for(void 0===r&&Xn("ptr should not be undefined");n.baseClass;)r=n.upcast(r),n=n.baseClass;return r}function jr(n,r){return r=kr(n,r),Fr[r]}function Or(n,r){return r.ptrType&&r.ptr||Bn("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!==!!r.smartPtr&&Bn("Both smartPtrType and smartPtr must be specified"),r.count={value:1},ir(Object.create(n,{$$:{value:r}}))}function Rr(n){var r=this.getPointee(n);if(!r)return this.destructor(n),null;var t=jr(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=n,t.clone();var e=t.clone();return this.destructor(n),e}function i(){return this.isSmartPointer?Or(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:n}):Or(this.registeredClass.instancePrototype,{ptrType:this,ptr:n})}var o,a=this.registeredClass.getActualType(r),u=yr[a];if(!u)return i.call(this);o=this.isConst?u.constPointerType:u.pointerType;var s=Pr(r,this.registeredClass,o.registeredClass);return null===s?i.call(this):this.isSmartPointer?Or(o.registeredClass.instancePrototype,{ptrType:o,ptr:s,smartPtrType:this,smartPtr:n}):Or(o.registeredClass.instancePrototype,{ptrType:o,ptr:s})}function xr(){Ir.prototype.getPointee=Tr,Ir.prototype.destructor=_r,Ir.prototype.argPackAdvance=8,Ir.prototype.readValueFromPointer=Fn,Ir.prototype.deleteObject=$r,Ir.prototype.fromWireType=Rr}function Ir(n,r,t,e,i,o,a,u,s,c,l){this.name=n,this.registeredClass=r,this.isReference=t,this.isConst=e,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=u,this.rawConstructor=s,this.rawShare=c,this.rawDestructor=l,i||void 0!==r.baseClass?this.toWireType=wr:e?(this.toWireType=Cr,this.destructorFunction=null):(this.toWireType=br,this.destructorFunction=null)}function Dr(n,r,t){e.hasOwnProperty(n)||Bn("Replacing nonexistant public symbol"),void 0!==e[n].overloadTable&&void 0!==t?e[n].overloadTable[t]=r:(e[n]=r,e[n].argCount=t)}function Ur(n,r){n=Gn(n);var t=function(t){for(var e=[],i=1;i<n.length;++i)e.push("a"+i);var o="return function "+("dynCall_"+n+"_"+r)+"("+e.join(", ")+") {\n";return o+=" return dynCall(rawFunction"+(e.length?", ":"")+e.join(", ")+");\n",o+="};\n",new Function("dynCall","rawFunction",o)(t,r)}(e["dynCall_"+n]);return"function"!=typeof t&&Xn("unknown function pointer with signature "+n+": "+r),t}var Mr=void 0;function Br(n){var r=re(n),t=Gn(r);return ne(r),t}function Vr(n,r){var t=[],e={};throw r.forEach((function n(r){e[r]||jn[r]||(On[r]?On[r].forEach(n):(t.push(r),e[r]=!0))})),new Mr(n+": "+t.map(Br).join([", "]))}function qr(n,r,t,e,i,o,a,u,s,c,l,f,p){l=Gn(l),o=Ur(i,o),u&&(u=Ur(a,u)),c&&(c=Ur(s,c)),p=Ur(f,p);var d=In(l);vr(d,(function(){Vr("Cannot construct "+l+" due to unbound types",[e])})),Vn([n,r,t],e?[e]:[],(function(r){var t,i;r=r[0],i=e?(t=r.registeredClass).instancePrototype:dr.prototype;var a=Dn(d,(function(){if(Object.getPrototypeOf(this)!==s)throw new Ln("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new Ln(l+" has no accessible constructor");var n=f.constructor_body[arguments.length];if(void 0===n)throw new Ln("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return n.apply(this,arguments)})),s=Object.create(i,{constructor:{value:a}});a.prototype=s;var f=new mr(l,a,s,p,t,o,u,c),y=new Ir(l,f,!0,!1,!1),h=new Ir(l+"*",f,!1,!1,!1),v=new Ir(l+" const*",f,!1,!0,!1);return yr[n]={pointerType:h,constPointerType:v},Dr(d,a),[y,h,v]}))}function Hr(n,r){for(var t=[],e=0;e<n;e++)t.push(H[(r>>2)+e]);return t}function zr(n,r,t,e,i,o){$(r>0);var a=Hr(r,t);i=Ur(e,i);var u=[o],s=[];Vn([],[n],(function(n){var t="constructor "+(n=n[0]).name;if(void 0===n.registeredClass.constructor_body&&(n.registeredClass.constructor_body=[]),void 0!==n.registeredClass.constructor_body[r-1])throw new Ln("Cannot register multiple constructors with identical number of parameters ("+(r-1)+") for class '"+n.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return n.registeredClass.constructor_body[r-1]=function(){Vr("Cannot construct "+n.name+" due to unbound types",a)},Vn([],a,(function(e){return n.registeredClass.constructor_body[r-1]=function(){arguments.length!==r-1&&Xn(t+" called with "+arguments.length+" arguments, expected "+(r-1)),s.length=0,u.length=r;for(var n=1;n<r;++n)u[n]=e[n].toWireType(s,arguments[n-1]);var o=i.apply(null,u);return En(s),e[0].fromWireType(o)},[]})),[]}))}function Nr(n,r){if(!(n instanceof Function))throw new TypeError("new_ called with constructor type "+typeof n+" which is not a function");var t=Dn(n.name||"unknownFunctionName",(function(){}));t.prototype=n.prototype;var e=new t,i=n.apply(e,r);return i instanceof Object?i:e}function Gr(n,r,t,e,i){var o=r.length;o<2&&Xn("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==r[1]&&null!==t,u=!1,s=1;s<r.length;++s)if(null!==r[s]&&void 0===r[s].destructorFunction){u=!0;break}var c="void"!==r[0].name,l="",f="";for(s=0;s<o-2;++s)l+=(0!==s?", ":"")+"arg"+s,f+=(0!==s?", ":"")+"arg"+s+"Wired";var p="return function "+In(n)+"("+l+") {\nif (arguments.length !== "+(o-2)+") {\nthrowBindingError('function "+n+" called with ' + arguments.length + ' arguments, expected "+(o-2)+" args!');\n}\n";u&&(p+="var destructors = [];\n");var d=u?"destructors":"null",y=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],h=[Xn,e,i,En,r[0],r[1]];a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n");for(s=0;s<o-2;++s)p+="var arg"+s+"Wired = argType"+s+".toWireType("+d+", arg"+s+"); // "+r[s+2].name+"\n",y.push("argType"+s),h.push(r[s+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",u)p+="runDestructors(destructors);\n";else for(s=a?1:2;s<r.length;++s){var v=1===s?"thisWired":"arg"+(s-2)+"Wired";null!==r[s].destructorFunction&&(p+=v+"_dtor("+v+"); // "+r[s].name+"\n",y.push(v+"_dtor"),h.push(r[s].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",y.push(p),Nr(Function,y).apply(null,h)}function Lr(n,r,t,e,i,o,a,u){var s=Hr(t,e);r=Gn(r),o=Ur(i,o),Vn([],[n],(function(n){var e=(n=n[0]).name+"."+r;function i(){Vr("Cannot call "+e+" due to unbound types",s)}u&&n.registeredClass.pureVirtualFunctions.push(r);var c=n.registeredClass.instancePrototype,l=c[r];return void 0===l||void 0===l.overloadTable&&l.className!==n.name&&l.argCount===t-2?(i.argCount=t-2,i.className=n.name,c[r]=i):(hr(c,r,e),c[r].overloadTable[t-2]=i),Vn([],s,(function(i){var u=Gr(e,i,n,o,a);return void 0===c[r].overloadTable?(u.argCount=t-2,c[r]=u):c[r].overloadTable[t-2]=u,[]})),[]}))}function Xr(n,r,t){n=Gn(n),Vn([],[r],(function(r){return r=r[0],e[n]=r.fromWireType(t),[]}))}var Jr=[],Yr=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Zr(n){n>4&&0==--Yr[n].refcount&&(Yr[n]=void 0,Jr.push(n))}function Kr(){for(var n=0,r=5;r<Yr.length;++r)void 0!==Yr[r]&&++n;return n}function Qr(){for(var n=5;n<Yr.length;++n)if(void 0!==Yr[n])return Yr[n];return null}function nt(){e.count_emval_handles=Kr,e.get_first_emval=Qr}function rt(n){switch(n){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var r=Jr.length?Jr.pop():Yr.length;return Yr[r]={refcount:1,value:n},r}}function tt(n,r){Jn(n,{name:r=Gn(r),fromWireType:function(n){var r=Yr[n].value;return Zr(n),r},toWireType:function(n,r){return rt(r)},argPackAdvance:8,readValueFromPointer:Fn,destructorFunction:null})}function et(n,r,t){switch(r){case 0:return function(n){var r=t?M:B;return this.fromWireType(r[n])};case 1:return function(n){var r=t?V:q;return this.fromWireType(r[n>>1])};case 2:return function(n){var r=t?H:z;return this.fromWireType(r[n>>2])};default:throw new TypeError("Unknown integer type: "+n)}}function it(n,r,t,e){var i=Hn(t);function o(){}r=Gn(r),o.values={},Jn(n,{name:r,constructor:o,fromWireType:function(n){return this.constructor.values[n]},toWireType:function(n,r){return r.value},argPackAdvance:8,readValueFromPointer:et(r,i,e),destructorFunction:null}),vr(r,o)}function ot(n,r){var t=jn[n];return void 0===t&&Xn(r+" has unknown type "+Br(n)),t}function at(n,r,t){var e=ot(n,"enum");r=Gn(r);var i=e.constructor,o=Object.create(e.constructor.prototype,{value:{value:t},constructor:{value:Dn(e.name+"_"+r,(function(){}))}});i.values[t]=o,i[r]=o}function ut(n){if(null===n)return"null";var r=typeof n;return"object"===r||"array"===r||"function"===r?n.toString():""+n}function st(n,r){switch(r){case 2:return function(n){return this.fromWireType(N[n>>2])};case 3:return function(n){return this.fromWireType(G[n>>3])};default:throw new TypeError("Unknown float type: "+n)}}function ct(n,r,t){var e=Hn(t);Jn(n,{name:r=Gn(r),fromWireType:function(n){return n},toWireType:function(n,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+ut(r)+'" to '+this.name);return r},argPackAdvance:8,readValueFromPointer:st(r,e),destructorFunction:null})}function lt(n,r,t,e,i,o){var a=Hr(r,t);n=Gn(n),i=Ur(e,i),vr(n,(function(){Vr("Cannot call "+n+" due to unbound types",a)}),r-1),Vn([],a,(function(t){var e=[t[0],null].concat(t.slice(1));return Dr(n,Gr(n,e,null,i,o),r-1),[]}))}function ft(n,r,t){switch(r){case 0:return t?function(n){return M[n]}:function(n){return B[n]};case 1:return t?function(n){return V[n>>1]}:function(n){return q[n>>1]};case 2:return t?function(n){return H[n>>2]}:function(n){return z[n>>2]};default:throw new TypeError("Unknown integer type: "+n)}}function pt(n,r,t,e,i){r=Gn(r),-1===i&&(i=4294967295);var o=Hn(t),a=function(n){return n};if(0===e){var u=32-8*t;a=function(n){return n<<u>>>u}}var s=-1!=r.indexOf("unsigned");Jn(n,{name:r,fromWireType:a,toWireType:function(n,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+ut(t)+'" to '+this.name);if(t<e||t>i)throw new TypeError('Passing a number "'+ut(t)+'" from JS side to C/C++ side to an argument of type "'+r+'", which is outside the valid range ['+e+", "+i+"]!");return s?t>>>0:0|t},argPackAdvance:8,readValueFromPointer:ft(r,o,0!==e),destructorFunction:null})}function dt(n,r,t){var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function i(n){var r=z,t=r[n>>=2],i=r[n+1];return new e(U,i,t)}Jn(n,{name:t=Gn(t),fromWireType:i,argPackAdvance:8,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})}function yt(n,r){var t="std::string"===(r=Gn(r));Jn(n,{name:r,fromWireType:function(n){var r,e=z[n>>2];if(t)for(var i=n+4,o=0;o<=e;++o){var a=n+4+o;if(0==B[a]||o==e){var u=W(i,a-i);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),i=a+1}}else{var s=new Array(e);for(o=0;o<e;++o)s[o]=String.fromCharCode(B[n+4+o]);r=s.join("")}return ne(n),r},toWireType:function(n,r){r instanceof ArrayBuffer&&(r=new Uint8Array(r));var e="string"==typeof r;e||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Xn("Cannot pass non-string to std::string");var i=(t&&e?function(){return F(r)}:function(){return r.length})(),o=Qt(4+i+1);if(z[o>>2]=i,t&&e)E(r,o+4,i+1);else if(e)for(var a=0;a<i;++a){var u=r.charCodeAt(a);u>255&&(ne(o),Xn("String has UTF-16 code units that do not fit in 8 bits")),B[o+4+a]=u}else for(a=0;a<i;++a)B[o+4+a]=r[a];return null!==n&&n.push(ne,o),o},argPackAdvance:8,readValueFromPointer:Fn,destructorFunction:function(n){ne(n)}})}function ht(n,r,t){var e,i,o,a,u;t=Gn(t),2===r?(e=j,i=O,a=R,o=function(){return q},u=1):4===r&&(e=x,i=I,a=D,o=function(){return z},u=2),Jn(n,{name:t,fromWireType:function(n){for(var t,i=z[n>>2],a=o(),s=n+4,c=0;c<=i;++c){var l=n+4+c*r;if(0==a[l>>u]||c==i){var f=e(s,l-s);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),s=l+r}}return ne(n),t},toWireType:function(n,e){"string"!=typeof e&&Xn("Cannot pass non-string to C++ string type "+t);var o=a(e),s=Qt(4+o+r);return z[s>>2]=o>>u,i(e,s+4,o+r),null!==n&&n.push(ne,s),s},argPackAdvance:8,readValueFromPointer:Fn,destructorFunction:function(n){ne(n)}})}function vt(n,r,t,e,i,o){Sn[n]={name:Gn(r),rawConstructor:Ur(t,e),rawDestructor:Ur(i,o),fields:[]}}function mt(n,r,t,e,i,o,a,u,s,c){Sn[n].fields.push({fieldName:Gn(r),getterReturnType:t,getter:Ur(e,i),getterContext:o,setterArgumentType:a,setter:Ur(u,s),setterContext:c})}function gt(n,r){Jn(n,{isVoid:!0,name:r=Gn(r),argPackAdvance:0,fromWireType:function(){},toWireType:function(n,r){}})}function Ct(n){return n||Xn("Cannot use deleted val. handle = "+n),Yr[n].value}function wt(n,r,t){n=Ct(n),r=ot(r,"emval::as");var e=[],i=rt(e);return H[t>>2]=i,r.toWireType(e,n)}var bt={};function Tt(n){var r=bt[n];return void 0===r?Gn(n):r}var _t=[];function $t(n,r,t,e){(n=_t[n])(r=Ct(r),t=Tt(t),null,e)}function Pt(){return"object"==typeof globalThis?globalThis:Function("return this")()}function At(n){return 0===n?rt(Pt()):(n=Tt(n),rt(Pt()[n]))}function Wt(n){var r=_t.length;return _t.push(n),r}function St(n,r){for(var t=new Array(n),e=0;e<n;++e)t[e]=ot(H[(r>>2)+e],"parameter "+e);return t}function Et(n,r){for(var t=St(n,r),e=t[0],i=e.name+"_$"+t.slice(1).map((function(n){return n.name})).join("_")+"$",o=["retType"],a=[e],u="",s=0;s<n-1;++s)u+=(0!==s?", ":"")+"arg"+s,o.push("argType"+s),a.push(t[1+s]);var c="return function "+In("methodCaller_"+i)+"(handle, name, destructors, args) {\n",l=0;for(s=0;s<n-1;++s)c+=" var arg"+s+" = argType"+s+".readValueFromPointer(args"+(l?"+"+l:"")+");\n",l+=t[s+1].argPackAdvance;c+=" var rv = handle[name]("+u+");\n";for(s=0;s<n-1;++s)t[s+1].deleteObject&&(c+=" argType"+s+".deleteObject(arg"+s+");\n");return e.isVoid||(c+=" return retType.toWireType(destructors, rv);\n"),c+="};\n",o.push(c),Wt(Nr(Function,o).apply(null,a))}function Ft(n){return n=Tt(n),rt(e[n])}function kt(n,r){return rt((n=Ct(n))[r=Ct(r)])}function jt(n){n>4&&(Yr[n].refcount+=1)}function Ot(n){for(var r="",t=0;t<n;++t)r+=(0!==t?", ":"")+"arg"+t;var i="return function emval_allocator_"+n+"(constructor, argTypes, args) {\n";for(t=0;t<n;++t)i+="var argType"+t+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+t+'], "parameter '+t+'");\nvar arg'+t+" = argType"+t+".readValueFromPointer(args);\nargs += argType"+t+"['argPackAdvance'];\n";return i+="var obj = new constructor("+r+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",i)(ot,e,rt)}var Rt={};function xt(n,r,t,e){n=Ct(n);var i=Rt[r];return i||(i=Ot(r),Rt[r]=i),i(n,t,e)}function It(n){return rt(Tt(n))}function Dt(n){En(Yr[n].value),Zr(n)}function Ut(){gn()}function Mt(n,r,t){B.copyWithin(n,r,r+t)}function Bt(){return B.length}function Vt(n){try{return w.grow(n-U.byteLength+65535>>>16),J(w.buffer),1}catch(n){}}function qt(n){n>>>=0;var r=Bt(),t=2147483648;if(n>t)return!1;for(var e=1;e<=4;e*=2){var i=r*(1+.2/e);if(i=Math.min(i,n+100663296),Vt(Math.min(t,X(Math.max(16777216,n,i),65536))))return!0}return!1}var Ht={mappings:{},buffers:[null,[],[]],printChar:function(n,r){var t=Ht.buffers[n];0===r||10===r?((1===n?m:g)(A(t,0)),t.length=0):t.push(r)},varargs:void 0,get:function(){return Ht.varargs+=4,H[Ht.varargs-4>>2]},getStr:function(n){return W(n)},get64:function(n,r){return n}};function zt(n){return 0}function Nt(n,r,t,e,i){}function Gt(n,r,t,e){for(var i=0,o=0;o<t;o++){for(var a=H[r+8*o>>2],u=H[r+(8*o+4)>>2],s=0;s<u;s++)Ht.printChar(n,B[a+s]);i+=u}return H[e>>2]=i,0}function Lt(n){return(n=+n)>=0?+pn(n+.5):+fn(n-.5)}function Xt(n){b(0|n)}Mn=e.InternalError=Un(Error,"InternalError"),zn(),Ln=e.BindingError=Un(Error,"BindingError"),pr(),xr(),Er(),Mr=e.UnboundTypeError=Un(Error,"UnboundTypeError"),nt();var Jt={u:qn,J:Yn,y:qr,x:zr,d:Lr,k:Xr,I:tt,n:it,a:at,B:ct,i:lt,j:pt,h:dt,C:yt,w:ht,v:vt,c:mt,K:gt,m:wt,s:$t,b:Zr,z:At,t:Et,r:Ft,e:kt,g:jt,q:xt,f:It,l:Dt,p:Ut,F:Mt,G:qt,H:zt,D:Nt,A:Gt,memory:w,o:Lt,E:Xt,table:T},Yt=Wn();e.asm=Yt;var Zt,Kt=e.___wasm_call_ctors=function(){return(Kt=e.___wasm_call_ctors=e.asm.L).apply(null,arguments)},Qt=e._malloc=function(){return(Qt=e._malloc=e.asm.M).apply(null,arguments)},ne=e._free=function(){return(ne=e._free=e.asm.N).apply(null,arguments)},re=e.___getTypeName=function(){return(re=e.___getTypeName=e.asm.O).apply(null,arguments)};e.___embind_register_native_and_builtin_types=function(){return(e.___embind_register_native_and_builtin_types=e.asm.P).apply(null,arguments)},e.dynCall_viii=function(){return(e.dynCall_viii=e.asm.Q).apply(null,arguments)},e.dynCall_vi=function(){return(e.dynCall_vi=e.asm.R).apply(null,arguments)},e.dynCall_v=function(){return(e.dynCall_v=e.asm.S).apply(null,arguments)},e.dynCall_i=function(){return(e.dynCall_i=e.asm.T).apply(null,arguments)},e.dynCall_iii=function(){return(e.dynCall_iii=e.asm.U).apply(null,arguments)},e.dynCall_ii=function(){return(e.dynCall_ii=e.asm.V).apply(null,arguments)},e.dynCall_vii=function(){return(e.dynCall_vii=e.asm.W).apply(null,arguments)},e.dynCall_iiii=function(){return(e.dynCall_iiii=e.asm.X).apply(null,arguments)},e.dynCall_iiiii=function(){return(e.dynCall_iiiii=e.asm.Y).apply(null,arguments)},e.dynCall_iiiiii=function(){return(e.dynCall_iiiiii=e.asm.Z).apply(null,arguments)},e.dynCall_iiiiiiii=function(){return(e.dynCall_iiiiiiii=e.asm._).apply(null,arguments)},e.dynCall_iiiiiiiii=function(){return(e.dynCall_iiiiiiiii=e.asm.$).apply(null,arguments)},e.dynCall_viiii=function(){return(e.dynCall_viiii=e.asm.aa).apply(null,arguments)},e.dynCall_iiiiiii=function(){return(e.dynCall_iiiiiii=e.asm.ba).apply(null,arguments)},e.dynCall_iiiiiiiiiiiiiiiiiiii=function(){return(e.dynCall_iiiiiiiiiiiiiiiiiiii=e.asm.ca).apply(null,arguments)},e.dynCall_iiiiiiiiiiiiiiiiiiiii=function(){return(e.dynCall_iiiiiiiiiiiiiiiiiiiii=e.asm.da).apply(null,arguments)},e.dynCall_iiiiiiiiiiiiiiiiiii=function(){return(e.dynCall_iiiiiiiiiiiiiiiiiii=e.asm.ea).apply(null,arguments)},e.dynCall_viiiii=function(){return(e.dynCall_viiiii=e.asm.fa).apply(null,arguments)},e.dynCall_iiiiiiiiii=function(){return(e.dynCall_iiiiiiiiii=e.asm.ga).apply(null,arguments)},e.dynCall_iiiiiiiiiii=function(){return(e.dynCall_iiiiiiiiiii=e.asm.ha).apply(null,arguments)},e.dynCall_jiji=function(){return(e.dynCall_jiji=e.asm.ia).apply(null,arguments)},e.dynCall_viiiiii=function(){return(e.dynCall_viiiiii=e.asm.ja).apply(null,arguments)};function te(n){this.name="ExitStatus",this.message="Program terminated with exit("+n+")",this.status=n}function ee(n){function r(){Zt||(Zt=!0,e.calledRun=!0,_||(an(),un(),t(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),sn()))}n=n||a,dn>0||(on(),dn>0||(e.setStatus?(e.setStatus("Running..."),setTimeout((function(){setTimeout((function(){e.setStatus("")}),1),r()}),1)):r()))}if(e.asm=Yt,hn=function n(){Zt||ee(),Zt||(hn=n)},e.run=ee,e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();return!0,ee(),r.ready}}();"object"==typeof exports&&"object"==typeof module?module.exports=BASIS:"function"==typeof define&&define.amd?define([],(function(){return BASIS})):"object"==typeof exports&&(exports.BASIS=BASIS); \ No newline at end of file diff --git a/SuperMap iEarth/public/SuperMap3D/ThirdParty/basis_transcoder.wasm b/SuperMap iEarth/public/SuperMap3D/ThirdParty/basis_transcoder.wasm index 71328587..bc74770e 100644 Binary files a/SuperMap iEarth/public/SuperMap3D/ThirdParty/basis_transcoder.wasm and b/SuperMap iEarth/public/SuperMap3D/ThirdParty/basis_transcoder.wasm differ diff --git a/SuperMap iEarth/public/SuperMap3D/ThirdParty/crunch.js b/SuperMap iEarth/public/SuperMap3D/ThirdParty/crunch.js index 8439d54c..3ae63bba 100644 --- a/SuperMap iEarth/public/SuperMap3D/ThirdParty/crunch.js +++ b/SuperMap iEarth/public/SuperMap3D/ThirdParty/crunch.js @@ -345,7 +345,7 @@ if (typeof WebAssembly !== 'undefined') { var wasmBinaryFile = "crunch.wasm"; if (!isDataURI(wasmBinaryFile)) { //wasmBinaryFile = locateFile(wasmBinaryFile); - wasmBinaryFile = self.CESIUM_BASE_URL + 'ThirdParty/crunch.wasm'; + wasmBinaryFile = self.BASE_URL + 'ThirdParty/crunch.wasm'; } function getBinary() { try { diff --git a/SuperMap iEarth/public/SuperMap3D/ThirdParty/unzip.wasm b/SuperMap iEarth/public/SuperMap3D/ThirdParty/unzip.wasm index 1d665f6b..9292ed60 100644 Binary files a/SuperMap iEarth/public/SuperMap3D/ThirdParty/unzip.wasm and b/SuperMap iEarth/public/SuperMap3D/ThirdParty/unzip.wasm differ diff --git a/SuperMap iEarth/public/SuperMap3D/Widgets/CesiumInspector/CesiumInspector.css b/SuperMap iEarth/public/SuperMap3D/Widgets/CesiumInspector/CesiumInspector.css index 42256190..a0dd9dbc 100644 --- a/SuperMap iEarth/public/SuperMap3D/Widgets/CesiumInspector/CesiumInspector.css +++ b/SuperMap iEarth/public/SuperMap3D/Widgets/CesiumInspector/CesiumInspector.css @@ -56,7 +56,6 @@ } .supermap3d-cesiumInspector-frustumStatistics { - padding-left: 10px; padding: 5px; background-color: rgba(80, 80, 80, 0.75); } diff --git a/SuperMap iEarth/public/SuperMap3D/Widgets/shared.css b/SuperMap iEarth/public/SuperMap3D/Widgets/shared.css index fccdba0a..e1135acc 100644 --- a/SuperMap iEarth/public/SuperMap3D/Widgets/shared.css +++ b/SuperMap iEarth/public/SuperMap3D/Widgets/shared.css @@ -90,7 +90,7 @@ .supermap3d-performanceDisplay-defaultContainer { position: absolute; - top: 50px; + bottom: 30px; right: 10px; text-align: right; } diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/BoundingRectangle-82c0e2a7.js b/SuperMap iEarth/public/SuperMap3D/Workers/BoundingRectangle-44af9dd4.js similarity index 63% rename from SuperMap iEarth/public/SuperMap3D/Workers/BoundingRectangle-82c0e2a7.js rename to SuperMap iEarth/public/SuperMap3D/Workers/BoundingRectangle-44af9dd4.js index dc08bd75..9a2f6957 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/BoundingRectangle-82c0e2a7.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/BoundingRectangle-44af9dd4.js @@ -1 +1 @@ -define(["exports","./Cartesian2-b72655a5","./Cartographic-a2c313d7","./Check-52a7d806","./when-92c6cf3c","./buildModuleUrl-9eef8841"],(function(t,e,h,i,n,r){"use strict";function o(t,e,h,i){this.x=n.u(t,0),this.y=n.u(e,0),this.width=n.u(h,0),this.height=n.u(i,0)}o.packedLength=4,o.pack=function(t,e,h){return i.o.typeOf.object("value",t),i.o.defined("array",e),h=n.u(h,0),e[h++]=t.x,e[h++]=t.y,e[h++]=t.width,e[h]=t.height,e},o.unpack=function(t,e,h){return i.o.defined("array",t),e=n.u(e,0),n.e(h)||(h=new o),h.x=t[e++],h.y=t[e++],h.width=t[e++],h.height=t[e],h},o.fromPoints=function(t,e){if(n.e(e)||(e=new o),!n.e(t)||0===t.length)return e.x=0,e.y=0,e.width=0,e.height=0,e;for(var h=t.length,i=t[0].x,r=t[0].y,u=t[0].x,a=t[0].y,c=1;c<h;c++){var y=t[c],f=y.x,x=y.y;i=Math.min(f,i),u=Math.max(f,u),r=Math.min(x,r),a=Math.max(x,a)}return e.x=i,e.y=r,e.width=u-i,e.height=a-r,e};var u=new r.n,a=new h.a,c=new h.a;o.fromRectangle=function(t,h,i){if(n.e(i)||(i=new o),!n.e(t))return i.x=0,i.y=0,i.width=0,i.height=0,i;var r=(h=n.u(h,u)).project(e.h.southwest(t,a)),y=h.project(e.h.northeast(t,c));return e.o.subtract(y,r,y),i.x=r.x,i.y=r.y,i.width=y.x,i.height=y.y,i},o.clone=function(t,e){if(n.e(t))return n.e(e)?(e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e):new o(t.x,t.y,t.width,t.height)},o.union=function(t,e,h){i.o.typeOf.object("left",t),i.o.typeOf.object("right",e),n.e(h)||(h=new o);var r=Math.min(t.x,e.x),u=Math.min(t.y,e.y),a=Math.max(t.x+t.width,e.x+e.width),c=Math.max(t.y+t.height,e.y+e.height);return h.x=r,h.y=u,h.width=a-r,h.height=c-u,h},o.expand=function(t,e,h){i.o.typeOf.object("rectangle",t),i.o.typeOf.object("point",e),h=o.clone(t,h);var n=e.x-h.x,r=e.y-h.y;return n>h.width?h.width=n:n<0&&(h.width-=n,h.x=e.x),r>h.height?h.height=r:r<0&&(h.height-=r,h.y=e.y),h},o.intersect=function(t,e){i.o.typeOf.object("left",t),i.o.typeOf.object("right",e);var h=t.x,n=t.y,o=e.x,u=e.y;return h>o+e.width||h+t.width<o||n+t.height<u||n>u+e.height?r.S.OUTSIDE:r.S.INTERSECTING},o.equals=function(t,e){return t===e||n.e(t)&&n.e(e)&&t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},o.prototype.clone=function(t){return o.clone(this,t)},o.prototype.intersect=function(t){return o.intersect(this,t)},o.prototype.equals=function(t){return o.equals(this,t)},t.f=o})); +define(["exports","./Cartesian2-b72655a5","./Cartographic-a2c313d7","./Check-52a7d806","./when-92c6cf3c","./buildModuleUrl-cbcc8c56"],(function(t,e,h,i,n,r){"use strict";function o(t,e,h,i){this.x=n.u(t,0),this.y=n.u(e,0),this.width=n.u(h,0),this.height=n.u(i,0)}o.packedLength=4,o.pack=function(t,e,h){return i.o.typeOf.object("value",t),i.o.defined("array",e),h=n.u(h,0),e[h++]=t.x,e[h++]=t.y,e[h++]=t.width,e[h]=t.height,e},o.unpack=function(t,e,h){return i.o.defined("array",t),e=n.u(e,0),n.e(h)||(h=new o),h.x=t[e++],h.y=t[e++],h.width=t[e++],h.height=t[e],h},o.fromPoints=function(t,e){if(n.e(e)||(e=new o),!n.e(t)||0===t.length)return e.x=0,e.y=0,e.width=0,e.height=0,e;for(var h=t.length,i=t[0].x,r=t[0].y,c=t[0].x,u=t[0].y,a=1;a<h;a++){var y=t[a],f=y.x,x=y.y;i=Math.min(f,i),c=Math.max(f,c),r=Math.min(x,r),u=Math.max(x,u)}return e.x=i,e.y=r,e.width=c-i,e.height=u-r,e};var c=new r.n,u=new h.a,a=new h.a;o.fromRectangle=function(t,h,i){if(n.e(i)||(i=new o),!n.e(t))return i.x=0,i.y=0,i.width=0,i.height=0,i;var r=(h=n.u(h,c)).project(e.h.southwest(t,u)),y=h.project(e.h.northeast(t,a));return e.o.subtract(y,r,y),i.x=r.x,i.y=r.y,i.width=y.x,i.height=y.y,i},o.clone=function(t,e){if(n.e(t))return n.e(e)?(e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e):new o(t.x,t.y,t.width,t.height)},o.union=function(t,e,h){i.o.typeOf.object("left",t),i.o.typeOf.object("right",e),n.e(h)||(h=new o);var r=Math.min(t.x,e.x),c=Math.min(t.y,e.y),u=Math.max(t.x+t.width,e.x+e.width),a=Math.max(t.y+t.height,e.y+e.height);return h.x=r,h.y=c,h.width=u-r,h.height=a-c,h},o.expand=function(t,e,h){i.o.typeOf.object("rectangle",t),i.o.typeOf.object("point",e),h=o.clone(t,h);var n=e.x-h.x,r=e.y-h.y;return n>h.width?h.width=n:n<0&&(h.width-=n,h.x=e.x),r>h.height?h.height=r:r<0&&(h.height-=r,h.y=e.y),h},o.intersect=function(t,e){i.o.typeOf.object("left",t),i.o.typeOf.object("right",e);var h=t.x,n=t.y,o=e.x,c=e.y;return h>o+e.width||h+t.width<o||n+t.height<c||n>c+e.height?r.S.OUTSIDE:r.S.INTERSECTING},o.equals=function(t,e){return t===e||n.e(t)&&n.e(e)&&t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},o.prototype.clone=function(t){return o.clone(this,t)},o.prototype.intersect=function(t){return o.intersect(this,t)},o.prototype.equals=function(t){return o.equals(this,t)},t.f=o})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/BoxGeometry-6f820c56.js b/SuperMap iEarth/public/SuperMap3D/Workers/BoxGeometry-74de4379.js similarity index 70% rename from SuperMap iEarth/public/SuperMap3D/Workers/BoxGeometry-6f820c56.js rename to SuperMap iEarth/public/SuperMap3D/Workers/BoxGeometry-74de4379.js index e9ccc00b..a1bc1f9e 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/BoxGeometry-6f820c56.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/BoxGeometry-74de4379.js @@ -1 +1 @@ -define(["exports","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./when-92c6cf3c","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./FeatureDetection-cec0163f","./VertexFormat-f496a3f1"],(function(e,t,n,o,a,r,i,m,u,y,p,s){"use strict";var f=new o.o;function c(e){var t=(e=i.u(e,i.u.EMPTY_OBJECT)).minimum,n=e.maximum;if(a.o.typeOf.object("min",t),a.o.typeOf.object("max",n),i.e(e.offsetAttribute)&&e.offsetAttribute===y.z.TOP)throw new a.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");var r=i.u(e.vertexFormat,s.n.DEFAULT);this._minimum=o.o.clone(t),this._maximum=o.o.clone(n),this._vertexFormat=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}c.fromDimensions=function(e){var t=(e=i.u(e,i.u.EMPTY_OBJECT)).dimensions;a.o.typeOf.object("dimensions",t),a.o.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),a.o.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),a.o.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var n=o.o.multiplyByScalar(t,.5,new o.o);return new c({minimum:o.o.negate(n,new o.o),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},c.fromAxisAlignedBoundingBox=function(e){return a.o.typeOf.object("boundingBox",e),new c({minimum:e.minimum,maximum:e.maximum})},c.packedLength=2*o.o.packedLength+s.n.packedLength+1,c.pack=function(e,t,n){return a.o.typeOf.object("value",e),a.o.defined("array",t),n=i.u(n,0),o.o.pack(e._minimum,t,n),o.o.pack(e._maximum,t,n+o.o.packedLength),s.n.pack(e._vertexFormat,t,n+2*o.o.packedLength),t[n+2*o.o.packedLength+s.n.packedLength]=i.u(e._offsetAttribute,-1),t};var x,b=new o.o,A=new o.o,d=new s.n,l={minimum:b,maximum:A,vertexFormat:d,offsetAttribute:void 0};c.unpack=function(e,t,n){a.o.defined("array",e),t=i.u(t,0);var r=o.o.unpack(e,t,b),m=o.o.unpack(e,t+o.o.packedLength,A),u=s.n.unpack(e,t+2*o.o.packedLength,d),y=e[t+2*o.o.packedLength+s.n.packedLength];return i.e(n)?(n._minimum=o.o.clone(r,n._minimum),n._maximum=o.o.clone(m,n._maximum),n._vertexFormat=s.n.clone(u,n._vertexFormat),n._offsetAttribute=-1===y?void 0:y,n):(l.offsetAttribute=-1===y?void 0:y,new c(l))},c.createGeometry=function(e){var a=e._minimum,s=e._maximum,c=e._vertexFormat;if(!o.o.equals(a,s)){var x,b,A=new u.a;if(c.position&&(c.st||c.normal||c.tangent||c.bitangent)){if(c.position&&((b=new Float64Array(72))[0]=a.x,b[1]=a.y,b[2]=s.z,b[3]=s.x,b[4]=a.y,b[5]=s.z,b[6]=s.x,b[7]=s.y,b[8]=s.z,b[9]=a.x,b[10]=s.y,b[11]=s.z,b[12]=a.x,b[13]=a.y,b[14]=a.z,b[15]=s.x,b[16]=a.y,b[17]=a.z,b[18]=s.x,b[19]=s.y,b[20]=a.z,b[21]=a.x,b[22]=s.y,b[23]=a.z,b[24]=s.x,b[25]=a.y,b[26]=a.z,b[27]=s.x,b[28]=s.y,b[29]=a.z,b[30]=s.x,b[31]=s.y,b[32]=s.z,b[33]=s.x,b[34]=a.y,b[35]=s.z,b[36]=a.x,b[37]=a.y,b[38]=a.z,b[39]=a.x,b[40]=s.y,b[41]=a.z,b[42]=a.x,b[43]=s.y,b[44]=s.z,b[45]=a.x,b[46]=a.y,b[47]=s.z,b[48]=a.x,b[49]=s.y,b[50]=a.z,b[51]=s.x,b[52]=s.y,b[53]=a.z,b[54]=s.x,b[55]=s.y,b[56]=s.z,b[57]=a.x,b[58]=s.y,b[59]=s.z,b[60]=a.x,b[61]=a.y,b[62]=a.z,b[63]=s.x,b[64]=a.y,b[65]=a.z,b[66]=s.x,b[67]=a.y,b[68]=s.z,b[69]=a.x,b[70]=a.y,b[71]=s.z,A.position=new m.o({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:b})),c.normal){var d=new Float32Array(72);d[0]=0,d[1]=0,d[2]=1,d[3]=0,d[4]=0,d[5]=1,d[6]=0,d[7]=0,d[8]=1,d[9]=0,d[10]=0,d[11]=1,d[12]=0,d[13]=0,d[14]=-1,d[15]=0,d[16]=0,d[17]=-1,d[18]=0,d[19]=0,d[20]=-1,d[21]=0,d[22]=0,d[23]=-1,d[24]=1,d[25]=0,d[26]=0,d[27]=1,d[28]=0,d[29]=0,d[30]=1,d[31]=0,d[32]=0,d[33]=1,d[34]=0,d[35]=0,d[36]=-1,d[37]=0,d[38]=0,d[39]=-1,d[40]=0,d[41]=0,d[42]=-1,d[43]=0,d[44]=0,d[45]=-1,d[46]=0,d[47]=0,d[48]=0,d[49]=1,d[50]=0,d[51]=0,d[52]=1,d[53]=0,d[54]=0,d[55]=1,d[56]=0,d[57]=0,d[58]=1,d[59]=0,d[60]=0,d[61]=-1,d[62]=0,d[63]=0,d[64]=-1,d[65]=0,d[66]=0,d[67]=-1,d[68]=0,d[69]=0,d[70]=-1,d[71]=0,A.normal=new m.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})}if(c.st){var l=new Float32Array(72),v=0;l[v++]=0,l[v++]=0,l[v++]=-1,l[v++]=1,l[v++]=0,l[v++]=-1,l[v++]=1,l[v++]=1,l[v++]=-1,l[v++]=0,l[v++]=1,l[v++]=-1,l[v++]=1,l[v++]=0,l[v++]=-1,l[v++]=0,l[v++]=0,l[v++]=-1,l[v++]=0,l[v++]=1,l[v++]=-1,l[v++]=1,l[v++]=1,l[v++]=-1,l[v++]=0,l[v++]=0,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=0,l[v++]=1,l[v++]=1,l[v++]=0,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=0,l[v++]=0,l[v++]=0,l[v++]=0,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=1,l[v++]=1,l[v++]=1,l[v++]=1,l[v++]=0,l[v++]=0,l[v++]=1,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=1,l[v++]=1,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=1,A.st=new m.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})}if(c.tangent){var z=new Float32Array(72);z[0]=1,z[1]=0,z[2]=0,z[3]=1,z[4]=0,z[5]=0,z[6]=1,z[7]=0,z[8]=0,z[9]=1,z[10]=0,z[11]=0,z[12]=-1,z[13]=0,z[14]=0,z[15]=-1,z[16]=0,z[17]=0,z[18]=-1,z[19]=0,z[20]=0,z[21]=-1,z[22]=0,z[23]=0,z[24]=0,z[25]=1,z[26]=0,z[27]=0,z[28]=1,z[29]=0,z[30]=0,z[31]=1,z[32]=0,z[33]=0,z[34]=1,z[35]=0,z[36]=0,z[37]=-1,z[38]=0,z[39]=0,z[40]=-1,z[41]=0,z[42]=0,z[43]=-1,z[44]=0,z[45]=0,z[46]=-1,z[47]=0,z[48]=-1,z[49]=0,z[50]=0,z[51]=-1,z[52]=0,z[53]=0,z[54]=-1,z[55]=0,z[56]=0,z[57]=-1,z[58]=0,z[59]=0,z[60]=1,z[61]=0,z[62]=0,z[63]=1,z[64]=0,z[65]=0,z[66]=1,z[67]=0,z[68]=0,z[69]=1,z[70]=0,z[71]=0,A.tangent=new m.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z})}if(c.bitangent){var w=new Float32Array(72);w[0]=0,w[1]=1,w[2]=0,w[3]=0,w[4]=1,w[5]=0,w[6]=0,w[7]=1,w[8]=0,w[9]=0,w[10]=1,w[11]=0,w[12]=0,w[13]=1,w[14]=0,w[15]=0,w[16]=1,w[17]=0,w[18]=0,w[19]=1,w[20]=0,w[21]=0,w[22]=1,w[23]=0,w[24]=0,w[25]=0,w[26]=1,w[27]=0,w[28]=0,w[29]=1,w[30]=0,w[31]=0,w[32]=1,w[33]=0,w[34]=0,w[35]=1,w[36]=0,w[37]=0,w[38]=1,w[39]=0,w[40]=0,w[41]=1,w[42]=0,w[43]=0,w[44]=1,w[45]=0,w[46]=0,w[47]=1,w[48]=0,w[49]=0,w[50]=1,w[51]=0,w[52]=0,w[53]=1,w[54]=0,w[55]=0,w[56]=1,w[57]=0,w[58]=0,w[59]=1,w[60]=0,w[61]=0,w[62]=1,w[63]=0,w[64]=0,w[65]=1,w[66]=0,w[67]=0,w[68]=1,w[69]=0,w[70]=0,w[71]=1,A.bitangent=new m.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:w})}(x=new Uint16Array(36))[0]=0,x[1]=1,x[2]=2,x[3]=0,x[4]=2,x[5]=3,x[6]=6,x[7]=5,x[8]=4,x[9]=7,x[10]=6,x[11]=4,x[12]=8,x[13]=9,x[14]=10,x[15]=8,x[16]=10,x[17]=11,x[18]=14,x[19]=13,x[20]=12,x[21]=15,x[22]=14,x[23]=12,x[24]=18,x[25]=17,x[26]=16,x[27]=19,x[28]=18,x[29]=16,x[30]=20,x[31]=21,x[32]=22,x[33]=20,x[34]=22,x[35]=23}else(b=new Float64Array(24))[0]=a.x,b[1]=a.y,b[2]=a.z,b[3]=s.x,b[4]=a.y,b[5]=a.z,b[6]=s.x,b[7]=s.y,b[8]=a.z,b[9]=a.x,b[10]=s.y,b[11]=a.z,b[12]=a.x,b[13]=a.y,b[14]=s.z,b[15]=s.x,b[16]=a.y,b[17]=s.z,b[18]=s.x,b[19]=s.y,b[20]=s.z,b[21]=a.x,b[22]=s.y,b[23]=s.z,A.position=new m.o({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:b}),(x=new Uint16Array(36))[0]=4,x[1]=5,x[2]=6,x[3]=4,x[4]=6,x[5]=7,x[6]=1,x[7]=0,x[8]=3,x[9]=1,x[10]=3,x[11]=2,x[12]=1,x[13]=6,x[14]=5,x[15]=1,x[16]=2,x[17]=6,x[18]=2,x[19]=3,x[20]=7,x[21]=2,x[22]=7,x[23]=6,x[24]=3,x[25]=0,x[26]=4,x[27]=3,x[28]=4,x[29]=7,x[30]=0,x[31]=1,x[32]=5,x[33]=0,x[34]=5,x[35]=4;var O=o.o.subtract(s,a,f),g=.5*o.o.magnitude(O);if(i.e(e._offsetAttribute)){var _=b.length,h=new Uint8Array(_/3),F=e._offsetAttribute===y.z.NONE?0:1;t.d(h,F),A.applyOffset=new m.o({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return new m.I({attributes:A,indices:x,primitiveType:p._0x4b6a27.TRIANGLES,boundingSphere:new n.i(o.o.ZERO,g),offsetAttribute:e._offsetAttribute})}},c.getUnitBox=function(){return i.e(x)||(x=c.createGeometry(c.fromDimensions({dimensions:new o.o(1,1,1),vertexFormat:s.n.POSITION_ONLY}))),x},e.O=c})); +define(["exports","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./when-92c6cf3c","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./FeatureDetection-fd297af4","./VertexFormat-f496a3f1"],(function(t,e,n,o,a,r,i,m,u,y,p,s){"use strict";var f=new o.o;function c(t){var e=(t=i.u(t,i.u.EMPTY_OBJECT)).minimum,n=t.maximum;if(a.o.typeOf.object("min",e),a.o.typeOf.object("max",n),i.e(t.offsetAttribute)&&t.offsetAttribute===y.z.TOP)throw new a.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");var r=i.u(t.vertexFormat,s.n.DEFAULT);this._minimum=o.o.clone(e),this._maximum=o.o.clone(n),this._vertexFormat=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createBoxGeometry"}c.fromDimensions=function(t){var e=(t=i.u(t,i.u.EMPTY_OBJECT)).dimensions;a.o.typeOf.object("dimensions",e),a.o.typeOf.number.greaterThanOrEquals("dimensions.x",e.x,0),a.o.typeOf.number.greaterThanOrEquals("dimensions.y",e.y,0),a.o.typeOf.number.greaterThanOrEquals("dimensions.z",e.z,0);var n=o.o.multiplyByScalar(e,.5,new o.o);return new c({minimum:o.o.negate(n,new o.o),maximum:n,vertexFormat:t.vertexFormat,offsetAttribute:t.offsetAttribute})},c.fromAxisAlignedBoundingBox=function(t){return a.o.typeOf.object("boundingBox",t),new c({minimum:t.minimum,maximum:t.maximum})},c.packedLength=2*o.o.packedLength+s.n.packedLength+1,c.pack=function(t,e,n){return a.o.typeOf.object("value",t),a.o.defined("array",e),n=i.u(n,0),o.o.pack(t._minimum,e,n),o.o.pack(t._maximum,e,n+o.o.packedLength),s.n.pack(t._vertexFormat,e,n+2*o.o.packedLength),e[n+2*o.o.packedLength+s.n.packedLength]=i.u(t._offsetAttribute,-1),e};var x,b=new o.o,A=new o.o,d=new s.n,l={minimum:b,maximum:A,vertexFormat:d,offsetAttribute:void 0};c.unpack=function(t,e,n){a.o.defined("array",t),e=i.u(e,0);var r=o.o.unpack(t,e,b),m=o.o.unpack(t,e+o.o.packedLength,A),u=s.n.unpack(t,e+2*o.o.packedLength,d),y=t[e+2*o.o.packedLength+s.n.packedLength];return i.e(n)?(n._minimum=o.o.clone(r,n._minimum),n._maximum=o.o.clone(m,n._maximum),n._vertexFormat=s.n.clone(u,n._vertexFormat),n._offsetAttribute=-1===y?void 0:y,n):(l.offsetAttribute=-1===y?void 0:y,new c(l))},c.createGeometry=function(t){var a=t._minimum,s=t._maximum,c=t._vertexFormat;if(!o.o.equals(a,s)){var x,b,A=new u.a;if(c.position&&(c.st||c.normal||c.tangent||c.bitangent)){if(c.position&&((b=new Float64Array(72))[0]=a.x,b[1]=a.y,b[2]=s.z,b[3]=s.x,b[4]=a.y,b[5]=s.z,b[6]=s.x,b[7]=s.y,b[8]=s.z,b[9]=a.x,b[10]=s.y,b[11]=s.z,b[12]=a.x,b[13]=a.y,b[14]=a.z,b[15]=s.x,b[16]=a.y,b[17]=a.z,b[18]=s.x,b[19]=s.y,b[20]=a.z,b[21]=a.x,b[22]=s.y,b[23]=a.z,b[24]=s.x,b[25]=a.y,b[26]=a.z,b[27]=s.x,b[28]=s.y,b[29]=a.z,b[30]=s.x,b[31]=s.y,b[32]=s.z,b[33]=s.x,b[34]=a.y,b[35]=s.z,b[36]=a.x,b[37]=a.y,b[38]=a.z,b[39]=a.x,b[40]=s.y,b[41]=a.z,b[42]=a.x,b[43]=s.y,b[44]=s.z,b[45]=a.x,b[46]=a.y,b[47]=s.z,b[48]=a.x,b[49]=s.y,b[50]=a.z,b[51]=s.x,b[52]=s.y,b[53]=a.z,b[54]=s.x,b[55]=s.y,b[56]=s.z,b[57]=a.x,b[58]=s.y,b[59]=s.z,b[60]=a.x,b[61]=a.y,b[62]=a.z,b[63]=s.x,b[64]=a.y,b[65]=a.z,b[66]=s.x,b[67]=a.y,b[68]=s.z,b[69]=a.x,b[70]=a.y,b[71]=s.z,A.position=new m.o({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:b})),c.normal){var d=new Float32Array(72);d[0]=0,d[1]=0,d[2]=1,d[3]=0,d[4]=0,d[5]=1,d[6]=0,d[7]=0,d[8]=1,d[9]=0,d[10]=0,d[11]=1,d[12]=0,d[13]=0,d[14]=-1,d[15]=0,d[16]=0,d[17]=-1,d[18]=0,d[19]=0,d[20]=-1,d[21]=0,d[22]=0,d[23]=-1,d[24]=1,d[25]=0,d[26]=0,d[27]=1,d[28]=0,d[29]=0,d[30]=1,d[31]=0,d[32]=0,d[33]=1,d[34]=0,d[35]=0,d[36]=-1,d[37]=0,d[38]=0,d[39]=-1,d[40]=0,d[41]=0,d[42]=-1,d[43]=0,d[44]=0,d[45]=-1,d[46]=0,d[47]=0,d[48]=0,d[49]=1,d[50]=0,d[51]=0,d[52]=1,d[53]=0,d[54]=0,d[55]=1,d[56]=0,d[57]=0,d[58]=1,d[59]=0,d[60]=0,d[61]=-1,d[62]=0,d[63]=0,d[64]=-1,d[65]=0,d[66]=0,d[67]=-1,d[68]=0,d[69]=0,d[70]=-1,d[71]=0,A.normal=new m.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})}if(c.st){var l=new Float32Array(72),v=0;l[v++]=0,l[v++]=0,l[v++]=-1,l[v++]=1,l[v++]=0,l[v++]=-1,l[v++]=1,l[v++]=1,l[v++]=-1,l[v++]=0,l[v++]=1,l[v++]=-1,l[v++]=1,l[v++]=0,l[v++]=-1,l[v++]=0,l[v++]=0,l[v++]=-1,l[v++]=0,l[v++]=1,l[v++]=-1,l[v++]=1,l[v++]=1,l[v++]=-1,l[v++]=0,l[v++]=0,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=0,l[v++]=1,l[v++]=1,l[v++]=0,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=0,l[v++]=0,l[v++]=0,l[v++]=0,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=0,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=1,l[v++]=1,l[v++]=1,l[v++]=1,l[v++]=0,l[v++]=0,l[v++]=1,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=1,l[v++]=1,l[v++]=1,l[v++]=0,l[v++]=1,l[v++]=1,A.st=new m.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})}if(c.tangent){var z=new Float32Array(72);z[0]=1,z[1]=0,z[2]=0,z[3]=1,z[4]=0,z[5]=0,z[6]=1,z[7]=0,z[8]=0,z[9]=1,z[10]=0,z[11]=0,z[12]=-1,z[13]=0,z[14]=0,z[15]=-1,z[16]=0,z[17]=0,z[18]=-1,z[19]=0,z[20]=0,z[21]=-1,z[22]=0,z[23]=0,z[24]=0,z[25]=1,z[26]=0,z[27]=0,z[28]=1,z[29]=0,z[30]=0,z[31]=1,z[32]=0,z[33]=0,z[34]=1,z[35]=0,z[36]=0,z[37]=-1,z[38]=0,z[39]=0,z[40]=-1,z[41]=0,z[42]=0,z[43]=-1,z[44]=0,z[45]=0,z[46]=-1,z[47]=0,z[48]=-1,z[49]=0,z[50]=0,z[51]=-1,z[52]=0,z[53]=0,z[54]=-1,z[55]=0,z[56]=0,z[57]=-1,z[58]=0,z[59]=0,z[60]=1,z[61]=0,z[62]=0,z[63]=1,z[64]=0,z[65]=0,z[66]=1,z[67]=0,z[68]=0,z[69]=1,z[70]=0,z[71]=0,A.tangent=new m.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z})}if(c.bitangent){var w=new Float32Array(72);w[0]=0,w[1]=1,w[2]=0,w[3]=0,w[4]=1,w[5]=0,w[6]=0,w[7]=1,w[8]=0,w[9]=0,w[10]=1,w[11]=0,w[12]=0,w[13]=1,w[14]=0,w[15]=0,w[16]=1,w[17]=0,w[18]=0,w[19]=1,w[20]=0,w[21]=0,w[22]=1,w[23]=0,w[24]=0,w[25]=0,w[26]=1,w[27]=0,w[28]=0,w[29]=1,w[30]=0,w[31]=0,w[32]=1,w[33]=0,w[34]=0,w[35]=1,w[36]=0,w[37]=0,w[38]=1,w[39]=0,w[40]=0,w[41]=1,w[42]=0,w[43]=0,w[44]=1,w[45]=0,w[46]=0,w[47]=1,w[48]=0,w[49]=0,w[50]=1,w[51]=0,w[52]=0,w[53]=1,w[54]=0,w[55]=0,w[56]=1,w[57]=0,w[58]=0,w[59]=1,w[60]=0,w[61]=0,w[62]=1,w[63]=0,w[64]=0,w[65]=1,w[66]=0,w[67]=0,w[68]=1,w[69]=0,w[70]=0,w[71]=1,A.bitangent=new m.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:w})}(x=new Uint16Array(36))[0]=0,x[1]=1,x[2]=2,x[3]=0,x[4]=2,x[5]=3,x[6]=6,x[7]=5,x[8]=4,x[9]=7,x[10]=6,x[11]=4,x[12]=8,x[13]=9,x[14]=10,x[15]=8,x[16]=10,x[17]=11,x[18]=14,x[19]=13,x[20]=12,x[21]=15,x[22]=14,x[23]=12,x[24]=18,x[25]=17,x[26]=16,x[27]=19,x[28]=18,x[29]=16,x[30]=20,x[31]=21,x[32]=22,x[33]=20,x[34]=22,x[35]=23}else(b=new Float64Array(24))[0]=a.x,b[1]=a.y,b[2]=a.z,b[3]=s.x,b[4]=a.y,b[5]=a.z,b[6]=s.x,b[7]=s.y,b[8]=a.z,b[9]=a.x,b[10]=s.y,b[11]=a.z,b[12]=a.x,b[13]=a.y,b[14]=s.z,b[15]=s.x,b[16]=a.y,b[17]=s.z,b[18]=s.x,b[19]=s.y,b[20]=s.z,b[21]=a.x,b[22]=s.y,b[23]=s.z,A.position=new m.o({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:b}),(x=new Uint16Array(36))[0]=4,x[1]=5,x[2]=6,x[3]=4,x[4]=6,x[5]=7,x[6]=1,x[7]=0,x[8]=3,x[9]=1,x[10]=3,x[11]=2,x[12]=1,x[13]=6,x[14]=5,x[15]=1,x[16]=2,x[17]=6,x[18]=2,x[19]=3,x[20]=7,x[21]=2,x[22]=7,x[23]=6,x[24]=3,x[25]=0,x[26]=4,x[27]=3,x[28]=4,x[29]=7,x[30]=0,x[31]=1,x[32]=5,x[33]=0,x[34]=5,x[35]=4;var O=o.o.subtract(s,a,f),g=.5*o.o.magnitude(O);if(i.e(t._offsetAttribute)){var _=b.length,h=new Uint8Array(_/3),F=t._offsetAttribute===y.z.NONE?0:1;e.d(h,F),A.applyOffset=new m.o({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return new m.I({attributes:A,indices:x,primitiveType:p._0x3b3836.TRIANGLES,boundingSphere:new n.i(o.o.ZERO,g),offsetAttribute:t._offsetAttribute})}},c.getUnitBox=function(){return i.e(x)||(x=c.createGeometry(c.fromDimensions({dimensions:new o.o(1,1,1),vertexFormat:s.n.POSITION_ONLY}))),x},t.O=c})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/Color-98063b35.js b/SuperMap iEarth/public/SuperMap3D/Workers/Color-b1bd525f.js similarity index 99% rename from SuperMap iEarth/public/SuperMap3D/Workers/Color-98063b35.js rename to SuperMap iEarth/public/SuperMap3D/Workers/Color-b1bd525f.js index d7d0b90e..1fbd1ecd 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/Color-98063b35.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/Color-b1bd525f.js @@ -1 +1 @@ -define(["exports","./Check-52a7d806","./when-92c6cf3c","./FeatureDetection-cec0163f","./Math-ecf82623"],(function(e,r,o,t,s){"use strict";function f(e,r,o){return o<0&&(o+=1),o>1&&(o-=1),6*o<1?e+6*(r-e)*o:2*o<1?r:3*o<2?e+(r-e)*(2/3-o)*6:e}function n(e,r,t,s){this.red=o.u(e,1),this.green=o.u(r,1),this.blue=o.u(t,1),this.alpha=o.u(s,1)}var C,l,i;n.fromCartesian4=function(e,t){return r.o.typeOf.object("cartesian",e),o.e(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new n(e.x,e.y,e.z,e.w)},n.fromBytes=function(e,r,t,s,f){return e=n.byteToFloat(o.u(e,255)),r=n.byteToFloat(o.u(r,255)),t=n.byteToFloat(o.u(t,255)),s=n.byteToFloat(o.u(s,255)),o.e(f)?(f.red=e,f.green=r,f.blue=t,f.alpha=s,f):new n(e,r,t,s)},n.fromAlpha=function(e,t,s){return r.o.typeOf.object("color",e),r.o.typeOf.number("alpha",t),o.e(s)?(s.red=e.red,s.green=e.green,s.blue=e.blue,s.alpha=t,s):new n(e.red,e.green,e.blue,t)},t.s.supportsTypedArrays()&&(C=new ArrayBuffer(4),l=new Uint32Array(C),i=new Uint8Array(C)),n.fromRgba=function(e,r){return l[0]=e,n.fromBytes(i[0],i[1],i[2],i[3],r)},n.byteToRgba=function(e,r,o,t){return i[0]=e,i[1]=r,i[2]=o,i[3]=t,l[0]},n.fromHsl=function(e,r,t,s,C){e=o.u(e,0)%1,r=o.u(r,0),t=o.u(t,0),s=o.u(s,1);var l=t,i=t,O=t;if(0!==r){var b,a=2*t-(b=t<.5?t*(1+r):t+r-t*r);l=f(a,b,e+1/3),i=f(a,b,e),O=f(a,b,e-1/3)}return o.e(C)?(C.red=l,C.green=i,C.blue=O,C.alpha=s,C):new n(l,i,O,s)},n.fromRandom=function(e,t){var f=(e=o.u(e,o.u.EMPTY_OBJECT)).red;if(!o.e(f)){var C=o.u(e.minimumRed,0),l=o.u(e.maximumRed,1);r.o.typeOf.number.lessThanOrEquals("minimumRed",C,l),f=C+s.e.nextRandomNumber()*(l-C)}var i=e.green;if(!o.e(i)){var O=o.u(e.minimumGreen,0),b=o.u(e.maximumGreen,1);r.o.typeOf.number.lessThanOrEquals("minimumGreen",O,b),i=O+s.e.nextRandomNumber()*(b-O)}var a=e.blue;if(!o.e(a)){var E=o.u(e.minimumBlue,0),c=o.u(e.maximumBlue,1);r.o.typeOf.number.lessThanOrEquals("minimumBlue",E,c),a=E+s.e.nextRandomNumber()*(c-E)}var u=e.alpha;if(!o.e(u)){var g=o.u(e.minimumAlpha,0),m=o.u(e.maximumAlpha,1);r.o.typeOf.number.lessThanOrEquals("minumumAlpha",g,m),u=g+s.e.nextRandomNumber()*(m-g)}return o.e(t)?(t.red=f,t.green=i,t.blue=a,t.alpha=u,t):new n(f,i,a,u)};var O=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,b=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,a=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,E=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;n.fromCssColorString=function(e,t){r.o.typeOf.string("color",e),o.e(t)||(t=new n);var s=n[e.toUpperCase()];if(o.e(s))return n.clone(s,t),t;var f=O.exec(e);return null!==f?(t.red=parseInt(f[1],16)/15,t.green=parseInt(f[2],16)/15,t.blue=parseInt(f[3],16)/15,t.alpha=1,t):null!==(f=b.exec(e))?(t.red=parseInt(f[1],16)/255,t.green=parseInt(f[2],16)/255,t.blue=parseInt(f[3],16)/255,t.alpha=1,t):null!==(f=a.exec(e))?(t.red=parseFloat(f[1])/("%"===f[1].substr(-1)?100:255),t.green=parseFloat(f[2])/("%"===f[2].substr(-1)?100:255),t.blue=parseFloat(f[3])/("%"===f[3].substr(-1)?100:255),t.alpha=parseFloat(o.u(f[4],"1.0")),t):null!==(f=E.exec(e))?n.fromHsl(parseFloat(f[1])/360,parseFloat(f[2])/100,parseFloat(f[3])/100,parseFloat(o.u(f[4],"1.0")),t):t=void 0},n.packedLength=4,n.pack=function(e,t,s){return r.o.typeOf.object("value",e),r.o.defined("array",t),s=o.u(s,0),t[s++]=e.red,t[s++]=e.green,t[s++]=e.blue,t[s]=e.alpha,t},n.unpack=function(e,t,s){return r.o.defined("array",e),t=o.u(t,0),o.e(s)||(s=new n),s.red=e[t++],s.green=e[t++],s.blue=e[t++],s.alpha=e[t],s},n.byteToFloat=function(e){return e/255},n.floatToByte=function(e){return 1===e?255:256*e|0},n.clone=function(e,r){if(o.e(e))return o.e(r)?(r.red=e.red,r.green=e.green,r.blue=e.blue,r.alpha=e.alpha,r):new n(e.red,e.green,e.blue,e.alpha)},n.equals=function(e,r){return e===r||o.e(e)&&o.e(r)&&e.red===r.red&&e.green===r.green&&e.blue===r.blue&&e.alpha===r.alpha},n.equalsArray=function(e,r,o){return e.red===r[o]&&e.green===r[o+1]&&e.blue===r[o+2]&&e.alpha===r[o+3]},n.prototype.clone=function(e){return n.clone(this,e)},n.prototype.equals=function(e){return n.equals(this,e)},n.prototype.equalsEpsilon=function(e,r){return this===e||o.e(e)&&Math.abs(this.red-e.red)<=r&&Math.abs(this.green-e.green)<=r&&Math.abs(this.blue-e.blue)<=r&&Math.abs(this.alpha-e.alpha)<=r},n.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},n.prototype.toCssColorString=function(){var e=n.floatToByte(this.red),r=n.floatToByte(this.green),o=n.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+r+","+o+")":"rgba("+e+","+r+","+o+","+this.alpha+")"},n.prototype.toBytes=function(e){var r=n.floatToByte(this.red),t=n.floatToByte(this.green),s=n.floatToByte(this.blue),f=n.floatToByte(this.alpha);return o.e(e)?(e[0]=r,e[1]=t,e[2]=s,e[3]=f,e):[r,t,s,f]},n.prototype.toRgba=function(){return i[0]=n.floatToByte(this.red),i[1]=n.floatToByte(this.green),i[2]=n.floatToByte(this.blue),i[3]=n.floatToByte(this.alpha),l[0]},n.prototype.brighten=function(e,o){return r.o.typeOf.number("magnitude",e),r.o.typeOf.number.greaterThanOrEquals("magnitude",e,0),r.o.typeOf.object("result",o),e=1-e,o.red=1-(1-this.red)*e,o.green=1-(1-this.green)*e,o.blue=1-(1-this.blue)*e,o.alpha=this.alpha,o},n.prototype.darken=function(e,o){return r.o.typeOf.number("magnitude",e),r.o.typeOf.number.greaterThanOrEquals("magnitude",e,0),r.o.typeOf.object("result",o),e=1-e,o.red=this.red*e,o.green=this.green*e,o.blue=this.blue*e,o.alpha=this.alpha,o},n.prototype.withAlpha=function(e,r){return n.fromAlpha(this,e,r)},n.add=function(e,o,t){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",o),r.o.typeOf.object("result",t),t.red=e.red+o.red,t.green=e.green+o.green,t.blue=e.blue+o.blue,t.alpha=e.alpha+o.alpha,t},n.subtract=function(e,o,t){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",o),r.o.typeOf.object("result",t),t.red=e.red-o.red,t.green=e.green-o.green,t.blue=e.blue-o.blue,t.alpha=e.alpha-o.alpha,t},n.multiply=function(e,o,t){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",o),r.o.typeOf.object("result",t),t.red=e.red*o.red,t.green=e.green*o.green,t.blue=e.blue*o.blue,t.alpha=e.alpha*o.alpha,t},n.divide=function(e,o,t){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",o),r.o.typeOf.object("result",t),t.red=e.red/o.red,t.green=e.green/o.green,t.blue=e.blue/o.blue,t.alpha=e.alpha/o.alpha,t},n.mod=function(e,o,t){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",o),r.o.typeOf.object("result",t),t.red=e.red%o.red,t.green=e.green%o.green,t.blue=e.blue%o.blue,t.alpha=e.alpha%o.alpha,t},n.lerp=function(e,o,t,f){return r.o.typeOf.object("start",e),r.o.typeOf.object("end",o),r.o.typeOf.number("t",t),r.o.typeOf.object("result",f),f.red=s.e.lerp(e.red,o.red,t),f.green=s.e.lerp(e.green,o.green,t),f.blue=s.e.lerp(e.blue,o.blue,t),f.alpha=s.e.lerp(e.alpha,o.alpha,t),f},n.multiplyByScalar=function(e,o,t){return r.o.typeOf.object("color",e),r.o.typeOf.number("scalar",o),r.o.typeOf.object("result",t),t.red=e.red*o,t.green=e.green*o,t.blue=e.blue*o,t.alpha=e.alpha*o,t},n.divideByScalar=function(e,o,t){return r.o.typeOf.object("color",e),r.o.typeOf.number("scalar",o),r.o.typeOf.object("result",t),t.red=e.red/o,t.green=e.green/o,t.blue=e.blue/o,t.alpha=e.alpha/o,t},n.ALICEBLUE=Object.freeze(n.fromCssColorString("#F0F8FF")),n.ANTIQUEWHITE=Object.freeze(n.fromCssColorString("#FAEBD7")),n.AQUA=Object.freeze(n.fromCssColorString("#00FFFF")),n.AQUAMARINE=Object.freeze(n.fromCssColorString("#7FFFD4")),n.AZURE=Object.freeze(n.fromCssColorString("#F0FFFF")),n.BEIGE=Object.freeze(n.fromCssColorString("#F5F5DC")),n.BISQUE=Object.freeze(n.fromCssColorString("#FFE4C4")),n.BLACK=Object.freeze(n.fromCssColorString("#000000")),n.BLANCHEDALMOND=Object.freeze(n.fromCssColorString("#FFEBCD")),n.BLUE=Object.freeze(n.fromCssColorString("#0000FF")),n.BLUEVIOLET=Object.freeze(n.fromCssColorString("#8A2BE2")),n.BROWN=Object.freeze(n.fromCssColorString("#A52A2A")),n.BURLYWOOD=Object.freeze(n.fromCssColorString("#DEB887")),n.CADETBLUE=Object.freeze(n.fromCssColorString("#5F9EA0")),n.CHARTREUSE=Object.freeze(n.fromCssColorString("#7FFF00")),n.CHOCOLATE=Object.freeze(n.fromCssColorString("#D2691E")),n.CORAL=Object.freeze(n.fromCssColorString("#FF7F50")),n.CORNFLOWERBLUE=Object.freeze(n.fromCssColorString("#6495ED")),n.CORNSILK=Object.freeze(n.fromCssColorString("#FFF8DC")),n.CRIMSON=Object.freeze(n.fromCssColorString("#DC143C")),n.CYAN=Object.freeze(n.fromCssColorString("#00FFFF")),n.DARKBLUE=Object.freeze(n.fromCssColorString("#00008B")),n.DARKCYAN=Object.freeze(n.fromCssColorString("#008B8B")),n.DARKGOLDENROD=Object.freeze(n.fromCssColorString("#B8860B")),n.DARKGRAY=Object.freeze(n.fromCssColorString("#A9A9A9")),n.DARKGREEN=Object.freeze(n.fromCssColorString("#006400")),n.DARKGREY=n.DARKGRAY,n.DARKKHAKI=Object.freeze(n.fromCssColorString("#BDB76B")),n.DARKMAGENTA=Object.freeze(n.fromCssColorString("#8B008B")),n.DARKOLIVEGREEN=Object.freeze(n.fromCssColorString("#556B2F")),n.DARKORANGE=Object.freeze(n.fromCssColorString("#FF8C00")),n.DARKORCHID=Object.freeze(n.fromCssColorString("#9932CC")),n.DARKRED=Object.freeze(n.fromCssColorString("#8B0000")),n.DARKSALMON=Object.freeze(n.fromCssColorString("#E9967A")),n.DARKSEAGREEN=Object.freeze(n.fromCssColorString("#8FBC8F")),n.DARKSLATEBLUE=Object.freeze(n.fromCssColorString("#483D8B")),n.DARKSLATEGRAY=Object.freeze(n.fromCssColorString("#2F4F4F")),n.DARKSLATEGREY=n.DARKSLATEGRAY,n.DARKTURQUOISE=Object.freeze(n.fromCssColorString("#00CED1")),n.DARKVIOLET=Object.freeze(n.fromCssColorString("#9400D3")),n.DEEPPINK=Object.freeze(n.fromCssColorString("#FF1493")),n.DEEPSKYBLUE=Object.freeze(n.fromCssColorString("#00BFFF")),n.DIMGRAY=Object.freeze(n.fromCssColorString("#696969")),n.DIMGREY=n.DIMGRAY,n.DODGERBLUE=Object.freeze(n.fromCssColorString("#1E90FF")),n.FIREBRICK=Object.freeze(n.fromCssColorString("#B22222")),n.FLORALWHITE=Object.freeze(n.fromCssColorString("#FFFAF0")),n.FORESTGREEN=Object.freeze(n.fromCssColorString("#228B22")),n.FUCHSIA=Object.freeze(n.fromCssColorString("#FF00FF")),n.GAINSBORO=Object.freeze(n.fromCssColorString("#DCDCDC")),n.GHOSTWHITE=Object.freeze(n.fromCssColorString("#F8F8FF")),n.GOLD=Object.freeze(n.fromCssColorString("#FFD700")),n.GOLDENROD=Object.freeze(n.fromCssColorString("#DAA520")),n.GRAY=Object.freeze(n.fromCssColorString("#808080")),n.GREEN=Object.freeze(n.fromCssColorString("#008000")),n.GREENYELLOW=Object.freeze(n.fromCssColorString("#ADFF2F")),n.GREY=n.GRAY,n.HONEYDEW=Object.freeze(n.fromCssColorString("#F0FFF0")),n.HOTPINK=Object.freeze(n.fromCssColorString("#FF69B4")),n.INDIANRED=Object.freeze(n.fromCssColorString("#CD5C5C")),n.INDIGO=Object.freeze(n.fromCssColorString("#4B0082")),n.IVORY=Object.freeze(n.fromCssColorString("#FFFFF0")),n.KHAKI=Object.freeze(n.fromCssColorString("#F0E68C")),n.LAVENDER=Object.freeze(n.fromCssColorString("#E6E6FA")),n.LAVENDAR_BLUSH=Object.freeze(n.fromCssColorString("#FFF0F5")),n.LAWNGREEN=Object.freeze(n.fromCssColorString("#7CFC00")),n.LEMONCHIFFON=Object.freeze(n.fromCssColorString("#FFFACD")),n.LIGHTBLUE=Object.freeze(n.fromCssColorString("#ADD8E6")),n.LIGHTCORAL=Object.freeze(n.fromCssColorString("#F08080")),n.LIGHTCYAN=Object.freeze(n.fromCssColorString("#E0FFFF")),n.LIGHTGOLDENRODYELLOW=Object.freeze(n.fromCssColorString("#FAFAD2")),n.LIGHTGRAY=Object.freeze(n.fromCssColorString("#D3D3D3")),n.LIGHTGREEN=Object.freeze(n.fromCssColorString("#90EE90")),n.LIGHTGREY=n.LIGHTGRAY,n.LIGHTPINK=Object.freeze(n.fromCssColorString("#FFB6C1")),n.LIGHTSEAGREEN=Object.freeze(n.fromCssColorString("#20B2AA")),n.LIGHTSKYBLUE=Object.freeze(n.fromCssColorString("#87CEFA")),n.LIGHTSLATEGRAY=Object.freeze(n.fromCssColorString("#778899")),n.LIGHTSLATEGREY=n.LIGHTSLATEGRAY,n.LIGHTSTEELBLUE=Object.freeze(n.fromCssColorString("#B0C4DE")),n.LIGHTYELLOW=Object.freeze(n.fromCssColorString("#FFFFE0")),n.LIME=Object.freeze(n.fromCssColorString("#00FF00")),n.LIMEGREEN=Object.freeze(n.fromCssColorString("#32CD32")),n.LINEN=Object.freeze(n.fromCssColorString("#FAF0E6")),n.MAGENTA=Object.freeze(n.fromCssColorString("#FF00FF")),n.MAROON=Object.freeze(n.fromCssColorString("#800000")),n.MEDIUMAQUAMARINE=Object.freeze(n.fromCssColorString("#66CDAA")),n.MEDIUMBLUE=Object.freeze(n.fromCssColorString("#0000CD")),n.MEDIUMORCHID=Object.freeze(n.fromCssColorString("#BA55D3")),n.MEDIUMPURPLE=Object.freeze(n.fromCssColorString("#9370DB")),n.MEDIUMSEAGREEN=Object.freeze(n.fromCssColorString("#3CB371")),n.MEDIUMSLATEBLUE=Object.freeze(n.fromCssColorString("#7B68EE")),n.MEDIUMSPRINGGREEN=Object.freeze(n.fromCssColorString("#00FA9A")),n.MEDIUMTURQUOISE=Object.freeze(n.fromCssColorString("#48D1CC")),n.MEDIUMVIOLETRED=Object.freeze(n.fromCssColorString("#C71585")),n.MIDNIGHTBLUE=Object.freeze(n.fromCssColorString("#191970")),n.MINTCREAM=Object.freeze(n.fromCssColorString("#F5FFFA")),n.MISTYROSE=Object.freeze(n.fromCssColorString("#FFE4E1")),n.MOCCASIN=Object.freeze(n.fromCssColorString("#FFE4B5")),n.NAVAJOWHITE=Object.freeze(n.fromCssColorString("#FFDEAD")),n.NAVY=Object.freeze(n.fromCssColorString("#000080")),n.OLDLACE=Object.freeze(n.fromCssColorString("#FDF5E6")),n.OLIVE=Object.freeze(n.fromCssColorString("#808000")),n.OLIVEDRAB=Object.freeze(n.fromCssColorString("#6B8E23")),n.ORANGE=Object.freeze(n.fromCssColorString("#FFA500")),n.ORANGERED=Object.freeze(n.fromCssColorString("#FF4500")),n.ORCHID=Object.freeze(n.fromCssColorString("#DA70D6")),n.PALEGOLDENROD=Object.freeze(n.fromCssColorString("#EEE8AA")),n.PALEGREEN=Object.freeze(n.fromCssColorString("#98FB98")),n.PALETURQUOISE=Object.freeze(n.fromCssColorString("#AFEEEE")),n.PALEVIOLETRED=Object.freeze(n.fromCssColorString("#DB7093")),n.PAPAYAWHIP=Object.freeze(n.fromCssColorString("#FFEFD5")),n.PEACHPUFF=Object.freeze(n.fromCssColorString("#FFDAB9")),n.PERU=Object.freeze(n.fromCssColorString("#CD853F")),n.PINK=Object.freeze(n.fromCssColorString("#FFC0CB")),n.PLUM=Object.freeze(n.fromCssColorString("#DDA0DD")),n.POWDERBLUE=Object.freeze(n.fromCssColorString("#B0E0E6")),n.PURPLE=Object.freeze(n.fromCssColorString("#800080")),n.RED=Object.freeze(n.fromCssColorString("#FF0000")),n.ROSYBROWN=Object.freeze(n.fromCssColorString("#BC8F8F")),n.ROYALBLUE=Object.freeze(n.fromCssColorString("#4169E1")),n.SADDLEBROWN=Object.freeze(n.fromCssColorString("#8B4513")),n.SALMON=Object.freeze(n.fromCssColorString("#FA8072")),n.SANDYBROWN=Object.freeze(n.fromCssColorString("#F4A460")),n.SEAGREEN=Object.freeze(n.fromCssColorString("#2E8B57")),n.SEASHELL=Object.freeze(n.fromCssColorString("#FFF5EE")),n.SIENNA=Object.freeze(n.fromCssColorString("#A0522D")),n.SILVER=Object.freeze(n.fromCssColorString("#C0C0C0")),n.SKYBLUE=Object.freeze(n.fromCssColorString("#87CEEB")),n.SLATEBLUE=Object.freeze(n.fromCssColorString("#6A5ACD")),n.SLATEGRAY=Object.freeze(n.fromCssColorString("#708090")),n.SLATEGREY=n.SLATEGRAY,n.SNOW=Object.freeze(n.fromCssColorString("#FFFAFA")),n.SPRINGGREEN=Object.freeze(n.fromCssColorString("#00FF7F")),n.STEELBLUE=Object.freeze(n.fromCssColorString("#4682B4")),n.TAN=Object.freeze(n.fromCssColorString("#D2B48C")),n.TEAL=Object.freeze(n.fromCssColorString("#008080")),n.THISTLE=Object.freeze(n.fromCssColorString("#D8BFD8")),n.TOMATO=Object.freeze(n.fromCssColorString("#FF6347")),n.TURQUOISE=Object.freeze(n.fromCssColorString("#40E0D0")),n.VIOLET=Object.freeze(n.fromCssColorString("#EE82EE")),n.WHEAT=Object.freeze(n.fromCssColorString("#F5DEB3")),n.WHITE=Object.freeze(n.fromCssColorString("#FFFFFF")),n.WHITESMOKE=Object.freeze(n.fromCssColorString("#F5F5F5")),n.YELLOW=Object.freeze(n.fromCssColorString("#FFFF00")),n.YELLOWGREEN=Object.freeze(n.fromCssColorString("#9ACD32")),n.TRANSPARENT=Object.freeze(new n(0,0,0,0)),e.e=n})); +define(["exports","./Check-52a7d806","./when-92c6cf3c","./FeatureDetection-fd297af4","./Math-ecf82623"],(function(e,r,o,t,s){"use strict";function f(e,r,o){return o<0&&(o+=1),o>1&&(o-=1),6*o<1?e+6*(r-e)*o:2*o<1?r:3*o<2?e+(r-e)*(2/3-o)*6:e}function n(e,r,t,s){this.red=o.u(e,1),this.green=o.u(r,1),this.blue=o.u(t,1),this.alpha=o.u(s,1)}var C,l,i;n.fromCartesian4=function(e,t){return r.o.typeOf.object("cartesian",e),o.e(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new n(e.x,e.y,e.z,e.w)},n.fromBytes=function(e,r,t,s,f){return e=n.byteToFloat(o.u(e,255)),r=n.byteToFloat(o.u(r,255)),t=n.byteToFloat(o.u(t,255)),s=n.byteToFloat(o.u(s,255)),o.e(f)?(f.red=e,f.green=r,f.blue=t,f.alpha=s,f):new n(e,r,t,s)},n.fromAlpha=function(e,t,s){return r.o.typeOf.object("color",e),r.o.typeOf.number("alpha",t),o.e(s)?(s.red=e.red,s.green=e.green,s.blue=e.blue,s.alpha=t,s):new n(e.red,e.green,e.blue,t)},t.s.supportsTypedArrays()&&(C=new ArrayBuffer(4),l=new Uint32Array(C),i=new Uint8Array(C)),n.fromRgba=function(e,r){return l[0]=e,n.fromBytes(i[0],i[1],i[2],i[3],r)},n.byteToRgba=function(e,r,o,t){return i[0]=e,i[1]=r,i[2]=o,i[3]=t,l[0]},n.fromHsl=function(e,r,t,s,C){e=o.u(e,0)%1,r=o.u(r,0),t=o.u(t,0),s=o.u(s,1);var l=t,i=t,O=t;if(0!==r){var b,a=2*t-(b=t<.5?t*(1+r):t+r-t*r);l=f(a,b,e+1/3),i=f(a,b,e),O=f(a,b,e-1/3)}return o.e(C)?(C.red=l,C.green=i,C.blue=O,C.alpha=s,C):new n(l,i,O,s)},n.fromRandom=function(e,t){var f=(e=o.u(e,o.u.EMPTY_OBJECT)).red;if(!o.e(f)){var C=o.u(e.minimumRed,0),l=o.u(e.maximumRed,1);r.o.typeOf.number.lessThanOrEquals("minimumRed",C,l),f=C+s.e.nextRandomNumber()*(l-C)}var i=e.green;if(!o.e(i)){var O=o.u(e.minimumGreen,0),b=o.u(e.maximumGreen,1);r.o.typeOf.number.lessThanOrEquals("minimumGreen",O,b),i=O+s.e.nextRandomNumber()*(b-O)}var a=e.blue;if(!o.e(a)){var E=o.u(e.minimumBlue,0),c=o.u(e.maximumBlue,1);r.o.typeOf.number.lessThanOrEquals("minimumBlue",E,c),a=E+s.e.nextRandomNumber()*(c-E)}var u=e.alpha;if(!o.e(u)){var g=o.u(e.minimumAlpha,0),m=o.u(e.maximumAlpha,1);r.o.typeOf.number.lessThanOrEquals("minumumAlpha",g,m),u=g+s.e.nextRandomNumber()*(m-g)}return o.e(t)?(t.red=f,t.green=i,t.blue=a,t.alpha=u,t):new n(f,i,a,u)};var O=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,b=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,a=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,E=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;n.fromCssColorString=function(e,t){r.o.typeOf.string("color",e),o.e(t)||(t=new n);var s=n[e.toUpperCase()];if(o.e(s))return n.clone(s,t),t;var f=O.exec(e);return null!==f?(t.red=parseInt(f[1],16)/15,t.green=parseInt(f[2],16)/15,t.blue=parseInt(f[3],16)/15,t.alpha=1,t):null!==(f=b.exec(e))?(t.red=parseInt(f[1],16)/255,t.green=parseInt(f[2],16)/255,t.blue=parseInt(f[3],16)/255,t.alpha=1,t):null!==(f=a.exec(e))?(t.red=parseFloat(f[1])/("%"===f[1].substr(-1)?100:255),t.green=parseFloat(f[2])/("%"===f[2].substr(-1)?100:255),t.blue=parseFloat(f[3])/("%"===f[3].substr(-1)?100:255),t.alpha=parseFloat(o.u(f[4],"1.0")),t):null!==(f=E.exec(e))?n.fromHsl(parseFloat(f[1])/360,parseFloat(f[2])/100,parseFloat(f[3])/100,parseFloat(o.u(f[4],"1.0")),t):t=void 0},n.packedLength=4,n.pack=function(e,t,s){return r.o.typeOf.object("value",e),r.o.defined("array",t),s=o.u(s,0),t[s++]=e.red,t[s++]=e.green,t[s++]=e.blue,t[s]=e.alpha,t},n.unpack=function(e,t,s){return r.o.defined("array",e),t=o.u(t,0),o.e(s)||(s=new n),s.red=e[t++],s.green=e[t++],s.blue=e[t++],s.alpha=e[t],s},n.byteToFloat=function(e){return e/255},n.floatToByte=function(e){return 1===e?255:256*e|0},n.clone=function(e,r){if(o.e(e))return o.e(r)?(r.red=e.red,r.green=e.green,r.blue=e.blue,r.alpha=e.alpha,r):new n(e.red,e.green,e.blue,e.alpha)},n.equals=function(e,r){return e===r||o.e(e)&&o.e(r)&&e.red===r.red&&e.green===r.green&&e.blue===r.blue&&e.alpha===r.alpha},n.equalsArray=function(e,r,o){return e.red===r[o]&&e.green===r[o+1]&&e.blue===r[o+2]&&e.alpha===r[o+3]},n.prototype.clone=function(e){return n.clone(this,e)},n.prototype.equals=function(e){return n.equals(this,e)},n.prototype.equalsEpsilon=function(e,r){return this===e||o.e(e)&&Math.abs(this.red-e.red)<=r&&Math.abs(this.green-e.green)<=r&&Math.abs(this.blue-e.blue)<=r&&Math.abs(this.alpha-e.alpha)<=r},n.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},n.prototype.toCssColorString=function(){var e=n.floatToByte(this.red),r=n.floatToByte(this.green),o=n.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+r+","+o+")":"rgba("+e+","+r+","+o+","+this.alpha+")"},n.prototype.toBytes=function(e){var r=n.floatToByte(this.red),t=n.floatToByte(this.green),s=n.floatToByte(this.blue),f=n.floatToByte(this.alpha);return o.e(e)?(e[0]=r,e[1]=t,e[2]=s,e[3]=f,e):[r,t,s,f]},n.prototype.toRgba=function(){return i[0]=n.floatToByte(this.red),i[1]=n.floatToByte(this.green),i[2]=n.floatToByte(this.blue),i[3]=n.floatToByte(this.alpha),l[0]},n.prototype.brighten=function(e,o){return r.o.typeOf.number("magnitude",e),r.o.typeOf.number.greaterThanOrEquals("magnitude",e,0),r.o.typeOf.object("result",o),e=1-e,o.red=1-(1-this.red)*e,o.green=1-(1-this.green)*e,o.blue=1-(1-this.blue)*e,o.alpha=this.alpha,o},n.prototype.darken=function(e,o){return r.o.typeOf.number("magnitude",e),r.o.typeOf.number.greaterThanOrEquals("magnitude",e,0),r.o.typeOf.object("result",o),e=1-e,o.red=this.red*e,o.green=this.green*e,o.blue=this.blue*e,o.alpha=this.alpha,o},n.prototype.withAlpha=function(e,r){return n.fromAlpha(this,e,r)},n.add=function(e,o,t){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",o),r.o.typeOf.object("result",t),t.red=e.red+o.red,t.green=e.green+o.green,t.blue=e.blue+o.blue,t.alpha=e.alpha+o.alpha,t},n.subtract=function(e,o,t){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",o),r.o.typeOf.object("result",t),t.red=e.red-o.red,t.green=e.green-o.green,t.blue=e.blue-o.blue,t.alpha=e.alpha-o.alpha,t},n.multiply=function(e,o,t){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",o),r.o.typeOf.object("result",t),t.red=e.red*o.red,t.green=e.green*o.green,t.blue=e.blue*o.blue,t.alpha=e.alpha*o.alpha,t},n.divide=function(e,o,t){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",o),r.o.typeOf.object("result",t),t.red=e.red/o.red,t.green=e.green/o.green,t.blue=e.blue/o.blue,t.alpha=e.alpha/o.alpha,t},n.mod=function(e,o,t){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",o),r.o.typeOf.object("result",t),t.red=e.red%o.red,t.green=e.green%o.green,t.blue=e.blue%o.blue,t.alpha=e.alpha%o.alpha,t},n.lerp=function(e,o,t,f){return r.o.typeOf.object("start",e),r.o.typeOf.object("end",o),r.o.typeOf.number("t",t),r.o.typeOf.object("result",f),f.red=s.e.lerp(e.red,o.red,t),f.green=s.e.lerp(e.green,o.green,t),f.blue=s.e.lerp(e.blue,o.blue,t),f.alpha=s.e.lerp(e.alpha,o.alpha,t),f},n.multiplyByScalar=function(e,o,t){return r.o.typeOf.object("color",e),r.o.typeOf.number("scalar",o),r.o.typeOf.object("result",t),t.red=e.red*o,t.green=e.green*o,t.blue=e.blue*o,t.alpha=e.alpha*o,t},n.divideByScalar=function(e,o,t){return r.o.typeOf.object("color",e),r.o.typeOf.number("scalar",o),r.o.typeOf.object("result",t),t.red=e.red/o,t.green=e.green/o,t.blue=e.blue/o,t.alpha=e.alpha/o,t},n.ALICEBLUE=Object.freeze(n.fromCssColorString("#F0F8FF")),n.ANTIQUEWHITE=Object.freeze(n.fromCssColorString("#FAEBD7")),n.AQUA=Object.freeze(n.fromCssColorString("#00FFFF")),n.AQUAMARINE=Object.freeze(n.fromCssColorString("#7FFFD4")),n.AZURE=Object.freeze(n.fromCssColorString("#F0FFFF")),n.BEIGE=Object.freeze(n.fromCssColorString("#F5F5DC")),n.BISQUE=Object.freeze(n.fromCssColorString("#FFE4C4")),n.BLACK=Object.freeze(n.fromCssColorString("#000000")),n.BLANCHEDALMOND=Object.freeze(n.fromCssColorString("#FFEBCD")),n.BLUE=Object.freeze(n.fromCssColorString("#0000FF")),n.BLUEVIOLET=Object.freeze(n.fromCssColorString("#8A2BE2")),n.BROWN=Object.freeze(n.fromCssColorString("#A52A2A")),n.BURLYWOOD=Object.freeze(n.fromCssColorString("#DEB887")),n.CADETBLUE=Object.freeze(n.fromCssColorString("#5F9EA0")),n.CHARTREUSE=Object.freeze(n.fromCssColorString("#7FFF00")),n.CHOCOLATE=Object.freeze(n.fromCssColorString("#D2691E")),n.CORAL=Object.freeze(n.fromCssColorString("#FF7F50")),n.CORNFLOWERBLUE=Object.freeze(n.fromCssColorString("#6495ED")),n.CORNSILK=Object.freeze(n.fromCssColorString("#FFF8DC")),n.CRIMSON=Object.freeze(n.fromCssColorString("#DC143C")),n.CYAN=Object.freeze(n.fromCssColorString("#00FFFF")),n.DARKBLUE=Object.freeze(n.fromCssColorString("#00008B")),n.DARKCYAN=Object.freeze(n.fromCssColorString("#008B8B")),n.DARKGOLDENROD=Object.freeze(n.fromCssColorString("#B8860B")),n.DARKGRAY=Object.freeze(n.fromCssColorString("#A9A9A9")),n.DARKGREEN=Object.freeze(n.fromCssColorString("#006400")),n.DARKGREY=n.DARKGRAY,n.DARKKHAKI=Object.freeze(n.fromCssColorString("#BDB76B")),n.DARKMAGENTA=Object.freeze(n.fromCssColorString("#8B008B")),n.DARKOLIVEGREEN=Object.freeze(n.fromCssColorString("#556B2F")),n.DARKORANGE=Object.freeze(n.fromCssColorString("#FF8C00")),n.DARKORCHID=Object.freeze(n.fromCssColorString("#9932CC")),n.DARKRED=Object.freeze(n.fromCssColorString("#8B0000")),n.DARKSALMON=Object.freeze(n.fromCssColorString("#E9967A")),n.DARKSEAGREEN=Object.freeze(n.fromCssColorString("#8FBC8F")),n.DARKSLATEBLUE=Object.freeze(n.fromCssColorString("#483D8B")),n.DARKSLATEGRAY=Object.freeze(n.fromCssColorString("#2F4F4F")),n.DARKSLATEGREY=n.DARKSLATEGRAY,n.DARKTURQUOISE=Object.freeze(n.fromCssColorString("#00CED1")),n.DARKVIOLET=Object.freeze(n.fromCssColorString("#9400D3")),n.DEEPPINK=Object.freeze(n.fromCssColorString("#FF1493")),n.DEEPSKYBLUE=Object.freeze(n.fromCssColorString("#00BFFF")),n.DIMGRAY=Object.freeze(n.fromCssColorString("#696969")),n.DIMGREY=n.DIMGRAY,n.DODGERBLUE=Object.freeze(n.fromCssColorString("#1E90FF")),n.FIREBRICK=Object.freeze(n.fromCssColorString("#B22222")),n.FLORALWHITE=Object.freeze(n.fromCssColorString("#FFFAF0")),n.FORESTGREEN=Object.freeze(n.fromCssColorString("#228B22")),n.FUCHSIA=Object.freeze(n.fromCssColorString("#FF00FF")),n.GAINSBORO=Object.freeze(n.fromCssColorString("#DCDCDC")),n.GHOSTWHITE=Object.freeze(n.fromCssColorString("#F8F8FF")),n.GOLD=Object.freeze(n.fromCssColorString("#FFD700")),n.GOLDENROD=Object.freeze(n.fromCssColorString("#DAA520")),n.GRAY=Object.freeze(n.fromCssColorString("#808080")),n.GREEN=Object.freeze(n.fromCssColorString("#008000")),n.GREENYELLOW=Object.freeze(n.fromCssColorString("#ADFF2F")),n.GREY=n.GRAY,n.HONEYDEW=Object.freeze(n.fromCssColorString("#F0FFF0")),n.HOTPINK=Object.freeze(n.fromCssColorString("#FF69B4")),n.INDIANRED=Object.freeze(n.fromCssColorString("#CD5C5C")),n.INDIGO=Object.freeze(n.fromCssColorString("#4B0082")),n.IVORY=Object.freeze(n.fromCssColorString("#FFFFF0")),n.KHAKI=Object.freeze(n.fromCssColorString("#F0E68C")),n.LAVENDER=Object.freeze(n.fromCssColorString("#E6E6FA")),n.LAVENDAR_BLUSH=Object.freeze(n.fromCssColorString("#FFF0F5")),n.LAWNGREEN=Object.freeze(n.fromCssColorString("#7CFC00")),n.LEMONCHIFFON=Object.freeze(n.fromCssColorString("#FFFACD")),n.LIGHTBLUE=Object.freeze(n.fromCssColorString("#ADD8E6")),n.LIGHTCORAL=Object.freeze(n.fromCssColorString("#F08080")),n.LIGHTCYAN=Object.freeze(n.fromCssColorString("#E0FFFF")),n.LIGHTGOLDENRODYELLOW=Object.freeze(n.fromCssColorString("#FAFAD2")),n.LIGHTGRAY=Object.freeze(n.fromCssColorString("#D3D3D3")),n.LIGHTGREEN=Object.freeze(n.fromCssColorString("#90EE90")),n.LIGHTGREY=n.LIGHTGRAY,n.LIGHTPINK=Object.freeze(n.fromCssColorString("#FFB6C1")),n.LIGHTSEAGREEN=Object.freeze(n.fromCssColorString("#20B2AA")),n.LIGHTSKYBLUE=Object.freeze(n.fromCssColorString("#87CEFA")),n.LIGHTSLATEGRAY=Object.freeze(n.fromCssColorString("#778899")),n.LIGHTSLATEGREY=n.LIGHTSLATEGRAY,n.LIGHTSTEELBLUE=Object.freeze(n.fromCssColorString("#B0C4DE")),n.LIGHTYELLOW=Object.freeze(n.fromCssColorString("#FFFFE0")),n.LIME=Object.freeze(n.fromCssColorString("#00FF00")),n.LIMEGREEN=Object.freeze(n.fromCssColorString("#32CD32")),n.LINEN=Object.freeze(n.fromCssColorString("#FAF0E6")),n.MAGENTA=Object.freeze(n.fromCssColorString("#FF00FF")),n.MAROON=Object.freeze(n.fromCssColorString("#800000")),n.MEDIUMAQUAMARINE=Object.freeze(n.fromCssColorString("#66CDAA")),n.MEDIUMBLUE=Object.freeze(n.fromCssColorString("#0000CD")),n.MEDIUMORCHID=Object.freeze(n.fromCssColorString("#BA55D3")),n.MEDIUMPURPLE=Object.freeze(n.fromCssColorString("#9370DB")),n.MEDIUMSEAGREEN=Object.freeze(n.fromCssColorString("#3CB371")),n.MEDIUMSLATEBLUE=Object.freeze(n.fromCssColorString("#7B68EE")),n.MEDIUMSPRINGGREEN=Object.freeze(n.fromCssColorString("#00FA9A")),n.MEDIUMTURQUOISE=Object.freeze(n.fromCssColorString("#48D1CC")),n.MEDIUMVIOLETRED=Object.freeze(n.fromCssColorString("#C71585")),n.MIDNIGHTBLUE=Object.freeze(n.fromCssColorString("#191970")),n.MINTCREAM=Object.freeze(n.fromCssColorString("#F5FFFA")),n.MISTYROSE=Object.freeze(n.fromCssColorString("#FFE4E1")),n.MOCCASIN=Object.freeze(n.fromCssColorString("#FFE4B5")),n.NAVAJOWHITE=Object.freeze(n.fromCssColorString("#FFDEAD")),n.NAVY=Object.freeze(n.fromCssColorString("#000080")),n.OLDLACE=Object.freeze(n.fromCssColorString("#FDF5E6")),n.OLIVE=Object.freeze(n.fromCssColorString("#808000")),n.OLIVEDRAB=Object.freeze(n.fromCssColorString("#6B8E23")),n.ORANGE=Object.freeze(n.fromCssColorString("#FFA500")),n.ORANGERED=Object.freeze(n.fromCssColorString("#FF4500")),n.ORCHID=Object.freeze(n.fromCssColorString("#DA70D6")),n.PALEGOLDENROD=Object.freeze(n.fromCssColorString("#EEE8AA")),n.PALEGREEN=Object.freeze(n.fromCssColorString("#98FB98")),n.PALETURQUOISE=Object.freeze(n.fromCssColorString("#AFEEEE")),n.PALEVIOLETRED=Object.freeze(n.fromCssColorString("#DB7093")),n.PAPAYAWHIP=Object.freeze(n.fromCssColorString("#FFEFD5")),n.PEACHPUFF=Object.freeze(n.fromCssColorString("#FFDAB9")),n.PERU=Object.freeze(n.fromCssColorString("#CD853F")),n.PINK=Object.freeze(n.fromCssColorString("#FFC0CB")),n.PLUM=Object.freeze(n.fromCssColorString("#DDA0DD")),n.POWDERBLUE=Object.freeze(n.fromCssColorString("#B0E0E6")),n.PURPLE=Object.freeze(n.fromCssColorString("#800080")),n.RED=Object.freeze(n.fromCssColorString("#FF0000")),n.ROSYBROWN=Object.freeze(n.fromCssColorString("#BC8F8F")),n.ROYALBLUE=Object.freeze(n.fromCssColorString("#4169E1")),n.SADDLEBROWN=Object.freeze(n.fromCssColorString("#8B4513")),n.SALMON=Object.freeze(n.fromCssColorString("#FA8072")),n.SANDYBROWN=Object.freeze(n.fromCssColorString("#F4A460")),n.SEAGREEN=Object.freeze(n.fromCssColorString("#2E8B57")),n.SEASHELL=Object.freeze(n.fromCssColorString("#FFF5EE")),n.SIENNA=Object.freeze(n.fromCssColorString("#A0522D")),n.SILVER=Object.freeze(n.fromCssColorString("#C0C0C0")),n.SKYBLUE=Object.freeze(n.fromCssColorString("#87CEEB")),n.SLATEBLUE=Object.freeze(n.fromCssColorString("#6A5ACD")),n.SLATEGRAY=Object.freeze(n.fromCssColorString("#708090")),n.SLATEGREY=n.SLATEGRAY,n.SNOW=Object.freeze(n.fromCssColorString("#FFFAFA")),n.SPRINGGREEN=Object.freeze(n.fromCssColorString("#00FF7F")),n.STEELBLUE=Object.freeze(n.fromCssColorString("#4682B4")),n.TAN=Object.freeze(n.fromCssColorString("#D2B48C")),n.TEAL=Object.freeze(n.fromCssColorString("#008080")),n.THISTLE=Object.freeze(n.fromCssColorString("#D8BFD8")),n.TOMATO=Object.freeze(n.fromCssColorString("#FF6347")),n.TURQUOISE=Object.freeze(n.fromCssColorString("#40E0D0")),n.VIOLET=Object.freeze(n.fromCssColorString("#EE82EE")),n.WHEAT=Object.freeze(n.fromCssColorString("#F5DEB3")),n.WHITE=Object.freeze(n.fromCssColorString("#FFFFFF")),n.WHITESMOKE=Object.freeze(n.fromCssColorString("#F5F5F5")),n.YELLOW=Object.freeze(n.fromCssColorString("#FFFF00")),n.YELLOWGREEN=Object.freeze(n.fromCssColorString("#9ACD32")),n.TRANSPARENT=Object.freeze(new n(0,0,0,0)),e.e=n})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/CoplanarPolygonGeometryLibrary-733c8399.js b/SuperMap iEarth/public/SuperMap3D/Workers/CoplanarPolygonGeometryLibrary-733c8399.js new file mode 100644 index 00000000..7020ed85 --- /dev/null +++ b/SuperMap iEarth/public/SuperMap3D/Workers/CoplanarPolygonGeometryLibrary-733c8399.js @@ -0,0 +1 @@ +define(["exports","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Check-52a7d806","./FeatureDetection-fd297af4","./OrientedBoundingBox-42d3d74a"],(function(e,n,o,t,i,r){"use strict";var u={},a=new o.o,d=new o.o,c=new o.o,f=new o.o,s=new r.y;function l(e,t,i,r,u){var d=o.o.subtract(e,t,a),c=o.o.dot(i,d),f=o.o.dot(r,d);return n.o.fromElements(c,f,u)}u.validOutline=function(e){t.o.defined("positions",e);var n=r.y.fromPoints(e,s).halfAxes,u=i.p$1.getColumn(n,0,d),a=i.p$1.getColumn(n,1,c),l=i.p$1.getColumn(n,2,f),m=o.o.magnitude(u),g=o.o.magnitude(a),p=o.o.magnitude(l);return!(0===m&&(0===g||0===p)||0===g&&0===p)},u.computeProjectTo2DArguments=function(e,n,u,a){t.o.defined("positions",e),t.o.defined("centerResult",n),t.o.defined("planeAxis1Result",u),t.o.defined("planeAxis2Result",a);var l,m,g=r.y.fromPoints(e,s),p=g.halfAxes,C=i.p$1.getColumn(p,0,d),P=i.p$1.getColumn(p,1,c),h=i.p$1.getColumn(p,2,f),v=o.o.magnitude(C),w=o.o.magnitude(P),x=o.o.magnitude(h),A=Math.min(v,w,x);return(0!==v||0!==w&&0!==x)&&(0!==w||0!==x)&&((A===w||A===x)&&(l=C),A===v?l=P:A===x&&(m=P),(A===v||A===w)&&(m=h),o.o.normalize(l,u),o.o.normalize(m,a),o.o.clone(g.center,n),!0)},u.createProjectPointsTo2DFunction=function(e,n,o){return function(t){for(var i=new Array(t.length),r=0;r<t.length;r++)i[r]=l(t[r],e,n,o);return i}},u.createProjectPointTo2DFunction=function(e,n,o){return function(t,i){return l(t,e,n,o,i)}},e.g=u})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/CoplanarPolygonGeometryLibrary-e7538f09.js b/SuperMap iEarth/public/SuperMap3D/Workers/CoplanarPolygonGeometryLibrary-e7538f09.js deleted file mode 100644 index fbd8e9c9..00000000 --- a/SuperMap iEarth/public/SuperMap3D/Workers/CoplanarPolygonGeometryLibrary-e7538f09.js +++ /dev/null @@ -1 +0,0 @@ -define(["exports","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Check-52a7d806","./FeatureDetection-cec0163f","./OrientedBoundingBox-d2eb0b92"],(function(e,n,o,t,i,r){"use strict";var u={},a=new o.o,c=new o.o,d=new o.o,s=new o.o,f=new r.y;function l(e,t,i,r,u){var c=o.o.subtract(e,t,a),d=o.o.dot(i,c),s=o.o.dot(r,c);return n.o.fromElements(d,s,u)}u.validOutline=function(e){t.o.defined("positions",e);var n=r.y.fromPoints(e,f).halfAxes,u=i.p$1.getColumn(n,0,c),a=i.p$1.getColumn(n,1,d),l=i.p$1.getColumn(n,2,s),m=o.o.magnitude(u),g=o.o.magnitude(a),p=o.o.magnitude(l);return!(0===m&&(0===g||0===p)||0===g&&0===p)},u.computeProjectTo2DArguments=function(e,n,u,a){t.o.defined("positions",e),t.o.defined("centerResult",n),t.o.defined("planeAxis1Result",u),t.o.defined("planeAxis2Result",a);var l,m,g=r.y.fromPoints(e,f),p=g.halfAxes,C=i.p$1.getColumn(p,0,c),b=i.p$1.getColumn(p,1,d),P=i.p$1.getColumn(p,2,s),h=o.o.magnitude(C),v=o.o.magnitude(b),w=o.o.magnitude(P),x=Math.min(h,v,w);return(0!==h||0!==v&&0!==w)&&(0!==v||0!==w)&&((x===v||x===w)&&(l=C),x===h?l=b:x===w&&(m=b),(x===h||x===v)&&(m=P),o.o.normalize(l,u),o.o.normalize(m,a),o.o.clone(g.center,n),!0)},u.createProjectPointsTo2DFunction=function(e,n,o){return function(t){for(var i=new Array(t.length),r=0;r<t.length;r++)i[r]=l(t[r],e,n,o);return i}},u.createProjectPointTo2DFunction=function(e,n,o){return function(t,i){return l(t,e,n,o,i)}},e.g=u})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/CorridorGeometryLibrary-2b5c693d.js b/SuperMap iEarth/public/SuperMap3D/Workers/CorridorGeometryLibrary-46cc5746.js similarity index 64% rename from SuperMap iEarth/public/SuperMap3D/Workers/CorridorGeometryLibrary-2b5c693d.js rename to SuperMap iEarth/public/SuperMap3D/Workers/CorridorGeometryLibrary-46cc5746.js index 9b4fcf8d..41478dc5 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/CorridorGeometryLibrary-2b5c693d.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/CorridorGeometryLibrary-46cc5746.js @@ -1 +1 @@ -define(["exports","./Cartesian3-3a8bdb0b","./PolylineVolumeGeometryLibrary-d96626d0","./when-92c6cf3c","./Math-ecf82623","./FeatureDetection-cec0163f","./PolylinePipeline-f0970409","./GeometryAttribute-f47bd1cb"],(function(o,e,r,a,n,t,i,l){"use strict";var s={},c=new e.o,u=new e.o,y=new e.o,d=new e.o,m=[new e.o,new e.o],p=new e.o,g=new e.o,f=new e.o,h=new e.o,w=new e.o,z=new e.o,S=new e.o,v=new e.o,x=new e.o,A=new e.o,b=new l.n,B=new t.p$1;function E(o,a,i,s,y){var d,m=e.o.angleBetween(e.o.subtract(a,o,c),e.o.subtract(i,o,u)),p=s===r.S.BEVELED?1:Math.ceil(m/n.e.toRadians(5))+1,g=3*p,f=new Array(g);f[g-3]=i.x,f[g-2]=i.y,f[g-1]=i.z,d=y?t.p$1.fromQuaternion(l.n.fromAxisAngle(e.o.negate(o,c),m/p,b),B):t.p$1.fromQuaternion(l.n.fromAxisAngle(o,m/p,b),B);var h=0;a=e.o.clone(a,c);for(var w=0;w<p;w++)a=t.p$1.multiplyByVector(d,a,a),f[h++]=a.x,f[h++]=a.y,f[h++]=a.z;return f}function D(o,r,a,n){var t=c;return n||(r=e.o.negate(r,r)),[(t=e.o.add(o,r,t)).x,t.y,t.z,a.x,a.y,a.z]}function P(o,r,a,n){for(var t=new Array(o.length),i=new Array(o.length),l=e.o.multiplyByScalar(r,a,c),s=e.o.negate(l,u),m=0,p=o.length-1,g=0;g<o.length;g+=3){var f=e.o.fromArray(o,g,y),h=e.o.add(f,s,d);t[m++]=h.x,t[m++]=h.y,t[m++]=h.z;var w=e.o.add(f,l,d);i[p--]=w.z,i[p--]=w.y,i[p--]=w.x}return n.push(t,i),n}s.addAttribute=function(o,e,r,n){var t=e.x,i=e.y,l=e.z;a.e(r)&&(o[r]=t,o[r+1]=i,o[r+2]=l),a.e(n)&&(o[n]=l,o[n-1]=i,o[n-2]=t)};var N=new e.o,O=new e.o;s.computePositions=function(o){var a=o.granularity,t=o.positions,l=o.ellipsoid,s=o.width/2,u=o.cornerType,y=o.saveAttributes,d=p,b=g,B=f,R=h,L=w,U=z,V=S,M=v,$=x,G=A,I=[],Q=y?[]:void 0,T=y?[]:void 0,q=t[0],C=t[1];b=e.o.normalize(e.o.subtract(C,q,b),b),d=l.geodeticSurfaceNormal(q,d),R=e.o.normalize(e.o.cross(d,b,R),R),y&&(Q.push(R.x,R.y,R.z),T.push(d.x,d.y,d.z)),V=e.o.clone(q,V),q=C,B=e.o.negate(b,B);var F,J,j=[],k=t.length;for(F=1;F<k-1;F++){d=l.geodeticSurfaceNormal(q,d),C=t[F+1],b=e.o.normalize(e.o.subtract(C,q,b),b),L=e.o.normalize(e.o.add(b,B,L),L);var H=e.o.multiplyByScalar(d,e.o.dot(b,d),N);e.o.subtract(b,H,H),e.o.normalize(H,H);var K=e.o.multiplyByScalar(d,e.o.dot(B,d),O);if(e.o.subtract(B,K,K),e.o.normalize(K,K),!n.e.equalsEpsilon(Math.abs(e.o.dot(H,K)),1,n.e.EPSILON7)){L=e.o.cross(L,d,L),L=e.o.cross(d,L,L),L=e.o.normalize(L,L);var W=s/Math.max(.25,e.o.magnitude(e.o.cross(L,B,c))),X=r.J.angleIsGreaterThanPi(b,B,q,l);L=e.o.multiplyByScalar(L,W,L),X?(M=e.o.add(q,L,M),G=e.o.add(M,e.o.multiplyByScalar(R,s,G),G),$=e.o.add(M,e.o.multiplyByScalar(R,2*s,$),$),m[0]=e.o.clone(V,m[0]),m[1]=e.o.clone(G,m[1]),I=P(i.m.generateArc({positions:m,granularity:a,ellipsoid:l}),R,s,I),y&&(Q.push(R.x,R.y,R.z),T.push(d.x,d.y,d.z)),U=e.o.clone($,U),R=e.o.normalize(e.o.cross(d,b,R),R),$=e.o.add(M,e.o.multiplyByScalar(R,2*s,$),$),V=e.o.add(M,e.o.multiplyByScalar(R,s,V),V),u===r.S.ROUNDED||u===r.S.BEVELED?j.push({leftPositions:E(M,U,$,u,X)}):j.push({leftPositions:D(q,e.o.negate(L,L),$,X)})):($=e.o.add(q,L,$),G=e.o.add($,e.o.negate(e.o.multiplyByScalar(R,s,G),G),G),M=e.o.add($,e.o.negate(e.o.multiplyByScalar(R,2*s,M),M),M),m[0]=e.o.clone(V,m[0]),m[1]=e.o.clone(G,m[1]),I=P(i.m.generateArc({positions:m,granularity:a,ellipsoid:l}),R,s,I),y&&(Q.push(R.x,R.y,R.z),T.push(d.x,d.y,d.z)),U=e.o.clone(M,U),R=e.o.normalize(e.o.cross(d,b,R),R),M=e.o.add($,e.o.negate(e.o.multiplyByScalar(R,2*s,M),M),M),V=e.o.add($,e.o.negate(e.o.multiplyByScalar(R,s,V),V),V),u===r.S.ROUNDED||u===r.S.BEVELED?j.push({rightPositions:E($,U,M,u,X)}):j.push({rightPositions:D(q,L,M,X)})),B=e.o.negate(b,B)}q=C}return d=l.geodeticSurfaceNormal(q,d),m[0]=e.o.clone(V,m[0]),m[1]=e.o.clone(q,m[1]),I=P(i.m.generateArc({positions:m,granularity:a,ellipsoid:l}),R,s,I),y&&(Q.push(R.x,R.y,R.z),T.push(d.x,d.y,d.z)),u===r.S.ROUNDED&&(J=function(o){var a=p,n=g,t=f,i=o[1];n=e.o.fromArray(o[1],i.length-3,n),t=e.o.fromArray(o[0],0,t);var l=E(a=e.o.midpoint(n,t,a),n,t,r.S.ROUNDED,!1),s=o.length-1,c=o[s-1];return i=o[s],n=e.o.fromArray(c,c.length-3,n),t=e.o.fromArray(i,0,t),[l,E(a=e.o.midpoint(n,t,a),n,t,r.S.ROUNDED,!1)]}(I)),{positions:I,corners:j,lefts:Q,normals:T,endPositions:J}},o.b=s})); +define(["exports","./Cartesian3-3a8bdb0b","./PolylineVolumeGeometryLibrary-3011fdb7","./when-92c6cf3c","./Math-ecf82623","./FeatureDetection-fd297af4","./PolylinePipeline-160fa1b0","./GeometryAttribute-65cf868d"],(function(o,e,a,r,n,t,i,l){"use strict";var s={},c=new e.o,u=new e.o,y=new e.o,d=new e.o,m=[new e.o,new e.o],p=new e.o,g=new e.o,f=new e.o,h=new e.o,w=new e.o,z=new e.o,S=new e.o,v=new e.o,x=new e.o,A=new e.o,b=new l.n,B=new t.p$1;function E(o,r,i,s,y){var d,m=e.o.angleBetween(e.o.subtract(r,o,c),e.o.subtract(i,o,u)),p=s===a.S.BEVELED?1:Math.ceil(m/n.e.toRadians(5))+1,g=3*p,f=new Array(g);f[g-3]=i.x,f[g-2]=i.y,f[g-1]=i.z,d=y?t.p$1.fromQuaternion(l.n.fromAxisAngle(e.o.negate(o,c),m/p,b),B):t.p$1.fromQuaternion(l.n.fromAxisAngle(o,m/p,b),B);var h=0;r=e.o.clone(r,c);for(var w=0;w<p;w++)r=t.p$1.multiplyByVector(d,r,r),f[h++]=r.x,f[h++]=r.y,f[h++]=r.z;return f}function D(o,a,r,n){var t=c;return n||(a=e.o.negate(a,a)),[(t=e.o.add(o,a,t)).x,t.y,t.z,r.x,r.y,r.z]}function P(o,a,r,n){for(var t=new Array(o.length),i=new Array(o.length),l=e.o.multiplyByScalar(a,r,c),s=e.o.negate(l,u),m=0,p=o.length-1,g=0;g<o.length;g+=3){var f=e.o.fromArray(o,g,y),h=e.o.add(f,s,d);t[m++]=h.x,t[m++]=h.y,t[m++]=h.z;var w=e.o.add(f,l,d);i[p--]=w.z,i[p--]=w.y,i[p--]=w.x}return n.push(t,i),n}s.addAttribute=function(o,e,a,n){var t=e.x,i=e.y,l=e.z;r.e(a)&&(o[a]=t,o[a+1]=i,o[a+2]=l),r.e(n)&&(o[n]=l,o[n-1]=i,o[n-2]=t)};var N=new e.o,O=new e.o;s.computePositions=function(o){var r=o.granularity,t=o.positions,l=o.ellipsoid,s=o.width/2,u=o.cornerType,y=o.saveAttributes,d=p,b=g,B=f,R=h,L=w,U=z,V=S,M=v,$=x,G=A,I=[],Q=y?[]:void 0,T=y?[]:void 0,q=t[0],C=t[1];b=e.o.normalize(e.o.subtract(C,q,b),b),d=l.geodeticSurfaceNormal(q,d),R=e.o.normalize(e.o.cross(d,b,R),R),y&&(Q.push(R.x,R.y,R.z),T.push(d.x,d.y,d.z)),V=e.o.clone(q,V),q=C,B=e.o.negate(b,B);var F,J,j=[],k=t.length;for(F=1;F<k-1;F++){d=l.geodeticSurfaceNormal(q,d),C=t[F+1],b=e.o.normalize(e.o.subtract(C,q,b),b),L=e.o.normalize(e.o.add(b,B,L),L);var H=e.o.multiplyByScalar(d,e.o.dot(b,d),N);e.o.subtract(b,H,H),e.o.normalize(H,H);var K=e.o.multiplyByScalar(d,e.o.dot(B,d),O);if(e.o.subtract(B,K,K),e.o.normalize(K,K),!n.e.equalsEpsilon(Math.abs(e.o.dot(H,K)),1,n.e.EPSILON7)){L=e.o.cross(L,d,L),L=e.o.cross(d,L,L),L=e.o.normalize(L,L);var W=s/Math.max(.25,e.o.magnitude(e.o.cross(L,B,c))),X=a.J.angleIsGreaterThanPi(b,B,q,l);L=e.o.multiplyByScalar(L,W,L),X?(M=e.o.add(q,L,M),G=e.o.add(M,e.o.multiplyByScalar(R,s,G),G),$=e.o.add(M,e.o.multiplyByScalar(R,2*s,$),$),m[0]=e.o.clone(V,m[0]),m[1]=e.o.clone(G,m[1]),I=P(i.m.generateArc({positions:m,granularity:r,ellipsoid:l}),R,s,I),y&&(Q.push(R.x,R.y,R.z),T.push(d.x,d.y,d.z)),U=e.o.clone($,U),R=e.o.normalize(e.o.cross(d,b,R),R),$=e.o.add(M,e.o.multiplyByScalar(R,2*s,$),$),V=e.o.add(M,e.o.multiplyByScalar(R,s,V),V),u===a.S.ROUNDED||u===a.S.BEVELED?j.push({leftPositions:E(M,U,$,u,X)}):j.push({leftPositions:D(q,e.o.negate(L,L),$,X)})):($=e.o.add(q,L,$),G=e.o.add($,e.o.negate(e.o.multiplyByScalar(R,s,G),G),G),M=e.o.add($,e.o.negate(e.o.multiplyByScalar(R,2*s,M),M),M),m[0]=e.o.clone(V,m[0]),m[1]=e.o.clone(G,m[1]),I=P(i.m.generateArc({positions:m,granularity:r,ellipsoid:l}),R,s,I),y&&(Q.push(R.x,R.y,R.z),T.push(d.x,d.y,d.z)),U=e.o.clone(M,U),R=e.o.normalize(e.o.cross(d,b,R),R),M=e.o.add($,e.o.negate(e.o.multiplyByScalar(R,2*s,M),M),M),V=e.o.add($,e.o.negate(e.o.multiplyByScalar(R,s,V),V),V),u===a.S.ROUNDED||u===a.S.BEVELED?j.push({rightPositions:E($,U,M,u,X)}):j.push({rightPositions:D(q,L,M,X)})),B=e.o.negate(b,B)}q=C}return d=l.geodeticSurfaceNormal(q,d),m[0]=e.o.clone(V,m[0]),m[1]=e.o.clone(q,m[1]),I=P(i.m.generateArc({positions:m,granularity:r,ellipsoid:l}),R,s,I),y&&(Q.push(R.x,R.y,R.z),T.push(d.x,d.y,d.z)),u===a.S.ROUNDED&&(J=function(o){var r=p,n=g,t=f,i=o[1];n=e.o.fromArray(o[1],i.length-3,n),t=e.o.fromArray(o[0],0,t);var l=E(r=e.o.midpoint(n,t,r),n,t,a.S.ROUNDED,!1),s=o.length-1,c=o[s-1];return i=o[s],n=e.o.fromArray(c,c.length-3,n),t=e.o.fromArray(i,0,t),[l,E(r=e.o.midpoint(n,t,r),n,t,a.S.ROUNDED,!1)]}(I)),{positions:I,corners:j,lefts:Q,normals:T,endPositions:J}},o.b=s})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/CylinderGeometry-c486a245.js b/SuperMap iEarth/public/SuperMap3D/Workers/CylinderGeometry-9e5c168d.js similarity index 93% rename from SuperMap iEarth/public/SuperMap3D/Workers/CylinderGeometry-c486a245.js rename to SuperMap iEarth/public/SuperMap3D/Workers/CylinderGeometry-9e5c168d.js index 019f69ff..9b9d3c4a 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/CylinderGeometry-c486a245.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/CylinderGeometry-9e5c168d.js @@ -1 +1 @@ -define(["exports","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./CylinderGeometryLibrary-60eef4da","./when-92c6cf3c","./Check-52a7d806","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-cec0163f","./VertexFormat-f496a3f1"],(function(t,e,o,n,a,r,i,s,u,f,p,m,d,c,b,l){"use strict";var y=new n.o,v=new a.o,h=new a.o,w=new a.o,A=new a.o;function g(t){var e=(t=s.u(t,s.u.EMPTY_OBJECT)).length,o=t.topRadius,n=t.bottomRadius,a=s.u(t.vertexFormat,l.n.DEFAULT),r=s.u(t.slices,128);if(!s.e(e))throw new u.t("options.length must be defined.");if(!s.e(o))throw new u.t("options.topRadius must be defined.");if(!s.e(n))throw new u.t("options.bottomRadius must be defined.");if(r<3)throw new u.t("options.slices must be greater than or equal to 3.");if(s.e(t.offsetAttribute)&&t.offsetAttribute===m.z.TOP)throw new u.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=o,this._bottomRadius=n,this._vertexFormat=l.n.clone(a),this._slices=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}g.packedLength=l.n.packedLength+5,g.pack=function(t,e,o){if(!s.e(t))throw new u.t("value is required");if(!s.e(e))throw new u.t("array is required");return o=s.u(o,0),l.n.pack(t._vertexFormat,e,o),o+=l.n.packedLength,e[o++]=t._length,e[o++]=t._topRadius,e[o++]=t._bottomRadius,e[o++]=t._slices,e[o]=s.u(t._offsetAttribute,-1),e};var _,x=new l.n,F={vertexFormat:x,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};g.unpack=function(t,e,o){if(!s.e(t))throw new u.t("array is required");e=s.u(e,0);var n=l.n.unpack(t,e,x);e+=l.n.packedLength;var a=t[e++],r=t[e++],i=t[e++],f=t[e++],p=t[e];return s.e(o)?(o._vertexFormat=l.n.clone(n,o._vertexFormat),o._length=a,o._topRadius=r,o._bottomRadius=i,o._slices=f,o._offsetAttribute=-1===p?void 0:p,o):(F.length=a,F.topRadius=r,F.bottomRadius=i,F.slices=f,F.offsetAttribute=-1===p?void 0:p,new g(F))},g.createGeometry=function(t){var u=t._length,l=t._topRadius,g=t._bottomRadius,_=t._vertexFormat,x=t._slices;if(!(u<=0||l<0||g<0||0===l&&0===g)){var F,R=x+x,D=x+R,O=R+R,T=i.I.computePositions(u,l,g,x,!0),C=_.st?new Float32Array(2*O):void 0,L=_.normal?new Float32Array(3*O):void 0,P=_.tangent?new Float32Array(3*O):void 0,z=_.bitangent?new Float32Array(3*O):void 0,k=_.normal||_.tangent||_.bitangent;if(k){var G=_.tangent||_.bitangent,I=0,M=0,E=0,N=Math.atan2(g-l,u),U=v;U.z=Math.sin(N);var q=Math.cos(N),S=w,B=h;for(F=0;F<x;F++){var Y=F/x*c.e.TWO_PI,Z=q*Math.cos(Y),J=q*Math.sin(Y);k&&(U.x=Z,U.y=J,G&&(S=a.o.normalize(a.o.cross(a.o.UNIT_Z,U,S),S)),_.normal&&(L[I++]=U.x,L[I++]=U.y,L[I++]=U.z,L[I++]=U.x,L[I++]=U.y,L[I++]=U.z),_.tangent&&(P[M++]=S.x,P[M++]=S.y,P[M++]=S.z,P[M++]=S.x,P[M++]=S.y,P[M++]=S.z),_.bitangent&&(B=a.o.normalize(a.o.cross(U,S,B),B),z[E++]=B.x,z[E++]=B.y,z[E++]=B.z,z[E++]=B.x,z[E++]=B.y,z[E++]=B.z))}for(F=0;F<x;F++)_.normal&&(L[I++]=0,L[I++]=0,L[I++]=-1),_.tangent&&(P[M++]=1,P[M++]=0,P[M++]=0),_.bitangent&&(z[E++]=0,z[E++]=-1,z[E++]=0);for(F=0;F<x;F++)_.normal&&(L[I++]=0,L[I++]=0,L[I++]=1),_.tangent&&(P[M++]=1,P[M++]=0,P[M++]=0),_.bitangent&&(z[E++]=0,z[E++]=1,z[E++]=0)}var V=12*x-12,W=d.IndexDatatype.createTypedArray(O,V),j=0,H=0;for(F=0;F<x-1;F++)W[j++]=H,W[j++]=H+2,W[j++]=H+3,W[j++]=H,W[j++]=H+3,W[j++]=H+1,H+=2;for(W[j++]=R-2,W[j++]=0,W[j++]=1,W[j++]=R-2,W[j++]=1,W[j++]=R-1,F=1;F<x-1;F++)W[j++]=R+F+1,W[j++]=R+F,W[j++]=R;for(F=1;F<x-1;F++)W[j++]=D,W[j++]=D+F,W[j++]=D+F+1;var K=0;if(_.st){var Q=Math.max(l,g);for(F=0;F<O;F++){var X=a.o.fromArray(T,3*F,A);C[K++]=(X.x+Q)/(2*Q),C[K++]=(X.y+Q)/(2*Q)}}var $=new p.a;_.position&&($.position=new f.o({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:T})),_.normal&&($.normal=new f.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),_.tangent&&($.tangent=new f.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:P})),_.bitangent&&($.bitangent=new f.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z})),_.st&&($.st=new f.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:C})),y.x=.5*u,y.y=Math.max(g,l);var tt=new o.i(a.o.ZERO,n.o.magnitude(y));if(s.e(t._offsetAttribute)){u=T.length;var et=new Uint8Array(u/3),ot=t._offsetAttribute===m.z.NONE?0:1;e.d(et,ot),$.applyOffset=new f.o({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:et})}return new f.I({attributes:$,indices:W,primitiveType:b._0x4b6a27.TRIANGLES,boundingSphere:tt,offsetAttribute:t._offsetAttribute})}},g.getUnitCylinder=function(){return s.e(_)||(_=g.createGeometry(new g({topRadius:1,bottomRadius:1,length:1,vertexFormat:l.n.POSITION_ONLY}))),_},t.l=g})); +define(["exports","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./CylinderGeometryLibrary-60eef4da","./when-92c6cf3c","./Check-52a7d806","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-fd297af4","./VertexFormat-f496a3f1"],(function(t,e,o,n,a,r,i,s,u,f,p,m,d,c,b,l){"use strict";var y=new n.o,v=new a.o,h=new a.o,w=new a.o,A=new a.o;function g(t){var e=(t=s.u(t,s.u.EMPTY_OBJECT)).length,o=t.topRadius,n=t.bottomRadius,a=s.u(t.vertexFormat,l.n.DEFAULT),r=s.u(t.slices,128);if(!s.e(e))throw new u.t("options.length must be defined.");if(!s.e(o))throw new u.t("options.topRadius must be defined.");if(!s.e(n))throw new u.t("options.bottomRadius must be defined.");if(r<3)throw new u.t("options.slices must be greater than or equal to 3.");if(s.e(t.offsetAttribute)&&t.offsetAttribute===m.z.TOP)throw new u.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=o,this._bottomRadius=n,this._vertexFormat=l.n.clone(a),this._slices=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}g.packedLength=l.n.packedLength+5,g.pack=function(t,e,o){if(!s.e(t))throw new u.t("value is required");if(!s.e(e))throw new u.t("array is required");return o=s.u(o,0),l.n.pack(t._vertexFormat,e,o),o+=l.n.packedLength,e[o++]=t._length,e[o++]=t._topRadius,e[o++]=t._bottomRadius,e[o++]=t._slices,e[o]=s.u(t._offsetAttribute,-1),e};var _,x=new l.n,F={vertexFormat:x,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};g.unpack=function(t,e,o){if(!s.e(t))throw new u.t("array is required");e=s.u(e,0);var n=l.n.unpack(t,e,x);e+=l.n.packedLength;var a=t[e++],r=t[e++],i=t[e++],f=t[e++],p=t[e];return s.e(o)?(o._vertexFormat=l.n.clone(n,o._vertexFormat),o._length=a,o._topRadius=r,o._bottomRadius=i,o._slices=f,o._offsetAttribute=-1===p?void 0:p,o):(F.length=a,F.topRadius=r,F.bottomRadius=i,F.slices=f,F.offsetAttribute=-1===p?void 0:p,new g(F))},g.createGeometry=function(t){var u=t._length,l=t._topRadius,g=t._bottomRadius,_=t._vertexFormat,x=t._slices;if(!(u<=0||l<0||g<0||0===l&&0===g)){var F,R=x+x,D=x+R,O=R+R,T=i.I.computePositions(u,l,g,x,!0),C=_.st?new Float32Array(2*O):void 0,L=_.normal?new Float32Array(3*O):void 0,P=_.tangent?new Float32Array(3*O):void 0,z=_.bitangent?new Float32Array(3*O):void 0,k=_.normal||_.tangent||_.bitangent;if(k){var G=_.tangent||_.bitangent,I=0,M=0,E=0,N=Math.atan2(g-l,u),U=v;U.z=Math.sin(N);var q=Math.cos(N),S=w,B=h;for(F=0;F<x;F++){var Y=F/x*c.e.TWO_PI,Z=q*Math.cos(Y),J=q*Math.sin(Y);k&&(U.x=Z,U.y=J,G&&(S=a.o.normalize(a.o.cross(a.o.UNIT_Z,U,S),S)),_.normal&&(L[I++]=U.x,L[I++]=U.y,L[I++]=U.z,L[I++]=U.x,L[I++]=U.y,L[I++]=U.z),_.tangent&&(P[M++]=S.x,P[M++]=S.y,P[M++]=S.z,P[M++]=S.x,P[M++]=S.y,P[M++]=S.z),_.bitangent&&(B=a.o.normalize(a.o.cross(U,S,B),B),z[E++]=B.x,z[E++]=B.y,z[E++]=B.z,z[E++]=B.x,z[E++]=B.y,z[E++]=B.z))}for(F=0;F<x;F++)_.normal&&(L[I++]=0,L[I++]=0,L[I++]=-1),_.tangent&&(P[M++]=1,P[M++]=0,P[M++]=0),_.bitangent&&(z[E++]=0,z[E++]=-1,z[E++]=0);for(F=0;F<x;F++)_.normal&&(L[I++]=0,L[I++]=0,L[I++]=1),_.tangent&&(P[M++]=1,P[M++]=0,P[M++]=0),_.bitangent&&(z[E++]=0,z[E++]=1,z[E++]=0)}var V=12*x-12,W=d.IndexDatatype.createTypedArray(O,V),j=0,H=0;for(F=0;F<x-1;F++)W[j++]=H,W[j++]=H+2,W[j++]=H+3,W[j++]=H,W[j++]=H+3,W[j++]=H+1,H+=2;for(W[j++]=R-2,W[j++]=0,W[j++]=1,W[j++]=R-2,W[j++]=1,W[j++]=R-1,F=1;F<x-1;F++)W[j++]=R+F+1,W[j++]=R+F,W[j++]=R;for(F=1;F<x-1;F++)W[j++]=D,W[j++]=D+F,W[j++]=D+F+1;var K=0;if(_.st){var Q=Math.max(l,g);for(F=0;F<O;F++){var X=a.o.fromArray(T,3*F,A);C[K++]=(X.x+Q)/(2*Q),C[K++]=(X.y+Q)/(2*Q)}}var $=new p.a;_.position&&($.position=new f.o({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:T})),_.normal&&($.normal=new f.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),_.tangent&&($.tangent=new f.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:P})),_.bitangent&&($.bitangent=new f.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z})),_.st&&($.st=new f.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:C})),y.x=.5*u,y.y=Math.max(g,l);var tt=new o.i(a.o.ZERO,n.o.magnitude(y));if(s.e(t._offsetAttribute)){u=T.length;var et=new Uint8Array(u/3),ot=t._offsetAttribute===m.z.NONE?0:1;e.d(et,ot),$.applyOffset=new f.o({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:et})}return new f.I({attributes:$,indices:W,primitiveType:b._0x3b3836.TRIANGLES,boundingSphere:tt,offsetAttribute:t._offsetAttribute})}},g.getUnitCylinder=function(){return s.e(_)||(_=g.createGeometry(new g({topRadius:1,bottomRadius:1,length:1,vertexFormat:l.n.POSITION_ONLY}))),_},t.l=g})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/EllipseGeometry-d4f5e042.js b/SuperMap iEarth/public/SuperMap3D/Workers/EllipseGeometry-4cb468e4.js similarity index 85% rename from SuperMap iEarth/public/SuperMap3D/Workers/EllipseGeometry-d4f5e042.js rename to SuperMap iEarth/public/SuperMap3D/Workers/EllipseGeometry-4cb468e4.js index ac4d2c1d..05517077 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/EllipseGeometry-d4f5e042.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/EllipseGeometry-4cb468e4.js @@ -1 +1 @@ -define(["exports","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./ComponentDatatype-98414d16","./when-92c6cf3c","./EllipseGeometryLibrary-30d7e702","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryInstance-3190c1b4","./GeometryOffsetAttribute-b4d599f5","./GeometryPipeline-7ffd3f60","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-cec0163f","./VertexFormat-f496a3f1"],(function(t,e,o,r,n,i,a,s,u,m,l,c,p,y,d,f,h,A,x){"use strict";var g=new n.o,_=new n.o,v=new n.o,b=new n.o,w=new r.o,I=new A.p$1,T=new A.p$1,N=new l.n,M=new n.o,E=new n.o,P=new n.o,D=new i.a,F=new n.o,O=new r.o,S=new r.o;function C(t,i,a){var p=i.vertexFormat,d=i.center,f=i.semiMajorAxis,h=i.semiMinorAxis,x=i.ellipsoid,b=i.stRotation,C=a?t.length/3*2:t.length/3,L=i.shadowVolume,R=p.st?new Float32Array(2*C):void 0,j=p.normal?new Float32Array(3*C):void 0,z=p.tangent?new Float32Array(3*C):void 0,G=p.bitangent?new Float32Array(3*C):void 0,V=L?new Float32Array(3*C):void 0,k=0,Y=M,B=E,H=P,$=new o.n(x),U=$.project(x.cartesianToCartographic(d,D),F),W=x.scaleToGeodeticSurface(d,g);x.geodeticSurfaceNormal(W,W);var q=I,Q=T;if(0!==b){var J=l.n.fromAxisAngle(W,b,N);q=A.p$1.fromQuaternion(J,q),J=l.n.fromAxisAngle(W,-b,N),Q=A.p$1.fromQuaternion(J,Q)}else q=A.p$1.clone(A.p$1.IDENTITY,q),Q=A.p$1.clone(A.p$1.IDENTITY,Q);for(var Z=r.o.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,O),K=r.o.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,S),X=t.length,tt=a?X:0,et=tt/3*2,ot=0;ot<X;ot+=3){var rt=ot+1,nt=ot+2,it=n.o.fromArray(t,ot,g);if(p.st){var at=A.p$1.multiplyByVector(q,it,_),st=$.project(x.cartesianToCartographic(at,D),v);n.o.subtract(st,U,st),w.x=(st.x+f)/(2*f),w.y=(st.y+h)/(2*h),Z.x=Math.min(w.x,Z.x),Z.y=Math.min(w.y,Z.y),K.x=Math.max(w.x,K.x),K.y=Math.max(w.y,K.y),a&&(R[k+et]=w.x,R[k+1+et]=w.y),R[k++]=w.x,R[k++]=w.y}(p.normal||p.tangent||p.bitangent||L)&&(Y=x.geodeticSurfaceNormal(it,Y),L&&(V[ot+tt]=-Y.x,V[rt+tt]=-Y.y,V[nt+tt]=-Y.z),(p.normal||p.tangent||p.bitangent)&&((p.tangent||p.bitangent)&&(B=n.o.normalize(n.o.cross(n.o.UNIT_Z,Y,B),B),A.p$1.multiplyByVector(Q,B,B)),p.normal&&(j[ot]=Y.x,j[rt]=Y.y,j[nt]=Y.z,a&&(j[ot+tt]=-Y.x,j[rt+tt]=-Y.y,j[nt+tt]=-Y.z)),p.tangent&&(z[ot]=B.x,z[rt]=B.y,z[nt]=B.z,a&&(z[ot+tt]=-B.x,z[rt+tt]=-B.y,z[nt+tt]=-B.z)),p.bitangent&&(H=n.o.normalize(n.o.cross(Y,B,H),H),G[ot]=H.x,G[rt]=H.y,G[nt]=H.z,a&&(G[ot+tt]=H.x,G[rt+tt]=H.y,G[nt+tt]=H.z))))}if(p.st){X=R.length;for(var ut=0;ut<X;ut+=2)R[ut]=(R[ut]-Z.x)/(K.x-Z.x),R[ut+1]=(R[ut+1]-Z.y)/(K.y-Z.y)}var mt=new c.a;if(p.position){var lt=m.C.raisePositionsToHeight(t,i,a);mt.position=new l.o({componentDatatype:s.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:lt})}if(p.st&&(mt.st=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:R})),p.normal&&(mt.normal=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:j})),p.tangent&&(mt.tangent=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z})),p.bitangent&&(mt.bitangent=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),L&&(mt.extrudeDirection=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:V})),a&&u.e(i.offsetAttribute)){var ct=new Uint8Array(C);if(i.offsetAttribute===y.z.TOP)ct=e.d(ct,1,0,C/2);else{var pt=i.offsetAttribute===y.z.NONE?0:1;ct=e.d(ct,pt)}mt.applyOffset=new l.o({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:ct})}return mt}function L(t){var e,o,r,n,i,a=new Array(t*(t+1)*12-6),s=0;for(e=0,r=1,n=0;n<3;n++)a[s++]=r++,a[s++]=e,a[s++]=r;for(n=2;n<t+1;++n){for(r=n*(n+1)-1,e=(n-1)*n-1,a[s++]=r++,a[s++]=e,a[s++]=r,o=2*n,i=0;i<o-1;++i)a[s++]=r,a[s++]=e++,a[s++]=e,a[s++]=r++,a[s++]=e,a[s++]=r;a[s++]=r++,a[s++]=e,a[s++]=r}for(o=2*t,++r,++e,n=0;n<o-1;++n)a[s++]=r,a[s++]=e++,a[s++]=e,a[s++]=r++,a[s++]=e,a[s++]=r;for(a[s++]=r,a[s++]=e++,a[s++]=e,a[s++]=r++,a[s++]=e++,a[s++]=e,++e,n=t-1;n>1;--n){for(a[s++]=e++,a[s++]=e,a[s++]=r,o=2*n,i=0;i<o-1;++i)a[s++]=r,a[s++]=e++,a[s++]=e,a[s++]=r++,a[s++]=e,a[s++]=r;a[s++]=e++,a[s++]=e++,a[s++]=r++}for(n=0;n<3;n++)a[s++]=e++,a[s++]=e,a[s++]=r;return a}var R=new n.o;var j=new o.i,z=new o.i;function G(t){var i=t.center,a=t.ellipsoid,h=t.semiMajorAxis,x=n.o.multiplyByScalar(a.geodeticSurfaceNormal(i,g),t.height,g);j.center=n.o.add(i,x,j.center),j.radius=h,x=n.o.multiplyByScalar(a.geodeticSurfaceNormal(i,x),t.extrudedHeight,x),z.center=n.o.add(i,x,z.center),z.radius=h;var T=m.C.computeEllipsePositions(t,!0,!0),R=T.positions,G=T.numPts,V=T.outerPositions,k=o.i.union(j,z),Y=C(R,t,!0),B=L(G),H=B.length;B.length=2*H;for(var $=R.length/3,U=0;U<H;U+=3)B[U+H]=B[U+2]+$,B[U+1+H]=B[U+1]+$,B[U+2+H]=B[U]+$;var W=f.IndexDatatype.createTypedArray(2*$/3,B),q=new l.I({attributes:Y,indices:W,primitiveType:A._0x4b6a27.TRIANGLES}),Q=function(t,i){var a=i.vertexFormat,m=i.center,p=i.semiMajorAxis,d=i.semiMinorAxis,f=i.ellipsoid,h=i.height,x=i.extrudedHeight,T=i.stRotation,C=t.length/3*2,L=new Float64Array(3*C),R=a.st?new Float32Array(2*C):void 0,j=a.normal?new Float32Array(3*C):void 0,z=a.tangent?new Float32Array(3*C):void 0,G=a.bitangent?new Float32Array(3*C):void 0,V=i.shadowVolume,k=V?new Float32Array(3*C):void 0,Y=0,B=M,H=E,$=P,U=new o.n(f),W=U.project(f.cartesianToCartographic(m,D),F),q=f.scaleToGeodeticSurface(m,g);f.geodeticSurfaceNormal(q,q);for(var Q=l.n.fromAxisAngle(q,T,N),J=A.p$1.fromQuaternion(Q,I),Z=r.o.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,O),K=r.o.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,S),X=t.length,tt=X/3*2,et=0;et<X;et+=3){var ot,rt=et+1,nt=et+2,it=n.o.fromArray(t,et,g);if(a.st){var at=A.p$1.multiplyByVector(J,it,_),st=U.project(f.cartesianToCartographic(at,D),v);n.o.subtract(st,W,st),w.x=(st.x+p)/(2*p),w.y=(st.y+d)/(2*d),Z.x=Math.min(w.x,Z.x),Z.y=Math.min(w.y,Z.y),K.x=Math.max(w.x,K.x),K.y=Math.max(w.y,K.y),R[Y+tt]=w.x,R[Y+1+tt]=w.y,R[Y++]=w.x,R[Y++]=w.y}it=f.scaleToGeodeticSurface(it,it),ot=n.o.clone(it,_),B=f.geodeticSurfaceNormal(it,B),V&&(k[et+X]=-B.x,k[rt+X]=-B.y,k[nt+X]=-B.z);var ut=n.o.multiplyByScalar(B,h,b);if(it=n.o.add(it,ut,it),ut=n.o.multiplyByScalar(B,x,ut),ot=n.o.add(ot,ut,ot),a.position&&(L[et+X]=ot.x,L[rt+X]=ot.y,L[nt+X]=ot.z,L[et]=it.x,L[rt]=it.y,L[nt]=it.z),a.normal||a.tangent||a.bitangent){$=n.o.clone(B,$);var mt=n.o.fromArray(t,(et+3)%X,b);n.o.subtract(mt,it,mt);var lt=n.o.subtract(ot,it,v);B=n.o.normalize(n.o.cross(lt,mt,B),B),a.normal&&(j[et]=B.x,j[rt]=B.y,j[nt]=B.z,j[et+X]=B.x,j[rt+X]=B.y,j[nt+X]=B.z),a.tangent&&(H=n.o.normalize(n.o.cross($,B,H),H),z[et]=H.x,z[rt]=H.y,z[nt]=H.z,z[et+X]=H.x,z[et+1+X]=H.y,z[et+2+X]=H.z),a.bitangent&&(G[et]=$.x,G[rt]=$.y,G[nt]=$.z,G[et+X]=$.x,G[rt+X]=$.y,G[nt+X]=$.z)}}if(a.st){X=R.length;for(var ct=0;ct<X;ct+=2)R[ct]=(R[ct]-Z.x)/(K.x-Z.x),R[ct+1]=(R[ct+1]-Z.y)/(K.y-Z.y)}var pt=new c.a;if(a.position&&(pt.position=new l.o({componentDatatype:s.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:L})),a.st&&(pt.st=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:R})),a.normal&&(pt.normal=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:j})),a.tangent&&(pt.tangent=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z})),a.bitangent&&(pt.bitangent=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),V&&(pt.extrudeDirection=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:k})),u.e(i.offsetAttribute)){var yt=new Uint8Array(C);if(i.offsetAttribute===y.z.TOP)yt=e.d(yt,1,0,C/2);else{var dt=i.offsetAttribute===y.z.NONE?0:1;yt=e.d(yt,dt)}pt.applyOffset=new l.o({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:yt})}return pt}(V,t);B=function(t){for(var e=t.length/3,o=f.IndexDatatype.createTypedArray(e,6*e),r=0,n=0;n<e;n++){var i=n,a=n+e,s=(i+1)%e,u=s+e;o[r++]=i,o[r++]=a,o[r++]=s,o[r++]=s,o[r++]=a,o[r++]=u}return o}(V);var J=f.IndexDatatype.createTypedArray(2*V.length/3,B),Z=new l.I({attributes:Q,indices:J,primitiveType:A._0x4b6a27.TRIANGLES}),K=d.k.combineInstances([new p.d({geometry:q}),new p.d({geometry:Z})]);return{boundingSphere:k,attributes:K[0].attributes,indices:K[0].indices}}function V(t,e,o,i,a,s,u){for(var l=m.C.computeEllipsePositions({center:t,semiMajorAxis:e,semiMinorAxis:o,rotation:i,granularity:a},!1,!0).outerPositions,c=l.length/3,p=new Array(c),y=0;y<c;++y)p[y]=n.o.fromArray(l,3*y);var d=r.h.fromCartesianArray(p,s,u);return d.width>h.e.PI&&(d.north=d.north>0?h.e.PI_OVER_TWO-h.e.EPSILON7:d.north,d.south=d.south<0?h.e.EPSILON7-h.e.PI_OVER_TWO:d.south,d.east=h.e.PI,d.west=-h.e.PI),d}function k(t){var e=(t=u.u(t,u.u.EMPTY_OBJECT)).center,o=u.u(t.ellipsoid,r.t.WGS84),i=t.semiMajorAxis,s=t.semiMinorAxis,m=u.u(t.granularity,h.e.RADIANS_PER_DEGREE),l=u.u(t.vertexFormat,x.n.DEFAULT);if(a.o.defined("options.center",e),a.o.typeOf.number("options.semiMajorAxis",i),a.o.typeOf.number("options.semiMinorAxis",s),i<s)throw new a.t("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(m<=0)throw new a.t("granularity must be greater than zero.");var c=u.u(t.height,0),p=u.u(t.extrudedHeight,c);this._center=n.o.clone(e),this._semiMajorAxis=i,this._semiMinorAxis=s,this._ellipsoid=r.t.clone(o),this._rotation=u.u(t.rotation,0),this._stRotation=u.u(t.stRotation,0),this._height=Math.max(p,c),this._granularity=m,this._vertexFormat=x.n.clone(l),this._extrudedHeight=Math.min(p,c),this._shadowVolume=u.u(t.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}k.packedLength=n.o.packedLength+r.t.packedLength+x.n.packedLength+9,k.pack=function(t,e,o){return a.o.defined("value",t),a.o.defined("array",e),o=u.u(o,0),n.o.pack(t._center,e,o),o+=n.o.packedLength,r.t.pack(t._ellipsoid,e,o),o+=r.t.packedLength,x.n.pack(t._vertexFormat,e,o),o+=x.n.packedLength,e[o++]=t._semiMajorAxis,e[o++]=t._semiMinorAxis,e[o++]=t._rotation,e[o++]=t._stRotation,e[o++]=t._height,e[o++]=t._granularity,e[o++]=t._extrudedHeight,e[o++]=t._shadowVolume?1:0,e[o]=u.u(t._offsetAttribute,-1),e};var Y=new n.o,B=new r.t,H=new x.n,$={center:Y,ellipsoid:B,vertexFormat:H,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};k.unpack=function(t,e,o){a.o.defined("array",t),e=u.u(e,0);var i=n.o.unpack(t,e,Y);e+=n.o.packedLength;var s=r.t.unpack(t,e,B);e+=r.t.packedLength;var m=x.n.unpack(t,e,H);e+=x.n.packedLength;var l=t[e++],c=t[e++],p=t[e++],y=t[e++],d=t[e++],f=t[e++],h=t[e++],A=1===t[e++],g=t[e];return u.e(o)?(o._center=n.o.clone(i,o._center),o._ellipsoid=r.t.clone(s,o._ellipsoid),o._vertexFormat=x.n.clone(m,o._vertexFormat),o._semiMajorAxis=l,o._semiMinorAxis=c,o._rotation=p,o._stRotation=y,o._height=d,o._granularity=f,o._extrudedHeight=h,o._shadowVolume=A,o._offsetAttribute=-1===g?void 0:g,o):($.height=d,$.extrudedHeight=h,$.granularity=f,$.stRotation=y,$.rotation=p,$.semiMajorAxis=l,$.semiMinorAxis=c,$.shadowVolume=A,$.offsetAttribute=-1===g?void 0:g,new k($))},k.computeRectangle=function(t,e){var o=(t=u.u(t,u.u.EMPTY_OBJECT)).center,n=u.u(t.ellipsoid,r.t.WGS84),i=t.semiMajorAxis,s=t.semiMinorAxis,m=u.u(t.granularity,h.e.RADIANS_PER_DEGREE),l=u.u(t.rotation,0);if(a.o.defined("options.center",o),a.o.typeOf.number("options.semiMajorAxis",i),a.o.typeOf.number("options.semiMinorAxis",s),i<s)throw new a.t("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(m<=0)throw new a.t("granularity must be greater than zero.");return V(o,i,s,l,m,n,e)},k.createGeometry=function(t){if(!(t._semiMajorAxis<=0||t._semiMinorAxis<=0)){var r=t._height,i=t._extrudedHeight,a=!h.e.equalsEpsilon(r,i,0,h.e.EPSILON2);t._center=t._ellipsoid.scaleToGeodeticSurface(t._center,t._center);var c,p={center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:t._ellipsoid,rotation:t._rotation,height:r,granularity:t._granularity,vertexFormat:t._vertexFormat,stRotation:t._stRotation};if(a)p.extrudedHeight=i,p.shadowVolume=t._shadowVolume,p.offsetAttribute=t._offsetAttribute,c=G(p);else if(c=function(t){var e=t.center;R=n.o.multiplyByScalar(t.ellipsoid.geodeticSurfaceNormal(e,R),t.height,R),R=n.o.add(e,R,R);var r=new o.i(R,t.semiMajorAxis),i=m.C.computeEllipsePositions(t,!0,!1),a=i.positions,s=i.numPts,u=C(a,t,!1),l=L(s);return{boundingSphere:r,attributes:u,indices:l=f.IndexDatatype.createTypedArray(a.length/3,l)}}(p),u.e(t._offsetAttribute)){var d=c.attributes.position.values.length,x=new Uint8Array(d/3),g=t._offsetAttribute===y.z.NONE?0:1;e.d(x,g),c.attributes.applyOffset=new l.o({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}return new l.I({attributes:c.attributes,indices:c.indices,primitiveType:A._0x4b6a27.TRIANGLES,boundingSphere:c.boundingSphere,offsetAttribute:t._offsetAttribute})}},k.createShadowVolume=function(t,e,o){var r=t._granularity,n=t._ellipsoid,i=e(r,n),a=o(r,n);return new k({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:n,rotation:t._rotation,stRotation:t._stRotation,granularity:r,extrudedHeight:i,height:a,vertexFormat:x.n.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(k.prototype,{rectangle:{get:function(){return u.e(this._rectangle)||(this._rectangle=V(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return u.e(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){var e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];for(var o=m.C.computeEllipsePositions({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,rotation:t._rotation,granularity:t._granularity},!1,!0).outerPositions,r=o.length/3,i=new Array(r),a=0;a<r;++a)i[a]=n.o.fromArray(o,3*a);var s=t._ellipsoid,u=t.rectangle;return l.I._textureCoordinateRotationPoints(i,e,s,u)}(this)),this._textureCoordinateRotationPoints}}}),t.Y=k})); +define(["exports","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./ComponentDatatype-98414d16","./when-92c6cf3c","./EllipseGeometryLibrary-5f302d9d","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryInstance-20be787d","./GeometryOffsetAttribute-b4d599f5","./GeometryPipeline-50805727","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-fd297af4","./VertexFormat-f496a3f1"],(function(t,e,o,r,n,i,a,s,u,m,l,c,p,d,y,f,h,A,x){"use strict";var g=new n.o,_=new n.o,v=new n.o,b=new n.o,w=new r.o,I=new A.p$1,T=new A.p$1,N=new l.n,M=new n.o,E=new n.o,P=new n.o,D=new i.a,F=new n.o,O=new r.o,S=new r.o;function C(t,i,a){var p=i.vertexFormat,y=i.center,f=i.semiMajorAxis,h=i.semiMinorAxis,x=i.ellipsoid,b=i.stRotation,C=a?t.length/3*2:t.length/3,L=i.shadowVolume,R=p.st?new Float32Array(2*C):void 0,j=p.normal?new Float32Array(3*C):void 0,z=p.tangent?new Float32Array(3*C):void 0,G=p.bitangent?new Float32Array(3*C):void 0,V=L?new Float32Array(3*C):void 0,k=0,Y=M,B=E,H=P,$=new o.n(x),U=$.project(x.cartesianToCartographic(y,D),F),W=x.scaleToGeodeticSurface(y,g);x.geodeticSurfaceNormal(W,W);var q=I,Q=T;if(0!==b){var J=l.n.fromAxisAngle(W,b,N);q=A.p$1.fromQuaternion(J,q),J=l.n.fromAxisAngle(W,-b,N),Q=A.p$1.fromQuaternion(J,Q)}else q=A.p$1.clone(A.p$1.IDENTITY,q),Q=A.p$1.clone(A.p$1.IDENTITY,Q);for(var Z=r.o.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,O),K=r.o.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,S),X=t.length,tt=a?X:0,et=tt/3*2,ot=0;ot<X;ot+=3){var rt=ot+1,nt=ot+2,it=n.o.fromArray(t,ot,g);if(p.st){var at=A.p$1.multiplyByVector(q,it,_),st=$.project(x.cartesianToCartographic(at,D),v);n.o.subtract(st,U,st),w.x=(st.x+f)/(2*f),w.y=(st.y+h)/(2*h),Z.x=Math.min(w.x,Z.x),Z.y=Math.min(w.y,Z.y),K.x=Math.max(w.x,K.x),K.y=Math.max(w.y,K.y),a&&(R[k+et]=w.x,R[k+1+et]=w.y),R[k++]=w.x,R[k++]=w.y}(p.normal||p.tangent||p.bitangent||L)&&(Y=x.geodeticSurfaceNormal(it,Y),L&&(V[ot+tt]=-Y.x,V[rt+tt]=-Y.y,V[nt+tt]=-Y.z),(p.normal||p.tangent||p.bitangent)&&((p.tangent||p.bitangent)&&(B=n.o.normalize(n.o.cross(n.o.UNIT_Z,Y,B),B),A.p$1.multiplyByVector(Q,B,B)),p.normal&&(j[ot]=Y.x,j[rt]=Y.y,j[nt]=Y.z,a&&(j[ot+tt]=-Y.x,j[rt+tt]=-Y.y,j[nt+tt]=-Y.z)),p.tangent&&(z[ot]=B.x,z[rt]=B.y,z[nt]=B.z,a&&(z[ot+tt]=-B.x,z[rt+tt]=-B.y,z[nt+tt]=-B.z)),p.bitangent&&(H=n.o.normalize(n.o.cross(Y,B,H),H),G[ot]=H.x,G[rt]=H.y,G[nt]=H.z,a&&(G[ot+tt]=H.x,G[rt+tt]=H.y,G[nt+tt]=H.z))))}if(p.st){X=R.length;for(var ut=0;ut<X;ut+=2)R[ut]=(R[ut]-Z.x)/(K.x-Z.x),R[ut+1]=(R[ut+1]-Z.y)/(K.y-Z.y)}var mt=new c.a;if(p.position){var lt=m.C.raisePositionsToHeight(t,i,a);mt.position=new l.o({componentDatatype:s.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:lt})}if(p.st&&(mt.st=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:R})),p.normal&&(mt.normal=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:j})),p.tangent&&(mt.tangent=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z})),p.bitangent&&(mt.bitangent=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),L&&(mt.extrudeDirection=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:V})),a&&u.e(i.offsetAttribute)){var ct=new Uint8Array(C);if(i.offsetAttribute===d.z.TOP)ct=e.d(ct,1,0,C/2);else{var pt=i.offsetAttribute===d.z.NONE?0:1;ct=e.d(ct,pt)}mt.applyOffset=new l.o({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:ct})}return mt}function L(t){var e,o,r,n,i,a=new Array(t*(t+1)*12-6),s=0;for(e=0,r=1,n=0;n<3;n++)a[s++]=r++,a[s++]=e,a[s++]=r;for(n=2;n<t+1;++n){for(r=n*(n+1)-1,e=(n-1)*n-1,a[s++]=r++,a[s++]=e,a[s++]=r,o=2*n,i=0;i<o-1;++i)a[s++]=r,a[s++]=e++,a[s++]=e,a[s++]=r++,a[s++]=e,a[s++]=r;a[s++]=r++,a[s++]=e,a[s++]=r}for(o=2*t,++r,++e,n=0;n<o-1;++n)a[s++]=r,a[s++]=e++,a[s++]=e,a[s++]=r++,a[s++]=e,a[s++]=r;for(a[s++]=r,a[s++]=e++,a[s++]=e,a[s++]=r++,a[s++]=e++,a[s++]=e,++e,n=t-1;n>1;--n){for(a[s++]=e++,a[s++]=e,a[s++]=r,o=2*n,i=0;i<o-1;++i)a[s++]=r,a[s++]=e++,a[s++]=e,a[s++]=r++,a[s++]=e,a[s++]=r;a[s++]=e++,a[s++]=e++,a[s++]=r++}for(n=0;n<3;n++)a[s++]=e++,a[s++]=e,a[s++]=r;return a}var R=new n.o;var j=new o.i,z=new o.i;function G(t){var i=t.center,a=t.ellipsoid,h=t.semiMajorAxis,x=n.o.multiplyByScalar(a.geodeticSurfaceNormal(i,g),t.height,g);j.center=n.o.add(i,x,j.center),j.radius=h,x=n.o.multiplyByScalar(a.geodeticSurfaceNormal(i,x),t.extrudedHeight,x),z.center=n.o.add(i,x,z.center),z.radius=h;var T=m.C.computeEllipsePositions(t,!0,!0),R=T.positions,G=T.numPts,V=T.outerPositions,k=o.i.union(j,z),Y=C(R,t,!0),B=L(G),H=B.length;B.length=2*H;for(var $=R.length/3,U=0;U<H;U+=3)B[U+H]=B[U+2]+$,B[U+1+H]=B[U+1]+$,B[U+2+H]=B[U]+$;var W=f.IndexDatatype.createTypedArray(2*$/3,B),q=new l.I({attributes:Y,indices:W,primitiveType:A._0x3b3836.TRIANGLES}),Q=function(t,i){var a=i.vertexFormat,m=i.center,p=i.semiMajorAxis,y=i.semiMinorAxis,f=i.ellipsoid,h=i.height,x=i.extrudedHeight,T=i.stRotation,C=t.length/3*2,L=new Float64Array(3*C),R=a.st?new Float32Array(2*C):void 0,j=a.normal?new Float32Array(3*C):void 0,z=a.tangent?new Float32Array(3*C):void 0,G=a.bitangent?new Float32Array(3*C):void 0,V=i.shadowVolume,k=V?new Float32Array(3*C):void 0,Y=0,B=M,H=E,$=P,U=new o.n(f),W=U.project(f.cartesianToCartographic(m,D),F),q=f.scaleToGeodeticSurface(m,g);f.geodeticSurfaceNormal(q,q);for(var Q=l.n.fromAxisAngle(q,T,N),J=A.p$1.fromQuaternion(Q,I),Z=r.o.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,O),K=r.o.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,S),X=t.length,tt=X/3*2,et=0;et<X;et+=3){var ot,rt=et+1,nt=et+2,it=n.o.fromArray(t,et,g);if(a.st){var at=A.p$1.multiplyByVector(J,it,_),st=U.project(f.cartesianToCartographic(at,D),v);n.o.subtract(st,W,st),w.x=(st.x+p)/(2*p),w.y=(st.y+y)/(2*y),Z.x=Math.min(w.x,Z.x),Z.y=Math.min(w.y,Z.y),K.x=Math.max(w.x,K.x),K.y=Math.max(w.y,K.y),R[Y+tt]=w.x,R[Y+1+tt]=w.y,R[Y++]=w.x,R[Y++]=w.y}it=f.scaleToGeodeticSurface(it,it),ot=n.o.clone(it,_),B=f.geodeticSurfaceNormal(it,B),V&&(k[et+X]=-B.x,k[rt+X]=-B.y,k[nt+X]=-B.z);var ut=n.o.multiplyByScalar(B,h,b);if(it=n.o.add(it,ut,it),ut=n.o.multiplyByScalar(B,x,ut),ot=n.o.add(ot,ut,ot),a.position&&(L[et+X]=ot.x,L[rt+X]=ot.y,L[nt+X]=ot.z,L[et]=it.x,L[rt]=it.y,L[nt]=it.z),a.normal||a.tangent||a.bitangent){$=n.o.clone(B,$);var mt=n.o.fromArray(t,(et+3)%X,b);n.o.subtract(mt,it,mt);var lt=n.o.subtract(ot,it,v);B=n.o.normalize(n.o.cross(lt,mt,B),B),a.normal&&(j[et]=B.x,j[rt]=B.y,j[nt]=B.z,j[et+X]=B.x,j[rt+X]=B.y,j[nt+X]=B.z),a.tangent&&(H=n.o.normalize(n.o.cross($,B,H),H),z[et]=H.x,z[rt]=H.y,z[nt]=H.z,z[et+X]=H.x,z[et+1+X]=H.y,z[et+2+X]=H.z),a.bitangent&&(G[et]=$.x,G[rt]=$.y,G[nt]=$.z,G[et+X]=$.x,G[rt+X]=$.y,G[nt+X]=$.z)}}if(a.st){X=R.length;for(var ct=0;ct<X;ct+=2)R[ct]=(R[ct]-Z.x)/(K.x-Z.x),R[ct+1]=(R[ct+1]-Z.y)/(K.y-Z.y)}var pt=new c.a;if(a.position&&(pt.position=new l.o({componentDatatype:s.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:L})),a.st&&(pt.st=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:R})),a.normal&&(pt.normal=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:j})),a.tangent&&(pt.tangent=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z})),a.bitangent&&(pt.bitangent=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),V&&(pt.extrudeDirection=new l.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:k})),u.e(i.offsetAttribute)){var dt=new Uint8Array(C);if(i.offsetAttribute===d.z.TOP)dt=e.d(dt,1,0,C/2);else{var yt=i.offsetAttribute===d.z.NONE?0:1;dt=e.d(dt,yt)}pt.applyOffset=new l.o({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:dt})}return pt}(V,t);B=function(t){for(var e=t.length/3,o=f.IndexDatatype.createTypedArray(e,6*e),r=0,n=0;n<e;n++){var i=n,a=n+e,s=(i+1)%e,u=s+e;o[r++]=i,o[r++]=a,o[r++]=s,o[r++]=s,o[r++]=a,o[r++]=u}return o}(V);var J=f.IndexDatatype.createTypedArray(2*V.length/3,B),Z=new l.I({attributes:Q,indices:J,primitiveType:A._0x3b3836.TRIANGLES}),K=y.k.combineInstances([new p.d({geometry:q}),new p.d({geometry:Z})]);return{boundingSphere:k,attributes:K[0].attributes,indices:K[0].indices}}function V(t,e,o,i,a,s,u){for(var l=m.C.computeEllipsePositions({center:t,semiMajorAxis:e,semiMinorAxis:o,rotation:i,granularity:a},!1,!0).outerPositions,c=l.length/3,p=new Array(c),d=0;d<c;++d)p[d]=n.o.fromArray(l,3*d);var y=r.h.fromCartesianArray(p,s,u);return y.width>h.e.PI&&(y.north=y.north>0?h.e.PI_OVER_TWO-h.e.EPSILON7:y.north,y.south=y.south<0?h.e.EPSILON7-h.e.PI_OVER_TWO:y.south,y.east=h.e.PI,y.west=-h.e.PI),y}function k(t){var e=(t=u.u(t,u.u.EMPTY_OBJECT)).center,o=u.u(t.ellipsoid,r.t.WGS84),i=t.semiMajorAxis,s=t.semiMinorAxis,m=u.u(t.granularity,h.e.RADIANS_PER_DEGREE),l=u.u(t.vertexFormat,x.n.DEFAULT);if(a.o.defined("options.center",e),a.o.typeOf.number("options.semiMajorAxis",i),a.o.typeOf.number("options.semiMinorAxis",s),i<s)throw new a.t("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(m<=0)throw new a.t("granularity must be greater than zero.");var c=u.u(t.height,0),p=u.u(t.extrudedHeight,c);this._center=n.o.clone(e),this._semiMajorAxis=i,this._semiMinorAxis=s,this._ellipsoid=r.t.clone(o),this._rotation=u.u(t.rotation,0),this._stRotation=u.u(t.stRotation,0),this._height=Math.max(p,c),this._granularity=m,this._vertexFormat=x.n.clone(l),this._extrudedHeight=Math.min(p,c),this._shadowVolume=u.u(t.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}k.packedLength=n.o.packedLength+r.t.packedLength+x.n.packedLength+9,k.pack=function(t,e,o){return a.o.defined("value",t),a.o.defined("array",e),o=u.u(o,0),n.o.pack(t._center,e,o),o+=n.o.packedLength,r.t.pack(t._ellipsoid,e,o),o+=r.t.packedLength,x.n.pack(t._vertexFormat,e,o),o+=x.n.packedLength,e[o++]=t._semiMajorAxis,e[o++]=t._semiMinorAxis,e[o++]=t._rotation,e[o++]=t._stRotation,e[o++]=t._height,e[o++]=t._granularity,e[o++]=t._extrudedHeight,e[o++]=t._shadowVolume?1:0,e[o]=u.u(t._offsetAttribute,-1),e};var Y=new n.o,B=new r.t,H=new x.n,$={center:Y,ellipsoid:B,vertexFormat:H,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};k.unpack=function(t,e,o){a.o.defined("array",t),e=u.u(e,0);var i=n.o.unpack(t,e,Y);e+=n.o.packedLength;var s=r.t.unpack(t,e,B);e+=r.t.packedLength;var m=x.n.unpack(t,e,H);e+=x.n.packedLength;var l=t[e++],c=t[e++],p=t[e++],d=t[e++],y=t[e++],f=t[e++],h=t[e++],A=1===t[e++],g=t[e];return u.e(o)?(o._center=n.o.clone(i,o._center),o._ellipsoid=r.t.clone(s,o._ellipsoid),o._vertexFormat=x.n.clone(m,o._vertexFormat),o._semiMajorAxis=l,o._semiMinorAxis=c,o._rotation=p,o._stRotation=d,o._height=y,o._granularity=f,o._extrudedHeight=h,o._shadowVolume=A,o._offsetAttribute=-1===g?void 0:g,o):($.height=y,$.extrudedHeight=h,$.granularity=f,$.stRotation=d,$.rotation=p,$.semiMajorAxis=l,$.semiMinorAxis=c,$.shadowVolume=A,$.offsetAttribute=-1===g?void 0:g,new k($))},k.computeRectangle=function(t,e){var o=(t=u.u(t,u.u.EMPTY_OBJECT)).center,n=u.u(t.ellipsoid,r.t.WGS84),i=t.semiMajorAxis,s=t.semiMinorAxis,m=u.u(t.granularity,h.e.RADIANS_PER_DEGREE),l=u.u(t.rotation,0);if(a.o.defined("options.center",o),a.o.typeOf.number("options.semiMajorAxis",i),a.o.typeOf.number("options.semiMinorAxis",s),i<s)throw new a.t("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(m<=0)throw new a.t("granularity must be greater than zero.");return V(o,i,s,l,m,n,e)},k.createGeometry=function(t){if(!(t._semiMajorAxis<=0||t._semiMinorAxis<=0)){var r=t._height,i=t._extrudedHeight,a=!h.e.equalsEpsilon(r,i,0,h.e.EPSILON2);t._center=t._ellipsoid.scaleToGeodeticSurface(t._center,t._center);var c,p={center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:t._ellipsoid,rotation:t._rotation,height:r,granularity:t._granularity,vertexFormat:t._vertexFormat,stRotation:t._stRotation};if(a)p.extrudedHeight=i,p.shadowVolume=t._shadowVolume,p.offsetAttribute=t._offsetAttribute,c=G(p);else if(c=function(t){var e=t.center;R=n.o.multiplyByScalar(t.ellipsoid.geodeticSurfaceNormal(e,R),t.height,R),R=n.o.add(e,R,R);var r=new o.i(R,t.semiMajorAxis),i=m.C.computeEllipsePositions(t,!0,!1),a=i.positions,s=i.numPts,u=C(a,t,!1),l=L(s);return{boundingSphere:r,attributes:u,indices:l=f.IndexDatatype.createTypedArray(a.length/3,l)}}(p),u.e(t._offsetAttribute)){var y=c.attributes.position.values.length,x=new Uint8Array(y/3),g=t._offsetAttribute===d.z.NONE?0:1;e.d(x,g),c.attributes.applyOffset=new l.o({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}return new l.I({attributes:c.attributes,indices:c.indices,primitiveType:A._0x3b3836.TRIANGLES,boundingSphere:c.boundingSphere,offsetAttribute:t._offsetAttribute})}},k.createShadowVolume=function(t,e,o){var r=t._granularity,n=t._ellipsoid,i=e(r,n),a=o(r,n);return new k({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:n,rotation:t._rotation,stRotation:t._stRotation,granularity:r,extrudedHeight:i,height:a,vertexFormat:x.n.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(k.prototype,{rectangle:{get:function(){return u.e(this._rectangle)||(this._rectangle=V(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return u.e(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){var e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];for(var o=m.C.computeEllipsePositions({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,rotation:t._rotation,granularity:t._granularity},!1,!0).outerPositions,r=o.length/3,i=new Array(r),a=0;a<r;++a)i[a]=n.o.fromArray(o,3*a);var s=t._ellipsoid,u=t.rectangle;return l.I._textureCoordinateRotationPoints(i,e,s,u)}(this)),this._textureCoordinateRotationPoints}}}),t.Y=k})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/EllipseGeometryLibrary-30d7e702.js b/SuperMap iEarth/public/SuperMap3D/Workers/EllipseGeometryLibrary-30d7e702.js deleted file mode 100644 index 639e5653..00000000 --- a/SuperMap iEarth/public/SuperMap3D/Workers/EllipseGeometryLibrary-30d7e702.js +++ /dev/null @@ -1 +0,0 @@ -define(["exports","./Cartesian3-3a8bdb0b","./Math-ecf82623","./FeatureDetection-cec0163f","./GeometryAttribute-f47bd1cb"],(function(o,e,r,a,t){"use strict";var i={},n=new e.o,l=new e.o,y=new t.n,s=new a.p$1;function c(o,r,i,c,u,x,f,m,z,h){var d=o+r;e.o.multiplyByScalar(c,Math.cos(d),n),e.o.multiplyByScalar(i,Math.sin(d),l),e.o.add(n,l,n);var _=Math.cos(o);_*=_;var p=Math.sin(o);p*=p;var v=x/Math.sqrt(f*_+u*p)/m;return t.n.fromAxisAngle(n,v,y),a.p$1.fromQuaternion(y,s),a.p$1.multiplyByVector(s,z,h),e.o.normalize(h,h),e.o.multiplyByScalar(h,m,h),h}var u=new e.o,x=new e.o,f=new e.o,m=new e.o;i.raisePositionsToHeight=function(o,r,a){for(var t=r.ellipsoid,i=r.height,n=r.extrudedHeight,l=a?o.length/3*2:o.length/3,y=new Float64Array(3*l),s=o.length,c=a?s:0,z=0;z<s;z+=3){var h=z+1,d=z+2,_=e.o.fromArray(o,z,u);t.scaleToGeodeticSurface(_,_);var p=e.o.clone(_,x),v=t.geodeticSurfaceNormal(_,m),O=e.o.multiplyByScalar(v,i,f);e.o.add(_,O,_),a&&(e.o.multiplyByScalar(v,n,O),e.o.add(p,O,p),y[z+c]=p.x,y[h+c]=p.y,y[d+c]=p.z),y[z]=_.x,y[h]=_.y,y[d]=_.z}return y};var z=new e.o,h=new e.o,d=new e.o;i.computeEllipsePositions=function(o,a,t){var i=o.semiMinorAxis,n=o.semiMajorAxis,l=o.rotation,y=o.center,s=8*o.granularity,m=i*i,_=n*n,p=n*i,v=e.o.magnitude(y),O=e.o.normalize(y,z),w=e.o.cross(e.o.UNIT_Z,y,h);w=e.o.normalize(w,w);var P=e.o.cross(O,w,d),M=1+Math.ceil(r.e.PI_OVER_TWO/s),I=r.e.PI_OVER_TWO/(M-1),T=r.e.PI_OVER_TWO-M*I;T<0&&(M-=Math.ceil(Math.abs(T)/I));var g,A,E,V,R,W=a?new Array(3*(M*(M+2)*2)):void 0,b=0,S=u,B=x,$=4*M*3,C=$-1,F=0,G=t?new Array($):void 0;for(S=c(T=r.e.PI_OVER_TWO,l,P,w,m,p,_,v,O,S),a&&(W[b++]=S.x,W[b++]=S.y,W[b++]=S.z),t&&(G[C--]=S.z,G[C--]=S.y,G[C--]=S.x),T=r.e.PI_OVER_TWO-I,g=1;g<M+1;++g){if(S=c(T,l,P,w,m,p,_,v,O,S),B=c(Math.PI-T,l,P,w,m,p,_,v,O,B),a){for(W[b++]=S.x,W[b++]=S.y,W[b++]=S.z,E=2*g+2,A=1;A<E-1;++A)V=A/(E-1),R=e.o.lerp(S,B,V,f),W[b++]=R.x,W[b++]=R.y,W[b++]=R.z;W[b++]=B.x,W[b++]=B.y,W[b++]=B.z}t&&(G[C--]=S.z,G[C--]=S.y,G[C--]=S.x,G[F++]=B.x,G[F++]=B.y,G[F++]=B.z),T=r.e.PI_OVER_TWO-(g+1)*I}for(g=M;g>1;--g){if(S=c(-(T=r.e.PI_OVER_TWO-(g-1)*I),l,P,w,m,p,_,v,O,S),B=c(T+Math.PI,l,P,w,m,p,_,v,O,B),a){for(W[b++]=S.x,W[b++]=S.y,W[b++]=S.z,E=2*(g-1)+2,A=1;A<E-1;++A)V=A/(E-1),R=e.o.lerp(S,B,V,f),W[b++]=R.x,W[b++]=R.y,W[b++]=R.z;W[b++]=B.x,W[b++]=B.y,W[b++]=B.z}t&&(G[C--]=S.z,G[C--]=S.y,G[C--]=S.x,G[F++]=B.x,G[F++]=B.y,G[F++]=B.z)}S=c(-(T=r.e.PI_OVER_TWO),l,P,w,m,p,_,v,O,S);var H={};return a&&(W[b++]=S.x,W[b++]=S.y,W[b++]=S.z,H.positions=W,H.numPts=M),t&&(G[C--]=S.z,G[C--]=S.y,G[C--]=S.x,H.outerPositions=G),H},o.C=i})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/EllipseGeometryLibrary-5f302d9d.js b/SuperMap iEarth/public/SuperMap3D/Workers/EllipseGeometryLibrary-5f302d9d.js new file mode 100644 index 00000000..b513fd7f --- /dev/null +++ b/SuperMap iEarth/public/SuperMap3D/Workers/EllipseGeometryLibrary-5f302d9d.js @@ -0,0 +1 @@ +define(["exports","./Cartesian3-3a8bdb0b","./Math-ecf82623","./FeatureDetection-fd297af4","./GeometryAttribute-65cf868d"],(function(o,e,r,a,t){"use strict";var i={},n=new e.o,l=new e.o,y=new t.n,s=new a.p$1;function c(o,r,i,c,u,f,x,m,z,d){var h=o+r;e.o.multiplyByScalar(c,Math.cos(h),n),e.o.multiplyByScalar(i,Math.sin(h),l),e.o.add(n,l,n);var _=Math.cos(o);_*=_;var p=Math.sin(o);p*=p;var v=f/Math.sqrt(x*_+u*p)/m;return t.n.fromAxisAngle(n,v,y),a.p$1.fromQuaternion(y,s),a.p$1.multiplyByVector(s,z,d),e.o.normalize(d,d),e.o.multiplyByScalar(d,m,d),d}var u=new e.o,f=new e.o,x=new e.o,m=new e.o;i.raisePositionsToHeight=function(o,r,a){for(var t=r.ellipsoid,i=r.height,n=r.extrudedHeight,l=a?o.length/3*2:o.length/3,y=new Float64Array(3*l),s=o.length,c=a?s:0,z=0;z<s;z+=3){var d=z+1,h=z+2,_=e.o.fromArray(o,z,u);t.scaleToGeodeticSurface(_,_);var p=e.o.clone(_,f),v=t.geodeticSurfaceNormal(_,m),O=e.o.multiplyByScalar(v,i,x);e.o.add(_,O,_),a&&(e.o.multiplyByScalar(v,n,O),e.o.add(p,O,p),y[z+c]=p.x,y[d+c]=p.y,y[h+c]=p.z),y[z]=_.x,y[d]=_.y,y[h]=_.z}return y};var z=new e.o,d=new e.o,h=new e.o;i.computeEllipsePositions=function(o,a,t){var i=o.semiMinorAxis,n=o.semiMajorAxis,l=o.rotation,y=o.center,s=8*o.granularity,m=i*i,_=n*n,p=n*i,v=e.o.magnitude(y),O=e.o.normalize(y,z),w=e.o.cross(e.o.UNIT_Z,y,d);w=e.o.normalize(w,w);var P=e.o.cross(O,w,h),M=1+Math.ceil(r.e.PI_OVER_TWO/s),I=r.e.PI_OVER_TWO/(M-1),T=r.e.PI_OVER_TWO-M*I;T<0&&(M-=Math.ceil(Math.abs(T)/I));var g,A,E,V,R,W=a?new Array(3*(M*(M+2)*2)):void 0,S=0,B=u,b=f,$=4*M*3,C=$-1,F=0,G=t?new Array($):void 0;for(B=c(T=r.e.PI_OVER_TWO,l,P,w,m,p,_,v,O,B),a&&(W[S++]=B.x,W[S++]=B.y,W[S++]=B.z),t&&(G[C--]=B.z,G[C--]=B.y,G[C--]=B.x),T=r.e.PI_OVER_TWO-I,g=1;g<M+1;++g){if(B=c(T,l,P,w,m,p,_,v,O,B),b=c(Math.PI-T,l,P,w,m,p,_,v,O,b),a){for(W[S++]=B.x,W[S++]=B.y,W[S++]=B.z,E=2*g+2,A=1;A<E-1;++A)V=A/(E-1),R=e.o.lerp(B,b,V,x),W[S++]=R.x,W[S++]=R.y,W[S++]=R.z;W[S++]=b.x,W[S++]=b.y,W[S++]=b.z}t&&(G[C--]=B.z,G[C--]=B.y,G[C--]=B.x,G[F++]=b.x,G[F++]=b.y,G[F++]=b.z),T=r.e.PI_OVER_TWO-(g+1)*I}for(g=M;g>1;--g){if(B=c(-(T=r.e.PI_OVER_TWO-(g-1)*I),l,P,w,m,p,_,v,O,B),b=c(T+Math.PI,l,P,w,m,p,_,v,O,b),a){for(W[S++]=B.x,W[S++]=B.y,W[S++]=B.z,E=2*(g-1)+2,A=1;A<E-1;++A)V=A/(E-1),R=e.o.lerp(B,b,V,x),W[S++]=R.x,W[S++]=R.y,W[S++]=R.z;W[S++]=b.x,W[S++]=b.y,W[S++]=b.z}t&&(G[C--]=B.z,G[C--]=B.y,G[C--]=B.x,G[F++]=b.x,G[F++]=b.y,G[F++]=b.z)}B=c(-(T=r.e.PI_OVER_TWO),l,P,w,m,p,_,v,O,B);var H={};return a&&(W[S++]=B.x,W[S++]=B.y,W[S++]=B.z,H.positions=W,H.numPts=M),t&&(G[C--]=B.z,G[C--]=B.y,G[C--]=B.x,H.outerPositions=G),H},o.C=i})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/EllipseOutlineGeometry-65786d3b.js b/SuperMap iEarth/public/SuperMap3D/Workers/EllipseOutlineGeometry-50eb422d.js similarity index 75% rename from SuperMap iEarth/public/SuperMap3D/Workers/EllipseOutlineGeometry-65786d3b.js rename to SuperMap iEarth/public/SuperMap3D/Workers/EllipseOutlineGeometry-50eb422d.js index d877137c..6dfdc9a5 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/EllipseOutlineGeometry-65786d3b.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/EllipseOutlineGeometry-50eb422d.js @@ -1 +1 @@ -define(["exports","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./when-92c6cf3c","./Check-52a7d806","./EllipseGeometryLibrary-30d7e702","./Cartesian2-b72655a5","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-cec0163f"],(function(e,t,i,r,o,n,a,s,u,d,l,c,h,p,f){"use strict";var m=new r.o,_=new r.o;var A=new i.i,b=new i.i;function g(e){var t=(e=n.u(e,n.u.EMPTY_OBJECT)).center,i=n.u(e.ellipsoid,u.t.WGS84),o=e.semiMajorAxis,s=e.semiMinorAxis,d=n.u(e.granularity,p.e.RADIANS_PER_DEGREE);if(!n.e(t))throw new a.t("center is required.");if(!n.e(o))throw new a.t("semiMajorAxis is required.");if(!n.e(s))throw new a.t("semiMinorAxis is required.");if(o<s)throw new a.t("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(d<=0)throw new a.t("granularity must be greater than zero.");var l=n.u(e.height,0),c=n.u(e.extrudedHeight,l);this._center=r.o.clone(t),this._semiMajorAxis=o,this._semiMinorAxis=s,this._ellipsoid=u.t.clone(i),this._rotation=n.u(e.rotation,0),this._height=Math.max(c,l),this._granularity=d,this._extrudedHeight=Math.min(c,l),this._numberOfVerticalLines=Math.max(n.u(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._outlineWidth=n.u(e.outlineWidth,1),this._workerName="createEllipseOutlineGeometry"}g.packedLength=r.o.packedLength+u.t.packedLength+9,g.pack=function(e,t,i){if(!n.e(e))throw new a.t("value is required");if(!n.e(t))throw new a.t("array is required");return i=n.u(i,0),r.o.pack(e._center,t,i),i+=r.o.packedLength,u.t.pack(e._ellipsoid,t,i),i+=u.t.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i++]=n.u(e._offsetAttribute,-1),t[i]=e._outlineWidth,t};var y=new r.o,v=new u.t,x={center:y,ellipsoid:v,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0,outlineWidth:void 0};g.unpack=function(e,t,i){if(!n.e(e))throw new a.t("array is required");t=n.u(t,0);var o=r.o.unpack(e,t,y);t+=r.o.packedLength;var s=u.t.unpack(e,t,v);t+=u.t.packedLength;var d=e[t++],l=e[t++],c=e[t++],h=e[t++],p=e[t++],f=e[t++],m=e[t++],_=e[t++],A=e[t];return n.e(i)?(i._center=r.o.clone(o,i._center),i._ellipsoid=u.t.clone(s,i._ellipsoid),i._semiMajorAxis=d,i._semiMinorAxis=l,i._rotation=c,i._height=h,i._granularity=p,i._extrudedHeight=f,i._numberOfVerticalLines=m,i._offsetAttribute=-1===_?void 0:_,i._outlineWidth=A,i):(x.height=h,x.extrudedHeight=f,x.granularity=p,x.rotation=c,x.semiMajorAxis=d,x.semiMinorAxis=l,x.numberOfVerticalLines=m,x.offsetAttribute=-1===_?void 0:_,x.outlineWidth=A,new g(x))},g.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var a=e._height,u=e._extrudedHeight,g=!p.e.equalsEpsilon(a,u,0,p.e.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var y,v={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:a,granularity:e._granularity,outlineWidth:e._outlineWidth,numberOfVerticalLines:e._numberOfVerticalLines};if(g)v.extrudedHeight=u,v.offsetAttribute=e._offsetAttribute,y=function(e){var a=e.center,u=e.ellipsoid,f=e.semiMajorAxis,_=r.o.multiplyByScalar(u.geodeticSurfaceNormal(a,m),e.height,m);A.center=r.o.add(a,_,A.center),A.radius=f,_=r.o.multiplyByScalar(u.geodeticSurfaceNormal(a,_),e.extrudedHeight,_),b.center=r.o.add(a,_,b.center),b.radius=f;var g=s.C.computeEllipsePositions(e,!1,!0).outerPositions,y=new l.a({position:new d.o({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:s.C.raisePositionsToHeight(g,e,!0)})});g=y.position.values;var v=i.i.union(A,b),x=g.length/3;if(n.e(e.offsetAttribute)){var w=new Uint8Array(x);if(e.offsetAttribute===c.z.TOP)w=t.d(w,1,0,x/2);else{var M=e.offsetAttribute===c.z.NONE?0:1;w=t.d(w,M)}y.applyOffset=new d.o({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:w})}var L=n.u(e.numberOfVerticalLines,16);L=p.e.clamp(L,0,x/2);var E=h.IndexDatatype.createTypedArray(x,2*x+2*L);x/=2;var D,O,S=0;for(D=0;D<x;++D)E[S++]=D,E[S++]=(D+1)%x,E[S++]=D+x,E[S++]=(D+1)%x+x;if(L>0){var N=Math.min(L,x);O=Math.round(x/N);var k=Math.min(O*L,x);for(D=0;D<k;D+=O)E[S++]=D,E[S++]=D+x}return{boundingSphere:v,attributes:y,indices:E}}(v);else if(y=function(e){var t=e.center;_=r.o.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,_),e.height,_),_=r.o.add(t,_,_);var a=new i.i(_,e.semiMajorAxis),u=s.C.computeEllipsePositions(e,!1,!0).outerPositions,c=n.u(e.outlineWidth,1);c>1&&u.push(u[0],u[1],u[2]);var p=new l.a({position:new d.o({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:s.C.raisePositionsToHeight(u,e,!1)})});c>1&&(p.sideness=new d.o({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array([0,0,0,1,1,1,1,0])}),p.sideness.isInstanceAttribute=!0);for(var f=u.length/3,m=h.IndexDatatype.createTypedArray(f,2*f),A=0,b=0;b<f;++b)m[A++]=b,m[A++]=(b+1)%f;return{boundingSphere:a,attributes:p,indices:m}}(v),n.e(e._offsetAttribute)){var x=y.attributes.position.values.length,w=new Uint8Array(x/3),M=e._offsetAttribute===c.z.NONE?0:1;t.d(w,M),y.attributes.applyOffset=new d.o({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:w})}return new d.I({attributes:y.attributes,indices:y.indices,primitiveType:e._outlineWidth>1?f._0x4b6a27.TRIANGLES:f._0x4b6a27.LINES,boundingSphere:y.boundingSphere,offsetAttribute:e._offsetAttribute})}},e.M=g})); +define(["exports","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./when-92c6cf3c","./Check-52a7d806","./EllipseGeometryLibrary-5f302d9d","./Cartesian2-b72655a5","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-fd297af4"],(function(e,t,i,r,o,n,a,s,u,d,l,c,h,f,p){"use strict";var m=new r.o,_=new r.o;var A=new i.i,b=new i.i;function g(e){var t=(e=n.u(e,n.u.EMPTY_OBJECT)).center,i=n.u(e.ellipsoid,u.t.WGS84),o=e.semiMajorAxis,s=e.semiMinorAxis,d=n.u(e.granularity,f.e.RADIANS_PER_DEGREE);if(!n.e(t))throw new a.t("center is required.");if(!n.e(o))throw new a.t("semiMajorAxis is required.");if(!n.e(s))throw new a.t("semiMinorAxis is required.");if(o<s)throw new a.t("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(d<=0)throw new a.t("granularity must be greater than zero.");var l=n.u(e.height,0),c=n.u(e.extrudedHeight,l);this._center=r.o.clone(t),this._semiMajorAxis=o,this._semiMinorAxis=s,this._ellipsoid=u.t.clone(i),this._rotation=n.u(e.rotation,0),this._height=Math.max(c,l),this._granularity=d,this._extrudedHeight=Math.min(c,l),this._numberOfVerticalLines=Math.max(n.u(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._outlineWidth=n.u(e.outlineWidth,1),this._workerName="createEllipseOutlineGeometry"}g.packedLength=r.o.packedLength+u.t.packedLength+9,g.pack=function(e,t,i){if(!n.e(e))throw new a.t("value is required");if(!n.e(t))throw new a.t("array is required");return i=n.u(i,0),r.o.pack(e._center,t,i),i+=r.o.packedLength,u.t.pack(e._ellipsoid,t,i),i+=u.t.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i++]=n.u(e._offsetAttribute,-1),t[i]=e._outlineWidth,t};var y=new r.o,v=new u.t,x={center:y,ellipsoid:v,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0,outlineWidth:void 0};g.unpack=function(e,t,i){if(!n.e(e))throw new a.t("array is required");t=n.u(t,0);var o=r.o.unpack(e,t,y);t+=r.o.packedLength;var s=u.t.unpack(e,t,v);t+=u.t.packedLength;var d=e[t++],l=e[t++],c=e[t++],h=e[t++],f=e[t++],p=e[t++],m=e[t++],_=e[t++],A=e[t];return n.e(i)?(i._center=r.o.clone(o,i._center),i._ellipsoid=u.t.clone(s,i._ellipsoid),i._semiMajorAxis=d,i._semiMinorAxis=l,i._rotation=c,i._height=h,i._granularity=f,i._extrudedHeight=p,i._numberOfVerticalLines=m,i._offsetAttribute=-1===_?void 0:_,i._outlineWidth=A,i):(x.height=h,x.extrudedHeight=p,x.granularity=f,x.rotation=c,x.semiMajorAxis=d,x.semiMinorAxis=l,x.numberOfVerticalLines=m,x.offsetAttribute=-1===_?void 0:_,x.outlineWidth=A,new g(x))},g.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var a=e._height,u=e._extrudedHeight,g=!f.e.equalsEpsilon(a,u,0,f.e.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var y,v={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:a,granularity:e._granularity,outlineWidth:e._outlineWidth,numberOfVerticalLines:e._numberOfVerticalLines};if(g)v.extrudedHeight=u,v.offsetAttribute=e._offsetAttribute,y=function(e){var a=e.center,u=e.ellipsoid,p=e.semiMajorAxis,_=r.o.multiplyByScalar(u.geodeticSurfaceNormal(a,m),e.height,m);A.center=r.o.add(a,_,A.center),A.radius=p,_=r.o.multiplyByScalar(u.geodeticSurfaceNormal(a,_),e.extrudedHeight,_),b.center=r.o.add(a,_,b.center),b.radius=p;var g=s.C.computeEllipsePositions(e,!1,!0).outerPositions,y=new l.a({position:new d.o({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:s.C.raisePositionsToHeight(g,e,!0)})});g=y.position.values;var v=i.i.union(A,b),x=g.length/3;if(n.e(e.offsetAttribute)){var w=new Uint8Array(x);if(e.offsetAttribute===c.z.TOP)w=t.d(w,1,0,x/2);else{var M=e.offsetAttribute===c.z.NONE?0:1;w=t.d(w,M)}y.applyOffset=new d.o({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:w})}var L=n.u(e.numberOfVerticalLines,16);L=f.e.clamp(L,0,x/2);var E=h.IndexDatatype.createTypedArray(x,2*x+2*L);x/=2;var D,O,S=0;for(D=0;D<x;++D)E[S++]=D,E[S++]=(D+1)%x,E[S++]=D+x,E[S++]=(D+1)%x+x;if(L>0){var N=Math.min(L,x);O=Math.round(x/N);var k=Math.min(O*L,x);for(D=0;D<k;D+=O)E[S++]=D,E[S++]=D+x}return{boundingSphere:v,attributes:y,indices:E}}(v);else if(y=function(e){var t=e.center;_=r.o.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,_),e.height,_),_=r.o.add(t,_,_);var a=new i.i(_,e.semiMajorAxis),u=s.C.computeEllipsePositions(e,!1,!0).outerPositions,c=n.u(e.outlineWidth,1);c>1&&u.push(u[0],u[1],u[2]);var f=new l.a({position:new d.o({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:s.C.raisePositionsToHeight(u,e,!1)})});c>1&&(f.sideness=new d.o({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array([0,0,0,1,1,1,1,0])}),f.sideness.isInstanceAttribute=!0);for(var p=u.length/3,m=h.IndexDatatype.createTypedArray(p,2*p),A=0,b=0;b<p;++b)m[A++]=b,m[A++]=(b+1)%p;return{boundingSphere:a,attributes:f,indices:m}}(v),n.e(e._offsetAttribute)){var x=y.attributes.position.values.length,w=new Uint8Array(x/3),M=e._offsetAttribute===c.z.NONE?0:1;t.d(w,M),y.attributes.applyOffset=new d.o({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:w})}return new d.I({attributes:y.attributes,indices:y.indices,primitiveType:e._outlineWidth>1?p._0x3b3836.TRIANGLES:p._0x3b3836.LINES,boundingSphere:y.boundingSphere,offsetAttribute:e._offsetAttribute})}},e.M=g})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidGeometry-1042f440.js b/SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidGeometry-19d6e145.js similarity index 60% rename from SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidGeometry-1042f440.js rename to SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidGeometry-19d6e145.js index 05057e43..00691c1e 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidGeometry-1042f440.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidGeometry-19d6e145.js @@ -1 +1 @@ -define(["exports","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./when-92c6cf3c","./Check-52a7d806","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-cec0163f","./VertexFormat-f496a3f1"],(function(t,e,n,i,a,o,r,m,s,u,c,f,p,l,d){"use strict";var _=new a.o,h=new a.o,v=new a.o,y=new a.o,w=new a.o(1,1,1),b=Math.cos,k=Math.sin;function C(t){t=r.u(t,r.u.EMPTY_OBJECT);var e=r.u(t.radii,w),n=r.u(t.innerRadii,e),i=r.u(t.minimumClock,0),o=r.u(t.maximumClock,p.e.TWO_PI),s=r.u(t.minimumCone,0),u=r.u(t.maximumCone,p.e.PI),c=Math.round(r.u(t.stackPartitions,64)),f=Math.round(r.u(t.slicePartitions,64)),l=r.u(t.vertexFormat,d.n.DEFAULT);if(f<3)throw new m.t("options.slicePartitions cannot be less than three.");if(c<3)throw new m.t("options.stackPartitions cannot be less than three.");this._radii=a.o.clone(e),this._innerRadii=a.o.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=s,this._maximumCone=u,this._stackPartitions=c,this._slicePartitions=f,this._vertexFormat=d.n.clone(l),this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidGeometry"}C.packedLength=2*a.o.packedLength+d.n.packedLength+7,C.pack=function(t,e,n){if(!r.e(t))throw new m.t("value is required");if(!r.e(e))throw new m.t("array is required");return n=r.u(n,0),a.o.pack(t._radii,e,n),n+=a.o.packedLength,a.o.pack(t._innerRadii,e,n),n+=a.o.packedLength,d.n.pack(t._vertexFormat,e,n),n+=d.n.packedLength,e[n++]=t._minimumClock,e[n++]=t._maximumClock,e[n++]=t._minimumCone,e[n++]=t._maximumCone,e[n++]=t._stackPartitions,e[n++]=t._slicePartitions,e[n]=r.u(t._offsetAttribute,-1),e};var A,x=new a.o,P=new a.o,g=new d.n,F={radii:x,innerRadii:P,vertexFormat:g,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};C.unpack=function(t,e,n){if(!r.e(t))throw new m.t("array is required");e=r.u(e,0);var i=a.o.unpack(t,e,x);e+=a.o.packedLength;var o=a.o.unpack(t,e,P);e+=a.o.packedLength;var s=d.n.unpack(t,e,g);e+=d.n.packedLength;var u=t[e++],c=t[e++],f=t[e++],p=t[e++],l=t[e++],_=t[e++],h=t[e];return r.e(n)?(n._radii=a.o.clone(i,n._radii),n._innerRadii=a.o.clone(o,n._innerRadii),n._vertexFormat=d.n.clone(s,n._vertexFormat),n._minimumClock=u,n._maximumClock=c,n._minimumCone=f,n._maximumCone=p,n._stackPartitions=l,n._slicePartitions=_,n._offsetAttribute=-1===h?void 0:h,n):(F.minimumClock=u,F.maximumClock=c,F.minimumCone=f,F.maximumCone=p,F.stackPartitions=l,F.slicePartitions=_,F.offsetAttribute=-1===h?void 0:h,new C(F))},C.createGeometry=function(t){var m=t._radii;if(!(m.x<=0||m.y<=0||m.z<=0)){var d=t._innerRadii;if(!(d.x<=0||d.y<=0||d.z<=0)){var w=t._minimumClock,C=t._maximumClock,A=t._minimumCone,x=t._maximumCone,P=t._vertexFormat,g=t._slicePartitions+1,F=t._stackPartitions+1;(g=Math.round(g*Math.abs(C-w)/p.e.TWO_PI))<2&&(g=2),(F=Math.round(F*Math.abs(x-A)/p.e.PI))<2&&(F=2);var D,T,I=0,L=[A],O=[w];for(D=0;D<F;D++)L.push(A+D*(x-A)/(F-1));for(L.push(x),T=0;T<g;T++)O.push(w+T*(C-w)/(g-1));O.push(C);var M=L.length,z=O.length,E=0,N=1,G=d.x!==m.x||d.y!==m.y||d.z!==m.z,R=!1,U=!1,S=!1;G&&(N=2,A>0&&(R=!0,E+=g-1),x<Math.PI&&(U=!0,E+=g-1),(C-w)%p.e.TWO_PI?(S=!0,E+=2*(F-1)+1):E+=1);var W=z*M*N,q=new Float64Array(3*W),B=e.d(new Array(W),!1),Y=e.d(new Array(W),!1),J=g*F*N,V=6*(J+E+1-(g+F)*N),X=f.IndexDatatype.createTypedArray(J,V),Z=P.normal?new Float32Array(3*W):void 0,j=P.tangent?new Float32Array(3*W):void 0,H=P.bitangent?new Float32Array(3*W):void 0,K=P.st?new Float32Array(2*W):void 0,Q=new Array(M),$=new Array(M);for(D=0;D<M;D++)Q[D]=k(L[D]),$[D]=b(L[D]);var tt=new Array(z),et=new Array(z);for(T=0;T<z;T++)et[T]=b(O[T]),tt[T]=k(O[T]);for(D=0;D<M;D++)for(T=0;T<z;T++)q[I++]=m.x*Q[D]*et[T],q[I++]=m.y*Q[D]*tt[T],q[I++]=m.z*$[D];var nt,it,at,ot,rt=W/2;if(G)for(D=0;D<M;D++)for(T=0;T<z;T++)q[I++]=d.x*Q[D]*et[T],q[I++]=d.y*Q[D]*tt[T],q[I++]=d.z*$[D],B[rt]=!0,D>0&&D!==M-1&&0!==T&&T!==z-1&&(Y[rt]=!0),rt++;for(I=0,D=1;D<M-2;D++)for(nt=D*z,it=(D+1)*z,T=1;T<z-2;T++)X[I++]=it+T,X[I++]=it+T+1,X[I++]=nt+T+1,X[I++]=it+T,X[I++]=nt+T+1,X[I++]=nt+T;if(G){var mt=M*z;for(D=1;D<M-2;D++)for(nt=mt+D*z,it=mt+(D+1)*z,T=1;T<z-2;T++)X[I++]=it+T,X[I++]=nt+T,X[I++]=nt+T+1,X[I++]=it+T,X[I++]=nt+T+1,X[I++]=it+T+1}if(G){if(R)for(ot=M*z,D=1;D<z-2;D++)X[I++]=D,X[I++]=D+1,X[I++]=ot+D+1,X[I++]=D,X[I++]=ot+D+1,X[I++]=ot+D;if(U)for(at=M*z-z,ot=M*z*N-z,D=1;D<z-2;D++)X[I++]=at+D+1,X[I++]=at+D,X[I++]=ot+D,X[I++]=at+D+1,X[I++]=ot+D,X[I++]=ot+D+1}if(S){for(D=1;D<M-2;D++)ot=z*M+z*D,at=z*D,X[I++]=ot,X[I++]=at+z,X[I++]=at,X[I++]=ot,X[I++]=ot+z,X[I++]=at+z;for(D=1;D<M-2;D++)ot=z*M+z*(D+1)-1,at=z*(D+1)-1,X[I++]=at+z,X[I++]=ot,X[I++]=at,X[I++]=at+z,X[I++]=ot+z,X[I++]=ot}var st=new u.a;P.position&&(st.position=new s.o({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:q}));var ut,ct=0,ft=0,pt=0,lt=0,dt=W/2,_t=i.t.fromCartesian3(m),ht=i.t.fromCartesian3(d);if(P.st||P.normal||P.tangent||P.bitangent){for(D=0;D<W;D++){ut=B[D]?ht:_t;var vt=a.o.fromArray(q,3*D,_),yt=ut.geodeticSurfaceNormal(vt,h);if(P.st){var wt=Math.atan2(yt.y,yt.x);wt<0&&(wt+=p.e.TWO_PI),K[ct++]=wt/p.e.TWO_PI,K[ct++]=Math.asin(yt.z)/Math.PI+.5}if(P.normal&&(Y[D]&&a.o.negate(yt,yt),Z[ft++]=yt.x,Z[ft++]=yt.y,Z[ft++]=yt.z),P.tangent||P.bitangent){var bt,kt=v,Ct=0;if(B[D]&&(Ct=dt),bt=!R&&D>=Ct&&D<Ct+2*z?a.o.UNIT_X:a.o.UNIT_Z,a.o.cross(bt,yt,kt),a.o.normalize(kt,kt),P.tangent&&(j[pt++]=kt.x,j[pt++]=kt.y,j[pt++]=kt.z),P.bitangent){var At=a.o.cross(yt,kt,y);a.o.normalize(At,At),H[lt++]=At.x,H[lt++]=At.y,H[lt++]=At.z}}}P.st&&(st.st=new s.o({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:K})),P.normal&&(st.normal=new s.o({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:Z})),P.tangent&&(st.tangent=new s.o({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:j})),P.bitangent&&(st.bitangent=new s.o({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:H}))}if(r.e(t._offsetAttribute)){var xt=q.length,Pt=new Uint8Array(xt/3),gt=t._offsetAttribute===c.z.NONE?0:1;e.d(Pt,gt),st.applyOffset=new s.o({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:Pt})}return new s.I({attributes:st,indices:X,primitiveType:l._0x4b6a27.TRIANGLES,boundingSphere:n.i.fromEllipsoid(_t),offsetAttribute:t._offsetAttribute})}}},C.getUnitEllipsoid=function(){return r.e(A)||(A=C.createGeometry(new C({radii:new a.o(1,1,1),vertexFormat:d.n.POSITION_ONLY}))),A},t.b=C})); +define(["exports","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./when-92c6cf3c","./Check-52a7d806","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-fd297af4","./VertexFormat-f496a3f1"],(function(t,e,n,i,a,o,r,m,s,u,c,f,p,d,l){"use strict";var _=new a.o,h=new a.o,v=new a.o,y=new a.o,w=new a.o(1,1,1),k=Math.cos,C=Math.sin;function b(t){t=r.u(t,r.u.EMPTY_OBJECT);var e=r.u(t.radii,w),n=r.u(t.innerRadii,e),i=r.u(t.minimumClock,0),o=r.u(t.maximumClock,p.e.TWO_PI),s=r.u(t.minimumCone,0),u=r.u(t.maximumCone,p.e.PI),c=Math.round(r.u(t.stackPartitions,64)),f=Math.round(r.u(t.slicePartitions,64)),d=r.u(t.vertexFormat,l.n.DEFAULT);if(f<3)throw new m.t("options.slicePartitions cannot be less than three.");if(c<3)throw new m.t("options.stackPartitions cannot be less than three.");this._radii=a.o.clone(e),this._innerRadii=a.o.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=s,this._maximumCone=u,this._stackPartitions=c,this._slicePartitions=f,this._vertexFormat=l.n.clone(d),this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidGeometry"}b.packedLength=2*a.o.packedLength+l.n.packedLength+7,b.pack=function(t,e,n){if(!r.e(t))throw new m.t("value is required");if(!r.e(e))throw new m.t("array is required");return n=r.u(n,0),a.o.pack(t._radii,e,n),n+=a.o.packedLength,a.o.pack(t._innerRadii,e,n),n+=a.o.packedLength,l.n.pack(t._vertexFormat,e,n),n+=l.n.packedLength,e[n++]=t._minimumClock,e[n++]=t._maximumClock,e[n++]=t._minimumCone,e[n++]=t._maximumCone,e[n++]=t._stackPartitions,e[n++]=t._slicePartitions,e[n]=r.u(t._offsetAttribute,-1),e};var A,x=new a.o,P=new a.o,g=new l.n,F={radii:x,innerRadii:P,vertexFormat:g,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};b.unpack=function(t,e,n){if(!r.e(t))throw new m.t("array is required");e=r.u(e,0);var i=a.o.unpack(t,e,x);e+=a.o.packedLength;var o=a.o.unpack(t,e,P);e+=a.o.packedLength;var s=l.n.unpack(t,e,g);e+=l.n.packedLength;var u=t[e++],c=t[e++],f=t[e++],p=t[e++],d=t[e++],_=t[e++],h=t[e];return r.e(n)?(n._radii=a.o.clone(i,n._radii),n._innerRadii=a.o.clone(o,n._innerRadii),n._vertexFormat=l.n.clone(s,n._vertexFormat),n._minimumClock=u,n._maximumClock=c,n._minimumCone=f,n._maximumCone=p,n._stackPartitions=d,n._slicePartitions=_,n._offsetAttribute=-1===h?void 0:h,n):(F.minimumClock=u,F.maximumClock=c,F.minimumCone=f,F.maximumCone=p,F.stackPartitions=d,F.slicePartitions=_,F.offsetAttribute=-1===h?void 0:h,new b(F))},b.createGeometry=function(t){var m=t._radii;if(!(m.x<=0||m.y<=0||m.z<=0)){var l=t._innerRadii;if(!(l.x<=0||l.y<=0||l.z<=0)){var w=t._minimumClock,b=t._maximumClock,A=t._minimumCone,x=t._maximumCone,P=t._vertexFormat,g=t._slicePartitions+1,F=t._stackPartitions+1;(g=Math.round(g*Math.abs(b-w)/p.e.TWO_PI))<2&&(g=2),(F=Math.round(F*Math.abs(x-A)/p.e.PI))<2&&(F=2);var D,T,I=0,L=[A],O=[w];for(D=0;D<F;D++)L.push(A+D*(x-A)/(F-1));for(L.push(x),T=0;T<g;T++)O.push(w+T*(b-w)/(g-1));O.push(b);var M=L.length,z=O.length,E=0,N=1,G=l.x!==m.x||l.y!==m.y||l.z!==m.z,R=!1,U=!1,S=!1;G&&(N=2,A>0&&(R=!0,E+=g-1),x<Math.PI&&(U=!0,E+=g-1),(b-w)%p.e.TWO_PI?(S=!0,E+=2*(F-1)+1):E+=1);var W=z*M*N,q=new Float64Array(3*W),B=e.d(new Array(W),!1),Y=e.d(new Array(W),!1),J=g*F*N,V=6*(J+E+1-(g+F)*N),X=f.IndexDatatype.createTypedArray(J,V),Z=P.normal?new Float32Array(3*W):void 0,j=P.tangent?new Float32Array(3*W):void 0,H=P.bitangent?new Float32Array(3*W):void 0,K=P.st?new Float32Array(2*W):void 0,Q=new Array(M),$=new Array(M);for(D=0;D<M;D++)Q[D]=C(L[D]),$[D]=k(L[D]);var tt=new Array(z),et=new Array(z);for(T=0;T<z;T++)et[T]=k(O[T]),tt[T]=C(O[T]);for(D=0;D<M;D++)for(T=0;T<z;T++)q[I++]=m.x*Q[D]*et[T],q[I++]=m.y*Q[D]*tt[T],q[I++]=m.z*$[D];var nt,it,at,ot,rt=W/2;if(G)for(D=0;D<M;D++)for(T=0;T<z;T++)q[I++]=l.x*Q[D]*et[T],q[I++]=l.y*Q[D]*tt[T],q[I++]=l.z*$[D],B[rt]=!0,D>0&&D!==M-1&&0!==T&&T!==z-1&&(Y[rt]=!0),rt++;for(I=0,D=1;D<M-2;D++)for(nt=D*z,it=(D+1)*z,T=1;T<z-2;T++)X[I++]=it+T,X[I++]=it+T+1,X[I++]=nt+T+1,X[I++]=it+T,X[I++]=nt+T+1,X[I++]=nt+T;if(G){var mt=M*z;for(D=1;D<M-2;D++)for(nt=mt+D*z,it=mt+(D+1)*z,T=1;T<z-2;T++)X[I++]=it+T,X[I++]=nt+T,X[I++]=nt+T+1,X[I++]=it+T,X[I++]=nt+T+1,X[I++]=it+T+1}if(G){if(R)for(ot=M*z,D=1;D<z-2;D++)X[I++]=D,X[I++]=D+1,X[I++]=ot+D+1,X[I++]=D,X[I++]=ot+D+1,X[I++]=ot+D;if(U)for(at=M*z-z,ot=M*z*N-z,D=1;D<z-2;D++)X[I++]=at+D+1,X[I++]=at+D,X[I++]=ot+D,X[I++]=at+D+1,X[I++]=ot+D,X[I++]=ot+D+1}if(S){for(D=1;D<M-2;D++)ot=z*M+z*D,at=z*D,X[I++]=ot,X[I++]=at+z,X[I++]=at,X[I++]=ot,X[I++]=ot+z,X[I++]=at+z;for(D=1;D<M-2;D++)ot=z*M+z*(D+1)-1,at=z*(D+1)-1,X[I++]=at+z,X[I++]=ot,X[I++]=at,X[I++]=at+z,X[I++]=ot+z,X[I++]=ot}var st=new u.a;P.position&&(st.position=new s.o({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:q}));var ut,ct=0,ft=0,pt=0,dt=0,lt=W/2,_t=i.t.fromCartesian3(m),ht=i.t.fromCartesian3(l);if(P.st||P.normal||P.tangent||P.bitangent){for(D=0;D<W;D++){ut=B[D]?ht:_t;var vt=a.o.fromArray(q,3*D,_),yt=ut.geodeticSurfaceNormal(vt,h);if(P.st){var wt=Math.atan2(yt.y,yt.x);wt<0&&(wt+=p.e.TWO_PI),K[ct++]=wt/p.e.TWO_PI,K[ct++]=Math.asin(yt.z)/Math.PI+.5}if(P.normal&&(Y[D]&&a.o.negate(yt,yt),Z[ft++]=yt.x,Z[ft++]=yt.y,Z[ft++]=yt.z),P.tangent||P.bitangent){var kt,Ct=v,bt=0;if(B[D]&&(bt=lt),kt=!R&&D>=bt&&D<bt+2*z?a.o.UNIT_X:a.o.UNIT_Z,a.o.cross(kt,yt,Ct),a.o.normalize(Ct,Ct),P.tangent&&(j[pt++]=Ct.x,j[pt++]=Ct.y,j[pt++]=Ct.z),P.bitangent){var At=a.o.cross(yt,Ct,y);a.o.normalize(At,At),H[dt++]=At.x,H[dt++]=At.y,H[dt++]=At.z}}}P.st&&(st.st=new s.o({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:K})),P.normal&&(st.normal=new s.o({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:Z})),P.tangent&&(st.tangent=new s.o({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:j})),P.bitangent&&(st.bitangent=new s.o({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:H}))}if(r.e(t._offsetAttribute)){var xt=q.length,Pt=new Uint8Array(xt/3),gt=t._offsetAttribute===c.z.NONE?0:1;e.d(Pt,gt),st.applyOffset=new s.o({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:Pt})}return new s.I({attributes:st,indices:X,primitiveType:d._0x3b3836.TRIANGLES,boundingSphere:n.i.fromEllipsoid(_t),offsetAttribute:t._offsetAttribute})}}},b.getUnitEllipsoid=function(){return r.e(A)||(A=b.createGeometry(new b({radii:new a.o(1,1,1),vertexFormat:l.n.POSITION_ONLY}))),A},t.b=b})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidOutlineGeometry-37daafe9.js b/SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidOutlineGeometry-b56035c8.js similarity index 93% rename from SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidOutlineGeometry-37daafe9.js rename to SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidOutlineGeometry-b56035c8.js index 73727296..c8363474 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidOutlineGeometry-37daafe9.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidOutlineGeometry-b56035c8.js @@ -1 +1 @@ -define(["exports","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./when-92c6cf3c","./Check-52a7d806","./Cartesian2-b72655a5","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-cec0163f"],(function(i,t,e,o,n,r,a,s,m,u,f,c,d,_){"use strict";var l=new o.o(1,1,1),h=Math.cos,b=Math.sin;function p(i){i=r.u(i,r.u.EMPTY_OBJECT);var t=r.u(i.radii,l),e=r.u(i.innerRadii,t),n=r.u(i.minimumClock,0),s=r.u(i.maximumClock,d.e.TWO_PI),m=r.u(i.minimumCone,0),u=r.u(i.maximumCone,d.e.PI),c=Math.round(r.u(i.stackPartitions,10)),_=Math.round(r.u(i.slicePartitions,8)),h=Math.round(r.u(i.subdivisions,128));if(c<1)throw new a.t("options.stackPartitions cannot be less than 1");if(_<0)throw new a.t("options.slicePartitions cannot be less than 0");if(h<0)throw new a.t("options.subdivisions must be greater than or equal to zero.");if(r.e(i.offsetAttribute)&&i.offsetAttribute===f.z.TOP)throw new a.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=o.o.clone(t),this._innerRadii=o.o.clone(e),this._minimumClock=n,this._maximumClock=s,this._minimumCone=m,this._maximumCone=u,this._stackPartitions=c,this._slicePartitions=_,this._subdivisions=h,this._offsetAttribute=i.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}p.packedLength=2*o.o.packedLength+8,p.pack=function(i,t,e){if(!r.e(i))throw new a.t("value is required");if(!r.e(t))throw new a.t("array is required");return e=r.u(e,0),o.o.pack(i._radii,t,e),e+=o.o.packedLength,o.o.pack(i._innerRadii,t,e),e+=o.o.packedLength,t[e++]=i._minimumClock,t[e++]=i._maximumClock,t[e++]=i._minimumCone,t[e++]=i._maximumCone,t[e++]=i._stackPartitions,t[e++]=i._slicePartitions,t[e++]=i._subdivisions,t[e]=r.u(i._offsetAttribute,-1),t};var v=new o.o,k=new o.o,C={radii:v,innerRadii:k,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};p.unpack=function(i,t,e){if(!r.e(i))throw new a.t("array is required");t=r.u(t,0);var n=o.o.unpack(i,t,v);t+=o.o.packedLength;var s=o.o.unpack(i,t,k);t+=o.o.packedLength;var m=i[t++],u=i[t++],f=i[t++],c=i[t++],d=i[t++],_=i[t++],l=i[t++],h=i[t];return r.e(e)?(e._radii=o.o.clone(n,e._radii),e._innerRadii=o.o.clone(s,e._innerRadii),e._minimumClock=m,e._maximumClock=u,e._minimumCone=f,e._maximumCone=c,e._stackPartitions=d,e._slicePartitions=_,e._subdivisions=l,e._offsetAttribute=-1===h?void 0:h,e):(C.minimumClock=m,C.maximumClock=u,C.minimumCone=f,C.maximumCone=c,C.stackPartitions=d,C.slicePartitions=_,C.subdivisions=l,C.offsetAttribute=-1===h?void 0:h,new p(C))},p.createGeometry=function(i){var o=i._radii;if(!(o.x<=0||o.y<=0||o.z<=0)){var a=i._innerRadii;if(!(a.x<=0||a.y<=0||a.z<=0)){var l=i._minimumClock,p=i._maximumClock,v=i._minimumCone,k=i._maximumCone,C=i._subdivisions,y=s.t.fromCartesian3(o),w=i._slicePartitions+1,x=i._stackPartitions+1;(w=Math.round(w*Math.abs(p-l)/d.e.TWO_PI))<2&&(w=2),(x=Math.round(x*Math.abs(k-v)/d.e.PI))<2&&(x=2);var A=0,P=1,g=a.x!==o.x||a.y!==o.y||a.z!==o.z,M=!1,z=!1;g&&(P=2,v>0&&(M=!0,A+=w),k<Math.PI&&(z=!0,A+=w));var O,D,I,E,T=C*P*(x+w),L=new Float64Array(3*T),G=2*(T+A-(w+x)*P),R=c.IndexDatatype.createTypedArray(T,G),N=0,q=new Array(x),U=new Array(x);for(O=0;O<x;O++)E=v+O*(k-v)/(x-1),q[O]=b(E),U[O]=h(E);var B=new Array(C),F=new Array(C);for(O=0;O<C;O++)I=l+O*(p-l)/(C-1),B[O]=b(I),F[O]=h(I);for(O=0;O<x;O++)for(D=0;D<C;D++)L[N++]=o.x*q[O]*F[D],L[N++]=o.y*q[O]*B[D],L[N++]=o.z*U[O];if(g)for(O=0;O<x;O++)for(D=0;D<C;D++)L[N++]=a.x*q[O]*F[D],L[N++]=a.y*q[O]*B[D],L[N++]=a.z*U[O];for(q.length=C,U.length=C,O=0;O<C;O++)E=v+O*(k-v)/(C-1),q[O]=b(E),U[O]=h(E);for(B.length=w,F.length=w,O=0;O<w;O++)I=l+O*(p-l)/(w-1),B[O]=b(I),F[O]=h(I);for(O=0;O<C;O++)for(D=0;D<w;D++)L[N++]=o.x*q[O]*F[D],L[N++]=o.y*q[O]*B[D],L[N++]=o.z*U[O];if(g)for(O=0;O<C;O++)for(D=0;D<w;D++)L[N++]=a.x*q[O]*F[D],L[N++]=a.y*q[O]*B[D],L[N++]=a.z*U[O];for(N=0,O=0;O<x*P;O++){var S=O*C;for(D=0;D<C-1;D++)R[N++]=S+D,R[N++]=S+D+1}var W=x*C*P;for(O=0;O<w;O++)for(D=0;D<C-1;D++)R[N++]=W+O+D*w,R[N++]=W+O+(D+1)*w;if(g)for(W=x*C*P+w*C,O=0;O<w;O++)for(D=0;D<C-1;D++)R[N++]=W+O+D*w,R[N++]=W+O+(D+1)*w;if(g){var Y=x*C*P,J=Y+C*w;if(M)for(O=0;O<w;O++)R[N++]=Y+O,R[N++]=J+O;if(z)for(Y+=C*w-w,J+=C*w-w,O=0;O<w;O++)R[N++]=Y+O,R[N++]=J+O}var j=new u.a({position:new m.o({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:L})});if(r.e(i._offsetAttribute)){var H=L.length,K=new Uint8Array(H/3),Q=i._offsetAttribute===f.z.NONE?0:1;t.d(K,Q),j.applyOffset=new m.o({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:K})}return new m.I({attributes:j,indices:R,primitiveType:_._0x4b6a27.LINES,boundingSphere:e.i.fromEllipsoid(y),offsetAttribute:i._offsetAttribute})}}},i.x=p})); +define(["exports","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./when-92c6cf3c","./Check-52a7d806","./Cartesian2-b72655a5","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-fd297af4"],(function(i,t,e,o,n,r,a,s,m,u,f,c,d,_){"use strict";var l=new o.o(1,1,1),h=Math.cos,b=Math.sin;function p(i){i=r.u(i,r.u.EMPTY_OBJECT);var t=r.u(i.radii,l),e=r.u(i.innerRadii,t),n=r.u(i.minimumClock,0),s=r.u(i.maximumClock,d.e.TWO_PI),m=r.u(i.minimumCone,0),u=r.u(i.maximumCone,d.e.PI),c=Math.round(r.u(i.stackPartitions,10)),_=Math.round(r.u(i.slicePartitions,8)),h=Math.round(r.u(i.subdivisions,128));if(c<1)throw new a.t("options.stackPartitions cannot be less than 1");if(_<0)throw new a.t("options.slicePartitions cannot be less than 0");if(h<0)throw new a.t("options.subdivisions must be greater than or equal to zero.");if(r.e(i.offsetAttribute)&&i.offsetAttribute===f.z.TOP)throw new a.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=o.o.clone(t),this._innerRadii=o.o.clone(e),this._minimumClock=n,this._maximumClock=s,this._minimumCone=m,this._maximumCone=u,this._stackPartitions=c,this._slicePartitions=_,this._subdivisions=h,this._offsetAttribute=i.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}p.packedLength=2*o.o.packedLength+8,p.pack=function(i,t,e){if(!r.e(i))throw new a.t("value is required");if(!r.e(t))throw new a.t("array is required");return e=r.u(e,0),o.o.pack(i._radii,t,e),e+=o.o.packedLength,o.o.pack(i._innerRadii,t,e),e+=o.o.packedLength,t[e++]=i._minimumClock,t[e++]=i._maximumClock,t[e++]=i._minimumCone,t[e++]=i._maximumCone,t[e++]=i._stackPartitions,t[e++]=i._slicePartitions,t[e++]=i._subdivisions,t[e]=r.u(i._offsetAttribute,-1),t};var v=new o.o,k=new o.o,C={radii:v,innerRadii:k,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};p.unpack=function(i,t,e){if(!r.e(i))throw new a.t("array is required");t=r.u(t,0);var n=o.o.unpack(i,t,v);t+=o.o.packedLength;var s=o.o.unpack(i,t,k);t+=o.o.packedLength;var m=i[t++],u=i[t++],f=i[t++],c=i[t++],d=i[t++],_=i[t++],l=i[t++],h=i[t];return r.e(e)?(e._radii=o.o.clone(n,e._radii),e._innerRadii=o.o.clone(s,e._innerRadii),e._minimumClock=m,e._maximumClock=u,e._minimumCone=f,e._maximumCone=c,e._stackPartitions=d,e._slicePartitions=_,e._subdivisions=l,e._offsetAttribute=-1===h?void 0:h,e):(C.minimumClock=m,C.maximumClock=u,C.minimumCone=f,C.maximumCone=c,C.stackPartitions=d,C.slicePartitions=_,C.subdivisions=l,C.offsetAttribute=-1===h?void 0:h,new p(C))},p.createGeometry=function(i){var o=i._radii;if(!(o.x<=0||o.y<=0||o.z<=0)){var a=i._innerRadii;if(!(a.x<=0||a.y<=0||a.z<=0)){var l=i._minimumClock,p=i._maximumClock,v=i._minimumCone,k=i._maximumCone,C=i._subdivisions,y=s.t.fromCartesian3(o),w=i._slicePartitions+1,x=i._stackPartitions+1;(w=Math.round(w*Math.abs(p-l)/d.e.TWO_PI))<2&&(w=2),(x=Math.round(x*Math.abs(k-v)/d.e.PI))<2&&(x=2);var A=0,P=1,g=a.x!==o.x||a.y!==o.y||a.z!==o.z,M=!1,z=!1;g&&(P=2,v>0&&(M=!0,A+=w),k<Math.PI&&(z=!0,A+=w));var O,D,I,E,T=C*P*(x+w),L=new Float64Array(3*T),G=2*(T+A-(w+x)*P),R=c.IndexDatatype.createTypedArray(T,G),N=0,q=new Array(x),U=new Array(x);for(O=0;O<x;O++)E=v+O*(k-v)/(x-1),q[O]=b(E),U[O]=h(E);var B=new Array(C),F=new Array(C);for(O=0;O<C;O++)I=l+O*(p-l)/(C-1),B[O]=b(I),F[O]=h(I);for(O=0;O<x;O++)for(D=0;D<C;D++)L[N++]=o.x*q[O]*F[D],L[N++]=o.y*q[O]*B[D],L[N++]=o.z*U[O];if(g)for(O=0;O<x;O++)for(D=0;D<C;D++)L[N++]=a.x*q[O]*F[D],L[N++]=a.y*q[O]*B[D],L[N++]=a.z*U[O];for(q.length=C,U.length=C,O=0;O<C;O++)E=v+O*(k-v)/(C-1),q[O]=b(E),U[O]=h(E);for(B.length=w,F.length=w,O=0;O<w;O++)I=l+O*(p-l)/(w-1),B[O]=b(I),F[O]=h(I);for(O=0;O<C;O++)for(D=0;D<w;D++)L[N++]=o.x*q[O]*F[D],L[N++]=o.y*q[O]*B[D],L[N++]=o.z*U[O];if(g)for(O=0;O<C;O++)for(D=0;D<w;D++)L[N++]=a.x*q[O]*F[D],L[N++]=a.y*q[O]*B[D],L[N++]=a.z*U[O];for(N=0,O=0;O<x*P;O++){var S=O*C;for(D=0;D<C-1;D++)R[N++]=S+D,R[N++]=S+D+1}var W=x*C*P;for(O=0;O<w;O++)for(D=0;D<C-1;D++)R[N++]=W+O+D*w,R[N++]=W+O+(D+1)*w;if(g)for(W=x*C*P+w*C,O=0;O<w;O++)for(D=0;D<C-1;D++)R[N++]=W+O+D*w,R[N++]=W+O+(D+1)*w;if(g){var Y=x*C*P,J=Y+C*w;if(M)for(O=0;O<w;O++)R[N++]=Y+O,R[N++]=J+O;if(z)for(Y+=C*w-w,J+=C*w-w,O=0;O<w;O++)R[N++]=Y+O,R[N++]=J+O}var j=new u.a({position:new m.o({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:L})});if(r.e(i._offsetAttribute)){var H=L.length,K=new Uint8Array(H/3),Q=i._offsetAttribute===f.z.NONE?0:1;t.d(K,Q),j.applyOffset=new m.o({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:K})}return new m.I({attributes:j,indices:R,primitiveType:_._0x3b3836.LINES,boundingSphere:e.i.fromEllipsoid(y),offsetAttribute:i._offsetAttribute})}}},i.x=p})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidTangentPlane-d6b88a1f.js b/SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidTangentPlane-c500945e.js similarity index 82% rename from SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidTangentPlane-d6b88a1f.js rename to SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidTangentPlane-c500945e.js index 38e4411d..e635ec3c 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidTangentPlane-d6b88a1f.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/EllipsoidTangentPlane-c500945e.js @@ -1 +1 @@ -define(["exports","./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./buildModuleUrl-9eef8841","./Cartesian2-b72655a5","./Cartesian4-72b88c9e","./IntersectionTests-6e80d61c","./FeatureDetection-cec0163f","./Plane-33393da8","./GeometryAttribute-f47bd1cb"],(function(e,t,n,i,o,r,a,s,c,m,u){"use strict";function l(e,n,o){this.minimum=t.o.clone(i.u(e,t.o.ZERO)),this.maximum=t.o.clone(i.u(n,t.o.ZERO)),o=i.e(o)?t.o.clone(o):t.o.midpoint(this.minimum,this.maximum,new t.o),this.center=o}l.fromPoints=function(e,n){if(i.e(n)||(n=new l),!i.e(e)||0===e.length)return n.minimum=t.o.clone(t.o.ZERO,n.minimum),n.maximum=t.o.clone(t.o.ZERO,n.maximum),n.center=t.o.clone(t.o.ZERO,n.center),n;for(var o=e[0].x,r=e[0].y,a=e[0].z,s=e[0].x,c=e[0].y,m=e[0].z,u=e.length,h=1;h<u;h++){var f=e[h],p=f.x,d=f.y,x=f.z;o=Math.min(p,o),s=Math.max(p,s),r=Math.min(d,r),c=Math.max(d,c),a=Math.min(x,a),m=Math.max(x,m)}var y=n.minimum;y.x=o,y.y=r,y.z=a;var g=n.maximum;return g.x=s,g.y=c,g.z=m,n.center=t.o.midpoint(y,g,n.center),n},l.clone=function(e,n){if(i.e(e))return i.e(n)?(n.minimum=t.o.clone(e.minimum,n.minimum),n.maximum=t.o.clone(e.maximum,n.maximum),n.center=t.o.clone(e.center,n.center),n):new l(e.minimum,e.maximum,e.center)},l.equals=function(e,n){return e===n||i.e(e)&&i.e(n)&&t.o.equals(e.center,n.center)&&t.o.equals(e.minimum,n.minimum)&&t.o.equals(e.maximum,n.maximum)};var h=new t.o;l.intersectPlane=function(e,i){n.o.defined("box",e),n.o.defined("plane",i),h=t.o.subtract(e.maximum,e.minimum,h);var r=t.o.multiplyByScalar(h,.5,h),a=i.normal,s=r.x*Math.abs(a.x)+r.y*Math.abs(a.y)+r.z*Math.abs(a.z),c=t.o.dot(e.center,a)+i.distance;return c-s>0?o.S.INSIDE:c+s<0?o.S.OUTSIDE:o.S.INTERSECTING},l.prototype.clone=function(e){return l.clone(this,e)},l.prototype.intersectPlane=function(e){return l.intersectPlane(this,e)},l.prototype.equals=function(e){return l.equals(this,e)};var f=new a.e;function p(e,o){if(n.o.defined("origin",e),e=(o=i.u(o,r.t.WGS84)).scaleToGeodeticSurface(e),!i.e(e))throw new n.t("origin must not be at the center of the ellipsoid.");var a=u.m.eastNorthUpToFixedFrame(e,o);this._ellipsoid=o,this._origin=e,this._xAxis=t.o.fromCartesian4(c.p.getColumn(a,0,f)),this._yAxis=t.o.fromCartesian4(c.p.getColumn(a,1,f));var s=t.o.fromCartesian4(c.p.getColumn(a,2,f));this._plane=m.o.fromPointNormal(e,s)}Object.defineProperties(p.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var d=new l;p.fromPoints=function(e,t){return n.o.defined("cartesians",e),new p(l.fromPoints(e,d).center,t)};var x=new s.f,y=new t.o;p.prototype.projectPointOntoPlane=function(e,o){n.o.defined("cartesian",e);var a=x;a.origin=e,t.o.normalize(e,a.direction);var c=s.g.rayPlane(a,this._plane,y);if(i.e(c)||(t.o.negate(a.direction,a.direction),c=s.g.rayPlane(a,this._plane,y)),i.e(c)){var m=t.o.subtract(c,this._origin,c),u=t.o.dot(this._xAxis,m),l=t.o.dot(this._yAxis,m);return i.e(o)?(o.x=u,o.y=l,o):new r.o(u,l)}},p.prototype.projectPointsOntoPlane=function(e,t){n.o.defined("cartesians",e),i.e(t)||(t=[]);for(var o=0,r=e.length,a=0;a<r;a++){var s=this.projectPointOntoPlane(e[a],t[o]);i.e(s)&&(t[o]=s,o++)}return t.length=o,t},p.prototype.projectPointToNearestOnPlane=function(e,o){n.o.defined("cartesian",e),i.e(o)||(o=new r.o);var a=x;a.origin=e,t.o.clone(this._plane.normal,a.direction);var c=s.g.rayPlane(a,this._plane,y);i.e(c)||(t.o.negate(a.direction,a.direction),c=s.g.rayPlane(a,this._plane,y));var m=t.o.subtract(c,this._origin,c),u=t.o.dot(this._xAxis,m),l=t.o.dot(this._yAxis,m);return o.x=u,o.y=l,o},p.prototype.projectPointsToNearestOnPlane=function(e,t){n.o.defined("cartesians",e),i.e(t)||(t=[]);var o=e.length;t.length=o;for(var r=0;r<o;r++)t[r]=this.projectPointToNearestOnPlane(e[r],t[r]);return t};var g=new t.o;p.prototype.projectPointOntoEllipsoid=function(e,o){n.o.defined("cartesian",e),i.e(o)||(o=new t.o);var r=this._ellipsoid,a=this._origin,s=this._xAxis,c=this._yAxis,m=g;return t.o.multiplyByScalar(s,e.x,m),o=t.o.add(a,m,o),t.o.multiplyByScalar(c,e.y,m),t.o.add(o,m,o),r.scaleToGeocentricSurface(o,o),o},p.prototype.projectPointsOntoEllipsoid=function(e,t){n.o.defined("cartesians",e);var o=e.length;i.e(t)?t.length=o:t=new Array(o);for(var r=0;r<o;++r)t[r]=this.projectPointOntoEllipsoid(e[r],t[r]);return t},e.e=l,e.f=p})); +define(["exports","./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./buildModuleUrl-cbcc8c56","./Cartesian2-b72655a5","./Cartesian4-72b88c9e","./IntersectionTests-9ff29c98","./FeatureDetection-fd297af4","./Plane-a2c6da7b","./GeometryAttribute-65cf868d"],(function(e,t,n,i,o,r,a,s,c,m,u){"use strict";function l(e,n,o){this.minimum=t.o.clone(i.u(e,t.o.ZERO)),this.maximum=t.o.clone(i.u(n,t.o.ZERO)),o=i.e(o)?t.o.clone(o):t.o.midpoint(this.minimum,this.maximum,new t.o),this.center=o}l.fromPoints=function(e,n){if(i.e(n)||(n=new l),!i.e(e)||0===e.length)return n.minimum=t.o.clone(t.o.ZERO,n.minimum),n.maximum=t.o.clone(t.o.ZERO,n.maximum),n.center=t.o.clone(t.o.ZERO,n.center),n;for(var o=e[0].x,r=e[0].y,a=e[0].z,s=e[0].x,c=e[0].y,m=e[0].z,u=e.length,f=1;f<u;f++){var h=e[f],p=h.x,d=h.y,x=h.z;o=Math.min(p,o),s=Math.max(p,s),r=Math.min(d,r),c=Math.max(d,c),a=Math.min(x,a),m=Math.max(x,m)}var y=n.minimum;y.x=o,y.y=r,y.z=a;var g=n.maximum;return g.x=s,g.y=c,g.z=m,n.center=t.o.midpoint(y,g,n.center),n},l.clone=function(e,n){if(i.e(e))return i.e(n)?(n.minimum=t.o.clone(e.minimum,n.minimum),n.maximum=t.o.clone(e.maximum,n.maximum),n.center=t.o.clone(e.center,n.center),n):new l(e.minimum,e.maximum,e.center)},l.equals=function(e,n){return e===n||i.e(e)&&i.e(n)&&t.o.equals(e.center,n.center)&&t.o.equals(e.minimum,n.minimum)&&t.o.equals(e.maximum,n.maximum)};var f=new t.o;l.intersectPlane=function(e,i){n.o.defined("box",e),n.o.defined("plane",i),f=t.o.subtract(e.maximum,e.minimum,f);var r=t.o.multiplyByScalar(f,.5,f),a=i.normal,s=r.x*Math.abs(a.x)+r.y*Math.abs(a.y)+r.z*Math.abs(a.z),c=t.o.dot(e.center,a)+i.distance;return c-s>0?o.S.INSIDE:c+s<0?o.S.OUTSIDE:o.S.INTERSECTING},l.prototype.clone=function(e){return l.clone(this,e)},l.prototype.intersectPlane=function(e){return l.intersectPlane(this,e)},l.prototype.equals=function(e){return l.equals(this,e)};var h=new a.e;function p(e,o){if(n.o.defined("origin",e),e=(o=i.u(o,r.t.WGS84)).scaleToGeodeticSurface(e),!i.e(e))throw new n.t("origin must not be at the center of the ellipsoid.");var a=u.m.eastNorthUpToFixedFrame(e,o);this._ellipsoid=o,this._origin=e,this._xAxis=t.o.fromCartesian4(c.p.getColumn(a,0,h)),this._yAxis=t.o.fromCartesian4(c.p.getColumn(a,1,h));var s=t.o.fromCartesian4(c.p.getColumn(a,2,h));this._plane=m.o.fromPointNormal(e,s)}Object.defineProperties(p.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var d=new l;p.fromPoints=function(e,t){return n.o.defined("cartesians",e),new p(l.fromPoints(e,d).center,t)};var x=new s.f,y=new t.o;p.prototype.projectPointOntoPlane=function(e,o){n.o.defined("cartesian",e);var a=x;a.origin=e,t.o.normalize(e,a.direction);var c=s.g.rayPlane(a,this._plane,y);if(i.e(c)||(t.o.negate(a.direction,a.direction),c=s.g.rayPlane(a,this._plane,y)),i.e(c)){var m=t.o.subtract(c,this._origin,c),u=t.o.dot(this._xAxis,m),l=t.o.dot(this._yAxis,m);return i.e(o)?(o.x=u,o.y=l,o):new r.o(u,l)}},p.prototype.projectPointsOntoPlane=function(e,t){n.o.defined("cartesians",e),i.e(t)||(t=[]);for(var o=0,r=e.length,a=0;a<r;a++){var s=this.projectPointOntoPlane(e[a],t[o]);i.e(s)&&(t[o]=s,o++)}return t.length=o,t},p.prototype.projectPointToNearestOnPlane=function(e,o){n.o.defined("cartesian",e),i.e(o)||(o=new r.o);var a=x;a.origin=e,t.o.clone(this._plane.normal,a.direction);var c=s.g.rayPlane(a,this._plane,y);i.e(c)||(t.o.negate(a.direction,a.direction),c=s.g.rayPlane(a,this._plane,y));var m=t.o.subtract(c,this._origin,c),u=t.o.dot(this._xAxis,m),l=t.o.dot(this._yAxis,m);return o.x=u,o.y=l,o},p.prototype.projectPointsToNearestOnPlane=function(e,t){n.o.defined("cartesians",e),i.e(t)||(t=[]);var o=e.length;t.length=o;for(var r=0;r<o;r++)t[r]=this.projectPointToNearestOnPlane(e[r],t[r]);return t};var g=new t.o;p.prototype.projectPointOntoEllipsoid=function(e,o){n.o.defined("cartesian",e),i.e(o)||(o=new t.o);var r=this._ellipsoid,a=this._origin,s=this._xAxis,c=this._yAxis,m=g;return t.o.multiplyByScalar(s,e.x,m),o=t.o.add(a,m,o),t.o.multiplyByScalar(c,e.y,m),t.o.add(o,m,o),r.scaleToGeocentricSurface(o,o),o},p.prototype.projectPointsOntoEllipsoid=function(e,t){n.o.defined("cartesians",e);var o=e.length;i.e(t)?t.length=o:t=new Array(o);for(var r=0;r<o;++r)t[r]=this.projectPointOntoEllipsoid(e[r],t[r]);return t},e.e=l,e.f=p})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/FeatureDetection-cec0163f.js b/SuperMap iEarth/public/SuperMap3D/Workers/FeatureDetection-fd297af4.js similarity index 99% rename from SuperMap iEarth/public/SuperMap3D/Workers/FeatureDetection-cec0163f.js rename to SuperMap iEarth/public/SuperMap3D/Workers/FeatureDetection-fd297af4.js index 9a3b81af..9437a8e5 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/FeatureDetection-cec0163f.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/FeatureDetection-fd297af4.js @@ -1 +1 @@ -define(["exports","./Cartesian3-3a8bdb0b","./Cartesian4-72b88c9e","./Check-52a7d806","./when-92c6cf3c","./Math-ecf82623","./RuntimeError-c6a62a80","./WebGLConstants-42651efd"],(function(e,t,n,r,o,a,u,i){"use strict";function s(e,t,n,r,a,u,i,s,c){this[0]=o.u(e,0),this[1]=o.u(r,0),this[2]=o.u(i,0),this[3]=o.u(t,0),this[4]=o.u(a,0),this[5]=o.u(s,0),this[6]=o.u(n,0),this[7]=o.u(u,0),this[8]=o.u(c,0),this.isMatrix3=!0}s.packedLength=9,s.pack=function(e,t,n){return r.o.typeOf.object("value",e),r.o.defined("array",t),n=o.u(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t},s.unpack=function(e,t,n){return r.o.defined("array",e),t=o.u(t,0),o.e(n)||(n=new s),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n},s.clone=function(e,t){if(o.e(e))return o.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new s(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},s.fromArray=function(e,t,n){return r.o.defined("array",e),t=o.u(t,0),o.e(n)||(n=new s),n[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n[4]=e[t+4],n[5]=e[t+5],n[6]=e[t+6],n[7]=e[t+7],n[8]=e[t+8],n},s.fromColumnMajorArray=function(e,t){return r.o.defined("values",e),s.clone(e,t)},s.fromRowMajorArray=function(e,t){return r.o.defined("values",e),o.e(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new s(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},s.fromQuaternion=function(e,t){r.o.typeOf.object("quaternion",e);var n=e.x*e.x,a=e.x*e.y,u=e.x*e.z,i=e.x*e.w,c=e.y*e.y,f=e.y*e.z,l=e.y*e.w,p=e.z*e.z,y=e.z*e.w,b=e.w*e.w,O=n-c-p+b,m=2*(a-y),h=2*(u+l),d=2*(a+y),x=-n+c-p+b,j=2*(f-i),g=2*(u-l),v=2*(f+i),E=-n-c+p+b;return o.e(t)?(t[0]=O,t[1]=d,t[2]=g,t[3]=m,t[4]=x,t[5]=v,t[6]=h,t[7]=j,t[8]=E,t):new s(O,m,h,d,x,j,g,v,E)},s.fromHeadingPitchRoll=function(e,t){r.o.typeOf.object("headingPitchRoll",e);var n=Math.cos(-e.pitch),a=Math.cos(-e.heading),u=Math.cos(e.roll),i=Math.sin(-e.pitch),c=Math.sin(-e.heading),f=Math.sin(e.roll),l=n*a,p=-u*c+f*i*a,y=f*c+u*i*a,b=n*c,O=u*a+f*i*c,m=-f*a+u*i*c,h=-i,d=f*n,x=u*n;return o.e(t)?(t[0]=l,t[1]=b,t[2]=h,t[3]=p,t[4]=O,t[5]=d,t[6]=y,t[7]=m,t[8]=x,t):new s(l,p,y,b,O,m,h,d,x)},s.fromScale=function(e,t){return r.o.typeOf.object("scale",e),o.e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new s(e.x,0,0,0,e.y,0,0,0,e.z)},s.fromUniformScale=function(e,t){return r.o.typeOf.number("scale",e),o.e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new s(e,0,0,0,e,0,0,0,e)},s.fromCrossProduct=function(e,t){return r.o.typeOf.object("vector",e),o.e(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new s(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},s.fromRotationX=function(e,t){r.o.typeOf.number("angle",e);var n=Math.cos(e),a=Math.sin(e);return o.e(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=a,t[6]=0,t[7]=-a,t[8]=n,t):new s(1,0,0,0,n,-a,0,a,n)},s.fromRotationY=function(e,t){r.o.typeOf.number("angle",e);var n=Math.cos(e),a=Math.sin(e);return o.e(t)?(t[0]=n,t[1]=0,t[2]=-a,t[3]=0,t[4]=1,t[5]=0,t[6]=a,t[7]=0,t[8]=n,t):new s(n,0,a,0,1,0,-a,0,n)},s.fromRotationZ=function(e,t){r.o.typeOf.number("angle",e);var n=Math.cos(e),a=Math.sin(e);return o.e(t)?(t[0]=n,t[1]=a,t[2]=0,t[3]=-a,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new s(n,-a,0,a,n,0,0,0,1)},s.toArray=function(e,t){return r.o.typeOf.object("matrix",e),o.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},s.getElementIndex=function(e,t){return r.o.typeOf.number.greaterThanOrEquals("row",t,0),r.o.typeOf.number.lessThanOrEquals("row",t,2),r.o.typeOf.number.greaterThanOrEquals("column",e,0),r.o.typeOf.number.lessThanOrEquals("column",e,2),3*e+t},s.getColumn=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,2),r.o.typeOf.object("result",n);var o=3*t,a=e[o],u=e[o+1],i=e[o+2];return n.x=a,n.y=u,n.z=i,n},s.setColumn=function(e,t,n,o){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,2),r.o.typeOf.object("cartesian",n),r.o.typeOf.object("result",o);var a=3*t;return(o=s.clone(e,o))[a]=n.x,o[a+1]=n.y,o[a+2]=n.z,o},s.getRow=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,2),r.o.typeOf.object("result",n);var o=e[t],a=e[t+3],u=e[t+6];return n.x=o,n.y=a,n.z=u,n},s.setRow=function(e,t,n,o){return r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,2),r.o.typeOf.object("cartesian",n),r.o.typeOf.object("result",o),(o=s.clone(e,o))[t]=n.x,o[t+3]=n.y,o[t+6]=n.z,o};var c=new t.o;s.getScale=function(e,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",n),n.x=t.o.magnitude(t.o.fromElements(e[0],e[1],e[2],c)),n.y=t.o.magnitude(t.o.fromElements(e[3],e[4],e[5],c)),n.z=t.o.magnitude(t.o.fromElements(e[6],e[7],e[8],c)),n};var f=new t.o;s.getMaximumScale=function(e){return s.getScale(e,f),t.o.maximumComponent(f)},s.multiply=function(e,t,n){r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n);var o=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],a=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],u=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],i=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],s=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],c=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],f=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],l=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],p=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=o,n[1]=a,n[2]=u,n[3]=i,n[4]=s,n[5]=c,n[6]=f,n[7]=l,n[8]=p,n},s.add=function(e,t,n){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n},s.subtract=function(e,t,n){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n},s.multiplyByVector=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("cartesian",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z,i=e[0]*o+e[3]*a+e[6]*u,s=e[1]*o+e[4]*a+e[7]*u,c=e[2]*o+e[5]*a+e[8]*u;return n.x=i,n.y=s,n.z=c,n},s.multiplyByScalar=function(e,t,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.number("scalar",t),r.o.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},s.multiplyByScale=function(e,t,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("scale",t),r.o.typeOf.object("result",n),n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n},s.negate=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},s.transpose=function(e,t){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t);var n=e[0],o=e[3],a=e[6],u=e[1],i=e[4],s=e[7],c=e[2],f=e[5],l=e[8];return t[0]=n,t[1]=o,t[2]=a,t[3]=u,t[4]=i,t[5]=s,t[6]=c,t[7]=f,t[8]=l,t};var l=new t.o(1,1,1);s.getRotation=function(e,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",n);var o=t.o.divideComponents(l,s.getScale(e,f),f);return n=s.multiplyByScale(e,o,n)};var p=[1,0,0],y=[2,2,1];function b(e){for(var t=0,n=0;n<3;++n){var r=e[s.getElementIndex(y[n],p[n])];t+=2*r*r}return Math.sqrt(t)}function O(e,t){for(var n=a.e.EPSILON15,r=0,o=1,u=0;u<3;++u){var i=Math.abs(e[s.getElementIndex(y[u],p[u])]);i>r&&(o=u,r=i)}var c=1,f=0,l=p[o],b=y[o];if(Math.abs(e[s.getElementIndex(b,l)])>n){var O,m=(e[s.getElementIndex(b,b)]-e[s.getElementIndex(l,l)])/2/e[s.getElementIndex(b,l)];f=(O=m<0?-1/(-m+Math.sqrt(1+m*m)):1/(m+Math.sqrt(1+m*m)))*(c=1/Math.sqrt(1+O*O))}return(t=s.clone(s.IDENTITY,t))[s.getElementIndex(l,l)]=t[s.getElementIndex(b,b)]=c,t[s.getElementIndex(b,l)]=f,t[s.getElementIndex(l,b)]=-f,t}var m=new s,h=new s;function d(e,t,n,r,a,u,i,s,c,f,l,p,y,b,O,m){this[0]=o.u(e,0),this[1]=o.u(a,0),this[2]=o.u(c,0),this[3]=o.u(y,0),this[4]=o.u(t,0),this[5]=o.u(u,0),this[6]=o.u(f,0),this[7]=o.u(b,0),this[8]=o.u(n,0),this[9]=o.u(i,0),this[10]=o.u(l,0),this[11]=o.u(O,0),this[12]=o.u(r,0),this[13]=o.u(s,0),this[14]=o.u(p,0),this[15]=o.u(m,0),this.isMatrix4=!0}s.computeEigenDecomposition=function(e,t){r.o.typeOf.object("matrix",e);var n=a.e.EPSILON20,u=0,i=0;o.e(t)||(t={});for(var c=t.unitary=s.clone(s.IDENTITY,t.unitary),f=t.diagonal=s.clone(e,t.diagonal),l=n*function(e){for(var t=0,n=0;n<9;++n){var r=e[n];t+=r*r}return Math.sqrt(t)}(f);i<10&&b(f)>l;)O(f,m),s.transpose(m,h),s.multiply(f,m,f),s.multiply(h,f,f),s.multiply(c,m,c),++u>2&&(++i,u=0);return t},s.abs=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},s.determinant=function(e){r.o.typeOf.object("matrix",e);var t=e[0],n=e[3],o=e[6],a=e[1],u=e[4],i=e[7],s=e[2],c=e[5],f=e[8];return t*(u*f-c*i)+a*(c*o-n*f)+s*(n*i-u*o)},s.inverse=function(e,t){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t);var n=e[0],o=e[1],u=e[2],i=e[3],c=e[4],f=e[5],l=e[6],p=e[7],y=e[8],b=s.determinant(e);if(Math.abs(b)<=a.e.EPSILON15)throw new r.t("matrix is not invertible");t[0]=c*y-p*f,t[1]=p*u-o*y,t[2]=o*f-c*u,t[3]=l*f-i*y,t[4]=n*y-l*u,t[5]=i*u-n*f,t[6]=i*p-l*c,t[7]=l*o-n*p,t[8]=n*c-i*o;var O=1/b;return s.multiplyByScalar(t,O,t)},s.equals=function(e,t){return e===t||o.e(e)&&o.e(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},s.equalsEpsilon=function(e,t,n){return r.o.typeOf.number("epsilon",n),e===t||o.e(e)&&o.e(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n},s.IDENTITY=Object.freeze(new s(1,0,0,0,1,0,0,0,1)),s.ZERO=Object.freeze(new s(0,0,0,0,0,0,0,0,0)),s.COLUMN0ROW0=0,s.COLUMN0ROW1=1,s.COLUMN0ROW2=2,s.COLUMN1ROW0=3,s.COLUMN1ROW1=4,s.COLUMN1ROW2=5,s.COLUMN2ROW0=6,s.COLUMN2ROW1=7,s.COLUMN2ROW2=8,Object.defineProperties(s.prototype,{length:{get:function(){return s.packedLength}}}),s.prototype.clone=function(e){return s.clone(this,e)},s.prototype.equals=function(e){return s.equals(this,e)},s.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]},s.prototype.equalsEpsilon=function(e,t){return s.equalsEpsilon(this,e,t)},s.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},s.prototype.toArray=function(e,t){s.pack(this,e,t)},d.packedLength=16,d.pack=function(e,t,n){return r.o.typeOf.object("value",e),r.o.defined("array",t),n=o.u(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t[n++]=e[9],t[n++]=e[10],t[n++]=e[11],t[n++]=e[12],t[n++]=e[13],t[n++]=e[14],t[n]=e[15],t},d.unpack=function(e,t,n){return r.o.defined("array",e),t=o.u(t,0),o.e(n)||(n=new d),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n[9]=e[t++],n[10]=e[t++],n[11]=e[t++],n[12]=e[t++],n[13]=e[t++],n[14]=e[t++],n[15]=e[t],n},d.clone=function(e,t){if(o.e(e))return o.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new d(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])},d.fromArray=d.unpack,d.fromColumnMajorArray=function(e,t){return r.o.defined("values",e),d.clone(e,t)},d.fromRowMajorArray=function(e,t){return r.o.defined("values",e),o.e(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new d(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},d.fromRotationTranslation=function(e,n,a){return r.o.typeOf.object("rotation",e),n=o.u(n,t.o.ZERO),o.e(a)?(a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=0,a[4]=e[3],a[5]=e[4],a[6]=e[5],a[7]=0,a[8]=e[6],a[9]=e[7],a[10]=e[8],a[11]=0,a[12]=n.x,a[13]=n.y,a[14]=n.z,a[15]=1,a):new d(e[0],e[3],e[6],n.x,e[1],e[4],e[7],n.y,e[2],e[5],e[8],n.z,0,0,0,1)},d.fromTranslationQuaternionRotationScale=function(e,t,n,a){r.o.typeOf.object("translation",e),r.o.typeOf.object("rotation",t),r.o.typeOf.object("scale",n),o.e(a)||(a=new d);var u=n.x,i=n.y,s=n.z,c=t.x*t.x,f=t.x*t.y,l=t.x*t.z,p=t.x*t.w,y=t.y*t.y,b=t.y*t.z,O=t.y*t.w,m=t.z*t.z,h=t.z*t.w,x=t.w*t.w,j=c-y-m+x,g=2*(f-h),v=2*(l+O),E=2*(f+h),M=-c+y-m+x,w=2*(b-p),R=2*(l-O),T=2*(b+p),A=-c-y+m+x;return a[0]=j*u,a[1]=E*u,a[2]=R*u,a[3]=0,a[4]=g*i,a[5]=M*i,a[6]=T*i,a[7]=0,a[8]=v*s,a[9]=w*s,a[10]=A*s,a[11]=0,a[12]=e.x,a[13]=e.y,a[14]=e.z,a[15]=1,a},d.fromTranslationRotationScale=function(e,t){return r.o.typeOf.object("translationRotationScale",e),d.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},d.fromTranslation=function(e,t){return r.o.typeOf.object("translation",e),d.fromRotationTranslation(s.IDENTITY,e,t)},d.fromScale=function(e,t){return r.o.typeOf.object("scale",e),o.e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new d(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},d.fromUniformScale=function(e,t){return r.o.typeOf.number("scale",e),o.e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new d(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};var x=new t.o,j=new t.o,g=new t.o;d.fromCamera=function(e,n){r.o.typeOf.object("camera",e);var a=e.position,u=e.direction,i=e.up;r.o.typeOf.object("camera.position",a),r.o.typeOf.object("camera.direction",u),r.o.typeOf.object("camera.up",i),t.o.normalize(u,x),t.o.normalize(t.o.cross(x,i,j),j),t.o.normalize(t.o.cross(j,x,g),g);var s=j.x,c=j.y,f=j.z,l=x.x,p=x.y,y=x.z,b=g.x,O=g.y,m=g.z,h=a.x,v=a.y,E=a.z,M=s*-h+c*-v+f*-E,w=b*-h+O*-v+m*-E,R=l*h+p*v+y*E;return o.e(n)?(n[0]=s,n[1]=b,n[2]=-l,n[3]=0,n[4]=c,n[5]=O,n[6]=-p,n[7]=0,n[8]=f,n[9]=m,n[10]=-y,n[11]=0,n[12]=M,n[13]=w,n[14]=R,n[15]=1,n):new d(s,c,f,M,b,O,m,w,-l,-p,-y,R,0,0,0,1)},d.computePerspectiveFieldOfView=function(e,t,n,o,a){r.o.typeOf.number.greaterThan("fovY",e,0),r.o.typeOf.number.lessThan("fovY",e,Math.PI),r.o.typeOf.number.greaterThan("near",n,0),r.o.typeOf.number.greaterThan("far",o,0),r.o.typeOf.object("result",a);var u=1/Math.tan(.5*e),i=u/t,s=(o+n)/(n-o),c=2*o*n/(n-o);return a[0]=i,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=u,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=s,a[11]=-1,a[12]=0,a[13]=0,a[14]=c,a[15]=0,a},d.computeOrthographicOffCenter=function(e,t,n,o,a,u,i){r.o.typeOf.number("left",e),r.o.typeOf.number("right",t),r.o.typeOf.number("bottom",n),r.o.typeOf.number("top",o),r.o.typeOf.number("near",a),r.o.typeOf.number("far",u),r.o.typeOf.object("result",i);var s=1/(t-e),c=1/(o-n),f=1/(u-a),l=-(t+e)*s,p=-(o+n)*c,y=-(u+a)*f;return s*=2,c*=2,f*=-2,i[0]=s,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=c,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=f,i[11]=0,i[12]=l,i[13]=p,i[14]=y,i[15]=1,d.halfZRange&&d.multiply(d.ConvertNDCToHalfZRange,i,i),i},d.computePerspectiveOffCenter=function(e,t,n,o,a,u,i){r.o.typeOf.number("left",e),r.o.typeOf.number("right",t),r.o.typeOf.number("bottom",n),r.o.typeOf.number("top",o),r.o.typeOf.number("near",a),r.o.typeOf.number("far",u),r.o.typeOf.object("result",i);var s=2*a/(t-e),c=2*a/(o-n),f=(t+e)/(t-e),l=(o+n)/(o-n),p=-(u+a)/(u-a),y=-2*u*a/(u-a);return i[0]=s,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=c,i[6]=0,i[7]=0,i[8]=f,i[9]=l,i[10]=p,i[11]=-1,i[12]=0,i[13]=0,i[14]=y,i[15]=0,d.halfZRange&&d.multiply(d.ConvertNDCToHalfZRange,i,i),i},d.computeInfinitePerspectiveOffCenter=function(e,t,n,o,a,u){r.o.typeOf.number("left",e),r.o.typeOf.number("right",t),r.o.typeOf.number("bottom",n),r.o.typeOf.number("top",o),r.o.typeOf.number("near",a),r.o.typeOf.object("result",u);var i=2*a/(t-e),s=2*a/(o-n),c=(t+e)/(t-e),f=(o+n)/(o-n),l=-2*a;return u[0]=i,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=s,u[6]=0,u[7]=0,u[8]=c,u[9]=f,u[10]=-1,u[11]=-1,u[12]=0,u[13]=0,u[14]=l,u[15]=0,d.halfZRange&&d.multiply(d.ConvertNDCToHalfZRange,u,u),u},d.computeViewportTransformation=function(e,t,n,a){r.o.typeOf.object("result",a),e=o.u(e,o.u.EMPTY_OBJECT);var u=o.u(e.x,0),i=o.u(e.y,0),s=o.u(e.width,0),c=o.u(e.height,0);t=o.u(t,0);var f=.5*s,l=.5*c,p=.5*((n=o.u(n,1))-t),y=f,b=l,O=p,m=u+f,h=i+l,d=t+p;return a[0]=y,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=b,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=O,a[11]=0,a[12]=m,a[13]=h,a[14]=d,a[15]=1,a},d.computeView=function(e,n,o,a,u){return r.o.typeOf.object("position",e),r.o.typeOf.object("direction",n),r.o.typeOf.object("up",o),r.o.typeOf.object("right",a),r.o.typeOf.object("result",u),u[0]=a.x,u[1]=o.x,u[2]=-n.x,u[3]=0,u[4]=a.y,u[5]=o.y,u[6]=-n.y,u[7]=0,u[8]=a.z,u[9]=o.z,u[10]=-n.z,u[11]=0,u[12]=-t.o.dot(a,e),u[13]=-t.o.dot(o,e),u[14]=t.o.dot(n,e),u[15]=1,u},d.toArray=function(e,t){return r.o.typeOf.object("matrix",e),o.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},d.getElementIndex=function(e,t){return r.o.typeOf.number.greaterThanOrEquals("row",t,0),r.o.typeOf.number.lessThanOrEquals("row",t,3),r.o.typeOf.number.greaterThanOrEquals("column",e,0),r.o.typeOf.number.lessThanOrEquals("column",e,3),4*e+t},d.getColumn=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,3),r.o.typeOf.object("result",n);var o=4*t,a=e[o],u=e[o+1],i=e[o+2],s=e[o+3];return n.x=a,n.y=u,n.z=i,n.w=s,n},d.setColumn=function(e,t,n,o){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,3),r.o.typeOf.object("cartesian",n),r.o.typeOf.object("result",o);var a=4*t;return(o=d.clone(e,o))[a]=n.x,o[a+1]=n.y,o[a+2]=n.z,o[a+3]=n.w,o},d.setTranslation=function(e,t,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("translation",t),r.o.typeOf.object("result",n),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=e[15],n};var v=new t.o;d.setScale=function(e,n,o){r.o.typeOf.object("matrix",e),r.o.typeOf.object("scale",n),r.o.typeOf.object("result",o);var a=d.getScale(e,v),u=t.o.divideComponents(n,a,v);return d.multiplyByScale(e,u,o)},d.getRow=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,3),r.o.typeOf.object("result",n);var o=e[t],a=e[t+4],u=e[t+8],i=e[t+12];return n.x=o,n.y=a,n.z=u,n.w=i,n},d.setRow=function(e,t,n,o){return r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,3),r.o.typeOf.object("cartesian",n),r.o.typeOf.object("result",o),(o=d.clone(e,o))[t]=n.x,o[t+4]=n.y,o[t+8]=n.z,o[t+12]=n.w,o};var E=new t.o;d.getScale=function(e,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",n),n.x=t.o.magnitude(t.o.fromElements(e[0],e[1],e[2],E)),n.y=t.o.magnitude(t.o.fromElements(e[4],e[5],e[6],E)),n.z=t.o.magnitude(t.o.fromElements(e[8],e[9],e[10],E)),n};var M=new t.o;d.getMaximumScale=function(e){return d.getScale(e,M),t.o.maximumComponent(M)},d.multiply=function(e,t,n){r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n);var o=e[0],a=e[1],u=e[2],i=e[3],s=e[4],c=e[5],f=e[6],l=e[7],p=e[8],y=e[9],b=e[10],O=e[11],m=e[12],h=e[13],d=e[14],x=e[15],j=t[0],g=t[1],v=t[2],E=t[3],M=t[4],w=t[5],R=t[6],T=t[7],A=t[8],z=t[9],N=t[10],C=t[11],I=t[12],S=t[13],L=t[14],q=t[15],F=o*j+s*g+p*v+m*E,P=a*j+c*g+y*v+h*E,W=u*j+f*g+b*v+d*E,U=i*j+l*g+O*v+x*E,B=o*M+s*w+p*R+m*T,k=a*M+c*w+y*R+h*T,V=u*M+f*w+b*R+d*T,_=i*M+l*w+O*R+x*T,D=o*A+s*z+p*N+m*C,Z=a*A+c*z+y*N+h*C,G=u*A+f*z+b*N+d*C,Y=i*A+l*z+O*N+x*C,Q=o*I+s*S+p*L+m*q,H=a*I+c*S+y*L+h*q,J=u*I+f*S+b*L+d*q,X=i*I+l*S+O*L+x*q;return n[0]=F,n[1]=P,n[2]=W,n[3]=U,n[4]=B,n[5]=k,n[6]=V,n[7]=_,n[8]=D,n[9]=Z,n[10]=G,n[11]=Y,n[12]=Q,n[13]=H,n[14]=J,n[15]=X,n},d.add=function(e,t,n){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n[9]=e[9]+t[9],n[10]=e[10]+t[10],n[11]=e[11]+t[11],n[12]=e[12]+t[12],n[13]=e[13]+t[13],n[14]=e[14]+t[14],n[15]=e[15]+t[15],n},d.subtract=function(e,t,n){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n[9]=e[9]-t[9],n[10]=e[10]-t[10],n[11]=e[11]-t[11],n[12]=e[12]-t[12],n[13]=e[13]-t[13],n[14]=e[14]-t[14],n[15]=e[15]-t[15],n},d.multiplyTransformation=function(e,t,n){r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n);var o=e[0],a=e[1],u=e[2],i=e[4],s=e[5],c=e[6],f=e[8],l=e[9],p=e[10],y=e[12],b=e[13],O=e[14],m=t[0],h=t[1],d=t[2],x=t[4],j=t[5],g=t[6],v=t[8],E=t[9],M=t[10],w=t[12],R=t[13],T=t[14],A=o*m+i*h+f*d,z=a*m+s*h+l*d,N=u*m+c*h+p*d,C=o*x+i*j+f*g,I=a*x+s*j+l*g,S=u*x+c*j+p*g,L=o*v+i*E+f*M,q=a*v+s*E+l*M,F=u*v+c*E+p*M,P=o*w+i*R+f*T+y,W=a*w+s*R+l*T+b,U=u*w+c*R+p*T+O;return n[0]=A,n[1]=z,n[2]=N,n[3]=0,n[4]=C,n[5]=I,n[6]=S,n[7]=0,n[8]=L,n[9]=q,n[10]=F,n[11]=0,n[12]=P,n[13]=W,n[14]=U,n[15]=1,n},d.multiplyByMatrix3=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("rotation",t),r.o.typeOf.object("result",n);var o=e[0],a=e[1],u=e[2],i=e[4],s=e[5],c=e[6],f=e[8],l=e[9],p=e[10],y=t[0],b=t[1],O=t[2],m=t[3],h=t[4],d=t[5],x=t[6],j=t[7],g=t[8],v=o*y+i*b+f*O,E=a*y+s*b+l*O,M=u*y+c*b+p*O,w=o*m+i*h+f*d,R=a*m+s*h+l*d,T=u*m+c*h+p*d,A=o*x+i*j+f*g,z=a*x+s*j+l*g,N=u*x+c*j+p*g;return n[0]=v,n[1]=E,n[2]=M,n[3]=0,n[4]=w,n[5]=R,n[6]=T,n[7]=0,n[8]=A,n[9]=z,n[10]=N,n[11]=0,n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n},d.multiplyByTranslation=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("translation",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z,i=o*e[0]+a*e[4]+u*e[8]+e[12],s=o*e[1]+a*e[5]+u*e[9]+e[13],c=o*e[2]+a*e[6]+u*e[10]+e[14];return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=i,n[13]=s,n[14]=c,n[15]=e[15],n};var w=new t.o;d.multiplyByUniformScale=function(e,t,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.number("scale",t),r.o.typeOf.object("result",n),w.x=t,w.y=t,w.z=t,d.multiplyByScale(e,w,n)},d.multiplyByScale=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("scale",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z;return 1===o&&1===a&&1===u?d.clone(e,n):(n[0]=o*e[0],n[1]=o*e[1],n[2]=o*e[2],n[3]=0,n[4]=a*e[4],n[5]=a*e[5],n[6]=a*e[6],n[7]=0,n[8]=u*e[8],n[9]=u*e[9],n[10]=u*e[10],n[11]=0,n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=1,n)},d.multiplyByVector=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("cartesian",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z,i=t.w,s=e[0]*o+e[4]*a+e[8]*u+e[12]*i,c=e[1]*o+e[5]*a+e[9]*u+e[13]*i,f=e[2]*o+e[6]*a+e[10]*u+e[14]*i,l=e[3]*o+e[7]*a+e[11]*u+e[15]*i;return n.x=s,n.y=c,n.z=f,n.w=l,n},d.multiplyByPointAsVector=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("cartesian",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z,i=e[0]*o+e[4]*a+e[8]*u,s=e[1]*o+e[5]*a+e[9]*u,c=e[2]*o+e[6]*a+e[10]*u;return n.x=i,n.y=s,n.z=c,n},d.multiplyByPoint=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("cartesian",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z,i=e[0]*o+e[4]*a+e[8]*u+e[12],s=e[1]*o+e[5]*a+e[9]*u+e[13],c=e[2]*o+e[6]*a+e[10]*u+e[14];return n.x=i,n.y=s,n.z=c,n},d.multiplyByDirection=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("cartesian",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z;return n.x=o*e[0]+a*e[4]+u*e[8],n.y=o*e[1]+a*e[5]+u*e[9],n.z=o*e[2]+a*e[6]+u*e[10],n},d.multiplyByScalar=function(e,t,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.number("scalar",t),r.o.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11]*t,n[12]=e[12]*t,n[13]=e[13]*t,n[14]=e[14]*t,n[15]=e[15]*t,n},d.multiplyByPlane=function(e,o,a){r.o.typeOf.object("matrix",e),r.o.typeOf.object("plane",o),r.o.typeOf.object("result",a);var u=new d,i=new d;d.inverse(e,u),d.transpose(u,i);var s=new n.e(o.normal.x,o.normal.y,o.normal.z,o.distance);d.multiplyByVector(i,s,s),a.normal.x=s.x,a.normal.y=s.y,a.normal.z=s.z;var c=t.o.magnitude(a.normal);return t.o.normalize(a.normal,a.normal),a.distance=s.w/c,a},d.negate=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},d.transpose=function(e,t){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t);var n=e[1],o=e[2],a=e[3],u=e[6],i=e[7],s=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=o,t[9]=u,t[10]=e[10],t[11]=e[14],t[12]=a,t[13]=i,t[14]=s,t[15]=e[15],t},d.abs=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},d.equals=function(e,t){return e===t||o.e(e)&&o.e(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},d.equalsEpsilon=function(e,t,n){return r.o.typeOf.number("epsilon",n),e===t||o.e(e)&&o.e(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n&&Math.abs(e[9]-t[9])<=n&&Math.abs(e[10]-t[10])<=n&&Math.abs(e[11]-t[11])<=n&&Math.abs(e[12]-t[12])<=n&&Math.abs(e[13]-t[13])<=n&&Math.abs(e[14]-t[14])<=n&&Math.abs(e[15]-t[15])<=n},d.getTranslation=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t.x=e[12],t.y=e[13],t.z=e[14],t},d.getMatrix3=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},d.getRotation=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var R=new s,T=new s,A=new n.e,z=new n.e(0,0,0,1);d.inverse=function(e,t){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t);var o=e[0],i=e[4],c=e[8],f=e[12],l=e[1],p=e[5],y=e[9],b=e[13],O=e[2],m=e[6],h=e[10],x=e[14],j=e[3],g=e[7],v=e[11],E=e[15],M=h*E,w=x*v,N=m*E,C=x*g,I=m*v,S=h*g,L=O*E,q=x*j,F=O*v,P=h*j,W=O*g,U=m*j,B=M*p+C*y+I*b-(w*p+N*y+S*b),k=w*l+L*y+P*b-(M*l+q*y+F*b),V=N*l+q*p+W*b-(C*l+L*p+U*b),_=S*l+F*p+U*y-(I*l+P*p+W*y),D=w*i+N*c+S*f-(M*i+C*c+I*f),Z=M*o+q*c+F*f-(w*o+L*c+P*f),G=C*o+L*i+U*f-(N*o+q*i+W*f),Y=I*o+P*i+W*c-(S*o+F*i+U*c),Q=(M=c*b)*g+(C=f*p)*v+(I=i*y)*E-((w=f*y)*g+(N=i*b)*v+(S=c*p)*E),H=w*j+(L=o*b)*v+(P=c*l)*E-(M*j+(q=f*l)*v+(F=o*y)*E),J=N*j+q*g+(W=o*p)*E-(C*j+L*g+(U=i*l)*E),X=S*j+F*g+U*v-(I*j+P*g+W*v),K=N*h+S*x+w*m-(I*x+M*m+C*h),$=F*x+M*O+q*h-(L*h+P*x+w*O),ee=L*m+U*x+C*O-(W*x+N*O+q*m),te=W*h+I*O+P*m-(F*m+U*h+S*O),ne=o*B+i*k+c*V+f*_;if(Math.abs(ne)<a.e.EPSILON21){if(s.equalsEpsilon(d.getRotation(e,R),T,a.e.EPSILON5)&&n.e.equals(d.getRow(e,3,A),z))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new u.t("matrix is not invertible because its determinate is zero.")}return ne=1/ne,t[0]=B*ne,t[1]=k*ne,t[2]=V*ne,t[3]=_*ne,t[4]=D*ne,t[5]=Z*ne,t[6]=G*ne,t[7]=Y*ne,t[8]=Q*ne,t[9]=H*ne,t[10]=J*ne,t[11]=X*ne,t[12]=K*ne,t[13]=$*ne,t[14]=ee*ne,t[15]=te*ne,t},d.inverseTransformation=function(e,t){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t);var n=e[0],o=e[1],a=e[2],u=e[4],i=e[5],s=e[6],c=e[8],f=e[9],l=e[10],p=e[12],y=e[13],b=e[14],O=-n*p-o*y-a*b,m=-u*p-i*y-s*b,h=-c*p-f*y-l*b;return t[0]=n,t[1]=u,t[2]=c,t[3]=0,t[4]=o,t[5]=i,t[6]=f,t[7]=0,t[8]=a,t[9]=s,t[10]=l,t[11]=0,t[12]=O,t[13]=m,t[14]=h,t[15]=1,t},d.IDENTITY=Object.freeze(new d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),d.ZERO=Object.freeze(new d(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),d.ConvertNDCToHalfZRange=Object.freeze(new d(1,0,0,0,0,1,0,0,0,0,.5,.5,0,0,0,1)),d.COLUMN0ROW0=0,d.COLUMN0ROW1=1,d.COLUMN0ROW2=2,d.COLUMN0ROW3=3,d.COLUMN1ROW0=4,d.COLUMN1ROW1=5,d.COLUMN1ROW2=6,d.COLUMN1ROW3=7,d.COLUMN2ROW0=8,d.COLUMN2ROW1=9,d.COLUMN2ROW2=10,d.COLUMN2ROW3=11,d.COLUMN3ROW0=12,d.COLUMN3ROW1=13,d.COLUMN3ROW2=14,d.COLUMN3ROW3=15,d.halfZRange=!1,Object.defineProperties(d.prototype,{length:{get:function(){return d.packedLength}}}),d.prototype.clone=function(e){return d.clone(this,e)},d.prototype.equals=function(e){return d.equals(this,e)},d.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]&&e[9]===t[n+9]&&e[10]===t[n+10]&&e[11]===t[n+11]&&e[12]===t[n+12]&&e[13]===t[n+13]&&e[14]===t[n+14]&&e[15]===t[n+15]},d.prototype.equalsEpsilon=function(e,t){return d.equalsEpsilon(this,e,t)},d.prototype.toString=function(){return"("+this[0]+", "+this[4]+", "+this[8]+", "+this[12]+")\n("+this[1]+", "+this[5]+", "+this[9]+", "+this[13]+")\n("+this[2]+", "+this[6]+", "+this[10]+", "+this[14]+")\n("+this[3]+", "+this[7]+", "+this[11]+", "+this[15]+")"},d.prototype.toArray=function(e,t){d.pack(this,e,t)};var N,C,I,S,L,q,F,P,W,U,B,k,V,_,D,Z,G,Y,Q,H,J,X={POINTS:i.d.POINTS,LINES:i.d.LINES,LINE_LOOP:i.d.LINE_LOOP,LINE_STRIP:i.d.LINE_STRIP,TRIANGLES:i.d.TRIANGLES,TRIANGLE_STRIP:i.d.TRIANGLE_STRIP,TRIANGLE_FAN:i.d.TRIANGLE_FAN,validate:function(e){return e===X.POINTS||e===X.LINES||e===X.LINE_LOOP||e===X.LINE_STRIP||e===X.TRIANGLES||e===X.TRIANGLE_STRIP||e===X.TRIANGLE_FAN}},K=Object.freeze(X),$={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},ee={};function te(e){for(var t=e.split("."),n=0,r=t.length;n<r;++n)t[n]=parseInt(t[n],10);return t}function ne(){if(!o.e(I)&&(I=!1,!ue())){var e=/ Chrome\/([\.0-9]+)/.exec(C.userAgent);null!==e&&(I=!0,S=te(e[1]))}return I}function re(){if(!o.e(L)&&(L=!1,!ne()&&!ue()&&/ Safari\/[\.0-9]+/.test(C.userAgent))){var e=/ Version\/([\.0-9]+)/.exec(C.userAgent);null!==e&&(L=!0,q=te(e[1]))}return L}function oe(){if(!o.e(F)){F=!1;var e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(C.userAgent);null!==e&&(F=!0,(P=te(e[1])).isNightly=!!e[2])}return F}function ae(){var e;o.e(W)||(W=!1,"Microsoft Internet Explorer"===C.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(C.userAgent))&&(W=!0,U=te(e[1])):"Netscape"===C.appName&&(null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(C.userAgent))&&(W=!0,U=te(e[1]))));return W}function ue(){if(!o.e(B)){B=!1;var e=/ Edge\/([\.0-9]+)/.exec(C.userAgent);null!==e&&(B=!0,k=te(e[1]))}return B}function ie(){if(!o.e(V)){V=!1;var e=/Firefox\/([\.0-9]+)/.exec(C.userAgent);null!==e&&(V=!0,_=te(e[1]))}return V}function se(){if(!o.e(Q)){var e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");var t=e.style.imageRendering;(Q=o.e(t)&&""!==t)&&(Y=t)}return Q}function ce(){if(o.e(J))return J.promise;J=o.o.defer(),ue()&&(H=!1,J.resolve(H));var e=new Image;return e.onload=function(){H=e.width>0&&e.height>0,J.resolve(H)},e.onerror=function(){H=!1,J.resolve(H)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",J.promise}Object.defineProperties(ee,{element:{get:function(){if(ee.supportsFullscreen())return document[$.fullscreenElement]}},changeEventName:{get:function(){if(ee.supportsFullscreen())return $.fullscreenchange}},errorEventName:{get:function(){if(ee.supportsFullscreen())return $.fullscreenerror}},enabled:{get:function(){if(ee.supportsFullscreen())return document[$.fullscreenEnabled]}},fullscreen:{get:function(){if(ee.supportsFullscreen())return null!==ee.element}}}),ee.supportsFullscreen=function(){if(o.e(N))return N;N=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return $.requestFullscreen="requestFullscreen",$.exitFullscreen="exitFullscreen",$.fullscreenEnabled="fullscreenEnabled",$.fullscreenElement="fullscreenElement",$.fullscreenchange="fullscreenchange",$.fullscreenerror="fullscreenerror",N=!0;for(var t,n=["webkit","moz","o","ms","khtml"],r=0,a=n.length;r<a;++r){var u=n[r];"function"==typeof e[t=u+"RequestFullscreen"]?($.requestFullscreen=t,N=!0):"function"==typeof e[t=u+"RequestFullScreen"]&&($.requestFullscreen=t,N=!0),t=u+"ExitFullscreen","function"==typeof document[t]?$.exitFullscreen=t:(t=u+"CancelFullScreen","function"==typeof document[t]&&($.exitFullscreen=t)),t=u+"FullscreenEnabled",void 0!==document[t]?$.fullscreenEnabled=t:(t=u+"FullScreenEnabled",void 0!==document[t]&&($.fullscreenEnabled=t)),t=u+"FullscreenElement",void 0!==document[t]?$.fullscreenElement=t:(t=u+"FullScreenElement",void 0!==document[t]&&($.fullscreenElement=t)),t=u+"fullscreenchange",void 0!==document["on"+t]&&("ms"===u&&(t="MSFullscreenChange"),$.fullscreenchange=t),t=u+"fullscreenerror",void 0!==document["on"+t]&&("ms"===u&&(t="MSFullscreenError"),$.fullscreenerror=t)}return N},ee.requestFullscreen=function(e,t){!ee.supportsFullscreen()||e[$.requestFullscreen]({vrDisplay:t})},ee.exitFullscreen=function(){!ee.supportsFullscreen()||document[$.exitFullscreen]()},ee._names=$,C=typeof navigator<"u"?navigator:{};var fe=[];typeof ArrayBuffer<"u"&&(fe.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&fe.push(Uint8ClampedArray),typeof CanvasPixelArray<"u"&&fe.push(CanvasPixelArray));var le={isChrome:ne,chromeVersion:function(){return ne()&&S},isSafari:re,safariVersion:function(){return re()&&q},isWebkit:oe,webkitVersion:function(){return oe()&&P},isInternetExplorer:ae,internetExplorerVersion:function(){return ae()&&U},isEdge:ue,edgeVersion:function(){return ue()&&k},isFirefox:ie,firefoxVersion:function(){return ie()&&_},isWindows:function(){return o.e(D)||(D=/Windows/i.test(C.appVersion)),D},isNodeJs:function(){return o.e(Z)||(Z="object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)),Z},hardwareConcurrency:o.u(C.hardwareConcurrency,3),supportsPointerEvents:function(){return o.e(G)||(G=!ie()&&typeof PointerEvent<"u"&&(!o.e(C.pointerEnabled)||C.pointerEnabled)),G},supportsImageRenderingPixelated:se,supportsWebP:ce,supportsWebPSync:function(){return o.e(J)||ce(),H},imageRenderingValue:function(){return se()?Y:void 0},typedArrayTypes:fe,isPCBroswer:function(){var e=window.navigator.userAgent.toLowerCase(),t="ipad"==e.match(/ipad/i),n="iphone os"==e.match(/iphone os/i),r="midp"==e.match(/midp/i),o="ucweb"==e.match(/ucweb/i),a="android"==e.match(/android/i),u="windows ce"==e.match(/windows ce/i),i="windows mobile"==e.match(/windows mobile/i);return!(t||n||r||o||a||u||i)}};le.supportsFullscreen=function(){return ee.supportsFullscreen()},le.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},le.supportsWebWorkers=function(){return typeof Worker<"u"},le.supportsWebAssembly=function(){return typeof WebAssembly<"u"&&!le.isEdge()},le.supportsOffscreenCanvas=function(){return typeof OffscreenCanvas<"u"&&!le.isEdge()},e._0x4b6a27=K,e.p=d,e.p$1=s,e.s=le})); +define(["exports","./Cartesian3-3a8bdb0b","./Cartesian4-72b88c9e","./Check-52a7d806","./when-92c6cf3c","./Math-ecf82623","./RuntimeError-c6a62a80","./WebGLConstants-42651efd"],(function(e,t,n,r,o,a,u,i){"use strict";function s(e,t,n,r,a,u,i,s,c){this[0]=o.u(e,0),this[1]=o.u(r,0),this[2]=o.u(i,0),this[3]=o.u(t,0),this[4]=o.u(a,0),this[5]=o.u(s,0),this[6]=o.u(n,0),this[7]=o.u(u,0),this[8]=o.u(c,0),this.isMatrix3=!0}s.packedLength=9,s.pack=function(e,t,n){return r.o.typeOf.object("value",e),r.o.defined("array",t),n=o.u(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t},s.unpack=function(e,t,n){return r.o.defined("array",e),t=o.u(t,0),o.e(n)||(n=new s),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n},s.clone=function(e,t){if(o.e(e))return o.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new s(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},s.fromArray=function(e,t,n){return r.o.defined("array",e),t=o.u(t,0),o.e(n)||(n=new s),n[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n[4]=e[t+4],n[5]=e[t+5],n[6]=e[t+6],n[7]=e[t+7],n[8]=e[t+8],n},s.fromColumnMajorArray=function(e,t){return r.o.defined("values",e),s.clone(e,t)},s.fromRowMajorArray=function(e,t){return r.o.defined("values",e),o.e(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new s(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},s.fromQuaternion=function(e,t){r.o.typeOf.object("quaternion",e);var n=e.x*e.x,a=e.x*e.y,u=e.x*e.z,i=e.x*e.w,c=e.y*e.y,f=e.y*e.z,l=e.y*e.w,p=e.z*e.z,y=e.z*e.w,b=e.w*e.w,O=n-c-p+b,m=2*(a-y),h=2*(u+l),d=2*(a+y),x=-n+c-p+b,j=2*(f-i),g=2*(u-l),v=2*(f+i),E=-n-c+p+b;return o.e(t)?(t[0]=O,t[1]=d,t[2]=g,t[3]=m,t[4]=x,t[5]=v,t[6]=h,t[7]=j,t[8]=E,t):new s(O,m,h,d,x,j,g,v,E)},s.fromHeadingPitchRoll=function(e,t){r.o.typeOf.object("headingPitchRoll",e);var n=Math.cos(-e.pitch),a=Math.cos(-e.heading),u=Math.cos(e.roll),i=Math.sin(-e.pitch),c=Math.sin(-e.heading),f=Math.sin(e.roll),l=n*a,p=-u*c+f*i*a,y=f*c+u*i*a,b=n*c,O=u*a+f*i*c,m=-f*a+u*i*c,h=-i,d=f*n,x=u*n;return o.e(t)?(t[0]=l,t[1]=b,t[2]=h,t[3]=p,t[4]=O,t[5]=d,t[6]=y,t[7]=m,t[8]=x,t):new s(l,p,y,b,O,m,h,d,x)},s.fromScale=function(e,t){return r.o.typeOf.object("scale",e),o.e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new s(e.x,0,0,0,e.y,0,0,0,e.z)},s.fromUniformScale=function(e,t){return r.o.typeOf.number("scale",e),o.e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new s(e,0,0,0,e,0,0,0,e)},s.fromCrossProduct=function(e,t){return r.o.typeOf.object("vector",e),o.e(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new s(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},s.fromRotationX=function(e,t){r.o.typeOf.number("angle",e);var n=Math.cos(e),a=Math.sin(e);return o.e(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=a,t[6]=0,t[7]=-a,t[8]=n,t):new s(1,0,0,0,n,-a,0,a,n)},s.fromRotationY=function(e,t){r.o.typeOf.number("angle",e);var n=Math.cos(e),a=Math.sin(e);return o.e(t)?(t[0]=n,t[1]=0,t[2]=-a,t[3]=0,t[4]=1,t[5]=0,t[6]=a,t[7]=0,t[8]=n,t):new s(n,0,a,0,1,0,-a,0,n)},s.fromRotationZ=function(e,t){r.o.typeOf.number("angle",e);var n=Math.cos(e),a=Math.sin(e);return o.e(t)?(t[0]=n,t[1]=a,t[2]=0,t[3]=-a,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new s(n,-a,0,a,n,0,0,0,1)},s.toArray=function(e,t){return r.o.typeOf.object("matrix",e),o.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},s.getElementIndex=function(e,t){return r.o.typeOf.number.greaterThanOrEquals("row",t,0),r.o.typeOf.number.lessThanOrEquals("row",t,2),r.o.typeOf.number.greaterThanOrEquals("column",e,0),r.o.typeOf.number.lessThanOrEquals("column",e,2),3*e+t},s.getColumn=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,2),r.o.typeOf.object("result",n);var o=3*t,a=e[o],u=e[o+1],i=e[o+2];return n.x=a,n.y=u,n.z=i,n},s.setColumn=function(e,t,n,o){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,2),r.o.typeOf.object("cartesian",n),r.o.typeOf.object("result",o);var a=3*t;return(o=s.clone(e,o))[a]=n.x,o[a+1]=n.y,o[a+2]=n.z,o},s.getRow=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,2),r.o.typeOf.object("result",n);var o=e[t],a=e[t+3],u=e[t+6];return n.x=o,n.y=a,n.z=u,n},s.setRow=function(e,t,n,o){return r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,2),r.o.typeOf.object("cartesian",n),r.o.typeOf.object("result",o),(o=s.clone(e,o))[t]=n.x,o[t+3]=n.y,o[t+6]=n.z,o};var c=new t.o;s.getScale=function(e,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",n),n.x=t.o.magnitude(t.o.fromElements(e[0],e[1],e[2],c)),n.y=t.o.magnitude(t.o.fromElements(e[3],e[4],e[5],c)),n.z=t.o.magnitude(t.o.fromElements(e[6],e[7],e[8],c)),n};var f=new t.o;s.getMaximumScale=function(e){return s.getScale(e,f),t.o.maximumComponent(f)},s.multiply=function(e,t,n){r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n);var o=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],a=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],u=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],i=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],s=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],c=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],f=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],l=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],p=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=o,n[1]=a,n[2]=u,n[3]=i,n[4]=s,n[5]=c,n[6]=f,n[7]=l,n[8]=p,n},s.add=function(e,t,n){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n},s.subtract=function(e,t,n){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n},s.multiplyByVector=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("cartesian",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z,i=e[0]*o+e[3]*a+e[6]*u,s=e[1]*o+e[4]*a+e[7]*u,c=e[2]*o+e[5]*a+e[8]*u;return n.x=i,n.y=s,n.z=c,n},s.multiplyByScalar=function(e,t,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.number("scalar",t),r.o.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},s.multiplyByScale=function(e,t,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("scale",t),r.o.typeOf.object("result",n),n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n},s.negate=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},s.transpose=function(e,t){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t);var n=e[0],o=e[3],a=e[6],u=e[1],i=e[4],s=e[7],c=e[2],f=e[5],l=e[8];return t[0]=n,t[1]=o,t[2]=a,t[3]=u,t[4]=i,t[5]=s,t[6]=c,t[7]=f,t[8]=l,t};var l=new t.o(1,1,1);s.getRotation=function(e,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",n);var o=t.o.divideComponents(l,s.getScale(e,f),f);return n=s.multiplyByScale(e,o,n)};var p=[1,0,0],y=[2,2,1];function b(e){for(var t=0,n=0;n<3;++n){var r=e[s.getElementIndex(y[n],p[n])];t+=2*r*r}return Math.sqrt(t)}function O(e,t){for(var n=a.e.EPSILON15,r=0,o=1,u=0;u<3;++u){var i=Math.abs(e[s.getElementIndex(y[u],p[u])]);i>r&&(o=u,r=i)}var c=1,f=0,l=p[o],b=y[o];if(Math.abs(e[s.getElementIndex(b,l)])>n){var O,m=(e[s.getElementIndex(b,b)]-e[s.getElementIndex(l,l)])/2/e[s.getElementIndex(b,l)];f=(O=m<0?-1/(-m+Math.sqrt(1+m*m)):1/(m+Math.sqrt(1+m*m)))*(c=1/Math.sqrt(1+O*O))}return(t=s.clone(s.IDENTITY,t))[s.getElementIndex(l,l)]=t[s.getElementIndex(b,b)]=c,t[s.getElementIndex(b,l)]=f,t[s.getElementIndex(l,b)]=-f,t}var m=new s,h=new s;function d(e,t,n,r,a,u,i,s,c,f,l,p,y,b,O,m){this[0]=o.u(e,0),this[1]=o.u(a,0),this[2]=o.u(c,0),this[3]=o.u(y,0),this[4]=o.u(t,0),this[5]=o.u(u,0),this[6]=o.u(f,0),this[7]=o.u(b,0),this[8]=o.u(n,0),this[9]=o.u(i,0),this[10]=o.u(l,0),this[11]=o.u(O,0),this[12]=o.u(r,0),this[13]=o.u(s,0),this[14]=o.u(p,0),this[15]=o.u(m,0),this.isMatrix4=!0}s.computeEigenDecomposition=function(e,t){r.o.typeOf.object("matrix",e);var n=a.e.EPSILON20,u=0,i=0;o.e(t)||(t={});for(var c=t.unitary=s.clone(s.IDENTITY,t.unitary),f=t.diagonal=s.clone(e,t.diagonal),l=n*function(e){for(var t=0,n=0;n<9;++n){var r=e[n];t+=r*r}return Math.sqrt(t)}(f);i<10&&b(f)>l;)O(f,m),s.transpose(m,h),s.multiply(f,m,f),s.multiply(h,f,f),s.multiply(c,m,c),++u>2&&(++i,u=0);return t},s.abs=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},s.determinant=function(e){r.o.typeOf.object("matrix",e);var t=e[0],n=e[3],o=e[6],a=e[1],u=e[4],i=e[7],s=e[2],c=e[5],f=e[8];return t*(u*f-c*i)+a*(c*o-n*f)+s*(n*i-u*o)},s.inverse=function(e,t){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t);var n=e[0],o=e[1],u=e[2],i=e[3],c=e[4],f=e[5],l=e[6],p=e[7],y=e[8],b=s.determinant(e);if(Math.abs(b)<=a.e.EPSILON15)throw new r.t("matrix is not invertible");t[0]=c*y-p*f,t[1]=p*u-o*y,t[2]=o*f-c*u,t[3]=l*f-i*y,t[4]=n*y-l*u,t[5]=i*u-n*f,t[6]=i*p-l*c,t[7]=l*o-n*p,t[8]=n*c-i*o;var O=1/b;return s.multiplyByScalar(t,O,t)},s.equals=function(e,t){return e===t||o.e(e)&&o.e(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},s.equalsEpsilon=function(e,t,n){return r.o.typeOf.number("epsilon",n),e===t||o.e(e)&&o.e(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n},s.IDENTITY=Object.freeze(new s(1,0,0,0,1,0,0,0,1)),s.ZERO=Object.freeze(new s(0,0,0,0,0,0,0,0,0)),s.COLUMN0ROW0=0,s.COLUMN0ROW1=1,s.COLUMN0ROW2=2,s.COLUMN1ROW0=3,s.COLUMN1ROW1=4,s.COLUMN1ROW2=5,s.COLUMN2ROW0=6,s.COLUMN2ROW1=7,s.COLUMN2ROW2=8,Object.defineProperties(s.prototype,{length:{get:function(){return s.packedLength}}}),s.prototype.clone=function(e){return s.clone(this,e)},s.prototype.equals=function(e){return s.equals(this,e)},s.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]},s.prototype.equalsEpsilon=function(e,t){return s.equalsEpsilon(this,e,t)},s.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},s.prototype.toArray=function(e,t){s.pack(this,e,t)},d.packedLength=16,d.pack=function(e,t,n){return r.o.typeOf.object("value",e),r.o.defined("array",t),n=o.u(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t[n++]=e[9],t[n++]=e[10],t[n++]=e[11],t[n++]=e[12],t[n++]=e[13],t[n++]=e[14],t[n]=e[15],t},d.unpack=function(e,t,n){return r.o.defined("array",e),t=o.u(t,0),o.e(n)||(n=new d),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n[9]=e[t++],n[10]=e[t++],n[11]=e[t++],n[12]=e[t++],n[13]=e[t++],n[14]=e[t++],n[15]=e[t],n},d.clone=function(e,t){if(o.e(e))return o.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new d(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])},d.fromArray=d.unpack,d.fromColumnMajorArray=function(e,t){return r.o.defined("values",e),d.clone(e,t)},d.fromRowMajorArray=function(e,t){return r.o.defined("values",e),o.e(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new d(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},d.fromRotationTranslation=function(e,n,a){return r.o.typeOf.object("rotation",e),n=o.u(n,t.o.ZERO),o.e(a)?(a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=0,a[4]=e[3],a[5]=e[4],a[6]=e[5],a[7]=0,a[8]=e[6],a[9]=e[7],a[10]=e[8],a[11]=0,a[12]=n.x,a[13]=n.y,a[14]=n.z,a[15]=1,a):new d(e[0],e[3],e[6],n.x,e[1],e[4],e[7],n.y,e[2],e[5],e[8],n.z,0,0,0,1)},d.fromTranslationQuaternionRotationScale=function(e,t,n,a){r.o.typeOf.object("translation",e),r.o.typeOf.object("rotation",t),r.o.typeOf.object("scale",n),o.e(a)||(a=new d);var u=n.x,i=n.y,s=n.z,c=t.x*t.x,f=t.x*t.y,l=t.x*t.z,p=t.x*t.w,y=t.y*t.y,b=t.y*t.z,O=t.y*t.w,m=t.z*t.z,h=t.z*t.w,x=t.w*t.w,j=c-y-m+x,g=2*(f-h),v=2*(l+O),E=2*(f+h),M=-c+y-m+x,w=2*(b-p),R=2*(l-O),T=2*(b+p),A=-c-y+m+x;return a[0]=j*u,a[1]=E*u,a[2]=R*u,a[3]=0,a[4]=g*i,a[5]=M*i,a[6]=T*i,a[7]=0,a[8]=v*s,a[9]=w*s,a[10]=A*s,a[11]=0,a[12]=e.x,a[13]=e.y,a[14]=e.z,a[15]=1,a},d.fromTranslationRotationScale=function(e,t){return r.o.typeOf.object("translationRotationScale",e),d.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},d.fromTranslation=function(e,t){return r.o.typeOf.object("translation",e),d.fromRotationTranslation(s.IDENTITY,e,t)},d.fromScale=function(e,t){return r.o.typeOf.object("scale",e),o.e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new d(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},d.fromUniformScale=function(e,t){return r.o.typeOf.number("scale",e),o.e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new d(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};var x=new t.o,j=new t.o,g=new t.o;d.fromCamera=function(e,n){r.o.typeOf.object("camera",e);var a=e.position,u=e.direction,i=e.up;r.o.typeOf.object("camera.position",a),r.o.typeOf.object("camera.direction",u),r.o.typeOf.object("camera.up",i),t.o.normalize(u,x),t.o.normalize(t.o.cross(x,i,j),j),t.o.normalize(t.o.cross(j,x,g),g);var s=j.x,c=j.y,f=j.z,l=x.x,p=x.y,y=x.z,b=g.x,O=g.y,m=g.z,h=a.x,v=a.y,E=a.z,M=s*-h+c*-v+f*-E,w=b*-h+O*-v+m*-E,R=l*h+p*v+y*E;return o.e(n)?(n[0]=s,n[1]=b,n[2]=-l,n[3]=0,n[4]=c,n[5]=O,n[6]=-p,n[7]=0,n[8]=f,n[9]=m,n[10]=-y,n[11]=0,n[12]=M,n[13]=w,n[14]=R,n[15]=1,n):new d(s,c,f,M,b,O,m,w,-l,-p,-y,R,0,0,0,1)},d.computePerspectiveFieldOfView=function(e,t,n,o,a){r.o.typeOf.number.greaterThan("fovY",e,0),r.o.typeOf.number.lessThan("fovY",e,Math.PI),r.o.typeOf.number.greaterThan("near",n,0),r.o.typeOf.number.greaterThan("far",o,0),r.o.typeOf.object("result",a);var u=1/Math.tan(.5*e),i=u/t,s=(o+n)/(n-o),c=2*o*n/(n-o);return a[0]=i,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=u,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=s,a[11]=-1,a[12]=0,a[13]=0,a[14]=c,a[15]=0,a},d.computeOrthographicOffCenter=function(e,t,n,o,a,u,i){r.o.typeOf.number("left",e),r.o.typeOf.number("right",t),r.o.typeOf.number("bottom",n),r.o.typeOf.number("top",o),r.o.typeOf.number("near",a),r.o.typeOf.number("far",u),r.o.typeOf.object("result",i);var s=1/(t-e),c=1/(o-n),f=1/(u-a),l=-(t+e)*s,p=-(o+n)*c,y=-(u+a)*f;return s*=2,c*=2,f*=-2,i[0]=s,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=c,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=f,i[11]=0,i[12]=l,i[13]=p,i[14]=y,i[15]=1,d.halfZRange&&d.multiply(d.ConvertNDCToHalfZRange,i,i),i},d.computePerspectiveOffCenter=function(e,t,n,o,a,u,i){r.o.typeOf.number("left",e),r.o.typeOf.number("right",t),r.o.typeOf.number("bottom",n),r.o.typeOf.number("top",o),r.o.typeOf.number("near",a),r.o.typeOf.number("far",u),r.o.typeOf.object("result",i);var s=2*a/(t-e),c=2*a/(o-n),f=(t+e)/(t-e),l=(o+n)/(o-n),p=-(u+a)/(u-a),y=-2*u*a/(u-a);return i[0]=s,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=c,i[6]=0,i[7]=0,i[8]=f,i[9]=l,i[10]=p,i[11]=-1,i[12]=0,i[13]=0,i[14]=y,i[15]=0,d.halfZRange&&d.multiply(d.ConvertNDCToHalfZRange,i,i),i},d.computeInfinitePerspectiveOffCenter=function(e,t,n,o,a,u){r.o.typeOf.number("left",e),r.o.typeOf.number("right",t),r.o.typeOf.number("bottom",n),r.o.typeOf.number("top",o),r.o.typeOf.number("near",a),r.o.typeOf.object("result",u);var i=2*a/(t-e),s=2*a/(o-n),c=(t+e)/(t-e),f=(o+n)/(o-n),l=-2*a;return u[0]=i,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=s,u[6]=0,u[7]=0,u[8]=c,u[9]=f,u[10]=-1,u[11]=-1,u[12]=0,u[13]=0,u[14]=l,u[15]=0,d.halfZRange&&d.multiply(d.ConvertNDCToHalfZRange,u,u),u},d.computeViewportTransformation=function(e,t,n,a){r.o.typeOf.object("result",a),e=o.u(e,o.u.EMPTY_OBJECT);var u=o.u(e.x,0),i=o.u(e.y,0),s=o.u(e.width,0),c=o.u(e.height,0);t=o.u(t,0);var f=.5*s,l=.5*c,p=.5*((n=o.u(n,1))-t),y=f,b=l,O=p,m=u+f,h=i+l,d=t+p;return a[0]=y,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=b,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=O,a[11]=0,a[12]=m,a[13]=h,a[14]=d,a[15]=1,a},d.computeView=function(e,n,o,a,u){return r.o.typeOf.object("position",e),r.o.typeOf.object("direction",n),r.o.typeOf.object("up",o),r.o.typeOf.object("right",a),r.o.typeOf.object("result",u),u[0]=a.x,u[1]=o.x,u[2]=-n.x,u[3]=0,u[4]=a.y,u[5]=o.y,u[6]=-n.y,u[7]=0,u[8]=a.z,u[9]=o.z,u[10]=-n.z,u[11]=0,u[12]=-t.o.dot(a,e),u[13]=-t.o.dot(o,e),u[14]=t.o.dot(n,e),u[15]=1,u},d.toArray=function(e,t){return r.o.typeOf.object("matrix",e),o.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},d.getElementIndex=function(e,t){return r.o.typeOf.number.greaterThanOrEquals("row",t,0),r.o.typeOf.number.lessThanOrEquals("row",t,3),r.o.typeOf.number.greaterThanOrEquals("column",e,0),r.o.typeOf.number.lessThanOrEquals("column",e,3),4*e+t},d.getColumn=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,3),r.o.typeOf.object("result",n);var o=4*t,a=e[o],u=e[o+1],i=e[o+2],s=e[o+3];return n.x=a,n.y=u,n.z=i,n.w=s,n},d.setColumn=function(e,t,n,o){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,3),r.o.typeOf.object("cartesian",n),r.o.typeOf.object("result",o);var a=4*t;return(o=d.clone(e,o))[a]=n.x,o[a+1]=n.y,o[a+2]=n.z,o[a+3]=n.w,o},d.setTranslation=function(e,t,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("translation",t),r.o.typeOf.object("result",n),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=e[15],n};var v=new t.o;d.setScale=function(e,n,o){r.o.typeOf.object("matrix",e),r.o.typeOf.object("scale",n),r.o.typeOf.object("result",o);var a=d.getScale(e,v),u=t.o.divideComponents(n,a,v);return d.multiplyByScale(e,u,o)},d.getRow=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,3),r.o.typeOf.object("result",n);var o=e[t],a=e[t+4],u=e[t+8],i=e[t+12];return n.x=o,n.y=a,n.z=u,n.w=i,n},d.setRow=function(e,t,n,o){return r.o.typeOf.object("matrix",e),r.o.typeOf.number.greaterThanOrEquals("index",t,0),r.o.typeOf.number.lessThanOrEquals("index",t,3),r.o.typeOf.object("cartesian",n),r.o.typeOf.object("result",o),(o=d.clone(e,o))[t]=n.x,o[t+4]=n.y,o[t+8]=n.z,o[t+12]=n.w,o};var E=new t.o;d.getScale=function(e,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",n),n.x=t.o.magnitude(t.o.fromElements(e[0],e[1],e[2],E)),n.y=t.o.magnitude(t.o.fromElements(e[4],e[5],e[6],E)),n.z=t.o.magnitude(t.o.fromElements(e[8],e[9],e[10],E)),n};var M=new t.o;d.getMaximumScale=function(e){return d.getScale(e,M),t.o.maximumComponent(M)},d.multiply=function(e,t,n){r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n);var o=e[0],a=e[1],u=e[2],i=e[3],s=e[4],c=e[5],f=e[6],l=e[7],p=e[8],y=e[9],b=e[10],O=e[11],m=e[12],h=e[13],d=e[14],x=e[15],j=t[0],g=t[1],v=t[2],E=t[3],M=t[4],w=t[5],R=t[6],T=t[7],A=t[8],z=t[9],N=t[10],C=t[11],I=t[12],S=t[13],L=t[14],q=t[15],F=o*j+s*g+p*v+m*E,P=a*j+c*g+y*v+h*E,W=u*j+f*g+b*v+d*E,U=i*j+l*g+O*v+x*E,B=o*M+s*w+p*R+m*T,k=a*M+c*w+y*R+h*T,V=u*M+f*w+b*R+d*T,_=i*M+l*w+O*R+x*T,D=o*A+s*z+p*N+m*C,Z=a*A+c*z+y*N+h*C,G=u*A+f*z+b*N+d*C,Y=i*A+l*z+O*N+x*C,Q=o*I+s*S+p*L+m*q,H=a*I+c*S+y*L+h*q,J=u*I+f*S+b*L+d*q,X=i*I+l*S+O*L+x*q;return n[0]=F,n[1]=P,n[2]=W,n[3]=U,n[4]=B,n[5]=k,n[6]=V,n[7]=_,n[8]=D,n[9]=Z,n[10]=G,n[11]=Y,n[12]=Q,n[13]=H,n[14]=J,n[15]=X,n},d.add=function(e,t,n){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n[9]=e[9]+t[9],n[10]=e[10]+t[10],n[11]=e[11]+t[11],n[12]=e[12]+t[12],n[13]=e[13]+t[13],n[14]=e[14]+t[14],n[15]=e[15]+t[15],n},d.subtract=function(e,t,n){return r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n[9]=e[9]-t[9],n[10]=e[10]-t[10],n[11]=e[11]-t[11],n[12]=e[12]-t[12],n[13]=e[13]-t[13],n[14]=e[14]-t[14],n[15]=e[15]-t[15],n},d.multiplyTransformation=function(e,t,n){r.o.typeOf.object("left",e),r.o.typeOf.object("right",t),r.o.typeOf.object("result",n);var o=e[0],a=e[1],u=e[2],i=e[4],s=e[5],c=e[6],f=e[8],l=e[9],p=e[10],y=e[12],b=e[13],O=e[14],m=t[0],h=t[1],d=t[2],x=t[4],j=t[5],g=t[6],v=t[8],E=t[9],M=t[10],w=t[12],R=t[13],T=t[14],A=o*m+i*h+f*d,z=a*m+s*h+l*d,N=u*m+c*h+p*d,C=o*x+i*j+f*g,I=a*x+s*j+l*g,S=u*x+c*j+p*g,L=o*v+i*E+f*M,q=a*v+s*E+l*M,F=u*v+c*E+p*M,P=o*w+i*R+f*T+y,W=a*w+s*R+l*T+b,U=u*w+c*R+p*T+O;return n[0]=A,n[1]=z,n[2]=N,n[3]=0,n[4]=C,n[5]=I,n[6]=S,n[7]=0,n[8]=L,n[9]=q,n[10]=F,n[11]=0,n[12]=P,n[13]=W,n[14]=U,n[15]=1,n},d.multiplyByMatrix3=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("rotation",t),r.o.typeOf.object("result",n);var o=e[0],a=e[1],u=e[2],i=e[4],s=e[5],c=e[6],f=e[8],l=e[9],p=e[10],y=t[0],b=t[1],O=t[2],m=t[3],h=t[4],d=t[5],x=t[6],j=t[7],g=t[8],v=o*y+i*b+f*O,E=a*y+s*b+l*O,M=u*y+c*b+p*O,w=o*m+i*h+f*d,R=a*m+s*h+l*d,T=u*m+c*h+p*d,A=o*x+i*j+f*g,z=a*x+s*j+l*g,N=u*x+c*j+p*g;return n[0]=v,n[1]=E,n[2]=M,n[3]=0,n[4]=w,n[5]=R,n[6]=T,n[7]=0,n[8]=A,n[9]=z,n[10]=N,n[11]=0,n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n},d.multiplyByTranslation=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("translation",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z,i=o*e[0]+a*e[4]+u*e[8]+e[12],s=o*e[1]+a*e[5]+u*e[9]+e[13],c=o*e[2]+a*e[6]+u*e[10]+e[14];return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=i,n[13]=s,n[14]=c,n[15]=e[15],n};var w=new t.o;d.multiplyByUniformScale=function(e,t,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.number("scale",t),r.o.typeOf.object("result",n),w.x=t,w.y=t,w.z=t,d.multiplyByScale(e,w,n)},d.multiplyByScale=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("scale",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z;return 1===o&&1===a&&1===u?d.clone(e,n):(n[0]=o*e[0],n[1]=o*e[1],n[2]=o*e[2],n[3]=0,n[4]=a*e[4],n[5]=a*e[5],n[6]=a*e[6],n[7]=0,n[8]=u*e[8],n[9]=u*e[9],n[10]=u*e[10],n[11]=0,n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=1,n)},d.multiplyByVector=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("cartesian",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z,i=t.w,s=e[0]*o+e[4]*a+e[8]*u+e[12]*i,c=e[1]*o+e[5]*a+e[9]*u+e[13]*i,f=e[2]*o+e[6]*a+e[10]*u+e[14]*i,l=e[3]*o+e[7]*a+e[11]*u+e[15]*i;return n.x=s,n.y=c,n.z=f,n.w=l,n},d.multiplyByPointAsVector=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("cartesian",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z,i=e[0]*o+e[4]*a+e[8]*u,s=e[1]*o+e[5]*a+e[9]*u,c=e[2]*o+e[6]*a+e[10]*u;return n.x=i,n.y=s,n.z=c,n},d.multiplyByPoint=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("cartesian",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z,i=e[0]*o+e[4]*a+e[8]*u+e[12],s=e[1]*o+e[5]*a+e[9]*u+e[13],c=e[2]*o+e[6]*a+e[10]*u+e[14];return n.x=i,n.y=s,n.z=c,n},d.multiplyByDirection=function(e,t,n){r.o.typeOf.object("matrix",e),r.o.typeOf.object("cartesian",t),r.o.typeOf.object("result",n);var o=t.x,a=t.y,u=t.z;return n.x=o*e[0]+a*e[4]+u*e[8],n.y=o*e[1]+a*e[5]+u*e[9],n.z=o*e[2]+a*e[6]+u*e[10],n},d.multiplyByScalar=function(e,t,n){return r.o.typeOf.object("matrix",e),r.o.typeOf.number("scalar",t),r.o.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11]*t,n[12]=e[12]*t,n[13]=e[13]*t,n[14]=e[14]*t,n[15]=e[15]*t,n},d.multiplyByPlane=function(e,o,a){r.o.typeOf.object("matrix",e),r.o.typeOf.object("plane",o),r.o.typeOf.object("result",a);var u=new d,i=new d;d.inverse(e,u),d.transpose(u,i);var s=new n.e(o.normal.x,o.normal.y,o.normal.z,o.distance);d.multiplyByVector(i,s,s),a.normal.x=s.x,a.normal.y=s.y,a.normal.z=s.z;var c=t.o.magnitude(a.normal);return t.o.normalize(a.normal,a.normal),a.distance=s.w/c,a},d.negate=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},d.transpose=function(e,t){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t);var n=e[1],o=e[2],a=e[3],u=e[6],i=e[7],s=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=o,t[9]=u,t[10]=e[10],t[11]=e[14],t[12]=a,t[13]=i,t[14]=s,t[15]=e[15],t},d.abs=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},d.equals=function(e,t){return e===t||o.e(e)&&o.e(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},d.equalsEpsilon=function(e,t,n){return r.o.typeOf.number("epsilon",n),e===t||o.e(e)&&o.e(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n&&Math.abs(e[9]-t[9])<=n&&Math.abs(e[10]-t[10])<=n&&Math.abs(e[11]-t[11])<=n&&Math.abs(e[12]-t[12])<=n&&Math.abs(e[13]-t[13])<=n&&Math.abs(e[14]-t[14])<=n&&Math.abs(e[15]-t[15])<=n},d.getTranslation=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t.x=e[12],t.y=e[13],t.z=e[14],t},d.getMatrix3=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},d.getRotation=function(e,t){return r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var R=new s,T=new s,A=new n.e,z=new n.e(0,0,0,1);d.inverse=function(e,t){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t);var o=e[0],i=e[4],c=e[8],f=e[12],l=e[1],p=e[5],y=e[9],b=e[13],O=e[2],m=e[6],h=e[10],x=e[14],j=e[3],g=e[7],v=e[11],E=e[15],M=h*E,w=x*v,N=m*E,C=x*g,I=m*v,S=h*g,L=O*E,q=x*j,F=O*v,P=h*j,W=O*g,U=m*j,B=M*p+C*y+I*b-(w*p+N*y+S*b),k=w*l+L*y+P*b-(M*l+q*y+F*b),V=N*l+q*p+W*b-(C*l+L*p+U*b),_=S*l+F*p+U*y-(I*l+P*p+W*y),D=w*i+N*c+S*f-(M*i+C*c+I*f),Z=M*o+q*c+F*f-(w*o+L*c+P*f),G=C*o+L*i+U*f-(N*o+q*i+W*f),Y=I*o+P*i+W*c-(S*o+F*i+U*c),Q=(M=c*b)*g+(C=f*p)*v+(I=i*y)*E-((w=f*y)*g+(N=i*b)*v+(S=c*p)*E),H=w*j+(L=o*b)*v+(P=c*l)*E-(M*j+(q=f*l)*v+(F=o*y)*E),J=N*j+q*g+(W=o*p)*E-(C*j+L*g+(U=i*l)*E),X=S*j+F*g+U*v-(I*j+P*g+W*v),K=N*h+S*x+w*m-(I*x+M*m+C*h),$=F*x+M*O+q*h-(L*h+P*x+w*O),ee=L*m+U*x+C*O-(W*x+N*O+q*m),te=W*h+I*O+P*m-(F*m+U*h+S*O),ne=o*B+i*k+c*V+f*_;if(Math.abs(ne)<a.e.EPSILON21){if(s.equalsEpsilon(d.getRotation(e,R),T,a.e.EPSILON5)&&n.e.equals(d.getRow(e,3,A),z))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new u.t("matrix is not invertible because its determinate is zero.")}return ne=1/ne,t[0]=B*ne,t[1]=k*ne,t[2]=V*ne,t[3]=_*ne,t[4]=D*ne,t[5]=Z*ne,t[6]=G*ne,t[7]=Y*ne,t[8]=Q*ne,t[9]=H*ne,t[10]=J*ne,t[11]=X*ne,t[12]=K*ne,t[13]=$*ne,t[14]=ee*ne,t[15]=te*ne,t},d.inverseTransformation=function(e,t){r.o.typeOf.object("matrix",e),r.o.typeOf.object("result",t);var n=e[0],o=e[1],a=e[2],u=e[4],i=e[5],s=e[6],c=e[8],f=e[9],l=e[10],p=e[12],y=e[13],b=e[14],O=-n*p-o*y-a*b,m=-u*p-i*y-s*b,h=-c*p-f*y-l*b;return t[0]=n,t[1]=u,t[2]=c,t[3]=0,t[4]=o,t[5]=i,t[6]=f,t[7]=0,t[8]=a,t[9]=s,t[10]=l,t[11]=0,t[12]=O,t[13]=m,t[14]=h,t[15]=1,t},d.IDENTITY=Object.freeze(new d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),d.ZERO=Object.freeze(new d(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),d.ConvertNDCToHalfZRange=Object.freeze(new d(1,0,0,0,0,1,0,0,0,0,.5,.5,0,0,0,1)),d.COLUMN0ROW0=0,d.COLUMN0ROW1=1,d.COLUMN0ROW2=2,d.COLUMN0ROW3=3,d.COLUMN1ROW0=4,d.COLUMN1ROW1=5,d.COLUMN1ROW2=6,d.COLUMN1ROW3=7,d.COLUMN2ROW0=8,d.COLUMN2ROW1=9,d.COLUMN2ROW2=10,d.COLUMN2ROW3=11,d.COLUMN3ROW0=12,d.COLUMN3ROW1=13,d.COLUMN3ROW2=14,d.COLUMN3ROW3=15,d.halfZRange=!1,Object.defineProperties(d.prototype,{length:{get:function(){return d.packedLength}}}),d.prototype.clone=function(e){return d.clone(this,e)},d.prototype.equals=function(e){return d.equals(this,e)},d.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]&&e[9]===t[n+9]&&e[10]===t[n+10]&&e[11]===t[n+11]&&e[12]===t[n+12]&&e[13]===t[n+13]&&e[14]===t[n+14]&&e[15]===t[n+15]},d.prototype.equalsEpsilon=function(e,t){return d.equalsEpsilon(this,e,t)},d.prototype.toString=function(){return"("+this[0]+", "+this[4]+", "+this[8]+", "+this[12]+")\n("+this[1]+", "+this[5]+", "+this[9]+", "+this[13]+")\n("+this[2]+", "+this[6]+", "+this[10]+", "+this[14]+")\n("+this[3]+", "+this[7]+", "+this[11]+", "+this[15]+")"},d.prototype.toArray=function(e,t){d.pack(this,e,t)};var N,C,I,S,L,q,F,P,W,U,B,k,V,_,D,Z,G,Y,Q,H,J,X={POINTS:i.d.POINTS,LINES:i.d.LINES,LINE_LOOP:i.d.LINE_LOOP,LINE_STRIP:i.d.LINE_STRIP,TRIANGLES:i.d.TRIANGLES,TRIANGLE_STRIP:i.d.TRIANGLE_STRIP,TRIANGLE_FAN:i.d.TRIANGLE_FAN,validate:function(e){return e===X.POINTS||e===X.LINES||e===X.LINE_LOOP||e===X.LINE_STRIP||e===X.TRIANGLES||e===X.TRIANGLE_STRIP||e===X.TRIANGLE_FAN}},K=Object.freeze(X),$={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},ee={};function te(e){for(var t=e.split("."),n=0,r=t.length;n<r;++n)t[n]=parseInt(t[n],10);return t}function ne(){if(!o.e(I)&&(I=!1,!ue())){var e=/ Chrome\/([\.0-9]+)/.exec(C.userAgent);null!==e&&(I=!0,S=te(e[1]))}return I}function re(){if(!o.e(L)&&(L=!1,!ne()&&!ue()&&/ Safari\/[\.0-9]+/.test(C.userAgent))){var e=/ Version\/([\.0-9]+)/.exec(C.userAgent);null!==e&&(L=!0,q=te(e[1]))}return L}function oe(){if(!o.e(F)){F=!1;var e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(C.userAgent);null!==e&&(F=!0,(P=te(e[1])).isNightly=!!e[2])}return F}function ae(){var e;o.e(W)||(W=!1,"Microsoft Internet Explorer"===C.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(C.userAgent))&&(W=!0,U=te(e[1])):"Netscape"===C.appName&&(null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(C.userAgent))&&(W=!0,U=te(e[1]))));return W}function ue(){if(!o.e(B)){B=!1;var e=/ Edge\/([\.0-9]+)/.exec(C.userAgent);null!==e&&(B=!0,k=te(e[1]))}return B}function ie(){if(!o.e(V)){V=!1;var e=/Firefox\/([\.0-9]+)/.exec(C.userAgent);null!==e&&(V=!0,_=te(e[1]))}return V}function se(){if(!o.e(Q)){var e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");var t=e.style.imageRendering;(Q=o.e(t)&&""!==t)&&(Y=t)}return Q}function ce(){if(o.e(J))return J.promise;J=o.o.defer(),ue()&&(H=!1,J.resolve(H));var e=new Image;return e.onload=function(){H=e.width>0&&e.height>0,J.resolve(H)},e.onerror=function(){H=!1,J.resolve(H)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",J.promise}Object.defineProperties(ee,{element:{get:function(){if(ee.supportsFullscreen())return document[$.fullscreenElement]}},changeEventName:{get:function(){if(ee.supportsFullscreen())return $.fullscreenchange}},errorEventName:{get:function(){if(ee.supportsFullscreen())return $.fullscreenerror}},enabled:{get:function(){if(ee.supportsFullscreen())return document[$.fullscreenEnabled]}},fullscreen:{get:function(){if(ee.supportsFullscreen())return null!==ee.element}}}),ee.supportsFullscreen=function(){if(o.e(N))return N;N=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return $.requestFullscreen="requestFullscreen",$.exitFullscreen="exitFullscreen",$.fullscreenEnabled="fullscreenEnabled",$.fullscreenElement="fullscreenElement",$.fullscreenchange="fullscreenchange",$.fullscreenerror="fullscreenerror",N=!0;for(var t,n=["webkit","moz","o","ms","khtml"],r=0,a=n.length;r<a;++r){var u=n[r];"function"==typeof e[t=u+"RequestFullscreen"]?($.requestFullscreen=t,N=!0):"function"==typeof e[t=u+"RequestFullScreen"]&&($.requestFullscreen=t,N=!0),t=u+"ExitFullscreen","function"==typeof document[t]?$.exitFullscreen=t:(t=u+"CancelFullScreen","function"==typeof document[t]&&($.exitFullscreen=t)),t=u+"FullscreenEnabled",void 0!==document[t]?$.fullscreenEnabled=t:(t=u+"FullScreenEnabled",void 0!==document[t]&&($.fullscreenEnabled=t)),t=u+"FullscreenElement",void 0!==document[t]?$.fullscreenElement=t:(t=u+"FullScreenElement",void 0!==document[t]&&($.fullscreenElement=t)),t=u+"fullscreenchange",void 0!==document["on"+t]&&("ms"===u&&(t="MSFullscreenChange"),$.fullscreenchange=t),t=u+"fullscreenerror",void 0!==document["on"+t]&&("ms"===u&&(t="MSFullscreenError"),$.fullscreenerror=t)}return N},ee.requestFullscreen=function(e,t){!ee.supportsFullscreen()||e[$.requestFullscreen]({vrDisplay:t})},ee.exitFullscreen=function(){!ee.supportsFullscreen()||document[$.exitFullscreen]()},ee._names=$,C=typeof navigator<"u"?navigator:{};var fe=[];typeof ArrayBuffer<"u"&&(fe.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&fe.push(Uint8ClampedArray),typeof CanvasPixelArray<"u"&&fe.push(CanvasPixelArray));var le={isChrome:ne,chromeVersion:function(){return ne()&&S},isSafari:re,safariVersion:function(){return re()&&q},isWebkit:oe,webkitVersion:function(){return oe()&&P},isInternetExplorer:ae,internetExplorerVersion:function(){return ae()&&U},isEdge:ue,edgeVersion:function(){return ue()&&k},isFirefox:ie,firefoxVersion:function(){return ie()&&_},isWindows:function(){return o.e(D)||(D=/Windows/i.test(C.appVersion)),D},isNodeJs:function(){return o.e(Z)||(Z="object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)),Z},hardwareConcurrency:o.u(C.hardwareConcurrency,3),supportsPointerEvents:function(){return o.e(G)||(G=!ie()&&typeof PointerEvent<"u"&&(!o.e(C.pointerEnabled)||C.pointerEnabled)),G},supportsImageRenderingPixelated:se,supportsWebP:ce,supportsWebPSync:function(){return o.e(J)||ce(),H},imageRenderingValue:function(){return se()?Y:void 0},typedArrayTypes:fe,isPCBroswer:function(){var e=window.navigator.userAgent.toLowerCase(),t="ipad"==e.match(/ipad/i),n="iphone os"==e.match(/iphone os/i),r="midp"==e.match(/midp/i),o="ucweb"==e.match(/ucweb/i),a="android"==e.match(/android/i),u="windows ce"==e.match(/windows ce/i),i="windows mobile"==e.match(/windows mobile/i);return!(t||n||r||o||a||u||i)}};le.supportsFullscreen=function(){return ee.supportsFullscreen()},le.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},le.supportsWebWorkers=function(){return typeof Worker<"u"},le.supportsWebAssembly=function(){return typeof WebAssembly<"u"&&!le.isEdge()},le.supportsOffscreenCanvas=function(){return typeof OffscreenCanvas<"u"&&!le.isEdge()},e._0x3b3836=K,e.p=d,e.p$1=s,e.s=le})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/FrustumGeometry-9ce10b65.js b/SuperMap iEarth/public/SuperMap3D/Workers/FrustumGeometry-0eaedaf3.js similarity index 98% rename from SuperMap iEarth/public/SuperMap3D/Workers/FrustumGeometry-9ce10b65.js rename to SuperMap iEarth/public/SuperMap3D/Workers/FrustumGeometry-0eaedaf3.js index 32a8478c..8b32c289 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/FrustumGeometry-9ce10b65.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/FrustumGeometry-0eaedaf3.js @@ -1 +1 @@ -define(["exports","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Cartesian4-72b88c9e","./Check-52a7d806","./ComponentDatatype-98414d16","./when-92c6cf3c","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./FeatureDetection-cec0163f","./Math-ecf82623","./Plane-33393da8","./VertexFormat-f496a3f1"],(function(t,e,r,o,i,n,a,s,f,h,u,p,l){"use strict";function c(t){this.planes=a.u(t,[])}var m=[new r.o,new r.o,new r.o];r.o.clone(r.o.UNIT_X,m[0]),r.o.clone(r.o.UNIT_Y,m[1]),r.o.clone(r.o.UNIT_Z,m[2]);var w=new r.o,d=new r.o,_=new p.o(new r.o(1,0,0),0);function y(t){t=a.u(t,a.u.EMPTY_OBJECT),this.left=t.left,this._left=void 0,this.right=t.right,this._right=void 0,this.top=t.top,this._top=void 0,this.bottom=t.bottom,this._bottom=void 0,this.near=a.u(t.near,1),this._near=this.near,this.far=a.u(t.far,5e8),this._far=this.far,this._cullingVolume=new c,this._orthographicMatrix=new h.p}function g(t){if(!(a.e(t.right)&&a.e(t.left)&&a.e(t.top)&&a.e(t.bottom)&&a.e(t.near)&&a.e(t.far)))throw new i.t("right, left, top, bottom, near, or far parameters are not set.");if(t.top!==t._top||t.bottom!==t._bottom||t.left!==t._left||t.right!==t._right||t.near!==t._near||t.far!==t._far){if(t.left>t.right)throw new i.t("right must be greater than left.");if(t.bottom>t.top)throw new i.t("top must be greater than bottom.");if(t.near>t.far)throw new i.t("near must be greater than zero and less than far.");t._left=t.left,t._right=t.right,t._top=t.top,t._bottom=t.bottom,t._near=t.near,t._far=t.far,t._orthographicMatrix=h.p.computeOrthographicOffCenter(t.left,t.right,t.bottom,t.top,t.near,t.far,t._orthographicMatrix)}}c.fromBoundingSphere=function(t,e){if(!a.e(t))throw new i.t("boundingSphere is required.");a.e(e)||(e=new c);var n=m.length,s=e.planes;s.length=2*n;for(var f=t.center,h=t.radius,u=0,p=0;p<n;++p){var l=m[p],_=s[u],y=s[u+1];a.e(_)||(_=s[u]=new o.e),a.e(y)||(y=s[u+1]=new o.e),r.o.multiplyByScalar(l,-h,w),r.o.add(f,w,w),_.x=l.x,_.y=l.y,_.z=l.z,_.w=-r.o.dot(l,w),r.o.multiplyByScalar(l,h,w),r.o.add(f,w,w),y.x=-l.x,y.y=-l.y,y.z=-l.z,y.w=-r.o.dot(r.o.negate(l,d),w),u+=2}return e},c.prototype.computeVisibility=function(t){if(!a.e(t))throw new i.t("boundingVolume is required.");for(var r=this.planes,o=!1,n=0,s=r.length;n<s;++n){var f=t.intersectPlane(p.o.fromCartesian4(r[n],_));if(f===e.S.OUTSIDE)return e.S.OUTSIDE;f===e.S.INTERSECTING&&(o=!0)}return o?e.S.INTERSECTING:e.S.INSIDE},c.prototype.computeVisibilityWithPlaneMask=function(t,r){if(!a.e(t))throw new i.t("boundingVolume is required.");if(!a.e(r))throw new i.t("parentPlaneMask is required.");if(r===c.MASK_OUTSIDE||r===c.MASK_INSIDE)return r;for(var o=c.MASK_INSIDE,n=this.planes,s=0,f=n.length;s<f;++s){var h=s<31?1<<s:0;if(!(s<31&&0==(r&h))){var u=t.intersectPlane(p.o.fromCartesian4(n[s],_));if(u===e.S.OUTSIDE)return c.MASK_OUTSIDE;u===e.S.INTERSECTING&&(o|=h)}}return o},c.MASK_OUTSIDE=4294967295,c.MASK_INSIDE=0,c.MASK_INDETERMINATE=2147483647,Object.defineProperties(y.prototype,{projectionMatrix:{get:function(){return g(this),this._orthographicMatrix}}});var v=new r.o,b=new r.o,x=new r.o,C=new r.o;function z(t){t=a.u(t,a.u.EMPTY_OBJECT),this._offCenterFrustum=new y,this.width=t.width,this._width=void 0,this.aspectRatio=t.aspectRatio,this._aspectRatio=void 0,this.near=a.u(t.near,1),this._near=this.near,this.far=a.u(t.far,5e8),this._far=this.far}function O(t){if(!(a.e(t.width)&&a.e(t.aspectRatio)&&a.e(t.near)&&a.e(t.far)))throw new i.t("width, aspectRatio, near, or far parameters are not set.");var e=t._offCenterFrustum;if(t.width!==t._width||t.aspectRatio!==t._aspectRatio||t.near!==t._near||t.far!==t._far){if(t.aspectRatio<0)throw new i.t("aspectRatio must be positive.");if(t.near<0||t.near>t.far)throw new i.t("near must be greater than zero and less than far.");t._aspectRatio=t.aspectRatio,t._width=t.width,t._near=t.near,t._far=t.far;var r=1/t.aspectRatio;e.right=.5*t.width,e.left=-e.right,e.top=r*e.right,e.bottom=-e.top,e.near=t.near,e.far=t.far}}function R(t){t=a.u(t,a.u.EMPTY_OBJECT),this.left=t.left,this._left=void 0,this.right=t.right,this._right=void 0,this.top=t.top,this._top=void 0,this.bottom=t.bottom,this._bottom=void 0,this.near=a.u(t.near,1),this._near=this.near,this.far=a.u(t.far,5e8),this._far=this.far,this._cullingVolume=new c,this._perspectiveMatrix=new h.p,this._infinitePerspective=new h.p}function P(t){if(!(a.e(t.right)&&a.e(t.left)&&a.e(t.top)&&a.e(t.bottom)&&a.e(t.near)&&a.e(t.far)))throw new i.t("right, left, top, bottom, near, or far parameters are not set.");var e=t.top,r=t.bottom,o=t.right,n=t.left,s=t.near,f=t.far;if(e!==t._top||r!==t._bottom||n!==t._left||o!==t._right||s!==t._near||f!==t._far){if(t.near<=0||t.near>t.far)throw new i.t("near must be greater than zero and less than far.");t._left=n,t._right=o,t._top=e,t._bottom=r,t._near=s,t._far=f,t._perspectiveMatrix=h.p.computePerspectiveOffCenter(n,o,r,e,s,f,t._perspectiveMatrix),t._infinitePerspective=h.p.computeInfinitePerspectiveOffCenter(n,o,r,e,s,t._infinitePerspective)}}y.prototype.computeCullingVolume=function(t,e,n){if(!a.e(t))throw new i.t("position is required.");if(!a.e(e))throw new i.t("direction is required.");if(!a.e(n))throw new i.t("up is required.");var s=this._cullingVolume.planes,f=this.top,h=this.bottom,u=this.right,p=this.left,l=this.near,c=this.far,m=r.o.cross(e,n,v);r.o.normalize(m,m);var w=b;r.o.multiplyByScalar(e,l,w),r.o.add(t,w,w);var d=x;r.o.multiplyByScalar(m,p,d),r.o.add(w,d,d);var _=s[0];return a.e(_)||(_=s[0]=new o.e),_.x=m.x,_.y=m.y,_.z=m.z,_.w=-r.o.dot(m,d),r.o.multiplyByScalar(m,u,d),r.o.add(w,d,d),_=s[1],a.e(_)||(_=s[1]=new o.e),_.x=-m.x,_.y=-m.y,_.z=-m.z,_.w=-r.o.dot(r.o.negate(m,C),d),r.o.multiplyByScalar(n,h,d),r.o.add(w,d,d),_=s[2],a.e(_)||(_=s[2]=new o.e),_.x=n.x,_.y=n.y,_.z=n.z,_.w=-r.o.dot(n,d),r.o.multiplyByScalar(n,f,d),r.o.add(w,d,d),_=s[3],a.e(_)||(_=s[3]=new o.e),_.x=-n.x,_.y=-n.y,_.z=-n.z,_.w=-r.o.dot(r.o.negate(n,C),d),_=s[4],a.e(_)||(_=s[4]=new o.e),_.x=e.x,_.y=e.y,_.z=e.z,_.w=-r.o.dot(e,w),r.o.multiplyByScalar(e,c,d),r.o.add(t,d,d),_=s[5],a.e(_)||(_=s[5]=new o.e),_.x=-e.x,_.y=-e.y,_.z=-e.z,_.w=-r.o.dot(r.o.negate(e,C),d),this._cullingVolume},y.prototype.getPixelDimensions=function(t,e,r,o,n){if(g(this),!a.e(t)||!a.e(e))throw new i.t("Both drawingBufferWidth and drawingBufferHeight are required.");if(t<=0)throw new i.t("drawingBufferWidth must be greater than zero.");if(e<=0)throw new i.t("drawingBufferHeight must be greater than zero.");if(!a.e(r))throw new i.t("distance is required.");if(!a.e(o))throw new i.t("pixelRatio is required.");if(o<=0)throw new i.t("pixelRatio must be greater than zero.");if(!a.e(n))throw new i.t("A result object is required.");var s=o*(this.right-this.left)/t,f=o*(this.top-this.bottom)/e;return n.x=s,n.y=f,n},y.prototype.clone=function(t){return a.e(t)||(t=new y),t.left=this.left,t.right=this.right,t.top=this.top,t.bottom=this.bottom,t.near=this.near,t.far=this.far,t._left=void 0,t._right=void 0,t._top=void 0,t._bottom=void 0,t._near=void 0,t._far=void 0,t},y.prototype.equals=function(t){return a.e(t)&&t instanceof y&&this.right===t.right&&this.left===t.left&&this.top===t.top&&this.bottom===t.bottom&&this.near===t.near&&this.far===t.far},y.prototype.equalsEpsilon=function(t,e,r){return t===this||a.e(t)&&t instanceof y&&u.e.equalsEpsilon(this.right,t.right,e,r)&&u.e.equalsEpsilon(this.left,t.left,e,r)&&u.e.equalsEpsilon(this.top,t.top,e,r)&&u.e.equalsEpsilon(this.bottom,t.bottom,e,r)&&u.e.equalsEpsilon(this.near,t.near,e,r)&&u.e.equalsEpsilon(this.far,t.far,e,r)},z.packedLength=4,z.pack=function(t,e,r){return i.o.typeOf.object("value",t),i.o.defined("array",e),r=a.u(r,0),e[r++]=t.width,e[r++]=t.aspectRatio,e[r++]=t.near,e[r]=t.far,e},z.unpack=function(t,e,r){return i.o.defined("array",t),e=a.u(e,0),a.e(r)||(r=new z),r.width=t[e++],r.aspectRatio=t[e++],r.near=t[e++],r.far=t[e],r},Object.defineProperties(z.prototype,{projectionMatrix:{get:function(){return O(this),this._offCenterFrustum.projectionMatrix}}}),z.prototype.computeCullingVolume=function(t,e,r){return O(this),this._offCenterFrustum.computeCullingVolume(t,e,r)},z.prototype.getPixelDimensions=function(t,e,r,o,i){return O(this),this._offCenterFrustum.getPixelDimensions(t,e,r,o,i)},z.prototype.clone=function(t){return a.e(t)||(t=new z),t.aspectRatio=this.aspectRatio,t.width=this.width,t.near=this.near,t.far=this.far,t._aspectRatio=void 0,t._width=void 0,t._near=void 0,t._far=void 0,this._offCenterFrustum.clone(t._offCenterFrustum),t},z.prototype.equals=function(t){return!!(a.e(t)&&t instanceof z)&&(O(this),O(t),this.width===t.width&&this.aspectRatio===t.aspectRatio&&this._offCenterFrustum.equals(t._offCenterFrustum))},z.prototype.equalsEpsilon=function(t,e,r){return!!(a.e(t)&&t instanceof z)&&(O(this),O(t),u.e.equalsEpsilon(this.width,t.width,e,r)&&u.e.equalsEpsilon(this.aspectRatio,t.aspectRatio,e,r)&&this._offCenterFrustum.equalsEpsilon(t._offCenterFrustum,e,r))},Object.defineProperties(R.prototype,{projectionMatrix:{get:function(){return P(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return P(this),this._infinitePerspective}}});var E=new r.o,M=new r.o,F=new r.o,S=new r.o;function q(t){t=a.u(t,a.u.EMPTY_OBJECT),this._offCenterFrustum=new R,this.fov=t.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=t.aspectRatio,this._aspectRatio=void 0,this.near=a.u(t.near,1),this._near=this.near,this.far=a.u(t.far,5e8),this._far=this.far,this.xOffset=a.u(t.xOffset,0),this._xOffset=this.xOffset,this.yOffset=a.u(t.yOffset,0),this._yOffset=this.yOffset,this.reflect=!1}function T(t){if(!(a.e(t.fov)&&a.e(t.aspectRatio)&&a.e(t.near)&&a.e(t.far)))throw new i.t("fov, aspectRatio, near, or far parameters are not set.");var e=t._offCenterFrustum;if(t.fov!==t._fov||t.aspectRatio!==t._aspectRatio||t.near!==t._near||t.far!==t._far||t.xOffset!==t._xOffset||t.yOffset!==t._yOffset){if(t.fov<0||t.fov>=Math.PI)throw new i.t("fov must be in the range [0, PI).");if(t.aspectRatio<0)throw new i.t("aspectRatio must be positive.");if(t.near<0||t.near>t.far)throw new i.t("near must be greater than zero and less than far.");t._aspectRatio=t.aspectRatio,t._fov=t.fov,t._fovy=t.aspectRatio<=1?t.fov:2*Math.atan(Math.tan(.5*t.fov)/t.aspectRatio),t._near=t.near,t._far=t.far,t._sseDenominator=2*Math.tan(.5*t._fovy),t._xOffset=t.xOffset,t._yOffset=t.yOffset,e.top=t.near*Math.tan(.5*t._fovy),e.bottom=-e.top,e.right=t.aspectRatio*e.top,e.left=-e.right,e.near=t.near,e.far=t.far,e.right+=t.xOffset,e.left+=t.xOffset,e.top+=t.yOffset,e.bottom+=t.yOffset}}R.prototype.resetProjectionMatrix=function(){if(!(a.e(this.right)&&a.e(this.left)&&a.e(this.top)&&a.e(this.bottom)&&a.e(this.near)&&a.e(this.far)))throw new i.t("right, left, top, bottom, near, or far parameters are not set.");var t=this.top,e=this.bottom,r=this.right,o=this.left,n=this.near,s=this.far;if(this.near<=0||this.near>this.far)throw new i.t("near must be greater than zero and less than far.");this._left=o,this._right=r,this._top=t,this._bottom=e,this._near=n,this._far=s,this._perspectiveMatrix=h.p.computePerspectiveOffCenter(o,r,e,t,n,s,this._perspectiveMatrix),this._infinitePerspective=h.p.computeInfinitePerspectiveOffCenter(o,r,e,t,n,this._infinitePerspective)},R.prototype.computeCullingVolume=function(t,e,n,s){if(!a.e(t))throw new i.t("position is required.");if(!a.e(e))throw new i.t("direction is required.");if(!a.e(n))throw new i.t("up is required.");var f=this._cullingVolume.planes,h=a.u(s,0);h=Math.min(h,.5),h=Math.max(h,0);var u=this.top+this.top*h,p=this.bottom-this.top*h,l=this.right+this.right*h,c=this.left-this.right*h,m=this.near,w=this.far,d=r.o.cross(e,n,E),_=M;r.o.multiplyByScalar(e,m,_),r.o.add(t,_,_);var y=F;r.o.multiplyByScalar(e,w,y),r.o.add(t,y,y);var g=S;r.o.multiplyByScalar(d,c,g),r.o.add(_,g,g),r.o.subtract(g,t,g),r.o.normalize(g,g),r.o.cross(g,n,g),r.o.normalize(g,g);var v=f[0];return a.e(v)||(v=f[0]=new o.e),v.x=g.x,v.y=g.y,v.z=g.z,v.w=-r.o.dot(g,t),r.o.multiplyByScalar(d,l,g),r.o.add(_,g,g),r.o.subtract(g,t,g),r.o.cross(n,g,g),r.o.normalize(g,g),v=f[1],a.e(v)||(v=f[1]=new o.e),v.x=g.x,v.y=g.y,v.z=g.z,v.w=-r.o.dot(g,t),r.o.multiplyByScalar(n,p,g),r.o.add(_,g,g),r.o.subtract(g,t,g),r.o.cross(d,g,g),r.o.normalize(g,g),v=f[2],a.e(v)||(v=f[2]=new o.e),v.x=g.x,v.y=g.y,v.z=g.z,v.w=-r.o.dot(g,t),r.o.multiplyByScalar(n,u,g),r.o.add(_,g,g),r.o.subtract(g,t,g),r.o.cross(g,d,g),r.o.normalize(g,g),v=f[3],a.e(v)||(v=f[3]=new o.e),v.x=g.x,v.y=g.y,v.z=g.z,v.w=-r.o.dot(g,t),v=f[4],a.e(v)||(v=f[4]=new o.e),v.x=e.x,v.y=e.y,v.z=e.z,v.w=-r.o.dot(e,_),r.o.negate(e,g),v=f[5],a.e(v)||(v=f[5]=new o.e),v.x=g.x,v.y=g.y,v.z=g.z,v.w=-r.o.dot(g,y),this._cullingVolume},R.prototype.getPixelDimensions=function(t,e,r,o,n){if(P(this),!a.e(t)||!a.e(e))throw new i.t("Both drawingBufferWidth and drawingBufferHeight are required.");if(t<=0)throw new i.t("drawingBufferWidth must be greater than zero.");if(e<=0)throw new i.t("drawingBufferHeight must be greater than zero.");if(!a.e(r))throw new i.t("distance is required.");if(!a.e(o))throw new i.t("pixelRatio is required");if(o<=0)throw new i.t("pixelRatio must be greater than zero.");if(!a.e(n))throw new i.t("A result object is required.");var s=1/this.near,f=this.top*s,h=2*o*r*f/e,u=2*o*r*(f=this.right*s)/t;return n.x=u,n.y=h,n},R.prototype.clone=function(t){return a.e(t)||(t=new R),t.right=this.right,t.left=this.left,t.top=this.top,t.bottom=this.bottom,t.near=this.near,t.far=this.far,t._left=void 0,t._right=void 0,t._top=void 0,t._bottom=void 0,t._near=void 0,t._far=void 0,t},R.prototype.equals=function(t){return a.e(t)&&t instanceof R&&this.right===t.right&&this.left===t.left&&this.top===t.top&&this.bottom===t.bottom&&this.near===t.near&&this.far===t.far},R.prototype.equalsEpsilon=function(t,e,r){return t===this||a.e(t)&&t instanceof R&&u.e.equalsEpsilon(this.right,t.right,e,r)&&u.e.equalsEpsilon(this.left,t.left,e,r)&&u.e.equalsEpsilon(this.top,t.top,e,r)&&u.e.equalsEpsilon(this.bottom,t.bottom,e,r)&&u.e.equalsEpsilon(this.near,t.near,e,r)&&u.e.equalsEpsilon(this.far,t.far,e,r)},q.isNDCHalfZRange=!1,q.packedLength=6,q.pack=function(t,e,r){return i.o.typeOf.object("value",t),i.o.defined("array",e),r=a.u(r,0),e[r++]=t.fov,e[r++]=t.aspectRatio,e[r++]=t.near,e[r++]=t.far,e[r++]=t.xOffset,e[r]=t.yOffset,e},q.unpack=function(t,e,r){return i.o.defined("array",t),e=a.u(e,0),a.e(r)||(r=new q),r.fov=t[e++],r.aspectRatio=t[e++],r.near=t[e++],r.far=t[e++],r.xOffset=t[e++],r.yOffset=t[e],r},Object.defineProperties(q.prototype,{projectionMatrix:{get:function(){return T(this),this.reflect&&function(t){if(a.e(t.clipPlane)&&a.e(t.currentViewMatrix)){var e=t.currentViewMatrix,r=t._offCenterFrustum.projectionMatrix;h.p.multiplyByPlane(e,t.clipPlane,k),D.x=(u.e.sign(k.normal.x)+r[8])/r[0],D.y=(u.e.sign(k.normal.y)+r[9])/r[5],D.z=-1,D.w=(1+r[10])/r[14],B.x=k.normal.x,B.y=k.normal.y,B.z=k.normal.z,B.w=k.distance,o.e.multiplyByScalar(B,2/o.e.dot(B,D),A),r[2]=A.x,r[6]=A.y,r[10]=A.z+1,r[14]=A.w,h.p.halfZRange&&h.p.multiply(h.p.ConvertNDCToHalfZRange,r,r)}}(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return T(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return T(this),this._fovy}},sseDenominator:{get:function(){return T(this),this._sseDenominator}}}),q.prototype.resetProjectionMatrix=function(){return this._offCenterFrustum.resetProjectionMatrix()},q.prototype.computeCullingVolume=function(t,e,r,o){return T(this),this._offCenterFrustum.computeCullingVolume(t,e,r,o)},q.prototype.getPixelDimensions=function(t,e,r,o,i){return T(this),this._offCenterFrustum.getPixelDimensions(t,e,r,o,i)},q.prototype.clone=function(t){return a.e(t)||(t=new q),t.aspectRatio=this.aspectRatio,t.fov=this.fov,t.near=this.near,t.far=this.far,t.reflect=this.reflect,t.clipPlane=this.clipPlane,t.currentViewMatrix=this.currentViewMatrix,t._aspectRatio=void 0,t._fov=void 0,t._near=void 0,t._far=void 0,this._offCenterFrustum.clone(t._offCenterFrustum),t},q.prototype.equals=function(t){return!!(a.e(t)&&t instanceof q)&&(T(this),T(t),this.fov===t.fov&&this.aspectRatio===t.aspectRatio&&this._offCenterFrustum.equals(t._offCenterFrustum))},q.prototype.equalsEpsilon=function(t,e,r){return!!(a.e(t)&&t instanceof q)&&(T(this),T(t),u.e.equalsEpsilon(this.fov,t.fov,e,r)&&u.e.equalsEpsilon(this.aspectRatio,t.aspectRatio,e,r)&&this._offCenterFrustum.equalsEpsilon(t._offCenterFrustum,e,r))};var k=new p.o(r.o.UNIT_Z,1),D=new o.e,B=new o.e,A=new o.e;function I(t){i.o.typeOf.object("options",t),i.o.typeOf.object("options.frustum",t.frustum),i.o.typeOf.object("options.origin",t.origin),i.o.typeOf.object("options.orientation",t.orientation);var e,o,n=t.frustum,f=t.orientation,h=t.origin,u=a.u(t.vertexFormat,l.n.DEFAULT),p=a.u(t._drawNearPlane,!0);n instanceof q?(e=0,o=q.packedLength):n instanceof z&&(e=1,o=z.packedLength),this._frustumType=e,this._frustum=n.clone(),this._origin=r.o.clone(h),this._orientation=s.n.clone(f),this._drawNearPlane=p,this._vertexFormat=u,this._workerName="createFrustumGeometry",this.packedLength=2+o+r.o.packedLength+s.n.packedLength+l.n.packedLength}I.pack=function(t,e,o){i.o.typeOf.object("value",t),i.o.defined("array",e),o=a.u(o,0);var n=t._frustumType,f=t._frustum;return e[o++]=n,0===n?(q.pack(f,e,o),o+=q.packedLength):(z.pack(f,e,o),o+=z.packedLength),r.o.pack(t._origin,e,o),o+=r.o.packedLength,s.n.pack(t._orientation,e,o),o+=s.n.packedLength,l.n.pack(t._vertexFormat,e,o),e[o+=l.n.packedLength]=t._drawNearPlane?1:0,e};var N=new q,j=new z,L=new s.n,V=new r.o,U=new l.n;function G(t,e,r,o,i,n,s,f){for(var h=t/3*2,u=0;u<4;++u)a.e(e)&&(e[t]=n.x,e[t+1]=n.y,e[t+2]=n.z),a.e(r)&&(r[t]=s.x,r[t+1]=s.y,r[t+2]=s.z),a.e(o)&&(o[t]=f.x,o[t+1]=f.y,o[t+2]=f.z),t+=3;i[h]=0,i[h+1]=0,i[h+2]=1,i[h+3]=0,i[h+4]=1,i[h+5]=1,i[h+6]=0,i[h+7]=1}I.unpack=function(t,e,o){i.o.defined("array",t),e=a.u(e,0);var n,f=t[e++];0===f?(n=q.unpack(t,e,N),e+=q.packedLength):(n=z.unpack(t,e,j),e+=z.packedLength);var h=r.o.unpack(t,e,V);e+=r.o.packedLength;var u=s.n.unpack(t,e,L);e+=s.n.packedLength;var p=l.n.unpack(t,e,U),c=1===t[e+=l.n.packedLength];if(!a.e(o))return new I({frustum:n,origin:h,orientation:u,vertexFormat:p,_drawNearPlane:c});var m=f===o._frustumType?o._frustum:void 0;return o._frustum=n.clone(m),o._frustumType=f,o._origin=r.o.clone(h,o._origin),o._orientation=s.n.clone(u,o._orientation),o._vertexFormat=l.n.clone(p,o._vertexFormat),o._drawNearPlane=c,o};var K=new h.p$1,H=new h.p,W=new h.p,Y=new r.o,Z=new r.o,$=new r.o,J=new r.o,Q=new r.o,X=new r.o,tt=new Array(3),et=new Array(4);et[0]=new o.e(-1,-1,1,1),et[1]=new o.e(1,-1,1,1),et[2]=new o.e(1,1,1,1),et[3]=new o.e(-1,1,1,1);for(var rt=new Array(4),ot=0;ot<4;++ot)rt[ot]=new o.e;I._computeNearFarPlanes=function(t,e,i,n,s,f,u,p){var l=h.p$1.fromQuaternion(e,K),c=a.u(f,Y),m=a.u(u,Z),w=a.u(p,$);c=h.p$1.getColumn(l,0,c),m=h.p$1.getColumn(l,1,m),w=h.p$1.getColumn(l,2,w),r.o.normalize(c,c),r.o.normalize(m,m),r.o.normalize(w,w),r.o.negate(c,c);var d,_,y=h.p.computeView(t,w,m,c,H);if(0===i){var g=n.projectionMatrix,v=h.p.multiply(g,y,W);_=h.p.inverse(v,W)}else d=h.p.inverseTransformation(y,W);a.e(_)?(tt[0]=n.near,tt[1]=n.far):(tt[0]=0,tt[1]=n.near,tt[2]=n.far);for(var b=0;b<2;++b)for(var x=0;x<4;++x){var C=o.e.clone(et[x],rt[x]);if(a.e(_)){var z=1/(C=h.p.multiplyByVector(_,C,C)).w;r.o.multiplyByScalar(C,z,C),r.o.subtract(C,t,C),r.o.normalize(C,C);var O=r.o.dot(w,C);r.o.multiplyByScalar(C,tt[b]/O,C),r.o.add(C,t,C)}else{a.e(n._offCenterFrustum)&&(n=n._offCenterFrustum);var R=tt[b],P=tt[b+1];C.x=.5*(C.x*(n.right-n.left)+n.left+n.right),C.y=.5*(C.y*(n.top-n.bottom)+n.bottom+n.top),C.z=.5*(C.z*(R-P)-R-P),C.w=1,h.p.multiplyByVector(d,C,C)}s[12*b+3*x]=C.x,s[12*b+3*x+1]=C.y,s[12*b+3*x+2]=C.z}},I.createGeometry=function(t){var o=t._frustumType,i=t._frustum,u=t._origin,p=t._orientation,l=t._drawNearPlane,c=t._vertexFormat,m=l?6:5,w=new Float64Array(72);I._computeNearFarPlanes(u,p,o,i,w);var d=24;w[d]=w[12],w[d+1]=w[13],w[d+2]=w[14],w[d+3]=w[0],w[d+4]=w[1],w[d+5]=w[2],w[d+6]=w[9],w[d+7]=w[10],w[d+8]=w[11],w[d+9]=w[21],w[d+10]=w[22],w[d+11]=w[23],w[d+=12]=w[15],w[d+1]=w[16],w[d+2]=w[17],w[d+3]=w[3],w[d+4]=w[4],w[d+5]=w[5],w[d+6]=w[0],w[d+7]=w[1],w[d+8]=w[2],w[d+9]=w[12],w[d+10]=w[13],w[d+11]=w[14],w[d+=12]=w[3],w[d+1]=w[4],w[d+2]=w[5],w[d+3]=w[15],w[d+4]=w[16],w[d+5]=w[17],w[d+6]=w[18],w[d+7]=w[19],w[d+8]=w[20],w[d+9]=w[6],w[d+10]=w[7],w[d+11]=w[8],w[d+=12]=w[6],w[d+1]=w[7],w[d+2]=w[8],w[d+3]=w[18],w[d+4]=w[19],w[d+5]=w[20],w[d+6]=w[21],w[d+7]=w[22],w[d+8]=w[23],w[d+9]=w[9],w[d+10]=w[10],w[d+11]=w[11],l||(w=w.subarray(12));var _=new f.a({position:new s.o({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w})});if(a.e(c.normal)||a.e(c.tangent)||a.e(c.bitangent)||a.e(c.st)){var y=a.e(c.normal)?new Float32Array(12*m):void 0,g=a.e(c.tangent)?new Float32Array(12*m):void 0,v=a.e(c.bitangent)?new Float32Array(12*m):void 0,b=a.e(c.st)?new Float32Array(8*m):void 0,x=Y,C=Z,z=$,O=r.o.negate(x,J),R=r.o.negate(C,Q),P=r.o.negate(z,X);d=0,l&&(G(d,y,g,v,b,P,x,C),d+=12),G(d,y,g,v,b,z,O,C),G(d+=12,y,g,v,b,O,P,C),G(d+=12,y,g,v,b,R,P,O),G(d+=12,y,g,v,b,x,z,C),G(d+=12,y,g,v,b,C,z,O),a.e(y)&&(_.normal=new s.o({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),a.e(g)&&(_.tangent=new s.o({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:g})),a.e(v)&&(_.bitangent=new s.o({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})),a.e(b)&&(_.st=new s.o({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:b}))}for(var E=new Uint16Array(6*m),M=0;M<m;++M){var F=6*M,S=4*M;E[F]=S,E[F+1]=S+1,E[F+2]=S+2,E[F+3]=S,E[F+4]=S+2,E[F+5]=S+3}return new s.I({attributes:_,indices:E,primitiveType:h._0x4b6a27.TRIANGLES,boundingSphere:e.i.fromVertices(w)})},t.a=z,t.o=q,t.z=I})); +define(["exports","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Cartesian4-72b88c9e","./Check-52a7d806","./ComponentDatatype-98414d16","./when-92c6cf3c","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./FeatureDetection-fd297af4","./Math-ecf82623","./Plane-a2c6da7b","./VertexFormat-f496a3f1"],(function(t,e,r,o,i,n,a,s,f,h,u,p,l){"use strict";function c(t){this.planes=a.u(t,[])}var m=[new r.o,new r.o,new r.o];r.o.clone(r.o.UNIT_X,m[0]),r.o.clone(r.o.UNIT_Y,m[1]),r.o.clone(r.o.UNIT_Z,m[2]);var w=new r.o,d=new r.o,_=new p.o(new r.o(1,0,0),0);function y(t){t=a.u(t,a.u.EMPTY_OBJECT),this.left=t.left,this._left=void 0,this.right=t.right,this._right=void 0,this.top=t.top,this._top=void 0,this.bottom=t.bottom,this._bottom=void 0,this.near=a.u(t.near,1),this._near=this.near,this.far=a.u(t.far,5e8),this._far=this.far,this._cullingVolume=new c,this._orthographicMatrix=new h.p}function g(t){if(!(a.e(t.right)&&a.e(t.left)&&a.e(t.top)&&a.e(t.bottom)&&a.e(t.near)&&a.e(t.far)))throw new i.t("right, left, top, bottom, near, or far parameters are not set.");if(t.top!==t._top||t.bottom!==t._bottom||t.left!==t._left||t.right!==t._right||t.near!==t._near||t.far!==t._far){if(t.left>t.right)throw new i.t("right must be greater than left.");if(t.bottom>t.top)throw new i.t("top must be greater than bottom.");if(t.near>t.far)throw new i.t("near must be greater than zero and less than far.");t._left=t.left,t._right=t.right,t._top=t.top,t._bottom=t.bottom,t._near=t.near,t._far=t.far,t._orthographicMatrix=h.p.computeOrthographicOffCenter(t.left,t.right,t.bottom,t.top,t.near,t.far,t._orthographicMatrix)}}c.fromBoundingSphere=function(t,e){if(!a.e(t))throw new i.t("boundingSphere is required.");a.e(e)||(e=new c);var n=m.length,s=e.planes;s.length=2*n;for(var f=t.center,h=t.radius,u=0,p=0;p<n;++p){var l=m[p],_=s[u],y=s[u+1];a.e(_)||(_=s[u]=new o.e),a.e(y)||(y=s[u+1]=new o.e),r.o.multiplyByScalar(l,-h,w),r.o.add(f,w,w),_.x=l.x,_.y=l.y,_.z=l.z,_.w=-r.o.dot(l,w),r.o.multiplyByScalar(l,h,w),r.o.add(f,w,w),y.x=-l.x,y.y=-l.y,y.z=-l.z,y.w=-r.o.dot(r.o.negate(l,d),w),u+=2}return e},c.prototype.computeVisibility=function(t){if(!a.e(t))throw new i.t("boundingVolume is required.");for(var r=this.planes,o=!1,n=0,s=r.length;n<s;++n){var f=t.intersectPlane(p.o.fromCartesian4(r[n],_));if(f===e.S.OUTSIDE)return e.S.OUTSIDE;f===e.S.INTERSECTING&&(o=!0)}return o?e.S.INTERSECTING:e.S.INSIDE},c.prototype.computeVisibilityWithPlaneMask=function(t,r){if(!a.e(t))throw new i.t("boundingVolume is required.");if(!a.e(r))throw new i.t("parentPlaneMask is required.");if(r===c.MASK_OUTSIDE||r===c.MASK_INSIDE)return r;for(var o=c.MASK_INSIDE,n=this.planes,s=0,f=n.length;s<f;++s){var h=s<31?1<<s:0;if(!(s<31&&0==(r&h))){var u=t.intersectPlane(p.o.fromCartesian4(n[s],_));if(u===e.S.OUTSIDE)return c.MASK_OUTSIDE;u===e.S.INTERSECTING&&(o|=h)}}return o},c.MASK_OUTSIDE=4294967295,c.MASK_INSIDE=0,c.MASK_INDETERMINATE=2147483647,Object.defineProperties(y.prototype,{projectionMatrix:{get:function(){return g(this),this._orthographicMatrix}}});var v=new r.o,b=new r.o,x=new r.o,C=new r.o;function z(t){t=a.u(t,a.u.EMPTY_OBJECT),this._offCenterFrustum=new y,this.width=t.width,this._width=void 0,this.aspectRatio=t.aspectRatio,this._aspectRatio=void 0,this.near=a.u(t.near,1),this._near=this.near,this.far=a.u(t.far,5e8),this._far=this.far}function O(t){if(!(a.e(t.width)&&a.e(t.aspectRatio)&&a.e(t.near)&&a.e(t.far)))throw new i.t("width, aspectRatio, near, or far parameters are not set.");var e=t._offCenterFrustum;if(t.width!==t._width||t.aspectRatio!==t._aspectRatio||t.near!==t._near||t.far!==t._far){if(t.aspectRatio<0)throw new i.t("aspectRatio must be positive.");if(t.near<0||t.near>t.far)throw new i.t("near must be greater than zero and less than far.");t._aspectRatio=t.aspectRatio,t._width=t.width,t._near=t.near,t._far=t.far;var r=1/t.aspectRatio;e.right=.5*t.width,e.left=-e.right,e.top=r*e.right,e.bottom=-e.top,e.near=t.near,e.far=t.far}}function R(t){t=a.u(t,a.u.EMPTY_OBJECT),this.left=t.left,this._left=void 0,this.right=t.right,this._right=void 0,this.top=t.top,this._top=void 0,this.bottom=t.bottom,this._bottom=void 0,this.near=a.u(t.near,1),this._near=this.near,this.far=a.u(t.far,5e8),this._far=this.far,this._cullingVolume=new c,this._perspectiveMatrix=new h.p,this._infinitePerspective=new h.p}function P(t){if(!(a.e(t.right)&&a.e(t.left)&&a.e(t.top)&&a.e(t.bottom)&&a.e(t.near)&&a.e(t.far)))throw new i.t("right, left, top, bottom, near, or far parameters are not set.");var e=t.top,r=t.bottom,o=t.right,n=t.left,s=t.near,f=t.far;if(e!==t._top||r!==t._bottom||n!==t._left||o!==t._right||s!==t._near||f!==t._far){if(t.near<=0||t.near>t.far)throw new i.t("near must be greater than zero and less than far.");t._left=n,t._right=o,t._top=e,t._bottom=r,t._near=s,t._far=f,t._perspectiveMatrix=h.p.computePerspectiveOffCenter(n,o,r,e,s,f,t._perspectiveMatrix),t._infinitePerspective=h.p.computeInfinitePerspectiveOffCenter(n,o,r,e,s,t._infinitePerspective)}}y.prototype.computeCullingVolume=function(t,e,n){if(!a.e(t))throw new i.t("position is required.");if(!a.e(e))throw new i.t("direction is required.");if(!a.e(n))throw new i.t("up is required.");var s=this._cullingVolume.planes,f=this.top,h=this.bottom,u=this.right,p=this.left,l=this.near,c=this.far,m=r.o.cross(e,n,v);r.o.normalize(m,m);var w=b;r.o.multiplyByScalar(e,l,w),r.o.add(t,w,w);var d=x;r.o.multiplyByScalar(m,p,d),r.o.add(w,d,d);var _=s[0];return a.e(_)||(_=s[0]=new o.e),_.x=m.x,_.y=m.y,_.z=m.z,_.w=-r.o.dot(m,d),r.o.multiplyByScalar(m,u,d),r.o.add(w,d,d),_=s[1],a.e(_)||(_=s[1]=new o.e),_.x=-m.x,_.y=-m.y,_.z=-m.z,_.w=-r.o.dot(r.o.negate(m,C),d),r.o.multiplyByScalar(n,h,d),r.o.add(w,d,d),_=s[2],a.e(_)||(_=s[2]=new o.e),_.x=n.x,_.y=n.y,_.z=n.z,_.w=-r.o.dot(n,d),r.o.multiplyByScalar(n,f,d),r.o.add(w,d,d),_=s[3],a.e(_)||(_=s[3]=new o.e),_.x=-n.x,_.y=-n.y,_.z=-n.z,_.w=-r.o.dot(r.o.negate(n,C),d),_=s[4],a.e(_)||(_=s[4]=new o.e),_.x=e.x,_.y=e.y,_.z=e.z,_.w=-r.o.dot(e,w),r.o.multiplyByScalar(e,c,d),r.o.add(t,d,d),_=s[5],a.e(_)||(_=s[5]=new o.e),_.x=-e.x,_.y=-e.y,_.z=-e.z,_.w=-r.o.dot(r.o.negate(e,C),d),this._cullingVolume},y.prototype.getPixelDimensions=function(t,e,r,o,n){if(g(this),!a.e(t)||!a.e(e))throw new i.t("Both drawingBufferWidth and drawingBufferHeight are required.");if(t<=0)throw new i.t("drawingBufferWidth must be greater than zero.");if(e<=0)throw new i.t("drawingBufferHeight must be greater than zero.");if(!a.e(r))throw new i.t("distance is required.");if(!a.e(o))throw new i.t("pixelRatio is required.");if(o<=0)throw new i.t("pixelRatio must be greater than zero.");if(!a.e(n))throw new i.t("A result object is required.");var s=o*(this.right-this.left)/t,f=o*(this.top-this.bottom)/e;return n.x=s,n.y=f,n},y.prototype.clone=function(t){return a.e(t)||(t=new y),t.left=this.left,t.right=this.right,t.top=this.top,t.bottom=this.bottom,t.near=this.near,t.far=this.far,t._left=void 0,t._right=void 0,t._top=void 0,t._bottom=void 0,t._near=void 0,t._far=void 0,t},y.prototype.equals=function(t){return a.e(t)&&t instanceof y&&this.right===t.right&&this.left===t.left&&this.top===t.top&&this.bottom===t.bottom&&this.near===t.near&&this.far===t.far},y.prototype.equalsEpsilon=function(t,e,r){return t===this||a.e(t)&&t instanceof y&&u.e.equalsEpsilon(this.right,t.right,e,r)&&u.e.equalsEpsilon(this.left,t.left,e,r)&&u.e.equalsEpsilon(this.top,t.top,e,r)&&u.e.equalsEpsilon(this.bottom,t.bottom,e,r)&&u.e.equalsEpsilon(this.near,t.near,e,r)&&u.e.equalsEpsilon(this.far,t.far,e,r)},z.packedLength=4,z.pack=function(t,e,r){return i.o.typeOf.object("value",t),i.o.defined("array",e),r=a.u(r,0),e[r++]=t.width,e[r++]=t.aspectRatio,e[r++]=t.near,e[r]=t.far,e},z.unpack=function(t,e,r){return i.o.defined("array",t),e=a.u(e,0),a.e(r)||(r=new z),r.width=t[e++],r.aspectRatio=t[e++],r.near=t[e++],r.far=t[e],r},Object.defineProperties(z.prototype,{projectionMatrix:{get:function(){return O(this),this._offCenterFrustum.projectionMatrix}}}),z.prototype.computeCullingVolume=function(t,e,r){return O(this),this._offCenterFrustum.computeCullingVolume(t,e,r)},z.prototype.getPixelDimensions=function(t,e,r,o,i){return O(this),this._offCenterFrustum.getPixelDimensions(t,e,r,o,i)},z.prototype.clone=function(t){return a.e(t)||(t=new z),t.aspectRatio=this.aspectRatio,t.width=this.width,t.near=this.near,t.far=this.far,t._aspectRatio=void 0,t._width=void 0,t._near=void 0,t._far=void 0,this._offCenterFrustum.clone(t._offCenterFrustum),t},z.prototype.equals=function(t){return!!(a.e(t)&&t instanceof z)&&(O(this),O(t),this.width===t.width&&this.aspectRatio===t.aspectRatio&&this._offCenterFrustum.equals(t._offCenterFrustum))},z.prototype.equalsEpsilon=function(t,e,r){return!!(a.e(t)&&t instanceof z)&&(O(this),O(t),u.e.equalsEpsilon(this.width,t.width,e,r)&&u.e.equalsEpsilon(this.aspectRatio,t.aspectRatio,e,r)&&this._offCenterFrustum.equalsEpsilon(t._offCenterFrustum,e,r))},Object.defineProperties(R.prototype,{projectionMatrix:{get:function(){return P(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return P(this),this._infinitePerspective}}});var E=new r.o,M=new r.o,F=new r.o,S=new r.o;function q(t){t=a.u(t,a.u.EMPTY_OBJECT),this._offCenterFrustum=new R,this.fov=t.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=t.aspectRatio,this._aspectRatio=void 0,this.near=a.u(t.near,1),this._near=this.near,this.far=a.u(t.far,5e8),this._far=this.far,this.xOffset=a.u(t.xOffset,0),this._xOffset=this.xOffset,this.yOffset=a.u(t.yOffset,0),this._yOffset=this.yOffset,this.reflect=!1}function T(t){if(!(a.e(t.fov)&&a.e(t.aspectRatio)&&a.e(t.near)&&a.e(t.far)))throw new i.t("fov, aspectRatio, near, or far parameters are not set.");var e=t._offCenterFrustum;if(t.fov!==t._fov||t.aspectRatio!==t._aspectRatio||t.near!==t._near||t.far!==t._far||t.xOffset!==t._xOffset||t.yOffset!==t._yOffset){if(t.fov<0||t.fov>=Math.PI)throw new i.t("fov must be in the range [0, PI).");if(t.aspectRatio<0)throw new i.t("aspectRatio must be positive.");if(t.near<0||t.near>t.far)throw new i.t("near must be greater than zero and less than far.");t._aspectRatio=t.aspectRatio,t._fov=t.fov,t._fovy=t.aspectRatio<=1?t.fov:2*Math.atan(Math.tan(.5*t.fov)/t.aspectRatio),t._near=t.near,t._far=t.far,t._sseDenominator=2*Math.tan(.5*t._fovy),t._xOffset=t.xOffset,t._yOffset=t.yOffset,e.top=t.near*Math.tan(.5*t._fovy),e.bottom=-e.top,e.right=t.aspectRatio*e.top,e.left=-e.right,e.near=t.near,e.far=t.far,e.right+=t.xOffset,e.left+=t.xOffset,e.top+=t.yOffset,e.bottom+=t.yOffset}}R.prototype.resetProjectionMatrix=function(){if(!(a.e(this.right)&&a.e(this.left)&&a.e(this.top)&&a.e(this.bottom)&&a.e(this.near)&&a.e(this.far)))throw new i.t("right, left, top, bottom, near, or far parameters are not set.");var t=this.top,e=this.bottom,r=this.right,o=this.left,n=this.near,s=this.far;if(this.near<=0||this.near>this.far)throw new i.t("near must be greater than zero and less than far.");this._left=o,this._right=r,this._top=t,this._bottom=e,this._near=n,this._far=s,this._perspectiveMatrix=h.p.computePerspectiveOffCenter(o,r,e,t,n,s,this._perspectiveMatrix),this._infinitePerspective=h.p.computeInfinitePerspectiveOffCenter(o,r,e,t,n,this._infinitePerspective)},R.prototype.computeCullingVolume=function(t,e,n,s){if(!a.e(t))throw new i.t("position is required.");if(!a.e(e))throw new i.t("direction is required.");if(!a.e(n))throw new i.t("up is required.");var f=this._cullingVolume.planes,h=a.u(s,0);h=Math.min(h,.5),h=Math.max(h,0);var u=this.top+this.top*h,p=this.bottom-this.top*h,l=this.right+this.right*h,c=this.left-this.right*h,m=this.near,w=this.far,d=r.o.cross(e,n,E),_=M;r.o.multiplyByScalar(e,m,_),r.o.add(t,_,_);var y=F;r.o.multiplyByScalar(e,w,y),r.o.add(t,y,y);var g=S;r.o.multiplyByScalar(d,c,g),r.o.add(_,g,g),r.o.subtract(g,t,g),r.o.normalize(g,g),r.o.cross(g,n,g),r.o.normalize(g,g);var v=f[0];return a.e(v)||(v=f[0]=new o.e),v.x=g.x,v.y=g.y,v.z=g.z,v.w=-r.o.dot(g,t),r.o.multiplyByScalar(d,l,g),r.o.add(_,g,g),r.o.subtract(g,t,g),r.o.cross(n,g,g),r.o.normalize(g,g),v=f[1],a.e(v)||(v=f[1]=new o.e),v.x=g.x,v.y=g.y,v.z=g.z,v.w=-r.o.dot(g,t),r.o.multiplyByScalar(n,p,g),r.o.add(_,g,g),r.o.subtract(g,t,g),r.o.cross(d,g,g),r.o.normalize(g,g),v=f[2],a.e(v)||(v=f[2]=new o.e),v.x=g.x,v.y=g.y,v.z=g.z,v.w=-r.o.dot(g,t),r.o.multiplyByScalar(n,u,g),r.o.add(_,g,g),r.o.subtract(g,t,g),r.o.cross(g,d,g),r.o.normalize(g,g),v=f[3],a.e(v)||(v=f[3]=new o.e),v.x=g.x,v.y=g.y,v.z=g.z,v.w=-r.o.dot(g,t),v=f[4],a.e(v)||(v=f[4]=new o.e),v.x=e.x,v.y=e.y,v.z=e.z,v.w=-r.o.dot(e,_),r.o.negate(e,g),v=f[5],a.e(v)||(v=f[5]=new o.e),v.x=g.x,v.y=g.y,v.z=g.z,v.w=-r.o.dot(g,y),this._cullingVolume},R.prototype.getPixelDimensions=function(t,e,r,o,n){if(P(this),!a.e(t)||!a.e(e))throw new i.t("Both drawingBufferWidth and drawingBufferHeight are required.");if(t<=0)throw new i.t("drawingBufferWidth must be greater than zero.");if(e<=0)throw new i.t("drawingBufferHeight must be greater than zero.");if(!a.e(r))throw new i.t("distance is required.");if(!a.e(o))throw new i.t("pixelRatio is required");if(o<=0)throw new i.t("pixelRatio must be greater than zero.");if(!a.e(n))throw new i.t("A result object is required.");var s=1/this.near,f=this.top*s,h=2*o*r*f/e,u=2*o*r*(f=this.right*s)/t;return n.x=u,n.y=h,n},R.prototype.clone=function(t){return a.e(t)||(t=new R),t.right=this.right,t.left=this.left,t.top=this.top,t.bottom=this.bottom,t.near=this.near,t.far=this.far,t._left=void 0,t._right=void 0,t._top=void 0,t._bottom=void 0,t._near=void 0,t._far=void 0,t},R.prototype.equals=function(t){return a.e(t)&&t instanceof R&&this.right===t.right&&this.left===t.left&&this.top===t.top&&this.bottom===t.bottom&&this.near===t.near&&this.far===t.far},R.prototype.equalsEpsilon=function(t,e,r){return t===this||a.e(t)&&t instanceof R&&u.e.equalsEpsilon(this.right,t.right,e,r)&&u.e.equalsEpsilon(this.left,t.left,e,r)&&u.e.equalsEpsilon(this.top,t.top,e,r)&&u.e.equalsEpsilon(this.bottom,t.bottom,e,r)&&u.e.equalsEpsilon(this.near,t.near,e,r)&&u.e.equalsEpsilon(this.far,t.far,e,r)},q.isNDCHalfZRange=!1,q.packedLength=6,q.pack=function(t,e,r){return i.o.typeOf.object("value",t),i.o.defined("array",e),r=a.u(r,0),e[r++]=t.fov,e[r++]=t.aspectRatio,e[r++]=t.near,e[r++]=t.far,e[r++]=t.xOffset,e[r]=t.yOffset,e},q.unpack=function(t,e,r){return i.o.defined("array",t),e=a.u(e,0),a.e(r)||(r=new q),r.fov=t[e++],r.aspectRatio=t[e++],r.near=t[e++],r.far=t[e++],r.xOffset=t[e++],r.yOffset=t[e],r},Object.defineProperties(q.prototype,{projectionMatrix:{get:function(){return T(this),this.reflect&&function(t){if(a.e(t.clipPlane)&&a.e(t.currentViewMatrix)){var e=t.currentViewMatrix,r=t._offCenterFrustum.projectionMatrix;h.p.multiplyByPlane(e,t.clipPlane,k),D.x=(u.e.sign(k.normal.x)+r[8])/r[0],D.y=(u.e.sign(k.normal.y)+r[9])/r[5],D.z=-1,D.w=(1+r[10])/r[14],B.x=k.normal.x,B.y=k.normal.y,B.z=k.normal.z,B.w=k.distance,o.e.multiplyByScalar(B,2/o.e.dot(B,D),A),r[2]=A.x,r[6]=A.y,r[10]=A.z+1,r[14]=A.w,h.p.halfZRange&&h.p.multiply(h.p.ConvertNDCToHalfZRange,r,r)}}(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return T(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return T(this),this._fovy}},sseDenominator:{get:function(){return T(this),this._sseDenominator}}}),q.prototype.resetProjectionMatrix=function(){return this._offCenterFrustum.resetProjectionMatrix()},q.prototype.computeCullingVolume=function(t,e,r,o){return T(this),this._offCenterFrustum.computeCullingVolume(t,e,r,o)},q.prototype.getPixelDimensions=function(t,e,r,o,i){return T(this),this._offCenterFrustum.getPixelDimensions(t,e,r,o,i)},q.prototype.clone=function(t){return a.e(t)||(t=new q),t.aspectRatio=this.aspectRatio,t.fov=this.fov,t.near=this.near,t.far=this.far,t.reflect=this.reflect,t.clipPlane=this.clipPlane,t.currentViewMatrix=this.currentViewMatrix,t._aspectRatio=void 0,t._fov=void 0,t._near=void 0,t._far=void 0,this._offCenterFrustum.clone(t._offCenterFrustum),t},q.prototype.equals=function(t){return!!(a.e(t)&&t instanceof q)&&(T(this),T(t),this.fov===t.fov&&this.aspectRatio===t.aspectRatio&&this._offCenterFrustum.equals(t._offCenterFrustum))},q.prototype.equalsEpsilon=function(t,e,r){return!!(a.e(t)&&t instanceof q)&&(T(this),T(t),u.e.equalsEpsilon(this.fov,t.fov,e,r)&&u.e.equalsEpsilon(this.aspectRatio,t.aspectRatio,e,r)&&this._offCenterFrustum.equalsEpsilon(t._offCenterFrustum,e,r))};var k=new p.o(r.o.UNIT_Z,1),D=new o.e,B=new o.e,A=new o.e;function I(t){i.o.typeOf.object("options",t),i.o.typeOf.object("options.frustum",t.frustum),i.o.typeOf.object("options.origin",t.origin),i.o.typeOf.object("options.orientation",t.orientation);var e,o,n=t.frustum,f=t.orientation,h=t.origin,u=a.u(t.vertexFormat,l.n.DEFAULT),p=a.u(t._drawNearPlane,!0);n instanceof q?(e=0,o=q.packedLength):n instanceof z&&(e=1,o=z.packedLength),this._frustumType=e,this._frustum=n.clone(),this._origin=r.o.clone(h),this._orientation=s.n.clone(f),this._drawNearPlane=p,this._vertexFormat=u,this._workerName="createFrustumGeometry",this.packedLength=2+o+r.o.packedLength+s.n.packedLength+l.n.packedLength}I.pack=function(t,e,o){i.o.typeOf.object("value",t),i.o.defined("array",e),o=a.u(o,0);var n=t._frustumType,f=t._frustum;return e[o++]=n,0===n?(q.pack(f,e,o),o+=q.packedLength):(z.pack(f,e,o),o+=z.packedLength),r.o.pack(t._origin,e,o),o+=r.o.packedLength,s.n.pack(t._orientation,e,o),o+=s.n.packedLength,l.n.pack(t._vertexFormat,e,o),e[o+=l.n.packedLength]=t._drawNearPlane?1:0,e};var N=new q,j=new z,L=new s.n,V=new r.o,U=new l.n;function G(t,e,r,o,i,n,s,f){for(var h=t/3*2,u=0;u<4;++u)a.e(e)&&(e[t]=n.x,e[t+1]=n.y,e[t+2]=n.z),a.e(r)&&(r[t]=s.x,r[t+1]=s.y,r[t+2]=s.z),a.e(o)&&(o[t]=f.x,o[t+1]=f.y,o[t+2]=f.z),t+=3;i[h]=0,i[h+1]=0,i[h+2]=1,i[h+3]=0,i[h+4]=1,i[h+5]=1,i[h+6]=0,i[h+7]=1}I.unpack=function(t,e,o){i.o.defined("array",t),e=a.u(e,0);var n,f=t[e++];0===f?(n=q.unpack(t,e,N),e+=q.packedLength):(n=z.unpack(t,e,j),e+=z.packedLength);var h=r.o.unpack(t,e,V);e+=r.o.packedLength;var u=s.n.unpack(t,e,L);e+=s.n.packedLength;var p=l.n.unpack(t,e,U),c=1===t[e+=l.n.packedLength];if(!a.e(o))return new I({frustum:n,origin:h,orientation:u,vertexFormat:p,_drawNearPlane:c});var m=f===o._frustumType?o._frustum:void 0;return o._frustum=n.clone(m),o._frustumType=f,o._origin=r.o.clone(h,o._origin),o._orientation=s.n.clone(u,o._orientation),o._vertexFormat=l.n.clone(p,o._vertexFormat),o._drawNearPlane=c,o};var K=new h.p$1,H=new h.p,W=new h.p,Y=new r.o,Z=new r.o,$=new r.o,J=new r.o,Q=new r.o,X=new r.o,tt=new Array(3),et=new Array(4);et[0]=new o.e(-1,-1,1,1),et[1]=new o.e(1,-1,1,1),et[2]=new o.e(1,1,1,1),et[3]=new o.e(-1,1,1,1);for(var rt=new Array(4),ot=0;ot<4;++ot)rt[ot]=new o.e;I._computeNearFarPlanes=function(t,e,i,n,s,f,u,p){var l=h.p$1.fromQuaternion(e,K),c=a.u(f,Y),m=a.u(u,Z),w=a.u(p,$);c=h.p$1.getColumn(l,0,c),m=h.p$1.getColumn(l,1,m),w=h.p$1.getColumn(l,2,w),r.o.normalize(c,c),r.o.normalize(m,m),r.o.normalize(w,w),r.o.negate(c,c);var d,_,y=h.p.computeView(t,w,m,c,H);if(0===i){var g=n.projectionMatrix,v=h.p.multiply(g,y,W);_=h.p.inverse(v,W)}else d=h.p.inverseTransformation(y,W);a.e(_)?(tt[0]=n.near,tt[1]=n.far):(tt[0]=0,tt[1]=n.near,tt[2]=n.far);for(var b=0;b<2;++b)for(var x=0;x<4;++x){var C=o.e.clone(et[x],rt[x]);if(a.e(_)){var z=1/(C=h.p.multiplyByVector(_,C,C)).w;r.o.multiplyByScalar(C,z,C),r.o.subtract(C,t,C),r.o.normalize(C,C);var O=r.o.dot(w,C);r.o.multiplyByScalar(C,tt[b]/O,C),r.o.add(C,t,C)}else{a.e(n._offCenterFrustum)&&(n=n._offCenterFrustum);var R=tt[b],P=tt[b+1];C.x=.5*(C.x*(n.right-n.left)+n.left+n.right),C.y=.5*(C.y*(n.top-n.bottom)+n.bottom+n.top),C.z=.5*(C.z*(R-P)-R-P),C.w=1,h.p.multiplyByVector(d,C,C)}s[12*b+3*x]=C.x,s[12*b+3*x+1]=C.y,s[12*b+3*x+2]=C.z}},I.createGeometry=function(t){var o=t._frustumType,i=t._frustum,u=t._origin,p=t._orientation,l=t._drawNearPlane,c=t._vertexFormat,m=l?6:5,w=new Float64Array(72);I._computeNearFarPlanes(u,p,o,i,w);var d=24;w[d]=w[12],w[d+1]=w[13],w[d+2]=w[14],w[d+3]=w[0],w[d+4]=w[1],w[d+5]=w[2],w[d+6]=w[9],w[d+7]=w[10],w[d+8]=w[11],w[d+9]=w[21],w[d+10]=w[22],w[d+11]=w[23],w[d+=12]=w[15],w[d+1]=w[16],w[d+2]=w[17],w[d+3]=w[3],w[d+4]=w[4],w[d+5]=w[5],w[d+6]=w[0],w[d+7]=w[1],w[d+8]=w[2],w[d+9]=w[12],w[d+10]=w[13],w[d+11]=w[14],w[d+=12]=w[3],w[d+1]=w[4],w[d+2]=w[5],w[d+3]=w[15],w[d+4]=w[16],w[d+5]=w[17],w[d+6]=w[18],w[d+7]=w[19],w[d+8]=w[20],w[d+9]=w[6],w[d+10]=w[7],w[d+11]=w[8],w[d+=12]=w[6],w[d+1]=w[7],w[d+2]=w[8],w[d+3]=w[18],w[d+4]=w[19],w[d+5]=w[20],w[d+6]=w[21],w[d+7]=w[22],w[d+8]=w[23],w[d+9]=w[9],w[d+10]=w[10],w[d+11]=w[11],l||(w=w.subarray(12));var _=new f.a({position:new s.o({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w})});if(a.e(c.normal)||a.e(c.tangent)||a.e(c.bitangent)||a.e(c.st)){var y=a.e(c.normal)?new Float32Array(12*m):void 0,g=a.e(c.tangent)?new Float32Array(12*m):void 0,v=a.e(c.bitangent)?new Float32Array(12*m):void 0,b=a.e(c.st)?new Float32Array(8*m):void 0,x=Y,C=Z,z=$,O=r.o.negate(x,J),R=r.o.negate(C,Q),P=r.o.negate(z,X);d=0,l&&(G(d,y,g,v,b,P,x,C),d+=12),G(d,y,g,v,b,z,O,C),G(d+=12,y,g,v,b,O,P,C),G(d+=12,y,g,v,b,R,P,O),G(d+=12,y,g,v,b,x,z,C),G(d+=12,y,g,v,b,C,z,O),a.e(y)&&(_.normal=new s.o({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),a.e(g)&&(_.tangent=new s.o({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:g})),a.e(v)&&(_.bitangent=new s.o({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})),a.e(b)&&(_.st=new s.o({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:b}))}for(var E=new Uint16Array(6*m),M=0;M<m;++M){var F=6*M,S=4*M;E[F]=S,E[F+1]=S+1,E[F+2]=S+2,E[F+3]=S,E[F+4]=S+2,E[F+5]=S+3}return new s.I({attributes:_,indices:E,primitiveType:h._0x3b3836.TRIANGLES,boundingSphere:e.i.fromVertices(w)})},t.a=z,t.o=q,t.z=I})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/GeometryAttribute-f47bd1cb.js b/SuperMap iEarth/public/SuperMap3D/Workers/GeometryAttribute-65cf868d.js similarity index 99% rename from SuperMap iEarth/public/SuperMap3D/Workers/GeometryAttribute-f47bd1cb.js rename to SuperMap iEarth/public/SuperMap3D/Workers/GeometryAttribute-65cf868d.js index dc5db891..73baf9f1 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/GeometryAttribute-f47bd1cb.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/GeometryAttribute-65cf868d.js @@ -1 +1 @@ -define(["exports","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./when-92c6cf3c","./FeatureDetection-cec0163f","./Math-ecf82623","./Cartesian4-72b88c9e","./buildModuleUrl-9eef8841","./RuntimeError-c6a62a80"],(function(e,t,n,r,o,a,i,s,u,l,c){"use strict";var f=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});function d(e,t,n,r){this[0]=a.u(e,0),this[1]=a.u(n,0),this[2]=a.u(t,0),this[3]=a.u(r,0)}d.packedLength=4,d.pack=function(e,t,n){return o.o.typeOf.object("value",e),o.o.defined("array",t),n=a.u(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t},d.unpack=function(e,t,n){return o.o.defined("array",e),t=a.u(t,0),a.e(n)||(n=new d),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n},d.clone=function(e,t){if(a.e(e))return a.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new d(e[0],e[2],e[1],e[3])},d.fromArray=function(e,t,n){return o.o.defined("array",e),t=a.u(t,0),a.e(n)||(n=new d),n[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n},d.fromColumnMajorArray=function(e,t){return o.o.defined("values",e),d.clone(e,t)},d.fromRowMajorArray=function(e,t){return o.o.defined("values",e),a.e(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new d(e[0],e[1],e[2],e[3])},d.fromScale=function(e,t){return o.o.typeOf.object("scale",e),a.e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new d(e.x,0,0,e.y)},d.fromUniformScale=function(e,t){return o.o.typeOf.number("scale",e),a.e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new d(e,0,0,e)},d.fromRotation=function(e,t){o.o.typeOf.number("angle",e);var n=Math.cos(e),r=Math.sin(e);return a.e(t)?(t[0]=n,t[1]=r,t[2]=-r,t[3]=n,t):new d(n,-r,r,n)},d.toArray=function(e,t){return o.o.typeOf.object("matrix",e),a.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},d.getElementIndex=function(e,t){return o.o.typeOf.number.greaterThanOrEquals("row",t,0),o.o.typeOf.number.lessThanOrEquals("row",t,1),o.o.typeOf.number.greaterThanOrEquals("column",e,0),o.o.typeOf.number.lessThanOrEquals("column",e,1),2*e+t},d.getColumn=function(e,t,n){o.o.typeOf.object("matrix",e),o.o.typeOf.number.greaterThanOrEquals("index",t,0),o.o.typeOf.number.lessThanOrEquals("index",t,1),o.o.typeOf.object("result",n);var r=2*t,a=e[r],i=e[r+1];return n.x=a,n.y=i,n},d.setColumn=function(e,t,n,r){o.o.typeOf.object("matrix",e),o.o.typeOf.number.greaterThanOrEquals("index",t,0),o.o.typeOf.number.lessThanOrEquals("index",t,1),o.o.typeOf.object("cartesian",n),o.o.typeOf.object("result",r);var a=2*t;return(r=d.clone(e,r))[a]=n.x,r[a+1]=n.y,r},d.getRow=function(e,t,n){o.o.typeOf.object("matrix",e),o.o.typeOf.number.greaterThanOrEquals("index",t,0),o.o.typeOf.number.lessThanOrEquals("index",t,1),o.o.typeOf.object("result",n);var r=e[t],a=e[t+2];return n.x=r,n.y=a,n},d.setRow=function(e,t,n,r){return o.o.typeOf.object("matrix",e),o.o.typeOf.number.greaterThanOrEquals("index",t,0),o.o.typeOf.number.lessThanOrEquals("index",t,1),o.o.typeOf.object("cartesian",n),o.o.typeOf.object("result",r),(r=d.clone(e,r))[t]=n.x,r[t+2]=n.y,r};var p=new t.o;d.getScale=function(e,n){return o.o.typeOf.object("matrix",e),o.o.typeOf.object("result",n),n.x=t.o.magnitude(t.o.fromElements(e[0],e[1],p)),n.y=t.o.magnitude(t.o.fromElements(e[2],e[3],p)),n};var y=new t.o;function h(e,t,n,r){this.x=a.u(e,0),this.y=a.u(t,0),this.z=a.u(n,0),this.w=a.u(r,0)}d.getMaximumScale=function(e){return d.getScale(e,y),t.o.maximumComponent(y)},d.multiply=function(e,t,n){o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),o.o.typeOf.object("result",n);var r=e[0]*t[0]+e[2]*t[1],a=e[0]*t[2]+e[2]*t[3],i=e[1]*t[0]+e[3]*t[1],s=e[1]*t[2]+e[3]*t[3];return n[0]=r,n[1]=i,n[2]=a,n[3]=s,n},d.add=function(e,t,n){return o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),o.o.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n},d.subtract=function(e,t,n){return o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),o.o.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n},d.multiplyByVector=function(e,t,n){o.o.typeOf.object("matrix",e),o.o.typeOf.object("cartesian",t),o.o.typeOf.object("result",n);var r=e[0]*t.x+e[2]*t.y,a=e[1]*t.x+e[3]*t.y;return n.x=r,n.y=a,n},d.multiplyByScalar=function(e,t,n){return o.o.typeOf.object("matrix",e),o.o.typeOf.number("scalar",t),o.o.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n},d.multiplyByScale=function(e,t,n){return o.o.typeOf.object("matrix",e),o.o.typeOf.object("scale",t),o.o.typeOf.object("result",n),n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n},d.negate=function(e,t){return o.o.typeOf.object("matrix",e),o.o.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},d.transpose=function(e,t){o.o.typeOf.object("matrix",e),o.o.typeOf.object("result",t);var n=e[0],r=e[2],a=e[1],i=e[3];return t[0]=n,t[1]=r,t[2]=a,t[3]=i,t},d.abs=function(e,t){return o.o.typeOf.object("matrix",e),o.o.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},d.equals=function(e,t){return e===t||a.e(e)&&a.e(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},d.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]},d.equalsEpsilon=function(e,t,n){return o.o.typeOf.number("epsilon",n),e===t||a.e(e)&&a.e(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n},d.IDENTITY=Object.freeze(new d(1,0,0,1)),d.ZERO=Object.freeze(new d(0,0,0,0)),d.COLUMN0ROW0=0,d.COLUMN0ROW1=1,d.COLUMN1ROW0=2,d.COLUMN1ROW1=3,Object.defineProperties(d.prototype,{length:{get:function(){return d.packedLength}}}),d.prototype.clone=function(e){return d.clone(this,e)},d.prototype.equals=function(e){return d.equals(this,e)},d.prototype.equalsEpsilon=function(e,t){return d.equalsEpsilon(this,e,t)},d.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"};var m=new n.o;h.fromAxisAngle=function(e,t,r){o.o.typeOf.object("axis",e),o.o.typeOf.number("angle",t);var i=t/2,s=Math.sin(i),u=(m=n.o.normalize(e,m)).x*s,l=m.y*s,c=m.z*s,f=Math.cos(i);return a.e(r)?(r.x=u,r.y=l,r.z=c,r.w=f,r):new h(u,l,c,f)};var w=[1,2,0],O=new Array(3);h.fromRotationMatrix=function(e,t){o.o.typeOf.object("matrix",e);var n,r,s,u,l,c=e[i.p$1.COLUMN0ROW0],f=e[i.p$1.COLUMN1ROW1],d=e[i.p$1.COLUMN2ROW2],p=c+f+d;if(p>0)l=.5*(n=Math.sqrt(p+1)),n=.5/n,r=(e[i.p$1.COLUMN1ROW2]-e[i.p$1.COLUMN2ROW1])*n,s=(e[i.p$1.COLUMN2ROW0]-e[i.p$1.COLUMN0ROW2])*n,u=(e[i.p$1.COLUMN0ROW1]-e[i.p$1.COLUMN1ROW0])*n;else{var y=0;f>c&&(y=1),d>c&&d>f&&(y=2);var m=w[y],b=w[m];n=Math.sqrt(e[i.p$1.getElementIndex(y,y)]-e[i.p$1.getElementIndex(m,m)]-e[i.p$1.getElementIndex(b,b)]+1);var x=O;x[y]=.5*n,n=.5/n,l=(e[i.p$1.getElementIndex(b,m)]-e[i.p$1.getElementIndex(m,b)])*n,x[m]=(e[i.p$1.getElementIndex(m,y)]+e[i.p$1.getElementIndex(y,m)])*n,x[b]=(e[i.p$1.getElementIndex(b,y)]+e[i.p$1.getElementIndex(y,b)])*n,r=-x[0],s=-x[1],u=-x[2]}return a.e(t)?(t.x=r,t.y=s,t.z=u,t.w=l,t):new h(r,s,u,l)};var b=new h,x=new h,E=new h,_=new h;h.fromHeadingPitchRoll=function(e,t){return o.o.typeOf.object("headingPitchRoll",e),_=h.fromAxisAngle(n.o.UNIT_X,e.roll,b),E=h.fromAxisAngle(n.o.UNIT_Y,-e.pitch,t),t=h.multiply(E,_,E),x=h.fromAxisAngle(n.o.UNIT_Z,-e.heading,b),h.multiply(x,t,t)};var v=new n.o,T=new n.o,S=new h,g=new h,D=new h;h.packedLength=4,h.pack=function(e,t,n){return o.o.typeOf.object("value",e),o.o.defined("array",t),n=a.u(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},h.unpack=function(e,t,n){return o.o.defined("array",e),t=a.u(t,0),a.e(n)||(n=new h),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n},h.packedInterpolationLength=3,h.convertPackedArrayForInterpolation=function(e,t,n,r){h.unpack(e,4*n,D),h.conjugate(D,D);for(var o=0,a=n-t+1;o<a;o++){var i=3*o;h.unpack(e,4*(t+o),S),h.multiply(S,D,S),S.w<0&&h.negate(S,S),h.computeAxis(S,v);var s=h.computeAngle(S);r[i]=v.x*s,r[i+1]=v.y*s,r[i+2]=v.z*s}},h.unpackInterpolationResult=function(e,t,r,o,i){a.e(i)||(i=new h),n.o.fromArray(e,0,T);var s=n.o.magnitude(T);return h.unpack(t,4*o,g),0===s?h.clone(h.IDENTITY,S):h.fromAxisAngle(T,s,S),h.multiply(S,g,i)},h.clone=function(e,t){if(a.e(e))return a.e(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new h(e.x,e.y,e.z,e.w)},h.conjugate=function(e,t){return o.o.typeOf.object("quaternion",e),o.o.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},h.magnitudeSquared=function(e){return o.o.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},h.magnitude=function(e){return Math.sqrt(h.magnitudeSquared(e))},h.normalize=function(e,t){o.o.typeOf.object("result",t);var n=1/h.magnitude(e),r=e.x*n,a=e.y*n,i=e.z*n,s=e.w*n;return t.x=r,t.y=a,t.z=i,t.w=s,t},h.inverse=function(e,t){o.o.typeOf.object("result",t);var n=h.magnitudeSquared(e);return t=h.conjugate(e,t),h.multiplyByScalar(t,1/n,t)},h.add=function(e,t,n){return o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),o.o.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n},h.subtract=function(e,t,n){return o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),o.o.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n},h.negate=function(e,t){return o.o.typeOf.object("quaternion",e),o.o.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},h.dot=function(e,t){return o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},h.multiply=function(e,t,n){o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),o.o.typeOf.object("result",n);var r=e.x,a=e.y,i=e.z,s=e.w,u=t.x,l=t.y,c=t.z,f=t.w,d=s*u+r*f+a*c-i*l,p=s*l-r*c+a*f+i*u,y=s*c+r*l-a*u+i*f,h=s*f-r*u-a*l-i*c;return n.x=d,n.y=p,n.z=y,n.w=h,n},h.multiplyByVec=function(e,t,r){var o=new n.o,a=new n.o,i=new n.o(e.x,e.y,e.z);o=n.o.cross(i,t,o),a=n.o.cross(i,o,a);var s=new n.o;s=n.o.multiplyByScalar(o,2*e.w,s);var u=new n.o;return u=n.o.multiplyByScalar(o,2,u),r=n.o.add(t,s,r),r=n.o.add(r,u,r)},h.multiplyByScalar=function(e,t,n){return o.o.typeOf.object("quaternion",e),o.o.typeOf.number("scalar",t),o.o.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n},h.divideByScalar=function(e,t,n){return o.o.typeOf.object("quaternion",e),o.o.typeOf.number("scalar",t),o.o.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n},h.computeAxis=function(e,t){o.o.typeOf.object("quaternion",e),o.o.typeOf.object("result",t);var n=e.w;if(Math.abs(n-1)<s.e.EPSILON6)return t.x=t.y=t.z=0,t;var r=1/Math.sqrt(1-n*n);return t.x=e.x*r,t.y=e.y*r,t.z=e.z*r,t},h.computeAngle=function(e){return o.o.typeOf.object("quaternion",e),Math.abs(e.w-1)<s.e.EPSILON6?0:2*Math.acos(e.w)};var P=new h;h.lerp=function(e,t,n,r){return o.o.typeOf.object("start",e),o.o.typeOf.object("end",t),o.o.typeOf.number("t",n),o.o.typeOf.object("result",r),P=h.multiplyByScalar(t,n,P),r=h.multiplyByScalar(e,1-n,r),h.add(P,r,r)};var N=new h,C=new h,I=new h;h.slerp=function(e,t,n,r){o.o.typeOf.object("start",e),o.o.typeOf.object("end",t),o.o.typeOf.number("t",n),o.o.typeOf.object("result",r);var a=h.dot(e,t),i=t;if(a<0&&(a=-a,i=N=h.negate(t,N)),1-a<s.e.EPSILON6)return h.lerp(e,i,n,r);var u=Math.acos(a);return C=h.multiplyByScalar(e,Math.sin((1-n)*u),C),I=h.multiplyByScalar(i,Math.sin(n*u),I),r=h.add(C,I,r),h.multiplyByScalar(r,1/Math.sin(u),r)},h.log=function(e,t){o.o.typeOf.object("quaternion",e),o.o.typeOf.object("result",t);var r=s.e.acosClamped(e.w),a=0;return 0!==r&&(a=r/Math.sin(r)),n.o.multiplyByScalar(e,a,t)},h.exp=function(e,t){o.o.typeOf.object("cartesian",e),o.o.typeOf.object("result",t);var r=n.o.magnitude(e),a=0;return 0!==r&&(a=Math.sin(r)/r),t.x=e.x*a,t.y=e.y*a,t.z=e.z*a,t.w=Math.cos(r),t};var j=new n.o,R=new n.o,M=new h,A=new h;h.computeInnerQuadrangle=function(e,t,r,a){o.o.typeOf.object("q0",e),o.o.typeOf.object("q1",t),o.o.typeOf.object("q2",r),o.o.typeOf.object("result",a);var i=h.conjugate(t,M);h.multiply(i,r,A);var s=h.log(A,j);h.multiply(i,e,A);var u=h.log(A,R);return n.o.add(s,u,s),n.o.multiplyByScalar(s,.25,s),n.o.negate(s,s),h.exp(s,M),h.multiply(t,M,a)},h.squad=function(e,t,n,r,a,i){o.o.typeOf.object("q0",e),o.o.typeOf.object("q1",t),o.o.typeOf.object("s0",n),o.o.typeOf.object("s1",r),o.o.typeOf.number("t",a),o.o.typeOf.object("result",i);var s=h.slerp(e,t,a,M),u=h.slerp(n,r,a,A);return h.slerp(s,u,2*a*(1-a),i)};for(var q=new h,U=1.9011074535173003,z=i.s.supportsTypedArrays()?new Float32Array(8):[],F=i.s.supportsTypedArrays()?new Float32Array(8):[],W=i.s.supportsTypedArrays()?new Float32Array(8):[],L=i.s.supportsTypedArrays()?new Float32Array(8):[],$=0;$<7;++$){var k=$+1,Y=2*k+1;z[$]=1/(k*Y),F[$]=k/Y}function B(e,t,n){o.o.defined("array",e),o.o.defined("itemToFind",t),o.o.defined("comparator",n);for(var r,a,i=0,s=e.length-1;i<=s;)if((a=n(e[r=~~((i+s)/2)],t))<0)i=r+1;else{if(!(a>0))return r;s=r-1}return~(s+1)}function G(e,t,n,r,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=r,this.ut1MinusUtc=o}function Z(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,t=arguments,n=0,r=t[n++],o=function(e,t,n,r){n||(n=" ");var o=e.length>=t?"":Array(1+t-e.length>>>0).join(n);return r?e+o:o+e},a=function(e,t,n,r,a,i){var s=r-e.length;return s>0&&(e=n||!a?o(e,r,i,n):e.slice(0,t.length)+o("",s,"0",!0)+e.slice(t.length)),e},i=function(e,t,n,r,i,s,u){var l=e>>>0;return e=(n=n&&l&&{2:"0b",8:"0",16:"0x"}[t]||"")+o(l.toString(t),s||0,"0",!1),a(e,n,r,i,u)},s=function(e,t,n,r,o,i){return null!=r&&(e=e.slice(0,r)),a(e,"",t,n,o,i)},u=function(e,r,u,l,c,f,d){var p,y,h,m,w;if("%%"==e)return"%";for(var O=!1,b="",x=!1,E=!1,_=" ",v=u.length,T=0;u&&T<v;T++)switch(u.charAt(T)){case" ":b=" ";break;case"+":b="+";break;case"-":O=!0;break;case"'":_=u.charAt(T+1);break;case"0":x=!0;break;case"#":E=!0}if((l=l?"*"==l?+t[n++]:"*"==l.charAt(0)?+t[l.slice(1,-1)]:+l:0)<0&&(l=-l,O=!0),!isFinite(l))throw new Error("sprintf: (minimum-)width must be finite");switch(f=f?"*"==f?+t[n++]:"*"==f.charAt(0)?+t[f.slice(1,-1)]:+f:"fFeE".indexOf(d)>-1?6:"d"==d?0:void 0,w=r?t[r.slice(0,-1)]:t[n++],d){case"s":return s(String(w),O,l,f,x,_);case"c":return s(String.fromCharCode(+w),O,l,f,x);case"b":return i(w,2,E,O,l,f,x);case"o":return i(w,8,E,O,l,f,x);case"x":return i(w,16,E,O,l,f,x);case"X":return i(w,16,E,O,l,f,x).toUpperCase();case"u":return i(w,10,E,O,l,f,x);case"i":case"d":return p=+w||0,w=(y=(p=Math.round(p-p%1))<0?"-":b)+o(String(Math.abs(p)),f,"0",!1),a(w,y,O,l,x);case"e":case"E":case"f":case"F":case"g":case"G":return y=(p=+w)<0?"-":b,h=["toExponential","toFixed","toPrecision"]["efg".indexOf(d.toLowerCase())],m=["toString","toUpperCase"]["eEfFgG".indexOf(d)%2],w=y+Math.abs(p)[h](f),a(w,y,O,l,x)[m]();default:return e}};return r.replace(e,u)}function V(e,t,n,r,o,a,i,s){this.year=e,this.month=t,this.day=n,this.hour=r,this.minute=o,this.second=a,this.millisecond=i,this.isLeapSecond=s}function J(e){if(null===e||isNaN(e))throw new o.t("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0}function X(e,t){this.julianDate=e,this.offset=t}z[7]=U/136,F[7]=8*U/17,h.fastSlerp=function(e,t,n,r){o.o.typeOf.object("start",e),o.o.typeOf.object("end",t),o.o.typeOf.number("t",n),o.o.typeOf.object("result",r);var a,i=h.dot(e,t);i>=0?a=1:(a=-1,i=-i);for(var s=i-1,u=1-n,l=n*n,c=u*u,f=7;f>=0;--f)W[f]=(z[f]*l-F[f])*s,L[f]=(z[f]*c-F[f])*s;var d=a*n*(1+W[0]*(1+W[1]*(1+W[2]*(1+W[3]*(1+W[4]*(1+W[5]*(1+W[6]*(1+W[7])))))))),p=u*(1+L[0]*(1+L[1]*(1+L[2]*(1+L[3]*(1+L[4]*(1+L[5]*(1+L[6]*(1+L[7])))))))),y=h.multiplyByScalar(e,p,q);return h.multiplyByScalar(t,d,r),h.add(y,r,r)},h.fastSquad=function(e,t,n,r,a,i){o.o.typeOf.object("q0",e),o.o.typeOf.object("q1",t),o.o.typeOf.object("s0",n),o.o.typeOf.object("s1",r),o.o.typeOf.number("t",a),o.o.typeOf.object("result",i);var s=h.fastSlerp(e,t,a,M),u=h.fastSlerp(n,r,a,A);return h.fastSlerp(s,u,2*a*(1-a),i)},h.equals=function(e,t){return e===t||a.e(e)&&a.e(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},h.equalsEpsilon=function(e,t,n){return o.o.typeOf.number("epsilon",n),e===t||a.e(e)&&a.e(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n},h.ZERO=Object.freeze(new h(0,0,0,0)),h.IDENTITY=Object.freeze(new h(0,0,0,1)),h.prototype.clone=function(e){return h.clone(this,e)},h.prototype.equals=function(e){return h.equals(this,e)},h.prototype.equalsEpsilon=function(e,t){return h.equalsEpsilon(this,e,t)},h.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var H=Object.freeze({SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5}),Q=Object.freeze({UTC:0,TAI:1}),K=new V,ee=[31,28,31,30,31,30,31,31,30,31,30,31];function te(e,t){return we.compare(e.julianDate,t.julianDate)}var ne=new X;function re(e){ne.julianDate=e;var t=we.leapSeconds,n=B(t,ne,te);n<0&&(n=~n),n>=t.length&&(n=t.length-1);var r=t[n].offset;n>0&&(we.secondsDifference(t[n].julianDate,e)>r&&(r=t[--n].offset));we.addSeconds(e,r,e)}function oe(e,t){ne.julianDate=e;var n=we.leapSeconds,r=B(n,ne,te);if(r<0&&(r=~r),0===r)return we.addSeconds(e,-n[0].offset,t);if(r>=n.length)return we.addSeconds(e,-n[r-1].offset,t);var o=we.secondsDifference(n[r].julianDate,e);return 0===o?we.addSeconds(e,-n[r].offset,t):o<=1?void 0:we.addSeconds(e,-n[--r].offset,t)}function ae(e,t,n){var r=t/H.SECONDS_PER_DAY|0;return e+=r,(t-=H.SECONDS_PER_DAY*r)<0&&(e--,t+=H.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function ie(e,t,n,r,o,a,i){var s=(t-14)/12|0,u=e+4800+s,l=(1461*u/4|0)+(367*(t-2-12*s)/12|0)-(3*((u+100)/100|0)/4|0)+n-32075;(r-=12)<0&&(r+=24);var c=a+(r*H.SECONDS_PER_HOUR+o*H.SECONDS_PER_MINUTE+i*H.SECONDS_PER_MILLISECOND);return c>=43200&&(l-=1),[l,c]}var se=/^(\d{4})$/,ue=/^(\d{4})-(\d{2})$/,le=/^(\d{4})-?(\d{3})$/,ce=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,fe=/^(\d{4})-?(\d{2})-?(\d{2})$/,de=/([Z+\-])?(\d{2})?:?(\d{2})?$/,pe=/^(\d{2})(\.\d+)?/.source+de.source,ye=/^(\d{2}):?(\d{2})(\.\d+)?/.source+de.source,he=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+de.source,me="Invalid ISO 8601 date.";function we(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=a.u(e,0),t=a.u(t,0),n=a.u(n,Q.UTC);var r=0|e;ae(r,t+=(e-r)*H.SECONDS_PER_DAY,this),n===Q.UTC&&re(this)}we.fromGregorianDate=function(e,t){if(!(e instanceof V))throw new o.t("date must be a valid GregorianDate.");var n=ie(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return a.e(t)?(ae(n[0],n[1],t),re(t),t):new we(n[0],n[1],Q.UTC)},we.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new o.t("date must be a valid JavaScript Date.");var n=ie(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return a.e(t)?(ae(n[0],n[1],t),re(t),t):new we(n[0],n[1],Q.UTC)},we.fromIso8601=function(e,t){if("string"!=typeof e)throw new o.t(me);var n,r,i,s,u,l=(e=e.replace(",",".")).split("T"),c=1,f=1,d=0,p=0,y=0,h=0,m=l[0],w=l[1];if(!a.e(m))throw new o.t(me);if(null!==(l=m.match(fe))){if((s=m.split("-").length-1)>0&&2!==s)throw new o.t(me);n=+l[1],c=+l[2],f=+l[3]}else if(null!==(l=m.match(ue)))n=+l[1],c=+l[2];else if(null!==(l=m.match(se)))n=+l[1];else{var O;if(null!==(l=m.match(le))){if(n=+l[1],O=+l[2],i=J(n),O<1||i&&O>366||!i&&O>365)throw new o.t(me)}else{if(null===(l=m.match(ce)))throw new o.t(me);n=+l[1];var b=+l[2],x=+l[3]||0;if((s=m.split("-").length-1)>0&&(!a.e(l[3])&&1!==s||a.e(l[3])&&2!==s))throw new o.t(me);O=7*b+x-new Date(Date.UTC(n,0,4)).getUTCDay()-3}(r=new Date(Date.UTC(n,0,1))).setUTCDate(O),c=r.getUTCMonth()+1,f=r.getUTCDate()}if(i=J(n),c<1||c>12||f<1||(2!==c||!i)&&f>ee[c-1]||i&&2===c&&f>29)throw new o.t(me);if(a.e(w)){if(null!==(l=w.match(he))){if((s=w.split(":").length-1)>0&&2!==s&&3!==s)throw new o.t(me);d=+l[1],p=+l[2],y=+l[3],h=1e3*+(l[4]||0),u=5}else if(null!==(l=w.match(ye))){if((s=w.split(":").length-1)>2)throw new o.t(me);d=+l[1],p=+l[2],y=60*+(l[3]||0),u=4}else{if(null===(l=w.match(pe)))throw new o.t(me);d=+l[1],p=60*+(l[2]||0),u=3}if(p>=60||y>=61||d>24||24===d&&(p>0||y>0||h>0))throw new o.t(me);var E=l[u],_=+l[u+1],v=+(l[u+2]||0);switch(E){case"+":d-=_,p-=v;break;case"-":d+=_,p+=v;break;case"Z":break;default:p+=new Date(Date.UTC(n,c-1,f,d,p)).getTimezoneOffset()}}var T=60===y;for(T&&y--;p>=60;)p-=60,d++;for(;d>=24;)d-=24,f++;for(r=i&&2===c?29:ee[c-1];f>r;)f-=r,++c>12&&(c-=12,n++),r=i&&2===c?29:ee[c-1];for(;p<0;)p+=60,d--;for(;d<0;)d+=24,f--;for(;f<1;)--c<1&&(c+=12,n--),f+=r=i&&2===c?29:ee[c-1];var S=ie(n,c,f,d,p,y,h);return a.e(t)?(ae(S[0],S[1],t),re(t)):t=new we(S[0],S[1],Q.UTC),T&&we.addSeconds(t,1,t),t},we.now=function(e){return we.fromDate(new Date,e)};var Oe=new we(0,0,Q.TAI);function be(e){if(e=a.u(e,a.u.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=a.u(e.addNewLeapSeconds,!0),a.e(e.data))Ee(this,e.data);else if(a.e(e.url)){var t=l.t.createIfNeeded(e.url),n=this;this._downloadPromise=a.o(t.fetchJson(),(function(e){Ee(n,e)}),(function(){n._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))}else Ee(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function xe(e,t){return we.compare(e.julianDate,t)}function Ee(e,t){if(a.e(t.columnNames))if(a.e(t.samples)){var n=t.columnNames.indexOf("modifiedJulianDateUtc"),r=t.columnNames.indexOf("xPoleWanderRadians"),o=t.columnNames.indexOf("yPoleWanderRadians"),i=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||r<0||o<0||i<0||s<0||u<0||l<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var c=e._samples=t.samples,f=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=r,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=i,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var d,p=e._addNewLeapSeconds,y=0,h=c.length;y<h;y+=e._columnCount){var m=c[y+n],w=c[y+l],O=new we(m+H.MODIFIED_JULIAN_DATE_DIFFERENCE,w,Q.TAI);if(f.push(O),p){if(w!==d&&a.e(d)){var b=we.leapSeconds,x=B(b,O,xe);if(x<0){var E=new X(O,w);b.splice(~x,0,E)}}d=w}}}}else e._dataError="Error in loaded EOP data: The samples property is required.";else e._dataError="Error in loaded EOP data: The columnNames property is required."}function _e(e,t,n,r,o){var a=n*r;o.xPoleWander=t[a+e._xPoleWanderRadiansColumn],o.yPoleWander=t[a+e._yPoleWanderRadiansColumn],o.xPoleOffset=t[a+e._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=t[a+e._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=t[a+e._ut1MinusUtcSecondsColumn]}function ve(e,t,n){return t+e*(n-t)}function Te(e,t,n,r,o,a,i){var s=e._columnCount;if(a>t.length-1)return i.xPoleWander=0,i.yPoleWander=0,i.xPoleOffset=0,i.yPoleOffset=0,i.ut1MinusUtc=0,i;var u=t[o],l=t[a];if(u.equals(l)||r.equals(u))return _e(e,n,o,s,i),i;if(r.equals(l))return _e(e,n,a,s,i),i;var c=we.secondsDifference(r,u)/we.secondsDifference(l,u),f=o*s,d=a*s,p=n[f+e._ut1MinusUtcSecondsColumn],y=n[d+e._ut1MinusUtcSecondsColumn],h=y-p;if(h>.5||h<-.5){var m=n[f+e._taiMinusUtcSecondsColumn],w=n[d+e._taiMinusUtcSecondsColumn];m!==w&&(l.equals(r)?p=y:y-=w-m)}return i.xPoleWander=ve(c,n[f+e._xPoleWanderRadiansColumn],n[d+e._xPoleWanderRadiansColumn]),i.yPoleWander=ve(c,n[f+e._yPoleWanderRadiansColumn],n[d+e._yPoleWanderRadiansColumn]),i.xPoleOffset=ve(c,n[f+e._xCelestialPoleOffsetRadiansColumn],n[d+e._xCelestialPoleOffsetRadiansColumn]),i.yPoleOffset=ve(c,n[f+e._yCelestialPoleOffsetRadiansColumn],n[d+e._yCelestialPoleOffsetRadiansColumn]),i.ut1MinusUtc=ve(c,p,y),i}function Se(e,t,n){this.heading=a.u(e,0),this.pitch=a.u(t,0),this.roll=a.u(n,0)}function ge(e,t,n){this.x=e,this.y=t,this.s=n}function De(e){e=a.u(e,a.u.EMPTY_OBJECT),this._xysFileUrlTemplate=l.t.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=a.u(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=a.u(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new we(this._sampleZeroJulianEphemerisDate,0,Q.TAI),this._stepSizeDays=a.u(e.stepSizeDays,1),this._samplesPerXysFile=a.u(e.samplesPerXysFile,1e3),this._totalSamples=a.u(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,n=this._denominators=new Array(t+1),r=this._xTable=new Array(t+1),o=Math.pow(this._stepSizeDays,t),i=0;i<=t;++i){n[i]=o,r[i]=i*this._stepSizeDays;for(var s=0;s<=t;++s)s!==i&&(n[i]*=i-s);n[i]=1/n[i]}this._work=new Array(t+1),this._coef=new Array(t+1)}we.toGregorianDate=function(e,t){if(!a.e(e))throw new o.t("julianDate is required.");var n=!1,r=oe(e,Oe);a.e(r)||(we.addSeconds(e,-1,Oe),r=oe(Oe,Oe),n=!0);var i=r.dayNumber,s=r.secondsOfDay;s>=43200&&(i+=1);var u=i+68569|0,l=4*u/146097|0,c=4e3*((u=u-((146097*l+3)/4|0)|0)+1)/1461001|0,f=80*(u=u-(1461*c/4|0)+31|0)/2447|0,d=u-(2447*f/80|0)|0,p=f+2-12*(u=f/11|0)|0,y=100*(l-49)+c+u|0,h=s/H.SECONDS_PER_HOUR|0,m=s-h*H.SECONDS_PER_HOUR,w=m/H.SECONDS_PER_MINUTE|0,O=0|(m-=w*H.SECONDS_PER_MINUTE),b=(m-O)/H.SECONDS_PER_MILLISECOND;return(h+=12)>23&&(h-=24),n&&(O+=1),a.e(t)?(t.year=y,t.month=p,t.day=d,t.hour=h,t.minute=w,t.second=O,t.millisecond=b,t.isLeapSecond=n,t):new V(y,p,d,h,w,O,b,n)},we.toDate=function(e){if(!a.e(e))throw new o.t("julianDate is required.");var t=we.toGregorianDate(e,K),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))},we.toIso8601=function(e,t){if(!a.e(e))throw new o.t("julianDate is required.");var n=we.toGregorianDate(e,K),r=n.year,i=n.month,s=n.day,u=n.hour,l=n.minute,c=n.second,f=n.millisecond;return 1e4===r&&1===i&&1===s&&0===u&&0===l&&0===c&&0===f&&(r=9999,i=12,s=31,u=24),a.e(t)||0===f?a.e(t)&&0!==t?Z("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",r,i,s,u,l,c,(.01*f).toFixed(t).replace(".","").slice(0,t)):Z("%04d-%02d-%02dT%02d:%02d:%02dZ",r,i,s,u,l,c):Z("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",r,i,s,u,l,c,(.01*f).toString().replace(".",""))},we.clone=function(e,t){if(a.e(e))return a.e(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new we(e.dayNumber,e.secondsOfDay,Q.TAI)},we.compare=function(e,t){if(!a.e(e))throw new o.t("left is required.");if(!a.e(t))throw new o.t("right is required.");var n=e.dayNumber-t.dayNumber;return 0!==n?n:e.secondsOfDay-t.secondsOfDay},we.equals=function(e,t){return e===t||a.e(e)&&a.e(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},we.equalsEpsilon=function(e,t,n){if(!a.e(n))throw new o.t("epsilon is required.");return e===t||a.e(e)&&a.e(t)&&Math.abs(we.secondsDifference(e,t))<=n},we.totalDays=function(e){if(!a.e(e))throw new o.t("julianDate is required.");return e.dayNumber+e.secondsOfDay/H.SECONDS_PER_DAY},we.secondsDifference=function(e,t){if(!a.e(e))throw new o.t("left is required.");if(!a.e(t))throw new o.t("right is required.");return(e.dayNumber-t.dayNumber)*H.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},we.daysDifference=function(e,t){if(!a.e(e))throw new o.t("left is required.");if(!a.e(t))throw new o.t("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/H.SECONDS_PER_DAY},we.computeTaiMinusUtc=function(e){ne.julianDate=e;var t=we.leapSeconds,n=B(t,ne,te);return n<0&&(n=~n,--n<0&&(n=0)),t[n].offset},we.addSeconds=function(e,t,n){if(!a.e(e))throw new o.t("julianDate is required.");if(!a.e(t))throw new o.t("seconds is required.");if(!a.e(n))throw new o.t("result is required.");return ae(e.dayNumber,e.secondsOfDay+t,n)},we.addMinutes=function(e,t,n){if(!a.e(e))throw new o.t("julianDate is required.");if(!a.e(t))throw new o.t("minutes is required.");if(!a.e(n))throw new o.t("result is required.");var r=e.secondsOfDay+t*H.SECONDS_PER_MINUTE;return ae(e.dayNumber,r,n)},we.addHours=function(e,t,n){if(!a.e(e))throw new o.t("julianDate is required.");if(!a.e(t))throw new o.t("hours is required.");if(!a.e(n))throw new o.t("result is required.");var r=e.secondsOfDay+t*H.SECONDS_PER_HOUR;return ae(e.dayNumber,r,n)},we.addDays=function(e,t,n){if(!a.e(e))throw new o.t("julianDate is required.");if(!a.e(t))throw new o.t("days is required.");if(!a.e(n))throw new o.t("result is required.");return ae(e.dayNumber+t,e.secondsOfDay,n)},we.lessThan=function(e,t){return we.compare(e,t)<0},we.lessThanOrEquals=function(e,t){return we.compare(e,t)<=0},we.greaterThan=function(e,t){return we.compare(e,t)>0},we.greaterThanOrEquals=function(e,t){return we.compare(e,t)>=0},we.prototype.clone=function(e){return we.clone(this,e)},we.prototype.equals=function(e){return we.equals(this,e)},we.prototype.equalsEpsilon=function(e,t){return we.equalsEpsilon(this,e,t)},we.prototype.toString=function(){return we.toIso8601(this)},we.leapSeconds=[new X(new we(2441317,43210,Q.TAI),10),new X(new we(2441499,43211,Q.TAI),11),new X(new we(2441683,43212,Q.TAI),12),new X(new we(2442048,43213,Q.TAI),13),new X(new we(2442413,43214,Q.TAI),14),new X(new we(2442778,43215,Q.TAI),15),new X(new we(2443144,43216,Q.TAI),16),new X(new we(2443509,43217,Q.TAI),17),new X(new we(2443874,43218,Q.TAI),18),new X(new we(2444239,43219,Q.TAI),19),new X(new we(2444786,43220,Q.TAI),20),new X(new we(2445151,43221,Q.TAI),21),new X(new we(2445516,43222,Q.TAI),22),new X(new we(2446247,43223,Q.TAI),23),new X(new we(2447161,43224,Q.TAI),24),new X(new we(2447892,43225,Q.TAI),25),new X(new we(2448257,43226,Q.TAI),26),new X(new we(2448804,43227,Q.TAI),27),new X(new we(2449169,43228,Q.TAI),28),new X(new we(2449534,43229,Q.TAI),29),new X(new we(2450083,43230,Q.TAI),30),new X(new we(2450630,43231,Q.TAI),31),new X(new we(2451179,43232,Q.TAI),32),new X(new we(2453736,43233,Q.TAI),33),new X(new we(2454832,43234,Q.TAI),34),new X(new we(2456109,43235,Q.TAI),35),new X(new we(2457204,43236,Q.TAI),36),new X(new we(2457754,43237,Q.TAI),37)],be.NONE=Object.freeze({getPromiseToLoad:function(){return a.o()},compute:function(e,t){return a.e(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new G(0,0,0,0,0),t}}),be.prototype.getPromiseToLoad=function(){return a.o(this._downloadPromise)},be.prototype.compute=function(e,t){if(a.e(this._samples)){if(a.e(t)||(t=new G(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;var n=this._dates,r=this._lastIndex,o=0,i=0;if(a.e(r)){var s=n[r],u=n[r+1],l=we.lessThanOrEquals(s,e),f=!a.e(u),d=f||we.greaterThanOrEquals(u,e);if(l&&d)return o=r,!f&&u.equals(e)&&++o,i=o+1,Te(this,n,this._samples,e,o,i,t),t}var p=B(n,e,we.compare,this._dateColumn);return p>=0?(p<n.length-1&&n[p+1].equals(e)&&++p,o=p,i=p):(o=(i=~p)-1)<0&&(o=0),this._lastIndex=o,Te(this,n,this._samples,e,o,i,t),t}if(a.e(this._dataError))throw new c.t(this._dataError)},Se.fromQuaternion=function(e,t){if(!a.e(e))throw new o.t("quaternion is required");a.e(t)||(t=new Se);var n=2*(e.w*e.y-e.z*e.x),r=1-2*(e.x*e.x+e.y*e.y),i=2*(e.w*e.x+e.y*e.z),u=1-2*(e.y*e.y+e.z*e.z),l=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(l,u),t.roll=Math.atan2(i,r),t.pitch=-s.e.asinClamped(n),t},Se.fromDegrees=function(e,t,n,r){if(!a.e(e))throw new o.t("heading is required");if(!a.e(t))throw new o.t("pitch is required");if(!a.e(n))throw new o.t("roll is required");return a.e(r)||(r=new Se),r.heading=e*s.e.RADIANS_PER_DEGREE,r.pitch=t*s.e.RADIANS_PER_DEGREE,r.roll=n*s.e.RADIANS_PER_DEGREE,r},Se.clone=function(e,t){if(a.e(e))return a.e(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new Se(e.heading,e.pitch,e.roll)},Se.equals=function(e,t){return e===t||a.e(e)&&a.e(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},Se.equalsEpsilon=function(e,t,n,r){return e===t||a.e(e)&&a.e(t)&&s.e.equalsEpsilon(e.heading,t.heading,n,r)&&s.e.equalsEpsilon(e.pitch,t.pitch,n,r)&&s.e.equalsEpsilon(e.roll,t.roll,n,r)},Se.prototype.clone=function(e){return Se.clone(this,e)},Se.prototype.equals=function(e){return Se.equals(this,e)},Se.prototype.equalsEpsilon=function(e,t,n){return Se.equalsEpsilon(this,e,t,n)},Se.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var Pe=new we(0,0,Q.TAI);function Ne(e,t,n){var r=Pe;return r.dayNumber=t,r.secondsOfDay=n,we.daysDifference(r,e._sampleZeroDateTT)}function Ce(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];var n=a.o.defer();e._chunkDownloadsInProgress[t]=n;var r,o=e._xysFileUrlTemplate;return r=a.e(o)?o.getDerivedResource({templateValues:{0:t}}):new l.t({url:l.n$1("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")}),a.o(r.fetchJson(),(function(r){e._chunkDownloadsInProgress[t]=!1;for(var o=e._samples,a=r.samples,i=t*e._samplesPerXysFile*3,s=0,u=a.length;s<u;++s)o[i+s]=a[s];n.resolve()})),n.promise}De.prototype.preload=function(e,t,n,r){var o=Ne(this,e,t),i=Ne(this,n,r),s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);var u=i/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;u>=this._totalSamples&&(u=this._totalSamples-1);for(var l=s/this._samplesPerXysFile|0,c=u/this._samplesPerXysFile|0,f=[],d=l;d<=c;++d)f.push(Ce(this,d));return a.o.all(f)},De.prototype.computeXysRadians=function(e,t,n){var r=Ne(this,e,t);if(!(r<0)){var o=r/this._stepSizeDays|0;if(!(o>=this._totalSamples)){var i=this._interpolationOrder,s=o-(i/2|0);s<0&&(s=0);var u=s+i;u>=this._totalSamples&&((s=(u=this._totalSamples-1)-i)<0&&(s=0));var l=!1,c=this._samples;if(a.e(c[3*s])||(Ce(this,s/this._samplesPerXysFile|0),l=!0),a.e(c[3*u])||(Ce(this,u/this._samplesPerXysFile|0),l=!0),!l){a.e(n)?(n.x=0,n.y=0,n.s=0):n=new ge(0,0,0);var f,d,p=r-s*this._stepSizeDays,y=this._work,h=this._denominators,m=this._coef,w=this._xTable;for(f=0;f<=i;++f)y[f]=p-w[f];for(f=0;f<=i;++f){for(m[f]=1,d=0;d<=i;++d)d!==f&&(m[f]*=y[d]);m[f]*=h[f];var O=3*(s+f);n.x+=m[f]*c[O++],n.y+=m[f]*c[O++],n.s+=m[f]*c[O]}return n}}}};var Ie={},je={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},Re={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Me={},Ae={east:new n.o,north:new n.o,up:new n.o,west:new n.o,south:new n.o,down:new n.o},qe=new n.o,Ue=new n.o,ze=new n.o;Ie.localFrameToFixedFrameGenerator=function(e,r){if(!je.hasOwnProperty(e)||!je[e].hasOwnProperty(r))throw new o.t("firstAxis and secondAxis must be east, north, up, west, south or down.");var u,l=je[e][r],c=e+r;return a.e(Me[c])?u=Me[c]:(u=function(u,c,f){if(!a.e(u))throw new o.t("origin is required.");if(a.e(f)||(f=new i.p),n.o.equalsEpsilon(u,n.o.ZERO,s.e.EPSILON14))n.o.unpack(Re[e],0,qe),n.o.unpack(Re[r],0,Ue),n.o.unpack(Re[l],0,ze);else if(s.e.equalsEpsilon(u.x,0,s.e.EPSILON14)&&s.e.equalsEpsilon(u.y,0,s.e.EPSILON14)){var d=s.e.sign(u.z);n.o.unpack(Re[e],0,qe),"east"!==e&&"west"!==e&&n.o.multiplyByScalar(qe,d,qe),n.o.unpack(Re[r],0,Ue),"east"!==r&&"west"!==r&&n.o.multiplyByScalar(Ue,d,Ue),n.o.unpack(Re[l],0,ze),"east"!==l&&"west"!==l&&n.o.multiplyByScalar(ze,d,ze)}else{(c=a.u(c,t.t.WGS84)).geodeticSurfaceNormal(u,Ae.up);var p=Ae.up,y=Ae.east;y.x=-u.y,y.y=u.x,y.z=0,n.o.normalize(y,Ae.east),n.o.cross(p,y,Ae.north),n.o.multiplyByScalar(Ae.up,-1,Ae.down),n.o.multiplyByScalar(Ae.east,-1,Ae.west),n.o.multiplyByScalar(Ae.north,-1,Ae.south),qe=Ae[e],Ue=Ae[r],ze=Ae[l]}return f[0]=qe.x,f[1]=qe.y,f[2]=qe.z,f[3]=0,f[4]=Ue.x,f[5]=Ue.y,f[6]=Ue.z,f[7]=0,f[8]=ze.x,f[9]=ze.y,f[10]=ze.z,f[11]=0,f[12]=u.x,f[13]=u.y,f[14]=u.z,f[15]=1,f},Me[c]=u),u},Ie.eastNorthUpToFixedFrame=Ie.localFrameToFixedFrameGenerator("east","north"),Ie.northEastDownToFixedFrame=Ie.localFrameToFixedFrameGenerator("north","east"),Ie.northUpEastToFixedFrame=Ie.localFrameToFixedFrameGenerator("north","up"),Ie.northWestUpToFixedFrame=Ie.localFrameToFixedFrameGenerator("north","west");var Fe=new h,We=new n.o(1,1,1),Le=new i.p;Ie.headingPitchRollToFixedFrame=function(e,t,r,s,u){o.o.typeOf.object("HeadingPitchRoll",t),s=a.u(s,Ie.eastNorthUpToFixedFrame);var l=h.fromHeadingPitchRoll(t,Fe),c=i.p.fromTranslationQuaternionRotationScale(n.o.ZERO,l,We,Le);return u=s(e,r,u),i.p.multiply(u,c,u)};var $e=new i.p,ke=new i.p$1;Ie.headingPitchRollQuaternion=function(e,t,n,r,a){o.o.typeOf.object("HeadingPitchRoll",t);var s=Ie.headingPitchRollToFixedFrame(e,t,n,r,$e),u=i.p.getMatrix3(s,ke);return h.fromRotationMatrix(u,a)};var Ye=new n.o(1,1,1),Be=new n.o,Ge=new i.p,Ze=new i.p,Ve=new i.p$1,Je=new h;Ie.fixedFrameToHeadingPitchRoll=function(e,r,s,u){o.o.defined("transform",e),r=a.u(r,t.t.WGS84),s=a.u(s,Ie.eastNorthUpToFixedFrame),a.e(u)||(u=new Se);var l=i.p.getTranslation(e,Be);if(n.o.equals(l,n.o.ZERO))return u.heading=0,u.pitch=0,u.roll=0,u;var c=i.p.inverseTransformation(s(l,r,Ge),Ge),f=i.p.setScale(e,Ye,Ze);f=i.p.setTranslation(f,n.o.ZERO,f),c=i.p.multiply(c,f,c);var d=h.fromRotationMatrix(i.p.getMatrix3(c,Ve),Je);return d=h.normalize(d,d),Se.fromQuaternion(d,u)};var Xe=s.e.TWO_PI/86400,He=new we;Ie.computeTemeToPseudoFixedMatrix=function(e,t){if(!a.e(e))throw new o.t("date is required.");var n,r=(He=we.addSeconds(e,-we.computeTaiMinusUtc(e),He)).dayNumber,u=He.secondsOfDay,l=r-2451545,c=(24110.54841+(n=u>=43200?(l+.5)/H.DAYS_PER_JULIAN_CENTURY:(l-.5)/H.DAYS_PER_JULIAN_CENTURY)*(8640184.812866+n*(.093104+-62e-7*n)))*Xe%s.e.TWO_PI+(72921158553e-15+11772758384668e-32*(r-2451545.5))*((u+.5*H.SECONDS_PER_DAY)%H.SECONDS_PER_DAY),f=Math.cos(c),d=Math.sin(c);return a.e(t)?(t[0]=f,t[1]=-d,t[2]=0,t[3]=d,t[4]=f,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new i.p$1(f,d,0,-d,f,0,0,0,1)},Ie.iau2006XysData=new De,Ie.earthOrientationParameters=be.NONE;var Qe=32.184;Ie.preloadIcrfFixed=function(e){var t=e.start.dayNumber,n=e.start.secondsOfDay+Qe,r=e.stop.dayNumber,o=e.stop.secondsOfDay+Qe,i=Ie.iau2006XysData.preload(t,n,r,o),s=Ie.earthOrientationParameters.getPromiseToLoad();return a.o.all([i,s])},Ie.computeIcrfToFixedMatrix=function(e,t){if(!a.e(e))throw new o.t("date is required.");a.e(t)||(t=new i.p$1);var n=Ie.computeFixedToIcrfMatrix(e,t);if(a.e(n))return i.p$1.transpose(n,t)};var Ke=new ge(0,0,0),et=new G(0,0,0,0,0,0),tt=new i.p$1,nt=new i.p$1;Ie.computeFixedToIcrfMatrix=function(e,t){if(!a.e(e))throw new o.t("date is required.");a.e(t)||(t=new i.p$1);var n=Ie.earthOrientationParameters.compute(e,et);if(a.e(n)){var r=e.dayNumber,u=e.secondsOfDay+Qe,l=Ie.iau2006XysData.computeXysRadians(r,u,Ke);if(a.e(l)){var c=l.x+n.xPoleOffset,f=l.y+n.yPoleOffset,d=1/(1+Math.sqrt(1-c*c-f*f)),p=tt;p[0]=1-d*c*c,p[3]=-d*c*f,p[6]=c,p[1]=-d*c*f,p[4]=1-d*f*f,p[7]=f,p[2]=-c,p[5]=-f,p[8]=1-d*(c*c+f*f);var y=i.p$1.fromRotationZ(-l.s,nt),h=i.p$1.multiply(p,y,tt),m=e.dayNumber-2451545,w=(e.secondsOfDay-we.computeTaiMinusUtc(e)+n.ut1MinusUtc)/H.SECONDS_PER_DAY,O=.779057273264+w+.00273781191135448*(m+w);O=O%1*s.e.TWO_PI;var b=i.p$1.fromRotationZ(O,nt),x=i.p$1.multiply(h,b,tt),E=Math.cos(n.xPoleWander),_=Math.cos(n.yPoleWander),v=Math.sin(n.xPoleWander),T=Math.sin(n.yPoleWander),S=r-2451545+u/H.SECONDS_PER_DAY,g=-47e-6*(S/=36525)*s.e.RADIANS_PER_DEGREE/3600,D=Math.cos(g),P=Math.sin(g),N=nt;return N[0]=E*D,N[1]=E*P,N[2]=v,N[3]=-_*P+T*v*D,N[4]=_*D+T*v*P,N[5]=-T*E,N[6]=-T*P-_*v*D,N[7]=T*D-_*v*P,N[8]=_*E,i.p$1.multiply(x,N,t)}}};var rt=new u.e;Ie.pointToWindowCoordinates=function(e,t,n,r){return(r=Ie.pointToGLWindowCoordinates(e,t,n,r)).y=2*t[5]-r.y,r},Ie.pointToGLWindowCoordinates=function(e,n,r,s){if(!a.e(e))throw new o.t("modelViewProjectionMatrix is required.");if(!a.e(n))throw new o.t("viewportTransformation is required.");if(!a.e(r))throw new o.t("point is required.");a.e(s)||(s=new t.o);var l=rt;return i.p.multiplyByVector(e,u.e.fromElements(r.x,r.y,r.z,1,l),l),u.e.multiplyByScalar(l,1/l.w,l),i.p.multiplyByVector(n,l,l),t.o.fromCartesian4(l,s)};var ot=new n.o,at=new n.o,it=new n.o;Ie.rotationMatrixFromPositionVelocity=function(e,r,u,l){if(!a.e(e))throw new o.t("position is required.");if(!a.e(r))throw new o.t("velocity is required.");var c=a.u(u,t.t.WGS84).geodeticSurfaceNormal(e,ot),f=n.o.cross(r,c,at);n.o.equalsEpsilon(f,n.o.ZERO,s.e.EPSILON6)&&(f=n.o.clone(n.o.UNIT_X,f));var d=n.o.cross(f,r,it);return n.o.normalize(d,d),n.o.cross(r,d,f),n.o.negate(f,f),n.o.normalize(f,f),a.e(l)||(l=new i.p$1),l[0]=r.x,l[1]=r.y,l[2]=r.z,l[3]=f.x,l[4]=f.y,l[5]=f.z,l[6]=d.x,l[7]=d.y,l[8]=d.z,l};var st=new i.p(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),ut=new r.a,lt=new n.o,ct=new n.o,ft=new i.p$1,dt=new i.p,pt=new i.p;function yt(e){e=a.u(e,a.u.EMPTY_OBJECT),o.o.typeOf.object("options.attributes",e.attributes),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=a.u(e.primitiveType,i._0x4b6a27.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=a.u(e.geometryType,f.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}Ie.basisTo2D=function(e,t,r){if(!a.e(e))throw new o.t("projection is required.");if(!a.e(t))throw new o.t("matrix is required.");if(!a.e(r))throw new o.t("result is required.");var s=i.p.getTranslation(t,ct),u=e.ellipsoid,l=u.cartesianToCartographic(s,ut),c=e.project(l,lt);n.o.fromElements(c.z,c.x,c.y,c);var f=Ie.eastNorthUpToFixedFrame(s,u,dt),d=i.p.inverseTransformation(f,pt),p=i.p.getMatrix3(t,ft),y=i.p.multiplyByMatrix3(d,p,r);return i.p.multiply(st,y,r),i.p.setTranslation(r,c,r),r},Ie.wgs84To2DModelMatrix=function(e,t,r){if(!a.e(e))throw new o.t("projection is required.");if(!a.e(t))throw new o.t("center is required.");if(!a.e(r))throw new o.t("result is required.");var s=e.ellipsoid,u=Ie.eastNorthUpToFixedFrame(t,s,dt),l=i.p.inverseTransformation(u,pt),c=s.cartesianToCartographic(t,ut),f=e.project(c,lt);n.o.fromElements(f.z,f.x,f.y,f);var d=i.p.fromTranslation(f,dt);return i.p.multiply(st,l,r),i.p.multiply(d,r,r),r},Ie.buildUp=function(e,t){var r=t.clone(),o=e.clone();o=n.o.normalize(o,o),Math.abs(n.o.dot(o,r))>=1&&(o=Math.abs(n.o.dot(r,n.o.UNIT_Y))<1?n.o.clone(n.o.UNIT_Y,o):n.o.clone(n.o.UNIT_Z,o));var a=new n.o;return n.o.cross(o,r,a),a=n.o.normalize(a,a),n.o.cross(r,a,o),o=n.o.normalize(o,o)},Ie.getHeading=function(e,t){var n;return n=s.e.equalsEpsilon(Math.abs(e.z),1,s.e.EPSILON3)?Math.atan2(t.y,t.x)-s.e.PI_OVER_TWO:Math.atan2(e.y,e.x)-s.e.PI_OVER_TWO,s.e.TWO_PI-s.e.zeroToTwoPi(n)},Ie.convertToColumbusCartesian=function(e){var t=new l.n,o=t.ellipsoid,a=new n.o,i=new r.a;return o.cartesianToCartographic(e,i),t.project(i,a),n.o.fromElements(a.z,a.x,a.y)},Ie.convertTo3DCartesian=function(e){var t=new l.n,o=t.ellipsoid,a=new n.o,i=new r.a;return a=n.o.fromElements(e.y,e.z,e.x),t.unproject(a,i),o.cartographicToCartesian(i,a)},yt.computeNumberOfVertices=function(e){o.o.typeOf.object("geometry",e);var t=-1;for(var n in e.attributes)if(e.attributes.hasOwnProperty(n)&&a.e(e.attributes[n])&&a.e(e.attributes[n].values)){var r=e.attributes[n];if(r.isInstanceAttribute)continue;var i=r.values.length/r.componentsPerAttribute;if(t!==i&&-1!==t)throw new o.t("All attribute lists must have the same number of attributes.");t=i}return t};var ht=new r.a,mt=new n.o,wt=new i.p,Ot=[new r.a,new r.a,new r.a],bt=[new t.o,new t.o,new t.o],xt=[new t.o,new t.o,new t.o],Et=new n.o,_t=new h,vt=new i.p,Tt=new d;yt._textureCoordinateRotationPoints=function(e,o,a,s){var u,l=t.h.center(s,ht),c=r.a.toCartesian(l,a,mt),f=Ie.eastNorthUpToFixedFrame(c,a,wt),p=i.p.inverse(f,wt),y=bt,m=Ot;m[0].longitude=s.west,m[0].latitude=s.south,m[1].longitude=s.west,m[1].latitude=s.north,m[2].longitude=s.east,m[2].latitude=s.south;var w=Et;for(u=0;u<3;u++)r.a.toCartesian(m[u],a,w),w=i.p.multiplyByPointAsVector(p,w,w),y[u].x=w.x,y[u].y=w.y;var O=h.fromAxisAngle(n.o.UNIT_Z,-o,_t),b=i.p$1.fromQuaternion(O,vt),x=e.length,E=Number.POSITIVE_INFINITY,_=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,T=Number.NEGATIVE_INFINITY;for(u=0;u<x;u++)w=i.p.multiplyByPointAsVector(p,e[u],w),w=i.p$1.multiplyByVector(b,w,w),E=Math.min(E,w.x),_=Math.min(_,w.y),v=Math.max(v,w.x),T=Math.max(T,w.y);var S=d.fromRotation(o,Tt),g=xt;g[0].x=E,g[0].y=_,g[1].x=E,g[1].y=T,g[2].x=v,g[2].y=_;var D=y[0],P=y[2].x-D.x,N=y[1].y-D.y;for(u=0;u<3;u++){var C=g[u];d.multiplyByVector(S,C,C),C.x=(C.x-D.x)/P,C.y=(C.y-D.y)/N}var I=g[0],j=g[1],R=g[2],M=new Array(6);return t.o.pack(I,M),t.o.pack(j,M,2),t.o.pack(R,M,4),M},e.I=yt,e.Me=f,e.f=d,e.m=Ie,e.n=h,e.o=function(e){if(e=a.u(e,a.u.EMPTY_OBJECT),!a.e(e.componentDatatype))throw new o.t("options.componentDatatype is required.");if(!a.e(e.componentsPerAttribute))throw new o.t("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new o.t("options.componentsPerAttribute must be between 1 and 4.");if(!a.e(e.values))throw new o.t("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=a.u(e.normalize,!1),this.values=e.values}})); +define(["exports","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./when-92c6cf3c","./FeatureDetection-fd297af4","./Math-ecf82623","./Cartesian4-72b88c9e","./buildModuleUrl-cbcc8c56","./RuntimeError-c6a62a80"],(function(e,t,n,r,o,a,i,s,u,l,c){"use strict";var f=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});function d(e,t,n,r){this[0]=a.u(e,0),this[1]=a.u(n,0),this[2]=a.u(t,0),this[3]=a.u(r,0)}d.packedLength=4,d.pack=function(e,t,n){return o.o.typeOf.object("value",e),o.o.defined("array",t),n=a.u(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t},d.unpack=function(e,t,n){return o.o.defined("array",e),t=a.u(t,0),a.e(n)||(n=new d),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n},d.clone=function(e,t){if(a.e(e))return a.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new d(e[0],e[2],e[1],e[3])},d.fromArray=function(e,t,n){return o.o.defined("array",e),t=a.u(t,0),a.e(n)||(n=new d),n[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n},d.fromColumnMajorArray=function(e,t){return o.o.defined("values",e),d.clone(e,t)},d.fromRowMajorArray=function(e,t){return o.o.defined("values",e),a.e(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new d(e[0],e[1],e[2],e[3])},d.fromScale=function(e,t){return o.o.typeOf.object("scale",e),a.e(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new d(e.x,0,0,e.y)},d.fromUniformScale=function(e,t){return o.o.typeOf.number("scale",e),a.e(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new d(e,0,0,e)},d.fromRotation=function(e,t){o.o.typeOf.number("angle",e);var n=Math.cos(e),r=Math.sin(e);return a.e(t)?(t[0]=n,t[1]=r,t[2]=-r,t[3]=n,t):new d(n,-r,r,n)},d.toArray=function(e,t){return o.o.typeOf.object("matrix",e),a.e(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},d.getElementIndex=function(e,t){return o.o.typeOf.number.greaterThanOrEquals("row",t,0),o.o.typeOf.number.lessThanOrEquals("row",t,1),o.o.typeOf.number.greaterThanOrEquals("column",e,0),o.o.typeOf.number.lessThanOrEquals("column",e,1),2*e+t},d.getColumn=function(e,t,n){o.o.typeOf.object("matrix",e),o.o.typeOf.number.greaterThanOrEquals("index",t,0),o.o.typeOf.number.lessThanOrEquals("index",t,1),o.o.typeOf.object("result",n);var r=2*t,a=e[r],i=e[r+1];return n.x=a,n.y=i,n},d.setColumn=function(e,t,n,r){o.o.typeOf.object("matrix",e),o.o.typeOf.number.greaterThanOrEquals("index",t,0),o.o.typeOf.number.lessThanOrEquals("index",t,1),o.o.typeOf.object("cartesian",n),o.o.typeOf.object("result",r);var a=2*t;return(r=d.clone(e,r))[a]=n.x,r[a+1]=n.y,r},d.getRow=function(e,t,n){o.o.typeOf.object("matrix",e),o.o.typeOf.number.greaterThanOrEquals("index",t,0),o.o.typeOf.number.lessThanOrEquals("index",t,1),o.o.typeOf.object("result",n);var r=e[t],a=e[t+2];return n.x=r,n.y=a,n},d.setRow=function(e,t,n,r){return o.o.typeOf.object("matrix",e),o.o.typeOf.number.greaterThanOrEquals("index",t,0),o.o.typeOf.number.lessThanOrEquals("index",t,1),o.o.typeOf.object("cartesian",n),o.o.typeOf.object("result",r),(r=d.clone(e,r))[t]=n.x,r[t+2]=n.y,r};var p=new t.o;d.getScale=function(e,n){return o.o.typeOf.object("matrix",e),o.o.typeOf.object("result",n),n.x=t.o.magnitude(t.o.fromElements(e[0],e[1],p)),n.y=t.o.magnitude(t.o.fromElements(e[2],e[3],p)),n};var y=new t.o;function h(e,t,n,r){this.x=a.u(e,0),this.y=a.u(t,0),this.z=a.u(n,0),this.w=a.u(r,0)}d.getMaximumScale=function(e){return d.getScale(e,y),t.o.maximumComponent(y)},d.multiply=function(e,t,n){o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),o.o.typeOf.object("result",n);var r=e[0]*t[0]+e[2]*t[1],a=e[0]*t[2]+e[2]*t[3],i=e[1]*t[0]+e[3]*t[1],s=e[1]*t[2]+e[3]*t[3];return n[0]=r,n[1]=i,n[2]=a,n[3]=s,n},d.add=function(e,t,n){return o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),o.o.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n},d.subtract=function(e,t,n){return o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),o.o.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n},d.multiplyByVector=function(e,t,n){o.o.typeOf.object("matrix",e),o.o.typeOf.object("cartesian",t),o.o.typeOf.object("result",n);var r=e[0]*t.x+e[2]*t.y,a=e[1]*t.x+e[3]*t.y;return n.x=r,n.y=a,n},d.multiplyByScalar=function(e,t,n){return o.o.typeOf.object("matrix",e),o.o.typeOf.number("scalar",t),o.o.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n},d.multiplyByScale=function(e,t,n){return o.o.typeOf.object("matrix",e),o.o.typeOf.object("scale",t),o.o.typeOf.object("result",n),n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n},d.negate=function(e,t){return o.o.typeOf.object("matrix",e),o.o.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},d.transpose=function(e,t){o.o.typeOf.object("matrix",e),o.o.typeOf.object("result",t);var n=e[0],r=e[2],a=e[1],i=e[3];return t[0]=n,t[1]=r,t[2]=a,t[3]=i,t},d.abs=function(e,t){return o.o.typeOf.object("matrix",e),o.o.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},d.equals=function(e,t){return e===t||a.e(e)&&a.e(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},d.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]},d.equalsEpsilon=function(e,t,n){return o.o.typeOf.number("epsilon",n),e===t||a.e(e)&&a.e(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n},d.IDENTITY=Object.freeze(new d(1,0,0,1)),d.ZERO=Object.freeze(new d(0,0,0,0)),d.COLUMN0ROW0=0,d.COLUMN0ROW1=1,d.COLUMN1ROW0=2,d.COLUMN1ROW1=3,Object.defineProperties(d.prototype,{length:{get:function(){return d.packedLength}}}),d.prototype.clone=function(e){return d.clone(this,e)},d.prototype.equals=function(e){return d.equals(this,e)},d.prototype.equalsEpsilon=function(e,t){return d.equalsEpsilon(this,e,t)},d.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"};var m=new n.o;h.fromAxisAngle=function(e,t,r){o.o.typeOf.object("axis",e),o.o.typeOf.number("angle",t);var i=t/2,s=Math.sin(i),u=(m=n.o.normalize(e,m)).x*s,l=m.y*s,c=m.z*s,f=Math.cos(i);return a.e(r)?(r.x=u,r.y=l,r.z=c,r.w=f,r):new h(u,l,c,f)};var w=[1,2,0],O=new Array(3);h.fromRotationMatrix=function(e,t){o.o.typeOf.object("matrix",e);var n,r,s,u,l,c=e[i.p$1.COLUMN0ROW0],f=e[i.p$1.COLUMN1ROW1],d=e[i.p$1.COLUMN2ROW2],p=c+f+d;if(p>0)l=.5*(n=Math.sqrt(p+1)),n=.5/n,r=(e[i.p$1.COLUMN1ROW2]-e[i.p$1.COLUMN2ROW1])*n,s=(e[i.p$1.COLUMN2ROW0]-e[i.p$1.COLUMN0ROW2])*n,u=(e[i.p$1.COLUMN0ROW1]-e[i.p$1.COLUMN1ROW0])*n;else{var y=0;f>c&&(y=1),d>c&&d>f&&(y=2);var m=w[y],b=w[m];n=Math.sqrt(e[i.p$1.getElementIndex(y,y)]-e[i.p$1.getElementIndex(m,m)]-e[i.p$1.getElementIndex(b,b)]+1);var x=O;x[y]=.5*n,n=.5/n,l=(e[i.p$1.getElementIndex(b,m)]-e[i.p$1.getElementIndex(m,b)])*n,x[m]=(e[i.p$1.getElementIndex(m,y)]+e[i.p$1.getElementIndex(y,m)])*n,x[b]=(e[i.p$1.getElementIndex(b,y)]+e[i.p$1.getElementIndex(y,b)])*n,r=-x[0],s=-x[1],u=-x[2]}return a.e(t)?(t.x=r,t.y=s,t.z=u,t.w=l,t):new h(r,s,u,l)};var b=new h,x=new h,E=new h,_=new h;h.fromHeadingPitchRoll=function(e,t){return o.o.typeOf.object("headingPitchRoll",e),_=h.fromAxisAngle(n.o.UNIT_X,e.roll,b),E=h.fromAxisAngle(n.o.UNIT_Y,-e.pitch,t),t=h.multiply(E,_,E),x=h.fromAxisAngle(n.o.UNIT_Z,-e.heading,b),h.multiply(x,t,t)};var v=new n.o,T=new n.o,S=new h,g=new h,D=new h;h.packedLength=4,h.pack=function(e,t,n){return o.o.typeOf.object("value",e),o.o.defined("array",t),n=a.u(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},h.unpack=function(e,t,n){return o.o.defined("array",e),t=a.u(t,0),a.e(n)||(n=new h),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n},h.packedInterpolationLength=3,h.convertPackedArrayForInterpolation=function(e,t,n,r){h.unpack(e,4*n,D),h.conjugate(D,D);for(var o=0,a=n-t+1;o<a;o++){var i=3*o;h.unpack(e,4*(t+o),S),h.multiply(S,D,S),S.w<0&&h.negate(S,S),h.computeAxis(S,v);var s=h.computeAngle(S);r[i]=v.x*s,r[i+1]=v.y*s,r[i+2]=v.z*s}},h.unpackInterpolationResult=function(e,t,r,o,i){a.e(i)||(i=new h),n.o.fromArray(e,0,T);var s=n.o.magnitude(T);return h.unpack(t,4*o,g),0===s?h.clone(h.IDENTITY,S):h.fromAxisAngle(T,s,S),h.multiply(S,g,i)},h.clone=function(e,t){if(a.e(e))return a.e(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new h(e.x,e.y,e.z,e.w)},h.conjugate=function(e,t){return o.o.typeOf.object("quaternion",e),o.o.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},h.magnitudeSquared=function(e){return o.o.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},h.magnitude=function(e){return Math.sqrt(h.magnitudeSquared(e))},h.normalize=function(e,t){o.o.typeOf.object("result",t);var n=1/h.magnitude(e),r=e.x*n,a=e.y*n,i=e.z*n,s=e.w*n;return t.x=r,t.y=a,t.z=i,t.w=s,t},h.inverse=function(e,t){o.o.typeOf.object("result",t);var n=h.magnitudeSquared(e);return t=h.conjugate(e,t),h.multiplyByScalar(t,1/n,t)},h.add=function(e,t,n){return o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),o.o.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n},h.subtract=function(e,t,n){return o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),o.o.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n},h.negate=function(e,t){return o.o.typeOf.object("quaternion",e),o.o.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},h.dot=function(e,t){return o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},h.multiply=function(e,t,n){o.o.typeOf.object("left",e),o.o.typeOf.object("right",t),o.o.typeOf.object("result",n);var r=e.x,a=e.y,i=e.z,s=e.w,u=t.x,l=t.y,c=t.z,f=t.w,d=s*u+r*f+a*c-i*l,p=s*l-r*c+a*f+i*u,y=s*c+r*l-a*u+i*f,h=s*f-r*u-a*l-i*c;return n.x=d,n.y=p,n.z=y,n.w=h,n},h.multiplyByVec=function(e,t,r){var o=new n.o,a=new n.o,i=new n.o(e.x,e.y,e.z);o=n.o.cross(i,t,o),a=n.o.cross(i,o,a);var s=new n.o;s=n.o.multiplyByScalar(o,2*e.w,s);var u=new n.o;return u=n.o.multiplyByScalar(o,2,u),r=n.o.add(t,s,r),r=n.o.add(r,u,r)},h.multiplyByScalar=function(e,t,n){return o.o.typeOf.object("quaternion",e),o.o.typeOf.number("scalar",t),o.o.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n},h.divideByScalar=function(e,t,n){return o.o.typeOf.object("quaternion",e),o.o.typeOf.number("scalar",t),o.o.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n},h.computeAxis=function(e,t){o.o.typeOf.object("quaternion",e),o.o.typeOf.object("result",t);var n=e.w;if(Math.abs(n-1)<s.e.EPSILON6)return t.x=t.y=t.z=0,t;var r=1/Math.sqrt(1-n*n);return t.x=e.x*r,t.y=e.y*r,t.z=e.z*r,t},h.computeAngle=function(e){return o.o.typeOf.object("quaternion",e),Math.abs(e.w-1)<s.e.EPSILON6?0:2*Math.acos(e.w)};var P=new h;h.lerp=function(e,t,n,r){return o.o.typeOf.object("start",e),o.o.typeOf.object("end",t),o.o.typeOf.number("t",n),o.o.typeOf.object("result",r),P=h.multiplyByScalar(t,n,P),r=h.multiplyByScalar(e,1-n,r),h.add(P,r,r)};var N=new h,C=new h,I=new h;h.slerp=function(e,t,n,r){o.o.typeOf.object("start",e),o.o.typeOf.object("end",t),o.o.typeOf.number("t",n),o.o.typeOf.object("result",r);var a=h.dot(e,t),i=t;if(a<0&&(a=-a,i=N=h.negate(t,N)),1-a<s.e.EPSILON6)return h.lerp(e,i,n,r);var u=Math.acos(a);return C=h.multiplyByScalar(e,Math.sin((1-n)*u),C),I=h.multiplyByScalar(i,Math.sin(n*u),I),r=h.add(C,I,r),h.multiplyByScalar(r,1/Math.sin(u),r)},h.log=function(e,t){o.o.typeOf.object("quaternion",e),o.o.typeOf.object("result",t);var r=s.e.acosClamped(e.w),a=0;return 0!==r&&(a=r/Math.sin(r)),n.o.multiplyByScalar(e,a,t)},h.exp=function(e,t){o.o.typeOf.object("cartesian",e),o.o.typeOf.object("result",t);var r=n.o.magnitude(e),a=0;return 0!==r&&(a=Math.sin(r)/r),t.x=e.x*a,t.y=e.y*a,t.z=e.z*a,t.w=Math.cos(r),t};var j=new n.o,R=new n.o,M=new h,A=new h;h.computeInnerQuadrangle=function(e,t,r,a){o.o.typeOf.object("q0",e),o.o.typeOf.object("q1",t),o.o.typeOf.object("q2",r),o.o.typeOf.object("result",a);var i=h.conjugate(t,M);h.multiply(i,r,A);var s=h.log(A,j);h.multiply(i,e,A);var u=h.log(A,R);return n.o.add(s,u,s),n.o.multiplyByScalar(s,.25,s),n.o.negate(s,s),h.exp(s,M),h.multiply(t,M,a)},h.squad=function(e,t,n,r,a,i){o.o.typeOf.object("q0",e),o.o.typeOf.object("q1",t),o.o.typeOf.object("s0",n),o.o.typeOf.object("s1",r),o.o.typeOf.number("t",a),o.o.typeOf.object("result",i);var s=h.slerp(e,t,a,M),u=h.slerp(n,r,a,A);return h.slerp(s,u,2*a*(1-a),i)};for(var q=new h,U=1.9011074535173003,z=i.s.supportsTypedArrays()?new Float32Array(8):[],F=i.s.supportsTypedArrays()?new Float32Array(8):[],W=i.s.supportsTypedArrays()?new Float32Array(8):[],L=i.s.supportsTypedArrays()?new Float32Array(8):[],$=0;$<7;++$){var k=$+1,Y=2*k+1;z[$]=1/(k*Y),F[$]=k/Y}function B(e,t,n){o.o.defined("array",e),o.o.defined("itemToFind",t),o.o.defined("comparator",n);for(var r,a,i=0,s=e.length-1;i<=s;)if((a=n(e[r=~~((i+s)/2)],t))<0)i=r+1;else{if(!(a>0))return r;s=r-1}return~(s+1)}function G(e,t,n,r,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=r,this.ut1MinusUtc=o}function Z(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,t=arguments,n=0,r=t[n++],o=function(e,t,n,r){n||(n=" ");var o=e.length>=t?"":Array(1+t-e.length>>>0).join(n);return r?e+o:o+e},a=function(e,t,n,r,a,i){var s=r-e.length;return s>0&&(e=n||!a?o(e,r,i,n):e.slice(0,t.length)+o("",s,"0",!0)+e.slice(t.length)),e},i=function(e,t,n,r,i,s,u){var l=e>>>0;return e=(n=n&&l&&{2:"0b",8:"0",16:"0x"}[t]||"")+o(l.toString(t),s||0,"0",!1),a(e,n,r,i,u)},s=function(e,t,n,r,o,i){return null!=r&&(e=e.slice(0,r)),a(e,"",t,n,o,i)},u=function(e,r,u,l,c,f,d){var p,y,h,m,w;if("%%"==e)return"%";for(var O=!1,b="",x=!1,E=!1,_=" ",v=u.length,T=0;u&&T<v;T++)switch(u.charAt(T)){case" ":b=" ";break;case"+":b="+";break;case"-":O=!0;break;case"'":_=u.charAt(T+1);break;case"0":x=!0;break;case"#":E=!0}if((l=l?"*"==l?+t[n++]:"*"==l.charAt(0)?+t[l.slice(1,-1)]:+l:0)<0&&(l=-l,O=!0),!isFinite(l))throw new Error("sprintf: (minimum-)width must be finite");switch(f=f?"*"==f?+t[n++]:"*"==f.charAt(0)?+t[f.slice(1,-1)]:+f:"fFeE".indexOf(d)>-1?6:"d"==d?0:void 0,w=r?t[r.slice(0,-1)]:t[n++],d){case"s":return s(String(w),O,l,f,x,_);case"c":return s(String.fromCharCode(+w),O,l,f,x);case"b":return i(w,2,E,O,l,f,x);case"o":return i(w,8,E,O,l,f,x);case"x":return i(w,16,E,O,l,f,x);case"X":return i(w,16,E,O,l,f,x).toUpperCase();case"u":return i(w,10,E,O,l,f,x);case"i":case"d":return p=+w||0,w=(y=(p=Math.round(p-p%1))<0?"-":b)+o(String(Math.abs(p)),f,"0",!1),a(w,y,O,l,x);case"e":case"E":case"f":case"F":case"g":case"G":return y=(p=+w)<0?"-":b,h=["toExponential","toFixed","toPrecision"]["efg".indexOf(d.toLowerCase())],m=["toString","toUpperCase"]["eEfFgG".indexOf(d)%2],w=y+Math.abs(p)[h](f),a(w,y,O,l,x)[m]();default:return e}};return r.replace(e,u)}function V(e,t,n,r,o,a,i,s){this.year=e,this.month=t,this.day=n,this.hour=r,this.minute=o,this.second=a,this.millisecond=i,this.isLeapSecond=s}function J(e){if(null===e||isNaN(e))throw new o.t("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0}function X(e,t){this.julianDate=e,this.offset=t}z[7]=U/136,F[7]=8*U/17,h.fastSlerp=function(e,t,n,r){o.o.typeOf.object("start",e),o.o.typeOf.object("end",t),o.o.typeOf.number("t",n),o.o.typeOf.object("result",r);var a,i=h.dot(e,t);i>=0?a=1:(a=-1,i=-i);for(var s=i-1,u=1-n,l=n*n,c=u*u,f=7;f>=0;--f)W[f]=(z[f]*l-F[f])*s,L[f]=(z[f]*c-F[f])*s;var d=a*n*(1+W[0]*(1+W[1]*(1+W[2]*(1+W[3]*(1+W[4]*(1+W[5]*(1+W[6]*(1+W[7])))))))),p=u*(1+L[0]*(1+L[1]*(1+L[2]*(1+L[3]*(1+L[4]*(1+L[5]*(1+L[6]*(1+L[7])))))))),y=h.multiplyByScalar(e,p,q);return h.multiplyByScalar(t,d,r),h.add(y,r,r)},h.fastSquad=function(e,t,n,r,a,i){o.o.typeOf.object("q0",e),o.o.typeOf.object("q1",t),o.o.typeOf.object("s0",n),o.o.typeOf.object("s1",r),o.o.typeOf.number("t",a),o.o.typeOf.object("result",i);var s=h.fastSlerp(e,t,a,M),u=h.fastSlerp(n,r,a,A);return h.fastSlerp(s,u,2*a*(1-a),i)},h.equals=function(e,t){return e===t||a.e(e)&&a.e(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},h.equalsEpsilon=function(e,t,n){return o.o.typeOf.number("epsilon",n),e===t||a.e(e)&&a.e(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n},h.ZERO=Object.freeze(new h(0,0,0,0)),h.IDENTITY=Object.freeze(new h(0,0,0,1)),h.prototype.clone=function(e){return h.clone(this,e)},h.prototype.equals=function(e){return h.equals(this,e)},h.prototype.equalsEpsilon=function(e,t){return h.equalsEpsilon(this,e,t)},h.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var H=Object.freeze({SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5}),Q=Object.freeze({UTC:0,TAI:1}),K=new V,ee=[31,28,31,30,31,30,31,31,30,31,30,31];function te(e,t){return we.compare(e.julianDate,t.julianDate)}var ne=new X;function re(e){ne.julianDate=e;var t=we.leapSeconds,n=B(t,ne,te);n<0&&(n=~n),n>=t.length&&(n=t.length-1);var r=t[n].offset;n>0&&(we.secondsDifference(t[n].julianDate,e)>r&&(r=t[--n].offset));we.addSeconds(e,r,e)}function oe(e,t){ne.julianDate=e;var n=we.leapSeconds,r=B(n,ne,te);if(r<0&&(r=~r),0===r)return we.addSeconds(e,-n[0].offset,t);if(r>=n.length)return we.addSeconds(e,-n[r-1].offset,t);var o=we.secondsDifference(n[r].julianDate,e);return 0===o?we.addSeconds(e,-n[r].offset,t):o<=1?void 0:we.addSeconds(e,-n[--r].offset,t)}function ae(e,t,n){var r=t/H.SECONDS_PER_DAY|0;return e+=r,(t-=H.SECONDS_PER_DAY*r)<0&&(e--,t+=H.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function ie(e,t,n,r,o,a,i){var s=(t-14)/12|0,u=e+4800+s,l=(1461*u/4|0)+(367*(t-2-12*s)/12|0)-(3*((u+100)/100|0)/4|0)+n-32075;(r-=12)<0&&(r+=24);var c=a+(r*H.SECONDS_PER_HOUR+o*H.SECONDS_PER_MINUTE+i*H.SECONDS_PER_MILLISECOND);return c>=43200&&(l-=1),[l,c]}var se=/^(\d{4})$/,ue=/^(\d{4})-(\d{2})$/,le=/^(\d{4})-?(\d{3})$/,ce=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,fe=/^(\d{4})-?(\d{2})-?(\d{2})$/,de=/([Z+\-])?(\d{2})?:?(\d{2})?$/,pe=/^(\d{2})(\.\d+)?/.source+de.source,ye=/^(\d{2}):?(\d{2})(\.\d+)?/.source+de.source,he=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+de.source,me="Invalid ISO 8601 date.";function we(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=a.u(e,0),t=a.u(t,0),n=a.u(n,Q.UTC);var r=0|e;ae(r,t+=(e-r)*H.SECONDS_PER_DAY,this),n===Q.UTC&&re(this)}we.fromGregorianDate=function(e,t){if(!(e instanceof V))throw new o.t("date must be a valid GregorianDate.");var n=ie(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return a.e(t)?(ae(n[0],n[1],t),re(t),t):new we(n[0],n[1],Q.UTC)},we.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new o.t("date must be a valid JavaScript Date.");var n=ie(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return a.e(t)?(ae(n[0],n[1],t),re(t),t):new we(n[0],n[1],Q.UTC)},we.fromIso8601=function(e,t){if("string"!=typeof e)throw new o.t(me);var n,r,i,s,u,l=(e=e.replace(",",".")).split("T"),c=1,f=1,d=0,p=0,y=0,h=0,m=l[0],w=l[1];if(!a.e(m))throw new o.t(me);if(null!==(l=m.match(fe))){if((s=m.split("-").length-1)>0&&2!==s)throw new o.t(me);n=+l[1],c=+l[2],f=+l[3]}else if(null!==(l=m.match(ue)))n=+l[1],c=+l[2];else if(null!==(l=m.match(se)))n=+l[1];else{var O;if(null!==(l=m.match(le))){if(n=+l[1],O=+l[2],i=J(n),O<1||i&&O>366||!i&&O>365)throw new o.t(me)}else{if(null===(l=m.match(ce)))throw new o.t(me);n=+l[1];var b=+l[2],x=+l[3]||0;if((s=m.split("-").length-1)>0&&(!a.e(l[3])&&1!==s||a.e(l[3])&&2!==s))throw new o.t(me);O=7*b+x-new Date(Date.UTC(n,0,4)).getUTCDay()-3}(r=new Date(Date.UTC(n,0,1))).setUTCDate(O),c=r.getUTCMonth()+1,f=r.getUTCDate()}if(i=J(n),c<1||c>12||f<1||(2!==c||!i)&&f>ee[c-1]||i&&2===c&&f>29)throw new o.t(me);if(a.e(w)){if(null!==(l=w.match(he))){if((s=w.split(":").length-1)>0&&2!==s&&3!==s)throw new o.t(me);d=+l[1],p=+l[2],y=+l[3],h=1e3*+(l[4]||0),u=5}else if(null!==(l=w.match(ye))){if((s=w.split(":").length-1)>2)throw new o.t(me);d=+l[1],p=+l[2],y=60*+(l[3]||0),u=4}else{if(null===(l=w.match(pe)))throw new o.t(me);d=+l[1],p=60*+(l[2]||0),u=3}if(p>=60||y>=61||d>24||24===d&&(p>0||y>0||h>0))throw new o.t(me);var E=l[u],_=+l[u+1],v=+(l[u+2]||0);switch(E){case"+":d-=_,p-=v;break;case"-":d+=_,p+=v;break;case"Z":break;default:p+=new Date(Date.UTC(n,c-1,f,d,p)).getTimezoneOffset()}}var T=60===y;for(T&&y--;p>=60;)p-=60,d++;for(;d>=24;)d-=24,f++;for(r=i&&2===c?29:ee[c-1];f>r;)f-=r,++c>12&&(c-=12,n++),r=i&&2===c?29:ee[c-1];for(;p<0;)p+=60,d--;for(;d<0;)d+=24,f--;for(;f<1;)--c<1&&(c+=12,n--),f+=r=i&&2===c?29:ee[c-1];var S=ie(n,c,f,d,p,y,h);return a.e(t)?(ae(S[0],S[1],t),re(t)):t=new we(S[0],S[1],Q.UTC),T&&we.addSeconds(t,1,t),t},we.now=function(e){return we.fromDate(new Date,e)};var Oe=new we(0,0,Q.TAI);function be(e){if(e=a.u(e,a.u.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=a.u(e.addNewLeapSeconds,!0),a.e(e.data))Ee(this,e.data);else if(a.e(e.url)){var t=l.t.createIfNeeded(e.url),n=this;this._downloadPromise=a.o(t.fetchJson(),(function(e){Ee(n,e)}),(function(){n._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))}else Ee(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function xe(e,t){return we.compare(e.julianDate,t)}function Ee(e,t){if(a.e(t.columnNames))if(a.e(t.samples)){var n=t.columnNames.indexOf("modifiedJulianDateUtc"),r=t.columnNames.indexOf("xPoleWanderRadians"),o=t.columnNames.indexOf("yPoleWanderRadians"),i=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||r<0||o<0||i<0||s<0||u<0||l<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var c=e._samples=t.samples,f=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=r,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=i,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var d,p=e._addNewLeapSeconds,y=0,h=c.length;y<h;y+=e._columnCount){var m=c[y+n],w=c[y+l],O=new we(m+H.MODIFIED_JULIAN_DATE_DIFFERENCE,w,Q.TAI);if(f.push(O),p){if(w!==d&&a.e(d)){var b=we.leapSeconds,x=B(b,O,xe);if(x<0){var E=new X(O,w);b.splice(~x,0,E)}}d=w}}}}else e._dataError="Error in loaded EOP data: The samples property is required.";else e._dataError="Error in loaded EOP data: The columnNames property is required."}function _e(e,t,n,r,o){var a=n*r;o.xPoleWander=t[a+e._xPoleWanderRadiansColumn],o.yPoleWander=t[a+e._yPoleWanderRadiansColumn],o.xPoleOffset=t[a+e._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=t[a+e._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=t[a+e._ut1MinusUtcSecondsColumn]}function ve(e,t,n){return t+e*(n-t)}function Te(e,t,n,r,o,a,i){var s=e._columnCount;if(a>t.length-1)return i.xPoleWander=0,i.yPoleWander=0,i.xPoleOffset=0,i.yPoleOffset=0,i.ut1MinusUtc=0,i;var u=t[o],l=t[a];if(u.equals(l)||r.equals(u))return _e(e,n,o,s,i),i;if(r.equals(l))return _e(e,n,a,s,i),i;var c=we.secondsDifference(r,u)/we.secondsDifference(l,u),f=o*s,d=a*s,p=n[f+e._ut1MinusUtcSecondsColumn],y=n[d+e._ut1MinusUtcSecondsColumn],h=y-p;if(h>.5||h<-.5){var m=n[f+e._taiMinusUtcSecondsColumn],w=n[d+e._taiMinusUtcSecondsColumn];m!==w&&(l.equals(r)?p=y:y-=w-m)}return i.xPoleWander=ve(c,n[f+e._xPoleWanderRadiansColumn],n[d+e._xPoleWanderRadiansColumn]),i.yPoleWander=ve(c,n[f+e._yPoleWanderRadiansColumn],n[d+e._yPoleWanderRadiansColumn]),i.xPoleOffset=ve(c,n[f+e._xCelestialPoleOffsetRadiansColumn],n[d+e._xCelestialPoleOffsetRadiansColumn]),i.yPoleOffset=ve(c,n[f+e._yCelestialPoleOffsetRadiansColumn],n[d+e._yCelestialPoleOffsetRadiansColumn]),i.ut1MinusUtc=ve(c,p,y),i}function Se(e,t,n){this.heading=a.u(e,0),this.pitch=a.u(t,0),this.roll=a.u(n,0)}function ge(e,t,n){this.x=e,this.y=t,this.s=n}function De(e){e=a.u(e,a.u.EMPTY_OBJECT),this._xysFileUrlTemplate=l.t.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=a.u(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=a.u(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new we(this._sampleZeroJulianEphemerisDate,0,Q.TAI),this._stepSizeDays=a.u(e.stepSizeDays,1),this._samplesPerXysFile=a.u(e.samplesPerXysFile,1e3),this._totalSamples=a.u(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,n=this._denominators=new Array(t+1),r=this._xTable=new Array(t+1),o=Math.pow(this._stepSizeDays,t),i=0;i<=t;++i){n[i]=o,r[i]=i*this._stepSizeDays;for(var s=0;s<=t;++s)s!==i&&(n[i]*=i-s);n[i]=1/n[i]}this._work=new Array(t+1),this._coef=new Array(t+1)}we.toGregorianDate=function(e,t){if(!a.e(e))throw new o.t("julianDate is required.");var n=!1,r=oe(e,Oe);a.e(r)||(we.addSeconds(e,-1,Oe),r=oe(Oe,Oe),n=!0);var i=r.dayNumber,s=r.secondsOfDay;s>=43200&&(i+=1);var u=i+68569|0,l=4*u/146097|0,c=4e3*((u=u-((146097*l+3)/4|0)|0)+1)/1461001|0,f=80*(u=u-(1461*c/4|0)+31|0)/2447|0,d=u-(2447*f/80|0)|0,p=f+2-12*(u=f/11|0)|0,y=100*(l-49)+c+u|0,h=s/H.SECONDS_PER_HOUR|0,m=s-h*H.SECONDS_PER_HOUR,w=m/H.SECONDS_PER_MINUTE|0,O=0|(m-=w*H.SECONDS_PER_MINUTE),b=(m-O)/H.SECONDS_PER_MILLISECOND;return(h+=12)>23&&(h-=24),n&&(O+=1),a.e(t)?(t.year=y,t.month=p,t.day=d,t.hour=h,t.minute=w,t.second=O,t.millisecond=b,t.isLeapSecond=n,t):new V(y,p,d,h,w,O,b,n)},we.toDate=function(e){if(!a.e(e))throw new o.t("julianDate is required.");var t=we.toGregorianDate(e,K),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))},we.toIso8601=function(e,t){if(!a.e(e))throw new o.t("julianDate is required.");var n=we.toGregorianDate(e,K),r=n.year,i=n.month,s=n.day,u=n.hour,l=n.minute,c=n.second,f=n.millisecond;return 1e4===r&&1===i&&1===s&&0===u&&0===l&&0===c&&0===f&&(r=9999,i=12,s=31,u=24),a.e(t)||0===f?a.e(t)&&0!==t?Z("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",r,i,s,u,l,c,(.01*f).toFixed(t).replace(".","").slice(0,t)):Z("%04d-%02d-%02dT%02d:%02d:%02dZ",r,i,s,u,l,c):Z("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",r,i,s,u,l,c,(.01*f).toString().replace(".",""))},we.clone=function(e,t){if(a.e(e))return a.e(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new we(e.dayNumber,e.secondsOfDay,Q.TAI)},we.compare=function(e,t){if(!a.e(e))throw new o.t("left is required.");if(!a.e(t))throw new o.t("right is required.");var n=e.dayNumber-t.dayNumber;return 0!==n?n:e.secondsOfDay-t.secondsOfDay},we.equals=function(e,t){return e===t||a.e(e)&&a.e(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},we.equalsEpsilon=function(e,t,n){if(!a.e(n))throw new o.t("epsilon is required.");return e===t||a.e(e)&&a.e(t)&&Math.abs(we.secondsDifference(e,t))<=n},we.totalDays=function(e){if(!a.e(e))throw new o.t("julianDate is required.");return e.dayNumber+e.secondsOfDay/H.SECONDS_PER_DAY},we.secondsDifference=function(e,t){if(!a.e(e))throw new o.t("left is required.");if(!a.e(t))throw new o.t("right is required.");return(e.dayNumber-t.dayNumber)*H.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},we.daysDifference=function(e,t){if(!a.e(e))throw new o.t("left is required.");if(!a.e(t))throw new o.t("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/H.SECONDS_PER_DAY},we.computeTaiMinusUtc=function(e){ne.julianDate=e;var t=we.leapSeconds,n=B(t,ne,te);return n<0&&(n=~n,--n<0&&(n=0)),t[n].offset},we.addSeconds=function(e,t,n){if(!a.e(e))throw new o.t("julianDate is required.");if(!a.e(t))throw new o.t("seconds is required.");if(!a.e(n))throw new o.t("result is required.");return ae(e.dayNumber,e.secondsOfDay+t,n)},we.addMinutes=function(e,t,n){if(!a.e(e))throw new o.t("julianDate is required.");if(!a.e(t))throw new o.t("minutes is required.");if(!a.e(n))throw new o.t("result is required.");var r=e.secondsOfDay+t*H.SECONDS_PER_MINUTE;return ae(e.dayNumber,r,n)},we.addHours=function(e,t,n){if(!a.e(e))throw new o.t("julianDate is required.");if(!a.e(t))throw new o.t("hours is required.");if(!a.e(n))throw new o.t("result is required.");var r=e.secondsOfDay+t*H.SECONDS_PER_HOUR;return ae(e.dayNumber,r,n)},we.addDays=function(e,t,n){if(!a.e(e))throw new o.t("julianDate is required.");if(!a.e(t))throw new o.t("days is required.");if(!a.e(n))throw new o.t("result is required.");return ae(e.dayNumber+t,e.secondsOfDay,n)},we.lessThan=function(e,t){return we.compare(e,t)<0},we.lessThanOrEquals=function(e,t){return we.compare(e,t)<=0},we.greaterThan=function(e,t){return we.compare(e,t)>0},we.greaterThanOrEquals=function(e,t){return we.compare(e,t)>=0},we.prototype.clone=function(e){return we.clone(this,e)},we.prototype.equals=function(e){return we.equals(this,e)},we.prototype.equalsEpsilon=function(e,t){return we.equalsEpsilon(this,e,t)},we.prototype.toString=function(){return we.toIso8601(this)},we.leapSeconds=[new X(new we(2441317,43210,Q.TAI),10),new X(new we(2441499,43211,Q.TAI),11),new X(new we(2441683,43212,Q.TAI),12),new X(new we(2442048,43213,Q.TAI),13),new X(new we(2442413,43214,Q.TAI),14),new X(new we(2442778,43215,Q.TAI),15),new X(new we(2443144,43216,Q.TAI),16),new X(new we(2443509,43217,Q.TAI),17),new X(new we(2443874,43218,Q.TAI),18),new X(new we(2444239,43219,Q.TAI),19),new X(new we(2444786,43220,Q.TAI),20),new X(new we(2445151,43221,Q.TAI),21),new X(new we(2445516,43222,Q.TAI),22),new X(new we(2446247,43223,Q.TAI),23),new X(new we(2447161,43224,Q.TAI),24),new X(new we(2447892,43225,Q.TAI),25),new X(new we(2448257,43226,Q.TAI),26),new X(new we(2448804,43227,Q.TAI),27),new X(new we(2449169,43228,Q.TAI),28),new X(new we(2449534,43229,Q.TAI),29),new X(new we(2450083,43230,Q.TAI),30),new X(new we(2450630,43231,Q.TAI),31),new X(new we(2451179,43232,Q.TAI),32),new X(new we(2453736,43233,Q.TAI),33),new X(new we(2454832,43234,Q.TAI),34),new X(new we(2456109,43235,Q.TAI),35),new X(new we(2457204,43236,Q.TAI),36),new X(new we(2457754,43237,Q.TAI),37)],be.NONE=Object.freeze({getPromiseToLoad:function(){return a.o()},compute:function(e,t){return a.e(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new G(0,0,0,0,0),t}}),be.prototype.getPromiseToLoad=function(){return a.o(this._downloadPromise)},be.prototype.compute=function(e,t){if(a.e(this._samples)){if(a.e(t)||(t=new G(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;var n=this._dates,r=this._lastIndex,o=0,i=0;if(a.e(r)){var s=n[r],u=n[r+1],l=we.lessThanOrEquals(s,e),f=!a.e(u),d=f||we.greaterThanOrEquals(u,e);if(l&&d)return o=r,!f&&u.equals(e)&&++o,i=o+1,Te(this,n,this._samples,e,o,i,t),t}var p=B(n,e,we.compare,this._dateColumn);return p>=0?(p<n.length-1&&n[p+1].equals(e)&&++p,o=p,i=p):(o=(i=~p)-1)<0&&(o=0),this._lastIndex=o,Te(this,n,this._samples,e,o,i,t),t}if(a.e(this._dataError))throw new c.t(this._dataError)},Se.fromQuaternion=function(e,t){if(!a.e(e))throw new o.t("quaternion is required");a.e(t)||(t=new Se);var n=2*(e.w*e.y-e.z*e.x),r=1-2*(e.x*e.x+e.y*e.y),i=2*(e.w*e.x+e.y*e.z),u=1-2*(e.y*e.y+e.z*e.z),l=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(l,u),t.roll=Math.atan2(i,r),t.pitch=-s.e.asinClamped(n),t},Se.fromDegrees=function(e,t,n,r){if(!a.e(e))throw new o.t("heading is required");if(!a.e(t))throw new o.t("pitch is required");if(!a.e(n))throw new o.t("roll is required");return a.e(r)||(r=new Se),r.heading=e*s.e.RADIANS_PER_DEGREE,r.pitch=t*s.e.RADIANS_PER_DEGREE,r.roll=n*s.e.RADIANS_PER_DEGREE,r},Se.clone=function(e,t){if(a.e(e))return a.e(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new Se(e.heading,e.pitch,e.roll)},Se.equals=function(e,t){return e===t||a.e(e)&&a.e(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},Se.equalsEpsilon=function(e,t,n,r){return e===t||a.e(e)&&a.e(t)&&s.e.equalsEpsilon(e.heading,t.heading,n,r)&&s.e.equalsEpsilon(e.pitch,t.pitch,n,r)&&s.e.equalsEpsilon(e.roll,t.roll,n,r)},Se.prototype.clone=function(e){return Se.clone(this,e)},Se.prototype.equals=function(e){return Se.equals(this,e)},Se.prototype.equalsEpsilon=function(e,t,n){return Se.equalsEpsilon(this,e,t,n)},Se.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var Pe=new we(0,0,Q.TAI);function Ne(e,t,n){var r=Pe;return r.dayNumber=t,r.secondsOfDay=n,we.daysDifference(r,e._sampleZeroDateTT)}function Ce(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];var n=a.o.defer();e._chunkDownloadsInProgress[t]=n;var r,o=e._xysFileUrlTemplate;return r=a.e(o)?o.getDerivedResource({templateValues:{0:t}}):new l.t({url:l.n$1("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")}),a.o(r.fetchJson(),(function(r){e._chunkDownloadsInProgress[t]=!1;for(var o=e._samples,a=r.samples,i=t*e._samplesPerXysFile*3,s=0,u=a.length;s<u;++s)o[i+s]=a[s];n.resolve()})),n.promise}De.prototype.preload=function(e,t,n,r){var o=Ne(this,e,t),i=Ne(this,n,r),s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);var u=i/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;u>=this._totalSamples&&(u=this._totalSamples-1);for(var l=s/this._samplesPerXysFile|0,c=u/this._samplesPerXysFile|0,f=[],d=l;d<=c;++d)f.push(Ce(this,d));return a.o.all(f)},De.prototype.computeXysRadians=function(e,t,n){var r=Ne(this,e,t);if(!(r<0)){var o=r/this._stepSizeDays|0;if(!(o>=this._totalSamples)){var i=this._interpolationOrder,s=o-(i/2|0);s<0&&(s=0);var u=s+i;u>=this._totalSamples&&((s=(u=this._totalSamples-1)-i)<0&&(s=0));var l=!1,c=this._samples;if(a.e(c[3*s])||(Ce(this,s/this._samplesPerXysFile|0),l=!0),a.e(c[3*u])||(Ce(this,u/this._samplesPerXysFile|0),l=!0),!l){a.e(n)?(n.x=0,n.y=0,n.s=0):n=new ge(0,0,0);var f,d,p=r-s*this._stepSizeDays,y=this._work,h=this._denominators,m=this._coef,w=this._xTable;for(f=0;f<=i;++f)y[f]=p-w[f];for(f=0;f<=i;++f){for(m[f]=1,d=0;d<=i;++d)d!==f&&(m[f]*=y[d]);m[f]*=h[f];var O=3*(s+f);n.x+=m[f]*c[O++],n.y+=m[f]*c[O++],n.s+=m[f]*c[O]}return n}}}};var Ie={},je={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},Re={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Me={},Ae={east:new n.o,north:new n.o,up:new n.o,west:new n.o,south:new n.o,down:new n.o},qe=new n.o,Ue=new n.o,ze=new n.o;Ie.localFrameToFixedFrameGenerator=function(e,r){if(!je.hasOwnProperty(e)||!je[e].hasOwnProperty(r))throw new o.t("firstAxis and secondAxis must be east, north, up, west, south or down.");var u,l=je[e][r],c=e+r;return a.e(Me[c])?u=Me[c]:(u=function(u,c,f){if(!a.e(u))throw new o.t("origin is required.");if(a.e(f)||(f=new i.p),n.o.equalsEpsilon(u,n.o.ZERO,s.e.EPSILON14))n.o.unpack(Re[e],0,qe),n.o.unpack(Re[r],0,Ue),n.o.unpack(Re[l],0,ze);else if(s.e.equalsEpsilon(u.x,0,s.e.EPSILON14)&&s.e.equalsEpsilon(u.y,0,s.e.EPSILON14)){var d=s.e.sign(u.z);n.o.unpack(Re[e],0,qe),"east"!==e&&"west"!==e&&n.o.multiplyByScalar(qe,d,qe),n.o.unpack(Re[r],0,Ue),"east"!==r&&"west"!==r&&n.o.multiplyByScalar(Ue,d,Ue),n.o.unpack(Re[l],0,ze),"east"!==l&&"west"!==l&&n.o.multiplyByScalar(ze,d,ze)}else{(c=a.u(c,t.t.WGS84)).geodeticSurfaceNormal(u,Ae.up);var p=Ae.up,y=Ae.east;y.x=-u.y,y.y=u.x,y.z=0,n.o.normalize(y,Ae.east),n.o.cross(p,y,Ae.north),n.o.multiplyByScalar(Ae.up,-1,Ae.down),n.o.multiplyByScalar(Ae.east,-1,Ae.west),n.o.multiplyByScalar(Ae.north,-1,Ae.south),qe=Ae[e],Ue=Ae[r],ze=Ae[l]}return f[0]=qe.x,f[1]=qe.y,f[2]=qe.z,f[3]=0,f[4]=Ue.x,f[5]=Ue.y,f[6]=Ue.z,f[7]=0,f[8]=ze.x,f[9]=ze.y,f[10]=ze.z,f[11]=0,f[12]=u.x,f[13]=u.y,f[14]=u.z,f[15]=1,f},Me[c]=u),u},Ie.eastNorthUpToFixedFrame=Ie.localFrameToFixedFrameGenerator("east","north"),Ie.northEastDownToFixedFrame=Ie.localFrameToFixedFrameGenerator("north","east"),Ie.northUpEastToFixedFrame=Ie.localFrameToFixedFrameGenerator("north","up"),Ie.northWestUpToFixedFrame=Ie.localFrameToFixedFrameGenerator("north","west");var Fe=new h,We=new n.o(1,1,1),Le=new i.p;Ie.headingPitchRollToFixedFrame=function(e,t,r,s,u){o.o.typeOf.object("HeadingPitchRoll",t),s=a.u(s,Ie.eastNorthUpToFixedFrame);var l=h.fromHeadingPitchRoll(t,Fe),c=i.p.fromTranslationQuaternionRotationScale(n.o.ZERO,l,We,Le);return u=s(e,r,u),i.p.multiply(u,c,u)};var $e=new i.p,ke=new i.p$1;Ie.headingPitchRollQuaternion=function(e,t,n,r,a){o.o.typeOf.object("HeadingPitchRoll",t);var s=Ie.headingPitchRollToFixedFrame(e,t,n,r,$e),u=i.p.getMatrix3(s,ke);return h.fromRotationMatrix(u,a)};var Ye=new n.o(1,1,1),Be=new n.o,Ge=new i.p,Ze=new i.p,Ve=new i.p$1,Je=new h;Ie.fixedFrameToHeadingPitchRoll=function(e,r,s,u){o.o.defined("transform",e),r=a.u(r,t.t.WGS84),s=a.u(s,Ie.eastNorthUpToFixedFrame),a.e(u)||(u=new Se);var l=i.p.getTranslation(e,Be);if(n.o.equals(l,n.o.ZERO))return u.heading=0,u.pitch=0,u.roll=0,u;var c=i.p.inverseTransformation(s(l,r,Ge),Ge),f=i.p.setScale(e,Ye,Ze);f=i.p.setTranslation(f,n.o.ZERO,f),c=i.p.multiply(c,f,c);var d=h.fromRotationMatrix(i.p.getMatrix3(c,Ve),Je);return d=h.normalize(d,d),Se.fromQuaternion(d,u)};var Xe=s.e.TWO_PI/86400,He=new we;Ie.computeTemeToPseudoFixedMatrix=function(e,t){if(!a.e(e))throw new o.t("date is required.");var n,r=(He=we.addSeconds(e,-we.computeTaiMinusUtc(e),He)).dayNumber,u=He.secondsOfDay,l=r-2451545,c=(24110.54841+(n=u>=43200?(l+.5)/H.DAYS_PER_JULIAN_CENTURY:(l-.5)/H.DAYS_PER_JULIAN_CENTURY)*(8640184.812866+n*(.093104+-62e-7*n)))*Xe%s.e.TWO_PI+(72921158553e-15+11772758384668e-32*(r-2451545.5))*((u+.5*H.SECONDS_PER_DAY)%H.SECONDS_PER_DAY),f=Math.cos(c),d=Math.sin(c);return a.e(t)?(t[0]=f,t[1]=-d,t[2]=0,t[3]=d,t[4]=f,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new i.p$1(f,d,0,-d,f,0,0,0,1)},Ie.iau2006XysData=new De,Ie.earthOrientationParameters=be.NONE;var Qe=32.184;Ie.preloadIcrfFixed=function(e){var t=e.start.dayNumber,n=e.start.secondsOfDay+Qe,r=e.stop.dayNumber,o=e.stop.secondsOfDay+Qe,i=Ie.iau2006XysData.preload(t,n,r,o),s=Ie.earthOrientationParameters.getPromiseToLoad();return a.o.all([i,s])},Ie.computeIcrfToFixedMatrix=function(e,t){if(!a.e(e))throw new o.t("date is required.");a.e(t)||(t=new i.p$1);var n=Ie.computeFixedToIcrfMatrix(e,t);if(a.e(n))return i.p$1.transpose(n,t)};var Ke=new ge(0,0,0),et=new G(0,0,0,0,0,0),tt=new i.p$1,nt=new i.p$1;Ie.computeFixedToIcrfMatrix=function(e,t){if(!a.e(e))throw new o.t("date is required.");a.e(t)||(t=new i.p$1);var n=Ie.earthOrientationParameters.compute(e,et);if(a.e(n)){var r=e.dayNumber,u=e.secondsOfDay+Qe,l=Ie.iau2006XysData.computeXysRadians(r,u,Ke);if(a.e(l)){var c=l.x+n.xPoleOffset,f=l.y+n.yPoleOffset,d=1/(1+Math.sqrt(1-c*c-f*f)),p=tt;p[0]=1-d*c*c,p[3]=-d*c*f,p[6]=c,p[1]=-d*c*f,p[4]=1-d*f*f,p[7]=f,p[2]=-c,p[5]=-f,p[8]=1-d*(c*c+f*f);var y=i.p$1.fromRotationZ(-l.s,nt),h=i.p$1.multiply(p,y,tt),m=e.dayNumber-2451545,w=(e.secondsOfDay-we.computeTaiMinusUtc(e)+n.ut1MinusUtc)/H.SECONDS_PER_DAY,O=.779057273264+w+.00273781191135448*(m+w);O=O%1*s.e.TWO_PI;var b=i.p$1.fromRotationZ(O,nt),x=i.p$1.multiply(h,b,tt),E=Math.cos(n.xPoleWander),_=Math.cos(n.yPoleWander),v=Math.sin(n.xPoleWander),T=Math.sin(n.yPoleWander),S=r-2451545+u/H.SECONDS_PER_DAY,g=-47e-6*(S/=36525)*s.e.RADIANS_PER_DEGREE/3600,D=Math.cos(g),P=Math.sin(g),N=nt;return N[0]=E*D,N[1]=E*P,N[2]=v,N[3]=-_*P+T*v*D,N[4]=_*D+T*v*P,N[5]=-T*E,N[6]=-T*P-_*v*D,N[7]=T*D-_*v*P,N[8]=_*E,i.p$1.multiply(x,N,t)}}};var rt=new u.e;Ie.pointToWindowCoordinates=function(e,t,n,r){return(r=Ie.pointToGLWindowCoordinates(e,t,n,r)).y=2*t[5]-r.y,r},Ie.pointToGLWindowCoordinates=function(e,n,r,s){if(!a.e(e))throw new o.t("modelViewProjectionMatrix is required.");if(!a.e(n))throw new o.t("viewportTransformation is required.");if(!a.e(r))throw new o.t("point is required.");a.e(s)||(s=new t.o);var l=rt;return i.p.multiplyByVector(e,u.e.fromElements(r.x,r.y,r.z,1,l),l),u.e.multiplyByScalar(l,1/l.w,l),i.p.multiplyByVector(n,l,l),t.o.fromCartesian4(l,s)};var ot=new n.o,at=new n.o,it=new n.o;Ie.rotationMatrixFromPositionVelocity=function(e,r,u,l){if(!a.e(e))throw new o.t("position is required.");if(!a.e(r))throw new o.t("velocity is required.");var c=a.u(u,t.t.WGS84).geodeticSurfaceNormal(e,ot),f=n.o.cross(r,c,at);n.o.equalsEpsilon(f,n.o.ZERO,s.e.EPSILON6)&&(f=n.o.clone(n.o.UNIT_X,f));var d=n.o.cross(f,r,it);return n.o.normalize(d,d),n.o.cross(r,d,f),n.o.negate(f,f),n.o.normalize(f,f),a.e(l)||(l=new i.p$1),l[0]=r.x,l[1]=r.y,l[2]=r.z,l[3]=f.x,l[4]=f.y,l[5]=f.z,l[6]=d.x,l[7]=d.y,l[8]=d.z,l};var st=new i.p(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),ut=new r.a,lt=new n.o,ct=new n.o,ft=new i.p$1,dt=new i.p,pt=new i.p;function yt(e){e=a.u(e,a.u.EMPTY_OBJECT),o.o.typeOf.object("options.attributes",e.attributes),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=a.u(e.primitiveType,i._0x3b3836.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=a.u(e.geometryType,f.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}Ie.basisTo2D=function(e,t,r){if(!a.e(e))throw new o.t("projection is required.");if(!a.e(t))throw new o.t("matrix is required.");if(!a.e(r))throw new o.t("result is required.");var s=i.p.getTranslation(t,ct),u=e.ellipsoid,l=u.cartesianToCartographic(s,ut),c=e.project(l,lt);n.o.fromElements(c.z,c.x,c.y,c);var f=Ie.eastNorthUpToFixedFrame(s,u,dt),d=i.p.inverseTransformation(f,pt),p=i.p.getMatrix3(t,ft),y=i.p.multiplyByMatrix3(d,p,r);return i.p.multiply(st,y,r),i.p.setTranslation(r,c,r),r},Ie.wgs84To2DModelMatrix=function(e,t,r){if(!a.e(e))throw new o.t("projection is required.");if(!a.e(t))throw new o.t("center is required.");if(!a.e(r))throw new o.t("result is required.");var s=e.ellipsoid,u=Ie.eastNorthUpToFixedFrame(t,s,dt),l=i.p.inverseTransformation(u,pt),c=s.cartesianToCartographic(t,ut),f=e.project(c,lt);n.o.fromElements(f.z,f.x,f.y,f);var d=i.p.fromTranslation(f,dt);return i.p.multiply(st,l,r),i.p.multiply(d,r,r),r},Ie.buildUp=function(e,t){var r=t.clone(),o=e.clone();o=n.o.normalize(o,o),Math.abs(n.o.dot(o,r))>=1&&(o=Math.abs(n.o.dot(r,n.o.UNIT_Y))<1?n.o.clone(n.o.UNIT_Y,o):n.o.clone(n.o.UNIT_Z,o));var a=new n.o;return n.o.cross(o,r,a),a=n.o.normalize(a,a),n.o.cross(r,a,o),o=n.o.normalize(o,o)},Ie.getHeading=function(e,t){var n;return n=s.e.equalsEpsilon(Math.abs(e.z),1,s.e.EPSILON3)?Math.atan2(t.y,t.x)-s.e.PI_OVER_TWO:Math.atan2(e.y,e.x)-s.e.PI_OVER_TWO,s.e.TWO_PI-s.e.zeroToTwoPi(n)},Ie.convertToColumbusCartesian=function(e){var t=new l.n,o=t.ellipsoid,a=new n.o,i=new r.a;return o.cartesianToCartographic(e,i),t.project(i,a),n.o.fromElements(a.z,a.x,a.y)},Ie.convertTo3DCartesian=function(e){var t=new l.n,o=t.ellipsoid,a=new n.o,i=new r.a;return a=n.o.fromElements(e.y,e.z,e.x),t.unproject(a,i),o.cartographicToCartesian(i,a)},yt.computeNumberOfVertices=function(e){o.o.typeOf.object("geometry",e);var t=-1;for(var n in e.attributes)if(e.attributes.hasOwnProperty(n)&&a.e(e.attributes[n])&&a.e(e.attributes[n].values)){var r=e.attributes[n];if(r.isInstanceAttribute)continue;var i=r.values.length/r.componentsPerAttribute;if(t!==i&&-1!==t)throw new o.t("All attribute lists must have the same number of attributes.");t=i}return t};var ht=new r.a,mt=new n.o,wt=new i.p,Ot=[new r.a,new r.a,new r.a],bt=[new t.o,new t.o,new t.o],xt=[new t.o,new t.o,new t.o],Et=new n.o,_t=new h,vt=new i.p,Tt=new d;yt._textureCoordinateRotationPoints=function(e,o,a,s){var u,l=t.h.center(s,ht),c=r.a.toCartesian(l,a,mt),f=Ie.eastNorthUpToFixedFrame(c,a,wt),p=i.p.inverse(f,wt),y=bt,m=Ot;m[0].longitude=s.west,m[0].latitude=s.south,m[1].longitude=s.west,m[1].latitude=s.north,m[2].longitude=s.east,m[2].latitude=s.south;var w=Et;for(u=0;u<3;u++)r.a.toCartesian(m[u],a,w),w=i.p.multiplyByPointAsVector(p,w,w),y[u].x=w.x,y[u].y=w.y;var O=h.fromAxisAngle(n.o.UNIT_Z,-o,_t),b=i.p$1.fromQuaternion(O,vt),x=e.length,E=Number.POSITIVE_INFINITY,_=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,T=Number.NEGATIVE_INFINITY;for(u=0;u<x;u++)w=i.p.multiplyByPointAsVector(p,e[u],w),w=i.p$1.multiplyByVector(b,w,w),E=Math.min(E,w.x),_=Math.min(_,w.y),v=Math.max(v,w.x),T=Math.max(T,w.y);var S=d.fromRotation(o,Tt),g=xt;g[0].x=E,g[0].y=_,g[1].x=E,g[1].y=T,g[2].x=v,g[2].y=_;var D=y[0],P=y[2].x-D.x,N=y[1].y-D.y;for(u=0;u<3;u++){var C=g[u];d.multiplyByVector(S,C,C),C.x=(C.x-D.x)/P,C.y=(C.y-D.y)/N}var I=g[0],j=g[1],R=g[2],M=new Array(6);return t.o.pack(I,M),t.o.pack(j,M,2),t.o.pack(R,M,4),M},e.I=yt,e.Me=f,e.f=d,e.m=Ie,e.n=h,e.o=function(e){if(e=a.u(e,a.u.EMPTY_OBJECT),!a.e(e.componentDatatype))throw new o.t("options.componentDatatype is required.");if(!a.e(e.componentsPerAttribute))throw new o.t("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new o.t("options.componentsPerAttribute must be between 1 and 4.");if(!a.e(e.values))throw new o.t("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=a.u(e.normalize,!1),this.values=e.values}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/GeometryInstance-3190c1b4.js b/SuperMap iEarth/public/SuperMap3D/Workers/GeometryInstance-20be787d.js similarity index 86% rename from SuperMap iEarth/public/SuperMap3D/Workers/GeometryInstance-3190c1b4.js rename to SuperMap iEarth/public/SuperMap3D/Workers/GeometryInstance-20be787d.js index 09cde2dd..b0a82ffd 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/GeometryInstance-3190c1b4.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/GeometryInstance-20be787d.js @@ -1 +1 @@ -define(["exports","./when-92c6cf3c","./Check-52a7d806","./FeatureDetection-cec0163f"],(function(e,t,i,r){"use strict";e.d=function(e){if(e=t.u(e,t.u.EMPTY_OBJECT),!t.e(e.geometry))throw new i.t("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=r.p.clone(t.u(e.modelMatrix,r.p.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=t.u(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}})); +define(["exports","./when-92c6cf3c","./Check-52a7d806","./FeatureDetection-fd297af4"],(function(e,t,i,r){"use strict";e.d=function(e){if(e=t.u(e,t.u.EMPTY_OBJECT),!t.e(e.geometry))throw new i.t("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=r.p.clone(t.u(e.modelMatrix,r.p.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=t.u(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/GeometryPipeline-7ffd3f60.js b/SuperMap iEarth/public/SuperMap3D/Workers/GeometryPipeline-50805727.js similarity index 94% rename from SuperMap iEarth/public/SuperMap3D/Workers/GeometryPipeline-7ffd3f60.js rename to SuperMap iEarth/public/SuperMap3D/Workers/GeometryPipeline-50805727.js index dca10488..88c9b81d 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/GeometryPipeline-7ffd3f60.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/GeometryPipeline-50805727.js @@ -1 +1 @@ -define(["exports","./AttributeCompression-b5a80a71","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./Math-ecf82623","./buildModuleUrl-9eef8841","./Cartesian4-72b88c9e","./Cartographic-a2c313d7","./ComponentDatatype-98414d16","./EncodedCartesian3-4f120b1b","./GeometryAttribute-f47bd1cb","./IndexDatatype-86677ec4","./IntersectionTests-6e80d61c","./FeatureDetection-cec0163f","./Plane-33393da8"],(function(e,t,r,i,o,n,a,s,u,p,l,v,c,y,m,f,h){"use strict";var d=new i.o,b=new i.o,w=new i.o;function g(e,t,s,u,p){var l,v,c,y,m,f,h,g;if(o.o.defined("point",e),o.o.defined("p0",t),o.o.defined("p1",s),o.o.defined("p2",u),n.e(p)||(p=new i.o),n.e(t.z)){if(i.o.equalsEpsilon(e,t,a.e.EPSILON14))return i.o.clone(i.o.UNIT_X,p);if(i.o.equalsEpsilon(e,s,a.e.EPSILON14))return i.o.clone(i.o.UNIT_Y,p);if(i.o.equalsEpsilon(e,u,a.e.EPSILON14))return i.o.clone(i.o.UNIT_Z,p);l=i.o.subtract(s,t,d),v=i.o.subtract(u,t,b),c=i.o.subtract(e,t,w),y=i.o.dot(l,l),m=i.o.dot(l,v),f=i.o.dot(l,c),h=i.o.dot(v,v),g=i.o.dot(v,c)}else{if(r.o.equalsEpsilon(e,t,a.e.EPSILON14))return i.o.clone(i.o.UNIT_X,p);if(r.o.equalsEpsilon(e,s,a.e.EPSILON14))return i.o.clone(i.o.UNIT_Y,p);if(r.o.equalsEpsilon(e,u,a.e.EPSILON14))return i.o.clone(i.o.UNIT_Z,p);l=r.o.subtract(s,t,d),v=r.o.subtract(u,t,b),c=r.o.subtract(e,t,w),y=r.o.dot(l,l),m=r.o.dot(l,v),f=r.o.dot(l,c),h=r.o.dot(v,v),g=r.o.dot(v,c)}p.y=h*f-m*g,p.z=y*g-m*f;var x=y*h-m*m;return 0!==p.y&&(p.y/=x),0!==p.z&&(p.z/=x),p.x=1-p.y-p.z,p}var x={calculateACMR:function(e){var t=(e=n.u(e,n.u.EMPTY_OBJECT)).indices,r=e.maximumIndex,i=n.u(e.cacheSize,24);if(!n.e(t))throw new o.t("indices is required.");var a=t.length;if(a<3||a%3!=0)throw new o.t("indices length must be a multiple of three.");if(r<=0)throw new o.t("maximumIndex must be greater than zero.");if(i<3)throw new o.t("cacheSize must be greater than two.");if(!n.e(r)){r=0;for(var s=0,u=t[s];s<a;)u>r&&(r=u),u=t[++s]}for(var p=[],l=0;l<r+1;l++)p[l]=0;for(var v=i+1,c=0;c<a;++c)v-p[t[c]]>i&&(p[t[c]]=v,++v);return(v-i+1)/(a/3)}};x.tipsify=function(e){var t,r=(e=n.u(e,n.u.EMPTY_OBJECT)).indices,i=e.maximumIndex,a=n.u(e.cacheSize,24);function s(e,r,i,o,n,a,s){for(var u,p=-1,l=-1,v=0;v<i.length;){var c=i[v];o[c].numLiveTriangles&&(u=0,n-o[c].timeStamp+2*o[c].numLiveTriangles<=r&&(u=n-o[c].timeStamp),(u>l||-1===l)&&(l=u,p=c)),++v}return-1===p?function(e,r,i,o){for(;r.length>=1;){var n=r[r.length-1];if(r.splice(r.length-1,1),e[n].numLiveTriangles>0)return n}for(;t<o;){if(e[t].numLiveTriangles>0)return++t-1;++t}return-1}(o,a,0,s):p}if(!n.e(r))throw new o.t("indices is required.");var u=r.length;if(u<3||u%3!=0)throw new o.t("indices length must be a multiple of three.");if(i<=0)throw new o.t("maximumIndex must be greater than zero.");if(a<3)throw new o.t("cacheSize must be greater than two.");var p=0,l=0,v=r[l],c=u;if(n.e(i))p=i+1;else{for(;l<c;)v>p&&(p=v),v=r[++l];if(-1===p)return 0;++p}var y,m=[];for(y=0;y<p;y++)m[y]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};l=0;for(var f=0;l<c;)m[r[l]].vertexTriangles.push(f),++m[r[l]].numLiveTriangles,m[r[l+1]].vertexTriangles.push(f),++m[r[l+1]].numLiveTriangles,m[r[l+2]].vertexTriangles.push(f),++m[r[l+2]].numLiveTriangles,++f,l+=3;var h=0,d=a+1;t=1;var b,w,g,x,T=[],A=[],I=0,S=[],N=u/3,P=[];for(y=0;y<N;y++)P[y]=!1;for(;-1!==h;){T=[],x=(w=m[h]).vertexTriangles.length;for(var E=0;E<x;++E)if(!P[f=w.vertexTriangles[E]]){P[f]=!0,l=f+f+f;for(var O=0;O<3;++O)g=r[l],T.push(g),A.push(g),S[I]=g,++I,--(b=m[g]).numLiveTriangles,d-b.timeStamp>a&&(b.timeStamp=d,++d),++l}h=s(0,a,T,m,d,A,p)}return S};var T={};function A(e,t,r,i,o){e[t++]=r,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=r}function I(e){var t={};for(var r in e)if(e.hasOwnProperty(r)&&n.e(e[r])&&n.e(e[r].values)){var i=e[r];t[r]=new c.o({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function S(e,t,r){for(var i in t)if(t.hasOwnProperty(i)&&n.e(t[i])&&n.e(t[i].values))for(var o=t[i],a=0;a<o.componentsPerAttribute;++a)e[i].values.push(o.values[r*o.componentsPerAttribute+a])}T.toWireframe=function(e){if(!n.e(e))throw new o.t("geometry is required.");var t=e.indices;if(n.e(t)){switch(e.primitiveType){case f._0x4b6a27.TRIANGLES:e.indices=function(e){for(var t=e.length,r=t/3*6,i=y.IndexDatatype.createTypedArray(t,r),o=0,n=0;n<t;n+=3,o+=6)A(i,o,e[n],e[n+1],e[n+2]);return i}(t);break;case f._0x4b6a27.TRIANGLE_STRIP:e.indices=function(e){var t=e.length;if(t>=3){var r=6*(t-2),i=y.IndexDatatype.createTypedArray(t,r);A(i,0,e[0],e[1],e[2]);for(var o=6,n=3;n<t;++n,o+=6)A(i,o,e[n-1],e[n],e[n-2]);return i}return new Uint16Array}(t);break;case f._0x4b6a27.TRIANGLE_FAN:e.indices=function(e){if(e.length>0){for(var t=e.length-1,r=6*(t-1),i=y.IndexDatatype.createTypedArray(t,r),o=e[0],n=0,a=1;a<t;++a,n+=6)A(i,n,o,e[a],e[a+1]);return i}return new Uint16Array}(t);break;default:throw new o.t("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}e.primitiveType=f._0x4b6a27.LINES}return e},T.createLineSegmentsForVectors=function(e,t,r){if(t=n.u(t,"normal"),!n.e(e))throw new o.t("geometry is required.");if(!n.e(e.attributes.position))throw new o.t("geometry.attributes.position is required.");if(!n.e(e.attributes[t]))throw new o.t("geometry.attributes must have an attribute with the same name as the attributeName parameter, "+t+".");r=n.u(r,1e4);for(var i=e.attributes.position.values,a=e.attributes[t].values,u=i.length,p=new Float64Array(2*u),v=0,y=0;y<u;y+=3)p[v++]=i[y],p[v++]=i[y+1],p[v++]=i[y+2],p[v++]=i[y]+a[y]*r,p[v++]=i[y+1]+a[y+1]*r,p[v++]=i[y+2]+a[y+2]*r;var m,h=e.boundingSphere;return n.e(h)&&(m=new s.i(h.center,h.radius+r)),new c.I({attributes:{position:new c.o({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})},primitiveType:f._0x4b6a27.LINES,boundingSphere:m})},T.createAttributeLocations=function(e){if(!n.e(e))throw new o.t("geometry is required.");var t,r=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],i=e.attributes,a={},s=0,u=r.length;for(t=0;t<u;++t){var p=r[t];n.e(i[p])&&(a[p]=s++)}for(var l in i)i.hasOwnProperty(l)&&!n.e(a[l])&&(a[l]=s++);return a},T.reorderForPreVertexCache=function(e){if(!n.e(e))throw new o.t("geometry is required.");var t=c.I.computeNumberOfVertices(e),r=e.indices;if(n.e(r)){for(var i=new Int32Array(t),a=0;a<t;a++)i[a]=-1;for(var s,u=r,p=u.length,v=y.IndexDatatype.createTypedArray(t,p),m=0,f=0,h=0;m<p;)-1!==(s=i[u[m]])?v[f]=s:(i[s=u[m]]=h,v[f]=h,++h),++m,++f;e.indices=v;var d=e.attributes;for(var b in d)if(d.hasOwnProperty(b)&&n.e(d[b])&&n.e(d[b].values)){for(var w=d[b],g=w.values,x=0,T=w.componentsPerAttribute,A=l.ComponentDatatype.createTypedArray(w.componentDatatype,h*T);x<t;){var I=i[x];if(-1!==I)for(var S=0;S<T;S++)A[T*I+S]=g[T*x+S];++x}w.values=A}}return e},T.reorderForPostVertexCache=function(e,t){if(!n.e(e))throw new o.t("geometry is required.");var r=e.indices;if(e.primitiveType===f._0x4b6a27.TRIANGLES&&n.e(r)){for(var i=r.length,a=0,s=0;s<i;s++)r[s]>a&&(a=r[s]);e.indices=x.tipsify({indices:r,maximumIndex:a,cacheSize:t})}return e},T.fitToUnsignedShortIndices=function(e){if(!n.e(e))throw new o.t("geometry is required.");if(n.e(e.indices)&&e.primitiveType!==f._0x4b6a27.TRIANGLES&&e.primitiveType!==f._0x4b6a27.LINES&&e.primitiveType!==f._0x4b6a27.POINTS)throw new o.t("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");var t=[],r=c.I.computeNumberOfVertices(e);if(n.e(e.indices)&&r>=a.e.SIXTY_FOUR_KILOBYTES){var i,s=[],u=[],p=0,l=I(e.attributes),v=e.indices,y=v.length;e.primitiveType===f._0x4b6a27.TRIANGLES?i=3:e.primitiveType===f._0x4b6a27.LINES?i=2:e.primitiveType===f._0x4b6a27.POINTS&&(i=1);for(var m=0;m<y;m+=i){for(var h=0;h<i;++h){var d=v[m+h],b=s[d];n.e(b)||(b=p++,s[d]=b,S(l,e.attributes,d)),u.push(b)}p+i>=a.e.SIXTY_FOUR_KILOBYTES&&(t.push(new c.I({attributes:l,indices:u,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),s=[],u=[],p=0,l=I(e.attributes))}0!==u.length&&t.push(new c.I({attributes:l,indices:u,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var N=new i.o,P=new p.a;T.projectTo2D=function(e,t,r,a,u){if(!n.e(e))throw new o.t("geometry is required.");if(!n.e(t))throw new o.t("attributeName is required.");if(!n.e(r))throw new o.t("attributeName3D is required.");if(!n.e(a))throw new o.t("attributeName2D is required.");if(!n.e(e.attributes[t]))throw new o.t("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==l.ComponentDatatype.DOUBLE)throw new o.t("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var p=e.attributes[t],v=(u=n.e(u)?u:new s.n).ellipsoid,y=p.values,m=new Float64Array(y.length),f=0,h=0;h<y.length;h+=3){var d=i.o.fromArray(y,h,N),b=v.cartesianToCartographic(d,P);if(!n.e(b))throw new o.t("Could not project point ("+d.x+", "+d.y+", "+d.z+") to 2D.");var w=u.project(b,N);m[f++]=w.x,m[f++]=w.y,m[f++]=w.z}return e.attributes[r]=p,e.attributes[a]=new c.o({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m}),delete e.attributes[t],e};var E={high:0,low:0};T.encodeAttribute=function(e,t,r,i){if(!n.e(e))throw new o.t("geometry is required.");if(!n.e(t))throw new o.t("attributeName is required.");if(!n.e(r))throw new o.t("attributeHighName is required.");if(!n.e(i))throw new o.t("attributeLowName is required.");if(!n.e(e.attributes[t]))throw new o.t("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==l.ComponentDatatype.DOUBLE)throw new o.t("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var a=e.attributes[t],s=a.values,u=s.length,p=new Float32Array(u),y=new Float32Array(u),m=0;m<u;++m)v.i.encode(s[m],E),p[m]=E.high,y[m]=E.low;var f=a.componentsPerAttribute;return e.attributes[r]=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:f,values:p}),e.attributes[i]=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:f,values:y}),delete e.attributes[t],e};var O=new i.o;function L(e,t){if(n.e(t))for(var r=t.values,o=r.length,a=0;a<o;a+=3)i.o.unpack(r,a,O),f.p.multiplyByPoint(e,O,O),i.o.pack(O,r,a)}function D(e,t){if(n.e(t))for(var r=t.values,o=r.length,a=0;a<o;a+=3)i.o.unpack(r,a,O),f.p$1.multiplyByVector(e,O,O),O=i.o.normalize(O,O),i.o.pack(O,r,a)}var z=new f.p,_=new f.p$1;T.transformToWorldCoordinates=function(e){if(!n.e(e))throw new o.t("instance is required.");var t=e.modelMatrix;if(f.p.equals(t,f.p.IDENTITY))return e;var r=e.geometry.attributes;L(t,r.position),L(t,r.prevPosition),L(t,r.nextPosition),(n.e(r.normal)||n.e(r.tangent)||n.e(r.bitangent))&&(f.p.inverse(t,z),f.p.transpose(z,z),f.p.getRotation(z,_),D(_,r.normal),D(_,r.tangent),D(_,r.bitangent));var i=e.geometry.boundingSphere;return n.e(i)&&(e.geometry.boundingSphere=s.i.transform(i,t,i)),e.modelMatrix=f.p.clone(f.p.IDENTITY),e};var q=new i.o;function C(e,t){var r,a,u,p,v=e.length,m=e[0].modelMatrix,h=n.e(e[0][t].indices),d=e[0][t].primitiveType;for(a=1;a<v;++a){if(!f.p.equals(e[a].modelMatrix,m))throw new o.t("All instances must have the same modelMatrix.");if(n.e(e[a][t].indices)!==h)throw new o.t("All instance geometries must have an indices or not have one.");if(e[a][t].primitiveType!==d)throw new o.t("All instance geometries must have the same primitiveType.")}var b,w,g,x,T=function(e,t){var r,i=e.length,o={},a=e[0][t].attributes;for(r in a)if(a.hasOwnProperty(r)&&n.e(a[r])&&n.e(a[r].values)){for(var s=a[r],u=s.values.length,p=!0,v=1;v<i;++v){var y=e[v][t].attributes[r];if(!n.e(y)||s.componentDatatype!==y.componentDatatype||s.componentsPerAttribute!==y.componentsPerAttribute||s.normalize!==y.normalize){p=!1;break}u+=y.values.length}p&&(o[r]=new c.o({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:l.ComponentDatatype.createTypedArray(s.componentDatatype,u)}),s.isInstanceAttribute&&(o[r].isInstanceAttribute=!0))}return o}(e,t);for(r in T)if(T.hasOwnProperty(r))for(b=T[r].values,p=0,a=0;a<v;++a)for(g=(w=e[a][t].attributes[r].values).length,u=0;u<g;++u)b[p++]=w[u];if(h){var A=0;for(a=0;a<v;++a)A+=e[a][t].indices.length;var I=c.I.computeNumberOfVertices(new c.I({attributes:T,primitiveType:f._0x4b6a27.POINTS})),S=y.IndexDatatype.createTypedArray(I,A),N=0,P=0;for(a=0;a<v;++a){var E=e[a][t].indices,O=E.length;for(p=0;p<O;++p)S[N++]=P+E[p];P+=c.I.computeNumberOfVertices(e[a][t])}x=S}var L,D=new i.o,z=0;for(a=0;a<v;++a){if(L=e[a][t].boundingSphere,!n.e(L)){D=void 0;break}i.o.add(L.center,D,D)}if(n.e(D))for(i.o.divideByScalar(D,v,D),a=0;a<v;++a){L=e[a][t].boundingSphere;var _=i.o.magnitude(i.o.subtract(L.center,D,q))+L.radius;_>z&&(z=_)}return new c.I({attributes:T,indices:x,primitiveType:d,boundingSphere:n.e(D)?new s.i(D,z):void 0})}T.combineInstances=function(e){if(!n.e(e)||e.length<1)throw new o.t("instances is required and must have length greater than zero.");for(var t=[],r=[],i=e.length,a=0;a<i;++a){var s=e[a];n.e(s.geometry)?t.push(s):n.e(s.westHemisphereGeometry)&&n.e(s.eastHemisphereGeometry)&&r.push(s)}var u=[];return t.length>0&&u.push(C(t,"geometry")),r.length>0&&(u.push(C(r,"westHemisphereGeometry")),u.push(C(r,"eastHemisphereGeometry"))),u};var R=new i.o,G=new i.o,F=new i.o,k=new i.o;T.computeNormal=function(e){if(!n.e(e))throw new o.t("geometry is required.");if(!n.e(e.attributes.position)||!n.e(e.attributes.position.values))throw new o.t("geometry.attributes.position.values is required.");if(!n.e(e.indices))throw new o.t("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!=0)throw new o.t("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==f._0x4b6a27.TRIANGLES)throw new o.t("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var t,r=e.indices,s=e.attributes,u=s.position.values,p=s.position.values.length/3,v=r.length,y=new Array(p),m=new Array(v/3),h=new Array(v);for(t=0;t<p;t++)y[t]={indexOffset:0,count:0,currentCount:0};var d=0;for(t=0;t<v;t+=3){var b=r[t],w=r[t+1],g=r[t+2],x=3*b,T=3*w,A=3*g;G.x=u[x],G.y=u[x+1],G.z=u[x+2],F.x=u[T],F.y=u[T+1],F.z=u[T+2],k.x=u[A],k.y=u[A+1],k.z=u[A+2],y[b].count++,y[w].count++,y[g].count++,i.o.subtract(F,G,F),i.o.subtract(k,G,k),m[d]=i.o.cross(F,k,new i.o),d++}var I,S=0;for(t=0;t<p;t++)y[t].indexOffset+=S,S+=y[t].count;for(d=0,t=0;t<v;t+=3){var N=(I=y[r[t]]).indexOffset+I.currentCount;h[N]=d,I.currentCount++,h[N=(I=y[r[t+1]]).indexOffset+I.currentCount]=d,I.currentCount++,h[N=(I=y[r[t+2]]).indexOffset+I.currentCount]=d,I.currentCount++,d++}var P=new Float32Array(3*p);for(t=0;t<p;t++){var E=3*t;if(I=y[t],i.o.clone(i.o.ZERO,R),I.count>0){for(d=0;d<I.count;d++)i.o.add(R,m[h[I.indexOffset+d]],R);i.o.equalsEpsilon(i.o.ZERO,R,a.e.EPSILON10)&&i.o.clone(m[h[I.indexOffset]],R)}i.o.equalsEpsilon(i.o.ZERO,R,a.e.EPSILON10)&&(R.z=1),i.o.normalize(R,R),P[E]=R.x,P[E+1]=R.y,P[E+2]=R.z}return e.attributes.normal=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:P}),e};var B=new i.o,M=new i.o,U=new i.o;T.computeTangentAndBitangent=function(e){if(!n.e(e))throw new o.t("geometry is required.");var t=e.attributes,r=e.indices;if(!n.e(t.position)||!n.e(t.position.values))throw new o.t("geometry.attributes.position.values is required.");if(!n.e(t.normal)||!n.e(t.normal.values))throw new o.t("geometry.attributes.normal.values is required.");if(!n.e(t.st)||!n.e(t.st.values))throw new o.t("geometry.attributes.st.values is required.");if(!n.e(r))throw new o.t("geometry.indices is required.");if(r.length<2||r.length%3!=0)throw new o.t("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==f._0x4b6a27.TRIANGLES)throw new o.t("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var a,s,u,p,v=e.attributes.position.values,y=e.attributes.normal.values,m=e.attributes.st.values,h=e.attributes.position.values.length/3,d=r.length,b=new Array(3*h);for(a=0;a<b.length;a++)b[a]=0;for(a=0;a<d;a+=3){var w=r[a],g=r[a+1],x=r[a+2];u=3*g,p=3*x;var T=2*w,A=2*g,I=2*x,S=v[s=3*w],N=v[s+1],P=v[s+2],E=m[T],O=m[T+1],L=m[A+1]-O,D=m[I+1]-O,z=1/((m[A]-E)*D-(m[I]-E)*L),_=(D*(v[u]-S)-L*(v[p]-S))*z,q=(D*(v[u+1]-N)-L*(v[p+1]-N))*z,C=(D*(v[u+2]-P)-L*(v[p+2]-P))*z;b[s]+=_,b[s+1]+=q,b[s+2]+=C,b[u]+=_,b[u+1]+=q,b[u+2]+=C,b[p]+=_,b[p+1]+=q,b[p+2]+=C}var R=new Float32Array(3*h),G=new Float32Array(3*h);for(a=0;a<h;a++){u=(s=3*a)+1,p=s+2;var F=i.o.fromArray(y,s,B),k=i.o.fromArray(b,s,U),V=i.o.dot(F,k);i.o.multiplyByScalar(F,V,M),i.o.normalize(i.o.subtract(k,M,k),k),R[s]=k.x,R[u]=k.y,R[p]=k.z,i.o.normalize(i.o.cross(F,k,k),k),G[s]=k.x,G[u]=k.y,G[p]=k.z}return e.attributes.tangent=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R}),e.attributes.bitangent=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G}),e};var V=new r.o,Y=new i.o,Z=new i.o,H=new i.o,W=new r.o;function X(e){switch(e.primitiveType){case f._0x4b6a27.TRIANGLE_FAN:return function(e){var t=c.I.computeNumberOfVertices(e);if(t<3)throw new o.t("The number of vertices must be at least three.");var r=y.IndexDatatype.createTypedArray(t,3*(t-2));r[0]=1,r[1]=0,r[2]=2;for(var i=3,n=3;n<t;++n)r[i++]=n-1,r[i++]=0,r[i++]=n;return e.indices=r,e.primitiveType=f._0x4b6a27.TRIANGLES,e}(e);case f._0x4b6a27.TRIANGLE_STRIP:return function(e){var t=c.I.computeNumberOfVertices(e);if(t<3)throw new o.t("The number of vertices must be at least 3.");var r=y.IndexDatatype.createTypedArray(t,3*(t-2));r[0]=0,r[1]=1,r[2]=2,t>3&&(r[3]=0,r[4]=2,r[5]=3);for(var i=6,n=3;n<t-1;n+=2)r[i++]=n,r[i++]=n-1,r[i++]=n+1,n+2<t&&(r[i++]=n,r[i++]=n+1,r[i++]=n+2);return e.indices=r,e.primitiveType=f._0x4b6a27.TRIANGLES,e}(e);case f._0x4b6a27.TRIANGLES:return function(e){if(n.e(e.indices))return e;var t=c.I.computeNumberOfVertices(e);if(t<3)throw new o.t("The number of vertices must be at least three.");if(t%3!=0)throw new o.t("The number of vertices must be a multiple of three.");for(var r=y.IndexDatatype.createTypedArray(t,t),i=0;i<t;++i)r[i]=i;return e.indices=r,e}(e);case f._0x4b6a27.LINE_STRIP:return function(e){var t=c.I.computeNumberOfVertices(e);if(t<2)throw new o.t("The number of vertices must be at least two.");var r=y.IndexDatatype.createTypedArray(t,2*(t-1));r[0]=0,r[1]=1;for(var i=2,n=2;n<t;++n)r[i++]=n-1,r[i++]=n;return e.indices=r,e.primitiveType=f._0x4b6a27.LINES,e}(e);case f._0x4b6a27.LINE_LOOP:return function(e){var t=c.I.computeNumberOfVertices(e);if(t<2)throw new o.t("The number of vertices must be at least two.");var r=y.IndexDatatype.createTypedArray(t,2*t);r[0]=0,r[1]=1;for(var i=2,n=2;n<t;++n)r[i++]=n-1,r[i++]=n;return r[i++]=t-1,r[i]=0,e.indices=r,e.primitiveType=f._0x4b6a27.LINES,e}(e);case f._0x4b6a27.LINES:return function(e){if(n.e(e.indices))return e;var t=c.I.computeNumberOfVertices(e);if(t<2)throw new o.t("The number of vertices must be at least two.");if(t%2!=0)throw new o.t("The number of vertices must be a multiple of 2.");for(var r=y.IndexDatatype.createTypedArray(t,t),i=0;i<t;++i)r[i]=i;return e.indices=r,e}(e)}return e}function j(e,t){Math.abs(e.y)<a.e.EPSILON6&&(e.y=t?-a.e.EPSILON6:a.e.EPSILON6)}T.compressVertices=function(e){if(!n.e(e))throw new o.t("geometry is required.");var a,s,u=e.attributes.extrudeDirection;if(n.e(u)){var p=u.values;s=p.length/3;var v=new Float32Array(2*s),y=0;for(a=0;a<s;++a)i.o.fromArray(p,3*a,Y),i.o.equals(Y,i.o.ZERO)?y+=2:(W=t.t.octEncodeInRange(Y,65535,W),v[y++]=W.x,v[y++]=W.y);return e.attributes.compressedAttributes=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:v}),delete e.attributes.extrudeDirection,e}var m=e.attributes.normal,f=e.attributes.st,h=n.e(m),d=n.e(f);if(!h&&!d)return e;var b,w,g,x,T=e.attributes.tangent,A=e.attributes.bitangent,I=n.e(T),S=n.e(A);h&&(b=m.values),d&&(w=f.values),I&&(g=T.values),S&&(x=A.values);var N=s=(h?b.length:w.length)/(h?3:2),P=d&&h?2:1;P+=I||S?1:0;var E=new Float32Array(N*=P),O=0;for(a=0;a<s;++a){d&&(r.o.fromArray(w,2*a,V),E[O++]=t.t.compressTextureCoordinates(V));var L=3*a;h&&n.e(g)&&n.e(x)?(i.o.fromArray(b,L,Y),i.o.fromArray(g,L,Z),i.o.fromArray(x,L,H),t.t.octPack(Y,Z,H,V),E[O++]=V.x,E[O++]=V.y):(h&&(i.o.fromArray(b,L,Y),E[O++]=t.t.octEncodeFloat(Y)),I&&(i.o.fromArray(g,L,Y),E[O++]=t.t.octEncodeFloat(Y)),S&&(i.o.fromArray(x,L,Y),E[O++]=t.t.octEncodeFloat(Y)))}return e.attributes.compressedAttributes=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:P,values:E}),h&&delete e.attributes.normal,d&&delete e.attributes.st,S&&delete e.attributes.bitangent,I&&delete e.attributes.tangent,e};var J=new i.o;function K(e,t,r,o){i.o.add(e,i.o.multiplyByScalar(i.o.subtract(t,e,J),e.y/(e.y-t.y),J),r),i.o.clone(r,o),j(r,!0),j(o,!1)}var $=new i.o,Q=new i.o,ee=new i.o,te=new i.o,re={positions:new Array(7),indices:new Array(9)};function ie(e,t,r){if(!(e.x>=0||t.x>=0||r.x>=0)){!function(e,t,r){if(0!==e.y&&0!==t.y&&0!==r.y)return j(e,e.y<0),j(t,t.y<0),void j(r,r.y<0);var i=Math.abs(e.y),o=Math.abs(t.y),n=Math.abs(r.y),s=(i>o?i>n?a.e.sign(e.y):a.e.sign(r.y):o>n?a.e.sign(t.y):a.e.sign(r.y))<0;j(e,s),j(t,s),j(r,s)}(e,t,r);var i=e.y<0,o=t.y<0,n=r.y<0,s=0;s+=i?1:0,s+=o?1:0;var u=re.indices;1===(s+=n?1:0)?(u[1]=3,u[2]=4,u[5]=6,u[7]=6,u[8]=5,i?(K(e,t,$,ee),K(e,r,Q,te),u[0]=0,u[3]=1,u[4]=2,u[6]=1):o?(K(t,r,$,ee),K(t,e,Q,te),u[0]=1,u[3]=2,u[4]=0,u[6]=2):n&&(K(r,e,$,ee),K(r,t,Q,te),u[0]=2,u[3]=0,u[4]=1,u[6]=0)):2===s&&(u[2]=4,u[4]=4,u[5]=3,u[7]=5,u[8]=6,i?o?n||(K(r,e,$,ee),K(r,t,Q,te),u[0]=0,u[1]=1,u[3]=0,u[6]=2):(K(t,r,$,ee),K(t,e,Q,te),u[0]=2,u[1]=0,u[3]=2,u[6]=1):(K(e,t,$,ee),K(e,r,Q,te),u[0]=1,u[1]=2,u[3]=1,u[6]=0));var p=re.positions;return p[0]=e,p[1]=t,p[2]=r,p.length=3,(1===s||2===s)&&(p[3]=$,p[4]=Q,p[5]=ee,p[6]=te,p.length=7),re}}function oe(e,t){var r=e.attributes;if(0!==r.position.values.length){for(var i in r)if(r.hasOwnProperty(i)&&n.e(r[i])&&n.e(r[i].values)){var o=r[i];o.values=l.ComponentDatatype.createTypedArray(o.componentDatatype,o.values)}var a=c.I.computeNumberOfVertices(e);return e.indices=y.IndexDatatype.createTypedArray(a,e.indices),t&&(e.boundingSphere=s.i.fromVertices(r.position.values)),e}}function ne(e){var t=e.attributes,r={};for(var i in t)if(t.hasOwnProperty(i)&&n.e(t[i])&&n.e(t[i].values)){var o=t[i];r[i]=new c.o({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new c.I({attributes:r,indices:[],primitiveType:e.primitiveType})}function ae(e,t,r){var i=n.e(e.geometry.boundingSphere);t=oe(t,i),r=oe(r,i),n.e(r)&&!n.e(t)?e.geometry=r:!n.e(r)&&n.e(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=r,e.geometry=void 0)}function se(e,t){var r=new e,i=new e,o=new e;return function(n,a,s,u,p,l,v,c){var y=e.fromArray(p,n*t,r),m=e.fromArray(p,a*t,i),f=e.fromArray(p,s*t,o);e.multiplyByScalar(y,u.x,y),e.multiplyByScalar(m,u.y,m),e.multiplyByScalar(f,u.z,f);var h=e.add(y,m,y);e.add(h,f,h),c&&e.normalize(h,h),e.pack(h,l,v*t)}}var ue=se(u.e,4),pe=se(i.o,3),le=se(r.o,2),ve=new i.o,ce=new i.o,ye=new i.o,me=new i.o;function fe(e,t,r,o,s,u,p,l,v,c,y,m,f,h,d,b){if(n.e(u)||n.e(p)||n.e(l)||n.e(v)||n.e(c)||0!==h){var w=g(o,i.o.fromArray(s,3*e,ve),i.o.fromArray(s,3*t,ce),i.o.fromArray(s,3*r,ye),me);if(n.e(u)&&pe(e,t,r,w,u,m.normal.values,b,!0),n.e(c)){var x,T=i.o.fromArray(c,3*e,ve),A=i.o.fromArray(c,3*t,ce),I=i.o.fromArray(c,3*r,ye);i.o.multiplyByScalar(T,w.x,T),i.o.multiplyByScalar(A,w.y,A),i.o.multiplyByScalar(I,w.z,I),i.o.equals(T,i.o.ZERO)&&i.o.equals(A,i.o.ZERO)&&i.o.equals(I,i.o.ZERO)?((x=ve).x=0,x.y=0,x.z=0):(x=i.o.add(T,A,T),i.o.add(x,I,x),i.o.normalize(x,x)),i.o.pack(x,m.extrudeDirection.values,3*b)}if(n.e(y)&&function(e,t,r,i,o,n,s){var u=o[e]*i.x,p=o[t]*i.y,l=o[r]*i.z;n[s]=u+p+l>a.e.EPSILON6?1:0}(e,t,r,w,y,m.applyOffset.values,b),n.e(p)&&pe(e,t,r,w,p,m.tangent.values,b,!0),n.e(l)&&pe(e,t,r,w,l,m.bitangent.values,b,!0),n.e(v)&&le(e,t,r,w,v,m.st.values,b),h>0)for(var S=0;S<h;S++){var N=f[S];he(e,t,r,w,b,d[N],m[N])}}}function he(e,t,r,i,o,n,a){var s=n.componentsPerAttribute,u=n.values,p=a.values;switch(s){case 4:ue(e,t,r,i,u,p,o,!1);break;case 3:pe(e,t,r,i,u,p,o,!1);break;case 2:le(e,t,r,i,u,p,o,!1);break;default:p[o]=u[e]*i.x+u[t]*i.y+u[r]*i.z}}function de(e,t,r,i,o,n){var a=e.position.values.length/3;if(-1!==o){var s=i[o],u=r[s];return-1===u?(r[s]=a,e.position.values.push(n.x,n.y,n.z),t.push(a),a):(t.push(u),u)}return e.position.values.push(n.x,n.y,n.z),t.push(a),a}var be={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function we(e){var t=e.geometry,r=t.attributes,o=r.position.values,a=n.e(r.normal)?r.normal.values:void 0,s=n.e(r.bitangent)?r.bitangent.values:void 0,u=n.e(r.tangent)?r.tangent.values:void 0,p=n.e(r.st)?r.st.values:void 0,l=n.e(r.extrudeDirection)?r.extrudeDirection.values:void 0,v=n.e(r.applyOffset)?r.applyOffset.values:void 0,c=t.indices,y=[];for(var m in r)r.hasOwnProperty(m)&&!be[m]&&n.e(r[m])&&y.push(m);var f,h,d,b,w=y.length,g=ne(t),x=ne(t),T=[];T.length=o.length/3;var A=[];for(A.length=o.length/3,b=0;b<T.length;++b)T[b]=-1,A[b]=-1;var I=c.length;for(b=0;b<I;b+=3){var S=c[b],N=c[b+1],P=c[b+2],E=i.o.fromArray(o,3*S),O=i.o.fromArray(o,3*N),L=i.o.fromArray(o,3*P),D=ie(E,O,L);if(n.e(D)&&D.positions.length>3)for(var z=D.positions,_=D.indices,q=_.length,C=0;C<q;++C){var R=_[C],G=z[R];G.y<0?(f=x.attributes,h=x.indices,d=T):(f=g.attributes,h=g.indices,d=A),fe(S,N,P,G,o,a,u,s,p,l,v,f,y,w,r,de(f,h,d,c,R<3?b+R:-1,G))}else n.e(D)&&(E=D.positions[0],O=D.positions[1],L=D.positions[2]),E.y<0?(f=x.attributes,h=x.indices,d=T):(f=g.attributes,h=g.indices,d=A),fe(S,N,P,E,o,a,u,s,p,l,v,f,y,w,r,de(f,h,d,c,b,E)),fe(S,N,P,O,o,a,u,s,p,l,v,f,y,w,r,de(f,h,d,c,b+1,O)),fe(S,N,P,L,o,a,u,s,p,l,v,f,y,w,r,de(f,h,d,c,b+2,L))}ae(e,x,g)}var ge=h.o.fromPointNormal(i.o.ZERO,i.o.UNIT_Y),xe=new i.o,Te=new i.o;function Ae(e,t,r,o,s,u,p){if(n.e(p)){var l=i.o.fromArray(o,3*e,ve);i.o.equalsEpsilon(l,r,a.e.EPSILON10)?u.applyOffset.values[s]=p[e]:u.applyOffset.values[s]=p[t]}}function Ie(e){var t,r=e.geometry,o=r.attributes,s=o.position.values,u=n.e(o.applyOffset)?o.applyOffset.values:void 0,p=r.indices,l=ne(r),v=ne(r),c=p.length,y=[];y.length=s.length/3;var f=[];for(f.length=s.length/3,t=0;t<y.length;++t)y[t]=-1,f[t]=-1;for(t=0;t<c;t+=2){var h=p[t],d=p[t+1],b=i.o.fromArray(s,3*h,ve),w=i.o.fromArray(s,3*d,ce);Math.abs(b.y)<a.e.EPSILON6&&(b.y<0?b.y=-a.e.EPSILON6:b.y=a.e.EPSILON6),Math.abs(w.y)<a.e.EPSILON6&&(w.y<0?w.y=-a.e.EPSILON6:w.y=a.e.EPSILON6);var g=l.attributes,x=l.indices,T=f,A=v.attributes,I=v.indices,S=y,N=m.g.lineSegmentPlane(b,w,ge,ye);if(n.e(N)){var P=i.o.multiplyByScalar(i.o.UNIT_Y,5*a.e.EPSILON9,xe);b.y<0&&(i.o.negate(P,P),g=v.attributes,x=v.indices,T=y,A=l.attributes,I=l.indices,S=f);var E=i.o.add(N,P,Te);Ae(h,d,b,s,de(g,x,T,p,t,b),g,u),Ae(h,d,E,s,de(g,x,T,p,-1,E),g,u),i.o.negate(P,P),i.o.add(N,P,E),Ae(h,d,E,s,de(A,I,S,p,-1,E),A,u),Ae(h,d,w,s,de(A,I,S,p,t+1,w),A,u)}else{var O,L,D;b.y<0?(O=v.attributes,L=v.indices,D=y):(O=l.attributes,L=l.indices,D=f),Ae(h,d,b,s,de(O,L,D,p,t,b),O,u),Ae(h,d,w,s,de(O,L,D,p,t+1,w),O,u)}}ae(e,v,l)}var Se=new r.o,Ne=new r.o,Pe=new i.o,Ee=new i.o,Oe=new i.o,Le=new i.o,De=new i.o,ze=new i.o,_e=new i.o,qe=new u.e;function Ce(e){for(var t=e.attributes,r=t.position.values,o=t.prevPosition.values,n=t.nextPosition.values,a=r.length,s=0;s<a;s+=3){var u=i.o.unpack(r,s,Pe);if(!(u.x>0)){var p=i.o.unpack(o,s,Ee);(u.y<0&&p.y>0||u.y>0&&p.y<0)&&(s-3>0?(o[s]=r[s-3],o[s+1]=r[s-2],o[s+2]=r[s-1]):i.o.pack(u,o,s));var l=i.o.unpack(n,s,Oe);(u.y<0&&l.y>0||u.y>0&&l.y<0)&&(s+3<a?(n[s]=r[s+3],n[s+1]=r[s+4],n[s+2]=r[s+5]):i.o.pack(u,n,s))}}}var Re=5*a.e.EPSILON9,Ge=a.e.EPSILON6;T.splitLongitude=function(e){if(!n.e(e))throw new o.t("instance is required.");var t=e.geometry,p=t.boundingSphere;if(n.e(p)&&(p.center.x-p.radius>0||s.i.intersectPlane(p,h.o.ORIGIN_ZX_PLANE)!==s.S.INTERSECTING))return e;if(t.geometryType!==c.Me.NONE)switch(t.geometryType){case c.Me.POLYLINES:!function(e){var t,o,s,p=e.geometry,l=p.attributes,v=l.position.values,c=l.prevPosition.values,y=l.nextPosition.values,f=l.expandAndWidth.values,h=n.e(l.st)?l.st.values:void 0,d=n.e(l.color)?l.color.values:void 0,b=n.e(l.dist)?l.dist.values:void 0,w=ne(p),g=ne(p),x=!1,T=v.length/3;for(t=0;t<T;t+=4){var A=t,I=t+2,S=i.o.fromArray(v,3*A,Pe),N=i.o.fromArray(v,3*I,Ee);if(Math.abs(S.y)<Ge)for(S.y=Ge*(N.y<0?-1:1),v[3*t+1]=S.y,v[3*(t+1)+1]=S.y,o=3*A;o<3*A+12;o+=3)c[o]=v[3*t],c[o+1]=v[3*t+1],c[o+2]=v[3*t+2];if(Math.abs(N.y)<Ge)for(N.y=Ge*(S.y<0?-1:1),v[3*(t+2)+1]=N.y,v[3*(t+3)+1]=N.y,o=3*A;o<3*A+12;o+=3)y[o]=v[3*(t+2)],y[o+1]=v[3*(t+2)+1],y[o+2]=v[3*(t+2)+2];var P=w.attributes,E=w.indices,O=g.attributes,L=g.indices,D=m.g.lineSegmentPlane(S,N,ge,Le);if(n.e(D)){x=!0;var z=i.o.multiplyByScalar(i.o.UNIT_Y,Re,De);S.y<0&&(i.o.negate(z,z),P=g.attributes,E=g.indices,O=w.attributes,L=w.indices);var _=i.o.add(D,z,ze);P.position.values.push(S.x,S.y,S.z,S.x,S.y,S.z),P.position.values.push(_.x,_.y,_.z),P.position.values.push(_.x,_.y,_.z),P.prevPosition.values.push(c[3*A],c[3*A+1],c[3*A+2]),P.prevPosition.values.push(c[3*A+3],c[3*A+4],c[3*A+5]),P.prevPosition.values.push(S.x,S.y,S.z,S.x,S.y,S.z),P.nextPosition.values.push(_.x,_.y,_.z),P.nextPosition.values.push(_.x,_.y,_.z),P.nextPosition.values.push(_.x,_.y,_.z),P.nextPosition.values.push(_.x,_.y,_.z),i.o.negate(z,z),i.o.add(D,z,_),O.position.values.push(_.x,_.y,_.z),O.position.values.push(_.x,_.y,_.z),O.position.values.push(N.x,N.y,N.z,N.x,N.y,N.z),O.prevPosition.values.push(_.x,_.y,_.z),O.prevPosition.values.push(_.x,_.y,_.z),O.prevPosition.values.push(_.x,_.y,_.z),O.prevPosition.values.push(_.x,_.y,_.z),O.nextPosition.values.push(N.x,N.y,N.z,N.x,N.y,N.z),O.nextPosition.values.push(y[3*I],y[3*I+1],y[3*I+2]),O.nextPosition.values.push(y[3*I+3],y[3*I+4],y[3*I+5]);var q=r.o.fromArray(f,2*A,Se),C=Math.abs(q.y);P.expandAndWidth.values.push(-1,C,1,C),P.expandAndWidth.values.push(-1,-C,1,-C),O.expandAndWidth.values.push(-1,C,1,C),O.expandAndWidth.values.push(-1,-C,1,-C);var R=i.o.magnitudeSquared(i.o.subtract(D,S,Oe));if(R/=i.o.magnitudeSquared(i.o.subtract(N,S,Oe)),n.e(d)){var G=u.e.fromArray(d,4*A,qe),F=u.e.fromArray(d,4*I,qe),k=a.e.lerp(G.x,F.x,R),B=a.e.lerp(G.y,F.y,R),M=a.e.lerp(G.z,F.z,R),U=a.e.lerp(G.w,F.w,R);for(o=4*A;o<4*A+8;++o)P.color.values.push(d[o]);for(P.color.values.push(k,B,M,U),P.color.values.push(k,B,M,U),O.color.values.push(k,B,M,U),O.color.values.push(k,B,M,U),o=4*I;o<4*I+8;++o)O.color.values.push(d[o])}if(n.e(h)){var V=r.o.fromArray(h,2*A,Se),Y=r.o.fromArray(h,2*(t+3),Ne),Z=a.e.lerp(V.x,Y.x,R);for(o=2*A;o<2*A+4;++o)P.st.values.push(h[o]);for(P.st.values.push(Z,V.y),P.st.values.push(Z,Y.y),O.st.values.push(Z,V.y),O.st.values.push(Z,Y.y),o=2*I;o<2*I+4;++o)O.st.values.push(h[o])}if(n.e(b)){var H=i.o.fromArray(b,3*A,_e),W=i.o.fromArray(b,3*I,_e),X=a.e.lerp(H.x,W.x,R);for(o=3*A;o<3*A+6;++o)P.dist.values.push(b[o]);for(P.dist.values.push(X,H.y,H.z),P.dist.values.push(X,H.y,H.z),O.dist.values.push(X,W.y,W.z),O.dist.values.push(X,W.y,W.z),o=3*I;o<3*I+6;++o)O.dist.values.push(b[o])}s=P.position.values.length/3-4,E.push(s,s+2,s+1),E.push(s+1,s+2,s+3),s=O.position.values.length/3-4,L.push(s,s+2,s+1),L.push(s+1,s+2,s+3)}else{var j,J;for(S.y<0?(j=g.attributes,J=g.indices):(j=w.attributes,J=w.indices),j.position.values.push(S.x,S.y,S.z),j.position.values.push(S.x,S.y,S.z),j.position.values.push(N.x,N.y,N.z),j.position.values.push(N.x,N.y,N.z),o=3*t;o<3*t+12;++o)j.prevPosition.values.push(c[o]),j.nextPosition.values.push(y[o]);for(o=2*t;o<2*t+8;++o)j.expandAndWidth.values.push(f[o]),n.e(h)&&j.st.values.push(h[o]);if(n.e(d))for(o=4*t;o<4*t+16;++o)j.color.values.push(d[o]);if(n.e(b))for(o=3*t;o<3*t+12;++o)j.dist.values.push(b[o]);s=j.position.values.length/3-4,J.push(s,s+2,s+1),J.push(s+1,s+2,s+3)}}x&&(Ce(g),Ce(w)),ae(e,g,w)}(e);break;case c.Me.TRIANGLES:we(e);break;case c.Me.LINES:Ie(e)}else X(t),t.primitiveType===f._0x4b6a27.TRIANGLES?we(e):t.primitiveType===f._0x4b6a27.LINES&&Ie(e);return e},e.k=T})); +define(["exports","./AttributeCompression-b5a80a71","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./Math-ecf82623","./buildModuleUrl-cbcc8c56","./Cartesian4-72b88c9e","./Cartographic-a2c313d7","./ComponentDatatype-98414d16","./EncodedCartesian3-4f120b1b","./GeometryAttribute-65cf868d","./IndexDatatype-86677ec4","./IntersectionTests-9ff29c98","./FeatureDetection-fd297af4","./Plane-a2c6da7b"],(function(e,t,r,i,o,n,a,s,u,p,l,v,c,y,m,f,h){"use strict";var d=new i.o,b=new i.o,w=new i.o;function g(e,t,s,u,p){var l,v,c,y,m,f,h,g;if(o.o.defined("point",e),o.o.defined("p0",t),o.o.defined("p1",s),o.o.defined("p2",u),n.e(p)||(p=new i.o),n.e(t.z)){if(i.o.equalsEpsilon(e,t,a.e.EPSILON14))return i.o.clone(i.o.UNIT_X,p);if(i.o.equalsEpsilon(e,s,a.e.EPSILON14))return i.o.clone(i.o.UNIT_Y,p);if(i.o.equalsEpsilon(e,u,a.e.EPSILON14))return i.o.clone(i.o.UNIT_Z,p);l=i.o.subtract(s,t,d),v=i.o.subtract(u,t,b),c=i.o.subtract(e,t,w),y=i.o.dot(l,l),m=i.o.dot(l,v),f=i.o.dot(l,c),h=i.o.dot(v,v),g=i.o.dot(v,c)}else{if(r.o.equalsEpsilon(e,t,a.e.EPSILON14))return i.o.clone(i.o.UNIT_X,p);if(r.o.equalsEpsilon(e,s,a.e.EPSILON14))return i.o.clone(i.o.UNIT_Y,p);if(r.o.equalsEpsilon(e,u,a.e.EPSILON14))return i.o.clone(i.o.UNIT_Z,p);l=r.o.subtract(s,t,d),v=r.o.subtract(u,t,b),c=r.o.subtract(e,t,w),y=r.o.dot(l,l),m=r.o.dot(l,v),f=r.o.dot(l,c),h=r.o.dot(v,v),g=r.o.dot(v,c)}p.y=h*f-m*g,p.z=y*g-m*f;var x=y*h-m*m;return 0!==p.y&&(p.y/=x),0!==p.z&&(p.z/=x),p.x=1-p.y-p.z,p}var x={calculateACMR:function(e){var t=(e=n.u(e,n.u.EMPTY_OBJECT)).indices,r=e.maximumIndex,i=n.u(e.cacheSize,24);if(!n.e(t))throw new o.t("indices is required.");var a=t.length;if(a<3||a%3!=0)throw new o.t("indices length must be a multiple of three.");if(r<=0)throw new o.t("maximumIndex must be greater than zero.");if(i<3)throw new o.t("cacheSize must be greater than two.");if(!n.e(r)){r=0;for(var s=0,u=t[s];s<a;)u>r&&(r=u),u=t[++s]}for(var p=[],l=0;l<r+1;l++)p[l]=0;for(var v=i+1,c=0;c<a;++c)v-p[t[c]]>i&&(p[t[c]]=v,++v);return(v-i+1)/(a/3)}};x.tipsify=function(e){var t,r=(e=n.u(e,n.u.EMPTY_OBJECT)).indices,i=e.maximumIndex,a=n.u(e.cacheSize,24);function s(e,r,i,o,n,a,s){for(var u,p=-1,l=-1,v=0;v<i.length;){var c=i[v];o[c].numLiveTriangles&&(u=0,n-o[c].timeStamp+2*o[c].numLiveTriangles<=r&&(u=n-o[c].timeStamp),(u>l||-1===l)&&(l=u,p=c)),++v}return-1===p?function(e,r,i,o){for(;r.length>=1;){var n=r[r.length-1];if(r.splice(r.length-1,1),e[n].numLiveTriangles>0)return n}for(;t<o;){if(e[t].numLiveTriangles>0)return++t-1;++t}return-1}(o,a,0,s):p}if(!n.e(r))throw new o.t("indices is required.");var u=r.length;if(u<3||u%3!=0)throw new o.t("indices length must be a multiple of three.");if(i<=0)throw new o.t("maximumIndex must be greater than zero.");if(a<3)throw new o.t("cacheSize must be greater than two.");var p=0,l=0,v=r[l],c=u;if(n.e(i))p=i+1;else{for(;l<c;)v>p&&(p=v),v=r[++l];if(-1===p)return 0;++p}var y,m=[];for(y=0;y<p;y++)m[y]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};l=0;for(var f=0;l<c;)m[r[l]].vertexTriangles.push(f),++m[r[l]].numLiveTriangles,m[r[l+1]].vertexTriangles.push(f),++m[r[l+1]].numLiveTriangles,m[r[l+2]].vertexTriangles.push(f),++m[r[l+2]].numLiveTriangles,++f,l+=3;var h=0,d=a+1;t=1;var b,w,g,x,T=[],A=[],I=0,S=[],N=u/3,P=[];for(y=0;y<N;y++)P[y]=!1;for(;-1!==h;){T=[],x=(w=m[h]).vertexTriangles.length;for(var E=0;E<x;++E)if(!P[f=w.vertexTriangles[E]]){P[f]=!0,l=f+f+f;for(var O=0;O<3;++O)g=r[l],T.push(g),A.push(g),S[I]=g,++I,--(b=m[g]).numLiveTriangles,d-b.timeStamp>a&&(b.timeStamp=d,++d),++l}h=s(0,a,T,m,d,A,p)}return S};var T={};function A(e,t,r,i,o){e[t++]=r,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=r}function I(e){var t={};for(var r in e)if(e.hasOwnProperty(r)&&n.e(e[r])&&n.e(e[r].values)){var i=e[r];t[r]=new c.o({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function S(e,t,r){for(var i in t)if(t.hasOwnProperty(i)&&n.e(t[i])&&n.e(t[i].values))for(var o=t[i],a=0;a<o.componentsPerAttribute;++a)e[i].values.push(o.values[r*o.componentsPerAttribute+a])}T.toWireframe=function(e){if(!n.e(e))throw new o.t("geometry is required.");var t=e.indices;if(n.e(t)){switch(e.primitiveType){case f._0x3b3836.TRIANGLES:e.indices=function(e){for(var t=e.length,r=t/3*6,i=y.IndexDatatype.createTypedArray(t,r),o=0,n=0;n<t;n+=3,o+=6)A(i,o,e[n],e[n+1],e[n+2]);return i}(t);break;case f._0x3b3836.TRIANGLE_STRIP:e.indices=function(e){var t=e.length;if(t>=3){var r=6*(t-2),i=y.IndexDatatype.createTypedArray(t,r);A(i,0,e[0],e[1],e[2]);for(var o=6,n=3;n<t;++n,o+=6)A(i,o,e[n-1],e[n],e[n-2]);return i}return new Uint16Array}(t);break;case f._0x3b3836.TRIANGLE_FAN:e.indices=function(e){if(e.length>0){for(var t=e.length-1,r=6*(t-1),i=y.IndexDatatype.createTypedArray(t,r),o=e[0],n=0,a=1;a<t;++a,n+=6)A(i,n,o,e[a],e[a+1]);return i}return new Uint16Array}(t);break;default:throw new o.t("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}e.primitiveType=f._0x3b3836.LINES}return e},T.createLineSegmentsForVectors=function(e,t,r){if(t=n.u(t,"normal"),!n.e(e))throw new o.t("geometry is required.");if(!n.e(e.attributes.position))throw new o.t("geometry.attributes.position is required.");if(!n.e(e.attributes[t]))throw new o.t("geometry.attributes must have an attribute with the same name as the attributeName parameter, "+t+".");r=n.u(r,1e4);for(var i=e.attributes.position.values,a=e.attributes[t].values,u=i.length,p=new Float64Array(2*u),v=0,y=0;y<u;y+=3)p[v++]=i[y],p[v++]=i[y+1],p[v++]=i[y+2],p[v++]=i[y]+a[y]*r,p[v++]=i[y+1]+a[y+1]*r,p[v++]=i[y+2]+a[y+2]*r;var m,h=e.boundingSphere;return n.e(h)&&(m=new s.i(h.center,h.radius+r)),new c.I({attributes:{position:new c.o({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})},primitiveType:f._0x3b3836.LINES,boundingSphere:m})},T.createAttributeLocations=function(e){if(!n.e(e))throw new o.t("geometry is required.");var t,r=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],i=e.attributes,a={},s=0,u=r.length;for(t=0;t<u;++t){var p=r[t];n.e(i[p])&&(a[p]=s++)}for(var l in i)i.hasOwnProperty(l)&&!n.e(a[l])&&(a[l]=s++);return a},T.reorderForPreVertexCache=function(e){if(!n.e(e))throw new o.t("geometry is required.");var t=c.I.computeNumberOfVertices(e),r=e.indices;if(n.e(r)){for(var i=new Int32Array(t),a=0;a<t;a++)i[a]=-1;for(var s,u=r,p=u.length,v=y.IndexDatatype.createTypedArray(t,p),m=0,f=0,h=0;m<p;)-1!==(s=i[u[m]])?v[f]=s:(i[s=u[m]]=h,v[f]=h,++h),++m,++f;e.indices=v;var d=e.attributes;for(var b in d)if(d.hasOwnProperty(b)&&n.e(d[b])&&n.e(d[b].values)){for(var w=d[b],g=w.values,x=0,T=w.componentsPerAttribute,A=l.ComponentDatatype.createTypedArray(w.componentDatatype,h*T);x<t;){var I=i[x];if(-1!==I)for(var S=0;S<T;S++)A[T*I+S]=g[T*x+S];++x}w.values=A}}return e},T.reorderForPostVertexCache=function(e,t){if(!n.e(e))throw new o.t("geometry is required.");var r=e.indices;if(e.primitiveType===f._0x3b3836.TRIANGLES&&n.e(r)){for(var i=r.length,a=0,s=0;s<i;s++)r[s]>a&&(a=r[s]);e.indices=x.tipsify({indices:r,maximumIndex:a,cacheSize:t})}return e},T.fitToUnsignedShortIndices=function(e){if(!n.e(e))throw new o.t("geometry is required.");if(n.e(e.indices)&&e.primitiveType!==f._0x3b3836.TRIANGLES&&e.primitiveType!==f._0x3b3836.LINES&&e.primitiveType!==f._0x3b3836.POINTS)throw new o.t("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");var t=[],r=c.I.computeNumberOfVertices(e);if(n.e(e.indices)&&r>=a.e.SIXTY_FOUR_KILOBYTES){var i,s=[],u=[],p=0,l=I(e.attributes),v=e.indices,y=v.length;e.primitiveType===f._0x3b3836.TRIANGLES?i=3:e.primitiveType===f._0x3b3836.LINES?i=2:e.primitiveType===f._0x3b3836.POINTS&&(i=1);for(var m=0;m<y;m+=i){for(var h=0;h<i;++h){var d=v[m+h],b=s[d];n.e(b)||(b=p++,s[d]=b,S(l,e.attributes,d)),u.push(b)}p+i>=a.e.SIXTY_FOUR_KILOBYTES&&(t.push(new c.I({attributes:l,indices:u,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),s=[],u=[],p=0,l=I(e.attributes))}0!==u.length&&t.push(new c.I({attributes:l,indices:u,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var N=new i.o,P=new p.a;T.projectTo2D=function(e,t,r,a,u){if(!n.e(e))throw new o.t("geometry is required.");if(!n.e(t))throw new o.t("attributeName is required.");if(!n.e(r))throw new o.t("attributeName3D is required.");if(!n.e(a))throw new o.t("attributeName2D is required.");if(!n.e(e.attributes[t]))throw new o.t("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==l.ComponentDatatype.DOUBLE)throw new o.t("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var p=e.attributes[t],v=(u=n.e(u)?u:new s.n).ellipsoid,y=p.values,m=new Float64Array(y.length),f=0,h=0;h<y.length;h+=3){var d=i.o.fromArray(y,h,N),b=v.cartesianToCartographic(d,P);if(!n.e(b))throw new o.t("Could not project point ("+d.x+", "+d.y+", "+d.z+") to 2D.");var w=u.project(b,N);m[f++]=w.x,m[f++]=w.y,m[f++]=w.z}return e.attributes[r]=p,e.attributes[a]=new c.o({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m}),delete e.attributes[t],e};var E={high:0,low:0};T.encodeAttribute=function(e,t,r,i){if(!n.e(e))throw new o.t("geometry is required.");if(!n.e(t))throw new o.t("attributeName is required.");if(!n.e(r))throw new o.t("attributeHighName is required.");if(!n.e(i))throw new o.t("attributeLowName is required.");if(!n.e(e.attributes[t]))throw new o.t("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==l.ComponentDatatype.DOUBLE)throw new o.t("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var a=e.attributes[t],s=a.values,u=s.length,p=new Float32Array(u),y=new Float32Array(u),m=0;m<u;++m)v.i.encode(s[m],E),p[m]=E.high,y[m]=E.low;var f=a.componentsPerAttribute;return e.attributes[r]=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:f,values:p}),e.attributes[i]=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:f,values:y}),delete e.attributes[t],e};var O=new i.o;function L(e,t){if(n.e(t))for(var r=t.values,o=r.length,a=0;a<o;a+=3)i.o.unpack(r,a,O),f.p.multiplyByPoint(e,O,O),i.o.pack(O,r,a)}function D(e,t){if(n.e(t))for(var r=t.values,o=r.length,a=0;a<o;a+=3)i.o.unpack(r,a,O),f.p$1.multiplyByVector(e,O,O),O=i.o.normalize(O,O),i.o.pack(O,r,a)}var z=new f.p,_=new f.p$1;T.transformToWorldCoordinates=function(e){if(!n.e(e))throw new o.t("instance is required.");var t=e.modelMatrix;if(f.p.equals(t,f.p.IDENTITY))return e;var r=e.geometry.attributes;L(t,r.position),L(t,r.prevPosition),L(t,r.nextPosition),(n.e(r.normal)||n.e(r.tangent)||n.e(r.bitangent))&&(f.p.inverse(t,z),f.p.transpose(z,z),f.p.getRotation(z,_),D(_,r.normal),D(_,r.tangent),D(_,r.bitangent));var i=e.geometry.boundingSphere;return n.e(i)&&(e.geometry.boundingSphere=s.i.transform(i,t,i)),e.modelMatrix=f.p.clone(f.p.IDENTITY),e};var q=new i.o;function C(e,t){var r,a,u,p,v=e.length,m=e[0].modelMatrix,h=n.e(e[0][t].indices),d=e[0][t].primitiveType;for(a=1;a<v;++a){if(!f.p.equals(e[a].modelMatrix,m))throw new o.t("All instances must have the same modelMatrix.");if(n.e(e[a][t].indices)!==h)throw new o.t("All instance geometries must have an indices or not have one.");if(e[a][t].primitiveType!==d)throw new o.t("All instance geometries must have the same primitiveType.")}var b,w,g,x,T=function(e,t){var r,i=e.length,o={},a=e[0][t].attributes;for(r in a)if(a.hasOwnProperty(r)&&n.e(a[r])&&n.e(a[r].values)){for(var s=a[r],u=s.values.length,p=!0,v=1;v<i;++v){var y=e[v][t].attributes[r];if(!n.e(y)||s.componentDatatype!==y.componentDatatype||s.componentsPerAttribute!==y.componentsPerAttribute||s.normalize!==y.normalize){p=!1;break}u+=y.values.length}p&&(o[r]=new c.o({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:l.ComponentDatatype.createTypedArray(s.componentDatatype,u)}),s.isInstanceAttribute&&(o[r].isInstanceAttribute=!0))}return o}(e,t);for(r in T)if(T.hasOwnProperty(r))for(b=T[r].values,p=0,a=0;a<v;++a)for(g=(w=e[a][t].attributes[r].values).length,u=0;u<g;++u)b[p++]=w[u];if(h){var A=0;for(a=0;a<v;++a)A+=e[a][t].indices.length;var I=c.I.computeNumberOfVertices(new c.I({attributes:T,primitiveType:f._0x3b3836.POINTS})),S=y.IndexDatatype.createTypedArray(I,A),N=0,P=0;for(a=0;a<v;++a){var E=e[a][t].indices,O=E.length;for(p=0;p<O;++p)S[N++]=P+E[p];P+=c.I.computeNumberOfVertices(e[a][t])}x=S}var L,D=new i.o,z=0;for(a=0;a<v;++a){if(L=e[a][t].boundingSphere,!n.e(L)){D=void 0;break}i.o.add(L.center,D,D)}if(n.e(D))for(i.o.divideByScalar(D,v,D),a=0;a<v;++a){L=e[a][t].boundingSphere;var _=i.o.magnitude(i.o.subtract(L.center,D,q))+L.radius;_>z&&(z=_)}return new c.I({attributes:T,indices:x,primitiveType:d,boundingSphere:n.e(D)?new s.i(D,z):void 0})}T.combineInstances=function(e){if(!n.e(e)||e.length<1)throw new o.t("instances is required and must have length greater than zero.");for(var t=[],r=[],i=e.length,a=0;a<i;++a){var s=e[a];n.e(s.geometry)?t.push(s):n.e(s.westHemisphereGeometry)&&n.e(s.eastHemisphereGeometry)&&r.push(s)}var u=[];return t.length>0&&u.push(C(t,"geometry")),r.length>0&&(u.push(C(r,"westHemisphereGeometry")),u.push(C(r,"eastHemisphereGeometry"))),u};var R=new i.o,G=new i.o,F=new i.o,k=new i.o;T.computeNormal=function(e){if(!n.e(e))throw new o.t("geometry is required.");if(!n.e(e.attributes.position)||!n.e(e.attributes.position.values))throw new o.t("geometry.attributes.position.values is required.");if(!n.e(e.indices))throw new o.t("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!=0)throw new o.t("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==f._0x3b3836.TRIANGLES)throw new o.t("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var t,r=e.indices,s=e.attributes,u=s.position.values,p=s.position.values.length/3,v=r.length,y=new Array(p),m=new Array(v/3),h=new Array(v);for(t=0;t<p;t++)y[t]={indexOffset:0,count:0,currentCount:0};var d=0;for(t=0;t<v;t+=3){var b=r[t],w=r[t+1],g=r[t+2],x=3*b,T=3*w,A=3*g;G.x=u[x],G.y=u[x+1],G.z=u[x+2],F.x=u[T],F.y=u[T+1],F.z=u[T+2],k.x=u[A],k.y=u[A+1],k.z=u[A+2],y[b].count++,y[w].count++,y[g].count++,i.o.subtract(F,G,F),i.o.subtract(k,G,k),m[d]=i.o.cross(F,k,new i.o),d++}var I,S=0;for(t=0;t<p;t++)y[t].indexOffset+=S,S+=y[t].count;for(d=0,t=0;t<v;t+=3){var N=(I=y[r[t]]).indexOffset+I.currentCount;h[N]=d,I.currentCount++,h[N=(I=y[r[t+1]]).indexOffset+I.currentCount]=d,I.currentCount++,h[N=(I=y[r[t+2]]).indexOffset+I.currentCount]=d,I.currentCount++,d++}var P=new Float32Array(3*p);for(t=0;t<p;t++){var E=3*t;if(I=y[t],i.o.clone(i.o.ZERO,R),I.count>0){for(d=0;d<I.count;d++)i.o.add(R,m[h[I.indexOffset+d]],R);i.o.equalsEpsilon(i.o.ZERO,R,a.e.EPSILON10)&&i.o.clone(m[h[I.indexOffset]],R)}i.o.equalsEpsilon(i.o.ZERO,R,a.e.EPSILON10)&&(R.z=1),i.o.normalize(R,R),P[E]=R.x,P[E+1]=R.y,P[E+2]=R.z}return e.attributes.normal=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:P}),e};var B=new i.o,M=new i.o,U=new i.o;T.computeTangentAndBitangent=function(e){if(!n.e(e))throw new o.t("geometry is required.");var t=e.attributes,r=e.indices;if(!n.e(t.position)||!n.e(t.position.values))throw new o.t("geometry.attributes.position.values is required.");if(!n.e(t.normal)||!n.e(t.normal.values))throw new o.t("geometry.attributes.normal.values is required.");if(!n.e(t.st)||!n.e(t.st.values))throw new o.t("geometry.attributes.st.values is required.");if(!n.e(r))throw new o.t("geometry.indices is required.");if(r.length<2||r.length%3!=0)throw new o.t("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==f._0x3b3836.TRIANGLES)throw new o.t("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var a,s,u,p,v=e.attributes.position.values,y=e.attributes.normal.values,m=e.attributes.st.values,h=e.attributes.position.values.length/3,d=r.length,b=new Array(3*h);for(a=0;a<b.length;a++)b[a]=0;for(a=0;a<d;a+=3){var w=r[a],g=r[a+1],x=r[a+2];u=3*g,p=3*x;var T=2*w,A=2*g,I=2*x,S=v[s=3*w],N=v[s+1],P=v[s+2],E=m[T],O=m[T+1],L=m[A+1]-O,D=m[I+1]-O,z=1/((m[A]-E)*D-(m[I]-E)*L),_=(D*(v[u]-S)-L*(v[p]-S))*z,q=(D*(v[u+1]-N)-L*(v[p+1]-N))*z,C=(D*(v[u+2]-P)-L*(v[p+2]-P))*z;b[s]+=_,b[s+1]+=q,b[s+2]+=C,b[u]+=_,b[u+1]+=q,b[u+2]+=C,b[p]+=_,b[p+1]+=q,b[p+2]+=C}var R=new Float32Array(3*h),G=new Float32Array(3*h);for(a=0;a<h;a++){u=(s=3*a)+1,p=s+2;var F=i.o.fromArray(y,s,B),k=i.o.fromArray(b,s,U),V=i.o.dot(F,k);i.o.multiplyByScalar(F,V,M),i.o.normalize(i.o.subtract(k,M,k),k),R[s]=k.x,R[u]=k.y,R[p]=k.z,i.o.normalize(i.o.cross(F,k,k),k),G[s]=k.x,G[u]=k.y,G[p]=k.z}return e.attributes.tangent=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R}),e.attributes.bitangent=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G}),e};var V=new r.o,Y=new i.o,Z=new i.o,H=new i.o,W=new r.o;function X(e){switch(e.primitiveType){case f._0x3b3836.TRIANGLE_FAN:return function(e){var t=c.I.computeNumberOfVertices(e);if(t<3)throw new o.t("The number of vertices must be at least three.");var r=y.IndexDatatype.createTypedArray(t,3*(t-2));r[0]=1,r[1]=0,r[2]=2;for(var i=3,n=3;n<t;++n)r[i++]=n-1,r[i++]=0,r[i++]=n;return e.indices=r,e.primitiveType=f._0x3b3836.TRIANGLES,e}(e);case f._0x3b3836.TRIANGLE_STRIP:return function(e){var t=c.I.computeNumberOfVertices(e);if(t<3)throw new o.t("The number of vertices must be at least 3.");var r=y.IndexDatatype.createTypedArray(t,3*(t-2));r[0]=0,r[1]=1,r[2]=2,t>3&&(r[3]=0,r[4]=2,r[5]=3);for(var i=6,n=3;n<t-1;n+=2)r[i++]=n,r[i++]=n-1,r[i++]=n+1,n+2<t&&(r[i++]=n,r[i++]=n+1,r[i++]=n+2);return e.indices=r,e.primitiveType=f._0x3b3836.TRIANGLES,e}(e);case f._0x3b3836.TRIANGLES:return function(e){if(n.e(e.indices))return e;var t=c.I.computeNumberOfVertices(e);if(t<3)throw new o.t("The number of vertices must be at least three.");if(t%3!=0)throw new o.t("The number of vertices must be a multiple of three.");for(var r=y.IndexDatatype.createTypedArray(t,t),i=0;i<t;++i)r[i]=i;return e.indices=r,e}(e);case f._0x3b3836.LINE_STRIP:return function(e){var t=c.I.computeNumberOfVertices(e);if(t<2)throw new o.t("The number of vertices must be at least two.");var r=y.IndexDatatype.createTypedArray(t,2*(t-1));r[0]=0,r[1]=1;for(var i=2,n=2;n<t;++n)r[i++]=n-1,r[i++]=n;return e.indices=r,e.primitiveType=f._0x3b3836.LINES,e}(e);case f._0x3b3836.LINE_LOOP:return function(e){var t=c.I.computeNumberOfVertices(e);if(t<2)throw new o.t("The number of vertices must be at least two.");var r=y.IndexDatatype.createTypedArray(t,2*t);r[0]=0,r[1]=1;for(var i=2,n=2;n<t;++n)r[i++]=n-1,r[i++]=n;return r[i++]=t-1,r[i]=0,e.indices=r,e.primitiveType=f._0x3b3836.LINES,e}(e);case f._0x3b3836.LINES:return function(e){if(n.e(e.indices))return e;var t=c.I.computeNumberOfVertices(e);if(t<2)throw new o.t("The number of vertices must be at least two.");if(t%2!=0)throw new o.t("The number of vertices must be a multiple of 2.");for(var r=y.IndexDatatype.createTypedArray(t,t),i=0;i<t;++i)r[i]=i;return e.indices=r,e}(e)}return e}function j(e,t){Math.abs(e.y)<a.e.EPSILON6&&(e.y=t?-a.e.EPSILON6:a.e.EPSILON6)}T.compressVertices=function(e){if(!n.e(e))throw new o.t("geometry is required.");var a,s,u=e.attributes.extrudeDirection;if(n.e(u)){var p=u.values;s=p.length/3;var v=new Float32Array(2*s),y=0;for(a=0;a<s;++a)i.o.fromArray(p,3*a,Y),i.o.equals(Y,i.o.ZERO)?y+=2:(W=t.t.octEncodeInRange(Y,65535,W),v[y++]=W.x,v[y++]=W.y);return e.attributes.compressedAttributes=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:v}),delete e.attributes.extrudeDirection,e}var m=e.attributes.normal,f=e.attributes.st,h=n.e(m),d=n.e(f);if(!h&&!d)return e;var b,w,g,x,T=e.attributes.tangent,A=e.attributes.bitangent,I=n.e(T),S=n.e(A);h&&(b=m.values),d&&(w=f.values),I&&(g=T.values),S&&(x=A.values);var N=s=(h?b.length:w.length)/(h?3:2),P=d&&h?2:1;P+=I||S?1:0;var E=new Float32Array(N*=P),O=0;for(a=0;a<s;++a){d&&(r.o.fromArray(w,2*a,V),E[O++]=t.t.compressTextureCoordinates(V));var L=3*a;h&&n.e(g)&&n.e(x)?(i.o.fromArray(b,L,Y),i.o.fromArray(g,L,Z),i.o.fromArray(x,L,H),t.t.octPack(Y,Z,H,V),E[O++]=V.x,E[O++]=V.y):(h&&(i.o.fromArray(b,L,Y),E[O++]=t.t.octEncodeFloat(Y)),I&&(i.o.fromArray(g,L,Y),E[O++]=t.t.octEncodeFloat(Y)),S&&(i.o.fromArray(x,L,Y),E[O++]=t.t.octEncodeFloat(Y)))}return e.attributes.compressedAttributes=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:P,values:E}),h&&delete e.attributes.normal,d&&delete e.attributes.st,S&&delete e.attributes.bitangent,I&&delete e.attributes.tangent,e};var J=new i.o;function K(e,t,r,o){i.o.add(e,i.o.multiplyByScalar(i.o.subtract(t,e,J),e.y/(e.y-t.y),J),r),i.o.clone(r,o),j(r,!0),j(o,!1)}var $=new i.o,Q=new i.o,ee=new i.o,te=new i.o,re={positions:new Array(7),indices:new Array(9)};function ie(e,t,r){if(!(e.x>=0||t.x>=0||r.x>=0)){!function(e,t,r){if(0!==e.y&&0!==t.y&&0!==r.y)return j(e,e.y<0),j(t,t.y<0),void j(r,r.y<0);var i=Math.abs(e.y),o=Math.abs(t.y),n=Math.abs(r.y),s=(i>o?i>n?a.e.sign(e.y):a.e.sign(r.y):o>n?a.e.sign(t.y):a.e.sign(r.y))<0;j(e,s),j(t,s),j(r,s)}(e,t,r);var i=e.y<0,o=t.y<0,n=r.y<0,s=0;s+=i?1:0,s+=o?1:0;var u=re.indices;1===(s+=n?1:0)?(u[1]=3,u[2]=4,u[5]=6,u[7]=6,u[8]=5,i?(K(e,t,$,ee),K(e,r,Q,te),u[0]=0,u[3]=1,u[4]=2,u[6]=1):o?(K(t,r,$,ee),K(t,e,Q,te),u[0]=1,u[3]=2,u[4]=0,u[6]=2):n&&(K(r,e,$,ee),K(r,t,Q,te),u[0]=2,u[3]=0,u[4]=1,u[6]=0)):2===s&&(u[2]=4,u[4]=4,u[5]=3,u[7]=5,u[8]=6,i?o?n||(K(r,e,$,ee),K(r,t,Q,te),u[0]=0,u[1]=1,u[3]=0,u[6]=2):(K(t,r,$,ee),K(t,e,Q,te),u[0]=2,u[1]=0,u[3]=2,u[6]=1):(K(e,t,$,ee),K(e,r,Q,te),u[0]=1,u[1]=2,u[3]=1,u[6]=0));var p=re.positions;return p[0]=e,p[1]=t,p[2]=r,p.length=3,(1===s||2===s)&&(p[3]=$,p[4]=Q,p[5]=ee,p[6]=te,p.length=7),re}}function oe(e,t){var r=e.attributes;if(0!==r.position.values.length){for(var i in r)if(r.hasOwnProperty(i)&&n.e(r[i])&&n.e(r[i].values)){var o=r[i];o.values=l.ComponentDatatype.createTypedArray(o.componentDatatype,o.values)}var a=c.I.computeNumberOfVertices(e);return e.indices=y.IndexDatatype.createTypedArray(a,e.indices),t&&(e.boundingSphere=s.i.fromVertices(r.position.values)),e}}function ne(e){var t=e.attributes,r={};for(var i in t)if(t.hasOwnProperty(i)&&n.e(t[i])&&n.e(t[i].values)){var o=t[i];r[i]=new c.o({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new c.I({attributes:r,indices:[],primitiveType:e.primitiveType})}function ae(e,t,r){var i=n.e(e.geometry.boundingSphere);t=oe(t,i),r=oe(r,i),n.e(r)&&!n.e(t)?e.geometry=r:!n.e(r)&&n.e(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=r,e.geometry=void 0)}function se(e,t){var r=new e,i=new e,o=new e;return function(n,a,s,u,p,l,v,c){var y=e.fromArray(p,n*t,r),m=e.fromArray(p,a*t,i),f=e.fromArray(p,s*t,o);e.multiplyByScalar(y,u.x,y),e.multiplyByScalar(m,u.y,m),e.multiplyByScalar(f,u.z,f);var h=e.add(y,m,y);e.add(h,f,h),c&&e.normalize(h,h),e.pack(h,l,v*t)}}var ue=se(u.e,4),pe=se(i.o,3),le=se(r.o,2),ve=new i.o,ce=new i.o,ye=new i.o,me=new i.o;function fe(e,t,r,o,s,u,p,l,v,c,y,m,f,h,d,b){if(n.e(u)||n.e(p)||n.e(l)||n.e(v)||n.e(c)||0!==h){var w=g(o,i.o.fromArray(s,3*e,ve),i.o.fromArray(s,3*t,ce),i.o.fromArray(s,3*r,ye),me);if(n.e(u)&&pe(e,t,r,w,u,m.normal.values,b,!0),n.e(c)){var x,T=i.o.fromArray(c,3*e,ve),A=i.o.fromArray(c,3*t,ce),I=i.o.fromArray(c,3*r,ye);i.o.multiplyByScalar(T,w.x,T),i.o.multiplyByScalar(A,w.y,A),i.o.multiplyByScalar(I,w.z,I),i.o.equals(T,i.o.ZERO)&&i.o.equals(A,i.o.ZERO)&&i.o.equals(I,i.o.ZERO)?((x=ve).x=0,x.y=0,x.z=0):(x=i.o.add(T,A,T),i.o.add(x,I,x),i.o.normalize(x,x)),i.o.pack(x,m.extrudeDirection.values,3*b)}if(n.e(y)&&function(e,t,r,i,o,n,s){var u=o[e]*i.x,p=o[t]*i.y,l=o[r]*i.z;n[s]=u+p+l>a.e.EPSILON6?1:0}(e,t,r,w,y,m.applyOffset.values,b),n.e(p)&&pe(e,t,r,w,p,m.tangent.values,b,!0),n.e(l)&&pe(e,t,r,w,l,m.bitangent.values,b,!0),n.e(v)&&le(e,t,r,w,v,m.st.values,b),h>0)for(var S=0;S<h;S++){var N=f[S];he(e,t,r,w,b,d[N],m[N])}}}function he(e,t,r,i,o,n,a){var s=n.componentsPerAttribute,u=n.values,p=a.values;switch(s){case 4:ue(e,t,r,i,u,p,o,!1);break;case 3:pe(e,t,r,i,u,p,o,!1);break;case 2:le(e,t,r,i,u,p,o,!1);break;default:p[o]=u[e]*i.x+u[t]*i.y+u[r]*i.z}}function de(e,t,r,i,o,n){var a=e.position.values.length/3;if(-1!==o){var s=i[o],u=r[s];return-1===u?(r[s]=a,e.position.values.push(n.x,n.y,n.z),t.push(a),a):(t.push(u),u)}return e.position.values.push(n.x,n.y,n.z),t.push(a),a}var be={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function we(e){var t=e.geometry,r=t.attributes,o=r.position.values,a=n.e(r.normal)?r.normal.values:void 0,s=n.e(r.bitangent)?r.bitangent.values:void 0,u=n.e(r.tangent)?r.tangent.values:void 0,p=n.e(r.st)?r.st.values:void 0,l=n.e(r.extrudeDirection)?r.extrudeDirection.values:void 0,v=n.e(r.applyOffset)?r.applyOffset.values:void 0,c=t.indices,y=[];for(var m in r)r.hasOwnProperty(m)&&!be[m]&&n.e(r[m])&&y.push(m);var f,h,d,b,w=y.length,g=ne(t),x=ne(t),T=[];T.length=o.length/3;var A=[];for(A.length=o.length/3,b=0;b<T.length;++b)T[b]=-1,A[b]=-1;var I=c.length;for(b=0;b<I;b+=3){var S=c[b],N=c[b+1],P=c[b+2],E=i.o.fromArray(o,3*S),O=i.o.fromArray(o,3*N),L=i.o.fromArray(o,3*P),D=ie(E,O,L);if(n.e(D)&&D.positions.length>3)for(var z=D.positions,_=D.indices,q=_.length,C=0;C<q;++C){var R=_[C],G=z[R];G.y<0?(f=x.attributes,h=x.indices,d=T):(f=g.attributes,h=g.indices,d=A),fe(S,N,P,G,o,a,u,s,p,l,v,f,y,w,r,de(f,h,d,c,R<3?b+R:-1,G))}else n.e(D)&&(E=D.positions[0],O=D.positions[1],L=D.positions[2]),E.y<0?(f=x.attributes,h=x.indices,d=T):(f=g.attributes,h=g.indices,d=A),fe(S,N,P,E,o,a,u,s,p,l,v,f,y,w,r,de(f,h,d,c,b,E)),fe(S,N,P,O,o,a,u,s,p,l,v,f,y,w,r,de(f,h,d,c,b+1,O)),fe(S,N,P,L,o,a,u,s,p,l,v,f,y,w,r,de(f,h,d,c,b+2,L))}ae(e,x,g)}var ge=h.o.fromPointNormal(i.o.ZERO,i.o.UNIT_Y),xe=new i.o,Te=new i.o;function Ae(e,t,r,o,s,u,p){if(n.e(p)){var l=i.o.fromArray(o,3*e,ve);i.o.equalsEpsilon(l,r,a.e.EPSILON10)?u.applyOffset.values[s]=p[e]:u.applyOffset.values[s]=p[t]}}function Ie(e){var t,r=e.geometry,o=r.attributes,s=o.position.values,u=n.e(o.applyOffset)?o.applyOffset.values:void 0,p=r.indices,l=ne(r),v=ne(r),c=p.length,y=[];y.length=s.length/3;var f=[];for(f.length=s.length/3,t=0;t<y.length;++t)y[t]=-1,f[t]=-1;for(t=0;t<c;t+=2){var h=p[t],d=p[t+1],b=i.o.fromArray(s,3*h,ve),w=i.o.fromArray(s,3*d,ce);Math.abs(b.y)<a.e.EPSILON6&&(b.y<0?b.y=-a.e.EPSILON6:b.y=a.e.EPSILON6),Math.abs(w.y)<a.e.EPSILON6&&(w.y<0?w.y=-a.e.EPSILON6:w.y=a.e.EPSILON6);var g=l.attributes,x=l.indices,T=f,A=v.attributes,I=v.indices,S=y,N=m.g.lineSegmentPlane(b,w,ge,ye);if(n.e(N)){var P=i.o.multiplyByScalar(i.o.UNIT_Y,5*a.e.EPSILON9,xe);b.y<0&&(i.o.negate(P,P),g=v.attributes,x=v.indices,T=y,A=l.attributes,I=l.indices,S=f);var E=i.o.add(N,P,Te);Ae(h,d,b,s,de(g,x,T,p,t,b),g,u),Ae(h,d,E,s,de(g,x,T,p,-1,E),g,u),i.o.negate(P,P),i.o.add(N,P,E),Ae(h,d,E,s,de(A,I,S,p,-1,E),A,u),Ae(h,d,w,s,de(A,I,S,p,t+1,w),A,u)}else{var O,L,D;b.y<0?(O=v.attributes,L=v.indices,D=y):(O=l.attributes,L=l.indices,D=f),Ae(h,d,b,s,de(O,L,D,p,t,b),O,u),Ae(h,d,w,s,de(O,L,D,p,t+1,w),O,u)}}ae(e,v,l)}var Se=new r.o,Ne=new r.o,Pe=new i.o,Ee=new i.o,Oe=new i.o,Le=new i.o,De=new i.o,ze=new i.o,_e=new i.o,qe=new u.e;function Ce(e){for(var t=e.attributes,r=t.position.values,o=t.prevPosition.values,n=t.nextPosition.values,a=r.length,s=0;s<a;s+=3){var u=i.o.unpack(r,s,Pe);if(!(u.x>0)){var p=i.o.unpack(o,s,Ee);(u.y<0&&p.y>0||u.y>0&&p.y<0)&&(s-3>0?(o[s]=r[s-3],o[s+1]=r[s-2],o[s+2]=r[s-1]):i.o.pack(u,o,s));var l=i.o.unpack(n,s,Oe);(u.y<0&&l.y>0||u.y>0&&l.y<0)&&(s+3<a?(n[s]=r[s+3],n[s+1]=r[s+4],n[s+2]=r[s+5]):i.o.pack(u,n,s))}}}var Re=5*a.e.EPSILON9,Ge=a.e.EPSILON6;T.splitLongitude=function(e){if(!n.e(e))throw new o.t("instance is required.");var t=e.geometry,p=t.boundingSphere;if(n.e(p)&&(p.center.x-p.radius>0||s.i.intersectPlane(p,h.o.ORIGIN_ZX_PLANE)!==s.S.INTERSECTING))return e;if(t.geometryType!==c.Me.NONE)switch(t.geometryType){case c.Me.POLYLINES:!function(e){var t,o,s,p=e.geometry,l=p.attributes,v=l.position.values,c=l.prevPosition.values,y=l.nextPosition.values,f=l.expandAndWidth.values,h=n.e(l.st)?l.st.values:void 0,d=n.e(l.color)?l.color.values:void 0,b=n.e(l.dist)?l.dist.values:void 0,w=ne(p),g=ne(p),x=!1,T=v.length/3;for(t=0;t<T;t+=4){var A=t,I=t+2,S=i.o.fromArray(v,3*A,Pe),N=i.o.fromArray(v,3*I,Ee);if(Math.abs(S.y)<Ge)for(S.y=Ge*(N.y<0?-1:1),v[3*t+1]=S.y,v[3*(t+1)+1]=S.y,o=3*A;o<3*A+12;o+=3)c[o]=v[3*t],c[o+1]=v[3*t+1],c[o+2]=v[3*t+2];if(Math.abs(N.y)<Ge)for(N.y=Ge*(S.y<0?-1:1),v[3*(t+2)+1]=N.y,v[3*(t+3)+1]=N.y,o=3*A;o<3*A+12;o+=3)y[o]=v[3*(t+2)],y[o+1]=v[3*(t+2)+1],y[o+2]=v[3*(t+2)+2];var P=w.attributes,E=w.indices,O=g.attributes,L=g.indices,D=m.g.lineSegmentPlane(S,N,ge,Le);if(n.e(D)){x=!0;var z=i.o.multiplyByScalar(i.o.UNIT_Y,Re,De);S.y<0&&(i.o.negate(z,z),P=g.attributes,E=g.indices,O=w.attributes,L=w.indices);var _=i.o.add(D,z,ze);P.position.values.push(S.x,S.y,S.z,S.x,S.y,S.z),P.position.values.push(_.x,_.y,_.z),P.position.values.push(_.x,_.y,_.z),P.prevPosition.values.push(c[3*A],c[3*A+1],c[3*A+2]),P.prevPosition.values.push(c[3*A+3],c[3*A+4],c[3*A+5]),P.prevPosition.values.push(S.x,S.y,S.z,S.x,S.y,S.z),P.nextPosition.values.push(_.x,_.y,_.z),P.nextPosition.values.push(_.x,_.y,_.z),P.nextPosition.values.push(_.x,_.y,_.z),P.nextPosition.values.push(_.x,_.y,_.z),i.o.negate(z,z),i.o.add(D,z,_),O.position.values.push(_.x,_.y,_.z),O.position.values.push(_.x,_.y,_.z),O.position.values.push(N.x,N.y,N.z,N.x,N.y,N.z),O.prevPosition.values.push(_.x,_.y,_.z),O.prevPosition.values.push(_.x,_.y,_.z),O.prevPosition.values.push(_.x,_.y,_.z),O.prevPosition.values.push(_.x,_.y,_.z),O.nextPosition.values.push(N.x,N.y,N.z,N.x,N.y,N.z),O.nextPosition.values.push(y[3*I],y[3*I+1],y[3*I+2]),O.nextPosition.values.push(y[3*I+3],y[3*I+4],y[3*I+5]);var q=r.o.fromArray(f,2*A,Se),C=Math.abs(q.y);P.expandAndWidth.values.push(-1,C,1,C),P.expandAndWidth.values.push(-1,-C,1,-C),O.expandAndWidth.values.push(-1,C,1,C),O.expandAndWidth.values.push(-1,-C,1,-C);var R=i.o.magnitudeSquared(i.o.subtract(D,S,Oe));if(R/=i.o.magnitudeSquared(i.o.subtract(N,S,Oe)),n.e(d)){var G=u.e.fromArray(d,4*A,qe),F=u.e.fromArray(d,4*I,qe),k=a.e.lerp(G.x,F.x,R),B=a.e.lerp(G.y,F.y,R),M=a.e.lerp(G.z,F.z,R),U=a.e.lerp(G.w,F.w,R);for(o=4*A;o<4*A+8;++o)P.color.values.push(d[o]);for(P.color.values.push(k,B,M,U),P.color.values.push(k,B,M,U),O.color.values.push(k,B,M,U),O.color.values.push(k,B,M,U),o=4*I;o<4*I+8;++o)O.color.values.push(d[o])}if(n.e(h)){var V=r.o.fromArray(h,2*A,Se),Y=r.o.fromArray(h,2*(t+3),Ne),Z=a.e.lerp(V.x,Y.x,R);for(o=2*A;o<2*A+4;++o)P.st.values.push(h[o]);for(P.st.values.push(Z,V.y),P.st.values.push(Z,Y.y),O.st.values.push(Z,V.y),O.st.values.push(Z,Y.y),o=2*I;o<2*I+4;++o)O.st.values.push(h[o])}if(n.e(b)){var H=i.o.fromArray(b,3*A,_e),W=i.o.fromArray(b,3*I,_e),X=a.e.lerp(H.x,W.x,R);for(o=3*A;o<3*A+6;++o)P.dist.values.push(b[o]);for(P.dist.values.push(X,H.y,H.z),P.dist.values.push(X,H.y,H.z),O.dist.values.push(X,W.y,W.z),O.dist.values.push(X,W.y,W.z),o=3*I;o<3*I+6;++o)O.dist.values.push(b[o])}s=P.position.values.length/3-4,E.push(s,s+2,s+1),E.push(s+1,s+2,s+3),s=O.position.values.length/3-4,L.push(s,s+2,s+1),L.push(s+1,s+2,s+3)}else{var j,J;for(S.y<0?(j=g.attributes,J=g.indices):(j=w.attributes,J=w.indices),j.position.values.push(S.x,S.y,S.z),j.position.values.push(S.x,S.y,S.z),j.position.values.push(N.x,N.y,N.z),j.position.values.push(N.x,N.y,N.z),o=3*t;o<3*t+12;++o)j.prevPosition.values.push(c[o]),j.nextPosition.values.push(y[o]);for(o=2*t;o<2*t+8;++o)j.expandAndWidth.values.push(f[o]),n.e(h)&&j.st.values.push(h[o]);if(n.e(d))for(o=4*t;o<4*t+16;++o)j.color.values.push(d[o]);if(n.e(b))for(o=3*t;o<3*t+12;++o)j.dist.values.push(b[o]);s=j.position.values.length/3-4,J.push(s,s+2,s+1),J.push(s+1,s+2,s+3)}}x&&(Ce(g),Ce(w)),ae(e,g,w)}(e);break;case c.Me.TRIANGLES:we(e);break;case c.Me.LINES:Ie(e)}else X(t),t.primitiveType===f._0x3b3836.TRIANGLES?we(e):t.primitiveType===f._0x3b3836.LINES&&Ie(e);return e},e.k=T})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/IntersectionTests-6e80d61c.js b/SuperMap iEarth/public/SuperMap3D/Workers/IntersectionTests-9ff29c98.js similarity index 99% rename from SuperMap iEarth/public/SuperMap3D/Workers/IntersectionTests-6e80d61c.js rename to SuperMap iEarth/public/SuperMap3D/Workers/IntersectionTests-9ff29c98.js index 42af1b81..357e6c66 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/IntersectionTests-6e80d61c.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/IntersectionTests-9ff29c98.js @@ -1 +1 @@ -define(["exports","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./when-92c6cf3c","./Check-52a7d806","./buildModuleUrl-9eef8841","./Math-ecf82623","./FeatureDetection-cec0163f"],(function(e,r,t,n,i,o,a,u){"use strict";var s={};function f(e,r,t){var n=e+r;return a.e.sign(e)!==a.e.sign(r)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(r)))<t?0:n}s.computeDiscriminant=function(e,r,t){if("number"!=typeof e)throw new i.t("a is a required number.");if("number"!=typeof r)throw new i.t("b is a required number.");if("number"!=typeof t)throw new i.t("c is a required number.");return r*r-4*e*t},s.computeRealRoots=function(e,r,t){if("number"!=typeof e)throw new i.t("a is a required number.");if("number"!=typeof r)throw new i.t("b is a required number.");if("number"!=typeof t)throw new i.t("c is a required number.");var n;if(0===e)return 0===r?[]:[-t/r];if(0===r){if(0===t)return[0,0];var o=Math.abs(t),u=Math.abs(e);if(o<u&&o/u<a.e.EPSILON14)return[0,0];if(o>u&&u/o<a.e.EPSILON14)return[];if((n=-t/e)<0)return[];var s=Math.sqrt(n);return[-s,s]}if(0===t)return(n=-r/e)<0?[n,0]:[0,n];var c=f(r*r,-(4*e*t),a.e.EPSILON14);if(c<0)return[];var w=-.5*f(r,a.e.sign(r)*Math.sqrt(c),a.e.EPSILON14);return r>0?[w/e,t/w]:[t/w,w/e]};var c={};function w(e,r,t,n){var i,o,a=e,u=r/3,s=t/3,f=n,c=a*s,w=u*f,h=u*u,l=s*s,d=a*s-h,p=a*f-u*s,m=u*f-l,b=4*d*m-p*p;if(b<0){var g,v,q;h*w>=c*l?(g=a,v=d,q=-2*u*d+a*p):(g=f,v=m,q=-f*p+2*s*m);var M=-(q<0?-1:1)*Math.abs(g)*Math.sqrt(-b),y=(o=-q+M)/2,R=y<0?-Math.pow(-y,1/3):Math.pow(y,1/3),S=o===M?-R:-v/R;return i=v<=0?R+S:-q/(R*R+S*S+v),h*w>=c*l?[(i-u)/a]:[-f/(i+s)]}var O=d,P=-2*u*d+a*p,N=m,L=-f*p+2*s*m,$=Math.sqrt(b),E=Math.sqrt(3)/2,I=Math.abs(Math.atan2(a*$,-P)/3);i=2*Math.sqrt(-O);var C=Math.cos(I);o=i*C;var x=i*(-C/2-E*Math.sin(I)),z=o+x>2*u?o-u:x-u,U=a,T=z/U;I=Math.abs(Math.atan2(f*$,-L)/3);var W=-f,B=(o=(i=2*Math.sqrt(-N))*(C=Math.cos(I)))+(x=i*(-C/2-E*Math.sin(I)))<2*s?o+s:x+s,Z=W/B,D=-z*B-U*W,V=(s*D-u*(z*W))/(-u*D+s*(U*B));return T<=V?T<=Z?V<=Z?[T,V,Z]:[T,Z,V]:[Z,T,V]:T<=Z?[V,T,Z]:V<=Z?[V,Z,T]:[Z,V,T]}c.computeDiscriminant=function(e,r,t,n){if("number"!=typeof e)throw new i.t("a is a required number.");if("number"!=typeof r)throw new i.t("b is a required number.");if("number"!=typeof t)throw new i.t("c is a required number.");if("number"!=typeof n)throw new i.t("d is a required number.");var o=r*r,a=t*t;return 18*e*r*t*n+o*a-27*(e*e)*(n*n)-4*(e*a*t+o*r*n)},c.computeRealRoots=function(e,r,t,n){if("number"!=typeof e)throw new i.t("a is a required number.");if("number"!=typeof r)throw new i.t("b is a required number.");if("number"!=typeof t)throw new i.t("c is a required number.");if("number"!=typeof n)throw new i.t("d is a required number.");var o,a;if(0===e)return s.computeRealRoots(r,t,n);if(0===r){if(0===t){if(0===n)return[0,0,0];var u=(a=-n/e)<0?-Math.pow(-a,1/3):Math.pow(a,1/3);return[u,u,u]}return 0===n?0===(o=s.computeRealRoots(e,0,t)).Length?[0]:[o[0],0,o[1]]:w(e,0,t,n)}return 0===t?0===n?(a=-r/e)<0?[a,0,0]:[0,0,a]:w(e,r,0,n):0===n?0===(o=s.computeRealRoots(e,r,t)).length?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]:w(e,r,t,n)};var h={};function l(e,r,t,n){var i=e*e,o=r-3*i/8,u=t-r*e/2+i*e/8,f=n-t*e/4+r*i/16-3*i*i/256,w=c.computeRealRoots(1,2*o,o*o-4*f,-u*u);if(w.length>0){var h=-e/4,l=w[w.length-1];if(Math.abs(l)<a.e.EPSILON14){var d=s.computeRealRoots(1,o,f);if(2===d.length){var p,m=d[0],b=d[1];if(m>=0&&b>=0){var g=Math.sqrt(m),v=Math.sqrt(b);return[h-v,h-g,h+g,h+v]}if(m>=0&&b<0)return[h-(p=Math.sqrt(m)),h+p];if(m<0&&b>=0)return[h-(p=Math.sqrt(b)),h+p]}return[]}if(l>0){var q=Math.sqrt(l),M=(o+l-u/q)/2,y=(o+l+u/q)/2,R=s.computeRealRoots(1,q,M),S=s.computeRealRoots(1,-q,y);return 0!==R.length?(R[0]+=h,R[1]+=h,0!==S.length?(S[0]+=h,S[1]+=h,R[1]<=S[0]?[R[0],R[1],S[0],S[1]]:S[1]<=R[0]?[S[0],S[1],R[0],R[1]]:R[0]>=S[0]&&R[1]<=S[1]?[S[0],R[0],R[1],S[1]]:S[0]>=R[0]&&S[1]<=R[1]?[R[0],S[0],S[1],R[1]]:R[0]>S[0]&&R[0]<S[1]?[S[0],R[0],S[1],R[1]]:[R[0],S[0],R[1],S[1]]):R):0!==S.length?(S[0]+=h,S[1]+=h,S):[]}}return[]}function d(e,r,t,n){var i=e*e,o=-2*r,u=t*e+r*r-4*n,f=i*n-t*r*e+t*t,w=c.computeRealRoots(1,o,u,f);if(w.length>0){var h,l,d,p,m,b,g=w[0],v=r-g,q=v*v,M=e/2,y=v/2,R=q-4*n,S=q+4*Math.abs(n),O=i-4*g,P=i+4*Math.abs(g);if(g<0||R*P<O*S){var N=Math.sqrt(O);h=N/2,l=0===N?0:(e*y-t)/N}else{var L=Math.sqrt(R);h=0===L?0:(e*y-t)/L,l=L/2}0===M&&0===h?(d=0,p=0):a.e.sign(M)===a.e.sign(h)?p=g/(d=M+h):d=g/(p=M-h),0===y&&0===l?(m=0,b=0):a.e.sign(y)===a.e.sign(l)?b=n/(m=y+l):m=n/(b=y-l);var $=s.computeRealRoots(1,d,m),E=s.computeRealRoots(1,p,b);if(0!==$.length)return 0!==E.length?$[1]<=E[0]?[$[0],$[1],E[0],E[1]]:E[1]<=$[0]?[E[0],E[1],$[0],$[1]]:$[0]>=E[0]&&$[1]<=E[1]?[E[0],$[0],$[1],E[1]]:E[0]>=$[0]&&E[1]<=$[1]?[$[0],E[0],E[1],$[1]]:$[0]>E[0]&&$[0]<E[1]?[E[0],$[0],E[1],$[1]]:[$[0],E[0],$[1],E[1]]:$;if(0!==E.length)return E}return[]}function p(e,t){t=r.o.clone(n.u(t,r.o.ZERO)),r.o.equals(t,r.o.ZERO)||r.o.normalize(t,t),this.origin=r.o.clone(n.u(e,r.o.ZERO)),this.direction=t}h.computeDiscriminant=function(e,r,t,n,o){if("number"!=typeof e)throw new i.t("a is a required number.");if("number"!=typeof r)throw new i.t("b is a required number.");if("number"!=typeof t)throw new i.t("c is a required number.");if("number"!=typeof n)throw new i.t("d is a required number.");if("number"!=typeof o)throw new i.t("e is a required number.");var a=e*e,u=r*r,s=u*r,f=t*t,c=f*t,w=n*n,h=w*n,l=o*o;return u*f*w-4*s*h-4*e*c*w+18*e*r*t*h-27*a*w*w+256*(a*e)*(l*o)+o*(18*s*t*n-4*u*c+16*e*f*f-80*e*r*f*n-6*e*u*w+144*a*t*w)+l*(144*e*u*t-27*u*u-128*a*f-192*a*r*n)},h.computeRealRoots=function(e,r,t,n,o){if("number"!=typeof e)throw new i.t("a is a required number.");if("number"!=typeof r)throw new i.t("b is a required number.");if("number"!=typeof t)throw new i.t("c is a required number.");if("number"!=typeof n)throw new i.t("d is a required number.");if("number"!=typeof o)throw new i.t("e is a required number.");if(Math.abs(e)<a.e.EPSILON15)return c.computeRealRoots(r,t,n,o);var u=r/e,s=t/e,f=n/e,w=o/e,h=u<0?1:0;switch(h+=s<0?h+1:h,h+=f<0?h+1:h,h+=w<0?h+1:h){case 0:case 3:case 4:case 6:case 7:case 9:case 10:case 12:case 13:case 14:case 15:return l(u,s,f,w);case 1:case 2:case 5:case 8:case 11:return d(u,s,f,w);default:return}},p.clone=function(e,t){if(n.e(e))return n.e(t)?(t.origin=r.o.clone(e.origin),t.direction=r.o.clone(e.direction),t):new p(e.origin,e.direction)},p.getPoint=function(e,t,o){return i.o.typeOf.object("ray",e),i.o.typeOf.number("t",t),n.e(o)||(o=new r.o),o=r.o.multiplyByScalar(e.direction,t,o),r.o.add(e.origin,o,o)};var m={rayPlane:function(e,t,o){if(!n.e(e))throw new i.t("ray is required.");if(!n.e(t))throw new i.t("plane is required.");n.e(o)||(o=new r.o);var u=e.origin,s=e.direction,f=t.normal,c=r.o.dot(f,s);if(!(Math.abs(c)<a.e.EPSILON15)){var w=(-t.distance-r.o.dot(f,u))/c;if(!(w<0))return o=r.o.multiplyByScalar(s,w,o),r.o.add(u,o,o)}}},b=new r.o,g=new r.o,v=new r.o,q=new r.o,M=new r.o;m.rayTriangleParametric=function(e,t,o,u,s){if(!n.e(e))throw new i.t("ray is required.");if(!n.e(t))throw new i.t("p0 is required.");if(!n.e(o))throw new i.t("p1 is required.");if(!n.e(u))throw new i.t("p2 is required.");s=n.u(s,!1);var f,c,w,h,l,d=e.origin,p=e.direction,m=r.o.subtract(o,t,b),y=r.o.subtract(u,t,g),R=r.o.cross(p,y,v),S=r.o.dot(m,R);if(s){if(S<a.e.EPSILON6||(f=r.o.subtract(d,t,q),(w=r.o.dot(f,R))<0||w>S)||(c=r.o.cross(f,m,M),(h=r.o.dot(p,c))<0||w+h>S))return;l=r.o.dot(y,c)/S}else{if(Math.abs(S)<a.e.EPSILON6)return;var O=1/S;if(f=r.o.subtract(d,t,q),(w=r.o.dot(f,R)*O)<0||w>1||(c=r.o.cross(f,m,M),(h=r.o.dot(p,c)*O)<0||w+h>1))return;l=r.o.dot(y,c)*O}return l},m.rayTriangle=function(e,t,i,o,a,u){var s=m.rayTriangleParametric(e,t,i,o,a);if(n.e(s)&&!(s<0))return n.e(u)||(u=new r.o),r.o.multiplyByScalar(e.direction,s,u),r.o.add(e.origin,u,u)};var y=new p;m.lineSegmentTriangle=function(e,t,o,a,u,s,f){if(!n.e(e))throw new i.t("v0 is required.");if(!n.e(t))throw new i.t("v1 is required.");if(!n.e(o))throw new i.t("p0 is required.");if(!n.e(a))throw new i.t("p1 is required.");if(!n.e(u))throw new i.t("p2 is required.");var c=y;r.o.clone(e,c.origin),r.o.subtract(t,e,c.direction),r.o.normalize(c.direction,c.direction);var w=m.rayTriangleParametric(c,o,a,u,s);if(!(!n.e(w)||w<0||w>r.o.distance(e,t)))return n.e(f)||(f=new r.o),r.o.multiplyByScalar(c.direction,w,f),r.o.add(c.origin,f,f)};var R={root0:0,root1:0};function S(e,t,i){n.e(i)||(i=new o.o);var a=e.origin,u=e.direction,s=t.center,f=t.radius*t.radius,c=r.o.subtract(a,s,v),w=function(e,r,t,n){var i=r*r-4*e*t;if(!(i<0)){if(i>0){var o=1/(2*e),a=Math.sqrt(i),u=(-r+a)*o,s=(-r-a)*o;return u<s?(n.root0=u,n.root1=s):(n.root0=s,n.root1=u),n}var f=-r/(2*e);if(0!==f)return n.root0=n.root1=f,n}}(r.o.dot(u,u),2*r.o.dot(u,c),r.o.magnitudeSquared(c)-f,R);if(n.e(w))return i.start=w.root0,i.stop=w.root1,i}m.raySphere=function(e,r,t){if(!n.e(e))throw new i.t("ray is required.");if(!n.e(r))throw new i.t("sphere is required.");if(t=S(e,r,t),n.e(t)&&!(t.stop<0))return t.start=Math.max(t.start,0),t};var O=new p;m.lineSegmentSphere=function(e,t,o,a){if(!n.e(e))throw new i.t("p0 is required.");if(!n.e(t))throw new i.t("p1 is required.");if(!n.e(o))throw new i.t("sphere is required.");var u=O;r.o.clone(e,u.origin);var s=r.o.subtract(t,e,u.direction),f=r.o.magnitude(s);if(r.o.normalize(s,s),a=S(u,o,a),!(!n.e(a)||a.stop<0||a.start>f))return a.start=Math.max(a.start,0),a.stop=Math.min(a.stop,f),a};var P=new r.o,N=new r.o;function L(e,r,t){var n=e+r;return a.e.sign(e)!==a.e.sign(r)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(r)))<t?0:n}function $(e,t,n,i,o){var f,c=i*i,w=o*o,l=(e[u.p$1.COLUMN1ROW1]-e[u.p$1.COLUMN2ROW2])*w,d=o*(i*L(e[u.p$1.COLUMN1ROW0],e[u.p$1.COLUMN0ROW1],a.e.EPSILON15)+t.y),p=e[u.p$1.COLUMN0ROW0]*c+e[u.p$1.COLUMN2ROW2]*w+i*t.x+n,m=w*L(e[u.p$1.COLUMN2ROW1],e[u.p$1.COLUMN1ROW2],a.e.EPSILON15),b=o*(i*L(e[u.p$1.COLUMN2ROW0],e[u.p$1.COLUMN0ROW2])+t.z),g=[];if(0===b&&0===m){if(0===(f=s.computeRealRoots(l,d,p)).length)return g;var v=f[0],q=Math.sqrt(Math.max(1-v*v,0));if(g.push(new r.o(i,o*v,o*-q)),g.push(new r.o(i,o*v,o*q)),2===f.length){var M=f[1],y=Math.sqrt(Math.max(1-M*M,0));g.push(new r.o(i,o*M,o*-y)),g.push(new r.o(i,o*M,o*y))}return g}var R=b*b,S=m*m,O=b*m,P=l*l+S,N=2*(d*l+O),$=2*p*l+d*d-S+R,E=2*(p*d-O),I=p*p-R;if(0===P&&0===N&&0===$&&0===E)return g;var C=(f=h.computeRealRoots(P,N,$,E,I)).length;if(0===C)return g;for(var x=0;x<C;++x){var z=f[x],U=z*z,T=Math.max(1-U,0),W=Math.sqrt(T),B=(a.e.sign(l)===a.e.sign(p)?L(l*U+p,d*z,a.e.EPSILON12):a.e.sign(p)===a.e.sign(d*z)?L(l*U,d*z+p,a.e.EPSILON12):L(l*U+d*z,p,a.e.EPSILON12))*L(m*z,b,a.e.EPSILON15);B<0?g.push(new r.o(i,o*z,o*W)):B>0?g.push(new r.o(i,o*z,o*-W)):0!==W?(g.push(new r.o(i,o*z,o*-W)),g.push(new r.o(i,o*z,o*W)),++x):g.push(new r.o(i,o*z,o*W))}return g}m.rayEllipsoid=function(e,t){if(!n.e(e))throw new i.t("ray is required.");if(!n.e(t))throw new i.t("ellipsoid is required.");var a,u,s,f,c,w=t.oneOverRadii,h=r.o.multiplyComponents(w,e.origin,P),l=r.o.multiplyComponents(w,e.direction,N),d=r.o.magnitudeSquared(h),p=r.o.dot(h,l);if(d>1){if(p>=0)return;var m=p*p;if(a=d-1,m<(s=(u=r.o.magnitudeSquared(l))*a))return;if(m>s){f=p*p-s;var b=(c=-p+Math.sqrt(f))/u,g=a/c;return b<g?new o.o(b,g):{start:g,stop:b}}var v=Math.sqrt(a/u);return new o.o(v,v)}return d<1?(a=d-1,f=p*p-(s=(u=r.o.magnitudeSquared(l))*a),c=-p+Math.sqrt(f),new o.o(0,c/u)):p<0?(u=r.o.magnitudeSquared(l),new o.o(0,-p/u)):void 0};var E=new r.o,I=new r.o,C=new r.o,x=new r.o,z=new r.o,U=new u.p$1,T=new u.p$1,W=new u.p$1,B=new u.p$1,Z=new u.p$1,D=new u.p$1,V=new u.p$1,A=new r.o,F=new r.o,j=new t.a;m.grazingAltitudeLocation=function(e,t){if(!n.e(e))throw new i.t("ray is required.");if(!n.e(t))throw new i.t("ellipsoid is required.");var o=e.origin,s=e.direction;if(!r.o.equals(o,r.o.ZERO)){var f=t.geodeticSurfaceNormal(o,E);if(r.o.dot(s,f)>=0)return o}var c=n.e(this.rayEllipsoid(e,t)),w=t.transformPositionToScaledSpace(s,E),h=r.o.normalize(w,w),l=r.o.mostOrthogonalAxis(w,x),d=r.o.normalize(r.o.cross(l,h,I),I),p=r.o.normalize(r.o.cross(h,d,C),C),m=U;m[0]=h.x,m[1]=h.y,m[2]=h.z,m[3]=d.x,m[4]=d.y,m[5]=d.z,m[6]=p.x,m[7]=p.y,m[8]=p.z;var b=u.p$1.transpose(m,T),g=u.p$1.fromScale(t.radii,W),v=u.p$1.fromScale(t.oneOverRadii,B),q=Z;q[0]=0,q[1]=-s.z,q[2]=s.y,q[3]=s.z,q[4]=0,q[5]=-s.x,q[6]=-s.y,q[7]=s.x,q[8]=0;var M,y,R=u.p$1.multiply(u.p$1.multiply(b,v,D),q,D),S=u.p$1.multiply(u.p$1.multiply(R,g,V),m,V),O=u.p$1.multiplyByVector(R,o,z),P=$(S,r.o.negate(O,E),0,0,1),N=P.length;if(N>0){for(var L=r.o.clone(r.o.ZERO,F),k=Number.NEGATIVE_INFINITY,G=0;G<N;++G){M=u.p$1.multiplyByVector(g,u.p$1.multiplyByVector(m,P[G],A),A);var Y=r.o.normalize(r.o.subtract(M,o,x),x),_=r.o.dot(Y,s);_>k&&(k=_,L=r.o.clone(M,L))}var H=t.cartesianToCartographic(L,j);return k=a.e.clamp(k,0,1),y=r.o.magnitude(r.o.subtract(L,o,x))*Math.sqrt(1-k*k),y=c?-y:y,H.height=y,t.cartographicToCartesian(H,new r.o)}};var k=new r.o;m.lineSegmentPlane=function(e,t,o,u){if(!n.e(e))throw new i.t("endPoint0 is required.");if(!n.e(t))throw new i.t("endPoint1 is required.");if(!n.e(o))throw new i.t("plane is required.");n.e(u)||(u=new r.o);var s=r.o.subtract(t,e,k),f=o.normal,c=r.o.dot(f,s);if(!(Math.abs(c)<a.e.EPSILON6)){var w=r.o.dot(f,e),h=-(o.distance+w)/c;if(!(h<0||h>1))return r.o.multiplyByScalar(s,h,u),r.o.add(e,u,u),u}},m.trianglePlaneIntersection=function(e,t,o,a){if(!(n.e(e)&&n.e(t)&&n.e(o)&&n.e(a)))throw new i.t("p0, p1, p2, and plane are required.");var u,s,f=a.normal,c=a.distance,w=r.o.dot(f,e)+c<0,h=r.o.dot(f,t)+c<0,l=r.o.dot(f,o)+c<0,d=0;if(d+=w?1:0,d+=h?1:0,(1===(d+=l?1:0)||2===d)&&(u=new r.o,s=new r.o),1===d){if(w)return m.lineSegmentPlane(e,t,a,u),m.lineSegmentPlane(e,o,a,s),{positions:[e,t,o,u,s],indices:[0,3,4,1,2,4,1,4,3]};if(h)return m.lineSegmentPlane(t,o,a,u),m.lineSegmentPlane(t,e,a,s),{positions:[e,t,o,u,s],indices:[1,3,4,2,0,4,2,4,3]};if(l)return m.lineSegmentPlane(o,e,a,u),m.lineSegmentPlane(o,t,a,s),{positions:[e,t,o,u,s],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===d){if(!w)return m.lineSegmentPlane(t,e,a,u),m.lineSegmentPlane(o,e,a,s),{positions:[e,t,o,u,s],indices:[1,2,4,1,4,3,0,3,4]};if(!h)return m.lineSegmentPlane(o,t,a,u),m.lineSegmentPlane(e,t,a,s),{positions:[e,t,o,u,s],indices:[2,0,4,2,4,3,1,3,4]};if(!l)return m.lineSegmentPlane(e,o,a,u),m.lineSegmentPlane(t,o,a,s),{positions:[e,t,o,u,s],indices:[0,1,4,0,4,3,2,3,4]}}},e.f=p,e.g=m})); +define(["exports","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./when-92c6cf3c","./Check-52a7d806","./buildModuleUrl-cbcc8c56","./Math-ecf82623","./FeatureDetection-fd297af4"],(function(e,r,t,n,i,o,a,u){"use strict";var s={};function f(e,r,t){var n=e+r;return a.e.sign(e)!==a.e.sign(r)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(r)))<t?0:n}s.computeDiscriminant=function(e,r,t){if("number"!=typeof e)throw new i.t("a is a required number.");if("number"!=typeof r)throw new i.t("b is a required number.");if("number"!=typeof t)throw new i.t("c is a required number.");return r*r-4*e*t},s.computeRealRoots=function(e,r,t){if("number"!=typeof e)throw new i.t("a is a required number.");if("number"!=typeof r)throw new i.t("b is a required number.");if("number"!=typeof t)throw new i.t("c is a required number.");var n;if(0===e)return 0===r?[]:[-t/r];if(0===r){if(0===t)return[0,0];var o=Math.abs(t),u=Math.abs(e);if(o<u&&o/u<a.e.EPSILON14)return[0,0];if(o>u&&u/o<a.e.EPSILON14)return[];if((n=-t/e)<0)return[];var s=Math.sqrt(n);return[-s,s]}if(0===t)return(n=-r/e)<0?[n,0]:[0,n];var c=f(r*r,-(4*e*t),a.e.EPSILON14);if(c<0)return[];var w=-.5*f(r,a.e.sign(r)*Math.sqrt(c),a.e.EPSILON14);return r>0?[w/e,t/w]:[t/w,w/e]};var c={};function w(e,r,t,n){var i,o,a=e,u=r/3,s=t/3,f=n,c=a*s,w=u*f,h=u*u,l=s*s,d=a*s-h,p=a*f-u*s,m=u*f-l,b=4*d*m-p*p;if(b<0){var g,v,q;h*w>=c*l?(g=a,v=d,q=-2*u*d+a*p):(g=f,v=m,q=-f*p+2*s*m);var M=-(q<0?-1:1)*Math.abs(g)*Math.sqrt(-b),y=(o=-q+M)/2,R=y<0?-Math.pow(-y,1/3):Math.pow(y,1/3),S=o===M?-R:-v/R;return i=v<=0?R+S:-q/(R*R+S*S+v),h*w>=c*l?[(i-u)/a]:[-f/(i+s)]}var O=d,P=-2*u*d+a*p,N=m,L=-f*p+2*s*m,$=Math.sqrt(b),E=Math.sqrt(3)/2,I=Math.abs(Math.atan2(a*$,-P)/3);i=2*Math.sqrt(-O);var C=Math.cos(I);o=i*C;var x=i*(-C/2-E*Math.sin(I)),z=o+x>2*u?o-u:x-u,U=a,T=z/U;I=Math.abs(Math.atan2(f*$,-L)/3);var W=-f,B=(o=(i=2*Math.sqrt(-N))*(C=Math.cos(I)))+(x=i*(-C/2-E*Math.sin(I)))<2*s?o+s:x+s,Z=W/B,D=-z*B-U*W,V=(s*D-u*(z*W))/(-u*D+s*(U*B));return T<=V?T<=Z?V<=Z?[T,V,Z]:[T,Z,V]:[Z,T,V]:T<=Z?[V,T,Z]:V<=Z?[V,Z,T]:[Z,V,T]}c.computeDiscriminant=function(e,r,t,n){if("number"!=typeof e)throw new i.t("a is a required number.");if("number"!=typeof r)throw new i.t("b is a required number.");if("number"!=typeof t)throw new i.t("c is a required number.");if("number"!=typeof n)throw new i.t("d is a required number.");var o=r*r,a=t*t;return 18*e*r*t*n+o*a-27*(e*e)*(n*n)-4*(e*a*t+o*r*n)},c.computeRealRoots=function(e,r,t,n){if("number"!=typeof e)throw new i.t("a is a required number.");if("number"!=typeof r)throw new i.t("b is a required number.");if("number"!=typeof t)throw new i.t("c is a required number.");if("number"!=typeof n)throw new i.t("d is a required number.");var o,a;if(0===e)return s.computeRealRoots(r,t,n);if(0===r){if(0===t){if(0===n)return[0,0,0];var u=(a=-n/e)<0?-Math.pow(-a,1/3):Math.pow(a,1/3);return[u,u,u]}return 0===n?0===(o=s.computeRealRoots(e,0,t)).Length?[0]:[o[0],0,o[1]]:w(e,0,t,n)}return 0===t?0===n?(a=-r/e)<0?[a,0,0]:[0,0,a]:w(e,r,0,n):0===n?0===(o=s.computeRealRoots(e,r,t)).length?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]:w(e,r,t,n)};var h={};function l(e,r,t,n){var i=e*e,o=r-3*i/8,u=t-r*e/2+i*e/8,f=n-t*e/4+r*i/16-3*i*i/256,w=c.computeRealRoots(1,2*o,o*o-4*f,-u*u);if(w.length>0){var h=-e/4,l=w[w.length-1];if(Math.abs(l)<a.e.EPSILON14){var d=s.computeRealRoots(1,o,f);if(2===d.length){var p,m=d[0],b=d[1];if(m>=0&&b>=0){var g=Math.sqrt(m),v=Math.sqrt(b);return[h-v,h-g,h+g,h+v]}if(m>=0&&b<0)return[h-(p=Math.sqrt(m)),h+p];if(m<0&&b>=0)return[h-(p=Math.sqrt(b)),h+p]}return[]}if(l>0){var q=Math.sqrt(l),M=(o+l-u/q)/2,y=(o+l+u/q)/2,R=s.computeRealRoots(1,q,M),S=s.computeRealRoots(1,-q,y);return 0!==R.length?(R[0]+=h,R[1]+=h,0!==S.length?(S[0]+=h,S[1]+=h,R[1]<=S[0]?[R[0],R[1],S[0],S[1]]:S[1]<=R[0]?[S[0],S[1],R[0],R[1]]:R[0]>=S[0]&&R[1]<=S[1]?[S[0],R[0],R[1],S[1]]:S[0]>=R[0]&&S[1]<=R[1]?[R[0],S[0],S[1],R[1]]:R[0]>S[0]&&R[0]<S[1]?[S[0],R[0],S[1],R[1]]:[R[0],S[0],R[1],S[1]]):R):0!==S.length?(S[0]+=h,S[1]+=h,S):[]}}return[]}function d(e,r,t,n){var i=e*e,o=-2*r,u=t*e+r*r-4*n,f=i*n-t*r*e+t*t,w=c.computeRealRoots(1,o,u,f);if(w.length>0){var h,l,d,p,m,b,g=w[0],v=r-g,q=v*v,M=e/2,y=v/2,R=q-4*n,S=q+4*Math.abs(n),O=i-4*g,P=i+4*Math.abs(g);if(g<0||R*P<O*S){var N=Math.sqrt(O);h=N/2,l=0===N?0:(e*y-t)/N}else{var L=Math.sqrt(R);h=0===L?0:(e*y-t)/L,l=L/2}0===M&&0===h?(d=0,p=0):a.e.sign(M)===a.e.sign(h)?p=g/(d=M+h):d=g/(p=M-h),0===y&&0===l?(m=0,b=0):a.e.sign(y)===a.e.sign(l)?b=n/(m=y+l):m=n/(b=y-l);var $=s.computeRealRoots(1,d,m),E=s.computeRealRoots(1,p,b);if(0!==$.length)return 0!==E.length?$[1]<=E[0]?[$[0],$[1],E[0],E[1]]:E[1]<=$[0]?[E[0],E[1],$[0],$[1]]:$[0]>=E[0]&&$[1]<=E[1]?[E[0],$[0],$[1],E[1]]:E[0]>=$[0]&&E[1]<=$[1]?[$[0],E[0],E[1],$[1]]:$[0]>E[0]&&$[0]<E[1]?[E[0],$[0],E[1],$[1]]:[$[0],E[0],$[1],E[1]]:$;if(0!==E.length)return E}return[]}function p(e,t){t=r.o.clone(n.u(t,r.o.ZERO)),r.o.equals(t,r.o.ZERO)||r.o.normalize(t,t),this.origin=r.o.clone(n.u(e,r.o.ZERO)),this.direction=t}h.computeDiscriminant=function(e,r,t,n,o){if("number"!=typeof e)throw new i.t("a is a required number.");if("number"!=typeof r)throw new i.t("b is a required number.");if("number"!=typeof t)throw new i.t("c is a required number.");if("number"!=typeof n)throw new i.t("d is a required number.");if("number"!=typeof o)throw new i.t("e is a required number.");var a=e*e,u=r*r,s=u*r,f=t*t,c=f*t,w=n*n,h=w*n,l=o*o;return u*f*w-4*s*h-4*e*c*w+18*e*r*t*h-27*a*w*w+256*(a*e)*(l*o)+o*(18*s*t*n-4*u*c+16*e*f*f-80*e*r*f*n-6*e*u*w+144*a*t*w)+l*(144*e*u*t-27*u*u-128*a*f-192*a*r*n)},h.computeRealRoots=function(e,r,t,n,o){if("number"!=typeof e)throw new i.t("a is a required number.");if("number"!=typeof r)throw new i.t("b is a required number.");if("number"!=typeof t)throw new i.t("c is a required number.");if("number"!=typeof n)throw new i.t("d is a required number.");if("number"!=typeof o)throw new i.t("e is a required number.");if(Math.abs(e)<a.e.EPSILON15)return c.computeRealRoots(r,t,n,o);var u=r/e,s=t/e,f=n/e,w=o/e,h=u<0?1:0;switch(h+=s<0?h+1:h,h+=f<0?h+1:h,h+=w<0?h+1:h){case 0:case 3:case 4:case 6:case 7:case 9:case 10:case 12:case 13:case 14:case 15:return l(u,s,f,w);case 1:case 2:case 5:case 8:case 11:return d(u,s,f,w);default:return}},p.clone=function(e,t){if(n.e(e))return n.e(t)?(t.origin=r.o.clone(e.origin),t.direction=r.o.clone(e.direction),t):new p(e.origin,e.direction)},p.getPoint=function(e,t,o){return i.o.typeOf.object("ray",e),i.o.typeOf.number("t",t),n.e(o)||(o=new r.o),o=r.o.multiplyByScalar(e.direction,t,o),r.o.add(e.origin,o,o)};var m={rayPlane:function(e,t,o){if(!n.e(e))throw new i.t("ray is required.");if(!n.e(t))throw new i.t("plane is required.");n.e(o)||(o=new r.o);var u=e.origin,s=e.direction,f=t.normal,c=r.o.dot(f,s);if(!(Math.abs(c)<a.e.EPSILON15)){var w=(-t.distance-r.o.dot(f,u))/c;if(!(w<0))return o=r.o.multiplyByScalar(s,w,o),r.o.add(u,o,o)}}},b=new r.o,g=new r.o,v=new r.o,q=new r.o,M=new r.o;m.rayTriangleParametric=function(e,t,o,u,s){if(!n.e(e))throw new i.t("ray is required.");if(!n.e(t))throw new i.t("p0 is required.");if(!n.e(o))throw new i.t("p1 is required.");if(!n.e(u))throw new i.t("p2 is required.");s=n.u(s,!1);var f,c,w,h,l,d=e.origin,p=e.direction,m=r.o.subtract(o,t,b),y=r.o.subtract(u,t,g),R=r.o.cross(p,y,v),S=r.o.dot(m,R);if(s){if(S<a.e.EPSILON6||(f=r.o.subtract(d,t,q),(w=r.o.dot(f,R))<0||w>S)||(c=r.o.cross(f,m,M),(h=r.o.dot(p,c))<0||w+h>S))return;l=r.o.dot(y,c)/S}else{if(Math.abs(S)<a.e.EPSILON6)return;var O=1/S;if(f=r.o.subtract(d,t,q),(w=r.o.dot(f,R)*O)<0||w>1||(c=r.o.cross(f,m,M),(h=r.o.dot(p,c)*O)<0||w+h>1))return;l=r.o.dot(y,c)*O}return l},m.rayTriangle=function(e,t,i,o,a,u){var s=m.rayTriangleParametric(e,t,i,o,a);if(n.e(s)&&!(s<0))return n.e(u)||(u=new r.o),r.o.multiplyByScalar(e.direction,s,u),r.o.add(e.origin,u,u)};var y=new p;m.lineSegmentTriangle=function(e,t,o,a,u,s,f){if(!n.e(e))throw new i.t("v0 is required.");if(!n.e(t))throw new i.t("v1 is required.");if(!n.e(o))throw new i.t("p0 is required.");if(!n.e(a))throw new i.t("p1 is required.");if(!n.e(u))throw new i.t("p2 is required.");var c=y;r.o.clone(e,c.origin),r.o.subtract(t,e,c.direction),r.o.normalize(c.direction,c.direction);var w=m.rayTriangleParametric(c,o,a,u,s);if(!(!n.e(w)||w<0||w>r.o.distance(e,t)))return n.e(f)||(f=new r.o),r.o.multiplyByScalar(c.direction,w,f),r.o.add(c.origin,f,f)};var R={root0:0,root1:0};function S(e,t,i){n.e(i)||(i=new o.o);var a=e.origin,u=e.direction,s=t.center,f=t.radius*t.radius,c=r.o.subtract(a,s,v),w=function(e,r,t,n){var i=r*r-4*e*t;if(!(i<0)){if(i>0){var o=1/(2*e),a=Math.sqrt(i),u=(-r+a)*o,s=(-r-a)*o;return u<s?(n.root0=u,n.root1=s):(n.root0=s,n.root1=u),n}var f=-r/(2*e);if(0!==f)return n.root0=n.root1=f,n}}(r.o.dot(u,u),2*r.o.dot(u,c),r.o.magnitudeSquared(c)-f,R);if(n.e(w))return i.start=w.root0,i.stop=w.root1,i}m.raySphere=function(e,r,t){if(!n.e(e))throw new i.t("ray is required.");if(!n.e(r))throw new i.t("sphere is required.");if(t=S(e,r,t),n.e(t)&&!(t.stop<0))return t.start=Math.max(t.start,0),t};var O=new p;m.lineSegmentSphere=function(e,t,o,a){if(!n.e(e))throw new i.t("p0 is required.");if(!n.e(t))throw new i.t("p1 is required.");if(!n.e(o))throw new i.t("sphere is required.");var u=O;r.o.clone(e,u.origin);var s=r.o.subtract(t,e,u.direction),f=r.o.magnitude(s);if(r.o.normalize(s,s),a=S(u,o,a),!(!n.e(a)||a.stop<0||a.start>f))return a.start=Math.max(a.start,0),a.stop=Math.min(a.stop,f),a};var P=new r.o,N=new r.o;function L(e,r,t){var n=e+r;return a.e.sign(e)!==a.e.sign(r)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(r)))<t?0:n}function $(e,t,n,i,o){var f,c=i*i,w=o*o,l=(e[u.p$1.COLUMN1ROW1]-e[u.p$1.COLUMN2ROW2])*w,d=o*(i*L(e[u.p$1.COLUMN1ROW0],e[u.p$1.COLUMN0ROW1],a.e.EPSILON15)+t.y),p=e[u.p$1.COLUMN0ROW0]*c+e[u.p$1.COLUMN2ROW2]*w+i*t.x+n,m=w*L(e[u.p$1.COLUMN2ROW1],e[u.p$1.COLUMN1ROW2],a.e.EPSILON15),b=o*(i*L(e[u.p$1.COLUMN2ROW0],e[u.p$1.COLUMN0ROW2])+t.z),g=[];if(0===b&&0===m){if(0===(f=s.computeRealRoots(l,d,p)).length)return g;var v=f[0],q=Math.sqrt(Math.max(1-v*v,0));if(g.push(new r.o(i,o*v,o*-q)),g.push(new r.o(i,o*v,o*q)),2===f.length){var M=f[1],y=Math.sqrt(Math.max(1-M*M,0));g.push(new r.o(i,o*M,o*-y)),g.push(new r.o(i,o*M,o*y))}return g}var R=b*b,S=m*m,O=b*m,P=l*l+S,N=2*(d*l+O),$=2*p*l+d*d-S+R,E=2*(p*d-O),I=p*p-R;if(0===P&&0===N&&0===$&&0===E)return g;var C=(f=h.computeRealRoots(P,N,$,E,I)).length;if(0===C)return g;for(var x=0;x<C;++x){var z=f[x],U=z*z,T=Math.max(1-U,0),W=Math.sqrt(T),B=(a.e.sign(l)===a.e.sign(p)?L(l*U+p,d*z,a.e.EPSILON12):a.e.sign(p)===a.e.sign(d*z)?L(l*U,d*z+p,a.e.EPSILON12):L(l*U+d*z,p,a.e.EPSILON12))*L(m*z,b,a.e.EPSILON15);B<0?g.push(new r.o(i,o*z,o*W)):B>0?g.push(new r.o(i,o*z,o*-W)):0!==W?(g.push(new r.o(i,o*z,o*-W)),g.push(new r.o(i,o*z,o*W)),++x):g.push(new r.o(i,o*z,o*W))}return g}m.rayEllipsoid=function(e,t){if(!n.e(e))throw new i.t("ray is required.");if(!n.e(t))throw new i.t("ellipsoid is required.");var a,u,s,f,c,w=t.oneOverRadii,h=r.o.multiplyComponents(w,e.origin,P),l=r.o.multiplyComponents(w,e.direction,N),d=r.o.magnitudeSquared(h),p=r.o.dot(h,l);if(d>1){if(p>=0)return;var m=p*p;if(a=d-1,m<(s=(u=r.o.magnitudeSquared(l))*a))return;if(m>s){f=p*p-s;var b=(c=-p+Math.sqrt(f))/u,g=a/c;return b<g?new o.o(b,g):{start:g,stop:b}}var v=Math.sqrt(a/u);return new o.o(v,v)}return d<1?(a=d-1,f=p*p-(s=(u=r.o.magnitudeSquared(l))*a),c=-p+Math.sqrt(f),new o.o(0,c/u)):p<0?(u=r.o.magnitudeSquared(l),new o.o(0,-p/u)):void 0};var E=new r.o,I=new r.o,C=new r.o,x=new r.o,z=new r.o,U=new u.p$1,T=new u.p$1,W=new u.p$1,B=new u.p$1,Z=new u.p$1,D=new u.p$1,V=new u.p$1,A=new r.o,F=new r.o,j=new t.a;m.grazingAltitudeLocation=function(e,t){if(!n.e(e))throw new i.t("ray is required.");if(!n.e(t))throw new i.t("ellipsoid is required.");var o=e.origin,s=e.direction;if(!r.o.equals(o,r.o.ZERO)){var f=t.geodeticSurfaceNormal(o,E);if(r.o.dot(s,f)>=0)return o}var c=n.e(this.rayEllipsoid(e,t)),w=t.transformPositionToScaledSpace(s,E),h=r.o.normalize(w,w),l=r.o.mostOrthogonalAxis(w,x),d=r.o.normalize(r.o.cross(l,h,I),I),p=r.o.normalize(r.o.cross(h,d,C),C),m=U;m[0]=h.x,m[1]=h.y,m[2]=h.z,m[3]=d.x,m[4]=d.y,m[5]=d.z,m[6]=p.x,m[7]=p.y,m[8]=p.z;var b=u.p$1.transpose(m,T),g=u.p$1.fromScale(t.radii,W),v=u.p$1.fromScale(t.oneOverRadii,B),q=Z;q[0]=0,q[1]=-s.z,q[2]=s.y,q[3]=s.z,q[4]=0,q[5]=-s.x,q[6]=-s.y,q[7]=s.x,q[8]=0;var M,y,R=u.p$1.multiply(u.p$1.multiply(b,v,D),q,D),S=u.p$1.multiply(u.p$1.multiply(R,g,V),m,V),O=u.p$1.multiplyByVector(R,o,z),P=$(S,r.o.negate(O,E),0,0,1),N=P.length;if(N>0){for(var L=r.o.clone(r.o.ZERO,F),k=Number.NEGATIVE_INFINITY,G=0;G<N;++G){M=u.p$1.multiplyByVector(g,u.p$1.multiplyByVector(m,P[G],A),A);var Y=r.o.normalize(r.o.subtract(M,o,x),x),_=r.o.dot(Y,s);_>k&&(k=_,L=r.o.clone(M,L))}var H=t.cartesianToCartographic(L,j);return k=a.e.clamp(k,0,1),y=r.o.magnitude(r.o.subtract(L,o,x))*Math.sqrt(1-k*k),y=c?-y:y,H.height=y,t.cartographicToCartesian(H,new r.o)}};var k=new r.o;m.lineSegmentPlane=function(e,t,o,u){if(!n.e(e))throw new i.t("endPoint0 is required.");if(!n.e(t))throw new i.t("endPoint1 is required.");if(!n.e(o))throw new i.t("plane is required.");n.e(u)||(u=new r.o);var s=r.o.subtract(t,e,k),f=o.normal,c=r.o.dot(f,s);if(!(Math.abs(c)<a.e.EPSILON6)){var w=r.o.dot(f,e),h=-(o.distance+w)/c;if(!(h<0||h>1))return r.o.multiplyByScalar(s,h,u),r.o.add(e,u,u),u}},m.trianglePlaneIntersection=function(e,t,o,a){if(!(n.e(e)&&n.e(t)&&n.e(o)&&n.e(a)))throw new i.t("p0, p1, p2, and plane are required.");var u,s,f=a.normal,c=a.distance,w=r.o.dot(f,e)+c<0,h=r.o.dot(f,t)+c<0,l=r.o.dot(f,o)+c<0,d=0;if(d+=w?1:0,d+=h?1:0,(1===(d+=l?1:0)||2===d)&&(u=new r.o,s=new r.o),1===d){if(w)return m.lineSegmentPlane(e,t,a,u),m.lineSegmentPlane(e,o,a,s),{positions:[e,t,o,u,s],indices:[0,3,4,1,2,4,1,4,3]};if(h)return m.lineSegmentPlane(t,o,a,u),m.lineSegmentPlane(t,e,a,s),{positions:[e,t,o,u,s],indices:[1,3,4,2,0,4,2,4,3]};if(l)return m.lineSegmentPlane(o,e,a,u),m.lineSegmentPlane(o,t,a,s),{positions:[e,t,o,u,s],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===d){if(!w)return m.lineSegmentPlane(t,e,a,u),m.lineSegmentPlane(o,e,a,s),{positions:[e,t,o,u,s],indices:[1,2,4,1,4,3,0,3,4]};if(!h)return m.lineSegmentPlane(o,t,a,u),m.lineSegmentPlane(e,t,a,s),{positions:[e,t,o,u,s],indices:[2,0,4,2,4,3,1,3,4]};if(!l)return m.lineSegmentPlane(e,o,a,u),m.lineSegmentPlane(t,o,a,s),{positions:[e,t,o,u,s],indices:[0,1,4,0,4,3,2,3,4]}}},e.f=p,e.g=m})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/OrientedBoundingBox-d2eb0b92.js b/SuperMap iEarth/public/SuperMap3D/Workers/OrientedBoundingBox-42d3d74a.js similarity index 98% rename from SuperMap iEarth/public/SuperMap3D/Workers/OrientedBoundingBox-d2eb0b92.js rename to SuperMap iEarth/public/SuperMap3D/Workers/OrientedBoundingBox-42d3d74a.js index fbf2658c..f2112dee 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/OrientedBoundingBox-d2eb0b92.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/OrientedBoundingBox-42d3d74a.js @@ -1 +1 @@ -define(["exports","./buildModuleUrl-9eef8841","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartesian4-72b88c9e","./Cartographic-a2c313d7","./Check-52a7d806","./when-92c6cf3c","./EllipsoidTangentPlane-d6b88a1f","./Math-ecf82623","./FeatureDetection-cec0163f","./Plane-33393da8","./PolygonPipeline-425528b3"],(function(t,e,o,a,n,r,i,s,u,d,c,h,m){"use strict";var l=[];function p(t,e){this.center=a.o.clone(s.u(t,a.o.ZERO)),this.halfAxes=c.p$1.clone(s.u(e,c.p$1.ZERO)),this.areaDirty=1}l[0]={num:0,des:"inside"},l[1]={num:4,data:[0,4,7,3],des:"left"},l[2]={num:4,data:[1,2,6,5],des:"right"},l[3]={num:0},l[4]={num:4,data:[0,1,5,4],des:"bottom"},l[5]={num:6,data:[0,1,5,4,7,3],des:"bottom, left"},l[6]={num:6,data:[0,1,2,6,5,4],des:"bottom, right"},l[7]={num:0},l[8]={num:4,data:[2,3,7,6],des:"top"},l[9]={num:6,data:[4,7,6,2,3,0],des:"top, left"},l[10]={num:6,data:[2,3,7,6,5,1],des:"top, right"},l[11]={num:0},l[12]={num:0},l[13]={num:0},l[14]={num:0},l[15]={num:0},l[16]={num:4,data:[0,3,2,1],des:"front"},l[17]={num:6,data:[0,4,7,3,2,1],des:"front, left"},l[18]={num:6,data:[0,3,2,6,5,1],des:"front, right"},l[19]={num:0},l[20]={num:6,data:[0,3,2,1,5,4],des:"front, bottom"},l[21]={num:6,data:[2,1,5,4,7,3],des:"front, bottom, left"},l[22]={num:6,data:[0,3,2,6,5,4],des:"front, bottom, right"},l[23]={num:0},l[24]={num:6,data:[0,3,7,6,2,1],des:"front, top"},l[25]={num:6,data:[0,4,7,6,2,1],des:"front, top, left"},l[26]={num:6,data:[0,3,7,6,5,1],des:"front, top, right"},l[27]={num:0},l[28]={num:0},l[29]={num:0},l[30]={num:0},l[31]={num:0},l[32]={num:4,data:[4,5,6,7],des:"back"},l[33]={num:6,data:[4,5,6,7,3,0],des:"back, left"},l[34]={num:6,data:[1,2,6,7,4,5],des:"back, right"},l[35]={num:0},l[36]={num:6,data:[0,1,5,6,7,4],des:"back, bottom"},l[37]={num:6,data:[0,1,5,6,7,3],des:"back, bottom, left"},l[38]={num:6,data:[0,1,2,6,7,4],des:"back, bottom, right"},l[39]={num:0},l[40]={num:6,data:[2,3,7,4,5,6],des:"back, top"},l[41]={num:6,data:[0,4,5,6,2,3],des:"back, top, left"},l[42]={num:6,data:[1,2,3,7,4,5],des:"back, top, right"},p.packedLength=a.o.packedLength+c.p$1.packedLength,p.pack=function(t,e,o){return i.o.typeOf.object("value",t),i.o.defined("array",e),o=s.u(o,0),a.o.pack(t.center,e,o),c.p$1.pack(t.halfAxes,e,o+a.o.packedLength),e},p.unpack=function(t,e,o){return i.o.defined("array",t),e=s.u(e,0),s.e(o)||(o=new p),a.o.unpack(t,e,o.center),c.p$1.unpack(t,e+a.o.packedLength,o.halfAxes),o};var w=new a.o,f=new a.o,b=new a.o,x=new a.o,y=new a.o,g=new a.o,M=new c.p$1,v={unitary:new c.p$1,diagonal:new c.p$1},O=new a.o,z=new a.o,$=new a.o;p.fromPoints=function(t,e){if(s.e(e)||(e=new p),!s.e(t)||0===t.length)return e.halfAxes=c.p$1.ZERO,e.center=a.o.ZERO,e;var o,n=t.length,r=a.o.clone(t[0],w);for(o=1;o<n;o++)a.o.add(r,t[o],r);var i=1/n;a.o.multiplyByScalar(r,i,r);var u,d=0,h=0,m=0,l=0,O=0,z=0;for(o=0;o<n;o++)d+=(u=a.o.subtract(t[o],r,f)).x*u.x,h+=u.x*u.y,m+=u.x*u.z,l+=u.y*u.y,O+=u.y*u.z,z+=u.z*u.z;d*=i,h*=i,m*=i,l*=i,O*=i,z*=i;var $=M;$[0]=d,$[1]=h,$[2]=m,$[3]=h,$[4]=l,$[5]=O,$[6]=m,$[7]=O,$[8]=z;var C=c.p$1.computeEigenDecomposition($,v),P=c.p$1.clone(C.unitary,e.halfAxes),A=c.p$1.getColumn(P,0,x),N=c.p$1.getColumn(P,1,y),R=c.p$1.getColumn(P,2,g),T=-Number.MAX_VALUE,E=-Number.MAX_VALUE,I=-Number.MAX_VALUE,L=Number.MAX_VALUE,S=Number.MAX_VALUE,k=Number.MAX_VALUE;for(o=0;o<n;o++)u=t[o],T=Math.max(a.o.dot(A,u),T),E=Math.max(a.o.dot(N,u),E),I=Math.max(a.o.dot(R,u),I),L=Math.min(a.o.dot(A,u),L),S=Math.min(a.o.dot(N,u),S),k=Math.min(a.o.dot(R,u),k);A=a.o.multiplyByScalar(A,.5*(L+T),A),N=a.o.multiplyByScalar(N,.5*(S+E),N),R=a.o.multiplyByScalar(R,.5*(k+I),R);var U=a.o.add(A,N,e.center);a.o.add(U,R,U);var q=b;return q.x=T-L,q.y=E-S,q.z=I-k,a.o.multiplyByScalar(q,.5,q),c.p$1.multiplyByScale(e.halfAxes,q,e.halfAxes),e};var C=new a.o,P=new a.o;function A(t,e,o,n,r,u,d,h,m,l,w){if(!(s.e(r)&&s.e(u)&&s.e(d)&&s.e(h)&&s.e(m)&&s.e(l)))throw new i.t("all extents (minimum/maximum X/Y/Z) are required.");s.e(w)||(w=new p);var f=w.halfAxes;c.p$1.setColumn(f,0,e,f),c.p$1.setColumn(f,1,o,f),c.p$1.setColumn(f,2,n,f);var b=C;b.x=(r+u)/2,b.y=(d+h)/2,b.z=(m+l)/2;var x=P;x.x=(u-r)/2,x.y=(h-d)/2,x.z=(l-m)/2;var y=w.center;return b=c.p$1.multiplyByVector(f,b,b),a.o.add(t,b,y),c.p$1.multiplyByScale(f,x,f),w}var N=new r.a,R=new a.o,T=new r.a,E=new r.a,I=new r.a,L=new r.a,S=new r.a,k=new a.o,U=new a.o,q=new a.o,B=new a.o,_=new a.o,D=new o.o,X=new o.o,V=new o.o,W=new o.o,j=new o.o,Z=new a.o,F=new a.o,G=new a.o,Y=new a.o,H=new o.o,J=new a.o,K=new a.o,Q=new a.o,tt=new h.o(a.o.UNIT_X,0);p.fromRectangle=function(t,e,n,c,m){if(!s.e(t))throw new i.t("rectangle is required");if(t.width<0||t.width>d.e.TWO_PI)throw new i.t("Rectangle width must be between 0 and 2*pi");if(t.height<0||t.height>d.e.PI)throw new i.t("Rectangle height must be between 0 and pi");if(s.e(c)&&!d.e.equalsEpsilon(c.radii.x,c.radii.y,d.e.EPSILON15))throw new i.t("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");var l,p,w,f,b,x,y;if(e=s.u(e,0),n=s.u(n,0),c=s.u(c,o.t.WGS84),t.width<=d.e.PI){var g=o.h.center(t,N),M=c.cartographicToCartesian(g,R),v=new u.f(M,c);y=v.plane;var O=g.longitude,z=t.south<0&&t.north>0?0:g.latitude,$=r.a.fromRadians(O,t.north,n,T),C=r.a.fromRadians(t.west,t.north,n,E),P=r.a.fromRadians(t.west,z,n,I),et=r.a.fromRadians(t.west,t.south,n,L),ot=r.a.fromRadians(O,t.south,n,S),at=c.cartographicToCartesian($,k),nt=c.cartographicToCartesian(C,U),rt=c.cartographicToCartesian(P,q),it=c.cartographicToCartesian(et,B),st=c.cartographicToCartesian(ot,_),ut=v.projectPointToNearestOnPlane(at,D),dt=v.projectPointToNearestOnPlane(nt,X),ct=v.projectPointToNearestOnPlane(rt,V),ht=v.projectPointToNearestOnPlane(it,W),mt=v.projectPointToNearestOnPlane(st,j);return p=-(l=Math.min(dt.x,ct.x,ht.x)),f=Math.max(dt.y,ut.y),w=Math.min(ht.y,mt.y),C.height=et.height=e,nt=c.cartographicToCartesian(C,U),it=c.cartographicToCartesian(et,B),b=Math.min(h.o.getPointDistance(y,nt),h.o.getPointDistance(y,it)),x=n,A(v.origin,v.xAxis,v.yAxis,v.zAxis,l,p,w,f,b,x,m)}var lt=t.south>0,pt=t.north<0,wt=lt?t.south:pt?t.north:0,ft=o.h.center(t,N).longitude,bt=a.o.fromRadians(ft,wt,n,c,Z);bt.z=0;var xt=Math.abs(bt.x)<d.e.EPSILON10&&Math.abs(bt.y)<d.e.EPSILON10?a.o.UNIT_X:a.o.normalize(bt,F),yt=a.o.UNIT_Z,gt=a.o.cross(xt,yt,G);y=h.o.fromPointNormal(bt,xt,tt);var Mt=a.o.fromRadians(ft+d.e.PI_OVER_TWO,wt,n,c,Y);l=-(p=a.o.dot(h.o.projectPointOntoPlane(y,Mt,H),gt)),f=a.o.fromRadians(0,t.north,pt?e:n,c,J).z,w=a.o.fromRadians(0,t.south,lt?e:n,c,K).z;var vt=a.o.fromRadians(t.east,wt,n,c,Q);return A(bt,gt,yt,xt,l,p,w,f,b=h.o.getPointDistance(y,vt),x=0,m)},p.clone=function(t,e){if(s.e(t))return s.e(e)?(a.o.clone(t.center,e.center),c.p$1.clone(t.halfAxes,e.halfAxes),e.areaDirty=1,e):new p(t.center,t.halfAxes)},p.intersectPlane=function(t,o){if(!s.e(t))throw new i.t("box is required.");if(!s.e(o))throw new i.t("plane is required.");var n=t.center,r=o.normal,u=t.halfAxes,d=r.x,h=r.y,m=r.z,l=Math.abs(d*u[c.p$1.COLUMN0ROW0]+h*u[c.p$1.COLUMN0ROW1]+m*u[c.p$1.COLUMN0ROW2])+Math.abs(d*u[c.p$1.COLUMN1ROW0]+h*u[c.p$1.COLUMN1ROW1]+m*u[c.p$1.COLUMN1ROW2])+Math.abs(d*u[c.p$1.COLUMN2ROW0]+h*u[c.p$1.COLUMN2ROW1]+m*u[c.p$1.COLUMN2ROW2]),p=a.o.dot(r,n)+o.distance;return p<=-l?e.S.OUTSIDE:p>=l?e.S.INSIDE:e.S.INTERSECTING};var et=new a.o,ot=new a.o,at=new a.o,nt=new a.o,rt=new a.o;p.distanceSquaredTo=function(t,e){if(!s.e(t))throw new i.t("box is required.");if(!s.e(e))throw new i.t("cartesian is required.");var o=a.o.subtract(e,t.center,C),n=t.halfAxes,r=c.p$1.getColumn(n,0,et),u=c.p$1.getColumn(n,1,ot),d=c.p$1.getColumn(n,2,at),h=a.o.magnitude(r),m=a.o.magnitude(u),l=a.o.magnitude(d);a.o.normalize(r,r),a.o.normalize(u,u),a.o.normalize(d,d);var p=nt;p.x=a.o.dot(o,r),p.y=a.o.dot(o,u),p.z=a.o.dot(o,d);var w,f=0;return p.x<-h?f+=(w=p.x+h)*w:p.x>h&&(f+=(w=p.x-h)*w),p.y<-m?f+=(w=p.y+m)*w:p.y>m&&(f+=(w=p.y-m)*w),p.z<-l?f+=(w=p.z+l)*w:p.z>l&&(f+=(w=p.z-l)*w),f};var it=new a.o,st=new a.o;p.computePlaneDistances=function(t,o,n,r){if(!s.e(t))throw new i.t("box is required.");if(!s.e(o))throw new i.t("position is required.");if(!s.e(n))throw new i.t("direction is required.");s.e(r)||(r=new e.o);var u=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,h=t.center,m=t.halfAxes,l=c.p$1.getColumn(m,0,et),p=c.p$1.getColumn(m,1,ot),w=c.p$1.getColumn(m,2,at),f=a.o.add(l,p,it);a.o.add(f,w,f),a.o.add(f,h,f);var b=a.o.subtract(f,o,st),x=a.o.dot(n,b);return u=Math.min(x,u),d=Math.max(x,d),a.o.add(h,l,f),a.o.add(f,p,f),a.o.subtract(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),a.o.add(h,l,f),a.o.subtract(f,p,f),a.o.add(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),a.o.add(h,l,f),a.o.subtract(f,p,f),a.o.subtract(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),a.o.subtract(h,l,f),a.o.add(f,p,f),a.o.add(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),a.o.subtract(h,l,f),a.o.add(f,p,f),a.o.subtract(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),a.o.subtract(h,l,f),a.o.subtract(f,p,f),a.o.add(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),a.o.subtract(h,l,f),a.o.subtract(f,p,f),a.o.subtract(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),r.start=u,r.stop=d,r};var ut=new e.i;p.isOccluded=function(t,o){if(!s.e(t))throw new i.t("box is required.");if(!s.e(o))throw new i.t("occluder is required.");var a=e.i.fromOrientedBoundingBox(t,ut);return!o.isBoundingSphereVisible(a)},p.prototype.intersectPlane=function(t){return p.intersectPlane(this,t)},p.prototype.distanceSquaredTo=function(t){return p.distanceSquaredTo(this,t)},p.prototype.computePlaneDistances=function(t,e,o){return p.computePlaneDistances(this,t,e,o)},p.prototype.isOccluded=function(t){return p.isOccluded(this,t)},p.equals=function(t,e){return t===e||s.e(t)&&s.e(e)&&a.o.equals(t.center,e.center)&&c.p$1.equals(t.halfAxes,e.halfAxes)},p.prototype.clone=function(t){return p.clone(this,t)},p.prototype.equals=function(t){return p.equals(this,t)};var dt=new n.e;p.prototype._updateBBox=function(){if(1==this.areaDirty){var t=c.p$1.getColumn(this.halfAxes,0,et),e=a.o.clone(a.o.negate(t,O)),o=c.p$1.getColumn(this.halfAxes,1,ot),n=a.o.clone(a.o.negate(o,O)),r=c.p$1.getColumn(this.halfAxes,2,at),i=a.o.clone(a.o.negate(r,O));this.bbox=[],a.o.add(this.center,o,O),a.o.add(O,i,z),a.o.add(z,e,$),this.bbox[0]=new a.o($.x,$.y,$.z),a.o.add(z,t,$),this.bbox[1]=new a.o($.x,$.y,$.z),a.o.add(O,r,z),a.o.add(z,t,$),this.bbox[2]=new a.o($.x,$.y,$.z),a.o.add(z,e,$),this.bbox[3]=new a.o($.x,$.y,$.z),a.o.add(this.center,n,O),a.o.add(O,i,z),a.o.add(z,e,$),this.bbox[4]=new a.o($.x,$.y,$.z),a.o.add(z,t,$),this.bbox[5]=new a.o($.x,$.y,$.z),a.o.add(O,r,z),a.o.add(z,t,$),this.bbox[6]=new a.o($.x,$.y,$.z),a.o.add(z,e,$),this.bbox[7]=new a.o($.x,$.y,$.z);var s=a.o.magnitude(t),u=a.o.magnitude(o),d=a.o.magnitude(r),h=new a.o(-s,-u,-d),m=new a.o(s,u,d);if(s*u*d==0)return void(this.areaDirty=-1);a.o.normalize(t,t),a.o.normalize(o,o),a.o.normalize(r,r),this.u=a.o.clone(t),this.v=a.o.clone(o),this.w=a.o.clone(r),this.posMin=h,this.posMaX=m,this.areaDirty=0}};var ct=[];ct.push(new o.o),ct.push(new o.o),ct.push(new o.o),ct.push(new o.o),ct.push(new o.o),ct.push(new o.o);var ht=new r.a,mt=new a.o;p.prototype.calculateBoxArea=function(t,e,o,r,i,u,h,p){this._updateBBox();var w=t,f=a.o.subtract(w,this.center,rt);if(-1==this.areaDirty){var b=i/r*(A=-1!=u?u:.5*a.o.distance(this.posMaX,this.posMin))/o;return d.e.PI*b*b}var x=a.o.fromElements(a.o.dot(f,this.u),a.o.dot(f,this.v),a.o.dot(f,this.w),it),y=(x.x<this.posMin.x?1:0)+((x.x>this.posMaX.x?1:0)<<1)+((x.z<this.posMin.z?1:0)<<2)+((x.z>this.posMaX.z?1:0)<<3)+((x.y>this.posMaX.y?1:0)<<4)+((x.y<this.posMin.y?1:0)<<5);if(y>42)return console.log("area calculation is wrong"),-100;var g=l[y];if(0==g.num){b=i/r*(A=-1!=u?u:.5*a.o.distance(this.posMaX,this.posMin))/o;return d.e.PI*b*b}if(0==g.num)return console.log("area calculation is wrong"),-100;for(var M,v=[],O=h,z=0;z<g.num;z++){var $=ct[z],C=this.bbox[g.data[z]];M=!1;var P,A,N=d.e.PI;if(3===e)(P=c.p.multiplyByVector(O,n.e.fromElements(C.x,C.y,C.z,1),dt)).z<0&&(M=!0,-1==A&&(N=d.e.PI_OVER_FOUR,o=a.o.magnitude(f)));else{var R=p,T=R.ellipsoid.cartesianToCartographic(C,ht);s.e(T)?(R.project(T,mt),(P=c.p.multiplyByVector(O,n.e.fromElements(mt.z,mt.x,mt.y,1),dt)).z<0&&(M=!0)):M=!0}if(1==M)return N*(b=i/r*(A=-1!=u?u:.5*a.o.distance(this.posMaX,this.posMin))/o)*b;$.x=P.x/P.w,$.y=i-P.y/P.w,v.push($)}return Math.abs(m.A.computeArea2D(v))},t.y=p})); +define(["exports","./buildModuleUrl-cbcc8c56","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartesian4-72b88c9e","./Cartographic-a2c313d7","./Check-52a7d806","./when-92c6cf3c","./EllipsoidTangentPlane-c500945e","./Math-ecf82623","./FeatureDetection-fd297af4","./Plane-a2c6da7b","./PolygonPipeline-c329dec3"],(function(t,e,o,a,n,r,i,s,u,d,c,h,m){"use strict";var l=[];function p(t,e){this.center=a.o.clone(s.u(t,a.o.ZERO)),this.halfAxes=c.p$1.clone(s.u(e,c.p$1.ZERO)),this.areaDirty=1}l[0]={num:0,des:"inside"},l[1]={num:4,data:[0,4,7,3],des:"left"},l[2]={num:4,data:[1,2,6,5],des:"right"},l[3]={num:0},l[4]={num:4,data:[0,1,5,4],des:"bottom"},l[5]={num:6,data:[0,1,5,4,7,3],des:"bottom, left"},l[6]={num:6,data:[0,1,2,6,5,4],des:"bottom, right"},l[7]={num:0},l[8]={num:4,data:[2,3,7,6],des:"top"},l[9]={num:6,data:[4,7,6,2,3,0],des:"top, left"},l[10]={num:6,data:[2,3,7,6,5,1],des:"top, right"},l[11]={num:0},l[12]={num:0},l[13]={num:0},l[14]={num:0},l[15]={num:0},l[16]={num:4,data:[0,3,2,1],des:"front"},l[17]={num:6,data:[0,4,7,3,2,1],des:"front, left"},l[18]={num:6,data:[0,3,2,6,5,1],des:"front, right"},l[19]={num:0},l[20]={num:6,data:[0,3,2,1,5,4],des:"front, bottom"},l[21]={num:6,data:[2,1,5,4,7,3],des:"front, bottom, left"},l[22]={num:6,data:[0,3,2,6,5,4],des:"front, bottom, right"},l[23]={num:0},l[24]={num:6,data:[0,3,7,6,2,1],des:"front, top"},l[25]={num:6,data:[0,4,7,6,2,1],des:"front, top, left"},l[26]={num:6,data:[0,3,7,6,5,1],des:"front, top, right"},l[27]={num:0},l[28]={num:0},l[29]={num:0},l[30]={num:0},l[31]={num:0},l[32]={num:4,data:[4,5,6,7],des:"back"},l[33]={num:6,data:[4,5,6,7,3,0],des:"back, left"},l[34]={num:6,data:[1,2,6,7,4,5],des:"back, right"},l[35]={num:0},l[36]={num:6,data:[0,1,5,6,7,4],des:"back, bottom"},l[37]={num:6,data:[0,1,5,6,7,3],des:"back, bottom, left"},l[38]={num:6,data:[0,1,2,6,7,4],des:"back, bottom, right"},l[39]={num:0},l[40]={num:6,data:[2,3,7,4,5,6],des:"back, top"},l[41]={num:6,data:[0,4,5,6,2,3],des:"back, top, left"},l[42]={num:6,data:[1,2,3,7,4,5],des:"back, top, right"},p.packedLength=a.o.packedLength+c.p$1.packedLength,p.pack=function(t,e,o){return i.o.typeOf.object("value",t),i.o.defined("array",e),o=s.u(o,0),a.o.pack(t.center,e,o),c.p$1.pack(t.halfAxes,e,o+a.o.packedLength),e},p.unpack=function(t,e,o){return i.o.defined("array",t),e=s.u(e,0),s.e(o)||(o=new p),a.o.unpack(t,e,o.center),c.p$1.unpack(t,e+a.o.packedLength,o.halfAxes),o};var w=new a.o,f=new a.o,b=new a.o,x=new a.o,y=new a.o,g=new a.o,M=new c.p$1,v={unitary:new c.p$1,diagonal:new c.p$1},O=new a.o,z=new a.o,$=new a.o;p.fromPoints=function(t,e){if(s.e(e)||(e=new p),!s.e(t)||0===t.length)return e.halfAxes=c.p$1.ZERO,e.center=a.o.ZERO,e;var o,n=t.length,r=a.o.clone(t[0],w);for(o=1;o<n;o++)a.o.add(r,t[o],r);var i=1/n;a.o.multiplyByScalar(r,i,r);var u,d=0,h=0,m=0,l=0,O=0,z=0;for(o=0;o<n;o++)d+=(u=a.o.subtract(t[o],r,f)).x*u.x,h+=u.x*u.y,m+=u.x*u.z,l+=u.y*u.y,O+=u.y*u.z,z+=u.z*u.z;d*=i,h*=i,m*=i,l*=i,O*=i,z*=i;var $=M;$[0]=d,$[1]=h,$[2]=m,$[3]=h,$[4]=l,$[5]=O,$[6]=m,$[7]=O,$[8]=z;var C=c.p$1.computeEigenDecomposition($,v),P=c.p$1.clone(C.unitary,e.halfAxes),A=c.p$1.getColumn(P,0,x),N=c.p$1.getColumn(P,1,y),R=c.p$1.getColumn(P,2,g),T=-Number.MAX_VALUE,E=-Number.MAX_VALUE,I=-Number.MAX_VALUE,L=Number.MAX_VALUE,S=Number.MAX_VALUE,k=Number.MAX_VALUE;for(o=0;o<n;o++)u=t[o],T=Math.max(a.o.dot(A,u),T),E=Math.max(a.o.dot(N,u),E),I=Math.max(a.o.dot(R,u),I),L=Math.min(a.o.dot(A,u),L),S=Math.min(a.o.dot(N,u),S),k=Math.min(a.o.dot(R,u),k);A=a.o.multiplyByScalar(A,.5*(L+T),A),N=a.o.multiplyByScalar(N,.5*(S+E),N),R=a.o.multiplyByScalar(R,.5*(k+I),R);var U=a.o.add(A,N,e.center);a.o.add(U,R,U);var q=b;return q.x=T-L,q.y=E-S,q.z=I-k,a.o.multiplyByScalar(q,.5,q),c.p$1.multiplyByScale(e.halfAxes,q,e.halfAxes),e};var C=new a.o,P=new a.o;function A(t,e,o,n,r,u,d,h,m,l,w){if(!(s.e(r)&&s.e(u)&&s.e(d)&&s.e(h)&&s.e(m)&&s.e(l)))throw new i.t("all extents (minimum/maximum X/Y/Z) are required.");s.e(w)||(w=new p);var f=w.halfAxes;c.p$1.setColumn(f,0,e,f),c.p$1.setColumn(f,1,o,f),c.p$1.setColumn(f,2,n,f);var b=C;b.x=(r+u)/2,b.y=(d+h)/2,b.z=(m+l)/2;var x=P;x.x=(u-r)/2,x.y=(h-d)/2,x.z=(l-m)/2;var y=w.center;return b=c.p$1.multiplyByVector(f,b,b),a.o.add(t,b,y),c.p$1.multiplyByScale(f,x,f),w}var N=new r.a,R=new a.o,T=new r.a,E=new r.a,I=new r.a,L=new r.a,S=new r.a,k=new a.o,U=new a.o,q=new a.o,B=new a.o,_=new a.o,D=new o.o,X=new o.o,V=new o.o,W=new o.o,j=new o.o,Z=new a.o,F=new a.o,G=new a.o,Y=new a.o,H=new o.o,J=new a.o,K=new a.o,Q=new a.o,tt=new h.o(a.o.UNIT_X,0);p.fromRectangle=function(t,e,n,c,m){if(!s.e(t))throw new i.t("rectangle is required");if(t.width<0||t.width>d.e.TWO_PI)throw new i.t("Rectangle width must be between 0 and 2*pi");if(t.height<0||t.height>d.e.PI)throw new i.t("Rectangle height must be between 0 and pi");if(s.e(c)&&!d.e.equalsEpsilon(c.radii.x,c.radii.y,d.e.EPSILON15))throw new i.t("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");var l,p,w,f,b,x,y;if(e=s.u(e,0),n=s.u(n,0),c=s.u(c,o.t.WGS84),t.width<=d.e.PI){var g=o.h.center(t,N),M=c.cartographicToCartesian(g,R),v=new u.f(M,c);y=v.plane;var O=g.longitude,z=t.south<0&&t.north>0?0:g.latitude,$=r.a.fromRadians(O,t.north,n,T),C=r.a.fromRadians(t.west,t.north,n,E),P=r.a.fromRadians(t.west,z,n,I),et=r.a.fromRadians(t.west,t.south,n,L),ot=r.a.fromRadians(O,t.south,n,S),at=c.cartographicToCartesian($,k),nt=c.cartographicToCartesian(C,U),rt=c.cartographicToCartesian(P,q),it=c.cartographicToCartesian(et,B),st=c.cartographicToCartesian(ot,_),ut=v.projectPointToNearestOnPlane(at,D),dt=v.projectPointToNearestOnPlane(nt,X),ct=v.projectPointToNearestOnPlane(rt,V),ht=v.projectPointToNearestOnPlane(it,W),mt=v.projectPointToNearestOnPlane(st,j);return p=-(l=Math.min(dt.x,ct.x,ht.x)),f=Math.max(dt.y,ut.y),w=Math.min(ht.y,mt.y),C.height=et.height=e,nt=c.cartographicToCartesian(C,U),it=c.cartographicToCartesian(et,B),b=Math.min(h.o.getPointDistance(y,nt),h.o.getPointDistance(y,it)),x=n,A(v.origin,v.xAxis,v.yAxis,v.zAxis,l,p,w,f,b,x,m)}var lt=t.south>0,pt=t.north<0,wt=lt?t.south:pt?t.north:0,ft=o.h.center(t,N).longitude,bt=a.o.fromRadians(ft,wt,n,c,Z);bt.z=0;var xt=Math.abs(bt.x)<d.e.EPSILON10&&Math.abs(bt.y)<d.e.EPSILON10?a.o.UNIT_X:a.o.normalize(bt,F),yt=a.o.UNIT_Z,gt=a.o.cross(xt,yt,G);y=h.o.fromPointNormal(bt,xt,tt);var Mt=a.o.fromRadians(ft+d.e.PI_OVER_TWO,wt,n,c,Y);l=-(p=a.o.dot(h.o.projectPointOntoPlane(y,Mt,H),gt)),f=a.o.fromRadians(0,t.north,pt?e:n,c,J).z,w=a.o.fromRadians(0,t.south,lt?e:n,c,K).z;var vt=a.o.fromRadians(t.east,wt,n,c,Q);return A(bt,gt,yt,xt,l,p,w,f,b=h.o.getPointDistance(y,vt),x=0,m)},p.clone=function(t,e){if(s.e(t))return s.e(e)?(a.o.clone(t.center,e.center),c.p$1.clone(t.halfAxes,e.halfAxes),e.areaDirty=1,e):new p(t.center,t.halfAxes)},p.intersectPlane=function(t,o){if(!s.e(t))throw new i.t("box is required.");if(!s.e(o))throw new i.t("plane is required.");var n=t.center,r=o.normal,u=t.halfAxes,d=r.x,h=r.y,m=r.z,l=Math.abs(d*u[c.p$1.COLUMN0ROW0]+h*u[c.p$1.COLUMN0ROW1]+m*u[c.p$1.COLUMN0ROW2])+Math.abs(d*u[c.p$1.COLUMN1ROW0]+h*u[c.p$1.COLUMN1ROW1]+m*u[c.p$1.COLUMN1ROW2])+Math.abs(d*u[c.p$1.COLUMN2ROW0]+h*u[c.p$1.COLUMN2ROW1]+m*u[c.p$1.COLUMN2ROW2]),p=a.o.dot(r,n)+o.distance;return p<=-l?e.S.OUTSIDE:p>=l?e.S.INSIDE:e.S.INTERSECTING};var et=new a.o,ot=new a.o,at=new a.o,nt=new a.o,rt=new a.o;p.distanceSquaredTo=function(t,e){if(!s.e(t))throw new i.t("box is required.");if(!s.e(e))throw new i.t("cartesian is required.");var o=a.o.subtract(e,t.center,C),n=t.halfAxes,r=c.p$1.getColumn(n,0,et),u=c.p$1.getColumn(n,1,ot),d=c.p$1.getColumn(n,2,at),h=a.o.magnitude(r),m=a.o.magnitude(u),l=a.o.magnitude(d);a.o.normalize(r,r),a.o.normalize(u,u),a.o.normalize(d,d);var p=nt;p.x=a.o.dot(o,r),p.y=a.o.dot(o,u),p.z=a.o.dot(o,d);var w,f=0;return p.x<-h?f+=(w=p.x+h)*w:p.x>h&&(f+=(w=p.x-h)*w),p.y<-m?f+=(w=p.y+m)*w:p.y>m&&(f+=(w=p.y-m)*w),p.z<-l?f+=(w=p.z+l)*w:p.z>l&&(f+=(w=p.z-l)*w),f};var it=new a.o,st=new a.o;p.computePlaneDistances=function(t,o,n,r){if(!s.e(t))throw new i.t("box is required.");if(!s.e(o))throw new i.t("position is required.");if(!s.e(n))throw new i.t("direction is required.");s.e(r)||(r=new e.o);var u=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,h=t.center,m=t.halfAxes,l=c.p$1.getColumn(m,0,et),p=c.p$1.getColumn(m,1,ot),w=c.p$1.getColumn(m,2,at),f=a.o.add(l,p,it);a.o.add(f,w,f),a.o.add(f,h,f);var b=a.o.subtract(f,o,st),x=a.o.dot(n,b);return u=Math.min(x,u),d=Math.max(x,d),a.o.add(h,l,f),a.o.add(f,p,f),a.o.subtract(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),a.o.add(h,l,f),a.o.subtract(f,p,f),a.o.add(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),a.o.add(h,l,f),a.o.subtract(f,p,f),a.o.subtract(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),a.o.subtract(h,l,f),a.o.add(f,p,f),a.o.add(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),a.o.subtract(h,l,f),a.o.add(f,p,f),a.o.subtract(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),a.o.subtract(h,l,f),a.o.subtract(f,p,f),a.o.add(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),a.o.subtract(h,l,f),a.o.subtract(f,p,f),a.o.subtract(f,w,f),a.o.subtract(f,o,b),x=a.o.dot(n,b),u=Math.min(x,u),d=Math.max(x,d),r.start=u,r.stop=d,r};var ut=new e.i;p.isOccluded=function(t,o){if(!s.e(t))throw new i.t("box is required.");if(!s.e(o))throw new i.t("occluder is required.");var a=e.i.fromOrientedBoundingBox(t,ut);return!o.isBoundingSphereVisible(a)},p.prototype.intersectPlane=function(t){return p.intersectPlane(this,t)},p.prototype.distanceSquaredTo=function(t){return p.distanceSquaredTo(this,t)},p.prototype.computePlaneDistances=function(t,e,o){return p.computePlaneDistances(this,t,e,o)},p.prototype.isOccluded=function(t){return p.isOccluded(this,t)},p.equals=function(t,e){return t===e||s.e(t)&&s.e(e)&&a.o.equals(t.center,e.center)&&c.p$1.equals(t.halfAxes,e.halfAxes)},p.prototype.clone=function(t){return p.clone(this,t)},p.prototype.equals=function(t){return p.equals(this,t)};var dt=new n.e;p.prototype._updateBBox=function(){if(1==this.areaDirty){var t=c.p$1.getColumn(this.halfAxes,0,et),e=a.o.clone(a.o.negate(t,O)),o=c.p$1.getColumn(this.halfAxes,1,ot),n=a.o.clone(a.o.negate(o,O)),r=c.p$1.getColumn(this.halfAxes,2,at),i=a.o.clone(a.o.negate(r,O));this.bbox=[],a.o.add(this.center,o,O),a.o.add(O,i,z),a.o.add(z,e,$),this.bbox[0]=new a.o($.x,$.y,$.z),a.o.add(z,t,$),this.bbox[1]=new a.o($.x,$.y,$.z),a.o.add(O,r,z),a.o.add(z,t,$),this.bbox[2]=new a.o($.x,$.y,$.z),a.o.add(z,e,$),this.bbox[3]=new a.o($.x,$.y,$.z),a.o.add(this.center,n,O),a.o.add(O,i,z),a.o.add(z,e,$),this.bbox[4]=new a.o($.x,$.y,$.z),a.o.add(z,t,$),this.bbox[5]=new a.o($.x,$.y,$.z),a.o.add(O,r,z),a.o.add(z,t,$),this.bbox[6]=new a.o($.x,$.y,$.z),a.o.add(z,e,$),this.bbox[7]=new a.o($.x,$.y,$.z);var s=a.o.magnitude(t),u=a.o.magnitude(o),d=a.o.magnitude(r),h=new a.o(-s,-u,-d),m=new a.o(s,u,d);if(s*u*d==0)return void(this.areaDirty=-1);a.o.normalize(t,t),a.o.normalize(o,o),a.o.normalize(r,r),this.u=a.o.clone(t),this.v=a.o.clone(o),this.w=a.o.clone(r),this.posMin=h,this.posMaX=m,this.areaDirty=0}};var ct=[];ct.push(new o.o),ct.push(new o.o),ct.push(new o.o),ct.push(new o.o),ct.push(new o.o),ct.push(new o.o);var ht=new r.a,mt=new a.o;p.prototype.calculateBoxArea=function(t,e,o,r,i,u,h,p){this._updateBBox();var w=t,f=a.o.subtract(w,this.center,rt);if(-1==this.areaDirty){var b=i/r*(A=-1!=u?u:.5*a.o.distance(this.posMaX,this.posMin))/o;return d.e.PI*b*b}var x=a.o.fromElements(a.o.dot(f,this.u),a.o.dot(f,this.v),a.o.dot(f,this.w),it),y=(x.x<this.posMin.x?1:0)+((x.x>this.posMaX.x?1:0)<<1)+((x.z<this.posMin.z?1:0)<<2)+((x.z>this.posMaX.z?1:0)<<3)+((x.y>this.posMaX.y?1:0)<<4)+((x.y<this.posMin.y?1:0)<<5);if(y>42)return console.log("area calculation is wrong"),-100;var g=l[y];if(0==g.num){b=i/r*(A=-1!=u?u:.5*a.o.distance(this.posMaX,this.posMin))/o;return d.e.PI*b*b}if(0==g.num)return console.log("area calculation is wrong"),-100;for(var M,v=[],O=h,z=0;z<g.num;z++){var $=ct[z],C=this.bbox[g.data[z]];M=!1;var P,A,N=d.e.PI;if(3===e)(P=c.p.multiplyByVector(O,n.e.fromElements(C.x,C.y,C.z,1),dt)).z<0&&(M=!0,-1==A&&(N=d.e.PI_OVER_FOUR,o=a.o.magnitude(f)));else{var R=p,T=R.ellipsoid.cartesianToCartographic(C,ht);s.e(T)?(R.project(T,mt),(P=c.p.multiplyByVector(O,n.e.fromElements(mt.z,mt.x,mt.y,1),dt)).z<0&&(M=!0)):M=!0}if(1==M)return N*(b=i/r*(A=-1!=u?u:.5*a.o.distance(this.posMaX,this.posMin))/o)*b;$.x=P.x/P.w,$.y=i-P.y/P.w,v.push($)}return Math.abs(m.A.computeArea2D(v))},t.y=p})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/Plane-33393da8.js b/SuperMap iEarth/public/SuperMap3D/Workers/Plane-a2c6da7b.js similarity index 96% rename from SuperMap iEarth/public/SuperMap3D/Workers/Plane-33393da8.js rename to SuperMap iEarth/public/SuperMap3D/Workers/Plane-a2c6da7b.js index cc9b67d1..8151811b 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/Plane-33393da8.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/Plane-a2c6da7b.js @@ -1 +1 @@ -define(["exports","./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./Math-ecf82623","./FeatureDetection-cec0163f"],(function(e,o,t,n,a,r){"use strict";function i(e,n){if(t.o.typeOf.object("normal",e),!a.e.equalsEpsilon(o.o.magnitude(e),1,a.e.EPSILON6))throw new t.t("normal must be normalized.");t.o.typeOf.number("distance",n),this.normal=o.o.clone(e),this.distance=n}i.fromPointNormal=function(e,r,c){if(t.o.typeOf.object("point",e),t.o.typeOf.object("normal",r),!a.e.equalsEpsilon(o.o.magnitude(r),1,a.e.EPSILON6))throw new t.t("normal must be normalized.");var l=-o.o.dot(r,e);return n.e(c)?(o.o.clone(r,c.normal),c.distance=l,c):new i(r,l)};var c=new o.o;i.fromCartesian4=function(e,r){t.o.typeOf.object("coefficients",e);var l=o.o.fromCartesian4(e,c),f=e.w;if(!a.e.equalsEpsilon(o.o.magnitude(l),1,a.e.EPSILON6))throw new t.t("normal must be normalized.");return n.e(r)?(o.o.clone(l,r.normal),r.distance=f,r):new i(l,f)},i.getPointDistance=function(e,n){return t.o.typeOf.object("plane",e),t.o.typeOf.object("point",n),o.o.dot(e.normal,n)+e.distance};var l=new o.o;i.projectPointOntoPlane=function(e,a,r){t.o.typeOf.object("plane",e),t.o.typeOf.object("point",a),n.e(r)||(r=new o.o);var c=i.getPointDistance(e,a),f=o.o.multiplyByScalar(e.normal,c,l);return o.o.subtract(a,f,r)};var f=new o.o;i.transform=function(e,n,a){return t.o.typeOf.object("plane",e),t.o.typeOf.object("transform",n),r.p.multiplyByPointAsVector(n,e.normal,c),o.o.normalize(c,c),o.o.multiplyByScalar(e.normal,-e.distance,f),r.p.multiplyByPoint(n,f,f),i.fromPointNormal(f,c,a)},i.clone=function(e,a){return t.o.typeOf.object("plane",e),n.e(a)?(o.o.clone(e.normal,a.normal),a.distance=e.distance,a):new i(e.normal,e.distance)},i.equals=function(e,n){return t.o.typeOf.object("left",e),t.o.typeOf.object("right",n),e.distance===n.distance&&o.o.equals(e.normal,n.normal)},i.ORIGIN_XY_PLANE=Object.freeze(new i(o.o.UNIT_Z,0)),i.ORIGIN_YZ_PLANE=Object.freeze(new i(o.o.UNIT_X,0)),i.ORIGIN_ZX_PLANE=Object.freeze(new i(o.o.UNIT_Y,0)),e.o=i})); +define(["exports","./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./Math-ecf82623","./FeatureDetection-fd297af4"],(function(e,o,t,n,a,r){"use strict";function i(e,n){if(t.o.typeOf.object("normal",e),!a.e.equalsEpsilon(o.o.magnitude(e),1,a.e.EPSILON6))throw new t.t("normal must be normalized.");t.o.typeOf.number("distance",n),this.normal=o.o.clone(e),this.distance=n}i.fromPointNormal=function(e,r,c){if(t.o.typeOf.object("point",e),t.o.typeOf.object("normal",r),!a.e.equalsEpsilon(o.o.magnitude(r),1,a.e.EPSILON6))throw new t.t("normal must be normalized.");var l=-o.o.dot(r,e);return n.e(c)?(o.o.clone(r,c.normal),c.distance=l,c):new i(r,l)};var c=new o.o;i.fromCartesian4=function(e,r){t.o.typeOf.object("coefficients",e);var l=o.o.fromCartesian4(e,c),f=e.w;if(!a.e.equalsEpsilon(o.o.magnitude(l),1,a.e.EPSILON6))throw new t.t("normal must be normalized.");return n.e(r)?(o.o.clone(l,r.normal),r.distance=f,r):new i(l,f)},i.getPointDistance=function(e,n){return t.o.typeOf.object("plane",e),t.o.typeOf.object("point",n),o.o.dot(e.normal,n)+e.distance};var l=new o.o;i.projectPointOntoPlane=function(e,a,r){t.o.typeOf.object("plane",e),t.o.typeOf.object("point",a),n.e(r)||(r=new o.o);var c=i.getPointDistance(e,a),f=o.o.multiplyByScalar(e.normal,c,l);return o.o.subtract(a,f,r)};var f=new o.o;i.transform=function(e,n,a){return t.o.typeOf.object("plane",e),t.o.typeOf.object("transform",n),r.p.multiplyByPointAsVector(n,e.normal,c),o.o.normalize(c,c),o.o.multiplyByScalar(e.normal,-e.distance,f),r.p.multiplyByPoint(n,f,f),i.fromPointNormal(f,c,a)},i.clone=function(e,a){return t.o.typeOf.object("plane",e),n.e(a)?(o.o.clone(e.normal,a.normal),a.distance=e.distance,a):new i(e.normal,e.distance)},i.equals=function(e,n){return t.o.typeOf.object("left",e),t.o.typeOf.object("right",n),e.distance===n.distance&&o.o.equals(e.normal,n.normal)},i.ORIGIN_XY_PLANE=Object.freeze(new i(o.o.UNIT_Z,0)),i.ORIGIN_YZ_PLANE=Object.freeze(new i(o.o.UNIT_X,0)),i.ORIGIN_ZX_PLANE=Object.freeze(new i(o.o.UNIT_Y,0)),e.o=i})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/PolygonGeometryLibrary-c16a4c7e.js b/SuperMap iEarth/public/SuperMap3D/Workers/PolygonGeometryLibrary-eea5d80b.js similarity index 96% rename from SuperMap iEarth/public/SuperMap3D/Workers/PolygonGeometryLibrary-c16a4c7e.js rename to SuperMap iEarth/public/SuperMap3D/Workers/PolygonGeometryLibrary-eea5d80b.js index cf833173..7908df2f 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/PolygonGeometryLibrary-c16a4c7e.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/PolygonGeometryLibrary-eea5d80b.js @@ -1 +1 @@ -define(["exports","./ArcType-31298545","./arrayRemoveDuplicates-a6924649","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./ComponentDatatype-98414d16","./when-92c6cf3c","./EllipsoidRhumbLine-b1a766ae","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryPipeline-7ffd3f60","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-cec0163f","./PolygonPipeline-425528b3"],(function(e,t,r,o,n,i,a,s,u,h,c,l,f,p,v,g){"use strict";function y(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(y.prototype,{length:{get:function(){return this._length}}}),y.prototype.enqueue=function(e){this._array.push(e),this._length++},y.prototype.dequeue=function(){if(0!==this._length){var e=this._array,t=this._offset,r=e[t];return e[t]=void 0,++t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,r}},y.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},y.prototype.contains=function(e){return-1!==this._array.indexOf(e)},y.prototype.clear=function(){this._array.length=this._offset=this._length=0},y.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var d={computeHierarchyPackedLength:function(e){for(var t=0,r=[e];r.length>0;){var o=r.pop();if(s.e(o)){t+=2;var i=o.positions,a=o.holes;if(s.e(i)&&(t+=i.length*n.o.packedLength),s.e(a))for(var u=a.length,h=0;h<u;++h)r.push(a[h])}}return t},packPolygonHierarchy:function(e,t,r){for(var o=[e];o.length>0;){var i=o.pop();if(s.e(i)){var a=i.positions,u=i.holes;if(t[r++]=s.e(a)?a.length:0,t[r++]=s.e(u)?u.length:0,s.e(a))for(var h=a.length,c=0;c<h;++c,r+=3)n.o.pack(a[c],t,r);if(s.e(u))for(var l=u.length,f=0;f<l;++f)o.push(u[f])}}return r},unpackPolygonHierarchy:function(e,t){for(var r=e[t++],o=e[t++],i=new Array(r),a=o>0?new Array(o):void 0,s=0;s<r;++s,t+=n.o.packedLength)i[s]=n.o.unpack(e,t);for(var u=0;u<o;++u)a[u]=d.unpackPolygonHierarchy(e,t),t=a[u].startingIndex,delete a[u].startingIndex;return{positions:i,holes:a,startingIndex:t}}},m=new n.o;function b(e,t,r,o){return n.o.subtract(t,e,m),n.o.multiplyByScalar(m,r/o,m),n.o.add(e,m,m),[m.x,m.y,m.z]}d.subdivideLineCount=function(e,t,r){var o=n.o.distance(e,t)/r,i=Math.max(0,Math.ceil(p.e.log2(o)));return Math.pow(2,i)};var I=new i.a,w=new i.a,_=new i.a,L=new n.o;d.subdivideRhumbLineCount=function(e,t,r,o){var n=e.cartesianToCartographic(t,I),i=e.cartesianToCartographic(r,w),a=new u.P(n,i,e).surfaceDistance/o,s=Math.max(0,Math.ceil(p.e.log2(a)));return Math.pow(2,s)},d.subdivideLine=function(e,t,r,o){var i=d.subdivideLineCount(e,t,r),a=n.o.distance(e,t),u=a/i;s.e(o)||(o=[]);var h=o;h.length=3*i;for(var c=0,l=0;l<i;l++){var f=b(e,t,l*u,a);h[c++]=f[0],h[c++]=f[1],h[c++]=f[2]}return h},d.subdivideRhumbLine=function(e,t,r,o,n){var i=e.cartesianToCartographic(t,I),a=e.cartesianToCartographic(r,w),h=new u.P(i,a,e),c=h.surfaceDistance/o,l=Math.max(0,Math.ceil(p.e.log2(c))),f=Math.pow(2,l),v=h.surfaceDistance/f;s.e(n)||(n=[]);var g=n;g.length=3*f;for(var y=0,d=0;d<f;d++){var m=h.interpolateUsingSurfaceDistance(d*v,_),b=e.cartographicToCartesian(m,L);g[y++]=b.x,g[y++]=b.y,g[y++]=b.z}return g};var x=new n.o,E=new n.o,D=new n.o,S=new n.o;d.scaleToGeodeticHeightExtruded=function(e,t,r,i,a){i=s.u(i,o.t.WGS84);var u=x,h=E,c=D,l=S;if(s.e(e)&&s.e(e.attributes)&&s.e(e.attributes.position))for(var f=e.attributes.position.values,p=f.length/2,v=0;v<p;v+=3)n.o.fromArray(f,v,c),i.geodeticSurfaceNormal(c,u),l=i.scaleToGeodeticSurface(c,l),h=n.o.multiplyByScalar(u,r,h),h=n.o.add(l,h,h),f[v+p]=h.x,f[v+1+p]=h.y,f[v+2+p]=h.z,a&&(l=n.o.clone(c,l)),h=n.o.multiplyByScalar(u,t,h),h=n.o.add(l,h,h),f[v]=h.x,f[v+1]=h.y,f[v+2]=h.z;return e},d.polygonOutlinesFromHierarchy=function(e,t,o){var i,a,u,h=[],c=new y;for(c.enqueue(e);0!==c.length;){var l=c.dequeue(),f=l.positions;if(t)for(u=f.length,i=0;i<u;i++)o.scaleToGeodeticSurface(f[i],f[i]);if(!((f=r.D(f,n.o.equalsEpsilon,!0)).length<3)){var p=l.holes?l.holes.length:0;for(i=0;i<p;i++){var v=l.holes[i],g=v.positions;if(t)for(u=g.length,a=0;a<u;++a)o.scaleToGeodeticSurface(g[a],g[a]);if(!((g=r.D(g,n.o.equalsEpsilon,!0)).length<3)){h.push(g);var d=0;for(s.e(v.holes)&&(d=v.holes.length),a=0;a<d;a++)c.enqueue(v.holes[a])}}h.push(f)}}return h};var A=new n.o(6378137,6378137,6378137);d.polygonsFromHierarchy=function(e,t,o,i){var a=[],u=[],h=new y;for(h.enqueue(e);0!==h.length;){var c,l,f,v=h.dequeue(),d=v.positions,m=v.holes,b=d.slice();if(o)for(l=d.length,c=0;c<l;c++)i.scaleToGeodeticSurface(d[c],b[c]);if(s.e(i)&&!n.o.equals(i._radii,A)&&(f=p.e.EPSILON7),!((d=r.D(b,n.o.equalsEpsilon,!0,f)).length<3)){var I=t(d);if(s.e(I)){var w=[],_=g.A.computeWindingOrder2D(I);_===g.W.CLOCKWISE&&(I.reverse(),d=d.slice().reverse());var L,x=d.slice(),E=s.e(m)?m.length:0,D=[];for(c=0;c<E;c++){var S=m[c],T=S.positions;if(o)for(l=T.length,L=0;L<l;++L)i.scaleToGeodeticSurface(T[L],T[L]);if(!((T=r.D(T,n.o.equalsEpsilon,!0,p.e.EPSILON7)).length<3)){var C=t(T);if(s.e(C)){(_=g.A.computeWindingOrder2D(C))===g.W.CLOCKWISE&&(C.reverse(),T=T.slice().reverse()),D.push(T),w.push(x.length),x=x.concat(T),I=I.concat(C);var N=0;for(s.e(S.holes)&&(N=S.holes.length),L=0;L<N;L++)h.enqueue(S.holes[L])}}}a.push({outerRing:d,holes:D}),u.push({positions:x,positions2D:I,holes:w})}}}return{hierarchy:a,polygons:u}};var T=new o.o,C=new n.o,N=new h.n,G=new v.p$1;d.computeBoundingRectangle=function(e,t,r,o,i){for(var a=h.n.fromAxisAngle(e,o,N),u=v.p$1.fromQuaternion(a,G),c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,f=Number.POSITIVE_INFINITY,p=Number.NEGATIVE_INFINITY,g=r.length,y=0;y<g;++y){var d=n.o.clone(r[y],C);v.p$1.multiplyByVector(u,d,d);var m=t(d,T);s.e(m)&&(c=Math.min(c,m.x),l=Math.max(l,m.x),f=Math.min(f,m.y),p=Math.max(p,m.y))}return i.x=c,i.y=f,i.width=l-c,i.height=p-f,i},d.createGeometryFromPositions=function(e,r,o,n,i,s){var u=g.A.triangulate(r.positions2D,r.holes);u.length<3&&(u=[0,1,2]);var c=r.positions;if(n){for(var f=c.length,p=new Array(3*f),y=0,d=0;d<f;d++){var m=c[d];p[y++]=m.x,p[y++]=m.y,p[y++]=m.z}var b=new h.I({attributes:{position:new h.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})},indices:u,primitiveType:v._0x4b6a27.TRIANGLES});return i.normal?l.k.computeNormal(b):b}return s===t.L.GEODESIC?g.A.computeSubdivision(e,c,u,o):s===t.L.RHUMB?g.A.computeRhumbLineSubdivision(e,c,u,o):void 0};var P=[],O=new n.o,M=new n.o;d.computeWallGeometry=function(e,r,o,i,s){var u,l,g,y,m,b=e.length,I=0;if(i)for(l=3*b*2,u=new Array(2*l),g=0;g<b;g++)y=e[g],m=e[(g+1)%b],u[I]=u[I+l]=y.x,u[++I]=u[I+l]=y.y,u[++I]=u[I+l]=y.z,u[++I]=u[I+l]=m.x,u[++I]=u[I+l]=m.y,u[++I]=u[I+l]=m.z,++I;else{var w=p.e.chordLength(o,r.maximumRadius),_=0;if(s===t.L.GEODESIC)for(g=0;g<b;g++)_+=d.subdivideLineCount(e[g],e[(g+1)%b],w);else if(s===t.L.RHUMB)for(g=0;g<b;g++)_+=d.subdivideRhumbLineCount(r,e[g],e[(g+1)%b],w);for(l=3*(_+b),u=new Array(2*l),g=0;g<b;g++){var L;y=e[g],m=e[(g+1)%b],s===t.L.GEODESIC?L=d.subdivideLine(y,m,w,P):s===t.L.RHUMB&&(L=d.subdivideRhumbLine(r,y,m,w,P));for(var x=L.length,E=0;E<x;++E,++I)u[I]=L[E],u[I+l]=L[E];u[I]=m.x,u[I+l]=m.x,u[++I]=m.y,u[I+l]=m.y,u[++I]=m.z,u[I+l]=m.z,++I}}b=u.length;var D=f.IndexDatatype.createTypedArray(b/3,b-6*e.length),S=0;for(b/=6,g=0;g<b;g++){var A=g,T=A+1,C=A+b,N=C+1;y=n.o.fromArray(u,3*A,O),m=n.o.fromArray(u,3*T,M),!n.o.equalsEpsilon(y,m,p.e.EPSILON10,p.e.EPSILON10)&&(D[S++]=A,D[S++]=C,D[S++]=T,D[S++]=T,D[S++]=C,D[S++]=N)}return new h.I({attributes:new c.a({position:new h.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u})}),indices:D,primitiveType:v._0x4b6a27.TRIANGLES})},e.y=d})); +define(["exports","./ArcType-31298545","./arrayRemoveDuplicates-a6924649","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./ComponentDatatype-98414d16","./when-92c6cf3c","./EllipsoidRhumbLine-b1a766ae","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryPipeline-50805727","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-fd297af4","./PolygonPipeline-c329dec3"],(function(e,t,r,o,n,i,a,s,u,h,c,l,f,p,v,g){"use strict";function y(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(y.prototype,{length:{get:function(){return this._length}}}),y.prototype.enqueue=function(e){this._array.push(e),this._length++},y.prototype.dequeue=function(){if(0!==this._length){var e=this._array,t=this._offset,r=e[t];return e[t]=void 0,++t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,r}},y.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},y.prototype.contains=function(e){return-1!==this._array.indexOf(e)},y.prototype.clear=function(){this._array.length=this._offset=this._length=0},y.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var d={computeHierarchyPackedLength:function(e){for(var t=0,r=[e];r.length>0;){var o=r.pop();if(s.e(o)){t+=2;var i=o.positions,a=o.holes;if(s.e(i)&&(t+=i.length*n.o.packedLength),s.e(a))for(var u=a.length,h=0;h<u;++h)r.push(a[h])}}return t},packPolygonHierarchy:function(e,t,r){for(var o=[e];o.length>0;){var i=o.pop();if(s.e(i)){var a=i.positions,u=i.holes;if(t[r++]=s.e(a)?a.length:0,t[r++]=s.e(u)?u.length:0,s.e(a))for(var h=a.length,c=0;c<h;++c,r+=3)n.o.pack(a[c],t,r);if(s.e(u))for(var l=u.length,f=0;f<l;++f)o.push(u[f])}}return r},unpackPolygonHierarchy:function(e,t){for(var r=e[t++],o=e[t++],i=new Array(r),a=o>0?new Array(o):void 0,s=0;s<r;++s,t+=n.o.packedLength)i[s]=n.o.unpack(e,t);for(var u=0;u<o;++u)a[u]=d.unpackPolygonHierarchy(e,t),t=a[u].startingIndex,delete a[u].startingIndex;return{positions:i,holes:a,startingIndex:t}}},m=new n.o;function b(e,t,r,o){return n.o.subtract(t,e,m),n.o.multiplyByScalar(m,r/o,m),n.o.add(e,m,m),[m.x,m.y,m.z]}d.subdivideLineCount=function(e,t,r){var o=n.o.distance(e,t)/r,i=Math.max(0,Math.ceil(p.e.log2(o)));return Math.pow(2,i)};var I=new i.a,w=new i.a,_=new i.a,L=new n.o;d.subdivideRhumbLineCount=function(e,t,r,o){var n=e.cartesianToCartographic(t,I),i=e.cartesianToCartographic(r,w),a=new u.P(n,i,e).surfaceDistance/o,s=Math.max(0,Math.ceil(p.e.log2(a)));return Math.pow(2,s)},d.subdivideLine=function(e,t,r,o){var i=d.subdivideLineCount(e,t,r),a=n.o.distance(e,t),u=a/i;s.e(o)||(o=[]);var h=o;h.length=3*i;for(var c=0,l=0;l<i;l++){var f=b(e,t,l*u,a);h[c++]=f[0],h[c++]=f[1],h[c++]=f[2]}return h},d.subdivideRhumbLine=function(e,t,r,o,n){var i=e.cartesianToCartographic(t,I),a=e.cartesianToCartographic(r,w),h=new u.P(i,a,e),c=h.surfaceDistance/o,l=Math.max(0,Math.ceil(p.e.log2(c))),f=Math.pow(2,l),v=h.surfaceDistance/f;s.e(n)||(n=[]);var g=n;g.length=3*f;for(var y=0,d=0;d<f;d++){var m=h.interpolateUsingSurfaceDistance(d*v,_),b=e.cartographicToCartesian(m,L);g[y++]=b.x,g[y++]=b.y,g[y++]=b.z}return g};var x=new n.o,E=new n.o,D=new n.o,S=new n.o;d.scaleToGeodeticHeightExtruded=function(e,t,r,i,a){i=s.u(i,o.t.WGS84);var u=x,h=E,c=D,l=S;if(s.e(e)&&s.e(e.attributes)&&s.e(e.attributes.position))for(var f=e.attributes.position.values,p=f.length/2,v=0;v<p;v+=3)n.o.fromArray(f,v,c),i.geodeticSurfaceNormal(c,u),l=i.scaleToGeodeticSurface(c,l),h=n.o.multiplyByScalar(u,r,h),h=n.o.add(l,h,h),f[v+p]=h.x,f[v+1+p]=h.y,f[v+2+p]=h.z,a&&(l=n.o.clone(c,l)),h=n.o.multiplyByScalar(u,t,h),h=n.o.add(l,h,h),f[v]=h.x,f[v+1]=h.y,f[v+2]=h.z;return e},d.polygonOutlinesFromHierarchy=function(e,t,o){var i,a,u,h=[],c=new y;for(c.enqueue(e);0!==c.length;){var l=c.dequeue(),f=l.positions;if(t)for(u=f.length,i=0;i<u;i++)o.scaleToGeodeticSurface(f[i],f[i]);if(!((f=r.D(f,n.o.equalsEpsilon,!0)).length<3)){var p=l.holes?l.holes.length:0;for(i=0;i<p;i++){var v=l.holes[i],g=v.positions;if(t)for(u=g.length,a=0;a<u;++a)o.scaleToGeodeticSurface(g[a],g[a]);if(!((g=r.D(g,n.o.equalsEpsilon,!0)).length<3)){h.push(g);var d=0;for(s.e(v.holes)&&(d=v.holes.length),a=0;a<d;a++)c.enqueue(v.holes[a])}}h.push(f)}}return h};var A=new n.o(6378137,6378137,6378137);d.polygonsFromHierarchy=function(e,t,o,i){var a=[],u=[],h=new y;for(h.enqueue(e);0!==h.length;){var c,l,f,v=h.dequeue(),d=v.positions,m=v.holes,b=d.slice();if(o)for(l=d.length,c=0;c<l;c++)i.scaleToGeodeticSurface(d[c],b[c]);if(s.e(i)&&!n.o.equals(i._radii,A)&&(f=p.e.EPSILON7),!((d=r.D(b,n.o.equalsEpsilon,!0,f)).length<3)){var I=t(d);if(s.e(I)){var w=[],_=g.A.computeWindingOrder2D(I);_===g.W.CLOCKWISE&&(I.reverse(),d=d.slice().reverse());var L,x=d.slice(),E=s.e(m)?m.length:0,D=[];for(c=0;c<E;c++){var S=m[c],T=S.positions;if(o)for(l=T.length,L=0;L<l;++L)i.scaleToGeodeticSurface(T[L],T[L]);if(!((T=r.D(T,n.o.equalsEpsilon,!0,p.e.EPSILON7)).length<3)){var C=t(T);if(s.e(C)){(_=g.A.computeWindingOrder2D(C))===g.W.CLOCKWISE&&(C.reverse(),T=T.slice().reverse()),D.push(T),w.push(x.length),x=x.concat(T),I=I.concat(C);var N=0;for(s.e(S.holes)&&(N=S.holes.length),L=0;L<N;L++)h.enqueue(S.holes[L])}}}a.push({outerRing:d,holes:D}),u.push({positions:x,positions2D:I,holes:w})}}}return{hierarchy:a,polygons:u}};var T=new o.o,C=new n.o,N=new h.n,G=new v.p$1;d.computeBoundingRectangle=function(e,t,r,o,i){for(var a=h.n.fromAxisAngle(e,o,N),u=v.p$1.fromQuaternion(a,G),c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,f=Number.POSITIVE_INFINITY,p=Number.NEGATIVE_INFINITY,g=r.length,y=0;y<g;++y){var d=n.o.clone(r[y],C);v.p$1.multiplyByVector(u,d,d);var m=t(d,T);s.e(m)&&(c=Math.min(c,m.x),l=Math.max(l,m.x),f=Math.min(f,m.y),p=Math.max(p,m.y))}return i.x=c,i.y=f,i.width=l-c,i.height=p-f,i},d.createGeometryFromPositions=function(e,r,o,n,i,s){var u=g.A.triangulate(r.positions2D,r.holes);u.length<3&&(u=[0,1,2]);var c=r.positions;if(n){for(var f=c.length,p=new Array(3*f),y=0,d=0;d<f;d++){var m=c[d];p[y++]=m.x,p[y++]=m.y,p[y++]=m.z}var b=new h.I({attributes:{position:new h.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})},indices:u,primitiveType:v._0x3b3836.TRIANGLES});return i.normal?l.k.computeNormal(b):b}return s===t.L.GEODESIC?g.A.computeSubdivision(e,c,u,o):s===t.L.RHUMB?g.A.computeRhumbLineSubdivision(e,c,u,o):void 0};var P=[],O=new n.o,M=new n.o;d.computeWallGeometry=function(e,r,o,i,s){var u,l,g,y,m,b=e.length,I=0;if(i)for(l=3*b*2,u=new Array(2*l),g=0;g<b;g++)y=e[g],m=e[(g+1)%b],u[I]=u[I+l]=y.x,u[++I]=u[I+l]=y.y,u[++I]=u[I+l]=y.z,u[++I]=u[I+l]=m.x,u[++I]=u[I+l]=m.y,u[++I]=u[I+l]=m.z,++I;else{var w=p.e.chordLength(o,r.maximumRadius),_=0;if(s===t.L.GEODESIC)for(g=0;g<b;g++)_+=d.subdivideLineCount(e[g],e[(g+1)%b],w);else if(s===t.L.RHUMB)for(g=0;g<b;g++)_+=d.subdivideRhumbLineCount(r,e[g],e[(g+1)%b],w);for(l=3*(_+b),u=new Array(2*l),g=0;g<b;g++){var L;y=e[g],m=e[(g+1)%b],s===t.L.GEODESIC?L=d.subdivideLine(y,m,w,P):s===t.L.RHUMB&&(L=d.subdivideRhumbLine(r,y,m,w,P));for(var x=L.length,E=0;E<x;++E,++I)u[I]=L[E],u[I+l]=L[E];u[I]=m.x,u[I+l]=m.x,u[++I]=m.y,u[I+l]=m.y,u[++I]=m.z,u[I+l]=m.z,++I}}b=u.length;var D=f.IndexDatatype.createTypedArray(b/3,b-6*e.length),S=0;for(b/=6,g=0;g<b;g++){var A=g,T=A+1,C=A+b,N=C+1;y=n.o.fromArray(u,3*A,O),m=n.o.fromArray(u,3*T,M),!n.o.equalsEpsilon(y,m,p.e.EPSILON10,p.e.EPSILON10)&&(D[S++]=A,D[S++]=C,D[S++]=T,D[S++]=T,D[S++]=C,D[S++]=N)}return new h.I({attributes:new c.a({position:new h.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u})}),indices:D,primitiveType:v._0x3b3836.TRIANGLES})},e.y=d})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/PolygonPipeline-425528b3.js b/SuperMap iEarth/public/SuperMap3D/Workers/PolygonPipeline-c329dec3.js similarity index 71% rename from SuperMap iEarth/public/SuperMap3D/Workers/PolygonPipeline-425528b3.js rename to SuperMap iEarth/public/SuperMap3D/Workers/PolygonPipeline-c329dec3.js index 90098abf..4427f223 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/PolygonPipeline-425528b3.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/PolygonPipeline-c329dec3.js @@ -1 +1 @@ -define(["exports","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./ComponentDatatype-98414d16","./when-92c6cf3c","./EllipsoidRhumbLine-b1a766ae","./GeometryAttribute-f47bd1cb","./Math-ecf82623","./FeatureDetection-cec0163f","./WebGLConstants-42651efd"],(function(e,n,t,r,i,a,o,x,u,p,h,y){"use strict";function f(e,n,t){t=t||2;var r,i,a,o,x,u,p,h=n&&n.length,y=h?n[0]*t:e.length,f=s(e,0,y,t,!0),c=[];if(!f||f.next===f.prev)return c;if(h&&(f=function(e,n,t,r){var i,a,o,x,u,p=[];for(i=0,a=n.length;i<a;i++)o=n[i]*r,x=i<a-1?n[i+1]*r:e.length,(u=s(e,o,x,r,!1))===u.next&&(u.steiner=!0),p.push(O(u));for(p.sort(b),i=0;i<p.length;i++)w(p[i],t),t=l(t,t.next);return t}(e,n,f,t)),e.length>80*t){r=a=e[0],i=o=e[1];for(var d=t;d<y;d+=t)(x=e[d])<r&&(r=x),(u=e[d+1])<i&&(i=u),x>a&&(a=x),u>o&&(o=u);p=0!==(p=Math.max(a-r,o-i))?1/p:0}return v(f,c,t,r,i,p),c}function s(e,n,t,r,i){var a,o;if(i===P(e,n,t,r)>0)for(a=n;a<t;a+=r)o=I(a,e[a],e[a+1],o);else for(a=t-r;a>=n;a-=r)o=I(a,e[a],e[a+1],o);return o&&z(o,o.next)&&(N(o),o=o.next),o}function l(e,n){if(!e)return e;n||(n=e);var t,r=e;do{if(t=!1,r.steiner||!z(r,r.next)&&0!==S(r.prev,r,r.next))r=r.next;else{if(N(r),(r=n=r.prev)===r.next)break;t=!0}}while(t||r!==n);return n}function v(e,n,t,r,i,a,o){if(e){!o&&a&&function(e,n,t,r){var i=e;do{null===i.z&&(i.z=C(i.x,i.y,n,t,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var n,t,r,i,a,o,x,u,p=1;do{for(t=e,e=null,a=null,o=0;t;){for(o++,r=t,x=0,n=0;n<p&&(x++,r=r.nextZ);n++);for(u=p;x>0||u>0&&r;)0!==x&&(0===u||!r||t.z<=r.z)?(i=t,t=t.nextZ,x--):(i=r,r=r.nextZ,u--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;t=r}a.nextZ=null,p*=2}while(o>1)}(i)}(e,r,i,a);for(var x,u,p=e;e.prev!==e.next;)if(x=e.prev,u=e.next,a?d(e,r,i,a):c(e))n.push(x.i/t),n.push(e.i/t),n.push(u.i/t),N(e),e=u.next,p=u.next;else if((e=u)===p){o?1===o?v(e=m(l(e),n,t),n,t,r,i,a,2):2===o&&g(e,n,t,r,i,a):v(l(e),n,t,r,i,a,1);break}}}function c(e){var n=e.prev,t=e,r=e.next;if(S(n,t,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(Z(n.x,n.y,t.x,t.y,r.x,r.y,i.x,i.y)&&S(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function d(e,n,t,r){var i=e.prev,a=e,o=e.next;if(S(i,a,o)>=0)return!1;for(var x=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,u=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,p=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,h=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,y=C(x,u,n,t,r),f=C(p,h,n,t,r),s=e.prevZ,l=e.nextZ;s&&s.z>=y&&l&&l.z<=f;){if(s!==e.prev&&s!==e.next&&Z(i.x,i.y,a.x,a.y,o.x,o.y,s.x,s.y)&&S(s.prev,s,s.next)>=0||(s=s.prevZ,l!==e.prev&&l!==e.next&&Z(i.x,i.y,a.x,a.y,o.x,o.y,l.x,l.y)&&S(l.prev,l,l.next)>=0))return!1;l=l.nextZ}for(;s&&s.z>=y;){if(s!==e.prev&&s!==e.next&&Z(i.x,i.y,a.x,a.y,o.x,o.y,s.x,s.y)&&S(s.prev,s,s.next)>=0)return!1;s=s.prevZ}for(;l&&l.z<=f;){if(l!==e.prev&&l!==e.next&&Z(i.x,i.y,a.x,a.y,o.x,o.y,l.x,l.y)&&S(l.prev,l,l.next)>=0)return!1;l=l.nextZ}return!0}function m(e,n,t){var r=e;do{var i=r.prev,a=r.next.next;!z(i,a)&&A(i,r,r.next,a)&&T(i,a)&&T(a,i)&&(n.push(i.i/t),n.push(r.i/t),n.push(a.i/t),N(r),N(r.next),r=e=a),r=r.next}while(r!==e);return l(r)}function g(e,n,t,r,i,a){var o=e;do{for(var x=o.next.next;x!==o.prev;){if(o.i!==x.i&&M(o,x)){var u=L(o,x);return o=l(o,o.next),u=l(u,u.next),v(o,n,t,r,i,a),void v(u,n,t,r,i,a)}x=x.next}o=o.next}while(o!==e)}function b(e,n){return e.x-n.x}function w(e,n){if(n=function(e,n){var t,r=n,i=e.x,a=e.y,o=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var x=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(x<=i&&x>o){if(o=x,x===i){if(a===r.y)return r;if(a===r.next.y)return r.next}t=r.x<r.next.x?r:r.next}}r=r.next}while(r!==n);if(!t)return null;if(i===o)return t;var u,p=t,h=t.x,y=t.y,f=1/0;r=t;do{i>=r.x&&r.x>=h&&i!==r.x&&Z(a<y?i:o,a,h,y,a<y?o:i,a,r.x,r.y)&&(u=Math.abs(a-r.y)/(i-r.x),T(r,e)&&(u<f||u===f&&(r.x>t.x||r.x===t.x&&E(t,r)))&&(t=r,f=u)),r=r.next}while(r!==p);return t}(e,n),n){var t=L(n,e);l(t,t.next)}}function E(e,n){return S(e.prev,e,n.prev)<0&&S(n.next,e,e.next)<0}function C(e,n,t,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-t)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=32767*(n-r)*i)|n<<8))|n<<4))|n<<2))|n<<1))<<1}function O(e){var n=e,t=e;do{(n.x<t.x||n.x===t.x&&n.y<t.y)&&(t=n),n=n.next}while(n!==e);return t}function Z(e,n,t,r,i,a,o,x){return(i-o)*(n-x)-(e-o)*(a-x)>=0&&(e-o)*(r-x)-(t-o)*(n-x)>=0&&(t-o)*(a-x)-(i-o)*(r-x)>=0}function M(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!function(e,n){var t=e;do{if(t.i!==e.i&&t.next.i!==e.i&&t.i!==n.i&&t.next.i!==n.i&&A(t,t.next,e,n))return!0;t=t.next}while(t!==e);return!1}(e,n)&&(T(e,n)&&T(n,e)&&function(e,n){var t=e,r=!1,i=(e.x+n.x)/2,a=(e.y+n.y)/2;do{t.y>a!=t.next.y>a&&t.next.y!==t.y&&i<(t.next.x-t.x)*(a-t.y)/(t.next.y-t.y)+t.x&&(r=!r),t=t.next}while(t!==e);return r}(e,n)&&(S(e.prev,e,n.prev)||S(e,n.prev,n))||z(e,n)&&S(e.prev,e,e.next)>0&&S(n.prev,n,n.next)>0)}function S(e,n,t){return(n.y-e.y)*(t.x-n.x)-(n.x-e.x)*(t.y-n.y)}function z(e,n){return e.x===n.x&&e.y===n.y}function A(e,n,t,r){var i=R(S(e,n,t)),a=R(S(e,n,r)),o=R(S(t,r,e)),x=R(S(t,r,n));return!!(i!==a&&o!==x||0===i&&D(e,t,n)||0===a&&D(e,r,n)||0===o&&D(t,e,r)||0===x&&D(t,n,r))}function D(e,n,t){return n.x<=Math.max(e.x,t.x)&&n.x>=Math.min(e.x,t.x)&&n.y<=Math.max(e.y,t.y)&&n.y>=Math.min(e.y,t.y)}function R(e){return e>0?1:e<0?-1:0}function T(e,n){return S(e.prev,e,e.next)<0?S(e,n,e.next)>=0&&S(e,e.prev,n)>=0:S(e,n,e.prev)<0||S(e,e.next,n)<0}function L(e,n){var t=new W(e.i,e.x,e.y),r=new W(n.i,n.x,n.y),i=e.next,a=n.prev;return e.next=n,n.prev=e,t.next=i,i.prev=t,r.next=t,t.prev=r,a.next=r,r.prev=a,r}function I(e,n,t,r){var i=new W(e,n,t);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function N(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function W(e,n,t){this.i=e,this.x=n,this.y=t,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(e,n,t,r){for(var i=0,a=n,o=t-r;a<t;a+=r)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}f.deviation=function(e,n,t,r){var i=n&&n.length,a=i?n[0]*t:e.length,o=Math.abs(P(e,0,a,t));if(i)for(var x=0,u=n.length;x<u;x++){var p=n[x]*t,h=x<u-1?n[x+1]*t:e.length;o-=Math.abs(P(e,p,h,t))}var y=0;for(x=0;x<r.length;x+=3){var f=r[x]*t,s=r[x+1]*t,l=r[x+2]*t;y+=Math.abs((e[f]-e[l])*(e[s+1]-e[f+1])-(e[f]-e[s])*(e[l+1]-e[f+1]))}return 0===o&&0===y?0:Math.abs((y-o)/o)},f.flatten=function(e){for(var n=e[0][0].length,t={vertices:[],holes:[],dimensions:n},r=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var o=0;o<n;o++)t.vertices.push(e[i][a][o]);i>0&&(r+=e[i-1].length,t.holes.push(r))}return t};var B={CLOCKWISE:y.d.CW,COUNTER_CLOCKWISE:y.d.CCW,NONE:y.d.NONE,validate:function(e){return e===B.CLOCKWISE||e===B.COUNTER_CLOCKWISE}},G=Object.freeze(B),_=new t.o,q=new t.o,U={computeArea2D:function(e){i.o.defined("positions",e),i.o.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);for(var n=e.length,t=0,r=n-1,a=0;a<n;r=a++){var o=e[r],x=e[a];t+=o.x*x.y-x.x*o.y}return.5*t},computeWindingOrder2D:function(e){return U.computeArea2D(e)>0?G.COUNTER_CLOCKWISE:G.CLOCKWISE},triangulate:function(e,t){return i.o.defined("positions",e),f(n.o.packArray(e),t,2)}},K=new t.o,k=new t.o,F=new t.o,j=new t.o,H=new t.o,J=new t.o,Q=new t.o;U.computeSubdivision=function(e,n,r,x,y){y=o.u(y,!1),x=o.u(x,p.e.RADIANS_PER_DEGREE),i.o.typeOf.object("ellipsoid",e),i.o.defined("positions",n),i.o.defined("indices",r),i.o.typeOf.number.greaterThanOrEquals("indices.length",r.length,3),i.o.typeOf.number.equals("indices.length % 3","0",r.length%3,0),i.o.typeOf.number.greaterThan("granularity",x,0);var f,s=r.slice(0),l=n.length,v=new Array(3*l),c=0;for(f=0;f<l;f++){var d=n[f];v[c++]=d.x,v[c++]=d.y,v[c++]=d.z}for(var m=[],g={},b=e.maximumRadius,w=p.e.chordLength(x,b),E=w*w;s.length>0;){var C,O,Z=s.pop(),M=s.pop(),S=s.pop(),z=t.o.fromArray(v,3*S,K),A=t.o.fromArray(v,3*M,k),D=t.o.fromArray(v,3*Z,F),R=y?z:t.o.multiplyByScalar(t.o.normalize(z,j),b,j),T=y?A:t.o.multiplyByScalar(t.o.normalize(A,H),b,H),L=y?D:t.o.multiplyByScalar(t.o.normalize(D,J),b,J),I=t.o.magnitudeSquared(t.o.subtract(R,T,Q)),N=t.o.magnitudeSquared(t.o.subtract(T,L,Q)),W=t.o.magnitudeSquared(t.o.subtract(L,R,Q)),P=Math.max(I,N,W);P>E?I===P?(f=g[C=Math.min(S,M)+" "+Math.max(S,M)],o.e(f)||(O=t.o.add(z,A,Q),t.o.multiplyByScalar(O,.5,O),v.push(O.x,O.y,O.z),f=v.length/3-1,g[C]=f),s.push(S,f,Z),s.push(f,M,Z)):N===P?(f=g[C=Math.min(M,Z)+" "+Math.max(M,Z)],o.e(f)||(O=t.o.add(A,D,Q),t.o.multiplyByScalar(O,.5,O),v.push(O.x,O.y,O.z),f=v.length/3-1,g[C]=f),s.push(M,f,S),s.push(f,Z,S)):W===P&&(f=g[C=Math.min(Z,S)+" "+Math.max(Z,S)],o.e(f)||(O=t.o.add(D,z,Q),t.o.multiplyByScalar(O,.5,O),v.push(O.x,O.y,O.z),f=v.length/3-1,g[C]=f),s.push(Z,f,M),s.push(f,S,M)):(m.push(S),m.push(M),m.push(Z))}return new u.I({attributes:{position:new u.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v})},indices:m,primitiveType:h._0x4b6a27.TRIANGLES})};var V=new r.a,X=new r.a,Y=new r.a,$=new r.a;U.computeRhumbLineSubdivision=function(e,n,r,y){y=o.u(y,p.e.RADIANS_PER_DEGREE),i.o.typeOf.object("ellipsoid",e),i.o.defined("positions",n),i.o.defined("indices",r),i.o.typeOf.number.greaterThanOrEquals("indices.length",r.length,3),i.o.typeOf.number.equals("indices.length % 3","0",r.length%3,0),i.o.typeOf.number.greaterThan("granularity",y,0);var f,s=r.slice(0),l=n.length,v=new Array(3*l),c=0;for(f=0;f<l;f++){var d=n[f];v[c++]=d.x,v[c++]=d.y,v[c++]=d.z}for(var m=[],g={},b=e.maximumRadius,w=p.e.chordLength(y,b),E=new x.P(void 0,void 0,e),C=new x.P(void 0,void 0,e),O=new x.P(void 0,void 0,e);s.length>0;){var Z=s.pop(),M=s.pop(),S=s.pop(),z=t.o.fromArray(v,3*S,K),A=t.o.fromArray(v,3*M,k),D=t.o.fromArray(v,3*Z,F),R=e.cartesianToCartographic(z,V),T=e.cartesianToCartographic(A,X),L=e.cartesianToCartographic(D,Y);E.setEndPoints(R,T);var I=E.surfaceDistance;C.setEndPoints(T,L);var N=C.surfaceDistance;O.setEndPoints(L,R);var W,P,B,G,_=O.surfaceDistance,q=Math.max(I,N,_);q>w?I===q?(f=g[W=Math.min(S,M)+" "+Math.max(S,M)],o.e(f)||(P=E.interpolateUsingFraction(.5,$),B=.5*(R.height+T.height),G=t.o.fromRadians(P.longitude,P.latitude,B,e,Q),v.push(G.x,G.y,G.z),f=v.length/3-1,g[W]=f),s.push(S,f,Z),s.push(f,M,Z)):N===q?(f=g[W=Math.min(M,Z)+" "+Math.max(M,Z)],o.e(f)||(P=C.interpolateUsingFraction(.5,$),B=.5*(T.height+L.height),G=t.o.fromRadians(P.longitude,P.latitude,B,e,Q),v.push(G.x,G.y,G.z),f=v.length/3-1,g[W]=f),s.push(M,f,S),s.push(f,Z,S)):_===q&&(f=g[W=Math.min(Z,S)+" "+Math.max(Z,S)],o.e(f)||(P=O.interpolateUsingFraction(.5,$),B=.5*(L.height+R.height),G=t.o.fromRadians(P.longitude,P.latitude,B,e,Q),v.push(G.x,G.y,G.z),f=v.length/3-1,g[W]=f),s.push(Z,f,M),s.push(f,S,M)):(m.push(S),m.push(M),m.push(Z))}return new u.I({attributes:{position:new u.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v})},indices:m,primitiveType:h._0x4b6a27.TRIANGLES})},U.scaleToGeodeticHeight=function(e,r,i,a){i=o.u(i,n.t.WGS84);var x=_,u=q;if(r=o.u(r,0),a=o.u(a,!0),o.e(e))for(var p=e.length,h=0;h<p;h+=3)t.o.fromArray(e,h,u),a&&(u=i.scaleToGeodeticSurface(u,u)),0!==r&&(x=i.geodeticSurfaceNormal(u,x),t.o.multiplyByScalar(x,r,x),t.o.add(u,x,u)),e[h]=u.x,e[h+1]=u.y,e[h+2]=u.z;return e},e.A=U,e.W=G})); +define(["exports","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./ComponentDatatype-98414d16","./when-92c6cf3c","./EllipsoidRhumbLine-b1a766ae","./GeometryAttribute-65cf868d","./Math-ecf82623","./FeatureDetection-fd297af4","./WebGLConstants-42651efd"],(function(e,n,t,r,i,a,o,x,u,p,h,f){"use strict";function y(e,n,t){t=t||2;var r,i,a,o,x,u,p,h=n&&n.length,f=h?n[0]*t:e.length,y=s(e,0,f,t,!0),c=[];if(!y||y.next===y.prev)return c;if(h&&(y=function(e,n,t,r){var i,a,o,x,u,p=[];for(i=0,a=n.length;i<a;i++)o=n[i]*r,x=i<a-1?n[i+1]*r:e.length,(u=s(e,o,x,r,!1))===u.next&&(u.steiner=!0),p.push(O(u));for(p.sort(b),i=0;i<p.length;i++)w(p[i],t),t=l(t,t.next);return t}(e,n,y,t)),e.length>80*t){r=a=e[0],i=o=e[1];for(var d=t;d<f;d+=t)(x=e[d])<r&&(r=x),(u=e[d+1])<i&&(i=u),x>a&&(a=x),u>o&&(o=u);p=0!==(p=Math.max(a-r,o-i))?1/p:0}return v(y,c,t,r,i,p),c}function s(e,n,t,r,i){var a,o;if(i===P(e,n,t,r)>0)for(a=n;a<t;a+=r)o=I(a,e[a],e[a+1],o);else for(a=t-r;a>=n;a-=r)o=I(a,e[a],e[a+1],o);return o&&z(o,o.next)&&(N(o),o=o.next),o}function l(e,n){if(!e)return e;n||(n=e);var t,r=e;do{if(t=!1,r.steiner||!z(r,r.next)&&0!==S(r.prev,r,r.next))r=r.next;else{if(N(r),(r=n=r.prev)===r.next)break;t=!0}}while(t||r!==n);return n}function v(e,n,t,r,i,a,o){if(e){!o&&a&&function(e,n,t,r){var i=e;do{null===i.z&&(i.z=C(i.x,i.y,n,t,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var n,t,r,i,a,o,x,u,p=1;do{for(t=e,e=null,a=null,o=0;t;){for(o++,r=t,x=0,n=0;n<p&&(x++,r=r.nextZ);n++);for(u=p;x>0||u>0&&r;)0!==x&&(0===u||!r||t.z<=r.z)?(i=t,t=t.nextZ,x--):(i=r,r=r.nextZ,u--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;t=r}a.nextZ=null,p*=2}while(o>1)}(i)}(e,r,i,a);for(var x,u,p=e;e.prev!==e.next;)if(x=e.prev,u=e.next,a?d(e,r,i,a):c(e))n.push(x.i/t),n.push(e.i/t),n.push(u.i/t),N(e),e=u.next,p=u.next;else if((e=u)===p){o?1===o?v(e=m(l(e),n,t),n,t,r,i,a,2):2===o&&g(e,n,t,r,i,a):v(l(e),n,t,r,i,a,1);break}}}function c(e){var n=e.prev,t=e,r=e.next;if(S(n,t,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(Z(n.x,n.y,t.x,t.y,r.x,r.y,i.x,i.y)&&S(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function d(e,n,t,r){var i=e.prev,a=e,o=e.next;if(S(i,a,o)>=0)return!1;for(var x=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,u=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,p=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,h=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=C(x,u,n,t,r),y=C(p,h,n,t,r),s=e.prevZ,l=e.nextZ;s&&s.z>=f&&l&&l.z<=y;){if(s!==e.prev&&s!==e.next&&Z(i.x,i.y,a.x,a.y,o.x,o.y,s.x,s.y)&&S(s.prev,s,s.next)>=0||(s=s.prevZ,l!==e.prev&&l!==e.next&&Z(i.x,i.y,a.x,a.y,o.x,o.y,l.x,l.y)&&S(l.prev,l,l.next)>=0))return!1;l=l.nextZ}for(;s&&s.z>=f;){if(s!==e.prev&&s!==e.next&&Z(i.x,i.y,a.x,a.y,o.x,o.y,s.x,s.y)&&S(s.prev,s,s.next)>=0)return!1;s=s.prevZ}for(;l&&l.z<=y;){if(l!==e.prev&&l!==e.next&&Z(i.x,i.y,a.x,a.y,o.x,o.y,l.x,l.y)&&S(l.prev,l,l.next)>=0)return!1;l=l.nextZ}return!0}function m(e,n,t){var r=e;do{var i=r.prev,a=r.next.next;!z(i,a)&&A(i,r,r.next,a)&&T(i,a)&&T(a,i)&&(n.push(i.i/t),n.push(r.i/t),n.push(a.i/t),N(r),N(r.next),r=e=a),r=r.next}while(r!==e);return l(r)}function g(e,n,t,r,i,a){var o=e;do{for(var x=o.next.next;x!==o.prev;){if(o.i!==x.i&&M(o,x)){var u=L(o,x);return o=l(o,o.next),u=l(u,u.next),v(o,n,t,r,i,a),void v(u,n,t,r,i,a)}x=x.next}o=o.next}while(o!==e)}function b(e,n){return e.x-n.x}function w(e,n){if(n=function(e,n){var t,r=n,i=e.x,a=e.y,o=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var x=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(x<=i&&x>o){if(o=x,x===i){if(a===r.y)return r;if(a===r.next.y)return r.next}t=r.x<r.next.x?r:r.next}}r=r.next}while(r!==n);if(!t)return null;if(i===o)return t;var u,p=t,h=t.x,f=t.y,y=1/0;r=t;do{i>=r.x&&r.x>=h&&i!==r.x&&Z(a<f?i:o,a,h,f,a<f?o:i,a,r.x,r.y)&&(u=Math.abs(a-r.y)/(i-r.x),T(r,e)&&(u<y||u===y&&(r.x>t.x||r.x===t.x&&E(t,r)))&&(t=r,y=u)),r=r.next}while(r!==p);return t}(e,n),n){var t=L(n,e);l(t,t.next)}}function E(e,n){return S(e.prev,e,n.prev)<0&&S(n.next,e,e.next)<0}function C(e,n,t,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-t)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=32767*(n-r)*i)|n<<8))|n<<4))|n<<2))|n<<1))<<1}function O(e){var n=e,t=e;do{(n.x<t.x||n.x===t.x&&n.y<t.y)&&(t=n),n=n.next}while(n!==e);return t}function Z(e,n,t,r,i,a,o,x){return(i-o)*(n-x)-(e-o)*(a-x)>=0&&(e-o)*(r-x)-(t-o)*(n-x)>=0&&(t-o)*(a-x)-(i-o)*(r-x)>=0}function M(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!function(e,n){var t=e;do{if(t.i!==e.i&&t.next.i!==e.i&&t.i!==n.i&&t.next.i!==n.i&&A(t,t.next,e,n))return!0;t=t.next}while(t!==e);return!1}(e,n)&&(T(e,n)&&T(n,e)&&function(e,n){var t=e,r=!1,i=(e.x+n.x)/2,a=(e.y+n.y)/2;do{t.y>a!=t.next.y>a&&t.next.y!==t.y&&i<(t.next.x-t.x)*(a-t.y)/(t.next.y-t.y)+t.x&&(r=!r),t=t.next}while(t!==e);return r}(e,n)&&(S(e.prev,e,n.prev)||S(e,n.prev,n))||z(e,n)&&S(e.prev,e,e.next)>0&&S(n.prev,n,n.next)>0)}function S(e,n,t){return(n.y-e.y)*(t.x-n.x)-(n.x-e.x)*(t.y-n.y)}function z(e,n){return e.x===n.x&&e.y===n.y}function A(e,n,t,r){var i=R(S(e,n,t)),a=R(S(e,n,r)),o=R(S(t,r,e)),x=R(S(t,r,n));return!!(i!==a&&o!==x||0===i&&D(e,t,n)||0===a&&D(e,r,n)||0===o&&D(t,e,r)||0===x&&D(t,n,r))}function D(e,n,t){return n.x<=Math.max(e.x,t.x)&&n.x>=Math.min(e.x,t.x)&&n.y<=Math.max(e.y,t.y)&&n.y>=Math.min(e.y,t.y)}function R(e){return e>0?1:e<0?-1:0}function T(e,n){return S(e.prev,e,e.next)<0?S(e,n,e.next)>=0&&S(e,e.prev,n)>=0:S(e,n,e.prev)<0||S(e,e.next,n)<0}function L(e,n){var t=new W(e.i,e.x,e.y),r=new W(n.i,n.x,n.y),i=e.next,a=n.prev;return e.next=n,n.prev=e,t.next=i,i.prev=t,r.next=t,t.prev=r,a.next=r,r.prev=a,r}function I(e,n,t,r){var i=new W(e,n,t);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function N(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function W(e,n,t){this.i=e,this.x=n,this.y=t,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(e,n,t,r){for(var i=0,a=n,o=t-r;a<t;a+=r)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}y.deviation=function(e,n,t,r){var i=n&&n.length,a=i?n[0]*t:e.length,o=Math.abs(P(e,0,a,t));if(i)for(var x=0,u=n.length;x<u;x++){var p=n[x]*t,h=x<u-1?n[x+1]*t:e.length;o-=Math.abs(P(e,p,h,t))}var f=0;for(x=0;x<r.length;x+=3){var y=r[x]*t,s=r[x+1]*t,l=r[x+2]*t;f+=Math.abs((e[y]-e[l])*(e[s+1]-e[y+1])-(e[y]-e[s])*(e[l+1]-e[y+1]))}return 0===o&&0===f?0:Math.abs((f-o)/o)},y.flatten=function(e){for(var n=e[0][0].length,t={vertices:[],holes:[],dimensions:n},r=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var o=0;o<n;o++)t.vertices.push(e[i][a][o]);i>0&&(r+=e[i-1].length,t.holes.push(r))}return t};var B={CLOCKWISE:f.d.CW,COUNTER_CLOCKWISE:f.d.CCW,NONE:f.d.NONE,validate:function(e){return e===B.CLOCKWISE||e===B.COUNTER_CLOCKWISE}},G=Object.freeze(B),_=new t.o,q=new t.o,U={computeArea2D:function(e){i.o.defined("positions",e),i.o.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);for(var n=e.length,t=0,r=n-1,a=0;a<n;r=a++){var o=e[r],x=e[a];t+=o.x*x.y-x.x*o.y}return.5*t},computeWindingOrder2D:function(e){return U.computeArea2D(e)>0?G.COUNTER_CLOCKWISE:G.CLOCKWISE},triangulate:function(e,t){return i.o.defined("positions",e),y(n.o.packArray(e),t,2)}},K=new t.o,k=new t.o,F=new t.o,j=new t.o,H=new t.o,J=new t.o,Q=new t.o;U.computeSubdivision=function(e,n,r,x,f){f=o.u(f,!1),x=o.u(x,p.e.RADIANS_PER_DEGREE),i.o.typeOf.object("ellipsoid",e),i.o.defined("positions",n),i.o.defined("indices",r),i.o.typeOf.number.greaterThanOrEquals("indices.length",r.length,3),i.o.typeOf.number.equals("indices.length % 3","0",r.length%3,0),i.o.typeOf.number.greaterThan("granularity",x,0);var y,s=r.slice(0),l=n.length,v=new Array(3*l),c=0;for(y=0;y<l;y++){var d=n[y];v[c++]=d.x,v[c++]=d.y,v[c++]=d.z}for(var m=[],g={},b=e.maximumRadius,w=p.e.chordLength(x,b),E=w*w;s.length>0;){var C,O,Z=s.pop(),M=s.pop(),S=s.pop(),z=t.o.fromArray(v,3*S,K),A=t.o.fromArray(v,3*M,k),D=t.o.fromArray(v,3*Z,F),R=f?z:t.o.multiplyByScalar(t.o.normalize(z,j),b,j),T=f?A:t.o.multiplyByScalar(t.o.normalize(A,H),b,H),L=f?D:t.o.multiplyByScalar(t.o.normalize(D,J),b,J),I=t.o.magnitudeSquared(t.o.subtract(R,T,Q)),N=t.o.magnitudeSquared(t.o.subtract(T,L,Q)),W=t.o.magnitudeSquared(t.o.subtract(L,R,Q)),P=Math.max(I,N,W);P>E?I===P?(y=g[C=Math.min(S,M)+" "+Math.max(S,M)],o.e(y)||(O=t.o.add(z,A,Q),t.o.multiplyByScalar(O,.5,O),v.push(O.x,O.y,O.z),y=v.length/3-1,g[C]=y),s.push(S,y,Z),s.push(y,M,Z)):N===P?(y=g[C=Math.min(M,Z)+" "+Math.max(M,Z)],o.e(y)||(O=t.o.add(A,D,Q),t.o.multiplyByScalar(O,.5,O),v.push(O.x,O.y,O.z),y=v.length/3-1,g[C]=y),s.push(M,y,S),s.push(y,Z,S)):W===P&&(y=g[C=Math.min(Z,S)+" "+Math.max(Z,S)],o.e(y)||(O=t.o.add(D,z,Q),t.o.multiplyByScalar(O,.5,O),v.push(O.x,O.y,O.z),y=v.length/3-1,g[C]=y),s.push(Z,y,M),s.push(y,S,M)):(m.push(S),m.push(M),m.push(Z))}return new u.I({attributes:{position:new u.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v})},indices:m,primitiveType:h._0x3b3836.TRIANGLES})};var V=new r.a,X=new r.a,Y=new r.a,$=new r.a;U.computeRhumbLineSubdivision=function(e,n,r,f){f=o.u(f,p.e.RADIANS_PER_DEGREE),i.o.typeOf.object("ellipsoid",e),i.o.defined("positions",n),i.o.defined("indices",r),i.o.typeOf.number.greaterThanOrEquals("indices.length",r.length,3),i.o.typeOf.number.equals("indices.length % 3","0",r.length%3,0),i.o.typeOf.number.greaterThan("granularity",f,0);var y,s=r.slice(0),l=n.length,v=new Array(3*l),c=0;for(y=0;y<l;y++){var d=n[y];v[c++]=d.x,v[c++]=d.y,v[c++]=d.z}for(var m=[],g={},b=e.maximumRadius,w=p.e.chordLength(f,b),E=new x.P(void 0,void 0,e),C=new x.P(void 0,void 0,e),O=new x.P(void 0,void 0,e);s.length>0;){var Z=s.pop(),M=s.pop(),S=s.pop(),z=t.o.fromArray(v,3*S,K),A=t.o.fromArray(v,3*M,k),D=t.o.fromArray(v,3*Z,F),R=e.cartesianToCartographic(z,V),T=e.cartesianToCartographic(A,X),L=e.cartesianToCartographic(D,Y);E.setEndPoints(R,T);var I=E.surfaceDistance;C.setEndPoints(T,L);var N=C.surfaceDistance;O.setEndPoints(L,R);var W,P,B,G,_=O.surfaceDistance,q=Math.max(I,N,_);q>w?I===q?(y=g[W=Math.min(S,M)+" "+Math.max(S,M)],o.e(y)||(P=E.interpolateUsingFraction(.5,$),B=.5*(R.height+T.height),G=t.o.fromRadians(P.longitude,P.latitude,B,e,Q),v.push(G.x,G.y,G.z),y=v.length/3-1,g[W]=y),s.push(S,y,Z),s.push(y,M,Z)):N===q?(y=g[W=Math.min(M,Z)+" "+Math.max(M,Z)],o.e(y)||(P=C.interpolateUsingFraction(.5,$),B=.5*(T.height+L.height),G=t.o.fromRadians(P.longitude,P.latitude,B,e,Q),v.push(G.x,G.y,G.z),y=v.length/3-1,g[W]=y),s.push(M,y,S),s.push(y,Z,S)):_===q&&(y=g[W=Math.min(Z,S)+" "+Math.max(Z,S)],o.e(y)||(P=O.interpolateUsingFraction(.5,$),B=.5*(L.height+R.height),G=t.o.fromRadians(P.longitude,P.latitude,B,e,Q),v.push(G.x,G.y,G.z),y=v.length/3-1,g[W]=y),s.push(Z,y,M),s.push(y,S,M)):(m.push(S),m.push(M),m.push(Z))}return new u.I({attributes:{position:new u.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v})},indices:m,primitiveType:h._0x3b3836.TRIANGLES})},U.scaleToGeodeticHeight=function(e,r,i,a){i=o.u(i,n.t.WGS84);var x=_,u=q;if(r=o.u(r,0),a=o.u(a,!0),o.e(e))for(var p=e.length,h=0;h<p;h+=3)t.o.fromArray(e,h,u),a&&(u=i.scaleToGeodeticSurface(u,u)),0!==r&&(x=i.geodeticSurfaceNormal(u,x),t.o.multiplyByScalar(x,r,x),t.o.add(u,x,u)),e[h]=u.x,e[h+1]=u.y,e[h+2]=u.z;return e},e.A=U,e.W=G})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/PolylinePipeline-160fa1b0.js b/SuperMap iEarth/public/SuperMap3D/Workers/PolylinePipeline-160fa1b0.js new file mode 100644 index 00000000..cbb09d6f --- /dev/null +++ b/SuperMap iEarth/public/SuperMap3D/Workers/PolylinePipeline-160fa1b0.js @@ -0,0 +1 @@ +define(["exports","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./when-92c6cf3c","./Check-52a7d806","./Cartesian2-b72655a5","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./IntersectionTests-9ff29c98","./Math-ecf82623","./FeatureDetection-fd297af4","./Plane-a2c6da7b"],(function(r,a,e,t,n,o,i,c,s,u,h,f){"use strict";var l={numberOfPoints:function(r,e,t){var n=a.o.distance(r,e);return Math.ceil(n/t)},numberOfPointsRhumbLine:function(r,a,e){var t=Math.pow(r.longitude-a.longitude,2)+Math.pow(r.latitude-a.latitude,2);return Math.ceil(Math.sqrt(t/(e*e)))}},g=new e.a;l.extractHeights=function(r,a){for(var e=r.length,t=new Array(e),n=0;n<e;n++){var o=r[n];t[n]=a.cartesianToCartographic(o,g).height}return t};var p=new h.p,v=new a.o,d=new a.o,m=new f.o(a.o.UNIT_X,0),w=new a.o,T=new f.o(a.o.UNIT_X,0),y=new a.o,P=new a.o,A=[];function C(r,a,e){var t,n=A;if(n.length=r,a===e){for(t=0;t<r;t++)n[t]=a;return n}var o=(e-a)/r;for(t=0;t<r;t++){var i=a+t*o;n[t]=i}return n}var b=new e.a,S=new e.a,E=new a.o,R=new a.o,D=new a.o,G=new i.E,N=new c.P;function I(r,e,t,n,o,i,c,s,u){var h=n.scaleToGeodeticSurface(r,R),f=n.scaleToGeodeticSurface(e,D),g=l.numberOfPoints(r,e,t),p=n.cartesianToCartographic(h,b),v=n.cartesianToCartographic(f,S),d=C(g,o,i);u>0&&(d=function(r,a){var e=A;e.length=r;for(var t=0;t<r;t++)e[t]+=a*Math.sin(Math.PI*t/r);return e}(g,u)),G.setEndPoints(p,v);var m=G.surfaceDistance/g,w=s;p.height=o;var T=n.cartographicToCartesian(p,E);a.o.pack(T,c,w),w+=3;for(var y=1;y<g;y++){var P=G.interpolateUsingSurfaceDistance(y*m,S);P.height=d[y],T=n.cartographicToCartesian(P,E),a.o.pack(T,c,w),w+=3}return w}function k(r,e,t,n,o,i,s,u){var h=n.scaleToGeodeticSurface(r,R),f=n.scaleToGeodeticSurface(e,D),g=n.cartesianToCartographic(h,b),p=n.cartesianToCartographic(f,S),v=l.numberOfPointsRhumbLine(g,p,t),d=C(v,o,i);N.ellipsoid.equals(n)||(N=new c.P(void 0,void 0,n)),N.setEndPoints(g,p);var m=N.surfaceDistance/v,w=u;g.height=o;var T=n.cartographicToCartesian(g,E);a.o.pack(T,s,w),w+=3;for(var y=1;y<v;y++){var P=N.interpolateUsingSurfaceDistance(y*m,S);P.height=d[y],T=n.cartographicToCartesian(P,E),a.o.pack(T,s,w),w+=3}return w}l.wrapLongitude=function(r,e){var n=[],o=[];if(t.e(r)&&r.length>0){e=t.u(e,h.p.IDENTITY);var i=h.p.inverseTransformation(e,p),c=h.p.multiplyByPoint(i,a.o.ZERO,v),u=a.o.normalize(h.p.multiplyByPointAsVector(i,a.o.UNIT_Y,d),d),l=f.o.fromPointNormal(c,u,m),g=a.o.normalize(h.p.multiplyByPointAsVector(i,a.o.UNIT_X,w),w),A=f.o.fromPointNormal(c,g,T),C=1;n.push(a.o.clone(r[0]));for(var b=n[0],S=r.length,E=1;E<S;++E){var R=r[E];if(f.o.getPointDistance(A,b)<0||f.o.getPointDistance(A,R)<0){var D=s.g.lineSegmentPlane(b,R,l,y);if(t.e(D)){var G=a.o.multiplyByScalar(u,5e-9,P);f.o.getPointDistance(l,b)<0&&a.o.negate(G,G),n.push(a.o.add(D,G,new a.o)),o.push(C+1),a.o.negate(G,G),n.push(a.o.add(D,G,new a.o)),C=1}}n.push(a.o.clone(r[E])),C++,b=R}o.push(C)}return{positions:n,lengths:o}},l.generateArc=function(r){t.e(r)||(r={});var e=r.positions;if(!t.e(e))throw new n.t("options.positions is required.");var i=e.length,c=t.u(r.ellipsoid,o.t.WGS84),s=t.u(r.height,0),h=Array.isArray(s);if(i<1)return[];if(1===i){var f=c.scaleToGeodeticSurface(e[0],R);if(0!==(s=h?s[0]:s)){var g=c.geodeticSurfaceNormal(f,E);a.o.multiplyByScalar(g,s,g),a.o.add(f,g,f)}return[f.x,f.y,f.z]}var p=r.minDistance;if(!t.e(p)){var v=t.u(r.granularity,u.e.RADIANS_PER_DEGREE);p=u.e.chordLength(v,c.maximumRadius)}var d,m=0;for(d=0;d<i-1;d++)m+=l.numberOfPoints(e[d],e[d+1],p);var w=r.hMax,T=3*(m+1),y=new Array(T),P=0;for(d=0;d<i-1;d++){P=I(e[d],e[d+1],p,c,h?s[d]:s,h?s[d+1]:s,y,P,w)}A.length=0;var C=e[i-1],S=c.cartesianToCartographic(C,b);S.height=h?s[i-1]:s;var D=c.cartographicToCartesian(S,E);return a.o.pack(D,y,T-3),y};var M=new e.a,_=new e.a;l.generateRhumbArc=function(r){t.e(r)||(r={});var i=r.positions;if(!t.e(i))throw new n.t("options.positions is required.");var c=i.length,s=t.u(r.ellipsoid,o.t.WGS84),h=t.u(r.height,0),f=Array.isArray(h);if(c<1)return[];if(1===c){var g=s.scaleToGeodeticSurface(i[0],R);if(0!==(h=f?h[0]:h)){var p=s.geodeticSurfaceNormal(g,E);a.o.multiplyByScalar(p,h,p),a.o.add(g,p,g)}return[g.x,g.y,g.z]}var v,d,m=t.u(r.granularity,u.e.RADIANS_PER_DEGREE),w=0,T=s.cartesianToCartographic(i[0],M);for(v=0;v<c-1;v++)d=s.cartesianToCartographic(i[v+1],_),w+=l.numberOfPointsRhumbLine(T,d,m),T=e.a.clone(d,M);var y=3*(w+1),P=new Array(y),C=0;for(v=0;v<c-1;v++){C=k(i[v],i[v+1],m,s,f?h[v]:h,f?h[v+1]:h,P,C)}A.length=0;var S=i[c-1],D=s.cartesianToCartographic(S,b);D.height=f?h[c-1]:h;var G=s.cartographicToCartesian(D,E);return a.o.pack(G,P,y-3),P},l.generateCartesianArc=function(r){for(var e=l.generateArc(r),t=e.length/3,n=new Array(t),o=0;o<t;o++)n[o]=a.o.unpack(e,3*o);return n},l.generateCartesianRhumbArc=function(r){for(var e=l.generateRhumbArc(r),t=e.length/3,n=new Array(t),o=0;o<t;o++)n[o]=a.o.unpack(e,3*o);return n},r.m=l})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/PolylinePipeline-f0970409.js b/SuperMap iEarth/public/SuperMap3D/Workers/PolylinePipeline-f0970409.js deleted file mode 100644 index f6782ce5..00000000 --- a/SuperMap iEarth/public/SuperMap3D/Workers/PolylinePipeline-f0970409.js +++ /dev/null @@ -1 +0,0 @@ -define(["exports","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./when-92c6cf3c","./Check-52a7d806","./Cartesian2-b72655a5","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./IntersectionTests-6e80d61c","./Math-ecf82623","./FeatureDetection-cec0163f","./Plane-33393da8"],(function(e,r,a,t,n,o,i,c,s,u,h,l){"use strict";var f={numberOfPoints:function(e,a,t){var n=r.o.distance(e,a);return Math.ceil(n/t)},numberOfPointsRhumbLine:function(e,r,a){var t=Math.pow(e.longitude-r.longitude,2)+Math.pow(e.latitude-r.latitude,2);return Math.ceil(Math.sqrt(t/(a*a)))}},g=new a.a;f.extractHeights=function(e,r){for(var a=e.length,t=new Array(a),n=0;n<a;n++){var o=e[n];t[n]=r.cartesianToCartographic(o,g).height}return t};var p=new h.p,v=new r.o,d=new r.o,m=new l.o(r.o.UNIT_X,0),w=new r.o,T=new l.o(r.o.UNIT_X,0),y=new r.o,P=new r.o,A=[];function C(e,r,a){var t,n=A;if(n.length=e,r===a){for(t=0;t<e;t++)n[t]=r;return n}var o=(a-r)/e;for(t=0;t<e;t++){var i=r+t*o;n[t]=i}return n}var b=new a.a,S=new a.a,E=new r.o,R=new r.o,D=new r.o,G=new i.E,N=new c.P;function I(e,a,t,n,o,i,c,s,u){var h=n.scaleToGeodeticSurface(e,R),l=n.scaleToGeodeticSurface(a,D),g=f.numberOfPoints(e,a,t),p=n.cartesianToCartographic(h,b),v=n.cartesianToCartographic(l,S),d=C(g,o,i);u>0&&(d=function(e,r){var a=A;a.length=e;for(var t=0;t<e;t++)a[t]+=r*Math.sin(Math.PI*t/e);return a}(g,u)),G.setEndPoints(p,v);var m=G.surfaceDistance/g,w=s;p.height=o;var T=n.cartographicToCartesian(p,E);r.o.pack(T,c,w),w+=3;for(var y=1;y<g;y++){var P=G.interpolateUsingSurfaceDistance(y*m,S);P.height=d[y],T=n.cartographicToCartesian(P,E),r.o.pack(T,c,w),w+=3}return w}function k(e,a,t,n,o,i,s,u){var h=n.scaleToGeodeticSurface(e,R),l=n.scaleToGeodeticSurface(a,D),g=n.cartesianToCartographic(h,b),p=n.cartesianToCartographic(l,S),v=f.numberOfPointsRhumbLine(g,p,t),d=C(v,o,i);N.ellipsoid.equals(n)||(N=new c.P(void 0,void 0,n)),N.setEndPoints(g,p);var m=N.surfaceDistance/v,w=u;g.height=o;var T=n.cartographicToCartesian(g,E);r.o.pack(T,s,w),w+=3;for(var y=1;y<v;y++){var P=N.interpolateUsingSurfaceDistance(y*m,S);P.height=d[y],T=n.cartographicToCartesian(P,E),r.o.pack(T,s,w),w+=3}return w}f.wrapLongitude=function(e,a){var n=[],o=[];if(t.e(e)&&e.length>0){a=t.u(a,h.p.IDENTITY);var i=h.p.inverseTransformation(a,p),c=h.p.multiplyByPoint(i,r.o.ZERO,v),u=r.o.normalize(h.p.multiplyByPointAsVector(i,r.o.UNIT_Y,d),d),f=l.o.fromPointNormal(c,u,m),g=r.o.normalize(h.p.multiplyByPointAsVector(i,r.o.UNIT_X,w),w),A=l.o.fromPointNormal(c,g,T),C=1;n.push(r.o.clone(e[0]));for(var b=n[0],S=e.length,E=1;E<S;++E){var R=e[E];if(l.o.getPointDistance(A,b)<0||l.o.getPointDistance(A,R)<0){var D=s.g.lineSegmentPlane(b,R,f,y);if(t.e(D)){var G=r.o.multiplyByScalar(u,5e-9,P);l.o.getPointDistance(f,b)<0&&r.o.negate(G,G),n.push(r.o.add(D,G,new r.o)),o.push(C+1),r.o.negate(G,G),n.push(r.o.add(D,G,new r.o)),C=1}}n.push(r.o.clone(e[E])),C++,b=R}o.push(C)}return{positions:n,lengths:o}},f.generateArc=function(e){t.e(e)||(e={});var a=e.positions;if(!t.e(a))throw new n.t("options.positions is required.");var i=a.length,c=t.u(e.ellipsoid,o.t.WGS84),s=t.u(e.height,0),h=Array.isArray(s);if(i<1)return[];if(1===i){var l=c.scaleToGeodeticSurface(a[0],R);if(0!==(s=h?s[0]:s)){var g=c.geodeticSurfaceNormal(l,E);r.o.multiplyByScalar(g,s,g),r.o.add(l,g,l)}return[l.x,l.y,l.z]}var p=e.minDistance;if(!t.e(p)){var v=t.u(e.granularity,u.e.RADIANS_PER_DEGREE);p=u.e.chordLength(v,c.maximumRadius)}var d,m=0;for(d=0;d<i-1;d++)m+=f.numberOfPoints(a[d],a[d+1],p);var w=e.hMax,T=3*(m+1),y=new Array(T),P=0;for(d=0;d<i-1;d++){P=I(a[d],a[d+1],p,c,h?s[d]:s,h?s[d+1]:s,y,P,w)}A.length=0;var C=a[i-1],S=c.cartesianToCartographic(C,b);S.height=h?s[i-1]:s;var D=c.cartographicToCartesian(S,E);return r.o.pack(D,y,T-3),y};var M=new a.a,_=new a.a;f.generateRhumbArc=function(e){t.e(e)||(e={});var i=e.positions;if(!t.e(i))throw new n.t("options.positions is required.");var c=i.length,s=t.u(e.ellipsoid,o.t.WGS84),h=t.u(e.height,0),l=Array.isArray(h);if(c<1)return[];if(1===c){var g=s.scaleToGeodeticSurface(i[0],R);if(0!==(h=l?h[0]:h)){var p=s.geodeticSurfaceNormal(g,E);r.o.multiplyByScalar(p,h,p),r.o.add(g,p,g)}return[g.x,g.y,g.z]}var v,d,m=t.u(e.granularity,u.e.RADIANS_PER_DEGREE),w=0,T=s.cartesianToCartographic(i[0],M);for(v=0;v<c-1;v++)d=s.cartesianToCartographic(i[v+1],_),w+=f.numberOfPointsRhumbLine(T,d,m),T=a.a.clone(d,M);var y=3*(w+1),P=new Array(y),C=0;for(v=0;v<c-1;v++){C=k(i[v],i[v+1],m,s,l?h[v]:h,l?h[v+1]:h,P,C)}A.length=0;var S=i[c-1],D=s.cartesianToCartographic(S,b);D.height=l?h[c-1]:h;var G=s.cartographicToCartesian(D,E);return r.o.pack(G,P,y-3),P},f.generateCartesianArc=function(e){for(var a=f.generateArc(e),t=a.length/3,n=new Array(t),o=0;o<t;o++)n[o]=r.o.unpack(a,3*o);return n},f.generateCartesianRhumbArc=function(e){for(var a=f.generateRhumbArc(e),t=a.length/3,n=new Array(t),o=0;o<t;o++)n[o]=r.o.unpack(a,3*o);return n},e.m=f})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/PolylineVolumeGeometryLibrary-d96626d0.js b/SuperMap iEarth/public/SuperMap3D/Workers/PolylineVolumeGeometryLibrary-3011fdb7.js similarity index 97% rename from SuperMap iEarth/public/SuperMap3D/Workers/PolylineVolumeGeometryLibrary-d96626d0.js rename to SuperMap iEarth/public/SuperMap3D/Workers/PolylineVolumeGeometryLibrary-3011fdb7.js index 0cbe0960..f485d003 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/PolylineVolumeGeometryLibrary-d96626d0.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/PolylineVolumeGeometryLibrary-3011fdb7.js @@ -1 +1 @@ -define(["exports","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartesian4-72b88c9e","./Cartographic-a2c313d7","./EllipsoidTangentPlane-d6b88a1f","./Math-ecf82623","./FeatureDetection-cec0163f","./PolylinePipeline-f0970409","./GeometryAttribute-f47bd1cb"],(function(o,e,r,a,n,t,l,i,c,s){"use strict";var u=Object.freeze({ROUNDED:0,MITERED:1,BEVELED:2}),p=[new r.o,new r.o],m=new r.o,y=new r.o,d=new r.o,f=new r.o,g=new r.o,v=new r.o,h=new r.o,w=new r.o,B=new r.o,E=new r.o,z=new r.o,S={},b=new n.a;function A(o,e){for(var r=new Array(o.length),a=0;a<o.length;a++){var n=o[a];b=e.cartesianToCartographic(n,b),r[a]=b.height,o[a]=e.scaleToGeodeticSurface(n,n)}return r}function P(o,e,a,n){var t,l=o[0],i=o[1],c=r.o.angleBetween(l,i),s=Math.ceil(c/n),u=new Array(s);if(e===a){for(t=0;t<s;t++)u[t]=e;return u.push(a),u}var p=(a-e)/s;for(t=1;t<s;t++){var m=e+t*p;u[t]=m}return u[0]=e,u.push(a),u}var T=new r.o,D=new r.o;function x(o,a,n,l){var i=new t.f(n,l),c=i.projectPointOntoPlane(r.o.add(n,o,T),T),s=i.projectPointOntoPlane(r.o.add(n,a,D),D),u=e.o.angleBetween(c,s);return s.x*c.y-s.y*c.x>=0?-u:u}var N=new r.o(-1,0,0),O=i.p.clone(i.p.IDENTITY),R=new i.p,V=new i.p$1,F=i.p$1.IDENTITY.clone(),I=new r.o,$=new a.e,L=new r.o;function G(o,e,a,n,t,l,c,u){var p=I,m=$;O=s.m.eastNorthUpToFixedFrame(o,t,O),p=i.p.multiplyByPointAsVector(O,N,p);var y=x(p=r.o.normalize(p,p),e,o,t);V=i.p$1.fromRotationZ(y,V),L.z=l,O=i.p.multiplyTransformation(O,i.p.fromRotationTranslation(V,L,R),O);var d=F;d[0]=c;for(var f=0;f<u;f++)for(var g=0;g<a.length;g+=3)m=r.o.fromArray(a,g,m),m=i.p$1.multiplyByVector(d,m,m),m=i.p.multiplyByPoint(O,m,m),n.push(m.x,m.y,m.z);return n}function M(o,e,a,n,t,l,c,u,p){var m=I,y=$;O=s.m.eastNorthUpToFixedFrame(o,t,O),m=i.p.multiplyByPointAsVector(O,N,m);var d=x(m=r.o.normalize(m,m),e,o,t);V=i.p$1.fromRotationZ(d,V),L.z=l,O=i.p.multiplyTransformation(O,i.p.fromRotationTranslation(V,L,R),O);var f=F;f[0]=c;for(var g=0;g<u;g++)for(var v=0;v<a.length;v+=3)y=r.o.fromArray(a,v,y),y=i.p$1.multiplyByVector(f,y,y),y=i.p.multiplyByPoint(O,y,y),y=i.p.multiplyByPoint(p,y,y),n.push(y.x,y.y,y.z);return n}var U=new r.o;function _(o,e,a,n,t,l,i){for(var c=0;c<o.length;c+=3){n=G(r.o.fromArray(o,c,U),e,a,n,t,l[c/3],i,1)}return n}function j(o,e){var r=o.length,a=new Array(6*r),n=0,t=e.x+e.width/2,l=e.y+e.height/2,i=o[0];a[n++]=i.x-t,a[n++]=0,a[n++]=i.y-l;for(var c=1;c<r;c++){var s=(i=o[c]).x-t,u=i.y-l;a[n++]=s,a[n++]=0,a[n++]=u,a[n++]=s,a[n++]=0,a[n++]=u}return i=o[0],a[n++]=i.x-t,a[n++]=0,a[n++]=i.y-l,a}function C(o,e){for(var r=o.length,a=new Array(3*r),n=0,t=e.x+e.width/2,l=e.y+e.height/2,i=0;i<r;i++)a[n++]=o[i].x-t,a[n++]=0,a[n++]=o[i].y-l;return a}var q=new s.n,Q=new r.o,Y=new i.p$1;function Z(o,e,a,n,t,c,p,m,y,d){var f,g,v=r.o.angleBetween(r.o.subtract(e,o,E),r.o.subtract(a,o,z)),h=n===u.BEVELED?0:Math.ceil(v/l.e.toRadians(5));if(f=t?i.p$1.fromQuaternion(s.n.fromAxisAngle(r.o.negate(o,E),v/(h+1),q),Y):i.p$1.fromQuaternion(s.n.fromAxisAngle(o,v/(h+1),q),Y),e=r.o.clone(e,Q),h>0)for(var w=d?2:1,B=0;B<h;B++)e=i.p$1.multiplyByVector(f,e,e),g=r.o.subtract(e,o,E),g=r.o.normalize(g,g),t||(g=r.o.negate(g,g)),p=G(c.scaleToGeodeticSurface(e,z),g,m,p,c,y,1,w);else g=r.o.subtract(e,o,E),g=r.o.normalize(g,g),t||(g=r.o.negate(g,g)),p=G(c.scaleToGeodeticSurface(e,z),g,m,p,c,y,1,1),a=r.o.clone(a,Q),g=r.o.subtract(a,o,E),g=r.o.normalize(g,g),t||(g=r.o.negate(g,g)),p=G(c.scaleToGeodeticSurface(a,z),g,m,p,c,y,1,1);return p}S.removeDuplicatesFromShape=function(o){for(var r=o.length,a=[],n=r-1,t=0;t<r;n=t++){var l=o[n],i=o[t];e.o.equals(l,i)||a.push(i)}return a},S.angleIsGreaterThanPi=function(o,e,a,n){var l=new t.f(a,n),i=l.projectPointOntoPlane(r.o.add(a,o,T),T),c=l.projectPointOntoPlane(r.o.add(a,e,D),D);return c.x*i.y-c.y*i.x>=0};var J=new r.o,k=new r.o;S.computePositions=function(o,e,a,n,t){var i=n._ellipsoid,s=A(o,i),z=n._granularity,b=n._cornerType,T=t?j(e,a):C(e,a),D=t?C(e,a):void 0,x=a.height/2,N=a.width/2,O=o.length,R=[],V=t?[]:void 0,F=m,I=y,$=d,L=f,M=g,U=v,q=h,Q=w,Y=B,H=o[0],K=o[1];L=i.geodeticSurfaceNormal(H,L),F=r.o.subtract(K,H,F),F=r.o.normalize(F,F),Q=r.o.cross(L,F,Q),Q=r.o.normalize(Q,Q);var W=s[0],X=s[1];t&&(V=G(H,Q,D,V,i,W+x,1,1)),Y=r.o.clone(H,Y),H=K,I=r.o.negate(F,I);for(var oo,eo=1;eo<O-1;eo++){var ro=t?2:1;K=o[eo+1],F=r.o.subtract(K,H,F),F=r.o.normalize(F,F),$=r.o.add(F,I,$),$=r.o.normalize($,$),L=i.geodeticSurfaceNormal(H,L);var ao=r.o.multiplyByScalar(L,r.o.dot(F,L),J);r.o.subtract(F,ao,ao),r.o.normalize(ao,ao);var no=r.o.multiplyByScalar(L,r.o.dot(I,L),k);if(r.o.subtract(I,no,no),r.o.normalize(no,no),!l.e.equalsEpsilon(Math.abs(r.o.dot(ao,no)),1,l.e.EPSILON7)){$=r.o.cross($,L,$),$=r.o.cross(L,$,$),$=r.o.normalize($,$);var to=1/Math.max(.25,r.o.magnitude(r.o.cross($,I,E))),lo=S.angleIsGreaterThanPi(F,I,H,i);lo?(M=r.o.add(H,r.o.multiplyByScalar($,to*N,$),M),U=r.o.add(M,r.o.multiplyByScalar(Q,N,U),U),p[0]=r.o.clone(Y,p[0]),p[1]=r.o.clone(U,p[1]),oo=P(p,W+x,X+x,z),R=_(c.m.generateArc({positions:p,granularity:z,ellipsoid:i}),Q,T,R,i,oo,1),Q=r.o.cross(L,F,Q),Q=r.o.normalize(Q,Q),q=r.o.add(M,r.o.multiplyByScalar(Q,N,q),q),b===u.ROUNDED||b===u.BEVELED?Z(M,U,q,b,lo,i,R,T,X+x,t):R=G(H,$=r.o.negate($,$),T,R,i,X+x,to,ro),Y=r.o.clone(q,Y)):(M=r.o.add(H,r.o.multiplyByScalar($,to*N,$),M),U=r.o.add(M,r.o.multiplyByScalar(Q,-N,U),U),p[0]=r.o.clone(Y,p[0]),p[1]=r.o.clone(U,p[1]),oo=P(p,W+x,X+x,z),R=_(c.m.generateArc({positions:p,granularity:z,ellipsoid:i}),Q,T,R,i,oo,1),Q=r.o.cross(L,F,Q),Q=r.o.normalize(Q,Q),q=r.o.add(M,r.o.multiplyByScalar(Q,-N,q),q),b===u.ROUNDED||b===u.BEVELED?Z(M,U,q,b,lo,i,R,T,X+x,t):R=G(H,$,T,R,i,X+x,to,ro),Y=r.o.clone(q,Y)),I=r.o.negate(F,I)}else R=G(Y,Q,T,R,i,W+x,1,1),Y=H;W=X,X=s[eo+1],H=K}p[0]=r.o.clone(Y,p[0]),p[1]=r.o.clone(H,p[1]),oo=P(p,W+x,X+x,z),R=_(c.m.generateArc({positions:p,granularity:z,ellipsoid:i}),Q,T,R,i,oo,1),t&&(V=G(H,Q,D,V,i,X+x,1,1)),O=R.length;var io=t?O+V.length:O,co=new Float64Array(io);return co.set(R),t&&co.set(V,O),co},S.computeLocalPositions=function(o,e,a,n,t,z){var b=n._ellipsoid,T=A(o,b),D=n._granularity,x=n._cornerType,N=t?j(e,a):C(e,a),O=t?C(e,a):void 0,R=a.width/2,V=o.length,F=[],I=t?[]:void 0,$=m,L=y,G=d,q=f,Q=g,Y=v,H=h,K=w,W=B,X=s.m.eastNorthUpToFixedFrame(z,b,new i.p),oo=i.p.inverse(X,new i.p),eo=o[0],ro=o[1];q=b.geodeticSurfaceNormal(eo,q),$=r.o.subtract(ro,eo,$),$=r.o.normalize($,$),K=r.o.cross(q,$,K),K=r.o.normalize(K,K);var ao=T[0],no=T[1];t&&(I=M(eo,K,O,I,b,ao+0,1,1,oo)),W=r.o.clone(eo,W),eo=ro,L=r.o.negate($,L);for(var to,lo=1;lo<V-1;lo++){var io=t?2:1;ro=o[lo+1],$=r.o.subtract(ro,eo,$),$=r.o.normalize($,$),G=r.o.add($,L,G),G=r.o.normalize(G,G),q=b.geodeticSurfaceNormal(eo,q);var co=r.o.multiplyByScalar(q,r.o.dot($,q),J);r.o.subtract($,co,co),r.o.normalize(co,co);var so=r.o.multiplyByScalar(q,r.o.dot(L,q),k);if(r.o.subtract(L,so,so),r.o.normalize(so,so),!l.e.equalsEpsilon(Math.abs(r.o.dot(co,so)),1,l.e.EPSILON7)){G=r.o.cross(G,q,G),G=r.o.cross(q,G,G),G=r.o.normalize(G,G);var uo=1/Math.max(.25,r.o.magnitude(r.o.cross(G,L,E))),po=S.angleIsGreaterThanPi($,L,eo,b);po?(Q=r.o.add(eo,r.o.multiplyByScalar(G,uo*R,G),Q),Y=r.o.add(Q,r.o.multiplyByScalar(K,R,Y),Y),p[0]=r.o.clone(W,p[0]),p[1]=r.o.clone(Y,p[1]),to=P(p,ao+0,no+0,D),F=_(c.m.generateArc({positions:p,granularity:D,ellipsoid:b}),K,N,F,b,to,1,fromEnu),K=r.o.cross(q,$,K),K=r.o.normalize(K,K),H=r.o.add(Q,r.o.multiplyByScalar(K,R,H),H),x===u.ROUNDED||x===u.BEVELED?Z(Q,Y,H,x,po,b,F,N,no+0,t):F=M(eo,G=r.o.negate(G,G),N,F,b,no+0,uo,io,oo),W=r.o.clone(H,W)):(Q=r.o.add(eo,r.o.multiplyByScalar(G,uo*R,G),Q),Y=r.o.add(Q,r.o.multiplyByScalar(K,-R,Y),Y),p[0]=r.o.clone(W,p[0]),p[1]=r.o.clone(Y,p[1]),to=P(p,ao+0,no+0,D),F=_(c.m.generateArc({positions:p,granularity:D,ellipsoid:b}),K,N,F,b,to,1),K=r.o.cross(q,$,K),K=r.o.normalize(K,K),H=r.o.add(Q,r.o.multiplyByScalar(K,-R,H),H),x===u.ROUNDED||x===u.BEVELED?Z(Q,Y,H,x,po,b,F,N,no+0,t):F=M(eo,G,N,F,b,no+0,uo,io,oo),W=r.o.clone(H,W)),L=r.o.negate($,L)}else F=M(W,K,N,F,b,ao+0,1,1,oo),W=eo;ao=no,no=T[lo+1],eo=ro}p[0]=r.o.clone(W,p[0]),p[1]=r.o.clone(eo,p[1]),to=P(p,ao+0,no+0,D),F=function(o,e,a,n,t,l,i,c){for(var s=0;s<o.length;s+=3)n=M(r.o.fromArray(o,s,U),e,a,n,t,l[s/3],i,1,c);return n}(c.m.generateArc({positions:p,granularity:D,ellipsoid:b}),K,N,F,b,to,1,oo),t&&(I=M(eo,K,O,I,b,no+0,1,1,oo)),V=F.length;var mo=t?V+I.length:V,yo=new Float64Array(mo);return yo.set(F),t&&yo.set(I,V),yo},o.J=S,o.S=u})); +define(["exports","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartesian4-72b88c9e","./Cartographic-a2c313d7","./EllipsoidTangentPlane-c500945e","./Math-ecf82623","./FeatureDetection-fd297af4","./PolylinePipeline-160fa1b0","./GeometryAttribute-65cf868d"],(function(o,e,r,a,n,t,l,i,c,s){"use strict";var u=Object.freeze({ROUNDED:0,MITERED:1,BEVELED:2}),p=[new r.o,new r.o],m=new r.o,y=new r.o,d=new r.o,f=new r.o,g=new r.o,v=new r.o,h=new r.o,w=new r.o,B=new r.o,E=new r.o,z=new r.o,S={},b=new n.a;function A(o,e){for(var r=new Array(o.length),a=0;a<o.length;a++){var n=o[a];b=e.cartesianToCartographic(n,b),r[a]=b.height,o[a]=e.scaleToGeodeticSurface(n,n)}return r}function P(o,e,a,n){var t,l=o[0],i=o[1],c=r.o.angleBetween(l,i),s=Math.ceil(c/n),u=new Array(s);if(e===a){for(t=0;t<s;t++)u[t]=e;return u.push(a),u}var p=(a-e)/s;for(t=1;t<s;t++){var m=e+t*p;u[t]=m}return u[0]=e,u.push(a),u}var T=new r.o,D=new r.o;function x(o,a,n,l){var i=new t.f(n,l),c=i.projectPointOntoPlane(r.o.add(n,o,T),T),s=i.projectPointOntoPlane(r.o.add(n,a,D),D),u=e.o.angleBetween(c,s);return s.x*c.y-s.y*c.x>=0?-u:u}var N=new r.o(-1,0,0),O=i.p.clone(i.p.IDENTITY),R=new i.p,V=new i.p$1,F=i.p$1.IDENTITY.clone(),I=new r.o,$=new a.e,L=new r.o;function G(o,e,a,n,t,l,c,u){var p=I,m=$;O=s.m.eastNorthUpToFixedFrame(o,t,O),p=i.p.multiplyByPointAsVector(O,N,p);var y=x(p=r.o.normalize(p,p),e,o,t);V=i.p$1.fromRotationZ(y,V),L.z=l,O=i.p.multiplyTransformation(O,i.p.fromRotationTranslation(V,L,R),O);var d=F;d[0]=c;for(var f=0;f<u;f++)for(var g=0;g<a.length;g+=3)m=r.o.fromArray(a,g,m),m=i.p$1.multiplyByVector(d,m,m),m=i.p.multiplyByPoint(O,m,m),n.push(m.x,m.y,m.z);return n}function M(o,e,a,n,t,l,c,u,p){var m=I,y=$;O=s.m.eastNorthUpToFixedFrame(o,t,O),m=i.p.multiplyByPointAsVector(O,N,m);var d=x(m=r.o.normalize(m,m),e,o,t);V=i.p$1.fromRotationZ(d,V),L.z=l,O=i.p.multiplyTransformation(O,i.p.fromRotationTranslation(V,L,R),O);var f=F;f[0]=c;for(var g=0;g<u;g++)for(var v=0;v<a.length;v+=3)y=r.o.fromArray(a,v,y),y=i.p$1.multiplyByVector(f,y,y),y=i.p.multiplyByPoint(O,y,y),y=i.p.multiplyByPoint(p,y,y),n.push(y.x,y.y,y.z);return n}var U=new r.o;function _(o,e,a,n,t,l,i){for(var c=0;c<o.length;c+=3){n=G(r.o.fromArray(o,c,U),e,a,n,t,l[c/3],i,1)}return n}function j(o,e){var r=o.length,a=new Array(6*r),n=0,t=e.x+e.width/2,l=e.y+e.height/2,i=o[0];a[n++]=i.x-t,a[n++]=0,a[n++]=i.y-l;for(var c=1;c<r;c++){var s=(i=o[c]).x-t,u=i.y-l;a[n++]=s,a[n++]=0,a[n++]=u,a[n++]=s,a[n++]=0,a[n++]=u}return i=o[0],a[n++]=i.x-t,a[n++]=0,a[n++]=i.y-l,a}function C(o,e){for(var r=o.length,a=new Array(3*r),n=0,t=e.x+e.width/2,l=e.y+e.height/2,i=0;i<r;i++)a[n++]=o[i].x-t,a[n++]=0,a[n++]=o[i].y-l;return a}var q=new s.n,Q=new r.o,Y=new i.p$1;function Z(o,e,a,n,t,c,p,m,y,d){var f,g,v=r.o.angleBetween(r.o.subtract(e,o,E),r.o.subtract(a,o,z)),h=n===u.BEVELED?0:Math.ceil(v/l.e.toRadians(5));if(f=t?i.p$1.fromQuaternion(s.n.fromAxisAngle(r.o.negate(o,E),v/(h+1),q),Y):i.p$1.fromQuaternion(s.n.fromAxisAngle(o,v/(h+1),q),Y),e=r.o.clone(e,Q),h>0)for(var w=d?2:1,B=0;B<h;B++)e=i.p$1.multiplyByVector(f,e,e),g=r.o.subtract(e,o,E),g=r.o.normalize(g,g),t||(g=r.o.negate(g,g)),p=G(c.scaleToGeodeticSurface(e,z),g,m,p,c,y,1,w);else g=r.o.subtract(e,o,E),g=r.o.normalize(g,g),t||(g=r.o.negate(g,g)),p=G(c.scaleToGeodeticSurface(e,z),g,m,p,c,y,1,1),a=r.o.clone(a,Q),g=r.o.subtract(a,o,E),g=r.o.normalize(g,g),t||(g=r.o.negate(g,g)),p=G(c.scaleToGeodeticSurface(a,z),g,m,p,c,y,1,1);return p}S.removeDuplicatesFromShape=function(o){for(var r=o.length,a=[],n=r-1,t=0;t<r;n=t++){var l=o[n],i=o[t];e.o.equals(l,i)||a.push(i)}return a},S.angleIsGreaterThanPi=function(o,e,a,n){var l=new t.f(a,n),i=l.projectPointOntoPlane(r.o.add(a,o,T),T),c=l.projectPointOntoPlane(r.o.add(a,e,D),D);return c.x*i.y-c.y*i.x>=0};var J=new r.o,k=new r.o;S.computePositions=function(o,e,a,n,t){var i=n._ellipsoid,s=A(o,i),z=n._granularity,b=n._cornerType,T=t?j(e,a):C(e,a),D=t?C(e,a):void 0,x=a.height/2,N=a.width/2,O=o.length,R=[],V=t?[]:void 0,F=m,I=y,$=d,L=f,M=g,U=v,q=h,Q=w,Y=B,H=o[0],K=o[1];L=i.geodeticSurfaceNormal(H,L),F=r.o.subtract(K,H,F),F=r.o.normalize(F,F),Q=r.o.cross(L,F,Q),Q=r.o.normalize(Q,Q);var W=s[0],X=s[1];t&&(V=G(H,Q,D,V,i,W+x,1,1)),Y=r.o.clone(H,Y),H=K,I=r.o.negate(F,I);for(var oo,eo=1;eo<O-1;eo++){var ro=t?2:1;K=o[eo+1],F=r.o.subtract(K,H,F),F=r.o.normalize(F,F),$=r.o.add(F,I,$),$=r.o.normalize($,$),L=i.geodeticSurfaceNormal(H,L);var ao=r.o.multiplyByScalar(L,r.o.dot(F,L),J);r.o.subtract(F,ao,ao),r.o.normalize(ao,ao);var no=r.o.multiplyByScalar(L,r.o.dot(I,L),k);if(r.o.subtract(I,no,no),r.o.normalize(no,no),!l.e.equalsEpsilon(Math.abs(r.o.dot(ao,no)),1,l.e.EPSILON7)){$=r.o.cross($,L,$),$=r.o.cross(L,$,$),$=r.o.normalize($,$);var to=1/Math.max(.25,r.o.magnitude(r.o.cross($,I,E))),lo=S.angleIsGreaterThanPi(F,I,H,i);lo?(M=r.o.add(H,r.o.multiplyByScalar($,to*N,$),M),U=r.o.add(M,r.o.multiplyByScalar(Q,N,U),U),p[0]=r.o.clone(Y,p[0]),p[1]=r.o.clone(U,p[1]),oo=P(p,W+x,X+x,z),R=_(c.m.generateArc({positions:p,granularity:z,ellipsoid:i}),Q,T,R,i,oo,1),Q=r.o.cross(L,F,Q),Q=r.o.normalize(Q,Q),q=r.o.add(M,r.o.multiplyByScalar(Q,N,q),q),b===u.ROUNDED||b===u.BEVELED?Z(M,U,q,b,lo,i,R,T,X+x,t):R=G(H,$=r.o.negate($,$),T,R,i,X+x,to,ro),Y=r.o.clone(q,Y)):(M=r.o.add(H,r.o.multiplyByScalar($,to*N,$),M),U=r.o.add(M,r.o.multiplyByScalar(Q,-N,U),U),p[0]=r.o.clone(Y,p[0]),p[1]=r.o.clone(U,p[1]),oo=P(p,W+x,X+x,z),R=_(c.m.generateArc({positions:p,granularity:z,ellipsoid:i}),Q,T,R,i,oo,1),Q=r.o.cross(L,F,Q),Q=r.o.normalize(Q,Q),q=r.o.add(M,r.o.multiplyByScalar(Q,-N,q),q),b===u.ROUNDED||b===u.BEVELED?Z(M,U,q,b,lo,i,R,T,X+x,t):R=G(H,$,T,R,i,X+x,to,ro),Y=r.o.clone(q,Y)),I=r.o.negate(F,I)}else R=G(Y,Q,T,R,i,W+x,1,1),Y=H;W=X,X=s[eo+1],H=K}p[0]=r.o.clone(Y,p[0]),p[1]=r.o.clone(H,p[1]),oo=P(p,W+x,X+x,z),R=_(c.m.generateArc({positions:p,granularity:z,ellipsoid:i}),Q,T,R,i,oo,1),t&&(V=G(H,Q,D,V,i,X+x,1,1)),O=R.length;var io=t?O+V.length:O,co=new Float64Array(io);return co.set(R),t&&co.set(V,O),co},S.computeLocalPositions=function(o,e,a,n,t,z){var b=n._ellipsoid,T=A(o,b),D=n._granularity,x=n._cornerType,N=t?j(e,a):C(e,a),O=t?C(e,a):void 0,R=a.width/2,V=o.length,F=[],I=t?[]:void 0,$=m,L=y,G=d,q=f,Q=g,Y=v,H=h,K=w,W=B,X=s.m.eastNorthUpToFixedFrame(z,b,new i.p),oo=i.p.inverse(X,new i.p),eo=o[0],ro=o[1];q=b.geodeticSurfaceNormal(eo,q),$=r.o.subtract(ro,eo,$),$=r.o.normalize($,$),K=r.o.cross(q,$,K),K=r.o.normalize(K,K);var ao=T[0],no=T[1];t&&(I=M(eo,K,O,I,b,ao+0,1,1,oo)),W=r.o.clone(eo,W),eo=ro,L=r.o.negate($,L);for(var to,lo=1;lo<V-1;lo++){var io=t?2:1;ro=o[lo+1],$=r.o.subtract(ro,eo,$),$=r.o.normalize($,$),G=r.o.add($,L,G),G=r.o.normalize(G,G),q=b.geodeticSurfaceNormal(eo,q);var co=r.o.multiplyByScalar(q,r.o.dot($,q),J);r.o.subtract($,co,co),r.o.normalize(co,co);var so=r.o.multiplyByScalar(q,r.o.dot(L,q),k);if(r.o.subtract(L,so,so),r.o.normalize(so,so),!l.e.equalsEpsilon(Math.abs(r.o.dot(co,so)),1,l.e.EPSILON7)){G=r.o.cross(G,q,G),G=r.o.cross(q,G,G),G=r.o.normalize(G,G);var uo=1/Math.max(.25,r.o.magnitude(r.o.cross(G,L,E))),po=S.angleIsGreaterThanPi($,L,eo,b);po?(Q=r.o.add(eo,r.o.multiplyByScalar(G,uo*R,G),Q),Y=r.o.add(Q,r.o.multiplyByScalar(K,R,Y),Y),p[0]=r.o.clone(W,p[0]),p[1]=r.o.clone(Y,p[1]),to=P(p,ao+0,no+0,D),F=_(c.m.generateArc({positions:p,granularity:D,ellipsoid:b}),K,N,F,b,to,1,fromEnu),K=r.o.cross(q,$,K),K=r.o.normalize(K,K),H=r.o.add(Q,r.o.multiplyByScalar(K,R,H),H),x===u.ROUNDED||x===u.BEVELED?Z(Q,Y,H,x,po,b,F,N,no+0,t):F=M(eo,G=r.o.negate(G,G),N,F,b,no+0,uo,io,oo),W=r.o.clone(H,W)):(Q=r.o.add(eo,r.o.multiplyByScalar(G,uo*R,G),Q),Y=r.o.add(Q,r.o.multiplyByScalar(K,-R,Y),Y),p[0]=r.o.clone(W,p[0]),p[1]=r.o.clone(Y,p[1]),to=P(p,ao+0,no+0,D),F=_(c.m.generateArc({positions:p,granularity:D,ellipsoid:b}),K,N,F,b,to,1),K=r.o.cross(q,$,K),K=r.o.normalize(K,K),H=r.o.add(Q,r.o.multiplyByScalar(K,-R,H),H),x===u.ROUNDED||x===u.BEVELED?Z(Q,Y,H,x,po,b,F,N,no+0,t):F=M(eo,G,N,F,b,no+0,uo,io,oo),W=r.o.clone(H,W)),L=r.o.negate($,L)}else F=M(W,K,N,F,b,ao+0,1,1,oo),W=eo;ao=no,no=T[lo+1],eo=ro}p[0]=r.o.clone(W,p[0]),p[1]=r.o.clone(eo,p[1]),to=P(p,ao+0,no+0,D),F=function(o,e,a,n,t,l,i,c){for(var s=0;s<o.length;s+=3)n=M(r.o.fromArray(o,s,U),e,a,n,t,l[s/3],i,1,c);return n}(c.m.generateArc({positions:p,granularity:D,ellipsoid:b}),K,N,F,b,to,1,oo),t&&(I=M(eo,K,O,I,b,no+0,1,1,oo)),V=F.length;var mo=t?V+I.length:V,yo=new Float64Array(mo);return yo.set(F),t&&yo.set(I,V),yo},o.J=S,o.S=u})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/PrimitivePipeline-370489a0.js b/SuperMap iEarth/public/SuperMap3D/Workers/PrimitivePipeline-21bb3b56.js similarity index 97% rename from SuperMap iEarth/public/SuperMap3D/Workers/PrimitivePipeline-370489a0.js rename to SuperMap iEarth/public/SuperMap3D/Workers/PrimitivePipeline-21bb3b56.js index cf4800f5..a6fb51b1 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/PrimitivePipeline-370489a0.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/PrimitivePipeline-21bb3b56.js @@ -1 +1 @@ -define(["exports","./buildModuleUrl-9eef8841","./ComponentDatatype-98414d16","./when-92c6cf3c","./Check-52a7d806","./Cartesian2-b72655a5","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryPipeline-7ffd3f60","./IndexDatatype-86677ec4","./FeatureDetection-cec0163f","./WebMercatorProjection-ee891935"],(function(e,t,r,n,o,i,a,s,c,p,u,f){"use strict";function m(e,t,r){e=n.u(e,0),t=n.u(t,0),r=n.u(r,0),this.value=new Float32Array([e,t,r])}function d(e,t){var n=e.attributes,o=n.position,i=o.values.length/o.componentsPerAttribute;n.batchId=new a.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:1,values:new Float32Array(i)});for(var s=n.batchId.values,c=0;c<i;++c)s[c]=t}function h(e){var i,a,s,p=e.instances,f=e.projection,m=e.elementIndexUintSupported,h=e.scene3DOnly,l=e.vertexCacheOptimize,g=e.compressVertices,y=e.modelMatrix,v=p.length;for(i=0;i<v;++i)if(n.e(p[i].geometry)){s=p[i].geometry.primitiveType;break}for(i=1;i<v;++i)if(n.e(p[i].geometry)&&p[i].geometry.primitiveType!==s)throw new o.t("All instance geometries must have the same primitiveType.");if(function(e,t,r){var o,i=!r,a=e.length;if(!i&&a>1){var s=e[0].modelMatrix;for(o=1;o<a;++o)if(!u.p.equals(s,e[o].modelMatrix)){i=!0;break}}if(i)for(o=0;o<a;++o)n.e(e[o].geometry)&&c.k.transformToWorldCoordinates(e[o]);else u.p.multiplyTransformation(t,e[0].modelMatrix,t)}(p,y,h),!h)for(i=0;i<v;++i)n.e(p[i].geometry)&&c.k.splitLongitude(p[i]);if(function(e){for(var t=e.length,r=0;r<t;++r){var o=e[r];n.e(o.geometry)?d(o.geometry,r):n.e(o.westHemisphereGeometry)&&n.e(o.eastHemisphereGeometry)&&(d(o.westHemisphereGeometry,r),d(o.eastHemisphereGeometry,r))}}(p),l)for(i=0;i<v;++i){var b=p[i];n.e(b.geometry)?(c.k.reorderForPostVertexCache(b.geometry),c.k.reorderForPreVertexCache(b.geometry)):n.e(b.westHemisphereGeometry)&&n.e(b.eastHemisphereGeometry)&&(c.k.reorderForPostVertexCache(b.westHemisphereGeometry),c.k.reorderForPreVertexCache(b.westHemisphereGeometry),c.k.reorderForPostVertexCache(b.eastHemisphereGeometry),c.k.reorderForPreVertexCache(b.eastHemisphereGeometry))}var k=c.k.combineInstances(p);for(v=k.length,i=0;i<v;++i){var x,C=(a=k[i]).attributes;if(h)for(x in C)C.hasOwnProperty(x)&&C[x].componentDatatype===r.ComponentDatatype.DOUBLE&&c.k.encodeAttribute(a,x,x+"3DHigh",x+"3DLow");else for(x in C)if(C.hasOwnProperty(x)&&C[x].componentDatatype===r.ComponentDatatype.DOUBLE){var w=x+"3D",S=x+"2D";c.k.projectTo2D(a,x,w,S,f),n.e(a.boundingSphere)&&"position"===x&&(a.boundingSphereCV=t.i.fromVertices(a.attributes.position2D.values)),c.k.encodeAttribute(a,w,w+"High",w+"Low"),c.k.encodeAttribute(a,S,S+"High",S+"Low")}g&&c.k.compressVertices(a)}if(!m){var A=[];for(v=k.length,i=0;i<v;++i)a=k[i],A=A.concat(c.k.fitToUnsignedShortIndices(a));k=A}return k}function l(e,t,r,o){var i,a,s,c=o.length-1;if(c>=0){var p=o[c];i=p.offset+p.count,a=r[s=p.index].indices.length}else i=0,a=r[s=0].indices.length;for(var u=e.length,f=0;f<u;++f){var m=e[f][t];if(n.e(m)){var d=m.indices.length;i+d>a&&(i=0,a=r[++s].indices.length),o.push({index:s,offset:i,count:d}),i+=d}}}Object.defineProperties(m.prototype,{componentDatatype:{get:function(){return r.ComponentDatatype.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),m.fromCartesian3=function(e){return o.o.defined("offset",e),new m(e.x,e.y,e.z)},m.toValue=function(e,t){return o.o.defined("offset",e),n.e(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};var g={};function y(e,t){var r=e.attributes;for(var o in r)if(r.hasOwnProperty(o)){var i=r[o];n.e(i)&&n.e(i.values)&&t.push(i.values.buffer)}n.e(e.indices)&&t.push(e.indices.buffer)}function v(e,t){var r=e.length,o=new Float64Array(1+19*r),i=0;o[i++]=r;for(var a=0;a<r;a++){var s=e[a];if(u.p.pack(s.modelMatrix,o,i),i+=u.p.packedLength,n.e(s.attributes)&&n.e(s.attributes.offset)){var c=s.attributes.offset.value;o[i]=c[0],o[i+1]=c[1],o[i+2]=c[2]}i+=3}return t.push(o.buffer),o}function b(e){for(var t=e,r=new Array(t[0]),o=0,i=1;i<t.length;){var a,s=u.p.unpack(t,i);i+=u.p.packedLength,n.e(t[i])&&(a={offset:new m(t[i],t[i+1],t[i+2])}),i+=3,r[o++]={modelMatrix:s,attributes:a}}return r}function k(e){var r=e.length,o=1+(t.i.packedLength+1)*r,i=new Float32Array(o),a=0;i[a++]=r;for(var s=0;s<r;++s){var c=e[s];n.e(c)?(i[a++]=1,t.i.pack(e[s],i,a)):i[a++]=0,a+=t.i.packedLength}return i}function x(e){for(var r=new Array(e[0]),n=0,o=1;o<e.length;)1===e[o++]&&(r[n]=t.i.unpack(e,o)),++n,o+=t.i.packedLength;return r}g.combineGeometry=function(e){var r,o,i,a,s=e.instances,p=s.length,u=!1;p>0&&((r=h(e)).length>0&&(o=c.k.createAttributeLocations(r[0]),e.createPickOffsets&&(i=function(e,t){var r=[];return l(e,"geometry",t,r),l(e,"westHemisphereGeometry",t,r),l(e,"eastHemisphereGeometry",t,r),r}(s,r))),n.e(s[0].attributes)&&n.e(s[0].attributes.offset)&&(a=new Array(p),u=!0));for(var f=new Array(p),m=new Array(p),d=0;d<p;++d){var g=s[d],y=g.geometry;n.e(y)&&(f[d]=y.boundingSphere,m[d]=y.boundingSphereCV,u&&(a[d]=g.geometry.offsetAttribute));var v=g.eastHemisphereGeometry,b=g.westHemisphereGeometry;n.e(v)&&n.e(b)&&(n.e(v.boundingSphere)&&n.e(b.boundingSphere)&&(f[d]=t.i.union(v.boundingSphere,b.boundingSphere)),n.e(v.boundingSphereCV)&&n.e(b.boundingSphereCV)&&(m[d]=t.i.union(v.boundingSphereCV,b.boundingSphereCV)))}return{geometries:r,modelMatrix:e.modelMatrix,attributeLocations:o,pickOffsets:i,offsetInstanceExtend:a,boundingSpheres:f,boundingSpheresCV:m}},g.packCreateGeometryResults=function(e,r){var o=new Float64Array(function(e){for(var r=1,o=e.length,i=0;i<o;i++){var a=e[i];if(++r,n.e(a)){var s=a.attributes;for(var c in r+=7+2*t.i.packedLength+(n.e(a.indices)?a.indices.length:0),s)s.hasOwnProperty(c)&&n.e(s[c])&&(r+=6+s[c].values.length)}}return r}(e)),i=[],a={},s=e.length,c=0;o[c++]=s;for(var p=0;p<s;p++){var u=e[p],f=n.e(u);if(o[c++]=f?1:0,f){o[c++]=u.primitiveType,o[c++]=u.geometryType,o[c++]=n.u(u.offsetAttribute,-1);var m=n.e(u.boundingSphere)?1:0;o[c++]=m,m&&t.i.pack(u.boundingSphere,o,c),c+=t.i.packedLength;var d=n.e(u.boundingSphereCV)?1:0;o[c++]=d,d&&t.i.pack(u.boundingSphereCV,o,c),c+=t.i.packedLength;var h=u.attributes,l=[];for(var g in h)h.hasOwnProperty(g)&&n.e(h[g])&&(l.push(g),n.e(a[g])||(a[g]=i.length,i.push(g)));o[c++]=l.length;for(var y=0;y<l.length;y++){var v=l[y],b=h[v];o[c++]=a[v],o[c++]=b.componentDatatype,o[c++]=b.componentsPerAttribute,o[c++]=b.normalize?1:0,o[c++]=b.isInstanceAttribute?1:0,o[c++]=b.values.length,o.set(b.values,c),c+=b.values.length}var k=n.e(u.indices)?u.indices.length:0;o[c++]=k,k>0&&(o.set(u.indices,c),c+=k)}}return r.push(o.buffer),{stringTable:i,packedData:o}},g.unpackCreateGeometryResults=function(e){for(var n,o=e.stringTable,i=e.packedData,c=new Array(i[0]),u=0,f=1;f<i.length;){if(1===i[f++]){var m,d,h=i[f++],l=i[f++],g=i[f++];-1===g&&(g=void 0),1===i[f++]&&(m=t.i.unpack(i,f)),f+=t.i.packedLength,1===i[f++]&&(d=t.i.unpack(i,f)),f+=t.i.packedLength;var y,v,b,k,x=new s.a,C=i[f++];for(n=0;n<C;n++){var w=o[i[f++]],S=i[f++];b=i[f++];var A=0!==i[f++],D=0!==i[f++];y=i[f++],v=r.ComponentDatatype.createTypedArray(S,y);for(var G=0;G<y;G++)v[G]=i[f++];x[w]=new a.o({componentDatatype:S,componentsPerAttribute:b,normalize:A,values:v}),D&&(x[w].isInstanceAttribute=!0)}if((y=i[f++])>0){var O=v.length/b;for(k=p.IndexDatatype.createTypedArray(O,y),n=0;n<y;n++)k[n]=i[f++]}c[u++]=new a.I({primitiveType:h,geometryType:l,boundingSphere:m,boundingSphereCV:d,indices:k,attributes:x,offsetAttribute:g})}else c[u++]=void 0}return c},g.packCombineGeometryParameters=function(e,r){for(var n=e.createGeometryResults,o=n.length,i=0;i<o;i++)r.push(n[i].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:v(e.instances,r),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof t.n,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}},g.unpackCombineGeometryParameters=function(e){for(var r=b(e.packedInstances),n=e.createGeometryResults,o=n.length,a=0,s=0;s<o;s++)for(var c=g.unpackCreateGeometryResults(n[s]),p=c.length,m=0;m<p;m++){var d=c[m];r[a].geometry=d,++a}var h=i.t.clone(e.ellipsoid);return{instances:r,ellipsoid:h,projection:e.isGeographic?new t.n(h):new f.t(h),elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:u.p.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}},g.packCombineGeometryResults=function(e,t){n.e(e.geometries)&&function(e,t){for(var r=e.length,n=0;n<r;++n)y(e[n],t)}(e.geometries,t);var r=k(e.boundingSpheres),o=k(e.boundingSpheresCV);return t.push(r.buffer,o.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:r,boundingSpheresCV:o}},g.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:x(e.boundingSpheres),boundingSpheresCV:x(e.boundingSpheresCV)}},e.k=g})); +define(["exports","./buildModuleUrl-cbcc8c56","./ComponentDatatype-98414d16","./when-92c6cf3c","./Check-52a7d806","./Cartesian2-b72655a5","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryPipeline-50805727","./IndexDatatype-86677ec4","./FeatureDetection-fd297af4","./WebMercatorProjection-ee891935"],(function(e,t,r,n,o,i,a,s,c,p,u,f){"use strict";function m(e,t,r){e=n.u(e,0),t=n.u(t,0),r=n.u(r,0),this.value=new Float32Array([e,t,r])}function d(e,t){var n=e.attributes,o=n.position,i=o.values.length/o.componentsPerAttribute;n.batchId=new a.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:1,values:new Float32Array(i)});for(var s=n.batchId.values,c=0;c<i;++c)s[c]=t}function h(e){var i,a,s,p=e.instances,f=e.projection,m=e.elementIndexUintSupported,h=e.scene3DOnly,l=e.vertexCacheOptimize,g=e.compressVertices,y=e.modelMatrix,v=p.length;for(i=0;i<v;++i)if(n.e(p[i].geometry)){s=p[i].geometry.primitiveType;break}for(i=1;i<v;++i)if(n.e(p[i].geometry)&&p[i].geometry.primitiveType!==s)throw new o.t("All instance geometries must have the same primitiveType.");if(function(e,t,r){var o,i=!r,a=e.length;if(!i&&a>1){var s=e[0].modelMatrix;for(o=1;o<a;++o)if(!u.p.equals(s,e[o].modelMatrix)){i=!0;break}}if(i)for(o=0;o<a;++o)n.e(e[o].geometry)&&c.k.transformToWorldCoordinates(e[o]);else u.p.multiplyTransformation(t,e[0].modelMatrix,t)}(p,y,h),!h)for(i=0;i<v;++i)n.e(p[i].geometry)&&c.k.splitLongitude(p[i]);if(function(e){for(var t=e.length,r=0;r<t;++r){var o=e[r];n.e(o.geometry)?d(o.geometry,r):n.e(o.westHemisphereGeometry)&&n.e(o.eastHemisphereGeometry)&&(d(o.westHemisphereGeometry,r),d(o.eastHemisphereGeometry,r))}}(p),l)for(i=0;i<v;++i){var b=p[i];n.e(b.geometry)?(c.k.reorderForPostVertexCache(b.geometry),c.k.reorderForPreVertexCache(b.geometry)):n.e(b.westHemisphereGeometry)&&n.e(b.eastHemisphereGeometry)&&(c.k.reorderForPostVertexCache(b.westHemisphereGeometry),c.k.reorderForPreVertexCache(b.westHemisphereGeometry),c.k.reorderForPostVertexCache(b.eastHemisphereGeometry),c.k.reorderForPreVertexCache(b.eastHemisphereGeometry))}var k=c.k.combineInstances(p);for(v=k.length,i=0;i<v;++i){var x,C=(a=k[i]).attributes;if(h)for(x in C)C.hasOwnProperty(x)&&C[x].componentDatatype===r.ComponentDatatype.DOUBLE&&c.k.encodeAttribute(a,x,x+"3DHigh",x+"3DLow");else for(x in C)if(C.hasOwnProperty(x)&&C[x].componentDatatype===r.ComponentDatatype.DOUBLE){var w=x+"3D",S=x+"2D";c.k.projectTo2D(a,x,w,S,f),n.e(a.boundingSphere)&&"position"===x&&(a.boundingSphereCV=t.i.fromVertices(a.attributes.position2D.values)),c.k.encodeAttribute(a,w,w+"High",w+"Low"),c.k.encodeAttribute(a,S,S+"High",S+"Low")}g&&c.k.compressVertices(a)}if(!m){var A=[];for(v=k.length,i=0;i<v;++i)a=k[i],A=A.concat(c.k.fitToUnsignedShortIndices(a));k=A}return k}function l(e,t,r,o){var i,a,s,c=o.length-1;if(c>=0){var p=o[c];i=p.offset+p.count,a=r[s=p.index].indices.length}else i=0,a=r[s=0].indices.length;for(var u=e.length,f=0;f<u;++f){var m=e[f][t];if(n.e(m)){var d=m.indices.length;i+d>a&&(i=0,a=r[++s].indices.length),o.push({index:s,offset:i,count:d}),i+=d}}}Object.defineProperties(m.prototype,{componentDatatype:{get:function(){return r.ComponentDatatype.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),m.fromCartesian3=function(e){return o.o.defined("offset",e),new m(e.x,e.y,e.z)},m.toValue=function(e,t){return o.o.defined("offset",e),n.e(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};var g={};function y(e,t){var r=e.attributes;for(var o in r)if(r.hasOwnProperty(o)){var i=r[o];n.e(i)&&n.e(i.values)&&t.push(i.values.buffer)}n.e(e.indices)&&t.push(e.indices.buffer)}function v(e,t){var r=e.length,o=new Float64Array(1+19*r),i=0;o[i++]=r;for(var a=0;a<r;a++){var s=e[a];if(u.p.pack(s.modelMatrix,o,i),i+=u.p.packedLength,n.e(s.attributes)&&n.e(s.attributes.offset)){var c=s.attributes.offset.value;o[i]=c[0],o[i+1]=c[1],o[i+2]=c[2]}i+=3}return t.push(o.buffer),o}function b(e){for(var t=e,r=new Array(t[0]),o=0,i=1;i<t.length;){var a,s=u.p.unpack(t,i);i+=u.p.packedLength,n.e(t[i])&&(a={offset:new m(t[i],t[i+1],t[i+2])}),i+=3,r[o++]={modelMatrix:s,attributes:a}}return r}function k(e){var r=e.length,o=1+(t.i.packedLength+1)*r,i=new Float32Array(o),a=0;i[a++]=r;for(var s=0;s<r;++s){var c=e[s];n.e(c)?(i[a++]=1,t.i.pack(e[s],i,a)):i[a++]=0,a+=t.i.packedLength}return i}function x(e){for(var r=new Array(e[0]),n=0,o=1;o<e.length;)1===e[o++]&&(r[n]=t.i.unpack(e,o)),++n,o+=t.i.packedLength;return r}g.combineGeometry=function(e){var r,o,i,a,s=e.instances,p=s.length,u=!1;p>0&&((r=h(e)).length>0&&(o=c.k.createAttributeLocations(r[0]),e.createPickOffsets&&(i=function(e,t){var r=[];return l(e,"geometry",t,r),l(e,"westHemisphereGeometry",t,r),l(e,"eastHemisphereGeometry",t,r),r}(s,r))),n.e(s[0].attributes)&&n.e(s[0].attributes.offset)&&(a=new Array(p),u=!0));for(var f=new Array(p),m=new Array(p),d=0;d<p;++d){var g=s[d],y=g.geometry;n.e(y)&&(f[d]=y.boundingSphere,m[d]=y.boundingSphereCV,u&&(a[d]=g.geometry.offsetAttribute));var v=g.eastHemisphereGeometry,b=g.westHemisphereGeometry;n.e(v)&&n.e(b)&&(n.e(v.boundingSphere)&&n.e(b.boundingSphere)&&(f[d]=t.i.union(v.boundingSphere,b.boundingSphere)),n.e(v.boundingSphereCV)&&n.e(b.boundingSphereCV)&&(m[d]=t.i.union(v.boundingSphereCV,b.boundingSphereCV)))}return{geometries:r,modelMatrix:e.modelMatrix,attributeLocations:o,pickOffsets:i,offsetInstanceExtend:a,boundingSpheres:f,boundingSpheresCV:m}},g.packCreateGeometryResults=function(e,r){var o=new Float64Array(function(e){for(var r=1,o=e.length,i=0;i<o;i++){var a=e[i];if(++r,n.e(a)){var s=a.attributes;for(var c in r+=7+2*t.i.packedLength+(n.e(a.indices)?a.indices.length:0),s)s.hasOwnProperty(c)&&n.e(s[c])&&(r+=6+s[c].values.length)}}return r}(e)),i=[],a={},s=e.length,c=0;o[c++]=s;for(var p=0;p<s;p++){var u=e[p],f=n.e(u);if(o[c++]=f?1:0,f){o[c++]=u.primitiveType,o[c++]=u.geometryType,o[c++]=n.u(u.offsetAttribute,-1);var m=n.e(u.boundingSphere)?1:0;o[c++]=m,m&&t.i.pack(u.boundingSphere,o,c),c+=t.i.packedLength;var d=n.e(u.boundingSphereCV)?1:0;o[c++]=d,d&&t.i.pack(u.boundingSphereCV,o,c),c+=t.i.packedLength;var h=u.attributes,l=[];for(var g in h)h.hasOwnProperty(g)&&n.e(h[g])&&(l.push(g),n.e(a[g])||(a[g]=i.length,i.push(g)));o[c++]=l.length;for(var y=0;y<l.length;y++){var v=l[y],b=h[v];o[c++]=a[v],o[c++]=b.componentDatatype,o[c++]=b.componentsPerAttribute,o[c++]=b.normalize?1:0,o[c++]=b.isInstanceAttribute?1:0,o[c++]=b.values.length,o.set(b.values,c),c+=b.values.length}var k=n.e(u.indices)?u.indices.length:0;o[c++]=k,k>0&&(o.set(u.indices,c),c+=k)}}return r.push(o.buffer),{stringTable:i,packedData:o}},g.unpackCreateGeometryResults=function(e){for(var n,o=e.stringTable,i=e.packedData,c=new Array(i[0]),u=0,f=1;f<i.length;){if(1===i[f++]){var m,d,h=i[f++],l=i[f++],g=i[f++];-1===g&&(g=void 0),1===i[f++]&&(m=t.i.unpack(i,f)),f+=t.i.packedLength,1===i[f++]&&(d=t.i.unpack(i,f)),f+=t.i.packedLength;var y,v,b,k,x=new s.a,C=i[f++];for(n=0;n<C;n++){var w=o[i[f++]],S=i[f++];b=i[f++];var A=0!==i[f++],D=0!==i[f++];y=i[f++],v=r.ComponentDatatype.createTypedArray(S,y);for(var G=0;G<y;G++)v[G]=i[f++];x[w]=new a.o({componentDatatype:S,componentsPerAttribute:b,normalize:A,values:v}),D&&(x[w].isInstanceAttribute=!0)}if((y=i[f++])>0){var O=v.length/b;for(k=p.IndexDatatype.createTypedArray(O,y),n=0;n<y;n++)k[n]=i[f++]}c[u++]=new a.I({primitiveType:h,geometryType:l,boundingSphere:m,boundingSphereCV:d,indices:k,attributes:x,offsetAttribute:g})}else c[u++]=void 0}return c},g.packCombineGeometryParameters=function(e,r){for(var n=e.createGeometryResults,o=n.length,i=0;i<o;i++)r.push(n[i].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:v(e.instances,r),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof t.n,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}},g.unpackCombineGeometryParameters=function(e){for(var r=b(e.packedInstances),n=e.createGeometryResults,o=n.length,a=0,s=0;s<o;s++)for(var c=g.unpackCreateGeometryResults(n[s]),p=c.length,m=0;m<p;m++){var d=c[m];r[a].geometry=d,++a}var h=i.t.clone(e.ellipsoid);return{instances:r,ellipsoid:h,projection:e.isGeographic?new t.n(h):new f.t(h),elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:u.p.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}},g.packCombineGeometryResults=function(e,t){n.e(e.geometries)&&function(e,t){for(var r=e.length,n=0;n<r;++n)y(e[n],t)}(e.geometries,t);var r=k(e.boundingSpheres),o=k(e.boundingSpheresCV);return t.push(r.buffer,o.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:r,boundingSpheresCV:o}},g.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:x(e.boundingSpheres),boundingSpheresCV:x(e.boundingSpheresCV)}},e.k=g})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/RectangleGeometryLibrary-4696cd68.js b/SuperMap iEarth/public/SuperMap3D/Workers/RectangleGeometryLibrary-c06640bc.js similarity index 53% rename from SuperMap iEarth/public/SuperMap3D/Workers/RectangleGeometryLibrary-4696cd68.js rename to SuperMap iEarth/public/SuperMap3D/Workers/RectangleGeometryLibrary-c06640bc.js index 86cca4cd..b896ed39 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/RectangleGeometryLibrary-4696cd68.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/RectangleGeometryLibrary-c06640bc.js @@ -1 +1 @@ -define(["exports","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./when-92c6cf3c","./Check-52a7d806","./buildModuleUrl-9eef8841","./Math-ecf82623","./GeometryAttribute-f47bd1cb","./Cartesian2-b72655a5"],(function(t,n,a,r,e,o,s,i,h){"use strict";var g=Math.cos,u=Math.sin,c=Math.sqrt,l={computePosition:function(t,n,a,e,o,s,i){var h=n.radiiSquared,l=t.nwCorner,C=t.boundingRectangle,d=l.latitude-t.granYCos*e+o*t.granXSin,S=g(d),w=u(d),f=h.z*w,X=l.longitude+e*t.granYSin+o*t.granXCos,Y=S*g(X),O=S*u(X),v=h.x*Y,_=h.y*O,M=c(v*Y+_*O+f*w);if(s.x=v/M,s.y=_/M,s.z=f/M,a){var p=t.stNwCorner;r.e(p)?(d=p.latitude-t.stGranYCos*e+o*t.stGranXSin,X=p.longitude+e*t.stGranYSin+o*t.stGranXCos,i.x=(X-t.stWest)*t.lonScalar,i.y=(d-t.stSouth)*t.latScalar):(i.x=(X-C.west)*t.lonScalar,i.y=(d-C.south)*t.latScalar)}}},C=new i.f,d=new n.o,S=new a.a,w=new n.o,f=new o.n;function X(t,a,r,e,o,s,h){var g=Math.cos(a),u=e*g,c=r*g,l=Math.sin(a),S=e*l,X=r*l;d=f.project(t,d),d=n.o.subtract(d,w,d);var Y=i.f.fromRotation(a,C);d=i.f.multiplyByVector(Y,d,d),d=n.o.add(d,w,d),s-=1,h-=1;var O=(t=f.unproject(d,t)).latitude,v=O+s*X,_=O-u*h,M=O-u*h+s*X,p=Math.max(O,v,_,M),b=Math.min(O,v,_,M),R=t.longitude,W=R+s*c,m=R+h*S,G=R+h*S+s*c;return{north:p,south:b,east:Math.max(R,W,m,G),west:Math.min(R,W,m,G),granYCos:u,granYSin:S,granXCos:c,granXSin:X,nwCorner:t}}l.computeOptions=function(t,n,a,r,o,i,g){var u=t.east,c=t.west,l=t.north,C=t.south,d=!1,Y=!1;l===s.e.PI_OVER_TWO&&(d=!0),C===-s.e.PI_OVER_TWO&&(Y=!0);var O,v,_,M,p,b=l-C;_=(p=c>u?s.e.TWO_PI-c+u:u-c)/((O=Math.ceil(p/n)+1)-1),M=b/((v=Math.ceil(b/n)+1)-1);var R=h.h.northwest(t,i),W=h.h.center(t,S);(0!==a||0!==r)&&(W.longitude<R.longitude&&(W.longitude+=s.e.TWO_PI),w=f.project(W,w));var m=M,G=_,I=h.h.clone(t,o),P={granYCos:m,granYSin:0,granXCos:G,granXSin:0,nwCorner:R,boundingRectangle:I,width:O,height:v,northCap:d,southCap:Y};if(0!==a){var T=X(R,a,_,M,0,O,v);if(l=T.north,C=T.south,u=T.east,c=T.west,l<-s.e.PI_OVER_TWO||l>s.e.PI_OVER_TWO||C<-s.e.PI_OVER_TWO||C>s.e.PI_OVER_TWO)throw new e.t("Rotated rectangle is invalid. It crosses over either the north or south pole.");P.granYCos=T.granYCos,P.granYSin=T.granYSin,P.granXCos=T.granXCos,P.granXSin=T.granXSin,I.north=l,I.south=C,I.east=u,I.west=c}if(0!==r){a-=r;var x=h.h.northwest(I,g),y=X(x,a,_,M,0,O,v);P.stGranYCos=y.granYCos,P.stGranXCos=y.granXCos,P.stGranYSin=y.granYSin,P.stGranXSin=y.granXSin,P.stNwCorner=x,P.stWest=y.west,P.stSouth=y.south}return P},t.j=l})); +define(["exports","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./when-92c6cf3c","./Check-52a7d806","./buildModuleUrl-cbcc8c56","./Math-ecf82623","./GeometryAttribute-65cf868d","./Cartesian2-b72655a5"],(function(t,n,a,r,e,o,s,i,h){"use strict";var c=Math.cos,g=Math.sin,u=Math.sqrt,l={computePosition:function(t,n,a,e,o,s,i){var h=n.radiiSquared,l=t.nwCorner,C=t.boundingRectangle,d=l.latitude-t.granYCos*e+o*t.granXSin,S=c(d),w=g(d),f=h.z*w,X=l.longitude+e*t.granYSin+o*t.granXCos,Y=S*c(X),O=S*g(X),v=h.x*Y,_=h.y*O,M=u(v*Y+_*O+f*w);if(s.x=v/M,s.y=_/M,s.z=f/M,a){var p=t.stNwCorner;r.e(p)?(d=p.latitude-t.stGranYCos*e+o*t.stGranXSin,X=p.longitude+e*t.stGranYSin+o*t.stGranXCos,i.x=(X-t.stWest)*t.lonScalar,i.y=(d-t.stSouth)*t.latScalar):(i.x=(X-C.west)*t.lonScalar,i.y=(d-C.south)*t.latScalar)}}},C=new i.f,d=new n.o,S=new a.a,w=new n.o,f=new o.n;function X(t,a,r,e,o,s,h){var c=Math.cos(a),g=e*c,u=r*c,l=Math.sin(a),S=e*l,X=r*l;d=f.project(t,d),d=n.o.subtract(d,w,d);var Y=i.f.fromRotation(a,C);d=i.f.multiplyByVector(Y,d,d),d=n.o.add(d,w,d),s-=1,h-=1;var O=(t=f.unproject(d,t)).latitude,v=O+s*X,_=O-g*h,M=O-g*h+s*X,p=Math.max(O,v,_,M),b=Math.min(O,v,_,M),R=t.longitude,W=R+s*u,m=R+h*S,G=R+h*S+s*u;return{north:p,south:b,east:Math.max(R,W,m,G),west:Math.min(R,W,m,G),granYCos:g,granYSin:S,granXCos:u,granXSin:X,nwCorner:t}}l.computeOptions=function(t,n,a,r,o,i,c){var g=t.east,u=t.west,l=t.north,C=t.south,d=!1,Y=!1;l===s.e.PI_OVER_TWO&&(d=!0),C===-s.e.PI_OVER_TWO&&(Y=!0);var O,v,_,M,p,b=l-C;_=(p=u>g?s.e.TWO_PI-u+g:g-u)/((O=Math.ceil(p/n)+1)-1),M=b/((v=Math.ceil(b/n)+1)-1);var R=h.h.northwest(t,i),W=h.h.center(t,S);(0!==a||0!==r)&&(W.longitude<R.longitude&&(W.longitude+=s.e.TWO_PI),w=f.project(W,w));var m=M,G=_,I=h.h.clone(t,o),P={granYCos:m,granYSin:0,granXCos:G,granXSin:0,nwCorner:R,boundingRectangle:I,width:O,height:v,northCap:d,southCap:Y};if(0!==a){var T=X(R,a,_,M,0,O,v);if(l=T.north,C=T.south,g=T.east,u=T.west,l<-s.e.PI_OVER_TWO||l>s.e.PI_OVER_TWO||C<-s.e.PI_OVER_TWO||C>s.e.PI_OVER_TWO)throw new e.t("Rotated rectangle is invalid. It crosses over either the north or south pole.");P.granYCos=T.granYCos,P.granYSin=T.granYSin,P.granXCos=T.granXCos,P.granXSin=T.granXSin,I.north=l,I.south=C,I.east=g,I.west=u}if(0!==r){a-=r;var x=h.h.northwest(I,c),y=X(x,a,_,M,0,O,v);P.stGranYCos=y.granYCos,P.stGranXCos=y.granXCos,P.stGranYSin=y.granYSin,P.stGranXSin=y.granXSin,P.stNwCorner=x,P.stWest=y.west,P.stSouth=y.south}return P},t.j=l})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/S3MBTilesParser.js b/SuperMap iEarth/public/SuperMap3D/Workers/S3MBTilesParser.js index 12a082e6..cf5d4ede 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/S3MBTilesParser.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/S3MBTilesParser.js @@ -1 +1 @@ -define(["require","./arrayFill-0358accf","./Check-52a7d806","./when-92c6cf3c","./FeatureDetection-cec0163f","./buildModuleUrl-9eef8841","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartesian4-72b88c9e","./Cartographic-a2c313d7","./Color-98063b35","./ComponentDatatype-98414d16","./CompressedTextureBuffer-d0bacc6b","./S3MEdgeProcessor-d09e57c2","./getStringFromTypedArray-1e6dda18","./PixelFormat-ab56b0d6","./RuntimeError-c6a62a80","./S3MPixelFormat-339a4168","./IndexDatatype-86677ec4","./BoundingRectangle-82c0e2a7","./pako_inflate-f73548c4","./createTaskProcessorWorker","./unzip-e2c14141","./Math-ecf82623","./WebGLConstants-42651efd","./Event-3390cd7d"],(function(t,e,r,a,n,A,o,B,E,i,C,s,y,l,u,P,c,f,p,d,L,T,D,g,F,I){"use strict";function M(t,e,A){if(r.o.defined("array",t),a.e(e)&&r.o.typeOf.number("begin",e),a.e(A)&&r.o.typeOf.number("end",A),"function"==typeof t.slice)return t.slice(e,A);for(var o=Array.prototype.slice.call(t,e,A),B=n.s.typedArrayTypes,E=B.length,i=0;i<E;++i)if(t instanceof B[i]){o=new B[i](o);break}return o}var m,v=(m=!0,function(t,e){var r=m?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return m=!1,r}),_=v(void 0,(function(){return _.toString().search("(((.+)+)+)+$").toString().constructor(_).search("(((.+)+)+)+$")}));_();var S,O,N=Object.freeze({S3M:49,S3M4:1}),h=(S=!0,function(t,e){var r=S?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return S=!1,r}),R=h(void 0,(function(){return R.toString().search("(((.+)+)+)+$").toString().constructor(R).search("(((.+)+)+)+$")}));function b(){}function G(t,e,r){var n,A=t.num_points(),o=r.num_components(),B=new O.AttributeQuantizationTransform;if(B.InitFromAttribute(r)){for(var E=new Array(o),i=0;i<o;++i)E[i]=B.min_value(i);n={quantizationBits:B.quantization_bits(),minValues:E,range:B.range(),octEncoded:!1}}O.destroy(B),(B=new O.AttributeOctahedronTransform).InitFromAttribute(r)&&(n={quantizationBits:B.quantization_bits(),octEncoded:!0}),O.destroy(B);var C,y=A*o;C=a.e(n)?function(t,e,r,a,n){var A,o;a.quantizationBits<=8?(o=new O.DracoUInt8Array,A=new Uint8Array(n),e.GetAttributeUInt8ForAllPoints(t,r,o)):(o=new O.DracoUInt16Array,A=new Uint16Array(n),e.GetAttributeUInt16ForAllPoints(t,r,o));for(var B=0;B<n;++B)A[B]=o.GetValue(B);return O.destroy(o),A}(t,e,r,n,y):function(t,e,r,a){var n,A;switch(r.data_type()){case 1:case 11:A=new O.DracoInt8Array,n=new Int8Array(a),e.GetAttributeInt8ForAllPoints(t,r,A);break;case 2:A=new O.DracoUInt8Array,n=new Uint8Array(a),e.GetAttributeUInt8ForAllPoints(t,r,A);break;case 3:A=new O.DracoInt16Array,n=new Int16Array(a),e.GetAttributeInt16ForAllPoints(t,r,A);break;case 4:A=new O.DracoUInt16Array,n=new Uint16Array(a),e.GetAttributeUInt16ForAllPoints(t,r,A);break;case 5:case 7:A=new O.DracoInt32Array,n=new Int32Array(a),e.GetAttributeInt32ForAllPoints(t,r,A);break;case 6:case 8:A=new O.DracoUInt32Array,n=new Uint32Array(a),e.GetAttributeUInt32ForAllPoints(t,r,A);break;case 9:case 10:A=new O.DracoFloat32Array,n=new Float32Array(a),e.GetAttributeFloatForAllPoints(t,r,A)}for(var o=0;o<a;++o)n[o]=A.GetValue(o);return O.destroy(A),n}(t,e,r,y);var l=s.ComponentDatatype.fromTypedArray(C);if(s.ComponentDatatype.getSizeInBytes(l)*o%4!=0){var u=function(t,e,r){var a=e,n=s.ComponentDatatype.getSizeInBytes(r),A=n*e,o=4*Math.ceil(A/4)-A;a=e+o/n;var B,E=t.length/e,i=E*a;t instanceof Uint16Array?B=new Uint16Array(i):t instanceof Int16Array?B=new Int16Array(i):t instanceof Uint8Array?B=new Uint8Array(i):console.log("convertArrayToMutiple4Array dont support array type.");var C,y=0;for(y=0;y<E;y++)for(C=0;C<a;C++)B[y*a+C]=C<e?t[y*e+C]:0;return{numComponents:a,vertexArray:B}}(C,o,l);C=u.vertexArray,o=u.numComponents}return{array:C,data:{componentsPerAttribute:o,componentDatatype:l,byteOffset:r.byte_offset(),byteStride:s.ComponentDatatype.getSizeInBytes(l)*o,normalized:r.normalized(),quantization:n}}}R();var U=new B.o(40680631590769,40680631590769,40408299984661.445),x=new B.o,K=new B.o;function H(t,e,r,n){var A=Math.cos(e);x.x=A*Math.cos(t),x.y=A*Math.sin(t),x.z=Math.sin(e),x=B.o.normalize(x,x),B.o.multiplyComponents(U,x,K);var o=Math.sqrt(B.o.dot(x,K));return K=B.o.divideByScalar(K,o,K),x=B.o.multiplyByScalar(x,r,x),a.e(n)||(n=new B.o),B.o.add(K,x,n)}var w=new n.p,V=new n.p,Y=new B.o,J=new i.a;function k(t,e,r,A,C,y,u,P){var c=void 0,f=void 0,p=void 0,d=void 0,L=r.vertexAttributes,T=r.attrLocation;if(r.nCompressOptions=0,a.e(A.posUniqueID)&&A.posUniqueID>=0){a.e(P)||(r.nCompressOptions|=l.VertexCompressOption.SVC_Vertex);var D=e.GetAttribute(t,A.posUniqueID),g=G(t,e,D),F=g.data.componentsPerAttribute;r.verticesCount=g.array.length/F,r.vertCompressConstant=g.data.quantization.range/(1<<g.data.quantization.quantizationBits);var I=g.data.quantization.minValues;r.minVerticesValue=new E.e(I[0],I[1],I[2],1),F>3&&(r.minVerticesValue.w=I[3]);var M=r.verticesCount;if(y&&(c=new i.a,f=new i.a,p=new Float32Array(2*M),d=new Float64Array(2*M)),a.e(P)){var m=g.array,v=3===F?B.o.unpackArray(m):E.e.unpackArray(m);for(let t=0,e=v.length;t<e;t++){let e=v[t];B.o.multiplyByScalar(e,r.vertCompressConstant,e),B.o.add(e,r.minVerticesValue,e)}var _=n.p.multiply(P.sphereMatrix,P.geoMatrix,w),S=n.p.multiply(P.ellipsoidMatrix,P.geoMatrix,V);n.p.inverse(S,S);var O=new o.t(6378137,6378137,6378137);for(let t=0,e=v.length;t<e;t++){let e=v[t];n.p.multiplyByPoint(_,e,Y);let r=O.cartesianToCartographic(Y,J);y&&(d[2*t]=r.longitude,d[2*t+1]=r.latitude,0===t?(c.longitude=r.longitude,c.latitude=r.latitude,f.longitude=r.longitude,f.latitude=r.latitude):(c.longitude=Math.max(r.longitude,c.longitude),c.latitude=Math.max(r.latitude,c.latitude),f.longitude=Math.min(r.longitude,f.longitude),f.latitude=Math.min(r.latitude,f.latitude)));let a=H(r.longitude,r.latitude,r.height,Y);n.p.multiplyByPoint(S,a,e)}var N=new Array(3*v.length);3===F?B.o.packArray(v,N):E.e.packArray(v,N),g.array=new Float32Array(N),g.data.componentDatatype=s.ComponentDatatype.FLOAT,g.data.byteStride=4*F}if(T.aPosition=L.length,L.push({index:T.aPosition,typedArray:g.array,componentsPerAttribute:F,componentDatatype:g.data.componentDatatype,offsetInBytes:g.data.byteOffset,strideInBytes:g.data.byteStride,normalize:g.data.normalized}),!a.e(P)&&y)for(var h=new B.o,R=new B.o,b=new i.a,U=0;U<M;U++)n.p.multiplyByPoint(C,B.o.fromElements(g.array[3*U]*r.vertCompressConstant+I[0],g.array[3*U+1]*r.vertCompressConstant+I[1],g.array[3*U+2]*r.vertCompressConstant+I[2],h),R),b=i.a.fromCartesian(R),d[2*U]=b.longitude,d[2*U+1]=b.latitude,0===U?(c.longitude=b.longitude,c.latitude=b.latitude,f.longitude=b.longitude,f.latitude=b.latitude):(c.longitude=Math.max(b.longitude,c.longitude),c.latitude=Math.max(b.latitude,c.latitude),f.longitude=Math.min(b.longitude,f.longitude),f.latitude=Math.min(b.latitude,f.latitude));if(y){for(U=0;U<M;U++)p[2*U]=d[2*U]-f.longitude,p[2*U+1]=d[2*U+1]-f.latitude;T.img=L.length,L.push({index:T.img,typedArray:p,componentsPerAttribute:2,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),u.max=c,u.min=f}}if(a.e(A.normalUniqueID)&&A.normalUniqueID>=0){r.nCompressOptions|=l.VertexCompressOption.SVC_Normal;var x=e.GetAttribute(t,A.normalUniqueID),K=G(t,e,x),k=K.data.quantization;r.normalRangeConstant=(1<<k.quantizationBits)-1,T.aNormal=L.length,L.push({index:T.aNormal,typedArray:K.array,componentsPerAttribute:K.data.componentsPerAttribute,componentDatatype:K.data.componentDatatype,offsetInBytes:K.data.byteOffset,strideInBytes:K.data.byteStride,normalize:K.data.normalized})}if(a.e(A.colorUniqueID)&&A.colorUniqueID>=0){r.nCompressOptions|=l.VertexCompressOption.SVC_VertexColor;var W=e.GetAttribute(t,A.colorUniqueID),Z=G(t,e,W);T.aColor=L.length,L.push({index:T.aColor,typedArray:Z.array,componentsPerAttribute:Z.data.componentsPerAttribute,componentDatatype:Z.data.componentDatatype,offsetInBytes:Z.data.byteOffset,strideInBytes:Z.data.byteStride,normalize:Z.data.normalized})}for(U=0;U<A.texCoordUniqueIDs.length;U++){r.texCoordCompressConstant=[],r.minTexCoordValue=[];var X=A.texCoordUniqueIDs[U];if(!(X<0)){var z=e.GetAttribute(t,X),Q=G(t,e,z);if(a.e(Q.data.quantization)){r.nCompressOptions|=l.VertexCompressOption.SVC_TexutreCoord,r.texCoordCompressConstant.push(Q.data.quantization.range/(1<<Q.data.quantization.quantizationBits));I=Q.data.quantization.minValues;r.minTexCoordValue.push(new o.o(I[0],I[1]))}var j="aTexCoord"+U;T[j]=L.length,L.push({index:T[j],typedArray:Q.array,componentsPerAttribute:Q.data.componentsPerAttribute,componentDatatype:Q.data.componentDatatype,offsetInBytes:Q.data.byteOffset,strideInBytes:Q.data.byteStride,normalize:Q.data.normalized}),r.textureCoordIsW=!0}}for(U=0;U<A.vertexAttrUniqueIDs.length;U++){var q=A.vertexAttrUniqueIDs[U];if(!(q<0)){var $=e.GetAttribute(t,q),tt=G(t,e,$);T.aVertexWeight=L.length,L.push({index:T.aVertexWeight,typedArray:tt.array,componentsPerAttribute:tt.data.componentsPerAttribute,componentDatatype:tt.data.componentDatatype,offsetInBytes:tt.data.byteOffset,strideInBytes:tt.data.byteStride,normalize:tt.data.normalized}),r.customVertexAttribute={VertexWeight:0}}}}b.dracoDecodePointCloud=function(t,e,r,a,n){for(var A=new(O=t).Decoder,o=["POSITION","NORMAL","COLOR"],B=0;B<o.length;++B)A.SkipAttributeTransform(O[o[B]]);var E=new O.DecoderBuffer;if(E.Init(e,r),A.GetEncodedGeometryType(E)!==O.POINT_CLOUD)throw new c.t("Draco geometry type must be POINT_CLOUD.");var i=new O.PointCloud,C=A.DecodeBufferToPointCloud(E,i);if(!C.ok()||0===i.ptr)throw new c.t("Error decoding draco point cloud: "+C.error_msg());O.destroy(E),k(i,A,a,n),O.destroy(i),O.destroy(A)},b.dracoDecodeMesh=function(t,e,r,a,A,o,B,E,i,C){for(var s=new(O=t).Decoder,y=["POSITION","NORMAL","COLOR","TEX_COORD"],l=0;l<y.length;++l)s.SkipAttributeTransform(O[y[l]]);var u=new O.DecoderBuffer;if(u.Init(e,r),s.GetEncodedGeometryType(u)!==O.TRIANGULAR_MESH)throw new c.t("Unsupported draco mesh geometry type.");var P=new O.Mesh;if(!s.DecodeBufferToMesh(u,P).ok()||0===P.ptr)return!1;O.destroy(u),k(P,s,a,o,B,E,i,C);var f=function(t,e){for(var r=t.num_points(),a=t.num_faces(),n=new O.DracoInt32Array,A=3*a,o=p.IndexDatatype.createTypedArray(r,A),B=0,E=0;E<a;++E)e.GetFaceFromMesh(t,E,n),o[B+0]=n.GetValue(0),o[B+1]=n.GetValue(1),o[B+2]=n.GetValue(2),B+=3;var i=p.IndexDatatype.UNSIGNED_SHORT;return o instanceof Uint32Array&&(i=p.IndexDatatype.UNSIGNED_INT),O.destroy(n),{typedArray:o,numberOfIndices:A,indexDataType:i}}(P,s);A.indicesTypedArray=f.typedArray,A.indicesCount=f.numberOfIndices,A.indexType=f.indexDataType,A.primitiveType=n._0x4b6a27.TRIANGLES,O.destroy(P),O.destroy(s)};var W,Z=(W=!0,function(t,e){var r=W?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return W=!1,r}),X=Z(void 0,(function(){return X.toString().search("(((.+)+)+)+$").toString().constructor(X).search("(((.+)+)+)+$")}));X();var z,Q=Object.freeze({OSGBFile:0,OSGBCacheFile:1,ClampGroundPolygon:2,ClampObjectPolygon:3,ClampGroundLine:4,ClampObjectLine:5,IconPoint:6,Text:7,PointCloudFile:8,ExtendRegion3D:9,ExtendClampPolygonCache:10,PolylineEffect:11,RegionEffect:12,ClampGroundAndObjectLineCache:13,ClampGroundRealtimeRasterCache:14}),j=(z=!0,function(t,e){var r=z?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return z=!1,r}),q=j(void 0,(function(){return q.toString().search("(((.+)+)+)+$").toString().constructor(q).search("(((.+)+)+)+$")}));function $(){}function tt(t){var e=new A.i,r=t.instanceBounds;if(!a.e(r))return e;var n=new B.o(r[0],r[1],r[2]),o=new B.o(r[3],r[4],r[5]),E=B.o.lerp(n,o,.5,new B.o),i=B.o.distance(E,n);return e.center=E,e.radius=i,e}function et(t){var e,r,n=new A.i,o=new B.o,E=t.vertexAttributes[0],i=E.componentsPerAttribute,C=a.e(t.nCompressOptions)&&(t.nCompressOptions&l.VertexCompressOption.SVC_Vertex)===l.VertexCompressOption.SVC_Vertex,s=1;C?(s=t.vertCompressConstant,e=new B.o(t.minVerticesValue.x,t.minVerticesValue.y,t.minVerticesValue.z),r=new Uint16Array(E.typedArray.buffer,E.typedArray.byteOffset,E.typedArray.byteLength/2)):r=new Float32Array(E.typedArray.buffer,E.typedArray.byteOffset,E.typedArray.byteLength/4);for(var y=[],u=0;u<t.verticesCount;u++)B.o.fromArray(r,i*u,o),C&&(o=B.o.multiplyByScalar(o,s,o),o=B.o.add(o,e,o)),y.push(B.o.clone(o));return A.i.fromPoints(y,n),y.length=0,n}function rt(t){var e,r,n=new A.i,o=new B.o,E=a.e(t.nCompressOptions)&&(t.nCompressOptions&l.VertexCompressOption.SVC_Vertex)===l.VertexCompressOption.SVC_Vertex,i=t.vertexAttributes[0],C=i.componentsPerAttribute,s=1;E?(s=t.vertCompressConstant,r=new B.o(t.minVerticesValue.x,t.minVerticesValue.y,t.minVerticesValue.z),e=new Uint16Array(i.typedArray.buffer,i.typedArray.byteOffset,i.typedArray.byteLength/2)):e=new Float32Array(i.typedArray.buffer,i.typedArray.byteOffset,i.typedArray.byteLength/4);for(var y=[],u=0;u<t.verticesCount;u++)B.o.fromArray(e,C*u,o),E&&(o=B.o.multiplyByScalar(o,s,o),o=B.o.add(o,r,o)),y.push(B.o.clone(o));return A.i.fromPoints(y,n),y.length=0,n}function at(t){var e,r,n=a.e(t.nCompressOptions)&&(t.nCompressOptions&l.VertexCompressOption.SVC_Vertex)===l.VertexCompressOption.SVC_Vertex,o=new A.i,i=new B.o,C=new B.o,s=t.vertexAttributes[0],y=s.componentsPerAttribute,u=t.attrLocation.aPosition,P=t.vertexAttributes[u],c=t.attrLocation.aTexCoord5,f=t.vertexAttributes[c],p=f.componentsPerAttribute;n?(y=3,p=3,e=At(t,P),r=function(t,e,r){for(var a,n,A,o=e.componentsPerAttribute,B=t.texCoordCompressConstant[r],i=new E.e(t.minTexCoordValue[r].x,t.minTexCoordValue[r].y,t.minTexCoordValue[r].z,t.minTexCoordValue[r].w),C=new Uint16Array(e.typedArray.buffer,e.typedArray.byteOffset,e.typedArray.byteLength/2),s=new Float32Array(3*t.verticesCount),y=0;y<t.verticesCount;y++)a=C[o*y]*B+i.x,n=C[o*y+1]*B+i.y,A=C[o*y+2]*B+i.z,s[3*y]=a,s[3*y+1]=n,s[3*y+2]=A;return s}(t,f,5)):(e=new Float32Array(s.typedArray.buffer,s.typedArray.byteOffset,s.typedArray.byteLength/4),r=new Float32Array(f.typedArray.buffer,f.typedArray.byteOffset,f.typedArray.byteLength/4));for(var d=[],L=0;L<t.verticesCount;L++)B.o.fromArray(e,y*L,i),B.o.fromArray(r,p*L,C),B.o.add(i,C,i),d.push(B.o.clone(i));return A.i.fromPoints(d,o),d.length=0,o}function nt(t){var e=n._0x4b6a27.TRIANGLES;switch(t){case 1:e=n._0x4b6a27.POINTS;break;case 2:e=n._0x4b6a27.LINES;break;case 3:e=n._0x4b6a27.LINE_STRIP;break;case 4:e=n._0x4b6a27.TRIANGLES}return e}function At(t,e){for(var r,a,n,A=e.componentsPerAttribute,o=t.vertCompressConstant,E=new B.o(t.minVerticesValue.x,t.minVerticesValue.y,t.minVerticesValue.z),i=new Uint16Array(e.typedArray.buffer,e.typedArray.byteOffset,e.typedArray.byteLength/2),C=new Float32Array(3*t.verticesCount),s=0;s<t.verticesCount;s++)r=i[A*s]*o+E.x,a=i[A*s+1]*o+E.y,n=i[A*s+2]*o+E.z,C[3*s]=r,C[3*s+1]=a,C[3*s+2]=n;return C}q(),$.calcBoundingSphereInWorker=function(t,e){return e.instanceIndex>-1?tt(e):a.e(e.clampRegionEdge)?at(e):t>=Q.ClampGroundPolygon&&t<=Q.ClampObjectLine?rt(e):t==Q.ClampGroundAndObjectLineCache?at(e):et(e)},$.calcBoundingSphere=function(t,e,r){var n,o=t._fileType;return n=e.instanceIndex>-1?tt(e):a.e(e.clampRegionEdge)?at(e):o>=Q.ClampGroundPolygon&&o<=Q.ClampObjectLine?rt(e):o==Q.ClampGroundAndObjectLineCache?at(e):et(e),A.i.transform(n,r,n),n},$.calcBoundingRectangle=function(t,e){var r;return t._fileType===Q.ClampGroundPolygon&&(r=function(t){var e,r,n=a.e(t.nCompressOptions)&&(t.nCompressOptions&l.VertexCompressOption.SVC_Vertex)===l.VertexCompressOption.SVC_Vertex,A=new d.f,E=t.vertexAttributes[0],i=E.componentsPerAttribute,C=1;n?(C=t.vertCompressConstant,r=new B.o(t.minVerticesValue.x,t.minVerticesValue.y,t.minVerticesValue.z),e=new Uint16Array(E.typedArray.buffer,E.typedArray.byteOffset,E.typedArray.byteLength/2)):e=new Float32Array(E.typedArray.buffer,E.typedArray.byteOffset,E.typedArray.byteLength/4);for(var s=[],y=0;y<t.verticesCount;y++){var u=e[i*y],P=e[i*y+1];n&&(u=C*u+r.x,P=C*P+r.y),s.push(new o.o(u,P))}return d.f.fromPoints(s,A),s.length=0,A}(e)),r},$.createEdge=function(t,e){if(!(e.length<1)){var r=function(t){for(var e=[],r=t.length,a=0;a<r;a++){var A=nt(t[a].primitiveType);(A===n._0x4b6a27.LINES||A===n._0x4b6a27.LINE_STRIP)&&e.push(t[a])}return e}(e);if(0!=r.length){var A,o=function(t){for(var e=0,r=t.length,a=0;a<r;a++){var A=t[a],o=nt(A.primitiveType);o==n._0x4b6a27.LINES?e+=A.indicesCount/2:o==n._0x4b6a27.LINE_STRIP&&e++}return e}(r),E=t.attrLocation.aPosition,i=t.vertexAttributes[E],C=a.e(t.nCompressOptions)&&(t.nCompressOptions&l.VertexCompressOption.SVC_Vertex)===l.VertexCompressOption.SVC_Vertex,y=i.componentsPerAttribute;C?(y=3,A=At(t,i)):A=new Float32Array(i.typedArray.buffer,i.typedArray.byteOffset,i.typedArray.byteLength/4);for(var u=function(t){for(var e=0,r=t.length,a=0;a<r;a++)e+=t[a].indicesCount;return e}(r),P=function(t,e,r){for(var a,A=[],o=r.length,E=0;E<o;E++){var i,C=r[E];i=0===C.indexType?new Uint16Array(C.indicesTypedArray.buffer,C.indicesTypedArray.byteOffset,C.indicesTypedArray.byteLength/2):new Uint32Array(C.indicesTypedArray.buffer,C.indicesTypedArray.byteOffset,C.indicesTypedArray.byteLength/4);var s=nt(C.primitiveType);if(s==n._0x4b6a27.LINES)for(a=0;a<C.indicesCount;a+=2){var y=[],l=new B.o;l.x=t[i[a]*e],l.y=t[i[a]*e+1],l.z=t[i[a]*e+2],y.push(l);var u=new B.o;u.x=t[i[a+1]*e],u.y=t[i[a+1]*e+1],u.z=t[i[a+1]*e+2],y.push(u),A.push(y)}else if(s==n._0x4b6a27.LINE_STRIP){for(y=[],a=0;a<C.indicesCount;a++){var P=new B.o;P.x=t[i[a]*e],P.y=t[i[a]*e+1],P.z=t[i[a]*e+2],y.push(P)}A.push(y)}}return A}(A,y,r),c=4*u-4*o,f=new Float32Array(3*c),p=new Float32Array(3*c),d=new Float32Array(3*c),L=new Int8Array(2*c),T=0,D=0;D<o;D++){for(var g=P[D].length,F=0;F<g;F++){var I=4*T-4*D,M=3*I+12*F,m=P[D][F];0!=F&&(f[M-6]=m.x,f[M-5]=m.y,f[M-4]=m.z,f[M-3]=m.x,f[M-2]=m.y,f[M-1]=m.z),F!=g-1&&(f[M]=m.x,f[M+1]=m.y,f[M+2]=m.z,f[M+3]=m.x,f[M+4]=m.y,f[M+5]=m.z);var v=m;F+1<g&&(v=P[D][F+1]),0!=F&&(d[M-6]=v.x,d[M-5]=v.y,d[M-4]=v.z,d[M-3]=v.x,d[M-2]=v.y,d[M-1]=v.z),F!=g-1&&(d[M]=v.x,d[M+1]=v.y,d[M+2]=v.z,d[M+3]=v.x,d[M+4]=v.y,d[M+5]=v.z);var _=m;F>=1&&(_=P[D][F-1]),0!=F&&(p[M-6]=_.x,p[M-5]=_.y,p[M-4]=_.z,p[M-3]=_.x,p[M-2]=_.y,p[M-1]=_.z),F!=g-1&&(p[M]=_.x,p[M+1]=_.y,p[M+2]=_.z,p[M+3]=_.x,p[M+4]=_.y,p[M+5]=_.z),M=2*I+8*F,0!=F&&(L[M-4]=-1,L[M-3]=-1,L[M-2]=1,L[M-1]=-1),F!=g-1&&(L[M]=-1,L[M+1]=1,L[M+2]=1,L[M+3]=1)}T+=P[D].length}var S={vertexAttributes:[],attrLocation:{}},O=S.vertexAttributes,N=S.attrLocation;S.instanceCount=0,S.instanceMode=0,N.aPosition=0,O.push({index:N.aPosition,typedArray:f,componentsPerAttribute:3,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),N.aNormal=1,O.push({index:N.aNormal,typedArray:p,componentsPerAttribute:3,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),N.aTexCoord0=2,O.push({index:N.aTexCoord0,typedArray:d,componentsPerAttribute:3,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),N.aTexCoord1=3,O.push({index:N.aTexCoord1,typedArray:L,componentsPerAttribute:2,componentDatatype:s.ComponentDatatype.BYTE,offsetInBytes:0,strideInBytes:2*Int8Array.BYTES_PER_ELEMENT,normalize:!1});for(var h=[],R=0;R<P.length;R++)h.push(P[R].length);return{vertexPackage:S,indexPackage:function(t,e,r,a){var A,o={};o.indicesCount=6*(t-e),o.indexType=a>65535?1:0,o.primitiveType=n._0x4b6a27.TRIANGLES,A=0===o.indexType?new Uint16Array(o.indicesCount):new Uint32Array(o.indicesCount);for(var B=0,E=0;E<e;E++){for(var i=0;i<r[E]-1;i++)A[6*(B-E+i)]=4*(B-E+i),A[6*(B-E+i)+1]=4*(B-E+i)+2,A[6*(B-E+i)+2]=4*(B-E+i)+1,A[6*(B-E+i)+3]=4*(B-E+i)+1,A[6*(B-E+i)+4]=4*(B-E+i)+2,A[6*(B-E+i)+5]=4*(B-E+i)+3;B+=r[E]}return o.indicesTypedArray=A,o}(u,o,h,c)}}}};var ot,Bt,Et=function(){var t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),e=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if("object"!=typeof WebAssembly)return{supported:!1};var r="B9h79tEBBBE8fV9gBB9gVUUUUUEU9gIUUUB9gEUEU9gIUUUEUIKQBEEEDDDILLLVE9wEEEVIEBEOWEUEC+Q/IEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBEy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBDe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBIl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBLk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBOL79iv9rBRQ+x8yQDBK/qMEZU8jJJJJBCJ/EB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rADZ1JJJBHWCJ/ABAD9uC/wfBgGOCJDAOCJD6eHdAICEFHLCBHQDNINAQAE9PMEAdAEAQ9rAQAdFAE6eHKDNDNADtMBAKCSFGOC9wgHXAOCL4CIFCD4HMAWCJDFHpCBHSALHZINDNARAZ9rAM9PMBCBHLXIKAZAMFHLDNAXtMBCBHhCBHIINDNARAL9rCk9PMBCBHLXVKAWCJ/CBFAIFHODNDNDNDNDNAZAICO4FrBBAhCOg4CIgpLBEDIBKAO9CB83IBAOCWF9CB83IBXIKAOALrBLALrBBGoCO4GaAaCIsGae86BBAOCEFALCLFAaFGarBBAoCL4CIgGcAcCIsGce86BBAOCDFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCIFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCLFAaAoFGarBBALrBEGoCO4GcAcCIsGce86BBAOCVFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCOFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCRFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCWFAaAoFGarBBALrBDGoCO4GcAcCIsGce86BBAOCdFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCQFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCKFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCXFAaAoFGorBBALrBIGLCO4GaAaCIsGae86BBAOCMFAoAaFGorBBALCL4CIgGaAaCIsGae86BBAOCpFAoAaFGorBBALCD4CIgGaAaCIsGae86BBAOCSFAoAaFGOrBBALCIgGLALCIsGLe86BBAOALFHLXDKAOALrBWALrBBGoCL4GaAaCSsGae86BBAOCEFALCWFAaFGarBBAoCSgGoAoCSsGoe86BBAOCDFAaAoFGorBBALrBEGaCL4GcAcCSsGce86BBAOCIFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCLFAoAaFGorBBALrBDGaCL4GcAcCSsGce86BBAOCVFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCOFAoAaFGorBBALrBIGaCL4GcAcCSsGce86BBAOCRFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCWFAoAaFGorBBALrBLGaCL4GcAcCSsGce86BBAOCdFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCQFAoAaFGorBBALrBVGaCL4GcAcCSsGce86BBAOCKFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCXFAoAaFGorBBALrBOGaCL4GcAcCSsGce86BBAOCMFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCpFAoAaFGorBBALrBRGLCL4GaAaCSsGae86BBAOCSFAoAaFGOrBBALCSgGLALCSsGLe86BBAOALFHLXEKAOAL8pBB83BBAOCWFALCWF8pBB83BBALCZFHLKAhCDFHhAICZFGIAX6MBKKDNALMBCBHLXIKDNAKtMBAWASFrBBHhCBHOApHIINAIAWCJ/CBFAOFrBBGZCE4CBAZCEg9r7AhFGh86BBAIADFHIAOCEFGOAK9HMBKKApCEFHpALHZASCEFGSAD9HMBKKABAQAD2FAWCJDFAKAD2Z1JJJB8aAWAWCJDFAKCUFAD2FADZ1JJJB8aKAKCBALeAQFHQALMBKC9+HOXEKCBC99ARAL9rADCAADCA0eseHOKAVCJ/EBF8kJJJJBAOK+OoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJEZ+JJJJB8aAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK+lVOEUE99DUD99EUD99DNDNADCL9HMBAEtMEINDNDNjBBBzjBBB+/ABCDFGD8sBB+yAB8sBBGI+yGL+L+TABCEFGV8sBBGO+yGR+L+TGWjBBBB9gGdeAWjBB/+9CAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI86BBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD86BBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD86BBABCLFHBAECUFGEMBXDKKAEtMBINDNDNjBBBzjBBB+/ABCLFGD8uEB+yAB8uEBGI+yGL+L+TABCDFGV8uEBGO+yGR+L+TGWjBBBB9gGdeAWjB/+fsAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI87EBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD87EBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD87EBABCWFHBAECUFGEMBKKK/SILIUI99IUE99DNAEtMBCBHIABHLINDNDNj/zL81zALCOF8uEBGVCIv+y+VGOAL8uEB+ynGRjB/+fsnjBBBzjBBB+/ARjBBBB9gemGW+LjBBB9P9dtMBAW+oHdXEKCJJJJ94HdKALCLF8uEBHQALCDF8uEBHKABAVCEFCIgAIvCETFAd87EBDNDNAOAK+ynGWjB/+fsnjBBBzjBBB+/AWjBBBB9gemGX+LjBBB9P9dtMBAX+oHKXEKCJJJJ94HKKABAVCDFCIgAIvCETFAK87EBDNDNAOAQ+ynGOjB/+fsnjBBBzjBBB+/AOjBBBB9gemGX+LjBBB9P9dtMBAX+oHQXEKCJJJJ94HQKABAVCUFCIgAIvCETFAQ87EBDNDNjBBJzARARn+TAWAWn+TAOAOn+TGRjBBBBARjBBBB9ge+RjB/+fsnjBBBzmGR+LjBBB9P9dtMBAR+oHQXEKCJJJJ94HQKABAVCIgAIvCETFAQ87EBALCWFHLAICLFHIAECUFGEMBKKK6BDNADCD4AE2GEtMBINABABYDBGDCWTCW91+yADCk91ClTCJJJ/8IF++nuDBABCLFHBAECUFGEMBKKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABKKKEBCJWKLZ9kBB";WebAssembly.validate(t)&&(r="B9h79tEBBBE5V9gBB9gVUUUUUEU9gIUUUB9gDUUB9gEUEUIMXBBEBEEDIDIDLLVE9wEEEVIEBEOWEUEC+Q/aEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBDy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBLe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBOk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBWl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBQL79iv9rBKQ/j6XLBZIK9+EVU8jJJJJBCZ9rHBCBHEINCBHDCBHIINABCWFADFAICJUAEAD4CEgGLe86BBAIALFHIADCEFGDCW9HMBKAEC+Q+YJJBFAI86BBAECITC+Q1JJBFAB8pIW83IBAECEFGECJD9HMBKK1HLSUD97EUO978jJJJJBCJ/KB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rAD/8QBBCJ/ABAD9uC/wfBgGOCJDAOCJD6eHWAICEFHOCBHdDNINAdAE9PMEAWAEAd9rAdAWFAE6eHQDNDNADtMBAQCSFGLC9wgGKCI2HXAKCETHMALCL4CIFCD4HpCBHSINAOHZCBHhDNINDNARAZ9rAp9PMBCBHOXVKAVCJ/CBFAhAK2FHoAZApFHOCBHIDNAKC/AB6MBARAO9rC/gB6MBCBHLINAoALFHIDNDNDNDNDNAZALCO4FrBBGaCIgpLBEDIBKAICBPhPKLBXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLBAOCZFHOKDNDNDNDNDNAaCD4CIgpLBEDIBKAICBPhPKLZXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLZAOCZFHOKDNDNDNDNDNAaCL4CIgpLBEDIBKAICBPhPKLAXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLAAOCZFHOKDNDNDNDNDNAaCO4pLBEDIBKAICBPhPKL8wXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCLFAlPqBFAaC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCWFAlPqBFAaC+Q+YJJBFrBBFHOXEKAIAOPBBBPKL8wAOCZFHOKALC/ABFHIALCJEFAK0MEAIHLARAO9rC/fB0MBKKDNAIAK9PMBAICI4HLINDNARAO9rCk9PMBCBHOXRKAoAIFHaDNDNDNDNDNAZAICO4FrBBALCOg4CIgpLBEDIBKAaCBPhPKLBXIKAaAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAaAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAaAOPBBBPKLBAOCZFHOKALCDFHLAICZFGIAK6MBKKDNAOtMBAOHZAhCEFGhCLsMDXEKKCBHOXIKDNAKtMBAVCJDFASFHIAVASFPBDBHlCBHaINAIAVCJ/CBFAaFGLPBLBGxCEP9tAxCEPSGcP9OP9hP9RGxALAKFPBLBGkCEP9tAkAcP9OP9hP9RGkPMBZEhDoIaLcVxOqRlGyALAMFPBLBG8aCEP9tA8aAcP9OP9hP9RG8aALAXFPBLBGeCEP9tAeAcP9OP9hP9RGePMBZEhDoIaLcVxOqRlG3PMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIAlP9uGlPeBbDBAIADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAyA3PMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWkdyQ8aKeX3M5p8eS8fGxA8aAePMWkdyQ8aKeX3M5p8eS8fGkPMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFHIAaCZFGaAK6MBKKASCLFGSAD6MBKKABAdAD2FAVCJDFAQAD2/8QBBAVAVCJDFAQCUFAD2FAD/8QBBKAQCBAOeAdFHdAOMBKC9+HOXEKCBC99ARAO9rADCAADCA0eseHOKAVCJ/KBF8kJJJJBAOKWBZ+BJJJBK+KoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJE/8KBAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK/xVDIUO978jJJJJBCA9rGI8kJJJJBDNDNADCL9HMBDNAEC98gGLtMBABHDCBHVINADADPBBBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKBBADCZFHDAVCLFGVAL6MBKKALAE9PMEAIAECIgGVCDTGDvCBCZAD9r/8KBAIABALCDTFGLAD/8QBBDNAVtMBAIAIPBLBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKLBKALAIAD/8QBBXEKABAEC98gGDZ+HJJJBADAE9PMBAIAECIgGLCITGVFCBCAAV9r/8KBAIABADCITFGDAV/8QBBAIALZ+HJJJBADAIAV/8QBBKAICAF8kJJJJBK+yIDDUR97DNAEtMBCBHDINABCZFGIAIPBBBGLCBPhGVCJJ98P3ECJJ98P3IGOP9OABPBBBGRALPMLVORXMpScxql358e8fCffEPhP9OP/6EARALPMBEDIWdQKZhoaky8aeGLCZP+sEP/6EGWP/gEALCZP+rECZP+sEP/6EGdP/gEP/kEP/lEGLjB/+fsPaAdALAVP+2EGVAdCJJJJ94PhGQP9OP9RP/kEGdAdP/mEALALP/mEAWAVAWAQP9OP9RP/kEGLALP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGVP/kECZP+rEAdAWP/mEAVP/kECffIPhP9OP9QGdALAWP/mEAVP/kECUPSCBPlDCBPlICBPlOCBPlRCBPlQCBPlKCBPlpCBPlSP9OGLPMWdkyQK8aeXM35pS8e8fP9QPKBBABARAOP9OAdALPMBEZhDIoaLVcxORqlP9QPKBBABCAFHBADCLFGDAE6MBKKK94EIU8jJJJJBCA9rGI8kJJJJBABAEC98gGLZ+JJJJBDNALAE9PMBAIAECIgGVCITGEFCBCAAE9r/8KBAIABALCITFGBAE/8QBBAIAVZ+JJJJBABAIAE/8QBBKAICAF8kJJJJBK/hILDUE97EUV978jJJJJBCZ9rHDDNAEtMBCBHIINADABPBBBGLABCZFGVPBBBGOPMLVORXMpScxql358e8fGRCZP+sEGWCLP+rEPKLBABjBBJzPaj/zL81zPaAWCIPhP9QP/6EP/nEGWALAOPMBEDIWdQKZhoaky8aeGLCZP+rECZP+sEP/6EP/mEGOAOP/mEAWALCZP+sEP/6EP/mEGdAdP/mEAWARCZP+rECZP+sEP/6EP/mEGRARP/mEP/kEP/kEP/lECBPhP+4EP/jEjB/+fsPaGWP/mEjBBN0PaGLP/kECffIPhGQP9OAdAWP/mEALP/kECZP+rEP9QGdARAWP/mEALP/kECZP+rEAOAWP/mEALP/kEAQP9OP9QGWPMBEZhDIoaLVcxORqlGLP5BADPBLBPeB+t+J83IBABCWFALP5EADPBLBPeE+t+J83IBAVAdAWPMWdkyQK8aeXM35pS8e8fGWP5BADPBLBPeD+t+J83IBABCkFAWP5EADPBLBPeI+t+J83IBABCAFHBAICLFGIAE6MBKKK/3EDIUE978jJJJJBC/AB9rHIDNADCD4AE2GLC98gGVtMBCBHDABHEINAEAEPBBBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKBBAECZFHEADCLFGDAV6MBKKDNAVAL9PMBAIALCIgGDCDTGEvCBC/ABAE9r/8KBAIABAVCDTFGVAE/8QBBDNADtMBAIAIPBLBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKLBKAVAIAE/8QBBKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIKKKEBCJWKLZ9tBB");var a,n=WebAssembly.instantiate(function(t){for(var r=new Uint8Array(t.length),a=0;a<t.length;++a){var n=t.charCodeAt(a);r[a]=n>96?n-71:n>64?n-65:n>47?n+4:n>46?63:62}var A=0;for(a=0;a<t.length;++a)r[A++]=r[a]<60?e[r[a]]:64*(r[a]-60)+r[++a];return r.buffer.slice(0,A)}(r),{}).then((function(t){(a=t.instance).exports.__wasm_call_ctors()}));function A(t,e,r,n,A,o){var B=a.exports.sbrk,E=r+3&-4,i=B(E*n),C=B(A.length),s=new Uint8Array(a.exports.memory.buffer);s.set(A,C);var y=t(i,r,n,C,A.length);if(0==y&&o&&o(i,E,n),e.set(s.subarray(i,i+r*n)),B(i-B(0)),0!=y)throw new Error("Malformed buffer data: "+y)}var o={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},B={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return{ready:n,supported:!0,decodeVertexBuffer:function(t,e,r,n,B){A(a.exports.meshopt_decodeVertexBuffer,t,e,r,n,a.exports[o[B]])},decodeIndexBuffer:function(t,e,r,n){A(a.exports.meshopt_decodeIndexBuffer,t,e,r,n)},decodeIndexSequence:function(t,e,r,n){A(a.exports.meshopt_decodeIndexSequence,t,e,r,n)},decodeGltfBuffer:function(t,e,r,n,E,i){A(a.exports[B[E]],t,e,r,n,a.exports[o[i]])}}}(),it=1,Ct=2,st={};st[0]=P.PixelFormat.RGB_DXT1,st[it]=P.PixelFormat.RGBA_DXT3,st[Ct]=P.PixelFormat.RGBA_DXT5;var yt,lt=0,ut=!1;function Pt(t,e){var r=t.data,n=r.byteLength,A=new Uint8Array(r),o=yt._malloc(n);!function(t,e,r,a){var n,A=r/4,o=a%4,B=new Uint32Array(t.buffer,0,(a-o)/4),E=new Uint32Array(e.buffer);for(n=0;n<B.length;n++)E[A+n]=B[n];for(n=a-o;n<a;n++)e[r+n]=t[n]}(A,yt.HEAPU8,o,n);var B=yt._crn_get_dxt_format(o,n),E=st[B];if(!a.e(E))throw new c.t("Unsupported compressed format.");var i,C=yt._crn_get_levels(o,n),s=yt._crn_get_width(o,n),l=yt._crn_get_height(o,n),u=0;for(i=0;i<C;++i)u+=P.PixelFormat.compressedTextureSizeInBytes(E,s>>i,l>>i);if(lt<u&&(a.e(ot)&&yt._free(ot),ot=yt._malloc(u),Bt=new Uint8Array(yt.HEAPU8.buffer,ot,u),lt=u),yt._crn_decompress(o,n,ot,u,0,C),yt._free(o),a.u(t.bMipMap,!1)){var f=Bt.slice(0,u);return e.push(f.buffer),new y.e(E,s,l,f)}var p=P.PixelFormat.compressedTextureSizeInBytes(E,s,l),d=Bt.subarray(0,p),L=new Uint8Array(p);return L.set(d,0),e.push(L.buffer),new y.e(E,s,l,L)}var ct,ft=1,pt=0,dt=1,Lt=2,Tt=3,Dt=0,gt=1,Ft=2;new C.e;var It,Mt=!1,mt=!1,vt=null;if(a.e(D.unzip)){D.unzip.onRuntimeInitialized=function(){Mt=!0};var _t=D.unzip.cwrap("unzip","number",["number","number","number","number"]),St=D.unzip.cwrap("freePointer",null,["number"])}function Ot(t,e,r,a,n,A){this.left=t,this.bottom=e,this.right=r,this.top=a,this.minHeight=n,this.maxHeight=A,this.width=r-t,this.length=a-e,this.height=A-n}function Nt(t,e,r){var a=r,n=t.getUint32(a,!0),A=a+=Uint32Array.BYTES_PER_ELEMENT,o=new Uint8Array(e,a,n);return{dataViewByteOffset:A,byteOffset:a+=n*Uint8Array.BYTES_PER_ELEMENT,buffer:o}}function ht(t,e,r,a){var n=t.getUint32(a+e,!0);a+=Uint32Array.BYTES_PER_ELEMENT;var A=r.subarray(a,a+n);return{string:u.a(A),bytesOffset:a+=n}}function Rt(t,e,r,a,n,A){var o=r,B=t.getUint16(r+a,!0);o+=Uint16Array.BYTES_PER_ELEMENT,A||(o+=Uint16Array.BYTES_PER_ELEMENT);for(var E=0;E<B;E++){var i=t.getUint32(o+a,!0);o+=Uint32Array.BYTES_PER_ELEMENT;var C=t.getUint16(o+a,!0);if(o+=Uint16Array.BYTES_PER_ELEMENT,t.getUint16(o+a,!0),o+=Uint16Array.BYTES_PER_ELEMENT,20==C||35==C);else{var y=i*C*Float32Array.BYTES_PER_ELEMENT,l=e.subarray(o,o+y);o+=y;var u="aTexCoord"+E,P=n.vertexAttributes,c=n.attrLocation;c[u]=P.length,P.push({index:c[u],typedArray:l,componentsPerAttribute:C,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:C*Float32Array.BYTES_PER_ELEMENT,normalize:!1})}}return{bytesOffset:o}}function bt(t,e,r,a,n){var A=r,o=t.getUint16(A+a,!0);A+=Uint16Array.BYTES_PER_ELEMENT,A+=Uint16Array.BYTES_PER_ELEMENT;for(var B=n.vertexAttributes,E=n.attrLocation,i=0;i<o;i++){var C=t.getUint32(A+a,!0);A+=Uint32Array.BYTES_PER_ELEMENT;var y=t.getUint16(A+a,!0);if(A+=Uint16Array.BYTES_PER_ELEMENT,16===y){A-=Uint16Array.BYTES_PER_ELEMENT;var l=C*(y*Float32Array.BYTES_PER_ELEMENT+Uint16Array.BYTES_PER_ELEMENT),u=e.subarray(A,A+l);A+=l;var P=new Uint8Array(Float32Array.BYTES_PER_ELEMENT*y*C);n.instanceCount=C,n.instanceMode=y,n.instanceBuffer=P,n.instanceIndex=1;for(var c=Float32Array.BYTES_PER_ELEMENT*y+Uint16Array.BYTES_PER_ELEMENT,f=0;f<C;f++){var p=f*c+Uint16Array.BYTES_PER_ELEMENT,d=u.subarray(p,p+c);P.set(d,f*(c-Uint16Array.BYTES_PER_ELEMENT))}L=16*Float32Array.BYTES_PER_ELEMENT,E.uv2=B.length,B.push({index:E.uv2,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:L,instanceDivisor:1}),E.uv3=B.length,B.push({index:E.uv3,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}),E.uv4=B.length,B.push({index:E.uv4,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}),E.secondary_colour=B.length,B.push({index:E.secondary_colour,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1})}else{t.getUint16(A+a,!0),A+=Uint16Array.BYTES_PER_ELEMENT;l=C*y*Float32Array.BYTES_PER_ELEMENT;if(17===y||29===y){var L;P=e.subarray(A,A+l);n.instanceCount=C,n.instanceMode=y,n.instanceBuffer=P,n.instanceIndex=1,17===y?(L=17*Float32Array.BYTES_PER_ELEMENT,E.uv2=B.length,B.push({index:E.uv2,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:L,instanceDivisor:1}),E.uv3=B.length,B.push({index:E.uv3,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}),E.uv4=B.length,B.push({index:E.uv4,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}),E.secondary_colour=B.length,B.push({index:E.secondary_colour,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}),E.uv6=B.length,B.push({index:E.uv6,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,normalize:!0,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1})):29===y&&(L=29*Float32Array.BYTES_PER_ELEMENT,E.uv1=B.length,B.push({index:E.uv1,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:L,instanceDivisor:1,byteLength:l}),E.uv2=B.length,B.push({index:E.uv2,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}),E.uv3=B.length,B.push({index:E.uv3,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}),E.uv4=B.length,B.push({index:E.uv4,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}),E.uv5=B.length,B.push({index:E.uv5,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}),E.uv6=B.length,B.push({index:E.uv6,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:20*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}),E.uv7=B.length,B.push({index:E.uv7,componentsPerAttribute:3,componentDatatype:s.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:24*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}),E.secondary_colour=B.length,B.push({index:E.secondary_colour,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,normalize:!0,offsetInBytes:27*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}),E.uv9=B.length,B.push({index:E.uv9,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,normalize:!0,offsetInBytes:28*Float32Array.BYTES_PER_ELEMENT,strideInBytes:L,instanceDivisor:1}))}else{var T=C*y;n.instanceBounds=new Float32Array(T);for(var D=0;D<T;D++)n.instanceBounds[D]=t.getFloat32(A+a+D*Float32Array.BYTES_PER_ELEMENT,!0)}A+=l}}return{bytesOffset:A}}var Gt=new B.o(40680631590769,40680631590769,40408299984661.445),Ut=new B.o,xt=new B.o;function Kt(t,e,r,n){var A=Math.cos(e);Ut.x=A*Math.cos(t),Ut.y=A*Math.sin(t),Ut.z=Math.sin(e),Ut=B.o.normalize(Ut,Ut),B.o.multiplyComponents(Gt,Ut,xt);var o=Math.sqrt(B.o.dot(Ut,xt));return xt=B.o.divideByScalar(xt,o,xt),Ut=B.o.multiplyByScalar(Ut,r,Ut),a.e(n)||(n=new B.o),B.o.add(xt,Ut,n)}var Ht=new B.o,wt=new i.a,Vt=new n.p,Yt=new n.p;function Jt(t,e,r,A,C,y,l,u){var P=A,c=e.getUint32(P+r,!0);if(C.verticesCount=c,P+=Uint32Array.BYTES_PER_ELEMENT,c<=0)return{bytesOffset:P};var f=e.getUint16(P+r,!0);P+=Uint16Array.BYTES_PER_ELEMENT;var p=e.getUint16(P+r,!0);p=f*Float32Array.BYTES_PER_ELEMENT,P+=Uint16Array.BYTES_PER_ELEMENT;var d=c*f*Float32Array.BYTES_PER_ELEMENT,L=t.subarray(P,P+d);P+=d;var T=C.vertexAttributes,D=C.attrLocation,g=void 0,F=void 0;if(l){g=new i.a,F=new i.a;var I=new Float32Array(2*c),M=new Float64Array(2*c);if(a.e(u)){var m=new Float32Array(L.byteLength/4),v=new Float32Array(L.buffer,L.byteOffset,L.byteLength/4);k=3===f?B.o.unpackArray(v):E.e.unpackArray(v);var _=n.p.multiply(u.sphereMatrix,u.geoMatrix,Vt),S=n.p.multiply(u.ellipsoidMatrix,u.geoMatrix,Yt);n.p.inverse(S,S);for(var O=new o.t(6378137,6378137,6378137),N=0,h=0,R=k.length;h<R;h++){var b=k[h];n.p.multiplyByPoint(_,b,Ht);var G=Kt((W=O.cartesianToCartographic(Ht,wt)).longitude,W.latitude,W.height,Ht);n.p.multiplyByPoint(S,G,b),3===f?(B.o.pack(b,m,N),N+=3):(E.e.pack(b,m,N),N+=4),M[2*h]=W.longitude,M[2*h+1]=W.latitude,0===h?(g.longitude=W.longitude,g.latitude=W.latitude,F.longitude=W.longitude,F.latitude=W.latitude):(g.longitude=Math.max(W.longitude,g.longitude),g.latitude=Math.max(W.latitude,g.latitude),F.longitude=Math.min(W.longitude,F.longitude),F.latitude=Math.min(W.latitude,F.latitude))}L=m}else{var U=new B.o,x=new B.o,K=new Float32Array(L.buffer,L.byteOffset,L.byteLength/4),H=new i.a;O=$t?new o.t(6378137,6378137,6356752.314245179):new o.t(6378137,6378137,6378137);for(var w=0;w<c;w++)n.p.multiplyByPoint(y,B.o.fromElements(K[3*w],K[3*w+1],K[3*w+2],U),x),H=O.cartesianToCartographic(x,wt),M[2*w]=H.longitude,M[2*w+1]=H.latitude,0===w?(g.longitude=H.longitude,g.latitude=H.latitude,F.longitude=H.longitude,F.latitude=H.latitude):(g.longitude=Math.max(H.longitude,g.longitude),g.latitude=Math.max(H.latitude,g.latitude),F.longitude=Math.min(H.longitude,F.longitude),F.latitude=Math.min(H.latitude,F.latitude))}for(w=0;w<c;w++)I[2*w]=M[2*w]-F.longitude,I[2*w+1]=M[2*w+1]-F.latitude;D.aPosition=T.length,T.push({index:D.aPosition,typedArray:L,componentsPerAttribute:f,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:p,normalize:!1}),D.img=T.length,T.push({index:D.img,typedArray:I,componentsPerAttribute:2,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1})}else{if(3===f&&a.e(y)){x=new B.o,K=new Float32Array(L.buffer,L.byteOffset,L.byteLength/4);for(var V=new Float32Array(L.byteLength/4+c),Y=K.length,J=(w=0,0);w<Y;w+=3,J+=4)V[J]=K[w],V[J+1]=K[w+1],V[J+2]=K[w+2],n.p.multiplyByPoint(y,B.o.fromElements(V[J],V[J+1],V[J+2],U),x),V[J+3]=i.a.fromCartesian(x).height;L=V,p=(f=4)*Float32Array.BYTES_PER_ELEMENT}if(a.e(u)){var k;m=new Float32Array(L.byteLength/4),v=new Float32Array(L.buffer,L.byteOffset,L.byteLength/4);k=3===f?B.o.unpackArray(v):E.e.unpackArray(v);_=n.p.multiply(u.sphereMatrix,u.geoMatrix,Vt),S=n.p.multiply(u.ellipsoidMatrix,u.geoMatrix,Yt);n.p.inverse(S,S);for(O=new o.t(6378137,6378137,6378137),N=0,h=0,R=k.length;h<R;h++){b=k[h];n.p.multiplyByPoint(_,b,Ht);var W;G=Kt((W=O.cartesianToCartographic(Ht,wt)).longitude,W.latitude,W.height,Ht);n.p.multiplyByPoint(S,G,b),3===f?(B.o.pack(b,m,N),N+=3):(E.e.pack(b,m,N),N+=4)}L=m}D.aPosition=T.length,T.push({index:D.aPosition,typedArray:L,componentsPerAttribute:f,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:p,normalize:!1})}return{bytesOffset:P,cartographicBounds:{max:g,min:F}}}function kt(t,e,r,a,n){var A=a,o=e.getUint32(A+r,!0);if(A+=Uint32Array.BYTES_PER_ELEMENT,o<=0)return{bytesOffset:A};var B=e.getUint16(A+r,!0);A+=Uint16Array.BYTES_PER_ELEMENT;var E=e.getUint16(A+r,!0);A+=Uint16Array.BYTES_PER_ELEMENT;var i=o*B*Float32Array.BYTES_PER_ELEMENT,C=t.subarray(A,A+i);if(A+=i,!n.ignoreNormal){var y=n.vertexAttributes,l=n.attrLocation;l.aNormal=y.length,y.push({index:l.aNormal,typedArray:C,componentsPerAttribute:B,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:E,normalize:!1})}return{bytesOffset:A}}var Wt={0:Uint32Array.BYTES_PER_ELEMENT,1:Float32Array.BYTES_PER_ELEMENT,2:Float64Array.BYTES_PER_ELEMENT};function Zt(t,e,r,a,n){var A,o=a,B=e.getUint32(o+r,!0);if(o+=Uint32Array.BYTES_PER_ELEMENT,n.verticesCount,B>0){e.getUint16(o+r,!0),o+=Uint16Array.BYTES_PER_ELEMENT,o+=2*Uint8Array.BYTES_PER_ELEMENT;var E=B*Uint8Array.BYTES_PER_ELEMENT*4;A=t.subarray(o,o+E),o+=E;var i=n.vertexAttributes,C=n.attrLocation;C.aColor=i.length,i.push({index:C.aColor,typedArray:A,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:4,normalize:!0})}return{bytesOffset:o}}function Xt(t,e,r,a,n){var A=a,o=e.getUint32(A+r,!0);return A+=Uint32Array.BYTES_PER_ELEMENT,o<=0?{bytesOffset:A}:(e.getUint16(A+r,!0),A+=Uint16Array.BYTES_PER_ELEMENT,A+=2*Uint8Array.BYTES_PER_ELEMENT,{bytesOffset:A+=o*Uint8Array.BYTES_PER_ELEMENT*4})}function zt(t,e,r,a,n){var A=n,o=[],B=r.getUint32(A+a,!0);A+=Uint32Array.BYTES_PER_ELEMENT;for(var E=0;E<B;E++){var i={};3===t&&(r.getUint32(A+a,!0),A+=Uint32Array.BYTES_PER_ELEMENT);var C=r.getUint32(A+a,!0);A+=Uint32Array.BYTES_PER_ELEMENT;var s=r.getUint8(A+a,!0);A+=Uint8Array.BYTES_PER_ELEMENT,r.getUint8(A+a,!0),A+=Uint8Array.BYTES_PER_ELEMENT;var y=r.getUint8(A+a,!0);if(A+=Uint8Array.BYTES_PER_ELEMENT,A+=Uint8Array.BYTES_PER_ELEMENT,C>0){var l=0,u=null;1===s||3===s?(l=C*Uint32Array.BYTES_PER_ELEMENT,u=e.subarray(A,A+l)):(l=C*Uint16Array.BYTES_PER_ELEMENT,u=e.subarray(A,A+l),C%2!=0&&(l+=2)),i.indicesTypedArray=u,A+=l}i.indicesCount=C,i.indexType=s,i.primitiveType=y;var P=[],c=r.getUint32(A+a,!0);A+=Uint32Array.BYTES_PER_ELEMENT;for(var f=0;f<c;f++){var p=ht(r,a,e,A),d=p.string;A=p.bytesOffset,P.push(d),i.materialCode=d}if(0===c&&(i.materialCode="OSGBEmpty"),o.push(i),0!==A%4)A+=4-A%4}return{bytesOffset:A,arrIndexPackage:o}}function Qt(t,e,r,A,i,C,y,u,P){var c,f,p=A,d=e.getUint32(p+r,!0);return i.nCompressOptions=d,p+=Uint32Array.BYTES_PER_ELEMENT,(d&l.VertexCompressOption.SVC_Vertex)==l.VertexCompressOption.SVC_Vertex?(c=function(t,e,r,A,i,C){var y=A,l=e.getUint32(y+r,!0);if(i.verticesCount=l,y+=Uint32Array.BYTES_PER_ELEMENT,l<=0)return{bytesOffset:y};var u=e.getUint16(y+r,!0);y+=Uint16Array.BYTES_PER_ELEMENT;var P=e.getUint16(y+r,!0);P=u*Int16Array.BYTES_PER_ELEMENT,y+=Uint16Array.BYTES_PER_ELEMENT;var c=e.getFloat32(y+r,!0);y+=Float32Array.BYTES_PER_ELEMENT;var f=new E.e;f.x=e.getFloat32(y+r,!0),y+=Float32Array.BYTES_PER_ELEMENT,f.y=e.getFloat32(y+r,!0),y+=Float32Array.BYTES_PER_ELEMENT,f.z=e.getFloat32(y+r,!0),y+=Float32Array.BYTES_PER_ELEMENT,f.w=e.getFloat32(y+r,!0),y+=Float32Array.BYTES_PER_ELEMENT,i.vertCompressConstant=c,i.minVerticesValue=f;var p=l*u*Int16Array.BYTES_PER_ELEMENT,d=t.subarray(y,y+p);if(y+=p,a.e(C)){var L=new Uint16Array(d.byteLength/2),T=new Uint16Array(d.buffer,d.byteOffset,d.byteLength/2),D=E.e.unpackArray(T);for(let t=0,e=D.length;t<e;t++){let e=D[t];B.o.multiplyByScalar(e,c,e),B.o.add(e,f,e)}var g=n.p.multiply(C.sphereMatrix,C.geoMatrix,Vt),F=n.p.multiply(C.ellipsoidMatrix,C.geoMatrix,Yt);n.p.inverse(F,F);var I=new o.t(6378137,6378137,6378137),M=0;for(let t=0,e=D.length;t<e;t++){let e=D[t];n.p.multiplyByPoint(g,e,Ht);let r=I.cartesianToCartographic(Ht,wt),a=Kt(r.longitude,r.latitude,r.height,Ht);n.p.multiplyByPoint(F,a,e),B.o.subtract(e,f,e),B.o.divideByScalar(e,c,e),E.e.pack(e,L,M),M+=4}d=L}var m=i.vertexAttributes,v=i.attrLocation;return v.aPosition=m.length,m.push({index:v.aPosition,typedArray:d,componentsPerAttribute:u,componentDatatype:s.ComponentDatatype.SHORT,offsetInBytes:0,strideInBytes:P,normalize:!1}),{bytesOffset:y}}(t,e,r,p,i,P),p=c.bytesOffset):(p=(c=Jt(t,e,r,p,i,y,u,P)).bytesOffset,f=c.cartographicBounds),(d&l.VertexCompressOption.SVC_Normal)==l.VertexCompressOption.SVC_Normal?(c=function(t,e,r,a,n){var A=a,o=e.getUint32(A+r,!0);if(A+=Uint32Array.BYTES_PER_ELEMENT,o<=0)return{bytesOffset:A};e.getUint16(A+r,!0),A+=Uint16Array.BYTES_PER_ELEMENT;var B=e.getUint16(A+r,!0);A+=Uint16Array.BYTES_PER_ELEMENT;var E=2*o*Int16Array.BYTES_PER_ELEMENT,i=t.subarray(A,A+E);if(A+=E,!n.ignoreNormal){var C=n.vertexAttributes,y=n.attrLocation;y.aNormal=C.length,C.push({index:y.aNormal,typedArray:i,componentsPerAttribute:2,componentDatatype:s.ComponentDatatype.SHORT,offsetInBytes:0,strideInBytes:B,normalize:!1})}return{bytesOffset:A}}(t,e,r,p,i),p=c.bytesOffset):p=(c=kt(t,e,r,p,i)).bytesOffset,p=(c=Xt(0,e,r,p=(c=Zt(t,e,r,p,i)).bytesOffset)).bytesOffset,(d&l.VertexCompressOption.SVC_TexutreCoord)==l.VertexCompressOption.SVC_TexutreCoord?(c=function(t,e,r,a,n){n.texCoordCompressConstant=[],n.minTexCoordValue=[];var A=r,o=t.getUint16(r+a,!0);A+=Uint16Array.BYTES_PER_ELEMENT,A+=Uint16Array.BYTES_PER_ELEMENT;for(var B=0,i=0;i<o;i++){var C=t.getUint8(A+a,!0);A+=Uint8Array.BYTES_PER_ELEMENT,A+=3*Uint8Array.BYTES_PER_ELEMENT;var y=t.getUint32(A+a,!0);A+=Uint32Array.BYTES_PER_ELEMENT;var l=t.getUint16(A+a,!0);A+=Uint16Array.BYTES_PER_ELEMENT,t.getUint16(A+a,!0),A+=Uint16Array.BYTES_PER_ELEMENT;var u=t.getFloat32(A+a,!0);A+=Float32Array.BYTES_PER_ELEMENT,n.texCoordCompressConstant.push(u);var P=new E.e;P.x=t.getFloat32(A+a,!0),A+=Float32Array.BYTES_PER_ELEMENT,P.y=t.getFloat32(A+a,!0),A+=Float32Array.BYTES_PER_ELEMENT,P.z=t.getFloat32(A+a,!0),A+=Float32Array.BYTES_PER_ELEMENT,P.w=t.getFloat32(A+a,!0),A+=Float32Array.BYTES_PER_ELEMENT,n.minTexCoordValue.push(P);var c=y*l*Int16Array.BYTES_PER_ELEMENT,f=e.subarray(A,A+c),p=(A+=c)%4;0!==p&&(A+=4-p);var d="aTexCoord"+B,L=n.vertexAttributes,T=n.attrLocation;if(T[d]=L.length,L.push({index:T[d],typedArray:f,componentsPerAttribute:l,componentDatatype:s.ComponentDatatype.SHORT,offsetInBytes:0,strideInBytes:l*Int16Array.BYTES_PER_ELEMENT,normalize:!1}),C){c=y*Float32Array.BYTES_PER_ELEMENT;var D=e.subarray(A,A+c);A+=c,n.texCoordZMatrix=!0,T[d="aTexCoordZ"+B]=L.length,L.push({index:T[d],typedArray:D,componentsPerAttribute:1,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:Float32Array.BYTES_PER_ELEMENT,normalize:!1})}B++}return{bytesOffset:A}}(e,t,p,r,i),p=c.bytesOffset):p=(c=Rt(e,t,p,r,i,C)).bytesOffset,(d&l.VertexCompressOption.SVC_TexutreCoordIsW)==l.VertexCompressOption.SVC_TexutreCoordIsW&&(i.textureCoordIsW=!0),{bytesOffset:p=(c=bt(e,t,p,r,i)).bytesOffset,cartographicBounds:f}}function jt(t,e,r,n,A,o,B,E,i,C){3===t&&(r.getUint32(A,!0),A+=Uint32Array.BYTES_PER_ELEMENT,a.e(i)&&i||(E=void 0));var y,l=A;l=(y=Jt(e,r,n,l,o,E,i,C)).bytesOffset;var u=y.cartographicBounds;if(l=(y=Zt(e,r,n,l=(y=kt(e,r,n,l,o)).bytesOffset,o)).bytesOffset,3!==t&&(l=(y=Xt(0,r,n,l)).bytesOffset),l=(y=bt(r,e,l=(y=Rt(r,e,l,n,o,B)).bytesOffset,n,o)).bytesOffset,3===t&&(y=function(t,e,r,a,n){var A=a,o=e.getUint32(A+r,!0);A+=Uint32Array.BYTES_PER_ELEMENT;for(var B=0;B<o;B++){var E=e.getUint32(A+r,!0);A+=Uint32Array.BYTES_PER_ELEMENT;var i=e.getUint16(A+r,!0);A+=Uint16Array.BYTES_PER_ELEMENT;var C=e.getUint16(A+r,!0);A+=Uint16Array.BYTES_PER_ELEMENT;var y=E*i*Wt[C],l=t.subarray(A,A+y);A+=y;var u=n.vertexAttributes,P=n.attrLocation,c="aCustom"+B;P[c]=u.length,u.push({index:P[c],typedArray:l,componentsPerAttribute:i,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1})}return{bytesOffset:A}}(e,r,n,l,o),l=y.bytesOffset),3==t){var P=ht(r,n,e,l);l=P.bytesOffset,o.customVertexAttribute=JSON.parse(P.string);var c="aCustom"+o.customVertexAttribute.TextureCoordMatrix,f="aCustom"+o.customVertexAttribute.VertexWeight,p="aCustom"+o.customVertexAttribute.VertexWeight_1;a.e(o.attrLocation[c])&&(o.attrLocation.aTextureCoordMatrix=o.attrLocation[c],delete o.attrLocation[c]),a.e(o.attrLocation[f])&&(o.attrLocation.aVertexWeight=o.attrLocation[f],delete o.attrLocation[f]),a.e(o.attrLocation[p])&&(o.attrLocation.aVertexWeight_1=o.attrLocation[p],delete o.attrLocation[p]);for(var d=Object.keys(o.attrLocation),L=d.length,T=0;T<L;++T){var D=d[T];-1!==D.indexOf("aCustom")&&delete o.attrLocation[D]}var g=(l+n)%4;g&&(g=4-g),l+=g}return 3===t&&(y=function(t,e,r,a,n){var A=a,o=e.getUint32(A+r,!0);if(A+=Uint32Array.BYTES_PER_ELEMENT,o<=0)return{bytesOffset:A};var B=e.getUint16(A+r,!0);return A+=Uint16Array.BYTES_PER_ELEMENT,e.getUint16(A+r,!0),A+=Uint16Array.BYTES_PER_ELEMENT,{bytesOffset:A+=o*B*Float32Array.BYTES_PER_ELEMENT}}(0,r,n,l),l=y.bytesOffset),{bytesOffset:l,cartographicBounds:u}}function qt(t){return 0!==t.length&&"ClampGroundAndObjectLinePass"===t[0].materialCode}var $t,te=1,ee=4,re=8,ae=16,ne=32,Ae=64,oe=128,Be=512,Ee=1024;function ie(t,e,r,A,i,C,y,u,P,c,f,p,d){var L=t,T=0,D=e.getUint32(T+r,!0);T+=Uint32Array.BYTES_PER_ELEMENT,c=a.u(c,a.u.EMPTY_OBJECT);for(var g=void 0,F=0;F<D;F++){3===u&&(e.getUint32(T+r,!0),T+=Uint32Array.BYTES_PER_ELEMENT);var I=(Rt=ht(e,r,L,T)).string;if(a.e(P)){var m=a.u(c[I],n.p.IDENTITY);g=new n.p,n.p.multiply(P,m,g)}a.e(d)&&(d.geoMatrix=a.u(c[I],n.p.IDENTITY));var v=(T=Rt.bytesOffset)%4;0!==v&&(T+=4-v);var _=pt;if(_=e.getUint32(T+r,!0),T+=Int32Array.BYTES_PER_ELEMENT,(Pe={vertexAttributes:[],attrLocation:{},instanceCount:0,instanceMode:0,instanceIndex:-1}).ignoreNormal=A.ignoreNormal,3===u)switch(_){case Dt:_=dt;break;case gt:_=Tt;break;case Ft:_=Lt}if(_===Tt){3===u&&(e.getInt32(T+r,!0),T+=Int32Array.BYTES_PER_ELEMENT),u>=2&&(e.getInt32(T+r,!0),T+=Int32Array.BYTES_PER_ELEMENT);var S,O={};O.posUniqueID=e.getInt32(T+r,!0),T+=Int32Array.BYTES_PER_ELEMENT,O.normalUniqueID=e.getInt32(T+r,!0),T+=Int32Array.BYTES_PER_ELEMENT,O.colorUniqueID=e.getInt32(T+r,!0),T+=Int32Array.BYTES_PER_ELEMENT,O.secondColorUniqueID=e.getInt32(T+r,!0),T+=Int32Array.BYTES_PER_ELEMENT,3===u?(S=e.getUint32(T+r,!0),T+=Int32Array.BYTES_PER_ELEMENT):(S=e.getUint16(T+r,!0),T+=Int16Array.BYTES_PER_ELEMENT);for(var N=[],h=0;h<S;h++){var R=e.getInt32(T+r,!0);N.push(R),T+=Int32Array.BYTES_PER_ELEMENT}O.texCoordUniqueIDs=N;var G=[];if(3===u){var U=e.getUint32(T+r,!0);T+=Int32Array.BYTES_PER_ELEMENT;for(var x=0;x<U;x++){var K=e.getInt32(T+r,!0);T+=Int32Array.BYTES_PER_ELEMENT,G.push(K)}}O.vertexAttrUniqueIDs=G;var H=e.getInt32(T+r,!0);T+=Int32Array.BYTES_PER_ELEMENT;var w=[],V={};if(H>0){var Y=(J=ht(e,r,L,T)).string;T=J.bytesOffset,V.materialCode=Y,w.push(V)}3===u&&((xt=(T+r)%4)&&(xt=4-xt),T+=xt);var J,k=new Object,W=e.getUint32(T+r,!0),Z=M(L,T+=Int32Array.BYTES_PER_ELEMENT,T+W);if(H>0?b.dracoDecodeMesh(ct,Z,W,Pe,V,O,g,f,k,d):b.dracoDecodePointCloud(ct,Z,W,Pe,O),a.e(k.min)&&a.e(k.max)||(k=void 0),T+=W,3===u)(xt=(T+r)%4)&&(xt=4-xt),(xt=((T=(J=ht(e,r,L,T+=xt)).bytesOffset)+r)%4)&&(xt=4-xt),T+=xt;A[I]={vertexPackage:Pe,arrIndexPackage:w,cartographicBounds:k}}else if(_==Lt&&3==u){var X=e.getUint32(T+r,!0);T+=Uint32Array.BYTES_PER_ELEMENT;var z=e.getUint32(T+r,!0);T+=Uint32Array.BYTES_PER_ELEMENT,Pe.minVerticesValue=new E.e,Pe.minTexCoordValue=[new o.o,new o.o],Pe.texCoordCompressConstant=[new B.o,new B.o];w=[];for(var Q=0;Q<z;Q++){var j=e.getUint32(T+r,!0);T+=Uint32Array.BYTES_PER_ELEMENT,Pe.vertCompressConstant=e.getFloat32(T+r,!0),T+=Float32Array.BYTES_PER_ELEMENT,Pe.minVerticesValue.x=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,Pe.minVerticesValue.y=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,Pe.minVerticesValue.z=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT;var q=e.getFloat64(T+r,!0);T+=Float64Array.BYTES_PER_ELEMENT;var $=e.getFloat64(T+r,!0);T+=Float64Array.BYTES_PER_ELEMENT;var tt=e.getFloat64(T+r,!0);T+=Float64Array.BYTES_PER_ELEMENT;var et=e.getFloat64(T+r,!0);T+=Float64Array.BYTES_PER_ELEMENT;var rt=e.getFloat64(T+r,!0);T+=Float64Array.BYTES_PER_ELEMENT;var at=e.getFloat64(T+r,!0);T+=Float64Array.BYTES_PER_ELEMENT;var nt=e.getFloat64(T+r,!0);T+=Float64Array.BYTES_PER_ELEMENT;var At=e.getFloat64(T+r,!0);T+=Float64Array.BYTES_PER_ELEMENT,Pe.minTexCoordValue[0].x=tt,Pe.minTexCoordValue[0].y=et,Pe.minTexCoordValue[1].x=nt,Pe.minTexCoordValue[1].y=At,Pe.texCoordCompressConstant[0].x=q,Pe.texCoordCompressConstant[0].y=$,Pe.texCoordCompressConstant[1].x=rt,Pe.texCoordCompressConstant[1].y=at;var ot=e.getInt32(T+r,!0);T+=Int32Array.BYTES_PER_ELEMENT;k=new Object;for(var Bt=0;Bt<ot;Bt++){var it=e.getInt32(T+r,!0);T+=Int32Array.BYTES_PER_ELEMENT;var Ct=it,st=0;Ct!=Be&&Ct!=Ee||(st=e.getInt32(T+r,!0),T+=Int32Array.BYTES_PER_ELEMENT);var yt=e.getInt32(T+r,!0);T+=Int32Array.BYTES_PER_ELEMENT;var lt=new Uint8Array(e.buffer,T+r,yt);(xt=((T+=Uint8Array.BYTES_PER_ELEMENT*yt)+r)%4)&&(xt=4-xt),T+=xt,se(j,Ct,st,lt,Pe,X,d,f,k,g,C)}T=(Ut=ht(e,r,L,T)).bytesOffset,Pe.customVertexAttribute=JSON.parse(Ut.string),(xt=(T+r)%4)&&(xt=4-xt),T+=xt;var ut=e.getInt32(T+r,!0);T+=Int32Array.BYTES_PER_ELEMENT;for(var Pt=0;Pt<ut;Pt++){V={};var ft=e.getInt32(T+r,!0);if(T+=Int32Array.BYTES_PER_ELEMENT,ft>0){var It=e.getInt8(T+r,!0);T+=Int8Array.BYTES_PER_ELEMENT,e.getInt8(T+r,!0),T+=Int8Array.BYTES_PER_ELEMENT;var Mt=e.getInt8(T+r,!0);T+=Int8Array.BYTES_PER_ELEMENT,e.getInt8(T+r,!0),T+=Int8Array.BYTES_PER_ELEMENT;var mt,vt,_t=e.getInt32(T+r,!0);T+=Int32Array.BYTES_PER_ELEMENT,13!==Mt?(mt=new Uint8Array(e.buffer,T+r,_t),T+=Uint8Array.BYTES_PER_ELEMENT*_t):(mt=new Uint32Array(e.buffer,T+r,_t),T+=Uint32Array.BYTES_PER_ELEMENT*_t),(xt=(T+r)%4)&&(xt=4-xt),T+=xt,13!==Mt?(vt=s.ComponentDatatype.createTypedArray(s.ComponentDatatype.UNSIGNED_BYTE,ft*Uint32Array.BYTES_PER_ELEMENT),Et.decodeIndexBuffer(vt,ft,Uint32Array.BYTES_PER_ELEMENT,mt)):vt=mt;var St,Ot=e.getInt32(T+r,!0);T+=Int32Array.BYTES_PER_ELEMENT,V.indexType=It,0===It?St=new Uint16Array(ft):1===It&&(St=new Uint32Array(ft)),V.indicesCount=ft;var Nt=new Uint32Array(vt.buffer,vt.byteOffset,vt.byteLength/4);St.set(Nt,0),V.indicesTypedArray=St,C.push(St.buffer),V.primitiveType=Mt;for(Bt=0;Bt<Ot;Bt++){var Rt;Y=(Rt=ht(e,r,L,T)).string;T=Rt.bytesOffset,V.materialCode=Y}if(w.length>0&&13!==Mt){var bt=Pe.preVertexCount;V.indicesTypedArray=Nt.map((function(t){return t+bt})),V.indexType=1}w.push(V),(xt=(T+r)%4)&&(xt=4-xt),T+=xt}}}Pe.nCompressOptions=X,2===w.length&&13===w[1].primitiveType&&w[1].indicesCount>=3&&(Gt=l._0x30c9ea.createEdgeDataByIndices(Pe,w[1],C)),a.e(k.min)&&a.e(k.max)||(k=void 0),A[I]={vertexPackage:Pe,arrIndexPackage:w,edgeGeometry:Gt,cartographicBounds:k}}else{var Gt;if(_===dt||_===pt)T=(Rt=jt(u,L,e,r,T,Pe,i,g,f,d)).bytesOffset,k=Rt.cartographicBounds;else if(_===Lt&&(T=(Rt=Qt(L,e,r,T,Pe,i,g,f,d)).bytesOffset,k=Rt.cartographicBounds,3==u)){var Ut;T=(Ut=ht(e,r,L,T)).bytesOffset,Pe.customVertexAttribute=JSON.parse(Ut.string);var xt,Kt="aCustom"+Pe.customVertexAttribute.TextureCoordMatrix,Ht="aCustom"+Pe.customVertexAttribute.VertexWeight,wt="aCustom"+Pe.customVertexAttribute.VertexWeight_1;a.e(Pe.attrLocation[Kt])&&(Pe.attrLocation.aTextureCoordMatrix=Pe.attrLocation[Kt],delete Pe.attrLocation[Kt]),a.e(Pe.attrLocation[Ht])&&(Pe.attrLocation.aVertexWeight=Pe.attrLocation[Ht],delete Pe.attrLocation[Ht]),a.e(Pe.attrLocation[wt])&&(Pe.attrLocation.aVertexWeight_1=Pe.attrLocation[wt],delete Pe.attrLocation[wt]);for(var Vt=Object.keys(Pe.attrLocation),Yt=Vt.length,Jt=0;Jt<Yt;++Jt){var kt=Vt[Jt];-1!==kt.indexOf("aCustom")&&delete Pe.attrLocation[kt]}(xt=(T+r)%4)&&(xt=4-xt),T+=xt}qt(w=(Rt=zt(u,L,e,r,T)).arrIndexPackage)&&(Pe.clampRegionEdge=!0),2===w.length&&13===w[1].primitiveType&&w[1].indicesCount>=3&&(Gt=l._0x30c9ea.createEdgeDataByIndices(Pe,w[1],C)),T=Rt.bytesOffset,a.e(k)&&a.e(k.min)&&a.e(k.max)||(k=void 0),A[I]={vertexPackage:Pe,arrIndexPackage:w,edgeGeometry:Gt,cartographicBounds:k}}if(3!==u&&a.e(y)&&y){var Wt=e.getUint16(T+r,!0);if(T+=Uint16Array.BYTES_PER_ELEMENT,1===Wt){var Zt=e.getUint32(T+r,!0);T+=Uint32Array.BYTES_PER_ELEMENT;var Xt,$t=e.getUint32(T+r,!0);T+=Uint32Array.BYTES_PER_ELEMENT,e.getFloat32(T+r,!0),T+=Float32Array.BYTES_PER_ELEMENT;var te=new Array(Zt),ee=new Array(Zt),re=new Array(Zt),ae=new Array(Zt);for(Xt=0;Xt<Zt;Xt++){var ne=e.getFloat32(T+r,!0);T+=Float32Array.BYTES_PER_ELEMENT,te[Xt]=ne;var Ae=e.getUint16(T+r,!0);T+=Uint16Array.BYTES_PER_ELEMENT,ee[Xt]=Ae;var oe=e.getUint16(T+r,!0);T+=Uint16Array.BYTES_PER_ELEMENT,re[Xt]=oe;for(var ie=oe*$t,Ce=new Array(ie),ye=0;ye<ie;ye++){Kt=e.getFloat32(T+r,!0);T+=Float32Array.BYTES_PER_ELEMENT,Ce[ye]=Kt}ae[Xt]=Ce}}var le=new B.o,ue=new B.o;le.x=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,le.y=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,le.z=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,ue.x=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,ue.y=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,ue.z=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,A[I].min=le,A[I].max=ue;var Pe=A[I].vertexPackage;a.e(Pe.instanceBuffer)&&2===u&&(Pe.instanceBounds=new Float32Array(6),B.o.pack(le,Pe.instanceBounds,0),B.o.pack(ue,Pe.instanceBounds,3))}if(3===u){var ce=new B.o;ce.x=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,ce.y=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,ce.z=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT;var fe=new B.o;fe.x=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,fe.y=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,fe.z=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT;var pe=new B.o;pe.x=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,pe.y=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,pe.z=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT;var de=new B.o;de.x=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,de.y=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT,de.z=e.getFloat64(T+r,!0),T+=Float64Array.BYTES_PER_ELEMENT}}}function Ce(t,e,r){var a=t.typedArray,n=new r(a.length+e.length);n.set(a,0),n.set(e,a.length),t.typedArray=n}function se(t,e,r,A,C,y,l,u,P,c,f){var p,d=0,L=C.vertexAttributes,T=C.attrLocation;switch(e){case ee:case re:case ae:case ne:d=2*Uint16Array.BYTES_PER_ELEMENT,0!=(16&y)||e!==ae&&e!==ne||(d=2*Float32Array.BYTES_PER_ELEMENT),p=s.ComponentDatatype.createTypedArray(s.ComponentDatatype.UNSIGNED_BYTE,t*d);break;case Ae:case oe:d=4*Uint8Array.BYTES_PER_ELEMENT,p=s.ComponentDatatype.createTypedArray(s.ComponentDatatype.UNSIGNED_BYTE,4*t);break;case Be:case Ee:d=Float32Array.BYTES_PER_ELEMENT*r,p=s.ComponentDatatype.createTypedArray(s.ComponentDatatype.UNSIGNED_BYTE,t*r*4);break;default:d=4*Uint16Array.BYTES_PER_ELEMENT,p=s.ComponentDatatype.createTypedArray(s.ComponentDatatype.UNSIGNED_BYTE,t*d)}switch(Et.decodeVertexBuffer(p,t,d,A,A.length),f.push(p.buffer),e){case te:var D=new Uint16Array(p.buffer,0,p.length/2),g=s.ComponentDatatype.SHORT;if(a.e(l)){var F=E.e.unpackArray(D);for(let t=0,e=F.length;t<e;t++){let e=F[t];B.o.multiplyByScalar(e,C.vertCompressConstant,e),B.o.add(e,C.minVerticesValue,e)}var I=n.p.multiply(l.sphereMatrix,l.geoMatrix,Vt),M=n.p.multiply(l.ellipsoidMatrix,l.geoMatrix,Yt);n.p.inverse(M,M);var m=new o.t(6378137,6378137,6378137),v=0;for(let t=0,e=F.length;t<e;t++){let e=F[t];n.p.multiplyByPoint(I,e,Ht);let r=m.cartesianToCartographic(Ht,wt),a=Kt(r.longitude,r.latitude,r.height,Ht);n.p.multiplyByPoint(M,a,e),B.o.subtract(e,C.minVerticesValue,e),B.o.divideByScalar(e,C.vertCompressConstant,e),E.e.pack(e,D,v),v+=4}}if(void 0!==(U=T.aPosition)?(Ce(L[U],D,Uint16Array),C.preVertexCount=C.verticesCount,C.verticesCount+=t):(T.aPosition=L.length,L.push({index:T.aPosition,typedArray:D,componentsPerAttribute:4,componentDatatype:g,offsetInBytes:0,strideInBytes:0,normalize:!1}),C.verticesCount=t),!a.e(l)&&u){var _=new i.a,S=new i.a,O=new Float32Array(2*t),N=new Float64Array(2*t),h=new B.o,R=new B.o,b=new i.a;m=$t?new o.t(6378137,6378137,6356752.314245179):new o.t(6378137,6378137,6378137);for(var G=0;G<t;G++)n.p.multiplyByPoint(c,B.o.fromElements(D[4*G]*C.vertCompressConstant+C.minVerticesValue.x,D[4*G+1]*C.vertCompressConstant+C.minVerticesValue.y,D[4*G+2]*C.vertCompressConstant+C.minVerticesValue.z,h),R),b=m.cartesianToCartographic(R,wt),N[2*G]=b.longitude,N[2*G+1]=b.latitude,0===G?(_.longitude=b.longitude,_.latitude=b.latitude,S.longitude=b.longitude,S.latitude=b.latitude):(_.longitude=Math.max(b.longitude,_.longitude),_.latitude=Math.max(b.latitude,_.latitude),S.longitude=Math.min(b.longitude,S.longitude),S.latitude=Math.min(b.latitude,S.latitude));for(G=0;G<t;G++)O[2*G]=N[2*G]-S.longitude,O[2*G+1]=N[2*G+1]-S.latitude;T.img=L.length,L.push({index:T.img,typedArray:O,componentsPerAttribute:2,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),P.max=_,P.min=S}break;case ee:var U=T.aNormal,x=new Int16Array(p.buffer,0,p.length/2);void 0!==U?Ce(L[U],x,Uint16Array):(T.aNormal=L.length,L.push({index:T.aNormal,typedArray:x,componentsPerAttribute:2,componentDatatype:s.ComponentDatatype.SHORT,offsetInBytes:0,strideInBytes:0,normalize:!1}));break;case ae:var K=new Uint16Array(p.buffer,0,p.length/2),H=(U=T.aTexCoord0,g=s.ComponentDatatype.SHORT,Uint16Array);0==(16&y)&&(g=s.ComponentDatatype.FLOAT,H=Float32Array,K=new Float32Array(p.buffer,0,p.length/4)),void 0!==U?Ce(L[U],K,H):(T.aTexCoord0=L.length,L.push({index:T.aTexCoord0,typedArray:K,componentsPerAttribute:2,componentDatatype:g,offsetInBytes:0,strideInBytes:0,normalize:!1}));break;case ne:K=new Uint16Array(p.buffer,0,p.length/2),U=T.aTexCoord1,g=s.ComponentDatatype.SHORT,H=Uint16Array;0==(16&y)&&(g=s.ComponentDatatype.FLOAT,H=Float32Array,K=new Float32Array(p.buffer,0,p.length/4)),void 0!==U?Ce(L[U],K,H):(T.aTexCoord1=L.length,L.push({index:T.aTexCoord1,typedArray:K,componentsPerAttribute:2,componentDatatype:g,offsetInBytes:0,strideInBytes:0,normalize:!1}));break;case Ae:void 0!==(U=T.aColor)?Ce(L[U],p,Uint8Array):(T.aColor=L.length,L.push({index:T.aColor,typedArray:p,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:0,normalize:!0}));break;case oe:void 0!==(U=T.aSecondColor)?Ce(L[U],p,Uint8Array):(T.aSecondColor=L.length,L.push({index:T.aSecondColor,typedArray:p,componentsPerAttribute:4,componentDatatype:s.ComponentDatatype.BYTE,offsetInBytes:0,strideInBytes:0,normalize:!1}));break;case Be:K=new Float32Array(p.buffer,0,p.length/4);void 0!==(U=T.aVertexWeight)?Ce(L[U],K,Float32Array):(T.aVertexWeight=L.length,L.push({index:T.aVertexWeight,typedArray:K,componentsPerAttribute:r,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}));break;case Ee:var w=new Float32Array(p.buffer,0,p.length/4);void 0!==(U=T.aTextureCoordMatrix)?Ce(L[U],w,Float32Array):(T.aTextureCoordMatrix=L.length,L.push({index:T.aTextureCoordMatrix,typedArray:w,componentsPerAttribute:r,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}))}}function ye(t,e,r,A,o){var B={},E=[],i=new n.p,C=t;o=a.u(o,{});for(var s=0;s<16;s++)i[s]=e.getFloat64(r+A,!0),r+=Float64Array.BYTES_PER_ELEMENT;B.matrix=i,B.skeletonNames=E;var y=e.getUint32(r+A,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(var l=0;l<y;l++){var u=ht(e,A,C,r),P=u.string;r=u.bytesOffset,E.push(P),o[P]=i}return{byteOffset:r,geode:B}}function le(t){var e=t.indexOf("Geometry");if(-1===e)return t;var r=t.substring(e,t.length);return t.replace(r,"")}function ue(t,e,r,E,i,C,s){var y={},l=r.getFloat32(E+i,!0);E+=Float32Array.BYTES_PER_ELEMENT;var u=r.getUint16(E+i,!0);E+=Uint16Array.BYTES_PER_ELEMENT,y.rangeMode=u,y.rangeList=l;var P=new B.o;P.x=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT,P.y=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT,P.z=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT;var c=r.getFloat64(E+i,!0);if(E+=Float64Array.BYTES_PER_ELEMENT,a.e(s)){var f=n.p.clone(s.sphereMatrix,Vt),p=n.p.clone(s.ellipsoidMatrix,Yt);n.p.inverse(p,p);var d=new o.t(6378137,6378137,6378137);n.p.multiplyByPoint(f,P,Ht);let t=d.cartesianToCartographic(Ht,wt),e=Kt(t.longitude,t.latitude,t.height,Ht);n.p.multiplyByPoint(p,e,P)}if(y.boundingSphere=new A.i(P,c),3===t){var L=new B.o;L.x=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT,L.y=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT,L.z=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT;var T=new B.o;T.x=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT,T.y=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT,T.z=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT;var D=new B.o;D.x=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT,D.y=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT,D.z=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT;var g=new B.o;g.x=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT,g.y=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT,g.z=r.getFloat64(E+i,!0),E+=Float64Array.BYTES_PER_ELEMENT,0==T.x&&0==T.y&&0==T.z&&(T.x=1),0==D.x&&0==D.y&&0==D.z&&(D.y=1),0==g.x&&0==g.y&&0==g.z&&(g.z=1),y._obb={xExtent:T,yExtent:D,zExtent:g,obbCenter:L}}var F=e,I=(v=ht(r,i,F,E)).string;E=v.bytesOffset,I=le(I=(I=I.replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)/gi,"")).replace(/\\/gi,"/")),y.childTile=I,y.geodes=[];var M=r.getUint32(E+i,!0);E+=Uint32Array.BYTES_PER_ELEMENT;for(var m=0;m<M;m++){var v;E=(v=ye(e,r,E,i,C)).byteOffset,y.geodes.push(v.geode)}return 3===t&&(E=(v=ht(r,i,F,E)).bytesOffset),{pageLOD:y,bytesOffset:E}}function Pe(t,e,r,a,n,A){var o=0,B={},E=[],i=r.getUint32(o+a,!0);o+=Uint32Array.BYTES_PER_ELEMENT;for(var C=0;C<i;C++){var s=ue(t,e,r,o,a,n,A);o=s.bytesOffset,E.push(s.pageLOD)}return B.pageLods=E,B}function ce(t,r){var a=t.vertexAttributes,n=t.attrLocation,A=a.length;n.aTextureBatchId=A;var o,B=t.verticesCount,E=Object.keys(r).length;if(1==E)o=r[0];else if(E>1)for(var i in o=new Float32Array(B*E),e.d(o,-1),r)for(var C=r[i],y=parseInt(i),l=0;l<B;l++)o[2*l+y]=C[l];a.push({index:A,typedArray:o,componentsPerAttribute:E,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:0})}function fe(t,r,n,A){for(var o=n.length,B=0;B<o;B++)for(var E=n[B],i=E.subName.split("_")[0],C=E.subVertexOffsetArr,s=0;s<C.length;s++){var y=C[s],l=y.geoName,u=y.offset,P=y.count,c=y.texUnitIndex,f=r[l].vertexPackage.verticesCount,p=A[l];a.e(p)||(p=A[l]={});var d=p[c];a.e(d)||(d=p[c]=new Float32Array(f),e.d(d,-1));var L=a.e(t)?t[i]:B;e.d(d,L,u,u+P)}}function pe(t,e,r){var a=t.vertexAttributes,n=t.attrLocation,A=a.length;n[1===r?"instanceId":"batchId"]=A,a.push({index:A,typedArray:e,componentsPerAttribute:1,componentDatatype:s.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:0,instanceDivisor:r})}function de(t,r,n,A,o,B){var E=0,i=t,C=r.getUint32(E+n,!0);E+=Uint32Array.BYTES_PER_ELEMENT;for(var s=0;s<C;s++){var y=ht(r,n,i,E),u=y.string;E=y.bytesOffset;var P=r.getUint32(E+n,!0);E+=Uint32Array.BYTES_PER_ELEMENT;var c={};A[u].pickInfo=c;var f=A[u].edgeGeometry;if(-1==A[u].vertexPackage.instanceIndex){var p=new Float32Array(A[u].vertexPackage.verticesCount);B.push(p.buffer);for(var d=0;d<P;d++){var L=r.getUint32(E+n,!0);E+=Uint32Array.BYTES_PER_ELEMENT;var T=r.getUint32(E+n,!0);E+=Uint32Array.BYTES_PER_ELEMENT;var D=0,g=0;c[L]={batchId:d};for(var F=0;F<T;F++)g=r.getUint32(E+n,!0),E+=Uint32Array.BYTES_PER_ELEMENT,D=r.getUint32(E+n,!0),E+=Uint32Array.BYTES_PER_ELEMENT,e.d(p,d,g,g+D);c[L].vertexColorOffset=g,c[L].vertexCount=D}pe(A[u].vertexPackage,p,void 0)}else{var I=A[u].vertexPackage.instanceCount;A[u].vertexPackage.instanceBuffer,A[u].vertexPackage.instanceMode;var M=new Float32Array(I);B.push(M.buffer);var m=0;for(d=0;d<P;d++){var v=r.getUint32(E+n,!0);E+=Uint32Array.BYTES_PER_ELEMENT;T=r.getUint32(E+n,!0);E+=Uint32Array.BYTES_PER_ELEMENT;for(F=0;F<T;F++){var _=r.getUint32(E+n,!0);if(E+=Uint32Array.BYTES_PER_ELEMENT,M[m]=m,void 0===c[v]&&(c[v]={vertexColorCount:1,instanceIds:[],vertexColorOffset:m}),c[v].instanceIds.push(_),m++,3===o){D=r.getUint32(E+n,!0);E+=Uint32Array.BYTES_PER_ELEMENT}}}pe(A[u].vertexPackage,M,1)}f=A[u].edgeGeometry;if(a.e(f)){var S,O,N=f.regular.instancesData,h=l._0x30c9ea.RegularInstanceStride;if(a.e(N))for(O=N.length,S=0;S<O;S+=h){var R=N[S+9];N[S+9]=p[R]}var b=f.silhouette.instancesData;if(h=l._0x30c9ea.SilhouetteInstanceStride,a.e(b))for(O=b.length,S=0;S<O;S+=h){R=b[S+12];b[S+12]=p[R]}}}}function Le(t){return t<1e-10&&t>-1e-10}function Te(t,e,r,n,A,o,B,E){var i=new DataView(t),C=new Uint8Array(t),s=i.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var y=u.a(C,r,s);y=y.replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)/gi,""),r+=s;var l=i.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(var P=0;P<l;P++){var c={},p=i.getFloat32(r,!0);r+=Float32Array.BYTES_PER_ELEMENT;var d=i.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT,c.rangeMode=d,c.rangeList=p;var T={};T.x=i.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,T.y=i.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,T.z=i.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT;var D=i.getFloat64(r,!0);r+=Float64Array.BYTES_PER_ELEMENT,c.boundingSphere={center:T,radius:D},s=i.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var g=u.a(C,r,s);r+=s,g=le(g=g.replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)/gi,"")),c.childTile=g}var F={},I=i.getFloat32(r,!0);r+=Float32Array.BYTES_PER_ELEMENT;I>=3&&(i.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT),i.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var M=i.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var m=new Uint8Array(t,r,M),v=r+M,_=L.pako.inflate(m).buffer;E.push(_),i=new DataView(_);C=new Uint8Array(_);r=0;var S=i.getUint32(r,!0),O=Nt(i,_,r+=Uint32Array.BYTES_PER_ELEMENT),h=O.buffer;r=O.byteOffset;var R=Pe(I,h,i,O.dataViewByteOffset),b=r%4;0!==b&&(r+=4-b),ie((O=Nt(i,_,r)).buffer,i,O.dataViewByteOffset,F,!1,E,void 0,I),r=O.byteOffset,3!==I&&((O=Nt(i,_,r)).buffer,r=O.byteOffset);var G={};!function(t,e,r,n,A,o,B,E,i,C){var s=E,y=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;for(var l={},P=0;P<y;P++){var c=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var p=u.a(o,s-E,c),d=(s+=c)%4;0!==d&&(s+=4-d),B.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT;var L=B.getUint8(s,!0);s+=Uint8Array.BYTES_PER_ELEMENT;var T=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var D=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var g=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var F=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var I,M=B.getUint32(s,!0);if(s+=Uint32Array.BYTES_PER_ELEMENT,n&&L){var m=s-E;I=o.subarray(m,m+F),s+=F}var v=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;for(var _=[],S=0;S<v;S++){c=B.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT;var O=u.a(o,s-E,c);s+=c,_.push(O),r[O]=p}var N=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var h=[];for(S=0;S<N;S++){c=B.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT;var R=u.a(o,s-E,c);s+=c,h.push(R)}var b=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var G=[],U=void 0,x=p;if(n)U=e[p]={};else{var K=r[p];for(x=K;a.e(K)&&K!==p;)x=K,K=r[K];a.e(x)&&(U=e[x])}var H=0;for(S=0;S<b;S++){c=B.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT;var w=u.a(o,s-E,c);if(s+=c,n){var V=w.split("_")[0];a.e(U[V])?H++:U[V]=S-H}var Y=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var J=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var k=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var W=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var Z=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;for(var X=[],z=0;z<Z;z++){c=B.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT;var Q=u.a(o,s-E,c);s+=c;var j=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var q=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var $=B.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT,X.push({geoName:Q,offset:j,count:q,texUnitIndex:$})}G.push({subName:w,offsetX:Y,offsetY:J,width:k,height:W,subVertexOffsetArr:X})}fe(U,t,G,l),a.e(I)&&g===f.S3MPixelFormat.CRN_DXT5&&ut&&(I=Pt({data:I},C).bufferView),i[p]={id:p,rootTextureName:x,width:T,height:D,compressType:g,size:F,format:M,textureData:I,subTexInfos:G,requestNames:h}}for(var Q in l)l.hasOwnProperty(Q)&&ce(t[Q].vertexPackage,l[Q])}(F,n,A,o,0,(O=Nt(i,_,r)).buffer,i,O.dataViewByteOffset,G,E),r=O.byteOffset;var U=i.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var x=C.subarray(r,r+U),K=u.a(x);r+=U;var H=JSON.parse(K);(3===I&&(S=i.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT),(S&ft)==ft)&&(de((O=Nt(i,_,r)).buffer,i,O.dataViewByteOffset,F,I,E),r=O.byteOffset);if(1==I){var w=R.pageLods,V=!0;for(P=0;P<w.length;P++){var Y=w[P];V=""===Y.childTile;for(var J=Y.geodes,k=0;k<J.length;k++)for(var W=J[k].skeletonNames,Z=0;Z<W.length;Z++){var X=W[Z];if(V){var z=F[X].vertexPackage;z.boundingSphere=$.calcBoundingSphereInWorker(1,z)}}}}B[y]={result:!0,groupNode:R,geoPackage:F,matrials:H,texturePackage:G,version:N.S3M4,dataVersion:I,rootBatchIdMap:n,ancestorMap:A},v<e&&Te(t,e,v,n,A,!1,B,E)}function De(e,r){var n=e.buffer;if($t=e.ellipsoid,e.isOSGB){if(a.e(It)||new Promise((function(e,r){t(["./OSGBToS3M-f8fa8fe0"],e,r)})).then((function(t){(It=t.default).onRuntimeInitialized=function(){mt=!0},vt=It.cwrap("OSGBToS3MB","number",["number","number","number","number"])})),!mt)return null;var A;switch(e.suffix){case"dae":case"DAE":A=4;break;case"x":case"X":A=2;break;default:A=0}n=function(t,e,r){var a=It._malloc(20*e),n=It._malloc(Uint8Array.BYTES_PER_ELEMENT*e);It.HEAPU8.set(t,n/Uint8Array.BYTES_PER_ELEMENT);var A=vt(n,e,a,r),o=new Uint8Array(It.HEAPU8.buffer,a,A);return t=null,t=new Uint8Array(o).buffer,It._free(a),It._free(n),t}(new Uint8Array(n),n.byteLength,A)}var o=e.isS3MZ,B=e.fileType,E=e.supportCompressType,i=e.bVolume,C=e.isS3MBlock,s=e.modelMatrix,y=e.materialType,P=e.isCoverImageryLayer,c=e.transformPar,p=null,d=null,T=null;if(i&&e.volbuffer.byteLength<8&&(i=!1),i){var g=e.volbuffer,F=new Uint8Array(g,8),I=L.pako.inflate(F).buffer,M=new Float64Array(I,0,1),m=new Uint32Array(I,48,1);if(0===M[0]||3200===m[0]||3201===m[0]){var v=0;0==M[0]&&(v=8),r.push(I);var _=new Float64Array(I,v,6),S=_[0],O=_[1],h=_[2],R=_[3],b=_[4]<_[5]?_[4]:_[5],G=_[4]>_[5]?_[4]:_[5];d={left:S,top:O,right:h,bottom:R,minHeight:b,maxHeight:G,width:(p=new Ot(S,R,h,O,b,G)).width,length:p.length,height:p.height};var U=new Uint32Array(I,48+v,7),x=U[0],K=U[1],H=U[2],w=U[3];T={nFormat:x,nSideBlockCount:K,nBlockLength:H,nLength:w,nWidth:U[4],nHeight:U[5],nDepth:U[6],imageArray:new Uint8Array(I,76+v,w*w*4)}}}var V=0,Y={};Y.ignoreNormal=e.ignoreNormal;var J=e.rootBatchIdMap||{},k=e.ancestorMap||{},W={},Z=new DataView(n),X=Z.getFloat32(V,!0);if(V+=Float32Array.BYTES_PER_ELEMENT,C)return Z.getUint32(V,!0),V+=Uint32Array.BYTES_PER_ELEMENT,Te(n,n.byteLength,V,J,k,e.isRoot,W,r),W;var z,Q=!1,j=0;if(X>=3&&(j=Z.getUint32(V,!0),V+=Uint32Array.BYTES_PER_ELEMENT),X>=2&&(z=Z.getUint32(V,!0),V+=Uint32Array.BYTES_PER_ELEMENT),Le(X-1)||Le(X-2)||Le(X-3)||X>2.09&&X<2.11){var q=Z.getUint32(V,!0);V+=Uint32Array.BYTES_PER_ELEMENT;var tt=new Uint8Array(n,V,q);X>=3&&0===j?n=tt.buffer:(n=!0===Mt?function(t,e){var r=e||4*t.length,a=D.unzip._malloc(Uint8Array.BYTES_PER_ELEMENT*r),n=new Uint8Array(r);D.unzip.HEAPU8.set(n,a/Uint8Array.BYTES_PER_ELEMENT);var A,o=D.unzip._malloc(Uint8Array.BYTES_PER_ELEMENT*t.length);for(D.unzip.HEAPU8.set(t,o/Uint8Array.BYTES_PER_ELEMENT);0==(A=_t(a,r,o,t.length));)St(a),r*=4,a=D.unzip._malloc(Uint8Array.BYTES_PER_ELEMENT*r),n=new Uint8Array(r),D.unzip.HEAPU8.set(n,a/Uint8Array.BYTES_PER_ELEMENT);var B=new Uint8Array(D.unzip.HEAPU8.buffer,a,A);t=null,n=null;var E=new Uint8Array(B).buffer;return St(a),St(o),E}(tt,z):L.pako.inflate(tt).buffer,V=0),r.push(n),Z=new DataView(n)}else if(X>1.199&&X<1.201){q=Z.getUint32(V,!0);V+=Uint32Array.BYTES_PER_ELEMENT,r.push(n)}else{Q=!0,V=0;q=Z.getInt32(V,!0);if(V+=Int32Array.BYTES_PER_ELEMENT,V+=Uint8Array.BYTES_PER_ELEMENT*q,o){Z.getUint32(V,!0),V+=Uint32Array.BYTES_PER_ELEMENT;F=new Uint8Array(n,V);n=L.pako.inflate(F).buffer,r.push(n),Z=new DataView(n),V=0}}var et=Z.getUint32(V,!0),rt=Nt(Z,n,V+=Uint32Array.BYTES_PER_ELEMENT),at=rt.buffer;V=rt.byteOffset;var nt={},At=Pe(X,at,Z,rt.dataViewByteOffset,nt,c),ot=V%4;0!==ot&&(V+=4-ot);var Bt=X>2.09&&3!==X;if(ie((rt=Nt(Z,n,V)).buffer,Z,rt.dataViewByteOffset,Y,Q,r,Bt,X,s,nt,P,e.fileType,c),V=rt.byteOffset,Bt)for(var Et=0;Et<At.pageLods.length;Et++)for(var it=At.pageLods[Et],Ct=it.geodes,st=0;st<Ct.length;st++)for(var yt=Ct[st].skeletonNames,lt=0;lt<yt.length;lt++){var ut=yt[lt];a.e(Y[ut].max)&&(a.e(it.max)?(it.max.x=Math.max(Y[ut].max.x,it.max.x),it.max.y=Math.max(Y[ut].max.y,it.max.y),it.max.z=Math.max(Y[ut].max.z,it.max.z),it.min.x=Math.min(Y[ut].min.x,it.min.x),it.min.y=Math.min(Y[ut].min.y,it.min.y),it.min.z=Math.min(Y[ut].min.z,it.min.z)):(it.max=Y[ut].max,it.min=Y[ut].min))}3!==X&&((rt=Nt(Z,n,V)).buffer,V=rt.byteOffset);var Pt={};!function(t,e,r,a,n,A){var o=0,B=r.getUint32(o+a,!0);o+=Uint32Array.BYTES_PER_ELEMENT;for(var E=0;E<B;E++){var i=ht(r,a,e,o),C=i.string,s=(o=i.bytesOffset)%4;0!==s&&(o+=4-s);var y=r.getUint32(o+a,!0);o+=Uint32Array.BYTES_PER_ELEMENT;var u=r.getUint32(o+a,!0);o+=Uint32Array.BYTES_PER_ELEMENT;var P=r.getUint32(o+a,!0);o+=Uint32Array.BYTES_PER_ELEMENT;var c=r.getUint32(o+a,!0);o+=Uint32Array.BYTES_PER_ELEMENT;var p=r.getUint32(o+a,!0);o+=Uint32Array.BYTES_PER_ELEMENT;var d=r.getUint32(o+a,!0);o+=Uint32Array.BYTES_PER_ELEMENT;var L=e.subarray(o,o+p);o+=p;var T=null,D=c;c===l.S3MCompressType.enrS3TCDXTN&&1!=t?(l.L.decode(T,u,P,L,d),T=d>f.S3MPixelFormat.BGR||d===f.S3MPixelFormat.LUMINANCE_ALPHA?new Uint8Array(u*P*4):new Uint16Array(u*P),l.L.decode(T,u,P,L,d),A.push(T.buffer),c=0):T=L,n[C]={id:C,width:u,height:P,compressType:c,oriCompressType:D,nFormat:d,imageBuffer:T,mipmapLevel:y}}}(E,(rt=Nt(Z,n,V)).buffer,Z,rt.dataViewByteOffset,Pt,r),V=rt.byteOffset;var ct=Z.getUint32(V,!0);V+=Uint32Array.BYTES_PER_ELEMENT;var pt=new Uint8Array(n).subarray(V,V+ct),dt=u.a(pt);V+=ct,dt=dt.replace(/\n\0/,"");var Lt=JSON.parse(dt);(3===X&&(et=Z.getUint32(V,!0),V+=Uint32Array.BYTES_PER_ELEMENT),(et&ft)==ft)&&de((rt=Nt(Z,n,V)).buffer,Z,rt.dataViewByteOffset,Y,X,r);if(1==X){var Tt=At.pageLods,Dt=!0;for(Et=0;Et<Tt.length;Et++){var gt=Tt[Et];Dt=""===gt.childTile;for(var Ft=gt.geodes,Rt=0;Rt<Ft.length;Rt++){yt=Ft[Rt].skeletonNames;for(var bt=0;bt<yt.length;bt++){var Gt=yt[bt];if(Dt){var Ut=Y[Gt].vertexPackage;Ut.boundingSphere=$.calcBoundingSphereInWorker(B,Ut)}}}}}return"BatchPBR"===y&&function(t,e,r,n){for(var A in delete t.ignoreNormal,t)if(t.hasOwnProperty(A)){var o=t[A],B=o.arrIndexPackage;if(B.length<1)continue;if(1===B.length||2===B.length&&13===B[1].primitiveType){var E=o.vertexPackage.attrLocation.aTextureCoordMatrix;if(void 0!==E){if((i=(N=o.vertexPackage.vertexAttributes[E]).typedArray)[0]<0)continue}else if(void 0!==(E=o.vertexPackage.attrLocation.aTextureCoordMatrix||o.vertexPackage.attrLocation.aTexCoord0)){N=o.vertexPackage.vertexAttributes[E];var i=new Float32Array(N.typedArray.buffer,N.typedArray.byteOffset,N.typedArray.byteLength/4);if(3===N.componentsPerAttribute&&i[2]<0)continue}}var C,s,y=0,u={},P=void 0;for(C=0,s=B.length;C<s;C++)13!==(h=B[C]).primitiveType?y+=0===h.indexType?h.indicesTypedArray.byteLength/2:h.indicesTypedArray.byteLength/4:P=B[C],0===C&&(u.indicesCount=0,u.indexType=B[C].indexType,u.primitiveType=B[C].primitiveType,u.materialCode=B[C].materialCode);u.indicesCount=y;var c=o.vertexPackage.verticesCount>65535?new Uint32Array(y):new Uint16Array(y),f=0;for(C=0,s=B.length;C<s;C++)if(13!==(h=B[C]).primitiveType){var p=0===h.indexType?Uint16Array:Uint32Array,d=0===h.indexType?h.indicesTypedArray.byteLength/2:h.indicesTypedArray.byteLength/4,L=new p(h.indicesTypedArray.buffer,h.indicesTypedArray.byteOffset,d);c.set(L,f),f+=L.length}u.indicesTypedArray=c,o.arrIndexPackage=[u],a.e(P)&&(o.arrIndexPackage.push(P),o.edgeGeometry=l._0x30c9ea.createEdgeDataByIndices(o.vertexPackage,P));var T=2*B.length*4,D=new Float32Array(T),g={};for(C=0,s=r.material.length;C<s;C++)g[(R=r.material[C].material).id]=R;for(C=0,s=B.length;C<s;C++)if(R=g[(h=B[C]).materialCode]){var F=R.pbrMetallicRoughness;if(F){D[8*C]=F.metallicFactor,D[8*C+1]=F.roughnessFactor,D[8*C+2]=R.alphaCutoff;var I=""===R.alphaMode?0:1,M="none"===R.cullMode?0:1;D[8*C+3]=M|I<<16,D[8*C+4]=F.emissiveFactor.x,D[8*C+5]=F.emissiveFactor.y,D[8*C+6]=F.emissiveFactor.z,D[8*C+7]=0,R.pbrIndex=C}}var m="PBRMaterialParam_"+A;for(C=0,s=r.material.length;C<s;C++)if((R=r.material[C].material).id===u.materialCode){R.textureunitstates.push({textureunitstate:{addressmode:{u:0,v:0,w:0},filteringoption:0,filtermax:2,filtermin:2,id:m,texmodmatrix:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],url:""}});break}var v,_,S=o.vertexPackage,O=S.attrLocation.aTexCoord1;if(void 0!==O){var N=S.vertexAttributes[O];v=new Float32Array(2*S.verticesCount),N.typedArray=v}else v=new Float32Array(2*S.verticesCount),O=S.vertexAttributes.length,S.attrLocation.aTexCoord1=O,S.vertexAttributes.push({index:O,typedArray:v,componentsPerAttribute:2,componentDatatype:5126,offsetInBytes:0,strideInBytes:8,normalize:!1});for(n.push(v.buffer),void 0!==(O=S.attrLocation.aColor)&&(_=(N=S.vertexAttributes[O]).typedArray),C=0,s=B.length;C<s;C++){var h,R;if((R=g[(h=B[C]).materialCode])&&R.pbrMetallicRoughness)for(var b=R.pbrMetallicRoughness.baseColor,G=void 0!==_,U=R.pbrIndex,x=(c=h.indicesTypedArray,{}),K=0,H=(c=0===h.indexType?new Uint16Array(c.buffer,c.byteOffset,c.byteLength/2):new Uint32Array(c.buffer,c.byteOffset,c.byteLength/4)).length;K<H;K++){var w=c[K];v[2*w]=U,G&&void 0===x[w]&&(x[w]=!0,_[4*w]*=b.x,_[4*w+1]*=b.y,_[4*w+2]*=b.z,_[4*w+3]*=b.w)}}e[m]={id:m,width:2*B.length,height:1,compressType:0,nFormat:25,imageBuffer:D,mipmapLevel:0}}}(Y,Pt,Lt,r),{result:!0,groupNode:At,geoPackage:Y,matrials:Lt,texturePackage:Pt,version:N.S3M4,dataVersion:X,volImageBuffer:T,volBounds:d}}function ge(){a.e(yt)&&a.e(ct)&&(yt.onRuntimeInitialized=function(){ut=!0},self.onmessage=T(De),self.postMessage(!0))}return function(e){if("undefined"==typeof WebAssembly)return self.onmessage=T(De),void self.postMessage(!0);var r=e.data.webAssemblyConfig;return a.e(r)?n.s.isInternetExplorer()?t([A.n$1("ThirdParty/Workers/ie-webworker-promise-polyfill.js")],(function(e){return self.Promise=e,-1!==r.modulePath.indexOf("crunch")?t([r.modulePath],(function(t){a.e(r.wasmBinaryFile)?(a.e(t)||(t=self.Module),yt=t,ge()):(yt=t,ge())})):t([r.modulePath],(function(t){a.e(r.wasmBinaryFile)?(a.e(t)||(t=self.DracoDecoderModule),t(r).then((function(t){ct=t,ge()}))):(ct=t(),ge())}))})):-1!==r.modulePath.indexOf("crunch")?t([r.modulePath],(function(t){a.e(r.wasmBinaryFile)?(a.e(t)||(t=self.Module),yt=t,ge()):(yt=t,ge())})):t([r.modulePath],(function(t){a.e(r.wasmBinaryFile)?(a.e(t)||(t=self.DracoDecoderModule),t(r).then((function(t){ct=t,ge()}))):(ct=t(),ge())})):void 0}})); +define(["require","./arrayFill-0358accf","./Check-52a7d806","./when-92c6cf3c","./FeatureDetection-fd297af4","./buildModuleUrl-cbcc8c56","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartesian4-72b88c9e","./Cartographic-a2c313d7","./Color-b1bd525f","./ComponentDatatype-98414d16","./CompressedTextureBuffer-d0bacc6b","./S3MEdgeProcessor-6c92ceff","./getStringFromTypedArray-1e6dda18","./PixelFormat-ab56b0d6","./RuntimeError-c6a62a80","./S3MPixelFormat-013161a2","./IndexDatatype-86677ec4","./BoundingRectangle-44af9dd4","./pako_inflate-f73548c4","./createTaskProcessorWorker","./unzip-617dbdc5","./Math-ecf82623","./WebGLConstants-42651efd","./Event-3390cd7d"],(function(t,e,r,n,a,o,i,s,u,A,E,l,c,f,B,d,y,p,C,m,h,v,g,P,T,D){"use strict";function _(t,e,o){if(r.o.defined("array",t),n.e(e)&&r.o.typeOf.number("begin",e),n.e(o)&&r.o.typeOf.number("end",o),"function"==typeof t.slice)return t.slice(e,o);for(var i=Array.prototype.slice.call(t,e,o),s=a.s.typedArrayTypes,u=s.length,A=0;A<u;++A)if(t instanceof s[A]){i=new s[A](i);break}return i}var F,L=(F=!0,function(t,e){var r=F?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return F=!1,r}),w=L(void 0,(function(){return w.toString().search("(((.+)+)+)+$").toString().constructor(w).search("(((.+)+)+)+$")}));w();var b,M,I=Object.freeze({S3M:49,S3M4:1}),S=(b=!0,function(t,e){var r=b?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return b=!1,r}),O=S(void 0,(function(){return O.toString().search("(((.+)+)+)+$").toString().constructor(O).search("(((.+)+)+)+$")}));function N(){}function R(t,e,r){var a,o=t.num_points(),i=r.num_components(),s=new M.AttributeQuantizationTransform;if(s.InitFromAttribute(r)){for(var u=new Array(i),A=0;A<i;++A)u[A]=s.min_value(A);a={quantizationBits:s.quantization_bits(),minValues:u,range:s.range(),octEncoded:!1}}M.destroy(s),(s=new M.AttributeOctahedronTransform).InitFromAttribute(r)&&(a={quantizationBits:s.quantization_bits(),octEncoded:!0}),M.destroy(s);var E,c=o*i;E=n.e(a)?function(t,e,r,n,a){var o,i;n.quantizationBits<=8?(i=new M.DracoUInt8Array,o=new Uint8Array(a),e.GetAttributeUInt8ForAllPoints(t,r,i)):(i=new M.DracoUInt16Array,o=new Uint16Array(a),e.GetAttributeUInt16ForAllPoints(t,r,i));for(var s=0;s<a;++s)o[s]=i.GetValue(s);return M.destroy(i),o}(t,e,r,a,c):function(t,e,r,n){var a,o;switch(r.data_type()){case 1:case 11:o=new M.DracoInt8Array,a=new Int8Array(n),e.GetAttributeInt8ForAllPoints(t,r,o);break;case 2:o=new M.DracoUInt8Array,a=new Uint8Array(n),e.GetAttributeUInt8ForAllPoints(t,r,o);break;case 3:o=new M.DracoInt16Array,a=new Int16Array(n),e.GetAttributeInt16ForAllPoints(t,r,o);break;case 4:o=new M.DracoUInt16Array,a=new Uint16Array(n),e.GetAttributeUInt16ForAllPoints(t,r,o);break;case 5:case 7:o=new M.DracoInt32Array,a=new Int32Array(n),e.GetAttributeInt32ForAllPoints(t,r,o);break;case 6:case 8:o=new M.DracoUInt32Array,a=new Uint32Array(n),e.GetAttributeUInt32ForAllPoints(t,r,o);break;case 9:case 10:o=new M.DracoFloat32Array,a=new Float32Array(n),e.GetAttributeFloatForAllPoints(t,r,o)}for(var i=0;i<n;++i)a[i]=o.GetValue(i);return M.destroy(o),a}(t,e,r,c);var f=l.ComponentDatatype.fromTypedArray(E);if(l.ComponentDatatype.getSizeInBytes(f)*i%4!=0){var B=function(t,e,r){var n=e,a=l.ComponentDatatype.getSizeInBytes(r),o=a*e,i=4*Math.ceil(o/4)-o;n=e+i/a;var s,u=t.length/e,A=u*n;t instanceof Uint16Array?s=new Uint16Array(A):t instanceof Int16Array?s=new Int16Array(A):t instanceof Uint8Array?s=new Uint8Array(A):console.log("convertArrayToMutiple4Array dont support array type.");var E,c=0;for(c=0;c<u;c++)for(E=0;E<n;E++)s[c*n+E]=E<e?t[c*e+E]:0;return{numComponents:n,vertexArray:s}}(E,i,f);E=B.vertexArray,i=B.numComponents}return{array:E,data:{componentsPerAttribute:i,componentDatatype:f,byteOffset:r.byte_offset(),byteStride:l.ComponentDatatype.getSizeInBytes(f)*i,normalized:r.normalized(),quantization:a}}}O();var x=new s.o(40680631590769,40680631590769,40408299984661.445),U=new s.o,G=new s.o;function K(t,e,r,a){var o=Math.cos(e);U.x=o*Math.cos(t),U.y=o*Math.sin(t),U.z=Math.sin(e),U=s.o.normalize(U,U),s.o.multiplyComponents(x,U,G);var i=Math.sqrt(s.o.dot(U,G));return G=s.o.divideByScalar(G,i,G),U=s.o.multiplyByScalar(U,r,U),n.e(a)||(a=new s.o),s.o.add(G,U,a)}var H=new a.p,k=new a.p,V=new s.o,Y=new A.a;function J(t,e,r,o,E,c,B,d){var y=void 0,p=void 0,C=void 0,m=void 0,h=r.vertexAttributes,v=r.attrLocation;if(r.nCompressOptions=0,n.e(o.posUniqueID)&&o.posUniqueID>=0){n.e(d)||(r.nCompressOptions|=f.VertexCompressOption.SVC_Vertex);var g=e.GetAttribute(t,o.posUniqueID),P=R(t,e,g),T=P.data.componentsPerAttribute;r.verticesCount=P.array.length/T,r.vertCompressConstant=P.data.quantization.range/(1<<P.data.quantization.quantizationBits);var D=P.data.quantization.minValues;r.minVerticesValue=new u.e(D[0],D[1],D[2],1),T>3&&(r.minVerticesValue.w=D[3]);var _=r.verticesCount;if(c&&(y=new A.a,p=new A.a,C=new Float32Array(2*_),m=new Float64Array(2*_)),n.e(d)){var F=P.array,L=3===T?s.o.unpackArray(F):u.e.unpackArray(F);for(let t=0,e=L.length;t<e;t++){let e=L[t];s.o.multiplyByScalar(e,r.vertCompressConstant,e),s.o.add(e,r.minVerticesValue,e)}var w=a.p.multiply(d.sphereMatrix,d.geoMatrix,H),b=a.p.multiply(d.ellipsoidMatrix,d.geoMatrix,k);a.p.inverse(b,b);var M=new i.t(6378137,6378137,6378137);for(let t=0,e=L.length;t<e;t++){let e=L[t];a.p.multiplyByPoint(w,e,V);let r=M.cartesianToCartographic(V,Y);c&&(m[2*t]=r.longitude,m[2*t+1]=r.latitude,0===t?(y.longitude=r.longitude,y.latitude=r.latitude,p.longitude=r.longitude,p.latitude=r.latitude):(y.longitude=Math.max(r.longitude,y.longitude),y.latitude=Math.max(r.latitude,y.latitude),p.longitude=Math.min(r.longitude,p.longitude),p.latitude=Math.min(r.latitude,p.latitude)));let n=K(r.longitude,r.latitude,r.height,V);a.p.multiplyByPoint(b,n,e)}var I=new Array(3*L.length);3===T?s.o.packArray(L,I):u.e.packArray(L,I),P.array=new Float32Array(I),P.data.componentDatatype=l.ComponentDatatype.FLOAT,P.data.byteStride=4*T}if(v.aPosition=h.length,h.push({index:v.aPosition,typedArray:P.array,componentsPerAttribute:T,componentDatatype:P.data.componentDatatype,offsetInBytes:P.data.byteOffset,strideInBytes:P.data.byteStride,normalize:P.data.normalized}),!n.e(d)&&c)for(var S=new s.o,O=new s.o,N=new A.a,x=0;x<_;x++)a.p.multiplyByPoint(E,s.o.fromElements(P.array[3*x]*r.vertCompressConstant+D[0],P.array[3*x+1]*r.vertCompressConstant+D[1],P.array[3*x+2]*r.vertCompressConstant+D[2],S),O),N=A.a.fromCartesian(O),m[2*x]=N.longitude,m[2*x+1]=N.latitude,0===x?(y.longitude=N.longitude,y.latitude=N.latitude,p.longitude=N.longitude,p.latitude=N.latitude):(y.longitude=Math.max(N.longitude,y.longitude),y.latitude=Math.max(N.latitude,y.latitude),p.longitude=Math.min(N.longitude,p.longitude),p.latitude=Math.min(N.latitude,p.latitude));if(c){for(x=0;x<_;x++)C[2*x]=m[2*x]-p.longitude,C[2*x+1]=m[2*x+1]-p.latitude;v.img=h.length,h.push({index:v.img,typedArray:C,componentsPerAttribute:2,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),B.max=y,B.min=p}}if(n.e(o.normalUniqueID)&&o.normalUniqueID>=0){r.nCompressOptions|=f.VertexCompressOption.SVC_Normal;var U=e.GetAttribute(t,o.normalUniqueID),G=R(t,e,U),J=G.data.quantization;r.normalRangeConstant=(1<<J.quantizationBits)-1,v.aNormal=h.length,h.push({index:v.aNormal,typedArray:G.array,componentsPerAttribute:G.data.componentsPerAttribute,componentDatatype:G.data.componentDatatype,offsetInBytes:G.data.byteOffset,strideInBytes:G.data.byteStride,normalize:G.data.normalized})}if(n.e(o.colorUniqueID)&&o.colorUniqueID>=0){r.nCompressOptions|=f.VertexCompressOption.SVC_VertexColor;var j=e.GetAttribute(t,o.colorUniqueID),W=R(t,e,j),z=W.array,X=W.data.componentDatatype,Z=W.data.byteOffset,Q=W.data.byteStride,q=W.data.normalized;if(W.array instanceof Int32Array){z=new Uint8Array(W.array.length);for(let t=0,e=W.array.length;t<e;t++)z[t]=W.array[t];X=5121,Z=0,Q=4,q=!0}v.aColor=h.length,h.push({index:v.aColor,typedArray:z,componentsPerAttribute:W.data.componentsPerAttribute,componentDatatype:X,offsetInBytes:Z,strideInBytes:Q,normalize:q})}for(x=0;x<o.texCoordUniqueIDs.length;x++){r.texCoordCompressConstant=[],r.minTexCoordValue=[];var $=o.texCoordUniqueIDs[x];if(!($<0)){var tt=e.GetAttribute(t,$),et=R(t,e,tt);if(n.e(et.data.quantization)){r.nCompressOptions|=f.VertexCompressOption.SVC_TexutreCoord,r.texCoordCompressConstant.push(et.data.quantization.range/(1<<et.data.quantization.quantizationBits));D=et.data.quantization.minValues;r.minTexCoordValue.push(new i.o(D[0],D[1]))}var rt="aTexCoord"+x;v[rt]=h.length,h.push({index:v[rt],typedArray:et.array,componentsPerAttribute:et.data.componentsPerAttribute,componentDatatype:et.data.componentDatatype,offsetInBytes:et.data.byteOffset,strideInBytes:et.data.byteStride,normalize:et.data.normalized}),r.textureCoordIsW=!0}}for(x=0;x<o.vertexAttrUniqueIDs.length;x++){var nt=o.vertexAttrUniqueIDs[x];if(!(nt<0)){var at=e.GetAttribute(t,nt),ot=R(t,e,at);v.aVertexWeight=h.length,h.push({index:v.aVertexWeight,typedArray:ot.array,componentsPerAttribute:ot.data.componentsPerAttribute,componentDatatype:ot.data.componentDatatype,offsetInBytes:ot.data.byteOffset,strideInBytes:ot.data.byteStride,normalize:ot.data.normalized}),r.customVertexAttribute={VertexWeight:0}}}}N.dracoDecodePointCloud=function(t,e,r,n,a){for(var o=new(M=t).Decoder,i=["POSITION","NORMAL","COLOR"],s=0;s<i.length;++s)o.SkipAttributeTransform(M[i[s]]);var u=new M.DecoderBuffer;if(u.Init(e,r),o.GetEncodedGeometryType(u)!==M.POINT_CLOUD)throw new y.t("Draco geometry type must be POINT_CLOUD.");var A=new M.PointCloud,E=o.DecodeBufferToPointCloud(u,A);if(!E.ok()||0===A.ptr)throw new y.t("Error decoding draco point cloud: "+E.error_msg());M.destroy(u),J(A,o,n,a),M.destroy(A),M.destroy(o)},N.dracoDecodeMesh=function(t,e,r,n,o,i,s,u,A,E){for(var l=new(M=t).Decoder,c=["POSITION","NORMAL","COLOR","TEX_COORD"],f=0;f<c.length;++f)l.SkipAttributeTransform(M[c[f]]);var B=new M.DecoderBuffer;if(B.Init(e,r),l.GetEncodedGeometryType(B)!==M.TRIANGULAR_MESH)throw new y.t("Unsupported draco mesh geometry type.");var d=new M.Mesh;if(!l.DecodeBufferToMesh(B,d).ok()||0===d.ptr)return!1;M.destroy(B),J(d,l,n,i,s,u,A,E);var p=function(t,e){for(var r=t.num_points(),n=t.num_faces(),a=new M.DracoInt32Array,o=3*n,i=C.IndexDatatype.createTypedArray(r,o),s=0,u=0;u<n;++u)e.GetFaceFromMesh(t,u,a),i[s+0]=a.GetValue(0),i[s+1]=a.GetValue(1),i[s+2]=a.GetValue(2),s+=3;var A=C.IndexDatatype.UNSIGNED_SHORT;return i instanceof Uint32Array&&(A=C.IndexDatatype.UNSIGNED_INT),M.destroy(a),{typedArray:i,numberOfIndices:o,indexDataType:A}}(d,l);o.indicesTypedArray=p.typedArray,o.indicesCount=p.numberOfIndices,o.indexType=p.indexDataType,o.primitiveType=a._0x3b3836.TRIANGLES,M.destroy(d),M.destroy(l)};var j,W=(j=!0,function(t,e){var r=j?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return j=!1,r}),z=W(void 0,(function(){return z.toString().search("(((.+)+)+)+$").toString().constructor(z).search("(((.+)+)+)+$")}));z();var X,Z=Object.freeze({OSGBFile:0,OSGBCacheFile:1,ClampGroundPolygon:2,ClampObjectPolygon:3,ClampGroundLine:4,ClampObjectLine:5,IconPoint:6,Text:7,PointCloudFile:8,ExtendRegion3D:9,ExtendClampPolygonCache:10,PolylineEffect:11,RegionEffect:12,ClampGroundAndObjectLineCache:13,ClampGroundRealtimeRasterCache:14}),Q=(X=!0,function(t,e){var r=X?function(){if(e){var r=e.apply(t,arguments);return e=null,r}}:function(){};return X=!1,r}),q=Q(void 0,(function(){return q.toString().search("(((.+)+)+)+$").toString().constructor(q).search("(((.+)+)+)+$")}));function $(){}function tt(t){var e=new o.i,r=t.instanceBounds;if(!n.e(r))return e;var a=new s.o(r[0],r[1],r[2]),i=new s.o(r[3],r[4],r[5]),u=s.o.lerp(a,i,.5,new s.o),A=s.o.distance(u,a);return e.center=u,e.radius=A,e}function et(t){var e,r,a=new o.i,i=new s.o,u=t.vertexAttributes[0],A=u.componentsPerAttribute,E=n.e(t.nCompressOptions)&&(t.nCompressOptions&f.VertexCompressOption.SVC_Vertex)===f.VertexCompressOption.SVC_Vertex,l=1;E?(l=t.vertCompressConstant,e=new s.o(t.minVerticesValue.x,t.minVerticesValue.y,t.minVerticesValue.z),r=new Uint16Array(u.typedArray.buffer,u.typedArray.byteOffset,u.typedArray.byteLength/2)):r=new Float32Array(u.typedArray.buffer,u.typedArray.byteOffset,u.typedArray.byteLength/4);for(var c=[],B=0;B<t.verticesCount;B++)s.o.fromArray(r,A*B,i),E&&(i=s.o.multiplyByScalar(i,l,i),i=s.o.add(i,e,i)),c.push(s.o.clone(i));return o.i.fromPoints(c,a),c.length=0,a}function rt(t){var e,r,a=new o.i,i=new s.o,u=n.e(t.nCompressOptions)&&(t.nCompressOptions&f.VertexCompressOption.SVC_Vertex)===f.VertexCompressOption.SVC_Vertex,A=t.vertexAttributes[0],E=A.componentsPerAttribute,l=1;u?(l=t.vertCompressConstant,r=new s.o(t.minVerticesValue.x,t.minVerticesValue.y,t.minVerticesValue.z),e=new Uint16Array(A.typedArray.buffer,A.typedArray.byteOffset,A.typedArray.byteLength/2)):e=new Float32Array(A.typedArray.buffer,A.typedArray.byteOffset,A.typedArray.byteLength/4);for(var c=[],B=0;B<t.verticesCount;B++)s.o.fromArray(e,E*B,i),u&&(i=s.o.multiplyByScalar(i,l,i),i=s.o.add(i,r,i)),c.push(s.o.clone(i));return o.i.fromPoints(c,a),c.length=0,a}function nt(t){var e,r,a=n.e(t.nCompressOptions)&&(t.nCompressOptions&f.VertexCompressOption.SVC_Vertex)===f.VertexCompressOption.SVC_Vertex,i=new o.i,A=new s.o,E=new s.o,l=t.vertexAttributes[0],c=l.componentsPerAttribute,B=t.attrLocation.aPosition,d=t.vertexAttributes[B],y=t.attrLocation.aTexCoord5,p=t.vertexAttributes[y],C=p.componentsPerAttribute;a?(c=3,C=3,e=ot(t,d),r=function(t,e,r){for(var n,a,o,i=e.componentsPerAttribute,s=t.texCoordCompressConstant[r],A=new u.e(t.minTexCoordValue[r].x,t.minTexCoordValue[r].y,t.minTexCoordValue[r].z,t.minTexCoordValue[r].w),E=new Uint16Array(e.typedArray.buffer,e.typedArray.byteOffset,e.typedArray.byteLength/2),l=new Float32Array(3*t.verticesCount),c=0;c<t.verticesCount;c++)n=E[i*c]*s+A.x,a=E[i*c+1]*s+A.y,o=E[i*c+2]*s+A.z,l[3*c]=n,l[3*c+1]=a,l[3*c+2]=o;return l}(t,p,5)):(e=new Float32Array(l.typedArray.buffer,l.typedArray.byteOffset,l.typedArray.byteLength/4),r=new Float32Array(p.typedArray.buffer,p.typedArray.byteOffset,p.typedArray.byteLength/4));for(var m=[],h=0;h<t.verticesCount;h++)s.o.fromArray(e,c*h,A),s.o.fromArray(r,C*h,E),s.o.add(A,E,A),m.push(s.o.clone(A));return o.i.fromPoints(m,i),m.length=0,i}function at(t){var e=a._0x3b3836.TRIANGLES;switch(t){case 1:e=a._0x3b3836.POINTS;break;case 2:e=a._0x3b3836.LINES;break;case 3:e=a._0x3b3836.LINE_STRIP;break;case 4:e=a._0x3b3836.TRIANGLES}return e}function ot(t,e){for(var r,n,a,o=e.componentsPerAttribute,i=t.vertCompressConstant,u=new s.o(t.minVerticesValue.x,t.minVerticesValue.y,t.minVerticesValue.z),A=new Uint16Array(e.typedArray.buffer,e.typedArray.byteOffset,e.typedArray.byteLength/2),E=new Float32Array(3*t.verticesCount),l=0;l<t.verticesCount;l++)r=A[o*l]*i+u.x,n=A[o*l+1]*i+u.y,a=A[o*l+2]*i+u.z,E[3*l]=r,E[3*l+1]=n,E[3*l+2]=a;return E}q(),$.calcBoundingSphereInWorker=function(t,e){return e.instanceIndex>-1?tt(e):n.e(e.clampRegionEdge)?nt(e):t>=Z.ClampGroundPolygon&&t<=Z.ClampObjectLine?rt(e):t==Z.ClampGroundAndObjectLineCache?nt(e):et(e)},$.calcBoundingSphere=function(t,e,r){var a,i=t._fileType;return a=e.instanceIndex>-1?tt(e):n.e(e.clampRegionEdge)?nt(e):i>=Z.ClampGroundPolygon&&i<=Z.ClampObjectLine?rt(e):i==Z.ClampGroundAndObjectLineCache?nt(e):et(e),o.i.transform(a,r,a),a},$.calcBoundingRectangle=function(t,e){var r;return t._fileType===Z.ClampGroundPolygon&&(r=function(t){var e,r,a=n.e(t.nCompressOptions)&&(t.nCompressOptions&f.VertexCompressOption.SVC_Vertex)===f.VertexCompressOption.SVC_Vertex,o=new m.f,u=t.vertexAttributes[0],A=u.componentsPerAttribute,E=1;a?(E=t.vertCompressConstant,r=new s.o(t.minVerticesValue.x,t.minVerticesValue.y,t.minVerticesValue.z),e=new Uint16Array(u.typedArray.buffer,u.typedArray.byteOffset,u.typedArray.byteLength/2)):e=new Float32Array(u.typedArray.buffer,u.typedArray.byteOffset,u.typedArray.byteLength/4);for(var l=[],c=0;c<t.verticesCount;c++){var B=e[A*c],d=e[A*c+1];a&&(B=E*B+r.x,d=E*d+r.y),l.push(new i.o(B,d))}return m.f.fromPoints(l,o),l.length=0,o}(e)),r},$.createEdge=function(t,e){if(!(e.length<1)){var r=function(t){for(var e=[],r=t.length,n=0;n<r;n++){var o=at(t[n].primitiveType);(o===a._0x3b3836.LINES||o===a._0x3b3836.LINE_STRIP)&&e.push(t[n])}return e}(e);if(0!=r.length){var o,i=function(t){for(var e=0,r=t.length,n=0;n<r;n++){var o=t[n],i=at(o.primitiveType);i==a._0x3b3836.LINES?e+=o.indicesCount/2:i==a._0x3b3836.LINE_STRIP&&e++}return e}(r),u=t.attrLocation.aPosition,A=t.vertexAttributes[u],E=n.e(t.nCompressOptions)&&(t.nCompressOptions&f.VertexCompressOption.SVC_Vertex)===f.VertexCompressOption.SVC_Vertex,c=A.componentsPerAttribute;E?(c=3,o=ot(t,A)):o=new Float32Array(A.typedArray.buffer,A.typedArray.byteOffset,A.typedArray.byteLength/4);for(var B=function(t){for(var e=0,r=t.length,n=0;n<r;n++)e+=t[n].indicesCount;return e}(r),d=function(t,e,r){for(var n,o=[],i=r.length,u=0;u<i;u++){var A,E=r[u];A=0===E.indexType?new Uint16Array(E.indicesTypedArray.buffer,E.indicesTypedArray.byteOffset,E.indicesTypedArray.byteLength/2):new Uint32Array(E.indicesTypedArray.buffer,E.indicesTypedArray.byteOffset,E.indicesTypedArray.byteLength/4);var l=at(E.primitiveType);if(l==a._0x3b3836.LINES)for(n=0;n<E.indicesCount;n+=2){var c=[],f=new s.o;f.x=t[A[n]*e],f.y=t[A[n]*e+1],f.z=t[A[n]*e+2],c.push(f);var B=new s.o;B.x=t[A[n+1]*e],B.y=t[A[n+1]*e+1],B.z=t[A[n+1]*e+2],c.push(B),o.push(c)}else if(l==a._0x3b3836.LINE_STRIP){for(c=[],n=0;n<E.indicesCount;n++){var d=new s.o;d.x=t[A[n]*e],d.y=t[A[n]*e+1],d.z=t[A[n]*e+2],c.push(d)}o.push(c)}}return o}(o,c,r),y=4*B-4*i,p=new Float32Array(3*y),C=new Float32Array(3*y),m=new Float32Array(3*y),h=new Int8Array(2*y),v=0,g=0;g<i;g++){for(var P=d[g].length,T=0;T<P;T++){var D=4*v-4*g,_=3*D+12*T,F=d[g][T];0!=T&&(p[_-6]=F.x,p[_-5]=F.y,p[_-4]=F.z,p[_-3]=F.x,p[_-2]=F.y,p[_-1]=F.z),T!=P-1&&(p[_]=F.x,p[_+1]=F.y,p[_+2]=F.z,p[_+3]=F.x,p[_+4]=F.y,p[_+5]=F.z);var L=F;T+1<P&&(L=d[g][T+1]),0!=T&&(m[_-6]=L.x,m[_-5]=L.y,m[_-4]=L.z,m[_-3]=L.x,m[_-2]=L.y,m[_-1]=L.z),T!=P-1&&(m[_]=L.x,m[_+1]=L.y,m[_+2]=L.z,m[_+3]=L.x,m[_+4]=L.y,m[_+5]=L.z);var w=F;T>=1&&(w=d[g][T-1]),0!=T&&(C[_-6]=w.x,C[_-5]=w.y,C[_-4]=w.z,C[_-3]=w.x,C[_-2]=w.y,C[_-1]=w.z),T!=P-1&&(C[_]=w.x,C[_+1]=w.y,C[_+2]=w.z,C[_+3]=w.x,C[_+4]=w.y,C[_+5]=w.z),_=2*D+8*T,0!=T&&(h[_-4]=-1,h[_-3]=-1,h[_-2]=1,h[_-1]=-1),T!=P-1&&(h[_]=-1,h[_+1]=1,h[_+2]=1,h[_+3]=1)}v+=d[g].length}var b={vertexAttributes:[],attrLocation:{}},M=b.vertexAttributes,I=b.attrLocation;b.instanceCount=0,b.instanceMode=0,I.aPosition=0,M.push({index:I.aPosition,typedArray:p,componentsPerAttribute:3,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),I.aNormal=1,M.push({index:I.aNormal,typedArray:C,componentsPerAttribute:3,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),I.aTexCoord0=2,M.push({index:I.aTexCoord0,typedArray:m,componentsPerAttribute:3,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:3*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),I.aTexCoord1=3,M.push({index:I.aTexCoord1,typedArray:h,componentsPerAttribute:2,componentDatatype:l.ComponentDatatype.BYTE,offsetInBytes:0,strideInBytes:2*Int8Array.BYTES_PER_ELEMENT,normalize:!1});for(var S=[],O=0;O<d.length;O++)S.push(d[O].length);return{vertexPackage:b,indexPackage:function(t,e,r,n){var o,i={};i.indicesCount=6*(t-e),i.indexType=n>65535?1:0,i.primitiveType=a._0x3b3836.TRIANGLES,o=0===i.indexType?new Uint16Array(i.indicesCount):new Uint32Array(i.indicesCount);for(var s=0,u=0;u<e;u++){for(var A=0;A<r[u]-1;A++)o[6*(s-u+A)]=4*(s-u+A),o[6*(s-u+A)+1]=4*(s-u+A)+2,o[6*(s-u+A)+2]=4*(s-u+A)+1,o[6*(s-u+A)+3]=4*(s-u+A)+1,o[6*(s-u+A)+4]=4*(s-u+A)+2,o[6*(s-u+A)+5]=4*(s-u+A)+3;s+=r[u]}return i.indicesTypedArray=o,i}(B,i,S,y)}}}};var it=function(){var t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),e=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if("object"!=typeof WebAssembly)return{supported:!1};var r="B9h79tEBBBE8fV9gBB9gVUUUUUEU9gIUUUB9gEUEU9gIUUUEUIKQBEEEDDDILLLVE9wEEEVIEBEOWEUEC+Q/IEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBEy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBDe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBIl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBLk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBOL79iv9rBRQ+x8yQDBK/qMEZU8jJJJJBCJ/EB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rADZ1JJJBHWCJ/ABAD9uC/wfBgGOCJDAOCJD6eHdAICEFHLCBHQDNINAQAE9PMEAdAEAQ9rAQAdFAE6eHKDNDNADtMBAKCSFGOC9wgHXAOCL4CIFCD4HMAWCJDFHpCBHSALHZINDNARAZ9rAM9PMBCBHLXIKAZAMFHLDNAXtMBCBHhCBHIINDNARAL9rCk9PMBCBHLXVKAWCJ/CBFAIFHODNDNDNDNDNAZAICO4FrBBAhCOg4CIgpLBEDIBKAO9CB83IBAOCWF9CB83IBXIKAOALrBLALrBBGoCO4GaAaCIsGae86BBAOCEFALCLFAaFGarBBAoCL4CIgGcAcCIsGce86BBAOCDFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCIFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCLFAaAoFGarBBALrBEGoCO4GcAcCIsGce86BBAOCVFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCOFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCRFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCWFAaAoFGarBBALrBDGoCO4GcAcCIsGce86BBAOCdFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCQFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCKFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCXFAaAoFGorBBALrBIGLCO4GaAaCIsGae86BBAOCMFAoAaFGorBBALCL4CIgGaAaCIsGae86BBAOCpFAoAaFGorBBALCD4CIgGaAaCIsGae86BBAOCSFAoAaFGOrBBALCIgGLALCIsGLe86BBAOALFHLXDKAOALrBWALrBBGoCL4GaAaCSsGae86BBAOCEFALCWFAaFGarBBAoCSgGoAoCSsGoe86BBAOCDFAaAoFGorBBALrBEGaCL4GcAcCSsGce86BBAOCIFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCLFAoAaFGorBBALrBDGaCL4GcAcCSsGce86BBAOCVFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCOFAoAaFGorBBALrBIGaCL4GcAcCSsGce86BBAOCRFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCWFAoAaFGorBBALrBLGaCL4GcAcCSsGce86BBAOCdFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCQFAoAaFGorBBALrBVGaCL4GcAcCSsGce86BBAOCKFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCXFAoAaFGorBBALrBOGaCL4GcAcCSsGce86BBAOCMFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCpFAoAaFGorBBALrBRGLCL4GaAaCSsGae86BBAOCSFAoAaFGOrBBALCSgGLALCSsGLe86BBAOALFHLXEKAOAL8pBB83BBAOCWFALCWF8pBB83BBALCZFHLKAhCDFHhAICZFGIAX6MBKKDNALMBCBHLXIKDNAKtMBAWASFrBBHhCBHOApHIINAIAWCJ/CBFAOFrBBGZCE4CBAZCEg9r7AhFGh86BBAIADFHIAOCEFGOAK9HMBKKApCEFHpALHZASCEFGSAD9HMBKKABAQAD2FAWCJDFAKAD2Z1JJJB8aAWAWCJDFAKCUFAD2FADZ1JJJB8aKAKCBALeAQFHQALMBKC9+HOXEKCBC99ARAL9rADCAADCA0eseHOKAVCJ/EBF8kJJJJBAOK+OoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJEZ+JJJJB8aAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK+lVOEUE99DUD99EUD99DNDNADCL9HMBAEtMEINDNDNjBBBzjBBB+/ABCDFGD8sBB+yAB8sBBGI+yGL+L+TABCEFGV8sBBGO+yGR+L+TGWjBBBB9gGdeAWjBB/+9CAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI86BBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD86BBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD86BBABCLFHBAECUFGEMBXDKKAEtMBINDNDNjBBBzjBBB+/ABCLFGD8uEB+yAB8uEBGI+yGL+L+TABCDFGV8uEBGO+yGR+L+TGWjBBBB9gGdeAWjB/+fsAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI87EBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD87EBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD87EBABCWFHBAECUFGEMBKKK/SILIUI99IUE99DNAEtMBCBHIABHLINDNDNj/zL81zALCOF8uEBGVCIv+y+VGOAL8uEB+ynGRjB/+fsnjBBBzjBBB+/ARjBBBB9gemGW+LjBBB9P9dtMBAW+oHdXEKCJJJJ94HdKALCLF8uEBHQALCDF8uEBHKABAVCEFCIgAIvCETFAd87EBDNDNAOAK+ynGWjB/+fsnjBBBzjBBB+/AWjBBBB9gemGX+LjBBB9P9dtMBAX+oHKXEKCJJJJ94HKKABAVCDFCIgAIvCETFAK87EBDNDNAOAQ+ynGOjB/+fsnjBBBzjBBB+/AOjBBBB9gemGX+LjBBB9P9dtMBAX+oHQXEKCJJJJ94HQKABAVCUFCIgAIvCETFAQ87EBDNDNjBBJzARARn+TAWAWn+TAOAOn+TGRjBBBBARjBBBB9ge+RjB/+fsnjBBBzmGR+LjBBB9P9dtMBAR+oHQXEKCJJJJ94HQKABAVCIgAIvCETFAQ87EBALCWFHLAICLFHIAECUFGEMBKKK6BDNADCD4AE2GEtMBINABABYDBGDCWTCW91+yADCk91ClTCJJJ/8IF++nuDBABCLFHBAECUFGEMBKKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABKKKEBCJWKLZ9kBB";WebAssembly.validate(t)&&(r="B9h79tEBBBE5V9gBB9gVUUUUUEU9gIUUUB9gDUUB9gEUEUIMXBBEBEEDIDIDLLVE9wEEEVIEBEOWEUEC+Q/aEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBDy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBLe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBOk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBWl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBQL79iv9rBKQ/j6XLBZIK9+EVU8jJJJJBCZ9rHBCBHEINCBHDCBHIINABCWFADFAICJUAEAD4CEgGLe86BBAIALFHIADCEFGDCW9HMBKAEC+Q+YJJBFAI86BBAECITC+Q1JJBFAB8pIW83IBAECEFGECJD9HMBKK1HLSUD97EUO978jJJJJBCJ/KB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rAD/8QBBCJ/ABAD9uC/wfBgGOCJDAOCJD6eHWAICEFHOCBHdDNINAdAE9PMEAWAEAd9rAdAWFAE6eHQDNDNADtMBAQCSFGLC9wgGKCI2HXAKCETHMALCL4CIFCD4HpCBHSINAOHZCBHhDNINDNARAZ9rAp9PMBCBHOXVKAVCJ/CBFAhAK2FHoAZApFHOCBHIDNAKC/AB6MBARAO9rC/gB6MBCBHLINAoALFHIDNDNDNDNDNAZALCO4FrBBGaCIgpLBEDIBKAICBPhPKLBXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLBAOCZFHOKDNDNDNDNDNAaCD4CIgpLBEDIBKAICBPhPKLZXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLZAOCZFHOKDNDNDNDNDNAaCL4CIgpLBEDIBKAICBPhPKLAXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLAAOCZFHOKDNDNDNDNDNAaCO4pLBEDIBKAICBPhPKL8wXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCLFAlPqBFAaC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCWFAlPqBFAaC+Q+YJJBFrBBFHOXEKAIAOPBBBPKL8wAOCZFHOKALC/ABFHIALCJEFAK0MEAIHLARAO9rC/fB0MBKKDNAIAK9PMBAICI4HLINDNARAO9rCk9PMBCBHOXRKAoAIFHaDNDNDNDNDNAZAICO4FrBBALCOg4CIgpLBEDIBKAaCBPhPKLBXIKAaAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAaAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAaAOPBBBPKLBAOCZFHOKALCDFHLAICZFGIAK6MBKKDNAOtMBAOHZAhCEFGhCLsMDXEKKCBHOXIKDNAKtMBAVCJDFASFHIAVASFPBDBHlCBHaINAIAVCJ/CBFAaFGLPBLBGxCEP9tAxCEPSGcP9OP9hP9RGxALAKFPBLBGkCEP9tAkAcP9OP9hP9RGkPMBZEhDoIaLcVxOqRlGyALAMFPBLBG8aCEP9tA8aAcP9OP9hP9RG8aALAXFPBLBGeCEP9tAeAcP9OP9hP9RGePMBZEhDoIaLcVxOqRlG3PMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIAlP9uGlPeBbDBAIADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAyA3PMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWkdyQ8aKeX3M5p8eS8fGxA8aAePMWkdyQ8aKeX3M5p8eS8fGkPMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFHIAaCZFGaAK6MBKKASCLFGSAD6MBKKABAdAD2FAVCJDFAQAD2/8QBBAVAVCJDFAQCUFAD2FAD/8QBBKAQCBAOeAdFHdAOMBKC9+HOXEKCBC99ARAO9rADCAADCA0eseHOKAVCJ/KBF8kJJJJBAOKWBZ+BJJJBK+KoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJE/8KBAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK/xVDIUO978jJJJJBCA9rGI8kJJJJBDNDNADCL9HMBDNAEC98gGLtMBABHDCBHVINADADPBBBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKBBADCZFHDAVCLFGVAL6MBKKALAE9PMEAIAECIgGVCDTGDvCBCZAD9r/8KBAIABALCDTFGLAD/8QBBDNAVtMBAIAIPBLBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKLBKALAIAD/8QBBXEKABAEC98gGDZ+HJJJBADAE9PMBAIAECIgGLCITGVFCBCAAV9r/8KBAIABADCITFGDAV/8QBBAIALZ+HJJJBADAIAV/8QBBKAICAF8kJJJJBK+yIDDUR97DNAEtMBCBHDINABCZFGIAIPBBBGLCBPhGVCJJ98P3ECJJ98P3IGOP9OABPBBBGRALPMLVORXMpScxql358e8fCffEPhP9OP/6EARALPMBEDIWdQKZhoaky8aeGLCZP+sEP/6EGWP/gEALCZP+rECZP+sEP/6EGdP/gEP/kEP/lEGLjB/+fsPaAdALAVP+2EGVAdCJJJJ94PhGQP9OP9RP/kEGdAdP/mEALALP/mEAWAVAWAQP9OP9RP/kEGLALP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGVP/kECZP+rEAdAWP/mEAVP/kECffIPhP9OP9QGdALAWP/mEAVP/kECUPSCBPlDCBPlICBPlOCBPlRCBPlQCBPlKCBPlpCBPlSP9OGLPMWdkyQK8aeXM35pS8e8fP9QPKBBABARAOP9OAdALPMBEZhDIoaLVcxORqlP9QPKBBABCAFHBADCLFGDAE6MBKKK94EIU8jJJJJBCA9rGI8kJJJJBABAEC98gGLZ+JJJJBDNALAE9PMBAIAECIgGVCITGEFCBCAAE9r/8KBAIABALCITFGBAE/8QBBAIAVZ+JJJJBABAIAE/8QBBKAICAF8kJJJJBK/hILDUE97EUV978jJJJJBCZ9rHDDNAEtMBCBHIINADABPBBBGLABCZFGVPBBBGOPMLVORXMpScxql358e8fGRCZP+sEGWCLP+rEPKLBABjBBJzPaj/zL81zPaAWCIPhP9QP/6EP/nEGWALAOPMBEDIWdQKZhoaky8aeGLCZP+rECZP+sEP/6EP/mEGOAOP/mEAWALCZP+sEP/6EP/mEGdAdP/mEAWARCZP+rECZP+sEP/6EP/mEGRARP/mEP/kEP/kEP/lECBPhP+4EP/jEjB/+fsPaGWP/mEjBBN0PaGLP/kECffIPhGQP9OAdAWP/mEALP/kECZP+rEP9QGdARAWP/mEALP/kECZP+rEAOAWP/mEALP/kEAQP9OP9QGWPMBEZhDIoaLVcxORqlGLP5BADPBLBPeB+t+J83IBABCWFALP5EADPBLBPeE+t+J83IBAVAdAWPMWdkyQK8aeXM35pS8e8fGWP5BADPBLBPeD+t+J83IBABCkFAWP5EADPBLBPeI+t+J83IBABCAFHBAICLFGIAE6MBKKK/3EDIUE978jJJJJBC/AB9rHIDNADCD4AE2GLC98gGVtMBCBHDABHEINAEAEPBBBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKBBAECZFHEADCLFGDAV6MBKKDNAVAL9PMBAIALCIgGDCDTGEvCBC/ABAE9r/8KBAIABAVCDTFGVAE/8QBBDNADtMBAIAIPBLBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKLBKAVAIAE/8QBBKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIKKKEBCJWKLZ9tBB");var n,a=WebAssembly.instantiate(function(t){for(var r=new Uint8Array(t.length),n=0;n<t.length;++n){var a=t.charCodeAt(n);r[n]=a>96?a-71:a>64?a-65:a>47?a+4:a>46?63:62}var o=0;for(n=0;n<t.length;++n)r[o++]=r[n]<60?e[r[n]]:64*(r[n]-60)+r[++n];return r.buffer.slice(0,o)}(r),{}).then((function(t){(n=t.instance).exports.__wasm_call_ctors()}));function o(t,e,r,a,o,i){var s=n.exports.sbrk,u=r+3&-4,A=s(u*a),E=s(o.length),l=new Uint8Array(n.exports.memory.buffer);l.set(o,E);var c=t(A,r,a,E,o.length);if(0==c&&i&&i(A,u,a),e.set(l.subarray(A,A+r*a)),s(A-s(0)),0!=c)throw new Error("Malformed buffer data: "+c)}var i={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},s={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return{ready:a,supported:!0,decodeVertexBuffer:function(t,e,r,a,s){o(n.exports.meshopt_decodeVertexBuffer,t,e,r,a,n.exports[i[s]])},decodeIndexBuffer:function(t,e,r,a){o(n.exports.meshopt_decodeIndexBuffer,t,e,r,a)},decodeIndexSequence:function(t,e,r,a){o(n.exports.meshopt_decodeIndexSequence,t,e,r,a)},decodeGltfBuffer:function(t,e,r,a,u,A){o(n.exports[s[u]],t,e,r,a,n.exports[i[A]])}}}(),st=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;typeof __filename<"u"&&(st=st||__filename);var ut,At,Et=typeof assimpjs<"u"?assimpjs:{};Et.ready=new Promise((function(t,e){ut=t,At=e}));var lt,ct,ft,Bt=Object.assign({},Et),dt="./this.program",yt="object"==typeof window,pt="function"==typeof importScripts,Ct="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,mt="";if(Ct){var ht=t("fs"),vt=t("path");mt=pt?vt.dirname(mt)+"/":__dirname+"/",lt=(t,e)=>(t=Qt(t)?new URL(t):vt.normalize(t),ht.readFileSync(t,e?void 0:"utf8")),ft=t=>{var e=lt(t,!0);return e.buffer||(e=new Uint8Array(e)),e},ct=(t,e,r)=>{t=Qt(t)?new URL(t):vt.normalize(t),ht.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},!Et.thisProgram&&process.argv.length>1&&(dt=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),Et.inspect=function(){return"[Emscripten Module object]"}}else(yt||pt)&&(pt?mt=self.location.href:typeof document<"u"&&document.currentScript&&(mt=document.currentScript.src),st&&(mt=st),mt=0!==mt.indexOf("blob:")?mt.substr(0,mt.replace(/[?#].*/,"").lastIndexOf("/")+1):"",lt=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},pt&&(ft=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),ct=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var gt,Pt=Et.print||console.log.bind(console),Tt=Et.printErr||console.warn.bind(console);Object.assign(Et,Bt),Bt=null,Et.arguments&&Et.arguments,Et.thisProgram&&(dt=Et.thisProgram),Et.quit&&Et.quit,Et.wasmBinary&&(gt=Et.wasmBinary),Et.noExitRuntime,"object"!=typeof WebAssembly&&Jt("no native wasm support detected");var Dt,_t,Ft,Lt,wt,bt,Mt,It,St,Ot=!1;function Nt(t,e){t||Jt(e)}function Rt(){var t=Dt.buffer;Et.HEAP8=_t=new Int8Array(t),Et.HEAP16=Lt=new Int16Array(t),Et.HEAP32=bt=new Int32Array(t),Et.HEAPU8=Ft=new Uint8Array(t),Et.HEAPU16=wt=new Uint16Array(t),Et.HEAPU32=Mt=new Uint32Array(t),Et.HEAPF32=It=new Float32Array(t),Et.HEAPF64=St=new Float64Array(t)}var xt,Ut=[],Gt=[],Kt=[];var Ht=0,kt=null;function Vt(t){Ht++,Et.monitorRunDependencies&&Et.monitorRunDependencies(Ht)}function Yt(t){if(Ht--,Et.monitorRunDependencies&&Et.monitorRunDependencies(Ht),0==Ht&&kt){var e=kt;kt=null,e()}}function Jt(t){Et.onAbort&&Et.onAbort(t),Tt(t="Aborted("+t+")"),Ot=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw At(e),e}var jt,Wt,zt,Xt;function Zt(t){return t.startsWith("data:application/octet-stream;base64,")}function Qt(t){return t.startsWith("file://")}function qt(t){try{if(t==jt&>)return new Uint8Array(gt);if(ft)return ft(t);throw"both async and sync fetching of the wasm failed"}catch(t){Jt(t)}}function $t(t,e,r){return function(t){if(!gt&&(yt||pt)){if("function"==typeof fetch&&!Qt(t))return fetch(t,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()})).catch((function(){return qt(t)}));if(ct)return new Promise((function(e,r){ct(t,(function(t){e(new Uint8Array(t))}),r)}))}return Promise.resolve().then((function(){return qt(t)}))}(t).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(t){return t})).then(r,(function(t){Tt("failed to asynchronously prepare wasm: "+t),Jt(t)}))}function te(t){for(;t.length>0;)t.shift()(Et)}Zt(jt="ThirdParty/assimpjs.wasm")||(Wt=jt,jt=Et.locateFile?Et.locateFile(Wt,mt):mt+Wt);var ee=[];function re(t){t.add_ref()}var ne=0;var ae=[];function oe(t){var e=ae[t];return e||(t>=ae.length&&(ae.length=t+1),ae[t]=e=xt.get(t)),e}function ie(t){if(t.release_ref()&&!t.get_rethrown()){var e=t.get_destructor();e&&oe(e)(t.excPtr),cn(t.excPtr)}}function se(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){Mt[this.ptr+4>>2]=t},this.get_type=function(){return Mt[this.ptr+4>>2]},this.set_destructor=function(t){Mt[this.ptr+8>>2]=t},this.get_destructor=function(){return Mt[this.ptr+8>>2]},this.set_refcount=function(t){bt[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,_t[this.ptr+12>>0]=t},this.get_caught=function(){return 0!=_t[this.ptr+12>>0]},this.set_rethrown=function(t){t=t?1:0,_t[this.ptr+13>>0]=t},this.get_rethrown=function(){return 0!=_t[this.ptr+13>>0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=bt[this.ptr>>2];bt[this.ptr>>2]=t+1},this.release_ref=function(){var t=bt[this.ptr>>2];return bt[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){Mt[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return Mt[this.ptr+16>>2]},this.get_exception_ptr=function(){if(gn(this.get_type()))return Mt[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}var ue=0;function Ae(){var t=ue;if(!t)return Cn(0),0;var e=new se(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return Cn(0),t;for(var n=0;n<arguments.length;n++){var a=arguments[n];if(0===a||a===r)break;var o=e.ptr+16;if(vn(a,r,o))return Cn(a),t}return Cn(r),t}var Ee=Ae,le=Ae,ce=Ae,fe=Ae;var Be={isAbs:t=>"/"===t.charAt(0),splitPath:t=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1),normalizeArray:(t,e)=>{for(var r=0,n=t.length-1;n>=0;n--){var a=t[n];"."===a?t.splice(n,1):".."===a?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},normalize:t=>{var e=Be.isAbs(t),r="/"===t.substr(-1);return!(t=Be.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))&&!e&&(t="."),t&&r&&(t+="/"),(e?"/":"")+t},dirname:t=>{var e=Be.splitPath(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:t=>{if("/"===t)return"/";var e=(t=(t=Be.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?t:t.substr(e+1)},join:function(){var t=Array.prototype.slice.call(arguments);return Be.normalize(t.join("/"))},join2:(t,e)=>Be.normalize(t+"/"+e)};function de(e){return(de=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return t=>crypto.getRandomValues(t);if(Ct)try{var e=t("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var r=e.randomBytes;return t=>(t.set(r(t.byteLength)),t)}catch{}Jt("initRandomDevice")}())(e)}var ye={resolve:function(){for(var t="",e=!1,r=arguments.length-1;r>=-1&&!e;r--){var n=r>=0?arguments[r]:Pe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,e=Be.isAbs(n)}return(e?"/":"")+(t=Be.normalizeArray(t.split("/").filter((t=>!!t)),!e).join("/"))||"."},relative:(t,e)=>{function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=ye.resolve(t).substr(1),e=ye.resolve(e).substr(1);for(var n=r(t.split("/")),a=r(e.split("/")),o=Math.min(n.length,a.length),i=o,s=0;s<o;s++)if(n[s]!==a[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(a.slice(i))).join("/")}};function pe(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}function Ce(t,e,r,n){if(!(n>0))return 0;for(var a=r,o=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&t.charCodeAt(++i);if(s<=127){if(r>=o)break;e[r++]=s}else if(s<=2047){if(r+1>=o)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=o)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-a}function me(t,e,r){var n=r>0?r:pe(t)+1,a=new Array(n),o=Ce(t,a,0,a.length);return e&&(a.length=o),a}var he={ttys:[],init:function(){},shutdown:function(){},register:function(t,e){he.ttys[t]={input:[],output:[],ops:e},Pe.registerDevice(t,he.stream_ops)},stream_ops:{open:function(t){var e=he.ttys[t.node.rdev];if(!e)throw new Pe.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.fsync(t.tty)},fsync:function(t){t.tty.ops.fsync(t.tty)},read:function(t,e,r,n,a){if(!t.tty||!t.tty.ops.get_char)throw new Pe.ErrnoError(60);for(var o=0,i=0;i<n;i++){var s;try{s=t.tty.ops.get_char(t.tty)}catch{throw new Pe.ErrnoError(29)}if(void 0===s&&0===o)throw new Pe.ErrnoError(6);if(null==s)break;o++,e[r+i]=s}return o&&(t.node.timestamp=Date.now()),o},write:function(t,e,r,n,a){if(!t.tty||!t.tty.ops.put_char)throw new Pe.ErrnoError(60);try{for(var o=0;o<n;o++)t.tty.ops.put_char(t.tty,e[r+o])}catch{throw new Pe.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:function(t){if(!t.input.length){var e=null;if(Ct){var r=Buffer.alloc(256),n=0;try{n=ht.readSync(process.stdin.fd,r,0,256,-1)}catch(t){if(!t.toString().includes("EOF"))throw t;n=0}e=n>0?r.slice(0,n).toString("utf-8"):null}else typeof window<"u"&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&(null!==(e=readline())&&(e+="\n"));if(!e)return null;t.input=me(e,!0)}return t.input.shift()},put_char:function(t,e){null===e||10===e?(Pt(De(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},fsync:function(t){t.output&&t.output.length>0&&(Pt(De(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,e){null===e||10===e?(Tt(De(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},fsync:function(t){t.output&&t.output.length>0&&(Tt(De(t.output,0)),t.output=[])}}};function ve(t){Jt()}var ge={ops_table:null,mount:function(t){return ge.createNode(null,"/",16895,0)},createNode:function(t,e,r,n){if(Pe.isBlkdev(r)||Pe.isFIFO(r))throw new Pe.ErrnoError(63);ge.ops_table||(ge.ops_table={dir:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr,lookup:ge.node_ops.lookup,mknod:ge.node_ops.mknod,rename:ge.node_ops.rename,unlink:ge.node_ops.unlink,rmdir:ge.node_ops.rmdir,readdir:ge.node_ops.readdir,symlink:ge.node_ops.symlink},stream:{llseek:ge.stream_ops.llseek}},file:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr},stream:{llseek:ge.stream_ops.llseek,read:ge.stream_ops.read,write:ge.stream_ops.write,allocate:ge.stream_ops.allocate,mmap:ge.stream_ops.mmap,msync:ge.stream_ops.msync}},link:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr,readlink:ge.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr},stream:Pe.chrdev_stream_ops}});var a=Pe.createNode(t,e,r,n);return Pe.isDir(a.mode)?(a.node_ops=ge.ops_table.dir.node,a.stream_ops=ge.ops_table.dir.stream,a.contents={}):Pe.isFile(a.mode)?(a.node_ops=ge.ops_table.file.node,a.stream_ops=ge.ops_table.file.stream,a.usedBytes=0,a.contents=null):Pe.isLink(a.mode)?(a.node_ops=ge.ops_table.link.node,a.stream_ops=ge.ops_table.link.stream):Pe.isChrdev(a.mode)&&(a.node_ops=ge.ops_table.chrdev.node,a.stream_ops=ge.ops_table.chrdev.stream),a.timestamp=Date.now(),t&&(t.contents[e]=a,t.timestamp=a.timestamp),a},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,e){var r=t.contents?t.contents.length:0;if(!(r>=e)){e=Math.max(e,r*(r<1048576?2:1.125)>>>0),0!=r&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,e){if(t.usedBytes!=e)if(0==e)t.contents=null,t.usedBytes=0;else{var r=t.contents;t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),t.usedBytes=e}},node_ops:{getattr:function(t){var e={};return e.dev=Pe.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,Pe.isDir(t.mode)?e.size=4096:Pe.isFile(t.mode)?e.size=t.usedBytes:Pe.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,e){void 0!==e.mode&&(t.mode=e.mode),void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.size&&ge.resizeFileStorage(t,e.size)},lookup:function(t,e){throw Pe.genericErrors[44]},mknod:function(t,e,r,n){return ge.createNode(t,e,r,n)},rename:function(t,e,r){if(Pe.isDir(t.mode)){var n;try{n=Pe.lookupNode(e,r)}catch{}if(n)for(var a in n.contents)throw new Pe.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=r,e.contents[r]=t,e.timestamp=t.parent.timestamp,t.parent=e},unlink:function(t,e){delete t.contents[e],t.timestamp=Date.now()},rmdir:function(t,e){var r=Pe.lookupNode(t,e);for(var n in r.contents)throw new Pe.ErrnoError(55);delete t.contents[e],t.timestamp=Date.now()},readdir:function(t){var e=[".",".."];for(var r in t.contents)!t.contents.hasOwnProperty(r)||e.push(r);return e},symlink:function(t,e,r){var n=ge.createNode(t,e,41471,0);return n.link=r,n},readlink:function(t){if(!Pe.isLink(t.mode))throw new Pe.ErrnoError(28);return t.link}},stream_ops:{read:function(t,e,r,n,a){var o=t.node.contents;if(a>=t.node.usedBytes)return 0;var i=Math.min(t.node.usedBytes-a,n);if(i>8&&o.subarray)e.set(o.subarray(a,a+i),r);else for(var s=0;s<i;s++)e[r+s]=o[a+s];return i},write:function(t,e,r,n,a,o){if(e.buffer===_t.buffer&&(o=!1),!n)return 0;var i=t.node;if(i.timestamp=Date.now(),e.subarray&&(!i.contents||i.contents.subarray)){if(o)return i.contents=e.subarray(r,r+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===a)return i.contents=e.slice(r,r+n),i.usedBytes=n,n;if(a+n<=i.usedBytes)return i.contents.set(e.subarray(r,r+n),a),n}if(ge.expandFileStorage(i,a+n),i.contents.subarray&&e.subarray)i.contents.set(e.subarray(r,r+n),a);else for(var s=0;s<n;s++)i.contents[a+s]=e[r+s];return i.usedBytes=Math.max(i.usedBytes,a+n),n},llseek:function(t,e,r){var n=e;if(1===r?n+=t.position:2===r&&Pe.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new Pe.ErrnoError(28);return n},allocate:function(t,e,r){ge.expandFileStorage(t.node,e+r),t.node.usedBytes=Math.max(t.node.usedBytes,e+r)},mmap:function(t,e,r,n,a){if(!Pe.isFile(t.node.mode))throw new Pe.ErrnoError(43);var o,i,s=t.node.contents;if(2&a||s.buffer!==_t.buffer){if((r>0||r+e<s.length)&&(s=s.subarray?s.subarray(r,r+e):Array.prototype.slice.call(s,r,r+e)),i=!0,!(o=ve()))throw new Pe.ErrnoError(48);_t.set(s,o)}else i=!1,o=s.byteOffset;return{ptr:o,allocated:i}},msync:function(t,e,r,n,a){return ge.stream_ops.write(t,e,0,n,r,!1),0}}};var Pe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(t,e={})=>{if(!(t=ye.resolve(t)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new Pe.ErrnoError(32);for(var r=t.split("/").filter((t=>!!t)),n=Pe.root,a="/",o=0;o<r.length;o++){var i=o===r.length-1;if(i&&e.parent)break;if(n=Pe.lookupNode(n,r[o]),a=Be.join2(a,r[o]),Pe.isMountpoint(n)&&(!i||i&&e.follow_mount)&&(n=n.mounted.root),!i||e.follow)for(var s=0;Pe.isLink(n.mode);){var u=Pe.readlink(a);if(a=ye.resolve(Be.dirname(a),u),n=Pe.lookupPath(a,{recurse_count:e.recurse_count+1}).node,s++>40)throw new Pe.ErrnoError(32)}}return{path:a,node:n}},getPath:t=>{for(var e;;){if(Pe.isRoot(t)){var r=t.mount.mountpoint;return e?"/"!==r[r.length-1]?r+"/"+e:r+e:r}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:(t,e)=>{for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%Pe.nameTable.length},hashAddNode:t=>{var e=Pe.hashName(t.parent.id,t.name);t.name_next=Pe.nameTable[e],Pe.nameTable[e]=t},hashRemoveNode:t=>{var e=Pe.hashName(t.parent.id,t.name);if(Pe.nameTable[e]===t)Pe.nameTable[e]=t.name_next;else for(var r=Pe.nameTable[e];r;){if(r.name_next===t){r.name_next=t.name_next;break}r=r.name_next}},lookupNode:(t,e)=>{var r=Pe.mayLookup(t);if(r)throw new Pe.ErrnoError(r,t);for(var n=Pe.hashName(t.id,e),a=Pe.nameTable[n];a;a=a.name_next){var o=a.name;if(a.parent.id===t.id&&o===e)return a}return Pe.lookup(t,e)},createNode:(t,e,r,n)=>{var a=new Pe.FSNode(t,e,r,n);return Pe.hashAddNode(a),a},destroyNode:t=>{Pe.hashRemoveNode(t)},isRoot:t=>t===t.parent,isMountpoint:t=>!!t.mounted,isFile:t=>32768==(61440&t),isDir:t=>16384==(61440&t),isLink:t=>40960==(61440&t),isChrdev:t=>8192==(61440&t),isBlkdev:t=>24576==(61440&t),isFIFO:t=>4096==(61440&t),isSocket:t=>49152==(49152&t),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:t=>{var e=Pe.flagModes[t];if(typeof e>"u")throw new Error("Unknown file open mode: "+t);return e},flagsToPermissionString:t=>{var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},nodePermissions:(t,e)=>Pe.ignorePermissions?0:e.includes("r")&&!(292&t.mode)||e.includes("w")&&!(146&t.mode)||e.includes("x")&&!(73&t.mode)?2:0,mayLookup:t=>Pe.nodePermissions(t,"x")||(t.node_ops.lookup?0:2),mayCreate:(t,e)=>{try{Pe.lookupNode(t,e);return 20}catch{}return Pe.nodePermissions(t,"wx")},mayDelete:(t,e,r)=>{var n;try{n=Pe.lookupNode(t,e)}catch(t){return t.errno}var a=Pe.nodePermissions(t,"wx");if(a)return a;if(r){if(!Pe.isDir(n.mode))return 54;if(Pe.isRoot(n)||Pe.getPath(n)===Pe.cwd())return 10}else if(Pe.isDir(n.mode))return 31;return 0},mayOpen:(t,e)=>t?Pe.isLink(t.mode)?32:Pe.isDir(t.mode)&&("r"!==Pe.flagsToPermissionString(e)||512&e)?31:Pe.nodePermissions(t,Pe.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(t=0,e=Pe.MAX_OPEN_FDS)=>{for(var r=t;r<=e;r++)if(!Pe.streams[r])return r;throw new Pe.ErrnoError(33)},getStream:t=>Pe.streams[t],createStream:(t,e,r)=>{Pe.FSStream||(Pe.FSStream=function(){this.shared={}},Pe.FSStream.prototype={},Object.defineProperties(Pe.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(t){this.shared.flags=t}},position:{get:function(){return this.shared.position},set:function(t){this.shared.position=t}}})),t=Object.assign(new Pe.FSStream,t);var n=Pe.nextfd(e,r);return t.fd=n,Pe.streams[n]=t,t},closeStream:t=>{Pe.streams[t]=null},chrdev_stream_ops:{open:t=>{var e=Pe.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:()=>{throw new Pe.ErrnoError(70)}},major:t=>t>>8,minor:t=>255&t,makedev:(t,e)=>t<<8|e,registerDevice:(t,e)=>{Pe.devices[t]={stream_ops:e}},getDevice:t=>Pe.devices[t],getMounts:t=>{for(var e=[],r=[t];r.length;){var n=r.pop();e.push(n),r.push.apply(r,n.mounts)}return e},syncfs:(t,e)=>{"function"==typeof t&&(e=t,t=!1),Pe.syncFSRequests++,Pe.syncFSRequests>1&&Tt("warning: "+Pe.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=Pe.getMounts(Pe.root.mount),n=0;function a(t){return Pe.syncFSRequests--,e(t)}function o(t){if(t)return o.errored?void 0:(o.errored=!0,a(t));++n>=r.length&&a(null)}r.forEach((e=>{if(!e.type.syncfs)return o(null);e.type.syncfs(e,t,o)}))},mount:(t,e,r)=>{var n,a="/"===r,o=!r;if(a&&Pe.root)throw new Pe.ErrnoError(10);if(!a&&!o){var i=Pe.lookupPath(r,{follow_mount:!1});if(r=i.path,n=i.node,Pe.isMountpoint(n))throw new Pe.ErrnoError(10);if(!Pe.isDir(n.mode))throw new Pe.ErrnoError(54)}var s={type:t,opts:e,mountpoint:r,mounts:[]},u=t.mount(s);return u.mount=s,s.root=u,a?Pe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:t=>{var e=Pe.lookupPath(t,{follow_mount:!1});if(!Pe.isMountpoint(e.node))throw new Pe.ErrnoError(28);var r=e.node,n=r.mounted,a=Pe.getMounts(n);Object.keys(Pe.nameTable).forEach((t=>{for(var e=Pe.nameTable[t];e;){var r=e.name_next;a.includes(e.mount)&&Pe.destroyNode(e),e=r}})),r.mounted=null;var o=r.mount.mounts.indexOf(n);r.mount.mounts.splice(o,1)},lookup:(t,e)=>t.node_ops.lookup(t,e),mknod:(t,e,r)=>{var n=Pe.lookupPath(t,{parent:!0}).node,a=Be.basename(t);if(!a||"."===a||".."===a)throw new Pe.ErrnoError(28);var o=Pe.mayCreate(n,a);if(o)throw new Pe.ErrnoError(o);if(!n.node_ops.mknod)throw new Pe.ErrnoError(63);return n.node_ops.mknod(n,a,e,r)},create:(t,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,Pe.mknod(t,e,0)),mkdir:(t,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,Pe.mknod(t,e,0)),mkdirTree:(t,e)=>{for(var r=t.split("/"),n="",a=0;a<r.length;++a)if(r[a]){n+="/"+r[a];try{Pe.mkdir(n,e)}catch(t){if(20!=t.errno)throw t}}},mkdev:(t,e,r)=>(typeof r>"u"&&(r=e,e=438),e|=8192,Pe.mknod(t,e,r)),symlink:(t,e)=>{if(!ye.resolve(t))throw new Pe.ErrnoError(44);var r=Pe.lookupPath(e,{parent:!0}).node;if(!r)throw new Pe.ErrnoError(44);var n=Be.basename(e),a=Pe.mayCreate(r,n);if(a)throw new Pe.ErrnoError(a);if(!r.node_ops.symlink)throw new Pe.ErrnoError(63);return r.node_ops.symlink(r,n,t)},rename:(t,e)=>{var r,n,a=Be.dirname(t),o=Be.dirname(e),i=Be.basename(t),s=Be.basename(e);if(r=Pe.lookupPath(t,{parent:!0}).node,n=Pe.lookupPath(e,{parent:!0}).node,!r||!n)throw new Pe.ErrnoError(44);if(r.mount!==n.mount)throw new Pe.ErrnoError(75);var u,A=Pe.lookupNode(r,i),E=ye.relative(t,o);if("."!==E.charAt(0))throw new Pe.ErrnoError(28);if("."!==(E=ye.relative(e,a)).charAt(0))throw new Pe.ErrnoError(55);try{u=Pe.lookupNode(n,s)}catch{}if(A!==u){var l=Pe.isDir(A.mode),c=Pe.mayDelete(r,i,l);if(c)throw new Pe.ErrnoError(c);if(c=u?Pe.mayDelete(n,s,l):Pe.mayCreate(n,s))throw new Pe.ErrnoError(c);if(!r.node_ops.rename)throw new Pe.ErrnoError(63);if(Pe.isMountpoint(A)||u&&Pe.isMountpoint(u))throw new Pe.ErrnoError(10);if(n!==r&&(c=Pe.nodePermissions(r,"w")))throw new Pe.ErrnoError(c);Pe.hashRemoveNode(A);try{r.node_ops.rename(A,n,s)}catch(t){throw t}finally{Pe.hashAddNode(A)}}},rmdir:t=>{var e=Pe.lookupPath(t,{parent:!0}).node,r=Be.basename(t),n=Pe.lookupNode(e,r),a=Pe.mayDelete(e,r,!0);if(a)throw new Pe.ErrnoError(a);if(!e.node_ops.rmdir)throw new Pe.ErrnoError(63);if(Pe.isMountpoint(n))throw new Pe.ErrnoError(10);e.node_ops.rmdir(e,r),Pe.destroyNode(n)},readdir:t=>{var e=Pe.lookupPath(t,{follow:!0}).node;if(!e.node_ops.readdir)throw new Pe.ErrnoError(54);return e.node_ops.readdir(e)},unlink:t=>{var e=Pe.lookupPath(t,{parent:!0}).node;if(!e)throw new Pe.ErrnoError(44);var r=Be.basename(t),n=Pe.lookupNode(e,r),a=Pe.mayDelete(e,r,!1);if(a)throw new Pe.ErrnoError(a);if(!e.node_ops.unlink)throw new Pe.ErrnoError(63);if(Pe.isMountpoint(n))throw new Pe.ErrnoError(10);e.node_ops.unlink(e,r),Pe.destroyNode(n)},readlink:t=>{var e=Pe.lookupPath(t).node;if(!e)throw new Pe.ErrnoError(44);if(!e.node_ops.readlink)throw new Pe.ErrnoError(28);return ye.resolve(Pe.getPath(e.parent),e.node_ops.readlink(e))},stat:(t,e)=>{var r=Pe.lookupPath(t,{follow:!e}).node;if(!r)throw new Pe.ErrnoError(44);if(!r.node_ops.getattr)throw new Pe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:t=>Pe.stat(t,!0),chmod:(t,e,r)=>{var n;"string"==typeof t?n=Pe.lookupPath(t,{follow:!r}).node:n=t;if(!n.node_ops.setattr)throw new Pe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(t,e)=>{Pe.chmod(t,e,!0)},fchmod:(t,e)=>{var r=Pe.getStream(t);if(!r)throw new Pe.ErrnoError(8);Pe.chmod(r.node,e)},chown:(t,e,r,n)=>{var a;"string"==typeof t?a=Pe.lookupPath(t,{follow:!n}).node:a=t;if(!a.node_ops.setattr)throw new Pe.ErrnoError(63);a.node_ops.setattr(a,{timestamp:Date.now()})},lchown:(t,e,r)=>{Pe.chown(t,e,r,!0)},fchown:(t,e,r)=>{var n=Pe.getStream(t);if(!n)throw new Pe.ErrnoError(8);Pe.chown(n.node,e,r)},truncate:(t,e)=>{if(e<0)throw new Pe.ErrnoError(28);var r;"string"==typeof t?r=Pe.lookupPath(t,{follow:!0}).node:r=t;if(!r.node_ops.setattr)throw new Pe.ErrnoError(63);if(Pe.isDir(r.mode))throw new Pe.ErrnoError(31);if(!Pe.isFile(r.mode))throw new Pe.ErrnoError(28);var n=Pe.nodePermissions(r,"w");if(n)throw new Pe.ErrnoError(n);r.node_ops.setattr(r,{size:e,timestamp:Date.now()})},ftruncate:(t,e)=>{var r=Pe.getStream(t);if(!r)throw new Pe.ErrnoError(8);if(0==(2097155&r.flags))throw new Pe.ErrnoError(28);Pe.truncate(r.node,e)},utime:(t,e,r)=>{var n=Pe.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,r)})},open:(t,e,r)=>{if(""===t)throw new Pe.ErrnoError(44);var n;if(r=typeof r>"u"?438:r,r=64&(e="string"==typeof e?Pe.modeStringToFlags(e):e)?4095&r|32768:0,"object"==typeof t)n=t;else{t=Be.normalize(t);try{n=Pe.lookupPath(t,{follow:!(131072&e)}).node}catch{}}var a=!1;if(64&e)if(n){if(128&e)throw new Pe.ErrnoError(20)}else n=Pe.mknod(t,r,0),a=!0;if(!n)throw new Pe.ErrnoError(44);if(Pe.isChrdev(n.mode)&&(e&=-513),65536&e&&!Pe.isDir(n.mode))throw new Pe.ErrnoError(54);if(!a){var o=Pe.mayOpen(n,e);if(o)throw new Pe.ErrnoError(o)}512&e&&!a&&Pe.truncate(n,0),e&=-131713;var i=Pe.createStream({node:n,path:Pe.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),Et.logReadFiles&&!(1&e)&&(Pe.readFiles||(Pe.readFiles={}),t in Pe.readFiles||(Pe.readFiles[t]=1)),i},close:t=>{if(Pe.isClosed(t))throw new Pe.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{Pe.closeStream(t.fd)}t.fd=null},isClosed:t=>null===t.fd,llseek:(t,e,r)=>{if(Pe.isClosed(t))throw new Pe.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new Pe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Pe.ErrnoError(28);return t.position=t.stream_ops.llseek(t,e,r),t.ungotten=[],t.position},read:(t,e,r,n,a)=>{if(n<0||a<0)throw new Pe.ErrnoError(28);if(Pe.isClosed(t))throw new Pe.ErrnoError(8);if(1==(2097155&t.flags))throw new Pe.ErrnoError(8);if(Pe.isDir(t.node.mode))throw new Pe.ErrnoError(31);if(!t.stream_ops.read)throw new Pe.ErrnoError(28);var o=typeof a<"u";if(o){if(!t.seekable)throw new Pe.ErrnoError(70)}else a=t.position;var i=t.stream_ops.read(t,e,r,n,a);return o||(t.position+=i),i},write:(t,e,r,n,a,o)=>{if(n<0||a<0)throw new Pe.ErrnoError(28);if(Pe.isClosed(t))throw new Pe.ErrnoError(8);if(0==(2097155&t.flags))throw new Pe.ErrnoError(8);if(Pe.isDir(t.node.mode))throw new Pe.ErrnoError(31);if(!t.stream_ops.write)throw new Pe.ErrnoError(28);t.seekable&&1024&t.flags&&Pe.llseek(t,0,2);var i=typeof a<"u";if(i){if(!t.seekable)throw new Pe.ErrnoError(70)}else a=t.position;var s=t.stream_ops.write(t,e,r,n,a,o);return i||(t.position+=s),s},allocate:(t,e,r)=>{if(Pe.isClosed(t))throw new Pe.ErrnoError(8);if(e<0||r<=0)throw new Pe.ErrnoError(28);if(0==(2097155&t.flags))throw new Pe.ErrnoError(8);if(!Pe.isFile(t.node.mode)&&!Pe.isDir(t.node.mode))throw new Pe.ErrnoError(43);if(!t.stream_ops.allocate)throw new Pe.ErrnoError(138);t.stream_ops.allocate(t,e,r)},mmap:(t,e,r,n,a)=>{if(0!=(2&n)&&0==(2&a)&&2!=(2097155&t.flags))throw new Pe.ErrnoError(2);if(1==(2097155&t.flags))throw new Pe.ErrnoError(2);if(!t.stream_ops.mmap)throw new Pe.ErrnoError(43);return t.stream_ops.mmap(t,e,r,n,a)},msync:(t,e,r,n,a)=>t.stream_ops.msync?t.stream_ops.msync(t,e,r,n,a):0,munmap:t=>0,ioctl:(t,e,r)=>{if(!t.stream_ops.ioctl)throw new Pe.ErrnoError(59);return t.stream_ops.ioctl(t,e,r)},readFile:(t,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var r,n=Pe.open(t,e.flags),a=Pe.stat(t).size,o=new Uint8Array(a);return Pe.read(n,o,0,a,0),"utf8"===e.encoding?r=De(o,0):"binary"===e.encoding&&(r=o),Pe.close(n),r},writeFile:(t,e,r={})=>{r.flags=r.flags||577;var n=Pe.open(t,r.flags,r.mode);if("string"==typeof e){var a=new Uint8Array(pe(e)+1),o=Ce(e,a,0,a.length);Pe.write(n,a,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Pe.write(n,e,0,e.byteLength,void 0,r.canOwn)}Pe.close(n)},cwd:()=>Pe.currentPath,chdir:t=>{var e=Pe.lookupPath(t,{follow:!0});if(null===e.node)throw new Pe.ErrnoError(44);if(!Pe.isDir(e.node.mode))throw new Pe.ErrnoError(54);var r=Pe.nodePermissions(e.node,"x");if(r)throw new Pe.ErrnoError(r);Pe.currentPath=e.path},createDefaultDirectories:()=>{Pe.mkdir("/tmp"),Pe.mkdir("/home"),Pe.mkdir("/home/web_user")},createDefaultDevices:()=>{Pe.mkdir("/dev"),Pe.registerDevice(Pe.makedev(1,3),{read:()=>0,write:(t,e,r,n,a)=>n}),Pe.mkdev("/dev/null",Pe.makedev(1,3)),he.register(Pe.makedev(5,0),he.default_tty_ops),he.register(Pe.makedev(6,0),he.default_tty1_ops),Pe.mkdev("/dev/tty",Pe.makedev(5,0)),Pe.mkdev("/dev/tty1",Pe.makedev(6,0));var t=new Uint8Array(1024),e=0,r=()=>(0===e&&(e=de(t).byteLength),t[--e]);Pe.createDevice("/dev","random",r),Pe.createDevice("/dev","urandom",r),Pe.mkdir("/dev/shm"),Pe.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Pe.mkdir("/proc");var t=Pe.mkdir("/proc/self");Pe.mkdir("/proc/self/fd"),Pe.mount({mount:()=>{var e=Pe.createNode(t,"fd",16895,73);return e.node_ops={lookup:(t,e)=>{var r=+e,n=Pe.getStream(r);if(!n)throw new Pe.ErrnoError(8);var a={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return a.parent=a,a}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{Et.stdin?Pe.createDevice("/dev","stdin",Et.stdin):Pe.symlink("/dev/tty","/dev/stdin"),Et.stdout?Pe.createDevice("/dev","stdout",null,Et.stdout):Pe.symlink("/dev/tty","/dev/stdout"),Et.stderr?Pe.createDevice("/dev","stderr",null,Et.stderr):Pe.symlink("/dev/tty1","/dev/stderr"),Pe.open("/dev/stdin",0),Pe.open("/dev/stdout",1),Pe.open("/dev/stderr",1)},ensureErrnoError:()=>{Pe.ErrnoError||(Pe.ErrnoError=function(t,e){this.name="ErrnoError",this.node=e,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},Pe.ErrnoError.prototype=new Error,Pe.ErrnoError.prototype.constructor=Pe.ErrnoError,[44].forEach((t=>{Pe.genericErrors[t]=new Pe.ErrnoError(t),Pe.genericErrors[t].stack="<generic error, no stack>"})))},staticInit:()=>{Pe.ensureErrnoError(),Pe.nameTable=new Array(4096),Pe.mount(ge,{},"/"),Pe.createDefaultDirectories(),Pe.createDefaultDevices(),Pe.createSpecialDirectories(),Pe.filesystems={MEMFS:ge}},init:(t,e,r)=>{Pe.init.initialized=!0,Pe.ensureErrnoError(),Et.stdin=t||Et.stdin,Et.stdout=e||Et.stdout,Et.stderr=r||Et.stderr,Pe.createStandardStreams()},quit:()=>{Pe.init.initialized=!1;for(var t=0;t<Pe.streams.length;t++){var e=Pe.streams[t];!e||Pe.close(e)}},getMode:(t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r},findObject:(t,e)=>{var r=Pe.analyzePath(t,e);return r.exists?r.object:null},analyzePath:(t,e)=>{try{t=(n=Pe.lookupPath(t,{follow:!e})).path}catch{}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Pe.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=Be.basename(t),n=Pe.lookupPath(t,{follow:!e}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(t){r.error=t.errno}return r},createPath:(t,e,r,n)=>{t="string"==typeof t?t:Pe.getPath(t);for(var a=e.split("/").reverse();a.length;){var o=a.pop();if(o){var i=Be.join2(t,o);try{Pe.mkdir(i)}catch{}t=i}}return i},createFile:(t,e,r,n,a)=>{var o=Be.join2("string"==typeof t?t:Pe.getPath(t),e),i=Pe.getMode(n,a);return Pe.create(o,i)},createDataFile:(t,e,r,n,a,o)=>{var i=e;t&&(t="string"==typeof t?t:Pe.getPath(t),i=e?Be.join2(t,e):t);var s=Pe.getMode(n,a),u=Pe.create(i,s);if(r){if("string"==typeof r){for(var A=new Array(r.length),E=0,l=r.length;E<l;++E)A[E]=r.charCodeAt(E);r=A}Pe.chmod(u,146|s);var c=Pe.open(u,577);Pe.write(c,r,0,r.length,0,o),Pe.close(c),Pe.chmod(u,s)}return u},createDevice:(t,e,r,n)=>{var a=Be.join2("string"==typeof t?t:Pe.getPath(t),e),o=Pe.getMode(!!r,!!n);Pe.createDevice.major||(Pe.createDevice.major=64);var i=Pe.makedev(Pe.createDevice.major++,0);return Pe.registerDevice(i,{open:t=>{t.seekable=!1},close:t=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(t,e,n,a,o)=>{for(var i=0,s=0;s<a;s++){var u;try{u=r()}catch{throw new Pe.ErrnoError(29)}if(void 0===u&&0===i)throw new Pe.ErrnoError(6);if(null==u)break;i++,e[n+s]=u}return i&&(t.node.timestamp=Date.now()),i},write:(t,e,r,a,o)=>{for(var i=0;i<a;i++)try{n(e[r+i])}catch{throw new Pe.ErrnoError(29)}return a&&(t.node.timestamp=Date.now()),i}}),Pe.mkdev(a,o,i)},forceLoadFile:t=>{if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!lt)throw new Error("Cannot load without read() or XMLHttpRequest.");try{t.contents=me(lt(t.url),!0),t.usedBytes=t.contents.length}catch{throw new Pe.ErrnoError(29)}},createLazyFile:(t,e,r,n,a)=>{function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,r=t/this.chunkSize|0;return this.getter(r)[e]}},o.prototype.setDataGetter=function(t){this.getter=t},o.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",r,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),a=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,o=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;a||(i=n);var s=this;s.setDataGetter((t=>{var e=t*i,a=(t+1)*i-1;if(a=Math.min(a,n-1),typeof s.chunks[t]>"u"&&(s.chunks[t]=((t,e)=>{if(t>e)throw new Error("invalid range ("+t+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var a=new XMLHttpRequest;if(a.open("GET",r,!1),n!==i&&a.setRequestHeader("Range","bytes="+t+"-"+e),a.responseType="arraybuffer",a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined"),a.send(null),!(a.status>=200&&a.status<300||304===a.status))throw new Error("Couldn't load "+r+". Status: "+a.status);return void 0!==a.response?new Uint8Array(a.response||[]):me(a.responseText||"",!0)})(e,a)),typeof s.chunks[t]>"u")throw new Error("doXHR failed!");return s.chunks[t]})),(o||!n)&&(i=n=1,n=this.getter(0).length,i=n,Pt("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!pt)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new o;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:r};var u=Pe.createFile(t,e,s,n,a);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var A={};function E(t,e,r,n,a){var o=t.node.contents;if(a>=o.length)return 0;var i=Math.min(o.length-a,n);if(o.slice)for(var s=0;s<i;s++)e[r+s]=o[a+s];else for(s=0;s<i;s++)e[r+s]=o.get(a+s);return i}return Object.keys(u.stream_ops).forEach((t=>{var e=u.stream_ops[t];A[t]=function(){return Pe.forceLoadFile(u),e.apply(null,arguments)}})),A.read=(t,e,r,n,a)=>(Pe.forceLoadFile(u),E(t,e,r,n,a)),A.mmap=(t,e,r,n,a)=>{Pe.forceLoadFile(u);var o=ve();if(!o)throw new Pe.ErrnoError(48);return E(t,_t,o,e,r),{ptr:o,allocated:!0}},u.stream_ops=A,u},createPreloadedFile:(t,e,r,n,a,o,i,s,u,A)=>{var E=e?ye.resolve(Be.join2(t,e)):t;function l(r){function l(r){A&&A(),s||Pe.createDataFile(t,e,r,n,a,u),o&&o(),Yt()}Browser.handledByPreloadPlugin(r,E,l,(()=>{i&&i(),Yt()}))||l(r)}Vt(),"string"==typeof r?function(t,e,r,n){var a=n?"":"al "+t;ct(t,(r=>{Nt(r,'Loading data file "'+t+'" failed (no arrayBuffer).'),e(new Uint8Array(r)),a&&Yt()}),(e=>{if(!r)throw'Loading data file "'+t+'" failed.';r()})),a&&Vt()}(r,(t=>l(t)),i):l(r)}},Te=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function De(t,e,r){for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Te)return Te.decode(t.subarray(e,a));for(var o="";e<a;){var i=t[e++];if(128&i){var s=63&t[e++];if(192!=(224&i)){var u=63&t[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&t[e++])<65536)o+=String.fromCharCode(i);else{var A=i-65536;o+=String.fromCharCode(55296|A>>10,56320|1023&A)}}else o+=String.fromCharCode((31&i)<<6|s)}else o+=String.fromCharCode(i)}return o}function _e(t,e){return t?De(Ft,t,e):""}var Fe={DEFAULT_POLLMASK:5,calculateAt:function(t,e,r){if(Be.isAbs(e))return e;var n;-100===t?n=Pe.cwd():n=Fe.getStreamFromFD(t).path;if(0==e.length){if(!r)throw new Pe.ErrnoError(44);return n}return Be.join2(n,e)},doStat:function(t,e,r){try{var n=t(e)}catch(t){if(t&&t.node&&Be.normalize(e)!==Be.normalize(Pe.getPath(t.node)))return-54;throw t}bt[r>>2]=n.dev,bt[r+8>>2]=n.ino,bt[r+12>>2]=n.mode,Mt[r+16>>2]=n.nlink,bt[r+20>>2]=n.uid,bt[r+24>>2]=n.gid,bt[r+28>>2]=n.rdev,Xt=[n.size>>>0,(zt=n.size,+Math.abs(zt)>=1?zt>0?(0|Math.min(+Math.floor(zt/4294967296),4294967295))>>>0:~~+Math.ceil((zt-+(~~zt>>>0))/4294967296)>>>0:0)],bt[r+40>>2]=Xt[0],bt[r+44>>2]=Xt[1],bt[r+48>>2]=4096,bt[r+52>>2]=n.blocks;var a=n.atime.getTime(),o=n.mtime.getTime(),i=n.ctime.getTime();return Xt=[Math.floor(a/1e3)>>>0,(zt=Math.floor(a/1e3),+Math.abs(zt)>=1?zt>0?(0|Math.min(+Math.floor(zt/4294967296),4294967295))>>>0:~~+Math.ceil((zt-+(~~zt>>>0))/4294967296)>>>0:0)],bt[r+56>>2]=Xt[0],bt[r+60>>2]=Xt[1],Mt[r+64>>2]=a%1e3*1e3,Xt=[Math.floor(o/1e3)>>>0,(zt=Math.floor(o/1e3),+Math.abs(zt)>=1?zt>0?(0|Math.min(+Math.floor(zt/4294967296),4294967295))>>>0:~~+Math.ceil((zt-+(~~zt>>>0))/4294967296)>>>0:0)],bt[r+72>>2]=Xt[0],bt[r+76>>2]=Xt[1],Mt[r+80>>2]=o%1e3*1e3,Xt=[Math.floor(i/1e3)>>>0,(zt=Math.floor(i/1e3),+Math.abs(zt)>=1?zt>0?(0|Math.min(+Math.floor(zt/4294967296),4294967295))>>>0:~~+Math.ceil((zt-+(~~zt>>>0))/4294967296)>>>0:0)],bt[r+88>>2]=Xt[0],bt[r+92>>2]=Xt[1],Mt[r+96>>2]=i%1e3*1e3,Xt=[n.ino>>>0,(zt=n.ino,+Math.abs(zt)>=1?zt>0?(0|Math.min(+Math.floor(zt/4294967296),4294967295))>>>0:~~+Math.ceil((zt-+(~~zt>>>0))/4294967296)>>>0:0)],bt[r+104>>2]=Xt[0],bt[r+108>>2]=Xt[1],0},doMsync:function(t,e,r,n,a){if(!Pe.isFile(e.node.mode))throw new Pe.ErrnoError(43);if(2&n)return 0;var o=Ft.slice(t,t+r);Pe.msync(e,o,a,r,n)},varargs:void 0,get:function(){return Fe.varargs+=4,bt[Fe.varargs-4>>2]},getStr:function(t){return _e(t)},getStreamFromFD:function(t){var e=Pe.getStream(t);if(!e)throw new Pe.ErrnoError(8);return e}};function Le(t,e,r){return Ce(t,Ft,e,r)}function we(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var be=void 0;function Me(t){for(var e="",r=t;Ft[r];)e+=be[Ft[r++]];return e}var Ie={},Se={},Oe={};function Ne(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?"_"+t:t}function Re(t,e){return{[t=Ne(t)]:function(){return e.apply(this,arguments)}}[t]}function xe(t,e){var r=Re(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var Ue=void 0;function Ge(t){throw new Ue(t)}var Ke=void 0;function He(t){throw new Ke(t)}function ke(t,e,r){function n(e){var n=r(e);n.length!==t.length&&He("Mismatched type converter count");for(var a=0;a<t.length;++a)Ve(t[a],n[a])}t.forEach((function(t){Oe[t]=e}));var a=new Array(e.length),o=[],i=0;e.forEach(((t,e)=>{Se.hasOwnProperty(t)?a[e]=Se[t]:(o.push(t),Ie.hasOwnProperty(t)||(Ie[t]=[]),Ie[t].push((()=>{a[e]=Se[t],++i===o.length&&n(a)})))})),0===o.length&&n(a)}function Ve(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||Ge('type "'+n+'" must have a positive integer typeid pointer'),Se.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;Ge("Cannot register type '"+n+"' twice")}if(Se[t]=e,delete Oe[t],Ie.hasOwnProperty(t)){var a=Ie[t];delete Ie[t],a.forEach((t=>t()))}}function Ye(t){if(!(this instanceof fr&&t instanceof fr))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a}function Je(t){return{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}}function je(t){Ge(t.$$.ptrType.registeredClass.name+" instance already deleted")}var We=!1;function ze(t){}function Xe(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function Ze(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Ze(t,e,r.baseClass);return null===n?null:r.downcast(n)}var Qe={};function qe(){return Object.keys(ar).length}function $e(){var t=[];for(var e in ar)ar.hasOwnProperty(e)&&t.push(ar[e]);return t}var tr=[];function er(){for(;tr.length;){var t=tr.pop();t.$$.deleteScheduled=!1,t.delete()}}var rr=void 0;function nr(t){rr=t,tr.length&&rr&&rr(er)}var ar={};function or(t,e){return e=function(t,e){for(void 0===e&&Ge("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),ar[e]}function ir(t,e){return(!e.ptrType||!e.ptr)&&He("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!==!!e.smartPtr&&He("Both smartPtrType and smartPtr must be specified"),e.count={value:1},ur(Object.create(t,{$$:{value:e}}))}function sr(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=or(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?ir(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):ir(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o,i=this.registeredClass.getActualType(e),s=Qe[i];if(!s)return a.call(this);o=this.isConst?s.constPointerType:s.pointerType;var u=Ze(e,this.registeredClass,o.registeredClass);return null===u?a.call(this):this.isSmartPointer?ir(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:t}):ir(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}function ur(t){return typeof FinalizationRegistry>"u"?(ur=t=>t,t):(We=new FinalizationRegistry((t=>{Xe(t.$$)})),ze=t=>We.unregister(t),(ur=t=>{var e=t.$$;if(!!e.smartPtr){var r={$$:e};We.register(t,r,t)}return t})(t))}function Ar(){if(this.$$.ptr||je(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=ur(Object.create(Object.getPrototypeOf(this),{$$:{value:Je(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Er(){this.$$.ptr||je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ge("Object already scheduled for deletion"),ze(this),Xe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function lr(){return!this.$$.ptr}function cr(){return this.$$.ptr||je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ge("Object already scheduled for deletion"),tr.push(this),1===tr.length&&rr&&rr(er),this.$$.deleteScheduled=!0,this}function fr(){}function Br(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||Ge("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function dr(t,e,r){Et.hasOwnProperty(t)?((void 0===r||void 0!==Et[t].overloadTable&&void 0!==Et[t].overloadTable[r])&&Ge("Cannot register public name '"+t+"' twice"),Br(Et,t,t),Et.hasOwnProperty(r)&&Ge("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),Et[t].overloadTable[r]=e):(Et[t]=e,void 0!==r&&(Et[t].numArguments=r))}function yr(t,e,r,n,a,o,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}function pr(t,e,r){for(;e!==r;)e.upcast||Ge("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Cr(t,e){if(null===e)return this.isReference&&Ge("null is not a valid "+this.name),0;e.$$||Ge('Cannot pass "'+Gr(e)+'" as a '+this.name),e.$$.ptr||Ge("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return pr(e.$$.ptr,r,this.registeredClass)}function mr(t,e){var r;if(null===e)return this.isReference&&Ge("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||Ge('Cannot pass "'+Gr(e)+'" as a '+this.name),e.$$.ptr||Ge("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&Ge("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=pr(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&Ge("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:Ge("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,Ur.toHandle((function(){a.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:Ge("Unsupporting sharing policy")}return r}function hr(t,e){if(null===e)return this.isReference&&Ge("null is not a valid "+this.name),0;e.$$||Ge('Cannot pass "'+Gr(e)+'" as a '+this.name),e.$$.ptr||Ge("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&Ge("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return pr(e.$$.ptr,r,this.registeredClass)}function vr(t){return this.fromWireType(bt[t>>2])}function gr(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Pr(t){this.rawDestructor&&this.rawDestructor(t)}function Tr(t){null!==t&&t.delete()}function Dr(t,e,r,n,a,o,i,s,u,A,E){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=A,this.rawDestructor=E,a||void 0!==e.baseClass?this.toWireType=mr:n?(this.toWireType=Cr,this.destructorFunction=null):(this.toWireType=hr,this.destructorFunction=null)}function _r(t,e,r){Et.hasOwnProperty(t)||He("Replacing nonexistant public symbol"),void 0!==Et[t].overloadTable&&void 0!==r?Et[t].overloadTable[r]=e:(Et[t]=e,Et[t].argCount=r)}function Fr(t,e,r){return t.includes("j")?function(t,e,r){var n=Et["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):oe(e).apply(null,r)}function Lr(t,e){var r=(t=Me(t)).includes("j")?function(t,e){var r=[];return function(){return r.length=0,Object.assign(r,arguments),Fr(t,e,r)}}(t,e):oe(e);return"function"!=typeof r&&Ge("unknown function pointer with signature "+t+": "+e),r}var wr=void 0;function br(t){var e=dn(t),r=Me(e);return Bn(e),r}function Mr(t,e){var r=[],n={};throw e.forEach((function t(e){if(!n[e]&&!Se[e]){if(Oe[e])return void Oe[e].forEach(t);r.push(e),n[e]=!0}})),new wr(t+": "+r.map(br).join([", "]))}function Ir(t,e){for(var r=[],n=0;n<t;n++)r.push(Mt[e+4*n>>2]);return r}function Sr(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function Or(t,e,r,n,a,o){var i=e.length;i<2&&Ge("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==e[1]&&null!==r,u=!1,A=1;A<e.length;++A)if(null!==e[A]&&void 0===e[A].destructorFunction){u=!0;break}var E="void"!==e[0].name,l="",c="";for(A=0;A<i-2;++A)l+=(0!==A?", ":"")+"arg"+A,c+=(0!==A?", ":"")+"arg"+A+"Wired";var f="return function "+Ne(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";u&&(f+="var destructors = [];\n");var B=u?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[Ge,n,a,Sr,e[0],e[1]];s&&(f+="var thisWired = classParam.toWireType("+B+", this);\n");for(A=0;A<i-2;++A)f+="var arg"+A+"Wired = argType"+A+".toWireType("+B+", arg"+A+"); // "+e[A+2].name+"\n",d.push("argType"+A),y.push(e[A+2]);if(s&&(c="thisWired"+(c.length>0?", ":"")+c),f+=(E||o?"var rv = ":"")+"invoker(fn"+(c.length>0?", ":"")+c+");\n",u)f+="runDestructors(destructors);\n";else for(A=s?1:2;A<e.length;++A){var p=1===A?"thisWired":"arg"+(A-2)+"Wired";null!==e[A].destructorFunction&&(f+=p+"_dtor("+p+"); // "+e[A].name+"\n",d.push(p+"_dtor"),y.push(e[A].destructorFunction))}return E&&(f+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),f+="}\n",d.push(f),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=Re(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,a=t.apply(n,e);return a instanceof Object?a:n}(Function,d).apply(null,y)}var Nr=new function(){this.allocated=[void 0],this.freelist=[],this.get=function(t){return this.allocated[t]},this.allocate=function(t){let e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},this.free=function(t){this.allocated[t]=void 0,this.freelist.push(t)}};function Rr(t){t>=Nr.reserved&&0==--Nr.get(t).refcount&&Nr.free(t)}function xr(){for(var t=0,e=Nr.reserved;e<Nr.allocated.length;++e)void 0!==Nr.allocated[e]&&++t;return t}var Ur={toValue:t=>(t||Ge("Cannot use deleted val. handle = "+t),Nr.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Nr.allocate({refcount:1,value:t})}}};function Gr(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function Kr(t,e){switch(e){case 2:return function(t){return this.fromWireType(It[t>>2])};case 3:return function(t){return this.fromWireType(St[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Hr(t,e,r){switch(e){case 0:return r?function(t){return _t[t]}:function(t){return Ft[t]};case 1:return r?function(t){return Lt[t>>1]}:function(t){return wt[t>>1]};case 2:return r?function(t){return bt[t>>2]}:function(t){return Mt[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var kr=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function Vr(t,e){for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&wt[n];)++n;if((r=n<<1)-t>32&&kr)return kr.decode(Ft.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=Lt[t+2*i>>1];if(0==s)break;o+=String.fromCharCode(s)}return o}function Yr(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,a=(r-=2)<2*t.length?r/2:t.length,o=0;o<a;++o){var i=t.charCodeAt(o);Lt[e>>1]=i,e+=2}return Lt[e>>1]=0,e-n}function Jr(t){return 2*t.length}function jr(t,e){for(var r=0,n="";!(r>=e/4);){var a=bt[t+4*r>>2];if(0==a)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(a)}return n}function Wr(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var i=t.charCodeAt(o);if(i>=55296&&i<=57343)i=65536+((1023&i)<<10)|1023&t.charCodeAt(++o);if(bt[e>>2]=i,(e+=4)+4>a)break}return bt[e>>2]=0,e-n}function zr(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}function Xr(t,e){var r=Se[t];return void 0===r&&Ge(e+" has unknown type "+br(t)),r}var Zr={};function Qr(t){var e=Zr[t];return void 0===e?Me(t):e}function qr(){return"object"==typeof globalThis?globalThis:Function("return this")()}var $r={};function tn(t){var e=Dt.buffer;try{return Dt.grow(t-e.byteLength+65535>>>16),Rt(),1}catch{}}var en={};function rn(){if(!rn.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:dt||"./this.program"};for(var e in en)void 0===en[e]?delete t[e]:t[e]=en[e];var r=[];for(var e in t)r.push(e+"="+t[e]);rn.strings=r}return rn.strings}function nn(t){return t%4==0&&(t%100!=0||t%400==0)}var an=[31,29,31,30,31,30,31,31,30,31,30,31],on=[31,28,31,30,31,30,31,31,30,31,30,31];function sn(t,e,r,n){var a=bt[n+40>>2],o={tm_sec:bt[n>>2],tm_min:bt[n+4>>2],tm_hour:bt[n+8>>2],tm_mday:bt[n+12>>2],tm_mon:bt[n+16>>2],tm_year:bt[n+20>>2],tm_wday:bt[n+24>>2],tm_yday:bt[n+28>>2],tm_isdst:bt[n+32>>2],tm_gmtoff:bt[n+36>>2],tm_zone:a?_e(a):""},i=_e(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var A=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],E=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(t,e,r){for(var n="number"==typeof t?t.toString():t||"";n.length<e;)n=r[0]+n;return n}function c(t,e){return l(t,e,"0")}function f(t,e){function r(t){return t<0?-1:t>0?1:0}var n;return 0===(n=r(t.getFullYear()-e.getFullYear()))&&0===(n=r(t.getMonth()-e.getMonth()))&&(n=r(t.getDate()-e.getDate())),n}function B(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function d(t){var e=function(t,e){for(var r=new Date(t.getTime());e>0;){var n=nn(r.getFullYear()),a=r.getMonth(),o=(n?an:on)[a];if(!(e>o-r.getDate()))return r.setDate(r.getDate()+e),r;e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}(new Date(t.tm_year+1900,0,1),t.tm_yday),r=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),a=B(r),o=B(n);return f(a,e)<=0?f(o,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var y={"%a":function(t){return A[t.tm_wday].substring(0,3)},"%A":function(t){return A[t.tm_wday]},"%b":function(t){return E[t.tm_mon].substring(0,3)},"%B":function(t){return E[t.tm_mon]},"%C":function(t){return c((t.tm_year+1900)/100|0,2)},"%d":function(t){return c(t.tm_mday,2)},"%e":function(t){return l(t.tm_mday,2," ")},"%g":function(t){return d(t).toString().substring(2)},"%G":function(t){return d(t)},"%H":function(t){return c(t.tm_hour,2)},"%I":function(t){var e=t.tm_hour;return 0==e?e=12:e>12&&(e-=12),c(e,2)},"%j":function(t){return c(t.tm_mday+function(t,e){for(var r=0,n=0;n<=e;r+=t[n++]);return r}(nn(t.tm_year+1900)?an:on,t.tm_mon-1),3)},"%m":function(t){return c(t.tm_mon+1,2)},"%M":function(t){return c(t.tm_min,2)},"%n":function(){return"\n"},"%p":function(t){return t.tm_hour>=0&&t.tm_hour<12?"AM":"PM"},"%S":function(t){return c(t.tm_sec,2)},"%t":function(){return"\t"},"%u":function(t){return t.tm_wday||7},"%U":function(t){var e=t.tm_yday+7-t.tm_wday;return c(Math.floor(e/7),2)},"%V":function(t){var e=Math.floor((t.tm_yday+7-(t.tm_wday+6)%7)/7);if((t.tm_wday+371-t.tm_yday-2)%7<=2&&e++,e){if(53==e){var r=(t.tm_wday+371-t.tm_yday)%7;4!=r&&(3!=r||!nn(t.tm_year))&&(e=1)}}else{e=52;var n=(t.tm_wday+7-t.tm_yday-1)%7;(4==n||5==n&&nn(t.tm_year%400-1))&&e++}return c(e,2)},"%w":function(t){return t.tm_wday},"%W":function(t){var e=t.tm_yday+7-(t.tm_wday+6)%7;return c(Math.floor(e/7),2)},"%y":function(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function(t){return t.tm_year+1900},"%z":function(t){var e=t.tm_gmtoff,r=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(r?"+":"-")+String("0000"+e).slice(-4)},"%Z":function(t){return t.tm_zone},"%%":function(){return"%"}};for(var u in i=i.replace(/%%/g,"\0\0"),y)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),y[u](o)));var p=me(i=i.replace(/\0\0/g,"%"),!1);return p.length>e?0:(function(t,e){_t.set(t,e)}(p,t),p.length-1)}var un=function(t,e,r,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=Pe.nextInode++,this.name=e,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},An=365,En=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&An)===An},set:function(t){t?this.mode|=An:this.mode&=~An}},write:{get:function(){return(this.mode&En)===En},set:function(t){t?this.mode|=En:this.mode&=~En}},isFolder:{get:function(){return Pe.isDir(this.mode)}},isDevice:{get:function(){return Pe.isChrdev(this.mode)}}}),Pe.FSNode=un,Pe.staticInit(),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);be=t}(),Ue=Et.BindingError=xe(Error,"BindingError"),Ke=Et.InternalError=xe(Error,"InternalError"),fr.prototype.isAliasOf=Ye,fr.prototype.clone=Ar,fr.prototype.delete=Er,fr.prototype.isDeleted=lr,fr.prototype.deleteLater=cr,Et.getInheritedInstanceCount=qe,Et.getLiveInheritedInstances=$e,Et.flushPendingDeletes=er,Et.setDelayFunction=nr,Dr.prototype.getPointee=gr,Dr.prototype.destructor=Pr,Dr.prototype.argPackAdvance=8,Dr.prototype.readValueFromPointer=vr,Dr.prototype.deleteObject=Tr,Dr.prototype.fromWireType=sr,wr=Et.UnboundTypeError=xe(Error,"UnboundTypeError"),Nr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Nr.reserved=Nr.allocated.length,Et.count_emval_handles=xr;var ln={t:function(t){var e=new se(t);return e.get_caught()||(e.set_caught(!0),ne--),e.set_rethrown(!1),ee.push(e),re(e),e.get_exception_ptr()},ja:function(){if(!ee.length)return 0;var t=ee[ee.length-1];return re(t),t.excPtr},Z:function(t){!t||ie(new se(t))},u:function(){pn(0),ie(ee.pop()),ue=0},a:Ee,i:le,z:ce,C:fe,ka:function(t){!t||re(new se(t))},da:function(){var t=ee.pop();t||Jt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(ee.push(t),t.set_rethrown(!0),t.set_caught(!1),ne++),ue=e},m:function(t,e,r){throw new se(t).init(e,r),ne++,ue=t},la:function(){return ne},c:function(t){throw ue||(ue=t),ue},za:function(t){try{return t=Fe.getStr(t),Pe.chdir(t),0}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return-t.errno}},aa:function(t,e,r){Fe.varargs=r;try{var n=Fe.getStreamFromFD(t);switch(e){case 0:return(a=Fe.get())<0?-28:Pe.createStream(n,a).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var a=Fe.get();return n.flags|=a,0;case 5:a=Fe.get();return Lt[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return function(t){bt[yn()>>2]=t}(28),-1}}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return-t.errno}},ta:function(t,e){try{if(0===e)return-28;var r=Pe.cwd(),n=pe(r)+1;return e<n?-68:(Le(r,t,e),n)}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return-t.errno}},wa:function(t,e,r){Fe.varargs=r;try{var n=Fe.getStreamFromFD(t);switch(e){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var a=Fe.get();return bt[a>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:a=Fe.get();return Pe.ioctl(n,e,a);default:return-28}}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return-t.errno}},ua:function(t,e,r){try{return e=Fe.getStr(e),e=Fe.calculateAt(t,e),"/"===(e=Be.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),Pe.mkdir(e,r,0),0}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return-t.errno}},xa:function(t,e,r,n){Fe.varargs=n;try{e=Fe.getStr(e),e=Fe.calculateAt(t,e);var a=n?Fe.get():0;return Pe.open(e,r,a).fd}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return-t.errno}},sa:function(t,e,r,n){try{if(e=Fe.getStr(e),e=Fe.calculateAt(t,e),n<=0)return-28;var a=Pe.readlink(e),o=Math.min(n,pe(a)),i=_t[r+o];return Le(a,r,n+1),_t[r+o]=i,o}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return-t.errno}},qa:function(t){try{return t=Fe.getStr(t),Pe.rmdir(t),0}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return-t.errno}},pa:function(t,e){try{return t=Fe.getStr(t),Fe.doStat(Pe.stat,t,e)}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return-t.errno}},ra:function(t,e,r){try{return e=Fe.getStr(e),e=Fe.calculateAt(t,e),0===r?Pe.unlink(e):512===r?Pe.rmdir(e):Jt("Invalid flags passed to unlinkat"),0}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return-t.errno}},Ya:function(t,e,r,n,a){},Ba:function(t,e,r,n,a){var o=we(r);Ve(t,{name:e=Me(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:a},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=_t;else if(2===r)n=Lt;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=bt}return this.fromWireType(n[t>>o])},destructorFunction:null})},X:function(t,e,r,n,a,o,i,s,u,A,E,l,c){E=Me(E),o=Lr(a,o),s&&(s=Lr(i,s)),A&&(A=Lr(u,A)),c=Lr(l,c);var f=Ne(E);dr(f,(function(){Mr("Cannot construct "+E+" due to unbound types",[n])})),ke([t,e,r],n?[n]:[],(function(e){var r,a;e=e[0],n?a=(r=e.registeredClass).instancePrototype:a=fr.prototype;var i=Re(f,(function(){if(Object.getPrototypeOf(this)!==u)throw new Ue("Use 'new' to construct "+E);if(void 0===l.constructor_body)throw new Ue(E+" has no accessible constructor");var t=l.constructor_body[arguments.length];if(void 0===t)throw new Ue("Tried to invoke ctor of "+E+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(l.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),u=Object.create(a,{constructor:{value:i}});i.prototype=u;var l=new yr(E,i,u,c,r,o,s,A),B=new Dr(E,l,!0,!1,!1),d=new Dr(E+"*",l,!1,!1,!1),y=new Dr(E+" const*",l,!1,!0,!1);return Qe[t]={pointerType:d,constPointerType:y},_r(f,i),[B,d,y]}))},W:function(t,e,r,n,a,o){Nt(e>0);var i=Ir(e,r);a=Lr(n,a),ke([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new Ue("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{Mr("Cannot construct "+t.name+" due to unbound types",i)},ke([],i,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=Or(r,n,null,a,o),[]})),[]}))},N:function(t,e,r,n,a,o,i,s,u){var A=Ir(r,n);e=Me(e),o=Lr(a,o),ke([],[t],(function(t){var n=(t=t[0]).name+"."+e;function a(){Mr("Cannot call "+n+" due to unbound types",A)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var E=t.registeredClass.instancePrototype,l=E[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(a.argCount=r-2,a.className=t.name,E[e]=a):(Br(E,e,n),E[e].overloadTable[r-2]=a),ke([],A,(function(a){var s=Or(n,a,t,o,i,u);return void 0===E[e].overloadTable?(s.argCount=r-2,E[e]=s):E[e].overloadTable[r-2]=s,[]})),[]}))},Aa:function(t,e){Ve(t,{name:e=Me(e),fromWireType:function(t){var e=Ur.toValue(t);return Rr(t),e},toWireType:function(t,e){return Ur.toHandle(e)},argPackAdvance:8,readValueFromPointer:vr,destructorFunction:null})},ca:function(t,e,r){var n=we(r);Ve(t,{name:e=Me(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:Kr(e,n),destructorFunction:null})},fa:function(t,e,r,n,a,o,i){var s=Ir(e,r);t=Me(t),a=Lr(n,a),dr(t,(function(){Mr("Cannot call "+t+" due to unbound types",s)}),e-1),ke([],s,(function(r){var n=[r[0],null].concat(r.slice(1));return _r(t,Or(t,n,null,a,o,i),e-1),[]}))},I:function(t,e,r,n,a){e=Me(e);var o=we(r),i=t=>t;if(0===n){var s=32-8*r;i=t=>t<<s>>>s}var u=e.includes("unsigned");Ve(t,{name:e,fromWireType:i,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:Hr(e,o,0!==n),destructorFunction:null})},E:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function a(t){var e=Mt,r=e[t>>=2],a=e[t+1];return new n(e.buffer,a,r)}Ve(t,{name:r=Me(r),fromWireType:a,argPackAdvance:8,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},ba:function(t,e){var r="std::string"===(e=Me(e));Ve(t,{name:e,fromWireType:function(t){var e,n=Mt[t>>2],a=t+4;if(r)for(var o=a,i=0;i<=n;++i){var s=a+i;if(i==n||0==Ft[s]){var u=_e(o,s-o);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),o=s+1}}else{var A=new Array(n);for(i=0;i<n;++i)A[i]=String.fromCharCode(Ft[a+i]);e=A.join("")}return Bn(t),e},toWireType:function(t,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n,a="string"==typeof e;a||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||Ge("Cannot pass non-string to std::string"),n=r&&a?pe(e):e.length;var o=fn(4+n+1),i=o+4;if(Mt[o>>2]=n,r&&a)Le(e,i,n+1);else if(a)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Bn(i),Ge("String has UTF-16 code units that do not fit in 8 bits")),Ft[i+s]=u}else for(s=0;s<n;++s)Ft[i+s]=e[s];return null!==t&&t.push(Bn,o),o},argPackAdvance:8,readValueFromPointer:vr,destructorFunction:function(t){Bn(t)}})},S:function(t,e,r){var n,a,o,i,s;r=Me(r),2===e?(n=Vr,a=Yr,i=Jr,o=()=>wt,s=1):4===e&&(n=jr,a=Wr,i=zr,o=()=>Mt,s=2),Ve(t,{name:r,fromWireType:function(t){for(var r,a=Mt[t>>2],i=o(),u=t+4,A=0;A<=a;++A){var E=t+4+A*e;if(A==a||0==i[E>>s]){var l=n(u,E-u);void 0===r?r=l:(r+=String.fromCharCode(0),r+=l),u=E+e}}return Bn(t),r},toWireType:function(t,n){"string"!=typeof n&&Ge("Cannot pass non-string to C++ string type "+r);var o=i(n),u=fn(4+o+e);return Mt[u>>2]=o>>s,a(n,u+4,o+e),null!==t&&t.push(Bn,u),u},argPackAdvance:8,readValueFromPointer:vr,destructorFunction:function(t){Bn(t)}})},Ca:function(t,e){Ve(t,{isVoid:!0,name:e=Me(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},ma:function(){return true},Qa:function(t,e,r){t=Ur.toValue(t),e=Xr(e,"emval::as");var n=[],a=Ur.toHandle(n);return Mt[r>>2]=a,e.toWireType(n,t)},Na:function(t,e,r,n){t=Ur.toValue(t);for(var a=function(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=Xr(Mt[e+4*n>>2],"parameter "+n);return r}(e,r),o=new Array(e),i=0;i<e;++i){var s=a[i];o[i]=s.readValueFromPointer(n),n+=s.argPackAdvance}var u=t.apply(void 0,o);return Ur.toHandle(u)},Ra:Rr,La:function(t){return 0===t?Ur.toHandle(qr()):(t=Qr(t),Ur.toHandle(qr()[t]))},Sa:function(t,e){return t=Ur.toValue(t),e=Ur.toValue(e),Ur.toHandle(t[e])},Ma:function(t){t>4&&(Nr.get(t).refcount+=1)},Ka:function(t,e,r,n){t=Ur.toValue(t);var a=$r[e];return a||(a=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(Xr,Et,Ur.toHandle,(()=>Mt))}(e),$r[e]=a),a(t,r,n)},Ta:function(t){return Ur.toHandle(Qr(t))},Pa:function(t){Sr(Ur.toValue(t)),Rr(t)},Oa:function(t,e){var r=(t=Xr(t,"_emval_take_value")).readValueFromPointer(e);return Ur.toHandle(r)},R:function(){Jt("")},na:function(){return Date.now()},ya:function(t,e,r){Ft.copyWithin(t,e,e+r)},oa:function(t){var e=Ft.length,r=2147483648;if((t>>>=0)>r)return!1;let n=(t,e)=>t+(e-t%e)%e;for(var a=1;a<=4;a*=2){var o=e*(1+.2/a);if(o=Math.min(o,t+100663296),tn(Math.min(r,n(Math.max(t,o),65536))))return!0}return!1},ha:function(t,e){var r=0;return rn().forEach((function(n,a){var o=e+r;Mt[t+4*a>>2]=o,function(t,e){for(var r=0;r<t.length;++r)_t[e++>>0]=t.charCodeAt(r);_t[e>>0]=0}(n,o),r+=n.length+1})),0},ia:function(t,e){var r=rn();Mt[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),Mt[e>>2]=n,0},_:function(t){try{var e=Fe.getStreamFromFD(t);return Pe.close(e),0}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return t.errno}},va:function(t,e,r,n){try{var a=function(t,e,r,n){for(var a=0,o=0;o<r;o++){var i=Mt[e>>2],s=Mt[e+4>>2];e+=8;var u=Pe.read(t,_t,i,s,n);if(u<0)return-1;if(a+=u,u<s)break;typeof n<"u"&&(n+=u)}return a}(Fe.getStreamFromFD(t),e,r);return Mt[n>>2]=a,0}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return t.errno}},Xa:function(t,e,r,n,a){try{var o=function(t,e){return e+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*e:NaN}(e,r);if(isNaN(o))return 61;var i=Fe.getStreamFromFD(t);return Pe.llseek(i,o,n),Xt=[i.position>>>0,(zt=i.position,+Math.abs(zt)>=1?zt>0?(0|Math.min(+Math.floor(zt/4294967296),4294967295))>>>0:~~+Math.ceil((zt-+(~~zt>>>0))/4294967296)>>>0:0)],bt[a>>2]=Xt[0],bt[a+4>>2]=Xt[1],i.getdents&&0===o&&0===n&&(i.getdents=null),0}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return t.errno}},$:function(t,e,r,n){try{var a=function(t,e,r,n){for(var a=0,o=0;o<r;o++){var i=Mt[e>>2],s=Mt[e+4>>2];e+=8;var u=Pe.write(t,_t,i,s,n);if(u<0)return-1;a+=u,typeof n<"u"&&(n+=u)}return a}(Fe.getStreamFromFD(t),e,r);return Mt[n>>2]=a,0}catch(t){if(typeof Pe>"u"||"ErrnoError"!==t.name)throw t;return t.errno}},P:function(t,e,r,n){var a=mn();try{return oe(t)(e,r,n)}catch(t){if(hn(a),t!==t+0)throw t;pn(1,0)}},x:function(t,e){var r=mn();try{return oe(t)(e)}catch(t){if(hn(r),t!==t+0)throw t;pn(1,0)}},M:function(t,e,r){var n=mn();try{return oe(t)(e,r)}catch(t){if(hn(n),t!==t+0)throw t;pn(1,0)}},A:function(t,e,r,n){var a=mn();try{return oe(t)(e,r,n)}catch(t){if(hn(a),t!==t+0)throw t;pn(1,0)}},j:function(t){var e=mn();try{return oe(t)()}catch(t){if(hn(e),t!==t+0)throw t;pn(1,0)}},b:function(t,e){var r=mn();try{return oe(t)(e)}catch(t){if(hn(r),t!==t+0)throw t;pn(1,0)}},Ea:function(t,e,r){var n=mn();try{return oe(t)(e,r)}catch(t){if(hn(n),t!==t+0)throw t;pn(1,0)}},d:function(t,e,r){var n=mn();try{return oe(t)(e,r)}catch(t){if(hn(n),t!==t+0)throw t;pn(1,0)}},ea:function(t,e,r,n){var a=mn();try{return oe(t)(e,r,n)}catch(t){if(hn(a),t!==t+0)throw t;pn(1,0)}},g:function(t,e,r,n){var a=mn();try{return oe(t)(e,r,n)}catch(t){if(hn(a),t!==t+0)throw t;pn(1,0)}},k:function(t,e,r,n,a){var o=mn();try{return oe(t)(e,r,n,a)}catch(t){if(hn(o),t!==t+0)throw t;pn(1,0)}},Y:function(t,e,r,n,a,o){var i=mn();try{return oe(t)(e,r,n,a,o)}catch(t){if(hn(i),t!==t+0)throw t;pn(1,0)}},o:function(t,e,r,n,a,o){var i=mn();try{return oe(t)(e,r,n,a,o)}catch(t){if(hn(i),t!==t+0)throw t;pn(1,0)}},p:function(t,e,r,n,a,o,i){var s=mn();try{return oe(t)(e,r,n,a,o,i)}catch(t){if(hn(s),t!==t+0)throw t;pn(1,0)}},r:function(t,e,r,n,a,o,i,s){var u=mn();try{return oe(t)(e,r,n,a,o,i,s)}catch(t){if(hn(u),t!==t+0)throw t;pn(1,0)}},y:function(t,e,r,n,a,o,i,s,u){var A=mn();try{return oe(t)(e,r,n,a,o,i,s,u)}catch(t){if(hn(A),t!==t+0)throw t;pn(1,0)}},F:function(t,e,r,n,a,o,i,s,u,A){var E=mn();try{return oe(t)(e,r,n,a,o,i,s,u,A)}catch(t){if(hn(E),t!==t+0)throw t;pn(1,0)}},J:function(t,e,r,n,a,o,i,s,u,A,E){var l=mn();try{return oe(t)(e,r,n,a,o,i,s,u,A,E)}catch(t){if(hn(l),t!==t+0)throw t;pn(1,0)}},K:function(t,e,r,n,a,o,i,s,u,A,E,l){var c=mn();try{return oe(t)(e,r,n,a,o,i,s,u,A,E,l)}catch(t){if(hn(c),t!==t+0)throw t;pn(1,0)}},fb:function(t,e,r,n,a,o,i,s,u,A,E,l){var c=mn();try{return Fn(t,e,r,n,a,o,i,s,u,A,E,l)}catch(t){if(hn(c),t!==t+0)throw t;pn(1,0)}},eb:function(t,e,r,n,a,o,i,s,u,A,E,l,c){var f=mn();try{return Ln(t,e,r,n,a,o,i,s,u,A,E,l,c)}catch(t){if(hn(f),t!==t+0)throw t;pn(1,0)}},Va:function(t,e,r,n,a,o,i){var s=mn();try{return Un(t,e,r,n,a,o,i)}catch(t){if(hn(s),t!==t+0)throw t;pn(1,0)}},ab:function(t,e,r,n,a,o,i){var s=mn();try{return In(t,e,r,n,a,o,i)}catch(t){if(hn(s),t!==t+0)throw t;pn(1,0)}},$a:function(t,e,r,n,a,o,i,s,u){var A=mn();try{return Sn(t,e,r,n,a,o,i,s,u)}catch(t){if(hn(A),t!==t+0)throw t;pn(1,0)}},Wa:function(t){var e=mn();try{return xn(t)}catch(t){if(hn(e),t!==t+0)throw t;pn(1,0)}},ga:function(t,e){var r=mn();try{return Pn(t,e)}catch(t){if(hn(r),t!==t+0)throw t;pn(1,0)}},Ua:function(t,e,r,n,a){var o=mn();try{return Gn(t,e,r,n,a)}catch(t){if(hn(o),t!==t+0)throw t;pn(1,0)}},l:function(t){var e=mn();try{oe(t)()}catch(t){if(hn(e),t!==t+0)throw t;pn(1,0)}},Ga:function(t,e,r,n,a,o,i){var s=mn();try{oe(t)(e,r,n,a,o,i)}catch(t){if(hn(s),t!==t+0)throw t;pn(1,0)}},h:function(t,e){var r=mn();try{oe(t)(e)}catch(t){if(hn(r),t!==t+0)throw t;pn(1,0)}},Fa:function(t,e,r){var n=mn();try{oe(t)(e,r)}catch(t){if(hn(n),t!==t+0)throw t;pn(1,0)}},Ha:function(t,e,r,n,a){var o=mn();try{oe(t)(e,r,n,a)}catch(t){if(hn(o),t!==t+0)throw t;pn(1,0)}},e:function(t,e,r){var n=mn();try{oe(t)(e,r)}catch(t){if(hn(n),t!==t+0)throw t;pn(1,0)}},Ia:function(t,e,r,n){var a=mn();try{oe(t)(e,r,n)}catch(t){if(hn(a),t!==t+0)throw t;pn(1,0)}},V:function(t,e,r,n,a){var o=mn();try{oe(t)(e,r,n,a)}catch(t){if(hn(o),t!==t+0)throw t;pn(1,0)}},f:function(t,e,r,n){var a=mn();try{oe(t)(e,r,n)}catch(t){if(hn(a),t!==t+0)throw t;pn(1,0)}},L:function(t,e,r,n,a,o,i){var s=mn();try{oe(t)(e,r,n,a,o,i)}catch(t){if(hn(s),t!==t+0)throw t;pn(1,0)}},n:function(t,e,r,n,a){var o=mn();try{oe(t)(e,r,n,a)}catch(t){if(hn(o),t!==t+0)throw t;pn(1,0)}},T:function(t,e,r,n,a,o,i){var s=mn();try{oe(t)(e,r,n,a,o,i)}catch(t){if(hn(s),t!==t+0)throw t;pn(1,0)}},q:function(t,e,r,n,a,o){var i=mn();try{oe(t)(e,r,n,a,o)}catch(t){if(hn(i),t!==t+0)throw t;pn(1,0)}},Da:function(t,e,r,n,a,o,i){var s=mn();try{oe(t)(e,r,n,a,o,i)}catch(t){if(hn(s),t!==t+0)throw t;pn(1,0)}},s:function(t,e,r,n,a,o,i){var s=mn();try{oe(t)(e,r,n,a,o,i)}catch(t){if(hn(s),t!==t+0)throw t;pn(1,0)}},w:function(t,e,r,n,a,o,i,s){var u=mn();try{oe(t)(e,r,n,a,o,i,s)}catch(t){if(hn(u),t!==t+0)throw t;pn(1,0)}},D:function(t,e,r,n,a,o,i,s,u){var A=mn();try{oe(t)(e,r,n,a,o,i,s,u)}catch(t){if(hn(A),t!==t+0)throw t;pn(1,0)}},G:function(t,e,r,n,a,o,i,s,u,A){var E=mn();try{oe(t)(e,r,n,a,o,i,s,u,A)}catch(t){if(hn(E),t!==t+0)throw t;pn(1,0)}},B:function(t,e,r,n,a,o,i,s,u,A,E){var l=mn();try{oe(t)(e,r,n,a,o,i,s,u,A,E)}catch(t){if(hn(l),t!==t+0)throw t;pn(1,0)}},O:function(t,e,r,n,a,o,i,s,u,A,E,l){var c=mn();try{oe(t)(e,r,n,a,o,i,s,u,A,E,l)}catch(t){if(hn(c),t!==t+0)throw t;pn(1,0)}},U:function(t,e,r,n,a,o,i,s,u,A,E,l,c){var f=mn();try{oe(t)(e,r,n,a,o,i,s,u,A,E,l,c)}catch(t){if(hn(f),t!==t+0)throw t;pn(1,0)}},Ja:function(t,e,r,n,a,o,i,s,u,A,E,l,c,f){var B=mn();try{oe(t)(e,r,n,a,o,i,s,u,A,E,l,c,f)}catch(t){if(hn(B),t!==t+0)throw t;pn(1,0)}},Q:function(t,e,r,n,a,o,i,s,u,A,E,l,c,f,B,d){var y=mn();try{oe(t)(e,r,n,a,o,i,s,u,A,E,l,c,f,B,d)}catch(t){if(hn(y),t!==t+0)throw t;pn(1,0)}},gb:function(t,e,r,n,a,o,i,s,u,A,E,l){var c=mn();try{Dn(t,e,r,n,a,o,i,s,u,A,E,l)}catch(t){if(hn(c),t!==t+0)throw t;pn(1,0)}},bb:function(t,e,r,n,a,o,i,s,u,A,E){var l=mn();try{bn(t,e,r,n,a,o,i,s,u,A,E)}catch(t){if(hn(l),t!==t+0)throw t;pn(1,0)}},cb:function(t,e,r,n,a,o,i,s,u,A,E,l){var c=mn();try{Mn(t,e,r,n,a,o,i,s,u,A,E,l)}catch(t){if(hn(c),t!==t+0)throw t;pn(1,0)}},db:function(t,e,r,n,a,o,i,s){var u=mn();try{wn(t,e,r,n,a,o,i,s)}catch(t){if(hn(u),t!==t+0)throw t;pn(1,0)}},_a:function(t,e,r,n,a){var o=mn();try{On(t,e,r,n,a)}catch(t){if(hn(o),t!==t+0)throw t;pn(1,0)}},hb:function(t,e,r,n,a,o){var i=mn();try{_n(t,e,r,n,a,o)}catch(t){if(hn(i),t!==t+0)throw t;pn(1,0)}},Za:function(t,e,r,n,a,o,i){var s=mn();try{Nn(t,e,r,n,a,o,i)}catch(t){if(hn(s),t!==t+0)throw t;pn(1,0)}},ib:function(t,e,r,n,a,o){var i=mn();try{Tn(t,e,r,n,a,o)}catch(t){if(hn(i),t!==t+0)throw t;pn(1,0)}},v:function(t){return t},H:function(t,e,r,n,a){return sn(t,e,r,n)}};!function(){var t={a:ln};function e(t,e){var r=t.exports;return Et.asm=r,Dt=Et.asm.jb,Rt(),xt=Et.asm.nb,function(t){Gt.unshift(t)}(Et.asm.kb),Yt(),r}if(Vt(),Et.instantiateWasm)try{return Et.instantiateWasm(t,e)}catch(t){Tt("Module.instantiateWasm callback failed with error: "+t),At(t)}(function(t,e,r,n){return t||"function"!=typeof WebAssembly.instantiateStreaming||Zt(e)||Qt(e)||Ct||"function"!=typeof fetch?$t(e,r,n):fetch(e,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(n,(function(t){return Tt("wasm streaming compile failed: "+t),Tt("falling back to ArrayBuffer instantiation"),$t(e,r,n)}))}))})(gt,jt,t,(function(t){e(t.instance)})).catch(At)}();var cn=function(){return(cn=Et.asm.lb).apply(null,arguments)},fn=function(){return(fn=Et.asm.mb).apply(null,arguments)},Bn=function(){return(Bn=Et.asm.ob).apply(null,arguments)},dn=Et.___getTypeName=function(){return(dn=Et.___getTypeName=Et.asm.pb).apply(null,arguments)};Et.__embind_initialize_bindings=function(){return(Et.__embind_initialize_bindings=Et.asm.qb).apply(null,arguments)};var yn=function(){return(yn=Et.asm.rb).apply(null,arguments)},pn=function(){return(pn=Et.asm.sb).apply(null,arguments)},Cn=function(){return(Cn=Et.asm.tb).apply(null,arguments)},mn=function(){return(mn=Et.asm.ub).apply(null,arguments)},hn=function(){return(hn=Et.asm.vb).apply(null,arguments)},vn=function(){return(vn=Et.asm.wb).apply(null,arguments)},gn=function(){return(gn=Et.asm.xb).apply(null,arguments)},Pn=Et.dynCall_ji=function(){return(Pn=Et.dynCall_ji=Et.asm.yb).apply(null,arguments)},Tn=Et.dynCall_vijii=function(){return(Tn=Et.dynCall_vijii=Et.asm.zb).apply(null,arguments)},Dn=Et.dynCall_viiiiijjii=function(){return(Dn=Et.dynCall_viiiiijjii=Et.asm.Ab).apply(null,arguments)},_n=Et.dynCall_viiji=function(){return(_n=Et.dynCall_viiji=Et.asm.Bb).apply(null,arguments)},Fn=Et.dynCall_iiiiiijjii=function(){return(Fn=Et.dynCall_iiiiiijjii=Et.asm.Cb).apply(null,arguments)},Ln=Et.dynCall_iiiiiijjiii=function(){return(Ln=Et.dynCall_iiiiiijjiii=Et.asm.Db).apply(null,arguments)},wn=Et.dynCall_viiijj=function(){return(wn=Et.dynCall_viiijj=Et.asm.Eb).apply(null,arguments)},bn=Et.dynCall_viiiijjii=function(){return(bn=Et.dynCall_viiiijjii=Et.asm.Fb).apply(null,arguments)},Mn=Et.dynCall_viiiijjiii=function(){return(Mn=Et.dynCall_viiiijjiii=Et.asm.Gb).apply(null,arguments)},In=Et.dynCall_iijiii=function(){return(In=Et.dynCall_iijiii=Et.asm.Hb).apply(null,arguments)},Sn=Et.dynCall_iijiiiii=function(){return(Sn=Et.dynCall_iijiiiii=Et.asm.Ib).apply(null,arguments)},On=Et.dynCall_viij=function(){return(On=Et.dynCall_viij=Et.asm.Jb).apply(null,arguments)},Nn=Et.dynCall_viijii=function(){return(Nn=Et.dynCall_viijii=Et.asm.Kb).apply(null,arguments)};Et.dynCall_jii=function(){return(Et.dynCall_jii=Et.asm.Lb).apply(null,arguments)},Et.dynCall_viji=function(){return(Et.dynCall_viji=Et.asm.Mb).apply(null,arguments)},Et.dynCall_iiiji=function(){return(Et.dynCall_iiiji=Et.asm.Nb).apply(null,arguments)},Et.dynCall_jiji=function(){return(Et.dynCall_jiji=Et.asm.Ob).apply(null,arguments)};var Rn,xn=Et.dynCall_j=function(){return(xn=Et.dynCall_j=Et.asm.Pb).apply(null,arguments)},Un=Et.dynCall_iiiiij=function(){return(Un=Et.dynCall_iiiiij=Et.asm.Qb).apply(null,arguments)},Gn=Et.dynCall_jiiii=function(){return(Gn=Et.dynCall_jiiii=Et.asm.Rb).apply(null,arguments)};function Kn(){function t(){Rn||(Rn=!0,Et.calledRun=!0,!Ot&&(!Et.noFSInit&&!Pe.init.initialized&&Pe.init(),Pe.ignorePermissions=!1,te(Gt),ut(Et),Et.onRuntimeInitialized&&Et.onRuntimeInitialized(),function(){if(Et.postRun)for("function"==typeof Et.postRun&&(Et.postRun=[Et.postRun]);Et.postRun.length;)t=Et.postRun.shift(),Kt.unshift(t);var t;te(Kt)}()))}Ht>0||(function(){if(Et.preRun)for("function"==typeof Et.preRun&&(Et.preRun=[Et.preRun]);Et.preRun.length;)t=Et.preRun.shift(),Ut.unshift(t);var t;te(Ut)}(),Ht>0)||(Et.setStatus?(Et.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Et.setStatus("")}),1),t()}),1)):t())}if(Et.dynCall_iiiiijj=function(){return(Et.dynCall_iiiiijj=Et.asm.Sb).apply(null,arguments)},Et.dynCall_iiiiiijj=function(){return(Et.dynCall_iiiiiijj=Et.asm.Tb).apply(null,arguments)},kt=function t(){Rn||Kn(),Rn||(kt=t)},Et.preInit)for("function"==typeof Et.preInit&&(Et.preInit=[Et.preInit]);Et.preInit.length>0;)Et.preInit.pop()();Kn();var Hn,kn,Vn=1,Yn=2,Jn={};Jn[0]=d.PixelFormat.RGB_DXT1,Jn[Vn]=d.PixelFormat.RGBA_DXT3,Jn[Yn]=d.PixelFormat.RGBA_DXT5;var jn,Wn=0,zn=!1;function Xn(t,e){var r=t.data,a=r.byteLength,o=new Uint8Array(r),i=jn._malloc(a);!function(t,e,r,n){var a,o=r/4,i=n%4,s=new Uint32Array(t.buffer,0,(n-i)/4),u=new Uint32Array(e.buffer);for(a=0;a<s.length;a++)u[o+a]=s[a];for(a=n-i;a<n;a++)e[r+a]=t[a]}(o,jn.HEAPU8,i,a);var s=jn._crn_get_dxt_format(i,a),u=Jn[s];if(!n.e(u))throw new y.t("Unsupported compressed format.");var A,E=jn._crn_get_levels(i,a),l=jn._crn_get_width(i,a),f=jn._crn_get_height(i,a),B=0;for(A=0;A<E;++A)B+=d.PixelFormat.compressedTextureSizeInBytes(u,l>>A,f>>A);if(Wn<B&&(n.e(Hn)&&jn._free(Hn),Hn=jn._malloc(B),kn=new Uint8Array(jn.HEAPU8.buffer,Hn,B),Wn=B),jn._crn_decompress(i,a,Hn,B,0,E),jn._free(i),n.u(t.bMipMap,!1)){var p=kn.slice(0,B);return e.push(p.buffer),new c.e(u,l,f,p)}var C=d.PixelFormat.compressedTextureSizeInBytes(u,l,f),m=kn.subarray(0,C),h=new Uint8Array(C);return h.set(m,0),e.push(h.buffer),new c.e(u,l,f,h)}var Zn,Qn=1,qn=0,$n=1,ta=2,ea=3,ra=0,na=1,aa=2;new E.e;var oa,ia=!1,sa=!1,ua=null,Aa=!1;if(n.e(g.unzip)){g.unzip.onRuntimeInitialized=function(){ia=!0};var Ea=g.unzip.cwrap("unzip","number",["number","number","number","number"]),la=g.unzip.cwrap("freePointer",null,["number"])}function ca(t,e,r,n,a,o){this.left=t,this.bottom=e,this.right=r,this.top=n,this.minHeight=a,this.maxHeight=o,this.width=r-t,this.length=n-e,this.height=o-a}function fa(t,e,r){var n=r,a=t.getUint32(n,!0),o=n+=Uint32Array.BYTES_PER_ELEMENT,i=new Uint8Array(e,n,a);return{dataViewByteOffset:o,byteOffset:n+=a*Uint8Array.BYTES_PER_ELEMENT,buffer:i}}function Ba(t,e,r,n){var a=t.getUint32(n+e,!0);n+=Uint32Array.BYTES_PER_ELEMENT;var o=r.subarray(n,n+a);return{string:B.a(o),bytesOffset:n+=a}}function da(t,e,r,n,a,o){var i=r,s=t.getUint16(r+n,!0);i+=Uint16Array.BYTES_PER_ELEMENT,o||(i+=Uint16Array.BYTES_PER_ELEMENT);for(var u=0;u<s;u++){var A=t.getUint32(i+n,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var E=t.getUint16(i+n,!0);if(i+=Uint16Array.BYTES_PER_ELEMENT,t.getUint16(i+n,!0),i+=Uint16Array.BYTES_PER_ELEMENT,20==E||35==E);else{var c=A*E*Float32Array.BYTES_PER_ELEMENT,f=e.subarray(i,i+c);i+=c;var B="aTexCoord"+u,d=a.vertexAttributes,y=a.attrLocation;y[B]=d.length,d.push({index:y[B],typedArray:f,componentsPerAttribute:E,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:E*Float32Array.BYTES_PER_ELEMENT,normalize:!1})}}return{bytesOffset:i}}function ya(t,e,r,n,a){var o=r,i=t.getUint16(o+n,!0);o+=Uint16Array.BYTES_PER_ELEMENT,o+=Uint16Array.BYTES_PER_ELEMENT;for(var s=a.vertexAttributes,u=a.attrLocation,A=0;A<i;A++){var E=t.getUint32(o+n,!0);o+=Uint32Array.BYTES_PER_ELEMENT;var c=t.getUint16(o+n,!0);if(o+=Uint16Array.BYTES_PER_ELEMENT,16===c){o-=Uint16Array.BYTES_PER_ELEMENT;var f=E*(c*Float32Array.BYTES_PER_ELEMENT+Uint16Array.BYTES_PER_ELEMENT),B=e.subarray(o,o+f);o+=f;var d=new Uint8Array(Float32Array.BYTES_PER_ELEMENT*c*E);a.instanceCount=E,a.instanceMode=c,a.instanceBuffer=d,a.instanceIndex=1;for(var y=Float32Array.BYTES_PER_ELEMENT*c+Uint16Array.BYTES_PER_ELEMENT,p=0;p<E;p++){var C=p*y+Uint16Array.BYTES_PER_ELEMENT,m=B.subarray(C,C+y);d.set(m,p*(y-Uint16Array.BYTES_PER_ELEMENT))}h=16*Float32Array.BYTES_PER_ELEMENT,u.uv2=s.length,s.push({index:u.uv2,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:h,instanceDivisor:1}),u.uv3=s.length,s.push({index:u.uv3,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}),u.uv4=s.length,s.push({index:u.uv4,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}),u.secondary_colour=s.length,s.push({index:u.secondary_colour,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1})}else{t.getUint16(o+n,!0),o+=Uint16Array.BYTES_PER_ELEMENT;f=E*c*Float32Array.BYTES_PER_ELEMENT;if(17===c||29===c){var h;d=e.subarray(o,o+f);a.instanceCount=E,a.instanceMode=c,a.instanceBuffer=d,a.instanceIndex=1,17===c?(h=17*Float32Array.BYTES_PER_ELEMENT,u.uv2=s.length,s.push({index:u.uv2,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:h,instanceDivisor:1}),u.uv3=s.length,s.push({index:u.uv3,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}),u.uv4=s.length,s.push({index:u.uv4,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}),u.secondary_colour=s.length,s.push({index:u.secondary_colour,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}),u.uv6=s.length,s.push({index:u.uv6,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.UNSIGNED_BYTE,normalize:!0,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1})):29===c&&(h=29*Float32Array.BYTES_PER_ELEMENT,u.uv1=s.length,s.push({index:u.uv1,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:h,instanceDivisor:1,byteLength:f}),u.uv2=s.length,s.push({index:u.uv2,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}),u.uv3=s.length,s.push({index:u.uv3,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}),u.uv4=s.length,s.push({index:u.uv4,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}),u.uv5=s.length,s.push({index:u.uv5,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}),u.uv6=s.length,s.push({index:u.uv6,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:20*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}),u.uv7=s.length,s.push({index:u.uv7,componentsPerAttribute:3,componentDatatype:l.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:24*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}),u.secondary_colour=s.length,s.push({index:u.secondary_colour,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.UNSIGNED_BYTE,normalize:!0,offsetInBytes:27*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}),u.uv9=s.length,s.push({index:u.uv9,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.UNSIGNED_BYTE,normalize:!0,offsetInBytes:28*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h,instanceDivisor:1}))}else{var v=E*c;a.instanceBounds=new Float32Array(v);for(var g=0;g<v;g++)a.instanceBounds[g]=t.getFloat32(o+n+g*Float32Array.BYTES_PER_ELEMENT,!0)}o+=f}}return{bytesOffset:o}}n.e(Et)&&(Et.onRuntimeInitialized=function(){Aa=!0});var pa=new s.o(40680631590769,40680631590769,40408299984661.445),Ca=new s.o,ma=new s.o;function ha(t,e,r,a){var o=Math.cos(e);Ca.x=o*Math.cos(t),Ca.y=o*Math.sin(t),Ca.z=Math.sin(e),Ca=s.o.normalize(Ca,Ca),s.o.multiplyComponents(pa,Ca,ma);var i=Math.sqrt(s.o.dot(Ca,ma));return ma=s.o.divideByScalar(ma,i,ma),Ca=s.o.multiplyByScalar(Ca,r,Ca),n.e(a)||(a=new s.o),s.o.add(ma,Ca,a)}var va=new s.o,ga=new A.a,Pa=new a.p,Ta=new a.p;function Da(t,e,r,o,E,c,f,B){var d=o,y=e.getUint32(d+r,!0);if(E.verticesCount=y,d+=Uint32Array.BYTES_PER_ELEMENT,y<=0)return{bytesOffset:d};var p=e.getUint16(d+r,!0);d+=Uint16Array.BYTES_PER_ELEMENT;var C=e.getUint16(d+r,!0);C=p*Float32Array.BYTES_PER_ELEMENT,d+=Uint16Array.BYTES_PER_ELEMENT;var m=y*p*Float32Array.BYTES_PER_ELEMENT,h=t.subarray(d,d+m);d+=m;var v=E.vertexAttributes,g=E.attrLocation,P=void 0,T=void 0;if(f){P=new A.a,T=new A.a;var D=new Float32Array(2*y),_=new Float64Array(2*y);if(n.e(B)){var F=new Float32Array(h.byteLength/4),L=new Float32Array(h.buffer,h.byteOffset,h.byteLength/4);J=3===p?s.o.unpackArray(L):u.e.unpackArray(L);var w=a.p.multiply(B.sphereMatrix,B.geoMatrix,Pa),b=a.p.multiply(B.ellipsoidMatrix,B.geoMatrix,Ta);a.p.inverse(b,b);for(var M=new i.t(6378137,6378137,6378137),I=0,S=0,O=J.length;S<O;S++){var N=J[S];a.p.multiplyByPoint(w,N,va);var R=ha((j=M.cartesianToCartographic(va,ga)).longitude,j.latitude,j.height,va);a.p.multiplyByPoint(b,R,N),3===p?(s.o.pack(N,F,I),I+=3):(u.e.pack(N,F,I),I+=4),_[2*S]=j.longitude,_[2*S+1]=j.latitude,0===S?(P.longitude=j.longitude,P.latitude=j.latitude,T.longitude=j.longitude,T.latitude=j.latitude):(P.longitude=Math.max(j.longitude,P.longitude),P.latitude=Math.max(j.latitude,P.latitude),T.longitude=Math.min(j.longitude,T.longitude),T.latitude=Math.min(j.latitude,T.latitude))}h=F}else{var x=new s.o,U=new s.o,G=new Float32Array(h.buffer,h.byteOffset,h.byteLength/4),K=new A.a;M=Oa?new i.t(6378137,6378137,6356752.314245179):new i.t(6378137,6378137,6378137);for(var H=0;H<y;H++)a.p.multiplyByPoint(c,s.o.fromElements(G[3*H],G[3*H+1],G[3*H+2],x),U),K=M.cartesianToCartographic(U,ga),_[2*H]=K.longitude,_[2*H+1]=K.latitude,0===H?(P.longitude=K.longitude,P.latitude=K.latitude,T.longitude=K.longitude,T.latitude=K.latitude):(P.longitude=Math.max(K.longitude,P.longitude),P.latitude=Math.max(K.latitude,P.latitude),T.longitude=Math.min(K.longitude,T.longitude),T.latitude=Math.min(K.latitude,T.latitude))}for(H=0;H<y;H++)D[2*H]=_[2*H]-T.longitude,D[2*H+1]=_[2*H+1]-T.latitude;g.aPosition=v.length,v.push({index:g.aPosition,typedArray:h,componentsPerAttribute:p,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:C,normalize:!1}),g.img=v.length,v.push({index:g.img,typedArray:D,componentsPerAttribute:2,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1})}else{if(3===p&&n.e(c)){U=new s.o,G=new Float32Array(h.buffer,h.byteOffset,h.byteLength/4);for(var k=new Float32Array(h.byteLength/4+y),V=G.length,Y=(H=0,0);H<V;H+=3,Y+=4)k[Y]=G[H],k[Y+1]=G[H+1],k[Y+2]=G[H+2],a.p.multiplyByPoint(c,s.o.fromElements(k[Y],k[Y+1],k[Y+2],x),U),k[Y+3]=A.a.fromCartesian(U).height;h=k,C=(p=4)*Float32Array.BYTES_PER_ELEMENT}if(n.e(B)){var J;F=new Float32Array(h.byteLength/4),L=new Float32Array(h.buffer,h.byteOffset,h.byteLength/4);J=3===p?s.o.unpackArray(L):u.e.unpackArray(L);w=a.p.multiply(B.sphereMatrix,B.geoMatrix,Pa),b=a.p.multiply(B.ellipsoidMatrix,B.geoMatrix,Ta);a.p.inverse(b,b);for(M=new i.t(6378137,6378137,6378137),I=0,S=0,O=J.length;S<O;S++){N=J[S];a.p.multiplyByPoint(w,N,va);var j;R=ha((j=M.cartesianToCartographic(va,ga)).longitude,j.latitude,j.height,va);a.p.multiplyByPoint(b,R,N),3===p?(s.o.pack(N,F,I),I+=3):(u.e.pack(N,F,I),I+=4)}h=F}g.aPosition=v.length,v.push({index:g.aPosition,typedArray:h,componentsPerAttribute:p,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:C,normalize:!1})}return{bytesOffset:d,cartographicBounds:{max:P,min:T}}}function _a(t,e,r,n,a){var o=n,i=e.getUint32(o+r,!0);if(o+=Uint32Array.BYTES_PER_ELEMENT,i<=0)return{bytesOffset:o};var s=e.getUint16(o+r,!0);o+=Uint16Array.BYTES_PER_ELEMENT;var u=e.getUint16(o+r,!0);o+=Uint16Array.BYTES_PER_ELEMENT;var A=i*s*Float32Array.BYTES_PER_ELEMENT,E=t.subarray(o,o+A);if(o+=A,!a.ignoreNormal){var c=a.vertexAttributes,f=a.attrLocation;f.aNormal=c.length,c.push({index:f.aNormal,typedArray:E,componentsPerAttribute:s,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:u,normalize:!1})}return{bytesOffset:o}}var Fa={0:Uint32Array.BYTES_PER_ELEMENT,1:Float32Array.BYTES_PER_ELEMENT,2:Float64Array.BYTES_PER_ELEMENT};function La(t,e,r,n,a){var o,i=n,s=e.getUint32(i+r,!0);if(i+=Uint32Array.BYTES_PER_ELEMENT,a.verticesCount,s>0){e.getUint16(i+r,!0),i+=Uint16Array.BYTES_PER_ELEMENT,i+=2*Uint8Array.BYTES_PER_ELEMENT;var u=s*Uint8Array.BYTES_PER_ELEMENT*4;o=t.subarray(i,i+u),i+=u;var A=a.vertexAttributes,E=a.attrLocation;E.aColor=A.length,A.push({index:E.aColor,typedArray:o,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:4,normalize:!0})}return{bytesOffset:i}}function wa(t,e,r,n,a){var o=n,i=e.getUint32(o+r,!0);return o+=Uint32Array.BYTES_PER_ELEMENT,i<=0?{bytesOffset:o}:(e.getUint16(o+r,!0),o+=Uint16Array.BYTES_PER_ELEMENT,o+=2*Uint8Array.BYTES_PER_ELEMENT,{bytesOffset:o+=i*Uint8Array.BYTES_PER_ELEMENT*4})}function ba(t,e,r,n,a){var o=a,i=[],s=r.getUint32(o+n,!0);o+=Uint32Array.BYTES_PER_ELEMENT;for(var u=0;u<s;u++){var A={};3===t&&(r.getUint32(o+n,!0),o+=Uint32Array.BYTES_PER_ELEMENT);var E=r.getUint32(o+n,!0);o+=Uint32Array.BYTES_PER_ELEMENT;var l=r.getUint8(o+n,!0);o+=Uint8Array.BYTES_PER_ELEMENT,r.getUint8(o+n,!0),o+=Uint8Array.BYTES_PER_ELEMENT;var c=r.getUint8(o+n,!0);if(o+=Uint8Array.BYTES_PER_ELEMENT,o+=Uint8Array.BYTES_PER_ELEMENT,E>0){var f=0,B=null;1===l||3===l?(f=E*Uint32Array.BYTES_PER_ELEMENT,B=e.subarray(o,o+f)):(f=E*Uint16Array.BYTES_PER_ELEMENT,B=e.subarray(o,o+f),E%2!=0&&(f+=2)),A.indicesTypedArray=B,o+=f}A.indicesCount=E,A.indexType=l,A.primitiveType=c;var d=[],y=r.getUint32(o+n,!0);o+=Uint32Array.BYTES_PER_ELEMENT;for(var p=0;p<y;p++){var C=Ba(r,n,e,o),m=C.string;o=C.bytesOffset,d.push(m),A.materialCode=m}if(0===y&&(A.materialCode="OSGBEmpty"),i.push(A),0!==o%4)o+=4-o%4}return{bytesOffset:o,arrIndexPackage:i}}function Ma(t,e,r,o,A,E,c,B,d){var y,p,C=o,m=e.getUint32(C+r,!0);return A.nCompressOptions=m,C+=Uint32Array.BYTES_PER_ELEMENT,(m&f.VertexCompressOption.SVC_Vertex)==f.VertexCompressOption.SVC_Vertex?(y=function(t,e,r,o,A,E){var c=o,f=e.getUint32(c+r,!0);if(A.verticesCount=f,c+=Uint32Array.BYTES_PER_ELEMENT,f<=0)return{bytesOffset:c};var B=e.getUint16(c+r,!0);c+=Uint16Array.BYTES_PER_ELEMENT;var d=e.getUint16(c+r,!0);d=B*Int16Array.BYTES_PER_ELEMENT,c+=Uint16Array.BYTES_PER_ELEMENT;var y=e.getFloat32(c+r,!0);c+=Float32Array.BYTES_PER_ELEMENT;var p=new u.e;p.x=e.getFloat32(c+r,!0),c+=Float32Array.BYTES_PER_ELEMENT,p.y=e.getFloat32(c+r,!0),c+=Float32Array.BYTES_PER_ELEMENT,p.z=e.getFloat32(c+r,!0),c+=Float32Array.BYTES_PER_ELEMENT,p.w=e.getFloat32(c+r,!0),c+=Float32Array.BYTES_PER_ELEMENT,A.vertCompressConstant=y,A.minVerticesValue=p;var C=f*B*Int16Array.BYTES_PER_ELEMENT,m=t.subarray(c,c+C);if(c+=C,n.e(E)){var h=new Uint16Array(m.byteLength/2),v=new Uint16Array(m.buffer,m.byteOffset,m.byteLength/2),g=u.e.unpackArray(v);for(let t=0,e=g.length;t<e;t++){let e=g[t];s.o.multiplyByScalar(e,y,e),s.o.add(e,p,e)}var P=a.p.multiply(E.sphereMatrix,E.geoMatrix,Pa),T=a.p.multiply(E.ellipsoidMatrix,E.geoMatrix,Ta);a.p.inverse(T,T);var D=new i.t(6378137,6378137,6378137),_=0;for(let t=0,e=g.length;t<e;t++){let e=g[t];a.p.multiplyByPoint(P,e,va);let r=D.cartesianToCartographic(va,ga),n=ha(r.longitude,r.latitude,r.height,va);a.p.multiplyByPoint(T,n,e),s.o.subtract(e,p,e),s.o.divideByScalar(e,y,e),u.e.pack(e,h,_),_+=4}m=h}var F=A.vertexAttributes,L=A.attrLocation;return L.aPosition=F.length,F.push({index:L.aPosition,typedArray:m,componentsPerAttribute:B,componentDatatype:l.ComponentDatatype.SHORT,offsetInBytes:0,strideInBytes:d,normalize:!1}),{bytesOffset:c}}(t,e,r,C,A,d),C=y.bytesOffset):(C=(y=Da(t,e,r,C,A,c,B,d)).bytesOffset,p=y.cartographicBounds),(m&f.VertexCompressOption.SVC_Normal)==f.VertexCompressOption.SVC_Normal?(y=function(t,e,r,n,a){var o=n,i=e.getUint32(o+r,!0);if(o+=Uint32Array.BYTES_PER_ELEMENT,i<=0)return{bytesOffset:o};e.getUint16(o+r,!0),o+=Uint16Array.BYTES_PER_ELEMENT;var s=e.getUint16(o+r,!0);o+=Uint16Array.BYTES_PER_ELEMENT;var u=2*i*Int16Array.BYTES_PER_ELEMENT,A=t.subarray(o,o+u);if(o+=u,!a.ignoreNormal){var E=a.vertexAttributes,c=a.attrLocation;c.aNormal=E.length,E.push({index:c.aNormal,typedArray:A,componentsPerAttribute:2,componentDatatype:l.ComponentDatatype.SHORT,offsetInBytes:0,strideInBytes:s,normalize:!1})}return{bytesOffset:o}}(t,e,r,C,A),C=y.bytesOffset):C=(y=_a(t,e,r,C,A)).bytesOffset,C=(y=wa(0,e,r,C=(y=La(t,e,r,C,A)).bytesOffset)).bytesOffset,(m&f.VertexCompressOption.SVC_TexutreCoord)==f.VertexCompressOption.SVC_TexutreCoord?(y=function(t,e,r,n,a){a.texCoordCompressConstant=[],a.minTexCoordValue=[];var o=r,i=t.getUint16(r+n,!0);o+=Uint16Array.BYTES_PER_ELEMENT,o+=Uint16Array.BYTES_PER_ELEMENT;for(var s=0,A=0;A<i;A++){var E=t.getUint8(o+n,!0);o+=Uint8Array.BYTES_PER_ELEMENT,o+=3*Uint8Array.BYTES_PER_ELEMENT;var c=t.getUint32(o+n,!0);o+=Uint32Array.BYTES_PER_ELEMENT;var f=t.getUint16(o+n,!0);o+=Uint16Array.BYTES_PER_ELEMENT,t.getUint16(o+n,!0),o+=Uint16Array.BYTES_PER_ELEMENT;var B=t.getFloat32(o+n,!0);o+=Float32Array.BYTES_PER_ELEMENT,a.texCoordCompressConstant.push(B);var d=new u.e;d.x=t.getFloat32(o+n,!0),o+=Float32Array.BYTES_PER_ELEMENT,d.y=t.getFloat32(o+n,!0),o+=Float32Array.BYTES_PER_ELEMENT,d.z=t.getFloat32(o+n,!0),o+=Float32Array.BYTES_PER_ELEMENT,d.w=t.getFloat32(o+n,!0),o+=Float32Array.BYTES_PER_ELEMENT,a.minTexCoordValue.push(d);var y=c*f*Int16Array.BYTES_PER_ELEMENT,p=e.subarray(o,o+y),C=(o+=y)%4;0!==C&&(o+=4-C);var m="aTexCoord"+s,h=a.vertexAttributes,v=a.attrLocation;if(v[m]=h.length,h.push({index:v[m],typedArray:p,componentsPerAttribute:f,componentDatatype:l.ComponentDatatype.SHORT,offsetInBytes:0,strideInBytes:f*Int16Array.BYTES_PER_ELEMENT,normalize:!1}),E){y=c*Float32Array.BYTES_PER_ELEMENT;var g=e.subarray(o,o+y);o+=y,a.texCoordZMatrix=!0,v[m="aTexCoordZ"+s]=h.length,h.push({index:v[m],typedArray:g,componentsPerAttribute:1,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:Float32Array.BYTES_PER_ELEMENT,normalize:!1})}s++}return{bytesOffset:o}}(e,t,C,r,A),C=y.bytesOffset):C=(y=da(e,t,C,r,A,E)).bytesOffset,(m&f.VertexCompressOption.SVC_TexutreCoordIsW)==f.VertexCompressOption.SVC_TexutreCoordIsW&&(A.textureCoordIsW=!0),{bytesOffset:C=(y=ya(e,t,C,r,A)).bytesOffset,cartographicBounds:p}}function Ia(t,e,r,a,o,i,s,u,A,E){3===t&&(r.getUint32(o,!0),o+=Uint32Array.BYTES_PER_ELEMENT);var c,f=o;f=(c=Da(e,r,a,f,i,u,A,E)).bytesOffset;var B=c.cartographicBounds;if(f=(c=La(e,r,a,f=(c=_a(e,r,a,f,i)).bytesOffset,i)).bytesOffset,3!==t&&(f=(c=wa(0,r,a,f)).bytesOffset),f=(c=ya(r,e,f=(c=da(r,e,f,a,i,s)).bytesOffset,a,i)).bytesOffset,3===t&&(c=function(t,e,r,n,a){var o=n,i=e.getUint32(o+r,!0);o+=Uint32Array.BYTES_PER_ELEMENT;for(var s=0;s<i;s++){var u=e.getUint32(o+r,!0);o+=Uint32Array.BYTES_PER_ELEMENT;var A=e.getUint16(o+r,!0);o+=Uint16Array.BYTES_PER_ELEMENT;var E=e.getUint16(o+r,!0);o+=Uint16Array.BYTES_PER_ELEMENT;var c=u*A*Fa[E],f=t.subarray(o,o+c);o+=c;var B=a.vertexAttributes,d=a.attrLocation,y="aCustom"+s;d[y]=B.length,B.push({index:d[y],typedArray:f,componentsPerAttribute:A,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1})}return{bytesOffset:o}}(e,r,a,f,i),f=c.bytesOffset),3==t){var d=Ba(r,a,e,f);f=d.bytesOffset,i.customVertexAttribute=JSON.parse(d.string);var y="aCustom"+i.customVertexAttribute.TextureCoordMatrix,p="aCustom"+i.customVertexAttribute.VertexWeight,C="aCustom"+i.customVertexAttribute.VertexWeight_1;n.e(i.attrLocation[y])&&(i.attrLocation.aTextureCoordMatrix=i.attrLocation[y],delete i.attrLocation[y]),n.e(i.attrLocation[p])&&(i.attrLocation.aVertexWeight=i.attrLocation[p],delete i.attrLocation[p]),n.e(i.attrLocation[C])&&(i.attrLocation.aVertexWeight_1=i.attrLocation[C],delete i.attrLocation[C]);for(var m=Object.keys(i.attrLocation),h=m.length,v=0;v<h;++v){var g=m[v];-1!==g.indexOf("aCustom")&&delete i.attrLocation[g]}var P=(f+a)%4;P&&(P=4-P),f+=P}return 3===t&&(c=function(t,e,r,n,a){var o=n,i=e.getUint32(o+r,!0);if(o+=Uint32Array.BYTES_PER_ELEMENT,i<=0)return{bytesOffset:o};var s=e.getUint16(o+r,!0);return o+=Uint16Array.BYTES_PER_ELEMENT,e.getUint16(o+r,!0),o+=Uint16Array.BYTES_PER_ELEMENT,{bytesOffset:o+=i*s*Float32Array.BYTES_PER_ELEMENT}}(0,r,a,f),f=c.bytesOffset),{bytesOffset:f,cartographicBounds:B}}function Sa(t){return 0!==t.length&&"ClampGroundAndObjectLinePass"===t[0].materialCode}var Oa,Na=1,Ra=4,xa=8,Ua=16,Ga=32,Ka=64,Ha=128,ka=512,Va=1024;function Ya(t,e,r,o,A,E,c,B,d,y,p,C,m){var h=t,v=0,g=e.getUint32(v+r,!0);v+=Uint32Array.BYTES_PER_ELEMENT,y=n.u(y,n.u.EMPTY_OBJECT);for(var P=void 0,T=0;T<g;T++){3===B&&(e.getUint32(v+r,!0),v+=Uint32Array.BYTES_PER_ELEMENT);var D=(Dt=Ba(e,r,h,v)).string;if(n.e(d)){var F=n.u(y[D],a.p.IDENTITY);P=new a.p,a.p.multiply(d,F,P)}n.e(m)&&(m.geoMatrix=n.u(y[D],a.p.IDENTITY));var L=(v=Dt.bytesOffset)%4;0!==L&&(v+=4-L);var w=qn;if(w=e.getUint32(v+r,!0),v+=Int32Array.BYTES_PER_ELEMENT,($t={vertexAttributes:[],attrLocation:{},instanceCount:0,instanceMode:0,instanceIndex:-1}).ignoreNormal=o.ignoreNormal,3===B)switch(w){case ra:w=$n;break;case na:w=ea;break;case aa:w=ta}if(w===ea){3===B&&(e.getInt32(v+r,!0),v+=Int32Array.BYTES_PER_ELEMENT),B>=2&&(e.getInt32(v+r,!0),v+=Int32Array.BYTES_PER_ELEMENT);var b,M={};M.posUniqueID=e.getInt32(v+r,!0),v+=Int32Array.BYTES_PER_ELEMENT,M.normalUniqueID=e.getInt32(v+r,!0),v+=Int32Array.BYTES_PER_ELEMENT,M.colorUniqueID=e.getInt32(v+r,!0),v+=Int32Array.BYTES_PER_ELEMENT,M.secondColorUniqueID=e.getInt32(v+r,!0),v+=Int32Array.BYTES_PER_ELEMENT,3===B?(b=e.getUint32(v+r,!0),v+=Int32Array.BYTES_PER_ELEMENT):(b=e.getUint16(v+r,!0),v+=Int16Array.BYTES_PER_ELEMENT);for(var I=[],S=0;S<b;S++){var O=e.getInt32(v+r,!0);I.push(O),v+=Int32Array.BYTES_PER_ELEMENT}M.texCoordUniqueIDs=I;var R=[];if(3===B){var x=e.getUint32(v+r,!0);v+=Int32Array.BYTES_PER_ELEMENT;for(var U=0;U<x;U++){var G=e.getInt32(v+r,!0);v+=Int32Array.BYTES_PER_ELEMENT,R.push(G)}}M.vertexAttrUniqueIDs=R;var K=e.getInt32(v+r,!0);v+=Int32Array.BYTES_PER_ELEMENT;var H=[],k={};if(K>0){var V=(Y=Ba(e,r,h,v)).string;v=Y.bytesOffset,k.materialCode=V,H.push(k)}3===B&&((wt=(v+r)%4)&&(wt=4-wt),v+=wt);var Y,J=new Object,j=e.getUint32(v+r,!0),W=_(h,v+=Int32Array.BYTES_PER_ELEMENT,v+j);if(K>0?N.dracoDecodeMesh(Zn,W,j,$t,k,M,P,p,J,m):N.dracoDecodePointCloud(Zn,W,j,$t,M),n.e(J.min)&&n.e(J.max)||(J=void 0),v+=j,3===B)(wt=(v+r)%4)&&(wt=4-wt),(wt=((v=(Y=Ba(e,r,h,v+=wt)).bytesOffset)+r)%4)&&(wt=4-wt),v+=wt;o[D]={vertexPackage:$t,arrIndexPackage:H,cartographicBounds:J}}else if(w==ta&&3==B){var z=e.getUint32(v+r,!0);v+=Uint32Array.BYTES_PER_ELEMENT;var X=e.getUint32(v+r,!0);v+=Uint32Array.BYTES_PER_ELEMENT,$t.minVerticesValue=new u.e,$t.minTexCoordValue=[new i.o,new i.o],$t.texCoordCompressConstant=[new s.o,new s.o];H=[];for(var Z=0;Z<X;Z++){var Q=e.getUint32(v+r,!0);v+=Uint32Array.BYTES_PER_ELEMENT,$t.vertCompressConstant=e.getFloat32(v+r,!0),v+=Float32Array.BYTES_PER_ELEMENT,$t.minVerticesValue.x=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,$t.minVerticesValue.y=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,$t.minVerticesValue.z=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT;var q=e.getFloat64(v+r,!0);v+=Float64Array.BYTES_PER_ELEMENT;var $=e.getFloat64(v+r,!0);v+=Float64Array.BYTES_PER_ELEMENT;var tt=e.getFloat64(v+r,!0);v+=Float64Array.BYTES_PER_ELEMENT;var et=e.getFloat64(v+r,!0);v+=Float64Array.BYTES_PER_ELEMENT;var rt=e.getFloat64(v+r,!0);v+=Float64Array.BYTES_PER_ELEMENT;var nt=e.getFloat64(v+r,!0);v+=Float64Array.BYTES_PER_ELEMENT;var at=e.getFloat64(v+r,!0);v+=Float64Array.BYTES_PER_ELEMENT;var ot=e.getFloat64(v+r,!0);v+=Float64Array.BYTES_PER_ELEMENT,$t.minTexCoordValue[0].x=tt,$t.minTexCoordValue[0].y=et,$t.minTexCoordValue[1].x=at,$t.minTexCoordValue[1].y=ot,$t.texCoordCompressConstant[0].x=q,$t.texCoordCompressConstant[0].y=$,$t.texCoordCompressConstant[1].x=rt,$t.texCoordCompressConstant[1].y=nt;var st=e.getInt32(v+r,!0);v+=Int32Array.BYTES_PER_ELEMENT;J=new Object;for(var ut=0;ut<st;ut++){var At=e.getInt32(v+r,!0);v+=Int32Array.BYTES_PER_ELEMENT;var Et=At,lt=0;Et!=ka&&Et!=Va||(lt=e.getInt32(v+r,!0),v+=Int32Array.BYTES_PER_ELEMENT);var ct=e.getInt32(v+r,!0);v+=Int32Array.BYTES_PER_ELEMENT;var ft=new Uint8Array(e.buffer,v+r,ct);(wt=((v+=Uint8Array.BYTES_PER_ELEMENT*ct)+r)%4)&&(wt=4-wt),v+=wt,ja(Q,Et,lt,ft,$t,z,m,p,J,P,E)}v=(Lt=Ba(e,r,h,v)).bytesOffset,$t.customVertexAttribute=JSON.parse(Lt.string),(wt=(v+r)%4)&&(wt=4-wt),v+=wt;var Bt=e.getInt32(v+r,!0);v+=Int32Array.BYTES_PER_ELEMENT;for(var dt=0;dt<Bt;dt++){k={};var yt=e.getInt32(v+r,!0);if(v+=Int32Array.BYTES_PER_ELEMENT,yt>0){var pt=e.getInt8(v+r,!0);v+=Int8Array.BYTES_PER_ELEMENT,e.getInt8(v+r,!0),v+=Int8Array.BYTES_PER_ELEMENT;var Ct=e.getInt8(v+r,!0);v+=Int8Array.BYTES_PER_ELEMENT,e.getInt8(v+r,!0),v+=Int8Array.BYTES_PER_ELEMENT;var mt,ht,vt=e.getInt32(v+r,!0);v+=Int32Array.BYTES_PER_ELEMENT,13!==Ct?(mt=new Uint8Array(e.buffer,v+r,vt),v+=Uint8Array.BYTES_PER_ELEMENT*vt):(mt=new Uint32Array(e.buffer,v+r,vt),v+=Uint32Array.BYTES_PER_ELEMENT*vt),(wt=(v+r)%4)&&(wt=4-wt),v+=wt,13!==Ct?(ht=l.ComponentDatatype.createTypedArray(l.ComponentDatatype.UNSIGNED_BYTE,yt*Uint32Array.BYTES_PER_ELEMENT),it.decodeIndexBuffer(ht,yt,Uint32Array.BYTES_PER_ELEMENT,mt)):ht=mt;var gt,Pt=e.getInt32(v+r,!0);v+=Int32Array.BYTES_PER_ELEMENT,k.indexType=pt,0===pt?gt=new Uint16Array(yt):1===pt&&(gt=new Uint32Array(yt)),k.indicesCount=yt;var Tt=new Uint32Array(ht.buffer,ht.byteOffset,ht.byteLength/4);gt.set(Tt,0),k.indicesTypedArray=gt,E.push(gt.buffer),k.primitiveType=Ct;for(ut=0;ut<Pt;ut++){var Dt;V=(Dt=Ba(e,r,h,v)).string;v=Dt.bytesOffset,k.materialCode=V}if(H.length>0&&13!==Ct){var _t=$t.preVertexCount;k.indicesTypedArray=Tt.map((function(t){return t+_t})),k.indexType=1}H.push(k),(wt=(v+r)%4)&&(wt=4-wt),v+=wt}}}$t.nCompressOptions=z,2===H.length&&13===H[1].primitiveType&&H[1].indicesCount>=3&&(Ft=f._0x28a85f.createEdgeDataByIndices($t,H[1],E)),n.e(J.min)&&n.e(J.max)||(J=void 0),o[D]={vertexPackage:$t,arrIndexPackage:H,edgeGeometry:Ft,cartographicBounds:J}}else{var Ft;if(w===$n||w===qn)v=(Dt=Ia(B,h,e,r,v,$t,A,P,p,m)).bytesOffset,J=Dt.cartographicBounds;else if(w===ta&&(v=(Dt=Ma(h,e,r,v,$t,A,P,p,m)).bytesOffset,J=Dt.cartographicBounds,3==B)){var Lt;v=(Lt=Ba(e,r,h,v)).bytesOffset,$t.customVertexAttribute=JSON.parse(Lt.string);var wt,bt="aCustom"+$t.customVertexAttribute.TextureCoordMatrix,Mt="aCustom"+$t.customVertexAttribute.VertexWeight,It="aCustom"+$t.customVertexAttribute.VertexWeight_1;n.e($t.attrLocation[bt])&&($t.attrLocation.aTextureCoordMatrix=$t.attrLocation[bt],delete $t.attrLocation[bt]),n.e($t.attrLocation[Mt])&&($t.attrLocation.aVertexWeight=$t.attrLocation[Mt],delete $t.attrLocation[Mt]),n.e($t.attrLocation[It])&&($t.attrLocation.aVertexWeight_1=$t.attrLocation[It],delete $t.attrLocation[It]);for(var St=Object.keys($t.attrLocation),Ot=St.length,Nt=0;Nt<Ot;++Nt){var Rt=St[Nt];-1!==Rt.indexOf("aCustom")&&delete $t.attrLocation[Rt]}(wt=(v+r)%4)&&(wt=4-wt),v+=wt}Sa(H=(Dt=ba(B,h,e,r,v)).arrIndexPackage)&&($t.clampRegionEdge=!0),2===H.length&&13===H[1].primitiveType&&H[1].indicesCount>=3&&(Ft=f._0x28a85f.createEdgeDataByIndices($t,H[1],E)),v=Dt.bytesOffset,n.e(J)&&n.e(J.min)&&n.e(J.max)||(J=void 0),o[D]={vertexPackage:$t,arrIndexPackage:H,edgeGeometry:Ft,cartographicBounds:J}}if(3!==B&&n.e(c)&&c){var xt=e.getUint16(v+r,!0);if(v+=Uint16Array.BYTES_PER_ELEMENT,1===xt){var Ut=e.getUint32(v+r,!0);v+=Uint32Array.BYTES_PER_ELEMENT;var Gt,Kt=e.getUint32(v+r,!0);v+=Uint32Array.BYTES_PER_ELEMENT,e.getFloat32(v+r,!0),v+=Float32Array.BYTES_PER_ELEMENT;var Ht=new Array(Ut),kt=new Array(Ut),Vt=new Array(Ut),Yt=new Array(Ut);for(Gt=0;Gt<Ut;Gt++){var Jt=e.getFloat32(v+r,!0);v+=Float32Array.BYTES_PER_ELEMENT,Ht[Gt]=Jt;var jt=e.getUint16(v+r,!0);v+=Uint16Array.BYTES_PER_ELEMENT,kt[Gt]=jt;var Wt=e.getUint16(v+r,!0);v+=Uint16Array.BYTES_PER_ELEMENT,Vt[Gt]=Wt;for(var zt=Wt*Kt,Xt=new Array(zt),Zt=0;Zt<zt;Zt++){bt=e.getFloat32(v+r,!0);v+=Float32Array.BYTES_PER_ELEMENT,Xt[Zt]=bt}Yt[Gt]=Xt}}var Qt=new s.o,qt=new s.o;Qt.x=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,Qt.y=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,Qt.z=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,qt.x=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,qt.y=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,qt.z=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,o[D].min=Qt,o[D].max=qt;var $t=o[D].vertexPackage;n.e($t.instanceBuffer)&&2===B&&($t.instanceBounds=new Float32Array(6),s.o.pack(Qt,$t.instanceBounds,0),s.o.pack(qt,$t.instanceBounds,3))}if(3===B){var te=new s.o;te.x=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,te.y=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,te.z=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT;var ee=new s.o;ee.x=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,ee.y=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,ee.z=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT;var re=new s.o;re.x=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,re.y=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,re.z=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT;var ne=new s.o;ne.x=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,ne.y=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT,ne.z=e.getFloat64(v+r,!0),v+=Float64Array.BYTES_PER_ELEMENT}}}function Ja(t,e,r){var n=t.typedArray,a=new r(n.length+e.length);a.set(n,0),a.set(e,n.length),t.typedArray=a}function ja(t,e,r,o,u,E,c,f,B,d,y){var p,C=0,m=u.vertexAttributes,h=u.attrLocation;switch(e){case Ra:case xa:case Ua:case Ga:C=2*Uint16Array.BYTES_PER_ELEMENT,0!=(16&E)||e!==Ua&&e!==Ga||(C=2*Float32Array.BYTES_PER_ELEMENT),p=l.ComponentDatatype.createTypedArray(l.ComponentDatatype.UNSIGNED_BYTE,t*C);break;case Ka:case Ha:C=4*Uint8Array.BYTES_PER_ELEMENT,p=l.ComponentDatatype.createTypedArray(l.ComponentDatatype.UNSIGNED_BYTE,4*t);break;case ka:case Va:C=Float32Array.BYTES_PER_ELEMENT*r,p=l.ComponentDatatype.createTypedArray(l.ComponentDatatype.UNSIGNED_BYTE,t*r*4);break;default:C=4*Uint16Array.BYTES_PER_ELEMENT,p=l.ComponentDatatype.createTypedArray(l.ComponentDatatype.UNSIGNED_BYTE,t*C)}switch(it.decodeVertexBuffer(p,t,C,o,o.length),y.push(p.buffer),e){case Na:var v=new Uint16Array(p.buffer,0,p.length/2),g=l.ComponentDatatype.SHORT;if(void 0!==(I=h.aPosition)?(Ja(m[I],v,Uint16Array),u.preVertexCount=u.verticesCount,u.verticesCount+=t):(h.aPosition=m.length,m.push({index:h.aPosition,typedArray:v,componentsPerAttribute:4,componentDatatype:g,offsetInBytes:0,strideInBytes:0,normalize:!1}),u.verticesCount=t),!n.e(c)&&f){var P,T=new A.a,D=new A.a,_=new Float32Array(2*t),F=new Float64Array(2*t),L=new s.o,w=new s.o,b=new A.a;P=Oa?new i.t(6378137,6378137,6356752.314245179):new i.t(6378137,6378137,6378137);for(var M=0;M<t;M++)a.p.multiplyByPoint(d,s.o.fromElements(v[4*M]*u.vertCompressConstant+u.minVerticesValue.x,v[4*M+1]*u.vertCompressConstant+u.minVerticesValue.y,v[4*M+2]*u.vertCompressConstant+u.minVerticesValue.z,L),w),b=P.cartesianToCartographic(w,ga),F[2*M]=b.longitude,F[2*M+1]=b.latitude,0===M?(T.longitude=b.longitude,T.latitude=b.latitude,D.longitude=b.longitude,D.latitude=b.latitude):(T.longitude=Math.max(b.longitude,T.longitude),T.latitude=Math.max(b.latitude,T.latitude),D.longitude=Math.min(b.longitude,D.longitude),D.latitude=Math.min(b.latitude,D.latitude));for(M=0;M<t;M++)_[2*M]=F[2*M]-D.longitude,_[2*M+1]=F[2*M+1]-D.latitude;h.img=m.length,m.push({index:h.img,typedArray:_,componentsPerAttribute:2,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),B.max=T,B.min=D}break;case Ra:var I=h.aNormal,S=new Int16Array(p.buffer,0,p.length/2);void 0!==I?Ja(m[I],S,Uint16Array):(h.aNormal=m.length,m.push({index:h.aNormal,typedArray:S,componentsPerAttribute:2,componentDatatype:l.ComponentDatatype.SHORT,offsetInBytes:0,strideInBytes:0,normalize:!1}));break;case Ua:var O=new Uint16Array(p.buffer,0,p.length/2),N=(I=h.aTexCoord0,g=l.ComponentDatatype.SHORT,Uint16Array);0==(16&E)&&(g=l.ComponentDatatype.FLOAT,N=Float32Array,O=new Float32Array(p.buffer,0,p.length/4)),void 0!==I?Ja(m[I],O,N):(h.aTexCoord0=m.length,m.push({index:h.aTexCoord0,typedArray:O,componentsPerAttribute:2,componentDatatype:g,offsetInBytes:0,strideInBytes:0,normalize:!1}));break;case Ga:O=new Uint16Array(p.buffer,0,p.length/2),I=h.aTexCoord1,g=l.ComponentDatatype.SHORT,N=Uint16Array;0==(16&E)&&(g=l.ComponentDatatype.FLOAT,N=Float32Array,O=new Float32Array(p.buffer,0,p.length/4)),void 0!==I?Ja(m[I],O,N):(h.aTexCoord1=m.length,m.push({index:h.aTexCoord1,typedArray:O,componentsPerAttribute:2,componentDatatype:g,offsetInBytes:0,strideInBytes:0,normalize:!1}));break;case Ka:void 0!==(I=h.aColor)?Ja(m[I],p,Uint8Array):(h.aColor=m.length,m.push({index:h.aColor,typedArray:p,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:0,normalize:!0}));break;case Ha:void 0!==(I=h.aSecondColor)?Ja(m[I],p,Uint8Array):(h.aSecondColor=m.length,m.push({index:h.aSecondColor,typedArray:p,componentsPerAttribute:4,componentDatatype:l.ComponentDatatype.BYTE,offsetInBytes:0,strideInBytes:0,normalize:!1}));break;case ka:O=new Float32Array(p.buffer,0,p.length/4);void 0!==(I=h.aVertexWeight)?Ja(m[I],O,Float32Array):(h.aVertexWeight=m.length,m.push({index:h.aVertexWeight,typedArray:O,componentsPerAttribute:r,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}));break;case Va:var R=new Float32Array(p.buffer,0,p.length/4);void 0!==(I=h.aTextureCoordMatrix)?Ja(m[I],R,Float32Array):(h.aTextureCoordMatrix=m.length,m.push({index:h.aTextureCoordMatrix,typedArray:R,componentsPerAttribute:r,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:0,normalize:!1}))}}function Wa(t,e,r,o,i){var s={},u=[],A=new a.p,E=t;i=n.u(i,{});for(var l=0;l<16;l++)A[l]=e.getFloat64(r+o,!0),r+=Float64Array.BYTES_PER_ELEMENT;s.matrix=A,s.skeletonNames=u;var c=e.getUint32(r+o,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(var f=0;f<c;f++){var B=Ba(e,o,E,r),d=B.string;r=B.bytesOffset,u.push(d),i[d]=A}return{byteOffset:r,geode:s}}function za(t){var e=t.indexOf("Geometry");if(-1===e)return t;var r=t.substring(e,t.length);return t.replace(r,"")}function Xa(t,e,r,u,A,E,l){var c={},f=r.getFloat32(u+A,!0);u+=Float32Array.BYTES_PER_ELEMENT;var B=r.getUint16(u+A,!0);u+=Uint16Array.BYTES_PER_ELEMENT,c.rangeMode=B,c.rangeList=f;var d=new s.o;d.x=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT,d.y=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT,d.z=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT;var y=r.getFloat64(u+A,!0);if(u+=Float64Array.BYTES_PER_ELEMENT,n.e(l)){var p=a.p.clone(l.sphereMatrix,Pa),C=a.p.clone(l.ellipsoidMatrix,Ta);a.p.inverse(C,C);var m=new i.t(6378137,6378137,6378137);a.p.multiplyByPoint(p,d,va);let t=m.cartesianToCartographic(va,ga),e=ha(t.longitude,t.latitude,t.height,va);a.p.multiplyByPoint(C,e,d)}if(c.boundingSphere=new o.i(d,y),3===t){var h=new s.o;h.x=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT,h.y=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT,h.z=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT;var v=new s.o;v.x=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT,v.y=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT,v.z=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT;var g=new s.o;g.x=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT,g.y=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT,g.z=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT;var P=new s.o;P.x=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT,P.y=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT,P.z=r.getFloat64(u+A,!0),u+=Float64Array.BYTES_PER_ELEMENT,0==v.x&&0==v.y&&0==v.z&&(v.x=1),0==g.x&&0==g.y&&0==g.z&&(g.y=1),0==P.x&&0==P.y&&0==P.z&&(P.z=1),c._obb={xExtent:v,yExtent:g,zExtent:P,obbCenter:h}}var T=e,D=(L=Ba(r,A,T,u)).string;u=L.bytesOffset,D=za(D=(D=D.replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)/gi,"")).replace(/\\/gi,"/")),c.childTile=D,c.geodes=[];var _=r.getUint32(u+A,!0);u+=Uint32Array.BYTES_PER_ELEMENT;for(var F=0;F<_;F++){var L;u=(L=Wa(e,r,u,A,E)).byteOffset,c.geodes.push(L.geode)}return 3===t&&(u=(L=Ba(r,A,T,u)).bytesOffset),{pageLOD:c,bytesOffset:u}}function Za(t,e,r,n,a,o){var i=0,s={},u=[],A=r.getUint32(i+n,!0);i+=Uint32Array.BYTES_PER_ELEMENT;for(var E=0;E<A;E++){var l=Xa(t,e,r,i,n,a,o);i=l.bytesOffset,u.push(l.pageLOD)}return s.pageLods=u,s}function Qa(t,r){var n=t.vertexAttributes,a=t.attrLocation,o=n.length;a.aTextureBatchId=o;var i,s=t.verticesCount,u=Object.keys(r).length;if(1==u)i=r[0];else if(u>1)for(var A in i=new Float32Array(s*u),e.d(i,-1),r)for(var E=r[A],c=parseInt(A),f=0;f<s;f++)i[2*f+c]=E[f];n.push({index:o,typedArray:i,componentsPerAttribute:u,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:0})}function qa(t,r,a,o){for(var i=a.length,s=0;s<i;s++)for(var u=a[s],A=u.subName.split("_")[0],E=u.subVertexOffsetArr,l=0;l<E.length;l++){var c=E[l],f=c.geoName,B=c.offset,d=c.count,y=c.texUnitIndex,p=r[f].vertexPackage.verticesCount,C=o[f];n.e(C)||(C=o[f]={});var m=C[y];n.e(m)||(m=C[y]=new Float32Array(p),e.d(m,-1));var h=n.e(t)?t[A]:s;e.d(m,h,B,B+d)}}function $a(t,e,r){var n=t.vertexAttributes,a=t.attrLocation,o=n.length;a[1===r?"instanceId":"batchId"]=o,n.push({index:o,typedArray:e,componentsPerAttribute:1,componentDatatype:l.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:0,instanceDivisor:r})}function to(t,r,a,o,i,s){var u=0,A=t,E=r.getUint32(u+a,!0);u+=Uint32Array.BYTES_PER_ELEMENT;for(var l=0;l<E;l++){var c=Ba(r,a,A,u),B=c.string;u=c.bytesOffset;var d=r.getUint32(u+a,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var y={};o[B].pickInfo=y;var p=o[B].edgeGeometry;if(-1==o[B].vertexPackage.instanceIndex){var C=new Float32Array(o[B].vertexPackage.verticesCount);s.push(C.buffer);for(var m=0;m<d;m++){var h=r.getUint32(u+a,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var v=r.getUint32(u+a,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var g=0,P=0;y[h]={batchId:m};for(var T=0;T<v;T++)P=r.getUint32(u+a,!0),u+=Uint32Array.BYTES_PER_ELEMENT,g=r.getUint32(u+a,!0),u+=Uint32Array.BYTES_PER_ELEMENT,e.d(C,m,P,P+g);y[h].vertexColorOffset=P,y[h].vertexCount=g}$a(o[B].vertexPackage,C,void 0)}else{var D=o[B].vertexPackage.instanceCount;o[B].vertexPackage.instanceBuffer,o[B].vertexPackage.instanceMode;var _=new Float32Array(D);s.push(_.buffer);var F=0;for(m=0;m<d;m++){var L=r.getUint32(u+a,!0);u+=Uint32Array.BYTES_PER_ELEMENT;v=r.getUint32(u+a,!0);u+=Uint32Array.BYTES_PER_ELEMENT;for(T=0;T<v;T++){var w=r.getUint32(u+a,!0);if(u+=Uint32Array.BYTES_PER_ELEMENT,_[F]=F,void 0===y[L]&&(y[L]={vertexColorCount:1,instanceIds:[],vertexColorOffset:F}),y[L].instanceIds.push(w),F++,3===i){g=r.getUint32(u+a,!0);u+=Uint32Array.BYTES_PER_ELEMENT}}}$a(o[B].vertexPackage,_,1)}p=o[B].edgeGeometry;if(n.e(p)){var b,M,I=p.regular.instancesData,S=f._0x28a85f.RegularInstanceStride;if(n.e(I))for(M=I.length,b=0;b<M;b+=S){var O=I[b+9];I[b+9]=C[O]}var N=p.silhouette.instancesData;if(S=f._0x28a85f.SilhouetteInstanceStride,n.e(N))for(M=N.length,b=0;b<M;b+=S){O=N[b+12];N[b+12]=C[O]}}}}function eo(t){return t<1e-10&&t>-1e-10}function ro(t,e,r,a,o,i,s,u){var A=new DataView(t),E=new Uint8Array(t),l=A.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var c=B.a(E,r,l);c=c.replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)/gi,""),r+=l;var f=A.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(var d=0;d<f;d++){var y={},C=A.getFloat32(r,!0);r+=Float32Array.BYTES_PER_ELEMENT;var m=A.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT,y.rangeMode=m,y.rangeList=C;var v={};v.x=A.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,v.y=A.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,v.z=A.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT;var g=A.getFloat64(r,!0);r+=Float64Array.BYTES_PER_ELEMENT,y.boundingSphere={center:v,radius:g},l=A.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var P=B.a(E,r,l);r+=l,P=za(P=P.replace(/(\.s3mblock)|(\.s3mbz)|(\.s3mb)/gi,"")),y.childTile=P}var T={},D=A.getFloat32(r,!0);r+=Float32Array.BYTES_PER_ELEMENT;D>=3&&(A.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT),A.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;var _=A.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var F=new Uint8Array(t,r,_),L=r+_,w=h.pako.inflate(F).buffer;u.push(w),A=new DataView(w);E=new Uint8Array(w);r=0;var b=A.getUint32(r,!0),M=fa(A,w,r+=Uint32Array.BYTES_PER_ELEMENT),S=M.buffer;r=M.byteOffset;var O=Za(D,S,A,M.dataViewByteOffset),N=r%4;0!==N&&(r+=4-N),Ya((M=fa(A,w,r)).buffer,A,M.dataViewByteOffset,T,!1,u,void 0,D),r=M.byteOffset,3!==D&&((M=fa(A,w,r)).buffer,r=M.byteOffset);var R={};!function(t,e,r,a,o,i,s,u,A,E){var l=u,c=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;for(var f={},d=0;d<c;d++){var y=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var C=B.a(i,l-u,y),m=(l+=y)%4;0!==m&&(l+=4-m),s.getUint32(l,!0),l+=Uint32Array.BYTES_PER_ELEMENT;var h=s.getUint8(l,!0);l+=Uint8Array.BYTES_PER_ELEMENT;var v=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var g=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var P=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var T=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var D,_=s.getUint32(l,!0);if(l+=Uint32Array.BYTES_PER_ELEMENT,a&&h){var F=l-u;D=i.subarray(F,F+T),l+=T}var L=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;for(var w=[],b=0;b<L;b++){y=s.getUint32(l,!0),l+=Uint32Array.BYTES_PER_ELEMENT;var M=B.a(i,l-u,y);l+=y,w.push(M),r[M]=C}var I=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var S=[];for(b=0;b<I;b++){y=s.getUint32(l,!0),l+=Uint32Array.BYTES_PER_ELEMENT;var O=B.a(i,l-u,y);l+=y,S.push(O)}var N=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var R=[],x=void 0,U=C;if(a)x=e[C]={};else{var G=r[C];for(U=G;n.e(G)&&G!==C;)U=G,G=r[G];n.e(U)&&(x=e[U])}var K=0;for(b=0;b<N;b++){y=s.getUint32(l,!0),l+=Uint32Array.BYTES_PER_ELEMENT;var H=B.a(i,l-u,y);if(l+=y,a){var k=H.split("_")[0];n.e(x[k])?K++:x[k]=b-K}var V=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var Y=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var J=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var j=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var W=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;for(var z=[],X=0;X<W;X++){y=s.getUint32(l,!0),l+=Uint32Array.BYTES_PER_ELEMENT;var Z=B.a(i,l-u,y);l+=y;var Q=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var q=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT;var $=s.getUint32(l,!0);l+=Uint32Array.BYTES_PER_ELEMENT,z.push({geoName:Z,offset:Q,count:q,texUnitIndex:$})}R.push({subName:H,offsetX:V,offsetY:Y,width:J,height:j,subVertexOffsetArr:z})}qa(x,t,R,f),n.e(D)&&P===p.S3MPixelFormat.CRN_DXT5&&zn&&(D=Xn({data:D},E).bufferView),A[C]={id:C,rootTextureName:U,width:v,height:g,compressType:P,size:T,format:_,textureData:D,subTexInfos:R,requestNames:S}}for(var Z in f)f.hasOwnProperty(Z)&&Qa(t[Z].vertexPackage,f[Z])}(T,a,o,i,0,(M=fa(A,w,r)).buffer,A,M.dataViewByteOffset,R,u),r=M.byteOffset;var x=A.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;var U=E.subarray(r,r+x),G=B.a(U);r+=x;var K=JSON.parse(G);(3===D&&(b=A.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT),(b&Qn)==Qn)&&(to((M=fa(A,w,r)).buffer,A,M.dataViewByteOffset,T,D,u),r=M.byteOffset);if(1==D){var H=O.pageLods,k=!0;for(d=0;d<H.length;d++){var V=H[d];k=""===V.childTile;for(var Y=V.geodes,J=0;J<Y.length;J++)for(var j=Y[J].skeletonNames,W=0;W<j.length;W++){var z=j[W];if(k){var X=T[z].vertexPackage;X.boundingSphere=$.calcBoundingSphereInWorker(1,X)}}}}s[c]={result:!0,groupNode:O,geoPackage:T,matrials:K,texturePackage:R,version:I.S3M4,dataVersion:D,rootBatchIdMap:a,ancestorMap:o},L<e&&ro(t,e,L,a,o,!1,s,u)}function no(t){var e=new Float32Array(t);return new Uint8Array(e.buffer)}function ao(t){for(var e=[],r=0,n=t.length;r<n;r++)e.push(t[r][0]),e.push(t[r][1]),e.push(t[r][2]);var a=new Uint32Array(e);return new Uint8Array(a.buffer)}function oo(e,r){var a=e.buffer;if(Oa=e.ellipsoid,Aa&&e.useAssimp){var o=new Et.FileList;o.AddFile("1."+e.suffix,new Uint8Array(a)),null!=e.mtlbuffer&&o.AddFile("1.mtl",new Uint8Array(e.mtlbuffer));var i=Et.ConvertFileList(o,"assjson");if(!i.IsSuccess()||0==i.FileCount())return null;var s=i.GetFile(0),u=(new TextDecoder).decode(s.GetContent());return function(t){for(var e={dataVersion:1,geoPackage:{},groupNode:{},texturePackage:{},result:!0,version:1,matrials:{material:[]}},r=[],a=t.rootnode.children;a&&a[0]&&a[0].children;)if((a=a[0].children)[0].children.length>1){a=a[0].children;break}for(var o=0,i=a.length;o<i;o++){var s=a[o];if(!s.children){r.push(s.transformation);break}for(var u,A=s.children[0];A.children;)u=(A=A.children[0]).transformation;var E=[];E[0]=u[0],E[1]=u[4],E[2]=u[12],E[3]=u[13],E[4]=u[1],E[5]=u[5],E[6]=u[9],E[7]=u[14],E[8]=u[2],E[9]=u[6],E[10]=u[10],E[11]=u[8],E[12]=u[3],E[13]=u[7],E[14]=u[11],E[15]=u[15],r.push(E)}e.mats=r;var l,c,f,B,d=t.meshes;for(o=0,i=d.length;o<i;o++){var y=d[o],p=ao(y.faces),C=(f=y.normals,B=void 0,B=new Int16Array(f),new Uint8Array(B.buffer)),m=(l=y.vertices,c=void 0,c=new Float32Array(l),new Uint8Array(c.buffer)),h={aPosition:0,aNormal:1},v=[];if(v[0]={componentDatatype:5126,componentsPerAttribute:3,index:0,normalize:!1,offsetInBytes:0,strideInBytes:12,typedArray:m},v[1]={componentDatatype:5126,componentsPerAttribute:3,index:1,normalize:!1,offsetInBytes:0,strideInBytes:0,typedArray:C},n.e(y.texturecoords)){var g=no(y.texturecoords[0]);h.aTexCoord0=2,v[2]={componentDatatype:5126,componentsPerAttribute:2,index:2,normalize:!1,offsetInBytes:0,strideInBytes:8,typedArray:g}}var P={arrIndexPackage:[{indexType:1,indicesCount:3*y.faces.length,indicesTypedArray:p,primitiveType:4,materialCode:t.materials[y.materialindex].properties[0].value}],vertexPackage:{attrLocation:h,instanceCount:0,instanceIndex:-1,instanceMode:0,vertexAttributes:v,verticesCount:y.vertices.length/3}};e.geoPackage[y.name]=P}var T=t.materials,D=0;for(i=T.length;D<i;D++){for(var _=T[D].properties,F={cullMode:"clockwise",transparentsorting:0},L=0,w=_.length;L<w;L++){var b=_[L],M=b.key.substring(b.key.indexOf(".")+1,b.key.length);-1===b.key.indexOf("mat.")&&-1===b.key.indexOf("clr.")||("name"===M&&(F.id=b.value),"shininess"===M&&(F.shininess=b.value),"ambient"===M&&(F.ambient={r:b.value[0],g:b.value[1],b:b.value[2],a:b.value[3]}),"diffuse"===M&&(F.diffuse={r:b.value[0],g:b.value[1],b:b.value[2],a:b.value[3]}),"specular"===M&&(F.specular={r:b.value[0],g:b.value[1],b:b.value[2],a:b.value[3]})),-1!==b.key.indexOf("tex.")&&(n.e(F.textureunitstates)||(F.textureunitstates=[{textureunitstate:{texmodmatrix:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],addressmode:{u:0,v:0}}}]),"file"===M&&(F.textureunitstates[0].textureunitstate.id=b.value,F.textureunitstates[0].textureunitstate.url=b.value))}n.e(F.textureunitstates)||(F.textureunitstates=[]),e.matrials.material[D]={},e.matrials.material[D].material=F}return e}(JSON.parse(u))}if(e.isOSGB){if(n.e(oa)||new Promise((function(e,r){t(["./OSGBToS3M-f8fa8fe0"],e,r)})).then((function(t){(oa=t.default).onRuntimeInitialized=function(){sa=!0},ua=oa.cwrap("OSGBToS3MB","number",["number","number","number","number"])})),!sa)return null;var A;switch(e.suffix){case"dae":case"DAE":A=4;break;case"x":case"X":A=2;break;default:A=0}a=function(t,e,r){var n=oa._malloc(20*e),a=oa._malloc(Uint8Array.BYTES_PER_ELEMENT*e);oa.HEAPU8.set(t,a/Uint8Array.BYTES_PER_ELEMENT);var o=ua(a,e,n,r),i=new Uint8Array(oa.HEAPU8.buffer,n,o);return t=null,t=new Uint8Array(i).buffer,oa._free(n),oa._free(a),t}(new Uint8Array(a),a.byteLength,A)}var E=e.isS3MZ,l=e.fileType,c=e.supportCompressType,d=e.bVolume,y=e.isS3MBlock,C=e.modelMatrix,m=e.materialType,v=e.isCoverImageryLayer,P=e.transformPar,T=null,D=null,_=null;if(d&&e.volbuffer.byteLength<8&&(d=!1),d){var F=e.volbuffer,L=new Uint8Array(F,8),w=h.pako.inflate(L).buffer,b=new Float64Array(w,0,1),M=new Uint32Array(w,48,1);if(0===b[0]||3200===M[0]||3201===M[0]){var S=0;0==b[0]&&(S=8),r.push(w);var O=new Float64Array(w,S,6),N=O[0],R=O[1],x=O[2],U=O[3],G=O[4]<O[5]?O[4]:O[5],K=O[4]>O[5]?O[4]:O[5];D={left:N,top:R,right:x,bottom:U,minHeight:G,maxHeight:K,width:(T=new ca(N,U,x,R,G,K)).width,length:T.length,height:T.height};var H=new Uint32Array(w,48+S,7),k=H[0],V=H[1],Y=H[2],J=H[3];_={nFormat:k,nSideBlockCount:V,nBlockLength:Y,nLength:J,nWidth:H[4],nHeight:H[5],nDepth:H[6],imageArray:new Uint8Array(w,76+S,J*J*4)}}}var j=0,W={};W.ignoreNormal=e.ignoreNormal;var z=e.rootBatchIdMap||{},X=e.ancestorMap||{},Z={},Q=new DataView(a),q=Q.getFloat32(j,!0);if(j+=Float32Array.BYTES_PER_ELEMENT,y)return Q.getUint32(j,!0),j+=Uint32Array.BYTES_PER_ELEMENT,ro(a,a.byteLength,j,z,X,e.isRoot,Z,r),Z;var tt,et=!1,rt=0;if(q>=3&&(rt=Q.getUint32(j,!0),j+=Uint32Array.BYTES_PER_ELEMENT),q>=2&&(tt=Q.getUint32(j,!0),j+=Uint32Array.BYTES_PER_ELEMENT),eo(q-1)||eo(q-2)||eo(q-3)||q>2.09&&q<2.11){var nt=Q.getUint32(j,!0);j+=Uint32Array.BYTES_PER_ELEMENT;var at=new Uint8Array(a,j,nt);q>=3&&0===rt?a=at.buffer:(a=!0===ia?function(t,e){var r=e||4*t.length,n=g.unzip._malloc(Uint8Array.BYTES_PER_ELEMENT*r),a=new Uint8Array(r);g.unzip.HEAPU8.set(a,n/Uint8Array.BYTES_PER_ELEMENT);var o,i=g.unzip._malloc(Uint8Array.BYTES_PER_ELEMENT*t.length);for(g.unzip.HEAPU8.set(t,i/Uint8Array.BYTES_PER_ELEMENT);0==(o=Ea(n,r,i,t.length));)la(n),r*=4,n=g.unzip._malloc(Uint8Array.BYTES_PER_ELEMENT*r),a=new Uint8Array(r),g.unzip.HEAPU8.set(a,n/Uint8Array.BYTES_PER_ELEMENT);var s=new Uint8Array(g.unzip.HEAPU8.buffer,n,o);t=null,a=null;var u=new Uint8Array(s).buffer;return la(n),la(i),u}(at,tt):h.pako.inflate(at).buffer,j=0),r.push(a),Q=new DataView(a)}else if(q>1.199&&q<1.201){nt=Q.getUint32(j,!0);j+=Uint32Array.BYTES_PER_ELEMENT,r.push(a)}else{et=!0,j=0;nt=Q.getInt32(j,!0);if(j+=Int32Array.BYTES_PER_ELEMENT,j+=Uint8Array.BYTES_PER_ELEMENT*nt,E){Q.getUint32(j,!0),j+=Uint32Array.BYTES_PER_ELEMENT;L=new Uint8Array(a,j);a=h.pako.inflate(L).buffer,r.push(a),Q=new DataView(a),j=0}}var ot=Q.getUint32(j,!0),it=fa(Q,a,j+=Uint32Array.BYTES_PER_ELEMENT),st=it.buffer;j=it.byteOffset;var ut={},At=Za(q,st,Q,it.dataViewByteOffset,ut,P),lt=j%4;0!==lt&&(j+=4-lt);var ct=q>2.09&&3!==q;if(Ya((it=fa(Q,a,j)).buffer,Q,it.dataViewByteOffset,W,et,r,ct,q,C,ut,v,e.fileType,P),j=it.byteOffset,ct)for(var ft=0;ft<At.pageLods.length;ft++)for(var Bt=At.pageLods[ft],dt=Bt.geodes,yt=0;yt<dt.length;yt++)for(var pt=dt[yt].skeletonNames,Ct=0;Ct<pt.length;Ct++){var mt=pt[Ct];n.e(W[mt].max)&&(n.e(Bt.max)?(Bt.max.x=Math.max(W[mt].max.x,Bt.max.x),Bt.max.y=Math.max(W[mt].max.y,Bt.max.y),Bt.max.z=Math.max(W[mt].max.z,Bt.max.z),Bt.min.x=Math.min(W[mt].min.x,Bt.min.x),Bt.min.y=Math.min(W[mt].min.y,Bt.min.y),Bt.min.z=Math.min(W[mt].min.z,Bt.min.z)):(Bt.max=W[mt].max,Bt.min=W[mt].min))}3!==q&&((it=fa(Q,a,j)).buffer,j=it.byteOffset);var ht={};!function(t,e,r,n,a,o){var i=0,s=r.getUint32(i+n,!0);i+=Uint32Array.BYTES_PER_ELEMENT;for(var u=0;u<s;u++){var A=Ba(r,n,e,i),E=A.string,l=(i=A.bytesOffset)%4;0!==l&&(i+=4-l);var c=r.getUint32(i+n,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var B=r.getUint32(i+n,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var d=r.getUint32(i+n,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var y=r.getUint32(i+n,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var C=r.getUint32(i+n,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var m=r.getUint32(i+n,!0);i+=Uint32Array.BYTES_PER_ELEMENT;var h=e.subarray(i,i+C);i+=C;var v=null,g=y;y===f.S3MCompressType.enrS3TCDXTN&&1!=t?(f.L.decode(v,B,d,h,m),v=m>p.S3MPixelFormat.BGR||m===p.S3MPixelFormat.LUMINANCE_ALPHA?new Uint8Array(B*d*4):new Uint16Array(B*d),f.L.decode(v,B,d,h,m),o.push(v.buffer),y=0):v=h,a[E]={id:E,width:B,height:d,compressType:y,oriCompressType:g,nFormat:m,imageBuffer:v,mipmapLevel:c}}}(c,(it=fa(Q,a,j)).buffer,Q,it.dataViewByteOffset,ht,r),j=it.byteOffset;var vt=Q.getUint32(j,!0);j+=Uint32Array.BYTES_PER_ELEMENT;var gt=new Uint8Array(a).subarray(j,j+vt),Pt=B.a(gt);j+=vt,Pt=Pt.replace(/\n\0/,"");var Tt=JSON.parse(Pt);(3===q&&(ot=Q.getUint32(j,!0),j+=Uint32Array.BYTES_PER_ELEMENT),(ot&Qn)==Qn)&&to((it=fa(Q,a,j)).buffer,Q,it.dataViewByteOffset,W,q,r);if(1==q){var Dt=At.pageLods,_t=!0;for(ft=0;ft<Dt.length;ft++){var Ft=Dt[ft];_t=""===Ft.childTile;for(var Lt=Ft.geodes,wt=0;wt<Lt.length;wt++){pt=Lt[wt].skeletonNames;for(var bt=0;bt<pt.length;bt++){var Mt=pt[bt];if(_t){var It=W[Mt].vertexPackage;It.boundingSphere=$.calcBoundingSphereInWorker(l,It)}}}}}return"BatchPBR"===m&&function(t,e,r,a){for(var o in delete t.ignoreNormal,t)if(t.hasOwnProperty(o)){var i=t[o],s=i.arrIndexPackage;if(s.length<1)continue;if(1===s.length||2===s.length&&13===s[1].primitiveType){var u=i.vertexPackage.attrLocation.aTextureCoordMatrix;if(void 0!==u){if((A=(I=i.vertexPackage.vertexAttributes[u]).typedArray)[0]<0)continue}else if(void 0!==(u=i.vertexPackage.attrLocation.aTextureCoordMatrix||i.vertexPackage.attrLocation.aTexCoord0)){I=i.vertexPackage.vertexAttributes[u];var A=new Float32Array(I.typedArray.buffer,I.typedArray.byteOffset,I.typedArray.byteLength/4);if(3===I.componentsPerAttribute&&A[2]<0)continue}}var E,l,c=0,B={},d=void 0;for(E=0,l=s.length;E<l;E++)13!==(S=s[E]).primitiveType?c+=0===S.indexType?S.indicesTypedArray.byteLength/2:S.indicesTypedArray.byteLength/4:d=s[E],0===E&&(B.indicesCount=0,B.indexType=s[E].indexType,B.primitiveType=s[E].primitiveType,B.materialCode=s[E].materialCode);B.indicesCount=c;var y=i.vertexPackage.verticesCount>65535?new Uint32Array(c):new Uint16Array(c),p=0;for(E=0,l=s.length;E<l;E++)if(13!==(S=s[E]).primitiveType){var C=0===S.indexType?Uint16Array:Uint32Array,m=0===S.indexType?S.indicesTypedArray.byteLength/2:S.indicesTypedArray.byteLength/4,h=new C(S.indicesTypedArray.buffer,S.indicesTypedArray.byteOffset,m);y.set(h,p),p+=h.length}B.indicesTypedArray=y,i.arrIndexPackage=[B],n.e(d)&&(i.arrIndexPackage.push(d),i.edgeGeometry=f._0x28a85f.createEdgeDataByIndices(i.vertexPackage,d));var v=2*s.length*4,g=new Float32Array(v),P={};for(E=0,l=r.material.length;E<l;E++)P[(O=r.material[E].material).id]=O;for(E=0,l=s.length;E<l;E++)if(O=P[(S=s[E]).materialCode]){var T=O.pbrMetallicRoughness;if(T){g[8*E]=T.metallicFactor,g[8*E+1]=T.roughnessFactor,g[8*E+2]=O.alphaCutoff;var D=""===O.alphaMode?0:1,_="none"===O.cullMode?0:1;g[8*E+3]=_|D<<16,g[8*E+4]=T.emissiveFactor.x,g[8*E+5]=T.emissiveFactor.y,g[8*E+6]=T.emissiveFactor.z,g[8*E+7]=0,O.pbrIndex=E}}var F="PBRMaterialParam_"+o;for(E=0,l=r.material.length;E<l;E++)if((O=r.material[E].material).id===B.materialCode){O.textureunitstates.push({textureunitstate:{addressmode:{u:0,v:0,w:0},filteringoption:0,filtermax:2,filtermin:2,id:F,texmodmatrix:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],url:""}});break}var L,w,b=i.vertexPackage,M=b.attrLocation.aTexCoord1;if(void 0!==M){var I=b.vertexAttributes[M];L=new Float32Array(2*b.verticesCount),I.typedArray=L}else L=new Float32Array(2*b.verticesCount),M=b.vertexAttributes.length,b.attrLocation.aTexCoord1=M,b.vertexAttributes.push({index:M,typedArray:L,componentsPerAttribute:2,componentDatatype:5126,offsetInBytes:0,strideInBytes:8,normalize:!1});for(a.push(L.buffer),void 0!==(M=b.attrLocation.aColor)&&(w=(I=b.vertexAttributes[M]).typedArray),E=0,l=s.length;E<l;E++){var S,O;if((O=P[(S=s[E]).materialCode])&&O.pbrMetallicRoughness)for(var N=O.pbrMetallicRoughness.baseColor,R=void 0!==w,x=O.pbrIndex,U=(y=S.indicesTypedArray,{}),G=0,K=(y=0===S.indexType?new Uint16Array(y.buffer,y.byteOffset,y.byteLength/2):new Uint32Array(y.buffer,y.byteOffset,y.byteLength/4)).length;G<K;G++){var H=y[G];L[2*H]=x,R&&void 0===U[H]&&(U[H]=!0,w[4*H]*=N.x,w[4*H+1]*=N.y,w[4*H+2]*=N.z,w[4*H+3]*=N.w)}}e[F]={id:F,width:2*s.length,height:1,compressType:0,nFormat:25,imageBuffer:g,mipmapLevel:0}}}(W,ht,Tt,r),{result:!0,groupNode:At,geoPackage:W,matrials:Tt,texturePackage:ht,version:I.S3M4,dataVersion:q,volImageBuffer:_,volBounds:D}}function io(){n.e(jn)&&n.e(Zn)&&(jn.onRuntimeInitialized=function(){zn=!0},self.onmessage=v(oo),self.postMessage(!0))}return function(e){if("undefined"==typeof WebAssembly)return self.onmessage=v(oo),void self.postMessage(!0);var r=e.data.webAssemblyConfig;return n.e(r)?a.s.isInternetExplorer()?t([o.n$1("ThirdParty/Workers/ie-webworker-promise-polyfill.js")],(function(e){return self.Promise=e,-1!==r.modulePath.indexOf("crunch")?t([r.modulePath],(function(t){n.e(r.wasmBinaryFile)?(n.e(t)||(t=self.Module),jn=t,io()):(jn=t,io())})):t([r.modulePath],(function(t){n.e(r.wasmBinaryFile)?(n.e(t)||(t=self.DracoDecoderModule),t(r).then((function(t){Zn=t,io()}))):(Zn=t(),io())}))})):-1!==r.modulePath.indexOf("crunch")?t([r.modulePath],(function(t){n.e(r.wasmBinaryFile)?(n.e(t)||(t=self.Module),jn=t,io()):(jn=t,io())})):t([r.modulePath],(function(t){n.e(r.wasmBinaryFile)?(n.e(t)||(t=self.DracoDecoderModule),t(r).then((function(t){Zn=t,io()}))):(Zn=t(),io())})):void 0}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/S3MEdgeProcessor-d09e57c2.js b/SuperMap iEarth/public/SuperMap3D/Workers/S3MEdgeProcessor-6c92ceff.js similarity index 99% rename from SuperMap iEarth/public/SuperMap3D/Workers/S3MEdgeProcessor-d09e57c2.js rename to SuperMap iEarth/public/SuperMap3D/Workers/S3MEdgeProcessor-6c92ceff.js index 582d8545..46736204 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/S3MEdgeProcessor-d09e57c2.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/S3MEdgeProcessor-6c92ceff.js @@ -1 +1 @@ -define(["exports","./S3MPixelFormat-339a4168","./when-92c6cf3c","./Cartesian3-3a8bdb0b","./Check-52a7d806","./IndexDatatype-86677ec4","./WebGLConstants-42651efd","./FeatureDetection-cec0163f","./ComponentDatatype-98414d16"],(function(e,t,r,n,i,a,o,s,_){"use strict";function E(e,t,r,n){var i=e|t<<8,a=i>>11&31,o=i>>5&63,s=31&i;return r[n+0]=a<<3|a>>2,r[n+1]=o<<2|o>>4,r[n+2]=s<<3|s>>2,r[n+3]=255,i}function f(e,t,r,n){var i=0;0!=(6&n)&&(i=8),function(e,t,r,n){for(var i=new Uint8Array(16),a=E(t[r+0],t[r+1],i,0),o=E(t[r+2],t[r+3],i,4),s=0;s<3;s++){var _=i[s],f=i[4+s];n&&a<=o?(i[8+s]=(_+f)/2,i[12+s]=0):(i[8+s]=(2*_+f)/3,i[12+s]=(_+2*f)/3)}i[11]=255,i[15]=n&&a<=o?0:255;var u=new Uint8Array(16);for(s=0;s<4;++s){var T=t[r+4+s];u[4*s+0]=3&T,u[4*s+1]=T>>2&3,u[4*s+2]=T>>4&3,u[4*s+3]=T>>6&3}for(s=0;s<16;++s)for(var A=4*u[s],c=0;c<4;++c)e[4*s+c]=i[A+c]}(e,t,r+i,0!=(1&n)),0!=(2&n)?function(e,t,r){for(var n=0;n<8;++n){var i=bytes[r+n],a=15&i,o=240&i;e[8*n+3]=a|a<<4,e[8*n+7]=o|o>>4}}(e,0,r):0!=(4&n)&&function(e,t,r){var n=t[r+0],i=t[r+1],a=new Uint8Array(8);if(a[0]=n,a[1]=i,n<=i){for(var o=1;o<5;++o)a[1+o]=((5-o)*n+o*i)/5;a[6]=0,a[7]=255}else for(o=1;o<7;++o)a[1+o]=((7-o)*n+o*i)/7;var s=new Uint8Array(16),_=(r+=2,0);for(o=0;o<2;++o){for(var E=0,f=0;f<3;++f)E|=t[r++]<<8*f;for(f=0;f<8;++f){var u=E>>3*f&7;s[_++]=u}}for(o=0;o<16;++o)e[4*o+3]=a[s[o]]}(e,t,r)}function u(e){}u.decode=function(e,r,n,i,a){if(null!=e&&null!=i&&0!=n&&0!=r){var o=0;1&(o=a>t.S3MPixelFormat.BGR||a===t.S3MPixelFormat.LUMINANCE_ALPHA?4:33)&&32&o?function(e,t,r,n){for(var i=new Uint16Array(4),a=e,o=0,s=0,_=0,E=0,f=0,u=0,T=0,A=0,c=0,y=t/4,R=r/4,p=0;p<R;p++)for(var d=0;d<y;d++)_=4*((R-p)*y+d),i[0]=n[_],i[1]=n[_+1],E=31&i[0],f=2016&i[0],u=63488&i[0],T=31&i[1],A=2016&i[1],c=63488&i[1],i[2]=5*E+3*T>>3|5*f+3*A>>3&2016|5*u+3*c>>3&63488,i[3]=5*T+3*E>>3|5*A+3*f>>3&2016|5*c+3*u>>3&63488,o=n[_+2],a[s=4*p*t+4*d]=i[3&o],a[s+1]=i[o>>2&3],a[s+2]=i[o>>4&3],a[s+3]=i[o>>6&3],a[s+=t]=i[o>>8&3],a[s+1]=i[o>>10&3],a[s+2]=i[o>>12&3],a[s+3]=i[o>>14],o=n[_+3],a[s+=t]=i[3&o],a[s+1]=i[o>>2&3],a[s+2]=i[o>>4&3],a[s+3]=i[o>>6&3],a[s+=t]=i[o>>8&3],a[s+1]=i[o>>10&3],a[s+2]=i[o>>12&3],a[s+3]=i[o>>14]}(e,r,n,i):function(e,t,r,n,i){for(var a=0!=(1&i)?8:16,o=0,s=0;s<r;s+=4)for(var _=0;_<t;_+=4){var E=new Uint8Array(64);f(E,n,o,i);for(var u=0,T=0;T<4;++T)for(var A=0;A<4;++A){var c=_+A,y=s+T;if(c<t&&y<r)for(var R=4*(t*(r-y)+c),p=0;p<4;++p)e[R++]=E[u++];else u+=4}o+=a}}(e,r,n,i,o)}};var T,A=(T=!0,function(e,t){var r=T?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return T=!1,r}),c=A(void 0,(function(){return c.toString().search("(((.+)+)+)+$").toString().constructor(c).search("(((.+)+)+)+$")}));c();var y,R=Object.freeze({encNONE:0,enrS3TCDXTN:14,enrPVRTPF_PVRTC2:19,enrPVRTPF_PVRTC:20,enrPVRTPF_PVRTC_4bpp:21,enrPVRTPF_ETC1:22}),p=(y=!0,function(e,t){var r=y?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return y=!1,r}),d=p(void 0,(function(){return d.toString().search("(((.+)+)+)+$").toString().constructor(d).search("(((.+)+)+)+$")}));d();var h=Object.freeze({SVC_Vertex:1,SVC_Normal:2,SVC_VertexColor:4,SVC_SecondColor:8,SVC_TexutreCoord:16,SVC_TexutreCoordIsW:32});function I(){return!0}function O(e,t){function n(){throw new i.t(t)}for(var a in t=r.u(t,"This object was destroyed, i.e., destroy() was called."),e)"function"==typeof e[a]&&(e[a]=n);e.isDestroyed=I}var S={STREAM_DRAW:o.d.STREAM_DRAW,STATIC_DRAW:o.d.STATIC_DRAW,DYNAMIC_DRAW:o.d.DYNAMIC_DRAW,validate:function(e){return e===S.STREAM_DRAW||e===S.STATIC_DRAW||e===S.DYNAMIC_DRAW}};function N(e){if(e=r.u(e,r.u.EMPTY_OBJECT),i.o.defined("options.context",e.context),!r.e(e.typedArray)&&!r.e(e.sizeInBytes))throw new i.t("Either options.sizeInBytes or options.typedArray is required.");if(r.e(e.typedArray)&&r.e(e.sizeInBytes))throw new i.t("Cannot pass in both options.sizeInBytes and options.typedArray.");if(r.e(e.typedArray)&&(i.o.typeOf.object("options.typedArray",e.typedArray),i.o.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!S.validate(e.usage))throw new i.t("usage is invalid.");var t=e.context._gl,n=e.bufferTarget,a=e.typedArray,o=e.sizeInBytes,s=e.usage,_=r.e(a);_&&(o=a.byteLength),i.o.typeOf.number.greaterThan("sizeInBytes",o,0);var E=t.createBuffer();t.bindBuffer(n,E),t.bufferData(n,_?a:o,s),t.bindBuffer(n,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=n,this._sizeInBytes=o,this._usage=s,this._buffer=E,this.context=e.context,e.context.memorySize+=o}Object.defineProperties(N.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),N.prototype._getBuffer=function(){return this._buffer},N.prototype.copyFromArrayView=function(e,t){t=r.u(t,0),i.o.defined("arrayView",e),i.o.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);var n=this._gl,a=this._bufferTarget;n.bindBuffer(a,this._buffer),n.bufferSubData(a,t,e),n.bindBuffer(a,null)},N.prototype.copyFromBuffer=function(e,t,n,a){if(!this._webgl2)throw new i.t("A WebGL 2 context is required.");if(!r.e(e))throw new i.t("readBuffer must be defined.");if(!r.e(a)||a<=0)throw new i.t("sizeInBytes must be defined and be greater than zero.");if(!r.e(t)||t<0||t+a>e._sizeInBytes)throw new i.t("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!r.e(n)||n<0||n+a>this._sizeInBytes)throw new i.t("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(n>=t&&n<t+a||t>n&&t<n+a))throw new i.t("When readBuffer is equal to this, the ranges [readOffset + sizeInBytes) and [writeOffset, writeOffset + sizeInBytes) must not overlap.");if(this._bufferTarget===o.d.ELEMENT_ARRAY_BUFFER&&e._bufferTarget!==o.d.ELEMENT_ARRAY_BUFFER||this._bufferTarget!==o.d.ELEMENT_ARRAY_BUFFER&&e._bufferTarget===o.d.ELEMENT_ARRAY_BUFFER)throw new i.t("Can not copy an index buffer into another buffer type.");var s=o.d.COPY_READ_BUFFER,_=o.d.COPY_WRITE_BUFFER,E=this._gl;E.bindBuffer(_,this._buffer),E.bindBuffer(s,e._buffer),E.copyBufferSubData(s,_,t,n,a),E.bindBuffer(_,null),E.bindBuffer(s,null)},N.prototype.getBufferData=function(e,t,n,a){if(t=r.u(t,0),n=r.u(n,0),!this._webgl2)throw new i.t("A WebGL 2 context is required.");if(!r.e(e))throw new i.t("arrayView is required.");var s,_,E=e.byteLength;if(r.e(a)?(s=a,r.e(E)?_=1:(E=e.length,_=e.BYTES_PER_ELEMENT)):r.e(E)?(s=E-n,_=1):(s=(E=e.length)-n,_=e.BYTES_PER_ELEMENT),n<0||n>E)throw new i.t("destinationOffset must be greater than zero and less than the arrayView length.");if(n+s>E)throw new i.t("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new i.t("sourceOffset must be greater than zero and less than the buffers size.");if(t+s*_>this._sizeInBytes)throw new i.t("sourceOffset + length must be less than the buffers size.");var f=this._gl,u=o.d.COPY_READ_BUFFER;f.bindBuffer(u,this._buffer),f.getBufferSubData(u,t,e,n,a),f.bindBuffer(u,null)},N.prototype.isDestroyed=function(){return!1},N.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),this.context.memorySize-=this.sizeInBytes,O(this)};var l,D=(l=!0,function(e,t){var r=l?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return l=!1,r}),L=D(void 0,(function(){return L.toString().search("(((.+)+)+)+$").toString().constructor(L).search("(((.+)+)+)+$")}));function g(){}L(),g.ALPHA_DISABLE=0,g.ALPHA_ADD=1,g.ALPHA_COMBINE=2,g.ALPHA_SUBTRACT=3,g.ALPHA_MULTIPLY=4,g.ALPHA_MAXIMIZED=5,g.ALPHA_ONEONE=6,g.ALPHA_PREMULTIPLIED=7,g.ALPHA_PREMULTIPLIED_PORTERDUFF=8,g.ALPHA_INTERPOLATE=9,g.ALPHA_SCREENMODE=10,g.ALPHA_ONEONE_ONEONE=11,g.ALPHA_ALPHATOCOLOR=12,g.ALPHA_REVERSEONEMINUS=13,g.ALPHA_SRC_DSTONEMINUSSRCALPHA=14,g.ALPHA_ONEONE_ONEZERO=15,g.ALPHA_EXCLUSION=16,g.ALPHA_LAYER_ACCUMULATE=17,g.ALPHA_EQUATION_ADD=0,g.ALPHA_EQUATION_SUBSTRACT=1,g.ALPHA_EQUATION_REVERSE_SUBTRACT=2,g.ALPHA_EQUATION_MAX=3,g.ALPHA_EQUATION_MIN=4,g.ALPHA_EQUATION_DARKEN=5,g.DELAYLOADSTATE_NONE=0,g.DELAYLOADSTATE_LOADED=1,g.DELAYLOADSTATE_LOADING=2,g.DELAYLOADSTATE_NOTLOADED=4,g.NEVER=512,g.ALWAYS=519,g.LESS=513,g.EQUAL=514,g.LEQUAL=515,g.GREATER=516,g.GEQUAL=518,g.NOTEQUAL=517,g.KEEP=7680,g.ZERO=0,g.REPLACE=7681,g.INCR=7682,g.DECR=7683,g.INVERT=5386,g.INCR_WRAP=34055,g.DECR_WRAP=34056,g.FRONT=0,g.BACK=1,g.TEXTURE_CLAMP_ADDRESSMODE=0,g.TEXTURE_WRAP_ADDRESSMODE=1,g.TEXTURE_MIRROR_ADDRESSMODE=2,g.TEXTURE_CREATIONFLAG_STORAGE=1,g.TEXTUREFORMAT_ALPHA=0,g.TEXTUREFORMAT_LUMINANCE=1,g.TEXTUREFORMAT_LUMINANCE_ALPHA=2,g.TEXTUREFORMAT_RGB=4,g.TEXTUREFORMAT_RGBA=5,g.TEXTUREFORMAT_RED=6,g.TEXTUREFORMAT_R=6,g.TEXTUREFORMAT_RG=7,g.TEXTUREFORMAT_RED_INTEGER=8,g.TEXTUREFORMAT_R_INTEGER=8,g.TEXTUREFORMAT_RG_INTEGER=9,g.TEXTUREFORMAT_RGB_INTEGER=10,g.TEXTUREFORMAT_RGBA_INTEGER=11,g.TEXTUREFORMAT_BGRA=12,g.TEXTUREFORMAT_DEPTH24_STENCIL8=13,g.TEXTUREFORMAT_DEPTH32_FLOAT=14,g.TEXTUREFORMAT_DEPTH16=15,g.TEXTUREFORMAT_DEPTH24=16,g.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8=17,g.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8=18,g.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM=36492,g.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM=36493,g.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT=36495,g.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT=36494,g.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5=33779,g.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919,g.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3=33778,g.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918,g.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1=33777,g.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1=33776,g.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917,g.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT=35916,g.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4=37808,g.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840,g.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL=36196,g.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2=37492,g.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2=37493,g.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494,g.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495,g.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC=37496,g.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497,g.TEXTURETYPE_UNSIGNED_BYTE=0,g.TEXTURETYPE_UNSIGNED_INT=0,g.TEXTURETYPE_FLOAT=1,g.TEXTURETYPE_HALF_FLOAT=2,g.TEXTURETYPE_BYTE=3,g.TEXTURETYPE_SHORT=4,g.TEXTURETYPE_UNSIGNED_SHORT=5,g.TEXTURETYPE_INT=6,g.TEXTURETYPE_UNSIGNED_INTEGER=7,g.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,g.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,g.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,g.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,g.TEXTURETYPE_UNSIGNED_INT_24_8=12,g.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,g.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,g.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,g.TEXTURETYPE_UNDEFINED=16,g.TEXTURE_NEAREST_SAMPLINGMODE=1,g.TEXTURE_NEAREST_NEAREST=1,g.TEXTURE_BILINEAR_SAMPLINGMODE=2,g.TEXTURE_LINEAR_LINEAR=2,g.TEXTURE_TRILINEAR_SAMPLINGMODE=3,g.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,g.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,g.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,g.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,g.TEXTURE_NEAREST_LINEAR=7,g.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,g.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,g.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,g.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,g.TEXTURE_LINEAR_NEAREST=12,g.TEXTURE_EXPLICIT_MODE=0,g.TEXTURE_SPHERICAL_MODE=1,g.TEXTURE_PLANAR_MODE=2,g.TEXTURE_CUBIC_MODE=3,g.TEXTURE_PROJECTION_MODE=4,g.TEXTURE_SKYBOX_MODE=5,g.TEXTURE_INVCUBIC_MODE=6,g.TEXTURE_EQUIRECTANGULAR_MODE=7,g.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,g.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,g.TEXTURE_FILTERING_QUALITY_OFFLINE=4096,g.TEXTURE_FILTERING_QUALITY_HIGH=64,g.TEXTURE_FILTERING_QUALITY_MEDIUM=16,g.TEXTURE_FILTERING_QUALITY_LOW=8,g.SCALEMODE_FLOOR=1,g.SCALEMODE_NEAREST=2,g.SCALEMODE_CEILING=3,g.MATERIAL_TextureDirtyFlag=1,g.MATERIAL_LightDirtyFlag=2,g.MATERIAL_FresnelDirtyFlag=4,g.MATERIAL_AttributesDirtyFlag=8,g.MATERIAL_MiscDirtyFlag=16,g.MATERIAL_PrePassDirtyFlag=32,g.MATERIAL_AllDirtyFlag=63,g.MATERIAL_TriangleFillMode=0,g.MATERIAL_WireFrameFillMode=1,g.MATERIAL_PointFillMode=2,g.MATERIAL_PointListDrawMode=3,g.MATERIAL_LineListDrawMode=4,g.MATERIAL_LineLoopDrawMode=5,g.MATERIAL_LineStripDrawMode=6,g.MATERIAL_TriangleStripDrawMode=7,g.MATERIAL_TriangleFanDrawMode=8,g.MATERIAL_ClockWiseSideOrientation=0,g.MATERIAL_CounterClockWiseSideOrientation=1,g.ACTION_NothingTrigger=0,g.ACTION_OnPickTrigger=1,g.ACTION_OnLeftPickTrigger=2,g.ACTION_OnRightPickTrigger=3,g.ACTION_OnCenterPickTrigger=4,g.ACTION_OnPickDownTrigger=5,g.ACTION_OnDoublePickTrigger=6,g.ACTION_OnPickUpTrigger=7,g.ACTION_OnPickOutTrigger=16,g.ACTION_OnLongPressTrigger=8,g.ACTION_OnPointerOverTrigger=9,g.ACTION_OnPointerOutTrigger=10,g.ACTION_OnEveryFrameTrigger=11,g.ACTION_OnIntersectionEnterTrigger=12,g.ACTION_OnIntersectionExitTrigger=13,g.ACTION_OnKeyDownTrigger=14,g.ACTION_OnKeyUpTrigger=15,g.PARTICLES_BILLBOARDMODE_Y=2,g.PARTICLES_BILLBOARDMODE_ALL=7,g.PARTICLES_BILLBOARDMODE_STRETCHED=8,g.MESHES_CULLINGSTRATEGY_STANDARD=0,g.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,g.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=2,g.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=3,g.SCENELOADER_NO_LOGGING=0,g.SCENELOADER_MINIMAL_LOGGING=1,g.SCENELOADER_SUMMARY_LOGGING=2,g.SCENELOADER_DETAILED_LOGGING=3,g.PREPASS_IRRADIANCE_TEXTURE_TYPE=0,g.PREPASS_POSITION_TEXTURE_TYPE=1,g.PREPASS_VELOCITY_TEXTURE_TYPE=2,g.PREPASS_REFLECTIVITY_TEXTURE_TYPE=3,g.PREPASS_COLOR_TEXTURE_TYPE=4,g.PREPASS_DEPTH_TEXTURE_TYPE=5,g.PREPASS_NORMAL_TEXTURE_TYPE=6,g.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE=7,g.BUFFER_CREATIONFLAG_READ=1,g.BUFFER_CREATIONFLAG_WRITE=2,g.BUFFER_CREATIONFLAG_READWRITE=3,g.BUFFER_CREATIONFLAG_UNIFORM=4,g.BUFFER_CREATIONFLAG_VERTEX=8,g.BUFFER_CREATIONFLAG_INDEX=16,g.BUFFER_CREATIONFLAG_STORAGE=32,g.RENDERPASS_MAIN=0,g.INPUT_ALT_KEY=18,g.INPUT_CTRL_KEY=17,g.INPUT_META_KEY1=91,g.INPUT_META_KEY2=92,g.INPUT_META_KEY3=93,g.INPUT_SHIFT_KEY=16,g.SNAPSHOTRENDERING_STANDARD=0,g.SNAPSHOTRENDERING_FAST=1,g.PERSPECTIVE_CAMERA=0,g.ORTHOGRAPHIC_CAMERA=1,g.FOVMODE_VERTICAL_FIXED=0,g.FOVMODE_HORIZONTAL_FIXED=1,g.RIG_MODE_NONE=0,g.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,g.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,g.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,g.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,g.RIG_MODE_STEREOSCOPIC_INTERLACED=14,g.RIG_MODE_VR=20,g.RIG_MODE_WEBVR=21,g.RIG_MODE_CUSTOM=22,g.MAX_SUPPORTED_UV_SETS=6,g.GL_ALPHA_EQUATION_ADD=32774,g.GL_ALPHA_EQUATION_MIN=32775,g.GL_ALPHA_EQUATION_MAX=32776,g.GL_ALPHA_EQUATION_SUBTRACT=32778,g.GL_ALPHA_EQUATION_REVERSE_SUBTRACT=32779,g.GL_ALPHA_FUNCTION_SRC=768,g.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR=769,g.GL_ALPHA_FUNCTION_SRC_ALPHA=770,g.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA=771,g.GL_ALPHA_FUNCTION_DST_ALPHA=772,g.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA=773,g.GL_ALPHA_FUNCTION_DST_COLOR=774,g.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR=775,g.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED=776,g.GL_ALPHA_FUNCTION_CONSTANT_COLOR=32769,g.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR=32770,g.GL_ALPHA_FUNCTION_CONSTANT_ALPHA=32771,g.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA=32772,g.SnippetUrl="";var U,B=(U=!0,function(e,t){var r=U?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return U=!1,r}),P=B(void 0,(function(){return P.toString().search("(((.+)+)+)+$").toString().constructor(P).search("(((.+)+)+)+$")}));function C(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=C._Counter++}P(),Object.defineProperty(C.prototype,"underlyingResource",{get:function(){return null},enumerable:!1,configurable:!0}),C._Counter=0;var b,v=(b=!0,function(e,t){var r=b?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return b=!1,r}),M=v(void 0,(function(){return M.toString().search("(((.+)+)+)+$").toString().constructor(M).search("(((.+)+)+)+$")}));function F(e,t,r,n,i,a,o,s){void 0===n&&(n=0),void 0===i&&(i=!1),void 0===a&&(a=!1),void 0===o&&(o=!1),this._isAlreadyOwned=!1,e.getScene?this._engine=e.getScene().getEngine():this._engine=e,this._updatable=r,this._instanced=a,this._divisor=s||1,t instanceof C?(this._data=null,this._buffer=t):(this._data=t,this._buffer=null),this.byteStride=o?n:n*Float32Array.BYTES_PER_ELEMENT,!i&&this.create()}function m(e,t,r,n,i,a,o,s,_,E,f,u,T,A){if(void 0===f&&(f=!1),void 0===u&&(u=!1),void 0===T&&(T=1),void 0===A&&(A=!1),t instanceof F?(this._buffer=t,this._ownsBuffer=A):(this._buffer=new F(e,t,n,a,i,o,u),this._ownsBuffer=!0),this.uniqueId=m._Counter++,this._kind=r,null==E){var c=this.getData();this.type=m.FLOAT,c instanceof Int8Array?this.type=m.BYTE:c instanceof Uint8Array?this.type=m.UNSIGNED_BYTE:c instanceof Int16Array?this.type=m.SHORT:c instanceof Uint16Array?this.type=m.UNSIGNED_SHORT:c instanceof Int32Array?this.type=m.INT:c instanceof Uint32Array&&(this.type=m.UNSIGNED_INT)}else this.type=E;var y=m.GetTypeByteLength(this.type);u?(this._size=_||(a?a/y:m.DeduceStride(r)),this.byteStride=a||this._buffer.byteStride||this._size*y,this.byteOffset=s||0):(this._size=_||a||m.DeduceStride(r),this.byteStride=a?a*y:this._buffer.byteStride||this._size*y,this.byteOffset=(s||0)*y),this.normalized=f,this._instanced=void 0!==o&&o,this._instanceDivisor=o?T:0,this._computeHashCode()}M(),F.prototype.createVertexBuffer=function(e,t,r,n,i,a,o){void 0===a&&(a=!1);var s=a?t:t*Float32Array.BYTES_PER_ELEMENT,_=n?a?n:n*Float32Array.BYTES_PER_ELEMENT:this.byteStride;return new m(this._engine,this,e,this._updatable,!0,_,void 0===i?this._instanced:i,s,r,void 0,void 0,!0,this._divisor||o)},F.prototype.isUpdatable=function(){return this._updatable},F.prototype.getData=function(){return this._data},F.prototype.getBuffer=function(){return this._buffer},F.prototype.getStrideSize=function(){return this.byteStride/Float32Array.BYTES_PER_ELEMENT},F.prototype.create=function(e){void 0===e&&(e=null),!e&&this._buffer||(e=e||this._data)&&(this._buffer?this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e),this._data=e):this._updatable?(this._buffer=this._engine.createDynamicVertexBuffer(e),this._data=e):this._buffer=this._engine.createVertexBuffer(e))},F.prototype._rebuild=function(){this._buffer=null,this.create(this._data)},F.prototype.update=function(e){this.create(e)},F.prototype.updateDirectly=function(e,t,r,n){void 0===n&&(n=!1),this._buffer&&this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e,n?t:t*Float32Array.BYTES_PER_ELEMENT,r?r*this.byteStride:void 0),this._data=0===t&&void 0===r?e:null)},F.prototype._increaseReferences=function(){this._buffer&&(this._isAlreadyOwned?this._buffer.references++:this._isAlreadyOwned=!0)},F.prototype.dispose=function(){this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null,this._data=null)},Object.defineProperty(m.prototype,"instanceDivisor",{get:function(){return this._instanceDivisor},set:function(e){this._instanceDivisor=e,this._instanced=0!=e,this._computeHashCode()},enumerable:!1,configurable:!0}),m.prototype._computeHashCode=function(){this.hashCode=(this.type-5120<<0)+((this.normalized?1:0)<<3)+(this._size<<4)+((this._instanced?1:0)<<6)+(this.byteStride<<12)},m.prototype._rebuild=function(){this._buffer&&this._buffer._rebuild()},m.prototype.getKind=function(){return this._kind},m.prototype.isUpdatable=function(){return this._buffer.isUpdatable()},m.prototype.getData=function(){return this._buffer.getData()},m.prototype.getFloatData=function(e,t){var r=this.getData();if(!r)return null;var n=this.getSize()*m.GetTypeByteLength(this.type),i=e*this.getSize();if(this.type!==m.FLOAT||this.byteStride!==n){var a=new Float32Array(i);return this.forEach(i,(function(e,t){return a[t]=e})),a}if(!(r instanceof Array||r instanceof Float32Array)||0!==this.byteOffset||r.length!==i){if(r instanceof Array){var o=this.byteOffset/4;return r.slice(o,o+i)}if(r instanceof ArrayBuffer)return new Float32Array(r,this.byteOffset,i);o=r.byteOffset+this.byteOffset;if(t){var s=new Float32Array(i),_=new Float32Array(r.buffer,o,i);return s.set(_),s}var E=o%4;return E&&(o=Math.max(0,o-E)),new Float32Array(r.buffer,o,i)}return t?r.slice():r},m.prototype.getBuffer=function(){return this._buffer.getBuffer()},m.prototype.getStrideSize=function(){return this.byteStride/m.GetTypeByteLength(this.type)},m.prototype.getOffset=function(){return this.byteOffset/m.GetTypeByteLength(this.type)},m.prototype.getSize=function(e){return void 0===e&&(e=!1),e?this._size*m.GetTypeByteLength(this.type):this._size},m.prototype.getIsInstanced=function(){return this._instanced},m.prototype.getInstanceDivisor=function(){return this._instanceDivisor},m.prototype.create=function(e){this._buffer.create(e)},m.prototype.update=function(e){this._buffer.update(e)},m.prototype.updateDirectly=function(e,t,r){void 0===r&&(r=!1),this._buffer.updateDirectly(e,t,void 0,r)},m.prototype.dispose=function(){this._ownsBuffer&&this._buffer.dispose()},m.prototype.forEach=function(e,t){m.ForEach(this._buffer.getData(),this.byteOffset,this.byteStride,this._size,this.type,e,this.normalized,t)},m.DeduceStride=function(e){switch(e){case m.UVKind:case m.UV2Kind:case m.UV3Kind:case m.UV4Kind:case m.UV5Kind:case m.UV6Kind:return 2;case m.NormalKind:case m.PositionKind:return 3;case m.ColorKind:case m.MatricesIndicesKind:case m.MatricesIndicesExtraKind:case m.MatricesWeightsKind:case m.MatricesWeightsExtraKind:case m.TangentKind:return 4;default:throw new Error("Invalid kind '"+e+"'")}},m.GetTypeByteLength=function(e){switch(e){case m.BYTE:case m.UNSIGNED_BYTE:return 1;case m.SHORT:case m.UNSIGNED_SHORT:return 2;case m.INT:case m.UNSIGNED_INT:case m.FLOAT:return 4;default:throw new Error("Invalid type '".concat(e,"'"))}},m.ForEach=function(e,t,r,n,i,a,o,s){if(e instanceof Array)for(var _=t/4,E=r/4,f=0;f<a;f+=n){for(var u=0;u<n;u++)s(e[_+u],f+u);_+=E}else{var T=e instanceof ArrayBuffer?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),A=m.GetTypeByteLength(i);for(f=0;f<a;f+=n){var c=t;for(u=0;u<n;u++){s(m._GetFloatValue(T,i,c,o),f+u),c+=A}t+=r}}},m._GetFloatValue=function(e,t,r,n){switch(t){case m.BYTE:var i=e.getInt8(r);return n&&(i=Math.max(i/127,-1)),i;case m.UNSIGNED_BYTE:i=e.getUint8(r);return n&&(i/=255),i;case m.SHORT:i=e.getInt16(r,!0);return n&&(i=Math.max(i/32767,-1)),i;case m.UNSIGNED_SHORT:i=e.getUint16(r,!0);return n&&(i/=65535),i;case m.INT:return e.getInt32(r,!0);case m.UNSIGNED_INT:return e.getUint32(r,!0);case m.FLOAT:return e.getFloat32(r,!0);default:throw new Error("Invalid component type ".concat(t))}},m._Counter=0,m.BYTE=5120,m.UNSIGNED_BYTE=5121,m.SHORT=5122,m.UNSIGNED_SHORT=5123,m.INT=5124,m.UNSIGNED_INT=5125,m.FLOAT=5126,m.PositionKind="position",m.NormalKind="normal",m.TangentKind="tangent",m.UVKind="uv",m.UV2Kind="uv2",m.UV3Kind="uv3",m.UV4Kind="uv4",m.UV5Kind="uv5",m.UV6Kind="uv6",m.ColorKind="color",m.ColorInstanceKind="instanceColor",m.MatricesIndicesKind="matricesIndices",m.MatricesWeightsKind="matricesWeights",m.MatricesIndicesExtraKind="matricesIndicesExtra",m.MatricesWeightsExtraKind="matricesWeightsExtra";var x,G=(x=!0,function(e,t){var r=x?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return x=!1,r}),w=G(void 0,(function(){return w.toString().search("(((.+)+)+)+$").toString().constructor(w).search("(((.+)+)+)+$")}));function z(e,t,r){void 0===r&&(r=g.BUFFER_CREATIONFLAG_READWRITE),this._engine=e,this._engine._storageBuffers.push(this),this._create(t,r)}function X(e){var t=(e=r.u(e,r.u.EMPTY_OBJECT)).context,n=e.bufferTarget,i=e.typedArray,s=e.sizeInBytes,_=e.usage,E=r.e(i);E?s=i.byteLength:i=new Uint8Array(s);var f=g.BUFFER_CREATIONFLAG_STORAGE;r.e(_)&&(_==S.STREAM_DRAW||_==S.STATIC_DRAW?f|=g.BUFFER_CREATIONFLAG_WRITE:_==S.DYNAMIC_DRAW&&(f|=g.BUFFER_CREATIONFLAG_READWRITE)),r.e(n)?n==o.d.ELEMENT_ARRAY_BUFFER?(i instanceof Uint8Array&&(e.indexDatatype==a.IndexDatatype.UNSIGNED_INT?i=new Uint32Array(i.buffer,i.byteOffset,i.byteLength/4):e.indexDatatype==a.IndexDatatype.UNSIGNED_SHORT&&(i=new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2))),this._dataBuffer=t.engine.createIndexBuffer(i)):n==o.d.ARRAY_BUFFER?(this._dataBuffer=new F(t.engine,i,!0),this._dataBuffer._data=null):console.log("BufferGPU not supported bufferTarget"):(this._dataBuffer=new z(t.engine,s,f),E&&this._dataBuffer.update(i,0,s)),this._bufferTarget=n,this._sizeInBytes=s,this._usage=_,this.context=e.context,e.context.memorySize+=s}function H(e){if(e=r.u(e,r.u.EMPTY_OBJECT),i.o.defined("options.context",e.context),!r.e(e.typedArray)&&!r.e(e.sizeInBytes))throw new i.t("Either options.sizeInBytes or options.typedArray is required.");if(r.e(e.typedArray)&&r.e(e.sizeInBytes))throw new i.t("Cannot pass in both options.sizeInBytes and options.typedArray.");r.e(e.typedArray)&&(i.o.typeOf.object("options.typedArray",e.typedArray),i.o.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),e.context.webgpu?this._inner=new X(e):this._inner=new N(e),this.vertexArrayDestroyable=!0}w(),z.prototype._create=function(e,t){this._bufferSize=e,this._creationFlags=t,this._buffer=this._engine.createStorageBuffer(e,t)},z.prototype._rebuild=function(){this._create(this._bufferSize,this._creationFlags)},z.prototype.getBuffer=function(){return this._buffer},z.prototype.update=function(e,t,r){this._buffer&&this._engine.updateStorageBuffer(this._buffer,e,t,r)},z.prototype.read=function(e,t,r){return this._engine.readFromStorageBuffer(this._buffer,e,t,r)},z.prototype.dispose=function(){var e=this._engine._storageBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._engine._releaseBuffer(this._buffer),this._buffer=null},Object.defineProperties(X.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}},dataBuffer:{get:function(){return this._dataBuffer}}}),X.prototype._getBuffer=function(){return console.log("BufferGPU.prototype._getBuffer"),this._dataBuffer},X.prototype.copyFromArrayView=function(e,t){this._dataBuffer.updateDirectly(e,t,null,!0)},X.prototype.copyFromBuffer=function(e,t,r,n){console.log("BufferGPU.prototype.copyFromBuffer")},X.prototype.getBufferData=function(e,t,r,n){console.log("BufferGPU.prototype.getBufferData")},X.prototype.isDestroyed=function(){return!1},X.prototype.destroy=function(){return this._bufferTarget!==o.d.ELEMENT_ARRAY_BUFFER?this._dataBuffer.dispose():this.context._engine._releaseBuffer(this._dataBuffer),this.context.memorySize-=this.sizeInBytes,O(this)},H.createVertexBuffer=function(e){return i.o.defined("options.context",e.context),new H({context:e.context,bufferTarget:o.d.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},H.createIndexBuffer=function(e){if(i.o.defined("options.context",e.context),!a.IndexDatatype.validate(e.indexDatatype))throw new i.t("Invalid indexDatatype.");if(e.indexDatatype===a.IndexDatatype.UNSIGNED_INT&&!e.context.elementIndexUint)throw new i.t("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");var t=e.context,r=e.indexDatatype,n=a.IndexDatatype.getSizeInBytes(r),s=new H({context:t,bufferTarget:o.d.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage,indexDatatype:r}),_=s.sizeInBytes/n;return Object.defineProperties(s,{indexDatatype:{get:function(){return r}},bytesPerIndex:{get:function(){return n}},numberOfIndices:{get:function(){return _}}}),s},Object.defineProperties(H.prototype,{sizeInBytes:{get:function(){return this._inner.sizeInBytes}},usage:{get:function(){return this._inner.usage}}}),H.prototype._getBuffer=function(){return this._inner._getBuffer()},H.prototype.copyFromArrayView=function(e,t){this._inner.copyFromArrayView(e,t)},H.prototype.copyFromBuffer=function(e,t,r,n){this._inner.copyFromBuffer(e,t,r,n)},H.prototype.getBufferData=function(e,t,r,n){this._inner.getBufferData(e,t,r,n)},H.prototype.isDestroyed=function(){return!1},H.prototype.destroy=function(){return this._inner.destroy(),O(this)};var V,Y=(V=!0,function(e,t){var r=V?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return V=!1,r}),K=Y(void 0,(function(){return K.toString().search("(((.+)+)+)+$").toString().constructor(K).search("(((.+)+)+)+$")}));function W(){}K(),W.computeNeighbors=function(e,t){for(var r=e.length/3,n=new Uint32Array(t+1),i=new Uint32Array(t+1),a=function(e,t){e<t?n[e+1]++:i[t+1]++},o=0;o<r;o++){var s=e[3*o],_=e[3*o+1],E=e[3*o+2];a(s,_),a(_,E),a(E,s)}for(o=_=s=0;o<t;o++)E=n[o+1],a=i[o+1],n[o+1]=s,i[o+1]=_,s+=E,_+=a;var f=new Uint32Array(6*r),u=n[t];for(a=function(e,t,r){if(e<t){var a=n[e+1]++;f[2*a]=t,f[2*a+1]=r}else a=i[t+1]++,f[2*u+2*a]=e,f[2*u+2*a+1]=r},o=0;o<r;o++)s=e[3*o],_=e[3*o+1],E=e[3*o+2],a(s,_,o),a(_,E,o),a(E,s,o);for(s=function(e,t){var r=2*e;for(e=t-e,t=1;t<e;t++){for(var n=f[r+2*t],i=f[r+2*t+1],a=t-1;0<=a&&f[r+2*a]>n;a--)f[r+2*a+2]=f[r+2*a],f[r+2*a+3]=f[r+2*a+1];f[r+2*a+2]=n,f[r+2*a+3]=i}},o=0;o<t;o++)s(n[o],n[o+1]),s(u+i[o],u+i[o+1]);var T=new Int32Array(3*r),A=function(t,r){return t===e[3*r]?0:t===e[3*r+1]?1:t===e[3*r+2]?2:-1};for(r=function(e,t){e=A(e,t),T[3*t+e]=-1},s=function(e,t,r,n){e=A(e,t),T[3*t+e]=n,r=A(r,n),T[3*n+r]=t},o=0;o<t;o++){_=n[o],E=n[o+1],a=i[o];for(var c=i[o+1];_<E&&a<c;){var y=f[2*_],R=f[2*u+2*a];y===R?(s(o,f[2*_+1],R,f[2*u+2*a+1]),_++,a++):y<R?(r(o,f[2*_+1]),_++):(r(R,f[2*u+2*a+1]),a++)}for(;_<E;)r(o,f[2*_+1]),_++;for(;a<c;)r(R=f[2*u+2*a],f[2*u+2*a+1]),a++}return T};var q=null;function k(){}function Q(e){var t,r=(t=!0,function(e,r){var n=t?function(){if(r){var t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}),n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),e*Math.PI/180}W.deduplicate=function(e,t,r,n,i){void 0===r&&(r=0),void 0===n&&(n=0),void 0===i&&(i=e.byteLength/(4*t)),e=new Uint32Array(e,n,i*t),n=new Uint32Array(i);var a=Math.floor(1.1*i)+1;(null==q||q.length<2*a)&&(q=new Uint32Array(function(e){--e;for(var t=1;32>t;t<<=1)e|=e>>t;return e+1}(2*a)));for(var o=0;o<2*a;o++)q[o]=0;var s=0,_=0!==r?Math.ceil(7.84*1.96/(r*r)*r*(1-r)):i;for(o=0;o<i;o++){if(o===_){if((f=1-s/o)+1.96*Math.sqrt(f*(1-f)/o)<r)return null;_*=2}for(var E,f=o*t,u=E=0;u<t;u++)E=(E=e[f+u]+E|0)+(E<<11)+(E>>>2)|0;u=(E>>>=0)%a;for(var T=s;0!==q[2*u+1];){if(q[2*u]===E){var A=q[2*u+1]-1,c=A*t;e:{for(var y=0;y<t;y++)if(e[f+y]!==e[c+y]){c=!1;break e}c=!0}if(c){T=n[A];break}}++u>=a&&(u-=a)}T===s&&(q[2*u]=E,q[2*u+1]=o+1,s++),n[o]=T}if(0!==r&&1-s/i<r)return null;for(r=new Uint32Array(t*s),o=s=0;o<i;o++)if(n[o]===s){for(a=e,_=o*t,f=r,E=s*t,u=t,T=0;T<u;T++)f[E+T]=a[_+T];s++}return{buffer:r.buffer,indices:n,uniqueCount:s}};var $=Q(4),j=Q(35),Z=Math.cos(j),J=Math.cos($);var ee={position0:new n.o,position1:new n.o,faceNormal0:new n.o,faceNormal1:new n.o,cosAngle:0},te=new n.o,re=new n.o;function ne(e,t){var r,i,a,o,s,_,E=(r=e.cosAngle,Math.acos(1<r?1:-1>r?-1:r));return i=re,a=e.position1,o=e.position0,s=o.x-a.x,_=o.y-a.y,(o=s*s+_*_+(a=o.z-a.z)*a)?(o=1/Math.sqrt(o),i.x=s*o,i.y=_*o,i.z=a*o):(i.x=0,i.y=0,i.z=0),n.o.cross(e.faceNormal0,e.faceNormal1,te),E*(0<n.o.dot(te,re)?-1:1)>t}var ie=new n.o,ae=new n.o,oe=new n.o;k.extractEdges=function(e){var t=e.vertices,r=e.dim,i=ee,a=i.position0,o=i.position1,s=i.faceNormal0,_=i.faceNormal1,E=function(e){for(var t=e.faces.length/3,r=e.vertices,i=e.dim,a=e.faces,o=new Float32Array(3*t),s=0;s<t;s++){var _=a[3*s+0],E=a[3*s+1],f=a[3*s+2];ie.x=r[i*_],ie.y=r[i*_+1],ie.z=r[i*_+2],ae.x=r[i*E],ae.y=r[i*E+1],ae.z=r[i*E+2],oe.x=r[i*f],oe.y=r[i*f+1],oe.z=r[i*f+2],n.o.subtract(ae,ie,ae),n.o.subtract(oe,ie,oe),n.o.cross(ae,oe,ie),T=void 0,(T=(u=ie).x*u.x+u.y*u.y+u.z*u.z)>0&&(T=1/Math.sqrt(T),u.x*=T,u.y*=T,u.z*=T),o[3*s+0]=ie.x,o[3*s+1]=ie.y,o[3*s+2]=ie.z}var u,T;return o}(e),f=function(e){var t=e.faces.length/3,r=e.faces,n=e.neighbors,i=0,a=0;for(a=0;a<t;a++){var o=n[3*a+0],s=n[3*a+1],_=n[3*a+2],E=r[3*a+0],f=r[3*a+1],u=r[3*a+2];i+=-1===o||E<f?1:0,i+=-1===s||f<u?1:0,i+=-1===_||u<E?1:0}var T=new Int32Array(4*i),A=0;for(a=0;a<t;a++)o=n[3*a+0],s=n[3*a+1],_=n[3*a+2],E=r[3*a+0],f=r[3*a+1],u=r[3*a+2],(-1===o||E<f)&&(T[A++]=E,T[A++]=f,T[A++]=a,T[A++]=o),(-1===s||f<u)&&(T[A++]=f,T[A++]=u,T[A++]=a,T[A++]=s),(-1===_||u<E)&&(T[A++]=u,T[A++]=E,T[A++]=a,T[A++]=_);return T}(e),u=f.length/4,T=new Float32Array(9*u),A=0,c=new Float32Array(12*u),y=0,R=0,p=0,d=function(e,t){0===t&&(t=e,e=0);for(var r=Array(t-e),n=e;n<t;n++)r[n-e]=n;return r}(0,u),h=new Float32Array(u);h.forEach((function(e,i,s){var _=f[4*i+0],E=f[4*i+1];a.x=t[_*r],a.y=t[_*r+1],a.z=t[_*r+2],o.x=t[E*r],o.y=t[E*r+1],o.z=t[E*r+2],s[i]=n.o.distance(a,o)})),d.sort((function(e,t){return h[t]-h[e]}));for(var I=[],O=[],S=0;S<u;S++){var N=d[S],l=h[N],D=f[4*N+0],L=f[4*N+1],g=f[4*N+2],U=f[4*N+3],B=-1===U;if(a.x=t[D*r],a.y=t[D*r+1],a.z=t[D*r+2],o.x=t[L*r],o.y=t[L*r+1],o.z=t[L*r+2],B)s.x=E[3*g],s.y=E[3*g+1],s.z=E[3*g+2],_.x=s.x,_.y=s.y,_.z=s.z,i.cosAngle=n.o.dot(s,_);else if(s.x=E[3*g],s.y=E[3*g+1],s.z=E[3*g+2],_.x=E[3*U],_.y=E[3*U+1],_.z=E[3*U+2],i.cosAngle=n.o.dot(s,_),i.cosAngle>J)continue;R+=l,p++,B||i.cosAngle<Z?(T[A++]=i.position0.x,T[A++]=i.position0.y,T[A++]=i.position0.z,T[A++]=i.position1.x,T[A++]=i.position1.y,T[A++]=i.position1.z,T[A++]=i.faceNormal0.x,T[A++]=i.faceNormal0.y,T[A++]=i.faceNormal0.z,I.push(l)):ne(i,$)&&(c[y++]=i.position0.x,c[y++]=i.position0.y,c[y++]=i.position0.z,c[y++]=i.position1.x,c[y++]=i.position1.y,c[y++]=i.position1.z,c[y++]=i.faceNormal0.x,c[y++]=i.faceNormal0.y,c[y++]=i.faceNormal0.z,c[y++]=i.faceNormal1.x,c[y++]=i.faceNormal1.y,c[y++]=i.faceNormal1.z,O.push(l))}T=T.slice(0,A),c=c.slice(0,y);var P=R/p,C=I.length,b=O.length;return{regular:{instancesData:T,instanceCount:C,edgeLength:C*P},silhouette:{instancesData:c,instanceCount:b,edgeLength:b*P},averageEdgeLength:P}};var se,_e=(se=!0,function(e,t){var r=se?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return se=!1,r}),Ee=_e(void 0,(function(){return Ee.toString().search("(((.+)+)+)+$").toString().constructor(Ee).search("(((.+)+)+)+$")}));function fe(e){}function ue(e){if(r.e(e.cachedSidenessVertexBuffer))return e.cachedSidenessVertexBuffer;var t=new Float32Array(8),n=0;return t[n++]=0,t[n++]=0,t[n++]=0,t[n++]=1,t[n++]=1,t[n++]=1,t[n++]=1,t[n++]=0,e.cachedSidenessVertexBuffer=H.createVertexBuffer({context:e,typedArray:t,usage:S.STATIC_DRAW}),e.cachedSidenessVertexBuffer.vertexArrayDestroyable=!1,e.cachedSidenessVertexBuffer}function Te(e,t){for(var r,i,a,o=t.componentsPerAttribute,s=e.vertCompressConstant,_=new n.o(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),E=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),f=new Float32Array(3*e.verticesCount),u=0;u<e.verticesCount;u++)r=E[o*u]*s+_.x,i=E[o*u+1]*s+_.y,a=E[o*u+2]*s+_.z,f[3*u]=r,f[3*u+1]=i,f[3*u+2]=a;return f}Ee(),fe.RegularInstanceStride=12,fe.SilhouetteInstanceStride=15,fe.createEdgeData=function(e,t,n){if(0==t.length)return null;var i,a=t[0];i=0===a.indexType?new Uint16Array(a.indicesTypedArray.buffer,a.indicesTypedArray.byteOffset,a.indicesTypedArray.byteLength/2):new Uint32Array(a.indicesTypedArray.buffer,a.indicesTypedArray.byteOffset,a.indicesTypedArray.byteLength/4);var o=fe.extractEdgeInformation(e,!1,i),s=k.extractEdges(o);return r.e(n)&&(r.e(s.regular.instancesData)&&n.push(s.regular.instancesData.buffer),r.e(s.silhouette.instancesData)&&n.push(s.silhouette.instancesData.buffer)),s},fe.createIndexBuffer=function(e){return r.e(e.cachedSidenessIndexBuffer)||(e.cachedSidenessIndexBuffer=H.createIndexBuffer({context:e,typedArray:(t=new Uint16Array(6),n=0,t[n++]=2,t[n++]=1,t[n++]=0,t[n++]=3,t[n++]=2,t[n++]=0,t),usage:S.STATIC_DRAW,indexDatatype:a.IndexDatatype.UNSIGNED_SHORT}),e.cachedSidenessIndexBuffer.vertexArrayDestroyable=!1),e.cachedSidenessIndexBuffer;var t,n},fe.createRegularEdgeAttributes=function(e,t,n){if(r.e(t.instancesData)&&0!=t.instancesData.length){var i={},a=[];t.attributeLocations=i,t.attributes=a;var o=H.createVertexBuffer({context:e,typedArray:t.instancesData,usage:S.STATIC_DRAW});t.instancesData=null;var s=_.ComponentDatatype.getSizeInBytes(_.ComponentDatatype.FLOAT),E=ue(e),f=0;i.aSideness=f++,a.push({name:"aSideness",index:i.aSideness,vertexBuffer:E,componentsPerAttribute:2,componentDatatype:_.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:2*_.ComponentDatatype.getSizeInBytes(_.ComponentDatatype.FLOAT),normalize:!1});var u=n||fe.RegularInstanceStride,T=0;i.aPosition0=f++,a.push({name:"aPosition0",index:i.aPosition0,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:s*T,strideInBytes:s*u,instanceDivisor:1}),T+=3,i.aPosition1=f++,a.push({name:"aPosition1",index:i.aPosition1,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:s*T,strideInBytes:s*u,instanceDivisor:1}),T+=3,i.aNormal=f++,a.push({name:"aNormal",index:i.aNormal,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:s*T,strideInBytes:s*u,instanceDivisor:1}),T+=3,i.batchId=f++,a.push({name:"batchId",index:i.batchId,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:s*T,strideInBytes:s*u,instanceDivisor:1}),T+=1,i.aVariantStroke=f++,a.push({name:"aVariantStroke",index:i.aVariantStroke,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:s*T,strideInBytes:s*u,instanceDivisor:1}),T+=1,i.aVariantExtension=f++,a.push({name:"aVariantExtension",index:i.aVariantExtension,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:s*T,strideInBytes:s*u,instanceDivisor:1}),T+=1}},fe.createSilhouetteEdgeAttributes=function(e,t){if(r.e(t.instancesData)&&0!=t.instancesData.length){var n={},i=[];t.attributeLocations=n,t.attributes=i;var a=H.createVertexBuffer({context:e,typedArray:t.instancesData,usage:S.STATIC_DRAW});t.instancesData=null;var o=_.ComponentDatatype.getSizeInBytes(_.ComponentDatatype.FLOAT),s=0;n.aSideness=s++,i.push({name:"aSideness",index:n.aSideness,vertexBuffer:ue(e),componentsPerAttribute:2,componentDatatype:_.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:2*o,normalize:!1});var E=fe.SilhouetteInstanceStride,f=0;n.aPosition0=s++,i.push({name:"aPosition0",index:n.aPosition0,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=3,n.aPosition1=s++,i.push({name:"aPosition1",index:n.aPosition1,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=3,n.aNormalA=s++,i.push({name:"aNormalA",index:n.aNormalA,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=3,n.aNormalB=s++,i.push({name:"aNormalB",index:n.aNormalB,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=3,n.batchId=s++,i.push({name:"batchId",index:n.batchId,vertexBuffer:a,componentsPerAttribute:1,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=1,n.aVariantStroke=s++,i.push({name:"aVariantStroke",index:n.aVariantStroke,vertexBuffer:a,componentsPerAttribute:1,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=1,n.aVariantExtension=s++,i.push({name:"aVariantExtension",index:n.aVariantExtension,vertexBuffer:a,componentsPerAttribute:1,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=1}},fe.extractEdgeInformation=function(e,t,n){var i,a=e.attrLocation.aPosition,o=e.vertexAttributes[a],s=r.e(e.nCompressOptions)&&(e.nCompressOptions&h.SVC_Vertex)===h.SVC_Vertex,_=o.componentsPerAttribute;s?(_=3,i=Te(e,o)):i=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);var E=i.length/_;if(t&&n)return{faces:n,neighbors:W.computeNeighbors(n,E),vertices:i,dim:_};var f,u=o.typedArray.buffer;f=s?i.buffer:u.slice(o.typedArray.byteOffset,o.typedArray.byteOffset+o.typedArray.byteLength);var T=W.deduplicate(f,_),A=fe.selectIndexData(T.indices,n);return{faces:A,neighbors:W.computeNeighbors(A,T.uniqueCount),vertices:new Float32Array(T.buffer),dim:_}},fe.selectIndexData=function(e,t){if(t){t=t.slice();for(var r=0;r<t.length;r++)t[r]=e[t[r]];return t}return e};var Ae=new n.o,ce=new n.o,ye=new n.o,Re=new n.o,pe=new n.o,de=new n.o,he=new n.o,Ie=new n.o;function Oe(e,t){function n(e,t,r){var n=48217*e%2147483647,i=t+n/2147483647*(r-=t);return{seed:n,result:Math.round(i)}}var i=function(e,t){var r=new Float32Array(6),n=new Uint32Array(r.buffer),i=new Uint32Array(1);r[0]=e.x,r[1]=e.y,r[2]=e.z,r[3]=t.x,r[4]=t.y,r[5]=t.z,i[0]=5381;for(var a=0;a<n.length;a++)i[0]=31*i[0]+n[a];return i[0]}(e,t);r.e(i)||(i=2147483647*Math.random());var a=n(i,0,255);i=a.seed,a.result,i=(a=n(i,0,5)).seed;var o,s=a.result;i=(a={seed:o=48217*i%2147483647,result:o/2147483646}).seed;var _=a.result;return _=-(1-Math.min(_/.7,1))+Math.max(0,_-.7)/(1-.7),{variantStroke:s,variantExtension:_=255*(Math.abs(_)**1.2*(0>_?-1:1)*.5+.5)}}fe.createEdgeDataByIndices=function(e,t){var i,a,o=e.attrLocation.aPosition,s=e.vertexAttributes[o],_=r.e(e.nCompressOptions)&&(e.nCompressOptions&h.SVC_Vertex)===h.SVC_Vertex,E=s.componentsPerAttribute;_?(E=3,i=Te(e,s)):i=new Float32Array(s.typedArray.buffer,s.typedArray.byteOffset,s.typedArray.byteLength/4);for(var f=[],u=[],T=(a=0===t.indexType?new Uint16Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/2):new Uint32Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/4)).length,A=0,c=0,y=4*Math.floor(T/4);c<y;c+=4){var R=a[c],p=a[c+1],d=a[c+2],I=a[c+3];if(Ae.x=i[E*R],Ae.y=i[E*R+1],Ae.z=i[E*R+2],ce.x=i[E*p],ce.y=i[E*p+1],ce.z=i[E*p+2],ye.x=i[E*d],ye.y=i[E*d+1],ye.z=i[E*d+2],Re.x=i[E*I],Re.y=i[E*I+1],Re.z=i[E*I+2],!(n.o.equals(ce,ye)||n.o.equals(ce,Re)||n.o.equals(ce,Ae)||n.o.equals(ye,Ae)||n.o.equals(Re,Ae))){if(d===I){if(n.o.subtract(ce,Ae,pe),n.o.subtract(ye,Ae,de),n.o.cross(pe,de,pe),n.o.equals(pe,n.o.ZERO))continue;n.o.normalize(pe,pe),f.push(Ae.x),f.push(Ae.y),f.push(Ae.z),f.push(ce.x),f.push(ce.y),f.push(ce.z),f.push(pe.x),f.push(pe.y),f.push(pe.z),f.push(R);var O=(N=Oe(Ae,ce)).variantStroke,S=N.variantExtension;f.push(O),f.push(S)}else{if(n.o.subtract(ce,Ae,pe),n.o.subtract(ye,Ae,de),n.o.cross(pe,de,pe),n.o.equals(pe,n.o.ZERO)||(n.o.normalize(pe,pe),n.o.subtract(ce,Ae,he),n.o.subtract(Re,Ae,Ie),n.o.cross(Ie,he,he),n.o.equals(he,n.o.ZERO)))continue;n.o.normalize(he,he),u.push(Ae.x),u.push(Ae.y),u.push(Ae.z),u.push(ce.x),u.push(ce.y),u.push(ce.z),u.push(pe.x),u.push(pe.y),u.push(pe.z),u.push(he.x),u.push(he.y),u.push(he.z),u.push(R);var N;O=(N=Oe(Ae,ce)).variantStroke,S=N.variantExtension;u.push(O),u.push(S)}A+=n.o.distance(Ae,ce)}}var l=A/(T/4),D=f.length/fe.RegularInstanceStride,L=u.length/fe.SilhouetteInstanceStride;return{regular:{instancesData:new Float32Array(f),instanceCount:D,edgeLength:D*l},silhouette:{instancesData:new Float32Array(u),instanceCount:L,edgeLength:L},averageEdgeLength:l}},e.L=u,e.S3MCompressType=R,e.VertexCompressOption=h,e._0x30c9ea=fe})); +define(["exports","./S3MPixelFormat-013161a2","./when-92c6cf3c","./Cartesian3-3a8bdb0b","./Check-52a7d806","./IndexDatatype-86677ec4","./WebGLConstants-42651efd","./FeatureDetection-fd297af4","./ComponentDatatype-98414d16"],(function(e,t,r,n,i,a,o,s,_){"use strict";function E(e,t,r,n){var i=e|t<<8,a=i>>11&31,o=i>>5&63,s=31&i;return r[n+0]=a<<3|a>>2,r[n+1]=o<<2|o>>4,r[n+2]=s<<3|s>>2,r[n+3]=255,i}function f(e,t,r,n){var i=0;0!=(6&n)&&(i=8),function(e,t,r,n){for(var i=new Uint8Array(16),a=E(t[r+0],t[r+1],i,0),o=E(t[r+2],t[r+3],i,4),s=0;s<3;s++){var _=i[s],f=i[4+s];n&&a<=o?(i[8+s]=(_+f)/2,i[12+s]=0):(i[8+s]=(2*_+f)/3,i[12+s]=(_+2*f)/3)}i[11]=255,i[15]=n&&a<=o?0:255;var u=new Uint8Array(16);for(s=0;s<4;++s){var T=t[r+4+s];u[4*s+0]=3&T,u[4*s+1]=T>>2&3,u[4*s+2]=T>>4&3,u[4*s+3]=T>>6&3}for(s=0;s<16;++s)for(var A=4*u[s],c=0;c<4;++c)e[4*s+c]=i[A+c]}(e,t,r+i,0!=(1&n)),0!=(2&n)?function(e,t,r){for(var n=0;n<8;++n){var i=bytes[r+n],a=15&i,o=240&i;e[8*n+3]=a|a<<4,e[8*n+7]=o|o>>4}}(e,0,r):0!=(4&n)&&function(e,t,r){var n=t[r+0],i=t[r+1],a=new Uint8Array(8);if(a[0]=n,a[1]=i,n<=i){for(var o=1;o<5;++o)a[1+o]=((5-o)*n+o*i)/5;a[6]=0,a[7]=255}else for(o=1;o<7;++o)a[1+o]=((7-o)*n+o*i)/7;var s=new Uint8Array(16),_=(r+=2,0);for(o=0;o<2;++o){for(var E=0,f=0;f<3;++f)E|=t[r++]<<8*f;for(f=0;f<8;++f){var u=E>>3*f&7;s[_++]=u}}for(o=0;o<16;++o)e[4*o+3]=a[s[o]]}(e,t,r)}function u(e){}u.decode=function(e,r,n,i,a){if(null!=e&&null!=i&&0!=n&&0!=r){var o=0;1&(o=a>t.S3MPixelFormat.BGR||a===t.S3MPixelFormat.LUMINANCE_ALPHA?4:33)&&32&o?function(e,t,r,n){for(var i=new Uint16Array(4),a=e,o=0,s=0,_=0,E=0,f=0,u=0,T=0,A=0,c=0,y=t/4,R=r/4,p=0;p<R;p++)for(var d=0;d<y;d++)_=4*((R-p)*y+d),i[0]=n[_],i[1]=n[_+1],E=31&i[0],f=2016&i[0],u=63488&i[0],T=31&i[1],A=2016&i[1],c=63488&i[1],i[2]=5*E+3*T>>3|5*f+3*A>>3&2016|5*u+3*c>>3&63488,i[3]=5*T+3*E>>3|5*A+3*f>>3&2016|5*c+3*u>>3&63488,o=n[_+2],a[s=4*p*t+4*d]=i[3&o],a[s+1]=i[o>>2&3],a[s+2]=i[o>>4&3],a[s+3]=i[o>>6&3],a[s+=t]=i[o>>8&3],a[s+1]=i[o>>10&3],a[s+2]=i[o>>12&3],a[s+3]=i[o>>14],o=n[_+3],a[s+=t]=i[3&o],a[s+1]=i[o>>2&3],a[s+2]=i[o>>4&3],a[s+3]=i[o>>6&3],a[s+=t]=i[o>>8&3],a[s+1]=i[o>>10&3],a[s+2]=i[o>>12&3],a[s+3]=i[o>>14]}(e,r,n,i):function(e,t,r,n,i){for(var a=0!=(1&i)?8:16,o=0,s=0;s<r;s+=4)for(var _=0;_<t;_+=4){var E=new Uint8Array(64);f(E,n,o,i);for(var u=0,T=0;T<4;++T)for(var A=0;A<4;++A){var c=_+A,y=s+T;if(c<t&&y<r)for(var R=4*(t*(r-y)+c),p=0;p<4;++p)e[R++]=E[u++];else u+=4}o+=a}}(e,r,n,i,o)}};var T,A=(T=!0,function(e,t){var r=T?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return T=!1,r}),c=A(void 0,(function(){return c.toString().search("(((.+)+)+)+$").toString().constructor(c).search("(((.+)+)+)+$")}));c();var y,R=Object.freeze({encNONE:0,enrS3TCDXTN:14,enrPVRTPF_PVRTC2:19,enrPVRTPF_PVRTC:20,enrPVRTPF_PVRTC_4bpp:21,enrPVRTPF_ETC1:22}),p=(y=!0,function(e,t){var r=y?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return y=!1,r}),d=p(void 0,(function(){return d.toString().search("(((.+)+)+)+$").toString().constructor(d).search("(((.+)+)+)+$")}));d();var h=Object.freeze({SVC_Vertex:1,SVC_Normal:2,SVC_VertexColor:4,SVC_SecondColor:8,SVC_TexutreCoord:16,SVC_TexutreCoordIsW:32});function I(){return!0}function O(e,t){function n(){throw new i.t(t)}for(var a in t=r.u(t,"This object was destroyed, i.e., destroy() was called."),e)"function"==typeof e[a]&&(e[a]=n);e.isDestroyed=I}var S={STREAM_DRAW:o.d.STREAM_DRAW,STATIC_DRAW:o.d.STATIC_DRAW,DYNAMIC_DRAW:o.d.DYNAMIC_DRAW,validate:function(e){return e===S.STREAM_DRAW||e===S.STATIC_DRAW||e===S.DYNAMIC_DRAW}};function N(e){if(e=r.u(e,r.u.EMPTY_OBJECT),i.o.defined("options.context",e.context),!r.e(e.typedArray)&&!r.e(e.sizeInBytes))throw new i.t("Either options.sizeInBytes or options.typedArray is required.");if(r.e(e.typedArray)&&r.e(e.sizeInBytes))throw new i.t("Cannot pass in both options.sizeInBytes and options.typedArray.");if(r.e(e.typedArray)&&(i.o.typeOf.object("options.typedArray",e.typedArray),i.o.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!S.validate(e.usage))throw new i.t("usage is invalid.");var t=e.context._gl,n=e.bufferTarget,a=e.typedArray,o=e.sizeInBytes,s=e.usage,_=r.e(a);_&&(o=a.byteLength),i.o.typeOf.number.greaterThan("sizeInBytes",o,0);var E=t.createBuffer();t.bindBuffer(n,E),t.bufferData(n,_?a:o,s),t.bindBuffer(n,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=n,this._sizeInBytes=o,this._usage=s,this._buffer=E,this.context=e.context,e.context.memorySize+=o}Object.defineProperties(N.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),N.prototype._getBuffer=function(){return this._buffer},N.prototype.copyFromArrayView=function(e,t){t=r.u(t,0),i.o.defined("arrayView",e),i.o.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);var n=this._gl,a=this._bufferTarget;n.bindBuffer(a,this._buffer),n.bufferSubData(a,t,e),n.bindBuffer(a,null)},N.prototype.copyFromBuffer=function(e,t,n,a){if(!this._webgl2)throw new i.t("A WebGL 2 context is required.");if(!r.e(e))throw new i.t("readBuffer must be defined.");if(!r.e(a)||a<=0)throw new i.t("sizeInBytes must be defined and be greater than zero.");if(!r.e(t)||t<0||t+a>e._sizeInBytes)throw new i.t("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!r.e(n)||n<0||n+a>this._sizeInBytes)throw new i.t("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(n>=t&&n<t+a||t>n&&t<n+a))throw new i.t("When readBuffer is equal to this, the ranges [readOffset + sizeInBytes) and [writeOffset, writeOffset + sizeInBytes) must not overlap.");if(this._bufferTarget===o.d.ELEMENT_ARRAY_BUFFER&&e._bufferTarget!==o.d.ELEMENT_ARRAY_BUFFER||this._bufferTarget!==o.d.ELEMENT_ARRAY_BUFFER&&e._bufferTarget===o.d.ELEMENT_ARRAY_BUFFER)throw new i.t("Can not copy an index buffer into another buffer type.");var s=o.d.COPY_READ_BUFFER,_=o.d.COPY_WRITE_BUFFER,E=this._gl;E.bindBuffer(_,this._buffer),E.bindBuffer(s,e._buffer),E.copyBufferSubData(s,_,t,n,a),E.bindBuffer(_,null),E.bindBuffer(s,null)},N.prototype.getBufferData=function(e,t,n,a){if(t=r.u(t,0),n=r.u(n,0),!this._webgl2)throw new i.t("A WebGL 2 context is required.");if(!r.e(e))throw new i.t("arrayView is required.");var s,_,E=e.byteLength;if(r.e(a)?(s=a,r.e(E)?_=1:(E=e.length,_=e.BYTES_PER_ELEMENT)):r.e(E)?(s=E-n,_=1):(s=(E=e.length)-n,_=e.BYTES_PER_ELEMENT),n<0||n>E)throw new i.t("destinationOffset must be greater than zero and less than the arrayView length.");if(n+s>E)throw new i.t("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new i.t("sourceOffset must be greater than zero and less than the buffers size.");if(t+s*_>this._sizeInBytes)throw new i.t("sourceOffset + length must be less than the buffers size.");var f=this._gl,u=o.d.COPY_READ_BUFFER;f.bindBuffer(u,this._buffer),f.getBufferSubData(u,t,e,n,a),f.bindBuffer(u,null)},N.prototype.isDestroyed=function(){return!1},N.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),this.context.memorySize-=this.sizeInBytes,O(this)};var l,D=(l=!0,function(e,t){var r=l?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return l=!1,r}),L=D(void 0,(function(){return L.toString().search("(((.+)+)+)+$").toString().constructor(L).search("(((.+)+)+)+$")}));function g(){}L(),g.ALPHA_DISABLE=0,g.ALPHA_ADD=1,g.ALPHA_COMBINE=2,g.ALPHA_SUBTRACT=3,g.ALPHA_MULTIPLY=4,g.ALPHA_MAXIMIZED=5,g.ALPHA_ONEONE=6,g.ALPHA_PREMULTIPLIED=7,g.ALPHA_PREMULTIPLIED_PORTERDUFF=8,g.ALPHA_INTERPOLATE=9,g.ALPHA_SCREENMODE=10,g.ALPHA_ONEONE_ONEONE=11,g.ALPHA_ALPHATOCOLOR=12,g.ALPHA_REVERSEONEMINUS=13,g.ALPHA_SRC_DSTONEMINUSSRCALPHA=14,g.ALPHA_ONEONE_ONEZERO=15,g.ALPHA_EXCLUSION=16,g.ALPHA_LAYER_ACCUMULATE=17,g.ALPHA_EQUATION_ADD=0,g.ALPHA_EQUATION_SUBSTRACT=1,g.ALPHA_EQUATION_REVERSE_SUBTRACT=2,g.ALPHA_EQUATION_MAX=3,g.ALPHA_EQUATION_MIN=4,g.ALPHA_EQUATION_DARKEN=5,g.DELAYLOADSTATE_NONE=0,g.DELAYLOADSTATE_LOADED=1,g.DELAYLOADSTATE_LOADING=2,g.DELAYLOADSTATE_NOTLOADED=4,g.NEVER=512,g.ALWAYS=519,g.LESS=513,g.EQUAL=514,g.LEQUAL=515,g.GREATER=516,g.GEQUAL=518,g.NOTEQUAL=517,g.KEEP=7680,g.ZERO=0,g.REPLACE=7681,g.INCR=7682,g.DECR=7683,g.INVERT=5386,g.INCR_WRAP=34055,g.DECR_WRAP=34056,g.FRONT=0,g.BACK=1,g.TEXTURE_CLAMP_ADDRESSMODE=0,g.TEXTURE_WRAP_ADDRESSMODE=1,g.TEXTURE_MIRROR_ADDRESSMODE=2,g.TEXTURE_CREATIONFLAG_STORAGE=1,g.TEXTUREFORMAT_ALPHA=0,g.TEXTUREFORMAT_LUMINANCE=1,g.TEXTUREFORMAT_LUMINANCE_ALPHA=2,g.TEXTUREFORMAT_RGB=4,g.TEXTUREFORMAT_RGBA=5,g.TEXTUREFORMAT_RED=6,g.TEXTUREFORMAT_R=6,g.TEXTUREFORMAT_RG=7,g.TEXTUREFORMAT_RED_INTEGER=8,g.TEXTUREFORMAT_R_INTEGER=8,g.TEXTUREFORMAT_RG_INTEGER=9,g.TEXTUREFORMAT_RGB_INTEGER=10,g.TEXTUREFORMAT_RGBA_INTEGER=11,g.TEXTUREFORMAT_BGRA=12,g.TEXTUREFORMAT_DEPTH24_STENCIL8=13,g.TEXTUREFORMAT_DEPTH32_FLOAT=14,g.TEXTUREFORMAT_DEPTH16=15,g.TEXTUREFORMAT_DEPTH24=16,g.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8=17,g.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8=18,g.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM=36492,g.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM=36493,g.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT=36495,g.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT=36494,g.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5=33779,g.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919,g.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3=33778,g.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918,g.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1=33777,g.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1=33776,g.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917,g.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT=35916,g.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4=37808,g.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840,g.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL=36196,g.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2=37492,g.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2=37493,g.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494,g.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495,g.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC=37496,g.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497,g.TEXTURETYPE_UNSIGNED_BYTE=0,g.TEXTURETYPE_UNSIGNED_INT=0,g.TEXTURETYPE_FLOAT=1,g.TEXTURETYPE_HALF_FLOAT=2,g.TEXTURETYPE_BYTE=3,g.TEXTURETYPE_SHORT=4,g.TEXTURETYPE_UNSIGNED_SHORT=5,g.TEXTURETYPE_INT=6,g.TEXTURETYPE_UNSIGNED_INTEGER=7,g.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,g.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,g.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,g.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,g.TEXTURETYPE_UNSIGNED_INT_24_8=12,g.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,g.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,g.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,g.TEXTURETYPE_UNDEFINED=16,g.TEXTURE_NEAREST_SAMPLINGMODE=1,g.TEXTURE_NEAREST_NEAREST=1,g.TEXTURE_BILINEAR_SAMPLINGMODE=2,g.TEXTURE_LINEAR_LINEAR=2,g.TEXTURE_TRILINEAR_SAMPLINGMODE=3,g.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,g.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,g.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,g.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,g.TEXTURE_NEAREST_LINEAR=7,g.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,g.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,g.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,g.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,g.TEXTURE_LINEAR_NEAREST=12,g.TEXTURE_EXPLICIT_MODE=0,g.TEXTURE_SPHERICAL_MODE=1,g.TEXTURE_PLANAR_MODE=2,g.TEXTURE_CUBIC_MODE=3,g.TEXTURE_PROJECTION_MODE=4,g.TEXTURE_SKYBOX_MODE=5,g.TEXTURE_INVCUBIC_MODE=6,g.TEXTURE_EQUIRECTANGULAR_MODE=7,g.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,g.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,g.TEXTURE_FILTERING_QUALITY_OFFLINE=4096,g.TEXTURE_FILTERING_QUALITY_HIGH=64,g.TEXTURE_FILTERING_QUALITY_MEDIUM=16,g.TEXTURE_FILTERING_QUALITY_LOW=8,g.SCALEMODE_FLOOR=1,g.SCALEMODE_NEAREST=2,g.SCALEMODE_CEILING=3,g.MATERIAL_TextureDirtyFlag=1,g.MATERIAL_LightDirtyFlag=2,g.MATERIAL_FresnelDirtyFlag=4,g.MATERIAL_AttributesDirtyFlag=8,g.MATERIAL_MiscDirtyFlag=16,g.MATERIAL_PrePassDirtyFlag=32,g.MATERIAL_AllDirtyFlag=63,g.MATERIAL_TriangleFillMode=0,g.MATERIAL_WireFrameFillMode=1,g.MATERIAL_PointFillMode=2,g.MATERIAL_PointListDrawMode=3,g.MATERIAL_LineListDrawMode=4,g.MATERIAL_LineLoopDrawMode=5,g.MATERIAL_LineStripDrawMode=6,g.MATERIAL_TriangleStripDrawMode=7,g.MATERIAL_TriangleFanDrawMode=8,g.MATERIAL_ClockWiseSideOrientation=0,g.MATERIAL_CounterClockWiseSideOrientation=1,g.ACTION_NothingTrigger=0,g.ACTION_OnPickTrigger=1,g.ACTION_OnLeftPickTrigger=2,g.ACTION_OnRightPickTrigger=3,g.ACTION_OnCenterPickTrigger=4,g.ACTION_OnPickDownTrigger=5,g.ACTION_OnDoublePickTrigger=6,g.ACTION_OnPickUpTrigger=7,g.ACTION_OnPickOutTrigger=16,g.ACTION_OnLongPressTrigger=8,g.ACTION_OnPointerOverTrigger=9,g.ACTION_OnPointerOutTrigger=10,g.ACTION_OnEveryFrameTrigger=11,g.ACTION_OnIntersectionEnterTrigger=12,g.ACTION_OnIntersectionExitTrigger=13,g.ACTION_OnKeyDownTrigger=14,g.ACTION_OnKeyUpTrigger=15,g.PARTICLES_BILLBOARDMODE_Y=2,g.PARTICLES_BILLBOARDMODE_ALL=7,g.PARTICLES_BILLBOARDMODE_STRETCHED=8,g.MESHES_CULLINGSTRATEGY_STANDARD=0,g.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,g.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=2,g.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=3,g.SCENELOADER_NO_LOGGING=0,g.SCENELOADER_MINIMAL_LOGGING=1,g.SCENELOADER_SUMMARY_LOGGING=2,g.SCENELOADER_DETAILED_LOGGING=3,g.PREPASS_IRRADIANCE_TEXTURE_TYPE=0,g.PREPASS_POSITION_TEXTURE_TYPE=1,g.PREPASS_VELOCITY_TEXTURE_TYPE=2,g.PREPASS_REFLECTIVITY_TEXTURE_TYPE=3,g.PREPASS_COLOR_TEXTURE_TYPE=4,g.PREPASS_DEPTH_TEXTURE_TYPE=5,g.PREPASS_NORMAL_TEXTURE_TYPE=6,g.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE=7,g.BUFFER_CREATIONFLAG_READ=1,g.BUFFER_CREATIONFLAG_WRITE=2,g.BUFFER_CREATIONFLAG_READWRITE=3,g.BUFFER_CREATIONFLAG_UNIFORM=4,g.BUFFER_CREATIONFLAG_VERTEX=8,g.BUFFER_CREATIONFLAG_INDEX=16,g.BUFFER_CREATIONFLAG_STORAGE=32,g.RENDERPASS_MAIN=0,g.INPUT_ALT_KEY=18,g.INPUT_CTRL_KEY=17,g.INPUT_META_KEY1=91,g.INPUT_META_KEY2=92,g.INPUT_META_KEY3=93,g.INPUT_SHIFT_KEY=16,g.SNAPSHOTRENDERING_STANDARD=0,g.SNAPSHOTRENDERING_FAST=1,g.PERSPECTIVE_CAMERA=0,g.ORTHOGRAPHIC_CAMERA=1,g.FOVMODE_VERTICAL_FIXED=0,g.FOVMODE_HORIZONTAL_FIXED=1,g.RIG_MODE_NONE=0,g.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,g.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,g.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,g.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,g.RIG_MODE_STEREOSCOPIC_INTERLACED=14,g.RIG_MODE_VR=20,g.RIG_MODE_WEBVR=21,g.RIG_MODE_CUSTOM=22,g.MAX_SUPPORTED_UV_SETS=6,g.GL_ALPHA_EQUATION_ADD=32774,g.GL_ALPHA_EQUATION_MIN=32775,g.GL_ALPHA_EQUATION_MAX=32776,g.GL_ALPHA_EQUATION_SUBTRACT=32778,g.GL_ALPHA_EQUATION_REVERSE_SUBTRACT=32779,g.GL_ALPHA_FUNCTION_SRC=768,g.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR=769,g.GL_ALPHA_FUNCTION_SRC_ALPHA=770,g.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA=771,g.GL_ALPHA_FUNCTION_DST_ALPHA=772,g.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA=773,g.GL_ALPHA_FUNCTION_DST_COLOR=774,g.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR=775,g.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED=776,g.GL_ALPHA_FUNCTION_CONSTANT_COLOR=32769,g.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR=32770,g.GL_ALPHA_FUNCTION_CONSTANT_ALPHA=32771,g.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA=32772,g.SnippetUrl="";var U,B=(U=!0,function(e,t){var r=U?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return U=!1,r}),P=B(void 0,(function(){return P.toString().search("(((.+)+)+)+$").toString().constructor(P).search("(((.+)+)+)+$")}));function C(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=C._Counter++}P(),Object.defineProperty(C.prototype,"underlyingResource",{get:function(){return null},enumerable:!1,configurable:!0}),C._Counter=0;var b,v=(b=!0,function(e,t){var r=b?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return b=!1,r}),M=v(void 0,(function(){return M.toString().search("(((.+)+)+)+$").toString().constructor(M).search("(((.+)+)+)+$")}));function F(e,t,r,n,i,a,o,s){void 0===n&&(n=0),void 0===i&&(i=!1),void 0===a&&(a=!1),void 0===o&&(o=!1),this._isAlreadyOwned=!1,e.getScene?this._engine=e.getScene().getEngine():this._engine=e,this._updatable=r,this._instanced=a,this._divisor=s||1,t instanceof C?(this._data=null,this._buffer=t):(this._data=t,this._buffer=null),this.byteStride=o?n:n*Float32Array.BYTES_PER_ELEMENT,!i&&this.create()}function m(e,t,r,n,i,a,o,s,_,E,f,u,T,A){if(void 0===f&&(f=!1),void 0===u&&(u=!1),void 0===T&&(T=1),void 0===A&&(A=!1),t instanceof F?(this._buffer=t,this._ownsBuffer=A):(this._buffer=new F(e,t,n,a,i,o,u),this._ownsBuffer=!0),this.uniqueId=m._Counter++,this._kind=r,null==E){var c=this.getData();this.type=m.FLOAT,c instanceof Int8Array?this.type=m.BYTE:c instanceof Uint8Array?this.type=m.UNSIGNED_BYTE:c instanceof Int16Array?this.type=m.SHORT:c instanceof Uint16Array?this.type=m.UNSIGNED_SHORT:c instanceof Int32Array?this.type=m.INT:c instanceof Uint32Array&&(this.type=m.UNSIGNED_INT)}else this.type=E;var y=m.GetTypeByteLength(this.type);u?(this._size=_||(a?a/y:m.DeduceStride(r)),this.byteStride=a||this._buffer.byteStride||this._size*y,this.byteOffset=s||0):(this._size=_||a||m.DeduceStride(r),this.byteStride=a?a*y:this._buffer.byteStride||this._size*y,this.byteOffset=(s||0)*y),this.normalized=f,this._instanced=void 0!==o&&o,this._instanceDivisor=o?T:0,this._computeHashCode()}M(),F.prototype.createVertexBuffer=function(e,t,r,n,i,a,o){void 0===a&&(a=!1);var s=a?t:t*Float32Array.BYTES_PER_ELEMENT,_=n?a?n:n*Float32Array.BYTES_PER_ELEMENT:this.byteStride;return new m(this._engine,this,e,this._updatable,!0,_,void 0===i?this._instanced:i,s,r,void 0,void 0,!0,this._divisor||o)},F.prototype.isUpdatable=function(){return this._updatable},F.prototype.getData=function(){return this._data},F.prototype.getBuffer=function(){return this._buffer},F.prototype.getStrideSize=function(){return this.byteStride/Float32Array.BYTES_PER_ELEMENT},F.prototype.create=function(e){void 0===e&&(e=null),!e&&this._buffer||(e=e||this._data)&&(this._buffer?this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e),this._data=e):this._updatable?(this._buffer=this._engine.createDynamicVertexBuffer(e),this._data=e):this._buffer=this._engine.createVertexBuffer(e))},F.prototype._rebuild=function(){this._buffer=null,this.create(this._data)},F.prototype.update=function(e){this.create(e)},F.prototype.updateDirectly=function(e,t,r,n){void 0===n&&(n=!1),this._buffer&&this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e,n?t:t*Float32Array.BYTES_PER_ELEMENT,r?r*this.byteStride:void 0),this._data=0===t&&void 0===r?e:null)},F.prototype._increaseReferences=function(){this._buffer&&(this._isAlreadyOwned?this._buffer.references++:this._isAlreadyOwned=!0)},F.prototype.dispose=function(){this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null,this._data=null)},Object.defineProperty(m.prototype,"instanceDivisor",{get:function(){return this._instanceDivisor},set:function(e){this._instanceDivisor=e,this._instanced=0!=e,this._computeHashCode()},enumerable:!1,configurable:!0}),m.prototype._computeHashCode=function(){this.hashCode=(this.type-5120<<0)+((this.normalized?1:0)<<3)+(this._size<<4)+((this._instanced?1:0)<<6)+(this.byteStride<<12)},m.prototype._rebuild=function(){this._buffer&&this._buffer._rebuild()},m.prototype.getKind=function(){return this._kind},m.prototype.isUpdatable=function(){return this._buffer.isUpdatable()},m.prototype.getData=function(){return this._buffer.getData()},m.prototype.getFloatData=function(e,t){var r=this.getData();if(!r)return null;var n=this.getSize()*m.GetTypeByteLength(this.type),i=e*this.getSize();if(this.type!==m.FLOAT||this.byteStride!==n){var a=new Float32Array(i);return this.forEach(i,(function(e,t){return a[t]=e})),a}if(!(r instanceof Array||r instanceof Float32Array)||0!==this.byteOffset||r.length!==i){if(r instanceof Array){var o=this.byteOffset/4;return r.slice(o,o+i)}if(r instanceof ArrayBuffer)return new Float32Array(r,this.byteOffset,i);o=r.byteOffset+this.byteOffset;if(t){var s=new Float32Array(i),_=new Float32Array(r.buffer,o,i);return s.set(_),s}var E=o%4;return E&&(o=Math.max(0,o-E)),new Float32Array(r.buffer,o,i)}return t?r.slice():r},m.prototype.getBuffer=function(){return this._buffer.getBuffer()},m.prototype.getStrideSize=function(){return this.byteStride/m.GetTypeByteLength(this.type)},m.prototype.getOffset=function(){return this.byteOffset/m.GetTypeByteLength(this.type)},m.prototype.getSize=function(e){return void 0===e&&(e=!1),e?this._size*m.GetTypeByteLength(this.type):this._size},m.prototype.getIsInstanced=function(){return this._instanced},m.prototype.getInstanceDivisor=function(){return this._instanceDivisor},m.prototype.create=function(e){this._buffer.create(e)},m.prototype.update=function(e){this._buffer.update(e)},m.prototype.updateDirectly=function(e,t,r){void 0===r&&(r=!1),this._buffer.updateDirectly(e,t,void 0,r)},m.prototype.dispose=function(){this._ownsBuffer&&this._buffer.dispose()},m.prototype.forEach=function(e,t){m.ForEach(this._buffer.getData(),this.byteOffset,this.byteStride,this._size,this.type,e,this.normalized,t)},m.DeduceStride=function(e){switch(e){case m.UVKind:case m.UV2Kind:case m.UV3Kind:case m.UV4Kind:case m.UV5Kind:case m.UV6Kind:return 2;case m.NormalKind:case m.PositionKind:return 3;case m.ColorKind:case m.MatricesIndicesKind:case m.MatricesIndicesExtraKind:case m.MatricesWeightsKind:case m.MatricesWeightsExtraKind:case m.TangentKind:return 4;default:throw new Error("Invalid kind '"+e+"'")}},m.GetTypeByteLength=function(e){switch(e){case m.BYTE:case m.UNSIGNED_BYTE:return 1;case m.SHORT:case m.UNSIGNED_SHORT:return 2;case m.INT:case m.UNSIGNED_INT:case m.FLOAT:return 4;default:throw new Error("Invalid type '".concat(e,"'"))}},m.ForEach=function(e,t,r,n,i,a,o,s){if(e instanceof Array)for(var _=t/4,E=r/4,f=0;f<a;f+=n){for(var u=0;u<n;u++)s(e[_+u],f+u);_+=E}else{var T=e instanceof ArrayBuffer?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),A=m.GetTypeByteLength(i);for(f=0;f<a;f+=n){var c=t;for(u=0;u<n;u++){s(m._GetFloatValue(T,i,c,o),f+u),c+=A}t+=r}}},m._GetFloatValue=function(e,t,r,n){switch(t){case m.BYTE:var i=e.getInt8(r);return n&&(i=Math.max(i/127,-1)),i;case m.UNSIGNED_BYTE:i=e.getUint8(r);return n&&(i/=255),i;case m.SHORT:i=e.getInt16(r,!0);return n&&(i=Math.max(i/32767,-1)),i;case m.UNSIGNED_SHORT:i=e.getUint16(r,!0);return n&&(i/=65535),i;case m.INT:return e.getInt32(r,!0);case m.UNSIGNED_INT:return e.getUint32(r,!0);case m.FLOAT:return e.getFloat32(r,!0);default:throw new Error("Invalid component type ".concat(t))}},m._Counter=0,m.BYTE=5120,m.UNSIGNED_BYTE=5121,m.SHORT=5122,m.UNSIGNED_SHORT=5123,m.INT=5124,m.UNSIGNED_INT=5125,m.FLOAT=5126,m.PositionKind="position",m.NormalKind="normal",m.TangentKind="tangent",m.UVKind="uv",m.UV2Kind="uv2",m.UV3Kind="uv3",m.UV4Kind="uv4",m.UV5Kind="uv5",m.UV6Kind="uv6",m.ColorKind="color",m.ColorInstanceKind="instanceColor",m.MatricesIndicesKind="matricesIndices",m.MatricesWeightsKind="matricesWeights",m.MatricesIndicesExtraKind="matricesIndicesExtra",m.MatricesWeightsExtraKind="matricesWeightsExtra";var x,G=(x=!0,function(e,t){var r=x?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return x=!1,r}),w=G(void 0,(function(){return w.toString().search("(((.+)+)+)+$").toString().constructor(w).search("(((.+)+)+)+$")}));function z(e,t,r){void 0===r&&(r=g.BUFFER_CREATIONFLAG_READWRITE),this._engine=e,this._engine._storageBuffers.push(this),this._create(t,r)}function X(e){var t=(e=r.u(e,r.u.EMPTY_OBJECT)).context,n=e.bufferTarget,i=e.typedArray,s=e.sizeInBytes,_=e.usage,E=r.e(i);E?s=i.byteLength:i=new Uint8Array(s);var f=g.BUFFER_CREATIONFLAG_STORAGE;r.e(_)&&(_==S.STREAM_DRAW||_==S.STATIC_DRAW?f|=g.BUFFER_CREATIONFLAG_WRITE:_==S.DYNAMIC_DRAW&&(f|=g.BUFFER_CREATIONFLAG_READWRITE)),r.e(n)?n==o.d.ELEMENT_ARRAY_BUFFER?(i instanceof Uint8Array&&(e.indexDatatype==a.IndexDatatype.UNSIGNED_INT?i=new Uint32Array(i.buffer,i.byteOffset,i.byteLength/4):e.indexDatatype==a.IndexDatatype.UNSIGNED_SHORT&&(i=new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2))),this._dataBuffer=t.engine.createIndexBuffer(i)):n==o.d.ARRAY_BUFFER?(this._dataBuffer=new F(t.engine,i,!0),this._dataBuffer._data=null):console.log("BufferGPU not supported bufferTarget"):(this._dataBuffer=new z(t.engine,s,f),E&&this._dataBuffer.update(i,0,s)),this._bufferTarget=n,this._sizeInBytes=s,this._usage=_,this.context=e.context,e.context.memorySize+=s}function H(e){if(e=r.u(e,r.u.EMPTY_OBJECT),i.o.defined("options.context",e.context),!r.e(e.typedArray)&&!r.e(e.sizeInBytes))throw new i.t("Either options.sizeInBytes or options.typedArray is required.");if(r.e(e.typedArray)&&r.e(e.sizeInBytes))throw new i.t("Cannot pass in both options.sizeInBytes and options.typedArray.");r.e(e.typedArray)&&(i.o.typeOf.object("options.typedArray",e.typedArray),i.o.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),e.context.webgpu?this._inner=new X(e):this._inner=new N(e),this.vertexArrayDestroyable=!0}w(),z.prototype._create=function(e,t){this._bufferSize=e,this._creationFlags=t,this._buffer=this._engine.createStorageBuffer(e,t)},z.prototype._rebuild=function(){this._create(this._bufferSize,this._creationFlags)},z.prototype.getBuffer=function(){return this._buffer},z.prototype.update=function(e,t,r){this._buffer&&this._engine.updateStorageBuffer(this._buffer,e,t,r)},z.prototype.read=function(e,t,r){return this._engine.readFromStorageBuffer(this._buffer,e,t,r)},z.prototype.dispose=function(){var e=this._engine._storageBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._engine._releaseBuffer(this._buffer),this._buffer=null},Object.defineProperties(X.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}},dataBuffer:{get:function(){return this._dataBuffer}}}),X.prototype._getBuffer=function(){return console.log("BufferGPU.prototype._getBuffer"),this._dataBuffer},X.prototype.copyFromArrayView=function(e,t){this._dataBuffer.updateDirectly(e,t,null,!0)},X.prototype.copyFromBuffer=function(e,t,r,n){console.log("BufferGPU.prototype.copyFromBuffer")},X.prototype.getBufferData=function(e,t,r,n){console.log("BufferGPU.prototype.getBufferData")},X.prototype.isDestroyed=function(){return!1},X.prototype.destroy=function(){return this._bufferTarget!==o.d.ELEMENT_ARRAY_BUFFER?this._dataBuffer.dispose():this.context._engine._releaseBuffer(this._dataBuffer),this.context.memorySize-=this.sizeInBytes,O(this)},H.createVertexBuffer=function(e){return i.o.defined("options.context",e.context),new H({context:e.context,bufferTarget:o.d.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},H.createIndexBuffer=function(e){if(i.o.defined("options.context",e.context),!a.IndexDatatype.validate(e.indexDatatype))throw new i.t("Invalid indexDatatype.");if(e.indexDatatype===a.IndexDatatype.UNSIGNED_INT&&!e.context.elementIndexUint)throw new i.t("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");var t=e.context,r=e.indexDatatype,n=a.IndexDatatype.getSizeInBytes(r),s=new H({context:t,bufferTarget:o.d.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage,indexDatatype:r}),_=s.sizeInBytes/n;return Object.defineProperties(s,{indexDatatype:{get:function(){return r}},bytesPerIndex:{get:function(){return n}},numberOfIndices:{get:function(){return _}}}),s},Object.defineProperties(H.prototype,{sizeInBytes:{get:function(){return this._inner.sizeInBytes}},usage:{get:function(){return this._inner.usage}}}),H.prototype._getBuffer=function(){return this._inner._getBuffer()},H.prototype.copyFromArrayView=function(e,t){this._inner.copyFromArrayView(e,t)},H.prototype.copyFromBuffer=function(e,t,r,n){this._inner.copyFromBuffer(e,t,r,n)},H.prototype.getBufferData=function(e,t,r,n){this._inner.getBufferData(e,t,r,n)},H.prototype.isDestroyed=function(){return!1},H.prototype.destroy=function(){return this._inner.destroy(),O(this)};var V,Y=(V=!0,function(e,t){var r=V?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return V=!1,r}),K=Y(void 0,(function(){return K.toString().search("(((.+)+)+)+$").toString().constructor(K).search("(((.+)+)+)+$")}));function W(){}K(),W.computeNeighbors=function(e,t){for(var r=e.length/3,n=new Uint32Array(t+1),i=new Uint32Array(t+1),a=function(e,t){e<t?n[e+1]++:i[t+1]++},o=0;o<r;o++){var s=e[3*o],_=e[3*o+1],E=e[3*o+2];a(s,_),a(_,E),a(E,s)}for(o=_=s=0;o<t;o++)E=n[o+1],a=i[o+1],n[o+1]=s,i[o+1]=_,s+=E,_+=a;var f=new Uint32Array(6*r),u=n[t];for(a=function(e,t,r){if(e<t){var a=n[e+1]++;f[2*a]=t,f[2*a+1]=r}else a=i[t+1]++,f[2*u+2*a]=e,f[2*u+2*a+1]=r},o=0;o<r;o++)s=e[3*o],_=e[3*o+1],E=e[3*o+2],a(s,_,o),a(_,E,o),a(E,s,o);for(s=function(e,t){var r=2*e;for(e=t-e,t=1;t<e;t++){for(var n=f[r+2*t],i=f[r+2*t+1],a=t-1;0<=a&&f[r+2*a]>n;a--)f[r+2*a+2]=f[r+2*a],f[r+2*a+3]=f[r+2*a+1];f[r+2*a+2]=n,f[r+2*a+3]=i}},o=0;o<t;o++)s(n[o],n[o+1]),s(u+i[o],u+i[o+1]);var T=new Int32Array(3*r),A=function(t,r){return t===e[3*r]?0:t===e[3*r+1]?1:t===e[3*r+2]?2:-1};for(r=function(e,t){e=A(e,t),T[3*t+e]=-1},s=function(e,t,r,n){e=A(e,t),T[3*t+e]=n,r=A(r,n),T[3*n+r]=t},o=0;o<t;o++){_=n[o],E=n[o+1],a=i[o];for(var c=i[o+1];_<E&&a<c;){var y=f[2*_],R=f[2*u+2*a];y===R?(s(o,f[2*_+1],R,f[2*u+2*a+1]),_++,a++):y<R?(r(o,f[2*_+1]),_++):(r(R,f[2*u+2*a+1]),a++)}for(;_<E;)r(o,f[2*_+1]),_++;for(;a<c;)r(R=f[2*u+2*a],f[2*u+2*a+1]),a++}return T};var q=null;function k(){}function Q(e){var t,r=(t=!0,function(e,r){var n=t?function(){if(r){var t=r.apply(e,arguments);return r=null,t}}:function(){};return t=!1,n}),n=r(this,(function(){return n.toString().search("(((.+)+)+)+$").toString().constructor(n).search("(((.+)+)+)+$")}));return n(),e*Math.PI/180}W.deduplicate=function(e,t,r,n,i){void 0===r&&(r=0),void 0===n&&(n=0),void 0===i&&(i=e.byteLength/(4*t)),e=new Uint32Array(e,n,i*t),n=new Uint32Array(i);var a=Math.floor(1.1*i)+1;(null==q||q.length<2*a)&&(q=new Uint32Array(function(e){--e;for(var t=1;32>t;t<<=1)e|=e>>t;return e+1}(2*a)));for(var o=0;o<2*a;o++)q[o]=0;var s=0,_=0!==r?Math.ceil(7.84*1.96/(r*r)*r*(1-r)):i;for(o=0;o<i;o++){if(o===_){if((f=1-s/o)+1.96*Math.sqrt(f*(1-f)/o)<r)return null;_*=2}for(var E,f=o*t,u=E=0;u<t;u++)E=(E=e[f+u]+E|0)+(E<<11)+(E>>>2)|0;u=(E>>>=0)%a;for(var T=s;0!==q[2*u+1];){if(q[2*u]===E){var A=q[2*u+1]-1,c=A*t;e:{for(var y=0;y<t;y++)if(e[f+y]!==e[c+y]){c=!1;break e}c=!0}if(c){T=n[A];break}}++u>=a&&(u-=a)}T===s&&(q[2*u]=E,q[2*u+1]=o+1,s++),n[o]=T}if(0!==r&&1-s/i<r)return null;for(r=new Uint32Array(t*s),o=s=0;o<i;o++)if(n[o]===s){for(a=e,_=o*t,f=r,E=s*t,u=t,T=0;T<u;T++)f[E+T]=a[_+T];s++}return{buffer:r.buffer,indices:n,uniqueCount:s}};var $=Q(4),j=Q(35),Z=Math.cos(j),J=Math.cos($);var ee={position0:new n.o,position1:new n.o,faceNormal0:new n.o,faceNormal1:new n.o,cosAngle:0},te=new n.o,re=new n.o;function ne(e,t){var r,i,a,o,s,_,E=(r=e.cosAngle,Math.acos(1<r?1:-1>r?-1:r));return i=re,a=e.position1,o=e.position0,s=o.x-a.x,_=o.y-a.y,(o=s*s+_*_+(a=o.z-a.z)*a)?(o=1/Math.sqrt(o),i.x=s*o,i.y=_*o,i.z=a*o):(i.x=0,i.y=0,i.z=0),n.o.cross(e.faceNormal0,e.faceNormal1,te),E*(0<n.o.dot(te,re)?-1:1)>t}var ie=new n.o,ae=new n.o,oe=new n.o;k.extractEdges=function(e){var t=e.vertices,r=e.dim,i=ee,a=i.position0,o=i.position1,s=i.faceNormal0,_=i.faceNormal1,E=function(e){for(var t=e.faces.length/3,r=e.vertices,i=e.dim,a=e.faces,o=new Float32Array(3*t),s=0;s<t;s++){var _=a[3*s+0],E=a[3*s+1],f=a[3*s+2];ie.x=r[i*_],ie.y=r[i*_+1],ie.z=r[i*_+2],ae.x=r[i*E],ae.y=r[i*E+1],ae.z=r[i*E+2],oe.x=r[i*f],oe.y=r[i*f+1],oe.z=r[i*f+2],n.o.subtract(ae,ie,ae),n.o.subtract(oe,ie,oe),n.o.cross(ae,oe,ie),T=void 0,(T=(u=ie).x*u.x+u.y*u.y+u.z*u.z)>0&&(T=1/Math.sqrt(T),u.x*=T,u.y*=T,u.z*=T),o[3*s+0]=ie.x,o[3*s+1]=ie.y,o[3*s+2]=ie.z}var u,T;return o}(e),f=function(e){var t=e.faces.length/3,r=e.faces,n=e.neighbors,i=0,a=0;for(a=0;a<t;a++){var o=n[3*a+0],s=n[3*a+1],_=n[3*a+2],E=r[3*a+0],f=r[3*a+1],u=r[3*a+2];i+=-1===o||E<f?1:0,i+=-1===s||f<u?1:0,i+=-1===_||u<E?1:0}var T=new Int32Array(4*i),A=0;for(a=0;a<t;a++)o=n[3*a+0],s=n[3*a+1],_=n[3*a+2],E=r[3*a+0],f=r[3*a+1],u=r[3*a+2],(-1===o||E<f)&&(T[A++]=E,T[A++]=f,T[A++]=a,T[A++]=o),(-1===s||f<u)&&(T[A++]=f,T[A++]=u,T[A++]=a,T[A++]=s),(-1===_||u<E)&&(T[A++]=u,T[A++]=E,T[A++]=a,T[A++]=_);return T}(e),u=f.length/4,T=new Float32Array(9*u),A=0,c=new Float32Array(12*u),y=0,R=0,p=0,d=function(e,t){0===t&&(t=e,e=0);for(var r=Array(t-e),n=e;n<t;n++)r[n-e]=n;return r}(0,u),h=new Float32Array(u);h.forEach((function(e,i,s){var _=f[4*i+0],E=f[4*i+1];a.x=t[_*r],a.y=t[_*r+1],a.z=t[_*r+2],o.x=t[E*r],o.y=t[E*r+1],o.z=t[E*r+2],s[i]=n.o.distance(a,o)})),d.sort((function(e,t){return h[t]-h[e]}));for(var I=[],O=[],S=0;S<u;S++){var N=d[S],l=h[N],D=f[4*N+0],L=f[4*N+1],g=f[4*N+2],U=f[4*N+3],B=-1===U;if(a.x=t[D*r],a.y=t[D*r+1],a.z=t[D*r+2],o.x=t[L*r],o.y=t[L*r+1],o.z=t[L*r+2],B)s.x=E[3*g],s.y=E[3*g+1],s.z=E[3*g+2],_.x=s.x,_.y=s.y,_.z=s.z,i.cosAngle=n.o.dot(s,_);else if(s.x=E[3*g],s.y=E[3*g+1],s.z=E[3*g+2],_.x=E[3*U],_.y=E[3*U+1],_.z=E[3*U+2],i.cosAngle=n.o.dot(s,_),i.cosAngle>J)continue;R+=l,p++,B||i.cosAngle<Z?(T[A++]=i.position0.x,T[A++]=i.position0.y,T[A++]=i.position0.z,T[A++]=i.position1.x,T[A++]=i.position1.y,T[A++]=i.position1.z,T[A++]=i.faceNormal0.x,T[A++]=i.faceNormal0.y,T[A++]=i.faceNormal0.z,I.push(l)):ne(i,$)&&(c[y++]=i.position0.x,c[y++]=i.position0.y,c[y++]=i.position0.z,c[y++]=i.position1.x,c[y++]=i.position1.y,c[y++]=i.position1.z,c[y++]=i.faceNormal0.x,c[y++]=i.faceNormal0.y,c[y++]=i.faceNormal0.z,c[y++]=i.faceNormal1.x,c[y++]=i.faceNormal1.y,c[y++]=i.faceNormal1.z,O.push(l))}T=T.slice(0,A),c=c.slice(0,y);var P=R/p,C=I.length,b=O.length;return{regular:{instancesData:T,instanceCount:C,edgeLength:C*P},silhouette:{instancesData:c,instanceCount:b,edgeLength:b*P},averageEdgeLength:P}};var se,_e=(se=!0,function(e,t){var r=se?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return se=!1,r}),Ee=_e(void 0,(function(){return Ee.toString().search("(((.+)+)+)+$").toString().constructor(Ee).search("(((.+)+)+)+$")}));function fe(e){}function ue(e){if(r.e(e.cachedSidenessVertexBuffer))return e.cachedSidenessVertexBuffer;var t=new Float32Array(8),n=0;return t[n++]=0,t[n++]=0,t[n++]=0,t[n++]=1,t[n++]=1,t[n++]=1,t[n++]=1,t[n++]=0,e.cachedSidenessVertexBuffer=H.createVertexBuffer({context:e,typedArray:t,usage:S.STATIC_DRAW}),e.cachedSidenessVertexBuffer.vertexArrayDestroyable=!1,e.cachedSidenessVertexBuffer}function Te(e,t){for(var r,i,a,o=t.componentsPerAttribute,s=e.vertCompressConstant,_=new n.o(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),E=new Uint16Array(t.typedArray.buffer,t.typedArray.byteOffset,t.typedArray.byteLength/2),f=new Float32Array(3*e.verticesCount),u=0;u<e.verticesCount;u++)r=E[o*u]*s+_.x,i=E[o*u+1]*s+_.y,a=E[o*u+2]*s+_.z,f[3*u]=r,f[3*u+1]=i,f[3*u+2]=a;return f}Ee(),fe.RegularInstanceStride=12,fe.SilhouetteInstanceStride=15,fe.createEdgeData=function(e,t,n){if(0==t.length)return null;var i,a=t[0];i=0===a.indexType?new Uint16Array(a.indicesTypedArray.buffer,a.indicesTypedArray.byteOffset,a.indicesTypedArray.byteLength/2):new Uint32Array(a.indicesTypedArray.buffer,a.indicesTypedArray.byteOffset,a.indicesTypedArray.byteLength/4);var o=fe.extractEdgeInformation(e,!1,i),s=k.extractEdges(o);return r.e(n)&&(r.e(s.regular.instancesData)&&n.push(s.regular.instancesData.buffer),r.e(s.silhouette.instancesData)&&n.push(s.silhouette.instancesData.buffer)),s},fe.createIndexBuffer=function(e){return r.e(e.cachedSidenessIndexBuffer)||(e.cachedSidenessIndexBuffer=H.createIndexBuffer({context:e,typedArray:(t=new Uint16Array(6),n=0,t[n++]=2,t[n++]=1,t[n++]=0,t[n++]=3,t[n++]=2,t[n++]=0,t),usage:S.STATIC_DRAW,indexDatatype:a.IndexDatatype.UNSIGNED_SHORT}),e.cachedSidenessIndexBuffer.vertexArrayDestroyable=!1),e.cachedSidenessIndexBuffer;var t,n},fe.createRegularEdgeAttributes=function(e,t,n){if(r.e(t.instancesData)&&0!=t.instancesData.length){var i={},a=[];t.attributeLocations=i,t.attributes=a;var o=H.createVertexBuffer({context:e,typedArray:t.instancesData,usage:S.STATIC_DRAW});t.instancesData=null;var s=_.ComponentDatatype.getSizeInBytes(_.ComponentDatatype.FLOAT),E=ue(e),f=0;i.aSideness=f++,a.push({name:"aSideness",index:i.aSideness,vertexBuffer:E,componentsPerAttribute:2,componentDatatype:_.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:2*_.ComponentDatatype.getSizeInBytes(_.ComponentDatatype.FLOAT),normalize:!1});var u=n||fe.RegularInstanceStride,T=0;i.aPosition0=f++,a.push({name:"aPosition0",index:i.aPosition0,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:s*T,strideInBytes:s*u,instanceDivisor:1}),T+=3,i.aPosition1=f++,a.push({name:"aPosition1",index:i.aPosition1,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:s*T,strideInBytes:s*u,instanceDivisor:1}),T+=3,i.aNormal=f++,a.push({name:"aNormal",index:i.aNormal,vertexBuffer:o,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:s*T,strideInBytes:s*u,instanceDivisor:1}),T+=3,i.batchId=f++,a.push({name:"batchId",index:i.batchId,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:s*T,strideInBytes:s*u,instanceDivisor:1}),T+=1,i.aVariantStroke=f++,a.push({name:"aVariantStroke",index:i.aVariantStroke,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:s*T,strideInBytes:s*u,instanceDivisor:1}),T+=1,i.aVariantExtension=f++,a.push({name:"aVariantExtension",index:i.aVariantExtension,vertexBuffer:o,componentsPerAttribute:1,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:s*T,strideInBytes:s*u,instanceDivisor:1}),T+=1}},fe.createSilhouetteEdgeAttributes=function(e,t){if(r.e(t.instancesData)&&0!=t.instancesData.length){var n={},i=[];t.attributeLocations=n,t.attributes=i;var a=H.createVertexBuffer({context:e,typedArray:t.instancesData,usage:S.STATIC_DRAW});t.instancesData=null;var o=_.ComponentDatatype.getSizeInBytes(_.ComponentDatatype.FLOAT),s=0;n.aSideness=s++,i.push({name:"aSideness",index:n.aSideness,vertexBuffer:ue(e),componentsPerAttribute:2,componentDatatype:_.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:2*o,normalize:!1});var E=fe.SilhouetteInstanceStride,f=0;n.aPosition0=s++,i.push({name:"aPosition0",index:n.aPosition0,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=3,n.aPosition1=s++,i.push({name:"aPosition1",index:n.aPosition1,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=3,n.aNormalA=s++,i.push({name:"aNormalA",index:n.aNormalA,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=3,n.aNormalB=s++,i.push({name:"aNormalB",index:n.aNormalB,vertexBuffer:a,componentsPerAttribute:3,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=3,n.batchId=s++,i.push({name:"batchId",index:n.batchId,vertexBuffer:a,componentsPerAttribute:1,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=1,n.aVariantStroke=s++,i.push({name:"aVariantStroke",index:n.aVariantStroke,vertexBuffer:a,componentsPerAttribute:1,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=1,n.aVariantExtension=s++,i.push({name:"aVariantExtension",index:n.aVariantExtension,vertexBuffer:a,componentsPerAttribute:1,componentDatatype:_.ComponentDatatype.FLOAT,normalize:!0,offsetInBytes:o*f,strideInBytes:o*E,instanceDivisor:1}),f+=1}},fe.extractEdgeInformation=function(e,t,n){var i,a=e.attrLocation.aPosition,o=e.vertexAttributes[a],s=r.e(e.nCompressOptions)&&(e.nCompressOptions&h.SVC_Vertex)===h.SVC_Vertex,_=o.componentsPerAttribute;s?(_=3,i=Te(e,o)):i=new Float32Array(o.typedArray.buffer,o.typedArray.byteOffset,o.typedArray.byteLength/4);var E=i.length/_;if(t&&n)return{faces:n,neighbors:W.computeNeighbors(n,E),vertices:i,dim:_};var f,u=o.typedArray.buffer;f=s?i.buffer:u.slice(o.typedArray.byteOffset,o.typedArray.byteOffset+o.typedArray.byteLength);var T=W.deduplicate(f,_),A=fe.selectIndexData(T.indices,n);return{faces:A,neighbors:W.computeNeighbors(A,T.uniqueCount),vertices:new Float32Array(T.buffer),dim:_}},fe.selectIndexData=function(e,t){if(t){t=t.slice();for(var r=0;r<t.length;r++)t[r]=e[t[r]];return t}return e};var Ae=new n.o,ce=new n.o,ye=new n.o,Re=new n.o,pe=new n.o,de=new n.o,he=new n.o,Ie=new n.o;function Oe(e,t){function n(e,t,r){var n=48217*e%2147483647,i=t+n/2147483647*(r-=t);return{seed:n,result:Math.round(i)}}var i=function(e,t){var r=new Float32Array(6),n=new Uint32Array(r.buffer),i=new Uint32Array(1);r[0]=e.x,r[1]=e.y,r[2]=e.z,r[3]=t.x,r[4]=t.y,r[5]=t.z,i[0]=5381;for(var a=0;a<n.length;a++)i[0]=31*i[0]+n[a];return i[0]}(e,t);r.e(i)||(i=2147483647*Math.random());var a=n(i,0,255);i=a.seed,a.result,i=(a=n(i,0,5)).seed;var o,s=a.result;i=(a={seed:o=48217*i%2147483647,result:o/2147483646}).seed;var _=a.result;return _=-(1-Math.min(_/.7,1))+Math.max(0,_-.7)/(1-.7),{variantStroke:s,variantExtension:_=255*(Math.abs(_)**1.2*(0>_?-1:1)*.5+.5)}}fe.createEdgeDataByIndices=function(e,t){var i,a,o=e.attrLocation.aPosition,s=e.vertexAttributes[o],_=r.e(e.nCompressOptions)&&(e.nCompressOptions&h.SVC_Vertex)===h.SVC_Vertex,E=s.componentsPerAttribute;_?(E=3,i=Te(e,s)):i=new Float32Array(s.typedArray.buffer,s.typedArray.byteOffset,s.typedArray.byteLength/4);for(var f=[],u=[],T=(a=0===t.indexType?new Uint16Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/2):new Uint32Array(t.indicesTypedArray.buffer,t.indicesTypedArray.byteOffset,t.indicesTypedArray.byteLength/4)).length,A=0,c=0,y=4*Math.floor(T/4);c<y;c+=4){var R=a[c],p=a[c+1],d=a[c+2],I=a[c+3];if(Ae.x=i[E*R],Ae.y=i[E*R+1],Ae.z=i[E*R+2],ce.x=i[E*p],ce.y=i[E*p+1],ce.z=i[E*p+2],ye.x=i[E*d],ye.y=i[E*d+1],ye.z=i[E*d+2],Re.x=i[E*I],Re.y=i[E*I+1],Re.z=i[E*I+2],!(n.o.equals(ce,ye)||n.o.equals(ce,Re)||n.o.equals(ce,Ae)||n.o.equals(ye,Ae)||n.o.equals(Re,Ae))){if(d===I){if(n.o.subtract(ce,Ae,pe),n.o.subtract(ye,Ae,de),n.o.cross(pe,de,pe),n.o.equals(pe,n.o.ZERO))continue;n.o.normalize(pe,pe),f.push(Ae.x),f.push(Ae.y),f.push(Ae.z),f.push(ce.x),f.push(ce.y),f.push(ce.z),f.push(pe.x),f.push(pe.y),f.push(pe.z),f.push(R);var O=(N=Oe(Ae,ce)).variantStroke,S=N.variantExtension;f.push(O),f.push(S)}else{if(n.o.subtract(ce,Ae,pe),n.o.subtract(ye,Ae,de),n.o.cross(pe,de,pe),n.o.equals(pe,n.o.ZERO)||(n.o.normalize(pe,pe),n.o.subtract(ce,Ae,he),n.o.subtract(Re,Ae,Ie),n.o.cross(Ie,he,he),n.o.equals(he,n.o.ZERO)))continue;n.o.normalize(he,he),u.push(Ae.x),u.push(Ae.y),u.push(Ae.z),u.push(ce.x),u.push(ce.y),u.push(ce.z),u.push(pe.x),u.push(pe.y),u.push(pe.z),u.push(he.x),u.push(he.y),u.push(he.z),u.push(R);var N;O=(N=Oe(Ae,ce)).variantStroke,S=N.variantExtension;u.push(O),u.push(S)}A+=n.o.distance(Ae,ce)}}var l=A/(T/4),D=f.length/fe.RegularInstanceStride,L=u.length/fe.SilhouetteInstanceStride;return{regular:{instancesData:new Float32Array(f),instanceCount:D,edgeLength:D*l},silhouette:{instancesData:new Float32Array(u),instanceCount:L,edgeLength:L},averageEdgeLength:l}},e.L=u,e.S3MCompressType=R,e.VertexCompressOption=h,e._0x28a85f=fe})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/S3MPixelFormat-339a4168.js b/SuperMap iEarth/public/SuperMap3D/Workers/S3MPixelFormat-013161a2.js similarity index 100% rename from SuperMap iEarth/public/SuperMap3D/Workers/S3MPixelFormat-339a4168.js rename to SuperMap iEarth/public/SuperMap3D/Workers/S3MPixelFormat-013161a2.js diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/S3MTilesParser.js b/SuperMap iEarth/public/SuperMap3D/Workers/S3MTilesParser.js index 95ee2199..857ed187 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/S3MTilesParser.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/S3MTilesParser.js @@ -1 +1 @@ -define(["./createTaskProcessorWorker","./ComponentDatatype-98414d16","./Color-98063b35","./getStringFromTypedArray-1e6dda18","./S3MEdgeProcessor-d09e57c2","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./FeatureDetection-cec0163f","./S3MPixelFormat-339a4168","./pako_inflate-f73548c4","./when-92c6cf3c","./Check-52a7d806","./WebGLConstants-42651efd","./Math-ecf82623","./RuntimeError-c6a62a80","./IndexDatatype-86677ec4","./Cartesian4-72b88c9e"],(function(t,e,n,r,a,i,o,E,s,y,p,T,u,l,c,A,v){"use strict";function _(t,e,n,r,a,i){this.left=t,this.bottom=e,this.right=n,this.top=r,this.minHeight=a,this.maxHeight=i,this.width=n-t,this.length=r-e,this.height=i-a}function d(t,n,r,s,y,p,T){var u=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;var l=0,c={},A=c.vertexAttributes=[],v=c.attrLocation={};c.instanceCount=0,c.instanceMode=0;var _=0;y.getUint32(p,!0),p+=Uint32Array.BYTES_PER_ELEMENT;var d=y.getUint16(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;var m=d;d>4&&(m=d>>8,d&=15);var f=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;var B=void 0,g=void 0;if(f>0){var P=y.getUint16(p,!0);P=d*Float32Array.BYTES_PER_ELEMENT,p+=Uint32Array.BYTES_PER_ELEMENT,l=f*P;var U=s.subarray(p,p+l);if(r){var L=new i.o,h=new i.o,M=new Float32Array(U.buffer,U.byteOffset,U.byteLength/4),S=new o.a;B=new o.a,g=new o.a;for(var N=new Float32Array(2*f),R=new Float64Array(2*f),D=0;D<f;D++)E.p.multiplyByPoint(n,i.o.fromElements(M[3*D],M[3*D+1],M[3*D+2],L),h),S=o.a.fromCartesian(h),R[2*D]=S.longitude,R[2*D+1]=S.latitude,0===D?(B.longitude=S.longitude,B.latitude=S.latitude,g.longitude=S.longitude,g.latitude=S.latitude):(B.longitude=Math.max(S.longitude,B.longitude),B.latitude=Math.max(S.latitude,B.latitude),g.longitude=Math.min(S.longitude,g.longitude),g.latitude=Math.min(S.latitude,g.latitude));for(D=0;D<f;D++)N[2*D]=R[2*D]-g.longitude,N[2*D+1]=R[2*D+1]-g.latitude;v.img=_,A.push({index:v.img,typedArray:N,componentsPerAttribute:2,componentDatatype:e.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),_++}v.aPosition=_,A.push({index:v.aPosition,typedArray:U,componentsPerAttribute:d,componentDatatype:e.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:P,normalize:!1}),_++,p+=l}var Y=y.getUint32(p,!0);if(p+=Uint32Array.BYTES_PER_ELEMENT,Y>0){var I=y.getUint16(p,!0);I=m*Float32Array.BYTES_PER_ELEMENT,p+=Uint32Array.BYTES_PER_ELEMENT,l=Y*I,t.ignoreNormal||(v.aNormal=_,A.push({index:v.aNormal,typedArray:s.subarray(p,p+l),componentsPerAttribute:m,componentDatatype:e.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:I,normalize:!1}),_++),p+=l}var x=y.getUint32(p,!0);if(p+=Uint32Array.BYTES_PER_ELEMENT,x>0){var F=new Uint8Array(4*x);T.push(F.buffer);var b=y.getUint32(p,!0);b=4*Float32Array.BYTES_PER_ELEMENT,p+=Uint32Array.BYTES_PER_ELEMENT,l=x*b;for(var C=new Float32Array(s.buffer,p,4*f),w=0;w<f;w++)F[4*w]=255*C[4*w],F[4*w+1]=255*C[4*w+1],F[4*w+2]=255*C[4*w+2],F[4*w+3]=255*C[4*w+3];p+=l,v.aColor=_,A.push({index:v.aColor,typedArray:F,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:4,normalize:!0}),_++}var O=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT,O>0&&(p+=l=16*O);var k=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;for(var z,G,H=-1,W=0;W<k;W++){z=y.getUint32(p,!0),p+=Uint32Array.BYTES_PER_ELEMENT,G=y.getUint16(p,!0),p+=Uint16Array.BYTES_PER_ELEMENT,y.getUint16(p,!0),p+=Uint16Array.BYTES_PER_ELEMENT,l=z*G*Float32Array.BYTES_PER_ELEMENT;var V,X=s.subarray(p,p+l);if(-1!=H||20!=G&&35!=G)if(-1!==H)c.instanceBounds=new Float32Array(s.buffer,p,z*G);else{var j="aTexCoord"+W;v[j]=_++,A.push({index:v[j],typedArray:X,componentsPerAttribute:G,componentDatatype:e.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:G*Float32Array.BYTES_PER_ELEMENT,normalize:!1})}else H=W,c.instanceCount=z,c.instanceMode=G,c.instanceBuffer=X,20===G?(V=20*Float32Array.BYTES_PER_ELEMENT,v.uv2=_++,A.push({index:v.uv2,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:V,instanceDivisor:1}),v.uv3=_++,A.push({index:v.uv3,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),v.uv4=_++,A.push({index:v.uv4,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),v.secondary_colour=_++,A.push({index:v.secondary_colour,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),v.uv6=_++,A.push({index:v.uv6,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1})):35===G&&(V=35*Float32Array.BYTES_PER_ELEMENT,v.uv1=_++,A.push({index:v.uv1,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:V,instanceDivisor:1,byteLength:l}),v.uv2=_++,A.push({index:v.uv2,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),v.uv3=_++,A.push({index:v.uv3,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),v.uv4=_++,A.push({index:v.uv4,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),v.uv5=_++,A.push({index:v.uv5,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),v.uv6=_++,A.push({index:v.uv6,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:20*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),v.uv7=_++,A.push({index:v.uv7,componentsPerAttribute:3,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:24*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),v.secondary_colour=_++,A.push({index:v.secondary_colour,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:27*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),v.uv9=_++,A.push({index:v.uv9,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:31*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}));p+=l}c.verticesCount=f,c.instanceIndex=H;var q=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;var J,K=[];for(W=0;W<q;W++){var Q={},Z=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;var $=y.getUint8(p,!0);p+=Uint8Array.BYTES_PER_ELEMENT,y.getUint8(p,!0),p+=Uint8Array.BYTES_PER_ELEMENT;var tt=y.getUint8(p,!0);p+=Uint8Array.BYTES_PER_ELEMENT,p+=1,Q.indicesCount=Z,Q.indexType=$,Q.primitiveType=tt;var et=p;Z>0&&(0==$?(p+=l=Z*Uint16Array.BYTES_PER_ELEMENT,Z%2==1&&(p+=2)):p+=l=4*Z),Q.indicesTypedArray=s.subarray(et,et+l);var nt=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;var rt=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT*nt,Q.materialCode=rt,K.push(Q)}return 2===K.length&&13===K[1].primitiveType&&K[1].indicesCount>=3&&(J=a._0x30c9ea.createEdgeDataByIndices(c,K[1],T)),t[u]={vertexPackage:c,arrIndexPackage:K,edgeGeometry:J,cartographicBounds:{max:B,min:g}},p}function m(t,n,r){var a=t.vertexAttributes,i=t.attrLocation,o=a.length;i[1===r?"instanceId":"batchId"]=o,a.push({index:o,typedArray:n,componentsPerAttribute:1,componentDatatype:e.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:0,instanceDivisor:r})}return new n.e,t((function(t,e){var n=t.buffer,i=t.supportCompressType,o=t.bVolume,E=null,T=null,u=null,l=t.isCoverImageryLayer,c=t.modelMatrix;if(o&&t.volbuffer.byteLength<8&&(o=!1),o){var A=t.volbuffer,v=new Uint8Array(A,8),f=y.pako.inflate(v).buffer,B=new Float64Array(f,0,1),g=new Uint32Array(f,48,1);if(0===B[0]||3200===g[0]||3201===g[0]){var P=0;0===B[0]&&(P=8),e.push(f);var U=new Float64Array(f,P,6),L=U[0],h=U[1],M=U[2],S=U[3],N=U[4]<U[5]?U[4]:U[5],R=U[4]>U[5]?U[4]:U[5];T={left:L,top:h,right:M,bottom:S,minHeight:N,maxHeight:R,width:(E=new _(L,S,M,h,N,R)).width,length:E.length,height:E.height};var D=new Uint32Array(f,48+P,7),Y=D[0],I=D[1],x=D[2],F=D[3];u={nFormat:Y,nSideBlockCount:I,nBlockLength:x,nLength:F,nWidth:D[4],nHeight:D[5],nDepth:D[6],imageArray:new Uint8Array(f,76+P,F*F*4)}}}var b=0,C=new Uint8Array(n,0,4);if(115!==C[0]||51!==C[1]||109!==C[2])return{result:!1};var w=C[3],O=(v=new Uint8Array(n,4),y.pako.inflate(v).buffer),k=new Uint8Array(O);e.push(k.buffer);var z=new DataView(O),G=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var H=new Uint8Array(O,b,G),W=G%4;W&&(W=4-W),b+=G+W;var V=r.a(H,void 0,void 0,"gbk");V=(V=V.replace(new RegExp("\r\n","gm"),"")).replace(new RegExp(":","gm"),""),z.getUint32(b,!0),b+=Uint32Array.BYTES_PER_ELEMENT;var X=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var j={};j.ignoreNormal=t.ignoreNormal;for(var q=0;q<X;q++)b=d(j,c,l,k,z,b,e);z.getUint32(b,!0),b+=Uint32Array.BYTES_PER_ELEMENT;var J=z.getUint32(b,!0);for(b+=Uint32Array.BYTES_PER_ELEMENT,q=0;q<J;q++){var K=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Q=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Z={},$=j[K].vertexPackage.instanceIndex,tt=j[K].edgeGeometry;if(-1==$){for(var et=new Float32Array(j[K].vertexPackage.verticesCount),nt=0;nt<Q;nt++){var rt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var at=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var it=0,ot=0;Z[rt]={batchId:nt};for(var Et=0;Et<at;Et++)if(ot=z.getUint32(b,!0),b+=Uint32Array.BYTES_PER_ELEMENT,it=z.getUint32(b,!0),b+=Uint32Array.BYTES_PER_ELEMENT,et.fill)et.fill(nt,ot,ot+it);else for(var st=ot+ot,yt=ot;yt<st;yt++)et[yt]=nt;Z[rt].vertexColorOffset=ot,Z[rt].vertexColorCount=it}m(j[K].vertexPackage,et,void 0)}else{var pt=j[K].vertexPackage.instanceCount;j[K].vertexPackage.instanceBuffer,j[K].vertexPackage.instanceMode;var Tt=new Float32Array(pt),ut=0;for(nt=0;nt<Q;nt++){rt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;at=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;for(Et=0;Et<at;Et++){var lt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT,Tt[ut]=ut,void 0===Z[rt]&&(Z[rt]={vertexColorCount:1,instanceIds:[],vertexColorOffset:ut}),Z[rt].instanceIds.push(lt),ut++}}m(j[K].vertexPackage,Tt,1)}j[K].pickInfo=Z;tt=j[K].edgeGeometry;if(p.e(tt)){var ct,At,vt=tt.regular.instancesData,_t=a._0x30c9ea.RegularInstanceStride;if(p.e(vt))for(At=vt.length,ct=0;ct<At;ct+=_t){var dt=vt[ct+9];vt[ct+9]=et[dt]}var mt=tt.silhouette.instancesData;if(_t=a._0x30c9ea.SilhouetteInstanceStride,p.e(mt))for(At=mt.length,ct=0;ct<At;ct+=_t){dt=mt[ct+12];mt[ct+12]=et[dt]}}}z.getUint32(b,!0),b+=Uint32Array.BYTES_PER_ELEMENT;var ft=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Bt={};for(q=0;q<ft;q++){var gt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Pt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Ut=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Lt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;at=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var ht=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Mt=null;if(Lt===a.S3MCompressType.enrS3TCDXTN&&1!==i){var St=null;ht>s.S3MPixelFormat.BGR||ht===s.S3MPixelFormat.LUMINANCE_ALPHA?(St=new Uint8Array(O,b,Pt*Ut),Mt=new Uint8Array(Pt*Ut*4)):(St=new Uint16Array(O,b,at/2),Mt=new Uint16Array(Pt*Ut)),a.L.decode(Mt,Pt,Ut,St,ht),e.push(Mt.buffer),Lt=0}else Mt=new Uint8Array(O,b,at);Bt[gt]={id:gt,width:Pt,height:Ut,compressType:Lt,nFormat:ht,imageBuffer:Mt},b+=at}return{result:!0,version:w,xmlDoc:V,geoPackage:j,texturePackage:Bt,volImageBuffer:u,volBounds:T}}))})); +define(["./createTaskProcessorWorker","./ComponentDatatype-98414d16","./Color-b1bd525f","./getStringFromTypedArray-1e6dda18","./S3MEdgeProcessor-6c92ceff","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./FeatureDetection-fd297af4","./S3MPixelFormat-013161a2","./pako_inflate-f73548c4","./when-92c6cf3c","./Check-52a7d806","./WebGLConstants-42651efd","./Math-ecf82623","./RuntimeError-c6a62a80","./IndexDatatype-86677ec4","./Cartesian4-72b88c9e"],(function(t,e,n,r,a,i,o,E,s,y,p,T,u,l,A,v,_){"use strict";function c(t,e,n,r,a,i){this.left=t,this.bottom=e,this.right=n,this.top=r,this.minHeight=a,this.maxHeight=i,this.width=n-t,this.length=r-e,this.height=i-a}function f(t,n,r,s,y,p,T){var u=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;var l=0,A={},v=A.vertexAttributes=[],_=A.attrLocation={};A.instanceCount=0,A.instanceMode=0;var c=0;y.getUint32(p,!0),p+=Uint32Array.BYTES_PER_ELEMENT;var f=y.getUint16(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;var d=f;f>4&&(d=f>>8,f&=15);var m=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;var B=void 0,g=void 0;if(m>0){var P=y.getUint16(p,!0);P=f*Float32Array.BYTES_PER_ELEMENT,p+=Uint32Array.BYTES_PER_ELEMENT,l=m*P;var U=s.subarray(p,p+l);if(r){var L=new i.o,h=new i.o,M=new Float32Array(U.buffer,U.byteOffset,U.byteLength/4),S=new o.a;B=new o.a,g=new o.a;for(var N=new Float32Array(2*m),R=new Float64Array(2*m),D=0;D<m;D++)E.p.multiplyByPoint(n,i.o.fromElements(M[3*D],M[3*D+1],M[3*D+2],L),h),S=o.a.fromCartesian(h),R[2*D]=S.longitude,R[2*D+1]=S.latitude,0===D?(B.longitude=S.longitude,B.latitude=S.latitude,g.longitude=S.longitude,g.latitude=S.latitude):(B.longitude=Math.max(S.longitude,B.longitude),B.latitude=Math.max(S.latitude,B.latitude),g.longitude=Math.min(S.longitude,g.longitude),g.latitude=Math.min(S.latitude,g.latitude));for(D=0;D<m;D++)N[2*D]=R[2*D]-g.longitude,N[2*D+1]=R[2*D+1]-g.latitude;_.img=c,v.push({index:_.img,typedArray:N,componentsPerAttribute:2,componentDatatype:e.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:2*Float32Array.BYTES_PER_ELEMENT,normalize:!1}),c++}_.aPosition=c,v.push({index:_.aPosition,typedArray:U,componentsPerAttribute:f,componentDatatype:e.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:P,normalize:!1}),c++,p+=l}var Y=y.getUint32(p,!0);if(p+=Uint32Array.BYTES_PER_ELEMENT,Y>0){var I=y.getUint16(p,!0);I=d*Float32Array.BYTES_PER_ELEMENT,p+=Uint32Array.BYTES_PER_ELEMENT,l=Y*I,t.ignoreNormal||(_.aNormal=c,v.push({index:_.aNormal,typedArray:s.subarray(p,p+l),componentsPerAttribute:d,componentDatatype:e.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:I,normalize:!1}),c++),p+=l}var x=y.getUint32(p,!0);if(p+=Uint32Array.BYTES_PER_ELEMENT,x>0){var F=new Uint8Array(4*x);T.push(F.buffer);var b=y.getUint32(p,!0);b=4*Float32Array.BYTES_PER_ELEMENT,p+=Uint32Array.BYTES_PER_ELEMENT,l=x*b;for(var C=new Float32Array(s.buffer,p,4*m),w=0;w<m;w++)F[4*w]=255*C[4*w],F[4*w+1]=255*C[4*w+1],F[4*w+2]=255*C[4*w+2],F[4*w+3]=255*C[4*w+3];p+=l,_.aColor=c,v.push({index:_.aColor,typedArray:F,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.UNSIGNED_BYTE,offsetInBytes:0,strideInBytes:4,normalize:!0}),c++}var O=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT,O>0&&(p+=l=16*O);var k=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;for(var z,G,H=-1,W=0;W<k;W++){z=y.getUint32(p,!0),p+=Uint32Array.BYTES_PER_ELEMENT,G=y.getUint16(p,!0),p+=Uint16Array.BYTES_PER_ELEMENT,y.getUint16(p,!0),p+=Uint16Array.BYTES_PER_ELEMENT,l=z*G*Float32Array.BYTES_PER_ELEMENT;var V,X=s.subarray(p,p+l);if(-1!=H||20!=G&&35!=G)if(-1!==H)A.instanceBounds=new Float32Array(s.buffer,p,z*G);else{var j="aTexCoord"+W;_[j]=c++,v.push({index:_[j],typedArray:X,componentsPerAttribute:G,componentDatatype:e.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:G*Float32Array.BYTES_PER_ELEMENT,normalize:!1})}else H=W,A.instanceCount=z,A.instanceMode=G,A.instanceBuffer=X,20===G?(V=20*Float32Array.BYTES_PER_ELEMENT,_.uv2=c++,v.push({index:_.uv2,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:V,instanceDivisor:1}),_.uv3=c++,v.push({index:_.uv3,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),_.uv4=c++,v.push({index:_.uv4,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),_.secondary_colour=c++,v.push({index:_.secondary_colour,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),_.uv6=c++,v.push({index:_.uv6,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1})):35===G&&(V=35*Float32Array.BYTES_PER_ELEMENT,_.uv1=c++,v.push({index:_.uv1,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:V,instanceDivisor:1,byteLength:l}),_.uv2=c++,v.push({index:_.uv2,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),_.uv3=c++,v.push({index:_.uv3,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),_.uv4=c++,v.push({index:_.uv4,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),_.uv5=c++,v.push({index:_.uv5,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),_.uv6=c++,v.push({index:_.uv6,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:20*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),_.uv7=c++,v.push({index:_.uv7,componentsPerAttribute:3,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:24*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),_.secondary_colour=c++,v.push({index:_.secondary_colour,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:27*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}),_.uv9=c++,v.push({index:_.uv9,componentsPerAttribute:4,componentDatatype:e.ComponentDatatype.FLOAT,normalize:!1,offsetInBytes:31*Float32Array.BYTES_PER_ELEMENT,strideInBytes:V,instanceDivisor:1}));p+=l}A.verticesCount=m,A.instanceIndex=H;var q=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;var J,K=[];for(W=0;W<q;W++){var Q={},Z=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;var $=y.getUint8(p,!0);p+=Uint8Array.BYTES_PER_ELEMENT,y.getUint8(p,!0),p+=Uint8Array.BYTES_PER_ELEMENT;var tt=y.getUint8(p,!0);p+=Uint8Array.BYTES_PER_ELEMENT,p+=1,Q.indicesCount=Z,Q.indexType=$,Q.primitiveType=tt;var et=p;Z>0&&(0==$?(p+=l=Z*Uint16Array.BYTES_PER_ELEMENT,Z%2==1&&(p+=2)):p+=l=4*Z),Q.indicesTypedArray=s.subarray(et,et+l);var nt=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT;var rt=y.getUint32(p,!0);p+=Uint32Array.BYTES_PER_ELEMENT*nt,Q.materialCode=rt,K.push(Q)}return 2===K.length&&13===K[1].primitiveType&&K[1].indicesCount>=3&&(J=a._0x28a85f.createEdgeDataByIndices(A,K[1],T)),t[u]={vertexPackage:A,arrIndexPackage:K,edgeGeometry:J,cartographicBounds:{max:B,min:g}},p}function d(t,n,r){var a=t.vertexAttributes,i=t.attrLocation,o=a.length;i[1===r?"instanceId":"batchId"]=o,a.push({index:o,typedArray:n,componentsPerAttribute:1,componentDatatype:e.ComponentDatatype.FLOAT,offsetInBytes:0,strideInBytes:0,instanceDivisor:r})}return new n.e,t((function(t,e){var n=t.buffer,i=t.supportCompressType,o=t.bVolume,E=null,T=null,u=null,l=t.isCoverImageryLayer,A=t.modelMatrix;if(o&&t.volbuffer.byteLength<8&&(o=!1),o){var v=t.volbuffer,_=new Uint8Array(v,8),m=y.pako.inflate(_).buffer,B=new Float64Array(m,0,1),g=new Uint32Array(m,48,1);if(0===B[0]||3200===g[0]||3201===g[0]){var P=0;0===B[0]&&(P=8),e.push(m);var U=new Float64Array(m,P,6),L=U[0],h=U[1],M=U[2],S=U[3],N=U[4]<U[5]?U[4]:U[5],R=U[4]>U[5]?U[4]:U[5];T={left:L,top:h,right:M,bottom:S,minHeight:N,maxHeight:R,width:(E=new c(L,S,M,h,N,R)).width,length:E.length,height:E.height};var D=new Uint32Array(m,48+P,7),Y=D[0],I=D[1],x=D[2],F=D[3];u={nFormat:Y,nSideBlockCount:I,nBlockLength:x,nLength:F,nWidth:D[4],nHeight:D[5],nDepth:D[6],imageArray:new Uint8Array(m,76+P,F*F*4)}}}var b=0,C=new Uint8Array(n,0,4);if(115!==C[0]||51!==C[1]||109!==C[2])return{result:!1};var w=C[3],O=(_=new Uint8Array(n,4),y.pako.inflate(_).buffer),k=new Uint8Array(O);e.push(k.buffer);var z=new DataView(O),G=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var H=new Uint8Array(O,b,G),W=G%4;W&&(W=4-W),b+=G+W;var V=r.a(H,void 0,void 0,"gbk");V=(V=V.replace(new RegExp("\r\n","gm"),"")).replace(new RegExp(":","gm"),""),z.getUint32(b,!0),b+=Uint32Array.BYTES_PER_ELEMENT;var X=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var j={};j.ignoreNormal=t.ignoreNormal;for(var q=0;q<X;q++)b=f(j,A,l,k,z,b,e);z.getUint32(b,!0),b+=Uint32Array.BYTES_PER_ELEMENT;var J=z.getUint32(b,!0);for(b+=Uint32Array.BYTES_PER_ELEMENT,q=0;q<J;q++){var K=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Q=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Z={},$=j[K].vertexPackage.instanceIndex,tt=j[K].edgeGeometry;if(-1==$){for(var et=new Float32Array(j[K].vertexPackage.verticesCount),nt=0;nt<Q;nt++){var rt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var at=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var it=0,ot=0;Z[rt]={batchId:nt};for(var Et=0;Et<at;Et++)if(ot=z.getUint32(b,!0),b+=Uint32Array.BYTES_PER_ELEMENT,it=z.getUint32(b,!0),b+=Uint32Array.BYTES_PER_ELEMENT,et.fill)et.fill(nt,ot,ot+it);else for(var st=ot+ot,yt=ot;yt<st;yt++)et[yt]=nt;Z[rt].vertexColorOffset=ot,Z[rt].vertexColorCount=it}d(j[K].vertexPackage,et,void 0)}else{var pt=j[K].vertexPackage.instanceCount;j[K].vertexPackage.instanceBuffer,j[K].vertexPackage.instanceMode;var Tt=new Float32Array(pt),ut=0;for(nt=0;nt<Q;nt++){rt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;at=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;for(Et=0;Et<at;Et++){var lt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT,Tt[ut]=ut,void 0===Z[rt]&&(Z[rt]={vertexColorCount:1,instanceIds:[],vertexColorOffset:ut}),Z[rt].instanceIds.push(lt),ut++}}d(j[K].vertexPackage,Tt,1)}j[K].pickInfo=Z;tt=j[K].edgeGeometry;if(p.e(tt)){var At,vt,_t=tt.regular.instancesData,ct=a._0x28a85f.RegularInstanceStride;if(p.e(_t))for(vt=_t.length,At=0;At<vt;At+=ct){var ft=_t[At+9];_t[At+9]=et[ft]}var dt=tt.silhouette.instancesData;if(ct=a._0x28a85f.SilhouetteInstanceStride,p.e(dt))for(vt=dt.length,At=0;At<vt;At+=ct){ft=dt[At+12];dt[At+12]=et[ft]}}}z.getUint32(b,!0),b+=Uint32Array.BYTES_PER_ELEMENT;var mt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Bt={};for(q=0;q<mt;q++){var gt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Pt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Ut=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Lt=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;at=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var ht=z.getUint32(b,!0);b+=Uint32Array.BYTES_PER_ELEMENT;var Mt=null;if(Lt===a.S3MCompressType.enrS3TCDXTN&&1!==i){var St=null;ht>s.S3MPixelFormat.BGR||ht===s.S3MPixelFormat.LUMINANCE_ALPHA?(St=new Uint8Array(O,b,Pt*Ut),Mt=new Uint8Array(Pt*Ut*4)):(St=new Uint16Array(O,b,at/2),Mt=new Uint16Array(Pt*Ut)),a.L.decode(Mt,Pt,Ut,St,ht),e.push(Mt.buffer),Lt=0}else Mt=new Uint8Array(O,b,at);Bt[gt]={id:gt,width:Pt,height:Ut,compressType:Lt,nFormat:ht,imageBuffer:Mt},b+=at}return{result:!0,version:w,xmlDoc:V,geoPackage:j,texturePackage:Bt,volImageBuffer:u,volBounds:T}}))})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/TerrainEncoding-fd44afa8.js b/SuperMap iEarth/public/SuperMap3D/Workers/TerrainEncoding-231c7a61.js similarity index 98% rename from SuperMap iEarth/public/SuperMap3D/Workers/TerrainEncoding-fd44afa8.js rename to SuperMap iEarth/public/SuperMap3D/Workers/TerrainEncoding-231c7a61.js index fc05e0a6..6d386547 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/TerrainEncoding-fd44afa8.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/TerrainEncoding-231c7a61.js @@ -1 +1 @@ -define(["exports","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./Cartesian2-b72655a5","./AttributeCompression-b5a80a71","./ComponentDatatype-98414d16","./Math-ecf82623","./FeatureDetection-cec0163f"],(function(e,t,o,i,r,n,a,s,c,m){"use strict";function u(e,t){i.o.typeOf.object("ellipsoid",e),this._ellipsoid=e,this._cameraPosition=new o.o,this._cameraPositionInScaledSpace=new o.o,this._distanceToLimbInScaledSpaceSquared=0,r.e(t)&&(this.cameraPosition=t)}Object.defineProperties(u.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){var t=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=o.o.magnitudeSquared(t)-1;o.o.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=t,this._distanceToLimbInScaledSpaceSquared=i}}});var p=new o.o;u.prototype.isPointVisible=function(e){return b(this._ellipsoid.transformPositionToScaledSpace(e,p),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},u.prototype.isScaledSpacePointVisible=function(e){return b(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var d=new o.o;u.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){var o,i,n=this._ellipsoid;return r.e(t)&&t<0&&n.minimumRadius>-t?((i=d).x=this._cameraPosition.x/(n.radii.x+t),i.y=this._cameraPosition.y/(n.radii.y+t),i.z=this._cameraPosition.z/(n.radii.z+t),o=i.x*i.x+i.y*i.y+i.z*i.z-1):(i=this._cameraPositionInScaledSpace,o=this._distanceToLimbInScaledSpaceSquared),b(e,i,o)},u.prototype.computeHorizonCullingPoint=function(e,t,o){return S(this._ellipsoid,e,t,o)};var l=n.t.clone(n.t.UNIT_SPHERE);u.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,o,i){return S(y(this._ellipsoid,o,l),e,t,i)},u.prototype.computeHorizonCullingPointFromVertices=function(e,t,o,i,r){return v(this._ellipsoid,e,t,o,i,r)},u.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,o,i,r,n){return v(y(this._ellipsoid,r,l),e,t,o,i,n)};var h=[];u.prototype.computeHorizonCullingPointFromRectangle=function(e,r,a){i.o.typeOf.object("rectangle",e);var s=n.h.subsample(e,r,0,h),c=t.i.fromPoints(s);if(!(o.o.magnitude(c.center)<.1*r.minimumRadius))return this.computeHorizonCullingPoint(c.center,s,a)};var f=new o.o;function y(e,t,i){if(r.e(t)&&t<0&&e.minimumRadius>-t){var a=o.o.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,f);e=n.t.fromCartesian3(a,i)}return e}function S(e,t,n,a){i.o.typeOf.object("directionToPoint",t),i.o.defined("positions",n),r.e(a)||(a=new o.o);for(var s=N(e,t),c=0,m=0,u=n.length;m<u;++m){var p=P(e,n[m],s);if(p<0)return;c=Math.max(c,p)}return z(s,c,a)}var x=new o.o;function v(e,t,n,a,s,c){i.o.typeOf.object("directionToPoint",t),i.o.defined("vertices",n),i.o.typeOf.number("stride",a),r.e(c)||(c=new o.o),a=r.u(a,3),s=r.u(s,o.o.ZERO);for(var m=N(e,t),u=0,p=0,d=n.length;p<d;p+=a){x.x=n[p]+s.x,x.y=n[p+1]+s.y,x.z=n[p+2]+s.z;var l=P(e,x,m);if(l<0)return;u=Math.max(u,l)}return z(m,u,c)}function b(e,t,i){var r=t,n=i,a=o.o.subtract(e,r,p),s=-o.o.dot(a,r);return!(n<0?s>0:s>n&&s*s/o.o.magnitudeSquared(a)>n)}var T=new o.o,g=new o.o;function P(e,t,i){var r=e.transformPositionToScaledSpace(t,T),n=o.o.magnitudeSquared(r),a=Math.sqrt(n),s=o.o.divideByScalar(r,a,g);n=Math.max(1,n);var c=1/(a=Math.max(1,a));return 1/(o.o.dot(s,i)*c-o.o.magnitude(o.o.cross(s,i,s))*(Math.sqrt(n-1)*c))}function z(e,t,i){if(!(t<=0||t===1/0||t!=t))return o.o.multiplyByScalar(e,t,i)}var E=new o.o;function N(e,t){return o.o.equals(t,o.o.ZERO)?t:(e.transformPositionToScaledSpace(t,E),o.o.normalize(E,E))}var I=Object.freeze({NONE:0,BITS12:1}),C=new o.o,_=new o.o,B=new n.o,w=new m.p,H=new m.p,q=Math.pow(2,12);function M(e,t,i,n,a,s){var c,u,p,d=I.NONE;if(r.e(e)&&r.e(t)&&r.e(i)&&r.e(n)){var l=e.minimum,h=e.maximum,f=o.o.subtract(h,l,_),y=i-t;d=Math.max(o.o.maximumComponent(f),y)<q-1?I.BITS12:I.NONE,d=I.NONE,c=e.center,u=m.p.inverseTransformation(n,new m.p);var S=o.o.negate(l,C);m.p.multiply(m.p.fromTranslation(S,w),u,u);var x=C;x.x=1/f.x,x.y=1/f.y,x.z=1/f.z,m.p.multiply(m.p.fromScale(x,w),u,u),p=m.p.clone(n),m.p.setTranslation(p,o.o.ZERO,p),n=m.p.clone(n,new m.p);var v=m.p.fromTranslation(l,w),b=m.p.fromScale(f,H),T=m.p.multiply(v,b,w);m.p.multiply(n,T,n),m.p.multiply(p,T,p)}this.quantization=d,this.minimumHeight=t,this.maximumHeight=i,this.center=c,this.toScaledENU=u,this.fromScaledENU=n,this.matrix=p,this.hasVertexNormals=a,this.hasWebMercatorT=r.u(s,!1)}M.prototype.encode=function(e,t,i,r,s,u,p){var d=r.x,l=r.y;if(this.quantization===I.BITS12){(i=m.p.multiplyByPoint(this.toScaledENU,i,C)).x=c.e.clamp(i.x,0,1),i.y=c.e.clamp(i.y,0,1),i.z=c.e.clamp(i.z,0,1);var h=this.maximumHeight-this.minimumHeight,f=c.e.clamp((s-this.minimumHeight)/h,0,1);n.o.fromElements(i.x,i.y,B);var y=a.t.compressTextureCoordinates(B);n.o.fromElements(i.z,f,B);var S=a.t.compressTextureCoordinates(B);n.o.fromElements(d,l,B);var x=a.t.compressTextureCoordinates(B);if(e[t++]=y,e[t++]=S,e[t++]=x,this.hasWebMercatorT){n.o.fromElements(p,0,B);var v=a.t.compressTextureCoordinates(B);e[t++]=v}}else o.o.subtract(i,this.center,C),e[t++]=C.x,e[t++]=C.y,e[t++]=C.z,e[t++]=s,e[t++]=d,e[t++]=l,this.hasWebMercatorT&&(e[t++]=p);return this.hasVertexNormals&&(e[t++]=a.t.octPackFloat(u)),t},M.prototype.decodePosition=function(e,t,i){if(r.e(i)||(i=new o.o),t*=this.getStride(),this.quantization===I.BITS12){var n=a.t.decompressTextureCoordinates(e[t],B);i.x=n.x,i.y=n.y;var s=a.t.decompressTextureCoordinates(e[t+1],B);return i.z=s.x,m.p.multiplyByPoint(this.fromScaledENU,i,i)}return i.x=e[t],i.y=e[t+1],i.z=e[t+2],o.o.add(i,this.center,i)},M.prototype.decodeTextureCoordinates=function(e,t,o){return r.e(o)||(o=new n.o),t*=this.getStride(),this.quantization===I.BITS12?a.t.decompressTextureCoordinates(e[t+2],o):n.o.fromElements(e[t+4],e[t+5],o)},M.prototype.decodeHeight=function(e,t){return t*=this.getStride(),this.quantization===I.BITS12?a.t.decompressTextureCoordinates(e[t+1],B).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]},M.prototype.decodeWebMercatorT=function(e,t){return t*=this.getStride(),this.quantization===I.BITS12?a.t.decompressTextureCoordinates(e[t+3],B).x:e[t+6]},M.prototype.getOctEncodedNormal=function(e,t,o){var i=e[t=(t+1)*this.getStride()-1]/256,r=Math.floor(i),a=256*(i-r);return n.o.fromElements(r,a,o)},M.prototype.getStride=function(){var e;if(this.quantization===I.BITS12)e=3;else e=6;return this.hasWebMercatorT&&++e,this.hasVertexNormals&&++e,e};var O={position3DAndHeight:0,textureCoordAndEncodedNormals:1},A={compressed0:0,compressed1:1};M.prototype.getAttributes=function(e){var t,o=s.ComponentDatatype.FLOAT,i=s.ComponentDatatype.getSizeInBytes(o);if(this.quantization===I.NONE){var r=2;this.hasWebMercatorT&&++r,this.hasVertexNormals&&++r;var n=[{index:O.position3DAndHeight,name:"position3DAndHeight",vertexBuffer:e,componentDatatype:o,componentsPerAttribute:4,offsetInBytes:0,strideInBytes:t=(4+r)*i},{index:O.textureCoordAndEncodedNormals,name:"textureCoordAndEncodedNormals",vertexBuffer:e,componentDatatype:o,componentsPerAttribute:r,offsetInBytes:4*i,strideInBytes:t}];return n}var a=3,c=0;return(this.hasWebMercatorT||this.hasVertexNormals)&&++a,this.hasWebMercatorT&&this.hasVertexNormals?(t=(a+ ++c)*i,[{index:n.compressed0,name:"compressed0",vertexBuffer:e,componentDatatype:o,componentsPerAttribute:a,offsetInBytes:0,strideInBytes:t},{index:n.compressed1,name:"compressed1",vertexBuffer:e,componentDatatype:o,componentsPerAttribute:c,offsetInBytes:a*i,strideInBytes:t}]):[{index:n.compressed0,name:"compressed0",vertexBuffer:e,componentDatatype:o,componentsPerAttribute:a}]},M.prototype.getAttributeLocations=function(){return this.quantization===I.NONE?O:A},M.clone=function(e,t){return r.e(t)||(t=new M),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=o.o.clone(e.center),t.toScaledENU=m.p.clone(e.toScaledENU),t.fromScaledENU=m.p.clone(e.fromScaledENU),t.matrix=m.p.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t},e.h=M,e.s=u})); +define(["exports","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./Cartesian2-b72655a5","./AttributeCompression-b5a80a71","./ComponentDatatype-98414d16","./Math-ecf82623","./FeatureDetection-fd297af4"],(function(e,t,o,i,r,n,a,s,c,m){"use strict";function u(e,t){i.o.typeOf.object("ellipsoid",e),this._ellipsoid=e,this._cameraPosition=new o.o,this._cameraPositionInScaledSpace=new o.o,this._distanceToLimbInScaledSpaceSquared=0,r.e(t)&&(this.cameraPosition=t)}Object.defineProperties(u.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){var t=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=o.o.magnitudeSquared(t)-1;o.o.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=t,this._distanceToLimbInScaledSpaceSquared=i}}});var p=new o.o;u.prototype.isPointVisible=function(e){return b(this._ellipsoid.transformPositionToScaledSpace(e,p),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},u.prototype.isScaledSpacePointVisible=function(e){return b(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var d=new o.o;u.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){var o,i,n=this._ellipsoid;return r.e(t)&&t<0&&n.minimumRadius>-t?((i=d).x=this._cameraPosition.x/(n.radii.x+t),i.y=this._cameraPosition.y/(n.radii.y+t),i.z=this._cameraPosition.z/(n.radii.z+t),o=i.x*i.x+i.y*i.y+i.z*i.z-1):(i=this._cameraPositionInScaledSpace,o=this._distanceToLimbInScaledSpaceSquared),b(e,i,o)},u.prototype.computeHorizonCullingPoint=function(e,t,o){return S(this._ellipsoid,e,t,o)};var l=n.t.clone(n.t.UNIT_SPHERE);u.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,o,i){return S(y(this._ellipsoid,o,l),e,t,i)},u.prototype.computeHorizonCullingPointFromVertices=function(e,t,o,i,r){return v(this._ellipsoid,e,t,o,i,r)},u.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,o,i,r,n){return v(y(this._ellipsoid,r,l),e,t,o,i,n)};var h=[];u.prototype.computeHorizonCullingPointFromRectangle=function(e,r,a){i.o.typeOf.object("rectangle",e);var s=n.h.subsample(e,r,0,h),c=t.i.fromPoints(s);if(!(o.o.magnitude(c.center)<.1*r.minimumRadius))return this.computeHorizonCullingPoint(c.center,s,a)};var f=new o.o;function y(e,t,i){if(r.e(t)&&t<0&&e.minimumRadius>-t){var a=o.o.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,f);e=n.t.fromCartesian3(a,i)}return e}function S(e,t,n,a){i.o.typeOf.object("directionToPoint",t),i.o.defined("positions",n),r.e(a)||(a=new o.o);for(var s=N(e,t),c=0,m=0,u=n.length;m<u;++m){var p=P(e,n[m],s);if(p<0)return;c=Math.max(c,p)}return z(s,c,a)}var x=new o.o;function v(e,t,n,a,s,c){i.o.typeOf.object("directionToPoint",t),i.o.defined("vertices",n),i.o.typeOf.number("stride",a),r.e(c)||(c=new o.o),a=r.u(a,3),s=r.u(s,o.o.ZERO);for(var m=N(e,t),u=0,p=0,d=n.length;p<d;p+=a){x.x=n[p]+s.x,x.y=n[p+1]+s.y,x.z=n[p+2]+s.z;var l=P(e,x,m);if(l<0)return;u=Math.max(u,l)}return z(m,u,c)}function b(e,t,i){var r=t,n=i,a=o.o.subtract(e,r,p),s=-o.o.dot(a,r);return!(n<0?s>0:s>n&&s*s/o.o.magnitudeSquared(a)>n)}var T=new o.o,g=new o.o;function P(e,t,i){var r=e.transformPositionToScaledSpace(t,T),n=o.o.magnitudeSquared(r),a=Math.sqrt(n),s=o.o.divideByScalar(r,a,g);n=Math.max(1,n);var c=1/(a=Math.max(1,a));return 1/(o.o.dot(s,i)*c-o.o.magnitude(o.o.cross(s,i,s))*(Math.sqrt(n-1)*c))}function z(e,t,i){if(!(t<=0||t===1/0||t!=t))return o.o.multiplyByScalar(e,t,i)}var E=new o.o;function N(e,t){return o.o.equals(t,o.o.ZERO)?t:(e.transformPositionToScaledSpace(t,E),o.o.normalize(E,E))}var I=Object.freeze({NONE:0,BITS12:1}),C=new o.o,_=new o.o,B=new n.o,w=new m.p,H=new m.p,q=Math.pow(2,12);function M(e,t,i,n,a,s){var c,u,p,d=I.NONE;if(r.e(e)&&r.e(t)&&r.e(i)&&r.e(n)){var l=e.minimum,h=e.maximum,f=o.o.subtract(h,l,_),y=i-t;d=Math.max(o.o.maximumComponent(f),y)<q-1?I.BITS12:I.NONE,d=I.NONE,c=e.center,u=m.p.inverseTransformation(n,new m.p);var S=o.o.negate(l,C);m.p.multiply(m.p.fromTranslation(S,w),u,u);var x=C;x.x=1/f.x,x.y=1/f.y,x.z=1/f.z,m.p.multiply(m.p.fromScale(x,w),u,u),p=m.p.clone(n),m.p.setTranslation(p,o.o.ZERO,p),n=m.p.clone(n,new m.p);var v=m.p.fromTranslation(l,w),b=m.p.fromScale(f,H),T=m.p.multiply(v,b,w);m.p.multiply(n,T,n),m.p.multiply(p,T,p)}this.quantization=d,this.minimumHeight=t,this.maximumHeight=i,this.center=c,this.toScaledENU=u,this.fromScaledENU=n,this.matrix=p,this.hasVertexNormals=a,this.hasWebMercatorT=r.u(s,!1)}M.prototype.encode=function(e,t,i,r,s,u,p){var d=r.x,l=r.y;if(this.quantization===I.BITS12){(i=m.p.multiplyByPoint(this.toScaledENU,i,C)).x=c.e.clamp(i.x,0,1),i.y=c.e.clamp(i.y,0,1),i.z=c.e.clamp(i.z,0,1);var h=this.maximumHeight-this.minimumHeight,f=c.e.clamp((s-this.minimumHeight)/h,0,1);n.o.fromElements(i.x,i.y,B);var y=a.t.compressTextureCoordinates(B);n.o.fromElements(i.z,f,B);var S=a.t.compressTextureCoordinates(B);n.o.fromElements(d,l,B);var x=a.t.compressTextureCoordinates(B);if(e[t++]=y,e[t++]=S,e[t++]=x,this.hasWebMercatorT){n.o.fromElements(p,0,B);var v=a.t.compressTextureCoordinates(B);e[t++]=v}}else o.o.subtract(i,this.center,C),e[t++]=C.x,e[t++]=C.y,e[t++]=C.z,e[t++]=s,e[t++]=d,e[t++]=l,this.hasWebMercatorT&&(e[t++]=p);return this.hasVertexNormals&&(e[t++]=a.t.octPackFloat(u)),t},M.prototype.decodePosition=function(e,t,i){if(r.e(i)||(i=new o.o),t*=this.getStride(),this.quantization===I.BITS12){var n=a.t.decompressTextureCoordinates(e[t],B);i.x=n.x,i.y=n.y;var s=a.t.decompressTextureCoordinates(e[t+1],B);return i.z=s.x,m.p.multiplyByPoint(this.fromScaledENU,i,i)}return i.x=e[t],i.y=e[t+1],i.z=e[t+2],o.o.add(i,this.center,i)},M.prototype.decodeTextureCoordinates=function(e,t,o){return r.e(o)||(o=new n.o),t*=this.getStride(),this.quantization===I.BITS12?a.t.decompressTextureCoordinates(e[t+2],o):n.o.fromElements(e[t+4],e[t+5],o)},M.prototype.decodeHeight=function(e,t){return t*=this.getStride(),this.quantization===I.BITS12?a.t.decompressTextureCoordinates(e[t+1],B).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]},M.prototype.decodeWebMercatorT=function(e,t){return t*=this.getStride(),this.quantization===I.BITS12?a.t.decompressTextureCoordinates(e[t+3],B).x:e[t+6]},M.prototype.getOctEncodedNormal=function(e,t,o){var i=e[t=(t+1)*this.getStride()-1]/256,r=Math.floor(i),a=256*(i-r);return n.o.fromElements(r,a,o)},M.prototype.getStride=function(){var e;if(this.quantization===I.BITS12)e=3;else e=6;return this.hasWebMercatorT&&++e,this.hasVertexNormals&&++e,e};var O={position3DAndHeight:0,textureCoordAndEncodedNormals:1},A={compressed0:0,compressed1:1};M.prototype.getAttributes=function(e){var t,o=s.ComponentDatatype.FLOAT,i=s.ComponentDatatype.getSizeInBytes(o);if(this.quantization===I.NONE){var r=2;this.hasWebMercatorT&&++r,this.hasVertexNormals&&++r;var n=[{index:O.position3DAndHeight,name:"position3DAndHeight",vertexBuffer:e,componentDatatype:o,componentsPerAttribute:4,offsetInBytes:0,strideInBytes:t=(4+r)*i},{index:O.textureCoordAndEncodedNormals,name:"textureCoordAndEncodedNormals",vertexBuffer:e,componentDatatype:o,componentsPerAttribute:r,offsetInBytes:4*i,strideInBytes:t}];return n}var a=3,c=0;return(this.hasWebMercatorT||this.hasVertexNormals)&&++a,this.hasWebMercatorT&&this.hasVertexNormals?(t=(a+ ++c)*i,[{index:n.compressed0,name:"compressed0",vertexBuffer:e,componentDatatype:o,componentsPerAttribute:a,offsetInBytes:0,strideInBytes:t},{index:n.compressed1,name:"compressed1",vertexBuffer:e,componentDatatype:o,componentsPerAttribute:c,offsetInBytes:a*i,strideInBytes:t}]):[{index:n.compressed0,name:"compressed0",vertexBuffer:e,componentDatatype:o,componentsPerAttribute:a}]},M.prototype.getAttributeLocations=function(){return this.quantization===I.NONE?O:A},M.clone=function(e,t){return r.e(t)||(t=new M),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=o.o.clone(e.center),t.toScaledENU=m.p.clone(e.toScaledENU),t.fromScaledENU=m.p.clone(e.fromScaledENU),t.matrix=m.p.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t},e.h=M,e.s=u})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/ThirdParty/assimpjs.wasm b/SuperMap iEarth/public/SuperMap3D/Workers/ThirdParty/assimpjs.wasm new file mode 100644 index 00000000..9071d7d3 Binary files /dev/null and b/SuperMap iEarth/public/SuperMap3D/Workers/ThirdParty/assimpjs.wasm differ diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/UnZipData.js b/SuperMap iEarth/public/SuperMap3D/Workers/UnZipData.js index 3acac93d..832bdfb5 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/UnZipData.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/UnZipData.js @@ -1 +1 @@ -define(["./createTaskProcessorWorker","./pako_inflate-f73548c4","./CompressedTextureBuffer-d0bacc6b","./when-92c6cf3c","./PixelFormat-ab56b0d6","./RuntimeError-c6a62a80","./S3MPixelFormat-339a4168","./WebGLConstants-42651efd"],(function(e,r,t,n,a,i,f,E){"use strict";var o,u,_=1,s=2,c={};c[0]=a.PixelFormat.RGB_DXT1,c[_]=a.PixelFormat.RGBA_DXT3,c[s]=a.PixelFormat.RGBA_DXT5;var y,T=0;function l(e){var r=e.data,f=r.byteLength,E=new Uint8Array(r,e.offset),_=y._malloc(f);!function(e,r,t,n){var a,i=t/4,f=n%4,E=new Uint32Array(e.buffer,0,(n-f)/4),o=new Uint32Array(r.buffer);for(a=0;a<E.length;a++)o[i+a]=E[a];for(a=n-f;a<n;a++)r[t+a]=e[a]}(E,y.HEAPU8,_,f);var s=y._crn_get_dxt_format(_,f),l=c[s];if(!n.e(l))throw new i.t("Unsupported compressed format.");var U,m=y._crn_get_levels(_,f),A=y._crn_get_width(_,f),p=y._crn_get_height(_,f),w=0;for(U=0;U<m;++U)w+=a.PixelFormat.compressedTextureSizeInBytes(l,A>>U,p>>U);if(T<w&&(n.e(o)&&y._free(o),o=y._malloc(w),u=new Uint8Array(y.HEAPU8.buffer,o,w),T=w),y._crn_decompress(_,f,o,w,0,m),y._free(_),n.u(e.bMipMap,!1)){var B=u.slice(0,w);return new t.e(l,A,p,B)}var P=a.PixelFormat.compressedTextureSizeInBytes(l,A,p),g=u.subarray(0,P),d=new Uint8Array(P);return d.set(g,0),new t.e(l,A,p,d)}function U(e){var r=new DataView(e),t=0,n=r.getUint32(t,!0);t+=Uint32Array.BYTES_PER_ELEMENT;var a=r.getUint32(t,!0);t+=Uint32Array.BYTES_PER_ELEMENT;var i=r.getUint32(t,!0);t+=Uint32Array.BYTES_PER_ELEMENT;var f=r.getUint32(t,!0);t+=Uint32Array.BYTES_PER_ELEMENT;var E=r.getUint32(t,!0);t+=Uint32Array.BYTES_PER_ELEMENT;var o=l({data:e.slice(t,t+E)}).bufferView,u=new ArrayBuffer(t+o.byteLength),_=new Uint8Array(u),s=new Uint32Array(u);return t=0,s[0]=n,t+=Uint32Array.BYTES_PER_ELEMENT,s[1]=a,t+=Uint32Array.BYTES_PER_ELEMENT,s[2]=i,t+=Uint32Array.BYTES_PER_ELEMENT,s[3]=f,t+=Uint32Array.BYTES_PER_ELEMENT,s[4]=o.byteLength,t+=Uint32Array.BYTES_PER_ELEMENT,_.set(o,t),u}function m(e,t){for(var n=e.data,a=[],i=0;i<n.length;i++){var E,o=n[i];try{var u=new Uint8Array(o.zipBuffer);E=r.pako.inflate(u).buffer,new DataView(E).getUint32(0,!0)===f.S3MPixelFormat.CRN_DXT5&&(E=U(E)),t.push(E),a.push({unzipBuffer:E,name:o.name})}catch(r){o.unzipLength===o.zippedLength&&(E=o.zipBuffer.buffer,e.isCRN&&(E=U(E)),t.push(E),a.push({unzipBuffer:E,name:o.name}));continue}}return{data:a}}function A(){self.onmessage=e(m),self.postMessage(!0)}return function(e){var r=e.data.webAssemblyConfig;if(n.e(r))return require([r.modulePath],(function(e){n.e(r.wasmBinaryFile)?(n.e(e)||(e=self.Module),y=e,A()):(y=e,A())}))}})); +define(["./createTaskProcessorWorker","./pako_inflate-f73548c4","./CompressedTextureBuffer-d0bacc6b","./when-92c6cf3c","./PixelFormat-ab56b0d6","./RuntimeError-c6a62a80","./S3MPixelFormat-013161a2","./WebGLConstants-42651efd"],(function(e,r,t,n,a,i,f,E){"use strict";var o,u,_=1,s=2,c={};c[0]=a.PixelFormat.RGB_DXT1,c[_]=a.PixelFormat.RGBA_DXT3,c[s]=a.PixelFormat.RGBA_DXT5;var y,T=0;function l(e){var r=e.data,f=r.byteLength,E=new Uint8Array(r,e.offset),_=y._malloc(f);!function(e,r,t,n){var a,i=t/4,f=n%4,E=new Uint32Array(e.buffer,0,(n-f)/4),o=new Uint32Array(r.buffer);for(a=0;a<E.length;a++)o[i+a]=E[a];for(a=n-f;a<n;a++)r[t+a]=e[a]}(E,y.HEAPU8,_,f);var s=y._crn_get_dxt_format(_,f),l=c[s];if(!n.e(l))throw new i.t("Unsupported compressed format.");var U,m=y._crn_get_levels(_,f),A=y._crn_get_width(_,f),p=y._crn_get_height(_,f),w=0;for(U=0;U<m;++U)w+=a.PixelFormat.compressedTextureSizeInBytes(l,A>>U,p>>U);if(T<w&&(n.e(o)&&y._free(o),o=y._malloc(w),u=new Uint8Array(y.HEAPU8.buffer,o,w),T=w),y._crn_decompress(_,f,o,w,0,m),y._free(_),n.u(e.bMipMap,!1)){var B=u.slice(0,w);return new t.e(l,A,p,B)}var P=a.PixelFormat.compressedTextureSizeInBytes(l,A,p),g=u.subarray(0,P),d=new Uint8Array(P);return d.set(g,0),new t.e(l,A,p,d)}function U(e){var r=new DataView(e),t=0,n=r.getUint32(t,!0);t+=Uint32Array.BYTES_PER_ELEMENT;var a=r.getUint32(t,!0);t+=Uint32Array.BYTES_PER_ELEMENT;var i=r.getUint32(t,!0);t+=Uint32Array.BYTES_PER_ELEMENT;var f=r.getUint32(t,!0);t+=Uint32Array.BYTES_PER_ELEMENT;var E=r.getUint32(t,!0);t+=Uint32Array.BYTES_PER_ELEMENT;var o=l({data:e.slice(t,t+E)}).bufferView,u=new ArrayBuffer(t+o.byteLength),_=new Uint8Array(u),s=new Uint32Array(u);return t=0,s[0]=n,t+=Uint32Array.BYTES_PER_ELEMENT,s[1]=a,t+=Uint32Array.BYTES_PER_ELEMENT,s[2]=i,t+=Uint32Array.BYTES_PER_ELEMENT,s[3]=f,t+=Uint32Array.BYTES_PER_ELEMENT,s[4]=o.byteLength,t+=Uint32Array.BYTES_PER_ELEMENT,_.set(o,t),u}function m(e,t){for(var n=e.data,a=[],i=0;i<n.length;i++){var E,o=n[i];try{var u=new Uint8Array(o.zipBuffer);E=r.pako.inflate(u).buffer,new DataView(E).getUint32(0,!0)===f.S3MPixelFormat.CRN_DXT5&&(E=U(E)),t.push(E),a.push({unzipBuffer:E,name:o.name})}catch(r){o.unzipLength===o.zippedLength&&(E=o.zipBuffer.buffer,e.isCRN&&(E=U(E)),t.push(E),a.push({unzipBuffer:E,name:o.name}));continue}}return{data:a}}function A(){self.onmessage=e(m),self.postMessage(!0)}return function(e){var r=e.data.webAssemblyConfig;if(n.e(r))return require([r.modulePath],(function(e){n.e(r.wasmBinaryFile)?(n.e(e)||(e=self.Module),y=e,A()):(y=e,A())}))}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/UnZipTerrainData.js b/SuperMap iEarth/public/SuperMap3D/Workers/UnZipTerrainData.js index c1c139e9..6485e356 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/UnZipTerrainData.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/UnZipTerrainData.js @@ -1 +1 @@ -define(["./createTaskProcessorWorker","./pako_inflate-f73548c4","./unzip-e2c14141","./when-92c6cf3c"],(function(n,r,e,i){"use strict";var a=!1;if("undefined"!=typeof WebAssembly){e.unzip.onRuntimeInitialized=function(){a=!0};var t=e.unzip.cwrap("unzip","number",["number","number","number","number"]),u=e.unzip.cwrap("freePointer",null,["number"])}return n((function(n,i){var E,l=n.data,f=new Uint8Array(l);return!0===a?(E=function(n){var r=4*n.length,i=e.unzip._malloc(Uint8Array.BYTES_PER_ELEMENT*r),a=new Uint8Array(r);e.unzip.HEAPU8.set(a,i/Uint8Array.BYTES_PER_ELEMENT);var E,l=e.unzip._malloc(Uint8Array.BYTES_PER_ELEMENT*n.length);for(e.unzip.HEAPU8.set(n,l/Uint8Array.BYTES_PER_ELEMENT);0==(E=t(i,r,l,n.length));)u(i),r*=4,i=e.unzip._malloc(Uint8Array.BYTES_PER_ELEMENT*r),a=new Uint8Array(r),e.unzip.HEAPU8.set(a,i/Uint8Array.BYTES_PER_ELEMENT);var f=new Uint8Array(e.unzip.HEAPU8.buffer,i,E);n=null,a=null;var p=new Uint8Array(f);return u(i),u(l),p}(f),{data:E}):(E=r.pako.inflate(f).buffer,i.push(E),{data:new Uint8Array(E)})}))})); +define(["./createTaskProcessorWorker","./pako_inflate-f73548c4","./unzip-617dbdc5","./when-92c6cf3c"],(function(n,r,e,i){"use strict";var a=!1;if("undefined"!=typeof WebAssembly){e.unzip.onRuntimeInitialized=function(){a=!0};var t=e.unzip.cwrap("unzip","number",["number","number","number","number"]),u=e.unzip.cwrap("freePointer",null,["number"])}return n((function(n,i){var E,l=n.data,f=new Uint8Array(l);return!0===a?(E=function(n){var r=4*n.length,i=e.unzip._malloc(Uint8Array.BYTES_PER_ELEMENT*r),a=new Uint8Array(r);e.unzip.HEAPU8.set(a,i/Uint8Array.BYTES_PER_ELEMENT);var E,l=e.unzip._malloc(Uint8Array.BYTES_PER_ELEMENT*n.length);for(e.unzip.HEAPU8.set(n,l/Uint8Array.BYTES_PER_ELEMENT);0==(E=t(i,r,l,n.length));)u(i),r*=4,i=e.unzip._malloc(Uint8Array.BYTES_PER_ELEMENT*r),a=new Uint8Array(r),e.unzip.HEAPU8.set(a,i/Uint8Array.BYTES_PER_ELEMENT);var f=new Uint8Array(e.unzip.HEAPU8.buffer,i,E);n=null,a=null;var p=new Uint8Array(f);return u(i),u(l),p}(f),{data:E}):(E=r.pako.inflate(f).buffer,i.push(E),{data:new Uint8Array(E)})}))})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/WallGeometryLibrary-8f286e50.js b/SuperMap iEarth/public/SuperMap3D/Workers/WallGeometryLibrary-8f286e50.js new file mode 100644 index 00000000..c9ed89d7 --- /dev/null +++ b/SuperMap iEarth/public/SuperMap3D/Workers/WallGeometryLibrary-8f286e50.js @@ -0,0 +1 @@ +define(["exports","./arrayRemoveDuplicates-a6924649","./Cartographic-a2c313d7","./when-92c6cf3c","./Math-ecf82623","./PolylinePipeline-160fa1b0","./GeometryAttribute-65cf868d","./FeatureDetection-fd297af4","./Cartesian3-3a8bdb0b"],(function(e,t,r,i,o,a,n,s,h){"use strict";var l={};function g(e,t){return o.e.equalsEpsilon(e.latitude,t.latitude,o.e.EPSILON10)&&o.e.equalsEpsilon(e.longitude,t.longitude,o.e.EPSILON10)}var c=new r.a,p=new r.a;var u=new Array(2),m=new Array(2),v={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};function A(e,t){for(var r=new Array(e.length),i=0;i<e.length;i+=3){var o=new h.o(e[i],e[i+1],e[i+2]);s.p.multiplyByPoint(t,o,o),r[i]=o.x,r[i+1]=o.y,r[i+2]=o.z}return r}l.computePositions=function(e,l,f,y,w,d,P){var F=function(e,o,a,n){var s=(o=t.D(o,h.o.equalsEpsilon)).length;if(!(s<2)){var l=i.e(n),u=i.e(a),m=!0,v=new Array(s),A=new Array(s),f=new Array(s),y=o[0];v[0]=y;var w=e.cartesianToCartographic(y,c);u&&(w.height=a[0]),m=m&&0==w.height,A[0]=w.height,f[0]=l?n[0]:0;for(var d=1,P=1;P<s;++P){var F=o[P],b=e.cartesianToCartographic(F,p);u&&(b.height=a[P]),m=m&&0==b.height,g(w,b)?w.height<b.height&&(A[d-1]=b.height):(v[d]=F,A[d]=b.height,f[d]=l?n[P]:0,r.a.clone(b,w),++d)}if(!(m||d<2))return v.length=d,A.length=d,f.length=d,{positions:v,topHeights:A,bottomHeights:f}}}(e,l,f,y);if(i.e(F)){var b=n.m.eastNorthUpToFixedFrame(F.positions[0],e,new s.p),C=s.p.inverse(b,new s.p);l=F.positions,f=F.topHeights,y=F.bottomHeights;var D,E,x,H,q=l.length,L=q-2,N=o.e.chordLength(w,e.maximumRadius),O=v;if(O.minDistance=N,O.ellipsoid=e,d){var T,I=0;for(T=0;T<q-1;T++)I+=a.m.numberOfPoints(l[T],l[T+1],N)+1;D=new Float64Array(3*I),E=new Float64Array(3*I),i.e(P)&&(x=new Float64Array(3*I),H=new Float64Array(3*I));var R=u,S=m;O.positions=R,O.height=S;var z=0;for(T=0;T<q-1;T++){R[0]=l[T],R[1]=l[T+1],S[0]=f[T],S[1]=f[T+1];var B=a.m.generateArc(O);D.set(B,z),i.e(P)&&x.set(A(B,C),z),S[0]=y[T],S[1]=y[T+1],E.set(a.m.generateArc(O),z),i.e(P)&&H.set(A(a.m.generateArc(O),C),z),z+=B.length}}else O.positions=l,O.height=f,D=new Float64Array(a.m.generateArc(O)),i.e(P)&&(x=new Float64Array(A(a.m.generateArc(O)))),O.height=y,E=new Float64Array(a.m.generateArc(O)),i.e(P)&&(H=new Float64Array(A(a.m.generateArc(O))));var G={pos:{bottomPositions:E,topPositions:D,numCorners:L}};return i.e(P)&&(G.localPos={bottomPositions:H,topPositions:x,numCorners:L}),G}},e.D=l})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/WallGeometryLibrary-d4f25ef7.js b/SuperMap iEarth/public/SuperMap3D/Workers/WallGeometryLibrary-d4f25ef7.js deleted file mode 100644 index 952d2d90..00000000 --- a/SuperMap iEarth/public/SuperMap3D/Workers/WallGeometryLibrary-d4f25ef7.js +++ /dev/null @@ -1 +0,0 @@ -define(["exports","./arrayRemoveDuplicates-a6924649","./Cartographic-a2c313d7","./when-92c6cf3c","./Math-ecf82623","./PolylinePipeline-f0970409","./GeometryAttribute-f47bd1cb","./FeatureDetection-cec0163f","./Cartesian3-3a8bdb0b"],(function(e,t,r,i,o,n,a,s,h){"use strict";var l={};function g(e,t){return o.e.equalsEpsilon(e.latitude,t.latitude,o.e.EPSILON10)&&o.e.equalsEpsilon(e.longitude,t.longitude,o.e.EPSILON10)}var c=new r.a,p=new r.a;var u=new Array(2),m=new Array(2),v={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};function A(e,t){for(var r=new Array(e.length),i=0;i<e.length;i+=3){var o=new h.o(e[i],e[i+1],e[i+2]);s.p.multiplyByPoint(t,o,o),r[i]=o.x,r[i+1]=o.y,r[i+2]=o.z}return r}l.computePositions=function(e,l,y,f,w,d,P){var b=function(e,o,n,a){var s=(o=t.D(o,h.o.equalsEpsilon)).length;if(!(s<2)){var l=i.e(a),u=i.e(n),m=!0,v=new Array(s),A=new Array(s),y=new Array(s),f=o[0];v[0]=f;var w=e.cartesianToCartographic(f,c);u&&(w.height=n[0]),m=m&&0==w.height,A[0]=w.height,y[0]=l?a[0]:0;for(var d=1,P=1;P<s;++P){var b=o[P],F=e.cartesianToCartographic(b,p);u&&(F.height=n[P]),m=m&&0==F.height,g(w,F)?w.height<F.height&&(A[d-1]=F.height):(v[d]=b,A[d]=F.height,y[d]=l?a[P]:0,r.a.clone(F,w),++d)}if(!(m||d<2))return v.length=d,A.length=d,y.length=d,{positions:v,topHeights:A,bottomHeights:y}}}(e,l,y,f);if(i.e(b)){var F=a.m.eastNorthUpToFixedFrame(b.positions[0],e,new s.p),C=s.p.inverse(F,new s.p);l=b.positions,y=b.topHeights,f=b.bottomHeights;var D,E,x,H,q=l.length,L=q-2,N=o.e.chordLength(w,e.maximumRadius),O=v;if(O.minDistance=N,O.ellipsoid=e,d){var T,I=0;for(T=0;T<q-1;T++)I+=n.m.numberOfPoints(l[T],l[T+1],N)+1;D=new Float64Array(3*I),E=new Float64Array(3*I),i.e(P)&&(x=new Float64Array(3*I),H=new Float64Array(3*I));var R=u,S=m;O.positions=R,O.height=S;var z=0;for(T=0;T<q-1;T++){R[0]=l[T],R[1]=l[T+1],S[0]=y[T],S[1]=y[T+1];var B=n.m.generateArc(O);D.set(B,z),i.e(P)&&x.set(A(B,C),z),S[0]=f[T],S[1]=f[T+1],E.set(n.m.generateArc(O),z),i.e(P)&&H.set(A(n.m.generateArc(O),C),z),z+=B.length}}else O.positions=l,O.height=y,D=new Float64Array(n.m.generateArc(O)),i.e(P)&&(x=new Float64Array(A(n.m.generateArc(O)))),O.height=f,E=new Float64Array(n.m.generateArc(O)),i.e(P)&&(H=new Float64Array(A(n.m.generateArc(O))));var G={pos:{bottomPositions:E,topPositions:D,numCorners:L}};return i.e(P)&&(G.localPos={bottomPositions:H,topPositions:x,numCorners:L}),G}},e.D=l})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/buildModuleUrl-9eef8841.js b/SuperMap iEarth/public/SuperMap3D/Workers/buildModuleUrl-cbcc8c56.js similarity index 93% rename from SuperMap iEarth/public/SuperMap3D/Workers/buildModuleUrl-9eef8841.js rename to SuperMap iEarth/public/SuperMap3D/Workers/buildModuleUrl-cbcc8c56.js index 0eb0604f..fb6a55c1 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/buildModuleUrl-9eef8841.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/buildModuleUrl-cbcc8c56.js @@ -1 +1 @@ -define(["exports","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./when-92c6cf3c","./Cartesian2-b72655a5","./Math-ecf82623","./FeatureDetection-cec0163f","./Event-3390cd7d","./RuntimeError-c6a62a80"],(function(e,t,r,n,o,i,a,u,s,c){"use strict";function p(e){this._ellipsoid=o.u(e,i.t.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(p.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),p.prototype.project=function(e,r){var n=this._semimajorAxis,i=e.longitude*n,a=e.latitude*n,u=e.height;return o.e(r)?(r.x=i,r.y=a,r.z=u,r):new t.o(i,a,u)},p.prototype.unproject=function(e,t){if(!o.e(e))throw new n.t("cartesian is required");var i=this._oneOverSemimajorAxis,a=e.x*i,u=e.y*i,s=e.z;return o.e(t)?(t.longitude=a,t.latitude=u,t.height=s,t):new r.a(a,u,s)};var f=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});function l(e,t){this.start=o.u(e,0),this.stop=o.u(t,0)}function h(e,r){this.center=t.o.clone(o.u(e,t.o.ZERO)),this.radius=o.u(r,0)}var d=new t.o,m=new t.o,y=new t.o,v=new t.o,g=new t.o,q=new t.o,b=new t.o,w=new t.o,O=new t.o,R=new t.o,x=new t.o,A=new t.o,S=4/3*a.e.PI;h.fromPoints=function(e,r){if(o.e(r)||(r=new h),!o.e(e)||0===e.length)return r.center=t.o.clone(t.o.ZERO,r.center),r.radius=0,r;var n,i=t.o.clone(e[0],b),a=t.o.clone(i,d),u=t.o.clone(i,m),s=t.o.clone(i,y),c=t.o.clone(i,v),p=t.o.clone(i,g),f=t.o.clone(i,q),l=e.length;for(n=1;n<l;n++){t.o.clone(e[n],i);var S=i.x,E=i.y,_=i.z;S<a.x&&t.o.clone(i,a),S>c.x&&t.o.clone(i,c),E<u.y&&t.o.clone(i,u),E>p.y&&t.o.clone(i,p),_<s.z&&t.o.clone(i,s),_>f.z&&t.o.clone(i,f)}var C=t.o.magnitudeSquared(t.o.subtract(c,a,w)),I=t.o.magnitudeSquared(t.o.subtract(p,u,w)),T=t.o.magnitudeSquared(t.o.subtract(f,s,w)),P=a,U=c,j=C;I>j&&(j=I,P=u,U=p),T>j&&(j=T,P=s,U=f);var B=O;B.x=.5*(P.x+U.x),B.y=.5*(P.y+U.y),B.z=.5*(P.z+U.z);var k=t.o.magnitudeSquared(t.o.subtract(U,B,w)),D=Math.sqrt(k),z=R;z.x=a.x,z.y=u.y,z.z=s.z;var L=x;L.x=c.x,L.y=p.y,L.z=f.z;var K=t.o.midpoint(z,L,A),M=0;for(n=0;n<l;n++){t.o.clone(e[n],i);var F=t.o.magnitude(t.o.subtract(i,K,w));F>M&&(M=F);var N=t.o.magnitudeSquared(t.o.subtract(i,B,w));if(N>k){var H=Math.sqrt(N);k=(D=.5*(D+H))*D;var V=H-D;B.x=(D*B.x+V*i.x)/H,B.y=(D*B.y+V*i.y)/H,B.z=(D*B.z+V*i.z)/H}}return D<M?(t.o.clone(B,r.center),r.radius=D):(t.o.clone(K,r.center),r.radius=M),r};var E=new p,_=new t.o,C=new t.o,I=new r.a,T=new r.a;h.fromRectangle2D=function(e,t,r){return h.fromRectangleWithHeights2D(e,t,0,0,r)},h.fromRectangleWithHeights2D=function(e,r,n,a,u){if(o.e(u)||(u=new h),!o.e(e))return u.center=t.o.clone(t.o.ZERO,u.center),u.radius=0,u;r=o.u(r,E),i.h.southwest(e,I),I.height=n,i.h.northeast(e,T),T.height=a;var s=r.project(I,_),c=r.project(T,C),p=c.x-s.x,f=c.y-s.y,l=c.z-s.z;u.radius=.5*Math.sqrt(p*p+f*f+l*l);var d=u.center;return d.x=s.x+.5*p,d.y=s.y+.5*f,d.z=s.z+.5*l,u};var P=[];h.fromRectangle3D=function(e,r,n,a){if(r=o.u(r,i.t.WGS84),n=o.u(n,0),o.e(a)||(a=new h),!o.e(e))return a.center=t.o.clone(t.o.ZERO,a.center),a.radius=0,a;var u=i.h.subsample(e,r,n,P);return h.fromPoints(u,a)},h.fromVertices=function(e,r,i,a){if(o.e(a)||(a=new h),!o.e(e)||0===e.length)return a.center=t.o.clone(t.o.ZERO,a.center),a.radius=0,a;r=o.u(r,t.o.ZERO),i=o.u(i,3),n.o.typeOf.number.greaterThanOrEquals("stride",i,3);var u=b;u.x=e[0]+r.x,u.y=e[1]+r.y,u.z=e[2]+r.z;var s,c=t.o.clone(u,d),p=t.o.clone(u,m),f=t.o.clone(u,y),l=t.o.clone(u,v),S=t.o.clone(u,g),E=t.o.clone(u,q),_=e.length;for(s=0;s<_;s+=i){var C=e[s]+r.x,I=e[s+1]+r.y,T=e[s+2]+r.z;u.x=C,u.y=I,u.z=T,C<c.x&&t.o.clone(u,c),C>l.x&&t.o.clone(u,l),I<p.y&&t.o.clone(u,p),I>S.y&&t.o.clone(u,S),T<f.z&&t.o.clone(u,f),T>E.z&&t.o.clone(u,E)}var P=t.o.magnitudeSquared(t.o.subtract(l,c,w)),U=t.o.magnitudeSquared(t.o.subtract(S,p,w)),j=t.o.magnitudeSquared(t.o.subtract(E,f,w)),B=c,k=l,D=P;U>D&&(D=U,B=p,k=S),j>D&&(D=j,B=f,k=E);var z=O;z.x=.5*(B.x+k.x),z.y=.5*(B.y+k.y),z.z=.5*(B.z+k.z);var L=t.o.magnitudeSquared(t.o.subtract(k,z,w)),K=Math.sqrt(L),M=R;M.x=c.x,M.y=p.y,M.z=f.z;var F=x;F.x=l.x,F.y=S.y,F.z=E.z;var N=t.o.midpoint(M,F,A),H=0;for(s=0;s<_;s+=i){u.x=e[s]+r.x,u.y=e[s+1]+r.y,u.z=e[s+2]+r.z;var V=t.o.magnitude(t.o.subtract(u,N,w));V>H&&(H=V);var Y=t.o.magnitudeSquared(t.o.subtract(u,z,w));if(Y>L){var J=Math.sqrt(Y);L=(K=.5*(K+J))*K;var X=J-K;z.x=(K*z.x+X*u.x)/J,z.y=(K*z.y+X*u.y)/J,z.z=(K*z.z+X*u.z)/J}}return K<H?(t.o.clone(z,a.center),a.radius=K):(t.o.clone(N,a.center),a.radius=H),a},h.fromEncodedCartesianVertices=function(e,r,n){if(o.e(n)||(n=new h),!o.e(e)||!o.e(r)||e.length!==r.length||0===e.length)return n.center=t.o.clone(t.o.ZERO,n.center),n.radius=0,n;var i=b;i.x=e[0]+r[0],i.y=e[1]+r[1],i.z=e[2]+r[2];var a,u=t.o.clone(i,d),s=t.o.clone(i,m),c=t.o.clone(i,y),p=t.o.clone(i,v),f=t.o.clone(i,g),l=t.o.clone(i,q),S=e.length;for(a=0;a<S;a+=3){var E=e[a]+r[a],_=e[a+1]+r[a+1],C=e[a+2]+r[a+2];i.x=E,i.y=_,i.z=C,E<u.x&&t.o.clone(i,u),E>p.x&&t.o.clone(i,p),_<s.y&&t.o.clone(i,s),_>f.y&&t.o.clone(i,f),C<c.z&&t.o.clone(i,c),C>l.z&&t.o.clone(i,l)}var I=t.o.magnitudeSquared(t.o.subtract(p,u,w)),T=t.o.magnitudeSquared(t.o.subtract(f,s,w)),P=t.o.magnitudeSquared(t.o.subtract(l,c,w)),U=u,j=p,B=I;T>B&&(B=T,U=s,j=f),P>B&&(B=P,U=c,j=l);var k=O;k.x=.5*(U.x+j.x),k.y=.5*(U.y+j.y),k.z=.5*(U.z+j.z);var D=t.o.magnitudeSquared(t.o.subtract(j,k,w)),z=Math.sqrt(D),L=R;L.x=u.x,L.y=s.y,L.z=c.z;var K=x;K.x=p.x,K.y=f.y,K.z=l.z;var M=t.o.midpoint(L,K,A),F=0;for(a=0;a<S;a+=3){i.x=e[a]+r[a],i.y=e[a+1]+r[a+1],i.z=e[a+2]+r[a+2];var N=t.o.magnitude(t.o.subtract(i,M,w));N>F&&(F=N);var H=t.o.magnitudeSquared(t.o.subtract(i,k,w));if(H>D){var V=Math.sqrt(H);D=(z=.5*(z+V))*z;var Y=V-z;k.x=(z*k.x+Y*i.x)/V,k.y=(z*k.y+Y*i.y)/V,k.z=(z*k.z+Y*i.z)/V}}return z<F?(t.o.clone(k,n.center),n.radius=z):(t.o.clone(M,n.center),n.radius=F),n},h.fromCornerPoints=function(e,r,i){n.o.typeOf.object("corner",e),n.o.typeOf.object("oppositeCorner",r),o.e(i)||(i=new h);var a=t.o.midpoint(e,r,i.center);return i.radius=t.o.distance(a,r),i},h.fromEllipsoid=function(e,r){return n.o.typeOf.object("ellipsoid",e),o.e(r)||(r=new h),t.o.clone(t.o.ZERO,r.center),r.radius=e.maximumRadius,r};var U=new t.o;h.fromBoundingSpheres=function(e,r){if(o.e(r)||(r=new h),!o.e(e)||0===e.length)return r.center=t.o.clone(t.o.ZERO,r.center),r.radius=0,r;var n=e.length;if(1===n)return h.clone(e[0],r);if(2===n)return h.union(e[0],e[1],r);var i,a=[];for(i=0;i<n;i++)a.push(e[i].center);var u=(r=h.fromPoints(a,r)).center,s=r.radius;for(i=0;i<n;i++){var c=e[i];s=Math.max(s,t.o.distance(u,c.center,U)+c.radius)}return r.radius=s,r};var j=new t.o,B=new t.o,k=new t.o;h.fromOrientedBoundingBox=function(e,r){n.o.defined("orientedBoundingBox",e),o.e(r)||(r=new h);var i=e.halfAxes,a=u.p$1.getColumn(i,0,j),s=u.p$1.getColumn(i,1,B),c=u.p$1.getColumn(i,2,k);return t.o.add(a,s,a),t.o.add(a,c,a),r.center=t.o.clone(e.center,r.center),r.radius=t.o.magnitude(a),r},h.clone=function(e,r){if(o.e(e))return o.e(r)?(r.center=t.o.clone(e.center,r.center),r.radius=e.radius,r):new h(e.center,e.radius)},h.packedLength=4,h.pack=function(e,t,r){n.o.typeOf.object("value",e),n.o.defined("array",t),r=o.u(r,0);var i=e.center;return t[r++]=i.x,t[r++]=i.y,t[r++]=i.z,t[r]=e.radius,t},h.unpack=function(e,t,r){n.o.defined("array",e),t=o.u(t,0),o.e(r)||(r=new h);var i=r.center;return i.x=e[t++],i.y=e[t++],i.z=e[t++],r.radius=e[t],r};var D=new t.o,z=new t.o;h.union=function(e,r,i){n.o.typeOf.object("left",e),n.o.typeOf.object("right",r),o.e(i)||(i=new h);var a=e.center,u=e.radius,s=r.center,c=r.radius,p=t.o.subtract(s,a,D),f=t.o.magnitude(p);if(u>=f+c)return e.clone(i),i;if(c>=f+u)return r.clone(i),i;var l=.5*(u+f+c),d=t.o.multiplyByScalar(p,(-u+l)/f,z);return t.o.add(d,a,d),t.o.clone(d,i.center),i.radius=l,i};var L=new t.o;h.expand=function(e,r,o){n.o.typeOf.object("sphere",e),n.o.typeOf.object("point",r),o=h.clone(e,o);var i=t.o.magnitude(t.o.subtract(r,o.center,L));return i>o.radius&&(o.radius=i),o},h.intersectPlane=function(e,r){n.o.typeOf.object("sphere",e),n.o.typeOf.object("plane",r);var o=e.center,i=e.radius,a=r.normal,u=t.o.dot(a,o)+r.distance;return u<-i?f.OUTSIDE:u<i?f.INTERSECTING:f.INSIDE},h.transform=function(e,t,r){return n.o.typeOf.object("sphere",e),n.o.typeOf.object("transform",t),o.e(r)||(r=new h),r.center=u.p.multiplyByPoint(t,e.center,r.center),r.radius=u.p.getMaximumScale(t)*e.radius,r};var K=new t.o;h.distanceSquaredTo=function(e,r){n.o.typeOf.object("sphere",e),n.o.typeOf.object("cartesian",r);var o=t.o.subtract(e.center,r,K);return t.o.magnitudeSquared(o)-e.radius*e.radius},h.transformWithoutScale=function(e,t,r){return n.o.typeOf.object("sphere",e),n.o.typeOf.object("transform",t),o.e(r)||(r=new h),r.center=u.p.multiplyByPoint(t,e.center,r.center),r.radius=e.radius,r};var M=new t.o;h.computePlaneDistances=function(e,r,i,a){n.o.typeOf.object("sphere",e),n.o.typeOf.object("position",r),n.o.typeOf.object("direction",i),o.e(a)||(a=new l);var u=t.o.subtract(e.center,r,M),s=t.o.dot(i,u);return a.start=s-e.radius,a.stop=s+e.radius,a};for(var F=new t.o,N=new t.o,H=new t.o,V=new t.o,Y=new t.o,J=new r.a,X=new Array(8),G=0;G<8;++G)X[G]=new t.o;var Q=new p;function Z(e){if(e instanceof Z)this.scheme=e.scheme,this.authority=e.authority,this.path=e.path,this.query=e.query,this.fragment=e.fragment;else if(e){var t=W.exec(e);this.scheme=t[1],this.authority=t[2],this.path=t[3],this.query=t[4],this.fragment=t[5]}}h.projectTo2D=function(e,r,i){n.o.typeOf.object("sphere",e);var a,u=(r=o.u(r,Q)).ellipsoid,s=e.center,c=e.radius;a=t.o.equals(s,t.o.ZERO)?t.o.clone(t.o.UNIT_X,F):u.geodeticSurfaceNormal(s,F);var p=t.o.cross(t.o.UNIT_Z,a,N);t.o.normalize(p,p);var f=t.o.cross(a,p,H);t.o.normalize(f,f),t.o.multiplyByScalar(a,c,a),t.o.multiplyByScalar(f,c,f),t.o.multiplyByScalar(p,c,p);var l=t.o.negate(f,Y),d=t.o.negate(p,V),m=X,y=m[0];t.o.add(a,f,y),t.o.add(y,p,y),y=m[1],t.o.add(a,f,y),t.o.add(y,d,y),y=m[2],t.o.add(a,l,y),t.o.add(y,d,y),y=m[3],t.o.add(a,l,y),t.o.add(y,p,y),t.o.negate(a,a),y=m[4],t.o.add(a,f,y),t.o.add(y,p,y),y=m[5],t.o.add(a,f,y),t.o.add(y,d,y),y=m[6],t.o.add(a,l,y),t.o.add(y,d,y),y=m[7],t.o.add(a,l,y),t.o.add(y,p,y);for(var v=m.length,g=0;g<v;++g){var q=m[g];t.o.add(s,q,q);var b=u.cartesianToCartographic(q,J);r.project(b,q)}var w=(s=(i=h.fromPoints(m,i)).center).x,O=s.y,R=s.z;return s.x=R,s.y=w,s.z=O,i},h.isOccluded=function(e,t){return n.o.typeOf.object("sphere",e),n.o.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)},h.equals=function(e,r){return e===r||o.e(e)&&o.e(r)&&t.o.equals(e.center,r.center)&&e.radius===r.radius},h.prototype.intersectPlane=function(e){return h.intersectPlane(this,e)},h.prototype.distanceSquaredTo=function(e){return h.distanceSquaredTo(this,e)},h.prototype.computePlaneDistances=function(e,t,r){return h.computePlaneDistances(this,e,t,r)},h.prototype.isOccluded=function(e){return h.isOccluded(this,e)},h.prototype.equals=function(e){return h.equals(this,e)},h.prototype.clone=function(e){return h.clone(this,e)},h.prototype.volume=function(){var e=this.radius;return S*e*e*e},Z.prototype.scheme=null,Z.prototype.authority=null,Z.prototype.path="",Z.prototype.query=null,Z.prototype.fragment=null;var W=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");Z.prototype.getScheme=function(){return this.scheme},Z.prototype.getAuthority=function(){return this.authority},Z.prototype.getPath=function(){return this.path},Z.prototype.getQuery=function(){return this.query},Z.prototype.getFragment=function(){return this.fragment},Z.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},Z.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query},Z.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment},Z.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(te,ne).replace($,re)),this.path&&(this.path=this.path.replace($,re)),this.query&&(this.query=this.query.replace($,re)),this.fragment&&(this.fragment=this.fragment.replace($,re))};var $=/%[0-9a-z]{2}/gi,ee=/[a-zA-Z0-9\-\._~]/,te=/(.*@)?([^@:]*)(:.*)?/;function re(e){var t=unescape(e);return ee.test(t)?t:e.toUpperCase()}function ne(e,t,r,n){return(t||"")+r.toLowerCase()+(n||"")}function oe(e,t){if(null===e||"object"!=typeof e)return e;t=o.u(t,!1);var r=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];t&&(i=oe(i,t)),r[n]=i}return r}function ie(e,t,r){r=o.u(r,!1);var n,i,a,u={},s=o.e(e),c=o.e(t);if(s)for(n in e)e.hasOwnProperty(n)&&(i=e[n],c&&r&&"object"==typeof i&&t.hasOwnProperty(n)?(a=t[n],u[n]="object"==typeof a?ie(i,a,r):i):u[n]=i);if(c)for(n in t)t.hasOwnProperty(n)&&!u.hasOwnProperty(n)&&(a=t[n],u[n]=a);return u}function ae(e,t){var r;return typeof document<"u"&&(r=document),ae._implementation(e,t,r)}Z.prototype.resolve=function(e){var t=new Z;return this.scheme?(t.scheme=this.scheme,t.authority=this.authority,t.path=this.path,t.query=this.query):(t.scheme=e.scheme,this.authority?(t.authority=this.authority,t.path=this.path,t.query=this.query):(t.authority=e.authority,""==this.path?(t.path=e.path,t.query=this.query||e.query):("/"==this.path.charAt(0)?(t.path=this.path,t.removeDotSegments()):(e.authority&&""==e.path?t.path="/"+this.path:t.path=e.path.substring(0,e.path.lastIndexOf("/")+1)+this.path,t.removeDotSegments()),t.query=this.query))),t.fragment=this.fragment,t},Z.prototype.removeDotSegments=function(){var e,t=this.path.split("/"),r=[],n=""==t[0];n&&t.shift();for(""==t[0]&&t.shift();t.length;)".."==(e=t.shift())?r.pop():"."!=e&&r.push(e);("."==e||".."==e)&&r.push(""),n&&r.unshift(""),this.path=r.join("/")},Z.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e},ae._implementation=function(e,t,r){if(!o.e(e))throw new n.t("relative uri is required.");if(!o.e(t)){if(typeof r>"u")return e;t=o.u(r.baseURI,r.location.href)}var i=new Z(t);return new Z(e).resolve(i).toString()};var ue,se=/^blob:/i;function ce(e){return n.o.typeOf.string("uri",e),se.test(e)}var pe=/^data:/i;function fe(e){return n.o.typeOf.string("uri",e),pe.test(e)}var le=Object.freeze({UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5}),he=Object.freeze({TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3,PACK:4,BLOCK:5,BLOCKPACK:6});function de(e){e=o.u(e,o.u.EMPTY_OBJECT);var t=o.u(e.throttleByServer,!1),r=o.u(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=o.u(e.priority,0),this.throttle=r,this.throttleByServer=t,this.type=o.u(e.type,he.OTHER),this.serverKey=void 0,this.state=le.UNISSUED,this.deferred=void 0,this.cancelled=!1}function me(e,t,r){this.statusCode=e,this.response=t,this.responseHeaders=r,"string"==typeof this.responseHeaders&&(this.responseHeaders=function(e){var t={};if(!e)return t;for(var r=e.split("\r\n"),n=0;n<r.length;++n){var o=r[n],i=o.indexOf(": ");if(i>0){var a=o.substring(0,i),u=o.substring(i+2);t[a]=u}}return t}(this.responseHeaders))}function ye(e){n.o.typeOf.object("options",e),n.o.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function ve(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}de.prototype.cancel=function(){this.cancelled=!0},de.prototype.clone=function(e){return o.e(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new de(this)},me.prototype.toString=function(){var e="Request has failed.";return o.e(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e},Object.defineProperties(ye.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){this._maximumLength=e,this._length>e&&e>0&&(this._length=e,this._array.length=e)}},comparator:{get:function(){return this._comparator}}}),ye.prototype.reserve=function(e){e=o.u(e,this._length),this._array.length=e},ye.prototype.heapify=function(e){e=o.u(e,0);for(var t=this._length,r=this._comparator,n=this._array,i=-1,a=!0;a;){var u=2*(e+1),s=u-1;i=s<t&&r(n[s],n[e])<0?s:e,u<t&&r(n[u],n[i])<0&&(i=u),i!==e?(ve(n,i,e),e=i):a=!1}},ye.prototype.resort=function(){for(var e=this._length,t=Math.ceil(e/2);t>=0;--t)this.heapify(t)},ye.prototype.insert=function(e){n.o.defined("element",e);var t,r=this._array,i=this._comparator,a=this._maximumLength,u=this._length++;for(u<r.length?r[u]=e:r.push(e);0!==u;){var s=Math.floor((u-1)/2);if(!(i(r[u],r[s])<0))break;ve(r,u,s),u=s}return o.e(a)&&this._length>a&&(t=r[a],r.pop(),this._length=a),t},ye.prototype.pop=function(e){if(e=o.u(e,0),0!==this._length){n.o.typeOf.number.lessThan("index",e,this._length);var t=this._array,r=t[e];return ve(t,e,--this._length),t[this._length]=void 0,this.heapify(e),r}};var ge=typeof performance<"u"&&"function"==typeof performance.now&&isFinite(performance.now())?function(){return performance.now()}:function(){return Date.now()};function qe(e,t){return e.priority-t.priority}var be={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0,totalRequestTime:0},we=20,Oe=new ye({comparator:qe});Oe.maximumLength=we,Oe.reserve(we);var Re=[],xe={},Ae=typeof document<"u"?new Z(document.location.href):new Z,Se=new s.o;function Ee(){}function _e(e){o.e(e.priorityFunction)&&(e.priority=e.priorityFunction())}function Ce(e){var t=o.u(Ee.requestsByServer[e],Ee.maximumRequestsPerServer);return xe[e]<t}function Ie(e){return o.e(e.packKey)||(e.packKey=e.serverKey+"_"+e.providerName),e.packKey}function Te(e){return o.e(e.blockKey)||(e.blockKey=e.serverKey+"_"+e.providerName+"_"+e.quadKey+e.url.substring(e.url.indexOf("dataVersion"))),e.blockKey}function Pe(e){var t=Ie(e);return o.e(Ee.packRequestGroup[t])||(Ee.packRequestGroup[t]=[]),o.e(Ee.packRequestQuadKey[t])||(Ee.packRequestQuadKey[t]=""),o.e(Ee.packRequestPromise[t])||(Ee.packRequestPromise[t]=o.o.defer()),o.e(Ee.quadKeyIndex[t])||(Ee.quadKeyIndex[t]=0),e.quadKeyIndex=Ee.quadKeyIndex[t]++,e.deferred=Ee.packRequestPromise[t],e.state=le.ISSUED,Ee.packRequestGroup[t].push(e),e.deferred.promise}function Ue(e){for(var t=0,r=e.length;t<r;t++){e[t].state=le.CANCELLED}}function je(e){for(var t=[],r={},n=0,o=e.length;n<o;n++){var i=e[n];if(!i.cancelled){var a=i.quadKey;r[a]||(r[a]=!0,t.push(a))}}return t}function Be(){var e=Ee.packRequestGroup;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];if(r.length<1)continue;var n=r[0].clone(),i=-1!==n.url.indexOf("rest/maps");n.serverKey=r[0].serverKey,n.state=r[0].state;var a=n.url,u=je(r);if(u.length<1)continue;Ee.packRequestQuadKey[t]=i?u.join(","):u.join(";");var s=Ee.packRequestQuadKey[t];if(n.throttleByServer&&!Ce(n.serverKey)){Ue(r),Ee.packRequestPromise[t].reject();continue}n.deferred=Ee.packRequestPromise[t];var c=new Z(a);c.query=i?o.e(c.query)?c.query+"&tiles="+s:"tiles="+s:o.e(c.query)?c.query+"&extratiles="+s:"extratiles="+s,n.url=c.toString(),ze(n,n.url)}Ee.packRequestGroup={},Ee.packRequestPromise={},Ee.packRequestQuadKey={},Ee.quadKeyIndex={}}function ke(){var e=Ee.blockRequest;for(var t in e)if(e.hasOwnProperty(t)){ze(e[t])}Ee.blockRequest={}}function De(e){if(e.state===le.UNISSUED)if(e.state=le.ISSUED,e.type===he.PACK||e.type===he.BLOCKPACK){var t=Ie(e);o.e(Ee.packRequestPromise[t])||(Ee.packRequestPromise[t]=o.o.defer()),e.deferred=Ee.packRequestPromise[t]}else e.deferred=o.o.defer();return e.deferred.promise}function ze(e,t){var r=De(e);return e.state=le.ACTIVE,Re.push(e),++be.numberOfActiveRequests,++be.numberOfActiveRequestsEver,++xe[e.serverKey],e.startTime=ge(),e.requestFunction(t).then(function(e){return function(t){if(e.state!==le.CANCELLED&&(--be.numberOfActiveRequests,--xe[e.serverKey],Se.raiseEvent(),e.state=le.RECEIVED,e.deferred.resolve(t),e.endTime=ge(),(Ee.statisticRequestTime>0||e.type!==he.OTHER)&&(be.totalRequestTime+=e.endTime-e.startTime),e.type===he.BLOCK||e.type===he.BLOCKPACK)){var r=Te(e);o.e(Ee.blockDefer[r])&&(Ee.blockDefer[r]=void 0,delete Ee.blockDefer[r])}}}(e)).otherwise(function(e){return function(t){e.state!==le.CANCELLED&&(++be.numberOfFailedRequests,--be.numberOfActiveRequests,--xe[e.serverKey],Se.raiseEvent(t),e.state=le.FAILED,e.deferred.reject(t))}}(e)),r}function Le(e){var t=e.state===le.ACTIVE;e.state=le.CANCELLED,++be.numberOfCancelledRequests,e.deferred.reject(),t&&(--be.numberOfActiveRequests,--xe[e.serverKey],++be.numberOfCancelledActiveRequests),o.e(e.cancelFunction)&&e.cancelFunction()}Ee.TIMEOUT=5e3,Ee.CANCLE_COUNT=3,Ee.statisticRequestTime=-1,Ee.maximumRequests=50,Ee.maximumRequestsPerServer=6,Ee.perPacketCount=20,Ee.requestsByServer={},Ee.throttleRequests=!0,Ee.debugShowStatistics=!1,Ee.requestCompletedEvent=Se,Object.defineProperties(Ee,{activeRequestLength:{get:function(){return Re.length}},statistics:{get:function(){return be}},priorityHeapLength:{get:function(){return we},set:function(e){if(e<we)for(;Oe.length>e;){Le(Oe.pop())}we=e,Oe.maximumLength=e,Oe.reserve(e)}}}),Ee.packRequestGroup={},Ee.packRequestPromise={},Ee.packRequestQuadKey={},Ee.quadKeyIndex={},Ee.packRequestHeap={},Ee.blockDefer={},Ee.blockRequest={},Ee.update=function(){var e,t,r=0,n=Re.length;for(e=0;e<n;++e)(t=Re[e]).cancelled&&Le(t),t.state===le.ACTIVE?r>0&&(Re[e-r]=t):++r;Re.length-=r;var o=Oe.internalArray,i=Oe.length;for(e=0;e<i;++e)_e(o[e]);Oe.resort(),function(){for(var e in Ee.packRequestHeap)if(Ee.packRequestHeap.hasOwnProperty(e)){for(var t=Ee.packRequestHeap[e],r=t.internalArray,n=t.length,o=0;o<n;++o)_e(r[o]);t.resort()}}(),ke(),function(){for(var e in Ee.packRequestHeap)if(Ee.packRequestHeap.hasOwnProperty(e))for(var t=Ee.packRequestHeap[e];t.length>0;){var r=t.pop();r.cancelled?Le(r):Pe(r)}Be()}();for(var a=Math.max(Ee.maximumRequests-Re.length,0),u=0;u<a&&Oe.length>0;)(t=Oe.pop()).cancelled?Le(t):!t.throttleByServer||Ce(t.serverKey)?(ze(t),++u):Le(t);!Ee.debugShowStatistics||(0===be.numberOfActiveRequests&&be.lastNumberOfActiveRequests>0&&(be.numberOfAttemptedRequests>0&&(console.log("Number of attempted requests: "+be.numberOfAttemptedRequests),be.numberOfAttemptedRequests=0),be.numberOfCancelledRequests>0&&(console.log("Number of cancelled requests: "+be.numberOfCancelledRequests),be.numberOfCancelledRequests=0),be.numberOfCancelledActiveRequests>0&&(console.log("Number of cancelled active requests: "+be.numberOfCancelledActiveRequests),be.numberOfCancelledActiveRequests=0),be.numberOfFailedRequests>0&&(console.log("Number of failed requests: "+be.numberOfFailedRequests),be.numberOfFailedRequests=0)),be.lastNumberOfActiveRequests=be.numberOfActiveRequests)},Ee.getServerKey=function(e){n.o.typeOf.string("url",e);var t=new Z(e).resolve(Ae);t.normalize();var r=t.authority;/:/.test(r)||(r=r+":"+("https"===t.scheme?"443":"80"));var i=xe[r];return o.e(i)||(xe[r]=0),r},Ee.request=function(e){if(n.o.typeOf.object("request",e),n.o.typeOf.string("request.url",e.url),n.o.typeOf.func("request.requestFunction",e.requestFunction),fe(e.url)||ce(e.url))return Se.raiseEvent(),e.state=le.RECEIVED,e.requestFunction();if(++be.numberOfAttemptedRequests,o.e(e.serverKey)||(e.serverKey=Ee.getServerKey(e.url)),e.type===he.BLOCK)return function(e){var t=Te(e),r=Ee.blockDefer[t];return o.e(r)||(r=Ee.blockDefer[t]=o.o.defer(),Ee.blockRequest[t]=e),e.deferred=r,e.state=le.ISSUED,e.deferred.promise}(e);if(!e.throttleByServer||Ce(e.serverKey)){if(!Ee.throttleRequests||!e.throttle)return ze(e);if(!(Re.length>=Ee.maximumRequests)){var t;if(_e(e),e.type===he.PACK||e.type===he.BLOCKPACK){var r=function(e){var t=Ie(e),r=Ee.packRequestHeap[t];return o.e(r)||((r=Ee.packRequestHeap[t]=new ye({comparator:qe})).maximumLength=Ee.perPacketCount,r.reserve(we)),r}(e),i=!0;if(e.type===he.BLOCKPACK)for(var a=0;a<r.length;a++)if(r._array[a].quadKey===e.quadKey){e.blockRequest=r._array[a],i=!1;break}i&&(t=r.insert(e))}else t=Oe.insert(e);if(o.e(t)){if(t===e)return;Le(t)}return De(e)}}},Ee.clearForSpecs=function(){for(;Oe.length>0;){Le(Oe.pop())}for(var e=Re.length,t=0;t<e;++t)Le(Re[t]);Re.length=0,xe={},be.numberOfAttemptedRequests=0,be.numberOfActiveRequests=0,be.numberOfCancelledRequests=0,be.numberOfCancelledActiveRequests=0,be.numberOfFailedRequests=0,be.numberOfActiveRequestsEver=0,be.lastNumberOfActiveRequests=0,be.totalRequestTime=0},Ee.numberOfActiveRequestsByServer=function(e){return xe[e]},Ee.requestHeap=Oe;var Ke={},Me={};Ke.add=function(e,t){if(!o.e(e))throw new n.t("host is required.");if(!o.e(t)||t<=0)throw new n.t("port is required to be greater than 0.");var r=e.toLowerCase()+":"+t;o.e(Me[r])||(Me[r]=!0)},Ke.remove=function(e,t){if(!o.e(e))throw new n.t("host is required.");if(!o.e(t)||t<=0)throw new n.t("port is required to be greater than 0.");var r=e.toLowerCase()+":"+t;o.e(Me[r])&&delete Me[r]},Ke.contains=function(e){if(!o.e(e))throw new n.t("url is required.");var t=function(e){var t=new Z(e);t.normalize();var r=t.getAuthority();if(o.e(r)){if(-1!==r.indexOf("@")){var n=r.split("@");r=n[1]}if(-1===r.indexOf(":")){var i=t.getScheme();if(o.e(i)||(i=(i=window.location.protocol).substring(0,i.length-1)),"http"===i)r+=":80";else{if("https"!==i)return;r+=":443"}}return r}}(e);return!(!o.e(t)||!o.e(Me[t]))},Ke.clear=function(){Me={}};var Fe={};function Ne(e,t){if(!o.e(e))throw new n.t("identifier is required.");o.e(Fe[e])||(Fe[e]=!0,console.warn(o.u(t,e)))}Ne.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",Ne.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",Ne.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",Ne.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var He,Ve=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch{return!1}}();function Ye(e,t,r,i){var a,u=e.query;if(!o.e(u)||0===u.length)return{};if(-1===u.indexOf("=")){var s={};s[u]=void 0,a=s}else a=function(e){if(!o.e(e))throw new n.t("queryString is required.");var t={};if(""===e)return t;for(var r=e.replace(/\+/g,"%20").split(/[&;]/),i=0,a=r.length;i<a;++i){var u=r[i].split("=");if(u.length>2){var s=r[i].indexOf("=");u=[r[i].substring(0,s),r[i].substring(s+1,r[i].length)]}var c=decodeURIComponent(u[0]),p=u[1];p=o.e(p)?decodeURIComponent(p):"";var f=t[c];"string"==typeof f?t[c]=[f,p]:Array.isArray(f)?f.push(p):t[c]=p}return t}(u);t._queryParameters=r?Qe(a,t._queryParameters,i):a,e.query=void 0}function Je(e,t){var r=t._queryParameters,i=Object.keys(r);1!==i.length||o.e(r[i[0]])?e.query=function(e,t){if(!o.e(e))throw new n.t("obj is required.");var r="";for(var i in e)if(e.hasOwnProperty(i)){var a=e[i],u=encodeURIComponent(i)+"=";if(Array.isArray(a))for(var s=0,c=a.length;s<c;++s)r+=!0===t?u+encodeURI(a[s])+"&":u+encodeURIComponent(a[s])+"&";else r+=!0===t?u+encodeURI(a)+"&":u+encodeURIComponent(a)+"&"}return r.slice(0,-1)}(r):e.query=i[0]}function Xe(e,t){return o.e(e)?o.e(e.clone)?e.clone():oe(e):t}function Ge(e){if(e.state===le.ISSUED||e.state===le.ACTIVE)throw new c.t("The Resource is already being fetched.");e.state=le.UNISSUED,e.deferred=void 0}function Qe(e,t,r){if(!r)return ie(e,t);var n=oe(e,!0);for(var i in t)if(t.hasOwnProperty(i)){var a=n[i],u=t[i];o.e(a)?(Array.isArray(a)||(a=n[i]=[a]),n[i]=a.concat(u)):n[i]=Array.isArray(u)?u.slice():u}return n}function Ze(e){"string"==typeof(e=o.u(e,o.u.EMPTY_OBJECT))&&(e={url:e}),n.o.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=Xe(e.templateValues,{}),this._queryParameters=Xe(e.queryParameters,{}),this.headers=Xe(e.headers,{}),this.request=o.u(e.request,new de),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=o.u(e.retryAttempts,0),this._retryCount=0;var t=new Z(e.url);Ye(t,this,!0,!0),t.fragment=void 0,this._url=t.toString()}function We(e){var t=e.resource,r=e.flipY,n=e.preferImageBitmap,i=t.request;i.url=t.url,i.requestFunction=function(){var e=!1;!t.isDataUri&&!t.isBlobUri&&(e=t.isCrossOriginUrl);var a=o.o.defer();return Ze._Implementations.createImage(i,e,a,r,n),a.promise};var a=Ee.request(i);if(o.e(a))return a.otherwise((function(e){return i.state!==le.FAILED?o.o.reject(e):t.retryOnError(e).then((function(a){return a?(i.state=le.UNISSUED,i.deferred=void 0,We({resource:t,flipY:r,preferImageBitmap:n})):o.o.reject(e)}))}))}function $e(e,t,r){var n={};n[t]=r,e.setQueryParameters(n);var i=e.request;i.url=e.url,i.requestFunction=function(){var t=o.o.defer();return window[r]=function(e){t.resolve(e);try{delete window[r]}catch{window[r]=void 0}},Ze._Implementations.loadAndExecuteScript(e.url,r,t),t.promise};var a=Ee.request(i);if(o.e(a))return a.otherwise((function(n){return i.state!==le.FAILED?o.o.reject(n):e.retryOnError(n).then((function(a){return a?(i.state=le.UNISSUED,i.deferred=void 0,$e(e,t,r)):o.o.reject(n)}))}))}Ze.createIfNeeded=function(e){return e instanceof Ze?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new Ze({url:e})},Ze.supportsImageBitmapOptions=function(){if(o.e(He))return He;if("function"!=typeof createImageBitmap)return He=o.o.resolve(!1);return He=Ze.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then((function(e){return createImageBitmap(e,{imageOrientation:"flipY",premultiplyAlpha:"none"})})).then((function(e){return!0})).otherwise((function(){return!1})),He},Object.defineProperties(Ze,{isBlobSupported:{get:function(){return Ve}}}),Object.defineProperties(Ze.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){var t=new Z(e);Ye(t,this,!1),t.fragment=void 0,this._url=t.toString()}},extension:{get:function(){return function(e){if(!o.e(e))throw new n.t("uri is required.");var t=new Z(e);t.normalize();var r=t.path,i=r.lastIndexOf("/");return-1!==i&&(r=r.substr(i+1)),i=r.lastIndexOf("."),-1===i?"":r.substr(i+1)}(this._url)}},isDataUri:{get:function(){return fe(this._url)}},isBlobUri:{get:function(){return ce(this._url)}},isCrossOriginUrl:{get:function(){return function(e){o.e(ue)||(ue=document.createElement("a")),ue.href=window.location.href;var t=ue.host,r=ue.protocol;return ue.href=e,ue.href=ue.href,r!==ue.protocol||t!==ue.host}(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}}),Ze.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;var r=new Z(this._url);e&&Je(r,this);var n=r.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),i=this._templateValues;return n=n.replace(/{(.*?)}/g,(function(e,t){var r=i[t];return o.e(r)?encodeURIComponent(r):e})),t&&o.e(this.proxy)&&(n=this.proxy.getURL(n)),n},Ze.prototype.setQueryParameters=function(e,t){this._queryParameters=t?Qe(this._queryParameters,e,!1):Qe(e,this._queryParameters,!1)},Ze.prototype.appendQueryParameters=function(e){this._queryParameters=Qe(e,this._queryParameters,!0)},Ze.prototype.setTemplateValues=function(e,t){this._templateValues=t?ie(this._templateValues,e):ie(e,this._templateValues)},Ze.prototype.getDerivedResource=function(e){var t=this.clone();if(t._retryCount=0,o.e(e.url)){var r=new Z(e.url);Ye(r,t,!0,o.u(e.preserveQueryParameters,!1)),r.fragment=void 0,t._url=r.resolve(new Z(ae(this._url))).toString()}return o.e(e.queryParameters)&&(t._queryParameters=ie(e.queryParameters,t._queryParameters)),o.e(e.templateValues)&&(t._templateValues=ie(e.templateValues,t.templateValues)),o.e(e.headers)&&(t.headers=ie(e.headers,t.headers)),o.e(e.proxy)&&(t.proxy=e.proxy),o.e(e.request)&&(t.request=e.request),o.e(e.retryCallback)&&(t.retryCallback=e.retryCallback),o.e(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},Ze.prototype.retryOnError=function(e){var t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return o.o(!1);var r=this;return o.o(t(this,e)).then((function(e){return++r._retryCount,e}))},Ze.prototype.clone=function(e){return o.e(e)||(e=new Ze({url:this._url})),e._url=this._url,e._queryParameters=oe(this._queryParameters),e._templateValues=oe(this._templateValues),e.headers=oe(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},Ze.prototype.getBaseUri=function(e){return function(e,t){if(!o.e(e))throw new n.t("uri is required.");var r="",i=e.lastIndexOf("/");return-1!==i&&(r=e.substring(0,i+1)),t&&(e=new Z(e),o.e(e.query)&&(r+="?"+e.query),o.e(e.fragment)&&(r+="#"+e.fragment)),r}(this.getUrlComponent(e),e)},Ze.prototype.appendForwardSlash=function(){this._url=function(e){return(0===e.length||"/"!==e[e.length-1])&&(e+="/"),e}(this._url)},Ze.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},Ze.fetchArrayBuffer=function(e){return new Ze(e).fetchArrayBuffer()},Ze.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},Ze.fetchBlob=function(e){return new Ze(e).fetchBlob()},Ze.prototype.fetchImage=function(e){e=o.u(e,o.u.EMPTY_OBJECT);var t=o.u(e.preferImageBitmap,!1),r=o.u(e.preferBlob,!1),n=o.u(e.flipY,!1);if(Ge(this.request),!Ve||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!r)return We({resource:this,flipY:n,preferImageBitmap:t});var i,a,u,s=this.fetchBlob();return o.e(s)?Ze.supportsImageBitmapOptions().then((function(e){return i=e&&t,s})).then((function(e){if(o.e(e)){if(u=e,i)return Ze.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});var t=window.URL.createObjectURL(e);return We({resource:a=new Ze({url:t}),flipY:n,preferImageBitmap:!1})}})).then((function(e){if(o.e(e))return e.blob=u,i||window.URL.revokeObjectURL(a.url),e})).otherwise((function(e){return o.e(a)&&window.URL.revokeObjectURL(a.url),e.blob=u,o.o.reject(e)})):void 0},Ze.fetchImage=function(e){return new Ze(e).fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},Ze.prototype.fetchText=function(){return this.fetch({responseType:"text"})},Ze.fetchText=function(e){return new Ze(e).fetchText()},Ze.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(o.e(e))return e.then((function(e){if(o.e(e))return JSON.parse(e)}))},Ze.fetchJson=function(e){return new Ze(e).fetchJson()},Ze.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},Ze.fetchXML=function(e){return new Ze(e).fetchXML()},Ze.prototype.fetchJsonp=function(e){var t;e=o.u(e,"callback"),Ge(this.request);do{t="loadJsonp"+Math.random().toString().substring(2,8)}while(o.e(window[t]));return $e(this,e,t)},Ze.fetchJsonp=function(e){return new Ze(e).fetchJsonp(e.callbackParameterName)},Ze.prototype._makeRequest=function(e){var t=this;Ge(t.request);var r=t.request;r.url=t.url,r.requestFunction=function(n){var i=e.responseType,a=ie(e.headers,t.headers),u=e.overrideMimeType,s=e.method,c=e.data,p=o.o.defer(),f=o.e(n)?n:t.url,l=Ze._Implementations.loadWithXhr(f,i,s,c,a,p,u);return o.e(l)&&o.e(l.abort)&&(r.cancelFunction=function(){l.abort()}),p.promise};var n=Ee.request(r);if(o.e(n))return n.then((function(e){return e})).otherwise((function(n){return r.state!==le.FAILED?o.o.reject(n):t.retryOnError(n).then((function(i){return i?(r.state=le.UNISSUED,r.deferred=void 0,t.fetch(e)):o.o.reject(n)}))}))};var et=/^data:(.*?)(;base64)?,(.*)$/;function tt(e,t){var r=decodeURIComponent(t);return e?atob(r):r}function rt(e,t){for(var r=tt(e,t),n=new ArrayBuffer(r.length),o=new Uint8Array(n),i=0;i<r.length;i++)o[i]=r.charCodeAt(i);return n}function nt(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}Ze.prototype.fetch=function(e){return(e=Xe(e,{})).method="GET",this._makeRequest(e)},Ze.fetch=function(e){return new Ze(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Ze.prototype.delete=function(e){return(e=Xe(e,{})).method="DELETE",this._makeRequest(e)},Ze.delete=function(e){return new Ze(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},Ze.prototype.head=function(e){return(e=Xe(e,{})).method="HEAD",this._makeRequest(e)},Ze.head=function(e){return new Ze(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Ze.prototype.options=function(e){return(e=Xe(e,{})).method="OPTIONS",this._makeRequest(e)},Ze.options=function(e){return new Ze(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Ze.prototype.post=function(e,t){return n.o.defined("data",e),(t=Xe(t,{})).method="POST",t.data=e,this._makeRequest(t)},Ze.post=function(e){return new Ze(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Ze.prototype.put=function(e,t){return n.o.defined("data",e),(t=Xe(t,{})).method="PUT",t.data=e,this._makeRequest(t)},Ze.put=function(e){return new Ze(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Ze.prototype.patch=function(e,t){return n.o.defined("data",e),(t=Xe(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},Ze.patch=function(e){return new Ze(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Ze._Implementations={},Ze._Implementations.createImage=function(e,t,r,n,i){var a=e.url;Ze.supportsImageBitmapOptions().then((function(u){if(u&&i){var s=o.o.defer(),p=Ze._Implementations.loadWithXhr(a,"blob","GET",void 0,void 0,s,void 0,void 0,void 0);return o.e(p)&&o.e(p.abort)&&(e.cancelFunction=function(){p.abort()}),s.promise.then((function(e){if(o.e(e))return Ze.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});r.reject(new c.t("Successfully retrieved "+a+" but it contained no content."))})).then(r.resolve)}!function(e,t,r){var n=new Image;n.onload=function(){r.resolve(n)},n.onerror=function(e){r.reject(e)},t&&(Ke.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e}(a,t,r)})).otherwise(r.reject)},Ze.createImageBitmapFromBlob=function(e,t){return n.o.defined("options",t),n.o.typeOf.bool("options.flipY",t.flipY),n.o.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none"})};var ot=typeof XMLHttpRequest>"u";Ze._Implementations.loadWithXhr=function(e,t,r,i,a,u,s){var p=et.exec(e);if(null===p){if(!ot){var f=new XMLHttpRequest;if(Ke.contains(e)&&(f.withCredentials=!0),e=e.replace(/{/g,"%7B").replace(/}/g,"%7D"),f.open(r,e,!0),o.e(s)&&o.e(f.overrideMimeType)&&f.overrideMimeType(s),o.e(a))for(var l in a)a.hasOwnProperty(l)&&f.setRequestHeader(l,a[l]);o.e(t)&&(f.responseType=t);var h=!1;return"string"==typeof e&&(h=0===e.indexOf("file://")||typeof window<"u"&&"file://"===window.location.origin),f.onload=function(){if(!(f.status<200||f.status>=300)||h&&0===f.status){var e=f.response,n=f.responseType;if("HEAD"===r||"OPTIONS"===r){var i=f.getAllResponseHeaders().trim().split(/[\r\n]+/),a={};return i.forEach((function(e){var t=e.split(": "),r=t.shift();a[r]=t.join(": ")})),void u.resolve(a)}if(204===f.status)u.resolve();else if(!o.e(e)||o.e(t)&&n!==t)if("json"===t&&"string"==typeof e)try{u.resolve(JSON.parse(e))}catch(e){u.reject(e)}else(""===n||"document"===n)&&o.e(f.responseXML)&&f.responseXML.hasChildNodes()?u.resolve(f.responseXML):""!==n&&"text"!==n||!o.e(f.responseText)?u.reject(new c.t("Invalid XMLHttpRequest response type.")):u.resolve(f.responseText);else u.resolve(e)}else u.reject(new me(f.status,f.response,f.getAllResponseHeaders()))},f.onerror=function(e){u.reject(new me)},f.send(i),f}!function(e,t,r,n,o,i,a){var u=require("url").parse(e),s="https:"===u.protocol?require("https"):require("http"),p=require("zlib"),f={protocol:u.protocol,hostname:u.hostname,port:u.port,path:u.path,query:u.query,method:r,headers:o};s.request(f).on("response",(function(e){if(e.statusCode<200||e.statusCode>=300)i.reject(new me(e.statusCode,e,e.headers));else{var r=[];e.on("data",(function(e){r.push(e)})),e.on("end",(function(){var n=Buffer.concat(r);"gzip"===e.headers["content-encoding"]?p.gunzip(n,(function(e,r){e?i.reject(new c.t("Error decompressing response.")):i.resolve(nt(r,t))})):i.resolve(nt(n,t))}))}})).on("error",(function(e){i.reject(new me)})).end()}(e,t,r,0,a,u)}else u.resolve(function(e,t){t=o.u(t,"");var r=e[1],i=!!e[2],a=e[3];switch(t){case"":case"text":return tt(i,a);case"arraybuffer":return rt(i,a);case"blob":var u=rt(i,a);return new Blob([u],{type:r});case"document":return(new DOMParser).parseFromString(tt(i,a),r);case"json":return JSON.parse(tt(i,a));default:throw new n.t("Unhandled responseType: "+t)}}(p,t))},Ze._Implementations.loadAndExecuteScript=function(e,t,r){return function(e){var t=o.o.defer(),r=document.createElement("script");r.async=!0,r.src=e;var n=document.getElementsByTagName("head")[0];return r.onload=function(){r.onload=void 0,n.removeChild(r),t.resolve()},r.onerror=function(e){t.reject(e)},n.appendChild(r),t.promise}(e).otherwise(r.reject)},Ze._DefaultImplementations={},Ze._DefaultImplementations.createImage=Ze._Implementations.createImage,Ze._DefaultImplementations.loadWithXhr=Ze._Implementations.loadWithXhr,Ze._DefaultImplementations.loadAndExecuteScript=Ze._Implementations.loadAndExecuteScript,Ze.DEFAULT=Object.freeze(new Ze({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var it,at,ut,st=/((?:.*\/)|^)SuperMap3D\.js$/;function ct(e){return typeof document>"u"?e:(o.e(it)||(it=document.createElement("a")),it.href=e,it.href=it.href,it.href)}function pt(){if(o.e(at))return at;var e;if(e=typeof CESIUM_BASE_URL<"u"?CESIUM_BASE_URL:"object"==typeof define&&o.e(define.amd)&&!define.amd.toUrlUndefined&&o.e(require.toUrl)?ae("..",ht("Core/buildModuleUrl.js")):function(){for(var e=document.getElementsByTagName("script"),t=0,r=e.length;t<r;++t){var n=e[t].getAttribute("src"),o=st.exec(n);if(null!==o)return o[1]}}(),!o.e(e))throw new n.t("Unable to determine SuperMap3D base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return(at=new Ze({url:ct(e)})).appendForwardSlash(),at}function ft(e){return ct(require.toUrl("../"+e))}function lt(e){return pt().getDerivedResource({url:e}).url}function ht(e){return o.e(ut)||(ut="object"==typeof define&&o.e(define.amd)&&!define.amd.toUrlUndefined&&o.e(require.toUrl)?ft:lt),ut(e)}ht._cesiumScriptRegex=st,ht._buildModuleUrlFromBaseUrl=lt,ht._clearBaseResource=function(){at=void 0},ht.setBaseUrl=function(e){at=Ze.DEFAULT.getDerivedResource({url:e})},ht.getCesiumBaseUrl=pt,e.S=f,e.e=Ne,e.i=h,e.n=p,e.n$1=ht,e.o=l,e.t=Ze})); +define(["exports","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./when-92c6cf3c","./Cartesian2-b72655a5","./Math-ecf82623","./FeatureDetection-fd297af4","./Event-3390cd7d","./RuntimeError-c6a62a80"],(function(e,t,r,n,o,i,a,u,s,c){"use strict";function p(e){this._ellipsoid=o.u(e,i.t.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(p.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),p.prototype.project=function(e,r){var n=this._semimajorAxis,i=e.longitude*n,a=e.latitude*n,u=e.height;return o.e(r)?(r.x=i,r.y=a,r.z=u,r):new t.o(i,a,u)},p.prototype.unproject=function(e,t){if(!o.e(e))throw new n.t("cartesian is required");var i=this._oneOverSemimajorAxis,a=e.x*i,u=e.y*i,s=e.z;return o.e(t)?(t.longitude=a,t.latitude=u,t.height=s,t):new r.a(a,u,s)};var f=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});function l(e,t){this.start=o.u(e,0),this.stop=o.u(t,0)}function h(e,r){this.center=t.o.clone(o.u(e,t.o.ZERO)),this.radius=o.u(r,0)}var d=new t.o,m=new t.o,y=new t.o,v=new t.o,g=new t.o,q=new t.o,b=new t.o,w=new t.o,O=new t.o,R=new t.o,x=new t.o,A=new t.o,S=4/3*a.e.PI;h.fromPoints=function(e,r){if(o.e(r)||(r=new h),!o.e(e)||0===e.length)return r.center=t.o.clone(t.o.ZERO,r.center),r.radius=0,r;var n,i=t.o.clone(e[0],b),a=t.o.clone(i,d),u=t.o.clone(i,m),s=t.o.clone(i,y),c=t.o.clone(i,v),p=t.o.clone(i,g),f=t.o.clone(i,q),l=e.length;for(n=1;n<l;n++){t.o.clone(e[n],i);var S=i.x,E=i.y,_=i.z;S<a.x&&t.o.clone(i,a),S>c.x&&t.o.clone(i,c),E<u.y&&t.o.clone(i,u),E>p.y&&t.o.clone(i,p),_<s.z&&t.o.clone(i,s),_>f.z&&t.o.clone(i,f)}var C=t.o.magnitudeSquared(t.o.subtract(c,a,w)),I=t.o.magnitudeSquared(t.o.subtract(p,u,w)),T=t.o.magnitudeSquared(t.o.subtract(f,s,w)),P=a,j=c,B=C;I>B&&(B=I,P=u,j=p),T>B&&(B=T,P=s,j=f);var U=O;U.x=.5*(P.x+j.x),U.y=.5*(P.y+j.y),U.z=.5*(P.z+j.z);var k=t.o.magnitudeSquared(t.o.subtract(j,U,w)),D=Math.sqrt(k),z=R;z.x=a.x,z.y=u.y,z.z=s.z;var L=x;L.x=c.x,L.y=p.y,L.z=f.z;var K=t.o.midpoint(z,L,A),M=0;for(n=0;n<l;n++){t.o.clone(e[n],i);var F=t.o.magnitude(t.o.subtract(i,K,w));F>M&&(M=F);var N=t.o.magnitudeSquared(t.o.subtract(i,U,w));if(N>k){var H=Math.sqrt(N);k=(D=.5*(D+H))*D;var V=H-D;U.x=(D*U.x+V*i.x)/H,U.y=(D*U.y+V*i.y)/H,U.z=(D*U.z+V*i.z)/H}}return D<M?(t.o.clone(U,r.center),r.radius=D):(t.o.clone(K,r.center),r.radius=M),r};var E=new p,_=new t.o,C=new t.o,I=new r.a,T=new r.a;h.fromRectangle2D=function(e,t,r){return h.fromRectangleWithHeights2D(e,t,0,0,r)},h.fromRectangleWithHeights2D=function(e,r,n,a,u){if(o.e(u)||(u=new h),!o.e(e))return u.center=t.o.clone(t.o.ZERO,u.center),u.radius=0,u;r=o.u(r,E),i.h.southwest(e,I),I.height=n,i.h.northeast(e,T),T.height=a;var s=r.project(I,_),c=r.project(T,C),p=c.x-s.x,f=c.y-s.y,l=c.z-s.z;u.radius=.5*Math.sqrt(p*p+f*f+l*l);var d=u.center;return d.x=s.x+.5*p,d.y=s.y+.5*f,d.z=s.z+.5*l,u};var P=[];h.fromRectangle3D=function(e,r,n,a){if(r=o.u(r,i.t.WGS84),n=o.u(n,0),o.e(a)||(a=new h),!o.e(e))return a.center=t.o.clone(t.o.ZERO,a.center),a.radius=0,a;var u=i.h.subsample(e,r,n,P);return h.fromPoints(u,a)},h.fromVertices=function(e,r,i,a){if(o.e(a)||(a=new h),!o.e(e)||0===e.length)return a.center=t.o.clone(t.o.ZERO,a.center),a.radius=0,a;r=o.u(r,t.o.ZERO),i=o.u(i,3),n.o.typeOf.number.greaterThanOrEquals("stride",i,3);var u=b;u.x=e[0]+r.x,u.y=e[1]+r.y,u.z=e[2]+r.z;var s,c=t.o.clone(u,d),p=t.o.clone(u,m),f=t.o.clone(u,y),l=t.o.clone(u,v),S=t.o.clone(u,g),E=t.o.clone(u,q),_=e.length;for(s=0;s<_;s+=i){var C=e[s]+r.x,I=e[s+1]+r.y,T=e[s+2]+r.z;u.x=C,u.y=I,u.z=T,C<c.x&&t.o.clone(u,c),C>l.x&&t.o.clone(u,l),I<p.y&&t.o.clone(u,p),I>S.y&&t.o.clone(u,S),T<f.z&&t.o.clone(u,f),T>E.z&&t.o.clone(u,E)}var P=t.o.magnitudeSquared(t.o.subtract(l,c,w)),j=t.o.magnitudeSquared(t.o.subtract(S,p,w)),B=t.o.magnitudeSquared(t.o.subtract(E,f,w)),U=c,k=l,D=P;j>D&&(D=j,U=p,k=S),B>D&&(D=B,U=f,k=E);var z=O;z.x=.5*(U.x+k.x),z.y=.5*(U.y+k.y),z.z=.5*(U.z+k.z);var L=t.o.magnitudeSquared(t.o.subtract(k,z,w)),K=Math.sqrt(L),M=R;M.x=c.x,M.y=p.y,M.z=f.z;var F=x;F.x=l.x,F.y=S.y,F.z=E.z;var N=t.o.midpoint(M,F,A),H=0;for(s=0;s<_;s+=i){u.x=e[s]+r.x,u.y=e[s+1]+r.y,u.z=e[s+2]+r.z;var V=t.o.magnitude(t.o.subtract(u,N,w));V>H&&(H=V);var Y=t.o.magnitudeSquared(t.o.subtract(u,z,w));if(Y>L){var J=Math.sqrt(Y);L=(K=.5*(K+J))*K;var X=J-K;z.x=(K*z.x+X*u.x)/J,z.y=(K*z.y+X*u.y)/J,z.z=(K*z.z+X*u.z)/J}}return K<H?(t.o.clone(z,a.center),a.radius=K):(t.o.clone(N,a.center),a.radius=H),a},h.fromEncodedCartesianVertices=function(e,r,n){if(o.e(n)||(n=new h),!o.e(e)||!o.e(r)||e.length!==r.length||0===e.length)return n.center=t.o.clone(t.o.ZERO,n.center),n.radius=0,n;var i=b;i.x=e[0]+r[0],i.y=e[1]+r[1],i.z=e[2]+r[2];var a,u=t.o.clone(i,d),s=t.o.clone(i,m),c=t.o.clone(i,y),p=t.o.clone(i,v),f=t.o.clone(i,g),l=t.o.clone(i,q),S=e.length;for(a=0;a<S;a+=3){var E=e[a]+r[a],_=e[a+1]+r[a+1],C=e[a+2]+r[a+2];i.x=E,i.y=_,i.z=C,E<u.x&&t.o.clone(i,u),E>p.x&&t.o.clone(i,p),_<s.y&&t.o.clone(i,s),_>f.y&&t.o.clone(i,f),C<c.z&&t.o.clone(i,c),C>l.z&&t.o.clone(i,l)}var I=t.o.magnitudeSquared(t.o.subtract(p,u,w)),T=t.o.magnitudeSquared(t.o.subtract(f,s,w)),P=t.o.magnitudeSquared(t.o.subtract(l,c,w)),j=u,B=p,U=I;T>U&&(U=T,j=s,B=f),P>U&&(U=P,j=c,B=l);var k=O;k.x=.5*(j.x+B.x),k.y=.5*(j.y+B.y),k.z=.5*(j.z+B.z);var D=t.o.magnitudeSquared(t.o.subtract(B,k,w)),z=Math.sqrt(D),L=R;L.x=u.x,L.y=s.y,L.z=c.z;var K=x;K.x=p.x,K.y=f.y,K.z=l.z;var M=t.o.midpoint(L,K,A),F=0;for(a=0;a<S;a+=3){i.x=e[a]+r[a],i.y=e[a+1]+r[a+1],i.z=e[a+2]+r[a+2];var N=t.o.magnitude(t.o.subtract(i,M,w));N>F&&(F=N);var H=t.o.magnitudeSquared(t.o.subtract(i,k,w));if(H>D){var V=Math.sqrt(H);D=(z=.5*(z+V))*z;var Y=V-z;k.x=(z*k.x+Y*i.x)/V,k.y=(z*k.y+Y*i.y)/V,k.z=(z*k.z+Y*i.z)/V}}return z<F?(t.o.clone(k,n.center),n.radius=z):(t.o.clone(M,n.center),n.radius=F),n},h.fromCornerPoints=function(e,r,i){n.o.typeOf.object("corner",e),n.o.typeOf.object("oppositeCorner",r),o.e(i)||(i=new h);var a=t.o.midpoint(e,r,i.center);return i.radius=t.o.distance(a,r),i},h.fromEllipsoid=function(e,r){return n.o.typeOf.object("ellipsoid",e),o.e(r)||(r=new h),t.o.clone(t.o.ZERO,r.center),r.radius=e.maximumRadius,r};var j=new t.o;h.fromBoundingSpheres=function(e,r){if(o.e(r)||(r=new h),!o.e(e)||0===e.length)return r.center=t.o.clone(t.o.ZERO,r.center),r.radius=0,r;var n=e.length;if(1===n)return h.clone(e[0],r);if(2===n)return h.union(e[0],e[1],r);var i,a=[];for(i=0;i<n;i++)a.push(e[i].center);var u=(r=h.fromPoints(a,r)).center,s=r.radius;for(i=0;i<n;i++){var c=e[i];s=Math.max(s,t.o.distance(u,c.center,j)+c.radius)}return r.radius=s,r};var B=new t.o,U=new t.o,k=new t.o;h.fromOrientedBoundingBox=function(e,r){n.o.defined("orientedBoundingBox",e),o.e(r)||(r=new h);var i=e.halfAxes,a=u.p$1.getColumn(i,0,B),s=u.p$1.getColumn(i,1,U),c=u.p$1.getColumn(i,2,k);return t.o.add(a,s,a),t.o.add(a,c,a),r.center=t.o.clone(e.center,r.center),r.radius=t.o.magnitude(a),r},h.clone=function(e,r){if(o.e(e))return o.e(r)?(r.center=t.o.clone(e.center,r.center),r.radius=e.radius,r):new h(e.center,e.radius)},h.packedLength=4,h.pack=function(e,t,r){n.o.typeOf.object("value",e),n.o.defined("array",t),r=o.u(r,0);var i=e.center;return t[r++]=i.x,t[r++]=i.y,t[r++]=i.z,t[r]=e.radius,t},h.unpack=function(e,t,r){n.o.defined("array",e),t=o.u(t,0),o.e(r)||(r=new h);var i=r.center;return i.x=e[t++],i.y=e[t++],i.z=e[t++],r.radius=e[t],r};var D=new t.o,z=new t.o;h.union=function(e,r,i){n.o.typeOf.object("left",e),n.o.typeOf.object("right",r),o.e(i)||(i=new h);var a=e.center,u=e.radius,s=r.center,c=r.radius,p=t.o.subtract(s,a,D),f=t.o.magnitude(p);if(u>=f+c)return e.clone(i),i;if(c>=f+u)return r.clone(i),i;var l=.5*(u+f+c),d=t.o.multiplyByScalar(p,(-u+l)/f,z);return t.o.add(d,a,d),t.o.clone(d,i.center),i.radius=l,i};var L=new t.o;h.expand=function(e,r,o){n.o.typeOf.object("sphere",e),n.o.typeOf.object("point",r),o=h.clone(e,o);var i=t.o.magnitude(t.o.subtract(r,o.center,L));return i>o.radius&&(o.radius=i),o},h.intersectPlane=function(e,r){n.o.typeOf.object("sphere",e),n.o.typeOf.object("plane",r);var o=e.center,i=e.radius,a=r.normal,u=t.o.dot(a,o)+r.distance;return u<-i?f.OUTSIDE:u<i?f.INTERSECTING:f.INSIDE},h.transform=function(e,t,r){return n.o.typeOf.object("sphere",e),n.o.typeOf.object("transform",t),o.e(r)||(r=new h),r.center=u.p.multiplyByPoint(t,e.center,r.center),r.radius=u.p.getMaximumScale(t)*e.radius,r};var K=new t.o;h.distanceSquaredTo=function(e,r){n.o.typeOf.object("sphere",e),n.o.typeOf.object("cartesian",r);var o=t.o.subtract(e.center,r,K);return t.o.magnitudeSquared(o)-e.radius*e.radius},h.transformWithoutScale=function(e,t,r){return n.o.typeOf.object("sphere",e),n.o.typeOf.object("transform",t),o.e(r)||(r=new h),r.center=u.p.multiplyByPoint(t,e.center,r.center),r.radius=e.radius,r};var M=new t.o;h.computePlaneDistances=function(e,r,i,a){n.o.typeOf.object("sphere",e),n.o.typeOf.object("position",r),n.o.typeOf.object("direction",i),o.e(a)||(a=new l);var u=t.o.subtract(e.center,r,M),s=t.o.dot(i,u);return a.start=s-e.radius,a.stop=s+e.radius,a};for(var F=new t.o,N=new t.o,H=new t.o,V=new t.o,Y=new t.o,J=new r.a,X=new Array(8),G=0;G<8;++G)X[G]=new t.o;var Q=new p;function Z(e){if(e instanceof Z)this.scheme=e.scheme,this.authority=e.authority,this.path=e.path,this.query=e.query,this.fragment=e.fragment;else if(e){var t=W.exec(e);this.scheme=t[1],this.authority=t[2],this.path=t[3],this.query=t[4],this.fragment=t[5]}}h.projectTo2D=function(e,r,i){n.o.typeOf.object("sphere",e);var a,u=(r=o.u(r,Q)).ellipsoid,s=e.center,c=e.radius;a=t.o.equals(s,t.o.ZERO)?t.o.clone(t.o.UNIT_X,F):u.geodeticSurfaceNormal(s,F);var p=t.o.cross(t.o.UNIT_Z,a,N);t.o.normalize(p,p);var f=t.o.cross(a,p,H);t.o.normalize(f,f),t.o.multiplyByScalar(a,c,a),t.o.multiplyByScalar(f,c,f),t.o.multiplyByScalar(p,c,p);var l=t.o.negate(f,Y),d=t.o.negate(p,V),m=X,y=m[0];t.o.add(a,f,y),t.o.add(y,p,y),y=m[1],t.o.add(a,f,y),t.o.add(y,d,y),y=m[2],t.o.add(a,l,y),t.o.add(y,d,y),y=m[3],t.o.add(a,l,y),t.o.add(y,p,y),t.o.negate(a,a),y=m[4],t.o.add(a,f,y),t.o.add(y,p,y),y=m[5],t.o.add(a,f,y),t.o.add(y,d,y),y=m[6],t.o.add(a,l,y),t.o.add(y,d,y),y=m[7],t.o.add(a,l,y),t.o.add(y,p,y);for(var v=m.length,g=0;g<v;++g){var q=m[g];t.o.add(s,q,q);var b=u.cartesianToCartographic(q,J);r.project(b,q)}var w=(s=(i=h.fromPoints(m,i)).center).x,O=s.y,R=s.z;return s.x=R,s.y=w,s.z=O,i},h.isOccluded=function(e,t){return n.o.typeOf.object("sphere",e),n.o.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)},h.equals=function(e,r){return e===r||o.e(e)&&o.e(r)&&t.o.equals(e.center,r.center)&&e.radius===r.radius},h.prototype.intersectPlane=function(e){return h.intersectPlane(this,e)},h.prototype.distanceSquaredTo=function(e){return h.distanceSquaredTo(this,e)},h.prototype.computePlaneDistances=function(e,t,r){return h.computePlaneDistances(this,e,t,r)},h.prototype.isOccluded=function(e){return h.isOccluded(this,e)},h.prototype.equals=function(e){return h.equals(this,e)},h.prototype.clone=function(e){return h.clone(this,e)},h.prototype.volume=function(){var e=this.radius;return S*e*e*e},Z.prototype.scheme=null,Z.prototype.authority=null,Z.prototype.path="",Z.prototype.query=null,Z.prototype.fragment=null;var W=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");Z.prototype.getScheme=function(){return this.scheme},Z.prototype.getAuthority=function(){return this.authority},Z.prototype.getPath=function(){return this.path},Z.prototype.getQuery=function(){return this.query},Z.prototype.getFragment=function(){return this.fragment},Z.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},Z.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query},Z.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment},Z.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(te,ne).replace($,re)),this.path&&(this.path=this.path.replace($,re)),this.query&&(this.query=this.query.replace($,re)),this.fragment&&(this.fragment=this.fragment.replace($,re))};var $=/%[0-9a-z]{2}/gi,ee=/[a-zA-Z0-9\-\._~]/,te=/(.*@)?([^@:]*)(:.*)?/;function re(e){var t=unescape(e);return ee.test(t)?t:e.toUpperCase()}function ne(e,t,r,n){return(t||"")+r.toLowerCase()+(n||"")}function oe(e,t){if(null===e||"object"!=typeof e)return e;t=o.u(t,!1);var r=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];t&&(i=oe(i,t)),r[n]=i}return r}function ie(e,t,r){r=o.u(r,!1);var n,i,a,u={},s=o.e(e),c=o.e(t);if(s)for(n in e)e.hasOwnProperty(n)&&(i=e[n],c&&r&&"object"==typeof i&&t.hasOwnProperty(n)?(a=t[n],u[n]="object"==typeof a?ie(i,a,r):i):u[n]=i);if(c)for(n in t)t.hasOwnProperty(n)&&!u.hasOwnProperty(n)&&(a=t[n],u[n]=a);return u}function ae(e,t){var r;return typeof document<"u"&&(r=document),ae._implementation(e,t,r)}Z.prototype.resolve=function(e){var t=new Z;return this.scheme?(t.scheme=this.scheme,t.authority=this.authority,t.path=this.path,t.query=this.query):(t.scheme=e.scheme,this.authority?(t.authority=this.authority,t.path=this.path,t.query=this.query):(t.authority=e.authority,""==this.path?(t.path=e.path,t.query=this.query||e.query):("/"==this.path.charAt(0)?(t.path=this.path,t.removeDotSegments()):(e.authority&&""==e.path?t.path="/"+this.path:t.path=e.path.substring(0,e.path.lastIndexOf("/")+1)+this.path,t.removeDotSegments()),t.query=this.query))),t.fragment=this.fragment,t},Z.prototype.removeDotSegments=function(){var e,t=this.path.split("/"),r=[],n=""==t[0];n&&t.shift();for(""==t[0]&&t.shift();t.length;)".."==(e=t.shift())?r.pop():"."!=e&&r.push(e);("."==e||".."==e)&&r.push(""),n&&r.unshift(""),this.path=r.join("/")},Z.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e},ae._implementation=function(e,t,r){if(!o.e(e))throw new n.t("relative uri is required.");if(!o.e(t)){if(typeof r>"u")return e;t=o.u(r.baseURI,r.location.href)}var i=new Z(t);return new Z(e).resolve(i).toString()};var ue,se=/^blob:/i;function ce(e){return n.o.typeOf.string("uri",e),se.test(e)}var pe=/^data:/i;function fe(e){return n.o.typeOf.string("uri",e),pe.test(e)}var le=Object.freeze({UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5}),he=Object.freeze({TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3,PACK:4,BLOCK:5,BLOCKPACK:6});function de(e){e=o.u(e,o.u.EMPTY_OBJECT);var t=o.u(e.throttleByServer,!1),r=o.u(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=o.u(e.priority,0),this.throttle=r,this.throttleByServer=t,this.type=o.u(e.type,he.OTHER),this.serverKey=void 0,this.state=le.UNISSUED,this.deferred=void 0,this.cancelled=!1}function me(e,t,r){this.statusCode=e,this.response=t,this.responseHeaders=r,"string"==typeof this.responseHeaders&&(this.responseHeaders=function(e){var t={};if(!e)return t;for(var r=e.split("\r\n"),n=0;n<r.length;++n){var o=r[n],i=o.indexOf(": ");if(i>0){var a=o.substring(0,i),u=o.substring(i+2);t[a]=u}}return t}(this.responseHeaders))}function ye(e){n.o.typeOf.object("options",e),n.o.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function ve(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}de.prototype.cancel=function(){this.cancelled=!0},de.prototype.clone=function(e){return o.e(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new de(this)},me.prototype.toString=function(){var e="Request has failed.";return o.e(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e},Object.defineProperties(ye.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){this._maximumLength=e,this._length>e&&e>0&&(this._length=e,this._array.length=e)}},comparator:{get:function(){return this._comparator}}}),ye.prototype.reserve=function(e){e=o.u(e,this._length),this._array.length=e},ye.prototype.heapify=function(e){e=o.u(e,0);for(var t=this._length,r=this._comparator,n=this._array,i=-1,a=!0;a;){var u=2*(e+1),s=u-1;i=s<t&&r(n[s],n[e])<0?s:e,u<t&&r(n[u],n[i])<0&&(i=u),i!==e?(ve(n,i,e),e=i):a=!1}},ye.prototype.resort=function(){for(var e=this._length,t=Math.ceil(e/2);t>=0;--t)this.heapify(t)},ye.prototype.insert=function(e){n.o.defined("element",e);var t,r=this._array,i=this._comparator,a=this._maximumLength,u=this._length++;for(u<r.length?r[u]=e:r.push(e);0!==u;){var s=Math.floor((u-1)/2);if(!(i(r[u],r[s])<0))break;ve(r,u,s),u=s}return o.e(a)&&this._length>a&&(t=r[a],r.pop(),this._length=a),t},ye.prototype.pop=function(e){if(e=o.u(e,0),0!==this._length){n.o.typeOf.number.lessThan("index",e,this._length);var t=this._array,r=t[e];return ve(t,e,--this._length),t[this._length]=void 0,this.heapify(e),r}};var ge=typeof performance<"u"&&"function"==typeof performance.now&&isFinite(performance.now())?function(){return performance.now()}:function(){return Date.now()};function qe(e,t){return e.priority-t.priority}var be={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0,totalRequestTime:0},we=20,Oe=new ye({comparator:qe});Oe.maximumLength=we,Oe.reserve(we);var Re=[],xe={},Ae=typeof document<"u"?new Z(document.location.href):new Z,Se=new s.o;function Ee(){}function _e(e){o.e(e.priorityFunction)&&(e.priority=e.priorityFunction())}function Ce(e){var t=o.u(Ee.requestsByServer[e],Ee.maximumRequestsPerServer);return xe[e]<t}function Ie(e){return o.e(e.packKey)||(e.packKey=e.serverKey+"_"+e.providerName),e.packKey}function Te(e){return o.e(e.blockKey)||(e.blockKey=e.serverKey+"_"+e.providerName+"_"+e.quadKey+e.url.substring(e.url.indexOf("dataVersion"))),e.blockKey}function Pe(e){var t=Ie(e);return o.e(Ee.packRequestGroup[t])||(Ee.packRequestGroup[t]=[]),o.e(Ee.packRequestQuadKey[t])||(Ee.packRequestQuadKey[t]=""),o.e(Ee.packRequestPromise[t])||(Ee.packRequestPromise[t]=o.o.defer()),o.e(Ee.quadKeyIndex[t])||(Ee.quadKeyIndex[t]=0),e.quadKeyIndex=Ee.quadKeyIndex[t]++,e.deferred=Ee.packRequestPromise[t],e.state=le.ISSUED,Ee.packRequestGroup[t].push(e),e.deferred.promise}function je(e){for(var t=0,r=e.length;t<r;t++){e[t].state=le.CANCELLED}}function Be(e){for(var t=[],r={},n=0,o=e.length;n<o;n++){var i=e[n];if(!i.cancelled){var a=i.quadKey;r[a]||(r[a]=!0,t.push(a))}}return t}function Ue(){var e=Ee.packRequestGroup;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];if(r.length<1)continue;var n=r[0].clone(),i=-1!==n.url.indexOf("rest/maps");n.serverKey=r[0].serverKey,n.state=r[0].state;var a=n.url,u=Be(r);if(u.length<1)continue;Ee.packRequestQuadKey[t]=i?u.join(","):u.join(";");var s=Ee.packRequestQuadKey[t];if(n.throttleByServer&&!Ce(n.serverKey)){je(r),Ee.packRequestPromise[t].reject();continue}n.deferred=Ee.packRequestPromise[t];var c=new Z(a);c.query=i?o.e(c.query)?c.query+"&tiles="+s:"tiles="+s:o.e(c.query)?c.query+"&extratiles="+s:"extratiles="+s,n.url=c.toString(),ze(n,n.url)}Ee.packRequestGroup={},Ee.packRequestPromise={},Ee.packRequestQuadKey={},Ee.quadKeyIndex={}}function ke(){var e=Ee.blockRequest;for(var t in e)if(e.hasOwnProperty(t)){ze(e[t])}Ee.blockRequest={}}function De(e){if(e.state===le.UNISSUED)if(e.state=le.ISSUED,e.type===he.PACK||e.type===he.BLOCKPACK){var t=Ie(e);o.e(Ee.packRequestPromise[t])||(Ee.packRequestPromise[t]=o.o.defer()),e.deferred=Ee.packRequestPromise[t]}else e.deferred=o.o.defer();return e.deferred.promise}function ze(e,t){var r=De(e);return e.state=le.ACTIVE,Re.push(e),++be.numberOfActiveRequests,++be.numberOfActiveRequestsEver,++xe[e.serverKey],e.startTime=ge(),e.requestFunction(t).then(function(e){return function(t){if(e.state!==le.CANCELLED&&(--be.numberOfActiveRequests,--xe[e.serverKey],Se.raiseEvent(),e.state=le.RECEIVED,e.deferred.resolve(t),e.endTime=ge(),(Ee.statisticRequestTime>0||e.type!==he.OTHER)&&(be.totalRequestTime+=e.endTime-e.startTime),e.type===he.BLOCK||e.type===he.BLOCKPACK)){var r=Te(e);o.e(Ee.blockDefer[r])&&(Ee.blockDefer[r]=void 0,delete Ee.blockDefer[r])}}}(e)).otherwise(function(e){return function(t){e.state!==le.CANCELLED&&(++be.numberOfFailedRequests,--be.numberOfActiveRequests,--xe[e.serverKey],Se.raiseEvent(t),e.state=le.FAILED,e.deferred.reject(t))}}(e)),r}function Le(e){var t=e.state===le.ACTIVE;e.state=le.CANCELLED,++be.numberOfCancelledRequests,e.deferred.reject(),t&&(--be.numberOfActiveRequests,--xe[e.serverKey],++be.numberOfCancelledActiveRequests),o.e(e.cancelFunction)&&e.cancelFunction()}Ee.TIMEOUT=5e3,Ee.CANCLE_COUNT=3,Ee.statisticRequestTime=-1,Ee.maximumRequests=50,Ee.maximumRequestsPerServer=6,Ee.perPacketCount=20,Ee.requestsByServer={},Ee.throttleRequests=!0,Ee.debugShowStatistics=!1,Ee.requestCompletedEvent=Se,Object.defineProperties(Ee,{activeRequestLength:{get:function(){return Re.length}},statistics:{get:function(){return be}},priorityHeapLength:{get:function(){return we},set:function(e){if(e<we)for(;Oe.length>e;){Le(Oe.pop())}we=e,Oe.maximumLength=e,Oe.reserve(e)}}}),Ee.packRequestGroup={},Ee.packRequestPromise={},Ee.packRequestQuadKey={},Ee.quadKeyIndex={},Ee.packRequestHeap={},Ee.blockDefer={},Ee.blockRequest={},Ee.update=function(){var e,t,r=0,n=Re.length;for(e=0;e<n;++e)(t=Re[e]).cancelled&&Le(t),t.state===le.ACTIVE?r>0&&(Re[e-r]=t):++r;Re.length-=r;var o=Oe.internalArray,i=Oe.length;for(e=0;e<i;++e)_e(o[e]);Oe.resort(),function(){for(var e in Ee.packRequestHeap)if(Ee.packRequestHeap.hasOwnProperty(e)){for(var t=Ee.packRequestHeap[e],r=t.internalArray,n=t.length,o=0;o<n;++o)_e(r[o]);t.resort()}}(),ke(),function(){for(var e in Ee.packRequestHeap)if(Ee.packRequestHeap.hasOwnProperty(e))for(var t=Ee.packRequestHeap[e];t.length>0;){var r=t.pop();r.cancelled?Le(r):Pe(r)}Ue()}();for(var a=Math.max(Ee.maximumRequests-Re.length,0),u=0;u<a&&Oe.length>0;)(t=Oe.pop()).cancelled?Le(t):!t.throttleByServer||Ce(t.serverKey)?(ze(t),++u):Le(t);!Ee.debugShowStatistics||(0===be.numberOfActiveRequests&&be.lastNumberOfActiveRequests>0&&(be.numberOfAttemptedRequests>0&&(console.log("Number of attempted requests: "+be.numberOfAttemptedRequests),be.numberOfAttemptedRequests=0),be.numberOfCancelledRequests>0&&(console.log("Number of cancelled requests: "+be.numberOfCancelledRequests),be.numberOfCancelledRequests=0),be.numberOfCancelledActiveRequests>0&&(console.log("Number of cancelled active requests: "+be.numberOfCancelledActiveRequests),be.numberOfCancelledActiveRequests=0),be.numberOfFailedRequests>0&&(console.log("Number of failed requests: "+be.numberOfFailedRequests),be.numberOfFailedRequests=0)),be.lastNumberOfActiveRequests=be.numberOfActiveRequests)},Ee.getServerKey=function(e){n.o.typeOf.string("url",e);var t=new Z(e).resolve(Ae);t.normalize();var r=t.authority;/:/.test(r)||(r=r+":"+("https"===t.scheme?"443":"80"));var i=xe[r];return o.e(i)||(xe[r]=0),r},Ee.request=function(e){if(n.o.typeOf.object("request",e),n.o.typeOf.string("request.url",e.url),n.o.typeOf.func("request.requestFunction",e.requestFunction),fe(e.url)||ce(e.url))return Se.raiseEvent(),e.state=le.RECEIVED,e.requestFunction();if(++be.numberOfAttemptedRequests,o.e(e.serverKey)||(e.serverKey=Ee.getServerKey(e.url)),e.type===he.BLOCK)return function(e){var t=Te(e),r=Ee.blockDefer[t];return o.e(r)||(r=Ee.blockDefer[t]=o.o.defer(),Ee.blockRequest[t]=e),e.deferred=r,e.state=le.ISSUED,e.deferred.promise}(e);if(!e.throttleByServer||Ce(e.serverKey)){if(!Ee.throttleRequests||!e.throttle)return ze(e);if(!(Re.length>=Ee.maximumRequests)){var t;if(_e(e),e.type===he.PACK||e.type===he.BLOCKPACK){var r=function(e){var t=Ie(e),r=Ee.packRequestHeap[t];return o.e(r)||((r=Ee.packRequestHeap[t]=new ye({comparator:qe})).maximumLength=Ee.perPacketCount,r.reserve(we)),r}(e),i=!0;if(e.type===he.BLOCKPACK)for(var a=0;a<r.length;a++)if(r._array[a].quadKey===e.quadKey){e.blockRequest=r._array[a],i=!1;break}i&&(t=r.insert(e))}else t=Oe.insert(e);if(o.e(t)){if(t===e)return;Le(t)}return De(e)}}},Ee.clearForSpecs=function(){for(;Oe.length>0;){Le(Oe.pop())}for(var e=Re.length,t=0;t<e;++t)Le(Re[t]);Re.length=0,xe={},be.numberOfAttemptedRequests=0,be.numberOfActiveRequests=0,be.numberOfCancelledRequests=0,be.numberOfCancelledActiveRequests=0,be.numberOfFailedRequests=0,be.numberOfActiveRequestsEver=0,be.lastNumberOfActiveRequests=0,be.totalRequestTime=0},Ee.numberOfActiveRequestsByServer=function(e){return xe[e]},Ee.requestHeap=Oe;var Ke={},Me={};Ke.add=function(e,t){if(!o.e(e))throw new n.t("host is required.");if(!o.e(t)||t<=0)throw new n.t("port is required to be greater than 0.");var r=e.toLowerCase()+":"+t;o.e(Me[r])||(Me[r]=!0)},Ke.remove=function(e,t){if(!o.e(e))throw new n.t("host is required.");if(!o.e(t)||t<=0)throw new n.t("port is required to be greater than 0.");var r=e.toLowerCase()+":"+t;o.e(Me[r])&&delete Me[r]},Ke.contains=function(e){if(!o.e(e))throw new n.t("url is required.");var t=function(e){var t=new Z(e);t.normalize();var r=t.getAuthority();if(o.e(r)){if(-1!==r.indexOf("@")){var n=r.split("@");r=n[1]}if(-1===r.indexOf(":")){var i=t.getScheme();if(o.e(i)||(i=(i=window.location.protocol).substring(0,i.length-1)),"http"===i)r+=":80";else{if("https"!==i)return;r+=":443"}}return r}}(e);return!(!o.e(t)||!o.e(Me[t]))},Ke.clear=function(){Me={}};var Fe={};function Ne(e,t){if(!o.e(e))throw new n.t("identifier is required.");o.e(Fe[e])||(Fe[e]=!0,console.warn(o.u(t,e)))}Ne.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",Ne.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",Ne.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",Ne.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var He,Ve=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch{return!1}}();function Ye(e,t,r,i){var a,u=e.query;if(!o.e(u)||0===u.length)return{};if(-1===u.indexOf("=")){var s={};s[u]=void 0,a=s}else a=function(e){if(!o.e(e))throw new n.t("queryString is required.");var t={};if(""===e)return t;for(var r=e.replace(/\+/g,"%20").split(/[&;]/),i=0,a=r.length;i<a;++i){var u=r[i].split("=");if(u.length>2){var s=r[i].indexOf("=");u=[r[i].substring(0,s),r[i].substring(s+1,r[i].length)]}var c=decodeURIComponent(u[0]),p=u[1];p=o.e(p)?decodeURIComponent(p):"";var f=t[c];"string"==typeof f?t[c]=[f,p]:Array.isArray(f)?f.push(p):t[c]=p}return t}(u);t._queryParameters=r?Qe(a,t._queryParameters,i):a,e.query=void 0}function Je(e,t){var r=t._queryParameters,i=Object.keys(r);1!==i.length||o.e(r[i[0]])?e.query=function(e,t){if(!o.e(e))throw new n.t("obj is required.");var r="";for(var i in e)if(e.hasOwnProperty(i)){var a=e[i],u=encodeURIComponent(i)+"=";if(Array.isArray(a))for(var s=0,c=a.length;s<c;++s)r+=!0===t?u+encodeURI(a[s])+"&":u+encodeURIComponent(a[s])+"&";else r+=!0===t?u+encodeURI(a)+"&":u+encodeURIComponent(a)+"&"}return r.slice(0,-1)}(r):e.query=i[0]}function Xe(e,t){return o.e(e)?o.e(e.clone)?e.clone():oe(e):t}function Ge(e){if(e.state===le.ISSUED||e.state===le.ACTIVE)throw new c.t("The Resource is already being fetched.");e.state=le.UNISSUED,e.deferred=void 0}function Qe(e,t,r){if(!r)return ie(e,t);var n=oe(e,!0);for(var i in t)if(t.hasOwnProperty(i)){var a=n[i],u=t[i];o.e(a)?(Array.isArray(a)||(a=n[i]=[a]),n[i]=a.concat(u)):n[i]=Array.isArray(u)?u.slice():u}return n}function Ze(e){"string"==typeof(e=o.u(e,o.u.EMPTY_OBJECT))&&(e={url:e}),n.o.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=Xe(e.templateValues,{}),this._queryParameters=Xe(e.queryParameters,{}),this.headers=Xe(e.headers,{}),this.request=o.u(e.request,new de),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=o.u(e.retryAttempts,0),this._retryCount=0;var t=new Z(e.url);Ye(t,this,!0,!0),t.fragment=void 0,this._url=t.toString()}function We(e){var t=e.resource,r=e.flipY,n=e.preferImageBitmap,i=t.request;i.url=t.url,i.requestFunction=function(){var e=!1;!t.isDataUri&&!t.isBlobUri&&(e=t.isCrossOriginUrl);var a=o.o.defer();return Ze._Implementations.createImage(i,e,a,r,n),a.promise};var a=Ee.request(i);if(o.e(a))return a.otherwise((function(e){return i.state!==le.FAILED?o.o.reject(e):t.retryOnError(e).then((function(a){return a?(i.state=le.UNISSUED,i.deferred=void 0,We({resource:t,flipY:r,preferImageBitmap:n})):o.o.reject(e)}))}))}function $e(e,t,r){var n={};n[t]=r,e.setQueryParameters(n);var i=e.request;i.url=e.url,i.requestFunction=function(){var t=o.o.defer();return window[r]=function(e){t.resolve(e);try{delete window[r]}catch{window[r]=void 0}},Ze._Implementations.loadAndExecuteScript(e.url,r,t),t.promise};var a=Ee.request(i);if(o.e(a))return a.otherwise((function(n){return i.state!==le.FAILED?o.o.reject(n):e.retryOnError(n).then((function(a){return a?(i.state=le.UNISSUED,i.deferred=void 0,$e(e,t,r)):o.o.reject(n)}))}))}Ze.createIfNeeded=function(e){return e instanceof Ze?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new Ze({url:e})},Ze.supportsImageBitmapOptions=function(){if(o.e(He))return He;if("function"!=typeof createImageBitmap)return He=o.o.resolve(!1);return He=Ze.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then((function(e){return createImageBitmap(e,{imageOrientation:"flipY",premultiplyAlpha:"none"})})).then((function(e){return!0})).otherwise((function(){return!1})),He},Object.defineProperties(Ze,{isBlobSupported:{get:function(){return Ve}}}),Object.defineProperties(Ze.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){var t=new Z(e);Ye(t,this,!1),t.fragment=void 0,this._url=t.toString()}},extension:{get:function(){return function(e){if(!o.e(e))throw new n.t("uri is required.");var t=new Z(e);t.normalize();var r=t.path,i=r.lastIndexOf("/");return-1!==i&&(r=r.substr(i+1)),i=r.lastIndexOf("."),-1===i?"":r.substr(i+1)}(this._url)}},isDataUri:{get:function(){return fe(this._url)}},isBlobUri:{get:function(){return ce(this._url)}},isCrossOriginUrl:{get:function(){return function(e){o.e(ue)||(ue=document.createElement("a")),ue.href=window.location.href;var t=ue.host,r=ue.protocol;return ue.href=e,ue.href=ue.href,r!==ue.protocol||t!==ue.host}(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}}),Ze.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;var r=new Z(this._url);e&&Je(r,this);var n=r.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),i=this._templateValues;return n=n.replace(/{(.*?)}/g,(function(e,t){var r=i[t];return o.e(r)?encodeURIComponent(r):e})),t&&o.e(this.proxy)&&(n=this.proxy.getURL(n)),n},Ze.prototype.setQueryParameters=function(e,t){this._queryParameters=t?Qe(this._queryParameters,e,!1):Qe(e,this._queryParameters,!1)},Ze.prototype.appendQueryParameters=function(e){this._queryParameters=Qe(e,this._queryParameters,!0)},Ze.prototype.setTemplateValues=function(e,t){this._templateValues=t?ie(this._templateValues,e):ie(e,this._templateValues)},Ze.prototype.getDerivedResource=function(e){var t=this.clone();if(t._retryCount=0,o.e(e.url)){var r=new Z(e.url);Ye(r,t,!0,o.u(e.preserveQueryParameters,!1)),r.fragment=void 0,t._url=r.resolve(new Z(ae(this._url))).toString()}return o.e(e.queryParameters)&&(t._queryParameters=ie(e.queryParameters,t._queryParameters)),o.e(e.templateValues)&&(t._templateValues=ie(e.templateValues,t.templateValues)),o.e(e.headers)&&(t.headers=ie(e.headers,t.headers)),o.e(e.proxy)&&(t.proxy=e.proxy),o.e(e.request)&&(t.request=e.request),o.e(e.retryCallback)&&(t.retryCallback=e.retryCallback),o.e(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},Ze.prototype.retryOnError=function(e){var t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return o.o(!1);var r=this;return o.o(t(this,e)).then((function(e){return++r._retryCount,e}))},Ze.prototype.clone=function(e){return o.e(e)||(e=new Ze({url:this._url})),e._url=this._url,e._queryParameters=oe(this._queryParameters),e._templateValues=oe(this._templateValues),e.headers=oe(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},Ze.prototype.getBaseUri=function(e){return function(e,t){if(!o.e(e))throw new n.t("uri is required.");var r="",i=e.lastIndexOf("/");return-1!==i&&(r=e.substring(0,i+1)),t&&(e=new Z(e),o.e(e.query)&&(r+="?"+e.query),o.e(e.fragment)&&(r+="#"+e.fragment)),r}(this.getUrlComponent(e),e)},Ze.prototype.appendForwardSlash=function(){this._url=function(e){return(0===e.length||"/"!==e[e.length-1])&&(e+="/"),e}(this._url)},Ze.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},Ze.fetchArrayBuffer=function(e){return new Ze(e).fetchArrayBuffer()},Ze.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},Ze.fetchBlob=function(e){return new Ze(e).fetchBlob()},Ze.prototype.fetchImage=function(e){e=o.u(e,o.u.EMPTY_OBJECT);var t=o.u(e.preferImageBitmap,!1),r=o.u(e.preferBlob,!1),n=o.u(e.flipY,!1);if(Ge(this.request),!Ve||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!r)return We({resource:this,flipY:n,preferImageBitmap:t});var i,a,u,s=this.fetchBlob();return o.e(s)?Ze.supportsImageBitmapOptions().then((function(e){return i=e&&t,s})).then((function(e){if(o.e(e)){if(u=e,i)return Ze.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});var t=window.URL.createObjectURL(e);return We({resource:a=new Ze({url:t}),flipY:n,preferImageBitmap:!1})}})).then((function(e){if(o.e(e))return e.blob=u,i||window.URL.revokeObjectURL(a.url),e})).otherwise((function(e){return o.e(a)&&window.URL.revokeObjectURL(a.url),e.blob=u,o.o.reject(e)})):void 0},Ze.fetchImage=function(e){return new Ze(e).fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},Ze.prototype.fetchText=function(){return this.fetch({responseType:"text"})},Ze.fetchText=function(e){return new Ze(e).fetchText()},Ze.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(o.e(e))return e.then((function(e){if(o.e(e))return JSON.parse(e)}))},Ze.fetchJson=function(e){return new Ze(e).fetchJson()},Ze.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},Ze.fetchXML=function(e){return new Ze(e).fetchXML()},Ze.prototype.fetchJsonp=function(e){var t;e=o.u(e,"callback"),Ge(this.request);do{t="loadJsonp"+Math.random().toString().substring(2,8)}while(o.e(window[t]));return $e(this,e,t)},Ze.fetchJsonp=function(e){return new Ze(e).fetchJsonp(e.callbackParameterName)},Ze.prototype._makeRequest=function(e){var t=this;Ge(t.request);var r=t.request;r.url=t.url,r.requestFunction=function(n){var i=e.responseType,a=ie(e.headers,t.headers),u=e.overrideMimeType,s=e.method,c=e.data,p=o.o.defer(),f=o.e(n)?n:t.url,l=Ze._Implementations.loadWithXhr(f,i,s,c,a,p,u);return o.e(l)&&o.e(l.abort)&&(r.cancelFunction=function(){l.abort()}),p.promise};var n=Ee.request(r);if(o.e(n))return n.then((function(e){return e})).otherwise((function(n){return r.state!==le.FAILED?o.o.reject(n):t.retryOnError(n).then((function(i){return i?(r.state=le.UNISSUED,r.deferred=void 0,t.fetch(e)):o.o.reject(n)}))}))};var et=/^data:(.*?)(;base64)?,(.*)$/;function tt(e,t){var r=decodeURIComponent(t);return e?atob(r):r}function rt(e,t){for(var r=tt(e,t),n=new ArrayBuffer(r.length),o=new Uint8Array(n),i=0;i<r.length;i++)o[i]=r.charCodeAt(i);return n}function nt(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}Ze.prototype.fetch=function(e){return(e=Xe(e,{})).method="GET",this._makeRequest(e)},Ze.fetch=function(e){return new Ze(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Ze.prototype.delete=function(e){return(e=Xe(e,{})).method="DELETE",this._makeRequest(e)},Ze.delete=function(e){return new Ze(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},Ze.prototype.head=function(e){return(e=Xe(e,{})).method="HEAD",this._makeRequest(e)},Ze.head=function(e){return new Ze(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Ze.prototype.options=function(e){return(e=Xe(e,{})).method="OPTIONS",this._makeRequest(e)},Ze.options=function(e){return new Ze(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Ze.prototype.post=function(e,t){return n.o.defined("data",e),(t=Xe(t,{})).method="POST",t.data=e,this._makeRequest(t)},Ze.post=function(e){return new Ze(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Ze.prototype.put=function(e,t){return n.o.defined("data",e),(t=Xe(t,{})).method="PUT",t.data=e,this._makeRequest(t)},Ze.put=function(e){return new Ze(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Ze.prototype.patch=function(e,t){return n.o.defined("data",e),(t=Xe(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},Ze.patch=function(e){return new Ze(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Ze._Implementations={},Ze._Implementations.createImage=function(e,t,r,n,i){var a=e.url;Ze.supportsImageBitmapOptions().then((function(u){if(u&&i){var s=o.o.defer(),p=Ze._Implementations.loadWithXhr(a,"blob","GET",void 0,void 0,s,void 0,void 0,void 0);return o.e(p)&&o.e(p.abort)&&(e.cancelFunction=function(){p.abort()}),s.promise.then((function(e){if(o.e(e))return Ze.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1});r.reject(new c.t("Successfully retrieved "+a+" but it contained no content."))})).then(r.resolve)}!function(e,t,r){var n=new Image;n.onload=function(){r.resolve(n)},n.onerror=function(e){r.reject(e)},t&&(Ke.contains(e)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=e}(a,t,r)})).otherwise(r.reject)},Ze.createImageBitmapFromBlob=function(e,t){return n.o.defined("options",t),n.o.typeOf.bool("options.flipY",t.flipY),n.o.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none"})};var ot=typeof XMLHttpRequest>"u";Ze._Implementations.loadWithXhr=function(e,t,r,i,a,u,s){var p=et.exec(e);if(null===p){if(!ot){var f=new XMLHttpRequest;if(Ke.contains(e)&&(f.withCredentials=!0),e=e.replace(/{/g,"%7B").replace(/}/g,"%7D"),f.open(r,e,!0),o.e(s)&&o.e(f.overrideMimeType)&&f.overrideMimeType(s),o.e(a))for(var l in a)a.hasOwnProperty(l)&&f.setRequestHeader(l,a[l]);o.e(t)&&(f.responseType=t);var h=!1;return"string"==typeof e&&(h=0===e.indexOf("file://")||typeof window<"u"&&"file://"===window.location.origin),f.onload=function(){if(!(f.status<200||f.status>=300)||h&&0===f.status){var e=f.response,n=f.responseType;if("HEAD"===r||"OPTIONS"===r){var i=f.getAllResponseHeaders().trim().split(/[\r\n]+/),a={};return i.forEach((function(e){var t=e.split(": "),r=t.shift();a[r]=t.join(": ")})),void u.resolve(a)}if(204===f.status)u.resolve();else if(!o.e(e)||o.e(t)&&n!==t)if("json"===t&&"string"==typeof e)try{u.resolve(JSON.parse(e))}catch(e){u.reject(e)}else(""===n||"document"===n)&&o.e(f.responseXML)&&f.responseXML.hasChildNodes()?u.resolve(f.responseXML):""!==n&&"text"!==n||!o.e(f.responseText)?u.reject(new c.t("Invalid XMLHttpRequest response type.")):u.resolve(f.responseText);else u.resolve(e)}else u.reject(new me(f.status,f.response,f.getAllResponseHeaders()))},f.onerror=function(e){u.reject(new me)},f.send(i),f}!function(e,t,r,n,o,i,a){var u=require("url").parse(e),s="https:"===u.protocol?require("https"):require("http"),p=require("zlib"),f={protocol:u.protocol,hostname:u.hostname,port:u.port,path:u.path,query:u.query,method:r,headers:o};s.request(f).on("response",(function(e){if(e.statusCode<200||e.statusCode>=300)i.reject(new me(e.statusCode,e,e.headers));else{var r=[];e.on("data",(function(e){r.push(e)})),e.on("end",(function(){var n=Buffer.concat(r);"gzip"===e.headers["content-encoding"]?p.gunzip(n,(function(e,r){e?i.reject(new c.t("Error decompressing response.")):i.resolve(nt(r,t))})):i.resolve(nt(n,t))}))}})).on("error",(function(e){i.reject(new me)})).end()}(e,t,r,0,a,u)}else u.resolve(function(e,t){t=o.u(t,"");var r=e[1],i=!!e[2],a=e[3];switch(t){case"":case"text":return tt(i,a);case"arraybuffer":return rt(i,a);case"blob":var u=rt(i,a);return new Blob([u],{type:r});case"document":return(new DOMParser).parseFromString(tt(i,a),r);case"json":return JSON.parse(tt(i,a));default:throw new n.t("Unhandled responseType: "+t)}}(p,t))},Ze._Implementations.loadAndExecuteScript=function(e,t,r){return function(e){var t=o.o.defer(),r=document.createElement("script");r.async=!0,r.src=e;var n=document.getElementsByTagName("head")[0];return r.onload=function(){r.onload=void 0,n.removeChild(r),t.resolve()},r.onerror=function(e){t.reject(e)},n.appendChild(r),t.promise}(e).otherwise(r.reject)},Ze._DefaultImplementations={},Ze._DefaultImplementations.createImage=Ze._Implementations.createImage,Ze._DefaultImplementations.loadWithXhr=Ze._Implementations.loadWithXhr,Ze._DefaultImplementations.loadAndExecuteScript=Ze._Implementations.loadAndExecuteScript,Ze.DEFAULT=Object.freeze(new Ze({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var it,at,ut,st=/((?:.*\/)|^)SuperMap3D\.js$/;function ct(e){return typeof document>"u"?e:(o.e(it)||(it=document.createElement("a")),it.href=e,it.href=it.href,it.href)}function pt(){if(o.e(at))return at;var e;if(e=typeof BASE_URL<"u"?BASE_URL:"object"==typeof define&&o.e(define.amd)&&!define.amd.toUrlUndefined&&o.e(require.toUrl)?ae("..",ht("Core/buildModuleUrl.js")):function(){for(var e=document.getElementsByTagName("script"),t=0,r=e.length;t<r;++t){var n=e[t].getAttribute("src"),o=st.exec(n);if(null!==o)return o[1]}}(),!o.e(e))throw new n.t("Unable to determine SuperMap3D base URL automatically, try defining a global variable called BASE_URL.");return(at=new Ze({url:ct(e)})).appendForwardSlash(),at}function ft(e){return ct(require.toUrl("../"+e))}function lt(e){return pt().getDerivedResource({url:e}).url}function ht(e){return o.e(ut)||(ut="object"==typeof define&&o.e(define.amd)&&!define.amd.toUrlUndefined&&o.e(require.toUrl)?ft:lt),ut(e)}ht._cesiumScriptRegex=st,ht._buildModuleUrlFromBaseUrl=lt,ht._clearBaseResource=function(){at=void 0},ht.setBaseUrl=function(e){at=Ze.DEFAULT.getDerivedResource({url:e})},ht.getCesiumBaseUrl=pt,e.S=f,e.e=Ne,e.i=h,e.n=p,e.n$1=ht,e.o=l,e.t=Ze})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/cesiumWorkerBootstrapper.js b/SuperMap iEarth/public/SuperMap3D/Workers/cesiumWorkerBootstrapper.js deleted file mode 100644 index 19a19980..00000000 --- a/SuperMap iEarth/public/SuperMap3D/Workers/cesiumWorkerBootstrapper.js +++ /dev/null @@ -1,5 +0,0 @@ -function setTimeout(e){e()} -/** vim: et:ts=4:sw=4:sts=4 - * @license RequireJS 2.1.20 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - */var requirejs,require,define;"undefined"==typeof self&&(self={}),self.onmessage=function(e){var t=e.data;require(t.loaderConfig,[t.workerModule],(function(e){self.onmessage=e,CESIUM_BASE_URL=t.loaderConfig.baseUrl}))},function(global){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.20",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var i;if(e)for(i=0;i<e.length&&(!e[i]||!t(e[i],i,e));i+=1);}function eachReverse(e,t){var i;if(e)for(i=e.length-1;i>-1&&(!e[i]||!t(e[i],i,e));i-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,r){return t&&eachProp(t,(function(t,n){!i&&hasProp(e,n)||(!r||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[n]=t:(e[n]||(e[n]={}),mixin(e[n],t,i,r)))})),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),(function(e){t=t[e]})),t}function makeError(e,t,i,r){var n=new Error(t+"\n"+e);return n.requireType=e,n.requireModules=r,i&&(n.originalError=i),n}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,r){var n,o,a=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=i,i=r):e=[]),o&&o.context&&(a=o.context),(n=getOwn(contexts,a))||(n=contexts[a]=req.s.newContext(a)),o&&n.configure(o),n.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],(function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}})),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var r=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return r.type=e.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r},req.load=function(e,t,i){var r,n=e&&e.config||{};if(isBrowser)return r=req.createNode(n,t,i),n.onNodeCreated&&n.onNodeCreated(r,n,t,i),r.setAttribute("data-requirecontext",e.contextName),r.setAttribute("data-requiremodule",t),!r.attachEvent||r.attachEvent.toString&&r.attachEvent.toString().indexOf("[native code")<0||isOpera?(r.addEventListener("load",e.onScriptLoad,!1),r.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,r.attachEvent("onreadystatechange",e.onScriptLoad)),r.src=i,currentlyAddingScript=r,baseElement?head.insertBefore(r,baseElement):head.appendChild(r),currentlyAddingScript=null,r;if(isWebWorker)try{importScripts(i),e.completeLoad(t)}catch(r){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+i,r,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),(function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0})),define=function(e,t,i){var r,n;"string"!=typeof e&&(i=t,t=e,e=null),isArray(t)||(i=t,t=null),!t&&isFunction(i)&&(t=[],i.length&&(i.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,(function(e,i){t.push(i)})),t=(1===i.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript())&&(e||(e=r.getAttribute("data-requiremodule")),n=contexts[r.getAttribute("data-requirecontext")]),n?(n.defQueue.push([e,t,i]),n.defQueueMap[e]=!0):globalDefQueue.push([e,t,i])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}function newContext(e){var t,i,r,n,o,a={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},s={},u={},c={},d=[],p={},f={},l={},h=1,m=1;function g(e,t,i){var r,n,o,s,u,c,d,p,f,l,h=t&&t.split("/"),m=a.map,g=m&&m["*"];if(e&&(c=(e=e.split("/")).length-1,a.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),function(e){var t,i;for(t=0;t<e.length;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),i&&m&&(h||g)){e:for(o=(n=e.split("/")).length;o>0;o-=1){if(u=n.slice(0,o).join("/"),h)for(s=h.length;s>0;s-=1)if((r=getOwn(m,h.slice(0,s).join("/")))&&(r=getOwn(r,u))){d=r,p=o;break e}!f&&g&&getOwn(g,u)&&(f=getOwn(g,u),l=o)}!d&&f&&(d=f,p=l),d&&(n.splice(0,p,d),e=n.join("/"))}return getOwn(a.pkgs,e)||e}function v(e){isBrowser&&each(scripts(),(function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===r.contextName)return t.parentNode.removeChild(t),!0}))}function x(e){var t=getOwn(a.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),r.require.undef(e),r.makeRequire(null,{skipMap:!0})([e]),!0}function b(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function q(e,t,i,n){var o,a,s,u,c=null,d=t?t.name:null,f=e,l=!0,v="";return e||(l=!1,e="_@r"+(h+=1)),c=(u=b(e))[0],e=u[1],c&&(c=g(c,d,n),a=getOwn(p,c)),e&&(c?v=a&&a.normalize?a.normalize(e,(function(e){return g(e,d,n)})):-1===e.indexOf("!")?g(e,d,n):e:(c=(u=b(v=g(e,d,n)))[0],v=u[1],i=!0,o=r.nameToUrl(v))),{prefix:c,name:v,parentMap:t,unnormalized:!!(s=!c||a||i?"":"_unnormalized"+(m+=1)),url:o,originalName:f,isDefine:l,id:(c?c+"!"+v:v)+s}}function E(e){var t=e.id,i=getOwn(s,t);return i||(i=s[t]=new r.Module(e)),i}function w(e,t,i){var r=e.id,n=getOwn(s,r);!hasProp(p,r)||n&&!n.defineEmitComplete?(n=E(e)).error&&"error"===t?i(n.error):n.on(t,i):"defined"===t&&i(p[r])}function y(e,t){var i=e.requireModules,r=!1;t?t(e):(each(i,(function(t){var i=getOwn(s,t);i&&(i.error=e,i.events.error&&(r=!0,i.emit("error",e)))})),r||req.onError(e))}function S(){globalDefQueue.length&&(each(globalDefQueue,(function(e){var t=e[0];"string"==typeof t&&(r.defQueueMap[t]=!0),d.push(e)})),globalDefQueue=[])}function k(e){delete s[e],delete u[e]}function M(e,t,i){var r=e.map.id;e.error?e.emit("error",e.error):(t[r]=!0,each(e.depMaps,(function(r,n){var o=r.id,a=getOwn(s,o);!a||e.depMatched[n]||i[o]||(getOwn(t,o)?(e.defineDep(n,p[o]),e.check()):M(a,t,i))})),i[r]=!0)}function O(){var e,i,n=1e3*a.waitSeconds,s=n&&r.startTime+n<(new Date).getTime(),c=[],d=[],p=!1,f=!0;if(!t){if(t=!0,eachProp(u,(function(e){var t=e.map,r=t.id;if(e.enabled&&(t.isDefine||d.push(e),!e.error))if(!e.inited&&s)x(r)?(i=!0,p=!0):(c.push(r),v(r));else if(!e.inited&&e.fetched&&t.isDefine&&(p=!0,!t.prefix))return f=!1})),s&&c.length)return(e=makeError("timeout","Load timeout for modules: "+c,null,c)).contextName=r.contextName,y(e);f&&each(d,(function(e){M(e,{},{})})),s&&!i||!p||!isBrowser&&!isWebWorker||o||(o=setTimeout((function(){o=0,O()}),50)),t=!1}}function j(e){hasProp(p,e[0])||E(q(e[0],null,!0)).init(e[1],e[2])}function P(e,t,i,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(i,t,!1)}function R(e){var t=e.currentTarget||e.srcElement;return P(t,r.onScriptLoad,"load","onreadystatechange"),P(t,r.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function A(){var e;for(S();d.length;){if(null===(e=d.shift())[0])return y(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));j(e)}r.defQueueMap={}}return n={require:function(e){return e.require?e.require:e.require=r.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?p[e.map.id]=e.exports:e.exports=p[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(a.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(i=function(e){this.events=getOwn(c,e.id)||{},this.map=e,this.shim=getOwn(a.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,i,r){r=r||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,(function(e){this.emit("error",e)}))),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,r.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();r.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,(function(){return e.prefix?this.callPlugin():this.load()})))}},load:function(){var e=this.map.url;f[e]||(f[e]=!0,r.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,i=this.map.id,n=this.depExports,o=this.exports,a=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(a)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{o=r.execCb(i,a,n,o)}catch(t){e=t}else o=r.execCb(i,a,n,o);if(this.map.isDefine&&void 0===o&&((t=this.module)?o=t.exports:this.usingExports&&(o=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",y(this.error=e)}else o=a;this.exports=o,this.map.isDefine&&!this.ignore&&(p[i]=o,req.onResourceLoad&&req.onResourceLoad(r,this.map,this.depMaps)),k(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(r.defQueueMap,i)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,i=q(e.prefix);this.depMaps.push(i),w(i,"defined",bind(this,(function(i){var n,o,u,c=getOwn(l,this.map.id),d=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,f=r.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(i.normalize&&(d=i.normalize(d,(function(e){return g(e,p,!0)}))||""),w(o=q(e.prefix+"!"+d,this.map.parentMap),"defined",bind(this,(function(e){this.init([],(function(){return e}),null,{enabled:!0,ignore:!0})}))),void((u=getOwn(s,o.id))&&(this.depMaps.push(o),this.events.error&&u.on("error",bind(this,(function(e){this.emit("error",e)}))),u.enable()))):c?(this.map.url=r.nameToUrl(c),void this.load()):((n=bind(this,(function(e){this.init([],(function(){return e}),null,{enabled:!0})}))).error=bind(this,(function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(s,(function(e){0===e.map.id.indexOf(t+"_unnormalized")&&k(e.map.id)})),y(e)})),n.fromText=bind(this,(function(i,o){var s=e.name,u=q(s),c=useInteractive;o&&(i=o),c&&(useInteractive=!1),E(u),hasProp(a.config,t)&&(a.config[s]=a.config[t]);try{req.exec(i)}catch(e){return y(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}c&&(useInteractive=!0),this.depMaps.push(u),r.completeLoad(s),f([s],n)})),void i.load(e.name,f,n,a))}))),r.enable(i,this),this.pluginMaps[i.id]=i},enable:function(){u[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,(function(e,t){var i,o,a;if("string"==typeof e){if(e=q(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,a=getOwn(n,e.id))return void(this.depExports[t]=a(this));this.depCount+=1,w(e,"defined",bind(this,(function(e){this.undefed||(this.defineDep(t,e),this.check())}))),this.errback?w(e,"error",bind(this,this.errback)):this.events.error&&w(e,"error",bind(this,(function(e){this.emit("error",e)})))}i=e.id,o=s[i],hasProp(n,i)||!o||o.enabled||r.enable(e,this)}))),eachProp(this.pluginMaps,bind(this,(function(e){var t=getOwn(s,e.id);t&&!t.enabled&&r.enable(e,this)}))),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],(function(e){e(t)})),"error"===e&&delete this.events[e]}},r={config:a,contextName:e,registry:s,defined:p,urlFetched:f,defQueue:d,defQueueMap:{},Module:i,makeModuleMap:q,nextTick:req.nextTick,onError:y,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");var t=a.shim,i={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,(function(e,t){i[t]?(a[t]||(a[t]={}),mixin(a[t],e,!0,!0)):a[t]=e})),e.bundles&&eachProp(e.bundles,(function(e,t){each(e,(function(e){e!==t&&(l[e]=t)}))})),e.shim&&(eachProp(e.shim,(function(e,i){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=r.makeShimExports(e)),t[i]=e})),a.shim=t),e.packages&&each(e.packages,(function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(a.paths[t]=e.location),a.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")})),eachProp(s,(function(e,t){e.inited||e.map.unnormalized||(e.map=q(t,null,!0))})),(e.deps||e.callback)&&r.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}},makeRequire:function(t,i){function o(a,u,c){var d,f;return i.enableBuildCallback&&u&&isFunction(u)&&(u.__requireJsBuild=!0),"string"==typeof a?isFunction(u)?y(makeError("requireargs","Invalid require call"),c):t&&hasProp(n,a)?n[a](s[t.id]):req.get?req.get(r,a,t,o):(d=q(a,t,!1,!0).id,hasProp(p,d)?p[d]:y(makeError("notloaded",'Module name "'+d+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(A(),r.nextTick((function(){A(),(f=E(q(null,t))).skipMap=i.skipMap,f.init(a,u,c,{enabled:!0}),O()})),o)}return i=i||{},mixin(o,{isBrowser:isBrowser,toUrl:function(e){var i,n=e.lastIndexOf("."),o=e.split("/")[0];return-1!==n&&(!("."===o||".."===o)||n>1)&&(i=e.substring(n,e.length),e=e.substring(0,n)),r.nameToUrl(g(e,t&&t.id,!0),i,!0)},defined:function(e){return hasProp(p,q(e,t,!1,!0).id)},specified:function(e){return e=q(e,t,!1,!0).id,hasProp(p,e)||hasProp(s,e)}}),t||(o.undef=function(e){S();var i=q(e,t,!0),n=getOwn(s,e);n.undefed=!0,v(e),delete p[e],delete f[i.url],delete c[e],eachReverse(d,(function(t,i){t[0]===e&&d.splice(i,1)})),delete r.defQueueMap[e],n&&(n.events.defined&&(c[e]=n.events),k(e))}),o},enable:function(e){getOwn(s,e.id)&&E(e).enable()},completeLoad:function(e){var t,i,n,o=getOwn(a.shim,e)||{},u=o.exports;for(S();d.length;){if(null===(i=d.shift())[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);j(i)}if(r.defQueueMap={},n=getOwn(s,e),!t&&!hasProp(p,e)&&n&&!n.inited){if(!(!a.enforceDefine||u&&getGlobal(u)))return x(e)?void 0:y(makeError("nodefine","No define call for "+e,null,[e]));j([e,o.deps||[],o.exportsFn])}O()},nameToUrl:function(e,t,i){var n,o,s,u,c,d,p=getOwn(a.pkgs,e);if(p&&(e=p),d=getOwn(l,e))return r.nameToUrl(d,t,i);if(req.jsExtRegExp.test(e))u=e+(t||"");else{for(n=a.paths,s=(o=e.split("/")).length;s>0;s-=1)if(c=getOwn(n,o.slice(0,s).join("/"))){isArray(c)&&(c=c[0]),o.splice(0,s,c);break}u=o.join("/"),u=("/"===(u+=t||(/^data\:|\?/.test(u)||i?"":".js")).charAt(0)||u.match(/^[\w\+\.\-]+:/)?"":a.baseUrl)+u}return a.urlArgs?u+(-1===u.indexOf("?")?"?":"&")+a.urlArgs:u},load:function(e,t){req.load(r,e,t)},execCb:function(e,t,i,r){return t.apply(r,i)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=R(e);r.completeLoad(t.id)}},onScriptError:function(e){var t=R(e);if(!x(t.id))return y(makeError("scripterror","Script error for: "+t.id,e,[t.id]))}},r.require=r.makeRequire(),r}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState||eachReverse(scripts(),(function(e){if("interactive"===e.readyState)return interactiveScript=e})),interactiveScript}}(this); \ No newline at end of file diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/combineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/combineGeometry.js index d7c2b85d..b580b06f 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/combineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/combineGeometry.js @@ -1 +1 @@ -define(["./PrimitivePipeline-370489a0","./createTaskProcessorWorker","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryPipeline-7ffd3f60","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./IndexDatatype-86677ec4","./IntersectionTests-6e80d61c","./Plane-33393da8","./WebMercatorProjection-ee891935"],(function(e,t,r,a,n,c,i,o,s,b,d,f,m,u,C,p,k,y,l,G,P,h,v,A){"use strict";return t((function(t,r){var a=e.k.unpackCombineGeometryParameters(t),n=e.k.combineGeometry(a);return e.k.packCombineGeometryResults(n,r)}))})); +define(["./PrimitivePipeline-21bb3b56","./createTaskProcessorWorker","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryPipeline-50805727","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./IndexDatatype-86677ec4","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./WebMercatorProjection-ee891935"],(function(e,t,r,a,n,c,i,o,b,s,d,m,u,f,C,p,k,y,l,G,P,h,v,A){"use strict";return t((function(t,r){var a=e.k.unpackCombineGeometryParameters(t),n=e.k.combineGeometry(a);return e.k.packCombineGeometryResults(n,r)}))})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createBoxGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createBoxGeometry.js index 859be59a..4194bbbe 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createBoxGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createBoxGeometry.js @@ -1 +1 @@ -define(["./BoxGeometry-6f820c56","./when-92c6cf3c","./arrayFill-0358accf","./Check-52a7d806","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./VertexFormat-f496a3f1"],(function(e,t,r,a,c,n,f,o,i,b,u,d,s,m,y,C,G,l,h){"use strict";return function(r,a){return t.e(a)&&(r=e.O.unpack(r,a)),e.O.createGeometry(r)}})); +define(["./BoxGeometry-74de4379","./when-92c6cf3c","./arrayFill-0358accf","./Check-52a7d806","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./VertexFormat-f496a3f1"],(function(e,t,a,r,c,n,f,o,i,d,u,b,s,m,y,C,G,l,h){"use strict";return function(a,r){return t.e(r)&&(a=e.O.unpack(a,r)),e.O.createGeometry(a)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createBoxOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createBoxOutlineGeometry.js index d1aad622..7d167316 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createBoxOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createBoxOutlineGeometry.js @@ -1 +1 @@ -define(["./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./when-92c6cf3c","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./FeatureDetection-cec0163f","./Cartographic-a2c313d7","./Math-ecf82623","./Cartesian2-b72655a5","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e"],(function(e,t,n,o,i,r,a,u,m,f,s,c,b,p,y,d,x){"use strict";var A=new n.o;function l(e){var t=(e=r.u(e,r.u.EMPTY_OBJECT)).minimum,i=e.maximum;if(o.o.typeOf.object("min",t),o.o.typeOf.object("max",i),r.e(e.offsetAttribute)&&e.offsetAttribute===m.z.TOP)throw new o.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=n.o.clone(t),this._max=n.o.clone(i),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}l.fromDimensions=function(e){var t=(e=r.u(e,r.u.EMPTY_OBJECT)).dimensions;o.o.typeOf.object("dimensions",t),o.o.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),o.o.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),o.o.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=n.o.multiplyByScalar(t,.5,new n.o);return new l({minimum:n.o.negate(i,new n.o),maximum:i,offsetAttribute:e.offsetAttribute})},l.fromAxisAlignedBoundingBox=function(e){return o.o.typeOf.object("boundindBox",e),new l({minimum:e.minimum,maximum:e.maximum})},l.packedLength=2*n.o.packedLength+1,l.pack=function(e,t,i){return o.o.typeOf.object("value",e),o.o.defined("array",t),i=r.u(i,0),n.o.pack(e._min,t,i),n.o.pack(e._max,t,i+n.o.packedLength),t[i+2*n.o.packedLength]=r.u(e._offsetAttribute,-1),t};var O=new n.o,h=new n.o,_={minimum:O,maximum:h,offsetAttribute:void 0};return l.unpack=function(e,t,i){o.o.defined("array",e),t=r.u(t,0);var a=n.o.unpack(e,t,O),u=n.o.unpack(e,t+n.o.packedLength,h),m=e[t+2*n.o.packedLength];return r.e(i)?(i._min=n.o.clone(a,i._min),i._max=n.o.clone(u,i._max),i._offsetAttribute=-1===m?void 0:m,i):(_.offsetAttribute=-1===m?void 0:m,new l(_))},l.createGeometry=function(o){var s=o._min,c=o._max;if(!n.o.equals(s,c)){var b=new u.a,p=new Uint16Array(24),y=new Float64Array(24);y[0]=s.x,y[1]=s.y,y[2]=s.z,y[3]=c.x,y[4]=s.y,y[5]=s.z,y[6]=c.x,y[7]=c.y,y[8]=s.z,y[9]=s.x,y[10]=c.y,y[11]=s.z,y[12]=s.x,y[13]=s.y,y[14]=c.z,y[15]=c.x,y[16]=s.y,y[17]=c.z,y[18]=c.x,y[19]=c.y,y[20]=c.z,y[21]=s.x,y[22]=c.y,y[23]=c.z,b.position=new a.o({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:y}),p[0]=4,p[1]=5,p[2]=5,p[3]=6,p[4]=6,p[5]=7,p[6]=7,p[7]=4,p[8]=0,p[9]=1,p[10]=1,p[11]=2,p[12]=2,p[13]=3,p[14]=3,p[15]=0,p[16]=0,p[17]=4,p[18]=1,p[19]=5,p[20]=2,p[21]=6,p[22]=3,p[23]=7;var d=n.o.subtract(c,s,A),x=.5*n.o.magnitude(d);if(r.e(o._offsetAttribute)){var l=y.length,O=new Uint8Array(l/3),h=o._offsetAttribute===m.z.NONE?0:1;e.d(O,h),b.applyOffset=new a.o({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})}return new a.I({attributes:b,indices:p,primitiveType:f._0x4b6a27.LINES,boundingSphere:new t.i(n.o.ZERO,x),offsetAttribute:o._offsetAttribute})}},function(e,t){return r.e(t)&&(e=l.unpack(e,t)),l.createGeometry(e)}})); +define(["./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./when-92c6cf3c","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./FeatureDetection-fd297af4","./Cartographic-a2c313d7","./Math-ecf82623","./Cartesian2-b72655a5","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e"],(function(e,t,n,o,i,r,a,u,m,f,c,s,p,b,y,d,x){"use strict";var A=new n.o;function l(e){var t=(e=r.u(e,r.u.EMPTY_OBJECT)).minimum,i=e.maximum;if(o.o.typeOf.object("min",t),o.o.typeOf.object("max",i),r.e(e.offsetAttribute)&&e.offsetAttribute===m.z.TOP)throw new o.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=n.o.clone(t),this._max=n.o.clone(i),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}l.fromDimensions=function(e){var t=(e=r.u(e,r.u.EMPTY_OBJECT)).dimensions;o.o.typeOf.object("dimensions",t),o.o.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),o.o.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),o.o.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=n.o.multiplyByScalar(t,.5,new n.o);return new l({minimum:n.o.negate(i,new n.o),maximum:i,offsetAttribute:e.offsetAttribute})},l.fromAxisAlignedBoundingBox=function(e){return o.o.typeOf.object("boundindBox",e),new l({minimum:e.minimum,maximum:e.maximum})},l.packedLength=2*n.o.packedLength+1,l.pack=function(e,t,i){return o.o.typeOf.object("value",e),o.o.defined("array",t),i=r.u(i,0),n.o.pack(e._min,t,i),n.o.pack(e._max,t,i+n.o.packedLength),t[i+2*n.o.packedLength]=r.u(e._offsetAttribute,-1),t};var O=new n.o,h=new n.o,_={minimum:O,maximum:h,offsetAttribute:void 0};return l.unpack=function(e,t,i){o.o.defined("array",e),t=r.u(t,0);var a=n.o.unpack(e,t,O),u=n.o.unpack(e,t+n.o.packedLength,h),m=e[t+2*n.o.packedLength];return r.e(i)?(i._min=n.o.clone(a,i._min),i._max=n.o.clone(u,i._max),i._offsetAttribute=-1===m?void 0:m,i):(_.offsetAttribute=-1===m?void 0:m,new l(_))},l.createGeometry=function(o){var c=o._min,s=o._max;if(!n.o.equals(c,s)){var p=new u.a,b=new Uint16Array(24),y=new Float64Array(24);y[0]=c.x,y[1]=c.y,y[2]=c.z,y[3]=s.x,y[4]=c.y,y[5]=c.z,y[6]=s.x,y[7]=s.y,y[8]=c.z,y[9]=c.x,y[10]=s.y,y[11]=c.z,y[12]=c.x,y[13]=c.y,y[14]=s.z,y[15]=s.x,y[16]=c.y,y[17]=s.z,y[18]=s.x,y[19]=s.y,y[20]=s.z,y[21]=c.x,y[22]=s.y,y[23]=s.z,p.position=new a.o({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:y}),b[0]=4,b[1]=5,b[2]=5,b[3]=6,b[4]=6,b[5]=7,b[6]=7,b[7]=4,b[8]=0,b[9]=1,b[10]=1,b[11]=2,b[12]=2,b[13]=3,b[14]=3,b[15]=0,b[16]=0,b[17]=4,b[18]=1,b[19]=5,b[20]=2,b[21]=6,b[22]=3,b[23]=7;var d=n.o.subtract(s,c,A),x=.5*n.o.magnitude(d);if(r.e(o._offsetAttribute)){var l=y.length,O=new Uint8Array(l/3),h=o._offsetAttribute===m.z.NONE?0:1;e.d(O,h),p.applyOffset=new a.o({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})}return new a.I({attributes:p,indices:b,primitiveType:f._0x3b3836.LINES,boundingSphere:new t.i(n.o.ZERO,x),offsetAttribute:o._offsetAttribute})}},function(e,t){return r.e(t)&&(e=l.unpack(e,t)),l.createGeometry(e)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createCircleGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createCircleGeometry.js index 2b3d73c6..3660b9ab 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createCircleGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createCircleGeometry.js @@ -1 +1 @@ -define(["./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./EllipseGeometry-d4f5e042","./Cartesian2-b72655a5","./VertexFormat-f496a3f1","./Math-ecf82623","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartographic-a2c313d7","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./EllipseGeometryLibrary-30d7e702","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryInstance-3190c1b4","./GeometryOffsetAttribute-b4d599f5","./GeometryPipeline-7ffd3f60","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./IndexDatatype-86677ec4","./IntersectionTests-6e80d61c","./Plane-33393da8"],(function(e,t,r,i,o,n,a,s,l,d,c,u,m,p,y,_,h,f,x,G,g,b,v,w,A,M,C){"use strict";function R(e){var o=(e=r.u(e,r.u.EMPTY_OBJECT)).radius;t.o.typeOf.number("radius",o);var n={center:e.center,semiMajorAxis:o,semiMinorAxis:o,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new i.Y(n),this._workerName="createCircleGeometry"}R.packedLength=i.Y.packedLength,R.pack=function(e,r,o){return t.o.typeOf.object("value",e),i.Y.pack(e._ellipseGeometry,r,o)};var F=new i.Y({center:new e.o,semiMajorAxis:1,semiMinorAxis:1}),j={center:new e.o,radius:void 0,ellipsoid:o.t.clone(o.t.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new n.n,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return R.unpack=function(t,a,s){var l=i.Y.unpack(t,a,F);return j.center=e.o.clone(l._center,j.center),j.ellipsoid=o.t.clone(l._ellipsoid,j.ellipsoid),j.height=l._height,j.extrudedHeight=l._extrudedHeight,j.granularity=l._granularity,j.vertexFormat=n.n.clone(l._vertexFormat,j.vertexFormat),j.stRotation=l._stRotation,j.shadowVolume=l._shadowVolume,r.e(s)?(j.semiMajorAxis=l._semiMajorAxis,j.semiMinorAxis=l._semiMinorAxis,s._ellipseGeometry=new i.Y(j),s):(j.radius=l._semiMajorAxis,new R(j))},R.createGeometry=function(e){return i.Y.createGeometry(e._ellipseGeometry)},R.createShadowVolume=function(e,t,r){var i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,a=t(i,o),s=r(i,o);return new R({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:a,height:s,vertexFormat:n.n.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(R.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(t,i){return r.e(i)&&(t=R.unpack(t,i)),t._ellipseGeometry._center=e.o.clone(t._ellipseGeometry._center),t._ellipseGeometry._ellipsoid=o.t.clone(t._ellipseGeometry._ellipsoid),R.createGeometry(t)}})); +define(["./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./EllipseGeometry-4cb468e4","./Cartesian2-b72655a5","./VertexFormat-f496a3f1","./Math-ecf82623","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartographic-a2c313d7","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./EllipseGeometryLibrary-5f302d9d","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryInstance-20be787d","./GeometryOffsetAttribute-b4d599f5","./GeometryPipeline-50805727","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./IndexDatatype-86677ec4","./IntersectionTests-9ff29c98","./Plane-a2c6da7b"],(function(e,t,r,i,o,n,a,s,l,c,d,u,m,p,y,_,h,f,x,G,g,b,v,w,A,M,C){"use strict";function R(e){var o=(e=r.u(e,r.u.EMPTY_OBJECT)).radius;t.o.typeOf.number("radius",o);var n={center:e.center,semiMajorAxis:o,semiMinorAxis:o,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new i.Y(n),this._workerName="createCircleGeometry"}R.packedLength=i.Y.packedLength,R.pack=function(e,r,o){return t.o.typeOf.object("value",e),i.Y.pack(e._ellipseGeometry,r,o)};var F=new i.Y({center:new e.o,semiMajorAxis:1,semiMinorAxis:1}),j={center:new e.o,radius:void 0,ellipsoid:o.t.clone(o.t.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new n.n,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return R.unpack=function(t,a,s){var l=i.Y.unpack(t,a,F);return j.center=e.o.clone(l._center,j.center),j.ellipsoid=o.t.clone(l._ellipsoid,j.ellipsoid),j.height=l._height,j.extrudedHeight=l._extrudedHeight,j.granularity=l._granularity,j.vertexFormat=n.n.clone(l._vertexFormat,j.vertexFormat),j.stRotation=l._stRotation,j.shadowVolume=l._shadowVolume,r.e(s)?(j.semiMajorAxis=l._semiMajorAxis,j.semiMinorAxis=l._semiMinorAxis,s._ellipseGeometry=new i.Y(j),s):(j.radius=l._semiMajorAxis,new R(j))},R.createGeometry=function(e){return i.Y.createGeometry(e._ellipseGeometry)},R.createShadowVolume=function(e,t,r){var i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,a=t(i,o),s=r(i,o);return new R({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:a,height:s,vertexFormat:n.n.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(R.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(t,i){return r.e(i)&&(t=R.unpack(t,i)),t._ellipseGeometry._center=e.o.clone(t._ellipseGeometry._center),t._ellipseGeometry._ellipsoid=o.t.clone(t._ellipseGeometry._ellipsoid),R.createGeometry(t)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createCircleOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createCircleOutlineGeometry.js index 5a16f20e..71197c42 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createCircleOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createCircleOutlineGeometry.js @@ -1 +1 @@ -define(["./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./EllipseOutlineGeometry-65786d3b","./Cartesian2-b72655a5","./Math-ecf82623","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartographic-a2c313d7","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./EllipseGeometryLibrary-30d7e702","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4"],(function(e,i,t,r,n,o,a,l,s,c,u,d,m,p,y,f,_,h,b,M){"use strict";function g(e){var n=(e=t.u(e,t.u.EMPTY_OBJECT)).radius;i.o.typeOf.number("radius",n);var o={center:e.center,semiMajorAxis:n,semiMinorAxis:n,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new r.M(o),this._workerName="createCircleOutlineGeometry"}g.packedLength=r.M.packedLength,g.pack=function(e,t,n){return i.o.typeOf.object("value",e),r.M.pack(e._ellipseGeometry,t,n)};var G=new r.M({center:new e.o,semiMajorAxis:1,semiMinorAxis:1}),x={center:new e.o,radius:void 0,ellipsoid:n.t.clone(n.t.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};return g.unpack=function(i,o,a){var l=r.M.unpack(i,o,G);return x.center=e.o.clone(l._center,x.center),x.ellipsoid=n.t.clone(l._ellipsoid,x.ellipsoid),x.height=l._height,x.extrudedHeight=l._extrudedHeight,x.granularity=l._granularity,x.numberOfVerticalLines=l._numberOfVerticalLines,t.e(a)?(x.semiMajorAxis=l._semiMajorAxis,x.semiMinorAxis=l._semiMinorAxis,a._ellipseGeometry=new r.M(x),a):(x.radius=l._semiMajorAxis,new g(x))},g.createGeometry=function(e){return r.M.createGeometry(e._ellipseGeometry)},function(i,r){return t.e(r)&&(i=g.unpack(i,r)),i._ellipseGeometry._center=e.o.clone(i._ellipseGeometry._center),i._ellipseGeometry._ellipsoid=n.t.clone(i._ellipseGeometry._ellipsoid),g.createGeometry(i)}})); +define(["./Cartesian3-3a8bdb0b","./Check-52a7d806","./when-92c6cf3c","./EllipseOutlineGeometry-50eb422d","./Cartesian2-b72655a5","./Math-ecf82623","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartographic-a2c313d7","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./EllipseGeometryLibrary-5f302d9d","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4"],(function(e,i,t,r,n,a,o,l,s,c,d,u,m,p,y,f,_,h,b,M){"use strict";function g(e){var n=(e=t.u(e,t.u.EMPTY_OBJECT)).radius;i.o.typeOf.number("radius",n);var a={center:e.center,semiMajorAxis:n,semiMinorAxis:n,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new r.M(a),this._workerName="createCircleOutlineGeometry"}g.packedLength=r.M.packedLength,g.pack=function(e,t,n){return i.o.typeOf.object("value",e),r.M.pack(e._ellipseGeometry,t,n)};var G=new r.M({center:new e.o,semiMajorAxis:1,semiMinorAxis:1}),x={center:new e.o,radius:void 0,ellipsoid:n.t.clone(n.t.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};return g.unpack=function(i,a,o){var l=r.M.unpack(i,a,G);return x.center=e.o.clone(l._center,x.center),x.ellipsoid=n.t.clone(l._ellipsoid,x.ellipsoid),x.height=l._height,x.extrudedHeight=l._extrudedHeight,x.granularity=l._granularity,x.numberOfVerticalLines=l._numberOfVerticalLines,t.e(o)?(x.semiMajorAxis=l._semiMajorAxis,x.semiMinorAxis=l._semiMinorAxis,o._ellipseGeometry=new r.M(x),o):(x.radius=l._semiMajorAxis,new g(x))},g.createGeometry=function(e){return r.M.createGeometry(e._ellipseGeometry)},function(i,r){return t.e(r)&&(i=g.unpack(i,r)),i._ellipseGeometry._center=e.o.clone(i._ellipseGeometry._center),i._ellipseGeometry._ellipsoid=n.t.clone(i._ellipseGeometry._ellipsoid),g.createGeometry(i)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createCoplanarPolygonGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createCoplanarPolygonGeometry.js index 80ee4f33..078e42c5 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createCoplanarPolygonGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createCoplanarPolygonGeometry.js @@ -1 +1 @@ -define(["./arrayRemoveDuplicates-a6924649","./BoundingRectangle-82c0e2a7","./buildModuleUrl-9eef8841","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./CoplanarPolygonGeometryLibrary-e7538f09","./when-92c6cf3c","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryInstance-3190c1b4","./GeometryPipeline-7ffd3f60","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-cec0163f","./PolygonGeometryLibrary-c16a4c7e","./PolygonPipeline-425528b3","./VertexFormat-f496a3f1","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./OrientedBoundingBox-d2eb0b92","./Cartesian4-72b88c9e","./EllipsoidTangentPlane-d6b88a1f","./IntersectionTests-6e80d61c","./Plane-33393da8","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./ArcType-31298545","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,n,o,a,r,i,p,c,s,l,y,u,d,g,m,v,h,b,f,w,A,P,x,D,F,T,_,k,L,E,C){"use strict";var R=new a.o,I=new t.f,H=new o.o,G=new o.o,O=new a.o,B=new a.o,$=new a.o,z=new a.o,N=new a.o,S=new a.o,j=new s.n,M=new m.p$1,U=new m.p$1,V=new a.o;function Y(e,t,n,r,p,c,y,u){var v=e.positions,b=h.A.triangulate(e.positions2D,e.holes);b.length<3&&(b=[0,1,2]);var f=d.IndexDatatype.createTypedArray(v.length,b.length);f.set(b);var w=M;if(0!==r){var A=s.n.fromAxisAngle(c,r,j);if(w=m.p$1.fromQuaternion(A,w),t.tangent||t.bitangent){A=s.n.fromAxisAngle(c,-r,j);var P=m.p$1.fromQuaternion(A,U);y=a.o.normalize(m.p$1.multiplyByVector(P,y,y),y),t.bitangent&&(u=a.o.normalize(a.o.cross(c,y,u),u))}}else w=m.p$1.clone(m.p$1.IDENTITY,w);var x=G;t.st&&(x.x=n.x,x.y=n.y);for(var D=v.length,F=3*D,T=new Float64Array(F),_=t.normal?new Float32Array(F):void 0,k=t.tangent?new Float32Array(F):void 0,L=t.bitangent?new Float32Array(F):void 0,E=t.st?new Float32Array(2*D):void 0,C=0,I=0,O=0,B=0,$=0,z=0;z<D;z++){var N=v[z];if(T[C++]=N.x,T[C++]=N.y,T[C++]=N.z,t.st){var S=p(m.p$1.multiplyByVector(w,N,R),H);o.o.subtract(S,x,S);var V=g.e.clamp(S.x/n.width,0,1),Y=g.e.clamp(S.y/n.height,0,1);E[$++]=V,E[$++]=Y}t.normal&&(_[I++]=c.x,_[I++]=c.y,_[I++]=c.z),t.tangent&&(k[B++]=y.x,k[B++]=y.y,k[B++]=y.z),t.bitangent&&(L[O++]=u.x,L[O++]=u.y,L[O++]=u.z)}var q=new l.a;return t.position&&(q.position=new s.o({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:T})),t.normal&&(q.normal=new s.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:_})),t.tangent&&(q.tangent=new s.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:k})),t.bitangent&&(q.bitangent=new s.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),t.st&&(q.st=new s.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:E})),new s.I({attributes:q,indices:f,primitiveType:m._0x4b6a27.TRIANGLES})}function q(e){var t=(e=c.u(e,c.u.EMPTY_OBJECT)).polygonHierarchy;r.o.defined("options.polygonHierarchy",t);var n=c.u(e.vertexFormat,b.n.DEFAULT);this._vertexFormat=b.n.clone(n),this._polygonHierarchy=t,this._stRotation=c.u(e.stRotation,0),this._ellipsoid=o.t.clone(c.u(e.ellipsoid,o.t.WGS84)),this._workerName="createCoplanarPolygonGeometry",this.packedLength=v.y.computeHierarchyPackedLength(t)+b.n.packedLength+o.t.packedLength+2}q.fromPositions=function(e){return e=c.u(e,c.u.EMPTY_OBJECT),r.o.defined("options.positions",e.positions),new q({polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid})},q.pack=function(e,t,n){return r.o.typeOf.object("value",e),r.o.defined("array",t),n=c.u(n,0),n=v.y.packPolygonHierarchy(e._polygonHierarchy,t,n),o.t.pack(e._ellipsoid,t,n),n+=o.t.packedLength,b.n.pack(e._vertexFormat,t,n),n+=b.n.packedLength,t[n++]=e._stRotation,t[n]=e.packedLength,t};var J=o.t.clone(o.t.UNIT_SPHERE),Q=new b.n,W={polygonHierarchy:{}};return q.unpack=function(e,t,n){r.o.defined("array",e),t=c.u(t,0);var a=v.y.unpackPolygonHierarchy(e,t);t=a.startingIndex,delete a.startingIndex;var i=o.t.unpack(e,t,J);t+=o.t.packedLength;var p=b.n.unpack(e,t,Q);t+=b.n.packedLength;var s=e[t++],l=e[t];return c.e(n)||(n=new q(W)),n._polygonHierarchy=a,n._ellipsoid=o.t.clone(i,n._ellipsoid),n._vertexFormat=b.n.clone(p,n._vertexFormat),n._stRotation=s,n.packedLength=l,n},q.createGeometry=function(t){var o=t._vertexFormat,r=t._polygonHierarchy,i=t._stRotation,c=r.positions;if(!((c=e.D(c,a.o.equalsEpsilon,!0)).length<3)){var l=O,m=B,h=$,b=N,f=S;if(p.g.computeProjectTo2DArguments(c,z,b,f)){if(l=a.o.cross(b,f,l),l=a.o.normalize(l,l),!a.o.equalsEpsilon(z,a.o.ZERO,g.e.EPSILON6)){var w=t._ellipsoid.geodeticSurfaceNormal(z,V);a.o.dot(l,w)<0&&(l=a.o.negate(l,l),b=a.o.negate(b,b))}var A=p.g.createProjectPointsTo2DFunction(z,b,f),P=p.g.createProjectPointTo2DFunction(z,b,f);o.tangent&&(m=a.o.clone(b,m)),o.bitangent&&(h=a.o.clone(f,h));var x=v.y.polygonsFromHierarchy(r,A,!1),D=x.hierarchy,F=x.polygons;if(0!==D.length){c=D[0].outerRing;for(var T=n.i.fromPoints(c),_=v.y.computeBoundingRectangle(l,P,c,i,I),k=[],L=0;L<F.length;L++){var E=new y.d({geometry:Y(F[L],o,_,i,P,l,m,h)});k.push(E)}var C=u.k.combineInstances(k)[0];C.attributes.position.values=new Float64Array(C.attributes.position.values),C.indices=d.IndexDatatype.createTypedArray(C.attributes.position.values.length/3,C.indices);var R=C.attributes;return o.position||delete R.position,new s.I({attributes:R,indices:C.indices,primitiveType:C.primitiveType,boundingSphere:T})}}}},function(e,t){return c.e(t)&&(e=q.unpack(e,t)),q.createGeometry(e)}})); +define(["./arrayRemoveDuplicates-a6924649","./BoundingRectangle-44af9dd4","./buildModuleUrl-cbcc8c56","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./CoplanarPolygonGeometryLibrary-733c8399","./when-92c6cf3c","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryInstance-20be787d","./GeometryPipeline-50805727","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-fd297af4","./PolygonGeometryLibrary-eea5d80b","./PolygonPipeline-c329dec3","./VertexFormat-f496a3f1","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./OrientedBoundingBox-42d3d74a","./Cartesian4-72b88c9e","./EllipsoidTangentPlane-c500945e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./ArcType-31298545","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,n,o,a,r,i,c,p,s,l,y,u,d,g,m,v,h,b,f,w,A,P,x,D,F,T,_,k,L,E,C){"use strict";var R=new a.o,I=new t.f,H=new o.o,G=new o.o,O=new a.o,B=new a.o,$=new a.o,z=new a.o,N=new a.o,S=new a.o,j=new s.n,M=new m.p$1,U=new m.p$1,V=new a.o;function Y(e,t,n,r,c,p,y,u){var v=e.positions,b=h.A.triangulate(e.positions2D,e.holes);b.length<3&&(b=[0,1,2]);var f=d.IndexDatatype.createTypedArray(v.length,b.length);f.set(b);var w=M;if(0!==r){var A=s.n.fromAxisAngle(p,r,j);if(w=m.p$1.fromQuaternion(A,w),t.tangent||t.bitangent){A=s.n.fromAxisAngle(p,-r,j);var P=m.p$1.fromQuaternion(A,U);y=a.o.normalize(m.p$1.multiplyByVector(P,y,y),y),t.bitangent&&(u=a.o.normalize(a.o.cross(p,y,u),u))}}else w=m.p$1.clone(m.p$1.IDENTITY,w);var x=G;t.st&&(x.x=n.x,x.y=n.y);for(var D=v.length,F=3*D,T=new Float64Array(F),_=t.normal?new Float32Array(F):void 0,k=t.tangent?new Float32Array(F):void 0,L=t.bitangent?new Float32Array(F):void 0,E=t.st?new Float32Array(2*D):void 0,C=0,I=0,O=0,B=0,$=0,z=0;z<D;z++){var N=v[z];if(T[C++]=N.x,T[C++]=N.y,T[C++]=N.z,t.st){var S=c(m.p$1.multiplyByVector(w,N,R),H);o.o.subtract(S,x,S);var V=g.e.clamp(S.x/n.width,0,1),Y=g.e.clamp(S.y/n.height,0,1);E[$++]=V,E[$++]=Y}t.normal&&(_[I++]=p.x,_[I++]=p.y,_[I++]=p.z),t.tangent&&(k[B++]=y.x,k[B++]=y.y,k[B++]=y.z),t.bitangent&&(L[O++]=u.x,L[O++]=u.y,L[O++]=u.z)}var q=new l.a;return t.position&&(q.position=new s.o({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:T})),t.normal&&(q.normal=new s.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:_})),t.tangent&&(q.tangent=new s.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:k})),t.bitangent&&(q.bitangent=new s.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),t.st&&(q.st=new s.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:E})),new s.I({attributes:q,indices:f,primitiveType:m._0x3b3836.TRIANGLES})}function q(e){var t=(e=p.u(e,p.u.EMPTY_OBJECT)).polygonHierarchy;r.o.defined("options.polygonHierarchy",t);var n=p.u(e.vertexFormat,b.n.DEFAULT);this._vertexFormat=b.n.clone(n),this._polygonHierarchy=t,this._stRotation=p.u(e.stRotation,0),this._ellipsoid=o.t.clone(p.u(e.ellipsoid,o.t.WGS84)),this._workerName="createCoplanarPolygonGeometry",this.packedLength=v.y.computeHierarchyPackedLength(t)+b.n.packedLength+o.t.packedLength+2}q.fromPositions=function(e){return e=p.u(e,p.u.EMPTY_OBJECT),r.o.defined("options.positions",e.positions),new q({polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid})},q.pack=function(e,t,n){return r.o.typeOf.object("value",e),r.o.defined("array",t),n=p.u(n,0),n=v.y.packPolygonHierarchy(e._polygonHierarchy,t,n),o.t.pack(e._ellipsoid,t,n),n+=o.t.packedLength,b.n.pack(e._vertexFormat,t,n),n+=b.n.packedLength,t[n++]=e._stRotation,t[n]=e.packedLength,t};var J=o.t.clone(o.t.UNIT_SPHERE),Q=new b.n,W={polygonHierarchy:{}};return q.unpack=function(e,t,n){r.o.defined("array",e),t=p.u(t,0);var a=v.y.unpackPolygonHierarchy(e,t);t=a.startingIndex,delete a.startingIndex;var i=o.t.unpack(e,t,J);t+=o.t.packedLength;var c=b.n.unpack(e,t,Q);t+=b.n.packedLength;var s=e[t++],l=e[t];return p.e(n)||(n=new q(W)),n._polygonHierarchy=a,n._ellipsoid=o.t.clone(i,n._ellipsoid),n._vertexFormat=b.n.clone(c,n._vertexFormat),n._stRotation=s,n.packedLength=l,n},q.createGeometry=function(t){var o=t._vertexFormat,r=t._polygonHierarchy,i=t._stRotation,p=r.positions;if(!((p=e.D(p,a.o.equalsEpsilon,!0)).length<3)){var l=O,m=B,h=$,b=N,f=S;if(c.g.computeProjectTo2DArguments(p,z,b,f)){if(l=a.o.cross(b,f,l),l=a.o.normalize(l,l),!a.o.equalsEpsilon(z,a.o.ZERO,g.e.EPSILON6)){var w=t._ellipsoid.geodeticSurfaceNormal(z,V);a.o.dot(l,w)<0&&(l=a.o.negate(l,l),b=a.o.negate(b,b))}var A=c.g.createProjectPointsTo2DFunction(z,b,f),P=c.g.createProjectPointTo2DFunction(z,b,f);o.tangent&&(m=a.o.clone(b,m)),o.bitangent&&(h=a.o.clone(f,h));var x=v.y.polygonsFromHierarchy(r,A,!1),D=x.hierarchy,F=x.polygons;if(0!==D.length){p=D[0].outerRing;for(var T=n.i.fromPoints(p),_=v.y.computeBoundingRectangle(l,P,p,i,I),k=[],L=0;L<F.length;L++){var E=new y.d({geometry:Y(F[L],o,_,i,P,l,m,h)});k.push(E)}var C=u.k.combineInstances(k)[0];C.attributes.position.values=new Float64Array(C.attributes.position.values),C.indices=d.IndexDatatype.createTypedArray(C.attributes.position.values.length/3,C.indices);var R=C.attributes;return o.position||delete R.position,new s.I({attributes:R,indices:C.indices,primitiveType:C.primitiveType,boundingSphere:T})}}}},function(e,t){return p.e(t)&&(e=q.unpack(e,t)),q.createGeometry(e)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createCoplanarPolygonOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createCoplanarPolygonOutlineGeometry.js index e853e514..90e1a2c5 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createCoplanarPolygonOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createCoplanarPolygonOutlineGeometry.js @@ -1 +1 @@ -define(["./arrayRemoveDuplicates-a6924649","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./CoplanarPolygonGeometryLibrary-e7538f09","./when-92c6cf3c","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryInstance-3190c1b4","./GeometryPipeline-7ffd3f60","./IndexDatatype-86677ec4","./PolygonGeometryLibrary-c16a4c7e","./FeatureDetection-cec0163f","./Cartesian2-b72655a5","./Math-ecf82623","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./OrientedBoundingBox-d2eb0b92","./Cartesian4-72b88c9e","./EllipsoidTangentPlane-d6b88a1f","./IntersectionTests-6e80d61c","./Plane-33393da8","./PolygonPipeline-425528b3","./EllipsoidRhumbLine-b1a766ae","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./ArcType-31298545"],(function(e,n,t,r,o,i,a,c,y,p,s,d,l,u,f,b,g,h,m,v,P,C,k,E,H,T,w,G,I,L){"use strict";function _(e){for(var n=e.length,t=new Float64Array(3*n),r=d.IndexDatatype.createTypedArray(n,2*n),i=0,a=0,p=0;p<n;p++){var s=e[p];t[i++]=s.x,t[i++]=s.y,t[i++]=s.z,r[a++]=p,r[a++]=(p+1)%n}var l=new y.a({position:new c.o({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:t})});return new c.I({attributes:l,indices:r,primitiveType:u._0x4b6a27.LINES})}function D(e){var n=(e=a.u(e,a.u.EMPTY_OBJECT)).polygonHierarchy;r.o.defined("options.polygonHierarchy",n),this._polygonHierarchy=n,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=l.y.computeHierarchyPackedLength(n)+1}D.fromPositions=function(e){return e=a.u(e,a.u.EMPTY_OBJECT),r.o.defined("options.positions",e.positions),new D({polygonHierarchy:{positions:e.positions}})},D.pack=function(e,n,t){return r.o.typeOf.object("value",e),r.o.defined("array",n),t=a.u(t,0),n[t=l.y.packPolygonHierarchy(e._polygonHierarchy,n,t)]=e.packedLength,n};var O={polygonHierarchy:{}};return D.unpack=function(e,n,t){r.o.defined("array",e),n=a.u(n,0);var o=l.y.unpackPolygonHierarchy(e,n);n=o.startingIndex,delete o.startingIndex;var i=e[n];return a.e(t)||(t=new D(O)),t._polygonHierarchy=o,t.packedLength=i,t},D.createGeometry=function(r){var o=r._polygonHierarchy,a=o.positions;if(!((a=e.D(a,t.o.equalsEpsilon,!0)).length<3)&&i.g.validOutline(a)){var y=l.y.polygonOutlinesFromHierarchy(o,!1);if(0!==y.length){for(var d=[],u=0;u<y.length;u++){var f=new p.d({geometry:_(y[u])});d.push(f)}var b=s.k.combineInstances(d)[0],g=n.i.fromPoints(o.positions);return new c.I({attributes:b.attributes,indices:b.indices,primitiveType:b.primitiveType,boundingSphere:g})}}},function(e,n){return a.e(n)&&(e=D.unpack(e,n)),e._ellipsoid=f.t.clone(e._ellipsoid),D.createGeometry(e)}})); +define(["./arrayRemoveDuplicates-a6924649","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./CoplanarPolygonGeometryLibrary-733c8399","./when-92c6cf3c","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryInstance-20be787d","./GeometryPipeline-50805727","./IndexDatatype-86677ec4","./PolygonGeometryLibrary-eea5d80b","./FeatureDetection-fd297af4","./Cartesian2-b72655a5","./Math-ecf82623","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./OrientedBoundingBox-42d3d74a","./Cartesian4-72b88c9e","./EllipsoidTangentPlane-c500945e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./PolygonPipeline-c329dec3","./EllipsoidRhumbLine-b1a766ae","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./ArcType-31298545"],(function(e,n,t,r,o,i,a,c,y,p,s,d,l,u,g,f,h,b,m,v,P,C,k,E,H,T,w,G,I,L){"use strict";function _(e){for(var n=e.length,t=new Float64Array(3*n),r=d.IndexDatatype.createTypedArray(n,2*n),i=0,a=0,p=0;p<n;p++){var s=e[p];t[i++]=s.x,t[i++]=s.y,t[i++]=s.z,r[a++]=p,r[a++]=(p+1)%n}var l=new y.a({position:new c.o({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:t})});return new c.I({attributes:l,indices:r,primitiveType:u._0x3b3836.LINES})}function D(e){var n=(e=a.u(e,a.u.EMPTY_OBJECT)).polygonHierarchy;r.o.defined("options.polygonHierarchy",n),this._polygonHierarchy=n,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=l.y.computeHierarchyPackedLength(n)+1}D.fromPositions=function(e){return e=a.u(e,a.u.EMPTY_OBJECT),r.o.defined("options.positions",e.positions),new D({polygonHierarchy:{positions:e.positions}})},D.pack=function(e,n,t){return r.o.typeOf.object("value",e),r.o.defined("array",n),t=a.u(t,0),n[t=l.y.packPolygonHierarchy(e._polygonHierarchy,n,t)]=e.packedLength,n};var O={polygonHierarchy:{}};return D.unpack=function(e,n,t){r.o.defined("array",e),n=a.u(n,0);var o=l.y.unpackPolygonHierarchy(e,n);n=o.startingIndex,delete o.startingIndex;var i=e[n];return a.e(t)||(t=new D(O)),t._polygonHierarchy=o,t.packedLength=i,t},D.createGeometry=function(r){var o=r._polygonHierarchy,a=o.positions;if(!((a=e.D(a,t.o.equalsEpsilon,!0)).length<3)&&i.g.validOutline(a)){var y=l.y.polygonOutlinesFromHierarchy(o,!1);if(0!==y.length){for(var d=[],u=0;u<y.length;u++){var g=new p.d({geometry:_(y[u])});d.push(g)}var f=s.k.combineInstances(d)[0],h=n.i.fromPoints(o.positions);return new c.I({attributes:f.attributes,indices:f.indices,primitiveType:f.primitiveType,boundingSphere:h})}}},function(e,n){return a.e(n)&&(e=D.unpack(e,n)),e._ellipsoid=g.t.clone(e._ellipsoid),D.createGeometry(e)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createCorridorGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createCorridorGeometry.js index 9b8e3c9b..3a58ca7c 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createCorridorGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createCorridorGeometry.js @@ -1 +1 @@ -define(["./arrayFill-0358accf","./arrayRemoveDuplicates-a6924649","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./ComponentDatatype-98414d16","./PolylineVolumeGeometryLibrary-d96626d0","./CorridorGeometryLibrary-2b5c693d","./when-92c6cf3c","./Cartesian2-b72655a5","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./PolygonPipeline-425528b3","./FeatureDetection-cec0163f","./VertexFormat-f496a3f1","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidTangentPlane-d6b88a1f","./IntersectionTests-6e80d61c","./Plane-33393da8","./PolylinePipeline-f0970409","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae"],(function(t,e,o,r,a,n,i,s,l,d,u,c,f,m,h,p,g,b,v,y,A,_,w,T,E,N,D,P,I){"use strict";var x=new r.o,F=new r.o,O=new r.o,M=new r.o,S=new r.o,C=new r.o,L=new r.o,V=new r.o;function G(t,e){for(var o=0;o<t.length;o++)t[o]=e.scaleToGeodeticSurface(t[o],t[o]);return t}function k(t,e,o,a,n,i){var s=t.normals,d=t.tangents,u=t.bitangents,c=r.o.normalize(r.o.cross(o,e,L),L);i.normal&&l.b.addAttribute(s,e,a,n),i.tangent&&l.b.addAttribute(d,c,a,n),i.bitangent&&l.b.addAttribute(u,o,a,n)}function R(t,e,o){var a,n,s,u=t.positions,m=t.corners,g=t.endPositions,b=t.lefts,v=t.normals,y=new f.a,A=0,_=0,w=0;for(n=0;n<u.length;n+=2)A+=s=u[n].length-3,w+=2*s,_+=u[n+1].length-3;for(A+=3,_+=3,n=0;n<m.length;n++){a=m[n];var T=m[n].leftPositions;d.e(T)?(A+=s=T.length,w+=s):(_+=s=m[n].rightPositions.length,w+=s)}var E,N=d.e(g);N&&(A+=E=g[0].length-3,_+=E,w+=6*(E/=3));var D,P,I,S,G,R,z=A+_,H=new Float64Array(z),U={normals:e.normal?new Float32Array(z):void 0,tangents:e.tangent?new Float32Array(z):void 0,bitangents:e.bitangent?new Float32Array(z):void 0},Y=0,B=z-1,W=x,q=F,J=E/2,j=h.IndexDatatype.createTypedArray(z/3,w),K=0;if(N){R=O,G=M;var Q=g[0];for(W=r.o.fromArray(v,0,W),q=r.o.fromArray(b,0,q),n=0;n<J;n++)R=r.o.fromArray(Q,3*(J-1-n),R),G=r.o.fromArray(Q,3*(J+n),G),l.b.addAttribute(H,G,Y),l.b.addAttribute(H,R,void 0,B),k(U,W,q,Y,B,e),S=(P=Y/3)+1,I=(D=(B-2)/3)-1,j[K++]=D,j[K++]=P,j[K++]=I,j[K++]=I,j[K++]=P,j[K++]=S,Y+=3,B-=3}var X,Z,$=0,tt=0,et=u[$++],ot=u[$++];for(H.set(et,Y),H.set(ot,B-ot.length+1),q=r.o.fromArray(b,tt,q),s=ot.length-3,n=0;n<s;n+=3)X=o.geodeticSurfaceNormal(r.o.fromArray(et,n,L),L),Z=o.geodeticSurfaceNormal(r.o.fromArray(ot,s-n,V),V),k(U,W=r.o.normalize(r.o.add(X,Z,W),W),q,Y,B,e),S=(P=Y/3)+1,I=(D=(B-2)/3)-1,j[K++]=D,j[K++]=P,j[K++]=I,j[K++]=I,j[K++]=P,j[K++]=S,Y+=3,B-=3;for(X=o.geodeticSurfaceNormal(r.o.fromArray(et,s,L),L),Z=o.geodeticSurfaceNormal(r.o.fromArray(ot,s,V),V),W=r.o.normalize(r.o.add(X,Z,W),W),tt+=3,n=0;n<m.length;n++){var rt,at,nt,it=(a=m[n]).leftPositions,st=a.rightPositions,lt=C,dt=O,ut=M;if(W=r.o.fromArray(v,tt,W),d.e(it)){for(k(U,W,q,void 0,B,e),B-=3,at=S,nt=I,rt=0;rt<it.length/3;rt++)lt=r.o.fromArray(it,3*rt,lt),j[K++]=at,j[K++]=nt-rt-1,j[K++]=nt-rt,l.b.addAttribute(H,lt,void 0,B),dt=r.o.fromArray(H,3*(nt-rt-1),dt),ut=r.o.fromArray(H,3*at,ut),k(U,W,q=r.o.normalize(r.o.subtract(dt,ut,q),q),void 0,B,e),B-=3;lt=r.o.fromArray(H,3*at,lt),dt=r.o.subtract(r.o.fromArray(H,3*nt,dt),lt,dt),ut=r.o.subtract(r.o.fromArray(H,3*(nt-rt),ut),lt,ut),k(U,W,q=r.o.normalize(r.o.add(dt,ut,q),q),Y,void 0,e),Y+=3}else{for(k(U,W,q,Y,void 0,e),Y+=3,at=I,nt=S,rt=0;rt<st.length/3;rt++)lt=r.o.fromArray(st,3*rt,lt),j[K++]=at,j[K++]=nt+rt,j[K++]=nt+rt+1,l.b.addAttribute(H,lt,Y),dt=r.o.fromArray(H,3*at,dt),ut=r.o.fromArray(H,3*(nt+rt),ut),k(U,W,q=r.o.normalize(r.o.subtract(dt,ut,q),q),Y,void 0,e),Y+=3;lt=r.o.fromArray(H,3*at,lt),dt=r.o.subtract(r.o.fromArray(H,3*(nt+rt),dt),lt,dt),ut=r.o.subtract(r.o.fromArray(H,3*nt,ut),lt,ut),k(U,W,q=r.o.normalize(r.o.negate(r.o.add(ut,dt,q),q),q),void 0,B,e),B-=3}for(et=u[$++],ot=u[$++],et.splice(0,3),ot.splice(ot.length-3,3),H.set(et,Y),H.set(ot,B-ot.length+1),s=ot.length-3,tt+=3,q=r.o.fromArray(b,tt,q),rt=0;rt<ot.length;rt+=3)X=o.geodeticSurfaceNormal(r.o.fromArray(et,rt,L),L),Z=o.geodeticSurfaceNormal(r.o.fromArray(ot,s-rt,V),V),k(U,W=r.o.normalize(r.o.add(X,Z,W),W),q,Y,B,e),P=(S=Y/3)-1,D=(I=(B-2)/3)+1,j[K++]=D,j[K++]=P,j[K++]=I,j[K++]=I,j[K++]=P,j[K++]=S,Y+=3,B-=3;Y-=3,B+=3}if(k(U,W=r.o.fromArray(v,v.length-3,W),q,Y,B,e),N){Y+=3,B-=3,R=O,G=M;var ct=g[1];for(n=0;n<J;n++)R=r.o.fromArray(ct,3*(E-n-1),R),G=r.o.fromArray(ct,3*n,G),l.b.addAttribute(H,R,void 0,B),l.b.addAttribute(H,G,Y),k(U,W,q,Y,B,e),P=(S=Y/3)-1,D=(I=(B-2)/3)+1,j[K++]=D,j[K++]=P,j[K++]=I,j[K++]=I,j[K++]=P,j[K++]=S,Y+=3,B-=3}if(y.position=new c.o({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H}),e.st){var ft,mt,ht=new Float32Array(z/3*2),pt=0;if(N){A/=3,_/=3;var gt=Math.PI/(E+1);mt=1/(A-E+1),ft=1/(_-E+1);var bt,vt=E/2;for(n=vt+1;n<E+1;n++)bt=p.e.PI_OVER_TWO+gt*n,ht[pt++]=ft*(1+Math.cos(bt)),ht[pt++]=.5*(1+Math.sin(bt));for(n=1;n<_-E+1;n++)ht[pt++]=n*ft,ht[pt++]=0;for(n=E;n>vt;n--)bt=p.e.PI_OVER_TWO-n*gt,ht[pt++]=1-ft*(1+Math.cos(bt)),ht[pt++]=.5*(1+Math.sin(bt));for(n=vt;n>0;n--)bt=p.e.PI_OVER_TWO-gt*n,ht[pt++]=1-mt*(1+Math.cos(bt)),ht[pt++]=.5*(1+Math.sin(bt));for(n=A-E;n>0;n--)ht[pt++]=n*mt,ht[pt++]=1;for(n=1;n<vt+1;n++)bt=p.e.PI_OVER_TWO+gt*n,ht[pt++]=mt*(1+Math.cos(bt)),ht[pt++]=.5*(1+Math.sin(bt))}else{for(mt=1/((A/=3)-1),ft=1/((_/=3)-1),n=0;n<_;n++)ht[pt++]=n*ft,ht[pt++]=0;for(n=A;n>0;n--)ht[pt++]=(n-1)*mt,ht[pt++]=1}y.st=new c.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:ht})}return e.normal&&(y.normal=new c.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:U.normals})),e.tangent&&(y.tangent=new c.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:U.tangents})),e.bitangent&&(y.bitangent=new c.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:U.bitangents})),{attributes:y,indices:j}}function z(t,e,o){o[e++]=t[0],o[e++]=t[1],o[e++]=t[2];for(var r=3;r<t.length;r+=3){var a=t[r],n=t[r+1],i=t[r+2];o[e++]=a,o[e++]=n,o[e++]=i,o[e++]=a,o[e++]=n,o[e++]=i}return o[e++]=t[0],o[e++]=t[1],o[e++]=t[2],o}function H(e,o){var a=new v.n({position:o.position,normal:o.normal||o.bitangent||e.shadowVolume,tangent:o.tangent,bitangent:o.normal||o.bitangent,st:o.st}),n=e.ellipsoid,s=R(l.b.computePositions(e),a,n),u=e.height,f=e.extrudedHeight,p=s.attributes,b=s.indices,y=p.position.values,A=y.length,_=new Float64Array(6*A),w=new Float64Array(A);w.set(y);var T=new Float64Array(4*A);T=z(y=g.A.scaleToGeodeticHeight(y,u,n),0,T),T=z(w=g.A.scaleToGeodeticHeight(w,f,n),2*A,T),_.set(y),_.set(w,A),_.set(T,2*A),p.position.values=_,p=function(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;var o,a,n=t.position.values;(e.normal||e.bitangent)&&(o=t.normal.values,a=t.bitangent.values);var i,s=t.position.values.length/18,d=3*s,u=2*s,c=2*d;if(e.normal||e.bitangent||e.tangent){var f=e.normal?new Float32Array(6*d):void 0,m=e.tangent?new Float32Array(6*d):void 0,h=e.bitangent?new Float32Array(6*d):void 0,p=x,g=F,b=O,v=M,y=S,A=C,_=c;for(i=0;i<d;i+=3){var w=_+c;p=r.o.fromArray(n,i,p),g=r.o.fromArray(n,i+d,g),b=r.o.fromArray(n,(i+3)%d,b),g=r.o.subtract(g,p,g),b=r.o.subtract(b,p,b),v=r.o.normalize(r.o.cross(g,b,v),v),e.normal&&(l.b.addAttribute(f,v,w),l.b.addAttribute(f,v,w+3),l.b.addAttribute(f,v,_),l.b.addAttribute(f,v,_+3)),(e.tangent||e.bitangent)&&(A=r.o.fromArray(o,i,A),e.bitangent&&(l.b.addAttribute(h,A,w),l.b.addAttribute(h,A,w+3),l.b.addAttribute(h,A,_),l.b.addAttribute(h,A,_+3)),e.tangent&&(y=r.o.normalize(r.o.cross(A,v,y),y),l.b.addAttribute(m,y,w),l.b.addAttribute(m,y,w+3),l.b.addAttribute(m,y,_),l.b.addAttribute(m,y,_+3))),_+=6}if(e.normal){for(f.set(o),i=0;i<d;i+=3)f[i+d]=-o[i],f[i+d+1]=-o[i+1],f[i+d+2]=-o[i+2];t.normal.values=f}else t.normal=void 0;if(e.bitangent?(h.set(a),h.set(a,d),t.bitangent.values=h):t.bitangent=void 0,e.tangent){var T=t.tangent.values;m.set(T),m.set(T,d),t.tangent.values=m}}if(e.st){var E=t.st.values,N=new Float32Array(6*u);N.set(E),N.set(E,u);for(var D=2*u,P=0;P<2;P++){for(N[D++]=E[0],N[D++]=E[1],i=2;i<u;i+=2){var I=E[i],L=E[i+1];N[D++]=I,N[D++]=L,N[D++]=I,N[D++]=L}N[D++]=E[0],N[D++]=E[1]}t.st.values=N}return t}(p,o);var E,N=A/3;if(e.shadowVolume){var D=p.normal.values;A=D.length;var P=new Float32Array(6*A);for(E=0;E<A;E++)D[E]=-D[E];P.set(D,A),P=z(D,4*A,P),p.extrudeDirection=new c.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:P}),o.normal||(p.normal=void 0)}if(d.e(e.offsetAttribute)){var I=new Uint8Array(6*N);if(e.offsetAttribute===m.z.TOP)I=t.d(I,1,0,N),I=t.d(I,1,2*N,4*N);else{var L=e.offsetAttribute===m.z.NONE?0:1;I=t.d(I,L)}p.applyOffset=new c.o({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}var V=b.length,G=N+N,k=h.IndexDatatype.createTypedArray(_.length/3,2*V+3*G);k.set(b);var H,U,Y,B,W=V;for(E=0;E<V;E+=3){var q=b[E],J=b[E+1],j=b[E+2];k[W++]=j+N,k[W++]=J+N,k[W++]=q+N}for(E=0;E<G;E+=2)Y=(H=E+G)+1,B=(U=H+G)+1,k[W++]=H,k[W++]=U,k[W++]=Y,k[W++]=Y,k[W++]=U,k[W++]=B;return{attributes:p,indices:k}}var U=new r.o,Y=new r.o,B=new a.a;function W(t,e,o,a,n,i){var s=r.o.subtract(e,t,U);r.o.normalize(s,s);var l=o.geodeticSurfaceNormal(t,Y),d=r.o.cross(s,l,U);r.o.multiplyByScalar(d,a,d);var u=n.latitude,c=n.longitude,f=i.latitude,m=i.longitude;r.o.add(t,d,Y),o.cartesianToCartographic(Y,B);var h=B.latitude,p=B.longitude;u=Math.min(u,h),c=Math.min(c,p),f=Math.max(f,h),m=Math.max(m,p),r.o.subtract(t,d,Y),o.cartesianToCartographic(Y,B),h=B.latitude,p=B.longitude,u=Math.min(u,h),c=Math.min(c,p),f=Math.max(f,h),m=Math.max(m,p),n.latitude=u,n.longitude=c,i.latitude=f,i.longitude=m}var q=new r.o,J=new r.o,j=new a.a,K=new a.a;function Q(t,o,a,n,i){t=G(t,o);var l=e.D(t,r.o.equalsEpsilon),c=l.length;if(c<2||a<=0)return new u.h;var f,m,h=.5*a;if(j.latitude=Number.POSITIVE_INFINITY,j.longitude=Number.POSITIVE_INFINITY,K.latitude=Number.NEGATIVE_INFINITY,K.longitude=Number.NEGATIVE_INFINITY,n===s.S.ROUNDED){var p=l[0];r.o.subtract(p,l[1],q),r.o.normalize(q,q),r.o.multiplyByScalar(q,h,q),r.o.add(p,q,J),o.cartesianToCartographic(J,B),f=B.latitude,m=B.longitude,j.latitude=Math.min(j.latitude,f),j.longitude=Math.min(j.longitude,m),K.latitude=Math.max(K.latitude,f),K.longitude=Math.max(K.longitude,m)}for(var g=0;g<c-1;++g)W(l[g],l[g+1],o,h,j,K);var b=l[c-1];r.o.subtract(b,l[c-2],q),r.o.normalize(q,q),r.o.multiplyByScalar(q,h,q),r.o.add(b,q,J),W(b,J,o,h,j,K),n===s.S.ROUNDED&&(o.cartesianToCartographic(J,B),f=B.latitude,m=B.longitude,j.latitude=Math.min(j.latitude,f),j.longitude=Math.min(j.longitude,m),K.latitude=Math.max(K.latitude,f),K.longitude=Math.max(K.longitude,m));var v=d.e(i)?i:new u.h;return v.north=K.latitude,v.south=j.latitude,v.east=K.longitude,v.west=j.longitude,v}function X(t){var e=(t=d.u(t,d.u.EMPTY_OBJECT)).positions,o=t.width;n.o.defined("options.positions",e),n.o.defined("options.width",o);var a=d.u(t.height,0),i=d.u(t.extrudedHeight,a);this._positions=e,this._ellipsoid=u.t.clone(d.u(t.ellipsoid,u.t.WGS84)),this._vertexFormat=v.n.clone(d.u(t.vertexFormat,v.n.DEFAULT)),this._width=o,this._height=Math.max(a,i),this._extrudedHeight=Math.min(a,i),this._cornerType=d.u(t.cornerType,s.S.ROUNDED),this._granularity=d.u(t.granularity,p.e.RADIANS_PER_DEGREE),this._shadowVolume=d.u(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*r.o.packedLength+u.t.packedLength+v.n.packedLength+7}X.pack=function(t,e,o){n.o.defined("value",t),n.o.defined("array",e),o=d.u(o,0);var a=t._positions,i=a.length;e[o++]=i;for(var s=0;s<i;++s,o+=r.o.packedLength)r.o.pack(a[s],e,o);return u.t.pack(t._ellipsoid,e,o),o+=u.t.packedLength,v.n.pack(t._vertexFormat,e,o),o+=v.n.packedLength,e[o++]=t._width,e[o++]=t._height,e[o++]=t._extrudedHeight,e[o++]=t._cornerType,e[o++]=t._granularity,e[o++]=t._shadowVolume?1:0,e[o]=d.u(t._offsetAttribute,-1),e};var Z=u.t.clone(u.t.UNIT_SPHERE),$=new v.n,tt={positions:void 0,ellipsoid:Z,vertexFormat:$,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};return X.unpack=function(t,e,o){n.o.defined("array",t),e=d.u(e,0);for(var a=t[e++],i=new Array(a),s=0;s<a;++s,e+=r.o.packedLength)i[s]=r.o.unpack(t,e);var l=u.t.unpack(t,e,Z);e+=u.t.packedLength;var c=v.n.unpack(t,e,$);e+=v.n.packedLength;var f=t[e++],m=t[e++],h=t[e++],p=t[e++],g=t[e++],b=1===t[e++],y=t[e];return d.e(o)?(o._positions=i,o._ellipsoid=u.t.clone(l,o._ellipsoid),o._vertexFormat=v.n.clone(c,o._vertexFormat),o._width=f,o._height=m,o._extrudedHeight=h,o._cornerType=p,o._granularity=g,o._shadowVolume=b,o._offsetAttribute=-1===y?void 0:y,o):(tt.positions=i,tt.width=f,tt.height=m,tt.extrudedHeight=h,tt.cornerType=p,tt.granularity=g,tt.shadowVolume=b,tt.offsetAttribute=-1===y?void 0:y,new X(tt))},X.computeRectangle=function(t,e){var o=(t=d.u(t,d.u.EMPTY_OBJECT)).positions,r=t.width;return n.o.defined("options.positions",o),n.o.defined("options.width",r),Q(o,d.u(t.ellipsoid,u.t.WGS84),r,d.u(t.cornerType,s.S.ROUNDED),e)},X.createGeometry=function(a){var n=a._positions,s=a._width,u=a._ellipsoid;n=G(n,u);var f=e.D(n,r.o.equalsEpsilon);if(!(f.length<2||s<=0)){var h,v=a._height,y=a._extrudedHeight,A=!p.e.equalsEpsilon(v,y,0,p.e.EPSILON2),_=a._vertexFormat,w={ellipsoid:u,positions:f,width:s,cornerType:a._cornerType,granularity:a._granularity,saveAttributes:!0};if(A)w.height=v,w.extrudedHeight=y,w.shadowVolume=a._shadowVolume,w.offsetAttribute=a._offsetAttribute,h=H(w,_);else if((h=R(l.b.computePositions(w),_,u)).attributes.position.values=g.A.scaleToGeodeticHeight(h.attributes.position.values,v,u),d.e(a._offsetAttribute)){var T=a._offsetAttribute===m.z.NONE?0:1,E=h.attributes.position.values.length,N=new Uint8Array(E/3);t.d(N,T),h.attributes.applyOffset=new c.o({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:N})}var D=h.attributes,P=o.i.fromVertices(D.position.values,void 0,3);return _.position||(h.attributes.position.values=void 0),new c.I({attributes:D,indices:h.indices,primitiveType:b._0x4b6a27.TRIANGLES,boundingSphere:P,offsetAttribute:a._offsetAttribute})}},X.createShadowVolume=function(t,e,o){var r=t._granularity,a=t._ellipsoid,n=e(r,a),i=o(r,a);return new X({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:a,granularity:r,extrudedHeight:n,height:i,vertexFormat:v.n.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(X.prototype,{rectangle:{get:function(){return d.e(this._rectangle)||(this._rectangle=Q(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}}),function(t,e){return d.e(e)&&(t=X.unpack(t,e)),t._ellipsoid=u.t.clone(t._ellipsoid),X.createGeometry(t)}})); +define(["./arrayFill-0358accf","./arrayRemoveDuplicates-a6924649","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./ComponentDatatype-98414d16","./PolylineVolumeGeometryLibrary-3011fdb7","./CorridorGeometryLibrary-46cc5746","./when-92c6cf3c","./Cartesian2-b72655a5","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./PolygonPipeline-c329dec3","./FeatureDetection-fd297af4","./VertexFormat-f496a3f1","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidTangentPlane-c500945e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./PolylinePipeline-160fa1b0","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae"],(function(t,e,o,r,a,n,i,s,l,d,u,c,f,m,h,p,g,b,v,y,A,_,w,T,E,N,D,P,I){"use strict";var x=new r.o,F=new r.o,O=new r.o,M=new r.o,S=new r.o,C=new r.o,L=new r.o,V=new r.o;function G(t,e){for(var o=0;o<t.length;o++)t[o]=e.scaleToGeodeticSurface(t[o],t[o]);return t}function k(t,e,o,a,n,i){var s=t.normals,d=t.tangents,u=t.bitangents,c=r.o.normalize(r.o.cross(o,e,L),L);i.normal&&l.b.addAttribute(s,e,a,n),i.tangent&&l.b.addAttribute(d,c,a,n),i.bitangent&&l.b.addAttribute(u,o,a,n)}function R(t,e,o){var a,n,s,u=t.positions,m=t.corners,g=t.endPositions,b=t.lefts,v=t.normals,y=new f.a,A=0,_=0,w=0;for(n=0;n<u.length;n+=2)A+=s=u[n].length-3,w+=2*s,_+=u[n+1].length-3;for(A+=3,_+=3,n=0;n<m.length;n++){a=m[n];var T=m[n].leftPositions;d.e(T)?(A+=s=T.length,w+=s):(_+=s=m[n].rightPositions.length,w+=s)}var E,N=d.e(g);N&&(A+=E=g[0].length-3,_+=E,w+=6*(E/=3));var D,P,I,S,G,R,z=A+_,H=new Float64Array(z),U={normals:e.normal?new Float32Array(z):void 0,tangents:e.tangent?new Float32Array(z):void 0,bitangents:e.bitangent?new Float32Array(z):void 0},Y=0,B=z-1,W=x,q=F,J=E/2,j=h.IndexDatatype.createTypedArray(z/3,w),K=0;if(N){R=O,G=M;var Q=g[0];for(W=r.o.fromArray(v,0,W),q=r.o.fromArray(b,0,q),n=0;n<J;n++)R=r.o.fromArray(Q,3*(J-1-n),R),G=r.o.fromArray(Q,3*(J+n),G),l.b.addAttribute(H,G,Y),l.b.addAttribute(H,R,void 0,B),k(U,W,q,Y,B,e),S=(P=Y/3)+1,I=(D=(B-2)/3)-1,j[K++]=D,j[K++]=P,j[K++]=I,j[K++]=I,j[K++]=P,j[K++]=S,Y+=3,B-=3}var X,Z,$=0,tt=0,et=u[$++],ot=u[$++];for(H.set(et,Y),H.set(ot,B-ot.length+1),q=r.o.fromArray(b,tt,q),s=ot.length-3,n=0;n<s;n+=3)X=o.geodeticSurfaceNormal(r.o.fromArray(et,n,L),L),Z=o.geodeticSurfaceNormal(r.o.fromArray(ot,s-n,V),V),k(U,W=r.o.normalize(r.o.add(X,Z,W),W),q,Y,B,e),S=(P=Y/3)+1,I=(D=(B-2)/3)-1,j[K++]=D,j[K++]=P,j[K++]=I,j[K++]=I,j[K++]=P,j[K++]=S,Y+=3,B-=3;for(X=o.geodeticSurfaceNormal(r.o.fromArray(et,s,L),L),Z=o.geodeticSurfaceNormal(r.o.fromArray(ot,s,V),V),W=r.o.normalize(r.o.add(X,Z,W),W),tt+=3,n=0;n<m.length;n++){var rt,at,nt,it=(a=m[n]).leftPositions,st=a.rightPositions,lt=C,dt=O,ut=M;if(W=r.o.fromArray(v,tt,W),d.e(it)){for(k(U,W,q,void 0,B,e),B-=3,at=S,nt=I,rt=0;rt<it.length/3;rt++)lt=r.o.fromArray(it,3*rt,lt),j[K++]=at,j[K++]=nt-rt-1,j[K++]=nt-rt,l.b.addAttribute(H,lt,void 0,B),dt=r.o.fromArray(H,3*(nt-rt-1),dt),ut=r.o.fromArray(H,3*at,ut),k(U,W,q=r.o.normalize(r.o.subtract(dt,ut,q),q),void 0,B,e),B-=3;lt=r.o.fromArray(H,3*at,lt),dt=r.o.subtract(r.o.fromArray(H,3*nt,dt),lt,dt),ut=r.o.subtract(r.o.fromArray(H,3*(nt-rt),ut),lt,ut),k(U,W,q=r.o.normalize(r.o.add(dt,ut,q),q),Y,void 0,e),Y+=3}else{for(k(U,W,q,Y,void 0,e),Y+=3,at=I,nt=S,rt=0;rt<st.length/3;rt++)lt=r.o.fromArray(st,3*rt,lt),j[K++]=at,j[K++]=nt+rt,j[K++]=nt+rt+1,l.b.addAttribute(H,lt,Y),dt=r.o.fromArray(H,3*at,dt),ut=r.o.fromArray(H,3*(nt+rt),ut),k(U,W,q=r.o.normalize(r.o.subtract(dt,ut,q),q),Y,void 0,e),Y+=3;lt=r.o.fromArray(H,3*at,lt),dt=r.o.subtract(r.o.fromArray(H,3*(nt+rt),dt),lt,dt),ut=r.o.subtract(r.o.fromArray(H,3*nt,ut),lt,ut),k(U,W,q=r.o.normalize(r.o.negate(r.o.add(ut,dt,q),q),q),void 0,B,e),B-=3}for(et=u[$++],ot=u[$++],et.splice(0,3),ot.splice(ot.length-3,3),H.set(et,Y),H.set(ot,B-ot.length+1),s=ot.length-3,tt+=3,q=r.o.fromArray(b,tt,q),rt=0;rt<ot.length;rt+=3)X=o.geodeticSurfaceNormal(r.o.fromArray(et,rt,L),L),Z=o.geodeticSurfaceNormal(r.o.fromArray(ot,s-rt,V),V),k(U,W=r.o.normalize(r.o.add(X,Z,W),W),q,Y,B,e),P=(S=Y/3)-1,D=(I=(B-2)/3)+1,j[K++]=D,j[K++]=P,j[K++]=I,j[K++]=I,j[K++]=P,j[K++]=S,Y+=3,B-=3;Y-=3,B+=3}if(k(U,W=r.o.fromArray(v,v.length-3,W),q,Y,B,e),N){Y+=3,B-=3,R=O,G=M;var ct=g[1];for(n=0;n<J;n++)R=r.o.fromArray(ct,3*(E-n-1),R),G=r.o.fromArray(ct,3*n,G),l.b.addAttribute(H,R,void 0,B),l.b.addAttribute(H,G,Y),k(U,W,q,Y,B,e),P=(S=Y/3)-1,D=(I=(B-2)/3)+1,j[K++]=D,j[K++]=P,j[K++]=I,j[K++]=I,j[K++]=P,j[K++]=S,Y+=3,B-=3}if(y.position=new c.o({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H}),e.st){var ft,mt,ht=new Float32Array(z/3*2),pt=0;if(N){A/=3,_/=3;var gt=Math.PI/(E+1);mt=1/(A-E+1),ft=1/(_-E+1);var bt,vt=E/2;for(n=vt+1;n<E+1;n++)bt=p.e.PI_OVER_TWO+gt*n,ht[pt++]=ft*(1+Math.cos(bt)),ht[pt++]=.5*(1+Math.sin(bt));for(n=1;n<_-E+1;n++)ht[pt++]=n*ft,ht[pt++]=0;for(n=E;n>vt;n--)bt=p.e.PI_OVER_TWO-n*gt,ht[pt++]=1-ft*(1+Math.cos(bt)),ht[pt++]=.5*(1+Math.sin(bt));for(n=vt;n>0;n--)bt=p.e.PI_OVER_TWO-gt*n,ht[pt++]=1-mt*(1+Math.cos(bt)),ht[pt++]=.5*(1+Math.sin(bt));for(n=A-E;n>0;n--)ht[pt++]=n*mt,ht[pt++]=1;for(n=1;n<vt+1;n++)bt=p.e.PI_OVER_TWO+gt*n,ht[pt++]=mt*(1+Math.cos(bt)),ht[pt++]=.5*(1+Math.sin(bt))}else{for(mt=1/((A/=3)-1),ft=1/((_/=3)-1),n=0;n<_;n++)ht[pt++]=n*ft,ht[pt++]=0;for(n=A;n>0;n--)ht[pt++]=(n-1)*mt,ht[pt++]=1}y.st=new c.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:ht})}return e.normal&&(y.normal=new c.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:U.normals})),e.tangent&&(y.tangent=new c.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:U.tangents})),e.bitangent&&(y.bitangent=new c.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:U.bitangents})),{attributes:y,indices:j}}function z(t,e,o){o[e++]=t[0],o[e++]=t[1],o[e++]=t[2];for(var r=3;r<t.length;r+=3){var a=t[r],n=t[r+1],i=t[r+2];o[e++]=a,o[e++]=n,o[e++]=i,o[e++]=a,o[e++]=n,o[e++]=i}return o[e++]=t[0],o[e++]=t[1],o[e++]=t[2],o}function H(e,o){var a=new v.n({position:o.position,normal:o.normal||o.bitangent||e.shadowVolume,tangent:o.tangent,bitangent:o.normal||o.bitangent,st:o.st}),n=e.ellipsoid,s=R(l.b.computePositions(e),a,n),u=e.height,f=e.extrudedHeight,p=s.attributes,b=s.indices,y=p.position.values,A=y.length,_=new Float64Array(6*A),w=new Float64Array(A);w.set(y);var T=new Float64Array(4*A);T=z(y=g.A.scaleToGeodeticHeight(y,u,n),0,T),T=z(w=g.A.scaleToGeodeticHeight(w,f,n),2*A,T),_.set(y),_.set(w,A),_.set(T,2*A),p.position.values=_,p=function(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;var o,a,n=t.position.values;(e.normal||e.bitangent)&&(o=t.normal.values,a=t.bitangent.values);var i,s=t.position.values.length/18,d=3*s,u=2*s,c=2*d;if(e.normal||e.bitangent||e.tangent){var f=e.normal?new Float32Array(6*d):void 0,m=e.tangent?new Float32Array(6*d):void 0,h=e.bitangent?new Float32Array(6*d):void 0,p=x,g=F,b=O,v=M,y=S,A=C,_=c;for(i=0;i<d;i+=3){var w=_+c;p=r.o.fromArray(n,i,p),g=r.o.fromArray(n,i+d,g),b=r.o.fromArray(n,(i+3)%d,b),g=r.o.subtract(g,p,g),b=r.o.subtract(b,p,b),v=r.o.normalize(r.o.cross(g,b,v),v),e.normal&&(l.b.addAttribute(f,v,w),l.b.addAttribute(f,v,w+3),l.b.addAttribute(f,v,_),l.b.addAttribute(f,v,_+3)),(e.tangent||e.bitangent)&&(A=r.o.fromArray(o,i,A),e.bitangent&&(l.b.addAttribute(h,A,w),l.b.addAttribute(h,A,w+3),l.b.addAttribute(h,A,_),l.b.addAttribute(h,A,_+3)),e.tangent&&(y=r.o.normalize(r.o.cross(A,v,y),y),l.b.addAttribute(m,y,w),l.b.addAttribute(m,y,w+3),l.b.addAttribute(m,y,_),l.b.addAttribute(m,y,_+3))),_+=6}if(e.normal){for(f.set(o),i=0;i<d;i+=3)f[i+d]=-o[i],f[i+d+1]=-o[i+1],f[i+d+2]=-o[i+2];t.normal.values=f}else t.normal=void 0;if(e.bitangent?(h.set(a),h.set(a,d),t.bitangent.values=h):t.bitangent=void 0,e.tangent){var T=t.tangent.values;m.set(T),m.set(T,d),t.tangent.values=m}}if(e.st){var E=t.st.values,N=new Float32Array(6*u);N.set(E),N.set(E,u);for(var D=2*u,P=0;P<2;P++){for(N[D++]=E[0],N[D++]=E[1],i=2;i<u;i+=2){var I=E[i],L=E[i+1];N[D++]=I,N[D++]=L,N[D++]=I,N[D++]=L}N[D++]=E[0],N[D++]=E[1]}t.st.values=N}return t}(p,o);var E,N=A/3;if(e.shadowVolume){var D=p.normal.values;A=D.length;var P=new Float32Array(6*A);for(E=0;E<A;E++)D[E]=-D[E];P.set(D,A),P=z(D,4*A,P),p.extrudeDirection=new c.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:P}),o.normal||(p.normal=void 0)}if(d.e(e.offsetAttribute)){var I=new Uint8Array(6*N);if(e.offsetAttribute===m.z.TOP)I=t.d(I,1,0,N),I=t.d(I,1,2*N,4*N);else{var L=e.offsetAttribute===m.z.NONE?0:1;I=t.d(I,L)}p.applyOffset=new c.o({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}var V=b.length,G=N+N,k=h.IndexDatatype.createTypedArray(_.length/3,2*V+3*G);k.set(b);var H,U,Y,B,W=V;for(E=0;E<V;E+=3){var q=b[E],J=b[E+1],j=b[E+2];k[W++]=j+N,k[W++]=J+N,k[W++]=q+N}for(E=0;E<G;E+=2)Y=(H=E+G)+1,B=(U=H+G)+1,k[W++]=H,k[W++]=U,k[W++]=Y,k[W++]=Y,k[W++]=U,k[W++]=B;return{attributes:p,indices:k}}var U=new r.o,Y=new r.o,B=new a.a;function W(t,e,o,a,n,i){var s=r.o.subtract(e,t,U);r.o.normalize(s,s);var l=o.geodeticSurfaceNormal(t,Y),d=r.o.cross(s,l,U);r.o.multiplyByScalar(d,a,d);var u=n.latitude,c=n.longitude,f=i.latitude,m=i.longitude;r.o.add(t,d,Y),o.cartesianToCartographic(Y,B);var h=B.latitude,p=B.longitude;u=Math.min(u,h),c=Math.min(c,p),f=Math.max(f,h),m=Math.max(m,p),r.o.subtract(t,d,Y),o.cartesianToCartographic(Y,B),h=B.latitude,p=B.longitude,u=Math.min(u,h),c=Math.min(c,p),f=Math.max(f,h),m=Math.max(m,p),n.latitude=u,n.longitude=c,i.latitude=f,i.longitude=m}var q=new r.o,J=new r.o,j=new a.a,K=new a.a;function Q(t,o,a,n,i){t=G(t,o);var l=e.D(t,r.o.equalsEpsilon),c=l.length;if(c<2||a<=0)return new u.h;var f,m,h=.5*a;if(j.latitude=Number.POSITIVE_INFINITY,j.longitude=Number.POSITIVE_INFINITY,K.latitude=Number.NEGATIVE_INFINITY,K.longitude=Number.NEGATIVE_INFINITY,n===s.S.ROUNDED){var p=l[0];r.o.subtract(p,l[1],q),r.o.normalize(q,q),r.o.multiplyByScalar(q,h,q),r.o.add(p,q,J),o.cartesianToCartographic(J,B),f=B.latitude,m=B.longitude,j.latitude=Math.min(j.latitude,f),j.longitude=Math.min(j.longitude,m),K.latitude=Math.max(K.latitude,f),K.longitude=Math.max(K.longitude,m)}for(var g=0;g<c-1;++g)W(l[g],l[g+1],o,h,j,K);var b=l[c-1];r.o.subtract(b,l[c-2],q),r.o.normalize(q,q),r.o.multiplyByScalar(q,h,q),r.o.add(b,q,J),W(b,J,o,h,j,K),n===s.S.ROUNDED&&(o.cartesianToCartographic(J,B),f=B.latitude,m=B.longitude,j.latitude=Math.min(j.latitude,f),j.longitude=Math.min(j.longitude,m),K.latitude=Math.max(K.latitude,f),K.longitude=Math.max(K.longitude,m));var v=d.e(i)?i:new u.h;return v.north=K.latitude,v.south=j.latitude,v.east=K.longitude,v.west=j.longitude,v}function X(t){var e=(t=d.u(t,d.u.EMPTY_OBJECT)).positions,o=t.width;n.o.defined("options.positions",e),n.o.defined("options.width",o);var a=d.u(t.height,0),i=d.u(t.extrudedHeight,a);this._positions=e,this._ellipsoid=u.t.clone(d.u(t.ellipsoid,u.t.WGS84)),this._vertexFormat=v.n.clone(d.u(t.vertexFormat,v.n.DEFAULT)),this._width=o,this._height=Math.max(a,i),this._extrudedHeight=Math.min(a,i),this._cornerType=d.u(t.cornerType,s.S.ROUNDED),this._granularity=d.u(t.granularity,p.e.RADIANS_PER_DEGREE),this._shadowVolume=d.u(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*r.o.packedLength+u.t.packedLength+v.n.packedLength+7}X.pack=function(t,e,o){n.o.defined("value",t),n.o.defined("array",e),o=d.u(o,0);var a=t._positions,i=a.length;e[o++]=i;for(var s=0;s<i;++s,o+=r.o.packedLength)r.o.pack(a[s],e,o);return u.t.pack(t._ellipsoid,e,o),o+=u.t.packedLength,v.n.pack(t._vertexFormat,e,o),o+=v.n.packedLength,e[o++]=t._width,e[o++]=t._height,e[o++]=t._extrudedHeight,e[o++]=t._cornerType,e[o++]=t._granularity,e[o++]=t._shadowVolume?1:0,e[o]=d.u(t._offsetAttribute,-1),e};var Z=u.t.clone(u.t.UNIT_SPHERE),$=new v.n,tt={positions:void 0,ellipsoid:Z,vertexFormat:$,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};return X.unpack=function(t,e,o){n.o.defined("array",t),e=d.u(e,0);for(var a=t[e++],i=new Array(a),s=0;s<a;++s,e+=r.o.packedLength)i[s]=r.o.unpack(t,e);var l=u.t.unpack(t,e,Z);e+=u.t.packedLength;var c=v.n.unpack(t,e,$);e+=v.n.packedLength;var f=t[e++],m=t[e++],h=t[e++],p=t[e++],g=t[e++],b=1===t[e++],y=t[e];return d.e(o)?(o._positions=i,o._ellipsoid=u.t.clone(l,o._ellipsoid),o._vertexFormat=v.n.clone(c,o._vertexFormat),o._width=f,o._height=m,o._extrudedHeight=h,o._cornerType=p,o._granularity=g,o._shadowVolume=b,o._offsetAttribute=-1===y?void 0:y,o):(tt.positions=i,tt.width=f,tt.height=m,tt.extrudedHeight=h,tt.cornerType=p,tt.granularity=g,tt.shadowVolume=b,tt.offsetAttribute=-1===y?void 0:y,new X(tt))},X.computeRectangle=function(t,e){var o=(t=d.u(t,d.u.EMPTY_OBJECT)).positions,r=t.width;return n.o.defined("options.positions",o),n.o.defined("options.width",r),Q(o,d.u(t.ellipsoid,u.t.WGS84),r,d.u(t.cornerType,s.S.ROUNDED),e)},X.createGeometry=function(a){var n=a._positions,s=a._width,u=a._ellipsoid;n=G(n,u);var f=e.D(n,r.o.equalsEpsilon);if(!(f.length<2||s<=0)){var h,v=a._height,y=a._extrudedHeight,A=!p.e.equalsEpsilon(v,y,0,p.e.EPSILON2),_=a._vertexFormat,w={ellipsoid:u,positions:f,width:s,cornerType:a._cornerType,granularity:a._granularity,saveAttributes:!0};if(A)w.height=v,w.extrudedHeight=y,w.shadowVolume=a._shadowVolume,w.offsetAttribute=a._offsetAttribute,h=H(w,_);else if((h=R(l.b.computePositions(w),_,u)).attributes.position.values=g.A.scaleToGeodeticHeight(h.attributes.position.values,v,u),d.e(a._offsetAttribute)){var T=a._offsetAttribute===m.z.NONE?0:1,E=h.attributes.position.values.length,N=new Uint8Array(E/3);t.d(N,T),h.attributes.applyOffset=new c.o({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:N})}var D=h.attributes,P=o.i.fromVertices(D.position.values,void 0,3);return _.position||(h.attributes.position.values=void 0),new c.I({attributes:D,indices:h.indices,primitiveType:b._0x3b3836.TRIANGLES,boundingSphere:P,offsetAttribute:a._offsetAttribute})}},X.createShadowVolume=function(t,e,o){var r=t._granularity,a=t._ellipsoid,n=e(r,a),i=o(r,a);return new X({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:a,granularity:r,extrudedHeight:n,height:i,vertexFormat:v.n.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(X.prototype,{rectangle:{get:function(){return d.e(this._rectangle)||(this._rectangle=Q(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}}),function(t,e){return d.e(e)&&(t=X.unpack(t,e)),t._ellipsoid=u.t.clone(t._ellipsoid),X.createGeometry(t)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createCorridorOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createCorridorOutlineGeometry.js index c6c85a07..4611f867 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createCorridorOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createCorridorOutlineGeometry.js @@ -1 +1 @@ -define(["./arrayFill-0358accf","./arrayRemoveDuplicates-a6924649","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./PolylineVolumeGeometryLibrary-d96626d0","./CorridorGeometryLibrary-2b5c693d","./when-92c6cf3c","./Cartesian2-b72655a5","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./PolygonPipeline-425528b3","./FeatureDetection-cec0163f","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidTangentPlane-d6b88a1f","./IntersectionTests-6e80d61c","./Plane-33393da8","./PolylinePipeline-f0970409","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,i,r,o,n,a,s,l,u,d,p,h,c,f,g,b,y,v,A,_,m,E,w,T,D,P,G){"use strict";var k=new r.o,L=new r.o,O=new r.o;function x(e,t){var i,o,u,h=[],f=e.positions,g=e.corners,b=e.endPositions,y=new p.a,v=0,A=0,_=0;for(o=0;o<f.length;o+=2)v+=u=f[o].length-3,_+=u/3*4,A+=f[o+1].length-3;for(v+=3,A+=3,o=0;o<g.length;o++){i=g[o];var m=g[o].leftPositions;l.e(m)?(v+=u=m.length,_+=u/3*2):(A+=u=g[o].rightPositions.length,_+=u/3*2)}var E,w=l.e(b);w&&(v+=E=b[0].length-3,A+=E,_+=4*(E/=3));var T,D,P,G,x,N,C=v+A,H=new Float64Array(C),I=0,S=C-1,R=E/2,U=c.IndexDatatype.createTypedArray(C/3,_+4),M=0;if(U[M++]=I/3,U[M++]=(S-2)/3,w){h.push(I/3),N=k,x=L;var B=b[0];for(o=0;o<R;o++)N=r.o.fromArray(B,3*(R-1-o),N),x=r.o.fromArray(B,3*(R+o),x),s.b.addAttribute(H,x,I),s.b.addAttribute(H,N,void 0,S),G=(D=I/3)+1,P=(T=(S-2)/3)-1,U[M++]=T,U[M++]=P,U[M++]=D,U[M++]=G,I+=3,S-=3}var F=0,j=f[F++],V=f[F++];for(H.set(j,I),H.set(V,S-V.length+1),u=V.length-3,h.push(I/3,(S-2)/3),o=0;o<u;o+=3)G=(D=I/3)+1,P=(T=(S-2)/3)-1,U[M++]=T,U[M++]=P,U[M++]=D,U[M++]=G,I+=3,S-=3;for(o=0;o<g.length;o++){var z,Y,q=(i=g[o]).leftPositions,W=i.rightPositions,J=O;if(l.e(q)){for(S-=3,Y=P,h.push(G),z=0;z<q.length/3;z++)J=r.o.fromArray(q,3*z,J),U[M++]=Y-z-1,U[M++]=Y-z,s.b.addAttribute(H,J,void 0,S),S-=3;h.push(Y-Math.floor(q.length/6)),t===a.S.BEVELED&&h.push((S-2)/3+1),I+=3}else{for(I+=3,Y=G,h.push(P),z=0;z<W.length/3;z++)J=r.o.fromArray(W,3*z,J),U[M++]=Y+z,U[M++]=Y+z+1,s.b.addAttribute(H,J,I),I+=3;h.push(Y+Math.floor(W.length/6)),t===a.S.BEVELED&&h.push(I/3-1),S-=3}for(j=f[F++],V=f[F++],j.splice(0,3),V.splice(V.length-3,3),H.set(j,I),H.set(V,S-V.length+1),u=V.length-3,z=0;z<V.length;z+=3)D=(G=I/3)-1,T=(P=(S-2)/3)+1,U[M++]=T,U[M++]=P,U[M++]=D,U[M++]=G,I+=3,S-=3;I-=3,S+=3,h.push(I/3,(S-2)/3)}if(w){I+=3,S-=3,N=k,x=L;var K=b[1];for(o=0;o<R;o++)N=r.o.fromArray(K,3*(E-o-1),N),x=r.o.fromArray(K,3*o,x),s.b.addAttribute(H,N,void 0,S),s.b.addAttribute(H,x,I),D=(G=I/3)-1,T=(P=(S-2)/3)+1,U[M++]=T,U[M++]=P,U[M++]=D,U[M++]=G,I+=3,S-=3;h.push(I/3)}else h.push(I/3,(S-2)/3);return U[M++]=I/3,U[M++]=(S-2)/3,y.position=new d.o({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H}),{attributes:y,indices:U,wallIndices:h}}function N(e){var t=(e=l.u(e,l.u.EMPTY_OBJECT)).positions,i=e.width;o.o.typeOf.object("options.positions",t),o.o.typeOf.number("options.width",i);var n=l.u(e.height,0),s=l.u(e.extrudedHeight,n);this._positions=t,this._ellipsoid=u.t.clone(l.u(e.ellipsoid,u.t.WGS84)),this._width=i,this._height=Math.max(n,s),this._extrudedHeight=Math.min(n,s),this._cornerType=l.u(e.cornerType,a.S.ROUNDED),this._granularity=l.u(e.granularity,f.e.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*r.o.packedLength+u.t.packedLength+6}N.pack=function(e,t,i){o.o.typeOf.object("value",e),o.o.typeOf.object("array",t),i=l.u(i,0);var n=e._positions,a=n.length;t[i++]=a;for(var s=0;s<a;++s,i+=r.o.packedLength)r.o.pack(n[s],t,i);return u.t.pack(e._ellipsoid,t,i),i+=u.t.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i]=l.u(e._offsetAttribute,-1),t};var C=u.t.clone(u.t.UNIT_SPHERE),H={positions:void 0,ellipsoid:C,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};return N.unpack=function(e,t,i){o.o.typeOf.object("array",e),t=l.u(t,0);for(var n=e[t++],a=new Array(n),s=0;s<n;++s,t+=r.o.packedLength)a[s]=r.o.unpack(e,t);var d=u.t.unpack(e,t,C);t+=u.t.packedLength;var p=e[t++],h=e[t++],c=e[t++],f=e[t++],g=e[t++],b=e[t];return l.e(i)?(i._positions=a,i._ellipsoid=u.t.clone(d,i._ellipsoid),i._width=p,i._height=h,i._extrudedHeight=c,i._cornerType=f,i._granularity=g,i._offsetAttribute=-1===b?void 0:b,i):(H.positions=a,H.width=p,H.height=h,H.extrudedHeight=c,H.cornerType=f,H.granularity=g,H.offsetAttribute=-1===b?void 0:b,new N(H))},N.createGeometry=function(o){var a=o._positions,u=o._width,p=o._ellipsoid;a=function(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}(a,p);var y=t.D(a,r.o.equalsEpsilon);if(!(y.length<2||u<=0)){var v,A=o._height,_=o._extrudedHeight,m=!f.e.equalsEpsilon(A,_,0,f.e.EPSILON2),E={ellipsoid:p,positions:y,width:u,cornerType:o._cornerType,granularity:o._granularity,saveAttributes:!1};if(m)E.height=A,E.extrudedHeight=_,E.offsetAttribute=o._offsetAttribute,v=function(t){var i=t.ellipsoid,r=x(s.b.computePositions(t),t.cornerType),o=r.wallIndices,a=t.height,u=t.extrudedHeight,p=r.attributes,f=r.indices,b=p.position.values,y=b.length,v=new Float64Array(y);v.set(b);var A=new Float64Array(2*y);if(b=g.A.scaleToGeodeticHeight(b,a,i),v=g.A.scaleToGeodeticHeight(v,u,i),A.set(b),A.set(v,y),p.position.values=A,y/=3,l.e(t.offsetAttribute)){var _=new Uint8Array(2*y);if(t.offsetAttribute===h.z.TOP)_=e.d(_,1,0,y);else{var m=t.offsetAttribute===h.z.NONE?0:1;_=e.d(_,m)}p.applyOffset=new d.o({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}var E,w=f.length,T=c.IndexDatatype.createTypedArray(A.length/3,2*(w+o.length));T.set(f);var D,P,G=w;for(E=0;E<w;E+=2){var k=f[E],L=f[E+1];T[G++]=k+y,T[G++]=L+y}for(E=0;E<o.length;E++)P=(D=o[E])+y,T[G++]=D,T[G++]=P;return{attributes:p,indices:T}}(E);else if((v=x(s.b.computePositions(E),E.cornerType)).attributes.position.values=g.A.scaleToGeodeticHeight(v.attributes.position.values,A,p),l.e(o._offsetAttribute)){var w=v.attributes.position.values.length,T=new Uint8Array(w/3),D=o._offsetAttribute===h.z.NONE?0:1;e.d(T,D),v.attributes.applyOffset=new d.o({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}var P=v.attributes,G=i.i.fromVertices(P.position.values,void 0,3);return new d.I({attributes:P,indices:v.indices,primitiveType:b._0x4b6a27.LINES,boundingSphere:G,offsetAttribute:o._offsetAttribute})}},function(e,t){return l.e(t)&&(e=N.unpack(e,t)),e._ellipsoid=u.t.clone(e._ellipsoid),N.createGeometry(e)}})); +define(["./arrayFill-0358accf","./arrayRemoveDuplicates-a6924649","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./PolylineVolumeGeometryLibrary-3011fdb7","./CorridorGeometryLibrary-46cc5746","./when-92c6cf3c","./Cartesian2-b72655a5","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./PolygonPipeline-c329dec3","./FeatureDetection-fd297af4","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidTangentPlane-c500945e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./PolylinePipeline-160fa1b0","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,i,r,o,n,a,s,l,u,d,p,h,c,f,g,y,b,v,A,_,m,E,w,T,D,P,G){"use strict";var k=new r.o,L=new r.o,O=new r.o;function x(e,t){var i,o,u,h=[],f=e.positions,g=e.corners,y=e.endPositions,b=new p.a,v=0,A=0,_=0;for(o=0;o<f.length;o+=2)v+=u=f[o].length-3,_+=u/3*4,A+=f[o+1].length-3;for(v+=3,A+=3,o=0;o<g.length;o++){i=g[o];var m=g[o].leftPositions;l.e(m)?(v+=u=m.length,_+=u/3*2):(A+=u=g[o].rightPositions.length,_+=u/3*2)}var E,w=l.e(y);w&&(v+=E=y[0].length-3,A+=E,_+=4*(E/=3));var T,D,P,G,x,N,C=v+A,H=new Float64Array(C),I=0,S=C-1,R=E/2,U=c.IndexDatatype.createTypedArray(C/3,_+4),M=0;if(U[M++]=I/3,U[M++]=(S-2)/3,w){h.push(I/3),N=k,x=L;var B=y[0];for(o=0;o<R;o++)N=r.o.fromArray(B,3*(R-1-o),N),x=r.o.fromArray(B,3*(R+o),x),s.b.addAttribute(H,x,I),s.b.addAttribute(H,N,void 0,S),G=(D=I/3)+1,P=(T=(S-2)/3)-1,U[M++]=T,U[M++]=P,U[M++]=D,U[M++]=G,I+=3,S-=3}var F=0,j=f[F++],V=f[F++];for(H.set(j,I),H.set(V,S-V.length+1),u=V.length-3,h.push(I/3,(S-2)/3),o=0;o<u;o+=3)G=(D=I/3)+1,P=(T=(S-2)/3)-1,U[M++]=T,U[M++]=P,U[M++]=D,U[M++]=G,I+=3,S-=3;for(o=0;o<g.length;o++){var z,Y,q=(i=g[o]).leftPositions,W=i.rightPositions,J=O;if(l.e(q)){for(S-=3,Y=P,h.push(G),z=0;z<q.length/3;z++)J=r.o.fromArray(q,3*z,J),U[M++]=Y-z-1,U[M++]=Y-z,s.b.addAttribute(H,J,void 0,S),S-=3;h.push(Y-Math.floor(q.length/6)),t===a.S.BEVELED&&h.push((S-2)/3+1),I+=3}else{for(I+=3,Y=G,h.push(P),z=0;z<W.length/3;z++)J=r.o.fromArray(W,3*z,J),U[M++]=Y+z,U[M++]=Y+z+1,s.b.addAttribute(H,J,I),I+=3;h.push(Y+Math.floor(W.length/6)),t===a.S.BEVELED&&h.push(I/3-1),S-=3}for(j=f[F++],V=f[F++],j.splice(0,3),V.splice(V.length-3,3),H.set(j,I),H.set(V,S-V.length+1),u=V.length-3,z=0;z<V.length;z+=3)D=(G=I/3)-1,T=(P=(S-2)/3)+1,U[M++]=T,U[M++]=P,U[M++]=D,U[M++]=G,I+=3,S-=3;I-=3,S+=3,h.push(I/3,(S-2)/3)}if(w){I+=3,S-=3,N=k,x=L;var K=y[1];for(o=0;o<R;o++)N=r.o.fromArray(K,3*(E-o-1),N),x=r.o.fromArray(K,3*o,x),s.b.addAttribute(H,N,void 0,S),s.b.addAttribute(H,x,I),D=(G=I/3)-1,T=(P=(S-2)/3)+1,U[M++]=T,U[M++]=P,U[M++]=D,U[M++]=G,I+=3,S-=3;h.push(I/3)}else h.push(I/3,(S-2)/3);return U[M++]=I/3,U[M++]=(S-2)/3,b.position=new d.o({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H}),{attributes:b,indices:U,wallIndices:h}}function N(e){var t=(e=l.u(e,l.u.EMPTY_OBJECT)).positions,i=e.width;o.o.typeOf.object("options.positions",t),o.o.typeOf.number("options.width",i);var n=l.u(e.height,0),s=l.u(e.extrudedHeight,n);this._positions=t,this._ellipsoid=u.t.clone(l.u(e.ellipsoid,u.t.WGS84)),this._width=i,this._height=Math.max(n,s),this._extrudedHeight=Math.min(n,s),this._cornerType=l.u(e.cornerType,a.S.ROUNDED),this._granularity=l.u(e.granularity,f.e.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*r.o.packedLength+u.t.packedLength+6}N.pack=function(e,t,i){o.o.typeOf.object("value",e),o.o.typeOf.object("array",t),i=l.u(i,0);var n=e._positions,a=n.length;t[i++]=a;for(var s=0;s<a;++s,i+=r.o.packedLength)r.o.pack(n[s],t,i);return u.t.pack(e._ellipsoid,t,i),i+=u.t.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i]=l.u(e._offsetAttribute,-1),t};var C=u.t.clone(u.t.UNIT_SPHERE),H={positions:void 0,ellipsoid:C,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};return N.unpack=function(e,t,i){o.o.typeOf.object("array",e),t=l.u(t,0);for(var n=e[t++],a=new Array(n),s=0;s<n;++s,t+=r.o.packedLength)a[s]=r.o.unpack(e,t);var d=u.t.unpack(e,t,C);t+=u.t.packedLength;var p=e[t++],h=e[t++],c=e[t++],f=e[t++],g=e[t++],y=e[t];return l.e(i)?(i._positions=a,i._ellipsoid=u.t.clone(d,i._ellipsoid),i._width=p,i._height=h,i._extrudedHeight=c,i._cornerType=f,i._granularity=g,i._offsetAttribute=-1===y?void 0:y,i):(H.positions=a,H.width=p,H.height=h,H.extrudedHeight=c,H.cornerType=f,H.granularity=g,H.offsetAttribute=-1===y?void 0:y,new N(H))},N.createGeometry=function(o){var a=o._positions,u=o._width,p=o._ellipsoid;a=function(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}(a,p);var b=t.D(a,r.o.equalsEpsilon);if(!(b.length<2||u<=0)){var v,A=o._height,_=o._extrudedHeight,m=!f.e.equalsEpsilon(A,_,0,f.e.EPSILON2),E={ellipsoid:p,positions:b,width:u,cornerType:o._cornerType,granularity:o._granularity,saveAttributes:!1};if(m)E.height=A,E.extrudedHeight=_,E.offsetAttribute=o._offsetAttribute,v=function(t){var i=t.ellipsoid,r=x(s.b.computePositions(t),t.cornerType),o=r.wallIndices,a=t.height,u=t.extrudedHeight,p=r.attributes,f=r.indices,y=p.position.values,b=y.length,v=new Float64Array(b);v.set(y);var A=new Float64Array(2*b);if(y=g.A.scaleToGeodeticHeight(y,a,i),v=g.A.scaleToGeodeticHeight(v,u,i),A.set(y),A.set(v,b),p.position.values=A,b/=3,l.e(t.offsetAttribute)){var _=new Uint8Array(2*b);if(t.offsetAttribute===h.z.TOP)_=e.d(_,1,0,b);else{var m=t.offsetAttribute===h.z.NONE?0:1;_=e.d(_,m)}p.applyOffset=new d.o({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}var E,w=f.length,T=c.IndexDatatype.createTypedArray(A.length/3,2*(w+o.length));T.set(f);var D,P,G=w;for(E=0;E<w;E+=2){var k=f[E],L=f[E+1];T[G++]=k+b,T[G++]=L+b}for(E=0;E<o.length;E++)P=(D=o[E])+b,T[G++]=D,T[G++]=P;return{attributes:p,indices:T}}(E);else if((v=x(s.b.computePositions(E),E.cornerType)).attributes.position.values=g.A.scaleToGeodeticHeight(v.attributes.position.values,A,p),l.e(o._offsetAttribute)){var w=v.attributes.position.values.length,T=new Uint8Array(w/3),D=o._offsetAttribute===h.z.NONE?0:1;e.d(T,D),v.attributes.applyOffset=new d.o({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}var P=v.attributes,G=i.i.fromVertices(P.position.values,void 0,3);return new d.I({attributes:P,indices:v.indices,primitiveType:y._0x3b3836.LINES,boundingSphere:G,offsetAttribute:o._offsetAttribute})}},function(e,t){return l.e(t)&&(e=N.unpack(e,t)),e._ellipsoid=u.t.clone(e._ellipsoid),N.createGeometry(e)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createCylinderGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createCylinderGeometry.js index 95b434f5..849bc5f6 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createCylinderGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createCylinderGeometry.js @@ -1 +1 @@ -define(["./CylinderGeometry-c486a245","./when-92c6cf3c","./arrayFill-0358accf","./Check-52a7d806","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./CylinderGeometryLibrary-60eef4da","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./VertexFormat-f496a3f1"],(function(e,t,r,a,c,n,i,f,d,o,b,u,y,l,m,s,C,G,p,h,A){"use strict";return function(r,a){return t.e(a)&&(r=e.l.unpack(r,a)),e.l.createGeometry(r)}})); +define(["./CylinderGeometry-9e5c168d","./when-92c6cf3c","./arrayFill-0358accf","./Check-52a7d806","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./CylinderGeometryLibrary-60eef4da","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./VertexFormat-f496a3f1"],(function(e,t,r,a,c,n,d,i,f,o,b,u,y,l,m,s,C,G,p,h,A){"use strict";return function(r,a){return t.e(a)&&(r=e.l.unpack(r,a)),e.l.createGeometry(r)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createCylinderOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createCylinderOutlineGeometry.js index f79e791a..3f55e6e8 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createCylinderOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createCylinderOutlineGeometry.js @@ -1 +1 @@ -define(["./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./CylinderGeometryLibrary-60eef4da","./when-92c6cf3c","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./FeatureDetection-cec0163f","./Cartographic-a2c313d7","./Math-ecf82623","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e"],(function(t,e,i,o,r,a,n,s,u,f,c,b,d,p,m,l,y,_,h){"use strict";var v=new i.o;function O(t){var e=(t=s.u(t,s.u.EMPTY_OBJECT)).length,i=t.topRadius,o=t.bottomRadius,a=s.u(t.slices,128),n=Math.max(s.u(t.numberOfVerticalLines,16),0);if(r.o.typeOf.number("options.positions",e),r.o.typeOf.number("options.topRadius",i),r.o.typeOf.number("options.bottomRadius",o),r.o.typeOf.number.greaterThanOrEquals("options.slices",a,3),s.e(t.offsetAttribute)&&t.offsetAttribute===c.z.TOP)throw new r.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=i,this._bottomRadius=o,this._slices=a,this._numberOfVerticalLines=n,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}O.packedLength=6,O.pack=function(t,e,i){return r.o.typeOf.object("value",t),r.o.defined("array",e),i=s.u(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=s.u(t._offsetAttribute,-1),e};var A={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};return O.unpack=function(t,e,i){r.o.defined("array",t),e=s.u(e,0);var o=t[e++],a=t[e++],n=t[e++],u=t[e++],f=t[e++],c=t[e];return s.e(i)?(i._length=o,i._topRadius=a,i._bottomRadius=n,i._slices=u,i._numberOfVerticalLines=f,i._offsetAttribute=-1===c?void 0:c,i):(A.length=o,A.topRadius=a,A.bottomRadius=n,A.slices=u,A.numberOfVerticalLines=f,A.offsetAttribute=-1===c?void 0:c,new O(A))},O.createGeometry=function(r){var p=r._length,m=r._topRadius,l=r._bottomRadius,y=r._slices,_=r._numberOfVerticalLines;if(!(p<=0||m<0||l<0||0===m&&0===l)){var h,O=2*y,A=n.I.computePositions(p,m,l,y,!1),R=2*y;if(_>0){var g=Math.min(_,y);h=Math.round(y/g),R+=g}var w,C=b.IndexDatatype.createTypedArray(O,2*R),L=0;for(w=0;w<y-1;w++)C[L++]=w,C[L++]=w+1,C[L++]=w+y,C[L++]=w+1+y;if(C[L++]=y-1,C[L++]=0,C[L++]=y+y-1,C[L++]=y,_>0)for(w=0;w<y;w+=h)C[L++]=w,C[L++]=w+y;var E=new f.a;E.position=new u.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:A}),v.x=.5*p,v.y=Math.max(l,m);var D=new e.i(o.o.ZERO,i.o.magnitude(v));if(s.e(r._offsetAttribute)){p=A.length;var G=new Uint8Array(p/3),T=r._offsetAttribute===c.z.NONE?0:1;t.d(G,T),E.applyOffset=new u.o({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:G})}return new u.I({attributes:E,indices:C,primitiveType:d._0x4b6a27.LINES,boundingSphere:D,offsetAttribute:r._offsetAttribute})}},function(t,e){return s.e(e)&&(t=O.unpack(t,e)),O.createGeometry(t)}})); +define(["./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./CylinderGeometryLibrary-60eef4da","./when-92c6cf3c","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./FeatureDetection-fd297af4","./Cartographic-a2c313d7","./Math-ecf82623","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e"],(function(t,e,i,o,r,a,n,s,u,f,c,d,b,p,m,l,y,_,h){"use strict";var v=new i.o;function O(t){var e=(t=s.u(t,s.u.EMPTY_OBJECT)).length,i=t.topRadius,o=t.bottomRadius,a=s.u(t.slices,128),n=Math.max(s.u(t.numberOfVerticalLines,16),0);if(r.o.typeOf.number("options.positions",e),r.o.typeOf.number("options.topRadius",i),r.o.typeOf.number("options.bottomRadius",o),r.o.typeOf.number.greaterThanOrEquals("options.slices",a,3),s.e(t.offsetAttribute)&&t.offsetAttribute===c.z.TOP)throw new r.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=i,this._bottomRadius=o,this._slices=a,this._numberOfVerticalLines=n,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}O.packedLength=6,O.pack=function(t,e,i){return r.o.typeOf.object("value",t),r.o.defined("array",e),i=s.u(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=s.u(t._offsetAttribute,-1),e};var A={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};return O.unpack=function(t,e,i){r.o.defined("array",t),e=s.u(e,0);var o=t[e++],a=t[e++],n=t[e++],u=t[e++],f=t[e++],c=t[e];return s.e(i)?(i._length=o,i._topRadius=a,i._bottomRadius=n,i._slices=u,i._numberOfVerticalLines=f,i._offsetAttribute=-1===c?void 0:c,i):(A.length=o,A.topRadius=a,A.bottomRadius=n,A.slices=u,A.numberOfVerticalLines=f,A.offsetAttribute=-1===c?void 0:c,new O(A))},O.createGeometry=function(r){var p=r._length,m=r._topRadius,l=r._bottomRadius,y=r._slices,_=r._numberOfVerticalLines;if(!(p<=0||m<0||l<0||0===m&&0===l)){var h,O=2*y,A=n.I.computePositions(p,m,l,y,!1),R=2*y;if(_>0){var g=Math.min(_,y);h=Math.round(y/g),R+=g}var w,C=d.IndexDatatype.createTypedArray(O,2*R),L=0;for(w=0;w<y-1;w++)C[L++]=w,C[L++]=w+1,C[L++]=w+y,C[L++]=w+1+y;if(C[L++]=y-1,C[L++]=0,C[L++]=y+y-1,C[L++]=y,_>0)for(w=0;w<y;w+=h)C[L++]=w,C[L++]=w+y;var E=new f.a;E.position=new u.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:A}),v.x=.5*p,v.y=Math.max(l,m);var D=new e.i(o.o.ZERO,i.o.magnitude(v));if(s.e(r._offsetAttribute)){p=A.length;var G=new Uint8Array(p/3),T=r._offsetAttribute===c.z.NONE?0:1;t.d(G,T),E.applyOffset=new u.o({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:G})}return new u.I({attributes:E,indices:C,primitiveType:b._0x3b3836.LINES,boundingSphere:D,offsetAttribute:r._offsetAttribute})}},function(t,e){return s.e(e)&&(t=O.unpack(t,e)),O.createGeometry(t)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createEllipseGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createEllipseGeometry.js index e129a54d..739728ba 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createEllipseGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createEllipseGeometry.js @@ -1 +1 @@ -define(["./Cartesian3-3a8bdb0b","./when-92c6cf3c","./EllipseGeometry-d4f5e042","./Cartesian2-b72655a5","./Check-52a7d806","./Math-ecf82623","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartographic-a2c313d7","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./EllipseGeometryLibrary-30d7e702","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryInstance-3190c1b4","./GeometryOffsetAttribute-b4d599f5","./GeometryPipeline-7ffd3f60","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./IndexDatatype-86677ec4","./IntersectionTests-6e80d61c","./Plane-33393da8","./VertexFormat-f496a3f1"],(function(e,t,r,a,n,c,i,o,d,f,s,b,l,u,m,y,p,C,G,E,h,A,_,D,F,I,k){"use strict";return function(n,c){return t.e(c)&&(n=r.Y.unpack(n,c)),n._center=e.o.clone(n._center),n._ellipsoid=a.t.clone(n._ellipsoid),r.Y.createGeometry(n)}})); +define(["./Cartesian3-3a8bdb0b","./when-92c6cf3c","./EllipseGeometry-4cb468e4","./Cartesian2-b72655a5","./Check-52a7d806","./Math-ecf82623","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartographic-a2c313d7","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./EllipseGeometryLibrary-5f302d9d","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryInstance-20be787d","./GeometryOffsetAttribute-b4d599f5","./GeometryPipeline-50805727","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./IndexDatatype-86677ec4","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./VertexFormat-f496a3f1"],(function(e,t,a,r,c,n,i,o,d,b,f,s,l,u,m,y,p,C,G,E,h,A,_,D,F,I,k){"use strict";return function(c,n){return t.e(n)&&(c=a.Y.unpack(c,n)),c._center=e.o.clone(c._center),c._ellipsoid=r.t.clone(c._ellipsoid),a.Y.createGeometry(c)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createEllipseOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createEllipseOutlineGeometry.js index 80cce969..25233e76 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createEllipseOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createEllipseOutlineGeometry.js @@ -1 +1 @@ -define(["./Cartesian3-3a8bdb0b","./when-92c6cf3c","./EllipseOutlineGeometry-65786d3b","./Cartesian2-b72655a5","./Check-52a7d806","./Math-ecf82623","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartographic-a2c313d7","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./EllipseGeometryLibrary-30d7e702","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4"],(function(e,t,r,a,c,n,i,o,d,l,b,f,u,s,y,p,m,C,G,h){"use strict";return function(c,n){return t.e(n)&&(c=r.M.unpack(c,n)),c._center=e.o.clone(c._center),c._ellipsoid=a.t.clone(c._ellipsoid),r.M.createGeometry(c)}})); +define(["./Cartesian3-3a8bdb0b","./when-92c6cf3c","./EllipseOutlineGeometry-50eb422d","./Cartesian2-b72655a5","./Check-52a7d806","./Math-ecf82623","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartographic-a2c313d7","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./EllipseGeometryLibrary-5f302d9d","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4"],(function(e,t,r,a,c,n,i,o,d,l,f,b,u,s,y,p,m,C,G,h){"use strict";return function(c,n){return t.e(n)&&(c=r.M.unpack(c,n)),c._center=e.o.clone(c._center),c._ellipsoid=a.t.clone(c._ellipsoid),r.M.createGeometry(c)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createEllipsoidGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createEllipsoidGeometry.js index 191f2d1e..a08e4759 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createEllipsoidGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createEllipsoidGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./EllipsoidGeometry-1042f440","./arrayFill-0358accf","./Check-52a7d806","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./VertexFormat-f496a3f1"],(function(e,t,a,r,c,n,f,i,o,b,d,u,s,m,y,l,C,p,G,h){"use strict";return function(a,r){return e.e(r)&&(a=t.b.unpack(a,r)),t.b.createGeometry(a)}})); +define(["./when-92c6cf3c","./EllipsoidGeometry-19d6e145","./arrayFill-0358accf","./Check-52a7d806","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./VertexFormat-f496a3f1"],(function(e,t,a,r,c,n,i,d,f,o,b,u,s,m,y,l,C,p,G,h){"use strict";return function(a,r){return e.e(r)&&(a=t.b.unpack(a,r)),t.b.createGeometry(a)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createEllipsoidOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createEllipsoidOutlineGeometry.js index d3ccfc33..58387730 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createEllipsoidOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createEllipsoidOutlineGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./EllipsoidOutlineGeometry-37daafe9","./arrayFill-0358accf","./Check-52a7d806","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4"],(function(e,t,a,r,c,n,i,f,d,o,u,b,s,l,y,m,C,p,G){"use strict";return function(a,r){return e.e(a.buffer)&&(a=t.x.unpack(a,r)),t.x.createGeometry(a)}})); +define(["./when-92c6cf3c","./EllipsoidOutlineGeometry-b56035c8","./arrayFill-0358accf","./Check-52a7d806","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4"],(function(e,t,a,r,c,n,i,f,d,o,u,b,s,l,y,m,C,p,G){"use strict";return function(a,r){return e.e(a.buffer)&&(a=t.x.unpack(a,r)),t.x.createGeometry(a)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createFrustumGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createFrustumGeometry.js index 9bdd3fc9..30cfa3fa 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createFrustumGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createFrustumGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./FrustumGeometry-9ce10b65","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Check-52a7d806","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./Plane-33393da8","./VertexFormat-f496a3f1"],(function(e,t,a,r,c,n,o,u,i,b,d,f,s,m,C,y,G,h){"use strict";return function(a,r){return e.e(r)&&(a=t.z.unpack(a,r)),t.z.createGeometry(a)}})); +define(["./when-92c6cf3c","./FrustumGeometry-0eaedaf3","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Check-52a7d806","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./Plane-a2c6da7b","./VertexFormat-f496a3f1"],(function(e,t,a,r,c,n,d,o,u,f,i,b,s,m,C,y,G,h){"use strict";return function(a,r){return e.e(r)&&(a=t.z.unpack(a,r)),t.z.createGeometry(a)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createFrustumOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createFrustumOutlineGeometry.js index 657fd8fa..7d21bddf 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createFrustumOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createFrustumOutlineGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./FrustumGeometry-9ce10b65","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./FeatureDetection-cec0163f","./Cartographic-a2c313d7","./Math-ecf82623","./Cartesian2-b72655a5","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./Plane-33393da8","./VertexFormat-f496a3f1"],(function(e,t,n,a,r,o,i,c,u,p,s,f,d,m,_,k,h,g){"use strict";function y(t){a.o.typeOf.object("options",t),a.o.typeOf.object("options.frustum",t.frustum),a.o.typeOf.object("options.origin",t.origin),a.o.typeOf.object("options.orientation",t.orientation);var r,c,u=t.frustum,p=t.orientation,s=t.origin,f=e.u(t._drawNearPlane,!0);u instanceof o.o?(r=0,c=o.o.packedLength):u instanceof o.a&&(r=1,c=o.a.packedLength),this._frustumType=r,this._frustum=u.clone(),this._origin=n.o.clone(s),this._orientation=i.n.clone(p),this._drawNearPlane=f,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+c+n.o.packedLength+i.n.packedLength}y.pack=function(t,r,c){a.o.typeOf.object("value",t),a.o.defined("array",r),c=e.u(c,0);var u=t._frustumType,p=t._frustum;return r[c++]=u,0===u?(o.o.pack(p,r,c),c+=o.o.packedLength):(o.a.pack(p,r,c),c+=o.a.packedLength),n.o.pack(t._origin,r,c),c+=n.o.packedLength,i.n.pack(t._orientation,r,c),r[c+=i.n.packedLength]=t._drawNearPlane?1:0,r};var b=new o.o,l=new o.a,w=new i.n,L=new n.o;return y.unpack=function(t,r,c){a.o.defined("array",t),r=e.u(r,0);var u,p=t[r++];0===p?(u=o.o.unpack(t,r,b),r+=o.o.packedLength):(u=o.a.unpack(t,r,l),r+=o.a.packedLength);var s=n.o.unpack(t,r,L);r+=n.o.packedLength;var f=i.n.unpack(t,r,w),d=1===t[r+=i.n.packedLength];if(!e.e(c))return new y({frustum:u,origin:s,orientation:f,_drawNearPlane:d});var m=p===c._frustumType?c._frustum:void 0;return c._frustum=u.clone(m),c._frustumType=p,c._origin=n.o.clone(s,c._origin),c._orientation=i.n.clone(f,c._orientation),c._drawNearPlane=d,c},y.createGeometry=function(e){var n=e._frustumType,a=e._frustum,p=e._origin,s=e._orientation,f=e._drawNearPlane,d=new Float64Array(24);o.z._computeNearFarPlanes(p,s,n,a,d);for(var m,_,k=new c.a({position:new i.o({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:d})}),h=f?2:1,g=new Uint16Array(8*(h+1)),y=f?0:1;y<2;++y)_=4*y,g[m=f?8*y:0]=_,g[m+1]=_+1,g[m+2]=_+1,g[m+3]=_+2,g[m+4]=_+2,g[m+5]=_+3,g[m+6]=_+3,g[m+7]=_;for(y=0;y<2;++y)_=4*y,g[m=8*(h+y)]=_,g[m+1]=_+4,g[m+2]=_+1,g[m+3]=_+5,g[m+4]=_+2,g[m+5]=_+6,g[m+6]=_+3,g[m+7]=_+7;return new i.I({attributes:k,indices:g,primitiveType:u._0x4b6a27.LINES,boundingSphere:t.i.fromVertices(d)})},function(t,n){return e.e(n)&&(t=y.unpack(t,n)),y.createGeometry(t)}})); +define(["./when-92c6cf3c","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./FrustumGeometry-0eaedaf3","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./FeatureDetection-fd297af4","./Cartographic-a2c313d7","./Math-ecf82623","./Cartesian2-b72655a5","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./Plane-a2c6da7b","./VertexFormat-f496a3f1"],(function(e,t,n,a,r,o,i,c,u,p,f,s,d,m,_,k,h,g){"use strict";function y(t){a.o.typeOf.object("options",t),a.o.typeOf.object("options.frustum",t.frustum),a.o.typeOf.object("options.origin",t.origin),a.o.typeOf.object("options.orientation",t.orientation);var r,c,u=t.frustum,p=t.orientation,f=t.origin,s=e.u(t._drawNearPlane,!0);u instanceof o.o?(r=0,c=o.o.packedLength):u instanceof o.a&&(r=1,c=o.a.packedLength),this._frustumType=r,this._frustum=u.clone(),this._origin=n.o.clone(f),this._orientation=i.n.clone(p),this._drawNearPlane=s,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+c+n.o.packedLength+i.n.packedLength}y.pack=function(t,r,c){a.o.typeOf.object("value",t),a.o.defined("array",r),c=e.u(c,0);var u=t._frustumType,p=t._frustum;return r[c++]=u,0===u?(o.o.pack(p,r,c),c+=o.o.packedLength):(o.a.pack(p,r,c),c+=o.a.packedLength),n.o.pack(t._origin,r,c),c+=n.o.packedLength,i.n.pack(t._orientation,r,c),r[c+=i.n.packedLength]=t._drawNearPlane?1:0,r};var l=new o.o,b=new o.a,w=new i.n,L=new n.o;return y.unpack=function(t,r,c){a.o.defined("array",t),r=e.u(r,0);var u,p=t[r++];0===p?(u=o.o.unpack(t,r,l),r+=o.o.packedLength):(u=o.a.unpack(t,r,b),r+=o.a.packedLength);var f=n.o.unpack(t,r,L);r+=n.o.packedLength;var s=i.n.unpack(t,r,w),d=1===t[r+=i.n.packedLength];if(!e.e(c))return new y({frustum:u,origin:f,orientation:s,_drawNearPlane:d});var m=p===c._frustumType?c._frustum:void 0;return c._frustum=u.clone(m),c._frustumType=p,c._origin=n.o.clone(f,c._origin),c._orientation=i.n.clone(s,c._orientation),c._drawNearPlane=d,c},y.createGeometry=function(e){var n=e._frustumType,a=e._frustum,p=e._origin,f=e._orientation,s=e._drawNearPlane,d=new Float64Array(24);o.z._computeNearFarPlanes(p,f,n,a,d);for(var m,_,k=new c.a({position:new i.o({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:d})}),h=s?2:1,g=new Uint16Array(8*(h+1)),y=s?0:1;y<2;++y)_=4*y,g[m=s?8*y:0]=_,g[m+1]=_+1,g[m+2]=_+1,g[m+3]=_+2,g[m+4]=_+2,g[m+5]=_+3,g[m+6]=_+3,g[m+7]=_;for(y=0;y<2;++y)_=4*y,g[m=8*(h+y)]=_,g[m+1]=_+4,g[m+2]=_+1,g[m+3]=_+5,g[m+4]=_+2,g[m+5]=_+6,g[m+6]=_+3,g[m+7]=_+7;return new i.I({attributes:k,indices:g,primitiveType:u._0x3b3836.LINES,boundingSphere:t.i.fromVertices(d)})},function(t,n){return e.e(n)&&(t=y.unpack(t,n)),y.createGeometry(t)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createGeometry.js index 10ec7430..0ca0a822 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./PrimitivePipeline-370489a0","./createTaskProcessorWorker","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Check-52a7d806","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryPipeline-7ffd3f60","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./IndexDatatype-86677ec4","./IntersectionTests-6e80d61c","./Plane-33393da8","./WebMercatorProjection-ee891935"],(function(e,r,t,a,n,o,i,c,s,f,u,b,d,l,m,p,C,y,k,v,P,h,G,W){"use strict";var A={};function g(r){var t=A[r];return e.e(t)||("object"==typeof exports?A[t]=t=require("Workers/"+r):require(["Workers/"+r],(function(e){A[t=e]=e}))),t}return t((function(t,a){for(var n=t.subTasks,o=n.length,i=new Array(o),c=0;c<o;c++){var s=n[c],f=s.geometry,u=s.moduleName;if(e.e(u)){var b=g(u);i[c]=b(f,s.offset)}else i[c]=f}return e.o.all(i,(function(e){return r.k.packCreateGeometryResults(e,a)}))}))})); +define(["./when-92c6cf3c","./PrimitivePipeline-21bb3b56","./createTaskProcessorWorker","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Check-52a7d806","./Math-ecf82623","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryPipeline-50805727","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./IndexDatatype-86677ec4","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./WebMercatorProjection-ee891935"],(function(e,r,t,a,n,o,c,i,s,u,b,f,d,l,m,p,C,y,k,v,P,h,G,W){"use strict";var A={};function g(r){var t=A[r];return e.e(t)||("object"==typeof exports?A[t]=t=require("Workers/"+r):require(["Workers/"+r],(function(e){A[t=e]=e}))),t}return t((function(t,a){for(var n=t.subTasks,o=n.length,c=new Array(o),i=0;i<o;i++){var s=n[i],u=s.geometry,b=s.moduleName;if(e.e(b)){var f=g(b);c[i]=f(u,s.offset)}else c[i]=u}return e.o.all(c,(function(e){return r.k.packCreateGeometryResults(e,a)}))}))})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createGroundPolylineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createGroundPolylineGeometry.js index e6037e02..19cbbce2 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createGroundPolylineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createGroundPolylineGeometry.js @@ -1 +1 @@ -define(["./buildModuleUrl-9eef8841","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./when-92c6cf3c","./Math-ecf82623","./ArcType-31298545","./arrayRemoveDuplicates-a6924649","./ComponentDatatype-98414d16","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./EncodedCartesian3-4f120b1b","./GeometryAttribute-f47bd1cb","./IntersectionTests-6e80d61c","./FeatureDetection-cec0163f","./Plane-33393da8","./WebMercatorProjection-ee891935","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e"],(function(e,t,o,i,n,r,a,s,l,u,c,h,p,g,d,f,w,v,m,_,y,T){"use strict";function E(o){o=r.u(o,{}),this._ellipsoid=r.u(o.ellipsoid,t.t.WGS84),this._rectangle=r.u(o.rectangle,t.h.MAX_VALUE),this._projection=new e.n(this._ellipsoid),this._numberOfLevelZeroTilesX=r.u(o.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=r.u(o.numberOfLevelZeroTilesY,1),this._customDPI=o.customDPI,this._scaleDenominators=o.scaleDenominators,this._tileWidth=r.u(o.tileWidth,256),this._tileHeight=r.u(o.tileHeight,256),this._beginLevel=r.u(o.beginLevel,0),this._orgin=r.u(o.orgin,void 0)}Object.defineProperties(E.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}},beginLevel:{get:function(){return this._beginLevel}},orgin:{get:function(){return this._orgin}}}),E.prototype.getNumberOfXTilesAtLevel=function(e){if(r.e(this._customDPI)&&r.e(this._scaleDenominators)){var t=this.calculateResolution(e),o=this._tileWidth*t.x;return Math.ceil(this._rectangle.width/o)}return this._numberOfLevelZeroTilesX<<e-this._beginLevel},E.prototype.getNumberOfYTilesAtLevel=function(e){if(r.e(this._customDPI)&&r.e(this._scaleDenominators)){var t=this.calculateResolution(e),o=this._tileHeight*t.y;return Math.ceil(this._rectangle.height/o)}return this._numberOfLevelZeroTilesY<<e-this._beginLevel},E.prototype.rectangleToNativeRectangle=function(e,o){n.o.defined("rectangle",e);var i=a.e.toDegrees(e.west),s=a.e.toDegrees(e.south),l=a.e.toDegrees(e.east),u=a.e.toDegrees(e.north);return r.e(o)?(o.west=i,o.south=s,o.east=l,o.north=u,o):new t.h(i,s,l,u)},E.prototype.tileXYToNativeRectangle=function(e,t,o,i){var n=this.tileXYToRectangle(e,t,o,i);return n.west=a.e.toDegrees(n.west),n.south=a.e.toDegrees(n.south),n.east=a.e.toDegrees(n.east),n.north=a.e.toDegrees(n.north),n},E.prototype.tileXYToRectangle=function(e,o,i,n){var a=this._rectangle,s=r.e(this._orgin)?this._orgin.longitude:a.west,l=r.e(this._orgin)?this._orgin.latitude:a.north;if(r.e(this._customDPI)&&r.e(this._scaleDenominators)){var u=this.calculateResolution(i),c=s+e*this._tileWidth*u.x,h=s+(e+1)*this._tileWidth*u.x,p=l-o*this._tileHeight*u.y,g=l-(o+1)*this._tileHeight*u.y;return r.e(n)?(n.west=c,n.south=g,n.east=h,n.north=p,n):new t.h(c,g,h,p)}var d=this.getNumberOfXTilesAtLevel(i),f=this.getNumberOfYTilesAtLevel(i),w=a.width/d,v=(c=e*w+a.west,h=(e+1)*w+a.west,a.height/f);p=a.north-o*v,g=a.north-(o+1)*v;return r.e(n)||(n=new t.h(c,g,h,p)),n.west=c,n.south=g,n.east=h,n.north=p,n},E.prototype.positionToTileXY=function(e,o,i){var n=this._rectangle;if(t.h.contains(n,e)){var s=this.getNumberOfXTilesAtLevel(o),l=this.getNumberOfYTilesAtLevel(o),u=r.e(this._orgin)?this._orgin.longitude:n.west,c=r.e(this._orgin)?this._orgin.latitude:n.north,h=n.width/s,p=n.height/l;if(r.e(this._customDPI)&&r.e(this._scaleDenominators)){var g=this.calculateResolution(o);h=this._tileWidth*g.x,p=this._tileHeight*g.y}var d=e.longitude;n.east<n.west&&(d+=a.e.TWO_PI),r.e(this._orgin)&&(s+=this._orgin.longitude!=n.west?Math.ceil((e.longitude-this._orgin.longitude)/h):0,l+=this._orgin.latitude!=n.north?Math.ceil((this._orgin.latitude-e.latitude)/p):0);var f=(d-u)/h|0;f>=s&&(f=s-1);var w=(c-e.latitude)/p|0;return w>=l&&(w=l-1),r.e(i)?(i.x=f,i.y=w,i):new t.o(f,w)}},E.prototype.calculateResolution=function(e){var o=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.x,i=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.y,n=t.t.WGS84.maximumRadius;return new t.o(o/n,i/n)};var O=new o.o,b=new o.o,L=new i.a,I=new o.o,P=new o.o,D=new e.i,k=new E,N=[new i.a,new i.a,new i.a,new i.a],x=new t.o,A={};function S(e){i.a.fromRadians(e.east,e.north,0,N[0]),i.a.fromRadians(e.west,e.north,0,N[1]),i.a.fromRadians(e.east,e.south,0,N[2]),i.a.fromRadians(e.west,e.south,0,N[3]);var t,o=0,n=0,r=0,a=0,s=A._terrainHeightsMaxLevel;for(t=0;t<=s;++t){for(var l=!1,u=0;u<4;++u){var c=N[u];if(k.positionToTileXY(c,t,x),0===u)r=x.x,a=x.y;else if(r!==x.x||a!==x.y){l=!0;break}}if(l)break;o=r,n=a}if(0!==t)return{x:o,y:n,level:t>s?s:t-1}}A.initialize=function(){var t=A._initPromise;return r.e(t)||(t=e.t.fetchJson(e.n$1("Assets/approximateTerrainHeights.json")).then((function(e){A._terrainHeights=e})),A._initPromise=t),t},A.getMinimumMaximumHeights=function(e,i){if(n.o.defined("rectangle",e),!r.e(A._terrainHeights))throw new n.t("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=r.u(i,t.t.WGS84);var a=S(e),s=A._defaultMinTerrainHeight,l=A._defaultMaxTerrainHeight;if(r.e(a)){var u=a.level+"-"+a.x+"-"+a.y,c=A._terrainHeights[u];r.e(c)&&(s=c[0],l=c[1]),i.cartographicToCartesian(t.h.northeast(e,L),O),i.cartographicToCartesian(t.h.southwest(e,L),b),o.o.midpoint(b,O,I);var h=i.scaleToGeodeticSurface(I,P);if(r.e(h)){var p=o.o.distance(I,h);s=Math.min(s,-p)}else s=A._defaultMinTerrainHeight}return{minimumTerrainHeight:s=Math.max(A._defaultMinTerrainHeight,s),maximumTerrainHeight:l}},A.getBoundingSphere=function(o,i){if(n.o.defined("rectangle",o),!r.e(A._terrainHeights))throw new n.t("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=r.u(i,t.t.WGS84);var a=S(o),s=A._defaultMaxTerrainHeight;if(r.e(a)){var l=a.level+"-"+a.x+"-"+a.y,u=A._terrainHeights[l];r.e(u)&&(s=u[1])}var c=e.i.fromRectangle3D(o,i,0);return e.i.fromRectangle3D(o,i,s,D),e.i.union(c,D,c)},A._terrainHeightsMaxLevel=6,A._defaultMaxTerrainHeight=9e3,A._defaultMinTerrainHeight=-1e5,A._terrainHeights=void 0,A._initPromise=void 0,Object.defineProperties(A,{initialized:{get:function(){return r.e(A._terrainHeights)}}});var C=[e.n,v.t],H=C.length,M=Math.cos(a.e.toRadians(30)),R=Math.cos(a.e.toRadians(150));function z(e){var o=(e=r.u(e,r.u.EMPTY_OBJECT)).positions;if(!r.e(o)||o.length<2)throw new n.t("At least two positions are required.");if(r.e(e.arcType)&&e.arcType!==s.L.GEODESIC&&e.arcType!==s.L.RHUMB)throw new n.t("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=r.u(e.width,1),this._positions=o,this.granularity=r.u(e.granularity,9999),this.loop=r.u(e.loop,!1),this.arcType=r.u(e.arcType,s.L.GEODESIC),this._ellipsoid=r.u(e.ellipsoid,t.t.WGS84),this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(z.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+t.t.packedLength+1+1}}}),z.setProjectionAndEllipsoid=function(e,t){for(var o=0,i=0;i<H;i++)if(t instanceof C[i]){o=i;break}e._projectionIndex=o,e._ellipsoid=t.ellipsoid};var j=new o.o,Y=new o.o,G=new o.o;function W(e,t,i,n,r){var a=Z(n,e,0,j),s=Z(n,e,i,Y),l=Z(n,t,0,G),u=$(s,a,Y),c=$(l,a,G);return o.o.cross(c,u,r),o.o.normalize(r,r)}var F=new i.a,B=new o.o,q=new o.o,X=new o.o;function U(e,t,i,n,r,a,l,u,p,g,d){if(0!==r){var f;a===s.L.GEODESIC?f=new c.E(e,t,l):a===s.L.RHUMB&&(f=new h.P(e,t,l));var w=f.surfaceDistance;if(!(w<r))for(var v=W(e,t,n,l,X),m=Math.ceil(w/r),_=w/m,y=_,T=m-1,E=u.length,O=0;O<T;O++){var b=f.interpolateUsingSurfaceDistance(y,F),L=Z(l,b,i,B),I=Z(l,b,n,q);o.o.pack(v,u,E),o.o.pack(L,p,E),o.o.pack(I,g,E),d.push(b.latitude),d.push(b.longitude),E+=3,y+=_}}}var V=new i.a;function Z(e,t,o,n){return i.a.clone(t,V),V.height=o,i.a.toCartesian(V,e,n)}function $(e,t,i){return o.o.subtract(e,t,i),o.o.normalize(i,i),i}z.pack=function(e,i,a){n.o.typeOf.object("value",e),n.o.defined("array",i);var s=r.u(a,0),l=e._positions,u=l.length;i[s++]=u;for(var c=0;c<u;++c){var h=l[c];o.o.pack(h,i,s),s+=3}return i[s++]=e.granularity,i[s++]=e.loop?1:0,i[s++]=e.arcType,t.t.pack(e._ellipsoid,i,s),s+=t.t.packedLength,i[s++]=e._projectionIndex,i[s++]=e._scene3DOnly?1:0,i},z.unpack=function(e,i,a){n.o.defined("array",e);for(var s=r.u(i,0),l=e[s++],u=new Array(l),c=0;c<l;c++)u[c]=o.o.unpack(e,s),s+=3;var h=e[s++],p=1===e[s++],g=e[s++],d=t.t.unpack(e,s);s+=t.t.packedLength;var f=e[s++],w=1===e[s++];if(!r.e(a)){var v=new z({positions:u,granularity:h,loop:p,arcType:g,ellipsoid:d});return v._projectionIndex=f,v._scene3DOnly=w,v}return a._positions=u,a.granularity=h,a.loop=p,a.arcType=g,a._ellipsoid=d,a._projectionIndex=f,a._scene3DOnly=w,a};var J=new o.o,Q=new o.o,K=new o.o,ee=new o.o,te=new w.o(o.o.UNIT_X,0),oe=new o.o;function ie(e,t,i,n,r){var s=$(i,t,oe),l=$(e,t,J),u=$(n,t,Q),c=o.o.cross(s,l,ee);c=o.o.normalize(c,c);var h=w.o.fromPointNormal(t,c,te),p=w.o.getPointDistance(h,n);if(a.e.equalsEpsilon(p,0,a.e.EPSILON7))return o.o.clone(c,r),r;r=o.o.add(u,l,r),r=o.o.normalize(r,r);var g=o.o.cross(s,r,K);return o.o.normalize(g,g),o.o.cross(g,s,r),o.o.normalize(r,r),o.o.dot(u,g)<0&&(r=o.o.negate(r,r)),r}var ne=w.o.fromPointNormal(o.o.ZERO,o.o.UNIT_Y),re=new o.o,ae=new o.o,se=new o.o,le=new o.o,ue=new o.o,ce=new o.o,he=new i.a,pe=new i.a,ge=new i.a;z.createGeometry=function(e){var t,n,u=!e._scene3DOnly,c=e.loop,p=e._ellipsoid,g=e.granularity,f=e.arcType,w=new C[e._projectionIndex](p),v=1e3,m=e._positions,_=m.length;2===_&&(c=!1);var y,T,E,O,b,L,I,P=new h.P(void 0,void 0,p),D=[m[0]];for(n=0;n<_-1;n++)y=m[n],T=m[n+1],b=d.g.lineSegmentPlane(y,T,ne,ce),r.e(b)&&!o.o.equalsEpsilon(b,y,a.e.EPSILON7)&&!o.o.equalsEpsilon(b,T,a.e.EPSILON7)&&(e.arcType===s.L.GEODESIC?D.push(o.o.clone(b)):e.arcType===s.L.RHUMB&&(I=p.cartesianToCartographic(b,he).longitude,E=p.cartesianToCartographic(y,he),O=p.cartesianToCartographic(T,pe),P.setEndPoints(E,O),L=P.findIntersectionWithLongitude(I,ge),b=p.cartographicToCartesian(L,ce),r.e(b)&&!o.o.equalsEpsilon(b,y,a.e.EPSILON7)&&!o.o.equalsEpsilon(b,T,a.e.EPSILON7)&&D.push(o.o.clone(b)))),D.push(T);c&&(y=m[_-1],T=m[0],b=d.g.lineSegmentPlane(y,T,ne,ce),r.e(b)&&!o.o.equalsEpsilon(b,y,a.e.EPSILON7)&&!o.o.equalsEpsilon(b,T,a.e.EPSILON7)&&(e.arcType===s.L.GEODESIC?D.push(o.o.clone(b)):e.arcType===s.L.RHUMB&&(I=p.cartesianToCartographic(b,he).longitude,E=p.cartesianToCartographic(y,he),O=p.cartesianToCartographic(T,pe),P.setEndPoints(E,O),L=P.findIntersectionWithLongitude(I,ge),b=p.cartographicToCartesian(L,ce),r.e(b)&&!o.o.equalsEpsilon(b,y,a.e.EPSILON7)&&!o.o.equalsEpsilon(b,T,a.e.EPSILON7)&&D.push(o.o.clone(b)))));var k=D.length,N=new Array(k);for(n=0;n<k;n++){var x=i.a.fromCartesian(D[n],p);x.height=0,N[n]=x}if(!((k=(N=l.D(N,i.a.equalsEpsilon)).length)<2)){var A=[],S=[],H=[],M=[],R=re,z=ae,j=se,Y=le,G=ue,F=N[0],B=N[1];for(R=Z(p,N[k-1],0,R),Y=Z(p,B,0,Y),z=Z(p,F,0,z),j=Z(p,F,v,j),G=c?ie(R,z,j,Y,G):W(F,B,v,p,G),o.o.pack(G,S,0),o.o.pack(z,H,0),o.o.pack(j,M,0),A.push(F.latitude),A.push(F.longitude),U(F,B,0,v,g,f,p,S,H,M,A),n=1;n<k-1;++n){R=o.o.clone(z,R),z=o.o.clone(Y,z);var q=N[n];Z(p,q,v,j),Z(p,N[n+1],0,Y),ie(R,z,j,Y,G),t=S.length,o.o.pack(G,S,t),o.o.pack(z,H,t),o.o.pack(j,M,t),A.push(q.latitude),A.push(q.longitude),U(N[n],N[n+1],0,v,g,f,p,S,H,M,A)}var X=N[k-1],V=N[k-2];if(z=Z(p,X,0,z),j=Z(p,X,v,j),c){var $=N[0];G=ie(R=Z(p,V,0,R),z,j,Y=Z(p,$,0,Y),G)}else G=W(V,X,v,p,G);if(t=S.length,o.o.pack(G,S,t),o.o.pack(z,H,t),o.o.pack(j,M,t),A.push(X.latitude),A.push(X.longitude),c){for(U(X,F,0,v,g,f,p,S,H,M,A),t=S.length,n=0;n<3;++n)S[t+n]=S[n],H[t+n]=H[n],M[t+n]=M[n];A.push(F.latitude),A.push(F.longitude)}return at(c,w,H,M,S,A,u)}};var de=new o.o,fe=new f.p$1,we=new g.n;function ve(e,t,i,n){var r=$(i,t,de),s=o.o.dot(r,e);if(s>M||s<R){var l=$(n,i,oe),u=s<R?a.e.PI_OVER_TWO:-a.e.PI_OVER_TWO,c=g.n.fromAxisAngle(l,u,we),h=f.p$1.fromQuaternion(c,fe);return f.p$1.multiplyByVector(h,e,e),!0}return!1}var me=new i.a,_e=new o.o,ye=new o.o;function Te(e,t,n,r,s){var l=i.a.toCartesian(t,e._ellipsoid,_e),u=o.o.add(l,n,ye),c=!1,h=e._ellipsoid,p=h.cartesianToCartographic(u,me);Math.abs(t.longitude-p.longitude)>a.e.PI_OVER_TWO&&(c=!0,u=o.o.subtract(l,n,ye),p=h.cartesianToCartographic(u,me)),p.height=0;var g=e.project(p,s);return(s=o.o.subtract(g,r,s)).z=0,s=o.o.normalize(s,s),c&&o.o.negate(s,s),s}var Ee=new o.o,Oe=new o.o;function be(e,t,i,n,r,a){var s=o.o.subtract(t,e,Ee);o.o.normalize(s,s);var l=i-0,u=o.o.multiplyByScalar(s,l,Oe);o.o.add(e,u,r);var c=n-1e3;u=o.o.multiplyByScalar(s,c,Oe),o.o.add(t,u,a)}var Le=new o.o;function Ie(e,t){var i=w.o.getPointDistance(ne,e),n=w.o.getPointDistance(ne,t),r=Le;a.e.equalsEpsilon(i,0,a.e.EPSILON2)?(r=$(t,e,r),o.o.multiplyByScalar(r,a.e.EPSILON2,r),o.o.add(e,r,e)):a.e.equalsEpsilon(n,0,a.e.EPSILON2)&&(r=$(e,t,r),o.o.multiplyByScalar(r,a.e.EPSILON2,r),o.o.add(t,r,t))}function Pe(e,t){var o=Math.abs(e.longitude),i=Math.abs(t.longitude);if(a.e.equalsEpsilon(o,a.e.PI,a.e.EPSILON11)){var n=a.e.sign(t.longitude);return e.longitude=n*(o-a.e.EPSILON11),1}if(a.e.equalsEpsilon(i,a.e.PI,a.e.EPSILON11)){var r=a.e.sign(e.longitude);return t.longitude=r*(i-a.e.EPSILON11),2}return 0}var De=new i.a,ke=new i.a,Ne=new o.o,xe=new o.o,Ae=new o.o,Se=new o.o,Ce=new o.o,He=new o.o,Me=[De,ke],Re=new t.h,ze=new o.o,je=new o.o,Ye=new o.o,Ge=new o.o,We=new o.o,Fe=new o.o,Be=new o.o,qe=new o.o,Xe=new o.o,Ue=new o.o,Ve=new o.o,Ze=new o.o,$e=new o.o,Je=new o.o,Qe=new p.i,Ke=new p.i,et=new o.o,tt=new o.o,ot=new o.o,it=[new e.i,new e.i],nt=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],rt=nt.length;function at(i,n,r,s,l,c,h){var d,f,w,v,m,_,y=n._ellipsoid,T=r.length/3-1,E=8*T,O=4*E,b=36*T,L=E>65535?new Uint32Array(b):new Uint16Array(b),I=new Float64Array(3*E),P=new Float32Array(O),D=new Float32Array(O),k=new Float32Array(O),N=new Float32Array(O),x=new Float32Array(O);h&&(w=new Float32Array(O),v=new Float32Array(O),m=new Float32Array(O),_=new Float32Array(2*E));var S=c.length/2,C=0,H=De;H.height=0;var R=ke;R.height=0;var z=Ne,j=xe;if(h)for(f=0,d=1;d<S;d++)H.latitude=c[f],H.longitude=c[f+1],R.latitude=c[f+2],R.longitude=c[f+3],z=n.project(H,z),j=n.project(R,j),C+=o.o.distance(z,j),f+=2;var Y=s.length/3;j=o.o.unpack(s,0,j);var G,W=0;for(f=3,d=1;d<Y;d++)z=o.o.clone(j,z),j=o.o.unpack(s,f,j),W+=o.o.distance(z,j),f+=3;f=3;var F=0,B=0,q=0,X=0,U=!1,V=o.o.unpack(r,0,Se),Z=o.o.unpack(s,0,xe),J=o.o.unpack(l,0,He);i&&(ve(J,o.o.unpack(r,r.length-6,Ae),V,Z)&&(J=o.o.negate(J,J)));var Q=0,K=0,ee=0;for(d=0;d<T;d++){var te,oe,ie,ne,re=o.o.clone(V,Ae),ae=o.o.clone(Z,Ne),se=o.o.clone(J,Ce);if(U&&(se=o.o.negate(se,se)),V=o.o.unpack(r,f,Se),Z=o.o.unpack(s,f,xe),U=ve(J=o.o.unpack(l,f,He),re,V,Z),H.latitude=c[F],H.longitude=c[F+1],R.latitude=c[F+2],R.longitude=c[F+3],h){var le=Pe(H,R);te=n.project(H,We);var ue=$(oe=n.project(R,Fe),te,et);ue.y=Math.abs(ue.y),ie=Be,ne=qe,0===le||o.o.dot(ue,o.o.UNIT_Y)>M?(ie=Te(n,H,se,te,Be),ne=Te(n,R,J,oe,qe)):1===le?(ne=Te(n,R,J,oe,qe),ie.x=0,ie.y=a.e.sign(H.longitude-Math.abs(R.longitude)),ie.z=0):(ie=Te(n,H,se,te,Be),ne.x=0,ne.y=a.e.sign(H.longitude-R.longitude),ne.z=0)}var ce=o.o.distance(ae,Z),he=p.i.fromCartesian(re,Qe),pe=o.o.subtract(V,re,Xe),ge=o.o.normalize(pe,Ze),de=o.o.subtract(ae,re,Ue);de=o.o.normalize(de,de);var fe=o.o.cross(ge,de,Ze);fe=o.o.normalize(fe,fe);var we=o.o.cross(de,se,$e);we=o.o.normalize(we,we);var me=o.o.subtract(Z,V,Ve);me=o.o.normalize(me,me);var _e=o.o.cross(J,me,Je);_e=o.o.normalize(_e,_e);var ye,Ee,Oe,Le=ce/W,at=Q/W,lt=0,ut=0,ct=0;if(h){lt=o.o.distance(te,oe),ye=p.i.fromCartesian(te,Ke),Ee=o.o.subtract(oe,te,et);var ht=(Oe=o.o.normalize(Ee,tt)).x;Oe.x=Oe.y,Oe.y=-ht,ut=lt/C,ct=K/C}for(G=0;G<8;G++){var pt=X+4*G,gt=B+2*G,dt=pt+3,ft=G<4?1:-1,wt=2===G||3===G||6===G||7===G?1:-1;o.o.pack(he.high,P,pt),P[dt]=pe.x,o.o.pack(he.low,D,pt),D[dt]=pe.y,o.o.pack(we,k,pt),k[dt]=pe.z,o.o.pack(_e,N,pt),N[dt]=Le*ft,o.o.pack(fe,x,pt);var vt=at*wt;0===vt&&wt<0&&(vt=Number.POSITIVE_INFINITY),x[dt]=vt,h&&(w[pt]=ye.high.x,w[pt+1]=ye.high.y,w[pt+2]=ye.low.x,w[pt+3]=ye.low.y,m[pt]=-ie.y,m[pt+1]=ie.x,m[pt+2]=ne.y,m[pt+3]=-ne.x,v[pt]=Ee.x,v[pt+1]=Ee.y,v[pt+2]=Oe.x,v[pt+3]=Oe.y,_[gt]=ut*ft,0===(vt=ct*wt)&&wt<0&&(vt=Number.POSITIVE_INFINITY),_[gt+1]=vt)}var mt=Ye,_t=Ge,yt=ze,Tt=je,Et=t.h.fromCartographicArray(Me,Re),Ot=A.getMinimumMaximumHeights(Et,y),bt=Ot.minimumTerrainHeight,Lt=Ot.maximumTerrainHeight;ee+=bt,ee+=Lt,be(re,ae,bt,Lt,mt,yt),be(V,Z,bt,Lt,_t,Tt);var It=o.o.multiplyByScalar(fe,a.e.EPSILON5,ot);o.o.add(mt,It,mt),o.o.add(_t,It,_t),o.o.add(yt,It,yt),o.o.add(Tt,It,Tt),Ie(mt,_t),Ie(yt,Tt),o.o.pack(mt,I,q),o.o.pack(_t,I,q+3),o.o.pack(Tt,I,q+6),o.o.pack(yt,I,q+9),It=o.o.multiplyByScalar(fe,-2*a.e.EPSILON5,ot),o.o.add(mt,It,mt),o.o.add(_t,It,_t),o.o.add(yt,It,yt),o.o.add(Tt,It,Tt),Ie(mt,_t),Ie(yt,Tt),o.o.pack(mt,I,q+12),o.o.pack(_t,I,q+15),o.o.pack(Tt,I,q+18),o.o.pack(yt,I,q+21),F+=2,f+=3,B+=16,q+=24,X+=32,Q+=ce,K+=lt}f=0;var Pt=0;for(d=0;d<T;d++){for(G=0;G<rt;G++)L[f+G]=nt[G]+Pt;Pt+=8,f+=rt}var Dt=it;e.i.fromVertices(r,o.o.ZERO,3,Dt[0]),e.i.fromVertices(s,o.o.ZERO,3,Dt[1]);var kt=e.i.fromBoundingSpheres(Dt);kt.radius+=ee/(2*T);var Nt={position:new g.o({componentDatatype:u.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:I}),startHiAndForwardOffsetX:st(P),startLoAndForwardOffsetY:st(D),startNormalAndForwardOffsetZ:st(k),endNormalAndTextureCoordinateNormalizationX:st(N),rightNormalAndTextureCoordinateNormalizationY:st(x)};return h&&(Nt.startHiLo2D=st(w),Nt.offsetAndRight2D=st(v),Nt.startEndNormals2D=st(m),Nt.texcoordNormalization2D=new g.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:_})),new g.I({attributes:Nt,indices:L,boundingSphere:kt})}function st(e){return new g.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return z._projectNormal=Te,function(e,t){return A.initialize().then((function(){return r.e(t)&&(e=z.unpack(e,t)),z.createGeometry(e)}))}})); +define(["./buildModuleUrl-cbcc8c56","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./when-92c6cf3c","./Math-ecf82623","./ArcType-31298545","./arrayRemoveDuplicates-a6924649","./ComponentDatatype-98414d16","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./EncodedCartesian3-4f120b1b","./GeometryAttribute-65cf868d","./IntersectionTests-9ff29c98","./FeatureDetection-fd297af4","./Plane-a2c6da7b","./WebMercatorProjection-ee891935","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e"],(function(e,t,o,i,n,r,a,s,l,u,c,h,p,d,g,f,w,v,m,_,y,T){"use strict";function E(o){o=r.u(o,{}),this._ellipsoid=r.u(o.ellipsoid,t.t.WGS84),this._rectangle=r.u(o.rectangle,t.h.MAX_VALUE),this._projection=new e.n(this._ellipsoid),this._numberOfLevelZeroTilesX=r.u(o.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=r.u(o.numberOfLevelZeroTilesY,1),this._customDPI=o.customDPI,this._scaleDenominators=o.scaleDenominators,this._tileWidth=r.u(o.tileWidth,256),this._tileHeight=r.u(o.tileHeight,256),this._beginLevel=r.u(o.beginLevel,0),this._orgin=r.u(o.orgin,void 0)}Object.defineProperties(E.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}},beginLevel:{get:function(){return this._beginLevel}},orgin:{get:function(){return this._orgin}}}),E.prototype.getNumberOfXTilesAtLevel=function(e){if(r.e(this._customDPI)&&r.e(this._scaleDenominators)){var t=this.calculateResolution(e),o=this._tileWidth*t.x;return Math.ceil(this._rectangle.width/o)}return this._numberOfLevelZeroTilesX<<e-this._beginLevel},E.prototype.getNumberOfYTilesAtLevel=function(e){if(r.e(this._customDPI)&&r.e(this._scaleDenominators)){var t=this.calculateResolution(e),o=this._tileHeight*t.y;return Math.ceil(this._rectangle.height/o)}return this._numberOfLevelZeroTilesY<<e-this._beginLevel},E.prototype.rectangleToNativeRectangle=function(e,o){n.o.defined("rectangle",e);var i=a.e.toDegrees(e.west),s=a.e.toDegrees(e.south),l=a.e.toDegrees(e.east),u=a.e.toDegrees(e.north);return r.e(o)?(o.west=i,o.south=s,o.east=l,o.north=u,o):new t.h(i,s,l,u)},E.prototype.tileXYToNativeRectangle=function(e,t,o,i){var n=this.tileXYToRectangle(e,t,o,i);return n.west=a.e.toDegrees(n.west),n.south=a.e.toDegrees(n.south),n.east=a.e.toDegrees(n.east),n.north=a.e.toDegrees(n.north),n},E.prototype.tileXYToRectangle=function(e,o,i,n){var a=this._rectangle,s=r.e(this._orgin)?this._orgin.longitude:a.west,l=r.e(this._orgin)?this._orgin.latitude:a.north;if(r.e(this._customDPI)&&r.e(this._scaleDenominators)){var u=this.calculateResolution(i),c=s+e*this._tileWidth*u.x,h=s+(e+1)*this._tileWidth*u.x,p=l-o*this._tileHeight*u.y,d=l-(o+1)*this._tileHeight*u.y;return r.e(n)?(n.west=c,n.south=d,n.east=h,n.north=p,n):new t.h(c,d,h,p)}var g=this.getNumberOfXTilesAtLevel(i),f=this.getNumberOfYTilesAtLevel(i),w=a.width/g,v=(c=e*w+a.west,h=(e+1)*w+a.west,a.height/f);p=a.north-o*v,d=a.north-(o+1)*v;return r.e(n)||(n=new t.h(c,d,h,p)),n.west=c,n.south=d,n.east=h,n.north=p,n},E.prototype.positionToTileXY=function(e,o,i){var n=this._rectangle;if(t.h.contains(n,e)){var s=this.getNumberOfXTilesAtLevel(o),l=this.getNumberOfYTilesAtLevel(o),u=r.e(this._orgin)?this._orgin.longitude:n.west,c=r.e(this._orgin)?this._orgin.latitude:n.north,h=n.width/s,p=n.height/l;if(r.e(this._customDPI)&&r.e(this._scaleDenominators)){var d=this.calculateResolution(o);h=this._tileWidth*d.x,p=this._tileHeight*d.y}var g=e.longitude;n.east<n.west&&(g+=a.e.TWO_PI),r.e(this._orgin)&&(s+=this._orgin.longitude!=n.west?Math.ceil((e.longitude-this._orgin.longitude)/h):0,l+=this._orgin.latitude!=n.north?Math.ceil((this._orgin.latitude-e.latitude)/p):0);var f=(g-u)/h|0;f>=s&&(f=s-1);var w=(c-e.latitude)/p|0;return w>=l&&(w=l-1),r.e(i)?(i.x=f,i.y=w,i):new t.o(f,w)}},E.prototype.calculateResolution=function(e){var o=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.x,i=.0254*this._scaleDenominators[e-this._beginLevel]/this._customDPI.y,n=t.t.WGS84.maximumRadius;return new t.o(o/n,i/n)};var O=new o.o,b=new o.o,L=new i.a,I=new o.o,P=new o.o,D=new e.i,k=new E,x=[new i.a,new i.a,new i.a,new i.a],A=new t.o,N={};function S(e){i.a.fromRadians(e.east,e.north,0,x[0]),i.a.fromRadians(e.west,e.north,0,x[1]),i.a.fromRadians(e.east,e.south,0,x[2]),i.a.fromRadians(e.west,e.south,0,x[3]);var t,o=0,n=0,r=0,a=0,s=N._terrainHeightsMaxLevel;for(t=0;t<=s;++t){for(var l=!1,u=0;u<4;++u){var c=x[u];if(k.positionToTileXY(c,t,A),0===u)r=A.x,a=A.y;else if(r!==A.x||a!==A.y){l=!0;break}}if(l)break;o=r,n=a}if(0!==t)return{x:o,y:n,level:t>s?s:t-1}}N.initialize=function(){var t=N._initPromise;return r.e(t)||(t=e.t.fetchJson(e.n$1("Assets/approximateTerrainHeights.json")).then((function(e){N._terrainHeights=e})),N._initPromise=t),t},N.getMinimumMaximumHeights=function(e,i){if(n.o.defined("rectangle",e),!r.e(N._terrainHeights))throw new n.t("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=r.u(i,t.t.WGS84);var a=S(e),s=N._defaultMinTerrainHeight,l=N._defaultMaxTerrainHeight;if(r.e(a)){var u=a.level+"-"+a.x+"-"+a.y,c=N._terrainHeights[u];r.e(c)&&(s=c[0],l=c[1]),i.cartographicToCartesian(t.h.northeast(e,L),O),i.cartographicToCartesian(t.h.southwest(e,L),b),o.o.midpoint(b,O,I);var h=i.scaleToGeodeticSurface(I,P);if(r.e(h)){var p=o.o.distance(I,h);s=Math.min(s,-p)}else s=N._defaultMinTerrainHeight}return{minimumTerrainHeight:s=Math.max(N._defaultMinTerrainHeight,s),maximumTerrainHeight:l}},N.getBoundingSphere=function(o,i){if(n.o.defined("rectangle",o),!r.e(N._terrainHeights))throw new n.t("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=r.u(i,t.t.WGS84);var a=S(o),s=N._defaultMaxTerrainHeight;if(r.e(a)){var l=a.level+"-"+a.x+"-"+a.y,u=N._terrainHeights[l];r.e(u)&&(s=u[1])}var c=e.i.fromRectangle3D(o,i,0);return e.i.fromRectangle3D(o,i,s,D),e.i.union(c,D,c)},N._terrainHeightsMaxLevel=6,N._defaultMaxTerrainHeight=9e3,N._defaultMinTerrainHeight=-1e5,N._terrainHeights=void 0,N._initPromise=void 0,Object.defineProperties(N,{initialized:{get:function(){return r.e(N._terrainHeights)}}});var C=[e.n,v.t],H=C.length,M=Math.cos(a.e.toRadians(30)),R=Math.cos(a.e.toRadians(150));function z(e){var o=(e=r.u(e,r.u.EMPTY_OBJECT)).positions;if(!r.e(o)||o.length<2)throw new n.t("At least two positions are required.");if(r.e(e.arcType)&&e.arcType!==s.L.GEODESIC&&e.arcType!==s.L.RHUMB)throw new n.t("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=r.u(e.width,1),this._positions=o,this.granularity=r.u(e.granularity,9999),this.loop=r.u(e.loop,!1),this.arcType=r.u(e.arcType,s.L.GEODESIC),this._ellipsoid=r.u(e.ellipsoid,t.t.WGS84),this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(z.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+t.t.packedLength+1+1}}}),z.setProjectionAndEllipsoid=function(e,t){for(var o=0,i=0;i<H;i++)if(t instanceof C[i]){o=i;break}e._projectionIndex=o,e._ellipsoid=t.ellipsoid};var j=new o.o,Y=new o.o,G=new o.o;function W(e,t,i,n,r){var a=Z(n,e,0,j),s=Z(n,e,i,Y),l=Z(n,t,0,G),u=$(s,a,Y),c=$(l,a,G);return o.o.cross(c,u,r),o.o.normalize(r,r)}var F=new i.a,B=new o.o,q=new o.o,X=new o.o;function U(e,t,i,n,r,a,l,u,p,d,g){if(0!==r){var f;a===s.L.GEODESIC?f=new c.E(e,t,l):a===s.L.RHUMB&&(f=new h.P(e,t,l));var w=f.surfaceDistance;if(!(w<r))for(var v=W(e,t,n,l,X),m=Math.ceil(w/r),_=w/m,y=_,T=m-1,E=u.length,O=0;O<T;O++){var b=f.interpolateUsingSurfaceDistance(y,F),L=Z(l,b,i,B),I=Z(l,b,n,q);o.o.pack(v,u,E),o.o.pack(L,p,E),o.o.pack(I,d,E),g.push(b.latitude),g.push(b.longitude),E+=3,y+=_}}}var V=new i.a;function Z(e,t,o,n){return i.a.clone(t,V),V.height=o,i.a.toCartesian(V,e,n)}function $(e,t,i){return o.o.subtract(e,t,i),o.o.normalize(i,i),i}function J(e,t,i,n){return n=$(e,t,n),n=o.o.cross(n,i,n),n=o.o.normalize(n,n),n=o.o.cross(i,n,n)}z.pack=function(e,i,a){n.o.typeOf.object("value",e),n.o.defined("array",i);var s=r.u(a,0),l=e._positions,u=l.length;i[s++]=u;for(var c=0;c<u;++c){var h=l[c];o.o.pack(h,i,s),s+=3}return i[s++]=e.granularity,i[s++]=e.loop?1:0,i[s++]=e.arcType,t.t.pack(e._ellipsoid,i,s),s+=t.t.packedLength,i[s++]=e._projectionIndex,i[s++]=e._scene3DOnly?1:0,i},z.unpack=function(e,i,a){n.o.defined("array",e);for(var s=r.u(i,0),l=e[s++],u=new Array(l),c=0;c<l;c++)u[c]=o.o.unpack(e,s),s+=3;var h=e[s++],p=1===e[s++],d=e[s++],g=t.t.unpack(e,s);s+=t.t.packedLength;var f=e[s++],w=1===e[s++];if(!r.e(a)){var v=new z({positions:u,granularity:h,loop:p,arcType:d,ellipsoid:g});return v._projectionIndex=f,v._scene3DOnly=w,v}return a._positions=u,a.granularity=h,a.loop=p,a.arcType=d,a._ellipsoid=g,a._projectionIndex=f,a._scene3DOnly=w,a};var Q=new o.o,K=new o.o,ee=new o.o,te=new o.o;function oe(e,t,i,n,r){var s=$(i,t,te),l=J(e,t,s,Q),u=J(n,t,s,K);if(a.e.equalsEpsilon(o.o.dot(l,u),-1,a.e.EPSILON5))return r=o.o.cross(s,l,r),r=o.o.normalize(r,r);r=o.o.add(u,l,r),r=o.o.normalize(r,r);var c=o.o.cross(s,r,ee);return o.o.dot(u,c)<0&&(r=o.o.negate(r,r)),r}var ie=w.o.fromPointNormal(o.o.ZERO,o.o.UNIT_Y),ne=new o.o,re=new o.o,ae=new o.o,se=new o.o,le=new o.o,ue=new o.o,ce=new i.a,he=new i.a,pe=new i.a;z.createGeometry=function(e){var t,n,u=!e._scene3DOnly,c=e.loop,p=e._ellipsoid,d=e.granularity,f=e.arcType,w=new C[e._projectionIndex](p),v=1e3,m=e._positions,_=m.length;2===_&&(c=!1);var y,T,E,O,b,L,I,P=new h.P(void 0,void 0,p),D=[m[0]];for(n=0;n<_-1;n++)y=m[n],T=m[n+1],b=g.g.lineSegmentPlane(y,T,ie,ue),r.e(b)&&!o.o.equalsEpsilon(b,y,a.e.EPSILON7)&&!o.o.equalsEpsilon(b,T,a.e.EPSILON7)&&(e.arcType===s.L.GEODESIC?D.push(o.o.clone(b)):e.arcType===s.L.RHUMB&&(I=p.cartesianToCartographic(b,ce).longitude,E=p.cartesianToCartographic(y,ce),O=p.cartesianToCartographic(T,he),P.setEndPoints(E,O),L=P.findIntersectionWithLongitude(I,pe),b=p.cartographicToCartesian(L,ue),r.e(b)&&!o.o.equalsEpsilon(b,y,a.e.EPSILON7)&&!o.o.equalsEpsilon(b,T,a.e.EPSILON7)&&D.push(o.o.clone(b)))),D.push(T);c&&(y=m[_-1],T=m[0],b=g.g.lineSegmentPlane(y,T,ie,ue),r.e(b)&&!o.o.equalsEpsilon(b,y,a.e.EPSILON7)&&!o.o.equalsEpsilon(b,T,a.e.EPSILON7)&&(e.arcType===s.L.GEODESIC?D.push(o.o.clone(b)):e.arcType===s.L.RHUMB&&(I=p.cartesianToCartographic(b,ce).longitude,E=p.cartesianToCartographic(y,ce),O=p.cartesianToCartographic(T,he),P.setEndPoints(E,O),L=P.findIntersectionWithLongitude(I,pe),b=p.cartographicToCartesian(L,ue),r.e(b)&&!o.o.equalsEpsilon(b,y,a.e.EPSILON7)&&!o.o.equalsEpsilon(b,T,a.e.EPSILON7)&&D.push(o.o.clone(b)))));var k=D.length,x=new Array(k);for(n=0;n<k;n++){var A=i.a.fromCartesian(D[n],p);A.height=0,x[n]=A}if(!((k=(x=l.D(x,i.a.equalsEpsilon)).length)<2)){var N=[],S=[],H=[],M=[],R=ne,z=re,j=ae,Y=se,G=le,F=x[0],B=x[1];for(R=Z(p,x[k-1],0,R),Y=Z(p,B,0,Y),z=Z(p,F,0,z),j=Z(p,F,v,j),G=c?oe(R,z,j,Y,G):W(F,B,v,p,G),o.o.pack(G,S,0),o.o.pack(z,H,0),o.o.pack(j,M,0),N.push(F.latitude),N.push(F.longitude),U(F,B,0,v,d,f,p,S,H,M,N),n=1;n<k-1;++n){R=o.o.clone(z,R),z=o.o.clone(Y,z);var q=x[n];Z(p,q,v,j),Z(p,x[n+1],0,Y),oe(R,z,j,Y,G),t=S.length,o.o.pack(G,S,t),o.o.pack(z,H,t),o.o.pack(j,M,t),N.push(q.latitude),N.push(q.longitude),U(x[n],x[n+1],0,v,d,f,p,S,H,M,N)}var X=x[k-1],V=x[k-2];if(z=Z(p,X,0,z),j=Z(p,X,v,j),c){var $=x[0];G=oe(R=Z(p,V,0,R),z,j,Y=Z(p,$,0,Y),G)}else G=W(V,X,v,p,G);if(t=S.length,o.o.pack(G,S,t),o.o.pack(z,H,t),o.o.pack(j,M,t),N.push(X.latitude),N.push(X.longitude),c){for(U(X,F,0,v,d,f,p,S,H,M,N),t=S.length,n=0;n<3;++n)S[t+n]=S[n],H[t+n]=H[n],M[t+n]=M[n];N.push(F.latitude),N.push(F.longitude)}return rt(c,w,H,M,S,N,u)}};var de=new o.o,ge=new f.p$1,fe=new d.n;function we(e,t,i,n){var r=$(i,t,de),s=o.o.dot(r,e);if(s>M||s<R){var l=$(n,i,te),u=s<R?a.e.PI_OVER_TWO:-a.e.PI_OVER_TWO,c=d.n.fromAxisAngle(l,u,fe),h=f.p$1.fromQuaternion(c,ge);return f.p$1.multiplyByVector(h,e,e),!0}return!1}var ve=new i.a,me=new o.o,_e=new o.o;function ye(e,t,n,r,s){var l=i.a.toCartesian(t,e._ellipsoid,me),u=o.o.add(l,n,_e),c=!1,h=e._ellipsoid,p=h.cartesianToCartographic(u,ve);Math.abs(t.longitude-p.longitude)>a.e.PI_OVER_TWO&&(c=!0,u=o.o.subtract(l,n,_e),p=h.cartesianToCartographic(u,ve)),p.height=0;var d=e.project(p,s);return(s=o.o.subtract(d,r,s)).z=0,s=o.o.normalize(s,s),c&&o.o.negate(s,s),s}var Te=new o.o,Ee=new o.o;function Oe(e,t,i,n,r,a){var s=o.o.subtract(t,e,Te);o.o.normalize(s,s);var l=i-0,u=o.o.multiplyByScalar(s,l,Ee);o.o.add(e,u,r);var c=n-1e3;u=o.o.multiplyByScalar(s,c,Ee),o.o.add(t,u,a)}var be=new o.o;function Le(e,t){var i=w.o.getPointDistance(ie,e),n=w.o.getPointDistance(ie,t),r=be;a.e.equalsEpsilon(i,0,a.e.EPSILON2)?(r=$(t,e,r),o.o.multiplyByScalar(r,a.e.EPSILON2,r),o.o.add(e,r,e)):a.e.equalsEpsilon(n,0,a.e.EPSILON2)&&(r=$(e,t,r),o.o.multiplyByScalar(r,a.e.EPSILON2,r),o.o.add(t,r,t))}function Ie(e,t){var o=Math.abs(e.longitude),i=Math.abs(t.longitude);if(a.e.equalsEpsilon(o,a.e.PI,a.e.EPSILON11)){var n=a.e.sign(t.longitude);return e.longitude=n*(o-a.e.EPSILON11),1}if(a.e.equalsEpsilon(i,a.e.PI,a.e.EPSILON11)){var r=a.e.sign(e.longitude);return t.longitude=r*(i-a.e.EPSILON11),2}return 0}var Pe=new i.a,De=new i.a,ke=new o.o,xe=new o.o,Ae=new o.o,Ne=new o.o,Se=new o.o,Ce=new o.o,He=[Pe,De],Me=new t.h,Re=new o.o,ze=new o.o,je=new o.o,Ye=new o.o,Ge=new o.o,We=new o.o,Fe=new o.o,Be=new o.o,qe=new o.o,Xe=new o.o,Ue=new o.o,Ve=new o.o,Ze=new o.o,$e=new o.o,Je=new p.i,Qe=new p.i,Ke=new o.o,et=new o.o,tt=new o.o,ot=[new e.i,new e.i],it=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],nt=it.length;function rt(i,n,r,s,l,c,h){var g,f,w,v,m,_,y=n._ellipsoid,T=r.length/3-1,E=8*T,O=4*E,b=36*T,L=E>65535?new Uint32Array(b):new Uint16Array(b),I=new Float64Array(3*E),P=new Float32Array(O),D=new Float32Array(O),k=new Float32Array(O),x=new Float32Array(O),A=new Float32Array(O);h&&(w=new Float32Array(O),v=new Float32Array(O),m=new Float32Array(O),_=new Float32Array(2*E));var S=c.length/2,C=0,H=Pe;H.height=0;var R=De;R.height=0;var z=ke,j=xe;if(h)for(f=0,g=1;g<S;g++)H.latitude=c[f],H.longitude=c[f+1],R.latitude=c[f+2],R.longitude=c[f+3],z=n.project(H,z),j=n.project(R,j),C+=o.o.distance(z,j),f+=2;var Y=s.length/3;j=o.o.unpack(s,0,j);var G,W=0;for(f=3,g=1;g<Y;g++)z=o.o.clone(j,z),j=o.o.unpack(s,f,j),W+=o.o.distance(z,j),f+=3;f=3;var F=0,B=0,q=0,X=0,U=!1,V=o.o.unpack(r,0,Ne),Z=o.o.unpack(s,0,xe),J=o.o.unpack(l,0,Ce);i&&(we(J,o.o.unpack(r,r.length-6,Ae),V,Z)&&(J=o.o.negate(J,J)));var Q=0,K=0,ee=0;for(g=0;g<T;g++){var te,oe,ie,ne,re=o.o.clone(V,Ae),ae=o.o.clone(Z,ke),se=o.o.clone(J,Se);if(U&&(se=o.o.negate(se,se)),V=o.o.unpack(r,f,Ne),Z=o.o.unpack(s,f,xe),U=we(J=o.o.unpack(l,f,Ce),re,V,Z),H.latitude=c[F],H.longitude=c[F+1],R.latitude=c[F+2],R.longitude=c[F+3],h){var le=Ie(H,R);te=n.project(H,Ge);var ue=$(oe=n.project(R,We),te,Ke);ue.y=Math.abs(ue.y),ie=Fe,ne=Be,0===le||o.o.dot(ue,o.o.UNIT_Y)>M?(ie=ye(n,H,se,te,Fe),ne=ye(n,R,J,oe,Be)):1===le?(ne=ye(n,R,J,oe,Be),ie.x=0,ie.y=a.e.sign(H.longitude-Math.abs(R.longitude)),ie.z=0):(ie=ye(n,H,se,te,Fe),ne.x=0,ne.y=a.e.sign(H.longitude-R.longitude),ne.z=0)}var ce=o.o.distance(ae,Z),he=p.i.fromCartesian(re,Je),pe=o.o.subtract(V,re,qe),de=o.o.normalize(pe,Ve),ge=o.o.subtract(ae,re,Xe);ge=o.o.normalize(ge,ge);var fe=o.o.cross(de,ge,Ve);fe=o.o.normalize(fe,fe);var ve=o.o.cross(ge,se,Ze);ve=o.o.normalize(ve,ve);var me=o.o.subtract(Z,V,Ue);me=o.o.normalize(me,me);var _e=o.o.cross(J,me,$e);_e=o.o.normalize(_e,_e);var Te,Ee,be,rt=ce/W,st=Q/W,lt=0,ut=0,ct=0;if(h){lt=o.o.distance(te,oe),Te=p.i.fromCartesian(te,Qe),Ee=o.o.subtract(oe,te,Ke);var ht=(be=o.o.normalize(Ee,et)).x;be.x=be.y,be.y=-ht,ut=lt/C,ct=K/C}for(G=0;G<8;G++){var pt=X+4*G,dt=B+2*G,gt=pt+3,ft=G<4?1:-1,wt=2===G||3===G||6===G||7===G?1:-1;o.o.pack(he.high,P,pt),P[gt]=pe.x,o.o.pack(he.low,D,pt),D[gt]=pe.y,o.o.pack(ve,k,pt),k[gt]=pe.z,o.o.pack(_e,x,pt),x[gt]=rt*ft,o.o.pack(fe,A,pt);var vt=st*wt;0===vt&&wt<0&&(vt=Number.POSITIVE_INFINITY),A[gt]=vt,h&&(w[pt]=Te.high.x,w[pt+1]=Te.high.y,w[pt+2]=Te.low.x,w[pt+3]=Te.low.y,m[pt]=-ie.y,m[pt+1]=ie.x,m[pt+2]=ne.y,m[pt+3]=-ne.x,v[pt]=Ee.x,v[pt+1]=Ee.y,v[pt+2]=be.x,v[pt+3]=be.y,_[dt]=ut*ft,0===(vt=ct*wt)&&wt<0&&(vt=Number.POSITIVE_INFINITY),_[dt+1]=vt)}var mt=je,_t=Ye,yt=Re,Tt=ze,Et=t.h.fromCartographicArray(He,Me),Ot=N.getMinimumMaximumHeights(Et,y),bt=Ot.minimumTerrainHeight,Lt=Ot.maximumTerrainHeight;ee+=bt,ee+=Lt,Oe(re,ae,bt,Lt,mt,yt),Oe(V,Z,bt,Lt,_t,Tt);var It=o.o.multiplyByScalar(fe,a.e.EPSILON5,tt);o.o.add(mt,It,mt),o.o.add(_t,It,_t),o.o.add(yt,It,yt),o.o.add(Tt,It,Tt),Le(mt,_t),Le(yt,Tt),o.o.pack(mt,I,q),o.o.pack(_t,I,q+3),o.o.pack(Tt,I,q+6),o.o.pack(yt,I,q+9),It=o.o.multiplyByScalar(fe,-2*a.e.EPSILON5,tt),o.o.add(mt,It,mt),o.o.add(_t,It,_t),o.o.add(yt,It,yt),o.o.add(Tt,It,Tt),Le(mt,_t),Le(yt,Tt),o.o.pack(mt,I,q+12),o.o.pack(_t,I,q+15),o.o.pack(Tt,I,q+18),o.o.pack(yt,I,q+21),F+=2,f+=3,B+=16,q+=24,X+=32,Q+=ce,K+=lt}f=0;var Pt=0;for(g=0;g<T;g++){for(G=0;G<nt;G++)L[f+G]=it[G]+Pt;Pt+=8,f+=nt}var Dt=ot;e.i.fromVertices(r,o.o.ZERO,3,Dt[0]),e.i.fromVertices(s,o.o.ZERO,3,Dt[1]);var kt=e.i.fromBoundingSpheres(Dt);kt.radius+=ee/(2*T);var xt={position:new d.o({componentDatatype:u.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:I}),startHiAndForwardOffsetX:at(P),startLoAndForwardOffsetY:at(D),startNormalAndForwardOffsetZ:at(k),endNormalAndTextureCoordinateNormalizationX:at(x),rightNormalAndTextureCoordinateNormalizationY:at(A)};return h&&(xt.startHiLo2D=at(w),xt.offsetAndRight2D=at(v),xt.startEndNormals2D=at(m),xt.texcoordNormalization2D=new d.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:_})),new d.I({attributes:xt,indices:L,boundingSphere:kt})}function at(e){return new d.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return z._projectNormal=ye,function(e,t){return N.initialize().then((function(){return r.e(t)&&(e=z.unpack(e,t)),z.createGeometry(e)}))}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createPlaneGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createPlaneGeometry.js index 92c1ff6e..aa9d1b89 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createPlaneGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createPlaneGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./FeatureDetection-cec0163f","./VertexFormat-f496a3f1","./Cartographic-a2c313d7","./Math-ecf82623","./Cartesian2-b72655a5","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e"],(function(e,t,n,a,r,o,i,c,p,u,m,y,s,f,v,b){"use strict";function w(t){t=e.u(t,e.u.EMPTY_OBJECT);var n=e.u(t.vertexFormat,p.n.DEFAULT);this._vertexFormat=n,this._workerName="createPlaneGeometry"}w.packedLength=p.n.packedLength,w.pack=function(t,n,r){return a.o.typeOf.object("value",t),a.o.defined("array",n),r=e.u(r,0),p.n.pack(t._vertexFormat,n,r),n};var d=new p.n,A={vertexFormat:d};w.unpack=function(t,n,r){a.o.defined("array",t),n=e.u(n,0);var o=p.n.unpack(t,n,d);return e.e(r)?(r._vertexFormat=p.n.clone(o,r._vertexFormat),r):new w(A)};var F=new n.o(-.5,-.5,0),l=new n.o(.5,.5,0);return w.createGeometry=function(e){var a,p,u=e._vertexFormat,m=new i.a;if(u.position){if((p=new Float64Array(12))[0]=F.x,p[1]=F.y,p[2]=0,p[3]=l.x,p[4]=F.y,p[5]=0,p[6]=l.x,p[7]=l.y,p[8]=0,p[9]=F.x,p[10]=l.y,p[11]=0,m.position=new o.o({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p}),u.normal){var y=new Float32Array(12);y[0]=0,y[1]=0,y[2]=1,y[3]=0,y[4]=0,y[5]=1,y[6]=0,y[7]=0,y[8]=1,y[9]=0,y[10]=0,y[11]=1,m.normal=new o.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})}if(u.st){var s=new Float32Array(8);s[0]=0,s[1]=0,s[2]=1,s[3]=0,s[4]=1,s[5]=1,s[6]=0,s[7]=1,m.st=new o.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:s})}if(u.tangent){var f=new Float32Array(12);f[0]=1,f[1]=0,f[2]=0,f[3]=1,f[4]=0,f[5]=0,f[6]=1,f[7]=0,f[8]=0,f[9]=1,f[10]=0,f[11]=0,m.tangent=new o.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:f})}if(u.bitangent){var v=new Float32Array(12);v[0]=0,v[1]=1,v[2]=0,v[3]=0,v[4]=1,v[5]=0,v[6]=0,v[7]=1,v[8]=0,v[9]=0,v[10]=1,v[11]=0,m.bitangent=new o.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})}(a=new Uint16Array(6))[0]=0,a[1]=1,a[2]=2,a[3]=0,a[4]=2,a[5]=3}return new o.I({attributes:m,indices:a,primitiveType:c._0x4b6a27.TRIANGLES,boundingSphere:new t.i(n.o.ZERO,Math.sqrt(2))})},function(t,n){return e.e(n)&&(t=w.unpack(t,n)),w.createGeometry(t)}})); +define(["./when-92c6cf3c","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./FeatureDetection-fd297af4","./VertexFormat-f496a3f1","./Cartographic-a2c313d7","./Math-ecf82623","./Cartesian2-b72655a5","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e"],(function(e,t,n,a,r,o,c,i,p,u,m,y,s,f,v,b){"use strict";function d(t){t=e.u(t,e.u.EMPTY_OBJECT);var n=e.u(t.vertexFormat,p.n.DEFAULT);this._vertexFormat=n,this._workerName="createPlaneGeometry"}d.packedLength=p.n.packedLength,d.pack=function(t,n,r){return a.o.typeOf.object("value",t),a.o.defined("array",n),r=e.u(r,0),p.n.pack(t._vertexFormat,n,r),n};var w=new p.n,A={vertexFormat:w};d.unpack=function(t,n,r){a.o.defined("array",t),n=e.u(n,0);var o=p.n.unpack(t,n,w);return e.e(r)?(r._vertexFormat=p.n.clone(o,r._vertexFormat),r):new d(A)};var F=new n.o(-.5,-.5,0),l=new n.o(.5,.5,0);return d.createGeometry=function(e){var a,p,u=e._vertexFormat,m=new c.a;if(u.position){if((p=new Float64Array(12))[0]=F.x,p[1]=F.y,p[2]=0,p[3]=l.x,p[4]=F.y,p[5]=0,p[6]=l.x,p[7]=l.y,p[8]=0,p[9]=F.x,p[10]=l.y,p[11]=0,m.position=new o.o({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p}),u.normal){var y=new Float32Array(12);y[0]=0,y[1]=0,y[2]=1,y[3]=0,y[4]=0,y[5]=1,y[6]=0,y[7]=0,y[8]=1,y[9]=0,y[10]=0,y[11]=1,m.normal=new o.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})}if(u.st){var s=new Float32Array(8);s[0]=0,s[1]=0,s[2]=1,s[3]=0,s[4]=1,s[5]=1,s[6]=0,s[7]=1,m.st=new o.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:s})}if(u.tangent){var f=new Float32Array(12);f[0]=1,f[1]=0,f[2]=0,f[3]=1,f[4]=0,f[5]=0,f[6]=1,f[7]=0,f[8]=0,f[9]=1,f[10]=0,f[11]=0,m.tangent=new o.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:f})}if(u.bitangent){var v=new Float32Array(12);v[0]=0,v[1]=1,v[2]=0,v[3]=0,v[4]=1,v[5]=0,v[6]=0,v[7]=1,v[8]=0,v[9]=0,v[10]=1,v[11]=0,m.bitangent=new o.o({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})}(a=new Uint16Array(6))[0]=0,a[1]=1,a[2]=2,a[3]=0,a[4]=2,a[5]=3}return new o.I({attributes:m,indices:a,primitiveType:i._0x3b3836.TRIANGLES,boundingSphere:new t.i(n.o.ZERO,Math.sqrt(2))})},function(t,n){return e.e(n)&&(t=d.unpack(t,n)),d.createGeometry(t)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createPlaneOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createPlaneOutlineGeometry.js index e3a52379..a51c74f2 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createPlaneOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createPlaneOutlineGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./FeatureDetection-cec0163f","./Cartographic-a2c313d7","./Math-ecf82623","./Cartesian2-b72655a5","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e"],(function(e,t,n,r,a,o,i,c,u,d,f,y,p,b,s){"use strict";function m(){this._workerName="createPlaneOutlineGeometry"}m.packedLength=0,m.pack=function(e,t){return r.o.defined("value",e),r.o.defined("array",t),t},m.unpack=function(t,n,a){return r.o.defined("array",t),e.e(a)?a:new m};var w=new n.o(-.5,-.5,0),h=new n.o(.5,.5,0);return m.createGeometry=function(){var e=new i.a,r=new Uint16Array(8),u=new Float64Array(12);return u[0]=w.x,u[1]=w.y,u[2]=w.z,u[3]=h.x,u[4]=w.y,u[5]=w.z,u[6]=h.x,u[7]=h.y,u[8]=w.z,u[9]=w.x,u[10]=h.y,u[11]=w.z,e.position=new o.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),r[0]=0,r[1]=1,r[2]=1,r[3]=2,r[4]=2,r[5]=3,r[6]=3,r[7]=0,new o.I({attributes:e,indices:r,primitiveType:c._0x4b6a27.LINES,boundingSphere:new t.i(n.o.ZERO,Math.sqrt(2))})},function(t,n){return e.e(n)&&(t=m.unpack(t,n)),m.createGeometry(t)}})); +define(["./when-92c6cf3c","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Check-52a7d806","./ComponentDatatype-98414d16","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./FeatureDetection-fd297af4","./Cartographic-a2c313d7","./Math-ecf82623","./Cartesian2-b72655a5","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e"],(function(e,t,n,r,a,o,i,c,u,d,f,y,p,s,b){"use strict";function m(){this._workerName="createPlaneOutlineGeometry"}m.packedLength=0,m.pack=function(e,t){return r.o.defined("value",e),r.o.defined("array",t),t},m.unpack=function(t,n,a){return r.o.defined("array",t),e.e(a)?a:new m};var w=new n.o(-.5,-.5,0),h=new n.o(.5,.5,0);return m.createGeometry=function(){var e=new i.a,r=new Uint16Array(8),u=new Float64Array(12);return u[0]=w.x,u[1]=w.y,u[2]=w.z,u[3]=h.x,u[4]=w.y,u[5]=w.z,u[6]=h.x,u[7]=h.y,u[8]=w.z,u[9]=w.x,u[10]=h.y,u[11]=w.z,e.position=new o.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),r[0]=0,r[1]=1,r[2]=1,r[3]=2,r[4]=2,r[5]=3,r[6]=3,r[7]=0,new o.I({attributes:e,indices:r,primitiveType:c._0x3b3836.LINES,boundingSphere:new t.i(n.o.ZERO,Math.sqrt(2))})},function(t,n){return e.e(n)&&(t=m.unpack(t,n)),m.createGeometry(t)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createPolygonGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createPolygonGeometry.js index 0f7104f8..dd5bfa19 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createPolygonGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createPolygonGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./Cartesian2-b72655a5","./ArcType-31298545","./arrayFill-0358accf","./BoundingRectangle-82c0e2a7","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./ComponentDatatype-98414d16","./EllipsoidGeodesic-03c935a0","./EllipsoidTangentPlane-d6b88a1f","./GeometryAttribute-f47bd1cb","./GeometryInstance-3190c1b4","./GeometryOffsetAttribute-b4d599f5","./GeometryPipeline-7ffd3f60","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-cec0163f","./PolygonGeometryLibrary-c16a4c7e","./PolygonPipeline-425528b3","./VertexFormat-f496a3f1","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./IntersectionTests-6e80d61c","./Plane-33393da8","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./arrayRemoveDuplicates-a6924649","./EllipsoidRhumbLine-b1a766ae","./GeometryAttributes-7f66ea53"],(function(t,e,o,r,i,a,n,s,l,u,p,c,g,y,d,h,m,f,v,_,b,w,T,A,P,x,E,I,H,N,C,O,R){"use strict";var D=new s.a,F=new s.a;function G(t,e,o,r){var i=r.cartesianToCartographic(t,D).height,a=r.cartesianToCartographic(e,F);a.height=i,r.cartographicToCartesian(a,e);var n=r.cartesianToCartographic(o,F);n.height=i-100,r.cartographicToCartesian(n,o)}var L=new i.f,B=new n.o,S=new n.o,V=new n.o,k=new n.o,z=new n.o,M=new n.o,U=new n.o,Y=new n.o,j=new n.o,W=new e.o,$=new e.o,q=new n.o,K=new g.n,Q=new v.p$1,Z=new v.p$1;function J(o){var i=o.vertexFormat,a=o.geometry,s=o.shadowVolume,l=a.attributes.position.values,p=l.length,c=o.wall,y=o.top||c,h=o.bottom||c;if(i.st||i.normal||i.tangent||i.bitangent||s){var m=o.boundingRectangle,_=o.tangentPlane,b=o.ellipsoid,w=o.stRotation,T=o.perPositionHeight,A=W;A.x=m.x,A.y=m.y;var P,x=o.isComputeTexCoord?new Float32Array(p):new Float32Array(p/3*2),E=i.st?x:void 0;i.normal&&(P=T&&y&&!c?a.attributes.normal.values:new Float32Array(p));var I=i.tangent?new Float32Array(p):void 0,H=i.bitangent?new Float32Array(p):void 0,N=s?new Float32Array(p):void 0,C=0,O=0,R=S,D=V,F=k,L=!0,J=Q,X=Z;if(0!==w){var tt=g.n.fromAxisAngle(_._plane.normal,w,K);J=v.p$1.fromQuaternion(tt,J),tt=g.n.fromAxisAngle(_._plane.normal,-w,K),X=v.p$1.fromQuaternion(tt,X)}else J=v.p$1.clone(v.p$1.IDENTITY,J),X=v.p$1.clone(v.p$1.IDENTITY,X);var et=0,ot=0;y&&h&&(et=p/2,ot=p/3,p/=2);for(var rt=0;rt<p;rt+=3){var it=n.o.fromArray(l,rt,q);if(i.st){var at=v.p$1.multiplyByVector(J,it,B);at=b.scaleToGeodeticSurface(at,at);var nt=_.projectPointOntoPlane(at,$);e.o.subtract(nt,A,nt);var st=f.e.clamp(nt.x/m.width,0,1),lt=f.e.clamp(nt.y/m.height,0,1);h&&(E[C+ot]=st,E[C+1+ot]=lt),y&&(E[C]=st,E[C+1]=lt),C+=2}if(i.normal||i.tangent||i.bitangent||s){var ut=O+1,pt=O+2;if(c){if(rt+3<p){var ct=n.o.fromArray(l,rt+3,z);if(L){var gt=n.o.fromArray(l,rt+p,M);T&&G(it,ct,gt,b),n.o.subtract(ct,it,ct),n.o.subtract(gt,it,gt),R=n.o.normalize(n.o.cross(gt,ct,R),R),L=!1}n.o.equalsEpsilon(ct,it,f.e.EPSILON10)&&(L=!0)}(i.tangent||i.bitangent)&&(F=b.geodeticSurfaceNormal(it,F),i.tangent&&(D=n.o.normalize(n.o.cross(F,R,D),D)))}else R=b.geodeticSurfaceNormal(it,R),(i.tangent||i.bitangent)&&(T&&(U=n.o.fromArray(P,O,U),Y=n.o.cross(n.o.UNIT_Z,U,Y),Y=n.o.normalize(v.p$1.multiplyByVector(X,Y,Y),Y),i.bitangent&&(j=n.o.normalize(n.o.cross(U,Y,j),j))),D=n.o.cross(n.o.UNIT_Z,R,D),D=n.o.normalize(v.p$1.multiplyByVector(X,D,D),D),i.bitangent&&(F=n.o.normalize(n.o.cross(R,D,F),F)));i.normal&&(o.wall?(P[O+et]=R.x,P[ut+et]=R.y,P[pt+et]=R.z):h&&(P[O+et]=-R.x,P[ut+et]=-R.y,P[pt+et]=-R.z),(y&&!T||c)&&(P[O]=R.x,P[ut]=R.y,P[pt]=R.z)),s&&(c&&(R=b.geodeticSurfaceNormal(it,R)),N[O+et]=-R.x,N[ut+et]=-R.y,N[pt+et]=-R.z),i.tangent&&(o.wall?(I[O+et]=D.x,I[ut+et]=D.y,I[pt+et]=D.z):h&&(I[O+et]=-D.x,I[ut+et]=-D.y,I[pt+et]=-D.z),y&&(T?(I[O]=Y.x,I[ut]=Y.y,I[pt]=Y.z):(I[O]=D.x,I[ut]=D.y,I[pt]=D.z))),i.bitangent&&(h&&(H[O+et]=F.x,H[ut+et]=F.y,H[pt+et]=F.z),y&&(T?(H[O]=j.x,H[ut]=j.y,H[pt]=j.z):(H[O]=F.x,H[ut]=F.y,H[pt]=F.z))),O+=3}}i.st&&(a.attributes.st=new g.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:E})),i.normal&&(a.attributes.normal=new g.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:P})),i.tangent&&(a.attributes.tangent=new g.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:I})),i.bitangent&&(a.attributes.bitangent=new g.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:H})),s&&(a.attributes.extrudeDirection=new g.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:N}))}if(o.extrude&&t.e(o.offsetAttribute)){var yt=l.length/3,dt=new Uint8Array(yt);if(o.offsetAttribute===d.z.TOP)y&&h||c?dt=r.d(dt,1,0,yt/2):y&&(dt=r.d(dt,1));else{var ht=o.offsetAttribute===d.z.NONE?0:1;dt=r.d(dt,ht)}a.attributes.applyOffset=new g.o({componentDatatype:u.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:dt})}return a}var X=new s.a,tt=new s.a,et={west:0,east:0},ot=new p.E;function rt(r,i,a,n,s){if(s=t.u(s,new e.h),!t.e(r)||r.length<3)return s.west=0,s.north=0,s.south=0,s.east=0,s;if(a===o.L.RHUMB)return e.h.fromCartesianArray(r,i,s);ot.ellipsoid.equals(i)||(ot=new p.E(void 0,void 0,i)),s.west=Number.POSITIVE_INFINITY,s.east=Number.NEGATIVE_INFINITY,s.south=Number.POSITIVE_INFINITY,s.north=Number.NEGATIVE_INFINITY,et.west=Number.POSITIVE_INFINITY,et.east=Number.NEGATIVE_INFINITY;for(var l,u=1/f.e.chordLength(n,i.maximumRadius),c=r.length,g=i.cartesianToCartographic(r[0],tt),y=X,d=1;d<c;d++)l=y,y=g,g=i.cartesianToCartographic(r[d],l),ot.setEndPoints(y,g),at(ot,u,s,et);return l=y,y=g,g=i.cartesianToCartographic(r[0],l),ot.setEndPoints(y,g),at(ot,u,s,et),s.east-s.west>et.west-et.east&&(s.east=et.east,s.west=et.west),s}var it=new s.a;function at(t,e,o,r){for(var i=t.surfaceDistance,a=Math.ceil(i*e),n=a>0?i/(a-1):Number.POSITIVE_INFINITY,s=0,l=0;l<a;l++){var u=t.interpolateUsingSurfaceDistance(s,it);s+=n;var p=u.longitude,c=u.latitude;o.west=Math.min(o.west,p),o.east=Math.max(o.east,p),o.south=Math.min(o.south,c),o.north=Math.max(o.north,c),r.west=p>0?Math.min(p,r.west):r.west,r.east=p<0?Math.max(p,r.east):r.east}}var nt=[];function st(t,e,o,r,i,a,n,s,l,u){var p,g={walls:[]};if(a||n){var d,h,f=_.y.createGeometryFromPositions(t,e,o,i,s,l),v=f.attributes.position.values,w=f.indices;if(a&&n){var T=v.concat(v);d=T.length/3,(h=m.IndexDatatype.createTypedArray(d,2*w.length)).set(w);var A=w.length,P=d/2;for(p=0;p<A;p+=3){var x=h[p]+P,E=h[p+1]+P,I=h[p+2]+P;h[p+A]=I,h[p+1+A]=E,h[p+2+A]=x}if(f.attributes.position.values=T,i&&s.normal){var H=f.attributes.normal.values;f.attributes.normal.values=new Float32Array(T.length),f.attributes.normal.values.set(H)}f.indices=h}else if(n){for(d=v.length/3,h=m.IndexDatatype.createTypedArray(d,w.length),p=0;p<w.length;p+=3)h[p]=w[p+2],h[p+1]=w[p+1],h[p+2]=w[p];f.indices=h}g.topAndBottom=new y.d({geometry:f})}var N,C=r.outerRing,O=c.f.fromPoints(C,t),R=O.projectPointsOntoPlane(C,nt),D=b.A.computeWindingOrder2D(R);D===b.W.CLOCKWISE&&(C=C.slice().reverse()),u&&(N=_.y.computeWallGeometry(C,t,o,i,l),g.walls.push(new y.d({geometry:N})));var F=r.holes;for(p=0;p<F.length;p++){var G=F[p];R=(O=c.f.fromPoints(G,t)).projectPointsOntoPlane(G,nt),(D=b.A.computeWindingOrder2D(R))===b.W.COUNTER_CLOCKWISE&&(G=G.slice().reverse()),N=_.y.computeWallGeometry(G,t,o,i,l),g.walls.push(new y.d({geometry:N}))}return g}function lt(r){if(l.o.typeOf.object("options",r),l.o.typeOf.object("options.polygonHierarchy",r.polygonHierarchy),t.e(r.perPositionHeight)&&r.perPositionHeight&&t.e(r.height))throw new l.t("Cannot use both options.perPositionHeight and options.height");if(t.e(r.arcType)&&r.arcType!==o.L.GEODESIC&&r.arcType!==o.L.RHUMB)throw new l.t("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var i=r.polygonHierarchy,a=t.u(r.vertexFormat,w.n.DEFAULT),n=t.u(r.ellipsoid,e.t.WGS84),s=t.u(r.granularity,f.e.RADIANS_PER_DEGREE),u=t.u(r.stRotation,0),p=t.u(r.perPositionHeight,!1),c=p&&t.e(r.extrudedHeight),g=t.u(r.height,0),y=t.u(r.extrudedHeight,g);if(!c){var d=Math.max(g,y);y=Math.min(g,y),g=d}this._vertexFormat=w.n.clone(a),this._ellipsoid=e.t.clone(n),this._granularity=s,this._stRotation=u,this._height=g,this._extrudedHeight=y,this._closeTop=t.u(r.closeTop,!0),this._closeBottom=t.u(r.closeBottom,!0),this._extrudeOutering=t.u(r.extrudeOutering,!0),this._polygonHierarchy=i,this._perPositionHeight=p,this._perPositionHeightExtrude=c,this._shadowVolume=t.u(r.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=r.offsetAttribute,this._arcType=t.u(r.arcType,o.L.GEODESIC),this._groundBottomAltitude=t.u(r.groundBottomAltitude,0),this._groundExtrudedHeight=t.u(r.groundExtrudedHeight,0),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this.packedLength=_.y.computeHierarchyPackedLength(i)+e.t.packedLength+w.n.packedLength+12}lt.fromPositions=function(e){return e=t.u(e,t.u.EMPTY_OBJECT),l.o.defined("options.positions",e.positions),new lt({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType})},lt.pack=function(o,r,i){return l.o.typeOf.object("value",o),l.o.defined("array",r),i=t.u(i,0),i=_.y.packPolygonHierarchy(o._polygonHierarchy,r,i),e.t.pack(o._ellipsoid,r,i),i+=e.t.packedLength,w.n.pack(o._vertexFormat,r,i),i+=w.n.packedLength,r[i++]=o._height,r[i++]=o._extrudedHeight,r[i++]=o._granularity,r[i++]=o._stRotation,r[i++]=o._perPositionHeightExtrude?1:0,r[i++]=o._perPositionHeight?1:0,r[i++]=o._closeTop?1:0,r[i++]=o._closeBottom?1:0,r[i++]=o._shadowVolume?1:0,r[i++]=t.u(o._offsetAttribute,-1),r[i++]=o._arcType,r[i]=o.packedLength,r};var ut=e.t.clone(e.t.UNIT_SPHERE),pt=new w.n,ct={polygonHierarchy:{}};return lt.unpack=function(o,r,i){l.o.defined("array",o),r=t.u(r,0);var a=_.y.unpackPolygonHierarchy(o,r);r=a.startingIndex,delete a.startingIndex;var n=e.t.unpack(o,r,ut);r+=e.t.packedLength;var s=w.n.unpack(o,r,pt);r+=w.n.packedLength;var u=o[r++],p=o[r++],c=o[r++],g=o[r++],y=1===o[r++],d=1===o[r++],h=1===o[r++],m=1===o[r++],f=1===o[r++],v=o[r++],b=o[r++],T=o[r];return t.e(i)||(i=new lt(ct)),i._polygonHierarchy=a,i._ellipsoid=e.t.clone(n,i._ellipsoid),i._vertexFormat=w.n.clone(s,i._vertexFormat),i._height=u,i._extrudedHeight=p,i._granularity=c,i._stRotation=g,i._perPositionHeightExtrude=y,i._perPositionHeight=d,i._closeTop=h,i._closeBottom=m,i._shadowVolume=f,i._offsetAttribute=-1===v?void 0:v,i._arcType=b,i.packedLength=T,i},lt.computeRectangle=function(r,i){l.o.typeOf.object("options",r),l.o.typeOf.object("options.polygonHierarchy",r.polygonHierarchy);var a=t.u(r.granularity,f.e.RADIANS_PER_DEGREE),n=t.u(r.arcType,o.L.GEODESIC);if(n!==o.L.GEODESIC&&n!==o.L.RHUMB)throw new l.t("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var s=r.polygonHierarchy,u=t.u(r.ellipsoid,e.t.WGS84);return rt(s.positions,u,n,a,i)},lt.createGeometry=function(e){var o=e._vertexFormat,i=e._ellipsoid,n=e._granularity,s=e._stRotation,l=e._polygonHierarchy,p=e._perPositionHeight,v=e._closeTop,w=e._closeBottom,T=e._arcType,A=l.positions;if(!(A.length<3)){var P=c.f.fromPoints(A,i),x=_.y.polygonsFromHierarchy(l,P.projectPointsOntoPlane.bind(P),!p,i),E=x.hierarchy,I=x.polygons;if(0!==E.length){A=E[0].outerRing;var H,N=_.y.computeBoundingRectangle(P.plane.normal,P.projectPointOntoPlane.bind(P),A,s,L),C=[],O=e._height,R=e._extrudedHeight,D={perPositionHeight:p,vertexFormat:o,geometry:void 0,tangentPlane:P,boundingRectangle:N,ellipsoid:i,stRotation:s,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:T};if(e._perPositionHeightExtrude||!f.e.equalsEpsilon(O,R,0,f.e.EPSILON2))for(D.extrude=!0,D.top=v,D.bottom=w,D.shadowVolume=e._shadowVolume,D.offsetAttribute=e._offsetAttribute,H=0;H<I.length;H++){var F,G=st(i,I[H],n,E[H],p,v,w,o,T,e._extrudeOutering);v&&w?(F=G.topAndBottom,D.geometry=_.y.scaleToGeodeticHeightExtruded(F.geometry,O,R,i,p)):v?((F=G.topAndBottom).geometry.attributes.position.values=b.A.scaleToGeodeticHeight(F.geometry.attributes.position.values,O,i,!p),D.geometry=F.geometry):w&&((F=G.topAndBottom).geometry.attributes.position.values=b.A.scaleToGeodeticHeight(F.geometry.attributes.position.values,R,i,!0),D.geometry=F.geometry),(v||w)&&(D.wall=!1,F.geometry=J(D),C.push(F));var B=G.walls;D.wall=!0;for(var S=0;S<B.length;S++){var V=B[S];D.geometry=_.y.scaleToGeodeticHeightExtruded(V.geometry,O,R,i,p),V.geometry=J(D),C.push(V)}}else for(H=0;H<I.length;H++){var k=new y.d({geometry:_.y.createGeometryFromPositions(i,I[H],n,p,o,T)});if(k.geometry.attributes.position.values=b.A.scaleToGeodeticHeight(k.geometry.attributes.position.values,O,i,!p),D.geometry=k.geometry,k.geometry=J(D),t.e(e._offsetAttribute)){var z=k.geometry.attributes.position.values.length,M=new Uint8Array(z/3),U=e._offsetAttribute===d.z.NONE?0:1;r.d(M,U),k.geometry.attributes.applyOffset=new g.o({componentDatatype:u.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:M})}C.push(k)}var Y=h.k.combineInstances(C)[0];Y.attributes.position.values=new Float64Array(Y.attributes.position.values),Y.indices=m.IndexDatatype.createTypedArray(Y.attributes.position.values.length/3,Y.indices);var j=Y.attributes,W=a.i.fromVertices(j.position.values);return o.position||delete j.position,new g.I({attributes:j,indices:Y.indices,primitiveType:Y.primitiveType,boundingSphere:W,offsetAttribute:e._offsetAttribute})}}},lt.createShadowVolume=function(t,e,o){var r=t._granularity,i=t._ellipsoid,a=t._groundBottomAltitude+t._groundExtrudedHeight,n=t._groundBottomAltitude?t._groundBottomAltitude:e(r,i),s=a!==t._groundBottomAltitude?a:o(r,i);return new lt({polygonHierarchy:t._polygonHierarchy,ellipsoid:i,stRotation:t._stRotation,granularity:r,perPositionHeight:!1,extrudedHeight:n,height:s,vertexFormat:w.n.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})},Object.defineProperties(lt.prototype,{rectangle:{get:function(){if(!t.e(this._rectangle)){var e=this._polygonHierarchy.positions;this._rectangle=rt(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return t.e(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){var e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];var o=t._ellipsoid,r=t._polygonHierarchy.positions,i=t.rectangle;return g.I._textureCoordinateRotationPoints(r,e,o,i)}(this)),this._textureCoordinateRotationPoints}}}),function(o,r){return t.e(r)&&(o=lt.unpack(o,r)),o._ellipsoid=e.t.clone(o._ellipsoid),lt.createGeometry(o)}})); +define(["./when-92c6cf3c","./Cartesian2-b72655a5","./ArcType-31298545","./arrayFill-0358accf","./BoundingRectangle-44af9dd4","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./ComponentDatatype-98414d16","./EllipsoidGeodesic-03c935a0","./EllipsoidTangentPlane-c500945e","./GeometryAttribute-65cf868d","./GeometryInstance-20be787d","./GeometryOffsetAttribute-b4d599f5","./GeometryPipeline-50805727","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-fd297af4","./PolygonGeometryLibrary-eea5d80b","./PolygonPipeline-c329dec3","./VertexFormat-f496a3f1","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./arrayRemoveDuplicates-a6924649","./EllipsoidRhumbLine-b1a766ae","./GeometryAttributes-7f66ea53"],(function(e,t,o,r,a,i,n,s,l,u,p,c,g,d,y,h,m,f,v,_,b,w,T,I,A,P,x,E,O,H,D,N,C){"use strict";var L=new s.a,R=new s.a;function F(e,t,o,r){var a=r.cartesianToCartographic(e,L).height,i=r.cartesianToCartographic(t,R);i.height=a,r.cartographicToCartesian(i,t);var n=r.cartesianToCartographic(o,R);n.height=a-100,r.cartographicToCartesian(n,o)}var G=new a.f,B=new n.o,S=new n.o,V=new n.o,k=new n.o,z=new n.o,M=new n.o,U=new n.o,W=new n.o,Y=new n.o,j=new t.o,$=new t.o,q=new n.o,K=new g.n,Q=new v.p$1,Z=new v.p$1;function J(o){var a=o.vertexFormat,i=o.geometry,s=o.shadowVolume,l=i.attributes.position.values,p=l.length,c=o.wall,d=o.top||c,h=o.bottom||c;if(a.st||a.normal||a.tangent||a.bitangent||s){var m=o.boundingRectangle,_=o.tangentPlane,b=o.ellipsoid,w=o.stRotation,T=o.perPositionHeight,I=j;I.x=m.x,I.y=m.y;var A,P=o.isComputeTexCoord?new Float32Array(p):new Float32Array(p/3*2),x=a.st?P:void 0;a.normal&&(A=T&&d&&!c?i.attributes.normal.values:new Float32Array(p));var E=a.tangent?new Float32Array(p):void 0,O=a.bitangent?new Float32Array(p):void 0,H=s?new Float32Array(p):void 0,D=0,N=0,C=S,L=V,R=k,G=!0,J=Q,X=Z;if(0!==w){var ee=g.n.fromAxisAngle(_._plane.normal,w,K);J=v.p$1.fromQuaternion(ee,J),ee=g.n.fromAxisAngle(_._plane.normal,-w,K),X=v.p$1.fromQuaternion(ee,X)}else J=v.p$1.clone(v.p$1.IDENTITY,J),X=v.p$1.clone(v.p$1.IDENTITY,X);var te=0,oe=0;d&&h&&(te=p/2,oe=p/3,p/=2);for(var re=0;re<p;re+=3){var ae=n.o.fromArray(l,re,q);if(a.st){var ie=v.p$1.multiplyByVector(J,ae,B);ie=b.scaleToGeodeticSurface(ie,ie);var ne=_.projectPointOntoPlane(ie,$);t.o.subtract(ne,I,ne);var se=f.e.clamp(ne.x/m.width,0,1),le=f.e.clamp(ne.y/m.height,0,1);h&&(x[D+oe]=se,x[D+1+oe]=le),d&&(x[D]=se,x[D+1]=le),D+=2}if(a.normal||a.tangent||a.bitangent||s){var ue=N+1,pe=N+2;if(c){if(re+3<p){var ce=n.o.fromArray(l,re+3,z);if(G){var ge=n.o.fromArray(l,re+p,M);T&&F(ae,ce,ge,b),n.o.subtract(ce,ae,ce),n.o.subtract(ge,ae,ge),C=n.o.normalize(n.o.cross(ge,ce,C),C),G=!1}n.o.equalsEpsilon(ce,ae,f.e.EPSILON10)&&(G=!0)}(a.tangent||a.bitangent)&&(R=b.geodeticSurfaceNormal(ae,R),a.tangent&&(L=n.o.normalize(n.o.cross(R,C,L),L)))}else C=b.geodeticSurfaceNormal(ae,C),(a.tangent||a.bitangent)&&(T&&(U=n.o.fromArray(A,N,U),W=n.o.cross(n.o.UNIT_Z,U,W),W=n.o.normalize(v.p$1.multiplyByVector(X,W,W),W),a.bitangent&&(Y=n.o.normalize(n.o.cross(U,W,Y),Y))),L=n.o.cross(n.o.UNIT_Z,C,L),L=n.o.normalize(v.p$1.multiplyByVector(X,L,L),L),a.bitangent&&(R=n.o.normalize(n.o.cross(C,L,R),R)));a.normal&&(o.wall?(A[N+te]=C.x,A[ue+te]=C.y,A[pe+te]=C.z):h&&(A[N+te]=-C.x,A[ue+te]=-C.y,A[pe+te]=-C.z),(d&&!T||c)&&(A[N]=C.x,A[ue]=C.y,A[pe]=C.z)),s&&(c&&(C=b.geodeticSurfaceNormal(ae,C)),H[N+te]=-C.x,H[ue+te]=-C.y,H[pe+te]=-C.z),a.tangent&&(o.wall?(E[N+te]=L.x,E[ue+te]=L.y,E[pe+te]=L.z):h&&(E[N+te]=-L.x,E[ue+te]=-L.y,E[pe+te]=-L.z),d&&(T?(E[N]=W.x,E[ue]=W.y,E[pe]=W.z):(E[N]=L.x,E[ue]=L.y,E[pe]=L.z))),a.bitangent&&(h&&(O[N+te]=R.x,O[ue+te]=R.y,O[pe+te]=R.z),d&&(T?(O[N]=Y.x,O[ue]=Y.y,O[pe]=Y.z):(O[N]=R.x,O[ue]=R.y,O[pe]=R.z))),N+=3}}a.st&&(i.attributes.st=new g.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:x})),a.normal&&(i.attributes.normal=new g.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),a.tangent&&(i.attributes.tangent=new g.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:E})),a.bitangent&&(i.attributes.bitangent=new g.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O})),s&&(i.attributes.extrudeDirection=new g.o({componentDatatype:u.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:H}))}if(o.extrude&&e.e(o.offsetAttribute)){var de=l.length/3,ye=new Uint8Array(de);if(o.offsetAttribute===y.z.TOP)d&&h||c?ye=r.d(ye,1,0,de/2):d&&(ye=r.d(ye,1));else{var he=o.offsetAttribute===y.z.NONE?0:1;ye=r.d(ye,he)}i.attributes.applyOffset=new g.o({componentDatatype:u.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:ye})}return i}var X=new s.a,ee=new s.a,te=(X=new s.a,ee=new s.a,{westOverIDL:0,eastOverIDL:0}),oe=new p.E;function re(r,a,i,n,s){if(s=e.u(s,new t.h),!e.e(r)||r.length<3)return s.west=0,s.north=0,s.south=0,s.east=0,s;if(i===o.L.RHUMB)return t.h.fromCartesianArray(r,a,s);oe.ellipsoid.equals(a)||(oe=new p.E(void 0,void 0,a)),s.west=Number.POSITIVE_INFINITY,s.east=Number.NEGATIVE_INFINITY,s.south=Number.POSITIVE_INFINITY,s.north=Number.NEGATIVE_INFINITY,te.westOverIDL=Number.POSITIVE_INFINITY,te.eastOverIDL=Number.NEGATIVE_INFINITY;for(var l,u=1/f.e.chordLength(n,a.maximumRadius),c=r.length,g=a.cartesianToCartographic(r[0],ee),d=X,y=1;y<c;y++)l=d,d=g,g=a.cartesianToCartographic(r[y],l),oe.setEndPoints(d,g),ie(oe,u,s,te);return l=d,d=g,g=a.cartesianToCartographic(r[0],l),oe.setEndPoints(d,g),ie(oe,u,s,te),s.east-s.west>te.eastOverIDL-te.westOverIDL&&(s.west=te.westOverIDL,s.east=te.eastOverIDL,s.east>f.e.PI&&(s.east=s.east-f.e.TWO_PI),s.west>f.e.PI&&(s.west=s.west-f.e.TWO_PI)),s}var ae=new s.a;function ie(e,t,o,r){for(var a=e.surfaceDistance,i=Math.ceil(a*t),n=i>0?a/(i-1):Number.POSITIVE_INFINITY,s=0,l=0;l<i;l++){var u=e.interpolateUsingSurfaceDistance(s,ae);s+=n;var p=u.longitude,c=u.latitude;o.west=Math.min(o.west,p),o.east=Math.max(o.east,p),o.south=Math.min(o.south,c),o.north=Math.max(o.north,c);var g=p>=0?p:p+f.e.TWO_PI;r.westOverIDL=Math.min(r.westOverIDL,g),r.eastOverIDL=Math.max(r.eastOverIDL,g)}}var ne=[];function se(e,t,o,r,a,i,n,s,l,u){var p,g={walls:[]};if(i||n){var y,h,f=_.y.createGeometryFromPositions(e,t,o,a,s,l),v=f.attributes.position.values,w=f.indices;if(i&&n){var T=v.concat(v);y=T.length/3,(h=m.IndexDatatype.createTypedArray(y,2*w.length)).set(w);var I=w.length,A=y/2;for(p=0;p<I;p+=3){var P=h[p]+A,x=h[p+1]+A,E=h[p+2]+A;h[p+I]=E,h[p+1+I]=x,h[p+2+I]=P}if(f.attributes.position.values=T,a&&s.normal){var O=f.attributes.normal.values;f.attributes.normal.values=new Float32Array(T.length),f.attributes.normal.values.set(O)}f.indices=h}else if(n){for(y=v.length/3,h=m.IndexDatatype.createTypedArray(y,w.length),p=0;p<w.length;p+=3)h[p]=w[p+2],h[p+1]=w[p+1],h[p+2]=w[p];f.indices=h}g.topAndBottom=new d.d({geometry:f})}var H,D=r.outerRing,N=c.f.fromPoints(D,e),C=N.projectPointsOntoPlane(D,ne),L=b.A.computeWindingOrder2D(C);L===b.W.CLOCKWISE&&(D=D.slice().reverse()),u&&(H=_.y.computeWallGeometry(D,e,o,a,l),g.walls.push(new d.d({geometry:H})));var R=r.holes;for(p=0;p<R.length;p++){var F=R[p];C=(N=c.f.fromPoints(F,e)).projectPointsOntoPlane(F,ne),(L=b.A.computeWindingOrder2D(C))===b.W.COUNTER_CLOCKWISE&&(F=F.slice().reverse()),H=_.y.computeWallGeometry(F,e,o,a,l),g.walls.push(new d.d({geometry:H}))}return g}function le(r){if(l.o.typeOf.object("options",r),l.o.typeOf.object("options.polygonHierarchy",r.polygonHierarchy),e.e(r.perPositionHeight)&&r.perPositionHeight&&e.e(r.height))throw new l.t("Cannot use both options.perPositionHeight and options.height");if(e.e(r.arcType)&&r.arcType!==o.L.GEODESIC&&r.arcType!==o.L.RHUMB)throw new l.t("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var a=r.polygonHierarchy,i=e.u(r.vertexFormat,w.n.DEFAULT),n=e.u(r.ellipsoid,t.t.WGS84),s=e.u(r.granularity,f.e.RADIANS_PER_DEGREE),u=e.u(r.stRotation,0),p=e.u(r.perPositionHeight,!1),c=p&&e.e(r.extrudedHeight),g=e.u(r.height,0),d=e.u(r.extrudedHeight,g);if(!c){var y=Math.max(g,d);d=Math.min(g,d),g=y}this._vertexFormat=w.n.clone(i),this._ellipsoid=t.t.clone(n),this._granularity=s,this._stRotation=u,this._height=g,this._extrudedHeight=d,this._closeTop=e.u(r.closeTop,!0),this._closeBottom=e.u(r.closeBottom,!0),this._extrudeOutering=e.u(r.extrudeOutering,!0),this._polygonHierarchy=a,this._perPositionHeight=p,this._perPositionHeightExtrude=c,this._shadowVolume=e.u(r.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=r.offsetAttribute,this._arcType=e.u(r.arcType,o.L.GEODESIC),this._groundBottomAltitude=e.u(r.groundBottomAltitude,0),this._groundExtrudedHeight=e.u(r.groundExtrudedHeight,0),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this.packedLength=_.y.computeHierarchyPackedLength(a)+t.t.packedLength+w.n.packedLength+12}le.fromPositions=function(t){return t=e.u(t,e.u.EMPTY_OBJECT),l.o.defined("options.positions",t.positions),new le({polygonHierarchy:{positions:t.positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType})},le.pack=function(o,r,a){return l.o.typeOf.object("value",o),l.o.defined("array",r),a=e.u(a,0),a=_.y.packPolygonHierarchy(o._polygonHierarchy,r,a),t.t.pack(o._ellipsoid,r,a),a+=t.t.packedLength,w.n.pack(o._vertexFormat,r,a),a+=w.n.packedLength,r[a++]=o._height,r[a++]=o._extrudedHeight,r[a++]=o._granularity,r[a++]=o._stRotation,r[a++]=o._perPositionHeightExtrude?1:0,r[a++]=o._perPositionHeight?1:0,r[a++]=o._closeTop?1:0,r[a++]=o._closeBottom?1:0,r[a++]=o._shadowVolume?1:0,r[a++]=e.u(o._offsetAttribute,-1),r[a++]=o._arcType,r[a]=o.packedLength,r};var ue=t.t.clone(t.t.UNIT_SPHERE),pe=new w.n,ce={polygonHierarchy:{}};return le.unpack=function(o,r,a){l.o.defined("array",o),r=e.u(r,0);var i=_.y.unpackPolygonHierarchy(o,r);r=i.startingIndex,delete i.startingIndex;var n=t.t.unpack(o,r,ue);r+=t.t.packedLength;var s=w.n.unpack(o,r,pe);r+=w.n.packedLength;var u=o[r++],p=o[r++],c=o[r++],g=o[r++],d=1===o[r++],y=1===o[r++],h=1===o[r++],m=1===o[r++],f=1===o[r++],v=o[r++],b=o[r++],T=o[r];return e.e(a)||(a=new le(ce)),a._polygonHierarchy=i,a._ellipsoid=t.t.clone(n,a._ellipsoid),a._vertexFormat=w.n.clone(s,a._vertexFormat),a._height=u,a._extrudedHeight=p,a._granularity=c,a._stRotation=g,a._perPositionHeightExtrude=d,a._perPositionHeight=y,a._closeTop=h,a._closeBottom=m,a._shadowVolume=f,a._offsetAttribute=-1===v?void 0:v,a._arcType=b,a.packedLength=T,a},le.computeRectangle=function(r,a){l.o.typeOf.object("options",r),l.o.typeOf.object("options.polygonHierarchy",r.polygonHierarchy);var i=e.u(r.granularity,f.e.RADIANS_PER_DEGREE),n=e.u(r.arcType,o.L.GEODESIC);if(n!==o.L.GEODESIC&&n!==o.L.RHUMB)throw new l.t("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var s=r.polygonHierarchy,u=e.u(r.ellipsoid,t.t.WGS84);return re(s.positions,u,n,i,a)},le.createGeometry=function(t){var o=t._vertexFormat,a=t._ellipsoid,n=t._granularity,s=t._stRotation,l=t._polygonHierarchy,p=t._perPositionHeight,v=t._closeTop,w=t._closeBottom,T=t._arcType,I=l.positions;if(!(I.length<3)){var A=c.f.fromPoints(I,a),P=_.y.polygonsFromHierarchy(l,A.projectPointsOntoPlane.bind(A),!p,a),x=P.hierarchy,E=P.polygons;if(0!==x.length){I=x[0].outerRing;var O,H=_.y.computeBoundingRectangle(A.plane.normal,A.projectPointOntoPlane.bind(A),I,s,G),D=[],N=t._height,C=t._extrudedHeight,L={perPositionHeight:p,vertexFormat:o,geometry:void 0,tangentPlane:A,boundingRectangle:H,ellipsoid:a,stRotation:s,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:T};if(t._perPositionHeightExtrude||!f.e.equalsEpsilon(N,C,0,f.e.EPSILON2))for(L.extrude=!0,L.top=v,L.bottom=w,L.shadowVolume=t._shadowVolume,L.offsetAttribute=t._offsetAttribute,O=0;O<E.length;O++){var R,F=se(a,E[O],n,x[O],p,v,w,o,T,t._extrudeOutering);v&&w?(R=F.topAndBottom,L.geometry=_.y.scaleToGeodeticHeightExtruded(R.geometry,N,C,a,p)):v?((R=F.topAndBottom).geometry.attributes.position.values=b.A.scaleToGeodeticHeight(R.geometry.attributes.position.values,N,a,!p),L.geometry=R.geometry):w&&((R=F.topAndBottom).geometry.attributes.position.values=b.A.scaleToGeodeticHeight(R.geometry.attributes.position.values,C,a,!0),L.geometry=R.geometry),(v||w)&&(L.wall=!1,R.geometry=J(L),D.push(R));var B=F.walls;L.wall=!0;for(var S=0;S<B.length;S++){var V=B[S];L.geometry=_.y.scaleToGeodeticHeightExtruded(V.geometry,N,C,a,p),V.geometry=J(L),D.push(V)}}else for(O=0;O<E.length;O++){var k=new d.d({geometry:_.y.createGeometryFromPositions(a,E[O],n,p,o,T)});if(k.geometry.attributes.position.values=b.A.scaleToGeodeticHeight(k.geometry.attributes.position.values,N,a,!p),L.geometry=k.geometry,k.geometry=J(L),e.e(t._offsetAttribute)){var z=k.geometry.attributes.position.values.length,M=new Uint8Array(z/3),U=t._offsetAttribute===y.z.NONE?0:1;r.d(M,U),k.geometry.attributes.applyOffset=new g.o({componentDatatype:u.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:M})}D.push(k)}var W=h.k.combineInstances(D)[0];W.attributes.position.values=new Float64Array(W.attributes.position.values),W.indices=m.IndexDatatype.createTypedArray(W.attributes.position.values.length/3,W.indices);var Y=W.attributes,j=i.i.fromVertices(Y.position.values);return o.position||delete Y.position,new g.I({attributes:Y,indices:W.indices,primitiveType:W.primitiveType,boundingSphere:j,offsetAttribute:t._offsetAttribute})}}},le.createShadowVolume=function(e,t,o){var r=e._granularity,a=e._ellipsoid,i=e._groundBottomAltitude+e._groundExtrudedHeight,n=e._groundBottomAltitude?e._groundBottomAltitude:t(r,a),s=i!==e._groundBottomAltitude?i:o(r,a);return new le({polygonHierarchy:e._polygonHierarchy,ellipsoid:a,stRotation:e._stRotation,granularity:r,perPositionHeight:!1,extrudedHeight:n,height:s,vertexFormat:w.n.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(le.prototype,{rectangle:{get:function(){if(!e.e(this._rectangle)){var t=this._polygonHierarchy.positions;this._rectangle=re(t,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e.e(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){var t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];var o=e._ellipsoid,r=e._polygonHierarchy.positions,a=e.rectangle;return g.I._textureCoordinateRotationPoints(r,t,o,a)}(this)),this._textureCoordinateRotationPoints}}}),function(o,r){return e.e(r)&&(o=le.unpack(o,r)),o._ellipsoid=t.t.clone(o._ellipsoid),le.createGeometry(o)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createPolygonOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createPolygonOutlineGeometry.js index 34158467..0d3eca5b 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createPolygonOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createPolygonOutlineGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./Cartesian2-b72655a5","./ArcType-31298545","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Check-52a7d806","./ComponentDatatype-98414d16","./EllipsoidTangentPlane-d6b88a1f","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryInstance-3190c1b4","./GeometryOffsetAttribute-b4d599f5","./GeometryPipeline-7ffd3f60","./IndexDatatype-86677ec4","./Math-ecf82623","./PolygonGeometryLibrary-c16a4c7e","./PolygonPipeline-425528b3","./FeatureDetection-cec0163f","./Cartographic-a2c313d7","./Cartesian3-3a8bdb0b","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./IntersectionTests-6e80d61c","./Plane-33393da8","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./arrayRemoveDuplicates-a6924649","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,i,r,o,n,a,s,p,u,y,c,d,l,h,f,g,b,m,v,_,E,H,P,A,L,C,T,D,I){"use strict";var O=[],w=[];function x(e,t,r,o,n){var c=s.f.fromPoints(t,e).projectPointsOntoPlane(t,O);g.A.computeWindingOrder2D(c)===g.W.CLOCKWISE&&(c.reverse(),t=t.slice().reverse());var d,h,m=t.length,v=0;if(o)for(d=new Float64Array(2*m*3),h=0;h<m;h++){var _=t[h],E=t[(h+1)%m];d[v++]=_.x,d[v++]=_.y,d[v++]=_.z,d[v++]=E.x,d[v++]=E.y,d[v++]=E.z}else{var H=0;if(n===i.L.GEODESIC)for(h=0;h<m;h++)H+=f.y.subdivideLineCount(t[h],t[(h+1)%m],r);else if(n===i.L.RHUMB)for(h=0;h<m;h++)H+=f.y.subdivideRhumbLineCount(e,t[h],t[(h+1)%m],r);for(d=new Float64Array(3*H),h=0;h<m;h++){var P;n===i.L.GEODESIC?P=f.y.subdivideLine(t[h],t[(h+1)%m],r,w):n===i.L.RHUMB&&(P=f.y.subdivideRhumbLine(e,t[h],t[(h+1)%m],r,w));for(var A=P.length,L=0;L<A;++L)d[v++]=P[L]}}var C=2*(m=d.length/3),T=l.IndexDatatype.createTypedArray(m,C);for(v=0,h=0;h<m-1;h++)T[v++]=h,T[v++]=h+1;return T[v++]=m-1,T[v++]=0,new y.d({geometry:new p.I({attributes:new u.a({position:new p.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:d})}),indices:T,primitiveType:b._0x4b6a27.LINES})})}function G(e,t,r,o,n){var c=s.f.fromPoints(t,e).projectPointsOntoPlane(t,O);g.A.computeWindingOrder2D(c)===g.W.CLOCKWISE&&(c.reverse(),t=t.slice().reverse());var d,h,m=t.length,v=new Array(m),_=0;if(o)for(d=new Float64Array(2*m*3*2),h=0;h<m;++h){v[h]=_/3;var E=t[h],H=t[(h+1)%m];d[_++]=E.x,d[_++]=E.y,d[_++]=E.z,d[_++]=H.x,d[_++]=H.y,d[_++]=H.z}else{var P=0;if(n===i.L.GEODESIC)for(h=0;h<m;h++)P+=f.y.subdivideLineCount(t[h],t[(h+1)%m],r);else if(n===i.L.RHUMB)for(h=0;h<m;h++)P+=f.y.subdivideRhumbLineCount(e,t[h],t[(h+1)%m],r);for(d=new Float64Array(3*P*2),h=0;h<m;++h){var A;v[h]=_/3,n===i.L.GEODESIC?A=f.y.subdivideLine(t[h],t[(h+1)%m],r,w):n===i.L.RHUMB&&(A=f.y.subdivideRhumbLine(e,t[h],t[(h+1)%m],r,w));for(var L=A.length,C=0;C<L;++C)d[_++]=A[C]}}m=d.length/6;var T=v.length,D=2*(2*m+T),I=l.IndexDatatype.createTypedArray(m,D);for(_=0,h=0;h<m;++h)I[_++]=h,I[_++]=(h+1)%m,I[_++]=h+m,I[_++]=(h+1)%m+m;for(h=0;h<T;h++){var x=v[h];I[_++]=x,I[_++]=x+m}return new y.d({geometry:new p.I({attributes:new u.a({position:new p.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:d})}),indices:I,primitiveType:b._0x4b6a27.LINES})})}function R(r){if(n.o.typeOf.object("options",r),n.o.typeOf.object("options.polygonHierarchy",r.polygonHierarchy),r.perPositionHeight&&e.e(r.height))throw new n.t("Cannot use both options.perPositionHeight and options.height");if(e.e(r.arcType)&&r.arcType!==i.L.GEODESIC&&r.arcType!==i.L.RHUMB)throw new n.t("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var o=r.polygonHierarchy,a=e.u(r.ellipsoid,t.t.WGS84),s=e.u(r.granularity,h.e.RADIANS_PER_DEGREE),p=e.u(r.perPositionHeight,!1),u=p&&e.e(r.extrudedHeight),y=e.u(r.arcType,i.L.GEODESIC),c=e.u(r.height,0),d=e.u(r.extrudedHeight,c);if(!u){var l=Math.max(c,d);d=Math.min(c,d),c=l}this._ellipsoid=t.t.clone(a),this._granularity=s,this._height=c,this._extrudedHeight=d,this._arcType=y,this._polygonHierarchy=o,this._perPositionHeight=p,this._perPositionHeightExtrude=u,this._offsetAttribute=r.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=f.y.computeHierarchyPackedLength(o)+t.t.packedLength+8}R.pack=function(i,r,o){return n.o.typeOf.object("value",i),n.o.defined("array",r),o=e.u(o,0),o=f.y.packPolygonHierarchy(i._polygonHierarchy,r,o),t.t.pack(i._ellipsoid,r,o),o+=t.t.packedLength,r[o++]=i._height,r[o++]=i._extrudedHeight,r[o++]=i._granularity,r[o++]=i._perPositionHeightExtrude?1:0,r[o++]=i._perPositionHeight?1:0,r[o++]=i._arcType,r[o++]=e.u(i._offsetAttribute,-1),r[o]=i.packedLength,r};var S=t.t.clone(t.t.UNIT_SPHERE),k={polygonHierarchy:{}};return R.unpack=function(i,r,o){n.o.defined("array",i),r=e.u(r,0);var a=f.y.unpackPolygonHierarchy(i,r);r=a.startingIndex,delete a.startingIndex;var s=t.t.unpack(i,r,S);r+=t.t.packedLength;var p=i[r++],u=i[r++],y=i[r++],c=1===i[r++],d=1===i[r++],l=i[r++],h=i[r++],g=i[r];return e.e(o)||(o=new R(k)),o._polygonHierarchy=a,o._ellipsoid=t.t.clone(s,o._ellipsoid),o._height=p,o._extrudedHeight=u,o._granularity=y,o._perPositionHeight=d,o._perPositionHeightExtrude=c,o._arcType=l,o._offsetAttribute=-1===h?void 0:h,o.packedLength=g,o},R.fromPositions=function(t){return t=e.u(t,e.u.EMPTY_OBJECT),n.o.defined("options.positions",t.positions),new R({polygonHierarchy:{positions:t.positions},height:t.height,extrudedHeight:t.extrudedHeight,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,arcType:t.arcType,offsetAttribute:t.offsetAttribute})},R.createGeometry=function(t){var i=t._ellipsoid,n=t._granularity,s=t._polygonHierarchy,u=t._perPositionHeight,y=t._arcType,l=f.y.polygonOutlinesFromHierarchy(s,!u,i);if(0!==l.length){var b,m,v,_=[],E=h.e.chordLength(n,i.maximumRadius),H=t._height,P=t._extrudedHeight;if(t._perPositionHeightExtrude||!h.e.equalsEpsilon(H,P,0,h.e.EPSILON2))for(v=0;v<l.length;v++){if((b=G(i,l[v],E,u,y)).geometry=f.y.scaleToGeodeticHeightExtruded(b.geometry,H,P,i,u),e.e(t._offsetAttribute)){var A=b.geometry.attributes.position.values.length/3,L=new Uint8Array(A);t._offsetAttribute===c.z.TOP?L=r.d(L,1,0,A/2):(m=t._offsetAttribute===c.z.NONE?0:1,L=r.d(L,m)),b.geometry.attributes.applyOffset=new p.o({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}_.push(b)}else for(v=0;v<l.length;v++){if((b=x(i,l[v],E,u,y)).geometry.attributes.position.values=g.A.scaleToGeodeticHeight(b.geometry.attributes.position.values,H,i,!u),e.e(t._offsetAttribute)){var C=b.geometry.attributes.position.values.length,T=new Uint8Array(C/3);m=t._offsetAttribute===c.z.NONE?0:1,r.d(T,m),b.geometry.attributes.applyOffset=new p.o({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}_.push(b)}var D=d.k.combineInstances(_)[0],I=o.i.fromVertices(D.attributes.position.values);return new p.I({attributes:D.attributes,indices:D.indices,primitiveType:D.primitiveType,boundingSphere:I,offsetAttribute:t._offsetAttribute})}},function(i,r){return e.e(r)&&(i=R.unpack(i,r)),i._ellipsoid=t.t.clone(i._ellipsoid),R.createGeometry(i)}})); +define(["./when-92c6cf3c","./Cartesian2-b72655a5","./ArcType-31298545","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Check-52a7d806","./ComponentDatatype-98414d16","./EllipsoidTangentPlane-c500945e","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryInstance-20be787d","./GeometryOffsetAttribute-b4d599f5","./GeometryPipeline-50805727","./IndexDatatype-86677ec4","./Math-ecf82623","./PolygonGeometryLibrary-eea5d80b","./PolygonPipeline-c329dec3","./FeatureDetection-fd297af4","./Cartographic-a2c313d7","./Cartesian3-3a8bdb0b","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./arrayRemoveDuplicates-a6924649","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,i,r,o,n,a,s,p,u,y,c,d,l,h,f,g,b,m,v,_,E,H,P,A,L,C,T,D,I){"use strict";var O=[],w=[];function x(e,t,r,o,n){var c=s.f.fromPoints(t,e).projectPointsOntoPlane(t,O);g.A.computeWindingOrder2D(c)===g.W.CLOCKWISE&&(c.reverse(),t=t.slice().reverse());var d,h,m=t.length,v=0;if(o)for(d=new Float64Array(2*m*3),h=0;h<m;h++){var _=t[h],E=t[(h+1)%m];d[v++]=_.x,d[v++]=_.y,d[v++]=_.z,d[v++]=E.x,d[v++]=E.y,d[v++]=E.z}else{var H=0;if(n===i.L.GEODESIC)for(h=0;h<m;h++)H+=f.y.subdivideLineCount(t[h],t[(h+1)%m],r);else if(n===i.L.RHUMB)for(h=0;h<m;h++)H+=f.y.subdivideRhumbLineCount(e,t[h],t[(h+1)%m],r);for(d=new Float64Array(3*H),h=0;h<m;h++){var P;n===i.L.GEODESIC?P=f.y.subdivideLine(t[h],t[(h+1)%m],r,w):n===i.L.RHUMB&&(P=f.y.subdivideRhumbLine(e,t[h],t[(h+1)%m],r,w));for(var A=P.length,L=0;L<A;++L)d[v++]=P[L]}}var C=2*(m=d.length/3),T=l.IndexDatatype.createTypedArray(m,C);for(v=0,h=0;h<m-1;h++)T[v++]=h,T[v++]=h+1;return T[v++]=m-1,T[v++]=0,new y.d({geometry:new p.I({attributes:new u.a({position:new p.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:d})}),indices:T,primitiveType:b._0x3b3836.LINES})})}function G(e,t,r,o,n){var c=s.f.fromPoints(t,e).projectPointsOntoPlane(t,O);g.A.computeWindingOrder2D(c)===g.W.CLOCKWISE&&(c.reverse(),t=t.slice().reverse());var d,h,m=t.length,v=new Array(m),_=0;if(o)for(d=new Float64Array(2*m*3*2),h=0;h<m;++h){v[h]=_/3;var E=t[h],H=t[(h+1)%m];d[_++]=E.x,d[_++]=E.y,d[_++]=E.z,d[_++]=H.x,d[_++]=H.y,d[_++]=H.z}else{var P=0;if(n===i.L.GEODESIC)for(h=0;h<m;h++)P+=f.y.subdivideLineCount(t[h],t[(h+1)%m],r);else if(n===i.L.RHUMB)for(h=0;h<m;h++)P+=f.y.subdivideRhumbLineCount(e,t[h],t[(h+1)%m],r);for(d=new Float64Array(3*P*2),h=0;h<m;++h){var A;v[h]=_/3,n===i.L.GEODESIC?A=f.y.subdivideLine(t[h],t[(h+1)%m],r,w):n===i.L.RHUMB&&(A=f.y.subdivideRhumbLine(e,t[h],t[(h+1)%m],r,w));for(var L=A.length,C=0;C<L;++C)d[_++]=A[C]}}m=d.length/6;var T=v.length,D=2*(2*m+T),I=l.IndexDatatype.createTypedArray(m,D);for(_=0,h=0;h<m;++h)I[_++]=h,I[_++]=(h+1)%m,I[_++]=h+m,I[_++]=(h+1)%m+m;for(h=0;h<T;h++){var x=v[h];I[_++]=x,I[_++]=x+m}return new y.d({geometry:new p.I({attributes:new u.a({position:new p.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:d})}),indices:I,primitiveType:b._0x3b3836.LINES})})}function R(r){if(n.o.typeOf.object("options",r),n.o.typeOf.object("options.polygonHierarchy",r.polygonHierarchy),r.perPositionHeight&&e.e(r.height))throw new n.t("Cannot use both options.perPositionHeight and options.height");if(e.e(r.arcType)&&r.arcType!==i.L.GEODESIC&&r.arcType!==i.L.RHUMB)throw new n.t("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var o=r.polygonHierarchy,a=e.u(r.ellipsoid,t.t.WGS84),s=e.u(r.granularity,h.e.RADIANS_PER_DEGREE),p=e.u(r.perPositionHeight,!1),u=p&&e.e(r.extrudedHeight),y=e.u(r.arcType,i.L.GEODESIC),c=e.u(r.height,0),d=e.u(r.extrudedHeight,c);if(!u){var l=Math.max(c,d);d=Math.min(c,d),c=l}this._ellipsoid=t.t.clone(a),this._granularity=s,this._height=c,this._extrudedHeight=d,this._arcType=y,this._polygonHierarchy=o,this._perPositionHeight=p,this._perPositionHeightExtrude=u,this._offsetAttribute=r.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=f.y.computeHierarchyPackedLength(o)+t.t.packedLength+8}R.pack=function(i,r,o){return n.o.typeOf.object("value",i),n.o.defined("array",r),o=e.u(o,0),o=f.y.packPolygonHierarchy(i._polygonHierarchy,r,o),t.t.pack(i._ellipsoid,r,o),o+=t.t.packedLength,r[o++]=i._height,r[o++]=i._extrudedHeight,r[o++]=i._granularity,r[o++]=i._perPositionHeightExtrude?1:0,r[o++]=i._perPositionHeight?1:0,r[o++]=i._arcType,r[o++]=e.u(i._offsetAttribute,-1),r[o]=i.packedLength,r};var S=t.t.clone(t.t.UNIT_SPHERE),k={polygonHierarchy:{}};return R.unpack=function(i,r,o){n.o.defined("array",i),r=e.u(r,0);var a=f.y.unpackPolygonHierarchy(i,r);r=a.startingIndex,delete a.startingIndex;var s=t.t.unpack(i,r,S);r+=t.t.packedLength;var p=i[r++],u=i[r++],y=i[r++],c=1===i[r++],d=1===i[r++],l=i[r++],h=i[r++],g=i[r];return e.e(o)||(o=new R(k)),o._polygonHierarchy=a,o._ellipsoid=t.t.clone(s,o._ellipsoid),o._height=p,o._extrudedHeight=u,o._granularity=y,o._perPositionHeight=d,o._perPositionHeightExtrude=c,o._arcType=l,o._offsetAttribute=-1===h?void 0:h,o.packedLength=g,o},R.fromPositions=function(t){return t=e.u(t,e.u.EMPTY_OBJECT),n.o.defined("options.positions",t.positions),new R({polygonHierarchy:{positions:t.positions},height:t.height,extrudedHeight:t.extrudedHeight,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,arcType:t.arcType,offsetAttribute:t.offsetAttribute})},R.createGeometry=function(t){var i=t._ellipsoid,n=t._granularity,s=t._polygonHierarchy,u=t._perPositionHeight,y=t._arcType,l=f.y.polygonOutlinesFromHierarchy(s,!u,i);if(0!==l.length){var b,m,v,_=[],E=h.e.chordLength(n,i.maximumRadius),H=t._height,P=t._extrudedHeight;if(t._perPositionHeightExtrude||!h.e.equalsEpsilon(H,P,0,h.e.EPSILON2))for(v=0;v<l.length;v++){if((b=G(i,l[v],E,u,y)).geometry=f.y.scaleToGeodeticHeightExtruded(b.geometry,H,P,i,u),e.e(t._offsetAttribute)){var A=b.geometry.attributes.position.values.length/3,L=new Uint8Array(A);t._offsetAttribute===c.z.TOP?L=r.d(L,1,0,A/2):(m=t._offsetAttribute===c.z.NONE?0:1,L=r.d(L,m)),b.geometry.attributes.applyOffset=new p.o({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}_.push(b)}else for(v=0;v<l.length;v++){if((b=x(i,l[v],E,u,y)).geometry.attributes.position.values=g.A.scaleToGeodeticHeight(b.geometry.attributes.position.values,H,i,!u),e.e(t._offsetAttribute)){var C=b.geometry.attributes.position.values.length,T=new Uint8Array(C/3);m=t._offsetAttribute===c.z.NONE?0:1,r.d(T,m),b.geometry.attributes.applyOffset=new p.o({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}_.push(b)}var D=d.k.combineInstances(_)[0],I=o.i.fromVertices(D.attributes.position.values);return new p.I({attributes:D.attributes,indices:D.indices,primitiveType:D.primitiveType,boundingSphere:I,offsetAttribute:t._offsetAttribute})}},function(i,r){return e.e(r)&&(i=R.unpack(i,r)),i._ellipsoid=t.t.clone(i._ellipsoid),R.createGeometry(i)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createPolylineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createPolylineGeometry.js index 2caf749a..19429ab6 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createPolylineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createPolylineGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./Cartesian2-b72655a5","./ArcType-31298545","./arrayRemoveDuplicates-a6924649","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Color-98063b35","./ComponentDatatype-98414d16","./Check-52a7d806","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./IndexDatatype-86677ec4","./Math-ecf82623","./PolylinePipeline-f0970409","./FeatureDetection-cec0163f","./VertexFormat-f496a3f1","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./IntersectionTests-6e80d61c","./Plane-33393da8"],(function(e,t,o,r,a,n,i,l,s,c,p,d,u,h,y,f,m,v,w,_,g,b,L,D,E){"use strict";var A=[];function x(e,t,o,r,a){var n=A;n.length=a;var l,s=o.red,c=o.green,p=o.blue,d=o.alpha,u=r.red,h=r.green,y=r.blue,f=r.alpha;if(i.e.equals(o,r)){for(l=0;l<a;l++)n[l]=i.e.clone(o);return n}var m=(u-s)/a,v=(h-c)/a,w=(y-p)/a,_=(f-d)/a;for(l=0;l<a;l++)n[l]=new i.e(s+l*m,c+l*v,p+l*w,d+l*_);return n}function P(r){var l=(r=e.u(r,e.u.EMPTY_OBJECT)).positions,c=r.colors,p=e.u(r.width,1),d=e.u(r.hMax,-1),h=e.u(r.colorsPerVertex,!1);if(!e.e(l)||l.length<2)throw new s.t("At least two positions are required.");if("number"!=typeof p)throw new s.t("width must be a number");if(e.e(c)&&(h&&c.length<l.length||!h&&c.length<l.length-1))throw new s.t("colors has an invalid length.");this._positions=l,this._colors=c,this._width=p,this._hMax=d,this._colorsPerVertex=h,this._dist=r.dist,this._period=r.period,this._vertexFormat=f.n.clone(e.u(r.vertexFormat,f.n.DEFAULT)),this._followSurface=e.u(r.followSurface,!0),e.e(r.followSurface)&&(function(t,o){if(!e.e(t)||!e.e(o))throw new s.t("identifier and message are required.");a.e(t,o)}("PolylineGeometry.followSurface","PolylineGeometry.followSurface is deprecated and will be removed in SuperMap3D. Use PolylineGeometry.arcType instead."),r.arcType=r.followSurface?o.L.GEODESIC:o.L.NONE),this._arcType=e.u(r.arcType,o.L.GEODESIC),this._followSurface=this._arcType!==o.L.NONE,this._granularity=e.u(r.granularity,u.e.RADIANS_PER_DEGREE),this._ellipsoid=t.t.clone(e.u(r.ellipsoid,t.t.WGS84)),this._workerName="createPolylineGeometry";var y=1+l.length*n.o.packedLength;y+=e.e(c)?1+c.length*i.e.packedLength:1,this.packedLength=y+t.t.packedLength+f.n.packedLength+4+2}P.pack=function(o,r,a){if(!e.e(o))throw new s.t("value is required");if(!e.e(r))throw new s.t("array is required");a=e.u(a,0);var l,c=o._positions,p=c.length;for(r[a++]=p,l=0;l<p;++l,a+=n.o.packedLength)n.o.pack(c[l],r,a);var d=o._colors;for(p=e.e(d)?d.length:0,r[a++]=p,l=0;l<p;++l,a+=i.e.packedLength)i.e.pack(d[l],r,a);return t.t.pack(o._ellipsoid,r,a),a+=t.t.packedLength,f.n.pack(o._vertexFormat,r,a),a+=f.n.packedLength,r[a++]=o._width,r[a++]=o._colorsPerVertex?1:0,r[a++]=o._arcType,r[a++]=o._granularity,r[a++]=o._hMax,r[a++]=o._dist,r[a]=o._period,r};var k=t.t.clone(t.t.UNIT_SPHERE),T=new f.n,C={positions:void 0,colors:void 0,ellipsoid:k,vertexFormat:T,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};P.unpack=function(o,r,a){if(!e.e(o))throw new s.t("array is required");r=e.u(r,0);var l,c=o[r++],p=new Array(c);for(l=0;l<c;++l,r+=n.o.packedLength)p[l]=n.o.unpack(o,r);var d=(c=o[r++])>0?new Array(c):void 0;for(l=0;l<c;++l,r+=i.e.packedLength)d[l]=i.e.unpack(o,r);var u=t.t.unpack(o,r,k);r+=t.t.packedLength;var h=f.n.unpack(o,r,T);r+=f.n.packedLength;var y=o[r++],m=1===o[r++],v=o[r++],w=o[r++],_=o[r++],g=1==o[r++],b=o[r];return e.e(a)?(a._positions=p,a._colors=d,a._ellipsoid=t.t.clone(u,a._ellipsoid),a._vertexFormat=f.n.clone(h,a._vertexFormat),a._width=y,a._colorsPerVertex=m,a._arcType=v,a._granularity=w,a._hMax=_,a._dist=g,a._period=b,a):(C.positions=p,C.colors=d,C.width=y,C.colorsPerVertex=m,C.arcType=v,C.granularity=w,C.hMax=_,C.dist=g,C.period=b,new P(C))};var S=new n.o,F=new n.o,G=new n.o,O=new n.o;return P.createGeometry=function(t){var s,f,m,v=t._width,w=t._hMax,_=t._vertexFormat,g=t._colors,b=t._colorsPerVertex,L=t._arcType,D=t._granularity,E=t._ellipsoid,P=t._dist,k=t._period,T=r.D(t._positions,n.o.equalsEpsilon),C=T.length;if(!(C<2||v<=0)){if(L===o.L.GEODESIC||L===o.L.RHUMB){var M,I;L===o.L.GEODESIC?(M=u.e.chordLength(D,E.maximumRadius),I=h.m.numberOfPoints):(M=D,I=h.m.numberOfPointsRhumbLine);var R=h.m.extractHeights(T,E);if(e.e(g)){var N=1;for(s=0;s<C-1;++s)N+=I(T[s],T[s+1],M);var B=new Array(N),U=0;for(s=0;s<C-1;++s){var V=T[s],q=T[s+1],H=g[s],W=I(V,q,M);if(b&&s<N){var Y=x(0,0,H,g[s+1],W),z=Y.length;for(f=0;f<z;++f)B[U++]=Y[f]}else for(f=0;f<W;++f)B[U++]=i.e.clone(H)}B[U]=i.e.clone(g[g.length-1]),g=B,A.length=0}T=L===o.L.GEODESIC?h.m.generateCartesianArc({positions:T,minDistance:M,ellipsoid:E,height:R,hMax:w}):h.m.generateCartesianRhumbArc({positions:T,granularity:M,ellipsoid:E,height:R})}var J,j=4*(C=T.length)-4,K=new Float64Array(3*j),Q=new Float64Array(3*j),X=new Float64Array(3*j),Z=new Float32Array(2*j),$=_.st?new Float32Array(2*j):void 0,ee=e.e(g)?new Uint8Array(4*j):void 0,te=P?new Float32Array(3*j):void 0,oe=0,re=0,ae=0,ne=0,ie=0,le=0;for(f=0;f<C;++f){var se,ce;0===f?(J=S,n.o.subtract(T[0],T[1],J),n.o.add(T[0],J,J)):J=T[f-1],n.o.clone(J,G),n.o.clone(T[f],F),f===C-1?(J=S,n.o.subtract(T[C-1],T[C-2],J),n.o.add(T[C-1],J,J)):J=T[f+1],n.o.clone(J,O),e.e(ee)&&(se=0===f||b?g[f]:g[f-1],f!==C-1&&(ce=g[f]));var pe=f===C-1?2:4;for(m=0===f?2:0;m<pe;++m){n.o.pack(F,K,oe),n.o.pack(G,Q,oe),n.o.pack(O,X,oe),oe+=3;var de=m-2<0?-1:1,ue=m%2*2-1,he=ue*f/C;if(Z[re++]=w>0?he:ue,Z[re++]=de*v,_.st&&($[ae++]=f/(C-1),$[ae++]=Math.max(Z[re-2],0)),e.e(ee)){var ye=m<2?se:ce;ee[ne++]=i.e.floatToByte(ye.red),ee[ne++]=i.e.floatToByte(ye.green),ee[ne++]=i.e.floatToByte(ye.blue),ee[ne++]=i.e.floatToByte(ye.alpha)}P&&(te[3*ie]=le,ie++)}le+=n.o.distance(J,T[f])}if(P){var fe=le,me=Math.random()*(k>0?k:fe);for(f=0;f<j;f++)te[3*f+1]=fe,te[3*f+2]=me}var ve=new p.a;ve.position=new c.o({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:K}),ve.prevPosition=new c.o({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:Q}),ve.nextPosition=new c.o({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:X}),ve.expandAndWidth=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:Z}),_.st&&(ve.st=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:$})),e.e(ee)&&(ve.color=new c.o({componentDatatype:l.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:ee,normalize:!0})),P&&(ve.dist=new c.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:te}));var we=d.IndexDatatype.createTypedArray(j,6*C-6),_e=0,ge=0,be=C-1;for(f=0;f<be;++f)we[ge++]=_e,we[ge++]=_e+2,we[ge++]=_e+1,we[ge++]=_e+1,we[ge++]=_e+2,we[ge++]=_e+3,_e+=4;return new c.I({attributes:ve,indices:we,primitiveType:y._0x4b6a27.TRIANGLES,boundingSphere:a.i.fromPoints(T),geometryType:c.Me.POLYLINES})}},function(o,r){return e.e(r)&&(o=P.unpack(o,r)),o._ellipsoid=t.t.clone(o._ellipsoid),P.createGeometry(o)}})); +define(["./when-92c6cf3c","./Cartesian2-b72655a5","./ArcType-31298545","./arrayRemoveDuplicates-a6924649","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Color-b1bd525f","./ComponentDatatype-98414d16","./Check-52a7d806","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./IndexDatatype-86677ec4","./Math-ecf82623","./PolylinePipeline-160fa1b0","./FeatureDetection-fd297af4","./VertexFormat-f496a3f1","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./IntersectionTests-9ff29c98","./Plane-a2c6da7b"],(function(e,t,o,r,a,n,i,l,c,s,p,d,u,h,f,y,m,v,w,_,g,b,L,D,E){"use strict";var A=[];function x(e,t,o,r,a){var n=A;n.length=a;var l,c=o.red,s=o.green,p=o.blue,d=o.alpha,u=r.red,h=r.green,f=r.blue,y=r.alpha;if(i.e.equals(o,r)){for(l=0;l<a;l++)n[l]=i.e.clone(o);return n}var m=(u-c)/a,v=(h-s)/a,w=(f-p)/a,_=(y-d)/a;for(l=0;l<a;l++)n[l]=new i.e(c+l*m,s+l*v,p+l*w,d+l*_);return n}function P(r){var l=(r=e.u(r,e.u.EMPTY_OBJECT)).positions,s=r.colors,p=e.u(r.width,1),d=e.u(r.hMax,-1),h=e.u(r.colorsPerVertex,!1);if(!e.e(l)||l.length<2)throw new c.t("At least two positions are required.");if("number"!=typeof p)throw new c.t("width must be a number");if(e.e(s)&&(h&&s.length<l.length||!h&&s.length<l.length-1))throw new c.t("colors has an invalid length.");this._positions=l,this._colors=s,this._width=p,this._hMax=d,this._colorsPerVertex=h,this._dist=r.dist,this._period=r.period,this._vertexFormat=y.n.clone(e.u(r.vertexFormat,y.n.DEFAULT)),this._followSurface=e.u(r.followSurface,!0),e.e(r.followSurface)&&(function(t,o){if(!e.e(t)||!e.e(o))throw new c.t("identifier and message are required.");a.e(t,o)}("PolylineGeometry.followSurface","PolylineGeometry.followSurface is deprecated and will be removed in SuperMap3D. Use PolylineGeometry.arcType instead."),r.arcType=r.followSurface?o.L.GEODESIC:o.L.NONE),this._arcType=e.u(r.arcType,o.L.GEODESIC),this._followSurface=this._arcType!==o.L.NONE,this._granularity=e.u(r.granularity,u.e.RADIANS_PER_DEGREE),this._ellipsoid=t.t.clone(e.u(r.ellipsoid,t.t.WGS84)),this._workerName="createPolylineGeometry";var f=1+l.length*n.o.packedLength;f+=e.e(s)?1+s.length*i.e.packedLength:1,this.packedLength=f+t.t.packedLength+y.n.packedLength+4+2}P.pack=function(o,r,a){if(!e.e(o))throw new c.t("value is required");if(!e.e(r))throw new c.t("array is required");a=e.u(a,0);var l,s=o._positions,p=s.length;for(r[a++]=p,l=0;l<p;++l,a+=n.o.packedLength)n.o.pack(s[l],r,a);var d=o._colors;for(p=e.e(d)?d.length:0,r[a++]=p,l=0;l<p;++l,a+=i.e.packedLength)i.e.pack(d[l],r,a);return t.t.pack(o._ellipsoid,r,a),a+=t.t.packedLength,y.n.pack(o._vertexFormat,r,a),a+=y.n.packedLength,r[a++]=o._width,r[a++]=o._colorsPerVertex?1:0,r[a++]=o._arcType,r[a++]=o._granularity,r[a++]=o._hMax,r[a++]=o._dist,r[a]=o._period,r};var k=t.t.clone(t.t.UNIT_SPHERE),T=new y.n,C={positions:void 0,colors:void 0,ellipsoid:k,vertexFormat:T,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};P.unpack=function(o,r,a){if(!e.e(o))throw new c.t("array is required");r=e.u(r,0);var l,s=o[r++],p=new Array(s);for(l=0;l<s;++l,r+=n.o.packedLength)p[l]=n.o.unpack(o,r);var d=(s=o[r++])>0?new Array(s):void 0;for(l=0;l<s;++l,r+=i.e.packedLength)d[l]=i.e.unpack(o,r);var u=t.t.unpack(o,r,k);r+=t.t.packedLength;var h=y.n.unpack(o,r,T);r+=y.n.packedLength;var f=o[r++],m=1===o[r++],v=o[r++],w=o[r++],_=o[r++],g=1==o[r++],b=o[r];return e.e(a)?(a._positions=p,a._colors=d,a._ellipsoid=t.t.clone(u,a._ellipsoid),a._vertexFormat=y.n.clone(h,a._vertexFormat),a._width=f,a._colorsPerVertex=m,a._arcType=v,a._granularity=w,a._hMax=_,a._dist=g,a._period=b,a):(C.positions=p,C.colors=d,C.width=f,C.colorsPerVertex=m,C.arcType=v,C.granularity=w,C.hMax=_,C.dist=g,C.period=b,new P(C))};var S=new n.o,F=new n.o,G=new n.o,O=new n.o;return P.createGeometry=function(t){var c,y,m,v=t._width,w=t._hMax,_=t._vertexFormat,g=t._colors,b=t._colorsPerVertex,L=t._arcType,D=t._granularity,E=t._ellipsoid,P=t._dist,k=t._period,T=r.D(t._positions,n.o.equalsEpsilon),C=T.length;if(!(C<2||v<=0)){if(L===o.L.GEODESIC||L===o.L.RHUMB){var M,I;L===o.L.GEODESIC?(M=u.e.chordLength(D,E.maximumRadius),I=h.m.numberOfPoints):(M=D,I=h.m.numberOfPointsRhumbLine);var R=h.m.extractHeights(T,E);if(e.e(g)){var N=1;for(c=0;c<C-1;++c)N+=I(T[c],T[c+1],M);var B=new Array(N),U=0;for(c=0;c<C-1;++c){var V=T[c],q=T[c+1],H=g[c],W=I(V,q,M);if(b&&c<N){var Y=x(0,0,H,g[c+1],W),z=Y.length;for(y=0;y<z;++y)B[U++]=Y[y]}else for(y=0;y<W;++y)B[U++]=i.e.clone(H)}B[U]=i.e.clone(g[g.length-1]),g=B,A.length=0}T=L===o.L.GEODESIC?h.m.generateCartesianArc({positions:T,minDistance:M,ellipsoid:E,height:R,hMax:w}):h.m.generateCartesianRhumbArc({positions:T,granularity:M,ellipsoid:E,height:R})}var J,j=4*(C=T.length)-4,K=new Float64Array(3*j),Q=new Float64Array(3*j),X=new Float64Array(3*j),Z=new Float32Array(2*j),$=_.st?new Float32Array(2*j):void 0,ee=e.e(g)?new Uint8Array(4*j):void 0,te=P?new Float32Array(3*j):void 0,oe=0,re=0,ae=0,ne=0,ie=0,le=0;for(y=0;y<C;++y){var ce,se;0===y?(J=S,n.o.subtract(T[0],T[1],J),n.o.add(T[0],J,J)):J=T[y-1],n.o.clone(J,G),n.o.clone(T[y],F),y===C-1?(J=S,n.o.subtract(T[C-1],T[C-2],J),n.o.add(T[C-1],J,J)):J=T[y+1],n.o.clone(J,O),e.e(ee)&&(ce=0===y||b?g[y]:g[y-1],y!==C-1&&(se=g[y]));var pe=y===C-1?2:4;for(m=0===y?2:0;m<pe;++m){n.o.pack(F,K,oe),n.o.pack(G,Q,oe),n.o.pack(O,X,oe),oe+=3;var de=m-2<0?-1:1,ue=m%2*2-1,he=ue*y/C;if(Z[re++]=w>0?he:ue,Z[re++]=de*v,_.st&&($[ae++]=y/(C-1),$[ae++]=Math.max(Z[re-2],0)),e.e(ee)){var fe=m<2?ce:se;ee[ne++]=i.e.floatToByte(fe.red),ee[ne++]=i.e.floatToByte(fe.green),ee[ne++]=i.e.floatToByte(fe.blue),ee[ne++]=i.e.floatToByte(fe.alpha)}P&&(te[3*ie]=le,ie++)}le+=n.o.distance(J,T[y])}if(P){var ye=le,me=Math.random()*(k>0?k:ye);for(y=0;y<j;y++)te[3*y+1]=ye,te[3*y+2]=me}var ve=new p.a;ve.position=new s.o({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:K}),ve.prevPosition=new s.o({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:Q}),ve.nextPosition=new s.o({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:X}),ve.expandAndWidth=new s.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:Z}),_.st&&(ve.st=new s.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:$})),e.e(ee)&&(ve.color=new s.o({componentDatatype:l.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:ee,normalize:!0})),P&&(ve.dist=new s.o({componentDatatype:l.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:te}));var we=d.IndexDatatype.createTypedArray(j,6*C-6),_e=0,ge=0,be=C-1;for(y=0;y<be;++y)we[ge++]=_e,we[ge++]=_e+2,we[ge++]=_e+1,we[ge++]=_e+1,we[ge++]=_e+2,we[ge++]=_e+3,_e+=4;return new s.I({attributes:ve,indices:we,primitiveType:f._0x3b3836.TRIANGLES,boundingSphere:a.i.fromPoints(T),geometryType:s.Me.POLYLINES})}},function(o,r){return e.e(r)&&(o=P.unpack(o,r)),o._ellipsoid=t.t.clone(o._ellipsoid),P.createGeometry(o)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createPolylineVolumeGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createPolylineVolumeGeometry.js index 5b15708c..360dc1bc 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createPolylineVolumeGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createPolylineVolumeGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./Cartesian2-b72655a5","./arrayRemoveDuplicates-a6924649","./BoundingRectangle-82c0e2a7","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./PolylineVolumeGeometryLibrary-d96626d0","./Check-52a7d806","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryPipeline-7ffd3f60","./IndexDatatype-86677ec4","./Math-ecf82623","./PolygonPipeline-425528b3","./FeatureDetection-cec0163f","./VertexFormat-f496a3f1","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidTangentPlane-d6b88a1f","./IntersectionTests-6e80d61c","./Plane-33393da8","./PolylinePipeline-f0970409","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b"],(function(e,t,n,o,a,r,i,s,p,c,l,u,d,h,y,g,m,f,v,b,k,_,P,L,w,C,E,A,D,T){"use strict";function F(n){var o=(n=e.u(n,e.u.EMPTY_OBJECT)).polylinePositions,a=n.shapePositions;if(!e.e(o))throw new p.t("options.polylinePositions is required.");if(!e.e(a))throw new p.t("options.shapePositions is required.");this._positions=o,this._shape=a,this._ellipsoid=t.t.clone(e.u(n.ellipsoid,t.t.WGS84)),this._cornerType=e.u(n.cornerType,s.S.ROUNDED),this._vertexFormat=m.n.clone(e.u(n.vertexFormat,m.n.DEFAULT)),this._granularity=e.u(n.granularity,h.e.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry",this.enuCenter=e.u(n.enuCenter,r.o.ZERO);var i=1+o.length*r.o.packedLength;i+=1+a.length*t.o.packedLength+r.o.packedLength,this.packedLength=i+t.t.packedLength+m.n.packedLength+2}F.pack=function(n,o,a){if(!e.e(n))throw new p.t("value is required");if(!e.e(o))throw new p.t("array is required");a=e.u(a,0);var i,s=n._positions,c=s.length;for(o[a++]=c,i=0;i<c;++i,a+=r.o.packedLength)r.o.pack(s[i],o,a);var l=n._shape;for(c=l.length,o[a++]=c,i=0;i<c;++i,a+=t.o.packedLength)t.o.pack(l[i],o,a);return t.t.pack(n._ellipsoid,o,a),a+=t.t.packedLength,m.n.pack(n._vertexFormat,o,a),a+=m.n.packedLength,o[a++]=n._cornerType,o[a++]=n._granularity,r.o.pack(n.enuCenter,o,a),o};var G=t.t.clone(t.t.UNIT_SPHERE),R=new m.n,x={polylinePositions:void 0,shapePositions:void 0,ellipsoid:G,vertexFormat:R,cornerType:void 0,granularity:void 0,enuCenter:void 0};F.unpack=function(n,o,a){if(!e.e(n))throw new p.t("array is required");o=e.u(o,0);var i,s=n[o++],c=new Array(s);for(i=0;i<s;++i,o+=r.o.packedLength)c[i]=r.o.unpack(n,o);s=n[o++];var l=new Array(s);for(i=0;i<s;++i,o+=t.o.packedLength)l[i]=t.o.unpack(n,o);var u=t.t.unpack(n,o,G);o+=t.t.packedLength;var d=m.n.unpack(n,o,R);o+=m.n.packedLength;var h,y=n[o++],g=n[o++];return h=r.o.unpack(n,o),e.e(a)?(a._positions=c,a._shape=l,a._ellipsoid=t.t.clone(u,a._ellipsoid),a._vertexFormat=m.n.clone(d,a._vertexFormat),a._cornerType=y,a._granularity=g,a.enuCenter=h,a):(x.polylinePositions=c,x.shapePositions=l,x.cornerType=y,x.granularity=g,x.enuCenter=h,new F(x))};var O=new o.f;return F.createGeometry=function(t){for(var p=t._positions,h=n.D(p,r.o.equalsEpsilon),m=h.length,f=new Array(m),v=0;v<m;v++)f[v]=r.o.clone(h[v]);var b=t._shape;if(b=s.J.removeDuplicatesFromShape(b),!(h.length<2||b.length<3)){y.A.computeWindingOrder2D(b)===y.W.CLOCKWISE&&b.reverse();var k=o.f.fromPoints(b,O),_={};if(_.combinedPositions=s.J.computePositions(f,b,k,t,!0),!r.o.equals(t.enuCenter,r.o.ZERO)){var P=new Array(m);for(v=0;v<m;v++)P[v]=r.o.clone(h[v]);_.combinedLocalPositions=s.J.computeLocalPositions(P,b,k,t,!0,t.enuCenter)}return function(t,n,o,r){var s=t.combinedPositions,p=t.combinedLocalPositions,h=new l.a;r.position&&(h.position=new c.o({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:s}));var m,f,v,b,k,_,P=n.length,L=s.length/3,w=(L-2*P)/(2*P),C=y.A.triangulate(n),E=(w-1)*P*6+2*C.length,A=d.IndexDatatype.createTypedArray(L,E),D=2*P,T=0;for(m=0;m<w-1;m++){for(f=0;f<P-1;f++)_=(v=2*f+m*P*2)+D,k=(b=v+1)+D,A[T++]=b,A[T++]=v,A[T++]=k,A[T++]=k,A[T++]=v,A[T++]=_;k=(b=1+(v=2*P-2+m*P*2))+D,_=v+D,A[T++]=b,A[T++]=v,A[T++]=k,A[T++]=k,A[T++]=v,A[T++]=_}if(r.st||r.tangent||r.bitangent){var F,G,R=new Float32Array(2*L),x=1/(w-1),O=1/o.height,I=o.height/2,S=0;for(m=0;m<w;m++){for(F=m*x,G=O*(n[0].y+I),R[S++]=F,R[S++]=G,f=1;f<P;f++)G=O*(n[f].y+I),R[S++]=F,R[S++]=G,R[S++]=F,R[S++]=G;G=O*(n[0].y+I),R[S++]=F,R[S++]=G}for(f=0;f<P;f++)F=0,G=O*(n[f].y+I),R[S++]=F,R[S++]=G;for(f=0;f<P;f++)F=(w-1)*x,G=O*(n[f].y+I),R[S++]=F,R[S++]=G;h.st=new c.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(R)})}var q=L-2*P;for(m=0;m<C.length;m+=3){var N=C[m]+q,U=C[m+1]+q,W=C[m+2]+q;A[T++]=N,A[T++]=U,A[T++]=W,A[T++]=W+P,A[T++]=U+P,A[T++]=N+P}var B=new c.I({attributes:h,indices:A,boundingSphere:a.i.fromVertices(s),primitiveType:g._0x4b6a27.TRIANGLES});if(r.normal&&(B=u.k.computeNormal(B)),r.tangent||r.bitangent){try{B=u.k.computeTangentAndBitangent(B)}catch{a.e("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}r.tangent||(B.attributes.tangent=void 0),r.bitangent||(B.attributes.bitangent=void 0),r.st||(B.attributes.st=void 0)}return e.e(p)&&(B.attributes.position.values=p,B.attributes.position.componentDatatype=i.ComponentDatatype.FLOAT),B}(_,b,k,t._vertexFormat)}},function(n,o){return e.e(o)&&(n=F.unpack(n,o)),n._ellipsoid=t.t.clone(n._ellipsoid),F.createGeometry(n)}})); +define(["./when-92c6cf3c","./Cartesian2-b72655a5","./arrayRemoveDuplicates-a6924649","./BoundingRectangle-44af9dd4","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./PolylineVolumeGeometryLibrary-3011fdb7","./Check-52a7d806","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryPipeline-50805727","./IndexDatatype-86677ec4","./Math-ecf82623","./PolygonPipeline-c329dec3","./FeatureDetection-fd297af4","./VertexFormat-f496a3f1","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidTangentPlane-c500945e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./PolylinePipeline-160fa1b0","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b"],(function(e,t,n,o,a,r,i,s,p,c,l,u,d,h,y,g,m,f,v,b,k,_,P,L,w,C,E,A,D,T){"use strict";function F(n){var o=(n=e.u(n,e.u.EMPTY_OBJECT)).polylinePositions,a=n.shapePositions;if(!e.e(o))throw new p.t("options.polylinePositions is required.");if(!e.e(a))throw new p.t("options.shapePositions is required.");this._positions=o,this._shape=a,this._ellipsoid=t.t.clone(e.u(n.ellipsoid,t.t.WGS84)),this._cornerType=e.u(n.cornerType,s.S.ROUNDED),this._vertexFormat=m.n.clone(e.u(n.vertexFormat,m.n.DEFAULT)),this._granularity=e.u(n.granularity,h.e.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry",this.enuCenter=e.u(n.enuCenter,r.o.ZERO);var i=1+o.length*r.o.packedLength;i+=1+a.length*t.o.packedLength+r.o.packedLength,this.packedLength=i+t.t.packedLength+m.n.packedLength+2}F.pack=function(n,o,a){if(!e.e(n))throw new p.t("value is required");if(!e.e(o))throw new p.t("array is required");a=e.u(a,0);var i,s=n._positions,c=s.length;for(o[a++]=c,i=0;i<c;++i,a+=r.o.packedLength)r.o.pack(s[i],o,a);var l=n._shape;for(c=l.length,o[a++]=c,i=0;i<c;++i,a+=t.o.packedLength)t.o.pack(l[i],o,a);return t.t.pack(n._ellipsoid,o,a),a+=t.t.packedLength,m.n.pack(n._vertexFormat,o,a),a+=m.n.packedLength,o[a++]=n._cornerType,o[a++]=n._granularity,r.o.pack(n.enuCenter,o,a),o};var G=t.t.clone(t.t.UNIT_SPHERE),R=new m.n,x={polylinePositions:void 0,shapePositions:void 0,ellipsoid:G,vertexFormat:R,cornerType:void 0,granularity:void 0,enuCenter:void 0};F.unpack=function(n,o,a){if(!e.e(n))throw new p.t("array is required");o=e.u(o,0);var i,s=n[o++],c=new Array(s);for(i=0;i<s;++i,o+=r.o.packedLength)c[i]=r.o.unpack(n,o);s=n[o++];var l=new Array(s);for(i=0;i<s;++i,o+=t.o.packedLength)l[i]=t.o.unpack(n,o);var u=t.t.unpack(n,o,G);o+=t.t.packedLength;var d=m.n.unpack(n,o,R);o+=m.n.packedLength;var h,y=n[o++],g=n[o++];return h=r.o.unpack(n,o),e.e(a)?(a._positions=c,a._shape=l,a._ellipsoid=t.t.clone(u,a._ellipsoid),a._vertexFormat=m.n.clone(d,a._vertexFormat),a._cornerType=y,a._granularity=g,a.enuCenter=h,a):(x.polylinePositions=c,x.shapePositions=l,x.cornerType=y,x.granularity=g,x.enuCenter=h,new F(x))};var O=new o.f;return F.createGeometry=function(t){for(var p=t._positions,h=n.D(p,r.o.equalsEpsilon),m=h.length,f=new Array(m),v=0;v<m;v++)f[v]=r.o.clone(h[v]);var b=t._shape;if(b=s.J.removeDuplicatesFromShape(b),!(h.length<2||b.length<3)){y.A.computeWindingOrder2D(b)===y.W.CLOCKWISE&&b.reverse();var k=o.f.fromPoints(b,O),_={};if(_.combinedPositions=s.J.computePositions(f,b,k,t,!0),!r.o.equals(t.enuCenter,r.o.ZERO)){var P=new Array(m);for(v=0;v<m;v++)P[v]=r.o.clone(h[v]);_.combinedLocalPositions=s.J.computeLocalPositions(P,b,k,t,!0,t.enuCenter)}return function(t,n,o,r){var s=t.combinedPositions,p=t.combinedLocalPositions,h=new l.a;r.position&&(h.position=new c.o({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:s}));var m,f,v,b,k,_,P=n.length,L=s.length/3,w=(L-2*P)/(2*P),C=y.A.triangulate(n),E=(w-1)*P*6+2*C.length,A=d.IndexDatatype.createTypedArray(L,E),D=2*P,T=0;for(m=0;m<w-1;m++){for(f=0;f<P-1;f++)_=(v=2*f+m*P*2)+D,k=(b=v+1)+D,A[T++]=b,A[T++]=v,A[T++]=k,A[T++]=k,A[T++]=v,A[T++]=_;k=(b=1+(v=2*P-2+m*P*2))+D,_=v+D,A[T++]=b,A[T++]=v,A[T++]=k,A[T++]=k,A[T++]=v,A[T++]=_}if(r.st||r.tangent||r.bitangent){var F,G,R=new Float32Array(2*L),x=1/(w-1),O=1/o.height,I=o.height/2,S=0;for(m=0;m<w;m++){for(F=m*x,G=O*(n[0].y+I),R[S++]=F,R[S++]=G,f=1;f<P;f++)G=O*(n[f].y+I),R[S++]=F,R[S++]=G,R[S++]=F,R[S++]=G;G=O*(n[0].y+I),R[S++]=F,R[S++]=G}for(f=0;f<P;f++)F=0,G=O*(n[f].y+I),R[S++]=F,R[S++]=G;for(f=0;f<P;f++)F=(w-1)*x,G=O*(n[f].y+I),R[S++]=F,R[S++]=G;h.st=new c.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(R)})}var q=L-2*P;for(m=0;m<C.length;m+=3){var N=C[m]+q,U=C[m+1]+q,W=C[m+2]+q;A[T++]=N,A[T++]=U,A[T++]=W,A[T++]=W+P,A[T++]=U+P,A[T++]=N+P}var B=new c.I({attributes:h,indices:A,boundingSphere:a.i.fromVertices(s),primitiveType:g._0x3b3836.TRIANGLES});if(r.normal&&(B=u.k.computeNormal(B)),r.tangent||r.bitangent){try{B=u.k.computeTangentAndBitangent(B)}catch{a.e("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}r.tangent||(B.attributes.tangent=void 0),r.bitangent||(B.attributes.bitangent=void 0),r.st||(B.attributes.st=void 0)}return e.e(p)&&(B.attributes.position.values=p,B.attributes.position.componentDatatype=i.ComponentDatatype.FLOAT),B}(_,b,k,t._vertexFormat)}},function(n,o){return e.e(o)&&(n=F.unpack(n,o)),n._ellipsoid=t.t.clone(n._ellipsoid),F.createGeometry(n)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createPolylineVolumeOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createPolylineVolumeOutlineGeometry.js index 0fb8aed9..99a9771f 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createPolylineVolumeOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createPolylineVolumeOutlineGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./Cartesian2-b72655a5","./arrayRemoveDuplicates-a6924649","./BoundingRectangle-82c0e2a7","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./PolylineVolumeGeometryLibrary-d96626d0","./Check-52a7d806","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./IndexDatatype-86677ec4","./Math-ecf82623","./PolygonPipeline-425528b3","./FeatureDetection-cec0163f","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidTangentPlane-d6b88a1f","./IntersectionTests-6e80d61c","./Plane-33393da8","./PolylinePipeline-f0970409","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,i,n,o,r,a,s,p,l,c,u,d,h,y,f,g,v,_,m,P,k,b,w,E,D){"use strict";function L(i){var n=(i=e.u(i,e.u.EMPTY_OBJECT)).polylinePositions,o=i.shapePositions;if(!e.e(n))throw new p.t("options.polylinePositions is required.");if(!e.e(o))throw new p.t("options.shapePositions is required.");this._positions=n,this._shape=o,this._ellipsoid=t.t.clone(e.u(i.ellipsoid,t.t.WGS84)),this._cornerType=e.u(i.cornerType,s.S.ROUNDED),this._granularity=e.u(i.granularity,d.e.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";var a=1+n.length*r.o.packedLength;a+=1+o.length*t.o.packedLength,this.packedLength=a+t.t.packedLength+2}L.pack=function(i,n,o){if(!e.e(i))throw new p.t("value is required");if(!e.e(n))throw new p.t("array is required");o=e.u(o,0);var a,s=i._positions,l=s.length;for(n[o++]=l,a=0;a<l;++a,o+=r.o.packedLength)r.o.pack(s[a],n,o);var c=i._shape;for(l=c.length,n[o++]=l,a=0;a<l;++a,o+=t.o.packedLength)t.o.pack(c[a],n,o);return t.t.pack(i._ellipsoid,n,o),o+=t.t.packedLength,n[o++]=i._cornerType,n[o]=i._granularity,n};var T=t.t.clone(t.t.UNIT_SPHERE),C={polylinePositions:void 0,shapePositions:void 0,ellipsoid:T,height:void 0,cornerType:void 0,granularity:void 0};L.unpack=function(i,n,o){if(!e.e(i))throw new p.t("array is required");n=e.u(n,0);var a,s=i[n++],l=new Array(s);for(a=0;a<s;++a,n+=r.o.packedLength)l[a]=r.o.unpack(i,n);s=i[n++];var c=new Array(s);for(a=0;a<s;++a,n+=t.o.packedLength)c[a]=t.o.unpack(i,n);var u=t.t.unpack(i,n,T);n+=t.t.packedLength;var d=i[n++],h=i[n];return e.e(o)?(o._positions=l,o._shape=c,o._ellipsoid=t.t.clone(u,o._ellipsoid),o._cornerType=d,o._granularity=h,o):(C.polylinePositions=l,C.shapePositions=c,C.cornerType=d,C.granularity=h,new L(C))};var A=new n.f;return L.createGeometry=function(e){var t=e._positions,p=i.D(t,r.o.equalsEpsilon),d=e._shape;if(d=s.J.removeDuplicatesFromShape(d),!(p.length<2||d.length<3)){h.A.computeWindingOrder2D(d)===h.W.CLOCKWISE&&d.reverse();var f=n.f.fromPoints(d,A);return function(e,t){var i=new c.a;i.position=new l.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e});var n,r,s=t.length,p=i.position.values.length/3,d=e.length/3/s,h=u.IndexDatatype.createTypedArray(p,2*s*(d+1)),f=0,g=(n=0)*s;for(r=0;r<s-1;r++)h[f++]=r+g,h[f++]=r+g+1;for(h[f++]=s-1+g,h[f++]=g,g=(n=d-1)*s,r=0;r<s-1;r++)h[f++]=r+g,h[f++]=r+g+1;for(h[f++]=s-1+g,h[f++]=g,n=0;n<d-1;n++){var v=s*n,_=v+s;for(r=0;r<s;r++)h[f++]=r+v,h[f++]=r+_}return new l.I({attributes:i,indices:u.IndexDatatype.createTypedArray(p,h),boundingSphere:o.i.fromVertices(e),primitiveType:y._0x4b6a27.LINES})}(s.J.computePositions(p,d,f,e,!1),d)}},function(i,n){return e.e(n)&&(i=L.unpack(i,n)),i._ellipsoid=t.t.clone(i._ellipsoid),L.createGeometry(i)}})); +define(["./when-92c6cf3c","./Cartesian2-b72655a5","./arrayRemoveDuplicates-a6924649","./BoundingRectangle-44af9dd4","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./PolylineVolumeGeometryLibrary-3011fdb7","./Check-52a7d806","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./IndexDatatype-86677ec4","./Math-ecf82623","./PolygonPipeline-c329dec3","./FeatureDetection-fd297af4","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidTangentPlane-c500945e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./PolylinePipeline-160fa1b0","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,i,n,o,r,a,s,p,c,l,d,u,h,y,f,g,v,_,m,P,k,b,w,E,D){"use strict";function L(i){var n=(i=e.u(i,e.u.EMPTY_OBJECT)).polylinePositions,o=i.shapePositions;if(!e.e(n))throw new p.t("options.polylinePositions is required.");if(!e.e(o))throw new p.t("options.shapePositions is required.");this._positions=n,this._shape=o,this._ellipsoid=t.t.clone(e.u(i.ellipsoid,t.t.WGS84)),this._cornerType=e.u(i.cornerType,s.S.ROUNDED),this._granularity=e.u(i.granularity,u.e.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";var a=1+n.length*r.o.packedLength;a+=1+o.length*t.o.packedLength,this.packedLength=a+t.t.packedLength+2}L.pack=function(i,n,o){if(!e.e(i))throw new p.t("value is required");if(!e.e(n))throw new p.t("array is required");o=e.u(o,0);var a,s=i._positions,c=s.length;for(n[o++]=c,a=0;a<c;++a,o+=r.o.packedLength)r.o.pack(s[a],n,o);var l=i._shape;for(c=l.length,n[o++]=c,a=0;a<c;++a,o+=t.o.packedLength)t.o.pack(l[a],n,o);return t.t.pack(i._ellipsoid,n,o),o+=t.t.packedLength,n[o++]=i._cornerType,n[o]=i._granularity,n};var T=t.t.clone(t.t.UNIT_SPHERE),C={polylinePositions:void 0,shapePositions:void 0,ellipsoid:T,height:void 0,cornerType:void 0,granularity:void 0};L.unpack=function(i,n,o){if(!e.e(i))throw new p.t("array is required");n=e.u(n,0);var a,s=i[n++],c=new Array(s);for(a=0;a<s;++a,n+=r.o.packedLength)c[a]=r.o.unpack(i,n);s=i[n++];var l=new Array(s);for(a=0;a<s;++a,n+=t.o.packedLength)l[a]=t.o.unpack(i,n);var d=t.t.unpack(i,n,T);n+=t.t.packedLength;var u=i[n++],h=i[n];return e.e(o)?(o._positions=c,o._shape=l,o._ellipsoid=t.t.clone(d,o._ellipsoid),o._cornerType=u,o._granularity=h,o):(C.polylinePositions=c,C.shapePositions=l,C.cornerType=u,C.granularity=h,new L(C))};var A=new n.f;return L.createGeometry=function(e){var t=e._positions,p=i.D(t,r.o.equalsEpsilon),u=e._shape;if(u=s.J.removeDuplicatesFromShape(u),!(p.length<2||u.length<3)){h.A.computeWindingOrder2D(u)===h.W.CLOCKWISE&&u.reverse();var f=n.f.fromPoints(u,A);return function(e,t){var i=new l.a;i.position=new c.o({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e});var n,r,s=t.length,p=i.position.values.length/3,u=e.length/3/s,h=d.IndexDatatype.createTypedArray(p,2*s*(u+1)),f=0,g=(n=0)*s;for(r=0;r<s-1;r++)h[f++]=r+g,h[f++]=r+g+1;for(h[f++]=s-1+g,h[f++]=g,g=(n=u-1)*s,r=0;r<s-1;r++)h[f++]=r+g,h[f++]=r+g+1;for(h[f++]=s-1+g,h[f++]=g,n=0;n<u-1;n++){var v=s*n,_=v+s;for(r=0;r<s;r++)h[f++]=r+v,h[f++]=r+_}return new c.I({attributes:i,indices:d.IndexDatatype.createTypedArray(p,h),boundingSphere:o.i.fromVertices(e),primitiveType:y._0x3b3836.LINES})}(s.J.computePositions(p,u,f,e,!1),u)}},function(i,n){return e.e(n)&&(i=L.unpack(i,n)),i._ellipsoid=t.t.clone(i._ellipsoid),L.createGeometry(i)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createRectangleGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createRectangleGeometry.js index bc0d7d0e..df8335c8 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createRectangleGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createRectangleGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./Cartesian2-b72655a5","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./ComponentDatatype-98414d16","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryInstance-3190c1b4","./GeometryOffsetAttribute-b4d599f5","./GeometryPipeline-7ffd3f60","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-cec0163f","./PolygonPipeline-425528b3","./RectangleGeometryLibrary-4696cd68","./VertexFormat-f496a3f1","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./IntersectionTests-6e80d61c","./Plane-33393da8","./EllipsoidRhumbLine-b1a766ae"],(function(t,e,a,o,n,r,i,s,u,l,c,p,d,g,h,m,f,v,y,b,_,w,A,x,E,D,F,P){"use strict";var R=new n.o,L=new n.o,C=new n.o,T=new n.o,O=new e.h,N=new e.o,I=new o.i,k=new o.i;function S(t,e){var a=new u.I({attributes:new l.a,primitiveType:m._0x4b6a27.TRIANGLES});return a.attributes.position=new u.o({componentDatatype:s.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(a.attributes.normal=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(a.attributes.tangent=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(a.attributes.bitangent=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),a}var z=new n.o,G=new n.o;function M(t,e){var a=t._vertexFormat,o=t._ellipsoid,r=e.height,i=e.width,l=e.northCap,c=e.southCap,p=0,d=r,h=r,f=0;l&&(p=1,h-=1,f+=1),c&&(d-=1,h-=1,f+=1),f+=i*h;for(var y=a.position?new Float64Array(3*f):void 0,b=a.st?new Float32Array(2*f):void 0,_=0,w=0,A=R,x=N,E=Number.MAX_VALUE,D=Number.MAX_VALUE,F=-Number.MAX_VALUE,P=-Number.MAX_VALUE,O=p;O<d;++O)for(var I=0;I<i;++I)v.j.computePosition(e,o,a.st,O,I,A,x),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z,a.st&&(b[w++]=x.x,b[w++]=x.y,E=Math.min(E,x.x),D=Math.min(D,x.y),F=Math.max(F,x.x),P=Math.max(P,x.y));if(l&&(v.j.computePosition(e,o,a.st,0,0,A,x),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z,a.st&&(b[w++]=x.x,b[w++]=x.y,E=x.x,D=x.y,F=x.x,P=x.y)),c&&(v.j.computePosition(e,o,a.st,r-1,0,A,x),y[_++]=A.x,y[_++]=A.y,y[_]=A.z,a.st&&(b[w++]=x.x,b[w]=x.y,E=Math.min(E,x.x),D=Math.min(D,x.y),F=Math.max(F,x.x),P=Math.max(P,x.y))),a.st&&(E<0||D<0||F>1||P>1))for(var k=0;k<b.length;k+=2)b[k]=(b[k]-E)/(F-E),b[k+1]=(b[k+1]-D)/(P-D);var z=function(t,e,a,o){var r=t.length,i=e.normal?new Float32Array(r):void 0,s=e.tangent?new Float32Array(r):void 0,u=e.bitangent?new Float32Array(r):void 0,l=0,c=T,p=C,d=L;if(e.normal||e.tangent||e.bitangent)for(var g=0;g<r;g+=3){var h=n.o.fromArray(t,g,R),f=l+1,v=l+2;d=a.geodeticSurfaceNormal(h,d),(e.tangent||e.bitangent)&&(n.o.cross(n.o.UNIT_Z,d,p),m.p$1.multiplyByVector(o,p,p),n.o.normalize(p,p),e.bitangent&&n.o.normalize(n.o.cross(d,p,c),c)),e.normal&&(i[l]=d.x,i[f]=d.y,i[v]=d.z),e.tangent&&(s[l]=p.x,s[f]=p.y,s[v]=p.z),e.bitangent&&(u[l]=c.x,u[f]=c.y,u[v]=c.z),l+=3}return S(e,{positions:t,normals:i,tangents:s,bitangents:u})}(y,a,o,e.tangentRotationMatrix),G=6*(i-1)*(h-1);l&&(G+=3*(i-1)),c&&(G+=3*(i-1));var M,H=g.IndexDatatype.createTypedArray(f,G),V=0,U=0;for(M=0;M<h-1;++M){for(var j=0;j<i-1;++j){var B=V,q=B+i,Y=q+1,$=B+1;H[U++]=B,H[U++]=q,H[U++]=$,H[U++]=$,H[U++]=q,H[U++]=Y,++V}++V}if(l||c){var X,W,J=f-1,Q=f-1;if(l&&c&&(J=f-2),V=0,l)for(M=0;M<i-1;M++)W=(X=V)+1,H[U++]=J,H[U++]=X,H[U++]=W,++V;if(c)for(V=(h-1)*i,M=0;M<i-1;M++)W=(X=V)+1,H[U++]=X,H[U++]=Q,H[U++]=W,++V}return z.indices=H,a.st&&(z.attributes.st=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:b})),z}function H(t,e,a,o,n){return t[e++]=o[a],t[e++]=o[a+1],t[e++]=o[a+2],t[e++]=n[a],t[e++]=n[a+1],t[e]=n[a+2],t}function V(t,e,a,o){return t[e++]=o[a],t[e++]=o[a+1],t[e++]=o[a],t[e]=o[a+1],t}var U=new y.n;function j(e,o){var r,i=e._shadowVolume,l=e._offsetAttribute,m=e._vertexFormat,v=e._extrudedHeight,b=e._surfaceHeight,_=e._ellipsoid,w=o.height,A=o.width;if(i){var x=y.n.clone(m,U);x.normal=!0,e._vertexFormat=x}var E=M(e,o);i&&(e._vertexFormat=m);var D=f.A.scaleToGeodeticHeight(E.attributes.position.values,b,_,!1),F=(D=new Float64Array(D)).length,P=2*F,O=new Float64Array(P);O.set(D);var N=f.A.scaleToGeodeticHeight(E.attributes.position.values,v,_);O.set(N,F),E.attributes.position.values=O;var I,k,j=m.normal?new Float32Array(P):void 0,B=m.tangent?new Float32Array(P):void 0,q=m.bitangent?new Float32Array(P):void 0,Y=m.st?new Float32Array(P/3*2):void 0;if(m.normal){for(k=E.attributes.normal.values,j.set(k),r=0;r<F;r++)k[r]=-k[r];j.set(k,F),E.attributes.normal.values=j}if(i){k=E.attributes.normal.values,m.normal||(E.attributes.normal=void 0);var $=new Float32Array(P);for(r=0;r<F;r++)k[r]=-k[r];$.set(k,F),E.attributes.extrudeDirection=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:$})}var X,W=t.e(l);if(W){var J=F/3*2,Q=new Uint8Array(J);l===p.z.TOP?Q=a.d(Q,1,0,J/2):(X=l===p.z.NONE?0:1,Q=a.d(Q,X)),E.attributes.applyOffset=new u.o({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:Q})}if(m.tangent){var Z=E.attributes.tangent.values;for(B.set(Z),r=0;r<F;r++)Z[r]=-Z[r];B.set(Z,F),E.attributes.tangent.values=B}if(m.bitangent){var K=E.attributes.bitangent.values;q.set(K),q.set(K,F),E.attributes.bitangent.values=q}m.st&&(I=E.attributes.st.values,Y.set(I),Y.set(I,F/3*2),E.attributes.st.values=Y);var tt=E.indices,et=tt.length,at=F/3,ot=g.IndexDatatype.createTypedArray(P/3,2*et);for(ot.set(tt),r=0;r<et;r+=3)ot[r+et]=tt[r+2]+at,ot[r+1+et]=tt[r+1]+at,ot[r+2+et]=tt[r]+at;E.indices=ot;var nt=o.northCap,rt=o.southCap,it=w,st=2,ut=0,lt=4,ct=4;nt&&(st-=1,it-=1,ut+=1,lt-=2,ct-=1),rt&&(st-=1,it-=1,ut+=1,lt-=2,ct-=1);var pt=2*((ut+=st*A+2*it-lt)+ct),dt=new Float64Array(3*pt),gt=i?new Float32Array(3*pt):void 0,ht=W?new Uint8Array(pt):void 0,mt=m.st?new Float32Array(2*pt):void 0,ft=l===p.z.TOP;W&&!ft&&(X=l===p.z.ALL?1:0,ht=a.d(ht,X));var vt,yt=0,bt=0,_t=0,wt=0,At=A*it;for(r=0;r<At;r+=A)dt=H(dt,yt,vt=3*r,D,N),yt+=6,m.st&&(mt=V(mt,bt,2*r,I),bt+=4),i&&(_t+=3,gt[_t++]=k[vt],gt[_t++]=k[vt+1],gt[_t++]=k[vt+2]),ft&&(ht[wt++]=1,wt+=1);if(rt){var xt=nt?At+1:At;for(vt=3*xt,r=0;r<2;r++)dt=H(dt,yt,vt,D,N),yt+=6,m.st&&(mt=V(mt,bt,2*xt,I),bt+=4),i&&(_t+=3,gt[_t++]=k[vt],gt[_t++]=k[vt+1],gt[_t++]=k[vt+2]),ft&&(ht[wt++]=1,wt+=1)}else for(r=At-A;r<At;r++)dt=H(dt,yt,vt=3*r,D,N),yt+=6,m.st&&(mt=V(mt,bt,2*r,I),bt+=4),i&&(_t+=3,gt[_t++]=k[vt],gt[_t++]=k[vt+1],gt[_t++]=k[vt+2]),ft&&(ht[wt++]=1,wt+=1);for(r=At-1;r>0;r-=A)dt=H(dt,yt,vt=3*r,D,N),yt+=6,m.st&&(mt=V(mt,bt,2*r,I),bt+=4),i&&(_t+=3,gt[_t++]=k[vt],gt[_t++]=k[vt+1],gt[_t++]=k[vt+2]),ft&&(ht[wt++]=1,wt+=1);if(nt){var Et=At;for(vt=3*Et,r=0;r<2;r++)dt=H(dt,yt,vt,D,N),yt+=6,m.st&&(mt=V(mt,bt,2*Et,I),bt+=4),i&&(_t+=3,gt[_t++]=k[vt],gt[_t++]=k[vt+1],gt[_t++]=k[vt+2]),ft&&(ht[wt++]=1,wt+=1)}else for(r=A-1;r>=0;r--)dt=H(dt,yt,vt=3*r,D,N),yt+=6,m.st&&(mt=V(mt,bt,2*r,I),bt+=4),i&&(_t+=3,gt[_t++]=k[vt],gt[_t++]=k[vt+1],gt[_t++]=k[vt+2]),ft&&(ht[wt++]=1,wt+=1);var Dt=function(t,e,a){var o=t.length,r=e.normal?new Float32Array(o):void 0,i=e.tangent?new Float32Array(o):void 0,s=e.bitangent?new Float32Array(o):void 0,u=0,l=0,c=0,p=!0,d=T,g=C,m=L;if(e.normal||e.tangent||e.bitangent)for(var f=0;f<o;f+=6){var v=n.o.fromArray(t,f,R),y=n.o.fromArray(t,(f+6)%o,z);if(p){var b=n.o.fromArray(t,(f+3)%o,G);n.o.subtract(y,v,y),n.o.subtract(b,v,b),m=n.o.normalize(n.o.cross(b,y,m),m),p=!1}n.o.equalsEpsilon(y,v,h.e.EPSILON10)&&(p=!0),(e.tangent||e.bitangent)&&(d=a.geodeticSurfaceNormal(v,d),e.tangent&&(g=n.o.normalize(n.o.cross(d,m,g),g))),e.normal&&(r[u++]=m.x,r[u++]=m.y,r[u++]=m.z,r[u++]=m.x,r[u++]=m.y,r[u++]=m.z),e.tangent&&(i[l++]=g.x,i[l++]=g.y,i[l++]=g.z,i[l++]=g.x,i[l++]=g.y,i[l++]=g.z),e.bitangent&&(s[c++]=d.x,s[c++]=d.y,s[c++]=d.z,s[c++]=d.x,s[c++]=d.y,s[c++]=d.z)}return S(e,{positions:t,normals:r,tangents:i,bitangents:s})}(dt,m,_);m.st&&(Dt.attributes.st=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:mt})),i&&(Dt.attributes.extrudeDirection=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:gt})),W&&(Dt.attributes.applyOffset=new u.o({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:ht}));var Ft,Pt,Rt,Lt,Ct=g.IndexDatatype.createTypedArray(pt,6*ut);F=dt.length/3;var Tt=0;for(r=0;r<F-1;r+=2){Lt=((Ft=r)+2)%F;var Ot=n.o.fromArray(dt,3*Ft,z),Nt=n.o.fromArray(dt,3*Lt,G);n.o.equalsEpsilon(Ot,Nt,h.e.EPSILON10)||(Rt=((Pt=(Ft+1)%F)+2)%F,Ct[Tt++]=Ft,Ct[Tt++]=Pt,Ct[Tt++]=Lt,Ct[Tt++]=Lt,Ct[Tt++]=Pt,Ct[Tt++]=Rt)}return Dt.indices=Ct,(Dt=d.k.combineInstances([new c.d({geometry:E}),new c.d({geometry:Dt})]))[0]}var B=[new n.o,new n.o,new n.o,new n.o],q=new r.a,Y=new r.a;function $(t,a,o,n,r){if(0===o)return e.h.clone(t,r);var i=v.j.computeOptions(t,a,o,0,O,q),s=i.height,u=i.width,l=B;return v.j.computePosition(i,n,!1,0,0,l[0]),v.j.computePosition(i,n,!1,0,u-1,l[1]),v.j.computePosition(i,n,!1,s-1,0,l[2]),v.j.computePosition(i,n,!1,s-1,u-1,l[3]),e.h.fromCartesianArray(l,n,r)}function X(a){var o=(a=t.u(a,t.u.EMPTY_OBJECT)).rectangle;if(i.o.typeOf.object("rectangle",o),e.h.validate(o),o.north<o.south)throw new i.t("options.rectangle.north must be greater than or equal to options.rectangle.south");var n=t.u(a.height,0),r=t.u(a.extrudedHeight,n);this._rectangle=e.h.clone(o),this._granularity=t.u(a.granularity,h.e.RADIANS_PER_DEGREE),this._ellipsoid=e.t.clone(t.u(a.ellipsoid,e.t.WGS84)),this._surfaceHeight=Math.max(n,r),this._rotation=t.u(a.rotation,0),this._stRotation=t.u(a.stRotation,0),this._vertexFormat=y.n.clone(t.u(a.vertexFormat,y.n.DEFAULT)),this._extrudedHeight=Math.min(n,r),this._shadowVolume=t.u(a.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=a.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}X.packedLength=e.h.packedLength+e.t.packedLength+y.n.packedLength+7,X.pack=function(a,o,n){return i.o.typeOf.object("value",a),i.o.defined("array",o),n=t.u(n,0),e.h.pack(a._rectangle,o,n),n+=e.h.packedLength,e.t.pack(a._ellipsoid,o,n),n+=e.t.packedLength,y.n.pack(a._vertexFormat,o,n),n+=y.n.packedLength,o[n++]=a._granularity,o[n++]=a._surfaceHeight,o[n++]=a._rotation,o[n++]=a._stRotation,o[n++]=a._extrudedHeight,o[n++]=a._shadowVolume?1:0,o[n]=t.u(a._offsetAttribute,-1),o};var W=new e.h,J=e.t.clone(e.t.UNIT_SPHERE),Q={rectangle:W,ellipsoid:J,vertexFormat:U,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};X.unpack=function(a,o,n){i.o.defined("array",a),o=t.u(o,0);var r=e.h.unpack(a,o,W);o+=e.h.packedLength;var s=e.t.unpack(a,o,J);o+=e.t.packedLength;var u=y.n.unpack(a,o,U);o+=y.n.packedLength;var l=a[o++],c=a[o++],p=a[o++],d=a[o++],g=a[o++],h=1===a[o++],m=a[o];return t.e(n)?(n._rectangle=e.h.clone(r,n._rectangle),n._ellipsoid=e.t.clone(s,n._ellipsoid),n._vertexFormat=y.n.clone(u,n._vertexFormat),n._granularity=l,n._surfaceHeight=c,n._rotation=p,n._stRotation=d,n._extrudedHeight=g,n._shadowVolume=h,n._offsetAttribute=-1===m?void 0:m,n):(Q.granularity=l,Q.height=c,Q.rotation=p,Q.stRotation=d,Q.extrudedHeight=g,Q.shadowVolume=h,Q.offsetAttribute=-1===m?void 0:m,new X(Q))},X.computeRectangle=function(a,o){var n=(a=t.u(a,t.u.EMPTY_OBJECT)).rectangle;if(i.o.typeOf.object("rectangle",n),e.h.validate(n),n.north<n.south)throw new i.t("options.rectangle.north must be greater than or equal to options.rectangle.south");var r=t.u(a.granularity,h.e.RADIANS_PER_DEGREE),s=t.u(a.ellipsoid,e.t.WGS84);return $(n,r,t.u(a.rotation,0),s,o)};var Z=new m.p$1,K=new u.n,tt=new r.a;X.createGeometry=function(n){if(!h.e.equalsEpsilon(n._rectangle.north,n._rectangle.south,h.e.EPSILON10)&&!h.e.equalsEpsilon(n._rectangle.east,n._rectangle.west,h.e.EPSILON10)){var r=n._rectangle,i=n._ellipsoid,l=n._rotation,c=n._stRotation,d=n._vertexFormat,g=v.j.computeOptions(r,n._granularity,l,c,O,q,Y),y=Z;if(0!==c||0!==l){var b=e.h.center(r,tt),_=i.geodeticSurfaceNormalCartographic(b,z);u.n.fromAxisAngle(_,-c,K),m.p$1.fromQuaternion(K,y)}else m.p$1.clone(m.p$1.IDENTITY,y);var w,A,x=n._surfaceHeight,E=n._extrudedHeight,D=!h.e.equalsEpsilon(x,E,0,h.e.EPSILON2);if(g.lonScalar=1/n._rectangle.width,g.latScalar=1/n._rectangle.height,g.tangentRotationMatrix=y,r=n._rectangle,D){w=j(n,g);var F=o.i.fromRectangle3D(r,i,x,k),P=o.i.fromRectangle3D(r,i,E,I);A=o.i.union(F,P)}else{if((w=M(n,g)).attributes.position.values=f.A.scaleToGeodeticHeight(w.attributes.position.values,x,i,!1),t.e(n._offsetAttribute)){var R=w.attributes.position.values.length,L=new Uint8Array(R/3),C=n._offsetAttribute===p.z.NONE?0:1;a.d(L,C),w.attributes.applyOffset=new u.o({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}A=o.i.fromRectangle3D(r,i,x)}return d.position||delete w.attributes.position,new u.I({attributes:w.attributes,indices:w.indices,primitiveType:w.primitiveType,boundingSphere:A,offsetAttribute:n._offsetAttribute})}},X.createShadowVolume=function(t,e,a){var o=t._granularity,n=t._ellipsoid,r=e(o,n),i=a(o,n);return new X({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:n,stRotation:t._stRotation,granularity:o,extrudedHeight:i,height:r,vertexFormat:y.n.POSITION_ONLY,shadowVolume:!0})};var et=new e.h,at=[new e.o,new e.o,new e.o],ot=new u.f,nt=new r.a;return Object.defineProperties(X.prototype,{rectangle:{get:function(){return t.e(this._rotatedRectangle)||(this._rotatedRectangle=$(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return t.e(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){if(0===t._stRotation)return[0,0,0,1,1,0];var a=e.h.clone(t._rectangle,et),o=t._granularity,n=t._ellipsoid,r=$(a,o,t._rotation-t._stRotation,n,et),i=at;i[0].x=r.west,i[0].y=r.south,i[1].x=r.west,i[1].y=r.north,i[2].x=r.east,i[2].y=r.south;for(var s=t.rectangle,l=u.f.fromRotation(t._stRotation,ot),c=e.h.center(s,nt),p=0;p<3;++p){var d=i[p];d.x-=c.longitude,d.y-=c.latitude,u.f.multiplyByVector(l,d,d),d.x+=c.longitude,d.y+=c.latitude,d.x=(d.x-s.west)/s.width,d.y=(d.y-s.south)/s.height}var g=i[0],h=i[1],m=i[2],f=new Array(6);return e.o.pack(g,f),e.o.pack(h,f,2),e.o.pack(m,f,4),f}(this)),this._textureCoordinateRotationPoints}}}),function(a,o){return t.e(o)&&(a=X.unpack(a,o)),a._ellipsoid=e.t.clone(a._ellipsoid),a._rectangle=e.h.clone(a._rectangle),X.createGeometry(a)}})); +define(["./when-92c6cf3c","./Cartesian2-b72655a5","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Check-52a7d806","./ComponentDatatype-98414d16","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryInstance-20be787d","./GeometryOffsetAttribute-b4d599f5","./GeometryPipeline-50805727","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-fd297af4","./PolygonPipeline-c329dec3","./RectangleGeometryLibrary-c06640bc","./VertexFormat-f496a3f1","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./AttributeCompression-b5a80a71","./EncodedCartesian3-4f120b1b","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./EllipsoidRhumbLine-b1a766ae"],(function(t,e,a,o,n,r,i,s,u,l,c,p,d,g,h,m,f,v,y,b,_,w,A,x,E,D,F,P){"use strict";var R=new n.o,L=new n.o,C=new n.o,T=new n.o,O=new e.h,N=new e.o,I=new o.i,k=new o.i;function S(t,e){var a=new u.I({attributes:new l.a,primitiveType:m._0x3b3836.TRIANGLES});return a.attributes.position=new u.o({componentDatatype:s.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(a.attributes.normal=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(a.attributes.tangent=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(a.attributes.bitangent=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),a}var z=new n.o,G=new n.o;function M(t,e){var a=t._vertexFormat,o=t._ellipsoid,r=e.height,i=e.width,l=e.northCap,c=e.southCap,p=0,d=r,h=r,f=0;l&&(p=1,h-=1,f+=1),c&&(d-=1,h-=1,f+=1),f+=i*h;for(var y=a.position?new Float64Array(3*f):void 0,b=a.st?new Float32Array(2*f):void 0,_=0,w=0,A=R,x=N,E=Number.MAX_VALUE,D=Number.MAX_VALUE,F=-Number.MAX_VALUE,P=-Number.MAX_VALUE,O=p;O<d;++O)for(var I=0;I<i;++I)v.j.computePosition(e,o,a.st,O,I,A,x),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z,a.st&&(b[w++]=x.x,b[w++]=x.y,E=Math.min(E,x.x),D=Math.min(D,x.y),F=Math.max(F,x.x),P=Math.max(P,x.y));if(l&&(v.j.computePosition(e,o,a.st,0,0,A,x),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z,a.st&&(b[w++]=x.x,b[w++]=x.y,E=x.x,D=x.y,F=x.x,P=x.y)),c&&(v.j.computePosition(e,o,a.st,r-1,0,A,x),y[_++]=A.x,y[_++]=A.y,y[_]=A.z,a.st&&(b[w++]=x.x,b[w]=x.y,E=Math.min(E,x.x),D=Math.min(D,x.y),F=Math.max(F,x.x),P=Math.max(P,x.y))),a.st&&(E<0||D<0||F>1||P>1))for(var k=0;k<b.length;k+=2)b[k]=(b[k]-E)/(F-E),b[k+1]=(b[k+1]-D)/(P-D);var z=function(t,e,a,o){var r=t.length,i=e.normal?new Float32Array(r):void 0,s=e.tangent?new Float32Array(r):void 0,u=e.bitangent?new Float32Array(r):void 0,l=0,c=T,p=C,d=L;if(e.normal||e.tangent||e.bitangent)for(var g=0;g<r;g+=3){var h=n.o.fromArray(t,g,R),f=l+1,v=l+2;d=a.geodeticSurfaceNormal(h,d),(e.tangent||e.bitangent)&&(n.o.cross(n.o.UNIT_Z,d,p),m.p$1.multiplyByVector(o,p,p),n.o.normalize(p,p),e.bitangent&&n.o.normalize(n.o.cross(d,p,c),c)),e.normal&&(i[l]=d.x,i[f]=d.y,i[v]=d.z),e.tangent&&(s[l]=p.x,s[f]=p.y,s[v]=p.z),e.bitangent&&(u[l]=c.x,u[f]=c.y,u[v]=c.z),l+=3}return S(e,{positions:t,normals:i,tangents:s,bitangents:u})}(y,a,o,e.tangentRotationMatrix),G=6*(i-1)*(h-1);l&&(G+=3*(i-1)),c&&(G+=3*(i-1));var M,H=g.IndexDatatype.createTypedArray(f,G),V=0,U=0;for(M=0;M<h-1;++M){for(var j=0;j<i-1;++j){var B=V,q=B+i,Y=q+1,$=B+1;H[U++]=B,H[U++]=q,H[U++]=$,H[U++]=$,H[U++]=q,H[U++]=Y,++V}++V}if(l||c){var X,W,J=f-1,Q=f-1;if(l&&c&&(J=f-2),V=0,l)for(M=0;M<i-1;M++)W=(X=V)+1,H[U++]=J,H[U++]=X,H[U++]=W,++V;if(c)for(V=(h-1)*i,M=0;M<i-1;M++)W=(X=V)+1,H[U++]=X,H[U++]=Q,H[U++]=W,++V}return z.indices=H,a.st&&(z.attributes.st=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:b})),z}function H(t,e,a,o,n){return t[e++]=o[a],t[e++]=o[a+1],t[e++]=o[a+2],t[e++]=n[a],t[e++]=n[a+1],t[e]=n[a+2],t}function V(t,e,a,o){return t[e++]=o[a],t[e++]=o[a+1],t[e++]=o[a],t[e]=o[a+1],t}var U=new y.n;function j(e,o){var r,i=e._shadowVolume,l=e._offsetAttribute,m=e._vertexFormat,v=e._extrudedHeight,b=e._surfaceHeight,_=e._ellipsoid,w=o.height,A=o.width;if(i){var x=y.n.clone(m,U);x.normal=!0,e._vertexFormat=x}var E=M(e,o);i&&(e._vertexFormat=m);var D=f.A.scaleToGeodeticHeight(E.attributes.position.values,b,_,!1),F=(D=new Float64Array(D)).length,P=2*F,O=new Float64Array(P);O.set(D);var N=f.A.scaleToGeodeticHeight(E.attributes.position.values,v,_);O.set(N,F),E.attributes.position.values=O;var I,k,j=m.normal?new Float32Array(P):void 0,B=m.tangent?new Float32Array(P):void 0,q=m.bitangent?new Float32Array(P):void 0,Y=m.st?new Float32Array(P/3*2):void 0;if(m.normal){for(k=E.attributes.normal.values,j.set(k),r=0;r<F;r++)k[r]=-k[r];j.set(k,F),E.attributes.normal.values=j}if(i){k=E.attributes.normal.values,m.normal||(E.attributes.normal=void 0);var $=new Float32Array(P);for(r=0;r<F;r++)k[r]=-k[r];$.set(k,F),E.attributes.extrudeDirection=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:$})}var X,W=t.e(l);if(W){var J=F/3*2,Q=new Uint8Array(J);l===p.z.TOP?Q=a.d(Q,1,0,J/2):(X=l===p.z.NONE?0:1,Q=a.d(Q,X)),E.attributes.applyOffset=new u.o({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:Q})}if(m.tangent){var Z=E.attributes.tangent.values;for(B.set(Z),r=0;r<F;r++)Z[r]=-Z[r];B.set(Z,F),E.attributes.tangent.values=B}if(m.bitangent){var K=E.attributes.bitangent.values;q.set(K),q.set(K,F),E.attributes.bitangent.values=q}m.st&&(I=E.attributes.st.values,Y.set(I),Y.set(I,F/3*2),E.attributes.st.values=Y);var tt=E.indices,et=tt.length,at=F/3,ot=g.IndexDatatype.createTypedArray(P/3,2*et);for(ot.set(tt),r=0;r<et;r+=3)ot[r+et]=tt[r+2]+at,ot[r+1+et]=tt[r+1]+at,ot[r+2+et]=tt[r]+at;E.indices=ot;var nt=o.northCap,rt=o.southCap,it=w,st=2,ut=0,lt=4,ct=4;nt&&(st-=1,it-=1,ut+=1,lt-=2,ct-=1),rt&&(st-=1,it-=1,ut+=1,lt-=2,ct-=1);var pt=2*((ut+=st*A+2*it-lt)+ct),dt=new Float64Array(3*pt),gt=i?new Float32Array(3*pt):void 0,ht=W?new Uint8Array(pt):void 0,mt=m.st?new Float32Array(2*pt):void 0,ft=l===p.z.TOP;W&&!ft&&(X=l===p.z.ALL?1:0,ht=a.d(ht,X));var vt,yt=0,bt=0,_t=0,wt=0,At=A*it;for(r=0;r<At;r+=A)dt=H(dt,yt,vt=3*r,D,N),yt+=6,m.st&&(mt=V(mt,bt,2*r,I),bt+=4),i&&(_t+=3,gt[_t++]=k[vt],gt[_t++]=k[vt+1],gt[_t++]=k[vt+2]),ft&&(ht[wt++]=1,wt+=1);if(rt){var xt=nt?At+1:At;for(vt=3*xt,r=0;r<2;r++)dt=H(dt,yt,vt,D,N),yt+=6,m.st&&(mt=V(mt,bt,2*xt,I),bt+=4),i&&(_t+=3,gt[_t++]=k[vt],gt[_t++]=k[vt+1],gt[_t++]=k[vt+2]),ft&&(ht[wt++]=1,wt+=1)}else for(r=At-A;r<At;r++)dt=H(dt,yt,vt=3*r,D,N),yt+=6,m.st&&(mt=V(mt,bt,2*r,I),bt+=4),i&&(_t+=3,gt[_t++]=k[vt],gt[_t++]=k[vt+1],gt[_t++]=k[vt+2]),ft&&(ht[wt++]=1,wt+=1);for(r=At-1;r>0;r-=A)dt=H(dt,yt,vt=3*r,D,N),yt+=6,m.st&&(mt=V(mt,bt,2*r,I),bt+=4),i&&(_t+=3,gt[_t++]=k[vt],gt[_t++]=k[vt+1],gt[_t++]=k[vt+2]),ft&&(ht[wt++]=1,wt+=1);if(nt){var Et=At;for(vt=3*Et,r=0;r<2;r++)dt=H(dt,yt,vt,D,N),yt+=6,m.st&&(mt=V(mt,bt,2*Et,I),bt+=4),i&&(_t+=3,gt[_t++]=k[vt],gt[_t++]=k[vt+1],gt[_t++]=k[vt+2]),ft&&(ht[wt++]=1,wt+=1)}else for(r=A-1;r>=0;r--)dt=H(dt,yt,vt=3*r,D,N),yt+=6,m.st&&(mt=V(mt,bt,2*r,I),bt+=4),i&&(_t+=3,gt[_t++]=k[vt],gt[_t++]=k[vt+1],gt[_t++]=k[vt+2]),ft&&(ht[wt++]=1,wt+=1);var Dt=function(t,e,a){var o=t.length,r=e.normal?new Float32Array(o):void 0,i=e.tangent?new Float32Array(o):void 0,s=e.bitangent?new Float32Array(o):void 0,u=0,l=0,c=0,p=!0,d=T,g=C,m=L;if(e.normal||e.tangent||e.bitangent)for(var f=0;f<o;f+=6){var v=n.o.fromArray(t,f,R),y=n.o.fromArray(t,(f+6)%o,z);if(p){var b=n.o.fromArray(t,(f+3)%o,G);n.o.subtract(y,v,y),n.o.subtract(b,v,b),m=n.o.normalize(n.o.cross(b,y,m),m),p=!1}n.o.equalsEpsilon(y,v,h.e.EPSILON10)&&(p=!0),(e.tangent||e.bitangent)&&(d=a.geodeticSurfaceNormal(v,d),e.tangent&&(g=n.o.normalize(n.o.cross(d,m,g),g))),e.normal&&(r[u++]=m.x,r[u++]=m.y,r[u++]=m.z,r[u++]=m.x,r[u++]=m.y,r[u++]=m.z),e.tangent&&(i[l++]=g.x,i[l++]=g.y,i[l++]=g.z,i[l++]=g.x,i[l++]=g.y,i[l++]=g.z),e.bitangent&&(s[c++]=d.x,s[c++]=d.y,s[c++]=d.z,s[c++]=d.x,s[c++]=d.y,s[c++]=d.z)}return S(e,{positions:t,normals:r,tangents:i,bitangents:s})}(dt,m,_);m.st&&(Dt.attributes.st=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:mt})),i&&(Dt.attributes.extrudeDirection=new u.o({componentDatatype:s.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:gt})),W&&(Dt.attributes.applyOffset=new u.o({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:ht}));var Ft,Pt,Rt,Lt,Ct=g.IndexDatatype.createTypedArray(pt,6*ut);F=dt.length/3;var Tt=0;for(r=0;r<F-1;r+=2){Lt=((Ft=r)+2)%F;var Ot=n.o.fromArray(dt,3*Ft,z),Nt=n.o.fromArray(dt,3*Lt,G);n.o.equalsEpsilon(Ot,Nt,h.e.EPSILON10)||(Rt=((Pt=(Ft+1)%F)+2)%F,Ct[Tt++]=Ft,Ct[Tt++]=Pt,Ct[Tt++]=Lt,Ct[Tt++]=Lt,Ct[Tt++]=Pt,Ct[Tt++]=Rt)}return Dt.indices=Ct,(Dt=d.k.combineInstances([new c.d({geometry:E}),new c.d({geometry:Dt})]))[0]}var B=[new n.o,new n.o,new n.o,new n.o],q=new r.a,Y=new r.a;function $(t,a,o,n,r){if(0===o)return e.h.clone(t,r);var i=v.j.computeOptions(t,a,o,0,O,q),s=i.height,u=i.width,l=B;return v.j.computePosition(i,n,!1,0,0,l[0]),v.j.computePosition(i,n,!1,0,u-1,l[1]),v.j.computePosition(i,n,!1,s-1,0,l[2]),v.j.computePosition(i,n,!1,s-1,u-1,l[3]),e.h.fromCartesianArray(l,n,r)}function X(a){var o=(a=t.u(a,t.u.EMPTY_OBJECT)).rectangle;if(i.o.typeOf.object("rectangle",o),e.h.validate(o),o.north<o.south)throw new i.t("options.rectangle.north must be greater than or equal to options.rectangle.south");var n=t.u(a.height,0),r=t.u(a.extrudedHeight,n);this._rectangle=e.h.clone(o),this._granularity=t.u(a.granularity,h.e.RADIANS_PER_DEGREE),this._ellipsoid=e.t.clone(t.u(a.ellipsoid,e.t.WGS84)),this._surfaceHeight=Math.max(n,r),this._rotation=t.u(a.rotation,0),this._stRotation=t.u(a.stRotation,0),this._vertexFormat=y.n.clone(t.u(a.vertexFormat,y.n.DEFAULT)),this._extrudedHeight=Math.min(n,r),this._shadowVolume=t.u(a.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=a.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}X.packedLength=e.h.packedLength+e.t.packedLength+y.n.packedLength+7,X.pack=function(a,o,n){return i.o.typeOf.object("value",a),i.o.defined("array",o),n=t.u(n,0),e.h.pack(a._rectangle,o,n),n+=e.h.packedLength,e.t.pack(a._ellipsoid,o,n),n+=e.t.packedLength,y.n.pack(a._vertexFormat,o,n),n+=y.n.packedLength,o[n++]=a._granularity,o[n++]=a._surfaceHeight,o[n++]=a._rotation,o[n++]=a._stRotation,o[n++]=a._extrudedHeight,o[n++]=a._shadowVolume?1:0,o[n]=t.u(a._offsetAttribute,-1),o};var W=new e.h,J=e.t.clone(e.t.UNIT_SPHERE),Q={rectangle:W,ellipsoid:J,vertexFormat:U,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};X.unpack=function(a,o,n){i.o.defined("array",a),o=t.u(o,0);var r=e.h.unpack(a,o,W);o+=e.h.packedLength;var s=e.t.unpack(a,o,J);o+=e.t.packedLength;var u=y.n.unpack(a,o,U);o+=y.n.packedLength;var l=a[o++],c=a[o++],p=a[o++],d=a[o++],g=a[o++],h=1===a[o++],m=a[o];return t.e(n)?(n._rectangle=e.h.clone(r,n._rectangle),n._ellipsoid=e.t.clone(s,n._ellipsoid),n._vertexFormat=y.n.clone(u,n._vertexFormat),n._granularity=l,n._surfaceHeight=c,n._rotation=p,n._stRotation=d,n._extrudedHeight=g,n._shadowVolume=h,n._offsetAttribute=-1===m?void 0:m,n):(Q.granularity=l,Q.height=c,Q.rotation=p,Q.stRotation=d,Q.extrudedHeight=g,Q.shadowVolume=h,Q.offsetAttribute=-1===m?void 0:m,new X(Q))},X.computeRectangle=function(a,o){var n=(a=t.u(a,t.u.EMPTY_OBJECT)).rectangle;if(i.o.typeOf.object("rectangle",n),e.h.validate(n),n.north<n.south)throw new i.t("options.rectangle.north must be greater than or equal to options.rectangle.south");var r=t.u(a.granularity,h.e.RADIANS_PER_DEGREE),s=t.u(a.ellipsoid,e.t.WGS84);return $(n,r,t.u(a.rotation,0),s,o)};var Z=new m.p$1,K=new u.n,tt=new r.a;X.createGeometry=function(n){if(!h.e.equalsEpsilon(n._rectangle.north,n._rectangle.south,h.e.EPSILON10)&&!h.e.equalsEpsilon(n._rectangle.east,n._rectangle.west,h.e.EPSILON10)){var r=n._rectangle,i=n._ellipsoid,l=n._rotation,c=n._stRotation,d=n._vertexFormat,g=v.j.computeOptions(r,n._granularity,l,c,O,q,Y),y=Z;if(0!==c||0!==l){var b=e.h.center(r,tt),_=i.geodeticSurfaceNormalCartographic(b,z);u.n.fromAxisAngle(_,-c,K),m.p$1.fromQuaternion(K,y)}else m.p$1.clone(m.p$1.IDENTITY,y);var w,A,x=n._surfaceHeight,E=n._extrudedHeight,D=!h.e.equalsEpsilon(x,E,0,h.e.EPSILON2);if(g.lonScalar=1/n._rectangle.width,g.latScalar=1/n._rectangle.height,g.tangentRotationMatrix=y,r=n._rectangle,D){w=j(n,g);var F=o.i.fromRectangle3D(r,i,x,k),P=o.i.fromRectangle3D(r,i,E,I);A=o.i.union(F,P)}else{if((w=M(n,g)).attributes.position.values=f.A.scaleToGeodeticHeight(w.attributes.position.values,x,i,!1),t.e(n._offsetAttribute)){var R=w.attributes.position.values.length,L=new Uint8Array(R/3),C=n._offsetAttribute===p.z.NONE?0:1;a.d(L,C),w.attributes.applyOffset=new u.o({componentDatatype:s.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}A=o.i.fromRectangle3D(r,i,x)}return d.position||delete w.attributes.position,new u.I({attributes:w.attributes,indices:w.indices,primitiveType:w.primitiveType,boundingSphere:A,offsetAttribute:n._offsetAttribute})}},X.createShadowVolume=function(t,e,a){var o=t._granularity,n=t._ellipsoid,r=e(o,n),i=a(o,n);return new X({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:n,stRotation:t._stRotation,granularity:o,extrudedHeight:i,height:r,vertexFormat:y.n.POSITION_ONLY,shadowVolume:!0})};var et=new e.h,at=[new e.o,new e.o,new e.o],ot=new u.f,nt=new r.a;return Object.defineProperties(X.prototype,{rectangle:{get:function(){return t.e(this._rotatedRectangle)||(this._rotatedRectangle=$(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return t.e(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){if(0===t._stRotation)return[0,0,0,1,1,0];var a=e.h.clone(t._rectangle,et),o=t._granularity,n=t._ellipsoid,r=$(a,o,t._rotation-t._stRotation,n,et),i=at;i[0].x=r.west,i[0].y=r.south,i[1].x=r.west,i[1].y=r.north,i[2].x=r.east,i[2].y=r.south;for(var s=t.rectangle,l=u.f.fromRotation(t._stRotation,ot),c=e.h.center(s,nt),p=0;p<3;++p){var d=i[p];d.x-=c.longitude,d.y-=c.latitude,u.f.multiplyByVector(l,d,d),d.x+=c.longitude,d.y+=c.latitude,d.x=(d.x-s.west)/s.width,d.y=(d.y-s.south)/s.height}var g=i[0],h=i[1],m=i[2],f=new Array(6);return e.o.pack(g,f),e.o.pack(h,f,2),e.o.pack(m,f,4),f}(this)),this._textureCoordinateRotationPoints}}}),function(a,o){return t.e(o)&&(a=X.unpack(a,o)),a._ellipsoid=e.t.clone(a._ellipsoid),a._rectangle=e.h.clone(a._rectangle),X.createGeometry(a)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createRectangleOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createRectangleOutlineGeometry.js index 9ef73864..2d71c77c 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createRectangleOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createRectangleOutlineGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./Cartesian2-b72655a5","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./ComponentDatatype-98414d16","./Check-52a7d806","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./PolygonPipeline-425528b3","./FeatureDetection-cec0163f","./RectangleGeometryLibrary-4696cd68","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,i,r,a,n,o,s,u,l,c,h,p,d,f,g,_,b,v,y,m){"use strict";var w=new r.i,A=new r.i,E=new a.o,x=new t.h;function D(e,t){var i=e._ellipsoid,r=t.height,a=t.width,n=t.northCap,s=t.southCap,c=r,p=2,d=0,_=4;n&&(p-=1,c-=1,d+=1,_-=2),s&&(p-=1,c-=1,d+=1,_-=2),d+=p*a+2*c-_;var b,v=new Float64Array(3*d),y=0,m=0,w=E;if(n)g.j.computePosition(t,i,!1,m,0,w),v[y++]=w.x,v[y++]=w.y,v[y++]=w.z;else for(b=0;b<a;b++)g.j.computePosition(t,i,!1,m,b,w),v[y++]=w.x,v[y++]=w.y,v[y++]=w.z;for(b=a-1,m=1;m<r;m++)g.j.computePosition(t,i,!1,m,b,w),v[y++]=w.x,v[y++]=w.y,v[y++]=w.z;if(m=r-1,!s)for(b=a-2;b>=0;b--)g.j.computePosition(t,i,!1,m,b,w),v[y++]=w.x,v[y++]=w.y,v[y++]=w.z;for(b=0,m=r-2;m>0;m--)g.j.computePosition(t,i,!1,m,b,w),v[y++]=w.x,v[y++]=w.y,v[y++]=w.z;for(var A=v.length/3*2,x=h.IndexDatatype.createTypedArray(v.length/3,A),D=0,H=0;H<v.length/3-1;H++)x[D++]=H,x[D++]=H+1;x[D++]=v.length/3-1,x[D++]=0;var P=new u.I({attributes:new l.a,primitiveType:f._0x4b6a27.LINES});return P.attributes.position=new u.o({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v}),P.indices=x,P}function H(i){var r=(i=e.u(i,e.u.EMPTY_OBJECT)).rectangle,a=e.u(i.granularity,p.e.RADIANS_PER_DEGREE),n=e.u(i.ellipsoid,t.t.WGS84),o=e.u(i.rotation,0);if(!e.e(r))throw new s.t("rectangle is required.");if(t.h.validate(r),r.north<r.south)throw new s.t("options.rectangle.north must be greater than options.rectangle.south");var u=e.u(i.height,0),l=e.u(i.extrudedHeight,u);this._rectangle=t.h.clone(r),this._granularity=a,this._ellipsoid=n,this._surfaceHeight=Math.max(u,l),this._rotation=o,this._extrudedHeight=Math.min(u,l),this._offsetAttribute=i.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}H.packedLength=t.h.packedLength+t.t.packedLength+5,H.pack=function(i,r,a){if(!e.e(i))throw new s.t("value is required");if(!e.e(r))throw new s.t("array is required");return a=e.u(a,0),t.h.pack(i._rectangle,r,a),a+=t.h.packedLength,t.t.pack(i._ellipsoid,r,a),a+=t.t.packedLength,r[a++]=i._granularity,r[a++]=i._surfaceHeight,r[a++]=i._rotation,r[a++]=i._extrudedHeight,r[a]=e.u(i._offsetAttribute,-1),r};var P=new t.h,k=t.t.clone(t.t.UNIT_SPHERE),L={rectangle:P,ellipsoid:k,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};H.unpack=function(i,r,a){if(!e.e(i))throw new s.t("array is required");r=e.u(r,0);var n=t.h.unpack(i,r,P);r+=t.h.packedLength;var o=t.t.unpack(i,r,k);r+=t.t.packedLength;var u=i[r++],l=i[r++],c=i[r++],h=i[r++],p=i[r];return e.e(a)?(a._rectangle=t.h.clone(n,a._rectangle),a._ellipsoid=t.t.clone(o,a._ellipsoid),a._surfaceHeight=l,a._rotation=c,a._extrudedHeight=h,a._offsetAttribute=-1===p?void 0:p,a):(L.granularity=u,L.height=l,L.rotation=c,L.extrudedHeight=h,L.offsetAttribute=-1===p?void 0:p,new H(L))};var N=new n.a;return H.createGeometry=function(t){var a,n,s=t._rectangle,l=t._ellipsoid,_=g.j.computeOptions(s,t._granularity,t._rotation,0,x,N);if(!p.e.equalsEpsilon(s.north,s.south,p.e.EPSILON10)&&!p.e.equalsEpsilon(s.east,s.west,p.e.EPSILON10)){var b,v=t._surfaceHeight,y=t._extrudedHeight;if(!p.e.equalsEpsilon(v,y,0,p.e.EPSILON2)){if(a=function(e,t){var i=e._surfaceHeight,r=e._extrudedHeight,a=e._ellipsoid,n=r,o=i,s=D(e,t),u=t.height,l=t.width,c=d.A.scaleToGeodeticHeight(s.attributes.position.values,o,a,!1),p=c.length,f=new Float64Array(2*p);f.set(c);var g=d.A.scaleToGeodeticHeight(s.attributes.position.values,n,a);f.set(g,p),s.attributes.position.values=f;var _=t.northCap,b=t.southCap,v=4;_&&(v-=1),b&&(v-=1);var y,m=2*(f.length/3+v),w=h.IndexDatatype.createTypedArray(f.length/3,m);p=f.length/6;for(var A=0,E=0;E<p-1;E++)w[A++]=E,w[A++]=E+1,w[A++]=E+p,w[A++]=E+p+1;if(w[A++]=p-1,w[A++]=0,w[A++]=p+p-1,w[A++]=p,w[A++]=0,w[A++]=p,_)y=u-1;else{var x=l-1;w[A++]=x,w[A++]=x+p,y=l+u-2}if(w[A++]=y,w[A++]=y+p,!b){var H=l+y-1;w[A++]=H,w[A]=H+p}return s.indices=w,s}(t,_),e.e(t._offsetAttribute)){var m=a.attributes.position.values.length/3,E=new Uint8Array(m);t._offsetAttribute===c.z.TOP?E=i.d(E,1,0,m/2):(b=t._offsetAttribute===c.z.NONE?0:1,E=i.d(E,b)),a.attributes.applyOffset=new u.o({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}var H=r.i.fromRectangle3D(s,l,v,A),P=r.i.fromRectangle3D(s,l,y,w);n=r.i.union(H,P)}else{if((a=D(t,_)).attributes.position.values=d.A.scaleToGeodeticHeight(a.attributes.position.values,v,l,!1),e.e(t._offsetAttribute)){var k=a.attributes.position.values.length,L=new Uint8Array(k/3);b=t._offsetAttribute===c.z.NONE?0:1,i.d(L,b),a.attributes.applyOffset=new u.o({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}n=r.i.fromRectangle3D(s,l,v)}return new u.I({attributes:a.attributes,indices:a.indices,primitiveType:f._0x4b6a27.LINES,boundingSphere:n,offsetAttribute:t._offsetAttribute})}},function(i,r){return e.e(r)&&(i=H.unpack(i,r)),i._ellipsoid=t.t.clone(i._ellipsoid),i._rectangle=t.h.clone(i._rectangle),H.createGeometry(i)}})); +define(["./when-92c6cf3c","./Cartesian2-b72655a5","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./ComponentDatatype-98414d16","./Check-52a7d806","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4","./Math-ecf82623","./PolygonPipeline-c329dec3","./FeatureDetection-fd297af4","./RectangleGeometryLibrary-c06640bc","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,i,r,a,n,o,s,u,c,l,h,p,d,f,g,_,b,v,y,m){"use strict";var w=new r.i,A=new r.i,E=new a.o,x=new t.h;function D(e,t){var i=e._ellipsoid,r=t.height,a=t.width,n=t.northCap,s=t.southCap,l=r,p=2,d=0,_=4;n&&(p-=1,l-=1,d+=1,_-=2),s&&(p-=1,l-=1,d+=1,_-=2),d+=p*a+2*l-_;var b,v=new Float64Array(3*d),y=0,m=0,w=E;if(n)g.j.computePosition(t,i,!1,m,0,w),v[y++]=w.x,v[y++]=w.y,v[y++]=w.z;else for(b=0;b<a;b++)g.j.computePosition(t,i,!1,m,b,w),v[y++]=w.x,v[y++]=w.y,v[y++]=w.z;for(b=a-1,m=1;m<r;m++)g.j.computePosition(t,i,!1,m,b,w),v[y++]=w.x,v[y++]=w.y,v[y++]=w.z;if(m=r-1,!s)for(b=a-2;b>=0;b--)g.j.computePosition(t,i,!1,m,b,w),v[y++]=w.x,v[y++]=w.y,v[y++]=w.z;for(b=0,m=r-2;m>0;m--)g.j.computePosition(t,i,!1,m,b,w),v[y++]=w.x,v[y++]=w.y,v[y++]=w.z;for(var A=v.length/3*2,x=h.IndexDatatype.createTypedArray(v.length/3,A),D=0,H=0;H<v.length/3-1;H++)x[D++]=H,x[D++]=H+1;x[D++]=v.length/3-1,x[D++]=0;var P=new u.I({attributes:new c.a,primitiveType:f._0x3b3836.LINES});return P.attributes.position=new u.o({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v}),P.indices=x,P}function H(i){var r=(i=e.u(i,e.u.EMPTY_OBJECT)).rectangle,a=e.u(i.granularity,p.e.RADIANS_PER_DEGREE),n=e.u(i.ellipsoid,t.t.WGS84),o=e.u(i.rotation,0);if(!e.e(r))throw new s.t("rectangle is required.");if(t.h.validate(r),r.north<r.south)throw new s.t("options.rectangle.north must be greater than options.rectangle.south");var u=e.u(i.height,0),c=e.u(i.extrudedHeight,u);this._rectangle=t.h.clone(r),this._granularity=a,this._ellipsoid=n,this._surfaceHeight=Math.max(u,c),this._rotation=o,this._extrudedHeight=Math.min(u,c),this._offsetAttribute=i.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}H.packedLength=t.h.packedLength+t.t.packedLength+5,H.pack=function(i,r,a){if(!e.e(i))throw new s.t("value is required");if(!e.e(r))throw new s.t("array is required");return a=e.u(a,0),t.h.pack(i._rectangle,r,a),a+=t.h.packedLength,t.t.pack(i._ellipsoid,r,a),a+=t.t.packedLength,r[a++]=i._granularity,r[a++]=i._surfaceHeight,r[a++]=i._rotation,r[a++]=i._extrudedHeight,r[a]=e.u(i._offsetAttribute,-1),r};var P=new t.h,k=t.t.clone(t.t.UNIT_SPHERE),L={rectangle:P,ellipsoid:k,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};H.unpack=function(i,r,a){if(!e.e(i))throw new s.t("array is required");r=e.u(r,0);var n=t.h.unpack(i,r,P);r+=t.h.packedLength;var o=t.t.unpack(i,r,k);r+=t.t.packedLength;var u=i[r++],c=i[r++],l=i[r++],h=i[r++],p=i[r];return e.e(a)?(a._rectangle=t.h.clone(n,a._rectangle),a._ellipsoid=t.t.clone(o,a._ellipsoid),a._surfaceHeight=c,a._rotation=l,a._extrudedHeight=h,a._offsetAttribute=-1===p?void 0:p,a):(L.granularity=u,L.height=c,L.rotation=l,L.extrudedHeight=h,L.offsetAttribute=-1===p?void 0:p,new H(L))};var N=new n.a;return H.createGeometry=function(t){var a,n,s=t._rectangle,c=t._ellipsoid,_=g.j.computeOptions(s,t._granularity,t._rotation,0,x,N);if(!p.e.equalsEpsilon(s.north,s.south,p.e.EPSILON10)&&!p.e.equalsEpsilon(s.east,s.west,p.e.EPSILON10)){var b,v=t._surfaceHeight,y=t._extrudedHeight;if(!p.e.equalsEpsilon(v,y,0,p.e.EPSILON2)){if(a=function(e,t){var i=e._surfaceHeight,r=e._extrudedHeight,a=e._ellipsoid,n=r,o=i,s=D(e,t),u=t.height,c=t.width,l=d.A.scaleToGeodeticHeight(s.attributes.position.values,o,a,!1),p=l.length,f=new Float64Array(2*p);f.set(l);var g=d.A.scaleToGeodeticHeight(s.attributes.position.values,n,a);f.set(g,p),s.attributes.position.values=f;var _=t.northCap,b=t.southCap,v=4;_&&(v-=1),b&&(v-=1);var y,m=2*(f.length/3+v),w=h.IndexDatatype.createTypedArray(f.length/3,m);p=f.length/6;for(var A=0,E=0;E<p-1;E++)w[A++]=E,w[A++]=E+1,w[A++]=E+p,w[A++]=E+p+1;if(w[A++]=p-1,w[A++]=0,w[A++]=p+p-1,w[A++]=p,w[A++]=0,w[A++]=p,_)y=u-1;else{var x=c-1;w[A++]=x,w[A++]=x+p,y=c+u-2}if(w[A++]=y,w[A++]=y+p,!b){var H=c+y-1;w[A++]=H,w[A]=H+p}return s.indices=w,s}(t,_),e.e(t._offsetAttribute)){var m=a.attributes.position.values.length/3,E=new Uint8Array(m);t._offsetAttribute===l.z.TOP?E=i.d(E,1,0,m/2):(b=t._offsetAttribute===l.z.NONE?0:1,E=i.d(E,b)),a.attributes.applyOffset=new u.o({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}var H=r.i.fromRectangle3D(s,c,v,A),P=r.i.fromRectangle3D(s,c,y,w);n=r.i.union(H,P)}else{if((a=D(t,_)).attributes.position.values=d.A.scaleToGeodeticHeight(a.attributes.position.values,v,c,!1),e.e(t._offsetAttribute)){var k=a.attributes.position.values.length,L=new Uint8Array(k/3);b=t._offsetAttribute===l.z.NONE?0:1,i.d(L,b),a.attributes.applyOffset=new u.o({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}n=r.i.fromRectangle3D(s,c,v)}return new u.I({attributes:a.attributes,indices:a.indices,primitiveType:f._0x3b3836.LINES,boundingSphere:n,offsetAttribute:t._offsetAttribute})}},function(i,r){return e.e(r)&&(i=H.unpack(i,r)),i._ellipsoid=t.t.clone(i._ellipsoid),i._rectangle=t.h.clone(i._rectangle),H.createGeometry(i)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createSimplePolylineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createSimplePolylineGeometry.js index 81822ec3..7a7cdfc0 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createSimplePolylineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createSimplePolylineGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./Cartesian2-b72655a5","./ArcType-31298545","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./Color-98063b35","./ComponentDatatype-98414d16","./Check-52a7d806","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./IndexDatatype-86677ec4","./Math-ecf82623","./PolylinePipeline-f0970409","./FeatureDetection-cec0163f","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./IntersectionTests-6e80d61c","./Plane-33393da8"],(function(e,t,r,o,a,n,i,l,s,c,p,u,y,f,h,d,g,m,T,v,_,b,w){"use strict";function B(e,t,r,o,a,i,l){var s,c=y.m.numberOfPoints(e,t,a),p=r.red,u=r.green,f=r.blue,h=r.alpha,d=o.red,g=o.green,m=o.blue,T=o.alpha;if(n.e.equals(r,o)){for(s=0;s<c;s++)i[l++]=n.e.floatToByte(p),i[l++]=n.e.floatToByte(u),i[l++]=n.e.floatToByte(f),i[l++]=n.e.floatToByte(h);return l}var v=(d-p)/c,_=(g-u)/c,b=(m-f)/c,w=(T-h)/c,B=l;for(s=0;s<c;s++)i[B++]=n.e.floatToByte(p+s*v),i[B++]=n.e.floatToByte(u+s*_),i[B++]=n.e.floatToByte(f+s*b),i[B++]=n.e.floatToByte(h+s*w);return B}function k(o){var i=(o=e.u(o,e.u.EMPTY_OBJECT)).positions,s=o.colors,c=e.u(o.colorsPerVertex,!1);if(!e.e(i)||i.length<2)throw new l.t("At least two positions are required.");if(e.e(s)&&(c&&s.length<i.length||!c&&s.length<i.length-1))throw new l.t("colors has an invalid length.");this._positions=i,this._colors=s,this._colorsPerVertex=c,this._arcType=e.u(o.arcType,r.L.GEODESIC),this._granularity=e.u(o.granularity,u.e.RADIANS_PER_DEGREE),this._ellipsoid=e.u(o.ellipsoid,t.t.WGS84),this._workerName="createSimplePolylineGeometry";var p=1+i.length*a.o.packedLength;p+=e.e(s)?1+s.length*n.e.packedLength:1,this.packedLength=p+t.t.packedLength+3}k.pack=function(r,o,i){if(!e.e(r))throw new l.t("value is required");if(!e.e(o))throw new l.t("array is required");i=e.u(i,0);var s,c=r._positions,p=c.length;for(o[i++]=p,s=0;s<p;++s,i+=a.o.packedLength)a.o.pack(c[s],o,i);var u=r._colors;for(p=e.e(u)?u.length:0,o[i++]=p,s=0;s<p;++s,i+=n.e.packedLength)n.e.pack(u[s],o,i);return t.t.pack(r._ellipsoid,o,i),i+=t.t.packedLength,o[i++]=r._colorsPerVertex?1:0,o[i++]=r._arcType,o[i]=r._granularity,o},k.unpack=function(r,o,i){if(!e.e(r))throw new l.t("array is required");o=e.u(o,0);var s,c=r[o++],p=new Array(c);for(s=0;s<c;++s,o+=a.o.packedLength)p[s]=a.o.unpack(r,o);var u=(c=r[o++])>0?new Array(c):void 0;for(s=0;s<c;++s,o+=n.e.packedLength)u[s]=n.e.unpack(r,o);var y=t.t.unpack(r,o);o+=t.t.packedLength;var f=1===r[o++],h=r[o++],d=r[o];return e.e(i)?(i._positions=p,i._colors=u,i._ellipsoid=y,i._colorsPerVertex=f,i._arcType=h,i._granularity=d,i):new k({positions:p,colors:u,ellipsoid:y,colorsPerVertex:f,arcType:h,granularity:d})};var E=new Array(2),L=new Array(2),A={positions:E,height:L,ellipsoid:void 0,minDistance:void 0,granularity:void 0};return k.createGeometry=function(t){var l,h,d,g,m,T=t._positions,v=t._colors,_=t._colorsPerVertex,b=t._arcType,w=t._granularity,k=t._ellipsoid,D=u.e.chordLength(w,k.maximumRadius),P=e.e(v)&&!_,C=T.length,G=0;if(b===r.L.GEODESIC||b===r.L.RHUMB){var x,I,R;b===r.L.GEODESIC?(x=u.e.chordLength(w,k.maximumRadius),I=y.m.numberOfPoints,R=y.m.generateArc):(x=w,I=y.m.numberOfPointsRhumbLine,R=y.m.generateRhumbArc);var S=y.m.extractHeights(T,k),O=A;if(b===r.L.GEODESIC?O.minDistance=D:O.granularity=w,O.ellipsoid=k,P){var U=0;for(l=0;l<C-1;l++)U+=I(T[l],T[l+1],x)+1;h=new Float64Array(3*U),g=new Uint8Array(4*U),O.positions=E,O.height=L;var V=0;for(l=0;l<C-1;++l){E[0]=T[l],E[1]=T[l+1],L[0]=S[l],L[1]=S[l+1];var q=R(O);if(e.e(v)){var N=q.length/3;m=v[l];for(var F=0;F<N;++F)g[V++]=n.e.floatToByte(m.red),g[V++]=n.e.floatToByte(m.green),g[V++]=n.e.floatToByte(m.blue),g[V++]=n.e.floatToByte(m.alpha)}h.set(q,G),G+=q.length}}else if(O.positions=T,O.height=S,h=new Float64Array(R(O)),e.e(v)){for(g=new Uint8Array(h.length/3*4),l=0;l<C-1;++l){G=B(T[l],T[l+1],v[l],v[l+1],D,g,G)}var M=v[C-1];g[G++]=n.e.floatToByte(M.red),g[G++]=n.e.floatToByte(M.green),g[G++]=n.e.floatToByte(M.blue),g[G++]=n.e.floatToByte(M.alpha)}}else{d=P?2*C-2:C,h=new Float64Array(3*d),g=e.e(v)?new Uint8Array(4*d):void 0;var H=0,W=0;for(l=0;l<C;++l){var Y=T[l];if(P&&l>0&&(a.o.pack(Y,h,H),H+=3,m=v[l-1],g[W++]=n.e.floatToByte(m.red),g[W++]=n.e.floatToByte(m.green),g[W++]=n.e.floatToByte(m.blue),g[W++]=n.e.floatToByte(m.alpha)),P&&l===C-1)break;a.o.pack(Y,h,H),H+=3,e.e(v)&&(m=v[l],g[W++]=n.e.floatToByte(m.red),g[W++]=n.e.floatToByte(m.green),g[W++]=n.e.floatToByte(m.blue),g[W++]=n.e.floatToByte(m.alpha))}}var z=new c.a;z.position=new s.o({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:h}),e.e(v)&&(z.color=new s.o({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:g,normalize:!0}));var J=2*((d=h.length/3)-1),j=p.IndexDatatype.createTypedArray(d,J),K=0;for(l=0;l<d-1;++l)j[K++]=l,j[K++]=l+1;return new s.I({attributes:z,indices:j,primitiveType:f._0x4b6a27.LINES,boundingSphere:o.i.fromPoints(T)})},function(r,o){return e.e(o)&&(r=k.unpack(r,o)),r._ellipsoid=t.t.clone(r._ellipsoid),k.createGeometry(r)}})); +define(["./when-92c6cf3c","./Cartesian2-b72655a5","./ArcType-31298545","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./Color-b1bd525f","./ComponentDatatype-98414d16","./Check-52a7d806","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./IndexDatatype-86677ec4","./Math-ecf82623","./PolylinePipeline-160fa1b0","./FeatureDetection-fd297af4","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./IntersectionTests-9ff29c98","./Plane-a2c6da7b"],(function(e,t,r,o,a,n,i,l,s,c,p,f,u,y,h,d,g,m,T,v,b,_,w){"use strict";function B(e,t,r,o,a,i,l){var s,c=u.m.numberOfPoints(e,t,a),p=r.red,f=r.green,y=r.blue,h=r.alpha,d=o.red,g=o.green,m=o.blue,T=o.alpha;if(n.e.equals(r,o)){for(s=0;s<c;s++)i[l++]=n.e.floatToByte(p),i[l++]=n.e.floatToByte(f),i[l++]=n.e.floatToByte(y),i[l++]=n.e.floatToByte(h);return l}var v=(d-p)/c,b=(g-f)/c,_=(m-y)/c,w=(T-h)/c,B=l;for(s=0;s<c;s++)i[B++]=n.e.floatToByte(p+s*v),i[B++]=n.e.floatToByte(f+s*b),i[B++]=n.e.floatToByte(y+s*_),i[B++]=n.e.floatToByte(h+s*w);return B}function k(o){var i=(o=e.u(o,e.u.EMPTY_OBJECT)).positions,s=o.colors,c=e.u(o.colorsPerVertex,!1);if(!e.e(i)||i.length<2)throw new l.t("At least two positions are required.");if(e.e(s)&&(c&&s.length<i.length||!c&&s.length<i.length-1))throw new l.t("colors has an invalid length.");this._positions=i,this._colors=s,this._colorsPerVertex=c,this._arcType=e.u(o.arcType,r.L.GEODESIC),this._granularity=e.u(o.granularity,f.e.RADIANS_PER_DEGREE),this._ellipsoid=e.u(o.ellipsoid,t.t.WGS84),this._workerName="createSimplePolylineGeometry";var p=1+i.length*a.o.packedLength;p+=e.e(s)?1+s.length*n.e.packedLength:1,this.packedLength=p+t.t.packedLength+3}k.pack=function(r,o,i){if(!e.e(r))throw new l.t("value is required");if(!e.e(o))throw new l.t("array is required");i=e.u(i,0);var s,c=r._positions,p=c.length;for(o[i++]=p,s=0;s<p;++s,i+=a.o.packedLength)a.o.pack(c[s],o,i);var f=r._colors;for(p=e.e(f)?f.length:0,o[i++]=p,s=0;s<p;++s,i+=n.e.packedLength)n.e.pack(f[s],o,i);return t.t.pack(r._ellipsoid,o,i),i+=t.t.packedLength,o[i++]=r._colorsPerVertex?1:0,o[i++]=r._arcType,o[i]=r._granularity,o},k.unpack=function(r,o,i){if(!e.e(r))throw new l.t("array is required");o=e.u(o,0);var s,c=r[o++],p=new Array(c);for(s=0;s<c;++s,o+=a.o.packedLength)p[s]=a.o.unpack(r,o);var f=(c=r[o++])>0?new Array(c):void 0;for(s=0;s<c;++s,o+=n.e.packedLength)f[s]=n.e.unpack(r,o);var u=t.t.unpack(r,o);o+=t.t.packedLength;var y=1===r[o++],h=r[o++],d=r[o];return e.e(i)?(i._positions=p,i._colors=f,i._ellipsoid=u,i._colorsPerVertex=y,i._arcType=h,i._granularity=d,i):new k({positions:p,colors:f,ellipsoid:u,colorsPerVertex:y,arcType:h,granularity:d})};var E=new Array(2),L=new Array(2),A={positions:E,height:L,ellipsoid:void 0,minDistance:void 0,granularity:void 0};return k.createGeometry=function(t){var l,h,d,g,m,T=t._positions,v=t._colors,b=t._colorsPerVertex,_=t._arcType,w=t._granularity,k=t._ellipsoid,D=f.e.chordLength(w,k.maximumRadius),P=e.e(v)&&!b,C=T.length,G=0;if(_===r.L.GEODESIC||_===r.L.RHUMB){var x,I,R;_===r.L.GEODESIC?(x=f.e.chordLength(w,k.maximumRadius),I=u.m.numberOfPoints,R=u.m.generateArc):(x=w,I=u.m.numberOfPointsRhumbLine,R=u.m.generateRhumbArc);var S=u.m.extractHeights(T,k),O=A;if(_===r.L.GEODESIC?O.minDistance=D:O.granularity=w,O.ellipsoid=k,P){var U=0;for(l=0;l<C-1;l++)U+=I(T[l],T[l+1],x)+1;h=new Float64Array(3*U),g=new Uint8Array(4*U),O.positions=E,O.height=L;var V=0;for(l=0;l<C-1;++l){E[0]=T[l],E[1]=T[l+1],L[0]=S[l],L[1]=S[l+1];var q=R(O);if(e.e(v)){var N=q.length/3;m=v[l];for(var F=0;F<N;++F)g[V++]=n.e.floatToByte(m.red),g[V++]=n.e.floatToByte(m.green),g[V++]=n.e.floatToByte(m.blue),g[V++]=n.e.floatToByte(m.alpha)}h.set(q,G),G+=q.length}}else if(O.positions=T,O.height=S,h=new Float64Array(R(O)),e.e(v)){for(g=new Uint8Array(h.length/3*4),l=0;l<C-1;++l){G=B(T[l],T[l+1],v[l],v[l+1],D,g,G)}var M=v[C-1];g[G++]=n.e.floatToByte(M.red),g[G++]=n.e.floatToByte(M.green),g[G++]=n.e.floatToByte(M.blue),g[G++]=n.e.floatToByte(M.alpha)}}else{d=P?2*C-2:C,h=new Float64Array(3*d),g=e.e(v)?new Uint8Array(4*d):void 0;var H=0,W=0;for(l=0;l<C;++l){var Y=T[l];if(P&&l>0&&(a.o.pack(Y,h,H),H+=3,m=v[l-1],g[W++]=n.e.floatToByte(m.red),g[W++]=n.e.floatToByte(m.green),g[W++]=n.e.floatToByte(m.blue),g[W++]=n.e.floatToByte(m.alpha)),P&&l===C-1)break;a.o.pack(Y,h,H),H+=3,e.e(v)&&(m=v[l],g[W++]=n.e.floatToByte(m.red),g[W++]=n.e.floatToByte(m.green),g[W++]=n.e.floatToByte(m.blue),g[W++]=n.e.floatToByte(m.alpha))}}var z=new c.a;z.position=new s.o({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:h}),e.e(v)&&(z.color=new s.o({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:g,normalize:!0}));var J=2*((d=h.length/3)-1),j=p.IndexDatatype.createTypedArray(d,J),K=0;for(l=0;l<d-1;++l)j[K++]=l,j[K++]=l+1;return new s.I({attributes:z,indices:j,primitiveType:y._0x3b3836.LINES,boundingSphere:o.i.fromPoints(T)})},function(r,o){return e.e(o)&&(r=k.unpack(r,o)),r._ellipsoid=t.t.clone(r._ellipsoid),k.createGeometry(r)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createSphereGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createSphereGeometry.js index fdc2cb59..2e923c7f 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createSphereGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createSphereGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./Cartesian3-3a8bdb0b","./Check-52a7d806","./EllipsoidGeometry-1042f440","./VertexFormat-f496a3f1","./Math-ecf82623","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4"],(function(e,t,r,a,i,o,n,c,s,d,u,l,f,m,b,p,y,k,v,G){"use strict";function P(r){var i=e.u(r.radius,1),o={radii:new t.o(i,i,i),stackPartitions:r.stackPartitions,slicePartitions:r.slicePartitions,vertexFormat:r.vertexFormat};this._ellipsoidGeometry=new a.b(o),this._workerName="createSphereGeometry"}P.packedLength=a.b.packedLength,P.pack=function(e,t,i){return r.o.typeOf.object("value",e),a.b.pack(e._ellipsoidGeometry,t,i)};var _=new a.b,h={radius:void 0,radii:new t.o,vertexFormat:new i.n,stackPartitions:void 0,slicePartitions:void 0};return P.unpack=function(r,o,n){var c=a.b.unpack(r,o,_);return h.vertexFormat=i.n.clone(c._vertexFormat,h.vertexFormat),h.stackPartitions=c._stackPartitions,h.slicePartitions=c._slicePartitions,e.e(n)?(t.o.clone(c._radii,h.radii),n._ellipsoidGeometry=new a.b(h),n):(h.radius=c._radii.x,new P(h))},P.createGeometry=function(e){return a.b.createGeometry(e._ellipsoidGeometry)},function(t,r){return e.e(r)&&(t=P.unpack(t,r)),P.createGeometry(t)}})); +define(["./when-92c6cf3c","./Cartesian3-3a8bdb0b","./Check-52a7d806","./EllipsoidGeometry-19d6e145","./VertexFormat-f496a3f1","./Math-ecf82623","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4"],(function(e,t,r,a,i,o,n,c,s,d,u,l,m,f,b,p,y,k,v,G){"use strict";function P(r){var i=e.u(r.radius,1),o={radii:new t.o(i,i,i),stackPartitions:r.stackPartitions,slicePartitions:r.slicePartitions,vertexFormat:r.vertexFormat};this._ellipsoidGeometry=new a.b(o),this._workerName="createSphereGeometry"}P.packedLength=a.b.packedLength,P.pack=function(e,t,i){return r.o.typeOf.object("value",e),a.b.pack(e._ellipsoidGeometry,t,i)};var _=new a.b,h={radius:void 0,radii:new t.o,vertexFormat:new i.n,stackPartitions:void 0,slicePartitions:void 0};return P.unpack=function(r,o,n){var c=a.b.unpack(r,o,_);return h.vertexFormat=i.n.clone(c._vertexFormat,h.vertexFormat),h.stackPartitions=c._stackPartitions,h.slicePartitions=c._slicePartitions,e.e(n)?(t.o.clone(c._radii,h.radii),n._ellipsoidGeometry=new a.b(h),n):(h.radius=c._radii.x,new P(h))},P.createGeometry=function(e){return a.b.createGeometry(e._ellipsoidGeometry)},function(t,r){return e.e(r)&&(t=P.unpack(t,r)),P.createGeometry(t)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createSphereOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createSphereOutlineGeometry.js index bbc6a0d4..bce7a296 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createSphereOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createSphereOutlineGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./Cartesian3-3a8bdb0b","./Check-52a7d806","./EllipsoidOutlineGeometry-37daafe9","./Math-ecf82623","./arrayFill-0358accf","./buildModuleUrl-9eef8841","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4"],(function(e,i,t,a,r,n,o,s,c,d,u,l,f,b,p,y,m,k,v){"use strict";function G(t){var r=e.u(t.radius,1),n={radii:new i.o(r,r,r),stackPartitions:t.stackPartitions,slicePartitions:t.slicePartitions,subdivisions:t.subdivisions};this._ellipsoidGeometry=new a.x(n),this._workerName="createSphereOutlineGeometry"}G.packedLength=a.x.packedLength,G.pack=function(e,i,r){return t.o.typeOf.object("value",e),a.x.pack(e._ellipsoidGeometry,i,r)};var P=new a.x,_={radius:void 0,radii:new i.o,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};return G.unpack=function(t,r,n){var o=a.x.unpack(t,r,P);return _.stackPartitions=o._stackPartitions,_.slicePartitions=o._slicePartitions,_.subdivisions=o._subdivisions,e.e(n)?(i.o.clone(o._radii,_.radii),n._ellipsoidGeometry=new a.x(_),n):(_.radius=o._radii.x,new G(_))},G.createGeometry=function(e){return a.x.createGeometry(e._ellipsoidGeometry)},function(i,t){return e.e(t)&&(i=G.unpack(i,t)),G.createGeometry(i)}})); +define(["./when-92c6cf3c","./Cartesian3-3a8bdb0b","./Check-52a7d806","./EllipsoidOutlineGeometry-b56035c8","./Math-ecf82623","./arrayFill-0358accf","./buildModuleUrl-cbcc8c56","./Cartographic-a2c313d7","./Cartesian2-b72655a5","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-86677ec4"],(function(e,i,t,r,a,n,o,s,c,d,u,l,b,f,p,y,m,k,v){"use strict";function G(t){var a=e.u(t.radius,1),n={radii:new i.o(a,a,a),stackPartitions:t.stackPartitions,slicePartitions:t.slicePartitions,subdivisions:t.subdivisions};this._ellipsoidGeometry=new r.x(n),this._workerName="createSphereOutlineGeometry"}G.packedLength=r.x.packedLength,G.pack=function(e,i,a){return t.o.typeOf.object("value",e),r.x.pack(e._ellipsoidGeometry,i,a)};var P=new r.x,_={radius:void 0,radii:new i.o,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};return G.unpack=function(t,a,n){var o=r.x.unpack(t,a,P);return _.stackPartitions=o._stackPartitions,_.slicePartitions=o._slicePartitions,_.subdivisions=o._subdivisions,e.e(n)?(i.o.clone(o._radii,_.radii),n._ellipsoidGeometry=new r.x(_),n):(_.radius=o._radii.x,new G(_))},G.createGeometry=function(e){return r.x.createGeometry(e._ellipsoidGeometry)},function(i,t){return e.e(t)&&(i=G.unpack(i,t)),G.createGeometry(i)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createVectorTileGeometries.js b/SuperMap iEarth/public/SuperMap3D/Workers/createVectorTileGeometries.js index d4d3d32f..c8154c73 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createVectorTileGeometries.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createVectorTileGeometries.js @@ -1 +1 @@ -define(["./buildModuleUrl-9eef8841","./BoxGeometry-6f820c56","./Cartesian3-3a8bdb0b","./Color-98063b35","./CylinderGeometry-c486a245","./when-92c6cf3c","./EllipsoidGeometry-1042f440","./IndexDatatype-86677ec4","./FeatureDetection-cec0163f","./createTaskProcessorWorker","./Cartographic-a2c313d7","./Check-52a7d806","./Math-ecf82623","./Cartesian2-b72655a5","./Event-3390cd7d","./RuntimeError-c6a62a80","./arrayFill-0358accf","./ComponentDatatype-98414d16","./WebGLConstants-42651efd","./GeometryAttribute-f47bd1cb","./Cartesian4-72b88c9e","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./VertexFormat-f496a3f1","./CylinderGeometryLibrary-60eef4da"],(function(e,t,n,r,a,o,i,c,s,d,f,l,u,h,p,b,y,v,g,m,x,I,k,w,A){"use strict";function B(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var O=new n.o,C=s.p.packedLength+n.o.packedLength,L=s.p.packedLength+2,E=s.p.packedLength+n.o.packedLength,U=n.o.packedLength+1,M={modelMatrix:new s.p,boundingVolume:new e.i};function F(e,t){var r=t*C,a=n.o.unpack(e,r,O);r+=n.o.packedLength;var o=s.p.unpack(e,r,M.modelMatrix);s.p.multiplyByScale(o,a,o);var i=M.boundingVolume;return n.o.clone(n.o.ZERO,i.center),i.radius=Math.sqrt(3),M}function V(e,t){var r=t*L,a=e[r++],o=e[r++],i=n.o.fromElements(a,a,o,O),c=s.p.unpack(e,r,M.modelMatrix);s.p.multiplyByScale(c,i,c);var d=M.boundingVolume;return n.o.clone(n.o.ZERO,d.center),d.radius=Math.sqrt(2),M}function G(e,t){var r=t*E,a=n.o.unpack(e,r,O);r+=n.o.packedLength;var o=s.p.unpack(e,r,M.modelMatrix);s.p.multiplyByScale(o,a,o);var i=M.boundingVolume;return n.o.clone(n.o.ZERO,i.center),i.radius=1,M}function T(e,t){var r=t*U,a=e[r++],o=n.o.unpack(e,r,O),i=s.p.fromTranslation(o,M.modelMatrix);s.p.multiplyByUniformScale(i,a,i);var c=M.boundingVolume;return n.o.clone(n.o.ZERO,c.center),c.radius=1,M}var R=new n.o;function S(t,a,i,c,d){if(o.e(a)){for(var f=i.length,l=c.attributes.position.values,u=c.indices,h=t.positions,p=t.vertexBatchIds,b=t.indices,y=t.batchIds,v=t.batchTableColors,g=t.batchedIndices,m=t.indexOffsets,x=t.indexCounts,I=t.boundingVolumes,k=t.modelMatrix,w=t.center,A=t.positionOffset,O=t.batchIdIndex,C=t.indexOffset,L=t.batchedIndicesOffset,E=0;E<f;++E){var U=d(a,E),M=U.modelMatrix;s.p.multiply(k,M,M);for(var F=i[E],V=l.length,G=0;G<V;G+=3){var T=n.o.unpack(l,G,R);s.p.multiplyByPoint(M,T,T),n.o.subtract(T,w,T),n.o.pack(T,h,3*A+G),p[O++]=F}for(var S=u.length,D=0;D<S;++D)b[C+D]=u[D]+A;var Z=E+L;g[Z]=new B({offset:C,count:S,color:r.e.fromRgba(v[F]),batchIds:[F]}),y[Z]=F,m[Z]=C,x[Z]=S,I[Z]=e.i.transform(U.boundingVolume,M),A+=V/3,C+=S}t.positionOffset=A,t.batchIdIndex=O,t.indexOffset=C,t.batchedIndicesOffset+=f}}var D=new n.o,Z=new s.p;function P(t,n,a){var o=a.length,i=2+o*e.i.packedLength+1+function(e){for(var t=e.length,n=0,a=0;a<t;++a)n+=r.e.packedLength+3+e[a].batchIds.length;return n}(n),c=new Float64Array(i),s=0;c[s++]=t,c[s++]=o;for(var d=0;d<o;++d)e.i.pack(a[d],c,s),s+=e.i.packedLength;var f=n.length;c[s++]=f;for(var l=0;l<f;++l){var u=n[l];r.e.pack(u.color,c,s),s+=r.e.packedLength,c[s++]=u.offset,c[s++]=u.count;var h=u.batchIds,p=h.length;c[s++]=p;for(var b=0;b<p;++b)c[s++]=h[b]}return c}return d((function(e,r){var d=o.e(e.boxes)?new Float32Array(e.boxes):void 0,f=o.e(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,l=o.e(e.cylinders)?new Float32Array(e.cylinders):void 0,u=o.e(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,h=o.e(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,p=o.e(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,b=o.e(e.spheres)?new Float32Array(e.spheres):void 0,y=o.e(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,v=o.e(d)?f.length:0,g=o.e(l)?u.length:0,m=o.e(h)?p.length:0,x=o.e(b)?y.length:0,I=t.O.getUnitBox(),k=a.l.getUnitCylinder(),w=i.b.getUnitEllipsoid(),A=I.attributes.position.values,B=k.attributes.position.values,O=w.attributes.position.values,C=A.length*v;C+=B.length*g,C+=O.length*(m+x);var L=I.indices,E=k.indices,U=w.indices,M=L.length*v;M+=E.length*g,M+=U.length*(m+x);var R=new Float32Array(C),q=new Uint16Array(C/3),W=c.IndexDatatype.createTypedArray(C/3,M),_=v+g+m+x,N=new Uint16Array(_),Y=new Array(_),j=new Uint32Array(_),z=new Uint32Array(_),H=new Array(_);!function(e){var t=new Float64Array(e),r=0;n.o.unpack(t,r,D),r+=n.o.packedLength,s.p.unpack(t,r,Z)}(e.packedBuffer);var J={batchTableColors:new Uint32Array(e.batchTableColors),positions:R,vertexBatchIds:q,indices:W,batchIds:N,batchedIndices:Y,indexOffsets:j,indexCounts:z,boundingVolumes:H,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:Z,center:D};S(J,d,f,I,F),S(J,l,u,k,V),S(J,h,p,w,G),S(J,b,y,w,T);var K=P(W.BYTES_PER_ELEMENT,Y,H);return r.push(R.buffer,q.buffer,W.buffer),r.push(N.buffer,j.buffer,z.buffer),r.push(K.buffer),{positions:R.buffer,vertexBatchIds:q.buffer,indices:W.buffer,indexOffsets:j.buffer,indexCounts:z.buffer,batchIds:N.buffer,packedBuffer:K.buffer}}))})); +define(["./buildModuleUrl-cbcc8c56","./BoxGeometry-74de4379","./Cartesian3-3a8bdb0b","./Color-b1bd525f","./CylinderGeometry-9e5c168d","./when-92c6cf3c","./EllipsoidGeometry-19d6e145","./IndexDatatype-86677ec4","./FeatureDetection-fd297af4","./createTaskProcessorWorker","./Cartographic-a2c313d7","./Check-52a7d806","./Math-ecf82623","./Cartesian2-b72655a5","./Event-3390cd7d","./RuntimeError-c6a62a80","./arrayFill-0358accf","./ComponentDatatype-98414d16","./WebGLConstants-42651efd","./GeometryAttribute-65cf868d","./Cartesian4-72b88c9e","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./VertexFormat-f496a3f1","./CylinderGeometryLibrary-60eef4da"],(function(e,t,n,r,a,o,i,c,d,s,f,l,u,h,p,b,y,v,g,m,x,I,k,w,A){"use strict";function B(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var O=new n.o,C=d.p.packedLength+n.o.packedLength,L=d.p.packedLength+2,E=d.p.packedLength+n.o.packedLength,U=n.o.packedLength+1,M={modelMatrix:new d.p,boundingVolume:new e.i};function F(e,t){var r=t*C,a=n.o.unpack(e,r,O);r+=n.o.packedLength;var o=d.p.unpack(e,r,M.modelMatrix);d.p.multiplyByScale(o,a,o);var i=M.boundingVolume;return n.o.clone(n.o.ZERO,i.center),i.radius=Math.sqrt(3),M}function V(e,t){var r=t*L,a=e[r++],o=e[r++],i=n.o.fromElements(a,a,o,O),c=d.p.unpack(e,r,M.modelMatrix);d.p.multiplyByScale(c,i,c);var s=M.boundingVolume;return n.o.clone(n.o.ZERO,s.center),s.radius=Math.sqrt(2),M}function G(e,t){var r=t*E,a=n.o.unpack(e,r,O);r+=n.o.packedLength;var o=d.p.unpack(e,r,M.modelMatrix);d.p.multiplyByScale(o,a,o);var i=M.boundingVolume;return n.o.clone(n.o.ZERO,i.center),i.radius=1,M}function T(e,t){var r=t*U,a=e[r++],o=n.o.unpack(e,r,O),i=d.p.fromTranslation(o,M.modelMatrix);d.p.multiplyByUniformScale(i,a,i);var c=M.boundingVolume;return n.o.clone(n.o.ZERO,c.center),c.radius=1,M}var R=new n.o;function S(t,a,i,c,s){if(o.e(a)){for(var f=i.length,l=c.attributes.position.values,u=c.indices,h=t.positions,p=t.vertexBatchIds,b=t.indices,y=t.batchIds,v=t.batchTableColors,g=t.batchedIndices,m=t.indexOffsets,x=t.indexCounts,I=t.boundingVolumes,k=t.modelMatrix,w=t.center,A=t.positionOffset,O=t.batchIdIndex,C=t.indexOffset,L=t.batchedIndicesOffset,E=0;E<f;++E){var U=s(a,E),M=U.modelMatrix;d.p.multiply(k,M,M);for(var F=i[E],V=l.length,G=0;G<V;G+=3){var T=n.o.unpack(l,G,R);d.p.multiplyByPoint(M,T,T),n.o.subtract(T,w,T),n.o.pack(T,h,3*A+G),p[O++]=F}for(var S=u.length,D=0;D<S;++D)b[C+D]=u[D]+A;var Z=E+L;g[Z]=new B({offset:C,count:S,color:r.e.fromRgba(v[F]),batchIds:[F]}),y[Z]=F,m[Z]=C,x[Z]=S,I[Z]=e.i.transform(U.boundingVolume,M),A+=V/3,C+=S}t.positionOffset=A,t.batchIdIndex=O,t.indexOffset=C,t.batchedIndicesOffset+=f}}var D=new n.o,Z=new d.p;function P(t,n,a){var o=a.length,i=2+o*e.i.packedLength+1+function(e){for(var t=e.length,n=0,a=0;a<t;++a)n+=r.e.packedLength+3+e[a].batchIds.length;return n}(n),c=new Float64Array(i),d=0;c[d++]=t,c[d++]=o;for(var s=0;s<o;++s)e.i.pack(a[s],c,d),d+=e.i.packedLength;var f=n.length;c[d++]=f;for(var l=0;l<f;++l){var u=n[l];r.e.pack(u.color,c,d),d+=r.e.packedLength,c[d++]=u.offset,c[d++]=u.count;var h=u.batchIds,p=h.length;c[d++]=p;for(var b=0;b<p;++b)c[d++]=h[b]}return c}return s((function(e,r){var s=o.e(e.boxes)?new Float32Array(e.boxes):void 0,f=o.e(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,l=o.e(e.cylinders)?new Float32Array(e.cylinders):void 0,u=o.e(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,h=o.e(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,p=o.e(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,b=o.e(e.spheres)?new Float32Array(e.spheres):void 0,y=o.e(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,v=o.e(s)?f.length:0,g=o.e(l)?u.length:0,m=o.e(h)?p.length:0,x=o.e(b)?y.length:0,I=t.O.getUnitBox(),k=a.l.getUnitCylinder(),w=i.b.getUnitEllipsoid(),A=I.attributes.position.values,B=k.attributes.position.values,O=w.attributes.position.values,C=A.length*v;C+=B.length*g,C+=O.length*(m+x);var L=I.indices,E=k.indices,U=w.indices,M=L.length*v;M+=E.length*g,M+=U.length*(m+x);var R=new Float32Array(C),q=new Uint16Array(C/3),W=c.IndexDatatype.createTypedArray(C/3,M),_=v+g+m+x,N=new Uint16Array(_),Y=new Array(_),j=new Uint32Array(_),z=new Uint32Array(_),H=new Array(_);!function(e){var t=new Float64Array(e),r=0;n.o.unpack(t,r,D),r+=n.o.packedLength,d.p.unpack(t,r,Z)}(e.packedBuffer);var J={batchTableColors:new Uint32Array(e.batchTableColors),positions:R,vertexBatchIds:q,indices:W,batchIds:N,batchedIndices:Y,indexOffsets:j,indexCounts:z,boundingVolumes:H,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:Z,center:D};S(J,s,f,I,F),S(J,l,u,k,V),S(J,h,p,w,G),S(J,b,y,w,T);var K=P(W.BYTES_PER_ELEMENT,Y,H);return r.push(R.buffer,q.buffer,W.buffer),r.push(N.buffer,j.buffer,z.buffer),r.push(K.buffer),{positions:R.buffer,vertexBatchIds:q.buffer,indices:W.buffer,indexOffsets:j.buffer,indexCounts:z.buffer,batchIds:N.buffer,packedBuffer:K.buffer}}))})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createVectorTilePolygons.js b/SuperMap iEarth/public/SuperMap3D/Workers/createVectorTilePolygons.js index 86f95844..61151dad 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createVectorTilePolygons.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createVectorTilePolygons.js @@ -1 +1 @@ -define(["./AttributeCompression-b5a80a71","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Color-98063b35","./when-92c6cf3c","./Cartesian2-b72655a5","./IndexDatatype-86677ec4","./Math-ecf82623","./OrientedBoundingBox-d2eb0b92","./createTaskProcessorWorker","./Check-52a7d806","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./buildModuleUrl-9eef8841","./Event-3390cd7d","./EllipsoidTangentPlane-d6b88a1f","./IntersectionTests-6e80d61c","./Plane-33393da8","./GeometryAttribute-f47bd1cb","./PolygonPipeline-425528b3","./ComponentDatatype-98414d16","./EllipsoidRhumbLine-b1a766ae"],(function(e,a,r,t,n,o,i,f,s,c,d,h,u,l,b,p,y,g,v,I,m,w,x,A){"use strict";var N=new a.o,k=new o.t,E=new o.h,T={min:void 0,max:void 0,indexBytesPerElement:void 0};function L(e,a,r){var n=a.length,o=2+n*s.y.packedLength+1+function(e){for(var a=e.length,r=0,n=0;n<a;++n)r+=t.e.packedLength+3+e[n].batchIds.length;return r}(r),i=new Float64Array(o),f=0;i[f++]=e,i[f++]=n;for(var c=0;c<n;++c)s.y.pack(a[c],i,f),f+=s.y.packedLength;var d=r.length;i[f++]=d;for(var h=0;h<d;++h){var u=r[h];t.e.pack(u.color,i,f),f+=t.e.packedLength,i[f++]=u.offset,i[f++]=u.count;var l=u.batchIds,b=l.length;i[f++]=b;for(var p=0;p<b;++p)i[f++]=l[p]}return i}var C=new a.o,P=new a.o,U=new a.o,O=new a.o,F=new a.o,B=new r.a,D=new o.h;return c((function(c,d){var h;!function(e){var r=new Float64Array(e),t=0;T.indexBytesPerElement=r[t++],T.min=r[t++],T.max=r[t++],a.o.unpack(r,t,N),t+=a.o.packedLength,o.t.unpack(r,t,k),t+=o.t.packedLength,o.h.unpack(r,t,E)}(c.packedBuffer),h=2===T.indexBytesPerElement?new Uint16Array(c.indices):new Uint32Array(c.indices);var u,l,b,p=new Uint16Array(c.positions),y=new Uint32Array(c.counts),g=new Uint32Array(c.indexCounts),v=new Uint32Array(c.batchIds),I=new Uint32Array(c.batchTableColors),m=new Array(y.length),w=N,x=k,A=E,S=T.min,_=T.max,G=c.minimumHeights,M=c.maximumHeights;n.e(G)&&n.e(M)&&(G=new Float32Array(G),M=new Float32Array(M));var R=p.length/2,Y=p.subarray(0,R),V=p.subarray(R,2*R);e.t.zigZagDeltaDecode(Y,V);var H=new Float32Array(3*R);for(u=0;u<R;++u){var W=Y[u],z=V[u],Z=f.e.lerp(A.west,A.east,W/32767),j=f.e.lerp(A.south,A.north,z/32767),q=r.a.fromRadians(Z,j,0,B),J=x.cartographicToCartesian(q,C);a.o.pack(J,H,3*u)}var K=y.length,Q=new Array(K),X=new Array(K),$=0,ee=0;for(u=0;u<K;++u)Q[u]=$,X[u]=ee,$+=y[u],ee+=g[u];var ae,re=new Float32Array(3*R*2),te=new Uint16Array(2*R),ne=new Uint32Array(X.length),oe=new Uint32Array(g.length),ie=[],fe={};for(u=0;u<K;++u)b=I[u],n.e(fe[b])?(fe[b].positionLength+=y[u],fe[b].indexLength+=g[u],fe[b].batchIds.push(u)):fe[b]={positionLength:y[u],indexLength:g[u],offset:0,indexOffset:0,batchIds:[u]};var se=0,ce=0;for(b in fe)if(fe.hasOwnProperty(b)){(ae=fe[b]).offset=se,ae.indexOffset=ce;var de=2*ae.positionLength,he=2*ae.indexLength+6*ae.positionLength;se+=de,ce+=he,ae.indexLength=he}var ue=[];for(b in fe)fe.hasOwnProperty(b)&&(ae=fe[b],ue.push({color:t.e.fromRgba(parseInt(b)),offset:ae.indexOffset,count:ae.indexLength,batchIds:ae.batchIds}));for(u=0;u<K;++u){var le=(ae=fe[b=I[u]]).offset,be=3*le,pe=le,ye=Q[u],ge=y[u],ve=v[u],Ie=S,me=_;n.e(G)&&n.e(M)&&(Ie=G[u],me=M[u]);var we=Number.POSITIVE_INFINITY,xe=Number.NEGATIVE_INFINITY,Ae=Number.POSITIVE_INFINITY,Ne=Number.NEGATIVE_INFINITY;for(l=0;l<ge;++l){var ke=a.o.unpack(H,3*ye+3*l,C);x.scaleToGeodeticSurface(ke,ke);var Ee=x.cartesianToCartographic(ke,B),Te=Ee.latitude,Le=Ee.longitude;we=Math.min(Te,we),xe=Math.max(Te,xe),Ae=Math.min(Le,Ae),Ne=Math.max(Le,Ne);var Ce=x.geodeticSurfaceNormal(ke,P),Pe=a.o.multiplyByScalar(Ce,Ie,U),Ue=a.o.add(ke,Pe,O);Pe=a.o.multiplyByScalar(Ce,me,Pe);var Oe=a.o.add(ke,Pe,F);a.o.subtract(Oe,w,Oe),a.o.subtract(Ue,w,Ue),a.o.pack(Oe,re,be),a.o.pack(Ue,re,be+3),te[pe]=ve,te[pe+1]=ve,be+=6,pe+=2}(A=D).west=Ae,A.east=Ne,A.south=we,A.north=xe,m[u]=s.y.fromRectangle(A,S,_,x);var Fe=ae.indexOffset,Be=X[u],De=g[u];for(ne[u]=Fe,l=0;l<De;l+=3){var Se=h[Be+l]-ye,_e=h[Be+l+1]-ye,Ge=h[Be+l+2]-ye;ie[Fe++]=2*Se+le,ie[Fe++]=2*_e+le,ie[Fe++]=2*Ge+le,ie[Fe++]=2*Ge+1+le,ie[Fe++]=2*_e+1+le,ie[Fe++]=2*Se+1+le}for(l=0;l<ge;++l){var Me=l,Re=(l+1)%ge;ie[Fe++]=2*Me+1+le,ie[Fe++]=2*Re+le,ie[Fe++]=2*Me+le,ie[Fe++]=2*Me+1+le,ie[Fe++]=2*Re+1+le,ie[Fe++]=2*Re+le}ae.offset+=2*ge,ae.indexOffset=Fe,oe[u]=Fe-ne[u]}ie=i.IndexDatatype.createTypedArray(re.length/3,ie);for(var Ye=ue.length,Ve=0;Ve<Ye;++Ve){for(var He=ue[Ve].batchIds,We=0,ze=He.length,Ze=0;Ze<ze;++Ze)We+=oe[He[Ze]];ue[Ve].count=We}var je=L(2===ie.BYTES_PER_ELEMENT?i.IndexDatatype.UNSIGNED_SHORT:i.IndexDatatype.UNSIGNED_INT,m,ue);return d.push(re.buffer,ie.buffer,ne.buffer,oe.buffer,te.buffer,je.buffer),{positions:re.buffer,indices:ie.buffer,indexOffsets:ne.buffer,indexCounts:oe.buffer,batchIds:te.buffer,packedBuffer:je.buffer}}))})); +define(["./AttributeCompression-b5a80a71","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./Color-b1bd525f","./when-92c6cf3c","./Cartesian2-b72655a5","./IndexDatatype-86677ec4","./Math-ecf82623","./OrientedBoundingBox-42d3d74a","./createTaskProcessorWorker","./Check-52a7d806","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./buildModuleUrl-cbcc8c56","./Event-3390cd7d","./EllipsoidTangentPlane-c500945e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./GeometryAttribute-65cf868d","./PolygonPipeline-c329dec3","./ComponentDatatype-98414d16","./EllipsoidRhumbLine-b1a766ae"],(function(e,a,r,t,n,o,i,f,c,s,d,h,u,l,b,p,y,g,v,I,m,w,x,A){"use strict";var N=new a.o,k=new o.t,E=new o.h,T={min:void 0,max:void 0,indexBytesPerElement:void 0};function L(e,a,r){var n=a.length,o=2+n*c.y.packedLength+1+function(e){for(var a=e.length,r=0,n=0;n<a;++n)r+=t.e.packedLength+3+e[n].batchIds.length;return r}(r),i=new Float64Array(o),f=0;i[f++]=e,i[f++]=n;for(var s=0;s<n;++s)c.y.pack(a[s],i,f),f+=c.y.packedLength;var d=r.length;i[f++]=d;for(var h=0;h<d;++h){var u=r[h];t.e.pack(u.color,i,f),f+=t.e.packedLength,i[f++]=u.offset,i[f++]=u.count;var l=u.batchIds,b=l.length;i[f++]=b;for(var p=0;p<b;++p)i[f++]=l[p]}return i}var C=new a.o,P=new a.o,U=new a.o,O=new a.o,F=new a.o,B=new r.a,D=new o.h;return s((function(s,d){var h;!function(e){var r=new Float64Array(e),t=0;T.indexBytesPerElement=r[t++],T.min=r[t++],T.max=r[t++],a.o.unpack(r,t,N),t+=a.o.packedLength,o.t.unpack(r,t,k),t+=o.t.packedLength,o.h.unpack(r,t,E)}(s.packedBuffer),h=2===T.indexBytesPerElement?new Uint16Array(s.indices):new Uint32Array(s.indices);var u,l,b,p=new Uint16Array(s.positions),y=new Uint32Array(s.counts),g=new Uint32Array(s.indexCounts),v=new Uint32Array(s.batchIds),I=new Uint32Array(s.batchTableColors),m=new Array(y.length),w=N,x=k,A=E,S=T.min,_=T.max,G=s.minimumHeights,M=s.maximumHeights;n.e(G)&&n.e(M)&&(G=new Float32Array(G),M=new Float32Array(M));var R=p.length/2,Y=p.subarray(0,R),V=p.subarray(R,2*R);e.t.zigZagDeltaDecode(Y,V);var H=new Float32Array(3*R);for(u=0;u<R;++u){var W=Y[u],z=V[u],Z=f.e.lerp(A.west,A.east,W/32767),j=f.e.lerp(A.south,A.north,z/32767),q=r.a.fromRadians(Z,j,0,B),J=x.cartographicToCartesian(q,C);a.o.pack(J,H,3*u)}var K=y.length,Q=new Array(K),X=new Array(K),$=0,ee=0;for(u=0;u<K;++u)Q[u]=$,X[u]=ee,$+=y[u],ee+=g[u];var ae,re=new Float32Array(3*R*2),te=new Uint16Array(2*R),ne=new Uint32Array(X.length),oe=new Uint32Array(g.length),ie=[],fe={};for(u=0;u<K;++u)b=I[u],n.e(fe[b])?(fe[b].positionLength+=y[u],fe[b].indexLength+=g[u],fe[b].batchIds.push(u)):fe[b]={positionLength:y[u],indexLength:g[u],offset:0,indexOffset:0,batchIds:[u]};var ce=0,se=0;for(b in fe)if(fe.hasOwnProperty(b)){(ae=fe[b]).offset=ce,ae.indexOffset=se;var de=2*ae.positionLength,he=2*ae.indexLength+6*ae.positionLength;ce+=de,se+=he,ae.indexLength=he}var ue=[];for(b in fe)fe.hasOwnProperty(b)&&(ae=fe[b],ue.push({color:t.e.fromRgba(parseInt(b)),offset:ae.indexOffset,count:ae.indexLength,batchIds:ae.batchIds}));for(u=0;u<K;++u){var le=(ae=fe[b=I[u]]).offset,be=3*le,pe=le,ye=Q[u],ge=y[u],ve=v[u],Ie=S,me=_;n.e(G)&&n.e(M)&&(Ie=G[u],me=M[u]);var we=Number.POSITIVE_INFINITY,xe=Number.NEGATIVE_INFINITY,Ae=Number.POSITIVE_INFINITY,Ne=Number.NEGATIVE_INFINITY;for(l=0;l<ge;++l){var ke=a.o.unpack(H,3*ye+3*l,C);x.scaleToGeodeticSurface(ke,ke);var Ee=x.cartesianToCartographic(ke,B),Te=Ee.latitude,Le=Ee.longitude;we=Math.min(Te,we),xe=Math.max(Te,xe),Ae=Math.min(Le,Ae),Ne=Math.max(Le,Ne);var Ce=x.geodeticSurfaceNormal(ke,P),Pe=a.o.multiplyByScalar(Ce,Ie,U),Ue=a.o.add(ke,Pe,O);Pe=a.o.multiplyByScalar(Ce,me,Pe);var Oe=a.o.add(ke,Pe,F);a.o.subtract(Oe,w,Oe),a.o.subtract(Ue,w,Ue),a.o.pack(Oe,re,be),a.o.pack(Ue,re,be+3),te[pe]=ve,te[pe+1]=ve,be+=6,pe+=2}(A=D).west=Ae,A.east=Ne,A.south=we,A.north=xe,m[u]=c.y.fromRectangle(A,S,_,x);var Fe=ae.indexOffset,Be=X[u],De=g[u];for(ne[u]=Fe,l=0;l<De;l+=3){var Se=h[Be+l]-ye,_e=h[Be+l+1]-ye,Ge=h[Be+l+2]-ye;ie[Fe++]=2*Se+le,ie[Fe++]=2*_e+le,ie[Fe++]=2*Ge+le,ie[Fe++]=2*Ge+1+le,ie[Fe++]=2*_e+1+le,ie[Fe++]=2*Se+1+le}for(l=0;l<ge;++l){var Me=l,Re=(l+1)%ge;ie[Fe++]=2*Me+1+le,ie[Fe++]=2*Re+le,ie[Fe++]=2*Me+le,ie[Fe++]=2*Me+1+le,ie[Fe++]=2*Re+1+le,ie[Fe++]=2*Re+le}ae.offset+=2*ge,ae.indexOffset=Fe,oe[u]=Fe-ne[u]}ie=i.IndexDatatype.createTypedArray(re.length/3,ie);for(var Ye=ue.length,Ve=0;Ve<Ye;++Ve){for(var He=ue[Ve].batchIds,We=0,ze=He.length,Ze=0;Ze<ze;++Ze)We+=oe[He[Ze]];ue[Ve].count=We}var je=L(2===ie.BYTES_PER_ELEMENT?i.IndexDatatype.UNSIGNED_SHORT:i.IndexDatatype.UNSIGNED_INT,m,ue);return d.push(re.buffer,ie.buffer,ne.buffer,oe.buffer,te.buffer,je.buffer),{positions:re.buffer,indices:ie.buffer,indexOffsets:ne.buffer,indexCounts:oe.buffer,batchIds:te.buffer,packedBuffer:je.buffer}}))})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js b/SuperMap iEarth/public/SuperMap3D/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js index 0fd21ecd..e2275198 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js @@ -1 +1 @@ -define(["./EllipsoidTangentPlane-d6b88a1f","./buildModuleUrl-9eef8841","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./when-92c6cf3c","./TerrainEncoding-fd44afa8","./Math-ecf82623","./FeatureDetection-cec0163f","./OrientedBoundingBox-d2eb0b92","./RuntimeError-c6a62a80","./GeometryAttribute-f47bd1cb","./WebMercatorProjection-ee891935","./createTaskProcessorWorker","./Check-52a7d806","./Cartesian4-72b88c9e","./IntersectionTests-6e80d61c","./Plane-33393da8","./Event-3390cd7d","./AttributeCompression-b5a80a71","./ComponentDatatype-98414d16","./WebGLConstants-42651efd","./PolygonPipeline-425528b3","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,n,i,r,a,o,u,s,d,c,h,l,g,m,p,v,I,E,T,f,b,N,x){"use strict";var S=Uint16Array.BYTES_PER_ELEMENT,w=Int32Array.BYTES_PER_ELEMENT,P=Uint32Array.BYTES_PER_ELEMENT,y=Float32Array.BYTES_PER_ELEMENT,A=Float64Array.BYTES_PER_ELEMENT;function M(e,t,n){n=a.u(n,u.e);for(var i=e.length,r=0;r<i;++r)if(n.equalsEpsilon(e[r],t,u.e.EPSILON12))return r;return-1}var R=new r.a,B=new i.o,C=new i.o,_=new i.o,F=new s.p;function W(e,t,o,d,c,h,l,g,m,p){for(var v=l.length,I=0;I<v;++I){var E=l[I],T=E.cartographic,f=E.index,b=e.length,N=T.longitude,x=T.latitude;x=u.e.clamp(x,-u.e.PI_OVER_TWO,u.e.PI_OVER_TWO);var S=T.height-h.skirtHeight;h.hMin=Math.min(h.hMin,S),r.a.fromRadians(N,x,S,R),m&&(R.longitude+=g),m?I===v-1?R.latitude+=p:0===I&&(R.latitude-=p):R.latitude+=g;var w=h.ellipsoid.cartographicToCartesian(R);e.push(w),t.push(S),o.push(n.o.clone(o[f])),d.length>0&&d.push(d[f]),s.p.multiplyByPoint(h.toENU,w,B);var P=h.minimum,y=h.maximum;i.o.minimumByComponent(B,P,P),i.o.maximumByComponent(B,y,y);var A=h.lastBorderPoint;if(a.e(A)){var M=A.index;c.push(M,b-1,b,b,f,M)}h.lastBorderPoint=E}}return g((function(g,m){g.ellipsoid=n.t.clone(g.ellipsoid),g.rectangle=n.h.clone(g.rectangle);var p=function(g,m,p,v,I,E,T,f,b,N){var x,U,Y,k,L,O;a.e(v)?(x=v.west,U=v.south,Y=v.east,k=v.north,L=v.width,O=v.height):(x=u.e.toRadians(I.west),U=u.e.toRadians(I.south),Y=u.e.toRadians(I.east),k=u.e.toRadians(I.north),L=u.e.toRadians(v.width),O=u.e.toRadians(v.height));var V,H,D=[U,k],G=[x,Y],z=h.m.eastNorthUpToFixedFrame(m,p),j=s.p.inverseTransformation(z,F);f&&(V=l.t.geodeticLatitudeToMercatorAngle(U),H=1/(l.t.geodeticLatitudeToMercatorAngle(k)-V));var q=new DataView(g),J=Number.POSITIVE_INFINITY,K=Number.NEGATIVE_INFINITY,Q=C;Q.x=Number.POSITIVE_INFINITY,Q.y=Number.POSITIVE_INFINITY,Q.z=Number.POSITIVE_INFINITY;var X=_;X.x=Number.NEGATIVE_INFINITY,X.y=Number.NEGATIVE_INFINITY,X.z=Number.NEGATIVE_INFINITY;var Z,$,ee=0,te=0,ne=0;for($=0;$<4;++$){var ie=ee;Z=q.getUint32(ie,!0),ie+=P;var re=u.e.toRadians(180*q.getFloat64(ie,!0));ie+=A,-1===M(G,re)&&G.push(re);var ae=u.e.toRadians(180*q.getFloat64(ie,!0));ie+=A,-1===M(D,ae)&&D.push(ae),ie+=2*A;var oe=q.getInt32(ie,!0);ie+=w,te+=oe,ne+=3*(oe=q.getInt32(ie,!0)),ee+=Z+P}var ue=[],se=[],de=new Array(te),ce=new Array(te),he=new Array(te),le=f?new Array(te):[],ge=new Array(ne),me=[],pe=[],ve=[],Ie=[],Ee=0,Te=0;for(ee=0,$=0;$<4;++$){Z=q.getUint32(ee,!0);var fe=ee+=P,be=u.e.toRadians(180*q.getFloat64(ee,!0));ee+=A;var Ne=u.e.toRadians(180*q.getFloat64(ee,!0));ee+=A;var xe=u.e.toRadians(180*q.getFloat64(ee,!0)),Se=.5*xe;ee+=A;var we=u.e.toRadians(180*q.getFloat64(ee,!0)),Pe=.5*we;ee+=A;var ye=q.getInt32(ee,!0);ee+=w;var Ae=q.getInt32(ee,!0);ee+=w,ee+=w;for(var Me=new Array(ye),Re=0;Re<ye;++Re){var Be=be+q.getUint8(ee++)*xe;R.longitude=Be;var Ce=Ne+q.getUint8(ee++)*we;R.latitude=Ce;var _e=q.getFloat32(ee,!0);if(ee+=y,0!==_e&&_e<N&&(_e*=-Math.pow(2,b)),_e*=6371010*E,R.height=_e,-1!==M(G,Be)||-1!==M(D,Ce)){var Fe=M(ue,R,r.a);if(-1!==Fe){Me[Re]=se[Fe];continue}ue.push(r.a.clone(R)),se.push(Ee)}Me[Re]=Ee,Math.abs(Be-x)<Se?me.push({index:Ee,cartographic:r.a.clone(R)}):Math.abs(Be-Y)<Se?ve.push({index:Ee,cartographic:r.a.clone(R)}):Math.abs(Ce-U)<Pe?pe.push({index:Ee,cartographic:r.a.clone(R)}):Math.abs(Ce-k)<Pe&&Ie.push({index:Ee,cartographic:r.a.clone(R)}),J=Math.min(_e,J),K=Math.max(_e,K),he[Ee]=_e;var We=p.cartographicToCartesian(R);de[Ee]=We,f&&(le[Ee]=(l.t.geodeticLatitudeToMercatorAngle(Ce)-V)*H),s.p.multiplyByPoint(j,We,B),i.o.minimumByComponent(B,Q,Q),i.o.maximumByComponent(B,X,X);var Ue=(Be-x)/(Y-x);Ue=u.e.clamp(Ue,0,1);var Ye=(Ce-U)/(k-U);Ye=u.e.clamp(Ye,0,1),ce[Ee]=new n.o(Ue,Ye),++Ee}for(var ke=3*Ae,Le=0;Le<ke;++Le,++Te)ge[Te]=Me[q.getUint16(ee,!0)],ee+=S;if(Z!==ee-fe)throw new c.t("Invalid terrain tile.")}de.length=Ee,ce.length=Ee,he.length=Ee,f&&(le.length=Ee);var Oe=Ee,Ve=Te,He={hMin:J,lastBorderPoint:void 0,skirtHeight:T,toENU:j,ellipsoid:p,minimum:Q,maximum:X};me.sort((function(e,t){return t.cartographic.latitude-e.cartographic.latitude})),pe.sort((function(e,t){return e.cartographic.longitude-t.cartographic.longitude})),ve.sort((function(e,t){return e.cartographic.latitude-t.cartographic.latitude})),Ie.sort((function(e,t){return t.cartographic.longitude-e.cartographic.longitude}));var De=1e-5;if(W(de,he,ce,le,ge,He,me,-De*L,!0,-De*O),W(de,he,ce,le,ge,He,pe,-De*O,!1),W(de,he,ce,le,ge,He,ve,De*L,!0,De*O),W(de,he,ce,le,ge,He,Ie,De*O,!1),me.length>0&&Ie.length>0){var Ge=me[0].index,ze=Oe,je=Ie[Ie.length-1].index,qe=de.length-1;ge.push(je,qe,ze,ze,Ge,je)}te=de.length;var Je,Ke=t.i.fromPoints(de);a.e(v)&&(Je=d.y.fromRectangle(v,J,K,p));for(var Qe=new o.s(p).computeHorizonCullingPointPossiblyUnderEllipsoid(m,de,J),Xe=new e.e(Q,X,m),Ze=new o.h(Xe,He.hMin,K,z,!1,f),$e=new Float32Array(te*Ze.getStride()),et=0,tt=0;tt<te;++tt)et=Ze.encode($e,et,de[tt],ce[tt],he[tt],void 0,le[tt]);var nt=me.map((function(e){return e.index})).reverse(),it=pe.map((function(e){return e.index})).reverse(),rt=ve.map((function(e){return e.index})).reverse(),at=Ie.map((function(e){return e.index})).reverse();return it.unshift(rt[rt.length-1]),it.push(nt[0]),at.unshift(nt[nt.length-1]),at.push(rt[0]),{vertices:$e,indices:new Uint16Array(ge),maximumHeight:K,minimumHeight:J,encoding:Ze,boundingSphere3D:Ke,orientedBoundingBox:Je,occludeePointInScaledSpace:Qe,vertexCountWithoutSkirts:Oe,indexCountWithoutSkirts:Ve,westIndicesSouthToNorth:nt,southIndicesEastToWest:it,eastIndicesNorthToSouth:rt,northIndicesWestToEast:at}}(g.buffer,g.relativeToCenter,g.ellipsoid,g.rectangle,g.nativeRectangle,g.exaggeration,g.skirtHeight,g.includeWebMercatorT,g.negativeAltitudeExponentBias,g.negativeElevationThreshold),v=p.vertices;m.push(v.buffer);var I=p.indices;return m.push(I.buffer),{vertices:v.buffer,indices:I.buffer,numberOfAttributes:p.encoding.getStride(),minimumHeight:p.minimumHeight,maximumHeight:p.maximumHeight,boundingSphere3D:p.boundingSphere3D,orientedBoundingBox:p.orientedBoundingBox,occludeePointInScaledSpace:p.occludeePointInScaledSpace,encoding:p.encoding,vertexCountWithoutSkirts:p.vertexCountWithoutSkirts,indexCountWithoutSkirts:p.indexCountWithoutSkirts,westIndicesSouthToNorth:p.westIndicesSouthToNorth,southIndicesEastToWest:p.southIndicesEastToWest,eastIndicesNorthToSouth:p.eastIndicesNorthToSouth,northIndicesWestToEast:p.northIndicesWestToEast}}))})); +define(["./EllipsoidTangentPlane-c500945e","./buildModuleUrl-cbcc8c56","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./when-92c6cf3c","./TerrainEncoding-231c7a61","./Math-ecf82623","./FeatureDetection-fd297af4","./OrientedBoundingBox-42d3d74a","./RuntimeError-c6a62a80","./GeometryAttribute-65cf868d","./WebMercatorProjection-ee891935","./createTaskProcessorWorker","./Check-52a7d806","./Cartesian4-72b88c9e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./Event-3390cd7d","./AttributeCompression-b5a80a71","./ComponentDatatype-98414d16","./WebGLConstants-42651efd","./PolygonPipeline-c329dec3","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,n,i,r,a,o,u,s,c,d,h,l,g,m,p,v,I,E,T,f,N,b,x){"use strict";var S=Uint16Array.BYTES_PER_ELEMENT,w=Int32Array.BYTES_PER_ELEMENT,P=Uint32Array.BYTES_PER_ELEMENT,y=Float32Array.BYTES_PER_ELEMENT,A=Float64Array.BYTES_PER_ELEMENT;function M(e,t,n){n=a.u(n,u.e);for(var i=e.length,r=0;r<i;++r)if(n.equalsEpsilon(e[r],t,u.e.EPSILON12))return r;return-1}var R=new r.a,B=new i.o,C=new i.o,_=new i.o,F=new s.p;function W(e,t,o,c,d,h,l,g,m,p){for(var v=l.length,I=0;I<v;++I){var E=l[I],T=E.cartographic,f=E.index,N=e.length,b=T.longitude,x=T.latitude;x=u.e.clamp(x,-u.e.PI_OVER_TWO,u.e.PI_OVER_TWO);var S=T.height-h.skirtHeight;h.hMin=Math.min(h.hMin,S),r.a.fromRadians(b,x,S,R),m&&(R.longitude+=g),m?I===v-1?R.latitude+=p:0===I&&(R.latitude-=p):R.latitude+=g;var w=h.ellipsoid.cartographicToCartesian(R);e.push(w),t.push(S),o.push(n.o.clone(o[f])),c.length>0&&c.push(c[f]),s.p.multiplyByPoint(h.toENU,w,B);var P=h.minimum,y=h.maximum;i.o.minimumByComponent(B,P,P),i.o.maximumByComponent(B,y,y);var A=h.lastBorderPoint;if(a.e(A)){var M=A.index;d.push(M,N-1,N,N,f,M)}h.lastBorderPoint=E}}return g((function(g,m){g.ellipsoid=n.t.clone(g.ellipsoid),g.rectangle=n.h.clone(g.rectangle);var p=function(g,m,p,v,I,E,T,f,N,b){var x,U,Y,k,L,O;a.e(v)?(x=v.west,U=v.south,Y=v.east,k=v.north,L=v.width,O=v.height):(x=u.e.toRadians(I.west),U=u.e.toRadians(I.south),Y=u.e.toRadians(I.east),k=u.e.toRadians(I.north),L=u.e.toRadians(v.width),O=u.e.toRadians(v.height));var V,H,D=[U,k],G=[x,Y],z=h.m.eastNorthUpToFixedFrame(m,p),j=s.p.inverseTransformation(z,F);f&&(V=l.t.geodeticLatitudeToMercatorAngle(U),H=1/(l.t.geodeticLatitudeToMercatorAngle(k)-V));var q=new DataView(g),J=Number.POSITIVE_INFINITY,K=Number.NEGATIVE_INFINITY,Q=C;Q.x=Number.POSITIVE_INFINITY,Q.y=Number.POSITIVE_INFINITY,Q.z=Number.POSITIVE_INFINITY;var X=_;X.x=Number.NEGATIVE_INFINITY,X.y=Number.NEGATIVE_INFINITY,X.z=Number.NEGATIVE_INFINITY;var Z,$,ee=0,te=0,ne=0;for($=0;$<4;++$){var ie=ee;Z=q.getUint32(ie,!0),ie+=P;var re=u.e.toRadians(180*q.getFloat64(ie,!0));ie+=A,-1===M(G,re)&&G.push(re);var ae=u.e.toRadians(180*q.getFloat64(ie,!0));ie+=A,-1===M(D,ae)&&D.push(ae),ie+=2*A;var oe=q.getInt32(ie,!0);ie+=w,te+=oe,ne+=3*(oe=q.getInt32(ie,!0)),ee+=Z+P}var ue=[],se=[],ce=new Array(te),de=new Array(te),he=new Array(te),le=f?new Array(te):[],ge=new Array(ne),me=[],pe=[],ve=[],Ie=[],Ee=0,Te=0;for(ee=0,$=0;$<4;++$){Z=q.getUint32(ee,!0);var fe=ee+=P,Ne=u.e.toRadians(180*q.getFloat64(ee,!0));ee+=A;var be=u.e.toRadians(180*q.getFloat64(ee,!0));ee+=A;var xe=u.e.toRadians(180*q.getFloat64(ee,!0)),Se=.5*xe;ee+=A;var we=u.e.toRadians(180*q.getFloat64(ee,!0)),Pe=.5*we;ee+=A;var ye=q.getInt32(ee,!0);ee+=w;var Ae=q.getInt32(ee,!0);ee+=w,ee+=w;for(var Me=new Array(ye),Re=0;Re<ye;++Re){var Be=Ne+q.getUint8(ee++)*xe;R.longitude=Be;var Ce=be+q.getUint8(ee++)*we;R.latitude=Ce;var _e=q.getFloat32(ee,!0);if(ee+=y,0!==_e&&_e<b&&(_e*=-Math.pow(2,N)),_e*=6371010*E,R.height=_e,-1!==M(G,Be)||-1!==M(D,Ce)){var Fe=M(ue,R,r.a);if(-1!==Fe){Me[Re]=se[Fe];continue}ue.push(r.a.clone(R)),se.push(Ee)}Me[Re]=Ee,Math.abs(Be-x)<Se?me.push({index:Ee,cartographic:r.a.clone(R)}):Math.abs(Be-Y)<Se?ve.push({index:Ee,cartographic:r.a.clone(R)}):Math.abs(Ce-U)<Pe?pe.push({index:Ee,cartographic:r.a.clone(R)}):Math.abs(Ce-k)<Pe&&Ie.push({index:Ee,cartographic:r.a.clone(R)}),J=Math.min(_e,J),K=Math.max(_e,K),he[Ee]=_e;var We=p.cartographicToCartesian(R);ce[Ee]=We,f&&(le[Ee]=(l.t.geodeticLatitudeToMercatorAngle(Ce)-V)*H),s.p.multiplyByPoint(j,We,B),i.o.minimumByComponent(B,Q,Q),i.o.maximumByComponent(B,X,X);var Ue=(Be-x)/(Y-x);Ue=u.e.clamp(Ue,0,1);var Ye=(Ce-U)/(k-U);Ye=u.e.clamp(Ye,0,1),de[Ee]=new n.o(Ue,Ye),++Ee}for(var ke=3*Ae,Le=0;Le<ke;++Le,++Te)ge[Te]=Me[q.getUint16(ee,!0)],ee+=S;if(Z!==ee-fe)throw new d.t("Invalid terrain tile.")}ce.length=Ee,de.length=Ee,he.length=Ee,f&&(le.length=Ee);var Oe=Ee,Ve=Te,He={hMin:J,lastBorderPoint:void 0,skirtHeight:T,toENU:j,ellipsoid:p,minimum:Q,maximum:X};me.sort((function(e,t){return t.cartographic.latitude-e.cartographic.latitude})),pe.sort((function(e,t){return e.cartographic.longitude-t.cartographic.longitude})),ve.sort((function(e,t){return e.cartographic.latitude-t.cartographic.latitude})),Ie.sort((function(e,t){return t.cartographic.longitude-e.cartographic.longitude}));var De=1e-5;if(W(ce,he,de,le,ge,He,me,-De*L,!0,-De*O),W(ce,he,de,le,ge,He,pe,-De*O,!1),W(ce,he,de,le,ge,He,ve,De*L,!0,De*O),W(ce,he,de,le,ge,He,Ie,De*O,!1),me.length>0&&Ie.length>0){var Ge=me[0].index,ze=Oe,je=Ie[Ie.length-1].index,qe=ce.length-1;ge.push(je,qe,ze,ze,Ge,je)}te=ce.length;var Je,Ke=t.i.fromPoints(ce);a.e(v)&&(Je=c.y.fromRectangle(v,J,K,p));for(var Qe=new o.s(p).computeHorizonCullingPointPossiblyUnderEllipsoid(m,ce,J),Xe=new e.e(Q,X,m),Ze=new o.h(Xe,He.hMin,K,z,!1,f),$e=new Float32Array(te*Ze.getStride()),et=0,tt=0;tt<te;++tt)et=Ze.encode($e,et,ce[tt],de[tt],he[tt],void 0,le[tt]);var nt=me.map((function(e){return e.index})).reverse(),it=pe.map((function(e){return e.index})).reverse(),rt=ve.map((function(e){return e.index})).reverse(),at=Ie.map((function(e){return e.index})).reverse();return it.unshift(rt[rt.length-1]),it.push(nt[0]),at.unshift(nt[nt.length-1]),at.push(rt[0]),{vertices:$e,indices:new Uint16Array(ge),maximumHeight:K,minimumHeight:J,encoding:Ze,boundingSphere3D:Ke,orientedBoundingBox:Je,occludeePointInScaledSpace:Qe,vertexCountWithoutSkirts:Oe,indexCountWithoutSkirts:Ve,westIndicesSouthToNorth:nt,southIndicesEastToWest:it,eastIndicesNorthToSouth:rt,northIndicesWestToEast:at}}(g.buffer,g.relativeToCenter,g.ellipsoid,g.rectangle,g.nativeRectangle,g.exaggeration,g.skirtHeight,g.includeWebMercatorT,g.negativeAltitudeExponentBias,g.negativeElevationThreshold),v=p.vertices;m.push(v.buffer);var I=p.indices;return m.push(I.buffer),{vertices:v.buffer,indices:I.buffer,numberOfAttributes:p.encoding.getStride(),minimumHeight:p.minimumHeight,maximumHeight:p.maximumHeight,boundingSphere3D:p.boundingSphere3D,orientedBoundingBox:p.orientedBoundingBox,occludeePointInScaledSpace:p.occludeePointInScaledSpace,encoding:p.encoding,vertexCountWithoutSkirts:p.vertexCountWithoutSkirts,indexCountWithoutSkirts:p.indexCountWithoutSkirts,westIndicesSouthToNorth:p.westIndicesSouthToNorth,southIndicesEastToWest:p.southIndicesEastToWest,eastIndicesNorthToSouth:p.eastIndicesNorthToSouth,northIndicesWestToEast:p.northIndicesWestToEast}}))})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createVerticesFromHeightmap.js b/SuperMap iEarth/public/SuperMap3D/Workers/createVerticesFromHeightmap.js index 014e4332..6850286f 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createVerticesFromHeightmap.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createVerticesFromHeightmap.js @@ -1 +1 @@ -define(["./Cartesian2-b72655a5","./EllipsoidTangentPlane-d6b88a1f","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./when-92c6cf3c","./Check-52a7d806","./TerrainEncoding-fd44afa8","./Math-ecf82623","./FeatureDetection-cec0163f","./OrientedBoundingBox-d2eb0b92","./GeometryAttribute-f47bd1cb","./WebMercatorProjection-ee891935","./RuntimeError-c6a62a80","./createTaskProcessorWorker","./Cartographic-a2c313d7","./Cartesian4-72b88c9e","./IntersectionTests-6e80d61c","./Plane-33393da8","./Event-3390cd7d","./AttributeCompression-b5a80a71","./ComponentDatatype-98414d16","./WebGLConstants-42651efd","./PolygonPipeline-425528b3","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,i,a,r,n,s,o,l,f,u,c,h,d,m,g,p,w,x,k,y,b,I,v){"use strict";var U=Object.freeze({NONE:0,LERC:1}),T={};T.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var M=new a.o,A=new l.p,V=new a.o,D=new a.o;T.computeVertices=function(h){if(!r.e(h)||!r.e(h.heightmap))throw new n.t("options.heightmap is required.");if(!r.e(h.width)||!r.e(h.height))throw new n.t("options.width and options.height are required.");if(!r.e(h.nativeRectangle))throw new n.t("options.nativeRectangle is required.");if(!r.e(h.skirtHeight))throw new n.t("options.skirtHeight is required.");var d,m,g,p,w=Math.cos,x=Math.sin,k=Math.sqrt,y=Math.atan,b=Math.exp,I=o.e.PI_OVER_TWO,v=o.e.toRadians,U=h.heightmap,B=h.width,S=h.height,P=h.skirtHeight,E=r.u(h.isGeographic,!0),F=r.u(h.ellipsoid,e.t.WGS84),C=1/F.maximumRadius,L=h.nativeRectangle,N=h.rectangle;r.e(N)?(d=N.west,m=N.south,g=N.east,p=N.north):E?(d=v(L.west),m=v(L.south),g=v(L.east),p=v(L.north)):(d=L.west*C,m=I-2*y(b(-L.south*C)),g=L.east*C,p=I-2*y(b(-L.north*C)));var O=h.relativeToCenter,z=r.e(O);O=z?O:a.o.ZERO;var R=r.u(h.exaggeration,1),H=r.u(h.includeWebMercatorT,!1),_=r.u(h.structure,T.DEFAULT_STRUCTURE),Y=r.u(_.heightScale,T.DEFAULT_STRUCTURE.heightScale),X=r.u(_.heightOffset,T.DEFAULT_STRUCTURE.heightOffset),W=r.u(_.elementsPerHeight,T.DEFAULT_STRUCTURE.elementsPerHeight),Z=r.u(_.stride,T.DEFAULT_STRUCTURE.stride),G=r.u(_.elementMultiplier,T.DEFAULT_STRUCTURE.elementMultiplier),q=r.u(_.isBigEndian,T.DEFAULT_STRUCTURE.isBigEndian),j=e.h.computeWidth(L),Q=e.h.computeHeight(L),J=j/(B-1),K=Q/(S-1);E||(j*=C,Q*=C);var $,ee,te=F.radiiSquared,ie=te.x,ae=te.y,re=te.z,ne=65536,se=-65536,oe=u.m.eastNorthUpToFixedFrame(O,F),le=l.p.inverseTransformation(oe,A);H&&($=c.t.geodeticLatitudeToMercatorAngle(m),ee=1/(c.t.geodeticLatitudeToMercatorAngle(p)-$));var fe=V;fe.x=Number.POSITIVE_INFINITY,fe.y=Number.POSITIVE_INFINITY,fe.z=Number.POSITIVE_INFINITY;var ue=D;ue.x=Number.NEGATIVE_INFINITY,ue.y=Number.NEGATIVE_INFINITY,ue.z=Number.NEGATIVE_INFINITY;var ce=Number.POSITIVE_INFINITY,he=B*S,de=he+(P>0?2*B+2*S:0),me=new Array(de),ge=new Array(de),pe=new Array(de),we=H?new Array(de):[],xe=0,ke=S,ye=0,be=B;P>0&&(--xe,++ke,--ye,++be);for(var Ie=1e-5,ve=xe;ve<ke;++ve){var Ue=ve;Ue<0&&(Ue=0),Ue>=S&&(Ue=S-1);var Te=L.north-K*Ue,Me=((Te=E?v(Te):I-2*y(b(-Te*C)))-m)/(p-m);Me=o.e.clamp(Me,0,1);var Ae=ve===xe,Ve=ve===ke-1;P>0&&(Ae?Te+=Ie*Q:Ve&&(Te-=Ie*Q));var De,Be=w(Te),Se=x(Te),Pe=re*Se;H&&(De=(c.t.geodeticLatitudeToMercatorAngle(Te)-$)*ee);for(var Ee=ye;Ee<be;++Ee){var Fe=Ee;Fe<0&&(Fe=0),Fe>=B&&(Fe=B-1);var Ce,Le,Ne=Ue*(B*Z)+Fe*Z;if(1===W)Ce=U[Ne];else if(Ce=0,q)for(Le=0;Le<W;++Le)Ce=Ce*G+U[Ne+Le];else for(Le=W-1;Le>=0;--Le)Ce=Ce*G+U[Ne+Le];Ce=(Ce*Y+X)*R,se=Math.max(se,Ce),ne=Math.min(ne,Ce);var Oe=L.west+J*Fe;E?Oe=v(Oe):Oe*=C;var ze=(Oe-d)/(g-d);ze=o.e.clamp(ze,0,1);var Re=Ue*B+Fe;if(P>0){var He=Ee===ye,_e=Ee===be-1,Ye=Ae||Ve||He||_e;if((Ae||Ve)&&(He||_e))continue;Ye&&(Ce-=P,He?(Re=he+(S-Ue-1),Oe-=Ie*j):Ve?Re=he+S+(B-Fe-1):_e?(Re=he+S+B+Ue,Oe+=Ie*j):Ae&&(Re=he+S+B+S+Fe))}var Xe=Be*w(Oe),We=Be*x(Oe),Ze=ie*Xe,Ge=ae*We,qe=1/k(Ze*Xe+Ge*We+Pe*Se),je=Ze*qe,Qe=Ge*qe,Je=Pe*qe,Ke=new a.o;Ke.x=je+Xe*Ce,Ke.y=Qe+We*Ce,Ke.z=Je+Se*Ce,me[Re]=Ke,ge[Re]=Ce,pe[Re]=new e.o(ze,Me),H&&(we[Re]=De),l.p.multiplyByPoint(le,Ke,M),a.o.minimumByComponent(M,fe,fe),a.o.maximumByComponent(M,ue,ue),ce=Math.min(ce,Ce)}}var $e,et,tt=i.i.fromPoints(me);(r.e(N)&&($e=f.y.fromRectangle(N,ne,se,F)),z)&&(et=new s.s(F).computeHorizonCullingPointPossiblyUnderEllipsoid(O,me,ne));for(var it=new t.e(fe,ue,O),at=new s.h(it,ce,se,oe,!1,H),rt=new Float32Array(de*at.getStride()),nt=0,st=0;st<de;++st)nt=at.encode(rt,nt,me[st],pe[st],ge[st],void 0,we[st]);return{vertices:rt,maximumHeight:se,minimumHeight:ne,encoding:at,boundingSphere3D:tt,orientedBoundingBox:$e,occludeePointInScaledSpace:et}};var B,S,P,E,F,C,L,N,O,z,R,H,_,Y={};z=function(){var e={defaultNoDataValue:-34027999387901484e22,decode:function(n,s){var o=(s=s||{}).encodedMaskData||null===s.encodedMaskData,l=r(n,s.inputOffset||0,o),f=null!==s.noDataValue?s.noDataValue:e.defaultNoDataValue,u=t(l,s.pixelType||Float32Array,s.encodedMaskData,f,s.returnMask),c={width:l.width,height:l.height,pixelData:u.resultPixels,minValue:u.minValue,maxValue:l.pixels.maxValue,noDataValue:f};return u.resultMask&&(c.maskData=u.resultMask),s.returnEncodedMask&&l.mask&&(c.encodedMaskData=l.mask.bitset?l.mask.bitset:null),s.returnFileInfo&&(c.fileInfo=i(l),s.computeUsedBitDepths&&(c.fileInfo.bitDepths=a(l))),c}},t=function(e,t,i,a,r){var s,o,l,f=0,u=e.pixels.numBlocksX,c=e.pixels.numBlocksY,h=Math.floor(e.width/u),d=Math.floor(e.height/c),m=2*e.maxZError,g=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),o=new t(e.width*e.height),r&&i&&(l=new Uint8Array(e.width*e.height));for(var p,w,x=new Float32Array(h*d),k=0;k<=c;k++){var y=k!==c?d:e.height%c;if(0!==y)for(var b=0;b<=u;b++){var I=b!==u?h:e.width%u;if(0!==I){var v,U,T,M,A=k*e.width*d+b*h,V=e.width-I,D=e.pixels.blocks[f];if(D.encoding<2?(0===D.encoding?v=D.rawData:(n(D.stuffedData,D.bitsPerPixel,D.numValidPixels,D.offset,m,x,e.pixels.maxValue),v=x),U=0):T=2===D.encoding?0:D.offset,i)for(w=0;w<y;w++){for(7&A&&(M=i[A>>3],M<<=7&A),p=0;p<I;p++)7&A||(M=i[A>>3]),128&M?(l&&(l[A]=1),g=g>(s=D.encoding<2?v[U++]:T)?s:g,o[A++]=s):(l&&(l[A]=0),o[A++]=a),M<<=1;A+=V}else if(D.encoding<2)for(w=0;w<y;w++){for(p=0;p<I;p++)g=g>(s=v[U++])?s:g,o[A++]=s;A+=V}else for(g=g>T?T:g,w=0;w<y;w++){for(p=0;p<I;p++)o[A++]=T;A+=V}if(1===D.encoding&&U!==D.numValidPixels)throw"Block and Mask do not match";f++}}}return{resultPixels:o,resultMask:l,minValue:g}},i=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},a=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,i={},a=0;a<t;a++){var r=e.pixels.blocks[a];0===r.encoding?i.float32=!0:1===r.encoding?i[r.bitsPerPixel]=!0:i[0]=!0}return Object.keys(i)},r=function(e,t,i){var a={},r=new Uint8Array(e,t,10);if(a.fileIdentifierString=String.fromCharCode.apply(null,r),"CntZImage"!==a.fileIdentifierString.trim())throw"Unexpected file identifier string: "+a.fileIdentifierString;t+=10;var n=new DataView(e,t,24);if(a.fileVersion=n.getInt32(0,!0),a.imageType=n.getInt32(4,!0),a.height=n.getUint32(8,!0),a.width=n.getUint32(12,!0),a.maxZError=n.getFloat64(16,!0),t+=24,!i)if(n=new DataView(e,t,16),a.mask={},a.mask.numBlocksY=n.getUint32(0,!0),a.mask.numBlocksX=n.getUint32(4,!0),a.mask.numBytes=n.getUint32(8,!0),a.mask.maxValue=n.getFloat32(12,!0),t+=16,a.mask.numBytes>0){var s=new Uint8Array(Math.ceil(a.width*a.height/8)),o=(n=new DataView(e,t,a.mask.numBytes)).getInt16(0,!0),l=2,f=0;do{if(o>0)for(;o--;)s[f++]=n.getUint8(l++);else{var u=n.getUint8(l++);for(o=-o;o--;)s[f++]=u}o=n.getInt16(l,!0),l+=2}while(l<a.mask.numBytes);if(-32768!==o||f<s.length)throw"Unexpected end of mask RLE encoding";a.mask.bitset=s,t+=a.mask.numBytes}else 0==(a.mask.numBytes|a.mask.numBlocksY|a.mask.maxValue)&&(a.mask.bitset=new Uint8Array(Math.ceil(a.width*a.height/8)));n=new DataView(e,t,16),a.pixels={},a.pixels.numBlocksY=n.getUint32(0,!0),a.pixels.numBlocksX=n.getUint32(4,!0),a.pixels.numBytes=n.getUint32(8,!0),a.pixels.maxValue=n.getFloat32(12,!0),t+=16;var c=a.pixels.numBlocksX,h=a.pixels.numBlocksY,d=c+(a.width%c>0?1:0),m=h+(a.height%h>0?1:0);a.pixels.blocks=new Array(d*m);for(var g=0,p=0;p<m;p++)for(var w=0;w<d;w++){var x=0,k=e.byteLength-t;n=new DataView(e,t,Math.min(10,k));var y={};a.pixels.blocks[g++]=y;var b=n.getUint8(0);if(x++,y.encoding=63&b,y.encoding>3)throw"Invalid block encoding ("+y.encoding+")";if(2!==y.encoding){if(0!==b&&2!==b){if(b>>=6,y.offsetType=b,2===b)y.offset=n.getInt8(1),x++;else if(1===b)y.offset=n.getInt16(1,!0),x+=2;else{if(0!==b)throw"Invalid block offset type";y.offset=n.getFloat32(1,!0),x+=4}if(1===y.encoding)if(b=n.getUint8(x),x++,y.bitsPerPixel=63&b,b>>=6,y.numValidPixelsType=b,2===b)y.numValidPixels=n.getUint8(x),x++;else if(1===b)y.numValidPixels=n.getUint16(x,!0),x+=2;else{if(0!==b)throw"Invalid valid pixel count type";y.numValidPixels=n.getUint32(x,!0),x+=4}}var I;if(t+=x,3!==y.encoding)if(0===y.encoding){var v=(a.pixels.numBytes-1)/4;if(v!==Math.floor(v))throw"uncompressed block has invalid length";I=new ArrayBuffer(4*v),new Uint8Array(I).set(new Uint8Array(e,t,4*v));var U=new Float32Array(I);y.rawData=U,t+=4*v}else if(1===y.encoding){var T=Math.ceil(y.numValidPixels*y.bitsPerPixel/8),M=Math.ceil(T/4);I=new ArrayBuffer(4*M),new Uint8Array(I).set(new Uint8Array(e,t,T)),y.stuffedData=new Uint32Array(I),t+=T}}else t++}return a.eofOffset=t,a},n=function(e,t,i,a,r,n,s){var o,l,f,u=(1<<t)-1,c=0,h=0,d=Math.ceil((s-a)/r),m=4*e.length-Math.ceil(t*i/8);for(e[e.length-1]<<=8*m,o=0;o<i;o++){if(0===h&&(f=e[c++],h=32),h>=t)l=f>>>h-t&u,h-=t;else{var g=t-h;l=(f&u)<<g&u,l+=(f=e[c++])>>>(h=32-g)}n[o]=l<d?a+l*r:s}return n};return e}(),B=function(e,t,i,a,r,n,s,o){var l,f,u,c,h,d=(1<<i)-1,m=0,g=0,p=4*e.length-Math.ceil(i*a/8);if(e[e.length-1]<<=8*p,r)for(l=0;l<a;l++)0===g&&(u=e[m++],g=32),g>=i?(f=u>>>g-i&d,g-=i):(f=(u&d)<<(c=i-g)&d,f+=(u=e[m++])>>>(g=32-c)),t[l]=r[f];else for(h=Math.ceil((o-n)/s),l=0;l<a;l++)0===g&&(u=e[m++],g=32),g>=i?(f=u>>>g-i&d,g-=i):(f=(u&d)<<(c=i-g)&d,f+=(u=e[m++])>>>(g=32-c)),t[l]=f<h?n+f*s:o},S=function(e,t,i,a,r,n){var s,o=(1<<t)-1,l=0,f=0,u=0,c=0,h=0,d=[],m=4*e.length-Math.ceil(t*i/8);e[e.length-1]<<=8*m;var g=Math.ceil((n-a)/r);for(f=0;f<i;f++)0===c&&(s=e[l++],c=32),c>=t?(h=s>>>c-t&o,c-=t):(h=(s&o)<<(u=t-c)&o,h+=(s=e[l++])>>>(c=32-u)),d[f]=h<g?a+h*r:n;return d.unshift(a),d},P=function(e,t,i,a,r,n,s,o){var l,f,u,c,h=(1<<i)-1,d=0,m=0,g=0;if(r)for(l=0;l<a;l++)0===m&&(u=e[d++],m=32,g=0),m>=i?(f=u>>>g&h,m-=i,g+=i):(f=u>>>g&h,m=32-(c=i-m),f|=((u=e[d++])&(1<<c)-1)<<i-c,g=c),t[l]=r[f];else{var p=Math.ceil((o-n)/s);for(l=0;l<a;l++)0===m&&(u=e[d++],m=32,g=0),m>=i?(f=u>>>g&h,m-=i,g+=i):(f=u>>>g&h,m=32-(c=i-m),f|=((u=e[d++])&(1<<c)-1)<<i-c,g=c),t[l]=f<p?n+f*s:o}return t},E=function(e,t,i,a,r,n){var s,o=(1<<t)-1,l=0,f=0,u=0,c=0,h=0,d=0,m=[],g=Math.ceil((n-a)/r);for(f=0;f<i;f++)0===c&&(s=e[l++],c=32,d=0),c>=t?(h=s>>>d&o,c-=t,d+=t):(h=s>>>d&o,c=32-(u=t-c),h|=((s=e[l++])&(1<<u)-1)<<t-u,d=u),m[f]=h<g?a+h*r:n;return m.unshift(a),m},F=function(e,t,i,a){var r,n,s,o,l=(1<<i)-1,f=0,u=0,c=4*e.length-Math.ceil(i*a/8);for(e[e.length-1]<<=8*c,r=0;r<a;r++)0===u&&(s=e[f++],u=32),u>=i?(n=s>>>u-i&l,u-=i):(n=(s&l)<<(o=i-u)&l,n+=(s=e[f++])>>>(u=32-o)),t[r]=n;return t},C=function(e,t,i,a){var r,n,s,o,l=(1<<i)-1,f=0,u=0,c=0;for(r=0;r<a;r++)0===u&&(s=e[f++],u=32,c=0),u>=i?(n=s>>>c&l,u-=i,c+=i):(n=s>>>c&l,u=32-(o=i-u),n|=((s=e[f++])&(1<<o)-1)<<i-o,c=o),t[r]=n;return t},L={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,i=65535,a=e.length,r=Math.floor(a/2),n=0;r;){var s=r>=359?359:r;r-=s;do{t+=e[n++]<<8,i+=t+=e[n++]}while(--s);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&a&&(i+=t+=e[n]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,a=new Uint8Array(e,i,6),r={};if(r.fileIdentifierString=String.fromCharCode.apply(null,a),0!==r.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+r.fileIdentifierString;i+=6;var n,s=new DataView(e,i,8),o=s.getInt32(0,!0);if(r.fileVersion=o,i+=4,o>=3&&(r.checksum=s.getUint32(4,!0),i+=4),s=new DataView(e,i,12),r.height=s.getUint32(0,!0),r.width=s.getUint32(4,!0),i+=8,o>=4?(r.numDims=s.getUint32(8,!0),i+=4):r.numDims=1,s=new DataView(e,i,40),r.numValidPixel=s.getUint32(0,!0),r.microBlockSize=s.getInt32(4,!0),r.blobSize=s.getInt32(8,!0),r.imageType=s.getInt32(12,!0),r.maxZError=s.getFloat64(16,!0),r.zMin=s.getFloat64(24,!0),r.zMax=s.getFloat64(32,!0),i+=40,t.headerInfo=r,t.ptr=i,o>=3&&(n=o>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-n,r.blobSize-14))!==r.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,a=this.getDataTypeArray(i.imageType),r=i.numDims*this.getDataTypeSize(i.imageType),n=this.readSubArray(e,t.ptr,a,r),s=this.readSubArray(e,t.ptr+r,a,r);t.ptr+=2*r;var o,l=!0;for(o=0;o<i.numDims;o++)if(n[o]!==s[o]){l=!1;break}return i.minValues=n,i.maxValues=s,l},readSubArray:function(e,t,i,a){var r;if(i===Uint8Array)r=new Uint8Array(e,t,a);else{var n=new ArrayBuffer(a);new Uint8Array(n).set(new Uint8Array(e,t,a)),r=new i(n)}return r},readMask:function(e,t){var i,a,r=t.ptr,n=t.headerInfo,s=n.width*n.height,o=n.numValidPixel,l=new DataView(e,r,4),f={};if(f.numBytes=l.getUint32(0,!0),r+=4,(0===o||s===o)&&0!==f.numBytes)throw"invalid mask";if(0===o)i=new Uint8Array(Math.ceil(s/8)),f.bitset=i,a=new Uint8Array(s),t.pixels.resultMask=a,r+=f.numBytes;else if(f.numBytes>0){i=new Uint8Array(Math.ceil(s/8));var u=(l=new DataView(e,r,f.numBytes)).getInt16(0,!0),c=2,h=0,d=0;do{if(u>0)for(;u--;)i[h++]=l.getUint8(c++);else for(d=l.getUint8(c++),u=-u;u--;)i[h++]=d;u=l.getInt16(c,!0),c+=2}while(c<f.numBytes);if(-32768!==u||h<i.length)throw"Unexpected end of mask RLE encoding";a=new Uint8Array(s);var m=0,g=0;for(g=0;g<s;g++)7&g?(m=i[g>>3],m<<=7&g):m=i[g>>3],128&m&&(a[g]=1);t.pixels.resultMask=a,f.bitset=i,r+=f.numBytes}return t.ptr=r,t.mask=f,!0},readDataOneSweep:function(e,t,i){var a,r=t.ptr,n=t.headerInfo,s=n.numDims,o=n.width*n.height,l=n.imageType,f=n.numValidPixel*L.getDataTypeSize(l)*s,u=t.pixels.resultMask;if(i===Uint8Array)a=new Uint8Array(e,r,f);else{var c=new ArrayBuffer(f);new Uint8Array(c).set(new Uint8Array(e,r,f)),a=new i(c)}if(a.length===o*s)t.pixels.resultPixels=a;else{t.pixels.resultPixels=new i(o*s);var h=0,d=0,m=0,g=0;if(s>1)for(m=0;m<s;m++)for(g=m*o,d=0;d<o;d++)u[d]&&(t.pixels.resultPixels[g+d]=a[h++]);else for(d=0;d<o;d++)u[d]&&(t.pixels.resultPixels[d]=a[h++])}return r+=f,t.ptr=r,!0},readHuffmanTree:function(e,t){var i=this.HUFFMAN_LUT_BITS_MAX,a=new DataView(e,t.ptr,16);if(t.ptr+=16,a.getInt32(0,!0)<2)throw"unsupported Huffman version";var r=a.getInt32(4,!0),n=a.getInt32(8,!0),s=a.getInt32(12,!0);if(n>=s)return!1;var o=new Uint32Array(s-n);L.decodeBits(e,t,o);var l,f,u,c,h=[];for(l=n;l<s;l++)h[f=l-(l<r?0:r)]={first:o[l-n],second:null};var d=e.byteLength-t.ptr,m=Math.ceil(d/4),g=new ArrayBuffer(4*m);new Uint8Array(g).set(new Uint8Array(e,t.ptr,d));var p,w=new Uint32Array(g),x=0,k=0;for(p=w[0],l=n;l<s;l++)(c=h[f=l-(l<r?0:r)].first)>0&&(h[f].second=p<<x>>>32-c,32-x>=c?32===(x+=c)&&(x=0,p=w[++k]):(x+=c-32,p=w[++k],h[f].second|=p>>>32-x));var y=0,b=0,I=new N;for(l=0;l<h.length;l++)void 0!==h[l]&&(y=Math.max(y,h[l].first));b=y>=i?i:y,y>=30&&console.log("WARning, large NUM LUT BITS IS "+y);var v,U,T,M,A,V=[];for(l=n;l<s;l++)if((c=h[f=l-(l<r?0:r)].first)>0)if(v=[c,f],c<=b)for(U=h[f].second<<b-c,T=1<<b-c,u=0;u<T;u++)V[U|u]=v;else for(U=h[f].second,A=I,M=c-1;M>=0;M--)U>>>M&1?(A.right||(A.right=new N),A=A.right):(A.left||(A.left=new N),A=A.left),0===M&&!A.val&&(A.val=v[1]);return{decodeLut:V,numBitsLUTQick:b,numBitsLUT:y,tree:I,stuffedData:w,srcPtr:k,bitPos:x}},readHuffman:function(e,t,i){var a,r,n,s,o,l,f,u,c,h=t.headerInfo,d=h.numDims,m=t.headerInfo.height,g=t.headerInfo.width,p=g*m,w=this.readHuffmanTree(e,t),x=w.decodeLut,k=w.tree,y=w.stuffedData,b=w.srcPtr,I=w.bitPos,v=w.numBitsLUTQick,U=w.numBitsLUT,T=0===t.headerInfo.imageType?128:0,M=t.pixels.resultMask,A=0;I>0&&(b++,I=0);var V,D=y[b],B=1===t.encodeMode,S=new i(p*d),P=S;for(V=0;V<h.numDims;V++){if(d>1&&(P=new i(S.buffer,p*V,p),A=0),t.headerInfo.numValidPixel===g*m)for(u=0,l=0;l<m;l++)for(f=0;f<g;f++,u++){if(r=0,o=s=D<<I>>>32-v,32-I<v&&(o=s|=y[b+1]>>>64-I-v),x[o])r=x[o][1],I+=x[o][0];else for(o=s=D<<I>>>32-U,32-I<U&&(o=s|=y[b+1]>>>64-I-U),a=k,c=0;c<U;c++)if(!(a=s>>>U-c-1&1?a.right:a.left).left&&!a.right){r=a.val,I=I+c+1;break}I>=32&&(I-=32,D=y[++b]),n=r-T,B?(n+=f>0?A:l>0?P[u-g]:A,n&=255,P[u]=n,A=n):P[u]=n}else for(u=0,l=0;l<m;l++)for(f=0;f<g;f++,u++)if(M[u]){if(r=0,o=s=D<<I>>>32-v,32-I<v&&(o=s|=y[b+1]>>>64-I-v),x[o])r=x[o][1],I+=x[o][0];else for(o=s=D<<I>>>32-U,32-I<U&&(o=s|=y[b+1]>>>64-I-U),a=k,c=0;c<U;c++)if(!(a=s>>>U-c-1&1?a.right:a.left).left&&!a.right){r=a.val,I=I+c+1;break}I>=32&&(I-=32,D=y[++b]),n=r-T,B?(f>0&&M[u-1]?n+=A:l>0&&M[u-g]?n+=P[u-g]:n+=A,n&=255,P[u]=n,A=n):P[u]=n}t.ptr=t.ptr+4*(b+1)+(I>0?4:0)}t.pixels.resultPixels=S},decodeBits:function(e,t,i,a,r){var n=t.headerInfo,s=n.fileVersion,o=0,l=e.byteLength-t.ptr>=5?5:e.byteLength-t.ptr,f=new DataView(e,t.ptr,l),u=f.getUint8(0);o++;var c=u>>6,h=0===c?4:3-c,d=(32&u)>0,m=31&u,g=0;if(1===h)g=f.getUint8(o),o++;else if(2===h)g=f.getUint16(o,!0),o+=2;else{if(4!==h)throw"Invalid valid pixel count type";g=f.getUint32(o,!0),o+=4}var p,w,x,k,y,b,I,v,U,T=2*n.maxZError,M=n.numDims>1?n.maxValues[r]:n.zMax;if(d){for(t.counter.lut++,v=f.getUint8(o),o++,k=Math.ceil((v-1)*m/8),y=Math.ceil(k/4),w=new ArrayBuffer(4*y),x=new Uint8Array(w),t.ptr+=o,x.set(new Uint8Array(e,t.ptr,k)),I=new Uint32Array(w),t.ptr+=k,U=0;v-1>>>U;)U++;k=Math.ceil(g*U/8),y=Math.ceil(k/4),w=new ArrayBuffer(4*y),(x=new Uint8Array(w)).set(new Uint8Array(e,t.ptr,k)),p=new Uint32Array(w),t.ptr+=k,b=s>=3?E(I,m,v-1,a,T,M):S(I,m,v-1,a,T,M),s>=3?P(p,i,U,g,b):B(p,i,U,g,b)}else t.counter.bitstuffer++,U=m,t.ptr+=o,U>0&&(k=Math.ceil(g*U/8),y=Math.ceil(k/4),w=new ArrayBuffer(4*y),(x=new Uint8Array(w)).set(new Uint8Array(e,t.ptr,k)),p=new Uint32Array(w),t.ptr+=k,s>=3?null===a?C(p,i,U,g):P(p,i,U,g,!1,a,T,M):null===a?F(p,i,U,g):B(p,i,U,g,!1,a,T,M))},readTiles:function(e,t,i){var a=t.headerInfo,r=a.width,n=a.height,s=a.microBlockSize,o=a.imageType,l=L.getDataTypeSize(o),f=Math.ceil(r/s),u=Math.ceil(n/s);t.pixels.numBlocksY=u,t.pixels.numBlocksX=f,t.pixels.ptr=0;var c,h,d,m,g,p,w,x,k=0,y=0,b=0,I=0,v=0,U=0,T=0,M=0,A=0,V=0,D=0,B=0,S=0,P=0,E=0,F=new i(s*s),C=n%s||s,N=r%s||s,O=a.numDims,z=t.pixels.resultMask,R=t.pixels.resultPixels;for(b=0;b<u;b++)for(v=b!==u-1?s:C,I=0;I<f;I++)for(V=b*r*s+I*s,D=r-(U=I!==f-1?s:N),x=0;x<O;x++){if(O>1&&(R=new i(t.pixels.resultPixels.buffer,r*n*x*l,r*n)),T=e.byteLength-t.ptr,h={},E=0,E++,A=(M=(c=new DataView(e,t.ptr,Math.min(10,T))).getUint8(0))>>6&255,(M>>2&15)!=(I*s>>3&15))throw"integrity issue";if((g=3&M)>3)throw t.ptr+=E,"Invalid block encoding ("+g+")";if(2!==g)if(0===g){if(t.counter.uncompressed++,t.ptr+=E,B=(B=v*U*l)<(S=e.byteLength-t.ptr)?B:S,d=new ArrayBuffer(B%l==0?B:B+l-B%l),new Uint8Array(d).set(new Uint8Array(e,t.ptr,B)),m=new i(d),P=0,z)for(k=0;k<v;k++){for(y=0;y<U;y++)z[V]&&(R[V]=m[P++]),V++;V+=D}else for(k=0;k<v;k++){for(y=0;y<U;y++)R[V++]=m[P++];V+=D}t.ptr+=P*l}else if(p=L.getDataTypeUsed(o,A),w=L.getOnePixel(h,E,p,c),E+=L.getDataTypeSize(p),3===g)if(t.ptr+=E,t.counter.constantoffset++,z)for(k=0;k<v;k++){for(y=0;y<U;y++)z[V]&&(R[V]=w),V++;V+=D}else for(k=0;k<v;k++){for(y=0;y<U;y++)R[V++]=w;V+=D}else if(t.ptr+=E,L.decodeBits(e,t,F,w,x),E=0,z)for(k=0;k<v;k++){for(y=0;y<U;y++)z[V]&&(R[V]=F[E++]),V++;V+=D}else for(k=0;k<v;k++){for(y=0;y<U;y++)R[V++]=F[E++];V+=D}else t.counter.constant++,t.ptr+=E}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:L.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t=e.headerInfo.zMax,i=e.headerInfo.numDims,a=e.headerInfo.height*e.headerInfo.width,r=a*i,n=0,s=0,o=0,l=e.pixels.resultMask;if(l)if(i>1)for(n=0;n<i;n++)for(o=n*a,s=0;s<a;s++)l[s]&&(e.pixels.resultPixels[o+s]=t);else for(s=0;s<a;s++)l[s]&&(e.pixels.resultPixels[s]=t);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(t);else for(s=0;s<r;s++)e.pixels.resultPixels[s]=t},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:default:t=Float32Array;break;case 7:t=Float64Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:default:t="F32";break;case 7:t="F64"}return t},isValidPixelValue:function(e,t){if(null===t)return!1;var i;switch(e){case 0:i=t>=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,a){var r=0;switch(i){case 0:r=a.getInt8(t);break;case 1:r=a.getUint8(t);break;case 2:r=a.getInt16(t,!0);break;case 3:r=a.getUint16(t,!0);break;case 4:r=a.getInt32(t,!0);break;case 5:r=a.getUInt32(t,!0);break;case 6:r=a.getFloat32(t,!0);break;case 7:r=a.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return r}},N=function(e,t,i){this.val=e,this.left=t,this.right=i},O={decode:function(e,t){var i=(t=t||{}).noDataValue,a=0,r={};if(r.ptr=t.inputOffset||0,r.pixels={},L.readHeaderInfo(e,r)){var n=r.headerInfo,s=n.fileVersion,o=L.getDataTypeArray(n.imageType);L.readMask(e,r),n.numValidPixel!==n.width*n.height&&!r.pixels.resultMask&&(r.pixels.resultMask=t.maskData);var l,f=n.width*n.height;if(r.pixels.resultPixels=new o(f*n.numDims),r.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==n.numValidPixel)if(n.zMax===n.zMin)L.constructConstantSurface(r);else if(s>=4&&L.checkMinMaxRanges(e,r))L.constructConstantSurface(r);else{var u=new DataView(e,r.ptr,2),c=u.getUint8(0);if(r.ptr++,c)L.readDataOneSweep(e,r,o);else if(s>1&&n.imageType<=1&&Math.abs(n.maxZError-.5)<1e-5){var h=u.getUint8(1);if(r.ptr++,r.encodeMode=h,h>2||s<4&&h>1)throw"Invalid Huffman flag "+h;h?L.readHuffman(e,r,o):L.readTiles(e,r,o)}else L.readTiles(e,r,o)}r.eofOffset=r.ptr,t.inputOffset?(l=r.headerInfo.blobSize+t.inputOffset-r.ptr,Math.abs(l)>=1&&(r.eofOffset=t.inputOffset+r.headerInfo.blobSize)):(l=r.headerInfo.blobSize-r.ptr,Math.abs(l)>=1&&(r.eofOffset=r.headerInfo.blobSize));var d={width:n.width,height:n.height,pixelData:r.pixels.resultPixels,minValue:n.zMin,maxValue:n.zMax,validPixelCount:n.numValidPixel,dimCount:n.numDims,dimStats:{minValues:n.minValues,maxValues:n.maxValues},maskData:r.pixels.resultMask};if(r.pixels.resultMask&&L.isValidPixelValue(n.imageType,i)){var m=r.pixels.resultMask;for(a=0;a<f;a++)m[a]||(d.pixelData[a]=i);d.noDataValue=i}return r.noDataValue=i,t.returnFileInfo&&(d.fileInfo=L.formatFileInfo(r)),d}},getBandCount:function(e){for(var t=0,i=0,a={ptr:0,pixels:{}};i<e.byteLength-58;)L.readHeaderInfo(e,a),i+=a.headerInfo.blobSize,t++,a.ptr=i;return t}},R=O,H=function(){var e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]}(),_={decode:function(e,t){if(!H)throw"Big endian system is not supported.";var i,a,r,n,s,o=(t=t||{}).inputOffset||0,l=new Uint8Array(e,o,10),f=String.fromCharCode.apply(null,l);if("CntZImage"===f.trim())i=z,a=1;else{if("Lerc2"!==f.substring(0,5))throw"Unexpected file identifier string: "+f;i=R,a=2}for(var u,c,h,d=0,m=e.byteLength-10,g=[],p={width:0,height:0,pixels:[],pixelType:t.pixelType,mask:null,statistics:[]};o<m;){var w=i.decode(e,{inputOffset:o,encodedMaskData:u,maskData:h,returnMask:0===d,returnEncodedMask:0===d,returnFileInfo:!0,pixelType:t.pixelType||null,noDataValue:t.noDataValue||null});o=w.fileInfo.eofOffset,0===d&&(u=w.encodedMaskData,h=w.maskData,p.width=w.width,p.height=w.height,p.dimCount=w.dimCount||1,p.pixelType=w.pixelType||w.fileInfo.pixelType,p.mask=w.maskData),a>1&&w.fileInfo.mask&&w.fileInfo.mask.numBytes>0&&g.push(w.maskData),d++,p.pixels.push(w.pixelData),p.statistics.push({minValue:w.minValue,maxValue:w.maxValue,noDataValue:w.noDataValue,dimStats:w.dimStats})}if(a>1&&g.length>1){for(s=p.width*p.height,p.bandMasks=g,(h=new Uint8Array(s)).set(g[0]),r=1;r<g.length;r++)for(c=g[r],n=0;n<s;n++)h[n]=h[n]&c[n];p.maskData=h}return p}},Y.Lerc=_;var X=Y.Lerc;return d((function(t,i){if(t.encoding===U.LERC){var a;try{a=X.decode(t.heightmap)}catch(e){throw new h.t(e)}if(a.statistics[0].minValue===Number.MAX_VALUE)throw new h.t("Invalid tile data");t.heightmap=a.pixels[0],t.width=a.width,t.height=a.height}t.ellipsoid=e.t.clone(t.ellipsoid),t.rectangle=e.h.clone(t.rectangle);var r=T.computeVertices(t),n=r.vertices;return i.push(n.buffer),{vertices:n.buffer,numberOfAttributes:r.encoding.getStride(),minimumHeight:r.minimumHeight,maximumHeight:r.maximumHeight,gridWidth:t.width,gridHeight:t.height,boundingSphere3D:r.boundingSphere3D,orientedBoundingBox:r.orientedBoundingBox,occludeePointInScaledSpace:r.occludeePointInScaledSpace,encoding:r.encoding,westIndicesSouthToNorth:r.westIndicesSouthToNorth,southIndicesEastToWest:r.southIndicesEastToWest,eastIndicesNorthToSouth:r.eastIndicesNorthToSouth,northIndicesWestToEast:r.northIndicesWestToEast}}))})); +define(["./Cartesian2-b72655a5","./EllipsoidTangentPlane-c500945e","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./when-92c6cf3c","./Check-52a7d806","./TerrainEncoding-231c7a61","./Math-ecf82623","./FeatureDetection-fd297af4","./OrientedBoundingBox-42d3d74a","./GeometryAttribute-65cf868d","./WebMercatorProjection-ee891935","./RuntimeError-c6a62a80","./createTaskProcessorWorker","./Cartographic-a2c313d7","./Cartesian4-72b88c9e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./Event-3390cd7d","./AttributeCompression-b5a80a71","./ComponentDatatype-98414d16","./WebGLConstants-42651efd","./PolygonPipeline-c329dec3","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,i,a,r,n,s,o,l,f,u,c,h,d,m,g,p,w,x,k,y,I,v,b){"use strict";var U=Object.freeze({NONE:0,LERC:1}),T={};T.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var M=new a.o,A=new l.p,V=new a.o,D=new a.o;T.computeVertices=function(h){if(!r.e(h)||!r.e(h.heightmap))throw new n.t("options.heightmap is required.");if(!r.e(h.width)||!r.e(h.height))throw new n.t("options.width and options.height are required.");if(!r.e(h.nativeRectangle))throw new n.t("options.nativeRectangle is required.");if(!r.e(h.skirtHeight))throw new n.t("options.skirtHeight is required.");var d,m,g,p,w=Math.cos,x=Math.sin,k=Math.sqrt,y=Math.atan,I=Math.exp,v=o.e.PI_OVER_TWO,b=o.e.toRadians,U=h.heightmap,B=h.width,S=h.height,P=h.skirtHeight,E=r.u(h.isGeographic,!0),F=r.u(h.ellipsoid,e.t.WGS84),C=1/F.maximumRadius,L=h.nativeRectangle,N=h.rectangle;r.e(N)?(d=N.west,m=N.south,g=N.east,p=N.north):E?(d=b(L.west),m=b(L.south),g=b(L.east),p=b(L.north)):(d=L.west*C,m=v-2*y(I(-L.south*C)),g=L.east*C,p=v-2*y(I(-L.north*C)));var O=h.relativeToCenter,z=r.e(O);O=z?O:a.o.ZERO;var R=r.u(h.exaggeration,1),H=r.u(h.includeWebMercatorT,!1),_=r.u(h.structure,T.DEFAULT_STRUCTURE),Y=r.u(_.heightScale,T.DEFAULT_STRUCTURE.heightScale),X=r.u(_.heightOffset,T.DEFAULT_STRUCTURE.heightOffset),W=r.u(_.elementsPerHeight,T.DEFAULT_STRUCTURE.elementsPerHeight),Z=r.u(_.stride,T.DEFAULT_STRUCTURE.stride),G=r.u(_.elementMultiplier,T.DEFAULT_STRUCTURE.elementMultiplier),q=r.u(_.isBigEndian,T.DEFAULT_STRUCTURE.isBigEndian),j=e.h.computeWidth(L),Q=e.h.computeHeight(L),J=j/(B-1),K=Q/(S-1);E||(j*=C,Q*=C);var $,ee,te=F.radiiSquared,ie=te.x,ae=te.y,re=te.z,ne=65536,se=-65536,oe=u.m.eastNorthUpToFixedFrame(O,F),le=l.p.inverseTransformation(oe,A);H&&($=c.t.geodeticLatitudeToMercatorAngle(m),ee=1/(c.t.geodeticLatitudeToMercatorAngle(p)-$));var fe=V;fe.x=Number.POSITIVE_INFINITY,fe.y=Number.POSITIVE_INFINITY,fe.z=Number.POSITIVE_INFINITY;var ue=D;ue.x=Number.NEGATIVE_INFINITY,ue.y=Number.NEGATIVE_INFINITY,ue.z=Number.NEGATIVE_INFINITY;var ce=Number.POSITIVE_INFINITY,he=B*S,de=he+(P>0?2*B+2*S:0),me=new Array(de),ge=new Array(de),pe=new Array(de),we=H?new Array(de):[],xe=0,ke=S,ye=0,Ie=B;P>0&&(--xe,++ke,--ye,++Ie);for(var ve=1e-5,be=xe;be<ke;++be){var Ue=be;Ue<0&&(Ue=0),Ue>=S&&(Ue=S-1);var Te=L.north-K*Ue,Me=((Te=E?b(Te):v-2*y(I(-Te*C)))-m)/(p-m);Me=o.e.clamp(Me,0,1);var Ae=be===xe,Ve=be===ke-1;P>0&&(Ae?Te+=ve*Q:Ve&&(Te-=ve*Q));var De,Be=w(Te),Se=x(Te),Pe=re*Se;H&&(De=(c.t.geodeticLatitudeToMercatorAngle(Te)-$)*ee);for(var Ee=ye;Ee<Ie;++Ee){var Fe=Ee;Fe<0&&(Fe=0),Fe>=B&&(Fe=B-1);var Ce,Le,Ne=Ue*(B*Z)+Fe*Z;if(1===W)Ce=U[Ne];else if(Ce=0,q)for(Le=0;Le<W;++Le)Ce=Ce*G+U[Ne+Le];else for(Le=W-1;Le>=0;--Le)Ce=Ce*G+U[Ne+Le];Ce=(Ce*Y+X)*R,se=Math.max(se,Ce),ne=Math.min(ne,Ce);var Oe=L.west+J*Fe;E?Oe=b(Oe):Oe*=C;var ze=(Oe-d)/(g-d);ze=o.e.clamp(ze,0,1);var Re=Ue*B+Fe;if(P>0){var He=Ee===ye,_e=Ee===Ie-1,Ye=Ae||Ve||He||_e;if((Ae||Ve)&&(He||_e))continue;Ye&&(Ce-=P,He?(Re=he+(S-Ue-1),Oe-=ve*j):Ve?Re=he+S+(B-Fe-1):_e?(Re=he+S+B+Ue,Oe+=ve*j):Ae&&(Re=he+S+B+S+Fe))}var Xe=Be*w(Oe),We=Be*x(Oe),Ze=ie*Xe,Ge=ae*We,qe=1/k(Ze*Xe+Ge*We+Pe*Se),je=Ze*qe,Qe=Ge*qe,Je=Pe*qe,Ke=new a.o;Ke.x=je+Xe*Ce,Ke.y=Qe+We*Ce,Ke.z=Je+Se*Ce,me[Re]=Ke,ge[Re]=Ce,pe[Re]=new e.o(ze,Me),H&&(we[Re]=De),l.p.multiplyByPoint(le,Ke,M),a.o.minimumByComponent(M,fe,fe),a.o.maximumByComponent(M,ue,ue),ce=Math.min(ce,Ce)}}var $e,et,tt=i.i.fromPoints(me);(r.e(N)&&($e=f.y.fromRectangle(N,ne,se,F)),z)&&(et=new s.s(F).computeHorizonCullingPointPossiblyUnderEllipsoid(O,me,ne));for(var it=new t.e(fe,ue,O),at=new s.h(it,ce,se,oe,!1,H),rt=new Float32Array(de*at.getStride()),nt=0,st=0;st<de;++st)nt=at.encode(rt,nt,me[st],pe[st],ge[st],void 0,we[st]);return{vertices:rt,maximumHeight:se,minimumHeight:ne,encoding:at,boundingSphere3D:tt,orientedBoundingBox:$e,occludeePointInScaledSpace:et}};var B,S,P,E,F,C,L,N,O,z,R,H,_,Y={};z=function(){var e={defaultNoDataValue:-34027999387901484e22,decode:function(n,s){var o=(s=s||{}).encodedMaskData||null===s.encodedMaskData,l=r(n,s.inputOffset||0,o),f=null!==s.noDataValue?s.noDataValue:e.defaultNoDataValue,u=t(l,s.pixelType||Float32Array,s.encodedMaskData,f,s.returnMask),c={width:l.width,height:l.height,pixelData:u.resultPixels,minValue:u.minValue,maxValue:l.pixels.maxValue,noDataValue:f};return u.resultMask&&(c.maskData=u.resultMask),s.returnEncodedMask&&l.mask&&(c.encodedMaskData=l.mask.bitset?l.mask.bitset:null),s.returnFileInfo&&(c.fileInfo=i(l),s.computeUsedBitDepths&&(c.fileInfo.bitDepths=a(l))),c}},t=function(e,t,i,a,r){var s,o,l,f=0,u=e.pixels.numBlocksX,c=e.pixels.numBlocksY,h=Math.floor(e.width/u),d=Math.floor(e.height/c),m=2*e.maxZError,g=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),o=new t(e.width*e.height),r&&i&&(l=new Uint8Array(e.width*e.height));for(var p,w,x=new Float32Array(h*d),k=0;k<=c;k++){var y=k!==c?d:e.height%c;if(0!==y)for(var I=0;I<=u;I++){var v=I!==u?h:e.width%u;if(0!==v){var b,U,T,M,A=k*e.width*d+I*h,V=e.width-v,D=e.pixels.blocks[f];if(D.encoding<2?(0===D.encoding?b=D.rawData:(n(D.stuffedData,D.bitsPerPixel,D.numValidPixels,D.offset,m,x,e.pixels.maxValue),b=x),U=0):T=2===D.encoding?0:D.offset,i)for(w=0;w<y;w++){for(7&A&&(M=i[A>>3],M<<=7&A),p=0;p<v;p++)7&A||(M=i[A>>3]),128&M?(l&&(l[A]=1),g=g>(s=D.encoding<2?b[U++]:T)?s:g,o[A++]=s):(l&&(l[A]=0),o[A++]=a),M<<=1;A+=V}else if(D.encoding<2)for(w=0;w<y;w++){for(p=0;p<v;p++)g=g>(s=b[U++])?s:g,o[A++]=s;A+=V}else for(g=g>T?T:g,w=0;w<y;w++){for(p=0;p<v;p++)o[A++]=T;A+=V}if(1===D.encoding&&U!==D.numValidPixels)throw"Block and Mask do not match";f++}}}return{resultPixels:o,resultMask:l,minValue:g}},i=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},a=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,i={},a=0;a<t;a++){var r=e.pixels.blocks[a];0===r.encoding?i.float32=!0:1===r.encoding?i[r.bitsPerPixel]=!0:i[0]=!0}return Object.keys(i)},r=function(e,t,i){var a={},r=new Uint8Array(e,t,10);if(a.fileIdentifierString=String.fromCharCode.apply(null,r),"CntZImage"!==a.fileIdentifierString.trim())throw"Unexpected file identifier string: "+a.fileIdentifierString;t+=10;var n=new DataView(e,t,24);if(a.fileVersion=n.getInt32(0,!0),a.imageType=n.getInt32(4,!0),a.height=n.getUint32(8,!0),a.width=n.getUint32(12,!0),a.maxZError=n.getFloat64(16,!0),t+=24,!i)if(n=new DataView(e,t,16),a.mask={},a.mask.numBlocksY=n.getUint32(0,!0),a.mask.numBlocksX=n.getUint32(4,!0),a.mask.numBytes=n.getUint32(8,!0),a.mask.maxValue=n.getFloat32(12,!0),t+=16,a.mask.numBytes>0){var s=new Uint8Array(Math.ceil(a.width*a.height/8)),o=(n=new DataView(e,t,a.mask.numBytes)).getInt16(0,!0),l=2,f=0;do{if(o>0)for(;o--;)s[f++]=n.getUint8(l++);else{var u=n.getUint8(l++);for(o=-o;o--;)s[f++]=u}o=n.getInt16(l,!0),l+=2}while(l<a.mask.numBytes);if(-32768!==o||f<s.length)throw"Unexpected end of mask RLE encoding";a.mask.bitset=s,t+=a.mask.numBytes}else 0==(a.mask.numBytes|a.mask.numBlocksY|a.mask.maxValue)&&(a.mask.bitset=new Uint8Array(Math.ceil(a.width*a.height/8)));n=new DataView(e,t,16),a.pixels={},a.pixels.numBlocksY=n.getUint32(0,!0),a.pixels.numBlocksX=n.getUint32(4,!0),a.pixels.numBytes=n.getUint32(8,!0),a.pixels.maxValue=n.getFloat32(12,!0),t+=16;var c=a.pixels.numBlocksX,h=a.pixels.numBlocksY,d=c+(a.width%c>0?1:0),m=h+(a.height%h>0?1:0);a.pixels.blocks=new Array(d*m);for(var g=0,p=0;p<m;p++)for(var w=0;w<d;w++){var x=0,k=e.byteLength-t;n=new DataView(e,t,Math.min(10,k));var y={};a.pixels.blocks[g++]=y;var I=n.getUint8(0);if(x++,y.encoding=63&I,y.encoding>3)throw"Invalid block encoding ("+y.encoding+")";if(2!==y.encoding){if(0!==I&&2!==I){if(I>>=6,y.offsetType=I,2===I)y.offset=n.getInt8(1),x++;else if(1===I)y.offset=n.getInt16(1,!0),x+=2;else{if(0!==I)throw"Invalid block offset type";y.offset=n.getFloat32(1,!0),x+=4}if(1===y.encoding)if(I=n.getUint8(x),x++,y.bitsPerPixel=63&I,I>>=6,y.numValidPixelsType=I,2===I)y.numValidPixels=n.getUint8(x),x++;else if(1===I)y.numValidPixels=n.getUint16(x,!0),x+=2;else{if(0!==I)throw"Invalid valid pixel count type";y.numValidPixels=n.getUint32(x,!0),x+=4}}var v;if(t+=x,3!==y.encoding)if(0===y.encoding){var b=(a.pixels.numBytes-1)/4;if(b!==Math.floor(b))throw"uncompressed block has invalid length";v=new ArrayBuffer(4*b),new Uint8Array(v).set(new Uint8Array(e,t,4*b));var U=new Float32Array(v);y.rawData=U,t+=4*b}else if(1===y.encoding){var T=Math.ceil(y.numValidPixels*y.bitsPerPixel/8),M=Math.ceil(T/4);v=new ArrayBuffer(4*M),new Uint8Array(v).set(new Uint8Array(e,t,T)),y.stuffedData=new Uint32Array(v),t+=T}}else t++}return a.eofOffset=t,a},n=function(e,t,i,a,r,n,s){var o,l,f,u=(1<<t)-1,c=0,h=0,d=Math.ceil((s-a)/r),m=4*e.length-Math.ceil(t*i/8);for(e[e.length-1]<<=8*m,o=0;o<i;o++){if(0===h&&(f=e[c++],h=32),h>=t)l=f>>>h-t&u,h-=t;else{var g=t-h;l=(f&u)<<g&u,l+=(f=e[c++])>>>(h=32-g)}n[o]=l<d?a+l*r:s}return n};return e}(),B=function(e,t,i,a,r,n,s,o){var l,f,u,c,h,d=(1<<i)-1,m=0,g=0,p=4*e.length-Math.ceil(i*a/8);if(e[e.length-1]<<=8*p,r)for(l=0;l<a;l++)0===g&&(u=e[m++],g=32),g>=i?(f=u>>>g-i&d,g-=i):(f=(u&d)<<(c=i-g)&d,f+=(u=e[m++])>>>(g=32-c)),t[l]=r[f];else for(h=Math.ceil((o-n)/s),l=0;l<a;l++)0===g&&(u=e[m++],g=32),g>=i?(f=u>>>g-i&d,g-=i):(f=(u&d)<<(c=i-g)&d,f+=(u=e[m++])>>>(g=32-c)),t[l]=f<h?n+f*s:o},S=function(e,t,i,a,r,n){var s,o=(1<<t)-1,l=0,f=0,u=0,c=0,h=0,d=[],m=4*e.length-Math.ceil(t*i/8);e[e.length-1]<<=8*m;var g=Math.ceil((n-a)/r);for(f=0;f<i;f++)0===c&&(s=e[l++],c=32),c>=t?(h=s>>>c-t&o,c-=t):(h=(s&o)<<(u=t-c)&o,h+=(s=e[l++])>>>(c=32-u)),d[f]=h<g?a+h*r:n;return d.unshift(a),d},P=function(e,t,i,a,r,n,s,o){var l,f,u,c,h=(1<<i)-1,d=0,m=0,g=0;if(r)for(l=0;l<a;l++)0===m&&(u=e[d++],m=32,g=0),m>=i?(f=u>>>g&h,m-=i,g+=i):(f=u>>>g&h,m=32-(c=i-m),f|=((u=e[d++])&(1<<c)-1)<<i-c,g=c),t[l]=r[f];else{var p=Math.ceil((o-n)/s);for(l=0;l<a;l++)0===m&&(u=e[d++],m=32,g=0),m>=i?(f=u>>>g&h,m-=i,g+=i):(f=u>>>g&h,m=32-(c=i-m),f|=((u=e[d++])&(1<<c)-1)<<i-c,g=c),t[l]=f<p?n+f*s:o}return t},E=function(e,t,i,a,r,n){var s,o=(1<<t)-1,l=0,f=0,u=0,c=0,h=0,d=0,m=[],g=Math.ceil((n-a)/r);for(f=0;f<i;f++)0===c&&(s=e[l++],c=32,d=0),c>=t?(h=s>>>d&o,c-=t,d+=t):(h=s>>>d&o,c=32-(u=t-c),h|=((s=e[l++])&(1<<u)-1)<<t-u,d=u),m[f]=h<g?a+h*r:n;return m.unshift(a),m},F=function(e,t,i,a){var r,n,s,o,l=(1<<i)-1,f=0,u=0,c=4*e.length-Math.ceil(i*a/8);for(e[e.length-1]<<=8*c,r=0;r<a;r++)0===u&&(s=e[f++],u=32),u>=i?(n=s>>>u-i&l,u-=i):(n=(s&l)<<(o=i-u)&l,n+=(s=e[f++])>>>(u=32-o)),t[r]=n;return t},C=function(e,t,i,a){var r,n,s,o,l=(1<<i)-1,f=0,u=0,c=0;for(r=0;r<a;r++)0===u&&(s=e[f++],u=32,c=0),u>=i?(n=s>>>c&l,u-=i,c+=i):(n=s>>>c&l,u=32-(o=i-u),n|=((s=e[f++])&(1<<o)-1)<<i-o,c=o),t[r]=n;return t},L={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,i=65535,a=e.length,r=Math.floor(a/2),n=0;r;){var s=r>=359?359:r;r-=s;do{t+=e[n++]<<8,i+=t+=e[n++]}while(--s);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&a&&(i+=t+=e[n]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,a=new Uint8Array(e,i,6),r={};if(r.fileIdentifierString=String.fromCharCode.apply(null,a),0!==r.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+r.fileIdentifierString;i+=6;var n,s=new DataView(e,i,8),o=s.getInt32(0,!0);if(r.fileVersion=o,i+=4,o>=3&&(r.checksum=s.getUint32(4,!0),i+=4),s=new DataView(e,i,12),r.height=s.getUint32(0,!0),r.width=s.getUint32(4,!0),i+=8,o>=4?(r.numDims=s.getUint32(8,!0),i+=4):r.numDims=1,s=new DataView(e,i,40),r.numValidPixel=s.getUint32(0,!0),r.microBlockSize=s.getInt32(4,!0),r.blobSize=s.getInt32(8,!0),r.imageType=s.getInt32(12,!0),r.maxZError=s.getFloat64(16,!0),r.zMin=s.getFloat64(24,!0),r.zMax=s.getFloat64(32,!0),i+=40,t.headerInfo=r,t.ptr=i,o>=3&&(n=o>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-n,r.blobSize-14))!==r.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,a=this.getDataTypeArray(i.imageType),r=i.numDims*this.getDataTypeSize(i.imageType),n=this.readSubArray(e,t.ptr,a,r),s=this.readSubArray(e,t.ptr+r,a,r);t.ptr+=2*r;var o,l=!0;for(o=0;o<i.numDims;o++)if(n[o]!==s[o]){l=!1;break}return i.minValues=n,i.maxValues=s,l},readSubArray:function(e,t,i,a){var r;if(i===Uint8Array)r=new Uint8Array(e,t,a);else{var n=new ArrayBuffer(a);new Uint8Array(n).set(new Uint8Array(e,t,a)),r=new i(n)}return r},readMask:function(e,t){var i,a,r=t.ptr,n=t.headerInfo,s=n.width*n.height,o=n.numValidPixel,l=new DataView(e,r,4),f={};if(f.numBytes=l.getUint32(0,!0),r+=4,(0===o||s===o)&&0!==f.numBytes)throw"invalid mask";if(0===o)i=new Uint8Array(Math.ceil(s/8)),f.bitset=i,a=new Uint8Array(s),t.pixels.resultMask=a,r+=f.numBytes;else if(f.numBytes>0){i=new Uint8Array(Math.ceil(s/8));var u=(l=new DataView(e,r,f.numBytes)).getInt16(0,!0),c=2,h=0,d=0;do{if(u>0)for(;u--;)i[h++]=l.getUint8(c++);else for(d=l.getUint8(c++),u=-u;u--;)i[h++]=d;u=l.getInt16(c,!0),c+=2}while(c<f.numBytes);if(-32768!==u||h<i.length)throw"Unexpected end of mask RLE encoding";a=new Uint8Array(s);var m=0,g=0;for(g=0;g<s;g++)7&g?(m=i[g>>3],m<<=7&g):m=i[g>>3],128&m&&(a[g]=1);t.pixels.resultMask=a,f.bitset=i,r+=f.numBytes}return t.ptr=r,t.mask=f,!0},readDataOneSweep:function(e,t,i){var a,r=t.ptr,n=t.headerInfo,s=n.numDims,o=n.width*n.height,l=n.imageType,f=n.numValidPixel*L.getDataTypeSize(l)*s,u=t.pixels.resultMask;if(i===Uint8Array)a=new Uint8Array(e,r,f);else{var c=new ArrayBuffer(f);new Uint8Array(c).set(new Uint8Array(e,r,f)),a=new i(c)}if(a.length===o*s)t.pixels.resultPixels=a;else{t.pixels.resultPixels=new i(o*s);var h=0,d=0,m=0,g=0;if(s>1)for(m=0;m<s;m++)for(g=m*o,d=0;d<o;d++)u[d]&&(t.pixels.resultPixels[g+d]=a[h++]);else for(d=0;d<o;d++)u[d]&&(t.pixels.resultPixels[d]=a[h++])}return r+=f,t.ptr=r,!0},readHuffmanTree:function(e,t){var i=this.HUFFMAN_LUT_BITS_MAX,a=new DataView(e,t.ptr,16);if(t.ptr+=16,a.getInt32(0,!0)<2)throw"unsupported Huffman version";var r=a.getInt32(4,!0),n=a.getInt32(8,!0),s=a.getInt32(12,!0);if(n>=s)return!1;var o=new Uint32Array(s-n);L.decodeBits(e,t,o);var l,f,u,c,h=[];for(l=n;l<s;l++)h[f=l-(l<r?0:r)]={first:o[l-n],second:null};var d=e.byteLength-t.ptr,m=Math.ceil(d/4),g=new ArrayBuffer(4*m);new Uint8Array(g).set(new Uint8Array(e,t.ptr,d));var p,w=new Uint32Array(g),x=0,k=0;for(p=w[0],l=n;l<s;l++)(c=h[f=l-(l<r?0:r)].first)>0&&(h[f].second=p<<x>>>32-c,32-x>=c?32===(x+=c)&&(x=0,p=w[++k]):(x+=c-32,p=w[++k],h[f].second|=p>>>32-x));var y=0,I=0,v=new N;for(l=0;l<h.length;l++)void 0!==h[l]&&(y=Math.max(y,h[l].first));I=y>=i?i:y,y>=30&&console.log("WARning, large NUM LUT BITS IS "+y);var b,U,T,M,A,V=[];for(l=n;l<s;l++)if((c=h[f=l-(l<r?0:r)].first)>0)if(b=[c,f],c<=I)for(U=h[f].second<<I-c,T=1<<I-c,u=0;u<T;u++)V[U|u]=b;else for(U=h[f].second,A=v,M=c-1;M>=0;M--)U>>>M&1?(A.right||(A.right=new N),A=A.right):(A.left||(A.left=new N),A=A.left),0===M&&!A.val&&(A.val=b[1]);return{decodeLut:V,numBitsLUTQick:I,numBitsLUT:y,tree:v,stuffedData:w,srcPtr:k,bitPos:x}},readHuffman:function(e,t,i){var a,r,n,s,o,l,f,u,c,h=t.headerInfo,d=h.numDims,m=t.headerInfo.height,g=t.headerInfo.width,p=g*m,w=this.readHuffmanTree(e,t),x=w.decodeLut,k=w.tree,y=w.stuffedData,I=w.srcPtr,v=w.bitPos,b=w.numBitsLUTQick,U=w.numBitsLUT,T=0===t.headerInfo.imageType?128:0,M=t.pixels.resultMask,A=0;v>0&&(I++,v=0);var V,D=y[I],B=1===t.encodeMode,S=new i(p*d),P=S;for(V=0;V<h.numDims;V++){if(d>1&&(P=new i(S.buffer,p*V,p),A=0),t.headerInfo.numValidPixel===g*m)for(u=0,l=0;l<m;l++)for(f=0;f<g;f++,u++){if(r=0,o=s=D<<v>>>32-b,32-v<b&&(o=s|=y[I+1]>>>64-v-b),x[o])r=x[o][1],v+=x[o][0];else for(o=s=D<<v>>>32-U,32-v<U&&(o=s|=y[I+1]>>>64-v-U),a=k,c=0;c<U;c++)if(!(a=s>>>U-c-1&1?a.right:a.left).left&&!a.right){r=a.val,v=v+c+1;break}v>=32&&(v-=32,D=y[++I]),n=r-T,B?(n+=f>0?A:l>0?P[u-g]:A,n&=255,P[u]=n,A=n):P[u]=n}else for(u=0,l=0;l<m;l++)for(f=0;f<g;f++,u++)if(M[u]){if(r=0,o=s=D<<v>>>32-b,32-v<b&&(o=s|=y[I+1]>>>64-v-b),x[o])r=x[o][1],v+=x[o][0];else for(o=s=D<<v>>>32-U,32-v<U&&(o=s|=y[I+1]>>>64-v-U),a=k,c=0;c<U;c++)if(!(a=s>>>U-c-1&1?a.right:a.left).left&&!a.right){r=a.val,v=v+c+1;break}v>=32&&(v-=32,D=y[++I]),n=r-T,B?(f>0&&M[u-1]?n+=A:l>0&&M[u-g]?n+=P[u-g]:n+=A,n&=255,P[u]=n,A=n):P[u]=n}t.ptr=t.ptr+4*(I+1)+(v>0?4:0)}t.pixels.resultPixels=S},decodeBits:function(e,t,i,a,r){var n=t.headerInfo,s=n.fileVersion,o=0,l=e.byteLength-t.ptr>=5?5:e.byteLength-t.ptr,f=new DataView(e,t.ptr,l),u=f.getUint8(0);o++;var c=u>>6,h=0===c?4:3-c,d=(32&u)>0,m=31&u,g=0;if(1===h)g=f.getUint8(o),o++;else if(2===h)g=f.getUint16(o,!0),o+=2;else{if(4!==h)throw"Invalid valid pixel count type";g=f.getUint32(o,!0),o+=4}var p,w,x,k,y,I,v,b,U,T=2*n.maxZError,M=n.numDims>1?n.maxValues[r]:n.zMax;if(d){for(t.counter.lut++,b=f.getUint8(o),o++,k=Math.ceil((b-1)*m/8),y=Math.ceil(k/4),w=new ArrayBuffer(4*y),x=new Uint8Array(w),t.ptr+=o,x.set(new Uint8Array(e,t.ptr,k)),v=new Uint32Array(w),t.ptr+=k,U=0;b-1>>>U;)U++;k=Math.ceil(g*U/8),y=Math.ceil(k/4),w=new ArrayBuffer(4*y),(x=new Uint8Array(w)).set(new Uint8Array(e,t.ptr,k)),p=new Uint32Array(w),t.ptr+=k,I=s>=3?E(v,m,b-1,a,T,M):S(v,m,b-1,a,T,M),s>=3?P(p,i,U,g,I):B(p,i,U,g,I)}else t.counter.bitstuffer++,U=m,t.ptr+=o,U>0&&(k=Math.ceil(g*U/8),y=Math.ceil(k/4),w=new ArrayBuffer(4*y),(x=new Uint8Array(w)).set(new Uint8Array(e,t.ptr,k)),p=new Uint32Array(w),t.ptr+=k,s>=3?null===a?C(p,i,U,g):P(p,i,U,g,!1,a,T,M):null===a?F(p,i,U,g):B(p,i,U,g,!1,a,T,M))},readTiles:function(e,t,i){var a=t.headerInfo,r=a.width,n=a.height,s=a.microBlockSize,o=a.imageType,l=L.getDataTypeSize(o),f=Math.ceil(r/s),u=Math.ceil(n/s);t.pixels.numBlocksY=u,t.pixels.numBlocksX=f,t.pixels.ptr=0;var c,h,d,m,g,p,w,x,k=0,y=0,I=0,v=0,b=0,U=0,T=0,M=0,A=0,V=0,D=0,B=0,S=0,P=0,E=0,F=new i(s*s),C=n%s||s,N=r%s||s,O=a.numDims,z=t.pixels.resultMask,R=t.pixels.resultPixels;for(I=0;I<u;I++)for(b=I!==u-1?s:C,v=0;v<f;v++)for(V=I*r*s+v*s,D=r-(U=v!==f-1?s:N),x=0;x<O;x++){if(O>1&&(R=new i(t.pixels.resultPixels.buffer,r*n*x*l,r*n)),T=e.byteLength-t.ptr,h={},E=0,E++,A=(M=(c=new DataView(e,t.ptr,Math.min(10,T))).getUint8(0))>>6&255,(M>>2&15)!=(v*s>>3&15))throw"integrity issue";if((g=3&M)>3)throw t.ptr+=E,"Invalid block encoding ("+g+")";if(2!==g)if(0===g){if(t.counter.uncompressed++,t.ptr+=E,B=(B=b*U*l)<(S=e.byteLength-t.ptr)?B:S,d=new ArrayBuffer(B%l==0?B:B+l-B%l),new Uint8Array(d).set(new Uint8Array(e,t.ptr,B)),m=new i(d),P=0,z)for(k=0;k<b;k++){for(y=0;y<U;y++)z[V]&&(R[V]=m[P++]),V++;V+=D}else for(k=0;k<b;k++){for(y=0;y<U;y++)R[V++]=m[P++];V+=D}t.ptr+=P*l}else if(p=L.getDataTypeUsed(o,A),w=L.getOnePixel(h,E,p,c),E+=L.getDataTypeSize(p),3===g)if(t.ptr+=E,t.counter.constantoffset++,z)for(k=0;k<b;k++){for(y=0;y<U;y++)z[V]&&(R[V]=w),V++;V+=D}else for(k=0;k<b;k++){for(y=0;y<U;y++)R[V++]=w;V+=D}else if(t.ptr+=E,L.decodeBits(e,t,F,w,x),E=0,z)for(k=0;k<b;k++){for(y=0;y<U;y++)z[V]&&(R[V]=F[E++]),V++;V+=D}else for(k=0;k<b;k++){for(y=0;y<U;y++)R[V++]=F[E++];V+=D}else t.counter.constant++,t.ptr+=E}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:L.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t=e.headerInfo.zMax,i=e.headerInfo.numDims,a=e.headerInfo.height*e.headerInfo.width,r=a*i,n=0,s=0,o=0,l=e.pixels.resultMask;if(l)if(i>1)for(n=0;n<i;n++)for(o=n*a,s=0;s<a;s++)l[s]&&(e.pixels.resultPixels[o+s]=t);else for(s=0;s<a;s++)l[s]&&(e.pixels.resultPixels[s]=t);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(t);else for(s=0;s<r;s++)e.pixels.resultPixels[s]=t},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:default:t=Float32Array;break;case 7:t=Float64Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:default:t="F32";break;case 7:t="F64"}return t},isValidPixelValue:function(e,t){if(null===t)return!1;var i;switch(e){case 0:i=t>=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,a){var r=0;switch(i){case 0:r=a.getInt8(t);break;case 1:r=a.getUint8(t);break;case 2:r=a.getInt16(t,!0);break;case 3:r=a.getUint16(t,!0);break;case 4:r=a.getInt32(t,!0);break;case 5:r=a.getUInt32(t,!0);break;case 6:r=a.getFloat32(t,!0);break;case 7:r=a.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return r}},N=function(e,t,i){this.val=e,this.left=t,this.right=i},O={decode:function(e,t){var i=(t=t||{}).noDataValue,a=0,r={};if(r.ptr=t.inputOffset||0,r.pixels={},L.readHeaderInfo(e,r)){var n=r.headerInfo,s=n.fileVersion,o=L.getDataTypeArray(n.imageType);L.readMask(e,r),n.numValidPixel!==n.width*n.height&&!r.pixels.resultMask&&(r.pixels.resultMask=t.maskData);var l,f=n.width*n.height;if(r.pixels.resultPixels=new o(f*n.numDims),r.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==n.numValidPixel)if(n.zMax===n.zMin)L.constructConstantSurface(r);else if(s>=4&&L.checkMinMaxRanges(e,r))L.constructConstantSurface(r);else{var u=new DataView(e,r.ptr,2),c=u.getUint8(0);if(r.ptr++,c)L.readDataOneSweep(e,r,o);else if(s>1&&n.imageType<=1&&Math.abs(n.maxZError-.5)<1e-5){var h=u.getUint8(1);if(r.ptr++,r.encodeMode=h,h>2||s<4&&h>1)throw"Invalid Huffman flag "+h;h?L.readHuffman(e,r,o):L.readTiles(e,r,o)}else L.readTiles(e,r,o)}r.eofOffset=r.ptr,t.inputOffset?(l=r.headerInfo.blobSize+t.inputOffset-r.ptr,Math.abs(l)>=1&&(r.eofOffset=t.inputOffset+r.headerInfo.blobSize)):(l=r.headerInfo.blobSize-r.ptr,Math.abs(l)>=1&&(r.eofOffset=r.headerInfo.blobSize));var d={width:n.width,height:n.height,pixelData:r.pixels.resultPixels,minValue:n.zMin,maxValue:n.zMax,validPixelCount:n.numValidPixel,dimCount:n.numDims,dimStats:{minValues:n.minValues,maxValues:n.maxValues},maskData:r.pixels.resultMask};if(r.pixels.resultMask&&L.isValidPixelValue(n.imageType,i)){var m=r.pixels.resultMask;for(a=0;a<f;a++)m[a]||(d.pixelData[a]=i);d.noDataValue=i}return r.noDataValue=i,t.returnFileInfo&&(d.fileInfo=L.formatFileInfo(r)),d}},getBandCount:function(e){for(var t=0,i=0,a={ptr:0,pixels:{}};i<e.byteLength-58;)L.readHeaderInfo(e,a),i+=a.headerInfo.blobSize,t++,a.ptr=i;return t}},R=O,H=function(){var e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]}(),_={decode:function(e,t){if(!H)throw"Big endian system is not supported.";var i,a,r,n,s,o=(t=t||{}).inputOffset||0,l=new Uint8Array(e,o,10),f=String.fromCharCode.apply(null,l);if("CntZImage"===f.trim())i=z,a=1;else{if("Lerc2"!==f.substring(0,5))throw"Unexpected file identifier string: "+f;i=R,a=2}for(var u,c,h,d=0,m=e.byteLength-10,g=[],p={width:0,height:0,pixels:[],pixelType:t.pixelType,mask:null,statistics:[]};o<m;){var w=i.decode(e,{inputOffset:o,encodedMaskData:u,maskData:h,returnMask:0===d,returnEncodedMask:0===d,returnFileInfo:!0,pixelType:t.pixelType||null,noDataValue:t.noDataValue||null});o=w.fileInfo.eofOffset,0===d&&(u=w.encodedMaskData,h=w.maskData,p.width=w.width,p.height=w.height,p.dimCount=w.dimCount||1,p.pixelType=w.pixelType||w.fileInfo.pixelType,p.mask=w.maskData),a>1&&w.fileInfo.mask&&w.fileInfo.mask.numBytes>0&&g.push(w.maskData),d++,p.pixels.push(w.pixelData),p.statistics.push({minValue:w.minValue,maxValue:w.maxValue,noDataValue:w.noDataValue,dimStats:w.dimStats})}if(a>1&&g.length>1){for(s=p.width*p.height,p.bandMasks=g,(h=new Uint8Array(s)).set(g[0]),r=1;r<g.length;r++)for(c=g[r],n=0;n<s;n++)h[n]=h[n]&c[n];p.maskData=h}return p}},Y.Lerc=_;var X=Y.Lerc;return d((function(t,i){if(t.encoding===U.LERC){var a;try{a=X.decode(t.heightmap)}catch(e){throw new h.t(e)}if(a.statistics[0].minValue===Number.MAX_VALUE)throw new h.t("Invalid tile data");t.heightmap=a.pixels[0],t.width=a.width,t.height=a.height}t.ellipsoid=e.t.clone(t.ellipsoid),t.rectangle=e.h.clone(t.rectangle);var r=T.computeVertices(t),n=r.vertices;return i.push(n.buffer),{vertices:n.buffer,numberOfAttributes:r.encoding.getStride(),minimumHeight:r.minimumHeight,maximumHeight:r.maximumHeight,gridWidth:t.width,gridHeight:t.height,boundingSphere3D:r.boundingSphere3D,orientedBoundingBox:r.orientedBoundingBox,occludeePointInScaledSpace:r.occludeePointInScaledSpace,encoding:r.encoding,westIndicesSouthToNorth:r.westIndicesSouthToNorth,southIndicesEastToWest:r.southIndicesEastToWest,eastIndicesNorthToSouth:r.eastIndicesNorthToSouth,northIndicesWestToEast:r.northIndicesWestToEast}}))})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createVerticesFromQuantizedTerrainMesh.js b/SuperMap iEarth/public/SuperMap3D/Workers/createVerticesFromQuantizedTerrainMesh.js index 78a4d5f4..4e3901db 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createVerticesFromQuantizedTerrainMesh.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createVerticesFromQuantizedTerrainMesh.js @@ -1 +1 @@ -define(["./AttributeCompression-b5a80a71","./EllipsoidTangentPlane-d6b88a1f","./buildModuleUrl-9eef8841","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./when-92c6cf3c","./TerrainEncoding-fd44afa8","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-cec0163f","./OrientedBoundingBox-d2eb0b92","./Check-52a7d806","./GeometryAttribute-f47bd1cb","./WebMercatorProjection-ee891935","./createTaskProcessorWorker","./Cartesian4-72b88c9e","./IntersectionTests-6e80d61c","./Plane-33393da8","./Event-3390cd7d","./RuntimeError-c6a62a80","./ComponentDatatype-98414d16","./WebGLConstants-42651efd","./PolygonPipeline-425528b3","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,r,n,i,o,a,s,h,c,d,u,I,l,m,g,T,f,v,y,p,w,E,N,b){"use strict";function S(){I.t.throwInstantiationError()}Object.defineProperties(S.prototype,{errorEvent:{get:I.t.throwInstantiationError},credit:{get:I.t.throwInstantiationError},tilingScheme:{get:I.t.throwInstantiationError},ready:{get:I.t.throwInstantiationError},readyPromise:{get:I.t.throwInstantiationError},hasWaterMask:{get:I.t.throwInstantiationError},hasVertexNormals:{get:I.t.throwInstantiationError},availability:{get:I.t.throwInstantiationError}});var A=[];S.getRegularGridIndices=function(e,t){if(e*t>=c.e.FOUR_GIGABYTES)throw new I.t("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=A[e];a.e(r)||(A[e]=r=[]);var n=r[t];return a.e(n)||M(e,t,n=e*t<c.e.SIXTY_FOUR_KILOBYTES?r[t]=new Uint16Array((e-1)*(t-1)*6+3*(e+t-2)):r[t]=new Uint32Array((e-1)*(t-1)*6+3*(e+t-2)),0),n},S.getRegularGridIndicesForReproject=function(e,t){if(e*t>=c.e.FOUR_GIGABYTES)throw new I.t("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=A[e];a.e(r)||(A[e]=r=[]);var n=r[t];return a.e(n)||M(e,t,n=e*t<c.e.SIXTY_FOUR_KILOBYTES?r[t]=new Uint16Array((e-1)*(t-1)*6):r[t]=new Uint32Array((e-1)*(t-1)*6),0),n};var x=[];S.getRegularGridIndicesAndEdgeIndices=function(e,t){if(e*t>=c.e.FOUR_GIGABYTES)throw new I.t("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=x[e];a.e(r)||(x[e]=r=[]);var n=r[t];if(!a.e(n)){var i=S.getRegularGridIndices(e,t),o=F(e,t),s=o.westIndicesSouthToNorth,h=o.southIndicesEastToWest,d=o.eastIndicesNorthToSouth,u=o.northIndicesWestToEast;n=r[t]={indices:i,westIndicesSouthToNorth:s,southIndicesEastToWest:h,eastIndicesNorthToSouth:d,northIndicesWestToEast:u}}return n};var _=[];function F(e,t){var r,n=new Array(t),i=new Array(e),o=new Array(t),a=new Array(e);for(r=0;r<e;++r)a[r]=r,i[r]=e*t-1-r;for(r=0;r<t;++r)o[r]=(r+1)*e-1,n[r]=(t-r-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:i,eastIndicesNorthToSouth:o,northIndicesWestToEast:a}}function M(e,t,r,n){for(var i=0,o=0;o<t-1;++o){for(var a=0;a<e-1;++a){var s=i,h=s+e,c=h+1,d=s+1;r[n++]=s,r[n++]=h,r[n++]=d,r[n++]=d,r[n++]=h,r[n++]=c,++i}++i}var u=(t-1)/2,I=(e-1)/2;i=0;for(a=0;a<I;a++)r[n++]=i,r[n++]=i+1,r[n++]=i+2,i+=2;i=e*(t-1);for(a=0;a<I;a++)r[n++]=i+1,r[n++]=i,r[n++]=i+2,i+=2;i=0;for(a=0;a<u;a++)r[n++]=i+e,r[n++]=i,r[n++]=i+2*e,i+=2*e;i=e-1;for(a=0;a<u;a++)r[n++]=i,r[n++]=i+e,r[n++]=i+2*e,i+=2*e}function P(e,t,r,n,i){for(var o=a.e(i),s=e[0],h=e.length,c=1;c<h;++c){var d=e[c];!o||i[s+"_"+d]?(r[n++]=s,r[n++]=d,r[n++]=t,r[n++]=t,r[n++]=d,r[n++]=t+1,s=d,++t):(s=d,++t)}return n}S.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){if(e*t>=c.e.FOUR_GIGABYTES)throw new I.t("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=_[e];a.e(r)||(_[e]=r=[]);var n=r[t];if(!a.e(n)){var i=e*t,o=(e-1)*(t-1)*6,s=2*e+2*t,d=i+s,u=3*(e+t-2),l=o+6*Math.max(0,s-4)+u,m=F(e,t),g=m.westIndicesSouthToNorth,T=m.southIndicesEastToWest,f=m.eastIndicesNorthToSouth,v=m.northIndicesWestToEast,y=h.IndexDatatype.createTypedArray(d,l);M(e,t,y,0),S.addSkirtIndices(g,T,f,v,i,y,o+u),n=r[t]={indices:y,westIndicesSouthToNorth:g,southIndicesEastToWest:T,eastIndicesNorthToSouth:f,northIndicesWestToEast:v,indexCountWithoutSkirts:o}}return n},S.addSkirtIndices=function(e,t,r,n,i,o,a,s){var h=i;a=P(e,h,o,a,s),a=P(t,h+=e.length,o,a,s),a=P(r,h+=t.length,o,a,s),P(n,h+=r.length,o,a,s)},S.heightmapTerrainQuality=.25,S.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*S.heightmapTerrainQuality/(t*r)},S.prototype.requestTileGeometry=I.t.throwInstantiationError,S.prototype.getLevelMaximumGeometricError=I.t.throwInstantiationError,S.prototype.getTileDataAvailable=I.t.throwInstantiationError,S.prototype.loadTileDataAvailability=I.t.throwInstantiationError;var G=32767,B=new i.o,W=new i.o,C=new i.o,O=new o.a,Y=new n.o,k=new i.o,H=new d.p,R=new d.p;function V(e,t,r,n,o,a,s,h,u){var I=Number.POSITIVE_INFINITY,l=o.north,m=o.south,g=o.east,T=o.west;g<T&&(g+=c.e.TWO_PI);for(var f=e.length,v=0;v<f;++v){var y=e[v],p=r[y],w=n[y];O.longitude=c.e.lerp(T,g,w.x),O.latitude=c.e.lerp(m,l,w.y),O.height=p-t;var E=a.cartographicToCartesian(O,B);d.p.multiplyByPoint(s,E,E),i.o.minimumByComponent(E,h,h),i.o.maximumByComponent(E,u,u),I=Math.min(I,O.height)}return I}function U(t,r,n,o,s,h,u,I,g,T,f,v,y,p,w){var E=a.e(u),N=g.north,b=g.south,S=g.east,A=g.west;S<A&&(S+=c.e.TWO_PI);for(var x=n.length,_=0;_<x;++_){var F=n[_],M=s[F],P=h[F];O.longitude=c.e.lerp(A,S,P.x)+p,O.latitude=c.e.lerp(b,N,P.y)+w,O.height=M-T;var G,W=I.cartographicToCartesian(O,B);if(E){var C=2*F;if(Y.x=u[C],Y.y=u[C+1],1!==f){var V=e.t.octDecode(Y.x,Y.y,k),U=l.m.eastNorthUpToFixedFrame(B,I,R),z=d.p.inverseTransformation(U,H);d.p.multiplyByPointAsVector(z,V,V),V.z*=f,i.o.normalize(V,V),d.p.multiplyByPointAsVector(U,V,V),i.o.normalize(V,V),e.t.octEncode(V,Y)}}o.hasWebMercatorT&&(G=(m.t.geodeticLatitudeToMercatorAngle(O.latitude)-v)*y),r=o.encode(t,r,W,P,O.height,Y,G)}}function z(e,t){var r;return"function"==typeof e.slice&&"function"!=typeof(r=e.slice()).sort&&(r=void 0),a.e(r)||(r=Array.prototype.slice.call(e)),r.sort(t),r}var L=g((function(o,I){var g,T,f=o.quantizedVertices,v=f.length/3,y=o.octEncodedNormals,p=o.westIndices.length+o.eastIndices.length+o.southIndices.length+o.northIndices.length,w=o.includeWebMercatorT,E=n.h.clone(o.rectangle),N=E.west,b=E.south,A=E.east,x=E.north,_=n.t.clone(o.ellipsoid),F=o.exaggeration,M=o.minimumHeight*F,P=o.maximumHeight*F,L=a.e(o.validMinimumHeight)?o.validMinimumHeight*F:M*F,D=a.e(o.validMaximumHeight)?o.validMaximumHeight*F:P*F,j=o.relativeToCenter,q=l.m.eastNorthUpToFixedFrame(j,_),K=d.p.inverseTransformation(q,new d.p);w&&(g=m.t.geodeticLatitudeToMercatorAngle(b),T=1/(m.t.geodeticLatitudeToMercatorAngle(x)-g));var Q=f.subarray(0,v),X=f.subarray(v,2*v),Z=f.subarray(2*v,3*v),J=a.e(y),$=new Array(v),ee=new Array(v),te=new Array(v),re=w?new Array(v):[],ne=W;ne.x=Number.POSITIVE_INFINITY,ne.y=Number.POSITIVE_INFINITY,ne.z=Number.POSITIVE_INFINITY;var ie=C;ie.x=Number.NEGATIVE_INFINITY,ie.y=Number.NEGATIVE_INFINITY,ie.z=Number.NEGATIVE_INFINITY;for(var oe=Number.POSITIVE_INFINITY,ae=Number.NEGATIVE_INFINITY,se=Number.POSITIVE_INFINITY,he=Number.NEGATIVE_INFINITY,ce=0;ce<v;++ce){var de=Q[ce],ue=X[ce],Ie=de/G,le=ue/G,me=c.e.lerp(M,P,Z[ce]/G);O.longitude=c.e.lerp(N,A,Ie),O.latitude=c.e.lerp(b,x,le),O.height=me,oe=Math.min(O.longitude,oe),ae=Math.max(O.longitude,ae),se=Math.min(O.latitude,se),he=Math.max(O.latitude,he);var ge=_.cartographicToCartesian(O);$[ce]=new n.o(Ie,le),ee[ce]=me,te[ce]=ge,w&&(re[ce]=(m.t.geodeticLatitudeToMercatorAngle(O.latitude)-g)*T),d.p.multiplyByPoint(K,ge,B),i.o.minimumByComponent(B,ne,ne),i.o.maximumByComponent(B,ie,ie)}var Te,fe,ve=z(o.westIndices,(function(e,t){return $[e].y-$[t].y})),ye=z(o.eastIndices,(function(e,t){return $[t].y-$[e].y})),pe=z(o.southIndices,(function(e,t){return $[t].x-$[e].x})),we=z(o.northIndices,(function(e,t){return $[e].x-$[t].x}));fe=r.i.fromPoints(te),Te=u.y.fromRectangle(E,M,P,_);var Ee,Ne=u.y.fromRectangle(E,L,D,_);(1!==F||M<0)&&(Ee=new s.s(_).computeHorizonCullingPointPossiblyUnderEllipsoid(j,te,M));var be=M;be=Math.min(be,V(o.westIndices,o.westSkirtHeight,ee,$,E,_,K,ne,ie)),be=Math.min(be,V(o.southIndices,o.southSkirtHeight,ee,$,E,_,K,ne,ie)),be=Math.min(be,V(o.eastIndices,o.eastSkirtHeight,ee,$,E,_,K,ne,ie)),be=Math.min(be,V(o.northIndices,o.northSkirtHeight,ee,$,E,_,K,ne,ie));for(var Se=new t.e(ne,ie,j),Ae=new s.h(Se,be,P,q,J,w),xe=Ae.getStride(),_e=new Float32Array(v*xe+p*xe),Fe=0,Me=0;Me<v;++Me){if(J){var Pe=2*Me;if(Y.x=y[Pe],Y.y=y[Pe+1],1!==F){var Ge=e.t.octDecode(Y.x,Y.y,k),Be=l.m.eastNorthUpToFixedFrame(te[Me],_,R),We=d.p.inverseTransformation(Be,H);d.p.multiplyByPointAsVector(We,Ge,Ge),Ge.z*=F,i.o.normalize(Ge,Ge),d.p.multiplyByPointAsVector(Be,Ge,Ge),i.o.normalize(Ge,Ge),e.t.octEncode(Ge,Y)}}Fe=Ae.encode(_e,Fe,te[Me],$[Me],ee[Me],Y,re[Me])}var Ce=Math.max(0,2*(p-4)),Oe=o.indices.length+3*Ce,Ye=h.IndexDatatype.createTypedArray(v+p,Oe);Ye.set(o.indices,0);var ke=1e-4,He=(ae-oe)*ke,Re=(he-se)*ke,Ve=-He,Ue=He,ze=Re,Le=-Re,De=v*xe;U(_e,De,ve,Ae,ee,$,y,_,E,o.westSkirtHeight,F,g,T,Ve,0),U(_e,De+=o.westIndices.length*xe,pe,Ae,ee,$,y,_,E,o.southSkirtHeight,F,g,T,0,Le),U(_e,De+=o.southIndices.length*xe,ye,Ae,ee,$,y,_,E,o.eastSkirtHeight,F,g,T,Ue,0),U(_e,De+=o.eastIndices.length*xe,we,Ae,ee,$,y,_,E,o.northSkirtHeight,F,g,T,0,ze);var je=function(e,t,r,n){if(n<12)return;for(var i={},o=e.length,a=0;a<o;a+=3){var s=e[a],h=e[a+1],c=e[a+2];(t[s]===G&&t[h]===G||0===t[s]&&0===t[h]||r[s]===G&&r[h]===G||0===r[s]&&0===r[h])&&(i[s+"_"+h]=1,i[h+"_"+s]=1),(t[h]===G&&t[c]===G||0===t[h]&&0===t[c]||r[h]===G&&r[c]===G||0===r[h]&&0===r[c])&&(i[h+"_"+c]=1,i[c+"_"+h]=1),(t[c]===G&&t[s]===G||0===t[c]&&0===t[s]||r[c]===G&&r[s]===G||0===r[c]&&0===r[s])&&(i[c+"_"+s]=1,i[s+"_"+c]=1)}return i}(o.indices,Q,X,o.level);return S.addSkirtIndices(ve,pe,ye,we,v,Ye,o.indices.length,je),I.push(_e.buffer,Ye.buffer),{vertices:_e.buffer,indices:Ye.buffer,westIndicesSouthToNorth:ve,southIndicesEastToWest:pe,eastIndicesNorthToSouth:ye,northIndicesWestToEast:we,vertexStride:xe,center:j,minimumHeight:M,maximumHeight:P,boundingSphere:fe,orientedBoundingBox:Te,validOrientedBoundingBox:Ne,occludeePointInScaledSpace:Ee,encoding:Ae,indexCountWithoutSkirts:o.indices.length}}));return L})); +define(["./AttributeCompression-b5a80a71","./EllipsoidTangentPlane-c500945e","./buildModuleUrl-cbcc8c56","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./when-92c6cf3c","./TerrainEncoding-231c7a61","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-fd297af4","./OrientedBoundingBox-42d3d74a","./Check-52a7d806","./GeometryAttribute-65cf868d","./WebMercatorProjection-ee891935","./createTaskProcessorWorker","./Cartesian4-72b88c9e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./Event-3390cd7d","./RuntimeError-c6a62a80","./ComponentDatatype-98414d16","./WebGLConstants-42651efd","./PolygonPipeline-c329dec3","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,r,n,i,o,a,s,c,h,d,u,I,l,m,g,T,f,v,y,p,w,E,N,b){"use strict";function S(){I.t.throwInstantiationError()}Object.defineProperties(S.prototype,{errorEvent:{get:I.t.throwInstantiationError},credit:{get:I.t.throwInstantiationError},tilingScheme:{get:I.t.throwInstantiationError},ready:{get:I.t.throwInstantiationError},readyPromise:{get:I.t.throwInstantiationError},hasWaterMask:{get:I.t.throwInstantiationError},hasVertexNormals:{get:I.t.throwInstantiationError},availability:{get:I.t.throwInstantiationError}});var A=[];S.getRegularGridIndices=function(e,t){if(e*t>=h.e.FOUR_GIGABYTES)throw new I.t("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=A[e];a.e(r)||(A[e]=r=[]);var n=r[t];return a.e(n)||M(e,t,n=e*t<h.e.SIXTY_FOUR_KILOBYTES?r[t]=new Uint16Array((e-1)*(t-1)*6+3*(e+t-2)):r[t]=new Uint32Array((e-1)*(t-1)*6+3*(e+t-2)),0),n},S.getRegularGridIndicesForReproject=function(e,t){if(e*t>=h.e.FOUR_GIGABYTES)throw new I.t("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=A[e];a.e(r)||(A[e]=r=[]);var n=r[t];return a.e(n)||M(e,t,n=e*t<h.e.SIXTY_FOUR_KILOBYTES?r[t]=new Uint16Array((e-1)*(t-1)*6):r[t]=new Uint32Array((e-1)*(t-1)*6),0),n};var x=[];S.getRegularGridIndicesAndEdgeIndices=function(e,t){if(e*t>=h.e.FOUR_GIGABYTES)throw new I.t("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=x[e];a.e(r)||(x[e]=r=[]);var n=r[t];if(!a.e(n)){var i=S.getRegularGridIndices(e,t),o=F(e,t),s=o.westIndicesSouthToNorth,c=o.southIndicesEastToWest,d=o.eastIndicesNorthToSouth,u=o.northIndicesWestToEast;n=r[t]={indices:i,westIndicesSouthToNorth:s,southIndicesEastToWest:c,eastIndicesNorthToSouth:d,northIndicesWestToEast:u}}return n};var _=[];function F(e,t){var r,n=new Array(t),i=new Array(e),o=new Array(t),a=new Array(e);for(r=0;r<e;++r)a[r]=r,i[r]=e*t-1-r;for(r=0;r<t;++r)o[r]=(r+1)*e-1,n[r]=(t-r-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:i,eastIndicesNorthToSouth:o,northIndicesWestToEast:a}}function M(e,t,r,n){for(var i=0,o=0;o<t-1;++o){for(var a=0;a<e-1;++a){var s=i,c=s+e,h=c+1,d=s+1;r[n++]=s,r[n++]=c,r[n++]=d,r[n++]=d,r[n++]=c,r[n++]=h,++i}++i}var u=(t-1)/2,I=(e-1)/2;i=0;for(a=0;a<I;a++)r[n++]=i,r[n++]=i+1,r[n++]=i+2,i+=2;i=e*(t-1);for(a=0;a<I;a++)r[n++]=i+1,r[n++]=i,r[n++]=i+2,i+=2;i=0;for(a=0;a<u;a++)r[n++]=i+e,r[n++]=i,r[n++]=i+2*e,i+=2*e;i=e-1;for(a=0;a<u;a++)r[n++]=i,r[n++]=i+e,r[n++]=i+2*e,i+=2*e}function P(e,t,r,n,i){for(var o=a.e(i),s=e[0],c=e.length,h=1;h<c;++h){var d=e[h];!o||i[s+"_"+d]?(r[n++]=s,r[n++]=d,r[n++]=t,r[n++]=t,r[n++]=d,r[n++]=t+1,s=d,++t):(s=d,++t)}return n}S.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){if(e*t>=h.e.FOUR_GIGABYTES)throw new I.t("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=_[e];a.e(r)||(_[e]=r=[]);var n=r[t];if(!a.e(n)){var i=e*t,o=(e-1)*(t-1)*6,s=2*e+2*t,d=i+s,u=3*(e+t-2),l=o+6*Math.max(0,s-4)+u,m=F(e,t),g=m.westIndicesSouthToNorth,T=m.southIndicesEastToWest,f=m.eastIndicesNorthToSouth,v=m.northIndicesWestToEast,y=c.IndexDatatype.createTypedArray(d,l);M(e,t,y,0),S.addSkirtIndices(g,T,f,v,i,y,o+u),n=r[t]={indices:y,westIndicesSouthToNorth:g,southIndicesEastToWest:T,eastIndicesNorthToSouth:f,northIndicesWestToEast:v,indexCountWithoutSkirts:o}}return n},S.addSkirtIndices=function(e,t,r,n,i,o,a,s){var c=i;a=P(e,c,o,a,s),a=P(t,c+=e.length,o,a,s),a=P(r,c+=t.length,o,a,s),P(n,c+=r.length,o,a,s)},S.heightmapTerrainQuality=.25,S.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*S.heightmapTerrainQuality/(t*r)},S.prototype.requestTileGeometry=I.t.throwInstantiationError,S.prototype.getLevelMaximumGeometricError=I.t.throwInstantiationError,S.prototype.getTileDataAvailable=I.t.throwInstantiationError,S.prototype.loadTileDataAvailability=I.t.throwInstantiationError;var G=32767,B=new i.o,W=new i.o,C=new i.o,O=new o.a,Y=new n.o,k=new i.o,H=new d.p,R=new d.p;function V(e,t,r,n,o,a,s,c,u){var I=Number.POSITIVE_INFINITY,l=o.north,m=o.south,g=o.east,T=o.west;g<T&&(g+=h.e.TWO_PI);for(var f=e.length,v=0;v<f;++v){var y=e[v],p=r[y],w=n[y];O.longitude=h.e.lerp(T,g,w.x),O.latitude=h.e.lerp(m,l,w.y),O.height=p-t;var E=a.cartographicToCartesian(O,B);d.p.multiplyByPoint(s,E,E),i.o.minimumByComponent(E,c,c),i.o.maximumByComponent(E,u,u),I=Math.min(I,O.height)}return I}function U(t,r,n,o,s,c,u,I,g,T,f,v,y,p,w){var E=a.e(u),N=g.north,b=g.south,S=g.east,A=g.west;S<A&&(S+=h.e.TWO_PI);for(var x=n.length,_=0;_<x;++_){var F=n[_],M=s[F],P=c[F];O.longitude=h.e.lerp(A,S,P.x)+p,O.latitude=h.e.lerp(b,N,P.y)+w,O.height=M-T;var G,W=I.cartographicToCartesian(O,B);if(E){var C=2*F;if(Y.x=u[C],Y.y=u[C+1],1!==f){var V=e.t.octDecode(Y.x,Y.y,k),U=l.m.eastNorthUpToFixedFrame(B,I,R),z=d.p.inverseTransformation(U,H);d.p.multiplyByPointAsVector(z,V,V),V.z*=f,i.o.normalize(V,V),d.p.multiplyByPointAsVector(U,V,V),i.o.normalize(V,V),e.t.octEncode(V,Y)}}o.hasWebMercatorT&&(G=(m.t.geodeticLatitudeToMercatorAngle(O.latitude)-v)*y),r=o.encode(t,r,W,P,O.height,Y,G)}}function z(e,t){var r;return"function"==typeof e.slice&&"function"!=typeof(r=e.slice()).sort&&(r=void 0),a.e(r)||(r=Array.prototype.slice.call(e)),r.sort(t),r}var L=g((function(o,I){var g,T,f=o.quantizedVertices,v=f.length/3,y=o.octEncodedNormals,p=o.westIndices.length+o.eastIndices.length+o.southIndices.length+o.northIndices.length,w=o.includeWebMercatorT,E=n.h.clone(o.rectangle),N=E.west,b=E.south,A=E.east,x=E.north,_=n.t.clone(o.ellipsoid),F=o.exaggeration,M=o.minimumHeight*F,P=o.maximumHeight*F,L=a.e(o.validMinimumHeight)?o.validMinimumHeight*F:M*F,D=a.e(o.validMaximumHeight)?o.validMaximumHeight*F:P*F,j=o.relativeToCenter,q=l.m.eastNorthUpToFixedFrame(j,_),K=d.p.inverseTransformation(q,new d.p);w&&(g=m.t.geodeticLatitudeToMercatorAngle(b),T=1/(m.t.geodeticLatitudeToMercatorAngle(x)-g));var Q=f.subarray(0,v),X=f.subarray(v,2*v),Z=f.subarray(2*v,3*v),J=a.e(y),$=new Array(v),ee=new Array(v),te=new Array(v),re=w?new Array(v):[],ne=W;ne.x=Number.POSITIVE_INFINITY,ne.y=Number.POSITIVE_INFINITY,ne.z=Number.POSITIVE_INFINITY;var ie=C;ie.x=Number.NEGATIVE_INFINITY,ie.y=Number.NEGATIVE_INFINITY,ie.z=Number.NEGATIVE_INFINITY;for(var oe=Number.POSITIVE_INFINITY,ae=Number.NEGATIVE_INFINITY,se=Number.POSITIVE_INFINITY,ce=Number.NEGATIVE_INFINITY,he=0;he<v;++he){var de=Q[he],ue=X[he],Ie=de/G,le=ue/G,me=h.e.lerp(M,P,Z[he]/G);O.longitude=h.e.lerp(N,A,Ie),O.latitude=h.e.lerp(b,x,le),O.height=me,oe=Math.min(O.longitude,oe),ae=Math.max(O.longitude,ae),se=Math.min(O.latitude,se),ce=Math.max(O.latitude,ce);var ge=_.cartographicToCartesian(O);$[he]=new n.o(Ie,le),ee[he]=me,te[he]=ge,w&&(re[he]=(m.t.geodeticLatitudeToMercatorAngle(O.latitude)-g)*T),d.p.multiplyByPoint(K,ge,B),i.o.minimumByComponent(B,ne,ne),i.o.maximumByComponent(B,ie,ie)}var Te,fe,ve=z(o.westIndices,(function(e,t){return $[e].y-$[t].y})),ye=z(o.eastIndices,(function(e,t){return $[t].y-$[e].y})),pe=z(o.southIndices,(function(e,t){return $[t].x-$[e].x})),we=z(o.northIndices,(function(e,t){return $[e].x-$[t].x}));fe=r.i.fromPoints(te),Te=u.y.fromRectangle(E,M,P,_);var Ee,Ne=u.y.fromRectangle(E,L,D,_);(1!==F||M<0)&&(Ee=new s.s(_).computeHorizonCullingPointPossiblyUnderEllipsoid(j,te,M));var be=M;be=Math.min(be,V(o.westIndices,o.westSkirtHeight,ee,$,E,_,K,ne,ie)),be=Math.min(be,V(o.southIndices,o.southSkirtHeight,ee,$,E,_,K,ne,ie)),be=Math.min(be,V(o.eastIndices,o.eastSkirtHeight,ee,$,E,_,K,ne,ie)),be=Math.min(be,V(o.northIndices,o.northSkirtHeight,ee,$,E,_,K,ne,ie));for(var Se=new t.e(ne,ie,j),Ae=new s.h(Se,be,P,q,J,w),xe=Ae.getStride(),_e=new Float32Array(v*xe+p*xe),Fe=0,Me=0;Me<v;++Me){if(J){var Pe=2*Me;if(Y.x=y[Pe],Y.y=y[Pe+1],1!==F){var Ge=e.t.octDecode(Y.x,Y.y,k),Be=l.m.eastNorthUpToFixedFrame(te[Me],_,R),We=d.p.inverseTransformation(Be,H);d.p.multiplyByPointAsVector(We,Ge,Ge),Ge.z*=F,i.o.normalize(Ge,Ge),d.p.multiplyByPointAsVector(Be,Ge,Ge),i.o.normalize(Ge,Ge),e.t.octEncode(Ge,Y)}}Fe=Ae.encode(_e,Fe,te[Me],$[Me],ee[Me],Y,re[Me])}var Ce=Math.max(0,2*(p-4)),Oe=o.indices.length+3*Ce,Ye=c.IndexDatatype.createTypedArray(v+p,Oe);Ye.set(o.indices,0);var ke=1e-4,He=(ae-oe)*ke,Re=(ce-se)*ke,Ve=-He,Ue=He,ze=Re,Le=-Re,De=v*xe;U(_e,De,ve,Ae,ee,$,y,_,E,o.westSkirtHeight,F,g,T,Ve,0),U(_e,De+=o.westIndices.length*xe,pe,Ae,ee,$,y,_,E,o.southSkirtHeight,F,g,T,0,Le),U(_e,De+=o.southIndices.length*xe,ye,Ae,ee,$,y,_,E,o.eastSkirtHeight,F,g,T,Ue,0),U(_e,De+=o.eastIndices.length*xe,we,Ae,ee,$,y,_,E,o.northSkirtHeight,F,g,T,0,ze);var je=function(e,t,r,n){if(n<12)return;for(var i={},o=e.length,a=0;a<o;a+=3){var s=e[a],c=e[a+1],h=e[a+2];(t[s]===G&&t[c]===G||0===t[s]&&0===t[c]||r[s]===G&&r[c]===G||0===r[s]&&0===r[c])&&(i[s+"_"+c]=1,i[c+"_"+s]=1),(t[c]===G&&t[h]===G||0===t[c]&&0===t[h]||r[c]===G&&r[h]===G||0===r[c]&&0===r[h])&&(i[c+"_"+h]=1,i[h+"_"+c]=1),(t[h]===G&&t[s]===G||0===t[h]&&0===t[s]||r[h]===G&&r[s]===G||0===r[h]&&0===r[s])&&(i[h+"_"+s]=1,i[s+"_"+h]=1)}return i}(o.indices,Q,X,o.level);return S.addSkirtIndices(ve,pe,ye,we,v,Ye,o.indices.length,je),I.push(_e.buffer,Ye.buffer),{vertices:_e.buffer,indices:Ye.buffer,westIndicesSouthToNorth:ve,southIndicesEastToWest:pe,eastIndicesNorthToSouth:ye,northIndicesWestToEast:we,vertexStride:xe,center:j,minimumHeight:M,maximumHeight:P,boundingSphere:fe,orientedBoundingBox:Te,validOrientedBoundingBox:Ne,occludeePointInScaledSpace:Ee,encoding:Ae,indexCountWithoutSkirts:o.indices.length}}));return L})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createWallGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createWallGeometry.js index aff074d0..e6401325 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createWallGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createWallGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./Cartesian2-b72655a5","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./Check-52a7d806","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-cec0163f","./VertexFormat-f496a3f1","./WallGeometryLibrary-d4f25ef7","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./arrayRemoveDuplicates-a6924649","./PolylinePipeline-f0970409","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./IntersectionTests-6e80d61c","./Plane-33393da8"],(function(e,t,o,n,i,a,r,s,m,p,u,l,c,h,g,d,v,y,f,w,_,b,A,x){"use strict";var k=new n.o,C=new n.o,L=new n.o,E=new n.o,F=new n.o,D=new n.o,H=new n.o,P=new n.o;function T(o){var i=(o=e.u(o,e.u.EMPTY_OBJECT)).positions,r=o.maximumHeights,s=o.minimumHeights;if(!e.e(i))throw new a.t("options.positions is required.");if(e.e(r)&&r.length!==i.length)throw new a.t("options.positions and options.maximumHeights must have the same length.");if(e.e(s)&&s.length!==i.length)throw new a.t("options.positions and options.minimumHeights must have the same length.");var m=e.u(o.vertexFormat,l.n.DEFAULT),u=e.u(o.granularity,p.e.RADIANS_PER_DEGREE),c=e.u(o.ellipsoid,t.t.WGS84);this._positions=i,this._minimumHeights=s,this._maximumHeights=r,this._vertexFormat=l.n.clone(m),this._granularity=u,this._ellipsoid=t.t.clone(c),this._enuCenter=o.enuCenter,this._workerName="createWallGeometry";var h=1+i.length*n.o.packedLength+2;e.e(s)&&(h+=s.length),e.e(r)&&(h+=r.length),this.packedLength=h+t.t.packedLength+l.n.packedLength+1,this.packedLength+=n.o.packedLength}T.pack=function(o,i,r){if(!e.e(o))throw new a.t("value is required");if(!e.e(i))throw new a.t("array is required");r=e.u(r,0);var s,m=o._positions,p=m.length;for(i[r++]=p,s=0;s<p;++s,r+=n.o.packedLength)n.o.pack(m[s],i,r);var u=o._minimumHeights;if(p=e.e(u)?u.length:0,i[r++]=p,e.e(u))for(s=0;s<p;++s)i[r++]=u[s];var c=o._maximumHeights;if(p=e.e(c)?c.length:0,i[r++]=p,e.e(c))for(s=0;s<p;++s)i[r++]=c[s];return t.t.pack(o._ellipsoid,i,r),r+=t.t.packedLength,l.n.pack(o._vertexFormat,i,r),r+=l.n.packedLength,i[r++]=o._granularity,e.e(o._enuCenter)?n.o.pack(o._enuCenter,i,r):n.o.pack(n.o.ZERO,i,r),i};var G=t.t.clone(t.t.UNIT_SPHERE),O=new l.n,z={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:G,vertexFormat:O,granularity:void 0,enuCenter:void 0};return T.unpack=function(o,i,r){if(!e.e(o))throw new a.t("array is required");i=e.u(i,0);var s,m,p,u=o[i++],c=new Array(u);for(s=0;s<u;++s,i+=n.o.packedLength)c[s]=n.o.unpack(o,i);if((u=o[i++])>0)for(m=new Array(u),s=0;s<u;++s)m[s]=o[i++];if((u=o[i++])>0)for(p=new Array(u),s=0;s<u;++s)p[s]=o[i++];var h=t.t.unpack(o,i,G);i+=t.t.packedLength;var g=l.n.unpack(o,i,O);i+=l.n.packedLength;var d=o[i++],v=n.o.unpack(o,i);return n.o.equals(v,n.o.ZERO)&&(v=void 0),e.e(r)?(r._positions=c,r._minimumHeights=m,r._maximumHeights=p,r._ellipsoid=t.t.clone(h,r._ellipsoid),r._vertexFormat=l.n.clone(g,r._vertexFormat),r._granularity=d,r._enuCenter=v,r):(z.positions=c,z.minimumHeights=m,z.maximumHeights=p,z.granularity=d,z.enuCenter=v,new T(z))},T.fromConstantHeights=function(t){var o=(t=e.u(t,e.u.EMPTY_OBJECT)).positions;if(!e.e(o))throw new a.t("options.positions is required.");var n,i,r=t.minimumHeight,s=t.maximumHeight,m=e.e(r),p=e.e(s);if(m||p){var u=o.length;n=m?new Array(u):void 0,i=p?new Array(u):void 0;for(var l=0;l<u;++l)m&&(n[l]=r),p&&(i[l]=s)}return new T({positions:o,maximumHeights:i,minimumHeights:n,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat})},T.createGeometry=function(t){var a=t._positions,l=t._minimumHeights,h=t._maximumHeights,g=t._vertexFormat,d=t._granularity,v=t._ellipsoid,y=t._enuCenter,f=c.D.computePositions(v,a,h,l,d,!0,y);if(e.e(f.pos)){var w;e.e(y)&&(w=r.m.eastNorthUpToFixedFrame(y));var _,b=f.pos.bottomPositions,A=f.pos.topPositions,x=f.pos.numCorners,T=A.length,G=2*T,O=g.position?new Float64Array(G):void 0,z=g.normal?new Float32Array(G):void 0,R=g.tangent?new Float32Array(G):void 0,I=g.bitangent?new Float32Array(G):void 0,S=g.st?new Float32Array(G/3*2):void 0,q=0,N=0,U=0,B=0,M=0,W=P,Z=H,J=D,V=!0,Y=0,j=1/((T/=3)-a.length+1);for(_=0;_<T;++_){var K=3*_,Q=n.o.fromArray(A,K,k),X=n.o.fromArray(b,K,C);if(g.position&&(O[q++]=X.x,O[q++]=X.y,O[q++]=X.z,O[q++]=Q.x,O[q++]=Q.y,O[q++]=Q.z),g.st&&(S[M++]=Y,S[M++]=0,S[M++]=Y,S[M++]=1),g.normal||g.tangent||g.bitangent){var $,ee=n.o.clone(n.o.ZERO,F),te=v.scaleToGeodeticSurface(n.o.fromArray(A,K,C),C);if(_+1<T&&($=v.scaleToGeodeticSurface(n.o.fromArray(A,K+3,L),L),ee=n.o.fromArray(A,K+3,F)),V){var oe=n.o.subtract(ee,Q,E),ne=n.o.subtract(te,Q,k);W=n.o.normalize(n.o.cross(ne,oe,W),W),V=!1}n.o.equalsEpsilon($,te,p.e.EPSILON10)?V=!0:(Y+=j,g.tangent&&(Z=n.o.normalize(n.o.subtract($,te,Z),Z)),g.bitangent&&(J=n.o.normalize(n.o.cross(W,Z,J),J))),g.normal&&(e.e(y)&&(u.p.multiplyByPoint(w,W,W),n.o.normalize(W,W)),z[N++]=W.x,z[N++]=W.y,z[N++]=W.z,z[N++]=W.x,z[N++]=W.y,z[N++]=W.z),g.tangent&&(R[B++]=Z.x,R[B++]=Z.y,R[B++]=Z.z,R[B++]=Z.x,R[B++]=Z.y,R[B++]=Z.z),g.bitangent&&(I[U++]=J.x,I[U++]=J.y,I[U++]=J.z,I[U++]=J.x,I[U++]=J.y,I[U++]=J.z)}}var ie=new s.a;g.position&&(ie.position=new r.o({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:O})),g.normal&&(ie.normal=new r.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z})),g.tangent&&(ie.tangent=new r.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R})),g.bitangent&&(ie.bitangent=new r.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:I})),g.st&&(ie.st=new r.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:S}));var ae=G/3;G-=6*(x+1);var re=m.IndexDatatype.createTypedArray(ae,G),se=0;for(_=0;_<ae-2;_+=2){var me=_,pe=_+2,ue=n.o.fromArray(O,3*me,k),le=n.o.fromArray(O,3*pe,C);if(!n.o.equalsEpsilon(ue,le,p.e.EPSILON10)){var ce=_+1,he=_+3;re[se++]=ce,re[se++]=me,re[se++]=he,re[se++]=he,re[se++]=me,re[se++]=pe}}var ge=new r.I({attributes:ie,indices:re,primitiveType:u._0x4b6a27.TRIANGLES,boundingSphere:new o.i.fromVertices(O)});return e.e(t._enuCenter)&&(ge.attributes.position.values.set(f.localPos.topPositions,0),ge.attributes.position.values.set(f.localPos.bottomPositions,ge.attributes.position.values.length/2),ge.attributes.position.componentDatatype=i.ComponentDatatype.FLOAT),ge}},function(o,n){return e.e(n)&&(o=T.unpack(o,n)),o._ellipsoid=t.t.clone(o._ellipsoid),T.createGeometry(o)}})); +define(["./when-92c6cf3c","./Cartesian2-b72655a5","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./Check-52a7d806","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-fd297af4","./VertexFormat-f496a3f1","./WallGeometryLibrary-8f286e50","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./arrayRemoveDuplicates-a6924649","./PolylinePipeline-160fa1b0","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./IntersectionTests-9ff29c98","./Plane-a2c6da7b"],(function(e,t,o,n,i,a,r,s,m,p,u,l,c,h,g,d,v,y,f,w,_,b,A,x){"use strict";var k=new n.o,C=new n.o,L=new n.o,E=new n.o,F=new n.o,D=new n.o,H=new n.o,P=new n.o;function T(o){var i=(o=e.u(o,e.u.EMPTY_OBJECT)).positions,r=o.maximumHeights,s=o.minimumHeights;if(!e.e(i))throw new a.t("options.positions is required.");if(e.e(r)&&r.length!==i.length)throw new a.t("options.positions and options.maximumHeights must have the same length.");if(e.e(s)&&s.length!==i.length)throw new a.t("options.positions and options.minimumHeights must have the same length.");var m=e.u(o.vertexFormat,l.n.DEFAULT),u=e.u(o.granularity,p.e.RADIANS_PER_DEGREE),c=e.u(o.ellipsoid,t.t.WGS84);this._positions=i,this._minimumHeights=s,this._maximumHeights=r,this._vertexFormat=l.n.clone(m),this._granularity=u,this._ellipsoid=t.t.clone(c),this._enuCenter=o.enuCenter,this._workerName="createWallGeometry";var h=1+i.length*n.o.packedLength+2;e.e(s)&&(h+=s.length),e.e(r)&&(h+=r.length),this.packedLength=h+t.t.packedLength+l.n.packedLength+1,this.packedLength+=n.o.packedLength}T.pack=function(o,i,r){if(!e.e(o))throw new a.t("value is required");if(!e.e(i))throw new a.t("array is required");r=e.u(r,0);var s,m=o._positions,p=m.length;for(i[r++]=p,s=0;s<p;++s,r+=n.o.packedLength)n.o.pack(m[s],i,r);var u=o._minimumHeights;if(p=e.e(u)?u.length:0,i[r++]=p,e.e(u))for(s=0;s<p;++s)i[r++]=u[s];var c=o._maximumHeights;if(p=e.e(c)?c.length:0,i[r++]=p,e.e(c))for(s=0;s<p;++s)i[r++]=c[s];return t.t.pack(o._ellipsoid,i,r),r+=t.t.packedLength,l.n.pack(o._vertexFormat,i,r),r+=l.n.packedLength,i[r++]=o._granularity,e.e(o._enuCenter)?n.o.pack(o._enuCenter,i,r):n.o.pack(n.o.ZERO,i,r),i};var G=t.t.clone(t.t.UNIT_SPHERE),O=new l.n,z={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:G,vertexFormat:O,granularity:void 0,enuCenter:void 0};return T.unpack=function(o,i,r){if(!e.e(o))throw new a.t("array is required");i=e.u(i,0);var s,m,p,u=o[i++],c=new Array(u);for(s=0;s<u;++s,i+=n.o.packedLength)c[s]=n.o.unpack(o,i);if((u=o[i++])>0)for(m=new Array(u),s=0;s<u;++s)m[s]=o[i++];if((u=o[i++])>0)for(p=new Array(u),s=0;s<u;++s)p[s]=o[i++];var h=t.t.unpack(o,i,G);i+=t.t.packedLength;var g=l.n.unpack(o,i,O);i+=l.n.packedLength;var d=o[i++],v=n.o.unpack(o,i);return n.o.equals(v,n.o.ZERO)&&(v=void 0),e.e(r)?(r._positions=c,r._minimumHeights=m,r._maximumHeights=p,r._ellipsoid=t.t.clone(h,r._ellipsoid),r._vertexFormat=l.n.clone(g,r._vertexFormat),r._granularity=d,r._enuCenter=v,r):(z.positions=c,z.minimumHeights=m,z.maximumHeights=p,z.granularity=d,z.enuCenter=v,new T(z))},T.fromConstantHeights=function(t){var o=(t=e.u(t,e.u.EMPTY_OBJECT)).positions;if(!e.e(o))throw new a.t("options.positions is required.");var n,i,r=t.minimumHeight,s=t.maximumHeight,m=e.e(r),p=e.e(s);if(m||p){var u=o.length;n=m?new Array(u):void 0,i=p?new Array(u):void 0;for(var l=0;l<u;++l)m&&(n[l]=r),p&&(i[l]=s)}return new T({positions:o,maximumHeights:i,minimumHeights:n,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat})},T.createGeometry=function(t){var a=t._positions,l=t._minimumHeights,h=t._maximumHeights,g=t._vertexFormat,d=t._granularity,v=t._ellipsoid,y=t._enuCenter,f=c.D.computePositions(v,a,h,l,d,!0,y);if(e.e(f.pos)){var w;e.e(y)&&(w=r.m.eastNorthUpToFixedFrame(y));var _,b=f.pos.bottomPositions,A=f.pos.topPositions,x=f.pos.numCorners,T=A.length,G=2*T,O=g.position?new Float64Array(G):void 0,z=g.normal?new Float32Array(G):void 0,R=g.tangent?new Float32Array(G):void 0,I=g.bitangent?new Float32Array(G):void 0,S=g.st?new Float32Array(G/3*2):void 0,q=0,N=0,U=0,B=0,M=0,W=P,Z=H,J=D,V=!0,Y=0,j=1/((T/=3)-a.length+1);for(_=0;_<T;++_){var K=3*_,Q=n.o.fromArray(A,K,k),X=n.o.fromArray(b,K,C);if(g.position&&(O[q++]=X.x,O[q++]=X.y,O[q++]=X.z,O[q++]=Q.x,O[q++]=Q.y,O[q++]=Q.z),g.st&&(S[M++]=Y,S[M++]=0,S[M++]=Y,S[M++]=1),g.normal||g.tangent||g.bitangent){var $,ee=n.o.clone(n.o.ZERO,F),te=v.scaleToGeodeticSurface(n.o.fromArray(A,K,C),C);if(_+1<T&&($=v.scaleToGeodeticSurface(n.o.fromArray(A,K+3,L),L),ee=n.o.fromArray(A,K+3,F)),V){var oe=n.o.subtract(ee,Q,E),ne=n.o.subtract(te,Q,k);W=n.o.normalize(n.o.cross(ne,oe,W),W),V=!1}n.o.equalsEpsilon($,te,p.e.EPSILON10)?V=!0:(Y+=j,g.tangent&&(Z=n.o.normalize(n.o.subtract($,te,Z),Z)),g.bitangent&&(J=n.o.normalize(n.o.cross(W,Z,J),J))),g.normal&&(e.e(y)&&(u.p.multiplyByPoint(w,W,W),n.o.normalize(W,W)),z[N++]=W.x,z[N++]=W.y,z[N++]=W.z,z[N++]=W.x,z[N++]=W.y,z[N++]=W.z),g.tangent&&(R[B++]=Z.x,R[B++]=Z.y,R[B++]=Z.z,R[B++]=Z.x,R[B++]=Z.y,R[B++]=Z.z),g.bitangent&&(I[U++]=J.x,I[U++]=J.y,I[U++]=J.z,I[U++]=J.x,I[U++]=J.y,I[U++]=J.z)}}var ie=new s.a;g.position&&(ie.position=new r.o({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:O})),g.normal&&(ie.normal=new r.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:z})),g.tangent&&(ie.tangent=new r.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R})),g.bitangent&&(ie.bitangent=new r.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:I})),g.st&&(ie.st=new r.o({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:S}));var ae=G/3;G-=6*(x+1);var re=m.IndexDatatype.createTypedArray(ae,G),se=0;for(_=0;_<ae-2;_+=2){var me=_,pe=_+2,ue=n.o.fromArray(O,3*me,k),le=n.o.fromArray(O,3*pe,C);if(!n.o.equalsEpsilon(ue,le,p.e.EPSILON10)){var ce=_+1,he=_+3;re[se++]=ce,re[se++]=me,re[se++]=he,re[se++]=he,re[se++]=me,re[se++]=pe}}var ge=new r.I({attributes:ie,indices:re,primitiveType:u._0x3b3836.TRIANGLES,boundingSphere:new o.i.fromVertices(O)});return e.e(t._enuCenter)&&(ge.attributes.position.values.set(f.localPos.topPositions,0),ge.attributes.position.values.set(f.localPos.bottomPositions,ge.attributes.position.values.length/2),ge.attributes.position.componentDatatype=i.ComponentDatatype.FLOAT),ge}},function(o,n){return e.e(n)&&(o=T.unpack(o,n)),o._ellipsoid=t.t.clone(o._ellipsoid),T.createGeometry(o)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/createWallOutlineGeometry.js b/SuperMap iEarth/public/SuperMap3D/Workers/createWallOutlineGeometry.js index 140d95b5..a843e1a7 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/createWallOutlineGeometry.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/createWallOutlineGeometry.js @@ -1 +1 @@ -define(["./when-92c6cf3c","./Cartesian2-b72655a5","./buildModuleUrl-9eef8841","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./Check-52a7d806","./GeometryAttribute-f47bd1cb","./GeometryAttributes-7f66ea53","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-cec0163f","./WallGeometryLibrary-d4f25ef7","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./arrayRemoveDuplicates-a6924649","./PolylinePipeline-f0970409","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./IntersectionTests-6e80d61c","./Plane-33393da8"],(function(e,i,t,n,o,r,a,s,m,u,l,p,h,c,d,g,f,y,v,w,_,H,b){"use strict";var E=new n.o,k=new n.o;function A(t){var o=(t=e.u(t,e.u.EMPTY_OBJECT)).positions,a=t.maximumHeights,s=t.minimumHeights;if(!e.e(o))throw new r.t("options.positions is required.");if(e.e(a)&&a.length!==o.length)throw new r.t("options.positions and options.maximumHeights must have the same length.");if(e.e(s)&&s.length!==o.length)throw new r.t("options.positions and options.minimumHeights must have the same length.");var m=e.u(t.granularity,u.e.RADIANS_PER_DEGREE),l=e.u(t.ellipsoid,i.t.WGS84);this._positions=o,this._minimumHeights=s,this._maximumHeights=a,this._granularity=m,this._ellipsoid=i.t.clone(l),this._workerName="createWallOutlineGeometry";var p=1+o.length*n.o.packedLength+2;e.e(s)&&(p+=s.length),e.e(a)&&(p+=a.length),this.packedLength=p+i.t.packedLength+1}A.pack=function(t,o,a){if(!e.e(t))throw new r.t("value is required");if(!e.e(o))throw new r.t("array is required");a=e.u(a,0);var s,m=t._positions,u=m.length;for(o[a++]=u,s=0;s<u;++s,a+=n.o.packedLength)n.o.pack(m[s],o,a);var l=t._minimumHeights;if(u=e.e(l)?l.length:0,o[a++]=u,e.e(l))for(s=0;s<u;++s)o[a++]=l[s];var p=t._maximumHeights;if(u=e.e(p)?p.length:0,o[a++]=u,e.e(p))for(s=0;s<u;++s)o[a++]=p[s];return i.t.pack(t._ellipsoid,o,a),o[a+=i.t.packedLength]=t._granularity,o};var x=i.t.clone(i.t.UNIT_SPHERE),L={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:x,granularity:void 0};return A.unpack=function(t,o,a){if(!e.e(t))throw new r.t("array is required");o=e.u(o,0);var s,m,u,l=t[o++],p=new Array(l);for(s=0;s<l;++s,o+=n.o.packedLength)p[s]=n.o.unpack(t,o);if((l=t[o++])>0)for(m=new Array(l),s=0;s<l;++s)m[s]=t[o++];if((l=t[o++])>0)for(u=new Array(l),s=0;s<l;++s)u[s]=t[o++];var h=i.t.unpack(t,o,x),c=t[o+=i.t.packedLength];return e.e(a)?(a._positions=p,a._minimumHeights=m,a._maximumHeights=u,a._ellipsoid=i.t.clone(h,a._ellipsoid),a._granularity=c,a):(L.positions=p,L.minimumHeights=m,L.maximumHeights=u,L.granularity=c,new A(L))},A.fromConstantHeights=function(i){var t=(i=e.u(i,e.u.EMPTY_OBJECT)).positions;if(!e.e(t))throw new r.t("options.positions is required.");var n,o,a=i.minimumHeight,s=i.maximumHeight,m=e.e(a),u=e.e(s);if(m||u){var l=t.length;n=m?new Array(l):void 0,o=u?new Array(l):void 0;for(var p=0;p<l;++p)m&&(n[p]=a),u&&(o[p]=s)}return new A({positions:t,maximumHeights:o,minimumHeights:n,ellipsoid:i.ellipsoid})},A.createGeometry=function(i){var r=i._positions,h=i._minimumHeights,c=i._maximumHeights,d=i._granularity,g=i._ellipsoid,f=p.D.computePositions(g,r,c,h,d,!1);if(e.e(f)){var y,v=f.pos.bottomPositions,w=f.pos.topPositions,_=w.length,H=2*_,b=new Float64Array(H),A=0;for(_/=3,y=0;y<_;++y){var x=3*y,L=n.o.fromArray(w,x,E),P=n.o.fromArray(v,x,k);b[A++]=P.x,b[A++]=P.y,b[A++]=P.z,b[A++]=L.x,b[A++]=L.y,b[A++]=L.z}var C=new s.a({position:new a.o({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:b})}),D=H/3;H=2*D-4+D;var G=m.IndexDatatype.createTypedArray(D,H),I=0;for(y=0;y<D-2;y+=2){var T=y,R=y+2,q=n.o.fromArray(b,3*T,E),S=n.o.fromArray(b,3*R,k);if(!n.o.equalsEpsilon(q,S,u.e.EPSILON10)){var N=y+1,O=y+3;G[I++]=N,G[I++]=T,G[I++]=N,G[I++]=O,G[I++]=T,G[I++]=R}}return G[I++]=D-2,G[I++]=D-1,new a.I({attributes:C,indices:G,primitiveType:l._0x4b6a27.LINES,boundingSphere:new t.i.fromVertices(b)})}},function(t,n){return e.e(n)&&(t=A.unpack(t,n)),t._ellipsoid=i.t.clone(t._ellipsoid),A.createGeometry(t)}})); +define(["./when-92c6cf3c","./Cartesian2-b72655a5","./buildModuleUrl-cbcc8c56","./Cartesian3-3a8bdb0b","./ComponentDatatype-98414d16","./Check-52a7d806","./GeometryAttribute-65cf868d","./GeometryAttributes-7f66ea53","./IndexDatatype-86677ec4","./Math-ecf82623","./FeatureDetection-fd297af4","./WallGeometryLibrary-8f286e50","./Cartographic-a2c313d7","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Cartesian4-72b88c9e","./arrayRemoveDuplicates-a6924649","./PolylinePipeline-160fa1b0","./EllipsoidGeodesic-03c935a0","./EllipsoidRhumbLine-b1a766ae","./IntersectionTests-9ff29c98","./Plane-a2c6da7b"],(function(e,i,t,n,o,r,a,s,m,u,l,p,h,c,d,g,f,y,v,w,_,H,b){"use strict";var E=new n.o,k=new n.o;function A(t){var o=(t=e.u(t,e.u.EMPTY_OBJECT)).positions,a=t.maximumHeights,s=t.minimumHeights;if(!e.e(o))throw new r.t("options.positions is required.");if(e.e(a)&&a.length!==o.length)throw new r.t("options.positions and options.maximumHeights must have the same length.");if(e.e(s)&&s.length!==o.length)throw new r.t("options.positions and options.minimumHeights must have the same length.");var m=e.u(t.granularity,u.e.RADIANS_PER_DEGREE),l=e.u(t.ellipsoid,i.t.WGS84);this._positions=o,this._minimumHeights=s,this._maximumHeights=a,this._granularity=m,this._ellipsoid=i.t.clone(l),this._workerName="createWallOutlineGeometry";var p=1+o.length*n.o.packedLength+2;e.e(s)&&(p+=s.length),e.e(a)&&(p+=a.length),this.packedLength=p+i.t.packedLength+1}A.pack=function(t,o,a){if(!e.e(t))throw new r.t("value is required");if(!e.e(o))throw new r.t("array is required");a=e.u(a,0);var s,m=t._positions,u=m.length;for(o[a++]=u,s=0;s<u;++s,a+=n.o.packedLength)n.o.pack(m[s],o,a);var l=t._minimumHeights;if(u=e.e(l)?l.length:0,o[a++]=u,e.e(l))for(s=0;s<u;++s)o[a++]=l[s];var p=t._maximumHeights;if(u=e.e(p)?p.length:0,o[a++]=u,e.e(p))for(s=0;s<u;++s)o[a++]=p[s];return i.t.pack(t._ellipsoid,o,a),o[a+=i.t.packedLength]=t._granularity,o};var x=i.t.clone(i.t.UNIT_SPHERE),L={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:x,granularity:void 0};return A.unpack=function(t,o,a){if(!e.e(t))throw new r.t("array is required");o=e.u(o,0);var s,m,u,l=t[o++],p=new Array(l);for(s=0;s<l;++s,o+=n.o.packedLength)p[s]=n.o.unpack(t,o);if((l=t[o++])>0)for(m=new Array(l),s=0;s<l;++s)m[s]=t[o++];if((l=t[o++])>0)for(u=new Array(l),s=0;s<l;++s)u[s]=t[o++];var h=i.t.unpack(t,o,x),c=t[o+=i.t.packedLength];return e.e(a)?(a._positions=p,a._minimumHeights=m,a._maximumHeights=u,a._ellipsoid=i.t.clone(h,a._ellipsoid),a._granularity=c,a):(L.positions=p,L.minimumHeights=m,L.maximumHeights=u,L.granularity=c,new A(L))},A.fromConstantHeights=function(i){var t=(i=e.u(i,e.u.EMPTY_OBJECT)).positions;if(!e.e(t))throw new r.t("options.positions is required.");var n,o,a=i.minimumHeight,s=i.maximumHeight,m=e.e(a),u=e.e(s);if(m||u){var l=t.length;n=m?new Array(l):void 0,o=u?new Array(l):void 0;for(var p=0;p<l;++p)m&&(n[p]=a),u&&(o[p]=s)}return new A({positions:t,maximumHeights:o,minimumHeights:n,ellipsoid:i.ellipsoid})},A.createGeometry=function(i){var r=i._positions,h=i._minimumHeights,c=i._maximumHeights,d=i._granularity,g=i._ellipsoid,f=p.D.computePositions(g,r,c,h,d,!1);if(e.e(f)){var y,v=f.pos.bottomPositions,w=f.pos.topPositions,_=w.length,H=2*_,b=new Float64Array(H),A=0;for(_/=3,y=0;y<_;++y){var x=3*y,L=n.o.fromArray(w,x,E),P=n.o.fromArray(v,x,k);b[A++]=P.x,b[A++]=P.y,b[A++]=P.z,b[A++]=L.x,b[A++]=L.y,b[A++]=L.z}var C=new s.a({position:new a.o({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:b})}),D=H/3;H=2*D-4+D;var G=m.IndexDatatype.createTypedArray(D,H),I=0;for(y=0;y<D-2;y+=2){var T=y,R=y+2,q=n.o.fromArray(b,3*T,E),S=n.o.fromArray(b,3*R,k);if(!n.o.equalsEpsilon(q,S,u.e.EPSILON10)){var N=y+1,O=y+3;G[I++]=N,G[I++]=T,G[I++]=N,G[I++]=O,G[I++]=T,G[I++]=R}}return G[I++]=D-2,G[I++]=D-1,new a.I({attributes:C,indices:G,primitiveType:l._0x3b3836.LINES,boundingSphere:new t.i.fromVertices(b)})}},function(t,n){return e.e(n)&&(t=A.unpack(t,n)),t._ellipsoid=i.t.clone(t._ellipsoid),A.createGeometry(t)}})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/unzip-617dbdc5.js b/SuperMap iEarth/public/SuperMap3D/Workers/unzip-617dbdc5.js new file mode 100644 index 00000000..f7308e38 --- /dev/null +++ b/SuperMap iEarth/public/SuperMap3D/Workers/unzip-617dbdc5.js @@ -0,0 +1 @@ +define(["exports"],(function(e){"use strict";if(typeof WebAssembly<"u"&&"object"!=typeof window){let e=function(e){return r.locateFile?r.locateFile(e,O):O+e},Z=function(e){Z.shown||(Z.shown={}),Z.shown[e]||(Z.shown[e]=1,u(e))},$=function(e,t,r){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return g[e>>0];case"i16":return w[e>>1];case"i32":case"i64":return M[e>>2];case"float":return P[e>>2];case"double":return h[e>>3];default:Ae("invalid type for getValue: "+t)}return null},ee=function(e,t){e||Ae("Assertion failed: "+t)},te=function(e){var t=r["_"+e];return ee(t,"Cannot call unknown function "+e+", make sure it is exported"),t},re=function(e,t,r,o,n){var i={string:function(e){var t=0;if(null!=e&&0!==e){var r=1+(e.length<<2);t=V(r),se(e,t,r)}return t},array:function(e){var t=V(e.length);return ce(e,t),t}};var a=te(e),s=[],c=0;if(ee("array"!==t,'Return type should not be "array".'),o)for(var E=0;E<o.length;E++){var d=i[r[E]];d?(0===c&&(c=Y()),s[E]=d(o[E])):s[E]=o[E]}var T,p=a.apply(null,s);return T=p,p="string"===t?ie(T):"boolean"===t?Boolean(T):T,0!==c&&z(c),p},oe=function(e,t,r,o){return function(){return re(e,t,r,arguments)}},ne=function(e,t,r){for(var o=t+r,n=t;e[n]&&!(n>=o);)++n;if(n-t>16&&e.subarray&&D)return D.decode(e.subarray(t,n));for(var i="";t<n;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var c=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|c:(240!=(248&a)&&Z("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),a=(7&a)<<18|s<<12|c<<6|63&e[t++]),a<65536)i+=String.fromCharCode(a);else{var E=a-65536;i+=String.fromCharCode(55296|E>>10,56320|1023&E)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i},ie=function(e,t){return e?ne(A,e,t):""},ae=function(e,t,r,o){if(!(o>0))return 0;for(var n=r,i=r+o-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;s>=2097152&&Z("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-n},se=function(e,t,r){return ee("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),ae(e,A,t,r)},ce=function(e,t){ee(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),g.set(e,t)},Ee=function(e,t){return e%t>0&&(e+=t-e%t),e},de=function(e){f=e,r.HEAP8=g=new Int8Array(e),r.HEAP16=w=new Int16Array(e),r.HEAP32=M=new Int32Array(e),r.HEAPU8=A=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=y=new Uint32Array(e),r.HEAPF32=P=new Float32Array(e),r.HEAPF64=h=new Float64Array(e)},Te=function(){var e=K();ee(0==(3&e)),y[1+(e>>2)]=34821223,y[2+(e>>2)]=2310721022,M[0]=1668509029},pe=function(){if(!R){var e=K(),t=y[1+(e>>2)],r=y[2+(e>>2)];(34821223!=t||2310721022!=r)&&Ae("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" "+t.toString(16)),1668509029!==M[0]&&Ae("Runtime error: The application has corrupted its heap memory area (address zero)!")}},Oe=function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)Re(r.preRun.shift());Fe(X)},le=function(){pe(),ee(!U),U=!0,Fe(I)},ue=function(){pe(),Fe(m)},_e=function(){if(pe(),r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)De(r.postRun.shift());Fe(x)},Re=function(e){X.unshift(e)},De=function(e){x.unshift(e)},fe=function(e){N++,r.monitorRunDependencies&&r.monitorRunDependencies(N),e?(ee(!Q[e]),Q[e]=1,null===j&&typeof setInterval<"u"&&(j=setInterval((function(){if(R)return clearInterval(j),void(j=null);var e=!1;for(var t in Q)e||(e=!0,u("still waiting on run dependencies:")),u("dependency: "+t);e&&u("(end of list)")}),1e4))):u("warning: run dependency added without ID")},ge=function(e){if(N--,r.monitorRunDependencies&&r.monitorRunDependencies(N),e?(ee(Q[e]),delete Q[e]):u("warning: run dependency removed without ID"),0==N&&(null!==j&&(clearInterval(j),j=null),H)){var t=H;H=null,t()}},Ae=function(e){throw r.onAbort&&r.onAbort(e),u(e+=""),R=!0,e="abort("+e+") at "+xe(),new WebAssembly.RuntimeError(e)},we=function(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)},Me=function(e){return we(e,k)},ye=function(e){return we(e,L)},Pe=function(e,t){return function(){var o=e,n=t;return t||(n=r.asm),ee(U,"native function `"+o+"` called before runtime initialization"),ee(!v,"native function `"+o+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n[e]||ee(n[e],"exported native function `"+o+"` not found"),n[e].apply(null,arguments)}},he=function(e){try{if(e==G&&l)return new Uint8Array(l);if(d)return d(e);throw"both async and sync fetching of the wasm failed"}catch(e){Ae(e)}},be=function(){if(!l&&(n||i)){if("function"==typeof fetch&&!ye(G))return fetch(G,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+G+"'";return e.arrayBuffer()})).catch((function(){return he(G)}));if(E)return new Promise((function(e,t){E(G,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return he(G)}))},Se=function(){var e={env:W,wasi_snapshot_preview1:W};function t(e,t){var o=e.exports;r.asm=o,_=r.asm.memory,ee(_,"memory not found in wasm exports"),de(_.buffer),S=r.asm.__indirect_function_table,ee(S,"table not found in wasm exports"),ge("wasm-instantiate")}fe("wasm-instantiate");var o=r;function n(e){ee(r===o,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),o=null,t(e.instance)}function i(t){return be().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){u("failed to asynchronously prepare wasm: "+e),ye(G)&&u("warning: Loading from a file URI ("+G+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),Ae(e)}))}if(r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){return u("Module.instantiateWasm callback failed with error: "+e),!1}return l||"function"!=typeof WebAssembly.instantiateStreaming||Me(G)||ye(G)||"function"!=typeof fetch?i(n):fetch(G,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(e){return u("wasm streaming compile failed: "+e),u("falling back to ArrayBuffer instantiation"),i(n)}))})),{}},Fe=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var o=t.func;"number"==typeof o?void 0===t.arg?S.get(o)():S.get(o)(t.arg):o(void 0===t.arg?null:t.arg)}else t(r)}},Xe=function(e){return Z("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e},Ie=function(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=Xe(e);return e===t?e:t+" ["+e+"]"}))},me=function(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},xe=function(){var e=me();return r.extraStackTrace&&(e+="\n"+r.extraStackTrace()),Ie(e)},Ue=function(e,t,r){A.copyWithin(e,t,t+r)},ve=function(){return A.length},Ne=function(e){try{return _.grow(e-f.byteLength+65535>>>16),de(_.buffer),1}catch(t){console.error("emscripten_realloc_buffer: Attempted to grow heap from "+f.byteLength+" bytes to "+e+" bytes, but got error: "+t)}},je=function(e){var t=ve();ee(e>t);var r=2147483648;if(e>r)return u("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+r+" bytes!"),!1;for(var o=1;o<=4;o*=2){var n=t*(1+.2/o);n=Math.min(n,e+100663296);var i=Math.min(r,Ee(Math.max(e,n),65536));if(Ne(i))return!0}return u("Failed to grow the heap from "+t+" bytes to "+i+" bytes, not enough memory!"),!1},He=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},Qe=function(){q(),Te()},Ce=function(e){function t(){J||(J=!0,r.calledRun=!0,!R&&(le(),ue(),r.onRuntimeInitialized&&r.onRuntimeInitialized(),ee(!r._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),_e()))}N>0||(Qe(),Oe(),N>0)||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),t()}),1)):t(),pe())};var t,r=typeof r<"u"?r:{},o={};for(t in r)r.hasOwnProperty(t)&&(o[t]=r[t]);var n=!1,i=!1,a=!1,s=!1;if(n="object"==typeof window,i="function"==typeof importScripts,a="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,s=!n&&!a&&!i,r.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var c,E,d,T,p,O="";if(a)O=i?require("path").dirname(O)+"/":__dirname+"/",c=function(e,t){return T||(T=require("fs")),p||(p=require("path")),e=p.normalize(e),T.readFileSync(e,t?null:"utf8")},d=function(e){var t=c(e,!0);return t.buffer||(t=new Uint8Array(t)),ee(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),typeof module<"u"&&(module.exports=r),process.on("uncaughtException",(function(e){if(!(e instanceof He))throw e})),process.on("unhandledRejection",Ae),r.inspect=function(){return"[Emscripten Module object]"};else if(s)typeof read<"u"&&(c=function(e){return read(e)}),d=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),ee("object"==typeof t),t)},typeof scriptArgs<"u"&&scriptArgs,typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print);else{if(!n&&!i)throw new Error("environment detection error");i?O=self.location.href:typeof document<"u"&&document.currentScript&&(O=document.currentScript.src),O=0!==O.indexOf("blob:")?O.substr(0,O.lastIndexOf("/")+1):"",c=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},i&&(d=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),E=function(e,t,r){var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="arraybuffer",o.onload=function(){200==o.status||0==o.status&&o.response?t(o.response):r()},o.onerror=r,o.send(null)}}r.print||console.log.bind(console);var l,u=r.printErr||console.warn.bind(console);for(t in o)o.hasOwnProperty(t)&&(r[t]=o[t]);o=null,r.arguments&&r.arguments,Object.getOwnPropertyDescriptor(r,"arguments")||Object.defineProperty(r,"arguments",{configurable:!0,get:function(){Ae("Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),r.thisProgram&&r.thisProgram,Object.getOwnPropertyDescriptor(r,"thisProgram")||Object.defineProperty(r,"thisProgram",{configurable:!0,get:function(){Ae("Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),r.quit&&r.quit,Object.getOwnPropertyDescriptor(r,"quit")||Object.defineProperty(r,"quit",{configurable:!0,get:function(){Ae("Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),ee(typeof r.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),ee(typeof r.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),ee(typeof r.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),ee(typeof r.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),ee(typeof r.read>"u","Module.read option was removed (modify read_ in JS)"),ee(typeof r.readAsync>"u","Module.readAsync option was removed (modify readAsync in JS)"),ee(typeof r.readBinary>"u","Module.readBinary option was removed (modify readBinary in JS)"),ee(typeof r.setWindowTitle>"u","Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),ee(typeof r.TOTAL_MEMORY>"u","Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Object.getOwnPropertyDescriptor(r,"read")||Object.defineProperty(r,"read",{configurable:!0,get:function(){Ae("Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(r,"readAsync")||Object.defineProperty(r,"readAsync",{configurable:!0,get:function(){Ae("Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(r,"readBinary")||Object.defineProperty(r,"readBinary",{configurable:!0,get:function(){Ae("Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(r,"setWindowTitle")||Object.defineProperty(r,"setWindowTitle",{configurable:!0,get:function(){Ae("Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),r.wasmBinary&&(l=r.wasmBinary),Object.getOwnPropertyDescriptor(r,"wasmBinary")||Object.defineProperty(r,"wasmBinary",{configurable:!0,get:function(){Ae("Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),r.noExitRuntime,Object.getOwnPropertyDescriptor(r,"noExitRuntime")||Object.defineProperty(r,"noExitRuntime",{configurable:!0,get:function(){Ae("Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),"object"!=typeof WebAssembly&&Ae("no native wasm support detected");var _,R=!1,D=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var f,g,A,w,M,y,P,h,b=5242880;r.TOTAL_STACK&&ee(b===r.TOTAL_STACK,"the stack size can no longer be determined at runtime");var S,F=r.INITIAL_MEMORY||16777216;Object.getOwnPropertyDescriptor(r,"INITIAL_MEMORY")||Object.defineProperty(r,"INITIAL_MEMORY",{configurable:!0,get:function(){Ae("Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),ee(F>=b,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+F+"! (TOTAL_STACK="+b+")"),ee(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),ee(!r.wasmMemory,"Use of `wasmMemory` detected. Use -s IMPORTED_MEMORY to define wasmMemory externally"),ee(16777216==F,"Detected runtime INITIAL_MEMORY setting. Use -s IMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!"}();var X=[],I=[],m=[],x=[],U=!1,v=!1;I.push({func:function(){B()}}),ee(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),ee(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),ee(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),ee(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var N=0,j=null,H=null,Q={};r.preloadedImages={},r.preloadedAudios={};var C={error:function(){Ae("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){C.error()},createDataFile:function(){C.error()},createPreloadedFile:function(){C.error()},createLazyFile:function(){C.error()},open:function(){C.error()},mkdev:function(){C.error()},registerDevice:function(){C.error()},analyzePath:function(){C.error()},loadFilesFromDB:function(){C.error()},ErrnoError:function(){C.error()}};r.FS_createDataFile=C.createDataFile,r.FS_createPreloadedFile=C.createPreloadedFile;var k="data:application/octet-stream;base64,",L="file://",G="ThirdParty/unzip.wasm";Me(G)||(G=e(G));var W={emscripten_memcpy_big:Ue,emscripten_resize_heap:je};Se();var B=r.___wasm_call_ctors=Pe("__wasm_call_ctors");r._unzip=Pe("unzip"),r._freePointer=Pe("freePointer"),r._malloc=Pe("malloc"),r._free=Pe("free"),r.___errno_location=Pe("__errno_location"),r._fflush=Pe("fflush");var Y=r.stackSave=Pe("stackSave"),z=r.stackRestore=Pe("stackRestore"),V=r.stackAlloc=Pe("stackAlloc"),q=r._emscripten_stack_init=function(){return(q=r._emscripten_stack_init=r.asm.emscripten_stack_init).apply(null,arguments)};r._emscripten_stack_get_free=function(){return(r._emscripten_stack_get_free=r.asm.emscripten_stack_get_free).apply(null,arguments)};var J,K=r._emscripten_stack_get_end=function(){return(K=r._emscripten_stack_get_end=r.asm.emscripten_stack_get_end).apply(null,arguments)};if(Object.getOwnPropertyDescriptor(r,"intArrayFromString")||(r.intArrayFromString=function(){Ae("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"intArrayToString")||(r.intArrayToString=function(){Ae("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),r.ccall=re,r.cwrap=oe,Object.getOwnPropertyDescriptor(r,"setValue")||(r.setValue=function(){Ae("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),r.getValue=$,Object.getOwnPropertyDescriptor(r,"allocate")||(r.allocate=function(){Ae("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"UTF8ArrayToString")||(r.UTF8ArrayToString=function(){Ae("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"UTF8ToString")||(r.UTF8ToString=function(){Ae("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"stringToUTF8Array")||(r.stringToUTF8Array=function(){Ae("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"stringToUTF8")||(r.stringToUTF8=function(){Ae("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"lengthBytesUTF8")||(r.lengthBytesUTF8=function(){Ae("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"stackTrace")||(r.stackTrace=function(){Ae("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"addOnPreRun")||(r.addOnPreRun=function(){Ae("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"addOnInit")||(r.addOnInit=function(){Ae("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"addOnPreMain")||(r.addOnPreMain=function(){Ae("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"addOnExit")||(r.addOnExit=function(){Ae("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"addOnPostRun")||(r.addOnPostRun=function(){Ae("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"writeStringToMemory")||(r.writeStringToMemory=function(){Ae("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"writeArrayToMemory")||(r.writeArrayToMemory=function(){Ae("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"writeAsciiToMemory")||(r.writeAsciiToMemory=function(){Ae("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"addRunDependency")||(r.addRunDependency=function(){Ae("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(r,"removeRunDependency")||(r.removeRunDependency=function(){Ae("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(r,"FS_createFolder")||(r.FS_createFolder=function(){Ae("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"FS_createPath")||(r.FS_createPath=function(){Ae("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(r,"FS_createDataFile")||(r.FS_createDataFile=function(){Ae("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(r,"FS_createPreloadedFile")||(r.FS_createPreloadedFile=function(){Ae("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(r,"FS_createLazyFile")||(r.FS_createLazyFile=function(){Ae("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(r,"FS_createLink")||(r.FS_createLink=function(){Ae("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"FS_createDevice")||(r.FS_createDevice=function(){Ae("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(r,"FS_unlink")||(r.FS_unlink=function(){Ae("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(r,"getLEB")||(r.getLEB=function(){Ae("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getFunctionTables")||(r.getFunctionTables=function(){Ae("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"alignFunctionTables")||(r.alignFunctionTables=function(){Ae("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerFunctions")||(r.registerFunctions=function(){Ae("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"addFunction")||(r.addFunction=function(){Ae("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"removeFunction")||(r.removeFunction=function(){Ae("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getFuncWrapper")||(r.getFuncWrapper=function(){Ae("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"prettyPrint")||(r.prettyPrint=function(){Ae("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"makeBigInt")||(r.makeBigInt=function(){Ae("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"dynCall")||(r.dynCall=function(){Ae("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getCompilerSetting")||(r.getCompilerSetting=function(){Ae("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"print")||(r.print=function(){Ae("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"printErr")||(r.printErr=function(){Ae("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getTempRet0")||(r.getTempRet0=function(){Ae("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"setTempRet0")||(r.setTempRet0=function(){Ae("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"callMain")||(r.callMain=function(){Ae("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"abort")||(r.abort=function(){Ae("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"stringToNewUTF8")||(r.stringToNewUTF8=function(){Ae("'stringToNewUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"setFileTime")||(r.setFileTime=function(){Ae("'setFileTime' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"emscripten_realloc_buffer")||(r.emscripten_realloc_buffer=function(){Ae("'emscripten_realloc_buffer' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"ENV")||(r.ENV=function(){Ae("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"ERRNO_CODES")||(r.ERRNO_CODES=function(){Ae("'ERRNO_CODES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"ERRNO_MESSAGES")||(r.ERRNO_MESSAGES=function(){Ae("'ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"setErrNo")||(r.setErrNo=function(){Ae("'setErrNo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"inetPton4")||(r.inetPton4=function(){Ae("'inetPton4' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"inetNtop4")||(r.inetNtop4=function(){Ae("'inetNtop4' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"inetPton6")||(r.inetPton6=function(){Ae("'inetPton6' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"inetNtop6")||(r.inetNtop6=function(){Ae("'inetNtop6' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"readSockaddr")||(r.readSockaddr=function(){Ae("'readSockaddr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"writeSockaddr")||(r.writeSockaddr=function(){Ae("'writeSockaddr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"DNS")||(r.DNS=function(){Ae("'DNS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getHostByName")||(r.getHostByName=function(){Ae("'getHostByName' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"GAI_ERRNO_MESSAGES")||(r.GAI_ERRNO_MESSAGES=function(){Ae("'GAI_ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"Protocols")||(r.Protocols=function(){Ae("'Protocols' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"Sockets")||(r.Sockets=function(){Ae("'Sockets' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getRandomDevice")||(r.getRandomDevice=function(){Ae("'getRandomDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"traverseStack")||(r.traverseStack=function(){Ae("'traverseStack' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"UNWIND_CACHE")||(r.UNWIND_CACHE=function(){Ae("'UNWIND_CACHE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"withBuiltinMalloc")||(r.withBuiltinMalloc=function(){Ae("'withBuiltinMalloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"readAsmConstArgsArray")||(r.readAsmConstArgsArray=function(){Ae("'readAsmConstArgsArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"readAsmConstArgs")||(r.readAsmConstArgs=function(){Ae("'readAsmConstArgs' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"mainThreadEM_ASM")||(r.mainThreadEM_ASM=function(){Ae("'mainThreadEM_ASM' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"jstoi_q")||(r.jstoi_q=function(){Ae("'jstoi_q' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"jstoi_s")||(r.jstoi_s=function(){Ae("'jstoi_s' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getExecutableName")||(r.getExecutableName=function(){Ae("'getExecutableName' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"listenOnce")||(r.listenOnce=function(){Ae("'listenOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"autoResumeAudioContext")||(r.autoResumeAudioContext=function(){Ae("'autoResumeAudioContext' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"dynCallLegacy")||(r.dynCallLegacy=function(){Ae("'dynCallLegacy' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getDynCaller")||(r.getDynCaller=function(){Ae("'getDynCaller' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"dynCall")||(r.dynCall=function(){Ae("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"callRuntimeCallbacks")||(r.callRuntimeCallbacks=function(){Ae("'callRuntimeCallbacks' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"reallyNegative")||(r.reallyNegative=function(){Ae("'reallyNegative' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"unSign")||(r.unSign=function(){Ae("'unSign' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"reSign")||(r.reSign=function(){Ae("'reSign' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"formatString")||(r.formatString=function(){Ae("'formatString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"PATH")||(r.PATH=function(){Ae("'PATH' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"PATH_FS")||(r.PATH_FS=function(){Ae("'PATH_FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"SYSCALLS")||(r.SYSCALLS=function(){Ae("'SYSCALLS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"syscallMmap2")||(r.syscallMmap2=function(){Ae("'syscallMmap2' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"syscallMunmap")||(r.syscallMunmap=function(){Ae("'syscallMunmap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getSocketFromFD")||(r.getSocketFromFD=function(){Ae("'getSocketFromFD' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getSocketAddress")||(r.getSocketAddress=function(){Ae("'getSocketAddress' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"JSEvents")||(r.JSEvents=function(){Ae("'JSEvents' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerKeyEventCallback")||(r.registerKeyEventCallback=function(){Ae("'registerKeyEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"specialHTMLTargets")||(r.specialHTMLTargets=function(){Ae("'specialHTMLTargets' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"maybeCStringToJsString")||(r.maybeCStringToJsString=function(){Ae("'maybeCStringToJsString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"findEventTarget")||(r.findEventTarget=function(){Ae("'findEventTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"findCanvasEventTarget")||(r.findCanvasEventTarget=function(){Ae("'findCanvasEventTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getBoundingClientRect")||(r.getBoundingClientRect=function(){Ae("'getBoundingClientRect' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"fillMouseEventData")||(r.fillMouseEventData=function(){Ae("'fillMouseEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerMouseEventCallback")||(r.registerMouseEventCallback=function(){Ae("'registerMouseEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerWheelEventCallback")||(r.registerWheelEventCallback=function(){Ae("'registerWheelEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerUiEventCallback")||(r.registerUiEventCallback=function(){Ae("'registerUiEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerFocusEventCallback")||(r.registerFocusEventCallback=function(){Ae("'registerFocusEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"fillDeviceOrientationEventData")||(r.fillDeviceOrientationEventData=function(){Ae("'fillDeviceOrientationEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerDeviceOrientationEventCallback")||(r.registerDeviceOrientationEventCallback=function(){Ae("'registerDeviceOrientationEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"fillDeviceMotionEventData")||(r.fillDeviceMotionEventData=function(){Ae("'fillDeviceMotionEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerDeviceMotionEventCallback")||(r.registerDeviceMotionEventCallback=function(){Ae("'registerDeviceMotionEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"screenOrientation")||(r.screenOrientation=function(){Ae("'screenOrientation' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"fillOrientationChangeEventData")||(r.fillOrientationChangeEventData=function(){Ae("'fillOrientationChangeEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerOrientationChangeEventCallback")||(r.registerOrientationChangeEventCallback=function(){Ae("'registerOrientationChangeEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"fillFullscreenChangeEventData")||(r.fillFullscreenChangeEventData=function(){Ae("'fillFullscreenChangeEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerFullscreenChangeEventCallback")||(r.registerFullscreenChangeEventCallback=function(){Ae("'registerFullscreenChangeEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerRestoreOldStyle")||(r.registerRestoreOldStyle=function(){Ae("'registerRestoreOldStyle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"hideEverythingExceptGivenElement")||(r.hideEverythingExceptGivenElement=function(){Ae("'hideEverythingExceptGivenElement' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"restoreHiddenElements")||(r.restoreHiddenElements=function(){Ae("'restoreHiddenElements' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"setLetterbox")||(r.setLetterbox=function(){Ae("'setLetterbox' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"currentFullscreenStrategy")||(r.currentFullscreenStrategy=function(){Ae("'currentFullscreenStrategy' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"restoreOldWindowedStyle")||(r.restoreOldWindowedStyle=function(){Ae("'restoreOldWindowedStyle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"softFullscreenResizeWebGLRenderTarget")||(r.softFullscreenResizeWebGLRenderTarget=function(){Ae("'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"doRequestFullscreen")||(r.doRequestFullscreen=function(){Ae("'doRequestFullscreen' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"fillPointerlockChangeEventData")||(r.fillPointerlockChangeEventData=function(){Ae("'fillPointerlockChangeEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerPointerlockChangeEventCallback")||(r.registerPointerlockChangeEventCallback=function(){Ae("'registerPointerlockChangeEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerPointerlockErrorEventCallback")||(r.registerPointerlockErrorEventCallback=function(){Ae("'registerPointerlockErrorEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"requestPointerLock")||(r.requestPointerLock=function(){Ae("'requestPointerLock' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"fillVisibilityChangeEventData")||(r.fillVisibilityChangeEventData=function(){Ae("'fillVisibilityChangeEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerVisibilityChangeEventCallback")||(r.registerVisibilityChangeEventCallback=function(){Ae("'registerVisibilityChangeEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerTouchEventCallback")||(r.registerTouchEventCallback=function(){Ae("'registerTouchEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"fillGamepadEventData")||(r.fillGamepadEventData=function(){Ae("'fillGamepadEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerGamepadEventCallback")||(r.registerGamepadEventCallback=function(){Ae("'registerGamepadEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerBeforeUnloadEventCallback")||(r.registerBeforeUnloadEventCallback=function(){Ae("'registerBeforeUnloadEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"fillBatteryEventData")||(r.fillBatteryEventData=function(){Ae("'fillBatteryEventData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"battery")||(r.battery=function(){Ae("'battery' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"registerBatteryEventCallback")||(r.registerBatteryEventCallback=function(){Ae("'registerBatteryEventCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"setCanvasElementSize")||(r.setCanvasElementSize=function(){Ae("'setCanvasElementSize' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getCanvasElementSize")||(r.getCanvasElementSize=function(){Ae("'getCanvasElementSize' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"polyfillSetImmediate")||(r.polyfillSetImmediate=function(){Ae("'polyfillSetImmediate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"demangle")||(r.demangle=function(){Ae("'demangle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"demangleAll")||(r.demangleAll=function(){Ae("'demangleAll' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"jsStackTrace")||(r.jsStackTrace=function(){Ae("'jsStackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"stackTrace")||(r.stackTrace=function(){Ae("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getEnvStrings")||(r.getEnvStrings=function(){Ae("'getEnvStrings' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"checkWasiClock")||(r.checkWasiClock=function(){Ae("'checkWasiClock' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"flush_NO_FILESYSTEM")||(r.flush_NO_FILESYSTEM=function(){Ae("'flush_NO_FILESYSTEM' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"writeI53ToI64")||(r.writeI53ToI64=function(){Ae("'writeI53ToI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"writeI53ToI64Clamped")||(r.writeI53ToI64Clamped=function(){Ae("'writeI53ToI64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"writeI53ToI64Signaling")||(r.writeI53ToI64Signaling=function(){Ae("'writeI53ToI64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"writeI53ToU64Clamped")||(r.writeI53ToU64Clamped=function(){Ae("'writeI53ToU64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"writeI53ToU64Signaling")||(r.writeI53ToU64Signaling=function(){Ae("'writeI53ToU64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"readI53FromI64")||(r.readI53FromI64=function(){Ae("'readI53FromI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"readI53FromU64")||(r.readI53FromU64=function(){Ae("'readI53FromU64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"convertI32PairToI53")||(r.convertI32PairToI53=function(){Ae("'convertI32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"convertU32PairToI53")||(r.convertU32PairToI53=function(){Ae("'convertU32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"uncaughtExceptionCount")||(r.uncaughtExceptionCount=function(){Ae("'uncaughtExceptionCount' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"exceptionLast")||(r.exceptionLast=function(){Ae("'exceptionLast' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"exceptionCaught")||(r.exceptionCaught=function(){Ae("'exceptionCaught' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"ExceptionInfoAttrs")||(r.ExceptionInfoAttrs=function(){Ae("'ExceptionInfoAttrs' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"ExceptionInfo")||(r.ExceptionInfo=function(){Ae("'ExceptionInfo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"CatchInfo")||(r.CatchInfo=function(){Ae("'CatchInfo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"exception_addRef")||(r.exception_addRef=function(){Ae("'exception_addRef' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"exception_decRef")||(r.exception_decRef=function(){Ae("'exception_decRef' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"Browser")||(r.Browser=function(){Ae("'Browser' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"funcWrappers")||(r.funcWrappers=function(){Ae("'funcWrappers' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"getFuncWrapper")||(r.getFuncWrapper=function(){Ae("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"setMainLoop")||(r.setMainLoop=function(){Ae("'setMainLoop' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"FS")||(r.FS=function(){Ae("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"mmapAlloc")||(r.mmapAlloc=function(){Ae("'mmapAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"MEMFS")||(r.MEMFS=function(){Ae("'MEMFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"TTY")||(r.TTY=function(){Ae("'TTY' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"PIPEFS")||(r.PIPEFS=function(){Ae("'PIPEFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"SOCKFS")||(r.SOCKFS=function(){Ae("'SOCKFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"_setNetworkCallback")||(r._setNetworkCallback=function(){Ae("'_setNetworkCallback' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"tempFixedLengthArray")||(r.tempFixedLengthArray=function(){Ae("'tempFixedLengthArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"miniTempWebGLFloatBuffers")||(r.miniTempWebGLFloatBuffers=function(){Ae("'miniTempWebGLFloatBuffers' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"heapObjectForWebGLType")||(r.heapObjectForWebGLType=function(){Ae("'heapObjectForWebGLType' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"heapAccessShiftForWebGLHeap")||(r.heapAccessShiftForWebGLHeap=function(){Ae("'heapAccessShiftForWebGLHeap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"GL")||(r.GL=function(){Ae("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"emscriptenWebGLGet")||(r.emscriptenWebGLGet=function(){Ae("'emscriptenWebGLGet' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"computeUnpackAlignedImageSize")||(r.computeUnpackAlignedImageSize=function(){Ae("'computeUnpackAlignedImageSize' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"emscriptenWebGLGetTexPixelData")||(r.emscriptenWebGLGetTexPixelData=function(){Ae("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"emscriptenWebGLGetUniform")||(r.emscriptenWebGLGetUniform=function(){Ae("'emscriptenWebGLGetUniform' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"emscriptenWebGLGetVertexAttrib")||(r.emscriptenWebGLGetVertexAttrib=function(){Ae("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"writeGLArray")||(r.writeGLArray=function(){Ae("'writeGLArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"AL")||(r.AL=function(){Ae("'AL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"SDL_unicode")||(r.SDL_unicode=function(){Ae("'SDL_unicode' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"SDL_ttfContext")||(r.SDL_ttfContext=function(){Ae("'SDL_ttfContext' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"SDL_audio")||(r.SDL_audio=function(){Ae("'SDL_audio' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"SDL")||(r.SDL=function(){Ae("'SDL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"SDL_gfx")||(r.SDL_gfx=function(){Ae("'SDL_gfx' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"GLUT")||(r.GLUT=function(){Ae("'GLUT' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"EGL")||(r.EGL=function(){Ae("'EGL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"GLFW_Window")||(r.GLFW_Window=function(){Ae("'GLFW_Window' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"GLFW")||(r.GLFW=function(){Ae("'GLFW' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"GLEW")||(r.GLEW=function(){Ae("'GLEW' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"IDBStore")||(r.IDBStore=function(){Ae("'IDBStore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"runAndAbortIfError")||(r.runAndAbortIfError=function(){Ae("'runAndAbortIfError' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"warnOnce")||(r.warnOnce=function(){Ae("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"stackSave")||(r.stackSave=function(){Ae("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"stackRestore")||(r.stackRestore=function(){Ae("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"stackAlloc")||(r.stackAlloc=function(){Ae("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"AsciiToString")||(r.AsciiToString=function(){Ae("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"stringToAscii")||(r.stringToAscii=function(){Ae("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"UTF16ToString")||(r.UTF16ToString=function(){Ae("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"stringToUTF16")||(r.stringToUTF16=function(){Ae("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"lengthBytesUTF16")||(r.lengthBytesUTF16=function(){Ae("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"UTF32ToString")||(r.UTF32ToString=function(){Ae("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"stringToUTF32")||(r.stringToUTF32=function(){Ae("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"lengthBytesUTF32")||(r.lengthBytesUTF32=function(){Ae("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"allocateUTF8")||(r.allocateUTF8=function(){Ae("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(r,"allocateUTF8OnStack")||(r.allocateUTF8OnStack=function(){Ae("'allocateUTF8OnStack' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),r.writeStackCookie=Te,r.checkStackCookie=pe,Object.getOwnPropertyDescriptor(r,"ALLOC_NORMAL")||Object.defineProperty(r,"ALLOC_NORMAL",{configurable:!0,get:function(){Ae("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(r,"ALLOC_STACK")||Object.defineProperty(r,"ALLOC_STACK",{configurable:!0,get:function(){Ae("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),H=function e(){J||Ce(),J||(H=e)},r.run=Ce,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();Ce()}else r=null;var Z=r;e.unzip=Z})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/unzip-e2c14141.js b/SuperMap iEarth/public/SuperMap3D/Workers/unzip-e2c14141.js deleted file mode 100644 index a1d4fcfe..00000000 --- a/SuperMap iEarth/public/SuperMap3D/Workers/unzip-e2c14141.js +++ /dev/null @@ -1 +0,0 @@ -define(["exports"],(function(e){"use strict";if(typeof WebAssembly<"u"&&"object"!=typeof window){let e=function(e){return n.locateFile?n.locateFile(e,c):c+e},pe=function(e){pe.shown||(pe.shown={}),pe.shown[e]||(pe.shown[e]=1)},_e=function(e,t,n){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return w[e>>0];case"i16":return A[e>>1];case"i32":case"i64":return O[e>>2];case"float":return S[e>>2];case"double":return b[e>>3];default:ft("invalid type for getValue: "+t)}return null},he=function(e,t){e||ft("Assertion failed: "+t)},ye=function(e){var t=n["_"+e];return he(t,"Cannot call unknown function "+e+", make sure it is exported"),t},me=function(e,t,n,r,i){var o={string:function(e){var t=0;if(null!=e&&0!==e){var n=1+(e.length<<2);t=de(n),Oe(e,t,n)}return t},array:function(e){var t=de(e.length);return Me(e,t),t}};var a=ye(e),s=[],u=0;if(he("array"!==t,'Return type should not be "array".'),r)for(var l=0;l<r.length;l++){var c=o[n[l]];c?(0===u&&(u=Ee()),s[l]=c(r[l])):s[l]=r[l]}var d,f=a.apply(null,s);return d=f,f="string"===t?ge(d):"boolean"===t?Boolean(d):d,0!==u&&fe(u),f},Re=function(e,t,n,r){return function(){return me(e,t,n,arguments)}},we=function(e,t,n){for(var r=t+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.subarray&&m)return m.decode(e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|u:(240!=(248&a)&&pe("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),a=(7&a)<<18|s<<12|u<<6|63&e[t++]),a<65536)o+=String.fromCharCode(a);else{var l=a-65536;o+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},ge=function(e,t){return e?we(g,e,t):""},Ae=function(e,t,n,r){if(!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(n>=o)break;t[n++]=s}else if(s<=2047){if(n+1>=o)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=o)break;s>=2097152&&pe("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}return t[n]=0,n-i},Oe=function(e,t,n){return he("number"==typeof n,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),Ae(e,g,t,n)},Me=function(e,t){he(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),w.set(e,t)},Se=function(e){return e.replace(/__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))},be=function(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()},Fe=function(){var e=be();return n.extraStackTrace&&(e+="\n"+n.extraStackTrace()),Se(e)},ve=function(e,t){return e%t>0&&(e+=t-e%t),e},Ie=function(){n.HEAP8=w=new Int8Array(R),n.HEAP16=A=new Int16Array(R),n.HEAP32=O=new Int32Array(R),n.HEAPU8=g=new Uint8Array(R),n.HEAPU16=new Uint16Array(R),n.HEAPU32=M=new Uint32Array(R),n.HEAPF32=S=new Float32Array(R),n.HEAPF64=b=new Float64Array(R)},Ne=function(){he(0==(3&I)),M[(I>>2)-1]=34821223,M[(I>>2)-2]=2310721022},xe=function(){(34821223!=M[(I>>2)-1]||2310721022!=M[(I>>2)-2])&&ft("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+M[(I>>2)-2].toString(16)+" "+M[(I>>2)-1].toString(16)),1668509029!==O[0]&&ft("Runtime error: The application has corrupted its heap memory area (address zero)!")},De=function(e){ft("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(I-Ee()+e)+" bytes available!")},Ue=function(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?n.dynCall_v(r):n.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}},Xe=function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)He(n.preRun.shift());Ue(X)},Pe=function(){xe(),!H&&(H=!0,Ue(P))},Le=function(){xe(),Ue(L)},ke=function(){if(xe(),n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)Ce(n.postRun.shift());Ue(k)},He=function(e){X.unshift(e)},Ce=function(e){k.unshift(e)},Qe=function(e){Q++,n.monitorRunDependencies&&n.monitorRunDependencies(Q),e&&(he(!W[e]),W[e]=1,null===B&&typeof setInterval<"u"&&(B=setInterval((function(){if(y)return clearInterval(B),void(B=null)}),1e4)))},Be=function(e){if(Q--,n.monitorRunDependencies&&n.monitorRunDependencies(Q),e?(he(W[e]),delete W[e]):f("warning: run dependency removed without ID"),0==Q&&(null!==B&&(clearInterval(B),B=null),Y)){var t=Y;Y=null,t()}},Ye=function(e){return String.prototype.startsWith?e.startsWith(j):0===e.indexOf(j)},We=function(){try{if(n.wasmBinary)return new Uint8Array(n.wasmBinary);if(n.readBinary)return n.readBinary(V);throw"both async and sync fetching of the wasm failed"}catch(e){ft(e)}},ze=function(){return n.wasmBinary||!i&&!o||"function"!=typeof fetch?new Promise((function(e,t){e(We())})):fetch(V,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+V+"'";return e.arrayBuffer()})).catch((function(){return We()}))},je=function(e){var t={env:e,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:E};function r(e,t){var r=e.exports;n.asm=r,Be("wasm-instantiate")}Qe("wasm-instantiate");var i=n;function o(e){he(n===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,r(e.instance)}function a(e){return ze().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(e){}))}if(n.instantiateWasm)try{return n.instantiateWasm(t,r)}catch{return!1}return function(){if(n.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||Ye(V)||"function"!=typeof fetch)return a(o);fetch(V,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){a(o)}))}))}(),{}},Ve=function(){},Ge=function(e,t){q.varargs=t;try{q.getStreamFromFD(),q.get(),q.get(),q.get(),q.get();return ft("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof z>"u"||!(e instanceof z.ErrnoError))&&ft(e),-e.errno}},qe=function(){var e=n._fflush;e&&e(0);var t=q.buffers;t[1].length&&q.printChar(1,10),t[2].length&&q.printChar(2,10)},Je=function(e,t){q.varargs=t;try{for(var n=q.get(),r=q.get(),i=q.get(),o=0,a=0;a<i;a++){for(var s=O[r+8*a>>2],u=O[r+(8*a+4)>>2],l=0;l<u;l++)q.printChar(n,g[s+l]);o+=u}return o}catch(e){return(typeof z>"u"||!(e instanceof z.ErrnoError))&&ft(e),-e.errno}},Ke=function(e,t){q.varargs=t;try{return 0}catch(e){return(typeof z>"u"||!(e instanceof z.ErrnoError))&&ft(e),-e.errno}},Ze=function(e,t){q.varargs=t;try{q.getStreamFromFD();return ft("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return(typeof z>"u"||!(e instanceof z.ErrnoError))&&ft(e),-e.errno}},$e=function(){},et=function(){return w.length},tt=function(e,t,n){g.set(g.subarray(t,t+n),e)},nt=function(e){return n.___errno_location?O[n.___errno_location()>>2]=e:f("failed to set errno from JS"),e},rt=function(e){ft("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+w.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},it=function(e){e=ve(e,65536);var t=R.byteLength;try{return-1!==h.grow((e-t)/65536)&&(R=h.buffer,!0)}catch(n){return console.error("emscripten_realloc_buffer: Attempted to grow from "+t+" bytes to "+e+" bytes, but got error: "+n),!1}},ot=function(e){var t=et();he(e>t);var n=65536,r=2147418112;if(e>r)return f("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+r+" bytes!"),!1;for(var i=Math.max(t,16777216);i<e;)(i=i<=536870912?ve(2*i,n):Math.min(ve((3*i+2147483648)/4,n),r))===t&&pe("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+w.length);return it(i)?(Ie(),!0):(f("Failed to grow the heap from "+t+" bytes to "+i+" bytes, not enough memory!"),!1)},at=function(e){f("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),f("Build with ASSERTIONS=2 for more info."),ft(e)},st=function(e){f("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),f("Build with ASSERTIONS=2 for more info."),ft(e)},ut=function(e){f("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),f("Build with ASSERTIONS=2 for more info."),ft(e)},lt=function(e){f("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),f("Build with ASSERTIONS=2 for more info."),ft(e)},ct=function(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e},dt=function(e){function t(){n.calledRun||(n.calledRun=!0,!y&&(Pe(),Le(),n.onRuntimeInitialized&&n.onRuntimeInitialized(),he(!n._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),ke()))}e=e||n.arguments,Q>0||(Ne(),Xe(),Q>0)||n.calledRun||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t(),xe())},ft=function(e){n.onAbort&&n.onAbort(e),y=!0;var t="abort("+(e=void 0!==e?'"'+e+'"':"")+") at "+Fe();throw Te&&Te.forEach((function(n){t=n(t,e)})),t};var t,n=typeof n<"u"?n:{},r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);n.arguments=[],n.thisProgram="./this.program",n.quit=function(e,t){throw t},n.preRun=[],n.postRun=[];var i=!1,o=!1,a=!1,s=!1;if(i="object"==typeof window,o="function"==typeof importScripts,a="object"==typeof process&&"function"==typeof require&&!i&&!o,s=!i&&!a&&!o,n.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var u,l,c="";if(a)c=__dirname+"/",n.read=function(e,t){var n;return u||(u=require("fs")),l||(l=require("path")),e=l.normalize(e),n=u.readFileSync(e),t?n:n.toString()},n.readBinary=function(e){var t=n.read(e,!0);return t.buffer||(t=new Uint8Array(t)),he(t.buffer),t},process.argv.length>1&&(n.thisProgram=process.argv[1].replace(/\\/g,"/")),n.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=n),process.on("uncaughtException",(function(e){if(!(e instanceof ct))throw e})),process.on("unhandledRejection",ft),n.quit=function(e){process.exit(e)},n.inspect=function(){return"[Emscripten Module object]"};else if(s)typeof read<"u"&&(n.read=function(e){return read(e)}),n.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),he("object"==typeof t),t)},typeof scriptArgs<"u"?n.arguments=scriptArgs:typeof arguments<"u"&&(n.arguments=arguments),"function"==typeof quit&&(n.quit=function(e){quit(e)});else{if(!i&&!o)throw new Error("environment detection error");o?c=self.location.href:document.currentScript&&(c=document.currentScript.src),c=0!==c.indexOf("blob:")?c.substr(0,c.indexOf("/Workers")+1):"",n.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},o&&(n.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),n.readAsync=function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)},n.setWindowTitle=function(e){document.title=e}}var d=n.print||(typeof console<"u"?console.log.bind(console):typeof print<"u"?print:null),f=n.printErr||(typeof printErr<"u"?printErr:typeof console<"u"&&console.warn.bind(console)||d);for(t in r)r.hasOwnProperty(t)&&(n[t]=r[t]);r=void 0,he(typeof n.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),he(typeof n.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),he(typeof n.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),he(typeof n.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),Ee=fe=de=function(){ft("cannot use the stack before compiled code is ready to run, and has provided stack access")};var E={"f64-rem":function(e,t){return e%t},debugger:function(){}};new Array(0);var T=0,p=function(e){T=e},_=function(){return T};"object"!=typeof WebAssembly&&ft("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var h,y=!1,m=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var R,w,g,A,O,M,S,b,F=65536,v=15104,I=5257984,N=5257984,x=15072;he(v%16==0,"stack must start aligned"),he(N%16==0,"heap must start aligned");var D=5242880;n.TOTAL_STACK&&he(D===n.TOTAL_STACK,"the stack size can no longer be determined at runtime");var U=n.TOTAL_MEMORY||16777216;if(U<D&&f("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+U+"! (TOTAL_STACK="+D+")"),he(typeof Int32Array<"u"&&typeof Float64Array<"u"&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),n.buffer?(R=n.buffer,he(R.byteLength===U,"provided buffer should be "+U+" bytes, but it is "+R.byteLength)):("object"==typeof WebAssembly&&"function"==typeof WebAssembly.Memory?(he(U%F==0),h=new WebAssembly.Memory({initial:U/F}),R=h.buffer):R=new ArrayBuffer(U),he(R.byteLength===U)),Ie(),O[x>>2]=N,O[0]=1668509029,A[1]=25459,115!==g[2]||99!==g[3])throw"Runtime error: expected the system to be little-endian!";var X=[],P=[],L=[],k=[],H=!1,C=!1;he(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),he(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),he(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),he(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var Q=0,B=null,Y=null,W={};n.preloadedImages={},n.preloadedAudios={};var z={error:function(){ft("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){z.error()},createDataFile:function(){z.error()},createPreloadedFile:function(){z.error()},createLazyFile:function(){z.error()},open:function(){z.error()},mkdev:function(){z.error()},registerDevice:function(){z.error()},analyzePath:function(){z.error()},loadFilesFromDB:function(){z.error()},ErrnoError:function(){z.error()}};n.FS_createDataFile=z.createDataFile,n.FS_createPreloadedFile=z.createPreloadedFile;var j="data:application/octet-stream;base64,",V="ThirdParty/unzip.wasm";Ye(V)||(V=e(V)),n.asm=function(e,t,n){t.memory=h,t.table=new WebAssembly.Table({initial:22,maximum:22,element:"anyfunc"}),t.__memory_base=1024,t.__table_base=0;var r=je(t);return he(r,"binaryen setup failed (no wasm support?)"),r};var G=15088;he(G%8==0);var q={buffers:[null,[],[]],printChar:function(e,t){var n=q.buffers[e];he(n),0===t||10===t?((1===e?d:f)(we(n,0)),n.length=0):n.push(t)},varargs:0,get:function(e){return q.varargs+=4,O[q.varargs-4>>2]},getStr:function(){return ge(q.get())},get64:function(){var e=q.get(),t=q.get();return he(e>=0?0===t:-1===t),e},getZero:function(){he(0===q.get())}},J={},K={abort:ft,setTempRet0:p,getTempRet0:_,abortStackOverflow:De,nullFunc_ii:at,nullFunc_iiii:st,nullFunc_jiji:ut,nullFunc_vii:lt,___lock:Ve,___setErrNo:nt,___syscall140:Ge,___syscall146:Je,___syscall54:Ke,___syscall6:Ze,___unlock:$e,_emscripten_get_heap_size:et,_emscripten_memcpy_big:tt,_emscripten_resize_heap:ot,abortOnCannotGrowMemory:rt,emscripten_realloc_buffer:it,flush_NO_FILESYSTEM:qe,tempDoublePtr:G,DYNAMICTOP_PTR:x},Z=n.asm(J,K,R),$=Z.___errno_location;Z.___errno_location=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),$.apply(null,arguments)};var ee=Z._fflush;Z._fflush=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ee.apply(null,arguments)};var te=Z._free;Z._free=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),te.apply(null,arguments)};var ne=Z._freePointer;Z._freePointer=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ne.apply(null,arguments)};var re=Z._llvm_bswap_i32;Z._llvm_bswap_i32=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),re.apply(null,arguments)};var ie=Z._malloc;Z._malloc=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ie.apply(null,arguments)};var oe=Z._sbrk;Z._sbrk=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),oe.apply(null,arguments)};var ae=Z._unzip;Z._unzip=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ae.apply(null,arguments)};var se=Z.establishStackSpace;Z.establishStackSpace=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),se.apply(null,arguments)};var ue=Z.stackAlloc;Z.stackAlloc=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ue.apply(null,arguments)};var le=Z.stackRestore;Z.stackRestore=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),le.apply(null,arguments)};var ce=Z.stackSave;Z.stackSave=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ce.apply(null,arguments)},n.asm=Z,n.___errno_location=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm.___errno_location.apply(null,arguments)},n._emscripten_replace_memory=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm._emscripten_replace_memory.apply(null,arguments)},n._fflush=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm._fflush.apply(null,arguments)},n._free=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm._free.apply(null,arguments)},n._freePointer=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm._freePointer.apply(null,arguments)},n._llvm_bswap_i32=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm._llvm_bswap_i32.apply(null,arguments)},n._malloc=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm._malloc.apply(null,arguments)},n._memcpy=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm._memcpy.apply(null,arguments)},n._memset=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm._memset.apply(null,arguments)},n._sbrk=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm._sbrk.apply(null,arguments)},n._unzip=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm._unzip.apply(null,arguments)},n.establishStackSpace=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm.establishStackSpace.apply(null,arguments)};var de=n.stackAlloc=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm.stackAlloc.apply(null,arguments)},fe=n.stackRestore=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm.stackRestore.apply(null,arguments)},Ee=n.stackSave=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm.stackSave.apply(null,arguments)};n.dynCall_ii=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm.dynCall_ii.apply(null,arguments)},n.dynCall_iiii=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm.dynCall_iiii.apply(null,arguments)},n.dynCall_jiji=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm.dynCall_jiji.apply(null,arguments)},n.dynCall_vii=function(){return he(H,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),he(!C,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n.asm.dynCall_vii.apply(null,arguments)},n.asm=Z,n.intArrayFromString||(n.intArrayFromString=function(){ft("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.intArrayToString||(n.intArrayToString=function(){ft("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.ccall=me,n.cwrap=Re,n.setValue||(n.setValue=function(){ft("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.getValue=_e,n.allocate||(n.allocate=function(){ft("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.getMemory||(n.getMemory=function(){ft("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),n.AsciiToString||(n.AsciiToString=function(){ft("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.stringToAscii||(n.stringToAscii=function(){ft("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.UTF8ArrayToString||(n.UTF8ArrayToString=function(){ft("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.UTF8ToString||(n.UTF8ToString=function(){ft("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.stringToUTF8Array||(n.stringToUTF8Array=function(){ft("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.stringToUTF8||(n.stringToUTF8=function(){ft("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.lengthBytesUTF8||(n.lengthBytesUTF8=function(){ft("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.UTF16ToString||(n.UTF16ToString=function(){ft("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.stringToUTF16||(n.stringToUTF16=function(){ft("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.lengthBytesUTF16||(n.lengthBytesUTF16=function(){ft("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.UTF32ToString||(n.UTF32ToString=function(){ft("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.stringToUTF32||(n.stringToUTF32=function(){ft("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.lengthBytesUTF32||(n.lengthBytesUTF32=function(){ft("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.allocateUTF8||(n.allocateUTF8=function(){ft("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.stackTrace||(n.stackTrace=function(){ft("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.addOnPreRun||(n.addOnPreRun=function(){ft("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.addOnInit||(n.addOnInit=function(){ft("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.addOnPreMain||(n.addOnPreMain=function(){ft("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.addOnExit||(n.addOnExit=function(){ft("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.addOnPostRun||(n.addOnPostRun=function(){ft("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.writeStringToMemory||(n.writeStringToMemory=function(){ft("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.writeArrayToMemory||(n.writeArrayToMemory=function(){ft("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.writeAsciiToMemory||(n.writeAsciiToMemory=function(){ft("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.addRunDependency||(n.addRunDependency=function(){ft("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),n.removeRunDependency||(n.removeRunDependency=function(){ft("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),n.ENV||(n.ENV=function(){ft("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.FS||(n.FS=function(){ft("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.FS_createFolder||(n.FS_createFolder=function(){ft("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),n.FS_createPath||(n.FS_createPath=function(){ft("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),n.FS_createDataFile||(n.FS_createDataFile=function(){ft("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),n.FS_createPreloadedFile||(n.FS_createPreloadedFile=function(){ft("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),n.FS_createLazyFile||(n.FS_createLazyFile=function(){ft("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),n.FS_createLink||(n.FS_createLink=function(){ft("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),n.FS_createDevice||(n.FS_createDevice=function(){ft("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),n.FS_unlink||(n.FS_unlink=function(){ft("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),n.GL||(n.GL=function(){ft("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.dynamicAlloc||(n.dynamicAlloc=function(){ft("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.warnOnce||(n.warnOnce=function(){ft("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.loadDynamicLibrary||(n.loadDynamicLibrary=function(){ft("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.loadWebAssemblyModule||(n.loadWebAssemblyModule=function(){ft("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.getLEB||(n.getLEB=function(){ft("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.getFunctionTables||(n.getFunctionTables=function(){ft("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.alignFunctionTables||(n.alignFunctionTables=function(){ft("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.registerFunctions||(n.registerFunctions=function(){ft("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.addFunction||(n.addFunction=function(){ft("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.removeFunction||(n.removeFunction=function(){ft("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.getFuncWrapper||(n.getFuncWrapper=function(){ft("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.prettyPrint||(n.prettyPrint=function(){ft("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.makeBigInt||(n.makeBigInt=function(){ft("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.dynCall||(n.dynCall=function(){ft("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.getCompilerSetting||(n.getCompilerSetting=function(){ft("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.stackSave||(n.stackSave=function(){ft("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.stackRestore||(n.stackRestore=function(){ft("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.stackAlloc||(n.stackAlloc=function(){ft("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.establishStackSpace||(n.establishStackSpace=function(){ft("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.print||(n.print=function(){ft("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.printErr||(n.printErr=function(){ft("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.getTempRet0||(n.getTempRet0=function(){ft("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.setTempRet0||(n.setTempRet0=function(){ft("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.Pointer_stringify||(n.Pointer_stringify=function(){ft("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),n.ALLOC_NORMAL||Object.defineProperty(n,"ALLOC_NORMAL",{get:function(){ft("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),n.ALLOC_STACK||Object.defineProperty(n,"ALLOC_STACK",{get:function(){ft("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),n.ALLOC_DYNAMIC||Object.defineProperty(n,"ALLOC_DYNAMIC",{get:function(){ft("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),n.ALLOC_NONE||Object.defineProperty(n,"ALLOC_NONE",{get:function(){ft("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),ct.prototype=new Error,ct.prototype.constructor=ct,Y=function e(){n.calledRun||dt(),n.calledRun||(Y=e)},n.run=dt;var Te=[];if(n.abort=ft,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();n.noExitRuntime=!0,dt()}else n=null;var pe=n;e.unzip=pe})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/upsampleQuantizedTerrainMesh.js b/SuperMap iEarth/public/SuperMap3D/Workers/upsampleQuantizedTerrainMesh.js index 011d6ebf..1908239b 100644 --- a/SuperMap iEarth/public/SuperMap3D/Workers/upsampleQuantizedTerrainMesh.js +++ b/SuperMap iEarth/public/SuperMap3D/Workers/upsampleQuantizedTerrainMesh.js @@ -1 +1 @@ -define(["./AttributeCompression-b5a80a71","./buildModuleUrl-9eef8841","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./when-92c6cf3c","./TerrainEncoding-fd44afa8","./IndexDatatype-86677ec4","./Check-52a7d806","./Math-ecf82623","./OrientedBoundingBox-d2eb0b92","./createTaskProcessorWorker","./FeatureDetection-cec0163f","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./EllipsoidTangentPlane-d6b88a1f","./IntersectionTests-6e80d61c","./Plane-33393da8","./GeometryAttribute-f47bd1cb","./PolygonPipeline-425528b3","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,i,n,r,s,h,u,o,p,a,d,f,l,c,g,m,w,x,v,y,b,B,I){"use strict";var A={clipTriangleAtAxisAlignedThreshold:function(e,t,i,n,r,h){if(!s.e(e))throw new o.t("threshold is required.");if(!s.e(t))throw new o.t("keepAbove is required.");if(!s.e(i))throw new o.t("u0 is required.");if(!s.e(n))throw new o.t("u1 is required.");if(!s.e(r))throw new o.t("u2 is required.");var u,p,a;s.e(h)?h.length=0:h=[],t?(u=i<e,p=n<e,a=r<e):(u=i>e,p=n>e,a=r>e);var d,f,l,c,g,m,w=u+p+a;return 1===w?u?(d=(e-i)/(n-i),f=(e-i)/(r-i),h.push(1),h.push(2),1!==f&&(h.push(-1),h.push(0),h.push(2),h.push(f)),1!==d&&(h.push(-1),h.push(0),h.push(1),h.push(d))):p?(l=(e-n)/(r-n),c=(e-n)/(i-n),h.push(2),h.push(0),1!==c&&(h.push(-1),h.push(1),h.push(0),h.push(c)),1!==l&&(h.push(-1),h.push(1),h.push(2),h.push(l))):a&&(g=(e-r)/(i-r),m=(e-r)/(n-r),h.push(0),h.push(1),1!==m&&(h.push(-1),h.push(2),h.push(1),h.push(m)),1!==g&&(h.push(-1),h.push(2),h.push(0),h.push(g))):2===w?u||i===e?p||n===e?!a&&r!==e&&(f=(e-i)/(r-i),l=(e-n)/(r-n),h.push(2),h.push(-1),h.push(0),h.push(2),h.push(f),h.push(-1),h.push(1),h.push(2),h.push(l)):(m=(e-r)/(n-r),d=(e-i)/(n-i),h.push(1),h.push(-1),h.push(2),h.push(1),h.push(m),h.push(-1),h.push(0),h.push(1),h.push(d)):(c=(e-n)/(i-n),g=(e-r)/(i-r),h.push(0),h.push(-1),h.push(1),h.push(0),h.push(c),h.push(-1),h.push(2),h.push(0),h.push(g)):3!==w&&(h.push(0),h.push(1),h.push(2)),h},computeBarycentricCoordinates:function(e,t,i,r,h,u,p,a,d){if(!s.e(e))throw new o.t("x is required.");if(!s.e(t))throw new o.t("y is required.");if(!s.e(i))throw new o.t("x1 is required.");if(!s.e(r))throw new o.t("y1 is required.");if(!s.e(h))throw new o.t("x2 is required.");if(!s.e(u))throw new o.t("y2 is required.");if(!s.e(p))throw new o.t("x3 is required.");if(!s.e(a))throw new o.t("y3 is required.");var f=i-p,l=p-h,c=u-a,g=r-a,m=1/(c*f+l*g),w=t-a,x=e-p,v=(c*x+l*w)*m,y=(-g*x+f*w)*m,b=1-v-y;return s.e(d)?(d.x=v,d.y=y,d.z=b,d):new n.o(v,y,b)},computeLineSegmentLineSegmentIntersection:function(e,t,n,r,h,u,p,a,d){o.o.typeOf.number("x00",e),o.o.typeOf.number("y00",t),o.o.typeOf.number("x01",n),o.o.typeOf.number("y01",r),o.o.typeOf.number("x10",h),o.o.typeOf.number("y10",u),o.o.typeOf.number("x11",p),o.o.typeOf.number("y11",a);var f=(a-u)*(n-e)-(p-h)*(r-t);if(0!==f){var l=((p-h)*(t-u)-(a-u)*(e-h))/f,c=((n-e)*(t-u)-(r-t)*(e-h))/f;if(l>=0&&l<=1&&c>=0&&c<=1)return s.e(d)||(d=new i.o),d.x=e+l*(n-e),d.y=t+l*(r-t),d}}},C=32767,H=16383,T=[],z=[],N=[],O=new r.a,V=new n.o,q=[],E=[],M=[],R=[],U=[],P=new n.o,F=new t.i,k=new a.y,D=new i.o,L=new n.o;function S(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}S.prototype.clone=function(e){return s.e(e)||(e=new S),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.normalBuffer=this.normalBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},S.prototype.initializeIndexed=function(e,t,i,n,r){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=i,this.normalBuffer=n,this.index=r,this.first=void 0,this.second=void 0,this.ratio=void 0},S.prototype.initializeFromClipResult=function(e,t,i){var n=t+1;return-1!==e[t]?i[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=i[e[n]],++n,this.second=i[e[n]],++n,this.ratio=e[n],++n),n},S.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},S.prototype.isIndexed=function(){return s.e(this.index)},S.prototype.getH=function(e,t){if(s.e(this.index))return this.heightBuffer[this.index];var i=this.first.getH(e,t),n=this.second.getH(e,t);return 0===t+i/C*e||0===t+n/C*e?0:p.e.lerp(this.first.getH(),this.second.getH(),this.ratio)},S.prototype.getU=function(){return s.e(this.index)?this.uBuffer[this.index]:p.e.lerp(this.first.getU(),this.second.getU(),this.ratio)},S.prototype.getV=function(){return s.e(this.index)?this.vBuffer[this.index]:p.e.lerp(this.first.getV(),this.second.getV(),this.ratio)};var X=new i.o,W=-1,K=[new n.o,new n.o],Y=[new n.o,new n.o];function _(t,i){++W;var r=K[W],s=Y[W];return r=e.t.octDecode(t.first.getNormalX(),t.first.getNormalY(),r),s=e.t.octDecode(t.second.getNormalX(),t.second.getNormalY(),s),V=n.o.lerp(r,s,t.ratio,V),n.o.normalize(V,V),e.t.octEncode(V,i),--W,i}S.prototype.getNormalX=function(){return s.e(this.index)?this.normalBuffer[2*this.index]:(X=_(this,X)).x},S.prototype.getNormalY=function(){return s.e(this.index)?this.normalBuffer[2*this.index+1]:(X=_(this,X)).y};var G=[];function J(e,t,i,n,r,h,u,o,p,a,d){if(0!==u.length){for(var f=0,l=0;l<u.length;)l=G[f++].initializeFromClipResult(u,l,o);for(var c=0;c<f;++c){var g=G[c];if(g.isIndexed())g.newIndex=h[g.index],g.uBuffer=e,g.vBuffer=t,g.heightBuffer=i,p&&(g.normalBuffer=n);else{var m=g.getKey();if(s.e(h[m]))g.newIndex=h[m];else{var w=e.length;e.push(g.getU()),t.push(g.getV()),i.push(g.getH(a,d)),p&&(n.push(g.getNormalX()),n.push(g.getNormalY())),g.newIndex=w,h[m]=w}}}3===f?(r.push(G[0].newIndex),r.push(G[1].newIndex),r.push(G[2].newIndex)):4===f&&(r.push(G[0].newIndex),r.push(G[1].newIndex),r.push(G[2].newIndex),r.push(G[0].newIndex),r.push(G[2].newIndex),r.push(G[3].newIndex))}}return G.push(new S),G.push(new S),G.push(new S),G.push(new S),d((function(e,r){var o=e.isEastChild,d=e.isNorthChild,f=o?H:0,l=o?C:H,c=d?H:0,g=d?C:H,m=q,w=E,x=M,v=U;m.length=0,w.length=0,x.length=0,v.length=0;var y=R;y.length=0;var b={},B=e.vertices,I=e.indices;I=I.subarray(0,e.indexCountWithoutSkirts);var X,W,K,Y,_,G=h.h.clone(e.encoding),Z=G.hasVertexNormals,j=e.exaggeration,Q=0,$=e.vertexCountWithoutSkirts,ee=e.minimumHeight,te=e.maximumHeight,ie=s.e(e.validMinimumHeight)?e.validMinimumHeight:e.minimumHeight,ne=s.e(e.validMaximumHeight)?e.validMaximumHeight:e.maximumHeight,re=new Array($),se=new Array($),he=new Array($),ue=Z?new Array(2*$):void 0;for(W=0,K=0;W<$;++W,K+=2){var oe=G.decodeTextureCoordinates(B,W,D);if(X=G.decodeHeight(B,W)/j,Y=p.e.clamp(oe.x*C|0,0,C),_=p.e.clamp(oe.y*C|0,0,C),he[W]=p.e.clamp((X-ee)/(te-ee)*C|0,0,C),Y<20&&(Y=0),_<20&&(_=0),C-Y<20&&(Y=C),C-_<20&&(_=C),re[W]=Y,se[W]=_,Z){var pe=G.getOctEncodedNormal(B,W,L);ue[K]=pe.x,ue[K+1]=pe.y}(o&&Y>=H||!o&&Y<=H)&&(d&&_>=H||!d&&_<=H)&&(b[W]=Q,m.push(Y),w.push(_),x.push(he[W]),Z&&(v.push(ue[K]),v.push(ue[K+1])),++Q)}var ae=[];ae.push(new S),ae.push(new S),ae.push(new S);var de,fe=[];for(fe.push(new S),fe.push(new S),fe.push(new S),W=0;W<I.length;W+=3){var le=I[W],ce=I[W+1],ge=I[W+2],me=re[le],we=re[ce],xe=re[ge];ae[0].initializeIndexed(re,se,he,ue,le),ae[1].initializeIndexed(re,se,he,ue,ce),ae[2].initializeIndexed(re,se,he,ue,ge);var ve=A.clipTriangleAtAxisAlignedThreshold(H,o,me,we,xe,T);(de=0)>=ve.length||((de=fe[0].initializeFromClipResult(ve,de,ae))>=ve.length||(de=fe[1].initializeFromClipResult(ve,de,ae))>=ve.length||(de=fe[2].initializeFromClipResult(ve,de,ae),J(m,w,x,v,y,b,A.clipTriangleAtAxisAlignedThreshold(H,d,fe[0].getV(),fe[1].getV(),fe[2].getV(),z),fe,Z,te,ee),de<ve.length&&(fe[2].clone(fe[1]),fe[2].initializeFromClipResult(ve,de,ae),J(m,w,x,v,y,b,A.clipTriangleAtAxisAlignedThreshold(H,d,fe[0].getV(),fe[1].getV(),fe[2].getV(),z),fe,Z,te,ee))))}var ye=o?-32767:0,be=d?-32767:0,Be=[],Ie=[],Ae=[],Ce=[],He=Number.MAX_VALUE,Te=-He,ze=Number.MAX_VALUE,Ne=-He,Oe=N;Oe.length=0;var Ve=i.t.clone(e.ellipsoid),qe=i.h.clone(e.childRectangle),Ee=qe.north,Me=qe.south,Re=qe.east,Ue=qe.west;for(Re<Ue&&(Re+=p.e.TWO_PI),W=0;W<m.length;++W){(Y=Math.round(m[W]))<=f?(Be.push(W),Y=0):Y>=l?(Ae.push(W),Y=C):Y=2*Y+ye,m[W]=Y,(_=Math.round(w[W]))<=c?(Ie.push(W),_=0):_>=g?(Ce.push(W),_=C):_=2*_+be,w[W]=_,(X=p.e.lerp(ee,te,x[W]/C))<He&&(He=X),X>Te&&(Te=X);var Pe=X;(Pe=p.e.clamp(Pe,ie,ne))<ze&&(ze=Pe),Pe>Ne&&(Ne=Pe),x[W]=X,O.longitude=p.e.lerp(Ue,Re,Y/C),O.latitude=p.e.lerp(Me,Ee,_/C),O.height=X,Ve.cartographicToCartesian(O,V),Oe.push(V.x),Oe.push(V.y),Oe.push(V.z)}var Fe=t.i.fromVertices(Oe,n.o.ZERO,3,F),ke=a.y.fromRectangle(qe,He,Te,Ve,k),De=a.y.fromRectangle(qe,ze,Ne,Ve,k),Le=new h.s(Ve).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(Fe.center,Oe,3,Fe.center,He,P),Se=Te-He,Xe=new Uint16Array(m.length+w.length+x.length);for(W=0;W<m.length;++W)Xe[W]=m[W];var We=m.length;for(W=0;W<w.length;++W)Xe[We+W]=w[W];for(We+=w.length,W=0;W<x.length;++W)Xe[We+W]=C*(x[W]-He)/Se;var Ke,Ye=u.IndexDatatype.createTypedArray(m.length,y);if(Z){var _e=new Uint8Array(v);r.push(Xe.buffer,Ye.buffer,_e.buffer),Ke=_e.buffer}else r.push(Xe.buffer,Ye.buffer);return{vertices:Xe.buffer,encodedNormals:Ke,indices:Ye.buffer,minimumHeight:He,maximumHeight:Te,westIndices:Be,southIndices:Ie,eastIndices:Ae,northIndices:Ce,boundingSphere:Fe,orientedBoundingBox:ke,horizonOcclusionPoint:Le,validMinimumHeight:ze,validMaximumHeight:Ne,validOrientedBoundingBox:De}}))})); +define(["./AttributeCompression-b5a80a71","./buildModuleUrl-cbcc8c56","./Cartesian2-b72655a5","./Cartesian3-3a8bdb0b","./Cartographic-a2c313d7","./when-92c6cf3c","./TerrainEncoding-231c7a61","./IndexDatatype-86677ec4","./Check-52a7d806","./Math-ecf82623","./OrientedBoundingBox-42d3d74a","./createTaskProcessorWorker","./FeatureDetection-fd297af4","./Cartesian4-72b88c9e","./RuntimeError-c6a62a80","./WebGLConstants-42651efd","./Event-3390cd7d","./ComponentDatatype-98414d16","./EllipsoidTangentPlane-c500945e","./IntersectionTests-9ff29c98","./Plane-a2c6da7b","./GeometryAttribute-65cf868d","./PolygonPipeline-c329dec3","./EllipsoidRhumbLine-b1a766ae"],(function(e,t,i,n,r,s,h,u,o,p,a,d,f,l,c,g,m,w,x,v,y,b,B,I){"use strict";var A={clipTriangleAtAxisAlignedThreshold:function(e,t,i,n,r,h){if(!s.e(e))throw new o.t("threshold is required.");if(!s.e(t))throw new o.t("keepAbove is required.");if(!s.e(i))throw new o.t("u0 is required.");if(!s.e(n))throw new o.t("u1 is required.");if(!s.e(r))throw new o.t("u2 is required.");var u,p,a;s.e(h)?h.length=0:h=[],t?(u=i<e,p=n<e,a=r<e):(u=i>e,p=n>e,a=r>e);var d,f,l,c,g,m,w=u+p+a;return 1===w?u?(d=(e-i)/(n-i),f=(e-i)/(r-i),h.push(1),h.push(2),1!==f&&(h.push(-1),h.push(0),h.push(2),h.push(f)),1!==d&&(h.push(-1),h.push(0),h.push(1),h.push(d))):p?(l=(e-n)/(r-n),c=(e-n)/(i-n),h.push(2),h.push(0),1!==c&&(h.push(-1),h.push(1),h.push(0),h.push(c)),1!==l&&(h.push(-1),h.push(1),h.push(2),h.push(l))):a&&(g=(e-r)/(i-r),m=(e-r)/(n-r),h.push(0),h.push(1),1!==m&&(h.push(-1),h.push(2),h.push(1),h.push(m)),1!==g&&(h.push(-1),h.push(2),h.push(0),h.push(g))):2===w?u||i===e?p||n===e?!a&&r!==e&&(f=(e-i)/(r-i),l=(e-n)/(r-n),h.push(2),h.push(-1),h.push(0),h.push(2),h.push(f),h.push(-1),h.push(1),h.push(2),h.push(l)):(m=(e-r)/(n-r),d=(e-i)/(n-i),h.push(1),h.push(-1),h.push(2),h.push(1),h.push(m),h.push(-1),h.push(0),h.push(1),h.push(d)):(c=(e-n)/(i-n),g=(e-r)/(i-r),h.push(0),h.push(-1),h.push(1),h.push(0),h.push(c),h.push(-1),h.push(2),h.push(0),h.push(g)):3!==w&&(h.push(0),h.push(1),h.push(2)),h},computeBarycentricCoordinates:function(e,t,i,r,h,u,p,a,d){if(!s.e(e))throw new o.t("x is required.");if(!s.e(t))throw new o.t("y is required.");if(!s.e(i))throw new o.t("x1 is required.");if(!s.e(r))throw new o.t("y1 is required.");if(!s.e(h))throw new o.t("x2 is required.");if(!s.e(u))throw new o.t("y2 is required.");if(!s.e(p))throw new o.t("x3 is required.");if(!s.e(a))throw new o.t("y3 is required.");var f=i-p,l=p-h,c=u-a,g=r-a,m=1/(c*f+l*g),w=t-a,x=e-p,v=(c*x+l*w)*m,y=(-g*x+f*w)*m,b=1-v-y;return s.e(d)?(d.x=v,d.y=y,d.z=b,d):new n.o(v,y,b)},computeLineSegmentLineSegmentIntersection:function(e,t,n,r,h,u,p,a,d){o.o.typeOf.number("x00",e),o.o.typeOf.number("y00",t),o.o.typeOf.number("x01",n),o.o.typeOf.number("y01",r),o.o.typeOf.number("x10",h),o.o.typeOf.number("y10",u),o.o.typeOf.number("x11",p),o.o.typeOf.number("y11",a);var f=(a-u)*(n-e)-(p-h)*(r-t);if(0!==f){var l=((p-h)*(t-u)-(a-u)*(e-h))/f,c=((n-e)*(t-u)-(r-t)*(e-h))/f;if(l>=0&&l<=1&&c>=0&&c<=1)return s.e(d)||(d=new i.o),d.x=e+l*(n-e),d.y=t+l*(r-t),d}}},C=32767,H=16383,T=[],z=[],N=[],O=new r.a,V=new n.o,q=[],E=[],M=[],R=[],U=[],P=new n.o,F=new t.i,k=new a.y,D=new i.o,L=new n.o;function S(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}S.prototype.clone=function(e){return s.e(e)||(e=new S),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.normalBuffer=this.normalBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},S.prototype.initializeIndexed=function(e,t,i,n,r){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=i,this.normalBuffer=n,this.index=r,this.first=void 0,this.second=void 0,this.ratio=void 0},S.prototype.initializeFromClipResult=function(e,t,i){var n=t+1;return-1!==e[t]?i[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=i[e[n]],++n,this.second=i[e[n]],++n,this.ratio=e[n],++n),n},S.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},S.prototype.isIndexed=function(){return s.e(this.index)},S.prototype.getH=function(e,t){if(s.e(this.index))return this.heightBuffer[this.index];var i=this.first.getH(e,t),n=this.second.getH(e,t);return 0===t+i/C*e||0===t+n/C*e?0:p.e.lerp(this.first.getH(),this.second.getH(),this.ratio)},S.prototype.getU=function(){return s.e(this.index)?this.uBuffer[this.index]:p.e.lerp(this.first.getU(),this.second.getU(),this.ratio)},S.prototype.getV=function(){return s.e(this.index)?this.vBuffer[this.index]:p.e.lerp(this.first.getV(),this.second.getV(),this.ratio)};var X=new i.o,W=-1,K=[new n.o,new n.o],Y=[new n.o,new n.o];function _(t,i){++W;var r=K[W],s=Y[W];return r=e.t.octDecode(t.first.getNormalX(),t.first.getNormalY(),r),s=e.t.octDecode(t.second.getNormalX(),t.second.getNormalY(),s),V=n.o.lerp(r,s,t.ratio,V),n.o.normalize(V,V),e.t.octEncode(V,i),--W,i}S.prototype.getNormalX=function(){return s.e(this.index)?this.normalBuffer[2*this.index]:(X=_(this,X)).x},S.prototype.getNormalY=function(){return s.e(this.index)?this.normalBuffer[2*this.index+1]:(X=_(this,X)).y};var G=[];function J(e,t,i,n,r,h,u,o,p,a,d){if(0!==u.length){for(var f=0,l=0;l<u.length;)l=G[f++].initializeFromClipResult(u,l,o);for(var c=0;c<f;++c){var g=G[c];if(g.isIndexed())g.newIndex=h[g.index],g.uBuffer=e,g.vBuffer=t,g.heightBuffer=i,p&&(g.normalBuffer=n);else{var m=g.getKey();if(s.e(h[m]))g.newIndex=h[m];else{var w=e.length;e.push(g.getU()),t.push(g.getV()),i.push(g.getH(a,d)),p&&(n.push(g.getNormalX()),n.push(g.getNormalY())),g.newIndex=w,h[m]=w}}}3===f?(r.push(G[0].newIndex),r.push(G[1].newIndex),r.push(G[2].newIndex)):4===f&&(r.push(G[0].newIndex),r.push(G[1].newIndex),r.push(G[2].newIndex),r.push(G[0].newIndex),r.push(G[2].newIndex),r.push(G[3].newIndex))}}return G.push(new S),G.push(new S),G.push(new S),G.push(new S),d((function(e,r){var o=e.isEastChild,d=e.isNorthChild,f=o?H:0,l=o?C:H,c=d?H:0,g=d?C:H,m=q,w=E,x=M,v=U;m.length=0,w.length=0,x.length=0,v.length=0;var y=R;y.length=0;var b={},B=e.vertices,I=e.indices;I=I.subarray(0,e.indexCountWithoutSkirts);var X,W,K,Y,_,G=h.h.clone(e.encoding),Z=G.hasVertexNormals,j=e.exaggeration,Q=0,$=e.vertexCountWithoutSkirts,ee=e.minimumHeight,te=e.maximumHeight,ie=s.e(e.validMinimumHeight)?e.validMinimumHeight:e.minimumHeight,ne=s.e(e.validMaximumHeight)?e.validMaximumHeight:e.maximumHeight,re=new Array($),se=new Array($),he=new Array($),ue=Z?new Array(2*$):void 0;for(W=0,K=0;W<$;++W,K+=2){var oe=G.decodeTextureCoordinates(B,W,D);if(X=G.decodeHeight(B,W)/j,Y=p.e.clamp(oe.x*C|0,0,C),_=p.e.clamp(oe.y*C|0,0,C),he[W]=p.e.clamp((X-ee)/(te-ee)*C|0,0,C),Y<20&&(Y=0),_<20&&(_=0),C-Y<20&&(Y=C),C-_<20&&(_=C),re[W]=Y,se[W]=_,Z){var pe=G.getOctEncodedNormal(B,W,L);ue[K]=pe.x,ue[K+1]=pe.y}(o&&Y>=H||!o&&Y<=H)&&(d&&_>=H||!d&&_<=H)&&(b[W]=Q,m.push(Y),w.push(_),x.push(he[W]),Z&&(v.push(ue[K]),v.push(ue[K+1])),++Q)}var ae=[];ae.push(new S),ae.push(new S),ae.push(new S);var de,fe=[];for(fe.push(new S),fe.push(new S),fe.push(new S),W=0;W<I.length;W+=3){var le=I[W],ce=I[W+1],ge=I[W+2],me=re[le],we=re[ce],xe=re[ge];ae[0].initializeIndexed(re,se,he,ue,le),ae[1].initializeIndexed(re,se,he,ue,ce),ae[2].initializeIndexed(re,se,he,ue,ge);var ve=A.clipTriangleAtAxisAlignedThreshold(H,o,me,we,xe,T);(de=0)>=ve.length||((de=fe[0].initializeFromClipResult(ve,de,ae))>=ve.length||(de=fe[1].initializeFromClipResult(ve,de,ae))>=ve.length||(de=fe[2].initializeFromClipResult(ve,de,ae),J(m,w,x,v,y,b,A.clipTriangleAtAxisAlignedThreshold(H,d,fe[0].getV(),fe[1].getV(),fe[2].getV(),z),fe,Z,te,ee),de<ve.length&&(fe[2].clone(fe[1]),fe[2].initializeFromClipResult(ve,de,ae),J(m,w,x,v,y,b,A.clipTriangleAtAxisAlignedThreshold(H,d,fe[0].getV(),fe[1].getV(),fe[2].getV(),z),fe,Z,te,ee))))}var ye=o?-32767:0,be=d?-32767:0,Be=[],Ie=[],Ae=[],Ce=[],He=Number.MAX_VALUE,Te=-He,ze=Number.MAX_VALUE,Ne=-He,Oe=N;Oe.length=0;var Ve=i.t.clone(e.ellipsoid),qe=i.h.clone(e.childRectangle),Ee=qe.north,Me=qe.south,Re=qe.east,Ue=qe.west;for(Re<Ue&&(Re+=p.e.TWO_PI),W=0;W<m.length;++W){(Y=Math.round(m[W]))<=f?(Be.push(W),Y=0):Y>=l?(Ae.push(W),Y=C):Y=2*Y+ye,m[W]=Y,(_=Math.round(w[W]))<=c?(Ie.push(W),_=0):_>=g?(Ce.push(W),_=C):_=2*_+be,w[W]=_,(X=p.e.lerp(ee,te,x[W]/C))<He&&(He=X),X>Te&&(Te=X);var Pe=X;(Pe=p.e.clamp(Pe,ie,ne))<ze&&(ze=Pe),Pe>Ne&&(Ne=Pe),x[W]=X,O.longitude=p.e.lerp(Ue,Re,Y/C),O.latitude=p.e.lerp(Me,Ee,_/C),O.height=X,Ve.cartographicToCartesian(O,V),Oe.push(V.x),Oe.push(V.y),Oe.push(V.z)}var Fe=t.i.fromVertices(Oe,n.o.ZERO,3,F),ke=a.y.fromRectangle(qe,He,Te,Ve,k),De=a.y.fromRectangle(qe,ze,Ne,Ve,k),Le=new h.s(Ve).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(Fe.center,Oe,3,Fe.center,He,P),Se=Te-He,Xe=new Uint16Array(m.length+w.length+x.length);for(W=0;W<m.length;++W)Xe[W]=m[W];var We=m.length;for(W=0;W<w.length;++W)Xe[We+W]=w[W];for(We+=w.length,W=0;W<x.length;++W)Xe[We+W]=C*(x[W]-He)/Se;var Ke,Ye=u.IndexDatatype.createTypedArray(m.length,y);if(Z){var _e=new Uint8Array(v);r.push(Xe.buffer,Ye.buffer,_e.buffer),Ke=_e.buffer}else r.push(Xe.buffer,Ye.buffer);return{vertices:Xe.buffer,encodedNormals:Ke,indices:Ye.buffer,minimumHeight:He,maximumHeight:Te,westIndices:Be,southIndices:Ie,eastIndices:Ae,northIndices:Ce,boundingSphere:Fe,orientedBoundingBox:ke,horizonOcclusionPoint:Le,validMinimumHeight:ze,validMaximumHeight:Ne,validOrientedBoundingBox:De}}))})); diff --git a/SuperMap iEarth/public/SuperMap3D/Workers/workerBootstrapper.js b/SuperMap iEarth/public/SuperMap3D/Workers/workerBootstrapper.js new file mode 100644 index 00000000..bcd17e43 --- /dev/null +++ b/SuperMap iEarth/public/SuperMap3D/Workers/workerBootstrapper.js @@ -0,0 +1,5 @@ +function setTimeout(e){e()} +/** vim: et:ts=4:sw=4:sts=4 + * @license RequireJS 2.1.20 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + */var requirejs,require,define;"undefined"==typeof self&&(self={}),self.onmessage=function(e){var t=e.data;require(t.loaderConfig,[t.workerModule],(function(e){self.onmessage=e,BASE_URL=t.loaderConfig.baseUrl}))},function(global){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.20",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var i;if(e)for(i=0;i<e.length&&(!e[i]||!t(e[i],i,e));i+=1);}function eachReverse(e,t){var i;if(e)for(i=e.length-1;i>-1&&(!e[i]||!t(e[i],i,e));i-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,r){return t&&eachProp(t,(function(t,n){!i&&hasProp(e,n)||(!r||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[n]=t:(e[n]||(e[n]={}),mixin(e[n],t,i,r)))})),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),(function(e){t=t[e]})),t}function makeError(e,t,i,r){var n=new Error(t+"\n"+e);return n.requireType=e,n.requireModules=r,i&&(n.originalError=i),n}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,r){var n,o,a=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=i,i=r):e=[]),o&&o.context&&(a=o.context),(n=getOwn(contexts,a))||(n=contexts[a]=req.s.newContext(a)),o&&n.configure(o),n.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],(function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}})),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var r=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return r.type=e.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r},req.load=function(e,t,i){var r,n=e&&e.config||{};if(isBrowser)return r=req.createNode(n,t,i),n.onNodeCreated&&n.onNodeCreated(r,n,t,i),r.setAttribute("data-requirecontext",e.contextName),r.setAttribute("data-requiremodule",t),!r.attachEvent||r.attachEvent.toString&&r.attachEvent.toString().indexOf("[native code")<0||isOpera?(r.addEventListener("load",e.onScriptLoad,!1),r.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,r.attachEvent("onreadystatechange",e.onScriptLoad)),r.src=i,currentlyAddingScript=r,baseElement?head.insertBefore(r,baseElement):head.appendChild(r),currentlyAddingScript=null,r;if(isWebWorker)try{importScripts(i),e.completeLoad(t)}catch(r){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+i,r,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),(function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0})),define=function(e,t,i){var r,n;"string"!=typeof e&&(i=t,t=e,e=null),isArray(t)||(i=t,t=null),!t&&isFunction(i)&&(t=[],i.length&&(i.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,(function(e,i){t.push(i)})),t=(1===i.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript())&&(e||(e=r.getAttribute("data-requiremodule")),n=contexts[r.getAttribute("data-requirecontext")]),n?(n.defQueue.push([e,t,i]),n.defQueueMap[e]=!0):globalDefQueue.push([e,t,i])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}function newContext(e){var t,i,r,n,o,a={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},s={},u={},c={},d=[],p={},f={},l={},h=1,m=1;function g(e,t,i){var r,n,o,s,u,c,d,p,f,l,h=t&&t.split("/"),m=a.map,g=m&&m["*"];if(e&&(c=(e=e.split("/")).length-1,a.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),function(e){var t,i;for(t=0;t<e.length;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),i&&m&&(h||g)){e:for(o=(n=e.split("/")).length;o>0;o-=1){if(u=n.slice(0,o).join("/"),h)for(s=h.length;s>0;s-=1)if((r=getOwn(m,h.slice(0,s).join("/")))&&(r=getOwn(r,u))){d=r,p=o;break e}!f&&g&&getOwn(g,u)&&(f=getOwn(g,u),l=o)}!d&&f&&(d=f,p=l),d&&(n.splice(0,p,d),e=n.join("/"))}return getOwn(a.pkgs,e)||e}function v(e){isBrowser&&each(scripts(),(function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===r.contextName)return t.parentNode.removeChild(t),!0}))}function x(e){var t=getOwn(a.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),r.require.undef(e),r.makeRequire(null,{skipMap:!0})([e]),!0}function b(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function q(e,t,i,n){var o,a,s,u,c=null,d=t?t.name:null,f=e,l=!0,v="";return e||(l=!1,e="_@r"+(h+=1)),c=(u=b(e))[0],e=u[1],c&&(c=g(c,d,n),a=getOwn(p,c)),e&&(c?v=a&&a.normalize?a.normalize(e,(function(e){return g(e,d,n)})):-1===e.indexOf("!")?g(e,d,n):e:(c=(u=b(v=g(e,d,n)))[0],v=u[1],i=!0,o=r.nameToUrl(v))),{prefix:c,name:v,parentMap:t,unnormalized:!!(s=!c||a||i?"":"_unnormalized"+(m+=1)),url:o,originalName:f,isDefine:l,id:(c?c+"!"+v:v)+s}}function E(e){var t=e.id,i=getOwn(s,t);return i||(i=s[t]=new r.Module(e)),i}function w(e,t,i){var r=e.id,n=getOwn(s,r);!hasProp(p,r)||n&&!n.defineEmitComplete?(n=E(e)).error&&"error"===t?i(n.error):n.on(t,i):"defined"===t&&i(p[r])}function y(e,t){var i=e.requireModules,r=!1;t?t(e):(each(i,(function(t){var i=getOwn(s,t);i&&(i.error=e,i.events.error&&(r=!0,i.emit("error",e)))})),r||req.onError(e))}function k(){globalDefQueue.length&&(each(globalDefQueue,(function(e){var t=e[0];"string"==typeof t&&(r.defQueueMap[t]=!0),d.push(e)})),globalDefQueue=[])}function S(e){delete s[e],delete u[e]}function M(e,t,i){var r=e.map.id;e.error?e.emit("error",e.error):(t[r]=!0,each(e.depMaps,(function(r,n){var o=r.id,a=getOwn(s,o);!a||e.depMatched[n]||i[o]||(getOwn(t,o)?(e.defineDep(n,p[o]),e.check()):M(a,t,i))})),i[r]=!0)}function O(){var e,i,n=1e3*a.waitSeconds,s=n&&r.startTime+n<(new Date).getTime(),c=[],d=[],p=!1,f=!0;if(!t){if(t=!0,eachProp(u,(function(e){var t=e.map,r=t.id;if(e.enabled&&(t.isDefine||d.push(e),!e.error))if(!e.inited&&s)x(r)?(i=!0,p=!0):(c.push(r),v(r));else if(!e.inited&&e.fetched&&t.isDefine&&(p=!0,!t.prefix))return f=!1})),s&&c.length)return(e=makeError("timeout","Load timeout for modules: "+c,null,c)).contextName=r.contextName,y(e);f&&each(d,(function(e){M(e,{},{})})),s&&!i||!p||!isBrowser&&!isWebWorker||o||(o=setTimeout((function(){o=0,O()}),50)),t=!1}}function j(e){hasProp(p,e[0])||E(q(e[0],null,!0)).init(e[1],e[2])}function P(e,t,i,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(i,t,!1)}function R(e){var t=e.currentTarget||e.srcElement;return P(t,r.onScriptLoad,"load","onreadystatechange"),P(t,r.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function A(){var e;for(k();d.length;){if(null===(e=d.shift())[0])return y(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));j(e)}r.defQueueMap={}}return n={require:function(e){return e.require?e.require:e.require=r.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?p[e.map.id]=e.exports:e.exports=p[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(a.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(i=function(e){this.events=getOwn(c,e.id)||{},this.map=e,this.shim=getOwn(a.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,i,r){r=r||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,(function(e){this.emit("error",e)}))),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,r.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();r.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,(function(){return e.prefix?this.callPlugin():this.load()})))}},load:function(){var e=this.map.url;f[e]||(f[e]=!0,r.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,i=this.map.id,n=this.depExports,o=this.exports,a=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(a)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{o=r.execCb(i,a,n,o)}catch(t){e=t}else o=r.execCb(i,a,n,o);if(this.map.isDefine&&void 0===o&&((t=this.module)?o=t.exports:this.usingExports&&(o=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",y(this.error=e)}else o=a;this.exports=o,this.map.isDefine&&!this.ignore&&(p[i]=o,req.onResourceLoad&&req.onResourceLoad(r,this.map,this.depMaps)),S(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(r.defQueueMap,i)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,i=q(e.prefix);this.depMaps.push(i),w(i,"defined",bind(this,(function(i){var n,o,u,c=getOwn(l,this.map.id),d=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,f=r.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(i.normalize&&(d=i.normalize(d,(function(e){return g(e,p,!0)}))||""),w(o=q(e.prefix+"!"+d,this.map.parentMap),"defined",bind(this,(function(e){this.init([],(function(){return e}),null,{enabled:!0,ignore:!0})}))),void((u=getOwn(s,o.id))&&(this.depMaps.push(o),this.events.error&&u.on("error",bind(this,(function(e){this.emit("error",e)}))),u.enable()))):c?(this.map.url=r.nameToUrl(c),void this.load()):((n=bind(this,(function(e){this.init([],(function(){return e}),null,{enabled:!0})}))).error=bind(this,(function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(s,(function(e){0===e.map.id.indexOf(t+"_unnormalized")&&S(e.map.id)})),y(e)})),n.fromText=bind(this,(function(i,o){var s=e.name,u=q(s),c=useInteractive;o&&(i=o),c&&(useInteractive=!1),E(u),hasProp(a.config,t)&&(a.config[s]=a.config[t]);try{req.exec(i)}catch(e){return y(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}c&&(useInteractive=!0),this.depMaps.push(u),r.completeLoad(s),f([s],n)})),void i.load(e.name,f,n,a))}))),r.enable(i,this),this.pluginMaps[i.id]=i},enable:function(){u[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,(function(e,t){var i,o,a;if("string"==typeof e){if(e=q(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,a=getOwn(n,e.id))return void(this.depExports[t]=a(this));this.depCount+=1,w(e,"defined",bind(this,(function(e){this.undefed||(this.defineDep(t,e),this.check())}))),this.errback?w(e,"error",bind(this,this.errback)):this.events.error&&w(e,"error",bind(this,(function(e){this.emit("error",e)})))}i=e.id,o=s[i],hasProp(n,i)||!o||o.enabled||r.enable(e,this)}))),eachProp(this.pluginMaps,bind(this,(function(e){var t=getOwn(s,e.id);t&&!t.enabled&&r.enable(e,this)}))),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],(function(e){e(t)})),"error"===e&&delete this.events[e]}},r={config:a,contextName:e,registry:s,defined:p,urlFetched:f,defQueue:d,defQueueMap:{},Module:i,makeModuleMap:q,nextTick:req.nextTick,onError:y,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");var t=a.shim,i={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,(function(e,t){i[t]?(a[t]||(a[t]={}),mixin(a[t],e,!0,!0)):a[t]=e})),e.bundles&&eachProp(e.bundles,(function(e,t){each(e,(function(e){e!==t&&(l[e]=t)}))})),e.shim&&(eachProp(e.shim,(function(e,i){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=r.makeShimExports(e)),t[i]=e})),a.shim=t),e.packages&&each(e.packages,(function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(a.paths[t]=e.location),a.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")})),eachProp(s,(function(e,t){e.inited||e.map.unnormalized||(e.map=q(t,null,!0))})),(e.deps||e.callback)&&r.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}},makeRequire:function(t,i){function o(a,u,c){var d,f;return i.enableBuildCallback&&u&&isFunction(u)&&(u.__requireJsBuild=!0),"string"==typeof a?isFunction(u)?y(makeError("requireargs","Invalid require call"),c):t&&hasProp(n,a)?n[a](s[t.id]):req.get?req.get(r,a,t,o):(d=q(a,t,!1,!0).id,hasProp(p,d)?p[d]:y(makeError("notloaded",'Module name "'+d+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(A(),r.nextTick((function(){A(),(f=E(q(null,t))).skipMap=i.skipMap,f.init(a,u,c,{enabled:!0}),O()})),o)}return i=i||{},mixin(o,{isBrowser:isBrowser,toUrl:function(e){var i,n=e.lastIndexOf("."),o=e.split("/")[0];return-1!==n&&(!("."===o||".."===o)||n>1)&&(i=e.substring(n,e.length),e=e.substring(0,n)),r.nameToUrl(g(e,t&&t.id,!0),i,!0)},defined:function(e){return hasProp(p,q(e,t,!1,!0).id)},specified:function(e){return e=q(e,t,!1,!0).id,hasProp(p,e)||hasProp(s,e)}}),t||(o.undef=function(e){k();var i=q(e,t,!0),n=getOwn(s,e);n.undefed=!0,v(e),delete p[e],delete f[i.url],delete c[e],eachReverse(d,(function(t,i){t[0]===e&&d.splice(i,1)})),delete r.defQueueMap[e],n&&(n.events.defined&&(c[e]=n.events),S(e))}),o},enable:function(e){getOwn(s,e.id)&&E(e).enable()},completeLoad:function(e){var t,i,n,o=getOwn(a.shim,e)||{},u=o.exports;for(k();d.length;){if(null===(i=d.shift())[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);j(i)}if(r.defQueueMap={},n=getOwn(s,e),!t&&!hasProp(p,e)&&n&&!n.inited){if(!(!a.enforceDefine||u&&getGlobal(u)))return x(e)?void 0:y(makeError("nodefine","No define call for "+e,null,[e]));j([e,o.deps||[],o.exportsFn])}O()},nameToUrl:function(e,t,i){var n,o,s,u,c,d,p=getOwn(a.pkgs,e);if(p&&(e=p),d=getOwn(l,e))return r.nameToUrl(d,t,i);if(req.jsExtRegExp.test(e))u=e+(t||"");else{for(n=a.paths,s=(o=e.split("/")).length;s>0;s-=1)if(c=getOwn(n,o.slice(0,s).join("/"))){isArray(c)&&(c=c[0]),o.splice(0,s,c);break}u=o.join("/"),u=("/"===(u+=t||(/^data\:|\?/.test(u)||i?"":".js")).charAt(0)||u.match(/^[\w\+\.\-]+:/)?"":a.baseUrl)+u}return a.urlArgs?u+(-1===u.indexOf("?")?"?":"&")+a.urlArgs:u},load:function(e,t){req.load(r,e,t)},execCb:function(e,t,i,r){return t.apply(r,i)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=R(e);r.completeLoad(t.id)}},onScriptError:function(e){var t=R(e);if(!x(t.id))return y(makeError("scripterror","Script error for: "+t.id,e,[t.id]))}},r.require=r.makeRequire(),r}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState||eachReverse(scripts(),(function(e){if("interactive"===e.readyState)return interactiveScript=e})),interactiveScript}}(this); \ No newline at end of file diff --git a/SuperMap iEarth/public/config/serviceList.js b/SuperMap iEarth/public/config/serviceList.js new file mode 100644 index 00000000..cbce482a --- /dev/null +++ b/SuperMap iEarth/public/config/serviceList.js @@ -0,0 +1,165 @@ +const layerServiceData = { + // 公共服务列表 - 场景 + publicServiceList: [ + { + /** 配置场景类型的示例 */ + type: "REALSPACE", // 场景类型 + thumbnail: "./images/addData/CBD.jpg", // 缩略图相对地址 + proxiedUrl: 'https://www.supermapol.com/realspace/services/3D-0523/rest/realspace', // 场景服务链接 + name: "BeijingCBD", // vue-i18n中国际化的名称,设置后可跟随浏览器语言环境1变化而变化:./locale/zh.js-BeijingCBD + chooseType: false // 面板中图片是否选中(默认false即可) + }, + { + type: "REALSPACE", + thumbnail: "./images/addData/Sophia.jpg", + proxiedUrl: "https://www.supermapol.com/realspace/services/3D-suofeiya_church-2/rest/realspace", + name: "SophiaChurch", + chooseType: false + }, + { + type: "REALSPACE", + thumbnail: "./images/addData/ZfTerranAndImagery.jpg", + proxiedUrl: "https://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace", + name: "MountEverest", + chooseType: false + }, + { + type: "REALSPACE", + thumbnail: "./images/addData/BIM.jpg", + proxiedUrl: "https://www.supermapol.com/realspace/services/3D-BIMbuilding-2/rest/realspace", + name: "BIMBuilding", + chooseType: false + }, + { + type: "REALSPACE", + thumbnail: "./images/addData/PointCloud.jpg", + proxiedUrl: "https://www.supermapol.com/realspace/services/3D-cloud-2/rest/realspace", + name: "Pointcloud", + chooseType: false + }, + { + type: "MVT", + thumbnail: "./images/addData/MVT.jpg", + proxiedUrl: "https://www.supermapol.com/realspace/services/map-mvt-JingJinDiQuDiTu/restjsr/v1/vectortile/maps/%E4%BA%AC%E6%B4%A5%E5%9C%B0%E5%8C%BA%E5%9C%B0%E5%9B%BE", + name: "JingJinMVT", + VectorTilesMapName: 'JingJinMVT', + chooseType: false + }, + { + type: "ThematicMap", + thumbnail: "./images/addData/cqbm.jpg", + proxiedUrl: "https://www.supermapol.com/realspace/services/3D-CQmodel_wireframe_2000-2/rest/realspace/datas/wireFrame/config", + name: "ChongqingBaimo", + S3MLayer: true, + chooseType: false + }, + { + type: "REALSPACE", + thumbnail: "./images/addData/Petroleum.jpg", + proxiedUrl: "https://www.supermapol.com/realspace/services/3D-PowerPlant-2/rest/realspace", + name: "transformerStation", + chooseType: false + }, + // { + // type: "REALSPACE", + // thumbnail: "./images/addData/CBD.jpg", + // proxiedUrl: 'https://www.supermapol.com/realspace/services/3D-CBD/rest/realspace', + // name: "originCBD", + // chooseType: false + // }, + ], + // 在线底图服务 - 影像 + onlineBaseLayerList: [ + /** 配置影像类型的示例 */ + { + url: './images/baseMap/baseImage.jpg', // 影像服务链接 + name: "LocalImage", // vue-i18n中国际化的名称 + thumbnail: './images/baseMap/locate.png', // 缩略图相对地址 + type: 'LocalImage', // 影像图层类型 + chooseType: false, // 面板中图片是否选中(默认false即可) + }, + { + url: '//dev.virtualearth.net/', + name: "BingMap", + thumbnail: './images/baseMap/BingMap.png', + type: 'BingMap', + chooseType: false, + }, + { + url: 'https://[subdomain].tianditu.gov.cn/img_w/wmts', + name: "TIANDITU", + thumbnail: './images/baseMap/tianditu.png', + type: 'TIANDITU', + chooseType: false, + }, + { + name: "GRIDIMAGERY", + thumbnail: './images/baseMap/grad.png', + type: 'GRIDIMAGERY', + chooseType: false, + }, + { + url: 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png', + name: "japanStand", + thumbnail: './images/baseMap/standard_jp.png', + type: 'UrlTemplateImageryProvider', + chooseType: false, + }, + { + url: 'https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png', + name: "japanPale", + thumbnail: './images/baseMap/tinge_jp.png', + type: 'UrlTemplateImageryProvider', + chooseType: false, + }, + // { + // url: 'https://cyberjapandata.gsi.go.jp/xyz/blank/{z}/{x}/{y}.png', + // name: "japanBlank", + // thumbnail: './images/baseMap/grad.png', + // type: 'UrlTemplateImageryProvider', + // chooseType: false, + // }, + // { + // url: 'https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg', + // name: "japanImage", + // thumbnail: './images/baseMap/image_jp.png', + // type: 'UrlTemplateImageryProvider', + // chooseType: false, + // }, + // { + // url: 'https://tile-{s}.openstreetmap.fr/hot/{z}/{x}/{y}.png', + // name: "OSM", + // thumbnail: './images/baseMap/OSM.png', + // type: 'OSM', + // subdomains: ["a", "b", "c", "d"], + // chooseType: false, + // }, + ], + // 在线地形服务 - 地形 + onlineTerrainLayerList: [ + /** 配置地形类型的示例 */ + { + proxiedUrl: 'https://maptiles.supermapol.com/iserver/services/3D-local3DCache-GlobalTIN30M/rest/realspace/datas/Global_TIN_30M', // 地形服务链接 + thumbnail: './images/terrainLayers/SuperMapOnline.png', // 缩略图相对地址 + name: "SuperMapOnlineTerrain", // vue-i18n中国际化的名称 + type: 'supermapOnlineTerrain', // 地形服务类型 + chooseType: false, // 面板中图片是否选中(默认false即可) + }, + { + proxiedUrl: '', + thumbnail: './images/terrainLayers/tianditu_terrain.png', + name: "tiandituTerrain", + type: 'tianDiTuTerrain', + chooseType: false + }, + { + proxiedUrl: "https://www.supermapol.com/realspace/services/3D-stk_terrain/rest/realspace/datas/info/data/path", + thumbnail: './images/terrainLayers/STK_terrain.png', + name: "stkTerrain", + type: 'STKTerrain', + chooseType: false + } + ] +} + +window.layerServiceData = layerServiceData; \ No newline at end of file diff --git a/SuperMap iEarth/public/Resource/config/configToken.json b/SuperMap iEarth/public/config/token.js similarity index 70% rename from SuperMap iEarth/public/Resource/config/configToken.json rename to SuperMap iEarth/public/config/token.js index 8157fb91..ab2e90f7 100644 --- a/SuperMap iEarth/public/Resource/config/configToken.json +++ b/SuperMap iEarth/public/config/token.js @@ -1,4 +1,6 @@ -{ +const configToken = { "tiandituKey":"e90d56e5a09d1767899ad45846b0cefd", "bingMapsKey":"Av63hPkCmH18oGGn5Qg3QhLBJvknZ97xbhyw3utDLRtFv7anHjXNOUQbyWBL5fK5" -} \ No newline at end of file +} + +window.configToken = configToken; \ No newline at end of file diff --git a/SuperMap iEarth/public/images/earth-skin.jpg b/SuperMap iEarth/public/images/earth-skin.jpg deleted file mode 100644 index 05169cd7..00000000 Binary files a/SuperMap iEarth/public/images/earth-skin.jpg and /dev/null differ diff --git a/SuperMap iEarth/public/images/earth-skin2.jpg b/SuperMap iEarth/public/images/earth-skin2.jpg new file mode 100644 index 00000000..65198813 Binary files /dev/null and b/SuperMap iEarth/public/images/earth-skin2.jpg differ diff --git a/SuperMap iEarth/public/locale/config.js b/SuperMap iEarth/public/locale/config.js new file mode 100644 index 00000000..4083abd2 --- /dev/null +++ b/SuperMap iEarth/public/locale/config.js @@ -0,0 +1,14 @@ +const lang_support_list = ["zh", "en", "ja", "ru"]; // 支持浏览器自动识别的语言列表 + +const lang_data = { // vue-i18n:createI18n中的messages + zh:local_zh, + en:local_en, + ja:local_ja, + ru:local_ru, +} + +const lang_default = 'en'; // 当前浏览器语言不在支持列表时的默认语言 + +window.lang_data = lang_data; +window.lang_support_list = lang_support_list; +window.lang_default = lang_default; \ No newline at end of file diff --git a/SuperMap iEarth/public/locale/en.js b/SuperMap iEarth/public/locale/en.js new file mode 100644 index 00000000..0186bd49 --- /dev/null +++ b/SuperMap iEarth/public/locale/en.js @@ -0,0 +1,680 @@ +const local_en = { + /** + * UI界面 + * */ + + // header 页头 + earth3D: '3D Earth', + control: 'Control board', + control_title: 'IEarth control board', + save: 'Save', + close: 'Close', + share: 'Share', + loginPlease: 'Please log in', + tourists: 'Tourists', + + // 保存面板 + sceneSave: 'SceneSave', + saveDate: 'SaveDate', + sceneName: 'SceneName', + sceneLable: 'SceneLable', + authorName: 'AuthorName', + sceneDescribe: 'SceneDescribe', + placeHolder: 'P[lease input info', + sceneSaveNameCannotBeNull: 'Save scene name cannot be empty!', + sceneSaveLableCannotBeNull: 'Save scene lable cannot be empty!', + saveErrorNeedOnline: 'Storage failed, please log in to your iPortal or Online account first......', + saveSuccess: 'Scene saved successfully!', + saveUpdate: 'Scene update successful!', + + // widgets 组件列表 + w_search: 'Search', + w_north: 'North', + w_reset: 'Reset', + w_zoomOut: 'ZoomOut', + w_zoomIn: 'ZoomIn', + w_fullScreen: 'FullScreen', + w_home: 'Home', + + // toolBar 侧边栏 + t_layerList: 'Layer List', + t_addData: 'Add Data', + t_analyse3d: 'Analyse 3D', + t_measure: 'Measure', + t_sceneProperties: 'Scene Properties', + t_objectPainting: 'Object Painting', + + // 面板-header + layerList: 'Layer List', + addData: 'Add Data', + analyseSeries: 'Analyse 3D', + sceneProperties: 'Scene Properties', + measure: 'Measure', + objectPainting: 'Object Painting', + layerOpration: 'Opration', + layerAttribute: 'Attribute', + layerStyle: 'Style', + layerQuery: 'Query', + mapQuery: 'Map', + qxModelSingle: 'Oblique photography Query', + qxSingle: "Oblique photography Query", + + // 操作面板 - 添加数据 + publicService: "PublicService", + customService: "CustomService", + onlineBaseMap: "BaseMap", + onlineTerrain: "Terrain", + portalService: "MyServer", + + // 操作面板-三维分析 + clip: 'Clip', // 内嵌 + terrain: 'Terrain', + analysis3d: '3D-analysis', + spatialAnalysis: 'Spatial analysis', + + // 三维分析 + Intervisibility: 'Visibility', + viewableRange: 'Viewshed', + ligShadowAnalysisth: 'Shadow', + profile: 'Profile', + Skyline: 'Skyline', + FacePlot: 'Plot', + + // 裁剪 + boxClip: 'Box', + planeClip: 'Plane', + crossClip: 'Cross', + polygonClip: 'Polygon', + clipMode: 'Clip mode', + inner: 'Inner', + outer: 'Outer', + boxclipTip: 'Click the left mouse button to draw the bottom of the box, move the mouse to draw the height of the box, and click the right mouse button to end the drawing', + displayCilpPlane: 'Display clip plane', + verticalNormal: 'Vertical normal', + parallelNormal: 'Parallel normal', + clipWidth: 'Clip width', + clipHeight: 'Clip height', + rotateX: 'Rotate X-axis', + rotateY: 'Rotate Y-axis', + rotateZ: 'Rotate Z-axis', + + // 地形操作 + terrainOperation: 'Operation', + inundationAnalysis: 'Inundation', + slopeAspect: 'Slope', + Isoline: 'Isoline', + terrainExcavate: 'Excavate', + terrainChange: 'Flatten', + excavationDepth: 'Depth', + excavateAreaOffsetUp: 'Move up', + upHeight: 'Height moved up', + editArea: 'Edit area', + editAreaZ: 'Edit Z-axis of area', + stkUnsupported: 'STK terrain not currently supported', + maximumVisibleElevation: 'Max visible EL', + minimumVisibleElevation: 'Min visible EL', + currentElevation: 'Current elevation', + transparency: 'Transparency', + inundationSpeed: 'Inundation speed', + analysisArea: 'AnalysisArea', + minSlope: 'MinSlope', + maxSlope: 'MaxSlope', + displayMode: 'DisplayMode', + partRegion: 'Designated region', + allRegion: 'All regions', + noRegion: 'No region', + allDisplay: "Arrow and Face Display", + arrowDisplay: "Arrow display", + faceDisplay: "Face display", + equivalentIsoline: 'Equivalent', + contourColor: 'Contour Color', + contourLineFill: 'Contour line Fill', + contourFaceFill: 'Contour Face Fill', + contourAllFill: 'Contour line and Face', + contourNoFill: 'No File', + + //操作面板-量算 + measureMode: 'MeasureMode', + pickPoint: 'PickPoint', + contour: 'Contour', + measureAction: 'Measure', + mode_space: 'Space Mode', + mode_ground: 'Ground Mode', + mode_projection: 'Planar Project', + measureDistence: 'MeasureDistence', + measureArea: 'MeasureArea', + measureHeight: 'MeasureHeight', + distence_cl: "Distence", + area: "Area", + spaceDistance: "Space Distance", + verticalHeight: "Vertical Height", + horizontalDistance: "Horizontal Distance", + + // 操作面板-参数设置 + baseAttribute: 'Attribute', + flying: 'Flying', + ligth: 'Light', + viewPorts: 'ViewPorts', + speciallyEffect: 'SpecialEffects', + + //操作面板-场景属性-勾选 + earth: 'Earth', + sun: 'Sun', + depthInspection: 'Depth inspection', + atomsphereRender: 'Atomsphere render', + fogEffect: 'Fog effect', + cloudLayer: 'Cloud layer', + skyBox: 'Sky box', + timeAxis: 'Time axis', + displayFrame: 'Display frame', + + //操作面板-场景属性-选项 + brightness: 'Brightness', + contrastRatio: 'Contrast ratio', + colorTone: 'Color tone', + saturation: 'Saturation', + gamma: 'Gamma', + showUnderground: 'Show underground', + surfaceTransparency: 'Surface transparency', + displayCoordinateTip: 'Click anywhere with the mouse to return the result', + coordinateQuery: 'Coordinate query', + coordinateTip: 'Longitude、Latitude、Elevation', + + //操作面板-飞行 + flyRoute: 'Fly route', + flyRoute_1: 'Fly route 1', + import: 'Import', + displayRoute: 'Display route', + displayStation: 'Display station', + rotateByPoint: 'Rotate by point', + rotateSpeed: 'Rotate speed', + rotateRepeat: 'Rotate repeat', + selectStation: 'Select station', + play: 'Play', + pause: 'Pause', + stop: 'Stop', + flySpeed: 'Fly speed', + addStation: 'Add station', + deleteStation: 'Delete station', + restore: 'Restore', + importFlyRoute: 'Import fly route', + createFlyRoute: 'Create fly route', + addedStops: 'Added Stops', + downLoad: 'DownLoad', + addStopSuccess: 'Successfully added Stop', + atLeastTwoStop: 'At least two nodes are required to save', + + //操作面板-灯光 + symbolLibrary: 'Symbol library', + lightsourceColor: 'Light color', + diffusionDistance: 'Diffusion distance', + lightDecay: 'Light decay', + lightsourceIntensity: 'Light intensity', + spotlightRange: 'Spotlight range', + displayLightmodel: 'Display model', + displayLightcorrdinate: 'Display corrdinate', + modelInformation: 'Model information', + pointLight: 'Point light', + spotLight: 'Spot light', + parallelLight: 'Parallel light', + addSpotLightTip: 'Left click to draw two points to determine the direction of the light source, right click to end', + + //操作面板-视图模式 + viewMode: 'View mode', + splitscreenModel: 'Split screen model', + openRollershutter: 'Open roller shutter', + noneSplitscreen: 'Do not use split screen', + horizontalSplitscreen: 'Horizontal splitscreen', + verticalSplitscreen: 'Vertical splitscreen', + threeViewport: 'Triple viewport', + fourViewport: 'Squad viewport', + noneRollershutter: "Do not use rollershutter", + leftrightRollershutter: 'Left and right rollershutter', + updownRollershutter: 'Up and down rollershutter', + customRollershutter: 'Custom rollershutter', + shieldDirection: 'Shield direction', + left: 'Left', + right: 'Right', + up: 'Up', + down: 'Down', + + //操作面板-场景特效 + floodLight: 'Floodlight', + scanLine: 'ScanLine', + rainSnow: 'Rain&Snow', + openFloodlight: 'Open floodlight', + heatMap: 'HeatMap', + brightnessThreshold: 'Brightness threshold', + floodlightThreshold: 'Floodlight threshold', + scanLineTip: 'Fix a rectangle at two points', + scanMode: 'Scan mode', + scanColor: 'Scan color', + scanTexture: 'Scan texture', + scanWidth: 'Scan Width', + scanSpeed: 'Scan Speed', + scanPeriod: 'Scan Period', + customScanDirection: 'Custom scan direction', + customScanCenter: 'Custom scan center', + lineShape: 'Line', + circleShape: 'Circle', + noneScanTexture: 'Do not use texture', + lineTexture1: 'Line texture 1', + lineTexture2: 'Line texture 2', + ringTexture1: 'Ring texture 1', + ringTexture2: 'Ring texture 2', + loopedhexagonTexture: 'Looped hexagon texture', + addScanLineTip: 'Left click to draw two points to determine the direction of the scan line, right click to end', + openRain: 'Display rain', + openSnow: 'Display snow', + rainAngle: 'Angle of rain', + rainSpeed: 'Speed of rain', + snowAngle: 'Angle of snow', + snowSpeed: 'speed of snow', + snowDensity: 'Density of snow', + + //通用 + add: 'Add', + meterSecond: 'm/s', + meter: 'm', + second: 's', + + // 操作面板-对象绘制 + drawLine: 'Line', + drawPolygon: 'Polygon', + skit: 'Skit', + particle: 'Particle', + geometry: 'Geometry', + drawMode: 'Draw mode', + lineColor: 'Color of line', + lineWidth: 'Width of line', + editLine: 'Edit line', + editLineZ: 'Edit Z axis of line', + editZaxis: 'Edit Z axis', + solidLine: 'Solidline', + dashedLine: 'Dasheline', + outline: 'Outline', + arrowLine: 'Arrowline', + haloLine: 'Haloline', + wakeLine: 'Wakeline', + pureColor: 'Pure', + grid: 'Grid', + stripe: 'Stripe', + polygonColor: 'polygonColor', + gridLineWidth: 'Width of grid line', + gridLineNumber: 'Count of grid line', + unitTransparency: 'Tranparency of unit', + oddStripColor: 'Color of odd strip', + evenStripColor: 'Color of even strip', + stripRepetition: 'Count of strip repetition', + stripOffset: 'Offset of strip', + spaceMode: 'Space mode', + closeGroundMode: 'Close ground', + closeS3MMode: 'close S3M', + closeBoth: 'Close ground and objects', + editLineTip: 'Start adding with the left mouse button, end with the right mouse button, select the object for editing', + editLineTip2: 'Left click to select the drawing object for editing', + symbolType: 'Symbol type', + symbolColor: 'Symbol color', + addMode: 'Add mode', + spacing: 'Spacing', + count: 'Count', + multiSelection: 'Symbol multi-Selection', + tree: 'Tree', + facilities: 'Facilities', + traffic: 'Traffic', + singleAdd: 'Single addition', + lineAdd: 'Add along the route', + AreaAdd: 'Area addition', + delMode: 'Remove mode', + singleDel: 'Remove Single', + wholeDel: 'Remove Whole', + addSkitTip: 'Please select a symbol', + delSkitTip: 'Please click on the added sketch in the scene', + cylinder: 'Cylinder', + cube: 'Cube', + sphere: 'Sphere', + cone: 'Cone', + semiMajorAxis: 'Semi-major axis', + semiMinorAxis: 'Semi-minor axis', + granularity: 'Granularity', + rotate: 'Rotate', + fillMode: 'Fill mode', + wireframe: 'Wireframe mode', + width: 'Width', + length: 'Length', + height: 'Height', + distence: "Distence", + Xradius: 'X-Radius', + Yradius: 'Y-Radius', + Zradius: 'Z-Radius', + + // 粒子系统 + fire: 'Fire', + water: 'Water', + fireworks: 'Fireworks', + displayEdit: 'Display Edit', + parameterSet: 'Parameter Set', + emitSpeed: 'Emit Speed', + lifeCycle: 'Life Cycle', + speedRange: 'Speed Range', + scaleRange: 'Scale Range', + emitType: 'Emit Type', + particleNumber: 'Particle Number', + particleSize: 'Particle Size', + gravity: 'Gravity', + coneEmit: 'Cone Emit', + sphereEmit: 'Sphere Emit', + boxEmit: 'Box Emit', + + //按钮 + query: 'Query', + + // 视频投放 + videoFileSet: 'Video Set', + videoSet: 'Set', + distencePlace: 'Placement Distance', + visibleVideoLine: 'Video Line', + localVideoPath: 'Please select a video file', + videoPath: 'Video Path', + deleteVideo: 'Please delete current video file', + + // 图层列表 + isShow: 'Explicit and implicit', + rapidLocate: 'Locate', + remove: 'Remove', + delUnsupported: 'The default base image does not support deletion', + moreFun: 'More Function', + + + /** + * 组件内部界面 + * */ + + // 全局 + s3mLayer: 'S3MLayer', + imgLayer: 'ImgLayer', + mvtLayer: 'MvtLayer', + terrainLayer: 'TerrainLayer', + wmtsLayer: 'WMTSLayer', + sure: 'Sure', + cancle: 'Cancle', + analysis: 'Analysis', + clear: 'Clear', + edit: 'Edit', + color: 'Color', + + // 图层列表-无 + allLayer: 'All Layer', + deleteLayer: 'Delete Layer', + defaultTerrain: 'Default Terrain', + defaultImage: 'Default imagery', + lnglatMap: 'GRIDIMAGERY', + unnamedLayer: 'Unnamed Layer', + stkTerrain: 'STK Terrain', + unnamedTerrain: 'Unnamed Terrain', + superMapTerrain: 'SuperMap Terrain', + tiandituTerrain: 'Tianditu Terrain', + noTerrain: 'No Terrain', + + // 添加数据 + type: 'Type', + layer: 'Layer', + scene: 'Scene', + localData: 'LocalData', + + address: 'Address', + name: 'Name', + addToken: 'Add Token', + layerUrl: 'Please enter the layer URL', + layerName: 'Please enter the layer Name', + localFilePath: 'Choose local .KML file', + localFilePathFly: 'Choose local .fpf file', + chooseFile: 'File', + selectableLayers: 'Selectable Layers', + + urlIsNull: 'Layer URL cannot be empty, please enter URL!', + urlCheckedsuccess: 'Layer URL verification successful', + addScpFailed: 'Loading SCP failed. Please check if the network connection status or URL address is correct?', + openSceneSuccess: 'Successfully opened scene', + + // 三维分析-3D + // 通视分析 + longitude: 'Longitude', + latitude: 'Latitude', + elevation: 'Elevation', + visibleAreaColor: 'VisibleAreaColor', + invisibleAreaColor: 'InvisibleAreaColor', + barrierHighlightColor: 'Barrier Color', + displayBarrier: 'Display Barrier', + highlightBarrier: 'Highlight Barrier', + + // 可视域分析 + additionalHeight: 'Additional Height', + horizontalFov: 'Horizontal Fov', + verticalFov: 'Vertical Fov', + hintLineColor: 'Tip line Color', + visibleBody: 'VisibleBody', + visibleBodyColor: 'VisibleBody Color', + invisibleBody: 'InvisibleBody', + hiddenAreaColor: 'InvisibleBody Color', + viewshedAnimation: 'Animation Viewshed', + viewshedAnimationTip: 'Draw the model motion path, right-click to end', + + // 阴影分析 + timeInterval: 'TimeInterval', + space: 'Space', + bottomHeight: 'BottomHeight', + stretchingHeight: 'StretchingHeight', + bodyDisplay: 'BodyDisplay', + showShadow: 'ShowShadow', + filterInterval: 'FilterInterval', + startTime: 'StartTime', + endTime: 'EndTime', + ShadowStartTip: 'Play a day long animation of sunlight and shadows', + ShadowStartTip2: 'Play a year long animation of sunshine and shadows', + ShadowStopTip: 'Stop Animation', + DaylightingRate: 'Shadow rate', + analyseResult: 'AnalyseResult', + + // 剖面分析 + startLongitude: 'StartLongitude', + startLatitude: 'StartLatitude', + startElevation: 'StartElevation', + endLongitude: 'EndLongitude', + endLatitude: 'EndLatitude', + endElevation: 'EndElevation', + disPlayInfo: 'DisPlayInfo', + Section: 'Section', + GPUSection: "GPUSection", + + // 天际线 + DisplayMode: 'DisplayMode', + AnalysisRadius: 'AnalysisRadius', + LineWidth: 'LineWidth', + LineDisplay: 'LineDisplay', + FaceDisplay: 'FaceDisplay', + BodyDisplay: 'BodyDisplay', + SkylineColor: 'SkylineColor', + SkylineBodyColor: 'SkylineBodyColor', + ObstacleColor: 'ObstacleColor', + Display2D: 'Display2D', + HighlightObstacles: 'HighlightObstacles', + GlobeNoAnalysis: 'GlobeNoAnalysis', + drawHeightLimitingBody: 'DrawHeightLimitingBody', + Skyline2D: 'Skyline2D', + limitingBody: 'Limiting body', + + // 立面图 + maxHeight: 'MaxHeight', + maxDistence: 'MaxDistence', + Draw: "Draw", + Plot: "Plot", + + // 图层属性 + chooseLayer: 'Choose Layer', + renderMode: 'Render Mode', + singleRender: 'Single Render', + doubleRender: 'Double Render', + shadowBrightness: 'ShadowBrightness', + objectHiding: 'ObjectHiding', + MinVisibleDistance: 'MinVisibleDistance', + MaxVisibleDistance: 'MaxVisibleDistance', + multiple: 'Multiple', + disPlayAll: 'DisPlay All', + disPlaySelected: 'DisPlay Selected', + hideSelected: 'Hide Selected', + noLayer: 'No Layer', + + // 图层风格 + fillStyle: 'Fill Style', + foreColor: 'Fore Color', + selectedColor: 'Selected Color', + selectColorMode: 'Select Color Mode', + colorMix: 'Mix', + colorReplace: 'Replace', + layerTransparency: 'Layer Transparency', + reset: 'Reset', + fillBothMode: 'Fill and wireframe', + attrSaveOk: 'Layer attributes saved successfully', + + // 图层操作 + qxModel: 'Excavate&flat', + offSet: 'OffSet', + layerColor: 'LayerColor', + excavate: 'Excavate', + flatten: 'Modify', + flatten2: 'Flatten', + onQXModel: 'Only Supports Oblique Photography Of 3D Models', + offsetMode: 'Offset Mode', + offsetX: 'OffsetX', + offsetY: 'OffsetY', + offsetZ: 'OffsetZ', + selected: 'Selected', + + // 属性查询 + dataServerUrl: "DataServerUrl", + dataSourceName: 'SourceName', + inputServerUrl: 'Please enter the layer data service URL', + inputSourceName: 'Please enter the corresponding data source for this layer', + queryResult: 'Query Results', + inputUrlName: 'Please fill in the data service and corresponding data source required for this layer query', + bindInfoOK: "Successfully bound, please click on the model to query information", + bindUpdate: "The data source binding change for this layer was successful", + noData: "There is currently no data available", + + // 地图查询 + mapDataUrl: "MapDataUrl", + datasetName: "DatasetName", + attributeList: 'AttributeList', + listTotal_s: 'Attribute table (total', + listTotal_e: 'features)', + chooseFieldTip: 'Select the fields to be filtered', + filter: 'Filter', + shpQueryTip: 'Specify data query (query data must be consistent with the map service coordinate system)', + clickQuery: 'ClickQuery', + clearEntityTip: 'Clear the shape drawn on the sphere', + refreshData: 'Refresh data', + mydata: 'My data', + queryPlaceHolder: "Please enter the selection field to filter keywords", + queryWait: 'Querying, please wait', + resouceName: 'ResouceName', + resouceType: 'ResouceType', + createTime: 'CreateTime', + mapQueryTip: 'Please enter the data service URL and corresponding dataset', + clickQueryClose: 'The click function has been turned off', + clickQueryCloseTip: 'Click with the mouse to obtain element information, right-click to close the selection', + dataFiltering: 'Filtering data...', + recently: 'Recently', + chooseField: 'Select Field', + filterFiledTip: 'Property sheet display field filtering', + + // 倾斜模型单体化 + featrueID: "Feature ID", + singleTip_waring: 'Please enter the corresponding data service, data source, and dataset for this oblique photography layer', + singleTip_success: 'The tilted photography layer has been successfully bound to the data service. Click to perform a personalized query', + + // 我的服务-iportal + getData: 'Obtaining data, please wait', + serviceName: 'Name', + resourceSubType: 'Type', + updateTime: 'UpdateTime', + serviceUrl: 'URL', + year: 'year', + month: 'month', + day: 'day', + yearsAgo: ' yearsAgo', + monthsAgo: ' monthsAgo', + weeksAgo: ' weeksAgo', + daysAgo: ' daysAgo', + hoursAgo: ' hoursAgo', + minutesAgo: 'minutesAgo', + secondsAgo: ' secondsAgo', + + // message + layerExistMsg: 'This layer already exists, please do not load it again!', + imgUrlErrorMsg: 'Image service URL error, image loading failed!', + scpUrlErrorMsg: 'SCP URL address error, S3M layer loading failed!', + + /** + * 图片资源名称 - 演示 + * */ + BeijingCBD: "BeijingCBD", + originCBD: "OriginCBD(Test)", + SophiaChurch: "SophiaChurch", + MountEverest: "MountEverest", + BIMBuilding: "BIMBuilding", + Pointcloud: "Pointcloud", + Histogram: "Histogram", + PhotographyModel: "PhotographyModel", + JingJinMVT: "JingJinMVT", + ChongqingBaimo: "Chongqing", + YokohamaBaimo: "Yokohama", + transformerStation: 'Oil station', + + LocalImage: 'LocalImage', + BingMap: 'BingMap', + TIANDITU: 'TIANDITU', + OSM: 'OSM', + GRIDIMAGERY: 'GRIDIMAGERY', + japanStand: 'Japan Standard Map', + japanPale: 'Japan Light Map', + japanBlank: 'Japan White Map', + japanImage: 'Japan Imagery', + + SuperMapOnlineTerrain: 'SuperMap', + TiandituTerrain: 'Tianditu', + STKTerrain: 'STK', + + // Tip + qxModelTip: 'This feature only supports oblique photography of 3D models', + repeatAddTip: "Do not add again!", + repeatAddWMTSTip: "The wmts layer has been added, please do not add it again", + + // 新增 + outLineColor: "Outline Color", + outLineWidth: "Outline Width", + lightTip_edit: "Please select the light source model and then edit the properties", + lightTip_del: "Please select the light source model before deleting it", + wireframeColor: "Wireframe Color", + chooseThenOffset: "Click to select the model, then offset it", + fillColor: "Fill Color", + tree_darg_tip:'Please drag and drop in the same level directory', + rename:'Rename', + bindMediaField:'Bind media fields', // 媒体字段(地图查询)- start + mediaField:'Media fields', + picture:'Picture', + video:'Video', + field:'Field', + title:'Title', + inputTitle:'Please enter a title', + customMediaLink:'Custom media links', + featureID:'Feature ID', + link:'Link', + inputOnlineImgLink:"Please enter the online image address", + inputOnlineVideoLink_iportal:"Please enter the video address (iportal only)", // 媒体字段(地图查询)- end + qxLayerDataUrl:'Please enter the data service URL for this layer', + qxLayerDataSource:'Please enter the data source corresponding to this layer', + qxLayerDataset:'Please enter the data set corresponding to this layer', +} + +window.local_en = local_en; \ No newline at end of file diff --git a/SuperMap iEarth/public/locale/ja.js b/SuperMap iEarth/public/locale/ja.js new file mode 100644 index 00000000..ee175d86 --- /dev/null +++ b/SuperMap iEarth/public/locale/ja.js @@ -0,0 +1,680 @@ +const local_ja = { + /** + * UI界面 + * */ + + // header 页头 + earth3D: '3D地球', + control: 'コントローラ', + control_title: 'IEarth Pro コントローラ', + save: '保存', + close: '閉じる', + share: '共有', + loginPlease: 'ログイン', + tourists: 'ビジター', + + // 保存面板 + sceneSave: 'シーンの保存', + saveDate: '保存日付', + sceneName: 'シーン名', + sceneLable: 'シーンラベル', + authorName: '作者名', + sceneDescribe: 'シーン説明', + placeHolder: '入力してください', + sceneSaveNameCannotBeNull: '保存するシーン名を空に設定できません。', + sceneSaveLableCannotBeNull: '保存するシーンラベルを空に設定できません。', + saveErrorNeedOnline: '保存に失敗しました。iPortalまたはOnlineアカウントをログインしてください......', + saveSuccess: 'シーンの保存に成功しました。', + saveUpdate: 'シーンの更新に成功しました。', + + // widgets 组件リスト + w_search: '検索', + w_north: '北に', + w_reset: 'リセット', + w_zoomOut: '縮小', + w_zoomIn: '拡大', + w_fullScreen: '全画面', + w_home: 'ホームページ', + + // toolBar 侧边栏 + t_layerList: 'レイヤーリスト', + t_addData: 'データの追加', + t_analyse3d: '3D解析', + t_measure: '計測', + t_sceneProperties: 'シーン属性', + t_objectPainting: 'オブジェクトの描画', + + // 面板-header + layerList: 'レイヤーリスト', + addData: '加データの追', + analyseSeries: '3D解析', + sceneProperties: 'シーン属性', + measure: '計測', + objectPainting: 'オブジェクト描画', + layerOpration: 'レイヤー操作', + layerAttribute: 'レイヤー属性', + layerStyle: 'レイヤースタイル', + layerQuery: '属性クエリ', + mapQuery: 'マップクエリ', + qxModelSingle: '傾斜モデルの単体化', + qxSingle: "傾斜の単体化", + + // 操作面板-の追加データ + publicService: "パブリックサービス", + customService: "ユーザー定義サービス", + onlineBaseMap: "オンラインベースマップ", + onlineTerrain: "オンライン地形", + portalService: "マイサービス", + + // 操作面板-3D解析 + clip: 'クリップ', // 内嵌 + terrain: '地形', + analysis3d: '3D解析', + spatialAnalysis: '空間解析', + + // 3D解析 + Intervisibility: '見通し', + viewableRange: '見通し領域', + ligShadowAnalysisth: 'シェード', + profile: '断面', + Skyline: 'スカイライン', + FacePlot: '立面図', + + // クリップ + boxClip: 'Boxクリップ', + planeClip: '平面クリップ', + crossClip: 'Crossクリップ', + polygonClip: 'ポリゴンクリップ', + clipMode: 'クリップモード', + inner: '内部', + outer: '外部', + boxclipTip: 'マウスを左クリックし、boxの底面を描画して、マウス移動し、boxの高さを描画して、マウスを右クリックして終了します', + displayCilpPlane: 'クリップ面の表示', + verticalNormal: '法線に垂直', + parallelNormal: '法線に平行', + clipWidth: 'クリップ幅', + clipHeight: 'クリップ高さ', + rotateX: 'X軸を中心に回転', + rotateY: 'Y軸を中心に回転', + rotateZ: 'Z軸を中心に回転', + + // 地形操作 + terrainOperation: '地形操作', + inundationAnalysis: '浸水解析', + slopeAspect: '傾斜度傾斜方向', + Isoline: '等値線', + terrainExcavate: '地形掘削', + terrainChange: '地形修正', + excavationDepth: '掘削深さ', + excavateAreaOffsetUp: '掘削エリアを上に移動', + upHeight: '上に移動高さ', + editArea: '編集エリア', + editAreaZ: '編集エリアZ軸', + stkUnsupported: 'STK地形はサポートされていません', + maximumVisibleElevation: '最大表示可能標高', + minimumVisibleElevation: '最小表示可能標高', + currentElevation: '現在標高', + transparency: '透明度', + inundationSpeed: '浸水速度', + analysisArea: '解析エリア', + minSlope: '最小傾斜度', + maxSlope: '最大傾斜度', + displayMode: '表示モード', + partRegion: '指定エリアで解析', + allRegion: 'すべてエリアで解析', + noRegion: '無しエリアで解析', + allDisplay: "矢印と面表示", + faceDisplay: "面表示", + arrowDisplay: "矢印表示", + equivalentIsoline: '等値距離', + contourColor: '等値線カラー', + contourLineFill: '等値線フィル', + contourFaceFill: '等値面', + contourAllFill: '等値線と面フィル', + contourNoFill: 'フィルしない', + + //操作面板-計測 + measureMode: '計測モード', + pickPoint: '頂点捕捉', + contour: '等値線', + measureAction: '計測', + mode_space: '空間計測', + mode_ground: '地表計測', + mode_projection: '平面投影', + measureDistence: '距離計測', + measureArea: '面積計測', + measureHeight: '高度計測', + distence_cl: "きょり", + area: "エリア", + spaceDistance: "くうかんきょり", + verticalHeight: "垂直方向の高さ", + horizontalDistance: "すいへいきょり", + + // 操作面板-パラメータの設定 + baseAttribute: 'シーン属性', + flying: '飛行', + ligth: '光源', + viewPorts: 'ビュー', + speciallyEffect: '特殊効果', + + //操作面板-シーン属性-勾选 + earth: '地球', + sun: '太陽', + depthInspection: '深さ検査', + atomsphereRender: '大気レンダリング', + fogEffect: '霧化効果', + cloudLayer: '雲', + skyBox: 'スカイボックス', + timeAxis: '時間軸', + displayFrame: 'フレームレート', + + //操作面板-シーン属性-选项 + brightness: '明度', + contrastRatio: 'コントラスト', + colorTone: '色相', + saturation: '飽和度', + gamma: 'ガンマ', + showUnderground: '地下を使用', + surfaceTransparency: '地表透明度', + displayCoordinateTip: 'マウスで任意の場所をクリックして結果に戻る', + coordinateQuery: '座標クエリ', + coordinateTip: '経度、緯度、標高', + + //操作面板-飛行 + flyRoute: '飛行ルート', + flyRoute_1: '飛行ルート_1', + import: 'インポート', + displayRoute: 'ルートの表示', + displayStation: '経過ポイントの表示', + rotateByPoint: '点を中心に回転', + rotateSpeed: '回転速度', + rotateRepeat: 'ループ回転', + selectStation: '経過ポイントの選択', + play: '再生', + pause: '一時停止', + stop: '停止', + flySpeed: '飛行速度', + addStation: '経過ポイントの追加', + deleteStation: '経過ポイントの削除', + restore: '復元', + importFlyRoute: '飛行ルートのインポート', + createFlyRoute: '新規飛行ルート', + addedStops: '追加済み経過ポイント', + downLoad: 'ダウンロード', + addStopSuccess: '経過ポイントの追加に成功', + atLeastTwoStop: '保存するには、少なくとも2つの点は必要です', + + //操作面板-光源 + symbolLibrary: 'シンボルライブラリ', + lightsourceColor: '光源カラー', + diffusionDistance: '拡散距離', + lightDecay: '減衰係数', + lightsourceIntensity: '光源強度', + spotlightRange: 'スポットライト範囲', + displayLightmodel: '光源モデルの表示', + displayLightcorrdinate: '光源座標の表示', + modelInformation: 'モデル情報', + pointLight: '点光源', + spotLight: 'スポットライト', + parallelLight: '平行ライト', + addSpotLightTip: 'マウス左クリックで2点で光源の方向を確認し、右クリックして終了します', + + //操作面板-ビューモード + viewMode: 'ビューモード', + splitscreenModel: '画面分割モード', + openRollershutter: 'スワイプの使用', + noneSplitscreen: '画面分割を使用せず', + horizontalSplitscreen: '水平画面分割', + verticalSplitscreen: '垂直画面分割', + threeViewport: '3ビュー', + fourViewport: '4ビュー', + noneRollershutter: "スワイプを使用せず", + leftrightRollershutter: '左右スワイプ', + updownRollershutter: '上下スワイプ', + customRollershutter: 'ユーザー定義スワイプ', + shieldDirection: 'シールド方向', + left: '左側', + right: '右側', + up: '上側', + down: '下側', + + //操作面板-シーン特殊効果 + floodLight: 'シーン投光', + scanLine: 'スキャンライン', + rainSnow: '雨雪', + openFloodlight: '投光を使用', + heatMap: 'ヒートマップ', + brightnessThreshold: '明度閾値', + floodlightThreshold: '投光閾値', + scanLineTip: '2点に1つの矩形を付ける', + scanMode: 'スキャンモード', + scanColor: 'スキャンカラー', + scanTexture: 'スキャンテクスチャー', + scanWidth: '走査幅', + scanSpeed: 'そうさそくど', + scanPeriod: 'スキャンサイクル', + customScanDirection: 'ユーザー定義スキャン方向', + customScanCenter: 'ユーザー定義スキャン中心', + lineShape: '線形', + circleShape: '環形', + noneScanTexture: 'テクスチャー無し', + lineTexture1: '線形テクスチャー1', + lineTexture2: '線形テクスチャー2', + ringTexture1: '環形テクスチャー1', + ringTexture2: '環形テクスチャー2', + loopedhexagonTexture: '六角形環形テクスチャー', + addScanLineTip: 'マウスの右キーで2点を描画し、スキャンライン方向を確認して、右クリックして終了します', + openRain: '雨の使用', + openSnow: '雪の使用', + rainAngle: '雨角度', + rainSpeed: '雨速度', + snowAngle: '雪角度', + snowSpeed: '雪速度', + snowDensity: '雪密度', + + //通用 + add: '追加', + meterSecond: 'メートル/秒', + meter: 'メートル', + second: '秒', + + // 操作面板-オブジェクト描画 + drawLine: 'ラインの描画', + drawPolygon: 'ポリゴンの描画', + skit: '要素', + particle: '粒子', + geometry: 'ジオメトリ', + drawMode: '描画モード', + lineColor: 'ラインカラー', + lineWidth: 'ライン幅', + editLine: 'ラインの編集', + editLineZ: 'ラインZ軸の編集', + editZaxis: 'Z軸方向の編集', + solidLine: '実線', + dashedLine: '点線', + outline: '輪郭ライン', + arrowLine: '矢印ライン', + haloLine: 'ハローライン', + wakeLine: '航跡ライン', + pureColor: 'ソリッドカラー', + grid: 'グリッド', + stripe: 'ストライプ', + polygonColor: 'ポリゴンカラー', + gridLineWidth: 'グリッドライン幅', + gridLineNumber: 'グリッドライン数', + unitTransparency: '単元透明度', + oddStripColor: '奇数バンドカラー', + evenStripColor: '偶数バンドカラー', + stripRepetition: 'バンド重複数', + stripOffset: 'バンドオフセット', + spaceMode: '空間モード', + closeGroundMode: '地表モード', + closeS3MMode: 'S3Mモード', + closeBoth: '地表オブジェクト', + editLineTip: 'マウス左キーで追加を開始して、右キーで終了します。選択オブジェクト編集', + editLineTip2: 'マウス左キーで描画オブジェクトを選択して、編集します', + symbolType: 'シンボルタイプ', + symbolColor: 'シンボルカラー', + addMode: '追加モード', + spacing: '間隔', + count: '数', + multiSelection: '記号の複数選択', + tree: '木', + facilities: 'パブリック施設', + traffic: '交通', + singleAdd: '個別追加', + lineAdd: '沿線追加', + AreaAdd: 'エリア追加', + delMode: '削除モード', + singleDel: '1つの削除', + wholeDel: 'ラインサーフェス削除', + addSkitTip: '記号を選択してください', + delSkitTip: 'シーンに追加された小物を選択してください', + cylinder: '円柱体', + cube: '立方体', + sphere: '球体', + cone: '円錐', + semiMajorAxis: '半長軸', + semiMinorAxis: '半短軸', + granularity: '精細度', + rotate: '回転', + fillMode: 'フィルモード', + wireframe: 'フレームモード', + width: '幅', + length: '長さ', + height: '高さ', + distence: "距離", + Xradius: 'X半径', + Yradius: 'Y半径', + Zradius: 'Z半径', + + // 粒子系统 + fire: '火炎', + water: '水滴', + fireworks: '花火', + displayEdit: '編集ボックスの表示', + parameterSet: 'パラメータの設定', + emitSpeed: '放出速度', + lifeCycle: 'ライフサイクル', + speedRange: '速度範囲', + scaleRange: '比例範囲', + emitType: '放出タイプ', + particleNumber: '放出数', + particleSize: '粒子サイズ', + gravity: '重力', + coneEmit: '円錐形放射', + sphereEmit: '球体放射', + boxEmit: '箱状放射', + + //按钮 + query: 'クエリ', + + // 映像再生 + videoFileSet: '映像再生', + videoSet: '再生', + distencePlace: '投影距離', + visibleVideoLine: '映像再生線の表示', + localVideoPath: '映像ファイルを選択してください', + videoPath: '映像パス', + deleteVideo: '現在の再生映像を削除してください', + + // レイヤーリスト + isShow: '表示可能', + rapidLocate: '現在レイヤーにポジション', + remove: '削除', + delUnsupported: 'デフォルトのアンダーレイでは削除はサポートされていません', + moreFun: 'その他の機能', + + + /** + * 组件内部界面 + * */ + + // 全局 + s3mLayer: 'S3Mレイヤー', + imgLayer: '画像レイヤー', + mvtLayer: 'MVTレイヤー', + terrainLayer: '地形レイヤー', + wmtsLayer: 'WMTSサービス', + sure: 'OK', + cancle: 'キャンセル', + analysis: '解析', + clear: 'クリア', + edit: '編集', + color: 'カラー', + + // レイヤーリスト-无 + allLayer: 'すべてレイヤー', + deleteLayer: 'レイヤーの削除', + defaultTerrain: 'デフォルト地形', + defaultImage: 'デフォルト画像', + lnglatMap: '緯度経度ベースマップ', + unnamedLayer: '新規レイヤー', + stkTerrain: 'STK地形', + unnamedTerrain: '新規地形', + superMapTerrain: 'SuperMapOnline 地形', + tiandituTerrain: 'Tiandi地形', + noTerrain: '地形無し', + + // データの追加 + type: 'タイプ', + layer: 'レイヤー', + scene: 'シーン', + localData: 'ローカルデータ', + + address: 'パス', + name: '名', + addToken: 'tokenの追加', + layerUrl: 'レイヤーURLを入力してください', + layerName: '入力レイヤー名を入力してください', + localFilePath: 'ローカルKMLデータを選択してください', + localFilePathFly: 'ローカルfpfファイルを選択してください', + chooseFile: '選択', + selectableLayers: '選択可能のレイヤー', + + urlIsNull: 'レイヤーURLを空に設定できません,URLを入力してください', + urlCheckedsuccess: 'レイヤーURLの認証に成功しました', + addScpFailed: 'SCPのロードに失敗しました。ネットワーク接続状態、またはURLを確認してください', + openSceneSuccess: 'シーンを開いて成功しました', + + // 3D解析-3D + // 見通し解析 + longitude: '経度', + latitude: '緯度', + elevation: '標高', + visibleAreaColor: '可視エリアカラー', + invisibleAreaColor: '不可視エリアカラー', + barrierHighlightColor: 'バリアハイライトカラー', + displayBarrier: 'バリアノードの表示', + highlightBarrier: 'ハイライトバリア', + + // 見通し領域解析 + additionalHeight: '付加高さ', + horizontalFov: '水平画角', + verticalFov: '垂直画角', + hintLineColor: 'ヒントラインカラー', + visibleBody: '可視域ボリュームの表示', + visibleBodyColor: '可視域ボリュームカラー', + invisibleBody: '不可視域ボリュームの表示', + hiddenAreaColor: '不可視域ボリュームカラー', + viewshedAnimation: '動態見通し領域', + viewshedAnimationTip: 'モデル移動ルートを描画し、右クリックして終了', + + // シェード解析 + timeInterval: '時間間隔', + space: '間隔', + bottomHeight: '底部標高', + stretchingHeight: '押出し高さ', + bodyDisplay: 'ボディ表示', + showShadow: 'シェードの表示', + filterInterval: 'フィルター区分', + startTime: '開始時間', + endTime: '終了時間', + ShadowStartTip: '一日内の太陽とシェードの映像を再生します。', + ShadowStartTip2: '一年内の太陽とシェードの映像を再生します', + ShadowStopTip: '映像を停止', + DaylightingRate: 'いんえいりつ', + analyseResult: '解析結果', + + // 断面解析 + startLongitude: '起点経度', + startLatitude: '起点緯度', + startElevation: '起点標高', + endLongitude: '終点経度', + endLatitude: '終点緯度', + endElevation: '終点標高', + disPlayInfo: '断面表示', + Section: '截面', + GPUSection: "GPU截面", + + // スカイライン + DisplayMode: '表示モード', + AnalysisRadius: '解析半径', + LineWidth: 'ライン幅', + LineDisplay: 'ライン表示', + FaceDisplay: 'ポリゴン表示', + BodyDisplay: 'ボディ表示', + SkylineColor: 'スカイラインカラー', + SkylineBodyColor: 'スカイラインボディカラー', + ObstacleColor: 'バリアカラー', + Display2D: '2D表示', + HighlightObstacles: 'ハイライトバリア', + GlobeNoAnalysis: '地表解析', + drawHeightLimitingBody: '描画高さ制限オブジェクト', + Skyline2D: '2Dスカイライン', + limitingBody: '高さ制限オブジェクト', + + // 立面図 + maxHeight: '最大高さ', + maxDistence: '最遠距離', + Draw: "描画", + Plot: "作図", + + // レイヤー属性 + chooseLayer: 'レイヤーの選択', + renderMode: 'レンダリングモード', + singleRender: '片面レンダリング', + doubleRender: '両面レンダリング', + shadowBrightness: 'シェード輝度', + objectHiding: 'オブジェクト表示可能', + MinVisibleDistance: '最小表示可能距離', + MaxVisibleDistance: '最大表示可能距離', + multiple: 'マルチ選択', + disPlayAll: 'すべてを表示', + disPlaySelected: '選択オブジェクトのみ表示', + hideSelected: '選択オブジェクトのみ非表示', + noLayer: 'レイヤー無し', + + // レイヤースタイル + fillStyle: 'フィルスタイル', + foreColor: '前景色', + selectedColor: '選択カラー', + selectColorMode: '選択カラーモード', + colorMix: '混合', + colorReplace: '置換', + layerTransparency: 'レイヤー透明度', + reset: 'リセット', + fillBothMode: 'フィルとフレームモード', + attrSaveOk: 'レイヤー属性の保存に成功しました', + + // レイヤー操作 + qxModel: '掘削と平坦化', + offSet: 'オフセット', + layerColor: 'レイヤーカラー', + excavate: '掘削', + flatten: '変更', + flatten2: '平坦化', + onQXModel: '当機能は3Dタイルキャッシュのみをサポート', + offsetMode: '操作モード', + offsetX: 'X軸でオフセット', + offsetY: 'Y軸でオフセット', + offsetZ: 'Z軸でオフセット', + selected: '選択', + + // 属性クエリ + dataServerUrl: "データサービス", + dataSourceName: 'データソース', + inputServerUrl: 'レイヤーデータサービスURLを入力してください', + inputSourceName: '当レイヤーの対応データソースを入力してください', + queryResult: 'クエリ結果', + inputUrlName: '当レイヤークエリのデータサービスと対応データソースを入力してください', + bindInfoOK: "バンドに成功しました。モデルクエリ情報をクリックしてください", + bindUpdate: "レイヤーデータソースのバインド変更に成功しました", + noData: "データ無し", + + // 地図検索 + mapDataUrl: "データサービス", + datasetName: "データセット", + attributeList: 'プロパティ・シート', + listTotal_s: '属性テーブル(合計', + listTotal_e: '個の要素', + chooseFieldTip: 'フィルタするフィールドの選択', + filter: 'フィルタリング', + shpQueryTip: 'データクエリーを指定する(クエリーデータは必ず地図サービス座標系と一致する)', + clickQuery: 'ポイント選択クエリー', + clearEntityTip: '球面に描画されたシェイプを消去するには', + refreshData: 'データのリフレッシュ', + mydata: 'マイデータ', + queryPlaceHolder: "選択フィールドフィルタリングキーを入力してください", + queryWait: 'お問い合わせしております少々お待ちください', + resouceName: 'リソース名', + resouceType: 'リソースタイプ', + createTime: '作成時間', + mapQueryTip: 'データサービスURLと対応データセットを入力してください', + clickQueryClose: 'ポイント選択機能がオフになっています', + clickQueryCloseTip: '要素情報を取得するにはマウスクリック、ポイント選択を閉じるには右クリック', + dataFiltering: 'データのフィルタ...', + recently: '少し前', + chooseField: 'フィールドの選択', + filterFiledTip: 'プロパティ・シート表示フィールドのフィルタ', + + // 倾斜模型单体化 + featrueID: "要素ID", + singleTip_waring: 'この傾斜撮影レイヤーに対応するデータサービス、データソース、データセットを入力してください', + singleTip_success: '傾斜撮影レイヤーとデータサービスのバインドに成功し、クリックして単体化検索を行う', + + // 我的サービス-iportal + getData: 'データ取得中、お待ちください', + serviceName: 'サービス名', + resourceSubType: 'サービスタイプ', + updateTime: '更新時間', + serviceUrl: 'サービスURL', + year: '年', + month: '月', + day: '日', + yearsAgo: ' 年前', + monthsAgo: ' 月前', + weeksAgo: ' 週前', + daysAgo: ' 日前', + hoursAgo: ' 時間前', + minutesAgo: '分前', + secondsAgo: '先', + + // message + layerExistMsg: '当レイヤーは既に存在しています。再度ロードしないでください。', + imgUrlErrorMsg: '画像サービスURLエラー。画像のロードに失敗しました。', + scpUrlErrorMsg: 'SCP URLパスエラー。S3Mレイヤーのロードに失敗しました。', + + /** + * 图片资源名 - 演示 + * */ + BeijingCBD: "BeijingCBD", + originCBD: "オリジナルCBD(テスト用)", + SophiaChurch: "ソフィア教会", + MountEverest: "エベレスト地形画像", + BIMBuilding: "BIM建物", + Pointcloud: "点群", + Histogram: "ヒストグラム", + PhotographyModel: "3Dタイルキャッシュモデル", + JingJinMVT: "JingJinMVT", + ChongqingBaimo: "Chongqing白キャッシュ", + YokohamaBaimo: "横浜白キャッシュ", + transformerStation: 'サンプルステーション', + + LocalImage: 'ローカル画像', + BingMap: 'Bingベースマップ', + TIANDITU: 'TiandiMap', + OSM: 'OSMベースマップ', + GRIDIMAGERY: '緯度経度ベースマップ', + japanStand: '日本地理院標準地図', + japanPale: '日本地理院淡色地図', + japanBlank: '日本地理院の白い地図', + japanImage: '日本地理院の映像図', + + SuperMapOnlineTerrain: 'SuperMapオンライン地形', + TiandituTerrain: 'TiandiMap地形', + STKTerrain: 'STK地形', + + // Tip + qxModelTip: 'この機能は、傾斜撮影用の3 Dモデルのみをサポートしています', + repeatAddTip: "繰り返し追加しないでください!", + repeatAddWMTSTip: "このwmtsレイヤーは追加されています。繰り返し追加しないでください", + + // 新增 + outLineColor: "輪郭線の色", + outLineWidth: "輪郭線の幅", + lightTip_edit: "ライトモデルを選択し、プロパティを編集してください", + lightTip_del: "光源モデルを選択して削除してください", + wireframeColor: "ワイヤフレームカラー", + chooseThenOffset: "選択したモデルをクリックしてオフセットします", + fillColor: "じゅうてんカラー", + tree_darg_tip:'兄弟ディレクトリの下でドラッグしてください', + rename:'名前を変更', + bindMediaField:'メディアフィールドをバインドする', // 媒体字段(地图查询)- start + mediaField:'メディア分野', + picture:'写真', + video:'ビデオ', + field:'分野', + title:'タイトル', + inputTitle:'タイトルを入力してください', + customMediaLink:'カスタムメディアリンク', + featureID:'機能ID', + link:'リンク', + inputOnlineImgLink:"オンライン画像アドレスを入力してください", + inputOnlineVideoLink_iportal:"動画のアドレスを入力してください(のみ iportal)", // 媒体字段(地图查询)- end + qxLayerDataUrl:'このレイヤーのデータ サービス URL を入力してください', + qxLayerDataSource:'このレイヤーに対応するデータ ソースを入力してください', + qxLayerDataset:'このレイヤーに対応するデータセットを入力してください', +} + +window.local_ja = local_ja; \ No newline at end of file diff --git a/SuperMap iEarth/public/locale/ru.js b/SuperMap iEarth/public/locale/ru.js new file mode 100644 index 00000000..bb87454c --- /dev/null +++ b/SuperMap iEarth/public/locale/ru.js @@ -0,0 +1,680 @@ +const local_ru = { + /** + * UI界面 + * */ + + // header 页头 + earth3D: '3D-глобус', + control: 'Панель управления', + control_title: 'Главная панель управления', + save: 'Сохранить', + close: 'Закрыть', + share: 'Опубликовать', + loginPlease: 'Пожалуйста, войдите в систему', + tourists: 'Туристы', + + // 保存面板 + sceneSave: 'Сохранение сцены', + saveDate: 'Дата сохранения', + sceneName: 'Имя сцены', + sceneLable: 'Теги сцены', + authorName: 'Имя автора', + sceneDescribe: 'Описание сцены', + placeHolder: 'Укажите информацию', + sceneSaveNameCannotBeNull: 'Имя сцены не может быть пустым', + sceneSaveLableCannotBeNull: 'Укажите теги сцены', + saveErrorNeedOnline: 'Не удалось сохранить: вам необходимо выполнить вход в портал', + saveSuccess: 'Сцена успешно сохранена', + saveUpdate: 'Сцена успешно обновлена', + + // widgets 组件列表 + w_search: 'Поиск', + w_north: 'Север', + w_reset: 'Сбросить', + w_zoomOut: 'Отдалить', + w_zoomIn: 'Приблизить', + w_fullScreen: 'Полный экран', + w_home: 'Главная', + + // toolBar 侧边栏 + t_layerList: 'Список слоев', + t_addData: 'Добавить данные', + t_analyse3d: '3D-анализ', + t_measure: 'Измерение', + t_sceneProperties: 'Сцена', + t_objectPainting: 'Рисование объекта', + + // 面板-header + layerList: 'Список слоев', + addData: 'Добавить данные', + analyseSeries: '3D-анализ', + sceneProperties: 'Сцена', + measure: 'Измерение', + objectPainting: 'Рисование объекта', + layerOpration: 'Действие', + layerAttribute: 'Атрибут', + layerStyle: 'Стиль', + layerQuery: 'Запрос', + mapQuery: 'Карта', + qxModelSingle: 'Мономеризация наклонной модели', + qxSingle: "Наклонение мономеров", + + // 操作面板 - 添加数据: + publicService: "Общедоступный сервис", + customService: "Пользовательский сервис", + onlineBaseMap: "Базовая карта", + onlineTerrain: "Рельеф", + portalService: "Мой сервер", + + // 操作面板-三维分析 + clip: 'Вырезание', + terrain: 'Рельеф', + analysis3d: '3D-анализ', + spatialAnalysis: 'Геоанализ', + + // 三维分析 + Intervisibility: 'Видимость', + viewableRange: 'Обоюдная видимость', + ligShadowAnalysisth: 'Тень', + profile: 'Профиль', + Skyline: 'Линия горизонта', + FacePlot: 'Построение', + + // 裁剪 + boxClip: 'Рамка', + planeClip: 'Плоскость', + crossClip: 'Пересечение', + polygonClip: 'Полигон', + clipMode: 'Режим вырезания', + inner: 'Внутри', + outer: 'Снаружи', + boxclipTip: 'Щелкните левой кнопкой мыши чтобы нарисовать основание 3D-рамки переместите мышь чтобы нарисовать высоту коробки и щелкните правой кнопкой мыши чтобы закончить рисование', + displayCilpPlane: 'Показать плоскость вырезания', + verticalNormal: 'Вертикальная нормаль', + parallelNormal: 'Параллельная нормаль', + clipWidth: 'Вырезать по ширине', + clipHeight: 'Вырезать по высоте', + rotateX: 'Повернуть по оси X', + rotateY: 'Повернуть по оси Y', + rotateZ: 'Повернуть по оси Z', + + // 地形操作 + terrainOperation: 'Инструмент', + inundationAnalysis: 'Затопление', + slopeAspect: 'Уклон', + Isoline: 'Изолиния', + terrainExcavate: 'Выемка', + terrainChange: 'Сгладить', + excavationDepth: 'Глубина', + excavateAreaOffsetUp: 'Поднять', + upHeight: 'Высота поднятия', + editArea: 'Редактировать область', + editAreaZ: 'Редактировать Z-ось области', + stkUnsupported: 'Сейчас рельеф STK не поддерживается', + maximumVisibleElevation: 'Макс. видимый уровень высот', + minimumVisibleElevation: 'Мин. видимый уровень высот', + currentElevation: 'Текущая высота', + transparency: 'Прозрачность', + inundationSpeed: 'Скорость затопления', + analysisArea: 'Область анализа', + minSlope: 'Мин. уклон', + maxSlope: 'Макс. уклон', + displayMode: 'Режим отображения', + partRegion: 'Целевой полигон', + allRegion: 'Все полигоны', + noRegion: 'Ни один полигон', + allDisplay: "Отображение поверхности и стрелки", + arrowDisplay: "Отображение стрелки", + faceDisplay: "Отображение поверхность", + equivalentIsoline: 'Эквивалент', + contourColor: 'Цвет изолинии', + contourLineFill: 'Заливка изолинии', + contourFaceFill: 'Заливка поверхности изолинии', + contourAllFill: 'Изолиния и поверхность', + contourNoFill: 'Нет файла', + + //操作面板-量算 + measureMode: 'Режим измерения', + pickPoint: 'Выбрать точку', + contour: 'Контур', + measureAction: 'Измерение', + mode_space: 'Режим из космоса', + mode_ground: 'Геодезическое', + mode_projection: 'На плоскости', + measureDistence: 'Измерение расстояния', + measureArea: 'Измерение площади', + measureHeight: 'Измерение высоты', + distence_cl: "расстояние", + area: "площадь", + spaceDistance: "Простр. расстояние", + verticalHeight: "Высота по-вертикали", + horizontalDistance: "Расстояние по-горизонтали", + + // 操作面板-参数设置 + baseAttribute: 'Атрибут', + flying: 'Полет', + ligth: 'Свет', + viewPorts: 'Точки наблюдателей', + speciallyEffect: 'Специальные эффекты', + + //操作面板-场景属性-勾选 + earth: 'Глобус', + sun: 'Солнце', + depthInspection: 'Исследование глубины', + atomsphereRender: 'Отображение атмосферы', + fogEffect: 'Эффект тумана', + cloudLayer: 'Слой облаков', + skyBox: 'Небо и горизонт', + timeAxis: 'Ось времени', + displayFrame: 'Область отображения', + + //操作面板-场景属性-选项 + brightness: 'Яркость', + contrastRatio: 'Контрастность', + colorTone: 'Цветовой тон', + saturation: 'Насыщенность', + gamma: 'Гамма', + showUnderground: 'Показать под землей', + surfaceTransparency: 'Прозрачность поверхности', + displayCoordinate: 'Нажмите мышью на любое место, чтобы вернуть результат', + coordinateQuery: 'Запрос координат', + coordinateTip: 'Долгота широта высота', + + //操作面板-飞行 + flyRoute: 'Маршрут полета', + flyRoute_1: 'Маршрут полета 1', + import: 'Импорт', + displayRoute: 'Отобразить маршрут', + displayStation: 'Отобразить станцию', + rotateByPoint: 'Вращение по точке', + rotateSpeed: 'Скорость вращения', + rotateRepeat: 'Повтор вращения', + selectStation: 'Выбрать станцию', + play: 'Воспроизвести', + pause: 'Пауза', + stop: 'Остановить', + flySpeed: 'Скорость полета', + addStation: 'Добавить станцию', + deleteStation: 'Удалить станцию', + restore: 'Восстановить', + importFlyRoute: 'Импортировать маршрут полета', + createFlyRoute: 'Создать маршрут полета', + addedStops: 'Добавить остановки', + downLoad: 'Загрузить', + addStopSuccess: 'Остановка успешно добавлена', + atLeastTwoStop: 'Для сохранения требуется не менее двух узлов', + + //操作面板-灯光 + symbolLibrary: 'Библиотека символов', + lightsourceColor: 'Светлый цвет', + diffusionDistance: 'Расстояние рассеивания', + lightDecay: 'Затухание света', + lightsourceIntensity: 'Интенсивность света', + spotlightRange: 'Диапазон источника света', + displayLightmodel: 'Модель источника света', + displayLightcorrdinate: 'Координаты источника света', + modelInformation: 'Информация о модели', + pointLight: 'Точечный свет', + spotLight: 'Световое пятно', + parallelLight: 'Параллельный свет', + addSpotLightTip: 'Щелкните левой кнопкой мыши, чтобы нарисовать две точки определяющие направление источника света, щелкните правой кнопкой мыши, чтобы завершить рисование', + + //操作面板-视图模式 + viewMode: 'Режим просмотра', + splitscreenModel: 'Разделить экран показа модели', + openRollershutter: 'Открыть шторку', + noneSplitscreen: 'Не использовать разделенный экран', + horizontalSplitscreen: 'Разделить горизонтально', + verticalSplitscreen: 'Разделить вертикально', + threeViewport: 'Три окна просмотра', + fourViewport: 'Группа окон просмотра', + noneRollershutter: "Не использовать шторку", + leftrightRollershutter: 'Шторка слева/направо', + updownRollershutter: 'Шторка вверх/вниз', + customRollershutter: 'Пользовательская шторка', + shieldDirection: 'Направление скрытия', + left: 'Лево', + right: 'Право', + up: 'Вверх', + down: 'Вниз', + + //操作面板-场景特效 + floodLight: 'Прожектор', + scanLine: 'Линия сканирования', + rainSnow: 'Дождь и снег', + openFloodlight: 'Открыть прожектор', + heatMap: 'Карта интенсивности', + brightnessThreshold: 'Порог яркости', + floodlightThreshold: 'Порог яркости прожектора ', + scanLineTip: 'Задать прямоугольник по двум точкам', + scanMode: 'Режим сканирования', + scanColor: 'Сканирование цвета', + scanTexture: 'Сканирование текстуры', + scanWidth: 'Ширина сканирования', + scanSpeed: 'Скорость сканирования', + scanPeriod: 'Цикл сканирования', + customScanDirection: 'Пользовательское направление сканирования', + customScanCenter: 'Пользовательский центр сканирования', + lineShape: 'Линия', + circleShape: 'Окружность', + noneScanTexture: 'Не использовать текстуру', + lineTexture1: 'Текстура линии 1', + lineTexture2: 'Текстура линии 2', + ringTexture1: 'Текстура кольца 1', + ringTexture2: 'Текстура кольца 2', + loopedhexagonTexture: 'Текстура циклов шестиугольников', + addScanLineTip: 'Щелкните левой кнопкой мыши, чтобы нарисовать две точки для определения направления линии сканирования. Щелкните правой кнопкой мыши, чтобы завершить', + openRain: 'Отобразить дождь', + openSnow: 'Отобразить снег', + rainAngle: 'Угол падения дождя', + rainSpeed: 'Скорость падения дождя', + snowAngle: 'Угол падения снега', + snowSpeed: 'Скорость падения снега', + snowDensity: 'Плотность снега', + + //通用 + add: 'Добавить', + meterSecond: 'м/с', + meter: 'м', + second: 'с', + + // 操作面板-对象绘制 + drawLine: 'Линия', + drawPolygon: 'Полигон', + skit: 'Набросок', + particle: 'Часть', + geometry: 'Геометрия', + drawMode: 'Режим рисования', + lineColor: 'Цвет линии', + lineWidth: 'Ширина линии', + editLine: 'Редактировать линию', + editLineZ: 'Редактировать Z-ось линии', + editZaxis: 'Редактировать Z-ось', + solidLine: 'Сплошная линия', + dashedLine: 'Пунктирная линия', + outline: 'Контур', + arrowLine: 'Линия стрелки', + haloLine: 'Линия гало', + wakeLine: 'Линия восхода', + pureColor: 'Чистый цвет', + grid: 'Сетка', + stripe: 'Полоса', + polygonColor: 'Цвет полигона', + gridLineWidth: 'Ширина линий сетки', + gridLineNumber: 'Число линий сетки', + unitTransparency: 'Прозрачность элемента', + oddStripColor: 'Цвет неровной полосы', + evenStripColor: 'Цвет ровной полосы', + stripRepetition: 'Количество повторений полос', + stripOffset: 'Смещение полосы', + spaceMode: 'Режим из космоса', + closeGroundMode: 'Закрыть отображение поверхности', + closeS3MMode: 'Закрыть S3M', + closeBoth: 'Привязка к земле или объекту', + editLineTip: 'Начните добавление левой кнопкой мыши, завершите правой кнопкой мыши, выберите объект для редактирования', + editLineTip2: 'Щелкните левой кнопкой мыши, чтобы выбрать объект рисования для редактирования', + symbolType: 'Тип символа', + symbolColor: 'Цвет символа', + addMode: 'Режим добавления', + spacing: 'Интервал', + count: 'Количество', + multiSelection: 'Выбор нескольких символов', + tree: 'Дерево', + facilities: 'Объекты', + traffic: 'Трафик', + singleAdd: 'Добавить один', + lineAdd: 'Добавить по маршруту', + AreaAdd: 'Добавление площади', + delMode: 'Режим удаления', + singleDel: 'Удалить по-одному', + wholeDel: 'Удалить линию или поверхность', + addSkitTip: 'Выберите символ', + delSkitTip: 'Щелкните по скетчу, добавленному к сцене', + cylinder: 'Цилиндр', + cube: 'Куб', + sphere: 'Сфера', + cone: 'Конус', + semiMajorAxis: 'Большая полуось', + semiMinorAxis: 'Малая полуось', + granularity: 'Детализация', + rotate: 'Повернуть', + fillMode: 'Режим заполнения', + wireframe: 'Режим каркаса', + width: 'Ширина', + length: 'Длина', + height: 'Высота', + distence: "Расстояние", + Xradius: 'X-радиус', + Yradius: 'Y-радиус', + Zradius: 'Z-радиус', + + // 粒子系统 + fire: 'Огонь', + water: 'Вода', + fireworks: 'Фейерверк', + displayEdit: 'Отобразить редактирование', + parameterSet: 'Набор параметров', + emitSpeed: 'Скорость выпуска', + lifeCycle: 'Жизненный цикл', + speedRange: 'Диапазон скоростей', + scaleRange: 'Диапазон масштабов', + emitType: 'Тип выпуска', + particleNumber: 'Число частей', + particleSize: 'Размер части', + gravity: 'Гравитация', + coneEmit: 'Создание конуса', + sphereEmit: 'Создание сферы', + boxEmit: 'Создание куба', + + //按钮 + query: 'Запрос', + + // 视频投放 + videoFileSet: 'Набор видеофайлов', + videoSet: 'Набор', + distencePlace: 'Расстояние сброса', + visibleVideoLine: 'Линия видео', + localVideoPath: 'Выберите видеофайл', + videoPath: 'Путь к видеофайлу', + deleteVideo: 'Удалить текущий видеофайл', + + // 图层列表 + isShow: 'Точный и неточный', + rapidLocate: 'Найти', + remove: 'Удалить', + delUnsupported: 'Невозможно удалить базовую карту', + moreFun: 'Больше функций', + + + /** + * 组件内部界面 + * */ + + // 全局 + s3mLayer: 'Слой S3M', + imgLayer: 'Слой изображений', + mvtLayer: 'Слой MVT', + terrainLayer: 'Слой рельефа', + wmtsLayer: 'Слой WMTS', + sure: 'Точно', + cancle: 'Отменить', + analysis: 'Анализ', + clear: 'Очистить', + edit: 'Редактировать', + color: 'Цвет', + + // 图层列表-无 + allLayer: 'Все слои', + deleteLayer: 'Удалить слой', + defaultTerrain: 'Рельеф по умолчанию', + defaultImage: 'Изображения по умолчанию', + lnglatMap: 'Грид изображений', + unnamedLayer: 'Слой без имени', + stkTerrain: 'Рельеф STK', + unnamedTerrain: 'Рельеф без имени', + superMapTerrain: 'Рельеф Cyclone', + tiandituTerrain: 'Рельеф сервиса 1', + noTerrain: 'Нет рельефа', + + // 添加数据 + type: 'Тип', + layer: 'Слой', + scene: 'Сцена', + localData: 'Локальные данные', + + address: 'Адрес', + name: 'Имя', + addToken: 'Добавить токен', + layerUrl: 'Введите правильный URL-адрес', + layerName: 'Введите название слоя', + localFilePath: 'Выберите локальный файл .KML', + localFilePathFly: 'Выберите локальный файл .fpf', + chooseFile: 'Файл', + selectableLayers: 'Слои для выбора', + + urlIsNull: 'URL слоя не может быть пустым, введите URL', + urlCheckedsuccess: 'Проверка URL-адреса слоя прошла успешно', + addScpFailed: 'Не удалось загрузить SCP. Проверьте, правильно ли указано состояние сетевого подключения или URL-адрес.', + openSceneSuccess: 'Открыть сцену успешно', + + // 三维分析-3D + // 通视分析 + longitude: 'Долгота', + latitude: 'Широта', + elevation: 'Высота', + visibleAreaColor: 'Видимый цвет', + invisibleAreaColor: 'Невидимый красный цвет', + barrierHighlightColor: 'Цвет барьера', + displayBarrier: 'Показать барьер', + highlightBarrier: 'Выделить барьер', + + // 可视域分析 + additionalHeight: 'Дополнительная высота', + horizontalFov: 'Горизонтальный угол обзора', + verticalFov: 'Вертикальный угол обзора', + hintLineColor: 'Цвет линии окончания', + visibleBody: 'Видимое тело', + visibleBodyColor: 'Цвет видимого тела', + invisibleBody: 'Невидимое тело', + hiddenAreaColor: 'Цвет невидимого тела', + viewshedAnimation: 'Анимированная обоюдная видимость', + viewshedAnimationTip: 'Нарисуйте траекторию движения модели, щелкните правой кнопкой мыши, чтобы завершить', + + // 阴影分析 + timeInterval: 'Интервал времени', + space: 'Пробел', + bottomHeight: 'Высота основания', + stretchingHeight: 'Высота вытяжения', + bodyDisplay: 'Отобразить тело', + showShadow: 'Показать тень', + filterInterval: 'Интервал фильтра', + startTime: 'Время начала', + endTime: 'Время окончания', + ShadowStartTip: 'Воспроизвести анимацию солнечного света и теней за день', + ShadowStartTip2: 'Воспроизвести анимацию солнечного света и теней за год', + ShadowStopTip: 'Остановить анимацию', + DaylightingRate: 'Темность', + analyseResult: 'Результат анализа', + + // 剖面分析 + startLongitude: 'Долгота начальной точки', + startLatitude: 'Широта начальной точки', + startElevation: 'Высота начальной точки', + endLongitude: 'Долгота конечной точки', + endLatitude: 'Широта конечной точки', + endElevation: 'Высота конечной точки', + disPlayInfo: 'Информация по секции', + Section: 'Раздел', + GPUSection: "Профиль граф. процессора", + + // 天际线 + DisplayMode: 'Режим отображения', + AnalysisRadius: 'Анализ радиуса', + LineWidth: 'Ширина линии', + LineDisplay: 'Отобразить линию', + FaceDisplay: 'Отобразить поверхность', + BodyDisplay: 'Отобразить тело', + SkylineColor: 'Цвет линии горизонта', + SkylineBodyColor: 'Цвет тела линии горизонта', + ObstacleColor: 'Цвет препятствия', + Display2D: 'Отображение 2D линии горизонта', + HighlightObstacles: 'Выделить барьеры', + GlobeNoAnalysis: 'Без анализа', + drawHeightLimitingBody: 'Нарисовать тело с ограниченной высотой', + Skyline2D: '2D-линия горизонта', + limitingBody: 'Ограничивающее тело', + + // 立面图 + maxHeight: 'Макс. высота', + maxDistence: 'Макс. расстояние', + Draw: "Нарисовать", + Plot: "Построение", + + // 图层属性 + chooseLayer: 'Выбрать слой', + renderMode: 'Режим отображения', + singleRender: 'Одинарное отображение', + doubleRender: 'Двойное отображение', + shadowBrightness: 'Яркость тени', + objectHiding: 'Скрыть объект', + MinVisibleDistance: 'Мин. видимое расстояние', + MaxVisibleDistance: 'Макс. видимое расстояние', + multiple: 'Несколько', + disPlayAll: 'Отобразить все', + disPlaySelected: 'Отобразить выборку', + hideSelected: 'Скрыть выборку', + noLayer: 'Нет слоя', + + // 图层风格 + fillStyle: 'Стиль заливки', + foreColor: 'Цвет переднего плана', + selectedColor: 'Выбранный цвет', + selectColorMode: 'Выбор цветового режима', + colorMix: 'Смешать', + colorReplace: 'Заменить', + layerTransparency: 'Прозрачность слоя', + reset: 'Сбросить', + fillBothMode: 'Заливка и рамка', + attrSaveOk: 'Атрибуты слоя успешно сохранены', + + // 图层操作 + qxModel: 'Выемки и сглаживание', + offSet: 'Смещение', + layerColor: 'Цвет слоя', + excavate: 'Выемка', + flatten: 'Изменения', + flatten2: 'Выровнять', + onQXModel: 'Поддерживается только наклонная съемка 3D-моделей', + offsetMode: 'Режим смещения', + offsetX: 'Смещение по X', + offsetY: 'Смещение по Y', + offsetZ: 'Смещение по Z', + selected: 'Выбрано', + + // 属性查询 + dataServerUrl: "URL сервера данных", + dataSourceName: 'Имя источника', + inputServerUrl: 'Введите URL-адрес сервиса данных слоя', + inputSourceName: 'Введите источник данных для этого слоя', + queryResult: 'Результаты запроса', + inputUrlName: 'Укажите сервис передачи данных и соответствующий источник данных необходимый для запроса этого слоя', + bindInfoOK: "URL сервера данных", + bindUpdate: "Изменение привязки источника данных слоя успешно", + noData: "Нет доступных данных", + + // 地图查询 + mapDataUrl: "URL данных карты", + datasetName: "Имя набора данных", + attributeList: 'Список атрибутов', + listTotal_s: 'Таблица атрибутов (всего', + listTotal_e: 'объектов)', + chooseFieldTip: 'Выберите поля для фильтрации', + filter: 'Фильтр', + shpQueryTip: 'Укажите запрос данных (данные запроса должны соответствовать системе координат картографического сервиса)', + clickQuery: 'Запрос по щелчку мыши', + clearEntityTip: 'Очистите форму нарисованную на сфере', + refreshData: 'Обновить данные', + mydata: 'Мои данные', + queryPlaceHolder: 'Выберите ключевые поля для фильтрации', + queryWait: 'Идет запрос, пожалуйста, подождите', + resouceName: 'Имя пользователя', + resouceType: 'Тип ресурса', + createTime: 'Время создания', + mapQueryTip: 'Введите URL-адрес сервиса обработки данных и соответствующий набор данных', + clickQueryClose: 'Работа функции по щелчку мыши была отключена', + clickQueryCloseTip: 'Щелкните мышью, чтобы получить информацию об элементе, щелкните правой кнопкой мыши, чтобы закрыть выборку', + dataFiltering: 'Фильтрация данных...', + recently: 'Недавние', + chooseField: 'Выбор поля', + filterFiledTip: 'Фильтрация полей атрибутов', + + // 倾斜模型单体化 + featrueID: "Элементы ID", + singleTip_waring: 'Введите соответствующий наклонному фотографическому слою: служба данных, источник данных, набор данных', + singleTip_success: 'Наклонный фотографический слой успешно привязан к службе данных, щелкните для одиночного запроса', + + // 我的服务-iportal + getData: 'Получение данных. Это может занять некоторое время', + serviceName: 'Имя', + resourceSubType: 'Тип', + updateTime: 'Время обновления', + serviceUrl: 'URL-адрес', + year: 'год', + month: 'месяц', + day: 'день', + yearsAgo: 'лет назад', + monthsAgo: 'месяцев назад', + weeksAgo: 'недель назад', + daysAgo: 'дней назад', + hoursAgo: 'часов назад', + minutesAgo: 'минут назад', + secondsAgo: 'секунд назад', + + // message + layerExistMsg: 'Этот слой уже существует, не загружайте его снова.', + imgUrlErrorMsg: 'Ошибка URL-адреса сервиса изображений, не удалось загрузить изображение.', + scpUrlErrorMsg: 'Ошибка URL-адреса SCP, не удалось загрузить слой S3M.', + + /** + * 图片资源名称 - 演示 + * */ + BeijingCBD: "CBD1", + originCBD: "ИсходныйCBD", + SophiaChurch: "Софийская церковь", + MountEverest: "Гора Эверест", + BIMBuilding: "Построение BIM", + Pointcloud: "Облако точек", + Histogram: "Гистограмма", + PhotographyModel: "Фотограмметрическая модель", + JingJinMVT: "MVT1", + ChongqingBaimo: "Челябинск", + YokohamaBaimo: "Екатеринбург", + transformerStation: 'Нефтепромысловая станция', + + LocalImage: 'Локальное изображение', + BingMap: 'Карта Bing', + TIANDITU: 'Сервис карт 1', + OSM: 'OSM', + GRIDIMAGERY: 'Грид изображений', + japanStand: 'Стандартная карта', + japanPale: 'Светлая карта', + japanBlank: 'Белая карта', + japanImage: 'Карта изображения', + + SuperMapOnlineTerrain: 'ГИС ЦИКЛОН', + TiandituTerrain: 'Сервис карт 1', + STKTerrain: 'STK', + + // Tip + qxModelTip: 'Эта функция поддерживает только наклонные снимки для 3D-моделей', + repeatAddTip: "Не добавляйте повторно!", + repeatAddWMTSTip: "Слой WMTS добавлен, не добавляйте повторно ", + + // 新增 + outLineColor: "Цвет контура", + outLineWidth: "Ширина контура", + lightTip_edit: "Выберите модель источника света и отредактируйте свойства ", + lightTip_del: "Выберите модель источника света для удаления", + wireframeColor: "Цвет рамки", + chooseThenOffset: "Нажмите на выбранную модель, а затем переместите", + fillColor: "Цвет заполнения", + tree_darg_tip:'Перетащите в каталог того же уровня', + rename:'Переименовать', + bindMediaField:'Привязка медиа-полей', // 媒体字段(地图查询)- start + mediaField:'медиа-поля', + picture:'картина', + video:'видео', + field:'Поле', + title:'заголовок', + inputTitle:'Пожалуйста, введите название', + customMediaLink:'Пользовательские медиа-ссылки', + featureID:'элементы', + link:'Связь', + inputOnlineImgLink:"Пожалуйста, введите адрес онлайн-изображения", + inputOnlineVideoLink_iportal:"Пожалуйста, введите адрес видео(только iportal)", // 媒体字段(地图查询)- end + qxLayerDataUrl:'Введите URL-адрес службы данных для этого слоя.', + qxLayerDataSource:'Пожалуйста, введите источник данных, соответствующий этому слою', + qxLayerDataset:'Пожалуйста, введите набор данных, соответствующий этому слою', +} + +window.local_ru = local_ru; \ No newline at end of file diff --git a/SuperMap iEarth/public/locale/zh.js b/SuperMap iEarth/public/locale/zh.js new file mode 100644 index 00000000..d0782eb0 --- /dev/null +++ b/SuperMap iEarth/public/locale/zh.js @@ -0,0 +1,680 @@ +const local_zh = { + /** + * UI界面 + * */ + + // header 页头 + earth3D: '三维地球', + control: '控制台', + control_title: 'IEarth Pro 控制台', + save: '保存', + close: '关闭', + share: '分享', + loginPlease: '请登录', + tourists: '游客', + + // 保存面板 + sceneSave: '场景保存', + saveDate: '存储日期', + sceneName: '场景名称', + sceneLable: '场景标签', + authorName: '作者名称', + sceneDescribe: '场景描述', + placeHolder: '请输入', + sceneSaveNameCannotBeNull: '保存场景名称不能为空!', + sceneSaveLableCannotBeNull: '保存场景标签不能为空!', + saveErrorNeedOnline: '存储失败,请先登录iPortal或Online账户......', + saveSuccess: '场景保存成功!', + saveUpdate: '场景更新成功!', + + // widgets 组件列表 + w_search: '搜索', + w_north: '指北', + w_reset: '重置', + w_zoomOut: '缩小', + w_zoomIn: '放大', + w_fullScreen: '全屏', + w_home: '首页', + + // toolBar 侧边栏 + t_layerList: '图层列表', + t_addData: '添加数据', + t_analyse3d: '三维分析', + t_measure: '量算', + t_sceneProperties: '场景', + t_objectPainting: '对象绘制', + + // 面板-header + layerList: '图层列表', + addData: '添加数据', + analyseSeries: '三维分析', + sceneProperties: '场景', + measure: '量算', + objectPainting: '对象绘制', + layerOpration: '图层操作', + layerAttribute: '图层属性', + layerStyle: '图层风格', + layerQuery: '属性查询', + mapQuery: '地图查询', + qxModelSingle: '倾斜模型单体化', + qxSingle: "倾斜单体化", + + // 操作面板-添加数据 + publicService: "公共服务", + customService: "自定义服务", + onlineBaseMap: "在线底图", + onlineTerrain: "在线地形", + portalService: "我的服务", + + // 操作面板-三维分析 + clip: '裁剪', // 内嵌 + terrain: '地形', + analysis3d: '三维分析', + spatialAnalysis: '空间分析', + + // 三维分析 + Intervisibility: '通视', + viewableRange: '可视域', + ligShadowAnalysisth: '阴影', + profile: '剖面', + Skyline: '天际线', + FacePlot: '立面图', + + // 裁剪 + boxClip: 'Box裁剪', + planeClip: '平面裁剪', + crossClip: 'Cross裁剪', + polygonClip: '多边形裁剪', + clipMode: '裁剪模式', + inner: '内部', + outer: '外部', + boxclipTip: '点击鼠标左键绘制box底面,移动鼠标绘制box高度,点击鼠标右键结束绘制', + displayCilpPlane: '显示裁剪面', + verticalNormal: '垂直法线', + parallelNormal: '平行法线', + clipWidth: '裁剪宽度', + clipHeight: '裁剪高度', + rotateX: '绕X轴旋转', + rotateY: '绕Y轴旋转', + rotateZ: '绕Z轴旋转', + + // 地形操作 + terrainOperation: '地形操作', + inundationAnalysis: '淹没分析', + slopeAspect: '坡度坡向', + Isoline: '等值线', + terrainExcavate: '地形开挖', + terrainChange: '地形修改', + excavationDepth: '开挖深度', + excavateAreaOffsetUp: '开挖区域上移', + upHeight: '上移高度', + editArea: '编辑区域', + editAreaZ: '编辑区域Z轴', + stkUnsupported: 'STK地形暂不支持', + maximumVisibleElevation: '最大可见高程', + minimumVisibleElevation: '最小可见高程', + currentElevation: '当前高程', + transparency: '透明度', + inundationSpeed: '淹没速度', + analysisArea: '分析区域', + minSlope: '最小坡度', + maxSlope: '最大坡度', + displayMode: '显示模式', + partRegion: '指定区域参与分析', + allRegion: '所有区域参与分析', + noRegion: '没有区域参与分析', + allDisplay: "箭头和面显示", + faceDisplay: "面显示", + arrowDisplay: "箭头显示", + equivalentIsoline: '等值距', + contourColor: '等高线颜色', + contourLineFill: '等高线填充', + contourFaceFill: '等高面填充', + contourAllFill: '等高线和面填充', + contourNoFill: '不填充', + + //操作面板-量算 + measureMode: '量算模式', + pickPoint: '顶点捕捉', + contour: '等高线', + measureAction: '测量', + mode_space: '空间量算', + mode_ground: '贴地量算', + mode_projection: '平面投影', + measureDistence: '测量距离', + measureArea: '测量面积', + measureHeight: '测量高度', + distence_cl: "距离", + area: "面积", + spaceDistance: "空间距离", + verticalHeight: "垂直高度", + horizontalDistance: "水平距离", + + // 操作面板-参数设置 + baseAttribute: '场景属性', + flying: '飞行', + ligth: '灯光', + viewPorts: '视口', + speciallyEffect: '特效', + + //操作面板-场景属性-勾选 + earth: '地球', + sun: '太阳', + depthInspection: '深度检测', + atomsphereRender: '大气渲染', + fogEffect: '雾化效果', + cloudLayer: '云层', + skyBox: '天空盒', + timeAxis: '时间轴', + displayFrame: '帧率', + + //操作面板-场景属性-选项 + brightness: '亮度', + contrastRatio: '对比度', + colorTone: '色调', + saturation: '饱和度', + gamma: '伽马', + showUnderground: '开启地下', + surfaceTransparency: '地表透明度', + displayCoordinateTip: '鼠标点击任意处,返回结果', + coordinateQuery: '坐标查询', + coordinateTip: '经度、纬度、高程', + + //操作面板-飞行 + flyRoute: '飞行路线', + flyRoute_1: '飞行路线_1', + import: '导入', + displayRoute: '显示路线', + displayStation: '显示站点', + rotateByPoint: '绕点旋转', + rotateSpeed: '旋转速度', + rotateRepeat: '循环旋转', + selectStation: '站点选择', + play: '播放', + pause: '暂停', + stop: '停止', + flySpeed: '飞行速度', + addStation: '添加站点', + deleteStation: '删除站点', + restore: '恢复', + importFlyRoute: '导入飞行路线', + createFlyRoute: '创建飞行路线', + addedStops: '已添站点', + downLoad: '下载', + addStopSuccess: '添加站点成功', + atLeastTwoStop: '至少需要两个节点才能保存', + + //操作面板-灯光 + symbolLibrary: '符号库', + lightsourceColor: '光源颜色', + diffusionDistance: '扩散距离', + lightDecay: '衰减因子', + lightsourceIntensity: '光源强度', + spotlightRange: '聚光范围', + displayLightmodel: '光源模型', + displayLightcorrdinate: '光源坐标', + modelInformation: '模型信息', + pointLight: '点光源', + spotLight: '聚光灯', + parallelLight: '平行光', + addSpotLightTip: '鼠标左键绘制两点确定光源方向,右键结束', + + //操作面板-视图模式 + viewMode: '视图模式', + splitscreenModel: '分屏模式', + openRollershutter: '开启卷帘', + noneSplitscreen: '不使用分屏', + horizontalSplitscreen: '水平分屏', + verticalSplitscreen: '垂直分屏', + threeViewport: '三视口', + fourViewport: '四视口', + noneRollershutter: "不使用卷帘", + leftrightRollershutter: '左右卷帘', + updownRollershutter: '上下卷帘', + customRollershutter: '自定义卷帘', + shieldDirection: '屏蔽方向', + left: '左侧', + right: '右侧', + up: '上侧', + down: '下侧', + + //操作面板-场景特效 + floodLight: '场景泛光', + scanLine: '扫描线', + rainSnow: '雨雪', + openFloodlight: '开启泛光', + heatMap: '热力图', + brightnessThreshold: '亮度阈值', + floodlightThreshold: '泛光阈值', + scanLineTip: '两点定一个矩形', + scanMode: '扫描模式', + scanColor: '扫描颜色', + scanTexture: '扫描纹理', + scanWidth: '扫描宽度', + scanSpeed: '扫描速度', + scanPeriod: '扫描周期', + customScanDirection: '自定义扫描方向', + customScanCenter: '自定义扫描中心', + lineShape: '线状', + circleShape: '环状', + noneScanTexture: '无纹理', + lineTexture1: '线状纹理1', + lineTexture2: '线状纹理2', + ringTexture1: '环状纹理1', + ringTexture2: '环状纹理2', + loopedhexagonTexture: '六边形环状纹理', + addScanLineTip: '鼠标左键绘制两点确定扫描线方向,右键结束', + openRain: '开启雨景', + openSnow: '开启雪景', + rainAngle: '雨角度', + rainSpeed: '雨速度', + snowAngle: '雪角度', + snowSpeed: '雪速度', + snowDensity: '雪密度', + + //通用 + add: '添加', + meterSecond: '米/秒', + meter: '米', + second: '秒', + + // 操作面板-对象绘制 + drawLine: '绘制线', + drawPolygon: '绘制面', + skit: '小品', + particle: '粒子', + geometry: '几何体', + drawMode: '绘制模式', + lineColor: '线颜色', + lineWidth: '线宽', + editLine: '编辑线', + editLineZ: '编辑线Z轴', + editZaxis: '编辑Z轴方向', + solidLine: '实线', + dashedLine: '虚线', + outline: '轮廓线', + arrowLine: '箭头线', + haloLine: '光晕线', + wakeLine: '尾迹线', + pureColor: '纯色', + grid: '网格', + stripe: '条纹', + polygonColor: '面颜色', + gridLineWidth: '网格线宽', + gridLineNumber: '网格线数', + unitTransparency: '单元透明度', + oddStripColor: '奇数带颜色', + evenStripColor: '偶数带颜色', + stripRepetition: '条带重复数', + stripOffset: '条带偏移量', + spaceMode: '空间模式', + closeGroundMode: '贴地模式', + closeS3MMode: '贴S3M模式', + closeBoth: '贴地贴对象', + editLineTip: '鼠标左键开始添加,右键结束,选中对象编辑', + editLineTip2: '鼠标左键选中绘制对象进行编辑', + symbolType: '符号类型', + symbolColor: '符号颜色', + addMode: '添加模式', + spacing: '间隔', + count: '数量', + multiSelection: '符号多选', + tree: '树木', + facilities: '公共设施', + traffic: '交通', + singleAdd: '单个添加', + lineAdd: '沿线添加', + AreaAdd: '区域添加', + delMode: '删除模式', + singleDel: '单个删除', + wholeDel: '线面删除', + addSkitTip: '请选择符号', + delSkitTip: '请点选场景中添加的小品', + cylinder: '圆柱体', + cube: '立方体', + sphere: '球体', + cone: '圆锥', + semiMajorAxis: '长半轴', + semiMinorAxis: '短半轴', + granularity: '粒度', + rotate: '旋转', + fillMode: '填充模式', + wireframe: '线框模式', + width: '宽度', + length: '长度', + height: '高度', + distence: "距离", + Xradius: 'X半径', + Yradius: 'Y半径', + Zradius: 'Z半径', + + // 粒子系统 + fire: '火焰', + water: '水滴', + fireworks: '烟花', + displayEdit: '显示编辑框', + parameterSet: '参数设置', + emitSpeed: '发射速度', + lifeCycle: '生命周期', + speedRange: '速度范围', + scaleRange: '比例范围', + emitType: '发射类型', + particleNumber: '发射数量', + particleSize: '粒子大小', + gravity: '重力', + coneEmit: '圆锥体放射', + sphereEmit: '球体放射', + boxEmit: '盒状放射', + + //按钮 + query: '查询', + + // 视频投放 + videoFileSet: '视频投放', + videoSet: '投放', + distencePlace: '投放距离', + visibleVideoLine: '视频投放线', + localVideoPath: '请选择视频文件', + videoPath: '视频地址', + deleteVideo: '请删除当前投放视频', + + // 图层列表 + isShow: '显隐', + rapidLocate: '快速定位', + remove: '移除', + delUnsupported: '默认底图不支持删除', + moreFun: '更多', + + + /** + * 组件内部界面 + * */ + + // 全局 + s3mLayer: 'S3M图层', + imgLayer: '影像图层', + mvtLayer: 'MVT图层', + terrainLayer: '地形图层', + wmtsLayer: 'WMTS服务', + sure: '确定', + cancle: '取消', + analysis: '分析', + clear: '清除', + edit: '编辑', + color: '颜色', + + // 图层列表-无 + allLayer: '所有图层', + deleteLayer: '删除图层', + defaultTerrain: '默认地形', + defaultImage: '默认影像', + lnglatMap: '经纬底图', + unnamedLayer: '未命名图层', + stkTerrain: 'STK地形', + unnamedTerrain: '未命名地形', + superMapTerrain: '超图在线地形', + tiandituTerrain: '天地图地形', + noTerrain: '无地形', + + // 添加数据 + type: '类型', + layer: '图层', + scene: '场景', + localData: '本地数据', + + address: '地址', + name: '名称', + addToken: '添加token', + layerUrl: '请输入图层URL', + layerName: '请输入图层名称', + localFilePath: '请选择本地KML数据', + localFilePathFly: '请选择本地fpf文件', + chooseFile: '选择', + selectableLayers: '可选图层', + + urlIsNull: '图层URL不能为空,请输入URL !', + urlCheckedsuccess: '图层URL校验成功', + addScpFailed: '加载SCP失败,请检查网络连接状态或者url地址是否正确?', + openSceneSuccess: '打开场景成功', + + // 三维分析-3D + // 通视分析 + longitude: '经度', + latitude: '纬度', + elevation: '高程', + visibleAreaColor: '可视区域颜色', + invisibleAreaColor: '不可视区域颜色', + barrierHighlightColor: '障碍物高亮颜色', + displayBarrier: '显示障碍点', + highlightBarrier: '高亮障碍物', + + // 可视域分析 + additionalHeight: '附加高度', + horizontalFov: '水平视角', + verticalFov: '垂直视角', + hintLineColor: '提示线颜色', + visibleBody: '显示可视体', + visibleBodyColor: '可视体颜色', + invisibleBody: '显示不可视体', + hiddenAreaColor: '不可视体颜色', + viewshedAnimation: '动态可视域', + viewshedAnimationTip: '绘制模型运动路线,鼠标右键结束', + + // 阴影分析 + timeInterval: '时间间隔', + space: '间距', + bottomHeight: '底部高程', + stretchingHeight: '拉伸高度', + bodyDisplay: '体显示', + showShadow: '开启阴影', + filterInterval: '过滤区间', + startTime: '开始时间', + endTime: '结束时间', + ShadowStartTip: '播放一天时间段内阳光和阴影动画', + ShadowStartTip2: '播放一年的阳光和阴影动画', + ShadowStopTip: '停止动画', + DaylightingRate: '阴影率', + analyseResult: '分析结果', + + // 剖面分析 + startLongitude: '起点经度', + startLatitude: '起点纬度', + startElevation: '起点高程', + endLongitude: '终点经度', + endLatitude: '终点纬度', + endElevation: '终点高程', + disPlayInfo: '剖面信息展示', + Section: '截面', + GPUSection: "GPU剖面", + + // 天际线 + DisplayMode: '显示模式', + AnalysisRadius: '分析半径', + LineWidth: '线宽度', + LineDisplay: '线显示', + FaceDisplay: '面显示', + BodyDisplay: '体显示', + SkylineColor: '天际线颜色', + SkylineBodyColor: '天际体颜色', + ObstacleColor: '障碍物颜色', + Display2D: '二维天际线展示', + HighlightObstacles: '高亮障碍物', + GlobeNoAnalysis: '地表不参与分析', + drawHeightLimitingBody: '绘制限高体', + Skyline2D: '二维天际线', + limitingBody: '限高体', + + // 立面图 + maxHeight: '最大高度', + maxDistence: '最远距离', + Draw: "绘制", + Plot: "出图", + + // 图层属性 + chooseLayer: '选择图层', + renderMode: '渲染模式', + singleRender: '单面渲染', + doubleRender: '双面渲染', + shadowBrightness: '阴影明暗度', + objectHiding: '对象显隐', + MinVisibleDistance: '最小可见距离', + MaxVisibleDistance: '最大可见距离', + multiple: '多选', + disPlayAll: '显示全部', + disPlaySelected: '仅选中对象可见', + hideSelected: '仅选中对象隐藏', + noLayer: '暂无图层', + + // 图层风格 + fillStyle: '填充风格', + foreColor: '前景色', + selectedColor: '选中颜色', + selectColorMode: '选中颜色模式', + colorMix: '混合', + colorReplace: '替换', + layerTransparency: '图层透明度', + reset: '重置', + fillBothMode: '填充和线框模式', + attrSaveOk: '图层属性保存成功', + + // 图层操作 + qxModel: '开挖与压平', + offSet: '偏移', + layerColor: '图层颜色', + excavate: '开挖', + flatten: '修改', + flatten2: '压平', + onQXModel: '该功能只支持倾斜摄影三维模型', + offsetMode: '操作模式', + offsetX: '沿X轴偏移', + offsetY: '沿Y轴偏移', + offsetZ: '沿Z轴偏移', + selected: '选中', + + // 属性查询 + dataServerUrl: "数据服务", + dataSourceName: '数据源', + inputServerUrl: '请输入该图层数据服务URL', + inputSourceName: '请输入该图层对应数据源', + queryResult: '查询结果', + inputUrlName: '请填入该图层查询所需的数据服务和对应数据源', + bindInfoOK: "绑定成功,请点击模型查询信息", + bindUpdate: "该图层数据源绑定更改成功", + noData: "暂无数据", + + // 地图查询 + mapDataUrl: "数据服务", + datasetName: "数据集", + attributeList: '属性表', + listTotal_s: '属性表(共计', + listTotal_e: '个要素)', + chooseFieldTip: '选择待过滤的字段', + filter: '过滤', + shpQueryTip: ' 指定数据查询(查询数据务必与地图服务坐标系一致)', + clickQuery: '点选查询', + clearEntityTip: '清除球面绘制的图形', + refreshData: '刷新数据', + mydata: '我的数据', + queryPlaceHolder: "请输入选择字段过滤关键字", + queryWait: '正在查询请稍等', + resouceName: '资源名称', + resouceType: '资源类型', + createTime: '创建时间', + mapQueryTip: '请输入数据服务URL和对应数据集', + clickQueryClose: '点选功能已关闭', + clickQueryCloseTip: '鼠标点击获取要素信息,右键可关闭点选', + dataFiltering: '过滤数据中...', + recently: '不久前', + chooseField: '选择字段', + filterFiledTip: '字段筛选', + + // 倾斜模型单体化 + featrueID: "要素ID", + singleTip_waring: '请输入与该倾斜摄影图层对应的:数据服务、数据源、数据集', + singleTip_success: '倾斜摄影图层与数据服务绑定成功,点击进行单体化查询', + + // 我的服务-iportal + getData: '获取数据中,请稍后', + serviceName: '服务名称', + resourceSubType: '服务类型', + updateTime: '更新时间', + serviceUrl: '服务链接', + year: '年', + month: '月', + day: '日', + yearsAgo: ' 年前', + monthsAgo: ' 月前', + weeksAgo: ' 周前', + daysAgo: ' 天前', + hoursAgo: ' 小时前', + minutesAgo: '分钟前', + secondsAgo: '刚刚', + + // message + layerExistMsg: '该图层已经存在,请勿重复加载!', + imgUrlErrorMsg: '影像服务URL错误,影像加载失败!', + scpUrlErrorMsg: 'SCP URL地址错误,S3M图层加载失败!', + + /** + * 图片资源名称 - 演示 + * */ + BeijingCBD: "北京CBD", + originCBD: "原版CBD", + SophiaChurch: "索菲亚教堂", + MountEverest: "珠峰地形影像", + BIMBuilding: "BIM建筑", + Pointcloud: "点云", + Histogram: "柱状图", + PhotographyModel: "倾斜摄影模型", + JingJinMVT: "京津地区MVT", + ChongqingBaimo: "重庆白模", + YokohamaBaimo: "横滨白模", + transformerStation: '石油场站', + + LocalImage: '本地图片', + BingMap: '必应底图', + TIANDITU: '天地图', + OSM: 'OSM底图', + GRIDIMAGERY: '经纬底图', + japanStand: '标准地图', + japanPale: '淡色地图', + japanBlank: '白色地图', + japanImage: '影像地图', + + SuperMapOnlineTerrain: '超图在线地形', + TiandituTerrain: '天地图地形', + STKTerrain: 'STK地形', + + // Tip + qxModelTip: '该功能只支持倾斜摄影三维模型', + repeatAddTip: "请勿重复添加!", + repeatAddWMTSTip: "该wmts图层已添加,请勿重复添加", + + // 新增 + outLineColor: "轮廓线颜色", + outLineWidth: "轮廓线宽度", + lightTip_edit: "请选中光源模型,再编辑属性", + lightTip_del: "请选中光源模型在删除", + wireframeColor: "线框颜色", + chooseThenOffset: "点击选中模型,再偏移", + fillColor: "填充颜色", + tree_darg_tip:'请在同级目录下拖拽', + rename:'重命名', + bindMediaField:'绑定媒体字段', // 媒体字段(地图查询)- start + mediaField:'媒体字段', + picture:'图片', + video:'视频', + field:'字段', + title:'标题', + inputTitle:'请输入标题', + customMediaLink:'自定义媒体链接', + featureID:'要素ID', + link:'链接', + inputOnlineImgLink:"请输入在线图片地址", + inputOnlineVideoLink_iportal:"请输入视频地址(仅限iportal)", // 媒体字段(地图查询)- end + qxLayerDataUrl:'请输入该图层的数据服务URL', + qxLayerDataSource:'请输入该图层对应的数据源', + qxLayerDataset:'请输入该图层对应的数据集', +} + +window.local_zh = local_zh; \ No newline at end of file diff --git a/SuperMap iEarth/src/App.vue b/SuperMap iEarth/src/App.vue index c5543704..0804a8d7 100644 --- a/SuperMap iEarth/src/App.vue +++ b/SuperMap iEarth/src/App.vue @@ -2,8 +2,8 @@ <n-config-provider :theme-overrides="overridesTheme" :theme="darkTheme" - :locale="zhCN" - :date-locale="dateZhCN" + :locale="locale.locale" + :date-locale="locale.dateLocale" > <n-loading-bar-provider> <n-dialog-provider> @@ -27,17 +27,15 @@ import { MessageContent } from "@/components/Plugins/MessageContent"; import { DialogContent } from "@/components/Plugins/DialogContent"; import { LoadingContent } from "@/components/Plugins/LoadingContent"; import { loadAsyncComponent } from "@/utils/index"; -import { darkTheme, zhCN, dateZhCN } from "naive-ui"; +import { darkTheme } from "naive-ui"; +import { useLocaleHook } from "@/tools/localHook"; const layout = loadAsyncComponent(() => import("@/layout/index.vue")); +const locale = useLocaleHook(); // 设置naiveUI组件国际化 + // 重写主题样式 -/** - * js 文件下使用这个做类型提示 - * @type import('naive-ui').GlobalThemeOverrides - */ const overridesTheme = { common: { - // primaryColor: "#3499E5", primaryColor: "rgba(52, 153, 229, 1)", primaryColorHover: "rgba(52, 153, 229, 1)", primaryColorPressed: "rgba(255,255,255,0.85)", @@ -45,19 +43,8 @@ const overridesTheme = { }, Button: { textColor: "#fff", - // textColor: scssVariable.midColorNormal, - }, - Input: { - // color: "none", - // paddingRight: "12px", // 又不起作用 - // border: "1px solid yellow;", }, - // 完全不起作用 Tabs: { - tabGap: "14px", - tabgap: "14px", - "tab-gap": "14px", - "--n-tab-gap": "14px", //这四个都不行,但是打包后效果还行 tabColor: "yellow", //这个起作用了 }, Checkbox: { @@ -67,37 +54,258 @@ const overridesTheme = { Slider: { fillColor: "#3499E5", fillColorHover: "#3499E5", - handleSize:"12px" + handleSize: "0.12rem", }, Switch: { railColorActive: "#3499E5", }, - // ColorPicker: { - // height: "", - // }, }; </script> <style lang="scss"> +@font-face { + font-family: OptimizationTitle; + src: url("@/assets/fonts/OptimizationTitleBlack.TTF"); + font-display: fallback; +} + +// 头部标题字体 +.head-title { + font-family: "OptimizationTitle"; +} + // 以下样式 先放到这里 后续再看怎么处理 .n-tabs .n-tabs-bar { background-color: #3499e5 !important; } + .n-tabs-tab { color: #fff !important; } + .n-color-picker-trigger { border: none; } + .n-layout .n-layout-scroll-container { overflow: visible; } + .drawCur { - // cursor: url(./images/cur/draw.cur), auto; cursor: url(../public/images/cur/draw.cur), auto; } .measureCur { cursor: url(../public/images/cur/measure.cur), auto; } -</style> \ No newline at end of file + +// n-input等居中 +.n-input .n-input__input-el { + height: 100%; +} + +// 输入框相关样式 +.n-input { + height: 0.32rem; + + .n-input__input-el { + line-height: 0.32rem; + } +} + +// cesium帧率面板位置 +.supermap3d-performanceDisplay-defaultContainer { + top: 10px; +} + +.supermap3d-viewer-timelineContainer { + bottom: 10px; +} + +.n-divider { + color: rgba(255, 255, 255, 0.15); +} + +// 兼容移动端样式 +.n-tabs-tab__label { + font-size: 0.14rem; +} + +// 底部操作按钮 +.btn-row-item { + display: flex; +} + +// operate按钮文字大小 +.btn-row-item .n-button { + height: 0.32rem; + width: 0.6rem; + padding: 0.06rem 0.1rem; +} + +.btn-row-item2 .n-button { + height: 0.32rem; + width: 0.6rem; + padding: 0.06rem 0.15rem; +} + +.row-content .n-button { + height: auto; + width: auto; + padding: 5px 8px; +} + +.row-item .n-button { + height: auto; + width: auto; + padding: 5px 8px; +} + +.n-button__content { + font-size: 0.14rem; +} + +// input输入框的内容大小和后缀 +.n-input__suffix { + font-size: 0.12rem; +} + +.n-input__input { + font-size: 0.12rem; +} + +.slider-box .n-input .n-input-wrapper { + padding-left: 0px; +} + +.n-slider-marks { + font-size: 0.12rem; +} + +// 单选Radio的标签大小 +.n-radio__label { + font-size: 0.12rem; +} + +// n-select相关 +.n-base-selection { + min-height: 0.32rem; +} + +.n-base-selection .n-base-selection-label { + height: 0.32rem; +} + +.n-base-selection-input__content { + font-size: 0.14rem; +} + +// 图层列表 +.n-tree { + font-size: 0.12rem; +} + +.n-tree-node-content__suffix > div { + width: 30px; +} + +.n-tree .n-tree-node-content .n-tree-node-content__suffix { + margin-right: 0.1rem; +} + +// 分割线 +.n-divider:not(.n-divider--vertical) { + margin-top: 0.24rem; + margin-bottom: 0.24rem; +} + +// 滑动条的那个球 +.n-slider .n-slider-handles .n-slider-handle-wrapper .n-slider-handle { + width: 0.12rem; + height: 0.12rem; +} + +.n-slider .n-slider-dots .n-slider-dot { + width: 0.1rem; + height: 0.1rem; +} + +// checkBox大小和lable对齐居中 +.n-checkbox .n-checkbox-box { + width: 0.16rem; + height: 0.16rem; +} + +.n-checkbox .n-checkbox__label { + margin-left: 0.1rem; + font-size: 0.14rem; + height: 0.2rem; + line-height: 0.2rem; +} + +// checkBox-飞行路径哪里的两个组合形式 +.n-checkbox .n-checkbox-box-wrapper { + width: 0.1rem; +} + +// 单选框大小 +.n-radio .n-radio__dot { + width: 0.14rem; + height: 0.14rem; +} + +// 单选框-两个组合的-Box裁剪 +.n-radio .n-radio__dot-wrapper { + width: 0.2rem; +} + +// 图层列表下拉菜单样式 +.n-dropdown-menu { + background: url("@/assets/panelbg/drop-menu-bg.png") no-repeat; + background-size: 100% 100%; + box-sizing: border-box; +} + +.n-dropdown-option-body__label { + color: rgba(255, 255, 255, 0.85); + font-size: 0.12rem; +} + +.n-dropdown-option:hover { + background-color: rgba(255, 255, 255, 0.25); +} + +[v-placement="right-start"] > .n-popover-shared { + margin-left: 0px; +} + +.n-tree.n-tree--block-line .n-tree-node:not(.n-tree-node--disabled):hover { + background-color: rgba(255, 255, 255, 0.25); +} + +.n-tree .n-tree-node-wrapper { + padding: 0.03rem 0rem; +} + +.n-dropdown-menu .n-dropdown-option .n-dropdown-option-body { + height: 0.34rem; + line-height: 0.34rem; +} + +// echarts图表样式 +#echartsProfile > div { + left: 0.1rem; + top: 0.1rem; +} + +#echartsSkyLine > div { + left: 0.1rem; + top: 0.1rem; +} + +// 图层列表后缀hover颜色 +// .n-button:not(.n-button--disabled):hover{ +// // color: yellow; +// // color:rgba(255, 255, 255, 0.85); +// } +</style> diff --git a/SuperMap iEarth/src/assets/icons/demo_index.html b/SuperMap iEarth/src/assets/icons/demo_index.html index 584e9835..57932adb 100644 --- a/SuperMap iEarth/src/assets/icons/demo_index.html +++ b/SuperMap iEarth/src/assets/icons/demo_index.html @@ -55,17 +55,455 @@ <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" targ <ul class="icon_lists dib-box"> <li class="dib"> - <span class="icon iconfont"></span> - <div class="name">点选</div> - <div class="code-name">&#xe891;</div> + <span class="icon iconfont"></span> + <div class="name">添加媒体字段</div> + <div class="code-name">&#xe8d8;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">指定数据查询</div> + <div class="code-name">&#xe8d9;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">对象绘制</div> + <div class="code-name">&#xe8d6;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">三维分析</div> + <div class="code-name">&#xe8d7;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">晴天</div> + <div class="code-name">&#xe8d2;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">下雪</div> + <div class="code-name">&#xe8d3;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">下雨</div> + <div class="code-name">&#xe8d4;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">多云</div> + <div class="code-name">&#xe8d5;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">视图</div> + <div class="code-name">&#xe8d1;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">倾斜单体化</div> + <div class="code-name">&#xe8ca;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">添加_选中</div> + <div class="code-name">&#xe8cf;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">三维分析_选中</div> + <div class="code-name">&#xe8d0;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">图层风格</div> + <div class="code-name">&#xe8ce;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">场景_选中</div> + <div class="code-name">&#xe8cd;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">量算_选中</div> + <div class="code-name">&#xe8cb;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">绘制_选中</div> + <div class="code-name">&#xe8cc;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">量算</div> + <div class="code-name">&#xe873;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">0</div> + <div class="code-name">&#xe8c5;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">7_1</div> + <div class="code-name">&#xe8c6;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">0_1</div> + <div class="code-name">&#xe8c7;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">2_1</div> + <div class="code-name">&#xe8c8;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">1_1</div> + <div class="code-name">&#xe8c9;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">parking lot</div> + <div class="code-name">&#xe8b1;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">gas station</div> + <div class="code-name">&#xe8b2;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">9</div> + <div class="code-name">&#xe8b3;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">5_1</div> + <div class="code-name">&#xe8b4;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">caution</div> + <div class="code-name">&#xe8b5;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">hospital</div> + <div class="code-name">&#xe8b6;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">7</div> + <div class="code-name">&#xe8b7;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">3</div> + <div class="code-name">&#xe8b8;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">hot</div> + <div class="code-name">&#xe8b9;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">8_1</div> + <div class="code-name">&#xe8ba;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">4_1</div> + <div class="code-name">&#xe8bb;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">8</div> + <div class="code-name">&#xe8bc;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">6</div> + <div class="code-name">&#xe8bd;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">3_1</div> + <div class="code-name">&#xe8be;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">orientation_1</div> + <div class="code-name">&#xe8bf;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">6_1</div> + <div class="code-name">&#xe8c0;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">2</div> + <div class="code-name">&#xe8c1;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">10</div> + <div class="code-name">&#xe8c2;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">4</div> + <div class="code-name">&#xe8c3;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">1</div> + <div class="code-name">&#xe8c4;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">5</div> + <div class="code-name">&#xe8a6;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">school</div> + <div class="code-name">&#xe8a7;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">10_1</div> + <div class="code-name">&#xe8a8;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">Z</div> + <div class="code-name">&#xe8a9;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">Railway Station</div> + <div class="code-name">&#xe8aa;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">X</div> + <div class="code-name">&#xe8ab;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">toilet</div> + <div class="code-name">&#xe8ac;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">9_1</div> + <div class="code-name">&#xe8ad;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">orientation_2</div> + <div class="code-name">&#xe8ae;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">Y</div> + <div class="code-name">&#xe8af;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">airport</div> + <div class="code-name">&#xe8b0;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">示例</div> + <div class="code-name">&#xe8a5;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">标注标绘</div> + <div class="code-name">&#xe897;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">图层操作</div> + <div class="code-name">&#xe8a1;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">材质库</div> + <div class="code-name">&#xe8a3;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">模型库</div> + <div class="code-name">&#xe8a4;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">书钉</div> + <div class="code-name">&#xe89e;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">录制</div> + <div class="code-name">&#xe892;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">查询</div> + <div class="code-name">&#xe89d;</div> </li> <li class="dib"> <span class="icon iconfont"></span> - <div class="name">shp查询</div> + <div class="name">浏览</div> <div class="code-name">&#xe890;</div> </li> + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">工具</div> + <div class="code-name">&#xe8a2;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">漫游</div> + <div class="code-name">&#xe89c;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">添加站点</div> + <div class="code-name">&#xe89f;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">非等比</div> + <div class="code-name">&#xe8a0;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">风格设置</div> + <div class="code-name">&#xe893;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">等比</div> + <div class="code-name">&#xe894;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">顶视图</div> + <div class="code-name">&#xe895;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">后处理</div> + <div class="code-name">&#xe896;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">视点管理</div> + <div class="code-name">&#xe898;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">视图切换</div> + <div class="code-name">&#xe899;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">透视图</div> + <div class="code-name">&#xe89a;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">天气调节</div> + <div class="code-name">&#xe89b;</div> + </li> + + <li class="dib"> + <span class="icon iconfont"></span> + <div class="name">点选</div> + <div class="code-name">&#xe891;</div> + </li> + <li class="dib"> <span class="icon iconfont"></span> <div class="name">地图查询</div> @@ -122,7 +560,7 @@ <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" targ <li class="dib"> <span class="icon iconfont"></span> - <div class="name">指北针_1</div> + <div class="name">指北针</div> <div class="code-name">&#xe886;</div> </li> @@ -150,12 +588,6 @@ <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" targ <div class="code-name">&#xe882;</div> </li> - <li class="dib"> - <span class="icon iconfont"></span> - <div class="name">绘制</div> - <div class="code-name">&#xe873;</div> - </li> - <li class="dib"> <span class="icon iconfont"></span> <div class="name">聚光灯</div> @@ -348,12 +780,6 @@ <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" targ <div class="code-name">&#xe825;</div> </li> - <li class="dib"> - <span class="icon iconfont"></span> - <div class="name">分析</div> - <div class="code-name">&#xe826;</div> - </li> - <li class="dib"> <span class="icon iconfont"></span> <div class="name">地形</div> @@ -384,12 +810,6 @@ <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" targ <div class="code-name">&#xe82d;</div> </li> - <li class="dib"> - <span class="icon iconfont"></span> - <div class="name">量算</div> - <div class="code-name">&#xe82e;</div> - </li> - <li class="dib"> <span class="icon iconfont"></span> <div class="name">放样</div> @@ -756,9 +1176,9 @@ <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</co <pre><code class="language-css" >@font-face { font-family: 'iconfont'; - src: url('iconfont.woff2?t=1692946974504') format('woff2'), - url('iconfont.woff?t=1692946974504') format('woff'), - url('iconfont.ttf?t=1692946974504') format('truetype'); + src: url('iconfont.woff2?t=1710320050582') format('woff2'), + url('iconfont.woff?t=1710320050582') format('woff'), + url('iconfont.ttf?t=1710320050582') format('truetype'); } </code></pre> <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> @@ -785,1072 +1205,2286 @@ <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面 <ul class="icon_lists dib-box"> <li class="dib"> - <span class="icon iconfont icondianxuan"></span> + <span class="icon iconfont icontianjiameitiziduan"></span> <div class="name"> - 点选 + 添加媒体字段 </div> - <div class="code-name">.icondianxuan + <div class="code-name">.icontianjiameitiziduan </div> </li> <li class="dib"> - <span class="icon iconfont iconshpchaxun"></span> + <span class="icon iconfont iconzhidingshujuchaxun"></span> <div class="name"> - shp查询 + 指定数据查询 </div> - <div class="code-name">.iconshpchaxun + <div class="code-name">.iconzhidingshujuchaxun </div> </li> <li class="dib"> - <span class="icon iconfont icondituchaxun"></span> + <span class="icon iconfont iconduixianghuizhi"></span> <div class="name"> - 地图查询 + 对象绘制 </div> - <div class="code-name">.icondituchaxun + <div class="code-name">.iconduixianghuizhi </div> </li> <li class="dib"> - <span class="icon iconfont iconkongjianjuli"></span> + <span class="icon iconfont iconsanweifenxi"></span> <div class="name"> - 空间距离 + 三维分析 </div> - <div class="code-name">.iconkongjianjuli + <div class="code-name">.iconsanweifenxi </div> </li> <li class="dib"> - <span class="icon iconfont iconyidijuli1"></span> + <span class="icon iconfont iconqingtian"></span> <div class="name"> - 依地距离 + 晴天 </div> - <div class="code-name">.iconyidijuli1 + <div class="code-name">.iconqingtian </div> </li> <li class="dib"> - <span class="icon iconfont icontouying"></span> + <span class="icon iconfont iconxiaxue"></span> <div class="name"> - 投影 + 下雪 </div> - <div class="code-name">.icontouying + <div class="code-name">.iconxiaxue </div> </li> <li class="dib"> - <span class="icon iconfont iconlifangti"></span> + <span class="icon iconfont iconxiayu"></span> <div class="name"> - 立方体 + 下雨 </div> - <div class="code-name">.iconlifangti + <div class="code-name">.iconxiayu </div> </li> <li class="dib"> - <span class="icon iconfont iconqiuti"></span> + <span class="icon iconfont iconduoyun"></span> <div class="name"> - 球体 + 多云 </div> - <div class="code-name">.iconqiuti + <div class="code-name">.iconduoyun </div> </li> <li class="dib"> - <span class="icon iconfont iconyuanzhui"></span> + <span class="icon iconfont iconshitu"></span> <div class="name"> - 圆锥 + 视图 </div> - <div class="code-name">.iconyuanzhui + <div class="code-name">.iconshitu </div> </li> <li class="dib"> - <span class="icon iconfont iconyuanzhu"></span> + <span class="icon iconfont iconqingxiedantihua"></span> <div class="name"> - 圆柱 + 倾斜单体化 </div> - <div class="code-name">.iconyuanzhu + <div class="code-name">.iconqingxiedantihua </div> </li> <li class="dib"> - <span class="icon iconfont iconyidimianji"></span> + <span class="icon iconfont icontianjia_xuanzhong"></span> <div class="name"> - 依地面积 + 添加_选中 </div> - <div class="code-name">.iconyidimianji + <div class="code-name">.icontianjia_xuanzhong </div> </li> <li class="dib"> - <span class="icon iconfont iconzhibeizhen_1"></span> + <span class="icon iconfont iconsanweifenxi_xuanzhong1"></span> <div class="name"> - 指北针_1 + 三维分析_选中 </div> - <div class="code-name">.iconzhibeizhen_1 + <div class="code-name">.iconsanweifenxi_xuanzhong1 </div> </li> <li class="dib"> - <span class="icon iconfont iconfenggeshezhi"></span> + <span class="icon iconfont icontucengfengge"></span> <div class="name"> - 风格设置 + 图层风格 </div> - <div class="code-name">.iconfenggeshezhi + <div class="code-name">.icontucengfengge </div> </li> <li class="dib"> - <span class="icon iconfont iconguangyunxian"></span> + <span class="icon iconfont iconchangjing_xuanzhong"></span> <div class="name"> - 光晕线 + 场景_选中 </div> - <div class="code-name">.iconguangyunxian + <div class="code-name">.iconchangjing_xuanzhong </div> </li> <li class="dib"> - <span class="icon iconfont iconjiantou"></span> + <span class="icon iconfont iconliangsuan_xuanzhong"></span> <div class="name"> - 箭头 + 量算_选中 </div> - <div class="code-name">.iconjiantou + <div class="code-name">.iconliangsuan_xuanzhong </div> </li> <li class="dib"> - <span class="icon iconfont iconpinghangguang"></span> + <span class="icon iconfont iconhuizhi_xuanzhong"></span> <div class="name"> - 平行光 + 绘制_选中 </div> - <div class="code-name">.iconpinghangguang + <div class="code-name">.iconhuizhi_xuanzhong </div> </li> <li class="dib"> - <span class="icon iconfont iconhuizhi"></span> + <span class="icon iconfont iconliangsuan"></span> <div class="name"> - 绘制 + 量算 </div> - <div class="code-name">.iconhuizhi + <div class="code-name">.iconliangsuan </div> </li> <li class="dib"> - <span class="icon iconfont iconjuguangdeng"></span> + <span class="icon iconfont icona-0"></span> <div class="name"> - 聚光灯 + 0 </div> - <div class="code-name">.iconjuguangdeng + <div class="code-name">.icona-0 </div> </li> <li class="dib"> - <span class="icon iconfont icondianguangyuan"></span> + <span class="icon iconfont icona-7_1"></span> <div class="name"> - 点光源 + 7_1 </div> - <div class="code-name">.icondianguangyuan + <div class="code-name">.icona-7_1 </div> </li> <li class="dib"> - <span class="icon iconfont iconkongjianfenxi"></span> + <span class="icon iconfont icona-0_1"></span> <div class="name"> - 空间分析 + 0_1 </div> - <div class="code-name">.iconkongjianfenxi + <div class="code-name">.icona-0_1 </div> </li> <li class="dib"> - <span class="icon iconfont iconzhuye"></span> + <span class="icon iconfont icona-2_1"></span> <div class="name"> - 主页 + 2_1 </div> - <div class="code-name">.iconzhuye + <div class="code-name">.icona-2_1 </div> </li> <li class="dib"> - <span class="icon iconfont iconwangge"></span> + <span class="icon iconfont icona-1_1"></span> <div class="name"> - 网格 + 1_1 </div> - <div class="code-name">.iconwangge + <div class="code-name">.icona-1_1 </div> </li> <li class="dib"> - <span class="icon iconfont iconchunse"></span> + <span class="icon iconfont icona-parkinglot"></span> <div class="name"> - 纯色 + parking lot </div> - <div class="code-name">.iconchunse + <div class="code-name">.icona-parkinglot </div> </li> <li class="dib"> - <span class="icon iconfont iconshui"></span> + <span class="icon iconfont icona-gasstation"></span> <div class="name"> - 水 + gas station </div> - <div class="code-name">.iconshui + <div class="code-name">.icona-gasstation </div> </li> <li class="dib"> - <span class="icon iconfont iconyanhua"></span> + <span class="icon iconfont icona-9"></span> <div class="name"> - 烟花 + 9 </div> - <div class="code-name">.iconyanhua + <div class="code-name">.icona-9 </div> </li> <li class="dib"> - <span class="icon iconfont iconhuoyan"></span> + <span class="icon iconfont icona-5_1"></span> <div class="name"> - 火焰 + 5_1 </div> - <div class="code-name">.iconhuoyan + <div class="code-name">.icona-5_1 </div> </li> <li class="dib"> - <span class="icon iconfont iconzanwuziyuan"></span> + <span class="icon iconfont iconcaution"></span> <div class="name"> - 暂无资源 + caution </div> - <div class="code-name">.iconzanwuziyuan + <div class="code-name">.iconcaution </div> </li> <li class="dib"> - <span class="icon iconfont iconzanwuditu"></span> + <span class="icon iconfont iconhospital"></span> <div class="name"> - 暂无底图 + hospital </div> - <div class="code-name">.iconzanwuditu + <div class="code-name">.iconhospital </div> </li> <li class="dib"> - <span class="icon iconfont iconfuwei"></span> + <span class="icon iconfont icona-7"></span> <div class="name"> - 复位 + 7 </div> - <div class="code-name">.iconfuwei + <div class="code-name">.icona-7 </div> </li> <li class="dib"> - <span class="icon iconfont icongengduo"></span> + <span class="icon iconfont icona-3"></span> <div class="name"> - 更多 + 3 </div> - <div class="code-name">.icongengduo + <div class="code-name">.icona-3 </div> </li> <li class="dib"> - <span class="icon iconfont iconsuoxiao"></span> + <span class="icon iconfont iconhot"></span> <div class="name"> - 缩小 + hot </div> - <div class="code-name">.iconsuoxiao + <div class="code-name">.iconhot </div> </li> <li class="dib"> - <span class="icon iconfont iconfangda"></span> + <span class="icon iconfont icona-8_1"></span> <div class="name"> - 放大 + 8_1 </div> - <div class="code-name">.iconfangda + <div class="code-name">.icona-8_1 </div> </li> <li class="dib"> - <span class="icon iconfont iconceju"></span> + <span class="icon iconfont icona-4_1"></span> <div class="name"> - 测距 + 4_1 </div> - <div class="code-name">.iconceju + <div class="code-name">.icona-4_1 </div> </li> <li class="dib"> - <span class="icon iconfont iconcemian"></span> + <span class="icon iconfont icona-8"></span> <div class="name"> - 测面 + 8 </div> - <div class="code-name">.iconcemian + <div class="code-name">.icona-8 </div> </li> <li class="dib"> - <span class="icon iconfont icongou"></span> + <span class="icon iconfont icona-6"></span> <div class="name"> - 勾 + 6 </div> - <div class="code-name">.icongou + <div class="code-name">.icona-6 </div> </li> <li class="dib"> - <span class="icon iconfont iconbianjizzhou"></span> + <span class="icon iconfont icona-3_1"></span> <div class="name"> - 编辑z轴 + 3_1 </div> - <div class="code-name">.iconbianjizzhou + <div class="code-name">.icona-3_1 </div> </li> <li class="dib"> - <span class="icon iconfont iconskin"></span> + <span class="icon iconfont iconorientation_1"></span> <div class="name"> - skin + orientation_1 </div> - <div class="code-name">.iconskin + <div class="code-name">.iconorientation_1 </div> </li> <li class="dib"> - <span class="icon iconfont iconuser"></span> + <span class="icon iconfont icona-6_1"></span> <div class="name"> - user + 6_1 </div> - <div class="code-name">.iconuser + <div class="code-name">.icona-6_1 </div> </li> <li class="dib"> - <span class="icon iconfont iconcegao"></span> + <span class="icon iconfont icona-2"></span> <div class="name"> - 测高 + 2 </div> - <div class="code-name">.iconcegao + <div class="code-name">.icona-2 </div> </li> <li class="dib"> - <span class="icon iconfont iconkapianshi"></span> + <span class="icon iconfont icona-10"></span> <div class="name"> - 卡片式 + 10 </div> - <div class="code-name">.iconkapianshi + <div class="code-name">.icona-10 </div> </li> <li class="dib"> - <span class="icon iconfont iconliebiaoshi"></span> + <span class="icon iconfont icona-4"></span> <div class="name"> - 列表式 + 4 </div> - <div class="code-name">.iconliebiaoshi + <div class="code-name">.icona-4 </div> </li> <li class="dib"> - <span class="icon iconfont iconbianji"></span> + <span class="icon iconfont icona-1"></span> <div class="name"> - 编辑 + 1 </div> - <div class="code-name">.iconbianji + <div class="code-name">.icona-1 </div> </li> <li class="dib"> - <span class="icon iconfont iconbofang"></span> + <span class="icon iconfont icona-5"></span> <div class="name"> - 播放 + 5 </div> - <div class="code-name">.iconbofang + <div class="code-name">.icona-5 </div> </li> <li class="dib"> - <span class="icon iconfont iconbaocun"></span> + <span class="icon iconfont iconschool"></span> <div class="name"> - 保存 + school </div> - <div class="code-name">.iconbaocun + <div class="code-name">.iconschool </div> </li> <li class="dib"> - <span class="icon iconfont iconchangjing"></span> + <span class="icon iconfont icona-10_1"></span> <div class="name"> - 场景 + 10_1 </div> - <div class="code-name">.iconchangjing + <div class="code-name">.icona-10_1 </div> </li> <li class="dib"> - <span class="icon iconfont icondaochu"></span> + <span class="icon iconfont iconZ"></span> <div class="name"> - 导出 + Z </div> - <div class="code-name">.icondaochu + <div class="code-name">.iconZ </div> </li> <li class="dib"> - <span class="icon iconfont iconchexiao"></span> + <span class="icon iconfont icona-RailwayStation"></span> <div class="name"> - 撤销 + Railway Station </div> - <div class="code-name">.iconchexiao + <div class="code-name">.icona-RailwayStation </div> </li> <li class="dib"> - <span class="icon iconfont iconcuowu"></span> + <span class="icon iconfont iconX"></span> <div class="name"> - 错误 + X </div> - <div class="code-name">.iconcuowu + <div class="code-name">.iconX </div> </li> <li class="dib"> - <span class="icon iconfont iconfuzhi"></span> + <span class="icon iconfont icontoilet"></span> <div class="name"> - 复制 + toilet </div> - <div class="code-name">.iconfuzhi + <div class="code-name">.icontoilet </div> </li> <li class="dib"> - <span class="icon iconfont iconfenxi"></span> + <span class="icon iconfont icona-9_1"></span> <div class="name"> - 分析 + 9_1 </div> - <div class="code-name">.iconfenxi + <div class="code-name">.icona-9_1 </div> </li> <li class="dib"> - <span class="icon iconfont icondixing"></span> + <span class="icon iconfont iconorientation_2"></span> <div class="name"> - 地形 + orientation_2 </div> - <div class="code-name">.icondixing + <div class="code-name">.iconorientation_2 </div> </li> <li class="dib"> - <span class="icon iconfont icondingwei"></span> + <span class="icon iconfont iconY"></span> <div class="name"> - 定位 + Y </div> - <div class="code-name">.icondingwei + <div class="code-name">.iconY </div> </li> <li class="dib"> - <span class="icon iconfont iconfanhui"></span> + <span class="icon iconfont iconairport"></span> <div class="name"> - 返回 + airport </div> - <div class="code-name">.iconfanhui + <div class="code-name">.iconairport </div> </li> <li class="dib"> - <span class="icon iconfont iconfenxiang"></span> + <span class="icon iconfont iconshili"></span> <div class="name"> - 分享 + 示例 </div> - <div class="code-name">.iconfenxiang + <div class="code-name">.iconshili </div> </li> <li class="dib"> - <span class="icon iconfont iconjianshao"></span> + <span class="icon iconfont iconbiaozhubiaohui"></span> <div class="name"> - 减少 + 标注标绘 </div> - <div class="code-name">.iconjianshao + <div class="code-name">.iconbiaozhubiaohui </div> </li> <li class="dib"> - <span class="icon iconfont iconliangsuan"></span> + <span class="icon iconfont icontucengcaozuo"></span> <div class="name"> - 量算 + 图层操作 </div> - <div class="code-name">.iconliangsuan + <div class="code-name">.icontucengcaozuo </div> </li> <li class="dib"> - <span class="icon iconfont iconfangyang"></span> + <span class="icon iconfont iconcaizhiku"></span> <div class="name"> - 放样 + 材质库 </div> - <div class="code-name">.iconfangyang + <div class="code-name">.iconcaizhiku </div> </li> <li class="dib"> - <span class="icon iconfont iconshaixuan"></span> + <span class="icon iconfont iconmoxingku"></span> <div class="name"> - 筛选 + 模型库 </div> - <div class="code-name">.iconshaixuan + <div class="code-name">.iconmoxingku </div> </li> <li class="dib"> - <span class="icon iconfont icondaoru"></span> + <span class="icon iconfont iconshuding"></span> <div class="name"> - 导入 + 书钉 </div> - <div class="code-name">.icondaoru + <div class="code-name">.iconshuding </div> </li> <li class="dib"> - <span class="icon iconfont iconjianqie"></span> + <span class="icon iconfont iconluzhi"></span> <div class="name"> - 剪切 + 录制 </div> - <div class="code-name">.iconjianqie + <div class="code-name">.iconluzhi </div> </li> <li class="dib"> - <span class="icon iconfont iconmoxing"></span> + <span class="icon iconfont iconchaxun"></span> <div class="name"> - 模型 + 查询 </div> - <div class="code-name">.iconmoxing + <div class="code-name">.iconchaxun </div> </li> <li class="dib"> - <span class="icon iconfont iconjinggao"></span> + <span class="icon iconfont iconliulan"></span> <div class="name"> - 警告 + 浏览 </div> - <div class="code-name">.iconjinggao + <div class="code-name">.iconliulan </div> </li> <li class="dib"> - <span class="icon iconfont iconditu1"></span> + <span class="icon iconfont icongongju"></span> <div class="name"> - 底图 + 工具 </div> - <div class="code-name">.iconditu1 + <div class="code-name">.icongongju </div> </li> <li class="dib"> - <span class="icon iconfont iconshuaxin"></span> + <span class="icon iconfont iconmanyou"></span> <div class="name"> - 刷新 + 漫游 </div> - <div class="code-name">.iconshuaxin + <div class="code-name">.iconmanyou </div> </li> <li class="dib"> - <span class="icon iconfont iconmima"></span> + <span class="icon iconfont icontianjiazhandian"></span> <div class="name"> - 密码 + 添加站点 </div> - <div class="code-name">.iconmima + <div class="code-name">.icontianjiazhandian </div> </li> <li class="dib"> - <span class="icon iconfont iconshuxingbiao"></span> + <span class="icon iconfont iconfeidengbi1"></span> <div class="name"> - 属性表 + 非等比 </div> - <div class="code-name">.iconshuxingbiao + <div class="code-name">.iconfeidengbi1 </div> </li> <li class="dib"> - <span class="icon iconfont iconguanbi"></span> + <span class="icon iconfont iconfenggeshezhi1"></span> <div class="name"> - 关闭 + 风格设置 </div> - <div class="code-name">.iconguanbi + <div class="code-name">.iconfenggeshezhi1 </div> </li> <li class="dib"> - <span class="icon iconfont iconshangyiyiceng"></span> + <span class="icon iconfont icondengbi"></span> <div class="name"> - 上移一层 + 等比 </div> - <div class="code-name">.iconshangyiyiceng + <div class="code-name">.icondengbi </div> </li> <li class="dib"> - <span class="icon iconfont iconshouqi"></span> + <span class="icon iconfont icondingshitu"></span> <div class="name"> - 收起 + 顶视图 </div> - <div class="code-name">.iconshouqi + <div class="code-name">.icondingshitu </div> </li> <li class="dib"> - <span class="icon iconfont iconkejian"></span> + <span class="icon iconfont iconhouchuli"></span> <div class="name"> - 可见 + 后处理 </div> - <div class="code-name">.iconkejian + <div class="code-name">.iconhouchuli </div> </li> <li class="dib"> - <span class="icon iconfont iconshanchu"></span> + <span class="icon iconfont iconshidianguanli"></span> <div class="name"> - 删除 + 视点管理 </div> - <div class="code-name">.iconshanchu + <div class="code-name">.iconshidianguanli </div> </li> <li class="dib"> - <span class="icon iconfont iconsousuo"></span> + <span class="icon iconfont iconshituqiehuan"></span> <div class="name"> - 搜索 + 视图切换 </div> - <div class="code-name">.iconsousuo + <div class="code-name">.iconshituqiehuan </div> </li> <li class="dib"> - <span class="icon iconfont iconshangchuan"></span> + <span class="icon iconfont icontoushitu"></span> <div class="name"> - 上传 + 透视图 </div> - <div class="code-name">.iconshangchuan + <div class="code-name">.icontoushitu </div> </li> <li class="dib"> - <span class="icon iconfont iconxiala"></span> + <span class="icon iconfont icontianqitiaojie"></span> <div class="name"> - 下拉 + 天气调节 </div> - <div class="code-name">.iconxiala + <div class="code-name">.icontianqitiaojie </div> </li> <li class="dib"> - <span class="icon iconfont icontupian"></span> + <span class="icon iconfont icondianxuan"></span> <div class="name"> - 图片 + 点选 </div> - <div class="code-name">.icontupian + <div class="code-name">.icondianxuan </div> </li> <li class="dib"> - <span class="icon iconfont icontianjiashuju"></span> + <span class="icon iconfont icondituchaxun"></span> <div class="name"> - 添加数据 + 地图查询 </div> - <div class="code-name">.icontianjiashuju + <div class="code-name">.icondituchaxun </div> </li> <li class="dib"> - <span class="icon iconfont iconyichu"></span> + <span class="icon iconfont iconkongjianjuli"></span> <div class="name"> - 移除 + 空间距离 </div> - <div class="code-name">.iconyichu + <div class="code-name">.iconkongjianjuli </div> </li> <li class="dib"> - <span class="icon iconfont iconxinjiangongcheng"></span> + <span class="icon iconfont iconyidijuli1"></span> <div class="name"> - 新建工程 + 依地距离 </div> - <div class="code-name">.iconxinjiangongcheng + <div class="code-name">.iconyidijuli1 </div> </li> <li class="dib"> - <span class="icon iconfont iconshezhi"></span> + <span class="icon iconfont icontouying"></span> <div class="name"> - 设置 + 投影 </div> - <div class="code-name">.iconshezhi + <div class="code-name">.icontouying </div> </li> <li class="dib"> - <span class="icon iconfont iconxinjianwenjian"></span> + <span class="icon iconfont iconlifangti"></span> <div class="name"> - 新建文件 + 立方体 </div> - <div class="code-name">.iconxinjianwenjian + <div class="code-name">.iconlifangti </div> </li> <li class="dib"> - <span class="icon iconfont iconquantu"></span> + <span class="icon iconfont iconqiuti"></span> <div class="name"> - 全图 + 球体 </div> - <div class="code-name">.iconquantu + <div class="code-name">.iconqiuti </div> </li> <li class="dib"> - <span class="icon iconfont icontishi"></span> + <span class="icon iconfont iconyuanzhui"></span> <div class="name"> - 提示 + 圆锥 </div> - <div class="code-name">.icontishi + <div class="code-name">.iconyuanzhui </div> </li> <li class="dib"> - <span class="icon iconfont icontianjia"></span> + <span class="icon iconfont iconyuanzhu"></span> <div class="name"> - 添加 + 圆柱 </div> - <div class="code-name">.icontianjia + <div class="code-name">.iconyuanzhu </div> </li> <li class="dib"> - <span class="icon iconfont iconyingxiang"></span> + <span class="icon iconfont iconyidimianji"></span> <div class="name"> - 影像 + 依地面积 </div> - <div class="code-name">.iconyingxiang + <div class="code-name">.iconyidimianji </div> </li> <li class="dib"> - <span class="icon iconfont iconxinjianfangan"></span> + <span class="icon iconfont iconzhibeizhen_1"></span> <div class="name"> - 新建方案 + 指北针 </div> - <div class="code-name">.iconxinjianfangan + <div class="code-name">.iconzhibeizhen_1 </div> </li> <li class="dib"> - <span class="icon iconfont iconshuju"></span> + <span class="icon iconfont iconfenggeshezhi"></span> <div class="name"> - 数据 + 风格设置 </div> - <div class="code-name">.iconshuju + <div class="code-name">.iconfenggeshezhi </div> </li> <li class="dib"> - <span class="icon iconfont icontuceng"></span> + <span class="icon iconfont iconguangyunxian"></span> <div class="name"> - 图层 + 光晕线 </div> - <div class="code-name">.icontuceng + <div class="code-name">.iconguangyunxian </div> </li> <li class="dib"> - <span class="icon iconfont iconxiayiyiceng"></span> + <span class="icon iconfont iconjiantou"></span> <div class="name"> - 下移一层 + 箭头 </div> - <div class="code-name">.iconxiayiyiceng + <div class="code-name">.iconjiantou </div> </li> <li class="dib"> - <span class="icon iconfont iconzhengque"></span> + <span class="icon iconfont iconpinghangguang"></span> <div class="name"> - 正确 + 平行光 </div> - <div class="code-name">.iconzhengque + <div class="code-name">.iconpinghangguang </div> </li> <li class="dib"> - <span class="icon iconfont iconwenjian"></span> + <span class="icon iconfont iconjuguangdeng"></span> <div class="name"> - 文件 + 聚光灯 </div> - <div class="code-name">.iconwenjian + <div class="code-name">.iconjuguangdeng </div> </li> <li class="dib"> - <span class="icon iconfont iconshijian"></span> + <span class="icon iconfont icondianguangyuan"></span> <div class="name"> - 时间 + 点光源 </div> - <div class="code-name">.iconshijian + <div class="code-name">.icondianguangyuan </div> </li> <li class="dib"> - <span class="icon iconfont icontingzhi"></span> + <span class="icon iconfont iconkongjianfenxi"></span> <div class="name"> - 停止 + 空间分析 </div> - <div class="code-name">.icontingzhi + <div class="code-name">.iconkongjianfenxi </div> </li> <li class="dib"> - <span class="icon iconfont iconyidong"></span> + <span class="icon iconfont iconzhuye"></span> <div class="name"> - 移动 + 主页 </div> - <div class="code-name">.iconyidong + <div class="code-name">.iconzhuye </div> </li> <li class="dib"> - <span class="icon iconfont iconzhiding"></span> + <span class="icon iconfont iconwangge"></span> <div class="name"> - 置顶 + 网格 </div> - <div class="code-name">.iconzhiding + <div class="code-name">.iconwangge </div> </li> <li class="dib"> - <span class="icon iconfont iconpingmian"></span> + <span class="icon iconfont iconchunse"></span> <div class="name"> - 平面 + 纯色 </div> - <div class="code-name">.iconpingmian + <div class="code-name">.iconchunse </div> </li> <li class="dib"> - <span class="icon iconfont iconzhongmingming"></span> + <span class="icon iconfont iconshui"></span> <div class="name"> - 重命名 + 水 </div> - <div class="code-name">.iconzhongmingming + <div class="code-name">.iconshui </div> </li> <li class="dib"> - <span class="icon iconfont iconzhibeizhen"></span> + <span class="icon iconfont iconyanhua"></span> <div class="name"> - 指北针 + 烟花 </div> - <div class="code-name">.iconzhibeizhen + <div class="code-name">.iconyanhua </div> </li> <li class="dib"> - <span class="icon iconfont iconzengjia"></span> + <span class="icon iconfont iconhuoyan"></span> <div class="name"> - 增加 + 火焰 </div> - <div class="code-name">.iconzengjia + <div class="code-name">.iconhuoyan + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconzanwuziyuan"></span> + <div class="name"> + 暂无资源 + </div> + <div class="code-name">.iconzanwuziyuan + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconzanwuditu"></span> + <div class="name"> + 暂无底图 + </div> + <div class="code-name">.iconzanwuditu + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconfuwei"></span> + <div class="name"> + 复位 + </div> + <div class="code-name">.iconfuwei + </div> + </li> + + <li class="dib"> + <span class="icon iconfont icongengduo"></span> + <div class="name"> + 更多 + </div> + <div class="code-name">.icongengduo + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconsuoxiao"></span> + <div class="name"> + 缩小 + </div> + <div class="code-name">.iconsuoxiao + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconfangda"></span> + <div class="name"> + 放大 + </div> + <div class="code-name">.iconfangda + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconceju"></span> + <div class="name"> + 测距 + </div> + <div class="code-name">.iconceju + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconcemian"></span> + <div class="name"> + 测面 + </div> + <div class="code-name">.iconcemian + </div> + </li> + + <li class="dib"> + <span class="icon iconfont icongou"></span> + <div class="name"> + 勾 + </div> + <div class="code-name">.icongou + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconbianjizzhou"></span> + <div class="name"> + 编辑z轴 + </div> + <div class="code-name">.iconbianjizzhou + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconskin"></span> + <div class="name"> + skin + </div> + <div class="code-name">.iconskin + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconuser"></span> + <div class="name"> + user + </div> + <div class="code-name">.iconuser + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconcegao"></span> + <div class="name"> + 测高 + </div> + <div class="code-name">.iconcegao + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconkapianshi"></span> + <div class="name"> + 卡片式 + </div> + <div class="code-name">.iconkapianshi + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconliebiaoshi"></span> + <div class="name"> + 列表式 + </div> + <div class="code-name">.iconliebiaoshi + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconbianji"></span> + <div class="name"> + 编辑 + </div> + <div class="code-name">.iconbianji + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconbofang"></span> + <div class="name"> + 播放 + </div> + <div class="code-name">.iconbofang + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconbaocun"></span> + <div class="name"> + 保存 + </div> + <div class="code-name">.iconbaocun </div> </li> - <li class="dib"> - <span class="icon iconfont iconniantie"></span> - <div class="name"> - 粘贴 - </div> - <div class="code-name">.iconniantie - </div> - </li> + <li class="dib"> + <span class="icon iconfont iconchangjing"></span> + <div class="name"> + 场景 + </div> + <div class="code-name">.iconchangjing + </div> + </li> + + <li class="dib"> + <span class="icon iconfont icondaochu"></span> + <div class="name"> + 导出 + </div> + <div class="code-name">.icondaochu + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconchexiao"></span> + <div class="name"> + 撤销 + </div> + <div class="code-name">.iconchexiao + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconcuowu"></span> + <div class="name"> + 错误 + </div> + <div class="code-name">.iconcuowu + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconfuzhi"></span> + <div class="name"> + 复制 + </div> + <div class="code-name">.iconfuzhi + </div> + </li> + + <li class="dib"> + <span class="icon iconfont icondixing"></span> + <div class="name"> + 地形 + </div> + <div class="code-name">.icondixing + </div> + </li> + + <li class="dib"> + <span class="icon iconfont icondingwei"></span> + <div class="name"> + 定位 + </div> + <div class="code-name">.icondingwei + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconfanhui"></span> + <div class="name"> + 返回 + </div> + <div class="code-name">.iconfanhui + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconfenxiang"></span> + <div class="name"> + 分享 + </div> + <div class="code-name">.iconfenxiang + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconjianshao"></span> + <div class="name"> + 减少 + </div> + <div class="code-name">.iconjianshao + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconfangyang"></span> + <div class="name"> + 放样 + </div> + <div class="code-name">.iconfangyang + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconshaixuan"></span> + <div class="name"> + 筛选 + </div> + <div class="code-name">.iconshaixuan + </div> + </li> + + <li class="dib"> + <span class="icon iconfont icondaoru"></span> + <div class="name"> + 导入 + </div> + <div class="code-name">.icondaoru + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconjianqie"></span> + <div class="name"> + 剪切 + </div> + <div class="code-name">.iconjianqie + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconmoxing"></span> + <div class="name"> + 模型 + </div> + <div class="code-name">.iconmoxing + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconjinggao"></span> + <div class="name"> + 警告 + </div> + <div class="code-name">.iconjinggao + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconditu1"></span> + <div class="name"> + 底图 + </div> + <div class="code-name">.iconditu1 + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconshuaxin"></span> + <div class="name"> + 刷新 + </div> + <div class="code-name">.iconshuaxin + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconmima"></span> + <div class="name"> + 密码 + </div> + <div class="code-name">.iconmima + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconshuxingbiao"></span> + <div class="name"> + 属性表 + </div> + <div class="code-name">.iconshuxingbiao + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconguanbi"></span> + <div class="name"> + 关闭 + </div> + <div class="code-name">.iconguanbi + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconshangyiyiceng"></span> + <div class="name"> + 上移一层 + </div> + <div class="code-name">.iconshangyiyiceng + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconshouqi"></span> + <div class="name"> + 收起 + </div> + <div class="code-name">.iconshouqi + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconkejian"></span> + <div class="name"> + 可见 + </div> + <div class="code-name">.iconkejian + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconshanchu"></span> + <div class="name"> + 删除 + </div> + <div class="code-name">.iconshanchu + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconsousuo"></span> + <div class="name"> + 搜索 + </div> + <div class="code-name">.iconsousuo + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconshangchuan"></span> + <div class="name"> + 上传 + </div> + <div class="code-name">.iconshangchuan + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconxiala"></span> + <div class="name"> + 下拉 + </div> + <div class="code-name">.iconxiala + </div> + </li> + + <li class="dib"> + <span class="icon iconfont icontupian"></span> + <div class="name"> + 图片 + </div> + <div class="code-name">.icontupian + </div> + </li> + + <li class="dib"> + <span class="icon iconfont icontianjiashuju"></span> + <div class="name"> + 添加数据 + </div> + <div class="code-name">.icontianjiashuju + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconyichu"></span> + <div class="name"> + 移除 + </div> + <div class="code-name">.iconyichu + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconxinjiangongcheng"></span> + <div class="name"> + 新建工程 + </div> + <div class="code-name">.iconxinjiangongcheng + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconshezhi"></span> + <div class="name"> + 设置 + </div> + <div class="code-name">.iconshezhi + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconxinjianwenjian"></span> + <div class="name"> + 新建文件 + </div> + <div class="code-name">.iconxinjianwenjian + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconquantu"></span> + <div class="name"> + 全图 + </div> + <div class="code-name">.iconquantu + </div> + </li> + + <li class="dib"> + <span class="icon iconfont icontishi"></span> + <div class="name"> + 提示 + </div> + <div class="code-name">.icontishi + </div> + </li> + + <li class="dib"> + <span class="icon iconfont icontianjia"></span> + <div class="name"> + 添加 + </div> + <div class="code-name">.icontianjia + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconyingxiang"></span> + <div class="name"> + 影像 + </div> + <div class="code-name">.iconyingxiang + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconxinjianfangan"></span> + <div class="name"> + 新建方案 + </div> + <div class="code-name">.iconxinjianfangan + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconshuju"></span> + <div class="name"> + 数据 + </div> + <div class="code-name">.iconshuju + </div> + </li> + + <li class="dib"> + <span class="icon iconfont icontuceng"></span> + <div class="name"> + 图层 + </div> + <div class="code-name">.icontuceng + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconxiayiyiceng"></span> + <div class="name"> + 下移一层 + </div> + <div class="code-name">.iconxiayiyiceng + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconzhengque"></span> + <div class="name"> + 正确 + </div> + <div class="code-name">.iconzhengque + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconwenjian"></span> + <div class="name"> + 文件 + </div> + <div class="code-name">.iconwenjian + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconshijian"></span> + <div class="name"> + 时间 + </div> + <div class="code-name">.iconshijian + </div> + </li> + + <li class="dib"> + <span class="icon iconfont icontingzhi"></span> + <div class="name"> + 停止 + </div> + <div class="code-name">.icontingzhi + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconyidong"></span> + <div class="name"> + 移动 + </div> + <div class="code-name">.iconyidong + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconzhiding"></span> + <div class="name"> + 置顶 + </div> + <div class="code-name">.iconzhiding + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconpingmian"></span> + <div class="name"> + 平面 + </div> + <div class="code-name">.iconpingmian + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconzhongmingming"></span> + <div class="name"> + 重命名 + </div> + <div class="code-name">.iconzhongmingming + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconzhibeizhen"></span> + <div class="name"> + 指北针 + </div> + <div class="code-name">.iconzhibeizhen + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconzengjia"></span> + <div class="name"> + 增加 + </div> + <div class="code-name">.iconzengjia + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconniantie"></span> + <div class="name"> + 粘贴 + </div> + <div class="code-name">.iconniantie + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconzuidahua"></span> + <div class="name"> + 最大化 + </div> + <div class="code-name">.iconzuidahua + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconyiwen"></span> + <div class="name"> + 疑问 + </div> + <div class="code-name">.iconyiwen + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconzhidi"></span> + <div class="name"> + 置底 + </div> + <div class="code-name">.iconzhidi + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconyincang"></span> + <div class="name"> + 隐藏 + </div> + <div class="code-name">.iconyincang + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconzhongzuo"></span> + <div class="name"> + 重做 + </div> + <div class="code-name">.iconzhongzuo + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconzanting"></span> + <div class="name"> + 暂停 + </div> + <div class="code-name">.iconzanting + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconzuixiaohua"></span> + <div class="name"> + 最小化 + </div> + <div class="code-name">.iconzuixiaohua + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconlashen"></span> + <div class="name"> + 拉伸 + </div> + <div class="code-name">.iconlashen + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconxiazai"></span> + <div class="name"> + 下载 + </div> + <div class="code-name">.iconxiazai + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconlunkuoxian"></span> + <div class="name"> + 轮廓线 + </div> + <div class="code-name">.iconlunkuoxian + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconhuizhimian"></span> + <div class="name"> + 绘制面 + </div> + <div class="code-name">.iconhuizhimian + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconshixian"></span> + <div class="name"> + 实线 + </div> + <div class="code-name">.iconshixian + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconhuizhitiaowen"></span> + <div class="name"> + 绘制条纹 + </div> + <div class="code-name">.iconhuizhitiaowen + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconxuxian"></span> + <div class="name"> + 虚线 + </div> + <div class="code-name">.iconxuxian + </div> + </li> + + <li class="dib"> + <span class="icon iconfont iconweijixian"></span> + <div class="name"> + 尾迹线 + </div> + <div class="code-name">.iconweijixian + </div> + </li> + + </ul> + <div class="article markdown"> + <h2 id="font-class-">font-class 引用</h2> + <hr> + + <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p> + <p>与 Unicode 使用方式相比,具有如下特点:</p> + <ul> + <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li> + <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li> + </ul> + <p>使用步骤如下:</p> + <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3> +<pre><code class="language-html"><link rel="stylesheet" href="./iconfont.css"> +</code></pre> + <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3> +<pre><code class="language-html"><span class="iconfont iconxxx"></span> +</code></pre> + <blockquote> + <p>" + iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p> + </blockquote> + </div> + </div> + <div class="content symbol"> + <ul class="icon_lists dib-box"> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icontianjiameitiziduan"></use> + </svg> + <div class="name">添加媒体字段</div> + <div class="code-name">#icontianjiameitiziduan</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconzhidingshujuchaxun"></use> + </svg> + <div class="name">指定数据查询</div> + <div class="code-name">#iconzhidingshujuchaxun</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconduixianghuizhi"></use> + </svg> + <div class="name">对象绘制</div> + <div class="code-name">#iconduixianghuizhi</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconsanweifenxi"></use> + </svg> + <div class="name">三维分析</div> + <div class="code-name">#iconsanweifenxi</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconqingtian"></use> + </svg> + <div class="name">晴天</div> + <div class="code-name">#iconqingtian</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconxiaxue"></use> + </svg> + <div class="name">下雪</div> + <div class="code-name">#iconxiaxue</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconxiayu"></use> + </svg> + <div class="name">下雨</div> + <div class="code-name">#iconxiayu</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconduoyun"></use> + </svg> + <div class="name">多云</div> + <div class="code-name">#iconduoyun</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconshitu"></use> + </svg> + <div class="name">视图</div> + <div class="code-name">#iconshitu</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconqingxiedantihua"></use> + </svg> + <div class="name">倾斜单体化</div> + <div class="code-name">#iconqingxiedantihua</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icontianjia_xuanzhong"></use> + </svg> + <div class="name">添加_选中</div> + <div class="code-name">#icontianjia_xuanzhong</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconsanweifenxi_xuanzhong1"></use> + </svg> + <div class="name">三维分析_选中</div> + <div class="code-name">#iconsanweifenxi_xuanzhong1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icontucengfengge"></use> + </svg> + <div class="name">图层风格</div> + <div class="code-name">#icontucengfengge</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconchangjing_xuanzhong"></use> + </svg> + <div class="name">场景_选中</div> + <div class="code-name">#iconchangjing_xuanzhong</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconliangsuan_xuanzhong"></use> + </svg> + <div class="name">量算_选中</div> + <div class="code-name">#iconliangsuan_xuanzhong</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconhuizhi_xuanzhong"></use> + </svg> + <div class="name">绘制_选中</div> + <div class="code-name">#iconhuizhi_xuanzhong</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconliangsuan"></use> + </svg> + <div class="name">量算</div> + <div class="code-name">#iconliangsuan</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-0"></use> + </svg> + <div class="name">0</div> + <div class="code-name">#icona-0</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-7_1"></use> + </svg> + <div class="name">7_1</div> + <div class="code-name">#icona-7_1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-0_1"></use> + </svg> + <div class="name">0_1</div> + <div class="code-name">#icona-0_1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-2_1"></use> + </svg> + <div class="name">2_1</div> + <div class="code-name">#icona-2_1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-1_1"></use> + </svg> + <div class="name">1_1</div> + <div class="code-name">#icona-1_1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-parkinglot"></use> + </svg> + <div class="name">parking lot</div> + <div class="code-name">#icona-parkinglot</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-gasstation"></use> + </svg> + <div class="name">gas station</div> + <div class="code-name">#icona-gasstation</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-9"></use> + </svg> + <div class="name">9</div> + <div class="code-name">#icona-9</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-5_1"></use> + </svg> + <div class="name">5_1</div> + <div class="code-name">#icona-5_1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconcaution"></use> + </svg> + <div class="name">caution</div> + <div class="code-name">#iconcaution</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconhospital"></use> + </svg> + <div class="name">hospital</div> + <div class="code-name">#iconhospital</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-7"></use> + </svg> + <div class="name">7</div> + <div class="code-name">#icona-7</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-3"></use> + </svg> + <div class="name">3</div> + <div class="code-name">#icona-3</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconhot"></use> + </svg> + <div class="name">hot</div> + <div class="code-name">#iconhot</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-8_1"></use> + </svg> + <div class="name">8_1</div> + <div class="code-name">#icona-8_1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-4_1"></use> + </svg> + <div class="name">4_1</div> + <div class="code-name">#icona-4_1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-8"></use> + </svg> + <div class="name">8</div> + <div class="code-name">#icona-8</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-6"></use> + </svg> + <div class="name">6</div> + <div class="code-name">#icona-6</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-3_1"></use> + </svg> + <div class="name">3_1</div> + <div class="code-name">#icona-3_1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconorientation_1"></use> + </svg> + <div class="name">orientation_1</div> + <div class="code-name">#iconorientation_1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-6_1"></use> + </svg> + <div class="name">6_1</div> + <div class="code-name">#icona-6_1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-2"></use> + </svg> + <div class="name">2</div> + <div class="code-name">#icona-2</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-10"></use> + </svg> + <div class="name">10</div> + <div class="code-name">#icona-10</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-4"></use> + </svg> + <div class="name">4</div> + <div class="code-name">#icona-4</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-1"></use> + </svg> + <div class="name">1</div> + <div class="code-name">#icona-1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-5"></use> + </svg> + <div class="name">5</div> + <div class="code-name">#icona-5</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconschool"></use> + </svg> + <div class="name">school</div> + <div class="code-name">#iconschool</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-10_1"></use> + </svg> + <div class="name">10_1</div> + <div class="code-name">#icona-10_1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconZ"></use> + </svg> + <div class="name">Z</div> + <div class="code-name">#iconZ</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-RailwayStation"></use> + </svg> + <div class="name">Railway Station</div> + <div class="code-name">#icona-RailwayStation</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconX"></use> + </svg> + <div class="name">X</div> + <div class="code-name">#iconX</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icontoilet"></use> + </svg> + <div class="name">toilet</div> + <div class="code-name">#icontoilet</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icona-9_1"></use> + </svg> + <div class="name">9_1</div> + <div class="code-name">#icona-9_1</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconorientation_2"></use> + </svg> + <div class="name">orientation_2</div> + <div class="code-name">#iconorientation_2</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconY"></use> + </svg> + <div class="name">Y</div> + <div class="code-name">#iconY</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconairport"></use> + </svg> + <div class="name">airport</div> + <div class="code-name">#iconairport</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconshili"></use> + </svg> + <div class="name">示例</div> + <div class="code-name">#iconshili</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconbiaozhubiaohui"></use> + </svg> + <div class="name">标注标绘</div> + <div class="code-name">#iconbiaozhubiaohui</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icontucengcaozuo"></use> + </svg> + <div class="name">图层操作</div> + <div class="code-name">#icontucengcaozuo</div> + </li> - <li class="dib"> - <span class="icon iconfont iconzuidahua"></span> - <div class="name"> - 最大化 - </div> - <div class="code-name">.iconzuidahua - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconcaizhiku"></use> + </svg> + <div class="name">材质库</div> + <div class="code-name">#iconcaizhiku</div> + </li> - <li class="dib"> - <span class="icon iconfont iconyiwen"></span> - <div class="name"> - 疑问 - </div> - <div class="code-name">.iconyiwen - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconmoxingku"></use> + </svg> + <div class="name">模型库</div> + <div class="code-name">#iconmoxingku</div> + </li> - <li class="dib"> - <span class="icon iconfont iconzhidi"></span> - <div class="name"> - 置底 - </div> - <div class="code-name">.iconzhidi - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconshuding"></use> + </svg> + <div class="name">书钉</div> + <div class="code-name">#iconshuding</div> + </li> - <li class="dib"> - <span class="icon iconfont iconyincang"></span> - <div class="name"> - 隐藏 - </div> - <div class="code-name">.iconyincang - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconluzhi"></use> + </svg> + <div class="name">录制</div> + <div class="code-name">#iconluzhi</div> + </li> - <li class="dib"> - <span class="icon iconfont iconzhongzuo"></span> - <div class="name"> - 重做 - </div> - <div class="code-name">.iconzhongzuo - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconchaxun"></use> + </svg> + <div class="name">查询</div> + <div class="code-name">#iconchaxun</div> + </li> - <li class="dib"> - <span class="icon iconfont iconzanting"></span> - <div class="name"> - 暂停 - </div> - <div class="code-name">.iconzanting - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconliulan"></use> + </svg> + <div class="name">浏览</div> + <div class="code-name">#iconliulan</div> + </li> - <li class="dib"> - <span class="icon iconfont iconzuixiaohua"></span> - <div class="name"> - 最小化 - </div> - <div class="code-name">.iconzuixiaohua - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icongongju"></use> + </svg> + <div class="name">工具</div> + <div class="code-name">#icongongju</div> + </li> - <li class="dib"> - <span class="icon iconfont iconlashen"></span> - <div class="name"> - 拉伸 - </div> - <div class="code-name">.iconlashen - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconmanyou"></use> + </svg> + <div class="name">漫游</div> + <div class="code-name">#iconmanyou</div> + </li> - <li class="dib"> - <span class="icon iconfont iconxiazai"></span> - <div class="name"> - 下载 - </div> - <div class="code-name">.iconxiazai - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icontianjiazhandian"></use> + </svg> + <div class="name">添加站点</div> + <div class="code-name">#icontianjiazhandian</div> + </li> - <li class="dib"> - <span class="icon iconfont iconlunkuoxian"></span> - <div class="name"> - 轮廓线 - </div> - <div class="code-name">.iconlunkuoxian - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconfeidengbi1"></use> + </svg> + <div class="name">非等比</div> + <div class="code-name">#iconfeidengbi1</div> + </li> - <li class="dib"> - <span class="icon iconfont iconhuizhimian"></span> - <div class="name"> - 绘制面 - </div> - <div class="code-name">.iconhuizhimian - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconfenggeshezhi1"></use> + </svg> + <div class="name">风格设置</div> + <div class="code-name">#iconfenggeshezhi1</div> + </li> - <li class="dib"> - <span class="icon iconfont iconshixian"></span> - <div class="name"> - 实线 - </div> - <div class="code-name">.iconshixian - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icondengbi"></use> + </svg> + <div class="name">等比</div> + <div class="code-name">#icondengbi</div> + </li> - <li class="dib"> - <span class="icon iconfont iconhuizhitiaowen"></span> - <div class="name"> - 绘制条纹 - </div> - <div class="code-name">.iconhuizhitiaowen - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icondingshitu"></use> + </svg> + <div class="name">顶视图</div> + <div class="code-name">#icondingshitu</div> + </li> - <li class="dib"> - <span class="icon iconfont iconxuxian"></span> - <div class="name"> - 虚线 - </div> - <div class="code-name">.iconxuxian - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconhouchuli"></use> + </svg> + <div class="name">后处理</div> + <div class="code-name">#iconhouchuli</div> + </li> - <li class="dib"> - <span class="icon iconfont iconweijixian"></span> - <div class="name"> - 尾迹线 - </div> - <div class="code-name">.iconweijixian - </div> - </li> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconshidianguanli"></use> + </svg> + <div class="name">视点管理</div> + <div class="code-name">#iconshidianguanli</div> + </li> - </ul> - <div class="article markdown"> - <h2 id="font-class-">font-class 引用</h2> - <hr> - - <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p> - <p>与 Unicode 使用方式相比,具有如下特点:</p> - <ul> - <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li> - <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li> - </ul> - <p>使用步骤如下:</p> - <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3> -<pre><code class="language-html"><link rel="stylesheet" href="./iconfont.css"> -</code></pre> - <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3> -<pre><code class="language-html"><span class="iconfont iconxxx"></span> -</code></pre> - <blockquote> - <p>" - iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p> - </blockquote> - </div> - </div> - <div class="content symbol"> - <ul class="icon_lists dib-box"> + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#iconshituqiehuan"></use> + </svg> + <div class="name">视图切换</div> + <div class="code-name">#iconshituqiehuan</div> + </li> <li class="dib"> <svg class="icon svg-icon" aria-hidden="true"> - <use xlink:href="#icondianxuan"></use> + <use xlink:href="#icontoushitu"></use> </svg> - <div class="name">点选</div> - <div class="code-name">#icondianxuan</div> + <div class="name">透视图</div> + <div class="code-name">#icontoushitu</div> + </li> + + <li class="dib"> + <svg class="icon svg-icon" aria-hidden="true"> + <use xlink:href="#icontianqitiaojie"></use> + </svg> + <div class="name">天气调节</div> + <div class="code-name">#icontianqitiaojie</div> </li> <li class="dib"> <svg class="icon svg-icon" aria-hidden="true"> - <use xlink:href="#iconshpchaxun"></use> + <use xlink:href="#icondianxuan"></use> </svg> - <div class="name">shp查询</div> - <div class="code-name">#iconshpchaxun</div> + <div class="name">点选</div> + <div class="code-name">#icondianxuan</div> </li> <li class="dib"> @@ -1929,7 +3563,7 @@ <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h <svg class="icon svg-icon" aria-hidden="true"> <use xlink:href="#iconzhibeizhen_1"></use> </svg> - <div class="name">指北针_1</div> + <div class="name">指北针</div> <div class="code-name">#iconzhibeizhen_1</div> </li> @@ -1965,14 +3599,6 @@ <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h <div class="code-name">#iconpinghangguang</div> </li> - <li class="dib"> - <svg class="icon svg-icon" aria-hidden="true"> - <use xlink:href="#iconhuizhi"></use> - </svg> - <div class="name">绘制</div> - <div class="code-name">#iconhuizhi</div> - </li> - <li class="dib"> <svg class="icon svg-icon" aria-hidden="true"> <use xlink:href="#iconjuguangdeng"></use> @@ -2229,14 +3855,6 @@ <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h <div class="code-name">#iconfuzhi</div> </li> - <li class="dib"> - <svg class="icon svg-icon" aria-hidden="true"> - <use xlink:href="#iconfenxi"></use> - </svg> - <div class="name">分析</div> - <div class="code-name">#iconfenxi</div> - </li> - <li class="dib"> <svg class="icon svg-icon" aria-hidden="true"> <use xlink:href="#icondixing"></use> @@ -2277,14 +3895,6 @@ <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h <div class="code-name">#iconjianshao</div> </li> - <li class="dib"> - <svg class="icon svg-icon" aria-hidden="true"> - <use xlink:href="#iconliangsuan"></use> - </svg> - <div class="name">量算</div> - <div class="code-name">#iconliangsuan</div> - </li> - <li class="dib"> <svg class="icon svg-icon" aria-hidden="true"> <use xlink:href="#iconfangyang"></use> diff --git a/SuperMap iEarth/src/assets/icons/iconfont.css b/SuperMap iEarth/src/assets/icons/iconfont.css index 5ad97964..6ea6db92 100644 --- a/SuperMap iEarth/src/assets/icons/iconfont.css +++ b/SuperMap iEarth/src/assets/icons/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2397568 */ - src: url('iconfont.woff2?t=1692946974504') format('woff2'), - url('iconfont.woff?t=1692946974504') format('woff'), - url('iconfont.ttf?t=1692946974504') format('truetype'); + src: url('iconfont.woff2?t=1710320050582') format('woff2'), + url('iconfont.woff?t=1710320050582') format('woff'), + url('iconfont.ttf?t=1710320050582') format('truetype'); } .iconfont { @@ -13,14 +13,306 @@ -moz-osx-font-smoothing: grayscale; } -.icondianxuan:before { - content: "\e891"; +.icontianjiameitiziduan:before { + content: "\e8d8"; +} + +.iconzhidingshujuchaxun:before { + content: "\e8d9"; +} + +.iconduixianghuizhi:before { + content: "\e8d6"; +} + +.iconsanweifenxi:before { + content: "\e8d7"; +} + +.iconqingtian:before { + content: "\e8d2"; +} + +.iconxiaxue:before { + content: "\e8d3"; +} + +.iconxiayu:before { + content: "\e8d4"; +} + +.iconduoyun:before { + content: "\e8d5"; +} + +.iconshitu:before { + content: "\e8d1"; +} + +.iconqingxiedantihua:before { + content: "\e8ca"; +} + +.icontianjia_xuanzhong:before { + content: "\e8cf"; +} + +.iconsanweifenxi_xuanzhong1:before { + content: "\e8d0"; +} + +.icontucengfengge:before { + content: "\e8ce"; +} + +.iconchangjing_xuanzhong:before { + content: "\e8cd"; +} + +.iconliangsuan_xuanzhong:before { + content: "\e8cb"; +} + +.iconhuizhi_xuanzhong:before { + content: "\e8cc"; +} + +.iconliangsuan:before { + content: "\e873"; +} + +.icona-0:before { + content: "\e8c5"; +} + +.icona-7_1:before { + content: "\e8c6"; +} + +.icona-0_1:before { + content: "\e8c7"; +} + +.icona-2_1:before { + content: "\e8c8"; +} + +.icona-1_1:before { + content: "\e8c9"; +} + +.icona-parkinglot:before { + content: "\e8b1"; +} + +.icona-gasstation:before { + content: "\e8b2"; +} + +.icona-9:before { + content: "\e8b3"; +} + +.icona-5_1:before { + content: "\e8b4"; +} + +.iconcaution:before { + content: "\e8b5"; +} + +.iconhospital:before { + content: "\e8b6"; +} + +.icona-7:before { + content: "\e8b7"; +} + +.icona-3:before { + content: "\e8b8"; +} + +.iconhot:before { + content: "\e8b9"; +} + +.icona-8_1:before { + content: "\e8ba"; +} + +.icona-4_1:before { + content: "\e8bb"; +} + +.icona-8:before { + content: "\e8bc"; +} + +.icona-6:before { + content: "\e8bd"; +} + +.icona-3_1:before { + content: "\e8be"; +} + +.iconorientation_1:before { + content: "\e8bf"; +} + +.icona-6_1:before { + content: "\e8c0"; +} + +.icona-2:before { + content: "\e8c1"; } -.iconshpchaxun:before { +.icona-10:before { + content: "\e8c2"; +} + +.icona-4:before { + content: "\e8c3"; +} + +.icona-1:before { + content: "\e8c4"; +} + +.icona-5:before { + content: "\e8a6"; +} + +.iconschool:before { + content: "\e8a7"; +} + +.icona-10_1:before { + content: "\e8a8"; +} + +.iconZ:before { + content: "\e8a9"; +} + +.icona-RailwayStation:before { + content: "\e8aa"; +} + +.iconX:before { + content: "\e8ab"; +} + +.icontoilet:before { + content: "\e8ac"; +} + +.icona-9_1:before { + content: "\e8ad"; +} + +.iconorientation_2:before { + content: "\e8ae"; +} + +.iconY:before { + content: "\e8af"; +} + +.iconairport:before { + content: "\e8b0"; +} + +.iconshili:before { + content: "\e8a5"; +} + +.iconbiaozhubiaohui:before { + content: "\e897"; +} + +.icontucengcaozuo:before { + content: "\e8a1"; +} + +.iconcaizhiku:before { + content: "\e8a3"; +} + +.iconmoxingku:before { + content: "\e8a4"; +} + +.iconshuding:before { + content: "\e89e"; +} + +.iconluzhi:before { + content: "\e892"; +} + +.iconchaxun:before { + content: "\e89d"; +} + +.iconliulan:before { content: "\e890"; } +.icongongju:before { + content: "\e8a2"; +} + +.iconmanyou:before { + content: "\e89c"; +} + +.icontianjiazhandian:before { + content: "\e89f"; +} + +.iconfeidengbi1:before { + content: "\e8a0"; +} + +.iconfenggeshezhi1:before { + content: "\e893"; +} + +.icondengbi:before { + content: "\e894"; +} + +.icondingshitu:before { + content: "\e895"; +} + +.iconhouchuli:before { + content: "\e896"; +} + +.iconshidianguanli:before { + content: "\e898"; +} + +.iconshituqiehuan:before { + content: "\e899"; +} + +.icontoushitu:before { + content: "\e89a"; +} + +.icontianqitiaojie:before { + content: "\e89b"; +} + +.icondianxuan:before { + content: "\e891"; +} + .icondituchaxun:before { content: "\e88f"; } @@ -77,10 +369,6 @@ content: "\e882"; } -.iconhuizhi:before { - content: "\e873"; -} - .iconjuguangdeng:before { content: "\e880"; } @@ -209,10 +497,6 @@ content: "\e825"; } -.iconfenxi:before { - content: "\e826"; -} - .icondixing:before { content: "\e828"; } @@ -233,10 +517,6 @@ content: "\e82d"; } -.iconliangsuan:before { - content: "\e82e"; -} - .iconfangyang:before { content: "\e82f"; } diff --git a/SuperMap iEarth/src/assets/icons/iconfont.js b/SuperMap iEarth/src/assets/icons/iconfont.js index 5aa2eb82..5289e80b 100644 --- a/SuperMap iEarth/src/assets/icons/iconfont.js +++ b/SuperMap iEarth/src/assets/icons/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_2397568='<svg><symbol id="icondianxuan" viewBox="0 0 1024 1024"><path d="M251.328 178.24L716.8 455.68l-215.872 50.752 178.944 309.504-90.112 52.032-179.008-309.76-151.872 161.472-7.552-541.376m-63.36-109.888a31.68 31.68 0 0 0-16 27.2l15.104 729.728a32.064 32.064 0 0 0 55.232 22.528l153.6-163.328 150.08 259.52a32 32 0 0 0 43.712 11.712l166.272-96a32 32 0 0 0 11.712-43.712l-149.76-259.136 218.112-51.264a32.064 32.064 0 0 0 8.256-59.072L219.584 68.096a31.744 31.744 0 0 0-31.616 0.256z" ></path></symbol><symbol id="iconshpchaxun" viewBox="0 0 1024 1024"><path d="M288 320h320a32 32 0 1 0 0-64h-320a32 32 0 0 0 0 64zM288 448h64a32 32 0 1 0 0-64h-64a32 32 0 0 0 0 64z" ></path><path d="M832 128H192a64.064 64.064 0 0 0-64 64v640a64 64 0 0 0 64 64h416a32 32 0 0 0 0-64H192V192h640v416a32 32 0 0 0 64 0V192a64 64 0 0 0-64-64z" ></path><path d="M732.16 686.912a193.152 193.152 0 1 0-45.248 45.248l122.432 122.496a32 32 0 0 0 45.248-45.248zM576 704a128 128 0 1 1 128-128 128.128 128.128 0 0 1-128 128z" ></path></symbol><symbol id="icondituchaxun" viewBox="0 0 1024 1024"><path d="M832 128H192a62.08 62.08 0 0 0-64 64v640c0 41.408 16.128 64 64 64h480a32 32 0 0 0 32-32l-0.512-5.76A32 32 0 0 0 672 832H192V192h640v480a32 32 0 0 0 64 0V192c0-36.864-27.136-64-64-64z" ></path><path d="M694.656 649.344a32 32 0 0 0-4.288-3.584A221.312 221.312 0 0 0 736 512c0-121.6-102.4-224-224-224S288 390.4 288 512s102.4 224 224 224c49.664 0 96.192-17.088 133.76-45.632a32 32 0 0 0 3.648 4.288l192 192a32 32 0 1 0 45.248-45.312l-192-192zM512 672c-89.6 0-160-70.4-160-160S422.4 352 512 352s160 70.4 160 160-70.4 160-160 160z" ></path></symbol><symbol id="iconkongjianjuli" viewBox="0 0 1024 1024"><path d="M600.32 61.248a33.536 33.536 0 0 0-47.296 2.048L60.032 556.352a33.536 33.536 0 0 0-2.112 47.36 33.536 33.536 0 0 0 47.36-2.112l492.992-493.056a33.536 33.536 0 0 0 2.112-47.296zM939.84 400.064l-226.304-226.24a64 64 0 0 0-90.496 0l-452.544 452.48a64 64 0 0 0 0 90.56L396.8 943.168a64 64 0 0 0 90.496 0l452.544-452.608a64 64 0 0 0 0-90.496zM442.048 897.92L215.68 671.616l452.544-452.544 226.304 226.24z" ></path><path d="M375.68 648.512a32 32 0 0 0-45.248 45.312l70.016 69.952a32 32 0 0 0 45.248-45.248zM586.24 438.016a32 32 0 0 0-45.312 45.248l70.016 70.016a32 32 0 0 0 45.248-45.248zM480.896 543.296a32 32 0 0 0-45.248 45.248l90.496 90.496a32 32 0 0 0 45.248-45.248zM646.208 377.984L736.64 468.48a32 32 0 1 0 45.248-45.248l-90.496-90.496a32 32 0 0 0-45.248 45.248z" ></path></symbol><symbol id="iconyidijuli1" viewBox="0 0 1024 1024"><path d="M864 704a32 32 0 0 0-32 32l-0.128 32H192.32l0.128-32a32 32 0 0 0-64 0L128 864a32 32 0 0 0 64 0l0.128-32h639.552l-0.128 32a32 32 0 0 0 64 0l0.448-128a32 32 0 0 0-32-32zM157.376 639.232a32 32 0 0 0 32-32c0-4.032 1.536-99.392 135.424-99.392 179.776 0 266.56-52.864 309.632-188.544a149.248 149.248 0 0 1 78.912-90.368 170.88 170.88 0 0 1 137.024-1.984 32 32 0 1 0 23.36-59.52 234.24 234.24 0 0 0-187.84 3.712A215.488 215.488 0 0 0 573.44 299.904c-29.632 93.312-78.016 144-248.64 144-157.76 0-199.424 106.88-199.424 163.328a32 32 0 0 0 32 32z" ></path></symbol><symbol id="icontouying" viewBox="0 0 1024 1024"><path d="M832 256H576V192a64 64 0 0 0-64-64H192a64 64 0 0 0-64 64v320a64 64 0 0 0 64 64h64v256a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64z m0 336.768L592.768 832H429.248L832 429.248zM192 192h320v320H192z m128 384h192a64 64 0 0 0 64-64V320h256v18.752L338.752 832H320z m363.264 256L832 683.264V832z" ></path></symbol><symbol id="iconlifangti" viewBox="0 0 1024 1024"><path d="M864.256 263.936l-320-190.976a62.72 62.72 0 0 0-64.512 0l-320 190.912A65.792 65.792 0 0 0 128 320.384v383.232a65.792 65.792 0 0 0 31.744 56.576l320 190.912a62.784 62.784 0 0 0 64.512 0l320-190.912a65.792 65.792 0 0 0 31.744-56.576V320.512a65.792 65.792 0 0 0-31.744-56.576zM480 148.544v108.928a32 32 0 0 0 64 0V148.608l255.68 152.576L544 455.488V384a32 32 0 0 0-64 0v71.616L223.68 301.504z m0 726.912l-256.832-153.216 95.104-56.96a32 32 0 0 0-32.896-54.848L192 666.368V358.4l256.576 154.24-62.848 37.632a32 32 0 0 0 32.896 54.912l61.376-36.736z m352-209.088l-93.376-55.936a32 32 0 0 0-32.896 54.848l95.104 56.96L544 875.456V568.448l61.376 36.736a31.424 31.424 0 0 0 16.448 4.544 32 32 0 0 0 16.448-59.456L575.36 512.64 832 357.76z" ></path></symbol><symbol id="iconqiuti" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 0 448 448 448 448 0 0 0-448-448z m369.024 342.784a334.848 334.848 0 0 0-31.808-19.008 32 32 0 1 0-29.696 56.576 132.096 132.096 0 0 1 74.112 74.24c-8.448 31.552-78.848 76.416-195.008 101.824 1.408-12.48 3.456-24.576 4.352-37.44l0.064-2.368a32 32 0 0 0-63.936-2.24c-1.28 18.304-3.776 35.776-6.144 53.312A920.768 920.768 0 0 1 512 640a919.232 919.232 0 0 1-119.808-8.192A919.232 919.232 0 0 1 384 512a920.768 920.768 0 0 1 8.32-120.96c17.536-2.368 34.944-4.864 53.312-6.144a32 32 0 0 0-2.304-63.936l-2.368 0.064c-12.8 0.96-24.896 2.944-37.376 4.352 25.408-116.096 70.272-186.56 101.824-194.944a132.096 132.096 0 0 1 74.24 74.112 32 32 0 1 0 56.576-29.76 334.848 334.848 0 0 0-19.008-31.744 385.088 385.088 0 0 1 263.744 263.744zM403.584 143.808a562.944 562.944 0 0 0-67.456 191.616c-17.92 3.456-36.096 6.72-52.992 11.264a32 32 0 0 0-22.72 39.168 32.512 32.512 0 0 0 39.232 22.72c8.512-2.304 17.92-3.712 26.752-5.76A1008.768 1008.768 0 0 0 320 512a1009.984 1009.984 0 0 0 6.336 108.608C209.472 595.264 138.624 550.144 130.368 518.4a120.32 120.32 0 0 1 62.976-67.648 32 32 0 0 0-32.128-55.36c-6.656 3.84-12.48 7.68-18.24 11.648a385.152 385.152 0 0 1 260.672-263.232z m-259.776 476.8a565.76 565.76 0 0 0 192.192 67.328 565.76 565.76 0 0 0 67.328 192.192 385.28 385.28 0 0 1-259.52-259.52z m473.088 260.48c3.904-5.76 7.808-11.648 11.648-18.304a32 32 0 0 0-55.36-32.064 120.32 120.32 0 0 1-67.648 62.912c-31.68-8.256-76.8-79.104-102.208-195.968A1009.984 1009.984 0 0 0 512 704a1008.768 1008.768 0 0 0 109.12-6.4c-1.92 8.768-3.392 18.176-5.696 26.688a32.512 32.512 0 0 0 22.72 39.232 32 32 0 0 0 39.168-22.72c4.48-16.896 7.808-35.008 11.264-52.992a562.944 562.944 0 0 0 191.616-67.456 385.152 385.152 0 0 1-263.232 260.672z" ></path><path d="M566.528 320a32 32 0 0 0-1.792 63.936 812.48 812.48 0 0 1 146.432 21.184 32 32 0 0 0 15.296-62.08A866.56 866.56 0 0 0 568.32 320z" ></path></symbol><symbol id="iconyuanzhui" viewBox="0 0 1024 1024"><path d="M644.224 555.584h-0.128l-0.32-0.064h-0.064l-0.384-0.064h-0.128l-0.384-0.064h-0.064l-0.384-0.064-0.512-0.128h-0.448l-0.96-0.192c-21.056-3.776-42.944-6.592-65.536-8.448l-0.512-0.064h-0.512l-0.512-0.128h-2.048l-0.448-0.192H566.08l-0.448-0.064H564.928l-0.832-0.128h-0.64q-22.976-1.536-46.72-1.664h-2.048L512.448 544h-17.664a731.84 731.84 0 0 0-109.696 10.624 32 32 0 1 0 11.072 63.04A674.304 674.304 0 0 1 512.448 608l2.048-0.064 1.984 0.064a669.504 669.504 0 0 1 116.16 10.56 32.448 32.448 0 0 0 5.76 0.512 32 32 0 0 0 5.76-63.488z" ></path><path d="M887.68 697.152a203.648 203.648 0 0 0-9.6-18.752L525.76 87.04a16 16 0 0 0-27.52 0L143.36 684.352l-3.648 6.144-0.64 1.216h0.192a103.168 103.168 0 0 0-10.752 44.352c0 106.048 171.904 192 384 192s384-85.952 384-192a100.544 100.544 0 0 0-8.704-38.848zM512.512 864c-195.328 0-320-75.84-320-128a39.616 39.616 0 0 1 4.096-16l6.464-10.88a170.752 170.752 0 0 1 60.352-48.448 31.872 31.872 0 0 0 1.536-55.68l247.168-415.808 249.92 419.392a31.168 31.168 0 0 0-10.112 10.368 32 32 0 0 0 12.8 43.392 179.776 179.776 0 0 1 54.656 42.56l8.96 15.104a39.616 39.616 0 0 1 4.16 16c0 52.16-124.672 128-320 128z" ></path></symbol><symbol id="iconyuanzhu" viewBox="0 0 1024 1024"><path d="M513.024 96c-204.16 0-374.336 74.752-383.616 182.656l-0.384 9.344v448l0.384 9.344c9.344 107.904 179.392 182.656 383.616 182.656 210.048 0 384-79.104 384-192v-448c0-112.896-173.952-192-384-192z m0 64c178.752 0 320 64.192 320 128s-141.248 128-320 128-320-64.192-320-128 141.248-128 320-128z m0 704c-178.752 0-320-64.192-320-128v-3.072c0.128-0.512 0.448-0.896 0.512-1.472 3.84-22.464 29.824-48.704 69.568-70.144a32 32 0 0 0-30.208-56.384 296.512 296.512 0 0 0-39.872 26.048V396.8a558.336 558.336 0 0 0 320 83.2 558.208 558.208 0 0 0 320.064-83.2l-0.32 234.368a296 296 0 0 0-40.128-26.24 32 32 0 0 0-30.272 56.384c39.808 21.44 65.856 47.616 69.632 70.144 0.064 0.64 0.448 1.216 0.64 1.856v8.64c-8.448 61.824-146.432 122.048-319.616 122.048z" ></path><path d="M643.712 555.584h-0.064l-0.32-0.064h-0.128l-0.384-0.064h-0.064l-0.384-0.064h-0.064l-0.448-0.064-0.448-0.128h-0.512L640 554.88c-21.12-3.712-43.008-6.592-65.536-8.448h-1.088l-0.448-0.064-0.448-0.064h-1.088l-0.448-0.128h-0.64l-0.384-0.064H569.344l-0.384-0.064H565.056l-0.512-0.064H564.48l-0.832-0.064H562.944q-23.04-1.6-46.72-1.728h-0.064l-2.048 0.064L512 544h-17.664a731.84 731.84 0 0 0-109.696 10.816 32 32 0 1 0 11.072 63.04A674.304 674.304 0 0 1 512 608l2.048-0.064 1.984 0.064a669.504 669.504 0 0 1 116.16 10.56 32.448 32.448 0 0 0 5.76 0.512 32 32 0 0 0 5.76-63.488z" ></path></symbol><symbol id="iconyidimianji" viewBox="0 0 1024 1024"><path d="M903.808 616.704a17.92 17.92 0 0 0-5.76-5.12l-91.328-62.464-172.608-407.104a17.92 17.92 0 0 0-16.768-11.2 18.176 18.176 0 0 0-6.464 1.152 17.728 17.728 0 0 0-10.24 10.048L441.6 551.488 331.52 364.736a18.176 18.176 0 0 0-24.512-6.4 17.728 17.728 0 0 0-7.68 8.768L227.008 549.376 135.68 611.84a17.6 17.6 0 0 0-5.12 24.704 18.112 18.112 0 0 0 5.12 5.056l371.456 251.264a18.624 18.624 0 0 0 20.736 0l371.456-251.264a17.6 17.6 0 0 0 4.48-24.896zM597.12 724.48L516.48 535.552l32.448-83.52 103.296 242.048 26.752 19.264-54.528 36.928zM263.168 602.24l16.192-11.072 7.168-18.176 37.568-94.848 62.464 105.856 27.392 46.4-28.48 70.208-23.616 16.704L227.648 626.56z m254.336 220.352L418.56 755.648l19.264-13.632 47.296-116.928 55.744 130.688 30.4 30.464z m217.92-147.456l-31.36-22.592L582.08 366.72l37.12-95.808 128.64 303.232 7.296 17.28 15.488 10.56 36.352 24.896z" ></path></symbol><symbol id="iconzhibeizhen_1" viewBox="0 0 1024 1024"><path d="M893.381584 912.965706L544.259402 85.120532a34.560216 34.560216 0 0 0-18.944119-18.560116 35.20022 35.20022 0 0 0-45.568285 18.560116L130.560816 912.965706a33.472209 33.472209 0 0 0 5.760036 35.13622 35.520222 35.520222 0 0 0 49.280308 3.712023L512.0032 678.660242l326.40204 273.153707a35.584222 35.584222 0 0 0 35.968225 5.632035 33.792211 33.792211 0 0 0 19.008119-44.480278zM534.723342 607.875799a35.584222 35.584222 0 0 0-45.440284 0l-238.721492 199.809249L512.0032 187.649173l261.505634 620.035875z" ></path></symbol><symbol id="iconfenggeshezhi" viewBox="0 0 1024 1024"><path d="M832 128H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zM192 832V192h640v640z" ></path><path d="M704 320H320v64h160v320h64V384H704V320z" ></path></symbol><symbol id="iconguangyunxian" viewBox="0 0 1024 1024"><path d="M896 117.504a32 32 0 0 0-32-32H601.088a30.592 30.592 0 0 0-6.464 1.28 287.04 287.04 0 0 0-252.16 142.656A284.032 284.032 0 0 0 313.6 305.088a283.712 283.712 0 0 0-51.008 62.912 284.16 284.16 0 0 0-28.736 74.432 284.16 284.16 0 0 0-50.048 62.08 287.616 287.616 0 0 0 69.76 367.68H157.312a32 32 0 0 0 0 64h262.784a30.656 30.656 0 0 0 5.952-1.216 279.68 279.68 0 0 0 285.312-216.96 284.032 284.032 0 0 0 50.048-62.08 284.096 284.096 0 0 0 28.992-75.584 283.904 283.904 0 0 0 51.008-62.976 287.616 287.616 0 0 0-70.08-367.936H864a32 32 0 0 0 32-32zM321.28 842.496a223.552 223.552 0 0 1-92.032-283.904 284.16 284.16 0 0 0 383.744 221.568 223.552 223.552 0 0 1-291.84 62.336z m332.288-157.76a222.976 222.976 0 0 1-361.92-208.96 221.888 221.888 0 0 1 25.984-17.92 284.48 284.48 0 0 0 338.432 195.392 222.4 222.4 0 0 1-2.56 31.488zM376 432.128a223.36 223.36 0 0 1 273.216 157.696 223.36 223.36 0 0 1-273.216-157.696z m356.608 114.88a220.864 220.864 0 0 1-25.024 17.024A284.48 284.48 0 0 0 369.152 368.64a220.16 220.16 0 0 1 2.24-30.208 223.04 223.04 0 0 1 361.216 208.576z m62.208-81.216a284.16 284.16 0 0 0-384.256-221.824 222.72 222.72 0 0 1 384.256 221.824z" ></path></symbol><symbol id="iconjiantou" viewBox="0 0 1024 1024"><path d="M947.328 486.528L729.216 321.28a32 32 0 1 0-38.656 51.008L832.768 480H96a32 32 0 0 0 0 64h737.536l-141.504 108.288a32 32 0 0 0 38.848 50.88l216.576-165.76a32 32 0 0 0-0.128-50.88z" ></path></symbol><symbol id="iconpinghangguang" viewBox="0 0 1024 1024"><path d="M864 704a32 32 0 0 0-32 32v50.752L182.656 137.408a32 32 0 0 0-45.248 45.184L786.752 832H736a32 32 0 0 0 0 64h128a32.128 32.128 0 0 0 32-32v-128a32 32 0 0 0-32-32zM928 384a32 32 0 0 0-32 32v50.752L502.656 73.408a32 32 0 0 0-45.248 45.248L850.752 512H800a32 32 0 0 0 0 64h128a32 32 0 0 0 32-32v-128a32 32 0 0 0-32-32zM544 768a32 32 0 0 0-32 32v50.752L118.656 457.408a32 32 0 0 0-45.248 45.184L466.752 896H416a32 32 0 0 0 0 64h128a32 32 0 0 0 32-32v-128a32 32 0 0 0-32-32z" ></path></symbol><symbol id="iconhuizhi" viewBox="0 0 1024 1024"><path d="M120.946 846.962l781.312-1.65c5.29 0 7.964 2.73 7.964 8.021v48.015c0 5.347-2.674 7.964-7.964 7.964l-781.255 1.707c-5.348 0-7.965-2.674-7.965-8.022v-48.014c0-5.29 2.617-7.964 7.965-7.964z m163.84-76.231c1.99 0 3.982-0.171 5.916-0.399l150.187-19.228a45.113 45.113 0 0 0 25.998-12.8l403.058-403c13.767-13.768 21.333-32.598 20.821-52.054a73.785 73.785 0 0 0-21.788-50.973l-91.193-91.193a73.785 73.785 0 0 0-50.973-21.845 71.054 71.054 0 0 0-52.053 20.821L271.815 543.118a45.113 45.113 0 0 0-12.8 25.998l-19.285 150.3a45.625 45.625 0 0 0 45.056 51.258z m44.43-183.183l396.231-396.23c0.569 0 1.138 0.284 1.422 0.682l91.193 91.193c0.455 0.341 0.626 0.853 0.74 1.422L422.4 680.846 315.449 694.5l13.653-106.952h0.114z" ></path></symbol><symbol id="iconjuguangdeng" viewBox="0 0 1024 1024"><path d="M928 639.36h-832a32 32 0 0 1-24.832-52.16l416-512a33.088 33.088 0 0 1 49.664 0l416 512a32 32 0 0 1-24.832 52.224z m-764.8-64h697.6L512 146.176zM512 960a32 32 0 0 1-32-32v-129.408a32 32 0 0 1 64 0V928a32 32 0 0 1-32 32zM799.36 883.008a32 32 0 0 1-43.712-11.712l-64.64-112a32 32 0 1 1 55.36-32l64.704 112a32 32 0 0 1-11.712 43.712zM224.64 883.008a32 32 0 0 1-11.712-43.712l64.64-112a32 32 0 0 1 55.488 32l-64.64 112a32 32 0 0 1-43.776 11.712z" ></path></symbol><symbol id="icondianguangyuan" viewBox="0 0 1024 1024"><path d="M512 256a255.232 255.232 0 0 0-128 476.48V768a64 64 0 0 0 64 64h128a64 64 0 0 0 64-64v-35.52A255.232 255.232 0 0 0 512 256z m95.808 421.12L576 695.68V768H448v-72.32l-31.808-18.56A189.888 189.888 0 0 1 320 512a192 192 0 0 1 384 0 189.888 189.888 0 0 1-96.192 165.12zM544 896h-64a32 32 0 0 0 0 64h64a32 32 0 0 0 0-64zM512 193.472a32 32 0 0 0 32-32v-64a32 32 0 1 0-64 0v64a32 32 0 0 0 32 32zM287.36 285.44a32 32 0 0 0 0-45.248l-45.312-45.248a32 32 0 0 0-45.248 45.248l45.248 45.248a32 32 0 0 0 45.248 0zM161.472 477.312h-64a32 32 0 1 0 0 64h64a32 32 0 1 0 0-64zM923.84 480h-64a32 32 0 0 0 0 64h64a32 32 0 1 0 0-64zM826.432 196.8a32 32 0 0 0-45.312 0l-45.248 45.248a32 32 0 0 0 45.248 45.248l45.312-45.248a32 32 0 0 0 0-45.248z" ></path><path d="M534.656 416.896L512 439.616l-22.656-22.656a32 32 0 0 0-45.248 45.312l35.904 35.84V608a32 32 0 0 0 64 0V498.048l35.84-35.84a32 32 0 0 0-45.184-45.248z" ></path></symbol><symbol id="iconkongjianfenxi" viewBox="0 0 1024 1024"><path d="M864.256 263.936l-320-190.976a62.72 62.72 0 0 0-64.512 0l-320 190.912A65.792 65.792 0 0 0 128 320.384v383.232a65.792 65.792 0 0 0 31.744 56.576l320 190.912a62.784 62.784 0 0 0 64.512 0l320-190.912a65.792 65.792 0 0 0 31.744-56.576V320.512a65.792 65.792 0 0 0-31.744-56.576zM480 533.888v341.568L192 703.616V325.12l109.76-67.136L512 129.472l287.68 171.712-289.28 178.24a64 64 0 0 0-30.4 54.464z m352 169.728l-288 171.84V531.52L832 357.696z" ></path></symbol><symbol id="iconzhuye" viewBox="0 0 1024 1024"><path d="M350.016 584A162.176 162.176 0 0 0 512 745.984 162.176 162.176 0 0 0 673.984 584 162.176 162.176 0 0 0 512 422.016 162.176 162.176 0 0 0 350.016 584z m259.968 0a97.984 97.984 0 1 1-195.968 0 97.984 97.984 0 0 1 195.968 0z m321.792-110.08L537.6 99.84a36.032 36.032 0 0 0-49.472-0.064l-395.84 374.08a36.032 36.032 0 0 0 49.472 52.288l19.2-18.176v394.048c0 19.84 16.128 35.968 36.032 35.968h630.016c19.84 0 35.968-16.128 35.968-35.968v-280a8 8 0 0 0-8-8h-56a8 8 0 0 0-8 8v243.968H233.024V440l279.808-264.512L882.176 526.08a36.032 36.032 0 1 0 49.6-52.16z" ></path></symbol><symbol id="iconwangge" viewBox="0 0 1024 1024"><path d="M832 128H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64z m0 224h-160V192H832zM414.08 609.92V416H608v193.92z m193.92 64V832H414.08v-158.08z m-257.92-64H192V416h158.08z m64-257.92V192H608v160z m257.92 64H832v193.92h-160zM350.08 192v160H192V192zM192 673.92h158.08V832H192zM672 832v-158.08H832V832z" ></path></symbol><symbol id="iconchunse" viewBox="0 0 1024 1024"><path d="M128 128m64 0l640 0q64 0 64 64l0 640q0 64-64 64l-640 0q-64 0-64-64l0-640q0-64 64-64Z" ></path></symbol><symbol id="iconshui" viewBox="0 0 1024 1024"><path d="M480 190.688c113.824 128.64 256 321.088 256 417.312 0 141.152-114.848 256-256 256s-256-114.848-256-256c0-96.224 142.176-288.64 256-417.312M480 96S160 431.264 160 608s143.264 320 320 320 320-143.264 320-320S480 96 480 96z" ></path><path d="M479.968 799.584A32 32 0 0 1 475.04 736a158.848 158.848 0 0 0 133.6-118.688c3.584-17.28 20.192-28.288 37.664-24.96 17.28 3.52 28.48 20.16 25.088 37.408-1.152 5.888-30.016 144.864-186.432 169.504a33.568 33.568 0 0 1-4.992 0.352z" ></path></symbol><symbol id="iconyanhua" viewBox="0 0 1024 1024"><path d="M512 480a32 32 0 1 1 0 64 32 32 0 0 1 0-64m0-64c-52.928 0-96 43.072-96 96s43.072 96 96 96 96-43.072 96-96-43.072-96-96-96zM512 353.6a32 32 0 0 1-32-32V128a32 32 0 1 1 64 0v193.6a32 32 0 0 1-32 32zM400 400a32 32 0 0 1-45.248 0L217.856 263.104a32 32 0 1 1 45.248-45.248l136.896 136.864a32 32 0 0 1 0 45.28zM353.6 512a32 32 0 0 1-32 32H128a32 32 0 1 1 0-64h193.6a32 32 0 0 1 32 32zM400 624a32 32 0 0 1 0 45.248l-136.896 136.896a32 32 0 1 1-45.248-45.248l136.896-136.896a32 32 0 0 1 45.248 0zM512 670.4a32 32 0 0 1 32 32V896a32 32 0 1 1-64 0v-193.6a32 32 0 0 1 32-32zM624 624a32 32 0 0 1 45.248 0l136.896 136.896a32 32 0 1 1-45.248 45.248L624 669.248a32 32 0 0 1 0-45.248zM670.4 512a32 32 0 0 1 32-32H896a32 32 0 1 1 0 64h-193.6a32 32 0 0 1-32-32zM624 400a32 32 0 0 1 0-45.248l136.896-136.896a32 32 0 1 1 45.248 45.248L669.248 400a32 32 0 0 1-45.248 0z" ></path><path d="M640 192m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M376.224 195.232m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M192 384m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M195.232 647.776m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M384 832m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M647.776 828.768m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M832 640m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M828.768 376.224m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path></symbol><symbol id="iconhuoyan" viewBox="0 0 1024 1024"><path d="M431.808 928.288a30.944 30.944 0 0 1-5.056-0.416c-144-23.04-235.584-152.736-259.84-263.424-22.144-101.376 8.448-191.264 81.92-240.384 196.768-131.616 178.432-288.832 178.24-290.432a31.936 31.936 0 0 1 44.416-33.536c143.296 62.112 178.624 187.84 176.448 282.24l45.248-29.408a32.032 32.032 0 0 1 43.2 7.872c117.408 159.616 154.144 292.992 109.184 396.352-63.104 145.152-261.504 169.92-269.92 170.88a32 32 0 0 1-28.672-51.84c75.968-94.592 49.28-139.488 9.152-173.92-37.984-32.512-62.752-84.288-76.448-120.224-56.224 37.696-87.712 80.192-93.824 126.624-11.456 87.04 67.328 163.776 68.128 164.512a32.032 32.032 0 0 1-22.176 55.104z m65.696-426.432a32.064 32.064 0 0 1 31.04 24.064c6.272 24.416 30.976 94.976 69.248 127.808 63.296 54.24 77.856 118.88 43.648 192.832 52.384-17.888 118.24-52.128 145.536-115.168 32.96-76.16 4.48-179.712-84.608-308.128l-77.824 50.528a32 32 0 0 1-48.32-35.2c1.92-7.36 42.304-168.48-87.136-256.32-9.184 69.632-48.96 190.784-204.672 294.976-73.12 48.96-62.784 137.6-54.944 173.504 14.016 63.968 55.136 132.8 114.976 175.264-16.608-35.52-28.16-78.848-22.016-125.664 10.016-76.224 63.744-141.664 159.68-194.56a32 32 0 0 1 15.36-3.936z" ></path></symbol><symbol id="iconzanwuziyuan" viewBox="0 0 1024 1024"><path d="M645.228 63.419L817 238.004v409.814c56.069 25.773 95 82.432 95 148.182 0 90.022-72.978 163-163 163-3.049 0-6.078-0.084-9.085-0.249-3.575 0.44-7.218 0.668-10.915 0.668H136c-13.255 0-24-10.745-24-24v-848c0-13.255 10.745-24 24-24h509.228z" fill="#C5C5C5" fill-opacity=".4" ></path><path d="M235 349h456q4 0 4 4v16q0 4-4 4H235q-4 0-4-4v-16q0-4 4-4zM235 533h456q4 0 4 4v16q0 4-4 4H235q-4 0-4-4v-16q0-4 4-4zM235 717h224q4 0 4 4v16q0 4-4 4H235q-4 0-4-4v-16q0-4 4-4z" fill="#ABABAB" fill-opacity=".574" ></path><path d="M586 796a163 163 0 1 0 326 0 163 163 0 1 0-326 0z" fill="#C5C5C5" fill-opacity=".461" ></path><path d="M645.228 63.419v158.585c0 8.836 7.163 16 16 16H817L645.228 63.419z" fill="#ABABAB" fill-opacity=".6" ></path><path d="M765.5 849.5a4 4 0 0 1 4 4v32a4 4 0 0 1-4 4h-32a4 4 0 0 1-4-4v-32a4 4 0 0 1 4-4h32z m-2-147a4 4 0 0 1 4 4v119a4 4 0 0 1-4 4h-28a4 4 0 0 1-4-4v-119a4 4 0 0 1 4-4h28z" fill-opacity=".302" ></path></symbol><symbol id="iconzanwuditu" viewBox="0 0 1024 1024"><path d="M530.048 98.66l359.155 206.35c7.662 4.402 10.305 14.182 5.903 21.844a16 16 0 0 1-6.133 6.032L529.306 531.7a36 36 0 0 1-34.817 0.008L135.034 333.237c-7.735-4.272-10.544-14.005-6.273-21.74a16 16 0 0 1 6.03-6.137L494.166 98.668a36 36 0 0 1 35.882-0.008z" fill="#ABABAB" fill-opacity=".574" ></path><path d="M523.948 826.284l11.61 21.005-6.246 3.453a36 36 0 0 1-34.345 0.265l-0.473-0.257-4.113-2.27 11.6-21.01 4.114 2.27a12 12 0 0 0 11.285 0.169l0.32-0.171 6.248-3.454z m-68.363-24.433l31.515 17.401-11.601 21.01-31.515-17.4 11.6-21.011z m114.748-1.207l11.61 21.004-31.506 17.416-11.61-21.004 31.506-17.416z m-161.146-24.411l31.515 17.4-11.6 21.01-31.515-17.4 11.6-21.01z m207.53-1.23l11.612 21.005-31.507 17.416-11.61-21.005 31.506-17.416zM362.79 750.614l31.515 17.402-11.6 21.01-31.516-17.401 11.601-21.01z m300.313-1.251l11.61 21.004-31.506 17.416-11.61-21.004 31.506-17.416z m-346.71-24.367l31.515 17.401-11.6 21.01-31.516-17.4 11.6-21.01z m393.095-1.274l11.61 21.004-31.506 17.417-11.61-21.005 31.506-17.416z m-439.493-24.344l31.516 17.401-11.601 21.01-31.515-17.4 11.6-21.011z m485.878-1.297l11.61 21.005-31.506 17.416-11.611-21.004 31.507-17.417zM223.598 673.76l31.515 17.4-11.6 21.01-31.515-17.4 11.6-21.01z m578.66-1.32l11.61 21.005-31.506 17.417-11.611-21.005 31.507-17.416z m-278.31-8.156l11.61 21.005-6.246 3.453a36 36 0 0 1-34.345 0.265l-0.473-0.257-4.113-2.27 11.6-21.01 4.114 2.27a12 12 0 0 0 11.285 0.169l0.32-0.171 6.248-3.454z m-346.747-16.142l31.515 17.4-11.6 21.01-31.516-17.4 11.601-21.01z m671.442-1.342l11.61 21.005-31.506 17.416-11.611-21.004 31.507-17.417z m-393.058-6.949l31.515 17.401-11.601 21.01-31.515-17.4 11.6-21.011z m114.748-1.207l11.61 21.004-31.506 17.416-11.61-21.004 31.506-17.416zM123.06 624.22l24 0.118a11.993 11.993 0 0 0 5.915 10.42l0.288 0.165 9.056 5-11.6 21.01-9.056-5a35.988 35.988 0 0 1-18.602-31.241l-0.001-0.472z m777.712-3.659c0.726 7.36-0.82 14.793-4.574 21.38a36.089 36.089 0 0 1-13.318 13.35l-0.522 0.294-7.226 3.994-11.611-21.004 7.226-3.995a12.037 12.037 0 0 0 4.62-4.56 11.887 11.887 0 0 0 1.553-6.714l-0.032-0.387 23.884-2.358z m-491.585-6.33l31.515 17.402-11.6 21.01-31.515-17.401 11.6-21.01z m207.53-1.229l11.612 21.005-31.507 17.416-11.61-21.005 31.506-17.416zM362.79 588.614l31.515 17.402-11.6 21.01-31.516-17.401 11.601-21.01z m300.313-1.251l11.61 21.004-31.506 17.416-11.61-21.004 31.506-17.416z m-497.61-8.17l11.965 20.804-24.377 14.02a12 12 0 0 0-2.749 2.17l-0.295 0.326-18.054-15.813a36 36 0 0 1 8.53-7.132l0.603-0.355 24.377-14.02z m691.19-1.378l26.193 15.05a36.081 36.081 0 0 1 6.424 4.699l0.527 0.493-16.578 17.354a12.004 12.004 0 0 0-1.966-1.52l-0.363-0.217-26.193-15.05 11.956-20.81z m-540.29-14.819l31.515 17.401-11.6 21.01-31.516-17.4 11.6-21.01z m393.095-1.274l11.61 21.004-31.506 17.417-11.61-21.005 31.506-17.416z m-498.052-8.954l11.965 20.805-31.206 17.948-11.966-20.804 31.207-17.949z m599.291-1.356l31.215 17.934-11.956 20.81-31.215-17.934 11.956-20.81z m-540.732-14.034l31.516 17.401-11.601 21.01-31.515-17.4 11.6-21.011z m485.878-1.297l11.61 21.005-31.506 17.416-11.611-21.004 31.507-17.417zM223.598 511.76l31.515 17.4-11.6 21.01-31.515-17.4 11.6-21.01z m578.66-1.32l11.61 21.005-31.506 17.417-11.611-21.005 31.507-17.416zM177.2 486.143l31.515 17.4-11.6 21.01-31.516-17.4 11.601-21.01z m671.442-1.342l11.61 21.005-31.506 17.416-11.611-21.004 31.507-17.417z m-725.582-22.58l24 0.118a11.993 11.993 0 0 0 5.915 10.42l0.288 0.165 9.056 5-11.6 21.01-9.056-5a35.988 35.988 0 0 1-18.602-31.241l-0.001-0.472z m777.712-3.659c0.726 7.36-0.82 14.793-4.574 21.38a36.089 36.089 0 0 1-13.318 13.35l-0.522 0.294-7.226 3.994-11.611-21.004 7.226-3.995a12.037 12.037 0 0 0 4.62-4.56 11.887 11.887 0 0 0 1.553-6.714l-0.032-0.387 23.884-2.358z m-735.28-41.37l11.966 20.805-24.377 14.02a12 12 0 0 0-2.749 2.17l-0.295 0.326-18.054-15.813a36 36 0 0 1 8.53-7.132l0.603-0.355 24.377-14.02z m691.19-1.377l26.194 15.05a36.081 36.081 0 0 1 6.424 4.699l0.527 0.493-16.578 17.354a12.004 12.004 0 0 0-1.966-1.52l-0.363-0.217-26.193-15.05 11.956-20.81z m-645.246-25.047l11.965 20.805-31.206 17.948-11.966-20.804 31.207-17.949z m599.291-1.356l31.215 17.934-11.956 20.81-31.215-17.934 11.956-20.81z" fill="#C5C5C5" fill-opacity=".461" ></path></symbol><symbol id="iconfuwei" viewBox="0 0 1024 1024"><path d="M512 97.216c133.888 0 256.64 63.808 333.888 167.744V148.8l0.448-5.76a32 32 0 0 1 63.488 5.76v192l-0.512 5.76a32 32 0 0 1-31.488 26.24h-192l-5.76-0.576a32 32 0 0 1-26.24-31.424l0.512-5.76a32 32 0 0 1 31.488-26.24h112.768a352 352 0 1 0 64.32 232.064 32 32 0 0 1 63.808 4.928A416 416 0 1 1 512 97.152z" ></path></symbol><symbol id="icongengduo" viewBox="0 0 1024 1024"><path d="M510.976 224m-96 0a96 96 0 1 0 192 0 96 96 0 1 0-192 0Z" ></path><path d="M510.976 512m-96 0a96 96 0 1 0 192 0 96 96 0 1 0-192 0Z" ></path><path d="M513.024 800m-96 0a96 96 0 1 0 192 0 96 96 0 1 0-192 0Z" ></path></symbol><symbol id="iconsuoxiao" viewBox="0 0 1024 1024"><path d="M864 544a32 32 0 0 0 0-64h-704a32 32 0 0 0 0 64z" ></path></symbol><symbol id="iconfangda" viewBox="0 0 1024 1024"><path d="M864 480h-320v-320a32 32 0 0 0-64 0v320h-320a32 32 0 0 0 0 64h320v320a32 32 0 0 0 64 0v-320h320a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconceju" viewBox="0 0 1024 1024"><path d="M896 384H128a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V448a64 64 0 0 0-64-64z m0 448H128V448h768z" ></path><path d="M224 704a32 32 0 0 0 32-32v-128a32 32 0 0 0-64 0v128a32 32 0 0 0 32 32zM415.68 704a32 32 0 0 0 32-32v-128a32 32 0 0 0-64 0v128a32 32 0 0 0 32 32zM608 768a32 32 0 0 0 32-32v-192a32 32 0 0 0-64 0v192a32 32 0 0 0 32 32zM800 704a32 32 0 0 0 32-32v-128a32 32 0 0 0-64 0v128a32 32 0 0 0 32 32zM96 256.896h829.696a32 32 0 0 0 0-64H96a32 32 0 0 0 0 64z" ></path></symbol><symbol id="iconcemian" viewBox="0 0 1024 1024"><path d="M845 115H179a64.07 64.07 0 0 0-64 64v666a64.07 64.07 0 0 0 64 64h666a64.07 64.07 0 0 0 64-64V179a64.07 64.07 0 0 0-64-64zM364.68 845H217.6L845 217.6v147.08zM845 443.87V591L591 845H443.87zM657.35 179h147.09L179 804.4V657.32zM179 578.13V431.05L431.06 179h147.09zM351.87 179L179 351.86V179z m318.27 666L845 670.14V845z" ></path></symbol><symbol id="icongou" viewBox="0 0 1024 1024"><path d="M809.792 214.272L433.088 729.28 267.584 502.272a8 8 0 0 0-6.4-3.264h-79.36a8 8 0 0 0-6.4 12.672l212.352 291.2a56.192 56.192 0 0 0 45.056 23.04h0.192a56.192 56.192 0 0 0 45.056-22.72l423.872-579.456a8 8 0 0 0-6.464-12.8h-79.36a8 8 0 0 0-6.4 3.328z" ></path></symbol><symbol id="iconbianjizzhou" viewBox="0 0 1024 1024"><path d="M879.616 642.048L544 454.72V238.592l137.344 137.408a32 32 0 0 0 45.248-45.248l-192-192a32 32 0 0 0-45.184 0l-192 192a32 32 0 0 0 45.248 45.248L480 238.592v217.856L144.512 641.92a32 32 0 0 0 0 56l353.6 195.52a32 32 0 0 0 31.168-0.064l350.4-195.584a32 32 0 0 0 0-55.872z m-366.08 186.88l-287.36-158.976L480 529.536v140.416a32 32 0 0 0 64 0V528l254.336 141.952z" ></path></symbol><symbol id="iconskin" viewBox="0 0 1024 1024"><path d="M940.65 267.88l-138.3-150.25A89.21 89.21 0 0 0 736.48 88h-34.91c-31.37 0-59.53 16.54-77.28 45.37-23.11 37-65.59 59.11-113.66 59.11-45.85 0-88.9-22.15-112.86-57.93A84.72 84.72 0 0 0 322.46 88h-30.24c-29.57 0-53 10.17-69.7 30.21L83.12 268.13l-0.12 0.13A98.22 98.22 0 0 0 57 335a94.11 94.11 0 0 0 26.35 66l80.75 87.66c16.15 17.55 39.4 28 62.19 28h2.46v347c0 39.93 31.19 72.41 69.52 72.41h427.49c38.33 0 69.52-32.48 69.52-72.41v-347h2.46c23.47 0 45.55-9.95 62.19-28l81.07-88a98.22 98.22 0 0 0 26-66.73 94.12 94.12 0 0 0-26.35-66.05zM888 351.82l-81 88.05c-4.41 4.78-8 4.78-9.22 4.78-2 0-6.13-1.47-9.21-4.75a37 37 0 0 0-26.91-11.65 38.49 38.49 0 0 0-38.34 38.54V864H300.77V466.79a38.49 38.49 0 0 0-38.34-38.54 37.05 37.05 0 0 0-26.92 11.66c-3.07 3.27-7.23 4.74-9.2 4.74s-6.21-1.52-9.23-4.79l-81.1-88-0.79-0.84c-8.51-8.66-8.16-24.17 0.75-33.9l139.76-150.3 1.18-1.2 1-1.35c1.32-1.6 4-4.23 14.32-4.23h30.21a12.69 12.69 0 0 1 11.24 7.36 36.93 36.93 0 0 0 2.41 4.41l0.1 0.16A200.38 200.38 0 0 0 409 238.85a213.44 213.44 0 0 0 101.63 25.63c35.9 0 71-8.64 101.49-25a194.45 194.45 0 0 0 73.31-68.12l0.13-0.21c6.86-11.18 13.75-11.18 16-11.18h34.94A17 17 0 0 1 749 166l139 151 0.8 0.85c8.56 8.7 8.2 24.25-0.8 33.97z" ></path><path d="M398 443h120q8 0 8 8v154q0 8-8 8H398q-8 0-8-8V451q0-8 8-8z" ></path></symbol><symbol id="iconuser" viewBox="0 0 1024 1024"><path d="M858.496 763.584a374.016 374.016 0 0 0-80.64-119.488 375.68 375.68 0 0 0-119.488-80.64l-1.152-0.448a247.936 247.936 0 1 0-290.432 0.128l-1.152 0.448c-44.8 18.944-85.056 46.016-119.552 80.64A375.68 375.68 0 0 0 136 901.824a8 8 0 0 0 8 8.192h60.032a8 8 0 0 0 7.936-7.808 298.112 298.112 0 0 1 87.808-204.288 298.048 298.048 0 0 1 212.224-88c80.192 0 155.52 31.232 212.224 87.936a298.112 298.112 0 0 1 87.744 204.288 7.936 7.936 0 0 0 8.064 7.808H880c4.48 0 8.128-3.712 8-8.192a372.672 372.672 0 0 0-29.44-138.24zM512 534.016a170.88 170.88 0 0 1-121.6-50.432 170.88 170.88 0 0 1-50.368-121.6c0-45.888 17.92-89.088 50.368-121.6A170.88 170.88 0 0 1 512 190.08c45.888 0 89.088 17.92 121.6 50.368a170.88 170.88 0 0 1 50.368 121.6 170.88 170.88 0 0 1-50.368 121.6A170.88 170.88 0 0 1 512 534.08z" ></path></symbol><symbol id="iconcegao" viewBox="0 0 1024 1024"><path d="M640 896V128a64 64 0 0 0-64-64H192a64 64 0 0 0-64 64v768a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64z m-448 0V128h384v768H192z" ></path><path d="M320 224a32 32 0 0 0 32 32h128a32 32 0 0 0 0-64h-128a32 32 0 0 0-32 32zM320 415.68a32 32 0 0 0 32 32h128a32 32 0 0 0 0-64h-128a32 32 0 0 0-32 32zM256 608a32 32 0 0 0 32 32h192a32 32 0 0 0 0-64h-192a32 32 0 0 0-32 32zM320 800a32 32 0 0 0 32 32h128a32 32 0 0 0 0-64h-128a32 32 0 0 0-32 32zM767.104 96v829.696a32 32 0 0 0 64 0V96a32 32 0 0 0-64 0z" ></path></symbol><symbol id="iconkapianshi" viewBox="0 0 1024 1024"><path d="M384 128H192c-38.4 0-64 25.6-64 64v192c0 38.4 25.6 64 64 64h192c38.4 0 64-25.6 64-64V192c0-38.4-25.6-64-64-64z m0 256H192V192h192v192zM384 576H192c-38.4 0-64 25.6-64 64v192c0 38.4 25.6 64 64 64h192c38.4 0 64-25.6 64-64v-192c0-38.4-25.6-64-64-64z m0 256H192v-192h192v192zM832 128h-192c-38.4 0-64 25.6-64 64v192c0 38.4 25.6 64 64 64h192c38.4 0 64-25.6 64-64V192c0-38.4-25.6-64-64-64z m0 256h-192V192h192v192zM832 576h-192c-38.4 0-64 25.6-64 64v192c0 38.4 25.6 64 64 64h192c38.4 0 64-25.6 64-64v-192c0-38.4-25.6-64-64-64z m0 256h-192v-192h192v192z" ></path></symbol><symbol id="iconliebiaoshi" viewBox="0 0 1024 1024"><path d="M384 128H192c-35.328 0-64 28.672-64 64v192c0 35.328 28.672 64 64 64h192c35.328 0 64-28.672 64-64V192c0-35.328-28.672-64-64-64z m0 256H192V192h192v192zM384 576H192c-35.328 0-64 28.672-64 64v192c0 35.328 28.672 64 64 64h192c35.328 0 64-28.672 64-64v-192c0-35.328-28.672-64-64-64z m0 256H192v-192h192v192zM607.744 224H864a32 32 0 0 0 0-64H607.744a32 32 0 0 0 0 64zM864 352H607.744a32 32 0 0 0 0 64H864a32 32 0 0 0 0-64zM864 608H607.744a32 32 0 0 0 0 64H864a32 32 0 0 0 0-64zM864 800H607.744a32 32 0 0 0 0 64H864a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconbianji" viewBox="0 0 1024 1024"><path d="M864 448a32 32 0 0 0-32 32V832H192V192h352a32 32 0 0 0 0-64H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V480a32 32 0 0 0-32-32z" ></path><path d="M341.056 526.08l-0.064-0.128-19.136 130.88a40 40 0 0 0 45.312 45.44l130.88-19.2a40.32 40.32 0 0 0 22.464-11.328l356.8-356.736a64 64 0 0 0 0-90.496l-77.824-77.824a64 64 0 0 0-90.496 0L352.32 503.552a40.32 40.32 0 0 0-11.264 22.464z m62.08 17.088l351.232-351.296 77.76 77.824L481.024 620.8l-91.072 13.312 13.248-91.008z" ></path></symbol><symbol id="iconbofang" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128zM402.624 319.488a32 32 0 0 1 44.736-6.912l252.544 184.832a32 32 0 0 1 0.064 51.584l-252.544 185.92a32 32 0 0 1-50.944-25.792V338.368a32 32 0 0 1 6.144-18.88z m57.856 81.984v244.352l166.464-122.496-166.4-121.856z" ></path></symbol><symbol id="iconbaocun" viewBox="0 0 1024 1024"><path d="M192 896a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h485.952a64 64 0 0 1 46.208 19.712l154.048 160.768A64 64 0 0 1 896 352.64V832a64 64 0 0 1-64 64H192z m485.952-704H192v640h64v-128a64 64 0 0 1 64-64h384a64 64 0 0 1 64 64v128h64V352.704L677.952 192zM704 704H320v128h384v-128zM512 256a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m0 64a64 64 0 1 0 0 128 64 64 0 0 0 0-128z" ></path></symbol><symbol id="iconchangjing" viewBox="0 0 1024 1024"><path d="M384 128H192a64.064 64.064 0 0 0-64 64v192a64.064 64.064 0 0 0 64 64h192a64.064 64.064 0 0 0 64-64V192a64.064 64.064 0 0 0-64-64z m0 256H192V192h192zM384 576H192a64.064 64.064 0 0 0-64 64v192a64.064 64.064 0 0 0 64 64h192a64.064 64.064 0 0 0 64-64v-192a64.064 64.064 0 0 0-64-64z m0 256H192v-192h192zM916.992 242.752l-135.68-135.744a64.064 64.064 0 0 0-90.56 0l-135.744 135.68a64.064 64.064 0 0 0 0 90.56l135.68 135.744a64.064 64.064 0 0 0 90.56 0l135.744-135.68a64.064 64.064 0 0 0 0-90.56zM736 423.68L600.256 288 736 152.256 871.744 288zM832 576h-192a64.064 64.064 0 0 0-64 64v192a64.064 64.064 0 0 0 64 64h192a64.064 64.064 0 0 0 64-64v-192a64.064 64.064 0 0 0-64-64z m0 256h-192v-192h192z" ></path></symbol><symbol id="icondaochu" viewBox="0 0 1024 1024"><path d="M704.384 128.384A64 64 0 0 1 768 184.96l0.448 7.424v33.6a32 32 0 0 1-63.488 5.76l-0.512-5.76v-33.6h-512v639.232h512v-28.928a32 32 0 0 1 63.488-5.76l0.512 5.76v28.928a64 64 0 0 1-56.512 63.552l-7.488 0.448h-512a64 64 0 0 1-63.552-56.576l-0.448-7.424V192.384a64 64 0 0 1 56.576-63.552l7.424-0.448h512z m51.072 225.28a32 32 0 0 1 45.248 0l135.744 135.68 3.712 4.48a32 32 0 0 1-3.712 40.832l-135.744 135.68-4.48 3.776a32 32 0 0 1-40.768-3.712l-3.712-4.48a32 32 0 0 1 3.712-40.768l81.088-81.216-475.776 0.064a32 32 0 0 1-5.76-63.488l5.76-0.512h475.776l-81.088-81.152-3.712-4.416a32 32 0 0 1 3.712-40.832z" ></path></symbol><symbol id="iconchexiao" viewBox="0 0 1024 1024"><path d="M302.848 401.984a32 32 0 0 1 3.712 40.832l-3.712 4.48a32 32 0 0 1-40.832 3.648l-4.416-3.712-135.744-135.744a32 32 0 0 1-3.712-40.832l3.712-4.48 135.744-135.68a32 32 0 0 1 48.96 40.768l-3.712 4.48-81.152 81.088h450.688l13.504 0.32A287.552 287.552 0 0 1 672.384 832H225.28l-5.76-0.512a32 32 0 0 1 5.76-63.488h447.04l12.224-0.32a223.552 223.552 0 0 0-12.224-446.848H221.632l81.28 81.152z" ></path></symbol><symbol id="iconcuowu" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128zM370.176 325.696l4.48 3.648 135.744 135.808 135.744-135.808 4.48-3.648a32 32 0 0 1 40.768 48.96L555.648 510.4l135.744 135.744a32 32 0 0 1-40.832 48.96l-4.416-3.712-135.744-135.744-135.744 135.744-4.48 3.712a32 32 0 0 1-40.832-48.96l135.808-135.744-135.808-135.744a32 32 0 0 1 40.832-48.96z" ></path></symbol><symbol id="iconfuzhi" viewBox="0 0 1024 1024"><path d="M704 256a64 64 0 0 1 64 64v512a64 64 0 0 1-64 64H192a64 64 0 0 1-64-64V320a64 64 0 0 1 64-64h512z m0 64H192v512h512V320z m129.088-190.976a64 64 0 0 1 63.552 56.512l0.448 7.488v565.056a32 32 0 0 1-63.488 5.76l-0.512-5.76V193.024H422.4a32 32 0 0 1-5.76-63.488l5.76-0.512h410.624z" ></path></symbol><symbol id="iconfenxi" viewBox="0 0 1024 1024"><path d="M864.256 263.936l-320-190.976a62.72 62.72 0 0 0-64.512 0l-320 190.912A65.792 65.792 0 0 0 128 320.384v383.232a65.792 65.792 0 0 0 31.744 56.576l320 190.912a62.784 62.784 0 0 0 64.512 0l320-190.912a65.792 65.792 0 0 0 31.744-56.576V320.512a65.792 65.792 0 0 0-31.744-56.576zM512 129.536l287.68 171.648L512 474.816 223.68 301.504z m-320 574.08V358.4l288 173.184v343.872z m352 171.84V531.52L832 357.696v345.92z" ></path></symbol><symbol id="icondixing" viewBox="0 0 1024 1024"><path d="M951.68 736.448L663.872 224.64a64.128 64.128 0 0 0-111.744 0L440.896 422.4l-40.128-71.36a64.128 64.128 0 0 0-111.744 0l-216.704 385.28A64.128 64.128 0 0 0 128.192 832h767.616a64.128 64.128 0 0 0 55.872-95.552z m-607.04-353.92h0.256l59.2 105.344-157.44 280h-118.4z m-24.448 385.28l287.552-511.616 0.256-0.064 287.808 511.744z" ></path></symbol><symbol id="icondingwei" viewBox="0 0 1024 1024"><path d="M512 64.512a352 352 0 0 1 352 352c0 129.152-110.528 298.24-329.6 512.704a32 32 0 0 1-44.8 0C270.528 714.88 160 545.664 160 416.512a352 352 0 0 1 352-352z m0 64a288 288 0 0 0-288 288c0 99.84 90.368 244.416 272.64 429.44l15.36 15.36 15.36-15.36c176.192-178.88 266.496-320 272.32-419.328l0.32-10.112a288 288 0 0 0-288-288zM512 268.16a160 160 0 1 1 0 320 160 160 0 0 1 0-320z m0 64a96 96 0 1 0 0 192 96 96 0 0 0 0-192z" ></path></symbol><symbol id="iconfanhui" viewBox="0 0 1024 1024"><path d="M300.8 534.656a32 32 0 0 1-3.776-40.832l3.712-4.48 347.328-347.328a32 32 0 0 1 48.96 40.832l-3.712 4.48L368.64 512l324.672 324.672a32 32 0 0 1 3.712 40.832l-3.712 4.48a32 32 0 0 1-40.832 3.648l-4.416-3.648L300.8 534.656z" ></path></symbol><symbol id="iconfenxiang" viewBox="0 0 1024 1024"><path d="M768 128a128 128 0 1 1-94.08 214.784L441.6 467.328a160.064 160.064 0 0 1-0.512 91.136l232.32 123.2a128 128 0 1 1-30.016 56.512l-232.768-123.52a160 160 0 1 1 1.152-204.032l231.808-124.224A128 128 0 0 1 768 128z m0 576a64 64 0 1 0 0 128 64 64 0 0 0 0-128zM288 416a96 96 0 1 0 0 192 96 96 0 0 0 0-192zM768 192a64 64 0 1 0 0 128 64 64 0 0 0 0-128z" ></path></symbol><symbol id="iconjianshao" viewBox="0 0 1024 1024"><path d="M864 544a32 32 0 0 0 0-64h-704a32 32 0 0 0 0 64z" ></path></symbol><symbol id="iconliangsuan" viewBox="0 0 1024 1024"><path d="M942.656 309.12L714.88 81.28a68.032 68.032 0 0 0-96.192 0L81.344 618.752a67.968 67.968 0 0 0 0 96.192l227.712 227.712a67.968 67.968 0 0 0 96.192 0l537.408-537.408a68.032 68.032 0 0 0 0-96.192zM357.12 888.832L135.168 666.88 666.88 135.104 888.832 357.12 357.12 888.896z m149.248-523.968a8 8 0 0 0-11.328 0l-28.288 28.288a8 8 0 0 0 0 11.328l156.992 156.992a8 8 0 0 0 11.328 0l28.288-28.288a8 8 0 0 0 0-11.328L506.368 364.928z m-151.36 140.032l28.288-28.224c3.84-3.84 7.552-3.84 11.328 0L520.576 602.56c3.776 3.84 3.776 7.552 0 11.328l-28.288 28.288c-3.84 3.776-7.552 3.776-11.328 0L355.008 516.224c-3.776-3.776-3.776-7.552 0-11.328zM288.64 582.72a8 8 0 0 0-11.328 0l-28.224 28.288a8 8 0 0 0 0 11.328l125.888 125.888a8 8 0 0 0 11.328 0L414.528 720a8 8 0 0 0 0-11.328L288.64 582.72z m318.08-329.536l-28.224 28.288a8 8 0 0 0 0 11.328l125.888 125.952a8 8 0 0 0 11.328 0L744 390.464a8 8 0 0 0 0-11.328L618.048 253.184a8 8 0 0 0-11.328 0z" ></path></symbol><symbol id="iconfangyang" viewBox="0 0 1024 1024"><path d="M510.592009 63.9996H338.305086a63.9996 63.9996 0 0 0-46.207712 19.647877L144.450297 237.438516a63.9996 63.9996 0 0 0-17.855888 44.351723v243.454478a63.9996 63.9996 0 0 0 19.19988 45.631715l51.647677 50.879682a63.9996 63.9996 0 0 0 44.671721 18.303886l77.759514 0.255998-1.023994 255.422404a63.9996 63.9996 0 0 0 63.9996 64.255598h293.246167a63.9996 63.9996 0 0 0 45.247718-18.751883l154.559034-154.559034a63.9996 63.9996 0 0 0 18.751882-45.119718l0.831995-388.477572a63.9996 63.9996 0 0 0-26.879832-52.287673l-46.079712-32.895794a63.9996 63.9996 0 0 0-37.119768-11.903926H574.527609V127.9992a63.9996 63.9996 0 0 0-63.9996-63.9996zM338.369085 576.380398L242.369685 575.9964l-51.775676-50.815682V281.726239L338.305086 127.9992h172.286923v127.9992H414.272611a31.9998 31.9998 0 0 0 0 63.9996h371.069681l46.079712 32.895794-0.767996 388.541572-127.9992 127.9992V639.996a63.9996 63.9996 0 0 0-63.9996-63.9996H428.80052l104.511347-105.471341a31.9998 31.9998 0 0 0-0.255999-45.247717 31.615802 31.615802 0 0 0-22.39986-9.279942 32.0638 32.0638 0 0 0-22.847857 9.471941L338.369085 576.380398zM382.848807 895.9944l1.023994-255.422404V639.996h254.718408v255.9984z" ></path><path d="M574.591609 703.9956h-127.9992v127.9992h127.9992v-127.9992z" ></path></symbol><symbol id="iconshaixuan" viewBox="0 0 1024 1024"><path d="M828.224 146.048a32.064 32.064 0 0 0-28.224-16.896h-576a32 32 0 0 0-26.624 49.664l170.176 256a32 32 0 0 0 26.624 14.336h20.48v344.064a32.128 32.128 0 0 0 16.512 28.032l128 70.72a32.192 32.192 0 0 0 15.488 4.032 32 32 0 0 0 32-32V449.152h21.312a32 32 0 0 0 26.56-14.208l172.032-256a32 32 0 0 0 1.664-32.896z m-285.632 663.68l-64-35.392V449.152h64z m68.288-424.576H411.328l-127.616-192h456.192z" ></path></symbol><symbol id="icondaoru" viewBox="0 0 1024 1024"><path d="M704.384 128.384A64 64 0 0 1 768 184.96l0.448 7.424v33.6a32 32 0 0 1-63.488 5.76l-0.512-5.76v-33.6h-512v639.232h512v-28.928a32 32 0 0 1 63.488-5.76l0.512 5.76v28.928a64 64 0 0 1-56.512 63.552l-7.488 0.448h-512a64 64 0 0 1-63.552-56.576l-0.448-7.424V192.384a64 64 0 0 1 56.576-63.552l7.424-0.448h512z m-172.16 225.28a32 32 0 0 1 3.712 40.768l-3.648 4.48-81.152 81.024 456.32 0.064a32 32 0 0 1 5.76 63.488l-5.76 0.512h-456.32l81.152 81.152a32 32 0 0 1 3.648 40.832l-3.648 4.416a32 32 0 0 1-40.832 3.712l-4.48-3.712-135.68-135.744-1.28-1.344a32.192 32.192 0 0 1-1.536-1.856l2.752 3.2A32.128 32.128 0 0 1 341.888 512v-1.408c0-0.96 0.128-1.92 0.256-2.816L341.888 512a32.128 32.128 0 0 1 5.632-18.176l0.832-1.152a32.192 32.192 0 0 1 1.92-2.24l0.96-1.088 135.744-135.68a32 32 0 0 1 45.312 0z" ></path></symbol><symbol id="iconjianqie" viewBox="0 0 1024 1024"><path d="M201.344 137.344a32 32 0 0 1 45.312 0L512 402.752l265.344-265.408a32 32 0 0 1 48.96 40.832l-3.648 4.48L557.248 448l137.408 137.344 2.816 3.328a160 160 0 1 1-53.184 36.864L512 493.248 375.552 629.76a160 160 0 1 1-50.816-38.272l0.96-1.664 3.648-4.48L466.752 448 201.344 182.656l-3.648-4.48a32 32 0 0 1 3.648-40.832zM256 640a96 96 0 1 0 0 192 96 96 0 0 0 0-192z m504.128 0a96 96 0 1 0 0 192 96 96 0 0 0 0-192z" ></path></symbol><symbol id="iconmoxing" viewBox="0 0 1024 1024"><path d="M864 832H832V576a64 64 0 0 0-64-64h-128V192a64 64 0 0 0-64-64H256a64 64 0 0 0-64 64v640h-32a32 32 0 0 0 0 64h704a32 32 0 0 0 0-64zM256 832V192h320v640z m384 0V576h128v256z" ></path><path d="M480 320h-128a32 32 0 0 0 0 64h128a32 32 0 0 0 0-64zM480 512h-128a32 32 0 0 0 0 64h128a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconjinggao" viewBox="0 0 1024 1024"><path d="M544.512 97.92a64 64 0 0 1 22.656 22.656l400 678.912A64 64 0 0 1 912 896H112a64 64 0 0 1-55.168-96.512l400-678.912a64 64 0 0 1 87.68-22.656zM512 153.088L112 832h800L512 153.088z m-0.32 514.24c14.08 0 26.688 4.928 36.544 14.08a49.92 49.92 0 0 1 15.488 36.608 46.72 46.72 0 0 1-14.72 35.904c-9.856 9.856-22.528 14.08-37.312 14.08a48.768 48.768 0 0 1-36.608-14.08 46.72 46.72 0 0 1-14.848-35.904c0-14.08 4.992-26.752 14.848-36.608a51.648 51.648 0 0 1 36.608-14.08z m0-345.024c20.544 0 37.312 16.704 37.312 37.312V584.96a37.312 37.312 0 1 1-74.624 0V359.616c0-20.608 16.64-37.312 37.312-37.312z" ></path></symbol><symbol id="iconditu1" viewBox="0 0 1024 1024"><path d="M937.6 204.48a64 64 0 0 0-51.84-14.272l-245.12 40.96-243.584-90.048a64 64 0 0 0-22.208-3.968 64.832 64.832 0 0 0-10.176 0.832l-246.592 39.68a64 64 0 0 0-53.824 63.232V768a64 64 0 0 0 73.792 63.232l237.568-36.928 244.672 90.24a64.128 64.128 0 0 0 33.088 3.008l253.824-44.16a64 64 0 0 0 53.056-63.04V253.312a64 64 0 0 0-22.656-48.832z m-41.344 575.808l-253.824 44.16-260.288-95.936L128.256 768V240.896l246.592-39.744L634.432 296.96l261.76-43.712z" ></path><path d="M384 320a32 32 0 0 0-32 32v256a32 32 0 0 0 64 0v-256A32 32 0 0 0 384 320zM608 416v256a32 32 0 0 0 64 0v-256a32 32 0 0 0-64 0z" ></path></symbol><symbol id="iconshuaxin" viewBox="0 0 1024 1024"><path d="M512 97.216c133.888 0 256.64 63.808 333.888 167.744V148.8l0.448-5.76a32 32 0 0 1 63.488 5.76v192l-0.512 5.76a32 32 0 0 1-31.488 26.24h-192l-5.76-0.576a32 32 0 0 1-26.24-31.424l0.512-5.76a32 32 0 0 1 31.488-26.24h112.768a352 352 0 1 0 64.32 232.064 32 32 0 0 1 63.808 4.928A416 416 0 1 1 512 97.152z" ></path></symbol><symbol id="iconmima" viewBox="0 0 1024 1024"><path d="M832 384h-96V288a224 224 0 0 0-448 0V384H192a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V448a64 64 0 0 0-64-64zM352 288a160 160 0 0 1 320 0V384h-320zM832 832H192V448h640z" ></path><path d="M384 768h256a32 32 0 0 0 0-64H384a32 32 0 0 0 0 64z" ></path></symbol><symbol id="iconshuxingbiao" viewBox="0 0 1024 1024"><path d="M832 128H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64z m0 704H192V192h640z" ></path><path d="M288 512a32 32 0 0 0 0 64H384v96a32 32 0 0 0 64 0V576h128v96a32 32 0 0 0 64 0V576h96a32 32 0 0 0 0-64H640V384h96a32 32 0 0 0 0-64h-448a32 32 0 0 0 0 64H384v128zM448 384h128v128H448z" ></path></symbol><symbol id="iconguanbi" viewBox="0 0 1024 1024"><path d="M210.176 165.696l4.48 3.648 294.08 294.144 294.208-294.144 4.48-3.648a32 32 0 0 1 40.768 48.96L554.048 508.736l294.144 294.208a32 32 0 0 1-40.832 48.96l-4.48-3.712L508.8 554.048l-294.08 294.144-4.48 3.712a32 32 0 0 1-40.832-48.96l294.144-294.208-294.144-294.08a32 32 0 0 1 40.832-48.96z" ></path></symbol><symbol id="iconshangyiyiceng" viewBox="0 0 1024 1024"><path d="M530.176 134.144l4.48 3.712L785.92 389.12a32 32 0 0 1-40.832 48.96l-4.48-3.712L544 237.632v625.92a32 32 0 0 1-63.488 5.76l-0.512-5.76v-625.92L283.328 434.432a32 32 0 0 1-40.832 3.712l-4.48-3.712a32 32 0 0 1-3.648-40.832l3.648-4.48 251.328-251.264a32 32 0 0 1 40.832-3.712z" ></path></symbol><symbol id="iconshouqi" viewBox="0 0 1024 1024"><path d="M753.088 499.904L357.504 156.992a16 16 0 0 0-26.496 12.032V855.04a16 16 0 0 0 26.496 12.032l395.52-342.912a16 16 0 0 0 0-24.192z" ></path></symbol><symbol id="iconkejian" viewBox="0 0 1024 1024"><path d="M512 192c163.072 0 305.792 128.64 384.128 223.232l15.36 19.008 13.312 17.728 11.328 16.128 9.28 14.144 3.84 6.272 5.888 10.688c3.2 6.208 4.864 10.624 4.864 12.8a37.824 37.824 0 0 1-4.864 12.8l-5.952 10.688-8.128 13.12-4.928 7.296-11.328 16.128-13.376 17.728-15.296 19.008C817.792 703.36 675.072 832 512 832c-140.608 0-266.048-96-348.16-183.04l-18.88-20.672a844.864 844.864 0 0 1-8.768-10.048l-16.256-19.584-14.272-18.368-12.416-16.96-10.24-15.168-8.192-12.992C67.776 523.328 64 515.072 64 512c0-2.56 2.56-8.704 7.552-17.536l7.04-11.84 9.28-14.08 5.376-7.872 12.416-16.96 14.272-18.368 16.256-19.584c2.816-3.328 5.76-6.656 8.768-10.048l18.88-20.672C245.952 288 371.392 192 512 192z m0 64c-89.792 0-184.32 49.792-272.64 133.824a762.432 762.432 0 0 0-88.448 100.288l-6.784 9.536-8.32 12.352 8.32 12.352 6.784 9.536c24 32.832 54.656 68.096 88.448 100.288C327.68 718.208 422.208 768 512 768c89.92 0 184.448-49.664 272.704-133.44a755.072 755.072 0 0 0 88.32-100.224c4.8-6.464 9.088-12.672 12.8-18.368l2.56-4.032-5.44-8.256-9.856-14.08a755.072 755.072 0 0 0-88.384-100.16C696.448 305.6 601.92 256 512 256z m0 64.128a192 192 0 1 1 0 384 192 192 0 0 1 0-384z m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256z" ></path></symbol><symbol id="iconshanchu" viewBox="0 0 1088 1024"><path d="M927.552 192a32 32 0 1 1 0 64h-32.128v576a64 64 0 0 1-64 64H318.72a64 64 0 0 1-64-64V256h-33.088a32 32 0 1 1 0-64h705.92zM831.36 256H318.72v576h512.768V256z m-353.28 128a32 32 0 0 1 31.552 26.24l0.512 5.76v256a32 32 0 0 1-63.488 5.76l-0.512-5.76v-256a32 32 0 0 1 32-32z m192 0a32 32 0 0 1 31.552 26.24l0.512 5.76v256a32 32 0 0 1-63.488 5.76l-0.512-5.76v-256a32 32 0 0 1 32-32z m0.384-320a32 32 0 0 1 5.76 63.488l-5.76 0.512H478.208a32 32 0 0 1-5.76-63.488L478.208 64h192.32z" ></path></symbol><symbol id="iconsousuo" viewBox="0 0 1024 1024"><path d="M416 96a320 320 0 0 1 247.744 522.496l254.912 254.848a32 32 0 0 1-45.312 45.312L618.496 663.68A320 320 0 1 1 416 96z m0 64a256 256 0 1 0 0 512 256 256 0 0 0 0-512z" ></path></symbol><symbol id="iconshangchuan" viewBox="0 0 1024 1024"><path d="M864 640a32 32 0 0 1 31.488 26.24l0.512 5.76V832a64 64 0 0 1-56.576 63.552L832 896H192.832a64 64 0 0 1-63.616-56.512L128.832 832v-160a32 32 0 0 1 63.488-5.76l0.512 5.76V832H832v-160a32 32 0 0 1 32-32zM530.176 87.232l4.48 3.712 187.328 187.328a32 32 0 0 1-40.832 48.96l-4.48-3.712L544 190.848V672a32 32 0 0 1-63.488 5.76L480 672V190.848L347.328 323.52a32 32 0 0 1-40.832 3.712l-4.48-3.712a32 32 0 0 1-3.648-40.768l3.648-4.48 187.328-187.328a32 32 0 0 1 40.832-3.712z" ></path></symbol><symbol id="iconxiala" viewBox="0 0 1024 1024"><path d="M524.096 753.088l342.912-395.584a16 16 0 0 0-12.032-26.496H169.024a16 16 0 0 0-12.032 26.496l343.04 395.52a16 16 0 0 0 24.064 0z" ></path></symbol><symbol id="icontupian" viewBox="0 0 1024 1024"><path d="M896 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h768zM248.32 577.152c-38.336 0-87.04 4.544-120.32 11.52V832h517.376a436.736 436.736 0 0 0-397.12-254.848zM896 192H128v331.52a743.68 743.68 0 0 1 120.32-10.368 500.736 500.736 0 0 1 464.32 313.28l2.112 5.568H896V192z m-256 64a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m0 64a64 64 0 1 0 0 128 64 64 0 0 0 0-128z" ></path></symbol><symbol id="icontianjiashuju" viewBox="0 0 1024 1024"><path d="M864 736H768V640a32 32 0 0 0-64 0v96H608a32 32 0 0 0 0 64H704V896a32 32 0 0 0 64 0v-96h96a32 32 0 0 0 0-64z" ></path><path d="M602.368 883.392q-15.488 3.328-31.872 5.888A584.64 584.64 0 0 1 481.024 896c-169.728 0-288-67.456-288-128v-112.256a481.6 481.6 0 0 0 288 80.832 32 32 0 1 0 0-64c-169.728 0-288-67.456-288-128V431.168A481.536 481.536 0 0 0 481.024 512a481.536 481.536 0 0 0 288-80.832v82.88a32 32 0 0 0 64 0V320c0-107.648-154.624-192-352-192s-352 84.352-352 192v448c0 107.648 154.624 192 352 192a648.448 648.448 0 0 0 99.2-7.488q18.432-2.816 35.84-6.656a32 32 0 0 0-13.696-62.464zM481.024 192c169.664 0 288 67.456 288 128s-118.336 128-288 128-288-67.456-288-128 118.272-128 288-128z" ></path></symbol><symbol id="iconyichu" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 0 448 448 448 448 0 0 0-448-448z m0 832a384 384 0 1 1 384-384 384 384 0 0 1-384 384z" ></path><path d="M732.736 480.32l-447.232 0.512a32 32 0 0 0 5.76 63.488l447.232-0.576a32 32 0 0 0-5.76-63.488z" ></path></symbol><symbol id="iconxinjiangongcheng" viewBox="0 0 1024 1024"><path d="M896 256H529.92a32 32 0 0 1-22.528-9.28L406.336 146.56A64 64 0 0 0 361.28 128H128a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64z m0 576H128V192h233.28l101.056 100.16 7.04 6.336A96 96 0 0 0 529.92 320H896z" ></path><path d="M672 544h-128v-128a32 32 0 0 0-64 0v128h-128a32 32 0 0 0 0 64h128v128a32 32 0 0 0 64 0v-128h128a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconshezhi" viewBox="0 0 1024 1024"><path d="M544.256 82.816l320.192 186.688a64 64 0 0 1 31.744 55.296v374.4a64 64 0 0 1-31.744 55.296l-320.192 186.688a64 64 0 0 1-64.512 0L160 754.496a64 64 0 0 1-31.744-55.232V324.736a64 64 0 0 1 31.744-55.232l319.808-186.688a64 64 0 0 1 64.512 0zM512 138.112L192.192 324.736v374.528L512 885.888l320.192-186.688v-374.4L512 138.112zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384z m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256z" ></path></symbol><symbol id="iconxinjianwenjian" viewBox="0 0 1024 1024"><path d="M361.28 128a64 64 0 0 1 45.056 18.56l101.056 100.16A32 32 0 0 0 529.92 256H896a64 64 0 0 1 64 64v160a32 32 0 1 1-64 0V320H529.92a96 96 0 0 1-60.544-21.504l-7.04-6.336L361.28 192H128v640h416a32 32 0 1 1 0 64H128a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h233.28zM736 444.16a32 32 0 0 1 32 32v160h160a32 32 0 1 1 0 64H768v160a32 32 0 1 1-64 0v-160H544a32 32 0 1 1 0-64H704v-160a32 32 0 0 1 32-32z" ></path></symbol><symbol id="iconquantu" viewBox="0 0 1024 1024"><path d="M160 448a32 32 0 0 0 32-32V192h224a32 32 0 0 0 0-64H192a64 64 0 0 0-64 64v224a32 32 0 0 0 32 32zM832 128H608a32 32 0 0 0 0 64H832v224a32 32 0 0 0 64 0V192a64 64 0 0 0-64-64zM416 832H192V608a32 32 0 0 0-64 0V832a64 64 0 0 0 64 64h224a32 32 0 0 0 0-64zM864 576a32 32 0 0 0-32 32V832H608a32 32 0 0 0 0 64H832a64 64 0 0 0 64-64V608a32 32 0 0 0-32-32zM704 512a192 192 0 1 0-192 192 192 192 0 0 0 192-192z m-192 128a128 128 0 1 1 128-128 128.128 128.128 0 0 1-128 128z" ></path></symbol><symbol id="icontishi" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z m-0.32 276.032c20.544 0 37.312 16.704 37.312 37.312v289.344a37.312 37.312 0 0 1-74.624 0V441.344c0-20.608 16.64-37.312 37.312-37.312z m0-145.728c14.72 0 27.456 4.224 37.312 14.08a46.72 46.72 0 0 1 14.72 35.904 49.92 49.92 0 0 1-15.488 36.608 52.864 52.864 0 0 1-36.608 14.08 51.648 51.648 0 0 1-36.544-14.08 50.496 50.496 0 0 1-14.848-36.608 46.72 46.72 0 0 1 14.848-35.904 48.768 48.768 0 0 1 36.608-14.08z" ></path></symbol><symbol id="icontianjia" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z m0 131.584a32 32 0 0 1 31.488 26.24l0.512 5.76v188.672h188.736a32 32 0 0 1 5.76 63.488l-5.76 0.512H544v188.8a32 32 0 0 1-63.488 5.76l-0.512-5.76v-188.8H291.264a32 32 0 0 1-5.76-63.424l5.76-0.576H480V291.584a32 32 0 0 1 32-32z" ></path></symbol><symbol id="iconyingxiang" viewBox="0 0 1024 1024"><path d="M896 128H128a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64z m-256 64v128H384V192zM384 384h256v192H384zM128 192h192v128H128z m0 192h192v192H128z m0 448v-192h192v192z m256 0v-192h256v192z m512 0h-192v-192h192z m0-256h-192V384h192z m-192-256V192h192v128z" ></path><path d="M128 384h192v192H128zM704 640h192v192h-192z" fill="#bfbfbf" ></path></symbol><symbol id="iconxinjianfangan" viewBox="0 0 1024 1024"><path d="M543.232 832H192V192h512v289.152a32 32 0 1 0 64 0V192a64 64 0 0 0-64-64H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h351.232a32 32 0 1 0 0-64z" ></path><path d="M608 320h-320a32 32 0 0 0 0 64h320a32 32 0 0 0 0-64zM640 512a32 32 0 0 0-32-32h-320a32 32 0 0 0 0 64h320A32 32 0 0 0 640 512zM288 640a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64zM865.792 705.792H768V608a32 32 0 0 0-64 0v97.792H609.792a32 32 0 0 0 0 64H704V864a32 32 0 0 0 64 0v-94.208h97.792a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconshuju" viewBox="0 0 1024 1024"><path d="M513.024 96c210.048 0 384 79.04 384 192v448c0 112.96-173.952 192-384 192-204.16 0-374.272-74.752-383.616-182.656l-0.384-9.344v-448l0.384-9.344C138.752 170.752 308.8 96 513.024 96z m0 608.64c-132.608 0-250.816-31.552-320-83.2v114.56c0 63.808 141.248 128 320 128 173.184 0 311.168-60.224 319.616-122.048l0.384-5.952 0.064-114.624c-69.12 51.648-187.392 83.2-320 83.2z m320.064-307.84c-69.12 51.648-187.392 83.2-320 83.2-132.672 0-250.88-31.552-320.064-83.2v115.84c0 63.744 141.248 128 320 128 173.184 0 311.168-60.288 319.616-122.048l0.384-6.016z m-320-236.8c-178.816 0-320 64.192-320 128 0 63.808 141.184 128 320 128 178.688 0 320-64.192 320-128 0-63.808-141.312-128-320-128z" ></path></symbol><symbol id="icontuceng" viewBox="0 0 1024 1024"><path d="M933.952 665.6a32 32 0 0 1-6.848 40.448l-4.736 3.328-394.24 229.184a32 32 0 0 1-27.072 2.432l-5.12-2.432-387.648-225.28a32 32 0 0 1 26.944-57.792l5.248 2.432 371.456 215.936 378.24-219.776a32 32 0 0 1 43.776 11.52z m-1.024-173.568a32 32 0 0 1-6.848 40.448l-4.736 3.328-393.28 228.608a32 32 0 0 1-27.008 2.368l-5.12-2.368L105.792 537.6a32 32 0 0 1 26.944-57.792l5.248 2.432L512 699.712l377.216-219.264a32 32 0 0 1 43.712 11.584zM528.064 87.168l388.864 226.048a32 32 0 0 1 0 55.36L528.064 594.56a32 32 0 0 1-32.128 0L107.072 368.576a32 32 0 0 1 0-55.36l388.864-226.048a32 32 0 0 1 32.128 0zM512 151.808L186.752 340.864 512 529.92l325.184-189.056L512 151.808z" ></path></symbol><symbol id="iconxiayiyiceng" viewBox="0 0 1024 1024"><path d="M530.176 889.856l4.48-3.712L785.92 634.88a32 32 0 0 0-40.832-48.96l-4.48 3.712L544 786.368v-625.92a32 32 0 0 0-63.488-5.76l-0.512 5.76v625.92L283.328 589.568a32 32 0 0 0-40.832-3.712l-4.48 3.712a32 32 0 0 0-3.648 40.832l3.648 4.48 251.328 251.264a32 32 0 0 0 40.832 3.712z" ></path></symbol><symbol id="iconzhengque" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z m248.32 226.176a32 32 0 0 1 3.712 40.832l-3.712 4.48-291.2 291.2a32 32 0 0 1-40.832 3.712l-4.48-3.712-156.032-156.032a32 32 0 0 1 40.768-48.96l4.48 3.648 133.44 133.504 268.608-268.672a32 32 0 0 1 45.248 0z" ></path></symbol><symbol id="iconwenjian" viewBox="0 0 1024 1024"><path d="M361.28 128a64 64 0 0 1 45.056 18.56l101.056 100.16A32 32 0 0 0 529.92 256H896a64 64 0 0 1 64 64v512a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h233.28z m0 64H128v640h768V320H529.92a96 96 0 0 1-60.544-21.504l-7.04-6.336L361.28 192z m346.624 512a32 32 0 0 1 5.76 63.488l-5.76 0.512h-384a32 32 0 0 1-5.76-63.488l5.76-0.512h384z" ></path></symbol><symbol id="iconshijian" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z m0 131.584a32 32 0 0 1 31.488 26.24l0.512 5.76v207.168l147.008 147.008a32 32 0 0 1 3.712 40.832l-3.712 4.416a32 32 0 0 1-40.832 3.712l-4.48-3.712-156.352-156.352a32 32 0 0 1-8.96-17.6L480 512V291.584a32 32 0 0 1 32-32z" ></path></symbol><symbol id="icontingzhi" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z m128 192a64 64 0 0 1 64 64v256a64 64 0 0 1-64 64H384a64 64 0 0 1-64-64V384a64 64 0 0 1 64-64h256z m0 64H384v256h256V384z" ></path></symbol><symbol id="iconyidong" viewBox="0 0 1024 1024"><path d="M529.984 83.2l4.48 3.648 135.744 135.808a32 32 0 0 1-40.832 48.96l-4.48-3.712L544 187.008V480h292.992L755.84 398.848l-3.648-4.416a32 32 0 0 1 48.96-40.832l135.68 135.744 3.776 4.48a32 32 0 0 1-3.712 40.832l-135.744 135.68-4.48 3.776a32 32 0 0 1-40.832-3.712l-3.648-4.48a32 32 0 0 1 3.648-40.768L836.992 544H544.128v292.8l80.832-80.64 4.48-3.776a32 32 0 0 1 40.768 48.96l-135.744 135.808-4.48 3.712a32 32 0 0 1-40.768-3.712L353.408 801.28l-3.712-4.416a32 32 0 0 1 3.712-40.832l4.48-3.712a32 32 0 0 1 40.768 3.712l81.536 81.6-0.064-293.76H186.56l81.152 81.216a32 32 0 0 1 3.712 40.832l-3.712 4.416a32 32 0 0 1-40.832 3.712l-4.48-3.712-135.68-135.744a32 32 0 0 1-3.712-40.832l3.648-4.48 135.808-135.68a32 32 0 0 1 48.96 40.768l-3.712 4.48L186.56 480H480L480 186.496 398.72 267.904a32 32 0 0 1-40.832 3.712l-4.48-3.712a32 32 0 0 1-3.712-40.832l3.712-4.48 135.808-135.68a32 32 0 0 1 40.768-3.776z" ></path></symbol><symbol id="iconzhiding" viewBox="0 0 1024 1024"><path d="M530.176 280.32l4.48 3.648 251.328 251.328a32 32 0 0 1-40.832 48.96l-4.48-3.712L544 383.808v523.264a32 32 0 0 1-63.488 5.76l-0.512-5.76V383.808L283.328 580.544a32 32 0 0 1-40.832 3.712l-4.48-3.712a32 32 0 0 1-3.648-40.832l3.648-4.416 251.328-251.328a32 32 0 0 1 40.832-3.712zM864 128a32 32 0 0 1 5.76 63.488L864 192h-704a32 32 0 0 1-5.76-63.488L160 128h704z" ></path></symbol><symbol id="iconpingmian" viewBox="0 0 1024 1024"><path d="M832 128H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64z m0 224h-160V192H832zM414.08 609.92V416H608v193.92z m193.92 64V832H414.08v-158.08z m-257.92-64H192V416h158.08z m64-257.92V192H608v160z m257.92 64H832v193.92h-160zM350.08 192v160H192V192zM192 673.92h158.08V832H192zM672 832v-158.08H832V832z" ></path></symbol><symbol id="iconzhongmingming" viewBox="0 0 1024 1024"><path d="M480 640H128V384h352a32 32 0 0 0 0-64h-384a32 32 0 0 0-32 32v320a32 32 0 0 0 32 32h384a32 32 0 0 0 0-64zM928 320h-128a32 32 0 0 0 0 64H896v256h-96a32 32 0 0 0 0 64h128a32 32 0 0 0 32-32v-320a32 32 0 0 0-32-32z" ></path><path d="M224.896 480a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64zM736 832h-64V192h64a32 32 0 0 0 0-64h-192a32 32 0 0 0 0 64h64v640h-64a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconzhibeizhen" viewBox="0 0 1024 1024"><path d="M287.872 447.68h448.256a32 32 0 0 0 25.856-50.816L537.856 89.984a32 32 0 0 0-51.712 0L262.016 396.8a32 32 0 0 0 25.856 50.88zM735.936 577.216H288a32 32 0 0 0-25.856 50.88l224 306.816a32 32 0 0 0 51.648 0l223.936-306.816a32 32 0 0 0-25.856-50.88zM512 861.76l-160.96-220.544h321.92z" ></path></symbol><symbol id="iconzengjia" viewBox="0 0 1024 1024"><path d="M864 480h-320v-320a32 32 0 0 0-64 0v320h-320a32 32 0 0 0 0 64h320v320a32 32 0 0 0 64 0v-320h320a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconniantie" viewBox="0 0 1024 1024"><path d="M832 448a64 64 0 0 1 64 64v320a64 64 0 0 1-64 64H512a64 64 0 0 1-64-64V512a64 64 0 0 1 64-64h320zM513.28 128a64 64 0 0 1 64 64v0.192h62.464a64 64 0 0 1 63.616 56.512l0.384 7.488V351.36a32 32 0 0 1-63.488 5.76l-0.512-5.76V256.192H577.28l-0.384 7.296A64 64 0 0 1 513.216 320h-192a64 64 0 0 1-64-63.808H192.32v511.872H352a32 32 0 0 1 5.76 63.488l-5.76 0.512H192.32a64 64 0 0 1-63.552-56.512L128.32 768V256.192a64 64 0 0 1 56.512-63.552l7.488-0.448H257.28V192a64 64 0 0 1 64-64h192zM832 512H512v320h320V512zM513.28 192h-192v64h192V192z" ></path></symbol><symbol id="iconzuidahua" viewBox="0 0 1024 1024"><path d="M416 128H192a64 64 0 0 0-64 64v224a32 32 0 0 0 64 0V192h224a32 32 0 0 0 0-64zM832 128H608a32 32 0 0 0 0 64H832v224a32 32 0 0 0 64 0V192a64 64 0 0 0-64-64zM416 832H192V608a32 32 0 0 0-64 0V832a64 64 0 0 0 64 64h224a32 32 0 0 0 0-64zM864 576a32 32 0 0 0-32 32V832H608a32 32 0 0 0 0 64H832a64 64 0 0 0 64-64V608a32 32 0 0 0-32-32z" ></path></symbol><symbol id="iconyiwen" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z m-4.608 539.328c14.784 0 27.52 4.224 37.312 14.08a46.72 46.72 0 0 1 14.848 35.904 49.344 49.344 0 0 1-14.848 36.608 55.936 55.936 0 0 1-37.248 14.08 46.72 46.72 0 0 1-35.968-14.784 46.976 46.976 0 0 1-15.488-35.904c0-14.784 4.928-26.752 15.488-35.904 9.216-9.856 21.12-14.08 35.904-14.08z m12.032-411.84c45.76 0 82.368 11.968 110.464 37.312 27.52 24.64 41.6 58.432 41.6 100.672 0 34.496-9.216 63.36-26.112 85.888L640 485.248l-8.64 8.448-11.968 11.008-33.856 29.568a122.368 122.368 0 0 0-28.8 35.904c-6.208 11.264-9.216 17.408-10.24 25.6l-0.384 7.68 0.064-2.88a38.4 38.4 0 0 1-75.072 11.328l-0.832-3.52 0.192 1.28a38.528 38.528 0 0 1 0.32-19.392c1.6-14.016 5.76-25.984 12.736-39.808 8.064-16.128 27.392-38.4 58.112-67.2l22.144-20.096 11.968-13.376c12.608-16.192 18.944-33.088 18.944-51.392 0-24.64-7.04-43.648-20.416-57.728-14.08-14.08-33.792-21.12-59.136-21.12-31.616 0-54.848 9.856-68.928 29.568-12.736 16.896-17.088 33.92-17.088 64.896l-0.32 0.64 0.32-3.264a38.4 38.4 0 0 1-75.776 8.96l-1.024-7.104 0.128-5.76c1.472-39.04 16.512-78.976 45.184-106.944 29.568-30.272 70.4-45.056 121.792-45.056z" ></path></symbol><symbol id="iconzhidi" viewBox="0 0 1024 1024"><path d="M864 832a32 32 0 0 1 5.76 63.488L864 896h-704a32 32 0 0 1-5.76-63.488L160 832h704zM512 82.56a32 32 0 0 1 31.488 26.24l0.512 5.76v523.264l196.672-196.672a32 32 0 0 1 40.832-3.712l4.48 3.712a32 32 0 0 1 3.648 40.832l-3.648 4.416-251.328 251.328a32 32 0 0 1-40.832 3.712l-4.48-3.712L238.08 486.4a32 32 0 0 1 40.832-48.96l4.48 3.712L480 637.824V114.56a32 32 0 0 1 32-32z" ></path></symbol><symbol id="iconyincang" viewBox="0 0 1024 1024"><path d="M816.384 81.792a32 32 0 0 1 5.312 40.64l-3.52 4.544-109.952 119.232c122.944 73.472 250.88 222.784 250.88 270.72 0 89.216-252.544 329.152-448 329.152-90.176 0-178.56-37.632-261.888-102.528L123.648 879.36a32 32 0 0 1-50.56-38.848l3.52-4.544L771.2 83.584a32 32 0 0 1 45.184-1.792z m-152.832 212.544l-50.24 54.656a192 192 0 1 1-255.872 277.12l-64.704 70.08 1.088 0.896c71.36 54.336 145.088 84.992 217.28 84.992 91.712 0 185.6-49.28 272.128-131.52 32.64-30.976 62.144-64.96 85.312-96.704l12.16-17.536 9.216-13.824c2.56-3.84 4.352-6.08 4.928-6.08l0.192 0.384-0.384-2.56a78.336 78.336 0 0 0-10.432-18.944l-9.856-13.44-12.48-15.616a700.8 700.8 0 0 0-14.912-17.28l-17.024-18.56-9.216-9.6-19.584-19.584a966.592 966.592 0 0 0-10.368-9.856l-21.504-19.712c-33.6-29.696-70.4-57.792-105.728-77.312zM568.704 397.44l-166.592 180.48a128 128 0 1 0 166.592-180.48z m-57.6-209.6a32 32 0 1 1 0 64c-91.712 0-185.472 49.344-272.128 131.84a735.36 735.36 0 0 0-85.312 96.832l-9.92 14.144-11.52 17.216a84.48 84.48 0 0 1-2.56 3.456l-0.96 0.96 1.856 2.56 6.72 10.816c10.24 16 24.32 35.2 40.64 55.04a32 32 0 1 1-49.344 40.704l-15.808-19.712c-2.496-3.2-4.928-6.4-7.232-9.6l-13.184-18.176c-18.176-26.496-29.248-48.32-29.248-60.928 0-88.576 252.8-329.152 448-329.152z" ></path></symbol><symbol id="iconzhongzuo" viewBox="0 0 1024 1024"><path d="M705.6 130.496a32 32 0 0 1 45.248 0l135.808 135.68 3.648 4.48a32 32 0 0 1-3.648 40.832l-135.808 135.744-4.416 3.712a32 32 0 0 1-40.832-3.712l-3.712-4.416a32 32 0 0 1 3.712-40.832l81.152-81.152h-435.2a223.552 223.552 0 0 0-12.224 446.848l12.224 0.32h447.04a32 32 0 0 1 5.76 63.488l-5.76 0.512H351.552a287.552 287.552 0 0 1-13.504-574.848l13.504-0.32h435.136l-81.088-81.088-3.712-4.48a32 32 0 0 1 3.712-40.768z" ></path></symbol><symbol id="iconzanting" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128zM384.96 320a32 32 0 0 1 31.488 26.24l0.512 5.76v320a32 32 0 0 1-63.488 5.76l-0.512-5.76v-320a32 32 0 0 1 32-32z m255.168 0a32 32 0 0 1 31.488 26.24l0.512 5.76v320a32 32 0 0 1-63.488 5.76l-0.512-5.76v-320a32 32 0 0 1 32-32z" ></path></symbol><symbol id="iconzuixiaohua" viewBox="0 0 1024 1024"><path d="M416 128a32 32 0 0 0-32 32V384H160a32 32 0 0 0 0 64H384a64 64 0 0 0 64-64V160a32 32 0 0 0-32-32zM640 448h224a32 32 0 0 0 0-64H640V160a32 32 0 0 0-64 0V384a64 64 0 0 0 64 64zM384 576H160a32 32 0 0 0 0 64H384v224a32 32 0 0 0 64 0V640a64 64 0 0 0-64-64zM864 576H640a64 64 0 0 0-64 64v224a32 32 0 0 0 64 0V640h224a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconlashen" viewBox="0 0 1024 1024"><path d="M576 128.832L282.624 128h-0.128a64 64 0 0 0-45.312 18.752L82.688 301.632A64 64 0 0 0 64 346.816l-0.128 356.928a64 64 0 0 0 64 64H192V832a64 64 0 0 0 64 64h160a64 64 0 0 0 51.2-25.6l160-213.76a64 64 0 0 0 12.8-38.4l-0.128-425.408a64 64 0 0 0-63.872-64zM192.192 412.16H192v291.584H127.872L128 363.968h105.408zM384 832H256V476.16h128z m15.808-419.84h-123.52l96-112.256H174.912L282.496 192l278.4 0.704zM448 789.184V454.656l127.936-174.08L576 618.24zM904.704 744.192l-41.152 41.856V300.032l41.152 41.856a32 32 0 0 0 45.632-44.8l-96-97.792a32.896 32.896 0 0 0-45.632 0l-96 97.728a32 32 0 0 0 45.632 44.864l41.216-41.984v486.272l-41.216-41.984a32 32 0 0 0-45.632 44.864l96 97.728a32 32 0 0 0 45.632 0l96-97.728a32 32 0 0 0-45.632-44.864z" ></path></symbol><symbol id="iconxiazai" viewBox="0 0 1024 1024"><path d="M864 640a32 32 0 0 1 31.488 26.24l0.512 5.76V832a64 64 0 0 1-56.576 63.552L832 896H192.832a64 64 0 0 1-63.616-56.512L128.832 832v-160a32 32 0 0 1 63.488-5.76l0.512 5.76V832H832v-160a32 32 0 0 1 32-32zM512 78.848a32 32 0 0 1 31.488 26.24l0.512 5.76v483.84l132.672-132.672a32 32 0 0 1 40.832-3.648l4.48 3.648a32 32 0 0 1 3.648 40.832l-3.648 4.48-187.328 187.328a32 32 0 0 1-40.832 3.648l-4.48-3.648L302.08 507.328a32 32 0 0 1 40.832-48.96l4.48 3.648L480 594.688v-483.84a32 32 0 0 1 32-32z" ></path></symbol><symbol id="iconlunkuoxian" viewBox="0 0 1024 1024"><path d="M800 608h-576a96 96 0 0 1 0-192h576a96 96 0 0 1 0 192z m-576-128a32 32 0 0 0 0 64h576a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconhuizhimian" viewBox="0 0 1024 1024"><path d="M128 128m64 0l640 0q64 0 64 64l0 640q0 64-64 64l-640 0q-64 0-64-64l0-640q0-64 64-64Z" ></path></symbol><symbol id="iconshixian" viewBox="0 0 1024 1024"><path d="M864 544a32 32 0 0 0 0-64h-704a32 32 0 0 0 0 64z" ></path></symbol><symbol id="iconhuizhitiaowen" viewBox="0 0 1024 1024"><path d="M160 309.312a31.872 31.872 0 0 0 22.592-9.344l117.376-117.376a32 32 0 0 0-45.248-45.248L137.408 254.72a32 32 0 0 0 22.592 54.592zM886.656 137.408a32 32 0 0 0-45.248 0l-704 704a32 32 0 1 0 45.184 45.184l704-704a32 32 0 0 0 0-45.248zM841.344 724.032l-117.312 117.312a32 32 0 1 0 45.248 45.248l117.376-117.312a32 32 0 1 0-45.248-45.248zM841.344 430.72L430.72 841.344a32 32 0 1 0 45.248 45.248l410.688-410.624a32 32 0 0 0-45.248-45.248zM160 602.624a31.872 31.872 0 0 0 22.592-9.344L593.28 182.656a32 32 0 0 0-45.248-45.248L137.344 548.032a32 32 0 0 0 22.656 54.592z" ></path></symbol><symbol id="iconxuxian" viewBox="0 0 1024 1024"><path d="M224 480h-64a32 32 0 0 0 0 64h64a32 32 0 0 0 0-64zM437.312 480h-64a32 32 0 0 0 0 64h64a32 32 0 1 0 0-64zM650.688 480h-64a32 32 0 1 0 0 64h64a32 32 0 0 0 0-64zM864 480h-64a32 32 0 0 0 0 64h64a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconweijixian" viewBox="0 0 1024 1024"><path d="M294.4 203.328a31.808 31.808 0 0 0-19.776 6.784 385.6 385.6 0 0 0-49.92 47.104l-0.384 0.384-0.96 1.152-0.384 0.384v0.064l-0.576 0.64-0.32 0.384-0.064 0.064-0.256 0.32-0.128 0.128-0.192 0.192-0.064 0.064-0.256 0.32-0.128 0.128-0.256 0.32-0.064 0.128-0.256 0.256-0.128 0.128-0.128 0.128-0.128 0.192-0.256 0.256-0.064 0.064-0.256 0.256-0.128 0.192-0.128 0.192-0.192 0.192-0.128 0.192-0.256 0.256-0.128 0.128-0.128 0.192-0.192 0.192-0.128 0.256-0.128 0.128-0.256 0.256-0.064 0.128-0.192 0.256-0.128 0.128-0.192 0.192-0.128 0.192-0.192 0.256-0.128 0.128-0.256 0.256-0.064 0.128-0.256 0.256v0.128l-0.32 0.256-0.064 0.064-0.256 0.32v0.128l-0.32 0.32H215.04l-0.256 0.384-0.32 0.32v0.064l-0.32 0.32v0.128l-0.32 0.32-0.064 0.064-0.256 0.32-0.32 0.384-0.32 0.384-0.32 0.384-0.256 0.384-0.32 0.384-0.32 0.384-0.64 0.768-0.32 0.448-0.256 0.384-0.64 0.768-0.32 0.384-0.256 0.384-0.64 0.768-0.32 0.384-0.896 1.216q-9.728 12.672-18.432 26.24a32 32 0 0 0 53.76 34.56A320.96 320.96 0 0 1 314.24 260.48a32 32 0 0 0-19.84-57.152zM169.728 397.056a32 32 0 0 0-31.04 24.448 383.296 383.296 0 0 0-9.28 56.384l-0.128 1.792V480.256l-0.128 1.28V482.368l-0.064 1.152v0.96l-0.256 1.216v0.96l-0.064 0.832v1.024l-0.192 1.152v3.2l-0.064 0.768V512H128V523.84q0.384 12.544 1.536 24.832a32 32 0 0 0 31.808 28.992c1.024 0 2.048 0 3.072-0.128a32 32 0 0 0 28.8-34.88Q192 527.552 192 512a321.728 321.728 0 0 1 8.96-75.392 32 32 0 0 0-31.168-39.552z m22.016 229.376a32 32 0 0 0-29.12 45.312 384.704 384.704 0 0 0 64.768 98.112l1.024 1.088 0.32 0.384 0.32 0.384 0.32 0.32 0.32 0.32v0.064l0.32 0.32 0.064 0.064 0.32 0.32 0.256 0.32 0.064 0.064 0.32 0.32v0.064l0.32 0.256 0.064 0.128 0.256 0.256 0.128 0.128 0.192 0.192 0.128 0.128 0.256 0.256 0.064 0.128 0.256 0.256 0.128 0.128 0.192 0.192 0.128 0.192 0.192 0.192 0.128 0.128 0.256 0.256 0.128 0.128 0.192 0.192 0.128 0.128a32 32 0 0 0 46.208-44.224 320 320 0 0 1-59.648-87.872 32 32 0 0 0-29.056-18.688z m159.168 166.656a32 32 0 0 0-14.72 60.416q6.336 3.264 12.8 6.336l1.088 0.512 0.192 0.064h0.064l0.192 0.128 0.192 0.128h0.128l0.128 0.064h0.064l0.32 0.192h0.256l0.064 0.128h0.128l0.128 0.064 0.128 0.064 0.128 0.064 0.128 0.064 0.128 0.064h0.128l0.192 0.128h0.128l0.128 0.128h0.128l0.128 0.064 0.128 0.064 0.128 0.064 0.064 0.064 0.256 0.192h0.064l0.512 0.256 0.256 0.128 0.256 0.064h0.064l0.192 0.128h0.064l0.768 0.384 0.256 0.064 0.256 0.128a381.44 381.44 0 0 0 88.576 26.944l1.152 0.192 0.32 0.064h0.256l1.152 0.256H448.704l0.896 0.192h0.256l0.256 0.064h0.448l0.576 0.128H453.888l0.384 0.128H455.424l0.64 0.064H456.96l0.704 0.128a32 32 0 1 0 8.96-63.36 316.8 316.8 0 0 1-101.056-32.192 31.872 31.872 0 0 0-14.592-3.52z m337.28-8.32a31.808 31.808 0 0 0-16 4.288 316.928 316.928 0 0 1-99.264 37.184 32 32 0 0 0 6.016 63.424 32.384 32.384 0 0 0 6.08-0.576 381.376 381.376 0 0 0 73.856-22.144l2.944-1.28h0.256l0.192-0.128 0.896-0.384 0.256-0.128h0.256l0.832-0.448h0.256v-0.064l0.256-0.064 0.192-0.128h0.064l0.192-0.064h0.064l0.384-0.192 0.192-0.064 0.256-0.064 0.192-0.128h0.128l0.128-0.128h0.256l0.32-0.192h0.128l0.128-0.128h0.128l0.128-0.128h0.128l0.128-0.064 0.128-0.064h0.128l0.128-0.128h0.064l0.256-0.128h0.064l0.192-0.128h0.064l0.192-0.128h0.128l0.128-0.064h0.128l0.128-0.128 0.128-0.32 0.192-0.064 0.32-0.128 0.256-0.128 0.256-0.128 0.256-0.128 0.256-0.064 0.576-0.256 0.256-0.128 0.256-0.064 0.256-0.128 0.768-0.384 0.256-0.128 0.256-0.064 4.224-1.984q13.248-6.4 25.984-13.76a32 32 0 0 0-16.192-59.648z m150.784-174.336a32 32 0 0 0-29.696 20.16 319.488 319.488 0 0 1-55.232 90.688 32 32 0 1 0 48.384 41.856l3.84-4.48 0.96-1.152 0.256-0.384 0.96-1.152 0.32-0.384 0.64-0.768 0.256-0.32 0.32-0.384 0.64-0.768 0.32-0.384 0.576-0.704 0.256-0.384h0.064l0.256-0.384v-0.064l0.32-0.384 0.32-0.32v-0.064l0.32-0.32v-0.064l0.32-0.384 0.256-0.32 0.32-0.384 0.32-0.384 0.576-0.768v-0.064l0.32-0.32v-0.064l0.32-0.384 0.256-0.384 0.32-0.384 0.256-0.384h0.064l0.256-0.384 0.256-0.384 0.32-0.384v-0.064l0.32-0.384 0.64-0.768 0.256-0.384v-0.064l0.32-0.384 0.256-0.32 0.32-0.384v-0.064l0.256-0.384 0.32-0.384 0.256-0.384 0.256-0.384 0.64-0.704 0.64-0.768v-0.064l0.256-0.384 0.256-0.384 0.32-0.384 0.256-0.384v-0.064l0.32-0.384 0.256-0.384 0.32-0.448 0.256-0.32v-0.064l0.32-0.384 0.512-0.768 0.32-0.448 0.832-1.152 0.32-0.448 0.512-0.768 0.32-0.384a383.36 383.36 0 0 0 41.536-77.056 32 32 0 0 0-29.76-43.84z m10.624-230.144a32 32 0 0 0-30.72 41.088A320.512 320.512 0 0 1 832 512q0 7.488-0.32 14.848a32 32 0 0 0 30.464 33.408h1.536a32 32 0 0 0 31.936-30.464L896 516.736V479.104l-0.064-0.32V476.096l-0.064-0.384V473.92L894.08 473.6V469.12l-0.064-0.192V467.84l-0.576-0.32V464l-0.064-0.32V462.08l-0.064-0.256V460.8l-0.128-0.256V457.856l-1.024-0.32V456.96l-0.064-0.448v-0.64l-0.064-0.256v-0.448l-0.256-0.192V454.4l-0.064-0.256V453.76l-0.064-0.192V452.928l-0.128-0.512v-0.512l-0.128-0.384v-0.128l-0.192-0.192v-0.64l-0.064-0.256V449.92l-0.128-0.448V449.28l-0.128-0.256v-0.128l-0.064-0.384V448l-0.128-0.448-0.128-0.256v-0.384l-0.064-0.448v-0.128l-0.064-0.256v-0.128l-0.064-0.384V445.44l-0.128-0.256v-0.128l-0.128-0.768v-0.448l-0.192-0.384v-0.384l-0.128-0.576-0.064-0.256-0.128-0.832v-0.064l-0.192-0.832v-0.384l-0.128-0.512v-0.384l-0.32-0.832v-0.384l-0.128-0.448V437.12l-0.128-0.512-0.064-0.256v-0.064l-0.192-0.832-0.128-0.32-0.128-0.512v-0.448l-0.192-0.768v-0.064l-0.128-0.832-0.064-0.32-0.128-0.512V431.36l-0.192-0.832-0.64-2.88-0.64-2.112q-2.56-11.328-5.824-22.4a32 32 0 0 0-30.72-22.848z m-133.952-187.392a32 32 0 0 0-18.56 58.112 321.28 321.28 0 0 1 75.264 75.008 32 32 0 0 0 52.096-37.248 386.368 386.368 0 0 0-85.376-86.4l-1.216-0.896-0.384-0.32-0.768-0.512-0.448-0.32-0.448-0.32-0.384-0.32-0.384-0.256h-0.064l-0.32-0.32h-0.064l-0.384-0.256a31.872 31.872 0 0 0-18.56-5.952zM512 128H494.4l-0.896 0.064H491.328l-0.896 0.128h-1.856l-1.216 0.128a382.592 382.592 0 0 0-101.12 20.288 32 32 0 0 0 21.12 60.416A319.488 319.488 0 0 1 512 192a320.64 320.64 0 0 1 89.664 12.736 32 32 0 0 0 17.92-61.44 383.104 383.104 0 0 0-79.36-14.272l-1.28-0.064-0.832-0.064-2.112-0.128-0.96-0.064h-0.384L533.76 128.64h-2.176l-0.832-0.192H512z" ></path></symbol></svg>',function(h){var a=(a=document.getElementsByTagName("script"))[a.length-1],l=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var o,i,z,m,t,v=function(a,l){l.parentNode.insertBefore(a,l)};if(l&&!h.__iconfont__svg__cssinject__){h.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(a){console&&console.log(a)}}o=function(){var a,l=document.createElement("div");l.innerHTML=h._iconfont_svg_string_2397568,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?v(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(o,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),o()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(z=o,m=h.document,t=!1,d(),m.onreadystatechange=function(){"complete"==m.readyState&&(m.onreadystatechange=null,c())})}function c(){t||(t=!0,z())}function d(){try{m.documentElement.doScroll("left")}catch(a){return void setTimeout(d,50)}c()}}(window); \ No newline at end of file +window._iconfont_svg_string_2397568='<svg><symbol id="icontianjiameitiziduan" viewBox="0 0 1024 1024"><path d="M393.152 362.112A48 48 0 0 0 320 403.008v217.984a48 48 0 0 0 73.152 40.96l177.408-109.056a48 48 0 0 0 0-81.792zM384 592.384V431.616L514.816 512zM929.792 705.792H832V608a32 32 0 0 0-64 0v97.792h-94.208a32 32 0 0 0 0 64H768V864a32 32 0 0 0 64 0v-94.208h97.792a32 32 0 0 0 0-64z" ></path><path d="M544 768H128V256h640v224a32 32 0 0 0 64 0V256a64 64 0 0 0-64-64H128a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h416a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconzhidingshujuchaxun" viewBox="0 0 1024 1024"><path d="M512 864c-183.104 0-320-67.584-320-128V620.544a461.568 461.568 0 0 0 212.672 76.8 35.648 35.648 0 0 0 4.48 0.32 32 32 0 0 0 4.288-63.744C269.632 614.016 192 556.48 192 512.64V396.992A552.192 552.192 0 0 0 512 480a552.192 552.192 0 0 0 320-83.008v76.352a32 32 0 0 0 64 0V288c0-109.44-165.12-192-384-192s-384 82.56-384 192v448c0 109.44 165.12 192 384 192a32 32 0 0 0 0-64z m0-704c183.104 0 320 67.584 320 128s-136.896 128-320 128-320-67.584-320-128 136.832-128 320-128z" ></path><path d="M949.888 905.216L859.52 814.72a193.216 193.216 0 1 0-45.248 45.248l90.432 90.496a32 32 0 1 0 45.248-45.312zM575.36 703.808a128 128 0 1 1 128 128 128.192 128.192 0 0 1-128-128z" ></path></symbol><symbol id="iconduixianghuizhi" viewBox="0 0 1024 1024"><path d="M288 768h140.16a32 32 0 0 0 22.656-9.472l437.056-440.256a32 32 0 0 0-0.128-45.12L752 137.344a32.064 32.064 0 0 0-45.12-0.128l-441.408 437.12A32 32 0 0 0 256 596.992V736a32 32 0 0 0 32 32z m441.28-562.816l90.688 90.688-47.232 47.552-91.136-91.072 47.68-47.168zM320 610.368l316.16-312.96 91.52 91.52L414.72 704H320V610.368zM864 832h-704a32 32 0 1 0 0 64h704a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconsanweifenxi" viewBox="0 0 1024 1024"><path d="M864 262.4l-320-192c-19.2-6.4-44.8-6.4-64 0l-320 192c-19.2 12.8-32 32-32 57.6v384c0 25.6 12.8 44.8 32 57.6l320 192c19.2 12.8 44.8 12.8 64 0l320-192c19.2-12.8 32-32 32-57.6V320c0-25.6-12.8-44.8-32-57.6zM512 128l288 172.8L512 473.6 224 300.8 512 128z m-320 576V358.4l288 172.8v345.6L192 704z m352 172.8V531.2L832 358.4V704l-288 172.8z" ></path></symbol><symbol id="iconqingtian" viewBox="0 0 1024 1024"><path d="M512.365714 36.571429a18.102857 18.102857 0 0 0-18.285714 18.285714v110.445714a18.285714 18.285714 0 1 0 36.571429 0V54.857143a18.102857 18.102857 0 0 0-18.285715-18.285714z m336.457143 139.337142a18.102857 18.102857 0 0 0-25.965714 0l-77.897143 77.897143a18.432 18.432 0 0 0-0.365714 25.965715 18.102857 18.102857 0 0 0 25.965714 0l78.262857-77.897143a18.761143 18.761143 0 0 0 0-25.965715z m-646.948571 0a18.358857 18.358857 0 1 0-25.965715 25.965715l77.897143 77.897143a18.358857 18.358857 0 0 0 25.965715-25.965715zM512.365714 256h-7.68c-4.022857 0.365714-8.045714 0.365714-12.434285 0.731429l-12.068572 1.097142c-4.022857 0.731429-8.411429 1.462857-12.434286 1.828572-4.022857 0.731429-8.045714 1.828571-12.068571 2.56-4.022857 1.097143-8.045714 1.828571-11.702857 2.925714-4.022857 1.097143-8.045714 2.56-12.068572 3.657143-3.657143 1.462857-7.68 2.56-11.337142 4.022857-4.022857 1.462857-7.68 3.291429-11.702858 4.754286-3.657143 1.828571-7.314286 3.291429-10.971428 5.12-3.657143 2.194286-7.314286 4.022857-10.971429 5.851428-3.657143 2.194286-7.314286 4.022857-10.605714 6.217143-3.657143 2.194286-6.948571 4.754286-10.24 6.948572a98.486857 98.486857 0 0 0-9.874286 7.314285l-9.874285 7.68c-2.925714 2.56-6.217143 5.485714-9.142858 8.411429-2.925714 2.56-5.851429 5.485714-8.777142 8.411429s-5.485714 5.851429-8.411429 9.142857c-2.56 2.925714-5.485714 6.217143-8.045714 9.508571s-4.754286 6.217143-7.314286 9.874286c-2.56 3.291429-4.754286 6.582857-6.948571 9.874286-2.194286 3.657143-4.388571 6.948571-6.582858 10.605714s-4.022857 7.314286-5.851428 10.971428l-5.485714 10.971429c-1.828571 3.657143-3.291429 7.314286-5.12 11.337143-1.462857 3.657143-2.925714 7.68-4.388572 11.337143-1.097143 4.022857-2.56 8.045714-3.657143 11.702857l-3.291428 12.068571c-0.731429 4.022857-1.828571 8.045714-2.56 12.068572l-2.194286 12.068571c-0.365714 4.022857-1.097143 8.045714-1.462857 12.434286-0.365714 4.022857-0.731429 8.045714-0.731429 12.068571-0.365714 4.388571-0.365714 8.411429-0.365714 12.434286s0 8.411429 0.365714 12.434286c0 4.388571 0.365714 8.411429 0.731429 12.8 0.365714 4.022857 1.097143 8.045714 1.828571 12.434285 0.365714 4.022857 1.097143 8.045714 1.828572 12.434286 1.097143 4.022857 1.828571 8.045714 2.925714 12.068572l3.291429 12.068571c1.097143 4.022857 2.56 8.045714 4.022857 12.068571s2.925714 7.68 4.388571 11.702858c1.828571 3.657143 3.291429 7.68 5.12 11.337142a110.189714 110.189714 0 0 0 5.851429 11.337143c1.828571 3.657143 4.022857 7.314286 6.217143 10.971429 1.828571 3.657143 4.388571 6.948571 6.582857 10.605714 2.194286 3.291429 4.754286 6.948571 7.314285 10.24l7.68 9.874286c2.56 3.291429 5.485714 6.582857 8.045715 9.508571 2.925714 3.291429 5.851429 6.217143 8.777143 9.142857s5.851429 5.851429 9.142857 8.777143c2.925714 2.56 6.217143 5.485714 9.508571 8.045715l9.874286 7.68c3.291429 2.56 6.948571 5.12 10.24 7.314285 3.657143 2.194286 6.948571 4.754286 10.605714 6.582857 3.657143 2.194286 7.314286 4.388571 10.971429 6.217143a110.189714 110.189714 0 0 0 11.337143 5.851429c3.657143 1.828571 7.68 3.291429 11.337142 5.12 4.022857 1.462857 7.68 2.925714 11.702858 4.388571s8.045714 2.925714 12.068571 4.022857l12.068571 3.291429c4.022857 1.097143 8.045714 1.828571 12.068572 2.925714 4.388571 0.731429 8.411429 1.462857 12.434286 1.828572 4.388571 0.731429 8.411429 1.462857 12.434285 1.828571 4.388571 0.365714 8.411429 0.731429 12.8 0.731429 4.022857 0.365714 8.411429 0.365714 12.434286 0.365714h5.12a256 256 0 0 0-4.754286-512z m-347.062857 238.08H54.857143a18.102857 18.102857 0 0 0-18.285714 18.285714 18.322286 18.322286 0 0 0 18.285714 18.285715h110.445714a18.578286 18.578286 0 0 0 18.285714-18.285715 18.322286 18.322286 0 0 0-18.285714-18.285714z m804.571429 0H859.428571a18.102857 18.102857 0 0 0-18.285714 18.285714 18.322286 18.322286 0 0 0 18.285714 18.285715h110.445715a18.578286 18.578286 0 0 0 18.285714-18.285715 18.322286 18.322286 0 0 0-18.285714-18.285714zM279.771429 744.96a18.102857 18.102857 0 0 0-25.965715 0L175.908571 822.857143a18.358857 18.358857 0 1 0 25.965715 25.965714l77.897143-78.262857a17.664 17.664 0 0 0 0-25.6z m490.788571 0a18.102857 18.102857 0 1 0-25.6 25.6l77.897143 78.262857a18.358857 18.358857 0 0 0 25.965714-25.965714zM512.365714 841.142857a18.102857 18.102857 0 0 0-18.285714 18.285714v110.445715a18.322286 18.322286 0 0 0 18.285714 18.285714 18.578286 18.578286 0 0 0 18.285715-18.285714V859.428571a18.322286 18.322286 0 0 0-18.285715-18.285714z" ></path></symbol><symbol id="iconxiaxue" viewBox="0 0 1024 1024"><path d="M749.714286 292.754286h-2.56a131.401143 131.401143 0 0 0-31.451429 5.12 178.322286 178.322286 0 0 0-6.948571-31.451429 191.670857 191.670857 0 0 0-324.388572-71.314286 167.058286 167.058286 0 0 0-19.748571 25.234286 92.928 92.928 0 0 0-62.171429-23.771428 96.292571 96.292571 0 0 0-96.182857 96.182857c0 0.365714 0.365714 0.731429 0.365714 1.462857a93.842286 93.842286 0 0 0 5.851429 31.451428 109.494857 109.494857 0 0 0-31.085714 6.582858 111.798857 111.798857 0 0 0 38.4 216.137142c0.731429 0 1.097143 0.365714 1.828571 0.365715H749.714286c4.754286 0 9.508571-1.097143 13.897143-1.462857a121.563429 121.563429 0 0 0 32.182857-7.68 127.634286 127.634286 0 0 0-46.08-246.857143z" ></path><path d="M256 658.285714m-36.571429 0a36.571429 36.571429 0 1 0 73.142858 0 36.571429 36.571429 0 1 0-73.142858 0Z" ></path><path d="M512 658.285714m-36.571429 0a36.571429 36.571429 0 1 0 73.142858 0 36.571429 36.571429 0 1 0-73.142858 0Z" ></path><path d="M512 804.571429m-36.571429 0a36.571429 36.571429 0 1 0 73.142858 0 36.571429 36.571429 0 1 0-73.142858 0Z" ></path><path d="M292.571429 804.571429m-36.571429 0a36.571429 36.571429 0 1 0 73.142857 0 36.571429 36.571429 0 1 0-73.142857 0Z" ></path><path d="M731.428571 804.571429m-36.571428 0a36.571429 36.571429 0 1 0 73.142857 0 36.571429 36.571429 0 1 0-73.142857 0Z" ></path><path d="M768 658.285714m-36.571429 0a36.571429 36.571429 0 1 0 73.142858 0 36.571429 36.571429 0 1 0-73.142858 0Z" ></path></symbol><symbol id="iconxiayu" viewBox="0 0 1024 1024"><path d="M747.154286 292.754286a131.401143 131.401143 0 0 0-31.451429 5.12 178.322286 178.322286 0 0 0-6.948571-31.451429 191.670857 191.670857 0 0 0-324.388572-71.314286 167.058286 167.058286 0 0 0-19.748571 25.234286 92.928 92.928 0 0 0-62.171429-23.771428 96.292571 96.292571 0 0 0-96.182857 96.182857c0 0.365714 0.365714 0.731429 0.365714 1.462857a93.842286 93.842286 0 0 0 5.851429 31.451428 109.494857 109.494857 0 0 0-31.085714 6.582858 111.798857 111.798857 0 0 0 38.4 216.137142c0.731429 0 1.097143 0.365714 1.828571 0.365715H749.714286c4.754286 0 9.508571-1.097143 13.897143-1.462857a121.563429 121.563429 0 0 0 32.182857-7.68 127.634286 127.634286 0 0 0-46.08-246.857143zM256 640.182857v256a18.285714 18.285714 0 0 0 36.571429 0v-256a18.285714 18.285714 0 0 0-36.571429 0z m146.285714 0v146.285714a18.285714 18.285714 0 0 0 36.571429 0v-146.285714a18.285714 18.285714 0 0 0-36.571429 0z m146.285715 0v256a18.285714 18.285714 0 0 0 36.571428 0v-256a18.285714 18.285714 0 1 0-36.571428 0z m146.285714 0v146.285714a18.285714 18.285714 0 0 0 36.571428 0v-146.285714a18.285714 18.285714 0 1 0-36.571428 0z" ></path></symbol><symbol id="iconduoyun" viewBox="0 0 1024 1024"><path d="M415.890286 175.433143v-63.268572a15.908571 15.908571 0 1 0-31.817143 0v63.268572a15.908571 15.908571 0 0 0 31.817143 0z m-186.148572 63.634286l-44.617143-44.617143a16.054857 16.054857 0 1 0-22.674285 22.674285l44.617143 44.617143a16.018286 16.018286 0 0 0 22.674285-22.674285z m407.771429-21.942858a16.054857 16.054857 0 1 0-22.674286-22.674285l-44.617143 44.617143a16.018286 16.018286 0 0 0 22.674286 22.674285z m-101.668572 103.131429a175.762286 175.762286 0 0 0-287.817142 200.045714 180.992 180.992 0 0 1 44.617142-7.68 240.420571 240.420571 0 0 1 235.52-192.731428c2.56 0 5.12 0.365714 7.68 0.365714z m194.56 192.365714a208.018286 208.018286 0 0 0-134.217142-148.845714 196.278857 196.278857 0 0 0-38.4-9.142857 202.459429 202.459429 0 0 0-29.622858-2.56 207.908571 207.908571 0 0 0-202.605714 160.914286 186.294857 186.294857 0 0 0-4.754286 31.817142c-5.485714-0.365714-10.971429-0.731429-16.822857-0.731428-5.12 0-10.24 0.365714-15.36 0.731428a177.664 177.664 0 0 0-20.114285 3.657143 182.089143 182.089143 0 0 0-32.914286 10.24 174.811429 174.811429 0 0 0-31.817143 305.371429 167.058286 167.058286 0 0 0 84.114286 31.085714c5.485714 0.365714 16.091429 0.731429 32.182857 0.731429h384c16.091429 0 26.697143-0.365714 31.817143-0.731429a164.571429 164.571429 0 0 0 84.114285-31.085714 175.286857 175.286857 0 0 0-52.297142-313.417143 189.330286 189.330286 0 0 0-32.548572-5.851429 227.254857 227.254857 0 0 0-4.754286-32.182857z m-650.24-96.548571a15.908571 15.908571 0 1 0 0 31.817143h63.268572a15.908571 15.908571 0 0 0 0-31.817143z" ></path></symbol><symbol id="iconshitu" viewBox="0 0 1024 1024"><path d="M218.432 665.472l266.688 159.104a52.352 52.352 0 0 0 53.76 0l266.624-159.104A54.784 54.784 0 0 0 832 618.368V277.76a54.784 54.784 0 0 0-26.496-47.104L538.88 71.424a52.288 52.288 0 0 0-53.76 0L218.496 230.528A54.784 54.784 0 0 0 192 277.632v340.736a54.784 54.784 0 0 0 26.432 47.104zM768 612.736l-224 133.952v-294.4L768 316.736zM512.256 129.792l217.024 129.536L512.256 390.4l-217.6-130.816z m-256.448 187.52L480 452.16v294.528l-224.192-133.76z" ></path><path d="M913.92 679.552a32 32 0 1 0-42.112 48.128 60.8 60.8 0 0 1 24.192 40.448c0 53.44-146.112 128-384 128s-384-74.56-384-128a60.352 60.352 0 0 1 24.128-40.32 32 32 0 1 0-41.984-48.256A116.736 116.736 0 0 0 64 768.128c0 124.672 230.784 192 448 192s448-67.328 448-192a116.928 116.928 0 0 0-46.08-88.576z" ></path></symbol><symbol id="iconqingxiedantihua" viewBox="0 0 1024 1024"><path d="M800 896H768V384a64 64 0 0 0-64-64V256a64 64 0 0 0-64-64H544.576V95.872a32 32 0 0 0-64 0V192H384a64 64 0 0 0-64 64v64a64 64 0 0 0-64 64v512h-32a32 32 0 0 0 0 64h576a32 32 0 0 0 0-64zM384 256h256v64H384zM320 896V384h384v512z" ></path><path d="M608.704 704H416.448a32 32 0 0 0 0 64H608.64a32 32 0 0 0 0-64zM608.704 512H416.448a32 32 0 0 0 0 64H608.64a32 32 0 0 0 0-64z" ></path></symbol><symbol id="icontianjia_xuanzhong" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 0 448 448 448 448 0 0 0-448-448z m226.496 479.744l-5.76 0.576L544 544.256v188.8a32 32 0 0 1-63.488 5.76l-0.512-5.76v-188.8H291.264a32 32 0 0 1-5.76-63.424l5.76-0.512L480 480.192V291.584a32 32 0 0 1 63.488-5.76l0.512 5.76v188.672h188.736a32 32 0 0 1 5.76 63.488z" ></path></symbol><symbol id="iconsanweifenxi_xuanzhong1" viewBox="0 0 1024 1024"><path d="M864.256 263.936l-320-190.976a62.72 62.72 0 0 0-64.512 0l-320 190.912A65.792 65.792 0 0 0 128 320.384v383.232c-0.128 23.104 11.968 44.608 31.744 56.576l320 190.912a62.784 62.784 0 0 0 64.512 0l320-190.912c19.84-11.968 31.872-33.472 31.744-56.576V320.512a65.792 65.792 0 0 0-31.744-56.576zM512 474.816L223.68 301.504 512 129.536l287.68 171.648L512 474.816z" ></path></symbol><symbol id="icontucengfengge" viewBox="0 0 1024 1024"><path d="M142.4 327.488l352 196.928a35.968 35.968 0 0 0 35.2 0l352-196.928a36.032 36.032 0 0 0-0.128-62.848l-352-195.84a35.968 35.968 0 0 0-34.944 0l-352 195.84a35.968 35.968 0 0 0-0.064 62.848zM512 141.44l278.144 154.752L512 451.712l-278.08-155.52zM864 576a32 32 0 0 0-32 32v256a32 32 0 0 0 64 0v-256a32 32 0 0 0-32-32zM928 449.088c-3.584-10.624-44.224-6.784-44.224-6.784s-8.128-42.112-19.776-42.112-19.776 42.112-19.776 42.112-40.64-3.84-44.224 6.784c-3.648 10.88 32 32.768 32 32.768s-17.152 39.552-7.552 46.336c9.216 6.464 39.552-21.888 39.552-21.888s30.336 28.352 39.552 21.888c9.6-6.784-7.552-46.336-7.552-46.336s35.584-21.952 32-32.768z" ></path><path d="M714.24 561.92l-201.408 109.952-0.832 0.192-330.56-180.352a36.032 36.032 0 1 0-34.88 62.976l0.384 0.192 347.84 189.76a35.968 35.968 0 0 0 34.432 0l220.544-120.192a35.904 35.904 0 0 0-35.456-62.464z" ></path><path d="M714.24 774.976l-201.408 109.888L512 885.12 181.44 704.64a36.032 36.032 0 1 0-34.88 62.976l0.384 0.256 347.84 189.76a35.968 35.968 0 0 0 34.432 0l220.544-120.192a35.904 35.904 0 0 0-35.456-62.528z" ></path></symbol><symbol id="iconchangjing_xuanzhong" viewBox="0 0 1024 1024"><path d="M384 128H192c-35.328 0-64 28.672-64 64v192c0 35.328 28.672 64 64 64h192c35.328 0 64-28.672 64-64V192c0-35.328-28.672-64-64-64zM384 576H192c-35.328 0-64 28.672-64 64v192c0 35.328 28.672 64 64 64h192c35.328 0 64-28.672 64-64v-192c0-35.328-28.672-64-64-64zM916.992 242.752l-135.68-135.744a64.064 64.064 0 0 0-90.56 0l-135.744 135.68a64 64 0 0 0 0 90.56l135.68 135.744a64 64 0 0 0 90.56 0l135.744-135.68c24.96-25.088 24.96-65.536 0-90.56zM832 576h-192c-35.328 0-64 28.672-64 64v192c0 35.328 28.672 64 64 64h192c35.328 0 64-28.672 64-64v-192c0-35.328-28.672-64-64-64z" ></path></symbol><symbol id="iconliangsuan_xuanzhong" viewBox="0 0 1024 1024"><path d="M940.16 264.512L759.488 83.84a64.256 64.256 0 0 0-90.88 0L80.64 671.808a64.256 64.256 0 0 0 0 90.88l180.736 180.672a64.192 64.192 0 0 0 90.816 0l587.968-588.032a64.256 64.256 0 0 0 0-90.752z m-561.024 473.152a32 32 0 0 1-45.248 0L219.52 623.36l45.312-45.248 114.24 114.24a32 32 0 0 1 0 45.248z m179.84-179.84a32 32 0 0 1-45.248 0L399.552 443.52l45.248-45.248 114.24 114.176a32 32 0 0 1 0 45.248z m179.904-179.968a32 32 0 0 1-45.248 0L579.456 263.68l45.312-45.184 114.112 114.112a32 32 0 0 1 0 45.248z" ></path></symbol><symbol id="iconhuizhi_xuanzhong" viewBox="0 0 1024 1024"><path d="M864 832h-704a32 32 0 0 0 0 64h704a32 32 0 0 0 0-64zM288 768h140.16a32 32 0 0 0 22.72-9.472l436.992-440.256a32 32 0 0 0-0.064-45.12L752 137.408a32.064 32.064 0 0 0-45.12-0.128L265.472 574.272A32 32 0 0 0 256 597.12V736a32 32 0 0 0 32 32z m393.344-515.84l91.52 91.52-45.248 45.184-91.52-91.52z" ></path></symbol><symbol id="iconliangsuan" viewBox="0 0 1024 1024"><path d="M940.8 262.4l-179.2-179.2c-25.6-25.6-64-25.6-89.6 0l-588.8 588.8c-25.6 25.6-25.6 64 0 89.6l179.2 179.2c25.6 25.6 64 25.6 89.6 0l588.8-588.8c25.6-19.2 25.6-64 0-89.6zM307.2 896L128 716.8l96-96 115.2 115.2c12.8 12.8 32 12.8 44.8 0s12.8-32 0-44.8L262.4 576l134.4-134.4L512 556.8c12.8 12.8 32 12.8 44.8 0s12.8-32 0-44.8L448 396.8l134.4-134.4 115.2 115.2c12.8 12.8 32 12.8 44.8 0 12.8-12.8 12.8-32 0-44.8L627.2 217.6 716.8 128 896 307.2 307.2 896z" ></path></symbol><symbol id="icona-0" viewBox="0 0 1024 1024"><path d="M512.010667 888.138667C409.045333 790.464 202.666667 567.242667 202.666667 434.421333a309.333333 309.333333 0 0 1 618.666666 0C821.333333 567.36 614.965333 790.506667 512.010667 888.138667z" fill="#FFFFFF" ></path><path d="M512 157.088a277.653333 277.653333 0 0 1 277.333333 277.333333c0 103.68-155.797333 290.56-277.354666 409.44C390.432 725.077333 234.666667 538.293333 234.666667 434.421333a277.653333 277.653333 0 0 1 277.333333-277.333333m0-64a341.333333 341.333333 0 0 0-341.333333 341.333333c0 188.522667 341.333333 497.376 341.333333 497.376s341.333333-308.853333 341.333333-497.376a341.333333 341.333333 0 0 0-341.333333-341.333333z" fill="#D4000F" ></path><path d="M512 85.781333A347.285333 347.285333 0 0 0 164.714667 433.066667C164.714667 624.864 512 939.114667 512 939.114667S859.285333 624.874667 859.285333 433.066667A347.285333 347.285333 0 0 0 512 85.781333zM511.978667 851.2C388.053333 730.229333 228.714667 539.285333 228.714667 433.066667a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.370667 297.066667-283.306666 418.133333z" fill="#D4000F" ></path><path d="M516.810667 289.205333a102.058667 102.058667 0 0 0-89.173334 44.16q-30.805333 44.181333-30.826666 127.925334 0 161.674667 113.749333 161.664a99.296 99.296 0 0 0 87.296-44.053334q30.218667-44.064 30.208-125.109333 0-164.586667-111.253333-164.586667z m-4.16 282.090667q-47.690667 0-47.712-111.68 0-118.741333 48.96-118.741333 45.621333 0 45.621333 115.413333 0 115.008-46.88 115.008z" fill="#D4000F" ></path></symbol><symbol id="icona-7_1" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#EF633F" ></path><path d="M370.634667 370.805333H552.64l-138.752 320.746667h85.248L637.888 340.8v-36.501333H370.634667v66.506666z" fill="#EF633F" ></path></symbol><symbol id="icona-0_1" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#EF633F" ></path><path d="M517.621333 292.832a122.421333 122.421333 0 0 0-106.986666 53.002667q-37.013333 53.002667-37.013334 153.493333Q373.621333 693.333333 510.122667 693.333333a119.189333 119.189333 0 0 0 104.746666-52.874666q36.256-52.874667 36.256-150.122667 0-197.504-133.504-197.504z m-4.992 338.506667q-57.248 0-57.258666-134.005334 0-142.506667 58.752-142.506666 54.752 0 54.752 138.506666 0 138.005333-56.245334 138.005334z" fill="#EF633F" ></path></symbol><symbol id="icona-2_1" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#EF633F" ></path><path d="M547.626667 550.048q82.506667-74.496 82.506666-142.496a101.205333 101.205333 0 0 0-33.493333-80.629333q-33.504-29.12-90.752-29.12a199.786667 199.786667 0 0 0-113.002667 33.002666v71.744a146.56 146.56 0 0 1 96.245334-40q59.253333 0 59.253333 55.253334A88.917333 88.917333 0 0 1 534.4 465.066667a311.466667 311.466667 0 0 1-49.002667 56.256L374.133333 628.053333v63.498667h252.501334v-67.253333H466.88v-1.493334z" fill="#EF633F" ></path></symbol><symbol id="icona-1_1" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#EF633F" ></path><path d="M552.384 297.557333L388.64 332.053333v66.250667l82.997333-18.752V627.306667h-80.746666v64.245333H632.64V627.306667h-80.256V297.557333z" fill="#EF633F" ></path></symbol><symbol id="icona-parkinglot" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#3B97D3" ></path><path d="M565.269333 309.290667H405.472v437.333333h64V574.442667h95.786667a131.136 131.136 0 0 0 128.213333-130.56c0-71.701333-59.914667-134.592-128.213333-134.592z m0 201.141333h-95.797333V373.290667h95.786667c33.002667 0 64.213333 34.304 64.213333 70.581333a67.125333 67.125333 0 0 1-64.213333 66.56z" fill="#3B97D3" ></path></symbol><symbol id="icona-gasstation" viewBox="0 0 1024 1024"><path d="M149.333333 138.666667h469.333334v746.666666H149.333333z" fill="#FFFFFF" ></path><path d="M249.888 458.666667h268.224V245.237333H249.888z m64-149.429334h140.224V394.666667H313.888z" fill="#3B72AB" ></path><path d="M782.325333 123.744L743.893333 174.933333l131.210667 98.538667v462.442667H800v-341.12H640V85.333333H128v789.333334H85.333333v64h597.333334v-64h-42.666667V458.794667h96v341.12h203.104V241.482667zM192 874.666667V149.333333h384v725.333334z" fill="#3B72AB" ></path></symbol><symbol id="icona-9" viewBox="0 0 1024 1024"><path d="M832 439.296C832 616.053333 512 905.6 512 905.6S192 616.032 192 439.296a320 320 0 0 1 640 0z" fill="#FFFFFF" ></path><path d="M512 85.781333A347.285333 347.285333 0 0 0 164.714667 433.066667C164.714667 624.864 512 939.114667 512 939.114667S859.285333 624.874667 859.285333 433.066667A347.285333 347.285333 0 0 0 512 85.781333zM511.978667 851.2C388.053333 730.229333 228.714667 539.285333 228.714667 433.066667a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.370667 297.066667-283.306666 418.133333z" fill="#D4000F" ></path><path d="M511.189333 289.205333a109.802667 109.802667 0 0 0-81.450666 31.466667 111.178667 111.178667 0 0 0-31.253334 81.866667 101.088 101.088 0 0 0 25.930667 71.146666 85.845333 85.845333 0 0 0 66.144 28.234667 72.746667 72.746667 0 0 0 65.632-32.714667l1.248 0.426667q-1.674667 101.664-79.786667 101.653333a109.696 109.696 0 0 1-60.832-16.661333v56.042667a169.109333 169.109333 0 0 0 66.88 12.288q67.498667 0 103.434667-49.162667t35.946667-133.76q0-71.253333-29.792-111.04a96.896 96.896 0 0 0-82.101334-39.786667zM542.336 437.333333a40.32 40.32 0 0 1-31.562667 13.962667 42.069333 42.069333 0 0 1-33.856-14.592 60.16 60.16 0 0 1-12.394666-40.213333 63.552 63.552 0 0 1 12.192-39.573334 38.698667 38.698667 0 0 1 32.394666-16.042666 38.186667 38.186667 0 0 1 33.226667 18.538666 76.170667 76.170667 0 0 1 12.394667 43.338667A50.197333 50.197333 0 0 1 542.336 437.333333z" fill="#D4000F" ></path></symbol><symbol id="icona-5_1" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#EF633F" ></path><path d="M501.888 450.56a270.709333 270.709333 0 0 0-32.245333 1.738667v-81.493334h141.738666v-66.506666H400.138667v213.76a566.890667 566.890667 0 0 1 63.498666-4.501334q83.253333 0 83.253334 59.989334a56.789333 56.789333 0 0 1-20 46.005333 81.44 81.44 0 0 1-54.005334 16.746667 158.069333 158.069333 0 0 1-83.989333-24.746667v70.005333a222.293333 222.293333 0 0 0 92.490667 16.746667q67.008 0 107.381333-35.626667a121.738667 121.738667 0 0 0 40.362667-96.128 108.490667 108.490667 0 0 0-34.485334-85.002666 133.589333 133.589333 0 0 0-92.757333-30.997334z" fill="#EF633F" ></path></symbol><symbol id="iconcaution" viewBox="0 0 1024 1024"><path d="M484.16 137.12L133.045333 734.4a32.832 32.832 0 0 0 27.84 50.24h702.24a32.832 32.832 0 0 0 27.84-50.24L539.84 137.12a32.832 32.832 0 0 0-55.68 0z" fill="#FFFFFF" ></path><path d="M932.522667 765.248L542.890667 102.453333a36.426667 36.426667 0 0 0-61.781334 0L91.477333 765.248a36.426667 36.426667 0 0 0 30.890667 55.733333h779.264a36.426667 36.426667 0 0 0 30.890667-55.733333z m-761.941334-8.266667L512 176.202667l341.418667 580.8z" fill="#D4000F" ></path><path d="M512.128 650.666667a31.253333 31.253333 0 0 0-22.666667 9.269333 32.021333 32.021333 0 0 0-0.245333 45.205333 32.085333 32.085333 0 0 0 24.149333 9.525334 28.928 28.928 0 0 0 21.418667-9.525334 31.573333 31.573333 0 0 0-0.245333-44.821333A30.346667 30.346667 0 0 0 512.128 650.666667zM490.624 608h42.666667l10.602666-277.269333h-63.786666L490.624 608z" fill="#D4000F" ></path></symbol><symbol id="iconhospital" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" opacity=".2" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#D4000F" ></path><path d="M544 255.904h-64V480H256v64h224v223.904h64V544h224v-64H544V255.904z" fill="#D4000F" ></path></symbol><symbol id="icona-7" viewBox="0 0 1024 1024"><path d="M853.333333 434.421333c0 188.522667-341.333333 497.376-341.333333 497.376S170.666667 622.944 170.666667 434.421333a341.333333 341.333333 0 0 1 682.666666 0z" fill="#FFFFFF" ></path><path d="M512 85.781333A347.285333 347.285333 0 0 0 164.714667 433.066667C164.714667 624.864 512 939.114667 512 939.114667S859.285333 624.874667 859.285333 433.066667A347.285333 347.285333 0 0 0 512 85.781333z m0 765.397334C388.064 730.112 228.714667 539.093333 228.714667 433.066667a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.36 297.045333-283.285333 418.112z" fill="#D4000F" ></path><path d="M402.026667 350.037333h151.669333l-115.626667 267.296h71.04l115.626667-292.288v-30.421333H402.026667v55.413333z" fill="#D4000F" ></path></symbol><symbol id="icona-3" viewBox="0 0 1024 1024"><path d="M832 438.858667c0 176.725333-320 466.282667-320 466.282666S192 615.584 192 438.858667a320 320 0 0 1 640 0z" fill="#FFFFFF" ></path><path d="M512 85.333333a347.285333 347.285333 0 0 0-347.285333 347.285334C164.714667 624.426667 512 938.666667 512 938.666667s347.285333-314.24 347.285333-506.048A347.285333 347.285333 0 0 0 512 85.333333z m-0.021333 765.418667c-123.925333-120.96-283.264-311.904-283.264-418.133333a283.285333 283.285333 0 1 1 566.570666 0c0 106.026667-159.370667 297.066667-283.306666 418.133333z" fill="#D4000F" ></path><path d="M542.858667 449.173333v-1.045333q64.170667-16.245333 64.170666-79.573333a68.896 68.896 0 0 0-28.544-58.656 121.866667 121.866667 0 0 0-74.378666-21.141334 168.469333 168.469333 0 0 0-78.538667 17.290667v55.626667a109.408 109.408 0 0 1 63.125333-21.248q49.792 0 49.792 41.248 0 43.754667-65.002666 43.754666h-26.453334v51.872h28.746667a99.712 99.712 0 0 1 53.44 12.085334 38.986667 38.986667 0 0 1 19.061333 34.997333 40.469333 40.469333 0 0 1-16.042666 34.378667 70.346667 70.346667 0 0 1-43.328 12.085333 122.378667 122.378667 0 0 1-75.413334-24.170667v59.370667a168.522667 168.522667 0 0 0 80.213334 16.458667 143.434667 143.434667 0 0 0 89.685333-25.824 85.493333 85.493333 0 0 0 33.632-71.882667 70.634667 70.634667 0 0 0-20.202667-50.933333 85.290667 85.290667 0 0 0-53.962666-24.693334z" fill="#D4000F" ></path></symbol><symbol id="iconhot" viewBox="0 0 1024 1024"><path d="M853.333333 433.984c0 188.512-341.333333 497.365333-341.333333 497.365333S170.666667 622.506667 170.666667 433.984a341.333333 341.333333 0 0 1 682.666666 0z" fill="#FFFFFF" ></path><path d="M512 85.333333a347.285333 347.285333 0 0 0-347.285333 347.285334C164.714667 624.426667 512 938.666667 512 938.666667s347.285333-314.24 347.285333-506.048A347.285333 347.285333 0 0 0 512 85.333333z m-0.021333 765.418667c-123.925333-120.96-283.264-311.904-283.264-418.133333a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.370667 297.066667-283.306666 418.133333z" fill="#EF633F" ></path><path d="M564.736 368.362667L512 256l-52.736 112.362667L341.333333 386.378667l85.333334 87.456L406.517333 597.333333 512 539.029333 617.482667 597.333333 597.333333 473.834667l85.333334-87.456-117.930667-18.016z" fill="#EF633F" ></path></symbol><symbol id="icona-8_1" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#EF633F" ></path><path d="M555.637333 489.546667v-0.992q73.248-30.752 73.248-94.250667a83.498667 83.498667 0 0 0-34.741333-70.378667 143.658667 143.658667 0 0 0-88.746667-26.133333 142.528 142.528 0 0 0-89.877333 28.138667 89.173333 89.173333 0 0 0-36.373333 74.122666q0 61.002667 66.997333 88.746667v1.248q-78.752 33.002667-78.752 102.997333a92.341333 92.341333 0 0 0 36.373333 76.874667 146.112 146.112 0 0 0 92.629334 28.373333q65.248 0 103.872-28.618666a95.264 95.264 0 0 0 38.624-81.386667 92.394667 92.394667 0 0 0-21.866667-60.490667 122.186667 122.186667 0 0 0-61.386667-38.250666zM470.261333 369.173333a50.666667 50.666667 0 0 1 34.624-12.629333 49.312 49.312 0 0 1 34.634667 12 42.165333 42.165333 0 0 1 13.12 32.746667q0 37.76-48.256 57.749333-48.490667-19.488-48.490667-57.493333a41.141333 41.141333 0 0 1 14.368-32.373334z m75.498667 256.746667a71.008 71.008 0 0 1-84.490667-0.629333 45.12 45.12 0 0 1-17.386666-36.490667q0-45.248 56.746666-67.498667 61.76 21.248 61.76 67.253334a45.717333 45.717333 0 0 1-16.618666 37.376z" fill="#EF633F" ></path></symbol><symbol id="icona-4_1" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#EF633F" ></path><path d="M598.890667 304.298667h-80.501334L354.890667 555.552v51.498667h170.24v84.501333h73.76v-84.501333h46.997333v-57.994667h-46.997333z m-73.749334 117.76v126.997333h-102.005333l87.008-134.005333a110.986667 110.986667 0 0 0 9.493333-17.749334q3.008-7.754667 5.013334-12.501333h1.493333q-1.002667 21.002667-1.002667 37.248z" fill="#EF633F" ></path></symbol><symbol id="icona-8" viewBox="0 0 1024 1024"><path d="M832 439.296C832 616.053333 512 905.6 512 905.6S192 616.032 192 439.296a320 320 0 0 1 640 0z" fill="#FFFFFF" ></path><path d="M512 85.781333A347.285333 347.285333 0 0 0 164.714667 433.066667C164.714667 624.864 512 939.114667 512 939.114667S859.285333 624.874667 859.285333 433.066667A347.285333 347.285333 0 0 0 512 85.781333zM511.978667 851.2C388.053333 730.229333 228.714667 539.285333 228.714667 433.066667a283.285333 283.285333 0 1 1 566.570666 0c0 106.026667-159.370667 297.066667-283.306666 418.133333z" fill="#D4000F" ></path><path d="M556.192 449.002667v-0.832q61.045333-25.632 61.045333-78.549334a69.610667 69.610667 0 0 0-28.96-58.645333 119.733333 119.733333 0 0 0-73.962666-21.76 118.784 118.784 0 0 0-74.890667 23.424 74.314667 74.314667 0 0 0-30.314667 61.781333q0 50.837333 55.829334 73.952v1.045334q-65.621333 27.498667-65.621334 85.834666a76.938667 76.938667 0 0 0 30.314667 64.064 121.706667 121.706667 0 0 0 77.184 23.648 142.186667 142.186667 0 0 0 86.56-23.861333 79.370667 79.370667 0 0 0 32.192-67.808 76.992 76.992 0 0 0-18.229333-50.421333 101.866667 101.866667 0 0 0-51.146667-31.872z m-71.146667-100.309334a42.24 42.24 0 0 1 28.853334-10.528 41.088 41.088 0 0 1 28.853333 10.005334 35.146667 35.146667 0 0 1 10.944 27.285333q0 31.466667-40.213333 48.128-40.426667-16.245333-40.426667-47.914667a34.282667 34.282667 0 0 1 11.989333-26.976z m62.922667 213.952a59.168 59.168 0 0 1-70.421333-0.522666 37.578667 37.578667 0 0 1-14.474667-30.410667q0-37.706667 47.285333-56.256 51.456 17.717333 51.456 56.042667a38.08 38.08 0 0 1-13.845333 31.146666z" fill="#D4000F" ></path></symbol><symbol id="icona-6" viewBox="0 0 1024 1024"><path d="M832 438.858667c0 176.725333-320 466.282667-320 466.282666S192 615.584 192 438.858667a320 320 0 0 1 640 0z" fill="#FFFFFF" ></path><path d="M512 85.333333a347.285333 347.285333 0 0 0-347.285333 347.285334C164.714667 624.426667 512 938.666667 512 938.666667s347.285333-314.24 347.285333-506.048A347.285333 347.285333 0 0 0 512 85.333333z m-0.021333 765.418667c-123.925333-120.96-283.264-311.904-283.264-418.133333a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.370667 297.066667-283.306666 418.133333z" fill="#D4000F" ></path><path d="M539.946667 410.005333a76.576 76.576 0 0 0-68.554667 35.413334h-1.248a121.28 121.28 0 0 1 22.4-75.733334 71.424 71.424 0 0 1 59.690667-29.269333 106.581333 106.581333 0 0 1 53.546666 13.962667V297.493333a154.005333 154.005333 0 0 0-57.706666-8.746666 125.290667 125.290667 0 0 0-106.368 51.146666q-38.218667 51.157333-38.229334 133.013334 0 69.6 29.482667 109.589333a99.050667 99.050667 0 0 0 84.896 40 106.133333 106.133333 0 0 0 79.370667-31.765333 110.421333 110.421333 0 0 0 31.04-80.522667 107.232 107.232 0 0 0-23.850667-72.394667 80.565333 80.565333 0 0 0-64.48-27.818666z m10.410666 144.8a38.24 38.24 0 0 1-32.501333 16.042667 38.645333 38.645333 0 0 1-32.917333-17.504 71.2 71.2 0 0 1-12.501334-42.496 53.6 53.6 0 0 1 12.394667-36.256 40.992 40.992 0 0 1 32.608-14.378667q44.810667 0 44.8 54.378667a65.717333 65.717333 0 0 1-11.882667 40.213333z" fill="#D4000F" ></path></symbol><symbol id="icona-3_1" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#EF633F" ></path><path d="M539.637333 490.304v-1.248q77.013333-19.498667 77.013334-95.498667a82.666667 82.666667 0 0 0-34.261334-70.378666 146.186667 146.186667 0 0 0-89.248-25.386667 202.069333 202.069333 0 0 0-94.250666 20.757333v66.752a131.296 131.296 0 0 1 75.754666-25.493333q59.744 0 59.744 49.493333 0 52.501333-77.994666 52.501334H424.64v62.250666h34.496a119.605333 119.605333 0 0 1 64.128 14.506667 46.762667 46.762667 0 0 1 22.88 41.994667 48.576 48.576 0 0 1-19.253333 41.248 84.458667 84.458667 0 0 1-52 14.506666 146.88 146.88 0 0 1-90.496-29.013333v71.253333a202.186667 202.186667 0 0 0 96.245333 19.754667q67.253333 0 107.626667-30.997333a102.592 102.592 0 0 0 40.373333-86.250667 84.746667 84.746667 0 0 0-24.245333-61.12 102.368 102.368 0 0 0-64.746667-29.632z" fill="#EF633F" ></path></symbol><symbol id="iconorientation_1" viewBox="0 0 1024 1024"><path d="M832 438.858667c0 176.725333-320 466.282667-320 466.282666S192 615.584 192 438.858667a320 320 0 0 1 640 0z" fill="#FF6700" ></path><path d="M512 149.333333a283.605333 283.605333 0 0 1 283.285333 283.285334c0 106.026667-159.370667 297.066667-283.306666 418.133333-123.925333-120.970667-283.264-311.914667-283.264-418.133333A283.605333 283.605333 0 0 1 512 149.333333m0-64a347.285333 347.285333 0 0 0-347.285333 347.285334C164.714667 624.426667 512 938.666667 512 938.666667s347.285333-314.24 347.285333-506.048A347.285333 347.285333 0 0 0 512 85.333333z" fill="#FFFFFF" ></path><path d="M512 426.666667m-170.666667 0a170.666667 170.666667 0 1 0 341.333334 0 170.666667 170.666667 0 1 0-341.333334 0Z" fill="#FFFFFF" ></path><path d="M512 320a106.666667 106.666667 0 1 1-106.666667 106.666667 106.784 106.784 0 0 1 106.666667-106.666667m0-64a170.666667 170.666667 0 1 0 170.666667 170.666667 170.666667 170.666667 0 0 0-170.666667-170.666667z" fill="#D4000F" ></path></symbol><symbol id="icona-6_1" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#EF633F" ></path><path d="M536.138667 443.306667a91.861333 91.861333 0 0 0-82.250667 42.496h-1.493333a145.408 145.408 0 0 1 26.88-90.88 85.664 85.664 0 0 1 71.616-35.114667 127.904 127.904 0 0 1 64.245333 16.746667v-68.256a184.906667 184.906667 0 0 0-69.248-10.496 150.314667 150.314667 0 0 0-127.626667 61.376q-45.866667 61.376-45.866666 159.626666 0 83.498667 35.370666 131.498667t101.866667 48a127.413333 127.413333 0 0 0 95.253333-38.122667 132.586667 132.586667 0 0 0 37.248-96.629333 128.746667 128.746667 0 0 0-28.629333-86.88 96.682667 96.682667 0 0 0-77.365333-33.365333z m12.501333 173.749333a45.898667 45.898667 0 0 1-39.008 19.253333 46.368 46.368 0 0 1-39.498667-21.002666 85.44 85.44 0 0 1-14.997333-50.997334 64.234667 64.234667 0 0 1 14.88-43.498666 49.152 49.152 0 0 1 39.114667-17.258667q53.76 0 53.76 65.258667a78.890667 78.890667 0 0 1-14.250667 48.245333z" fill="#EF633F" ></path></symbol><symbol id="icona-2" viewBox="0 0 1024 1024"><path d="M832 438.858667c0 176.725333-320 466.282667-320 466.282666S192 615.584 192 438.858667a320 320 0 0 1 640 0z" fill="#FFFFFF" ></path><path d="M512 85.333333a347.285333 347.285333 0 0 0-347.285333 347.285334C164.714667 624.426667 512 938.666667 512 938.666667s347.285333-314.24 347.285333-506.048A347.285333 347.285333 0 0 0 512 85.333333z m0 765.408c-123.936-121.088-283.285333-312.106667-283.285333-418.122666a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.36 297.045333-283.285333 418.122666z" fill="#D4000F" ></path><path d="M549.525333 498.965333q68.746667-62.08 68.746667-118.741333a84.341333 84.341333 0 0 0-27.914667-67.2 111.328 111.328 0 0 0-75.626666-24.266667 166.485333 166.485333 0 0 0-94.165334 27.498667v59.797333a122.165333 122.165333 0 0 1 80.213334-33.333333q49.376 0 49.376 46.037333a74.058667 74.058667 0 0 1-11.669334 39.381334 259.093333 259.093333 0 0 1-40.832 46.869333l-92.704 88.96v52.917333H615.36v-56.042666H482.24v-1.248z" fill="#D4000F" ></path></symbol><symbol id="icona-10" viewBox="0 0 1024 1024"><path d="M832 439.296C832 616.053333 512 905.6 512 905.6S192 616.032 192 439.296a320 320 0 0 1 640 0z" fill="#FFFFFF" ></path><path d="M512 85.781333A347.285333 347.285333 0 0 0 164.714667 433.066667C164.714667 624.864 512 939.114667 512 939.114667S859.285333 624.874667 859.285333 433.066667A347.285333 347.285333 0 0 0 512 85.781333zM511.978667 851.2C388.053333 730.229333 228.714667 539.285333 228.714667 433.066667a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.370667 297.066667-283.306666 418.133333z" fill="#D4000F" ></path><path d="M434.976 318.250667l-116 24.437333v46.922667l58.794667-13.28v175.488h-57.184V597.333333h171.221333v-45.514666h-56.832V318.250667zM627.456 318.421333a86.730667 86.730667 0 0 0-75.786667 37.546667q-26.186667 37.546667-26.208 108.736 0 137.418667 96.682667 137.418667a84.458667 84.458667 0 0 0 74.208-37.450667q25.653333-37.472 25.664-106.346667 0.010667-139.893333-94.56-139.904z m-3.541333 239.786667q-40.533333 0-40.533334-94.933333 0-100.928 41.6-100.928 38.773333 0 38.784 98.101333 0 97.749333-39.850666 97.749333z" fill="#D4000F" ></path></symbol><symbol id="icona-4" viewBox="0 0 1024 1024"><path d="M853.333333 433.984c0 188.512-341.333333 497.365333-341.333333 497.365333S170.666667 622.506667 170.666667 433.984a341.333333 341.333333 0 0 1 682.666666 0z" fill="#FFFFFF" ></path><path d="M512 85.333333a347.285333 347.285333 0 0 0-347.285333 347.285334C164.714667 624.426667 512 938.666667 512 938.666667s347.285333-314.24 347.285333-506.048A347.285333 347.285333 0 0 0 512 85.333333z m-0.021333 765.418667c-123.925333-120.96-283.264-311.904-283.264-418.133333a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.370667 297.066667-283.306666 418.133333z" fill="#D4000F" ></path><path d="M592.234667 294.186667h-67.093334L388.906667 503.541333v42.912h141.866666v70.421334h61.461334v-70.421334h39.168V498.133333h-39.168z m-61.461334 98.112V498.133333h-84.992l72.490667-111.669333a92.405333 92.405333 0 0 0 7.925333-14.794667q2.496-6.442667 4.16-10.410666h1.248q-0.821333 17.493333-0.832 31.04z" fill="#D4000F" ></path></symbol><symbol id="icona-1" viewBox="0 0 1024 1024"><path d="M832 438.858667c0 176.725333-320 466.282667-320 466.282666S192 615.584 192 438.858667a320 320 0 0 1 640 0z" fill="#FFFFFF" ></path><path d="M512 85.333333a347.285333 347.285333 0 0 0-347.285333 347.285334C164.714667 624.426667 512 938.666667 512 938.666667s347.285333-314.24 347.285333-506.048A347.285333 347.285333 0 0 0 512 85.333333z m-0.021333 765.418667c-123.925333-120.96-283.264-311.904-283.264-418.133333a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.370667 297.066667-283.306666 418.133333z" fill="#D4000F" ></path><path d="M553.482667 288.554667l-136.458667 28.746666v55.210667l69.162667-15.626667v206.453334h-67.296v53.546666h201.461333v-53.546666h-66.869333V288.554667z" fill="#D4000F" ></path></symbol><symbol id="icona-5" viewBox="0 0 1024 1024"><path d="M832 438.858667c0 176.725333-320 466.282667-320 466.282666S192 615.584 192 438.858667a320 320 0 0 1 640 0z" fill="#FFFFFF" ></path><path d="M512 85.333333a347.285333 347.285333 0 0 0-347.285333 347.285334C164.714667 624.426667 512 938.666667 512 938.666667s347.285333-314.24 347.285333-506.048A347.285333 347.285333 0 0 0 512 85.333333z m-0.021333 765.418667c-123.925333-120.96-283.264-311.904-283.264-418.133333a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.370667 297.066667-283.306666 418.133333z" fill="#D4000F" ></path><path d="M511.392 416.053333a226.581333 226.581333 0 0 0-26.88 1.461334v-67.925334h118.133333V294.186667H426.602667v178.133333a472.768 472.768 0 0 1 52.917333-3.754667q69.376 0 69.376 49.994667a47.274667 47.274667 0 0 1-16.672 38.336 67.808 67.808 0 0 1-44.992 13.962667 131.797333 131.797333 0 0 1-70.005333-20.629334v58.336a185.386667 185.386667 0 0 0 77.088 13.952 130.282667 130.282667 0 0 0 89.482666-29.685333 101.408 101.408 0 0 0 33.642667-80.106667 90.410667 90.410667 0 0 0-28.746667-70.826666 111.317333 111.317333 0 0 0-77.301333-25.834667z" fill="#D4000F" ></path></symbol><symbol id="iconschool" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#30AD98" ></path><path d="M512 260.554667L224 409.845333l21.205333 10.986667V586.666667h64V454.005333l33.205334 17.216v232.074667h338.933333V471.36L800 409.845333z m105.344 378.741333H406.410667V504.394667L512 559.114667l105.344-54.592zM512 487.04l-148.928-77.194667L512 332.64l148.928 77.205333z" fill="#30AD98" ></path></symbol><symbol id="icona-10_1" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#EF633F" ></path><path d="M412.768 317.056l-150.101333 31.616v60.736l76.085333-17.184v227.104h-74.026667v58.890667h221.610667v-58.890667h-73.568V317.056zM661.866667 317.28a112.213333 112.213333 0 0 0-98.069334 48.586667q-33.92 48.597333-33.92 140.704 0 177.845333 125.12 177.834666a109.258667 109.258667 0 0 0 96.021334-48.469333q33.216-48.469333 33.226666-137.610667 0-181.034667-122.368-181.045333z m-4.586667 310.293333q-52.48 0-52.48-122.837333 0-130.624 53.866667-130.624 50.186667 0 50.186666 126.965333 0 126.496-51.562666 126.496z" fill="#EF633F" ></path></symbol><symbol id="iconZ" viewBox="0 0 1024 1024"><path d="M853.333333 433.984c0 188.512-341.333333 497.365333-341.333333 497.365333S170.666667 622.506667 170.666667 433.984a341.333333 341.333333 0 0 1 682.666666 0z" fill="#FFFFFF" ></path><path d="M512 85.333333a347.285333 347.285333 0 0 0-347.285333 347.285334C164.714667 624.426667 512 938.666667 512 938.666667s347.285333-314.24 347.285333-506.048A347.285333 347.285333 0 0 0 512 85.333333z m0 765.408C388.064 729.653333 228.714667 538.645333 228.714667 432.618667a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.36 297.045333-283.285333 418.122666z" fill="#D4000F" ></path><path d="M627.936 359.392v-47.914667H404.394667v51.658667h142.293333L386.272 561.269333v55.616h248.128v-51.456H460.650667l167.285333-206.037333z" fill="#D4000F" ></path></symbol><symbol id="icona-RailwayStation" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A427.146667 427.146667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#30AD98" ></path><path d="M597.333333 315.648v-59.626667H426.666667v59.626667a223.914667 223.914667 0 0 0-75.381334 363.050667l45.909334-44.586667a160 160 0 1 1 225.44 4.128l44.266666 46.229333A223.914667 223.914667 0 0 0 597.333333 315.648z" fill="#30AD98" ></path><path d="M544 576h53.333333v-64H426.666667v64h53.333333v128h-85.333333v64h234.666666v-64h-85.333333V576z" fill="#30AD98" ></path></symbol><symbol id="iconX" viewBox="0 0 1024 1024"><path d="M851.626667 433.984c0 188.512-341.333333 497.365333-341.333334 497.365333s-341.333333-308.853333-341.333333-497.365333a341.333333 341.333333 0 0 1 682.666667 0z" fill="#FFFFFF" ></path><path d="M510.293333 85.333333a347.285333 347.285333 0 0 0-347.274666 347.285334C163.018667 624.426667 510.293333 938.666667 510.293333 938.666667s347.285333-314.24 347.285334-506.048A347.285333 347.285333 0 0 0 510.304 85.333333z m0 765.408C386.378667 729.653333 227.029333 538.645333 227.029333 432.618667a283.285333 283.285333 0 1 1 566.570667 0c0 106.026667-159.36 297.045333-283.285333 418.122666z" fill="#D4000F" ></path><path d="M635.52 311.477333h-71.456L504.064 409.6l-61.248-98.122667h-72.085333l94.581333 146.037334-104.373333 159.370666h73.952l67.925333-105.621333 67.701333 105.621333h74.378667l-104.373333-157.077333 94.997333-148.330667z" fill="#D4000F" ></path></symbol><symbol id="icontoilet" viewBox="0 0 1024 1024"><path d="M149.333333 149.333333h725.333334v725.333334H149.333333z" fill="#FFFFFF" ></path><path d="M85.333333 85.333333v853.333334h853.333334V85.333333z m789.333334 789.333334H149.333333V149.333333h725.333334z" fill="#3B72AB" ></path><path d="M362.794667 394.688a96 96 0 1 0-96-96 96.106667 96.106667 0 0 0 96 96z m0-128a32 32 0 1 1-32 32 32 32 0 0 1 32-32zM670.933333 394.688a96 96 0 1 0-96-96 96.106667 96.106667 0 0 0 96 96z m0-128a32 32 0 1 1-32 32 32 32 0 0 1 32-32zM330.794667 682.901333V821.333333h64V682.901333h59.168l53.674666-256H217.941333l65.610667 256z m98.026666-192l-26.826666 128H333.226667l-32.8-128zM639.978667 821.333333h64v-74.645333h116.362666l-64.96-319.786667H585.546667l-64 319.786667h118.432z m-40.352-138.645333l38.378666-191.786667h65.066667l38.954667 191.786667z" fill="#3B72AB" ></path></symbol><symbol id="icona-9_1" viewBox="0 0 1024 1024"><path d="M512 512m-362.666667 0a362.666667 362.666667 0 1 0 725.333334 0 362.666667 362.666667 0 1 0-725.333334 0Z" fill="#FFFFFF" ></path><path d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m0 789.333334a362.666667 362.666667 0 1 1 362.666667-362.666667 363.072 363.072 0 0 1-362.666667 362.666667z" fill="#EF633F" ></path><path d="M501.642667 297.802667a131.733333 131.733333 0 0 0-97.749334 37.749333 133.386667 133.386667 0 0 0-37.504 98.24 121.333333 121.333333 0 0 0 31.125334 85.386667 103.04 103.04 0 0 0 79.370666 33.877333q53.258667 0 78.752-39.253333l1.493334 0.501333q-1.994667 121.994667-95.744 121.994667a131.68 131.68 0 0 1-72.992-20v67.253333a202.794667 202.794667 0 0 0 80.245333 14.752q81.002667 0 124.128-58.997333t43.125333-160.501334q0-85.504-35.754666-133.248a116.256 116.256 0 0 0-98.496-47.754666z m37.376 177.749333a48.416 48.416 0 0 1-37.877334 16.746667 50.517333 50.517333 0 0 1-40.629333-17.493334 72.181333 72.181333 0 0 1-14.869333-48.256 76.234667 76.234667 0 0 1 14.624-47.498666 46.4 46.4 0 0 1 38.869333-19.253334 45.824 45.824 0 0 1 39.882667 22.250667 91.349333 91.349333 0 0 1 14.869333 52 60.224 60.224 0 0 1-14.869333 41.504z" fill="#EF633F" ></path></symbol><symbol id="iconorientation_2" viewBox="0 0 1024 1024"><path d="M853.333333 433.984c0 188.512-341.333333 497.365333-341.333333 497.365333S170.666667 622.506667 170.666667 433.984a341.333333 341.333333 0 0 1 682.666666 0z" fill="#FFFFFF" ></path><path d="M512 85.333333a347.285333 347.285333 0 0 0-347.285333 347.285334C164.714667 624.426667 512 938.666667 512 938.666667s347.285333-314.24 347.285333-506.048A347.285333 347.285333 0 0 0 512 85.333333z m0 765.408C388.064 729.653333 228.714667 538.645333 228.714667 432.618667a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.36 297.045333-283.285333 418.122666z" fill="#D4000F" ></path><path d="M512 256a170.666667 170.666667 0 1 0 170.666667 170.666667 170.666667 170.666667 0 0 0-170.666667-170.666667z m0 277.333333a106.666667 106.666667 0 1 1 106.666667-106.666666 106.784 106.784 0 0 1-106.666667 106.666666z" fill="#D4000F" ></path></symbol><symbol id="iconY" viewBox="0 0 1024 1024"><path d="M853.333333 433.984c0 188.512-341.333333 497.365333-341.333333 497.365333S170.666667 622.506667 170.666667 433.984a341.333333 341.333333 0 0 1 682.666666 0z" fill="#FFFFFF" ></path><path d="M512 85.333333a347.285333 347.285333 0 0 0-347.285333 347.285334C164.714667 624.426667 512 938.666667 512 938.666667s347.285333-314.24 347.285333-506.048A347.285333 347.285333 0 0 0 512 85.333333z m0 765.408C388.064 729.653333 228.714667 538.645333 228.714667 432.618667a283.285333 283.285333 0 0 1 566.570666 0c0 106.026667-159.36 297.045333-283.285333 418.122666z" fill="#D4000F" ></path><path d="M517.002667 432.309333L445.12 311.477333h-72.288l111.872 176.874667v128.533333h61.461333V488.768L658.453333 311.477333h-71.04l-70.410666 120.832z" fill="#D4000F" ></path></symbol><symbol id="iconairport" viewBox="0 0 1024 1024"><path d="M469.152 242.954667v0.085333l0.064 151.936a15.701333 15.701333 0 0 1-5.866667 12.234667l-282.453333 186.453333v43.242667l268.746667-102.08a16.149333 16.149333 0 0 1 14.944 0.128 15.776 15.776 0 0 1 8.298666 12.288l17.888 173.44a15.690667 15.690667 0 0 1-5.162666 13.28l-122.965334 59.701333v49.813333l143.146667-55.701333a16.170667 16.170667 0 0 1 12.373333 0.224L650.645333 841.6v-47.925333l-116.490666-59.605334a15.669333 15.669333 0 0 1-4.714667-12.554666l14.24-170.261334a15.68 15.68 0 0 1 4.618667-9.866666 15.861333 15.861333 0 0 1 3.626666-2.677334 16.149333 16.149333 0 0 1 15.146667-0.106666l264.490667 98.314666v-43.253333L559.072 408.885333a15.701333 15.701333 0 0 1-5.621333-12.032l0.138666-152.736a134.624 134.624 0 0 0-19.317333-74.272c-10.602667-15.978667-20.650667-19.648-22.570667-19.701333-8.256 0.064-42.986667 24.437333-42.56 92.8z" fill="#FFFFFF" ></path><path d="M511.701333 150.144c1.92 0.053333 11.968 3.733333 22.570667 19.701333a134.613333 134.613333 0 0 1 19.317333 74.272l-0.138666 152.736a15.701333 15.701333 0 0 0 5.621333 12.032l272.48 184.768v43.253334l-264.48-98.314667a16.149333 16.149333 0 0 0-15.146667 0.106667 15.861333 15.861333 0 0 0-3.626666 2.677333 15.68 15.68 0 0 0-4.629334 9.866667L529.429333 721.493333a15.669333 15.669333 0 0 0 4.714667 12.554667l116.490667 59.605333v47.925334L518.186667 788.010667a16.170667 16.170667 0 0 0-12.384-0.224l-143.146667 55.690666v-49.813333l122.976-59.690667a15.690667 15.690667 0 0 0 5.162667-13.290666l-17.898667-173.44a15.776 15.776 0 0 0-8.298667-12.277334 16.16 16.16 0 0 0-14.944-0.128L180.885333 636.906667v-43.253334l282.453334-186.453333a15.690667 15.690667 0 0 0 5.866666-12.224l-0.053333-151.936v-0.085333c-0.426667-68.373333 34.293333-92.746667 42.549333-92.8m0.629334-64.010667h-1.130667c-51.434667 0.394667-106.570667 60.533333-106.048 157.002667l0.053333 125.76-259.573333 171.338666-28.746667 18.965334v170.474666l86.72-32.949333 212.053334-80.533333 7.914666 76.736-88.885333 43.146666-36.053333 17.493334v183.466666l87.210666-33.92L511.36 854.293333l115.274667 46.634667 88 35.594667V754.517333l-34.848-17.834666-83.818667-42.88 6.186667-73.888 207.104 76.981333 86.293333 32.085333V559.722667l-28.085333-19.04-249.994667-169.525334 0.117333-126.976v-0.736a197.749333 197.749333 0 0 0-29.973333-108.970666c-19.584-29.514667-47.306667-47.573333-74.165333-48.309334l-1.12-0.021333z" fill="#3B97D3" ></path></symbol><symbol id="iconshili" viewBox="0 0 1024 1024"><path d="M836.736 128H187.264A59.264 59.264 0 0 0 128 187.264v521.472a59.264 59.264 0 0 0 59.264 59.264h649.472a59.264 59.264 0 0 0 59.264-59.264V187.264A59.264 59.264 0 0 0 836.736 128zM832 704H192V192h640zM736 832h-448a32 32 0 0 0 0 64h448a32 32 0 0 0 0-64z" ></path><path d="M320 640h64a64.064 64.064 0 0 0 64-64V320a64.064 64.064 0 0 0-64-64H320a64.064 64.064 0 0 0-64 64v256a64.064 64.064 0 0 0 64 64z m0-320h64v256H320zM576 640h128a64.064 64.064 0 0 0 64-64V448a64.064 64.064 0 0 0-64-64H576a64.064 64.064 0 0 0-64 64v128a64.064 64.064 0 0 0 64 64z m0-192h128v128H576z" ></path></symbol><symbol id="iconbiaozhubiaohui" viewBox="0 0 1024 1024"><path d="M288 768h140.16a32 32 0 0 0 22.656-9.472l437.056-440.256a32 32 0 0 0-0.128-45.12L752 137.344a32.064 32.064 0 0 0-45.12-0.128l-441.408 437.12A32 32 0 0 0 256 596.992V736a32 32 0 0 0 32 32z m441.28-562.816l90.688 90.688-47.232 47.552-91.136-91.072 47.68-47.168zM320 610.368l316.16-312.96 91.52 91.52L414.72 704H320V610.368zM864 832h-704a32 32 0 1 0 0 64h704a32 32 0 0 0 0-64z" ></path></symbol><symbol id="icontucengcaozuo" viewBox="0 0 1024 1024"><path d="M529.984 83.2l4.48 3.648 135.744 135.808a32 32 0 0 1-40.832 48.96l-4.48-3.712L544 187.008V480h292.992L755.84 398.848l-3.648-4.416a32 32 0 0 1 48.96-40.832l135.68 135.744 3.776 4.48a32 32 0 0 1-3.712 40.832l-135.744 135.68-4.48 3.776a32 32 0 0 1-40.832-3.712l-3.648-4.48a32 32 0 0 1 3.648-40.768L836.992 544H544.128v292.8l80.832-80.64 4.48-3.776a32 32 0 0 1 40.768 48.96l-135.744 135.808-4.48 3.712a32 32 0 0 1-40.768-3.712L353.408 801.28l-3.712-4.416a32 32 0 0 1 3.712-40.832l4.48-3.712a32 32 0 0 1 40.768 3.712l81.536 81.6-0.064-293.76H186.56l81.152 81.216a32 32 0 0 1 3.712 40.832l-3.712 4.416a32 32 0 0 1-40.832 3.712l-4.48-3.712-135.68-135.744a32 32 0 0 1-3.712-40.832l3.648-4.48 135.808-135.68a32 32 0 0 1 48.96 40.768l-3.712 4.48L186.56 480H480L480 186.496 398.72 267.904a32 32 0 0 1-40.832 3.712l-4.48-3.712a32 32 0 0 1-3.712-40.832l3.712-4.48 135.808-135.68a32 32 0 0 1 40.768-3.776z" ></path></symbol><symbol id="iconcaizhiku" viewBox="0 0 1024 1024"><path d="M896 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h768zM248.32 577.152c-38.336 0-87.04 4.544-120.32 11.52V832h517.376a436.736 436.736 0 0 0-397.12-254.848zM896 192H128v331.52a743.68 743.68 0 0 1 120.32-10.368 500.736 500.736 0 0 1 464.32 313.28l2.112 5.568H896V192z m-256 64a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m0 64a64 64 0 1 0 0 128 64 64 0 0 0 0-128z" ></path></symbol><symbol id="iconmoxingku" viewBox="0 0 1024 1024"><path d="M864 832H832V576a64 64 0 0 0-64-64h-128V192a64 64 0 0 0-64-64H256a64 64 0 0 0-64 64v640h-32a32 32 0 0 0 0 64h704a32 32 0 0 0 0-64zM256 832V192h320v640z m384 0V576h128v256z" ></path><path d="M480 320h-128a32 32 0 0 0 0 64h128a32 32 0 0 0 0-64zM480 512h-128a32 32 0 0 0 0 64h128a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconshuding" viewBox="0 0 1024 1024"><path d="M736 128a32 32 0 1 1 0 64H704v320h96a32 32 0 1 1 0 64H544.32v288.896a32 32 0 0 1-64 0V576H224a32 32 0 0 1 0-64H320V192h-32a32 32 0 0 1 0-64h448zM640 192H384v320h256V192z" ></path></symbol><symbol id="iconluzhi" viewBox="0 0 1024 1024"><path d="M931.2 267.2a61.824 61.824 0 0 0-57.408-6.4L704 314.432V256a64.064 64.064 0 0 0-64-64H128a64.064 64.064 0 0 0-64 64v512a64.064 64.064 0 0 0 64 64h512a64.064 64.064 0 0 0 64-64v-61.888l167.04 57.088a64 64 0 0 0 89.088-58.88V320.768a63.872 63.872 0 0 0-28.928-53.568zM128 768V256h512v512z m765.952-64.512L704 638.464V381.44l192.128-60.736z" ></path><path d="M352 320h-128a32 32 0 0 0 0 64h128a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconchaxun" viewBox="0 0 1024 1024"><path d="M288 320h320a32 32 0 1 0 0-64h-320a32 32 0 0 0 0 64zM288 448h64a32 32 0 1 0 0-64h-64a32 32 0 0 0 0 64z" ></path><path d="M832 128H192a64.064 64.064 0 0 0-64 64v640a64 64 0 0 0 64 64h416a32 32 0 0 0 0-64H192V192h640v416a32 32 0 0 0 64 0V192a64 64 0 0 0-64-64z" ></path><path d="M732.16 686.912a193.152 193.152 0 1 0-45.248 45.248l122.432 122.496a32 32 0 0 0 45.248-45.248zM576 704a128 128 0 1 1 128-128 128.128 128.128 0 0 1-128 128z" ></path></symbol><symbol id="iconliulan" viewBox="0 0 1024 1024"><path d="M800.192 321.408a95.808 95.808 0 0 0-32 5.44V257.856a96 96 0 0 0-128-90.56v-5.632a96 96 0 1 0-192 0v37.632a96 96 0 0 0-128 90.56V438.848l-12.672-15.616a99.712 99.712 0 0 0-130.752-21.76 93.76 93.76 0 0 0-30.528 127.36L263.68 725.76a352 352 0 0 0 302.4 171.776h58.24a272 272 0 0 0 272-272V417.408a96 96 0 0 0-96-96z m32 236.736v67.456a208 208 0 0 1-208 208h-58.24a288 288 0 0 1-247.36-140.544L201.216 496.128a29.76 29.76 0 0 1 9.664-40.448 35.712 35.712 0 0 1 46.848 7.744l69.568 86.208a32 32 0 0 0 56.96-20.096V289.856a32 32 0 0 1 64 0v191.104a32 32 0 0 0 64 0V161.664a32 32 0 1 1 64 0v319.296a32 32 0 0 0 64 0V257.856a32 32 0 0 1 64 0v257.472a32 32 0 0 0 64 0v-97.92a32 32 0 1 1 64 0z" ></path></symbol><symbol id="icongongju" viewBox="0 0 1024 1024"><path d="M768 150.464a221.12 221.12 0 0 0-64-19.2V288a32 32 0 0 1-64 0V131.2a221.12 221.12 0 0 0-64 19.264A222.656 222.656 0 0 0 576 553.6V832a64 64 0 0 0 64 64h64a64 64 0 0 0 64-64V553.536a222.656 222.656 0 0 0 0-403.072z m0 328.704a158.464 158.464 0 0 1-64 29.568V832h-64V508.8a159.36 159.36 0 0 1-64-283.968V288a96 96 0 0 0 192 0v-63.168a158.4 158.4 0 0 1 0 254.336zM384 738.368a157.888 157.888 0 0 0-66.176-31.36V576H320a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64H256a64 64 0 0 0-64 64v320a63.808 63.808 0 0 0 61.824 63.552v132.288a157.888 157.888 0 0 0-61.824 30.464A158.272 158.272 0 0 0 131.2 832a160.256 160.256 0 0 0-3.2 32v32h320v-32a160.256 160.256 0 0 0-3.2-32A158.144 158.144 0 0 0 384 738.368zM256 192h64v320H256z m-58.112 640a95.808 95.808 0 0 1 60.992-59.008 87.296 87.296 0 0 1 58.24 0 95.808 95.808 0 0 1 60.992 59.008z" ></path></symbol><symbol id="iconmanyou" viewBox="0 0 1024 1024"><path d="M448 448H327.552q-36.352 0-67.264-19.136-30.976-19.072-47.232-51.648L184.448 320H139.52l42.688 256h309.12l-76.8 192H480l1.792-4.48L592.128 576H832q26.496 0 45.248-18.752T896 512q0-26.496-18.752-45.248T832 448H448z m217.6-64H832a128 128 0 1 1 0 256H628.672l-89.28 151.744A64 64 0 0 1 480 832H320l25.6-64 25.6-64 25.6-64H182.208a64 64 0 0 1-63.104-53.504l-42.688-256A64 64 0 0 1 139.52 256h44.928a64 64 0 0 1 57.216 35.392l28.672 57.216A64 64 0 0 0 327.552 384H422.4L320 128h155.776a64 64 0 0 1 54.848 31.104L665.6 384zM590.976 384l-115.2-192h-61.248l76.8 192h99.648z" ></path></symbol><symbol id="icontianjiazhandian" viewBox="0 0 1024 1024"><path d="M959.488 730.24A32 32 0 0 0 928 704H832V608a32 32 0 0 0-32-32l-5.76 0.512A32 32 0 0 0 768 608V704h-96a32 32 0 0 0-32 32l0.512 5.76a32 32 0 0 0 31.488 26.24H768v96a32 32 0 0 0 32 32l5.76-0.512A32 32 0 0 0 832 864V768h96a32 32 0 0 0 32-32z" ></path><path d="M640 832H128V320h640v160a32 32 0 0 0 64 0V320a64 64 0 0 0-64-64h-76.16l-46.336-92.672A63.68 63.68 0 0 0 588.16 128H307.84a63.68 63.68 0 0 0-57.28 35.392L204.224 256H128a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h512a32 32 0 0 0 0-64zM307.776 192H588.16l32 64H275.84z" ></path><path d="M256 576a192 192 0 1 0 192-192 192 192 0 0 0-192 192z m320 0a128 128 0 1 1-128-128 128.128 128.128 0 0 1 128 128z" ></path></symbol><symbol id="iconfeidengbi1" viewBox="0 0 1024 1024"><path d="M736.704 575.36a32 32 0 0 0-32 32v49.28A175.616 175.616 0 0 1 529.344 832h-33.28a175.616 175.616 0 0 1-175.36-175.36v-49.28a32 32 0 0 0-64 0v49.28A239.616 239.616 0 0 0 496.128 896h33.28a239.68 239.68 0 0 0 239.36-239.36v-49.28a32 32 0 0 0-32-32zM529.28 128h-33.152a239.616 239.616 0 0 0-239.36 239.36v48.064a32 32 0 0 0 64 0V367.36A175.616 175.616 0 0 1 496.128 192h33.216a175.616 175.616 0 0 1 175.36 175.36v48.064a32 32 0 1 0 64 0V367.36A239.68 239.68 0 0 0 529.344 128z" ></path></symbol><symbol id="iconfenggeshezhi1" viewBox="0 0 1024 1024"><path d="M832 128H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zM192 832V192h640v640z" ></path><path d="M704 320H320v64h160v320h64V384H704V320z" ></path></symbol><symbol id="icondengbi" viewBox="0 0 1024 1024"><path d="M736 575.36a32 32 0 0 0-32 32v49.28A175.616 175.616 0 0 1 528.64 832h-33.28A175.616 175.616 0 0 1 320 656.64v-49.28a32 32 0 0 0-64 0v49.28A239.616 239.616 0 0 0 495.36 896h33.28A239.616 239.616 0 0 0 768 656.64v-49.28a32 32 0 0 0-32-32zM528.64 128h-33.28A239.616 239.616 0 0 0 256 367.36v48.064a32 32 0 0 0 64 0V367.36A175.616 175.616 0 0 1 495.36 192h33.28A175.616 175.616 0 0 1 704 367.36v48.064a32 32 0 0 0 64 0V367.36A239.616 239.616 0 0 0 528.64 128z" ></path><path d="M544 672v-320a32 32 0 0 0-64 0v320a32 32 0 0 0 64 0z" ></path></symbol><symbol id="icondingshitu" viewBox="0 0 1024 1024"><path d="M236.992 320h421.12l128.192-128H365.568L236.992 320z" ></path><path d="M893.12 148.032v-0.256a31.488 31.488 0 0 0-10.496-12.8 29.12 29.12 0 0 0-3.136-2.176 31.04 31.04 0 0 0-15.872-4.8H352.384a31.936 31.936 0 0 0-22.528 9.28l-192.896 192a31.744 31.744 0 0 0-7.744 14.528 30.336 30.336 0 0 0-0.832 3.968 30.656 30.656 0 0 0-0.832 4.224v512a32 32 0 0 0 32 32h511.808a28.672 28.672 0 0 0 20.288-7.808c0.704-0.64 1.664-0.896 2.304-1.536l192.256-192 0.64-0.896a31.68 31.68 0 0 0 6.272-9.472 32.128 32.128 0 0 0 2.432-12.288v-512a31.744 31.744 0 0 0-2.432-11.968zM365.568 192h420.736l-128.192 128h-421.12zM639.36 832h-448V384h448z m192.192-173.312l-128.32 128.192V365.312l128.32-128.192z" ></path></symbol><symbol id="iconhouchuli" viewBox="0 0 1024 1024"><path d="M160 256h255.872a32 32 0 0 0 0-64H160a32 32 0 0 0 0 64zM672 256h192a32 32 0 0 0 0-64h-192a32 32 0 0 0 0 64zM544 384a32 32 0 0 0 32-32v-192a32 32 0 0 0-64 0v192a32 32 0 0 0 32 32zM479.872 767.808H160a32 32 0 0 0 0 64h319.872a32 32 0 0 0 0-64zM864 767.808h-128a32 32 0 0 0 0 64h128a32 32 0 0 0 0-64zM608 703.808a32 32 0 0 0-32 32v128a32 32 0 0 0 64 0v-128a32 32 0 0 0-32-32zM160 575.872h127.872a32 32 0 0 0 0-64H160a32 32 0 0 0 0 64zM864 511.872h-320a32 32 0 0 0 0 64h320a32 32 0 0 0 0-64zM416 447.872a32 32 0 0 0-32 32v128a32 32 0 0 0 64 0v-128a32 32 0 0 0-32-32z" ></path></symbol><symbol id="iconshidianguanli" viewBox="0 0 1024 1024"><path d="M813.184 468.096A465.152 465.152 0 0 0 512 320a465.152 465.152 0 0 0-301.184 148.096 60.608 60.608 0 0 0 0 87.808A465.152 465.152 0 0 0 512 704a465.152 465.152 0 0 0 301.184-148.096 60.608 60.608 0 0 0 0-87.808zM512 640a402.688 402.688 0 0 1-254.528-128A402.752 402.752 0 0 1 512 384a402.752 402.752 0 0 1 254.528 128A402.752 402.752 0 0 1 512 640z" ></path><path d="M512 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" ></path><path d="M512 64a448 448 0 1 0 448 448 448 448 0 0 0-448-448z m0 832a384 384 0 1 1 384-384 384.448 384.448 0 0 1-384 384z" ></path></symbol><symbol id="iconshituqiehuan" viewBox="0 0 1024 1024"><path d="M160 384a32 32 0 0 0 32-32V192h160a32 32 0 0 0 0-64H192a64 64 0 0 0-64 64v160a32 32 0 0 0 32 32zM832 128h-161.984a32 32 0 0 0 0 64H832v160a32 32 0 0 0 64 0V192a64 64 0 0 0-64-64zM352 832H192v-160a32 32 0 0 0-64 0V832a64 64 0 0 0 64 64h160a32 32 0 0 0 0-64zM864 640a32 32 0 0 0-32 32V832h-161.984a32 32 0 0 0 0 64H832a64 64 0 0 0 64-64v-160a32 32 0 0 0-32-32zM813.184 468.096A465.152 465.152 0 0 0 512 320a465.152 465.152 0 0 0-301.184 148.096 60.608 60.608 0 0 0 0 87.808A465.152 465.152 0 0 0 512 704a465.152 465.152 0 0 0 301.184-148.096 60.608 60.608 0 0 0 0-87.808zM512 640a402.688 402.688 0 0 1-254.528-128A402.752 402.752 0 0 1 512 384a402.752 402.752 0 0 1 254.528 128A402.752 402.752 0 0 1 512 640z" ></path><path d="M512 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" ></path></symbol><symbol id="icontoushitu" viewBox="0 0 1024 1024"><path d="M672 640h-128a32 32 0 0 0 0 64h128a32 32 0 0 0 0-64zM416 640H384v-32a32 32 0 0 0-64 0v38.4a57.664 57.664 0 0 0 57.6 57.6h38.4a32 32 0 0 0 0-64zM352 512a32 32 0 0 0 32-32V360.32a32 32 0 1 0-64 0V480a32 32 0 0 0 32 32z" ></path><path d="M646.4 320H185.6a57.664 57.664 0 0 0-57.6 57.6v460.8a57.664 57.664 0 0 0 57.6 57.6h460.8a57.664 57.664 0 0 0 57.6-57.6V377.6a57.664 57.664 0 0 0-57.6-57.6z m-6.4 512H192V384h448z" ></path><path d="M838.4 128H377.6a57.728 57.728 0 0 0-57.6 57.728v36.864a32 32 0 0 0 64 0V192h448v448h-33.152a32 32 0 1 0 0 64h39.552a57.728 57.728 0 0 0 57.6-57.728V185.728A57.728 57.728 0 0 0 838.4 128z" ></path></symbol><symbol id="icontianqitiaojie" viewBox="0 0 1024 1024"><path d="M512 256a256 256 0 1 0 256 256 256.32 256.32 0 0 0-256-256z m0 448a192 192 0 1 1 192-192 192.192 192.192 0 0 1-192 192zM512 192a32 32 0 0 0 32-32v-64a32 32 0 0 0-64 0v64A32 32 0 0 0 512 192zM240.448 285.76a32 32 0 0 0 45.248-45.312l-45.248-45.248a32 32 0 1 0-45.248 45.248zM160 480h-64a32 32 0 0 0 0 64h64a32 32 0 0 0 0-64zM240.448 738.304l-45.248 45.248a32 32 0 0 0 45.248 45.248l45.312-45.248a32 32 0 0 0-45.312-45.248zM512 832a32 32 0 0 0-32 32v64a32 32 0 0 0 64 0v-64A32 32 0 0 0 512 832zM783.552 738.304a32 32 0 0 0-45.312 45.248l45.312 45.248a32 32 0 1 0 45.248-45.248zM928 480h-64a32 32 0 0 0 0 64h64a32 32 0 0 0 0-64zM783.552 285.76l45.248-45.312a32 32 0 1 0-45.248-45.248l-45.312 45.248a32 32 0 0 0 45.312 45.248z" ></path></symbol><symbol id="icondianxuan" viewBox="0 0 1024 1024"><path d="M251.328 178.24L716.8 455.68l-215.872 50.752 178.944 309.504-90.112 52.032-179.008-309.76-151.872 161.472-7.552-541.376m-63.36-109.888a31.68 31.68 0 0 0-16 27.2l15.104 729.728a32.064 32.064 0 0 0 55.232 22.528l153.6-163.328 150.08 259.52a32 32 0 0 0 43.712 11.712l166.272-96a32 32 0 0 0 11.712-43.712l-149.76-259.136 218.112-51.264a32.064 32.064 0 0 0 8.256-59.072L219.584 68.096a31.744 31.744 0 0 0-31.616 0.256z" ></path></symbol><symbol id="icondituchaxun" viewBox="0 0 1024 1024"><path d="M832 128H192a62.08 62.08 0 0 0-64 64v640c0 41.408 16.128 64 64 64h480a32 32 0 0 0 32-32l-0.512-5.76A32 32 0 0 0 672 832H192V192h640v480a32 32 0 0 0 64 0V192c0-36.864-27.136-64-64-64z" ></path><path d="M694.656 649.344a32 32 0 0 0-4.288-3.584A221.312 221.312 0 0 0 736 512c0-121.6-102.4-224-224-224S288 390.4 288 512s102.4 224 224 224c49.664 0 96.192-17.088 133.76-45.632a32 32 0 0 0 3.648 4.288l192 192a32 32 0 1 0 45.248-45.312l-192-192zM512 672c-89.6 0-160-70.4-160-160S422.4 352 512 352s160 70.4 160 160-70.4 160-160 160z" ></path></symbol><symbol id="iconkongjianjuli" viewBox="0 0 1024 1024"><path d="M600.32 61.248a33.536 33.536 0 0 0-47.296 2.048L60.032 556.352a33.536 33.536 0 0 0-2.112 47.36 33.536 33.536 0 0 0 47.36-2.112l492.992-493.056a33.536 33.536 0 0 0 2.112-47.296zM939.84 400.064l-226.304-226.24a64 64 0 0 0-90.496 0l-452.544 452.48a64 64 0 0 0 0 90.56L396.8 943.168a64 64 0 0 0 90.496 0l452.544-452.608a64 64 0 0 0 0-90.496zM442.048 897.92L215.68 671.616l452.544-452.544 226.304 226.24z" ></path><path d="M375.68 648.512a32 32 0 0 0-45.248 45.312l70.016 69.952a32 32 0 0 0 45.248-45.248zM586.24 438.016a32 32 0 0 0-45.312 45.248l70.016 70.016a32 32 0 0 0 45.248-45.248zM480.896 543.296a32 32 0 0 0-45.248 45.248l90.496 90.496a32 32 0 0 0 45.248-45.248zM646.208 377.984L736.64 468.48a32 32 0 1 0 45.248-45.248l-90.496-90.496a32 32 0 0 0-45.248 45.248z" ></path></symbol><symbol id="iconyidijuli1" viewBox="0 0 1024 1024"><path d="M864 704a32 32 0 0 0-32 32l-0.128 32H192.32l0.128-32a32 32 0 0 0-64 0L128 864a32 32 0 0 0 64 0l0.128-32h639.552l-0.128 32a32 32 0 0 0 64 0l0.448-128a32 32 0 0 0-32-32zM157.376 639.232a32 32 0 0 0 32-32c0-4.032 1.536-99.392 135.424-99.392 179.776 0 266.56-52.864 309.632-188.544a149.248 149.248 0 0 1 78.912-90.368 170.88 170.88 0 0 1 137.024-1.984 32 32 0 1 0 23.36-59.52 234.24 234.24 0 0 0-187.84 3.712A215.488 215.488 0 0 0 573.44 299.904c-29.632 93.312-78.016 144-248.64 144-157.76 0-199.424 106.88-199.424 163.328a32 32 0 0 0 32 32z" ></path></symbol><symbol id="icontouying" viewBox="0 0 1024 1024"><path d="M832 256H576V192a64 64 0 0 0-64-64H192a64 64 0 0 0-64 64v320a64 64 0 0 0 64 64h64v256a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64z m0 336.768L592.768 832H429.248L832 429.248zM192 192h320v320H192z m128 384h192a64 64 0 0 0 64-64V320h256v18.752L338.752 832H320z m363.264 256L832 683.264V832z" ></path></symbol><symbol id="iconlifangti" viewBox="0 0 1024 1024"><path d="M864.256 263.936l-320-190.976a62.72 62.72 0 0 0-64.512 0l-320 190.912A65.792 65.792 0 0 0 128 320.384v383.232a65.792 65.792 0 0 0 31.744 56.576l320 190.912a62.784 62.784 0 0 0 64.512 0l320-190.912a65.792 65.792 0 0 0 31.744-56.576V320.512a65.792 65.792 0 0 0-31.744-56.576zM480 148.544v108.928a32 32 0 0 0 64 0V148.608l255.68 152.576L544 455.488V384a32 32 0 0 0-64 0v71.616L223.68 301.504z m0 726.912l-256.832-153.216 95.104-56.96a32 32 0 0 0-32.896-54.848L192 666.368V358.4l256.576 154.24-62.848 37.632a32 32 0 0 0 32.896 54.912l61.376-36.736z m352-209.088l-93.376-55.936a32 32 0 0 0-32.896 54.848l95.104 56.96L544 875.456V568.448l61.376 36.736a31.424 31.424 0 0 0 16.448 4.544 32 32 0 0 0 16.448-59.456L575.36 512.64 832 357.76z" ></path></symbol><symbol id="iconqiuti" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 0 448 448 448 448 0 0 0-448-448z m369.024 342.784a334.848 334.848 0 0 0-31.808-19.008 32 32 0 1 0-29.696 56.576 132.096 132.096 0 0 1 74.112 74.24c-8.448 31.552-78.848 76.416-195.008 101.824 1.408-12.48 3.456-24.576 4.352-37.44l0.064-2.368a32 32 0 0 0-63.936-2.24c-1.28 18.304-3.776 35.776-6.144 53.312A920.768 920.768 0 0 1 512 640a919.232 919.232 0 0 1-119.808-8.192A919.232 919.232 0 0 1 384 512a920.768 920.768 0 0 1 8.32-120.96c17.536-2.368 34.944-4.864 53.312-6.144a32 32 0 0 0-2.304-63.936l-2.368 0.064c-12.8 0.96-24.896 2.944-37.376 4.352 25.408-116.096 70.272-186.56 101.824-194.944a132.096 132.096 0 0 1 74.24 74.112 32 32 0 1 0 56.576-29.76 334.848 334.848 0 0 0-19.008-31.744 385.088 385.088 0 0 1 263.744 263.744zM403.584 143.808a562.944 562.944 0 0 0-67.456 191.616c-17.92 3.456-36.096 6.72-52.992 11.264a32 32 0 0 0-22.72 39.168 32.512 32.512 0 0 0 39.232 22.72c8.512-2.304 17.92-3.712 26.752-5.76A1008.768 1008.768 0 0 0 320 512a1009.984 1009.984 0 0 0 6.336 108.608C209.472 595.264 138.624 550.144 130.368 518.4a120.32 120.32 0 0 1 62.976-67.648 32 32 0 0 0-32.128-55.36c-6.656 3.84-12.48 7.68-18.24 11.648a385.152 385.152 0 0 1 260.672-263.232z m-259.776 476.8a565.76 565.76 0 0 0 192.192 67.328 565.76 565.76 0 0 0 67.328 192.192 385.28 385.28 0 0 1-259.52-259.52z m473.088 260.48c3.904-5.76 7.808-11.648 11.648-18.304a32 32 0 0 0-55.36-32.064 120.32 120.32 0 0 1-67.648 62.912c-31.68-8.256-76.8-79.104-102.208-195.968A1009.984 1009.984 0 0 0 512 704a1008.768 1008.768 0 0 0 109.12-6.4c-1.92 8.768-3.392 18.176-5.696 26.688a32.512 32.512 0 0 0 22.72 39.232 32 32 0 0 0 39.168-22.72c4.48-16.896 7.808-35.008 11.264-52.992a562.944 562.944 0 0 0 191.616-67.456 385.152 385.152 0 0 1-263.232 260.672z" ></path><path d="M566.528 320a32 32 0 0 0-1.792 63.936 812.48 812.48 0 0 1 146.432 21.184 32 32 0 0 0 15.296-62.08A866.56 866.56 0 0 0 568.32 320z" ></path></symbol><symbol id="iconyuanzhui" viewBox="0 0 1024 1024"><path d="M644.224 555.584h-0.128l-0.32-0.064h-0.064l-0.384-0.064h-0.128l-0.384-0.064h-0.064l-0.384-0.064-0.512-0.128h-0.448l-0.96-0.192c-21.056-3.776-42.944-6.592-65.536-8.448l-0.512-0.064h-0.512l-0.512-0.128h-2.048l-0.448-0.192H566.08l-0.448-0.064H564.928l-0.832-0.128h-0.64q-22.976-1.536-46.72-1.664h-2.048L512.448 544h-17.664a731.84 731.84 0 0 0-109.696 10.624 32 32 0 1 0 11.072 63.04A674.304 674.304 0 0 1 512.448 608l2.048-0.064 1.984 0.064a669.504 669.504 0 0 1 116.16 10.56 32.448 32.448 0 0 0 5.76 0.512 32 32 0 0 0 5.76-63.488z" ></path><path d="M887.68 697.152a203.648 203.648 0 0 0-9.6-18.752L525.76 87.04a16 16 0 0 0-27.52 0L143.36 684.352l-3.648 6.144-0.64 1.216h0.192a103.168 103.168 0 0 0-10.752 44.352c0 106.048 171.904 192 384 192s384-85.952 384-192a100.544 100.544 0 0 0-8.704-38.848zM512.512 864c-195.328 0-320-75.84-320-128a39.616 39.616 0 0 1 4.096-16l6.464-10.88a170.752 170.752 0 0 1 60.352-48.448 31.872 31.872 0 0 0 1.536-55.68l247.168-415.808 249.92 419.392a31.168 31.168 0 0 0-10.112 10.368 32 32 0 0 0 12.8 43.392 179.776 179.776 0 0 1 54.656 42.56l8.96 15.104a39.616 39.616 0 0 1 4.16 16c0 52.16-124.672 128-320 128z" ></path></symbol><symbol id="iconyuanzhu" viewBox="0 0 1024 1024"><path d="M513.024 96c-204.16 0-374.336 74.752-383.616 182.656l-0.384 9.344v448l0.384 9.344c9.344 107.904 179.392 182.656 383.616 182.656 210.048 0 384-79.104 384-192v-448c0-112.896-173.952-192-384-192z m0 64c178.752 0 320 64.192 320 128s-141.248 128-320 128-320-64.192-320-128 141.248-128 320-128z m0 704c-178.752 0-320-64.192-320-128v-3.072c0.128-0.512 0.448-0.896 0.512-1.472 3.84-22.464 29.824-48.704 69.568-70.144a32 32 0 0 0-30.208-56.384 296.512 296.512 0 0 0-39.872 26.048V396.8a558.336 558.336 0 0 0 320 83.2 558.208 558.208 0 0 0 320.064-83.2l-0.32 234.368a296 296 0 0 0-40.128-26.24 32 32 0 0 0-30.272 56.384c39.808 21.44 65.856 47.616 69.632 70.144 0.064 0.64 0.448 1.216 0.64 1.856v8.64c-8.448 61.824-146.432 122.048-319.616 122.048z" ></path><path d="M643.712 555.584h-0.064l-0.32-0.064h-0.128l-0.384-0.064h-0.064l-0.384-0.064h-0.064l-0.448-0.064-0.448-0.128h-0.512L640 554.88c-21.12-3.712-43.008-6.592-65.536-8.448h-1.088l-0.448-0.064-0.448-0.064h-1.088l-0.448-0.128h-0.64l-0.384-0.064H569.344l-0.384-0.064H565.056l-0.512-0.064H564.48l-0.832-0.064H562.944q-23.04-1.6-46.72-1.728h-0.064l-2.048 0.064L512 544h-17.664a731.84 731.84 0 0 0-109.696 10.816 32 32 0 1 0 11.072 63.04A674.304 674.304 0 0 1 512 608l2.048-0.064 1.984 0.064a669.504 669.504 0 0 1 116.16 10.56 32.448 32.448 0 0 0 5.76 0.512 32 32 0 0 0 5.76-63.488z" ></path></symbol><symbol id="iconyidimianji" viewBox="0 0 1024 1024"><path d="M903.808 616.704a17.92 17.92 0 0 0-5.76-5.12l-91.328-62.464-172.608-407.104a17.92 17.92 0 0 0-16.768-11.2 18.176 18.176 0 0 0-6.464 1.152 17.728 17.728 0 0 0-10.24 10.048L441.6 551.488 331.52 364.736a18.176 18.176 0 0 0-24.512-6.4 17.728 17.728 0 0 0-7.68 8.768L227.008 549.376 135.68 611.84a17.6 17.6 0 0 0-5.12 24.704 18.112 18.112 0 0 0 5.12 5.056l371.456 251.264a18.624 18.624 0 0 0 20.736 0l371.456-251.264a17.6 17.6 0 0 0 4.48-24.896zM597.12 724.48L516.48 535.552l32.448-83.52 103.296 242.048 26.752 19.264-54.528 36.928zM263.168 602.24l16.192-11.072 7.168-18.176 37.568-94.848 62.464 105.856 27.392 46.4-28.48 70.208-23.616 16.704L227.648 626.56z m254.336 220.352L418.56 755.648l19.264-13.632 47.296-116.928 55.744 130.688 30.4 30.464z m217.92-147.456l-31.36-22.592L582.08 366.72l37.12-95.808 128.64 303.232 7.296 17.28 15.488 10.56 36.352 24.896z" ></path></symbol><symbol id="iconzhibeizhen_1" viewBox="0 0 1024 1024"><path d="M893.381584 912.965706L544.259402 85.120532a34.560216 34.560216 0 0 0-18.944119-18.560116 35.20022 35.20022 0 0 0-45.568285 18.560116L130.560816 912.965706a33.472209 33.472209 0 0 0 5.760036 35.13622 35.520222 35.520222 0 0 0 49.280308 3.712023L512.0032 678.660242l326.40204 273.153707a35.584222 35.584222 0 0 0 35.968225 5.632035 33.792211 33.792211 0 0 0 19.008119-44.480278zM534.723342 607.875799a35.584222 35.584222 0 0 0-45.440284 0l-238.721492 199.809249L512.0032 187.649173l261.505634 620.035875z" ></path></symbol><symbol id="iconfenggeshezhi" viewBox="0 0 1024 1024"><path d="M832 128H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zM192 832V192h640v640z" ></path><path d="M704 320H320v64h160v320h64V384H704V320z" ></path></symbol><symbol id="iconguangyunxian" viewBox="0 0 1024 1024"><path d="M896 117.504a32 32 0 0 0-32-32H601.088a30.592 30.592 0 0 0-6.464 1.28 287.04 287.04 0 0 0-252.16 142.656A284.032 284.032 0 0 0 313.6 305.088a283.712 283.712 0 0 0-51.008 62.912 284.16 284.16 0 0 0-28.736 74.432 284.16 284.16 0 0 0-50.048 62.08 287.616 287.616 0 0 0 69.76 367.68H157.312a32 32 0 0 0 0 64h262.784a30.656 30.656 0 0 0 5.952-1.216 279.68 279.68 0 0 0 285.312-216.96 284.032 284.032 0 0 0 50.048-62.08 284.096 284.096 0 0 0 28.992-75.584 283.904 283.904 0 0 0 51.008-62.976 287.616 287.616 0 0 0-70.08-367.936H864a32 32 0 0 0 32-32zM321.28 842.496a223.552 223.552 0 0 1-92.032-283.904 284.16 284.16 0 0 0 383.744 221.568 223.552 223.552 0 0 1-291.84 62.336z m332.288-157.76a222.976 222.976 0 0 1-361.92-208.96 221.888 221.888 0 0 1 25.984-17.92 284.48 284.48 0 0 0 338.432 195.392 222.4 222.4 0 0 1-2.56 31.488zM376 432.128a223.36 223.36 0 0 1 273.216 157.696 223.36 223.36 0 0 1-273.216-157.696z m356.608 114.88a220.864 220.864 0 0 1-25.024 17.024A284.48 284.48 0 0 0 369.152 368.64a220.16 220.16 0 0 1 2.24-30.208 223.04 223.04 0 0 1 361.216 208.576z m62.208-81.216a284.16 284.16 0 0 0-384.256-221.824 222.72 222.72 0 0 1 384.256 221.824z" ></path></symbol><symbol id="iconjiantou" viewBox="0 0 1024 1024"><path d="M947.328 486.528L729.216 321.28a32 32 0 1 0-38.656 51.008L832.768 480H96a32 32 0 0 0 0 64h737.536l-141.504 108.288a32 32 0 0 0 38.848 50.88l216.576-165.76a32 32 0 0 0-0.128-50.88z" ></path></symbol><symbol id="iconpinghangguang" viewBox="0 0 1024 1024"><path d="M864 704a32 32 0 0 0-32 32v50.752L182.656 137.408a32 32 0 0 0-45.248 45.184L786.752 832H736a32 32 0 0 0 0 64h128a32.128 32.128 0 0 0 32-32v-128a32 32 0 0 0-32-32zM928 384a32 32 0 0 0-32 32v50.752L502.656 73.408a32 32 0 0 0-45.248 45.248L850.752 512H800a32 32 0 0 0 0 64h128a32 32 0 0 0 32-32v-128a32 32 0 0 0-32-32zM544 768a32 32 0 0 0-32 32v50.752L118.656 457.408a32 32 0 0 0-45.248 45.184L466.752 896H416a32 32 0 0 0 0 64h128a32 32 0 0 0 32-32v-128a32 32 0 0 0-32-32z" ></path></symbol><symbol id="iconjuguangdeng" viewBox="0 0 1024 1024"><path d="M928 639.36h-832a32 32 0 0 1-24.832-52.16l416-512a33.088 33.088 0 0 1 49.664 0l416 512a32 32 0 0 1-24.832 52.224z m-764.8-64h697.6L512 146.176zM512 960a32 32 0 0 1-32-32v-129.408a32 32 0 0 1 64 0V928a32 32 0 0 1-32 32zM799.36 883.008a32 32 0 0 1-43.712-11.712l-64.64-112a32 32 0 1 1 55.36-32l64.704 112a32 32 0 0 1-11.712 43.712zM224.64 883.008a32 32 0 0 1-11.712-43.712l64.64-112a32 32 0 0 1 55.488 32l-64.64 112a32 32 0 0 1-43.776 11.712z" ></path></symbol><symbol id="icondianguangyuan" viewBox="0 0 1024 1024"><path d="M512 256a255.232 255.232 0 0 0-128 476.48V768a64 64 0 0 0 64 64h128a64 64 0 0 0 64-64v-35.52A255.232 255.232 0 0 0 512 256z m95.808 421.12L576 695.68V768H448v-72.32l-31.808-18.56A189.888 189.888 0 0 1 320 512a192 192 0 0 1 384 0 189.888 189.888 0 0 1-96.192 165.12zM544 896h-64a32 32 0 0 0 0 64h64a32 32 0 0 0 0-64zM512 193.472a32 32 0 0 0 32-32v-64a32 32 0 1 0-64 0v64a32 32 0 0 0 32 32zM287.36 285.44a32 32 0 0 0 0-45.248l-45.312-45.248a32 32 0 0 0-45.248 45.248l45.248 45.248a32 32 0 0 0 45.248 0zM161.472 477.312h-64a32 32 0 1 0 0 64h64a32 32 0 1 0 0-64zM923.84 480h-64a32 32 0 0 0 0 64h64a32 32 0 1 0 0-64zM826.432 196.8a32 32 0 0 0-45.312 0l-45.248 45.248a32 32 0 0 0 45.248 45.248l45.312-45.248a32 32 0 0 0 0-45.248z" ></path><path d="M534.656 416.896L512 439.616l-22.656-22.656a32 32 0 0 0-45.248 45.312l35.904 35.84V608a32 32 0 0 0 64 0V498.048l35.84-35.84a32 32 0 0 0-45.184-45.248z" ></path></symbol><symbol id="iconkongjianfenxi" viewBox="0 0 1024 1024"><path d="M864.256 263.936l-320-190.976a62.72 62.72 0 0 0-64.512 0l-320 190.912A65.792 65.792 0 0 0 128 320.384v383.232a65.792 65.792 0 0 0 31.744 56.576l320 190.912a62.784 62.784 0 0 0 64.512 0l320-190.912a65.792 65.792 0 0 0 31.744-56.576V320.512a65.792 65.792 0 0 0-31.744-56.576zM480 533.888v341.568L192 703.616V325.12l109.76-67.136L512 129.472l287.68 171.712-289.28 178.24a64 64 0 0 0-30.4 54.464z m352 169.728l-288 171.84V531.52L832 357.696z" ></path></symbol><symbol id="iconzhuye" viewBox="0 0 1024 1024"><path d="M350.016 584A162.176 162.176 0 0 0 512 745.984 162.176 162.176 0 0 0 673.984 584 162.176 162.176 0 0 0 512 422.016 162.176 162.176 0 0 0 350.016 584z m259.968 0a97.984 97.984 0 1 1-195.968 0 97.984 97.984 0 0 1 195.968 0z m321.792-110.08L537.6 99.84a36.032 36.032 0 0 0-49.472-0.064l-395.84 374.08a36.032 36.032 0 0 0 49.472 52.288l19.2-18.176v394.048c0 19.84 16.128 35.968 36.032 35.968h630.016c19.84 0 35.968-16.128 35.968-35.968v-280a8 8 0 0 0-8-8h-56a8 8 0 0 0-8 8v243.968H233.024V440l279.808-264.512L882.176 526.08a36.032 36.032 0 1 0 49.6-52.16z" ></path></symbol><symbol id="iconwangge" viewBox="0 0 1024 1024"><path d="M832 128H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64z m0 224h-160V192H832zM414.08 609.92V416H608v193.92z m193.92 64V832H414.08v-158.08z m-257.92-64H192V416h158.08z m64-257.92V192H608v160z m257.92 64H832v193.92h-160zM350.08 192v160H192V192zM192 673.92h158.08V832H192zM672 832v-158.08H832V832z" ></path></symbol><symbol id="iconchunse" viewBox="0 0 1024 1024"><path d="M128 128m64 0l640 0q64 0 64 64l0 640q0 64-64 64l-640 0q-64 0-64-64l0-640q0-64 64-64Z" ></path></symbol><symbol id="iconshui" viewBox="0 0 1024 1024"><path d="M480 190.688c113.824 128.64 256 321.088 256 417.312 0 141.152-114.848 256-256 256s-256-114.848-256-256c0-96.224 142.176-288.64 256-417.312M480 96S160 431.264 160 608s143.264 320 320 320 320-143.264 320-320S480 96 480 96z" ></path><path d="M479.968 799.584A32 32 0 0 1 475.04 736a158.848 158.848 0 0 0 133.6-118.688c3.584-17.28 20.192-28.288 37.664-24.96 17.28 3.52 28.48 20.16 25.088 37.408-1.152 5.888-30.016 144.864-186.432 169.504a33.568 33.568 0 0 1-4.992 0.352z" ></path></symbol><symbol id="iconyanhua" viewBox="0 0 1024 1024"><path d="M512 480a32 32 0 1 1 0 64 32 32 0 0 1 0-64m0-64c-52.928 0-96 43.072-96 96s43.072 96 96 96 96-43.072 96-96-43.072-96-96-96zM512 353.6a32 32 0 0 1-32-32V128a32 32 0 1 1 64 0v193.6a32 32 0 0 1-32 32zM400 400a32 32 0 0 1-45.248 0L217.856 263.104a32 32 0 1 1 45.248-45.248l136.896 136.864a32 32 0 0 1 0 45.28zM353.6 512a32 32 0 0 1-32 32H128a32 32 0 1 1 0-64h193.6a32 32 0 0 1 32 32zM400 624a32 32 0 0 1 0 45.248l-136.896 136.896a32 32 0 1 1-45.248-45.248l136.896-136.896a32 32 0 0 1 45.248 0zM512 670.4a32 32 0 0 1 32 32V896a32 32 0 1 1-64 0v-193.6a32 32 0 0 1 32-32zM624 624a32 32 0 0 1 45.248 0l136.896 136.896a32 32 0 1 1-45.248 45.248L624 669.248a32 32 0 0 1 0-45.248zM670.4 512a32 32 0 0 1 32-32H896a32 32 0 1 1 0 64h-193.6a32 32 0 0 1-32-32zM624 400a32 32 0 0 1 0-45.248l136.896-136.896a32 32 0 1 1 45.248 45.248L669.248 400a32 32 0 0 1-45.248 0z" ></path><path d="M640 192m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M376.224 195.232m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M192 384m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M195.232 647.776m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M384 832m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M647.776 828.768m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M832 640m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path><path d="M828.768 376.224m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" ></path></symbol><symbol id="iconhuoyan" viewBox="0 0 1024 1024"><path d="M431.808 928.288a30.944 30.944 0 0 1-5.056-0.416c-144-23.04-235.584-152.736-259.84-263.424-22.144-101.376 8.448-191.264 81.92-240.384 196.768-131.616 178.432-288.832 178.24-290.432a31.936 31.936 0 0 1 44.416-33.536c143.296 62.112 178.624 187.84 176.448 282.24l45.248-29.408a32.032 32.032 0 0 1 43.2 7.872c117.408 159.616 154.144 292.992 109.184 396.352-63.104 145.152-261.504 169.92-269.92 170.88a32 32 0 0 1-28.672-51.84c75.968-94.592 49.28-139.488 9.152-173.92-37.984-32.512-62.752-84.288-76.448-120.224-56.224 37.696-87.712 80.192-93.824 126.624-11.456 87.04 67.328 163.776 68.128 164.512a32.032 32.032 0 0 1-22.176 55.104z m65.696-426.432a32.064 32.064 0 0 1 31.04 24.064c6.272 24.416 30.976 94.976 69.248 127.808 63.296 54.24 77.856 118.88 43.648 192.832 52.384-17.888 118.24-52.128 145.536-115.168 32.96-76.16 4.48-179.712-84.608-308.128l-77.824 50.528a32 32 0 0 1-48.32-35.2c1.92-7.36 42.304-168.48-87.136-256.32-9.184 69.632-48.96 190.784-204.672 294.976-73.12 48.96-62.784 137.6-54.944 173.504 14.016 63.968 55.136 132.8 114.976 175.264-16.608-35.52-28.16-78.848-22.016-125.664 10.016-76.224 63.744-141.664 159.68-194.56a32 32 0 0 1 15.36-3.936z" ></path></symbol><symbol id="iconzanwuziyuan" viewBox="0 0 1024 1024"><path d="M645.228 63.419L817 238.004v409.814c56.069 25.773 95 82.432 95 148.182 0 90.022-72.978 163-163 163-3.049 0-6.078-0.084-9.085-0.249-3.575 0.44-7.218 0.668-10.915 0.668H136c-13.255 0-24-10.745-24-24v-848c0-13.255 10.745-24 24-24h509.228z" fill="#C5C5C5" fill-opacity=".4" ></path><path d="M235 349h456q4 0 4 4v16q0 4-4 4H235q-4 0-4-4v-16q0-4 4-4zM235 533h456q4 0 4 4v16q0 4-4 4H235q-4 0-4-4v-16q0-4 4-4zM235 717h224q4 0 4 4v16q0 4-4 4H235q-4 0-4-4v-16q0-4 4-4z" fill="#ABABAB" fill-opacity=".574" ></path><path d="M586 796a163 163 0 1 0 326 0 163 163 0 1 0-326 0z" fill="#C5C5C5" fill-opacity=".461" ></path><path d="M645.228 63.419v158.585c0 8.836 7.163 16 16 16H817L645.228 63.419z" fill="#ABABAB" fill-opacity=".6" ></path><path d="M765.5 849.5a4 4 0 0 1 4 4v32a4 4 0 0 1-4 4h-32a4 4 0 0 1-4-4v-32a4 4 0 0 1 4-4h32z m-2-147a4 4 0 0 1 4 4v119a4 4 0 0 1-4 4h-28a4 4 0 0 1-4-4v-119a4 4 0 0 1 4-4h28z" fill-opacity=".302" ></path></symbol><symbol id="iconzanwuditu" viewBox="0 0 1024 1024"><path d="M530.048 98.66l359.155 206.35c7.662 4.402 10.305 14.182 5.903 21.844a16 16 0 0 1-6.133 6.032L529.306 531.7a36 36 0 0 1-34.817 0.008L135.034 333.237c-7.735-4.272-10.544-14.005-6.273-21.74a16 16 0 0 1 6.03-6.137L494.166 98.668a36 36 0 0 1 35.882-0.008z" fill="#ABABAB" fill-opacity=".574" ></path><path d="M523.948 826.284l11.61 21.005-6.246 3.453a36 36 0 0 1-34.345 0.265l-0.473-0.257-4.113-2.27 11.6-21.01 4.114 2.27a12 12 0 0 0 11.285 0.169l0.32-0.171 6.248-3.454z m-68.363-24.433l31.515 17.401-11.601 21.01-31.515-17.4 11.6-21.011z m114.748-1.207l11.61 21.004-31.506 17.416-11.61-21.004 31.506-17.416z m-161.146-24.411l31.515 17.4-11.6 21.01-31.515-17.4 11.6-21.01z m207.53-1.23l11.612 21.005-31.507 17.416-11.61-21.005 31.506-17.416zM362.79 750.614l31.515 17.402-11.6 21.01-31.516-17.401 11.601-21.01z m300.313-1.251l11.61 21.004-31.506 17.416-11.61-21.004 31.506-17.416z m-346.71-24.367l31.515 17.401-11.6 21.01-31.516-17.4 11.6-21.01z m393.095-1.274l11.61 21.004-31.506 17.417-11.61-21.005 31.506-17.416z m-439.493-24.344l31.516 17.401-11.601 21.01-31.515-17.4 11.6-21.011z m485.878-1.297l11.61 21.005-31.506 17.416-11.611-21.004 31.507-17.417zM223.598 673.76l31.515 17.4-11.6 21.01-31.515-17.4 11.6-21.01z m578.66-1.32l11.61 21.005-31.506 17.417-11.611-21.005 31.507-17.416z m-278.31-8.156l11.61 21.005-6.246 3.453a36 36 0 0 1-34.345 0.265l-0.473-0.257-4.113-2.27 11.6-21.01 4.114 2.27a12 12 0 0 0 11.285 0.169l0.32-0.171 6.248-3.454z m-346.747-16.142l31.515 17.4-11.6 21.01-31.516-17.4 11.601-21.01z m671.442-1.342l11.61 21.005-31.506 17.416-11.611-21.004 31.507-17.417z m-393.058-6.949l31.515 17.401-11.601 21.01-31.515-17.4 11.6-21.011z m114.748-1.207l11.61 21.004-31.506 17.416-11.61-21.004 31.506-17.416zM123.06 624.22l24 0.118a11.993 11.993 0 0 0 5.915 10.42l0.288 0.165 9.056 5-11.6 21.01-9.056-5a35.988 35.988 0 0 1-18.602-31.241l-0.001-0.472z m777.712-3.659c0.726 7.36-0.82 14.793-4.574 21.38a36.089 36.089 0 0 1-13.318 13.35l-0.522 0.294-7.226 3.994-11.611-21.004 7.226-3.995a12.037 12.037 0 0 0 4.62-4.56 11.887 11.887 0 0 0 1.553-6.714l-0.032-0.387 23.884-2.358z m-491.585-6.33l31.515 17.402-11.6 21.01-31.515-17.401 11.6-21.01z m207.53-1.229l11.612 21.005-31.507 17.416-11.61-21.005 31.506-17.416zM362.79 588.614l31.515 17.402-11.6 21.01-31.516-17.401 11.601-21.01z m300.313-1.251l11.61 21.004-31.506 17.416-11.61-21.004 31.506-17.416z m-497.61-8.17l11.965 20.804-24.377 14.02a12 12 0 0 0-2.749 2.17l-0.295 0.326-18.054-15.813a36 36 0 0 1 8.53-7.132l0.603-0.355 24.377-14.02z m691.19-1.378l26.193 15.05a36.081 36.081 0 0 1 6.424 4.699l0.527 0.493-16.578 17.354a12.004 12.004 0 0 0-1.966-1.52l-0.363-0.217-26.193-15.05 11.956-20.81z m-540.29-14.819l31.515 17.401-11.6 21.01-31.516-17.4 11.6-21.01z m393.095-1.274l11.61 21.004-31.506 17.417-11.61-21.005 31.506-17.416z m-498.052-8.954l11.965 20.805-31.206 17.948-11.966-20.804 31.207-17.949z m599.291-1.356l31.215 17.934-11.956 20.81-31.215-17.934 11.956-20.81z m-540.732-14.034l31.516 17.401-11.601 21.01-31.515-17.4 11.6-21.011z m485.878-1.297l11.61 21.005-31.506 17.416-11.611-21.004 31.507-17.417zM223.598 511.76l31.515 17.4-11.6 21.01-31.515-17.4 11.6-21.01z m578.66-1.32l11.61 21.005-31.506 17.417-11.611-21.005 31.507-17.416zM177.2 486.143l31.515 17.4-11.6 21.01-31.516-17.4 11.601-21.01z m671.442-1.342l11.61 21.005-31.506 17.416-11.611-21.004 31.507-17.417z m-725.582-22.58l24 0.118a11.993 11.993 0 0 0 5.915 10.42l0.288 0.165 9.056 5-11.6 21.01-9.056-5a35.988 35.988 0 0 1-18.602-31.241l-0.001-0.472z m777.712-3.659c0.726 7.36-0.82 14.793-4.574 21.38a36.089 36.089 0 0 1-13.318 13.35l-0.522 0.294-7.226 3.994-11.611-21.004 7.226-3.995a12.037 12.037 0 0 0 4.62-4.56 11.887 11.887 0 0 0 1.553-6.714l-0.032-0.387 23.884-2.358z m-735.28-41.37l11.966 20.805-24.377 14.02a12 12 0 0 0-2.749 2.17l-0.295 0.326-18.054-15.813a36 36 0 0 1 8.53-7.132l0.603-0.355 24.377-14.02z m691.19-1.377l26.194 15.05a36.081 36.081 0 0 1 6.424 4.699l0.527 0.493-16.578 17.354a12.004 12.004 0 0 0-1.966-1.52l-0.363-0.217-26.193-15.05 11.956-20.81z m-645.246-25.047l11.965 20.805-31.206 17.948-11.966-20.804 31.207-17.949z m599.291-1.356l31.215 17.934-11.956 20.81-31.215-17.934 11.956-20.81z" fill="#C5C5C5" fill-opacity=".461" ></path></symbol><symbol id="iconfuwei" viewBox="0 0 1024 1024"><path d="M512 97.216c133.888 0 256.64 63.808 333.888 167.744V148.8l0.448-5.76a32 32 0 0 1 63.488 5.76v192l-0.512 5.76a32 32 0 0 1-31.488 26.24h-192l-5.76-0.576a32 32 0 0 1-26.24-31.424l0.512-5.76a32 32 0 0 1 31.488-26.24h112.768a352 352 0 1 0 64.32 232.064 32 32 0 0 1 63.808 4.928A416 416 0 1 1 512 97.152z" ></path></symbol><symbol id="icongengduo" viewBox="0 0 1024 1024"><path d="M510.976 224m-96 0a96 96 0 1 0 192 0 96 96 0 1 0-192 0Z" ></path><path d="M510.976 512m-96 0a96 96 0 1 0 192 0 96 96 0 1 0-192 0Z" ></path><path d="M513.024 800m-96 0a96 96 0 1 0 192 0 96 96 0 1 0-192 0Z" ></path></symbol><symbol id="iconsuoxiao" viewBox="0 0 1024 1024"><path d="M864 544a32 32 0 0 0 0-64h-704a32 32 0 0 0 0 64z" ></path></symbol><symbol id="iconfangda" viewBox="0 0 1024 1024"><path d="M864 480h-320v-320a32 32 0 0 0-64 0v320h-320a32 32 0 0 0 0 64h320v320a32 32 0 0 0 64 0v-320h320a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconceju" viewBox="0 0 1024 1024"><path d="M896 384H128a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V448a64 64 0 0 0-64-64z m0 448H128V448h768z" ></path><path d="M224 704a32 32 0 0 0 32-32v-128a32 32 0 0 0-64 0v128a32 32 0 0 0 32 32zM415.68 704a32 32 0 0 0 32-32v-128a32 32 0 0 0-64 0v128a32 32 0 0 0 32 32zM608 768a32 32 0 0 0 32-32v-192a32 32 0 0 0-64 0v192a32 32 0 0 0 32 32zM800 704a32 32 0 0 0 32-32v-128a32 32 0 0 0-64 0v128a32 32 0 0 0 32 32zM96 256.896h829.696a32 32 0 0 0 0-64H96a32 32 0 0 0 0 64z" ></path></symbol><symbol id="iconcemian" viewBox="0 0 1024 1024"><path d="M845 115H179a64.07 64.07 0 0 0-64 64v666a64.07 64.07 0 0 0 64 64h666a64.07 64.07 0 0 0 64-64V179a64.07 64.07 0 0 0-64-64zM364.68 845H217.6L845 217.6v147.08zM845 443.87V591L591 845H443.87zM657.35 179h147.09L179 804.4V657.32zM179 578.13V431.05L431.06 179h147.09zM351.87 179L179 351.86V179z m318.27 666L845 670.14V845z" ></path></symbol><symbol id="icongou" viewBox="0 0 1024 1024"><path d="M809.792 214.272L433.088 729.28 267.584 502.272a8 8 0 0 0-6.4-3.264h-79.36a8 8 0 0 0-6.4 12.672l212.352 291.2a56.192 56.192 0 0 0 45.056 23.04h0.192a56.192 56.192 0 0 0 45.056-22.72l423.872-579.456a8 8 0 0 0-6.464-12.8h-79.36a8 8 0 0 0-6.4 3.328z" ></path></symbol><symbol id="iconbianjizzhou" viewBox="0 0 1024 1024"><path d="M879.616 642.048L544 454.72V238.592l137.344 137.408a32 32 0 0 0 45.248-45.248l-192-192a32 32 0 0 0-45.184 0l-192 192a32 32 0 0 0 45.248 45.248L480 238.592v217.856L144.512 641.92a32 32 0 0 0 0 56l353.6 195.52a32 32 0 0 0 31.168-0.064l350.4-195.584a32 32 0 0 0 0-55.872z m-366.08 186.88l-287.36-158.976L480 529.536v140.416a32 32 0 0 0 64 0V528l254.336 141.952z" ></path></symbol><symbol id="iconskin" viewBox="0 0 1024 1024"><path d="M940.65 267.88l-138.3-150.25A89.21 89.21 0 0 0 736.48 88h-34.91c-31.37 0-59.53 16.54-77.28 45.37-23.11 37-65.59 59.11-113.66 59.11-45.85 0-88.9-22.15-112.86-57.93A84.72 84.72 0 0 0 322.46 88h-30.24c-29.57 0-53 10.17-69.7 30.21L83.12 268.13l-0.12 0.13A98.22 98.22 0 0 0 57 335a94.11 94.11 0 0 0 26.35 66l80.75 87.66c16.15 17.55 39.4 28 62.19 28h2.46v347c0 39.93 31.19 72.41 69.52 72.41h427.49c38.33 0 69.52-32.48 69.52-72.41v-347h2.46c23.47 0 45.55-9.95 62.19-28l81.07-88a98.22 98.22 0 0 0 26-66.73 94.12 94.12 0 0 0-26.35-66.05zM888 351.82l-81 88.05c-4.41 4.78-8 4.78-9.22 4.78-2 0-6.13-1.47-9.21-4.75a37 37 0 0 0-26.91-11.65 38.49 38.49 0 0 0-38.34 38.54V864H300.77V466.79a38.49 38.49 0 0 0-38.34-38.54 37.05 37.05 0 0 0-26.92 11.66c-3.07 3.27-7.23 4.74-9.2 4.74s-6.21-1.52-9.23-4.79l-81.1-88-0.79-0.84c-8.51-8.66-8.16-24.17 0.75-33.9l139.76-150.3 1.18-1.2 1-1.35c1.32-1.6 4-4.23 14.32-4.23h30.21a12.69 12.69 0 0 1 11.24 7.36 36.93 36.93 0 0 0 2.41 4.41l0.1 0.16A200.38 200.38 0 0 0 409 238.85a213.44 213.44 0 0 0 101.63 25.63c35.9 0 71-8.64 101.49-25a194.45 194.45 0 0 0 73.31-68.12l0.13-0.21c6.86-11.18 13.75-11.18 16-11.18h34.94A17 17 0 0 1 749 166l139 151 0.8 0.85c8.56 8.7 8.2 24.25-0.8 33.97z" ></path><path d="M398 443h120q8 0 8 8v154q0 8-8 8H398q-8 0-8-8V451q0-8 8-8z" ></path></symbol><symbol id="iconuser" viewBox="0 0 1024 1024"><path d="M858.496 763.584a374.016 374.016 0 0 0-80.64-119.488 375.68 375.68 0 0 0-119.488-80.64l-1.152-0.448a247.936 247.936 0 1 0-290.432 0.128l-1.152 0.448c-44.8 18.944-85.056 46.016-119.552 80.64A375.68 375.68 0 0 0 136 901.824a8 8 0 0 0 8 8.192h60.032a8 8 0 0 0 7.936-7.808 298.112 298.112 0 0 1 87.808-204.288 298.048 298.048 0 0 1 212.224-88c80.192 0 155.52 31.232 212.224 87.936a298.112 298.112 0 0 1 87.744 204.288 7.936 7.936 0 0 0 8.064 7.808H880c4.48 0 8.128-3.712 8-8.192a372.672 372.672 0 0 0-29.44-138.24zM512 534.016a170.88 170.88 0 0 1-121.6-50.432 170.88 170.88 0 0 1-50.368-121.6c0-45.888 17.92-89.088 50.368-121.6A170.88 170.88 0 0 1 512 190.08c45.888 0 89.088 17.92 121.6 50.368a170.88 170.88 0 0 1 50.368 121.6 170.88 170.88 0 0 1-50.368 121.6A170.88 170.88 0 0 1 512 534.08z" ></path></symbol><symbol id="iconcegao" viewBox="0 0 1024 1024"><path d="M640 896V128a64 64 0 0 0-64-64H192a64 64 0 0 0-64 64v768a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64z m-448 0V128h384v768H192z" ></path><path d="M320 224a32 32 0 0 0 32 32h128a32 32 0 0 0 0-64h-128a32 32 0 0 0-32 32zM320 415.68a32 32 0 0 0 32 32h128a32 32 0 0 0 0-64h-128a32 32 0 0 0-32 32zM256 608a32 32 0 0 0 32 32h192a32 32 0 0 0 0-64h-192a32 32 0 0 0-32 32zM320 800a32 32 0 0 0 32 32h128a32 32 0 0 0 0-64h-128a32 32 0 0 0-32 32zM767.104 96v829.696a32 32 0 0 0 64 0V96a32 32 0 0 0-64 0z" ></path></symbol><symbol id="iconkapianshi" viewBox="0 0 1024 1024"><path d="M384 128H192c-38.4 0-64 25.6-64 64v192c0 38.4 25.6 64 64 64h192c38.4 0 64-25.6 64-64V192c0-38.4-25.6-64-64-64z m0 256H192V192h192v192zM384 576H192c-38.4 0-64 25.6-64 64v192c0 38.4 25.6 64 64 64h192c38.4 0 64-25.6 64-64v-192c0-38.4-25.6-64-64-64z m0 256H192v-192h192v192zM832 128h-192c-38.4 0-64 25.6-64 64v192c0 38.4 25.6 64 64 64h192c38.4 0 64-25.6 64-64V192c0-38.4-25.6-64-64-64z m0 256h-192V192h192v192zM832 576h-192c-38.4 0-64 25.6-64 64v192c0 38.4 25.6 64 64 64h192c38.4 0 64-25.6 64-64v-192c0-38.4-25.6-64-64-64z m0 256h-192v-192h192v192z" ></path></symbol><symbol id="iconliebiaoshi" viewBox="0 0 1024 1024"><path d="M384 128H192c-35.328 0-64 28.672-64 64v192c0 35.328 28.672 64 64 64h192c35.328 0 64-28.672 64-64V192c0-35.328-28.672-64-64-64z m0 256H192V192h192v192zM384 576H192c-35.328 0-64 28.672-64 64v192c0 35.328 28.672 64 64 64h192c35.328 0 64-28.672 64-64v-192c0-35.328-28.672-64-64-64z m0 256H192v-192h192v192zM607.744 224H864a32 32 0 0 0 0-64H607.744a32 32 0 0 0 0 64zM864 352H607.744a32 32 0 0 0 0 64H864a32 32 0 0 0 0-64zM864 608H607.744a32 32 0 0 0 0 64H864a32 32 0 0 0 0-64zM864 800H607.744a32 32 0 0 0 0 64H864a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconbianji" viewBox="0 0 1024 1024"><path d="M864 448a32 32 0 0 0-32 32V832H192V192h352a32 32 0 0 0 0-64H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V480a32 32 0 0 0-32-32z" ></path><path d="M341.056 526.08l-0.064-0.128-19.136 130.88a40 40 0 0 0 45.312 45.44l130.88-19.2a40.32 40.32 0 0 0 22.464-11.328l356.8-356.736a64 64 0 0 0 0-90.496l-77.824-77.824a64 64 0 0 0-90.496 0L352.32 503.552a40.32 40.32 0 0 0-11.264 22.464z m62.08 17.088l351.232-351.296 77.76 77.824L481.024 620.8l-91.072 13.312 13.248-91.008z" ></path></symbol><symbol id="iconbofang" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128zM402.624 319.488a32 32 0 0 1 44.736-6.912l252.544 184.832a32 32 0 0 1 0.064 51.584l-252.544 185.92a32 32 0 0 1-50.944-25.792V338.368a32 32 0 0 1 6.144-18.88z m57.856 81.984v244.352l166.464-122.496-166.4-121.856z" ></path></symbol><symbol id="iconbaocun" viewBox="0 0 1024 1024"><path d="M192 896a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h485.952a64 64 0 0 1 46.208 19.712l154.048 160.768A64 64 0 0 1 896 352.64V832a64 64 0 0 1-64 64H192z m485.952-704H192v640h64v-128a64 64 0 0 1 64-64h384a64 64 0 0 1 64 64v128h64V352.704L677.952 192zM704 704H320v128h384v-128zM512 256a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m0 64a64 64 0 1 0 0 128 64 64 0 0 0 0-128z" ></path></symbol><symbol id="iconchangjing" viewBox="0 0 1024 1024"><path d="M384 128H192a64.064 64.064 0 0 0-64 64v192a64.064 64.064 0 0 0 64 64h192a64.064 64.064 0 0 0 64-64V192a64.064 64.064 0 0 0-64-64z m0 256H192V192h192zM384 576H192a64.064 64.064 0 0 0-64 64v192a64.064 64.064 0 0 0 64 64h192a64.064 64.064 0 0 0 64-64v-192a64.064 64.064 0 0 0-64-64z m0 256H192v-192h192zM916.992 242.752l-135.68-135.744a64.064 64.064 0 0 0-90.56 0l-135.744 135.68a64.064 64.064 0 0 0 0 90.56l135.68 135.744a64.064 64.064 0 0 0 90.56 0l135.744-135.68a64.064 64.064 0 0 0 0-90.56zM736 423.68L600.256 288 736 152.256 871.744 288zM832 576h-192a64.064 64.064 0 0 0-64 64v192a64.064 64.064 0 0 0 64 64h192a64.064 64.064 0 0 0 64-64v-192a64.064 64.064 0 0 0-64-64z m0 256h-192v-192h192z" ></path></symbol><symbol id="icondaochu" viewBox="0 0 1024 1024"><path d="M704.384 128.384A64 64 0 0 1 768 184.96l0.448 7.424v33.6a32 32 0 0 1-63.488 5.76l-0.512-5.76v-33.6h-512v639.232h512v-28.928a32 32 0 0 1 63.488-5.76l0.512 5.76v28.928a64 64 0 0 1-56.512 63.552l-7.488 0.448h-512a64 64 0 0 1-63.552-56.576l-0.448-7.424V192.384a64 64 0 0 1 56.576-63.552l7.424-0.448h512z m51.072 225.28a32 32 0 0 1 45.248 0l135.744 135.68 3.712 4.48a32 32 0 0 1-3.712 40.832l-135.744 135.68-4.48 3.776a32 32 0 0 1-40.768-3.712l-3.712-4.48a32 32 0 0 1 3.712-40.768l81.088-81.216-475.776 0.064a32 32 0 0 1-5.76-63.488l5.76-0.512h475.776l-81.088-81.152-3.712-4.416a32 32 0 0 1 3.712-40.832z" ></path></symbol><symbol id="iconchexiao" viewBox="0 0 1024 1024"><path d="M302.848 401.984a32 32 0 0 1 3.712 40.832l-3.712 4.48a32 32 0 0 1-40.832 3.648l-4.416-3.712-135.744-135.744a32 32 0 0 1-3.712-40.832l3.712-4.48 135.744-135.68a32 32 0 0 1 48.96 40.768l-3.712 4.48-81.152 81.088h450.688l13.504 0.32A287.552 287.552 0 0 1 672.384 832H225.28l-5.76-0.512a32 32 0 0 1 5.76-63.488h447.04l12.224-0.32a223.552 223.552 0 0 0-12.224-446.848H221.632l81.28 81.152z" ></path></symbol><symbol id="iconcuowu" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128zM370.176 325.696l4.48 3.648 135.744 135.808 135.744-135.808 4.48-3.648a32 32 0 0 1 40.768 48.96L555.648 510.4l135.744 135.744a32 32 0 0 1-40.832 48.96l-4.416-3.712-135.744-135.744-135.744 135.744-4.48 3.712a32 32 0 0 1-40.832-48.96l135.808-135.744-135.808-135.744a32 32 0 0 1 40.832-48.96z" ></path></symbol><symbol id="iconfuzhi" viewBox="0 0 1024 1024"><path d="M704 256a64 64 0 0 1 64 64v512a64 64 0 0 1-64 64H192a64 64 0 0 1-64-64V320a64 64 0 0 1 64-64h512z m0 64H192v512h512V320z m129.088-190.976a64 64 0 0 1 63.552 56.512l0.448 7.488v565.056a32 32 0 0 1-63.488 5.76l-0.512-5.76V193.024H422.4a32 32 0 0 1-5.76-63.488l5.76-0.512h410.624z" ></path></symbol><symbol id="icondixing" viewBox="0 0 1024 1024"><path d="M951.68 736.448L663.872 224.64a64.128 64.128 0 0 0-111.744 0L440.896 422.4l-40.128-71.36a64.128 64.128 0 0 0-111.744 0l-216.704 385.28A64.128 64.128 0 0 0 128.192 832h767.616a64.128 64.128 0 0 0 55.872-95.552z m-607.04-353.92h0.256l59.2 105.344-157.44 280h-118.4z m-24.448 385.28l287.552-511.616 0.256-0.064 287.808 511.744z" ></path></symbol><symbol id="icondingwei" viewBox="0 0 1024 1024"><path d="M512 64.512a352 352 0 0 1 352 352c0 129.152-110.528 298.24-329.6 512.704a32 32 0 0 1-44.8 0C270.528 714.88 160 545.664 160 416.512a352 352 0 0 1 352-352z m0 64a288 288 0 0 0-288 288c0 99.84 90.368 244.416 272.64 429.44l15.36 15.36 15.36-15.36c176.192-178.88 266.496-320 272.32-419.328l0.32-10.112a288 288 0 0 0-288-288zM512 268.16a160 160 0 1 1 0 320 160 160 0 0 1 0-320z m0 64a96 96 0 1 0 0 192 96 96 0 0 0 0-192z" ></path></symbol><symbol id="iconfanhui" viewBox="0 0 1024 1024"><path d="M300.8 534.656a32 32 0 0 1-3.776-40.832l3.712-4.48 347.328-347.328a32 32 0 0 1 48.96 40.832l-3.712 4.48L368.64 512l324.672 324.672a32 32 0 0 1 3.712 40.832l-3.712 4.48a32 32 0 0 1-40.832 3.648l-4.416-3.648L300.8 534.656z" ></path></symbol><symbol id="iconfenxiang" viewBox="0 0 1024 1024"><path d="M768 128a128 128 0 1 1-94.08 214.784L441.6 467.328a160.064 160.064 0 0 1-0.512 91.136l232.32 123.2a128 128 0 1 1-30.016 56.512l-232.768-123.52a160 160 0 1 1 1.152-204.032l231.808-124.224A128 128 0 0 1 768 128z m0 576a64 64 0 1 0 0 128 64 64 0 0 0 0-128zM288 416a96 96 0 1 0 0 192 96 96 0 0 0 0-192zM768 192a64 64 0 1 0 0 128 64 64 0 0 0 0-128z" ></path></symbol><symbol id="iconjianshao" viewBox="0 0 1024 1024"><path d="M864 544a32 32 0 0 0 0-64h-704a32 32 0 0 0 0 64z" ></path></symbol><symbol id="iconfangyang" viewBox="0 0 1024 1024"><path d="M510.592009 63.9996H338.305086a63.9996 63.9996 0 0 0-46.207712 19.647877L144.450297 237.438516a63.9996 63.9996 0 0 0-17.855888 44.351723v243.454478a63.9996 63.9996 0 0 0 19.19988 45.631715l51.647677 50.879682a63.9996 63.9996 0 0 0 44.671721 18.303886l77.759514 0.255998-1.023994 255.422404a63.9996 63.9996 0 0 0 63.9996 64.255598h293.246167a63.9996 63.9996 0 0 0 45.247718-18.751883l154.559034-154.559034a63.9996 63.9996 0 0 0 18.751882-45.119718l0.831995-388.477572a63.9996 63.9996 0 0 0-26.879832-52.287673l-46.079712-32.895794a63.9996 63.9996 0 0 0-37.119768-11.903926H574.527609V127.9992a63.9996 63.9996 0 0 0-63.9996-63.9996zM338.369085 576.380398L242.369685 575.9964l-51.775676-50.815682V281.726239L338.305086 127.9992h172.286923v127.9992H414.272611a31.9998 31.9998 0 0 0 0 63.9996h371.069681l46.079712 32.895794-0.767996 388.541572-127.9992 127.9992V639.996a63.9996 63.9996 0 0 0-63.9996-63.9996H428.80052l104.511347-105.471341a31.9998 31.9998 0 0 0-0.255999-45.247717 31.615802 31.615802 0 0 0-22.39986-9.279942 32.0638 32.0638 0 0 0-22.847857 9.471941L338.369085 576.380398zM382.848807 895.9944l1.023994-255.422404V639.996h254.718408v255.9984z" ></path><path d="M574.591609 703.9956h-127.9992v127.9992h127.9992v-127.9992z" ></path></symbol><symbol id="iconshaixuan" viewBox="0 0 1024 1024"><path d="M828.224 146.048a32.064 32.064 0 0 0-28.224-16.896h-576a32 32 0 0 0-26.624 49.664l170.176 256a32 32 0 0 0 26.624 14.336h20.48v344.064a32.128 32.128 0 0 0 16.512 28.032l128 70.72a32.192 32.192 0 0 0 15.488 4.032 32 32 0 0 0 32-32V449.152h21.312a32 32 0 0 0 26.56-14.208l172.032-256a32 32 0 0 0 1.664-32.896z m-285.632 663.68l-64-35.392V449.152h64z m68.288-424.576H411.328l-127.616-192h456.192z" ></path></symbol><symbol id="icondaoru" viewBox="0 0 1024 1024"><path d="M704.384 128.384A64 64 0 0 1 768 184.96l0.448 7.424v33.6a32 32 0 0 1-63.488 5.76l-0.512-5.76v-33.6h-512v639.232h512v-28.928a32 32 0 0 1 63.488-5.76l0.512 5.76v28.928a64 64 0 0 1-56.512 63.552l-7.488 0.448h-512a64 64 0 0 1-63.552-56.576l-0.448-7.424V192.384a64 64 0 0 1 56.576-63.552l7.424-0.448h512z m-172.16 225.28a32 32 0 0 1 3.712 40.768l-3.648 4.48-81.152 81.024 456.32 0.064a32 32 0 0 1 5.76 63.488l-5.76 0.512h-456.32l81.152 81.152a32 32 0 0 1 3.648 40.832l-3.648 4.416a32 32 0 0 1-40.832 3.712l-4.48-3.712-135.68-135.744-1.28-1.344a32.192 32.192 0 0 1-1.536-1.856l2.752 3.2A32.128 32.128 0 0 1 341.888 512v-1.408c0-0.96 0.128-1.92 0.256-2.816L341.888 512a32.128 32.128 0 0 1 5.632-18.176l0.832-1.152a32.192 32.192 0 0 1 1.92-2.24l0.96-1.088 135.744-135.68a32 32 0 0 1 45.312 0z" ></path></symbol><symbol id="iconjianqie" viewBox="0 0 1024 1024"><path d="M201.344 137.344a32 32 0 0 1 45.312 0L512 402.752l265.344-265.408a32 32 0 0 1 48.96 40.832l-3.648 4.48L557.248 448l137.408 137.344 2.816 3.328a160 160 0 1 1-53.184 36.864L512 493.248 375.552 629.76a160 160 0 1 1-50.816-38.272l0.96-1.664 3.648-4.48L466.752 448 201.344 182.656l-3.648-4.48a32 32 0 0 1 3.648-40.832zM256 640a96 96 0 1 0 0 192 96 96 0 0 0 0-192z m504.128 0a96 96 0 1 0 0 192 96 96 0 0 0 0-192z" ></path></symbol><symbol id="iconmoxing" viewBox="0 0 1024 1024"><path d="M864 832H832V576a64 64 0 0 0-64-64h-128V192a64 64 0 0 0-64-64H256a64 64 0 0 0-64 64v640h-32a32 32 0 0 0 0 64h704a32 32 0 0 0 0-64zM256 832V192h320v640z m384 0V576h128v256z" ></path><path d="M480 320h-128a32 32 0 0 0 0 64h128a32 32 0 0 0 0-64zM480 512h-128a32 32 0 0 0 0 64h128a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconjinggao" viewBox="0 0 1024 1024"><path d="M544.512 97.92a64 64 0 0 1 22.656 22.656l400 678.912A64 64 0 0 1 912 896H112a64 64 0 0 1-55.168-96.512l400-678.912a64 64 0 0 1 87.68-22.656zM512 153.088L112 832h800L512 153.088z m-0.32 514.24c14.08 0 26.688 4.928 36.544 14.08a49.92 49.92 0 0 1 15.488 36.608 46.72 46.72 0 0 1-14.72 35.904c-9.856 9.856-22.528 14.08-37.312 14.08a48.768 48.768 0 0 1-36.608-14.08 46.72 46.72 0 0 1-14.848-35.904c0-14.08 4.992-26.752 14.848-36.608a51.648 51.648 0 0 1 36.608-14.08z m0-345.024c20.544 0 37.312 16.704 37.312 37.312V584.96a37.312 37.312 0 1 1-74.624 0V359.616c0-20.608 16.64-37.312 37.312-37.312z" ></path></symbol><symbol id="iconditu1" viewBox="0 0 1024 1024"><path d="M937.6 204.48a64 64 0 0 0-51.84-14.272l-245.12 40.96-243.584-90.048a64 64 0 0 0-22.208-3.968 64.832 64.832 0 0 0-10.176 0.832l-246.592 39.68a64 64 0 0 0-53.824 63.232V768a64 64 0 0 0 73.792 63.232l237.568-36.928 244.672 90.24a64.128 64.128 0 0 0 33.088 3.008l253.824-44.16a64 64 0 0 0 53.056-63.04V253.312a64 64 0 0 0-22.656-48.832z m-41.344 575.808l-253.824 44.16-260.288-95.936L128.256 768V240.896l246.592-39.744L634.432 296.96l261.76-43.712z" ></path><path d="M384 320a32 32 0 0 0-32 32v256a32 32 0 0 0 64 0v-256A32 32 0 0 0 384 320zM608 416v256a32 32 0 0 0 64 0v-256a32 32 0 0 0-64 0z" ></path></symbol><symbol id="iconshuaxin" viewBox="0 0 1024 1024"><path d="M512 97.216c133.888 0 256.64 63.808 333.888 167.744V148.8l0.448-5.76a32 32 0 0 1 63.488 5.76v192l-0.512 5.76a32 32 0 0 1-31.488 26.24h-192l-5.76-0.576a32 32 0 0 1-26.24-31.424l0.512-5.76a32 32 0 0 1 31.488-26.24h112.768a352 352 0 1 0 64.32 232.064 32 32 0 0 1 63.808 4.928A416 416 0 1 1 512 97.152z" ></path></symbol><symbol id="iconmima" viewBox="0 0 1024 1024"><path d="M832 384h-96V288a224 224 0 0 0-448 0V384H192a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V448a64 64 0 0 0-64-64zM352 288a160 160 0 0 1 320 0V384h-320zM832 832H192V448h640z" ></path><path d="M384 768h256a32 32 0 0 0 0-64H384a32 32 0 0 0 0 64z" ></path></symbol><symbol id="iconshuxingbiao" viewBox="0 0 1024 1024"><path d="M832 128H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64z m0 704H192V192h640z" ></path><path d="M288 512a32 32 0 0 0 0 64H384v96a32 32 0 0 0 64 0V576h128v96a32 32 0 0 0 64 0V576h96a32 32 0 0 0 0-64H640V384h96a32 32 0 0 0 0-64h-448a32 32 0 0 0 0 64H384v128zM448 384h128v128H448z" ></path></symbol><symbol id="iconguanbi" viewBox="0 0 1024 1024"><path d="M210.176 165.696l4.48 3.648 294.08 294.144 294.208-294.144 4.48-3.648a32 32 0 0 1 40.768 48.96L554.048 508.736l294.144 294.208a32 32 0 0 1-40.832 48.96l-4.48-3.712L508.8 554.048l-294.08 294.144-4.48 3.712a32 32 0 0 1-40.832-48.96l294.144-294.208-294.144-294.08a32 32 0 0 1 40.832-48.96z" ></path></symbol><symbol id="iconshangyiyiceng" viewBox="0 0 1024 1024"><path d="M530.176 134.144l4.48 3.712L785.92 389.12a32 32 0 0 1-40.832 48.96l-4.48-3.712L544 237.632v625.92a32 32 0 0 1-63.488 5.76l-0.512-5.76v-625.92L283.328 434.432a32 32 0 0 1-40.832 3.712l-4.48-3.712a32 32 0 0 1-3.648-40.832l3.648-4.48 251.328-251.264a32 32 0 0 1 40.832-3.712z" ></path></symbol><symbol id="iconshouqi" viewBox="0 0 1024 1024"><path d="M753.088 499.904L357.504 156.992a16 16 0 0 0-26.496 12.032V855.04a16 16 0 0 0 26.496 12.032l395.52-342.912a16 16 0 0 0 0-24.192z" ></path></symbol><symbol id="iconkejian" viewBox="0 0 1024 1024"><path d="M512 192c163.072 0 305.792 128.64 384.128 223.232l15.36 19.008 13.312 17.728 11.328 16.128 9.28 14.144 3.84 6.272 5.888 10.688c3.2 6.208 4.864 10.624 4.864 12.8a37.824 37.824 0 0 1-4.864 12.8l-5.952 10.688-8.128 13.12-4.928 7.296-11.328 16.128-13.376 17.728-15.296 19.008C817.792 703.36 675.072 832 512 832c-140.608 0-266.048-96-348.16-183.04l-18.88-20.672a844.864 844.864 0 0 1-8.768-10.048l-16.256-19.584-14.272-18.368-12.416-16.96-10.24-15.168-8.192-12.992C67.776 523.328 64 515.072 64 512c0-2.56 2.56-8.704 7.552-17.536l7.04-11.84 9.28-14.08 5.376-7.872 12.416-16.96 14.272-18.368 16.256-19.584c2.816-3.328 5.76-6.656 8.768-10.048l18.88-20.672C245.952 288 371.392 192 512 192z m0 64c-89.792 0-184.32 49.792-272.64 133.824a762.432 762.432 0 0 0-88.448 100.288l-6.784 9.536-8.32 12.352 8.32 12.352 6.784 9.536c24 32.832 54.656 68.096 88.448 100.288C327.68 718.208 422.208 768 512 768c89.92 0 184.448-49.664 272.704-133.44a755.072 755.072 0 0 0 88.32-100.224c4.8-6.464 9.088-12.672 12.8-18.368l2.56-4.032-5.44-8.256-9.856-14.08a755.072 755.072 0 0 0-88.384-100.16C696.448 305.6 601.92 256 512 256z m0 64.128a192 192 0 1 1 0 384 192 192 0 0 1 0-384z m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256z" ></path></symbol><symbol id="iconshanchu" viewBox="0 0 1088 1024"><path d="M927.552 192a32 32 0 1 1 0 64h-32.128v576a64 64 0 0 1-64 64H318.72a64 64 0 0 1-64-64V256h-33.088a32 32 0 1 1 0-64h705.92zM831.36 256H318.72v576h512.768V256z m-353.28 128a32 32 0 0 1 31.552 26.24l0.512 5.76v256a32 32 0 0 1-63.488 5.76l-0.512-5.76v-256a32 32 0 0 1 32-32z m192 0a32 32 0 0 1 31.552 26.24l0.512 5.76v256a32 32 0 0 1-63.488 5.76l-0.512-5.76v-256a32 32 0 0 1 32-32z m0.384-320a32 32 0 0 1 5.76 63.488l-5.76 0.512H478.208a32 32 0 0 1-5.76-63.488L478.208 64h192.32z" ></path></symbol><symbol id="iconsousuo" viewBox="0 0 1024 1024"><path d="M416 96a320 320 0 0 1 247.744 522.496l254.912 254.848a32 32 0 0 1-45.312 45.312L618.496 663.68A320 320 0 1 1 416 96z m0 64a256 256 0 1 0 0 512 256 256 0 0 0 0-512z" ></path></symbol><symbol id="iconshangchuan" viewBox="0 0 1024 1024"><path d="M864 640a32 32 0 0 1 31.488 26.24l0.512 5.76V832a64 64 0 0 1-56.576 63.552L832 896H192.832a64 64 0 0 1-63.616-56.512L128.832 832v-160a32 32 0 0 1 63.488-5.76l0.512 5.76V832H832v-160a32 32 0 0 1 32-32zM530.176 87.232l4.48 3.712 187.328 187.328a32 32 0 0 1-40.832 48.96l-4.48-3.712L544 190.848V672a32 32 0 0 1-63.488 5.76L480 672V190.848L347.328 323.52a32 32 0 0 1-40.832 3.712l-4.48-3.712a32 32 0 0 1-3.648-40.768l3.648-4.48 187.328-187.328a32 32 0 0 1 40.832-3.712z" ></path></symbol><symbol id="iconxiala" viewBox="0 0 1024 1024"><path d="M524.096 753.088l342.912-395.584a16 16 0 0 0-12.032-26.496H169.024a16 16 0 0 0-12.032 26.496l343.04 395.52a16 16 0 0 0 24.064 0z" ></path></symbol><symbol id="icontupian" viewBox="0 0 1024 1024"><path d="M896 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h768zM248.32 577.152c-38.336 0-87.04 4.544-120.32 11.52V832h517.376a436.736 436.736 0 0 0-397.12-254.848zM896 192H128v331.52a743.68 743.68 0 0 1 120.32-10.368 500.736 500.736 0 0 1 464.32 313.28l2.112 5.568H896V192z m-256 64a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m0 64a64 64 0 1 0 0 128 64 64 0 0 0 0-128z" ></path></symbol><symbol id="icontianjiashuju" viewBox="0 0 1024 1024"><path d="M864 736H768V640a32 32 0 0 0-64 0v96H608a32 32 0 0 0 0 64H704V896a32 32 0 0 0 64 0v-96h96a32 32 0 0 0 0-64z" ></path><path d="M602.368 883.392q-15.488 3.328-31.872 5.888A584.64 584.64 0 0 1 481.024 896c-169.728 0-288-67.456-288-128v-112.256a481.6 481.6 0 0 0 288 80.832 32 32 0 1 0 0-64c-169.728 0-288-67.456-288-128V431.168A481.536 481.536 0 0 0 481.024 512a481.536 481.536 0 0 0 288-80.832v82.88a32 32 0 0 0 64 0V320c0-107.648-154.624-192-352-192s-352 84.352-352 192v448c0 107.648 154.624 192 352 192a648.448 648.448 0 0 0 99.2-7.488q18.432-2.816 35.84-6.656a32 32 0 0 0-13.696-62.464zM481.024 192c169.664 0 288 67.456 288 128s-118.336 128-288 128-288-67.456-288-128 118.272-128 288-128z" ></path></symbol><symbol id="iconyichu" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 0 448 448 448 448 0 0 0-448-448z m0 832a384 384 0 1 1 384-384 384 384 0 0 1-384 384z" ></path><path d="M732.736 480.32l-447.232 0.512a32 32 0 0 0 5.76 63.488l447.232-0.576a32 32 0 0 0-5.76-63.488z" ></path></symbol><symbol id="iconxinjiangongcheng" viewBox="0 0 1024 1024"><path d="M896 256H529.92a32 32 0 0 1-22.528-9.28L406.336 146.56A64 64 0 0 0 361.28 128H128a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64z m0 576H128V192h233.28l101.056 100.16 7.04 6.336A96 96 0 0 0 529.92 320H896z" ></path><path d="M672 544h-128v-128a32 32 0 0 0-64 0v128h-128a32 32 0 0 0 0 64h128v128a32 32 0 0 0 64 0v-128h128a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconshezhi" viewBox="0 0 1024 1024"><path d="M544.256 82.816l320.192 186.688a64 64 0 0 1 31.744 55.296v374.4a64 64 0 0 1-31.744 55.296l-320.192 186.688a64 64 0 0 1-64.512 0L160 754.496a64 64 0 0 1-31.744-55.232V324.736a64 64 0 0 1 31.744-55.232l319.808-186.688a64 64 0 0 1 64.512 0zM512 138.112L192.192 324.736v374.528L512 885.888l320.192-186.688v-374.4L512 138.112zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384z m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256z" ></path></symbol><symbol id="iconxinjianwenjian" viewBox="0 0 1024 1024"><path d="M361.28 128a64 64 0 0 1 45.056 18.56l101.056 100.16A32 32 0 0 0 529.92 256H896a64 64 0 0 1 64 64v160a32 32 0 1 1-64 0V320H529.92a96 96 0 0 1-60.544-21.504l-7.04-6.336L361.28 192H128v640h416a32 32 0 1 1 0 64H128a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h233.28zM736 444.16a32 32 0 0 1 32 32v160h160a32 32 0 1 1 0 64H768v160a32 32 0 1 1-64 0v-160H544a32 32 0 1 1 0-64H704v-160a32 32 0 0 1 32-32z" ></path></symbol><symbol id="iconquantu" viewBox="0 0 1024 1024"><path d="M160 448a32 32 0 0 0 32-32V192h224a32 32 0 0 0 0-64H192a64 64 0 0 0-64 64v224a32 32 0 0 0 32 32zM832 128H608a32 32 0 0 0 0 64H832v224a32 32 0 0 0 64 0V192a64 64 0 0 0-64-64zM416 832H192V608a32 32 0 0 0-64 0V832a64 64 0 0 0 64 64h224a32 32 0 0 0 0-64zM864 576a32 32 0 0 0-32 32V832H608a32 32 0 0 0 0 64H832a64 64 0 0 0 64-64V608a32 32 0 0 0-32-32zM704 512a192 192 0 1 0-192 192 192 192 0 0 0 192-192z m-192 128a128 128 0 1 1 128-128 128.128 128.128 0 0 1-128 128z" ></path></symbol><symbol id="icontishi" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z m-0.32 276.032c20.544 0 37.312 16.704 37.312 37.312v289.344a37.312 37.312 0 0 1-74.624 0V441.344c0-20.608 16.64-37.312 37.312-37.312z m0-145.728c14.72 0 27.456 4.224 37.312 14.08a46.72 46.72 0 0 1 14.72 35.904 49.92 49.92 0 0 1-15.488 36.608 52.864 52.864 0 0 1-36.608 14.08 51.648 51.648 0 0 1-36.544-14.08 50.496 50.496 0 0 1-14.848-36.608 46.72 46.72 0 0 1 14.848-35.904 48.768 48.768 0 0 1 36.608-14.08z" ></path></symbol><symbol id="icontianjia" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z m0 131.584a32 32 0 0 1 31.488 26.24l0.512 5.76v188.672h188.736a32 32 0 0 1 5.76 63.488l-5.76 0.512H544v188.8a32 32 0 0 1-63.488 5.76l-0.512-5.76v-188.8H291.264a32 32 0 0 1-5.76-63.424l5.76-0.576H480V291.584a32 32 0 0 1 32-32z" ></path></symbol><symbol id="iconyingxiang" viewBox="0 0 1024 1024"><path d="M896 128H128a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64z m-256 64v128H384V192zM384 384h256v192H384zM128 192h192v128H128z m0 192h192v192H128z m0 448v-192h192v192z m256 0v-192h256v192z m512 0h-192v-192h192z m0-256h-192V384h192z m-192-256V192h192v128z" ></path><path d="M128 384h192v192H128zM704 640h192v192h-192z" fill="#bfbfbf" ></path></symbol><symbol id="iconxinjianfangan" viewBox="0 0 1024 1024"><path d="M543.232 832H192V192h512v289.152a32 32 0 1 0 64 0V192a64 64 0 0 0-64-64H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h351.232a32 32 0 1 0 0-64z" ></path><path d="M608 320h-320a32 32 0 0 0 0 64h320a32 32 0 0 0 0-64zM640 512a32 32 0 0 0-32-32h-320a32 32 0 0 0 0 64h320A32 32 0 0 0 640 512zM288 640a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64zM865.792 705.792H768V608a32 32 0 0 0-64 0v97.792H609.792a32 32 0 0 0 0 64H704V864a32 32 0 0 0 64 0v-94.208h97.792a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconshuju" viewBox="0 0 1024 1024"><path d="M513.024 96c210.048 0 384 79.04 384 192v448c0 112.96-173.952 192-384 192-204.16 0-374.272-74.752-383.616-182.656l-0.384-9.344v-448l0.384-9.344C138.752 170.752 308.8 96 513.024 96z m0 608.64c-132.608 0-250.816-31.552-320-83.2v114.56c0 63.808 141.248 128 320 128 173.184 0 311.168-60.224 319.616-122.048l0.384-5.952 0.064-114.624c-69.12 51.648-187.392 83.2-320 83.2z m320.064-307.84c-69.12 51.648-187.392 83.2-320 83.2-132.672 0-250.88-31.552-320.064-83.2v115.84c0 63.744 141.248 128 320 128 173.184 0 311.168-60.288 319.616-122.048l0.384-6.016z m-320-236.8c-178.816 0-320 64.192-320 128 0 63.808 141.184 128 320 128 178.688 0 320-64.192 320-128 0-63.808-141.312-128-320-128z" ></path></symbol><symbol id="icontuceng" viewBox="0 0 1024 1024"><path d="M933.952 665.6a32 32 0 0 1-6.848 40.448l-4.736 3.328-394.24 229.184a32 32 0 0 1-27.072 2.432l-5.12-2.432-387.648-225.28a32 32 0 0 1 26.944-57.792l5.248 2.432 371.456 215.936 378.24-219.776a32 32 0 0 1 43.776 11.52z m-1.024-173.568a32 32 0 0 1-6.848 40.448l-4.736 3.328-393.28 228.608a32 32 0 0 1-27.008 2.368l-5.12-2.368L105.792 537.6a32 32 0 0 1 26.944-57.792l5.248 2.432L512 699.712l377.216-219.264a32 32 0 0 1 43.712 11.584zM528.064 87.168l388.864 226.048a32 32 0 0 1 0 55.36L528.064 594.56a32 32 0 0 1-32.128 0L107.072 368.576a32 32 0 0 1 0-55.36l388.864-226.048a32 32 0 0 1 32.128 0zM512 151.808L186.752 340.864 512 529.92l325.184-189.056L512 151.808z" ></path></symbol><symbol id="iconxiayiyiceng" viewBox="0 0 1024 1024"><path d="M530.176 889.856l4.48-3.712L785.92 634.88a32 32 0 0 0-40.832-48.96l-4.48 3.712L544 786.368v-625.92a32 32 0 0 0-63.488-5.76l-0.512 5.76v625.92L283.328 589.568a32 32 0 0 0-40.832-3.712l-4.48 3.712a32 32 0 0 0-3.648 40.832l3.648 4.48 251.328 251.264a32 32 0 0 0 40.832 3.712z" ></path></symbol><symbol id="iconzhengque" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z m248.32 226.176a32 32 0 0 1 3.712 40.832l-3.712 4.48-291.2 291.2a32 32 0 0 1-40.832 3.712l-4.48-3.712-156.032-156.032a32 32 0 0 1 40.768-48.96l4.48 3.648 133.44 133.504 268.608-268.672a32 32 0 0 1 45.248 0z" ></path></symbol><symbol id="iconwenjian" viewBox="0 0 1024 1024"><path d="M361.28 128a64 64 0 0 1 45.056 18.56l101.056 100.16A32 32 0 0 0 529.92 256H896a64 64 0 0 1 64 64v512a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h233.28z m0 64H128v640h768V320H529.92a96 96 0 0 1-60.544-21.504l-7.04-6.336L361.28 192z m346.624 512a32 32 0 0 1 5.76 63.488l-5.76 0.512h-384a32 32 0 0 1-5.76-63.488l5.76-0.512h384z" ></path></symbol><symbol id="iconshijian" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z m0 131.584a32 32 0 0 1 31.488 26.24l0.512 5.76v207.168l147.008 147.008a32 32 0 0 1 3.712 40.832l-3.712 4.416a32 32 0 0 1-40.832 3.712l-4.48-3.712-156.352-156.352a32 32 0 0 1-8.96-17.6L480 512V291.584a32 32 0 0 1 32-32z" ></path></symbol><symbol id="icontingzhi" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z m128 192a64 64 0 0 1 64 64v256a64 64 0 0 1-64 64H384a64 64 0 0 1-64-64V384a64 64 0 0 1 64-64h256z m0 64H384v256h256V384z" ></path></symbol><symbol id="iconyidong" viewBox="0 0 1024 1024"><path d="M529.984 83.2l4.48 3.648 135.744 135.808a32 32 0 0 1-40.832 48.96l-4.48-3.712L544 187.008V480h292.992L755.84 398.848l-3.648-4.416a32 32 0 0 1 48.96-40.832l135.68 135.744 3.776 4.48a32 32 0 0 1-3.712 40.832l-135.744 135.68-4.48 3.776a32 32 0 0 1-40.832-3.712l-3.648-4.48a32 32 0 0 1 3.648-40.768L836.992 544H544.128v292.8l80.832-80.64 4.48-3.776a32 32 0 0 1 40.768 48.96l-135.744 135.808-4.48 3.712a32 32 0 0 1-40.768-3.712L353.408 801.28l-3.712-4.416a32 32 0 0 1 3.712-40.832l4.48-3.712a32 32 0 0 1 40.768 3.712l81.536 81.6-0.064-293.76H186.56l81.152 81.216a32 32 0 0 1 3.712 40.832l-3.712 4.416a32 32 0 0 1-40.832 3.712l-4.48-3.712-135.68-135.744a32 32 0 0 1-3.712-40.832l3.648-4.48 135.808-135.68a32 32 0 0 1 48.96 40.768l-3.712 4.48L186.56 480H480L480 186.496 398.72 267.904a32 32 0 0 1-40.832 3.712l-4.48-3.712a32 32 0 0 1-3.712-40.832l3.712-4.48 135.808-135.68a32 32 0 0 1 40.768-3.776z" ></path></symbol><symbol id="iconzhiding" viewBox="0 0 1024 1024"><path d="M530.176 280.32l4.48 3.648 251.328 251.328a32 32 0 0 1-40.832 48.96l-4.48-3.712L544 383.808v523.264a32 32 0 0 1-63.488 5.76l-0.512-5.76V383.808L283.328 580.544a32 32 0 0 1-40.832 3.712l-4.48-3.712a32 32 0 0 1-3.648-40.832l3.648-4.416 251.328-251.328a32 32 0 0 1 40.832-3.712zM864 128a32 32 0 0 1 5.76 63.488L864 192h-704a32 32 0 0 1-5.76-63.488L160 128h704z" ></path></symbol><symbol id="iconpingmian" viewBox="0 0 1024 1024"><path d="M832 128H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64z m0 224h-160V192H832zM414.08 609.92V416H608v193.92z m193.92 64V832H414.08v-158.08z m-257.92-64H192V416h158.08z m64-257.92V192H608v160z m257.92 64H832v193.92h-160zM350.08 192v160H192V192zM192 673.92h158.08V832H192zM672 832v-158.08H832V832z" ></path></symbol><symbol id="iconzhongmingming" viewBox="0 0 1024 1024"><path d="M480 640H128V384h352a32 32 0 0 0 0-64h-384a32 32 0 0 0-32 32v320a32 32 0 0 0 32 32h384a32 32 0 0 0 0-64zM928 320h-128a32 32 0 0 0 0 64H896v256h-96a32 32 0 0 0 0 64h128a32 32 0 0 0 32-32v-320a32 32 0 0 0-32-32z" ></path><path d="M224.896 480a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64zM736 832h-64V192h64a32 32 0 0 0 0-64h-192a32 32 0 0 0 0 64h64v640h-64a32 32 0 0 0 0 64h192a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconzhibeizhen" viewBox="0 0 1024 1024"><path d="M287.872 447.68h448.256a32 32 0 0 0 25.856-50.816L537.856 89.984a32 32 0 0 0-51.712 0L262.016 396.8a32 32 0 0 0 25.856 50.88zM735.936 577.216H288a32 32 0 0 0-25.856 50.88l224 306.816a32 32 0 0 0 51.648 0l223.936-306.816a32 32 0 0 0-25.856-50.88zM512 861.76l-160.96-220.544h321.92z" ></path></symbol><symbol id="iconzengjia" viewBox="0 0 1024 1024"><path d="M864 480h-320v-320a32 32 0 0 0-64 0v320h-320a32 32 0 0 0 0 64h320v320a32 32 0 0 0 64 0v-320h320a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconniantie" viewBox="0 0 1024 1024"><path d="M832 448a64 64 0 0 1 64 64v320a64 64 0 0 1-64 64H512a64 64 0 0 1-64-64V512a64 64 0 0 1 64-64h320zM513.28 128a64 64 0 0 1 64 64v0.192h62.464a64 64 0 0 1 63.616 56.512l0.384 7.488V351.36a32 32 0 0 1-63.488 5.76l-0.512-5.76V256.192H577.28l-0.384 7.296A64 64 0 0 1 513.216 320h-192a64 64 0 0 1-64-63.808H192.32v511.872H352a32 32 0 0 1 5.76 63.488l-5.76 0.512H192.32a64 64 0 0 1-63.552-56.512L128.32 768V256.192a64 64 0 0 1 56.512-63.552l7.488-0.448H257.28V192a64 64 0 0 1 64-64h192zM832 512H512v320h320V512zM513.28 192h-192v64h192V192z" ></path></symbol><symbol id="iconzuidahua" viewBox="0 0 1024 1024"><path d="M416 128H192a64 64 0 0 0-64 64v224a32 32 0 0 0 64 0V192h224a32 32 0 0 0 0-64zM832 128H608a32 32 0 0 0 0 64H832v224a32 32 0 0 0 64 0V192a64 64 0 0 0-64-64zM416 832H192V608a32 32 0 0 0-64 0V832a64 64 0 0 0 64 64h224a32 32 0 0 0 0-64zM864 576a32 32 0 0 0-32 32V832H608a32 32 0 0 0 0 64H832a64 64 0 0 0 64-64V608a32 32 0 0 0-32-32z" ></path></symbol><symbol id="iconyiwen" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128z m-4.608 539.328c14.784 0 27.52 4.224 37.312 14.08a46.72 46.72 0 0 1 14.848 35.904 49.344 49.344 0 0 1-14.848 36.608 55.936 55.936 0 0 1-37.248 14.08 46.72 46.72 0 0 1-35.968-14.784 46.976 46.976 0 0 1-15.488-35.904c0-14.784 4.928-26.752 15.488-35.904 9.216-9.856 21.12-14.08 35.904-14.08z m12.032-411.84c45.76 0 82.368 11.968 110.464 37.312 27.52 24.64 41.6 58.432 41.6 100.672 0 34.496-9.216 63.36-26.112 85.888L640 485.248l-8.64 8.448-11.968 11.008-33.856 29.568a122.368 122.368 0 0 0-28.8 35.904c-6.208 11.264-9.216 17.408-10.24 25.6l-0.384 7.68 0.064-2.88a38.4 38.4 0 0 1-75.072 11.328l-0.832-3.52 0.192 1.28a38.528 38.528 0 0 1 0.32-19.392c1.6-14.016 5.76-25.984 12.736-39.808 8.064-16.128 27.392-38.4 58.112-67.2l22.144-20.096 11.968-13.376c12.608-16.192 18.944-33.088 18.944-51.392 0-24.64-7.04-43.648-20.416-57.728-14.08-14.08-33.792-21.12-59.136-21.12-31.616 0-54.848 9.856-68.928 29.568-12.736 16.896-17.088 33.92-17.088 64.896l-0.32 0.64 0.32-3.264a38.4 38.4 0 0 1-75.776 8.96l-1.024-7.104 0.128-5.76c1.472-39.04 16.512-78.976 45.184-106.944 29.568-30.272 70.4-45.056 121.792-45.056z" ></path></symbol><symbol id="iconzhidi" viewBox="0 0 1024 1024"><path d="M864 832a32 32 0 0 1 5.76 63.488L864 896h-704a32 32 0 0 1-5.76-63.488L160 832h704zM512 82.56a32 32 0 0 1 31.488 26.24l0.512 5.76v523.264l196.672-196.672a32 32 0 0 1 40.832-3.712l4.48 3.712a32 32 0 0 1 3.648 40.832l-3.648 4.416-251.328 251.328a32 32 0 0 1-40.832 3.712l-4.48-3.712L238.08 486.4a32 32 0 0 1 40.832-48.96l4.48 3.712L480 637.824V114.56a32 32 0 0 1 32-32z" ></path></symbol><symbol id="iconyincang" viewBox="0 0 1024 1024"><path d="M816.384 81.792a32 32 0 0 1 5.312 40.64l-3.52 4.544-109.952 119.232c122.944 73.472 250.88 222.784 250.88 270.72 0 89.216-252.544 329.152-448 329.152-90.176 0-178.56-37.632-261.888-102.528L123.648 879.36a32 32 0 0 1-50.56-38.848l3.52-4.544L771.2 83.584a32 32 0 0 1 45.184-1.792z m-152.832 212.544l-50.24 54.656a192 192 0 1 1-255.872 277.12l-64.704 70.08 1.088 0.896c71.36 54.336 145.088 84.992 217.28 84.992 91.712 0 185.6-49.28 272.128-131.52 32.64-30.976 62.144-64.96 85.312-96.704l12.16-17.536 9.216-13.824c2.56-3.84 4.352-6.08 4.928-6.08l0.192 0.384-0.384-2.56a78.336 78.336 0 0 0-10.432-18.944l-9.856-13.44-12.48-15.616a700.8 700.8 0 0 0-14.912-17.28l-17.024-18.56-9.216-9.6-19.584-19.584a966.592 966.592 0 0 0-10.368-9.856l-21.504-19.712c-33.6-29.696-70.4-57.792-105.728-77.312zM568.704 397.44l-166.592 180.48a128 128 0 1 0 166.592-180.48z m-57.6-209.6a32 32 0 1 1 0 64c-91.712 0-185.472 49.344-272.128 131.84a735.36 735.36 0 0 0-85.312 96.832l-9.92 14.144-11.52 17.216a84.48 84.48 0 0 1-2.56 3.456l-0.96 0.96 1.856 2.56 6.72 10.816c10.24 16 24.32 35.2 40.64 55.04a32 32 0 1 1-49.344 40.704l-15.808-19.712c-2.496-3.2-4.928-6.4-7.232-9.6l-13.184-18.176c-18.176-26.496-29.248-48.32-29.248-60.928 0-88.576 252.8-329.152 448-329.152z" ></path></symbol><symbol id="iconzhongzuo" viewBox="0 0 1024 1024"><path d="M705.6 130.496a32 32 0 0 1 45.248 0l135.808 135.68 3.648 4.48a32 32 0 0 1-3.648 40.832l-135.808 135.744-4.416 3.712a32 32 0 0 1-40.832-3.712l-3.712-4.416a32 32 0 0 1 3.712-40.832l81.152-81.152h-435.2a223.552 223.552 0 0 0-12.224 446.848l12.224 0.32h447.04a32 32 0 0 1 5.76 63.488l-5.76 0.512H351.552a287.552 287.552 0 0 1-13.504-574.848l13.504-0.32h435.136l-81.088-81.088-3.712-4.48a32 32 0 0 1 3.712-40.768z" ></path></symbol><symbol id="iconzanting" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1 0 896A448 448 0 0 1 512 64z m0 64a384 384 0 1 0 0 768A384 384 0 0 0 512 128zM384.96 320a32 32 0 0 1 31.488 26.24l0.512 5.76v320a32 32 0 0 1-63.488 5.76l-0.512-5.76v-320a32 32 0 0 1 32-32z m255.168 0a32 32 0 0 1 31.488 26.24l0.512 5.76v320a32 32 0 0 1-63.488 5.76l-0.512-5.76v-320a32 32 0 0 1 32-32z" ></path></symbol><symbol id="iconzuixiaohua" viewBox="0 0 1024 1024"><path d="M416 128a32 32 0 0 0-32 32V384H160a32 32 0 0 0 0 64H384a64 64 0 0 0 64-64V160a32 32 0 0 0-32-32zM640 448h224a32 32 0 0 0 0-64H640V160a32 32 0 0 0-64 0V384a64 64 0 0 0 64 64zM384 576H160a32 32 0 0 0 0 64H384v224a32 32 0 0 0 64 0V640a64 64 0 0 0-64-64zM864 576H640a64 64 0 0 0-64 64v224a32 32 0 0 0 64 0V640h224a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconlashen" viewBox="0 0 1024 1024"><path d="M576 128.832L282.624 128h-0.128a64 64 0 0 0-45.312 18.752L82.688 301.632A64 64 0 0 0 64 346.816l-0.128 356.928a64 64 0 0 0 64 64H192V832a64 64 0 0 0 64 64h160a64 64 0 0 0 51.2-25.6l160-213.76a64 64 0 0 0 12.8-38.4l-0.128-425.408a64 64 0 0 0-63.872-64zM192.192 412.16H192v291.584H127.872L128 363.968h105.408zM384 832H256V476.16h128z m15.808-419.84h-123.52l96-112.256H174.912L282.496 192l278.4 0.704zM448 789.184V454.656l127.936-174.08L576 618.24zM904.704 744.192l-41.152 41.856V300.032l41.152 41.856a32 32 0 0 0 45.632-44.8l-96-97.792a32.896 32.896 0 0 0-45.632 0l-96 97.728a32 32 0 0 0 45.632 44.864l41.216-41.984v486.272l-41.216-41.984a32 32 0 0 0-45.632 44.864l96 97.728a32 32 0 0 0 45.632 0l96-97.728a32 32 0 0 0-45.632-44.864z" ></path></symbol><symbol id="iconxiazai" viewBox="0 0 1024 1024"><path d="M864 640a32 32 0 0 1 31.488 26.24l0.512 5.76V832a64 64 0 0 1-56.576 63.552L832 896H192.832a64 64 0 0 1-63.616-56.512L128.832 832v-160a32 32 0 0 1 63.488-5.76l0.512 5.76V832H832v-160a32 32 0 0 1 32-32zM512 78.848a32 32 0 0 1 31.488 26.24l0.512 5.76v483.84l132.672-132.672a32 32 0 0 1 40.832-3.648l4.48 3.648a32 32 0 0 1 3.648 40.832l-3.648 4.48-187.328 187.328a32 32 0 0 1-40.832 3.648l-4.48-3.648L302.08 507.328a32 32 0 0 1 40.832-48.96l4.48 3.648L480 594.688v-483.84a32 32 0 0 1 32-32z" ></path></symbol><symbol id="iconlunkuoxian" viewBox="0 0 1024 1024"><path d="M800 608h-576a96 96 0 0 1 0-192h576a96 96 0 0 1 0 192z m-576-128a32 32 0 0 0 0 64h576a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconhuizhimian" viewBox="0 0 1024 1024"><path d="M128 128m64 0l640 0q64 0 64 64l0 640q0 64-64 64l-640 0q-64 0-64-64l0-640q0-64 64-64Z" ></path></symbol><symbol id="iconshixian" viewBox="0 0 1024 1024"><path d="M864 544a32 32 0 0 0 0-64h-704a32 32 0 0 0 0 64z" ></path></symbol><symbol id="iconhuizhitiaowen" viewBox="0 0 1024 1024"><path d="M160 309.312a31.872 31.872 0 0 0 22.592-9.344l117.376-117.376a32 32 0 0 0-45.248-45.248L137.408 254.72a32 32 0 0 0 22.592 54.592zM886.656 137.408a32 32 0 0 0-45.248 0l-704 704a32 32 0 1 0 45.184 45.184l704-704a32 32 0 0 0 0-45.248zM841.344 724.032l-117.312 117.312a32 32 0 1 0 45.248 45.248l117.376-117.312a32 32 0 1 0-45.248-45.248zM841.344 430.72L430.72 841.344a32 32 0 1 0 45.248 45.248l410.688-410.624a32 32 0 0 0-45.248-45.248zM160 602.624a31.872 31.872 0 0 0 22.592-9.344L593.28 182.656a32 32 0 0 0-45.248-45.248L137.344 548.032a32 32 0 0 0 22.656 54.592z" ></path></symbol><symbol id="iconxuxian" viewBox="0 0 1024 1024"><path d="M224 480h-64a32 32 0 0 0 0 64h64a32 32 0 0 0 0-64zM437.312 480h-64a32 32 0 0 0 0 64h64a32 32 0 1 0 0-64zM650.688 480h-64a32 32 0 1 0 0 64h64a32 32 0 0 0 0-64zM864 480h-64a32 32 0 0 0 0 64h64a32 32 0 0 0 0-64z" ></path></symbol><symbol id="iconweijixian" viewBox="0 0 1024 1024"><path d="M294.4 203.328a31.808 31.808 0 0 0-19.776 6.784 385.6 385.6 0 0 0-49.92 47.104l-0.384 0.384-0.96 1.152-0.384 0.384v0.064l-0.576 0.64-0.32 0.384-0.064 0.064-0.256 0.32-0.128 0.128-0.192 0.192-0.064 0.064-0.256 0.32-0.128 0.128-0.256 0.32-0.064 0.128-0.256 0.256-0.128 0.128-0.128 0.128-0.128 0.192-0.256 0.256-0.064 0.064-0.256 0.256-0.128 0.192-0.128 0.192-0.192 0.192-0.128 0.192-0.256 0.256-0.128 0.128-0.128 0.192-0.192 0.192-0.128 0.256-0.128 0.128-0.256 0.256-0.064 0.128-0.192 0.256-0.128 0.128-0.192 0.192-0.128 0.192-0.192 0.256-0.128 0.128-0.256 0.256-0.064 0.128-0.256 0.256v0.128l-0.32 0.256-0.064 0.064-0.256 0.32v0.128l-0.32 0.32H215.04l-0.256 0.384-0.32 0.32v0.064l-0.32 0.32v0.128l-0.32 0.32-0.064 0.064-0.256 0.32-0.32 0.384-0.32 0.384-0.32 0.384-0.256 0.384-0.32 0.384-0.32 0.384-0.64 0.768-0.32 0.448-0.256 0.384-0.64 0.768-0.32 0.384-0.256 0.384-0.64 0.768-0.32 0.384-0.896 1.216q-9.728 12.672-18.432 26.24a32 32 0 0 0 53.76 34.56A320.96 320.96 0 0 1 314.24 260.48a32 32 0 0 0-19.84-57.152zM169.728 397.056a32 32 0 0 0-31.04 24.448 383.296 383.296 0 0 0-9.28 56.384l-0.128 1.792V480.256l-0.128 1.28V482.368l-0.064 1.152v0.96l-0.256 1.216v0.96l-0.064 0.832v1.024l-0.192 1.152v3.2l-0.064 0.768V512H128V523.84q0.384 12.544 1.536 24.832a32 32 0 0 0 31.808 28.992c1.024 0 2.048 0 3.072-0.128a32 32 0 0 0 28.8-34.88Q192 527.552 192 512a321.728 321.728 0 0 1 8.96-75.392 32 32 0 0 0-31.168-39.552z m22.016 229.376a32 32 0 0 0-29.12 45.312 384.704 384.704 0 0 0 64.768 98.112l1.024 1.088 0.32 0.384 0.32 0.384 0.32 0.32 0.32 0.32v0.064l0.32 0.32 0.064 0.064 0.32 0.32 0.256 0.32 0.064 0.064 0.32 0.32v0.064l0.32 0.256 0.064 0.128 0.256 0.256 0.128 0.128 0.192 0.192 0.128 0.128 0.256 0.256 0.064 0.128 0.256 0.256 0.128 0.128 0.192 0.192 0.128 0.192 0.192 0.192 0.128 0.128 0.256 0.256 0.128 0.128 0.192 0.192 0.128 0.128a32 32 0 0 0 46.208-44.224 320 320 0 0 1-59.648-87.872 32 32 0 0 0-29.056-18.688z m159.168 166.656a32 32 0 0 0-14.72 60.416q6.336 3.264 12.8 6.336l1.088 0.512 0.192 0.064h0.064l0.192 0.128 0.192 0.128h0.128l0.128 0.064h0.064l0.32 0.192h0.256l0.064 0.128h0.128l0.128 0.064 0.128 0.064 0.128 0.064 0.128 0.064 0.128 0.064h0.128l0.192 0.128h0.128l0.128 0.128h0.128l0.128 0.064 0.128 0.064 0.128 0.064 0.064 0.064 0.256 0.192h0.064l0.512 0.256 0.256 0.128 0.256 0.064h0.064l0.192 0.128h0.064l0.768 0.384 0.256 0.064 0.256 0.128a381.44 381.44 0 0 0 88.576 26.944l1.152 0.192 0.32 0.064h0.256l1.152 0.256H448.704l0.896 0.192h0.256l0.256 0.064h0.448l0.576 0.128H453.888l0.384 0.128H455.424l0.64 0.064H456.96l0.704 0.128a32 32 0 1 0 8.96-63.36 316.8 316.8 0 0 1-101.056-32.192 31.872 31.872 0 0 0-14.592-3.52z m337.28-8.32a31.808 31.808 0 0 0-16 4.288 316.928 316.928 0 0 1-99.264 37.184 32 32 0 0 0 6.016 63.424 32.384 32.384 0 0 0 6.08-0.576 381.376 381.376 0 0 0 73.856-22.144l2.944-1.28h0.256l0.192-0.128 0.896-0.384 0.256-0.128h0.256l0.832-0.448h0.256v-0.064l0.256-0.064 0.192-0.128h0.064l0.192-0.064h0.064l0.384-0.192 0.192-0.064 0.256-0.064 0.192-0.128h0.128l0.128-0.128h0.256l0.32-0.192h0.128l0.128-0.128h0.128l0.128-0.128h0.128l0.128-0.064 0.128-0.064h0.128l0.128-0.128h0.064l0.256-0.128h0.064l0.192-0.128h0.064l0.192-0.128h0.128l0.128-0.064h0.128l0.128-0.128 0.128-0.32 0.192-0.064 0.32-0.128 0.256-0.128 0.256-0.128 0.256-0.128 0.256-0.064 0.576-0.256 0.256-0.128 0.256-0.064 0.256-0.128 0.768-0.384 0.256-0.128 0.256-0.064 4.224-1.984q13.248-6.4 25.984-13.76a32 32 0 0 0-16.192-59.648z m150.784-174.336a32 32 0 0 0-29.696 20.16 319.488 319.488 0 0 1-55.232 90.688 32 32 0 1 0 48.384 41.856l3.84-4.48 0.96-1.152 0.256-0.384 0.96-1.152 0.32-0.384 0.64-0.768 0.256-0.32 0.32-0.384 0.64-0.768 0.32-0.384 0.576-0.704 0.256-0.384h0.064l0.256-0.384v-0.064l0.32-0.384 0.32-0.32v-0.064l0.32-0.32v-0.064l0.32-0.384 0.256-0.32 0.32-0.384 0.32-0.384 0.576-0.768v-0.064l0.32-0.32v-0.064l0.32-0.384 0.256-0.384 0.32-0.384 0.256-0.384h0.064l0.256-0.384 0.256-0.384 0.32-0.384v-0.064l0.32-0.384 0.64-0.768 0.256-0.384v-0.064l0.32-0.384 0.256-0.32 0.32-0.384v-0.064l0.256-0.384 0.32-0.384 0.256-0.384 0.256-0.384 0.64-0.704 0.64-0.768v-0.064l0.256-0.384 0.256-0.384 0.32-0.384 0.256-0.384v-0.064l0.32-0.384 0.256-0.384 0.32-0.448 0.256-0.32v-0.064l0.32-0.384 0.512-0.768 0.32-0.448 0.832-1.152 0.32-0.448 0.512-0.768 0.32-0.384a383.36 383.36 0 0 0 41.536-77.056 32 32 0 0 0-29.76-43.84z m10.624-230.144a32 32 0 0 0-30.72 41.088A320.512 320.512 0 0 1 832 512q0 7.488-0.32 14.848a32 32 0 0 0 30.464 33.408h1.536a32 32 0 0 0 31.936-30.464L896 516.736V479.104l-0.064-0.32V476.096l-0.064-0.384V473.92L894.08 473.6V469.12l-0.064-0.192V467.84l-0.576-0.32V464l-0.064-0.32V462.08l-0.064-0.256V460.8l-0.128-0.256V457.856l-1.024-0.32V456.96l-0.064-0.448v-0.64l-0.064-0.256v-0.448l-0.256-0.192V454.4l-0.064-0.256V453.76l-0.064-0.192V452.928l-0.128-0.512v-0.512l-0.128-0.384v-0.128l-0.192-0.192v-0.64l-0.064-0.256V449.92l-0.128-0.448V449.28l-0.128-0.256v-0.128l-0.064-0.384V448l-0.128-0.448-0.128-0.256v-0.384l-0.064-0.448v-0.128l-0.064-0.256v-0.128l-0.064-0.384V445.44l-0.128-0.256v-0.128l-0.128-0.768v-0.448l-0.192-0.384v-0.384l-0.128-0.576-0.064-0.256-0.128-0.832v-0.064l-0.192-0.832v-0.384l-0.128-0.512v-0.384l-0.32-0.832v-0.384l-0.128-0.448V437.12l-0.128-0.512-0.064-0.256v-0.064l-0.192-0.832-0.128-0.32-0.128-0.512v-0.448l-0.192-0.768v-0.064l-0.128-0.832-0.064-0.32-0.128-0.512V431.36l-0.192-0.832-0.64-2.88-0.64-2.112q-2.56-11.328-5.824-22.4a32 32 0 0 0-30.72-22.848z m-133.952-187.392a32 32 0 0 0-18.56 58.112 321.28 321.28 0 0 1 75.264 75.008 32 32 0 0 0 52.096-37.248 386.368 386.368 0 0 0-85.376-86.4l-1.216-0.896-0.384-0.32-0.768-0.512-0.448-0.32-0.448-0.32-0.384-0.32-0.384-0.256h-0.064l-0.32-0.32h-0.064l-0.384-0.256a31.872 31.872 0 0 0-18.56-5.952zM512 128H494.4l-0.896 0.064H491.328l-0.896 0.128h-1.856l-1.216 0.128a382.592 382.592 0 0 0-101.12 20.288 32 32 0 0 0 21.12 60.416A319.488 319.488 0 0 1 512 192a320.64 320.64 0 0 1 89.664 12.736 32 32 0 0 0 17.92-61.44 383.104 383.104 0 0 0-79.36-14.272l-1.28-0.064-0.832-0.064-2.112-0.128-0.96-0.064h-0.384L533.76 128.64h-2.176l-0.832-0.192H512z" ></path></symbol></svg>',function(h){var a=(a=document.getElementsByTagName("script"))[a.length-1],l=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var i,o,t,z,v,m=function(a,l){l.parentNode.insertBefore(a,l)};if(l&&!h.__iconfont__svg__cssinject__){h.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(a){console&&console.log(a)}}i=function(){var a,l=document.createElement("div");l.innerHTML=h._iconfont_svg_string_2397568,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?m(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),i()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(t=i,z=h.document,v=!1,d(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,p())})}function p(){v||(v=!0,t())}function d(){try{z.documentElement.doScroll("left")}catch(a){return void setTimeout(d,50)}p()}}(window); \ No newline at end of file diff --git a/SuperMap iEarth/src/assets/icons/iconfont.json b/SuperMap iEarth/src/assets/icons/iconfont.json index 4e269a55..e986a8d7 100644 --- a/SuperMap iEarth/src/assets/icons/iconfont.json +++ b/SuperMap iEarth/src/assets/icons/iconfont.json @@ -5,6 +5,524 @@ "css_prefix_text": "icon", "description": "", "glyphs": [ + { + "icon_id": "39537874", + "name": "添加媒体字段", + "font_class": "tianjiameitiziduan", + "unicode": "e8d8", + "unicode_decimal": 59608 + }, + { + "icon_id": "39537868", + "name": "指定数据查询", + "font_class": "zhidingshujuchaxun", + "unicode": "e8d9", + "unicode_decimal": 59609 + }, + { + "icon_id": "39526539", + "name": "对象绘制", + "font_class": "duixianghuizhi", + "unicode": "e8d6", + "unicode_decimal": 59606 + }, + { + "icon_id": "39526538", + "name": "三维分析", + "font_class": "sanweifenxi", + "unicode": "e8d7", + "unicode_decimal": 59607 + }, + { + "icon_id": "39504083", + "name": "晴天", + "font_class": "qingtian", + "unicode": "e8d2", + "unicode_decimal": 59602 + }, + { + "icon_id": "39504082", + "name": "下雪", + "font_class": "xiaxue", + "unicode": "e8d3", + "unicode_decimal": 59603 + }, + { + "icon_id": "39504081", + "name": "下雨", + "font_class": "xiayu", + "unicode": "e8d4", + "unicode_decimal": 59604 + }, + { + "icon_id": "39504080", + "name": "多云", + "font_class": "duoyun", + "unicode": "e8d5", + "unicode_decimal": 59605 + }, + { + "icon_id": "39500939", + "name": "视图", + "font_class": "shitu", + "unicode": "e8d1", + "unicode_decimal": 59601 + }, + { + "icon_id": "39318403", + "name": "倾斜单体化", + "font_class": "qingxiedantihua", + "unicode": "e8ca", + "unicode_decimal": 59594 + }, + { + "icon_id": "39271738", + "name": "添加_选中", + "font_class": "tianjia_xuanzhong", + "unicode": "e8cf", + "unicode_decimal": 59599 + }, + { + "icon_id": "39271737", + "name": "三维分析_选中", + "font_class": "sanweifenxi_xuanzhong1", + "unicode": "e8d0", + "unicode_decimal": 59600 + }, + { + "icon_id": "39261646", + "name": "图层风格", + "font_class": "tucengfengge", + "unicode": "e8ce", + "unicode_decimal": 59598 + }, + { + "icon_id": "39260595", + "name": "场景_选中", + "font_class": "changjing_xuanzhong", + "unicode": "e8cd", + "unicode_decimal": 59597 + }, + { + "icon_id": "39259859", + "name": "量算_选中", + "font_class": "liangsuan_xuanzhong", + "unicode": "e8cb", + "unicode_decimal": 59595 + }, + { + "icon_id": "39259858", + "name": "绘制_选中", + "font_class": "huizhi_xuanzhong", + "unicode": "e8cc", + "unicode_decimal": 59596 + }, + { + "icon_id": "38999948", + "name": "量算", + "font_class": "liangsuan", + "unicode": "e873", + "unicode_decimal": 59507 + }, + { + "icon_id": "38773322", + "name": "0", + "font_class": "a-0", + "unicode": "e8c5", + "unicode_decimal": 59589 + }, + { + "icon_id": "38773331", + "name": "7_1", + "font_class": "a-7_1", + "unicode": "e8c6", + "unicode_decimal": 59590 + }, + { + "icon_id": "38773321", + "name": "0_1", + "font_class": "a-0_1", + "unicode": "e8c7", + "unicode_decimal": 59591 + }, + { + "icon_id": "38773323", + "name": "2_1", + "font_class": "a-2_1", + "unicode": "e8c8", + "unicode_decimal": 59592 + }, + { + "icon_id": "38773320", + "name": "1_1", + "font_class": "a-1_1", + "unicode": "e8c9", + "unicode_decimal": 59593 + }, + { + "icon_id": "38773345", + "name": "parking lot", + "font_class": "a-parkinglot", + "unicode": "e8b1", + "unicode_decimal": 59569 + }, + { + "icon_id": "38773347", + "name": "gas station", + "font_class": "a-gasstation", + "unicode": "e8b2", + "unicode_decimal": 59570 + }, + { + "icon_id": "38773334", + "name": "9", + "font_class": "a-9", + "unicode": "e8b3", + "unicode_decimal": 59571 + }, + { + "icon_id": "38773329", + "name": "5_1", + "font_class": "a-5_1", + "unicode": "e8b4", + "unicode_decimal": 59572 + }, + { + "icon_id": "38773343", + "name": "caution", + "font_class": "caution", + "unicode": "e8b5", + "unicode_decimal": 59573 + }, + { + "icon_id": "38773337", + "name": "hospital", + "font_class": "hospital", + "unicode": "e8b6", + "unicode_decimal": 59574 + }, + { + "icon_id": "38773332", + "name": "7", + "font_class": "a-7", + "unicode": "e8b7", + "unicode_decimal": 59575 + }, + { + "icon_id": "38773330", + "name": "3", + "font_class": "a-3", + "unicode": "e8b8", + "unicode_decimal": 59576 + }, + { + "icon_id": "38773342", + "name": "hot", + "font_class": "hot", + "unicode": "e8b9", + "unicode_decimal": 59577 + }, + { + "icon_id": "38773336", + "name": "8_1", + "font_class": "a-8_1", + "unicode": "e8ba", + "unicode_decimal": 59578 + }, + { + "icon_id": "38773328", + "name": "4_1", + "font_class": "a-4_1", + "unicode": "e8bb", + "unicode_decimal": 59579 + }, + { + "icon_id": "38773341", + "name": "8", + "font_class": "a-8", + "unicode": "e8bc", + "unicode_decimal": 59580 + }, + { + "icon_id": "38773339", + "name": "6", + "font_class": "a-6", + "unicode": "e8bd", + "unicode_decimal": 59581 + }, + { + "icon_id": "38773324", + "name": "3_1", + "font_class": "a-3_1", + "unicode": "e8be", + "unicode_decimal": 59582 + }, + { + "icon_id": "38773340", + "name": "orientation_1", + "font_class": "orientation_1", + "unicode": "e8bf", + "unicode_decimal": 59583 + }, + { + "icon_id": "38773335", + "name": "6_1", + "font_class": "a-6_1", + "unicode": "e8c0", + "unicode_decimal": 59584 + }, + { + "icon_id": "38773325", + "name": "2", + "font_class": "a-2", + "unicode": "e8c1", + "unicode_decimal": 59585 + }, + { + "icon_id": "38773333", + "name": "10", + "font_class": "a-10", + "unicode": "e8c2", + "unicode_decimal": 59586 + }, + { + "icon_id": "38773338", + "name": "4", + "font_class": "a-4", + "unicode": "e8c3", + "unicode_decimal": 59587 + }, + { + "icon_id": "38773326", + "name": "1", + "font_class": "a-1", + "unicode": "e8c4", + "unicode_decimal": 59588 + }, + { + "icon_id": "38773327", + "name": "5", + "font_class": "a-5", + "unicode": "e8a6", + "unicode_decimal": 59558 + }, + { + "icon_id": "38773355", + "name": "school", + "font_class": "school", + "unicode": "e8a7", + "unicode_decimal": 59559 + }, + { + "icon_id": "38773354", + "name": "10_1", + "font_class": "a-10_1", + "unicode": "e8a8", + "unicode_decimal": 59560 + }, + { + "icon_id": "38773356", + "name": "Z", + "font_class": "Z", + "unicode": "e8a9", + "unicode_decimal": 59561 + }, + { + "icon_id": "38773353", + "name": "Railway Station", + "font_class": "a-RailwayStation", + "unicode": "e8aa", + "unicode_decimal": 59562 + }, + { + "icon_id": "38773348", + "name": "X", + "font_class": "X", + "unicode": "e8ab", + "unicode_decimal": 59563 + }, + { + "icon_id": "38773352", + "name": "toilet", + "font_class": "toilet", + "unicode": "e8ac", + "unicode_decimal": 59564 + }, + { + "icon_id": "38773349", + "name": "9_1", + "font_class": "a-9_1", + "unicode": "e8ad", + "unicode_decimal": 59565 + }, + { + "icon_id": "38773351", + "name": "orientation_2", + "font_class": "orientation_2", + "unicode": "e8ae", + "unicode_decimal": 59566 + }, + { + "icon_id": "38773346", + "name": "Y", + "font_class": "Y", + "unicode": "e8af", + "unicode_decimal": 59567 + }, + { + "icon_id": "38773350", + "name": "airport", + "font_class": "airport", + "unicode": "e8b0", + "unicode_decimal": 59568 + }, + { + "icon_id": "38518523", + "name": "示例", + "font_class": "shili", + "unicode": "e8a5", + "unicode_decimal": 59557 + }, + { + "icon_id": "38501420", + "name": "标注标绘", + "font_class": "biaozhubiaohui", + "unicode": "e897", + "unicode_decimal": 59543 + }, + { + "icon_id": "38501419", + "name": "图层操作", + "font_class": "tucengcaozuo", + "unicode": "e8a1", + "unicode_decimal": 59553 + }, + { + "icon_id": "38501418", + "name": "材质库", + "font_class": "caizhiku", + "unicode": "e8a3", + "unicode_decimal": 59555 + }, + { + "icon_id": "38501417", + "name": "模型库", + "font_class": "moxingku", + "unicode": "e8a4", + "unicode_decimal": 59556 + }, + { + "icon_id": "38465488", + "name": "书钉", + "font_class": "shuding", + "unicode": "e89e", + "unicode_decimal": 59550 + }, + { + "icon_id": "38465423", + "name": "录制", + "font_class": "luzhi", + "unicode": "e892", + "unicode_decimal": 59538 + }, + { + "icon_id": "38464193", + "name": "查询", + "font_class": "chaxun", + "unicode": "e89d", + "unicode_decimal": 59549 + }, + { + "icon_id": "38463979", + "name": "浏览", + "font_class": "liulan", + "unicode": "e890", + "unicode_decimal": 59536 + }, + { + "icon_id": "38463925", + "name": "工具", + "font_class": "gongju", + "unicode": "e8a2", + "unicode_decimal": 59554 + }, + { + "icon_id": "38463930", + "name": "漫游", + "font_class": "manyou", + "unicode": "e89c", + "unicode_decimal": 59548 + }, + { + "icon_id": "38463927", + "name": "添加站点", + "font_class": "tianjiazhandian", + "unicode": "e89f", + "unicode_decimal": 59551 + }, + { + "icon_id": "38262966", + "name": "非等比", + "font_class": "feidengbi1", + "unicode": "e8a0", + "unicode_decimal": 59552 + }, + { + "icon_id": "38262918", + "name": "风格设置", + "font_class": "fenggeshezhi1", + "unicode": "e893", + "unicode_decimal": 59539 + }, + { + "icon_id": "38262919", + "name": "等比", + "font_class": "dengbi", + "unicode": "e894", + "unicode_decimal": 59540 + }, + { + "icon_id": "38262920", + "name": "顶视图", + "font_class": "dingshitu", + "unicode": "e895", + "unicode_decimal": 59541 + }, + { + "icon_id": "38262921", + "name": "后处理", + "font_class": "houchuli", + "unicode": "e896", + "unicode_decimal": 59542 + }, + { + "icon_id": "38262923", + "name": "视点管理", + "font_class": "shidianguanli", + "unicode": "e898", + "unicode_decimal": 59544 + }, + { + "icon_id": "38262924", + "name": "视图切换", + "font_class": "shituqiehuan", + "unicode": "e899", + "unicode_decimal": 59545 + }, + { + "icon_id": "38262925", + "name": "透视图", + "font_class": "toushitu", + "unicode": "e89a", + "unicode_decimal": 59546 + }, + { + "icon_id": "38262927", + "name": "天气调节", + "font_class": "tianqitiaojie", + "unicode": "e89b", + "unicode_decimal": 59547 + }, { "icon_id": "37097694", "name": "点选", @@ -12,13 +530,6 @@ "unicode": "e891", "unicode_decimal": 59537 }, - { - "icon_id": "37093927", - "name": "shp查询", - "font_class": "shpchaxun", - "unicode": "e890", - "unicode_decimal": 59536 - }, { "icon_id": "37088950", "name": "地图查询", @@ -84,7 +595,7 @@ }, { "icon_id": "36086905", - "name": "指北针_1", + "name": "指北针", "font_class": "zhibeizhen_1", "unicode": "e886", "unicode_decimal": 59526 @@ -117,13 +628,6 @@ "unicode": "e882", "unicode_decimal": 59522 }, - { - "icon_id": "36059057", - "name": "绘制", - "font_class": "huizhi", - "unicode": "e873", - "unicode_decimal": 59507 - }, { "icon_id": "36063444", "name": "聚光灯", @@ -348,13 +852,6 @@ "unicode": "e825", "unicode_decimal": 59429 }, - { - "icon_id": "35253465", - "name": "分析", - "font_class": "fenxi", - "unicode": "e826", - "unicode_decimal": 59430 - }, { "icon_id": "35253468", "name": "地形", @@ -390,13 +887,6 @@ "unicode": "e82d", "unicode_decimal": 59437 }, - { - "icon_id": "35253474", - "name": "量算", - "font_class": "liangsuan", - "unicode": "e82e", - "unicode_decimal": 59438 - }, { "icon_id": "35253475", "name": "放样", diff --git a/SuperMap iEarth/src/assets/icons/iconfont.ttf b/SuperMap iEarth/src/assets/icons/iconfont.ttf index d67ceb89..4ec69257 100644 Binary files a/SuperMap iEarth/src/assets/icons/iconfont.ttf and b/SuperMap iEarth/src/assets/icons/iconfont.ttf differ diff --git a/SuperMap iEarth/src/assets/icons/iconfont.woff b/SuperMap iEarth/src/assets/icons/iconfont.woff index 31c69f7c..9cd41501 100644 Binary files a/SuperMap iEarth/src/assets/icons/iconfont.woff and b/SuperMap iEarth/src/assets/icons/iconfont.woff differ diff --git a/SuperMap iEarth/src/assets/icons/iconfont.woff2 b/SuperMap iEarth/src/assets/icons/iconfont.woff2 index 2d8bd41a..be8c5a11 100644 Binary files a/SuperMap iEarth/src/assets/icons/iconfont.woff2 and b/SuperMap iEarth/src/assets/icons/iconfont.woff2 differ diff --git a/SuperMap iEarth/src/assets/panelbg/drop-menu-bg.png b/SuperMap iEarth/src/assets/panelbg/drop-menu-bg.png new file mode 100644 index 00000000..744a4633 Binary files /dev/null and b/SuperMap iEarth/src/assets/panelbg/drop-menu-bg.png differ diff --git a/SuperMap iEarth/src/components/I18n/index.vue b/SuperMap iEarth/src/components/I18n/index.vue index 4f5cced7..79ae41eb 100644 --- a/SuperMap iEarth/src/components/I18n/index.vue +++ b/SuperMap iEarth/src/components/I18n/index.vue @@ -2,7 +2,7 @@ <template></template> <script lang="ts" setup> -import { useI18n } from 'vue-i18n' -const { t } = useI18n() -window['$t'] = t +import { useI18n } from "vue-i18n"; +const { t } = useI18n(); +window["$t"] = t; </script> diff --git a/SuperMap iEarth/src/components/Loading/index.vue b/SuperMap iEarth/src/components/Loading/index.vue index 5af46819..46273064 100644 --- a/SuperMap iEarth/src/components/Loading/index.vue +++ b/SuperMap iEarth/src/components/Loading/index.vue @@ -1,49 +1,50 @@ <template> -<div class="loading-bg"> - <div id='loadingbar' class="spinner" > - <div class="spinner-container container1"> + <div class="loading-bg"> + <div id="loadingbar" class="spinner"> + <div class="spinner-container container1"> <div class="circle1"></div> <div class="circle2"></div> <div class="circle3"></div> <div class="circle4"></div> - </div> - <div class="spinner-container container2"> + </div> + <div class="spinner-container container2"> <div class="circle1"></div> <div class="circle2"></div> <div class="circle3"></div> <div class="circle4"></div> - </div> - <div class="spinner-container container3"> + </div> + <div class="spinner-container container3"> <div class="circle1"></div> <div class="circle2"></div> <div class="circle3"></div> <div class="circle4"></div> + </div> + </div> </div> -</div> -</div> </template> -<script lang="ts" setup> -</script> +<script lang="ts" setup></script> <style lang="scss" scoped> -.loading-bg{ +.loading-bg { width: 100%; height: 100%; background: #000; } - .spinner { +.spinner { margin: auto; width: 60px; height: 60px; - position: absolute ; + position: absolute; left: 0; top: 0; right: 0; bottom: 0; - z-index:1000; + z-index: 1000; } -.container1 > div, .container2 > div, .container3 > div { +.container1 > div, +.container2 > div, +.container3 > div { width: 16px; height: 16px; /*background-color: #67cf22;*/ @@ -72,10 +73,22 @@ transform: rotateZ(90deg); } -.circle1 { top: 0; left: 0; } -.circle2 { top: 0; right: 0; } -.circle3 { right: 0; bottom: 0; } -.circle4 { left: 0; bottom: 0; } +.circle1 { + top: 0; + left: 0; +} +.circle2 { + top: 0; + right: 0; +} +.circle3 { + right: 0; + bottom: 0; +} +.circle4 { + left: 0; + bottom: 0; +} .container2 .circle1 { -webkit-animation-delay: -1.1s; @@ -83,8 +96,8 @@ } .container3 .circle1 { - -webkit-animation-delay: -1.0s; - animation-delay: -1.0s; + -webkit-animation-delay: -1s; + animation-delay: -1s; } .container1 .circle2 { @@ -132,19 +145,27 @@ animation-delay: -0.1s; } - @-webkit-keyframes bouncedelay { - 0%, 80%, 100% { -webkit-transform: scale(0.0) } - 40% { -webkit-transform: scale(1.0) } + 0%, + 80%, + 100% { + -webkit-transform: scale(0); + } + 40% { + -webkit-transform: scale(1); + } } @keyframes bouncedelay { - 0%, 80%, 100% { - transform: scale(0.0); - -webkit-transform: scale(0.0); - } 40% { - transform: scale(1.0); - -webkit-transform: scale(1.0); - } + 0%, + 80%, + 100% { + transform: scale(0); + -webkit-transform: scale(0); + } + 40% { + transform: scale(1); + -webkit-transform: scale(1); + } } </style> diff --git a/SuperMap iEarth/src/components/Loading/index1.vue b/SuperMap iEarth/src/components/Loading/index1.vue deleted file mode 100644 index a220c7a8..00000000 --- a/SuperMap iEarth/src/components/Loading/index1.vue +++ /dev/null @@ -1,189 +0,0 @@ -<template> - <!-- svg加载图 --> - <!-- <div class="go-loading-svg go-flex-center loading-position"> - <img src="@/assets/images/loadingSvg1.svg" alt="" style="width:100px ; height:100px;" /> - </div> --> - <div id='loadingbar' class="spinner"> - <div class="spinner-container container1"> - <div class="circle1"></div> - <div class="circle2"></div> - <div class="circle3"></div> - <div class="circle4"></div> - </div> - <div class="spinner-container container2"> - <div class="circle1"></div> - <div class="circle2"></div> - <div class="circle3"></div> - <div class="circle4"></div> - </div> - <div class="spinner-container container3"> - <div class="circle1"></div> - <div class="circle2"></div> - <div class="circle3"></div> - <div class="circle4"></div> - </div> -</div> - -</template> -<style lang="scss" scoped> -// .loading-position { -// width: 100%; -// height: 100%; -// background-color: #000; -// img{ -// position: relative; -// top: calc(50% - 50px); -// left: calc(50% - 50px); -// } -// } -.spinner { - margin: auto; - width: 60px; - height: 60px; - position: absolute ; - left: 0; - top: 0; - right: 0; - bottom: 0; - z-index: 999; -} - -.full-screen-mask { - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; - margin: 0; -} -// .full-screen-mask, -// .full-screen-mask-overlay:before { -// background: rgba(0, 0, 0, 0.5); -// } -// .full-screen-mask { -// -webkit-box-align: center; -// -webkit-align-items: center; -// -ms-flex-align: center; -// align-items: center; -// display: -webkit-box; -// display: -webkit-flex; -// display: -ms-flexbox; -// display: flex; -// -webkit-box-pack: center; -// -webkit-justify-content: center; -// -ms-flex-pack: center; -// justify-content: center; -// } -// .full-screen-mask-overlay { -// max-height: 200px; -// margin: 0 auto; -// max-width: 768px; -// padding: 50px; -// position: relative; -// color: white; -// font-family: 'Lato'; -// position: relative; -// text-align: center; -// margin-bottom: 13%; -// } -// .full-screen-mask-overlay:before { -// content: ''; -// -webkit-filter: blur(100px); -// filter: blur(100px); -// height: 100%; -// left: 0; -// position: absolute; -// top: 0; -// width: 100%; -// z-index: -1; -// } - -.container1 > div, .container2 > div, .container3 > div { - width: 16px; - height: 16px; - /*background-color: #67cf22;*/ - background-color: #3498db; - border-radius: 100%; - position: absolute; - -webkit-animation: bouncedelay 1.2s infinite ease-in-out; - animation: bouncedelay 1.2s infinite ease-in-out; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; -} - -.spinner .spinner-container { - position: absolute; - width: 100%; - height: 100%; -} - -.container2 { - -webkit-transform: rotateZ(45deg); - transform: rotateZ(45deg); -} - -.container3 { - -webkit-transform: rotateZ(90deg); - transform: rotateZ(90deg); -} - -.circle1 { top: 0; left: 0; } -.circle2 { top: 0; right: 0; } -.circle3 { right: 0; bottom: 0; } -.circle4 { left: 0; bottom: 0; } - -.container2 .circle1 { - -webkit-animation-delay: -1.1s; - animation-delay: -1.1s; -} - -.container3 .circle1 { - -webkit-animation-delay: -1.0s; - animation-delay: -1.0s; -} - -.container1 .circle2 { - -webkit-animation-delay: -0.9s; - animation-delay: -0.9s; -} - -.container2 .circle2 { - -webkit-animation-delay: -0.8s; - animation-delay: -0.8s; -} - -.container3 .circle2 { - -webkit-animation-delay: -0.7s; - animation-delay: -0.7s; -} - -.container1 .circle3 { - -webkit-animation-delay: -0.6s; - animation-delay: -0.6s; -} - -.container2 .circle3 { - -webkit-animation-delay: -0.5s; - animation-delay: -0.5s; -} - -.container3 .circle3 { - -webkit-animation-delay: -0.4s; - animation-delay: -0.4s; -} - -.container1 .circle4 { - -webkit-animation-delay: -0.3s; - animation-delay: -0.3s; -} - -.container2 .circle4 { - -webkit-animation-delay: -0.2s; - animation-delay: -0.2s; -} - -.container3 .circle4 { - -webkit-animation-delay: -0.1s; - animation-delay: -0.1s; -} -</style> diff --git a/SuperMap iEarth/src/components/Plugins/DialogContent/index.vue b/SuperMap iEarth/src/components/Plugins/DialogContent/index.vue index 30163fba..93f62f11 100644 --- a/SuperMap iEarth/src/components/Plugins/DialogContent/index.vue +++ b/SuperMap iEarth/src/components/Plugins/DialogContent/index.vue @@ -1,7 +1,7 @@ -<!-- eslint-disable vue/valid-template-root --> <template></template> + <script lang="ts" setup> -import { useDialog } from 'naive-ui' +import { useDialog } from "naive-ui"; //挂载在 window 方便与在js中使用 -window['$dialog'] = useDialog() +window["$dialog"] = useDialog(); </script> diff --git a/SuperMap iEarth/src/components/Plugins/LoadingContent/index.vue b/SuperMap iEarth/src/components/Plugins/LoadingContent/index.vue index 31e33db6..891acbfd 100644 --- a/SuperMap iEarth/src/components/Plugins/LoadingContent/index.vue +++ b/SuperMap iEarth/src/components/Plugins/LoadingContent/index.vue @@ -1,9 +1,8 @@ -<!-- eslint-disable vue/valid-template-root --> <template></template> <script lang="ts" setup> -import { useLoadingBar } from 'naive-ui' +import { useLoadingBar } from "naive-ui"; // 挂载在 window 方便与在js中使用 -window['$loading'] = useLoadingBar() -window['$loading'].finish() +window["$loading"] = useLoadingBar(); +window["$loading"].finish(); </script> diff --git a/SuperMap iEarth/src/components/Plugins/MessageContent/index.vue b/SuperMap iEarth/src/components/Plugins/MessageContent/index.vue index 881071a1..e7039ae9 100644 --- a/SuperMap iEarth/src/components/Plugins/MessageContent/index.vue +++ b/SuperMap iEarth/src/components/Plugins/MessageContent/index.vue @@ -1,8 +1,7 @@ -<!-- eslint-disable vue/valid-template-root --> <template></template> <script lang="ts" setup> -import { useMessage } from 'naive-ui' +import { useMessage } from "naive-ui"; //挂载在 window 方便与在js中使用 -window['$message'] = useMessage() +window["$message"] = useMessage(); </script> diff --git a/SuperMap iEarth/src/enums/styleEnum.ts b/SuperMap iEarth/src/enums/styleEnum.ts index aaaf8870..3114898f 100644 --- a/SuperMap iEarth/src/enums/styleEnum.ts +++ b/SuperMap iEarth/src/enums/styleEnum.ts @@ -9,5 +9,5 @@ export enum LangEnum { ZH = 'zh', EN = 'en', JA = 'ja', -} - + RU = 'ru', +} \ No newline at end of file diff --git a/SuperMap iEarth/src/layout/index.vue b/SuperMap iEarth/src/layout/index.vue index 14bd37a3..698dd1e6 100644 --- a/SuperMap iEarth/src/layout/index.vue +++ b/SuperMap iEarth/src/layout/index.vue @@ -12,5 +12,4 @@ import LayoutMain from "@/layout/layoutMain/index"; import LayoutHeader from "@/layout/layoutHeader/index"; </script> -<style lang="scss" scoped> -</style> +<style lang="scss" scoped></style> diff --git a/SuperMap iEarth/src/layout/layoutFooter/index.vue b/SuperMap iEarth/src/layout/layoutFooter/index.vue index 7c184087..fc088fc5 100644 --- a/SuperMap iEarth/src/layout/layoutFooter/index.vue +++ b/SuperMap iEarth/src/layout/layoutFooter/index.vue @@ -1,15 +1,16 @@ <template> - <n-layout-footer><div class="footer"></div></n-layout-footer> + <n-layout-footer> + <div class="footer"></div> + </n-layout-footer> </template> -<script setup lang="ts"> -</script> +<script setup lang="ts"></script> <style lang="scss" scoped> .footer { position: fixed; - bottom: 1px; + bottom: -0.03rem; @include setBackground(100%, 0.17rem, "@/assets/images/footer-bg.png"); - background-size:100% 100%; + background-size: 100% 100%; } </style> diff --git a/SuperMap iEarth/src/layout/layoutHeader/components/saveScene/index.ts b/SuperMap iEarth/src/layout/layoutHeader/components/saveScene/index.ts index 7d34d6f9..14c7c23c 100644 --- a/SuperMap iEarth/src/layout/layoutHeader/components/saveScene/index.ts +++ b/SuperMap iEarth/src/layout/layoutHeader/components/saveScene/index.ts @@ -1,3 +1,3 @@ -import SaveScene from './index.vue'; +import SaveScene from './saveScene.vue'; export default SaveScene; diff --git a/SuperMap iEarth/src/layout/layoutHeader/components/saveScene/index.vue b/SuperMap iEarth/src/layout/layoutHeader/components/saveScene/saveScene.vue similarity index 50% rename from SuperMap iEarth/src/layout/layoutHeader/components/saveScene/index.vue rename to SuperMap iEarth/src/layout/layoutHeader/components/saveScene/saveScene.vue index 1dcfcff3..e25062f1 100644 --- a/SuperMap iEarth/src/layout/layoutHeader/components/saveScene/index.vue +++ b/SuperMap iEarth/src/layout/layoutHeader/components/saveScene/saveScene.vue @@ -1,122 +1,177 @@ <template> - <!-- <div class="savePanleBox" v-if="panelStore.showSavePanel"> --> <n-modal v-model:show="panelStore.showSavePanel"> - <n-card style="width: 600px" :title="$t('global.sceneSave')" :bordered="false" size="huge" role="dialog" aria-modal="true"> - <!-- <n-spin size="small" :show="state.loadingShow"> --> + <n-card + style="width: 4rem; text-align: center" + :title="$t('sceneSave')" + :bordered="false" + size="huge" + role="dialog" + aria-modal="true" + > <div class="save-scene-container"> - <canvas id="sceneCanvas" style="width:100%;margin:35px 0 10px 0;" /> - - <n-form ref="formRef" :model="fromData" label-placement="left" require-mark-placement="right-hanging" :style="{ maxWidth: '640px' }"> - <n-form-item label-width="1.3rem" :label="$t('global.saveDate')" path="storageSceneCurrentTime" :rule="{ + <canvas id="sceneCanvas" /> + <n-form + ref="formRef" + :model="fromData" + label-placement="left" + require-mark-placement="right-hanging" + :style="{ maxWidth: '4.5rem' }" + > + <n-form-item + label-width="0.8rem" + :label="$t('saveDate')" + path="storageSceneCurrentTime" + :rule="{ required: false, - trigger: ['input', 'blur'] - }"> - <n-input v-model:value="fromData.storageSceneCurrentTime" clearable /> - </n-form-item> - - <n-form-item label-width="1.3rem" :label="$t('global.sceneName')" path="scenePortalName" :rule="{ + trigger: ['input', 'blur'], + }" + > + <n-input + v-model:value="fromData.storageSceneCurrentTime" + clearable + /> + </n-form-item> + + <n-form-item + label-width="0.8rem" + :label="$t('sceneName')" + path="scenePortalName" + :rule="{ required: true, trigger: ['input', 'blur'], // message: 'Must Option', renderMessage: () => { - if(language == 'zh'){ + if (language == 'zh') { return '必选项'; - }else if(language == 'ja'){ + } else if (language == 'ja') { return '必須オプション'; - }else{ + } else { return 'Must Option'; } - } - }"> - <n-input v-model:value="fromData.scenePortalName" :placeholder="$t('global.placeHolder')" clearable /> - </n-form-item> - - <n-form-item label-width="1.3rem" :label="$t('global.sceneLable')" path="scenePortalTages" :rule="{ + }, + }" + > + <n-input + v-model:value="fromData.scenePortalName" + :placeholder="$t('placeHolder')" + clearable + /> + </n-form-item> + + <n-form-item + label-width="0.8rem" + :label="$t('sceneLable')" + path="scenePortalTages" + :rule="{ required: true, trigger: ['input', 'blur'], renderMessage: () => { - if(language == 'zh'){ + if (language == 'zh') { return '必选项'; - }else if(language == 'ja'){ + } else if (language == 'ja') { return '必須オプション'; - }else{ + } else { return 'Must Option'; } - } - }"> - <n-input v-model:value="fromData.scenePortalTages" :placeholder="$t('global.placeHolder')" clearable /> - </n-form-item> - - <n-form-item label-width="1.3rem" :label="$t('global.authorName')" path="scenePortalUser" :rule="{ + }, + }" + > + <n-input + v-model:value="fromData.scenePortalTages" + :placeholder="$t('placeHolder')" + clearable + /> + </n-form-item> + + <n-form-item + label-width="0.8rem" + :label="$t('authorName')" + path="scenePortalUser" + :rule="{ required: false, - trigger: ['input', 'blur'] - }"> - <n-input v-model:value="fromData.scenePortalUser" :placeholder="$t('global.placeHolder')" clearable /> - </n-form-item> - - <n-form-item label-width="1.3rem" :label="$t('global.sceneDescribe')" path="scenePortalDescription" :rule="{ + trigger: ['input', 'blur'], + }" + > + <n-input + v-model:value="fromData.scenePortalUser" + :placeholder="$t('placeHolder')" + clearable + /> + </n-form-item> + + <n-form-item + label-width="0.8rem" + :label="$t('sceneDescribe')" + path="scenePortalDescription" + :rule="{ required: false, - trigger: ['input', 'blur'] - }"> - <n-input v-model:value="fromData.scenePortalDescription" :placeholder="$t('global.placeHolder')" clearable /> - </n-form-item> - - <n-form-item> - <n-space justify="space-between"> - <n-button type="info" color="#3499E5" :loading="state.isloading" text-color="#fff" attr-type="button" @click="onSaveUserClk"> - {{$t('global.save')}} - </n-button> - <n-button attr-type="button" @click="close"> - {{$t('global.cancle')}} - </n-button> - </n-space> - </n-form-item> - </n-form> + trigger: ['input', 'blur'], + }" + > + <n-input + v-model:value="fromData.scenePortalDescription" + :placeholder="$t('placeHolder')" + clearable + /> + </n-form-item> + + <n-form-item> + <n-space justify="space-between"> + <n-button + type="info" + color="#3499E5" + :loading="state.isloading" + text-color="#fff" + attr-type="button" + @click="onSaveUserClk" + > + {{ $t("save") }} + </n-button> + <n-button attr-type="button" @click="close"> + {{ $t("cancle") }} + </n-button> + </n-space> + </n-form-item> + </n-form> </div> - <!-- </n-spin> --> - - - </n-card> </n-modal> </template> <script lang="ts" setup> -import { reactive, watch ,computed} from "vue" -import { useMessage } from "naive-ui" +import { reactive, watch, computed } from "vue"; +import { useMessage } from "naive-ui"; import { IportalStoreCreate } from "@/store/index"; import { usePanelStore } from "@/store/panelStore/index"; import { getRootUrl } from "@/tools/iportal/portalTools"; -import { useLayerStore } from "@/store/layerStore"; -import i18n from '@/locale/index'; +import { useLayerStore } from "@/store/layerStore/layer"; +import i18n from "@/locale/index"; const IportalStore = IportalStoreCreate(); const panelStore = usePanelStore(); -const message = useMessage(); const layerStore = useLayerStore(); +const message = useMessage(); - -let language = computed(()=>{ - console.log("i18n.global.locale:",i18n.global.locale); +let language = computed(() => { return i18n.global.locale; -}) - +}); -// 初始化数据 +// 初始化变量 let state = reactive({ storageSceneShow: false, - sceneID: '', - loadingShow: false,// 模态框 - isloading:false -}) + sceneID: "", + loadingShow: false, // 模态框 + isloading: false, +}); +// 表格数据 let fromData = reactive({ - storageSceneCurrentTime: '', - scenePortalName: '', - scenePortalTages: '', + storageSceneCurrentTime: "", + scenePortalName: "", + scenePortalTages: "", scenePortalUser: "", - scenePortalDescription: '', -}) + scenePortalDescription: "", +}); // 关闭保存面板 function close() { @@ -167,7 +222,7 @@ function onSaveUserClk() { // 将所有图层汇总到layers function checkLayers() { - let layers = {} + let layers = {}; let s3mLayerlength = viewer.scene.layers._layers.length; //S3M图层 layers["s3mLayer"] = saveS3M(s3mLayerlength); @@ -186,15 +241,17 @@ function checkLayers() { layers["mapQueryOptions"] = layerStore.mapQueryOptions; // 地图查询绑定的数据源信息 layers["mediaFeildOptions"] = layerStore.mediaFeildOptions; // 地图查询中媒体字段的绑定信息 - + layers["sceneAttrState"] = layerStore.sceneAttrState; // 场景属性状态 - + layers["particleOptions"] = layerStore.particleOptions; // 三维特效 - 粒子 layers["layerStyleOptions"] = layerStore.layerStyleOptions; // s3m图层风格 layers["wmtsLayerOption"] = layerStore.wmtsLayerOption; // wmts服务 + layers["layerTreeAlias"] = layerStore.layerTreeAlias; // wmts服务 + return layers; } @@ -212,17 +269,9 @@ function getScpUrl(url: string) { // 保存S3M function saveS3M(s3mLayerlength: number) { let s3mlayerUrlList: any = []; - - // // 在图层管理中,有些图层不勾选即不显示,就不保存到场景中 - // let s3mLayerCheckedList: any[] = []; - // GlobalStore.layerTreeCheckedKeys.s3mLayerCheckedList.forEach(item => s3mLayerCheckedList.push(item)); - for (let i = 0, j = s3mLayerlength; i < j; i++) { let s3mTypeAndUrl: any = {}; let layer = viewer.scene.layers._layerQueue[i]; - - // if (s3mLayerCheckedList.indexOf(i.toString()) === -1) continue; - s3mTypeAndUrl["type"] = "S3MTilesLayer"; let layerUrl: any = layer._baseUri.scheme + @@ -233,6 +282,9 @@ function saveS3M(s3mLayerlength: number) { layerUrl = getScpUrl(layerUrl); s3mTypeAndUrl["url"] = layerUrl; s3mTypeAndUrl["name"] = layer.name; + if (layer.bindName) { + s3mTypeAndUrl["bindName"] = layer.bindName; + } s3mlayerUrlList.push(s3mTypeAndUrl); } } @@ -242,28 +294,21 @@ function saveS3M(s3mLayerlength: number) { // 保存影像 function saveImagery(imageryLayer: any) { let imageryLayerUrlList: string[] = []; - - // // 在图层管理中,有些图层不勾选即不显示,就不保存到场景中 - // let imageryLayerCheckedList: string[] = []; - // GlobalStore.layerTreeCheckedKeys.imageryLayerCheckedList.forEach(item => imageryLayerCheckedList.push(item)); - for (let j = 0; j < imageryLayer.length; j++) { - // if (imageryLayerCheckedList.indexOf(j.toString()) === -1) continue; - let imageryTypeAndUrl: any = {}; let provider = imageryLayer[j]._imageryProvider; if (provider._url) { - imageryTypeAndUrl["url"] = provider._url + imageryTypeAndUrl["url"] = provider._url; } else if (provider._resource) { - imageryTypeAndUrl["url"] = provider._resource._url + imageryTypeAndUrl["url"] = provider._resource._url; } else { imageryTypeAndUrl["url"] = ""; } if (provider instanceof SuperMap3D.BingMapsImageryProvider) { imageryTypeAndUrl["type"] = "BingMapsImageryProvider"; - imageryTypeAndUrl["token"] = provider._token + imageryTypeAndUrl["token"] = provider._token; } else if (provider instanceof SuperMap3D.TiandituImageryProvider) { imageryTypeAndUrl["type"] = "TiandituImageryProvider"; } else if (provider instanceof SuperMap3D.SingleTileImageryProvider) { @@ -276,6 +321,9 @@ function saveImagery(imageryLayer: any) { imageryTypeAndUrl["type"] = "GRIDIMAGERY"; } + if (imageryLayer[j].bindName) { + imageryTypeAndUrl["bindName"] = imageryLayer[j].bindName; + } imageryLayerUrlList.push(imageryTypeAndUrl); } return imageryLayerUrlList; @@ -284,20 +332,13 @@ function saveImagery(imageryLayer: any) { // 保存MVT function saveMVT() { let mvtLayerUrlList: any[] = []; - - // // 在图层管理中,有些图层不勾选即不显示,就不保存到场景中 - // let mvtLayerCheckedList: string[] = []; - // GlobalStore.layerTreeCheckedKeys.mvtLayerCheckedList.forEach(item => mvtLayerCheckedList.push(item)); - for (let k = 0; k < viewer.scene._vectorTileMaps._layerQueue.length; k++) { - // if (mvtLayerCheckedList.indexOf(k.toString()) === -1) continue; - let mvtLayer = viewer.scene._vectorTileMaps._layerQueue[k]; if (mvtLayer._provider) { let obj = { url: mvtLayer._provider.tablename, - name: mvtLayer._name - } + name: mvtLayer._name, + }; mvtLayerUrlList.push(obj); } } @@ -312,9 +353,9 @@ function saveTerrain() { if (terrainProvider._urls) { terrainLayer = terrainProvider._urls[0]; } else if (terrainProvider._baseUrl) { - terrainLayer = terrainProvider._baseUrl + terrainLayer = terrainProvider._baseUrl; } else { - terrainLayer = false + terrainLayer = false; } let terrainLayerUrl: any = []; if (terrainLayer) { @@ -327,20 +368,23 @@ function saveTerrain() { terrainTypeAndUrl["type"] = "supermapOnlineTerrain"; } terrainTypeAndUrl["url"] = terrainLayer; + if (viewer.terrainProvider.bindName) { + terrainTypeAndUrl["bindName"] = viewer.terrainProvider.bindName; + } terrainLayerUrl.push(terrainTypeAndUrl); } return terrainLayerUrl; } + //创建并保存场景 function createAndSaveScene() { - // let that = this; - if(!fromData.scenePortalName || fromData.scenePortalName == ''){ - message.warning(GlobalLang.sceneSaveNameCannotBeNull); + if (!fromData.scenePortalName || fromData.scenePortalName == "") { + message.warning($t("sceneSaveNameCannotBeNull")); return; } - if(!fromData.scenePortalTages || fromData.scenePortalTages == ''){ - message.warning(GlobalLang.sceneSaveLableCannotBeNull); + if (!fromData.scenePortalTages || fromData.scenePortalTages == "") { + message.warning($t("sceneSaveLableCannotBeNull")); return; } @@ -352,7 +396,6 @@ function createAndSaveScene() { let description = fromData.scenePortalDescription; let data: any = {}; - // data.layers = {}; //检查该图层对应于S3M、Terrain、Imagery data.layers = checkLayers(); @@ -365,16 +408,18 @@ function createAndSaveScene() { position: { x: camera.positionWC.x, y: camera.positionWC.y, - z: camera.positionWC.z + z: camera.positionWC.z, }, heading: camera.heading, pitch: camera.pitch, - roll: camera.roll + roll: camera.roll, + positionCartographic: camera.positionCartographic, //供平面场景(哥伦布视图)下使用 }; data.environmentState = { enableLighting: viewer.scene.globe.enableLighting, skyAtmosphereShow: viewer.scene.skyAtmosphere.show, - enableFog: viewer.scene.fog.enabled + enableFog: viewer.scene.fog.enabled, + sceneMode: viewer.scene.mode, }; data.version = "2.0"; let saveData = { @@ -382,95 +427,81 @@ function createAndSaveScene() { tags: tagsArray, userName: userName, description: description, - content: JSON.stringify(data) + content: JSON.stringify(data), }; - console.log("对接online-saveData:",saveData); - console.log("对接online-IportalStore.userInfo:",IportalStore.userInfo); + if (window.iEarthConsole) console.log("对接online-saveData:", saveData); + if (window.iEarthConsole) + console.log("对接online-IportalStore.userInfo:", IportalStore.userInfo); - // let iportaluserName = IportalStore.portalUserprofile.userName; let iportaluserName = IportalStore.userInfo.userName; if (iportaluserName === "GUEST") { - message.error(GlobalLang.saveErrorNeedOnline); + message.error($t("saveErrorNeedOnline")); return; } - // modulePermissions : [true] - // let iportalUpdateScene = IportalStore.portalUserprofile.modulePermissions[0]; - // if (iportalUpdateScene != true) { - // message.error(GlobalLang.saveErrorNeedOnline); - // return; - // } - - // 之前的,这里始终接口好像有变化,暂时不用,不然部署保存打开会有问题 - // let iportalUpdateScene = IportalStore.portalUserprofile.modulePermissions; - // console.log("save-iportalUpdateScene:",iportalUpdateScene); - // if ( - // !iportalUpdateScene.includes("portal:user:createUpdateDeleteScenes") && - // !iportalUpdateScene.includes("*") - // ) { - // message.error("存储失败,请先登录iPortal或Online账户......"); - // return; - // } - // 保存场景 let url = getRootUrl() + "web/scenes.json"; - window.axios .post(url, JSON.stringify(saveData), { withCredentials: true }) - .then(function (response) { - console.log("对接online-保存后-response:",response); - state.sceneID = response.data.newResourceID; - //保存缩略图 - let putSceneUrl = - getRootUrl() + - "web/scenes/" + - parseInt(response.data.newResourceID) + - "/thumbnail.json"; - - window - .axios({ - method: "put", - url: putSceneUrl, - data: base64, - headers: { "Content-type": "application/x-www-form-urlencoded" }, - withCredentials: true - }) - .then(function () { - state.isloading = false; - message.success(GlobalLang.saveSuccess); - panelStore.showSavePanel = false; - setTimeout(() => { - let currentUrl = - getRootUrl() + - "apps/earth/v2/index.html?id=" + - response.data.newResourceID; - console.log("对接online-currentUrl:",currentUrl) - window.open(currentUrl, "_self"); - }, 1000); - }) - .catch(function (error) { - message.error(error.message.toString()); - }); - },function(err){ - console.log(err); - state.isloading = false; - message.warning('配额不足'); - }); + .then( + function (response) { + if (window.iEarthConsole) + console.log("对接online-保存后-response:", response); + state.sceneID = response.data.newResourceID; + //保存缩略图 + let putSceneUrl = + getRootUrl() + + "web/scenes/" + + parseInt(response.data.newResourceID) + + "/thumbnail.json"; + + window + .axios({ + method: "put", + url: putSceneUrl, + data: base64, + headers: { "Content-type": "application/x-www-form-urlencoded" }, + withCredentials: true, + }) + .then(function () { + state.isloading = false; + message.success($t("saveSuccess")); + panelStore.showSavePanel = false; + setTimeout(() => { + let currentUrl = + getRootUrl() + + "apps/earth/v2/index.html?id=" + + response.data.newResourceID; + if (window.iEarthConsole) + console.log("对接online-currentUrl:", currentUrl); + window.open(currentUrl, "_self"); + }, 1000); + }) + .catch(function (error) { + message.error(error.message.toString()); + }); + }, + function (err) { + console.log(err); + state.isloading = false; + message.warning("配额不足"); + } + ); } // 更新保存场景的信息 function updateScene() { - if(!fromData.scenePortalName || fromData.scenePortalName == ''){ - message.warning(GlobalLang.sceneSaveNameCannotBeNull); + if (!fromData.scenePortalName || fromData.scenePortalName == "") { + message.warning($t("sceneSaveNameCannotBeNull")); return; } - if(!fromData.scenePortalTages || fromData.scenePortalTages == ''){ - message.warning(GlobalLang.sceneSaveLableCannotBeNull); + if (!fromData.scenePortalTages || fromData.scenePortalTages == "") { + message.warning($t("sceneSaveLableCannotBeNull")); return; } - + state.isloading = true; let name = fromData.scenePortalName; @@ -498,16 +529,18 @@ function updateScene() { position: { x: camera.positionWC.x, y: camera.positionWC.y, - z: camera.positionWC.z + z: camera.positionWC.z, }, heading: camera.heading, pitch: camera.pitch, - roll: camera.roll + roll: camera.roll, + positionCartographic: camera.positionCartographic, //供平面场景(哥伦布视图)下使用 }; data.environmentState = { enableLighting: viewer.scene.globe.enableLighting, skyAtmosphereShow: viewer.scene.skyAtmosphere.show, - enableFog: viewer.scene.fog.enabled + enableFog: viewer.scene.fog.enabled, + sceneMode: viewer.scene.mode, }; data.version = "2.0"; let saveData = { @@ -515,87 +548,86 @@ function updateScene() { tags: tagsArray, userName: userName, description: description, - content: JSON.stringify(data) + content: JSON.stringify(data), }; - console.log("对接online-saveData-更新:",saveData); - console.log("对接online-IportalStore.userInfo-更新:",IportalStore.userInfo); + if (window.iEarthConsole) console.log("对接online-saveData-更新:", saveData); + if (window.iEarthConsole) + console.log( + "对接online-IportalStore.userInfo-更新:", + IportalStore.userInfo + ); - // let iportaluserName = IportalStore.portalUserprofile.userName; let iportaluserName = IportalStore.userInfo.userName; if (iportaluserName === "GUEST") { - message.error(GlobalLang.saveErrorNeedOnline); + message.error($t("saveErrorNeedOnline")); return; } - // modulePermissions : [true] - // let iportalUpdateScene = IportalStore.portalUserprofile.modulePermissions[0]; - // if (iportalUpdateScene != true) { - // message.error(GlobalLang.saveErrorNeedOnline); - // return; - // } - // 更新场景 let url = getRootUrl() + "web/scenes/" + state.sceneID + ".json"; window.axios .put(url, JSON.stringify(saveData), { withCredentials: true }) - .then(function () { - console.log("对接online-更新成功:"); - - //保存缩略图 - let putSceneUrl = - getRootUrl() + "web/scenes/" + state.sceneID + "/thumbnail.json"; - window - .axios({ - method: "put", - url: putSceneUrl, - data: base64, - headers: { "Content-type": "application/x-www-form-urlencoded" }, - withCredentials: true - }) - .then(function () { - panelStore.showSavePanel = false; - state.isloading = false; - message.success(GlobalLang.saveUpdate); - let currentUrl = - getRootUrl() + "apps/earth/v2/index.html?id=" + state.sceneID; - // console.log("currentUrl:",currentUrl) - window.open(currentUrl, "_self"); - }) - .catch(function (error) { - console.log(error) - }); - },function(err){ - console.log(err); - state.isloading = false; - message.warning('配额不足'); - }); + .then( + function () { + if (window.iEarthConsole) console.log("对接online-更新成功:"); + + //保存缩略图 + let putSceneUrl = + getRootUrl() + "web/scenes/" + state.sceneID + "/thumbnail.json"; + window + .axios({ + method: "put", + url: putSceneUrl, + data: base64, + headers: { "Content-type": "application/x-www-form-urlencoded" }, + withCredentials: true, + }) + .then(function () { + panelStore.showSavePanel = false; + state.isloading = false; + message.success($t("saveUpdate")); + let currentUrl = + getRootUrl() + "apps/earth/v2/index.html?id=" + state.sceneID; + if (window.iEarthConsole) console.log("currentUrl:", currentUrl); + window.open(currentUrl, "_self"); + }) + .catch(function (error) { + console.log(error); + }); + }, + function (err) { + console.log(err); + state.isloading = false; + message.warning("配额不足"); + } + ); } -watch(() => panelStore.showSavePanel, () => { - fromData.storageSceneCurrentTime = getNowFormatDate(); - fromData.scenePortalUser = IportalStore.userInfo.userName; - if (IportalStore.saveInfo) { - fromData.scenePortalName = IportalStore.saveInfo.scenePortalName; - fromData.scenePortalTages = IportalStore.saveInfo.scenePortalTages; - fromData.scenePortalUser = IportalStore.saveInfo.scenePortalUser; - fromData.scenePortalDescription = IportalStore.saveInfo.scenePortalDescription; - } -}) +watch( + () => panelStore.showSavePanel, + () => { + fromData.storageSceneCurrentTime = getNowFormatDate(); + fromData.scenePortalUser = IportalStore.userInfo.userName; + if (IportalStore.saveInfo) { + fromData.scenePortalName = IportalStore.saveInfo.scenePortalName; + fromData.scenePortalTages = IportalStore.saveInfo.scenePortalTages; + fromData.scenePortalUser = IportalStore.saveInfo.scenePortalUser; + fromData.scenePortalDescription = + IportalStore.saveInfo.scenePortalDescription; + } + } +); </script> -<style lang="scss" scoped> -.save-scene-container { - padding: 0 0.5rem; - box-sizing: border-box; -} - -.btn-row-item { - margin-left: 0.83rem; +<style lang="scss" scoped> +#sceneCanvas { + width: 100%; + margin-bottom: 0.1rem; } -.n-form-item-blank{ - display: flex; - justify-content: center; +.save-scene-container { + padding: 0 0.1rem; + box-sizing: border-box; } -</style> \ No newline at end of file +</style> diff --git a/SuperMap iEarth/src/layout/layoutHeader/components/user/index.ts b/SuperMap iEarth/src/layout/layoutHeader/components/user/index.ts index 675ac198..9746667d 100644 --- a/SuperMap iEarth/src/layout/layoutHeader/components/user/index.ts +++ b/SuperMap iEarth/src/layout/layoutHeader/components/user/index.ts @@ -1,3 +1,3 @@ -import User from './index.vue'; +import User from './user.vue'; export { User }; diff --git a/SuperMap iEarth/src/layout/layoutHeader/components/user/index.vue b/SuperMap iEarth/src/layout/layoutHeader/components/user/index.vue deleted file mode 100644 index 1141d649..00000000 --- a/SuperMap iEarth/src/layout/layoutHeader/components/user/index.vue +++ /dev/null @@ -1,115 +0,0 @@ -<template> - <div class="userinfoBox" v-show="!GlobalStore.isNormalMode"> - <i class="iconfont iconuser"></i> - <div v-if="IportalStore.isLogin" @click="toUserInfoPage"> - <span style="font-size: 0.15rem;"> {{ UserName }}</span> - </div> - <n-tooltip v-else> - <template #trigger> - <n-button @click="showLoginBox" :bordered="false" tag="div" style="font-size: 0.15rem;">{{ - IportalStore.userInfo.userName === 'GUEST' ? $t('global.tourists') : IportalStore.userInfo.userName - }}</n-button> - </template> - {{$t('global.loginPlease')}} - </n-tooltip> - </div> -</template> - -<script lang="ts" setup> - -import { computed } from "vue"; -import Authenticate from "@ispeco/authentication-sdk"; // 超图iportal第三方库 -import { IportalStoreCreate } from "@/store/iportalManage/index"; -import { GlobalStoreCreate } from '@/store/global/global'; -import { getRootUrl } from "@/tools/iportal/portalTools"; - -// const modelShowInfo = ref(false); -// const modelShow = ref(false); - -// // 是否失败 -// const fallback = ref(false); -// // 用户名 - -// interface loginProps { -// data: { -// user: { -// name: string; -// nickname: string; -// }; -// reason: string; -// success: string; -// }; -// type: string; -// } - -const IportalStore = IportalStoreCreate(); -const GlobalStore = GlobalStoreCreate(); - - -// 登录页面 -function showLoginBox() { -// const { authSucceed, ...restOption } = option; -const authInstance = new Authenticate({ - loginOptions: { - theme: "dark", - // logoUrl: ('./logo.png'), - appName: "iEarth", - // rootUrl: "/iportal/", // 正确的地址 - }, - onSucceed: function (result: any){ - console.log("用户信息", result); - const { data } = result; - if (data && data.success && data.user) { - IportalStore.isLogin = true; - IportalStore.userInfo.userName = data.user.name; - IportalStore.userInfo.nickName = data.user.nickname; - window["$message"].success("登录成功"); - } - }, - onFailed: function (err) { - console.log("err------>", err); - // window["$message"].error(err.data.message); - }, - onCanceled: function (err) { - console.log("err------>", err); - // window["$message"].error(err.data.message); - }, -}); -authInstance.create(); -} -// 用户信息 -function toUserInfoPage() { - let myAccountUrl = getRootUrl() + "web-ui/my-account/account"; - window.open(myAccountUrl); -} - -// 有昵称优先使用昵称,没有再使用用户名 -let UserName = computed(()=>{ - if(IportalStore.userInfo.nickName && IportalStore.userInfo.nickName != ""){ - return IportalStore.userInfo.nickName; - }else{ - // return IportalStore.userInfo.userName; - let userName = IportalStore.userInfo.userName; - if(userName == 'GUEST'){ - return GlobalLang.tourists; - }else{ - return userName; - } - - } -}) -</script> - -<style lang="scss" scoped> -.userinfoBox{ - // width: 1.3rem; - display: flex; - justify-content: space-between; - - margin-right: 0.06px; - - line-height: .38rem; - align-items: center; -} - -</style> diff --git a/SuperMap iEarth/src/layout/layoutHeader/components/user/user.vue b/SuperMap iEarth/src/layout/layoutHeader/components/user/user.vue new file mode 100644 index 00000000..f278e008 --- /dev/null +++ b/SuperMap iEarth/src/layout/layoutHeader/components/user/user.vue @@ -0,0 +1,101 @@ +<template> + <div class="userinfoBox" v-show="!GlobalStore.isNormalMode"> + <i class="iconfont iconuser"></i> + <div @click="toUserInfoPage" v-if="IportalStore.isLogin"> + <span class="userbox"> {{ UserName }} </span> + </div> + <n-tooltip v-else> + <template #trigger> + <n-button :bordered="false" tag="div" @click="showLoginBox"> + {{ + IportalStore.userInfo.userName === "GUEST" + ? $t("tourists") + : IportalStore.userInfo.userName + }} + </n-button> + </template> + {{ $t("loginPlease") }} + </n-tooltip> + </div> +</template> + +<script lang="ts" setup> +import Authenticate from "@ispeco/authentication-sdk"; // 超图iportal第三方库 +import { computed } from "vue"; +import { useMessage } from "naive-ui"; +import { IportalStoreCreate } from "@/store/iportalManage/index"; +import { GlobalStoreCreate } from "@/store/global/global"; +import { getRootUrl } from "@/tools/iportal/portalTools"; + +const IportalStore = IportalStoreCreate(); +const GlobalStore = GlobalStoreCreate(); +const message = useMessage(); + +// 登录页面 +function showLoginBox() { + const authInstance = new Authenticate({ + loginOptions: { + theme: "dark", + appName: "iEarth", + // logoUrl: ('./logo.png'), + // rootUrl: "/iportal/", // 正确的地址 + }, + onSucceed: function (result: any) { + if (window.iEarthConsole) console.log("用户信息", result); + const { data } = result; + if (data && data.success && data.user) { + IportalStore.isLogin = true; + IportalStore.userInfo.userName = data.user.name; + IportalStore.userInfo.nickName = data.user.nickname; + message.success("登录成功"); + } + }, + onFailed: function (err) { + console.log("err------>", err); + // message.error(err.data.message); + }, + onCanceled: function (err) { + console.log("err------>", err); + // message.error(err.data.message); + }, + }); + authInstance.create(); +} +// 用户信息 +function toUserInfoPage() { + let myAccountUrl = getRootUrl() + "web-ui/my-account/account"; + window.open(myAccountUrl); +} + +// 有昵称优先使用昵称,没有再使用用户名 +let UserName = computed(() => { + if (IportalStore.userInfo.nickName && IportalStore.userInfo.nickName != "") { + return IportalStore.userInfo.nickName; + } else { + let userName = IportalStore.userInfo.userName; + if (userName == "GUEST") { + return $t("tourists"); + } else { + return userName; + } + } +}); +</script> +<style lang="scss" scoped> +.userinfoBox { + width: auto; + height: 0.4rem; + line-height: 0.4rem; + display: flex; + justify-content: end; + + .iconfont { + margin-right: 0.1rem; + font-size: 0.18rem; + } + + .userbox { + font-size: 0.15rem; + } +} +</style> diff --git a/SuperMap iEarth/src/layout/layoutHeader/index.vue b/SuperMap iEarth/src/layout/layoutHeader/index.vue index fc0a0a8d..2d62f40f 100644 --- a/SuperMap iEarth/src/layout/layoutHeader/index.vue +++ b/SuperMap iEarth/src/layout/layoutHeader/index.vue @@ -1,29 +1,36 @@ <template> <n-layout-header bordered> <div class="header-container" v-if="headShow"> - <div class="head-content header-left"> - <!-- 切换语言 --> - <!-- <lang-select></lang-select> --> - </div> - <!-- 头部切换 --> + <div class="head-content header-left"></div> + + <!-- 头部 Open --> <div class="head-content header-center"> - <img src="@/assets/images/earth.png" style="width: 0.36rem;height: 0.36rem;margin-top: 3px;margin-right: 3px;" alt="" /> - <span style="font-size: 0.28rem; color: rgba(255,255,255,0.85);" class="head-title">{{$t('global.earth3D')}}</span> - <i class="iconfont iconxiala" @click="headerFold" style="font-size: 0.12rem;"></i> + <img src="@/assets/images/earth.png" /> + <span class="head-title">{{ $t("earth3D") }}</span> + <i class="iconfont iconxiala" @click="headerFold"></i> </div> + <!-- 保存+用户 --> <div class="head-content header-right"> - <!-- <i class="iconfont iconbaocun" @click="save"></i> --> - <i class="iconfont iconbaocun" @click="save" v-show="IportalStore.isLogin"></i> - <!-- <i class="iconfont iconbaocun" @click="save" v-if="IportalStore.isLogin"></i> --> + <i + class="iconfont iconbaocun" + @click="save" + v-show="IportalStore.isLogin" + ></i> <n-divider vertical /> <User></User> </div> </div> + <!-- 头部 Down --> <div class="headerFoldBox" v-else> - <i class="iconfont iconxiala downSvg" @click="headerOpen" style="font-size: 0.12rem;"></i> + <i + class="iconfont iconxiala downSvg" + @click="headerOpen" + style="font-size: 0.12rem" + ></i> </div> + <!-- 保存场景弹窗 --> <SaveScene></SaveScene> </n-layout-header> @@ -31,24 +38,22 @@ <script setup lang="ts"> import { ref } from "vue"; -import SaveScene from "./components/saveScene"; import { IportalStoreCreate } from "@/store/iportalManage/index"; -import {User} from './components/user/index' import { usePanelStore } from "@/store/index"; +import { User } from "./components/user/index"; +import SaveScene from "./components/saveScene"; const panelStore = usePanelStore(); const IportalStore = IportalStoreCreate(); -let headShow = ref(false); - // 保存弹窗 function save() { - // panelStore.setSceneModal(true); panelStore.showSavePanel = true; panelStore.isEditMode = true; outputSceneToFile(); } + // 缩略图 function outputSceneToFile() { let promise = viewer.scene.outputSceneToFile(); @@ -62,84 +67,67 @@ function outputSceneToFile() { }; }); } + +let headShow = ref(false); // 页头折叠 -function headerFold(){ +function headerFold() { headShow.value = false; } // 页头展开 -function headerOpen(){ +function headerOpen() { headShow.value = true; } </script> <style lang="scss"> -@font-face { - font-family: OptimizationTitle; - src: url('@/assets/fonts/OptimizationTitleBlack.TTF'); -} - .head-title { - font-family: 'OptimizationTitle'; + font-family: "OptimizationTitle"; } .header-container { - position: absolute; - z-index: 2; - color: #fff; - // @include flexLayout(space-between); @include setBackground(100%, 0.48rem, "@/assets/images/header-bg.png"); @include flexLayout(center); + z-index: 100; + position: absolute; + background-size: 100% 0.48rem; + .head-title { - font-size: 26px; - } - .iconxiala { - transform: rotate(180deg); - margin-left: 0.1rem; + font-size: 0.28rem; + color: rgba(255, 255, 255, 0.85); } - // .iconfont { - // @include setIconstyle(); - // } + .head-content { - width: 33%; @include flexLayout(center); + width: 33%; + } + + .header-center { + img { + width: 0.36rem; + height: 0.36rem; + } } .header-right { justify-content: end; - .user-name { - margin-left: 0.05rem; - margin-right: 0.13rem; - } + } + + .iconxiala { + transform: rotate(180deg); + margin-left: 0.1rem; + font-size: 0.12rem; } } .headerFoldBox { + @include setBackground(100%, 0.48rem, "@/assets/images/header-fold-bg.png"); + z-index: 100; position: absolute; left: 50%; top: 0%; - text-align: center; - background-color: #fff; - // border-radius: 20px; - width: 100px !important; - height: 12px !important; - - z-index: 99; - transform: translate(-50%, 0%); - - @include setBackground(100%, 0.48rem,'@/assets/images/header-fold-bg.png'); - - /*flex 布局*/ - display: flex; - /*实现垂直居中*/ - align-items: center; - /*实现水平居中*/ - justify-content: center; - - // .downSvg { - // transform: rotateZ(180deg); - // // margin-left: 0.45rem; - // } + width: 1.1rem; + height: 0.15rem; } </style> diff --git a/SuperMap iEarth/src/layout/layoutMain/components/layoutLeftSider/index.vue b/SuperMap iEarth/src/layout/layoutMain/components/layoutLeftSider/index.vue index 0bb850a6..65e313ca 100644 --- a/SuperMap iEarth/src/layout/layoutMain/components/layoutLeftSider/index.vue +++ b/SuperMap iEarth/src/layout/layoutMain/components/layoutLeftSider/index.vue @@ -4,8 +4,8 @@ class="icon-container" v-for="iconItem in panelStore.panelList.leftToolBarList" :key="iconItem.id" - @click="changePanel(iconItem)" :class="iconItem.isSelected ? 'select-too-bar-bg' : ''" + @click="changePanel(iconItem)" > <i class="iconfont" @@ -18,46 +18,86 @@ <script setup lang="ts"> import { usePanelStore } from "@/store"; -import { useLayerStore } from "@/store/layerStore"; +import { useLayerStore } from "@/store/layerStore/layer"; const panelStore = usePanelStore(); const layerStore = useLayerStore(); +// 切换面板 function changePanel(iconItem: any) { - // console.log("iconItem:",iconItem); panelStore.setLeftToolBarList(iconItem); - if(iconItem.id === 1){ - // 提交注释掉 - if(layerStore.layerTreeData[1].children.length === 0){ + setTimeout(() => { + setLeftPanelStyle(iconItem.id); + }); + + if (iconItem.id === 1) { + if (layerStore.layerTreeData[1].children.length === 0) { layerStore.refreshLayerTree(); } } } + +// 左侧面板宽度样式切换 +function setLeftPanelStyle(id: number) { + let dom_header: any = document.getElementsByClassName("panle-header"); + let dom_container: any = document.getElementsByClassName("panle-container"); + let dom_footer: any = document.getElementsByClassName("panle-footer"); + let zst1: any = document.getElementsByClassName("zst1"); + + if (id === 1) { + if (dom_header.length > 0) { + dom_header[0].style.width = "2.64rem"; + } + if (dom_container.length > 0) { + dom_container[0].style.width = "2.64rem"; + } + if (dom_footer.length > 0) { + dom_footer[0].style.width = "2.64rem"; + } + if (zst1.length > 0) { + zst1[0].style.left = "1.1rem"; + } + } else if (id === 2) { + if (dom_header.length > 0) { + dom_header[0].style.width = "3.84rem"; + } + if (dom_container.length > 0) { + dom_container[0].style.width = "3.84rem"; + } + if (dom_footer.length > 0) { + dom_footer[0].style.width = "3.84rem"; + } + if (zst1.length > 0) { + zst1[0].style.left = "1.6rem"; + } + } +} </script> <style lang="scss" scoped> .left-tool-bar { - padding-top: 0.05rem; - box-sizing: border-box; + z-index: 100; + @include setBackground(0.32rem, 0.76rem, "@/assets/images/left-tool-bg.png"); position: fixed; - top: 0.6rem; + top: 0.8rem; left: 0.16rem; - z-index: 2; - @include setBackground(0.32rem, 0.76rem, "@/assets/images/left-tool-bg.png"); - background-size:100% 98%; + padding-top: 0.06rem; + box-sizing: border-box; + .icon-container { + display: block; width: 100%; height: 0.32rem; - color: rgba(255, 255, 255, 0.85); @include flexLayout(center); @include setIconstyle(); } + .select-too-bar-bg { @include setBackground( - 100%, + 0.32rem, 0.32rem, "@/assets/images/item-checked-bg.png" ); } } -</style> \ No newline at end of file +</style> diff --git a/SuperMap iEarth/src/layout/layoutMain/components/layoutRightSider/index.vue b/SuperMap iEarth/src/layout/layoutMain/components/layoutRightSider/index.vue index 9a2579f5..b305a783 100644 --- a/SuperMap iEarth/src/layout/layoutMain/components/layoutRightSider/index.vue +++ b/SuperMap iEarth/src/layout/layoutMain/components/layoutRightSider/index.vue @@ -1,53 +1,72 @@ <template> <div class="right-tool-bar"> - <!-- 搜索 --> - <!-- <div class="too-bar one-tool-bar"> - <span class="icon-container"> - <i class="iconfont icon-zhinan"></i> - </span> - </div> --> <!-- 指南 --> <div class="too-bar two-tool-bar"> <span class="icon-container" @click="reduceCompass"> - <i class="iconfont iconzhibeizhen_1" id="compass_dom" :title="$t('global.w_north')"></i> + <i + class="iconfont iconzhibeizhen_1" + id="compass_dom" + :title="$t('w_north')" + ></i> </span> <span class="icon-container" @click="reset"> - <i class="iconfont iconfuwei" :title="$t('global.w_reset')"></i> + <i class="iconfont iconfuwei" :title="$t('w_reset')"></i> </span> </div> <!-- 缩放 --> <div class="too-bar two-tool-bar"> <span class="icon-container"> - <i class="iconfont iconfangda" @click="zoomIn" @mousedown="continueZoomIn" @mouseup="clearTimer" :title="$t('global.w_zoomIn')"></i> + <i + class="iconfont iconfangda" + @click="zoomIn" + @mousedown="continueZoomIn" + @mouseup="clearTimer" + :title="$t('w_zoomIn')" + ></i> </span> <span class="icon-container"> - <i class="iconfont iconsuoxiao" @click="zoomOut" @mousedown="continueZoomOut" @mouseup="clearTimer" :title="$t('global.w_zoomOut')"></i> + <i + class="iconfont iconsuoxiao" + @click="zoomOut" + @mousedown="continueZoomOut" + @mouseup="clearTimer" + :title="$t('w_zoomOut')" + ></i> </span> </div> <!-- 分析等弹窗 --> <div class="too-bar four-tool-bar"> - <span class="icon-container" v-for="iconItem in state.rightToolBarList" :key="iconItem.id" - @click="changePanel(iconItem)" :class="iconItem.isSelected ? 'select-too-bar-bg' : ''"> - <i class="iconfont" :class="iconItem.iconName" :title="$t(iconItem.title)"></i> + <span + class="icon-container" + v-for="iconItem in state.rightToolBarList" + :key="iconItem.id" + @click="changePanel(iconItem)" + :class="iconItem.isSelected ? 'select-too-bar-bg' : ''" + > + <i + class="iconfont" + :class="iconItem.iconName" + :title="$t(iconItem.title)" + ></i> </span> </div> <!--全屏--> - <div class="too-bar one-tool-bar" style="margin-bottom: 0.1rem" @click="fullScreen"> + <div class="too-bar one-tool-bar" @click="fullScreen"> <span class="icon-container"> - <i class="iconfont iconzuidahua" :title="$t('global.w_fullScreen')"></i> + <i class="iconfont iconzuidahua" :title="$t('w_fullScreen')"></i> </span> </div> <!--首页--> <div class="too-bar one-tool-bar" v-show="IportalStore.isLogin"> <span class="icon-container"> - <i class="iconfont iconzhuye" :title="$t('global.w_home')" @click="goHome"></i> + <i class="iconfont iconzhuye" :title="$t('w_home')" @click="goHome"></i> </span> </div> </div> </template> <script setup lang="ts"> -import { onMounted, reactive, watch } from "vue"; +import { onMounted, reactive } from "vue"; import { usePanelStore } from "@/store"; import { IportalStoreCreate } from "@/store/iportalManage/index"; import { getRootUrl } from "@/tools/iportal/portalTools"; @@ -62,8 +81,8 @@ onMounted(() => { }); let state = reactive({ - rightToolBarList:panelStore.panelList.rightToolBarList.slice(0,4) -}) + rightToolBarList: panelStore.panelList.rightToolBarList.slice(0, 4), +}); // 初始化 function init() { @@ -83,6 +102,15 @@ function init() { function changePanel(iconItem: any) { panelStore.setRightToolBarList(iconItem); } + +// 清除定时器 +function clearTimer() { + if (timer) { + clearInterval(timer); + timer = null; + } +} + // 放大 function zoomIn() { let position = viewer.camera.position; @@ -95,13 +123,6 @@ function zoomIn() { function continueZoomIn() { timer = setInterval(() => zoomIn(), 50); } -// 清除定时器 -function clearTimer() { - if (timer) { - clearInterval(timer); - timer = null; - } -} //缩小 function zoomOut() { @@ -144,10 +165,9 @@ function listener() { //指北针 function reduceCompass() { - var scene = viewer.scene; - var camera = scene.camera; - - var sscc = scene.screenSpaceCameraController; + let scene = viewer.scene; + let camera = scene.camera; + let sscc = scene.screenSpaceCameraController; if (scene.mode == SuperMap3D.SceneMode.MORPHING || !sscc.enableInputs) { return true; @@ -176,82 +196,74 @@ function reduceCompass() { } } - var center = scene.pickPosition(scratchWindowPosition); - + let center = scene.pickPosition(scratchWindowPosition); if (!SuperMap3D.defined(center)) { - // Globe is barely visible, so reset to home view. reset(); return; } - var cameraPosition = scene.globe.ellipsoid.cartographicToCartesian( + let cameraPosition = scene.globe.ellipsoid.cartographicToCartesian( camera.positionCartographic, new SuperMap3D.Cartesian3() ); - var surfaceNormal = scene.globe.ellipsoid.geodeticSurfaceNormal(center); - - var focusBoundingSphere = new SuperMap3D.BoundingSphere(center, 0); + let surfaceNormal = scene.globe.ellipsoid.geodeticSurfaceNormal(center); + let focusBoundingSphere = new SuperMap3D.BoundingSphere(center, 0); camera.flyToBoundingSphere(focusBoundingSphere, { offset: new SuperMap3D.HeadingPitchRange( 0, - // do not use camera.pitch since the pitch at the center/target is required SuperMap3D.Math.PI_OVER_TWO - - SuperMap3D.Cartesian3.angleBetween(surfaceNormal, camera.directionWC), - // distanceToBoundingSphere returns wrong values when in 2D or Columbus view so do not use - // camera.distanceToBoundingSphere(focusBoundingSphere) - // instead calculate distance manually + SuperMap3D.Cartesian3.angleBetween(surfaceNormal, camera.directionWC), SuperMap3D.Cartesian3.distance(cameraPosition, center) ), duration: 1.5, }); } +// 回到主页 function goHome() { let homeUrl = getRootUrl(); - window.open(homeUrl); + window.open(homeUrl); } - </script> <style lang="scss" scoped> // 工具栏位置 .right-tool-bar { position: fixed; - top: 0.6rem; + top: 0.8rem; right: 0.1rem; - z-index: 2; .one-tool-bar { - @include setBackground(0.32rem, - 0.34rem, + @include setBackground( + 0.32rem, + 0.32rem, "@/assets/images/right-tool-one-bar.png" ); - background-size: 100% 100%; } .two-tool-bar { box-sizing: border-box; - padding-top:0.04rem; + padding-top: 0.04rem; margin-bottom: 0.1rem; - @include setBackground(0.32rem, + @include setBackground( + 0.32rem, 0.72rem, "@/assets/images/right-tool-two-bar.png" ); - background-size: 100% 100%; } .four-tool-bar { box-sizing: border-box; - padding-top:0.08rem; + padding-top: 0.08rem; margin-top: 0.4rem; margin-bottom: 0.1rem; - @include setBackground(0.32rem, + @include setBackground( + 0.32rem, 1.48rem, "@/assets/images/right-tool-four-bar.png" ); - background-size: 100% 98%; } .icon-container { @@ -263,10 +275,11 @@ function goHome() { } .select-too-bar-bg { - @include setBackground(0.32rem, + @include setBackground( + 0.32rem, 0.32rem, "@/assets/images/item-checked-bg.png" ); } } -</style> \ No newline at end of file +</style> diff --git a/SuperMap iEarth/src/layout/layoutMain/index.vue b/SuperMap iEarth/src/layout/layoutMain/index.vue index d117dd48..1bc9be5f 100644 --- a/SuperMap iEarth/src/layout/layoutMain/index.vue +++ b/SuperMap iEarth/src/layout/layoutMain/index.vue @@ -1,11 +1,9 @@ <template> <n-layout-content> - <!-- <n-spin> --> - <layout-left-sider></layout-left-sider> - <viewer></viewer> - <layout-right-sider></layout-right-sider> - <panel></panel> - <!-- </n-spin> --> + <layout-left-sider></layout-left-sider> + <viewer></viewer> + <layout-right-sider></layout-right-sider> + <panel></panel> </n-layout-content> </template> @@ -14,7 +12,4 @@ import Viewer from "@/views/viewer/index"; import LayoutLeftSider from "@/layout/layoutMain/components/layoutLeftSider/index"; import LayoutRightSider from "@/layout/layoutMain/components/layoutRightSider/index"; import Panel from "@/views/panel/index"; - </script> - -<style lang="scss" scoped></style> \ No newline at end of file diff --git a/SuperMap iEarth/src/locale/en/index.ts b/SuperMap iEarth/src/locale/en/index.ts deleted file mode 100644 index d156af98..00000000 --- a/SuperMap iEarth/src/locale/en/index.ts +++ /dev/null @@ -1,638 +0,0 @@ - -const global = { - - /** - * UI界面 - * */ - - // header 页头 - earth3D: '3D Earth', - control: 'Control board', - control_title: 'IEarth control board', - save: 'Save', - close: 'Close', - share: 'Share', - loginPlease: 'Please log in', - tourists: 'Tourists', - - // 保存面板 - sceneSave: 'SceneSave', - saveDate: 'SaveDate', - sceneName: 'SceneName', - sceneLable: 'SceneLable', - authorName: 'AuthorName', - sceneDescribe: 'SceneDescribe', - placeHolder: 'P[lease input info', - sceneSaveNameCannotBeNull: 'Save scene name cannot be empty!', - sceneSaveLableCannotBeNull: 'Save scene lable cannot be empty!', - saveErrorNeedOnline: 'Storage failed, please log in to your iPortal or Online account first......', - saveSuccess: 'Scene saved successfully!', - saveUpdate: 'Scene update successful!', - - // widgets 组件列表 - w_search: 'Search', - w_north: 'North', - w_reset: 'Reset', - w_zoomOut: 'ZoomOut', - w_zoomIn: 'ZoomIn', - w_fullScreen: 'FullScreen', - w_home: 'Home', - - // toolBar 侧边栏 - t_layerList: 'Layer List', - t_addData: 'Add Data', - t_analyse3d: 'Analyse 3D', - t_measure: 'Measure', - t_sceneProperties: 'Scene Properties', - t_objectPainting: 'Object Painting', - - - // 面板-header - layerList: 'Layer List', - addData: 'Add Data', - analyseSeries: 'Analyse 3D', - sceneProperties: 'Scene Properties', - measure: 'Measure', - objectPainting: 'Object Painting', - layerOpration: 'Opration', - layerAttribute: 'Attribute', - layerStyle: 'Style', - layerQuery: 'Query', - mapQuery: 'Map', - - // 操作面板 - 添加数据 - publicService: "PublicService", - customService: "CustomService", - onlineBaseMap: "BaseMap", - onlineTerrain: "Terrain", - portalService: "MyServer", - - // 操作面板-三维分析 - clip: 'Clip', // 内嵌 - terrain: 'Terrain', - analysis3d: '3D-analysis', - spatialAnalysis: 'Spatial analysis', - - // 三维分析 - Intervisibility: 'Visibility', - viewableRange: 'Viewshed', - ligShadowAnalysisth: 'Shadow', - profile: 'Profile', - Skyline: 'Skyline', - FacePlot: 'Plot', - - // 裁剪 - boxClip: 'Box', - planeClip: 'Plane', - crossClip: 'Cross', - polygonClip: 'Polygon', - clipMode: 'Clip mode', - inner: 'Inner', - outer: 'Outer', - boxclipTip: 'Click the left mouse button to draw the bottom of the box, move the mouse to draw the height of the box, and click the right mouse button to end the drawing', - displayCilpPlane: 'Display clip plane', - verticalNormal: 'Vertical normal', - parallelNormal: 'Parallel normal', - clipWidth: 'Clip width', - clipHeight: 'Clip height', - rotateX: 'Rotate X-axis', - rotateY: 'Rotate Y-axis', - rotateZ: 'Rotate Z-axis', - - // 地形操作 - terrainOperation: 'Operation', - inundationAnalysis: 'Inundation', - slopeAspect: 'Slope', - Isoline: 'Isoline', - terrainExcavate: 'Excavate', - terrainChange: 'Flatten', - excavationDepth: 'Depth', - excavateAreaOffsetUp: 'Move up', - upHeight: 'Height moved up', - editArea: 'Edit area', - editAreaZ: 'Edit Z-axis of area', - maximumVisibleElevation: 'Max visible EL', - minimumVisibleElevation: 'Min visible EL', - currentElevation: 'Current elevation', - transparency: 'Transparency', - inundationSpeed: 'Inundation speed', - analysisArea: 'AnalysisArea', - minSlope: 'MinSlope', - maxSlope: 'MaxSlope', - displayMode: 'DisplayMode', - partRegion: 'Designated region', - allRegion: 'All regions', - noRegion: 'No region', - allDisplay: "Arrow and Face Display", - arrowDisplay: "Arrow display", - faceDisplay: "Face display", - equivalentIsoline: 'Equivalent', - contourColor: 'Contour Color', - contourLineFill: 'Contour line Fill', - contourFaceFill: 'Contour Face Fill', - contourAllFill: 'Contour line and Face', - contourNoFill: 'No File', - - //操作面板-量算 - measureMode: 'MeasureMode', - pickPoint: 'PickPoint', - contour: 'Contour', - measureAction: 'Measure', - mode_space: 'Space Mode', - mode_ground: 'Ground Mode', - mode_projection: 'Planar Project', - measureDistence: 'MeasureDistence', - measureArea: 'MeasureArea', - measureHeight: 'MeasureHeight', - - // 操作面板-参数设置 - baseAttribute: 'Attribute', - flying: 'Flying', - ligth: 'Light', - viewPorts: 'ViewPorts', - speciallyEffect: 'SpecialEffects', - - //操作面板-场景属性-勾选 - earth: 'Earth', - sun: 'Sun', - depthInspection: 'Depth inspection', - atomsphereRender: 'Atomsphere render', - fogEffect: 'Fog effect', - cloudLayer: 'Cloud layer', - skyBox: 'Sky box', - timeAxis: 'Time axis', - displayFrame: 'Display frame', - - //操作面板-场景属性-选项 - brightness: 'Brightness', - contrastRatio: 'Contrast ratio', - colorTone: 'Color tone', - saturation: 'Saturation', - gamma: 'Gamma', - showUnderground: 'Show underground', - surfaceTransparency: 'Surface transparency', - displayCoordinate: 'Display coordinate', - coordinateQuery: 'Coordinate query', - coordinateTip: 'Longitude、Latitude、Elevation', - - //操作面板-飞行 - flyRoute: 'Fly route', - flyRoute_1: 'Fly route 1', - import: 'Import', - displayRoute: 'Display route', - displayStation: 'Display station', - rotateByPoint: 'Rotate by point', - rotateSpeed: 'Rotate speed', - rotateRepeat: 'Rotate repeat', - selectStation: 'Select station', - play: 'Play', - pause: 'Pause', - stop: 'Stop', - flySpeed: 'Fly speed', - addStation: 'Add station', - deleteStation: 'Delete station', - restore: 'Restore', - importFlyRoute: 'Import fly route', - createFlyRoute: 'Create fly route', - addedStops: 'Added Stops', - downLoad: 'DownLoad', - addStopSuccess: 'Successfully added Stop', - atLeastTwoStop: 'At least two nodes are required to save', - - - //操作面板-灯光 - symbolLibrary: 'Symbol library', - lightsourceColor: 'Light color', - diffusionDistance: 'Diffusion distance', - lightDecay: 'Light decay', - lightsourceIntensity: 'Light intensity', - spotlightRange: 'Spotlight range', - displayLightmodel: 'Display model', - displayLightcorrdinate: 'Display corrdinate', - modelInformation: 'Model information', - pointLight: 'Point light', - spotLight: 'Spot light', - parallelLight: 'Parallel light', - addSpotLightTip: 'Left click to draw two points to determine the direction of the light source, right click to end', - - - //操作面板-视图模式 - viewMode: 'View mode', - splitscreenModel: 'Split screen model', - openRollershutter: 'Open roller shutter', - noneSplitscreen: 'Do not use split screen', - horizontalSplitscreen: 'Horizontal splitscreen', - verticalSplitscreen: 'Vertical splitscreen', - threeViewport: 'Triple viewport', - fourViewport: 'Squad viewport', - noneRollershutter: "Do not use rollershutter", - leftrightRollershutter: 'Left and right rollershutter', - updownRollershutter: 'Up and down rollershutter', - customRollershutter: 'Custom rollershutter', - shieldDirection: 'Shield direction', - left: 'Left', - right: 'Right', - up: 'Up', - down: 'Down', - - //操作面板-场景特效 - floodLight: 'Floodlight', - scanLine: 'ScanLine', - rainSnow: 'Rain&Snow', - openFloodlight: 'Open floodlight', - heatMap: 'HeatMap', - brightnessThreshold: 'Brightness threshold', - floodlightThreshold: 'Floodlight threshold', - scanMode: 'Scan mode', - scanColor: 'Scan color', - scanTexture: 'Scan texture', - scanWidth:'Scan Width', - scanSpeed:'Scan Speed', - scanPeriod:'Scan Period', - customScanDirection: 'Custom scan direction', - customScanCenter: 'Custom scan center', - lineShape: 'Line', - circleShape: 'Circle', - noneScanTexture: 'Do not use texture', - lineTexture1: 'Line texture 1', - lineTexture2: 'Line texture 2', - lineTexture3: 'Line texture 3', - ringTexture1: 'Ring texture 1', - ringTexture2: 'Ring texture 2', - loopedhexagonTexture: 'Looped hexagon texture', - addScanLineTip: 'Left click to draw two points to determine the direction of the scan line, right click to end', - openRain: 'Display rain', - openSnow: 'Display snow', - rainAngle: 'Angle of rain', - rainSpeed: 'Speed of rain', - snowAngle: 'Angle of snow', - snowSpeed: 'speed of snow', - snowDensity: 'Density of snow', - - - //通用 - add: 'Add', - meterSecond: 'm/s', - meter: 'm', - second: 's', - - // 操作面板-对象绘制 - drawLine: 'Line', - drawPolygon: 'Polygon', - skit: 'Skit', - particle: 'Particle', - geometry: 'Geometry', - drawMode: 'Draw mode', - lineColor: 'Color of line', - lineWidth: 'Width of line', - editLine: 'Edit line', - editLineZ: 'Edit Z axis of line', - editZaxis: 'Edit Z axis', - solidLine: 'Solidline', - dashedLine: 'Dasheline', - outline: 'Outline', - arrowLine: 'Arrowline', - haloLine: 'Haloline', - wakeLine: 'Wakeline', - pureColor: 'Pure', - grid: 'Grid', - stripe: 'Stripe', - polygonColor: 'polygonColor', - gridLineWidth: 'Width of grid line', - gridLineNumber: 'Count of grid line', - unitTransparency: 'Tranparency of unit', - oddStripColor: 'Color of odd strip', - evenStripColor: 'Color of even strip', - stripRepetition: 'Count of strip repetition', - stripOffset: 'Offset of strip', - spaceMode: 'Space mode', - closeGroundMode: 'Close ground', - closeS3MMode: 'close S3M', - closeBoth: 'Close ground and objects', - editLineTip: 'Start adding with the left mouse button, end with the right mouse button, select the object for editing', - editLineTip2: 'Left click to select the drawing object for editing', - symbolType: 'Symbol type', - symbolColor: 'Symbol color', - addMode: 'Add mode', - spacing: 'Spacing', - count: 'Count', - multiSelection:'multi-Selection', - tree: 'Tree', - facilities: 'Facilities', - traffic: 'Traffic', - singleAdd: 'Single addition', - lineAdd: 'Add along the route', - AreaAdd: 'Area addition', - cylinder: 'Cylinder', - cube: 'Cube', - sphere: 'Sphere', - cone: 'Cone', - semiMajorAxis: 'Semi-major axis', - semiMinorAxis: 'Semi-minor axis', - granularity: 'Granularity', - rotate: 'Rotate', - fillMode: 'Fill mode', - wireframe: 'Wireframe mode', - width: 'Width', - length: 'Length', - height: 'Height', - distence: "Distence", - Xradius: 'X-Radius', - Yradius: 'Y-Radius', - Zradius: 'Z-Radius', - - // 粒子系统 - fire: 'Fire', - water: 'Water', - fireworks: 'Fireworks', - displayEdit: 'Display Edit', - parameterSet: 'Parameter Set', - emitSpeed: 'Emit Speed', - lifeCycle: 'Life Cycle', - speedRange: 'Speed Range', - scaleRange: 'Scale Range', - emitType: 'Emit Type', - particleNumber: 'Particle Number', - particleSize: 'Particle Size', - gravity: 'Gravity', - coneEmit: 'Cone Emit', - sphereEmit: 'Sphere Emit', - boxEmit: 'Box Emit', - - //按钮 - query: 'Query', - - // 视频投放 - videoFileSet: 'Video Set', - videoSet: 'Set', - visibleVideoLine: 'Video Line', - localVideoPath: 'Please select a video file', - videoPath: 'Video Path', - deleteVideo: 'Please delete current video file', - - // 图层列表 - isShow: 'Explicit and implicit', - rapidLocate: 'Locate', - remove: 'Remove', - - /** - * 组件内部界面 - * */ - - // 全局 - s3mLayer: 'S3MLayer', - imgLayer: 'ImgLayer', - mvtLayer: 'MvtLayer', - terrainLayer: 'TerrainLayer', - wmtsLayer: 'WMTSLayer', - sure: 'Sure', - cancle: 'Cancle', - analysis: 'Analysis', - clear: 'Clear', - edit: 'Edit', - color: 'Color', - - // 图层列表-无 - allLayer: 'All Layer', - deleteLayer: 'Delete Layer', - defaultTerrain: 'Default Terrain', - defaultImage: 'Default imagery', - lnglatMap: 'GRIDIMAGERY', - unnamedLayer: 'Unnamed Layer', - stkTerrain: 'STK Terrain', - unnamedTerrain: 'Unnamed Terrain', - superMapTerrain: 'SuperMap Terrain', - tiandituTerrain: 'Tianditu Terrain', - noTerrain: 'No Terrain', - - // 添加数据 - type: 'Type', - layer: 'Layer', - scene: 'Scene', - localData: 'LocalData', - - address: 'Address', - name: 'Name', - addToken: 'Add Token', - layerUrl: 'Please enter the layer URL', - layerName: 'Please enter the layer Name', - localFilePath: 'Choose local .KML file', - localFilePathFly: 'Choose local .fpf file', - chooseFile: 'File', - selectableLayers: 'Selectable Layers', - - urlIsNull: 'Layer URL cannot be empty, please enter URL!', - urlCheckedsuccess: 'Layer URL verification successful', - addScpFailed: 'Loading SCP failed. Please check if the network connection status or URL address is correct?', - - // 三维分析-3D - // 通视分析 - longitude: 'Longitude', - latitude: 'Latitude', - elevation: 'Elevation', - visibleAreaColor: 'VisibleAreaColor', - invisibleAreaColor: 'InvisibleAreaColor', - barrierHighlightColor: 'Barrier Color', - displayBarrier: 'Display Barrier', - highlightBarrier: 'Highlight Barrier', - - // 可视域分析 - additionalHeight: 'Additional Height', - horizontalFov: 'Horizontal Fov', - verticalFov: 'Vertical Fov', - hintLineColor: 'Tip line Color', - visibleBody: 'VisibleBody', - visibleBodyColor: 'VisibleBody Color', - invisibleBody: 'InvisibleBody', - hiddenAreaColor: 'InvisibleBody Color', - viewshedAnimation: 'Animation Viewshed', - viewshedAnimationTip: 'Draw the model motion path, right-click to end', - - // 阴影分析 - timeInterval: 'TimeInterval', - space: 'Space', - bottomHeight: 'BottomHeight', - stretchingHeight: 'StretchingHeight', - bodyDisplay: 'BodyDisplay', - showShadow: 'ShowShadow', - filterInterval: 'FilterInterval', - startTime: 'StartTime', - endTime: 'EndTime', - ShadowStartTip: 'Play a day long animation of sunlight and shadows', - ShadowStartTip2: 'Play a year long animation of sunshine and shadows', - ShadowStopTip: 'Stop Animation', - DaylightingRate: 'DaylightingRate', - analyseResult: 'AnalyseResult', - - // 剖面分析 - startLongitude: 'StartLongitude', - startLatitude: 'StartLatitude', - startElevation: 'StartElevation', - endLongitude: 'EndLongitude', - endLatitude: 'EndLatitude', - endElevation: 'EndElevation', - disPlayInfo: 'DisPlayInfo', - Section: 'Section', - GPUSection: "GPUSection", - - // 天际线 - DisplayMode: 'DisplayMode', - AnalysisRadius: 'AnalysisRadius', - LineWidth: 'LineWidth', - LineDisplay: 'LineDisplay', - FaceDisplay: 'FaceDisplay', - BodyDisplay: 'BodyDisplay', - SkylineColor: 'SkylineColor', - SkylineBodyColor: 'SkylineBodyColor', - ObstacleColor: 'ObstacleColor', - Display2D: 'Display2D', - HighlightObstacles: 'HighlightObstacles', - GlobeNoAnalysis: 'GlobeNoAnalysis', - drawHeightLimitingBody: 'DrawHeightLimitingBody', - Skyline2D: 'Skyline2D', - limitingBody: 'Limiting body', - - // 立面图 - maxHeight: 'MaxHeight', - maxDistence: 'MaxDistence', - Draw: "Draw", - Plot: "Plot", - - // 图层属性 - chooseLayer: 'Choose Layer', - renderMode: 'Render Mode', - singleRender: 'Single Render', - doubleRender: 'Double Render', - shadowBrightness: 'ShadowBrightness', - objectHiding: 'ObjectHiding', - MinVisibleDistance: 'MinVisibleDistance', - MaxVisibleDistance: 'MaxVisibleDistance', - multiple: 'Multiple', - disPlayAll: 'DisPlay All', - disPlaySelected: 'DisPlay Selected', - hideSelected: 'Hide Selected', - noLayer: 'No Layer', - - // 图层风格 - fillStyle: 'Fill Style', - foreColor: 'Fore Color', - selectedColor: 'Selected Color', - selectColorMode: 'Select Color Mode', - colorMix: 'Mix', - colorReplace: 'Replace', - layerTransparency: 'Layer Transparency', - reset: 'Reset', - fillBothMode: 'Fill and wireframe', - attrSaveOk:'Layer attributes saved successfully', - - // 图层操作 - qxModel: 'Excavate&flat', - offSet: 'OffSet', - layerColor: 'LayerColor', - excavate: 'Excavate', - flatten: 'Flatten', - onQXModel: 'Only Supports Oblique Photography Of 3D Models', - offsetMode: 'Offset Mode', - offsetX: 'OffsetX', - offsetY: 'OffsetY', - offsetZ: 'OffsetZ', - selected: 'Selected', - - // 属性查询 - dataServerUrl: "DataServerUrl", - dataSourceName: 'SourceName', - inputServerUrl: 'Please enter the layer data service URL', - inputSourceName: 'Please enter the corresponding data source for this layer', - queryResult: 'Query Results', - inputUrlName: 'Please fill in the data service and corresponding data source required for this layer query', - bindInfoOK: "Successfully bound, please click on the model to query information", - hadBind: "This layer is already bound to a data source", - noData: "There is currently no data available", - - - // 地图查询 - mapDataUrl: "MapDataUrl", - datasetName: "DatasetName", - attributeList: 'AttributeList', - listTotal_s:'Attribute table (total', - listTotal_e:'features)', - chooseFieldTip:'Select the fields to be filtered', - filter:'Filter', - shpQueryTip:'Specify data query (query data must be consistent with the map service coordinate system)', - clickQuery: 'ClickQuery', - clearEntityTip:'Clear the shape drawn on the sphere', - refreshData:'Refresh data', - mydata:'My data', - queryPlaceHolder:"Please enter the selection field to filter keywords", - queryWait: 'Querying, please wait', - resouceName:'ResouceName', - resouceType:'ResouceType', - createTime:'CreateTime', - mapQueryTip:'Please enter the data service URL and corresponding dataset', - clickQueryClose:'The click function has been turned off', - clickQueryCloseTip:'Click with the mouse to obtain element information, right-click to close the selection', - dataFiltering:'Filtering data...', - recently:'Recently', - chooseField:'Select Field', - filterFiledTip:'Property sheet display field filtering', - - // 我的服务-iportal - getData: 'Obtaining data, please wait', - serviceName: 'Name', - resourceSubType: 'Type', - updateTime: 'UpdateTime', - serviceUrl: 'URL', - year: 'year', - month: 'month', - day: 'day', - yearsAgo: ' yearsAgo', - monthsAgo: ' monthsAgo', - weeksAgo: ' weeksAgo', - daysAgo: ' daysAgo', - hoursAgo: ' hoursAgo', - minutesAgo: 'minutesAgo', - secondsAgo: ' secondsAgo', - - // message - layerExistMsg: 'This layer already exists, please do not load it again!', - imgUrlErrorMsg: 'Image service URL error, image loading failed!', - scpUrlErrorMsg: 'SCP URL address error, S3M layer loading failed!', - - /** - * 图片资源名称 - 演示 - * */ - BeijingCBD: "BeijingCBD", - originCBD: "OriginCBD(Test)", - SophiaChurch: "SophiaChurch", - MountEverest: "MountEverest", - BIMBuilding: "BIMBuilding", - Pointcloud: "Pointcloud", - Histogram: "Histogram", - PhotographyModel: "PhotographyModel", - JingJinMVT: "JingJinMVT", - ChongqingBaimo: "Chongqing", - YokohamaBaimo: "Yokohama", - transformerStation: 'Oil station', - - LocalImage: 'LocalImage', - BingMap: 'BingMap', - TIANDITU: 'TIANDITU', - OSM: 'OSM', - GRIDIMAGERY: 'GRIDIMAGERY', - japanStand: 'Japan Standard Map', - japanPale: 'Japan Light Map', - japanBlank: 'Japan White Map', - japanImage: 'Japan Imagery', - - SuperMapOnlineTerrain: 'SuperMap', - TiandituTerrain: 'Tianditu', - STKTerrain: 'STK', - - // Tip - qxModelTip:'This feature only supports oblique photography of 3D models' -} - -export default { - global -} - diff --git a/SuperMap iEarth/src/locale/index.ts b/SuperMap iEarth/src/locale/index.ts index b413f0b2..ab1f21c0 100644 --- a/SuperMap iEarth/src/locale/index.ts +++ b/SuperMap iEarth/src/locale/index.ts @@ -1,47 +1,15 @@ //语言 -import { createI18n } from 'vue-i18n' //引入vue-i18n组件 -import { getLang } from '@/utils' -import { LangEnum } from '@/enums/styleEnum' -import zh from './zh/index' -import en from './en/index' -import ja from './ja/index' +import { createI18n } from 'vue-i18n'; +import { getLanguage } from '@/tools/getLanguage'; -// 获取当前浏览器语言环境 -var currentLanguage; -var cookieLanguage = getLang(); -if (cookieLanguage !== undefined) currentLanguage = cookieLanguage; +// 获取index.html通过<script>标签引入的语言资源文件 +const lang_data = window.lang_data; - -// 语言数组 -export const langList = [ - { - label: '中文', - key: LangEnum.ZH - }, - { - label: 'English', - key: LangEnum.EN - }, - { - label: 'Japanese', - key: LangEnum.JA - } -] - -// 全局语言对象 -export const langGlobal = { - "zh":zh, - "en":en, - "ja":ja, -} +const lang = getLanguage(); const i18n = createI18n({ - locale: currentLanguage, - messages: { - [LangEnum.ZH]: zh, - [LangEnum.EN]: en, - [LangEnum.JA]: ja - } + locale: lang, + messages: lang_data }) -export default i18n +export default i18n; \ No newline at end of file diff --git a/SuperMap iEarth/src/locale/ja/index.ts b/SuperMap iEarth/src/locale/ja/index.ts deleted file mode 100644 index c5c2eb2a..00000000 --- a/SuperMap iEarth/src/locale/ja/index.ts +++ /dev/null @@ -1,614 +0,0 @@ - -const global = { - - /** - * UI界面 - * */ - - // header 页头 - earth3D: '3D地球', - control: 'コントローラ', - control_title: 'IEarth Pro コントローラ', - save: '保存', - close: '閉じる', - share: '共有', - loginPlease: 'ログイン', - tourists: 'ビジター', - - // 保存面板 - sceneSave: 'シーンの保存', - saveDate: '保存日付', - sceneName: 'シーン名', - sceneLable: 'シーンラベル', - authorName: '作者名', - sceneDescribe: 'シーン説明', - placeHolder: '入力してください', - sceneSaveNameCannotBeNull: '保存するシーン名を空に設定できません。', - sceneSaveLableCannotBeNull: '保存するシーンラベルを空に設定できません。', - saveErrorNeedOnline: '保存に失敗しました。iPortalまたはOnlineアカウントをログインしてください......', - saveSuccess: 'シーンの保存に成功しました。', - saveUpdate: 'シーンの更新に成功しました。', - - // widgets 组件リスト - w_search: '検索', - w_north: '北に', - w_reset: 'リセット', - w_zoomOut: '縮小', - w_zoomIn: '拡大', - w_fullScreen: '全画面', - w_home: 'ホームページ', - - // toolBar 侧边栏 - t_layerList: 'レイヤーリスト', - t_addData: 'データの追加', - t_analyse3d: '3D解析', - t_measure: '計測', - t_sceneProperties: 'シーン属性', - t_objectPainting: 'オブジェクトの描画', - - // 面板-header - layerList: 'レイヤーリスト', - addData: '加データの追', - analyseSeries: '3D解析', - sceneProperties: 'シーン属性', - measure: '計測', - objectPainting: 'オブジェクト描画', - layerOpration: 'レイヤー操作', - layerAttribute: 'レイヤー属性', - layerStyle: 'レイヤースタイル', - layerQuery: '属性クエリ', - mapQuery: 'マップクエリ', - - // 操作面板-の追加データ - publicService: "パブリックサービス", - customService: "ユーザー定義サービス", - onlineBaseMap: "オンラインベースマップ", - onlineTerrain: "オンライン地形", - - // 操作面板-3D解析 - clip: 'クリップ', // 内嵌 - terrain: '地形', - analysis3d: '3D解析', - spatialAnalysis: '空間解析', - - // 3D解析 - Intervisibility: '見通し', - viewableRange: '見通し領域', - ligShadowAnalysisth: 'シェード', - profile: '断面', - Skyline: 'スカイライン', - FacePlot: '立面図', - - // クリップ - boxClip: 'Boxクリップ', - planeClip: '平面クリップ', - crossClip: 'Crossクリップ', - polygonClip: 'ポリゴンクリップ', - clipMode: 'クリップモード', - inner: '内部', - outer: '外部', - boxclipTip: 'マウスを左クリックし、boxの底面を描画して、マウス移動し、boxの高さを描画して、マウスを右クリックして終了します', - displayCilpPlane: 'クリップ面の表示', - verticalNormal: '法線に垂直', - parallelNormal: '法線に平行', - clipWidth: 'クリップ幅', - clipHeight: 'クリップ高さ', - rotateX: 'X軸を中心に回転', - rotateY: 'Y軸を中心に回転', - rotateZ: 'Z軸を中心に回転', - - - - - // 地形操作 - terrainOperation: '地形操作', - inundationAnalysis: '浸水解析', - slopeAspect: '傾斜度傾斜方向', - Isoline: '等値線', - terrainExcavate: '地形掘削', - terrainChange: '地形修正', - excavationDepth: '掘削深さ', - excavateAreaOffsetUp: '掘削エリアを上に移動', - upHeight: '上に移動高さ', - editArea: '編集エリア', - editAreaZ: '編集エリアZ軸', - maximumVisibleElevation: '最大表示可能標高', - minimumVisibleElevation: '最小表示可能標高', - currentElevation: '現在標高', - transparency: '透明度', - inundationSpeed: '浸水速度', - analysisArea: '解析エリア', - minSlope: '最小傾斜度', - maxSlope: '最大傾斜度', - displayMode: '表示モード', - partRegion: '指定エリアで解析', - allRegion: 'すべてエリアで解析', - noRegion: '無しエリアで解析', - allDisplay: "矢印と面表示", - faceDisplay: "面表示", - arrowDisplay: "矢印表示", - equivalentIsoline: '等値距離', - contourColor: '等値線カラー', - contourLineFill: '等値線フィル', - contourFaceFill: '等値面', - contourAllFill: '等値線と面フィル', - contourNoFill: 'フィルしない', - - //操作面板-計測 - measureMode: '計測モード', - pickPoint: '頂点捕捉', - contour: '等値線', - measureAction: '計測', - mode_space: '空間計測', - mode_ground: '地表計測', - mode_projection: '平面投影', - measureDistence: '距離計測', - measureArea: '面積計測', - measureHeight: '高度計測', - - // 操作面板-パラメータの設定 - baseAttribute: 'シーン属性', - flying: '飛行', - ligth: '光源', - viewPorts: 'ビュー', - speciallyEffect: '特殊効果', - - //操作面板-シーン属性-勾选 - earth: '地球', - sun: '太陽', - depthInspection: '深さ検査', - atomsphereRender: '大気レンダリング', - fogEffect: '霧化効果', - cloudLayer: '雲', - skyBox: 'スカイボックス', - timeAxis: '時間軸', - displayFrame: 'フレームレート', - - //操作面板-シーン属性-选项 - brightness: '明度', - contrastRatio: 'コントラスト', - colorTone: '色相', - saturation: '飽和度', - gamma: 'ガンマ', - showUnderground: '地下を使用', - surfaceTransparency: '地表透明度', - displayCoordinate: '座標の表示', - coordinateQuery: '座標クエリ', - coordinateTip: '経度、緯度、標高', - - //操作面板-飛行 - flyRoute: '飛行ルート', - flyRoute_1: '飛行ルート_1', - import: 'インポート', - displayRoute: 'ルートの表示', - displayStation: '経過ポイントの表示', - rotateByPoint: '点を中心に回転', - rotateSpeed: '回転速度', - rotateRepeat: 'ループ回転', - selectStation: '経過ポイントの選択', - play: '再生', - pause: '一時停止', - stop: '停止', - flySpeed: '飛行速度', - addStation: '経過ポイントの追加', - deleteStation: '経過ポイントの削除', - restore: '復元', - importFlyRoute: '飛行ルートのインポート', - createFlyRoute: '新規飛行ルート', - addedStops: '追加済み経過ポイント', - downLoad: 'ダウンロード', - addStopSuccess: '経過ポイントの追加に成功', - atLeastTwoStop: '保存するには、少なくとも2つの点は必要です', - - //操作面板-光源 - symbolLibrary: 'シンボルライブラリ', - lightsourceColor: '光源カラー', - diffusionDistance: '拡散距離', - lightDecay: '減衰係数', - lightsourceIntensity: '光源強度', - spotlightRange: 'スポットライト範囲', - displayLightmodel: '光源モデルの表示', - displayLightcorrdinate: '光源座標の表示', - modelInformation: 'モデル情報', - pointLight: '点光源', - spotLight: 'スポットライト', - parallelLight: '平行ライト', - addSpotLightTip: 'マウス左クリックで2点で光源の方向を確認し、右クリックして終了します', - - - //操作面板-ビューモード - viewMode: 'ビューモード', - splitscreenModel: '画面分割モード', - openRollershutter: 'スワイプの使用', - noneSplitscreen: '画面分割を使用せず', - horizontalSplitscreen: '水平画面分割', - verticalSplitscreen: '垂直画面分割', - threeViewport: '3ビュー', - fourViewport: '4ビュー', - noneRollershutter: "スワイプを使用せず", - leftrightRollershutter: '左右スワイプ', - updownRollershutter: '上下スワイプ', - customRollershutter: 'ユーザー定義スワイプ', - shieldDirection: 'シールド方向', - left: '左側', - right: '右側', - up: '上側', - down: '下側', - - //操作面板-シーン特殊効果 - floodLight: 'シーン投光', - scanLine: 'スキャンライン', - rainSnow: '雨雪', - openFloodlight: '投光を使用', - heatMap: 'ヒートマップ', - brightnessThreshold: '明度閾値', - floodlightThreshold: '投光閾値', - scanMode: 'スキャンモード', - scanColor: 'スキャンカラー', - scanTexture: 'スキャンテクスチャー', - scanWidth:'走査幅', - scanSpeed:'そうさそくど', - scanPeriod:'スキャンサイクル', - customScanDirection: 'ユーザー定義スキャン方向', - customScanCenter: 'ユーザー定義スキャン中心', - lineShape: '線形', - circleShape: '環形', - noneScanTexture: 'テクスチャー無し', - lineTexture1: '線形テクスチャー1', - lineTexture2: '線形テクスチャー2', - ringTexture1: '環形テクスチャー1', - ringTexture2: '環形テクスチャー2', - loopedhexagonTexture: '六角形環形テクスチャー', - addScanLineTip: 'マウスの右キーで2点を描画し、スキャンライン方向を確認して、右クリックして終了します', - openRain: '雨の使用', - openSnow: '雪の使用', - rainAngle: '雨角度', - rainSpeed: '雨速度', - snowAngle: '雪角度', - snowSpeed: '雪速度', - snowDensity: '雪密度', - - //通用 - add: '追加', - meterSecond: 'メートル/秒', - meter: 'メートル', - second: '秒', - - - // 操作面板-オブジェクト描画 - drawLine: 'ラインの描画', - drawPolygon: 'ポリゴンの描画', - skit: '要素', - particle: '粒子', - geometry: 'ジオメトリ', - drawMode: '描画モード', - lineColor: 'ラインカラー', - lineWidth: 'ライン幅', - editLine: 'ラインの編集', - editLineZ: 'ラインZ軸の編集', - editZaxis: 'Z軸方向の編集', - solidLine: '実線', - dashedLine: '点線', - outline: '輪郭ライン', - arrowLine: '矢印ライン', - haloLine: 'ハローライン', - wakeLine: '航跡ライン', - pureColor: 'ソリッドカラー', - grid: 'グリッド', - stripe: 'ストライプ', - polygonColor: 'ポリゴンカラー', - gridLineWidth: 'グリッドライン幅', - gridLineNumber: 'グリッドライン数', - unitTransparency: '単元透明度', - oddStripColor: '奇数バンドカラー', - evenStripColor: '偶数バンドカラー', - stripRepetition: 'バンド重複数', - stripOffset: 'バンドオフセット', - spaceMode: '空間モード', - closeGroundMode: '地表モード', - closeS3MMode: 'S3Mモード', - closeBoth: '地表オブジェクト', - editLineTip: 'マウス左キーで追加を開始して、右キーで終了します。選択オブジェクト編集', - editLineTip2: 'マウス左キーで描画オブジェクトを選択して、編集します', - symbolType: 'シンボルタイプ', - symbolColor: 'シンボルカラー', - addMode: '追加モード', - spacing: '間隔', - count: '数', - multiSelection:'複数選択のサポート', - tree: '木', - facilities: 'パブリック施設', - traffic: '交通', - singleAdd: '個別追加', - lineAdd: '沿線追加', - AreaAdd: 'エリア追加', - cylinder: '円柱体', - cube: '立方体', - sphere: '球体', - cone: '円錐', - semiMajorAxis: '半長軸', - semiMinorAxis: '半短軸', - granularity: '精細度', - rotate: '回転', - fillMode: 'フィルモード', - wireframe: 'フレームモード', - width: '幅', - length: '長さ', - height: '高さ', - distence: "距離", - Xradius: 'X半径', - Yradius: 'Y半径', - Zradius: 'Z半径', - - - // 粒子系统 - fire: '火炎', - water: '水滴', - fireworks: '花火', - displayEdit: '編集ボックスの表示', - parameterSet: 'パラメータの設定', - emitSpeed: '放出速度', - lifeCycle: 'ライフサイクル', - speedRange: '速度範囲', - scaleRange: '比例範囲', - emitType: '放出タイプ', - particleNumber: '放出数', - particleSize: '粒子サイズ', - gravity: '重力', - coneEmit: '円錐形放射', - sphereEmit: '球体放射', - boxEmit: '箱状放射', - - //按钮 - query: 'クエリ', - - // 映像再生 - videoFileSet: '映像再生', - videoSet: '再生', - visibleVideoLine: '映像再生線の表示', - localVideoPath: '映像ファイルを選択してください', - videoPath: '映像パス', - deleteVideo: '現在の再生映像を削除してください', - - // レイヤーリスト - isShow: '表示可能', - rapidLocate: '現在レイヤーにポジション', - remove: '削除', - - /** - * 组件内部界面 - * */ - - // 全局 - s3mLayer: 'S3Mレイヤー', - imgLayer: '画像レイヤー', - mvtLayer: 'MVTレイヤー', - terrainLayer: '地形レイヤー', - sure: 'OK', - cancle: 'キャンセル', - analysis: '解析', - clear: 'クリア', - edit: '編集', - color: 'カラー', - - // レイヤーリスト-无 - allLayer: 'すべてレイヤー', - deleteLayer: 'レイヤーの削除', - defaultTerrain: 'デフォルト地形', - defaultImage: 'デフォルト画像', - lnglatMap: '緯度経度ベースマップ', - unnamedLayer: '新規レイヤー', - stkTerrain: 'STK地形', - unnamedTerrain: '新規地形', - superMapTerrain: 'SuperMapOnline 地形', - tiandituTerrain: 'Tiandi地形', - noTerrain: '地形無し', - - // データの追加 - type: 'タイプ', - layer: 'レイヤー', - scene: 'シーン', - localData: 'ローカルデータ', - - address: 'パス', - name: '名', - addToken: 'tokenの追加', - layerUrl: 'レイヤーURLを入力してください', - layerName: '入力レイヤー名を入力してください', - localFilePath: 'ローカルKMLデータを選択してください', - localFilePathFly: 'ローカルfpfファイルを選択してください', - chooseFile: '選択', - selectableLayers: '選択可能のレイヤー', - - urlIsNull: 'レイヤーURLを空に設定できません,URLを入力してください', - urlCheckedsuccess: 'レイヤーURLの認証に成功しました', - addScpFailed: 'SCPのロードに失敗しました。ネットワーク接続状態、またはURLを確認してください', - - // 3D解析-3D - // 見通し解析 - longitude: '経度', - latitude: '緯度', - elevation: '標高', - visibleAreaColor: '可視エリアカラー', - invisibleAreaColor: '不可視エリアカラー', - barrierHighlightColor: 'バリアハイライトカラー', - displayBarrier: 'バリアノードの表示', - highlightBarrier: 'ハイライトバリア', - - // 見通し領域解析 - additionalHeight: '付加高さ', - horizontalFov: '水平画角', - verticalFov: '垂直画角', - hintLineColor: 'ヒントラインカラー', - visibleBody: '可視域ボリュームの表示', - visibleBodyColor: '可視域ボリュームカラー', - invisibleBody: '不可視域ボリュームの表示', - hiddenAreaColor: '不可視域ボリュームカラー', - viewshedAnimation: '動態見通し領域', - viewshedAnimationTip: 'モデル移動ルートを描画し、右クリックして終了', - - // シェード解析 - timeInterval: '時間間隔', - space: '間隔', - bottomHeight: '底部標高', - stretchingHeight: '押出し高さ', - bodyDisplay: 'ボディ表示', - showShadow: 'シェードの表示', - filterInterval: 'フィルター区分', - startTime: '開始時間', - endTime: '終了時間', - ShadowStartTip: '一日内の太陽とシェードの映像を再生します。', - ShadowStartTip2: '一年内の太陽とシェードの映像を再生します', - ShadowStopTip: '映像を停止', - DaylightingRate: '採光率', - analyseResult: '解析結果', - - // 断面解析 - startLongitude: '起点経度', - startLatitude: '起点緯度', - startElevation: '起点標高', - endLongitude: '終点経度', - endLatitude: '終点緯度', - endElevation: '終点標高', - disPlayInfo: '断面表示', - Section: '截面', - GPUSection: "GPU截面", - - // スカイライン - DisplayMode: '表示モード', - AnalysisRadius: '解析半径', - LineWidth: 'ライン幅', - LineDisplay: 'ライン表示', - FaceDisplay: 'ポリゴン表示', - BodyDisplay: 'ボディ表示', - SkylineColor: 'スカイラインカラー', - SkylineBodyColor: 'スカイラインボディカラー', - ObstacleColor: 'バリアカラー', - Display2D: '2D表示', - HighlightObstacles: 'ハイライトバリア', - GlobeNoAnalysis: '地表解析', - drawHeightLimitingBody: '描画高さ制限オブジェクト', - Skyline2D: '2Dスカイライン', - limitingBody: '高さ制限オブジェクト', - - // 立面図 - maxHeight: '最大高さ', - maxDistence: '最遠距離', - Draw: "描画", - Plot: "作図", - - // レイヤー属性 - chooseLayer: 'レイヤーの選択', - renderMode: 'レンダリングモード', - singleRender: '片面レンダリング', - doubleRender: '両面レンダリング', - shadowBrightness: 'シェード輝度', - objectHiding: 'オブジェクト表示可能', - MinVisibleDistance: '最小表示可能距離', - MaxVisibleDistance: '最大表示可能距離', - multiple: 'マルチ選択', - disPlayAll: 'すべてを表示', - disPlaySelected: '選択オブジェクトのみ表示', - hideSelected: '選択オブジェクトのみ非表示', - noLayer: 'レイヤー無し', - - // レイヤースタイル - fillStyle: 'フィルスタイル', - foreColor: '前景色', - selectedColor: '選択カラー', - selectColorMode: '選択カラーモード', - colorMix: '選択カラー混合', - colorReplace: '選択カラー置換', - layerTransparency: 'レイヤー透明度', - reset: 'リセット', - fillBothMode: 'フィルとフレームモード', - - // レイヤー操作 - qxModel: '掘削と平坦化', - offSet: 'オフセット', - layerColor: 'レイヤーカラー', - excavate: '掘削', - flatten: '平坦化', - onQXModel: '当機能は3Dタイルキャッシュのみをサポート', - offsetMode: '操作モード', - offsetX: 'X軸でオフセット', - offsetY: 'Y軸でオフセット', - offsetZ: 'Z軸でオフセット', - selected: '選択', - - // 属性クエリ - dataServerUrl: "データサービス", - dataSourceName: 'データソース', - inputServerUrl: 'レイヤーデータサービスURLを入力してください', - inputSourceName: '当レイヤーの対応データソースを入力してください', - queryResult: 'クエリ結果', - inputUrlName: '当レイヤークエリのデータサービスと対応データソースを入力してください', - bindInfoOK: "バンドに成功しました。モデルクエリ情報をクリックしてください", - hadBind: "当レイヤーはデータソースにバンドしました", - noData: "データ無し", - - // マップクエリ - mapDataUrl: "マップデータサービス", - datasetName: "データセット名", - attributeList: '属性リスト', - clickQuery: 'ポイントクエリ', - field: "フィールド", - pleaseSelectField: 'フィールドを選択してください', - queryWait: 'クエリ中、お待ちください', - - // 我的サービス-iportal - getData: 'データ取得中、お待ちください', - serviceName: 'サービス名', - resourceSubType: 'サービスタイプ', - updateTime: '更新時間', - serviceUrl: 'サービスURL', - year: '年', - month: '月', - day: '日', - yearsAgo: ' 年前', - monthsAgo: ' 月前', - weeksAgo: ' 週前', - daysAgo: ' 日前', - hoursAgo: ' 時間前', - minutesAgo: '分前', - secondsAgo: '先', - - // message - layerExistMsg: '当レイヤーは既に存在しています。再度ロードしないでください。', - imgUrlErrorMsg: '画像サービスURLエラー。画像のロードに失敗しました。', - scpUrlErrorMsg: 'SCP URLパスエラー。S3Mレイヤーのロードに失敗しました。', - - /** - * 图片资源名 - 演示 - * */ - BeijingCBD: "BeijingCBD", - originCBD: "オリジナルCBD(テスト用)", - SophiaChurch: "ソフィア教会", - MountEverest: "エベレスト地形画像", - BIMBuilding: "BIM建物", - Pointcloud: "点群", - Histogram: "ヒストグラム", - PhotographyModel: "3Dタイルキャッシュモデル", - JingJinMVT: "JingJinMVT", - ChongqingBaimo: "Chongqing白キャッシュ", - YokohamaBaimo: "横浜白キャッシュ", - transformerStation: 'サンプルステーション', - - LocalImage: 'ローカル画像', - BingMap: 'Bingベースマップ', - TIANDITU: 'TiandiMap', - OSM: 'OSMベースマップ', - GRIDIMAGERY: '緯度経度ベースマップ', - japanStand: '日本地理院標準地図', - japanPale: '日本地理院淡色地図', - japanBlank: '日本地理院の白い地図', - japanImage: '日本地理院の映像図', - - SuperMapOnlineTerrain: 'SuperMapオンライン地形', - TiandituTerrain: 'TiandiMap地形', - STKTerrain: 'STK地形', -} - -export default { - global -} diff --git a/SuperMap iEarth/src/locale/zh/index.ts b/SuperMap iEarth/src/locale/zh/index.ts deleted file mode 100644 index a03c10b0..00000000 --- a/SuperMap iEarth/src/locale/zh/index.ts +++ /dev/null @@ -1,642 +0,0 @@ - -const global = { - - /** - * UI界面 - * */ - - // header 页头 - earth3D: '三维地球', - control: '控制台', - control_title: 'IEarth Pro 控制台', - save: '保存', - close: '关闭', - share: '分享', - loginPlease: '请登录', - tourists: '游客', - - // 保存面板 - sceneSave: '场景保存', - saveDate: '存储日期', - sceneName: '场景名称', - sceneLable: '场景标签', - authorName: '作者名称', - sceneDescribe: '场景描述', - placeHolder: '请输入', - sceneSaveNameCannotBeNull: '保存场景名称不能为空!', - sceneSaveLableCannotBeNull: '保存场景标签不能为空!', - saveErrorNeedOnline: '存储失败,请先登录iPortal或Online账户......', - saveSuccess: '场景保存成功!', - saveUpdate: '场景更新成功!', - - // widgets 组件列表 - w_search: '搜索', - w_north: '指北', - w_reset: '重置', - w_zoomOut: '缩小', - w_zoomIn: '放大', - w_fullScreen: '全屏', - w_home: '首页', - - // toolBar 侧边栏 - t_layerList: '图层列表', - t_addData: '添加数据', - t_analyse3d: '三维分析', - t_measure: '量算', - t_sceneProperties: '场景', - t_objectPainting: '对象绘制', - - // 面板-header - layerList: '图层列表', - addData: '添加数据', - analyseSeries: '三维分析', - sceneProperties: '场景', - measure: '量算', - objectPainting: '对象绘制', - layerOpration: '图层操作', - layerAttribute: '图层属性', - layerStyle: '图层风格', - layerQuery: '属性查询', - mapQuery: '地图查询', - - // 操作面板-添加数据 - publicService: "公共服务", - customService: "自定义服务", - onlineBaseMap: "在线底图", - onlineTerrain: "在线地形", - portalService: "我的服务", - - // 操作面板-三维分析 - clip: '裁剪', // 内嵌 - terrain: '地形', - analysis3d: '三维分析', - spatialAnalysis: '空间分析', - - // 三维分析 - Intervisibility: '通视', - viewableRange: '可视域', - ligShadowAnalysisth: '阴影', - profile: '剖面', - Skyline: '天际线', - FacePlot: '立面图', - - // 裁剪 - boxClip: 'Box裁剪', - planeClip: '平面裁剪', - crossClip: 'Cross裁剪', - polygonClip: '多边形裁剪', - clipMode: '裁剪模式', - inner: '内部', - outer: '外部', - boxclipTip: '点击鼠标左键绘制box底面,移动鼠标绘制box高度,点击鼠标右键结束绘制', - displayCilpPlane: '显示裁剪面', - verticalNormal: '垂直法线', - parallelNormal: '平行法线', - clipWidth: '裁剪宽度', - clipHeight: '裁剪高度', - rotateX: '绕X轴旋转', - rotateY: '绕Y轴旋转', - rotateZ: '绕Z轴旋转', - - - - - // 地形操作 - terrainOperation: '地形操作', - inundationAnalysis: '淹没分析', - slopeAspect: '坡度坡向', - Isoline: '等值线', - terrainExcavate: '地形开挖', - terrainChange: '地形修改', - excavationDepth: '开挖深度', - excavateAreaOffsetUp: '开挖区域上移', - upHeight: '上移高度', - editArea: '编辑区域', - editAreaZ: '编辑区域Z轴', - maximumVisibleElevation: '最大可见高程', - minimumVisibleElevation: '最小可见高程', - currentElevation: '当前高程', - transparency: '透明度', - inundationSpeed: '淹没速度', - analysisArea: '分析区域', - minSlope: '最小坡度', - maxSlope: '最大坡度', - displayMode: '显示模式', - partRegion: '指定区域参与分析', - allRegion: '所有区域参与分析', - noRegion: '没有区域参与分析', - allDisplay: "箭头和面显示", - faceDisplay: "面显示", - arrowDisplay: "箭头显示", - equivalentIsoline: '等值距', - contourColor: '等高线颜色', - contourLineFill: '等高线填充', - contourFaceFill: '等高面填充', - contourAllFill: '等高线和面填充', - contourNoFill: '不填充', - - //操作面板-量算 - measureMode: '量算模式', - pickPoint: '顶点捕捉', - contour: '等高线', - measureAction: '测量', - mode_space: '空间量算', - mode_ground: '贴地量算', - mode_projection: '平面投影', - measureDistence: '测量距离', - measureArea: '测量面积', - measureHeight: '测量高度', - - // 操作面板-参数设置 - baseAttribute: '场景属性', - flying: '飞行', - ligth: '灯光', - viewPorts: '视口', - speciallyEffect: '特效', - - //操作面板-场景属性-勾选 - earth: '地球', - sun: '太阳', - depthInspection: '深度检测', - atomsphereRender: '大气渲染', - fogEffect: '雾化效果', - cloudLayer: '云层', - skyBox: '天空盒', - timeAxis: '时间轴', - displayFrame: '帧率', - - //操作面板-场景属性-选项 - brightness: '亮度', - contrastRatio: '对比度', - colorTone: '色调', - saturation: '饱和度', - gamma: '伽马', - showUnderground: '开启地下', - surfaceTransparency: '地表透明度', - displayCoordinate: '显示坐标', - coordinateQuery: '坐标查询', - coordinateTip: '经度、纬度、高程', - - //操作面板-飞行 - flyRoute: '飞行路线', - flyRoute_1: '飞行路线_1', - import: '导入', - displayRoute: '显示路线', - displayStation: '显示站点', - rotateByPoint: '绕点旋转', - rotateSpeed: '旋转速度', - rotateRepeat: '循环旋转', - selectStation: '站点选择', - play: '播放', - pause: '暂停', - stop: '停止', - flySpeed: '飞行速度', - addStation: '添加站点', - deleteStation: '删除站点', - restore: '恢复', - importFlyRoute: '导入飞行路线', - createFlyRoute: '创建飞行路线', - addedStops: '已添站点', - downLoad: '下载', - addStopSuccess: '添加站点成功', - atLeastTwoStop: '至少需要两个节点才能保存', - - //操作面板-灯光 - symbolLibrary: '符号库', - lightsourceColor: '光源颜色', - diffusionDistance: '扩散距离', - lightDecay: '衰减因子', - lightsourceIntensity: '光源强度', - spotlightRange: '聚光范围', - displayLightmodel: '显示光源模型', - displayLightcorrdinate: '显示光源坐标', - modelInformation: '模型信息', - pointLight: '点光源', - spotLight: '聚光灯', - parallelLight: '平行光', - addSpotLightTip: '鼠标左键绘制两点确定光源方向,右键结束', - - - //操作面板-视图模式 - viewMode: '视图模式', - splitscreenModel: '分屏模式', - openRollershutter: '开启卷帘', - noneSplitscreen: '不使用分屏', - horizontalSplitscreen: '水平分屏', - verticalSplitscreen: '垂直分屏', - threeViewport: '三视口', - fourViewport: '四视口', - noneRollershutter: "不使用卷帘", - leftrightRollershutter: '左右卷帘', - updownRollershutter: '上下卷帘', - customRollershutter: '自定义卷帘', - shieldDirection: '屏蔽方向', - left: '左侧', - right: '右侧', - up: '上侧', - down: '下侧', - - //操作面板-场景特效 - floodLight: '场景泛光', - scanLine: '扫描线', - rainSnow: '雨雪', - openFloodlight: '开启泛光', - heatMap: '热力图', - brightnessThreshold: '亮度阈值', - floodlightThreshold: '泛光阈值', - scanMode: '扫描模式', - scanColor: '扫描颜色', - scanTexture: '扫描纹理', - scanWidth:'扫描宽度', - scanSpeed:'扫描速度', - scanPeriod:'扫描周期', - customScanDirection: '自定义扫描方向', - customScanCenter: '自定义扫描中心', - lineShape: '线状', - circleShape: '环状', - noneScanTexture: '无纹理', - lineTexture1: '线状纹理1', - lineTexture2: '线状纹理2', - ringTexture1: '环状纹理1', - ringTexture2: '环状纹理2', - loopedhexagonTexture: '六边形环状纹理', - addScanLineTip: '鼠标左键绘制两点确定扫描线方向,右键结束', - openRain: '开启雨景', - openSnow: '开启雪景', - rainAngle: '雨角度', - rainSpeed: '雨速度', - snowAngle: '雪角度', - snowSpeed: '雪速度', - snowDensity: '雪密度', - - //通用 - add: '添加', - meterSecond: '米/秒', - meter: '米', - second: '秒', - - - // 操作面板-对象绘制 - drawLine: '绘制线', - drawPolygon: '绘制面', - skit: '小品', - particle: '粒子', - geometry: '几何体', - drawMode: '绘制模式', - lineColor: '线颜色', - lineWidth: '线宽', - editLine: '编辑线', - editLineZ: '编辑线Z轴', - editZaxis: '编辑Z轴方向', - solidLine: '实线', - dashedLine: '虚线', - outline: '轮廓线', - arrowLine: '箭头线', - haloLine: '光晕线', - wakeLine: '尾迹线', - pureColor: '纯色', - grid: '网格', - stripe: '条纹', - polygonColor: '面颜色', - gridLineWidth: '网格线宽', - gridLineNumber: '网格线数', - unitTransparency: '单元透明度', - oddStripColor: '奇数带颜色', - evenStripColor: '偶数带颜色', - stripRepetition: '条带重复数', - stripOffset: '条带偏移量', - spaceMode: '空间模式', - closeGroundMode: '贴地模式', - closeS3MMode: '贴S3M模式', - closeBoth: '同时贴地贴对象', - editLineTip: '鼠标左键开始添加,右键结束,选中对象编辑', - editLineTip2: '鼠标左键选中绘制对象进行编辑', - symbolType: '符号类型', - symbolColor: '符号颜色', - addMode: '添加模式', - spacing: '间隔', - count: '数量', - multiSelection:'多选', - tree: '树木', - facilities: '公共设施', - traffic: '交通', - singleAdd: '单个添加', - lineAdd: '沿线添加', - AreaAdd: '区域添加', - cylinder: '圆柱体', - cube: '立方体', - sphere: '球体', - cone: '圆锥', - semiMajorAxis: '长半轴', - semiMinorAxis: '短半轴', - granularity: '粒度', - rotate: '旋转', - fillMode: '填充模式', - wireframe: '线框模式', - width: '宽度', - length: '长度', - height: '高度', - distence: "距离", - Xradius: 'X半径', - Yradius: 'Y半径', - Zradius: 'Z半径', - - - // 粒子系统 - fire: '火焰', - water: '水滴', - fireworks: '烟花', - displayEdit: '显示编辑框', - parameterSet: '参数设置', - emitSpeed: '发射速度', - lifeCycle: '生命周期', - speedRange: '速度范围', - scaleRange: '比例范围', - emitType: '发射类型', - particleNumber: '发射数量', - particleSize: '粒子大小', - gravity: '重力', - coneEmit: '圆锥体放射', - sphereEmit: '球体放射', - boxEmit: '盒状放射', - - //按钮 - query: '查询', - - // 视频投放 - videoFileSet: '视频投放', - videoSet: '投放', - visibleVideoLine: '显示视频投放线', - localVideoPath: '请选择视频文件', - videoPath: '视频地址', - deleteVideo: '请删除当前投放视频', - - // 图层列表 - isShow: '显隐', - rapidLocate: '快速定位', - remove: '移除', - - /** - * 组件内部界面 - * */ - - // 全局 - s3mLayer: 'S3M图层', - imgLayer: '影像图层', - mvtLayer: 'MVT图层', - terrainLayer: '地形图层', - wmtsLayer: 'wmts服务', - sure: '确定', - cancle: '取消', - analysis: '分析', - clear: '清除', - edit: '编辑', - color: '颜色', - - // 图层列表-无 - allLayer: '所有图层', - deleteLayer: '删除图层', - defaultTerrain: '默认地形', - defaultImage: '默认影像', - lnglatMap: '经纬底图', - unnamedLayer: '未命名图层', - stkTerrain: 'STK地形', - unnamedTerrain: '未命名地形', - superMapTerrain: 'SuperMapOnline 地形', - tiandituTerrain: '天地图地形', - noTerrain: '无地形', - - // 添加数据 - type: '类型', - layer: '图层', - scene: '场景', - localData: '本地数据', - - address: '地址', - name: '名称', - addToken: '添加token', - layerUrl: '请输入图层URL', - layerName: '请输入图层名称', - localFilePath: '请选择本地KML数据', - localFilePathFly: '请选择本地fpf文件', - chooseFile: '选择', - selectableLayers: '可选图层', - - urlIsNull: '图层URL不能为空,请输入URL !', - urlCheckedsuccess: '图层URL校验成功', - addScpFailed: '加载SCP失败,请检查网络连接状态或者url地址是否正确?', - - // 三维分析-3D - // 通视分析 - longitude: '经度', - latitude: '纬度', - elevation: '高程', - visibleAreaColor: '可视区域颜色', - invisibleAreaColor: '不可视区域颜色', - barrierHighlightColor: '障碍物高亮颜色', - displayBarrier: '显示障碍点', - highlightBarrier: '高亮障碍物', - - // 可视域分析 - additionalHeight: '附加高度', - horizontalFov: '水平视角', - verticalFov: '垂直视角', - hintLineColor: '提示线颜色', - visibleBody: '显示可视体', - visibleBodyColor: '可视体颜色', - invisibleBody: '显示不可视体', - hiddenAreaColor: '不可视体颜色', - viewshedAnimation: '动态可视域', - viewshedAnimationTip: '绘制模型运动路线,鼠标右键结束', - - // 阴影分析 - timeInterval: '时间间隔', - space: '间距', - bottomHeight: '底部高程', - stretchingHeight: '拉伸高度', - bodyDisplay: '体显示', - showShadow: '开启阴影', - filterInterval: '过滤区间', - startTime: '开始时间', - endTime: '结束时间', - ShadowStartTip: '播放一天时间段内阳光和阴影动画', - ShadowStartTip2: '播放一年的阳光和阴影动画', - ShadowStopTip: '停止动画', - DaylightingRate: '采光率', - analyseResult: '分析结果', - - // 剖面分析 - startLongitude: '起点经度', - startLatitude: '起点纬度', - startElevation: '起点高程', - endLongitude: '终点经度', - endLatitude: '终点纬度', - endElevation: '终点高程', - disPlayInfo: '剖面信息展示', - Section: '截面', - GPUSection: "GPU剖面", - - // 天际线 - DisplayMode: '显示模式', - AnalysisRadius: '分析半径', - LineWidth: '线宽度', - LineDisplay: '线显示', - FaceDisplay: '面显示', - BodyDisplay: '体显示', - SkylineColor: '天际线颜色', - SkylineBodyColor: '天际体颜色', - ObstacleColor: '障碍物颜色', - Display2D: '二维天际线展示', - HighlightObstacles: '高亮障碍物', - GlobeNoAnalysis: '地表不参与分析', - drawHeightLimitingBody: '绘制限高体', - Skyline2D: '二维天际线', - limitingBody: '限高体', - - // 立面图 - maxHeight: '最大高度', - maxDistence: '最远距离', - Draw: "绘制", - Plot: "出图", - - // 图层属性 - chooseLayer: '选择图层', - renderMode: '渲染模式', - singleRender: '单面渲染', - doubleRender: '双面渲染', - shadowBrightness: '阴影明暗度', - objectHiding: '对象显隐', - MinVisibleDistance: '最小可见距离', - MaxVisibleDistance: '最大可见距离', - multiple: '多选', - disPlayAll: '显示全部', - disPlaySelected: '仅选中对象可见', - hideSelected: '仅选中对象隐藏', - noLayer: '暂无图层', - - // 图层风格 - fillStyle: '填充风格', - foreColor: '前景色', - selectedColor: '选中色', - selectColorMode: '选中颜色模式', - colorMix: '选中色混合', - colorReplace: '选中色替换', - layerTransparency: '图层透明度', - reset: '重置', - fillBothMode: '填充和线框模式', - attrSaveOk:'图层属性保存成功', - - // 图层操作 - qxModel: '开挖与压平', - offSet: '偏移', - layerColor: '图层颜色', - excavate: '开挖', - flatten: '压平', - onQXModel: '该功能只支持倾斜摄影三维模型', - offsetMode: '操作模式', - offsetX: '沿X轴偏移', - offsetY: '沿Y轴偏移', - offsetZ: '沿Z轴偏移', - selected: '选中', - - // 属性查询 - dataServerUrl: "数据服务", - dataSourceName: '数据源', - inputServerUrl: '请输入该图层数据服务URL', - inputSourceName: '请输入该图层对应数据源', - queryResult: '查询结果', - inputUrlName: '请填入该图层查询所需的数据服务和对应数据源', - bindInfoOK: "绑定成功,请点击模型查询信息", - hadBind: "该图层已绑定数据源", - noData: "暂无数据", - - // 地图查询 - mapDataUrl: "数据服务", - datasetName: "数据集", - attributeList: '属性表', - listTotal_s:'属性表(共计', - listTotal_e:'个要素)', - chooseFieldTip:'选择待过滤的字段', - filter:'过滤', - shpQueryTip:' 指定数据查询(查询数据务必与地图服务坐标系一致)', - clickQuery: '点选查询', - clearEntityTip:'清除球面绘制的图形', - refreshData:'刷新数据', - mydata:'我的数据', - queryPlaceHolder:"请输入选择字段过滤关键字", - queryWait: '正在查询请稍等', - resouceName:'资源名称', - resouceType:'资源类型', - createTime:'创建时间', - mapQueryTip:'请输入数据服务URL和对应数据集', - clickQueryClose:'点选功能已关闭', - clickQueryCloseTip:'鼠标点击获取要素信息,右键可关闭点选', - dataFiltering:'过滤数据中...', - recently:'不久前', - chooseField:'选择字段', - filterFiledTip:'属性表显示字段筛选', - - // 我的服务-iportal - getData: '获取数据中,请稍后', - serviceName: '服务名称', - resourceSubType: '服务类型', - updateTime: '更新时间', - serviceUrl: '服务链接', - year: '年', - month: '月', - day: '日', - yearsAgo: ' 年前', - monthsAgo: ' 月前', - weeksAgo: ' 周前', - daysAgo: ' 天前', - hoursAgo: ' 小时前', - minutesAgo: '分钟前', - secondsAgo: '刚刚', - - // message - layerExistMsg: '该图层已经存在,请勿重复加载!', - imgUrlErrorMsg: '影像服务URL错误,影像加载失败!', - scpUrlErrorMsg: 'SCP URL地址错误,S3M图层加载失败!', - - /** - * 图片资源名称 - 演示 - * */ - BeijingCBD: "北京CBD", - originCBD: "原始CBD(测试用)", - SophiaChurch: "索菲亚教堂", - MountEverest: "珠峰地形影像", - BIMBuilding: "BIM建筑", - Pointcloud: "点云", - Histogram: "柱状图", - PhotographyModel: "倾斜摄影模型", - JingJinMVT: "京津地区MVT", - ChongqingBaimo: "重庆白模", - YokohamaBaimo: "横滨白模", - transformerStation: '石油厂站', - - LocalImage: '本地图片', - BingMap: '必应底图', - TIANDITU: '天地图', - OSM: 'OSM底图', - GRIDIMAGERY: '经纬底图', - // japanStand: '日本地理院标准地图', - // japanPale: '日本地理院淡色地图', - // japanBlank: '日本地理院白色地图', - // japanImage: '日本地理院影像图', - japanStand: '标准地图', - japanPale: '淡色地图', - japanBlank: '白色地图', - japanImage: '影像地图', - - - SuperMapOnlineTerrain: '超图在线地形', - TiandituTerrain: '天地图地形', - STKTerrain: 'STK地形', - - // Tip - qxModelTip:'该功能只支持倾斜摄影三维模型' -} - -export default { - global -} diff --git a/SuperMap iEarth/src/main.ts b/SuperMap iEarth/src/main.ts index f157d167..75324971 100644 --- a/SuperMap iEarth/src/main.ts +++ b/SuperMap iEarth/src/main.ts @@ -1,24 +1,20 @@ -import { createApp } from 'vue' -import App from './App.vue' - -import axios from 'axios' -import naive from 'naive-ui' -import i18n from '@/locale' -import store from './store' -// import "@/styles/index.scss" +import { createApp } from 'vue'; +import App from './App.vue'; + +import axios from 'axios'; +import naive from 'naive-ui'; +import i18n from '@/locale'; // 自动获取语言并创建i18n +import store from './store'; + // 根据屏幕大小,设置font-size import 'lib-flexible'; -import "@/assets/icons/iconfont.css" +import "@/assets/icons/iconfont.css"; // 导入iportal处理程序 -import { initPortal } from "@/tools/iportal/portalTools" - -// 导入语言设置 -import setBrowserLang from '@/tools/browserLang' - +import { initPortal } from "@/tools/iportal/portalTools"; // 检测页面变化,实时改变根字体大小 -import { setFontImmediately } from '@/utils' +import { setFontImmediately } from '@/utils'; document.addEventListener('DOMContentLoaded', setFontImmediately, false); window.addEventListener('resize', setFontImmediately); window.addEventListener('load', setFontImmediately, false); @@ -26,14 +22,20 @@ window.addEventListener('load', setFontImmediately, false); // 将axois绑定到window对象中,以便保存场景时调用 window.axios = axios; -const app = createApp(App) +const app = createApp(App); app.use(naive).use(i18n).use(store); - -app.mount('#app') +app.config.warnHandler = () => { }; // 将警告处理函数设为空函数 +app.mount('#app'); // 在iportal环境中,启动iportal处理程序 -if(location.href.indexOf('/apps') != -1){ +if (location.href.indexOf('/apps') != -1) { initPortal(); } -// initPortal(); -setBrowserLang(); \ No newline at end of file + +// 检查iEarthConsole状态,以便打印输出信息 +// localStorage.setItem("iEarthConsole", 'yes') +// localStorage.getItem("iEarthConsole"); +// localStorage.removeItem('iEarthConsole'); +if (localStorage.getItem("iEarthConsole") === 'yes') { + window.iEarthConsole = true; +} \ No newline at end of file diff --git a/SuperMap iEarth/src/package/addData/index.vue b/SuperMap iEarth/src/package/addData/index.vue index 8f7b3c37..1ab79358 100644 --- a/SuperMap iEarth/src/package/addData/index.vue +++ b/SuperMap iEarth/src/package/addData/index.vue @@ -1,8 +1,8 @@ <template> - <div class="add-data-box" style="overflow-y:hidden"> - <n-tabs type="line" animated justify-content="left" > + <div class="add-data-box" style="overflow-y: hidden"> + <n-tabs type="line" animated justify-content="left"> <!-- 公共服务 --> - <n-tab-pane name="publicService" :tab="$t('global.publicService')"> + <n-tab-pane name="publicService" :tab="$t('publicService')"> <SmLayerService></SmLayerService> </n-tab-pane> <!-- 我的服务 --> @@ -10,19 +10,23 @@ <sm-layer-service></sm-layer-service> </n-tab-pane> --> <!-- 自定义服务 --> - <n-tab-pane name="customService" :tab="$t('global.customService')"> + <n-tab-pane name="customService" :tab="$t('customService')"> <SmLayerCustom></SmLayerCustom> </n-tab-pane> <!-- 在线底图 --> - <n-tab-pane name="onlineBaseMap" :tab="$t('global.onlineBaseMap')"> + <n-tab-pane name="onlineBaseMap" :tab="$t('onlineBaseMap')"> <SmLayerBase></SmLayerBase> </n-tab-pane> <!-- 在线地形 --> - <n-tab-pane name="onlineTerrain" :tab="$t('global.onlineTerrain')"> + <n-tab-pane name="onlineTerrain" :tab="$t('onlineTerrain')"> <SmLayerTerrain></SmLayerTerrain> </n-tab-pane> <!-- 我的服务 --> - <n-tab-pane name="portalService" :tab="$t('global.portalService')" v-if="IportalStore.isLogin"> + <n-tab-pane + name="portalService" + :tab="$t('portalService')" + v-if="IportalStore.isLogin" + > <SmPortalService></SmPortalService> </n-tab-pane> </n-tabs> @@ -38,7 +42,6 @@ import SmLayerTerrain from "./layer-terrain/index"; import SmPortalService from "./layer-mine/index"; const IportalStore = IportalStoreCreate(); - </script> <style lang="scss" scoped> @@ -47,13 +50,23 @@ const IportalStore = IportalStoreCreate(); height: 100%; padding: 0 0.01rem 0 0.12rem; box-sizing: border-box; - overflow-y: scroll; - @include setsSrollbar(); - // :deep(.n-tabs-tab__label) { - // color: rgba(255, 255, 255, 0.65); - // }; } -:deep(.n-tabs-tab-wrapper){ - margin-right:0.16rem; + +:deep(.n-tabs-tab-wrapper) { + margin-right: 0.16rem; +} + +:deep(.n-tabs-nav) { + padding: 0 0.12rem; +} + +:deep(.n-tab-pane) { + box-sizing: border-box; + padding-left: 0.12rem; + padding-right: 0.12rem; +} + +.use-scroll { + padding-right: 0px; } </style> diff --git a/SuperMap iEarth/src/package/addData/layer-base/index.ts b/SuperMap iEarth/src/package/addData/layer-base/index.ts index 0b3db43a..92abcf45 100644 --- a/SuperMap iEarth/src/package/addData/layer-base/index.ts +++ b/SuperMap iEarth/src/package/addData/layer-base/index.ts @@ -1,3 +1,3 @@ -import SmLayerBase from './index.vue'; +import SmLayerBase from './layerBase.vue'; export default SmLayerBase; diff --git a/SuperMap iEarth/src/package/addData/layer-base/index.vue b/SuperMap iEarth/src/package/addData/layer-base/layerBase.vue similarity index 61% rename from SuperMap iEarth/src/package/addData/layer-base/index.vue rename to SuperMap iEarth/src/package/addData/layer-base/layerBase.vue index 8905d9be..7d32f5db 100644 --- a/SuperMap iEarth/src/package/addData/layer-base/index.vue +++ b/SuperMap iEarth/src/package/addData/layer-base/layerBase.vue @@ -1,44 +1,48 @@ <template> <!-- 在线底图 --> - <div class="layer-base-container"> + <div class="addData-data-container"> <div - v-for="(item, index) in layerStore.layerServiceData.onlineBaseLayerList" + v-for="(item, index) in onlineBaseLayerList" class="ItemBox" :class="item.chooseType ? 'isSelect' : ''" :key="index" @click="addBaseLayer(item)" > <div class="img-box"> - <img :src="item.thumbnail" class="img" alt="" /> + <img :src="item.thumbnail" class="img" style="object-fit: none" /> </div> - <span>{{ $t(item.name) }}</span> + <div class="img-box-text">{{ $t(item.name) }}</div> </div> </div> </template> <script lang="ts" setup> -import { reactive } from "vue" -import { useMessage } from "naive-ui"; -import { useLayerStore } from "@/store/layerStore"; +import { reactive } from "vue"; +import { useLayerStore } from "@/store/layerStore/layer"; import { usePanelStore } from "@/store"; +import { useMessage } from "naive-ui"; -const message = useMessage(); const layerStore = useLayerStore(); const panelStore = usePanelStore(); +const message = useMessage(); +const onlineBaseLayerList = layerStore.layerServiceData.onlineBaseLayerList; let state = reactive({ BingMapKey: layerStore.configToken.BingMapKey, // 必应地图token, TiandituToken: layerStore.configToken.TiandituToken, // 天地图token, -}) +}); let imageryProvider: any = null; function addBaseLayer(item: any) { - if (item.chooseType) { - message.warning("请勿重复添加!"); + let index = layerStore.SelectedOptions.baseMap.indexOf(item.name); + if (index != -1) { + message.warning($t("repeatAddTip")); return; } + layerStore.SelectedOptions.baseMap.push(item.name); // 存入已选择的在线底图选项 + let type = item.type; let layerUrl = item.url; switch (type) { @@ -63,9 +67,6 @@ function addBaseLayer(item: any) { item.chooseType = true; break; case "OSM": - // imageryProvider = new SuperMap3D.createOpenStreetMapImageryProvider({ - // url: layerUrl, - // }); imageryProvider = new SuperMap3D.UrlTemplateImageryProvider({ url: layerUrl, subdomains: item.subdomains, @@ -77,7 +78,6 @@ function addBaseLayer(item: any) { item.chooseType = true; break; case "UrlTemplateImageryProvider": - // message.warning("日本服务不稳定,如果不行请稍后再试"); imageryProvider = new SuperMap3D.UrlTemplateImageryProvider({ url: layerUrl, }); @@ -90,46 +90,23 @@ function addBaseLayer(item: any) { layerStore.updateLayer({ type: "imagery" }); - panelStore.closeRightToolPanel(1);// 1为关闭左侧面板 + panelStore.closeRightToolPanel(1); // 1为关闭左侧面板 } </script> <style lang="scss" scoped> -.layer-base-container { - display: flex; - flex-wrap: wrap; - margin-right: 7px; +.img-box-text { + text-align: center; + font-size: 0.14rem; +} - .ItemBox { - width: 30%; - color: $--SM--FontColor-Sub; - margin-bottom: 0.07rem; - margin-right: 0.12rem; - box-sizing: border-box; - cursor: pointer; +.addData-data-container { + margin-bottom: -0.1rem; +} - .img-box { - width: 100%; - height: 0.84rem; - border-radius: 0.05rem; - overflow: hidden; - margin-bottom: 0.04rem; - background-color: #000; - border: 0.02rem solid #3498e500; - .img { - width: 100%; - height: 100%; - object-fit: none; - } - } - } - .ItemBox:nth-child(3n) { - margin-right: 0; - } - .isSelect { - .img-box { - border: 0.02rem solid #3499e5; - } - } +// 黑色背景 +.img-box { + background-color: #000; + border: 0.02rem solid #3498e500; } -</style> \ No newline at end of file +</style> diff --git a/SuperMap iEarth/src/package/addData/layer-custom/components/iEarthtest.vue b/SuperMap iEarth/src/package/addData/layer-custom/components/iEarthtest.vue deleted file mode 100644 index 10213866..00000000 --- a/SuperMap iEarth/src/package/addData/layer-custom/components/iEarthtest.vue +++ /dev/null @@ -1,232 +0,0 @@ -<template> - <n-space justify="end"> - <n-select class="add-input-border" v-model:value="state.layerType" :options="state.typeOptions" - style="width: 2.4rem; margin-bottom: 0.1rem" /> - </n-space> - - <div class="row-item" style="margin-bottom: 0.1rem"> - <span>场景ID</span> - <n-input class="add-input-border" style="width: 2.4rem" v-model:value="state.layerUrl" type="text" /> - </div> - - <!-- <div class="row-item" style="margin-bottom: 0.1rem" v-show="state.layerType != 'WMTS'"> - <span>{{ $t('global.name') }}</span> - <n-input class="add-input-border" style="width: 2.4rem" v-model:value="state.layerName" type="text" - :title="state.layerName" :disabled="true" /> - </div> --> - - <div class="btn-row-item1"> - <n-button type="info" size="small" color="#3499E5" text-color="#fff" class="ans-btn" @click="forTestMinify">打开</n-button> - <n-button type="info" size="small" color="#3499E5" text-color="#fff" class="ans-btn" @click="watchData">查看</n-button> - <n-button type="info" size="small" color="#3499E5" text-color="#fff" class="ans-btn" @click="TEST">测试</n-button> - <n-button type="info" size="small" color="#3499E5" text-color="#fff" class="ans-btn" @click="forAxois">Axois</n-button> - </div> - </template> - - <script lang="ts" setup> - import { ref, reactive ,watch} from "vue"; - import openSceneMinify from "./js/openSceneMinify" - import { useLayerStore } from "@/store/layerStore"; - - const layerStore = useLayerStore(); - - let state = reactive({ - layerType: 'S3M', - layerToken: '', - layerUrl: '', - layerName: '', - typeOptions: [ - { - label: "大屏测试", - value: "S3M", - }, - { - label: '地图属性查询', - value: "Imagery", - }, - ] - }) - - - function forTestMinify() { - openSceneMinify.openExistScene(state.layerUrl); - } - - function watchData(){ - // console.log("layerStore.particleOptions:",layerStore.particleOptions); - // if(layerStore.particleOptions['fire'] != null){ - // let fireOption = layerStore.particleOptions['fire']; - // layerStore.addParticleFile(fireOption); - // // if(window.EarthGlobal["particle"]){ - // // particle = window.EarthGlobal["particle"]; - // // } - // } - - console.log(`查看${state.layerUrl}:`,layerStore[state.layerUrl]); - // console.log("layerStore.particleOptions:",layerStore.particleOptions); - - } - - // 测试场景风格 - // function TEST(){ - // let obj = { - // "Building@CBD": { - // "foreColor": "rgba(33, 48, 213, 1)", - // "lineColor": "rgba(255, 255, 255, 1)", - // "selectedColor": "rgba(197, 15, 15, 1)", - // "selectColorMode": 1, - // "bottomAltitude": 71, - // "layerTrans": 0.3, - // "LODScale": 1, - // "fillStyle": 0 - // }, - // "重庆白模": { - // "foreColor": "rgba(43, 33, 184, 1)", - // "lineColor": "rgba(54, 31, 183, 1)", - // "selectedColor": "rgba(179,179,255, 1)", - // "selectColorMode": 0, - // "bottomAltitude": 0, - // "layerTrans": 1, - // "LODScale": 1, - // "fillStyle": 1 - // }, - // "Bridge@CBD": { - // "foreColor": "rgba(21, 217, 80, 1)", - // "lineColor": "rgba(255, 255, 255, 1)", - // "selectedColor": "rgba(179,179,255, 1)", - // "selectColorMode": 0, - // "bottomAltitude": 100, - // "layerTrans": 1, - // "LODScale": 1, - // "fillStyle": 0 - // } - // } - // layerStore.setLayerStyle(obj); - // } - - function TEST(){ - - - // 测试场景属性 - let attr = { - "earthShow": true, - "shadow": true, - "sunShow": false, - "depthInspection": true, - "atomsphereRender": false, - "fogEffect": false, - "cloudLayer": false, - "skyBoxShow": true, - "timeAxis": true, - "displayFrame": true, - "showUnderground": false, - "surfaceTransparency": 1, - "brightness": 1.4, - "contrast": 1.6, - "hue": -0.3, - "saturation": 2.8 - } - // layerStore.sceneAttrState = attr; - // layerStore.setSceneAttr(attr) - - // 场景风格 - let style = { - "Building@CBD": { - "foreColor": "rgba(33, 48, 213, 1)", - "lineColor": "rgba(255, 255, 255, 1)", - "selectedColor": "rgba(197, 15, 15, 1)", - "selectColorMode": 1, - "bottomAltitude": 71, - "layerTrans": 0.3, - "LODScale": 1, - "fillStyle": 0 - }, - "重庆白模": { - "foreColor": "rgba(43, 33, 184, 1)", - "lineColor": "rgba(54, 31, 183, 1)", - "selectedColor": "rgba(179,179,255, 1)", - "selectColorMode": 0, - "bottomAltitude": 0, - "layerTrans": 0.3, - "LODScale": 1, - "fillStyle": 1 - }, - "Bridge@CBD": { - "foreColor": "rgba(21, 217, 80, 1)", - "lineColor": "rgba(255, 255, 255, 1)", - "selectedColor": "rgba(179,179,255, 1)", - "selectColorMode": 0, - "bottomAltitude": 100, - "layerTrans": 1, - "LODScale": 1, - "fillStyle": 0 - } - } - layerStore.layerStyleOptions = style; - layerStore.setLayerStyle(style); - - // 测试粒子系统 - let obj = { - "fire": { - "particleUrl": "./Resource/particle/Fire.json", - "particlePosition": { - "x": -2182675.8188203466, - "y": 4386571.001194588, - "z": 4069765.2870884887 - }, - "particleAttr": { - "emitRate": 852, - "minSize": 62, - "maxSize": 80, - // "minLifeTime": 0.112, - // "maxLifeTime": 0.178, - // "minEmitPower": 30, - // "maxEmitPower": 61 - } - }, - "water": { - "particleUrl": "./Resource/particle/fountain.json", - "particlePosition": { - "x": -2182939.577150758, - "y": 4386362.495282677, - "z": 4069848.304239633 - }, - "particleAttr": { - "emitRate": 1200, - "minSize": 7, - "maxSize": 4, - "minScaleX": 39, - "minScaleY": 39, - "maxScaleX": 39, - "maxScaleY": 39, - "gravity": -15, - "minEmitPower": 19, - "maxEmitPower": 27, - } - }, - "fireWork": { - "fireWorkPosition": { - "x": -2182681.849266271, - "y": 4386266.445984421, - "z": 4070114.4623629563 - } - } - } - // layerStore.particleOptions = obj - // layerStore.setParticle(obj); - } - - function forAxois(){ - window.axios - .get(state.layerUrl, { withCredentials: true }) - .then(function (response) { - console.log("response-axois:", response); - }) - .catch(function (error) { - console.log(error); - }); - } - - </script> - - <style lang="scss" scoped></style> \ No newline at end of file diff --git a/SuperMap iEarth/src/package/addData/layer-custom/components/js/openSceneMinify.js b/SuperMap iEarth/src/package/addData/layer-custom/components/js/openSceneMinify.js deleted file mode 100644 index fd0538f9..00000000 --- a/SuperMap iEarth/src/package/addData/layer-custom/components/js/openSceneMinify.js +++ /dev/null @@ -1,651 +0,0 @@ -let BingMapkey = "Av63hPkCmH18oGGn5Qg3QhLBJvknZ97xbhyw3utDLRtFv7anHjXNOUQbyWBL5fK5"; -let terrainToken = "e90d56e5a09d1767899ad45846b0cefd"; - -function getRootUrl() { - const path = "/apps"; - let url = ""; - if (window.location.href.indexOf(path) !== -1) { - url = window.location.href.substring( - 0, - window.location.href.indexOf(path) + 1 - ); - } - if (!url) { - if (location.href.indexOf("/iportal/") !== -1) { - url = `${location.protocol}//${location.host}/iportal/`; - } else { - url = `${location.protocol}//${location.host}/`; - } - } - //模拟本机portal开发 - // url = "http://localhost:8190/iportal/" - return url; -} - -function openExistScene(sceneID) { - console.log("打开已存在的保存场景"); - - let url = getRootUrl() + "web/scenes/" + sceneID + ".json"; - console.log("exit-Scene-url:", url) - - window.axios - .get(url, { withCredentials: true }) - .then(function (response) { - console.log("已保存的场景返回信息:", response); - openScene(response); - }) - .catch(function (error) { - console.log(error); - }); - -} - -function openScene(response) { - let content = JSON.parse(response.data.content); - console.log("exit-openScene-content:", content) - - if (content) { - if (JSON.stringify(content.layers) !== "{}") { - //需要改动 - openS3M(content); - openImagery(content); - openMVT(content); - openTerrain(content); - - // 场景属性 - if (content.layers.sceneAttrState) { - setSceneAttr(content.layers.sceneAttrState) - } - // 三维特效粒子 - if (content.layers.particleOptions) { - setParticle(content.layers.particleOptions) - } - } - let cameraX = content.camera.position.x; - let cameraY = content.camera.position.y; - let cameraZ = content.camera.position.z; - setTimeout(function () { - viewer.scene.camera.setView({ - destination: new SuperMap3D.Cartesian3(cameraX, cameraY, cameraZ), - orientation: { - heading: content.camera.heading, - pitch: content.camera.pitch, - roll: content.camera.roll - } - }); - // 专门处理阴影 - let shadow_value = content.layers.sceneAttrState["shadow"]; - if (shadow_value == true) { - window.viewer.shadows = true; - // UE阴影 设置为false,使用原来的软阴影效果;设置为true,实现了新的阴影算法,可以大幅度提升阴影边界的质量,看起来会非常柔和,没有锯齿。这个设置webgl2.0默认开启了。 - window.viewer.pcss = true; - window.viewer.shadowQuality = 0; - //设置阴影的出现距离 - window.viewer.scene.shadowMap.maximumDistance = 2000; - //设置阴影的浓度,值越高,阴影越淡 - window.viewer.shadowMap.darkness = 0.4 - //默认值是0.1,值越小越清晰 - window.viewer.shadowMap.penumbraRatio = 0.1 - - let layers = window.viewer.scene.layers.layerQueue; - for (var i = 0; i < layers.length; i++) { - // 设置图层的阴影模式 - layers[i].shadowType = 2; - } - } - - // 将layerStyleOptions传入 - 需要等layer都加载完在设置图层风格 - if (content.layers.layerStyleOptions) { - setLayerStyle(content.layers.layerStyleOptions) - } - }, 3000); - } else if (response.data.url) { - - let realspaceUrl = response.data.url; - let index = realspaceUrl.indexOf("/scenes"); - realspaceUrl = realspaceUrl.substring(0, index); - viewer.scene.open(realspaceUrl); - } -} - -// 加载S3M -function openS3M(content) { - let s3mlayer = content.layers.s3mLayer; - if (s3mlayer.length > 0) { - for (let t = 0; t < s3mlayer.length; t++) { - let url = content.layers.s3mLayer[t].url; - let name = content.layers.s3mLayer[t].name; - viewer.scene.addS3MTilesLayerByScp(url, { name: name }); - } - } -} - -// 加载影像 -function openImagery(content) { - let imageryLayer = content.layers.imageryLayer; - let imageryProvider; - if (imageryLayer.length > 0) { - for (let i = 0; i < imageryLayer.length; i++) { - let url = content.layers.imageryLayer[i].url; - let flag = checkImageryRepeat(url); - // console.log("flag-open:",flag); - // console.log("url-open:",url); - if (!flag && imageryLayer[i].type) { - let imageryType = content.layers.imageryLayer[i].type; - switch (imageryType) { - case "BingMapsImageryProvider": - imageryProvider = new SuperMap3D.BingMapsImageryProvider({ - url: content.layers.imageryLayer[i].url, - key: BingMapkey - }); - break; - case "TiandituImageryProvider": - imageryProvider = new SuperMap3D.TiandituImageryProvider({ - url: content.layers.imageryLayer[i].url, - token: content.layers.imageryLayer[i].token - }); - break; - case "SingleTileImageryProvider": - imageryProvider = new SuperMap3D.SingleTileImageryProvider({ - url: content.layers.imageryLayer[i].url - }); - break; - case "UrlTemplateImageryProvider": - imageryProvider = new SuperMap3D.UrlTemplateImageryProvider({ - url: content.layers.imageryLayer[i].url - }); - break; - case "SuperMapImageryProvider": - imageryProvider = new SuperMap3D.SuperMapImageryProvider({ - url: content.layers.imageryLayer[i].url - }); - break; - case "GRIDIMAGERY": - imageryProvider = new SuperMap3D.TileCoordinatesImageryProvider(); - break; - default: - break; - } - viewer.imageryLayers.addImageryProvider(imageryProvider); - } - } - } - -} - -// 加载MVT -function openMVT(content) { - let MVTLayerUrlList = content.layers.MVTLayer; - - MVTLayerUrlList.forEach(item => { - addMvtLayer(item.url, item.name, "MVT"); - }) -} - -// 加载地形 -function openTerrain(content) { - - viewer.terrainProvider = new SuperMap3D.EllipsoidTerrainProvider(); - let terrainLayer = content.layers.terrainLayer; - if (terrainLayer.length > 0) { - let terrainType = content.layers.terrainLayer[0].type; - - let url = content.layers.terrainLayer[0].url; - switch (terrainType) { - case "StkTerrain": - let isSctFlag = true; - // 是否为iServer发布的TIN地形服务,stk地形设置为false。 - // if(content.layers.terrainLayer[0].url.indexOf("8090") != -1) isSctFlag = true; - if (content.layers.terrainLayer[0].url.indexOf("/info/") != -1) isSctFlag = false; // 目前以"/info/"来判断是否为stk地形 - viewer.terrainProvider = new SuperMap3D.SuperMapTerrainProvider({ - url: content.layers.terrainLayer[0].url, - isSct: isSctFlag - }); - break; - case "tianDiTuTerrain": - viewer.terrainProvider = new SuperMap3D.TiandituTerrainProvider({ - token: terrainToken - }); - break; - case "supermapOnlineTerrain": - viewer.terrainProvider = new SuperMap3D.SCTTerrainProvider({ - urls: [content.layers.terrainLayer[0].url] - }); - break; - } - } -} - -// 设置场景属性 -function setSceneAttr(sceneAttrState) { - for (let key in sceneAttrState) { - sceneAttrSwitch(key, sceneAttrState[key]); - } -} - -// 根据key和value分别设置场景属性 -function sceneAttrSwitch(key, value) { - switch (key) { - case "atomsphereRender": - window.viewer.scene.skyAtmosphere.show = value; - break; - case "depthInspection": - window.viewer.scene.globe.depthTestAgainstTerrain = value; - break; - case "displayFrame": - window.viewer.scene.debugShowFramesPerSecond = value; - break; - case "earthShow": - window.viewer.scene.globe.show = value; - break; - case "fogEffect": - window.viewer.scene.fog.enabled = value; - break; - case "shadow": - if (value) { - window.viewer.shadows = true; - // UE阴影 设置为false,使用原来的软阴影效果;设置为true,实现了新的阴影算法,可以大幅度提升阴影边界的质量,看起来会非常柔和,没有锯齿。这个设置webgl2.0默认开启了。 - window.viewer.pcss = true; - window.viewer.shadowQuality = 0; - //设置阴影的出现距离 - window.viewer.scene.shadowMap.maximumDistance = 2000; - //设置阴影的浓度,值越高,阴影越淡 - window.viewer.shadowMap.darkness = 0.4; - //默认值是0.1,值越小越清晰 - window.viewer.shadowMap.penumbraRatio = 0.1; - - - let layers = window.viewer.scene.layers.layerQueue; - for (var i = 0; i < layers.length; i++) { - // 设置图层的阴影模式 - layers[i].shadowType = 2; - } - } else { - window.viewer.shadows = false; - } - break; - case "sunShow": - window.viewer.scene.globe.enableLighting = value; - break; - case "timeAxis": - let timeline = document.getElementsByClassName( - "supermap3d-viewer-timelineContainer" - )[0]; - if (value) { - timeline.style.visibility = "visible"; - timeline.style['z-index'] = 99999999999; - } else { - timeline.style.visibility = "hidden"; - } - break; - case "cloudLayer": - if (value) { - viewer.scene.cloudBox = cloudBox; - } else { - viewer.scene.cloudBox = null; - } - break; - case "skyBoxShow": - setSkyBox(value); - break; - case "brightness": - window.viewer.scene.colorCorrection.show = true; // 场景颜色开关打开 - window.viewer.scene.colorCorrection.brightness = value; - break; - case "contrast": - window.viewer.scene.colorCorrection.show = true; - window.viewer.scene.colorCorrection.contrast = value; - break; - case "hue": - window.viewer.scene.colorCorrection.show = true; - window.viewer.scene.colorCorrection.hue = value; - break; - case "saturation": - window.viewer.scene.colorCorrection.show = true; - window.viewer.scene.colorCorrection.saturation = value; - break; - case "surfaceTransparency": - window.viewer.scene.globe.globeAlpha = value; - break; - }; -} - -// let iportal_large_screen_url_prefix = getRootUrl() + 'apps/earth/v2'; -// let cloudBoxUrl = iportal_large_screen_url_prefix + '/images/sceneProperties/clouds/clouds1.png'; -// let cloudBox = new SuperMap3D.CloudBox({ url: cloudBoxUrl }); -// // 天空盒 -// let bluesky = { -// positiveX: iportal_large_screen_url_prefix+'/images/sceneProperties/bluesky/kloofendal_48d_partly_cloudy_puresky_8k_4.right.jpg', -// negativeX: iportal_large_screen_url_prefix+'/images/sceneProperties/bluesky/kloofendal_48d_partly_cloudy_puresky_8k_4.left.jpg', -// positiveY: iportal_large_screen_url_prefix+'/images/sceneProperties/bluesky/kloofendal_48d_partly_cloudy_puresky_8k_4.front.jpg', -// negativeY: iportal_large_screen_url_prefix+'/images/sceneProperties/bluesky/kloofendal_48d_partly_cloudy_puresky_8k_4.back.jpg', -// positiveZ: iportal_large_screen_url_prefix+'/images/sceneProperties/bluesky/kloofendal_48d_partly_cloudy_puresky_8k_4.top.jpg', -// negativeZ: iportal_large_screen_url_prefix+'/images/sceneProperties/bluesky/kloofendal_48d_partly_cloudy_puresky_8k_4.bottom.jpg' -// }; -// 云层 -let cloudBoxUrl = './images/sceneProperties/clouds/clouds1.png'; -let cloudBox = new SuperMap3D.CloudBox({ url: cloudBoxUrl }); -// 天空盒 -let bluesky = { - positiveX: './images/sceneProperties/bluesky/kloofendal_48d_partly_cloudy_puresky_8k_4.right.jpg', - negativeX: './images/sceneProperties/bluesky/kloofendal_48d_partly_cloudy_puresky_8k_4.left.jpg', - positiveY: './images/sceneProperties/bluesky/kloofendal_48d_partly_cloudy_puresky_8k_4.front.jpg', - negativeY: './images/sceneProperties/bluesky/kloofendal_48d_partly_cloudy_puresky_8k_4.back.jpg', - positiveZ: './images/sceneProperties/bluesky/kloofendal_48d_partly_cloudy_puresky_8k_4.top.jpg', - negativeZ: './images/sceneProperties/bluesky/kloofendal_48d_partly_cloudy_puresky_8k_4.bottom.jpg' -}; -let skybox = new SuperMap3D.SkyBox({ sources: bluesky }); -skybox.USpeed = 0; //获取或者设置天空盒子绕x轴运动的动画速度。设置为1时表示0.01弧度每秒 -skybox.VSpeed = 0; //获取或者设置天空盒子绕y轴运动的动画速度。 -skybox.WSpeed = 0; //获取或者设置天空盒子绕z轴运动的动画速度。 - -// 设置天空盒 -function setSkyBox(skyBoxShow) { - let defaultSkybox = viewer.scene.skyBox; - - if (skyBoxShow) { - let cameraHeight = viewer.scene.camera.positionCartographic.height; - viewer.scene.postRender.addEventListener(watchCameraHeight); - viewer.scene.skyBox = skybox; - if (cameraHeight < 22e4) { - viewer.scene.skyBox.show = true; - viewer.scene.skyAtmosphere.show = false - } else { - viewer.scene.skyAtmosphere.show = true - } - } else { - viewer.scene.skyAtmosphere.show = true; - viewer.scene.skyBox.show = false; - viewer.scene.skyBox = defaultSkybox; - viewer.scene.postRender.removeEventListener(watchCameraHeight); - } -} - -// 监听相机高度,一旦高于设定阈值,关闭天空盒显示大气层 -function watchCameraHeight(skyBoxShow) { - if (skyBoxShow) { - let cameraHeight = viewer.scene.camera.positionCartographic.height; - if (cameraHeight > 22e4) { - viewer.scene.skyBox.show = false; - viewer.scene.skyAtmosphere.show = true; - } else { - viewer.scene.skyBox.show = true; - viewer.scene.skyAtmosphere.show = false; - } - } -} - -// 设置场景特效 - 粒子系统 -function setParticle(particleOptions) { - if (particleOptions['fire'] != null) { - let fireOption = particleOptions['fire']; - addParticleFile(fireOption, 'fire'); - } - if (particleOptions['water'] != null) { - let waterOption = particleOptions['water']; - addParticleFile(waterOption, 'water'); - } - if (particleOptions['fireWork'] != null) { - let fireWorkOption = particleOptions['fireWork']; - addFireWork(fireWorkOption); - } -} -// 添加场景中已保存的粒子 -function addParticleFile(options, type) { - let modelMatrix_fire = new SuperMap3D.Matrix4(); - SuperMap3D.Transforms.eastNorthUpToFixedFrame(options.particlePosition, undefined, modelMatrix_fire); - loadParticleFile(options.particleUrl, modelMatrix_fire, type, options.particleAttr); -} -// 加载粒子文件 -function loadParticleFile(url, modelMatrix, type, option) { - let particle = {}; - let scene = window.viewer.scene; - SuperMap3D.ParticleHelper.fromJsonUrl(url, scene).then(function (particleSystem) { - particle = particleSystem; - particle.modelMatrix = modelMatrix; - // 设置参数 - if (option) { - for (let key in option) { - switch (key) { - case "emitRate": - particle['emitRate'] = Number(option[key]); - break; - case "minLifeTime": - particle['minLifeTime'] = Number(option[key]); - break; - case "maxLifeTime": - particle['maxLifeTime'] = Number(option[key]); - break; - case "minEmitPower": - particle['minEmitPower'] = Number(option[key]); - break; - case "maxEmitPower": - particle['maxEmitPower'] = Number(option[key]); - break; - case "minSize": - particle['minSize'] = Number(option[key]); - break; - case "maxSize": - particle['maxSize'] = Number(option[key]); - break; - case "minScaleX": - particle['minScaleX'] = Number(option[key]); - break; - case "minScaleY": - particle['minScaleY'] = Number(option[key]); - break; - case "maxScaleX": - particle['maxScaleX'] = Number(option[key]); - break; - case "maxScaleY": - particle['maxScaleY'] = Number(option[key]); - break; - case "gravity": - particle.gravity = new SuperMap3D.Cartesian3(0, 0, Number(option[key])); - break; - case "emitType": - switch (option[key]) { - case "Cone": - particle.createConeEmitter(1.0, 1.05); - break; - case "Sphere": - particle.createSphereEmitter(1.0); - break; - case "Box": - let direction1 = new SuperMap3D.Cartesian3(-1, 1, 1); - let direction2 = new SuperMap3D.Cartesian3(1, 1, -1); - let minBox = new SuperMap3D.Cartesian3(-10, 0, -10); - let maxBox = new SuperMap3D.Cartesian3(10, 0, 10); - particle.createBoxEmitter(direction1, direction2, minBox, maxBox); - break; - } - break; - default: - break; - } - } - } - }); - -} - -// 设置保存的图层属性 -function setLayerStyle(layerStyleOptions) { - console.log("layerStyleOptions:", layerStyleOptions); - let keys = Object.keys(layerStyleOptions); - for (let i = 0; i < keys.length; i++) { - let layerName = keys[i]; - let layerStyleOption = layerStyleOptions[layerName]; - let currentLayer = window.viewer.scene.layers.find(layerName); - if (!currentLayer) return; - for (let key in layerStyleOption) { - let lineColor = layerStyleOption["lineColor"]; - layerStyleSwitch(currentLayer, key, layerStyleOption[key], lineColor); - } - } -} - -// 根据option内容中每个属性赋值 -function layerStyleSwitch(currentLayer, key, value, lineColor) { - switch (key) { - case "foreColor": - currentLayer.style3D.fillForeColor = SuperMap3D.Color.fromCssColorString(value); - break; - case "lineColor": - currentLayer.style3D.lineColor = SuperMap3D.Color.fromCssColorString(value); - break; - case "selectedColor": - currentLayer.selectedColor = SuperMap3D.Color.fromCssColorString(value); - break; - case "layerTrans": - currentLayer.style3D.fillForeColor.alpha = Number(value); - break; - case "selectColorMode": - currentLayer.selectColorType = value; - break; - case "bottomAltitude": - currentLayer.style3D.bottomAltitude = Number(value); - currentLayer.refresh(); - break; - case "fillStyle": - if (currentLayer) { - switch (value) { - case 0: - currentLayer.style3D.fillStyle = SuperMap3D.FillStyle.Fill; - break; - case 1: - currentLayer.style3D.fillStyle = SuperMap3D.FillStyle.WireFrame; - currentLayer.style3D.lineColor = SuperMap3D.Color.fromCssColorString(lineColor); - break; - case 2: - currentLayer.style3D.fillStyle = SuperMap3D.FillStyle.Fill_And_WireFrame; - currentLayer.style3D.lineColor = SuperMap3D.Color.fromCssColorString(lineColor); - break; - default: - break; - } - currentLayer.refresh(); - } - break; - default: - break; - } - -} - -// 添加烟花 -function addFireWork(fireWorkOption) { - let modelMatrix = new SuperMap3D.Matrix4(); - let setIntervalList = []; - let scene = window.viewer.scene; - // scene.skyAtmosphere = new SuperMap3D.SkyAtmosphere(); - // scene.globe.show = false - // scene.skyAtmosphere.show = false; //关闭大气 - - let sparkOneUrl = './Resource/particle/babylon/sparkGravityOne.json'; - let sparkTwoUrl = './Resource/particle/babylon/sparkGravityTwo.json'; - let sparkThreeUrl = './Resource/particle/babylon/sparkGravityThree.json'; - let sparkFourUrl = './Resource/particle/babylon/sparkGravityFour.json'; - - let numberOfSparks = 8; - let xMin = -2100.0; - let xMax = 300.0; - let yMin = 0.0; - let yMax = 2000.0; - let zMin = 150.0; - let zMax = 550.0; - // 创建烟花 - let sparkInterval = (xMax - xMin) / numberOfSparks; - - function createSpark() { - for (let i = 0; i < numberOfSparks; ++i) { - let x = SuperMap3D.Math.randomBetween(xMin + i * sparkInterval, xMin + (i + 1) * sparkInterval); - let y = SuperMap3D.Math.randomBetween(yMin, yMax); - let z = SuperMap3D.Math.randomBetween(zMin, zMax); - let offset = new SuperMap3D.Cartesian3(x, y, z); - let url = ''; - if (i % 4 === 0) - url = sparkOneUrl; - if (i % 4 === 1) - url = sparkTwoUrl; - if (i % 4 === 2) - url = sparkThreeUrl; - if (i % 4 === 3) - url = sparkFourUrl; - SuperMap3D.ParticleHelper.fromJsonUrl(url, scene).then(function (particleSystem) { - settingParticleSys(particleSystem, offset, i); - }); - } - } - - // 设置当前粒子系统 - function settingParticleSys(particleSystem, offset, index) { - - // 添加多个 - particleSystem.modelMatrix = modelMatrix; - particleSystem.worldOffset.x = offset.x; - particleSystem.worldOffset.y = offset.y; - particleSystem.worldOffset.z = offset.z; - let setIntervalFlag = setInterval(() => { - particleSystem.start(); - }, 2000 + index * 50); - scene.primitives.add(particleSystem); - setIntervalList.push(setIntervalFlag); - } - - function addSpark(centerPosition) { - SuperMap3D.Transforms.eastNorthUpToFixedFrame(centerPosition, undefined, modelMatrix); - createSpark(); - } - - addSpark(fireWorkOption.fireWorkPosition); -} - -// 添加MVT服务 -function addMvtLayer(LayerURL, name, type) { - // 返回img图层layer - let mvtMap = window.viewer.scene.addVectorTilesMap({ - url: LayerURL, - canvasWidth: 512, - name: name || "mvt", - viewer: window.viewer, - }); - - SuperMap3D.when(mvtMap.readyPromise, function (data) { - var bounds = mvtMap.rectangle; - window.viewer.scene.camera.flyTo({ - destination: new SuperMap3D.Cartesian3.fromRadians( - (bounds.east + bounds.west) * 0.5, - (bounds.north + bounds.south) * 0.5, - 10000 - ), - duration: 0, - orientation: { - heading: 0, - roll: 0, - }, - }); - - }); -} - -// 检查当前影像是否重复添加 -function checkImageryRepeat(url) { - // viewer.imageryLayers._layers.find - let length = viewer.imageryLayers._layers.length - for (let i = 0; i < length; i++) { - let imageryLayer = viewer.imageryLayers._layers[i]; - if (imageryLayer._imageryProvider.url) { - let imgUrl = imageryLayer._imageryProvider.url; - // if(imgUrl===url){ - // return true; - // } - return imgUrl === url ? true : false; - } - - } -} - -export default { - openExistScene -} \ No newline at end of file diff --git a/SuperMap iEarth/src/package/addData/layer-custom/components/layers.vue b/SuperMap iEarth/src/package/addData/layer-custom/components/layers.vue index 356c19cd..fffb8384 100644 --- a/SuperMap iEarth/src/package/addData/layer-custom/components/layers.vue +++ b/SuperMap iEarth/src/package/addData/layer-custom/components/layers.vue @@ -1,118 +1,175 @@ <template> <n-space justify="end"> - <n-select class="add-input-border" v-model:value="state.layerType" :options="state.typeOptions" - style="width: 2.4rem; margin-bottom: 0.1rem" /> + <n-select + v-model:value="state.layerType" + :options="state.typeOptions" + style="width: 2.4rem; margin-bottom: 0.1rem" + /> </n-space> <div class="row-item" style="margin-bottom: 0.1rem"> - <span>{{ $t('global.address') }}</span> - - <n-tooltip placement="top-end" trigger="hover"> - <template #trigger> - <n-input class="add-input-border" style="width: 2.4rem" v-model:value="state.layerUrl" type="text" - :placeholder="$t('global.layerUrl')" @input="handleChange" /> - </template> - {{state.urlTip}} - </n-tooltip> + <span>{{ $t("address") }}</span> + <n-tooltip placement="top-end" trigger="hover"> + <template #trigger> + <n-input + class="add-input-border" + style="width: 2.4rem" + v-model:value="state.layerUrl" + type="text" + :placeholder="$t('layerUrl')" + @input="handleChange" + /> + </template> + {{ state.urlTip }} + </n-tooltip> </div> - <div class="row-item" style="margin-bottom: 0.1rem" v-show="state.layerType != 'WMTS'"> - <span>{{ $t('global.name') }}</span> - <n-input class="add-input-border" style="width: 2.4rem" v-model:value="state.layerName" type="text" - :placeholder="$t('global.layerName')" :title="state.layerName" :disabled="true" /> + <div + class="row-item" + style="margin-bottom: 0.1rem" + v-show="state.layerType != 'WMTS'" + > + <span>{{ $t("name") }}</span> + <n-input + class="add-input-border" + style="width: 2.4rem" + v-model:value="state.layerName" + type="text" + :placeholder="$t('layerName')" + :title="state.layerName" + :disabled="true" + /> </div> - <div style="margin-left: 0.62rem; margin-bottom: 0.1rem" v-show="state.layerType != 'WMTS'"> - <n-checkbox v-model:checked="state.token"> {{ $t('global.addToken') }} </n-checkbox> - <n-input style="margin-top: 0.1rem; width: 2.4rem" v-if="state.token" v-model:value="state.layerToken" type="text" - placeholder="token..." /> + <div + style="margin-left: 0.95rem; margin-bottom: 0.1rem" + v-show="state.layerType != 'WMTS'" + > + <n-checkbox v-model:checked="state.token" :label="$t('addToken')" /> + <n-input + style="margin-top: 0.1rem; width: 2.4rem" + v-if="state.token" + v-model:value="state.layerToken" + type="text" + placeholder="token..." + /> </div> - <div class="row-item" style="margin-bottom: 0.1rem" v-show="state.layerType === 'WMTS' && state.wmtsLayerOptions.length > 0"> - <span>{{ $t('global.selectableLayers') }}</span> - <n-select class="add-input-border" v-model:value="state.wmtsLayer" :options="state.wmtsLayerOptions" - style="width: 2.4rem; margin-bottom: 0.1rem" /> + <div + class="row-item" + style="margin-bottom: 0.1rem" + v-show="state.layerType === 'WMTS' && state.wmtsLayerOptions.length > 0" + > + <span>{{ $t("selectableLayers") }}</span> + <n-select + class="add-input-border" + v-model:value="state.wmtsLayer" + :options="state.wmtsLayerOptions" + style="width: 2.4rem" + /> </div> - <!-- <div class="row-item" style="margin-bottom: 0.1rem" v-show="state.layerType === 'WMTS' && state.wmtsLayer != ''"> - <span>标识符</span> - <n-select class="add-input-border" v-model:value="state.tileMatrixSetID" :options="state.tileMatrixSetIDOptions" - style="width: 2.4rem; margin-bottom: 0.1rem" /> - </div> --> - - <div class="btn-row-item1"> - <n-button type="info" color="#3499E5" text-color="#fff" class="ans-btn" @click="openLayer">{{ $t('global.sure') - }}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{ $t('global.clear') - }}</n-button> + <div class="btn-row-item" style="margin-left: 0.95rem"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + class="ans-btn" + @click="openLayer" + >{{ $t("sure") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > </div> </template> <script lang="ts" setup> -import { ref, reactive ,watch} from "vue"; -import { useMessage } from "naive-ui" +import { reactive, watch, onMounted, onBeforeUnmount } from "vue"; +import { useMessage } from "naive-ui"; +import { useLayerStore } from "@/store/layerStore/layer"; import layerManagement from "@/tools/layerManagement"; -import { useLayerStore } from "@/store/layerStore"; +import proj4 from "proj4"; -// import x2js from 'xml-js' const layerStore = useLayerStore(); const message = useMessage(); const widget = viewer.cesiumWidget; +onMounted(() => { + viewer.scene.globe.depthTestAgainstTerrain = false; //关闭深度检测 + window.viewer.shadows = false; // 关闭阴影 +}); + +onBeforeUnmount(() => {}); + +// 南京EPSG::4549自定义投影坐标系 +proj4.defs([ + [ + "EPSG:4549", + "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs", + ], +]); + let state = reactive({ - layerType: 'S3M', + layerType: "S3M", token: false, - layerToken: '', - layerUrl: '', - layerName: '', - wmtsLayer: '', + layerToken: "", + layerUrl: "", + layerName: "", + wmtsLayer: "", wmtsLayerOptions: [], - tileMatrixSetID: '', + tileMatrixSetID: "", tileMatrixSetIDOptions: [], typeOptions: [ { - label: GlobalLang.s3mLayer, + label: $t("s3mLayer"), value: "S3M", }, { - label: GlobalLang.imgLayer, + label: $t("imgLayer"), value: "Imagery", }, { - label: GlobalLang.terrainLayer, + label: $t("terrainLayer"), value: "Terrain", }, { - label: GlobalLang.wmtsLayer, + label: $t("wmtsLayer"), value: "WMTS", }, ], - rectangleObj: null, - scaleDenominatorsObj: null, - addWmtsFlag:true, - urlTip:`http://<server>:<port>/iserver/services/<component>/rest/realspace/datas/<layerName>/config` -}) + rectangleObj: [], + scaleDenominatorsObj: [], + epsg: -1, + addWmtsFlag: true, + urlTip: `http://<server>:<port>/iserver/services/<component>/rest/realspace/datas/<layerName>/config`, +}); function clear() { - state.layerUrl = ''; - state.layerName = ''; + state.layerUrl = ""; + state.layerName = ""; state.token = false; - state.layerToken = ''; + state.layerToken = ""; // 获取必要参数 state.wmtsLayerOptions = []; state.tileMatrixSetIDOptions = []; - state.rectangleObj = null; - state.scaleDenominatorsObj = null; + state.rectangleObj = []; + state.scaleDenominatorsObj = []; + state.epsg = -1; - state.tileMatrixSetID = ''; - state.wmtsLayer = ''; -}; + state.tileMatrixSetID = ""; + state.wmtsLayer = ""; +} // 打开自定义图层 function openLayer() { if (state.layerUrl === null || state.layerUrl === "") { - // message.warning(langGlobal.urlIsNull); + message.warning($t("urlIsNull")); return; } if (state.token) { @@ -121,8 +178,6 @@ function openLayer() { ); } - // setTrustedServers(state.layerUrl) - switch (state.layerType) { case "S3M": addS3M(state.layerUrl); @@ -137,7 +192,7 @@ function openLayer() { addWMTS(state.layerUrl); break; default: - console.log("hello world"); + break; } } @@ -147,23 +202,24 @@ function handleChange() { switch (state.layerType) { case "S3M": if (state.layerUrl.indexOf("/rest/realspace/datas/") != -1) { - // message.success(langGlobal.urlCheckedsuccess); - state.layerName = layerManagement.getLayerNameFromUrl(state.layerUrl, "S3M"); + state.layerName = layerManagement.getLayerNameFromUrl( + state.layerUrl, + "S3M" + ); } break; case "Imagery": - if ( - state.layerUrl.indexOf("/rest/realspace/datas/") != -1 && - state.layerUrl.indexOf("/rest/maps/") != 0 - ) { - // message.success(langGlobal.urlCheckedsuccess); - state.layerName = layerManagement.getLayerNameFromUrl(state.layerUrl, "Imagery"); - } + state.layerName = layerManagement.getLayerNameFromUrl( + state.layerUrl, + "Imagery" + ); break; case "Terrain": if (state.layerUrl.indexOf("/rest/realspace/datas/") != -1) { - // message.success(langGlobal.urlCheckedsuccess); - state.layerName = layerManagement.getLayerNameFromUrl(state.layerUrl, "Terrain"); + state.layerName = layerManagement.getLayerNameFromUrl( + state.layerUrl, + "Terrain" + ); } break; case "WMTS": @@ -191,7 +247,6 @@ function addS3M(s3mLayerUrl: string) { name: state.layerName, }; } else { - // message.warning(langGlobal.urlIsNull); return; } promiseArray.push(viewer.scene.addS3MTilesLayerByScp(s3mLayerUrl, options)); @@ -211,16 +266,11 @@ function addImage(imageryUrl: string) { // 添加地形 function addTerrain(terrainURL: string) { - // viewer.terrainProvider = new SuperMap3D.SuperMapTerrainProvider({ - // url: terrainURL, - // isSct: true, //地形服务源自SuperMap iServer,本地发布时需设置isSct为true - // }); - let isSctFlag = false; if (terrainURL.indexOf("8090") != -1) isSctFlag = true; viewer.terrainProvider = new SuperMap3D.SuperMapTerrainProvider({ url: terrainURL, - isSct: isSctFlag, + isSct: isSctFlag, // 地形服务源自SuperMap iServer,本地发布时需设置isSct为true }); layerStore.updateLayer({ type: "terrain" }); @@ -238,7 +288,6 @@ function addTerrain(terrainURL: string) { viewer.scene.camera.flyTo({ destination: destination, }); - }); } @@ -248,7 +297,7 @@ function promiseWhen(promiseArray: any[], isSCP?: boolean) { promiseArray, function (layers: any) { // for (let i = 0; i < layers.length; i++) { - // layers[i]._visibleDistanceMax = 16000; + // layers[i]._visibleDistanceMax = 16000; // 设置图层最大可见距离 // } if (isSCP) { viewer.flyTo(layers[0]); @@ -257,200 +306,297 @@ function promiseWhen(promiseArray: any[], isSCP?: boolean) { }, function (e: any) { if (widget._showRenderLoopErrors) { - let title = GlobalLang.addScpFailed; + let title = $t("addScpFailed"); widget.showErrorPanel(title, undefined, e); } } ); } - // 添加wmts服务 function addWMTS(wmtsLayerUrl: string) { - if(!state.addWmtsFlag) return ; + if (!state.addWmtsFlag) return; + + viewer.shadows = false; // 关闭阴影,防止报错 + viewer.scene.colorCorrection.show = false; // 颜色开关也关闭,保险起见 - let rectangle:any,scaleDenominatorsList; - if(state.rectangleObj && state.wmtsLayer && state.scaleDenominatorsObj){ + let rectangle: any, scaleDenominatorsList: any; + if (state.rectangleObj && state.wmtsLayer) { rectangle = state.rectangleObj[state.wmtsLayer]; scaleDenominatorsList = state.scaleDenominatorsObj[state.wmtsLayer]; - }else{ + } else { return; } - let item:any = state.wmtsLayerOptions.find((item:any)=>item.value === state.wmtsLayer) + let item: any = state.wmtsLayerOptions.find( + (item: any) => item.value === state.wmtsLayer + ); let layerName = item.label; - let wmtsLayer = viewer.imageryLayers.addImageryProvider(new SuperMap3D.WebMapTileServiceImageryProvider({ - url: wmtsLayerUrl, - style: "default", - format: 'image/png', - layer: layerName, + let items = layerStore.wmtsLayerOption.filter((item: any) => { + return item.wmtsLayerUrl == wmtsLayerUrl && item.layerName == layerName; + }); + if (items.length > 0) { + // 该wmts服务已存在,不在重复添加 + message.warning($t("repeatAddWMTSTip")); + return; + } + + let wmtsRectangle = computedRectangle(rectangle); + viewer.shadows = false; // 关闭阴影,防止报错 + let wmtsLayer: any = undefined; + if (state.epsg == 3857) { + wmtsLayer = viewer.imageryLayers.addImageryProvider( + new SuperMap3D.WebMapTileServiceImageryProvider({ + url: wmtsLayerUrl, + style: "default", + format: "image/png", + layer: layerName, + tileMatrixSetID: state.tileMatrixSetID, + tilingScheme: new SuperMap3D.WebMercatorTilingScheme({ + rectangleSouthwestInMeters: new SuperMap3D.Cartesian2( + rectangle[0], + rectangle[1] + ), + rectangleNortheastInMeters: new SuperMap3D.Cartesian2( + rectangle[2], + rectangle[3] + ), + scaleDenominators: scaleDenominatorsList, + // customDPI: new SuperMap3D.Cartesian2(90.7142857142857, 90.7142857142857), + // orgin: new SuperMap3D.Cartesian3(10836627.447863173, 4071175.9917132845, 0.0), + }), + }) + ); + } else { + wmtsLayer = viewer.imageryLayers.addImageryProvider( + new SuperMap3D.WebMapTileServiceImageryProvider({ + url: wmtsLayerUrl, + style: "default", + format: "image/png", + layer: layerName, + tileMatrixSetID: state.tileMatrixSetID, + // tilingScheme: computedTilingScheme(wmtsRectangle,scaleDenominatorsList), + tilingScheme: new SuperMap3D.GeographicTilingScheme({ + // ellipsoid: SuperMap3D.Ellipsoid.WGS84, + // numberOfLevelZeroTilesX: 2, + // numberOfLevelZeroTilesY: 1, + rectangle: wmtsRectangle, + scaleDenominators: scaleDenominatorsList, + customDPI: new SuperMap3D.Cartesian2( + 90.7142857142857, + 90.7142857142857 + ), + }), + // tileMatrixLabels: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"]  // 设置加载的层级,一般是从0级开始加载,但是有的特殊数据是从1级开始加的 + }) + ); + } + + if (state.rectangleObj && state.wmtsLayer != "") { + let rectangle: any = state.rectangleObj[state.wmtsLayer]; + if (rectangle.length < 4) return; + let isGlobalBound = false; + rectangle.forEach((num) => { + if (Math.abs(num) > 178) { + // 也即是bounds为180附近,这种一般为全球地图,就不在求Bounds了 + viewer.flyTo(wmtsLayer); + isGlobalBound = true; + return; + } + }); + if (!isGlobalBound) { + let lng = (rectangle[0] + rectangle[2]) / 2; + let lat = (rectangle[1] + rectangle[3]) / 2; + viewer.scene.camera.flyTo({ + destination: new SuperMap3D.Cartesian3.fromDegrees(lng, lat, 5000), + duration: 1, + orientation: { + heading: 0, + roll: 0, + }, + }); + let wmtsImageLayerPosition = { + lng: lng, + lat: lat, + height: 5000, + }; + wmtsLayer.wmtsImageLayerPosition = wmtsImageLayerPosition; + } + } else { + viewer.flyTo(wmtsLayer); + } + + let wmtsLayerObj = { + wmtsLayerUrl: wmtsLayerUrl, + layerName: layerName, tileMatrixSetID: state.tileMatrixSetID, - tilingScheme: new SuperMap3D.GeographicTilingScheme({ - rectangle: SuperMap3D.Rectangle.fromDegrees(rectangle[0], rectangle[1], rectangle[2], rectangle[3]), - //ellipsoid: SuperMap3D.Ellipsoid.WGS84, - //numberOfLevelZeroTilesX: 1, - //numberOfLevelZeroTilesY: 1, - scaleDenominators: scaleDenominatorsList, - customDPI: new SuperMap3D.Cartesian2(90.7142857142857, 90.7142857142857), - }), - })); - - // wmtsLayer.alpha = 0.5; - viewer.flyTo(wmtsLayer); + wmtsImageLayerPosition: wmtsLayer.wmtsImageLayerPosition, + wmtsESPG: state.epsg, + rectangle: wmtsRectangle, + scaleDenominatorsList: scaleDenominatorsList, + }; + let list = layerStore.wmtsLayerOption.filter((item: any) => { + return ( + item.wmtsLayerUrl == wmtsLayerObj.wmtsLayerUrl && + item.layerName == wmtsLayerObj.layerName + ); + }); + if (list.length == 0) { + layerStore.wmtsLayerOption.push(wmtsLayerObj); + } + layerStore.updateLayer({ type: "imagery" }); } -// let shadedRelief1 = new SuperMap3D.WebMapTileServiceImageryProvider({ -// url: "http://172.16.15.203:8090/iserver/services/map-China400/wmts100", -// layer: 'China400', -// style: 'default', -// format: 'image/jpg', -// tileMatrixSetID: 'Custom_China400', -// // tilingScheme: new SuperMap3D.GeographicTilingScheme({ -// // ellipsoid: SuperMap3D.Ellipsoid.WGS84, //所用坐标系 -// // numberOfLevelZeroTilesX: 2, -// // numberOfLevelZeroTilesY: 1, -// // rectangle: new SuperMap3D.Rectangle.fromDegrees(-180, -90, 180, 90) -// // }), -// // tileMatrixLabels: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"] // 设置加载的层级,一般是从0级开始加载,但是有的特殊数据是从1级开始加的 -// // maximumLevel: 19, -// // credit : new SuperMap3D.Credit('U. S. Geological Survey') -// }); -// viewer.imageryLayers.addImageryProvider(shadedRelief1); +// 计算bound范围 +function computedRectangle(rectangle: any) { + if (state.epsg == 4549) { + let LowerCorner = proj4("EPSG:4549", "EPSG:4326", [ + rectangle[0], + rectangle[1], + ]); + let UpperCorner = proj4("EPSG:4549", "EPSG:4326", [ + rectangle[2], + rectangle[3], + ]); + return SuperMap3D.Rectangle.fromDegrees( + LowerCorner[0], + LowerCorner[1], + UpperCorner[0], + UpperCorner[1] + ); + } else if (rectangle[0] == 0) { + return undefined; + } else if (Math.abs(rectangle[0]) > 0 && Math.abs(rectangle[0]) <= 180) { + return SuperMap3D.Rectangle.fromDegrees( + rectangle[0], + rectangle[1], + rectangle[2], + rectangle[3] + ); + } else { + return undefined; + } +} let xmlDoc: any; // 获取xml信息 function getXmlInfo(xmlUrl?: string) { - window.axios - .get(xmlUrl) - .then((res: any) => { - let str = res.data; - //创建文档对象 - xmlDoc = new DOMParser().parseFromString(str, "text/xml"); - - // 获取必要参数 - state.wmtsLayerOptions = getXMLNode(xmlDoc, 'Layer'); - state.tileMatrixSetIDOptions = getXMLNode(xmlDoc, 'TileMatrixSet'); - state.rectangleObj = getRectangleObj(xmlDoc); - state.scaleDenominatorsObj = getScaleDenominatorsObj(xmlDoc); - }); + window.axios.get(xmlUrl).then((res: any) => { + let str = res.data; + //创建文档对象 + xmlDoc = new DOMParser().parseFromString(str, "text/xml"); + // 获取必要参数 + state.wmtsLayerOptions = getXMLNode(xmlDoc, "Layer"); + state.tileMatrixSetIDOptions = getXMLNode(xmlDoc, "TileMatrixSet"); + state.rectangleObj = getRectangleObj(xmlDoc); + state.scaleDenominatorsObj = getScaleDenominatorsObj(xmlDoc); + state.epsg = getEPSG(xmlDoc); + }); } // 指定标签返回xml数据 function getXMLNode(xmlDoc: any, Lable: string) { - - let finds = xmlDoc.querySelectorAll(Lable); //获取find节点 + let finds = xmlDoc.querySelectorAll(Lable); //获取find节点 let list: any = []; - switch (Lable) { case "Layer": - for (let i = 0; i < finds.length; i++) { //循环节点 + for (let i = 0; i < finds.length; i++) { + //循环节点 let finder = finds[i]; let nods = finder.childNodes; let label_title = nods[1]; let labelContent = label_title.textContent; - let TileMatrixSetIDList:any = []; - for(let j=0;j<nods.length;j++){ + let TileMatrixSetIDList: any = []; + for (let j = 0; j < nods.length; j++) { let nodChild = nods[j]; - if(nodChild.tagName === 'TileMatrixSetLink'){ + if (nodChild.tagName === "TileMatrixSetLink") { let TileMatrixSetID = nodChild.childNodes[1].textContent; TileMatrixSetIDList.push(TileMatrixSetID); } } list.push({ label: labelContent, - value: TileMatrixSetIDList[0] + value: TileMatrixSetIDList[0], }); } break; case "TileMatrixSet": - for (let i = 0; i < finds.length; i++) { //循环节点 + for (let i = 0; i < finds.length; i++) { + //循环节点 let finder = finds[i]; if (finder.childNodes.length === 1) { let textContent = finder.textContent; - let layerIndex = state.wmtsLayerOptions.findIndex((item:any)=>item.value === textContent); - if(layerIndex != -1){ + let layerIndex = state.wmtsLayerOptions.findIndex( + (item: any) => item.value === textContent + ); + if (layerIndex != -1) { list.push({ label: textContent, - value: textContent + value: textContent, }); } } } break; } - - return list; } -function getRectangleObj(xmlDoc: any):any { - let finds = xmlDoc.querySelectorAll('Layer'); //获取find节点 - let RectangleObj:any = {} - for (let i = 0; i < finds.length; i++) { //循环节点 +// 从xml中获取bound范围信息 +function getRectangleObj(xmlDoc: any): any { + let finds = xmlDoc.querySelectorAll("Layer"); //获取find节点 + let RectangleObj: any = {}; + for (let i = 0; i < finds.length; i++) { + //循环节点 let list: any = []; let finder = finds[i]; let nods = finder.childNodes; - let LowerCornerlnglat,UpperCornerlnglat,tag_BoundingBox; + let LowerCornerlnglat, UpperCornerlnglat, tag_BoundingBox; - tag_BoundingBox = nods[5]; + tag_BoundingBox = nods[5]; let LowerCorner = tag_BoundingBox.childNodes[1].textContent; let UpperCorner = tag_BoundingBox.childNodes[3].textContent; - LowerCornerlnglat = LowerCorner.split(' '); - UpperCornerlnglat = UpperCorner.split(' '); - if(Math.abs(LowerCornerlnglat[0]) > 180){ // 确保为经纬度坐标 - LowerCornerlnglat = []; - UpperCornerlnglat = []; - tag_BoundingBox = nods[7]; - let LowerCorner = tag_BoundingBox.childNodes[1].textContent; - let UpperCorner = tag_BoundingBox.childNodes[3].textContent; - LowerCornerlnglat = LowerCorner.split(' '); - UpperCornerlnglat = UpperCorner.split(' '); - } + LowerCornerlnglat = LowerCorner.split(" "); + UpperCornerlnglat = UpperCorner.split(" "); list.push(Number(LowerCornerlnglat[0]), Number(LowerCornerlnglat[1])); list.push(Number(UpperCornerlnglat[0]), Number(UpperCornerlnglat[1])); - - let key:any = state.wmtsLayerOptions[i]; - if(key.value){ + + let key: any = state.wmtsLayerOptions[i]; + if (key.value) { RectangleObj[key.value] = list; } - } return RectangleObj; } -function getScaleDenominatorsObj(xmlDoc: any):any { - let finds = xmlDoc.querySelectorAll('TileMatrixSet'); //获取find节点 - - let scaleDenominatorsObj:any = []; +// 从xml中获取比例尺信息 +function getScaleDenominatorsObj(xmlDoc: any): any { + let finds = xmlDoc.querySelectorAll("TileMatrixSet"); //获取find节点 + let scaleDenominatorsObj: any = []; let k = 0; - for (let i = 0; i < finds.length; i++) { //循环节点 + for (let i = 0; i < finds.length; i++) { + //循环节点 let finder = finds[i]; if (finder.childNodes.length > 1) { let NodeList = finder.childNodes; - // let TileMatrixList = NodeList.filter((node:any)=>{ - // node.nodeName === 'TileMatrix'; - // }) let key = NodeList[1].textContent; let list: any = []; let TileMatrixList: any[] = []; for (let j = 0; j < NodeList.length; j++) { let node = NodeList[j]; - if (node.nodeName === 'TileMatrix') { - TileMatrixList.push(node) + if (node.nodeName === "TileMatrix") { + TileMatrixList.push(node); } } TileMatrixList.forEach((TileMatrixNode: any) => { let ScaleDenominator = TileMatrixNode.childNodes[3].textContent; list.push(Number(ScaleDenominator)); }); - // let key:any = state.wmtsLayerOptions[k]; - // if(key && key.label){ - // scaleDenominatorsObj[key.label] = list; - // k++; - // } - let layerIndex = state.wmtsLayerOptions.findIndex((item:any)=>item.value === key); - if(layerIndex != -1){ + let layerIndex = state.wmtsLayerOptions.findIndex( + (item: any) => item.value === key + ); + if (layerIndex != -1) { scaleDenominatorsObj[key] = list; } } @@ -458,59 +604,74 @@ function getScaleDenominatorsObj(xmlDoc: any):any { return scaleDenominatorsObj; } -watch(()=>state.wmtsLayer,(val)=>{ - // if(state.tileMatrixSetID === '') return; - - - let layerIndex = state.wmtsLayerOptions.findIndex((item:any)=>item.value === val); - // let tileMatrixSetIDIndex = state.tileMatrixSetIDOptions.findIndex((item:any)=>item.value === state.tileMatrixSetID); - - // 当图层切换时,自动适配相关参数 - let tileMatrixSetID:any = state.tileMatrixSetIDOptions[layerIndex]; - state.tileMatrixSetID = tileMatrixSetID.value; - - // if(layerIndex != tileMatrixSetIDIndex){ - // message.warning('当前所选图层,与wmts服务标识符不匹配,请重新选择'); - // state.addWmtsFlag = false; - // }else{ - // message.success('图层与标识符匹配,可添加'); - // state.addWmtsFlag = true; - // } -}) - -// watch(()=>state.tileMatrixSetID,(val)=>{ -// if(state.wmtsLayer === '') return; - -// let tileMatrixSetIDIndex = state.tileMatrixSetIDOptions.findIndex((item:any)=>item.value === val); -// let layerIndex = state.wmtsLayerOptions.findIndex((item:any)=>item.value === state.wmtsLayer); +// 获取当前wmts的坐标系EPSG +function getEPSG(xmlDoc: any): any { + let finds = xmlDoc.querySelectorAll("Layer"); //获取find节点 + if (finds.length == 0) return; + let firstElement = finds[0]; + let epsgValue = -1; + if ( + firstElement.childNodes[5] && + firstElement.childNodes[5].localName.indexOf("Bounding") != -1 + ) { + let BoundingBox = firstElement.childNodes[5]; + let crs = BoundingBox.attributes.crs; + let crsValue = crs.nodeValue; + if (crsValue.indexOf("::") == -1) { + epsgValue = -1; + } else { + epsgValue = crsValue.split("::")[1]; + if (Number(epsgValue) > 10) return Number(epsgValue); + } + } -// if(layerIndex != tileMatrixSetIDIndex){ -// message.warning('当前所选图层,与wmts服务标识符不匹配,请重新选择'); -// state.addWmtsFlag = false; -// }else{ -// message.success('图层与标识符匹配,可添加'); -// state.addWmtsFlag = true; -// } -// }) + if ( + firstElement.childNodes[7] && + firstElement.childNodes[7].localName.indexOf("Bounding") != -1 + ) { + let BoundingBox = firstElement.childNodes[7]; + let crs = BoundingBox.attributes.crs; + let crsValue = crs.nodeValue; + if (crsValue.indexOf("::") == -1) { + epsgValue = -1; + } else { + epsgValue = crsValue.split("::")[1]; + } + } + return Number(epsgValue); +} -watch(()=>state.layerType,(val:string)=>{ - switch (val) { - case "S3M": - state.urlTip = `http://<server>:<port>/iserver/services/<component>/rest/realspace/datas/<layerName>/config`; - break; - case "Imagery": - state.urlTip = `http://<server>:<port>/realspace/services/<component>/rest/realspace/datas/<layerName>`; - break; - case "Terrain": - state.urlTip = `http://<server>:<port>/realspace/services/<component>/rest/realspace/datas/<layerName>`; - break; - case "WMTS": - state.urlTip = `http://<server>:<port>/iserver/services/{dataSourceName}/{dataSetName}`; - break; - default: - console.log("hello world"); +watch( + () => state.wmtsLayer, + (val) => { + // 当图层切换时,自动适配相关参数 + let layerIndex = state.wmtsLayerOptions.findIndex( + (item: any) => item.value === val + ); + let tileMatrixSetID: any = state.tileMatrixSetIDOptions[layerIndex]; + state.tileMatrixSetID = tileMatrixSetID.value; + } +); + +watch( + () => state.layerType, + (val: string) => { + switch (val) { + case "S3M": + state.urlTip = `http://<server>:<port>/iserver/services/<component>/rest/realspace/datas/<layerName>/config`; + break; + case "Imagery": + state.urlTip = `http://<server>:<port>/realspace/services/<component>/rest/realspace/datas/<layerName>`; + break; + case "Terrain": + state.urlTip = `http://<server>:<port>/realspace/services/<component>/rest/realspace/datas/<layerName>`; + break; + case "WMTS": + state.urlTip = `http://<server>:<port>/iserver/services/{serviceName}`; + break; + default: + break; + } } -}) +); </script> - -<style lang="scss" scoped></style> \ No newline at end of file diff --git a/SuperMap iEarth/src/package/addData/layer-custom/components/localData.vue b/SuperMap iEarth/src/package/addData/layer-custom/components/localData.vue index e859b555..e0a8d07d 100644 --- a/SuperMap iEarth/src/package/addData/layer-custom/components/localData.vue +++ b/SuperMap iEarth/src/package/addData/layer-custom/components/localData.vue @@ -2,100 +2,84 @@ <div class="row-item"> <div>KML</div> <div> - <n-input-group> - <n-input - class="add-input-border" - style=" margin-bottom: 0.1rem;width: 1.8rem" - :placeholder="$t('global.localFilePath')" - v-model:value="state.fileSrc" - /> - <n-button type="tertiary" @click="chooseFile" style="width:0.6rem">{{$t('global.chooseFile')}}</n-button> - </n-input-group> + <n-input-group> + <n-input + class="add-input-border" + style="width: 1.8rem" + :placeholder="$t('localFilePath')" + v-model:value="state.fileSrc" + /> + <n-button type="tertiary" @click="chooseFile" style="width: 0.6rem">{{ + $t("chooseFile") + }}</n-button> + </n-input-group> </div> - <input type="file" accept=".kml" id="localFile" style="display:none" ref="localKML_dom" /> + <input + type="file" + accept=".kml" + id="localFile" + style="display: none" + ref="localKML_dom" + /> </div> - <div class="btn-row-item1"> - <!-- <n-button - type="info" - color="#3499E5" - text-color="#fff" - class="ans-btn" - @click="chooseFile" - >{{$t('global.sure')}}</n-button - > --> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> + <div class="btn-row-item" style="margin-left: 0.95rem"> + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > </div> </template> <script lang="ts" setup> -import { ref,onMounted,reactive } from 'vue'; +import { ref, onMounted, reactive } from "vue"; let state = reactive({ - fileSrc: "", //文件地址 + fileSrc: "", //文件地址 }); + let localKML_dom = ref(); -// let blobKML; + +onMounted(() => { + fileChange(); +}); // 点击选择文件函数 function chooseFile() { - localKML_dom.value.click(); - // if(!blobKML) return; - // viewer.dataSources - // .add( - // SuperMap3D.KmlDataSource.load(blobKML, { - // camera: viewer.scene.camera, - // canvas: viewer.scene.canvas, - // }) - // ) - // .then(function (dataSource: any) { - // viewer.flyTo(dataSource); - // viewer.scene.layer = dataSource; - - // }); + localKML_dom.value.click(); } -function clear(){ - viewer.entities.removeAll(); - let dataSources = viewer.dataSources; - dataSources.removeAll(); - // blobKML = null; -}; + //文件夹改变文件触发 function fileChange() { - localKML_dom.value.addEventListener("change", function (evt) { - + localKML_dom.value.addEventListener("change", function (evt) { let target = evt.target as any; - if (!target) return + if (!target) return; let file = target.files[0]; if (!file) return; state.fileSrc = localKML_dom.value.value; - // blobKML = new Blob([file], { type: "" }); - - // // file转blob - const blob = new Blob([file], { type: "" }) + // file转blob + const blob = new Blob([file], { type: "" }); viewer.dataSources .add( SuperMap3D.KmlDataSource.load(blob, { camera: viewer.scene.camera, canvas: viewer.scene.canvas, - // clampToGround:true, - // sourceUri:"./Resource/ylw-pushpin.png", - // sourceUri:"http://www.opengis.net/kml/2.2", }) ) .then(function (dataSource: any) { viewer.flyTo(dataSource); viewer.scene.layer = dataSource; }); - }); + }); } -onMounted(() => { - fileChange(); -}) - +// 清除 +function clear() { + viewer.entities.removeAll(); + let dataSources = viewer.dataSources; + dataSources.removeAll(); +} </script> -<style lang="scss" scoped> -</style> - - diff --git a/SuperMap iEarth/src/package/addData/layer-custom/components/myService.vue b/SuperMap iEarth/src/package/addData/layer-custom/components/myService.vue index 04f54716..9de6702f 100644 --- a/SuperMap iEarth/src/package/addData/layer-custom/components/myService.vue +++ b/SuperMap iEarth/src/package/addData/layer-custom/components/myService.vue @@ -9,12 +9,8 @@ </template> <script lang="ts" setup> -import { ref, onMounted, reactive } from "vue"; -import { - getRootUrl, - isIportalProxyServiceUrl, - getHostName, -} from "@/tools/iportal/portalTools"; +import { ref, onMounted } from "vue"; +import { getRootUrl } from "@/tools/iportal/portalTools"; import { useMessage } from "naive-ui"; const message = useMessage(); @@ -24,37 +20,37 @@ let columns = ref([ type: "selection", }, { - title: "名称", + title: $t("name"), key: "name", }, { - title: "类型", + title: $t("type"), key: "type", }, { - title: "更新时间", + title: $t("updateTime"), key: "time", }, ]); let myServiceData: any = ref([]); - let iportalToken = ref( "&token=BTKYtyi2bsoLNUA2xn7nRg3V9IfETNnmskQhpsmCz8Q5ClFYCWGAMJSX1ESedBqCF1jFmHLY_20jhpHssvwNQg.." ); + onMounted(() => { initMyServiceData(); }); -// 初始化数据 只请求三维场景数据 + +// 初始化变量 只请求三维场景数据 function initMyServiceData() { - // let requestUrl = "/gateway/catalog/resource/search.json"; let requestUrl = "/gateway/catalog/resource/search.json?searchType=MY_RES&resourceType=SERVICE&pageSize=1000"; let rootUrl = getRootUrl(); let url = rootUrl.includes("iportal") ? rootUrl + requestUrl : "/iportal" + requestUrl + iportalToken.value; - let realspaceArr: any = []; + // get请求参数没有生效 后续在看怎么改 window.axios .get(url, { @@ -64,11 +60,9 @@ function initMyServiceData() { }) .then((dataObj: any) => { dataObj.data.content.map((item: any) => { - // resourceSubType: "REALSPACE" if (item.resourceSubType == "REALSPACE") { // 通过场景id去请求对应的数据 let scenePostUrl = "/web/services/" + item.resourceId + ".json"; - // let sceneurl = rootUrl.includes("iportal") let sceneurl = rootUrl.includes("iportal") ? rootUrl + scenePostUrl : "/iportal" + scenePostUrl; @@ -110,16 +104,6 @@ function handleCheck(rowKeys: any) { return; } let url = rowKeys; - let promiseArray = [ - window.viewer.scene.open(url[0], undefined, { autoSetView: true }), - ]; + window.viewer.scene.open(url[0], undefined, { autoSetView: true }); } </script> - -<style lang="scss" scoped> - -</style> - - - - diff --git a/SuperMap iEarth/src/package/addData/layer-custom/components/scene.vue b/SuperMap iEarth/src/package/addData/layer-custom/components/scene.vue index 64122f57..9c7f3fb6 100644 --- a/SuperMap iEarth/src/package/addData/layer-custom/components/scene.vue +++ b/SuperMap iEarth/src/package/addData/layer-custom/components/scene.vue @@ -1,25 +1,23 @@ <template> <div class="row-item"> - <span>{{$t('global.address')}}</span> - - + <span>{{ $t("address") }}</span> <n-tooltip placement="top-end" trigger="hover"> - <template #trigger> - <n-input - class="add-input-border" - v-model:value="sceneUrl" - type="text" - style="width: 2.4rem" - :title="sceneUrl" - @input="handleChange" - /> - </template> - {{urlTip}} - </n-tooltip> + <template #trigger> + <n-input + class="add-input-border" + v-model:value="sceneUrl" + type="text" + style="width: 2.4rem" + :title="sceneUrl" + @input="handleChange" + /> + </template> + {{ urlTip }} + </n-tooltip> </div> - <div style="margin-left: 0.62rem; margin-bottom: 0.1rem"> - <n-checkbox v-model:checked="token"> {{$t('global.addToken')}} </n-checkbox> + <div style="margin-left: 0.95rem; margin-bottom: 0.1rem"> + <n-checkbox v-model:checked="token"> {{ $t("addToken") }} </n-checkbox> <n-input style="margin-top: 0.1rem; width: 2.4rem" v-if="token" @@ -29,25 +27,35 @@ /> </div> - <div class="btn-row-item1" > + <div class="btn-row-item" style="margin-left: 0.95rem"> <n-button type="info" color="#3499E5" text-color="#fff" class="ans-btn" @click="openScene" - >{{$t('global.sure')}}</n-button + >{{ $t("sure") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </template> <script lang="ts" setup> import { ref } from "vue"; +import { useMessage } from "naive-ui"; import layerManagement from "@/tools/layerManagement"; +const message = useMessage(); + +let urlTip = + "http://<server>:<port>/realspace/services/<component>/rest/realspace"; let sceneUrl = ref(""); -let urlTip = "http://<server>:<port>/realspace/services/<component>/rest/realspace"; let sceneToken = ref(""); let token = ref(false); @@ -55,36 +63,18 @@ let token = ref(false); function handleChange() { // 检查地址是否正确 - 使用正则严格校验 if (sceneUrl.value.indexOf("rest/realspace") != -1) { - // message.success(langGlobal.urlCheckedsuccess); + message.success($t("urlCheckedsuccess")); } //处理realspace带有/ - if (sceneUrl.value.slice(-14) === "rest/realspace") { - let url = sceneUrl.value.split("rest/realspace")[0] + "rest/realspace"; - let scenesUrl = url + "/scenes.json"; - - // console.log(`向${scenesUrl}发送请求,获取name`) - - // // 有跨域,之后看看 - // let sceneListPromise = window.axios.get(scenesUrl, { - // //需要cookie验证 - // withCredentials: true - // }); - - // sceneListPromise.then((results:any) => { - // console.log("results.data:", results.data) - // }); - } + // if (sceneUrl.value.slice(-14) === "rest/realspace") { + // let url = sceneUrl.value.split("rest/realspace")[0] + "rest/realspace"; + // } } -function clear(){ - sceneUrl.value = ''; - sceneToken.value = ''; - token.value = false; -}; -let promiseArray: any[] = []; + +// 打开场景服务 function openScene() { if (sceneUrl.value == null || sceneUrl.value == "") { - // message.warning(langGlobal.urlIsNull); return; } @@ -99,11 +89,20 @@ function openScene() { ); } - layerManagement.openScene(sceneUrl.value, "REALSPACE"); - + let promiseResult = layerManagement.openScene( + sceneUrl.value, + "", + "REALSPACE" + ); + SuperMap3D.when(promiseResult, function (layers: any) { + message.success($t("openSceneSuccess")); + }); } - +// 清除 +function clear() { + sceneUrl.value = ""; + sceneToken.value = ""; + token.value = false; +} </script> -<style lang="scss" scoped> -</style> diff --git a/SuperMap iEarth/src/package/addData/layer-custom/index.vue b/SuperMap iEarth/src/package/addData/layer-custom/index.vue index 3f101660..e1517315 100644 --- a/SuperMap iEarth/src/package/addData/layer-custom/index.vue +++ b/SuperMap iEarth/src/package/addData/layer-custom/index.vue @@ -1,23 +1,23 @@ <template> <!-- 自定义服务 --> <div class="custom-content"> - <div class="row-item"> - <span class="">{{$t('global.type')}}</span> - <div class="btn-list"> - <div - class="btn" - :class="item.isSelect ? 'select-btn' : ''" - v-for="(item, index) in comList" - :key="index" - @click="changeItem(item)" - > - {{ item.name }} + <div class="row-item"> + <span class="">{{ $t("type") }}</span> + <div class="btn-list"> + <div + class="btn" + :class="item.isSelect ? 'select-btn' : ''" + v-for="(item, index) in comList" + :key="index" + @click="changeItem(item)" + > + {{ item.name }} + </div> </div> </div> - </div> - <KeepAlive> - <component :is="currentItem.com"></component> - </KeepAlive> + <KeepAlive> + <component :is="currentItem.com"></component> + </KeepAlive> </div> </template> @@ -26,31 +26,24 @@ import { reactive, markRaw } from "vue"; import layers from "./components/layers.vue"; import scene from "./components/scene.vue"; import localData from "./components/localData.vue"; -// import iEarthtest from "./components/iEarthtest.vue"; -// import myService from "./components/myService.vue"; // 使用vue3 setUp实现动态组件 let comList = reactive([ { - name: GlobalLang.layer, + name: $t("layer"), com: markRaw(layers), isSelect: true, }, { - name: GlobalLang.scene, + name: $t("scene"), com: markRaw(scene), isSelect: false, }, { - name: GlobalLang.localData, + name: $t("localData"), com: markRaw(localData), isSelect: false, }, - // { - // name: "测试", - // com: markRaw(iEarthtest), - // isSelect: false, - // }, ]); // 默认项目 @@ -74,29 +67,16 @@ function changeItem(item: any) { </script> <style lang="scss" scoped> -.custom-content{ - padding-left: 0.12rem; - padding-right: 0.12rem; - box-sizing: border-box; - .btn-list { - width: 2.4rem; - display: flex; - cursor: pointer; - .btn { - width: 25%; - height: 0.26rem; - line-height: 0.26rem; - text-align: center; +.custom-content { + padding-right: 0.12rem; + box-sizing: border-box; + + .btn-row-item { + margin-left: 0.75rem; } - .select-btn { - border-radius: 0.02rem; - color: #3499e5; - background: rgba(255, 255, 255, 0.15); + + .btn { + padding: 0.03rem 0.1rem; } } -.btn-row-item { - margin-left: 0.75rem; -} -} - -</style> \ No newline at end of file +</style> diff --git a/SuperMap iEarth/src/package/addData/layer-mine/index.ts b/SuperMap iEarth/src/package/addData/layer-mine/index.ts index 8d24ff75..769ac49b 100644 --- a/SuperMap iEarth/src/package/addData/layer-mine/index.ts +++ b/SuperMap iEarth/src/package/addData/layer-mine/index.ts @@ -1,3 +1,3 @@ -import SmPortalService from './index.vue'; +import SmPortalService from './layerMine.vue'; export default SmPortalService; diff --git a/SuperMap iEarth/src/package/addData/layer-mine/index.vue b/SuperMap iEarth/src/package/addData/layer-mine/layerMine.vue similarity index 72% rename from SuperMap iEarth/src/package/addData/layer-mine/index.vue rename to SuperMap iEarth/src/package/addData/layer-mine/layerMine.vue index 1cfd1ba4..68343964 100644 --- a/SuperMap iEarth/src/package/addData/layer-mine/index.vue +++ b/SuperMap iEarth/src/package/addData/layer-mine/layerMine.vue @@ -1,15 +1,33 @@ <template> <div class="layer-terrain-container"> <div id="portalServiceTable"> - <n-data-table size="small" :columns="state.columns" :data="state.portalServiceList" :pagination="pagination" - flex-height class="flex-1-hidden" v-model:checked-row-keys="state.checkedRowKeys" /> + <n-data-table + size="small" + :columns="state.columns" + :data="state.portalServiceList" + :pagination="pagination" + flex-height + class="flex-1-hidden" + v-model:checked-row-keys="state.checkedRowKeys" + /> </div> - <div class="btn-row-item1 opration"> - <n-button type="info" color="#3499E5" text-color="#fff" class="ans-btn" - @click="addService">{{ $t('global.sure') }}</n-button> - <n-button class="btn-secondary" @click="cancle" color="rgba(255, 255, 255, 0.65)" - ghost>{{ $t('global.cancle') }}</n-button> + <div class="btn-row-item opration"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + class="ans-btn" + @click="addService" + >{{ $t("sure") }}</n-button + > + <n-button + class="btn-secondary" + @click="cancle" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("cancle") }}</n-button + > </div> </div> </template> @@ -17,65 +35,70 @@ <script lang="ts" setup> import { onMounted, reactive } from "vue"; import { useMessage } from "naive-ui"; -import { getRootUrl, isIportalProxyServiceUrl, getHostName } from "@/tools/iportal/portalTools"; -import { IportalStoreCreate } from "@/store/index"; -import { useLayerStore } from "@/store/layerStore"; +import { IportalStoreCreate } from "@/store/iportalManage/index"; +import { useLayerStore } from "@/store/layerStore/layer"; +import { + getRootUrl, + isIportalProxyServiceUrl, + getHostName, +} from "@/tools/iportal/portalTools"; const IportalStore = IportalStoreCreate(); -const message = useMessage(); const layerStore = useLayerStore(); +const message = useMessage(); -let widget = viewer.cesiumWidget; +let widget: any = viewer.cesiumWidget; onMounted(() => { init(); - message.success(GlobalLang.getData); + message.success($t("getData")); }); + type stateType = { - portalServiceList: any, - columns: any, - tableData: any, - checkedRowKeys: any -} + portalServiceList: any; + columns: any; + tableData: any; + checkedRowKeys: any; +}; let state = reactive<stateType>({ portalServiceList: [], columns: [ { - type: 'selection', + type: "selection", multiple: false, - align: 'center', + align: "center", disabled: (rowdata) => { return rowdata.disabled ? true : false; - } + }, }, { key: "name", - title: GlobalLang.serviceName, - align: 'center' + title: $t("serviceName"), + align: "center", }, { key: "resourceSubType", - title: GlobalLang.resourceSubType, - align: 'center' + title: $t("resourceSubType"), + align: "center", }, { key: "updateTime", - title: GlobalLang.updateTime, - align: 'center' + title: $t("updateTime"), + align: "center", }, { key: "url", - title: GlobalLang.serviceUrl, - align: 'center', + title: $t("serviceUrl"), + align: "center", ellipsis: { - tooltip: true - } + tooltip: true, + }, }, ], tableData: [], checkedRowKeys: ["1"], -}) +}); // 初始化并获取数据 function init() { @@ -84,16 +107,15 @@ function init() { getRootUrl() + "gateway/catalog/resource/search.json?searchType=MY_RES&resourceType=SERVICE"; - console.log("searchUrl-mine:", searchUrl); + if (window.iEarthConsole) console.log("searchUrl-mine:", searchUrl); window.axios - //todo //需要withCredentials验证否? .get(searchUrl, { withCredentials: IportalStore.isPortal }) - .then(function (response) { + .then(function (response: any) { let data = response.data.content; - console.log("response-mine:", response); - data.forEach(item => { + if (window.iEarthConsole) console.log("response-mine:", response); + data.forEach((item: any) => { let sceneID = item.resourceId; let highestpermissionurl = @@ -107,39 +129,34 @@ function init() { let noPermission = false; window.axios .get(highestpermissionurl, { - withCredentials: IportalStore.isPortal + withCredentials: IportalStore.isPortal, }) - .then(function (responseHigh) { + .then(function (responseHigh: any) { if (arrays.indexOf(responseHigh.data[sceneID]) < 0) { noPermission = true; } - let scenePostUrl = getRootUrl() + "web/services/" + item.resourceId + ".json"; - window.axios .get(scenePostUrl, { withCredentials: IportalStore.isPortal }) .then(function (responseScene) { - let sceneUrl = - responseScene.data.proxiedUrl || - responseScene.data.linkPage; - + responseScene.data.proxiedUrl || responseScene.data.linkPage; let disabled = noPermission || item.resourceSubType != "REALSPACE"; //是否禁用选择 - - // let disabled = noPermission; - state.portalServiceList.push({ key: item.name, name: item.name, resourceSubType: item.resourceSubType, updateTime: dateDiff(item.updateTime), url: sceneUrl, - disabled: disabled + disabled: disabled, }); - - console.log(" state.portalServiceList:", state.portalServiceList); + if (window.iEarthConsole) + console.log( + " state.portalServiceList:", + state.portalServiceList + ); }); }); }); @@ -149,12 +166,11 @@ function init() { // 打开保存的服务 function addService() { let selecteditems = state.portalServiceList.filter((item: any) => { - // item.key === state.checkedRowKeys[0]; 必须return return item.key === state.checkedRowKeys[0]; - }) + }); if (viewer) { - selecteditems.forEach(item => { + selecteditems.forEach((item) => { let url = item.url + "/realspace"; let promiseArray: any = []; @@ -204,7 +220,7 @@ function promiseWhen(promiseArray, isSCP) { }, function (e) { if (widget._showRenderLoopErrors) { - var title = GlobalLang.scpUrlErrorMsg; + var title = $t("scpUrlErrorMsg"); widget.showErrorPanel(title, undefined, e); } } @@ -228,7 +244,7 @@ const pagination = reactive({ onUpdatePageSize: (pageSize: number) => { pagination.pageSize = pageSize; pagination.page = 1; - } + }, }); /** 时间倒序,多少小时之前 @@ -277,28 +293,26 @@ function dateDiff(timestamp) { let date = new Date(timestamp); return ( date.getFullYear() + - GlobalLang.yeear + + $t("yeear") + zero(date.getMonth() + 1) + - GlobalLang.month + + $t("month") + zero(date.getDate()) + - GlobalLang.day + $t("day") ); })(); } else if (monthC >= 1) { - return parseInt(monthC) + GlobalLang.monthsAgo; + return parseInt(monthC) + $t("monthsAgo"); } else if (weekC >= 1) { - return parseInt(weekC) + GlobalLang.weeksAgo; + return parseInt(weekC) + $t("weeksAgo"); } else if (dayC >= 1) { - return parseInt(dayC) + GlobalLang.daysAgo; + return parseInt(dayC) + $t("daysAgo"); } else if (hourC >= 1) { - return parseInt(hourC) + GlobalLang.hoursAgo; + return parseInt(hourC) + $t("hoursAgo"); } else if (minC >= 1) { - return parseInt(minC) + GlobalLang.minutesAgo; + return parseInt(minC) + $t("minutesAgo"); } - return GlobalLang.secondsAgo; + return $t("secondsAgo"); } - - </script> <style lang="scss" scoped> @@ -308,7 +322,7 @@ function dateDiff(timestamp) { .ItemBox { width: 30%; - color: $--SM--FontColor-Sub; + color: rgba(255, 255, 255, 0.85); margin-bottom: 0.07rem; margin-right: 0.12rem; box-sizing: border-box; @@ -342,12 +356,8 @@ function dateDiff(timestamp) { } #portalServiceTable { - // position: fixed; - // top: 66%; - // left: 5%; - // width: 90%; margin-right: 0.1rem; - height: 230px; + height: 2.3rem; z-index: 999999; background-color: rgb(29, 29, 17); opacity: 0.5; @@ -362,11 +372,7 @@ function dateDiff(timestamp) { } .opration { - // display: flex; - // justify-content: space-between; margin-top: 0.1rem; - margin-left: 60%; - // margin-left: 1.95rem; - // margin-right: 0.1rem; + margin-left: 56%; } -</style> \ No newline at end of file +</style> diff --git a/SuperMap iEarth/src/package/addData/layer-service/index.ts b/SuperMap iEarth/src/package/addData/layer-service/index.ts index a9b0494d..0697c997 100644 --- a/SuperMap iEarth/src/package/addData/layer-service/index.ts +++ b/SuperMap iEarth/src/package/addData/layer-service/index.ts @@ -1,3 +1,3 @@ -import SmLayerService from './index.vue'; +import SmLayerService from './layerService.vue'; export default SmLayerService; diff --git a/SuperMap iEarth/src/package/addData/layer-service/index.vue b/SuperMap iEarth/src/package/addData/layer-service/index.vue deleted file mode 100644 index bd61455f..00000000 --- a/SuperMap iEarth/src/package/addData/layer-service/index.vue +++ /dev/null @@ -1,100 +0,0 @@ -<template> - <!-- 公共服务 --> - <n-scrollbar style="max-height: 3.42rem"> - <div class="layer-server-container"> - <div - v-for="(item, index) in layerStore.layerServiceData.publicServiceList" - class="ItemBox" - :class="item.chooseType ? 'isSelect' : ''" - :key="index" - @click="addPublicService(item)" - > - <div class="img-box"> - <img class="img" :src="item.thumbnail" alt="" /> - </div> - <span>{{ $t(item.name) }}</span> - </div> - </div> - </n-scrollbar> -</template> - -<script lang="ts" setup> -import { useMessage } from "naive-ui"; -import { useLayerStore } from "@/store/layerStore"; -import { usePanelStore } from "@/store"; -import layerManagement from "@/tools/layerManagement"; - -// 弹窗提示 -const message = useMessage(); -const layerStore = useLayerStore(); -const panelStore = usePanelStore(); -// 添加公共服务:三类 -function addPublicService(item: any) { - if (item.chooseType) { - message.warning("请勿重复添加!"); - return; - } - - layerStore.SelectedOptions.publicService.push(item.name); // 存入已选择的公共服务选项 - let type = item.type; - switch (type) { - case "REALSPACE": - layerManagement.openScene(item.proxiedUrl, "REALSPACE",item.name); - item.chooseType = true; - break; - case "MVT": - layerManagement.addMvtLayer(item.proxiedUrl, item.VectorTilesMapName, "MVT"); - item.chooseType = true; - break; - case "ThematicMap": - layerManagement.addBaiMo(item.proxiedUrl, item.name, "ThematicMap"); - item.chooseType = true; - break; - } - panelStore.closeRightToolPanel(1);// 1为关闭左侧面板 -} - -</script> - -<style lang="scss" scoped> -.layer-server-container { - display: flex; - flex-wrap: wrap; - - .ItemBox { - width: 30%; - color: $--SM--FontColor-Sub; - margin-bottom: 0.07rem; - margin-right: 0.12rem; - box-sizing: border-box; - cursor: pointer; - - .img-box { - width: 100%; - height: 0.84rem; - border-radius: 0.05rem; - overflow: hidden; - margin-bottom: 0.04rem; - border: 0.02rem solid #3498e500; - box-sizing: border-box; - .img { - width: 100%; - height: 100%; - object-fit: cover; - } - } - } - .ItemBox:nth-child(3n) { - margin-right: 0; - } - .isSelect { - color: rgba(52, 153, 229, 0.85); - - .img-box { - box-sizing: border-box; - border: 0.02rem solid #3499e5; - object-fit: cover; - } - } -} -</style> \ No newline at end of file diff --git a/SuperMap iEarth/src/package/addData/layer-service/layerService.vue b/SuperMap iEarth/src/package/addData/layer-service/layerService.vue new file mode 100644 index 00000000..5f4d0124 --- /dev/null +++ b/SuperMap iEarth/src/package/addData/layer-service/layerService.vue @@ -0,0 +1,69 @@ +<template> + <!-- 公共服务 --> + <n-scrollbar style="max-height: 3.42rem"> + <div class="addData-data-container"> + <div + v-for="(item, index) in publicServiceList" + class="ItemBox" + :class="item.chooseType ? 'isSelect' : ''" + :key="index" + @click="addPublicService(item)" + > + <div class="img-box"> + <img class="img" :src="item.thumbnail" alt="" /> + </div> + <div class="img-box-text">{{ $t(item.name) }}</div> + </div> + </div> + </n-scrollbar> +</template> + +<script lang="ts" setup> +import { useMessage } from "naive-ui"; +import { useLayerStore } from "@/store/layerStore/layer"; +import { usePanelStore } from "@/store"; +import layerManagement from "@/tools/layerManagement"; + +// 弹窗提示 +const message = useMessage(); +const layerStore = useLayerStore(); +const panelStore = usePanelStore(); +const publicServiceList = layerStore.layerServiceData.publicServiceList; + +// 添加公共服务:三类 +function addPublicService(item: any) { + if (item.chooseType) { + message.warning($t("repeatAddTip")); + return; + } + + layerStore.SelectedOptions.publicService.push(item.name); // 存入已选择的公共服务选项 + let type = item.type; + switch (type) { + case "REALSPACE": + layerManagement.openScene(item.proxiedUrl, item.name, "REALSPACE"); + item.chooseType = true; + break; + case "MVT": + layerManagement.addMvtLayer( + item.proxiedUrl, + item.VectorTilesMapName, + "MVT" + ); + item.chooseType = true; + break; + case "ThematicMap": + layerManagement.addBaiMo(item.proxiedUrl, item.name, "ThematicMap"); + item.chooseType = true; + break; + } + panelStore.closeRightToolPanel(1); // 1为关闭左侧面板 +} +</script> + +<style lang="scss" scoped> +.img-box-text { + text-align: center; + font-size: 0.14rem; +} +</style> diff --git a/SuperMap iEarth/src/package/addData/layer-terrain/index.ts b/SuperMap iEarth/src/package/addData/layer-terrain/index.ts index 82ca2ec7..804addd9 100644 --- a/SuperMap iEarth/src/package/addData/layer-terrain/index.ts +++ b/SuperMap iEarth/src/package/addData/layer-terrain/index.ts @@ -1,3 +1,3 @@ -import SmLayerTerrain from './index.vue'; +import SmLayerTerrain from './layerTerrain.vue'; export default SmLayerTerrain; diff --git a/SuperMap iEarth/src/package/addData/layer-terrain/index.vue b/SuperMap iEarth/src/package/addData/layer-terrain/layerTerrain.vue similarity index 53% rename from SuperMap iEarth/src/package/addData/layer-terrain/index.vue rename to SuperMap iEarth/src/package/addData/layer-terrain/layerTerrain.vue index e1458650..bf6b04e6 100644 --- a/SuperMap iEarth/src/package/addData/layer-terrain/index.vue +++ b/SuperMap iEarth/src/package/addData/layer-terrain/layerTerrain.vue @@ -1,8 +1,7 @@ <template> - <div class="layer-terrain-container"> + <div class="addData-data-container"> <div - v-for="(item, index) in layerStore.layerServiceData - .onlineTerrainLayerList" + v-for="(item, index) in onlineTerrainLayerList" :key="index" class="ItemBox" :class="item.chooseType ? 'isSelect' : ''" @@ -11,25 +10,37 @@ <div class="img-box"> <img :src="item.thumbnail" class="img" alt="" /> </div> - <span>{{ $t(item.title) }}</span> + <div class="img-box-text">{{ $t(item.name) }}</div> </div> </div> </template> <script lang="ts" setup> +import { reactive } from "vue"; import { useMessage } from "naive-ui"; -import { useLayerStore } from "@/store/layerStore"; +import { useLayerStore } from "@/store/layerStore/layer"; +import { usePanelStore } from "@/store"; -const message = useMessage(); +const panelStore = usePanelStore(); const layerStore = useLayerStore(); +const message = useMessage(); +const onlineTerrainLayerList = + layerStore.layerServiceData.onlineTerrainLayerList; + +let state = reactive({ + terrainToken: layerStore.configToken.TiandituToken, // 天地图token, +}); // 添加地形 function addTerrainLayer(item: any) { - if (item.chooseType) { - message.warning("请勿重复添加!"); + let index = layerStore.SelectedOptions.onlineTerrain.indexOf(item.name); + if (index != -1) { + message.warning($t("repeatAddTip")); return; } - layerStore.SelectedOptions.onlineTerrain.push(item.name); // 存入已选择的地形服务选项 + + layerStore.SelectedOptions.onlineTerrain = [item.name]; // 存入已选择的地形服务选项 + let type = item.type; let terrainUrl = item.proxiedUrl; switch (type) { @@ -41,7 +52,7 @@ function addTerrainLayer(item: any) { break; case "tianDiTuTerrain": viewer.terrainProvider = new SuperMap3D.TiandituTerrainProvider({ - token: "e90d56e5a09d1767899ad45846b0cefd", + token: state.terrainToken, }); break; case "supermapOnlineTerrain": @@ -53,6 +64,9 @@ function addTerrainLayer(item: any) { break; } viewer.terrainProvider.name = item.name; //保存在线地图名称 + viewer.terrainProvider.bindName = item.name; //保存在线地图名称 + + // 地形面板中只能有一个被选中 layerStore.layerServiceData.onlineTerrainLayerList.map((item) => { if (item.proxiedUrl == terrainUrl) { item.chooseType = true; @@ -60,43 +74,20 @@ function addTerrainLayer(item: any) { item.chooseType = false; } }); - layerStore.updateLayer({ type: "terrain", label: item.name }); + + layerStore.updateLayer({ type: "terrain", label: $t(item.name) }); + + panelStore.closeRightToolPanel(1); // 1为关闭左侧面板 } </script> <style lang="scss" scoped> -.layer-terrain-container { - display: flex; - flex-wrap: wrap; - - .ItemBox { - width: 30%; - color: $--SM--FontColor-Sub; - margin-bottom: 0.07rem; - margin-right: 0.12rem; - box-sizing: border-box; - cursor: pointer; +.img-box-text { + text-align: center; + font-size: 0.14rem; +} - .img-box { - width: 100%; - height: 0.84rem; - border-radius: 0.05rem; - overflow: hidden; - margin-bottom: 0.04rem; - .img { - width: 100%; - height: 100%; - } - } - } - .ItemBox:nth-child(3n) { - margin-right: 0; - } - .isSelect { - color: #3499e5; - .img-box { - border: 0.02rem solid #3499e5; - } - } +.addData-data-container { + margin-bottom: -0.1rem; } -</style> \ No newline at end of file +</style> diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-facadeImage/facadeImage.vue b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-facadeImage/facadeImage.vue new file mode 100644 index 00000000..fed700f5 --- /dev/null +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-facadeImage/facadeImage.vue @@ -0,0 +1,191 @@ +<template> + <!-- 立面图 --> + <div class="row-item"> + <span>{{ $t("maxHeight") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.2rem" + v-model:value="state.maxHeight" + :step="10" + :min="1" + :max="1000" + /> + <n-input-number + v-model:value="state.maxHeight" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + placeholder="" + size="small" + /> + <span class="slider-unit">{{ $t("meter") }}</span> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("maxDistence") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.2rem" + v-model:value="state.maxDistence" + :step="10" + :min="1" + :max="1000" + /> + <n-input-number + v-model:value="state.maxDistence" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + placeholder="" + size="small" + /> + <span class="slider-unit">{{ $t("meter") }}</span> + </div> + </div> + + <div class="btn-row-item2"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="drawRegion" + style="margin-right: 0.1rem" + >{{ $t("Draw") }}</n-button + > + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="executeImage" + style="margin-right: 0.1rem" + >{{ $t("Plot") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> +</template> + +<script setup lang="ts"> +import { reactive, watch, onMounted, onBeforeUnmount } from "vue"; + +type stateType = { + maxHeight: number; // 最大高度 + maxDistence: number; // 最远距离 +}; + +let state = reactive<stateType>({ + maxHeight: 100, + maxDistence: 500, +}); + +// 初始化变量 +const scene = viewer.scene; +let facade = new SuperMap3D.Facade(scene); +let handlerLine = new SuperMap3D.DrawHandler(viewer, SuperMap3D.DrawMode.Line); + +// 组件初始化 +function init() { + if (!viewer) return; + facade.build(); +} + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(); +}); + +handlerLine.activeEvt.addEventListener((isActive: any) => { + if (isActive == true) { + window.viewer.enableCursorStyle = false; + window.viewer._element.style.cursor = ""; + document.body.classList.add("drawCur"); + } else { + window.viewer.enableCursorStyle = true; + document.body.classList.remove("drawCur"); + } +}); + +handlerLine.drawEvt.addEventListener(function (result: any) { + result.object.show = false; + let startPoint = result.object.positions[0]; + let endPoint = result.object.positions[1]; + facade.startPoint = startPoint; + facade.endPoint = endPoint; +}); + +// 绘制立方图范围 +function drawRegion() { + handlerLine.activate(); +} + +// 执行出图,并下载 +function executeImage() { + facade.readyPromise.then(function (base64data: any) { + download(base64data); + }); +} + +// 将Image转换成Canvas +function convertImageToCanvas(image: any) { + let canvas: any = document.createElement("canvas"); + if (canvas) { + canvas.width = image.width; + canvas.height = image.height; + canvas.getContext("2d").drawImage(image, 0, 0); + return canvas; + } +} + +// 将结果转成Image图表,并下载 +function download(base64data: any) { + let image = new Image(); + image.src = base64data; + image.onload = function () { + let canvas = convertImageToCanvas(image); + let url = canvas.toDataURL("image/jpeg"); + let a = document.createElement("a"); + let event = new MouseEvent("click"); + a.download = new Date().getTime() + ".jpg"; // 指定下载图片的名称 + a.href = url; + a.dispatchEvent(event); // 触发超链接的点击事件 + }; +} + +// 清除 +function clear() { + facade.clear(); + handlerLine.clear(); +} + +watch( + () => state.maxHeight, + (val: any) => { + if (val === "" || val < 0) { + // 避免删除导致崩溃 + val = 0; + } + facade.maxHeight = state.maxHeight; + } +); +watch( + () => state.maxDistence, + (val: any) => { + if (val === "" || val < 0) { + // 避免删除导致崩溃 + val = 0; + } + facade.farDistance = state.maxDistence; + } +); +</script> diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-facadeImage/index.ts b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-facadeImage/index.ts new file mode 100644 index 00000000..36541725 --- /dev/null +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-facadeImage/index.ts @@ -0,0 +1,3 @@ +import SmAnalyseFacadeImage from "./facadeImage.vue"; + +export default SmAnalyseFacadeImage; diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/index.ts b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/index.ts index 649f8456..fb61bbae 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/index.ts @@ -1,3 +1,3 @@ -import SmAnalyseProfile from './index.vue'; +import SmAnalyseProfile from './profile.vue'; export default SmAnalyseProfile; diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/index.vue b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/index.vue deleted file mode 100644 index a8019f78..00000000 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/index.vue +++ /dev/null @@ -1,339 +0,0 @@ -<template> -<div class="row-container" style="max-height: 4.0rem"> - <n-scrollbar style="max-height: 3.8rem"> - <div class="row-item" > - <!-- 剖面分析 --> - <span>{{$t('global.startLongitude')}}</span> - <n-input-number - style="width: 1.96rem;" - v-model:value="state.startDegreesArray[0]" - :show-button="false" - disabled - > - <template #suffix>°</template> - </n-input-number> - </div> - <div class="row-item" > - <span>{{$t('global.startLatitude')}}</span> - <n-input-number - style="width: 1.96rem;" - v-model:value="state.startDegreesArray[1]" - :show-button="false" - disabled - > - <template #suffix>°</template> - </n-input-number> - </div> - <div class="row-item" > - <span>{{$t('global.startElevation')}}</span> - <n-input-number - style="width: 1.96rem;" - v-model:value="state.startDegreesArray[2]" - :show-button="false" - disabled - > - <template #suffix>{{$t('global.meter')}}</template> - </n-input-number> - </div> - - <n-divider /> - - <div class="row-item" > - <span>{{$t('global.endLongitude')}}</span> - <n-input-number - style="width: 1.96rem;" - v-model:value="state.endDegreesArray[0]" - :show-button="false" - disabled - > - <template #suffix>°</template> - </n-input-number> - </div> - <div class="row-item" > - <span>{{$t('global.endLatitude')}}</span> - <n-input-number - style="width: 1.96rem;" - v-model:value="state.endDegreesArray[1]" - :show-button="false" - disabled - > - <template #suffix>°</template> - </n-input-number> - </div> - <div class="row-item" > - <span>{{$t('global.endElevation')}}</span> - <n-input-number - style="width: 1.96rem;" - v-model:value="state.endDegreesArray[2]" - :show-button="false" - disabled - > - <template #suffix>{{$t('global.meter')}}</template> - </n-input-number> - </div> - - <div class="row-item" > - <span>{{$t('global.disPlayInfo')}}</span> - <div class="check-box"> - <n-checkbox v-model:checked="state.profileInfoShow"></n-checkbox> - </div> - </div> - <div class="row-item" v-show="state.profileInfoShow" > - <span></span> - <div class="check-box"> - <n-radio-group v-model:value="state.infoShowMode" name="radiogroup" class="radio-group"> - <n-space> - <n-radio v-for="item in state.modeOptions" :key="item.value" :value="item.value"> - {{ item.label }} - </n-radio> - </n-space> - </n-radio-group> - </div> - </div> -</n-scrollbar> -</div> - -<div class="btn-row-item" style="margin-right: 0.1rem;margin-top: 0.12rem"> - <n-button - type="info" - color="#3499E5" - text-color="#fff" - class="ans-btn" - @click="analysis" - >{{$t('global.analysis')}}</n-button - > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> - </div> - <!-- 图表 --> - <!-- <n-space vertical> - <div v-show="state.profileInfoShow"> - <n-spin :show="state.show" size="large"> - <div v-show="!state.gpuDomShow" id="echartsProfile"></div> - <canvas v-show="state.gpuDomShow" - style="position : fixed;; width:6.75rem; height: 2.23rem; left : 3.5rem; bottom : 0.3rem;background-color:rgba(0, 8, 23, 0.7)" - id="pro" height="0" width="0"></canvas> - <template #description> - 分析获取结果中...... - </template> - </n-spin> - </div> - - </n-space> --> - <!-- <n-spin :show="state.show"> --> - <div v-show="state.profileInfoShow"> - <div v-show="!state.gpuDomShow" id="echartsProfile"></div> - <canvas v-show="state.gpuDomShow" - style="position : fixed;; width:6.75rem; height: 2.23rem; left : 3.5rem; bottom : 0.3rem;background-color:rgba(0, 8, 23, 0.7)" - id="pro" height="0" width="0"></canvas> - </div> - <!-- </n-spin> --> -</template> - -<script lang="ts" setup> -import { reactive, onBeforeUnmount, watch, onMounted } from "vue"; -import echarts from "@/tools/echarts"; -import initHandler from "@/tools/drawHandler"; -import tool from "@/tools/tool"; -import profileAnalysis from "./js/profile"; // 剖面分析封装类 - -const scene = viewer.scene; - -type stateType = { - startDegreesArray: number[],// 起点坐标数组 - endDegreesArray: number[],// 终点坐标数组 - profileInfoShow:boolean,// 是否显示图表 - infoShowMode:string,// 是否显示GPU剖面图表 - modeOptions:any, - gpuDomShow:boolean, // 控制GPU剖面DOM元素 - gpuProfileState:boolean, - show:boolean,//加载等待条 - -} -// 设置默认值数据 -let state = reactive<stateType>({ - startDegreesArray: [0, 0, 0], - endDegreesArray: [0, 0, 0], - profileInfoShow: false, // 剖面信息展示 - infoShowMode: 'echarts', //是否显示二维分析结果 - modeOptions: [ - { - label: GlobalLang.Section, - value: "echarts", - }, - { - label: GlobalLang.GPUSection, - value: "canvas" - }, - ], - gpuDomShow: false, - gpuProfileState: false, - show:false -}); - -// 初始化变量 -let profile, handlerPolyline,ctx,canvas; -let profile_GPU = new SuperMap3D.Profile(scene); - -// 初始化 -init(); -function init() { - if (!viewer) return; - profile = new profileAnalysis(viewer, { - echarts: echarts, - entityUrl: "./images/location.png" - }); -} - -// 为剖面分析设置数据 -function setDataForGpuProFile(result: any) { - let line = result.object; - if (line.positions.length < 2) { - return; - } - let startPoint = line.positions[0]; - let endPoint = line.positions[1]; - - let scartographic = SuperMap3D.Cartographic.fromCartesian(startPoint); - let slongitude = SuperMap3D.Math.toDegrees(scartographic.longitude); - let slatitude = SuperMap3D.Math.toDegrees(scartographic.latitude); - let sheight = scartographic.height; - - let ecartographic = SuperMap3D.Cartographic.fromCartesian(endPoint); - let elongitude = SuperMap3D.Math.toDegrees(ecartographic.longitude); - let elatitude = SuperMap3D.Math.toDegrees(ecartographic.latitude); - let eheight = ecartographic.height; - - //设置剖面分析的开始和结束位置 - profile_GPU.startPoint = [slongitude, slatitude, sheight]; - profile_GPU.endPoint = [elongitude, elatitude, eheight]; - - profile_GPU.extendHeight = 40; - state.gpuProfileState = true; -} -//分析 -function analysis() { - - let interValID = setInterval(() => { - if (!handlerPolyline.positions) return; - - let positions = handlerPolyline.positions; - if (positions.length === 1) { - let result = tool.CartesiantoDegrees(positions[0]); - state.startDegreesArray = result.map((num: any) => Number(num.toFixed(2))); - } else if (positions.length >= 2) { - let resultS = tool.CartesiantoDegrees(positions[0]); - let resultE = tool.CartesiantoDegrees(positions[positions.length - 1]); - state.startDegreesArray = resultS.map((num: any) => Number(num.toFixed(2))); - state.endDegreesArray = resultE.map((num: any) => Number(num.toFixed(2))); - } - }, 100) - - if (!handlerPolyline) handlerPolyline = initHandler("Polyline"); - handlerPolyline.handlerDrawing().then( - res => { - setDataForGpuProFile(res); - - clearInterval(interValID); - state.show = true; - profile.startProfile(res.object.positions).then(res=>{ - if(res){ - state.show = false; - } - }); - if(state.infoShowMode === 'canvas') getCanvasImage(); - handlerPolyline.polylineTransparent.show = false; - }, - err => { - console.log(err); - } - ); - handlerPolyline.activate(); -} - -// 清除 -function clear() { - profile.clear(); - if(ctx) ctx.clearRect(0, 0, canvas.width, canvas.height); - profile_GPU.destroy(); - if (handlerPolyline) handlerPolyline.clearHandler(); - - profile_GPU = new SuperMap3D.Profile(scene); - state.gpuProfileState = false; - - state.startDegreesArray = [0, 0, 0]; - state.endDegreesArray = [0, 0, 0]; - state.profileInfoShow = false; -} - -// GPU剖面分析 -function getCanvasImage(){ - state.gpuDomShow = true; - if (!state.gpuProfileState) return; - - //分析完毕的回调函数 - profile_GPU.getBuffer(function (buffer:any) { - - canvas = document.getElementById("pro"); - canvas.height = profile_GPU._textureHeight; - canvas.width = profile_GPU._textureWidth; - ctx = canvas.getContext("2d"); - let imgData = ctx.createImageData(profile_GPU._textureWidth, profile_GPU._textureHeight); - imgData.data.set(buffer); - - //在canvas上绘制图片 - ctx.putImageData(imgData, 0, 0); - }); - - profile_GPU.build(); -}; - -// 监听 -watch( - () => state.infoShowMode, - newValue => { - if (newValue === 'canvas') { - getCanvasImage(); - }else{ - state.gpuDomShow = false; - } - } -); - -watch(()=>state.profileInfoShow,(val)=>{ - state.infoShowMode = 'echarts'; - if(val && state.infoShowMode==='canvas'){ - getCanvasImage(); - } -}) - -onMounted(() => { - profile.initEcharts(); -}); -// 销毁 -onBeforeUnmount(() => { - clear(); - profile.destroy(); - profile_GPU.destroy(); - handlerPolyline = null; - state.profileInfoShow = false; -}); -</script> - - -<style lang="scss" scoped> -#echartsProfile { - position: fixed !important; - bottom: 0.3rem; - left: 3.5rem; - width: 6.75rem !important; - height: 2.33rem !important; - background-color: rgba(0, 8, 23, 0.7) !important; - opacity: 0.7; - padding: 0.05rem 0.1rem 0.1rem 0.05rem; - z-index: 99; - // display: none; -} -:deep(.n-divider__line){ - height: 3px ; -} -</style> \ No newline at end of file diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/js/profile.js b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/js/profile.js index 1be77536..7cb58eaa 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/js/profile.js +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/js/profile.js @@ -36,7 +36,7 @@ class ProfileAnalysis { } this.myChart.setOption({ title: { - text: GlobalLang.Section, + text: $t('Section'), textStyle: { fontSize: 15 } @@ -49,10 +49,11 @@ class ProfileAnalysis { }, tooltip: {}, xAxis: { - show: false + show: true }, yAxis: { - show: false + type: 'value', + show: true }, series: [ { @@ -106,20 +107,20 @@ class ProfileAnalysis { // this.clampedCartesians = positions; // this.LatAndLons = CartesiantoDegreesObjs(positions); // this.setOptions(); - + return new Promise((resolve, reject) => { this.viewer.scene - .clampToHeightMostDetailed(positions) - .then((clampedCartesians) => { + .clampToHeightMostDetailed(positions) + .then((clampedCartesians) => { this.clampedCartesians = clampedCartesians; this.LatAndLons = CartesiantoDegreesObjs(clampedCartesians); this.setOptions(); // return Promise.resolve(true); resolve(true); - },(err)=>{ - console.log("剖面:",err) - }); + }, (err) => { + console.log(err); + }); }) }; @@ -180,17 +181,16 @@ class ProfileAnalysis { // 设置echarts setOptions() { - console.log("this.LatAndLons:",this.LatAndLons); this.myChart.clear(); let option = { title: { - text: GlobalLang.Section, + text: $t('Section'), textStyle: { fontSize: 15, color: '#CAE6FF' }, top: '3%', - left:'3%', + left: '3%', }, // 定位 grid: { @@ -201,7 +201,7 @@ class ProfileAnalysis { containLabel: true }, axisLabel: {// 设置坐标轴字的颜色 - color: 'color: rgba(255, 255, 255, 0.85);' + color: 'color: rgba(255, 255, 255, 0.85);' }, backgroundColor: "#000817", tooltip: { @@ -231,18 +231,18 @@ class ProfileAnalysis { toolbox: { show: true, feature: { - // restore: { - // title:'刷新' - // }, - saveAsImage: { - title:"下载" - } + // restore: { + // title:'刷新' + // }, + saveAsImage: { + title: "下载" + } }, right: "3%", iconStyle: { borderColor: "#fff", // 图标默认颜色 - }, - }, + }, + }, xAxis: { data: this.LatAndLons.map((item, index) => { return index; @@ -250,6 +250,7 @@ class ProfileAnalysis { show: true, }, yAxis: { + type: 'value', min: function (value) { return value.min < 20 ? 0 : Math.floor(value.min); }, @@ -264,6 +265,7 @@ class ProfileAnalysis { splitLine: { show: true, }, + show: true, }, dataZoom: [ { @@ -281,7 +283,7 @@ class ProfileAnalysis { return item.height; }), areaStyle: { - opacity: 0 + opacity: 0 }, lineStyle: { color: '#3499E5' @@ -358,4 +360,4 @@ function CartesiantoDegreesObjs(Cartesians) { } -export default ProfileAnalysis +export default ProfileAnalysis; diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/profile.vue b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/profile.vue new file mode 100644 index 00000000..db03926c --- /dev/null +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-profile/profile.vue @@ -0,0 +1,359 @@ +<template> + <!-- 剖面分析 --> + <n-scrollbar style="max-height: 3.8rem"> + <div class="row-item"> + <span>{{ $t("startLongitude") }}</span> + <n-input-number + style="width: 1.96rem" + v-model:value="state.startDegreesArray[0]" + :show-button="false" + disabled + > + <template #suffix>°</template> + </n-input-number> + </div> + + <div class="row-item"> + <span>{{ $t("startLatitude") }}</span> + <n-input-number + style="width: 1.96rem" + v-model:value="state.startDegreesArray[1]" + :show-button="false" + disabled + > + <template #suffix>°</template> + </n-input-number> + </div> + + <div class="row-item"> + <span>{{ $t("startElevation") }}</span> + <n-input-number + style="width: 1.96rem" + v-model:value="state.startDegreesArray[2]" + :show-button="false" + disabled + > + <template #suffix>{{ $t("meter") }}</template> + </n-input-number> + </div> + + <n-divider /> + + <div class="row-item"> + <span>{{ $t("endLongitude") }}</span> + <n-input-number + style="width: 1.96rem" + v-model:value="state.endDegreesArray[0]" + :show-button="false" + disabled + > + <template #suffix>°</template> + </n-input-number> + </div> + + <div class="row-item"> + <span>{{ $t("endLatitude") }}</span> + <n-input-number + style="width: 1.96rem" + v-model:value="state.endDegreesArray[1]" + :show-button="false" + disabled + > + <template #suffix>°</template> + </n-input-number> + </div> + + <div class="row-item"> + <span>{{ $t("endElevation") }}</span> + <n-input-number + style="width: 1.96rem" + v-model:value="state.endDegreesArray[2]" + :show-button="false" + disabled + > + <template #suffix>{{ $t("meter") }}</template> + </n-input-number> + </div> + + <div class="row-item"> + <span>{{ $t("disPlayInfo") }}</span> + <div class="check-box"> + <n-checkbox v-model:checked="state.profileInfoShow"></n-checkbox> + </div> + </div> + + <div class="row-item" v-show="state.profileInfoShow"> + <span></span> + <div class="check-box"> + <n-radio-group + v-model:value="state.infoShowMode" + name="radiogroup" + class="radio-group" + > + <n-space> + <n-radio + v-for="item in state.modeOptions" + :key="item.value" + :value="item.value" + > + {{ item.label }} + </n-radio> + </n-space> + </n-radio-group> + </div> + </div> + </n-scrollbar> + + <div class="btn-row-item" style="margin-right: 0.1rem; margin-top: 0.12rem"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + class="ans-btn" + @click="analysis" + >{{ $t("analysis") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> + + <!-- 图表 --> + <div v-show="state.profileInfoShow"> + <div + v-show="!state.gpuDomShow" + id="echartsProfile" + class="chartContainer" + ></div> + <div class="chartContainer" v-show="state.gpuDomShow"> + <div style="font-size: 0.16rem; margin-top: -5px"> + {{ $t("GPUSection") }} + </div> + <canvas id="pro" style="z-index: 999" height="0" width="0"></canvas> + </div> + </div> +</template> + +<script lang="ts" setup> +import { reactive, onBeforeUnmount, watch, onMounted } from "vue"; +import echarts from "@/tools/echarts"; +import initHandler from "@/tools/drawHandler"; +import tool from "@/tools/tool"; +import profileAnalysis from "./js/profile"; // 剖面分析封装类 + +const scene = viewer.scene; + +type stateType = { + startDegreesArray: number[]; // 起点坐标数组 + endDegreesArray: number[]; // 终点坐标数组 + profileInfoShow: boolean; // 是否显示图表 + infoShowMode: string; // 是否显示GPU剖面图表 + modeOptions: any; + gpuDomShow: boolean; // 控制GPU剖面DOM元素 + gpuProfileState: boolean; + show: boolean; //加载等待条 +}; +// 设置默认值数据 +let state = reactive<stateType>({ + startDegreesArray: [0, 0, 0], + endDegreesArray: [0, 0, 0], + profileInfoShow: false, // 剖面信息展示 + infoShowMode: "echarts", //是否显示二维分析结果 + modeOptions: [ + { + label: $t("Section"), + value: "echarts", + }, + { + label: $t("GPUSection"), + value: "canvas", + }, + ], + gpuDomShow: false, + gpuProfileState: false, + show: false, +}); + +// 初始化变量 +let handlerPolyline, ctx, canvas; +let profile_GPU = new SuperMap3D.Profile(scene); +let profile = new profileAnalysis(viewer, { + echarts: echarts, + entityUrl: "./images/location.png", +}); + +function init() { + if (!viewer) return; +} + +onMounted(() => { + init(); + profile.initEcharts(); +}); + +// 销毁 +onBeforeUnmount(() => { + clear(); + profile.destroy(); + profile_GPU.destroy(); + handlerPolyline = null; + state.profileInfoShow = false; +}); + +// 为剖面分析设置数据 +function setDataForGpuProFile(result: any) { + let line = result.object; + if (line.positions.length < 2) { + return; + } + let startPoint = line.positions[0]; + let endPoint = line.positions[1]; + + let scartographic = SuperMap3D.Cartographic.fromCartesian(startPoint); + let slongitude = SuperMap3D.Math.toDegrees(scartographic.longitude); + let slatitude = SuperMap3D.Math.toDegrees(scartographic.latitude); + let sheight = scartographic.height; + + let ecartographic = SuperMap3D.Cartographic.fromCartesian(endPoint); + let elongitude = SuperMap3D.Math.toDegrees(ecartographic.longitude); + let elatitude = SuperMap3D.Math.toDegrees(ecartographic.latitude); + let eheight = ecartographic.height; + + //设置剖面分析的开始和结束位置 + profile_GPU.startPoint = [slongitude, slatitude, sheight]; + profile_GPU.endPoint = [elongitude, elatitude, eheight]; + + profile_GPU.extendHeight = 40; + state.gpuProfileState = true; +} + +//分析 +function analysis() { + let interValID = setInterval(() => { + if (!handlerPolyline.positions) return; + + let positions = handlerPolyline.positions; + if (positions.length === 1) { + let result = tool.CartesiantoDegrees(positions[0]); + state.startDegreesArray = result.map((num: any) => + Number(num.toFixed(2)) + ); + } else if (positions.length >= 2) { + let resultS = tool.CartesiantoDegrees(positions[0]); + let resultE = tool.CartesiantoDegrees(positions[positions.length - 1]); + state.startDegreesArray = resultS.map((num: any) => + Number(num.toFixed(2)) + ); + state.endDegreesArray = resultE.map((num: any) => Number(num.toFixed(2))); + } + }, 100); + + if (!handlerPolyline) handlerPolyline = initHandler("Polyline"); + handlerPolyline.handlerDrawing().then( + (res) => { + setDataForGpuProFile(res); + + clearInterval(interValID); + state.show = true; + profile.startProfile(res.object.positions).then((res) => { + if (res) { + state.show = false; + } + }); + if (state.infoShowMode === "canvas") getCanvasImage(); + handlerPolyline.polylineTransparent.show = false; + }, + (err) => { + console.log(err); + } + ); + handlerPolyline.activate(); +} + +// GPU剖面分析 +function getCanvasImage() { + state.gpuDomShow = true; + if (!state.gpuProfileState) return; + + //分析完毕的回调函数 + profile_GPU.getBuffer(function (buffer: any) { + canvas = document.getElementById("pro"); + canvas.height = profile_GPU._textureHeight; + canvas.width = profile_GPU._textureWidth; + ctx = canvas.getContext("2d"); + let imgData = ctx.createImageData( + profile_GPU._textureWidth, + profile_GPU._textureHeight + ); + imgData.data.set(buffer); + + //在canvas上绘制图片 + ctx.putImageData(imgData, 0, 0); + }); + + profile_GPU.build(); +} + +// 清除 +function clear() { + profile.clear(); + if (ctx) ctx.clearRect(0, 0, canvas.width, canvas.height); + profile_GPU.destroy(); + if (handlerPolyline) handlerPolyline.clearHandler(); + + profile_GPU = new SuperMap3D.Profile(scene); + state.gpuProfileState = false; + + state.startDegreesArray = [0, 0, 0]; + state.endDegreesArray = [0, 0, 0]; + state.profileInfoShow = false; +} + +// 监听 +watch( + () => state.infoShowMode, + (newValue) => { + if (newValue === "canvas") { + getCanvasImage(); + } else { + state.gpuDomShow = false; + } + } +); + +watch( + () => state.profileInfoShow, + (val) => { + state.infoShowMode = "echarts"; + if (val && state.infoShowMode === "canvas") { + getCanvasImage(); + } + } +); +</script> + +<style lang="scss" scoped> +.chartContainer { + position: fixed !important; + bottom: 0.2rem; + left: 32vw; + width: 36vw; + height: 30vh; + background-color: rgba(0, 8, 23, 0.7); + opacity: 0.7; + padding: 0.05rem 0.1rem 0.1rem 0.05rem; + z-index: 99; +} + +#pro { + width: 36vw; + height: 28vh; + left: 4.7rem; + background-color: rgba(0, 8, 23, 0.7); + opacity: 0.7; +} +</style> diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/index.ts b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/index.ts index 9ca5ee35..5119f45f 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/index.ts @@ -1,3 +1,3 @@ -import SmAnalyseShadow from './index.vue'; +import SmAnalyseShadow from './shadow.vue'; export default SmAnalyseShadow; diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/index.vue b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/index.vue deleted file mode 100644 index 77fd63be..00000000 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/index.vue +++ /dev/null @@ -1,486 +0,0 @@ -<template> - <div class="shadow-time"> - <div class="itemBox-shadow"> - <n-slider v-model:value="state.timeArray" @update:value="timeChanged" :max="96" :step="0.5" range - :marks="state.marks" :format-tooltip="formatTime" /> - <i class="iconfont iconSize iconbofang btnImg" :title="$t('global.ShadowStartTip')" v-show="state.showStartTimeBtn" - @click="sunLightForTime(true)"></i> - <i class="iconfont iconSize iconzanting btnImg" :title="$t('global.ShadowStartTip')" - v-show="!state.showStartTimeBtn" @click="sunLightForTime(false)"></i> - </div> - <div class="itemBox-shadow" style="margin-bottom: 0.12rem"> - <n-date-picker class="shadow-date-picker" v-model:value="currentTime" type="date" /> - <i class="iconfont iconSize iconbofang btnImg" :title="$t('global.ShadowStartTip2')" v-show="state.showStartDateBtn" - @click="sunLightForDate(true)"></i> - <i class="iconfont iconSize iconzanting btnImg" :title="$t('global.ShadowStartTip2')" - v-show="!state.showStartDateBtn" @click="sunLightForDate(false)"></i> - </div> - </div> - <n-divider /> - <div class="row-item"> - <span>{{ $t('global.bottomHeight') }}</span> - <n-input-number style="width: 1.96rem;" v-model:value="state.bottomHeight" :show-button="false"> - <template #suffix>{{ $t('global.meter') }}</template> - </n-input-number> - </div> - <div class="row-item"> - <span>{{ $t('global.stretchingHeight') }}</span> - <n-input-number style="width: 1.96rem;" v-model:value="state.extrudeHeight" :show-button="false"> - <template #suffix>{{ $t('global.meter') }}</template></n-input-number> - </div> - - <div class="row-item"> - <span>{{ $t('global.space') }}</span> - <n-input-number style="width: 1.96rem;" v-model:value="state.spacing" :show-button="false"> - <template #suffix>{{ $t('global.meter') }}</template> - </n-input-number> - </div> - - <div class="row-item"> - <span>{{ $t('global.bodyDisplay') }}</span> - <div class="check-box"> - <n-checkbox v-model:checked="state.shadowBodyShow"></n-checkbox> - </div> - </div> - - <!-- 开启阴影 --> - <div class="row-item"> - <span>{{ $t('global.showShadow') }}</span> - <div class="check-box"> - <n-checkbox v-model:checked="state.shadowShow"></n-checkbox> - </div> - </div> - - <div class="bableShadow" ref="bableShadowDom" v-show="state.shadowRadioShow"> - <div class="row-item" style="margin-top:0.12rem"> - <span class="shadow-anaylse-pop-titie">{{ $t('global.analyseResult') }}</span> - <span @click="state.shadowRadioShow = false;" style="margin-right:14px">X</span> - </div> - <div class="row-item" style="margin-left: 0.12rem;margin-right: 0.12rem"> - <span>{{ $t('global.DaylightingRate') }}</span> - <n-input style="width: 1.5rem;" v-model:value="state.shadowRadio.radio" :show-button="false" disabled> - </n-input> - </div> - <div class="row-item" style="margin-left: 0.12rem;margin-right: 0.12rem"> - <span>{{ $t('global.longitude') }}</span> - <n-input-number style="width: 1.5rem" v-model:value="state.shadowRadio.longitude" :show-button="false" disabled> - </n-input-number> - </div> - <div class="row-item" style="margin-left: 0.12rem;margin-right: 0.12rem"> - <span>{{ $t('global.latitude') }}</span> - <n-input-number style="width: 1.5rem" v-model:value="state.shadowRadio.latitude" :show-button="false" disabled> - </n-input-number> - </div> - <div class="row-item" style="margin-left: 0.12rem;margin-right: 0.12rem"> - <span>{{ $t('global.elevation') }}</span> - <n-input-number style="width: 1.5rem" v-model:value="state.shadowRadio.height" :show-button="false" disabled> - </n-input-number> - </div> - </div> - - - <div class="btn-row-item"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="analysis" - class="ans-btn">{{ $t('global.analysis') }}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" - ghost>{{ $t('global.clear') }}</n-button> - </div> -</template> - -<script lang="ts" setup> -import { ref, reactive, onBeforeUnmount, watch } from "vue"; -import initHandler from "@/tools/drawHandler"; -import ShadowQuery from "./js/shadow-query"; -import tool from "@/tools/tool"; - -type stateType = { - timeArray: number[], //开始结束时间 - currentDate: any, //当前日期 - marks: any,//时间刻度标记 - timeInterval: number, //时间间隔 - spacing: number, //间距(米) - bottomHeight: number, //底部高程(米) - extrudeHeight: number, //拉伸高度(米) - shadowShow: boolean, //阴影显示 - shadowBodyShow: boolean, //阴影率体显示 - showStartTimeBtn: boolean, - showStartDateBtn: boolean, - filterInterval: number[], - shadowRadio: any, - shadowRadioShow: boolean, - initBubble: boolean, - shadowQueryRegion: any -} - -// 设置默认值数据 -let state = reactive<stateType>({ - timeArray: [20, 64], - currentDate: new Date(), - marks: { - 0: "0:00", - 8: "", - 16: "", - 24: "6:00", - 32: "", - 40: "", - 48: "12:00", - 56: "", - 64: "", - 72: "18:00", - 80: "", - 88: "", - 96: "24:00", - }, - timeInterval: 60, - spacing: 10, - bottomHeight: 1, - extrudeHeight: 30, - shadowShow: false, - shadowBodyShow: false, - showStartTimeBtn: true, - showStartDateBtn: true, - filterInterval: [0, 100], - shadowRadio: {}, - shadowRadioShow: false, - initBubble: false, - shadowQueryRegion: [] -}); - -let currentTime = ref<any>(Date.now()); // 直接获取时间戳 -// 初始化数据 -let timeArray = [...state.timeArray], - timerTime, - timerDate; -let shadow, handlerPolygon; -let bableShadowDom = ref(); - - -function init() { - if (!viewer) return; - state.initBubble = true; - shadow = new ShadowQuery(viewer, { - modelUrl: "./Resource/model/box.s3m", - }); - shadow.updateOptionsParams(state); -} - -init(); - -// 时间轴改变 -function timeChanging(arr: number[]) { - let tm; - if (timeArray[0] === arr[0]) { - tm = getCurrentTime(arr[1]); - } else { - tm = getCurrentTime(arr[0]); - } - viewer.clock.currentTime = SuperMap3D.JulianDate.fromDate(tm); - timeArray = arr; -} - -// 根据一个数字(0-96)转化为当前时间 -function getCurrentTime(num: number) { - // let h = parseInt(num / 4); - let h = Math.floor(num / 4); - // let m = parseInt((num % 4) * 15); - let m = Math.floor((num % 4) * 15); - state.currentDate.setHours(h); - state.currentDate.setMinutes(m); - return state.currentDate; -} - -// 时间轴格式化 -function formatTime(val: any) { - if (val === state.timeArray[0]) { - return ( - `${GlobalLang.startTime}:` + - timeSlice(getCurrentTime(val).toLocaleTimeString()) - ); - } else - return ( - `${GlobalLang.endTime}:` + - timeSlice(getCurrentTime(val).toLocaleTimeString()) - ); - function timeSlice(str: string) { - let str2 = str.split(":"); - return str2[0] + ":" + str2[1]; - } -} - -// 播放或暂停时间段内阳光和阴影动画 -function sunLightForTime(isStart: boolean) { - clearTimer(); - if (!isStart) return; - if (!state.shadowShow) state.shadowShow = true; - state.showStartTimeBtn = false; - let time = [...timeArray]; - let stm = time[0]; - let etm = time[1]; - let ntm = stm; - timerTime = setInterval(() => { - if (ntm < etm) { - ntm += 0.5; - state.timeArray = [stm, ntm]; - } else { - state.showStartTimeBtn = true; - clearInterval(timerTime); - } - }, 50); -} - -// 播放一年的阳光和阴影动画 -function sunLightForDate(isStart: boolean) { - clearTimer(); - if (!isStart) return; - if (!state.shadowShow) state.shadowShow = true; - state.showStartDateBtn = false; - let d = getCurrentTime(timeArray[1]); - let mon = d.getMonth(); - timerDate = setInterval(() => { - if (mon < 11) mon += 1; - else mon = 0; - d.setMonth(mon); - state.currentDate = new Date(d); - }, 1000); -} - -// 清除动画 -function clearTimer() { - clearInterval(timerTime); - clearInterval(timerDate); - state.showStartTimeBtn = true; - state.showStartDateBtn = true; -} - -// 分析 -function analysis() { - if (!state.shadowShow) state.shadowShow = true; - if (!handlerPolygon) handlerPolygon = initHandler("Polygon"); - handlerPolygon.handlerDrawing().then( - (res) => { - state.shadowQueryRegion = res.object.positions; - shadowQueryStart(state.shadowQueryRegion, timeArray[0], timeArray[1]); - }, - (err) => { - console.log(err); - } - ); - handlerPolygon.activate(); -} - -function shadowQueryStart(regionPositionList, startTime, endTime) { - let sTime = SuperMap3D.JulianDate.fromDate( - getCurrentTime(startTime) - ); - let eTime = SuperMap3D.JulianDate.fromDate( - getCurrentTime(endTime) - ); - shadow.setshadowQuery(regionPositionList, sTime, eTime); - handlerPolygon.polylineTransparent.show = false; - viewer.eventManager.addEventListener("CLICK", LEFT_CLICK, true); - -} - -// 鼠标左键事件 点击获取阴影率 -function LEFT_CLICK(e) { - // bubble.addEvent(); //设置气泡监听事件 - if (state.shadowBodyShow) { - let box = viewer.scene.pick(e.message.position); - if (box && box.id) { - let index = box.id.split("-")[1]; - let point = shadow.shadowPoints[index]; - if (!point) { - state.shadowRadioShow = false; - return; - } - let radio = point.shadowRatio * 100; - if (radio < state.filterInterval[0] || radio > state.filterInterval[1]) { - state.shadowRadioShow = false; - } - state.shadowRadioShow = true; - let position = tool.CartesiantoDegrees(point.position); - state.shadowRadio = { - radio: (point.shadowRatio * 100).toFixed(0) + "%", - longitude: position[0].toFixed(8), - latitude: position[1].toFixed(8), - height: position[2].toFixed(8) - }; - bableShadowDom.value.style.top = (e.message.position.y - 220) + 'px'; - bableShadowDom.value.style.left = (e.message.position.x) + 'px'; - return; - } - } else { - let position1 = viewer.scene.pickPosition(e.message.position); - let cartographic = SuperMap3D.Cartographic.fromCartesian(position1); - let shadowRadio = shadow.shadowQuery.getShadowRadio(cartographic); - if (shadowRadio !== -1) { - let longitude = SuperMap3D.Math.toDegrees(cartographic.longitude); - let latitude = SuperMap3D.Math.toDegrees(cartographic.latitude); - state.shadowRadio = { - radio: (shadowRadio * 100).toFixed(0) + "%", - longitude: longitude.toFixed(8), - latitude: latitude.toFixed(8), - height: cartographic.height.toFixed(8) - }; - return; - } - } -} - -//时间轴改变后设置shadowQuery(不是实时监听) -function timeChanged(val) { - if (state.shadowShow && state.shadowQueryRegion.length > 0) { - shadow.clear(); - shadowQueryStart(state.shadowQueryRegion, val[0], val[1]); - } -}; - -// 清除 -function clear() { - state.shadowRadio = { radio: 0, longitude: 0, latitude: 0, height: 0 }; - viewer.eventManager.removeEventListener("CLICK", LEFT_CLICK); //移除鼠标点击事件监听 - if (handlerPolygon) handlerPolygon.clearHandler(); - shadow.clear(); - state.shadowQueryRegion.length = 0; - state.shadowRadioShow = false; -} - -// 监听 -watch( - () => state.timeArray, - (val) => { - timeChanging(val); - } -); -watch( - () => state.currentDate, - (val) => { - timeChanging(timeArray); - } -); -watch( - () => state.timeInterval, - (val) => { - shadow.timeInterval = val; - } -); -watch( - () => state.spacing, - (val) => { - shadow.spacing = val; - } -); -watch( - () => state.bottomHeight, - (val) => { - shadow.bottomHeight = val; - } -); -watch( - () => state.extrudeHeight, - (val) => { - shadow.extrudeHeight = val; - } -); -watch( - () => state.shadowShow, - (val) => { - shadow.setShadow(val); - } -); -watch( - () => state.shadowBodyShow, - (val) => { - shadow.setBodyShow(val); - } -); -watch( - () => state.filterInterval, - (val) => { - shadow.setFilterBodyShow(val); - } -); - -// 销毁 -onBeforeUnmount(() => { - clear(); - shadow.destroy(); -}); -</script> - -<style lang="scss" scoped> -.shadow-time { - margin-bottom: 0.14rem; - border: 1px solid rgba(255, 255, 255, 0.15); - border-radius: 4px; - background: rgba(255, 255, 255, 0.04); -} - -.itemBox-shadow { - display: flex; - justify-content: space-between; - // align-items: center; - margin: 0.06rem; - padding: 0px 10px; - - .lable { - width: 2rem; - font-size: 0.14rem; - } - - .content { - width: 1.4rem; - } - - .shadow-date-picker { - width: 2.8rem; - text-align: center; - :hover { - cursor: pointer; - } - } - - .btnImg { - width: 0.22rem; - height: 0.22rem; - margin: 0rem 0rem 0rem 0.20rem; - color: #FFFFFF; - - } - -} - -.n-slider .n-slider-dots .n-slider-dot { - top: 0.06rem; - width: 0.02rem; - height: 0.05rem; - border-radius: 0; -} - -.bableShadow { - position: fixed; - top: 2rem; - left: 5rem; - background-color: #3B5168; - opacity: 0.8; - z-index: 200000; - height: 2.2rem; - width: 2.28rem; - - .shadow-anaylse-pop-titie { - margin-left: 0.12rem; - font-size: 12px; - line-height: 20px; - - } - - span { - font-size: 12px; - } -} -</style> - - - - - diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/js/shadow-query.js b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/js/shadow-query.js index 209e97d1..dc3e19b8 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/js/shadow-query.js +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/js/shadow-query.js @@ -62,7 +62,6 @@ class ShadowQuery { } } - /** * 开始执行分析 * @param {Array} _positions 添加点的笛卡尔坐标 @@ -111,8 +110,6 @@ class ShadowQuery { this.s3mInstanceCollection.removeCollection(this.modelUrl); }; - - //过滤体显示 setFilterBodyShow(arr) { this.filterInterval = arr; @@ -123,13 +120,10 @@ class ShadowQuery { let model = this.s3mInstanceCollection.getInstance(this.modelUrl, 'shadow_body_box-' + i); if (Ratio < arr[0] || Ratio > arr[1]) if (model) model.visible = false - else if (model) model.visible = true + else if (model) model.visible = true } } - - - /** * 销毁 */ @@ -169,8 +163,6 @@ const CartesiantoDegrees = (Cartesians) => { return positions }; - - //初始化体显示颜色(根据采光率0-100设置对应颜色值) function initBoxColor() { let color = ['#0000ff']; @@ -216,4 +208,4 @@ function gradientColors(start, end, steps, gamma) { } }; -export default ShadowQuery +export default ShadowQuery; diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/shadow.vue b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/shadow.vue new file mode 100644 index 00000000..17e39ef5 --- /dev/null +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-shadow/shadow.vue @@ -0,0 +1,627 @@ +<template> + <!-- 阴影分析 --> + <n-scrollbar style="max-height: 3.8rem"> + <div class="shadow-time"> + <!-- 24小时光照 --> + <div class="itemBox-shadow"> + <n-slider + v-model:value="state.timeArray" + @update:value="timeChanged" + :max="96" + :step="0.5" + range + :marks="state.marks" + :format-tooltip="formatTime" + /> + <i + class="iconfont iconSize iconbofang btnImg" + :title="$t('ShadowStartTip')" + v-show="state.showStartTimeBtn" + @click="sunLightForTime(true)" + ></i> + <i + class="iconfont iconSize iconzanting btnImg" + :title="$t('ShadowStartTip')" + v-show="!state.showStartTimeBtn" + @click="sunLightForTime(false)" + ></i> + </div> + <!-- 日历控件 --> + <div class="itemBox-shadow" style="margin-bottom: 0.12rem"> + <n-date-picker + class="shadow-date-picker" + v-model:value="state.currentTime" + type="date" + > + <template #date-icon> + <i class="iconfont icondown iconfanhui" style="margin-top: 0px"></i> + </template> + </n-date-picker> + <i + class="iconfont iconSize iconbofang btnImg" + :title="$t('ShadowStartTip2')" + v-show="state.showStartDateBtn" + @click="sunLightForDate(true)" + ></i> + <i + class="iconfont iconSize iconzanting btnImg" + :title="$t('ShadowStartTip2')" + v-show="!state.showStartDateBtn" + @click="sunLightForDate(false)" + ></i> + </div> + </div> + + <n-divider /> + + <div class="row-item"> + <span>{{ $t("bottomHeight") }}</span> + <n-input-number + style="width: 1.96rem" + v-model:value="state.bottomHeight" + :update-value-on-input="false" + :show-button="false" + > + <template #suffix>{{ $t("meter") }}</template> + </n-input-number> + </div> + + <div class="row-item"> + <span>{{ $t("stretchingHeight") }}</span> + <n-input-number + style="width: 1.96rem" + v-model:value="state.extrudeHeight" + :update-value-on-input="false" + :show-button="false" + > + <template #suffix>{{ $t("meter") }}</template></n-input-number + > + </div> + + <div class="row-item"> + <span>{{ $t("space") }}</span> + <n-input-number + style="width: 1.96rem" + v-model:value="state.spacing" + :update-value-on-input="false" + :show-button="false" + > + <template #suffix>{{ $t("meter") }}</template> + </n-input-number> + </div> + + <div class="row-item"> + <span>{{ $t("bodyDisplay") }}</span> + <div class="check-box"> + <n-checkbox v-model:checked="state.shadowBodyShow"></n-checkbox> + </div> + </div> + + <!-- 开启阴影 --> + <div class="row-item"> + <span>{{ $t("showShadow") }}</span> + <div class="check-box"> + <n-checkbox v-model:checked="state.shadowShow"></n-checkbox> + </div> + </div> + </n-scrollbar> + + <!-- 阴影率弹窗 --> + <div class="bableShadow" ref="bableShadowDom" v-show="state.shadowRadioShow"> + <div class="row-item" style="margin-top: 0.12rem"> + <span class="shadow-anaylse-pop-titie">{{ $t("analyseResult") }}</span> + <span @click="state.shadowRadioShow = false" style="margin-right: 0.14rem" + >X</span + > + </div> + <div class="row-item" style="margin-left: 0.12rem; margin-right: 0.12rem"> + <span>{{ $t("DaylightingRate") }}</span> + <n-input + style="width: 1.5rem" + v-model:value="state.shadowRadio.radio" + :show-button="false" + disabled + > + </n-input> + </div> + <div class="row-item" style="margin-left: 0.12rem; margin-right: 0.12rem"> + <span>{{ $t("longitude") }}</span> + <n-input-number + style="width: 1.5rem" + v-model:value="longitude" + :show-button="false" + disabled + > + </n-input-number> + </div> + <div class="row-item" style="margin-left: 0.12rem; margin-right: 0.12rem"> + <span>{{ $t("latitude") }}</span> + <n-input-number + style="width: 1.5rem" + v-model:value="latitude" + :show-button="false" + disabled + > + </n-input-number> + </div> + <div class="row-item" style="margin-left: 0.12rem; margin-right: 0.12rem"> + <span>{{ $t("elevation") }}</span> + <n-input-number + style="width: 1.5rem" + v-model:value="altitude" + :show-button="false" + disabled + > + </n-input-number> + </div> + </div> + + <div class="btn-row-item"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="analysis" + class="ans-btn" + >{{ $t("analysis") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> +</template> + +<script lang="ts" setup> +import { + ref, + reactive, + onMounted, + onBeforeUnmount, + watch, + computed, +} from "vue"; +import initHandler from "@/tools/drawHandler"; +import ShadowQuery from "./js/shadow-query"; +import tool from "@/tools/tool"; + +type stateType = { + timeArray: number[]; //开始结束时间 + currentDate: any; //当前日期 + marks: any; //时间刻度标记 + timeInterval: number; //时间间隔 + spacing: number; //间距(米) + bottomHeight: number; //底部高程(米) + extrudeHeight: number; //拉伸高度(米) + shadowShow: boolean; //阴影显示 + shadowBodyShow: boolean; //阴影率体显示 + showStartTimeBtn: boolean; + showStartDateBtn: boolean; + filterInterval: number[]; + shadowRadio: any; + shadowRadioShow: boolean; + initBubble: boolean; + shadowQueryRegion: any; + currentTime: any; +}; + +// 设置默认值数据 +let state = reactive<stateType>({ + timeArray: [20, 64], + currentDate: new Date(), + marks: { + 0: "0:00", + 8: "", + 16: "", + 24: "6:00", + 32: "", + 40: "", + 48: "12:00", + 56: "", + 64: "", + 72: "18:00", + 80: "", + 88: "", + 96: "24:00", + }, + timeInterval: 60, + spacing: 10, + bottomHeight: 1, + extrudeHeight: 30, + shadowShow: false, + shadowBodyShow: false, + showStartTimeBtn: true, + showStartDateBtn: true, + filterInterval: [0, 100], + shadowRadio: {}, + shadowRadioShow: false, + initBubble: false, + shadowQueryRegion: [], + currentTime: undefined, +}); + +// let currentTime = ref<any>(Date.now()); // 直接获取时间戳 +// let currentTime = computed(() => state.currentDate.getTime()); + +state.currentTime = state.currentDate.getTime(); + +// 初始化变量 +let bableShadowDom = ref(); +let timeArray = [...state.timeArray]; +let timerTime, currentSelectedEntity, timerDate, handlerPolygon; +let shadow = new ShadowQuery(viewer, { + modelUrl: "./Resource/model/box.s3m", +}); + +function init() { + if (!viewer) return; + state.initBubble = true; + shadow.updateOptionsParams(state); +} + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + viewer.clock.onTick.removeEventListener(updatePopup); + clear(); + shadow.destroy(); +}); + +let longitude = computed(() => { + return Number(state.shadowRadio.longitude).toFixed(4); +}); +let latitude = computed(() => { + return Number(state.shadowRadio.latitude).toFixed(4); +}); +let altitude = computed(() => { + return Number(state.shadowRadio.height).toFixed(2); +}); + +// 时间轴改变 +function timeChanging(arr: number[]) { + let tm; + if (timeArray[0] === arr[0]) { + tm = getCurrentTime(arr[1]); + } else { + tm = getCurrentTime(arr[0]); + } + viewer.clock.currentTime = SuperMap3D.JulianDate.fromDate(tm); + timeArray = arr; +} + +// 根据一个数字(0-96)转化为当前时间 +function getCurrentTime(num: number) { + let h = Math.floor(num / 4); + let m = Math.floor((num % 4) * 15); + state.currentDate.setHours(h); + state.currentDate.setMinutes(m); + return state.currentDate; +} + +// 时间轴格式化 +function formatTime(val: any) { + if (val === state.timeArray[0]) { + return ( + `${$t("startTime")}:` + + timeSlice(getCurrentTime(val).toLocaleTimeString()) + ); + } else + return ( + `${$t("endTime")}:` + timeSlice(getCurrentTime(val).toLocaleTimeString()) + ); + function timeSlice(str: string) { + let str2 = str.split(":"); + return str2[0] + ":" + str2[1]; + } +} + +// 播放或暂停时间段内阳光和阴影动画 +function sunLightForTime(isStart: boolean) { + clearTimer(); + if (!isStart) return; + if (!state.shadowShow) state.shadowShow = true; + state.showStartTimeBtn = false; + let time = [...timeArray]; + let stm = time[0]; + let etm = time[1]; + let ntm = stm; + timerTime = setInterval(() => { + if (ntm < etm) { + ntm += 0.5; + state.timeArray = [stm, ntm]; + } else { + state.showStartTimeBtn = true; + clearInterval(timerTime); + } + }, 50); +} + +// 播放一年的阳光和阴影动画 +function sunLightForDate(isStart: boolean) { + clearTimer(); + if (!isStart) return; + if (!state.shadowShow) state.shadowShow = true; + state.showStartDateBtn = false; + let d = getCurrentTime(timeArray[1]); + let mon = d.getMonth(); + timerDate = setInterval(() => { + if (mon < 11) mon += 1; + else mon = 0; + d.setMonth(mon); + state.currentDate = new Date(d); + state.currentTime = state.currentDate.getTime(); + }, 1000); +} + +// 清除动画 +function clearTimer() { + clearInterval(timerTime); + clearInterval(timerDate); + state.showStartTimeBtn = true; + state.showStartDateBtn = true; +} + +// 分析 +function analysis() { + if (!state.shadowShow) state.shadowShow = true; + if (!handlerPolygon) handlerPolygon = initHandler("Polygon"); + handlerPolygon.handlerDrawing().then( + (res) => { + state.shadowQueryRegion = res.object.positions; + shadowQueryStart(state.shadowQueryRegion, timeArray[0], timeArray[1]); + }, + (err) => { + console.log(err); + } + ); + handlerPolygon.activate(); +} + +// 开始阴影分析 +function shadowQueryStart(regionPositionList, startTime, endTime) { + let sTime = SuperMap3D.JulianDate.fromDate(getCurrentTime(startTime)); + let eTime = SuperMap3D.JulianDate.fromDate(getCurrentTime(endTime)); + shadow.setshadowQuery(regionPositionList, sTime, eTime); + handlerPolygon.polylineTransparent.show = false; + viewer.eventManager.addEventListener("CLICK", LEFT_CLICK, true); +} + +// 更新弹窗位置 +function updatePopup() { + if (currentSelectedEntity) { + let position = currentSelectedEntity.primitive._position; + updatePopupPosition(position); + } +} + +// 更新弹窗位置 +function updatePopupPosition(position) { + var WindowCoordinates = SuperMap3D.SceneTransforms.wgs84ToWindowCoordinates( + viewer.scene, + position + ); + bableShadowDom.value.style.top = + WindowCoordinates.y - bableShadowDom.value.offsetHeight - 10 + "px"; + bableShadowDom.value.style.left = + WindowCoordinates.x - bableShadowDom.value.offsetWidth / 2 + 140 + "px"; +} + +// 鼠标左键事件 点击获取阴影率 +function LEFT_CLICK(e) { + // bubble.addEvent(); //设置气泡监听事件 + if (state.shadowBodyShow) { + let box = viewer.scene.pick(e.message.position); + if (box && box.id) { + currentSelectedEntity = box; + let index = box.id.split("-")[1]; + let point = shadow.shadowPoints[index]; + if (!point) { + state.shadowRadioShow = false; + return; + } + let radio = point.shadowRatio * 100; + if (radio < state.filterInterval[0] || radio > state.filterInterval[1]) { + state.shadowRadioShow = false; + } + state.shadowRadioShow = true; + let position = tool.CartesiantoDegrees(point.position); + state.shadowRadio = { + radio: (point.shadowRatio * 100).toFixed(0) + "%", + longitude: position[0].toFixed(8), + latitude: position[1].toFixed(8), + height: position[2].toFixed(8), + }; + bableShadowDom.value.style.top = e.message.position.y - 220 + "px"; + bableShadowDom.value.style.left = e.message.position.x + "px"; + viewer.clock.onTick.addEventListener(updatePopup); + return; + } else { + viewer.clock.onTick.removeEventListener(updatePopup); + } + } else { + let position1 = viewer.scene.pickPosition(e.message.position); + let cartographic = SuperMap3D.Cartographic.fromCartesian(position1); + let shadowRadio = shadow.shadowQuery.getShadowRadio(cartographic); + if (shadowRadio !== -1) { + let longitude = SuperMap3D.Math.toDegrees(cartographic.longitude); + let latitude = SuperMap3D.Math.toDegrees(cartographic.latitude); + state.shadowRadio = { + radio: (shadowRadio * 100).toFixed(0) + "%", + longitude: longitude.toFixed(8), + latitude: latitude.toFixed(8), + height: cartographic.height.toFixed(8), + }; + return; + } + } +} + +//时间轴改变后设置shadowQuery(不是实时监听) +function timeChanged(val) { + if (state.shadowShow && state.shadowQueryRegion.length > 0) { + shadow.clear(); + shadowQueryStart(state.shadowQueryRegion, val[0], val[1]); + } +} + +// 清除 +function clear() { + viewer.clock.onTick.removeEventListener(updatePopup); + state.shadowRadio = { radio: 0, longitude: 0, latitude: 0, height: 0 }; + viewer.eventManager.removeEventListener("CLICK", LEFT_CLICK); //移除鼠标点击事件监听 + if (handlerPolygon) handlerPolygon.clearHandler(); + shadow.clear(); + state.shadowQueryRegion.length = 0; + state.shadowRadioShow = false; +} + +// 监听 +watch( + () => state.timeArray, + (val) => { + timeChanging(val); + } +); +watch( + () => state.currentDate, + () => { + timeChanging(timeArray); + } +); +watch( + () => state.timeInterval, + (val) => { + shadow.timeInterval = val; + } +); +watch( + () => state.spacing, + (val) => { + shadow.spacing = val; + shadow.updateOptionsParams({ spacing: val }); + if (state.shadowQueryRegion.length >= 3) { + shadowQueryStart(state.shadowQueryRegion, timeArray[0], timeArray[1]); + } + } +); +watch( + () => state.bottomHeight, + (val) => { + shadow.bottomHeight = val; + shadow.updateOptionsParams({ bottomHeight: val }); + if (state.shadowQueryRegion.length >= 3) { + shadowQueryStart(state.shadowQueryRegion, timeArray[0], timeArray[1]); + } + } +); +watch( + () => state.extrudeHeight, + (val) => { + shadow.extrudeHeight = val; + shadow.updateOptionsParams({ extrudeHeight: val }); + if (state.shadowQueryRegion.length >= 3) { + shadowQueryStart(state.shadowQueryRegion, timeArray[0], timeArray[1]); + } + } +); +watch( + () => state.shadowShow, + (val) => { + shadow.setShadow(val); + } +); +watch( + () => state.shadowBodyShow, + (val) => { + shadow.setBodyShow(val); + } +); +watch( + () => state.filterInterval, + (val) => { + shadow.setFilterBodyShow(val); + } +); +</script> + +<style lang="scss" scoped> +.shadow-time { + margin-bottom: 0.14rem; + border: 1px solid rgba(255, 255, 255, 0.15); + border-radius: 4px; + background: rgba(255, 255, 255, 0.04); +} + +.itemBox-shadow { + display: flex; + justify-content: space-between; + margin: 0.06rem; + padding: 0px 10px; + + .lable { + width: 2rem; + font-size: 0.14rem; + } + + .content { + width: 1.4rem; + } + + .shadow-date-picker { + width: 2.8rem; + text-align: center; + + :hover { + cursor: pointer; + } + } + + .btnImg { + width: 0.22rem; + height: 0.22rem; + margin: 0rem 0rem 0rem 0.2rem; + color: #ffffff; + } +} + +.n-slider .n-slider-dots .n-slider-dot { + top: 0.06rem; + width: 0.02rem; + height: 0.05rem; + border-radius: 0; +} + +.bableShadow { + cursor: default; + position: fixed; + top: 2rem; + left: 5rem; + background-color: #383838; + opacity: 0.8; + z-index: 200000; + height: 2.2rem; + width: 2.28rem; + + .shadow-anaylse-pop-titie { + margin-left: 0.12rem; + font-size: 12px; + line-height: 20px; + } + + span { + font-size: 12px; + } +} + +.icondown { + display: block; + margin: 2px; + font-size: 0.12rem; + transform: rotate(-90deg); +} +</style> diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/index.ts b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/index.ts index f509f497..52c97dc9 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/index.ts @@ -1,3 +1,3 @@ -import SmAnalyseSkyline from './index.vue'; +import SmAnalyseSightLine from './sightLine.vue'; -export default SmAnalyseSkyline; +export default SmAnalyseSightLine; diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/js/sightline.js b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/js/sightline.js index 8d87099d..47bdd989 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/js/sightline.js +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/js/sightline.js @@ -99,7 +99,7 @@ class SightlineAnalysis { name: "sightPoint_move", }); } - + /** * 清除移动鼠标显示实时分析结果 */ @@ -168,9 +168,9 @@ class SightlineAnalysis { this.barrierPointsVisible = val } - /** - * 销毁 - */ + /** + * 销毁 + */ clear() { this.sightline.removeAllTargetPoint(); this.viewPosition = null; @@ -214,6 +214,4 @@ const CartesiantoDegrees = (Cartesians) => { return positions }; - - -export default SightlineAnalysis +export default SightlineAnalysis; diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/index.vue b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/sightLine.vue similarity index 66% rename from SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/index.vue rename to SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/sightLine.vue index eb6ba37b..0fe92fb7 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-sightLine/sightLine.vue @@ -1,10 +1,10 @@ <template> <!-- 通视分析 --> <div class="row-item"> - <span>{{$t('global.longitude')}}</span> + <span>{{ $t("longitude") }}</span> <n-input-number style="width: 1.96rem" - v-model:value="state.degreesArray[0]" + v-model:value="longitude" :show-button="false" disabled > @@ -13,10 +13,10 @@ </div> <div class="row-item"> - <span>{{$t('global.latitude')}}</span> + <span>{{ $t("latitude") }}</span> <n-input-number style="width: 1.96rem" - v-model:value="state.degreesArray[1]" + v-model:value="latitude" :show-button="false" disabled > @@ -25,37 +25,17 @@ </div> <div class="row-item"> - <span>{{$t('global.elevation')}}</span> + <span>{{ $t("elevation") }}</span> <n-input-number - style="width: 1.96rem" - v-model:value="state.degreesArray[2]" + style="width: 1.96rem; margin-bottom: 0.1rem" + v-model:value="altitude" :show-button="false" disabled > - <template #suffix>{{$t('global.meter')}}</template> + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> - <n-divider /> - - <!-- <div class="row-item"> - <span>{{$t('global.highlightBarrier')}}</span> - <div class="check-color-pick"> - <n-checkbox v-model:checked="state.highlightBarrier"></n-checkbox> - <div class="color-pick-box"> - <n-color-picker - v-model:value="state.barrierColor" - :render-label=" - () => { - return ''; - } - " - :disabled="!state.highlightBarrier" - size="small" - ></n-color-picker> - </div> - </div> - </div> --> <div class="btn-row-item"> <n-button type="info" @@ -63,14 +43,20 @@ text-color="#fff" class="ans-btn" @click="analysis" - >{{$t('global.analysis')}}</n-button + >{{ $t("analysis") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </template> <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch, computed } from "vue"; import tool from "@/tools/tool"; import sightline from "./js/sightline.js"; @@ -88,15 +74,32 @@ let state = reactive<stateType>({ barrierColor: "rgba(250, 196, 65, 1)", }); -// 初始化数据 -let sight: any, clickFlag: any, timer: any; +// 初始化变量 +let clickFlag: any, timer: any; +let sight = new sightline(viewer, {}); function init() { if (!viewer) return; - sight = new sightline(viewer, {}); } -init(); +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(); + sight.destroy(); +}); + +let longitude = computed(() => { + return Number(state.degreesArray[0]).toFixed(4); +}); +let latitude = computed(() => { + return Number(state.degreesArray[1]).toFixed(4); +}); +let altitude = computed(() => { + return Number(state.degreesArray[2]).toFixed(2); +}); // 分析 function analysis() { @@ -120,8 +123,8 @@ function LEFT_CLICK(e: any) { // 获取第一个点坐标 if (state.viewPointlnglatFlag) { let result = tool.CartesiantoDegrees(position); - - state.degreesArray = result.map((num: any) => Number(num.toFixed(2))); + // state.degreesArray = result.map((num: any) => Number(num.toFixed(3))); + state.degreesArray = result; state.viewPointlnglatFlag = false; } sight.addPoints(position); @@ -143,6 +146,14 @@ function RIGHT_CLICK() { sight.setBarrierPointsVisible(true); } +// 移除绑定的监听事件 +function removeEvent() { + state.viewPointlnglatFlag = true; + viewer.eventManager.removeEventListener("CLICK", LEFT_CLICK); //移除鼠标点击事件监听 + viewer.eventManager.removeEventListener("MOUSE_MOVE", MOUSE_MOVE); //移除鼠标点击事件监听 + viewer.eventManager.removeEventListener("RIGHT_CLICK", RIGHT_CLICK); //移除鼠标点击事件监听 +} + // 清除 function clear() { state.viewPointlnglatFlag = true; @@ -152,14 +163,6 @@ function clear() { removeEvent(); } -// 移除绑定的监听事件 -function removeEvent() { - state.viewPointlnglatFlag = true; - viewer.eventManager.removeEventListener("CLICK", LEFT_CLICK); //移除鼠标点击事件监听 - viewer.eventManager.removeEventListener("MOUSE_MOVE", MOUSE_MOVE); //移除鼠标点击事件监听 - viewer.eventManager.removeEventListener("RIGHT_CLICK", RIGHT_CLICK); //移除鼠标点击事件监听 -} - // 监听 watch( () => state.barrierColor, @@ -172,40 +175,9 @@ watch( watch( () => state.highlightBarrier, - (newValue) => { - if (newValue) sight.setBarrierHighLight(); + (val) => { + if (val) sight.setBarrierHighLight(); else sight.clearBarrierHighLight(); } ); - -// 销毁 -onBeforeUnmount(() => { - clear(); - sight.destroy(); -}); </script> - - -<style lang="scss" scoped> - -.btn-info { - color: #fff; - background: rgba(52, 153, 229, 1); -} -.check-color-pick { - display: flex; - justify-content: space-between; - align-items: center; -} -.color-pick-bg { - width: 1.68rem; - height: 0.32rem; - border-radius: 0.04rem; - background: rgba(255, 255, 255, 0.04); - box-sizing: border-box; - border: 1px solid rgba(255, 255, 255, 0.15); - display: flex; - align-items: center; - padding: 0 0.12rem; -} -</style> \ No newline at end of file diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/index.ts b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/index.ts index 7bbd429c..b8f05aa5 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/index.ts @@ -1,2 +1,3 @@ -import SceneSet from "./index.vue" -export default SceneSet; +import SmAnalyseSkyline from "./skyline.vue"; + +export default SmAnalyseSkyline; diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/js/skyline.js b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/js/skyline.js index be71e17f..065b5959 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/js/skyline.js +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/js/skyline.js @@ -30,7 +30,7 @@ export class SkylineAnalysis { this.skyline.radius = 10000; this.skyline.color = SuperMap3D.Color.fromCssColorString("rgb(200, 0, 0, 1.0)"); this.skyline.displayStyle = 0; - this.skyline.lineWidth = 1; + this.skyline.lineWidth = 2; this.skyBodyColor = SuperMap3D.Color.fromCssColorString("rgba(44,149,197,0.6)"); //天际体颜色 this.barrierColor = SuperMap3D.Color.fromCssColorString("rgba(255, 186, 1, 1)"); //障碍物颜色 this.highlightBarrier = false; //是否显示高亮障碍物 diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/index.vue b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/skyline.vue similarity index 62% rename from SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/index.vue rename to SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/skyline.vue index 061d8991..87bb64cd 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-skyline/skyline.vue @@ -1,80 +1,135 @@ <template> <!-- 天际线 --> <div class="row-item"> - <span>{{$t('global.DisplayMode')}}</span> - <n-select style="width: 1.96rem;" v-model:value="state.skylineMode" :options="state.options" /> + <span>{{ $t("DisplayMode") }}</span> + <n-select + style="width: 1.96rem" + v-model:value="state.skylineMode" + :options="state.options" + /> </div> + <div class="row-item"> - <span>{{ $t('global.AnalysisRadius') }}</span> - <n-input-number style="width: 1.96rem;" v-model:value="state.skylineRadius" :show-button="false"> - <template #suffix>°</template> + <span>{{ $t("AnalysisRadius") }}</span> + <n-input-number + style="width: 1.96rem" + v-model:value="state.skylineRadius" + :show-button="false" + > + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> <div class="row-item"> - <span>{{ $t('global.LineWidth') }}</span> + <span>{{ $t("LineWidth") }}</span> <div class="slider-box"> - <n-slider style="width: 1.5rem" v-model:value="state.lineWidth" :step="1" :min="1" :max="10" /> + <n-slider + style="width: 1.5rem" + v-model:value="state.lineWidth" + :step="1" + :min="1" + :max="10" + /> <span>{{ state.lineWidth }}</span> </div> </div> <div class="row-item"> - <span>{{ $t('global.SkylineColor') }}</span> + <span>{{ $t("SkylineColor") }}</span> <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> - <n-color-picker v-model:value="state.skylineColor" :render-label="() => { - return ''; - } - " size="small"></n-color-picker> + <n-color-picker + v-model:value="state.skylineColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> </div> + <div class="row-item" v-show="state.skylineMode === 'BODY'"> - <span>{{ $t('global.SkylineBodyColor') }}</span> + <span>{{ $t("SkylineBodyColor") }}</span> <div class="check-color-pick"> <n-checkbox v-model:checked="state.displaySkyBody"></n-checkbox> <div class="color-pick-box"> - <n-color-picker v-model:value="state.skyBodyColor" :render-label="() => { - return ''; - } - " :disabled="!state.displaySkyBody" size="small"></n-color-picker> + <n-color-picker + v-model:value="state.skyBodyColor" + :render-label=" + () => { + return ''; + } + " + :disabled="!state.displaySkyBody" + size="small" + ></n-color-picker> </div> </div> </div> + <div class="row-item"> - <span>{{ $t('global.HighlightObstacles') }}</span> + <span>{{ $t("HighlightObstacles") }}</span> <div class="check-color-pick"> <n-checkbox v-model:checked="state.highlightBarrier"></n-checkbox> <div class="color-pick-box" style="margin-left: 0.1rem"> - <n-color-picker v-model:value="state.barrierColor" :render-label="() => { - return ''; - } - " :disabled="!state.highlightBarrier" size="small"></n-color-picker> + <n-color-picker + v-model:value="state.barrierColor" + :render-label=" + () => { + return ''; + } + " + :disabled="!state.highlightBarrier" + size="small" + ></n-color-picker> </div> </div> </div> + <div class="row-item"> - <span>{{ $t('global.Display2D') }}</span> + <span>{{ $t("Display2D") }}</span> <div class="check-box"> <n-checkbox v-model:checked="state.getSkyline2d"></n-checkbox> </div> </div> + <div class="row-item"> - <span>{{ $t('global.GlobeNoAnalysis') }}</span> + <span>{{ $t("GlobeNoAnalysis") }}</span> <div class="check-box"> <n-checkbox v-model:checked="state.ignoreGlobe"></n-checkbox> </div> - <!-- <n-checkbox style="width: 2.19rem" v-model:checked="state.ignoreGlobe"></n-checkbox> --> </div> + <div class="btn-row-item2"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="analysis" style="margin-right: 0.1rem">{{ $t('global.analysis') }}</n-button> - <n-button type="info" color="#3499E5" text-color="#fff" @click="setLimitBody" - style="margin-right: 0.1rem">{{ $t('global.limitingBody') }}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{ $t('global.clear') }}</n-button> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="analysis" + style="margin-right: 0.1rem" + >{{ $t("analysis") }}</n-button + > + <n-button + type="info" + class="limitingBody" + color="#3499E5" + text-color="#fff" + @click="setLimitBody" + style="margin-right: 0.1rem" + >{{ $t("limitingBody") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > </div> <div id="echartsSkyLine" v-show="state.getSkyline2d"></div> </template> - <script lang="ts" setup> import { reactive, onBeforeUnmount, watch, onMounted } from "vue"; @@ -85,26 +140,26 @@ import initHandler from "@/tools/drawHandler"; import SkylineAnalysis from "./js/skyline"; type stateType = { - skylineRadius: number, //分析半径 - lineWidth: number, //天际线宽度 - skylineColor: string, //天际线颜色 - displaySkyBody: boolean, // 是否显示天际体 - skyBodyColor: string, //天际体颜色 - highlightBarrier: boolean, //是否显示高亮障碍物 - barrierColor: string, //障碍物颜色 - skylineMode: string, //分析模式 - getSkyline2d: boolean, //是否显示二维分析结果 - ignoreGlobe: boolean, // 地球表面不参与分析 - skylineSpatialUrl: string, //分析服务地址 - observerInformation: any, //观察者信息 - options: any, - clearFlag:boolean,// 天际线是否清除标志 -} + skylineRadius: number; //分析半径 + lineWidth: number; //天际线宽度 + skylineColor: string; //天际线颜色 + displaySkyBody: boolean; // 是否显示天际体 + skyBodyColor: string; //天际体颜色 + highlightBarrier: boolean; //是否显示高亮障碍物 + barrierColor: string; //障碍物颜色 + skylineMode: string; //分析模式 + getSkyline2d: boolean; //是否显示二维分析结果 + ignoreGlobe: boolean; // 地球表面不参与分析 + skylineSpatialUrl: string; //分析服务地址 + observerInformation: any; //观察者信息 + options: any; + clearFlag: boolean; // 天际线是否清除标志 +}; // 设置默认值数据 let state = reactive<stateType>({ skylineRadius: 10000, //分析半径 - lineWidth: 1, //天际线宽度 + lineWidth: 2, //天际线宽度 skylineColor: "rgb(200, 0, 0)", //天际线颜色 displaySkyBody: false, // 是否显示天际体 skyBodyColor: "rgba(44,149,197,0.6)", //天际体颜色 @@ -118,32 +173,44 @@ let state = reactive<stateType>({ observerInformation: null, //观察者信息 options: [ { - label: () => GlobalLang.LineDisplay, - value: "LINE" + label: () => $t("LineDisplay"), + value: "LINE", }, { - label: () => GlobalLang.FaceDisplay, - value: "FACE" + label: () => $t("FaceDisplay"), + value: "FACE", }, { - label: () => GlobalLang.BodyDisplay, - value: "BODY" - } + label: () => $t("BodyDisplay"), + value: "BODY", + }, ], - clearFlag:true, + clearFlag: true, }); +// 初始化变量 +let handlerPolygon, myChart, echarts_dom; +let skylineAnalysis = new SkylineAnalysis(viewer, { axios: axios }); -// 初始化数据 -let skylineAnalysis, handlerPolygon, myChart, echarts_dom; - -init(); function init() { if (!viewer) return; - skylineAnalysis = new SkylineAnalysis(viewer, { axios: axios }); viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测 } +onMounted(() => { + init(); + getEchartsDom(); + initMyChart(); +}); + +onBeforeUnmount(() => { + clear(); + if (myChart) myChart.dispose(); + skylineAnalysis.destroy(); + state.getSkyline2d = false; + viewer.scene.globe.depthTestAgainstTerrain = false; //关闭深度检测 +}); + //分析 function analysis() { state.clearFlag = false; @@ -154,8 +221,7 @@ function analysis() { setOptions(object); // 设置二维天际线 }, 500); } - if (state.skylineMode === 'FACE') updatePosition(); // 如果是面模式,更新一下位置,改变一下视角好显示面 - + if (state.skylineMode === "FACE") updatePosition(); // 如果是面模式,更新一下位置,改变一下视角好显示面 } // 设置限高体 @@ -164,7 +230,7 @@ function setLimitBody() { skylineAnalysis.skyline.removeLimitbody("limitBody"); if (!handlerPolygon) handlerPolygon = initHandler("Polygon"); handlerPolygon.handlerDrawing().then( - res => { + (res) => { let positions: any[] = tool.CartesiantoDegreesObjs(res.object.positions); //再次遍历转化为接口所需的数组格式 for (let i = 0, len = positions.length; i < len; i++) { @@ -174,10 +240,10 @@ function setLimitBody() { //添加限高体对象 skylineAnalysis.skyline.addLimitbody({ position: posArr, - name: "limitBody" + name: "limitBody", }); }, - err => { + (err) => { console.log(err); } ); @@ -198,37 +264,6 @@ function initMyChart() { myChart.resize(); //自适应屏幕 }; } - myChart.setOption({ - title: { - text: GlobalLang.Skyline2D, - textStyle: { - fontSize: 15, - color: '#fff' - }, - top: '3%', - left: '3%', - }, - grid: { - top: '20%', - left: '3%', - right: '3%', - bottom: '6%', - containLabel: true - }, - tooltip: {}, - xAxis: { - show: true - }, - yAxis: { - show: true - }, - series: [ - { - type: "line", - data: [] - } - ] - }); } // 设置二维天际线 @@ -238,35 +273,36 @@ function setOptions(object: any) { tooltip: { trigger: "axis", // formatter: 'X: {b}<br/>Y : {c}' - formatter: param => { + formatter: (param) => { let datax = Number(param[0].axisValue); let datay = param[0].data; return [ "X: " + datax.toFixed(6) + "<br/>", - "Y: " + datay.toFixed(6) + "Y: " + datay.toFixed(6), ].join(""); - } + }, }, grid: { - top: '20%', - left: '3%', - right: '3%', - bottom: '6%', - containLabel: true + top: "20%", + left: "3%", + right: "3%", + bottom: "6%", + containLabel: true, }, - axisLabel: {// 设置坐标轴字的颜色 - color: '#fff' + axisLabel: { + // 设置坐标轴字的颜色 + color: "#fff", }, backgroundColor: "#000817", toolbox: { show: true, feature: { // restore: {}, - saveAsImage: {} + saveAsImage: {}, }, right: "3%", iconStyle: { - borderColor: "#fff", // 图标默认颜色 + borderColor: "#fff", // 图标默认颜色 }, }, xAxis: [ @@ -274,8 +310,8 @@ function setOptions(object: any) { type: "category", boundaryGap: false, data: object.x, - show: false - } + show: false, + }, ], yAxis: { min: function (value) { @@ -283,8 +319,8 @@ function setOptions(object: any) { }, show: true, axisLine: { - show: true - } + show: true, + }, }, dataZoom: [ { @@ -292,8 +328,8 @@ function setOptions(object: any) { xAxisIndex: 0, filterMode: "filter", start: 0, - end: 100 - } + end: 100, + }, ], series: [ { @@ -308,10 +344,10 @@ function setOptions(object: any) { width: 2, shadowColor: "rgba(145, 146, 148,0.7)", shadowBlur: 10, - shadowOffsetY: 8 - } - } - ] + shadowOffsetY: 8, + }, + }, + ], }; myChart.setOption(option); } @@ -320,7 +356,8 @@ function setOptions(object: any) { // 更新位置 - 本质就是缩放,改变相机位置 function updatePosition() { let position = viewer.camera.position; - let cameraHeight = viewer.scene.globe.ellipsoid.cartesianToCartographic(position).height; + let cameraHeight = + viewer.scene.globe.ellipsoid.cartesianToCartographic(position).height; let moveRate = cameraHeight / 200.0; // 参数可改 viewer.camera.moveBackward(moveRate); } @@ -338,80 +375,75 @@ function clear() { // 监听 watch( () => state.skylineRadius, - val => { + (val) => { skylineAnalysis.skyline.radius = val; } ); watch( () => state.lineWidth, - val => { - if(!state.clearFlag){ + (val) => { + if (!state.clearFlag) { // 修改天际线宽度有问题,放大在缩小越来越远,因此这里使用类似与地表不参与分析的方法暂时解决 clear(); analysis(); skylineAnalysis.skyline.lineWidth = Number(val); } - // skylineAnalysis.skyline.lineWidth = Number(val); } ); watch( () => state.skylineColor, - newValue => { + (newValue) => { let color = SuperMap3D.Color.fromCssColorString(newValue); + if (Number(color.alpha) < 0.1) return; skylineAnalysis.skyline.color = color; } ); - watch( () => state.skyBodyColor, - newValue => { + (newValue) => { let color = SuperMap3D.Color.fromCssColorString(newValue); + if (Number(color.alpha) < 0.1) return; skylineAnalysis.setSkyLineBodyColor(color); } ); - watch( () => state.barrierColor, - newValue => { + (newValue) => { let BarrierColor = SuperMap3D.Color.fromCssColorString(newValue); + if (Number(BarrierColor.alpha) < 0.1) return; skylineAnalysis.setBarrierColor(BarrierColor); } ); - watch( () => state.ignoreGlobe, - newValue => { + (newValue) => { skylineAnalysis.skyline.ignoreGlobe = newValue; - // 上层解决天际线地表不参与分析缺陷 clear(); analysis(); - // skylineAnalysis.updateOptionsParams({ - // ignoreGlobe:newValue, - // }); } ); - watch( () => state.highlightBarrier, - newValue => { + (newValue) => { skylineAnalysis.highlightBarrier = newValue; if (newValue) { - let BarrierColor = SuperMap3D.Color.fromCssColorString(state.barrierColor); + let BarrierColor = SuperMap3D.Color.fromCssColorString( + state.barrierColor + ); skylineAnalysis.setBarrierColor(BarrierColor); return; } skylineAnalysis.clearBarrierColor(); } ); - watch( () => state.getSkyline2d, - newValue => { + (newValue) => { if (newValue) { setTimeout(() => { let object = skylineAnalysis.skyline.getSkyline2D(); - setOptions(object); // 设置二维天际线 + if (!state.clearFlag) setOptions(object); // 设置二维天际线 }, 500); if (!myChart) initMyChart(); @@ -421,41 +453,27 @@ watch( ); watch( () => state.skylineMode, - newValue => { + (newValue) => { skylineAnalysis.setSkylineMode(newValue); - if (newValue === 'FACE') updatePosition(); + if (newValue === "FACE") updatePosition(); } - ); - -onMounted(() => { - getEchartsDom(); - initMyChart(); -}); - -// 销毁 -onBeforeUnmount(() => { - clear(); - if (myChart) myChart.dispose(); - skylineAnalysis.destroy(); - state.getSkyline2d = false; - viewer.scene.globe.depthTestAgainstTerrain = false; //关闭深度检测 -}); - </script> <style lang="scss" scoped> - #echartsSkyLine { position: fixed !important; bottom: 0.3rem; - left: 3.5rem; - width: 6.75rem !important; - height: 2.33rem !important; - background-color: rgba(0, 8, 23, 0.7) !important; + left: 32vw; + width: 36vw; + height: 30vh; + background-color: rgba(0, 8, 23, 0.7); opacity: 0.7; padding: 0.05rem 0.1rem 0.1rem 0.05rem; z-index: 99; - // display: none; } -</style> \ No newline at end of file + +.limitingBody { + padding-left: 0.1rem; +} +</style> diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-viewshed/index.ts b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-viewshed/index.ts index 1499bf2b..d119d355 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-viewshed/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-viewshed/index.ts @@ -1,3 +1,3 @@ -import SmAnalyseViewshed from './index.vue'; +import SmAnalyseViewshed from './viewshed.vue'; export default SmAnalyseViewshed; diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-viewshed/index.vue b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-viewshed/viewshed.vue similarity index 75% rename from SuperMap iEarth/src/package/analyse3d/analyse/analyse-viewshed/index.vue rename to SuperMap iEarth/src/package/analyse3d/analyse/analyse-viewshed/viewshed.vue index 9c229c3e..706052a6 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse-viewshed/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/analyse/analyse-viewshed/viewshed.vue @@ -1,12 +1,11 @@ <template> - <div class="row-container" style="max-height: 4.0rem"> - <!-- 可视域 --> - <n-scrollbar style="max-height: 3.8rem"> + <!-- 可视域 --> + <n-scrollbar style="max-height: 3.8rem"> <div class="row-item" style="margin-right: 0.1rem"> - <span>{{$t('global.longitude')}}</span> + <span>{{ $t("longitude") }}</span> <n-input-number - style="width: 1.96rem;" - v-model:value="state.observerInformation[0]" + style="width: 1.96rem" + v-model:value="longitude" :show-button="false" disabled placeholder="0" @@ -14,11 +13,12 @@ <template #suffix>°</template> </n-input-number> </div> + <div class="row-item" style="margin-right: 0.1rem"> - <span>{{$t('global.latitude')}}</span> + <span>{{ $t("latitude") }}</span> <n-input-number - style="width: 1.96rem;" - v-model:value="state.observerInformation[1]" + style="width: 1.96rem" + v-model:value="latitude" :show-button="false" disabled placeholder="0" @@ -26,41 +26,54 @@ <template #suffix>°</template> </n-input-number> </div> + <div class="row-item" style="margin-right: 0.1rem"> - <span>{{$t('global.elevation')}}</span> + <span>{{ $t("elevation") }}</span> <n-input-number - style="width: 1.96rem;" - v-model:value="state.observerInformation[2]" + style="width: 1.96rem" + v-model:value="altitude" :show-button="false" disabled placeholder="0" > - <template #suffix>{{$t('global.meter')}}</template> + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> + <n-divider /> <!-- 附加高度:待修改点 --> - <div class="row-item" style="margin-right: 0.1rem" v-show="!state.viewshedAnimation"> - <span>{{$t('global.additionalHeight')}}</span> + <div + class="row-item" + style="margin-right: 0.1rem" + v-show="!state.viewshedAnimation" + > + <span>{{ $t("additionalHeight") }}</span> <div class="slider-box"> <n-slider - style="width: 1.2rem;" + style="width: 1.2rem" v-model:value="state.addheight" :step="0.1" :min="1" :max="100" /> - <div class="slider-suffix"> - <span>{{ state.addheight }}</span> - <span class="slider-unit">{{$t('global.meter')}}</span> - </div> + <n-input-number + v-model:value="state.addheight" + :update-value-on-input="false" + class="slider-input-number" + :bordered="false" + :show-button="false" + placeholder="" + size="small" + /> + <span class="slider-unit">{{ $t("meter") }}</span> </div> </div> + <div class="row-item" style="margin-right: 0.1rem"> - <span>{{$t('global.horizontalFov')}}</span> + <span>{{ $t("horizontalFov") }}</span> <n-input-number - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.horizontalFov" :min="1" :max="360" @@ -69,10 +82,11 @@ <template #suffix>°</template> </n-input-number> </div> + <div class="row-item" style="margin-right: 0.1rem"> - <span>{{$t('global.verticalFov')}}</span> + <span>{{ $t("verticalFov") }}</span> <n-input-number - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.verticalFov" :min="1" :max="360" @@ -81,8 +95,9 @@ <template #suffix>°</template> </n-input-number> </div> + <div class="row-item" style="margin-right: 0.1rem"> - <span>{{$t('global.hintLineColor')}}</span> + <span>{{ $t("hintLineColor") }}</span> <div class="color-pick-box color-pick-box-full"> <n-color-picker v-model:value="state.hintLineColor" @@ -95,10 +110,14 @@ ></n-color-picker> </div> </div> + <div class="row-item" style="margin-right: 0.1rem"> - <span>{{$t('global.visibleBody')}}</span> + <span>{{ $t("visibleBody") }}</span> <div class="check-color-pick"> - <n-checkbox v-model:checked="state.visibleBody"></n-checkbox> + <n-checkbox + v-model:checked="state.visibleBody" + :disabled="state.viewshedAnimation" + ></n-checkbox> <div class="color-pick-box"> <n-color-picker v-model:value="state.visibleAreaColor" @@ -113,10 +132,14 @@ </div> </div> </div> + <div class="row-item" style="margin-right: 0.1rem"> - <span>{{$t('global.invisibleBody')}}</span> + <span>{{ $t("invisibleBody") }}</span> <div class="check-color-pick"> - <n-checkbox v-model:checked="state.invisibleBody"></n-checkbox> + <n-checkbox + v-model:checked="state.invisibleBody" + :disabled="state.viewshedAnimation" + ></n-checkbox> <div class="color-pick-box"> <n-color-picker v-model:value="state.hiddenAreaColor" @@ -131,66 +154,72 @@ </div> </div> </div> + <div class="row-item" style="margin-right: 0.1rem"> - <span>{{$t('global.viewshedAnimation')}}</span> + <span>{{ $t("viewshedAnimation") }}</span> <div class="check-box"> <n-checkbox v-model:checked="state.viewshedAnimation"></n-checkbox> </div> </div> - </n-scrollbar> - </div> + </n-scrollbar> - <div class="btn-row-item" style="margin-right: 0.1rem;margin-top: 0.12rem"> + <div class="btn-row-item" style="margin-right: 0.1rem; margin-top: 0.12rem"> <n-button type="info" color="#3499E5" text-color="#fff" class="ans-btn" @click="analysis" - >{{$t('global.analysis')}}</n-button + >{{ $t("analysis") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </template> - + <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch, computed } from "vue"; +import { useMessage, useNotification } from "naive-ui"; import axios from "axios"; -import { useMessage,useNotification } from "naive-ui"; -import tool from '@/tools/tool'; -import initHandler from '@/tools/drawHandler'; +import tool from "@/tools/tool"; +import initHandler from "@/tools/drawHandler"; const message = useMessage(); const notification = useNotification(); const scene = viewer.scene; type stateType = { - viewshedSpatialUrl: string, // 空间分析服务url - observerInformation: number[], //观察者信息 - direction: number, //方向 - pitch: number, //俯仰角度 - defaultheight: number, //默认高度 - addheight: number, //附加高度 - distance: number, //距离 - verticalFov: number, // 垂直视角 - horizontalFov: number, //水平视角 - hintLineColor: string, //提示线颜色 - visibleColorBarShow: boolean, // 可视体颜色设置条 - invisibleColorBarShow: boolean, // 不可视体颜色设置条 - visibleAreaColor: string, //可视区域颜色 - hiddenAreaColor: string, //不可视区域颜色 - visibleBody: boolean, //显示可视域体 - invisibleBody: boolean, //显示不可视域体 - viewshedAnimation: boolean, //动画演示 - DynamicLine: any[], //路线点 - DynamicSpeed: number //动态分析行进速度 -} + viewshedSpatialUrl: string; // 空间分析服务url + observerInformation: number[]; //观察者信息 + direction: number; //方向 + pitch: number; //俯仰角度 + defaultheight: number; //默认高度 + addheight: number; //附加高度 + distance: number; //距离 + verticalFov: number; // 垂直视角 + horizontalFov: number; //水平视角 + hintLineColor: string; //提示线颜色 + visibleColorBarShow: boolean; // 可视体颜色设置条 + invisibleColorBarShow: boolean; // 不可视体颜色设置条 + visibleAreaColor: string; //可视区域颜色 + hiddenAreaColor: string; //不可视区域颜色 + visibleBody: boolean; //显示可视域体 + invisibleBody: boolean; //显示不可视域体 + viewshedAnimation: boolean; //动画演示 + DynamicLine: any[]; //路线点 + DynamicSpeed: number; //动态分析行进速度 +}; // 设置默认值数据 let state = reactive<stateType>({ viewshedSpatialUrl: "http://www.supermapol.com/realspace/services/spatialAnalysis-data_all/restjsr/spatialanalyst/geometry/3d/viewshedbody.json", - observerInformation: [], + observerInformation: [0, 0, 0], direction: 0.0, pitch: 0.0, defaultheight: 1.8, @@ -201,23 +230,24 @@ let state = reactive<stateType>({ hintLineColor: "rgb(212,202,45)", visibleColorBarShow: false, invisibleColorBarShow: false, - visibleAreaColor: "rgba(9,199,112,0.5)", - hiddenAreaColor: "rgba(238,114,22,0.5)", + visibleAreaColor: "rgba(9,199,112,0.4)", + hiddenAreaColor: "rgba(238,114,22,0.4)", visibleBody: false, invisibleBody: false, viewshedAnimation: false, DynamicLine: [], - DynamicSpeed: 10 + DynamicSpeed: 10, }); - -// 初始化数据 -let viewshed3D: any, s3mInstanceColc: any, startPosition: any, handlerPolyline: any, timers: any, dynamicLayer3D: any,observerEntity:any; +// 初始化变量 +let startPosition: any, handlerPolyline: any, timers: any, observerEntity: any; let Carurls = ["./Resource/model/car1.s3m"]; +let viewshed3D = new SuperMap3D.ViewShed3D(scene); +let s3mInstanceColc = new SuperMap3D.S3MInstanceCollection(scene._context); +let dynamicLayer3D = new SuperMap3D.DynamicLayer3D(scene.context, Carurls); function init() { if (!viewer) return; - viewshed3D = new SuperMap3D.ViewShed3D(scene); viewshed3D.hintLineColor = SuperMap3D.Color.fromCssColorString( state.hintLineColor ); @@ -227,9 +257,7 @@ function init() { viewshed3D.hiddenAreaColor = SuperMap3D.Color.fromCssColorString( state.hiddenAreaColor ); - s3mInstanceColc = new SuperMap3D.S3MInstanceCollection(scene._context); viewer.scene.primitives.add(s3mInstanceColc); - dynamicLayer3D = new SuperMap3D.DynamicLayer3D(scene.context, Carurls); dynamicLayer3D.updateInterval = 100; dynamicLayer3D.setCullEnabled(Carurls[0], SuperMap3D.CullFace.BACK); dynamicLayer3D.maxVisibleAltitude = 2000; @@ -237,8 +265,27 @@ function init() { scene.primitives.add(dynamicLayer3D); } -init(); +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(); + // viewshed3D.destroy(); + if (handlerPolyline) handlerPolyline.destroy(); + viewshed3D = undefined; + s3mInstanceColc = undefined; +}); +let longitude = computed(() => { + return Number(state.observerInformation[0]).toFixed(4); +}); +let latitude = computed(() => { + return Number(state.observerInformation[1]).toFixed(4); +}); +let altitude = computed(() => { + return Number(state.observerInformation[2]).toFixed(2); +}); // 分析 function analysis() { @@ -260,7 +307,7 @@ function analysis() { } // 点击左键确认观察者点 -function LEFT_CLICK(e:any) { +function LEFT_CLICK(e: any) { //获取点击位置笛卡尔坐标 let position = scene.pickPosition(e.message.position); startPosition = position; //记录分析观察者笛卡尔坐标 @@ -273,37 +320,35 @@ function LEFT_CLICK(e:any) { // 添加观察者点 let p2 = SuperMap3D.Cartesian3.fromDegrees(p[0], p[1], p[2]); addPoint(p2); - viewshed3D.visibleAreaColor = SuperMap3D.Color.fromCssColorString( - state.visibleAreaColor - ); - viewshed3D.hiddenAreaColor = SuperMap3D.Color.fromCssColorString( - state.hiddenAreaColor - ); + + viewshed3D.visibleAreaColor = colorUpdate(state.visibleAreaColor); + viewshed3D.hiddenAreaColor = colorUpdate(state.hiddenAreaColor); + document.body.classList.remove("measureCur"); viewer.eventManager.removeEventListener("CLICK", LEFT_CLICK); viewer.eventManager.addEventListener("MOUSE_MOVE", MOUSE_MOVE, true); viewer.eventManager.addEventListener("RIGHT_CLICK", RIGHT_CLICK, true); - observerEntity = viewer.entities.getById('viewshedPoint'); + observerEntity = viewer.entities.getById("viewshedPoint"); } // 添加可视域点 -function addPoint(p:any) { +function addPoint(p: any) { viewer.entities.removeById("viewshedPoint"); viewer.entities.add( new SuperMap3D.Entity({ id: "viewshedPoint", point: new SuperMap3D.PointGraphics({ color: colorUpdate(state.hiddenAreaColor), - pixelSize: 8 + pixelSize: 8, }), - position: p + position: p, }) ); } // 鼠标移动实时分析 -function MOUSE_MOVE(e:any) { +function MOUSE_MOVE(e: any) { //获取鼠标屏幕坐标,并将其转化成笛卡尔坐标 let position = e.message.endPosition; let endPosition = scene.pickPosition(position); @@ -317,7 +362,7 @@ function MOUSE_MOVE(e:any) { } // 鼠标右键确认分析距离和方向,不再执行鼠标移动事件中对可视域的操作 -function RIGHT_CLICK(e:any) { +function RIGHT_CLICK(e: any) { state.direction = viewshed3D.direction; state.pitch = viewshed3D.pitch; state.distance = viewshed3D.distance; @@ -346,14 +391,14 @@ function getInVisibleResult() { } // 请求分析结果模型 -function requestModel(viewShedType:any, color:any) { +function requestModel(viewShedType: any, color: any) { let obj = viewshed3D.getViewshedParameter(); let geometryViewShedBodyvisibleParameter = { viewerPoint: obj.viewPosition, point3DsList: obj.point3DList, radius: obj.distance, lonlat: true, - viewShedType: viewShedType + viewShedType: viewShedType, }; let queryData = JSON.stringify(geometryViewShedBodyvisibleParameter); //先发送POST请求 @@ -380,19 +425,17 @@ function requestModel(viewShedType:any, color:any) { data.geometry.position.z ), hpr: new SuperMap3D.HeadingPitchRoll(0, 0, 0), - color: color + color: color, }, ab, false ); data.geometry.model = [4, 0, 0, 0].concat(data.geometry.model); // 分析区域颜色和可视域体颜色会影响,所以先透明 - viewshed3D.visibleAreaColor = SuperMap3D.Color.fromCssColorString( - "rgba(0,0,0,0)" - ); - viewshed3D.hiddenAreaColor = SuperMap3D.Color.fromCssColorString( - "rgba(0,0,0,0)" - ); + viewshed3D.visibleAreaColor = + SuperMap3D.Color.fromCssColorString("rgba(0,0,0,0)"); + viewshed3D.hiddenAreaColor = + SuperMap3D.Color.fromCssColorString("rgba(0,0,0,0)"); }) .catch(function (error) { console.log(error); @@ -411,8 +454,9 @@ function clear() { timers = null; state.viewshedAnimation = false; if (handlerPolyline) handlerPolyline.clearHandler(); - state.observerInformation = []; + state.observerInformation = [0, 0, 0]; } + // 清除可视域 function clearViewshed() { s3mInstanceColc.removeCollection("VISIBLEBODY"); @@ -421,7 +465,7 @@ function clearViewshed() { document.body.classList.remove("measureCur"); viewshed3D.distance = 0.00001; viewshed3D.viewPosition = [0, 0, 0]; - state.observerInformation = []; + state.observerInformation = [0, 0, 0]; } /* @@ -432,17 +476,13 @@ function drawPolyline() { if (!handlerPolyline) { handlerPolyline = initHandler("Polyline"); } - // if (props.DynamicLine) { - // setCarState(); //如果传入路线,就不需要绘制路线了 - // return; - // } handlerPolyline.handlerDrawing().then( - res => { + (res) => { state.DynamicLine = res.object.positions; if (state.DynamicLine.length < 2) return; setCarState(); }, - err => { + (err) => { console.log(err); } ); @@ -478,7 +518,7 @@ function setCarState() { longitude: positions[0].longitude, latitude: positions[0].latitude, altitude: positions[0].height, - scale: new SuperMap3D.Cartesian3(1, 1, 1) + scale: new SuperMap3D.Cartesian3(1, 1, 1), }); dynamicLayer3D.updateObjectWithModel(Carurls[0], [CarState]); let index = 1; @@ -499,7 +539,7 @@ function setCarState() { viewshed3D.viewPosition = [ CarState.longitude, CarState.latitude, - CarState.altitude + Number(state.addheight) + CarState.altitude + Number(state.addheight), ]; index += 1; }, 50); @@ -514,7 +554,7 @@ function colorUpdate(val: any) { // 监听 watch( () => state.visibleBody, - val => { + (val) => { if (val && state.observerInformation) { getVisibleResult(); } else { @@ -555,23 +595,20 @@ watch( // 避免删除导致崩溃 val = 0; } - // console.log(viewer.entities.getById('viewshedPoint').position); if (state.observerInformation) { state.observerInformation[2] = parseFloat(val) + state.defaultheight; viewshed3D.viewPosition = state.observerInformation; } - if(observerEntity){ - // let arr = tool.CartesiantoDegrees(observerEntity.position._value); + if (observerEntity) { let lon = Number(state.observerInformation[0]); let lat = Number(state.observerInformation[1]); let hei = Number(state.observerInformation[2]); - // let heiAdd = hei+parseFloat(val); let position = SuperMap3D.Cartesian3.fromDegrees(lon, lat, hei); observerEntity.position = position; // observerEntity.primitive.updatePosition(position); - }else{ - observerEntity = viewer.entities.getById('viewshedPoint'); + } else { + observerEntity = viewer.entities.getById("viewshedPoint"); } } ); @@ -604,11 +641,10 @@ watch( watch( () => state.verticalFov, (val: any) => { - if (parseFloat(val) > 0) { viewshed3D.verticalFov = parseFloat(val); } else { - state.verticalFov = 1 + state.verticalFov = 1; } } ); @@ -618,7 +654,7 @@ watch( if (parseFloat(val) > 0) { viewshed3D.horizontalFov = parseFloat(val); } else { - state.horizontalFov = 1 + state.horizontalFov = 1; } } ); @@ -638,7 +674,15 @@ watch( .updateColor(colorUpdate(val)); } ); - +watch( + () => state.viewshedAnimation, + (val: any) => { + if (val) { + state.visibleBody = false; + state.invisibleBody = false; + } + } +); watch( () => state.hiddenAreaColor, (val: any) => { @@ -658,24 +702,10 @@ watch( state.invisibleBody = false; clearViewshed(); notification.create({ - content: () => GlobalLang.viewshedAnimationTip, - duration: 3500 + content: () => $t("viewshedAnimationTip"), + duration: 3500, }); } else clear(); } ); - -// 销毁 -onBeforeUnmount(() => { - clear(); - // viewshed3D.destroy(); - // dynamicLayer3D. - if (handlerPolyline) handlerPolyline.destroy(); - viewshed3D = undefined; - s3mInstanceColc = undefined; -}); - </script> - -<style lang="scss" scoped> -</style> \ No newline at end of file diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse_facadeImage/index.ts b/SuperMap iEarth/src/package/analyse3d/analyse/analyse_facadeImage/index.ts deleted file mode 100644 index 85628742..00000000 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse_facadeImage/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import Analyse from "./index.vue" -export default Analyse; diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/analyse_facadeImage/index.vue b/SuperMap iEarth/src/package/analyse3d/analyse/analyse_facadeImage/index.vue deleted file mode 100644 index 5a4d12e2..00000000 --- a/SuperMap iEarth/src/package/analyse3d/analyse/analyse_facadeImage/index.vue +++ /dev/null @@ -1,142 +0,0 @@ -<template> - <!-- 立面图 --> - <div class="row-container"> - <div class="row-item"> - <span>{{ $t('global.maxHeight') }}</span> - <div class="slider-box"> - <n-slider style="width: 1.2rem;" v-model:value="state.maxHeight" :step="10" :min="1" :max="1000" /> - <div class="slider-suffix"> - <span>{{ state.maxHeight }}</span> - <span class="slider-unit">{{ $t('global.meter') }}</span> - </div> - </div> - </div> - - <div class="row-item"> - <span>{{ $t('global.maxDistence') }}</span> - <div class="slider-box"> - <n-slider style="width: 1.2rem;" v-model:value="state.maxDistence" :step="10" :min="1" :max="1000" /> - <div class="slider-suffix"> - <span>{{ state.maxDistence }}</span> - <span class="slider-unit">{{ $t('global.meter') }}</span> - </div> - </div> - </div> - </div> - - <div class="btn-row-item2"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="drawRegion" - style="margin-right: 0.1rem;">{{ $t('global.Draw') }}</n-button> - <n-button type="info" color="#3499E5" text-color="#fff" @click="executeImage" - style="margin-right: 0.1rem">{{ $t('global.Plot') }}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{ $t('global.clear') }}</n-button> - </div> -</template> - -<script setup lang="ts"> -import { reactive, watch,onBeforeUnmount} from "vue"; - -type stateType = { - maxHeight: number,// 最大高度 - maxDistence: number,// 最远距离 -} - -let state = reactive<stateType>({ - maxHeight: 100, - maxDistence: 500 -}) - -const scene = viewer.scene; - -// 初始化数据 -let facade, handlerLine; - -// 组件初始化 -function init() { - if (!viewer) return; - facade = new SuperMap3D.Facade(scene); - facade.build(); - handlerLine = new SuperMap3D.DrawHandler(viewer, SuperMap3D.DrawMode.Line); -} -init(); - -handlerLine.drawEvt.addEventListener(function (result:any) { - result.object.show = false; - let startPoint = result.object.positions[0]; - let endPoint = result.object.positions[1]; - facade.startPoint = startPoint; - facade.endPoint = endPoint; -}); - -// 绘制立方图范围 -function drawRegion() { - handlerLine.activate(); -} - -// 执行出图,并下载 -function executeImage() { - facade.readyPromise.then(function (base64data:any) { - download(base64data); - }); -} - -// 清除 -function clear() { - facade.clear(); - handlerLine.clear(); -} - -// 将Image转换成Canvas -function convertImageToCanvas(image:any) { - let canvas:any = document.createElement("canvas"); - if(canvas){ - canvas.width = image.width; - canvas.height = image.height; - canvas.getContext("2d").drawImage(image, 0, 0); - return canvas; - } -} - -// 将结果转成Image图表,并下载 -function download(base64data:any) { - let image = new Image(); - image.src = base64data; - image.onload = function () { - let canvas = convertImageToCanvas(image); - let url = canvas.toDataURL("image/jpeg"); - let a = document.createElement('a'); - let event = new MouseEvent('click'); - a.download = (new Date()).getTime() + ".jpg"; // 指定下载图片的名称 - a.href = url; - a.dispatchEvent(event); // 触发超链接的点击事件 - } -} - -watch( - () => state.maxHeight, - (val: any) => { - if (val === "" || val < 0) { - // 避免删除导致崩溃 - val = 0; - } - facade.maxHeight = state.maxHeight; - } -); -watch( - () => state.maxDistence, - (val: any) => { - if (val === "" || val < 0) { - // 避免删除导致崩溃 - val = 0; - } - facade.farDistance = state.maxDistence; - } -); - -onBeforeUnmount(()=>{ - clear(); -}) -</script> - -<style lang="scss" scoped> -</style> \ No newline at end of file diff --git a/SuperMap iEarth/src/package/analyse3d/analyse/index.vue b/SuperMap iEarth/src/package/analyse3d/analyse/index.vue index 59b2683b..78876491 100644 --- a/SuperMap iEarth/src/package/analyse3d/analyse/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/analyse/index.vue @@ -1,27 +1,28 @@ <template> <div class="analyse-box"> + <!-- <n-tabs type="line" animated :on-update:value="tabsChange" justify-content="space-between"> --> <n-tabs type="line" animated justify-content="space-between"> <!-- 通视 --> - <n-tab-pane name="sightLine" :tab="$t('global.Intervisibility')"> + <n-tab-pane name="sightLine" :tab="$t('Intervisibility')"> <SmAnalyseSightLine></SmAnalyseSightLine> </n-tab-pane> <!-- 可视域 --> - <n-tab-pane name="viewshed" :tab="$t('global.viewableRange')" class="use-scroll"> + <n-tab-pane name="viewshed" :tab="$t('viewableRange')" class="use-scroll"> <SmAnalyseViewshed></SmAnalyseViewshed> </n-tab-pane> <!-- 阴影 --> - <n-tab-pane name="shadow" :tab="$t('global.ligShadowAnalysisth')"> + <n-tab-pane name="shadow" :tab="$t('ligShadowAnalysisth')"> <SmAnalyseShadow></SmAnalyseShadow> </n-tab-pane> <!-- 剖面 --> - <n-tab-pane name="profile" :tab="$t('global.profile')"> + <n-tab-pane name="profile" :tab="$t('profile')"> <SmAnalyseProfile></SmAnalyseProfile> </n-tab-pane> <!-- 天际线 --> - <n-tab-pane name="skyline" :tab="$t('global.Skyline')"> + <n-tab-pane name="skyline" :tab="$t('Skyline')"> <SmAnalyseSkyline></SmAnalyseSkyline> </n-tab-pane> - <n-tab-pane name="facadeImage" :tab="$t('global.FacePlot')"> + <n-tab-pane name="facadeImage" :tab="$t('FacePlot')"> <SmAnalyseFacadeImage></SmAnalyseFacadeImage> </n-tab-pane> </n-tabs> @@ -29,33 +30,34 @@ </template> <script setup lang="ts"> -import { usePanelStore } from "@/store/index"; import SmAnalyseSightLine from "./analyse-sightLine/index"; import SmAnalyseViewshed from "./analyse-viewshed/index"; import SmAnalyseShadow from "./analyse-shadow/index"; import SmAnalyseProfile from "./analyse-profile/index"; import SmAnalyseSkyline from "./analyse-skyline/index"; -import SmAnalyseFacadeImage from "./analyse_facadeImage/index"; +import SmAnalyseFacadeImage from "./analyse-facadeImage/index"; -const panelStore = usePanelStore(); -function tabsChange(value) {} +// function tabsChange(value) { } </script> <style lang="scss" scoped> .analyse-box { width: 100%; height: 100%; - // padding: 0 0.12rem; box-sizing: border-box; - :deep(.n-tabs-nav){ - padding:0 0.12rem; - }; + // padding: 0 0.05rem; + + :deep(.n-tabs-nav) { + padding: 0 0.12rem; + } + :deep(.n-tab-pane) { box-sizing: border-box; padding-left: 0.12rem; padding-right: 0.12rem; } - .use-scroll{ + + .use-scroll { padding-right: 0px; } } diff --git a/SuperMap iEarth/src/package/analyse3d/clip/clip-box/index.vue b/SuperMap iEarth/src/package/analyse3d/clip/clip-box/clipBox.vue similarity index 77% rename from SuperMap iEarth/src/package/analyse3d/clip/clip-box/index.vue rename to SuperMap iEarth/src/package/analyse3d/clip/clip-box/clipBox.vue index e3ebb347..3eda22a7 100644 --- a/SuperMap iEarth/src/package/analyse3d/clip/clip-box/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/clip/clip-box/clipBox.vue @@ -1,23 +1,23 @@ <template> <!-- box裁剪 --> <div class="row-item"> - <span>{{$t('global.clipMode')}}</span> + <span>{{ $t("clipMode") }}</span> <n-radio-group v-model:value="state.clipMode" name="radiogroup" class="radio-group" + style="margin-right: 0.3rem; width: 1.65rem" > - <n-space> - <n-radio - v-for="item in state.modeOptions" - :key="item.value" - :value="item.value" - > - {{ item.label }} - </n-radio> - </n-space> + <n-radio + v-for="item in state.modeOptions" + :key="item.value" + :value="item.value" + > + {{ item.label }} + </n-radio> </n-radio-group> </div> + <div class="btn-row-item"> <n-button type="info" @@ -25,41 +25,57 @@ text-color="#fff" @click="startBoxClipByEitor" style="margin-right: 0.1rem" - >{{$t('global.clip')}}</n-button + >{{ $t("clip") }}</n-button + > + <n-button + class="btn-secondary" + @click="clearBoxClipByEitor" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clearBoxClipByEitor" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </template> - + <script setup lang="ts"> -import { reactive, onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; import { useNotification } from "naive-ui"; type stateType = { - clipMode:string,// 裁剪模式 - modeOptions:any // 模式选项 -} + clipMode: string; // 裁剪模式 + modeOptions: any; // 模式选项 +}; // 设置默认值 let state = reactive<stateType>({ clipMode: "clip_behind_all_plane", modeOptions: [ { - label: GlobalLang.inner, + label: $t("inner"), value: "clip_behind_all_plane", }, { - label: GlobalLang.outer, + label: $t("outer"), value: "clip_behind_any_plane", }, ], }); -// 初始化数据 +// 初始化变量 const notification = useNotification(); -let layers: any, handlerBox: any, boxEntity: any, editorBox: any; -layers = viewer.scene.layers.layerQueue; -handlerBox = new SuperMap3D.DrawHandler(viewer, SuperMap3D.DrawMode.Box); +let boxEntity: any, editorBox: any; +let layers = viewer.scene.layers.layerQueue; +let handlerBox = new SuperMap3D.DrawHandler(viewer, SuperMap3D.DrawMode.Box); + +onMounted(() => {}); + +onBeforeUnmount(() => { + clearBoxClipByEitor(); + if (editorBox) editorBox.destroy(); + editorBox = undefined; + handlerBox = undefined; + boxEntity = undefined; +}); // 分析 function startBoxClipByEitor() { @@ -68,18 +84,21 @@ function startBoxClipByEitor() { handlerBox.activate(); return; } + + window.viewer.enableCursorStyle = false; + window.viewer._element.style.cursor = ""; + document.body.classList.add("drawCur"); + // 设置裁剪线颜色 setAllLayersClipColor(); notification.create({ - content: () => - GlobalLang.boxclipTip, + content: () => $t("boxclipTip"), duration: 5500, }); handlerBox.drawEvt.addEventListener((e: any) => { boxEntity = e.object; - // let boxEntity = this.boxEntity; let newDim = boxEntity.box.dimensions.getValue(); let position = boxEntity.position.getValue(0); let boxOption = { @@ -101,9 +120,13 @@ function startBoxClipByEitor() { setAllLayersClipOptions(boxOption); handlerBox.clear(); handlerBox.deactivate(); + + window.viewer.enableCursorStyle = true; + document.body.classList.remove("drawCur"); }); handlerBox.activate(); } + // 更新 function setClipBox() { if (typeof boxEntity == "undefined") { @@ -149,12 +172,14 @@ function setClipBox() { }; setAllLayersClipOptions(boxOptions); } + //设置图层裁剪 function setAllLayersClipOptions(boxOptions: any) { for (let i = 0, j = layers.length; i < j; i++) { layers[i].setCustomClipBox(boxOptions); } } + //设置线颜色 function setAllLayersClipColor() { for (let i = 0, j = layers.length; i < j; i++) { @@ -162,6 +187,7 @@ function setAllLayersClipColor() { layers[i].clipLineColor = new SuperMap3D.Color(1, 1, 1, 0); } } + // 清除 function clearBoxClipByEitor() { if (handlerBox) { @@ -186,18 +212,4 @@ watch( setClipBox(); } ); - -onBeforeUnmount(() => { - clearBoxClipByEitor(); - if (editorBox) editorBox.destroy(); - editorBox = undefined; - // layers = undefined; - handlerBox = undefined; - boxEntity = undefined; -}); - </script> - -<style lang="scss" scoped> - -</style> \ No newline at end of file diff --git a/SuperMap iEarth/src/package/analyse3d/clip/clip-box/index.ts b/SuperMap iEarth/src/package/analyse3d/clip/clip-box/index.ts index 7436432e..6916bc4b 100644 --- a/SuperMap iEarth/src/package/analyse3d/clip/clip-box/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/clip/clip-box/index.ts @@ -1,3 +1,3 @@ -import SmClipBox from './index.vue'; +import SmClipBox from './clipBox.vue'; export default SmClipBox; diff --git a/SuperMap iEarth/src/package/analyse3d/clip/clip-cross/index.vue b/SuperMap iEarth/src/package/analyse3d/clip/clip-cross/clipCross.vue similarity index 68% rename from SuperMap iEarth/src/package/analyse3d/clip/clip-cross/index.vue rename to SuperMap iEarth/src/package/analyse3d/clip/clip-cross/clipCross.vue index 9a76bc41..5f1a2925 100644 --- a/SuperMap iEarth/src/package/analyse3d/clip/clip-cross/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/clip/clip-cross/clipCross.vue @@ -1,67 +1,139 @@ <template> <div class="row-item"> - <span>{{$t('global.clipWidth')}}</span> + <span>{{ $t("clipWidth") }}</span> <div class="slider-box"> <n-slider v-model:value="state.clipWidth" - style="width: 70%" + style="width: 1.6rem" :min="0" :max="90" :step="10" /> - <div class="row-slider-num">{{ state.clipWidth }} <span> {{$t('global.meter')}}</span></div> + <n-input-number + v-model:value="state.clipWidth" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + placeholder="" + size="small" + /> + <span>{{ $t("meter") }}</span> </div> </div> <div class="row-item"> - <span>{{$t('global.clipHeight')}}</span> + <span>{{ $t("clipHeight") }}</span> <div class="slider-box"> <n-slider v-model:value="state.clipHeight" - style="width: 70%" + style="width: 1.6rem" :min="0" :max="90" :step="10" /> - <div class="row-slider-num">{{ state.clipHeight }} <span> {{$t('global.meter')}}</span></div> + <n-input-number + v-model:value="state.clipHeight" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + placeholder="" + size="small" + /> + <span>{{ $t("meter") }}</span> </div> </div> <div class="row-item"> - <span>{{$t('global.rotateX')}}</span> + <span>{{ $t("stretchingHeight") }}</span> <div class="slider-box"> - <n-slider - v-model:value="state.heading" - style="width: 70%" - :min="0" - :max="90" - :step="10" + <n-slider v-model:value="state.extrude" style="width: 1.6rem" /> + <n-input-number + v-model:value="state.extrude" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + placeholder="" + size="small" /> - <div class="row-slider-num">{{ state.heading }} <span> °</span></div> + <span> {{ $t("meter") }}</span> </div> </div> <div class="row-item"> - <span>{{$t('global.rotateY')}}</span> + <span>{{ $t("rotateX") }}</span> <div class="slider-box"> - <n-slider v-model:value="state.pitch" style="width: 70%" /> - <div class="row-slider-num">{{ state.pitch }} <span> °</span></div> + <n-slider + v-model:value="state.heading" + style="width: 1.4rem" + :min="0" + :max="360" + :step="1" + /> + <n-input-number + v-model:value="state.heading" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="360" + placeholder="" + size="small" + /> + <span>°</span> </div> </div> <div class="row-item"> - <span>{{$t('global.rotateZ')}}</span> + <span>{{ $t("rotateY") }}</span> <div class="slider-box"> - <n-slider v-model:value="state.roll" style="width: 70%" /> - <div class="row-slider-num">{{ state.roll }} <span> °</span></div> + <n-slider + v-model:value="state.pitch" + style="width: 1.4rem" + :min="0" + :max="360" + :step="1" + /> + <n-input-number + v-model:value="state.pitch" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="360" + placeholder="" + size="small" + /> + <span> °</span> </div> </div> <div class="row-item"> - <span>{{$t('global.stretchingHeight')}}</span> + <span>{{ $t("rotateZ") }}</span> <div class="slider-box"> - <n-slider v-model:value="state.extrude" style="width: 70%" /> - <div class="row-slider-num">{{ state.extrude }} <span> {{$t('global.meter')}}</span></div> + <n-slider + v-model:value="state.roll" + style="width: 1.4rem" + :min="0" + :max="360" + :step="1" + /> + <n-input-number + v-model:value="state.roll" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="360" + placeholder="" + size="small" + /> + <span> °</span> </div> </div> @@ -72,14 +144,20 @@ text-color="#fff" @click="startCross" style="margin-right: 0.1rem" - >{{$t('global.clip')}}</n-button + >{{ $t("clip") }}</n-button + > + <n-button + class="btn-secondary" + @click="clearCross" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clearCross" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </template> <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; const scene = viewer.scene; @@ -101,23 +179,31 @@ let state = reactive<stateType>({ extrude: 1, }); -// 初始化数据 -let layers: any; -let screenSpaceEventHandler: any; +// 初始化变量 let startClip: any, //裁剪标志 box: any, boxPosition: any, dim: any, //entity position: any; //裁剪区域 -screenSpaceEventHandler = new SuperMap3D.ScreenSpaceEventHandler( +let layers = viewer.scene.layers.layerQueue; +let screenSpaceEventHandler = new SuperMap3D.ScreenSpaceEventHandler( viewer.scene.canvas ); -layers = viewer.scene.layers.layerQueue; +onMounted(() => {}); + +onBeforeUnmount(() => { + clearCross(); + box = undefined; + dim = undefined; +}); // 分析 function startCross(e: any) { + viewer.enableCursorStyle = false; + viewer._element.style.cursor = ""; + document.body.classList.add("measureCur"); e.preventDefault(); if (!viewer) { return; @@ -192,8 +278,10 @@ function start() { SuperMap3D.ScreenSpaceEventType.LEFT_CLICK ); hpr = null; + document.body.classList.remove("measureCur"); }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); } + // 更新 function updateClip() { for (let layer of layers) { @@ -335,16 +423,4 @@ watch( updateClip(); } ); - -onBeforeUnmount(() => { - clearCross(); - // layers = undefined; - box = undefined; - dim = undefined; -}); </script> - -<style lang="scss" scoped> - -</style> - diff --git a/SuperMap iEarth/src/package/analyse3d/clip/clip-cross/index.ts b/SuperMap iEarth/src/package/analyse3d/clip/clip-cross/index.ts index 3fa5a850..643ecc11 100644 --- a/SuperMap iEarth/src/package/analyse3d/clip/clip-cross/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/clip/clip-cross/index.ts @@ -1,3 +1,3 @@ -import SmClipCross from './index.vue'; +import SmClipCross from './clipCross.vue'; export default SmClipCross; diff --git a/SuperMap iEarth/src/package/analyse3d/clip/clip-plane/index.vue b/SuperMap iEarth/src/package/analyse3d/clip/clip-plane/clipPlane.vue similarity index 74% rename from SuperMap iEarth/src/package/analyse3d/clip/clip-plane/index.vue rename to SuperMap iEarth/src/package/analyse3d/clip/clip-plane/clipPlane.vue index 5f787858..fcdae760 100644 --- a/SuperMap iEarth/src/package/analyse3d/clip/clip-plane/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/clip/clip-plane/clipPlane.vue @@ -1,22 +1,25 @@ <template> <div class="row-item"> - <span>{{$t('global.clipMode')}}</span> - <n-radio-group v-model:value="state.directionByNormal" name="radiogroup" class="radio-group"> - <n-space> - <n-radio - v-for="item in state.modeOptions" - :key="item.value" - :value="item.value" - > - {{ item.label }} - </n-radio> - </n-space> + <span>{{ $t("clipMode") }}</span> + <n-radio-group + v-model:value="state.directionByNormal" + name="radiogroup" + class="radio-group" + > + <n-radio + v-for="item in state.modeOptions" + :key="item.value" + :value="item.value" + > + {{ item.label }} + </n-radio> </n-radio-group> </div> + <div class="row-item"> - <span>{{$t('global.displayCilpPlane')}}</span> + <span>{{ $t("displayCilpPlane") }}</span> <n-checkbox - style="width: 1.96rem;" + style="width: 1.96rem" v-model:checked="state.clipFaceShow" ></n-checkbox> </div> @@ -28,15 +31,20 @@ text-color="#fff" @click="clipPlaneStart" style="margin-right: 0.1rem" - >{{$t('global.clip')}}</n-button + >{{ $t("clip") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </template> - <script lang="ts" setup> -import { reactive, watch, onBeforeUnmount } from "vue"; +import { reactive, watch, onMounted, onBeforeUnmount } from "vue"; import ClipPlane from "./js/clip-plane.js"; type stateType = { @@ -44,8 +52,8 @@ type stateType = { clipFaceShow: boolean; // 是否显示裁剪面 directionByNormal: boolean; // 是否沿法线 modeOptions: any[]; // 模式选项 - pickPosition: any, // 存储当前裁剪平面拾取位置 - normal: any, // 存储当前裁剪平面法线 + pickPosition: any; // 存储当前裁剪平面拾取位置 + normal: any; // 存储当前裁剪平面法线 }; let state = reactive<stateType>({ @@ -56,26 +64,25 @@ let state = reactive<stateType>({ normal: null, modeOptions: [ { - label: GlobalLang.verticalNormal, + label: $t("verticalNormal"), value: false, }, { - label: GlobalLang.parallelNormal, + label: $t("parallelNormal"), value: true, }, ], }); -let layers: any, clipPlane: any; let modelUrl = "./Resource/model/box.s3m"; +let layers = viewer.scene.layers.layerQueue; +let clipPlane = new ClipPlane(viewer, { + modelUrl: modelUrl, + setDirectionByNormal: state.directionByNormal, +}); function init() { if (!viewer) return; - layers = viewer.scene.layers.layerQueue; - clipPlane = new ClipPlane(viewer, { - modelUrl: modelUrl, - setDirectionByNormal: state.directionByNormal, - }); for (let layer of layers) { layer.selectEnabled = false; // 设置被裁剪对象的颜色 @@ -83,7 +90,13 @@ function init() { } } -init(); +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(); +}); // 分析 function clipPlaneStart() { @@ -101,6 +114,8 @@ function left_click(e: any) { state.pickPosition = pickPosition; state.normal = normal; if (pickPosition) clipPlane.startClip(pickPosition, normal); + clipPlane.setClipPlaneScale(5); + viewer.eventManager.removeEventListener("CLICK", left_click); viewer.eventManager.removeEventListener("MOUSE_MOVE", mouse_move); document.body.classList.remove("measureCur"); @@ -153,17 +168,9 @@ watch( () => state.directionByNormal, (val) => { clipPlane.setDirectionByNormal = val; - if(state.pickPosition){ + if (state.pickPosition) { updatePlane(); } } ); - -onBeforeUnmount(() => { - clear(); -}); </script> - -<style lang="scss" scoped> -</style> - diff --git a/SuperMap iEarth/src/package/analyse3d/clip/clip-plane/index.ts b/SuperMap iEarth/src/package/analyse3d/clip/clip-plane/index.ts index e731fe21..a41455e5 100644 --- a/SuperMap iEarth/src/package/analyse3d/clip/clip-plane/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/clip/clip-plane/index.ts @@ -1,3 +1,3 @@ -import SmClipPlane from './index.vue'; +import SmClipPlane from './clipPlane.vue'; export default SmClipPlane; diff --git a/SuperMap iEarth/src/package/analyse3d/clip/clip-plane/js/clip-plane.js b/SuperMap iEarth/src/package/analyse3d/clip/clip-plane/js/clip-plane.js index c433642c..8015af61 100644 --- a/SuperMap iEarth/src/package/analyse3d/clip/clip-plane/js/clip-plane.js +++ b/SuperMap iEarth/src/package/analyse3d/clip/clip-plane/js/clip-plane.js @@ -22,7 +22,7 @@ class ClipPlane { viewer.scene.primitives.add(this.s3mInstanceColc); this.clipPlanePositions = null; this.ClipPlaneShow = true; - this.clipPlaneScale = 1; + this.clipPlaneScale = 5; this.LocalToWorldMatrix = null; this.setDirectionByNormal = false; } @@ -107,7 +107,7 @@ class ClipPlane { this.s3mInstanceColc.add(this.modelUrl, { id: "clip-model", position: position, - scale: new SuperMap3D.Cartesian3(1, 1, 0.01) + scale: new SuperMap3D.Cartesian3(0.1, 0.1, 0.01) }); this.referencePlane = this.s3mInstanceColc.getInstance(this.modelUrl, "clip-model"); if (quaternion) { @@ -121,7 +121,7 @@ class ClipPlane { setReferencePlane(position, normal) { if (!SuperMap3D.defined(position)) return; this.addModel(position); - if(!this.referencePlane) return; + if (!this.referencePlane) return; this.referencePlane.updatePosition(position); if (normal && this.setDirectionByNormal) { let LocalToWorldMatrix = SuperMap3D.Transforms.eastNorthUpToFixedFrame(position); @@ -134,7 +134,7 @@ class ClipPlane { // 开始裁剪 startClip(position, normal) { if (!SuperMap3D.defined(position)) return; - if(this.planeSurface) this.clear(); + if (this.planeSurface) this.clear(); let LocalToWorldMatrix = SuperMap3D.Transforms.eastNorthUpToFixedFrame(position); if (normal && this.setDirectionByNormal) { let mat = getMatrixByNormal(LocalToWorldMatrix, normal); //法线为上方向的局部坐标系 @@ -147,26 +147,24 @@ class ClipPlane { if (!SuperMap3D.defined(this.planeSurface)) this.addsurface(); if (!this.modelEditor) this.addModelEditor(this.referencePlane); else { + // this.addModelEditor(this.referencePlane); this.modelEditor.setEditObject(this.referencePlane); this.modelEditor.activate(); } } - - - - // 添加模型编辑器 addModelEditor(model) { this.modelEditor = new SuperMap3D.ModelEditor({ model: model, scene: this.viewer.scene, - scaleByDistance:new SuperMap3D.NearFarScalar(10,0.1,1000,10), //设置根据距离缩放编辑器 + scale: 3, axesShow: { translation: true, rotation: true, scale: false - } + }, + lineWidthScale: 5 }); this.modelEditor.activate(); this.modelEditor.changedEvt.addEventListener(param => { @@ -202,9 +200,12 @@ class ClipPlane { */ setModelEditorShow(val) { if (!this.modelEditor) return; - if (!val) this.modelEditor.deactivate(); - else { + if (!val) { + this.modelEditor.deactivate(); + // this.modelEditor = null; + } else { let editEntity = this.s3mInstanceColc.getInstance(this.modelUrl, "clip-model"); + // if (!this.modelEditor) this.addModelEditor(this.referencePlane); this.modelEditor.setEditObject(editEntity); this.modelEditor.activate(); } @@ -215,7 +216,7 @@ class ClipPlane { */ setClipPlaneScale(val) { this.clipPlaneScale = val; - if (this.LocalToWorldMatrix){ + if (this.LocalToWorldMatrix) { this.setPlanePositions(this.LocalToWorldMatrix); } } @@ -233,6 +234,7 @@ class ClipPlane { if (this.planeSurface) { this.viewer.entities.remove(this.planeSurface); this.modelEditor.deactivate(); + this.modelEditor = null; this.planeSurface = null; this.clipPlanePositions = null; this.LocalToWorldMatrix = null; @@ -262,4 +264,4 @@ function getMatrixByNormal(matrix, normal) { } } -export default ClipPlane +export default ClipPlane; diff --git a/SuperMap iEarth/src/package/analyse3d/clip/clip-polygon/index.vue b/SuperMap iEarth/src/package/analyse3d/clip/clip-polygon/clipPolygon.vue similarity index 70% rename from SuperMap iEarth/src/package/analyse3d/clip/clip-polygon/index.vue rename to SuperMap iEarth/src/package/analyse3d/clip/clip-polygon/clipPolygon.vue index eda60c4e..c02aab19 100644 --- a/SuperMap iEarth/src/package/analyse3d/clip/clip-polygon/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/clip/clip-polygon/clipPolygon.vue @@ -1,20 +1,19 @@ <template> <div class="row-item"> - <span>{{$t('global.clipMode')}}</span> + <span>{{ $t("clipMode") }}</span> <n-radio-group v-model:value="state.clipMode" class="radio-group" name="radiogroup" + style="margin-right: 0.3rem; width: 1.65rem" > - <n-space> - <n-radio - v-for="item in state.modeOptions" - :key="item.value" - :value="item.value" - > - {{ item.label }} - </n-radio> - </n-space> + <n-radio + v-for="item in state.modeOptions" + :key="item.value" + :value="item.value" + > + {{ item.label }} + </n-radio> </n-radio-group> </div> @@ -25,44 +24,58 @@ text-color="#fff" @click="clipPolygon" style="margin-right: 0.1rem" - >{{$t('global.analysis')}}</n-button + >{{ $t("clip") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </template> <script lang="ts" setup> -import { reactive, watch, onBeforeUnmount } from "vue"; +import { reactive, watch, onMounted, onBeforeUnmount } from "vue"; import initHandler from "@/tools/drawHandler"; import tool from "@/tools/tool"; type stateType = { - clipMode:any,// 内部还是外部 - modeOptions:any,//模式选项 -} + clipMode: any; // 内部还是外部 + modeOptions: any; //模式选项 +}; // 初始化默认数据 -let state = reactive({ +let state = reactive<stateType>({ clipMode: SuperMap3D.ModifyRegionMode.CLIP_INSIDE, modeOptions: [ { - label: GlobalLang.inner, + label: $t("inner"), value: SuperMap3D.ModifyRegionMode.CLIP_INSIDE, }, { - label: GlobalLang.outer, + label: $t("outer"), value: SuperMap3D.ModifyRegionMode.CLIP_OUTSIDE, }, ], }); -let layers: any, handlerPolygon: any, polygonPosition: any; +let handlerPolygon: any, polygonPosition: any; +let layers = viewer.scene.layers.layerQueue; function init() { if (!viewer) return; - layers = viewer.scene.layers.layerQueue; } -init(); + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(); + if (handlerPolygon) handlerPolygon.destroy(); +}); // 分析 function clipPolygon() { @@ -86,6 +99,7 @@ function clipPolygon() { ); handlerPolygon.activate(); } + // 更新 function clipPolygonUpdate(p: any) { polygonPosition = p; @@ -111,11 +125,4 @@ watch( if (polygonPosition) clipPolygonUpdate(polygonPosition); } ); - -onBeforeUnmount(() => { - clear(); - if (handlerPolygon) handlerPolygon.destroy(); - // layers = undefined; -}); </script> - diff --git a/SuperMap iEarth/src/package/analyse3d/clip/clip-polygon/index.ts b/SuperMap iEarth/src/package/analyse3d/clip/clip-polygon/index.ts index 7243b817..2acb0b23 100644 --- a/SuperMap iEarth/src/package/analyse3d/clip/clip-polygon/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/clip/clip-polygon/index.ts @@ -1,3 +1,3 @@ -import SmClipPolygon from './index.vue'; +import SmClipPolygon from './clipPolygon.vue'; export default SmClipPolygon; diff --git a/SuperMap iEarth/src/package/analyse3d/clip/index.vue b/SuperMap iEarth/src/package/analyse3d/clip/index.vue index 0a20c34a..18f72224 100644 --- a/SuperMap iEarth/src/package/analyse3d/clip/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/clip/index.vue @@ -1,20 +1,20 @@ <template> <div class="clip-box"> - <n-tabs type="line" animated :on-update:value="tabsChange" justify-content="space-between"> + <n-tabs type="line" animated justify-content="space-between"> <!-- box裁剪 --> - <n-tab-pane name="boxclip" :tab="$t('global.boxClip')"> + <n-tab-pane name="boxclip" :tab="$t('boxClip')"> <SmClipBox></SmClipBox> </n-tab-pane> <!-- 平面裁剪 --> - <n-tab-pane name="planeclip" :tab="$t('global.planeClip')"> + <n-tab-pane name="planeclip" :tab="$t('planeClip')"> <SmClipPlane></SmClipPlane> </n-tab-pane> <!-- Cross裁剪 --> - <n-tab-pane name="crossclip" :tab="$t('global.crossClip')"> + <n-tab-pane name="crossclip" :tab="$t('crossClip')"> <SmClipCross></SmClipCross> </n-tab-pane> <!-- 多边形裁剪 --> - <n-tab-pane name="polygonclip" :tab="$t('global.polygonClip')"> + <n-tab-pane name="polygonclip" :tab="$t('polygonClip')"> <SmClipPolygon></SmClipPolygon> </n-tab-pane> </n-tabs> @@ -22,27 +22,17 @@ </template> <script setup lang="ts"> -import { usePanelStore } from "@/store/index"; import SmClipBox from "./clip-box/index"; import SmClipCross from "./clip-cross/index"; import SmClipPlane from "./clip-plane/index"; import SmClipPolygon from "./clip-polygon/index"; - -const panelStore = usePanelStore(); -function tabsChange(value) { - // panelBgName.value = value; - // panelStore.setAnalyse3dPanel(value); -} - -// 关闭弹窗 -function panelCloseHandle() {} </script> <style lang="scss" scoped> .clip-box { width: 100%; height: 100%; - padding: 0 0.12rem; box-sizing: border-box; + padding: 0 0.12rem; } </style> diff --git a/SuperMap iEarth/src/package/analyse3d/index.vue b/SuperMap iEarth/src/package/analyse3d/index.vue index 715a4dc2..0217dcef 100644 --- a/SuperMap iEarth/src/package/analyse3d/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/index.vue @@ -5,11 +5,11 @@ class="analyse-tab-items" :class="item.isSelected ? 'select-bg' : ''" v-for="item in analyseList" - @click="changeItem(item)" :key="item.id" :title="item.title" + @click="changeItem(item)" > - <i class="iconfont" :class="item.iconName" style="font-size: 18px"></i> + <i class="iconfont" :class="item.iconName" style="font-size: 0.18rem"></i> </div> </div> @@ -20,42 +20,38 @@ </template> <script lang="ts" setup> -import { ref, reactive, markRaw, watch, computed } from "vue"; -import { usePanelStore } from "@/store/index"; +import { ref, markRaw } from "vue"; import Analyse from "./analyse/index"; import Clip from "./clip/index"; import Terrain from "./terrain/index"; -const panelStore = usePanelStore(); - let analyseList = ref([ { id: 1, iconName: "iconkongjianfenxi", - title: GlobalLang.spatialAnalysis, + title: $t("spatialAnalysis"), isSelected: true, componentName: markRaw(Analyse), }, { id: 2, iconName: "iconjianqie", - title: GlobalLang.clip, + title: $t("clip"), isSelected: false, componentName: markRaw(Clip), }, { id: 3, iconName: "icondixing", - title: GlobalLang.terrainOperation, + title: $t("terrainOperation"), isSelected: false, componentName: markRaw(Terrain), }, ]); let currentComponent = ref(markRaw(Analyse)); -// 关闭面板 -function panelCloseHandle() {} -// + +// 切换项目 function changeItem(iconItem: any) { analyseList.value.map((item) => { if (item.id == iconItem.id) { @@ -76,7 +72,8 @@ function changeItem(iconItem: any) { height: 0.4rem; background: rgba(255, 255, 255, 0.15); width: 96%; - margin: 0px 2%; + margin: 0rem 2%; + .analyse-tab-items { width: 0.48rem; height: 100%; @@ -87,8 +84,9 @@ function changeItem(iconItem: any) { cursor: pointer; } } + .select-bg { background: rgba(255, 255, 255, 0.15); color: #fff !important; } -</style> \ No newline at end of file +</style> diff --git a/SuperMap iEarth/src/package/analyse3d/terrain/index.vue b/SuperMap iEarth/src/package/analyse3d/terrain/index.vue index 94d93980..4b63adf7 100644 --- a/SuperMap iEarth/src/package/analyse3d/terrain/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/terrain/index.vue @@ -1,21 +1,20 @@ <template> <div class="terrain-box"> - <n-tabs type="line" animated :on-update:value="tabsChange"> + <n-tabs type="line" animated justify-content="left"> <!-- 地形操作 --> - <n-tab-pane name="operation" :tab="$t('global.terrainOperation')"> + <n-tab-pane name="operation" :tab="$t('terrainOperation')"> <SmTerrainOperation></SmTerrainOperation> - <!-- <sm-layer-service></sm-layer-service> --> </n-tab-pane> <!-- 淹没分析 --> - <n-tab-pane name="inundation" :tab="$t('global.inundationAnalysis')"> + <n-tab-pane name="inundation" :tab="$t('inundationAnalysis')"> <SmTerrainInundation></SmTerrainInundation> </n-tab-pane> <!-- 坡度坡向 --> - <n-tab-pane name="slope" :tab="$t('global.slopeAspect')"> + <n-tab-pane name="slope" :tab="$t('slopeAspect')"> <SmTerrainSlope></SmTerrainSlope> </n-tab-pane> <!-- 等值线 --> - <n-tab-pane name="isoline" :tab="$t('global.Isoline')"> + <n-tab-pane name="isoline" :tab="$t('Isoline')"> <SmTerrainIsoline></SmTerrainIsoline> </n-tab-pane> </n-tabs> @@ -23,26 +22,31 @@ </template> <script setup lang="ts"> -import { usePanelStore } from "@/store/index"; import SmTerrainInundation from "./terrain-inundation/index"; import SmTerrainIsoline from "./terrain-isoline/index"; import SmTerrainOperation from "./terrain-operation/index"; import SmTerrainSlope from "./terrain-slope/index"; - -const panelStore = usePanelStore(); -function tabsChange(value) { - // panelBgName.value = value; - // panelStore.setAnalyse3dPanel(value); -} - -// 关闭弹窗 -function panelCloseHandle() {} </script> <style lang="scss" scoped> .terrain-box { width: 100%; + height: 100%; + box-sizing: border-box; + // padding: 0 0.01rem; +} + +:deep(.n-tabs-tab-wrapper) { + margin-right: 0.3rem; +} + +:deep(.n-tabs-nav) { padding: 0 0.12rem; +} + +:deep(.n-tab-pane) { box-sizing: border-box; + padding-left: 0.12rem; + padding-right: 0.12rem; } </style> diff --git a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-inundation/index.ts b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-inundation/index.ts index 37700d7c..67dcec38 100644 --- a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-inundation/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-inundation/index.ts @@ -1,3 +1,3 @@ -import SmTerrainInundation from './index.vue'; +import SmTerrainInundation from './inundation.vue'; export default SmTerrainInundation; diff --git a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-inundation/index.vue b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-inundation/inundation.vue similarity index 70% rename from SuperMap iEarth/src/package/analyse3d/terrain/terrain-inundation/index.vue rename to SuperMap iEarth/src/package/analyse3d/terrain/terrain-inundation/inundation.vue index f29f47e4..fb0eb616 100644 --- a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-inundation/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-inundation/inundation.vue @@ -1,96 +1,89 @@ <template> <!-- 淹没分析 --> <div class="row-item"> - <div>{{$t('global.maximumVisibleElevation')}}</div> + <span>{{ $t("maximumVisibleElevation") }}</span> <n-input-number v-model:value="state.maxHeight" - style="width: 1.96rem;" + style="width: 1.96rem" :show-button="false" :min="1" :max="10000" > - <template #suffix>{{$t('global.meter')}}</template> + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> <div class="row-item"> - <div>{{$t('global.minimumVisibleElevation')}}</div> + <span>{{ $t("minimumVisibleElevation") }}</span> <n-input-number v-model:value="state.minHeight" - style="width: 1.96rem;" + style="width: 1.96rem" :bordered="false" :min="1" :max="10000" :show-button="false" > - <template #suffix>{{$t('global.meter')}}</template> + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> <div class="row-item"> - <div>{{$t('global.currentElevation')}}</div> + <span>{{ $t("currentElevation") }}</span> <n-input-number - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.currentHeight" :bordered="false" :show-button="false" > - <template #suffix>{{$t('global.meter')}}</template> + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> - <!-- <div class="row-item"> - <span>颜色设置</span> - <div class="color-pick-box" style="width: 1.96rem;; margin-left: 0rem"> - <n-color-picker - v-model:value="state.cheackedBand" - :render-label=" - () => { - return ''; - } - " - size="small" - ></n-color-picker> - </div> - </div> --> - - <!-- <div class="row-item"> - <div>颜色设置</div> - <n-slider - v-model:value="state.floodTrans" - style="width: 100%" - :min="0" - :max="100" - /> - <div style="font-size: 0.12rem; margin-left: 0.12rem"> - {{ state.floodTrans }} - </div> - </div> --> <div class="row-item"> - <span>{{$t('global.transparency')}}</span> + <span>{{ $t("transparency") }}</span> <div class="slider-box"> <n-slider style="width: 1.2rem" v-model:value="state.floodTrans" - :step="0.1" + :step="0.01" :min="0" :max="1" /> - <span>{{ state.floodTrans * 100}}<span> %</span></span> + <n-input-number + v-model:value="state.floodTrans" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="100" + placeholder="" + size="small" + /> </div> </div> <div class="row-item"> - <span>{{$t('global.inundationSpeed')}}</span> + <span>{{ $t("inundationSpeed") }}</span> <div class="slider-box"> <n-slider - style="width: 1.2rem" + style="width: 1rem" v-model:value="state.floodSpeed" :step="10" :min="1" :max="2000" /> - <span>{{ state.floodSpeed }}<span>{{$t('global.meterSecond')}}</span></span> + <n-input-number + v-model:value="state.floodSpeed" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + placeholder="" + size="small" + style="width: 31%" + /> + <span style="width: 0.4rem">{{ $t("meterSecond") }}</span> </div> </div> @@ -101,9 +94,15 @@ text-color="#fff" @click="floodBegin" style="margin-right: 0.1rem" - >{{$t('global.analysis')}}</n-button + >{{ $t("analysis") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </template> @@ -112,15 +111,15 @@ import { reactive, onBeforeUnmount, watch, onMounted } from "vue"; import tool from "@/tools/tool"; import initHandler from "@/tools/drawHandler"; -type stateType = { - maxHeight: number, //最大可见高程 - minHeight: number, //最小可见高程 - currentHeight: number, //当前高程 - floodSpeed: number, //速度 - floodTrans: number, //透明度 - cheackedBand: string, //当前选择颜色 - colorBandShow: boolean, //颜色下拉框显隐 -} +type stateType = { + maxHeight: number; //最大可见高程 + minHeight: number; //最小可见高程 + currentHeight: number; //当前高程 + floodSpeed: number; //速度 + floodTrans: number; //透明度 + cheackedBand: string; //当前选择颜色 + colorBandShow: boolean; //颜色下拉框显隐 +}; // 设置默认值数据 let state = reactive<stateType>({ @@ -129,26 +128,36 @@ let state = reactive<stateType>({ currentHeight: 1000, //当前高程 floodSpeed: 800, //速度 floodTrans: 0.5, //透明度 - // cheackedBand: "rgb(16, 30, 222)", //当前选择颜色 - cheackedBand: "band1", //当前选择颜色 + cheackedBand: "band1", //当前选择颜色 "rgb(16, 30, 222)" colorBandShow: false, //颜色下拉框显隐 }); -// 初始化数据 +// 初始化变量 const windowGlobal: any = window; +let handlerPolygon, interval, floodPosition; let hypFlood = new SuperMap3D.HypsometricSetting(); let floodColorTable = new SuperMap3D.ColorTable(); -colorTableInit(floodColorTable); -hypFlood.DisplayMode = SuperMap3D.HypsometricSettingEnum.DisplayMode.FACE; -hypFlood._lineColor = new SuperMap3D.Color(1.0, 0.0, 0.0, 1.0); -hypFlood.MinVisibleValue = state.minHeight; -hypFlood.MaxVisibleValue = 0; -hypFlood.ColorTableMinKey = 1; -hypFlood.ColorTableMaxKey = 9000; -hypFlood.ColorTable = floodColorTable; -hypFlood.Opacity = state.floodTrans; -hypFlood.LineInterval = 200.0; -let handlerPolygon, interval, floodPosition; + +onMounted(() => { + colorTableInit(floodColorTable); + hypFlood.DisplayMode = SuperMap3D.HypsometricSettingEnum.DisplayMode.FACE; + hypFlood._lineColor = new SuperMap3D.Color(1.0, 0.0, 0.0, 1.0); + hypFlood.MinVisibleValue = state.minHeight; + hypFlood.MaxVisibleValue = 0; + hypFlood.ColorTableMinKey = 1; + hypFlood.ColorTableMaxKey = 9000; + hypFlood.ColorTable = floodColorTable; + hypFlood.Opacity = state.floodTrans; + hypFlood.LineInterval = 200.0; +}); + +onBeforeUnmount(() => { + clear(); + hypFlood.destroy(); + floodColorTable.destroy(); + hypFlood = undefined; + floodColorTable = undefined; +}); // 开始淹没分析 function floodBegin() { @@ -167,6 +176,7 @@ function floodBegin() { ); handlerPolygon.activate(); } + // 更新 function floodUpdate(positions: any) { let currentH = Math.floor(state.minHeight); @@ -196,9 +206,8 @@ function floodUpdate(positions: any) { }; } - // 默认设置淹没分析颜色插值 -function colorTableInit(colorTable:any) { +function colorTableInit(colorTable: any) { let colors = tool.gradientColors("#95E9F9", "#002794", 20, 0.8); colors.forEach((color, index) => { // 0-4500米颜色取值 @@ -213,20 +222,18 @@ function colorTableInit(colorTable:any) { } // 其他淹没颜色色带 -function colorBandsChange(val:string) { +function colorBandsChange(val: string) { let floodColorTable = new SuperMap3D.ColorTable(); switch (val) { case "band1": - // floodColorTable.insert( - // 9000, - // new SuperMap3D.Color(0, 39 / 255, 148 / 255) - // ); - // floodColorTable.insert( - // 0, - // new SuperMap3D.Color(149 / 255, 232 / 255, 249 / 255) - // ); - floodColorTable.insert(9000, new SuperMap3D.Color(0, 39/255, 148/255)); - floodColorTable.insert(0, new SuperMap3D.Color(149/255, 232/255, 249/255)); + floodColorTable.insert( + 9000, + new SuperMap3D.Color(0, 39 / 255, 148 / 255) + ); + floodColorTable.insert( + 0, + new SuperMap3D.Color(149 / 255, 232 / 255, 249 / 255) + ); break; case "band2": floodColorTable.insert( @@ -292,6 +299,7 @@ function clear() { clearInterval(interval); floodPosition = null; } + //监听 watch( () => state.floodTrans, @@ -305,7 +313,6 @@ watch( }; } ); - watch( () => state.minHeight, (val: any) => { @@ -330,7 +337,6 @@ watch( }; } ); - watch( () => state.cheackedBand, (val: any) => { @@ -346,17 +352,4 @@ watch( } } ); - -// 销毁 -onBeforeUnmount(() => { - clear(); - hypFlood.destroy(); - floodColorTable.destroy(); - hypFlood = undefined; - floodColorTable = undefined; -}); </script> - -<style lang="scss" scoped> -</style> - diff --git a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-isoline/index.ts b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-isoline/index.ts index 02cae732..f67759fd 100644 --- a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-isoline/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-isoline/index.ts @@ -1,3 +1,3 @@ -import SmTerrainIsoline from './index.vue'; +import SmTerrainIsoline from './isoline.vue'; export default SmTerrainIsoline; diff --git a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-isoline/index.vue b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-isoline/isoline.vue similarity index 73% rename from SuperMap iEarth/src/package/analyse3d/terrain/terrain-isoline/index.vue rename to SuperMap iEarth/src/package/analyse3d/terrain/terrain-isoline/isoline.vue index 274edeb7..5b382f2e 100644 --- a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-isoline/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-isoline/isoline.vue @@ -1,44 +1,47 @@ <template> <!-- 等值线 --> <div class="row-item"> - <span>{{$t('global.maximumVisibleElevation')}}</span> + <span>{{ $t("maximumVisibleElevation") }}</span> <n-input-number - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.fillMaxHeight" :show-button="false" > - <template #suffix>{{$t('global.meter')}}</template> + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> <div class="row-item"> - <span>{{$t('global.minimumVisibleElevation')}}</span> + <span>{{ $t("minimumVisibleElevation") }}</span> <n-input-number - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.fillMinHeight" :show-button="false" > - <template #suffix>{{$t('global.meter')}}</template> + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> <div class="row-item"> - <span>{{$t('global.equivalentIsoline')}}</span> + <span>{{ $t("equivalentIsoline") }}</span> <n-input-number - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.equivalentIsoline" :bordered="false" :min="1" :max="10000" :show-button="false" > - <template #suffix>{{$t('global.meter')}}</template> + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> - <div class="row-item"> - <span>{{$t('global.contourColor')}}</span> - <div class="color-pick-box" style="width: 1.96rem;; margin-left: 0rem"> + <div + class="row-item" + v-show="state.fillOptionsSelected == 2 || state.fillOptionsSelected == 3" + > + <span>{{ $t("contourColor") }}</span> + <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> <n-color-picker v-model:value="state.lineColor" :render-label=" @@ -52,18 +55,18 @@ </div> <div class="row-item"> - <span>{{$t('global.displayMode')}}</span> + <span>{{ $t("displayMode") }}</span> <n-select - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.fillOptionsSelected" :options="state.options" /> </div> <div class="row-item"> - <span>{{$t('global.editArea')}}</span> + <span>{{ $t("editArea") }}</span> <n-checkbox - style="width: 1.96rem;" + style="width: 1.96rem" v-model:checked="state.isEdit" ></n-checkbox> </div> @@ -75,26 +78,32 @@ text-color="#fff" @click="isoLineAnalysis" style="margin-right: 0.1rem" - >{{$t('global.analysis')}}</n-button + >{{ $t("analysis") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </template> <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; import initHandler from "@/tools/drawHandler"; import tool from "@/tools/tool"; type stateType = { - fillMaxHeight: number, //最大可见高程 - fillMinHeight: number, //最小可见高程 - equivalentIsoline: number, //等值距 - fillOptionsSelected: number, //当前选择模式 - lineColor: string, //颜色 - isEdit: boolean, //是否编辑 - options:any -} + fillMaxHeight: number; //最大可见高程 + fillMinHeight: number; //最小可见高程 + equivalentIsoline: number; //等值距 + fillOptionsSelected: number; //当前选择模式 + lineColor: string; //颜色 + isEdit: boolean; //是否编辑 + options: any; +}; // 设置默认值数据 let state = reactive<stateType>({ @@ -105,32 +114,31 @@ let state = reactive<stateType>({ lineColor: "rgba(255,128,64,1)", //颜色 isEdit: false, //是否编辑 options: [ - { - label: () => GlobalLang.contourLineFill, + { + label: () => $t("contourLineFill"), value: 2, }, { - label: () => GlobalLang.contourFaceFill, + label: () => $t("contourFaceFill"), value: 1, }, { - label: () => GlobalLang.contourAllFill, + label: () => $t("contourAllFill"), value: 3, }, { - label: () => GlobalLang.contourNoFill, + label: () => $t("contourNoFill"), value: 0, }, - ] + ], }); -// 初始化数据 -let handlerPolygon,editHandler, isolinePosition,hyp,colorTable; +// 初始化变量 +let handlerPolygon, editHandler, isolinePosition; +let hyp = new SuperMap3D.HypsometricSetting(); +let colorTable = new SuperMap3D.ColorTable(); //建立颜色表 -init(); -function init(){ - hyp = new SuperMap3D.HypsometricSetting(); - colorTable = new SuperMap3D.ColorTable(); //建立颜色表 +function init() { colorTableInit(colorTable); hyp.DisplayMode = state.fillOptionsSelected; //显示模式 hyp._lineColor = SuperMap3D.Color.fromCssColorString(state.lineColor); @@ -140,10 +148,20 @@ function init(){ hyp.ColorTableMinKey = 2736.88110351563; hyp.ColorTableMaxKey = 5597.06640625; hyp.ColorTable = colorTable; -// hyp.Opacity = 0.4; - } +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(); + hyp.destroy(); + colorTable.destroy(); + hyp = undefined; + colorTable = undefined; +}); + function isoLineAnalysis() { if (!handlerPolygon) { handlerPolygon = initHandler("Polygon"); @@ -151,30 +169,33 @@ function isoLineAnalysis() { init(); handlerPolygon.handlerDrawing().then( - (res:any) => { + (res: any) => { let positions = tool.CartesiantoDegrees(res.object.positions); isolineUpdate(positions); isolinePosition = positions; - if (state.isEdit) setEditHandler(handlerPolygon.polygon,isolineUpdate); + if (state.isEdit) setEditHandler(handlerPolygon.polygon, isolineUpdate); + if (handlerPolygon) handlerPolygon.polylineTransparent.show = false; }, - (err:any) => { + (err: any) => { console.log(err); } ); handlerPolygon.activate(); } + // 更新 -function isolineUpdate(p:any) { +function isolineUpdate(p: any) { if (!p || p.length == 0) return; hyp.CoverageArea = p; viewer.scene.globe.HypsometricSetting = { hypsometricSetting: hyp, - analysisMode: SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION + analysisMode: + SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION, }; } // 设置编辑handle -function setEditHandler(entity:any, callback:any) { +function setEditHandler(entity: any, callback: any) { handlerPolygon.polygon.show = true; if (!editHandler) { editHandler = new SuperMap3D.EditHandler(viewer, entity); @@ -182,16 +203,15 @@ function setEditHandler(entity:any, callback:any) { editHandler.changedEvt.addEventListener(() => { let editPositions = tool.CartesiantoDegrees(editHandler._positions); callback(editPositions); - }) + }); } else { // editHandler.deactivate(); editHandler.setEditObject(entity); } } - // 创建颜色表 -function colorTableInit(colorTable:any) { +function colorTableInit(colorTable: any) { colorTable.insert(5597.06640625, new SuperMap3D.Color(0, 0, 255 / 255)); colorTable.insert( 5406.3873860677086, @@ -258,7 +278,6 @@ function rgbaNum(rgba, index) { return val[index]; } - // 清除 function clear() { if (handlerPolygon) handlerPolygon.clearHandler(); @@ -268,36 +287,34 @@ function clear() { hyp && (hyp.MaxVisibleValue = -1000); hyp && (hyp.MinVisibleValue = -1000); isolinePosition = undefined; - hyp = new SuperMap3D.HypsometricSetting(); } + //监听 watch( () => state.fillMaxHeight, - (val:any) => { + (val: any) => { hyp.MaxVisibleValue = parseFloat(val); if (isolinePosition) isolineUpdate(isolinePosition); } ); watch( () => state.fillMinHeight, - (val:any) => { + (val: any) => { hyp.MinVisibleValue = parseFloat(val); if (isolinePosition) isolineUpdate(isolinePosition); } ); - watch( () => state.equivalentIsoline, - (val:any) => { + (val: any) => { hyp.LineInterval = parseFloat(val); if (isolinePosition) isolineUpdate(isolinePosition); } ); watch( () => state.lineColor, - (val:any) => { - + (val: any) => { let color = SuperMap3D.Color.fromCssColorString(val); if (color) hyp._lineColor = color; if (isolinePosition) isolineUpdate(isolinePosition); @@ -305,7 +322,7 @@ watch( ); watch( () => state.fillOptionsSelected, - (val:any) => { + (val: any) => { switch (val) { case 0: { @@ -339,23 +356,15 @@ watch( ); watch( () => state.isEdit, - val => { + (val) => { if (val) { - if(handlerPolygon && handlerPolygon.polygon) - setEditHandler(handlerPolygon.polygon,isolineUpdate); - } else if(editHandler) editHandler.clear(); + if (handlerPolygon && handlerPolygon.polygon) + setEditHandler(handlerPolygon.polygon, isolineUpdate); + } else if (editHandler) { + if (handlerPolygon && handlerPolygon.polygon) + handlerPolygon.polygon.show = false; + editHandler.clear(); + } } ); - - -// 销毁 -onBeforeUnmount(() => { - clear(); - hyp.destroy(); - colorTable.destroy(); - hyp = undefined; - colorTable = undefined; -}); - </script> - diff --git a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-operation/index.ts b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-operation/index.ts index b1980612..7775ebbd 100644 --- a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-operation/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-operation/index.ts @@ -1,3 +1,3 @@ -import SmTerrainOperation from './index.vue'; +import SmTerrainOperation from './operation.vue'; export default SmTerrainOperation; diff --git a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-operation/index.vue b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-operation/operation.vue similarity index 57% rename from SuperMap iEarth/src/package/analyse3d/terrain/terrain-operation/index.vue rename to SuperMap iEarth/src/package/analyse3d/terrain/terrain-operation/operation.vue index 4c1e1720..4aed4ee1 100644 --- a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-operation/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-operation/operation.vue @@ -1,78 +1,122 @@ <template> <!-- 地形操作 --> <div class="btn-list"> - <div class="btn" :class="item.isSelect ? 'select-btn' : ''" v-for="(item, index) in comList" :key="index" - @click="changeItem(item)"> + <div + class="btn" + :class="item.isSelect ? 'select-btn' : ''" + v-for="(item, index) in comList" + :key="index" + @click="changeItem(item)" + > {{ item.name }} </div> </div> <div v-if="state.operationType === 'dig'"> <div class="row-item"> - <span>{{$t('global.excavationDepth')}}</span> - <n-input-number style="width: 1.96rem;" v-model:value="state.digDepth" :show-button="false"> - <template #suffix>{{$t('global.meter')}}</template> + <span>{{ $t("excavationDepth") }}</span> + <n-input-number + style="width: 1.96rem" + :update-value-on-input="false" + v-model:value="state.digDepth" + :show-button="false" + > + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> <div class="row-item"> - <span>{{$t('global.excavateAreaOffsetUp')}}</span> - <div style="width: 1.96rem;"> + <span>{{ $t("excavateAreaOffsetUp") }}</span> + <div style="width: 1.96rem"> <n-switch v-model:value="state.isPullOut" size="small" /> </div> </div> + <div class="row-item" v-if="state.isPullOut"> - <span>{{$t('global.upHeight')}}</span> - <n-input-number style="width: 1.96rem;" v-model:value="state.upHeight" :show-button="false"> - <template #suffix>{{$t('global.meter')}}</template> + <span>{{ $t("upHeight") }}</span> + <n-input-number + style="width: 1.96rem" + v-model:value="state.upHeight" + :update-value-on-input="false" + :show-button="false" + > + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> <div class="row-item" v-show="!state.isPullOut"> - <span>{{$t('global.editArea')}}</span> - <n-checkbox style="width: 1.96rem;" v-model:checked="state.isEdit"></n-checkbox> + <span>{{ $t("editArea") }}</span> + <n-checkbox + style="width: 1.96rem" + v-model:checked="state.isEdit" + ></n-checkbox> </div> - <div class="row-item" v-show="!state.isPullOut"> - <span>{{$t('global.editAreaZ')}}</span> - <n-checkbox style="width: 1.96rem;" v-model:checked="state.isEditZ"></n-checkbox> + <div class="row-item" v-show="!state.isPullOut && state.isEdit"> + <span>{{ $t("editAreaZ") }}</span> + <n-checkbox + style="width: 1.96rem" + v-model:checked="state.isEditZ" + ></n-checkbox> </div> - </div> <div v-if="state.operationType === 'modify'"> <div class="row-item"> - <span>{{$t('global.editArea')}}</span> - <n-checkbox style="width: 1.96rem;" v-model:checked="state.isEdit"></n-checkbox> + <span>{{ $t("editArea") }}</span> + <n-checkbox + style="width: 1.96rem" + v-model:checked="state.isEdit" + ></n-checkbox> </div> - <div class="row-item"> - <span>{{$t('global.editAreaZ')}}</span> - <n-checkbox style="width: 1.96rem;" v-model:checked="state.isEditZ"></n-checkbox> + <div class="row-item" v-show="state.isEdit"> + <span>{{ $t("editAreaZ") }}</span> + <n-checkbox + style="width: 1.96rem" + v-model:checked="state.isEditZ" + ></n-checkbox> </div> - </div> <div class="btn-row-item"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="Analyze" style="margin-right: 0.1rem">{{$t('global.analysis')}}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="Analyze" + style="margin-right: 0.1rem" + >{{ + state.operationType == "dig" ? $t("excavate") : $t("flatten") + }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> + <div class="stktip"> + <span>{{ $t("stkUnsupported") }}</span> </div> </template> <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; import tool from "@/tools/tool"; import initHandler from "@/tools/drawHandler"; import setEditHandler from "@/tools/editHandler"; type stateType = { - digDepth: number, // 开挖深度 - isEdit: boolean, // 是否编辑 - isEditZ: boolean, // 编辑时是否只编辑Z轴 - operationType: string, // 操作方式,默认为dig-开挖 - isPullOut: boolean, // 是否将开挖地形抽出显示 - upHeight: number, // 抽出高度 -} + digDepth: number; // 开挖深度 + isEdit: boolean; // 是否编辑 + isEditZ: boolean; // 编辑时是否只编辑Z轴 + operationType: string; // 操作方式,默认为dig-开挖 + isPullOut: boolean; // 是否将开挖地形抽出显示 + upHeight: number; // 抽出高度 +}; // 设置默认值数据 let state = reactive<stateType>({ @@ -84,23 +128,30 @@ let state = reactive<stateType>({ upHeight: 500, }); +let handlerPolygon, digPisitions, removeEdit; let comList = reactive([ { - name: GlobalLang.terrainExcavate, + name: $t("terrainExcavate"), isSelect: true, }, { - name: GlobalLang.terrainChange, + name: $t("terrainChange"), isSelect: false, }, ]); -let handlerPolygon, digPisitions, removeEdit; + +onMounted(() => {}); + +onBeforeUnmount(() => { + clear(); +}); // 分析 function Analyze() { + clear(); if (!handlerPolygon) handlerPolygon = initHandler("Polygon"); handlerPolygon.handlerDrawing().then( - (res:any) => { + (res: any) => { handlerPolygon.polylineTransparent.show = false; let positions = tool.CartesiantoDegrees(res.object.positions); if (state.operationType === "dig") digUpdate(positions); @@ -109,26 +160,28 @@ function Analyze() { setEdit(); } }, - (err:any) => { + (err: any) => { console.log(err); } ); handlerPolygon.activate(); } + //更新 -function digUpdate(positions:any) { +function digUpdate(positions: any) { digPisitions = positions; viewer.scene.globe.removeAllExcavationRegion(); if (state.isPullOut) { + viewer.scene.globe.removeAllExtractRegion(); // 地形开挖并抽出 viewer.scene.globe.addExtractRegion({ - name: 'extract', //名称 + name: "extract", //名称 position: positions, //区域 height: state.digDepth, //开挖深度 transparent: false, //封边是否透明 extractHeight: state.upHeight, //抽出高度 - granularity: 1 //精度 + granularity: 1, //精度 }); } else { // 只进行地形开挖操作 @@ -142,7 +195,7 @@ function digUpdate(positions:any) { } // 修改地形更新 -function modifyUpdate(positions:any) { +function modifyUpdate(positions: any) { viewer.scene.globe.removeAllModifyRegion(); viewer.scene.globe.addModifyRegion({ name: "ggg", @@ -164,7 +217,7 @@ function setEdit() { } // 更新编辑点 -function updateEdit(p:any) { +function updateEdit(p: any) { let positions = tool.CartesiantoDegrees(p); if (state.operationType === "dig") digUpdate(positions); else modifyUpdate(positions); @@ -189,21 +242,23 @@ function changeItem(item: any) { } }); - if(item.name === '地形开挖'){ - state.operationType = 'dig'; - }else{ - state.operationType = 'modify'; + if (item.name === "地形开挖") { + state.operationType = "dig"; + } else { + state.operationType = "modify"; } state.isEdit = false; state.isEditZ = false; + + clear(); } // 清除 function clear() { if (handlerPolygon) handlerPolygon.clearHandler(); - if (state.operationType === "dig") clearDig(); - else clearModify(); + clearDig(); + clearModify(); removeEditHandler(); } // 清除开挖地形 @@ -225,6 +280,12 @@ watch( else removeEditHandler(); } ); +watch( + () => state.isPullOut, + () => { + clear(); + } +); watch( () => state.isEditZ, (val) => { @@ -233,49 +294,40 @@ watch( } } ); - // 关闭实时改变开挖深度,抽出高度暂时改不了 -// watch( -// () => state.digDepth, -// (val) => { -// if (digPisitions) digUpdate(digPisitions); -// } -// ); -// watch( -// () => state.upHeight, -// (val) => { -// debugger -// if (digPisitions) digUpdate(digPisitions); -// } -// ); - -// 销毁 -onBeforeUnmount(() => { - clear(); -}); +watch( + () => state.digDepth, + () => { + if (digPisitions) digUpdate(digPisitions); + } +); +watch( + () => state.upHeight, + () => { + if (digPisitions) digUpdate(digPisitions); + } +); </script> - <style lang="scss" scoped> .btn-list { - // font-size: 0.14rem; - display: flex; + width: 3.4rem; justify-content: space-evenly; margin-bottom: 0.15rem; - cursor: pointer; .btn { width: fit-content; - padding: 0 0.08rem ; - height: 0.26rem; - line-height: 0.26rem; - text-align: center; + padding: 0 0.08rem; } +} + +.stktip { + color: rgba(255, 255, 255, 0.45); + margin-top: -20px; - .select-btn { - border-radius: 0.02rem; - color: #3499e5; - background: rgba(255, 255, 255, 0.15); + span { + font-family: "Microsoft JhengHe", sans-serif; // Microsoft Yahei + font-size: 0.14rem; } } </style> diff --git a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-slope/index.ts b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-slope/index.ts index e5f7843a..eea3bfa1 100644 --- a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-slope/index.ts +++ b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-slope/index.ts @@ -1,3 +1,3 @@ -import SmTerrainSlope from './index.vue'; +import SmTerrainSlope from './slope.vue'; export default SmTerrainSlope; diff --git a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-slope/index.vue b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-slope/slope.vue similarity index 71% rename from SuperMap iEarth/src/package/analyse3d/terrain/terrain-slope/index.vue rename to SuperMap iEarth/src/package/analyse3d/terrain/terrain-slope/slope.vue index ab5a97aa..81e6709f 100644 --- a/SuperMap iEarth/src/package/analyse3d/terrain/terrain-slope/index.vue +++ b/SuperMap iEarth/src/package/analyse3d/terrain/terrain-slope/slope.vue @@ -1,16 +1,16 @@ <template> <!-- 坡度坡向 --> <div class="row-item"> - <span>{{$t('global.analysisArea')}}</span> + <span>{{ $t("analysisArea") }}</span> <n-select - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.analysisArea" :options="state.options_region" /> </div> <div class="row-item"> - <span>{{$t('global.minSlope')}}</span> + <span>{{ $t("minSlope") }}</span> <div class="slider-box"> <n-slider v-model:value="state.wideMinR" @@ -19,12 +19,23 @@ :max="90" :step="1" /> - <div class="row-slider-num">{{ state.wideMinR }} <span> °</span></div> + <n-input-number + v-model:value="state.wideMinR" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="90" + placeholder="" + size="small" + /> + <span> °</span> </div> </div> <div class="row-item"> - <span>{{$t('global.maxSlope')}}</span> + <span>{{ $t("maxSlope") }}</span> <div class="slider-box"> <n-slider v-model:value="state.wideMaxR" @@ -33,37 +44,58 @@ :max="90" :step="1" /> - <div class="row-slider-num">{{ state.wideMaxR }} <span> °</span></div> + <n-input-number + v-model:value="state.wideMaxR" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="90" + placeholder="" + size="small" + /> + <span> °</span> </div> </div> <div class="row-item"> - <span>{{$t('global.displayMode')}}</span> + <span>{{ $t("displayMode") }}</span> <n-select - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.displayMode" :options="state.options_display" /> </div> <div class="row-item"> - <span>{{$t('global.transparency')}}</span> + <span>{{ $t("transparency") }}</span> <div class="slider-box"> <n-slider v-model:value="state.trans" style="width: 70%" :min="0" :max="1" - :step="0.1" + :step="0.01" + /> + <n-input-number + v-model:value="state.trans" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="1" + placeholder="" + size="small" /> - <div class="row-slider-num">{{ state.trans * 100 }} <span> %</span></div> </div> </div> <div class="row-item"> - <span>{{$t('global.editArea')}}</span> + <span>{{ $t("editArea") }}</span> <n-checkbox - style="width: 1.96rem;" + style="width: 1.96rem" v-model:checked="state.isEdit" ></n-checkbox> </div> @@ -75,29 +107,40 @@ text-color="#fff" @click="startSlope" style="margin-right: 0.1rem" - >{{$t('global.analysis')}}</n-button + >{{ $t("analysis") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> + </div> + + <div class="stktip"> + <span>{{ $t("stkUnsupported") }}</span> </div> </template> + <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; import initHandler from "@/tools/drawHandler"; import tool from "@/tools/tool"; type stateType = { - analysisArea: string, //分析区域 - displayMode: string, //显示模式 - wideMaxR: number, //最大坡度 - wideMinR: number, //最小坡度 - trans: number, //透明度 - isEdit: boolean, //是否编辑 - colorTableValue: any,// 颜色表 - options_region:any, // 分析区域选项 - options_display:any, // 显示模式选项 - colorOptions:any, // 色带选项 - isStartSlope:boolean,// 是否开始分析 -} + analysisArea: string; //分析区域 + displayMode: string; //显示模式 + wideMaxR: number; //最大坡度 + wideMinR: number; //最小坡度 + trans: number; //透明度 + isEdit: boolean; //是否编辑 + colorTableValue: any; // 颜色表 + options_region: any; // 分析区域选项 + options_display: any; // 显示模式选项 + colorOptions: any; // 色带选项 + isStartSlope: boolean; // 是否开始分析 +}; // 设置默认值数据 let state = reactive<stateType>({ @@ -108,32 +151,28 @@ let state = reactive<stateType>({ trans: 0.8, //透明度 isEdit: false, //是否编辑 colorTableValue: null, - isStartSlope:false,// 是否开始分析 + isStartSlope: false, // 是否开始分析 options_region: [ { - label: () => GlobalLang.partRegion, + label: () => $t("partRegion"), value: "ARM_REGION", }, { - label: () => GlobalLang.allRegion, + label: () => $t("allRegion"), value: "ARM_ALL", }, - { - label: () => GlobalLang.noRegion, - value: "ARM_NONE", - }, ], options_display: [ { - label: () => GlobalLang.allDisplay, + label: () => $t("allDisplay"), value: "FACE_AND_ARROW", }, { - label: () => GlobalLang.faceDisplay, + label: () => $t("faceDisplay"), value: "FACE", }, { - label: () => GlobalLang.arrowDisplay, + label: () => $t("arrowDisplay"), value: "ARROW", }, ], @@ -153,29 +192,44 @@ let state = reactive<stateType>({ ], }); -// 初始化数据 -let editHandler; +// 初始化变量 +let editHandler, slopePosition, handlerPolygon; //保存当前分析区域 let slope = new SuperMap3D.SlopeSetting(); //分析对象 +let colorTable = new SuperMap3D.ColorTable(); //颜色 let wide = SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode[state.analysisArea]; //默认分析区域值 -let colorTable = new SuperMap3D.ColorTable(); //颜色 -let slopePosition, handlerPolygon; //保存当前分析区域 -colorTable.insert(80, new SuperMap3D.Color(255 / 255, 0 / 255, 0 / 255)); -colorTable.insert(50, new SuperMap3D.Color(221 / 255, 224 / 255, 7 / 255)); -colorTable.insert(30, new SuperMap3D.Color(20 / 255, 187 / 255, 18 / 255)); -colorTable.insert(20, new SuperMap3D.Color(0, 161 / 255, 1)); -colorTable.insert(0, new SuperMap3D.Color(9 / 255, 9 / 255, 255 / 255)); -slope.DisplayMode = SuperMap3D.SlopeSettingEnum.DisplayMode[state.displayMode]; //显示模式 -slope.MaxVisibleValue = state.wideMaxR; -slope.MinVisibleValue = state.wideMinR; -slope.ColorTable = colorTable; -slope.Opacity = state.trans; +function init() { + colorTable.insert(80, new SuperMap3D.Color(255 / 255, 0 / 255, 0 / 255)); + colorTable.insert(50, new SuperMap3D.Color(221 / 255, 224 / 255, 7 / 255)); + colorTable.insert(30, new SuperMap3D.Color(20 / 255, 187 / 255, 18 / 255)); + colorTable.insert(20, new SuperMap3D.Color(0, 161 / 255, 1)); + colorTable.insert(0, new SuperMap3D.Color(9 / 255, 9 / 255, 255 / 255)); + + slope.DisplayMode = + SuperMap3D.SlopeSettingEnum.DisplayMode[state.displayMode]; //显示模式 + slope.MaxVisibleValue = state.wideMaxR; + slope.MinVisibleValue = state.wideMinR; + slope.ColorTable = colorTable; + slope.Opacity = state.trans; +} + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(); + slope.destroy(); + colorTable.destroy(); + slope = undefined; + colorTable = undefined; +}); // 开始坡度分析 function startSlope() { state.isStartSlope = true; - if(state.analysisArea === 'ARM_ALL'){ + if (state.analysisArea === "ARM_ALL") { wide = SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL; viewer.scene.globe.SlopeSetting = { slopeSetting: slope, @@ -185,20 +239,22 @@ function startSlope() { } if (!handlerPolygon) handlerPolygon = initHandler("Polygon"); handlerPolygon.handlerDrawing().then( - (res:any) => { + (res: any) => { let positions = tool.CartesiantoDegrees(res.object.positions); slopeUpdate(positions); slopePosition = positions; - if (state.isEdit) setEditHandler(handlerPolygon.polygon,slopeUpdate); + handlerPolygon.polylineTransparent.show = false; + if (state.isEdit) setEditHandler(handlerPolygon.polygon, slopeUpdate); }, - (err:any) => { + (err: any) => { console.log(err); } ); handlerPolygon.activate(); } + // 更新 -function slopeUpdate(p:any) { +function slopeUpdate(p: any) { slope.CoverageArea = p; viewer.scene.globe.SlopeSetting = { slopeSetting: slope, @@ -206,6 +262,7 @@ function slopeUpdate(p:any) { SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION, }; } + // 启动编辑 function setEditHandler(entity: any, callback?: any) { handlerPolygon.polygon.show = true; @@ -215,9 +272,8 @@ function setEditHandler(entity: any, callback?: any) { editHandler.changedEvt.addEventListener(() => { let editPositions = tool.CartesiantoDegrees(editHandler._positions); callback(editPositions); - }) + }); } else { - // editHandler.deactivate(); editHandler.setEditObject(entity); } } @@ -225,23 +281,19 @@ function setEditHandler(entity: any, callback?: any) { // 清除 function clear() { state.isStartSlope = false; - if (handlerPolygon) handlerPolygon.clearHandler(); if (editHandler) editHandler.clear(); viewer.scene.globe.SlopeSetting = { analysisMode: SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_NONE, }; slopePosition = undefined; - // handlerPolygon.polygon.show = false; - // handlerPolygon.polyline.show = false; - // clearEditHandler("Polygon"); } //监听 watch( () => state.analysisArea, (val) => { - if(!state.isStartSlope) return; + if (!state.isStartSlope) return; switch (val) { case "ARM_REGION": wide = SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION; @@ -255,18 +307,13 @@ watch( default: break; } - - viewer.scene.globe.SlopeSetting = { - slopeSetting: slope, - analysisMode: wide, - }; + clear(); } ); - watch( () => state.wideMaxR, (val) => { - if(state.wideMaxR<state.wideMinR) state.wideMaxR = state.wideMinR + 1; + if (state.wideMaxR < state.wideMinR) state.wideMaxR = state.wideMinR + 1; slope.MaxVisibleValue = Math.floor(val); if (slopePosition) viewer.scene.globe.SlopeSetting = { @@ -278,7 +325,7 @@ watch( watch( () => state.wideMinR, (val) => { - if(state.wideMinR>state.wideMaxR) state.wideMinR = state.wideMaxR - 1; + if (state.wideMinR > state.wideMaxR) state.wideMinR = state.wideMaxR - 1; slope.MinVisibleValue = Math.floor(val); if (slopePosition) viewer.scene.globe.SlopeSetting = { @@ -287,7 +334,6 @@ watch( }; } ); - watch( () => state.displayMode, (val) => { @@ -307,7 +353,7 @@ watch( } // 指定区域刷新 if (slopePosition) slopeUpdate(slopePosition); - if(state.analysisArea === 'ARM_ALL' && state.isStartSlope){ + if (state.analysisArea === "ARM_ALL" && state.isStartSlope) { wide = SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL; viewer.scene.globe.SlopeSetting = { slopeSetting: slope, @@ -316,7 +362,6 @@ watch( } } ); - watch( () => state.trans, () => { @@ -337,7 +382,6 @@ watch( } else if (editHandler) editHandler.clear(); } ); - watch( () => state.colorTableValue, (val) => { @@ -433,15 +477,16 @@ watch( }; } ); -// 销毁 -onBeforeUnmount(() => { - clear(); - slope.destroy(); - colorTable.destroy(); - slope = undefined; - colorTable = undefined; -}); </script> + <style lang="scss" scoped> -</style> +.stktip { + color: rgba(255, 255, 255, 0.45); + margin-top: -20px; + span { + font-family: "Microsoft JhengHe", sans-serif; // Microsoft Yahei + font-size: 0.14rem; + } +} +</style> diff --git a/SuperMap iEarth/src/package/layerList/index.ts b/SuperMap iEarth/src/package/layerList/index.ts deleted file mode 100644 index cfb72617..00000000 --- a/SuperMap iEarth/src/package/layerList/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import LayerList from "./index.vue" -export default LayerList; diff --git a/SuperMap iEarth/src/package/layerList/index.vue b/SuperMap iEarth/src/package/layerList/index.vue deleted file mode 100644 index f20b4921..00000000 --- a/SuperMap iEarth/src/package/layerList/index.vue +++ /dev/null @@ -1,254 +0,0 @@ -<template> - <div class="layer-list-box"> - <n-tree block-line :data="layerStore.layerTreeData" :render-suffix="renderSuffix" cascade default-expand-all="true" /> - </div> -</template> - -<script setup lang="ts"> -import { useLayerStore } from "@/store/index"; -import { - TreeOption, - NIcon, - NButton, - NDropdown, -} from "naive-ui"; -import { h } from "vue"; -import { usePanelStore } from "@/store"; - -const panelStore = usePanelStore(); -const layerStore = useLayerStore(); -let currentTerrainProvider: any; // 保存当前地形图层,方便控制其显隐 - -// 给树添加icon -function renderSuffix({ option }: { option: TreeOption | any }) { - if (!option.children) { - return h("div", {}, [ - h( - NButton, - { - bordered: false, - text: true, - title: GlobalLang.isShow, - style: 'margin-right:4px', - onClick: (e) => { - setLayerShow(option); - }, - }, - { - icon: () => h(option.isShow ? h("i", { class: "iconfont iconkejian", style: 'color:rgba(255, 255, 255, 0.65)' }, "") : - h("i", { class: "iconfont iconyincang", style: 'color:rgba(255, 255, 255, 0.65)' }, "")), - } - ), - h( - NDropdown, - { - trigger: "click", - placement: "right-start", - options: setOptionsByType(option.type), - onSelect: (key: any) => { - setDropdownAction(option,key); - }, - }, - { - default: () => - h( - NButton, - { - bordered: false, - text: true, - title: "", - onClick: (e) => { }, - }, - { - icon: () => h("i", { class: "iconfont icongengduo" }, ""), - } - ), - } - ), - ]); - } -} - -// 根据图层类型设置不同的下拉操作选项 -function setOptionsByType(type: string) { - if (type === 's3m') { - return [ - { - label: GlobalLang.rapidLocate, - key: 1, - icon: () => h("i", { class: "iconfont icondingwei" }, ""), - }, - { - label: GlobalLang.layerOpration, - key: 2, - icon: () => h("i", { class: "iconfont iconyidong" }, ""), - }, - { - label: GlobalLang.layerAttribute, - key: 3, - icon: () => h("i", { class: "iconfont icontishi" }, ""), - }, - { - label: GlobalLang.layerStyle, - key: 4, - icon: () => h("i", { class: "iconfont icontuceng" }, ""), - }, - { - label: GlobalLang.layerQuery, - key: 10, - icon: () => h("i", { class: "iconfont iconsousuo" }, ""), - }, - { - label: GlobalLang.remove, - key: 5, - icon: () => h("i", { class: "iconfont iconshanchu", style: "color: #DC5849" }, ""), - }, - ] - }else if (type === 'imagery'){ - return [ - { - label:GlobalLang.mapQuery, - key: 11, - icon: () => h("i", { class: "iconfont icondituchaxun" }, ""), - }, - { - label: GlobalLang.remove, - key: 5, - icon: () => h("i", { class: "iconfont iconshanchu", style: "color: #DC5849" }, ""), - }, - ] - } - else if (type === 'mvt') { - return [ - { - label: GlobalLang.rapidLocate, - key: 1, - icon: () => h("i", { class: "iconfont icondingwei" }, ""), - }, - { - label: GlobalLang.remove, - key: 5, - icon: () => h("i", { class: "iconfont iconshanchu", style: "color: #DC5849" }, ""), - }, - ] - } else { - return [{ - label: GlobalLang.remove, - key: 5, - icon: () => h("i", { class: "iconfont iconshanchu", style: "color: #DC5849" }, ""), - }] - } -} - -// 控制图层显隐 -function setLayerShow(option: any) { - // console.log("option:",option) - if (!option.key) return; - let optionKey: any = option.key; - if (optionKey.indexOf("-") != -1) { - let index = optionKey.split("-")[1]; - switch (option.type) { - case "s3m": - viewer.scene.layers._layerQueue[index].visible = !option.isShow; - layerStore.isShowLayer(option); - break; - case "imagery": - viewer.imageryLayers._layers[index].show = !option.isShow; - layerStore.isShowLayer(option); - break; - case "mvt": - viewer.scene._vectorTileMaps._layerQueue[index].show = !option.isShow; - layerStore.isShowLayer(option); - break; - case "terrain": - if (!currentTerrainProvider) { - currentTerrainProvider = viewer.terrainProvider; - viewer.terrainProvider = - new SuperMap3D.EllipsoidTerrainProvider(); - } else { - viewer.terrainProvider = currentTerrainProvider; - currentTerrainProvider = null; - } - layerStore.isShowLayer(option); - break; - default: - break; - } - } -} - -// 下拉列表操作 -function setDropdownAction(option: any, key: number) { - // key为1:定位,key为2:删除图层 - layerStore.s3mLayerSelectIndex = option.key.split('-')[1]; - // console.log(option) - if (key === 1) { - if (option.type === "s3m") { - let s3mLayer = viewer.scene.layers.find(option.label); - viewer.flyTo(s3mLayer, { duration: 0 }); - } else if (option.type === "mvt") { - let index = String(option.key).split("-")[1]; - let mvtLayer = viewer.scene._vectorTileMaps._layerQueue[index]; - var bounds = mvtLayer.rectangle; - viewer.scene.camera.flyTo({ - destination: new SuperMap3D.Cartesian3.fromRadians( - (bounds.east + bounds.west) * 0.5, - (bounds.north + bounds.south) * 0.5, - 10000 - ), - duration: 1, - orientation: { - heading: 0, - roll: 0, - }, - }); - } - } - else if (key === 2) { - panelStore.setRightToolBarList({ id: 7 }); - } - else if (key === 3) { - panelStore.setRightToolBarList({ id: 8 }); - } - else if (key === 4) { - panelStore.setRightToolBarList({ id: 9 }); - } - else if (key === 5) { - // 删除图层之后 再显隐会有问题,不通过id - let type = option.type; - let layerName = option.label; - let layerIndex = option.key.split("-")[1]; - if (type === "s3m") { - viewer.scene.layers.remove(layerName); - layerStore.removeLayer(option); - } - if (type === "imagery") { - let delImagelayer = viewer.imageryLayers._layers[layerIndex]; - viewer.imageryLayers.remove(delImagelayer); - layerStore.removeLayer(option); - } - if (type === "mvt") { - let mvtLayerName = layerStore.MVTLayerNameList[layerIndex]; - viewer.scene.removeVectorTilesMap(mvtLayerName); - layerStore.removeLayer(option); - } - if (type === "terrain") { - viewer.terrainProvider = - new SuperMap3D.EllipsoidTerrainProvider(); - layerStore.removeLayer(option); - } - } - else if (key === 10) { - panelStore.setRightToolBarList({ id: 10 }); - } - else if (key === 11) { - panelStore.setRightToolBarList({ id: 11 }); - } -} -</script> - -<style lang="scss" scoped> -.layer-list-box { - padding: 0px 6px; -} -</style> diff --git a/SuperMap iEarth/src/package/layerSeries/layer-attribute/index.ts b/SuperMap iEarth/src/package/layerSeries/layer-attribute/index.ts new file mode 100644 index 00000000..25305ab8 --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/layer-attribute/index.ts @@ -0,0 +1,3 @@ +import LayerAttribute from './layerAttribute.vue'; + +export default LayerAttribute; diff --git a/SuperMap iEarth/src/package/layerSeries/layer-attribute/layerAttribute.vue b/SuperMap iEarth/src/package/layerSeries/layer-attribute/layerAttribute.vue new file mode 100644 index 00000000..3ace42bd --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/layer-attribute/layerAttribute.vue @@ -0,0 +1,375 @@ +<template> + <div class="layerSeries-box"> + <div class="row-item"> + <span>{{ $t("chooseLayer") }}</span> + <n-select + style="width: 62%" + v-model:value="state.selectedIndex" + :options="state.s3mlayers" + /> + </div> + + <div class="row-item"> + <span>{{ $t("renderMode") }}</span> + <n-radio-group + v-model:value="state.cullEnabled" + name="operationType" + class="radio-group" + > + <n-radio :value="true">{{ $t("singleRender") }}</n-radio> + <n-radio :value="false">{{ $t("doubleRender") }}</n-radio> + </n-radio-group> + </div> + + <div class="row-item"> + <span>{{ $t("showShadow") }}</span> + <n-switch + v-model:value="state.shadowMode" + size="small" + style="width: 62%; justify-content: left" + /> + </div> + + <div class="row-item"> + <span>{{ $t("shadowBrightness") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.shadowDarkness" + style="width: 70%" + :step="0.05" + :min="0" + :max="1" + /> + <n-input-number + v-model:value="state.shadowDarkness" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="1" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("objectHiding") }}</span> + <n-select + v-model:value="state.visibility" + style="width: 62%" + :options="state.visibilityMode" + /> + </div> + + <div class="row-item" style="justify-content: left; margin-left: 38%"> + <n-checkbox v-model:checked="state.multiChoose">{{ + $t("multiple") + }}</n-checkbox> + <!-- <n-checkbox v-model:checked="state.selectEnabled">是否可选</n-checkbox> --> + <!-- <n-checkbox v-model:checked="state.cullEnabled">双面渲染</n-checkbox> --> + </div> + + <div class="row-item"> + <span>{{ $t("MinVisibleDistance") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.visibleDistanceMin" + style="width: 70%" + :step="10" + :min="-100" + :max="20000" + /> + <div class="row-slider-num" style="width: 0.5rem"> + <span>{{ state.visibleDistanceMin }}</span + ><span>{{ $t("meter") }}</span> + </div> + </div> + </div> + + <div class="row-item" style="margin-bottom: 0px"> + <span>{{ $t("MaxVisibleDistance") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.visibleDistanceMax" + style="width: 70%" + :step="10" + :min="-100" + :max="20000" + /> + <div class="row-slider-num" style="width: 0.5rem"> + <span>{{ state.visibleDistanceMax }}</span + ><span>{{ $t("meter") }}</span> + </div> + </div> + </div> + </div> +</template> + +<script setup lang="ts"> +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; +import { useLayerStore } from "@/store/layerStore/layer"; + +const layerStore = useLayerStore(); + +type StateType = { + s3mlayers: any; + selectedIndex: number; //默认选择图层index + brightness: number; + contrast: number; + hue: number; + saturation: number; + gamma: number; + shadowMode: number; + shadowDarkness: number; + selectEnabled: boolean; + multiChoose: boolean; + cullEnabled: boolean; + visibility: number; + visibilityMode: any; + visibleDistanceMin: number; //最小可见距离 + visibleDistanceMax: number; //最大可见距离 +}; + +// 初始化变量 +let state = reactive<StateType>({ + s3mlayers: [], //当前存在的可选择s3m图层 + selectedIndex: 0, //默认选择图层index + brightness: 1, + contrast: 1, + hue: 0, + saturation: 1, + gamma: 1, + shadowMode: 0, + shadowDarkness: 0.2, + selectEnabled: true, + multiChoose: false, + cullEnabled: false, + visibility: 2, + visibleDistanceMin: 0, //最小可见距离 + visibleDistanceMax: 12000, //最大可见距离 + visibilityMode: [ + { label: () => $t("disPlayAll"), value: 2 }, + { label: () => $t("disPlaySelected"), value: 0 }, + { label: () => $t("hideSelected"), value: 1 }, + ], +}); +let layers: any; + +function init() { + if (!window.viewer) return; + updateLayers(); + state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); + layers[state.selectedIndex].selectEnabled = true; +} + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => {}); + +// 获取当前图层的属性值 +function getAttributes() { + if ( + !SuperMap3D.defined(layers) || + !SuperMap3D.defined(layers[state.selectedIndex]) + ) + return; + let selectLayer = layers[state.selectedIndex]; + state.brightness = SuperMap3D.defaultValue(selectLayer.brightness, 1); + state.contrast = SuperMap3D.defaultValue(selectLayer.contrast, 1); + state.hue = SuperMap3D.defaultValue(selectLayer.hue, 0); + state.saturation = SuperMap3D.defaultValue(selectLayer.saturation, 1); + state.gamma = SuperMap3D.defaultValue(selectLayer.gamma, 1); + state.shadowMode = SuperMap3D.defaultValue( + selectLayer.shadowMode, + SuperMap3D.ShadowType.NONE + ); + state.shadowDarkness = SuperMap3D.defaultValue( + selectLayer.shadowDarkness, + 0.3 + ); + state.selectEnabled = SuperMap3D.defaultValue( + selectLayer.selectEnabled, + true + ); + state.multiChoose = SuperMap3D.defaultValue(selectLayer.multiChoose, false); + state.cullEnabled = SuperMap3D.defaultValue(selectLayer.cullEnabled, false); + state.visibility = SuperMap3D.defaultValue(selectLayer.visibility, 2); + state.visibleDistanceMin = SuperMap3D.defaultValue( + selectLayer.visibleDistanceMin, + 0 + ); + state.visibleDistanceMax = SuperMap3D.defaultValue( + selectLayer.visibleDistanceMax, + 12000 + ); + if (state.visibleDistanceMax > 20000) { + state.visibleDistanceMax = 20000; + } +} + +// 更新图层 +function updateLayers() { + layers = viewer.scene.layers.layerQueue; + if (!layers || layers.length < 1) { + state.s3mlayers = [{ label: () => $t("noLayer"), value: 0 }]; + return; + } + state.s3mlayers.length = 0; + layers.forEach((layer, index) => { + let name = layer._name; + state.s3mlayers.push({ + label: name, + value: index, + }); + }); + if (state.selectedIndex > layers.length - 1) state.selectedIndex = 0; + layers[state.selectedIndex].selectEnabled = true; +} + +// 监听 +watch( + () => layerStore.layerChangeCount, + () => { + updateLayers(); + } +); + +watch( + () => state.selectedIndex, + () => { + getAttributes(); + } +); +watch( + () => state.brightness, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].brightness = Number(val); + } +); +watch( + () => state.contrast, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].contrast = Number(val); + } +); +watch( + () => state.hue, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].hue = Number(val); + } +); +watch( + () => state.saturation, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].saturation = Number(val); + } +); +watch( + () => state.gamma, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].gamma = Number(val); + } +); +watch( + () => state.shadowMode, + (val) => { + if (layers[state.selectedIndex]) + if (val) { + viewer.shadows = true; + layers[state.selectedIndex].shadowType = SuperMap3D.ShadowType.ALL; // SELECTION + } else { + viewer.shadows = false; + layers[state.selectedIndex].shadowType = SuperMap3D.ShadowType.NONE; + } + } +); +watch( + () => state.shadowDarkness, + (val) => { + viewer.shadowMap.darkness = 1 - Number(val); // 相当于取反了 + // viewer.shadowMap.darkness = Number(val); + } +); +watch( + () => state.multiChoose, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].multiChoose = val; + } +); +watch( + () => state.selectEnabled, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].selectEnabled = val; + } +); +watch( + () => state.cullEnabled, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].cullEnabled = val; + } +); +watch( + () => state.visibleDistanceMin, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].visibleDistanceMin = Number(val); + } +); +watch( + () => state.visibleDistanceMax, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].visibleDistanceMax = Number(val); + } +); +watch( + () => state.visibility, + (val) => { + if (layers[state.selectedIndex]) + switch (val) { + case 2: + layers[state.selectedIndex].setObjsVisible([], false); + break; + case 1: + let chooseIDs = layers[state.selectedIndex].getSelection(); + layers[state.selectedIndex].setObjsVisible(chooseIDs, false); + break; + case 0: + let chooseIDs2 = layers[state.selectedIndex].getSelection(); + layers[state.selectedIndex].setObjsVisible(chooseIDs2, true); + break; + default: + null; + break; + } + } +); +watch( + () => layerStore.s3mLayerSelectIndex, + (val) => { + // reset(); + state.selectedIndex = Number(val); + } +); +</script> + +<style lang="scss" scoped> +.layerSeries-box { + width: 100%; + height: 100%; + box-sizing: border-box; + padding: 0 0.2rem; +} +</style> diff --git a/SuperMap iEarth/src/package/layerSeries/layerOpration/coms/inundation.vue b/SuperMap iEarth/src/package/layerSeries/layer-opration/coms/inundation.vue similarity index 53% rename from SuperMap iEarth/src/package/layerSeries/layerOpration/coms/inundation.vue rename to SuperMap iEarth/src/package/layerSeries/layer-opration/coms/inundation.vue index db816c8d..860bbfb4 100644 --- a/SuperMap iEarth/src/package/layerSeries/layerOpration/coms/inundation.vue +++ b/SuperMap iEarth/src/package/layerSeries/layer-opration/coms/inundation.vue @@ -1,50 +1,83 @@ <template> <!-- 淹没分析 --> <div class="row-item"> - <div>{{$t('global.maximumVisibleElevation')}}</div> - <n-input-number v-model:value="state.maxHeight" style="width: 1.96rem;" :show-button="false" :min="1" :max="10000"> - <template #suffix>{{$t('global.meter')}}</template> + <div>{{ $t("maximumVisibleElevation") }}</div> + <n-input-number + v-model:value="state.maxHeight" + style="width: 1.96rem" + :show-button="false" + :min="1" + :max="10000" + > + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> <div class="row-item"> - <div>{{$t('global.minimumVisibleElevation')}}</div> - <n-input-number v-model:value="state.minHeight" style="width: 1.96rem;" :bordered="false" :min="-20" :max="10000" - :show-button="false"> - <template #suffix>{{$t('global.meter')}}</template> + <div>{{ $t("minimumVisibleElevation") }}</div> + <n-input-number + v-model:value="state.minHeight" + style="width: 1.96rem" + :bordered="false" + :min="-20" + :max="10000" + :show-button="false" + > + <template #suffix>{{ $t("meter") }}</template> </n-input-number> </div> <div class="row-item"> - <span>{{$t('global.inundationSpeed')}}</span> + <span>{{ $t("inundationSpeed") }}</span> <div class="slider-box"> - <n-slider style="width: 70%" v-model:value="state.floodSpeed" :step="1" :min="1" :max="100" /> - <!-- <span class="row-slider-num" >{{ state.floodSpeed }}<span>{{$t('global.meterSecond')}}</span></span> --> - <div class="row-slider-num" style="width: 0.6rem"><span>{{ state.floodSpeed }}</span><span>{{$t('global.meterSecond')}}</span></div> + <n-slider + style="width: 70%" + v-model:value="state.floodSpeed" + :step="1" + :min="1" + :max="100" + /> + <div class="row-slider-num" style="width: 0.6rem"> + <span>{{ state.floodSpeed }}</span + ><span>{{ $t("meterSecond") }}</span> + </div> </div> </div> - <div class="btn-row-item"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="floodBegin" style="margin-right: 0.1rem">{{$t('global.analysis')}}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> + <div class="btn-row-item" style="margin-left: 0.83rem"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="floodBegin" + style="margin-right: 0.1rem" + >{{ $t("analysis") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > </div> </template> <script lang="ts" setup> import { reactive, onBeforeUnmount, watch, onMounted } from "vue"; -import { useLayerStore } from "@/store/layerStore"; -import tool from "@/tools/tool"; +import { useLayerStore } from "@/store/layerStore/layer"; import initHandler from "@/tools/drawHandler"; +import tool from "@/tools/tool"; const layerStore = useLayerStore(); -type stateType = { - maxHeight: number, //最大可见高程 - minHeight: number, //最小可见高程 - currentHeight: number, //当前高程 - floodSpeed: number, //速度 - selectedIndex: number, //默认选择图层index -} +type stateType = { + maxHeight: number; //最大可见高程 + minHeight: number; //最小可见高程 + currentHeight: number; //当前高程 + floodSpeed: number; //速度 + selectedIndex: number; //默认选择图层index +}; // 设置默认值数据 let state = reactive<stateType>({ @@ -55,21 +88,37 @@ let state = reactive<stateType>({ selectedIndex: 0, //默认选择图层index }); -// 初始化数据 +// 初始化变量 const windowGlobal: any = window; +let handlerPolygon, interval, floodPosition, layers; let hypFlood = new SuperMap3D.HypsometricSetting(); let floodColorTable = new SuperMap3D.ColorTable(); -colorTableInit(floodColorTable); -hypFlood.DisplayMode = SuperMap3D.HypsometricSettingEnum.DisplayMode.FACE; -hypFlood._lineColor = new SuperMap3D.Color(1.0, 0.0, 0.0, 1.0); -hypFlood.MinVisibleValue = state.minHeight; -hypFlood.MaxVisibleValue = 0; -hypFlood.ColorTableMinKey = 1; -hypFlood.ColorTableMaxKey = 9000; -hypFlood.Opacity = 0.5; -hypFlood.ColorTable = floodColorTable; -hypFlood.LineInterval = 200.0; -let handlerPolygon, interval, floodPosition, layers; + +function init() { + colorTableInit(floodColorTable); + hypFlood.DisplayMode = SuperMap3D.HypsometricSettingEnum.DisplayMode.FACE; + hypFlood._lineColor = new SuperMap3D.Color(1.0, 0.0, 0.0, 1.0); + hypFlood.MinVisibleValue = state.minHeight; + hypFlood.MaxVisibleValue = 0; + hypFlood.ColorTableMinKey = 1; + hypFlood.ColorTableMaxKey = 9000; + hypFlood.Opacity = 0.5; + hypFlood.ColorTable = floodColorTable; + hypFlood.LineInterval = 200.0; +} + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(); + hypFlood.destroy(); + floodColorTable.destroy(); + hypFlood = undefined; + floodColorTable = undefined; +}); + // 开始淹没分析 function floodBegin() { if (!handlerPolygon) { @@ -87,6 +136,7 @@ function floodBegin() { ); handlerPolygon.activate(); } + // 更新 function floodUpdate(positions: any) { let currentH = Math.floor(state.minHeight); @@ -104,17 +154,13 @@ function floodUpdate(positions: any) { return; } hypFlood.MaxVisibleValue = currentH; - //设置图层分层设色属性 - 所有图层 or 指定图层 - // viewer.scene.layers._layerQueue.forEach((S3Mlayer: any, index: string) => { - // S3Mlayer.hypsometricSetting = { - // hypsometricSetting: hypFlood, - // analysisMode: SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION - // }; - // }) + // 指定图层 + // viewer.scene.layers._layerQueue.forEach - 全部图层 layers[state.selectedIndex].hypsometricSetting = { hypsometricSetting: hypFlood, - analysisMode: SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION + analysisMode: + SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION, }; try { @@ -131,24 +177,21 @@ function floodUpdate(positions: any) { }; } - // 默认设置淹没分析颜色插值 function colorTableInit(colorTable: any) { - // let colors = tool.gradientColors("#95E9F9", "#002794", 20, 0.8); - // colors.forEach((color, index) => { - // // 0-4500米颜色取值 - // let h = 500 + 200 * index; - // colorTable.insert(h, SuperMap3D.Color.fromCssColorString(color)); - // }); - // colorTable.insert(9000, new SuperMap3D.Color(0, 39 / 255, 148 / 255, 1)); - // colorTable.insert( - // 0, - // new SuperMap3D.Color(149 / 255, 232 / 255, 249 / 255, 0.5) - // ); colorTable.insert(71, new SuperMap3D.Color(0, 39 / 255, 148 / 255)); colorTable.insert(0, new SuperMap3D.Color(149 / 255, 232 / 255, 249 / 255)); } +// 设置colorTable +/** + let colors = tool.gradientColors("#95E9F9", "#002794", 20, 0.8); + colors.forEach((color, index) => { + // 0-4500米颜色取值 + let h = 500 + 200 * index; + colorTable.insert(h, SuperMap3D.Color.fromCssColorString(color)); + }); +*/ // 清除 function clear() { @@ -157,28 +200,20 @@ function clear() { clearInterval(interval); floodPosition = null; - // hypFlood = new SuperMap3D.HypsometricSetting(); hypFlood.MaxVisibleValue = -1000; state.currentHeight = 0; - // 删除设置 - 所有图层 or 指定图层 - // viewer.scene.layers._layerQueue.forEach((S3Mlayer: any, index: string) => { - // S3Mlayer.hypsometricSetting = { - // hypsometricSetting : hypFlood, - // analysisMode : SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL - // } - // }) - // 指定图层 - if(layers){ + // 指定图层 + if (layers) { layers[state.selectedIndex].hypsometricSetting = { hypsometricSetting: hypFlood, - analysisMode: SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL - } + analysisMode: + SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL, + }; } } -//监听 - +//监听 watch( () => state.minHeight, (val: any) => { @@ -205,23 +240,9 @@ watch( ); watch( () => layerStore.s3mLayerSelectIndex, - val => { - // reset(); + (val) => { state.selectedIndex = Number(val); + // reset(); } ); - -// 销毁 -onBeforeUnmount(() => { - clear(); - hypFlood.destroy(); - floodColorTable.destroy(); - hypFlood = undefined; - floodColorTable = undefined; -}); </script> - -<style lang="scss" scoped> -</style> - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/layerSeries/layer-opration/coms/layerColor.vue b/SuperMap iEarth/src/package/layerSeries/layer-opration/coms/layerColor.vue new file mode 100644 index 00000000..18ddbfa1 --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/layer-opration/coms/layerColor.vue @@ -0,0 +1,274 @@ +<template> + <div class="row-item"> + <span>{{ $t("brightness") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.brightness" + style="width: 70%" + :step="0.05" + :min="0" + :max="3" + /> + <n-input-number + v-model:value="state.brightness" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="3" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("contrastRatio") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.contrast" + style="width: 70%" + :step="0.05" + :min="0" + :max="3" + /> + <n-input-number + v-model:value="state.contrast" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="3" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("colorTone") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.hue" + style="width: 70%" + :step="0.05" + :min="0" + :max="3" + /> + <n-input-number + v-model:value="state.hue" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="3" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("saturation") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.saturation" + style="width: 70%" + :step="0.05" + :min="0" + :max="3" + /> + <n-input-number + v-model:value="state.saturation" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="3" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("gamma") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.gamma" + style="width: 70%" + :step="0.05" + :min="0" + :max="3" + /> + <n-input-number + v-model:value="state.saturation" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="3" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="btn-row-item" style="margin-left: 0.83rem"> + <n-button @click="reset">{{ $t("reset") }}</n-button> + </div> +</template> + +<script setup lang="ts"> +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; +import { useLayerStore } from "@/store/layerStore/layer"; +const layerStore = useLayerStore(); + +type StateType = { + s3mlayers: any; + selectedIndex: number; //默认选择图层index + brightness: number; + contrast: number; + hue: number; + saturation: number; + gamma: number; +}; + +// 初始化变量 +let state = reactive<StateType>({ + s3mlayers: [], //当前存在的可选择s3m图层 + selectedIndex: 0, //默认选择图层index + brightness: 1, + contrast: 1, + hue: 0, + saturation: 1, + gamma: 1, +}); + +let layers; + +function init() { + if (!window.viewer) return; + updateLayers(); + state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); +} + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + reset(); +}); + +function updateLayers() { + layers = viewer.scene.layers.layerQueue; + if (!layers || layers.length < 1) { + state.s3mlayers = [{ label: () => "暂无图层", value: 0 }]; + return; + } + state.s3mlayers.length = 0; + layers.forEach((layer, index) => { + let name = layer._name; + state.s3mlayers.push({ + label: name, + value: index, + }); + }); + if (state.selectedIndex > layers.length - 1) state.selectedIndex = 0; +} + +function getAttributes() { + if ( + !SuperMap3D.defined(layers) || + !SuperMap3D.defined(layers[state.selectedIndex]) + ) + return; + let selectLayer = layers[state.selectedIndex]; + state.brightness = SuperMap3D.defaultValue(selectLayer.brightness, 1); + state.contrast = SuperMap3D.defaultValue(selectLayer.contrast, 1); + state.hue = SuperMap3D.defaultValue(selectLayer.hue, 0); + state.saturation = SuperMap3D.defaultValue(selectLayer.saturation, 1); + state.gamma = SuperMap3D.defaultValue(selectLayer.gamma, 1); +} + +function reset() { + let selectLayer = layers[state.selectedIndex]; + + selectLayer.brightness = 1; + selectLayer.contrast = 1; + selectLayer.hue = 0; + selectLayer.saturation = 1; + selectLayer.gamma = 1; + + state.brightness = 1; + state.contrast = 1; + state.hue = 0; + state.saturation = 1; + state.gamma = 1; + + selectLayer.refresh(); +} + +// 监听 +watch( + () => layerStore.layerChangeCount, + () => { + updateLayers(); + } +); +watch( + () => state.selectedIndex, + () => { + getAttributes(); + } +); +watch( + () => state.brightness, + (val) => { + if (layers[state.selectedIndex]) { + layers[state.selectedIndex].brightness = Number(val); + } + } +); +watch( + () => state.contrast, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].contrast = Number(val); + } +); +watch( + () => state.hue, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].hue = Number(val); + } +); +watch( + () => state.saturation, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].saturation = Number(val); + } +); +watch( + () => state.gamma, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].gamma = Number(val); + } +); +watch( + () => layerStore.s3mLayerSelectIndex, + (val) => { + reset(); + state.selectedIndex = Number(val); + } +); +</script> diff --git a/SuperMap iEarth/src/package/layerSeries/layer-opration/coms/offset.vue b/SuperMap iEarth/src/package/layerSeries/layer-opration/coms/offset.vue new file mode 100644 index 00000000..696dfd05 --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/layer-opration/coms/offset.vue @@ -0,0 +1,276 @@ +<template> + <div class="row-item"> + <span>{{ $t("chooseLayer") }}</span> + <n-select + style="width: 1.96rem" + v-model:value="state.selectedIndex" + :options="state.s3mlayers" + /> + </div> + + <!-- <div class="row-item"> + <span>{{$t('offsetMode')}}</span> + <n-radio-group v-model:value="state.offsetMode" name="shadowMode" style="width:1.96rem"> + <n-radio :value="0"><n-ellipsis >{{$t('selected')}}</n-ellipsis></n-radio> + <n-radio :value="1"><n-ellipsis >多边形 </n-ellipsis></n-radio> + </n-radio-group> + </div> --> + + <div v-show="state.offsetMode === 0"> + <div class="row-item"> + <span>{{ $t("offsetX") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.offsetX" + style="width: 70%" + :min="-50" + :max="50" + /> + <n-input-number + v-model:value="state.offsetX" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="-50" + :max="50" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("offsetY") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.offsetY" + style="width: 70%" + :min="-50" + :max="50" + /> + <n-input-number + v-model:value="state.offsetY" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="-50" + :max="50" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("offsetZ") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.offsetZ" + style="width: 70%" + :min="-50" + :max="50" + /> + <n-input-number + v-model:value="state.offsetZ" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="-50" + :max="50" + placeholder="" + size="small" + /> + </div> + </div> + </div> + + <div class="btn-row-item" style="margin-left: 0.83rem"> + <n-button @click="reset">{{ $t("reset") }}</n-button> + </div> +</template> + +<script setup lang="ts"> +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; +import { useLayerStore } from "@/store/layerStore/layer"; +import { useMessage } from "naive-ui"; + +const layerStore = useLayerStore(); +const message = useMessage(); + +type StateType = { + s3mlayers: any; //当前存在的可选择s3m图层 + selectedIndex: number; //默认选择图层index + offsetX: number; //沿X轴偏移 + offsetY: number; //沿Y轴偏移 + offsetZ: number; //沿Z轴偏移 + polygonOffsetFactor: number; //偏移因子 + polygonOffsetUnit: number; //偏移单位 + offsetMode: number; //操作类型 +}; + +// 初始化变量 +let state = reactive<StateType>({ + s3mlayers: [], //当前存在的可选择s3m图层 + selectedIndex: 0, //默认选择图层index + offsetX: 0, //沿X轴偏移 + offsetY: 0, //沿Y轴偏移 + offsetZ: 0, //沿Z轴偏移 + polygonOffsetFactor: 0, //偏移因子 + polygonOffsetUnit: 0, //偏移单位 + offsetMode: 0, +}); +let layers; + +function init() { + if (!window.viewer) return; + updateLayers(); + state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); + selectedoffsetChange(true); + layers[state.selectedIndex].selectEnabled = true; +} + +onMounted(() => { + init(); + message.success($t("chooseThenOffset")); +}); + +onBeforeUnmount(() => { + reset(); + layers = null; +}); + +function updateLayers() { + layers = viewer.scene.layers.layerQueue; + if (!layers || layers.length < 1) { + state.s3mlayers = [{ label: () => $t("noLayer"), value: 0 }]; + return; + } + state.s3mlayers.length = 0; + layers.forEach((layer, index) => { + let name = layer._name; + state.s3mlayers.push({ + label: name, + value: index, + }); + }); + if (state.selectedIndex > layers.length - 1) state.selectedIndex = 0; + layers[state.selectedIndex].selectEnabled = true; +} + +// 设置偏移 +function setObjsOffset() { + let ids = layers[state.selectedIndex].getSelection(); + layers[state.selectedIndex].removeAllObjsOffset(); // 移除所有图元的偏移 + if (ids.length > 0) { + layers[state.selectedIndex].setObjsOffset(ids); + } +} + +// 重置偏移 +function reset() { + state.offsetX = 0; + state.offsetY = 0; + state.offsetZ = 0; + layers[state.selectedIndex].selectedTranslate = new SuperMap3D.Cartesian3( + 0, + 0, + 0 + ); + layers[state.selectedIndex].selectEnabled = true; +} + +// 设置选中模型偏移 +function selectedoffsetChange(isSelected: boolean) { + if (!layers[state.selectedIndex]) return; + if (isSelected) { + let xOffset = Number(state.offsetX); + let yOffset = Number(state.offsetY); + let zOffset = Number(state.offsetZ); + layers[state.selectedIndex].selectedTranslate = new SuperMap3D.Cartesian3( + xOffset, + yOffset, + zOffset + ); + viewer.eventManager.addEventListener("CLICK", setObjsOffset, true); + } else { + viewer.eventManager.removeEventListener("CLICK", setObjsOffset); + layers[state.selectedIndex].selectedTranslate = new SuperMap3D.Cartesian3( + 0, + 0, + 0 + ); + layers[state.selectedIndex].removeAllObjsOffset(); + layers[state.selectedIndex].releaseSelection(); // 释放选择集 + } +} + +// 监听 +watch( + () => layerStore.layerChangeCount, + () => { + updateLayers(); + } +); +watch( + () => state.offsetX, + () => { + let xOffset = Number(state.offsetX); + let yOffset = Number(state.offsetY); + let zOffset = Number(state.offsetZ); + layers[state.selectedIndex].selectedTranslate = new SuperMap3D.Cartesian3( + xOffset, + yOffset, + zOffset + ); + } +); +watch( + () => state.offsetY, + () => { + let xOffset = Number(state.offsetX); + let yOffset = Number(state.offsetY); + let zOffset = Number(state.offsetZ); + layers[state.selectedIndex].selectedTranslate = new SuperMap3D.Cartesian3( + xOffset, + yOffset, + zOffset + ); + } +); +watch( + () => state.offsetZ, + () => { + let xOffset = Number(state.offsetX); + let yOffset = Number(state.offsetY); + let zOffset = Number(state.offsetZ); + layers[state.selectedIndex].selectedTranslate = new SuperMap3D.Cartesian3( + xOffset, + yOffset, + zOffset + ); + } +); +watch( + () => state.polygonOffsetFactor, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].setPolygonoffset( + Number(val), + Number(state.polygonOffsetUnit) + ); + } +); +watch( + () => state.polygonOffsetUnit, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].setPolygonoffset( + Number(state.polygonOffsetFactor), + Number(val) + ); + } +); +</script> diff --git a/SuperMap iEarth/src/package/layerSeries/layer-opration/coms/qingXieModel.vue b/SuperMap iEarth/src/package/layerSeries/layer-opration/coms/qingXieModel.vue new file mode 100644 index 00000000..efc57f91 --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/layer-opration/coms/qingXieModel.vue @@ -0,0 +1,194 @@ +<template> + <div class="row-item"> + <span>{{ $t("clipMode") }}</span> + <n-radio-group + v-model:value="state.operationType" + name="operationType" + class="radio-group" + > + <n-radio :value="1">{{ $t("flatten2") }}</n-radio> + <n-radio :value="0">{{ $t("excavate") }}</n-radio> + </n-radio-group> + </div> + + <div class="btn-row-item" v-if="state.isQxModel"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="start" + style="margin-right: 0.1rem" + > + {{ state.actionName }} + </n-button> + <n-button class="btn-secondary" @click="clear">{{ $t("clear") }}</n-button> + </div> + + <div class="btn-row-item" v-else> + <n-tooltip> + <template #trigger> + <n-button + type="info" + disabled + color="#3499E5" + text-color="#fff" + @click="start" + style="margin-right: 0.1rem" + > + {{ state.actionName }} + </n-button> + </template> + {{ $t("qxModelTip") }} + </n-tooltip> + <n-button class="btn-secondary" disabled @click="clear">{{ + $t("clear") + }}</n-button> + </div> +</template> + +<script setup lang="ts"> +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; +import { useLayerStore } from "@/store/layerStore/layer"; +import initHandler from "@/tools/drawHandler"; +import tool from "@/tools/tool"; + +const layerStore = useLayerStore(); + +type StateType = { + s3mlayers: any; //当前存在的可选择s3m图层 + selectedIndex: number; //默认选择图层index + operationType: number; //操作类型 + actionName: string; // 当前操作名称 + isQxModel: boolean; //是否为倾斜模型 +}; + +// 初始化变量 +let state = reactive<StateType>({ + s3mlayers: [], //当前存在的可选择s3m图层 + selectedIndex: 0, //默认选择图层index + operationType: 0, //操作类型 + actionName: "", + isQxModel: false, +}); +let layers, handlerPolygon; + +function init() { + if (!window.viewer) return; + updateLayers(); + state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); + state.actionName = $t("excavate"); + + // 判断当前图层是否为倾斜摄影模型 - 目前以RealityMesh来做判断 + if (layers[state.selectedIndex]._dataType === "RealityMesh") { + state.isQxModel = true; + } else { + state.isQxModel = false; + } +} + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + layers = null; +}); + +function updateLayers() { + layers = viewer.scene.layers.layerQueue; + if (!layers || layers.length < 1) { + state.s3mlayers = [{ label: () => $t("noLayer"), value: 0 }]; + return; + } + state.s3mlayers.length = 0; + layers.forEach((layer, index) => { + let name = layer._name; + state.s3mlayers.push({ + label: name, + value: index, + }); + }); + if (state.selectedIndex > layers.length - 1) state.selectedIndex = 0; +} + +// 倾斜摄影模型开挖压平 +//开挖 +function excavationUpdate(excavation_position) { + layers[state.selectedIndex].addExcavationRegion({ + position: excavation_position, + name: "excavation_" + Math.random(), + }); +} + +//更新地形修改 +function flattenUpdate(positions) { + layers[state.selectedIndex].addFlattenRegion({ + position: positions, + name: "flatten" + Math.random(), + }); +} + +// 开始 +function start() { + if (!handlerPolygon) { + handlerPolygon = initHandler("Polygon"); + } + handlerPolygon.handlerDrawing().then( + (res) => { + let position = tool.CartesiantoDegrees(res.object.positions); + if (state.operationType < 1) { + excavationUpdate(position); + } else { + flattenUpdate(position); + } + }, + (err) => { + console.log(err); + } + ); + handlerPolygon.activate(); +} + +// 清除 +function clear() { + if (handlerPolygon) handlerPolygon.clearHandler(); + if (!layers[state.selectedIndex]) return; + if (state.operationType < 1) { + layers[state.selectedIndex].removeAllExcavationRegion(); + } else { + layers[state.selectedIndex].removeAllFlattenRegion(); + } +} + +// 监听 +watch( + () => layerStore.layerChangeCount, + () => { + updateLayers(); + } +); +watch( + () => state.operationType, + (val) => { + if (val === 0) { + state.actionName = $t("excavate"); + } else { + state.actionName = $t("flatten2"); + } + } +); +watch( + () => layerStore.s3mLayerSelectIndex, + (val) => { + // reset(); + state.selectedIndex = Number(val); + } +); +</script> + +<style lang="scss" scoped> +.row-item .radio-group { + width: 1.5rem; + margin-right: 0.35rem; +} +</style> diff --git a/SuperMap iEarth/src/package/layerSeries/layerOpration/index.ts b/SuperMap iEarth/src/package/layerSeries/layer-opration/index.ts similarity index 100% rename from SuperMap iEarth/src/package/layerSeries/layerOpration/index.ts rename to SuperMap iEarth/src/package/layerSeries/layer-opration/index.ts diff --git a/SuperMap iEarth/src/package/layerSeries/layer-opration/index.vue b/SuperMap iEarth/src/package/layerSeries/layer-opration/index.vue new file mode 100644 index 00000000..f6fa6803 --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/layer-opration/index.vue @@ -0,0 +1,52 @@ +<template> + <div class="layerSeries-box"> + <n-tabs type="line" animated justify-content="left"> + <n-tab-pane name="QingXieModel" :tab="$t('qxModel')" class="use-scroll"> + <QingXieModel></QingXieModel> + </n-tab-pane> + <n-tab-pane name="Inundation" :tab="$t('inundationAnalysis')"> + <Inundation></Inundation> + </n-tab-pane> + <n-tab-pane name="Offset" :tab="$t('offSet')"> + <Offset></Offset> + </n-tab-pane> + <n-tab-pane name="LayerColor" :tab="$t('layerColor')"> + <LayerColor></LayerColor> + </n-tab-pane> + </n-tabs> + </div> +</template> + +<script setup lang="ts"> +import QingXieModel from "./coms/qingXieModel.vue"; +import Inundation from "./coms/inundation.vue"; +import Offset from "./coms/offset.vue"; +import LayerColor from "./coms/layerColor.vue"; +</script> + +<style lang="scss" scoped> +.layerSeries-box { + width: 100%; + height: 100%; + padding: 0 0.12rem; + box-sizing: border-box; +} + +:deep(.n-tabs-tab-wrapper) { + margin-right: 0.16rem; +} + +:deep(.n-tabs-nav) { + padding: 0 0.12rem; +} + +:deep(.n-tab-pane) { + box-sizing: border-box; + padding-left: 0.12rem; + padding-right: 0.12rem; +} + +.use-scroll { + padding-right: 0px; +} +</style> diff --git a/SuperMap iEarth/src/package/layerSeries/layer-query/index.ts b/SuperMap iEarth/src/package/layerSeries/layer-query/index.ts new file mode 100644 index 00000000..69c55753 --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/layer-query/index.ts @@ -0,0 +1,3 @@ +import LayerQuery from './layerQuery.vue'; + +export default LayerQuery; diff --git a/SuperMap iEarth/src/package/layerSeries/layer-query/layerQuery.vue b/SuperMap iEarth/src/package/layerSeries/layer-query/layerQuery.vue new file mode 100644 index 00000000..0a2b7824 --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/layer-query/layerQuery.vue @@ -0,0 +1,326 @@ +<template> + <div class="layerSeries-box"> + <div class="row-item"> + <span>{{ $t("chooseLayer") }}</span> + <n-select + style="width: 1.96rem" + v-model:value="state.selectedIndex" + :options="state.s3mlayers" + /> + </div> + <div class="row-item" style="margin-bottom: 0.1rem"> + <span>{{ $t("dataServerUrl") }}</span> + <n-input + class="add-input-border" + style="width: 1.96rem" + v-model:value="state.dataUrl" + type="text" + :placeholder="$t('inputServerUrl')" + /> + </div> + <div class="row-item" style="margin-bottom: 0.1rem"> + <span>{{ $t("dataSourceName") }}</span> + <n-input + class="add-input-border" + style="width: 1.96rem" + v-model:value="state.dataSourceName" + type="text" + :placeholder="$t('inputSourceName')" + /> + </div> + <div class="btn-row-item" style="margin-left: 1.05rem; margin-top: 0.12rem"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + class="ans-btn" + @click="startQuery" + >{{ $t("query") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> + + <div class="bableShadow" ref="bableQuery" v-show="state.shadowRadioShow"> + <div class="row-item" style="margin-top: 0.12rem"> + <span class="shadow-anaylse-pop-titie" + >{{ state.queryLayerName }} - {{ $t("queryResult") }}</span + > + <span @click="state.shadowRadioShow = false" style="margin-right: 14px" + >X</span + > + </div> + <div class="bable-container"> + <n-scrollbar style="max-height: 3.8rem"> + <div + class="row-item" + style="margin-left: 0.12rem; margin-right: 0.12rem" + v-for="item in state.modelInfo" + > + <span>{{ item.lable }}</span> + <span>{{ item.value }}</span> + </div> + </n-scrollbar> + </div> + </div> + </div> +</template> + +<script setup lang="ts"> +import { ref, reactive, onMounted, onBeforeUnmount, watch } from "vue"; +import { useLayerStore } from "@/store/layerStore/layer"; +import { useMessage } from "naive-ui"; +const message = useMessage(); + +const layerStore = useLayerStore(); + +type StateType = { + s3mlayers: any; //当前存在的可选择s3m图层 + selectedIndex: number; //默认选择图层index + dataUrl: string; + dataSourceName: string; + shadowRadioShow: boolean; + modelInfo: any; + queryLayerName: string; + scenePosition: any; + isSetForLayer: boolean; +}; + +// http://www.supermapol.com/realspace/services/data-cbd/rest/data - 二维数据 +// http://www.supermapol.com/realspace/services/data-BIMbuilding/rest/data - BIMBuilding + +// 初始化变量 +let state = reactive<StateType>({ + s3mlayers: [], //当前存在的可选择s3m图层 + selectedIndex: 0, //默认选择图层index + dataUrl: "", + dataSourceName: "", + shadowRadioShow: false, + modelInfo: {}, + queryLayerName: "", + scenePosition: null, + isSetForLayer: false, +}); +const scene = viewer.scene; +let bableQuery = ref(); +let layers, handler; + +function init() { + if (!window.viewer) return; + updateLayers(); + state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); + layers[state.selectedIndex].selectEnabled = true; + + // 获取图层绑定的数据源信息 + setQueryInfo(); +} + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + layers = null; + clear(); +}); + +function updateLayers() { + layers = viewer.scene.layers.layerQueue; + if (!layers || layers.length < 1) { + state.s3mlayers = [{ label: () => $t("noLayer"), value: 0 }]; + return; + } + state.s3mlayers.length = 0; + layers.forEach((layer, index) => { + let name = layer._name; + state.s3mlayers.push({ + label: name, + value: index, + }); + }); + if (state.selectedIndex > layers.length - 1) state.selectedIndex = 0; + layers[state.selectedIndex].selectEnabled = true; +} + +function startQuery() { + if ( + !state.dataUrl || + state.dataUrl === "" || + !state.dataSourceName || + state.dataSourceName === "" + ) { + message.warning($t("inputUrlName")); + return; + } + + state.shadowRadioShow = false; + + let targetLayer = layers[state.selectedIndex]; // viewer.scene.layers.find('BIMbuilding'); + state.queryLayerName = targetLayer.name; + + targetLayer.setQueryParameter({ + url: state.dataUrl, // 数据服务:http://www.supermapol.com/realspace/services/data-BIMbuilding/rest/data + dataSourceName: state.dataSourceName, // BIMBuilding + isMerge: true, + }); + + // 设置选中颜色 + var color = new SuperMap3D.Color.fromCssColorString("rgba(23,92,239,1)"); + targetLayer.selectedColor = color; + if (!state.isSetForLayer) { + message.success($t("bindInfoOK")); + state.isSetForLayer = true; + } else { + message.success($t("bindUpdate")); + } + + // 点击模型获取相关信息 + viewer.pickEvent.addEventListener(getModelInfo); + + // 每一帧都去计算气泡的正确位置 + scene.postRender.addEventListener(setBablePosition); + + // 获取点击位置笛卡尔坐标 + handler = new SuperMap3D.ScreenSpaceEventHandler(scene.canvas); + handler.setInputAction(function (e: any) { + var position = scene.pickPosition(e.position); + if (!position) { + position = SuperMap3D.Cartesian3.fromDegrees(0, 0, 0); + } + state.scenePosition = position; // 气泡位置 + }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); + + let itemIndex = layerStore.layerQueryOptions.findIndex( + (item) => item.name == state.queryLayerName + ); + if (itemIndex == -1) { + // 保存数据源信息 + let obj = { + name: targetLayer.name, + dataUrl: state.dataUrl, + dataSourceName: state.dataSourceName, + }; + layerStore.layerQueryOptions.push(obj); + } else { + let item = layerStore.layerQueryOptions[itemIndex]; + item.name = state.queryLayerName; + item.dataUrl = state.dataUrl; + item.dataSourceName = state.dataSourceName; + } +} + +// 设置气泡位置 +function setBablePosition() { + if (state.scenePosition) { + let WindowCoordinates = SuperMap3D.SceneTransforms.wgs84ToWindowCoordinates( + viewer.scene, + state.scenePosition + ); + bableQuery.value.style.top = + WindowCoordinates.y - bableQuery.value.offsetHeight - 10 + "px"; + bableQuery.value.style.left = + WindowCoordinates.x - bableQuery.value.offsetWidth / 2 + 140 + "px"; + } +} + +// 点击拾取实体,获取属性信息 +function getModelInfo(feature: any) { + if (window.iEarthConsole) { + console.log("feature:", feature); + } + if (feature) { + state.shadowRadioShow = true; + let list: any = []; + for (let key in feature) { + let value = String(feature[key]); + if (value.indexOf(".") != -1) value = Number(value).toFixed(2); + list.push({ + lable: key, + value: value, + }); + } + state.modelInfo = list; + } else { + state.shadowRadioShow = false; + message.success($t("noData")); + } +} + +// 获取已绑定的图层查询信息 +function setQueryInfo() { + if (layerStore.layerQueryOptions.length > 0) { + let selectLayerName = layers[state.selectedIndex].name; + let targetItem = layerStore.layerQueryOptions.filter( + (item) => item.name == selectLayerName + ); + if (targetItem.length > 0) { + state.dataUrl = targetItem[0].dataUrl; + state.dataSourceName = targetItem[0].dataSourceName; + } + } +} + +// 清除 +function clear(flag = true) { + state.shadowRadioShow = false; + if (handler) { + handler.destroy(); + handler = null; + } + if (flag) { + state.dataUrl = ""; + state.dataSourceName = ""; + } + state.isSetForLayer = false; + scene.postRender.removeEventListener(setBablePosition); + viewer.pickEvent.removeEventListener(getModelInfo); +} + +// 监听 +watch( + () => layerStore.layerChangeCount, + () => { + updateLayers(); + } +); +watch( + () => state.selectedIndex, + () => { + clear(false); + setQueryInfo(); + } +); +</script> + +<style lang="scss" scoped> +.bableShadow { + position: fixed; + top: 2rem; + left: 5rem; + background-color: #383838; + opacity: 0.9; + z-index: 200000; + height: 4.5rem; + width: 3rem; + + .bable-container { + overflow-y: scroll; + @include setsSrollbar(); + } + + .shadow-anaylse-pop-titie { + margin-left: 0.12rem; + font-size: 12px; + line-height: 20px; + } + + span { + font-size: 12px; + } +} +</style> diff --git a/SuperMap iEarth/src/package/layerSeries/layer-style/index.ts b/SuperMap iEarth/src/package/layerSeries/layer-style/index.ts new file mode 100644 index 00000000..2ee076c9 --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/layer-style/index.ts @@ -0,0 +1,3 @@ +import LayerStyle from './layerStyle.vue'; + +export default LayerStyle; diff --git a/SuperMap iEarth/src/package/layerSeries/layer-style/layerStyle.vue b/SuperMap iEarth/src/package/layerSeries/layer-style/layerStyle.vue new file mode 100644 index 00000000..b5ece507 --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/layer-style/layerStyle.vue @@ -0,0 +1,516 @@ +<template> + <div class="layerSeries-box"> + <div class="row-item" v-show="state.isBaiMo"> + <span>{{ $t("fillStyle") }}</span> + <n-select + class="add-input-border" + style="width: 62%" + v-model:value="state.fillStyle" + :options="state.fillStyleMode" + /> + </div> + <div class="row-item" v-show="state.fillStyle != 1"> + <span>{{ $t("foreColor") }}</span> + <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> + <n-color-picker + v-model:value="state.foreColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> + </div> + </div> + + <div class="row-item" v-show="state.isBaiMo && state.fillStyle != 0"> + <span>{{ $t("lineColor") }}</span> + <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> + <n-color-picker + v-model:value="state.lineColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("selectedColor") }}</span> + <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> + <n-color-picker + v-model:value="state.selectedColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("selectColorMode") }}</span> + <n-radio-group + v-model:value="state.selectColorMode" + name="shadowMode" + style="width: 1.96rem" + > + <n-radio :value="0" style="margin-right: 0.2rem" + ><n-ellipsis>{{ $t("colorMix") }}</n-ellipsis></n-radio + > + <n-radio :value="1" + ><n-ellipsis>{{ $t("colorReplace") }} </n-ellipsis></n-radio + > + </n-radio-group> + </div> + + <div class="row-item"> + <span>{{ $t("bottomHeight") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.bottomAltitude" + style="width: 70%" + :step="1" + :min="-100" + :max="100" + /> + <n-input-number + v-model:value="state.bottomAltitude" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="-100" + :max="100" + placeholder="" + size="small" + /> + </div> + </div> + + <!-- <div class="row-item" v-show="state.isCloudPoint"> --> + <div class="row-item"> + <span>LOD</span> + <div class="slider-box"> + <n-slider + v-model:value="state.LODScale" + style="width: 70%" + :step="0.1" + :min="0" + :max="10" + /> + <n-input-number + v-model:value="state.LODScale" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="10" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("layerTransparency") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.layerTrans" + style="width: 70%" + :step="0.05" + :min="0" + :max="1" + /> + <n-input-number + v-model:value="state.layerTrans" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="1" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="btn-row-item" style="margin-left: 1.05rem"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + class="ans-btn" + @click="saveStyle" + >{{ $t("save") }}</n-button + > + <n-button + class="btn-secondary" + @click="reset" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("reset") }}</n-button + > + </div> + </div> +</template> + +<script setup lang="ts"> +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; +import { useLayerStore } from "@/store/layerStore/layer"; +import { useMessage } from "naive-ui"; + +const message = useMessage(); +const layerStore = useLayerStore(); + +type StateType = { + s3mlayers: any; //当前存在的可选择s3m图层 + selectedIndex: number; //默认选择图层index + foreColor: string; //前景色 + lineColor: string; //线颜色 + selectedColor: string; //选中色 + selectColorMode: number; //选中色模式 + bottomAltitude: number; //底部高程 + LODScale: number; //LOD + layerTrans: number; //图层透明度 + fillStyle: number; //填充风格 + visibleDistanceMin: number; //最小可见距离 + visibleDistanceMax: number; //最大可见距离 + fillStyleMode: any; + isCloudPoint: boolean; // 当前图层是否为点云 + isBaiMo: boolean; // 当前图层是否为白膜 +}; + +// 初始化变量 +let state = reactive<StateType>({ + s3mlayers: [], //当前存在的可选择s3m图层 + selectedIndex: 0, //默认选择图层index + foreColor: "rgba(255, 255, 255, 1)", //前景色 + lineColor: "rgba(56, 56, 56, 1)", //线颜色 + selectedColor: "rgba(166,252,252,1)", //选中色 + selectColorMode: 0, //选中色模式 + bottomAltitude: 0, //底部高程 + LODScale: 1, //LOD + layerTrans: 1, //图层透明度 + fillStyle: 2, //填充风格 + visibleDistanceMin: 0, //最小可见距离 + visibleDistanceMax: 12000, //最大可见距离 + fillStyleMode: [ + { label: () => $t("fillMode"), value: 0 }, + { label: () => $t("wireframe"), value: 1 }, + { label: () => $t("fillBothMode"), value: 2 }, + ], + isCloudPoint: false, + isBaiMo: false, +}); + +let layers; + +function init() { + if (!window.viewer) return; + updateLayers(); + state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); + + if (layers[state.selectedIndex]) { + layers[state.selectedIndex].selectedColor = + SuperMap3D.Color.fromCssColorString(state.selectedColor); + } + + // _fileType:8 => 点云 + if (layers[state.selectedIndex]._fileType === 8) { + state.isCloudPoint = true; + } + + // 白膜图层 + if ( + layers[state.selectedIndex]._name == "重庆白模" || + layers[state.selectedIndex]._name == "横滨白模" + ) { + state.isBaiMo = true; + } + + let keys = Object.keys(layerStore.layerStyleOptions); + if (keys.length > 0) { + let s3mLayerName = layers[state.selectedIndex]._name; + let option = layerStore.particleOptions[s3mLayerName]; + if (option) switchCase(option); + } +} + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => {}); + +// 更新图层 +function updateLayers() { + layers = viewer.scene.layers.layerQueue; + if (!layers || layers.length < 1) { + state.s3mlayers = [{ label: () => $t("noLayer"), value: 0 }]; + return; + } + state.s3mlayers.length = 0; + layers.forEach((layer, index) => { + let name = layer._name; + state.s3mlayers.push({ + label: name, + value: index, + }); + }); + if (state.selectedIndex > layers.length - 1) state.selectedIndex = 0; +} + +// 获取属性 +function getAttributes() { + if ( + !SuperMap3D.defined(layers) || + !SuperMap3D.defined(layers[state.selectedIndex]) + ) + return; + let selectLayer = layers[state.selectedIndex]; + state.foreColor = SuperMap3D.defaultValue( + selectLayer.style3D.fillForeColor.toCssColorString(), + "rgba(255, 255, 255, 1)" + ); + state.lineColor = SuperMap3D.defaultValue( + selectLayer.style3D.lineColor.toCssColorString(), + "rgba(56, 56, 56, 1)" + ); + // state.selectedColor = SuperMap3D.defaultValue( // selectedColor不从图层中获取,而是直接设置 + // selectLayer.selectedColor.toCssColorString(), + // "rgb(166,252,252)" + // ); + state.selectColorMode = SuperMap3D.defaultValue( + selectLayer.selectColorType, + 0 + ); + state.bottomAltitude = SuperMap3D.defaultValue( + selectLayer.style3D.bottomAltitude, + 0 + ); + state.LODScale = SuperMap3D.defaultValue(selectLayer.lodRangeScale, 1); + state.layerTrans = SuperMap3D.defaultValue( + selectLayer.style3D.fillForeColor.alpha, + 1 + ); + state.fillStyle = SuperMap3D.defaultValue( + selectLayer.style3D.fillStyle, + SuperMap3D.FillStyle.Fill + ); + state.visibleDistanceMin = SuperMap3D.defaultValue( + selectLayer.visibleDistanceMin, + 0 + ); + state.visibleDistanceMax = SuperMap3D.defaultValue( + selectLayer.visibleDistanceMax, + 12000 + ); +} + +// 设置样式 +function saveStyle() { + let layer = layers[state.selectedIndex]; + let key = layer._name; + let layerStyleItem: any = {}; + + layerStyleItem["foreColor"] = state.foreColor; + layerStyleItem["lineColor"] = state.lineColor; + layerStyleItem["selectedColor"] = state.selectedColor; + layerStyleItem["selectColorMode"] = state.selectColorMode; + layerStyleItem["bottomAltitude"] = state.bottomAltitude; + layerStyleItem["layerTrans"] = state.layerTrans; + layerStyleItem["LODScale"] = state.LODScale; + layerStyleItem["fillStyle"] = state.fillStyle; + + layerStore.layerStyleOptions[key] = layerStyleItem; + + message.success(`${key}${$t("attrSaveOk")}`); +} + +// 设置参数 +function switchCase(option: any) { + for (let key in option) { + switch (key) { + case "foreColor": + state.foreColor = option[key]; + break; + case "lineColor": + state.lineColor = option[key]; + break; + case "selectedColor": + state.selectedColor = option[key]; + break; + case "selectColorMode": + state.selectColorMode = Number(option[key]); + break; + case "bottomAltitude": + state.bottomAltitude = Number(option[key]); + break; + case "fillStyle": + state.fillStyle = Number(option[key]); + break; + case "LODScale": + state.LODScale = Number(option[key]); + break; + case "layerTrans": + state.layerTrans = Number(option[key]); + break; + default: + break; + } + } +} + +// 重置 +function reset() { + state.foreColor = "rgba(255, 255, 255, 1)"; //前景色 + state.lineColor = "rgba(56, 56, 56, 1)"; //线颜色 + state.selectedColor = "rgba(166,252,252,1)"; //选中色 + state.selectColorMode = 0; //选中色模式 + state.bottomAltitude = 0; //底部高程 + state.layerTrans = 1; //图层透明度 + state.fillStyle = 2; //填充模式 + if (state.isCloudPoint) { + state.LODScale = 1; //LOD + } +} + +// 监听 +watch( + () => layerStore.layerChangeCount, + () => { + updateLayers(); + } +); +watch( + () => state.selectedIndex, + () => { + getAttributes(); + + if (layers[state.selectedIndex].name === "POINTCLOUD23") { + state.isCloudPoint = true; + } + } +); +watch( + () => state.foreColor, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].style3D.fillForeColor = + SuperMap3D.Color.fromCssColorString(val); + } +); +watch( + () => state.lineColor, + (val) => { + if (layers[state.selectedIndex]) { + let layer = layers[state.selectedIndex]; + layer.style3D.lineColor = SuperMap3D.Color.fromCssColorString(val); + } + } +); +watch( + () => state.selectedColor, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].selectedColor = + SuperMap3D.Color.fromCssColorString(val); + } +); +watch( + () => state.selectColorMode, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].selectColorType = val; + } +); +watch( + () => state.bottomAltitude, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].style3D.bottomAltitude = Number(val); + layers[state.selectedIndex].refresh(); + } +); +watch( + () => state.fillStyle, + (val) => { + if (layers[state.selectedIndex]) + switch (val) { + case 0: + layers[state.selectedIndex].style3D.fillStyle = + SuperMap3D.FillStyle.Fill; + break; + case 1: + layers[state.selectedIndex].style3D.fillStyle = + SuperMap3D.FillStyle.WireFrame; + layers[state.selectedIndex].style3D.lineColor = + SuperMap3D.Color.fromCssColorString(state.lineColor); + break; + case 2: + layers[state.selectedIndex].style3D.fillStyle = + SuperMap3D.FillStyle.Fill_And_WireFrame; + layers[state.selectedIndex].style3D.lineColor = + SuperMap3D.Color.fromCssColorString(state.lineColor); + break; + default: + break; + } + layers[state.selectedIndex].refresh(); + } +); +watch( + () => state.LODScale, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].lodRangeScale = Number(val); + } +); +watch( + () => state.layerTrans, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].style3D.fillForeColor.alpha = Number(val); + } +); +watch( + () => state.visibleDistanceMin, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].visibleDistanceMin = Number(val); + } +); +watch( + () => state.visibleDistanceMax, + (val) => { + if (layers[state.selectedIndex]) + layers[state.selectedIndex].visibleDistanceMax = Number(val); + } +); +watch( + () => layerStore.s3mLayerSelectIndex, + (val) => { + reset(); + state.selectedIndex = Number(val); + } +); +</script> + +<style lang="scss" scoped> +.n-radio-group { + display: flex; +} + +.n-radio .n-radio__label { + padding-right: 0.1rem; +} +</style> diff --git a/SuperMap iEarth/src/package/layerSeries/layerAttribute/index.ts b/SuperMap iEarth/src/package/layerSeries/layerAttribute/index.ts deleted file mode 100644 index 6dce78c3..00000000 --- a/SuperMap iEarth/src/package/layerSeries/layerAttribute/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import LayerAttribute from './index.vue'; - -export default LayerAttribute; diff --git a/SuperMap iEarth/src/package/layerSeries/layerAttribute/index.vue b/SuperMap iEarth/src/package/layerSeries/layerAttribute/index.vue deleted file mode 100644 index b60e4827..00000000 --- a/SuperMap iEarth/src/package/layerSeries/layerAttribute/index.vue +++ /dev/null @@ -1,408 +0,0 @@ -<template> - <div class="layerSeries-box"> - <div class="row-item"> - <span>{{$t('global.chooseLayer')}}</span> - <n-select - class="add-input-border" - style="width: 62%" - v-model:value="state.selectedIndex" - :options="state.s3mlayers" - /> - </div> - - <div class="row-item"> - <span>{{$t('global.renderMode')}}</span> - <n-radio-group v-model:value="state.cullEnabled" name="operationType" style="width: 62%"> - <n-space> - <n-radio :value="true">{{$t('global.singleRender')}}</n-radio> - <n-radio :value="false">{{$t('global.doubleRender')}}</n-radio> - </n-space> - </n-radio-group> - </div> - - <div class="row-item"> - <span>{{$t('global.showShadow')}}</span> - <n-switch v-model:value="state.shadowMode" size="small" style="width: 62%;justify-content: left"/> - </div> - <div class="row-item"> - <span>{{$t('global.shadowBrightness')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.shadowDarkness" - style="width: 70%" - :step="0.05" :min="0" :max="1" - /> - <div class="row-slider-num">{{ state.shadowDarkness }}</div> - </div> - </div> - <div class="row-item"> - <span>{{$t('global.objectHiding')}}</span> - <n-select class="add-input-border" v-model:value="state.visibility" style="width: 62%" :options="state.visibilityMode" /> - </div> - <div class="row-item" style="justify-content: left; margin-left: 38%"> - <!-- <n-checkbox v-model:checked="state.selectEnabled">是否可选</n-checkbox> --> - <n-checkbox v-model:checked="state.multiChoose" >{{$t('global.multiple')}}</n-checkbox> - <!-- <n-checkbox v-model:checked="state.cullEnabled">双面渲染</n-checkbox> --> - </div> - - <div class="row-item"> - <span>{{$t('global.MinVisibleDistance')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.visibleDistanceMin" - style="width: 70%" - :step="10" :min="-100" :max="20000" - /> - <div class="row-slider-num" style="width: 0.5rem"><span>{{ state.visibleDistanceMin }}</span><span>{{$t('global.meter')}}</span></div> - </div> - </div> - - <div class="row-item" style="margin-bottom: 0px"> - <span>{{$t('global.MaxVisibleDistance')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.visibleDistanceMax" - style="width: 70%" - :step="10" :min="-100" :max="20000" - /> - <div class="row-slider-num" style="width: 0.5rem"><span>{{ state.visibleDistanceMax }}</span><span>{{$t('global.meter')}}</span></div> - </div> - </div> - - <!-- <div class="row-item"> - <span>亮度</span> - <div class="slider-box"> - <n-slider - v-model:value="state.brightness" - style="width: 70%" - :step="0.05" :min="0" :max="3" - /> - <div class="row-slider-num">{{ state.brightness }}</div> - </div> - </div> - - <div class="row-item"> - <span>对比度</span> - <div class="slider-box"> - <n-slider - v-model:value="state.contrast" - style="width: 70%" - :step="0.05" :min="0" :max="3" - /> - <div class="row-slider-num">{{ state.contrast }}</div> - </div> - </div> - - <div class="row-item"> - <span>色调</span> - <div class="slider-box"> - <n-slider - v-model:value="state.hue" - style="width: 70%" - :step="0.05" :min="0" :max="3" - /> - <div class="row-slider-num">{{ state.hue }}</div> - </div> - </div> - - <div class="row-item"> - <span>饱和度</span> - <div class="slider-box"> - <n-slider - v-model:value="state.saturation" - style="width: 70%" - :step="0.05" :min="0" :max="3" - /> - <div class="row-slider-num">{{ state.saturation }}</div> - </div> - </div> - - <div class="row-item"> - <span>伽马</span> - <div class="slider-box"> - <n-slider - v-model:value="state.gamma" - style="width: 70%" - :step="0.05" :min="0" :max="3" - /> - <div class="row-slider-num">{{ state.gamma }}</div> - </div> - </div> --> - - </div> -</template> - -<script setup lang="ts"> -import { reactive, onBeforeUnmount, watch } from "vue"; -import { useLayerStore } from "@/store/layerStore"; -const layerStore = useLayerStore(); - -type StateType = { - s3mlayers:any, - selectedIndex: number, //默认选择图层index - brightness: number, - contrast: number, - hue: number, - saturation: number, - gamma: number, - shadowMode: number, - shadowDarkness: number, - selectEnabled: boolean, - multiChoose: boolean, - cullEnabled: boolean, - visibility: number, - visibilityMode:any, - visibleDistanceMin: number, //最小可见距离 - visibleDistanceMax: number, //最大可见距离 -} - -// 初始化数据 -let state = reactive<StateType>({ - s3mlayers: [], //当前存在的可选择s3m图层 - selectedIndex: 0, //默认选择图层index - brightness: 1, - contrast: 1, - hue: 0, - saturation: 1, - gamma: 1, - shadowMode: 0, - shadowDarkness: 0.3, - selectEnabled: true, - multiChoose: false, - cullEnabled: false, - visibility: 2, - visibleDistanceMin: 0, //最小可见距离 - visibleDistanceMax: 12000, //最大可见距离 - visibilityMode: [ - { label: () => GlobalLang.disPlayAll, value: 2 }, - { label: () => GlobalLang.disPlaySelected, value: 0 }, - { label: () => GlobalLang.hideSelected, value: 1 } - ] -}); -let layers; - - -function updateLayers() { - layers = viewer.scene.layers.layerQueue; - if (!layers || layers.length < 1) { - state.s3mlayers = [{ label: () => GlobalLang.noLayer, value: 0 }]; - return; - } - state.s3mlayers.length = 0; - layers.forEach((layer, index) => { - let name = layer._name; - state.s3mlayers.push({ - label: name, - value: index - }); - }); - if (state.selectedIndex > layers.length - 1) state.selectedIndex = 0; - layers[state.selectedIndex].selectEnabled = true; -} - -function init() { - if (!window.viewer) return; - updateLayers(); - state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); - layers[state.selectedIndex].selectEnabled = true; -} -init(); - -function getAttributes() { - if (!SuperMap3D.defined(layers) || !SuperMap3D.defined(layers[state.selectedIndex])) - return; - let selectLayer = layers[state.selectedIndex]; - state.brightness = SuperMap3D.defaultValue(selectLayer.brightness, 1); - state.contrast = SuperMap3D.defaultValue(selectLayer.contrast, 1); - state.hue = SuperMap3D.defaultValue(selectLayer.hue, 0); - state.saturation = SuperMap3D.defaultValue(selectLayer.saturation, 1); - state.gamma = SuperMap3D.defaultValue(selectLayer.gamma, 1); - state.shadowMode = SuperMap3D.defaultValue( - selectLayer.shadowMode, - SuperMap3D.ShadowType.NONE - ); - state.shadowDarkness = SuperMap3D.defaultValue(selectLayer.shadowDarkness, 0.3); - state.selectEnabled = SuperMap3D.defaultValue(selectLayer.selectEnabled, true); - state.multiChoose = SuperMap3D.defaultValue(selectLayer.multiChoose, false); - state.cullEnabled = SuperMap3D.defaultValue(selectLayer.cullEnabled, false); - state.visibility = SuperMap3D.defaultValue(selectLayer.visibility, 2); - state.visibleDistanceMin = SuperMap3D.defaultValue( - selectLayer.visibleDistanceMin, - 0 - ); - state.visibleDistanceMax = SuperMap3D.defaultValue( - selectLayer.visibleDistanceMax, - 12000 - ); -} - -// 监听 -watch( - () => layerStore.layerChangeCount, - () => { - updateLayers(); - }); - -watch( - () => state.selectedIndex, - val => { - getAttributes(); - } -); - -watch( - () => state.brightness, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].brightness = Number(val); - } -); -watch( - () => state.contrast, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].contrast = Number(val); - } -); -watch( - () => state.hue, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].hue = Number(val); - } -); -watch( - () => state.saturation, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].saturation = Number(val); - } -); -watch( - () => state.gamma, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].gamma = Number(val); - } -); -watch( - () => state.shadowMode, - val => { - if (layers[state.selectedIndex]) - // switch (val) { - // case 0: - // viewer.shadows = false; - // layers[state.selectedIndex].shadowType = SuperMap3D.ShadowType.NONE; - // break; - // case 1: - // viewer.shadows = true; - // layers[state.selectedIndex].shadowType = SuperMap3D.ShadowType.SELECTION; - // break; - // case 2: - // viewer.shadows = true; - // layers[state.selectedIndex].shadowType = SuperMap3D.ShadowType.ALL; - // break; - // default: - // null; - // break; - // } - if(val){ - viewer.shadows = true; - layers[state.selectedIndex].shadowType = SuperMap3D.ShadowType.ALL; - }else{ - viewer.shadows = false; - layers[state.selectedIndex].shadowType = SuperMap3D.ShadowType.NONE; - } - } -); -watch( - () => state.shadowDarkness, - val => { - viewer.shadowMap.darkness = Number(val); - } -); -watch( - () => state.multiChoose, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].multiChoose = val; - } -); -watch( - () => state.selectEnabled, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].selectEnabled = val; - } -); - -watch( - () => state.cullEnabled, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].cullEnabled = val; - } -); -watch( - () => state.visibleDistanceMin, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].visibleDistanceMin = Number(val); - } - ); - - watch( - () => state.visibleDistanceMax, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].visibleDistanceMax = Number(val); - } - ); -watch( - () => state.visibility, - val => { - if (layers[state.selectedIndex]) - switch (val) { - case 2: - layers[state.selectedIndex].setObjsVisible([], false); - break; - case 1: - let chooseIDs = layers[state.selectedIndex].getSelection(); - layers[state.selectedIndex].setObjsVisible(chooseIDs, false); - break; - case 0: - let chooseIDs2 = layers[state.selectedIndex].getSelection(); - layers[state.selectedIndex].setObjsVisible(chooseIDs2, true); - break; - default: - null; - break; - } - } -); - -watch( - () => layerStore.s3mLayerSelectIndex, - val => { - // reset(); - state.selectedIndex = Number(val); - } -); - -onBeforeUnmount(() => {}); -</script> - -<style lang="scss" scoped> -.layerSeries-box { - width: 100%; - height: 100%; - padding: 0 0.12rem; - box-sizing: border-box; - -} -</style> - - - - - diff --git a/SuperMap iEarth/src/package/layerSeries/layerOpration/coms/layerColor.vue b/SuperMap iEarth/src/package/layerSeries/layerOpration/coms/layerColor.vue deleted file mode 100644 index 7353b294..00000000 --- a/SuperMap iEarth/src/package/layerSeries/layerOpration/coms/layerColor.vue +++ /dev/null @@ -1,219 +0,0 @@ -<template> - <div class="row-item"> - <span>{{$t('global.brightness')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.brightness" - style="width: 70%" - :step="0.05" :min="0" :max="3" - /> - <div class="row-slider-num">{{ state.brightness }}</div> - </div> - </div> - - <div class="row-item"> - <span>{{$t('global.contrastRatio')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.contrast" - style="width: 70%" - :step="0.05" :min="0" :max="3" - /> - <div class="row-slider-num">{{ state.contrast }}</div> - </div> - </div> - - <div class="row-item"> - <span>{{$t('global.colorTone')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.hue" - style="width: 70%" - :step="0.05" :min="0" :max="3" - /> - <div class="row-slider-num">{{ state.hue }}</div> - </div> - </div> - - <div class="row-item"> - <span>{{$t('global.saturation')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.saturation" - style="width: 70%" - :step="0.05" :min="0" :max="3" - /> - <div class="row-slider-num">{{ state.saturation }}</div> - </div> - </div> - - <div class="row-item"> - <span>{{$t('global.gamma')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.gamma" - style="width: 70%" - :step="0.05" :min="0" :max="3" - /> - <div class="row-slider-num">{{ state.gamma }}</div> - </div> - </div> - - <!-- <div class="btn-row-item"> - <n-button @click="reset">{{$t('global.reset')}}</n-button> - </div> --> -</template> - - - <script setup lang="ts"> - import { reactive, onBeforeUnmount, watch } from "vue"; - import { useLayerStore } from "@/store/layerStore"; - const layerStore = useLayerStore(); - - type StateType = { - s3mlayers:any, - selectedIndex: number, //默认选择图层index - brightness: number, - contrast: number, - hue: number, - saturation: number, - gamma: number, - } - - // 初始化数据 - let state = reactive<StateType>({ - s3mlayers: [], //当前存在的可选择s3m图层 - selectedIndex: 0, //默认选择图层index - brightness: 1, - contrast: 1, - hue: 0, - saturation: 1, - gamma: 1, - }); - let layers; - - - function updateLayers() { - layers = viewer.scene.layers.layerQueue; - if (!layers || layers.length < 1) { - state.s3mlayers = [{ label: () => GlobalLang.noLayer, value: 0 }]; - return; - } - state.s3mlayers.length = 0; - layers.forEach((layer, index) => { - let name = layer._name; - state.s3mlayers.push({ - label: name, - value: index - }); - }); - if (state.selectedIndex > layers.length - 1) state.selectedIndex = 0; - } - - function init() { - if (!window.viewer) return; - updateLayers(); - state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); - } - init(); - - - function getAttributes() { - if (!SuperMap3D.defined(layers) || !SuperMap3D.defined(layers[state.selectedIndex])) - return; - let selectLayer = layers[state.selectedIndex]; - state.brightness = SuperMap3D.defaultValue(selectLayer.brightness, 1); - state.contrast = SuperMap3D.defaultValue(selectLayer.contrast, 1); - state.hue = SuperMap3D.defaultValue(selectLayer.hue, 0); - state.saturation = SuperMap3D.defaultValue(selectLayer.saturation, 1); - state.gamma = SuperMap3D.defaultValue(selectLayer.gamma, 1); - } - - function reset(){ - // let selectLayer = layers[state.selectedIndex]; - viewer.scene.colorCorrection.brightness = 1; - viewer.scene.colorCorrection.contrast = 1; - viewer.scene.colorCorrection.hue = 0; - viewer.scene.colorCorrection.saturation = 1; - viewer.scene.colorCorrection.gamma = 1; - - state.brightness = 1; - state.contrast = 1; - state.hue = 0; - state.saturation = 1; - state.gamma = 1; - - // viewer.scene.colorCorrection.show = false; - }; - - - // 监听 - watch( - () => layerStore.layerChangeCount, - () => { - updateLayers(); - }); - - watch( - () => state.selectedIndex, - val => { - getAttributes(); - } - ); - - watch( - () => state.brightness, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].brightness = Number(val); - } - ); - watch( - () => state.contrast, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].contrast = Number(val); - } - ); - watch( - () => state.hue, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].hue = Number(val); - } - ); - watch( - () => state.saturation, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].saturation = Number(val); - } - ); - watch( - () => state.gamma, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].gamma = Number(val); - } - ); - - watch( - () => layerStore.s3mLayerSelectIndex, - val => { - // reset(); - state.selectedIndex = Number(val); - } - ); - - onBeforeUnmount(() => {}); - </script> - - <style lang="scss" scoped> - </style> - - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/layerSeries/layerOpration/coms/offset.vue b/SuperMap iEarth/src/package/layerSeries/layerOpration/coms/offset.vue deleted file mode 100644 index 9431911d..00000000 --- a/SuperMap iEarth/src/package/layerSeries/layerOpration/coms/offset.vue +++ /dev/null @@ -1,297 +0,0 @@ -<template> - <div class="row-item"> - <span>{{$t('global.chooseLayer')}}</span> - <n-select - class="add-input-border" - style="width: 1.96rem" - v-model:value="state.selectedIndex" - :options="state.s3mlayers" - /> - </div> - - <div class="row-item"> - <span>{{$t('global.offsetMode')}}</span> - <n-radio-group v-model:value="state.offsetMode" name="shadowMode" style="width:1.96rem"> - <n-radio :value="0"><n-ellipsis >{{$t('global.selected')}}</n-ellipsis></n-radio> - <!-- <n-radio :value="1"><n-ellipsis >多边形 </n-ellipsis></n-radio> --> - </n-radio-group> - </div> - - <div v-show="state.offsetMode === 0"> - <div class="row-item" > - <span>{{$t('global.offsetX')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.offsetX" - style="width: 70%" - :min="-50" :max="50" - /> - <div class="row-slider-num">{{ state.offsetX }}</div> - </div> - </div> - - <div class="row-item" > - <span>{{$t('global.offsetY')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.offsetY" - style="width: 70%" - :min="-50" :max="50" - /> - <div class="row-slider-num">{{ state.offsetY }}</div> - </div> - </div> - - <div class="row-item" > - <span>{{$t('global.offsetZ')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.offsetZ" - style="width: 70%" - :min="-50" :max="50" - /> - <div class="row-slider-num">{{ state.offsetZ }}</div> - </div> - </div> - - </div> - <!-- <div v-show="state.offsetMode === 1"> - <div class="row-item" > - <span>偏移因子</span> - <div class="slider-box"> - <n-slider - v-model:value="state.polygonOffsetFactor" - style="width: 70%" - :min="-20" :max="20" - /> - <div class="row-slider-num">{{ state.polygonOffsetFactor }}</div> - </div> - </div> - <div class="row-item" > - <span>偏移量</span> - <div class="slider-box"> - <n-slider - v-model:value="state.polygonOffsetUnit" - style="width: 70%" - :min="0" :max="20" - /> - <div class="row-slider-num">{{ state.polygonOffsetUnit }}</div> - </div> - </div> - - </div> --> - <div class="btn-row-item"> - <n-button @click="reset">{{$t('global.reset')}}</n-button> - </div> -</template> - - <script setup lang="ts"> - import { reactive, onBeforeUnmount, watch } from "vue"; - import { useLayerStore } from "@/store/layerStore"; - - const layerStore = useLayerStore(); - - type StateType = { - s3mlayers: any, //当前存在的可选择s3m图层 - selectedIndex: number, //默认选择图层index - offsetX: number, //沿X轴偏移 - offsetY: number, //沿Y轴偏移 - offsetZ: number, //沿Z轴偏移 - polygonOffsetFactor: number, //偏移因子 - polygonOffsetUnit: number, //偏移单位 - offsetMode: number //操作类型 - } - - // 初始化数据 - let state = reactive<StateType>({ - s3mlayers: [], //当前存在的可选择s3m图层 - selectedIndex: 0, //默认选择图层index - offsetX: 0, //沿X轴偏移 - offsetY: 0, //沿Y轴偏移 - offsetZ: 0, //沿Z轴偏移 - polygonOffsetFactor: 0, //偏移因子 - polygonOffsetUnit: 0, //偏移单位 - offsetMode:0, - }); - let layers; - - function updateLayers() { - layers = viewer.scene.layers.layerQueue; - if (!layers || layers.length < 1) { - state.s3mlayers = [{ label: () => GlobalLang.noLayer, value: 0 }]; - return; - } - state.s3mlayers.length = 0; - layers.forEach((layer, index) => { - let name = layer._name; - state.s3mlayers.push({ - label: name, - value: index - }); - }); - if (state.selectedIndex > layers.length - 1) state.selectedIndex = 0; - layers[state.selectedIndex].selectEnabled = true; - } - - function init() { - if (!window.viewer) return; - updateLayers(); - state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); - selectedoffsetChange(true); - layers[state.selectedIndex].selectEnabled = true; - } - init(); - - // 设置偏移 - function setObjsOffset() { - let ids = layers[state.selectedIndex].getSelection(); - layers[state.selectedIndex].removeAllObjsOffset(); // 移除所有图元的偏移 - if (ids.length > 0) { - layers[state.selectedIndex].setObjsOffset(ids); - } - } - - // 重置偏移 - function reset(){ - state.offsetX = 0; - state.offsetY = 0; - state.offsetZ = 0; - layers[state.selectedIndex].selectedTranslate = new SuperMap3D.Cartesian3( - 0, - 0, - 0 - ); - layers[state.selectedIndex].selectEnabled = true; - } - - function selectedoffsetChange(isSelected:boolean){ - if (!layers[state.selectedIndex]) return; - if (isSelected) { - let xOffset = Number(state.offsetX); - let yOffset = Number(state.offsetY); - let zOffset = Number(state.offsetZ); - layers[state.selectedIndex].selectedTranslate = new SuperMap3D.Cartesian3( - xOffset, - yOffset, - zOffset - ); - viewer.eventManager.addEventListener("CLICK", setObjsOffset, true); - } else { - viewer.eventManager.removeEventListener("CLICK", setObjsOffset); - layers[state.selectedIndex].selectedTranslate = new SuperMap3D.Cartesian3( - 0, - 0, - 0 - ); - layers[state.selectedIndex].removeAllObjsOffset(); - layers[state.selectedIndex].releaseSelection(); // 释放选择集 - } - } - - function polygonOffsetChange(isPolygon:boolean){ - if (!layers[state.selectedIndex]) return; - if (isPolygon) { - layers[state.selectedIndex].setPolygonoffset( - Number(state.polygonOffsetFactor), - Number(isPolygon) - ); - } else { - layers[state.selectedIndex].setPolygonoffset(0, 0); - } - } - - - // 监听 - watch( - () => layerStore.layerChangeCount, - () => { - updateLayers(); - }); - - watch( - () => state.offsetX, - val => { - let xOffset = Number(state.offsetX); - let yOffset = Number(state.offsetY); - let zOffset = Number(state.offsetZ); - layers[state.selectedIndex].selectedTranslate = new SuperMap3D.Cartesian3( - xOffset, - yOffset, - zOffset - ); - } - ); - watch( - () => state.offsetY, - val => { - let xOffset = Number(state.offsetX); - let yOffset = Number(state.offsetY); - let zOffset = Number(state.offsetZ); - layers[state.selectedIndex].selectedTranslate = new SuperMap3D.Cartesian3( - xOffset, - yOffset, - zOffset - ); - } - ); - watch( - () => state.offsetZ, - val => { - let xOffset = Number(state.offsetX); - let yOffset = Number(state.offsetY); - let zOffset = Number(state.offsetZ); - layers[state.selectedIndex].selectedTranslate = new SuperMap3D.Cartesian3( - xOffset, - yOffset, - zOffset - ); - } - ); - - watch( - () => state.polygonOffsetFactor, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].setPolygonoffset( - Number(val), - Number(state.polygonOffsetUnit) - ); - } - ); - watch( - () => state.polygonOffsetUnit, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].setPolygonoffset( - Number(state.polygonOffsetFactor), - Number(val) - ); - } - ); - // watch( - // () => state.offsetMode, - // val => { - // if(val === 0){ - // selectedoffsetChange(true); - // polygonOffsetChange(false); - // }else{ - // polygonOffsetChange(true); - // selectedoffsetChange(false); - // } - // } - // ); - - onBeforeUnmount(() => { - layers = null; - }); - </script> - - <style lang="scss" scoped> - </style> - - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/layerSeries/layerOpration/coms/qingXieModel.vue b/SuperMap iEarth/src/package/layerSeries/layerOpration/coms/qingXieModel.vue deleted file mode 100644 index 556b15d0..00000000 --- a/SuperMap iEarth/src/package/layerSeries/layerOpration/coms/qingXieModel.vue +++ /dev/null @@ -1,175 +0,0 @@ -<template> - <div class="row-item"> - <span>{{$t('global.clipMode')}}</span> - <n-radio-group v-model:value="state.operationType" name="operationType" class="radio-group"> - <n-space> - <n-radio :value="0">{{$t('global.excavate')}}</n-radio> - <n-radio :value="1">{{$t('global.flatten')}}</n-radio> - </n-space> - </n-radio-group> - </div> - <div class="btn-row-item" v-if="state.isQxModel"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="start" style="margin-right: 0.1rem"> - {{ state.actionName }} - </n-button> - <n-button class="btn-secondary" @click="clear">{{$t('global.clear')}}</n-button> - </div> - <div class="btn-row-item" v-else> - <n-tooltip> - <template #trigger> - <n-button type="info" tag="div" disabled color="#3499E5" text-color="#fff" @click="start" style="margin-right: 0.1rem"> - {{ state.actionName }} - </n-button> - </template> - {{$t('global.qxModelTip')}} - </n-tooltip> - <n-button class="btn-secondary" disabled @click="clear">{{$t('global.clear')}}</n-button> - </div> -</template> - - <script setup lang="ts"> - import { reactive, onBeforeUnmount, watch } from "vue"; - import { useLayerStore } from "@/store/layerStore"; - import initHandler from "@/tools/drawHandler"; - import tool from "@/tools/tool"; - - const layerStore = useLayerStore(); - - type StateType = { - s3mlayers: any, //当前存在的可选择s3m图层 - selectedIndex: number, //默认选择图层index - operationType: number //操作类型 - actionName:string,// 当前操作名称 - isQxModel:boolean,//是否为倾斜模型 - } - - // 初始化数据 - let state = reactive<StateType>({ - s3mlayers: [], //当前存在的可选择s3m图层 - selectedIndex: 0, //默认选择图层index - operationType: 0, //操作类型 - actionName:'', - isQxModel:false - }); - let layers, handlerPolygon; - - function updateLayers() { - layers = viewer.scene.layers.layerQueue; - if (!layers || layers.length < 1) { - state.s3mlayers = [{ label: () => GlobalLang.noLayer, value: 0 }]; - return; - } - state.s3mlayers.length = 0; - layers.forEach((layer, index) => { - let name = layer._name; - state.s3mlayers.push({ - label: name, - value: index - }); - }); - if (state.selectedIndex > layers.length - 1) state.selectedIndex = 0; - } - - function init() { - if (!window.viewer) return; - updateLayers(); - state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); - state.actionName = GlobalLang.excavate; - - // 判断当前图层是否为倾斜摄影模型 - 目前以RealityMesh来做判断 - if(layers[state.selectedIndex]._dataType === "RealityMesh"){ - state.isQxModel = true; - }else{ - state.isQxModel = false; - } - } - init(); - - - // 倾斜摄影模型开挖压平 - //开挖 - function excavationUpdate(excavation_position) { - layers[state.selectedIndex].addExcavationRegion({ - position: excavation_position, - name: "excavation_" + Math.random() - }); - } - - //更新地形修改 - function flattenUpdate(positions) { - layers[state.selectedIndex].addFlattenRegion({ - position: positions, - name: "flatten" + Math.random() - }); - } - - // 清除 - function clear(e) { - if (handlerPolygon) handlerPolygon.clearHandler(); - if (!layers[state.selectedIndex]) return; - if (state.operationType < 1) { - layers[state.selectedIndex].removeAllExcavationRegion(); - } else { - layers[state.selectedIndex].removeAllFlattenRegion(); - } - } - - function start() { - if (!handlerPolygon) { - handlerPolygon = initHandler("Polygon"); - } - handlerPolygon.handlerDrawing().then( - res => { - let position = tool.CartesiantoDegrees(res.object.positions); - if (state.operationType < 1) { - excavationUpdate(position); - } else { - flattenUpdate(position); - } - // handlerPolygon.polylineTransparent.show = false; - }, - err => { - console.log(err); - } - ); - handlerPolygon.activate(); - } - - // 监听 - watch( - () => layerStore.layerChangeCount, - () => { - updateLayers(); - }); - watch( - () => state.operationType, - (val) => { - if(val === 0){ - state.actionName = GlobalLang.excavate; - }else{ - state.actionName = GlobalLang.flatten; - } - }); - - watch( - () => layerStore.s3mLayerSelectIndex, - val => { - // reset(); - state.selectedIndex = Number(val); - } - ); - - onBeforeUnmount(() => { - layers = null; - }); - </script> - - <style lang="scss"> - </style> - - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/layerSeries/layerOpration/index.vue b/SuperMap iEarth/src/package/layerSeries/layerOpration/index.vue deleted file mode 100644 index 501c0ecc..00000000 --- a/SuperMap iEarth/src/package/layerSeries/layerOpration/index.vue +++ /dev/null @@ -1,55 +0,0 @@ -<template> - <div class="scene-set-box"> - <n-tabs type="line" animated :on-update:value="tabsChange" justify-content="left"> - <n-tab-pane name="QingXieModel" :tab="$t('global.qxModel')" class="use-scroll"> - <QingXieModel></QingXieModel> - </n-tab-pane> - <n-tab-pane name="Inundation" :tab="$t('global.inundationAnalysis')"> - <Inundation></Inundation> - </n-tab-pane> - <n-tab-pane name="Offset" :tab="$t('global.offSet')"> - <Offset></Offset> - </n-tab-pane> - <n-tab-pane name="LayerColor" :tab="$t('global.layerColor')"> - <LayerColor></LayerColor> - </n-tab-pane> - </n-tabs> - </div> -</template> - -<script setup lang="ts"> -// import { usePanelStore } from "@/store/index"; -import QingXieModel from "./coms/qingXieModel.vue"; -import Inundation from "./coms/inundation.vue"; -import Offset from "./coms/offset.vue"; -import LayerColor from "./coms/layerColor.vue"; - -// const panelStore = usePanelStore(); -function tabsChange() {} - -// 关闭弹窗 -// function panelCloseHandle() {} -</script> - -<style lang="scss" scoped> -.scene-set-box { - width: 100%; - height: 100%; - // padding: 0 0.12rem; - box-sizing: border-box; -} -:deep(.n-tabs-tab-wrapper){ - margin-right:0.16rem; -} - :deep(.n-tabs-nav){ - padding:0 0.12rem; - }; - :deep(.n-tab-pane) { - box-sizing: border-box; - padding-left: 0.12rem; - padding-right: 0.12rem; - } - .use-scroll{ - padding-right: 0px; - } -</style> diff --git a/SuperMap iEarth/src/package/layerSeries/layerQuery/index.ts b/SuperMap iEarth/src/package/layerSeries/layerQuery/index.ts deleted file mode 100644 index 9e8fbd60..00000000 --- a/SuperMap iEarth/src/package/layerSeries/layerQuery/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import LayerQuery from './index.vue'; - -export default LayerQuery; diff --git a/SuperMap iEarth/src/package/layerSeries/layerQuery/index.vue b/SuperMap iEarth/src/package/layerSeries/layerQuery/index.vue deleted file mode 100644 index 289f134c..00000000 --- a/SuperMap iEarth/src/package/layerSeries/layerQuery/index.vue +++ /dev/null @@ -1,301 +0,0 @@ -<template> - <div class="layerSeries-box"> - - - <div class="row-item"> - <span>{{ $t('global.chooseLayer') }}</span> - <n-select class="add-input-border" style="width: 1.96rem" v-model:value="state.selectedIndex" - :options="state.s3mlayers" /> - </div> - <div class="row-item" style="margin-bottom: 0.1rem"> - <span>{{$t('global.dataServerUrl')}}</span> - <n-input class="add-input-border" style="width: 1.96rem" v-model:value="state.dataUrl" type="text" - :placeholder="$t('global.inputServerUrl')" /> - </div> - <div class="row-item" style="margin-bottom: 0.1rem"> - <span>{{$t('global.dataSourceName')}}</span> - <n-input class="add-input-border" style="width: 1.96rem" v-model:value="state.dataSourceName" type="text" - :placeholder="$t('global.inputSourceName')" /> - </div> - <div class="btn-row-item" style="margin-right: 0.1rem;margin-top: 0.12rem"> - <n-button type="info" color="#3499E5" text-color="#fff" class="ans-btn" @click="startQuery">{{ $t('global.query') }}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{ $t('global.clear') - }}</n-button> - </div> - - <div class="bableShadow" ref="bableQuery" v-show="state.shadowRadioShow"> - <div class="row-item" style="margin-top:0.12rem"> - <span class="shadow-anaylse-pop-titie">{{ state.queryLayerName }} - {{$t('global.queryResult')}}</span> - <span @click="state.shadowRadioShow = false" style="margin-right:14px">X</span> - </div> - <div class="bable-container"> - <n-scrollbar style="max-height: 1.7rem"> - <div class="row-item" style="margin-left: 0.12rem;margin-right: 0.12rem" - v-for="item in state.modelInfo"> - <span>{{ item.lable }}</span> - <n-input style="width: 1.2rem;" v-model:value="item.value" :show-button="false" disabled> - </n-input> - </div> - </n-scrollbar> - - </div> - </div> - </div> -</template> - -<script setup lang="ts"> -import { ref, reactive, onBeforeUnmount, watch } from "vue"; -import { useLayerStore } from "@/store/layerStore"; -import { useMessage } from "naive-ui"; -import axios from "axios"; -const message = useMessage(); - -const layerStore = useLayerStore(); - -type StateType = { - s3mlayers: any, //当前存在的可选择s3m图层 - selectedIndex: number, //默认选择图层index - dataUrl: string, - dataSourceName: string, - shadowRadioShow: boolean, - modelInfo: any, - queryLayerName: string, - scenePosition: any, - isSetForLayer:boolean; -} - -// 初始化数据 -let state = reactive<StateType>({ - s3mlayers: [], //当前存在的可选择s3m图层 - selectedIndex: 0, //默认选择图层index - dataUrl: '', - dataSourceName: '', - shadowRadioShow: false, - modelInfo: {}, - queryLayerName: '', - scenePosition: null, - isSetForLayer:false, -}); -let layers; -let bableQuery = ref(); -let handler; -const scene = viewer.scene; - -function updateLayers() { - layers = viewer.scene.layers.layerQueue; - if (!layers || layers.length < 1) { - state.s3mlayers = [{ label: () => GlobalLang.noLayer, value: 0 }]; - return; - } - state.s3mlayers.length = 0; - layers.forEach((layer, index) => { - let name = layer._name; - state.s3mlayers.push({ - label: name, - value: index - }); - }); - if (state.selectedIndex > layers.length - 1) state.selectedIndex = 0; - layers[state.selectedIndex].selectEnabled = true; -} - -function init() { - if (!window.viewer) return; - updateLayers(); - state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); - layers[state.selectedIndex].selectEnabled = true; - - // 获取图层绑定的数据源信息 - setQueryInfo(); -} -init(); - - -function startQuery() { - if (!state.dataUrl || state.dataUrl === '' || !state.dataSourceName || state.dataSourceName === '') { - message.warning(GlobalLang.inputUrlName); - return; - } - - // let targetLayer = viewer.scene.layers.find('BIMbuilding'); - let targetLayer = layers[state.selectedIndex]; - state.queryLayerName = targetLayer.name; - - targetLayer.setQueryParameter({ - // url: "http://www.supermapol.com/realspace/services/data-BIMbuilding/rest/data", - url: state.dataUrl, - dataSourceName: state.dataSourceName, // BIMBuilding - isMerge: true - }); - // 设置选中颜色 - var color = new SuperMap3D.Color.fromCssColorString("rgba(23,92,239,1)"); - targetLayer.selectedColor = color; - if(!state.isSetForLayer){ - message.success(GlobalLang.bindInfoOK); - state.isSetForLayer = true; - }else{ - message.warning(GlobalLang.hadBind); - } - - // 点击模型获取相关信息 - viewer.pickEvent.addEventListener(getModelInfo); - - // 每一帧都去计算气泡的正确位置 - scene.postRender.addEventListener(setBablePosition); - - // 获取当前点击的位置 - handler = new SuperMap3D.ScreenSpaceEventHandler(scene.canvas); - handler.setInputAction(function (e: any) { - // state.shadowRadioShow = true; - // 获取点击位置笛卡尔坐标 - var position = scene.pickPosition(e.position); - if (!position) { - position = SuperMap3D.Cartesian3.fromDegrees(0, 0, 0); - } - state.scenePosition = position; // 气泡位置 - - }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); - - let item = layerStore.layerQueryOptions.filter(item => item.name == state.queryLayerName); - if (item.length === 0) { - // 保存数据源信息 - let obj = { - name: targetLayer.name, - dataUrl: state.dataUrl, - dataSourceName: state.dataSourceName - } - layerStore.layerQueryOptions.push(obj); - - } - -} - -// 设置气泡位置 -function setBablePosition() { - if (state.scenePosition) { - var canvasHeight = scene.canvas.height; - var windowPosition = new SuperMap3D.Cartesian2(); - SuperMap3D.SceneTransforms.wgs84ToWindowCoordinates(scene, state.scenePosition, windowPosition); - bableQuery.value.style.bottom = (canvasHeight - windowPosition.y - 10) + 'px'; - bableQuery.value.style.left = (windowPosition.x) + 'px'; - bableQuery.value.style.visibility = "visible"; - } -} - -// 点击拾取实体,获取属性信息 -function getModelInfo(feature: any) { - console.log(feature) - if (feature) { - state.shadowRadioShow = true; - let list: any = []; - for (let key in feature) { - let value = String(feature[key]); - if (value.indexOf('.') != -1) value = Number(value).toFixed(2); - list.push({ - lable: key, - value: value - }) - } - state.modelInfo = list; - } else { - state.shadowRadioShow = false; - message.success(GlobalLang.noData); - } -} - -// 获取已绑定的图层查询信息 -function setQueryInfo() { - if (layerStore.layerQueryOptions.length > 0) { - let selectLayerName = layers[state.selectedIndex].name; - let targetItem = layerStore.layerQueryOptions.filter(item => item.name == selectLayerName); - if (targetItem.length > 0) { - state.dataUrl = targetItem[0].dataUrl; - state.dataSourceName = targetItem[0].dataSourceName; - } - } -} - -// 清除 -function clear() { - state.shadowRadioShow = false; - if (handler) { - handler.destroy(); - handler = null; - } - state.dataUrl = ''; - state.dataSourceName = ''; - state.isSetForLayer = false; - scene.postRender.removeEventListener(setBablePosition); - viewer.pickEvent.removeEventListener(getModelInfo); - - // window.axios - // .get('http://www.supermapol.com/realspace/services/data-BIMbuilding/rest/data/datasources') - // .then((res: any) => { - // console.log("res:",res); - // }); -} - -// 监听 -watch( - () => layerStore.layerChangeCount, - () => { - updateLayers(); - }); -watch( - () => state.selectedIndex, - () => { - clear(); - setQueryInfo(); - }); - -onBeforeUnmount(() => { - layers = null; - clear(); -}); -</script> - -<style lang="scss" scoped> -.layerSeries-box { - width: 100%; - height: 100%; - padding: 0 0.12rem; - box-sizing: border-box; - -} - -.bableShadow { - position: fixed; - top: 2rem; - left: 5rem; - background-color: #3B5168; - opacity: 0.9; - z-index: 200000; - height: 2.2rem; - width: 2.28rem; - - .bable-container { - // height: 1.7rem; - // width: 2.28rem; - overflow-y: scroll; - @include setsSrollbar(); - } - - .shadow-anaylse-pop-titie { - margin-left: 0.12rem; - font-size: 12px; - line-height: 20px; - - } - - span { - font-size: 12px; - } -} -</style> - - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/layerSeries/layerStyle/index.ts b/SuperMap iEarth/src/package/layerSeries/layerStyle/index.ts deleted file mode 100644 index 46aa222f..00000000 --- a/SuperMap iEarth/src/package/layerSeries/layerStyle/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import LayerStyle from './index.vue'; - -export default LayerStyle; diff --git a/SuperMap iEarth/src/package/layerSeries/layerStyle/index.vue b/SuperMap iEarth/src/package/layerSeries/layerStyle/index.vue deleted file mode 100644 index 550040f2..00000000 --- a/SuperMap iEarth/src/package/layerSeries/layerStyle/index.vue +++ /dev/null @@ -1,491 +0,0 @@ -<template> - <div class="layerSeries-box"> - <!-- <div class="row-item"> - <span>选择图层</span> - <n-select - style="width: 2.2rem" - v-model:value="state.selectedIndex" - :options="state.s3mlayers" - /> - </div> --> - <div class="row-item" v-show="state.isBaiMo"> - <span>{{$t('global.fillStyle')}}</span> - <n-select - class="add-input-border" - style="width: 62%" - v-model:value="state.fillStyle" - :options="state.fillStyleMode" - /> - </div> - <div class="row-item"> - <span>{{$t('global.foreColor')}}</span> - <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> - <n-color-picker - v-model:value="state.foreColor" - :render-label=" - () => { - return ''; - } - " - size="small" - ></n-color-picker> - </div> - </div> - - <div class="row-item" v-show="state.isBaiMo"> - <span>{{$t('global.lineColor')}}</span> - <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> - <n-color-picker - v-model:value="state.lineColor" - :render-label=" - () => { - return ''; - } - " - size="small" - ></n-color-picker> - </div> - </div> - - <div class="row-item"> - <span>{{$t('global.selectedColor')}}</span> - <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> - <n-color-picker - v-model:value="state.selectedColor" - :render-label=" - () => { - return ''; - } - " - size="small" - ></n-color-picker> - </div> - </div> - - <div class="row-item"> - <span>{{$t('global.selectColorMode')}}</span> - <n-radio-group v-model:value="state.selectColorMode" name="shadowMode" style="width:1.96rem"> - <!-- <n-space justify="space-between"> --> - <n-radio :value="0"><n-ellipsis >{{$t('global.colorMix')}}</n-ellipsis></n-radio> - <n-radio :value="1"><n-ellipsis >{{$t('global.colorReplace')}} </n-ellipsis></n-radio> - <!-- </n-space> --> - </n-radio-group> - </div> - - <div class="row-item"> - <span>{{$t('global.bottomHeight')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.bottomAltitude" - style="width: 70%" - :step="1" :min="-100" :max="100" - /> - <div class="row-slider-num">{{ state.bottomAltitude }}</div> - </div> - </div> - - <div class="row-item" v-show="state.isCloudPoint"> - <span>LOD</span> - <div class="slider-box"> - <n-slider - v-model:value="state.LODScale" - style="width: 70%" - :step="0.5" :min="0" :max="10" - /> - <div class="row-slider-num">{{ state.LODScale }}</div> - </div> - </div> - - <div class="row-item"> - <span>{{$t('global.layerTransparency')}}</span> - <div class="slider-box"> - <n-slider - v-model:value="state.layerTrans" - style="width: 70%" - :step="0.05" :min="0" :max="1" - /> - <div class="row-slider-num">{{ state.layerTrans }}</div> - </div> - </div> - <!-- <div class="btn-row-item"> - <n-button type="info" color="#3499E5" text-color="#fff" attr-type="button" @click="onSaveUserClk"> - {{$t('global.save')}} - </n-button> - <n-button @click="reset">{{$t('global.reset')}}</n-button> - </div> --> - <div class="btn-row-item"> - <n-button - type="info" - color="#3499E5" - text-color="#fff" - class="ans-btn" - @click="saveStyle" - >{{$t('global.save')}}</n-button - > - <n-button class="btn-secondary" @click="reset" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.reset')}}</n-button> - </div> - </div> - - - - <!-- <div class="sm-box"> - <n-ellipsis style="line-height: 28px;">最小可见距离</n-ellipsis> - <n-input-number v-model:value="state.visibleDistanceMin" size="small" style="width:100%"></n-input-number> - </div> - <div class="sm-box"> - <n-ellipsis style="line-height: 28px;">最大可见距离</n-ellipsis> - <n-input-number v-model:value="state.visibleDistanceMax" size="small" style="width:100%"></n-input-number> - </div> --> - </template> - -<script setup lang="ts"> -import { reactive,onMounted, onBeforeUnmount, watch } from "vue"; -import { useLayerStore } from "@/store/layerStore"; -import { useMessage } from "naive-ui"; - -const message = useMessage(); -const layerStore = useLayerStore(); - -type StateType = { - s3mlayers: any, //当前存在的可选择s3m图层 - selectedIndex: number, //默认选择图层index - foreColor: string, //前景色 - lineColor: string, //线颜色 - selectedColor: string, //选中色 - selectColorMode: number, //选中色模式 - bottomAltitude: number, //底部高程 - LODScale: number, //LOD - layerTrans: number, //图层透明度 - fillStyle: number, //填充风格 - visibleDistanceMin: number, //最小可见距离 - visibleDistanceMax: number, //最大可见距离 - fillStyleMode:any, - isCloudPoint:boolean,// 当前图层是否为点云 - isBaiMo:boolean,// 当前图层是否为白膜 -} - -// 初始化数据 -let state = reactive<StateType>({ - s3mlayers: [], //当前存在的可选择s3m图层 - selectedIndex: 0, //默认选择图层index - foreColor: "rgba(255, 255, 255, 1)", //前景色 - lineColor: "rgba(255, 255, 255, 1)", //线颜色 - selectedColor: "rgba(179,179,255, 1)", //选中色 - selectColorMode: 0, //选中色模式 - bottomAltitude: 0, //底部高程 - LODScale: 1, //LOD - layerTrans: 1, //图层透明度 - fillStyle: 0, //填充风格 - visibleDistanceMin: 0, //最小可见距离 - visibleDistanceMax: 12000, //最大可见距离 - fillStyleMode: [ - { label: () => GlobalLang.fillMode, value: 0 }, - { label: () => GlobalLang.wireframe, value: 1 }, - { label: () => GlobalLang.fillBothMode, value: 2 } - ], - isCloudPoint:false, - isBaiMo:false, -}); -let layers; - -function updateLayers() { - layers = viewer.scene.layers.layerQueue; - if (!layers || layers.length < 1) { - state.s3mlayers = [{ label: () => GlobalLang.noLayer, value: 0 }]; - return; - } - state.s3mlayers.length = 0; - layers.forEach((layer, index) => { - let name = layer._name; - state.s3mlayers.push({ - label: name, - value: index - }); - }); - if (state.selectedIndex > layers.length - 1) state.selectedIndex = 0; -} - -function init() { - if (!window.viewer) return; - updateLayers(); - state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); - - // _fileType:8 => 点云 - if(layers[state.selectedIndex]._fileType === 8){ - state.isCloudPoint = true; - } - - // 白膜图层 - if(layers[state.selectedIndex]._name == '重庆白模' || layers[state.selectedIndex]._name == '横滨白模'){ - state.isBaiMo = true; - } - - let keys = Object.keys(layerStore.layerStyleOptions); - if(keys.length>0){ - let s3mLayerName = layers[state.selectedIndex]._name; - let option = layerStore.particleOptions[s3mLayerName]; - if(option) switchCase(option); - } -} -// init(); -onMounted(() => { - init(); -}) - -function getAttributes() { - if (!SuperMap3D.defined(layers) || !SuperMap3D.defined(layers[state.selectedIndex])) - return; - let selectLayer = layers[state.selectedIndex]; - state.foreColor = SuperMap3D.defaultValue( - selectLayer.style3D.fillForeColor.toCssColorString (), - "rgba(255, 255, 255, 1)" - ); - state.lineColor = SuperMap3D.defaultValue( - selectLayer.style3D.lineColor.toCssColorString (), - "rgba(255,255,255, 1)" - ); - state.selectedColor = SuperMap3D.defaultValue( - selectLayer.selectedColor.toCssColorString (), - "rgba(179,179,255, 1)" - ); - state.selectColorMode = SuperMap3D.defaultValue(selectLayer.selectColorType, 0); - state.bottomAltitude = SuperMap3D.defaultValue( - selectLayer.style3D.bottomAltitude, - 0 - ); - state.LODScale = SuperMap3D.defaultValue(selectLayer.lodRangeScale, 1); - state.layerTrans = SuperMap3D.defaultValue( - selectLayer.style3D.fillForeColor.alpha, - 1 - ); - state.fillStyle = SuperMap3D.defaultValue( - selectLayer.style3D.fillStyle, - SuperMap3D.FillStyle.Fill - ); - state.visibleDistanceMin = SuperMap3D.defaultValue( - selectLayer.visibleDistanceMin, - 0 - ); - state.visibleDistanceMax = SuperMap3D.defaultValue( - selectLayer.visibleDistanceMax, - 12000 - ); -} - -// 重置 -function reset(){ - state.foreColor = "rgba(255, 255, 255, 1)"; //前景色 - state.lineColor = "rgba(255, 255, 255, 1)"; //线颜色 - state.selectedColor = "rgba(179,179,255, 1)";//选中色 - state.selectColorMode = 0; //选中色模式 - state.bottomAltitude = 0; //底部高程 - state.layerTrans = 1; //图层透明度 - state.fillStyle = 0; //填充模式 - - if(state.isCloudPoint){ - state.LODScale = 1; //LOD - } -} - -function saveStyle(){ - let layer = layers[state.selectedIndex]; - let key = layer._name; - let layerStyleItem:any = {}; - - layerStyleItem['foreColor'] = state.foreColor; - layerStyleItem['lineColor'] = state.lineColor; - layerStyleItem['selectedColor'] = state.selectedColor; - layerStyleItem['selectColorMode'] = state.selectColorMode; - layerStyleItem['bottomAltitude'] = state.bottomAltitude; - layerStyleItem['layerTrans'] = state.layerTrans; - layerStyleItem['LODScale'] = state.LODScale; - layerStyleItem['fillStyle'] = state.fillStyle; - - layerStore.layerStyleOptions[key] = layerStyleItem; - - message.success(`${key}${GlobalLang.attrSaveOk}`); -} - -// 设置参数 -function switchCase(option:any) { - for (let key in option) { - switch (key) { - case "foreColor": - state.foreColor = option[key]; - break; - case "lineColor": - state.lineColor = option[key]; - break; - case "selectedColor": - state.selectedColor = option[key]; - break; - case "selectColorMode": - state.selectColorMode = Number(option[key]); - break; - case "bottomAltitude": - state.bottomAltitude = Number(option[key]); - break; - case "fillStyle": - state.fillStyle = Number(option[key]); - break; - case "LODScale": - state.LODScale = Number(option[key]); - break; - case "layerTrans": - state.layerTrans = Number(option[key]); - break; - default: - break; - } - } -} -// 监听 -watch( - () => layerStore.layerChangeCount, - () => { - updateLayers(); -}); - -watch( - () => state.selectedIndex, - val => { - getAttributes(); - - if(layers[state.selectedIndex].name === "POINTCLOUD23"){ - state.isCloudPoint = true; - } - } -); - -watch( - () => state.foreColor, - val => { - if (layers[state.selectedIndex]) - layers[ - state.selectedIndex - ].style3D.fillForeColor = SuperMap3D.Color.fromCssColorString(val); - } -); -watch( - () => state.lineColor, - val => { - if (layers[state.selectedIndex]){ - // layers[ - // state.selectedIndex - // ].style3D.lineColor = SuperMap3D.Color.fromCssColorString(val); - let layer = layers[state.selectedIndex]; - layer.style3D.lineColor = SuperMap3D.Color.fromCssColorString(val); - } - } -); -watch( - () => state.selectedColor, - val => { - if (layers[state.selectedIndex]) - layers[ - state.selectedIndex - ].selectedColor = SuperMap3D.Color.fromCssColorString(val); - } -); -watch( - () => state.selectColorMode, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].selectColorType = val; - } -); -watch( - () => state.bottomAltitude, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].style3D.bottomAltitude = Number(val); - layers[state.selectedIndex].refresh(); - } -); -watch( - () => state.fillStyle, - val => { - if (layers[state.selectedIndex]) - switch (val) { - case 0: - layers[state.selectedIndex].style3D.fillStyle = SuperMap3D.FillStyle.Fill; - break; - case 1: - layers[state.selectedIndex].style3D.fillStyle = - SuperMap3D.FillStyle.WireFrame; - layers[ - state.selectedIndex - ].style3D.lineColor = SuperMap3D.Color.fromCssColorString( - state.lineColor - ); - break; - case 2: - layers[state.selectedIndex].style3D.fillStyle = - SuperMap3D.FillStyle.Fill_And_WireFrame; - layers[ - state.selectedIndex - ].style3D.lineColor = SuperMap3D.Color.fromCssColorString( - state.lineColor - ); - break; - default: - break; - } - layers[state.selectedIndex].refresh(); - } -); -watch( - () => state.LODScale, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].lodRangeScale = Number(val); - } -); -watch( - () => state.layerTrans, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].style3D.fillForeColor.alpha = Number(val); - } -); -watch( - () => state.visibleDistanceMin, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].visibleDistanceMin = Number(val); - } -); - -watch( - () => state.visibleDistanceMax, - val => { - if (layers[state.selectedIndex]) - layers[state.selectedIndex].visibleDistanceMax = Number(val); - } -); -watch( - () => layerStore.s3mLayerSelectIndex, - val => { - reset(); - state.selectedIndex = Number(val); - } -); -onBeforeUnmount(() => {}); -</script> - - <style lang="scss" scoped> - .layerSeries-box { - width: 100%; - height: 100%; - padding: 0 0.12rem; - box-sizing: border-box; - } - </style> - - - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/layerSeries/map-query/coms/column-setting.vue b/SuperMap iEarth/src/package/layerSeries/map-query/coms/column-setting.vue new file mode 100644 index 00000000..e7e96bd0 --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/map-query/coms/column-setting.vue @@ -0,0 +1,74 @@ +<template> + <n-popover + placement="bottom" + trigger="click" + style="max-height: 240px" + scrollable + > + <template #trigger> + <n-tooltip placement="top-end" trigger="hover"> + <template #trigger> + <i class="iconfont iconSize iconshaixuan"></i> + </template> + {{ $t("filterFiledTip") }} + </n-tooltip> + </template> + <div> + <vue-draggable v-model="list" item-key="key"> + <template #item="{ element }"> + <div v-if="element.key"> + <n-checkbox v-model:checked="element.checked"> + {{ element.title }} + </n-checkbox> + </div> + </template> + </vue-draggable> + </div> + </n-popover> +</template> + +<script setup lang="ts"> +import { ref, watch } from "vue"; +import type { DataTableColumn } from "naive-ui"; +import VueDraggable from "vuedraggable"; + +type Column = DataTableColumn; + +interface Props { + columns: Column[]; +} + +const props = defineProps<Props>(); + +interface Emits { + (e: "update:columns", columns: Column[]): void; +} + +const emit = defineEmits<Emits>(); + +type List = Column & { checked?: boolean }; + +const list = ref(initList()); +function initList(): List[] { + return props.columns.map((item) => ({ ...item, checked: true })); +} + +watch( + list, + (newValue) => { + const newColumns = newValue.filter((item) => item.checked); + + const columns: Column[] = newColumns.map((item) => { + const column = { ...item }; + delete column.checked; + + return column; + }) as Column[]; + + emit("update:columns", columns); + }, + { deep: true } +); +</script> + +<style scoped></style> diff --git a/SuperMap iEarth/src/package/layerSeries/map-query/index.ts b/SuperMap iEarth/src/package/layerSeries/map-query/index.ts new file mode 100644 index 00000000..86ed733a --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/map-query/index.ts @@ -0,0 +1,3 @@ +import MapQuery from './mapQuery.vue'; + +export default MapQuery; diff --git a/SuperMap iEarth/src/package/layerSeries/map-query/mapQuery.vue b/SuperMap iEarth/src/package/layerSeries/map-query/mapQuery.vue new file mode 100644 index 00000000..feea8cba --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/map-query/mapQuery.vue @@ -0,0 +1,1719 @@ +<template> + <div class="layerSeries-box"> + <!-- 打开面板 --> + <div class="row-item" style="margin-bottom: 0.1rem"> + <span>{{ $t("mapDataUrl") }}</span> + <n-tooltip placement="top-end" trigger="hover"> + <template #trigger> + <n-input + class="add-input-border" + style="width: 2.2rem" + v-model:value="state.dataUrl" + type="text" + :placeholder="$t('inputServerUrl')" + /> + </template> + {{ state.dataUrlTip }} + </n-tooltip> + </div> + + <div class="row-item" style="margin-bottom: 0.1rem"> + <span>{{ $t("datasetName") }}</span> + <n-input + class="add-input-border" + style="width: 2.2rem" + v-model:value="state.datasetName" + type="text" + :placeholder="$t('inputSourceName')" + /> + </div> + + <div class="oprationBtn" style="margin-left: 0.83rem"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + :loading="state.isloading_table" + @click="startQuery" + style="margin-right: 0.1rem" + >{{ $t("attributeList") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> + + <!-- 表格 - 操作面板 --> + <div id="queryTable" v-if="state.showQueryTable"> + <!-- 表头 --> + <div class="tableHeader"> + <div class="item tableInfo"> + {{ state.datasetName }}{{ $t("listTotal_s") }} {{ + tableCount + }} {{ $t("listTotal_e") }} + </div> + + <!-- 过滤框 --> + <div class="item search"> + <n-input-group> + <n-input + class="add-input-border" + style="margin-bottom: 0.1rem; width: 1.8rem" + :placeholder="state.queryPlaceHolder" + v-model:value="state.sqlString" + :disabled="state.selectFiled === 'chooseFeild'" + > + </n-input> + <n-popover + placement="bottom" + trigger="click" + style="max-height: 2.4rem" + scrollable + > + <template #trigger> + <n-tooltip placement="top-end" trigger="hover"> + <template #trigger> + <n-button type="tertiary">{{ + state.selectFiled == "chooseFeild" + ? state.chooseField + : state.selectFiled + }}</n-button> + </template> + {{ $t("chooseFieldTip") }} + </n-tooltip> + </template> + <n-radio-group + v-model:value="state.selectFiled" + name="radiogroup" + > + <n-space vertical> + <n-radio + v-for="song in columns" + :key="song.title" + :value="song.title" + > + {{ song.title }} + </n-radio> + </n-space> + </n-radio-group> + </n-popover> + <n-button + :loading="state.isloading" + @click="search" + :disabled="state.selectFiled === 'chooseFeild'" + >{{ $t("filter") }}</n-button + > + </n-input-group> + </div> + + <!-- 操作按钮 --> + <div class="items"> + <div class="icon-list-box" style="width: 2.2rem"> + <!-- 字段筛选 --> + <span class="icon-span-three"> + <column-setting v-model:columns="columns" /> + </span> + <!-- 打开iportal我的数据(shp) --> + <span class="icon-span-three"> + <n-tooltip placement="top-end" trigger="hover"> + <template #trigger> + <i + class="iconfont iconSize iconzhidingshujuchaxun" + @click="openMydata" + ></i> + </template> + <!-- iconshpchaxun --> + {{ $t("shpQueryTip") }} + </n-tooltip> + </span> + <!-- 点选查询 --> + <span class="icon-span-three"> + <n-tooltip placement="top-end" trigger="hover"> + <template #trigger> + <i + class="iconfont iconSize icondianxuan" + @click="clickQuery" + ></i> + </template> + {{ $t("clickQuery") }} + </n-tooltip> + </span> + <!-- 打开媒体字段 --> + <span class="icon-span-three"> + <n-tooltip placement="top-end" trigger="hover"> + <template #trigger> + <i + class="iconfont iconSize icontianjiameitiziduan" + @click="openMediaField" + ></i> + </template> + {{ $t("bindMediaField") }} + </n-tooltip> + </span> + <!-- 清除实体 --> + <span class="icon-span-three"> + <n-tooltip placement="top-end" trigger="hover"> + <template #trigger> + <i + class="iconfont iconSize iconshanchu" + @click="clearEntity" + ></i> + </template> + {{ $t("clearEntityTip") }} + </n-tooltip> + </span> + <!-- 查询所有(刷新) --> + <span class="icon-span-three"> + <n-tooltip placement="top-end" trigger="hover"> + <template #trigger> + <i + class="iconfont iconSize iconshuaxin" + @click="queryAll" + ></i> + </template> + {{ $t("refreshData") }} + </n-tooltip> + </span> + <!-- 关闭按钮 --> + <span class="icon-span-three"> + <n-tooltip placement="top-end" trigger="hover"> + <template #trigger> + <i + class="iconfont iconSize iconguanbi" + @click="state.showQueryTable = false" + ></i> + </template> + {{ $t("close") }} + </n-tooltip> + </span> + </div> + </div> + </div> + + <!--表格数据 --> + <n-data-table + size="small" + :columns="columns" + :data="state.tableData" + flex-height + class="flex-1-hidden" + v-model:checked-row-keys="state.checkedRowKeys" + :scroll-x="columns.length * 110" + /> + + <!-- 页码控制器 --> + <div class="pagination"> + <div></div> + <n-pagination + :item-count="state.itemCount" + :page-sizes="[10, 20, 30, 40]" + :page="state.page" + :page-size="state.pageSize" + @update:page="onPageChange" + @update:page-size="onUpdatePageSize" + /> + </div> + <!-- show-size-picker --> + <!-- :pagination="pagination" --> + <!-- :row-class-name="rowClassName" --> + <!-- @update:checked-row-keys="handleCheck" --> + <!-- v-model:checked-row-keys="state.checkedRowKeys" --> + </div> + + <!-- 我的数据面板 --> + <div v-if="state.myDataPanleShow"> + <n-modal v-model:show="state.myDataPanleShow"> + <n-card + style="width: 6rem" + title="My Data" + :bordered="false" + size="huge" + role="dialog" + aria-modal="true" + > + <div id="myDataTable"> + <n-data-table + size="small" + :columns="state.columns_mydata" + :data="state.portalServiceList_mydata" + :pagination="pagination_mydata" + flex-height + class="flex-1-hidden" + v-model:checked-row-keys="state.checkedRowKeys_mydata" + /> + </div> + <div + :class="{ + oprationBtn_noloading: !state.isloading_mydata, + oprationBtn_loading: state.isloading_mydata, + }" + > + <n-button + type="info" + color="#3499E5" + text-color="#fff" + :loading="state.isloading_mydata" + @click="addShp_mydata" + style="margin-right: 0.1rem" + >{{ $t("sure") }}</n-button + > + <n-button + class="btn-secondary" + @click="cancle_mydata" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("cancle") }}</n-button + > + </div> + </n-card> + </n-modal> + </div> + + <!-- 添加媒体字段面板 --> + <div v-if="state.mediaFieldPanleShow"> + <n-modal + v-model:show="state.mediaFieldPanleShow" + preset="dialog" + :title="$t('bindMediaField')" + :mask-closable="false" + > + <n-card + style="width: 4rem" + :bordered="false" + size="huge" + role="dialog" + aria-modal="true" + > + <div class="row-item" style="margin-bottom: 0.1rem"> + <span>{{ $t("type") }}</span> + <n-select + class="add-input-border" + v-model:value="state.mediaType" + :options="state.mediaTypeOptions" + style="width: 2.4rem; margin-bottom: 0.1rem" + /> + </div> + <div class="row-item" style="margin-bottom: 0.1rem"> + <span>{{ $t("field") }}</span> + <n-tooltip placement="top-end" trigger="hover"> + <template #trigger> + <n-select + class="add-input-border" + v-model:value="state.selectMediaFeild" + :options="state.mediaFeilds" + style="width: 2.4rem" + /> + </template> + {{ $t("selectMediaFieldTip") }} + </n-tooltip> + </div> + <div class="row-item" style="margin-bottom: 0.1rem"> + <span>{{ $t("title") }}</span> + <n-input + class="add-input-border" + :placeholder="$t('inputTitle')" + style="width: 2.4rem" + v-model:value="state.mediaTitle" + type="text" + /> + </div> + <div style="margin-left: 0.8rem; margin-bottom: 0.1rem"> + <n-checkbox v-model:checked="state.isCustomMediaUrl"> + {{ $t("customMediaLink") }} + </n-checkbox> + </div> + <div + class="row-item" + v-if="state.isCustomMediaUrl" + style="margin-bottom: 0.1rem" + > + <span>{{ $t("featureID") }}</span> + <n-input + class="add-input-border" + disabled + style="width: 2.4rem" + v-model:value="state.currentFeatureID" + type="text" + /> + </div> + <div + class="row-item" + v-if="state.isCustomMediaUrl" + style="margin-bottom: 0.1rem" + > + <span>{{ $t("link") }}</span> + <n-input + class="add-input-border" + v-model:value="state.mediaUrl" + :placeholder=" + state.mediaType == 'img' + ? $t('inputOnlineImgLink') + : $t('inputOnlineVideoLink_iportal') + " + style="width: 2.4rem" + type="text" + > + </n-input> + </div> + <div class="btn-row-item" style="margin-left: 0.8rem"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + class="ans-btn" + @click="saveMediaField" + >{{ $t("sure") }}</n-button + > + <n-button + class="btn-secondary" + @click="clearMediaField" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> + </n-card> + </n-modal> + </div> + + <!-- 弹窗 --> + <div class="bableShadow" ref="bableQuery" v-show="state.shadowRadioShow"> + <div class="row-item" style="margin-top: 0.12rem"> + <span class="shadow-anaylse-pop-titie">{{ $t("clickQuery") }}</span> + <span @click="closebable" style="margin-right: 0.14rem">X</span> + </div> + <div class="bable-container"> + <n-scrollbar style="max-height: 3.8rem"> + <div + class="row-item" + style="margin-left: 0.12rem; margin-right: 0.12rem" + v-for="item in state.modelInfo" + > + <span>{{ item.lable }}</span> + <n-input + placeholder="null" + style="width: 1.8rem" + v-model:value="item.value" + :show-button="false" + disabled + > + </n-input> + </div> + <div style="margin-bottom: 0.1rem"> + <span style="margin-left: 0.12rem">{{ state.mediaTitle }}</span> + <div class="mediaContainer"> + <img + class="bableMedia" + :src="state.mediaUrl" + alt="" + v-if="state.mediaType === 'img'" + /> + <video + class="bableMedia" + id="videoDom" + controls + src="" + v-else + ></video> + </div> + </div> + </n-scrollbar> + </div> + </div> + </div> +</template> + +<script setup lang="ts"> +import { + ref, + reactive, + onMounted, + onBeforeUnmount, + watch, + computed, +} from "vue"; +import { useLayerStore } from "@/store/layerStore/layer"; +import { useMessage } from "naive-ui"; +import { getRootUrl } from "@/tools/iportal/portalTools"; +import { IportalStoreCreate } from "@/store/index"; +import ColumnSetting from "./coms/column-setting.vue"; + +const message = useMessage(); + +const IportalStore = IportalStoreCreate(); +const layerStore = useLayerStore(); + +type StateType = { + selectedIndex: number; //默认选择图层index + dataUrl: string; + datasetName: string; + columns: any; + tableData: any; + checkedRowKeys: any; + showQueryTable: boolean; + page: number; + pageSize: number; + sqlString: string; + selectFiled: string; + queryPlaceHolder: string; + itemCount: number; + isFilter: boolean; + myDataPanleShow: boolean; + isClickQuery: boolean; + isChangeDataSet: boolean; + dataUrlTip: string; + isloading: boolean; + isloading_table: boolean; + isProjection: boolean; + portalServiceList_mydata: any; + columns_mydata: any; + tableData_mydata: any; + checkedRowKeys_mydata: any; + isMydate: boolean; + isloading_mydata: boolean; + chooseField: string; + shadowRadioShow: boolean; + scenePosition: any; + mediaFieldPanleShow: boolean; + mediaType: string; + mediaTypeOptions: any; + mediaTitle: string; + mediaUrl: string; + modelInfo: any; + selectMediaFeild: string; + mediaFeilds: any; + currentFeature: any; + isCustomMediaUrl: boolean; + currentFeatureID: string; +}; + +// 初始化变量 +let state = reactive<StateType>({ + selectedIndex: 0, //默认选择图层index + // dataUrl: 'https://iserver.supermap.io/iserver/services/data-world/rest/data', + // datasetName: "World:Countries"(1889条要素)/ "World:Capitals"(192条要素) + // dataUrl: 'http://172.16.15.203:8090/iserver/services/data-China400/rest/data', + // datasetName: "China:China", + // dataUrl: "http://172.16.15.203:8090/iserver/services/data-80wtuban/rest/data", + // datasetName: "DLTB80w:DLTB_1", // 80多万 + // dataUrl: "http://127.0.0.1:8090/iserver/services/data-mapqueryProjection/rest/data", + // datasetName: "0830:NewDataset", + // dataUrl: "http://localhost:8090/iserver/services/data-mediaField/rest/data", + // datasetName: "1009:NewDataset", + dataUrl: "", + datasetName: "", + // dataUrl: "https://iserver.supermap.io/iserver/services/data-world/rest/data", + // datasetName: "World:Countries", // 这个数据集点选啥的都能用 + + // 表格 点选 + columns: [], + tableData: [], + checkedRowKeys: ["1"], + showQueryTable: false, + page: 1, + pageSize: 10, + sqlString: "", + selectFiled: "chooseFeild", + queryPlaceHolder: $t("queryPlaceHolder"), + itemCount: 0, + isFilter: false, + myDataPanleShow: false, + isClickQuery: false, + isChangeDataSet: false, + modelInfo: {}, + + // 输入提示 + dataUrlTip: `http://<server>:<port>/iserver/services/{dataProvider}/rest/data`, + isloading: false, + isloading_table: false, + isProjection: false, + + // 我的数据 + isMydate: false, + portalServiceList_mydata: [], + columns_mydata: [ + { + type: "selection", + multiple: false, + align: "center", + disabled: (rowdata) => { + return rowdata.disabled ? true : false; + }, + }, + { + key: "fileName", + title: $t("resouceName"), + align: "center", + }, + { + key: "id", + title: "ID", + align: "center", + }, + { + key: "type", + title: $t("resouceType"), + align: "center", + }, + { + key: "createTime", + title: $t("createTime"), + align: "center", + }, + ], + tableData_mydata: [], + checkedRowKeys_mydata: ["1"], + isloading_mydata: false, + chooseField: $t("chooseField"), + + // 新增 + shadowRadioShow: false, + scenePosition: null, + + // 媒体字段 + mediaFieldPanleShow: false, + mediaType: "img", + mediaTypeOptions: [ + { + label: $t("picture"), + value: "img", + }, + { + label: $t("video"), + value: "video", + }, + ], + mediaTitle: "", + mediaUrl: "", + selectMediaFeild: "SMID", + mediaFeilds: [], + currentFeature: null, + isCustomMediaUrl: false, + currentFeatureID: "", +}); + +let handler; +let targerMapLayer; +let bableQuery = ref(); + +function init() { + state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); + targerMapLayer = layerStore.layerTreeData[1].children[state.selectedIndex]; + // 获取图层绑定的数据源信息 + setQueryInfo(); + + // 关闭云层,以防遮挡Entity实体 + viewer.scene.cloudBox = null; +} + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(true); +}); + +// 设置气泡位置 +function setBablePosition() { + if (state.scenePosition) { + var canvasHeight = viewer.scene.canvas.height; + var windowPosition = new SuperMap3D.Cartesian2(); + SuperMap3D.SceneTransforms.wgs84ToWindowCoordinates( + viewer.scene, + state.scenePosition, + windowPosition + ); + bableQuery.value.style.bottom = canvasHeight - windowPosition.y - 10 + "px"; + bableQuery.value.style.left = windowPosition.x + "px"; + bableQuery.value.style.visibility = "visible"; + } +} + +// 获取数据-第一页 +function startQuery() { + if (state.dataUrl == "" || state.datasetName == "") { + message.error($t("mapQueryTip")); + return; + } + + if (state.tableData.length > 0 && !state.isChangeDataSet) { + state.showQueryTable = true; + return; + } + + clear(false); + state.selectFiled = "chooseFeild"; + state.isloading_table = true; + state.isFilter = false; + state.isChangeDataSet = false; + + // 查询数据 + queryAll(); + + let item = layerStore.mapQueryOptions.filter( + (item) => item.label == targerMapLayer.label + ); + if (item.length === 0) { + // 保存数据源信息 + let obj = { + label: targerMapLayer.label, + dataUrl: state.dataUrl, + datasetName: state.datasetName, + }; + layerStore.mapQueryOptions.push(obj); + } +} + +// 刷新表格 +function queryAll() { + if (state.itemCount === 0) { + message.success($t("queryWait")); + } else { + message.success($t("refreshData")); + } + + // 指定SQL查询服务参数 + let sqlParam = new L.supermap.GetFeaturesBySQLParameters({ + queryParameter: { + // name: "Countries@World", // 非必选项 + attributeFilter: "SMID > 0", + }, + fromIndex: 0, + toIndex: 10, // 设置为10,加快查询速度 + datasetNames: [state.datasetName], + }); + // 创建SQL查询实例 + new L.supermap.FeatureService(state.dataUrl).getFeaturesBySQL( + sqlParam, + function (serviceResult) { + let result = serviceResult.result; + if (window.iEarthConsole) { + console.log("result-all:", result); + } + if (!result) return; + let features: any = result.features.features; + state.itemCount = result.totalCount; + let features_pageSize = features.slice(0, 10); + state.isloading_table = false; + updateTable(features_pageSize); + + let coordinate = features[0].geometry.coordinates[0][0]; + if (coordinate) { + if (coordinate instanceof Array) { + let coordinate_ = coordinate[0]; + if (Math.abs(coordinate_[0]) > 180) { + state.isProjection = true; + } else { + state.isProjection = false; + } + } else { + if (Math.abs(coordinate[0]) > 180) { + state.isProjection = true; + } else { + state.isProjection = false; + } + } + } + } + ); +} + +// 点选查询 +function clickQuery() { + if (state.isClickQuery) { + if (handler) { + handler.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); //移除事件 + handler.destroy(); + handler = null; + } + message.success($t("clickQueryClose")); + state.isClickQuery = false; + + // 恢复鼠标样式 + window.viewer.enableCursorStyle = true; + document.body.classList.remove("drawCur"); + state.shadowRadioShow = false; + viewer.scene.postRender.removeEventListener(setBablePosition); + return; + } + message.success($t("clickQueryCloseTip")); + state.isClickQuery = true; + + // 修改鼠标样式 + window.viewer.enableCursorStyle = false; + window.viewer._element.style.cursor = ""; + document.body.classList.add("drawCur"); + + // 每一帧都去计算气泡的正确位置 + viewer.scene.postRender.addEventListener(setBablePosition); + + handler = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); + handler.setInputAction(function (event) { + viewer.entities.removeAll(); + + let position = viewer.scene.pickPosition(event.position); + let position2 = CartesiantoDegrees(position); + state.scenePosition = position; // 气泡位置 + + let point = L.marker([position2[1], position2[0]]); // SuperMap3D和leaflet这里对调了 + + // 如果是投影坐标系对geometry进行坐标转换 + let geometry: any = undefined; + if (state.isProjection) { + geometry = L.supermap.Util.transform( + point, + L.CRS.EPSG4326, + L.CRS.EPSG3857 + ); + } else { + geometry = point; + } + let geometryParam = new L.supermap.GetFeaturesByGeometryParameters({ + datasetNames: [state.datasetName], + geometry: geometry, + spatialQueryMode: "INTERSECT", + }); + + new L.supermap.FeatureService(state.dataUrl).getFeaturesByGeometry( + geometryParam, + function (serviceResult) { + if (window.iEarthConsole) { + console.log("点选查询:", serviceResult); + } + if (!serviceResult.result.features) return; + let features = serviceResult.result?.features?.features; + if (features.length == 0) { + message.success($t("noData")); + return; + } + state.shadowRadioShow = true; + state.currentFeature = features[0]; + addFeature(features[0]); + getModelInfo(features[0]); + let mediaURL: any; + if (state.currentFeature.properties) { + state.currentFeatureID = state.currentFeature.id; + mediaURL = state.currentFeature.properties[state.selectMediaFeild]; + } + let customUrl = getCustomMediaUrl(state.currentFeature); + if (customUrl) { + state.mediaUrl = customUrl; + } else { + state.mediaUrl = mediaURL; + } + if (window.iEarthConsole) { + console.log("媒体链接-mediaUrl:", state.mediaUrl); + } + // 自定义媒体连接地址 + if (state.mediaType == "video") { + let videoDom: any = document.getElementById("videoDom"); + videoDom.src = state.mediaUrl; + videoDom.load(); + // videoDom.play(); + } + } + ); + }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); + handler.setInputAction(() => { + clickQuery(); + // queryAll(); + state.showQueryTable = true; + if (state.mediaType == "video") { + let videoDom: any = document.getElementById("videoDom"); + if (videoDom) videoDom.pause(); + } + }, SuperMap3D.ScreenSpaceEventType.RIGHT_CLICK); +} + +function getCustomMediaUrl(feature: any) { + let featureID = String(feature.id); + let customMediaUrl: any; + if (layerStore.mediaFeildOptions[state.mediaType][featureID]) { + customMediaUrl = + layerStore.mediaFeildOptions[state.mediaType][featureID][ + state.selectMediaFeild + ]; + } else { + customMediaUrl = undefined; + } + return customMediaUrl; +} + +//笛卡尔转经纬度 +function CartesiantoDegrees(Cartesians) { + let array = [].concat(Cartesians); + let positions: any = []; + for (let i = 0, len = array.length; i < len; i++) { + let cartographic = SuperMap3D.Cartographic.fromCartesian(array[i]); + let longitude = Number(SuperMap3D.Math.toDegrees(cartographic.longitude)); + let latitude = Number(SuperMap3D.Math.toDegrees(cartographic.latitude)); + let h = Number(cartographic.height); + if ( + positions.indexOf(longitude) == -1 && + positions.indexOf(latitude) == -1 + ) { + positions.push(longitude); + positions.push(latitude); + positions.push(h); + } + } + return positions; +} + +// 点击拾取实体,获取属性信息 +function getModelInfo(feature: any) { + if (window.iEarthConsole) { + console.log("click-feature:", feature); + } + if (feature) { + let properties = feature.properties; + state.shadowRadioShow = true; + let list: any = []; + for (let key in properties) { + let value = String(properties[key]); + list.push({ + lable: key, + value: value, + }); + } + state.modelInfo = list; + } else { + state.shadowRadioShow = false; + message.success($t("noData")); + } +} + +// 获取已绑定的图层查询信息 +function setQueryInfo() { + if (layerStore.mapQueryOptions.length > 0) { + let targetLayerLable = targerMapLayer.label; + let targetItem = layerStore.mapQueryOptions.filter( + (item) => item.label == targetLayerLable + ); + if (targetItem.length > 0) { + state.dataUrl = targetItem[0].dataUrl; + state.datasetName = targetItem[0].datasetName; + } + } +} + +// 媒体字段相关 +function openMediaField() { + state.mediaFieldPanleShow = true; + state.isCustomMediaUrl = false; +} + +// 清除 +function clear(isClearInfo = true) { + // 删除添加的geojson数据源 + for (let i = 0; i < geoJsonDataSourceList.length; i++) { + let geoJsonDataSource = geoJsonDataSourceList[i]; + viewer.dataSources.remove(geoJsonDataSource); + } + geoJsonDataSourceList = []; + state.showQueryTable = false; + if (handler) { + handler.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); //移除事件 + handler.destroy(); + handler = null; + } + if (isClearInfo) { + state.dataUrl = ""; + state.datasetName = ""; + } + state.columns = []; + state.tableData = []; + state.itemCount = 0; + state.isloading = false; + state.isloading_table = false; + state.isloading_mydata = false; + state.isProjection = false; + state.sqlString = ""; + state.isMydate = false; + + columns.value.length = 0; + columns.value.push({ + type: "selection", + multiple: false, + align: "center", + }); + + viewer.entities.removeAll(); + + // 恢复鼠标样式 + window.viewer.enableCursorStyle = true; + document.body.classList.remove("drawCur"); +} + +// 关闭弹窗 +function closebable() { + state.shadowRadioShow = false; + if (state.mediaType == "video") { + let videoDom: any = document.getElementById("videoDom"); + if (videoDom) videoDom.pause(); + } +} + +// 清除实体 +function clearEntity() { + // 删除添加的geojson数据源 + for (let i = 0; i < geoJsonDataSourceList.length; i++) { + let geoJsonDataSource = geoJsonDataSourceList[i]; + viewer.dataSources.remove(geoJsonDataSource); + } + geoJsonDataSourceList = []; + viewer.entities.removeAll(); +} + +// 表格相关 +// 更新表格 +function updateTable(features: any[]) { + // 初始化 + state.tableData = []; + + if (columns.value.length === 1) { + if (features.length < 1) return; + + // 设置字段 + let keys = Object.keys(features[0].properties); + keys.forEach((key: string) => { + columns.value.push({ + // resizable: true, // 列宽可拖拽 + key: key, + title: key, + align: "center", + width: 100, + ellipsis: { + tooltip: true, + }, + }); + + // 媒体字段 + state.mediaFeilds.push({ + label: key, + value: key, + }); + }); + } + + // 设置数据 + let tableData: any = []; + features.forEach((feature: any) => { + feature.properties.key = feature.properties.SMID; + tableData.push(feature.properties); + }); + state.tableData = tableData; + state.showQueryTable = true; +} + +// 选中行查询 +function handleCheck(rowKeys: any) { + viewer.entities.removeAll(); + // 数据集ID查询服务参数 + let idsParam = new L.supermap.GetFeaturesByIDsParameters({ + IDs: rowKeys, + datasetNames: [state.datasetName], + }); + // 创建指定ID查询实例 + new L.supermap.FeatureService(state.dataUrl).getFeaturesByIDs( + idsParam, + function (serviceResult) { + // 获取服务器返回的结果 + if (window.iEarthConsole) { + console.log("选中行查询结果:", serviceResult.result); + } + let feature = serviceResult.result.features.features[0]; + addFeature(feature); + state.currentFeature = feature; + state.currentFeatureID = state.currentFeature.id; + } + ); +} + +// 通过GeoJsonDataSource.load直接添加feature +let geoJsonDataSourceList: any = []; +function addFeature(feature: any) { + if (geoJsonDataSourceList.length > 0 && !state.isMydate) { + let lastGeoJsonDataSource = geoJsonDataSourceList.pop(); + viewer.dataSources.remove(lastGeoJsonDataSource); + } + if (!feature) return; + if (state.isProjection) { + // feature = GeoJsonProjectToLatLng(feature); // 我自己实现的方法 + feature = L.supermap.Util.transform( + feature, + L.CRS.EPSG3857, + L.CRS.EPSG4326 + ); // supermap写的 + if (!feature) return; + } + let entityPromise = SuperMap3D.GeoJsonDataSource.load(feature); + entityPromise + .then(function (dataSource: any) { + geoJsonDataSourceList.push(dataSource); + viewer.dataSources.add(dataSource); + let entities = dataSource.entities.values; + viewer.zoomTo(entities[0]); + for (let i = 0; i < entities.length; i++) { + let entity = entities[i]; + if (!entity.polygon) { + return; + } + entity.polygon.material = SuperMap3D.Color.BLUE.withAlpha(0); // 闪面 + entity.polygon.heightReference = + SuperMap3D.HeightReference.CLAMP_TO_GROUND; // 贴地 + // entity.polygon.outlineColor = SuperMap3D.Color.BLUE; // 轮廓颜色 + // entity.polygon.outlineWidth = 10; // 轮廓宽度 + } + // viewer.zoomTo(entities[0]); + }) + .otherwise(function (error) { + window.alert(error); + }); +} + +// 将feature投影坐标系转为经纬度形式 +/** +function GeoJsonProjectToLatLng(feature: any) { + let leafletLayer = L.geoJSON(feature, { + coordsToLatLng: function (coords: any) { + return L.CRS.EPSG3857.unproject(L.point(coords[0], coords[1])); + }, + }); + if (leafletLayer._layers) { + let keys = Object.keys(leafletLayer._layers); + let key = keys[0]; + let layerLatlngs: any; + if ((layerLatlngs = leafletLayer._layers[key]._latlngs)) { + layerLatlngs = leafletLayer._layers[key]._latlngs[0]; + } else { + return undefined; + } + + let allArray: any = []; + for (let i = 0; i < layerLatlngs.length; i++) { + let layerLatlng = layerLatlngs[i]; + let array: any = []; + layerLatlng.forEach((element: any) => { + array.push([element.lng, element.lat]); + }); + allArray.push(array); + } + feature.geometry.coordinates = [allArray]; + } else { + return undefined; + } + + return feature; +} + */ + +// 保存媒体字段 +function saveMediaField() { + state.mediaFieldPanleShow = false; + if ( + state.currentFeatureID != "" && + state.selectMediaFeild != "" && + state.isCustomMediaUrl + ) { + let obj = {}; + let key: string = String(state.currentFeatureID); + obj[state.selectMediaFeild] = state.mediaUrl; + + if (!layerStore.mediaFeildOptions[state.mediaType][key]) { + layerStore.mediaFeildOptions[state.mediaType][key] = obj; + } else { + let objConnect = Object.assign( + {}, + layerStore.mediaFeildOptions[state.mediaType][key], + obj + ); + layerStore.mediaFeildOptions[state.mediaType][key] = objConnect; + } + } + state.isCustomMediaUrl = false; + message.success($t("bingMediaFieldSuccessTip")); +} + +// 清除媒体字段 +function clearMediaField() { + state.mediaTitle = ""; + state.mediaUrl = ""; + state.selectMediaFeild = "SMID"; +} + +// 表格列 +const columns: any = ref([ + { + type: "selection", + multiple: false, + align: "center", + }, +]); + +// sql模糊查找 +function search() { + message.success($t("dataFiltering")); + state.isloading = true; + state.page = 1; + let sqlString = `${state.selectFiled} like '%${state.sqlString}%'`; + if (window.iEarthConsole) { + console.log("sqlString:", sqlString); + } + let sqlParam = new L.supermap.GetFeaturesBySQLParameters({ + queryParameter: { + attributeFilter: sqlString, + }, + fromIndex: 0, + toIndex: 10, + datasetNames: [state.datasetName], + }); + // 创建SQL查询实例 + new L.supermap.FeatureService(state.dataUrl).getFeaturesBySQL( + sqlParam, + function (serviceResult) { + // 获取服务器返回的结果 + let result = serviceResult.result; + if (window.iEarthConsole) { + console.log("sqlQuery:", result); + } + let features: any = result.features.features; + let features_pageSize = features.slice(0, 10); + state.itemCount = result.totalCount; + state.isFilter = true; + state.isloading = false; + updateTable(features_pageSize); + } + ); +} + +// 分页查找 +function getDataByPage(pageNum) { + // 指定SQL查询服务参数 + // let start = (pageNum - 1) * 10; + // let end = (pageNum - 1) * 10 + 10; + let sqlString: string; + if (state.isFilter) { + sqlString = `${state.selectFiled} like '%${state.sqlString}%' limit ${ + (state.page - 1) * 10 + },10`; + } else { + sqlString = `SMID > 0 limit ${(pageNum - 1) * 10},10`; // 'SMID > ${start} and SMID <= ${end}' + } + + if (window.iEarthConsole) { + console.log("分页-sqlString:", sqlString); + } + + let sqlParam = new L.supermap.GetFeaturesBySQLParameters({ + queryParameter: { + attributeFilter: sqlString, + }, + fromIndex: 0, + toIndex: 10, + datasetNames: [state.datasetName], + }); + // 创建SQL查询实例 + new L.supermap.FeatureService(state.dataUrl).getFeaturesBySQL( + sqlParam, + function (serviceResult) { + // 获取服务器返回的结果 + let result = serviceResult.result; + let features: any = result.features.features; + if (window.iEarthConsole) { + console.log("分页-features:", features); + } + updateTable(features); + } + ); +} + +// 页码变化事件 +function onPageChange(page: number) { + state.page = page; + getDataByPage(page); +} +// 页码尺寸变化 +function onUpdatePageSize(pageSize: number) { + state.pageSize = pageSize; + state.page = 1; +} + +let tableCount = computed(() => { + return state.itemCount; +}); + +// 我的数据 +function openMydata() { + init_mydata(); + state.myDataPanleShow = true; + message.success($t("getData")); + state.isMydate = true; +} + +// 初始化并获取数据 +function init_mydata() { + //查询出portal中的服务列表(只查询出服务项) + let myDataUrl = + getRootUrl() + + "web/datas.json?types=%5B%22JSON%22%2C%22EXCEL%22%2C%22CSV%22%2C%22GEOJSON%22%2C%22SHP%22%5D&orderBy=LASTMODIFIEDTIME&orderType=DESC¤tPage=1&pageSize=8"; + // http://localhost:8190/iportal/web/datas.json?types=%5B%22JSON%22%2C%22EXCEL%22%2C%22CSV%22%2C%22GEOJSON%22%2C%22SHP%22%5D&orderBy=LASTMODIFIEDTIME&orderType=DESC¤tPage=1&pageSize=8 + // http://localhost:8190/iportal/web/datas/632566313/content.json?¤tPage=1&pageSize=99999999 + + if (window.iEarthConsole) { + console.log("myDataUrl-mine:", myDataUrl); + } + + window.axios + .get(myDataUrl, { withCredentials: IportalStore.isPortal }) + .then(function (response) { + if (window.iEarthConsole) { + console.log("response-myData:", response); + } + let data = response.data.content; + data.forEach((item) => { + let disabled = item.type != "SHP"; //是否禁用选择 + let name = item.fileName.split(".")[0]; + state.portalServiceList_mydata.push({ + key: item.id, + fileName: name, + id: item.id, + type: item.type, + createTime: dateDiff(item.createTime), + disabled: disabled, + }); + }); + if (window.iEarthConsole) { + console.log("state.portalServiceList:", state.portalServiceList_mydata); + } + }); +} + +// 打开保存的服务 +function addShp_mydata() { + let selecteditems = state.portalServiceList_mydata.filter((item: any) => { + return item.key === state.checkedRowKeys_mydata[0]; + }); + if (viewer) { + selecteditems.forEach((item) => { + if (window.iEarthConsole) { + console.log("item-mydataSelect:", item); + } + + let resouceID = item.id; + let resouceUrl = + getRootUrl() + + `web/datas/${resouceID}/content.json?¤tPage=1&pageSize=99999999`; + if (window.iEarthConsole) { + console.log("resouceUrl:", resouceUrl); + } + state.isloading_mydata = true; + + window.axios + .get(resouceUrl, { withCredentials: IportalStore.isPortal }) + .then(function (responseData) { + state.isloading_mydata = false; + let contentShp = JSON.parse(responseData.data.content); + if (window.iEarthConsole) { + console.log("contentShp:", contentShp); + } + + let firstFeature = contentShp.layers[0].features[0]; + let polygonPositions: any = []; + let positions = firstFeature.geometry.coordinates[0][0]; + positions.forEach((position: any) => { + polygonPositions.push(position[0]); + polygonPositions.push(position[1]); + }); + + let entity = viewer.entities.add({ + polygon: { + hierarchy: + SuperMap3D.Cartesian3.fromDegreesArray(polygonPositions), + material: SuperMap3D.Color.BLUE, + }, + }); + + viewer.zoomTo(entity); + state.myDataPanleShow = false; + let positions_reverse = positions.map((arr) => arr.reverse()); // 数组倒置,因为leaflet经纬度和xy相反 + let polygon = L.polygon(positions_reverse, { color: "red" }); + let geometry_mydata: any = undefined; + if (state.isProjection) { + geometry_mydata = L.supermap.Util.transform( + polygon, + L.CRS.EPSG4326, + L.CRS.EPSG3857 + ); + } else { + geometry_mydata = polygon; + } + let geometryParam = new L.supermap.GetFeaturesByGeometryParameters({ + datasetNames: [state.datasetName], + geometry: geometry_mydata, + spatialQueryMode: "INTERSECT", + }); + + new L.supermap.FeatureService(state.dataUrl).getFeaturesByGeometry( + geometryParam, + function (serviceResult) { + if (window.iEarthConsole) { + console.log("指定数据几何查询:", serviceResult); + } + let features = serviceResult.result.features.features; + updateTable(features); + state.itemCount = features.length; + features.forEach((feature: any) => { + addFeature(feature); + }); + } + ); + }); + }); + } +} + +// 取消 +function cancle_mydata() { + state.checkedRowKeys_mydata = ["1"]; + state.myDataPanleShow = false; + state.isloading_mydata = false; +} + +// 表格相关 +const pagination_mydata = reactive({ + page: 1, + pageSize: 10, + showSizePicker: true, + pageSizes: [10, 15, 20, 25, 30], + onChange: (page: number) => { + pagination_mydata.page = page; + }, + onUpdatePageSize: (pageSize: number) => { + pagination_mydata.pageSize = pageSize; + pagination_mydata.page = 1; + }, +}); + +/** 时间倒序,多少小时之前 + * @param timestamp 时间毫秒数 + */ +function dateDiff(timestamp) { + // 补全为13位 + let arrTimestamp: any = (timestamp + "").split(""); + for (let start = 0; start < 13; start++) { + if (!arrTimestamp[start]) { + arrTimestamp[start] = "0"; + } + } + timestamp = arrTimestamp.join("") * 1; + let minute = 1000 * 60; + let hour = minute * 60; + let day = hour * 24; + // let halfamonth = day * 15; + let month = day * 30; + let now = new Date().getTime(); + let diffValue = now - timestamp; + + // 如果本地时间反而小于变量时间 + if (diffValue < 0) { + return $t("recently"); + } + // 计算差异时间的量级 + let monthC: any = diffValue / month; + let weekC: any = diffValue / (7 * day); + let dayC: any = diffValue / day; + let hourC: any = diffValue / hour; + let minC: any = diffValue / minute; + + // 数值补0方法 + let zero = function (value) { + if (value < 10) { + return "0" + value; + } + return value; + }; + + // 使用 + if (monthC > 4) { + // 超过1年,直接显示年月日 + return (function () { + let date = new Date(timestamp); + return ( + date.getFullYear() + + $t("yeear") + + zero(date.getMonth() + 1) + + $t("month") + + zero(date.getDate()) + + $t("day") + ); + })(); + } else if (monthC >= 1) { + return parseInt(monthC) + $t("monthsAgo"); + } else if (weekC >= 1) { + return parseInt(weekC) + $t("weeksAgo"); + } else if (dayC >= 1) { + return parseInt(dayC) + $t("daysAgo"); + } else if (hourC >= 1) { + return parseInt(hourC) + $t("hoursAgo"); + } else if (minC >= 1) { + return parseInt(minC) + $t("minutesAgo"); + } + return $t("secondsAgo"); +} + +watch( + () => state.checkedRowKeys, + (val) => { + handleCheck(val); + } +); + +watch( + () => state.datasetName, + () => { + state.isChangeDataSet = true; + } +); + +watch( + () => state.mediaType, + () => { + state.mediaTitle = ""; + state.mediaUrl = ""; + } +); + +watch( + columns, + (newValue) => { + state.mediaFeilds = []; + for (let i = 0; i < newValue.length; i++) { + let item = newValue[i]; + let obj = { + label: item.key, + value: item.key, + }; + state.mediaFeilds.push(obj); + } + }, + { immediate: true } +); + +watch( + () => state.isCustomMediaUrl, + (val) => { + if (!state.currentFeature) { + state.mediaUrl = ""; + return; + } + let currentSaveMediaUrl = getCustomMediaUrl(state.currentFeature); + if (window.iEarthConsole) { + console.log("当前保存的媒体链接:", currentSaveMediaUrl); + } + if (currentSaveMediaUrl && val) { + state.mediaUrl = currentSaveMediaUrl; + } else { + state.mediaUrl = ""; + } + } +); + +watch( + () => state.selectMediaFeild, + () => { + if (!state.currentFeature) { + state.mediaUrl = ""; + return; + } + let currentSaveMediaUrl = getCustomMediaUrl(state.currentFeature); + if (window.iEarthConsole) { + console.log("当前保存的媒体链接:", currentSaveMediaUrl); + } + if (currentSaveMediaUrl && state.isCustomMediaUrl) { + state.mediaUrl = currentSaveMediaUrl; + } else { + state.mediaUrl = ""; + } + } +); +</script> + +<style lang="scss" scoped> +.oprationBtn { + margin-left: 30%; + display: flex; + flex-wrap: wrap; +} + +.oprationBtn_loading { + margin-top: 0.1rem; + margin-left: 68%; + display: flex; + flex-wrap: wrap; +} + +.oprationBtn_noloading { + margin-top: 0.1rem; + margin-left: 69%; + display: flex; + flex-wrap: wrap; +} + +.tableInfo { + text-align: center; + margin-left: 0.2rem; +} + +.tableHeader { + display: flex; + justify-content: space-between; + align-items: center; + line-height: 0.4rem; + width: 100%; + + .items { + line-height: 0.35rem; + } + + .search { + margin-top: 0.1rem; + margin-right: -4rem; + } +} + +.opration { + margin-top: 0.1rem; + margin-left: 73%; +} + +.tip { + color: "#3499E5"; + background-color: null; +} + +.pagination { + display: flex; + justify-content: space-between; +} + +.flex-1-hidden { + flex: 1 1 0% !important; + overflow: hidden; +} + +:deep(.too-old td) { + color: rgba(255, 0, 0, 0.75) !important; +} + +:deep(.age) { + color: rgba(0, 128, 0, 0.75) !important; +} + +:deep(.too-old .age) { + color: rgba(0, 0, 128, 0.75) !important; +} + +.icon-list-box { + display: flex; + width: 2.2rem; + height: auto; + margin-left: 0.4rem; + + .icon-span { + width: 20%; + display: inline-block; + text-align: center; + cursor: pointer; + } + + .icon-span-three { + width: 25%; + display: inline-block; + text-align: center; + cursor: pointer; + } + + .selected-icon { + color: #3499e5; + } +} + +// 弹窗 +.bableShadow { + position: fixed; + top: 2rem; + left: 5rem; + background-color: #383838; + opacity: 0.9; + z-index: 200000; + height: 4.5rem; + width: 3rem; + + .bable-container { + overflow-y: scroll; + @include setsSrollbar(); + } + + .shadow-anaylse-pop-titie { + margin-left: 0.12rem; + font-size: 0.12rem; + line-height: 0.2rem; + } + + .mediaContainer { + display: flex; + justify-content: center; + } + + span { + font-size: 0.12rem; + } + + .bableMedia { + width: 80%; + height: auto; + } +} + +// 媒体字段图标 删不了 +// .n-dialog.n-dialog--icon-left .n-dialog__icon { +// display: none !important; +// } + +#queryTable { + position: fixed; + bottom: 0rem; + left: 5%; + width: 90%; + height: 3rem; + z-index: 999999; + background-color: rgb(29, 29, 17); + opacity: 0.8; + padding: 0.1rem; + + display: flex; + flex-direction: column; +} + +#myDataTable { + margin-right: 0.1rem; + height: 2.3rem; + z-index: 999999; + background-color: rgb(29, 29, 17); + opacity: 0.5; + + display: flex; + flex-direction: column; + + .flex-1-hidden { + flex: 1 1 0% !important; + overflow: hidden; + } +} +</style> diff --git a/SuperMap iEarth/src/package/layerSeries/mapQuery/coms/column-setting.vue b/SuperMap iEarth/src/package/layerSeries/mapQuery/coms/column-setting.vue deleted file mode 100644 index bd332cee..00000000 --- a/SuperMap iEarth/src/package/layerSeries/mapQuery/coms/column-setting.vue +++ /dev/null @@ -1,9 +0,0 @@ -<template> - -</template> - -<script setup lang="ts"> - -</script> - -<style scoped></style> diff --git a/SuperMap iEarth/src/package/layerSeries/mapQuery/index.ts b/SuperMap iEarth/src/package/layerSeries/mapQuery/index.ts deleted file mode 100644 index 78b1683f..00000000 --- a/SuperMap iEarth/src/package/layerSeries/mapQuery/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import MapQuery from './index.vue'; - -export default MapQuery; diff --git a/SuperMap iEarth/src/package/layerSeries/mapQuery/index.vue b/SuperMap iEarth/src/package/layerSeries/mapQuery/index.vue deleted file mode 100644 index c0eecd0f..00000000 --- a/SuperMap iEarth/src/package/layerSeries/mapQuery/index.vue +++ /dev/null @@ -1,1100 +0,0 @@ -<template> - <div class="layerSeries-box"> - - <!-- 打开面板 --> - <div class="row-item" style="margin-bottom: 0.1rem"> - <span>{{$t('global.mapDataUrl')}}</span> - <n-tooltip placement="top-end" trigger="hover"> - <template #trigger> - <n-input class="add-input-border" style="width: 2.2rem" v-model:value="state.dataUrl" type="text" - :placeholder="$t('global.inputServerUrl')" /> - </template> - {{ state.dataUrlTip }} - </n-tooltip> - </div> - <div class="row-item" style="margin-bottom: 0.1rem"> - <span>{{$t('global.datasetName')}}</span> - <n-input class="add-input-border" style="width: 2.2rem" v-model:value="state.datasetName" type="text" - :placeholder="$t('global.inputSourceName')" /> - </div> - - <div class=" oprationBtn"> - <n-button type="info" color="#3499E5" text-color="#fff" :loading="state.isloading_table" @click="startQuery" - style="margin-right: 0.1rem">{{$t('global.attributeList')}}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{ $t('global.clear') - }}</n-button> - </div> - - <!-- 表格 - 操作面板 --> - <div id="queryTable" v-if="state.showQueryTable"> - <!-- 表头 --> - <div class="tableHeader"> - <div class="item tableInfo">{{ state.datasetName }}{{$t('global.listTotal_s')}} {{ tableCount }} {{$t('global.listTotal_e')}}</div> - - <!-- 过滤框 --> - <div class="item search"> - <n-input-group> - <n-input class="add-input-border" style=" margin-bottom: 0.1rem;width: 1.8rem" - :placeholder="state.queryPlaceHolder" v-model:value="state.sqlString" - :disabled="state.selectFiled === 'chooseFeild'"> - </n-input> - <n-popover placement="bottom" trigger="click" style="max-height: 240px" scrollable> - <template #trigger> - <n-tooltip placement="top-end" trigger="hover"> - <template #trigger> - <n-button type="tertiary">{{ state.selectFiled == 'chooseFeild' ? state.chooseField : state.selectFiled}}</n-button> - </template> - {{$t('global.chooseFieldTip')}} - </n-tooltip> - </template> - <n-radio-group v-model:value="state.selectFiled" name="radiogroup"> - <n-space vertical> - <n-radio v-for="song in columns" :key="song.title" :value="song.title"> - {{ song.title }} - </n-radio> - </n-space> - </n-radio-group> - </n-popover> - <n-button :loading="state.isloading" @click="search" - :disabled="state.selectFiled === 'chooseFeild'">{{$t('global.filter')}}</n-button> - </n-input-group> - </div> - - <!-- 操作按钮 --> - <div class="items"> - <div class="icon-list-box" style="width: 2.2rem;"> - <!-- 字段筛选 --> - - <span class="icon-span-three"> - <n-tooltip placement="top-end" trigger="hover"> - <template #trigger> - <i class="iconfont iconSize iconshpchaxun" - @click="openMydata"></i> - </template> - {{$t('global.shpQueryTip')}} - </n-tooltip> - </span> - <span class="icon-span-three"> - <n-tooltip placement="top-end" trigger="hover"> - <template #trigger> - <i class="iconfont iconSize icondianxuan" @click="clickQuery"></i> - </template> - {{$t('global.clickQuery')}} - </n-tooltip> - </span> - <span class="icon-span-three"> - <n-tooltip placement="top-end" trigger="hover"> - <template #trigger> - <i class="iconfont iconSize iconshanchu" @click="clearEntity"></i> - </template> - {{$t('global.clearEntityTip')}} - </n-tooltip> - </span> - <span class="icon-span-three"> - <n-tooltip placement="top-end" trigger="hover"> - <template #trigger> - <i class="iconfont iconSize iconshuaxin" @click="queryAll"></i> - </template> - {{$t('global.refreshData')}} - </n-tooltip> - </span> - <span class="icon-span-three"> - <n-tooltip placement="top-end" trigger="hover"> - <template #trigger> - <i class="iconfont iconSize iconguanbi" @click="state.showQueryTable = false"></i> - </template> - {{$t('global.close')}} - </n-tooltip> - </span> - </div> - </div> - </div> - - <!--表格数据 --> - <n-data-table size="small" :columns="columns" :data="state.tableData" flex-height class="flex-1-hidden" - v-model:checked-row-keys="state.checkedRowKeys" :scroll-x="columns.length * 110" /> - <!-- 页码控制器 --> - <div class="pagination"> - <div></div> - <n-pagination :item-count="state.itemCount" :page-sizes="[10, 20, 30, 40]" :page="state.page" - :page-size="state.pageSize" @update:page="onPageChange" @update:page-size="onUpdatePageSize" /> - </div> - - <!-- show-size-picker --> - <!-- :pagination="pagination" --> - <!-- :row-class-name="rowClassName" --> - <!-- @update:checked-row-keys="handleCheck" --> - <!-- v-model:checked-row-keys="state.checkedRowKeys" --> - </div> - - <!-- 我的数据面板 --> - <div v-if="state.myDataPanleShow"> - <!-- <myDataPanel v-model:queryInfo="queryInfo"></myDataPanel> --> - <n-modal v-model:show="state.myDataPanleShow"> - <n-card style="width: 600px" title="My Data" :bordered="false" size="huge" role="dialog" aria-modal="true"> - <div id="myDataTable"> - <n-data-table size="small" :columns="state.columns_mydata" :data="state.portalServiceList_mydata" :pagination="pagination_mydata" - flex-height class="flex-1-hidden" v-model:checked-row-keys="state.checkedRowKeys_mydata" /> - </div> - <div :class="{oprationBtn_noloading:!state.isloading_mydata,oprationBtn_loading:state.isloading_mydata}"> - <n-button type="info" color="#3499E5" text-color="#fff" :loading="state.isloading_mydata" @click="addShp_mydata" - style="margin-right: 0.1rem">{{$t('global.sure')}}</n-button> - <n-button class="btn-secondary" @click="cancle_mydata" color="rgba(255, 255, 255, 0.65)" ghost>{{ $t('global.cancle') - }}</n-button> - </div> - </n-card> - </n-modal> - </div> - </div> -</template> - -<script setup lang="ts"> -import { ref,reactive, onBeforeUnmount, watch, computed } from "vue"; -import { useLayerStore } from "@/store/layerStore"; -import { useMessage } from "naive-ui"; -import { getRootUrl} from "@/tools/iportal/portalTools"; -import { IportalStoreCreate } from "@/store/index"; - -const message = useMessage(); - -const IportalStore = IportalStoreCreate(); -const layerStore = useLayerStore(); - -type StateType = { - selectedIndex: number, //默认选择图层index - dataUrl: string, - datasetName: string, - columns: any, - tableData: any, - checkedRowKeys: any, - showQueryTable: boolean, - page: number, - pageSize: number, - sqlString: string, - selectFiled: string, - queryPlaceHolder: string, - itemCount: number, - isFilter: boolean, - myDataPanleShow: boolean, - isClickQuery: boolean, - isChangeDataSet: boolean, - dataUrlTip: string, - isloading: boolean, - isloading_table: boolean, - isProjection:boolean - portalServiceList_mydata: any, - columns_mydata: any, - tableData_mydata: any, - checkedRowKeys_mydata: any - isMydate:boolean - isloading_mydata:boolean, - chooseField:string, -} - -// 初始化数据 -let state = reactive<StateType>({ - selectedIndex: 0, //默认选择图层index - // dataUrl: 'https://iserver.supermap.io/iserver/services/data-world/rest/data', - // datasetName: "World:Countries", - // dataUrl: 'http://172.16.15.203:8090/iserver/services/data-China400/rest/data', - // datasetName: "China:China", - // dataUrl: "http://172.16.15.203:8090/iserver/services/data-80wtuban/rest/data", - // datasetName: "DLTB80w:DLTB_1", // 80多万 - // dataUrl: "http://127.0.0.1:8090/iserver/services/data-mapqueryProjection/rest/data", - // datasetName: "0830:NewDataset", - dataUrl: "", - datasetName: "", - - // 表格 点选 - columns: [], - tableData: [], - checkedRowKeys: ["1"], - showQueryTable: false, - page: 1, - pageSize: 10, - sqlString: "", - selectFiled: 'chooseFeild', - queryPlaceHolder: GlobalLang.queryPlaceHolder, - itemCount: 0, - isFilter: false, - myDataPanleShow: false, - isClickQuery: false, - isChangeDataSet: false, - - // 输入提示 - dataUrlTip: `http://<server>:<port>/iserver/services/{dataProvider}/rest/data`, - isloading: false, - isloading_table: false, - isProjection:false, - - // 我的数据 - isMydate:false, - portalServiceList_mydata: [], - columns_mydata: [ - { - type: 'selection', - multiple: false, - align: 'center', - disabled: (rowdata) => { - return rowdata.disabled ? true : false; - } - }, - { - key: "fileName", - title: GlobalLang.resouceName, - align: 'center' - }, - { - key: "id", - title: "ID", - align: 'center', - }, - { - key: "type", - title: GlobalLang.resouceType, - align: 'center' - }, - { - key: "createTime", - title: GlobalLang.createTime, - align: 'center' - } - ], - tableData_mydata: [], - checkedRowKeys_mydata: ["1"], - isloading_mydata:false, - chooseField:GlobalLang.chooseField, -}); - -let handler; -let targerMapLayer; - -function init() { - state.selectedIndex = Number(layerStore.s3mLayerSelectIndex); - targerMapLayer = layerStore.layerTreeData[1].children[state.selectedIndex]; - // 获取图层绑定的数据源信息 - setQueryInfo(); -} -init(); - -// 获取数据-第一页 -function startQuery() { - if (state.dataUrl == '' || state.datasetName == '') { - message.error(GlobalLang.mapQueryTip); - return; - } - - if (state.tableData.length > 0 && !state.isChangeDataSet) { - state.showQueryTable = true; - return; - } - - clear(false); - state.selectFiled = 'chooseFeild'; - state.isloading_table = true; - state.isFilter = false; - state.isChangeDataSet = false; - - // // // state.isMydate = false; - // if (state.isChangeDataSet) { - // state.tableData.length = 0; - // state.showQueryTable = false; - // } - - - // 查询数据 - queryAll(); - - let item = layerStore.mapQueryOptions.filter(item => item.label == targerMapLayer.label); - if (item.length === 0) { - // 保存数据源信息 - let obj = { - label: targerMapLayer.label, - dataUrl: state.dataUrl, - datasetName: state.datasetName - } - layerStore.mapQueryOptions.push(obj); - } -} - -// 刷新表格 -function queryAll(){ - if(state.itemCount === 0){ - message.success(GlobalLang.queryWait); - }else{ - message.success(GlobalLang.refreshData); - } - - // 指定SQL查询服务参数 - let sqlParam = new L.supermap.GetFeaturesBySQLParameters({ - queryParameter: { - // name: "Countries@World", // 非必选项 - attributeFilter: "SMID > 0" - }, - fromIndex: 0, - toIndex: 10, // 设置为10,加快查询速度 - datasetNames: [state.datasetName] - }); - // 创建SQL查询实例 - new L.supermap.FeatureService(state.dataUrl).getFeaturesBySQL(sqlParam, function (serviceResult) { - // 获取服务器返回的结果 - let result = serviceResult.result; - console.log("result-all:", result); - let features: any = result.features.features; - state.itemCount = result.totalCount; - let features_pageSize = features.slice(0, 10); - state.isloading_table = false; - updateTable(features_pageSize); - - let coordinate = features[0].geometry.coordinates[0][0]; - if(coordinate){ - if(coordinate instanceof Array){ - let coordinate_ = coordinate[0]; - if(Math.abs(coordinate_[0]) > 180){ - state.isProjection = true; - }else{ - state.isProjection = false; - } - }else{ - if(Math.abs(coordinate[0]) > 180){ - state.isProjection = true; - }else{ - state.isProjection = false; - } - } - - } - }); -} - -// 点选查询 -function clickQuery() { - if (state.isClickQuery) { - if (handler) { - handler.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK)//移除事件 - handler.destroy(); - handler = null; - } - message.success(GlobalLang.clickQueryClose); - state.isClickQuery = false; - - // 恢复鼠标样式 - window.viewer.enableCursorStyle = true; - document.body.classList.remove('drawCur'); - return; - } - message.success(GlobalLang.clickQueryCloseTip); - state.isClickQuery = true; - - // 修改鼠标样式 - window.viewer.enableCursorStyle = false; - window.viewer._element.style.cursor = ''; - document.body.classList.add("drawCur"); - - handler = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); - handler.setInputAction(function (event) { - viewer.entities.removeAll(); - - let position = viewer.scene.pickPosition(event.position); - let position2 = CartesiantoDegrees(position); - - let point = L.marker([position2[1], position2[0]]); // SuperMap3D和leaflet这里对调了 - - // 如果是投影坐标系对geometry进行坐标转换 - let geometry: any = undefined; - if (state.isProjection) { - geometry = L.supermap.Util.transform(point, L.CRS.EPSG4326, L.CRS.EPSG3857); - } else { - geometry = point; - } - let geometryParam = new L.supermap.GetFeaturesByGeometryParameters({ - datasetNames: [state.datasetName], - geometry: geometry, - spatialQueryMode: "INTERSECT" - }); - - new L.supermap - .FeatureService(state.dataUrl) - .getFeaturesByGeometry(geometryParam, function (serviceResult) { - console.log("点选查询:", serviceResult); - if (!serviceResult.result.features) return; - let features = serviceResult.result?.features?.features; - state.itemCount = 1; - updateTable(features); - addFeature(features[0]); - }); - - }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); - handler.setInputAction(e => { - clickQuery(); - }, SuperMap3D.ScreenSpaceEventType.RIGHT_CLICK); -} - -//笛卡尔转经纬度 -function CartesiantoDegrees(Cartesians) { - let array = [].concat(Cartesians); - let positions: any = []; - for (let i = 0, len = array.length; i < len; i++) { - let cartographic = SuperMap3D.Cartographic.fromCartesian(array[i]); - let longitude = Number(SuperMap3D.Math.toDegrees(cartographic.longitude)); - let latitude = Number(SuperMap3D.Math.toDegrees(cartographic.latitude)); - let h = Number(cartographic.height); - if (positions.indexOf(longitude) == -1 && positions.indexOf(latitude) == -1) { - positions.push(longitude); - positions.push(latitude); - positions.push(h); - } - } - return positions -}; - -// 获取已绑定的图层查询信息 -function setQueryInfo() { - if (layerStore.mapQueryOptions.length > 0) { - let targetLayerLable = targerMapLayer.label; - let targetItem = layerStore.mapQueryOptions.filter(item => item.label == targetLayerLable); - if (targetItem.length > 0) { - state.dataUrl = targetItem[0].dataUrl; - state.datasetName = targetItem[0].datasetName; - } - } -} - -// 清除 -function clear(isClearInfo = true) { - // 删除添加的geojson数据源 - for (let i = 0; i < geoJsonDataSourceList.length; i++) { - let geoJsonDataSource = geoJsonDataSourceList[i]; - viewer.dataSources.remove(geoJsonDataSource); - } - geoJsonDataSourceList = []; - state.showQueryTable = false; - if (handler) { - handler.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK)//移除事件 - handler.destroy(); - handler = null; - } - if (isClearInfo) { - state.dataUrl = ''; - state.datasetName = ''; - } - state.columns = []; - state.tableData = []; - state.itemCount = 0; - state.isloading = false; - state.isloading_table = false; - state.isloading_mydata = false; - state.isProjection = false; - state.sqlString = ''; - state.isMydate = false; - - columns.value.length = 0; - columns.value.push({ - type: 'selection', - multiple: false, - align: 'center' - }); - - viewer.entities.removeAll(); - - // 恢复鼠标样式 - window.viewer.enableCursorStyle = true; - document.body.classList.remove('drawCur'); - - // if(panelStore.queryData.length>0){ - // viewer.dataSources.removeAll(); - // } -} - -function clearEntity() { - // 删除添加的geojson数据源 - for (let i = 0; i < geoJsonDataSourceList.length; i++) { - let geoJsonDataSource = geoJsonDataSourceList[i]; - viewer.dataSources.remove(geoJsonDataSource); - } - geoJsonDataSourceList = []; - viewer.entities.removeAll(); -} - -// 表格相关 -// 更新表格 -function updateTable(features: any[]) { - // 初始化 - state.tableData = []; - - if (columns.value.length === 1) { - if (features.length < 1) return; - - // 设置字段 - let keys = Object.keys(features[0].properties); - keys.forEach((key: string) => { - // if (['SMAREA', 'SMPERIMETER', 'SMGEOPARAM'].indexOf(key) == -1) { - columns.value.push({ - key: key, - title: key, - // resizable: true, // 列宽可拖拽 - align: 'center', - width: 100, - },); - // } - }) - } - - // 设置数据 - let tableData: any = []; - features.forEach((feature: any) => { - feature.properties.key = feature.properties.SMID; - tableData.push(feature.properties); - }) - state.tableData = tableData; - state.showQueryTable = true; -} - -// 选中行查询 -function handleCheck(rowKeys: any) { - viewer.entities.removeAll(); - // 数据集ID查询服务参数 - let idsParam = new L.supermap.GetFeaturesByIDsParameters({ - IDs: rowKeys, - datasetNames: [state.datasetName] - }); - // 创建指定ID查询实例 - new L.supermap.FeatureService(state.dataUrl).getFeaturesByIDs(idsParam, function (serviceResult) { - // 获取服务器返回的结果 - console.log("选中行查询结果:", serviceResult.result); - let feature = serviceResult.result.features.features[0]; - addFeature(feature); - }); -} - -// 通过GeoJsonDataSource.load直接添加feature -let geoJsonDataSourceList:any = []; -function addFeature(feature: any) { - if (geoJsonDataSourceList.length > 0 && !state.isMydate) { - let lastGeoJsonDataSource = geoJsonDataSourceList.pop(); - viewer.dataSources.remove(lastGeoJsonDataSource); - } - if(!feature) return; - if(state.isProjection){ - // feature = GeoJsonProjectToLatLng(feature); // 我自己实现的方法 - feature = L.supermap.Util.transform(feature, L.CRS.EPSG3857, L.CRS.EPSG4326); // supermap写的 - if(!feature) return; - } - let entityPromise = SuperMap3D.GeoJsonDataSource.load(feature); - entityPromise.then(function (dataSource:any) { - geoJsonDataSourceList.push(dataSource); - viewer.dataSources.add(dataSource); - let entities = dataSource.entities.values; - for (let i = 0; i < entities.length; i++) { - let entity = entities[i]; - entity.polygon.material = SuperMap3D.Color.BLUE.withAlpha(0); // 闪面 - entity.polygon.heightReference = SuperMap3D.HeightReference.CLAMP_TO_GROUND; // 贴地 - } - viewer.zoomTo(entities[0]); - }).otherwise(function (error) { - window.alert(error); - }); -} - -// 将feature投影坐标系转为经纬度形式 -function GeoJsonProjectToLatLng(feature:any) { - let leafletLayer = L.geoJSON(feature, { - coordsToLatLng: function (coords:any) { - return L.CRS.EPSG3857.unproject(L.point(coords[0], coords[1])); - } - }); - if (leafletLayer._layers) { - let keys = Object.keys(leafletLayer._layers); - let key = keys[0]; - let layerLatlngs:any; - if (layerLatlngs = leafletLayer._layers[key]._latlngs) { - layerLatlngs = leafletLayer._layers[key]._latlngs[0]; - } else { - return undefined; - } - - let allArray:any = [] - for (let i = 0; i < layerLatlngs.length; i++) { - let layerLatlng = layerLatlngs[i]; - let array:any = [] - layerLatlng.forEach((element:any) => { - array.push([element.lng, element.lat]) - }); - allArray.push(array); - } - feature.geometry.coordinates = [allArray]; - } else { - return undefined; - } - - return feature; -} - - -// 表格列 -const columns: any = ref([ - { - type: 'selection', - multiple: false, - align: 'center' - } -]); - -// sql模糊查找 -function search() { - message.success(GlobalLang.dataFiltering); - state.isloading = true; - state.page = 1; - let sqlString = `${state.selectFiled} like '%${state.sqlString}%'`; - console.log("sqlString:", sqlString); - // 指定SQL查询服务参数 - let sqlParam = new L.supermap.GetFeaturesBySQLParameters({ - queryParameter: { - // name: "Countries@World", - attributeFilter: sqlString - }, - fromIndex: 0, - toIndex: 10, - datasetNames: [state.datasetName] - }); - // 创建SQL查询实例 - new L.supermap.FeatureService(state.dataUrl).getFeaturesBySQL(sqlParam, function (serviceResult) { - // 获取服务器返回的结果 - let result = serviceResult.result; - console.log("sqlQuery:", result); - let features: any = result.features.features; - let features_pageSize = features.slice(0, 10); - state.itemCount = result.totalCount; - state.isFilter = true; - state.isloading = false - updateTable(features_pageSize); - }); -} - -// 分页查找 -function getDataByPage(pageNum) { - // 指定SQL查询服务参数 - let start = (pageNum - 1) * 10; - let end = (pageNum - 1) * 10 + 10; - let sqlString: string; - if (state.isFilter) { - sqlString = `${state.selectFiled} like '%${state.sqlString}%' limit ${(state.page - 1) * 10},10` - } else { - // sqlString = `SMID > ${start} and SMID <= ${end}`; - sqlString = `SMID > 0 limit ${(pageNum - 1) * 10},10`; - } - - console.log("分页-sqlString:", sqlString); - let sqlParam = new L.supermap.GetFeaturesBySQLParameters({ - queryParameter: { - // name: "Countries@World", - attributeFilter: sqlString - }, - fromIndex: 0, - toIndex: 10, - datasetNames: [state.datasetName] - }); - // 创建SQL查询实例 - new L.supermap.FeatureService(state.dataUrl).getFeaturesBySQL(sqlParam, function (serviceResult) { - // 获取服务器返回的结果 - let result = serviceResult.result; - let features: any = result.features.features; - console.log("分页-features:", features); - updateTable(features); - }); -} - -// 页码变化事件 -function onPageChange(page: number) { - state.page = page; - getDataByPage(page); -} -// 页码尺寸变化 -function onUpdatePageSize(pageSize: number) { - state.pageSize = pageSize; - state.page = 1; -} - -let tableCount = computed(() => { - return state.itemCount; -}) - -let queryInfo = computed(() => { - let obj = { - dataUrl: state.dataUrl, - datasetName: state.datasetName - } - return obj; -}) - -// 我的数据 -function openMydata(){ - init_mydata(); - state.myDataPanleShow = true; - message.success(GlobalLang.getData); - state.isMydate = true; -} - -// 初始化并获取数据 -function init_mydata() { - //查询出portal中的服务列表(只查询出服务项) - let myDataUrl = - getRootUrl() + - "web/datas.json?types=%5B%22JSON%22%2C%22EXCEL%22%2C%22CSV%22%2C%22GEOJSON%22%2C%22SHP%22%5D&orderBy=LASTMODIFIEDTIME&orderType=DESC¤tPage=1&pageSize=8"; - - // http://localhost:8190/iportal/web/datas.json?types=%5B%22JSON%22%2C%22EXCEL%22%2C%22CSV%22%2C%22GEOJSON%22%2C%22SHP%22%5D&orderBy=LASTMODIFIEDTIME&orderType=DESC¤tPage=1&pageSize=8 - // http://localhost:8190/iportal/web/datas/632566313/content.json?¤tPage=1&pageSize=99999999 - console.log("myDataUrl-mine:", myDataUrl); - - window.axios - .get(myDataUrl, { withCredentials: IportalStore.isPortal }) - .then(function (response) { - console.log("response-myData:", response); - let data = response.data.content; - data.forEach(item => { - let disabled = item.type != "SHP"; //是否禁用选择 - let name = item.fileName.split('.')[0]; - state.portalServiceList_mydata.push({ - key: item.id, - fileName: name, - id: item.id, - type: item.type, - createTime: dateDiff(item.createTime), - disabled: disabled - }); - }); - console.log(" state.portalServiceList:", state.portalServiceList_mydata); - - }); - - -} - - -// 打开保存的服务 -function addShp_mydata() { - let selecteditems = state.portalServiceList_mydata.filter((item: any) => { - return item.key === state.checkedRowKeys_mydata[0]; - }) - if (viewer) { - selecteditems.forEach(item => { - console.log("item-mydataSelect:", item); - - let resouceID = item.id; - let resouceUrl = getRootUrl() + `web/datas/${resouceID}/content.json?¤tPage=1&pageSize=99999999`; - console.log("resouceUrl:", resouceUrl); - state.isloading_mydata = true; - - window.axios - .get(resouceUrl, { withCredentials: IportalStore.isPortal }) - .then(function (responseData) { - state.isloading_mydata = false; - let contentShp = JSON.parse(responseData.data.content); - console.log("contentShp:", contentShp) - - let firstFeature = contentShp.layers[0].features[0]; - let polygonPositions: any = []; - let positions = firstFeature.geometry.coordinates[0][0]; - positions.forEach((position: any) => { - polygonPositions.push(position[0]); - polygonPositions.push(position[1]); - }) - - let entity = viewer.entities.add({ - polygon: { - hierarchy: SuperMap3D.Cartesian3.fromDegreesArray(polygonPositions), - material: SuperMap3D.Color.BLUE, - }, - }) - - viewer.zoomTo(entity); - state.myDataPanleShow = false; - let positions_reverse = positions.map(arr=>arr.reverse()); // 数组倒置,因为leaflet经纬度和xy相反 - let polygon = L.polygon(positions_reverse, { color: 'red' }); - let geometry_mydata: any = undefined; - if (state.isProjection) { - geometry_mydata = L.supermap.Util.transform(polygon, L.CRS.EPSG4326, L.CRS.EPSG3857); - } else { - geometry_mydata = polygon; - } - let geometryParam = new L.supermap.GetFeaturesByGeometryParameters({ - datasetNames: [state.datasetName], - geometry: geometry_mydata, - spatialQueryMode: "INTERSECT" - }); - - new L.supermap - .FeatureService(state.dataUrl) - .getFeaturesByGeometry(geometryParam, function (serviceResult) { - console.log("指定数据几何查询:", serviceResult); - let features = serviceResult.result.features.features; - updateTable(features); - state.itemCount = features.length; - features.forEach((feature:any)=>{ - addFeature(feature); - }) - - }); - }); - }); - } -} - -// 取消 -function cancle_mydata() { - state.checkedRowKeys_mydata = ["1"]; - state.myDataPanleShow =false; - state.isloading_mydata = false; -} - -// 表格相关 -const pagination_mydata = reactive({ - page: 1, - pageSize: 10, - showSizePicker: true, - pageSizes: [10, 15, 20, 25, 30], - onChange: (page: number) => { - pagination_mydata.page = page; - }, - onUpdatePageSize: (pageSize: number) => { - pagination_mydata.pageSize = pageSize; - pagination_mydata.page = 1; - } -}); - -/** 时间倒序,多少小时之前 - * @param timestamp 时间毫秒数 - */ -function dateDiff(timestamp) { - // 补全为13位 - let arrTimestamp: any = (timestamp + "").split(""); - for (let start = 0; start < 13; start++) { - if (!arrTimestamp[start]) { - arrTimestamp[start] = "0"; - } - } - timestamp = arrTimestamp.join("") * 1; - let minute = 1000 * 60; - let hour = minute * 60; - let day = hour * 24; - let halfamonth = day * 15; - let month = day * 30; - let now = new Date().getTime(); - let diffValue = now - timestamp; - - // 如果本地时间反而小于变量时间 - if (diffValue < 0) { - return GlobalLang.recently; - } - // 计算差异时间的量级 - let monthC: any = diffValue / month; - let weekC: any = diffValue / (7 * day); - let dayC: any = diffValue / day; - let hourC: any = diffValue / hour; - let minC: any = diffValue / minute; - - // 数值补0方法 - let zero = function (value) { - if (value < 10) { - return "0" + value; - } - return value; - }; - - // 使用 - if (monthC > 4) { - // 超过1年,直接显示年月日 - return (function () { - let date = new Date(timestamp); - return ( - date.getFullYear() + - GlobalLang.yeear + - zero(date.getMonth() + 1) + - GlobalLang.month + - zero(date.getDate()) + - GlobalLang.day - ); - })(); - } else if (monthC >= 1) { - return parseInt(monthC) + GlobalLang.monthsAgo; - } else if (weekC >= 1) { - return parseInt(weekC) + GlobalLang.weeksAgo; - } else if (dayC >= 1) { - return parseInt(dayC) + GlobalLang.daysAgo; - } else if (hourC >= 1) { - return parseInt(hourC) + GlobalLang.hoursAgo; - } else if (minC >= 1) { - return parseInt(minC) + GlobalLang.minutesAgo; - } - return GlobalLang.secondsAgo; -} - -watch(() => state.checkedRowKeys, (val) => { - handleCheck(val); -}) - -watch(() => state.datasetName, (val) => { - state.isChangeDataSet = true; -}) - - -onBeforeUnmount(() => { - clear(true); -}); -</script> - -<style lang="scss" scoped> -.layerSeries-box { - width: 100%; - height: 100%; - padding: 0 0.12rem; - box-sizing: border-box; -} - -.oprationBtn { - margin-left: 30%; - display: flex; - flex-wrap: wrap; -} -.oprationBtn_loading { - margin-top:0.1rem; - margin-left: 68%; - display: flex; - flex-wrap: wrap; -} -.oprationBtn_noloading { - margin-top:0.1rem; - margin-left: 69%; - display: flex; - flex-wrap: wrap; -} - -#queryTable { - position: fixed; - bottom: 0rem; - left: 5%; - width: 90%; - height: 3rem; - z-index: 999999; - background-color: rgb(29, 29, 17); - opacity: 0.8; - - display: flex; - flex-direction: column; -} - -.tableInfo { - text-align: center; - margin-left: 0.2rem; -} - -.tableHeader { - display: flex; - justify-content: space-between; - align-items: center; - line-height: 0.4rem; - width: 100%; - - .items { - // flex: 1; - line-height: 0.35rem; - } - - .search { - margin-top: 0.1rem; - margin-right: -4rem; - } -} - -#myDataTable { - margin-right: 0.1rem; - height: 230px; - z-index: 999999; - background-color: rgb(29, 29, 17); - opacity: 0.5; - - display: flex; - flex-direction: column; - .flex-1-hidden { - flex: 1 1 0% !important; - overflow: hidden; -} -} - - - -.opration { - // display: flex; - // justify-content: space-between; - margin-top: 0.1rem; - margin-left: 73%; - // margin-left: 1.95rem; - // margin-right: 0.1rem; -} - -.tip{ - color:"#3499E5"; - background-color: null; -} - -.pagination { - display: flex; - justify-content: space-between; -} - -.flex-1-hidden { - flex: 1 1 0% !important; - overflow: hidden; -} - -:deep(.too-old td) { - color: rgba(255, 0, 0, 0.75) !important; -} - -:deep(.age) { - color: rgba(0, 128, 0, 0.75) !important; -} - -:deep(.too-old .age) { - color: rgba(0, 0, 128, 0.75) !important; -} - -.icon-list-box { - display: flex; - // justify-content: center; - // height: 0.32rem; - width: 2.2rem; - height: auto; - margin-left: 0.4rem; - // margin-left: 36%; - // background: rgba(255, 255, 255, 0.04); - // border: 0.01rem solid rgba(255, 255, 255, 0.15); - // border-radius: 0.04rem; - - .icon-span { - width: 20%; - display: inline-block; - text-align: center; - cursor: pointer; - } - - .icon-span-three { - width: 25%; - // display: flex; - display: inline-block; - text-align: center; - cursor: pointer; - } - - .selected-icon { - color: #3499e5; - } -} -</style> - - - - - - - diff --git a/SuperMap iEarth/src/package/layerSeries/qx-single/index.ts b/SuperMap iEarth/src/package/layerSeries/qx-single/index.ts new file mode 100644 index 00000000..c956a910 --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/qx-single/index.ts @@ -0,0 +1,3 @@ +import qxSingle from './qxSingle.vue'; + +export default qxSingle; diff --git a/SuperMap iEarth/src/package/layerSeries/qx-single/qxSingle.vue b/SuperMap iEarth/src/package/layerSeries/qx-single/qxSingle.vue new file mode 100644 index 00000000..acbc99a9 --- /dev/null +++ b/SuperMap iEarth/src/package/layerSeries/qx-single/qxSingle.vue @@ -0,0 +1,359 @@ +<template> + <div class="layerSeries-box"> + <div class="row-item"> + <span>{{ $t("dataServerUrl") }}</span> + <n-input + class="add-input-border" + @input="handleChange" + v-model:value="state.dataServiceUrl" + :placeholder="$t('qxLayerDataUrl')" + type="text" + style="width: 2.1rem" + /> + </div> + + <div class="row-item"> + <span>{{ $t("dataSourceName") }}</span> + <n-input + class="add-input-border" + @input="handleChange" + v-model:value="state.dataSourceName" + :placeholder="$t('qxLayerDataSource')" + type="text" + style="width: 2.1rem" + /> + </div> + + <div class="row-item"> + <span>{{ $t("datasetName") }}</span> + <n-input + class="add-input-border" + @input="handleChange" + v-model:value="state.dataSetName" + :placeholder="$t('qxLayerDataset')" + type="text" + style="width: 2.1rem" + /> + </div> + + <div class="row-item"> + <span> {{ $t("selectedColor") }} </span> + <div class="color-pick-box" style="width: 2.1rem"> + <n-color-picker + :show-alpha="false" + v-model:value="state.entityColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("transparency") }}</span> + <div class="slider-box" style="width: 1.9rem"> + <n-slider + style="width: 2.2rem" + v-model:value="state.transparency" + :step="0.1" + :min="0.1" + :max="1" + /> + <n-input-number + v-model:value="state.transparency" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0.1" + :max="1" + :step="0.1" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="btn-row-item" style="margin-left: 0.93rem"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + class="ans-btn" + @click="singleQuery" + >{{ $t("query") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> + + <div class="bableShadow" ref="bableQuery" v-show="state.qxModelQuery"> + <div class="row-item" style="margin-top: 0.12rem"> + <span class="shadow-anaylse-pop-titie" + >{{ $t("featrueID") }}:{{ state.featureID }} - + {{ $t("queryResult") }}</span + > + <span @click="state.qxModelQuery = false" style="margin-right: 14px" + >X</span + > + </div> + <div class="bable-container"> + <n-scrollbar style="max-height: 3.8rem"> + <div + class="row-item" + style="margin-left: 0.12rem; margin-right: 0.12rem" + v-for="item in state.featureInfo" + > + <span>{{ item.lable }}</span> + <span>{{ item.value }}</span> + </div> + </n-scrollbar> + </div> + </div> + </div> +</template> + +<script lang="ts" setup> +import { ref, reactive, onMounted, onBeforeUnmount, watch } from "vue"; +import { useMessage } from "naive-ui"; + +let scene = viewer.scene; +const message = useMessage(); + +type StateType = { + dataServiceUrl: string; // 数据服务URL + dataSourceName: string; // 数据源名称 + dataSetName: string; // 数据集名称 + entityColor: string; //设置实体颜色 + transparency: number; //实体透明度 + qxModelQuery: boolean; + featureInfo: any; + featureID: number; + scenePosition: any; +}; + +// 倾斜图层URL:http://www.supermapol.com/realspace/services/3D-dynamicDTH-2/rest/realspace/datas/Config%20-%201/config +let state = reactive<StateType>({ + // dataServiceUrl: 'http://www.supermapol.com/realspace/services/data-dynamicDTH-2/rest/data/featureResults.rjson?returnContent=true', + // dataSourceName: '铁岭矢量面', + // dataSetName: 'New_Region3D_1', + dataServiceUrl: "", + dataSourceName: "", + dataSetName: "", + entityColor: "rgb(166,252,252)", + transparency: 0.6, + qxModelQuery: false, + featureInfo: {}, + featureID: -1, + scenePosition: undefined, +}); + +let bableQuery = ref(); +let handler = new SuperMap3D.ScreenSpaceEventHandler(scene.canvas); + +onMounted(() => {}); + +onBeforeUnmount(() => { + clear(); + + if (handler) { + if (!handler.isDestroyed()) handler.destroy(); + } +}); + +// 设置弹窗位置 +function setBablePosition() { + if (state.scenePosition) { + let WindowCoordinates = SuperMap3D.SceneTransforms.wgs84ToWindowCoordinates( + viewer.scene, + state.scenePosition + ); + bableQuery.value.style.top = + WindowCoordinates.y - bableQuery.value.offsetHeight - 10 + "px"; + bableQuery.value.style.left = + WindowCoordinates.x - bableQuery.value.offsetWidth / 2 + 140 + "px"; + } +} + +// 通过点击查询用于表示单体化的面要素,添加到场景中高亮显示。 +function queryByPoint(queryPoint) { + var queryObj = { + getFeatureMode: "SPATIAL", + spatialQueryMode: "INTERSECT", + datasetNames: [state.dataSourceName + ":" + state.dataSetName], + geometry: { + id: 0, + parts: [1], + points: [queryPoint], + type: "POINT", + }, + }; + + let queryObjJSON = JSON.stringify(queryObj); // 转化为JSON字符串作为查询参数 + + window + .axios({ + url: state.dataServiceUrl, + data: queryObjJSON, + method: "post", + }) + .then(function (response) { + var resultObj = response.data; + if (resultObj.featureCount > 0) { + addClapFeature(resultObj.features[0]); + state.qxModelQuery = true; + } else { + state.qxModelQuery = false; + } + }); + + // 将数据服务查询到的要素添加到场景中高亮显示,表示选中效果。 + function addClapFeature(feature) { + console.log("feature-倾斜单体化:", feature); + var lonLatArr = getLonLatArray(feature.geometry.points); + let str = state.entityColor.replace("rgb", "rgba"); + let materialColor = str.replace(")", `,${state.transparency})`); + viewer.entities.add({ + id: "identify-area", + name: "tie_qx_entity", + polygon: { + hierarchy: SuperMap3D.Cartesian3.fromDegreesArray(lonLatArr), + material: SuperMap3D.Color.fromCssColorString(materialColor), + classificationType: SuperMap3D.ClassificationType.S3M_TILE, // 贴在S3M模型表面 + }, + }); + + let list: any = []; + if (feature.ID) state.featureID = Number(feature.ID); + if (feature.fieldNames && feature.fieldNames.length > 0) { + for (let i = 0; i < feature.fieldNames.length; i++) { + list.push({ + lable: feature.fieldNames[i], + value: feature.fieldValues[i], + }); + } + } + state.featureInfo = list; + } + + // 得到[经度,纬度,经度,纬度...]形式的数组,用于构造面。 + function getLonLatArray(points: any) { + var point3D: any = []; + points.forEach(function (point) { + point3D.push(point.x); + point3D.push(point.y); + }); + return point3D; + } +} + +// 单体化查询 +function singleQuery() { + if ( + state.dataServiceUrl == "" || + state.dataSourceName == "" || + state.dataSetName == "" + ) { + message.warning($t("singleTip_waring")); + return; + } + message.success($t("singleTip_success")); + handler.setInputAction(function (e: any) { + viewer.entities.removeById("identify-area"); // 首先移除之前添加标识实体 + scene.pickPositionAsync(e.position).then((last) => { + var position = last; + state.scenePosition = position; // 气泡位置 + // 从笛卡尔坐标获取经纬度 + var cartographic = SuperMap3D.Cartographic.fromCartesian(position); + var longitude = SuperMap3D.Math.toDegrees(cartographic.longitude); + var latitude = SuperMap3D.Math.toDegrees(cartographic.latitude); + + var queryPoint = { + // 查询点对象 + x: longitude, + y: latitude, + }; + + queryByPoint(queryPoint); + }); + }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); + + // 每一帧都去计算气泡的正确位置 + scene.postRender.addEventListener(setBablePosition); +} + +// 校验URL +function handleChange() { + state.dataServiceUrl = state.dataServiceUrl.trim(); + state.dataSourceName = state.dataSourceName.trim(); + state.dataSetName = state.dataSetName.trim(); +} + +// 清除 +function clear() { + state.dataServiceUrl = ""; + state.dataSourceName = ""; + state.dataSetName = ""; + scene.postRender.removeEventListener(setBablePosition); + viewer.entities.removeById("identify-area"); + state.qxModelQuery = false; + handler.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); //移除事件 +} + +watch( + () => state.entityColor, + (val) => { + val = val.replace("rgb", "rgba"); + let color_str = val.replace(")", `,${state.transparency})`); + let color = SuperMap3D.Color.fromCssColorString(color_str); + let entity_qx = viewer.entities.getById("identify-area"); + if (entity_qx) entity_qx.polygon.material = color; + } +); +watch( + () => state.transparency, + (val) => { + let str = state.entityColor.replace("rgb", "rgba"); + let color_str = str.replace(")", `,${val})`); + let color = SuperMap3D.Color.fromCssColorString(color_str); + let entity_qx = viewer.entities.getById("identify-area"); + if (entity_qx) entity_qx.polygon.material = color; + } +); +</script> + +<style lang="scss" scoped> +.bableShadow { + position: fixed; + background-color: #383838; + opacity: 0.9; + z-index: 200000; + height: 2.5rem; + width: 2.5rem; + font-size: 0.12rem; + + .bable-container { + height: 2rem; + overflow-y: scroll; + @include setsSrollbar(); + } + + .shadow-anaylse-pop-titie { + margin-left: 0.12rem; + font-size: 12px; + line-height: 20px; + } + + span { + font-size: 12px; + } +} +</style> diff --git a/SuperMap iEarth/src/package/layerTree/index.ts b/SuperMap iEarth/src/package/layerTree/index.ts new file mode 100644 index 00000000..6f2768c4 --- /dev/null +++ b/SuperMap iEarth/src/package/layerTree/index.ts @@ -0,0 +1,3 @@ +import layerTree from "./layerTree.vue"; + +export default layerTree; diff --git a/SuperMap iEarth/src/package/layerTree/layerTree.vue b/SuperMap iEarth/src/package/layerTree/layerTree.vue new file mode 100644 index 00000000..07376d97 --- /dev/null +++ b/SuperMap iEarth/src/package/layerTree/layerTree.vue @@ -0,0 +1,505 @@ +<template> + <div class="layer-tree-box"> + <n-tree + cascade + draggable + block-line + default-expand-all="true" + :data="layerTreeData" + :render-suffix="renderSuffix" + :node-props="checkCamera" + :render-label="nodelabel" + @drop="handleDrop" + /> + </div> +</template> + +<script setup lang="ts"> +import { h, ref, nextTick, onMounted } from "vue"; +import { TreeOption, NButton, NDropdown, NInput, useMessage } from "naive-ui"; +import { usePanelStore } from "@/store"; +import { useLayerStore } from "@/store/index"; + +const panelStore = usePanelStore(); +const layerStore = useLayerStore(); +const message = useMessage(); +let layerTreeData = layerStore.layerTreeData; +let layerTreeAlias = layerStore.layerTreeAlias; + +let currentTerrainProvider: any; // 保存当前地形图层,方便控制其显隐 + +onMounted(() => { + // layerStore.refreshLayerTree(); + layerStore.updateLayer({ type: "s3m" }); + layerStore.updateLayer({ type: "imagery" }); + layerStore.updateLayer({ type: "mvt" }); + layerStore.updateLayer({ type: "terrain" }); +}); + +// 给树添加icon +function renderSuffix({ option }: { option: TreeOption | any }) { + if (!option.children) { + return h("div", {}, [ + h( + NButton, + { + bordered: false, + text: true, + title: $t("isShow"), + style: "margin-right:0.04rem", + onClick: (e) => { + setLayerShow(option); + }, + }, + { + icon: () => + h( + option.isShow + ? h( + "i", + { + class: "iconfont iconkejian", + }, + "" + ) + : h( + "i", + { + class: "iconfont iconyincang", + }, + "" + ) + ), + } + ), + h( + NDropdown, + { + trigger: "click", // click | hover + placement: "right-start", + options: setOptionsByType(option.type), + onSelect: (key: any) => { + setDropdownAction(option, key); + }, + }, + { + default: () => + h( + NButton, + { + bordered: false, + text: true, + title: "", + focusable: false, // 不起作用 + class: "layer-tree-item", + onClick: (e) => {}, + }, + { + icon: () => h("i", { class: "iconfont icongengduo" }, ""), + } + ), + } + ), + ]); + } +} + +// 根据图层类型设置不同的下拉操作选项 +function setOptionsByType(type: string) { + if (type === "s3m") { + return [ + { + label: $t("rapidLocate"), + key: 1, + icon: () => h("i", { class: "iconfont icondingwei" }, ""), + }, + { + label: $t("layerOpration"), + key: 2, + icon: () => h("i", { class: "iconfont iconyidong" }, ""), + }, + { + label: $t("layerAttribute"), + key: 3, + icon: () => h("i", { class: "iconfont icontishi" }, ""), + }, + { + label: $t("layerStyle"), + key: 4, + icon: () => h("i", { class: "iconfont icontucengfengge" }, ""), + }, + { + label: $t("layerQuery"), + key: 10, + icon: () => h("i", { class: "iconfont iconchaxun" }, ""), + }, + { + label: $t("qxSingle"), + key: 12, + icon: () => h("i", { class: "iconfont iconqingxiedantihua" }, ""), + }, + { + label: $t("rename"), + key: 0, + icon: () => h("i", { class: "iconfont iconzhongmingming" }, ""), + }, + { + label: $t("remove"), + key: 5, + icon: () => + h( + "i", + { class: "iconfont iconshanchu", style: "color: #DC5849" }, + "" + ), + }, + ]; + } else if (type === "imagery") { + return [ + { + label: $t("rapidLocate"), + key: 1, + icon: () => h("i", { class: "iconfont icondingwei" }, ""), + }, + { + label: $t("mapQuery"), + key: 11, + icon: () => h("i", { class: "iconfont icondituchaxun" }, ""), + }, + { + label: $t("rename"), + key: 0, + icon: () => h("i", { class: "iconfont iconzhongmingming" }, ""), + }, + { + label: $t("remove"), + key: 5, + icon: () => + h( + "i", + { class: "iconfont iconshanchu", style: "color: #DC5849" }, + "" + ), + }, + ]; + } else if (type === "mvt") { + return [ + { + label: $t("rapidLocate"), + key: 1, + icon: () => h("i", { class: "iconfont icondingwei" }, ""), + }, + { + label: $t("rename"), + key: 0, + icon: () => h("i", { class: "iconfont iconzhongmingming" }, ""), + }, + { + label: $t("remove"), + key: 5, + icon: () => + h( + "i", + { class: "iconfont iconshanchu", style: "color: #DC5849" }, + "" + ), + }, + ]; + } else { + return [ + { + label: $t("rename"), + key: 0, + icon: () => h("i", { class: "iconfont iconzhongmingming" }, ""), + }, + { + label: $t("remove"), + key: 5, + icon: () => + h( + "i", + { class: "iconfont iconshanchu", style: "color: #DC5849" }, + "" + ), + }, + ]; + } +} + +// 控制图层显隐 +function setLayerShow(option: any) { + if (!option.key) return; + let optionKey: any = option.key; + if (optionKey.indexOf("-") != -1) { + let index = optionKey.split("-")[1]; + switch (option.type) { + case "s3m": + viewer.scene.layers._layerQueue[index].visible = !option.isShow; + layerStore.isShowLayer(option); + break; + case "imagery": + viewer.imageryLayers._layers[index].show = !option.isShow; + layerStore.isShowLayer(option); + break; + case "mvt": + viewer.scene._vectorTileMaps._layerQueue[index].show = !option.isShow; + layerStore.isShowLayer(option); + break; + case "terrain": + if (!currentTerrainProvider) { + currentTerrainProvider = viewer.terrainProvider; + viewer.terrainProvider = new SuperMap3D.EllipsoidTerrainProvider(); + } else { + viewer.terrainProvider = currentTerrainProvider; + currentTerrainProvider = null; + } + layerStore.isShowLayer(option); + break; + default: + break; + } + } +} + +// 下拉列表操作 +function setDropdownAction(option: any, key: number) { + // key为1:定位,key为2:删除图层 + layerStore.s3mLayerSelectIndex = option.key.split("-")[1]; + if (key === 0) { + option.isedit = true; + nextTick(() => { + inputRef.value.focus(); + }); + } else if (key === 1) { + if (option.type === "s3m") { + let s3mLayer = viewer.scene.layers.find(option.aliasKey); + viewer.flyTo(s3mLayer, { duration: 0 }); + } else if (option.type === "mvt") { + let index = String(option.key).split("-")[1]; + let mvtLayer = viewer.scene._vectorTileMaps._layerQueue[Number(index)]; + var bounds = mvtLayer.rectangle; + viewer.scene.camera.flyTo({ + destination: new SuperMap3D.Cartesian3.fromRadians( + (bounds.east + bounds.west) * 0.5, + (bounds.north + bounds.south) * 0.5, + 10000 + ), + duration: 1, + orientation: { + heading: 0, + roll: 0, + }, + }); + } else if (option.type === "imagery") { + let index = String(option.key).split("-")[1]; + let imgLayer = viewer.imageryLayers._layers[Number(index)]; + if (!imgLayer.wmtsImageLayerPosition) { + viewer.flyTo(imgLayer); + } else { + let wmtsImageLayerPosition = imgLayer.wmtsImageLayerPosition; + viewer.scene.camera.flyTo({ + destination: new SuperMap3D.Cartesian3.fromDegrees( + wmtsImageLayerPosition.lng, + wmtsImageLayerPosition.lat, + wmtsImageLayerPosition.height + ), + duration: 1, + orientation: { + heading: 0, + roll: 0, + }, + }); + } + } + } else if (key === 2) { + panelStore.setRightToolBarList({ id: 7 }); + } else if (key === 3) { + panelStore.setRightToolBarList({ id: 8 }); + } else if (key === 4) { + panelStore.setRightToolBarList({ id: 9 }); + } else if (key === 5) { + // 删除图层之后 再显隐会有问题,不通过id + let type = option.type; + let layerName = option.aliasKey; + let layerIndex = option.key.split("-")[1]; + if (type === "s3m") { + viewer.scene.layers.remove(layerName); + layerStore.removeLayer(option); + delete layerTreeAlias.s3mLayer[option.aliasKey]; + } + if (type === "imagery") { + let delImagelayer = viewer.imageryLayers._layers[layerIndex]; + if (delImagelayer._imageryProvider.url == "./images/earth-skin2.jpg") { + message.warning($t("delUnsupported")); + return; + } + viewer.imageryLayers.remove(delImagelayer); + layerStore.removeLayer(option); + delete layerTreeAlias.imgLayer[option.aliasKey]; + + // 针对wmts服务在图层列表的删除 + let delLayerImageryProvider = delImagelayer._imageryProvider; + if ( + delLayerImageryProvider._baseUrl && + delLayerImageryProvider._baseUrl.indexOf("wmts") != -1 + ) { + layerStore.removeWmtsLayer({ + name: delLayerImageryProvider.tablename, + url: delLayerImageryProvider._baseUrl, + }); + return; + } + if ( + delLayerImageryProvider._resource && + delLayerImageryProvider._resource._url.indexOf("wmts") != -1 + ) { + layerStore.removeWmtsLayer({ + name: delLayerImageryProvider.tablename, + url: delLayerImageryProvider._resource._url, + }); + return; + } + } + if (type === "mvt") { + let mvtLayerName = layerStore.MVTLayerNameList[layerIndex]; + viewer.scene.removeVectorTilesMap(mvtLayerName); + layerStore.removeLayer(option); + delete layerTreeAlias.mvtLayer[option.aliasKey]; + } + if (type === "terrain") { + viewer.terrainProvider = new SuperMap3D.EllipsoidTerrainProvider(); + layerStore.removeLayer(option); + delete layerTreeAlias.terrainLayer[option.aliasKey]; + } + } else if (key === 10) { + panelStore.setRightToolBarList({ id: 10 }); + } else if (key === 11) { + panelStore.setRightToolBarList({ id: 11 }); + } else if (key === 12) { + panelStore.setRightToolBarList({ id: 12 }); + } +} + +// 可拖拽 +function findSiblingsAndIndex( + node: TreeOption, + nodes?: TreeOption[] +): [TreeOption[], number] | [null, null] { + if (!nodes) return [null, null]; + for (let i = 0; i < nodes.length; ++i) { + const siblingNode = nodes[i]; + if (siblingNode.key === node.key) return [nodes, i]; + const [siblings, index] = findSiblingsAndIndex(node, siblingNode.children); + if (siblings && index !== null) return [siblings, index]; + } + return [null, null]; +} + +// 拖拽相关事件 +function handleDrop({ node, dragNode, dropPosition }) { + let node_key, + dragNode_key = undefined; + if (node && node.key.indexOf("-") != -1) { + node_key = node.key.split("-")[0]; + } + if (dragNode && dragNode.key.indexOf("-") != -1) { + dragNode_key = dragNode.key.split("-")[0]; + } + if (node_key != dragNode_key) { + message.warning($t("tree_darg_tip")); + return; + } + const [dragNodeSiblings, dragNodeIndex] = findSiblingsAndIndex( + dragNode, + layerTreeData + ); + if (dragNodeSiblings === null || dragNodeIndex === null) return; + dragNodeSiblings.splice(dragNodeIndex, 1); + if (dropPosition === "inside") { + if (node.children) { + node.children.unshift(dragNode); + } else { + node.children = [dragNode]; + } + } else if (dropPosition === "before") { + const [nodeSiblings, nodeIndex] = findSiblingsAndIndex(node, layerTreeData); + if (nodeSiblings === null || nodeIndex === null) return; + nodeSiblings.splice(nodeIndex, 0, dragNode); + } else if (dropPosition === "after") { + const [nodeSiblings, nodeIndex] = findSiblingsAndIndex(node, layerTreeData); + if (nodeSiblings === null || nodeIndex === null) return; + nodeSiblings.splice(nodeIndex + 1, 0, dragNode); + } + layerTreeData = Array.from(layerTreeData); +} + +//节点内容渲染函数 +const inputRef = ref(); +const nodelabel = ({ option }: { option: TreeOption }) => { + return h( + "div", + option.isedit == true + ? h(NInput, { + autofocus: true, + ref: inputRef, + size: "small", + value: option.label, + onUpdateValue: (v) => { + option.label = v; + let aliasKey: any = option.aliasKey; + switch (option.type) { + case "s3m": + layerTreeAlias.s3mLayer[aliasKey] = option.label; + break; + case "imagery": + layerTreeAlias.imgLayer[aliasKey] = option.label; + break; + case "mvt": + layerTreeAlias.mvtLayer[aliasKey] = option.label; + break; + case "terrain": + layerTreeAlias.terrainLayer[aliasKey] = option.label; + break; + default: + break; + } + }, + onChange: () => { + option.isedit = false; + }, + onBlur: () => { + option.isedit = false; + }, + }) + : option.label + ); +}; + +//节点点击事件:双击开启编辑 +const checkCamera = ({ option }: { option: TreeOption }) => { + return { + onClick() {}, + ondblclick() { + option.isedit = true; + nextTick(() => { + inputRef.value.focus(); + }); + }, + }; +}; +</script> + +<style lang="scss" scoped> +.layer-tree-box { + padding: 0rem 0.06rem; +} + +// 使用:deep强制设置图层列表后缀button颜色 +:deep(.n-button) { + color: rgba(255, 255, 255, 0.65); +} +:deep(.n-button):hover { + // hover颜色 + color: rgba(255, 255, 255, 0.85); +} +</style> diff --git a/SuperMap iEarth/src/package/measure/index.ts b/SuperMap iEarth/src/package/measure/index.ts index 1127db85..e6e7295a 100644 --- a/SuperMap iEarth/src/package/measure/index.ts +++ b/SuperMap iEarth/src/package/measure/index.ts @@ -1,2 +1,2 @@ -import Measure from "./index.vue" +import Measure from "./measure.vue" export default Measure; diff --git a/SuperMap iEarth/src/package/measure/index.vue b/SuperMap iEarth/src/package/measure/measure.vue similarity index 67% rename from SuperMap iEarth/src/package/measure/index.vue rename to SuperMap iEarth/src/package/measure/measure.vue index 5881264f..3177e6d1 100644 --- a/SuperMap iEarth/src/package/measure/index.vue +++ b/SuperMap iEarth/src/package/measure/measure.vue @@ -1,18 +1,20 @@ <template> <div class="measure-box"> <div class="row-item"> - <span>{{$t('global.measureMode')}}</span> + <span>{{ $t("measureMode") }}</span> <n-select - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.measureMode" :options="state.options" @update:value="update_mode" - /> + v-model:show="show2" + > + </n-select> </div> - <div class="row-item" > + <div class="row-item"> <span></span> - <div class="icon-list" > + <div class="icon-list"> <span v-for="(line, index) in state.currentItemOption" :key="index" @@ -21,14 +23,15 @@ :class="line.isSelect ? 'selected-icon' : ''" @click="changleIconItem(line)" > - <!-- <svg-icon :name="line.iconName" class="icon-size" /> --> - <i class="iconfont iconSize" :class="line.iconName" style="margin-top:0px"></i> + <i + class="iconfont iconSize" + :class="line.iconName" + style="margin-top: 0px" + ></i> </span> </div> </div> - - <div> <div class="btn-row-item"> <n-checkbox @@ -36,20 +39,20 @@ v-model:checked="state.pickPointEnabled" style="margin-bottom: 0.1rem" > - {{$t('global.pickPoint')}} + {{ $t("pickPoint") }} </n-checkbox> </div> </div> <div v-show="state.currentItemIndex === 2"> <div class="btn-row-item"> - <n-checkbox - @update:checked="update_showDVH" - v-model:checked="state.isShowLine" - style="margin-bottom: 0.1rem" - > - {{$t('global.contour')}} - </n-checkbox> + <n-checkbox + @update:checked="update_showDVH" + v-model:checked="state.isShowLine" + style="margin-bottom: 0.1rem" + > + {{ $t("contour") }} + </n-checkbox> </div> </div> @@ -60,28 +63,34 @@ text-color="#fff" class="ans-btn" @click="StartMeasure" - >{{$t('global.measureAction')}}</n-button + >{{ $t("measureAction") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </div> </template> <script lang="ts" setup> -import { reactive, onBeforeUnmount ,watch} from "vue"; +import { ref, reactive, onMounted, onBeforeUnmount, watch } from "vue"; type stateType = { - measureMode: string, //测量模式 - clampMode: any, //贴地模式 - Ellipsoid: any, //椭球选择 - contourColor: string, //等高线颜色 - isShowLine: boolean, //显示等高线 - pickPointEnabled: boolean, //开启顶点捕捉 - currentItemIndex: number, // 当前索引 - options:any, // 量算模式选项 - itemOptions:any, // 测量方式选项 - currentItemOption:any,// 当前测量方式选项 -} + measureMode: string; //测量模式 + clampMode: any; //贴地模式 + Ellipsoid: any; //椭球选择 + contourColor: string; //等高线颜色 + isShowLine: boolean; //显示等高线 + pickPointEnabled: boolean; //开启顶点捕捉 + currentItemIndex: number; // 当前索引 + options: any; // 量算模式选项 + itemOptions: any; // 测量方式选项 + currentItemOption: any; // 当前测量方式选项 +}; let state = reactive<stateType>({ measureMode: "Space", //测量模式 @@ -93,11 +102,11 @@ let state = reactive<stateType>({ currentItemIndex: 1, options: [ { - label: () => GlobalLang.mode_space, + label: () => $t("mode_space"), value: "Space", }, { - label: () => GlobalLang.mode_ground, + label: () => $t("mode_ground"), value: "Ground", }, { @@ -113,122 +122,127 @@ let state = reactive<stateType>({ value: "WGS84", }, { - label: () => GlobalLang.mode_projection, + label: () => $t("mode_projection"), value: "null", }, ], - itemOptions:{ - "Space":[ + itemOptions: { + Space: [ { id: 1, - lable: GlobalLang.measureDistence, + lable: $t("measureDistence"), iconName: "iconceju", isSelect: true, }, { id: 2, - lable: GlobalLang.measureHeight, + lable: $t("measureHeight"), iconName: "iconcegao", isSelect: false, }, { id: 3, - lable: GlobalLang.measureArea, + lable: $t("measureArea"), iconName: "iconcemian", isSelect: false, }, ], - "Ground":[ + Ground: [ { id: 1, - lable: GlobalLang.measureDistence, + lable: $t("measureDistence"), iconName: "iconyidijuli1", isSelect: true, }, { id: 2, - lable: GlobalLang.measureHeight, + lable: $t("measureHeight"), iconName: "iconcegao", isSelect: false, }, { id: 3, - lable: GlobalLang.measureArea, + lable: $t("measureArea"), iconName: "iconyidimianji", isSelect: false, }, ], - "null":[ + null: [ { id: 1, - lable: GlobalLang.measureDistence, + lable: $t("measureDistence"), iconName: "iconyidijuli1", isSelect: true, }, { id: 2, - lable: GlobalLang.measureHeight, + lable: $t("measureHeight"), iconName: "iconcegao", isSelect: false, }, { id: 3, - lable: GlobalLang.measureArea, + lable: $t("measureArea"), iconName: "icontouying", isSelect: false, }, ], }, - currentItemOption:[ - { - id: 1, - lable: GlobalLang.measureDistence, - iconName: "iconceju", - isSelect: true, - }, - { - id: 2, - lable: GlobalLang.measureHeight, - iconName: "iconcegao", - isSelect: false, - }, - { - id: 3, - lable: GlobalLang.measureArea, - iconName: "iconcemian", - isSelect: false, - }, - ] + currentItemOption: [ + { + id: 1, + lable: $t("measureDistence"), + iconName: "iconceju", + isSelect: true, + }, + { + id: 2, + lable: $t("measureHeight"), + iconName: "iconcegao", + isSelect: false, + }, + { + id: 3, + lable: $t("measureArea"), + iconName: "iconcemian", + isSelect: false, + }, + ], }); -// 初始化数据 -let layers, - handlerDis, - handlerArea, - handlerHeight, - isoline, - lineHeight, - setHypFlag; - // height_0 = 0; +// 初始化变量 +let show2 = ref(false); +let layers, handlerDis, handlerArea, handlerHeight, lineHeight, setHypFlag; // 等高线初始化 -isoline = new SuperMap3D.HypsometricSetting(); -isoline.DisplayMode = SuperMap3D.HypsometricSettingEnum.DisplayMode.LINE; +let isoline = new SuperMap3D.HypsometricSetting(); let colorTable = new SuperMap3D.ColorTable(); -isoline._lineColor = SuperMap3D.Color.fromCssColorString(state.contourColor); -isoline.ColorTable = colorTable; -isoline.Opacity = 0.6; -isoline.MaxVisibleValue = -100; -isoline.MinVisibleValue = -100; + +onMounted(() => { + isoline.DisplayMode = SuperMap3D.HypsometricSettingEnum.DisplayMode.LINE; + isoline._lineColor = SuperMap3D.Color.fromCssColorString(state.contourColor); + isoline.ColorTable = colorTable; + isoline.Opacity = 0.6; + isoline.MaxVisibleValue = -100; + isoline.MinVisibleValue = -100; + + init(); +}); + +onBeforeUnmount(() => { + clear(); + isoline.destroy(); + layers = undefined; +}); // 初始化 -init(); function init() { if (!viewer) return; + viewer.scene.pickPointInterval = 20; layers = viewer.scene.layers.layerQueue; viewer.scene.globe.HypsometricSetting = { hypsometricSetting: isoline, - analysisMode: SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL + analysisMode: SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL, }; handlerDis = new SuperMap3D.MeasureHandler( @@ -241,10 +255,13 @@ function init() { SuperMap3D.MeasureMode.Area, state.clampMode ); - handlerHeight = new SuperMap3D.MeasureHandler(viewer, SuperMap3D.MeasureMode.DVH); + handlerHeight = new SuperMap3D.MeasureHandler( + viewer, + SuperMap3D.MeasureMode.DVH + ); //初始化测量距离 - handlerDis.activeEvt.addEventListener(isActive => { + handlerDis.activeEvt.addEventListener((isActive) => { if (isActive == true) { viewer.enableCursorStyle = false; viewer._element.style.cursor = ""; @@ -258,7 +275,7 @@ function init() { }); //注册测距功能事件 - handlerDis.measureEvt.addEventListener(result => { + handlerDis.measureEvt.addEventListener((result) => { let dis = Number(result.distance); let mode = state.measureMode; if (mode == "CGCS2000" || mode == "XIAN80" || mode == "WGS84") { @@ -266,11 +283,11 @@ function init() { } let distance = dis > 1000 ? (dis / 1000).toFixed(2) + "km" : dis.toFixed(2) + "m"; - handlerDis.disLabel.text = "距离:" + distance; + handlerDis.disLabel.text = $t("distence_cl") + distance; }); //初始化测量面积 - handlerArea.activeEvt.addEventListener(isActive => { + handlerArea.activeEvt.addEventListener((isActive) => { if (isActive == true) { viewer.enableCursorStyle = false; viewer._element.style.cursor = ""; @@ -284,7 +301,7 @@ function init() { }); // 测量面积监听事件 - handlerArea.measureEvt.addEventListener(result => { + handlerArea.measureEvt.addEventListener((result) => { let mj = Number(result.area); let mode = state.measureMode; if (mode == "CGCS2000" || mode == "XIAN80" || mode == "WGS84") { @@ -294,26 +311,33 @@ function init() { } let area = mj > 1000000 ? (mj / 1000000).toFixed(2) + "km²" : mj.toFixed(2) + "㎡"; - handlerArea.areaLabel.text = "面积:" + area; + handlerArea.areaLabel.text = $t("area") + area; }); - // let point1, point2; //初始化测量高度 - handlerHeight.measureEvt.addEventListener(result => { - let distance = result.distance > 1000 ? (result.distance / 1000).toFixed(2) + 'km' : result.distance + 'm'; - let vHeight = result.verticalHeight > 1000 ? (result.verticalHeight / 1000).toFixed(2) + 'km' : result.verticalHeight + 'm'; - let hDistance = result.horizontalDistance > 1000 ? (result.horizontalDistance / 1000).toFixed(2) + 'km' : result.horizontalDistance + 'm'; - handlerHeight.disLabel.text = '空间距离:' + distance; - handlerHeight.vLabel.text = '垂直高度:' + vHeight; - handlerHeight.hLabel.text = '水平距离:' + hDistance; - //实时等高线显示 - lineHeight = Number(result.endHeight); - if (state.isShowLine) updateContourLine(lineHeight) - + handlerHeight.measureEvt.addEventListener((result) => { + let distance = + result.distance > 1000 + ? (result.distance / 1000).toFixed(2) + "km" + : result.distance + "m"; + let vHeight = + result.verticalHeight > 1000 + ? (result.verticalHeight / 1000).toFixed(2) + "km" + : result.verticalHeight + "m"; + let hDistance = + result.horizontalDistance > 1000 + ? (result.horizontalDistance / 1000).toFixed(2) + "km" + : result.horizontalDistance + "m"; + handlerHeight.disLabel.text = $t("spaceDistance") + distance; + handlerHeight.vLabel.text = $t("verticalHeight") + vHeight; + handlerHeight.hLabel.text = $t("horizontalDistance") + hDistance; + //实时等高线显示 + lineHeight = Number(result.endHeight); + if (state.isShowLine) updateContourLine(lineHeight); }); // 测量高度监听事件 - handlerHeight.activeEvt.addEventListener(isActive => { + handlerHeight.activeEvt.addEventListener((isActive) => { if (isActive == true) { viewer.enableCursorStyle = false; viewer._element.style.cursor = ""; @@ -339,8 +363,8 @@ function changleIconItem(item: any) { } } - -function updateIconItem(){ +// 切换图标 +function updateIconItem() { for (let i = 0; i < state.currentItemOption.length; i++) { if (state.currentItemOption[i].id == state.currentItemIndex) { state.currentItemOption[i].isSelect = true; @@ -352,21 +376,20 @@ function updateIconItem(){ // 开始测量 function StartMeasure() { - deactiveAll() + deactiveAll(); switch (state.currentItemIndex) { - case 1: - MeasureDistance(); - break; - case 2: - MeasureHeight(); - break; - case 3: - MeasureArea(); - break; - default: - console.log('请选择测量方式'); - break; + case 1: + MeasureDistance(); + break; + case 2: + MeasureHeight(); + break; + case 3: + MeasureArea(); + break; + default: + break; } } @@ -376,7 +399,8 @@ function setHypsometricSetting() { for (let i = 0; i < layers.length; i++) { layers[i].hypsometricSetting = { hypsometricSetting: isoline, - analysisMode: SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL + analysisMode: + SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL, }; } setHypFlag = true; @@ -384,8 +408,8 @@ function setHypsometricSetting() { // 分析 //椭球贴地距离 -function calcClampDistance(positions:any) { - let lonlat:any[] = []; +function calcClampDistance(positions: any) { + let lonlat: any[] = []; for (let i = 0; i < positions.length; i++) { let cartographic = SuperMap3D.Cartographic.fromCartesian(positions[i]); let lon = SuperMap3D.Math.toDegrees(cartographic.longitude); @@ -393,14 +417,14 @@ function calcClampDistance(positions:any) { lonlat.push(lon, lat); } let gemetry = new SuperMap3D.PolylineGeometry({ - positions: SuperMap3D.Cartesian3.fromDegreesArray(lonlat) + positions: SuperMap3D.Cartesian3.fromDegreesArray(lonlat), }); return viewer.scene.globe.computeSurfaceDistance(gemetry, state.Ellipsoid); } //椭球贴地面积 -function calcClampValue(positions:any) { - let lonlat:any[] = []; +function calcClampValue(positions: any) { + let lonlat: any[] = []; for (let i = 0; i < positions.length; i++) { let cartographic = SuperMap3D.Cartographic.fromCartesian(positions[i]); let lon = SuperMap3D.Math.toDegrees(cartographic.longitude); @@ -409,13 +433,13 @@ function calcClampValue(positions:any) { } let gemetry = new SuperMap3D.PolygonGeometry.fromPositions({ - positions: SuperMap3D.Cartesian3.fromDegreesArray(lonlat) + positions: SuperMap3D.Cartesian3.fromDegreesArray(lonlat), }); return viewer.scene.globe.computeSurfaceArea(gemetry, state.Ellipsoid); } //投影面积 -function calcAreaWithoutHeight(positions:any) { +function calcAreaWithoutHeight(positions: any) { let totalLon = 0; for (let i = 0; i < positions.length; i++) { let cartographic = SuperMap3D.Cartographic.fromCartesian(positions[i]); @@ -435,9 +459,9 @@ function calcAreaWithoutHeight(positions:any) { eastFalse: 500000.0, northFalse: 0.0, semimajorAxis: 6378137, - inverseFlattening: 298.257222101 + inverseFlattening: 298.257222101, }); - let cartesians:any[] = []; + let cartesians: any[] = []; for (let i = 0; i < positions.length; i++) { let cartographic = SuperMap3D.Cartographic.fromCartesian(positions[i]); @@ -457,9 +481,11 @@ function calcAreaWithoutHeight(positions:any) { } // 设置等值线 -function updateContourLine(height:number) { - viewer.scene.globe.HypsometricSetting.hypsometricSetting.MaxVisibleValue = height; - viewer.scene.globe.HypsometricSetting.hypsometricSetting.MinVisibleValue = height; +function updateContourLine(height: number) { + viewer.scene.globe.HypsometricSetting.hypsometricSetting.MaxVisibleValue = + height; + viewer.scene.globe.HypsometricSetting.hypsometricSetting.MinVisibleValue = + height; if (!setHypFlag) return; for (let i = 0; i < layers.length; i++) { if (layers[i].hypsometricSetting.hypsometricSetting) { @@ -492,7 +518,7 @@ function MeasureArea() { } // 更新量算模式 -function update_mode(val:string) { +function update_mode(val: string) { if (val == "Space") { state.clampMode = SuperMap3D.ClampMode.Space; handlerArea.clampMode = SuperMap3D.ClampMode.Space; @@ -514,7 +540,7 @@ function update_mode(val:string) { } // 开启等高线 -function update_showDVH(val:boolean) { +function update_showDVH(val: boolean) { if (!val) { updateContourLine(-10000); } else { @@ -523,9 +549,10 @@ function update_showDVH(val:boolean) { } // 开启顶点捕捉 -function openPickPoint(val:boolean){ +function openPickPoint(val: boolean) { state.pickPointEnabled = val; viewer.scene.pickPointEnabled = val; + viewer.scene.pickPointInterval = 20; } // 清除 @@ -544,25 +571,23 @@ function deactiveAll() { state.Ellipsoid = null; lineHeight = -10000; } - // 清除等值线 function clearLine() { updateContourLine(-10000); - // viewer.eventManager.removeEventListener("CLICK", measureHeightClk); //移除鼠标点击事件监听 } watch( () => state.measureMode, - val => { + (val) => { switch (val) { case "Space": state.currentItemOption = state.itemOptions["Space"]; break; case "Ground": - state.currentItemOption = state.itemOptions["Ground"]; + state.currentItemOption = state.itemOptions["Ground"]; break; case "null": - state.currentItemOption = state.itemOptions["null"]; + state.currentItemOption = state.itemOptions["null"]; break; default: state.currentItemOption = state.itemOptions["Space"]; @@ -570,28 +595,15 @@ watch( } updateIconItem(); - // state.currentItemIndex = 1; } ); -onBeforeUnmount(() => { - clear(); - isoline.destroy(); - layers = undefined; -}); </script> - <style lang="scss" scoped> .measure-box { width: 100%; height: 100%; - padding: 0 0.12rem; box-sizing: border-box; + padding: 0 0.12rem; } </style> - - - - - - diff --git a/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/box.vue b/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/box.vue index 476c3c0a..8e70db2b 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/box.vue +++ b/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/box.vue @@ -1,203 +1,330 @@ <template> - <!-- 长方体 --> - <div class="row-item"> - <span>{{$t('global.length')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.boxLength" :step="1" :min="10" :max="100" /> - <span>{{ state.boxLength }}</span> - </div> + <!-- 长方体 --> + <div class="row-item"> + <span>{{ $t("length") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.boxLength" + :step="1" + :min="10" + :max="100" + /> + <n-input-number + v-model:value="state.boxLength" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="10" + :max="100" + placeholder="" + size="small" + /> </div> + </div> - <div class="row-item"> - <span>{{$t('global.width')}}</span> - <div class="slider-box"> - <n-slider style="width: 1.5rem" v-model:value="state.boxWidth" :step="1" :min="10" :max="200" /> - <span>{{ state.boxWidth }}</span> - </div> + <div class="row-item"> + <span>{{ $t("width") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.boxWidth" + :step="1" + :min="10" + :max="200" + /> + <n-input-number + v-model:value="state.boxWidth" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="10" + :max="200" + placeholder="" + size="small" + /> </div> + </div> - <div class="row-item"> - <span>{{$t('global.height')}}</span> - <div class="slider-box"> - <n-slider style="width: 1.5rem" v-model:value="state.boxHeight" :step="10" :min="10" :max="100" /> - <span>{{ state.boxHeight }}</span> - </div> + <div class="row-item"> + <span>{{ $t("height") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.boxHeight" + :step="1" + :min="10" + :max="100" + /> + <n-input-number + v-model:value="state.boxHeight" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="10" + :max="100" + placeholder="" + size="small" + /> </div> + </div> - <div class="row-item"> - <span>{{$t('global.color')}}</span> - <div class="color-pick-box row-content"> - <n-color-picker v-model:value="state.geometryMaterial" :render-label="() => { - return ''; - } - " size="small"></n-color-picker> - </div> - </div> - <div class="row-item"> - <span>{{$t('global.drawMode')}}</span> - <n-select style="width: 1.96rem" v-model:value="state.displayMode" - :options="state.optionsMode" /> + <div class="row-item" v-show="state.displayMode != 'Outline'"> + <span>{{ $t("fillColor") }}</span> + <div class="color-pick-box row-content"> + <n-color-picker + v-model:value="state.geometryColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> + </div> - <div class="btn-row-item"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="add" style="margin-right: 0.1rem">{{$t('global.Draw')}}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> + <div class="row-item" v-show="state.displayMode != 'Fill'"> + <span>{{ $t("wireframeColor") }}</span> + <div class="color-pick-box"> + <n-color-picker + v-model:value="state.wireframeColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> + </div> + + <div class="row-item"> + <span>{{ $t("drawMode") }}</span> + <n-select + style="width: 1.96rem" + v-model:value="state.displayMode" + :options="state.optionsMode" + /> + </div> + + <div class="btn-row-item"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="add" + style="margin-right: 0.1rem" + >{{ $t("Draw") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> </template> - + <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; type stateType = { - boxLength: number, // 长度 - boxWidth: number, // 宽度 - boxHeight: number, // 高度 - geometryMaterial: string, // 颜色 - displayMode: string,// 显示模式 - optionsMode:any,// 显示模式选项 -} -// 初始化数据 + boxLength: number; // 长度 + boxWidth: number; // 宽度 + boxHeight: number; // 高度 + geometryColor: string; // 颜色 + displayMode: string; // 显示模式 + optionsMode: any; // 显示模式选项 + wireframeColor: string; // 线框颜色 +}; +// 初始化变量 let state = reactive<stateType>({ - // 长方体 - boxLength: 20, - boxWidth: 20, - boxHeight: 20, - geometryMaterial: 'rgba(255,255,255, 1)', - displayMode: "Fill", - optionsMode: [ - { - label: () => GlobalLang.fillMode, - value: "Fill", - }, - { - label: () => GlobalLang.wireframe, - value: "Outline", - } - ], - + // 长方体 + boxLength: 20, + boxWidth: 20, + boxHeight: 20, + geometryColor: "rgba(255,255,255, 1)", + displayMode: "Fill", + optionsMode: [ + { + label: () => $t("fillMode"), + value: "Fill", + }, + { + label: () => $t("wireframe"), + value: "Outline", + }, + { + label: () => $t("fillBothMode"), + value: "Both", + }, + ], + wireframeColor: "rgba(0,0,0, 1)", }); let boxEntity; -let entities = viewer.entities; let targetEntity: any = null; +let entities = viewer.entities; +let handlerPoint_box = new SuperMap3D.DrawHandler( + viewer, + SuperMap3D.DrawMode.Point +); +let handler = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); -let handlerPoint_box = new SuperMap3D.DrawHandler(viewer, SuperMap3D.DrawMode.Point); -//注册绘制长方体事件 -handlerPoint_box.drawEvt.addEventListener(function (res) { +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(); +}); + +function init() { + handlerPoint_box.activeEvt.addEventListener((isActive: any) => { + if (isActive == true) { + window.viewer.enableCursorStyle = false; + window.viewer._element.style.cursor = ""; + document.body.classList.add("measureCur"); + } else { + window.viewer.enableCursorStyle = true; + document.body.classList.remove("measureCur"); + } + }); + + //注册绘制长方体事件 + handlerPoint_box.drawEvt.addEventListener(function (res) { let point = res.object; let position = point.position; - // let color = SuperMap3D.Color.fromRandom({ alpha: 1.0 }); - let color = SuperMap3D.Color.fromCssColorString(state.geometryMaterial); + let geometryColor = SuperMap3D.Color.fromCssColorString( + state.geometryColor + ); + let wireframeColor = SuperMap3D.Color.fromCssColorString( + state.wireframeColor + ); + let fillFlag = ["Fill", "Both"].indexOf(state.displayMode) != -1; + let outlineFlag = ["Outline", "Both"].indexOf(state.displayMode) != -1; boxEntity = entities.add({ - position: position, - box: { - dimensions: new SuperMap3D.Cartesian3(20.0, 20.0, 20.0), - material: color, - fill: state.displayMode === 'Fill', - outline: state.displayMode === 'Outline', - outlineColor: SuperMap3D.Color.BLACK, - outlineWidth: 1 - } + position: position, + box: { + dimensions: new SuperMap3D.Cartesian3(20.0, 20.0, 20.0), + material: geometryColor, + fill: fillFlag, + outline: outlineFlag, + outlineColor: wireframeColor, + outlineWidth: 1, + }, }); targetEntity = boxEntity; -}); + }); -// 场景中拾取获得选中entity -let handler = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); -handler.setInputAction(function (e) { + // 场景中拾取获得选中entity + handler.setInputAction(function (e) { let pickedObject = viewer.scene.pick(e.position); - if (SuperMap3D.defined(pickedObject) && (pickedObject.id instanceof SuperMap3D.Entity)) { - targetEntity = pickedObject.id; + if ( + SuperMap3D.defined(pickedObject) && + pickedObject.id instanceof SuperMap3D.Entity + ) { + targetEntity = pickedObject.id; } else { - // targetEntity = null; + // targetEntity = null; } -}, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); - -// 关闭 -function deactiveAll() { - handlerPoint_box.deactivate(); + }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); } // 添加entity function add() { - deactiveAll(); - handlerPoint_box.activate(); + deactiveAll(); + handlerPoint_box.activate(); +} + +// 关闭 +function deactiveAll() { + handlerPoint_box.deactivate(); } // 清除 function clear() { - deactiveAll(); - if(handlerPoint_box) handlerPoint_box.clear(); - viewer.entities.removeAll(); - state.displayMode = 'Fill'; + deactiveAll(); + if (handlerPoint_box) handlerPoint_box.clear(); + viewer.entities.removeAll(); + state.displayMode = "Fill"; } watch( - () => state.boxLength, - (val) => { - if (targetEntity) { - let dim = targetEntity.box.dimensions.getValue(); - targetEntity.box.dimensions = new SuperMap3D.Cartesian3(val,dim.y,dim.z); - } + () => state.boxLength, + (val) => { + if (targetEntity) { + let dim = targetEntity.box.dimensions.getValue(); + targetEntity.box.dimensions = new SuperMap3D.Cartesian3( + val, + dim.y, + dim.z + ); } + } ); - watch( - () => state.boxWidth, - (val) => { - if (targetEntity) { - let dim = targetEntity.box.dimensions.getValue(); - targetEntity.box.dimensions = new SuperMap3D.Cartesian3(dim.x,val,dim.z); - } + () => state.boxWidth, + (val) => { + if (targetEntity) { + let dim = targetEntity.box.dimensions.getValue(); + targetEntity.box.dimensions = new SuperMap3D.Cartesian3( + dim.x, + val, + dim.z + ); } + } ); - watch( - () => state.boxHeight, - (val) => { - if (targetEntity) { - let dim = targetEntity.box.dimensions.getValue(); - targetEntity.box.dimensions = new SuperMap3D.Cartesian3(dim.x,dim.y,val); - } + () => state.boxHeight, + (val) => { + if (targetEntity) { + let dim = targetEntity.box.dimensions.getValue(); + targetEntity.box.dimensions = new SuperMap3D.Cartesian3( + dim.x, + dim.y, + val + ); } + } ); - watch( - () => state.geometryMaterial, - (val) => { - if (targetEntity) { - targetEntity.box['material'] = SuperMap3D.Color.fromCssColorString(val); - } + () => state.geometryColor, + (val) => { + if (targetEntity) { + targetEntity.box["material"] = SuperMap3D.Color.fromCssColorString(val); } + } ); watch( - () => state.displayMode, - (val) => { - if (targetEntity) { - if (val === 'Fill') { - targetEntity.box.fill = true; - targetEntity.box.outline = false; - } else { - targetEntity.box.fill = false; - targetEntity.box.outline = true; - } - } + () => state.wireframeColor, + (val) => { + if (targetEntity) { + targetEntity.box["outlineColor"] = + SuperMap3D.Color.fromCssColorString(val); } + } +); +watch( + () => state.displayMode, + (val) => { + if (targetEntity) { + if (val === "Fill") { + targetEntity.box.fill = true; + targetEntity.box.outline = false; + } else if (val === "Outline") { + targetEntity.box.fill = false; + targetEntity.box.outline = true; + } else { + targetEntity.box.fill = true; + targetEntity.box.outline = true; + } + } + } ); - - -onBeforeUnmount(() => { - clear(); -}); - - </script> - - -<style lang="scss" scoped> -</style> - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/ellipse.vue b/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/ellipse.vue index b62816ce..382ae24e 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/ellipse.vue +++ b/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/ellipse.vue @@ -1,244 +1,399 @@ <template> - <!-- 圆柱体 --> - - <div class="row-item"> - <span>{{$t('global.semiMinorAxis')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.semiMinorAxis" :step="1" :min="5" :max="100" /> - <span>{{ state.semiMinorAxis }}</span> - </div> + <!-- 圆柱体 --> + <div class="row-item"> + <span>{{ $t("semiMinorAxis") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.semiMinorAxis" + :step="1" + :min="5" + :max="100" + /> + <n-input-number + v-model:value="state.semiMinorAxis" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="5" + :max="100" + placeholder="" + size="small" + /> </div> + </div> - <div class="row-item"> - <span>{{$t('global.semiMajorAxis')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.semiMajorAxis" :step="1" :min="5" :max="200" /> - <span>{{ state.semiMajorAxis }}</span> - </div> + <div class="row-item"> + <span>{{ $t("semiMajorAxis") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.semiMajorAxis" + :step="1" + :min="5" + :max="200" + /> + <n-input-number + v-model:value="state.semiMajorAxis" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="5" + :max="200" + placeholder="" + size="small" + /> </div> + </div> - <div class="row-item"> - <span>{{$t('global.stretchingHeight')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.extrudedHeight" :step="10" :min="10" :max="100" /> - <span>{{ state.extrudedHeight }}</span> - </div> + <div class="row-item"> + <span>{{ $t("stretchingHeight") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.extrudedHeight" + :step="1" + :min="10" + :max="100" + /> + <n-input-number + v-model:value="state.extrudedHeight" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="10" + :max="100" + placeholder="" + size="small" + /> </div> + </div> - <div class="row-item"> - <span>{{$t('global.granularity')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.granularity" :step="0.1" :min="0.5" :max="2" /> - <span>{{ state.granularity }}</span> - </div> - </div> - <div class="row-item"> - <span>{{$t('global.rotate')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.rotation" :step="0.1" :min="0" :max="90" /> - <span>{{ state.rotation }}</span> - </div> + <div class="row-item"> + <span>{{ $t("granularity") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.granularity" + :step="0.1" + :min="0.5" + :max="2" + /> + <n-input-number + v-model:value="state.granularity" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0.5" + :max="2" + placeholder="" + size="small" + /> </div> + </div> - <div class="row-item"> - <span>{{$t('global.color')}}</span> - <div class="color-pick-box"> - <n-color-picker v-model:value="state.geometryMaterial" :render-label="() => { - return ''; - } - " size="small"></n-color-picker> - </div> + <div class="row-item"> + <span>{{ $t("rotate") }}</span> + <div class="slider-box"> + <!-- 旋转没起作用 --> + <n-slider + style="width: 1.5rem" + v-model:value="state.rotation" + :step="0" + :min="0" + :max="90" + /> + <n-input-number + v-model:value="state.rotation" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="90" + placeholder="" + size="small" + /> </div> - <div class="row-item"> - <span>{{$t('global.drawMode')}}</span> - <n-select style="width: 1.96rem" v-model:value="state.displayMode" - :options="state.optionsMode" /> + </div> + + <div class="row-item" v-show="state.displayMode != 'Outline'"> + <span>{{ $t("fillColor") }}</span> + <div class="color-pick-box"> + <n-color-picker + v-model:value="state.geometryColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> + </div> - <div class="btn-row-item"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="add" style="margin-right: 0.1rem">{{$t('global.Draw')}}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> + <div class="row-item" v-show="state.displayMode != 'Fill'"> + <span>{{ $t("wireframeColor") }}</span> + <div class="color-pick-box"> + <n-color-picker + v-model:value="state.wireframeColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> + </div> + + <div class="row-item"> + <span>{{ $t("drawMode") }}</span> + <n-select + style="width: 1.96rem" + v-model:value="state.displayMode" + :options="state.optionsMode" + /> + </div> + + <div class="btn-row-item"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="add" + style="margin-right: 0.1rem" + >{{ $t("Draw") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> </template> - + <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; type stateType = { - semiMinorAxis: number, // 短半轴 - semiMajorAxis: number, // 长半轴 - extrudedHeight: number, // 拉伸高度 - granularity: number, // 粒度 - rotation: number, // 旋转 - geometryMaterial: string, // 颜色 - displayMode: string,// 显示模式 - optionsMode:any,// 显示模式选项 -} + semiMinorAxis: number; // 短半轴 + semiMajorAxis: number; // 长半轴 + extrudedHeight: number; // 拉伸高度 + granularity: number; // 粒度 + rotation: number; // 旋转 + geometryColor: string; // 颜色 + displayMode: string; // 显示模式 + optionsMode: any; // 显示模式选项 + wireframeColor: string; // 线框颜色 +}; -// 初始化数据 +// 初始化变量 let state = reactive<stateType>({ - // 圆柱体 - semiMinorAxis: 21, - semiMajorAxis: 40, - extrudedHeight: 50, - granularity: 1, - rotation: 0, - geometryMaterial: 'rgba(255,255,255, 1)', - displayMode: "Fill", - optionsMode: [ - { - label: () => GlobalLang.fillMode, - value: "Fill", - }, - { - label: () => GlobalLang.wireframe, - value: "Outline", - } - ], + // 圆柱体 + semiMinorAxis: 12, + semiMajorAxis: 20, + extrudedHeight: 30, + granularity: 1, + rotation: 0, + geometryColor: "rgba(255,255,255, 1)", + displayMode: "Fill", + optionsMode: [ + { + label: () => $t("fillMode"), + value: "Fill", + }, + { + label: () => $t("wireframe"), + value: "Outline", + }, + { + label: () => $t("fillBothMode"), + value: "Both", + }, + ], + wireframeColor: "rgba(0,0,0, 1)", }); let ellipseEntity; -let entities = viewer.entities; let targetEntity: any = null; +let entities = viewer.entities; +let handlerPoint_ellipse = new SuperMap3D.DrawHandler( + viewer, + SuperMap3D.DrawMode.Point +); +let handler = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); + +onMounted(() => { + init(); +}); -let handlerPoint_ellipse = new SuperMap3D.DrawHandler(viewer, SuperMap3D.DrawMode.Point); +onBeforeUnmount(() => { + clear(); +}); -// 注册绘制圆柱事件 -handlerPoint_ellipse.drawEvt.addEventListener(function (res) { +function init() { + handlerPoint_ellipse.activeEvt.addEventListener((isActive: any) => { + if (isActive == true) { + window.viewer.enableCursorStyle = false; + window.viewer._element.style.cursor = ""; + document.body.classList.add("measureCur"); + } else { + window.viewer.enableCursorStyle = true; + document.body.classList.remove("measureCur"); + } + }); + + // 注册绘制圆柱事件 + handlerPoint_ellipse.drawEvt.addEventListener(function (res) { let point = res.object; let position = point.position; // let color = SuperMap3D.Color.fromRandom({ alpha: 1.0 }); - let color = SuperMap3D.Color.fromCssColorString(state.geometryMaterial); + let geometryColor = SuperMap3D.Color.fromCssColorString( + state.geometryColor + ); + let wireframeColor = SuperMap3D.Color.fromCssColorString( + state.wireframeColor + ); + let fillFlag = ["Fill", "Both"].indexOf(state.displayMode) != -1; + let outlineFlag = ["Outline", "Both"].indexOf(state.displayMode) != -1; ellipseEntity = entities.add({ - position: position, - ellipse: { - semiMinorAxis: 20.0, - semiMajorAxis: 40.0, - height: 0, - extrudedHeight: 50.0, - material: color, - granularity: SuperMap3D.Math.RADIANS_PER_DEGREE, - rotation: 0, - fill: state.displayMode === 'Fill', - outline: state.displayMode === 'Outline', - outlineColor: SuperMap3D.Color.BLACK, - outlineWidth: 1 - } + position: position, + ellipse: { + semiMinorAxis: state.semiMinorAxis, + semiMajorAxis: state.semiMajorAxis, + height: 0, + extrudedHeight: state.extrudedHeight, + material: geometryColor, + granularity: SuperMap3D.Math.RADIANS_PER_DEGREE, + rotation: 0, + fill: fillFlag, + outline: outlineFlag, + outlineColor: wireframeColor, + outlineWidth: 1, + }, }); targetEntity = ellipseEntity; -}); + }); -// 场景中拾取获得选中entity -let handler = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); -handler.setInputAction(function (e) { + // 场景中拾取获得选中entity + handler.setInputAction(function (e) { let pickedObject = viewer.scene.pick(e.position); - if (SuperMap3D.defined(pickedObject) && (pickedObject.id instanceof SuperMap3D.Entity)) { - targetEntity = pickedObject.id; - } else { - // targetEntity = null; + if ( + SuperMap3D.defined(pickedObject) && + pickedObject.id instanceof SuperMap3D.Entity + ) { + targetEntity = pickedObject.id; } -}, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); - -function deactiveAll() { - handlerPoint_ellipse.deactivate(); + }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); } function add() { - deactiveAll(); - handlerPoint_ellipse.activate(); + deactiveAll(); + handlerPoint_ellipse.activate(); +} + +function deactiveAll() { + handlerPoint_ellipse.deactivate(); } function clear() { - deactiveAll(); - handlerPoint_ellipse.clear(); - if(handlerPoint_ellipse) handlerPoint_ellipse.clear(); - viewer.entities.removeAll(); - state.displayMode = 'Fill'; + deactiveAll(); + handlerPoint_ellipse.clear(); + if (handlerPoint_ellipse) handlerPoint_ellipse.clear(); + viewer.entities.removeAll(); + state.displayMode = "Fill"; } + // 监听 watch( - () => state.semiMinorAxis, - (val) => { - if(val > state.semiMajorAxis) state.semiMinorAxis = state.semiMajorAxis - 1; - if (targetEntity) { - if(val <= state.semiMajorAxis){ // 短半轴不能超过长半轴 - targetEntity.ellipse['semiMinorAxis'] = val; - } - } + () => state.semiMinorAxis, + (val) => { + if (val > state.semiMajorAxis) + state.semiMinorAxis = state.semiMajorAxis - 1; + if (targetEntity) { + // 短半轴不能超过长半轴 + if (val <= state.semiMajorAxis) { + targetEntity.ellipse["semiMinorAxis"] = val; + } } + } ); watch( - () => state.semiMajorAxis, - (val) => { - if(val < state.semiMinorAxis) state.semiMajorAxis = state.semiMinorAxis + 1; - if (targetEntity) { - if(val >= state.semiMinorAxis){ - targetEntity.ellipse['semiMajorAxis'] = val; - } - } + () => state.semiMajorAxis, + (val) => { + if (val < state.semiMinorAxis) + state.semiMajorAxis = state.semiMinorAxis + 1; + if (targetEntity) { + if (val >= state.semiMinorAxis) { + targetEntity.ellipse["semiMajorAxis"] = val; + } } + } ); watch( - () => state.extrudedHeight, - (val) => { - if (targetEntity) { - targetEntity.ellipse['extrudedHeight'] = val; - } + () => state.extrudedHeight, + (val) => { + if (targetEntity) { + targetEntity.ellipse["extrudedHeight"] = val; } + } ); watch( - () => state.rotation, - (val) => { - if (targetEntity) { - targetEntity.ellipse['rotation'] = val ; - } + () => state.rotation, + (val) => { + if (targetEntity) { + targetEntity.ellipse["rotation"] = val; } + } ); watch( - () => state.granularity, - (val) => { - if (targetEntity) { - targetEntity.ellipse['granularity'] = val * SuperMap3D.Math.RADIANS_PER_DEGREE; - } + () => state.granularity, + (val) => { + if (targetEntity) { + targetEntity.ellipse["granularity"] = + val * SuperMap3D.Math.RADIANS_PER_DEGREE; } + } ); watch( - () => state.geometryMaterial, - (val) => { - if (targetEntity) { - targetEntity.ellipse['material'] = SuperMap3D.Color.fromCssColorString(val); - } + () => state.geometryColor, + (val) => { + if (targetEntity) { + targetEntity.ellipse["material"] = + SuperMap3D.Color.fromCssColorString(val); } + } ); watch( - () => state.displayMode, - (val) => { - if (targetEntity) { - if (val === 'Fill') { - targetEntity.ellipse.fill = true; - targetEntity.ellipse.outline = false; - } else { - targetEntity.ellipse.fill = false; - targetEntity.ellipse.outline = true; - } - } + () => state.wireframeColor, + (val) => { + if (targetEntity) { + targetEntity.ellipse["outlineColor"] = + SuperMap3D.Color.fromCssColorString(val); } + } +); +watch( + () => state.displayMode, + (val) => { + if (targetEntity) { + if (val === "Fill") { + targetEntity.ellipse.fill = true; + targetEntity.ellipse.outline = false; + } else if (val === "Outline") { + targetEntity.ellipse.fill = false; + targetEntity.ellipse.outline = true; + } else { + targetEntity.ellipse.fill = true; + targetEntity.ellipse.outline = true; + } + } + } ); - - -onBeforeUnmount(() => { - clear(); -}); - - </script> - - - -<style lang="scss" scoped> -</style> - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/ellipsoid.vue b/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/ellipsoid.vue index 08cd66d0..6aa1233e 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/ellipsoid.vue +++ b/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/ellipsoid.vue @@ -1,204 +1,333 @@ <template> - <!-- 球体 --> - - <div class="row-item"> - <span>{{$t('global.Xradius')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.xRadii" :step="1" :min="10" :max="100" /> - <span>{{ state.xRadii }}</span> - </div> + <!-- 球体 --> + <div class="row-item"> + <span>{{ $t("Xradius") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.xRadii" + :step="1" + :min="10" + :max="100" + /> + <n-input-number + v-model:value="state.xRadii" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="10" + :max="100" + placeholder="" + size="small" + /> </div> + </div> - <div class="row-item"> - <span>{{$t('global.Yradius')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.yRadii" :step="1" :min="10" :max="200" /> - <span>{{ state.yRadii }}</span> - </div> + <div class="row-item"> + <span>{{ $t("Yradius") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.yRadii" + :step="1" + :min="10" + :max="200" + /> + <n-input-number + v-model:value="state.yRadii" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="10" + :max="200" + placeholder="" + size="small" + /> </div> + </div> - <div class="row-item"> - <span>{{$t('global.Zradius')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.zRadii" :step="10" :min="10" :max="100" /> - <span>{{ state.zRadii }}</span> - </div> + <div class="row-item"> + <span>{{ $t("Zradius") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.zRadii" + :step="1" + :min="10" + :max="100" + /> + <n-input-number + v-model:value="state.zRadii" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="10" + :max="100" + placeholder="" + size="small" + /> </div> + </div> - <div class="row-item"> - <span>{{$t('global.color')}}</span> - <div class="color-pick-box" > - <n-color-picker v-model:value="state.geometryMaterial" :render-label="() => { - return ''; - } - " size="small"></n-color-picker> - </div> + <div class="row-item" v-show="state.displayMode != 'Outline'"> + <span>{{ $t("fillColor") }}</span> + <div class="color-pick-box"> + <n-color-picker + v-model:value="state.geometryColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> - <div class="row-item"> - <span>{{$t('global.drawMode')}}</span> - <n-select style="width: 1.96rem" v-model:value="state.displayMode" - :options="state.optionsMode" /> - </div> - + </div> + <div class="row-item" v-show="state.displayMode != 'Fill'"> + <span>{{ $t("wireframeColor") }}</span> + <div class="color-pick-box"> + <n-color-picker + v-model:value="state.wireframeColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> + </div> + </div> + <div class="row-item"> + <span>{{ $t("drawMode") }}</span> + <n-select + style="width: 1.96rem" + v-model:value="state.displayMode" + :options="state.optionsMode" + /> + </div> - <div class="btn-row-item"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="add" style="margin-right: 0.1rem">{{$t('global.Draw')}}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> - </div> + <div class="btn-row-item"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="add" + style="margin-right: 0.1rem" + >{{ $t("Draw") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> </template> - + <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; type stateType = { - xRadii: number, // X半径 - yRadii: number, // Y半径 - zRadii: number, // Z半径 - geometryMaterial: string, // 颜色 - displayMode: string,// 显示模式 - optionsMode:any,// 显示模式选项 -} -// 初始化数据 + xRadii: number; // X半径 + yRadii: number; // Y半径 + zRadii: number; // Z半径 + geometryColor: string; // 颜色 + displayMode: string; // 显示模式 + optionsMode: any; // 显示模式选项 + wireframeColor: string; // 线框颜色 +}; +// 初始化变量 let state = reactive<stateType>({ - // 球体 - xRadii: 20, - yRadii: 20, - zRadii: 20, - geometryMaterial: 'rgba(255,255,255, 1)', - displayMode: "Fill", - optionsMode: [ - { - label: () => GlobalLang.fillMode, - value: "Fill", - }, - { - label: () => GlobalLang.wireframe, - value: "Outline", - } - ], + // 球体 + xRadii: 20, + yRadii: 20, + zRadii: 20, + geometryColor: "rgba(255,255,255, 1)", + displayMode: "Fill", + optionsMode: [ + { + label: () => $t("fillMode"), + value: "Fill", + }, + { + label: () => $t("wireframe"), + value: "Outline", + }, + { + label: () => $t("fillBothMode"), + value: "Both", + }, + ], + wireframeColor: "rgba(0,0,0, 1)", }); let ellipsoidEntity; let entities = viewer.entities; -let handlerPoint_ellipsoid = new SuperMap3D.DrawHandler(viewer, SuperMap3D.DrawMode.Point); let targetEntity: any = null; +let handlerPoint_ellipsoid = new SuperMap3D.DrawHandler( + viewer, + SuperMap3D.DrawMode.Point +); +let handler = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); + +onMounted(() => { + init(); +}); -// 注册绘制球体事件 -handlerPoint_ellipsoid.drawEvt.addEventListener(function (res) { +onBeforeUnmount(() => { + clear(); +}); + +function init() { + handlerPoint_ellipsoid.activeEvt.addEventListener((isActive: any) => { + if (isActive == true) { + window.viewer.enableCursorStyle = false; + window.viewer._element.style.cursor = ""; + document.body.classList.add("measureCur"); + } else { + window.viewer.enableCursorStyle = true; + document.body.classList.remove("measureCur"); + } + }); + + // 注册绘制球体事件 + handlerPoint_ellipsoid.drawEvt.addEventListener(function (res) { let point = res.object; let position = point.position; let posDeg = SuperMap3D.Cartographic.fromCartesian(position); posDeg.height = 20; - position = SuperMap3D.Cartesian3.fromRadians(posDeg.longitude, posDeg.latitude, posDeg.height); - // let color = SuperMap3D.Color.fromRandom({ alpha: 1.0 }); - let color = SuperMap3D.Color.fromCssColorString(state.geometryMaterial); + position = SuperMap3D.Cartesian3.fromRadians( + posDeg.longitude, + posDeg.latitude, + posDeg.height + ); + let geometryColor = SuperMap3D.Color.fromCssColorString( + state.geometryColor + ); + let wireframeColor = SuperMap3D.Color.fromCssColorString( + state.wireframeColor + ); + let fillFlag = ["Fill", "Both"].indexOf(state.displayMode) != -1; + let outlineFlag = ["Outline", "Both"].indexOf(state.displayMode) != -1; ellipsoidEntity = entities.add({ - position: position, - ellipsoid: { - radii: new SuperMap3D.Cartesian3(20.0, 20.0, 20.0), - material: color, - fill: state.displayMode === 'Fill', - outline: state.displayMode === 'Outline', - outlineColor: SuperMap3D.Color.BLACK, - outlineWidth: 1 - } + position: position, + ellipsoid: { + radii: new SuperMap3D.Cartesian3(20.0, 20.0, 20.0), + material: geometryColor, + fill: fillFlag, + outline: outlineFlag, + outlineColor: wireframeColor, + outlineWidth: 1, + }, }); targetEntity = ellipsoidEntity; -}); + }); -// 场景中拾取获得选中entity -let handler = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); -handler.setInputAction(function (e) { + // 场景中拾取获得选中entity + handler.setInputAction(function (e) { let pickedObject = viewer.scene.pick(e.position); - if (SuperMap3D.defined(pickedObject) && (pickedObject.id instanceof SuperMap3D.Entity)) { - targetEntity = pickedObject.id; - } else { - // targetEntity = null; + if ( + SuperMap3D.defined(pickedObject) && + pickedObject.id instanceof SuperMap3D.Entity + ) { + targetEntity = pickedObject.id; } -}, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); - -function deactiveAll() { - handlerPoint_ellipsoid.deactivate(); + }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); } function add() { - deactiveAll(); - handlerPoint_ellipsoid.activate(); + deactiveAll(); + handlerPoint_ellipsoid.activate(); +} + +function deactiveAll() { + handlerPoint_ellipsoid.deactivate(); } function clear() { - deactiveAll(); - if(handlerPoint_ellipsoid) handlerPoint_ellipsoid.clear(); - viewer.entities.removeAll(); - state.displayMode = 'Fill'; + deactiveAll(); + if (handlerPoint_ellipsoid) handlerPoint_ellipsoid.clear(); + viewer.entities.removeAll(); + state.displayMode = "Fill"; } - watch( - () => state.xRadii, - (val) => { - if (targetEntity) { - let radii = targetEntity.ellipsoid.radii.getValue(); - targetEntity.ellipsoid.radii = new SuperMap3D.Cartesian3(val,radii.y,radii.z); - } + () => state.xRadii, + (val) => { + if (targetEntity) { + let radii = targetEntity.ellipsoid.radii.getValue(); + targetEntity.ellipsoid.radii = new SuperMap3D.Cartesian3( + val, + radii.y, + radii.z + ); } + } ); watch( - () => state.yRadii, - (val) => { - if (targetEntity) { - let radii = targetEntity.ellipsoid.radii.getValue(); - targetEntity.ellipsoid.radii = new SuperMap3D.Cartesian3(radii.x,val,radii.z); - } + () => state.yRadii, + (val) => { + if (targetEntity) { + let radii = targetEntity.ellipsoid.radii.getValue(); + targetEntity.ellipsoid.radii = new SuperMap3D.Cartesian3( + radii.x, + val, + radii.z + ); } + } ); watch( - () => state.zRadii, - (val) => { - if (targetEntity) { - let radii = targetEntity.ellipsoid.radii.getValue(); - targetEntity.ellipsoid.radii = new SuperMap3D.Cartesian3(radii.x,radii.y,val); - } + () => state.zRadii, + (val) => { + if (targetEntity) { + let radii = targetEntity.ellipsoid.radii.getValue(); + targetEntity.ellipsoid.radii = new SuperMap3D.Cartesian3( + radii.x, + radii.y, + val + ); } + } ); - watch( - () => state.geometryMaterial, - (val) => { - if (targetEntity) { - targetEntity.ellipsoid['material'] = SuperMap3D.Color.fromCssColorString(val); - } + () => state.geometryColor, + (val) => { + if (targetEntity) { + targetEntity.ellipsoid["material"] = + SuperMap3D.Color.fromCssColorString(val); } + } ); watch( - () => state.displayMode, - (val) => { - if (targetEntity) { - if (val === 'Fill') { - targetEntity.ellipsoid.fill = true; - targetEntity.ellipsoid.outline = false; - } else { - targetEntity.ellipsoid.fill = false; - targetEntity.ellipsoid.outline = true; - } - } + () => state.wireframeColor, + (val) => { + if (targetEntity) { + targetEntity.ellipsoid["outlineColor"] = + SuperMap3D.Color.fromCssColorString(val); } + } +); +watch( + () => state.displayMode, + (val) => { + if (targetEntity) { + if (val === "Fill") { + targetEntity.ellipsoid.fill = true; + targetEntity.ellipsoid.outline = false; + } else if (val === "Outline") { + targetEntity.ellipsoid.fill = false; + targetEntity.ellipsoid.outline = true; + } else { + targetEntity.ellipsoid.fill = true; + targetEntity.ellipsoid.outline = true; + } + } + } ); - - -onBeforeUnmount(() => { - clear(); -}); - - </script> - -<style lang="scss" scoped> -</style> - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/frustum.vue b/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/frustum.vue index 29d1fd5d..5d62fe96 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/frustum.vue +++ b/SuperMap iEarth/src/package/objectPainting/draw-geomety/coms/frustum.vue @@ -1,176 +1,279 @@ <template> - <div class="row-item"> - <span>{{$t('global.length')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.cylinderLength" :step="1" :min="10" :max="100" /> - <span>{{ state.cylinderLength }}</span> - </div> + <div class="row-item"> + <span>{{ $t("length") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.cylinderLength" + :step="1" + :min="10" + :max="100" + /> + <n-input-number + v-model:value="state.cylinderLength" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="10" + :max="100" + placeholder="" + size="small" + /> </div> + </div> - <div class="row-item"> - <span>{{$t('global.bottomHeight')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.bottomRadius" :step="1" :min="10" :max="200" /> - <span>{{ state.bottomRadius }}</span> - </div> + <div class="row-item"> + <span>{{ $t("bottomHeight") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.bottomRadius" + :step="1" + :min="10" + :max="200" + /> + <n-input-number + v-model:value="state.bottomRadius" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="10" + :max="200" + placeholder="" + size="small" + /> </div> - <div class="row-item"> - <span>{{$t('global.color')}}</span> - <div class="color-pick-box" > - <n-color-picker v-model:value="state.geometryMaterial" :render-label="() => { - return ''; - } - " size="small"></n-color-picker> - </div> + </div> + + <div class="row-item" v-show="state.displayMode != 'Outline'"> + <span>{{ $t("fillColor") }}</span> + <div class="color-pick-box"> + <n-color-picker + v-model:value="state.geometryColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> - <div class="row-item"> - <span>{{$t('global.drawMode')}}</span> - <n-select style="width: 1.96rem;" v-model:value="state.displayMode" - :options="state.optionsMode" /> + </div> + + <div class="row-item" v-show="state.displayMode != 'Fill'"> + <span>{{ $t("wireframeColor") }}</span> + <div class="color-pick-box"> + <n-color-picker + v-model:value="state.wireframeColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> + </div> + <div class="row-item"> + <span>{{ $t("drawMode") }}</span> + <n-select + style="width: 1.96rem" + v-model:value="state.displayMode" + :options="state.optionsMode" + /> + </div> - <div class="btn-row-item"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="add" style="margin-right: 0.1rem">{{$t('global.Draw')}}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> - </div> + <div class="btn-row-item"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="add" + style="margin-right: 0.1rem" + >{{ $t("Draw") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> </template> - + <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; type stateType = { - cylinderLength: number, // 长度 - bottomRadius: number, // 底部高程 - geometryMaterial: string, // 颜色 - displayMode: string,// 显示模式 - optionsMode:any,// 显示模式选项 -} -// 初始化数据 + cylinderLength: number; // 长度 + bottomRadius: number; // 底部高程 + geometryColor: string; // 颜色 + displayMode: string; // 显示模式 + optionsMode: any; // 显示模式选项 + wireframeColor: string; // 线框颜色 +}; +// 初始化变量 let state = reactive<stateType>({ - // 圆锥 - cylinderLength: 40, - bottomRadius: 20, - geometryMaterial: 'rgba(255,255,255, 1)', - displayMode: "Fill", - optionsMode: [ - { - label: () => GlobalLang.fillMode, - value: "Fill", - }, - { - label: () => GlobalLang.wireframe, - value: "Outline", - } - ], + // 圆锥 + cylinderLength: 40, + bottomRadius: 20, + geometryColor: "rgba(255,255,255, 1)", + displayMode: "Fill", + optionsMode: [ + { + label: () => $t("fillMode"), + value: "Fill", + }, + { + label: () => $t("wireframe"), + value: "Outline", + }, + { + label: () => $t("fillBothMode"), + value: "Both", + }, + ], + wireframeColor: "rgba(0,0,0, 1)", }); let frustumEntity; let entities = viewer.entities; -let handlerPoint_frustum = new SuperMap3D.DrawHandler(viewer, SuperMap3D.DrawMode.Point); let targetEntity: any = null; +let handlerPoint_frustum = new SuperMap3D.DrawHandler( + viewer, + SuperMap3D.DrawMode.Point +); +let handler = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(); +}); -//注册绘制椎体事件 -handlerPoint_frustum.drawEvt.addEventListener(function (res) { +function init() { + handlerPoint_frustum.activeEvt.addEventListener((isActive: any) => { + if (isActive == true) { + window.viewer.enableCursorStyle = false; + window.viewer._element.style.cursor = ""; + document.body.classList.add("measureCur"); + } else { + window.viewer.enableCursorStyle = true; + document.body.classList.remove("measureCur"); + } + }); + + //注册绘制椎体事件 + handlerPoint_frustum.drawEvt.addEventListener(function (res) { let point = res.object; let position = point.position; - // let color = SuperMap3D.Color.fromRandom({ alpha: 1.0 }); - let color = SuperMap3D.Color.fromCssColorString(state.geometryMaterial); + let fillFlag = ["Fill", "Both"].indexOf(state.displayMode) != -1; + let outlineFlag = ["Outline", "Both"].indexOf(state.displayMode) != -1; + let geometryColor = SuperMap3D.Color.fromCssColorString( + state.geometryColor + ); + let wireframeColor = SuperMap3D.Color.fromCssColorString( + state.wireframeColor + ); frustumEntity = entities.add({ - position: position, - cylinder: { - length: 40.0, - topRadius: 0.0, - bottomRadius: 20.0, - material: color, - fill: state.displayMode === 'Fill', - outline: state.displayMode === 'Outline', - outlineColor: SuperMap3D.Color.BLACK, - outlineWidth: 1 - } + position: position, + cylinder: { + length: 40.0, + topRadius: 0.0, + bottomRadius: 20.0, + material: geometryColor, + fill: fillFlag, + outline: outlineFlag, + outlineColor: wireframeColor, + outlineWidth: 1, + }, }); targetEntity = frustumEntity; -}); + }); -// 场景中拾取获得选中entity -let handler = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); -handler.setInputAction(function (e) { + // 场景中拾取获得选中entity + handler.setInputAction(function (e) { let pickedObject = viewer.scene.pick(e.position); - if (SuperMap3D.defined(pickedObject) && (pickedObject.id instanceof SuperMap3D.Entity)) { - targetEntity = pickedObject.id; - } else { - // targetEntity = null; + if ( + SuperMap3D.defined(pickedObject) && + pickedObject.id instanceof SuperMap3D.Entity + ) { + targetEntity = pickedObject.id; } -}, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); - -function deactiveAll() { - handlerPoint_frustum.deactivate(); + }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); } function add() { - deactiveAll(); - handlerPoint_frustum.activate(); + deactiveAll(); + handlerPoint_frustum.activate(); +} + +function deactiveAll() { + handlerPoint_frustum.deactivate(); } function clear() { - deactiveAll(); - if(handlerPoint_frustum) handlerPoint_frustum.clear(); - viewer.entities.removeAll(); - state.displayMode = 'Fill'; + deactiveAll(); + if (handlerPoint_frustum) handlerPoint_frustum.clear(); + viewer.entities.removeAll(); + state.displayMode = "Fill"; } watch( - () => state.bottomRadius, - (val) => { - if (targetEntity) { - targetEntity.cylinder.bottomRadius = val; - } + () => state.bottomRadius, + (val) => { + if (targetEntity) { + targetEntity.cylinder.bottomRadius = val; } + } ); watch( - () => state.cylinderLength, - (val) => { - if (targetEntity) { - targetEntity.cylinder.length = val; - } + () => state.cylinderLength, + (val) => { + if (targetEntity) { + targetEntity.cylinder.length = val; } + } ); watch( - () => state.geometryMaterial, - (val) => { - if (targetEntity) { - targetEntity.cylinder['material'] = SuperMap3D.Color.fromCssColorString(val); - } + () => state.geometryColor, + (val) => { + if (targetEntity) { + targetEntity.cylinder["material"] = + SuperMap3D.Color.fromCssColorString(val); } + } ); watch( - () => state.displayMode, - (val) => { - if (targetEntity) { - if (val === 'Fill') { - targetEntity.cylinder.fill = true; - targetEntity.cylinder.outline = false; - } else { - targetEntity.cylinder.fill = false; - targetEntity.cylinder.outline = true; - } - } + () => state.wireframeColor, + (val) => { + if (targetEntity) { + targetEntity.cylinder["outlineColor"] = + SuperMap3D.Color.fromCssColorString(val); } + } +); +watch( + () => state.displayMode, + (val) => { + if (targetEntity) { + if (val === "Fill") { + targetEntity.cylinder.fill = true; + targetEntity.cylinder.outline = false; + } else if (val === "Outline") { + targetEntity.cylinder.fill = false; + targetEntity.cylinder.outline = true; + } else { + targetEntity.cylinder.fill = true; + targetEntity.cylinder.outline = true; + } + } + } ); - -onBeforeUnmount(() => { - clear(); -}); - - </script> - - -<style lang="scss" scoped> -</style> - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/objectPainting/draw-geomety/index.vue b/SuperMap iEarth/src/package/objectPainting/draw-geomety/index.vue index a4015f89..4786965f 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-geomety/index.vue +++ b/SuperMap iEarth/src/package/objectPainting/draw-geomety/index.vue @@ -1,12 +1,16 @@ <template> <!-- 绘制线 --> - <div class="row-item"> - <span class="name">{{$t('global.symbolLibrary')}}</span> - <div class="icon-list-space" style="width: 1.96rem;"> - <span v-for="(line, index) in state.lines" :key="index" class="icon-span-four" :title="line.name" - :class="line.isSelect ? 'selected-icon' : ''" @click="changleIconItem(line)"> - <!-- <svg-icon :name="line.iconName" class="icon-size" /> --> + <span class="name">{{ $t("symbolLibrary") }}</span> + <div class="icon-list-space" style="width: 1.96rem"> + <span + v-for="(line, index) in state.lines" + :key="index" + class="icon-span-four" + :title="line.name" + :class="line.isSelect ? 'selected-icon' : ''" + @click="changleIconItem(line)" + > <i class="iconfont iconSize" :class="line.iconName"></i> </span> </div> @@ -31,48 +35,47 @@ <div v-if="state.selectedId === 3"> <frustum></frustum> </div> - </template> - + <script lang="ts" setup> import { reactive, onBeforeUnmount } from "vue"; -import ellipseGeo from "./coms/ellipse.vue" -import box from "./coms/box.vue" -import ellipsoid from "./coms/ellipsoid.vue" -import frustum from "./coms/frustum.vue" +import ellipseGeo from "./coms/ellipse.vue"; +import box from "./coms/box.vue"; +import ellipsoid from "./coms/ellipsoid.vue"; +import frustum from "./coms/frustum.vue"; -// 初始化数据 +// 初始化变量 let state = reactive({ lines: [ { id: 0, iconName: "iconyuanzhu", - name: GlobalLang.cylinder, + name: $t("cylinder"), nameEN: "elipse", isSelect: true, }, { id: 1, iconName: "iconlifangti", - name: GlobalLang.cube, + name: $t("cube"), nameEN: "box", isSelect: false, }, { id: 2, iconName: "iconqiuti", - name: GlobalLang.sphere, + name: $t("sphere"), nameEN: "ellipsoid", isSelect: false, }, { id: 3, iconName: "iconyuanzhui", - name: GlobalLang.cone, + name: $t("cone"), nameEN: "frustum", isSelect: false, - } + }, ], selectedId: 0, }); @@ -92,17 +95,4 @@ function changleIconItem(item: any) { onBeforeUnmount(() => { viewer.entities.removeAll(); }); - - </script> - - -<style lang="scss" scoped> - -</style> - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/objectPainting/draw-line/index.vue b/SuperMap iEarth/src/package/objectPainting/draw-line/drawLine.vue similarity index 71% rename from SuperMap iEarth/src/package/objectPainting/draw-line/index.vue rename to SuperMap iEarth/src/package/objectPainting/draw-line/drawLine.vue index bb8ba2fa..0023cf77 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-line/index.vue +++ b/SuperMap iEarth/src/package/objectPainting/draw-line/drawLine.vue @@ -1,17 +1,17 @@ <template> <!-- 绘制线 --> <div class="row-item"> - <span>{{$t('global.drawMode')}}</span> + <span>{{ $t("drawMode") }}</span> <n-select - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.selectedType" :options="state.optionMode" /> </div> - <div class="row-item"> - <span class="name">{{$t('global.symbolLibrary')}}</span> - <div class="icon-list-space" style="width: 1.96rem;"> + <div class="row-item no-center"> + <span class="name">{{ $t("symbolLibrary") }}</span> + <div class="icon-list-space" style="width: 1.96rem"> <span v-for="(line, index) in state.lineOptions" :key="index" @@ -26,7 +26,7 @@ </div> <div class="row-item"> - <span>{{$t('global.lineColor')}}</span> + <span>{{ $t("lineColor") }}</span> <div class="color-pick-box"> <n-color-picker v-model:value="state.lineColor" @@ -41,32 +41,82 @@ </div> <div class="row-item"> - <span>{{$t('global.lineWidth')}}</span> + <span>{{ $t("lineWidth") }}</span> <div class="slider-box"> <n-slider style="width: 1.5rem" v-model:value="state.lineWidth" - :step="1" + :step="0.1" + :min="1" + :max="50" + /> + <n-input-number + v-model:value="state.lineWidth" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="50" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item" v-show="state.selectedId === 2"> + <span>{{ $t("outLineColor") }}</span> + <div class="color-pick-box"> + <n-color-picker + v-model:value="state.outLineColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> + </div> + </div> + + <div class="row-item" v-show="state.selectedId === 2"> + <span>{{ $t("outLineWidth") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.outLineWidth" + :step="0.1" :min="1" - :max="10" + :max="50" + /> + <n-input-number + v-model:value="state.outLineWidth" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="50" + placeholder="" + size="small" /> - <span>{{ state.lineWidth }}</span> </div> </div> - <div class="row-item"> - <span>{{$t('global.editLine')}}</span> - <div class="check-box" > - <n-checkbox v-model:checked="state.isEdit"></n-checkbox> - </div> + <span>{{ $t("editLine") }}</span> + <div class="check-box"> + <n-checkbox v-model:checked="state.isEdit"></n-checkbox> </div> + </div> + <div class="row-item"> - <span>{{$t('global.editLineZ')}}</span> - <div class="check-box"> - <n-checkbox v-model:checked="state.isEditZ"></n-checkbox> - </div> + <span>{{ $t("editLineZ") }}</span> + <div class="check-box"> + <n-checkbox v-model:checked="state.isEditZ"></n-checkbox> </div> + </div> + <div class="btn-row-item"> <n-button type="info" @@ -74,36 +124,43 @@ text-color="#fff" @click="add" style="margin-right: 0.1rem" - >{{$t('global.Draw')}}</n-button + >{{ $t("Draw") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </template> - - <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch } from "vue"; + +<script lang="ts" setup> +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; import { useNotification } from "naive-ui"; import initHandler from "@/tools/drawHandler"; import setEditHandler from "@/tools/editHandler"; -type stateType = { - selectedType: string, // 当前选择的绘制模式 - selectedId: number, // 当前选择的线类型索引 - lineColor: string, //设置线颜色 - lineWidth: number, //设置选中线宽 - dottedColor: string, //间隔颜色 - dottedLength: number, - outLineColor: string, - outLineWidth: number, - glowStrength: number, - trailPercentage: number, - isEdit: boolean, // 是否编辑 - isEditZ: boolean, // 是否只编辑Z轴 - optionMode:any,// 绘制模式选项 - lineOptions:any,// 线类型选项 -} +const notification = useNotification(); -// 初始化数据 +type stateType = { + selectedType: string; // 当前选择的绘制模式 + selectedId: number; // 当前选择的线类型索引 + lineColor: string; //设置线颜色 + lineWidth: number; //设置选中线宽 + dottedColor: string; //间隔颜色 + dottedLength: number; + outLineColor: string; // 轮廓线颜色 + outLineWidth: number; // 轮廓线宽度 + glowStrength: number; + trailPercentage: number; + isEdit: boolean; // 是否编辑 + isEditZ: boolean; // 是否只编辑Z轴 + optionMode: any; // 绘制模式选项 + lineOptions: any; // 线类型选项 +}; +// 初始化变量 let state = reactive<stateType>({ selectedType: "NONE", selectedId: 0, @@ -114,24 +171,24 @@ let state = reactive<stateType>({ outLineColor: "rgba(29, 206, 200, 1)", outLineWidth: 2, glowStrength: 0.5, - trailPercentage: 0.3, - isEdit: false, + trailPercentage: 0.2, + isEdit: true, isEditZ: false, optionMode: [ { - label: () => GlobalLang.spaceMode, + label: () => $t("spaceMode"), value: "NONE", }, { - label: () => GlobalLang.closeGroundMode, + label: () => $t("closeGroundMode"), value: "TERRAIN", }, { - label: () => GlobalLang.closeS3MMode, + label: () => $t("closeS3MMode"), value: "S3M_TILE", }, { - label: () => GlobalLang.closeBoth, + label: () => $t("closeBoth"), value: "BOTH", }, ], @@ -139,61 +196,62 @@ let state = reactive<stateType>({ { id: 0, iconName: "iconshixian", - name: GlobalLang.solidLine, + name: $t("solidLine"), nameEN: "solidline", isSelect: true, }, { id: 1, iconName: "iconxuxian", - name: GlobalLang.dashedLine, + name: $t("dashedLine"), nameEN: "dottedline", isSelect: false, }, { id: 2, iconName: "iconlunkuoxian", - name: GlobalLang.outline, + name: $t("outline"), nameEN: "outline", isSelect: false, }, { id: 3, iconName: "iconjiantou", - name: GlobalLang.arrowLine, + name: $t("arrowLine"), nameEN: "arrowline", isSelect: false, }, { id: 4, iconName: "iconguangyunxian", - name: GlobalLang.haloLine, + name: $t("haloLine"), nameEN: "haloline", isSelect: false, }, { id: 5, iconName: "iconweijixian", - name: GlobalLang.wakeLine, + name: $t("wakeLine"), nameEN: "trailline", isSelect: false, }, ], }); -const notification = useNotification(); +let line_ids: any[] = []; +let selected_line: any = undefined; +let handlerPolyline, removeEdit, clampToGround, classificationType; -let handlerPolyline, - removeEdit, - line_ids: any[] = []; -let clampToGround = undefined, - classificationType = undefined, - selected_line: any = undefined; +onMounted(() => {}); + +onBeforeUnmount(() => { + clear(); +}); // 分析 function add() { notification.create({ - content: () => GlobalLang.editLineTip, + content: () => $t("editLineTip"), duration: 3500, }); add_line(); @@ -208,6 +266,7 @@ function add_line() { (res) => { creat_entity_line(res.object.positions); handlerPolyline.polylineTransparent.show = false; + if (state.isEdit) setEdit(); }, (err) => { console.log(err); @@ -216,21 +275,6 @@ function add_line() { handlerPolyline.activate(); } -// 清除 -function clear() { - if (handlerPolyline) handlerPolyline.clearHandler(); - if (selected_line) { - viewer.entities.removeById(selected_line.id); - selected_line = undefined; - } else { - line_ids.forEach((id) => viewer.entities.removeById(id)); - line_ids.length = 0; - } - removeEditHandler(); - - state.isEdit = false; -} - // 根据索引创建不同类型的线实体 - entity function creat_entity_line(position: any) { let lineColor = SuperMap3D.Color.fromCssColorString(state.lineColor); @@ -274,9 +318,10 @@ function creat_entity_line(position: any) { case 5: let trailPercentage = Number(state.trailPercentage); material = new SuperMap3D.PolylineTrailMaterialProperty({ + // 尾迹线材质 color: lineColor, trailLength: trailPercentage, - // period: state.trailPeroid + period: 5.0, // 该属性为PolylineTrailMaterialProperty必设置值属性 }); break; default: @@ -340,6 +385,20 @@ function changleIconItem(item: any) { } } +// 清除 +function clear() { + if (handlerPolyline) handlerPolyline.clearHandler(); + if (selected_line) { + viewer.entities.removeById(selected_line.id); + selected_line = undefined; + } else { + line_ids.forEach((id) => viewer.entities.removeById(id)); + line_ids.length = 0; + } + removeEditHandler(); +} + +// 监听 watch( () => state.selectedType, (val) => { @@ -362,7 +421,6 @@ watch( } } ); - watch( () => state.lineColor, (val) => { @@ -384,7 +442,6 @@ watch( if (selected_line) selected_line.polyline.material.gapColor = color; } ); - watch( () => state.dottedLength, (val) => { @@ -418,13 +475,12 @@ watch( selected_line.polyline.material.trailLength = Number(val); } ); - watch( () => state.isEdit, (val) => { if (val) { notification.create({ - content: () => GlobalLang.editLineTip, + content: () => $t("editLineTip"), duration: 3500, }); setEdit(); @@ -439,19 +495,4 @@ watch( } } ); - -onBeforeUnmount(() => { - clear(); -}); - </script> - - -<style lang="scss" scoped> -</style> - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/objectPainting/draw-line/index.ts b/SuperMap iEarth/src/package/objectPainting/draw-line/index.ts index 76c46947..72874aee 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-line/index.ts +++ b/SuperMap iEarth/src/package/objectPainting/draw-line/index.ts @@ -1,3 +1,3 @@ -import SmDrawLine from './index.vue'; +import SmDrawLine from './drawLine.vue'; export default SmDrawLine; diff --git a/SuperMap iEarth/src/package/objectPainting/draw-particle/coms/fire.vue b/SuperMap iEarth/src/package/objectPainting/draw-particle/coms/fire.vue index 0a895809..db43f293 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-particle/coms/fire.vue +++ b/SuperMap iEarth/src/package/objectPainting/draw-particle/coms/fire.vue @@ -1,145 +1,274 @@ <template> - <!-- <div class="row-item"> - <span>类型</span> - <n-select style="width: 1.96rem;height: 32px;" v-model:value="state.selectedType" size="small" - :options="state.optionMode" /> - </div> --> - <n-checkbox v-model:checked="state.showEditCheck" style="margin-left: 1.2rem; margin-bottom: 0.1rem"> - {{$t('global.displayEdit')}} - </n-checkbox> + <!-- <n-checkbox + v-model:checked="state.showEditCheck" + style="margin-left: 1.2rem; margin-bottom: 0.1rem" + > + {{ $t("displayEdit") }} + </n-checkbox> --> - <div class="row-item" v-show="state.showEditCheck"> - <span>{{$t('global.parameterSet')}}</span> - <div style="width: 1.96rem;"> + <!-- <div class="row-item" v-show="state.showEditCheck"> --> + <div class="row-item"> + <span>{{ $t("parameterSet") }}</span> + <div style="width: 1.96rem"> <n-switch v-model:value="state.setParam" size="small" /> </div> </div> <!-- 参数设置 --> <div v-show="state.setParam"> - <!-- <div class="row-item"> - <span>发射类型</span> - <n-select style="width: 1.96rem;height: 32px;" v-model:value="state.selectedType" size="small" - :options="state.optionMode" /> - </div> --> + <div class="row-item"> + <span>{{ $t("emitSpeed") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.emitRate" + style="width: 70%" + :min="10" + :max="2500" + :step="10" + /> + <n-input-number + v-model:value="state.emitRate" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="10" + :max="2500" + placeholder="" + size="small" + /> + </div> + </div> - <!-- <div class="row-item"> - <span>发射速度</span> - <n-input-number style="width: 1.96rem;" v-model:value="state.emitRate" :show-button="false"> - </n-input-number> - </div> --> <div class="row-item"> - <span>{{$t('global.emitSpeed')}}</span> + <span>{{ $t("lifeCycle") }}</span> <div class="slider-box"> - <n-slider v-model:value="state.emitRate" :min="1" :max="2500" :step="20" /> - <div class="row-slider-num">{{ state.emitRate }}</div> + <n-input-number + v-model:value="state.lifeRange[0]" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0.1" + :max="1.0" + placeholder="" + size="small" + /> + <n-slider + style="width: 1.5rem" + v-model:value="state.lifeRange" + :step="0.1" + range + :min="0.1" + :max="1.0" + /> + <n-input-number + v-model:value="state.lifeRange[1]" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0.1" + :max="1.0" + placeholder="" + size="small" + /> </div> </div> + <div class="row-item"> - <span>{{$t('global.lifeCycle')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.lifeRange" :step="0.001" range :min="0.005" :max="0.25" /> - <!-- <span>{{ state.lifeRange }}</span> --> + <span>{{ $t("speedRange") }}</span> + <div class="slider-box"> + <n-input-number + v-model:value="state.speedRange[0]" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="100" + placeholder="" + size="small" + /> + <n-slider + style="width: 1.5rem" + v-model:value="state.speedRange" + :step="1" + range + :min="1" + :max="100" + /> + <n-input-number + v-model:value="state.speedRange[1]" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="100" + placeholder="" + size="small" + /> </div> </div> + <div class="row-item"> - <span>{{$t('global.speedRange')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.speedRange" :step="1" range :min="1" :max="100" /> - <!-- <span>{{ state.speedRange }}</span> --> + <span>{{ $t("scaleRange") }}</span> + <div class="slider-box"> + <n-input-number + v-model:value="state.scaleRange[0]" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="100" + placeholder="" + size="small" + /> + <n-slider + style="width: 1.5rem" + v-model:value="state.scaleRange" + :step="1" + range + :min="1" + :max="100" + /> + <n-input-number + v-model:value="state.scaleRange[1]" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="100" + placeholder="" + size="small" + /> </div> </div> + <div class="row-item"> - <span>{{$t('global.scaleRange')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.scaleRange" :step="1" range :min="1" :max="100" /> - <!-- <span>{{ state.scaleRange }}</span> --> - </div> - </div> - <!-- <div class="row-item"> - <span>重力</span> - <div class="slider-box" style="width: 1.96rem;height: 32px;"> - <n-slider style="width: 1.5rem" v-model:value="state.gravity" :step="1" :min="10" :max="200" /> - <span>{{ state.gravity }}</span> + <span>{{ $t("gravity") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.gravity" + style="width: 70%" + :min="-20" + :max="20" + :step="1" + /> + <n-input-number + v-model:value="state.gravity" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :step="1" + :min="-20" + :max="20" + placeholder="" + size="small" + /> </div> - </div> --> + </div> </div> <div class="btn-row-item"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="add" style="margin-right: 0.1rem">{{$t('global.add')}}</n-button> - <n-button class="btn-secondary" @click="clear">{{$t('global.clear')}}</n-button> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="add" + style="margin-right: 0.1rem" + >{{ $t("add") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + <!-- <n-button class="btn-secondary" @click="clear">{{ $t("clear") }}</n-button> --> </div> </template> - + <script lang="ts" setup> -import { reactive, onMounted,onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; import { useLayerStore } from "@/store/index"; const layerStore = useLayerStore(); const scene = viewer.scene; -// 初始化数据 +// 初始化变量 let state = reactive({ selectedType: "NONE", selectedId: 0, showEditCheck: true, setParam: false, emitRate: 50, - lifeRange: [0.005, 0.25], - speedRange: [1, 10], - scaleRange:[1,10], - gravity: 0, + lifeRange: [0.2, 0.8], + speedRange: [20, 80], + scaleRange: [20, 80], + gravity: -8.0, }); -let fireUrl: string = './Resource/particle/Fire.json'; +let particle, clickHandle; +let fireUrl: string = "./Resource/particle/Fire.json"; let modelMatrix = new SuperMap3D.Matrix4(); -let particle,clickHandle; onMounted(() => { init(); -}) +}); + +onBeforeUnmount(() => { + clear(false); +}); function init() { - if(window.EarthGlobal && window.EarthGlobal["fire"]){ - particle = window.EarthGlobal["fire"]; + if (window.EarthGlobal && window.EarthGlobal["fire"]) { + particle = window.EarthGlobal["fire"]; } - if(layerStore.particleOptions.fire){ - let option = layerStore.particleOptions.fire['particleAttr']; - if(option) switchCase(option); + if (layerStore.particleOptions.fire) { + let option = layerStore.particleOptions.fire["particleAttr"]; + if (option) switchCase(option); } } // 加载粒子文件 -function loadParticleFile(url:string,option?:any) { - SuperMap3D.ParticleHelper.fromJsonUrl(url, scene).then(function (particleSystem) { +function loadParticleFile(url: string, option?: any) { + SuperMap3D.ParticleHelper.fromJsonUrl(url, scene).then(function ( + particleSystem + ) { particle = particleSystem; particle.modelMatrix = modelMatrix; - + // 设置参数 if (option) { for (let key in option) { switch (key) { case "emitRate": - particle['emitRate'] = Number(option[key]); + particle["emitRate"] = Number(option[key]); break; case "minLifeTime": - particle['minLifeTime'] = Number(option[key]); + particle["minLifeTime"] = Number(option[key]); break; case "maxLifeTime": - particle['maxLifeTime'] = Number(option[key]); + particle["maxLifeTime"] = Number(option[key]); break; case "minEmitPower": - particle['minEmitPower'] = Number(option[key]); + particle["minEmitPower"] = Number(option[key]); break; case "maxEmitPower": - particle['maxEmitPower'] = Number(option[key]); + particle["maxEmitPower"] = Number(option[key]); break; case "minSize": - particle['minSize'] = Number(option[key]); + particle["minSize"] = Number(option[key]); break; case "maxSize": - particle['maxSize'] = Number(option[key]); + particle["maxSize"] = Number(option[key]); break; } } @@ -152,34 +281,37 @@ function loadParticleFile(url:string,option?:any) { // 立体火焰 环形火 爆炸火 喷泉 function add() { clear(); + window.viewer.enableCursorStyle = false; + window.viewer._element.style.cursor = ""; + document.body.classList.add("measureCur"); clickHandle = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); clickHandle.setInputAction(function (click) { let centerPosition = viewer.scene.pickPosition(click.position); - SuperMap3D.Transforms.eastNorthUpToFixedFrame(centerPosition, undefined, modelMatrix); + SuperMap3D.Transforms.eastNorthUpToFixedFrame( + centerPosition, + undefined, + modelMatrix + ); loadParticleFile(fireUrl); - layerStore.particleOptions['fire'] = { - particleUrl:fireUrl, - particlePosition:centerPosition, - particleAttr:{} + layerStore.particleOptions["fire"] = { + particleUrl: fireUrl, + particlePosition: centerPosition, + particleAttr: {}, }; - - // let options = { - // particleUrl:fireUrl, - // particlePosition:centerPosition - // } - // layerStore.addParticleFile(options); - clickHandle.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK)//移除事件 + clickHandle.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); //移除事件 + window.viewer.enableCursorStyle = true; + document.body.classList.remove("measureCur"); }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); } -function clear(flag=true) { +function clear(flag = true) { if (!SuperMap3D.defaultValue(particle)) return; scene.primitives.remove(particle); - if(flag) layerStore.particleOptions['fire'] = null; -}; + if (flag) layerStore.particleOptions["fire"] = null; +} // 设置参数 -function switchCase(option:any) { +function switchCase(option: any) { for (let key in option) { switch (key) { case "emitRate": @@ -214,65 +346,69 @@ function switchCase(option:any) { watch( () => state.emitRate, - val => { + (val) => { if (!particle) return; - particle['emitRate'] = Number(val); - layerStore.particleOptions['fire']['particleAttr']['emitRate'] = Number(val); + particle["emitRate"] = Number(val); + layerStore.particleOptions["fire"]["particleAttr"]["emitRate"] = + Number(val); } ); - watch( () => state.lifeRange, - val => { - if(val.length>1){ - // console.log("生命周期:",val); + (val) => { + if (!particle) return; + if (val.length > 1) { particle["minLifeTime"] = Number(val[0]); particle["maxLifeTime"] = Number(val[1]); - layerStore.particleOptions['fire']['particleAttr']['minLifeTime'] = Number(val[0]); - layerStore.particleOptions['fire']['particleAttr']['maxLifeTime'] = Number(val[1]); + layerStore.particleOptions["fire"]["particleAttr"]["minLifeTime"] = + Number(val[0]); + layerStore.particleOptions["fire"]["particleAttr"]["maxLifeTime"] = + Number(val[1]); } } ); - watch( () => state.speedRange, - val => { - if(val.length>1){ - // console.log("速度范围:",val); + (val) => { + if (!particle) return; + if (val.length > 1) { particle["minEmitPower"] = Number(val[0]); particle["maxEmitPower"] = Number(val[1]); - layerStore.particleOptions['fire']['particleAttr']['minEmitPower'] = Number(val[0]); - layerStore.particleOptions['fire']['particleAttr']['maxEmitPower'] = Number(val[1]); + layerStore.particleOptions["fire"]["particleAttr"]["minEmitPower"] = + Number(val[0]); + layerStore.particleOptions["fire"]["particleAttr"]["maxEmitPower"] = + Number(val[1]); } } ); - watch( () => state.scaleRange, - val => { - if(val.length>1){ - // console.log("比例范围:",val); + (val) => { + if (!particle) return; + if (val.length > 1) { particle["minSize"] = Number(val[0]); particle["maxSize"] = Number(val[1]); - layerStore.particleOptions['fire']['particleAttr']['minSize'] = Number(val[0]); - layerStore.particleOptions['fire']['particleAttr']['maxSize'] = Number(val[1]); + layerStore.particleOptions["fire"]["particleAttr"]["minSize"] = Number( + val[0] + ); + layerStore.particleOptions["fire"]["particleAttr"]["maxSize"] = Number( + val[1] + ); } } ); - - -onBeforeUnmount(() => { - clear(false); -}); - +watch( + () => state.gravity, + (val) => { + if (!particle) return; + particle.gravity = new SuperMap3D.Cartesian3(0, 0, Number(val)); + layerStore.particleOptions["fire"]["particleAttr"]["gravity"] = Number(val); + } +); </script> - -<style lang="scss" scoped> +<style lang="scss" scoped> +.slider-input-number { + margin: 0px -0.1rem 0px 0px; +} </style> - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/objectPainting/draw-particle/coms/fireworks.vue b/SuperMap iEarth/src/package/objectPainting/draw-particle/coms/fireworks.vue index 678dd923..cf1f44e2 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-particle/coms/fireworks.vue +++ b/SuperMap iEarth/src/package/objectPainting/draw-particle/coms/fireworks.vue @@ -1,35 +1,47 @@ <template> <div class="btn-row-item"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="add" style="margin-right: 0.1rem">{{ $t('global.add') - }}</n-button> - <n-button class="btn-secondary" @click="clear">{{ $t('global.clear') }}</n-button> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="add" + style="margin-right: 0.1rem" + >{{ $t("add") }}</n-button + > + <n-button class="btn-secondary" @click="clear">{{ $t("clear") }}</n-button> </div> </template> - + <script lang="ts" setup> -import { onMounted,onBeforeUnmount } from "vue"; -import { useLayerStore } from "@/store/index" +import { onMounted, onBeforeUnmount } from "vue"; +import { useLayerStore } from "@/store/index"; const layerStore = useLayerStore(); const scene = viewer.scene; -onMounted(() => { - init(); -}) - function init() { - if(window.EarthGlobal && window.EarthGlobal["fireWork"]){ + if (window.EarthGlobal && window.EarthGlobal["fireWork"]) { setIntervalList = window.EarthGlobal["fireWork"]; } } +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(false); +}); + let modelMatrix = new SuperMap3D.Matrix4(); -let clickHandle, setIntervalList:any[] = [],particleSystemList:any[] = []; +let clickHandle, + setIntervalList: any[] = [], + particleSystemList: any[] = []; -let sparkOneUrl = './Resource/particle/babylon/sparkGravityOne.json'; -let sparkTwoUrl = './Resource/particle/babylon/sparkGravityTwo.json'; -let sparkThreeUrl = './Resource/particle/babylon/sparkGravityThree.json'; -let sparkFourUrl = './Resource/particle/babylon/sparkGravityFour.json'; +let sparkOneUrl = "./Resource/particle/babylon/sparkGravityOne.json"; +let sparkTwoUrl = "./Resource/particle/babylon/sparkGravityTwo.json"; +let sparkThreeUrl = "./Resource/particle/babylon/sparkGravityThree.json"; +let sparkFourUrl = "./Resource/particle/babylon/sparkGravityFour.json"; let numberOfSparks = 8; let xMin = -2100.0; @@ -43,20 +55,21 @@ let sparkInterval = (xMax - xMin) / numberOfSparks; function createSpark() { for (let i = 0; i < numberOfSparks; ++i) { - let x = SuperMap3D.Math.randomBetween(xMin + i * sparkInterval, xMin + (i + 1) * sparkInterval); + let x = SuperMap3D.Math.randomBetween( + xMin + i * sparkInterval, + xMin + (i + 1) * sparkInterval + ); let y = SuperMap3D.Math.randomBetween(yMin, yMax); let z = SuperMap3D.Math.randomBetween(zMin, zMax); let offset = new SuperMap3D.Cartesian3(x, y, z); - let url = ''; - if (i % 4 === 0) - url = sparkOneUrl; - if (i % 4 === 1) - url = sparkTwoUrl; - if (i % 4 === 2) - url = sparkThreeUrl; - if (i % 4 === 3) - url = sparkFourUrl; - SuperMap3D.ParticleHelper.fromJsonUrl(url, scene).then(function (particleSystem) { + let url = ""; + if (i % 4 === 0) url = sparkOneUrl; + if (i % 4 === 1) url = sparkTwoUrl; + if (i % 4 === 2) url = sparkThreeUrl; + if (i % 4 === 3) url = sparkFourUrl; + SuperMap3D.ParticleHelper.fromJsonUrl(url, scene).then(function ( + particleSystem + ) { settingParticleSys(particleSystem, offset, i); }); } @@ -64,7 +77,6 @@ function createSpark() { // 设置当前粒子系统 function settingParticleSys(particleSystem, offset, index) { - // 添加多个 particleSystem.modelMatrix = modelMatrix; particleSystem.worldOffset.x = offset.x; @@ -80,28 +92,37 @@ function settingParticleSys(particleSystem, offset, index) { // 添加一个 // particleSystem.modelMatrix = modelMatrix; // scene.primitives.add(particleSystem); - // particleSystem.start(); + // particleSystem.start(); } -function addSpark(centerPosition){ - SuperMap3D.Transforms.eastNorthUpToFixedFrame(centerPosition, undefined, modelMatrix); +function addSpark(centerPosition) { + SuperMap3D.Transforms.eastNorthUpToFixedFrame( + centerPosition, + undefined, + modelMatrix + ); createSpark(); } // 添加粒子 function add() { + window.viewer.enableCursorStyle = false; + window.viewer._element.style.cursor = ""; + document.body.classList.add("measureCur"); clickHandle = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); clickHandle.setInputAction(function (click) { let centerPosition = viewer.scene.pickPosition(click.position); - layerStore.particleOptions['fireWork'] = { - fireWorkPosition:centerPosition - } + layerStore.particleOptions["fireWork"] = { + fireWorkPosition: centerPosition, + }; addSpark(centerPosition); - clickHandle.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK)//移除事件 + clickHandle.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); //移除事件 + window.viewer.enableCursorStyle = true; + document.body.classList.remove("measureCur"); }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); } -function clear(flag=true) { +function clear(flag = true) { // 这种删除方式遇到通视分析会卡死 // if(setIntervalList.length>0){ // scene.primitives.removeAll(); @@ -114,33 +135,20 @@ function clear(flag=true) { particleSystemList = []; // 暂时还是使用这种方式,等生命周期结束,就是不能一哈子删除 - if(setIntervalList.length>0){ - setIntervalList.forEach(setIntervalFlag => { + if (setIntervalList.length > 0) { + setIntervalList.forEach((setIntervalFlag) => { clearInterval(setIntervalFlag); }); - setIntervalList = [] + setIntervalList = []; } - if(flag) layerStore.particleOptions['fireWork'] = null; - -}; - - -onBeforeUnmount(() => { - clear(false); -}); - + if (flag) layerStore.particleOptions["fireWork"] = null; +} </script> - + <style lang="scss" scoped> :deep(.n-slider-handle) { background-color: #414141 !important; - border: 1.5px solid #3499E5 !important; + border: 1.5px solid #3499e5 !important; } </style> - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/objectPainting/draw-particle/coms/water.vue b/SuperMap iEarth/src/package/objectPainting/draw-particle/coms/water.vue index f493d4c7..7f15f75a 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-particle/coms/water.vue +++ b/SuperMap iEarth/src/package/objectPainting/draw-particle/coms/water.vue @@ -1,87 +1,232 @@ <template> - <!-- <div class="row-item"> - <span>类型</span> - <n-select style="width: 1.96rem;height: 32px;" v-model:value="state.selectedType" size="small" - :options="state.optionMode" /> - </div> --> - <n-checkbox v-model:checked="state.showEditCheck" style="margin-left: 1.2rem; margin-bottom: 0.1rem"> - {{$t('global.displayEdit')}} - </n-checkbox> + <!-- <n-checkbox + v-model:checked="state.showEditCheck" + style="margin-left: 1.2rem; margin-bottom: 0.1rem" + > + {{ $t("displayEdit") }} + </n-checkbox> --> - <div class="row-item" v-show="state.showEditCheck"> - <span>{{$t('global.parameterSet')}}</span> - <div style="width: 1.96rem;"> + <!-- <div class="row-item" v-show="state.showEditCheck"> --> + <div class="row-item"> + <span>{{ $t("parameterSet") }}</span> + <div style="width: 1.96rem"> <n-switch v-model:value="state.setParam" size="small" /> </div> </div> <!-- 参数设置 --> <div v-show="state.setParam"> - - <div class="row-item"> - <span>{{$t('global.emitType')}}</span> - <n-select style="width: 1.96rem;height: 32px;" v-model:value="state.selectedType" - :options="state.optionMode" /> + <span>{{ $t("emitType") }}</span> + <n-select + style="width: 1.96rem; height: 32px" + v-model:value="state.selectedType" + :options="state.optionMode" + /> </div> + <div class="row-item"> - <span>{{$t('global.particleNumber')}}</span> + <span>{{ $t("particleNumber") }}</span> <div class="slider-box"> - <n-slider v-model:value="state.emitRate" style="width: 70%" :min="1" :max="2500" :step="20" /> - <div class="row-slider-num">{{ state.emitRate }}</div> + <n-slider + v-model:value="state.emitRate" + style="width: 70%" + :min="1" + :max="2500" + :step="10" + /> + <n-input-number + v-model:value="state.emitRate" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="2500" + placeholder="" + size="small" + /> </div> </div> + <div class="row-item"> - <span>{{$t('global.particleSize')}}</span> + <span>{{ $t("particleSize") }}</span> <div class="slider-box"> - <n-slider v-model:value="state.particleSize" style="width: 70%" :min="1" :max="60" :step="1" /> - <div class="row-slider-num">{{ state.particleSize }}</div> + <n-slider + v-model:value="state.particleSize" + style="width: 70%" + :min="1" + :max="60" + :step="1" + /> + <n-input-number + v-model:value="state.particleSize" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="60" + placeholder="" + size="small" + /> </div> </div> + <div class="row-item"> - <span>{{$t('global.lifeCycle')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.lifeRange" :step="1" range :min="0.1" :max="30" /> - <!-- <span>{{ state.lifeRange }}</span> --> + <span>{{ $t("lifeCycle") }}</span> + <div class="slider-box"> + <n-input-number + v-model:value="state.lifeRange[0]" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0.1" + :max="30" + placeholder="" + size="small" + /> + <n-slider + style="width: 1.5rem" + v-model:value="state.lifeRange" + range + :step="1" + :min="0.1" + :max="30" + /> + <n-input-number + v-model:value="state.lifeRange[1]" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0.1" + :max="30" + placeholder="" + size="small" + /> </div> </div> + <div class="row-item"> - <span>{{$t('global.speedRange')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.speedRange" :step="1" range :min="1" :max="30" /> - <!-- <span>{{ state.speedRange }}</span> --> + <span>{{ $t("speedRange") }}</span> + <div class="slider-box"> + <n-input-number + v-model:value="state.speedRange[0]" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="30" + placeholder="" + size="small" + /> + <n-slider + style="width: 1.5rem" + v-model:value="state.speedRange" + range + :step="1" + :min="1" + :max="30" + /> + <n-input-number + v-model:value="state.speedRange[1]" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="30" + placeholder="" + size="small" + /> </div> </div> + <div class="row-item"> - <span>{{$t('global.scaleRange')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.scaleRange" :step="1" range :min="1" :max="10" /> - <!-- <span>{{ state.scaleRange }}</span> --> + <span>{{ $t("scaleRange") }}</span> + <div class="slider-box"> + <n-input-number + v-model:value="state.scaleRange[0]" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="10" + placeholder="" + size="small" + /> + <n-slider + style="width: 1.5rem" + v-model:value="state.scaleRange" + range + :step="1" + :min="1" + :max="10" + /> + <n-input-number + v-model:value="state.scaleRange[1]" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="10" + placeholder="" + size="small" + /> </div> </div> + <div class="row-item"> - <span>{{$t('global.gravity')}}</span> - <div class="slider-box" > - <n-slider style="width: 1.5rem" v-model:value="state.gravity" :step="1" :min="-20" :max="20" /> - <span>{{ state.gravity }}</span> + <span>{{ $t("gravity") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.gravity" + :step="1" + :min="-20" + :max="20" + /> + <n-input-number + v-model:value="state.gravity" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="-20" + :max="20" + placeholder="" + size="small" + /> </div> </div> </div> <div class="btn-row-item"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="add" style="margin-right: 0.1rem">{{$t('global.add')}}</n-button> - <n-button class="btn-secondary" @click="clear">{{$t('global.clear')}}</n-button> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="add" + style="margin-right: 0.1rem" + >{{ $t("add") }}</n-button + > + <n-button class="btn-secondary" @click="clear">{{ $t("clear") }}</n-button> </div> </template> - + <script lang="ts" setup> -import { reactive,onMounted, onBeforeUnmount, watch } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; import { useLayerStore } from "@/store/index"; const layerStore = useLayerStore(); const scene = viewer.scene; -// 初始化数据 +// 初始化变量 let state = reactive({ selectedType: "Cone", selectedId: 0, @@ -89,47 +234,53 @@ let state = reactive({ setParam: false, emitRate: 1500, particleSize: 1, - lifeRange: [1, 4], - speedRange: [6, 7], + lifeRange: [5, 15], + speedRange: [2, 8], scaleRange: [1, 4], gravity: -8.0, optionMode: [ { - label: () => GlobalLang.coneEmit, + label: () => $t("coneEmit"), value: "Cone", }, { - label: () => GlobalLang.sphereEmit, + label: () => $t("sphereEmit"), value: "Sphere", }, { - label: () => GlobalLang.boxEmit, + label: () => $t("boxEmit"), value: "Box", - } + }, ], }); -let waterUrl: string = './Resource/particle/fountain.json'; -let modelMatrix = new SuperMap3D.Matrix4(); +let waterUrl: string = "./Resource/particle/fountain.json"; let particle_water, clickHandle; - -onMounted(() => { - init(); -}) +let modelMatrix = new SuperMap3D.Matrix4(); function init() { - if(window.EarthGlobal && window.EarthGlobal["water"]){ + if (window.EarthGlobal && window.EarthGlobal["water"]) { particle_water = window.EarthGlobal["water"]; } - if(layerStore.particleOptions.water){ - let option = layerStore.particleOptions.water['particleAttr']; - if(option) switchCase(option); + if (layerStore.particleOptions.water) { + let option = layerStore.particleOptions.water["particleAttr"]; + if (option) switchCase(option); } } +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(false); +}); + // 加载粒子文件 -function loadParticleFile(url,option?:any) { - SuperMap3D.ParticleHelper.fromJsonUrl(url, scene).then(function (particleSystem) { +function loadParticleFile(url, option?: any) { + SuperMap3D.ParticleHelper.fromJsonUrl(url, scene).then(function ( + particleSystem + ) { particle_water = particleSystem; particle_water.modelMatrix = modelMatrix; // scene.primitives.add(particle_water); // 注释避免报错 @@ -140,78 +291,81 @@ function loadParticleFile(url,option?:any) { for (let key in option) { switch (key) { case "emitRate": - particle_water['emitRate'] = Number(option[key]); + particle_water["emitRate"] = Number(option[key]); break; case "minLifeTime": - particle_water['minLifeTime'] = Number(option[key]); + particle_water["minLifeTime"] = Number(option[key]); break; case "maxLifeTime": - particle_water['maxLifeTime'] = Number(option[key]); + particle_water["maxLifeTime"] = Number(option[key]); break; case "minEmitPower": - particle_water['minEmitPower'] = Number(option[key]); + particle_water["minEmitPower"] = Number(option[key]); break; case "maxEmitPower": - particle_water['maxEmitPower'] = Number(option[key]); + particle_water["maxEmitPower"] = Number(option[key]); break; case "minSize": - particle_water['minSize'] = Number(option[key]); + particle_water["minSize"] = Number(option[key]); break; case "maxSize": - particle_water['maxSize'] = Number(option[key]); + particle_water["maxSize"] = Number(option[key]); break; case "minScaleX": - particle_water['minScaleX'] = Number(option[key]); + particle_water["minScaleX"] = Number(option[key]); break; case "minScaleY": - particle_water['minScaleY'] = Number(option[key]); + particle_water["minScaleY"] = Number(option[key]); break; case "maxScaleX": - particle_water['maxScaleX'] = Number(option[key]); + particle_water["maxScaleX"] = Number(option[key]); break; case "maxScaleY": - particle_water['maxScaleY'] = Number(option[key]); + particle_water["maxScaleY"] = Number(option[key]); break; case "gravity": - particle_water.gravity= new SuperMap3D.Cartesian3(0, 0, Number(option[key])); + particle_water.gravity = new SuperMap3D.Cartesian3( + 0, + 0, + Number(option[key]) + ); break; default: break; } } } - }); } // 添加粒子 function add() { clear(); + window.viewer.enableCursorStyle = false; + window.viewer._element.style.cursor = ""; + document.body.classList.add("measureCur"); clickHandle = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); clickHandle.setInputAction(function (click) { let centerPosition = viewer.scene.pickPosition(click.position); - SuperMap3D.Transforms.eastNorthUpToFixedFrame(centerPosition, undefined, modelMatrix); + SuperMap3D.Transforms.eastNorthUpToFixedFrame( + centerPosition, + undefined, + modelMatrix + ); loadParticleFile(waterUrl); - layerStore.particleOptions['water'] = { - particleUrl:waterUrl, - particlePosition:centerPosition, - particleAttr:{} - } - clickHandle.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK)//移除事件 + layerStore.particleOptions["water"] = { + particleUrl: waterUrl, + particlePosition: centerPosition, + particleAttr: {}, + }; + clickHandle.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); //移除事件 + window.viewer.enableCursorStyle = true; + document.body.classList.remove("measureCur"); }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); } -function clear(flag=true) { - // particle_water.clearAll(); - if (!SuperMap3D.defaultValue(particle_water)) return; - scene.primitives.remove(particle_water); - // clickHandle.distory(); - // scene.primitives.removeAll(); - if(flag) layerStore.particleOptions['water'] = null; -}; - // 设置初始参数 -function switchCase(option:any) { +function switchCase(option: any) { for (let key in option) { switch (key) { case "selectedType": @@ -259,9 +413,20 @@ function switchCase(option:any) { } } +// 清除 +function clear(flag = true) { + if (!SuperMap3D.defaultValue(particle_water)) return; + scene.primitives.remove(particle_water); + if (flag) layerStore.particleOptions["water"] = null; + // particle_water.clearAll(); + // clickHandle.distory(); + // scene.primitives.removeAll(); +} + +// 监听 watch( () => state.selectedType, - val => { + (val) => { if (!particle_water) return; switch (val) { case "Cone": @@ -278,97 +443,93 @@ watch( particle_water.createBoxEmitter(direction1, direction2, minBox, maxBox); break; } - layerStore.particleOptions['water']['particleAttr']['emitType'] = val; + layerStore.particleOptions["water"]["particleAttr"]["emitType"] = val; } ); - watch( () => state.emitRate, - val => { + (val) => { if (!particle_water) return; - particle_water['emitRate'] = Number(val); - layerStore.particleOptions['water']['particleAttr']['emitRate'] = Number(val); + particle_water["emitRate"] = Number(val); + layerStore.particleOptions["water"]["particleAttr"]["emitRate"] = + Number(val); } ); watch( () => state.particleSize, - val => { + (val) => { if (!particle_water) return; particle_water.minScaleX = Number(val); particle_water.minScaleY = Number(val); particle_water.maxScaleX = Number(val); particle_water.maxScaleY = Number(val); - layerStore.particleOptions['water']['particleAttr']['minScaleX'] = Number(val); - layerStore.particleOptions['water']['particleAttr']['minScaleY'] = Number(val); - layerStore.particleOptions['water']['particleAttr']['maxScaleX'] = Number(val); - layerStore.particleOptions['water']['particleAttr']['maxScaleY'] = Number(val); + layerStore.particleOptions["water"]["particleAttr"]["minScaleX"] = + Number(val); + layerStore.particleOptions["water"]["particleAttr"]["minScaleY"] = + Number(val); + layerStore.particleOptions["water"]["particleAttr"]["maxScaleX"] = + Number(val); + layerStore.particleOptions["water"]["particleAttr"]["maxScaleY"] = + Number(val); } ); - watch( () => state.lifeRange, - val => { + (val) => { if (!particle_water) return; if (val.length > 1) { - // console.log("生命周期:",val); particle_water["minLifeTime"] = Number(val[0]); particle_water["maxLifeTime"] = Number(val[1]); - layerStore.particleOptions['water']['particleAttr']['minLifeTime'] = Number(val[0]); - layerStore.particleOptions['water']['particleAttr']['maxLifeTime'] = Number(val[1]); + layerStore.particleOptions["water"]["particleAttr"]["minLifeTime"] = + Number(val[0]); + layerStore.particleOptions["water"]["particleAttr"]["maxLifeTime"] = + Number(val[1]); } } ); - watch( () => state.speedRange, - val => { + (val) => { if (!particle_water) return; if (val.length > 1) { - // console.log("速度范围:",val); particle_water["minEmitPower"] = Number(val[0]); particle_water["maxEmitPower"] = Number(val[1]); - layerStore.particleOptions['water']['particleAttr']['minEmitPower'] = Number(val[0]); - layerStore.particleOptions['water']['particleAttr']['maxEmitPower'] = Number(val[1]); + layerStore.particleOptions["water"]["particleAttr"]["minEmitPower"] = + Number(val[0]); + layerStore.particleOptions["water"]["particleAttr"]["maxEmitPower"] = + Number(val[1]); } } ); - watch( () => state.scaleRange, - val => { + (val) => { if (!particle_water) return; if (val.length > 1) { - // console.log("比例范围:",val); particle_water["minSize"] = Number(val[0]); particle_water["maxSize"] = Number(val[1]); - layerStore.particleOptions['water']['particleAttr']['minSize'] = Number(val[0]); - layerStore.particleOptions['water']['particleAttr']['maxSize'] = Number(val[1]); + layerStore.particleOptions["water"]["particleAttr"]["minSize"] = Number( + val[0] + ); + layerStore.particleOptions["water"]["particleAttr"]["maxSize"] = Number( + val[1] + ); } } ); - watch( () => state.gravity, - val => { + (val) => { if (!particle_water) return; particle_water.gravity = new SuperMap3D.Cartesian3(0, 0, Number(val)); - layerStore.particleOptions['water']['particleAttr']['gravity'] = Number(val) + layerStore.particleOptions["water"]["particleAttr"]["gravity"] = + Number(val); } ); - - -onBeforeUnmount(() => { - clear(false); -}); - </script> - -<style lang="scss" scoped> +<style lang="scss" scoped> +.slider-input-number { + margin: 0px -0.1rem 0px 0px; +} </style> - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/objectPainting/draw-particle/index.vue b/SuperMap iEarth/src/package/objectPainting/draw-particle/index.vue index 283564b5..b28fabe4 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-particle/index.vue +++ b/SuperMap iEarth/src/package/objectPainting/draw-particle/index.vue @@ -1,7 +1,7 @@ <template> <!-- 粒子 --> <div class="row-item"> - <span class="name">{{$t('global.symbolLibrary')}}</span> + <span class="name">{{ $t("symbolLibrary") }}</span> <div class="icon-list"> <span v-for="(item, index) in comList" @@ -11,69 +11,60 @@ :class="item.isSelect ? 'selected-icon' : ''" @click="changleIconItem(item)" > - <i class="iconfont iconSize" :class="item.iconName" style="margin-top:0px"></i> + <i + class="iconfont iconSize" + :class="item.iconName" + style="margin-top: 0px" + ></i> </span> </div> </div> <KeepAlive> - <component :is="currentItem.com"></component> - </KeepAlive> - - - - <!-- <div class="btn-row-item"> - <n-button - type="info" - color="#3499E5" - text-color="#fff" - @click="add" - style="margin-right: 0.1rem" - >添加</n-button - > - <n-button class="btn-secondary" @click="clear">清除</n-button> - </div> --> + <component :is="currentItem.com"></component> + </KeepAlive> </template> - <script lang="ts" setup> -import { ref,reactive, onBeforeUnmount, markRaw } from "vue"; +import { reactive, onBeforeUnmount, markRaw } from "vue"; -import fire from "./coms/fire.vue" -import water from "./coms/water.vue" -import fireworks from "./coms/fireworks.vue" +import fire from "./coms/fire.vue"; +import water from "./coms/water.vue"; +import fireworks from "./coms/fireworks.vue"; // 使用vue3 setUp实现动态组件 let comList = reactive([ - { - id: 0, - iconName: "iconhuoyan", - name: GlobalLang.fire, - nameEN: "Solid", - isSelect: true, - com: markRaw(fire) - }, - { - id: 1, - iconName: "iconshui", - name: GlobalLang.water, - nameEN: "grid", - isSelect: false, - com: markRaw(water) - }, - { - id: 2, - iconName: "iconyanhua", - name: GlobalLang.fireworks, - nameEN: "stripe", - isSelect: false, - com: markRaw(fireworks) - }, -]) + { + id: 0, + iconName: "iconhuoyan", + name: $t("fire"), + nameEN: "Solid", + isSelect: true, + com: markRaw(fire), + }, + { + id: 1, + iconName: "iconshui", + name: $t("water"), + nameEN: "grid", + isSelect: false, + com: markRaw(water), + }, + { + id: 2, + iconName: "iconyanhua", + name: $t("fireworks"), + nameEN: "stripe", + isSelect: false, + com: markRaw(fireworks), + }, +]); + // 默认项目 let currentItem = reactive({ - com: comList[0].com -}) -// 初始化数据 + com: comList[0].com, +}); + +// 初始化变量 let state = reactive({ selectedId: 0, stateParticles: [ @@ -114,18 +105,5 @@ function changleIconItem(item: any) { } } -onBeforeUnmount(() => { - // clear(); - }); +onBeforeUnmount(() => {}); </script> - - -<style lang="scss" scoped> - -</style> - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/objectPainting/draw-skit/drawSkit.vue b/SuperMap iEarth/src/package/objectPainting/draw-skit/drawSkit.vue new file mode 100644 index 00000000..36900da0 --- /dev/null +++ b/SuperMap iEarth/src/package/objectPainting/draw-skit/drawSkit.vue @@ -0,0 +1,490 @@ +<template> + <!-- 小品 --> + <div class="row-item"> + <span>{{ $t("symbolType") }}</span> + <n-select + style="width: 1.98rem" + v-model:value="state.selectedTypeId" + :options="state.optionClass" + /> + </div> + + <div class="row-item no-center"> + <span class="name">{{ $t("symbolLibrary") }}</span> + <div class="icon-list-space" style="width: 1.98rem"> + <div + v-for="(model, index) in state.symbolOptionsList.data" + :class="model.isSelect ? 'selected-img' : 'normal-img'" + style="width: 0.4rem; height: 0.4rem; margin: 0.08rem 0.1rem" + > + <img + :key="index" + :src="model.thumbnail" + v-show="model.name" + class="draw-img" + @click="changleIconItem(model)" + @dblclick="cancleIconItem(model)" + /> + </div> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("symbolColor") }}</span> + <div class="color-pick-box" style="width: 1.98rem; margin-left: 0rem"> + <n-color-picker + v-model:value="state.symbolColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("addMode") }}</span> + <n-select + v-model:value="state.addType" + :options="state.optionAddWay" + style="width: 1.96rem" + /> + </div> + + <div class="btn-row-item" v-if="state.addType === 'face'"> + <n-checkbox + v-model:checked="state.multiSelection" + style="margin-bottom: 0.1rem" + > + {{ $t("multiSelection") }} + </n-checkbox> + </div> + + <div class="row-item"> + <span>{{ $t("delMode") }}</span> + <n-radio-group + v-model:value="state.delType" + name="radiogroup" + class="radio-group" + > + <n-radio + v-for="item in state.delOption" + :key="item.value" + :value="item.value" + > + {{ item.label }} + </n-radio> + </n-radio-group> + </div> + + <div class="row-item" v-if="state.addType === 'line'"> + <span>{{ $t("spacing") }}</span> + <n-input-number + v-model:value="state.space" + style="width: 1.96rem" + :min="0.1" + ></n-input-number> + </div> + + <div class="row-item" v-if="state.addType === 'face'"> + <span>{{ $t("count") }}</span> + <n-input-number + v-model:value="state.density" + style="width: 1.96rem" + :min="1" + ></n-input-number> + </div> + + <div class="btn-row-item"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="add" + style="margin-right: 0.1rem" + >{{ $t("Draw") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> +</template> + +<script lang="ts" setup> +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; +import { useNotification, useMessage } from "naive-ui"; +import initHandler from "@/tools/drawHandler"; +import AddSymbol from "./js/draw-skit"; +import symbolOptions from "./js/skit-config"; + +const notification = useNotification(); +const message = useMessage(); + +type stateType = { + selectedTypeId: number; //选中符号类型id + selectedSymbolId: number; //选中符号id + symbolColor: string; //符号颜色 + space: number; //直线种树间距 + density: number; //区域种树总数 + addType: string; // 种树方式 + currentModelUrl: string; // 当前种树模型的url + optionClass: any; // 模型类型选项 + optionAddWay: any; // 添加方式 + symbolOptionsList: any; // 模型资源列表 + multiSelection: boolean; // 支持多选 + currentModelUrlArray: any; + delType: number; // 删除方式 + delOption: any; // 删除模式options + selectS3mInstenceID: string; +}; + +// 初始化变量 +let state = reactive<stateType>({ + selectedTypeId: 0, //选中符号类型id + selectedSymbolId: 0, //选中符号id + symbolColor: "rgba(255,255,255,1)", //符号颜色 + space: 10, //直线种树间距 + density: 100, //区域种树总数 + addType: "single", + currentModelUrl: "./Resource/skitStore/newTree/001_Platanus.s3mb", + currentModelUrlArray: ["./Resource/skitStore/newTree/001_Platanus.s3mb"], + // optionClass: symbolOptions.map((_, i) => ({ + // label: () => (isZH.value ? _.name : _.nameEN), + // value: i, + // })), + optionClass: [ + { + label: () => $t("tree"), + value: 0, + }, + { + label: () => $t("facilities"), + value: 1, + }, + { + label: () => $t("traffic"), + value: 2, + }, + ], + optionAddWay: [], + symbolOptionsList: symbolOptions[0], + multiSelection: false, + delType: 1, + delOption: [ + { + label: $t("singleDel"), + value: 1, + }, + { + label: $t("wholeDel"), + value: 2, + }, + ], + selectS3mInstenceID: "", +}); + +let addSymbol, handlerPolyline, isAddSingle, isAddLIneFace, handlerPolygon; + +let treeOperation = [ + { + label: () => $t("singleAdd"), + value: "single", + }, + { + label: () => $t("lineAdd"), + value: "line", + }, + { + label: () => $t("AreaAdd"), + value: "face", + }, +]; + +let otherOperation = [ + { + label: () => $t("singleAdd"), + value: "single", + }, + { + label: () => $t("lineAdd"), + value: "line", + }, +]; + +// let isCloseAreaAdd: boolean = false; +// isCloseAreaAdd = computed<boolean>(() => { +// return state.selectedTypeId == 0 ? false : true; +// }).value; + +function init() { + if (!viewer) return; + addSymbol = new AddSymbol(viewer, {}); +} + +onMounted(() => { + init(); + state.optionAddWay = treeOperation; + state.symbolOptionsList.data[0].isSelect = true; +}); + +onBeforeUnmount(() => { + // clear(); + addSymbol.destroy(); + if (!addSymbol.selectedSymbol) + viewer.eventManager.removeEventListener("CLICK", click_symbol); //移除鼠标点击事件监听 + + for (let i = 0; i < state.symbolOptionsList.data.length; i++) { + state.symbolOptionsList.data[i].isSelect = false; + } +}); + +// 添加 +function add() { + if (!state.multiSelection) { + if (state.currentModelUrl == "") { + message.warning($t("addSkitTip")); + return; + } + } else { + if (state.currentModelUrlArray.length == 0) { + message.warning($t("addSkitTip")); + return; + } + } + notification.create({ + content: () => $t("editLineTip"), + duration: 3500, + }); + viewer.eventManager.addEventListener("CLICK", click_symbol, true); + switch (state.addType) { + case "single": + add_single(); + break; + case "line": + add_line(); + break; + case "face": + add_face(); + break; + default: + add_single(); + break; + } +} + +//单个添加 +function add_single() { + viewer.enableCursorStyle = false; + viewer._element.style.cursor = ""; + document.body.classList.add("measureCur"); + isAddSingle = true; + viewer.eventManager.addEventListener("RIGHT_CLICK", right_click, true); +} + +// 左键控制选中或者添加d +function click_symbol(e) { + if (isAddLIneFace) return; + if (isAddSingle) { + let position = viewer.scene.pickPosition(e.message.position); + let path = state.currentModelUrl; + addSymbol.addByPoint(path, position); + return; + } + let symbol = viewer.scene.pick(e.message.position) || viewer.selectedEntity; + if (symbol.id.indexOf("addSymbol") != -1) { + state.selectS3mInstenceID = symbol.id; + addSymbol.setModelEditor(symbol); + // symbol.primitive.updateColor(SuperMap3D.Color.fromCssColorString('rgba(255,1,1,1)'), symbol.id); + // addSymbol.setItemsHighlight(symbol); + } else { + addSymbol.delModelEditor(); + } +} + +// 右键结束添加 +function right_click() { + isAddSingle = false; + viewer.enableCursorStyle = true; + document.body.classList.remove("measureCur"); + viewer.eventManager.removeEventListener("RIGHT_CLICK", right_click); //移除鼠标点击事件监听 +} + +// 沿线添加 +function add_line() { + isAddLIneFace = true; + if (!handlerPolyline) { + handlerPolyline = initHandler("Polyline"); + } + + handlerPolyline.handlerDrawing().then( + (res) => { + isAddLIneFace = false; + let path = state.currentModelUrl; + addSymbol.addByline(path, res.object.positions, state.space); + handlerPolyline.polylineTransparent.show = false; + }, + (err) => { + console.log(err); + } + ); + handlerPolyline.activate(); +} + +// 区域添加 +function add_face() { + isAddLIneFace = true; + if (!handlerPolygon) { + handlerPolygon = initHandler("Polygon"); + } + handlerPolygon.handlerDrawing().then( + (res) => { + isAddLIneFace = false; + // let path = state.currentModelUrl; + let path = state.currentModelUrlArray; + addSymbol.addByFace(path, res.object.positions, state.density); + handlerPolygon.polylineTransparent.show = false; + }, + (err) => { + console.log(err); + } + ); + handlerPolygon.activate(); +} + +// 符号 +function changleIconItem(item: any) { + if (!state.multiSelection) { + for (let i = 0; i < state.symbolOptionsList.data.length; i++) { + if (state.symbolOptionsList.data[i].id == item.id) { + state.symbolOptionsList.data[i].isSelect = true; + // state.selectedSymbolId = item.id; + } else { + state.symbolOptionsList.data[i].isSelect = false; + } + } + state.currentModelUrl = item.path; + state.currentModelUrlArray = [item.path]; + } else { + for (let i = 0; i < state.symbolOptionsList.data.length; i++) { + if (state.symbolOptionsList.data[i].id == item.id) { + state.symbolOptionsList.data[i].isSelect = true; + } + } + let itemIndex = state.currentModelUrlArray.indexOf(item.path); + if (itemIndex == -1) { + state.currentModelUrlArray.push(item.path); + } + } +} + +// 取消所选符号 +function cancleIconItem(item: any) { + if (!state.multiSelection) { + for (let i = 0; i < state.symbolOptionsList.data.length; i++) { + if (state.symbolOptionsList.data[i].id == item.id) { + state.symbolOptionsList.data[i].isSelect = false; + state.currentModelUrl = ""; + state.currentModelUrlArray = []; + } + } + } else { + for (let i = 0; i < state.symbolOptionsList.data.length; i++) { + if (state.symbolOptionsList.data[i].id == item.id) { + state.symbolOptionsList.data[i].isSelect = false; + let pathIndex = state.currentModelUrlArray.indexOf(item.path); + state.currentModelUrlArray.splice(pathIndex, 1); + } + } + } +} + +// 清除 +function clear() { + if (state.selectS3mInstenceID.indexOf("addSymbol") != -1) { + addSymbol.clear(state.selectS3mInstenceID, state.delType); + } else { + message.warning($t("delSkitTip")); + } + isAddLIneFace = false; + state.selectS3mInstenceID = ""; + if (handlerPolyline) handlerPolyline.clearHandler(); + if (handlerPolygon) handlerPolygon.clearHandler(); + right_click(); +} + +// 监听 +watch( + () => state.symbolColor, + (val) => { + // let color = SuperMap3D.Color.fromCssColorString(val); + addSymbol.setSymbolColor(val); + } +); +watch( + () => state.addType, + () => { + state.multiSelection = false; + } +); +watch( + () => state.selectedTypeId, + (val) => { + // let color = SuperMap3D.Color.fromCssColorString(val); + // addSymbol.setSymbolColor(val); + switch (val) { + case 0: + state.symbolOptionsList = symbolOptions[0]; + state.optionAddWay = treeOperation; + break; + case 1: + state.symbolOptionsList = symbolOptions[1]; + state.optionAddWay = otherOperation; + state.addType = "single"; + break; + case 2: + state.symbolOptionsList = symbolOptions[2]; + state.optionAddWay = otherOperation; + state.addType = "single"; + break; + default: + break; + } + } +); +watch( + () => state.multiSelection, + (val) => { + if (!val) { + for (let i = 0; i < state.symbolOptionsList.data.length; i++) { + state.symbolOptionsList.data[i].isSelect = false; + } + state.currentModelUrlArray = []; + } + } +); +</script> + +<style lang="scss" scoped> +.icon-list-space { + display: flex; + flex-wrap: wrap; +} + +.selected-img { + border: 3px solid #3499e5; +} + +.normal-img { + border: 3px solid rgba(#fff, 0); +} + +.draw-img { + height: 100%; +} +</style> diff --git a/SuperMap iEarth/src/package/objectPainting/draw-skit/index.ts b/SuperMap iEarth/src/package/objectPainting/draw-skit/index.ts index f2873646..d11f43b6 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-skit/index.ts +++ b/SuperMap iEarth/src/package/objectPainting/draw-skit/index.ts @@ -1,3 +1,3 @@ -import SmDrawSkit from './index.vue'; +import SmDrawSkit from './drawSkit.vue'; export default SmDrawSkit; diff --git a/SuperMap iEarth/src/package/objectPainting/draw-skit/index.vue b/SuperMap iEarth/src/package/objectPainting/draw-skit/index.vue deleted file mode 100644 index d5f020ac..00000000 --- a/SuperMap iEarth/src/package/objectPainting/draw-skit/index.vue +++ /dev/null @@ -1,334 +0,0 @@ -<template> - <!-- 小品 --> - <div class="row-item"> - <span>{{$t('global.symbolType')}}</span> - <n-select - style="width: 1.96rem" - v-model:value="state.selectedTypeId" - :options="state.optionClass" - /> - </div> - - <div class="row-item"> - <span class="name">{{$t('global.symbolLibrary')}}</span> - <div class="icon-list-space" style="width: 1.96rem;"> - <div v-for="(model, index) in state.symbolOptionsList.data" - :class="model.isSelect ? 'selected-img' : 'normal-img'" - style="width:0.4rem;height: 0.4rem;margin: 0.08rem 0.1rem" - > - <img - :key="index" - :src="model.thumbnail" - v-show="model.name" - class="draw-img" - @click="changleIconItem(model)" - /> - </div> - - </div> - </div> - - <div class="row-item"> - <span>{{$t('global.symbolColor')}}</span> - <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> - <n-color-picker - v-model:value="state.symbolColor" - :render-label=" - () => { - return ''; - } - " - size="small" - ></n-color-picker> - </div> - </div> - - <div class="row-item"> - <span>{{$t('global.addMode')}}</span> - <n-select - v-model:value="state.addType" - :options="state.optionAddWay" - style="width: 1.96rem" - /> - </div> - - <div class="row-item" v-if="state.addType === 'line'"> - <span>{{$t('global.spacing')}}</span> - <n-input-number - v-model:value="state.space" - style="width: 1.96rem" - :min="0.1" - ></n-input-number> - </div> - - <div class="row-item" v-if="state.addType === 'face'"> - <span>{{$t('global.count')}}</span> - <n-input-number - v-model:value="state.density" - style="width: 1.96rem" - :min="1" - ></n-input-number> - </div> - - <div class="btn-row-item"> - <n-button - type="info" - color="#3499E5" - text-color="#fff" - @click="add" - style="margin-right: 0.1rem" - >{{$t('global.Draw')}}</n-button - > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> - </div> -</template> - - <script lang="ts" setup> -import {reactive, onBeforeUnmount, watch } from "vue"; -import { useNotification } from "naive-ui"; -import initHandler from "@/tools/drawHandler"; -import AddSymbol from "./js/draw-skit"; -import symbolOptions from "./js/skit-config"; - -const notification = useNotification(); - -type stateType = { - selectedTypeId: number, //选中符号类型id - selectedSymbolId: number, //选中符号id - symbolColor: string, //符号颜色 - space: number, //直线种树间距 - density: number, //区域种树总数 - addType: string, // 种树方式 - currentModelUrl: string, // 当前种树模型的url - optionClass:any, // 模型类型选项 - optionAddWay:any, // 添加方式 - symbolOptionsList:any, // 模型资源列表 - -} - -// 初始化数据 -let state = reactive<stateType>({ - selectedTypeId: 0, //选中符号类型id - selectedSymbolId: 0, //选中符号id - symbolColor: "rgba(255,255,255,1)", //符号颜色 - space: 10, //直线种树间距 - density: 100, //区域种树总数 - addType: "single", - // optionClass: symbolOptions.map((_, i) => ({ - // label: () => (isZH.value ? _.name : _.nameEN), - // value: i, - // })), - currentModelUrl:"./Resource/skitStore/newTree/001_Platanus.s3mb", - optionClass:[ - { - label:()=>GlobalLang.tree, - value:0 - }, - { - label:()=>GlobalLang.facilities, - value:1 - }, - { - label:()=>GlobalLang.traffic, - value:2 - }, - ], - optionAddWay: [ - { - label: () => GlobalLang.singleAdd, - value: "single", - }, - { - label: () => GlobalLang.lineAdd, - value: "line", - }, - { - label: () => GlobalLang.AreaAdd, - value: "face", - }, - ], - symbolOptionsList:symbolOptions[0], -}); - -let addSymbol, handlerPolyline, isAddSingle, isAddLIneFace, handlerPolygon; - -function init() { - if (!viewer) return; - addSymbol = new AddSymbol(viewer, {}); -} - -init(); - -// 分析 -function add() { - notification.create({ - content: () => GlobalLang.editLineTip, - duration: 3500, - }); - viewer.eventManager.addEventListener("CLICK", click_symbol, true); - switch (state.addType) { - case "single": - add_single(); - break; - case "line": - add_line(); - break; - case "face": - add_face(); - break; - default: - add_single(); - break; - } -} - - -//单个添加 -function add_single() { - viewer.enableCursorStyle = false; - viewer._element.style.cursor = ""; - document.body.classList.add("measureCur"); - isAddSingle = true; - viewer.eventManager.addEventListener("RIGHT_CLICK", right_click, true); -} - -// 左键控制选中或者添加 -function click_symbol(e) { - if (isAddLIneFace) return; - if (isAddSingle) { - let position = viewer.scene.pickPosition(e.message.position); - let path = state.currentModelUrl; - addSymbol.addByPoint(path, position); - return; - } - let symbol = viewer.scene.pick(e.message.position) || viewer.selectedEntity; - addSymbol.setModelEditor(symbol); -} - -// 右键结束添加 -function right_click() { - isAddSingle = false; - viewer.enableCursorStyle = true; - document.body.classList.remove("measureCur"); - viewer.eventManager.removeEventListener("RIGHT_CLICK", right_click); //移除鼠标点击事件监听 -} - -// 沿线添加 -function add_line() { - isAddLIneFace = true; - if (!handlerPolyline) { - handlerPolyline = initHandler("Polyline"); - } - - handlerPolyline.handlerDrawing().then( - (res) => { - isAddLIneFace = false; - let path = state.currentModelUrl; - addSymbol.addByline(path, res.object.positions, state.space); - handlerPolyline.polylineTransparent.show = false; - }, - (err) => { - console.log(err); - } - ); - handlerPolyline.activate(); -} - -// 区域添加 -function add_face() { - isAddLIneFace = true; - if (!handlerPolygon) { - handlerPolygon = initHandler("Polygon"); - } - handlerPolygon.handlerDrawing().then( - (res) => { - isAddLIneFace = false; - let path = state.currentModelUrl; - addSymbol.addByFace(path, res.object.positions, state.density); - }, - (err) => { - console.log(err); - } - ); - handlerPolygon.activate(); -} - -// 清除 -function clear() { - if (!addSymbol.selectedSymbol) - viewer.eventManager.removeEventListener("CLICK", click_symbol); //移除鼠标点击事件监听 - if (handlerPolyline) handlerPolyline.clearHandler(); - if (handlerPolygon) handlerPolygon.clearHandler(); - addSymbol.clear(state.currentModelUrl); - right_click(); -} - -// 监听 -watch( - () => state.symbolColor, - (val) => { - let color = SuperMap3D.Color.fromCssColorString(val); - addSymbol.setSymbolColor(val); - } -); -watch( - () => state.selectedTypeId, - (val) => { - // let color = SuperMap3D.Color.fromCssColorString(val); - // addSymbol.setSymbolColor(val); - switch (val) { - case 0: - state.symbolOptionsList = symbolOptions[0]; - break; - case 1: - state.symbolOptionsList = symbolOptions[1]; - break; - case 2: - state.symbolOptionsList = symbolOptions[2]; - break; - default: - break; - } -}); -// 符号 -function changleIconItem(item: any) { - for (let i = 0; i < state.symbolOptionsList.data.length; i++) { - if (state.symbolOptionsList.data[i].id == item.id) { - state.symbolOptionsList.data[i].isSelect = true; - // state.selectedSymbolId = item.id; - } else { - state.symbolOptionsList.data[i].isSelect = false; - } - } - state.currentModelUrl = item.path; -} - -onBeforeUnmount(() => { - clear(); - addSymbol.destroy(); -}); -</script> - - - <style lang="scss" scoped> - .icon-list-space{ - display: flex; - flex-wrap: wrap; - } - .selected-img{ - border: 3px solid #3499E5; - } - .normal-img{ - border: 3px solid rgba(#fff,0); - // display: inline-block; - } - .draw-img{ - height: 100%; - } -</style> - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/objectPainting/draw-skit/js/draw-skit.js b/SuperMap iEarth/src/package/objectPainting/draw-skit/js/draw-skit.js index abe03255..e3e8d84d 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-skit/js/draw-skit.js +++ b/SuperMap iEarth/src/package/objectPainting/draw-skit/js/draw-skit.js @@ -1,4 +1,4 @@ -import PolygonEmitter from './emitter' //粒子随机发射功能,用于区域添加返回坐标 +import PolygonEmitter from './emitter'; //粒子随机发射功能,用于区域添加返回坐标 //添加符号类 class AddSymbol { @@ -21,6 +21,13 @@ class AddSymbol { this.emitter = new PolygonEmitter(); //区域粒子随机发射器,用于区域添加 this.color = SuperMap3D.Color.fromCssColorString("#ffffff"); this.selectedSymbol = null; + this.treeManage = { + pointList: [], + polylineItems: {}, + polygonItems: {} + }; + this.polylineIndex = 1; + this.polygonIndex = 1; this.allModelUrls = []; } @@ -48,7 +55,7 @@ class AddSymbol { axesShow: { translation: true, rotation: true, - scale: true + scale: false } }); this.modelEditor.activate(); @@ -65,14 +72,29 @@ class AddSymbol { addByPoint(modelUrl, position, id) { if (!SuperMap3D.defined(modelUrl) || !SuperMap3D.defined(position)) return; if (!this.allModelUrls.includes(modelUrl)) this.allModelUrls.push(modelUrl); //保存所有添加的路径 - let id2 = 'symbol-' + new Date().getTime(); - this.s3mInstanceColc.add(modelUrl, { - id: id || id2, + let s3mID = ''; + if (!id) { + s3mID = 'point-' + new Date().getTime() + '-addSymbol'; + } else { + s3mID = id; + } + + let option = { + url: modelUrl, + id: s3mID + } + + this.s3mInstanceColc.add(option.url, { + id: option.id, position: position, color: this.color }); - let instance = this.s3mInstanceColc.getInstance(modelUrl, id2); - return instance; + + if (!id) { + this.treeManage.pointList.push(option); + } + + return option; } @@ -104,10 +126,15 @@ class AddSymbol { } viewer.scene.clampToHeightMostDetailed(positions) .then((Cartesians) => { + let polylineOptionList = [] + let key = `polylineItem_${this.polylineIndex}`; for (let i = 0, j = Cartesians.length; i <= j; i++) { - let id = 'symbol-' + new Date().getTime() + i; - this.addByPoint(modelUrl, Cartesians[i], id); + let id = key + '-' + new Date().getTime() + i + '-addSymbol'; + let instanceOption = this.addByPoint(modelUrl, Cartesians[i], id); + polylineOptionList.push(instanceOption); } + this.treeManage.polylineItems[key] = polylineOptionList; + this.polylineIndex++; }); //精度计算count插值 function getCount(distance, space) { @@ -126,11 +153,24 @@ class AddSymbol { addByFace(modelUrl, positions, count) { if (!SuperMap3D.defined(modelUrl) || !SuperMap3D.defined(positions) || positions.length < 3) return; this.emitter.initPolygonEmitter(positions); + let polygonOptionList = [] + let key = `polygonItem_${this.polygonIndex}`; for (let i = 0; i < count; i++) { let p = this.emitter.getOneRandomPosition(); - let id = 'symbol-' + new Date().getTime() + i; - this.addByPoint(modelUrl, p, id); + let id = key + '-' + new Date().getTime() + i + '-addSymbol'; + + let url; + if (modelUrl.length == 1) { + url = modelUrl[0]; + } else { + url = modelUrl[Math.floor((Math.random() * modelUrl.length))]; + } + + let instanceOption = this.addByPoint(url, p, id); + polygonOptionList.push(instanceOption); } + this.treeManage.polygonItems[key] = polygonOptionList; + this.polygonIndex++; } // 设置符号颜色 @@ -146,7 +186,7 @@ class AddSymbol { // 设置模型可编辑 setModelEditor(symbol) { - if (symbol && symbol.id && typeof (symbol.id) === 'string' && symbol.id.indexOf("symbol-") != -1) { + if (symbol && symbol.id && typeof (symbol.id) === 'string' && symbol.id.indexOf("addSymbol") != -1) { if (this.selectedSymbol && this.selectedSymbol.id === symbol.id) return; this.selectedSymbol = symbol; this.addModelEditor(symbol.primitive); @@ -156,16 +196,98 @@ class AddSymbol { } } + // 关闭模型编辑框 + delModelEditor() { + this.selectedSymbol = null; + if (this.modelEditor) this.modelEditor.deactivate(); + } + + // // 设置选中的实体项目高亮 - 还未完成 + // setItemsHighlight(symbol){ + // let instanceID = symbol.id; + // let key = instanceID.split('-')[0]; + // if(key.includes('polyline')){ + // this.treeManage.polylineItems[key].forEach((item) => { + // if(item && item.url && item.id){ + // let instance = this.s3mInstanceColc.getInstance(item.url, item.id); + // instance.updateColor(new SuperMap3D.Color(255, 1, 1, 1),item.id) + // // instance.updateScale(new SuperMap3D.Cartesian3(0, 0, 0), item.id); + // } + // }) + // }else if(key.includes('polygon')){ + + // } + // } // 清除 - clear(modelUrl) { - if (modelUrl) { - if (this.selectedSymbol) this.s3mInstanceColc.removeInstance(modelUrl, this.selectedSymbol.id); - else this.s3mInstanceColc.removeCollection(modelUrl); + clear(instanceID, delType) { + if (!delType) return; + if (delType == 2) { + let key = instanceID.split('-')[0]; + if (key.includes('polyline')) { + this.treeManage.polylineItems[key].forEach((item) => { + if (item && item.url && item.id) { + // this.s3mInstanceColc.removeInstance(item.url, item.id); + let instance = this.s3mInstanceColc.getInstance(item.url, item.id); + instance.updateScale(new SuperMap3D.Cartesian3(0, 0, 0), item.id); + } + }) + } else if (key.includes('polygon')) { + this.treeManage.polygonItems[key].forEach((item) => { + if (item && item.url && item.id) { + // this.s3mInstanceColc.removeInstance(item.url, item.id); + let instance = this.s3mInstanceColc.getInstance(item.url, item.id); + instance.updateScale(new SuperMap3D.Cartesian3(0, 0, 0), item.id); + } + }) + } else { + let itemList = this.treeManage.pointList.filter((element) => { + if (element && element.id) return element.id == instanceID + }) + let item = itemList[0]; + if (item && item.url && item.id) { + // this.s3mInstanceColc.removeInstance(item.url, item.id); + let instance = this.s3mInstanceColc.getInstance(item.url, item.id); + instance.updateScale(new SuperMap3D.Cartesian3(0, 0, 0), item.id); + } + } } else { - this.allModelUrls.forEach((url) => this.s3mInstanceColc.removeCollection(url)); - this.allModelUrls.length = 0; + let key = instanceID.split('-')[0]; + if (key.includes('polyline')) { + let itemList = this.treeManage.polylineItems[key].filter((element) => { + if (element && element.id) return element.id == instanceID + }) + let item = itemList[0]; + if (item && item.url && item.id) { + // this.s3mInstanceColc.removeInstance(item.url, item.id); + let instance = this.s3mInstanceColc.getInstance(item.url, item.id); + instance.updateScale(new SuperMap3D.Cartesian3(0, 0, 0), item.id); + } + } else if (key.includes('polygon')) { + let itemList = this.treeManage.polygonItems[key].filter((element) => { + if (element && element.id) return element.id == instanceID + }) + let item = itemList[0]; + if (item && item.url && item.id) { + // this.s3mInstanceColc.removeInstance(item.url, item.id); + let instance = this.s3mInstanceColc.getInstance(item.url, item.id); + instance.updateScale(new SuperMap3D.Cartesian3(0, 0, 0), item.id); + } + } else { + let itemList = this.treeManage.pointList.filter((element) => { + if (element && element.id) return element.id == instanceID + }) + let item = itemList[0]; + if (item && item.url && item.id) { + // this.s3mInstanceColc.removeInstance(item.url, item.id); + let instance = this.s3mInstanceColc.getInstance(item.url, item.id); + instance.updateScale(new SuperMap3D.Cartesian3(0, 0, 0), item.id); + } + } + } + + this.selectedSymbol = null; if (this.modelEditor) this.modelEditor.deactivate(); } @@ -174,11 +296,20 @@ class AddSymbol { * 销毁 */ destroy() { - this.clear(); + // this.clear(); + this.treeManage = { + pointList: [], + polylineItems: {}, + polygonItems: {} + }; + this.selectedSymbol = null; + if (this.modelEditor) this.modelEditor.deactivate(); + this.allModelUrls.forEach((url) => this.s3mInstanceColc.removeCollection(url)); + this.allModelUrls.length = 0; if (this.modelEditor) this.modelEditor.destroy(); this.s3mInstanceColc = null; this.selectedSymbol = null; } } -export default AddSymbol +export default AddSymbol; diff --git a/SuperMap iEarth/src/package/objectPainting/draw-skit/js/emitter.js b/SuperMap iEarth/src/package/objectPainting/draw-skit/js/emitter.js index 0afa313b..1e049a2e 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-skit/js/emitter.js +++ b/SuperMap iEarth/src/package/objectPainting/draw-skit/js/emitter.js @@ -93,7 +93,7 @@ class Emitter { return (1 - Math.sqrt(r1)) * A + Math.sqrt(r1) * (1 - r2) * B + Math.sqrt(r1) * r2 * C; } - getOneRandomPosition () { + getOneRandomPosition() { if (!SuperMap3D.defaultValue(this._geometry)) { return; } diff --git a/SuperMap iEarth/src/package/objectPainting/draw-surface/index.vue b/SuperMap iEarth/src/package/objectPainting/draw-surface/drawSurface.vue similarity index 66% rename from SuperMap iEarth/src/package/objectPainting/draw-surface/index.vue rename to SuperMap iEarth/src/package/objectPainting/draw-surface/drawSurface.vue index 03b6235e..1df6f7d5 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-surface/index.vue +++ b/SuperMap iEarth/src/package/objectPainting/draw-surface/drawSurface.vue @@ -1,137 +1,208 @@ <template> <!-- 绘制面 --> <div class="row-item"> - <span>{{$t('global.drawMode')}}</span> - <n-select style="width: 1.96rem;height: 32px;" v-model:value="state.selectedType" size="small" - :options="state.optionMode" /> + <span>{{ $t("drawMode") }}</span> + <n-select + style="width: 1.96rem; height: 32px" + v-model:value="state.selectedType" + size="small" + :options="state.optionMode" + /> </div> - <div class="row-item"> - <span class="name">{{$t('global.symbolLibrary')}}</span> + <div class="row-item" style="margin-top: 0.15rem"> + <span class="name">{{ $t("symbolLibrary") }}</span> <div class="icon-list"> - <span v-for="(surfaces, index) in state.surfaces" :key="index" class="icon-span" :title="surfaces.name" - :class="surfaces.isSelect ? 'selected-icon' : ''" @click="changleIconItem(surfaces)"> - <i class="iconfont iconSize" :class="surfaces.iconName" :title="surfaces.name" style="margin-top:0px"></i> + <span + v-for="(surfaces, index) in state.surfaces" + :key="index" + class="icon-span" + :title="surfaces.name" + :class="surfaces.isSelect ? 'selected-icon' : ''" + @click="changleIconItem(surfaces)" + > + <i + class="iconfont iconSize" + :class="surfaces.iconName" + :title="surfaces.name" + style="margin-top: 0px" + ></i> </span> </div> </div> <!-- 纯色面颜色 --> <div class="row-item" v-if="state.selectedId === 0"> - <span>{{$t('global.polygonColor')}}</span> + <span>{{ $t("polygonColor") }}</span> <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> - <n-color-picker v-model:value="state.solidColor" :render-label="() => { - return ''; - } - " size="small"></n-color-picker> + <n-color-picker + v-model:value="state.solidColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> </div> <!-- 网格 --> <div class="row-item" v-if="state.selectedId === 1"> - <span>{{$t('global.polygonColor')}}</span> + <span>{{ $t("polygonColor") }}</span> <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> - <n-color-picker v-model:value="state.gridColor" :render-label="() => { - return ''; - } - " size="small"></n-color-picker> + <n-color-picker + v-model:value="state.gridColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> </div> + <div class="row-item" v-if="state.selectedId === 1"> - <span>{{$t('global.gridLineWidth')}}</span> - <n-input-number v-model:value="state.gridWidth" style="width: 1.96rem" - :show-button="false"></n-input-number> + <span>{{ $t("gridLineWidth") }}</span> + <n-input-number + v-model:value="state.gridWidth" + style="width: 1.96rem" + :show-button="false" + ></n-input-number> </div> <div class="row-item" v-if="state.selectedId === 1"> - <span>{{$t('global.gridLineNumber')}}</span> - <n-input-number v-model:value="state.gridCount" style="width: 1.96rem" - :show-button="false"></n-input-number> + <span>{{ $t("gridLineNumber") }}</span> + <n-input-number + v-model:value="state.gridCount" + style="width: 1.96rem" + :show-button="false" + ></n-input-number> </div> <div class="row-item" v-if="state.selectedId === 1"> - <span>{{$t('global.unitTransparency')}}</span> - <n-input-number v-model:value="state.gridCellAlpha" style="width: 1.96rem" :step="0.1" - :show-button="false"></n-input-number> + <span>{{ $t("unitTransparency") }}</span> + <n-input-number + v-model:value="state.gridCellAlpha" + style="width: 1.96rem" + :step="0.1" + :show-button="false" + ></n-input-number> </div> <!-- 条纹--> <div class="row-item" v-if="state.selectedId === 2"> - <span>{{$t('global.evenStripColor')}}</span> + <span>{{ $t("evenStripColor") }}</span> <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> - <n-color-picker v-model:value="state.stripeEvenColor" :render-label="() => { - return ''; - } - " size="small"></n-color-picker> + <n-color-picker + v-model:value="state.stripeEvenColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> </div> - <div class="row-item" v-if="state.selectedId === 2"> - <span>{{$t('global.oddStripColor')}}</span> + <span>{{ $t("oddStripColor") }}</span> <div class="color-pick-box" style="width: 1.96rem; margin-left: 0rem"> - <n-color-picker v-model:value="state.stripeOddColor" :render-label="() => { - return ''; - } - " size="small"></n-color-picker> + <n-color-picker + v-model:value="state.stripeOddColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> </div> <div class="row-item" v-if="state.selectedId === 2"> - <span :style="state.currentLanguage=='en'?'width:30%':''">{{$t('global.stripRepetition')}}</span> - <n-input-number v-model:value="state.stripeRepeat" style="width: 1.96rem" - :show-button="false"></n-input-number> + <span>{{ $t("stripRepetition") }}</span> + <n-input-number + v-model:value="state.stripeRepeat" + style="width: 1.96rem" + :show-button="false" + ></n-input-number> </div> <div class="row-item" v-if="state.selectedId === 2"> - <span>{{$t('global.stripOffset')}}</span> - <n-input-number v-model:value="state.stripeOffset" style="width: 1.96rem" - :show-button="false"></n-input-number> + <span>{{ $t("stripOffset") }}</span> + <n-input-number + v-model:value="state.stripeOffset" + style="width: 1.96rem" + :show-button="false" + ></n-input-number> </div> <div class="row-item"> - <span>{{$t('global.edit')}}</span> - <n-checkbox style="width: 1.96rem" v-model:checked="state.isEdit"></n-checkbox> + <span>{{ $t("edit") }}</span> + <n-checkbox + style="width: 1.96rem" + v-model:checked="state.isEdit" + ></n-checkbox> </div> <div class="row-item" v-show="state.isEdit"> - <span>{{$t('global.editZaxis')}}</span> - <n-checkbox style="width: 1.96rem" v-model:checked="state.isEditZ"></n-checkbox> + <span>{{ $t("editZaxis") }}</span> + <n-checkbox + style="width: 1.96rem" + v-model:checked="state.isEditZ" + ></n-checkbox> </div> <div class="btn-row-item"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="add" style="margin-right: 0.1rem">{{$t('global.Draw')}}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="add" + style="margin-right: 0.1rem" + >{{ $t("Draw") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > </div> </template> - + <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch, computed } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; import { useNotification } from "naive-ui"; import initHandler from "@/tools/drawHandler"; import setEditHandler from "@/tools/editHandler"; +const notification = useNotification(); + type stateType = { - selectedType: string, // 绘制模式 - selectedId: number, // 绘制面类型 - solidColor: string, // 纯色面颜色 - gridColor: string, // 网格面颜色 - gridWidth: number, // 网格线宽 - gridCount: number, // 网格线数 - gridCellAlpha: number, // 单元透明度 - stripeEvenColor: string, // 偶数带颜色 - stripeOddColor: string, // 奇数带颜色 - stripeRepeat: number, // 带条重复数 - stripeOffset: number, // 带条偏移量 - stripeOrientation: string, - isEdit: boolean, // 是否编辑 - isEditZ: boolean, // 是否只编辑Z轴 - optionMode: any,//绘制模式选项 - surfaces: any,//绘制面类型选项 - currentLanguage:string -} + selectedType: string; // 绘制模式 + selectedId: number; // 绘制面类型 + solidColor: string; // 纯色面颜色 + gridColor: string; // 网格面颜色 + gridWidth: number; // 网格线宽 + gridCount: number; // 网格线数 + gridCellAlpha: number; // 单元透明度 + stripeEvenColor: string; // 偶数带颜色 + stripeOddColor: string; // 奇数带颜色 + stripeRepeat: number; // 带条重复数 + stripeOffset: number; // 带条偏移量 + stripeOrientation: string; + isEdit: boolean; // 是否编辑 + isEditZ: boolean; // 是否只编辑Z轴 + optionMode: any; //绘制模式选项 + surfaces: any; //绘制面类型选项 +}; -// 初始化数据 +// 初始化变量 let state = reactive<stateType>({ selectedType: "NONE", selectedId: 0, @@ -147,22 +218,21 @@ let state = reactive<stateType>({ stripeOrientation: "horizontal", isEdit: false, isEditZ: false, - currentLanguage:window.navigator.language, optionMode: [ { - label: () => GlobalLang.spaceMode, + label: () => $t("spaceMode"), value: "NONE", }, { - label: () => GlobalLang.closeGroundMode, + label: () => $t("closeGroundMode"), value: "TERRAIN", }, { - label: () => GlobalLang.closeS3MMode, + label: () => $t("closeS3MMode"), value: "S3M_TILE", }, { - label: () => GlobalLang.closeBoth, + label: () => $t("closeBoth"), value: "BOTH", }, ], @@ -170,39 +240,56 @@ let state = reactive<stateType>({ { id: 0, iconName: "iconchunse", - name: GlobalLang.pureColor, + name: $t("pureColor"), nameEN: "Solid", isSelect: true, }, { id: 1, iconName: "iconwangge", - name: GlobalLang.grid, + name: $t("grid"), nameEN: "grid", isSelect: false, }, { id: 2, iconName: "iconhuizhitiaowen", - name: GlobalLang.stripe, + name: $t("stripe"), nameEN: "stripe", isSelect: false, }, ], }); -const notification = useNotification(); -let handlerPolygon, - removeEdit, - surface_ids: any = []; -let perPositionHeight = true, - classificationType = undefined, - selected_gon: any = undefined; +let handlerPolygon, removeEdit; +let perPositionHeight = true; +let classificationType = undefined; +let surface_ids: any = []; +let selected_gon: any = undefined; + +onMounted(() => {}); + +onBeforeUnmount(() => { + clear(); + viewer.entities.removeAll(); // 移除所有绘制面(entity) +}); + +// 切换项目 +function changleIconItem(item: any) { + state.selectedId = item.id; + for (let i = 0; i < state.surfaces.length; i++) { + if (state.surfaces[i].id == item.id) { + state.surfaces[i].isSelect = true; + } else { + state.surfaces[i].isSelect = false; + } + } +} // 绘制面 function add() { notification.create({ - content: () => GlobalLang.editLineTip, + content: () => $t("editLineTip"), duration: 3500, }); add_face(); @@ -225,21 +312,6 @@ function add_face() { handlerPolygon.activate(); } -// 清除 -function clear() { - if (handlerPolygon) handlerPolygon.clearHandler(); - if (selected_gon) { - viewer.entities.removeById(selected_gon.id); - selected_gon = undefined; - } else { - surface_ids.forEach((id) => viewer.entities.removeById(id)); - surface_ids.length = 0; - } - if (window.editHandler) window.editHandler.clear(); - state.isEdit = false; - state.isEditZ = false; -} - // 创建面实体 function creat_entity_gon(position) { let id = "add-surface-" + new Date().getTime(); @@ -278,7 +350,6 @@ function creat_entity_gon(position) { orientation: state.stripeOrientation === "horizontal" ? 0 : 1, }); break; - default: break; } @@ -328,18 +399,22 @@ function removeEditHandler() { viewer.selectedEntity = undefined; } -// 切换项目 -function changleIconItem(item: any) { - state.selectedId = item.id; - for (let i = 0; i < state.surfaces.length; i++) { - if (state.surfaces[i].id == item.id) { - state.surfaces[i].isSelect = true; - } else { - state.surfaces[i].isSelect = false; - } +// 清除 +function clear() { + if (handlerPolygon) handlerPolygon.clearHandler(); + if (selected_gon) { + viewer.entities.removeById(selected_gon.id); + selected_gon = undefined; + } else { + surface_ids.forEach((id) => viewer.entities.removeById(id)); + surface_ids.length = 0; } + if (window.editHandler) window.editHandler.clear(); + state.isEdit = false; + state.isEditZ = false; } +// 监听 watch( () => state.selectedType, (val) => { @@ -362,13 +437,12 @@ watch( } } ); - watch( () => state.isEdit, (val) => { if (val) { notification.create({ - content: () => GlobalLang.editLineTip2, + content: () => $t("editLineTip2"), duration: 3500, }); setEdit(); @@ -383,7 +457,6 @@ watch( } } ); - watch( () => state.solidColor, (val) => { @@ -458,18 +531,4 @@ watch( selected_gon.polygon.material.orientation = or; } ); - -onBeforeUnmount(() => { - clear(); - viewer.entities.removeAll(); // 移除所有绘制面(entity) -}); </script> - - -<style lang="scss" scoped></style> - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/objectPainting/draw-surface/index.ts b/SuperMap iEarth/src/package/objectPainting/draw-surface/index.ts index adc221c2..12ffa0fb 100644 --- a/SuperMap iEarth/src/package/objectPainting/draw-surface/index.ts +++ b/SuperMap iEarth/src/package/objectPainting/draw-surface/index.ts @@ -1,3 +1,3 @@ -import SmDrawSurface from './index.vue'; +import SmDrawSurface from './drawSurface.vue'; export default SmDrawSurface; diff --git a/SuperMap iEarth/src/package/objectPainting/index.vue b/SuperMap iEarth/src/package/objectPainting/index.vue index 9675e0ba..b50591ca 100644 --- a/SuperMap iEarth/src/package/objectPainting/index.vue +++ b/SuperMap iEarth/src/package/objectPainting/index.vue @@ -1,24 +1,25 @@ <template> <div class="object-pain-box"> - <n-tabs type="line" animated :on-update:value="tabsChange"> + <!-- <n-tabs type="line" animated :on-update:value="tabsChange" justify-content="left"> --> + <n-tabs type="line" animated justify-content="left"> <!-- 绘制线 --> - <n-tab-pane name="draw-line" :tab="$t('global.drawLine')"> + <n-tab-pane name="draw-line" :tab="$t('drawLine')"> <SmDrawLine></SmDrawLine> </n-tab-pane> <!-- 绘制面 --> - <n-tab-pane name="draw-surface" :tab="$t('global.drawPolygon')"> + <n-tab-pane name="draw-surface" :tab="$t('drawPolygon')"> <SmDrawSurface></SmDrawSurface> </n-tab-pane> <!-- 小品 --> - <n-tab-pane name="draw-skit" :tab="$t('global.skit')"> + <n-tab-pane name="draw-skit" :tab="$t('skit')"> <SmDrawSkit></SmDrawSkit> </n-tab-pane> <!-- 几何体 --> - <n-tab-pane name="draw-particle" :tab="$t('global.geometry')"> + <n-tab-pane name="draw-particle" :tab="$t('geometry')"> <SmDrawGeomety></SmDrawGeomety> </n-tab-pane> <!-- 粒子 --> - <n-tab-pane name="onlineTerrain" :tab="$t('global.particle')"> + <n-tab-pane name="onlineTerrain" :tab="$t('particle')"> <SmDrawParticle></SmDrawParticle> </n-tab-pane> </n-tabs> @@ -26,25 +27,34 @@ </template> <script setup lang="ts"> -import { usePanelStore } from "@/store/index"; import SmDrawLine from "./draw-line/index"; import SmDrawSurface from "./draw-surface/index"; import SmDrawParticle from "./draw-particle/index"; import SmDrawSkit from "./draw-skit/index"; import SmDrawGeomety from "./draw-geomety/index"; -const panelStore = usePanelStore(); -function tabsChange(value) {} - -// 关闭弹窗 -function panelCloseHandle() {} +// function tabsChange(value) { } </script> <style lang="scss" scoped> .object-pain-box { width: 100%; height: 100%; + box-sizing: border-box; + // padding: 0 0.05rem; +} + +:deep(.n-tabs-tab-wrapper) { + margin-right: 0.3rem; +} + +:deep(.n-tabs-nav) { padding: 0 0.12rem; +} + +:deep(.n-tab-pane) { box-sizing: border-box; + padding-left: 0.12rem; + padding-right: 0.12rem; } </style> diff --git a/SuperMap iEarth/src/package/sceneSet/fly-route/components/create-route.vue b/SuperMap iEarth/src/package/sceneSet/fly-route/components/create-route.vue index 97f4a88b..c5180eec 100644 --- a/SuperMap iEarth/src/package/sceneSet/fly-route/components/create-route.vue +++ b/SuperMap iEarth/src/package/sceneSet/fly-route/components/create-route.vue @@ -1,73 +1,91 @@ <template> <div class="row-item"> - <span>{{$t('global.flySpeed')}}</span> - <div class="slider-box"> - <n-slider - style="width: 1.5rem;" - v-model:value="state.routeSpeed" - :step="1" :min="0" :max="500" - /> - <div class="slider-suffix"> - <span>{{ state.routeSpeed }}</span> - <!-- <span class="slider-unit">M</span> --> - </div> + <span></span> + <div class="icon-container"> + <div class="icon-list" style="width: 1.96rem"> + <span + v-for="(item, index) in state.itemOptions" + :key="index" + class="icon-span" + :title="item.lable" + :class="item.isSelect ? 'selected-icon' : ''" + @click="changleIconItem(item)" + > + <i + class="iconfont iconSize" + :class="item.iconName" + style="margin-top: 0px" + ></i> + </span> </div> </div> + </div> - <div class="row-item"> - <span></span> - <div class="icon-container"> - <div class="icon-list" style="width: 1.96rem;"> - <span - v-for="(item, index) in state.itemOptions" - :key="index" - class="icon-span" - :title="item.lable" - :class="item.isSelect ? 'selected-icon' : ''" - @click="changleIconItem(item)" - > - <!-- <svg-icon :name="line.iconName" class="icon-size" /> --> - <i class="iconfont iconSize" :class="item.iconName" style="margin-top:0px"></i> - </span> - </div> - </div> - </div> - <div v-show="state.customRouteNames.length > 0"> <div class="row-item"> - <span>{{$t('global.addedStops')}}</span> - <div class="row-content"> - <n-select - v-model:value="state.selectedAddedStopIndex" - :options="state.routeStops" - label-field="stopName" - value-field="index" - /> - </div> + <span>{{ $t("addedStops") }}</span> + <div class="row-content"> + <n-select + v-model:value="state.selectedAddedStopIndex" + :options="state.routeStops" + label-field="stopName" + value-field="index" + /> + </div> </div> - <div class="row-item"> - <span>{{$t('global.flyRoute')}}</span> + <!-- <div class="row-item"> + <span>{{$t('flyRoute')}}</span> <div class="row-content"> <n-select v-model:value="state.customRouteSelectedIndex" :options="state.customRouteNames" /> </div> + </div> --> + + <div class="row-item" style="margin-bottom: 0px"> + <span></span> + <div class="row-content" style="display: flex"> + <n-checkbox v-model:checked="state.showRoute" /><span + class="checkbox-lable" + >{{ $t("displayRoute") }}</span + > + <n-checkbox v-model:checked="state.showStop" /><span + class="checkbox-lable" + >{{ $t("displayStation") }}</span + > + </div> </div> <div class="row-item"> - <span></span> - <div class="row-content"> - <n-checkbox v-model:checked="state.showRoute">{{$t('global.displayRoute')}}</n-checkbox> - <n-checkbox v-model:checked="state.showStop">{{$t('global.displayStation')}}</n-checkbox> - </div> + <span>{{ $t("flySpeed") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.routeSpeed" + :step="1" + :min="0" + :max="500" + /> + <n-input-number + v-model:value="state.routeSpeed" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="500" + placeholder="" + size="small" + /> + </div> </div> <div class="row-item"> <span></span> <div class="icon-container"> - <div class="icon-list" style="width: 1.9rem;"> + <div class="icon-list" style="width: 1.96rem"> <span v-for="(item, index) in state.actionOptions" :key="index" @@ -76,34 +94,39 @@ :class="item.isSelect ? 'selected-icon' : ''" @click="changleIconItemAction(item)" > - <!-- <svg-icon :name="line.iconName" class="icon-size" /> --> - <i class="iconfont iconSize" :class="item.iconName" style="margin-top:0px"></i> + <i + class="iconfont iconSize" + :class="item.iconName" + style="margin-top: 0px" + ></i> </span> </div> </div> </div> - <div class="btn-row-item"> + <div class="btn-row-item" style="margin-left: 0.94rem"> <n-button type="info" color="#3499E5" text-color="#fff" @click="downLoad" - style="margin-right: 0.1rem;margin-left: 0.03rem;" - >{{$t('global.downLoad')}}</n-button + style="margin-right: 0.1rem; margin-left: 0.03rem" + >{{ $t("downLoad") }}</n-button + > + <n-button + class="btn-secondary" + @click="clearRoute" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clearRoute" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </div> - - <n-divider /> - <rotate></rotate> </template> - -<script lang='ts' setup> -import { watch, reactive, onBeforeUnmount } from "vue"; -import { useNotification,useMessage } from "naive-ui"; -import rotate from "./rotate.vue"; + +<script lang="ts" setup> +import { watch, reactive, onMounted, onBeforeUnmount } from "vue"; +import { useNotification, useMessage } from "naive-ui"; import tool from "@/tools/tool"; import createFlyLine_xml from "./fly-line-xml.js"; @@ -136,9 +159,9 @@ type stateType = { isAlongline: boolean; //获取或者设置该飞行路线是否是沿线飞行。 routeSpeed: number; //飞行路线速度 // allRoutes:any[] - itemOptions:any, // 功能选项 - actionOptions:any, // 操作选项 - isSaveAutoFlag:boolean,// 是否开启自动保存 + itemOptions: any; // 功能选项 + actionOptions: any; // 操作选项 + isSaveAutoFlag: boolean; // 是否开启自动保存 }; // 设置默认值数据 @@ -157,7 +180,7 @@ let state = reactive<stateType>({ addCurrentRouteIndex: 0, // 当前路线索引,以便n-select customRouteSelectedIndex: null, //自定义选中路线索引 routeStops: [], //自定义当前路线的站点集合 - selectedAddedStopIndex: null, //自定义已加站点选中索引 + selectedAddedStopIndex: undefined, //自定义已加站点选中索引 //站点 setStopName: "Stop-1", //设置当前站点名称 setStopSpeed: 0, // 设置当前站点速度 @@ -167,72 +190,83 @@ let state = reactive<stateType>({ //飞行路线设置 isAlongline: false, //获取或者设置该飞行路线是否是沿线飞行。 routeSpeed: 200, //飞行路线速度 - isSaveAutoFlag:false, + isSaveAutoFlag: false, // allRoutes:[] itemOptions: [ { index: 1, - lable: GlobalLang.add, + lable: $t("addStation"), iconName: "icontianjia", isSelect: false, }, { index: 2, - lable: GlobalLang.deleteStation, + lable: $t("deleteStation"), iconName: "iconshanchu", isSelect: false, }, { index: 3, - lable: GlobalLang.restore, + lable: $t("restore"), iconName: "iconfuwei", isSelect: false, }, { index: 4, - lable: GlobalLang.save, + lable: $t("save"), iconName: "iconbaocun", isSelect: false, }, ], - actionOptions:[ + actionOptions: [ { index: 1, - lable: GlobalLang.play, + lable: $t("play"), iconName: "iconbofang", isSelect: false, }, { index: 2, - lable: GlobalLang.pause, + lable: $t("pause"), iconName: "iconzanting", isSelect: false, }, { index: 3, - lable: GlobalLang.stop, + lable: $t("stop"), iconName: "icontingzhi", isSelect: false, - } + }, ], }); -// 初始化数据 +// 初始化变量 let flyManager: any, routeCollection: any; //创建飞行路线集合对象类 let currentStops: any; //当前路线所有站点集合 -// let reader = new FileReader(); let createXml: any, flyLineXmls: any = []; //创建和保存xml飞行路线文件 -initFlyManager(); +onMounted(() => { + initFlyManager(); +}); -/** - * 指定路线分析 - */ +// 销毁 +onBeforeUnmount(() => { + clearRoute(); -// 功能切换 -function changleIconItem(item:any){ + let route = flyManager.currentRoute; + if (route) { + route.isLineVisible = false; + route.isStopVisible = false; + } + flyManager = routeCollection = null; + currentStops = null; + createXml = null; + flyLineXmls = null; +}); +// 功能切换 +function changleIconItem(item: any) { state.itemOptions.map((itemObj) => { if (itemObj.index == item.index) { itemObj.isSelect = true; @@ -241,57 +275,55 @@ function changleIconItem(item:any){ } }); - switch(item.index){ - case 1:{ + switch (item.index) { + case 1: { addStop(); break; } - case 2:{ + case 2: { deleteStop(); break; } - case 3:{ + case 3: { restStops(); break; } - case 4:{ + case 4: { saveStop(); break; } default: - break; + break; } } // 操作切换 -function changleIconItemAction(item:any){ - -state.actionOptions.map((itemObj) => { - if (itemObj.index == item.index) { - itemObj.isSelect = true; - } else { - itemObj.isSelect = false; - } -}); +function changleIconItemAction(item: any) { + state.actionOptions.map((itemObj) => { + if (itemObj.index == item.index) { + itemObj.isSelect = true; + } else { + itemObj.isSelect = false; + } + }); -switch(item.index){ - case 1:{ + switch (item.index) { + case 1: { flyStart(); break; } - case 2:{ + case 2: { flyPause(); break; } - case 3:{ + case 3: { flyStop(); break; } default: - break; + break; } } - //初始化飞行管理 function initFlyManager() { routeCollection = new SuperMap3D.RouteCollection(viewer.entities); @@ -300,12 +332,8 @@ function initFlyManager() { routes: routeCollection, }); createXml = new createFlyLine_xml(); - // if (state.fpfUrl) { - // fpfUrlChange(); - // } } - // 异步飞行管理准备就绪函数 function readyPromise() { routeCollection.readyPromise.then(() => { @@ -331,22 +359,10 @@ function updateCurrentStops() { state.currentStopNamesIndex++; } } -// // 更新当前飞行管理的所有路线(暂不支持路线选择,所有未开放) -// function updateAllRoutes() { -// state.allRoutes.length = 0; -// let allRoutes = routeCollection.routes; -// for (let i = 0, j = allRoutes.length; i < j; i++) { -// let route = '飞行路线' + (i + 1); -// state.allRoutes.push(route) -// } -// } // 开始 function flyStart() { flyManager.play(); - // flyManager.readyPromise.then(() => { - // flyManager.play(); - // }); } // 暂停 function flyPause() { @@ -357,9 +373,6 @@ function flyStop() { flyManager && flyManager.stop(); } -/** - * 自定义路线分析 - */ // 添加站点 function addStop() { flyManager.stop(); @@ -377,11 +390,12 @@ function addStop() { waitTime: state.waitTime, }; state.routeStops.push(stop); - if(state.isSaveAutoFlag) saveStop();// 一旦添加站点,立即保存 + if (state.isSaveAutoFlag) saveStop(); // 一旦添加站点,立即保存 let routeLen = state.routeStops.length; - if(routeLen>0) state.addCurrentStopIndex = state.routeStops[routeLen-1].index+1; // 保证新增的站点index始终比前一位大1 - message.success(`${GlobalLang.addStopSuccess}: ${state.setStopName}`); - + if (routeLen > 0) + state.addCurrentStopIndex = state.routeStops[routeLen - 1].index + 1; // 保证新增的站点index始终比前一位大1 + message.success(`${$t("addStopSuccess")}: ${state.setStopName}`); + if (state.routeStops.length > 0) { let len = state.routeStops.length; let lastStopName = state.routeStops[len - 1].stopName; @@ -389,20 +403,25 @@ function addStop() { let name = "Stop-" + (Number(index) + 1); state.setStopName = name; } - state.selectedAddedStopIndex = state.routeStops.length - 1; + state.selectedAddedStopIndex = + state.routeStops[state.routeStops.length - 1].index; } // 清除选中站点 function deleteStop() { - state.routeStops.splice(state.selectedAddedStopIndex, 1); - if(state.routeStops.length>1 && state.isSaveAutoFlag){ + let delIndex = state.routeStops.findIndex( + (e) => e.index == state.selectedAddedStopIndex + ); + state.routeStops.splice(delIndex, 1); + if (state.routeStops.length > 1 && state.isSaveAutoFlag) { saveStop(); // 一旦删除站点,实时保存 } if (state.routeStops.length > 0) { - state.selectedAddedStopIndex = state.routeStops.length - 1; + state.selectedAddedStopIndex = + state.routeStops[state.routeStops.length - 1].index; return; } - state.selectedAddedStopIndex = null; + state.selectedAddedStopIndex = undefined; state.setStopName = "Stop-1"; } @@ -413,71 +432,64 @@ function restStops() { route.isLineVisible = false; route.isStopVisible = false; } - // state.routeStops.length = 0; state.setStopName = "Stop-1"; + state.routeStops = []; + state.addCurrentStopIndex = 0; + state.selectedAddedStopIndex = 0; + // state.routeStops.length = 0; // state.setStopSpeed = 0; // state.stopPlayMode = "StopPause"; // state.waitTime = 0; // state.surroundDuration = 1; - state.routeStops = []; - state.addCurrentStopIndex = 0; } // 保存站点 function saveStop() { if (state.routeStops.length < 2) { - notification.create({ - content: () => GlobalLang.atLeastTwoStop, - duration: 3500, - }); + if (state.customRouteNames.length == 0) { + notification.create({ + content: () => $t("atLeastTwoStop"), + duration: 3500, + }); + } return; } - - // state.addCurrentStopIndex = state.routeStops.length; - // 飞行路线配置 - // let index = flyLineXmls.length + 1; let route = { - // routeName: "飞行路线_1" + index, - routeName: GlobalLang.flyRoute_1, + routeName: $t("flyRoute_1"), index: state.addCurrentRouteIndex, speed: state.routeSpeed, isAlongLine: "False", routeStops: state.routeStops, }; let xml = createXml.createXMLflyLine(route); - // flyLineXmls.push(xml); flyLineXmls[0] = xml; - state.isSaveAutoFlag = true;//一旦点击保存,开启实时自动保存 + state.isSaveAutoFlag = true; //一旦点击保存,开启实时自动保存 // 保证只有一条飞行路线 - if(state.customRouteNames.length === 0) { + if (state.customRouteNames.length === 0) { state.customRouteNames.push({ - label: route.routeName, - value: route.index, - }); - }; + label: route.routeName, + value: route.index, + }); + } updateRouteCollection(); state.addCurrentRouteIndex++; if (state.customRouteSelectedIndex === null) state.customRouteSelectedIndex = 0; - - // if (val === null) return; } + // 更新飞行路径 -function updateRouteCollection(){ - flyManager && flyManager.stop(); - let route = flyManager.currentRoute; - if (route) route.clear(); //清除之前的 - routeCollection = new SuperMap3D.RouteCollection(viewer.entities); //飞行路线底层默认第一条路线,所以重新new - routeCollection.fromXML(flyLineXmls[0]); // 默认飞行路径只有一条 - readyPromise(); +function updateRouteCollection() { + flyManager && flyManager.stop(); + let route = flyManager.currentRoute; + if (route) route.clear(); //清除之前的 + routeCollection = new SuperMap3D.RouteCollection(viewer.entities); //飞行路线底层默认第一条路线,所以重新new + routeCollection.fromXML(flyLineXmls[0]); // 默认飞行路径只有一条 + readyPromise(); } - - - // 下载选择的飞行路线fpf文件 function downLoad() { let data = flyLineXmls[state.customRouteSelectedIndex]; @@ -488,6 +500,7 @@ function downLoad() { alink.href = URL.createObjectURL(blob); //根据blob 创建 url alink.click(); //自动点击 } + // 清除选中飞行路线 function clearRoute() { flyManager.stop(); @@ -502,16 +515,20 @@ function clearRoute() { state.currentStopNames.length = 0; let route = flyManager.currentRoute; if (route) route.clear(); //清除之前的 + state.routeStops = []; + state.setStopName = "Stop-1"; + state.isSaveAutoFlag = false; + state.selectedAddedStopIndex = undefined; + state.addCurrentStopIndex = 0; } - // 监听 watch( () => state.selectedStopIndex, (val) => { flyManager && flyManager.stop(); // updateCurrentStops(); - let index = Number(val); + let index = Number(val); let currentStopList = flyManager.getAllRouteStops(); let stop = currentStopList[index]; flyManager.viewToStop(stop); @@ -524,6 +541,12 @@ watch( if (route) route.isLineVisible = val; } ); +watch( + () => state.routeSpeed, + () => { + saveStop(); + } +); watch( () => state.showStop, (val) => { @@ -531,13 +554,6 @@ watch( if (route) route.isStopVisible = val; } ); -// watch( -// () => state.fpfUrl, -// (val) => { -// fpfUrlChange(); -// } -// ); - watch( () => state.customRouteSelectedIndex, (val) => { @@ -545,12 +561,10 @@ watch( updateRouteCollection(); } ); - watch( () => state.selectedAddedStopIndex, (val) => { - // let stop = state.routeStops[val]; - let stop = state.routeStops.find((stop)=>stop.index === val); + let stop = state.routeStops.find((stop) => stop.index === val); if (!stop) return; viewer.camera.setView({ destination: SuperMap3D.Cartesian3.fromDegrees( @@ -566,41 +580,14 @@ watch( }); } ); - -watch( - () => state.routeType, - () => { - notification.create({ - content: () => - "调整当前相机位置和视角,以当前相机位置和视角设置站点,点击添加保存此站点", - duration: 3500, - }); - } -); - -// 销毁 -onBeforeUnmount(() => { - clearRoute(); - - let route = flyManager.currentRoute; - if (route) { - route.isLineVisible = false; - route.isStopVisible = false; - } - flyManager = routeCollection = null; - currentStops = null; - createXml = null; - flyLineXmls = null; - -}); </script> - -<style lang="scss" scoped> -// .svgIcons { -// display: flex; -// justify-content: space-between; -// margin-right: 0.1rem; -// } +<style lang="scss" scoped> +.row-content .checkbox-lable { + width: auto; + height: 24px; + line-height: 24px; + margin-right: 0.1rem; + margin-left: 0.16rem; +} </style> - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/sceneSet/fly-route/components/import-route.vue b/SuperMap iEarth/src/package/sceneSet/fly-route/components/import-route.vue index 4d39e51f..bb5cb54c 100644 --- a/SuperMap iEarth/src/package/sceneSet/fly-route/components/import-route.vue +++ b/SuperMap iEarth/src/package/sceneSet/fly-route/components/import-route.vue @@ -1,74 +1,82 @@ <template> - <div class="row-item"> - <span>{{$t('global.flyRoute')}}</span> - <div class="row-content"> - <n-input-group> - <n-input - class="add-input-border" - size="medium" - style="width: 2.0 rem;" - :placeholder="$t('global.localFilePathFly')" - v-model:value="state.fileSrc" - /> - <n-button type="tertiary" @click="chooseFile">{{$t('global.import')}}</n-button> - <input - type="file" - accept=".fpf" - id="flyFile" - style="display: none" - ref="flyFile_dom" - /> - </n-input-group> - </div> + <div class="row-item"> + <span>{{ $t("flyRoute") }}</span> + <div class="row-content"> + <n-input-group> + <n-input + class="add-input-border" + size="medium" + style="width: 2rem" + :placeholder="$t('localFilePathFly')" + v-model:value="state.fileSrc" + /> + <n-button type="tertiary" @click="chooseFile">{{ + $t("import") + }}</n-button> + <input + type="file" + accept=".fpf" + id="flyFile" + style="display: none" + ref="flyFile_dom" + /> + </n-input-group> </div> + </div> - <div class="row-item"> - <span></span> - <div class="row-content"> - <n-checkbox v-model:checked="state.showRoute">{{$t('global.displayRoute')}}</n-checkbox> - <n-checkbox v-model:checked="state.showStop">{{$t('global.displayStation')}}</n-checkbox> - </div> + <div class="row-item" style="margin-bottom: 0px"> + <span></span> + <div class="row-content" style="display: flex"> + <n-checkbox v-model:checked="state.showRoute" /><span + class="checkbox-lable" + >{{ $t("displayRoute") }}</span + > + <n-checkbox v-model:checked="state.showStop" /><span + class="checkbox-lable" + >{{ $t("displayStation") }}</span + > </div> - <div class="row-item"> - <span></span> - <div class="icon-container"> - <div class="icon-list" > - <span - v-for="(item, index) in state.actionOptions" - :key="index" - class="icon-span" - :title="item.lable" - :class="item.isSelect ? 'selected-icon' : ''" - @click="changleIconItem(item)" - > - <i class="iconfont iconSize" :class="item.iconName" style="margin-top:0px"></i> - </span> - </div> + </div> + + <div class="row-item"> + <span></span> + <div class="icon-container"> + <div class="icon-list"> + <span + v-for="(item, index) in state.actionOptions" + :key="index" + class="icon-span" + :title="item.lable" + :class="item.isSelect ? 'selected-icon' : ''" + @click="changleIconItem(item)" + > + <i + class="iconfont iconSize" + :class="item.iconName" + style="margin-top: 0px" + ></i> + </span> </div> </div> + </div> - <div class="row-item" v-show="state.isExistRoute"> - <span>{{$t('global.selectStation')}}</span> - <div class="row-content"> - <n-select - v-model:value="state.selectedStopIndex" - :options="state.currentStopNames" - /> - </div> + <div class="row-item" v-show="state.isExistRoute"> + <span>{{ $t("selectStation") }}</span> + <div class="row-content"> + <n-select + v-model:value="state.selectedStopIndex" + :options="state.currentStopNames" + /> </div> - <n-divider /> - - <rotate></rotate> + </div> </template> - - + <script lang="ts" setup> import { ref, onBeforeUnmount, watch, reactive, onMounted } from "vue"; -import rotate from "./rotate.vue"; type stateType = { fileSrc: string; //文件地址 - isExistRoute:boolean,// 是否存在路径 + isExistRoute: boolean; // 是否存在路径 selectedStopIndex: number; //选中当前站点 showRoute: boolean; //显示路线 showStop: boolean; //显示站点 @@ -76,10 +84,10 @@ type stateType = { actionOptions: any[]; // 操作选项 }; -// 初始化数据 +// 初始化变量 let state = reactive<stateType>({ fileSrc: "", //文件地址 - isExistRoute:false, + isExistRoute: false, selectedStopIndex: 0, //选中当前站点 showRoute: false, //显示路线 showStop: false, //显示站点 @@ -87,37 +95,55 @@ let state = reactive<stateType>({ actionOptions: [ { index: 1, - lable: GlobalLang.play, + lable: $t("play"), iconName: "iconbofang", isSelect: false, }, { index: 2, - lable: GlobalLang.pause, + lable: $t("pause"), iconName: "iconzanting", isSelect: false, }, { index: 3, - lable: GlobalLang.stop, + lable: $t("stop"), iconName: "icontingzhi", isSelect: false, - } + }, ], }); -let flyManager: any, routeCollection: any; //创建飞行路线集合对象类 + let flyFile_dom = ref(); +let flyManager: any, routeCollection: any; //创建飞行路线集合对象类 let currentStops; //当前路线所有站点集合 let reader = new FileReader(); -init(); function init() { if (!window.viewer) return; initFlyManager(); } +onMounted(() => { + init(); + fileChange(); +}); + +// 销毁 +onBeforeUnmount(() => { + let route = flyManager.currentRoute; + if (route) { + route.isLineVisible = false; + route.isStopVisible = false; + } + + flyManager = null; + routeCollection = null; + currentStops = null; +}); + // 操作切换 -function changleIconItem(item:any){ +function changleIconItem(item: any) { state.actionOptions.map((itemObj) => { if (itemObj.index == item.index) { itemObj.isSelect = true; @@ -126,21 +152,21 @@ function changleIconItem(item:any){ } }); - switch(item.index){ - case 1:{ + switch (item.index) { + case 1: { flyStart(); break; } - case 2:{ + case 2: { flyPause(); break; } - case 3:{ + case 3: { flyStop(); break; } default: - break; + break; } } @@ -152,6 +178,7 @@ function initFlyManager() { routes: routeCollection, }); } + // 点击选择文件函数 function chooseFile() { flyFile_dom.value.click(); @@ -176,10 +203,11 @@ function fileChange() { readyPromise(); }); } + // 异步飞行管理准备就绪函数 function readyPromise() { routeCollection.readyPromise.then(() => { - if(routeCollection._routes.length>0){ + if (routeCollection._routes.length > 0) { state.isExistRoute = true; } flyManager.routes = routeCollection; @@ -203,15 +231,6 @@ function updateCurrentStops() { state.currentStopNames.push(stopObj); } } -// 更新当前飞行管理的所有路线(暂不支持路线选择,所有未开放) -// function updateAllRoutes() { -// state.allRoutes.length = 0; -// let allRoutes = routeCollection.routes; -// for (let i = 0, j = allRoutes.length; i < j; i++) { -// let route = "飞行路线" + (i + 1); -// state.allRoutes.push(route); -// } -// } // 开始飞行 function flyStart() { @@ -252,38 +271,14 @@ watch( if (route) route.isStopVisible = val; } ); - - -onMounted(() => { - fileChange(); -}); - -// 销毁 -onBeforeUnmount(() => { - let route = flyManager.currentRoute; - if (route) { - route.isLineVisible = false; - route.isStopVisible = false; - } - - flyManager = null; - routeCollection = null; - currentStops = null; -}); </script> - - - -<style lang="scss" scoped> +<style lang="scss" scoped> +.row-content .checkbox-lable { + width: auto; + height: 0.24rem; + line-height: 0.24rem; + margin-right: 0.1rem; + margin-left: 0.16rem; +} </style> - - - - - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/sceneSet/fly-route/components/rotate.vue b/SuperMap iEarth/src/package/sceneSet/fly-route/components/rotate.vue index 48e5c5e6..e14fb040 100644 --- a/SuperMap iEarth/src/package/sceneSet/fly-route/components/rotate.vue +++ b/SuperMap iEarth/src/package/sceneSet/fly-route/components/rotate.vue @@ -1,15 +1,12 @@ <template> - <div class="row-item"> - <span>{{$t('global.rotateByPoint')}}</span> - <div style="width:1.96rem"> + <span>{{ $t("rotateByPoint") }}</span> + <div style="width: 1.96rem"> <n-switch v-model:value="state.rotateShow" size="small" /> </div> </div> - <div v-show="state.rotateShow"> - <div class="row-item"> <span></span> <div class="icon-container"> @@ -22,89 +19,105 @@ :class="item.isSelect ? 'selected-icon' : ''" @click="changleIconItem(item)" > - <!-- <svg-icon :name="line.iconName" class="icon-size" /> --> - <i class="iconfont iconSize" :class="item.iconName" style="margin-top:0px"></i> + <i + class="iconfont iconSize" + :class="item.iconName" + style="margin-top: 0px" + ></i> </span> </div> </div> </div> <div class="row-item"> - <span>{{$t('global.rotateSpeed')}}</span> + <span>{{ $t("rotateSpeed") }}</span> <div class="slider-box"> <n-slider - style="width: 1.5rem;" + style="width: 1.5rem" v-model:value="state.speedRatio" - :step="0.1" :min="0" :max="20" + :step="0.1" + :min="0" + :max="20" + /> + <n-input-number + v-model:value="state.speedRatio" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="20" + placeholder="" + size="small" /> - <div class="slider-suffix"> - <span>{{ state.speedRatio }}</span> - </div> </div> </div> - <div class="row-item"> + <div class="row-item" style="margin-bottom: -0.1rem"> <span></span> - <div class="row-content"> - <n-checkbox v-model:checked="state.flyCircleLoop"></n-checkbox><span> {{$t('global.rotateRepeat')}}</span> - </div> + <div class="row-content"> + <n-checkbox v-model:checked="state.flyCircleLoop">{{ + $t("rotateRepeat") + }}</n-checkbox> + </div> </div> - </div> </template> - -<script lang='ts' setup> -import { onBeforeUnmount, watch, reactive } from "vue"; + +<script lang="ts" setup> +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; type stateType = { - speedRatio: 1, // 旋转速度 - flyCircleLoop: true, // 是否循环 - rotateShow: false, // 是否绕点旋转 - itemOptions: any,// 功能选项 - position: any, // 绕点选择中心点 -} + speedRatio: 1; // 旋转速度 + flyCircleLoop: true; // 是否循环 + rotateShow: false; // 是否绕点旋转 + itemOptions: any; // 功能选项 + position: any; // 绕点选择中心点 +}; -// 初始化数据 +// 初始化变量 let state = reactive<stateType>({ speedRatio: 1, flyCircleLoop: true, - rotateShow: false, + rotateShow: false, position: null, itemOptions: [ { index: 1, - lable: GlobalLang.add, + lable: $t("add"), iconName: "icontianjia", isSelect: false, }, { index: 2, - lable: GlobalLang.play, + lable: $t("play"), iconName: "iconbofang", isSelect: false, }, { index: 3, - lable: GlobalLang.pause, + lable: $t("pause"), iconName: "iconzanting", isSelect: false, - }, { + }, + { index: 4, - lable: GlobalLang.restore, + lable: $t("restore"), iconName: "iconfuwei", isSelect: false, - } + }, ], }); -init(); - const scene = viewer.scene; let windowPosition = new SuperMap3D.Cartesian2(); let scratchTiltFrame = new SuperMap3D.Matrix4(); let scratchOldTransform = new SuperMap3D.Matrix4(); +let handlerPoint = new SuperMap3D.DrawHandler( + viewer, + SuperMap3D.DrawMode.Point +); let listener; -let handlerPoint = new SuperMap3D.DrawHandler(viewer, SuperMap3D.DrawMode.Point); function init() { if (!window.viewer) return; @@ -112,8 +125,17 @@ function init() { viewer.scene.camera.speedRatio = state.speedRatio; } -// 功能切换 -function changleIconItem(item:any){ +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clearFlyCircle(); + handlerPoint.clear(); +}); + +// 功能切换 +function changleIconItem(item: any) { state.itemOptions.map((itemObj) => { if (itemObj.index == item.index) { itemObj.isSelect = true; @@ -136,6 +158,7 @@ function changleIconItem(item:any){ break; } case 4: { + clearFlyCircle(); reset(); break; } @@ -144,7 +167,6 @@ function changleIconItem(item:any){ } } - // 绑定监听事件 function addCenter() { viewer.enableCursorStyle = false; @@ -155,11 +177,9 @@ function addCenter() { } // 注册绘制球体事件 -handlerPoint.drawEvt.addEventListener(function (res) { - // state.position = res.object.position; -}); - - +// handlerPoint.drawEvt.addEventListener(function (res) { +// state.position = res.object.position; +// }); // 添加点 function left_click(e: any) { @@ -191,26 +211,35 @@ function reset() { if (!viewCenter || listener !== undefined) { return; } - let tiltFrame = SuperMap3D.Transforms.eastNorthUpToFixedFrame(viewCenter, scene.globe.ellipsoid, scratchTiltFrame); + let tiltFrame = SuperMap3D.Transforms.eastNorthUpToFixedFrame( + viewCenter, + scene.globe.ellipsoid, + scratchTiltFrame + ); // scene.camera.lookAtTransform(tiltFrame); let rotateAngle; listener = setInterval(function () { let currentHeading = SuperMap3D.Math.toDegrees(scene.camera.heading); - let oldTransform = SuperMap3D.Matrix4.clone(scene.camera.transform, scratchOldTransform); + let oldTransform = SuperMap3D.Matrix4.clone( + scene.camera.transform, + scratchOldTransform + ); scene.camera.lookAtTransform(tiltFrame); if (currentHeading > 180 && currentHeading < 360) { rotateAngle = SuperMap3D.Math.toRadians(360 - currentHeading) / 2; - scene.camera.rotateLeft(rotateAngle); //顺时针旋转 + scene.camera.rotateLeft(rotateAngle); //顺时针旋转 scene.camera.lookAtTransform(oldTransform); - if ((360 - currentHeading) < 1) { //罗盘指北移除监听 + if (360 - currentHeading < 1) { + //罗盘指北移除监听 clearInterval(listener); listener = undefined; } } else { rotateAngle = SuperMap3D.Math.toRadians(currentHeading) / 2; - scene.camera.rotateRight(rotateAngle); //逆时针旋转 + scene.camera.rotateRight(rotateAngle); //逆时针旋转 scene.camera.lookAtTransform(oldTransform); - if ((1 - currentHeading) > 0) { //罗盘指北移除监听 + if (1 - currentHeading > 0) { + //罗盘指北移除监听 clearInterval(listener); listener = undefined; } @@ -218,7 +247,6 @@ function reset() { }, 100); } - watch( () => state.speedRatio, (val) => { @@ -231,23 +259,4 @@ watch( viewer.scene.camera.flyCircleLoop = val; } ); - -onBeforeUnmount(() => { - clearFlyCircle(); - handlerPoint.clear(); -}); </script> -<style lang="scss" scoped> - -</style> - - - - - - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/sceneSet/fly-route/index.vue b/SuperMap iEarth/src/package/sceneSet/fly-route/index.vue index 428012e3..d3344dac 100644 --- a/SuperMap iEarth/src/package/sceneSet/fly-route/index.vue +++ b/SuperMap iEarth/src/package/sceneSet/fly-route/index.vue @@ -1,7 +1,12 @@ <template> <div class="btn-list"> - <div class="btn" :class="item.isSelect ? 'select-btn' : ''" v-for="(item, index) in comList" :key="index" - @click="changeItem(item)"> + <div + class="btn" + v-for="(item, index) in comList" + :class="item.isSelect ? 'select-btn' : ''" + :key="index" + @click="changeItem(item)" + > {{ item.name }} </div> </div> @@ -9,22 +14,25 @@ <KeepAlive> <component :is="currentItem.com"></component> </KeepAlive> + + <rotate></rotate> </template> <script lang="ts" setup> import { reactive, markRaw } from "vue"; import createRoute from "./components/create-route.vue"; import importRoute from "./components/import-route.vue"; +import rotate from "./components/rotate.vue"; // 使用vue3 setUp实现动态组件 let comList = reactive([ { - name: GlobalLang.importFlyRoute, + name: $t("importFlyRoute"), com: markRaw(importRoute), isSelect: true, }, { - name: GlobalLang.createFlyRoute, + name: $t("createFlyRoute"), com: markRaw(createRoute), isSelect: false, }, @@ -51,26 +59,14 @@ function changeItem(item: any) { <style lang="scss" scoped> .btn-list { - // font-size: 0.14rem; - display: flex; margin-left: 0.1rem; + width: 2.7rem; margin-bottom: 0.15rem; - cursor: pointer; justify-content: space-evenly; .btn { width: fit-content; padding: 0 0.1rem; - height: 0.26rem; - line-height: 0.26rem; - text-align: center; - - } - - .select-btn { - border-radius: 0.02rem; - color: #3499e5; - background: rgba(255, 255, 255, 0.15); } } -</style> \ No newline at end of file +</style> diff --git a/SuperMap iEarth/src/package/sceneSet/index.vue b/SuperMap iEarth/src/package/sceneSet/index.vue index 1553b352..92b11e8f 100644 --- a/SuperMap iEarth/src/package/sceneSet/index.vue +++ b/SuperMap iEarth/src/package/sceneSet/index.vue @@ -1,28 +1,37 @@ <template> <div class="scene-set-box"> - <n-tabs type="line" animated :on-update:value="tabsChange" justify-content="left"> + <n-tabs + type="line" + animated + :on-update:value="tabsChange" + justify-content="left" + > <!-- 场景属性 --> - <n-tab-pane name="publicService" :tab="$t('global.baseAttribute')" class="use-scroll"> + <n-tab-pane + name="publicService" + :tab="$t('baseAttribute')" + class="use-scroll" + > <SmSceneAttribute></SmSceneAttribute> </n-tab-pane> <!-- 飞行 --> - <n-tab-pane name="customService" :tab="$t('global.flying')"> + <n-tab-pane name="customService" :tab="$t('flying')"> <SmFlyRoute></SmFlyRoute> </n-tab-pane> <!-- 灯光 --> - <n-tab-pane name="onlineBaseMap" :tab="$t('global.ligth')"> + <n-tab-pane name="onlineBaseMap" :tab="$t('ligth')"> <SmSceneLight></SmSceneLight> </n-tab-pane> <!-- 视口 --> - <n-tab-pane name="onlineTerrain" :tab="$t('global.viewPorts')"> + <n-tab-pane name="onlineTerrain" :tab="$t('viewPorts')"> <SmSceneViewPort></SmSceneViewPort> </n-tab-pane> <!-- 特效 --> - <n-tab-pane name="SmSceneSpecialEffect" :tab="$t('global.speciallyEffect')"> + <n-tab-pane name="SmSceneSpecialEffect" :tab="$t('speciallyEffect')"> <SmSceneSpecialEffect></SmSceneSpecialEffect> </n-tab-pane> <!-- 视频投放 --> - <n-tab-pane name="videoSet" :tab="$t('global.videoFileSet')"> + <n-tab-pane name="videoSet" :tab="$t('videoFileSet')"> <SmVideoSet></SmVideoSet> </n-tab-pane> </n-tabs> @@ -30,7 +39,6 @@ </template> <script setup lang="ts"> -// import { usePanelStore } from "@/store/index"; import SmSceneAttribute from "./scene-attribute/index"; import SmFlyRoute from "./fly-route/index"; import SmSceneLight from "./scene-light/index"; @@ -38,32 +46,32 @@ import SmSceneViewPort from "./scene-viewPort/index"; import SmSceneSpecialEffect from "./scene-specialEffect/index"; import SmVideoSet from "./video-set/index"; -// const panelStore = usePanelStore(); function tabsChange() {} - -// 关闭弹窗 -// function panelCloseHandle() {} </script> <style lang="scss" scoped> .scene-set-box { width: 100%; height: 100%; - // padding: 0 0.12rem; + padding: 0 0.1rem; box-sizing: border-box; } -:deep(.n-tabs-tab-wrapper){ - margin-right:0.16rem; + +:deep(.n-tabs-tab-wrapper) { + margin-right: 0.12rem; +} + +:deep(.n-tabs-nav) { + padding: 0 0.12rem; +} + +:deep(.n-tab-pane) { + box-sizing: border-box; + padding-left: 0.12rem; + padding-right: 0.12rem; +} + +.use-scroll { + padding-right: 0px; } - :deep(.n-tabs-nav){ - padding:0 0.12rem; - }; - :deep(.n-tab-pane) { - box-sizing: border-box; - padding-left: 0.12rem; - padding-right: 0.12rem; - } - .use-scroll{ - padding-right: 0px; - } </style> diff --git a/SuperMap iEarth/src/package/sceneSet/scene-attribute/attribute.vue b/SuperMap iEarth/src/package/sceneSet/scene-attribute/attribute.vue new file mode 100644 index 00000000..173259cd --- /dev/null +++ b/SuperMap iEarth/src/package/sceneSet/scene-attribute/attribute.vue @@ -0,0 +1,429 @@ +<template> + <n-scrollbar style="max-height: 3.6rem"> + <n-grid :y-gap="8" :cols="3" style="padding-top: 0.1rem"> + <n-gi> + <n-checkbox v-model:checked="state.earthShow" :label="$t('earth')" /> + </n-gi> + <n-gi> + <n-checkbox + v-model:checked="state.shadow" + :label="$t('ligShadowAnalysisth')" + /> + </n-gi> + <n-gi> + <n-checkbox v-model:checked="state.sunShow" :label="$t('sun')" /> + </n-gi> + <n-gi> + <n-checkbox + v-model:checked="state.depthInspection" + :label="$t('depthInspection')" + /> + </n-gi> + <n-gi> + <n-checkbox + v-model:checked="state.atomsphereRender" + :label="$t('atomsphereRender')" + /> + </n-gi> + <n-gi> + <n-checkbox + v-model:checked="state.fogEffect" + :label="$t('fogEffect')" + /> + </n-gi> + <n-gi> + <n-checkbox + v-model:checked="state.cloudLayer" + :label="$t('cloudLayer')" + /> + </n-gi> + <n-gi> + <n-checkbox v-model:checked="state.skyBoxShow" :label="$t('skyBox')" /> + </n-gi> + <n-gi> + <n-checkbox v-model:checked="state.timeAxis" :label="$t('timeAxis')" /> + </n-gi> + <n-gi> + <n-checkbox + v-model:checked="state.displayFrame" + :label="$t('displayFrame')" + /> + </n-gi> + </n-grid> + + <n-divider /> + <div class="row-item" style="margin-right: 0.1rem"> + <span>{{ $t("brightness") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.brightness" + :step="0.1" + :min="0" + :max="5" + /> + <n-input-number + v-model:value="state.brightness" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="5" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item" style="margin-right: 0.1rem"> + <span>{{ $t("contrastRatio") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.contrast" + :step="0.1" + :min="0" + :max="5" + /> + <n-input-number + v-model:value="state.contrast" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="5" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item" style="margin-right: 0.1rem"> + <span>{{ $t("colorTone") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.hue" + :step="0.1" + :min="-1" + :max="1" + /> + <n-input-number + v-model:value="state.hue" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="-1" + :max="1" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item" style="margin-right: 0.1rem"> + <span>{{ $t("saturation") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.saturation" + :step="0.1" + :min="0" + :max="5" + /> + <n-input-number + v-model:value="state.saturation" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="5" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("showUnderground") }}</span> + <div style="width: 1.96rem; margin-right: 0.1rem"> + <n-switch v-model:value="state.showUnderground" size="small" /> + </div> + </div> + + <div + class="row-item" + v-show="state.showUnderground" + style="margin-right: 0.1rem" + > + <span>{{ $t("surfaceTransparency") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.5rem" + v-model:value="state.surfaceTransparency" + :step="0.1" + :min="0" + :max="1" + /> + <n-input-number + v-model:value="state.surfaceTransparency" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="1" + placeholder="" + size="small" + /> + </div> + </div> + + <n-divider /> + + <div class="row-item" style="margin-bottom: 0px; margin-right: 0.1rem"> + <span>{{ $t("coordinateQuery") }}</span> + <n-input + class="coordinateQueryBox" + disabled + :placeholder="$t('displayCoordinateTip')" + v-model:value="coordinate" + autosize + style="width: 1.96rem" + /> + </div> + + <div class="row-item queryTips"> + <span></span> + <span class="row-content">{{ $t("coordinateTip") }}</span> + </div> + </n-scrollbar> +</template> + +<script lang="ts" setup> +import { ref, watch, onMounted, onBeforeUnmount } from "vue"; +import tool from "@/tools/tool"; +import { useLayerStore } from "@/store/layerStore/layer"; +import layerManagement from "@/tools/layerManagement"; + +const layerStore = useLayerStore(); + +// 设置state +let state = layerStore.sceneAttrState; + +// 初始化变量 +let coordinate = ref(""); +let handlerSearch: any; +viewer.scene.colorCorrection.show = true; // 场景颜色开关打开 +state.shadow = viewer.shadows; + +// 云层 +let cloudBoxUrl = "./images/sceneProperties/clouds/clouds1.png"; +let cloudBox = new SuperMap3D.CloudBox({ url: cloudBoxUrl }); + +// 初始化 +function init() { + if (!window.viewer) return; + + //开启坐标查询 + queryCoordinate(); + + if (state.shadow) { + setShadow(); + } else { + viewer.shadows = false; + } +} + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + clear(); +}); + +// 场景中拾取查询坐标 +function queryCoordinate() { + handlerSearch = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); + handlerSearch.setInputAction(function (click) { + let position = viewer.scene.pickPosition(click.position); + let result = tool.CartesiantoDegrees(position); + coordinate.value = `${Number(result[0]).toFixed(4)},${Number( + result[1] + ).toFixed(4)},${Number(result[2]).toFixed(2)}`; + }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); +} + +// 设置阴影相关参数 +function setShadow() { + let layers = viewer.scene.layers.layerQueue; + for (var i = 0; i < layers.length; i++) { + // 设置图层的阴影模式 + layers[i].shadowType = 2; + } + + viewer.shadows = true; + // UE阴影 设置为false,使用原来的软阴影效果;设置为true,实现了新的阴影算法,可以大幅度提升阴影边界的质量,看起来会非常柔和,没有锯齿。这个设置webgl2.0默认开启了。 + viewer.pcss = true; + viewer.shadowQuality = 0; + //设置阴影的出现距离 + viewer.scene.shadowMap.maximumDistance = 2000; + //设置阴影的浓度,值越高,阴影越淡 + viewer.shadowMap.darkness = 0.7; + //默认值是0.1,值越小越清晰 + viewer.shadowMap.penumbraRatio = 0.1; +} + +// 清除 +function clear() { + handlerSearch.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); //移除事件 + + if (handlerSearch) { + if (!handlerSearch.isDestroyed()) handlerSearch.destroy(); + } + coordinate.value = ""; +} + +// 监听 +watch( + () => state.earthShow, + (val) => { + viewer.scene.globe.show = val; + } +); +watch( + () => state.shadow, + (val) => { + if (val) { + setShadow(); + } else { + viewer.shadows = false; + } + } +); +watch( + () => state.sunShow, + (val) => { + viewer.scene.globe.enableLighting = val; + } +); +watch( + () => state.depthInspection, + (val) => { + viewer.scene.globe.depthTestAgainstTerrain = val; + } +); +watch( + () => state.atomsphereRender, + (val) => { + viewer.scene.skyAtmosphere.show = val; + } +); +watch( + () => state.fogEffect, + (val) => { + viewer.scene.fog.enabled = val; // 不起作用 + } +); +watch( + () => state.showUnderground, + (val) => { + viewer.scene.undergroundMode = val; + if (val) { + viewer.scene.screenSpaceCameraController.minimumZoomDistance = -1000; //设置相机最小缩放距离,距离地表-1000米 + viewer.scene.terrainProvider.isCreateSkirt = false; // 关闭裙边 + } else { + viewer.scene.screenSpaceCameraController.minimumZoomDistance = 1; + viewer.scene.terrainProvider.isCreateSkirt = true; // 开启裙边 + viewer.scene.globe.globeAlpha = 1; + state.surfaceTransparency = 1; + } + } +); +watch( + () => state.surfaceTransparency, + (val) => { + viewer.scene.globe.globeAlpha = val; + } +); +watch( + () => state.cloudLayer, + (val) => { + if (val) { + viewer.scene.cloudBox = cloudBox; + } else { + viewer.scene.cloudBox = null; + } + } +); +watch( + () => state.skyBoxShow, + (val) => { + layerManagement.setSkyBox(val); + } +); +watch( + () => state.timeAxis, + (val) => { + let timeline = document.getElementsByClassName( + "supermap3d-viewer-timelineContainer" + )[0] as HTMLElement; + if (val) { + timeline.style.visibility = "visible"; + timeline.style["z-index"] = 99999999999; + } else { + timeline.style.visibility = "hidden"; + } + } +); +watch( + () => state.displayFrame, + (val) => { + viewer.scene.debugShowFramesPerSecond = val; + } +); +watch( + () => state.brightness, + (val) => { + viewer.scene.colorCorrection.brightness = val; + } +); +watch( + () => state.contrast, + (val) => { + viewer.scene.colorCorrection.contrast = val; + } +); +watch( + () => state.hue, + (val) => { + viewer.scene.colorCorrection.hue = val; + } +); +watch( + () => state.saturation, + (val) => { + viewer.scene.colorCorrection.saturation = val; + } +); +</script> + +<style lang="scss" scoped> +.queryTips { + font-size: 12px; + color: rgba(255, 255, 255, 0.45); +} + +.n-input.n-input--autosize .n-input__input-el { + color: rgba(255, 255, 255, 0.82) !important; +} + +.coordinateQueryBox { + border: 1px solid rgba(255, 255, 255, 0.15); +} +</style> diff --git a/SuperMap iEarth/src/package/sceneSet/scene-attribute/index.ts b/SuperMap iEarth/src/package/sceneSet/scene-attribute/index.ts index 1aa78809..b1b91429 100644 --- a/SuperMap iEarth/src/package/sceneSet/scene-attribute/index.ts +++ b/SuperMap iEarth/src/package/sceneSet/scene-attribute/index.ts @@ -1,3 +1,3 @@ -import SmSceneAttribute from './index.vue'; +import SmSceneAttribute from './attribute.vue'; export default SmSceneAttribute; diff --git a/SuperMap iEarth/src/package/sceneSet/scene-attribute/index.vue b/SuperMap iEarth/src/package/sceneSet/scene-attribute/index.vue deleted file mode 100644 index 4f9a7c08..00000000 --- a/SuperMap iEarth/src/package/sceneSet/scene-attribute/index.vue +++ /dev/null @@ -1,290 +0,0 @@ -<template> - <n-scrollbar style="max-height: 3.6rem"> - <n-grid :y-gap="8" :cols="3"> - <n-gi> - <n-checkbox v-model:checked="state.earthShow" :label="$t('global.earth')" /> - </n-gi> - <n-gi> - <n-checkbox v-model:checked="state.shadow" :label="$t('global.ligShadowAnalysisth')" /> - </n-gi> - <n-gi> - <n-checkbox v-model:checked="state.sunShow" :label="$t('global.sun')" /> - </n-gi> - <n-gi> - <n-checkbox v-model:checked="state.depthInspection" :label="$t('global.depthInspection')" /> - </n-gi> - <n-gi> - <n-checkbox v-model:checked="state.atomsphereRender" :label="$t('global.atomsphereRender')" /> - </n-gi> - <n-gi> - <n-checkbox v-model:checked="state.fogEffect" :label="$t('global.fogEffect')" /> - </n-gi> - <n-gi> - <n-checkbox v-model:checked="state.cloudLayer" :label="$t('global.cloudLayer')" /> - </n-gi> - <n-gi> - <n-checkbox v-model:checked="state.skyBoxShow" :label="$t('global.skyBox')" /> - </n-gi> - <n-gi> - <n-checkbox v-model:checked="state.timeAxis" :label="$t('global.timeAxis')" /> - </n-gi> - <n-gi> - <n-checkbox v-model:checked="state.displayFrame" :label="$t('global.displayFrame')" /> - </n-gi> - </n-grid> - - <n-divider /> - <div class="row-item" style="margin-right: 0.1rem"> - <span>{{ $t('global.brightness') }}</span> - <div class="slider-box"> - <n-slider style="width: 1.5rem;" v-model:value="state.brightness" :step="0.1" :min="0" :max="5" /> - <div class="slider-suffix"> - <span>{{ state.brightness }}</span> - </div> - </div> - </div> - - <div class="row-item" style="margin-right: 0.1rem"> - <span>{{ $t('global.contrastRatio') }}</span> - <div class="slider-box"> - <n-slider style="width: 1.5rem;" v-model:value="state.contrast" :step="0.1" :min="0" :max="5" /> - <div class="slider-suffix"> - <span>{{ state.contrast }}</span> - </div> - </div> - </div> - - <div class="row-item" style="margin-right: 0.1rem"> - <span>{{ $t('global.colorTone') }}</span> - <div class="slider-box"> - <n-slider style="width: 1.5rem;" v-model:value="state.hue" :step="0.1" :min="-1" :max="1" /> - <div class="slider-suffix"> - <span>{{ state.hue }}</span> - </div> - </div> - </div> - - <div class="row-item" style="margin-right: 0.1rem"> - <span>{{ $t('global.saturation') }}</span> - <div class="slider-box"> - <n-slider style="width: 1.5rem;" v-model:value="state.saturation" :step="0.1" :min="0" :max="5" /> - <div class="slider-suffix"> - <span>{{ state.saturation }}</span> - </div> - </div> - </div> - - <div class="row-item"> - <span>{{ $t('global.showUnderground') }}</span> - <div style="width: 1.96rem;;margin-right: 0.1rem"> - <n-switch v-model:value="state.showUnderground" size="small" /> - </div> - </div> - <div class="row-item" v-show="state.showUnderground"> - <span>{{ $t('global.surfaceTransparency') }}</span> - <div class="slider-box"> - <n-slider style="width: 1.5rem;" v-model:value="state.surfaceTransparency" :step="0.1" :min="0" :max="1" /> - <div class="slider-suffix"> - <span>{{ state.surfaceTransparency }}</span> - </div> - </div> - </div> - <n-divider /> - - <div class="row-item" style="margin-bottom:0px;margin-right: 0.1rem"> - <span>{{ $t('global.coordinateQuery') }}</span> - <n-input :placeholder="$t('global.displayCoordinate')" v-model:value="coordinate" autosize - style="width: 1.96rem;" /> - </div> - <div class="row-item queryTips"> - <span></span> - <span class="row-content">{{ $t('global.coordinateTip') }}</span> - </div> - </n-scrollbar> - <!-- <div class="btn-row-item" style="margin-bottom: 0.1rem"> - <n-button - type="info" - color="#3499E5" - text-color="#fff" - @click="queryCoordinate" - style="margin-right: 0.1rem" - >{{$t('global.query')}}</n-button - > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> - </div> --> -</template> - -<script lang="ts" setup> -import { ref, watch, reactive, onBeforeUnmount } from 'vue' -import tool from "@/tools/tool"; -import { useLayerStore } from "@/store/layerStore"; -import layerManagement from "@/tools/layerManagement"; - -const layerStore = useLayerStore(); - -// 设置state -let state = layerStore.sceneAttrState; - -// 初始化变量 -let coordinate = ref(''); -let handlerSearch: any; -viewer.scene.colorCorrection.show = true; // 场景颜色开关打开 - -// 云层 -let cloudBoxUrl = './images/sceneProperties/clouds/clouds1.png'; -let cloudBox = new SuperMap3D.CloudBox({ url: cloudBoxUrl }); - -// 初始化 -init(); -function init() { - if (!window.viewer) return; - - //开启坐标查询 - queryCoordinate(); - - // 设置图层阴影效果 - viewer.scene.shadows = false; - let layers = viewer.scene.layers.layerQueue; - for (var i = 0; i < layers.length; i++) { - // 设置图层的阴影模式 - layers[i].shadowType = 2; - } -} - -// 场景中拾取查询坐标 -function queryCoordinate() { - handlerSearch = new SuperMap3D.ScreenSpaceEventHandler(viewer.scene.canvas); - handlerSearch.setInputAction(function (click) { - let position = viewer.scene.pickPosition(click.position); - let result = tool.CartesiantoDegrees(position) - coordinate.value = `${Number(result[0]).toFixed(2)},${Number(result[1]).toFixed(2)},${Number(result[2]).toFixed(2)}` - }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK); -} - -// 清除 -function clear() { - handlerSearch.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK)//移除事件 - - if (handlerSearch) { - if (!handlerSearch.isDestroyed()) handlerSearch.destroy(); - } - coordinate.value = '' -} - -// 监听 -watch(() => state.earthShow, val => { - viewer.scene.globe.show = val; -}) -watch(() => state.shadow, val => { - if (val) { - let layers = viewer.scene.layers.layerQueue; - for (var i = 0; i < layers.length; i++) { - // 设置图层的阴影模式 - layers[i].shadowType = 2; - } - - viewer.shadows = true; - // UE阴影 设置为false,使用原来的软阴影效果;设置为true,实现了新的阴影算法,可以大幅度提升阴影边界的质量,看起来会非常柔和,没有锯齿。这个设置webgl2.0默认开启了。 - viewer.pcss = true; - viewer.shadowQuality = 0; - //设置阴影的出现距离 - viewer.scene.shadowMap.maximumDistance = 2000; - //设置阴影的浓度,值越高,阴影越淡 - viewer.shadowMap.darkness = 0.4; - //默认值是0.1,值越小越清晰 - viewer.shadowMap.penumbraRatio = 0.1; - } else { - viewer.shadows = false; - } - -}) -watch(() => state.sunShow, val => { - viewer.scene.globe.enableLighting = val; - -}) -watch(() => state.depthInspection, val => { - viewer.scene.globe.depthTestAgainstTerrain = val; - -}) -watch(() => state.atomsphereRender, val => { - viewer.scene.skyAtmosphere.show = val; - -}) -watch(() => state.fogEffect, val => { - viewer.scene.fog.enabled = val; // 不起作用 - -}); -watch( - () => state.showUnderground, - val => { - viewer.scene.undergroundMode = val; - if (val) { - viewer.scene.screenSpaceCameraController.minimumZoomDistance = -1000; //设置相机最小缩放距离,距离地表-1000米 - viewer.scene.terrainProvider.isCreateSkirt = false; // 关闭裙边 - } else { - viewer.scene.screenSpaceCameraController.minimumZoomDistance = 1; - viewer.scene.terrainProvider.isCreateSkirt = true; // 开启裙边 - } - } -); -watch( - () => state.surfaceTransparency, - val => { - viewer.scene.globe.globeAlpha = val; - - } -); -watch(() => state.cloudLayer, val => { - if (val) { - viewer.scene.cloudBox = cloudBox; - } else { - viewer.scene.cloudBox = null; - } -}) - -watch(() => state.skyBoxShow, val => { - layerManagement.setSkyBox(val); - -}) -watch(() => state.timeAxis, val => { - let timeline = document.getElementsByClassName( - "supermap3d-viewer-timelineContainer" - )[0] as HTMLElement; - if (val) { - timeline.style.visibility = "visible"; - timeline.style['z-index'] = 99999999999; - } else { - timeline.style.visibility = "hidden"; - } - -}) -watch(() => state.displayFrame, val => { - viewer.scene.debugShowFramesPerSecond = val; - -}) - -watch(() => state.brightness, val => { - viewer.scene.colorCorrection.brightness = val; -}) -watch(() => state.contrast, val => { - viewer.scene.colorCorrection.contrast = val; -}) -watch(() => state.hue, val => { - viewer.scene.colorCorrection.hue = val; -}) -watch(() => state.saturation, val => { - viewer.scene.colorCorrection.saturation = val; -}) - -onBeforeUnmount(() => { - clear(); - -}) -</script> -<style lang="scss" scoped> -.queryTips { - font-size: 12px; - color: rgba(255, 255, 255, 0.45); - -} -</style> diff --git a/SuperMap iEarth/src/package/sceneSet/scene-light/index.ts b/SuperMap iEarth/src/package/sceneSet/scene-light/index.ts index b40f3130..52e72689 100644 --- a/SuperMap iEarth/src/package/sceneSet/scene-light/index.ts +++ b/SuperMap iEarth/src/package/sceneSet/scene-light/index.ts @@ -1,3 +1,3 @@ -import SmSceneLight from './index.vue'; +import SmSceneLight from './light.vue'; export default SmSceneLight; diff --git a/SuperMap iEarth/src/package/sceneSet/scene-light/index.vue b/SuperMap iEarth/src/package/sceneSet/scene-light/light.vue similarity index 51% rename from SuperMap iEarth/src/package/sceneSet/scene-light/index.vue rename to SuperMap iEarth/src/package/sceneSet/scene-light/light.vue index 117928e0..70c3756d 100644 --- a/SuperMap iEarth/src/package/sceneSet/scene-light/index.vue +++ b/SuperMap iEarth/src/package/sceneSet/scene-light/light.vue @@ -1,78 +1,166 @@ <template> <div class="row-item"> - <span>{{$t('global.symbolLibrary')}}</span> + <span>{{ $t("symbolLibrary") }}</span> <div class="icon-container"> - <div class="icon-list" > - <span v-for="(item, index) in state.itemOptions" :key="index" :bordered="false" :title="item.lable" - @click="changleIconItem(item)" class="icon-span" :class="item.isSelect ? 'is-select' : ''"> - <i class="iconfont iconSize" :class="item.iconName" :title="item.lable" style="margin-top:0px"></i> + <div class="icon-list"> + <span + v-for="(item, index) in state.itemOptions" + :key="index" + :bordered="false" + :title="item.lable" + @click="changleIconItem(item)" + class="icon-span" + :class="item.isSelect ? 'is-select' : ''" + > + <i + class="iconfont iconSize" + :class="item.iconName" + :title="item.lable" + style="margin-top: 0px" + ></i> </span> </div> </div> </div> <div class="row-item"> - <span>{{$t('global.lightsourceColor')}}</span> + <span>{{ $t("lightsourceColor") }}</span> <div class="color-pick-box"> - <n-color-picker v-model:value="state.lightColor" :render-label="() => { - return ''; - } - " size="small"></n-color-picker> + <n-color-picker + v-model:value="state.lightColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> </div> <div class="row-item" v-if="state.lightSelectId != 3"> - <span>{{$t('global.diffusionDistance')}}</span> + <span>{{ $t("diffusionDistance") }}</span> <div class="slider-box"> - <n-slider style="width: 1.2rem" v-model:value="state.cutoffDistance" :step="1" :min="0" :max="500" /> - <span>{{ state.cutoffDistance }}</span> + <n-slider + style="width: 1.2rem" + v-model:value="state.cutoffDistance" + :step="1" + :min="0" + :max="500" + /> + <n-input-number + v-model:value="state.cutoffDistance" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="500" + placeholder="" + size="small" + /> </div> </div> <div class="row-item" v-if="state.lightSelectId != 3"> - <span>{{$t('global.lightDecay')}}</span> + <span>{{ $t("lightDecay") }}</span> <div class="slider-box"> - <n-slider style="width: 1.2rem" v-model:value="state.lightDecay" :step="0.1" :min="0" :max="10" /> - <span>{{ state.lightDecay }}</span> + <n-slider + style="width: 1.2rem" + v-model:value="state.lightDecay" + :step="0.1" + :min="0" + :max="10" + /> + <n-input-number + v-model:value="state.lightDecay" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="10" + placeholder="" + size="small" + /> </div> </div> <div class="row-item"> - <span>{{$t('global.lightsourceIntensity')}}</span> + <span>{{ $t("lightsourceIntensity") }}</span> <div class="slider-box"> - <n-slider style="width: 1.2rem" v-model:value="state.lightIntensity" :step="0.1" :min="0" :max="10" /> - <span>{{ state.lightIntensity }}</span> + <n-slider + style="width: 1.2rem" + v-model:value="state.lightIntensity" + :step="0.1" + :min="0" + :max="10" + /> + <n-input-number + v-model:value="state.lightIntensity" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="10" + placeholder="" + size="small" + /> </div> </div> <div class="row-item" v-if="state.lightSelectId === 2"> - <span>{{$t('global.spotlightRange')}}</span> + <span>{{ $t("spotlightRange") }}</span> <div class="slider-box"> - <n-slider style="width: 1.2rem" v-model:value="state.spotLightAngle" :step="1" :min="1" :max="90" /> - <span>{{ state.spotLightAngle }}</span> + <n-slider + style="width: 1.2rem" + v-model:value="state.spotLightAngle" + :step="1" + :min="1" + :max="90" + /> + <n-input-number + v-model:value="state.spotLightAngle" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="90" + placeholder="" + size="small" + /> </div> </div> <div class="row-item"> - <span>{{$t('global.displayLightmodel')}}</span> + <span>{{ $t("displayLightmodel") }}</span> <div class="check-box"> <n-checkbox v-model:checked="state.visibleModel"></n-checkbox> </div> </div> + <div class="row-item"> - <span>{{$t('global.displayLightcorrdinate')}}</span> + <span>{{ $t("displayLightcorrdinate") }}</span> <div class="check-box"> <n-checkbox v-model:checked="state.visiblePositions"></n-checkbox> </div> </div> - <div class="bableLight" ref="bableLightDom" v-show="state.visiblePositions && state.bableShow"> - <div class="row-item" style="margin-top:0.12rem"> - <span class="light-anaylse-pop-titie">{{$t('global.modelInformation')}}</span> - <span @click="state.visiblePositions = false;" style="margin-right:14px">X</span> + <div + class="bableLight" + ref="bableLightDom" + v-show="state.visiblePositions && state.bableShow" + > + <div class="row-item" style="margin-top: 0.12rem; cursor: default"> + <span class="light-anaylse-pop-titie">{{ $t("modelInformation") }}</span> + <span @click="state.visiblePositions = false" style="margin-right: 14px" + >X</span + > </div> - <div class="row-item" style="margin-left: 0.12rem;margin-right: 0.12rem"> - <span>{{$t('global.longitude')}}</span> + <div class="row-item" style="margin-left: 0.12rem; margin-right: 0.12rem"> + <span>{{ $t("longitude") }}</span> <n-input-number style="width: 1.5rem" v-model:value="state.modelPosition[0]" @@ -81,8 +169,8 @@ > </n-input-number> </div> - <div class="row-item" style="margin-left: 0.12rem;margin-right: 0.12rem"> - <span>{{$t('global.latitude')}}</span> + <div class="row-item" style="margin-left: 0.12rem; margin-right: 0.12rem"> + <span>{{ $t("latitude") }}</span> <n-input-number style="width: 1.5rem" v-model:value="state.modelPosition[1]" @@ -91,8 +179,8 @@ > </n-input-number> </div> - <div class="row-item" style="margin-left: 0.12rem;margin-right: 0.12rem"> - <span>{{$t('global.elevation')}}</span> + <div class="row-item" style="margin-left: 0.12rem; margin-right: 0.12rem"> + <span>{{ $t("elevation") }}</span> <n-input-number style="width: 1.5rem" v-model:value="state.modelPosition[2]" @@ -103,15 +191,27 @@ </div> </div> - <div class="btn-row-item" style="margin-bottom:0.1rem"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="addLight" style="margin-right: 0.1rem">{{$t('global.add')}}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> + <div class="btn-row-item" style="margin-left: 0.96rem"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="addLight" + style="margin-right: 0.1rem" + >{{ $t("add") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > </div> - <n-card class="tipDom" v-show="state.tipFlag">{{tip}}</n-card> </template> <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch,ref } from "vue"; +import { reactive, onMounted, onBeforeUnmount, watch, ref } from "vue"; import { useNotification } from "naive-ui"; import initHandler from "@/tools/drawHandler"; import tool from "@/tools/tool"; @@ -134,14 +234,14 @@ type stateType = { showligthModel: boolean; // 是否显示光源模型 showligtCoordinate: boolean; // 是否显示光源坐标 itemOptions: itemOptionsType[]; // 量算方式列表 - addLightFlag: boolean,// 判断当前是否处于添加灯光状态 - modelPosition: any, - visibleModel: boolean, - bubbleShow:boolean, - dockFontShow:boolean - visiblePositions:boolean, - bableShow:boolean, - tipFlag:boolean + addLightFlag: boolean; // 判断当前是否处于添加灯光状态 + modelPosition: any; + visibleModel: boolean; + bubbleShow: boolean; + dockFontShow: boolean; + visiblePositions: boolean; + bableShow: boolean; + // currentSelectedEntityPosition: }; // 设置默认值数据 @@ -158,47 +258,63 @@ let state = reactive<stateType>({ addLightFlag: false, modelPosition: [0, 0, 0], visibleModel: true, - bubbleShow:false, - dockFontShow:true, - visiblePositions:false, - bableShow:false, + bubbleShow: false, + dockFontShow: true, + visiblePositions: false, + bableShow: false, itemOptions: [ { index: 1, - lable: GlobalLang.pointLight, + lable: $t("pointLight"), iconName: "icondianguangyuan", isSelect: true, }, { index: 2, - lable: GlobalLang.spotLight, + lable: $t("spotLight"), iconName: "iconjuguangdeng", isSelect: false, }, { index: 3, - lable: GlobalLang.parallelLight, + lable: $t("parallelLight"), iconName: "iconpinghangguang", isSelect: false, }, ], - tipFlag:false }); -let handlerPolyline: any, handlerPoint: any; -let lightSource: any[] = []; +// 初始化变量 +const scene = viewer.scene; let bableLightDom = ref(); -let currentSelectedEntity, selectdeLightSource, s3mInstanceColc; let entityLightPairs = new Map(); // Entity和点光源对象的键值对 -let modelUrl = './Resource/model/light.s3m'; -let modelEditor; +let handlerPolyline: any, + handlerPoint: any, + lightSource: any[] = []; +let modelUrl = "./Resource/model/light.s3m"; +let currentSelectedEntity, selectdeLightSource, s3mInstanceColc, modelEditor; + +function init() { + s3mInstanceColc = new SuperMap3D.S3MInstanceCollection(scene._context); + viewer.scene.primitives.add(s3mInstanceColc); +} + +onMounted(() => { + init(); +}); + +onBeforeUnmount(() => { + distory(true); + viewer.eventManager.removeEventListener("CLICK", click_light); + lightSource.forEach((light) => { + viewer.scene.removeLightSource(light); + }); + lightSource.length = 0; + + s3mInstanceColc.removeCollection(modelUrl); + s3mInstanceColc = null; +}); -let editString = '请选中光源模型,再编辑属性'; -let clearString = '请选中光源模型在删除'; -let tip = ref(''); -const scene = viewer.scene; -s3mInstanceColc = new SuperMap3D.S3MInstanceCollection(scene._context); -viewer.scene.primitives.add(s3mInstanceColc); // 开始添加 function addLight() { state.addLightFlag = true; @@ -215,30 +331,42 @@ function addLight() { break; } - tip.value = editString; - state.tipFlag = true; + if (state.lightSelectId == 1) { + notification.create({ + content: () => $t("lightTip_edit"), + duration: 3500, + }); + } } -// 提示 -// tipChangeLight(); +// 点击事件:添加灯光或激modelEdit function click_light(e) { if (!state.addLightFlag) { let symbol = viewer.scene.pick(e.message.position) || viewer.selectedEntity; - if (symbol && symbol.id && typeof (symbol.id) === 'string' && symbol.id.indexOf("light-model-") != -1) { - if (currentSelectedEntity && currentSelectedEntity.id === symbol.id.id) return; + if ( + symbol && + symbol.id && + typeof symbol.id === "string" && + symbol.id.indexOf("light-model-") != -1 + ) { + if (currentSelectedEntity && currentSelectedEntity.id === symbol.id.id) + return; currentSelectedEntity = symbol; selectdeLightSource = entityLightPairs.get(symbol.id); - if (!modelEditor) addModelEditor(symbol.primitive) + if (!modelEditor) addModelEditor(symbol.primitive); else modelEditor.setEditObject(symbol.primitive); - // console.log(modelEditor) let position = tool.CartesiantoDegrees(modelEditor._position); state.modelPosition.length = 0; - state.modelPosition.push(...[position[0].toFixed(6), position[1].toFixed(6), position[2].toFixed(2)]); + state.modelPosition.push( + ...[ + position[0].toFixed(6), + position[1].toFixed(6), + position[2].toFixed(2), + ] + ); state.bableShow = true; - bableLightDom.value.style.top = (e.message.position.y - 200) + 'px'; - bableLightDom.value.style.left = (e.message.position.x + 20) + 'px'; - - // state.tipFlag = false; + bableLightDom.value.style.top = e.message.position.y - 200 + "px"; + bableLightDom.value.style.left = e.message.position.x + 20 + "px"; return; } state.bableShow = false; @@ -246,20 +374,19 @@ function click_light(e) { selectdeLightSource = undefined; if (modelEditor) modelEditor.deactivate(); } - - // state.tipFlag = false; } +// 添加模型编辑器 let isModelMoving = false; function addModelEditor(model) { modelEditor = new SuperMap3D.ModelEditor({ model: model, scene: viewer.scene, axesShow: { - "translation": true, - "rotation": false, - "scale": true - } + translation: true, + rotation: false, + scale: true, + }, }); modelEditor.activate(); modelEditor.changedEvt.addEventListener((param) => { @@ -268,22 +395,27 @@ function addModelEditor(model) { if (Cartesian3) { selectdeLightSource.position = Cartesian3; isModelMoving = true; - changeSlider(() => isModelMoving = false) + changeSlider(() => (isModelMoving = false)); let position = tool.CartesiantoDegrees(Cartesian3); state.modelPosition.length = 0; - state.modelPosition.push(...[position[0].toFixed(6), position[1].toFixed(6), position[2].toFixed(2)]) + state.modelPosition.push( + ...[ + position[0].toFixed(6), + position[1].toFixed(6), + position[2].toFixed(2), + ] + ); } - }) + }); } -let timer; // 防止滑块快速滑动的多次执行 +let timer; function changeSlider(callback) { if (timer) clearTimeout(timer); timer = setTimeout(function () { - callback() + callback(); }, 1000); - } // 添加光源模型 @@ -301,7 +433,7 @@ function addModel(position, pointLight) { // 绘制线 function add_line(callback: any) { notification.create({ - content: () => GlobalLang.addSpotLightTip, + content: () => $t("addSpotLightTip"), duration: 3500, }); if (!handlerPolyline) { @@ -356,6 +488,7 @@ function addPointLight(position: any) { }; let pointLight = new SuperMap3D.PointLight(position, options); viewer.scene.addLightSource(pointLight); + selectdeLightSource = pointLight; addModel(position, pointLight); lightSource.push(pointLight); state.addLightFlag = false; @@ -374,7 +507,8 @@ function addSpotLight(positions: any) { }; let spotLight = new SuperMap3D.SpotLight(position1, position2, options); viewer.scene.addLightSource(spotLight); - addModel(position1, spotLight) + selectdeLightSource = spotLight; + addModel(position1, spotLight); lightSource.push(spotLight); state.addLightFlag = false; } @@ -389,7 +523,8 @@ function addDirectionalLight(positions: any) { }; let directionalLight = new SuperMap3D.DirectionalLight(position1, options); viewer.scene.addLightSource(directionalLight); - addModel(position1, directionalLight) + selectdeLightSource = directionalLight; + addModel(position1, directionalLight); lightSource.push(directionalLight); state.addLightFlag = false; } @@ -401,16 +536,55 @@ function addModleHeight(Cartesian3: any) { return SuperMap3D.Cartographic.toCartesian(Cartographic); } +// 符号 +function changleIconItem(item: any) { + state.lightSelectId = item.index; + for (let i = 0; i < state.itemOptions.length; i++) { + if (state.itemOptions[i].index == item.index) { + state.itemOptions[i].isSelect = true; + } else { + state.itemOptions[i].isSelect = false; + } + } +} + +// 更新弹窗位置 +function updatePopup() { + if (currentSelectedEntity) { + let position = currentSelectedEntity.primitive._position; + updatePopupPosition(position); + } +} +function updatePopupPosition(position) { + var WindowCoordinates = SuperMap3D.SceneTransforms.wgs84ToWindowCoordinates( + viewer.scene, + position + ); + bableLightDom.value.style.top = + WindowCoordinates.y - bableLightDom.value.offsetHeight - 10 + "px"; + bableLightDom.value.style.left = + WindowCoordinates.x - bableLightDom.value.offsetWidth / 2 + 140 + "px"; +} + // 清除 -function clear() { +function clear(flag = false) { + distory(); +} + +function distory(flag = false) { state.bableShow = false; if (!selectdeLightSource) { - tip.value = clearString; - state.tipFlag = true; + if (!flag) { + notification.create({ + content: () => $t("lightTip_del"), + duration: 3500, + }); + } + return; - }; + } viewer.scene.removeLightSource(selectdeLightSource); - + state.visiblePositions = false; if (currentSelectedEntity) { entityLightPairs.delete(currentSelectedEntity.id); s3mInstanceColc.removeInstance(modelUrl, currentSelectedEntity.id); @@ -427,146 +601,116 @@ function clear() { viewer.enableCursorStyle = true; document.body.classList.remove("measureCur"); } - } -// 符号 -function changleIconItem(item: any) { - state.lightSelectId = item.index; - for (let i = 0; i < state.itemOptions.length; i++) { - if (state.itemOptions[i].index == item.index) { - state.itemOptions[i].isSelect = true; +watch( + () => state.lightColor, + (val) => { + if (!selectdeLightSource) return; + let color = SuperMap3D.Color.fromCssColorString(val); + selectdeLightSource.color = color; + } +); +watch( + () => state.visiblePositions, + (val) => { + if (val) { + viewer.clock.onTick.addEventListener(updatePopup); } else { - state.itemOptions[i].isSelect = false; + viewer.clock.onTick.removeEventListener(updatePopup); } } -} - -// 提示编辑 -function tipChangeLight(){ - notification.create({ - content: () => "请选中光源模型,再编辑属性", - duration: 1500, - // placement:'bottom -right' - }); -} - -// 提示清除 -function tipClearLight(){ - notification.create({ - content: () => "请选中光源模型在删除", - duration: 2500, - }); -} - -watch(() => state.lightColor, val => { - if (!selectdeLightSource) return; - let color = SuperMap3D.Color.fromCssColorString(val); - selectdeLightSource.color = color; -}) -watch(() => state.cutoffDistance, val => { - if (!selectdeLightSource) return; - if (selectdeLightSource.lightType === 1) { - selectdeLightSource.cutoffDistance = Number(val); - return; +); +watch( + () => state.cutoffDistance, + (val) => { + if (!selectdeLightSource) return; + if (selectdeLightSource.lightType === 1) { + selectdeLightSource.cutoffDistance = Number(val); + return; + } + if (selectdeLightSource.lightType === 2) { + selectdeLightSource.distance = Number(val); + return; + } } - if (selectdeLightSource.lightType === 2) { - selectdeLightSource.distance = Number(val); - return; +); +watch( + () => state.lightDecay, + (val) => { + if (!selectdeLightSource) return; + if (selectdeLightSource.lightType !== 0) { + selectdeLightSource.decay = Number(val); + } } -}) -watch(() => state.lightDecay, val => { - if (!selectdeLightSource) return; - if (selectdeLightSource.lightType !== 0) { - selectdeLightSource.decay = Number(val); +); +watch( + () => state.lightIntensity, + (val) => { + if (!selectdeLightSource) return; + selectdeLightSource.intensity = Number(val); } -}) -watch(() => state.lightIntensity, val => { - if (!selectdeLightSource) return; - selectdeLightSource.intensity = Number(val); -}) -watch(() => state.spotLightAngle, val => { - if (!selectdeLightSource) return; - if (selectdeLightSource.lightType === 2) { - selectdeLightSource.angle = SuperMap3D.Math.toRadians(Number(val)); +); +watch( + () => state.spotLightAngle, + (val) => { + if (!selectdeLightSource) return; + if (selectdeLightSource.lightType === 2) { + selectdeLightSource.angle = SuperMap3D.Math.toRadians(Number(val)); + } } -}) -watch(() => state.visibleModel, val => { - if (!currentSelectedEntity) return; - if (modelEditor) modelEditor.deactivate(); - s3mInstanceColc.visible = val -}) - -watch(()=>state.tipFlag,(val)=>{ - if(val){ - setTimeout(()=>{ - state.tipFlag = false; - },3000) +); +watch( + () => state.visibleModel, + (val) => { + if (!currentSelectedEntity) return; + if (modelEditor) modelEditor.deactivate(); + s3mInstanceColc.visible = val; } -}) - -watch(() => state.modelPosition, val => { - if (!currentSelectedEntity || isModelMoving) return; - changeSlider(() => { - let lon = Number(val[0]); - let lat = Number(val[1]); - let hei = Number(val[2]); - let position = SuperMap3D.Cartesian3.fromDegrees(lon, lat, hei); - selectdeLightSource.position = position; - currentSelectedEntity.primitive.updatePosition(position); - if (modelEditor) modelEditor.setEditObject(currentSelectedEntity.primitive); - }) -}, - { - deep: true - }) - -onBeforeUnmount(() => { - clear(); - viewer.eventManager.removeEventListener("CLICK", click_light); - lightSource.forEach((light) => { - viewer.scene.removeLightSource(light); - }); - lightSource.length = 0; - - s3mInstanceColc.removeCollection(modelUrl); - s3mInstanceColc = null; -}); +); +watch( + () => state.modelPosition, + (val) => { + if (!currentSelectedEntity || isModelMoving) return; + changeSlider(() => { + let lon = Number(val[0]); + let lat = Number(val[1]); + let hei = Number(val[2]); + let position = SuperMap3D.Cartesian3.fromDegrees(lon, lat, hei); + if (!position) return; + selectdeLightSource.position = position; + currentSelectedEntity.primitive.updatePosition(position); + if (modelEditor) + modelEditor.setEditObject(currentSelectedEntity.primitive); + }); + }, + { deep: true } +); </script> - <style lang="scss" scoped> .is-select { - color: #3499e5; - } - -.bableLight{ + color: #3499e5; +} + +.bableLight { position: fixed; top: 2rem; left: 5rem; - background-color: #3B5168; + background-color: #383838; opacity: 0.8; height: 1.8rem; width: 2.28rem; z-index: 200000; - .light-anaylse-pop-titie{ - font-size: 12px; - line-height: 20px; + + .light-anaylse-pop-titie { + font-size: 0.12rem; + line-height: 0.2rem; margin-left: 0.12rem; } - span { - font-size: 12px; - } -} -.tipDom{ - position: fixed; - bottom: 0.8rem; - width: auto; - /* height: 0.5rem; */ - text-align: center; - height: auto; - right: 0.6rem; + span { + font-size: 0.12rem; + } } </style> - diff --git a/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/flood-light.vue b/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/flood-light.vue index b94ff532..be07d020 100644 --- a/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/flood-light.vue +++ b/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/flood-light.vue @@ -1,71 +1,136 @@ <template> <div class="row-item"> - <span>{{$t('global.openFloodlight')}}</span> - <div style="width: 1.96rem;"> - <n-switch v-model:value="state.bloomShow" @update:value="setBloom" size="small" /> + <span>{{ $t("openFloodlight") }}</span> + <div style="width: 1.96rem"> + <n-switch + v-model:value="state.bloomShow" + @update:value="setBloom" + size="small" + /> </div> </div> <div class="row-item" v-show="state.bloomShow"> - <span>{{$t('global.brightnessThreshold')}}</span> + <span>{{ $t("brightnessThreshold") }}</span> <div class="slider-box"> - <n-slider style="width: 1.2rem;" v-model:value="state.threshold" :step="0.01" :min="0" :max="1" /> - <div class="slider-suffix"> - <span>{{ state.threshold }}</span> - </div> + <n-slider + style="width: 1.2rem" + v-model:value="state.threshold" + :step="0.01" + :min="0" + :max="1" + /> + <n-input-number + v-model:value="state.threshold" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="1" + placeholder="" + size="small" + /> </div> </div> - <div class="row-item" v-show="state.bloomShow"> - <span>{{$t('global.floodlightThreshold')}}</span> + <span>{{ $t("floodlightThreshold") }}</span> <div class="slider-box"> - <n-slider style="width: 1.2rem;" v-model:value="state.bloomIntensity" :step="0.01" :min="0" :max="1" /> - <div class="slider-suffix"> - <span>{{ state.bloomIntensity }}</span> - </div> + <n-slider + style="width: 1.2rem" + v-model:value="state.bloomIntensity" + :step="0.01" + :min="0" + :max="1" + /> + <n-input-number + v-model:value="state.bloomIntensity" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="1" + placeholder="" + size="small" + /> </div> </div> + <!-- 热力图 --> + <!-- <div class="row-item"> - <span>{{$t('global.heatMap')}}</span> - <div style="width: 1.96rem;"> + <span>{{ $t("heatMap") }}</span> + <div style="width: 1.96rem"> <n-switch v-model:value="state.showHeatMap" size="small" /> </div> </div> - <div class="btn-row-item" v-show="state.showHeatMap"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="add_heatMap" - style="margin-right: 0.1rem">{{$t('global.Draw')}}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> + <div + class="btn-row-item" + v-show="state.showHeatMap" + style="margin-left: 1rem" + > + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="add_heatMap" + style="margin-right: 0.1rem" + >{{ $t("Draw") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > </div> - <div class="heatmap" v-show="false" style="overflow: hidden; width: 840px;height: 400px;"> - <div class="heatmap-canvas" width="50%" height="25%"> - </div> - </div> + <div + class="heatmap" + v-show="false" + style="overflow: hidden; width: 8.4rem; height: 4rem" + > + <div class="heatmap-canvas" width="50%" height="25%"></div> + </div> --> </template> <script lang="ts" setup> import { onUnmounted, reactive, watch } from "vue"; -import initHandler from "@/tools/drawHandler"; +// import { useNotification } from "naive-ui"; +// import initHandler from "@/tools/drawHandler"; + +// const notification = useNotification(); type stateType = { - bloomShow: boolean, // 是否开启泛光 - threshold: number, // 亮度阈值 - bloomIntensity: number, // 泛光强度 - showHeatMap: boolean -} + bloomShow: boolean; // 是否开启泛光 + threshold: number; // 亮度阈值 + bloomIntensity: number; // 泛光强度 + showHeatMap: boolean; +}; let state = reactive<stateType>({ bloomShow: false, threshold: 0.65, bloomIntensity: 1, - showHeatMap: false + showHeatMap: false, }); -let handlerPolyline: any, pts: any,nameHeatMap:any; -let layers: any = viewer.scene.layers._layerQueue; + const scene = viewer.scene; +let handlerPolyline: any; +let pts: any, nameHeatMap: any; +let layers: any = viewer.scene.layers._layerQueue; + +onUnmounted(() => { + viewer.scene.bloomEffect.show = false; + viewer.scene.bloomEffect.threshold = 0.65; + viewer.scene.bloomEffect.bloomIntensity = 1; + + clear(); +}); // 启动泛光 function setBloom() { @@ -74,93 +139,11 @@ function setBloom() { viewer.scene.bloomEffect.bloomIntensity = state.bloomIntensity; } -// 添加线 -function add_heatMap() { - clearHeatMap(); - let heatmapInstance = createHeatMap(40); - if (!handlerPolyline) { - handlerPolyline = initHandler("Polyline"); - } - handlerPolyline.handlerDrawing().then( - (res) => { - // creat_entity_line(res.object.positions); - handlerPolyline.polylineTransparent.show = false; - pts = res.object ? res.object.positions : res; - let layers: any = viewer.scene.layers._layerQueue; - let mycanvas: any = document.getElementsByClassName("heatmap-canvas"); - let imgData = mycanvas[1].toDataURL("image/png"); - let img = new Image(); - img.src = imgData; - nameHeatMap = "heatMap-"+Date.parse(String(new Date())); - img.onload = function () { - for (let layer of layers) { - layer.addOverlayImage({ - bounds: SuperMap3D.Rectangle.fromCartesianArray(pts), - name: nameHeatMap, - image: img - }); - } - // polylineHandler.activate(); - } - }, - (err) => { - console.log(err); - } - ); - handlerPolyline.activate(); -} - -function createHeatMap(value) { - let heatmapInstance = h337.create({ - container: document.querySelector('.heatmap'), - radius: value - }); - let points: any = []; - let max = 0; - let width = 840; - let height = 400; - let len = 200; - while (len--) { - let val = Math.floor(Math.random() * 100); - max = Math.max(max, val); - let point = { - x: Math.floor(Math.random() * width), - y: Math.floor(Math.random() * height), - value: val - }; - points.push(point) - } - let data = { - max: max, - data: points - } - heatmapInstance.setData(data); - return heatmapInstance; -} - -function clearHeatMap(){ - // 使用一种极其特殊的方式来删除热力图 - (这种并不好,主要是removeOverlayImage不起作用,暂时这样,后面来改) - let ptss = [{ x: -2182183.7755420757, y: 4386763.349348834, z: 4069821.86199696 }, { x: -2182185.7755420757, y: 4386764.349348834, z: 4069822.86199696 }] - let height = scene.camera.positionCartographic.height; - let _heatmapInstance = createHeatMap(height / 10); - - let img = new Image(); - img.src = _heatmapInstance.getDataURL(); - img.onload = function () { - for (let layer of layers) { - layer.removeOverlayImage(nameHeatMap); - layer.addOverlayImage({ - bounds: SuperMap3D.Rectangle.fromCartesianArray(ptss), - name: 'del-temp-heatMap', - image: img - }); - } - } -} - +// 清除 function clear() { if (handlerPolyline) handlerPolyline.clearHandler(); - clearHeatMap(); + // clearHeatMap(); + // let layers:any = viewer.scene.layers._layerQueue; // for (let layer of layers) { // if(layer.name === 'Building@CBD'){ @@ -187,9 +170,98 @@ function clear() { // } // } // // } +} +// // 创建并添加热力图 +// function add_heatMap() { +// clearHeatMap(); +// // let heatmapInstance = createHeatMap(40); +// notification.create({ +// content: () => $t("scanLineTip"), +// duration: 3500, +// }); +// if (!handlerPolyline) { +// handlerPolyline = initHandler("Polyline"); +// } +// handlerPolyline.handlerDrawing().then( +// (res) => { +// handlerPolyline.polylineTransparent.show = false; +// pts = res.object ? res.object.positions : res; +// let layers: any = viewer.scene.layers._layerQueue; +// let mycanvas: any = document.getElementsByClassName("heatmap-canvas"); +// let imgData = mycanvas[1].toDataURL("image/png"); +// let img = new Image(); +// img.src = imgData; +// nameHeatMap = "heatMap-" + Date.parse(String(new Date())); +// img.onload = function () { +// for (let layer of layers) { +// layer.addOverlayImage({ +// bounds: SuperMap3D.Rectangle.fromCartesianArray(pts), +// name: nameHeatMap, +// image: img, +// }); +// } +// }; +// }, +// (err) => { +// console.log(err); +// } +// ); +// handlerPolyline.activate(); +// } -} +// // 创建热力图 +// function createHeatMap(value) { +// let heatmapInstance = h337.create({ +// container: document.querySelector(".heatmap"), +// radius: value, +// }); +// let points: any = []; +// let max = 0; +// let width = 840; +// let height = 400; +// let len = 200; +// while (len--) { +// let val = Math.floor(Math.random() * 100); +// max = Math.max(max, val); +// let point = { +// x: Math.floor(Math.random() * width), +// y: Math.floor(Math.random() * height), +// value: val, +// }; +// points.push(point); +// } +// let data = { +// max: max, +// data: points, +// }; +// heatmapInstance.setData(data); +// return heatmapInstance; +// } + +// // 清除热力图 +// function clearHeatMap() { +// // 使用一种极其特殊的方式来删除热力图 - (这种并不好,主要是removeOverlayImage不起作用,暂时这样,后面来改) +// let ptss = [ +// { x: -2182183.7755420757, y: 4386763.349348834, z: 4069821.86199696 }, +// { x: -2182185.7755420757, y: 4386764.349348834, z: 4069822.86199696 }, +// ]; +// let height = scene.camera.positionCartographic.height; +// let _heatmapInstance = createHeatMap(height / 10); + +// let img = new Image(); +// img.src = _heatmapInstance.getDataURL(); +// img.onload = function () { +// for (let layer of layers) { +// layer.removeOverlayImage(nameHeatMap); +// layer.addOverlayImage({ +// bounds: SuperMap3D.Rectangle.fromCartesianArray(ptss), +// name: "del-temp-heatMap", +// image: img, +// }); +// } +// }; +// } watch( () => state.threshold, @@ -203,7 +275,6 @@ watch( viewer.scene.bloomEffect.bloomIntensity = newVal; } ); - watch( () => state.showHeatMap, (val) => { @@ -214,20 +285,12 @@ watch( } } ); - -onUnmounted(() => { - viewer.scene.bloomEffect.show = false; - viewer.scene.bloomEffect.threshold = 0.65; - viewer.scene.bloomEffect.bloomIntensity = 1; -}); </script> -<style lang="scss" scoped> +<style lang="scss" scoped> .heatmap { - // z-index: 1; position: absolute; - top: 20rem; left: 20rem; } -</style> \ No newline at end of file +</style> diff --git a/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/rain-sonw.vue b/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/rain-sonw.vue index 2e67e125..64d49737 100644 --- a/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/rain-sonw.vue +++ b/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/rain-sonw.vue @@ -1,89 +1,157 @@ <template> - <div class="row-item"> - <span>{{$t('global.openRain')}}</span> - <div style="width: 1.96rem;"> - <n-switch v-model:value="state.rainShow" @update:value="setRain" size="small"/> + <span>{{ $t("openRain") }}</span> + <div style="width: 1.96rem"> + <n-switch v-model:value="state.rainShow" size="small" /> </div> </div> <div class="row-item" v-show="state.rainShow"> - <span>{{$t('global.rainAngle')}}</span> + <span>{{ $t("rainAngle") }}</span> <div class="slider-box"> - <n-slider v-model:value="state.rainAngle" style="width: 70%" - :min="0" - :max="90" - :step="10"/> - <div class="row-slider-num" >{{ state.rainAngle }} <span> °</span></div> + <n-slider + v-model:value="state.rainAngle" + style="width: 70%" + :min="0" + :max="90" + :step="1" + /> + <n-input-number + v-model:value="state.rainAngle" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="90" + placeholder="" + size="small" + /> + <span> °</span> </div> </div> + <div class="row-item" v-show="state.rainShow"> - <span>{{$t('global.rainSpeed')}}</span> + <span>{{ $t("rainSpeed") }}</span> <div class="slider-box"> - <n-slider v-model:value="state.rainSpeed" style="width: 70%" - :min="0" - :max="30" - :step="2"/> - <div class="row-slider-num" >{{ state.rainSpeed }} <span>{{$t('global.meterSecond')}}</span></div> + <n-slider + v-model:value="state.rainSpeed" + style="width: 70%" + :min="0" + :max="100" + :step="1" + /> + <n-input-number + v-model:value="state.rainSpeed" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="100" + placeholder="" + size="small" + /> + <span style="width: 42px">{{ $t("meterSecond") }}</span> </div> </div> - <div class="row-item"> - <span>{{$t('global.openSnow')}}</span> - <div style="width: 1.96rem;"> - <n-switch v-model:value="state.snowShow" @update:value="setSnow" size="small"/> + <span>{{ $t("openSnow") }}</span> + <div style="width: 1.96rem"> + <n-switch v-model:value="state.snowShow" size="small" /> </div> </div> <div class="row-item" v-show="state.snowShow"> - <span>{{$t('global.snowAngle')}}</span> - <div class="slider-box" > - <n-slider v-model:value="state.snowAngle" style="width: 70%" - :min="0" - :max="90" - :step="10"/> - <div class="row-slider-num" >{{ state.snowAngle }} <span> °</span></div> + <span>{{ $t("snowAngle") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.snowAngle" + style="width: 70%" + :min="0" + :max="90" + :step="1" + /> + <n-input-number + v-model:value="state.snowAngle" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="90" + placeholder="" + size="small" + /> + <span> °</span> </div> </div> - + <div class="row-item" v-show="state.snowShow"> - <span>{{$t('global.snowSpeed')}}</span> + <span>{{ $t("snowSpeed") }}</span> <div class="slider-box"> - <n-slider v-model:value="state.snowSpeed" style="width: 70%" - :min="0" - :max="30" - :step="1"/> - <div class="row-slider-num" >{{ state.snowSpeed }} <span>{{$t('global.meterSecond')}}</span></div> + <n-slider + v-model:value="state.snowSpeed" + style="width: 70%" + :min="0" + :max="100" + :step="1" + /> + <n-input-number + v-model:value="state.snowSpeed" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="100" + placeholder="" + size="small" + /> + <span style="width: 42px">{{ $t("meterSecond") }}</span> </div> </div> <div class="row-item" v-show="state.snowShow"> - <span>{{$t('global.snowDensity')}}</span> - <div class="slider-box" > - <n-slider v-model:value="state.snowDesity" style="width: 70%" - :min="0" - :max="30" - :step="1"/> - <div class="row-slider-num" >{{ state.snowDesity }} <span> °</span></div> + <span>{{ $t("snowDensity") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.snowDesity" + style="width: 70%" + :min="0" + :max="60" + :step="1" + /> + <n-input-number + v-model:value="state.snowDesity" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="0" + :max="60" + placeholder="" + size="small" + /> </div> </div> </template> <script lang="ts" setup> -import { reactive, watch, onUnmounted } from "vue"; +import { reactive, watch, onMounted, onUnmounted } from "vue"; type stateType = { // 雨景 - rainShow: boolean, // 是否开启雨景 - rainAngle: number, // 雨角度 - rainSpeed: number, // 雨速度 + rainShow: boolean; // 是否开启雨景 + rainAngle: number; // 雨角度 + rainSpeed: number; // 雨速度 // 雪景 - snowShow: boolean, // 是否开启雪景 - snowAngle: number, // 雪角度 - snowSpeed: number, // 雪速度 - snowDesity: number, // 雪密度 -} + snowShow: boolean; // 是否开启雪景 + snowAngle: number; // 雪角度 + snowSpeed: number; // 雪速度 + snowDesity: number; // 雪密度 +}; let state = reactive<stateType>({ rainShow: false, @@ -95,11 +163,48 @@ let state = reactive<stateType>({ snowDesity: 16, }); +const scene = viewer.scene; + +onMounted(() => {}); + +onUnmounted(() => { + viewer.scene.postProcessStages.rain.enabled = false; + viewer.scene.postProcessStages.snow.enabled = false; + for (let i = 0; i < scene.layers.layerQueue.length; i++) { + let layer = scene.layers.layerQueue[i]; + layer.removePBRMaterial(); + } +}); + // 开启雨景 function setRain() { viewer.scene.postProcessStages.rain.enabled = state.rainShow; viewer.scene.postProcessStages.rain.uniforms.angle = state.rainAngle; viewer.scene.postProcessStages.rain.uniforms.speed = state.rainSpeed; + + if (state.rainShow) { + for (let i = 0; i < scene.layers.layerQueue.length; i++) { + let layer = scene.layers.layerQueue[i]; + layer.setPBRMaterialFromJSON("./Resource/pbr/MaterialJson/rain_.json"); + // layer.rainEffect.wetnessFactor = 0.65; + // 实现雨水渐增的效果 + let intervalValue = setInterval(() => { + if (layer.rainEffect !== undefined) { + layer.rainEffect.wetnessFactor += 0.005; + } + if ( + layer.rainEffect !== undefined && + layer.rainEffect.wetnessFactor > 0.65 + ) + clearInterval(intervalValue); + }, 40); + } + } else { + for (let i = 0; i < scene.layers.layerQueue.length; i++) { + let layer = scene.layers.layerQueue[i]; + layer.removePBRMaterial(); + } + } } // 开启雪景 @@ -108,8 +213,52 @@ function setSnow() { viewer.scene.postProcessStages.snow.uniforms.angle = state.snowAngle; viewer.scene.postProcessStages.snow.uniforms.speed = state.snowSpeed; viewer.scene.postProcessStages.snow.uniforms.density = state.snowDesity; + + if (state.snowShow) { + for (let i = 0; i < scene.layers.layerQueue.length; i++) { + let layer = scene.layers.layerQueue[i]; + layer.setPBRMaterialFromJSON( + "./Resource/pbr/MaterialJson/M_Brick_Clay_Old_.json" + ); + let intervalValue = setInterval(() => { + if ( + layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect !== undefined + ) { + layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect.snow_coverage += 0.0006; + } + if ( + layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect !== + undefined && + layer._PBRMaterialParams.pbrMetallicRoughness.snowEffect + .snow_coverage - + 1 > + 0 + ) + clearInterval(intervalValue); + }, 30); + } + } else { + for (let i = 0; i < scene.layers.layerQueue.length; i++) { + let layer = scene.layers.layerQueue[i]; + layer.removePBRMaterial(); + } + } } +watch( + () => state.rainShow, + () => { + state.snowShow = false; + setRain(); + } +); +watch( + () => state.snowShow, + () => { + state.rainShow = false; + setSnow(); + } +); watch( () => state.rainAngle, (newVal: number) => { @@ -140,13 +289,4 @@ watch( viewer.scene.postProcessStages.snow.uniforms.density = newVal; } ); - -onUnmounted(() => { - // state.rainShow = false; - // state.snowShow = false; - viewer.scene.postProcessStages.rain.enabled = false; - viewer.scene.postProcessStages.snow.enabled = false; -}); </script> -<style lang="scss" scoped> -</style> \ No newline at end of file diff --git a/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/scan-line.vue b/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/scan-line.vue index acd81ec6..84b0954e 100644 --- a/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/scan-line.vue +++ b/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/scan-line.vue @@ -1,170 +1,251 @@ <template> <div class="row-item"> - <span>{{$t('global.scanMode')}}</span> - <div style="width: 1.96rem;"> - <n-radio-group v-model:value="state.scanMode" name="scanMode"> - <n-space> - <n-radio :value="0">{{$t('global.lineShape')}}</n-radio> - <n-radio :value="1">{{$t('global.circleShape')}}</n-radio> - </n-space> - </n-radio-group> - </div> - </div> - <div class="row-item"> - <span>{{$t('global.scanColor')}}</span> - <div class="color-pick-box" style="width: 1.96rem;"> - <n-color-picker - v-model:value="state.scanColor" - :render-label=" - () => { - return ''; - } - " - size="small" - ></n-color-picker> - </div> + <span>{{ $t("scanMode") }}</span> + <div style="width: 1.96rem"> + <n-radio-group v-model:value="state.scanMode" name="scanMode"> + <n-radio :value="0">{{ $t("lineShape") }}</n-radio> + <n-radio :value="1">{{ $t("circleShape") }}</n-radio> + </n-radio-group> </div> + </div> - <div class="row-item"> - <span>{{$t('global.scanTexture')}}</span> - <n-select - style="width: 1.96rem;" - v-model:value="state.selectedTexture" - :options="state.scanTextures" - /> + <div class="row-item"> + <span>{{ $t("scanColor") }}</span> + <div class="color-pick-box" style="width: 1.96rem"> + <n-color-picker + v-model:value="state.scanColor" + :render-label=" + () => { + return ''; + } + " + size="small" + ></n-color-picker> </div> + </div> + <div class="row-item"> + <span>{{ $t("scanTexture") }}</span> + <n-select + style="width: 1.96rem" + v-model:value="state.selectedTexture" + :options="state.scanTextures" + /> + </div> - <!-- <div v-show="state.scanMode === 0"> - <span>扫描宽度</span> - <div> - <n-slider v-model:value="state.lineWidth" :min="0" :max="1000" /> + <div class="row-item" v-if="state.scanMode == 0"> + <span>{{ $t("scanWidth") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.lineWidth" + style="width: 70%" + :step="1" + :min="1" + :max="1000" + /> + <n-input-number + v-model:value="state.lineWidth" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="1000" + placeholder="" + size="small" + /> </div> </div> - <div> - <span>扫描速度</span> - <div> - <n-slider v-model:value="state.speed" :min="0" :max="200" /> + <div class="row-item" v-if="state.scanMode == 0"> + <span>{{ $t("scanSpeed") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.speed" + style="width: 70%" + :step="1" + :min="1" + :max="200" + /> + <n-input-number + v-model:value="state.speed" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="200" + placeholder="" + size="small" + /> </div> </div> - <div> - <span>扫描周期</span> - <div> - <n-slider v-model:value="state.period" :min="0" :max="20" /> + <!-- 扫描周期 or 持续时间 --> + <!-- <div class="row-item"> + <span>{{ $t("scanPeriod") }}</span> + <div class="slider-box"> + <n-slider + v-model:value="state.period" + style="width: 70%" + :step="1" + :min="1" + :max="20" + /> + <n-input-number + v-model:value="state.period" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="20" + placeholder="" + size="small" + /> </div> </div> --> <div class="row-item" v-show="state.scanMode === 0"> - <span :style="state.currentLanguage=='en'?'width:30%':''">{{$t('global.customScanDirection')}}</span> - <div class="check-box" style="width:1.96rem"> - <n-checkbox v-model:checked="state.customDirection"></n-checkbox> - </div> + <span>{{ $t("customScanDirection") }}</span> + <div class="check-box" style="width: 1.96rem"> + <n-checkbox v-model:checked="state.customDirection"></n-checkbox> </div> + </div> + <div class="row-item" v-show="state.scanMode === 1"> - <span :style="state.currentLanguage=='en'?'width:30%':''">{{$t('global.customScanCenter')}}</span> - <div class="check-box" style="width:1.96rem"> - <n-checkbox v-model:checked="state.customCenter"></n-checkbox> - </div> + <span>{{ $t("customScanCenter") }}</span> + <div class="check-box" style="width: 1.96rem"> + <n-checkbox v-model:checked="state.customCenter"></n-checkbox> </div> + </div> - <div class="btn-row-item"> + <div class="btn-row-item" style="margin-left: 0.96rem"> <n-button type="info" color="#3499E5" text-color="#fff" @click="addScans" style="margin-right: 0.1rem" - >{{$t('global.add')}}</n-button + >{{ $t("add") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button > - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{$t('global.clear')}}</n-button> </div> </template> - - <script lang="ts" setup> -import { reactive, onBeforeUnmount, watch } from "vue"; + +<script lang="ts" setup> +import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; import { useNotification } from "naive-ui"; import initHandler from "@/tools/drawHandler"; const notification = useNotification(); type stateType = { - scanMode: number, // 扫描模式 - scanColor: string, // 扫描颜色 - scanTextures: any, // 扫描纹理 - selectedTexture: number, // 当前选择的纹理索引 - lineWidth: number, //获取或设置线状扫描线的宽度,单位:米。 - period:number, //获取或设置扫描线的运行周期,单位:秒。 - speed: number, //获取或设置扫描线的运行速度,单位:米/秒。 - scanShow: boolean, // - customDirection:boolean, // 自定义扫描方向 - customCenter:boolean,// 自定义扫描中心 - addTextures:any, // 纹理选项 - currentLanguage:string -} + scanMode: number; // 扫描模式 + scanColor: string; // 扫描颜色 + scanTextures: any; // 扫描纹理 + selectedTexture: number; // 当前选择的纹理索引 + lineWidth: number; //获取或设置线状扫描线的宽度,单位:米。 + period: number; //获取或设置扫描线的运行周期,单位:秒。 + speed: number; //获取或设置扫描线的运行速度,单位:米/秒。 + scanShow: boolean; // + customDirection: boolean; // 自定义扫描方向 + customCenter: boolean; // 自定义扫描中心 + addTextures: any; // 纹理选项 +}; -// 初始化数据 +// 初始化变量 let state = reactive<stateType>({ scanMode: 0, - scanColor: "rgba(0,174,255,1)", - scanTextures: [{ label: () => '无纹理', value: 0, url: "" }], + scanColor: "rgba(162,224,252,1)", + scanTextures: [{ label: () => "无纹理", value: 0, url: "" }], selectedTexture: 0, lineWidth: 100, //获取或设置线状扫描线的宽度,单位:米。 period: 3.0, //获取或设置扫描线的运行周期,单位:秒。 speed: 100, //获取或设置扫描线的运行速度,单位:米/秒。 scanShow: false, - customDirection:true, - customCenter:true, + customDirection: true, + customCenter: true, addTextures: [ { - name: GlobalLang.lineTexture1, - nameEN: "Linear texture 1", + name: $t("lineTexture1"), type: "line", url: "./images/particleSystem/line-1.jpg", }, { - name: GlobalLang.lineTexture2, - nameEN: "Linear texture 2", + name: $t("lineTexture2"), type: "line", url: "./images/particleSystem/line-2.jpg", }, { - name: GlobalLang.ringTexture1, - nameEN: "Ring texture 1", + name: $t("ringTexture1"), type: "ring", url: "./images/particleSystem/ring-1.jpg", }, { - name: GlobalLang.ringTexture2, - nameEN: "Ring texture 2", + name: $t("ringTexture2"), type: "ring", url: "./images/particleSystem/ring-2.jpg", }, { - name: GlobalLang.loopedhexagonTexture, - nameEN: "Looped hexagon texture", + name: $t("loopedhexagonTexture"), type: "ring", url: "./images/particleSystem/ring-3.jpg", }, ], - currentLanguage:window.navigator.language }); + let defaultLineTextrues = [ - { label: () => GlobalLang.noneScanTexture, value: 0, url: "" }, + { label: () => $t("noneScanTexture"), value: 0, url: "" }, ]; let defaultCircleTextrues = [ - { label: () => GlobalLang.noneScanTexture, value: 0, url: "" }, + { label: () => $t("noneScanTexture"), value: 0, url: "" }, ]; let handlerPolyline; +// 初始化 +function init() { + if (!window.viewer) return; + viewer.scene.scanEffect.color = SuperMap3D.Color.fromCssColorString( + state.scanColor + ); + viewer.scene.scanEffect.textureUrl = ""; + viewer.scene.scanEffect.lineWidth = Number(state.lineWidth); + viewer.scene.scanEffect.period = Number(state.period); + viewer.scene.scanEffect.speed = Number(state.speed); + viewer.scene.scanEffect.centerPostion = new SuperMap3D.Cartesian3.fromDegrees( + 0, + 0, + 0 + ); +} + +onMounted(() => { + init(); + setTexturesByProps(); +}); + +onBeforeUnmount(() => { + clear(); + let count = viewer.scene.scanEffect.count; + for (let i = 0; i < count; i++) { + viewer.scene.scanEffect.remove(i); + } +}); + // 设置纹理 -function setTexturesByProps(isZH: boolean) { +function setTexturesByProps() { defaultLineTextrues = defaultLineTextrues.slice(0, 1); defaultCircleTextrues = defaultCircleTextrues.slice(0, 1); state.addTextures.forEach((el: any) => { let obj: any = { - label: isZH ? el.name : el.nameEN, + label: el.name, url: el.url, }; if (el.type === "line") { @@ -178,25 +259,6 @@ function setTexturesByProps(isZH: boolean) { if (state.scanMode < 1) state.scanTextures = defaultLineTextrues; else state.scanTextures = defaultCircleTextrues; } -setTexturesByProps('zh' === "zh"); - -// 初始化 -function init() { - if (!window.viewer) return; - viewer.scene.scanEffect.color = SuperMap3D.Color.fromCssColorString( - state.scanColor - ); - viewer.scene.scanEffect.textureUrl = ""; - viewer.scene.scanEffect.lineWidth = Number(state.lineWidth); - viewer.scene.scanEffect.period = Number(state.period); - viewer.scene.scanEffect.speed = Number(state.speed); - viewer.scene.scanEffect.centerPostion = new SuperMap3D.Cartesian3.fromDegrees( - 0, - 0, - 0 - ); -} -init(); // 添加线扫描 function addLineScans(positions) { @@ -231,7 +293,7 @@ function addScans() { if (state.scanMode < 1) { drawPolyline(); notification.create({ - content: () => GlobalLang.addScanLineTip, + content: () => $t("addScanLineTip"), duration: 3500, }); return; @@ -261,11 +323,12 @@ function drawPolyline() { // 清除 function clear() { - state.scanShow = false; - let index = viewer.scene.scanEffect.count; - for (let i = 0; i < index; i++) { - viewer.scene.scanEffect.remove(i); + let index = viewer.scene.scanEffect.count - 1; + if (viewer.scene.scanEffect.count == 1) { + state.scanShow = false; } + viewer.scene.scanEffect.remove(index); + viewer.eventManager.removeEventListener("CLICK", addCircleScans); if (handlerPolyline) handlerPolyline.clearHandler(); } @@ -303,7 +366,7 @@ watch( ); watch( () => state.scanTextures, - (val) => { + () => { state.selectedTexture = 0; } ); @@ -329,20 +392,8 @@ watch( () => state.addTextures, (val) => { if (typeof val === "object") { - setTexturesByProps('zh' === "zh"); + setTexturesByProps(); } } ); - -onBeforeUnmount(() => { - clear(); -}); </script> - - - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/index.vue b/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/index.vue index dfaa3fb1..2acaa072 100644 --- a/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/index.vue +++ b/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/index.vue @@ -27,17 +27,17 @@ import rainSnow from "./components/rain-sonw.vue"; // 使用vue3 setUp实现动态组件 let comList = reactive([ { - name: GlobalLang.floodLight, + name: $t("floodLight"), com: markRaw(floodLight), isSelect: true, }, { - name: GlobalLang.scanLine, + name: $t("scanLine"), com: markRaw(scanLine), isSelect: false, }, { - name: GlobalLang.rainSnow, + name: $t("rainSnow"), com: markRaw(rainSnow), isSelect: false, }, @@ -63,26 +63,14 @@ function changeItem(item: any) { <style lang="scss" scoped> .btn-list { - // font-size: 0.14rem; - display: flex; + width: 2.7rem; margin-left: 0.1rem; margin-bottom: 0.2rem; - cursor: pointer; justify-content: space-evenly; .btn { - width:fit-content; + width: fit-content; padding: 0 0.08rem; - height: 0.26rem; - line-height: 0.26rem; - text-align: center; - // margin-left: 0.48rem; - } - - .select-btn { - border-radius: 0.02rem; - color: #3499e5; - background: rgba(255, 255, 255, 0.15); } } -</style> \ No newline at end of file +</style> diff --git a/SuperMap iEarth/src/package/sceneSet/scene-viewPort/components/com-layer-tree.vue b/SuperMap iEarth/src/package/sceneSet/scene-viewPort/components/com-layer-tree.vue index 00d319de..162af01b 100644 --- a/SuperMap iEarth/src/package/sceneSet/scene-viewPort/components/com-layer-tree.vue +++ b/SuperMap iEarth/src/package/sceneSet/scene-viewPort/components/com-layer-tree.vue @@ -16,47 +16,51 @@ <script lang="ts" setup> import { watch, ref } from "vue"; -import { GlobalStoreCreate } from '@/store/global/global'; -import { storeToRefs } from 'pinia'; +import { GlobalStoreCreate } from "@/store/global/global"; +import { storeToRefs } from "pinia"; // import layerManagement from "@/tools/layerManagement"; - // import ids from 'virtual:svg-icons-names' -// console.log("svgIDS:",ids) 查看所用svg的symbolId:icon-measure-Aear const GlobalStore = GlobalStoreCreate(); const { SceneLayerChangeCount } = storeToRefs(GlobalStore); -let layers:any, imgLayers:any, terrainLayers:any, mvtLayers:any, terrainProvider:any; +let layers: any, imgLayers: any, terrainLayers: any, mvtLayers: any; // 触发更新 let props = defineProps({ isUpdate: { type: Boolean, - default: true + default: true, }, defaultExpandedKeys: Array, defaultCheckedKeys: { type: Array, - default: ["S3M--Root", "IMG--Root", "MVT--Root", "TERRAIN--Root","GLOBE--Root---1"] + default: [ + "S3M--Root", + "IMG--Root", + "MVT--Root", + "TERRAIN--Root", + "GLOBE--Root---1", + ], }, defaultShowTypes: { type: Array, - default: ["S3M", "TERRAIN", "IMG", "MVT"] + default: ["S3M", "TERRAIN", "IMG", "MVT"], }, deletButtonShow: { type: Boolean, - default: true + default: true, }, draggable: { //是否可拖拽 type: Boolean, - default: false + default: false, }, style: { type: Object, - default: "max-height: 5rem;max-width:2.6rem" + default: "max-height: 5rem;max-width:2.6rem", }, - updateData:Array + updateData: Array, }); const emit = defineEmits([ @@ -66,59 +70,28 @@ const emit = defineEmits([ "getImgLayers", "getMvtLayers", "getAllLayers", - "getDropedNodes" + "getDropedNodes", ]); -watch( - () => props.isUpdate, - val => { - if (val) setTimeout(() => updateLayers(), 500); - } -); -watch( - () => props.updateData, - val => { - if (val) data.value = val; - console.log('updateData:',val) - } -); - -//监听图层改变 -watch(SceneLayerChangeCount, val => { - if (props.isUpdate) updateLayers(); -}); - // 定义数据 -let data = ref<any[]>([ - { label: () => GlobalLang.noLayer, key: 0, disabled: true } -]); - -// 创建节点函数 -function creatNode(label, key, children, type, is_suffix) { - return { - label: label, - key: key, - children: children, - type: type, - }; -} +let data = ref<any[]>([{ label: () => $t("noLayer"), key: 0, disabled: true }]); let s3mRootNode = creatNode( - () => 's3m图层', + () => "s3m图层", "S3M--Root", [], "S3M--Root", false ); let imgRootNode = creatNode( - () => '影像图层', + () => "影像图层", "IMG--Root", [], "IMG--Root", false ); let mvtRootNode = creatNode( - () => '影像图层', + () => "影像图层", "MVT--Root", [], "MVT--Root", @@ -126,20 +99,30 @@ let mvtRootNode = creatNode( ); let terrainRootNode = creatNode( - () => '地形图层', + () => "地形图层", "TERRAIN--Root", [], "TERRAIN--Root", false ); -let globeNode = creatNode( - () => '地球', - "GLOBE--Root---1", - undefined, - "GLOBE--Root", - false -); +// let globeNode = creatNode( +// () => "地球", +// "GLOBE--Root---1", +// undefined, +// "GLOBE--Root", +// false +// ); + +// 创建节点函数 +function creatNode(label, key, children, type, is_suffix) { + return { + label: label, + key: key, + children: children, + type: type, + }; +} // update图层 function updateLayers() { @@ -156,12 +139,12 @@ function updateLayers() { emit("getS3mLayers", layers); // emit("getImgLayers", imgLayers); // emit("getMvtLayers", mvtLayers); - emit("getAllLayers", layers,imgLayers,mvtLayers); + emit("getAllLayers", layers, imgLayers, mvtLayers); updataS3MLayer(); // updataImgLayers(); // updataMvtLayers(); // updataTerrainLayers(); - let newData:any[] = []; + let newData: any[] = []; if ( s3mRootNode.children.length > 0 && @@ -192,7 +175,7 @@ function updateLayers() { // } if (newData.length === 0) { data.value = [ - { label: () => GlobalLang.noLayer, key: 0, checkboxDisabled: true } + { label: () => $t("noLayer"), key: 0, checkboxDisabled: true }, ]; return; } @@ -210,6 +193,46 @@ function updataS3MLayer() { ); }); } + +// 获得选中的图层keys +function getCheckedKeys(params) { + emit("getCheckedKeys", params, data.value); +} + +// 点击节点 +function getSelectedKeys(params) { + emit("getSelectedKeys", params); +} + +// 监听 +watch( + () => props.isUpdate, + (val) => { + if (val) setTimeout(() => updateLayers(), 500); + } +); +watch( + () => props.updateData, + (val) => { + if (val) data.value = val; + } +); +watch(SceneLayerChangeCount, () => { + // 监听图层改变 + if (props.isUpdate) updateLayers(); +}); + +// function findSiblingsAndIndex(node, nodes) { +// if (!nodes) return [null, null]; +// for (let i = 0; i < nodes.length; ++i) { +// const siblingNode = nodes[i]; +// if (siblingNode.key === node.key) return [nodes, i]; +// const [siblings, index] = findSiblingsAndIndex(node, siblingNode.children); +// if (siblings) return [siblings, index]; +// } +// return [null, null]; +// } + //updatImg // function updataImgLayers() { // if (!imgLayers || imgLayers.length < 1) return; @@ -247,27 +270,4 @@ function updataS3MLayer() { // } // 勾选节点 -function getCheckedKeys(params) { - emit("getCheckedKeys", params, data.value); -} - -// 点击节点 -function getSelectedKeys(params) { - emit("getSelectedKeys", params); -} - - - -function findSiblingsAndIndex(node, nodes) { - if (!nodes) return [null, null]; - for (let i = 0; i < nodes.length; ++i) { - const siblingNode = nodes[i]; - if (siblingNode.key === node.key) return [nodes, i]; - const [siblings, index] = findSiblingsAndIndex(node, siblingNode.children); - if (siblings) return [siblings, index]; - } - return [null, null]; -} - </script> - diff --git a/SuperMap iEarth/src/package/sceneSet/scene-viewPort/components/scene-roller.vue b/SuperMap iEarth/src/package/sceneSet/scene-viewPort/components/scene-roller.vue index 194aa51a..5dfe628d 100644 --- a/SuperMap iEarth/src/package/sceneSet/scene-viewPort/components/scene-roller.vue +++ b/SuperMap iEarth/src/package/sceneSet/scene-viewPort/components/scene-roller.vue @@ -1,252 +1,254 @@ <template> <div class="row-item"> - <span>{{$t('global.viewMode')}}</span> + <span>{{ $t("viewMode") }}</span> <n-select - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.selectedType" :options="state.options" /> </div> -<div class="row-item" v-if="state.selectedType === 'lrRoller'"> - <span>{{ $t('global.shieldDirection') }}</span> - <div style="width: 1.96rem;"> - <n-radio-group v-model:value="state.lrRoller" name="radiogroup"> - <n-space> - <n-radio :value="1">{{ $t('global.left') }}</n-radio> - <n-radio :value="2">{{ $t('global.right') }}</n-radio> - </n-space> - </n-radio-group> + <div class="row-item" v-if="state.selectedType === 'lrRoller'"> + <span>{{ $t("shieldDirection") }}</span> + <div style="width: 1.96rem"> + <n-radio-group v-model:value="state.lrRoller" name="radiogroup"> + <n-radio :value="1">{{ $t("left") }}</n-radio> + <n-radio :value="2">{{ $t("right") }}</n-radio> + </n-radio-group> + </div> </div> -</div> - -<div class="row-item" v-if="state.selectedType === 'tbRoller'"> - <span>{{ $t('global.shieldDirection') }}</span> - <div style="width: 1.96rem;"> - <n-radio-group v-model:value="state.tbRoller" name="radiogroup"> - <n-space> - <n-radio :value="4">{{ $t('global.up') }}</n-radio> - <n-radio :value="8">{{ $t('global.down') }}</n-radio> - </n-space> - </n-radio-group> - </div> -</div> - -<div class="row-item" v-if="state.selectedType === 'customRoller'"> - <span>{{ $t('global.shieldDirection') }}</span> - <div style="width: 1.96rem;"> - <n-radio-group v-model:value="state.customRoller" name="radiogroup"> - <n-space justify="space-between"> - <n-radio :value="1">{{ $t('global.left') }}</n-radio> - <n-radio :value="2">{{ $t('global.right') }}</n-radio> - <br/> - </n-space> - <n-space> - <n-radio :value="4">{{ $t('global.up') }}</n-radio> - <n-radio :value="8">{{ $t('global.down') }}</n-radio> - </n-space> - </n-radio-group> + + <div class="row-item" v-if="state.selectedType === 'tbRoller'"> + <span>{{ $t("shieldDirection") }}</span> + <div style="width: 1.96rem"> + <n-radio-group v-model:value="state.tbRoller" name="radiogroup"> + <n-radio :value="4">{{ $t("up") }}</n-radio> + <n-radio :value="8">{{ $t("down") }}</n-radio> + </n-radio-group> + </div> </div> -</div> - -<div class="row-item" v-if="state.selectedType != 'noRoller'"> - <span>{{ $t('global.t_layerList') }}</span> - <div class="comLayerTreeBox" style="width: 1.96rem;"> - <ComLayerTree v-show="state.selectedType !== 'noRoller'" :is-update="true" :draggable="false" - style="max-height:2rem;max-width:2.6rem" :default-show-types="['S3M', 'IMG', 'MVT', 'GLOBE']" - :delete-button-show="false" @getCheckedKeys="getCheckedKeys" /> + + <div class="row-item" v-if="state.selectedType === 'customRoller'"> + <span>{{ $t("shieldDirection") }}</span> + <div style="width: 1.96rem"> + <n-radio-group v-model:value="state.customRoller" name="radiogroup"> + <n-radio :value="1">{{ $t("left") }}</n-radio> + <n-radio :value="2">{{ $t("right") }}</n-radio> + <br /> + <n-radio :value="4">{{ $t("up") }}</n-radio> + <n-radio :value="8">{{ $t("down") }}</n-radio> + </n-radio-group> + </div> </div> -</div> + <div class="row-item no-center" v-if="state.selectedType != 'noRoller'"> + <span>{{ $t("t_layerList") }}</span> + <div class="comLayerTreeBox" style="width: 1.96rem"> + <ComLayerTree + v-show="state.selectedType !== 'noRoller'" + :is-update="true" + :draggable="false" + style="max-height: 2rem; max-width: 2.6rem" + :default-show-types="['S3M', 'IMG', 'MVT', 'GLOBE']" + :delete-button-show="false" + @getCheckedKeys="getCheckedKeys" + /> + </div> + </div> </template> <script lang="ts" setup> import { onBeforeUnmount, watch, reactive, onMounted } from "vue"; import ComLayerTree from "./com-layer-tree.vue"; -// 初始化数据 +// 初始化变量 let state = reactive({ -options: [ - { - label: () => GlobalLang.noneRollershutter, - value: "noRoller", - }, - { - label: () => GlobalLang.leftrightRollershutter, - value: "lrRoller", - }, - { - label: () => GlobalLang.updownRollershutter, - value: "tbRoller", - }, - { - label: () => GlobalLang.customRollershutter, - value: "customRoller", - }, -], -selectedType: "noRoller", -lrRoller: 1, //左右卷帘时默认屏蔽左边 -tbRoller: 4, //上下卷帘时默认屏蔽上面 -customRoller:0 //自定义 -}); - -onMounted(() => { -createSlider(); + options: [ + { + label: () => $t("noneRollershutter"), + value: "noRoller", + }, + { + label: () => $t("leftrightRollershutter"), + value: "lrRoller", + }, + { + label: () => $t("updownRollershutter"), + value: "tbRoller", + }, + { + label: () => $t("customRollershutter"), + value: "customRoller", + }, + ], + selectedType: "noRoller", + lrRoller: 1, //左右卷帘时默认屏蔽左边 + tbRoller: 4, //上下卷帘时默认屏蔽上面 + customRoller: 0, //自定义 }); let verticalSliderLeft: any = "verticalSliderLeft", -verticalSliderRight: any = "verticalSliderRight", -horizontalSliderTop: any = "horizontalSliderTop", -horizontalSliderBottom: any = "horizontalSliderBottom", -fdom; -let layers, imgLayers, mvtLayers, selectedKeys; + verticalSliderRight: any = "verticalSliderRight", + horizontalSliderTop: any = "horizontalSliderTop", + horizontalSliderBottom: any = "horizontalSliderBottom"; +let fdom, selectedKeys; let scratchSwipeRegion = new SuperMap3D.BoundingRectangle(); +let layers = viewer.scene.layers.layerQueue; +// let imgLayers = viewer.imageryLayers._layers; +// let mvtLayers = viewer.scene._vectorTileMaps._layerQueue; let rollerShutterConfig = { -bottom: 0.66, -left: 0.33, -right: 0.66, -top: 0.33, -index: 1, //当前控制卷帘条 -mode: 1 //卷帘模式 + bottom: 0.66, + left: 0.33, + right: 0.66, + top: 0.33, + index: 1, //当前控制卷帘条 + mode: 1, //卷帘模式 }; -layers = viewer.scene.layers.layerQueue; -imgLayers = viewer.imageryLayers._layers; -mvtLayers = viewer.scene._vectorTileMaps._layerQueue; +onMounted(() => { + createSlider(); + state.selectedType = "lrRoller"; +}); + +// 销毁 +onBeforeUnmount(() => { + enableSlider(0); + cancelLayersRoller(false); + removeSlider(); +}); // 创建和移除卷帘条 function createSlider(dom?: any, id?: any) { -fdom = document.getElementById("superMapContainer"); -verticalSliderLeft = document.createElement("div"); -appendDom(verticalSliderLeft, "verticalSliderLeft"); -verticalSliderRight = document.createElement("div"); -appendDom(verticalSliderRight, "verticalSliderRight"); -horizontalSliderTop = document.createElement("div"); -appendDom(horizontalSliderTop, "horizontalSliderTop"); -horizontalSliderBottom = document.createElement("div"); -appendDom(horizontalSliderBottom, "horizontalSliderBottom"); -function appendDom(dom: any, id: any) { - dom.id = id; - dom.className = "roller-slider"; - fdom.appendChild(dom); -} -bindSliderEvt(); //绑定事件 + fdom = document.getElementById("superMapContainer"); + verticalSliderLeft = document.createElement("div"); + appendDom(verticalSliderLeft, "verticalSliderLeft"); + verticalSliderRight = document.createElement("div"); + appendDom(verticalSliderRight, "verticalSliderRight"); + horizontalSliderTop = document.createElement("div"); + appendDom(horizontalSliderTop, "horizontalSliderTop"); + horizontalSliderBottom = document.createElement("div"); + appendDom(horizontalSliderBottom, "horizontalSliderBottom"); + function appendDom(dom: any, id: any) { + dom.id = id; + dom.className = "roller-slider"; + fdom.appendChild(dom); + } + bindSliderEvt(); //绑定事件 } function removeSlider() { -fdom.removeChild(verticalSliderLeft); -fdom.removeChild(verticalSliderRight); -fdom.removeChild(horizontalSliderTop); -fdom.removeChild(horizontalSliderBottom); + fdom.removeChild(verticalSliderLeft); + fdom.removeChild(verticalSliderRight); + fdom.removeChild(horizontalSliderTop); + fdom.removeChild(horizontalSliderBottom); } //设置卷帘条显隐 function enableSlider(index) { -verticalSliderLeft.style.display = "none"; -verticalSliderRight.style.display = "none"; -horizontalSliderTop.style.display = "none"; -horizontalSliderBottom.style.display = "none"; -if (index & 1) verticalSliderLeft.style.display = "block"; -if (index & 2) verticalSliderRight.style.display = "block"; -if (index & 4) horizontalSliderTop.style.display = "block"; -if (index & 8) horizontalSliderBottom.style.display = "block"; + verticalSliderLeft.style.display = "none"; + verticalSliderRight.style.display = "none"; + horizontalSliderTop.style.display = "none"; + horizontalSliderBottom.style.display = "none"; + if (index & 1) verticalSliderLeft.style.display = "block"; + if (index & 2) verticalSliderRight.style.display = "block"; + if (index & 4) horizontalSliderTop.style.display = "block"; + if (index & 8) horizontalSliderBottom.style.display = "block"; } // viewer.imageryLayers._layers.forEach((imageLayer:any,index:number)=>{ // setLayerSwipeEnabled('IMG',index,true); // }) + //设置各类图层的卷帘(暂时只支持s3m) function setLayersRoller() { - -// // // 只让S3M支持卷帘 -// viewer.scene.layers._layerQueue.forEach((S3Mlayer: any, index: string) => { -// setLayerSwipeEnabled("S3M", index, true); -// }) - -if (selectedKeys) { - selectedKeys.forEach(key => { - let arr = key.split("--"); - if (arr[1] === "Root" && arr[0] !== "GLOBE") { - return; - } - let index = arr[2]; - index = Number(index); - setLayerSwipeEnabled(arr[0], index, true); - }); -} else { - cancelLayersRoller(true); -} - + // 只让S3M支持卷帘 + // viewer.scene.layers._layerQueue.forEach((S3Mlayer: any, index: string) => { + // setLayerSwipeEnabled("S3M", index, true); + // }) + + if (selectedKeys) { + selectedKeys.forEach((key) => { + let arr = key.split("--"); + if (arr[1] === "Root" && arr[0] !== "GLOBE") { + return; + } + let index = arr[2]; + index = Number(index); + setLayerSwipeEnabled(arr[0], index, true); + }); + } else { + cancelLayersRoller(true); + } } //设置图层视口显隐 - 只保证S3M图层,其余图层暂时不支持 function setLayerSwipeEnabled(layerType, index, checked) { -switch (layerType) { - case "S3M": - layers[index].swipeEnabled = checked; - layers[index].swipeRegion = scratchSwipeRegion; - break; - // case "IMG": - // imgLayers[index].swipeEnabled = checked; - // imgLayers[index].swipeRegion = scratchSwipeRegion; - // break; - // case "MVT": - // mvtLayers[index].swipeEnabled = checked; - // mvtLayers[index].swipeRegion = scratchSwipeRegion; - // break; - case "GLOBE": - viewer.scene.globe.swipeEnabled = checked; - viewer.scene.globe.swipeRegion = scratchSwipeRegion; - break; - default: - null; -} + switch (layerType) { + case "S3M": + layers[index].swipeEnabled = checked; + layers[index].swipeRegion = scratchSwipeRegion; + break; + // case "IMG": + // imgLayers[index].swipeEnabled = checked; + // imgLayers[index].swipeRegion = scratchSwipeRegion; + // break; + // case "MVT": + // mvtLayers[index].swipeEnabled = checked; + // mvtLayers[index].swipeRegion = scratchSwipeRegion; + // break; + case "GLOBE": + viewer.scene.globe.swipeEnabled = checked; + viewer.scene.globe.swipeRegion = scratchSwipeRegion; + break; + default: + null; + } } // 取消所有图层的卷帘 function cancelLayersRoller(checked) { -if (!SuperMap3D.defined(checked)) { - checked = false; -} -for (let i = 0; i < layers.length; i++) { - layers[i].swipeEnabled = checked; - layers[i].swipeRegion = scratchSwipeRegion; -} -// for (let i = 1; i < imgLayers.length; i++) { -// imgLayers[i].swipeEnabled = checked; -// imgLayers[i].swipeRegion = scratchSwipeRegion; -// } -// for (let i = 0; i < mvtLayers.length; i++) { -// mvtLayers[i].swipeEnabled = checked; -// mvtLayers[i].swipeRegion = scratchSwipeRegion; -// } -viewer.scene.globe.swipeEnabled = checked; -viewer.scene.globe.swipeRegion = scratchSwipeRegion; + if (!SuperMap3D.defined(checked)) { + checked = false; + } + for (let i = 0; i < layers.length; i++) { + layers[i].swipeEnabled = checked; + layers[i].swipeRegion = scratchSwipeRegion; + } + // for (let i = 1; i < imgLayers.length; i++) { + // imgLayers[i].swipeEnabled = checked; + // imgLayers[i].swipeRegion = scratchSwipeRegion; + // } + // for (let i = 0; i < mvtLayers.length; i++) { + // mvtLayers[i].swipeEnabled = checked; + // mvtLayers[i].swipeRegion = scratchSwipeRegion; + // } + viewer.scene.globe.swipeEnabled = checked; + viewer.scene.globe.swipeRegion = scratchSwipeRegion; } // 勾选图层节点 function getCheckedKeys(params, data) { -selectedKeys = params; -data.forEach(obj => { - if (!obj.children) { - fn(obj); - return; - } - let arr = obj.children; - if (!(arr instanceof Array) || arr.length === 0) return; - arr.forEach(layerObj => { - fn(layerObj); + selectedKeys = params; + data.forEach((obj) => { + if (!obj.children) { + fn(obj); + return; + } + let arr = obj.children; + if (!(arr instanceof Array) || arr.length === 0) return; + arr.forEach((layerObj) => { + fn(layerObj); + }); }); -}); -function fn(layerObj) { - let keys = layerObj.key.split("--"); - let index = keys[2]; - index = Number(index); - if (index === -1) return; - let checked = params.includes(layerObj.key); - setLayerSwipeEnabled(keys[0], index, checked); -} + function fn(layerObj) { + let keys = layerObj.key.split("--"); + let index = keys[2]; + index = Number(index); + if (index === -1) return; + let checked = params.includes(layerObj.key); + setLayerSwipeEnabled(keys[0], index, checked); + } } // function getAllLayers(s3m, imgs, mvts) { @@ -257,217 +259,203 @@ function fn(layerObj) { // } /** -* 设置卷帘的分割方向及分割条的位置。 -* -*/ + * 设置卷帘的分割方向及分割条的位置。 + * + */ function setRollerShutterSplit() { -let mode = rollerShutterConfig.mode; -let x1 = rollerShutterConfig.left; -let x2 = rollerShutterConfig.right; -let y1 = rollerShutterConfig.top; -let y2 = rollerShutterConfig.bottom; -// 左右卷帘使用left slider滑动,上下卷帘使用top slider滑动 -switch (mode) { - case 1: - SuperMap3D.BoundingRectangle.unpack([x1, 0, 1, 1], 0, scratchSwipeRegion); - break; - case 2: - SuperMap3D.BoundingRectangle.unpack([0, 0, x1, 1], 0, scratchSwipeRegion); - break; - case 4: - SuperMap3D.BoundingRectangle.unpack([0, y1, 1, 1], 0, scratchSwipeRegion); - break; - case 8: - SuperMap3D.BoundingRectangle.unpack([0, 0, 1, y1], 0, scratchSwipeRegion); - break; - case 15: - SuperMap3D.BoundingRectangle.unpack( - [x1, y1, x2 - x1, y2 - y1], - 0, - scratchSwipeRegion - ); - break; - default: - SuperMap3D.BoundingRectangle.unpack([x1, 0, 1, 1], 0, scratchSwipeRegion); - break; -} -setLayersRoller(); -} - -/** -* 注册卷帘分割条的拖拽事件。 -*/ -function bindSliderEvt() { -let width = fdom.clientWidth; // 界面宽度 -let height = fdom.clientHeight; // 界面高度 -verticalSliderLeft.addEventListener( - "mousedown", - function (e) { - mouseDown(e, 1); - }, - false -); -verticalSliderRight.onmousedown = function (e) { - mouseDown(e, 3); -}; -horizontalSliderTop.onmousedown = function (e) { - mouseDown(e, 2); -}; -horizontalSliderBottom.onmousedown = function (e) { - mouseDown(e, 4); -}; - -document.addEventListener("mouseup", mouseUp, false); -function mouseUp(e) { - document.removeEventListener("mousemove", sliderMove, false); -} - -function mouseDown(e, index) { - rollerShutterConfig.index = index; - document.addEventListener("mousemove", sliderMove, false); -} - -function sliderMove(e) { - if (e.preventDefault) e.preventDefault(); - else e.returnValue = false; - switch (rollerShutterConfig.index) { + let mode = rollerShutterConfig.mode; + let x1 = rollerShutterConfig.left; + let x2 = rollerShutterConfig.right; + let y1 = rollerShutterConfig.top; + let y2 = rollerShutterConfig.bottom; + // 左右卷帘使用left slider滑动,上下卷帘使用top slider滑动 + switch (mode) { case 1: - verticalSliderLeft.style.left = e.clientX + "px"; - rollerShutterConfig.left = e.clientX / width; + SuperMap3D.BoundingRectangle.unpack([x1, 0, 1, 1], 0, scratchSwipeRegion); break; case 2: - horizontalSliderTop.style.top = e.clientY + "px"; - rollerShutterConfig.top = e.clientY / height; - break; - case 3: - verticalSliderRight.style.left = e.clientX + "px"; - rollerShutterConfig.right = e.clientX / width; + SuperMap3D.BoundingRectangle.unpack([0, 0, x1, 1], 0, scratchSwipeRegion); break; case 4: - horizontalSliderBottom.style.top = e.clientY + "px"; - rollerShutterConfig.bottom = e.clientY / height; - break; - } - setRollerShutterSplit(); -} -} - -watch( -() => state.selectedType, -val => { - switch (val) { - case "noRoller": - state.customRoller = 0; - enableSlider(0); - cancelLayersRoller(false); + SuperMap3D.BoundingRectangle.unpack([0, y1, 1, 1], 0, scratchSwipeRegion); break; - case "lrRoller": - enableSlider(1); - rollerShutterConfig.mode = Number(state.lrRoller); + case 8: + SuperMap3D.BoundingRectangle.unpack([0, 0, 1, y1], 0, scratchSwipeRegion); break; - case "tbRoller": - enableSlider(4); - rollerShutterConfig.mode = Number(state.tbRoller); - break; - case "customRoller": - enableSlider(15); - rollerShutterConfig.mode = 15; + case 15: + SuperMap3D.BoundingRectangle.unpack( + [x1, y1, x2 - x1, y2 - y1], + 0, + scratchSwipeRegion + ); break; default: + SuperMap3D.BoundingRectangle.unpack([x1, 0, 1, 1], 0, scratchSwipeRegion); break; } - if (val === "noRoller") return; - setRollerShutterSplit(); + setLayersRoller(); } + +/** + * 注册卷帘分割条的拖拽事件。 + */ +function bindSliderEvt() { + let width = fdom.clientWidth; // 界面宽度 + let height = fdom.clientHeight; // 界面高度 + verticalSliderLeft.addEventListener( + "mousedown", + function (e) { + mouseDown(e, 1); + }, + false + ); + verticalSliderRight.onmousedown = function (e) { + mouseDown(e, 3); + }; + horizontalSliderTop.onmousedown = function (e) { + mouseDown(e, 2); + }; + horizontalSliderBottom.onmousedown = function (e) { + mouseDown(e, 4); + }; + + document.addEventListener("mouseup", mouseUp, false); + function mouseUp(e) { + document.removeEventListener("mousemove", sliderMove, false); + } + + function mouseDown(e, index) { + rollerShutterConfig.index = index; + document.addEventListener("mousemove", sliderMove, false); + } + + function sliderMove(e) { + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + switch (rollerShutterConfig.index) { + case 1: + verticalSliderLeft.style.left = e.clientX + "px"; + rollerShutterConfig.left = e.clientX / width; + break; + case 2: + horizontalSliderTop.style.top = e.clientY + "px"; + rollerShutterConfig.top = e.clientY / height; + break; + case 3: + verticalSliderRight.style.left = e.clientX + "px"; + rollerShutterConfig.right = e.clientX / width; + break; + case 4: + horizontalSliderBottom.style.top = e.clientY + "px"; + rollerShutterConfig.bottom = e.clientY / height; + break; + } + setRollerShutterSplit(); + } +} + +// 监听 +watch( + () => state.selectedType, + (val) => { + switch (val) { + case "noRoller": + state.customRoller = 0; + enableSlider(0); + cancelLayersRoller(false); + break; + case "lrRoller": + enableSlider(1); + rollerShutterConfig.mode = Number(state.lrRoller); + break; + case "tbRoller": + enableSlider(4); + rollerShutterConfig.mode = Number(state.tbRoller); + break; + case "customRoller": + enableSlider(15); + rollerShutterConfig.mode = 15; + break; + default: + break; + } + if (val === "noRoller") return; + setRollerShutterSplit(); + } ); watch( -() => state.lrRoller, -val => { - if(state.selectedType === 'noRoller') return; - rollerShutterConfig.mode = Number(val); - setRollerShutterSplit(); -} + () => state.lrRoller, + (val) => { + if (state.selectedType === "noRoller") return; + rollerShutterConfig.mode = Number(val); + setRollerShutterSplit(); + } ); watch( -() => state.tbRoller, -val => { - if(state.selectedType === 'noRoller') return; - rollerShutterConfig.mode = Number(val); - setRollerShutterSplit(); -} + () => state.tbRoller, + (val) => { + if (state.selectedType === "noRoller") return; + rollerShutterConfig.mode = Number(val); + setRollerShutterSplit(); + } ); watch( -() => state.customRoller, -val => { - if(state.selectedType === 'noRoller') return; - rollerShutterConfig.mode = Number(val); - setRollerShutterSplit(); -} + () => state.customRoller, + (val) => { + if (state.selectedType === "noRoller") return; + rollerShutterConfig.mode = Number(val); + setRollerShutterSplit(); + } ); - -// 销毁 -onBeforeUnmount(() => { -enableSlider(0); -cancelLayersRoller(false); -// layers = undefined; -removeSlider(); -}); </script> -<style lang="scss" > +<style lang="scss"> +.comLayerTreeBox { + border: 0.01rem solid $--SM--BgColor-15; +} + // 卷帘 #verticalSlider { -position: absolute; -left: 50%; -top: 0; -background-color: #d3d3d3; -width: 0.03rem; -height: 100%; -z-index: 1; -display: none; -cursor: ew-resize; + position: absolute; + left: 50%; + top: 0; + background-color: #d3d3d3; + width: 0.03rem; + height: 100%; + z-index: 1; + display: none; + cursor: ew-resize; } #horizontalSlider { -position: absolute; -left: 0; -top: 50%; -background-color: #d3d3d3; -width: 100%; -height: 0.03rem; -z-index: 1; -display: none; -cursor: ns-resize; + position: absolute; + left: 0; + top: 50%; + background-color: #d3d3d3; + width: 100%; + height: 0.03rem; + z-index: 1; + display: none; + cursor: ns-resize; } #verticalSliderLeft { -@extend #verticalSlider; -left: 33%; + @extend #verticalSlider; + left: 33%; } #verticalSliderRight { -@extend #verticalSlider; -left: 66%; + @extend #verticalSlider; + left: 66%; } #horizontalSliderTop { -@extend #horizontalSlider; -top: 33%; + @extend #horizontalSlider; + top: 33%; } #horizontalSliderBottom { -@extend #horizontalSlider; -top: 66%; -} - -.comLayerTreeBox { -border: 0.01rem solid $--SM--BgColor-15; + @extend #horizontalSlider; + top: 66%; } </style> - - - - - - - diff --git a/SuperMap iEarth/src/package/sceneSet/scene-viewPort/index.ts b/SuperMap iEarth/src/package/sceneSet/scene-viewPort/index.ts index e9f55ef0..ed6149a2 100644 --- a/SuperMap iEarth/src/package/sceneSet/scene-viewPort/index.ts +++ b/SuperMap iEarth/src/package/sceneSet/scene-viewPort/index.ts @@ -1,3 +1,3 @@ -import SmSceneViewPort from './index.vue'; +import SmSceneViewPort from './viewPort.vue'; export default SmSceneViewPort; diff --git a/SuperMap iEarth/src/package/sceneSet/scene-viewPort/index.vue b/SuperMap iEarth/src/package/sceneSet/scene-viewPort/viewPort.vue similarity index 62% rename from SuperMap iEarth/src/package/sceneSet/scene-viewPort/index.vue rename to SuperMap iEarth/src/package/sceneSet/scene-viewPort/viewPort.vue index 0a7b0d47..42f30048 100644 --- a/SuperMap iEarth/src/package/sceneSet/scene-viewPort/index.vue +++ b/SuperMap iEarth/src/package/sceneSet/scene-viewPort/viewPort.vue @@ -1,9 +1,9 @@ <template> - <!-- 试图模式 --> + <!-- 视图模式 --> <div class="row-item"> - <span>{{$t('global.viewMode')}}</span> + <span>{{ $t("viewMode") }}</span> <n-select - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.viewMode" :options="state.options_viewMode" /> @@ -11,9 +11,9 @@ <!-- 分屏模式 --> <div class="row-item" v-show="!state.rollerShutterShow"> - <span>{{$t('global.splitscreenModel')}}</span> + <span>{{ $t("splitscreenModel") }}</span> <n-select - style="width: 1.96rem;" + style="width: 1.96rem" v-model:value="state.selectedType" :options="state.options_split" /> @@ -21,52 +21,50 @@ <!-- 卷帘 --> <div class="row-item"> - <span>{{$t('global.openRollershutter')}}</span> - <div style="width: 1.96rem;"> + <span>{{ $t("openRollershutter") }}</span> + <div style="width: 1.96rem"> <n-switch v-model:value="state.rollerShutterShow" size="small" /> </div> </div> <div v-if="state.rollerShutterShow"> - <sceneRoller></sceneRoller> + <sceneRoller></sceneRoller> </div> </template> - + <script lang="ts" setup> import { onBeforeUnmount, watch, reactive, ref } from "vue"; import sceneRoller from "./components/scene-roller.vue"; type stateType = { - options_split:any,// 分屏选项 - options_viewMode:any,// 视图选项 - selectedType: string, // 当前视口的选择类型 - // selectedViewport: number, // - // newData: any, - viewMode: number, // 视图模式 - rollerShutterShow: boolean, // 开启卷帘 -} + options_split: any; // 分屏选项 + options_viewMode: any; // 视图选项 + selectedType: string; // 当前视口的选择类型 + viewMode: number; // 视图模式 + rollerShutterShow: boolean; // 开启卷帘 +}; -// 初始化数据 +// 初始化变量 let state = reactive<stateType>({ options_split: [ { - label: () => GlobalLang.noneSplitscreen, + label: () => $t("noneSplitscreen"), value: "NONE", }, { - label: () => GlobalLang.horizontalSplitscreen, + label: () => $t("horizontalSplitscreen"), value: "HORIZONTAL", }, { - label: () => GlobalLang.verticalSplitscreen, + label: () => $t("verticalSplitscreen"), value: "VERTICAL", }, { - label: () => GlobalLang.threeViewport, + label: () => $t("threeViewport"), value: "TRIPLE", }, { - label: () => GlobalLang.fourViewport, + label: () => $t("fourViewport"), value: "QUAD", }, ], @@ -86,12 +84,15 @@ let state = reactive<stateType>({ // } ], selectedType: "NONE", - // selectedViewport: 0, - // newData: null, viewMode: 0, // 视图模式 rollerShutterShow: false, // 开启卷帘 }); +onBeforeUnmount(() => { + state.rollerShutterShow = false; + viewer.scene.multiViewportMode = SuperMap3D.MultiViewportMode["NONE"]; +}); + //监听 watch( () => state.selectedType, @@ -102,7 +103,7 @@ watch( watch( () => state.rollerShutterShow, (val) => { - if(val){ + if (val) { viewer.scene.multiViewportMode = SuperMap3D.MultiViewportMode["NONE"]; } } @@ -119,27 +120,4 @@ watch( } } ); - -//定义子组件实例,名称要和上面的ref相同 -const sceneRollerRef: any = ref(null); -// 关闭卷帘 -function handleChange(value: boolean) { - if (!value) { - sceneRollerRef.value.enableSlider(0); - sceneRollerRef.value.cancelLayersRoller(false); - } -} - -onBeforeUnmount(() => { - state.rollerShutterShow = false; - viewer.scene.multiViewportMode = SuperMap3D.MultiViewportMode["NONE"]; -}); </script> - - - - - - - - \ No newline at end of file diff --git a/SuperMap iEarth/src/package/sceneSet/video-set/index.ts b/SuperMap iEarth/src/package/sceneSet/video-set/index.ts index 71ba7305..4fb35a88 100644 --- a/SuperMap iEarth/src/package/sceneSet/video-set/index.ts +++ b/SuperMap iEarth/src/package/sceneSet/video-set/index.ts @@ -1,3 +1,3 @@ -import SmVideoSet from './index.vue'; +import SmVideoSet from './videoSet.vue'; export default SmVideoSet; diff --git a/SuperMap iEarth/src/package/sceneSet/video-set/index.vue b/SuperMap iEarth/src/package/sceneSet/video-set/index.vue deleted file mode 100644 index aebda48b..00000000 --- a/SuperMap iEarth/src/package/sceneSet/video-set/index.vue +++ /dev/null @@ -1,397 +0,0 @@ -<template> - <div class="row-item"> - <div>{{ $t('global.videoPath') }}</div> - <div> - <n-input-group> - <n-input class="add-input-border" :placeholder="$t('global.localVideoPath')" style=" margin-bottom: 0.1rem;width: 1.4rem" v-model:value="state.fileText" /> - <n-button type="tertiary" @click="chooseFile" style="width:0.6rem">{{ $t('global.chooseFile') }}</n-button> - </n-input-group> - </div> - <input type="file" accept="*.mp4" id="vedioFile" style="display:none" ref="vedioFile_dom" /> - </div> - - <div class="row-item"> - <span>{{ $t('global.width') }}</span> - <div class="slider-box"> - <n-slider style="width: 1.2rem" v-model:value="state.horizontal" :step="1" :min="1" :max="60" /> - <span>{{ state.horizontal }}</span> - </div> - </div> - - <div class="row-item"> - <span>{{ $t('global.height') }}</span> - <div class="slider-box"> - <n-slider style="width: 1.2rem" v-model:value="state.vertical" :step="1" :min="0.5" :max="60" /> - <span>{{ state.vertical }}</span> - </div> - </div> - - <div class="row-item"> - <span>{{ $t('global.distence') }}</span> - <div class="slider-box"> - <n-slider style="width: 1.2rem" v-model:value="state.distance" :step="1" :min="1" :max="500" /> - <span>{{ state.distance }}</span> - </div> - </div> - - <div class="row-item"> - <span>{{ $t('global.MaxVisibleDistance') }}</span> - <div class="slider-box"> - <n-slider style="width: 1.2rem" v-model:value="state.visibleDistanceMax" :step="1" :min="300" :max="2000" /> - <span>{{ state.visibleDistanceMax }}</span> - </div> - </div> - - <div class="row-item"> - <span>{{ $t('global.clipMode') }}</span> - <n-radio-group v-model:value="state.clipMode" name="radiogroup" class="radio-group"> - <n-space> - <n-radio v-for="item in state.modeOptions" :key="item.value" :value="item.value"> - {{ item.label }} - </n-radio> - </n-space> - </n-radio-group> - </div> - - <div class="row-item"> - <span>{{ $t('global.visibleVideoLine') }}</span> - <div class="check-box"> - <n-checkbox v-model:checked="state.visibleLine"></n-checkbox> - </div> - </div> - - <div class="btn-row-item2"> - <n-button type="info" color="#3499E5" text-color="#fff" @click="startProjection" style="margin-right: 0.1rem">{{ - $t('global.videoSet') }}</n-button> - <n-button type="info" color="#3499E5" text-color="#fff" @click="clipProjectImg" style="margin-right: 0.1rem">{{ - $t('global.clip') }}</n-button> - <n-button class="btn-secondary" @click="clear" color="rgba(255, 255, 255, 0.65)" ghost>{{ $t('global.clear') - }}</n-button> - </div> - <div id="videoContain" style="width:0;height:0"> - <video id="trailer-0" style="visibility: hidden" autoplay loop controls muted multiple> - <source src="" type="video/mp4" /> - </video> - </div> -</template> - -<script lang="ts" setup> -// 引入依赖 -import { watch, ref, reactive, onBeforeUnmount, onMounted } from "vue"; -import tool from "@/tools/tool"; -import initHandler from "@/tools/drawHandler"; -import { useLayerStore } from "@/store/layerStore"; -import { useMessage } from "naive-ui" - -const message = useMessage(); -const layerStore = useLayerStore(); - -type stateType = { - horizontal: number, - vertical: number, - distance: number, - clipMode: string, - visibleLine: boolean, - fileText: string, - modeOptions: any, - visibleDistanceMax:number, -} -// 设置默认值数据 -let state = reactive<stateType>({ - horizontal: 20, - vertical: 10, - distance: 200, - clipMode: "clip_behind_all_plane", - visibleLine: true, - fileText: "", - modeOptions: [ - { - label: GlobalLang.inner, - value: "clip_behind_all_plane", - }, - { - label: GlobalLang.outer, - value: "clip_behind_any_plane", - }, - ], - visibleDistanceMax:500 -}) - - -// 初始化数据 -let layers, scene; -let currentProject; -let vedioFile_dom = ref() -let modelIdProjectPairs = new Map(); // 模型id和视频投放对象对象的键值对 -let s3mInstanceColc; -let modelUrl = "./Resource/model/projector.s3m"; -let isActive = false; -let currentSelectedSymbol: any = null; -let reader = new FileReader(); -let currntVideoDom, isClip = false; -let handlerPolygon: any; - -//viewer 初始化完成的监听 -watch(() => layerStore.layerChangeCount, val => { - if (val) { - init(); - } -}); -init(); -function init() { - scene = viewer.scene; - layers = viewer.scene.layers.layerQueue; - s3mInstanceColc = new SuperMap3D.S3MInstanceCollection(scene._context); - viewer.scene.primitives.add(s3mInstanceColc); -} - -//监听图层加载完成 -watch(() => layerStore.layerChangeCount, val => { - for (let i = 0; i < layers.length; i++) { - layers[i].selectEnabled = false; - } -}); -onMounted(() => { - fileChange(); - currntVideoDom = document.getElementById("trailer-0"); -}) - -// 点击选择文件函数 -function chooseFile() { - vedioFile_dom.value.click(); -} - -//文件夹改变文件触发 -function fileChange() { - vedioFile_dom.value.addEventListener("change", evt => { - let file = evt.target.files[0]; - if (!file) return; - state.fileText = vedioFile_dom.value.value; - const aBlob = new Blob([file], { type: 'video/mp4' }) - reader.readAsDataURL(aBlob) - reader.onload = function (e: any) { - let vedio = e.target.result; - let index = document.querySelectorAll('#videoContain>video').length; - creatVideo_dom(vedio, index).then((res) => { - currntVideoDom = document.getElementById("trailer-" + index) - }); - }; - }); -} - -function creatVideo_dom(src, index) { - return new Promise((resolve, reject) => { - let videoContain: any = document.getElementById("videoContain"); - let video = document.createElement("video"); - let source = document.createElement("source"); - source.src = src; - video.appendChild(source); - video.id = "trailer-" + index; - video.classList.add("videoBox"); - video.setAttribute("autoplay", "autoplay"); - video.setAttribute("loop", "loop"); - video.setAttribute("crossorigin", "crossorigin"); - video.setAttribute("controls", "controls"); - video.setAttribute("muted", "muted"); - videoContain.appendChild(video); - setTimeout(() => { - resolve(video); - }, 500); - }); -}; - -// window.axios -// .get('http://localhost:8090/zhw/video.mp4') -// .then((res: any) => { -// console.log(res); -// }) - -function startProjection() { - if(state.fileText === '') { - message.warning(GlobalLang.localVideoPath); - return; - } - - if(currentProject){ - message.warning(GlobalLang.deleteVideo); - return; - } - - viewer.enableCursorStyle = false; - viewer._element.style.cursor = ""; - document.body.classList.add("measureCur"); - let viewPosition = viewer.scene.camera.position; - currntVideoDom.play(); - currentProject = new SuperMap3D.ProjectionImage(scene); - currentProject.setImage({ video: currntVideoDom }); - currentProject.distance = Number(state.distance); - currentProject.horizontalFov = Number(state.horizontal); - currentProject.verticalFov = Number(state.vertical); - currentProject.viewPosition = tool.CartesiantoDegrees(viewPosition); - currentProject.visibleDistanceMax = state.visibleDistanceMax; - currentProject.build(); - isActive = true; - viewer.eventManager.addEventListener("MOUSE_MOVE", move_set_target); - viewer.eventManager.addEventListener("CLICK", click_set_target, true); - -} - -function click_set_target(e) { - if (isClip) return; - if (isActive) { - viewer.enableCursorStyle = true; - document.body.classList.remove("measureCur"); - let Cartesian3 = SuperMap3D.Cartesian3.fromDegrees(currentProject.viewPosition[0], currentProject.viewPosition[1], currentProject.viewPosition[2]); - let viewPosition = JSON.parse(JSON.stringify(Cartesian3)); - viewer.eventManager.removeEventListener("MOUSE_MOVE", move_set_target); - addModel(viewPosition); - isActive = false; - return; - } - -} - -function move_set_target(e) { - let distance = 0; - let viewPosition = viewer.scene.camera.position; - let targetPosition = scene.pickPosition(e.message.endPosition); - if (targetPosition) - distance = SuperMap3D.Cartesian3.distance(viewPosition, targetPosition); - if (distance > 0 && distance < 1000) - currentProject.setDistDirByPoint(tool.CartesiantoDegrees(targetPosition)); -} - -function addModel(position: any, position2?: any) { - let id = 'projector-' + new Date().getTime(); - let direction = currentProject.direction; - let pitch = currentProject.pitch; - let radians = SuperMap3D.Math.toRadians(direction); - let heading = radians >= SuperMap3D.Math.PI ? radians - SuperMap3D.Math.PI : radians + SuperMap3D.Math.PI; - let pitch2 = -SuperMap3D.Math.toRadians(pitch) - s3mInstanceColc.add(modelUrl, { - id: id, - position: position, - hpr: { - heading: heading, - pitch: 0, - roll: pitch2, - }, - scale: new SuperMap3D.Cartesian3(2, 2, 2), - // offset: new SuperMap3D.Cartesian3(0, 0, 0.1) - }); - currentSelectedSymbol = s3mInstanceColc.getInstance(modelUrl, id); - modelIdProjectPairs.set(id, currentProject); -} - -// 裁剪 -function clipProjectImg() { - isClip = true; - - if (!handlerPolygon) { - handlerPolygon = initHandler("Polygon"); - } - handlerPolygon.handlerDrawing().then( - (res: any) => { - isClip = false; - let positionList:any = [] - for(let i=0;i<res.positions.length;i++){ - let position:any[] = tool.CartesiantoDegrees(res.positions[i]); - positionList.push(position[0]); - positionList.push(position[1]); - positionList.push(position[2]); - } - - updateClipImg(positionList) - }, - (err: any) => { - console.log(err); - } - ); - handlerPolygon.activate(); -} - -function updateClipImg(position) { - if (!currentProject) return; - currentProject.addClipRegion({ - name: "clip-Projector" + new Date().getTime(), - position: position, - }); -} - -function clear() { - viewer.eventManager.removeEventListener("MOUSE_MOVE", move_set_target); - if (handlerPolygon) handlerPolygon.clearHandler(); - - if (currentSelectedSymbol) { - modelIdProjectPairs.delete(currentSelectedSymbol.id); - s3mInstanceColc.removeInstance(modelUrl, currentSelectedSymbol.id); - currentSelectedSymbol = null; - } - if (currentProject) { - currentProject.removeAllClipRegion() - currentProject.destroy(); - } - if (modelIdProjectPairs.size === 0) - viewer.eventManager.removeEventListener("CLICK", click_set_target); - - currentProject = null; - viewer.enableCursorStyle = true; - document.body.classList.remove("measureCur"); -} - - -watch(() => state.fileText, val => { - if (val.indexOf("http") === -1) return; - let index = document.querySelectorAll('#videoContain>video').length; - creatVideo_dom(val, index).then((res) => { - currntVideoDom = document.getElementById("trailer-" + index) - }); -}) -watch(() => state.horizontal, val => { - if(!currentProject) return; - currentProject.horizontalFov = Number(val); -}) -watch(() => state.vertical, val => { - if(!currentProject) return; - currentProject.verticalFov = Number(val); -}) -watch(() => state.distance, val => { - if(!currentProject) return; - currentProject.distance = Number(val); -}) -watch(() => state.visibleDistanceMax, val => { - if(!currentProject) return; - currentProject.visibleDistanceMax = Number(val); -}) - -watch(() => state.visibleLine, val => { - if (!currentProject) return; - s3mInstanceColc.visible = val; //隐藏所有模型 - modelIdProjectPairs.forEach((projector) => { //隐藏所有投放线 - projector.hintLineVisible = val - }) -}) -watch(() => state.clipMode, val => { - if (!currentProject) return; - let clipMode = - val === "clip_behind_any_plane" - ? SuperMap3D.ModifyRegionMode.CLIP_INSIDE - : SuperMap3D.ModifyRegionMode.CLIP_OUTSIDE; - currentProject.setClipMode(clipMode); -}) - - -// 销毁 -onBeforeUnmount(() => { - for (let i = 0; i < layers.length; i++) { - layers[i].selectEnabled = true; - } - clear(); - if (handlerPolygon) handlerPolygon.destroy(); -}); - -</script> - - -<style lang="scss" scoped></style> - diff --git a/SuperMap iEarth/src/package/sceneSet/video-set/videoSet.vue b/SuperMap iEarth/src/package/sceneSet/video-set/videoSet.vue new file mode 100644 index 00000000..633b6fab --- /dev/null +++ b/SuperMap iEarth/src/package/sceneSet/video-set/videoSet.vue @@ -0,0 +1,526 @@ +<template> + <div class="row-item"> + <div>{{ $t("videoPath") }}</div> + <div> + <n-input-group> + <n-input + style="width: 1.4rem" + class="add-input-border" + :placeholder="$t('localVideoPath')" + v-model:value="state.fileText" + /> + <n-button type="tertiary" @click="chooseFile" style="width: 0.6rem">{{ + $t("chooseFile") + }}</n-button> + </n-input-group> + </div> + <input + type="file" + accept="*.mp4" + id="vedioFile" + style="display: none" + ref="vedioFile_dom" + /> + </div> + + <div class="row-item"> + <span>{{ $t("width") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.2rem" + v-model:value="state.horizontal" + :step="1" + :min="1" + :max="60" + /> + <n-input-number + v-model:value="state.horizontal" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="60" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("height") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.2rem" + v-model:value="state.vertical" + :step="1" + :min="1" + :max="60" + /> + <n-input-number + v-model:value="state.vertical" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="60" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("distencePlace") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.2rem" + v-model:value="state.distance" + :step="1" + :min="1" + :max="500" + /> + <n-input-number + v-model:value="state.distance" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="1" + :max="500" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("MaxVisibleDistance") }}</span> + <div class="slider-box"> + <n-slider + style="width: 1.2rem" + v-model:value="state.visibleDistanceMax" + :step="1" + :min="300" + :max="2000" + /> + <n-input-number + v-model:value="state.visibleDistanceMax" + class="slider-input-number" + :update-value-on-input="false" + :bordered="false" + :show-button="false" + :min="300" + :max="2000" + placeholder="" + size="small" + /> + </div> + </div> + + <div class="row-item"> + <span>{{ $t("clipMode") }}</span> + <n-radio-group + v-model:value="state.clipMode" + name="radiogroup" + class="radio-group" + > + <n-radio + v-for="item in state.modeOptions" + :key="item.value" + :value="item.value" + > + {{ item.label }} + </n-radio> + </n-radio-group> + </div> + + <div class="row-item"> + <span>{{ $t("visibleVideoLine") }}</span> + <div class="check-box"> + <n-checkbox v-model:checked="state.visibleLine"></n-checkbox> + </div> + </div> + + <div class="btn-row-item2"> + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="startProjection" + style="margin-right: 0.1rem" + >{{ $t("videoSet") }}</n-button + > + <n-button + type="info" + color="#3499E5" + text-color="#fff" + @click="clipProjectImg" + style="margin-right: 0.1rem" + >{{ $t("clip") }}</n-button + > + <n-button + class="btn-secondary" + @click="clear" + color="rgba(255, 255, 255, 0.65)" + ghost + >{{ $t("clear") }}</n-button + > + </div> + + <div id="videoContain" style="width: 0; height: 0"> + <video + id="trailer-0" + style="visibility: hidden" + autoplay + loop + controls + muted + multiple + > + <source src="" type="video/mp4" /> + </video> + </div> +</template> + +<script lang="ts" setup> +// 引入依赖 +import { watch, ref, reactive, onBeforeUnmount, onMounted } from "vue"; +import { useMessage } from "naive-ui"; +import tool from "@/tools/tool"; +import initHandler from "@/tools/drawHandler"; +import { useLayerStore } from "@/store/layerStore/layer"; + +const message = useMessage(); +const layerStore = useLayerStore(); + +type stateType = { + horizontal: number; + vertical: number; + distance: number; + clipMode: string; + visibleLine: boolean; + fileText: string; + modeOptions: any; + visibleDistanceMax: number; +}; +// 设置默认值数据 +let state = reactive<stateType>({ + horizontal: 20, + vertical: 10, + distance: 200, + clipMode: "clip_behind_all_plane", + visibleLine: true, + fileText: "", + modeOptions: [ + { + label: $t("inner"), + value: "clip_behind_all_plane", + }, + { + label: $t("outer"), + value: "clip_behind_any_plane", + }, + ], + visibleDistanceMax: 500, +}); + +// 初始化变量 +let vedioFile_dom = ref(); +let modelIdProjectPairs = new Map(); // 模型id和视频投放对象对象的键值对 +let reader = new FileReader(); + +let modelUrl = "./Resource/model/projector.s3m"; +let currentSelectedSymbol: any = null; +let isActive = false; +let isClip = false; +let handlerPolygon: any; +let currntVideoDom; +let layers, scene, currentProject, s3mInstanceColc; + +// 初始化 +function init() { + scene = viewer.scene; + layers = viewer.scene.layers.layerQueue; + s3mInstanceColc = new SuperMap3D.S3MInstanceCollection(scene._context); + viewer.scene.primitives.add(s3mInstanceColc); +} + +onMounted(() => { + init(); + fileChange(); + currntVideoDom = document.getElementById("trailer-0"); +}); + +onBeforeUnmount(() => {}); + +// 点击选择文件函数 +function chooseFile() { + vedioFile_dom.value.click(); +} + +// 文件夹改变文件触发 +function fileChange() { + vedioFile_dom.value.addEventListener("change", (evt) => { + let file = evt.target.files[0]; + if (!file) return; + state.fileText = vedioFile_dom.value.value; + const aBlob = new Blob([file], { type: "video/mp4" }); + reader.readAsDataURL(aBlob); + reader.onload = function (e: any) { + let vedio = e.target.result; + let index = document.querySelectorAll("#videoContain>video").length; + creatVideo_dom(vedio, index).then((res) => { + currntVideoDom = document.getElementById("trailer-" + index); + }); + }; + }); +} + +// 创建Video-html元素 +function creatVideo_dom(src, index) { + return new Promise((resolve, reject) => { + let videoContain: any = document.getElementById("videoContain"); + let video = document.createElement("video"); + let source = document.createElement("source"); + source.src = src; + video.appendChild(source); + video.id = "trailer-" + index; + video.classList.add("videoBox"); + video.setAttribute("autoplay", "autoplay"); + video.setAttribute("loop", "loop"); + video.setAttribute("crossorigin", "crossorigin"); + video.setAttribute("controls", "controls"); + video.setAttribute("muted", "muted"); + videoContain.appendChild(video); + setTimeout(() => { + resolve(video); + }, 500); + }); +} + +// 视频投放 +function startProjection() { + if (state.fileText === "") { + message.warning($t("localVideoPath")); + return; + } + + if (currentProject) { + message.warning($t("deleteVideo")); + return; + } + + viewer.enableCursorStyle = false; + viewer._element.style.cursor = ""; + document.body.classList.add("measureCur"); + let viewPosition = viewer.scene.camera.position; + currntVideoDom.play(); + currentProject = new SuperMap3D.ProjectionImage(scene); + currentProject.setImage({ video: currntVideoDom }); + currentProject.distance = Number(state.distance); + currentProject.horizontalFov = Number(state.horizontal); + currentProject.verticalFov = Number(state.vertical); + currentProject.viewPosition = tool.CartesiantoDegrees(viewPosition); + currentProject.visibleDistanceMax = state.visibleDistanceMax; + currentProject.build(); + isActive = true; + viewer.eventManager.addEventListener("MOUSE_MOVE", move_set_target); + viewer.eventManager.addEventListener("CLICK", click_set_target, true); +} + +// 点击事件 +function click_set_target(e) { + if (isClip) return; + if (isActive) { + viewer.enableCursorStyle = true; + document.body.classList.remove("measureCur"); + let Cartesian3 = SuperMap3D.Cartesian3.fromDegrees( + currentProject.viewPosition[0], + currentProject.viewPosition[1], + currentProject.viewPosition[2] + ); + let viewPosition = JSON.parse(JSON.stringify(Cartesian3)); + viewer.eventManager.removeEventListener("MOUSE_MOVE", move_set_target); + addModel(viewPosition); + isActive = false; + return; + } +} + +// 鼠标移动事件 +function move_set_target(e) { + let distance = 0; + let viewPosition = viewer.scene.camera.position; + let targetPosition = scene.pickPosition(e.message.endPosition); + if (targetPosition) + distance = SuperMap3D.Cartesian3.distance(viewPosition, targetPosition); + if (distance > 0 && distance < 1000) + currentProject.setDistDirByPoint(tool.CartesiantoDegrees(targetPosition)); +} + +// 添加模型 +function addModel(position: any, position2?: any) { + let id = "projector-" + new Date().getTime(); + let direction = currentProject.direction; + let pitch = currentProject.pitch; + let radians = SuperMap3D.Math.toRadians(direction); + let heading = + radians >= SuperMap3D.Math.PI + ? radians - SuperMap3D.Math.PI + : radians + SuperMap3D.Math.PI; + let pitch2 = -SuperMap3D.Math.toRadians(pitch); + s3mInstanceColc.add(modelUrl, { + id: id, + position: position, + hpr: { + heading: heading, + pitch: 0, + roll: pitch2, + }, + scale: new SuperMap3D.Cartesian3(2, 2, 2), + // offset: new SuperMap3D.Cartesian3(0, 0, 0.1) + }); + currentSelectedSymbol = s3mInstanceColc.getInstance(modelUrl, id); + modelIdProjectPairs.set(id, currentProject); +} + +// 裁剪 +function clipProjectImg() { + isClip = true; + + if (!handlerPolygon) { + handlerPolygon = initHandler("Polygon"); + } + handlerPolygon.handlerDrawing().then( + (res: any) => { + isClip = false; + let positionList: any = []; + for (let i = 0; i < res.positions.length; i++) { + let position: any[] = tool.CartesiantoDegrees(res.positions[i]); + positionList.push(position[0]); + positionList.push(position[1]); + positionList.push(position[2]); + } + + updateClipImg(positionList); + handlerPolygon.polylineTransparent.show = false; + }, + (err: any) => { + console.log(err); + } + ); + handlerPolygon.activate(); +} + +function updateClipImg(position) { + if (!currentProject) return; + currentProject.addClipRegion({ + name: "clip-Projector" + new Date().getTime(), + position: position, + }); +} + +// 清除 +function clear() { + viewer.eventManager.removeEventListener("MOUSE_MOVE", move_set_target); + if (handlerPolygon) handlerPolygon.clearHandler(); + + if (currentSelectedSymbol) { + modelIdProjectPairs.delete(currentSelectedSymbol.id); + s3mInstanceColc.removeInstance(modelUrl, currentSelectedSymbol.id); + currentSelectedSymbol = null; + } + if (currentProject) { + currentProject.removeAllClipRegion(); + currentProject.destroy(); + } + if (modelIdProjectPairs.size === 0) + viewer.eventManager.removeEventListener("CLICK", click_set_target); + + currentProject = null; + viewer.enableCursorStyle = true; + document.body.classList.remove("measureCur"); +} + +// 监听 +//viewer 初始化完成的监听 +watch( + () => layerStore.layerChangeCount, + (val) => { + if (val) { + init(); + } + } +); +//监听图层加载完成 +watch( + () => layerStore.layerChangeCount, + (val) => { + for (let i = 0; i < layers.length; i++) { + layers[i].selectEnabled = false; + } + } +); +watch( + () => state.fileText, + (val) => { + if (val.indexOf("http") === -1) return; + let index = document.querySelectorAll("#videoContain>video").length; + creatVideo_dom(val, index).then((res) => { + currntVideoDom = document.getElementById("trailer-" + index); + }); + } +); +watch( + () => state.horizontal, + (val) => { + if (!currentProject) return; + currentProject.horizontalFov = Number(val); + } +); +watch( + () => state.vertical, + (val) => { + if (!currentProject) return; + currentProject.verticalFov = Number(val); + } +); +watch( + () => state.distance, + (val) => { + if (!currentProject) return; + currentProject.distance = Number(val); + } +); +watch( + () => state.visibleDistanceMax, + (val) => { + if (!currentProject) return; + currentProject.visibleDistanceMax = Number(val); + } +); +watch( + () => state.visibleLine, + (val) => { + if (!currentProject) return; + s3mInstanceColc.visible = val; //隐藏所有模型 + modelIdProjectPairs.forEach((projector) => { + //隐藏所有投放线 + projector.hintLineVisible = val; + }); + } +); +watch( + () => state.clipMode, + (val) => { + if (!currentProject) return; + let clipMode = + val === "clip_behind_any_plane" + ? SuperMap3D.ModifyRegionMode.CLIP_INSIDE + : SuperMap3D.ModifyRegionMode.CLIP_OUTSIDE; + currentProject.setClipMode(clipMode); + } +); +</script> diff --git a/SuperMap iEarth/src/store/global/global.d.ts b/SuperMap iEarth/src/store/global/global.d.ts index 64a88aa7..b6d09751 100644 --- a/SuperMap iEarth/src/store/global/global.d.ts +++ b/SuperMap iEarth/src/store/global/global.d.ts @@ -1,9 +1,11 @@ export interface GlobalStateType { - headerFold:boolean, - SceneLayerChangeCount:number, - isViewer:boolean, - showSavePanel:boolean, - // isEditMode:boolean, - layerTreeCheckedKeys:any, - currentLanguage:string, + headerFold: boolean, + SceneLayerChangeCount: number, + isViewer: boolean, + // showSavePanel:boolean, + isEditMode:boolean, + layerTreeCheckedKeys: any, + currentLanguage: string, + storageSceneCurrentTime: any + isNormalMode: boolean } diff --git a/SuperMap iEarth/src/store/global/global.ts b/SuperMap iEarth/src/store/global/global.ts index da7d3a92..93baaf6f 100644 --- a/SuperMap iEarth/src/store/global/global.ts +++ b/SuperMap iEarth/src/store/global/global.ts @@ -3,23 +3,19 @@ import { GlobalStateType } from './global.d' export const GlobalStoreCreate = defineStore({ id: 'globalStoreState', // id必填,且需要唯一 - state: (): any => ({ + state: (): GlobalStateType => ({ headerFold: true, // 页头是否折叠,默认为折叠 SceneLayerChangeCount: 0, // 用来更新图层树的,当我们向场景中添加或者删除一个图层,让其自增++,在layerTree中监听他,一旦发生改变,就调用updateTree更新图层树,从而实现实时刷新 isViewer: false, // Cesium.Viewer这个东西初始化完成的标志 - + isEditMode: false,// 是否为iportal场景编辑模式 layerTreeCheckedKeys: { // iportal中保存场景,有些图层没有勾选(隐藏不显示),就不保存,这个对象是哪里存储勾选了的 s3mLayerCheckedList: [], // S3M图层 imageryLayerCheckedList: [], // 影像图层 mvtLayerCheckedList: [], // MVT图层(其实场景中一般只有一个) }, currentLanguage: '', // 当前语言 - // 时间 这里先做一下保存 后面要改 - storageSceneCurrentTime: '', - isNormalMode:false, + storageSceneCurrentTime: '', // 时间,这里先做一下保存,后面要改 + isNormalMode: false, }), - actions: { - } - - + actions: {} }); diff --git a/SuperMap iEarth/src/store/index.ts b/SuperMap iEarth/src/store/index.ts index f72c0eb0..ec7e734f 100644 --- a/SuperMap iEarth/src/store/index.ts +++ b/SuperMap iEarth/src/store/index.ts @@ -1,4 +1,4 @@ -export { useLayerStore } from './layerStore/index'; +export { useLayerStore } from './layerStore/layer'; export { usePanelStore } from './panelStore/index'; export { IportalStoreCreate } from './iportalManage/index'; @@ -10,6 +10,4 @@ import PiniaPluginPersist from 'pinia-plugin-persist' const store: any = createPinia(); store.use(PiniaPluginPersist); -export default store; - - +export default store; \ No newline at end of file diff --git a/SuperMap iEarth/src/store/iportalManage/index.d.ts b/SuperMap iEarth/src/store/iportalManage/index.d.ts index e1fe6925..4a944247 100644 --- a/SuperMap iEarth/src/store/iportalManage/index.d.ts +++ b/SuperMap iEarth/src/store/iportalManage/index.d.ts @@ -15,14 +15,11 @@ interface IportalStoreStateType { portalUserprofile: any, portalConfig: any, systemConfig: any, - - isLogin:boolean, // 是否登录 - isSuperAdmin:boolean, // 是否为超级管理员 - + isLogin: boolean, // 是否登录 + isSuperAdmin: boolean, // 是否为超级管理员 userInfo: userInfoType, - - isCreateScene:boolean, // 是否为创建场景 || 编辑场景 - saveInfo:any, + isCreateScene: boolean, // 是否为创建场景 || 编辑场景 + saveInfo: any, } export { diff --git a/SuperMap iEarth/src/store/iportalManage/index.ts b/SuperMap iEarth/src/store/iportalManage/index.ts index 77c7caa9..18ad3a9a 100644 --- a/SuperMap iEarth/src/store/iportalManage/index.ts +++ b/SuperMap iEarth/src/store/iportalManage/index.ts @@ -1,19 +1,17 @@ import { defineStore } from 'pinia' -import { userInfoType,IportalStoreStateType} from './index.d' +import { userInfoType, IportalStoreStateType } from './index.d' export const IportalStoreCreate = defineStore({ id: "IportalStoreState", state: (): IportalStoreStateType => { return { isPortal: true, - // 存储相关信息的 - portalUserprofile:undefined, - portalConfig:undefined, - systemConfig:undefined, - + portalUserprofile: undefined, + portalConfig: undefined, + systemConfig: undefined, userInfo: <userInfoType>{ - userName: "游客", // 用户名 + userName: "GUEST", // 用户名 nickName: "", // 用户的昵称 type: "", // 用户的类型,包括创建者 "CREATOR" 和查看者 "VIEWER" 两类。 theme: "", // 用户设置的偏好主题。默认使用管理员配置好的默认主题。 @@ -23,10 +21,10 @@ export const IportalStoreCreate = defineStore({ }, isLogin: false, // 是否登录 isSuperAdmin: false, // 是否是超级管理员, - isCreateScene:true, // iportal中IEarth分为两种模式:创建场景、编辑场景(打开已保存场景) - saveInfo:{}, // 保存场景时的相关信息 + isCreateScene: true, // iportal中IEarth分为两种模式:创建场景、编辑场景(打开已保存场景) + saveInfo: {}, // 保存场景时的相关信息 }; - }, + }, getters: { getUserInfo(): Object { return this.userInfo; @@ -34,7 +32,7 @@ export const IportalStoreCreate = defineStore({ }, actions: { setUserInfo(userinfoParam: userInfoType) { - if(userinfoParam.nickName === "GUEST") { + if (userinfoParam.nickName === "GUEST") { userinfoParam.userName = "游客"; } this.userInfo = userinfoParam; diff --git a/SuperMap iEarth/src/store/langStore/langStore.d.ts b/SuperMap iEarth/src/store/langStore/langStore.d.ts deleted file mode 100644 index 0d71c8d0..00000000 --- a/SuperMap iEarth/src/store/langStore/langStore.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { LangEnum } from '@/enums/styleEnum' -export interface LangStateType { - // 当前语言 - lang: LangEnum, -} diff --git a/SuperMap iEarth/src/store/langStore/langStore.ts b/SuperMap iEarth/src/store/langStore/langStore.ts index 40672d8d..3159663a 100644 --- a/SuperMap iEarth/src/store/langStore/langStore.ts +++ b/SuperMap iEarth/src/store/langStore/langStore.ts @@ -1,40 +1,22 @@ -import { defineStore } from 'pinia' -import { LangStateType } from './langStore.d' -import { LangEnum } from '@/enums/styleEnum' -import i18n from '@/locale/index' -import { setLocalStorage, getLocalStorage } from '@/utils' -import { StorageEnum } from '@/enums/storageEnum' -import { langGlobal } from '@/locale/index' -// import { GlobalStoreCreate } from '@/store/global/global'; +import i18n from '@/locale/index'; +import { defineStore } from 'pinia'; +import { getLanguage } from '@/tools/getLanguage'; -// const GlobalStore = GlobalStoreCreate(); - -const { SM_LANG_STORE } = StorageEnum -const storageLang: LangStateType = getLocalStorage(SM_LANG_STORE) -const lang = LangEnum.ZH; -// 语言 +let lang = getLanguage(); export const useLangStoreCreate = defineStore({ id: 'useLangStoreState', - state: (): LangStateType => - storageLang || { - lang, - }, + state: () =>({ + lang:lang + }), getters: { - getLang(): LangEnum { - return this.lang + getLang(): string{ + return this.lang; } }, actions: { - changeLang(lang: LangEnum): void { - // if (this.lang === lang) return - this.lang = lang - i18n.global.locale = lang - setLocalStorage(SM_LANG_STORE, this.$state) - - // GlobalStore.currentLanguage = lang; - // 有两种方式来切换语言:控件切换、初始化根据浏览器环境自动切换,都会经过这里来实现具体切换,在这里我们把语言包绑定在window对象上,以便在TS代码中使用 - window.LangGlobal = langGlobal[lang]; - window.GlobalLang = window.LangGlobal.global; + changeLang(lang:string): void { + this.lang = lang; + i18n.global.locale = lang; } } }) diff --git a/SuperMap iEarth/src/store/layerStore/index.ts b/SuperMap iEarth/src/store/layerStore/layer.ts similarity index 50% rename from SuperMap iEarth/src/store/layerStore/index.ts rename to SuperMap iEarth/src/store/layerStore/layer.ts index 95b5acc7..7fb88db8 100644 --- a/SuperMap iEarth/src/store/layerStore/index.ts +++ b/SuperMap iEarth/src/store/layerStore/layer.ts @@ -1,343 +1,89 @@ -import { isTemplateNode } from '@vue/compiler-core'; -import { number } from 'echarts/core'; -import { update } from 'lodash'; -// import layerManagement from "@/tools/layerManagement"; -import { defineStore } from 'pinia' - +import { defineStore } from 'pinia'; +const layerServiceData = window.layerServiceData; export const useLayerStore = defineStore({ id: 'useLayerManageStore', state: (): any => ({ - configToken:{ - TiandituToken:'', // 天地图token - BingMapKey:'' // 必应地图key - }, - layerServiceData: { - // 公共服务 - publicServiceList: [ - { - type: "REALSPACE", - thumbnail: "./images/addData/CBD.jpg", - // proxiedUrl: 'https://www.supermapol.com/realspace/services/3D-CBD/rest/realspace', - proxiedUrl: 'https://www.supermapol.com/realspace/services/3D-0523/rest/realspace', - name: "global.BeijingCBD", - layers: [{ type: 'S3M', layerName: 'Building@CBD' }, { type: 'S3M', layerName: 'Tree@CBD' }, { type: 'S3M', layerName: 'Xiaopin@CBD' }, { type: 'S3M', layerName: 'Lake@CBD' }, { type: 'S3M', layerName: 'Ground@CBD' }, { type: 'S3M', layerName: 'Ground2@CBD' }, { type: 'S3M', layerName: 'Bridge@CBD' }], - chooseType: false - }, - { - type: "REALSPACE", - thumbnail: "./images/addData/Sophia.jpg", - proxiedUrl: "https://www.supermapol.com/realspace/services/3D-suofeiya_church-2/rest/realspace", - name: "global.SophiaChurch", - chooseType: false - }, - { - type: "REALSPACE", - thumbnail: "./images/addData/ZfTerranAndImagery.jpg", - proxiedUrl: "https://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace", - name: "global.MountEverest", - layers: [{ type: 'IMG', layerName: 'image' }, { type: 'TERRAIN', layerName: 'srtm_54_07%40zhufeng' }], - chooseType: false - }, - { - type: "REALSPACE", - thumbnail: "./images/addData/BIM.jpg", - // proxiedUrl: "http://www.supermapol.com/realspace/services/3D-wireFrame-2/rest/realspace", - proxiedUrl: "https://www.supermapol.com/realspace/services/3D-BIMbuilding-2/rest/realspace", - name: "global.BIMBuilding", - layers: [{ type: 'S3M', layerName: "BIMbuilding" }], - chooseType: false - }, - { - type: "REALSPACE", - thumbnail: "./images/addData/PointCloud.jpg", - proxiedUrl: "https://www.supermapol.com/realspace/services/3D-cloud-2/rest/realspace", - name: "global.Pointcloud", - layers: [{ type: 'S3M', layerName: 'POINTCLOUD23' }], - chooseType: false - }, - // { - // type: "REALSPACE", - // thumbnail: "./images/addData/Histogram.jpg", - // proxiedUrl: " https://www.supermapol.com/realspace/services/3D-Histogram/rest/realspace", - // name: "柱状图", - // chooseType: false - // }, - // { - // type: "REALSPACE", - // thumbnail: "./images/addData/Household.jpg", - // // proxiedUrl: "https://www.supermapol.com/realspace/services/3D-QingXieSheYingMoXing/rest/realspace", - // proxiedUrl: "http://www.supermapol.com/realspace/services/3D-FCFH_Shangdong-2/rest/realspace", - // name: "倾斜影像", - // layers: [{ type: 'S3M', layerName: 'qingxie' }], - // chooseType: false - // }, - - // { - // "id": 9, - // "type": "SCP", - // "thumbnail": "./images/addData/Household.jpg", - // "proxiedUrl": "https://www.supermapol.com/realspace/services/3D-FCFH_Shangdong/rest/realspace/datas/config/config", - // "name": "倾斜分层分户", - // "state": 0 - // }, - - - { - type: "MVT", - thumbnail: "./images/addData/MVT.jpg", - proxiedUrl: "https://www.supermapol.com/realspace/services/map-mvt-JingJinDiQuDiTu/restjsr/v1/vectortile/maps/%E4%BA%AC%E6%B4%A5%E5%9C%B0%E5%8C%BA%E5%9C%B0%E5%9B%BE", - name: "global.JingJinMVT", - VectorTilesMapName: 'JingJinMVT', - layers: [{ type: 'MVT', layerName: '京津地区MVT' }], - chooseType: false - }, - // { - // "id": 10, - // "type": "REALSPACE", - // "thumbnail": "./images/addData/VectorThematicMap.jpg", - // "proxiedUrl": "https://www.supermapol.com/realspace/services/3D-five-vector/rest/realspace", - // "name": "矢量专题图", - // "state": 0 - // }, - - { - type: "ThematicMap", - thumbnail: "./images/addData/cqbm.jpg", - // proxiedUrl: "https://www.supermapol.com/realspace/services/3D-CQmodel_wireframe_2000/rest/realspace/datas/CQmodel/config", - proxiedUrl: "https://www.supermapol.com/realspace/services/3D-CQmodel_wireframe_2000-2/rest/realspace/datas/wireFrame/config", - name: "global.ChongqingBaimo", - S3MLayer: true, - chooseType: false - }, - // { - // type: "ThematicMap", - // thumbnail: "./images/addData/hbbm.jpg", - // proxiedUrl: "https://www.supermapol.com/realspace/services/3D-XinBaiMo-2/rest/realspace/datas/%E4%B8%80%E8%88%AC%E5%AE%B6%E5%B1%8B/config", - // name: "global.YokohamaBaimo", - // S3MLayer: true, - // chooseType: false - // }, - { - type: "REALSPACE", - thumbnail: "./images/addData/Petroleum.jpg", - // proxiedUrl: "http://www.supermapol.com/realspace/services/3D-BianDianZhan0614/rest/realspace", // old 太慢了 - proxiedUrl: "https://www.supermapol.com/realspace/services/3D-0725RVM/rest/realspace", - name: "global.transformerStation", - chooseType: false - }, - // { - // type: "REALSPACE", - // thumbnail: "./images/addData/CBD.jpg", - // proxiedUrl: 'https://www.supermapol.com/realspace/services/3D-CBD/rest/realspace', - // // proxiedUrl: 'http://www.supermapol.com/realspace/services/3D-0523/rest/realspace', - // name: "global.originCBD", - // layers: [{ type: 'S3M', layerName: 'Building@CBD' }, { type: 'S3M', layerName: 'Tree@CBD' }, { type: 'S3M', layerName: 'Xiaopin@CBD' }, { type: 'S3M', layerName: 'Lake@CBD' }, { type: 'S3M', layerName: 'Ground@CBD' }, { type: 'S3M', layerName: 'Ground2@CBD' }, { type: 'S3M', layerName: 'Bridge@CBD' }], - // chooseType: false - // }, - ], - // 在线底图服务 - onlineBaseLayerList: [{ - url: './images/baseMap/baseImage.jpg', - name: "global.LocalImage", - thumbnail: './images/baseMap/locate.png', - title: '本地图片', - type: 'LocalImage', - imgsrc: '@/../static/css/cross.png', - chooseType: false, - isMultipleChoose: false, - index: 0 - }, - { - url: '//dev.virtualearth.net/', - name: "global.BingMap", - thumbnail: './images/baseMap/BingMap.png', - title: '必应底图', - type: 'BingMap', - imgsrc: '@/../static/css/cross.png', - chooseType: false, - isMultipleChoose: false, - index: 1 - }, - { - url: 'https://[subdomain].tianditu.gov.cn/img_w/wmts', - name: "global.TIANDITU", - thumbnail: './images/baseMap/tianditu.png', - title: '天地图', - type: 'TIANDITU', - imgsrc: '@/../static/css/cross.png', - chooseType: false, - isMultipleChoose: false, - index: 2 - }, - // { - // url: 'https://tile-{s}.openstreetmap.fr/hot/{z}/{x}/{y}.png', - // name: "global.OSM", - // thumbnail: './images/baseMap/OSM.png', - // title: 'OSM底图', - // type: 'OSM', - // imgsrc: '@/../static/css/cross.png', - // subdomains: ["a", "b", "c", "d"], - // chooseType: false, - // isMultipleChoose: false, - // index: 3 - // }, - { - name: "global.GRIDIMAGERY", - thumbnail: './images/baseMap/grad.png', - title: '经纬底图', - type: 'GRIDIMAGERY', - imgsrc: '@/../static/css/cross.png', - chooseType: false, - isMultipleChoose: false, - index: 4 - }, - { - url: 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png', - name: "global.japanStand", - thumbnail: './images/baseMap/standard_jp.png', - title: '日本地理院标准地图', - type: 'UrlTemplateImageryProvider', - type_ja:'japanStand', - imgsrc: '@/../static/css/cross.png', - chooseType: false, - isMultipleChoose: false, - index: 5 - }, - { - url: 'https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png', - name: "global.japanPale", - thumbnail: './images/baseMap/tinge_jp.png', - title: '日本地理院淡色地图', - type: 'UrlTemplateImageryProvider', - type_ja:'japanPale', - imgsrc: '@/../static/css/cross.png', - chooseType: false, - isMultipleChoose: false, - index: 6 - }, - // { - // url: 'https://cyberjapandata.gsi.go.jp/xyz/blank/{z}/{x}/{y}.png', - // name: "global.japanBlank", - // thumbnail: './images/baseMap/grad.png', - // title: '日本地理院白色地图', - // type: 'UrlTemplateImageryProvider', - // type_ja:'japanBlank', - // imgsrc: '@/../static/css/cross.png', - // chooseType: false, - // isMultipleChoose: false, - // index: 7 - // }, - { - url: 'https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg', - name: "global.japanImage", - thumbnail: './images/baseMap/image_jp.png', - title: '日本地理院影像图', - type: 'UrlTemplateImageryProvider', - type_ja:'japanImage', - imgsrc: '@/../static/css/cross.png', - chooseType: false, - isMultipleChoose: false, - index: 8 - } - ], - // 在线地形 - onlineTerrainLayerList: [ - { - proxiedUrl: 'https://maptiles.supermapol.com/iserver/services/3D-local3DCache-GlobalTIN30M/rest/realspace/datas/Global_TIN_30M', - name: '超图在线地形', - thumbnail: './images/terrainLayers/SuperMapOnline.png', - title: "global.SuperMapOnlineTerrain", - type: 'supermapOnlineTerrain', - chooseType: false, - }, - { - proxiedUrl: '', - name: '天地图地形', - thumbnail: './images/terrainLayers/tianditu_terrain.png', - title: "global.TiandituTerrain", - type: 'tianDiTuTerrain', - chooseType: false - }, - { - proxiedUrl: "https://www.supermapol.com/realspace/services/3D-stk_terrain/rest/realspace/datas/info/data/path", - name: 'STK地形', - thumbnail: './images/terrainLayers/STK_terrain.png', - title: "global.STKTerrain", - type: 'STKTerrain', - chooseType: false - } - - ] + configToken: { + TiandituToken: '', // 天地图token + BingMapKey: '' // 必应地图key }, + // 添加数据所用到的三类在线服务 + layerServiceData: layerServiceData, layerTreeData: [ { key: "1", - label: GlobalLang.s3mLayer, + label: $t('s3mLayer'), children: [] }, { key: "2", - label: GlobalLang.imgLayer, + label: $t('imgLayer'), children: [] }, { key: "3", - label: GlobalLang.mvtLayer, + label: $t('mvtLayer'), children: [] }, { key: "4", - label: GlobalLang.terrainLayer, + label: $t('terrainLayer'), children: [] }, ], + layerTreeAlias:{ + s3mLayer:{}, + imgLayer:{}, + mvtLayer:{}, + terrainLayer:{} + }, MVTLayerNameList: [], // 用来存储添加到场景中MVT图层的名称,在删除MVT图层时会用到 SelectedOptions: { // 用来存储已添加到场景中的服务(名称) publicService: [], baseMap: [], onlineTerrain: [], }, - skyBoxShow: false, - layerChangeCount: 0, - s3mLayerSelectIndex: 0, - layerQueryOptions: [], - mapQueryOptions: [], - mediaFeildOptions:{ - "img":{}, - "video":{} + skyBoxShow: false, // 是否显示天空盒 + layerChangeCount: 0, // 图层一旦改变,改值++,通常用于监听图层变化 + s3mLayerSelectIndex: 0, // 当前选择的s3m图层索引 + layerQueryOptions: [], // s3m图层属性查询 + mapQueryOptions: [], // 地图查询保存 + mediaFeildOptions: { // 地图查询-媒体字段保存 + "img": {}, + "video": {} }, + // 图层属性 sceneAttrState: { earthShow: true, //地球显隐 - shadow: true, //场景阴影 + shadow: false, //场景阴影 sunShow: false, //太阳 depthInspection: true,//深度检测 atomsphereRender: true, //大气渲染 fogEffect: false, //雾化效果 - cloudLayer: true,//云层 + cloudLayer: false,//云层 skyBoxShow: false,//天空盒 timeAxis: false,//时间轴 displayFrame: false,//显示帧率 showUnderground: false,// 显示地下 surfaceTransparency: 1,//地表透明度 - + brightness: 1,// 亮度 contrast: 1,// 对比度 hue: 0,// 色调 saturation: 1,// 饱和度 }, - particleOptions:{ //粒子特效保存 - fire:null, - water:null, - fireWork:null, + particleOptions: { //粒子特效保存 + fire: null, + water: null, + fireWork: null, }, - layerStyleOptions:{}, // 图层风格保存 - isDisplayBubble:false, // 是否显示弹窗 - wmtsLayerOption:{} + layerStyleOptions: {}, // 图层风格保存 + isDisplayBubble: false, // 是否显示弹窗 + wmtsLayerOption: [] // Wmts图层保存 }), - getters: { - }, + getters: {}, actions: { // 更新图层 updateLayer(option: any) { @@ -345,8 +91,11 @@ export const useLayerStore = defineStore({ case "s3m": this.layerTreeData[0].children = []; viewer.scene.layers._layerQueue.forEach((S3Mlayer: any, index: string) => { + let label = this.checkLayerAlias(S3Mlayer.name,'s3m'); this.layerTreeData[0].children.push({ - label: S3Mlayer.name, + label: label, + aliasKey:S3Mlayer.name, + bindName:S3Mlayer.bindName, key: "1-" + String(index), type: "s3m", children: undefined, @@ -362,8 +111,11 @@ export const useLayerStore = defineStore({ if (imageryLayerName === 'Unnamed') return; let flag = this.checkImageryRepeat(imageryLayerName); if (!flag) { + let label = this.checkLayerAlias(imageryLayerName,'imagery'); this.layerTreeData[1].children.push({ - label: imageryLayerName, + label: label, + aliasKey:imageryLayerName, + bindName:imageryLayer.bindName || '', key: "2-" + String(index), type: "imagery", children: undefined, @@ -376,8 +128,11 @@ export const useLayerStore = defineStore({ case "mvt": this.layerTreeData[2].children = []; viewer.scene._vectorTileMaps._layerQueue.forEach((MVTlayer: any, index: string) => { + let label = this.checkLayerAlias(MVTlayer.name,'mvt'); this.layerTreeData[2].children.push({ - label: MVTlayer.name, + label: label, + aliasKey: MVTlayer.name, + bindName:MVTlayer.bindName, key: '3-' + String(index), type: 'mvt', children: undefined, @@ -389,9 +144,14 @@ export const useLayerStore = defineStore({ case "terrain": this.layerTreeData[3].children = []; // 地形只加一个 - if (viewer.terrainProvider.name) { + // if (viewer.terrainProvider.name) { + let terrainLayerName = this.getTerrainLayerName(); + if (terrainLayerName != 'invisible') { + let label = this.checkLayerAlias(terrainLayerName,'terrain'); this.layerTreeData[3].children.push({ - label: option.label, + label: label, + aliasKey: option.label, + bindName: viewer.terrainProvider.bindName || '', key: "4-0", type: "terrain", children: undefined, @@ -406,41 +166,45 @@ export const useLayerStore = defineStore({ // 专门处理地形 let terrainLayerName = viewer.terrainProvider.name - if (!terrainLayerName || ['超图在线地形', '天地图地形', 'STK地形'].indexOf(terrainLayerName) === -1) { + if (!terrainLayerName || ['SuperMapOnlineTerrain', 'tiandituTerrain', 'stkTerrain'].indexOf(terrainLayerName) === -1) { this.layerServiceData.onlineTerrainLayerList.forEach((item: any) => { item.chooseType = false; }); } }, + // 刷新图层 refreshLayerTree() { this.layerTreeData = [ { key: "1", - label: GlobalLang.s3mLayer, + label: $t('s3mLayer'), children: [] }, { key: "2", - label: GlobalLang.imgLayer, + label: $t('imgLayer'), children: [] }, { key: "3", - label: GlobalLang.mvtLayer, + label: $t('mvtLayer'), children: [] }, { key: "4", - label: GlobalLang.terrainLayer, + label: $t('terrainLayer'), children: [] }, ]; // 刷新S3M图层 viewer.scene.layers._layerQueue.forEach((S3Mlayer: any, index: string) => { + let label = this.checkLayerAlias(S3Mlayer.name,'s3m'); this.layerTreeData[0].children.push({ - label: S3Mlayer.name, + label: label, + aliasKey:S3Mlayer.name, + bindName:S3Mlayer.bindName, key: "1-" + String(index), type: "s3m", children: undefined, @@ -473,8 +237,11 @@ export const useLayerStore = defineStore({ viewer.imageryLayers._layers.forEach((imageryLayer: any, index: string) => { let imageryLayerName = this.getImageryLayerName(imageryLayer); if (imageryLayerName === 'Unnamed') return; + let label = this.checkLayerAlias(imageryLayerName,'imagery'); this.layerTreeData[1].children.push({ - label: imageryLayerName, + label: label, + aliasKey:imageryLayerName, + bindName:imageryLayer.bindName || '', key: "2-" + String(index), type: "imagery", children: undefined, @@ -484,8 +251,11 @@ export const useLayerStore = defineStore({ // 刷新mvt图层 viewer.scene._vectorTileMaps._layerQueue.forEach((MVTlayer: any, index: string) => { + let label = this.checkLayerAlias(MVTlayer.name,'mvt'); this.layerTreeData[2].children.push({ - label: MVTlayer.name, + label: label, + aliasKey: MVTlayer.name, + bindName:MVTlayer.bindName, key: '3-' + String(index), type: 'mvt', children: undefined, @@ -496,8 +266,11 @@ export const useLayerStore = defineStore({ // 刷新地形图层 let terrainLayerName = this.getTerrainLayerName(); if (terrainLayerName != 'invisible') { + let label = this.checkLayerAlias(terrainLayerName,'terrain'); this.layerTreeData[3].children.push({ - label: terrainLayerName, + label: label, + aliasKey: terrainLayerName, + bindName: viewer.terrainProvider.bindName || '', key: "4-0", type: "terrain", children: undefined, @@ -505,48 +278,55 @@ export const useLayerStore = defineStore({ }); } }, + // 删除图层 removeLayer(option: any) { switch (option.type) { case "s3m": - this.layerTreeData[0].children.map((S3Mlayer: any, index: string) => { - if (S3Mlayer.key == option.key) { + this.layerTreeData[0].children.map((s3mLayerOption: any, index: string) => { + if (s3mLayerOption.key == option.key) { this.layerTreeData[0].children.splice(index, 1); - this.removePublicService(option.label); + this.removePublicService(option.bindName); } }) this.updateLayer({ type: "s3m" }); break; case "imagery": - this.layerTreeData[1].children.map((S3Mlayer: any, index: string) => { - if (S3Mlayer.key == option.key) { - let item = this.layerServiceData.onlineBaseLayerList.find((item: any) => item.title === option.label); + this.layerTreeData[1].children.map((imgLayerOption: any, index: string) => { + if (imgLayerOption.key == option.key) { + let item = this.layerServiceData.onlineBaseLayerList.find((item: any) => $t(item.name) === option.aliasKey); if (item) { item.chooseType = false; - let key = item.name; - let delIndex = this.SelectedOptions.baseMap.indexOf(key); + let delIndex = this.SelectedOptions.baseMap.indexOf(item.name); if (delIndex != -1) this.SelectedOptions.baseMap.splice(delIndex, 1); } this.layerTreeData[1].children.splice(index, 1); + + // 有些场景下存在影像或者地形的,比如珠峰地形影像需做单独处理 + if(option.bindName != '') this.removePublicService(option.bindName); } }) this.updateLayer({ type: "imagery" }); break; case "mvt": - this.layerTreeData[2].children.map((S3Mlayer: any, index: string) => { - if (S3Mlayer.key == option.key) { + this.layerTreeData[2].children.map((mvtLayer: any, index: string) => { + if (mvtLayer.key == option.key) { this.layerTreeData[2].children.splice(index, 1); - this.removePublicService(option.label); + this.removePublicService(option.bindName); } }) this.updateLayer({ type: "mvt" }); break; case "terrain": this.layerTreeData[3].children = []; - let item = this.layerServiceData.onlineTerrainLayerList.find((item: any) => item.title === option.label); - if (item) item.chooseType = false; - let index = this.SelectedOptions.onlineTerrain.indexOf(option.label); - this.SelectedOptions.onlineTerrain.splice(index, 1); + let item = this.layerServiceData.onlineTerrainLayerList.find((item: any) => $t(item.name) === option.aliasKey); + if (item) { + item.chooseType = false; + let index = this.SelectedOptions.onlineTerrain.indexOf(item.name); + this.SelectedOptions.onlineTerrain.splice(index, 1); + } + // 有些场景下存在影像或者地形的,比如珠峰地形影像需做单独处理 + if(option.bindName != '') this.removePublicService(option.bindName); this.updateLayer({ type: "terrain" }); break; default: @@ -555,38 +335,35 @@ export const useLayerStore = defineStore({ // this.updateLayer({ type: "refresh" }); }, - // 专门用来处理公共服务场景项目的删除选中 - removePublicService(layerName: string) { - let item: any; - switch (layerName) { - case "Config": - item = this.layerServiceData.publicServiceList[1]; - break; - case "BIMbuilding": - item = this.layerServiceData.publicServiceList[3]; - break; - case "POINTCLOUD23": - item = this.layerServiceData.publicServiceList[4]; - break; - case "JingJinMVT": - item = this.layerServiceData.publicServiceList[5]; - break; - case "重庆白模": - item = this.layerServiceData.publicServiceList[6]; - break; - case "横滨白模": - item = this.layerServiceData.publicServiceList[7]; - break; - default: - break; - } - if (item) { - item.chooseType = false; - let delIndex = this.SelectedOptions.publicService.indexOf(item.name); - if (delIndex != -1) this.SelectedOptions.publicService.splice(delIndex, 1); + + // 专门用来删除store上wmts服务的 + removeWmtsLayer(option) { + if (option.url && option.name) { + let items = this.wmtsLayerOption.filter((item: any) => { + return (item.wmtsLayerUrl == option.url && item.layerName == option.name); + }) + if (window.iEarthConsole) console.log("wmts-del:", items); + if (items.length == 0) return; + let delIndex = this.wmtsLayerOption.indexOf(items[0]); + this.wmtsLayerOption.splice(delIndex, 1); } + }, + + // 专门用来处理公共服务场景项目的删除选中 + removePublicService(layerBindName: string) { + // 恢复面板上的未选中状态 + let publicServiceList = this.layerServiceData.publicServiceList; + let itemIndex = publicServiceList.findIndex( + (item) => item.name == layerBindName + ); + if(itemIndex != -1) publicServiceList[itemIndex].chooseType = false; + + // 移除SelectedOptions中的对应服务 + let delIndex = this.SelectedOptions.publicService.indexOf(layerBindName); + if (delIndex != -1) this.SelectedOptions.publicService.splice(delIndex, 1); }, + // 显隐图层 isShowLayer(option: any) { switch (option.type) { @@ -622,53 +399,82 @@ export const useLayerStore = defineStore({ break; } }, - //检查影像图层是否重复添加 + + // 检查影像图层是否重复添加 checkImageryRepeat(name: string) { let item = this.layerTreeData[1].children.find((item: any) => item.label === name); - // if(item){ - // return true; - // }else{ - // return false; - // } - return item ? true : false; }, + // 检查图层是否设置了别名 + checkLayerAlias(name:string, type:string){ + let alias_result = undefined; + switch (type) { + case "s3m": + alias_result = this.layerTreeAlias.s3mLayer[name]; + break; + case "imagery": + alias_result = this.layerTreeAlias.imgLayer[name]; + break; + case "mvt": + alias_result = this.layerTreeAlias.mvtLayer[name]; + break; + case "terrain": + alias_result = this.layerTreeAlias.terrainLayer[name]; + break; + default: + break; + } + return alias_result != undefined ? alias_result : name; + }, + // 传入影像图层,获取并返回他在项目中的名称 getImageryLayerName(imageryLayer: any) { let imageUrl = imageryLayer._imageryProvider.url || imageryLayer._imageryProvider._url; - if (!imageUrl) return GlobalLang.lnglatMap; + if (!imageUrl) return $t('lnglatMap'); - if (imageUrl.indexOf("earth-skin.jpg") != -1) { - return GlobalLang.defaultImage; + if (imageUrl.indexOf("earth-skin2.jpg") != -1) { + return $t('defaultImage'); } // 项目底图 let targetItem = this.layerServiceData.onlineBaseLayerList.find((item: any) => item.url === imageUrl) if (targetItem) { - if(targetItem.type_ja){ - return GlobalLang[targetItem.type_ja]; - }else{ - return GlobalLang[targetItem.type]; + if (targetItem.type_ja) { + return $t(targetItem.type_ja); + } else { + return $t(targetItem.type); } - } + } if (imageUrl && imageUrl.indexOf("realspace/datas/") != -1) { let otherImageLayerName = imageUrl.split('realspace/datas/')[1].replace('/', ''); return otherImageLayerName; } - + // 网络底图 if (imageryLayer._imageryProvider.tablename) { let tableName = imageryLayer._imageryProvider.tablename; if (tableName.indexOf('http') === -1) { + if (tableName.indexOf('/rest/maps/') != -1) { + let name = tableName.split('/rest/maps/')[1]; + if (name.indexOf('%') != -1) { + let str = decodeURIComponent(name); + if (str.indexOf('@')) { + let newName = str.split('@')[0]; + return newName; + } + } else { + return name; + } + } if (tableName.indexOf('%') != -1) { let newName = tableName.split('%')[0]; return newName; } // 支持地图服务 - if(tableName.indexOf('/maps/') != -1) { + if (tableName.indexOf('/maps/') != -1) { let newName = tableName.split('/maps/')[1].replace('/', ''); return newName; } @@ -676,16 +482,17 @@ export const useLayerStore = defineStore({ } else { return 'Unnamed'; } - }else { + } else { return 'Unnamed'; } }, + // 获取地形图层名称 getTerrainLayerName(): any { if (window.viewer.terrainProvider._baseUrl) { let baseUrl = window.viewer.terrainProvider._baseUrl if (baseUrl.indexOf('3D-stk_terrain') != -1) { - return GlobalLang.stkTerrain; + return $t('stkTerrain'); } else { if (baseUrl.indexOf('supermapol.com') != -1) { return baseUrl.split('realspace/services/')[1].split('/rest/realspace')[0]; @@ -700,9 +507,9 @@ export const useLayerStore = defineStore({ } else if (window.viewer.terrainProvider._urls) { let url0 = window.viewer.terrainProvider._urls[0] if (url0.indexOf('supermapol.com') != -1) { - return GlobalLang.superMapTerrain; + return $t('superMapTerrain'); } else { - return GlobalLang.tiandituTerrain;; // viewer.terrainProvider._urls[0].indexOf('tianditu') 看情况在加 + return $t('tiandituTerrain');; // viewer.terrainProvider._urls[0].indexOf('tianditu') 看情况在加 } } else { // return '标准椭球' @@ -713,7 +520,7 @@ export const useLayerStore = defineStore({ // 更新已勾选选项 updateSelectedOption(selectedOption: any) { - console.log("selectedOption:", selectedOption); + // console.log("selectedOption:", selectedOption); this.SelectedOptions = selectedOption; let publicServiceList = this.layerServiceData.publicServiceList; let onlineBaseLayerList = this.layerServiceData.onlineBaseLayerList; @@ -740,19 +547,16 @@ export const useLayerStore = defineStore({ onlineTerrainLayerList[i].chooseType = true; } } - - console.log(" this.layerServiceData:", this.layerServiceData); }, // 设置当前场景属性 setSceneAttr(sceneAttrState: any) { - // console.log("content.layers.sceneAttrState:", sceneAttrState); for (let key in sceneAttrState) { - this.sceneAttrSwitch(key,sceneAttrState[key]); + this.sceneAttrSwitch(key, sceneAttrState[key]); } }, - sceneAttrSwitch(key: string, value: boolean|number) { + sceneAttrSwitch(key: string, value: boolean | number) { switch (key) { case "atomsphereRender": window.viewer.scene.skyAtmosphere.show = value; @@ -804,15 +608,15 @@ export const useLayerStore = defineStore({ window.viewer.scene.colorCorrection.brightness = value; break; case "contrast": - window.viewer.scene.colorCorrection.show = true; + window.viewer.scene.colorCorrection.show = true; window.viewer.scene.colorCorrection.contrast = value; break; case "hue": - window.viewer.scene.colorCorrection.show = true; + window.viewer.scene.colorCorrection.show = true; window.viewer.scene.colorCorrection.hue = value; break; case "saturation": - window.viewer.scene.colorCorrection.show = true; + window.viewer.scene.colorCorrection.show = true; window.viewer.scene.colorCorrection.saturation = value; break; case "surfaceTransparency": @@ -825,11 +629,11 @@ export const useLayerStore = defineStore({ setParticle(particleOptions) { if (particleOptions['fire'] != null) { let fireOption = particleOptions['fire']; - this.addParticleFile(fireOption,'fire'); + this.addParticleFile(fireOption, 'fire'); } if (particleOptions['water'] != null) { let waterOption = particleOptions['water']; - this.addParticleFile(waterOption,'water'); + this.addParticleFile(waterOption, 'water'); } if (particleOptions['fireWork'] != null) { let fireWorkOption = particleOptions['fireWork']; @@ -837,13 +641,13 @@ export const useLayerStore = defineStore({ } }, // 添加场景中已保存的粒子 - addParticleFile(options:any,type:string) { + addParticleFile(options: any, type: string) { let modelMatrix_fire = new SuperMap3D.Matrix4(); SuperMap3D.Transforms.eastNorthUpToFixedFrame(options.particlePosition, undefined, modelMatrix_fire); - this.loadParticleFile(options.particleUrl, modelMatrix_fire,type,options.particleAttr); + this.loadParticleFile(options.particleUrl, modelMatrix_fire, type, options.particleAttr); }, // 加载粒子文件 - loadParticleFile(url:string,modelMatrix:any,type:string, option?:any) { + loadParticleFile(url: string, modelMatrix: any, type: string, option?: any) { let particle: any = {}; let scene = window.viewer.scene; SuperMap3D.ParticleHelper.fromJsonUrl(url, scene).then(function (particleSystem) { @@ -854,41 +658,41 @@ export const useLayerStore = defineStore({ for (let key in option) { switch (key) { case "emitRate": - particle['emitRate'] = Number(option[key]); - break; + particle['emitRate'] = Number(option[key]); + break; case "minLifeTime": - particle['minLifeTime'] = Number(option[key]); - break; + particle['minLifeTime'] = Number(option[key]); + break; case "maxLifeTime": - particle['maxLifeTime'] = Number(option[key]); - break; + particle['maxLifeTime'] = Number(option[key]); + break; case "minEmitPower": - particle['minEmitPower'] = Number(option[key]); - break; + particle['minEmitPower'] = Number(option[key]); + break; case "maxEmitPower": - particle['maxEmitPower'] = Number(option[key]); - break; + particle['maxEmitPower'] = Number(option[key]); + break; case "minSize": - particle['minSize'] = Number(option[key]); - break; + particle['minSize'] = Number(option[key]); + break; case "maxSize": - particle['maxSize'] = Number(option[key]); - break; + particle['maxSize'] = Number(option[key]); + break; case "minScaleX": - particle['minScaleX'] = Number(option[key]); - break; + particle['minScaleX'] = Number(option[key]); + break; case "minScaleY": - particle['minScaleY'] = Number(option[key]); - break; + particle['minScaleY'] = Number(option[key]); + break; case "maxScaleX": - particle['maxScaleX'] = Number(option[key]); - break; + particle['maxScaleX'] = Number(option[key]); + break; case "maxScaleY": - particle['maxScaleY'] = Number(option[key]); - break; + particle['maxScaleY'] = Number(option[key]); + break; case "gravity": - particle.gravity= new SuperMap3D.Cartesian3(0, 0, Number(option[key])); - break; + particle.gravity = new SuperMap3D.Cartesian3(0, 0, Number(option[key])); + break; case "emitType": switch (option[key]) { case "Cone": @@ -902,34 +706,34 @@ export const useLayerStore = defineStore({ let direction2 = new SuperMap3D.Cartesian3(1, 1, -1); let minBox = new SuperMap3D.Cartesian3(-10, 0, -10); let maxBox = new SuperMap3D.Cartesian3(10, 0, 10); - particle.createBoxEmitter(direction1, direction2, minBox, maxBox); - break; + particle.createBoxEmitter(direction1, direction2, minBox, maxBox); + break; } - break; + break; default: - break; - } + break; + } } } window.EarthGlobal[type] = particle; }); - }, + // 添加烟花 - addFireWork(fireWorkOption){ + addFireWork(fireWorkOption) { let modelMatrix = new SuperMap3D.Matrix4(); - let clickHandle, setIntervalList:any[] = [],particleSystemList:any[] = []; + let clickHandle, setIntervalList: any[] = [], particleSystemList: any[] = []; let scene = window.viewer.scene; scene.skyAtmosphere = new SuperMap3D.SkyAtmosphere(); scene.globe.show = false scene.skyAtmosphere.show = false; //关闭大气 - + let sparkOneUrl = './Resource/particle/babylon/sparkGravityOne.json'; let sparkTwoUrl = './Resource/particle/babylon/sparkGravityTwo.json'; let sparkThreeUrl = './Resource/particle/babylon/sparkGravityThree.json'; let sparkFourUrl = './Resource/particle/babylon/sparkGravityFour.json'; - + let numberOfSparks = 8; let xMin = -2100.0; let xMax = 300.0; @@ -939,79 +743,80 @@ export const useLayerStore = defineStore({ let zMax = 550.0; // 创建烟花 let sparkInterval = (xMax - xMin) / numberOfSparks; - + function createSpark() { - for (let i = 0; i < numberOfSparks; ++i) { - let x = SuperMap3D.Math.randomBetween(xMin + i * sparkInterval, xMin + (i + 1) * sparkInterval); - let y = SuperMap3D.Math.randomBetween(yMin, yMax); - let z = SuperMap3D.Math.randomBetween(zMin, zMax); - let offset = new SuperMap3D.Cartesian3(x, y, z); - let url = ''; - if (i % 4 === 0) - url = sparkOneUrl; - if (i % 4 === 1) - url = sparkTwoUrl; - if (i % 4 === 2) - url = sparkThreeUrl; - if (i % 4 === 3) - url = sparkFourUrl; - SuperMap3D.ParticleHelper.fromJsonUrl(url, scene).then(function (particleSystem) { - settingParticleSys(particleSystem, offset, i); - }); - } + for (let i = 0; i < numberOfSparks; ++i) { + let x = SuperMap3D.Math.randomBetween(xMin + i * sparkInterval, xMin + (i + 1) * sparkInterval); + let y = SuperMap3D.Math.randomBetween(yMin, yMax); + let z = SuperMap3D.Math.randomBetween(zMin, zMax); + let offset = new SuperMap3D.Cartesian3(x, y, z); + let url = ''; + if (i % 4 === 0) + url = sparkOneUrl; + if (i % 4 === 1) + url = sparkTwoUrl; + if (i % 4 === 2) + url = sparkThreeUrl; + if (i % 4 === 3) + url = sparkFourUrl; + SuperMap3D.ParticleHelper.fromJsonUrl(url, scene).then(function (particleSystem) { + settingParticleSys(particleSystem, offset, i); + }); + } } - + // 设置当前粒子系统 function settingParticleSys(particleSystem, offset, index) { - - // 添加多个 - particleSystem.modelMatrix = modelMatrix; - particleSystem.worldOffset.x = offset.x; - particleSystem.worldOffset.y = offset.y; - particleSystem.worldOffset.z = offset.z; - let setIntervalFlag = setInterval(() => { - particleSystem.start(); - }, 2000 + index * 50); - scene.primitives.add(particleSystem); - setIntervalList.push(setIntervalFlag); - - window.EarthGlobal["fireWork"] = setIntervalList; + + // 添加多个 + particleSystem.modelMatrix = modelMatrix; + particleSystem.worldOffset.x = offset.x; + particleSystem.worldOffset.y = offset.y; + particleSystem.worldOffset.z = offset.z; + let setIntervalFlag = setInterval(() => { + particleSystem.start(); + }, 2000 + index * 50); + scene.primitives.add(particleSystem); + setIntervalList.push(setIntervalFlag); + + window.EarthGlobal["fireWork"] = setIntervalList; } - - function addSpark(centerPosition){ - SuperMap3D.Transforms.eastNorthUpToFixedFrame(centerPosition, undefined, modelMatrix); - createSpark(); + + function addSpark(centerPosition) { + SuperMap3D.Transforms.eastNorthUpToFixedFrame(centerPosition, undefined, modelMatrix); + createSpark(); } addSpark(fireWorkOption.fireWorkPosition); }, - - removeParticle(){ - if(window.EarthGlobal["fire"]){ + + removeParticle() { + if (window.EarthGlobal["fire"]) { window.viewer.scene.primitives.remove(window.EarthGlobal["fire"]); } - if(window.EarthGlobal["water"]){ + if (window.EarthGlobal["water"]) { window.viewer.scene.primitives.remove(window.EarthGlobal["fire"]); } }, // 设置保存的图层属性 - setLayerStyle(layerStyleOptions){ - console.log("layerStyleOptions:",layerStyleOptions); + setLayerStyle(layerStyleOptions) { + if (window.iEarthConsole) console.log("layerStyleOptions:", layerStyleOptions); let keys = Object.keys(layerStyleOptions); - for(let i=0;i<keys.length;i++){ + for (let i = 0; i < keys.length; i++) { let layerName = keys[i]; let layerStyleOption = layerStyleOptions[layerName]; let currentLayer = window.viewer.scene.layers.find(layerName); - if(!currentLayer) return; + if (!currentLayer) return; for (let key in layerStyleOption) { let lineColor = layerStyleOption["lineColor"]; - this.layerStyleSwitch(currentLayer,key,layerStyleOption[key],lineColor); + this.layerStyleSwitch(currentLayer, key, layerStyleOption[key], lineColor); } } }, - layerStyleSwitch(currentLayer:any, key: string, value: string|number,lineColor:string) { + // 设置图层风格 + layerStyleSwitch(currentLayer: any, key: string, value: string | number, lineColor: string) { switch (key) { case "foreColor": currentLayer.style3D.fillForeColor = SuperMap3D.Color.fromCssColorString(value); @@ -1054,47 +859,47 @@ export const useLayerStore = defineStore({ break; default: break; - } - + } }, - // // 设置configtoken - // setConfigToken(field:string,value:string){ - // } - // 设置wmts服务 - setWmts(wmtsLayerOption){ - if(JSON.stringify(wmtsLayerOption) === '{}') return; - let rectangle = wmtsLayerOption.rectangle; - let wmtsLayer = viewer.imageryLayers.addImageryProvider(new SuperMap3D.WebMapTileServiceImageryProvider({ - url: wmtsLayerOption.wmtsLayerUrl, - style: "default", - format: 'image/png', - layer: wmtsLayerOption.layerName, - tileMatrixSetID: wmtsLayerOption.tileMatrixSetID, - tilingScheme: new SuperMap3D.GeographicTilingScheme({ - rectangle: SuperMap3D.Rectangle.fromDegrees(rectangle[0], rectangle[1], rectangle[2], rectangle[3]), - //ellipsoid: SuperMap3D.Ellipsoid.WGS84, - //numberOfLevelZeroTilesX: 1, - //numberOfLevelZeroTilesY: 1, - scaleDenominators: wmtsLayerOption.scaleDenominatorsList, - customDPI: new SuperMap3D.Cartesian2(90.7142857142857, 90.7142857142857), - }), - })); - - // wmtsLayer.alpha = 0.5; - viewer.flyTo(wmtsLayer); - } - } -}) - - - - - - - - - + setWmts(wmtsLayerOptionList: any) { + if (wmtsLayerOptionList.length == 0) return; + wmtsLayerOptionList.forEach((item: any) => { + let wmtsLayer = viewer.imageryLayers.addImageryProvider(new SuperMap3D.WebMapTileServiceImageryProvider({ + url: item.wmtsLayerUrl, + style: "default", + format: 'image/png', + layer: item.layerName, + tileMatrixSetID: item.tileMatrixSetID, + tilingScheme: new SuperMap3D.GeographicTilingScheme({ + rectangle: item.wmtsRectangle, + scaleDenominators: item.scaleDenominatorsList, + customDPI: new SuperMap3D.Cartesian2(90.7142857142857, 90.7142857142857), + }), + tileMatrixLabels: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"]  // 设置加载的层级,一般是从0级开始加载,但是有的特殊数据是从1级开始加的 + })); + if (!item.wmtsImageLayerPosition) { + viewer.flyTo(wmtsLayer); + } else { + let wmtsImageLayerPosition = item.wmtsImageLayerPosition; + wmtsLayer.wmtsImageLayerPosition = wmtsImageLayerPosition; + viewer.scene.camera.flyTo({ + destination: new SuperMap3D.Cartesian3.fromDegrees(wmtsImageLayerPosition.lng, wmtsImageLayerPosition.lat, wmtsImageLayerPosition.height), + duration: 1, + orientation: { + heading: 0, + roll: 0, + }, + }); + } + }) + }, + // 设置图层列表的别名 + setLayerTreeAlias(LayerAliasOptions:any){ + this.layerTreeAlias = LayerAliasOptions; + }, + } +}) \ No newline at end of file diff --git a/SuperMap iEarth/src/store/panelStore/index.ts b/SuperMap iEarth/src/store/panelStore/index.ts index 0de3c0e0..93eb5745 100644 --- a/SuperMap iEarth/src/store/panelStore/index.ts +++ b/SuperMap iEarth/src/store/panelStore/index.ts @@ -1,6 +1,5 @@ import { defineStore } from 'pinia' - export const usePanelStore = defineStore({ id: 'usePanelStore', state: (): any => ({ @@ -11,14 +10,14 @@ export const usePanelStore = defineStore({ { id: 1, iconName: "icontuceng", - title: "global.t_layerList", + title: "t_layerList", isSelected: false, panelName: "LayerList" }, { id: 2, iconName: "icontianjia", - title: "global.t_addData", + title: "t_addData", isSelected: false, panelName: "AddLayerData" }, @@ -26,77 +25,84 @@ export const usePanelStore = defineStore({ rightToolBarList: [ { id: 3, - iconName: "iconfenxi", - title: "global.analyseSeries", + iconName: "iconsanweifenxi", + title: "analyseSeries", isSelected: false, panelName: "Analyse3D" }, { id: 4, iconName: "iconliangsuan", - title: "global.measure", + title: "measure", isSelected: false, panelName: "Measure" }, { id: 5, iconName: "iconkapianshi", - title: "global.sceneProperties", + title: "sceneProperties", isSelected: false, panelName: "SceneSet" }, { id: 6, - iconName: "iconhuizhi", - title: "global.objectPainting", + iconName: "iconduixianghuizhi", + title: "objectPainting", isSelected: false, panelName: "ObjectPainting" }, { id: 7, iconName: "iconhuizhi", - title: "global.layerOpration", + title: "layerOpration", isSelected: false, panelName: "layerOpration" }, { id: 8, iconName: "iconhuizhi", - title: "global.layerAttribute", + title: "layerAttribute", isSelected: false, panelName: "layerAttr" }, { id: 9, iconName: "iconhuizhi", - title: "global.layerStyle", + title: "layerStyle", isSelected: false, panelName: "layerStyle" }, { id: 10, iconName: "iconhuizhi", - title: "global.layerQuery", + title: "layerQuery", isSelected: false, panelName: "layerQuery" }, { id: 11, iconName: "iconhuizhi", - title: "global.mapQuery", + title: "mapQuery", isSelected: false, panelName: "mapQuery" }, + { + id: 12, + iconName: "iconhuizhi", + title: "qxSingle", + isSelected: false, + panelName: "qxSingle" + }, ] }, rightTooPanel: false, leftTooPanel: false, showSceneModal: false, - showSavePanel:false, // 保存面板是否显示 - isEditMode:false, // iportal中用来控制保存面板的与showSavePanel搭配使用,以便适应不同环境 + showSavePanel: false, // 保存面板是否显示 + isEditMode: false, // iportal中用来控制保存面板的与showSavePanel搭配使用,以便适应不同环境 // isViewer:false, // Cesium.Viewer这个东西初始化完成的标志 - myDataPanleShow:false,// 我的数据面板 - queryData:[],// 通过我的数据查询到的要素记录 + myDataPanleShow: false,// 我的数据面板 + queryData: [],// 通过我的数据查询到的要素记录 }), getters: { }, @@ -115,21 +121,21 @@ export const usePanelStore = defineStore({ // 设置右侧导航栏 setRightToolBarList(iconItem: any) { // 每次切换,先将所有面板关闭 - this.panelList.rightToolBarList.map((item:any) => { + this.panelList.rightToolBarList.map((item: any) => { item.isSelected = false; }) // 确保所有面板能全部刷新 - setTimeout(()=>{ + setTimeout(() => { this.rightTooPanel = true; - this.panelList.rightToolBarList.map((item:any) => { + this.panelList.rightToolBarList.map((item: any) => { if (item.id == iconItem.id) { item.isSelected = true; } else { item.isSelected = false; } }) - },10) + }, 10) }, // 关闭弹窗面板 closeRightToolPanel(leftOrRght: any) { @@ -144,22 +150,10 @@ export const usePanelStore = defineStore({ item.isSelected = false; }) } - }, // 设置保存场景弹窗 setSceneModal(isShow: Boolean) { this.showSceneModal = isShow; } } -}) - - - - - - - - - - - +}) \ No newline at end of file diff --git a/SuperMap iEarth/src/styles/index.scss b/SuperMap iEarth/src/styles/index.scss index 9ac4ff1d..2c6045c7 100644 --- a/SuperMap iEarth/src/styles/index.scss +++ b/SuperMap iEarth/src/styles/index.scss @@ -1,317 +1,367 @@ @import './scss/sm-variables.scss'; @import './scss/sm-mixin.scss'; -// @import './scss/sm-format.scss'; -// @import './scss/sm-function.scss'; -html, body,#app{ - height: 100%; - width: 100%; - margin: 0; - padding: 0; + +html, +body, +#app { + height: 100%; + width: 100%; + margin: 0; + padding: 0; } + .n-config-provider { - height: 100%; -} -.n-layout.n-layout--static-positioned{ - height: 100%; + height: 100%; } -.row-container { - width: 100%; - max-height: 3rem; - overflow-y: hidden; - // overflow-y: scroll; - - /* 移除滚动条 */ - &::-webkit-scrollbar { - background: none; - display: none; - } - &::-webkit-scrollbar-thumb { - background: none; - display: none; - } +.n-layout.n-layout--static-positioned { + height: 100%; } +// 横向布局:class = "row-item" .row-item { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 0.11rem; + // font-size: 14px; // number-input的罪魁祸首 + font-size: 0.14rem; + + span, + div { + font-size: 0.14rem; + } + + .check-color-pick { + width: 1.96rem; + height: 0.33rem; display: flex; align-items: center; justify-content: space-between; - margin-bottom: 0.11rem; - font-size: 14px; - - .check-color-pick { - width: 1.96rem; - height: 0.33rem; - display: flex; - align-items: center; - justify-content: space-between; - - .color-pick-box{ - margin-left: 0.1rem; - } - } - .check-box { - width: 1.96rem;height: 0.32rem; - display: flex; - align-items: center; - justify-content: space-between; - } - .slider-box { - display: flex; - justify-content: space-between; - align-items: center; - width: 1.76rem; - height: 0.32rem; - padding: 0 .1rem; - border-radius: 0.04rem; - background: rgba(255, 255, 255, 0.04); - // box-sizing: border-box; - border: 1px solid rgba(255, 255, 255, 0.15); - - // .slider-suffix{ - // display: flex; - // justify-content: space-between; - // align-items: center; - // } - .slider-unit{ - margin-left: 0.1rem; - } + .color-pick-box { + margin-left: 0.1rem; } + } - .radio-group { - display: flex; - justify-content: space-between; - align-items: center; - width: 1.96rem; - height: 0.32rem; - } + .check-box { + width: 1.96rem; + height: 0.32rem; + display: flex; + align-items: center; + justify-content: space-between; + } - .row-slider-num { - width: .3rem; - display: flex; - justify-content: space-between; - } + .slider-box { + display: flex; + justify-content: space-between; + align-items: center; + width: 1.76rem; + height: 0.32rem; + padding: 0 .1rem; + border-radius: 0.04rem; + background: rgba(255, 255, 255, 0.04); + // box-sizing: border-box; + border: 0.01rem solid rgba(255, 255, 255, 0.15); - .row-content{ - width: 1.96rem; - height: 0.33rem; + .slider-unit { + margin-left: 0.1rem; } -} - -// .row-item-radio-group { -// display: flex; -// align-items: center; -// // justify-content: space-between; -// margin-bottom: 0.11rem; -// font-size: 14px; + } -// .radio-group { -// margin-left: .4rem; -// } -// } + .radio-group { + display: flex; + justify-content: space-between; + align-items: center; + width: 1.96rem; + height: 0.32rem; + } -//控制三个按钮时,排列方式 -.btn-row-item2 { + .row-slider-num { + width: .3rem; display: flex; - justify-content: right; - - button { - display: block; - } + justify-content: space-between; + } + + .row-content { + width: 1.96rem; + height: 0.33rem; } - -.btn-row-item1 { - margin-left: 0.60rem; - // margin-top: -0.1rem; - .ans-btn { - margin-right: .08rem; - } } + +// slinder滑块的统一样式 +.slider-input-number { + width: 27%; + margin: 0rem -0.1rem 0rem 0.08rem; + border: none !important; + height: auto; + outline: medium; + text-align: center; +} + +.slider-input-number .n-input { + background-color: transparent !important; +} + +//操作按钮样式:2个 .btn-row-item { - margin-left: 1.2rem; - // margin-top: -0.1rem; - .ans-btn { - margin-right: .08rem; - } + margin-left: 1.15rem; + + .ans-btn { + margin-right: .08rem; + } } +//操作按钮样式:3个 +.btn-row-item2 { + display: flex; + justify-content: right; -.btn-secondary { - // color: rgba(255, 255, 255, 0.65); - // border: 1px solid rgba(255, 255, 255, 0.65); - :hover { - color: #5EB7F2 !important; - } + button { + display: block; + } } -.n-input { - height:0.32rem; - .n-input__input-el{ - line-height: 0.32rem; - } + +// 操作按钮-第二个按钮(清除)样式 +.btn-secondary { + :hover { + color: #5EB7F2 !important; + } } + // 设置数字输入框 .n-input-number { - border: 1px solid rgba(255, 255, 255, 0.15); - border-radius: 4px; + border: 0.01rem solid rgba(255, 255, 255, 0.15); + border-radius: 0.04rem; } + .n-input-border { - border: 1px solid rgba(255, 255, 255, 0.15) ; - border-radius: 4px; + border: 0.01rem solid rgba(255, 255, 255, 0.15); + border-radius: 0.04rem; } + .add-input-border { - border: 1px solid rgba(255, 255, 255, 0.15) ; - border-radius: 4px; + border: 0.01rem solid rgba(255, 255, 255, 0.15); + border-radius: 0.04rem; } -.n-button { - font-size: 16px; - height: 0.32rem !important; + +// 颜色选择器(色带)的相关样式 +.color-pick-box { + width: 1.96rem; + height: 0.33rem; + border-radius: 0.04rem; + background: rgba(255, 255, 255, 0.04); + box-sizing: border-box; + border: 0.01rem solid rgba(255, 255, 255, 0.15); + display: flex; + align-items: center; + padding: 0 0.12rem; + margin-left: .38rem; } + .n-color-picker-trigger__fill { - height: 8px; - top: 10px !important; - bottom: 10px !important; + // 色带的固定尺寸 + // height: 0.08rem; + height: 0.08rem; + top: 0.1rem !important; + bottom: 0.1rem !important; } -.n-dropdown-menu{ - box-sizing: border-box; - width: 1.16rem; - border: 1px solid; - border-radius: 0px; - border-image: radial-gradient(67% 67% at 50% 50%, #CAE6FF 0%, rgba(202,230,255,0.00) 99%) 1; - box-shadow: inset 0px 0px 6px -2px rgba(118, 194, 252, 0.35),inset 0px 0px 6px 0px rgba(173, 216, 255, 0.15); - background: linear-gradient(0deg, rgba(202, 230, 255, 0.08), rgba(202, 230, 255, 0.08)), rgba(0, 8, 23, 0.7); - .n-dropdown-option-body__label{ - font-size: 0.12rem; - } +.color-pick-box-full { + width: 1.96rem; } -.color-pick-box { - width: 1.96rem; - height: 0.33rem; - border-radius: 0.04rem; - background: rgba(255, 255, 255, 0.04); - box-sizing: border-box; - border: 1px solid rgba(255, 255, 255, 0.15); - display: flex; - align-items: center; - padding: 0 0.12rem; - margin-left: .38rem; - // .color-pick-box-container{ - // height: 18px; - // } + +// 面板上图标的排列样式等 +.icon-list { + display: flex; + width: 1.96rem; + height: 0.32rem; + line-height: 0.32rem; + text-align: center; + background: rgba(255, 255, 255, 0.04); + border: 0.01rem solid rgba(255, 255, 255, 0.15); + border-radius: 0.04rem; + + .icon-span { + width: 33%; + display: inline-block; + text-align: center; + cursor: pointer; + } + + .selected-icon { + color: #3499e5; + } } -.color-pick-box-full{ - width: 1.96rem; +// 小品绘制线面的大量图标的排列样式 +.icon-list-space { + width: 2.2rem; + height: auto; + background: rgba(255, 255, 255, 0.04); + border: 0.01rem solid rgba(255, 255, 255, 0.15); + border-radius: 0.04rem; + + .icon-span { + width: 33%; + display: inline-block; + text-align: center; + cursor: pointer; + } + + .icon-span-four { + width: 25%; + display: inline-block; + text-align: center; + cursor: pointer; + } + + .icon-span-six { + width: 22%; + display: inline-block; + text-align: center; + cursor: pointer; + } + + .selected-icon { + color: #3499e5; + } } -.icon-list { - display: flex; - // justify-content: center; - // height: 0.32rem; - width: 1.96rem; - height: 0.32rem; - background: rgba(255, 255, 255, 0.04); - border: 0.01rem solid rgba(255, 255, 255, 0.15); - border-radius: 0.04rem; +// 界面上引用图标的大小-基于font-size +.iconfont { + font-size: 0.18rem; +} - .icon-span { - width: 33%; - display: inline-block; - text-align: center; - cursor: pointer; - } +// 单独控制一些特殊的图标 +.iconSize { + display: block; + margin: 0.02rem; + font-size: 0.2rem; +} - .selected-icon { - color: #3499e5; - } +:deep(.n-scrollbar-rail--vertical) { + right: 0rem !important; + width: 0.08rem !important; } -.icon-list-space { - // display: flex; - // justify-content: center; - // height: 0.32rem; - width: 2.2rem; - height: auto; - background: rgba(255, 255, 255, 0.04); - border: 0.01rem solid rgba(255, 255, 255, 0.15); - border-radius: 0.04rem; - .icon-span { - width: 33%; - display: inline-block; - text-align: center; - cursor: pointer; - } +// 保存面板 按钮居中 +.n-form-item-blank { + display: flex; + justify-content: center; +} - .icon-span-four { - width: 25%; - // display: flex; - display: inline-block; - text-align: center; - cursor: pointer; - } - .icon-span-six { - width: 22%; - // display: flex; - display: inline-block; - text-align: center; - cursor: pointer; - } +// 面板上选项tab-items的颜色 +.n-tabs-tab__label { + color: rgba(255, 255, 255, 0.65); +} - .selected-icon { - color: #3499e5; - } +//slider样式 +.n-slider-handle { + background-color: #414141 !important; + border: 1.5px solid #3499E5 !important; } -.iconfont{ - font-size: 0.18rem; + +//图层面板小三角 +.n-tree-node-switcher { + margin-left: 0.06rem; } -.iconSize{ - display: block; - // height: 0.22rem; - // width: 0.22rem; - margin: 2px; - // scale: 1.6; - font-size: .22rem; - } - :deep(.n-scrollbar-rail--vertical) { - right: 0px !important; - width: 8px !important; - } - // 保存面板 按钮居中 - .n-form-item-blank{ - display: flex; - justify-content: center; - } - .n-tabs-tab__label{ - color: rgba(255, 255, 255, 0.65); +.n-tabs-tab--active { + .n-tabs-tab__label { + color: rgba(255, 255, 255, 0.85); } - //slider样式 - .n-slider-handle{ - background-color: #414141 !important; - border: 1.5px solid #3499E5 !important; +} + +// 时间控件样式 +.supermap3d-viewer-timelineContainer { + visibility: visible; + width: 100%; + left: 0rem; + right: 0rem; +} + +.n-tree-node-content__suffix>div { + display: flex; + flex-wrap: nowrap; +} + +// 添加数据面板 +.addData-data-container { + display: flex; + flex-wrap: wrap; + margin-right: 0.07rem; + + .ItemBox { + width: 30%; + // color: $--SM--FontColor-Sub; + color: rgba(255, 255, 255, 0.85); + margin-bottom: 0.07rem; + margin-right: 0.12rem; + box-sizing: border-box; + cursor: pointer; + + span { + font-size: 0.14rem; + } + + .img-box { + width: 1.06rem; + height: 0.85rem; + border-radius: 0.05rem; + overflow: hidden; + margin-bottom: 0.04rem; + + .img { + width: 100%; + height: 100%; + // object-fit: none; + object-fit: cover; // 图片不被挤压 + } + } } - //图层面板小三角 - .n-tree-node-switcher{ - margin-left:0.06rem; + .ItemBox:nth-child(3n) { + margin-right: 0; } - .n-tabs-tab--active{ - .n-tabs-tab__label{ - color: rgba(255, 255, 255, 0.85); + .isSelect { + .img-box { + border: 0.02rem solid #3499e5; } } +} + +// 地形操作飞行等切换btn的样式 +.btn-list { + width: 2.4rem; + display: flex; + cursor: pointer; + font-size: 0.14rem; - .supermap3d-viewer-timelineContainer{ - visibility: visible; - width: 100%; - z-index: 2147483647; - left: 0px; - right: 0px; + .btn { + width: 25%; + height: 0.26rem; + line-height: 0.26rem; + text-align: center; } - .n-tree-node-content__suffix > div{ - display: flex; - flex-wrap: nowrap; - } \ No newline at end of file + .select-btn { + border-radius: 0.02rem; + color: #3499e5; + background: rgba(255, 255, 255, 0.15); + } +} + +// 图层列表侧边栏-面板 +.layerSeries-box { + width: 100%; + height: 100%; + padding: 0 0.16rem; + box-sizing: border-box; +} + +// 符号库等不让他们居中的 +.no-center { + align-items: start !important; +} \ No newline at end of file diff --git a/SuperMap iEarth/src/styles/scss/sm-mixin.scss b/SuperMap iEarth/src/styles/scss/sm-mixin.scss index bcd2e6ae..4ecf7138 100644 --- a/SuperMap iEarth/src/styles/scss/sm-mixin.scss +++ b/SuperMap iEarth/src/styles/scss/sm-mixin.scss @@ -83,41 +83,41 @@ } } -// 符号集 -@mixin iconContainer($marginLeft: 0rem, $width: 1.96rem, $marginbottom: 0rem, $height: 0.32rem) { - .name { - width: 1rem; - } - - .icon-container { - width: $width; - height: $height; - background: rgba(255, 255, 255, 0.04); - margin-left: $marginLeft; - margin-bottom: $marginbottom; - - .icon-size { - font-size: 0.23rem; - } - - .icon-list { - display: flex; - // justify-content: space-between; - align-items: center; - padding: 0 0.1rem; - box-sizing: border-box; - border: 0.01rem solid rgba(255, 255, 255, 0.15); - border-radius: 0.04rem; - - .icon-span { - display: flex; - align-items: center; - } - } - - .selected-icon { - border: 1px solid #3499e5; - // background: #3499E5; - } - } -} \ No newline at end of file +// // 符号集 +// @mixin iconContainer($marginLeft: 0rem, $width: 1.96rem, $marginbottom: 0rem, $height: 0.32rem) { +// .name { +// width: 1rem; +// } + +// .icon-container { +// width: $width; +// height: $height; +// background: rgba(255, 255, 255, 0.04); +// margin-left: $marginLeft; +// margin-bottom: $marginbottom; + +// .icon-size { +// font-size: 0.23rem; +// } + +// .icon-list { +// display: flex; +// // justify-content: space-between; +// align-items: center; +// padding: 0 0.1rem; +// box-sizing: border-box; +// border: 0.01rem solid rgba(255, 255, 255, 0.15); +// border-radius: 0.04rem; + +// .icon-span { +// display: flex; +// align-items: center; +// } +// } + +// .selected-icon { +// border: 1px solid #3499e5; +// // background: #3499E5; +// } +// } +// } \ No newline at end of file diff --git a/SuperMap iEarth/src/styles/scss/sm-variables.scss b/SuperMap iEarth/src/styles/scss/sm-variables.scss index 44e72a71..ee44b624 100644 --- a/SuperMap iEarth/src/styles/scss/sm-variables.scss +++ b/SuperMap iEarth/src/styles/scss/sm-variables.scss @@ -107,7 +107,7 @@ $--margin-image-5:0.05rem; // 元素宽度 $--Min-Width:4rem; -// z-index 权重 +// 层叠权重 $--Z-Index-First:9000; $--Z-Index-Normal:1000; diff --git a/SuperMap iEarth/src/styles/variables.module.css b/SuperMap iEarth/src/styles/variables.module.css deleted file mode 100644 index ac0571ba..00000000 --- a/SuperMap iEarth/src/styles/variables.module.css +++ /dev/null @@ -1,19 +0,0 @@ -@charset "UTF-8"; -/* -* 颜色 -*/ -:export { - mainColorNormal: #3499E5; - mainColorHover: #5EB7F2; - mainColorClick: #3499E5; - funColorLink: #3499E5; - funColorSuccess: #3CAB1A; - funColorWarning: #E2CA34; - funColorError: #E04C40; - midColorNormal: rgb(255, 255, 255); - midColorSet: rgba(255, 255, 255, 0.85); - midColorHover: rgba(255, 255, 255, 0.65); - midColorTip: rgba(255, 255, 255, 0.45); - midColorDisable: rgba(255, 255, 255, 0.25); - bgUrl: ""; -}/*# sourceMappingURL=variables.module.css.map */ \ No newline at end of file diff --git a/SuperMap iEarth/src/styles/variables.module.css.map b/SuperMap iEarth/src/styles/variables.module.css.map deleted file mode 100644 index 0ce4ea22..00000000 --- a/SuperMap iEarth/src/styles/variables.module.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["variables.module.css","variables.module.scss"],"names":[],"mappings":"AAAA,gBAAgB;ACAhB;;CAAA;AA6BA;EACE,wBAzBmB;EA0BnB,uBAzBkB;EA0BlB,uBA3BmB;EA6BnB,qBAxBgB;EAyBhB,wBAxBmB;EAyBnB,wBAxBmB;EAyBnB,sBAxBiB;EA0BjB,kCAvBkB;EAwBlB,sCAtBe;EAuBf,wCArBiB;EAsBjB,sCApBe;EAqBf,0CAnBmB;EAqBnB,SAnBS;ADRX","file":"variables.module.css"} \ No newline at end of file diff --git a/SuperMap iEarth/src/styles/variables.module.scss b/SuperMap iEarth/src/styles/variables.module.scss deleted file mode 100644 index 18521ef1..00000000 --- a/SuperMap iEarth/src/styles/variables.module.scss +++ /dev/null @@ -1,47 +0,0 @@ -/* -* 颜色 -*/ - -// 主色 - 常用于主要按钮、层级图标及其不同状态。 -$--mainColor-Normal: #3499E5; -$--mainColor-Hover: #5EB7F2; -$--mainColor-Click: #2276BF; - -// 功能色 - 常用于链接、成功、警告、错误 -$--funColor-Link: #3499E5; -$--funColor-Success: #3CAB1A; -$--funColor-Warning: #E2CA34; -$--funColor-Error: #E04C40; - -// 中性色 - 常用于文字、icon、描边等 -$--midColor-Normal: rgba(255, 255, 255, 1); -; // 一般不会变化的 -$--midColor-Set: rgba(255, 255, 255, 0.85); -; // 选中 -$--midColor-Hover: rgba(255, 255, 255, 0.65); -; // 移入 -$--midColor-Tip: rgba(255, 255, 255, 0.45); -; // 提示 -$--midColor-Disable: rgba(255, 255, 255, 0.25); // 禁用 - -$--bg-url: ''; - -// 尝试将scss变量导出,完全可以 -:export { - mainColorNormal: $--mainColor-Normal; - mainColorHover: $--mainColor-Hover; - mainColorClick: $--mainColor-Normal; - - funColorLink: $--funColor-Link; - funColorSuccess: $--funColor-Success; - funColorWarning: $--funColor-Warning; - funColorError: $--funColor-Error; - - midColorNormal: $--midColor-Normal; - midColorSet: $--midColor-Set; - midColorHover: $--midColor-Hover; - midColorTip: $--midColor-Tip; - midColorDisable: $--midColor-Disable; - - bgUrl: $--bg-url; -} \ No newline at end of file diff --git a/SuperMap iEarth/src/tools/ScreenEventManage/EventDispatcher.js b/SuperMap iEarth/src/tools/ScreenEventManage/EventDispatcher.js index f46c0023..b6b0df1e 100644 --- a/SuperMap iEarth/src/tools/ScreenEventManage/EventDispatcher.js +++ b/SuperMap iEarth/src/tools/ScreenEventManage/EventDispatcher.js @@ -1,13 +1,13 @@ -function EventDispatcher () {} +function EventDispatcher() { } Object.assign(EventDispatcher.prototype, { /** - * 添加监听器 - * @param type{string} 监听器类型 - * @param listener{function} 方法 - * @param mutexStatus{boolean} 互斥开关 - */ + * 添加监听器 + * @param type{string} 监听器类型 + * @param listener{function} 方法 + * @param mutexStatus{boolean} 互斥开关 + */ addEventListener: function (type, listener, mutexStatus = false) { if (this._listeners === undefined) this._listeners = {} this._mutex = this._mutex || {} @@ -56,9 +56,9 @@ Object.assign(EventDispatcher.prototype, { }, /** - * 派发事件 - * @param event{{type: string, message?: *}} - */ + * 派发事件 + * @param event{{type: string, message?: *}} + */ dispatchEvent: function (event) { if (this._listeners === undefined) return @@ -70,10 +70,9 @@ Object.assign(EventDispatcher.prototype, { // Make a copy, in case listeners are removed while iterating. var array = listenerArray.slice(0) - if (this._mutex[event.type]){ + if (this._mutex[event.type]) { const find = array.find(item => item === this._mutex[event.type]) find.call(this, event) - // console.log(' 事件互斥已启动') return } for (var i = 0, l = array.length; i < l; i++) { @@ -82,7 +81,7 @@ Object.assign(EventDispatcher.prototype, { } }, - removeAllListener () { + removeAllListener() { this._mutex = {} for (const key in this._listeners) { this._listeners[key] = [] @@ -91,4 +90,4 @@ Object.assign(EventDispatcher.prototype, { }) -export { EventDispatcher } +export { EventDispatcher }; \ No newline at end of file diff --git a/SuperMap iEarth/src/tools/ScreenEventManage/EventManager.js b/SuperMap iEarth/src/tools/ScreenEventManage/EventManager.js index 1ed02efe..05c2f5f4 100644 --- a/SuperMap iEarth/src/tools/ScreenEventManage/EventManager.js +++ b/SuperMap iEarth/src/tools/ScreenEventManage/EventManager.js @@ -24,7 +24,7 @@ export default class EventManager extends EventDispatcher { * 创建事件管理工具 * @param viewer */ - constructor (viewer) { + constructor(viewer) { super() this.viewer = viewer @@ -68,7 +68,7 @@ export default class EventManager extends EventDispatcher { // 鼠标移动事件 this.handler.setInputAction((e) => { // 左键按下移动事件 - if(this.press) { + if (this.press) { this.dispatchEvent({ type: EventConstant.LEFT_DOWN_MOUSE_MOVE, message: e @@ -118,7 +118,7 @@ export default class EventManager extends EventDispatcher { * 添加相机位置监听方法 * @param fn{Function} 监听方法 */ - addCameraMoveListener (fn) { + addCameraMoveListener(fn) { this.viewer.camera.changed.addEventListener(fn) } @@ -126,7 +126,7 @@ export default class EventManager extends EventDispatcher { * 移除相机位置监听 * @param fn{Function} 监听方法 */ - removeCameraMoveListener (fn) { + removeCameraMoveListener(fn) { this.viewer.camera.changed.removeEventListener(fn) } -} +} \ No newline at end of file diff --git a/SuperMap iEarth/src/tools/browserLang.ts b/SuperMap iEarth/src/tools/browserLang.ts deleted file mode 100644 index cf5b55c5..00000000 --- a/SuperMap iEarth/src/tools/browserLang.ts +++ /dev/null @@ -1,27 +0,0 @@ -import store from '@/store'; -import { useLangStoreCreate } from '@/store/langStore/langStore' -const langStore = useLangStoreCreate(store); - -function setBrowserLang() { - let navigator:any = window.navigator; - let language = navigator.languages && navigator.languages[0] || - navigator.language; - // || - // navigator.userLanguage || - // navigator.browserLanguage; - - // 处理一些特殊情况,如 Chrome 在某些语言设置下返回的语言标识不规范 - if (language.length > 2) { - language = language.substr(0, 2); - } - - let supportLanguage = ['zh','en','ja'] - if(supportLanguage.indexOf(language) === -1){ - language = 'en'; - } - console.log("Browser-language:",language); - - langStore.changeLang(language); -} - -export default setBrowserLang; \ No newline at end of file diff --git a/SuperMap iEarth/src/tools/drawHandler.ts b/SuperMap iEarth/src/tools/drawHandler.ts index df382cf4..f14686ca 100644 --- a/SuperMap iEarth/src/tools/drawHandler.ts +++ b/SuperMap iEarth/src/tools/drawHandler.ts @@ -1,14 +1,12 @@ //DrawHandler封装 -// import tool from './tool' /** * 初始化-package * DrawMode:类型:主要是封装常用的绘制线和面两种 * clampMode:模式:空间,贴地 */ - -const initHandler = function (DrawMode:string, clampMode?:number) { - let handler:any, clampmode:number = 0; +const initHandler = function (DrawMode: string, clampMode?: number) { + let handler: any, clampmode: number = 0; // if (SuperMap3D.defined(clampMode)) clampmode = clampMode; switch (DrawMode) { case "Polyline": @@ -39,7 +37,7 @@ const initHandler = function (DrawMode:string, clampMode?:number) { handler.handlerDrawing = function () { return new Promise((resolve, reject) => { - let clearActFn = handler.activeEvt.addEventListener((isActive:any) => { + let clearActFn = handler.activeEvt.addEventListener((isActive: any) => { if (isActive == true) { window.viewer.enableCursorStyle = false; window.viewer._element.style.cursor = ''; @@ -50,7 +48,7 @@ const initHandler = function (DrawMode:string, clampMode?:number) { } }); - let clearMovFn = handler.movingEvt.addEventListener((windowPosition:any) => { + let clearMovFn = handler.movingEvt.addEventListener((windowPosition: any) => { if (handler.polyline && handler.isDrawing) { // let p = [...handler.polyline.positions]; // if (DrawMode == "Polygon") p.push(p[0]); @@ -59,7 +57,7 @@ const initHandler = function (DrawMode:string, clampMode?:number) { } }); - let clearDrawFn = handler.drawEvt.addEventListener((result:any) => { + let clearDrawFn = handler.drawEvt.addEventListener((result: any) => { if (!result.object.positions) { handler.deactivate(); handler.activate(); @@ -103,4 +101,4 @@ const initHandler = function (DrawMode:string, clampMode?:number) { return handler }; -export default initHandler +export default initHandler; diff --git a/SuperMap iEarth/src/tools/echarts.ts b/SuperMap iEarth/src/tools/echarts.ts index 04d79a91..9168f77b 100644 --- a/SuperMap iEarth/src/tools/echarts.ts +++ b/SuperMap iEarth/src/tools/echarts.ts @@ -36,4 +36,4 @@ echarts.use([ ]); // 接下来的使用就跟之前一样,初始化图表,设置配置项 -export default echarts +export default echarts; diff --git a/SuperMap iEarth/src/tools/editHandler.ts b/SuperMap iEarth/src/tools/editHandler.ts index b866f0a9..e9a5db09 100644 --- a/SuperMap iEarth/src/tools/editHandler.ts +++ b/SuperMap iEarth/src/tools/editHandler.ts @@ -1,10 +1,7 @@ - /** * 编辑功能 */ - - -function setEditHandler(entity:any,isEditZ:any, callback ?:any) { +function setEditHandler(entity: any, isEditZ: any, callback?: any) { if (!window.SuperMap3D.defined(entity)) { if (window.SuperMap3D.defined(window.editHandler)) window.editHandler.clear(); else { }; diff --git a/SuperMap iEarth/src/tools/getConfig.ts b/SuperMap iEarth/src/tools/getConfig.ts index 261ddbbe..f42f1e45 100644 --- a/SuperMap iEarth/src/tools/getConfig.ts +++ b/SuperMap iEarth/src/tools/getConfig.ts @@ -1,27 +1,31 @@ import store from '@/store'; -import configToken from "@/../public/Resource/config/configToken.json" -import { useLayerStore } from "@/store/layerStore"; +import { useLayerStore } from "@/store/layerStore/layer"; import { getRootUrl } from "@/tools/iportal/portalTools"; +const configToken = window.configToken; const layerStore = useLayerStore(store); function getConfig() { return new Promise((resolve, reject) => { + + if (configToken.tiandituKey) { + layerStore.configToken.TiandituToken = configToken.tiandituKey; + } + if (configToken.bingMapsKey) { + layerStore.configToken.BingMapKey = configToken.bingMapsKey; + } + // 在iportal环境中,启动iportal处理程序 if (location.href.indexOf('/iportal/apps') != -1) { let configTokenUrl = getRootUrl() + "apps/config.rjson"; - console.log("configTokenUrl:", configTokenUrl); window.axios .get(configTokenUrl, { withCredentials: true }) .then(function (response) { - // console.log("获取配置:", response); if (response.data && response.data.commonConfig) { // let commonConfig = JSON.parse("{\"tiandituKey\":\"7933ae29d47bcf1440889ad983dbe0af\",\"googleMapsAPIKey\":\"\"}"); - let commonConfig = JSON.parse(response.data.commonConfig); - // console.log("地图token在线配置-commonConfig:", commonConfig); if (commonConfig.tiandituKey && commonConfig.tiandituKey != '') { layerStore.configToken.TiandituToken = commonConfig.tiandituKey; } else { @@ -34,27 +38,19 @@ function getConfig() { layerStore.configToken.BingMapKey = configToken.bingMapsKey; } resolve(layerStore.configToken); + } else { + resolve(layerStore.configToken); } }) .catch(function (error) { console.log(error); - reject('获取地图token配置信息失败'); + resolve(layerStore.configToken); }); } else { // 普通模式 - // console.log('地图token本地配置-json:', configToken); - if (configToken.tiandituKey) { - layerStore.configToken.TiandituToken = configToken.tiandituKey; - } - - if (configToken.bingMapsKey) { - layerStore.configToken.BingMapKey = configToken.bingMapsKey; - } resolve(layerStore.configToken); } }) - - } export default getConfig; \ No newline at end of file diff --git a/SuperMap iEarth/src/tools/getIPortalSceneInfo.ts b/SuperMap iEarth/src/tools/getIPortalSceneInfo.ts new file mode 100644 index 00000000..a0c7c5d8 --- /dev/null +++ b/SuperMap iEarth/src/tools/getIPortalSceneInfo.ts @@ -0,0 +1,36 @@ +import { getRootUrl } from "@/tools/iportal/portalTools"; + +function getIPortalSceneInfo() { + return new Promise((resolve, reject) => { + let url = window.location.href; + if (url.indexOf("id=") != -1) { + let openExistSceneUrl = window.location.href; + let parmeter = openExistSceneUrl.split("id=")[1]; + let sceneID = parmeter.split("&")[0]; + + let url = getRootUrl() + "web/scenes/" + sceneID + ".json"; + + window.axios + .get(url, { withCredentials: true }) + .then(function (response) { + let content = JSON.parse(response.data.content); + if (window.iEarthConsole) console.log("content-已保存-获取场景信息:", content); + if (content.environmentState && content.environmentState.sceneMode) { + resolve(Number(content.environmentState.sceneMode)); + } else { + resolve(3); + } + }) + .catch(function (error) { + console.log(error); + // reject(-1); + reject(3); + }); + } else { + // 普通模式 + resolve(3); + } + }) +} + +export default getIPortalSceneInfo; \ No newline at end of file diff --git a/SuperMap iEarth/src/tools/getLanguage.ts b/SuperMap iEarth/src/tools/getLanguage.ts new file mode 100644 index 00000000..14d476eb --- /dev/null +++ b/SuperMap iEarth/src/tools/getLanguage.ts @@ -0,0 +1,26 @@ +import { getBrowserLanguageSub } from '@/utils'; +const lang_support_list = window.lang_support_list; +const lang_default = window.lang_default; + +export const getLanguage = () =>{ + // 获取当前浏览器真实语言环境(两位字母简写) + let lang: string = getBrowserLanguageSub(); + if (window.iEarthConsole) console.log("Browser-language:", lang); + + // 检查当前浏览器语言是否在支持的列表中,如果不在则使用默认的语言设置 + let language = lang; + let supportLanguage = ['zh', 'en', 'ja', 'ru']; + if (lang_support_list && lang_support_list.length > 1) { + supportLanguage = lang_support_list; + } + if (supportLanguage.indexOf(language) === -1) { + if (lang_default && lang_default.length == 2) { + language = lang_default; + } else { + language = 'zh'; + } + } + if (window.iEarthConsole) console.log("Project-language:", language); + + return language; +} \ No newline at end of file diff --git a/SuperMap iEarth/src/tools/index.ts b/SuperMap iEarth/src/tools/index.ts index e2b73b62..d840d47b 100644 --- a/SuperMap iEarth/src/tools/index.ts +++ b/SuperMap iEarth/src/tools/index.ts @@ -1 +1 @@ -export * from "./tool" \ No newline at end of file +export * from "./tool"; \ No newline at end of file diff --git a/SuperMap iEarth/src/tools/iportal/portalTools.ts b/SuperMap iEarth/src/tools/iportal/portalTools.ts index b4c5ef34..7eadbc39 100644 --- a/SuperMap iEarth/src/tools/iportal/portalTools.ts +++ b/SuperMap iEarth/src/tools/iportal/portalTools.ts @@ -1,146 +1,161 @@ import axios from 'axios'; import { IportalStoreCreate } from "@/store/iportalManage/index"; -import suffix from 'naive-ui/es/_internal/suffix'; -// https://cdtest.supermapol.com/apps/earth/v2/index.html +// https://cdtest.supermapol.com/apps/earth/v2/index.html // 测试环境下的IEarth在线地址 function getRootUrl() { - const path = "/apps"; - let url = ""; - if(window.location.host.includes('supermapol')){ - return window.location.protocol + '//' + window.location.host + '/'; - } - if (window.location.href.indexOf(path) !== -1) { - url = window.location.href.substring( - 0, - window.location.href.indexOf(path) + 1 - ); - } - if (!url) { - if (location.href.indexOf("/iportal/") !== -1) { - url = `${location.protocol}//${location.host}/iportal/`; - } else { - url = `${location.protocol}//${location.host}/`; - } + const path = "/apps"; + let url = ""; + if (window.location.host.includes('supermapol')) { + return window.location.protocol + '//' + window.location.host + '/'; + } + if (window.location.href.indexOf(path) !== -1) { + url = window.location.href.substring( + 0, + window.location.href.indexOf(path) + 1 + ); + } + if (!url) { + if (location.href.indexOf("/iportal/") !== -1) { + url = `${location.protocol}//${location.host}/iportal/`; + } else { + url = `${location.protocol}//${location.host}/`; } - //模拟本机portal开发 - // url = "http://localhost:8190/iportal/" - return url; + } + //模拟本机portal开发 + // url = "http://localhost:8190/iportal/" + return url; } -// 判断访问协议解决跨域问题(支持网站http和https访问) -// var ishttps = 'https:' == document.location.protocol ? true : false; -// // debugger -// // if (ishttps) { -// if (true) { -// addMeta("Content-Security-Policy", "upgrade-insecure-requests") -// } - -// function addMeta(http_equiv: any, content : any) { //手动添加mata标签 -// let meta = document.createElement('meta'); -// meta.httpEquiv = http_equiv; -// meta.content = content; -// document.getElementsByTagName('head')[0].appendChild(meta); -// } -function isIportalProxyServiceUrl(serviceUrl:string, serviceProxy:any) { - if (serviceProxy && serviceProxy.enable) { - let proxyStr = ''; - if (serviceProxy.proxyServerRootUrl) { - proxyStr = `${serviceProxy.proxyServerRootUrl}/`; - } else if (serviceProxy.rootUrlPostfix) { - proxyStr = `${serviceProxy.port}/${serviceProxy.rootUrlPostfix}/`; - } else if (!serviceProxy.rootUrlPostfix) { - proxyStr = `${serviceProxy.port}/`; - } - if (serviceProxy.port !== 80) { - return serviceUrl.indexOf(proxyStr) >= 0; - } else { - //代理端口为80,url中不一定有端口,满足一种情况即可 - return serviceUrl.indexOf(proxyStr) >= 0 || serviceUrl.indexOf(proxyStr.replace( - ':80', '')) >= 0; - } +// 是否为iportal环境 +function isIportalProxyServiceUrl(serviceUrl: string, serviceProxy: any) { + if (serviceProxy && serviceProxy.enable) { + let proxyStr = ''; + if (serviceProxy.proxyServerRootUrl) { + proxyStr = `${serviceProxy.proxyServerRootUrl}/`; + } else if (serviceProxy.rootUrlPostfix) { + proxyStr = `${serviceProxy.port}/${serviceProxy.rootUrlPostfix}/`; + } else if (!serviceProxy.rootUrlPostfix) { + proxyStr = `${serviceProxy.port}/`; + } + if (serviceProxy.port !== 80) { + return serviceUrl.indexOf(proxyStr) >= 0; } else { - return false; + //代理端口为80,url中不一定有端口,满足一种情况即可 + return serviceUrl.indexOf(proxyStr) >= 0 || serviceUrl.indexOf(proxyStr.replace( + ':80', '')) >= 0; } + } else { + return false; } +} //获取ip或者域名 -function getHostName(serviceUrl:string) { - // ''http://localhost:8195/portalproxy/iserver/services/3D-ifc/rest/realspace'' - // http://localhost/portalproxy/iserver/services/3D-ifc/rest/realspace' - let array = serviceUrl.split('://'); - let index = array[1].indexOf(':'); - let ip = ''; - if (index < 0) { - let array2 = array[1].split('/'); - ip = array2[0]; - } else { - let array3 = array[1].split(':'); - ip = array3[0]; - } - return ip; +function getHostName(serviceUrl: string) { + let array = serviceUrl.split('://'); + let index = array[1].indexOf(':'); + let ip = ''; + if (index < 0) { + let array2 = array[1].split('/'); + ip = array2[0]; + } else { + let array3 = array[1].split(':'); + ip = array3[0]; } + return ip; +} //获取iport配置及用户信息 function initPortal() { - // 用户信息 - const IportalStore = IportalStoreCreate(); - let userProfileUrl = getRootUrl() + "web/config/userprofile.json"; - let portalConfigUrl = getRootUrl() + "web/config/portal.json"; - let systemJSONUrl = getRootUrl() + "web/config/system.json"; + // 用户信息 + const IportalStore = IportalStoreCreate(); + let userProfileUrl = getRootUrl() + "web/config/userprofile.json"; + let portalConfigUrl = getRootUrl() + "web/config/portal.json"; + let systemJSONUrl = getRootUrl() + "web/config/system.json"; + + //验证用户的登录状态 + let userInfoPromise = axios.get(userProfileUrl, { + //需要cookie验证 + withCredentials: true + }); + let portalConfigPromise = axios.get(portalConfigUrl); + let portalSystemPromise = axios.get(systemJSONUrl); - //验证用户的登录状态 - let userInfoPromise = axios.get(userProfileUrl, { - //需要cookie验证 - withCredentials: true - }); - let portalConfigPromise = axios.get(portalConfigUrl); - let portalSystemPromise = axios.get(systemJSONUrl); + Promise.all([userInfoPromise, portalConfigPromise, portalSystemPromise]).then(results => { + if (window.iEarthConsole) console.log("项目初始化获取信息:", results); + const userInfoObj = results[0]; + + IportalStore.portalUserprofile = results[0].data; + IportalStore.portalConfig = results[1].data; + IportalStore.systemConfig = results[2].data; + + // 暂时先用这个进行判断是否登录 + if (userInfoObj.status == 200 && userInfoObj.data.userName !== "GUEST") { + IportalStore.isLogin = true; + if (userInfoObj.data.modulePermissions[0] = '*' && userInfoObj.data.roles[0] == 'ADMIN') { + IportalStore.isSuperAdmin = true; + } + IportalStore.setUserInfo(userInfoObj.data); + } + }); - Promise.all([userInfoPromise, portalConfigPromise, portalSystemPromise]).then(results => { - console.log("项目初始化获取信息:", results); - const userInfoObj = results[0]; - const portalConfigObj = results[1]; - const portalSystemObj = results[2]; + // 等用到iportal统一放到util中管理 + // //检查请求是否带cookie + // function setTrustedServers(url) { + // if (window.store.isPortal) { + // if (window.store.portalConfig) { + // let serviceProxy = window.store.portalConfig.serviceProxy; + // let withCredentials = isIportalProxyServiceUrl(url, serviceProxy); + // if (withCredentials) { + // let ip = getHostName(url); + // if ( + // !Cesium.TrustedServers.contains( + // "http://" + ip + "/" + serviceProxy.port + // ) + // ) { + // Cesium.TrustedServers.add(ip, serviceProxy.port); + // } + // } + // } + // } + // } - IportalStore.portalUserprofile = results[0].data; - IportalStore.portalConfig = results[1].data; - IportalStore.systemConfig = results[2].data; + // 判断访问协议解决跨域问题(支持网站http和https访问) + // var ishttps = 'https:' == document.location.protocol ? true : false; + // // debugger + // // if (ishttps) { + // if (true) { + // addMeta("Content-Security-Policy", "upgrade-insecure-requests") + // } - // console.log("IportalStore.portalUserprofile:",IportalStore.portalUserprofile); - // console.log("IportalStore.portalConfig:",IportalStore.portalConfig); - // console.log("IportalStore.systemConfig:",IportalStore.systemConfig); + // function addMeta(http_equiv: any, content : any) { //手动添加mata标签 + // let meta = document.createElement('meta'); + // meta.httpEquiv = http_equiv; + // meta.content = content; + // document.getElementsByTagName('head')[0].appendChild(meta); + // } - // 暂时先用这个进行判断是否登录 - if (userInfoObj.status == 200 && userInfoObj.data.userName !== "GUEST") { - IportalStore.isLogin = true; - if (userInfoObj.data.modulePermissions[0] = '*' && userInfoObj.data.roles[0] == 'ADMIN') { - IportalStore.isSuperAdmin = true; - } - IportalStore.setUserInfo(userInfoObj.data); - } - }); - //验证用户的登录状态 - // let userInfoPromise = window.axios.get(userProfileUrl, { - // //需要cookie验证 - // withCredentials: true - // }); - // let portalConfigPromise = window.axios.get(portalConfigUrl); - // let portalSystemPromise = window.axios.get(systemJSONUrl); - // Promise.all([userInfoPromise, portalConfigPromise, portalSystemPromise]).then(results => { - // window.store.portalUserprofile = results[0].data; - // window.store.portalConfig = results[1].data; - // window.store.systemConfig = results[2].data; - // mountVue(); - // }).catch(e => { - // mountVue(); - // }); + //验证用户的登录状态 + // let userInfoPromise = window.axios.get(userProfileUrl, { + // //需要cookie验证 + // withCredentials: true + // }); + // let portalConfigPromise = window.axios.get(portalConfigUrl); + // let portalSystemPromise = window.axios.get(systemJSONUrl); + // Promise.all([userInfoPromise, portalConfigPromise, portalSystemPromise]).then(results => { + // window.store.portalUserprofile = results[0].data; + // window.store.portalConfig = results[1].data; + // window.store.systemConfig = results[2].data; + // mountVue(); + // }).catch(e => { + // mountVue(); + // }); } export { - getRootUrl, - initPortal, - isIportalProxyServiceUrl, - getHostName -} \ No newline at end of file + getRootUrl, + initPortal, + isIportalProxyServiceUrl, + getHostName +}; \ No newline at end of file diff --git a/SuperMap iEarth/src/tools/layerManagement.ts b/SuperMap iEarth/src/tools/layerManagement.ts index 78766ee9..026eb1ef 100644 --- a/SuperMap iEarth/src/tools/layerManagement.ts +++ b/SuperMap iEarth/src/tools/layerManagement.ts @@ -1,12 +1,8 @@ // 这一句必须加,和以前直接在main.ts中直接引入不同,因为有个模块加载和引用先后的问题,具体参考: https://blog.csdn.net/zlting_/article/details/127495583 import store from '../store'; - -import { useLayerStore } from '../store/layerStore/index'; -import { storeToRefs } from 'pinia'; +import { useLayerStore } from '../store/layerStore/layer'; const layerStore = useLayerStore(store); -const { onlineBaseLayerList } = storeToRefs(layerStore); - // 检验url地址 function checkURL(url: string) { @@ -21,20 +17,25 @@ function checkURL(url: string) { } // 打开realSpace场景 -function openScene(url: string, type: any, sceneName?: string) { +function openScene(url: string, sceneName: string, type: any, ) { if (checkURL(url)) { // 专门对CBD和变电站场景做设置 - if (sceneName === 'global.BeijingCBD') { + if (sceneName === 'BeijingCBD') { addCBD(url); - } else if (sceneName === 'global.transformerStation') { + } + if (sceneName === 'transformerStation') { addBDZ(url); } else { - let promiseArray = [ - window.viewer.scene.open(url, undefined, { autoSetView: true }), - ]; - SuperMap3D.when.all(promiseArray, function (layers: any) { + let promise = window.viewer.scene.open(url, undefined, { autoSetView: true }); + SuperMap3D.when.all(promise, function (layers: any) { + layers.forEach((layer:any) => { + layer.bindName = sceneName; // 专门给S3M图层添加一个bindName属性,方便识别该图层属于那个场景 + }); + if(window.iEarthConsole) {console.log('scene-layers:',layers);} + layerStore.updateLayer({ type: "s3m" }); }); + return promise; } } } @@ -51,7 +52,8 @@ function addMvtLayer(LayerURL: string, name: string, type: any) { SuperMap3D.when(mvtMap.readyPromise, function (data: any) { layerStore.MVTLayerNameList.push(name); // 存入MVT图层名称,以便删除 - var bounds = mvtMap.rectangle; + let bounds = mvtMap.rectangle; + mvtMap.bindName = name; window.viewer.scene.camera.flyTo({ destination: new SuperMap3D.Cartesian3.fromRadians( (bounds.east + bounds.west) * 0.5, @@ -73,15 +75,12 @@ function addMvtLayer(LayerURL: string, name: string, type: any) { // 添加白膜 function addBaiMo(url: string, sceneName: string, type: any) { let name: string = sceneName; - if (sceneName.indexOf('global') != -1) { - let attr = sceneName.split('.')[1]; - name = GlobalLang[attr]; - } window.viewer.scene .addS3MTilesLayerByScp(url, { name: name, }) .then((layer: any) => { + layer.bindName = sceneName; if (layer.name === '重庆白模' || layer.name === 'Chongqing') { window.viewer.scene.camera.flyTo({ destination: new SuperMap3D.Cartesian3(-1598174.3966915242, 5337632.74785581, 3107040.200761407), @@ -109,16 +108,14 @@ function addBaiMo(url: string, sceneName: string, type: any) { let initialColor = "rgb(67,67,67)"; layer.style3D.lineColor = SuperMap3D.Color.fromCssColorString(initialColor); - layer.wireFrameMode = SuperMap3D.WireFrameType.Sketch; //草图模式,即线框 - layer._visibleDistanceMax = 60000; - + // layer.wireFrameMode = SuperMap3D.WireFrameType.Sketch; //草图模式,即线框 + // layer._visibleDistanceMax = 60000; // 设置图层最大可见距离 layerStore.updateLayer({ type: "s3m" }); }); } // 根据输入的lauerUrl,自动匹配其图层名称 function getLayerNameFromUrl(url: any, type: string): any { - switch (type) { case "S3M": { @@ -134,115 +131,60 @@ function getLayerNameFromUrl(url: any, type: string): any { case "Imagery": { let imageLayerName = url.split('/rest/realspace/datas/')[1]; - return imageLayerName; + if (!imageLayerName) { + if (url.indexOf('http') != -1) { + if (url.indexOf('/rest/maps/') != -1) { + let name = url.split('/rest/maps/')[1]; + if (name.indexOf('%') != -1) { + let str = decodeURIComponent(name); + if (str.indexOf('@')) { + let newName = str.split('@')[0]; + return newName; + } + } else { + return name; + } + } + if (url.indexOf('%') != -1) { + let newName = url.split('%')[0]; + return newName; + } + // 支持地图服务 + if (url.indexOf('/maps/') != -1) { + let newName = url.split('/maps/')[1].replace('/', ''); + return newName; + } + return url; + } else { + return 'Unnamed'; + } + } else { + return imageLayerName; + } } - break; case "Terrain": { let terrainLayerName = url.split('/rest/realspace/datas/')[1]; return terrainLayerName; } - break; default: return ''; - break; } } - -// // 传入影像图层,获取并返回他在项目中的名称 - 废弃 -// function getImageryLayerName(imageryLayer: any) { -// let imageUrl = imageryLayer._imageryProvider.url || imageryLayer._imageryProvider._url; - -// if (!imageUrl) return '经纬底图'; - -// if (imageUrl.indexOf("earth-skin.jpg") != -1) { -// return '默认影像'; -// } - -// let targetItem = onlineBaseLayerList.value.find((item: any) => item.url === imageUrl) -// if (targetItem) { -// return targetItem.name; -// } else if (imageUrl) { -// // let otherImageLayerName = imageUrl.split('realspace/services/')[1].split('/rest/realspace')[0] - -// if (imageUrl.indexOf("realspace/datas/") != -1) { -// let otherImageLayerName = imageUrl.split('realspace/datas/')[1].replace('/', ''); -// return otherImageLayerName; -// } else { -// return '未命名图层'; -// } -// } else { -// return '未命名图层'; -// } -// } - -// // 获取地形图层名称 - 废弃 -// function getTerrainLayerName(): any { -// if (window.viewer.terrainProvider._baseUrl) { -// let baseUrl = window.viewer.terrainProvider._baseUrl -// if (baseUrl.indexOf('3D-stk_terrain') != -1) { -// return 'STK地形'; -// } else { -// if (baseUrl.indexOf('supermapol.com') != -1) { -// return baseUrl.split('realspace/services/')[1].split('/rest/realspace')[0] -// } else { -// return '未命名地形'; -// } -// } -// } else if (window.viewer.terrainProvider._urls) { -// let url0 = window.viewer.terrainProvider._urls[0] -// if (url0.indexOf('supermapol.com') != -1) { -// return 'SuperMapOnline 地形'; -// } else { -// return '天地图地形'; // viewer.terrainProvider._urls[0].indexOf('tianditu') 看情况在加 -// } -// } else { -// // return '标准椭球' -// return '无地形'; -// } -// } - -// 等用到iportal统一放到util中管理 -// //检查请求是否带cookie -// function setTrustedServers(url) { -// if (window.store.isPortal) { -// if (window.store.portalConfig) { -// let serviceProxy = window.store.portalConfig.serviceProxy; -// let withCredentials = isIportalProxyServiceUrl(url, serviceProxy); -// if (withCredentials) { -// let ip = getHostName(url); -// if ( -// !Cesium.TrustedServers.contains( -// "http://" + ip + "/" + serviceProxy.port -// ) -// ) { -// Cesium.TrustedServers.add(ip, serviceProxy.port); -// } -// } -// } -// } -// } - - // 专门添加CBD场景 function addCBD(url: string) { // 新版CBD属性 const scene = viewer.scene; + const widget = viewer.cesiumWidget; scene.camera.frustum.fov = 1.57; - //帧率显示 - // scene.debugShowFramesPerSecond = true; - var canvas = scene.canvas; - var widget = viewer.cesiumWidget; scene.fog.enabled = false; scene.globe.depthTestAgainstTerrain = false; scene.context.shaderPreprocess = true; - viewer.resolutionScale = window.devicePixelRatio; // 设置渲染分辨率的缩放因子 - scene.fog.enabled = false; scene.globe.depthTestAgainstTerrain = false; scene.context.shaderPreprocess = true; - viewer.resolutionScale = window.devicePixelRatio; + viewer.resolutionScale = window.devicePixelRatio; // 设置渲染分辨率的缩放因子 //设置阴影的出现距离 scene.shadowMap.maximumDistance = 2000; @@ -257,82 +199,54 @@ function addCBD(url: string) { // scene.logarithmicDepthBuffer = false; - //设置太阳光的颜色与强度 // scene.lightSource.sunLightColor = new SuperMap3D.Color(0.996*2, 0.85*2, 0.675*2, 1); // scene.lightSource.sunLightColor = new SuperMap3D.Color(255/255*1.0, 224/255*1.0, 179/255*1.0, 1); + // scene.lightSource.ambientLightColor = new SuperMap3D.Color(0.0, 0.0, 0.0, 1); // 环境光 scene.lightSource.sunLightColor = new SuperMap3D.Color(1 * 1, 1 * 1, 1 * 1, 1); - //添加全球影像 - // viewer.imageryLayers.addImageryProvider(new SuperMap3D.BingMapsImageryProvider({ - // key: URL_CONFIG.BING_MAP_KEY,//可至官网(https://www.bingmapsportal.com/)申请key - // url: URL_CONFIG.BINGMAP - // })); - - var L00 = new SuperMap3D.Cartesian3(0.255985647439957, 0.324294656515121, 0.448104858398438); - var L1_1 = new SuperMap3D.Cartesian3(0.052135497331619, 0.127489775419235, 0.259717047214508); - var L10 = new SuperMap3D.Cartesian3(-0.043244555592537, -0.037950038909912, -0.036239303648472); - var L11 = new SuperMap3D.Cartesian3(0.014937655068934, -0.003836219897494, -0.021041290834546); - var L2_2 = new SuperMap3D.Cartesian3(0.037908826023340, 0.013326642103493, -0.008756417781115); - var L2_1 = new SuperMap3D.Cartesian3(-0.040351137518883, -0.020264262333512, -0.004807807970792); - var L20 = new SuperMap3D.Cartesian3(0.004116172902286, 0.001403471920639, -0.004473014734685); - var L21 = new SuperMap3D.Cartesian3(-0.039947938174009, -0.028241466730833, -0.011872956529260); - var L22 = new SuperMap3D.Cartesian3(0.042825646698475, 0.035332202911377, 0.014503183774650); - scene.specularEnvironmentMaps = "./Resource/CBD/HongKong_sphere_original_1k.ktx2"; - - var coefficients = [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22]; - scene.sphericalHarmonicCoefficients = coefficients; - - // 测试光照: - //凌晨 - // viewer.clock.currentTime = SuperMap3D.JulianDate.fromDate(new Date(2023,3,5,0)); viewer.clock.currentTime = SuperMap3D.JulianDate.fromDate(new Date(2023, 3, 5, 10)); - // scene.lightSource.ambientLightColor = new SuperMap3D.Color(0.0, 0.0, 0.0, 1); scene.sun.show = true; scene.envMapIntensity = 1.0; - // viewer.scene.globe.enableLighting = true; + let L00 = new SuperMap3D.Cartesian3(0.255985647439957, 0.324294656515121, 0.448104858398438); + let L1_1 = new SuperMap3D.Cartesian3(0.052135497331619, 0.127489775419235, 0.259717047214508); + let L10 = new SuperMap3D.Cartesian3(-0.043244555592537, -0.037950038909912, -0.036239303648472); + let L11 = new SuperMap3D.Cartesian3(0.014937655068934, -0.003836219897494, -0.021041290834546); + let L2_2 = new SuperMap3D.Cartesian3(0.037908826023340, 0.013326642103493, -0.008756417781115); + let L2_1 = new SuperMap3D.Cartesian3(-0.040351137518883, -0.020264262333512, -0.004807807970792); + let L20 = new SuperMap3D.Cartesian3(0.004116172902286, 0.001403471920639, -0.004473014734685); + let L21 = new SuperMap3D.Cartesian3(-0.039947938174009, -0.028241466730833, -0.011872956529260); + let L22 = new SuperMap3D.Cartesian3(0.042825646698475, 0.035332202911377, 0.014503183774650); + scene.specularEnvironmentMaps = "./Resource/CBD/HongKong_sphere_original_1k.ktx2"; + + let coefficients = [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22]; + scene.sphericalHarmonicCoefficients = coefficients; // 整个场景的后处理 - var correction = scene.colorCorrection;//创建颜色校正对象 + let correction = scene.colorCorrection;//创建颜色校正对象 correction.show = true;//开启颜色校正 correction.brightness = 1.0; correction.contrast = 1.3; correction.saturation = 1.0; correction.hue = 0.0; - // 添加光源 //光源位置--公园中心点 - var position1 = new SuperMap3D.Cartesian3.fromDegrees(116.459972821387, 39.9098456272661, 200); - //光源方向点--打向西北方向,模拟日出之后的朝阳的效果 - // var targetPosition1 = new SuperMap3D.Cartesian3.fromDegrees(116.455768896303 , 39.9120854569244 , 100); - //光源方向点--打向西偏北方向,模拟日出之后1h的效果 - // var targetPosition1 = new SuperMap3D.Cartesian3.fromDegrees(116.455703152747 , 39.9111393953965 , 100); - //光源方向点--打向西偏北方向,模拟日出之后2h的效果 - // var targetPosition1 = new SuperMap3D.Cartesian3.fromDegrees(116.455700406131, 39.9115056668316, 100); + let position1 = new SuperMap3D.Cartesian3.fromDegrees(116.459972821387, 39.9098456272661, 200); //光源方向点--打向东偏南方向,补光 - var targetPosition1 = new SuperMap3D.Cartesian3.fromDegrees(116.461118031787, 39.9083142302968, 20); - var dirLightOptions = { + let targetPosition1 = new SuperMap3D.Cartesian3.fromDegrees(116.461118031787, 39.9083142302968, 20); + let dirLightOptions = { targetPosition: targetPosition1, - // color: new SuperMap3D.Color(2.0, 1.46, 0.98, 1), - // color: new SuperMap3D.Color(0.996, 0.85, 0.675, 1), - // color: new SuperMap3D.Color(255/255, 224/255, 179/255, 1), - // color: new SuperMap3D.Color(133/255, 149/255, 177/255, 1), color: new SuperMap3D.Color(1, 1, 1, 1), intensity: 3.0 }; //光源方向点--打向西偏北方向,模拟日出之后4h的效果 - var targetPosition2 = new SuperMap3D.Cartesian3.fromDegrees(116.455700406131, 39.9115056668316, 20); - var dirLightOptions1 = { + let targetPosition2 = new SuperMap3D.Cartesian3.fromDegrees(116.455700406131, 39.9115056668316, 20); + let dirLightOptions1 = { targetPosition: targetPosition2, - // color: new SuperMap3D.Color(2.0, 1.46, 0.98, 1), - // color: new SuperMap3D.Color(0.996, 0.85, 0.675, 1), - // color: new SuperMap3D.Color(255/255, 214/255, 153/255, 1), color: new SuperMap3D.Color(255 / 255, 229 / 255, 191 / 255, 1), - // color: new SuperMap3D.Color(255/255, 234/255, 204/255, 1), - // color: new SuperMap3D.Color(1, 1, 1, 1), intensity: 5.0 }; let directionalLight_1 = new SuperMap3D.DirectionalLight(position1, dirLightOptions); @@ -340,86 +254,29 @@ function addCBD(url: string) { let directionalLight_2 = new SuperMap3D.DirectionalLight(position1, dirLightOptions1); scene.addLightSource(directionalLight_2); - - //点光源 - var pointLightPoshuatan1 = new SuperMap3D.Cartesian3.fromDegrees(116.454972817356, 39.9120224613012, 80.0); - - var pointLightOptionshuatan1 = { - cutoffDistance: 900.0, - color: new SuperMap3D.Color(1.0, 1.0, 1.0, 1.0), - intensity: 10.6 - }; - let pointLighthuatan1 = new SuperMap3D.PointLight(pointLightPoshuatan1, pointLightOptionshuatan1); - // scene.addLightSource(pointLighthuatan1); - - // 新增聚光灯 - var spotLightPosludeng4_1 = new SuperMap3D.Cartesian3.fromDegrees(116.454972817356, 39.9120224613012, 80); - var spotLightTargetPosludeng4_1 = new SuperMap3D.Cartesian3.fromDegrees(116.454972817356, 39.9120224613012, 0); - - var spotLightOtionsludeng4_1 = { - color: new SuperMap3D.Color(10.0, 1.0, 1.0, 1), - distance: 100, - decay: 3, - intensity: 12, - angle: Math.PI / 2 - }; - let spotLightludeng4_1 = new SuperMap3D.SpotLight(spotLightPosludeng4_1, spotLightTargetPosludeng4_1, spotLightOtionsludeng4_1); - // scene.addLightSource(spotLightludeng4_1); - - - - // const scene = viewer.scene; - // const widget = viewer.cesiumWidget; try { - - //测试场景 - // var promise = scene.open("http://www.supermapol.com/realspace/services/3D-CBD/rest/realspace"); - //测试场景 - // var promise = scene.open("http://localhost:8090/iserver/services/3D-XiaoGuoDuiBi0207/rest/realspace"); - //椭球场景E:\DEMO1205\Data3椭球 - // var promise = scene.open("http://localhost:8090/iserver/services/3D-TuoQiuChangJing0220/rest/realspace"); - - // 椭球场景E:\DEMO1205\Data4椭球-重切片-整体场景 - // var promise = scene.open("http://localhost:8090/iserver/services/3D-CBD2-4/rest/realspace"); - // var promise = scene.open("http://localhost:8090/iserver/services/3D-CBDChangJing2/rest/realspace"); - // var promise = scene.open("http://172.16.12.68:8090/iserver/services/3D-CBDChangJing2/rest/realspace"); - var promise = scene.open(url); - // var promise = scene.open("http://localhost:8090/iserver/services/3D-0315ZhongQiePianWanZhengChangJing/rest/realspace"); - // var promise = scene.open("http://10.10.7.245:8090/iserver/services/3D-0315ZhongQiePianWanZhengChangJing/rest/realspace"); - - + let promise = scene.open(url); SuperMap3D.when(promise, function (layers) { if (!scene.pickPositionSupported) { alert('不支持深度拾取,属性查询功能无法使用!'); } - //设置建筑的外部金属框架的可见距离,解决摩尔纹的问题 - // var layer1 = scene.layers.find('Buildlding_v2_detail'); - // layer1.visibleDistanceMax = 100; - //设置 - var layer1 = scene.layers.find('Ground_smallRe'); - layer1.lodRangeScale = 0.1; - - for (var layer of layers) { + //设置建筑的外部金属框架的可见距离,解决摩尔纹的问题 + for (let layer of layers) { layer.cullMode = SuperMap3D.WindingOrder.COUNTER_CLOCKWISE; // layer.envMapIntensity = 1.2; - // layer.envMapIntensity = 0.0; - // layer_envMapIntensity = 0.0; //开启阴影 layer.shadowType = 2; - // layer.lodRangeScale = 0.1; // 根节点驻留与不立即释放 layer.residentRootTile = true; layer.clearMemoryImmediately = false; - - } // 针对单个图层的处理: - var layer1 = scene.layers.find("RoadRe"); + let layer1 = scene.layers.find("RoadRe"); //色相,默认是0,值域-1-1 layer1.hue = 0; //亮度,默认0 @@ -431,7 +288,7 @@ function addCBD(url: string) { // gamma layer1.gamma = 1; - var layer2 = scene.layers.find("Ground_smallRe"); + let layer2 = scene.layers.find("Ground_smallRe"); //色相,默认是0,值域-1-1 layer2.hue = 0.0; //亮度,默认0 @@ -442,20 +299,22 @@ function addCBD(url: string) { layer2.saturation = 0.5; // gamma layer2.gamma = 1; + // lod层级 + layer2.lodRangeScale = 0.1; - // var layer3 = scene.layers.find("Building_v1Re"); - // //色相,默认是0,值域-1-1 - // layer3.hue =0; - // //亮度,默认0 - // layer3.brightness= 0.85; - // // 对比度,默认1 - // layer3.contrast = 1.3; - // // 饱和度,默认1 - // layer3.saturation = 0.5; - // // gamma - // layer3.gamma = 1; - - var layer4 = scene.layers.find("Building_v2_mainRe"); + let layer3 = scene.layers.find("Building_v1Re"); + //色相,默认是0,值域-1-1 + layer3.hue = 0; + //亮度,默认0 + layer3.brightness = 0.85; + // 对比度,默认1 + layer3.contrast = 1.3; + // 饱和度,默认1 + layer3.saturation = 0.5; + // gamma + layer3.gamma = 1; + + let layer4 = scene.layers.find("Building_v2_mainRe"); //色相,默认是0,值域-1-1 layer4.hue = -0.0; //亮度,默认0 @@ -468,7 +327,7 @@ function addCBD(url: string) { layer4.gamma = 1; // 找到水面的图层: - var layer5 = scene.layers.find("Waters@CBD"); + let layer5 = scene.layers.find("Waters@CBD"); //设置水面的颜色 // layer5.waterColor = new SuperMap3D.Color(0/255,66/255,61/255,1); layer5.waterColor = new SuperMap3D.Color(0 / 255, 53 / 255, 43 / 255, 1); @@ -477,7 +336,7 @@ function addCBD(url: string) { //设置水面的波动幅度 layer5.waterWaveScale = 1; - var layer6 = scene.layers.find("Building_NoCBD_5huan_WebGL"); + let layer6 = scene.layers.find("Building_NoCBD_5huan_WebGL"); //色相,默认是0,值域-1-1 layer6.hue = -0.0; //亮度,默认0 @@ -489,251 +348,22 @@ function addCBD(url: string) { // gamma layer6.gamma = 1; - - // setTimeout(() => { - // //添加树木 - // $.getJSON("./CBD/(32)小区.json", function (data) { - // console.log('datahh:', data); - // growTreeByJSON(data) - // }).fail(function () { - // console.log("An erro."); - // }); - - // $.getJSON("./CBD/(36)道路_Del.json", function (data) { - // console.log('datahh:', data); - // growTreeByJSON(data) - // }).fail(function () { - // console.log("An erro."); - // }); - // }, 1000) - }, function (e) { if (widget._showRenderLoopErrors) { - var title = '渲染时发生错误,已停止渲染。'; + let title = '渲染时发生错误,已停止渲染。'; widget.showErrorPanel(title, undefined, e); } }); } catch (e) { if (widget._showRenderLoopErrors) { - var title = '渲染时发生错误,已停止渲染。'; + let title = '渲染时发生错误,已停止渲染。'; widget.showErrorPanel(title, undefined, e); } } } -// // 专门添加变电站场景 - 老版 old 加的很慢 -// function addBDZ(url: string) { -// // scene.camera.frustum.fov = 1.57; -// // scene.camera.frustum.near = 0.01; -// const scene = viewer.scene; -// viewer.clock.currentTime = SuperMap3D.JulianDate.fromDate(new Date(2023, 4, 15, 10)); // 设定比当前时间更好的光照效果 -// //帧率显示 -// // scene.debugShowFramesPerSecond = true; -// // viewer.scene.hdrEnabled = true; -// var camera = scene.camera; - -// //设置阴影的出现距离 -// scene.shadowMap.maximumDistance = 200; - -// //设置阴影的浓度,值越高,阴影越淡 -// viewer.shadowMap.darkness = 0.3; -// //默认值是0.1,值越小越清晰 -// viewer.shadowMap.penumbraRatio = 0.2; - -// // scene.logarithmicDepthBuffer = false; - -// //设置太阳光的颜色与强度 -// scene.lightSource.sunLightColor = new SuperMap3D.Color(1 * 3, 1 * 3, 1 * 3, 1); -// // scene.lightSource.sunLightColor = new SuperMap3D.Color(0.996 * 2, 0.85 * 2, 0.675 * 2, 1); -// scene.sun.show = true; - -// var L00 = new SuperMap3D.Cartesian3(0.492085933685303, 0.492085874080658, 0.492085933685303); -// var L1_1 = new SuperMap3D.Cartesian3(0.078874699771404, 0.078874610364437, 0.078874692320824); -// var L10 = new SuperMap3D.Cartesian3(0.078090153634548, 0.078090116381645, 0.078090183436871); -// var L11 = new SuperMap3D.Cartesian3(0.025034775957465, 0.025034755468369, 0.025034774094820); -// var L2_2 = new SuperMap3D.Cartesian3(0.031029928475618, 0.031029941514134, 0.031029921025038); -// var L2_1 = new SuperMap3D.Cartesian3(0.035155173391104, 0.035155214369297, 0.035155173391104); -// var L20 = new SuperMap3D.Cartesian3(-0.005440676584840, -0.005440662149340, -0.005440671462566); -// var L21 = new SuperMap3D.Cartesian3(0.008016115985811, 0.008016133680940, 0.008016110397875); -// var L22 = new SuperMap3D.Cartesian3(-0.071910448372364, -0.071910388767719, -0.071910433471203); -// scene.specularEnvironmentMaps = "./Resource/BDZ/Studio_set2_02_KFJR.ktx2"; - -// var coefficients = [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22]; -// scene.sphericalHarmonicCoefficients = coefficients; - -// // 整个场景的后处理 -// var correction = scene.colorCorrection;//创建颜色校正对象 -// correction.show = true;//开启颜色校正 -// correction.brightness = 1.0; -// correction.contrast = 1.15; -// correction.saturation = 1.0; -// correction.hue = 0.0; - -// //来自西北平行光 -// var position1 = new SuperMap3D.Cartesian3.fromDegrees(115.998460430547, 40.0005740797481, 3); -// var targetPosition1 = new SuperMap3D.Cartesian3.fromDegrees(115.999464851774, 39.999780713494, 3); -// var dirLightOptions1 = { -// targetPosition: targetPosition1, -// // color: new SuperMap3D.Color(0.996, 0.85, 0.675, 1), -// //color: new SuperMap3D.Color(1.0, 0.84, 0.57, 1), -// // color: new SuperMap3D.Color(230/255, 243/255, 255/255, 1), -// // color: new SuperMap3D.Color(255/255, 247/255, 255/255, 1), -// color: new SuperMap3D.Color(255 / 255, 237 / 255, 217 / 255, 1), -// intensity: 0 -// }; -// //来自东北平行光 -// var position2 = new SuperMap3D.Cartesian3.fromDegrees(116.000333104312, 40.0005771848742, 3); -// var targetPosition2 = new SuperMap3D.Cartesian3.fromDegrees(115.999464851774, 39.999780713494, 3); -// var dirLightOptions2 = { -// targetPosition: targetPosition2, -// // color: new SuperMap3D.Color(0.996, 0.85, 0.675, 1), -// //color: new SuperMap3D.Color(1.0, 0.84, 0.57, 1), -// // color: new SuperMap3D.Color(230/255, 243/255, 255/255, 1), -// // color: new SuperMap3D.Color(255/255, 247/255, 255/255, 1), -// // color: new SuperMap3D.Color(255/255, 237/255, 217/255, 1), -// intensity: 0 -// }; - -// let directionalLight_1 = new SuperMap3D.DirectionalLight(position1, dirLightOptions1); -// scene.addLightSource(directionalLight_1); -// let directionalLight_2 = new SuperMap3D.DirectionalLight(position2, dirLightOptions2); -// scene.addLightSource(directionalLight_2); - -// scene.envMapIntensity = 0.55; - -// //测试场景 -// // var promise = scene.open("http://10.10.7.245:8090/iserver/services/3D-0315ZhongQiePianWanZhengChangJing/rest/realspace"); -// // var promise = scene.open("http://localhost:8090/iserver/services/3D-BianDianZhan3/rest/realspace"); -// var promise = scene.open(url); -// // var promise = scene.open("http://localhost:8090/iserver/services/3D-0423ZhongQiePian-2/rest/realspace"); -// promise.then(function (layers) { -// for (var layer of layers) { -// // layer.cullMode = SuperMap3D.WindingOrder.COUNTER_CLOCKWISE; -// //开启阴影 -// layer.shadowType = 2; - -// layer.residentRootTile = true; -// layer.clearMemoryImmediately = false; -// } - -// // // 新的种树 -// // var instanceLayer = new SuperMap3D.InstanceLayer(scene._context); -// // scene.primitives.add(instanceLayer); - -// // //默认1000,设置大了,拉远可见,设置小了,拉近才能看到 -// // // instanceLayer.tileWidth = 100; - -// // //分到不同的地形块里面, -// // instanceLayer.tileWidth = 50; -// // //默认是2,范围是0-5,理解成lodscale -// // instanceLayer.maxSSE = 1.5; - -// // // 根据传入的数据来种树 -// // function growTreeByJSON(treeDataChild) { - -// // treeDataChild.forEach(child => { -// // if (child.name === '单个添加') {// 遍历点 -// // child.child.forEach(pointItem => { -// // if (pointItem.options.position) { -// // instanceLayer.add(pointItem.url, pointItem.options) -// // } -// // }); -// // } else if (child.name === '沿线添加') {// 遍历线进行添加 -// // child.child.forEach(polylineCollection => { -// // if (polylineCollection.child.length > 0) { -// // polylineCollection.child.forEach(polylineItem => { -// // instanceLayer.add(polylineItem.url, polylineItem.options) -// // }) -// // } -// // }); -// // } else if (child.name === '区域添加') {// 遍历面进行添加 -// // child.child.forEach(polygonCollection => { -// // if (polygonCollection.child.length > 0) { -// // polygonCollection.child.forEach(polygonItem => { -// // instanceLayer.add(polygonItem.url, polygonItem.options) -// // }) -// // } -// // }); -// // } -// // }) - -// // } - -// // //添加树木 -// // $.getJSON("./CBD/tree (5).json", function (data) { -// // console.log('datahh:', data); -// // growTreeByJSON(data[0].child) -// // }).fail(function () { -// // console.log("An erro."); -// // }); - - - -// // var routes = new SuperMap3D.RouteCollection(viewer.entities); -// // //添加fpf飞行文件,fpf由SuperMap iDesktop生成 -// // var fpfUrl = './SampleData/fpf/Substation002.fpf'; -// // routes.fromFile(fpfUrl); -// // //初始化飞行管理 -// // var flyManager = new SuperMap3D.FlyManager({ -// // scene: scene, -// // routes: routes -// // }); -// // //注册站点到达事件 -// // flyManager.stopArrived.addEventListener(function (routeStop) { -// // routeStop.waitTime = 1; // 在每个站点处停留1s -// // }); - -// // flyManager.readyPromise.then(function () { // 飞行路线就绪 -// // var currentRoute = flyManager.currentRoute; -// // currentRoute.isLineVisible = false; -// // currentRoute.isStopVisible = false; -// // //生成飞行文件中的所有站点列表 -// // var allStops = flyManager.getAllRouteStops(); -// // var menu = document.getElementById('stopList'); -// // for (var i = 0, j = allStops.length; i < j; i++) { -// // var option = document.createElement('option'); -// // option.innerHTML = "站点 " + (i + 1); -// // option.value = allStops[i].index; -// // menu.appendChild(option); -// // } - -// // $('#stopList').change(function () { //注册站点切换事件 -// // flyManager && flyManager.stop(); -// // var index = parseInt($(this).val()); // 站点的索引 -// // var route = flyManager.currentRoute; -// // var stop = route.get(index); -// // flyManager.currentStopIndex = index; -// // flyManager.viewToStop(stop); -// // }); - -// // $('#play').click(function () { -// // flyManager && flyManager.play(); -// // }); -// // $('#pause').click(function () { -// // flyManager && flyManager.pause(); -// // }); -// // $('#stop').click(function () { -// // flyManager && flyManager.stop(); -// // }); - -// // $('#show-line').change(function () { -// // currentRoute.isLineVisible = $(this).prop('checked'); -// // }); - -// // $('#show-stop').change(function () { -// // currentRoute.isStopVisible = $(this).prop('checked'); -// // }); - -// // $('#toolbar').show(); -// // $('#loadingbar').remove(); -// // }); -// }); -// } - -// 专门添加变电站场景 - 新版,加载场景较快 - - +// 专门添加石油场站 function addBDZ(url: string) { // 设定比当前时间更好的光照效果 viewer.clock.currentTime = SuperMap3D.JulianDate.fromDate( @@ -751,7 +381,7 @@ function addBDZ(url: string) { scene.sun.show = true // 整个场景的后处理 - var correction = scene.colorCorrection; //创建颜色校正对象 + let correction = scene.colorCorrection; //创建颜色校正对象 correction.show = true //开启颜色校正 correction.brightness = 1.0 correction.contrast = 1.15 @@ -759,33 +389,33 @@ function addBDZ(url: string) { correction.hue = 0.0 //来自西北平行光 - var position1 = new SuperMap3D.Cartesian3.fromDegrees( + let position1 = new SuperMap3D.Cartesian3.fromDegrees( 115.998460430547, 40.0005740797481, 3 ); - var targetPosition1 = new SuperMap3D.Cartesian3.fromDegrees( + let targetPosition1 = new SuperMap3D.Cartesian3.fromDegrees( 115.999464851774, 39.999780713494, 3 ); - var dirLightOptions1 = { + let dirLightOptions1 = { targetPosition: targetPosition1, color: new SuperMap3D.Color(255 / 255, 237 / 255, 217 / 255, 1), intensity: 0, }; //来自东北平行光 - var position2 = new SuperMap3D.Cartesian3.fromDegrees( + let position2 = new SuperMap3D.Cartesian3.fromDegrees( 116.000333104312, 40.0005771848742, 3 ); - var targetPosition2 = new SuperMap3D.Cartesian3.fromDegrees( + let targetPosition2 = new SuperMap3D.Cartesian3.fromDegrees( 115.999464851774, 39.999780713494, 3 ); - var dirLightOptions2 = { + let dirLightOptions2 = { targetPosition: targetPosition2, intensity: 0, }; @@ -803,12 +433,10 @@ function addBDZ(url: string) { scene.envMapIntensity = 1.0; - //测试场景 - var promise = scene.open( - 'http://www.supermapol.com/realspace/services/3D-0725RVM/rest/realspace' - ) + // 添加场景 + let promise = scene.open(url); promise.then(function (layers) { - for (var layer of layers) { + for (let layer of layers) { //开启阴影 layer.shadowType = 2 layer.residentRootTile = true @@ -820,9 +448,8 @@ function addBDZ(url: string) { // layer.style3D.lineWidth = 0.3; } - // 针对单个图层的处理: - var layer1 = scene.layers.find("PI_UV"); + let layer1 = scene.layers.find("PI_UV"); //色相,默认是0,值域-1-1 layer1.hue = 0; //亮度,默认0 @@ -852,23 +479,23 @@ function addBDZ(url: string) { } } - // loadShadow(true); + loadShadow(true); function loadLight(lightChecked) { if (lightChecked) { //环境光贴图ktx压缩测试--原始工具生成的 - var L00 = new SuperMap3D.Cartesian3(0.170253232121468, 0.186530470848083, 0.250162333250046); - var L1_1 = new SuperMap3D.Cartesian3(-0.019948856905103, 0.036114457994699, 0.121223092079163); - var L10 = new SuperMap3D.Cartesian3(0.021870676428080, 0.031954143196344, 0.039059657603502); - var L11 = new SuperMap3D.Cartesian3(-0.016260044649243, -0.026163732632995, -0.032524436712265); - var L2_2 = new SuperMap3D.Cartesian3(-0.026016067713499, -0.025068568065763, -0.024604434147477); - var L2_1 = new SuperMap3D.Cartesian3(0.029782924801111, 0.029722381383181, 0.029306791722775); - var L20 = new SuperMap3D.Cartesian3(0.007061737123877, 0.008292092941701, 0.010273135267198); - var L21 = new SuperMap3D.Cartesian3(-0.025165025144815, -0.026656696572900, -0.027361012995243); - var L22 = new SuperMap3D.Cartesian3(0.013707554899156, 0.018742486834526, 0.026223894208670); + let L00 = new SuperMap3D.Cartesian3(0.170253232121468, 0.186530470848083, 0.250162333250046); + let L1_1 = new SuperMap3D.Cartesian3(-0.019948856905103, 0.036114457994699, 0.121223092079163); + let L10 = new SuperMap3D.Cartesian3(0.021870676428080, 0.031954143196344, 0.039059657603502); + let L11 = new SuperMap3D.Cartesian3(-0.016260044649243, -0.026163732632995, -0.032524436712265); + let L2_2 = new SuperMap3D.Cartesian3(-0.026016067713499, -0.025068568065763, -0.024604434147477); + let L2_1 = new SuperMap3D.Cartesian3(0.029782924801111, 0.029722381383181, 0.029306791722775); + let L20 = new SuperMap3D.Cartesian3(0.007061737123877, 0.008292092941701, 0.010273135267198); + let L21 = new SuperMap3D.Cartesian3(-0.025165025144815, -0.026656696572900, -0.027361012995243); + let L22 = new SuperMap3D.Cartesian3(0.013707554899156, 0.018742486834526, 0.026223894208670); scene.specularEnvironmentMaps = './Resource/BDZ/drakensberg_solitary_mountain_1k_2_S-20.hdr'; - var coefficients = [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22]; + let coefficients = [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22]; scene.sphericalHarmonicCoefficients = coefficients; } else { scene.sphericalHarmonicCoefficients = undefined; @@ -903,9 +530,9 @@ function setSkyBox(skyBoxShow: boolean) { viewer.scene.skyBox = skybox; if (cameraHeight < 22e4) { viewer.scene.skyBox.show = true; - viewer.scene.skyAtmosphere.show = false + viewer.scene.skyAtmosphere.show = false; } else { - viewer.scene.skyAtmosphere.show = true + viewer.scene.skyAtmosphere.show = true; } } else { viewer.scene.skyAtmosphere.show = true; @@ -934,8 +561,5 @@ export default { addMvtLayer, addBaiMo, getLayerNameFromUrl, - // getImageryLayerName, - // getTerrainLayerName, setSkyBox -} - +} \ No newline at end of file diff --git a/SuperMap iEarth/src/tools/localHook.ts b/SuperMap iEarth/src/tools/localHook.ts new file mode 100644 index 00000000..85e8459c --- /dev/null +++ b/SuperMap iEarth/src/tools/localHook.ts @@ -0,0 +1,32 @@ +import { computed } from 'vue' +import { zhCN, dateZhCN, enUS, dateEnUS, jaJP, dateJaJP, ruRU, dateRuRU } from 'naive-ui' +import { useLangStoreCreate } from '@/store/langStore/langStore' +import { LangEnum } from '@/enums/styleEnum' + +// 返回naive-ui locale语言 +export const useLocaleHook = () => { + const langStore = useLangStoreCreate(); + + return computed(() => ( + langStore.lang == LangEnum.ZH ? { locale: zhCN, dateLocale: dateZhCN } : ( + langStore.lang == LangEnum.JA ? { locale: jaJP, dateLocale: dateJaJP } : ( + langStore.lang == LangEnum.RU ? { locale: ruRU, dateLocale: dateRuRU } : { locale: enUS, dateLocale: dateEnUS } + ) + ) + )) +} + +// export const useLocaleHook = () => { +// const langStore = useLangStoreCreate(); +// if(langStore.lang == LangEnum.ZH){ +// return { locale: zhCN, dateLocale: dateZhCN }; +// }else if(langStore.lang == LangEnum.EN){ +// return { locale: enUS, dateLocale: dateEnUS }; +// }else if(langStore.lang == LangEnum.JA){ +// return { locale: jaJP, dateLocale: dateJaJP }; +// }else if(langStore.lang == LangEnum.RU){ +// return { locale: ruRU, dateLocale: dateRuRU }; +// }else{ +// return { locale: enUS, dateLocale: dateEnUS }; +// } +// } \ No newline at end of file diff --git a/SuperMap iEarth/src/tools/tool.ts b/SuperMap iEarth/src/tools/tool.ts index b31b05df..29051280 100644 --- a/SuperMap iEarth/src/tools/tool.ts +++ b/SuperMap iEarth/src/tools/tool.ts @@ -3,41 +3,37 @@ const SuperMap3D = window.SuperMap3D; // 获取两点的角度和弧度 -function getAngleAndRadian(pointA:any, pointB:any) { - //建立以点A为原点,X轴为east,Y轴为north,Z轴朝上的坐标系 - const transform = SuperMap3D.Transforms.eastNorthUpToFixedFrame(pointA); - //向量AB - const positionvector = SuperMap3D.Cartesian3.subtract(pointB, pointA, new SuperMap3D.Cartesian3()); - //因transform是将A为原点的eastNorthUp坐标系中的点转换到世界坐标系的矩阵 - //AB为世界坐标中的向量 - //因此将AB向量转换为A原点坐标系中的向量,需乘以transform的逆矩阵。 - const vector = SuperMap3D.Matrix4.multiplyByPointAsVector(SuperMap3D.Matrix4.inverse(transform, new SuperMap3D.Matrix4()), positionvector, new SuperMap3D.Cartesian3()); - //归一化 - const direction = SuperMap3D.Cartesian3.normalize(vector, new SuperMap3D.Cartesian3()); - //heading - const heading1 = Math.atan2(direction.y, direction.x) - SuperMap3D.Math.PI_OVER_TWO; - - let radian = SuperMap3D.Math.TWO_PI - SuperMap3D.Math.zeroToTwoPi(heading1); - var angle = radian * (180 / Math.PI); - if (angle < 0) { - angle = angle + 360; - } - return {angle,radian}; +function getAngleAndRadian(pointA: any, pointB: any) { + // 建立以点A为原点,X轴为east,Y轴为north,Z轴朝上的坐标系 + const transform = SuperMap3D.Transforms.eastNorthUpToFixedFrame(pointA); + // 向量AB + const positionvector = SuperMap3D.Cartesian3.subtract(pointB, pointA, new SuperMap3D.Cartesian3()); + // 因transform是将A为原点的eastNorthUp坐标系中的点转换到世界坐标系的矩阵 + // AB为世界坐标中的向量 + // 因此将AB向量转换为A原点坐标系中的向量,需乘以transform的逆矩阵。 + const vector = SuperMap3D.Matrix4.multiplyByPointAsVector(SuperMap3D.Matrix4.inverse(transform, new SuperMap3D.Matrix4()), positionvector, new SuperMap3D.Cartesian3()); + //归一化 + const direction = SuperMap3D.Cartesian3.normalize(vector, new SuperMap3D.Cartesian3()); + // heading + const heading1 = Math.atan2(direction.y, direction.x) - SuperMap3D.Math.PI_OVER_TWO; + + let radian = SuperMap3D.Math.TWO_PI - SuperMap3D.Math.zeroToTwoPi(heading1); + var angle = radian * (180 / Math.PI); + if (angle < 0) { + angle = angle + 360; } + return { angle, radian }; +} - //坐标转化 -//笛卡尔转经纬度 -const CartesiantoDegrees = (Cartesians:any) => { +// 笛卡尔转经纬度 +const CartesiantoDegrees = (Cartesians: any) => { let array = [].concat(Cartesians); - let positions:number[] = []; + let positions: number[] = []; for (let i = 0, len = array.length; i < len; i++) { - let cartographic:any = SuperMap3D.Cartographic.fromCartesian(array[i]); - // let longitude:number = Number(SuperMap3D.Math.toDegrees(cartographic.longitude).toFixed(2)); - // let latitude:number = Number(SuperMap3D.Math.toDegrees(cartographic.latitude).toFixed(2)); - // let h:number = Number(cartographic.height.toFixed(2)); - let longitude:number = Number(SuperMap3D.Math.toDegrees(cartographic.longitude)); - let latitude:number = Number(SuperMap3D.Math.toDegrees(cartographic.latitude)); - let h:number = Number(cartographic.height); + let cartographic: any = SuperMap3D.Cartographic.fromCartesian(array[i]); + let longitude: number = Number(SuperMap3D.Math.toDegrees(cartographic.longitude)); + let latitude: number = Number(SuperMap3D.Math.toDegrees(cartographic.latitude)); + let h: number = Number(cartographic.height); if (positions.indexOf(longitude) == -1 && positions.indexOf(latitude) == -1) { positions.push(longitude); positions.push(latitude); @@ -47,28 +43,28 @@ const CartesiantoDegrees = (Cartesians:any) => { return positions }; - const CartesiantoDegreesTestTS = (Cartesians:any):number[] => { - let array = [].concat(Cartesians); - let positions:number[] = []; - for (let i = 0, len = array.length; i < len; i++) { - let cartographic = SuperMap3D.Cartographic.fromCartesian(array[i]); - let longitude:number = SuperMap3D.Math.toDegrees(cartographic.longitude); - let latitude:number = SuperMap3D.Math.toDegrees(cartographic.latitude); - let h:number = cartographic.height; - if (positions.indexOf(longitude) == -1 && positions.indexOf(latitude) == -1) { - positions.push(longitude); - positions.push(latitude); - positions.push(h); - } +// 笛卡尔转经纬度 (TS) +const CartesiantoDegreesTestTS = (Cartesians: any): number[] => { + let array = [].concat(Cartesians); + let positions: number[] = []; + for (let i = 0, len = array.length; i < len; i++) { + let cartographic = SuperMap3D.Cartographic.fromCartesian(array[i]); + let longitude: number = SuperMap3D.Math.toDegrees(cartographic.longitude); + let latitude: number = SuperMap3D.Math.toDegrees(cartographic.latitude); + let h: number = cartographic.height; + if (positions.indexOf(longitude) == -1 && positions.indexOf(latitude) == -1) { + positions.push(longitude); + positions.push(latitude); + positions.push(h); } - return positions - }; - + } + return positions +}; - //笛卡尔转经纬度(每个点是独立的对象) +// 笛卡尔转经纬度(每个点是独立的对象) const CartesiantoDegreesObjs = (Cartesians) => { let array = [].concat(Cartesians); - let positions:any[] = []; + let positions: any[] = []; for (let i = 0, len = array.length; i < len; i++) { let cartographic = SuperMap3D.Cartographic.fromCartesian(array[i]); let obj = { @@ -82,8 +78,8 @@ const CartesiantoDegreesObjs = (Cartesians) => { } // 获取渐变色函数 -function gradientColors(start:any, end:any, steps:number, gamma:number) { - var i, j, ms, me, output:any[] = [], so:any[] = []; +function gradientColors(start: any, end: any, steps: number, gamma: number) { + var i, j, ms, me, output: any[] = [], so: any[] = []; gamma = gamma || 1; var normalize = function (channel) { return Math.pow(channel / 255, gamma); @@ -108,6 +104,20 @@ function gradientColors(start:any, end:any, steps:number, gamma:number) { } }; +function getPitch(pointA: any, pointB: any) { + let transfrom = SuperMap3D.Transforms.eastNorthUpToFixedFrame(pointA); + const vector = SuperMap3D.Cartesian3.subtract(pointB, pointA, new SuperMap3D.Cartesian3()); + let direction = SuperMap3D.Matrix4.multiplyByPointAsVector(SuperMap3D.Matrix4.inverse(transfrom, transfrom), vector, vector); + SuperMap3D.Cartesian3.normalize(direction, direction); + //因为direction已归一化,斜边长度等于1,所以余弦函数等于direction.z + let radian = SuperMap3D.Math.PI_OVER_TWO - SuperMap3D.Math.acosClamped(direction.z); + var angle = radian * (180 / Math.PI); + if (angle < 0) { + angle = angle + 360; + } + return { angle, radian }; +} + // // 设置所有color-pick的初始样式-渐变条纹 // function setAllColorPickBg(){ // document.querySelectorAll('.n-color-picker-trigger__fill div:nth-child(2)').forEach((el:any)=>{ @@ -121,27 +131,11 @@ function gradientColors(start:any, end:any, steps:number, gamma:number) { // if(el) el.style.backgroundImage = "none"; // } -function getPitch(pointA:any, pointB:any){ - let transfrom = SuperMap3D.Transforms.eastNorthUpToFixedFrame(pointA); - const vector = SuperMap3D.Cartesian3.subtract(pointB, pointA, new SuperMap3D.Cartesian3()); - let direction = SuperMap3D.Matrix4.multiplyByPointAsVector(SuperMap3D.Matrix4.inverse(transfrom, transfrom), vector, vector); - SuperMap3D.Cartesian3.normalize(direction, direction); - //因为direction已归一化,斜边长度等于1,所以余弦函数等于direction.z - let radian = SuperMap3D.Math.PI_OVER_TWO - SuperMap3D.Math.acosClamped(direction.z); - var angle = radian * (180 / Math.PI); - if (angle < 0) { - angle = angle + 360; - } - return {angle,radian}; -} - - export default{ - getAngleAndRadian, - CartesiantoDegrees, - CartesiantoDegreesTestTS, - CartesiantoDegreesObjs, - gradientColors, - // setAllColorPickBg, - // clearColorPickBgByIndex - getPitch, - } \ No newline at end of file +export default { + getAngleAndRadian, + CartesiantoDegrees, + CartesiantoDegreesTestTS, + CartesiantoDegreesObjs, + gradientColors, + getPitch, +} \ No newline at end of file diff --git a/SuperMap iEarth/src/utils/browserLang.ts b/SuperMap iEarth/src/utils/browserLang.ts new file mode 100644 index 00000000..4bc869e2 --- /dev/null +++ b/SuperMap iEarth/src/utils/browserLang.ts @@ -0,0 +1,38 @@ +/** + * * 获取当前浏览器真实的语言环境(两位字母简写):中文 英文 日语 俄语 + */ +export const getBrowserLanguageSub = () => { + //浏览器语言: chrome+360用language; Edge用userLanguage; IE用browserLanguage。 + let navigator: any = window.navigator; + let language = navigator.language || navigator.userLanguage || navigator.browserLanguage; + let lang = language.toLowerCase(); + + let result: string = ''; + + if (lang.indexOf('-') != -1) { + result = lang.split('-')[0]; + } else if (lang.length > 2) { + result = lang.substr(0, 2); + }else if(lang.length == 2){ + result = lang; + } + return result; + + // 暂时不考虑iportal cookies + // //判断portal设置语言 通过cookie获取 + // const cookies = document.cookie.split(';'); + // if (cookies.length > 0) { + // cookies.forEach(function (cookie) { + // const arr = cookie.split('='); + // if (arr[0].toLowerCase().trim() === 'language') { + // result = arr[1]; + // return; + // } + // }); + // } + + // // 如果从cookies中获取语言了,就直接返回 + // if(result != '' && result.length == 2){ + // return result; + // } +}; \ No newline at end of file diff --git a/SuperMap iEarth/src/utils/componets.ts b/SuperMap iEarth/src/utils/componets.ts index 66e2e120..0f6ee38c 100644 --- a/SuperMap iEarth/src/utils/componets.ts +++ b/SuperMap iEarth/src/utils/componets.ts @@ -20,6 +20,4 @@ export const loadAsyncComponent = (loader: AsyncComponentLoader<any>) => loader, loadingComponent: AsyncLoading, delay: 20, - }) - - + }) \ No newline at end of file diff --git a/SuperMap iEarth/src/utils/index.ts b/SuperMap iEarth/src/utils/index.ts index e03c8f79..4321f6e6 100644 --- a/SuperMap iEarth/src/utils/index.ts +++ b/SuperMap iEarth/src/utils/index.ts @@ -1,4 +1,4 @@ export * from "@/utils/componets" -export * from "@/utils/lang" +export * from "@/utils/browserLang" export * from "@/utils/resize" export * from '@/utils/storage' \ No newline at end of file diff --git a/SuperMap iEarth/src/utils/lang.ts b/SuperMap iEarth/src/utils/lang.ts deleted file mode 100644 index 6f063ff3..00000000 --- a/SuperMap iEarth/src/utils/lang.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * * 获取当前浏览器语言环境:中文 英文 日语 - * @return { Boolean } - */ -export const getLang = () => { - //浏览器语言 IE用browserLanguage,非IE使用language进行判断 - // let lang = (navigator.language || navigator.browserLanguage).toLowerCase(); - let lang = (navigator.language).toLowerCase(); - window["lang"] = lang; - //判断portal设置语言 通过cookie获取 - const cookies = document.cookie.split(';'); - if (cookies.length > 0) { - cookies.forEach(function (cookie) { - const arr = cookie.split('='); - if (arr[0].toLowerCase().trim() === 'language') { - lang = arr[1]; - return; - } - }); - } - lang = lang.toLowerCase().split('-')[0] - return lang; -}; diff --git a/SuperMap iEarth/src/utils/resize.ts b/SuperMap iEarth/src/utils/resize.ts index 580f0668..8a90eb52 100644 --- a/SuperMap iEarth/src/utils/resize.ts +++ b/SuperMap iEarth/src/utils/resize.ts @@ -1,22 +1,23 @@ const setFont = () => { - const windowInfo = { - width: window.innerWidth, - hight: window.innerHeight - } - console.log("Browser-Size:",windowInfo); let html = document.getElementsByTagName('html')[0]; - var w = html.clientWidth, - h = html.clientHeight; + let w = html.clientWidth + let h = html.clientHeight; + if (window.iEarthConsole) console.log(`width:${w} - height:${h}`); // html.style.fontSize = w > h ? (w / 1536) * 100 + 'px' : (w / 731) * 100 + 'px'; - html.style.fontSize = w > h ? (w / 1440) * 100 + 'px' : (w / 900) * 100 + 'px'; - console.log("Font-Size:",html.style.fontSize) -}; - + // html.style.fontSize = w > h ? (w / 1903) * 100 + 'px' : (w / 967) * 100 + 'px'; + // 兼容PC端和移动端:大于1300默认为PC,固定根字体大小为100px,小于则设为移动端,根据其具体尺寸设置根字体 + if (Number(w) > 1300 || Number(h) > 1300) { + html.style.fontSize = "100px"; + } else { + html.style.fontSize = w > h ? (w / 1536) * 100 + 'px' : (w / 731) * 100 + 'px'; + } + if (window.iEarthConsole) console.log("Font-Size:", html.style.fontSize) +}; -const debounce = (fn:any, delay:any) => { - let timer:any; - return function() { +const debounce = (fn: any, delay: any) => { + let timer: any; + return function () { if (timer) { clearTimeout(timer); } @@ -26,7 +27,4 @@ const debounce = (fn:any, delay:any) => { } }; -export const setFontImmediately = debounce(setFont, 500); - - - +export const setFontImmediately = debounce(setFont, 500); \ No newline at end of file diff --git a/SuperMap iEarth/src/views/panel/index.vue b/SuperMap iEarth/src/views/panel/index.vue index f963a8a6..198d0acb 100644 --- a/SuperMap iEarth/src/views/panel/index.vue +++ b/SuperMap iEarth/src/views/panel/index.vue @@ -1,80 +1,108 @@ <template> <div class="too-panel"> <div class="left-panel" v-if="panelStore.leftTooPanel"> + <!-- 左侧面板header --> <div class="panle-header"> - <span class="panle-title" v-if="panelStore.panelList.leftToolBarList[0].isSelected">{{$t('global.t_layerList')}}</span> - <span class="panle-title" v-if="panelStore.panelList.leftToolBarList[1].isSelected">{{$t('global.t_addData')}}</span> + <span + class="panle-title" + v-if="panelStore.panelList.leftToolBarList[0].isSelected" + >{{ $t("t_layerList") }}</span + > + <span + class="panle-title" + v-if="panelStore.panelList.leftToolBarList[1].isSelected" + >{{ $t("t_addData") }}</span + > <span class="zst1"></span> <span class="zst2"></span> <div class="panel-close" @click="panelCloseHandle(1)"> - <i class="iconfont iconguanbi"></i> + <i class="iconfont iconguanbi" style="font-size: 0.14rem"></i> </div> </div> - <div class="panle-container" :style="{overflowY: panelStore.panelList.leftToolBarList[0].isSelected? 'scroll':'hidden'}"> - <LayerList + + <!-- 左侧面板content --> + <div + class="panle-container" + :style="{ + overflowY: panelStore.panelList.leftToolBarList[0].isSelected + ? 'scroll' + : 'hidden', + }" + > + <LayerTree v-if="panelStore.panelList.leftToolBarList[0].isSelected" - ></LayerList> + ></LayerTree> <AddLayerData v-if="panelStore.panelList.leftToolBarList[1].isSelected" ></AddLayerData> </div> + + <!-- 左侧面板footer --> <div class="panle-footer"></div> </div> + <div class="right-panel" v-if="panelStore.rightTooPanel"> - <div class="panle-header"> + <!-- 右侧面板header --> + <div class="panle-header panle-header-right"> <span class="panle-title" v-if="panelStore.panelList.rightToolBarList[0].isSelected" - >{{ $t('global.t_analyse3d') }}</span + >{{ $t("t_analyse3d") }}</span > <span class="panle-title" v-if="panelStore.panelList.rightToolBarList[1].isSelected" - >{{ $t('global.t_measure') }}</span + >{{ $t("t_measure") }}</span > <span class="panle-title" v-if="panelStore.panelList.rightToolBarList[2].isSelected" - >{{ $t('global.t_sceneProperties') }}</span + >{{ $t("t_sceneProperties") }}</span > <span class="panle-title" v-if="panelStore.panelList.rightToolBarList[3].isSelected" - >{{ $t('global.t_objectPainting') }}</span + >{{ $t("t_objectPainting") }}</span > <span class="panle-title" v-if="panelStore.panelList.rightToolBarList[4].isSelected" - >{{ $t('global.layerOpration') }}</span + >{{ $t("layerOpration") }}</span > <span class="panle-title" v-if="panelStore.panelList.rightToolBarList[5].isSelected" - >{{ $t('global.layerAttribute') }}</span + >{{ $t("layerAttribute") }}</span > <span class="panle-title" v-if="panelStore.panelList.rightToolBarList[6].isSelected" - >{{ $t('global.layerStyle') }}</span + >{{ $t("layerStyle") }}</span > <span class="panle-title" v-if="panelStore.panelList.rightToolBarList[7].isSelected" - >{{ $t('global.layerQuery') }}</span + >{{ $t("layerQuery") }}</span > <span class="panle-title" v-if="panelStore.panelList.rightToolBarList[8].isSelected" - >{{ $t('global.mapQuery') }}</span + >{{ $t("mapQuery") }}</span + > + <span + class="panle-title" + v-if="panelStore.panelList.rightToolBarList[9].isSelected" + >{{ $t("qxSingle") }}</span > <span class="zst1"></span> <span class="zst2"></span> <div class="panel-close" @click="panelCloseHandle(2)"> - <i class="iconfont iconguanbi"></i> + <i class="iconfont iconguanbi" style="font-size: 0.14rem"></i> </div> </div> - <div class="panle-container"> - <!-- <component :is="comName"></component>s --> + + <!-- 右侧面板content --> + <div class="panle-container panle-container-right"> <Analyse3D v-if="panelStore.panelList.rightToolBarList[0].isSelected" ></Analyse3D> @@ -87,7 +115,7 @@ <ObjectPainting v-if="panelStore.panelList.rightToolBarList[3].isSelected" ></ObjectPainting> - + <LayerOpration v-if="panelStore.panelList.rightToolBarList[4].isSelected" ></LayerOpration> @@ -103,15 +131,20 @@ <MapQuery v-if="panelStore.panelList.rightToolBarList[8].isSelected" ></MapQuery> + <QxSingle + v-if="panelStore.panelList.rightToolBarList[9].isSelected" + ></QxSingle> </div> - <div class="panle-footer"></div> + + <!-- 右侧面板footer --> + <div class="panle-footer panle-footer-right"></div> </div> </div> </template> <script setup lang="ts"> // 图层列表 -import LayerList from "@/package/layerList/index"; +import LayerTree from "@/package/layerTree/index"; // 添加服务 import AddLayerData from "@/package/addData/index"; // 三维分析 @@ -123,13 +156,13 @@ import SceneSet from "@/package/sceneSet/index"; // 对象绘制 import ObjectPainting from "@/package/objectPainting/index"; - // 图层系列操作 -import LayerOpration from "@/package/layerSeries/layerOpration/index"; -import LayerAttribute from "@/package/layerSeries/layerAttribute/index"; -import LayerStyle from "@/package/layerSeries/layerStyle/index"; -import LayerQuery from "@/package/layerSeries/layerQuery/index"; -import MapQuery from "@/package/layerSeries/mapQuery/index"; +import LayerOpration from "@/package/layerSeries/layer-opration/index"; +import LayerAttribute from "@/package/layerSeries/layer-attribute/index"; +import LayerStyle from "@/package/layerSeries/layer-style/index"; +import LayerQuery from "@/package/layerSeries/layer-query/index"; +import MapQuery from "@/package/layerSeries/map-query/index"; +import QxSingle from "@/package/layerSeries/qx-single/index"; import { usePanelStore } from "@/store/index"; @@ -142,55 +175,75 @@ function panelCloseHandle(leftOrRght: any) { </script> <style lang="scss" scoped> +.too-panel { + z-index: 100; +} + .left-panel { - width: 3.38rem; @include setPanelTitle(); position: fixed; - z-index: 2; - top: 0.6rem; - left: 0.6rem; + top: 0.75rem; + left: 0.55rem; + width: 3.37rem; } + .right-panel { - width: 3.38rem; @include setPanelTitle(); position: fixed; - z-index: 2; - top: 0.6rem; - right: 0.6rem; + top: 0.7rem; + right: 0.45rem; + width: 3.38rem; } + .zst1 { + @include setBackground(0.45rem, 0.11rem, "@/assets/panelbg/zst1.png"); position: absolute; top: 0rem; left: 1.4rem; - @include setBackground(0.44rem, 0.11rem, "@/assets/panelbg/zst1.png"); } + .zst2 { + @include setBackground(1.32rem, 0.08rem, "@/assets/panelbg/zst2.png"); position: absolute; top: 0.26rem; - @include setBackground(1.32rem, 0.08rem, "@/assets/panelbg/zst2.png"); } + .panle-header { - width: 3.38rem; + width: 3.84rem; height: 0.43rem; + padding: 0 0.12rem; background: url("@/assets/panelbg/toubu.png") no-repeat; background-size: 100% 100%; - padding: 0 0.12rem; box-sizing: border-box; } + .panle-container { - // padding: 2px 0px; - width: 3.38rem; + @include setsSrollbar(); + width: 3.84rem; height: auto; + max-height: 6.6rem; background: url("@/assets/panelbg/zhongjian.png"); background-size: 100% 100%; - max-height: 6.6rem; - // overflow-y: scroll; - @include setsSrollbar(); + box-sizing: border-box; } + .panle-footer { - width: 3.38rem; + width: 3.84rem; height: 0.24rem; background: url("@/assets/panelbg/weibu.png") no-repeat; background-size: 100% 100%; + box-sizing: border-box; +} + +.panle-header-right { + width: 3.36rem; +} + +.panle-container-right { + width: 3.36rem; +} + +.panle-footer-right { + width: 3.36rem; } -</style> \ No newline at end of file +</style> diff --git a/SuperMap iEarth/src/views/viewer/index.ts b/SuperMap iEarth/src/views/viewer/index.ts index afb6b9dd..b4b8b912 100644 --- a/SuperMap iEarth/src/views/viewer/index.ts +++ b/SuperMap iEarth/src/views/viewer/index.ts @@ -1,2 +1,2 @@ -import Viewer from "./index.vue" +import Viewer from "./viewer.vue" export default Viewer; \ No newline at end of file diff --git a/SuperMap iEarth/src/views/viewer/index.vue b/SuperMap iEarth/src/views/viewer/index.vue deleted file mode 100644 index c7e9eebd..00000000 --- a/SuperMap iEarth/src/views/viewer/index.vue +++ /dev/null @@ -1,191 +0,0 @@ -<template> - <div id="superMapContainer"></div> - - <!-- 新版表格弹窗 - s3m图层列表:属性查询 --> - <!-- <div id="bubbleNew" class="bubble" style="bottom:0;left:82%;" v-show="layerStore.isDisplayBubble"> - <div id="tools" style="text-align : right"> - <span style="color: rgb(95, 74, 121);padding: 5px;position: absolute;left: 10px;top: 4px;">对象属性</span> - <span class="fui-cross" title="关闭" id="close" style="color: darkgrey;padding:5px"></span> - </div> - <div style="overflow-y:scroll;height:150px" id="tableContainer"><table id="tab"></table></div> - </div> --> -</template> - -<script lang="ts" setup> -import { onMounted, onBeforeUnmount, watch, reactive } from "vue"; -import EventManager from "@/tools/ScreenEventManage/EventManager.js"; -import { GlobalStoreCreate } from '@/store/global/global'; -import { IportalStoreCreate } from "@/store/iportalManage/index"; -import { useLayerStore } from "@/store/layerStore"; -import { storeToRefs } from 'pinia'; -import openScene from "./openScene" -import layerManagement from "@/tools/layerManagement"; -// 导入配置 -import getConfig from '@/tools/getConfig' - -const IportalStore = IportalStoreCreate(); -const GlobalStore = GlobalStoreCreate(); -const { isViewer } = storeToRefs(GlobalStore); -const layerStore = useLayerStore(); - -onMounted(() => initViewer()); - -// 获取token和key相关配置 -getConfig().then(res=>{ -console.log("当前configToken配置:", res); -}); - - -window.EarthGlobal = {}; -//初始化viewer -let viewer; -function initViewer() { -viewer = new SuperMap3D.Viewer("superMapContainer", { - timeline: true, - baseLayerPicker: false, - imageryProvider: false, //必须为false - 关闭默认球皮(影像图层) - navigation: false, - animation: false, // 动画小组件 - infoBox: false, // 信息框 - //开启Webgl2.0 - contextOptions: { - //硬件反走样,1-8,默认值为1 - msaaLevel: 8, - requestWebgl2: true - }, - //不能开启 - shadows: false, - // timeline: true, - // UE阴影 设置为false,使用原来的软阴影效果;设置为true,实现了新的阴影算法,可以大幅度提升阴影边界的质量,看起来会非常柔和,没有锯齿。这个设置webgl2.0默认开启了。 - pcss: true, - shadowQuality: 0, - - creditContainer: document.createElement('div'), //去掉底部logo -}); - -viewer.camera.flyTo({ - destination: new SuperMap3D.Cartesian3.fromDegrees( - 110.60396458865515, - 34.54408834959379, - 30644793.325518917 - ), - duration: 0, - -}); - -// 隐藏时间线控件 -let timelineDom: any = document.getElementsByClassName( - "supermap3d-viewer-timelineContainer" -)[0]; -timelineDom.style.visibility = "hidden"; - - -// 其他设置 -window["viewer"] = viewer; //绑定到window -GlobalStore.isViewer = true; // viewer初始化完成标志 -viewer.eventManager = new EventManager(viewer); //添加屏幕事件管理 -viewer.resolutionScale = window.devicePixelRatio; -viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测 -viewer.scene.globe.baseColor = SuperMap3D.Color.BLACK; // 没有影像图层时地球的底色 -if (viewer.geocoder) { - // 请开发者自行到supermap online官网(http://www.supermapol.com/)申请key - viewer.geocoder.viewModel.geoKey = "fvV2osxwuZWlY0wJb8FEb2i5"; -} - -// 设定项目当前时间 -viewer.clock.currentTime = SuperMap3D.JulianDate.fromDate( - new Date(2023, 3, 20, 12) -); - -// 更换球皮 -let earthSkinImgLayer = viewer.imageryLayers.addImageryProvider( - new SuperMap3D.SingleTileImageryProvider({ - url: "./images/earth-skin.jpg", - }) -); - - -// 开启太阳 - 开启太阳有时候会导致一些场景加载不出来,比如http://10.10.4.90:8090/iserver/services/3D-Mine_Minerales3DV2/rest/realspace -// viewer.scene.globe.enableLighting = true; - -// layerManagement.setSkyBox(true); - -// 设置皮肤,影像图层的效果 -// earthSkinImgLayer.brightness = 0.5; // > 1.0 增加亮度 < 1.0减少亮度 -earthSkinImgLayer.contrast = 1.28; // 图层对比度 > 1 增加 < 1 减少 -// earthSkinImgLayer.hue = 0.5 // 图层色调。值为0.0表示使用原图。 -earthSkinImgLayer.saturation = 0.8; // 图层饱和度 > 1 增加 < 1 减少 -// earthSkinImgLayer.gamma = 0.5 // 图层伽马校正。值为1.0表示使用原图。 - - -// 获取当前环境:创建 || 编辑 or 非iportal环境(普通环境) -function getCreateOrEditScene() { - let url = window.location.href; - - // 判断当前环境:普通、iportal、online - if (url.indexOf("/apps") === -1) { - console.log("当前环境:普通环境"); - GlobalStore.isNormalMode = true; - return; - }else if(url.indexOf('/iportal') != -1){ - console.log("当前环境:iPortal环境"); - }else if(window.location.host.includes('supermapol')){ - console.log("当前环境:Online环境"); - } - - //判断当前模式:创建模式、编辑模式 - if (url.indexOf("id=") === -1) { - IportalStore.isCreateScene = true; - console.log("当前模式:创建模式"); - GlobalStore.isNormalMode = false; - } else { - IportalStore.isCreateScene = false; - GlobalStore.isEditMode = true; - console.log("当前模式:编辑模式"); - GlobalStore.isNormalMode = false; - - openScene.openExistScene(); - } -} -getCreateOrEditScene(); - -// 设置场景 -setTimeout(() => { - // 云层 - let cloudBoxUrl = './images/sceneProperties/clouds/clouds1.png'; - let cloudBox = new SuperMap3D.CloudBox({ url: cloudBoxUrl }); - if (layerStore.sceneAttrState.cloudLayer) { - viewer.scene.cloudBox = cloudBox; - } else { - viewer.scene.cloudBox = null; - } - - // 天空盒 - if (layerStore.sceneAttrState.skyBoxShow) { - layerManagement.setSkyBox(true); - } else { - layerManagement.setSkyBox(false); - } - - layerStore.setSceneAttr(layerStore.sceneAttrState); - - viewer.scene.skyBox.show = true; -}, 1000) -} - -// 销毁 -onBeforeUnmount(() => { -viewer.destroy(); -}); -</script> - -<style lang="scss" scoped> -#superMapContainer { -width: 100%; -height: 100%; -margin: 0; -padding: 0; -// overflow: hidden; -} -</style> - diff --git a/SuperMap iEarth/src/views/viewer/openScene.ts b/SuperMap iEarth/src/views/viewer/openScene.ts index ff916a4a..0c7f56b9 100644 --- a/SuperMap iEarth/src/views/viewer/openScene.ts +++ b/SuperMap iEarth/src/views/viewer/openScene.ts @@ -1,11 +1,10 @@ -import { reactive, onMounted } from "vue" +import { reactive } from "vue" import { useMessage } from "naive-ui" import { IportalStoreCreate } from "@/store/index"; import { usePanelStore } from "@/store/panelStore/index"; +import { useLayerStore } from "@/store/layerStore/layer"; import { getRootUrl, isIportalProxyServiceUrl, getHostName } from "@/tools/iportal/portalTools"; import layerManagement from "@/tools/layerManagement"; -import { useLayerStore } from "@/store/layerStore"; -import getConfig from '@/tools/getConfig'// 导入配置 const IportalStore = IportalStoreCreate(); const panelStore = usePanelStore(); @@ -20,141 +19,157 @@ let state = reactive({ scenePortalUser: "", scenePortalDescription: '', sceneID: '', - // updateTime:undefined, - isNewVersion:true, + updateTime: undefined, + isNewVersion: true, key: layerStore.configToken.BingMapKey, // 必应地图key TiandituToken: layerStore.configToken.TiandituToken, // 天地图token }) +// 打开已保存的场景 function openExistScene() { - getConfig().then((res:any)=>{ - console.log("当前configToken配置-open:", res); - state.key = res.BingMapKey; - state.TiandituToken = res.TiandituToken; + let openExistSceneUrl = window.location.href; + let parmeter = openExistSceneUrl.split("id=")[1]; + state.sceneID = parmeter.split("&")[0]; + let url = getRootUrl() + "web/scenes/" + state.sceneID + ".json"; + if (window.iEarthConsole) console.log("exit-Scene-url:", url) + panelStore.showSavePanel = false; - console.log("打开已存在的保存场景"); - let openExistSceneUrl = window.location.href; - let parmeter = openExistSceneUrl.split("id=")[1]; - state.sceneID = parmeter.split("&")[0]; - - panelStore.showSavePanel = false; - let url = getRootUrl() + "web/scenes/" + state.sceneID + ".json"; - console.log("exit-Scene-url:", url) - - window.axios - .get(url, { withCredentials: true }) - .then(function (response) { - console.log("已保存的场景返回信息:",response); - // state.updateTime = response.data.updateTime; - if (response.status === 200) { - let highestpermissionurl = - getRootUrl() + - "web/permissions/highestpermission.json?resourceIds=" + - encodeURIComponent("[" + state.sceneID + "]") + - "&resourceType=SCENE"; + window.axios + .get(url, { withCredentials: true }) + .then(function (response) { + if (window.iEarthConsole) console.log("已保存的场景返回信息:", response); + // state.updateTime = response.data.updateTime; + if (response.status === 200) { + let highestpermissionurl = + getRootUrl() + + "web/permissions/highestpermission.json?resourceIds=" + + encodeURIComponent("[" + state.sceneID + "]") + + "&resourceType=SCENE"; - // console.log("对接online-highestpermissionurl:",highestpermissionurl); + window.axios + .get(highestpermissionurl, { withCredentials: true }) + .then(function (responseHigh) { + if (responseHigh.data[state.sceneID] === "DELETE") { + // 编辑/删除,可以编辑保存 + openScene(response); + } else if (responseHigh.data[state.sceneID] === "READ") { + // 查看,能看到内容,不能编辑保存 + openScene(response); + } else { + // 私有 或者 检索,看不到内容 + message.error("没有权限"); + } + }); + } else if (response.status === 401) { + //无权限,未登录或者访问的是私有场景 + message.error("没有权限"); + } + }) + .catch(function (error) { + console.log(error); + }); +} - window.axios - .get(highestpermissionurl, { withCredentials: true }) - .then(function (responseHigh) { - // console.log("对接online-responseHigh:",responseHigh); +// 打开场景 +function openScene(response?: any) { + let content = JSON.parse(response.data.content); + if (window.iEarthConsole) console.log("已保存的场景返回内容:", content) + if (content.layers.sceneAttrState) { // 新版的layers才有sceneAttrState属性 + state.isNewVersion = true; + } else { + state.isNewVersion = false; + } + state.scenePortalName = response.data.name; + state.scenePortalTages = response.data.tags.join(","); + state.scenePortalUser = response.data.userName; + state.scenePortalDescription = response.data.description; + IportalStore.saveInfo = { + scenePortalName: state.scenePortalName || '', + scenePortalTages: state.scenePortalTages || '', + scenePortalUser: state.scenePortalUser || '', + scenePortalDescription: state.scenePortalDescription || '', + } - if (responseHigh.data[state.sceneID] === "DELETE") { - // 编辑/删除,可以编辑保存 - openScene(response); - } else if (responseHigh.data[state.sceneID] === "READ") { - // 查看,能看到内容,不能编辑保存 - openScene(response); - - } else { - // 私有 或者 检索,看不到内容 - message.error("没有权限"); - } - }); - } else if (response.status === 401) { - //无权限,未登录或者访问的是私有场景 - message.error("没有权限"); - } - }) - .catch(function (error) { - console.log(error); - }); + if (content) { + if (JSON.stringify(content.layers) !== "{}") { + if (content.environmentState && content.environmentState.sceneMode) { + viewer.scene.mode = content.environmentState.sceneMode; + } - }); + // 将layerTreeAlias传入 (需要在打开图层前导入到store当中) + if (content.layers.layerTreeAlias) { + layerStore.layerTreeAlias = content.layers.layerTreeAlias; + layerStore.setLayerTreeAlias(content.layers.layerTreeAlias); + } - } - - function openScene(response?: any) { - let content = JSON.parse(response.data.content); - console.log("exit-openScene-content:", content) - if(content.layers.sceneAttrState){ // 新版的layers才有sceneAttrState属性 - state.isNewVersion = true; - }else{ - state.isNewVersion = false; - } - state.scenePortalName = response.data.name; - state.scenePortalTages = response.data.tags.join(","); - state.scenePortalUser = response.data.userName; - state.scenePortalDescription = response.data.description; - IportalStore.saveInfo = { - scenePortalName:state.scenePortalName || '', - scenePortalTages:state.scenePortalTages || '', - scenePortalUser:state.scenePortalUser || '', - scenePortalDescription:state.scenePortalDescription || '', + //需要改动 + openS3M(content); + openImagery(content); + openMVT(content); + openTerrain(content); + + // 将SelectedOptions传入 + if (content.layers.SelectedOptions) { + layerStore.SelectedOptions = content.layers.SelectedOptions; + layerStore.updateSelectedOption(content.layers.SelectedOptions); + } + // 将layerQueryOptions传入 + if (content.layers.layerQueryOptions) { + layerStore.layerQueryOptions = content.layers.layerQueryOptions; + } + // 将mapQueryOptions传入 + if (content.layers.mapQueryOptions) { + layerStore.mapQueryOptions = content.layers.mapQueryOptions; + } + // 将mediaFeildOptions传入 + if (content.layers.mediaFeildOptions) { + layerStore.mediaFeildOptions = content.layers.mediaFeildOptions; + } + // 将sceneAttrState传入 + if (content.layers.sceneAttrState) { + layerStore.sceneAttrState = content.layers.sceneAttrState; + layerStore.setSceneAttr(content.layers.sceneAttrState) + } + // 将particleOptions传入 + if (content.layers.particleOptions) { + layerStore.particleOptions = content.layers.particleOptions; + layerStore.setParticle(content.layers.particleOptions) + } + // 将wmtsLayerOption传入 + if (content.layers.wmtsLayerOption) { + layerStore.wmtsLayerOption = content.layers.wmtsLayerOption; + layerStore.setWmts(content.layers.wmtsLayerOption) + } } - console.log("IportalStore.saveInfo-openExit:",IportalStore.saveInfo); - - if (content) { - if (JSON.stringify(content.layers) !== "{}") { - //需要改动 - openS3M(content); - openImagery(content); - openMVT(content); - openTerrain(content); - // 将SelectedOptions传入 - if(content.layers.SelectedOptions){ - layerStore.SelectedOptions = content.layers.SelectedOptions; - layerStore.updateSelectedOption(content.layers.SelectedOptions); - } - // 将layerQueryOptions传入 - if(content.layers.layerQueryOptions){ - layerStore.layerQueryOptions = content.layers.layerQueryOptions; - } - // 将mapQueryOptions传入 - if(content.layers.mapQueryOptions){ - layerStore.mapQueryOptions = content.layers.mapQueryOptions; - } - // 将mediaFeildOptions传入 - if(content.layers.mediaFeildOptions){ - layerStore.mediaFeildOptions = content.layers.mediaFeildOptions; - } - // 将sceneAttrState传入 - if(content.layers.sceneAttrState){ - layerStore.sceneAttrState = content.layers.sceneAttrState; - layerStore.setSceneAttr(content.layers.sceneAttrState) - } - // 将particleOptions传入 - if(content.layers.particleOptions){ - layerStore.particleOptions = content.layers.particleOptions; - layerStore.setParticle(content.layers.particleOptions) - } - // 将wmtsLayerOption传入 - if(content.layers.wmtsLayerOption){ - layerStore.wmtsLayerOption = content.layers.wmtsLayerOption; - layerStore.setWmts(content.layers.wmtsLayerOption) - } + let cameraX = content.camera.position.x; + let cameraY = content.camera.position.y; + let cameraZ = content.camera.position.z; + let positionCartographic = content.camera.positionCartographic; - } - let cameraX = content.camera.position.x; - let cameraY = content.camera.position.y; - let cameraZ = content.camera.position.z; - setTimeout(function () { - // if(Number(state.updateTime) > 11){ // 新老版本判断依据:时间 - if(state.isNewVersion){ + setTimeout(function () { + // 平面场景下(哥伦布视图),如果保存了弧度制的经纬度,就通过经纬度跳转,没有则通过s3m图层跳转 + if (viewer.scene.mode == SuperMap3D.SceneMode.COLUMBUS_VIEW) { + if (positionCartographic) { + let longitude: number = Number(SuperMap3D.Math.toDegrees(positionCartographic.longitude)); + let latitude: number = Number(SuperMap3D.Math.toDegrees(positionCartographic.latitude)); + let height: number = Number(positionCartographic.height); + viewer.scene.camera.setView({ + destination: new SuperMap3D.Cartesian3.fromDegrees(longitude, latitude, height), + orientation: { + heading: content.camera.heading, + pitch: content.camera.pitch, + roll: content.camera.roll + } + }); + } else { + let s3mLayer = viewer.scene.layers._layerQueue[0]; + viewer.flyTo(s3mLayer, { duration: 0 }); + } + } else { + if (state.isNewVersion) { // 新版保存的场景 - console.log('新版IEarth保存的场景'); + if (window.iEarthConsole) console.log('新版IEarth保存的场景'); viewer.scene.camera.setView({ destination: new SuperMap3D.Cartesian3(cameraX, cameraY, cameraZ), orientation: { @@ -163,218 +178,219 @@ function openExistScene() { roll: content.camera.roll } }); - }else{ + } else { // 旧版保存的场景 - console.log('旧版IEarth保存的场景'); + if (window.iEarthConsole) console.log('旧版IEarth保存的场景'); let position = CartesiantoDegrees(new SuperMap3D.Cartesian3(cameraX, cameraY, cameraZ)) viewer.scene.camera.setView({ - destination: position, - orientation: { - heading: content.camera.heading, - pitch: content.camera.pitch, - roll: content.camera.roll - } + destination: position, + orientation: { + heading: content.camera.heading, + pitch: content.camera.pitch, + roll: content.camera.roll + } }); } + } + layerStore.refreshLayerTree(); - layerStore.refreshLayerTree(); + // 将layerStyleOptions传入 - 需要等layer都加载完在设置图层风格 + if (content.layers.layerStyleOptions) { + layerStore.layerStyleOptions = content.layers.layerStyleOptions; + layerStore.setLayerStyle(content.layers.layerStyleOptions) + } + }, 3000); - // 将layerStyleOptions传入 - 需要等layer都加载完在设置图层风格 - if (content.layers.layerStyleOptions) { - layerStore.layerStyleOptions = content.layers.layerStyleOptions; - layerStore.setLayerStyle(content.layers.layerStyleOptions) - } - }, 3000); - } else if (response.data.url) { - - let realspaceUrl = response.data.url; - let index = realspaceUrl.indexOf("/scenes"); - realspaceUrl = realspaceUrl.substring(0, index); - - setTrustedServers(realspaceUrl); - - viewer.scene.open(realspaceUrl); - } + } else if (response.data.url) { + let realspaceUrl = response.data.url; + let index = realspaceUrl.indexOf("/scenes"); + realspaceUrl = realspaceUrl.substring(0, index); + setTrustedServers(realspaceUrl); + viewer.scene.open(realspaceUrl); } +} - // 老版Cesium保存的圆球相机坐标转椭球 - function CartesiantoDegrees(Cartesians){ - // 当坐标为Cesium中保存的,使用圆球进行转换 - var ellipsoid = new SuperMap3D.Ellipsoid(6378137.0, 6378137.0, 6378137.0) - let array = [].concat(Cartesians); - let positions:any = []; - for (let i = 0, len = array.length; i < len; i++) { - let cartographic = SuperMap3D.Cartographic.fromCartesian(array[i],ellipsoid); - let longitude = Number(SuperMap3D.Math.toDegrees(cartographic.longitude)); - let latitude = Number(SuperMap3D.Math.toDegrees(cartographic.latitude)); - let h = Number(cartographic.height); - if (positions.indexOf(longitude) == -1 && positions.indexOf(latitude) == -1) { - positions.push(longitude); - positions.push(latitude); - positions.push(h); - } - return SuperMap3D.Cartesian3.fromDegrees(longitude, latitude, h); +// 老版Cesium保存的圆球相机坐标转椭球 +function CartesiantoDegrees(Cartesians) { + // 当坐标为Cesium中保存的,使用圆球进行转换 + var ellipsoid = new SuperMap3D.Ellipsoid(6378137.0, 6378137.0, 6378137.0) + let array = [].concat(Cartesians); + let positions: any = []; + for (let i = 0, len = array.length; i < len; i++) { + let cartographic = SuperMap3D.Cartographic.fromCartesian(array[i], ellipsoid); + let longitude = Number(SuperMap3D.Math.toDegrees(cartographic.longitude)); + let latitude = Number(SuperMap3D.Math.toDegrees(cartographic.latitude)); + let h = Number(cartographic.height); + if (positions.indexOf(longitude) == -1 && positions.indexOf(latitude) == -1) { + positions.push(longitude); + positions.push(latitude); + positions.push(h); } + return SuperMap3D.Cartesian3.fromDegrees(longitude, latitude, h); + } }; - - function openS3M(content: any) { - let s3mlayer = content.layers.s3mLayer; - if (s3mlayer && s3mlayer.length > 0) { - for (let t = 0; t < s3mlayer.length; t++) { - let url = content.layers.s3mLayer[t].url; - let name = content.layers.s3mLayer[t].name; - setTrustedServers(url); - viewer.scene.addS3MTilesLayerByScp(url, { name: name }); - - layerStore.updateLayer({ type: "s3m" }); - } + +// 打开s3m图层 +function openS3M(content: any) { + let s3mlayer = content.layers.s3mLayer; + if (s3mlayer && s3mlayer.length > 0) { + for (let t = 0; t < s3mlayer.length; t++) { + let url = content.layers.s3mLayer[t].url; + let name = content.layers.s3mLayer[t].name; + setTrustedServers(url); + let bindName = content.layers.s3mLayer[t].bindName || ''; + let promise = viewer.scene.addS3MTilesLayerByScp(url, { name: name }); + SuperMap3D.when(promise, function (layer: any) { + layer.bindName = bindName; + }); + layerStore.updateLayer({ type: "s3m" }); } } - function openImagery(content: any) { - let imageryLayer = content.layers.imageryLayer; - let imageryProvider; - if (imageryLayer && imageryLayer.length > 0) { - for (let i = 0; i < imageryLayer.length; i++) { - let url = content.layers.imageryLayer[i].url; - if(url.indexOf('static/Cesium') != -1){ - console.log('该url不存在'); - continue; - } - if (url.length > 1) { - setTrustedServers(url); - } - let flag = checkImageryRepeat(url); - // console.log("flag-open:",flag); - // console.log("url-open:",url); - if(!flag && imageryLayer[i].type){ - let imageryType = content.layers.imageryLayer[i].type; - switch (imageryType) { - case "BingMapsImageryProvider": - imageryProvider = new SuperMap3D.BingMapsImageryProvider({ - url: content.layers.imageryLayer[i].url, - key: state.key - // key: "Aq0D7MCY5ErORA9vrwFtfE9aancUq5J6uNjw0GieF0ostaIrVuJZ8ScXxNHHvEwS", - }); - break; - case "TiandituImageryProvider": - imageryProvider = new SuperMap3D.TiandituImageryProvider({ - url: content.layers.imageryLayer[i].url, - token: state.TiandituToken - // token: content.layers.imageryLayer[i].token - }); - break; - case "SingleTileImageryProvider": - imageryProvider = new SuperMap3D.SingleTileImageryProvider({ - url: content.layers.imageryLayer[i].url - }); - break; - case "UrlTemplateImageryProvider": - imageryProvider = new SuperMap3D.UrlTemplateImageryProvider({ - url: content.layers.imageryLayer[i].url - }); - break; - case "SuperMapImageryProvider": - imageryProvider = new SuperMap3D.SuperMapImageryProvider({ - url: content.layers.imageryLayer[i].url - }); - break; - case "GRIDIMAGERY": - imageryProvider = new SuperMap3D.TileCoordinatesImageryProvider(); - break; - default: - break; - } - layerStore.updateLayer({ type: "imagery" }); - - viewer.imageryLayers.addImageryProvider(imageryProvider); +} + +// 打开影像图层 +function openImagery(content: any) { + let imageryLayer = content.layers.imageryLayer; + let imageryProvider; + if (imageryLayer && imageryLayer.length > 0) { + for (let i = 0; i < imageryLayer.length; i++) { + let url = content.layers.imageryLayer[i].url; + if (url.indexOf('static/Cesium') != -1) { + console.log('该url不存在'); + continue; + } + if (url.length > 1) { + setTrustedServers(url); + } + let flag = checkImageryRepeat(url); + if (!flag && imageryLayer[i].type) { + let imageryType = content.layers.imageryLayer[i].type; + switch (imageryType) { + case "BingMapsImageryProvider": + imageryProvider = new SuperMap3D.BingMapsImageryProvider({ + url: content.layers.imageryLayer[i].url, + key: state.key + // key: "Aq0D7MCY5ErORA9vrwFtfE9aancUq5J6uNjw0GieF0ostaIrVuJZ8ScXxNHHvEwS", + }); + break; + case "TiandituImageryProvider": + imageryProvider = new SuperMap3D.TiandituImageryProvider({ + url: content.layers.imageryLayer[i].url, + token: state.TiandituToken + // token: content.layers.imageryLayer[i].token + }); + break; + case "SingleTileImageryProvider": + imageryProvider = new SuperMap3D.SingleTileImageryProvider({ + url: content.layers.imageryLayer[i].url + }); + break; + case "UrlTemplateImageryProvider": + imageryProvider = new SuperMap3D.UrlTemplateImageryProvider({ + url: content.layers.imageryLayer[i].url + }); + break; + case "SuperMapImageryProvider": + imageryProvider = new SuperMap3D.SuperMapImageryProvider({ + url: content.layers.imageryLayer[i].url + }); + break; + case "GRIDIMAGERY": + imageryProvider = new SuperMap3D.TileCoordinatesImageryProvider(); + break; + default: + break; } + let imagerlayer = viewer.imageryLayers.addImageryProvider(imageryProvider); + let bindName = imageryLayer[i].bindName || ''; + imagerlayer.bindName = bindName; + layerStore.updateLayer({ type: "imagery" }); } } - } - function openMVT(content: any) { - let MVTLayerUrlList = content.layers.MVTLayer; - if(MVTLayerUrlList && MVTLayerUrlList.length > 0){ - MVTLayerUrlList.forEach(item => { - layerManagement.addMvtLayer(item.url, item.name,"MVT"); - }) - } +} + +// 打开MVT +function openMVT(content: any) { + let MVTLayerUrlList = content.layers.MVTLayer; + if (MVTLayerUrlList && MVTLayerUrlList.length > 0) { + MVTLayerUrlList.forEach(item => { + layerManagement.addMvtLayer(item.url, item.name, "MVT"); + }) } - function openTerrain(content: any) { - - viewer.terrainProvider = new SuperMap3D.EllipsoidTerrainProvider(); - let terrainLayer = content.layers.terrainLayer; - if (terrainLayer && terrainLayer.length > 0) { - let terrainType = content.layers.terrainLayer[0].type; - - let url = content.layers.terrainLayer[0].url; - setTrustedServers(url); - - layerStore.updateLayer({ type: "terrain" }); - - switch (terrainType) { - case "StkTerrain": - let isSctFlag = true; - // 是否为iServer发布的TIN地形服务,stk地形设置为false。 - // if(content.layers.terrainLayer[0].url.indexOf("8090") != -1) isSctFlag = true; - if(content.layers.terrainLayer[0].url.indexOf("/info/") != -1) isSctFlag = false; // 目前以"/info/"来判断是否为stk地形 - viewer.terrainProvider = new SuperMap3D.SuperMapTerrainProvider({ - url: content.layers.terrainLayer[0].url, - isSct: isSctFlag - }); - break; - case "tianDiTuTerrain": - viewer.terrainProvider = new SuperMap3D.TiandituTerrainProvider({ - token: state.TiandituToken - }); - break; - case "supermapOnlineTerrain": - viewer.terrainProvider = new SuperMap3D.SCTTerrainProvider({ - urls: [content.layers.terrainLayer[0].url] - }); - break; - } +} + +// 打开地形 +function openTerrain(content: any) { + viewer.terrainProvider = new SuperMap3D.EllipsoidTerrainProvider(); + let terrainLayer = content.layers.terrainLayer; + if (terrainLayer && terrainLayer.length > 0) { + let terrainType = content.layers.terrainLayer[0].type; + let url = content.layers.terrainLayer[0].url; + setTrustedServers(url); + + layerStore.updateLayer({ type: "terrain" }); + + switch (terrainType) { + case "StkTerrain": + let isSctFlag = true; + // 是否为iServer发布的TIN地形服务,stk地形设置为false。 + // if(content.layers.terrainLayer[0].url.indexOf("8090") != -1) isSctFlag = true; + if (content.layers.terrainLayer[0].url.indexOf("/info/") != -1) isSctFlag = false; // 目前以"/info/"来判断是否为stk地形 + viewer.terrainProvider = new SuperMap3D.SuperMapTerrainProvider({ + url: content.layers.terrainLayer[0].url, + isSct: isSctFlag + }); + break; + case "tianDiTuTerrain": + viewer.terrainProvider = new SuperMap3D.TiandituTerrainProvider({ + token: state.TiandituToken + }); + break; + case "supermapOnlineTerrain": + viewer.terrainProvider = new SuperMap3D.SCTTerrainProvider({ + urls: [content.layers.terrainLayer[0].url] + }); + break; } + let bindName = content.layers.terrainLayer[0].bindName || ''; + viewer.terrainProvider.bindName = bindName; } - - // 检查请求是否带cookie - function setTrustedServers(url:string) { - if (IportalStore.isPortal) { - if (IportalStore.portalConfig) { - let serviceProxy = IportalStore.portalConfig.serviceProxy; - let withCredentials = isIportalProxyServiceUrl(url, serviceProxy); - if (withCredentials) { - let ip = getHostName(url); - if ( - !SuperMap3D.TrustedServers.contains( - "http://" + ip + "/" + serviceProxy.port - ) - ) { - SuperMap3D.TrustedServers.add(ip, serviceProxy.port); - } +} + +// 检查请求是否带cookie +function setTrustedServers(url: string) { + if (IportalStore.isPortal) { + if (IportalStore.portalConfig) { + let serviceProxy = IportalStore.portalConfig.serviceProxy; + let withCredentials = isIportalProxyServiceUrl(url, serviceProxy); + if (withCredentials) { + let ip = getHostName(url); + if ( + !SuperMap3D.TrustedServers.contains( + "http://" + ip + "/" + serviceProxy.port + ) + ) { + SuperMap3D.TrustedServers.add(ip, serviceProxy.port); } } } } +} - // 检查当前影像是否重复添加 - function checkImageryRepeat(url:string){ - // viewer.imageryLayers._layers.find - let length = viewer.imageryLayers._layers.length - for(let i=0;i<length;i++){ - let imageryLayer = viewer.imageryLayers._layers[i]; - if(imageryLayer._imageryProvider.url){ - let imgUrl = imageryLayer._imageryProvider.url; - // if(imgUrl===url){ - // return true; - // } - return imgUrl===url ? true : false; - } - +// 检查当前影像是否重复添加 +function checkImageryRepeat(url: string) { + let length = viewer.imageryLayers._layers.length + for (let i = 0; i < length; i++) { + let imageryLayer = viewer.imageryLayers._layers[i]; + if (imageryLayer._imageryProvider.url) { + let imgUrl = imageryLayer._imageryProvider.url; + return imgUrl === url ? true : false; } } +} - export default { - openExistScene +export default { + openExistScene } \ No newline at end of file diff --git a/SuperMap iEarth/src/views/viewer/viewer.vue b/SuperMap iEarth/src/views/viewer/viewer.vue new file mode 100644 index 00000000..ad277ca7 --- /dev/null +++ b/SuperMap iEarth/src/views/viewer/viewer.vue @@ -0,0 +1,189 @@ +<template> + <div id="superMapContainer"></div> +</template> + +<script lang="ts" setup> +import { onMounted, onBeforeUnmount } from "vue"; +import { GlobalStoreCreate } from "@/store/global/global"; +import { IportalStoreCreate } from "@/store/iportalManage/index"; +import { useLayerStore } from "@/store/layerStore/layer"; +import EventManager from "@/tools/ScreenEventManage/EventManager.js"; +import layerManagement from "@/tools/layerManagement"; +import openScene from "./openScene"; + +// 导入配置 +import getConfig from "@/tools/getConfig"; +import getIPortalSceneInfo from "@/tools/getIPortalSceneInfo"; + +const IportalStore = IportalStoreCreate(); +const GlobalStore = GlobalStoreCreate(); +const layerStore = useLayerStore(); +window.EarthGlobal = {}; + +let viewer: any; + +onMounted(() => { + getCreateOrEditScene(); + initViewer(); +}); + +onBeforeUnmount(() => { + viewer.destroy(); +}); + +// 获取token和key相关配置 +getConfig().then((res) => { + if (window.iEarthConsole) console.log("当前configToken配置:", res); +}); + +// 获取当前环境:创建 || 编辑 or 非iportal环境(普通环境) +function getCreateOrEditScene() { + let url = window.location.href; + + // 判断当前环境:普通、iportal、online + if (url.indexOf("/apps") === -1) { + if (window.iEarthConsole) console.log("当前环境:普通环境"); + GlobalStore.isNormalMode = true; + return; + } else if (url.indexOf("/iportal") != -1) { + if (window.iEarthConsole) console.log("当前环境:iPortal环境"); + } else if (window.location.host.includes("supermapol")) { + if (window.iEarthConsole) console.log("当前环境:Online环境"); + } + + //判断当前模式:创建模式、编辑模式 + if (url.indexOf("id=") === -1) { + IportalStore.isCreateScene = true; + if (window.iEarthConsole) console.log("当前模式:创建模式"); + GlobalStore.isNormalMode = false; + } else { + IportalStore.isCreateScene = false; + GlobalStore.isEditMode = true; + if (window.iEarthConsole) console.log("当前模式:编辑模式"); + GlobalStore.isNormalMode = false; + setTimeout(() => { + openScene.openExistScene(); + }, 500); + } +} + +//初始化viewer +function initViewer() { + viewer = new SuperMap3D.Viewer("superMapContainer", { + // contextOptions: { // 开启Webgl2.0 + // //硬件反走样,1-8,默认值为1 + // msaaLevel: 8, + // requestWebgl2: true + // }, + timeline: true, + baseLayerPicker: false, + imageryProvider: false, //必须为false - 关闭默认球皮(影像图层) + navigation: false, // 罗盘 + animation: false, // 动画小组件 + infoBox: false, // 信息框 + shadows: false, //不能开启 + pcss: true, // UE阴影 设置为false,使用原来的软阴影效果;设置为true,实现了新的阴影算法,可以大幅度提升阴影边界的质量,看起来会非常柔和,没有锯齿。这个设置webgl2.0默认开启了。 + shadowQuality: 0, + creditContainer: document.createElement("div"), //去掉底部logo + }); + + // 获取iportal中保存的场景模式:平面 or 三维 + getIPortalSceneInfo().then((res) => { + if (window.iEarthConsole) console.log("场景模式:", res); + if (Number(res) == 1) { + viewer.scene.mode = SuperMap3D.SceneMode.COLUMBUS_VIEW; // 平面场景 + viewer.camera.flyTo({ + destination: new SuperMap3D.Cartesian3.fromDegrees( + 1.6268196911251191, + 8.156654717721203, + 30763418.112337016 + ), + duration: 0, + }); + } else { + viewer.scene.mode = SuperMap3D.SceneMode.SCENE3D; // 三维场景 + viewer.camera.flyTo({ + destination: new SuperMap3D.Cartesian3.fromDegrees( + 110.60396458865515, + 34.54408834959379, + 30644793.325518917 + ), + duration: 0, + }); + } + }); + + // 隐藏时间线控件 + let timelineDom: any = document.getElementsByClassName( + "supermap3d-viewer-timelineContainer" + )[0]; + timelineDom.style.visibility = "hidden"; + + // 其他设置 + window["viewer"] = viewer; //绑定到window + GlobalStore.isViewer = true; // viewer初始化完成标志 + viewer.eventManager = new EventManager(viewer); //添加屏幕事件管理 + viewer.resolutionScale = window.devicePixelRatio; // 设置渲染分辨率的缩放因子 + viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测 + viewer.scene.globe.baseColor = SuperMap3D.Color.BLACK; // 没有影像图层时地球的底色 + if (viewer.geocoder) { + viewer.geocoder.viewModel.geoKey = "fvV2osxwuZWlY0wJb8FEb2i5"; // 官网申请Key + } + + // 设定项目当前时间 - 强制设置时间后,平面场景会发黑 + viewer.clock.currentTime = SuperMap3D.JulianDate.fromDate( + new Date(2023, 3, 20, 12) + ); + + // 设置环境光 + viewer.scene.lightSource.ambientLightColor = new SuperMap3D.Color( + 0.65, + 0.65, + 0.65, + 1 + ); + + // 更换球皮 + let earthSkinImgLayer = viewer.imageryLayers.addImageryProvider( + new SuperMap3D.SingleTileImageryProvider({ + url: "./images/earth-skin2.jpg", + }) + ); + + // 设置皮肤,影像图层的效果 + earthSkinImgLayer.brightness = 0.8; // > 1.0 增加亮度 < 1.0减少亮度 + earthSkinImgLayer.contrast = 1.3; // 图层对比度 > 1 增加 < 1 减少 + + // 设置场景 + setTimeout(() => { + // 云层 + let cloudBoxUrl = "./images/sceneProperties/clouds/clouds1.png"; + let cloudBox = new SuperMap3D.CloudBox({ url: cloudBoxUrl }); + if (layerStore.sceneAttrState.cloudLayer) { + viewer.scene.cloudBox = cloudBox; + } else { + viewer.scene.cloudBox = null; + } + + // 天空盒 + if (layerStore.sceneAttrState.skyBoxShow) { + layerManagement.setSkyBox(true); + } else { + layerManagement.setSkyBox(false); + } + + layerStore.setSceneAttr(layerStore.sceneAttrState); + + viewer.scene.skyBox.show = true; // 星空背景 + }, 1000); +} +</script> + +<style lang="scss" scoped> +#superMapContainer { + width: 100%; + height: 100%; + margin: 0; + padding: 0; +} +</style> diff --git a/SuperMap iEarth/src/vite-env.d.ts b/SuperMap iEarth/src/vite-env.d.ts index 96d3759c..8b130b3f 100644 --- a/SuperMap iEarth/src/vite-env.d.ts +++ b/SuperMap iEarth/src/vite-env.d.ts @@ -13,16 +13,27 @@ declare interface Window { scene: any, axios: any, editHandler:any, - LangGlobal:any, // 全局语言管理 L:any, // 二维地图库:iclient-leaflet - EarthGlobal:any + EarthGlobal:any, + iEarthConsole:boolean, + lang_support_list:any, + lang_default:string, + lang_data:any, + $t:any, + layerServiceData:any, + configToken:any } //全局声明Cesium和viewer declare var viewer : Window.viewer -// declare var SuperMap3D : Window.SuperMap3D declare var SuperMap3D : Window.SuperMap3D declare var h337 : Window.h337 -declare var GlobalLang : Window.GlobalLang declare var L : Window.L -declare var EarthGlobal : Window.EarthGlobal \ No newline at end of file +declare var EarthGlobal : Window.EarthGlobal +declare var iEarthConsole : Window.iEarthConsole +declare var lang_support_list : Window.lang_support_list +declare var lang_default : Window.lang_default +declare var lang_data : Window.lang_data +declare var $t : Window.$t +declare var layerServiceData : window.layerServiceData +declare var configToken : window.configToken